dash-ant-design 0.1.1 → 0.1.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 (73) hide show
  1. package/dash_antd_components/async-chart-ava.js +1 -1
  2. package/dash_antd_components/async-chart.js +1 -1
  3. package/dash_antd_components/async-form-upload.js +1 -1
  4. package/dash_antd_components/async-icon-outlined.js +1 -1
  5. package/dash_antd_components/async-locale-ar.js +1 -1
  6. package/dash_antd_components/async-locale-az.js +1 -1
  7. package/dash_antd_components/async-locale-bg.js +1 -1
  8. package/dash_antd_components/async-locale-bn.js +1 -1
  9. package/dash_antd_components/async-locale-by.js +1 -1
  10. package/dash_antd_components/async-locale-ca.js +1 -1
  11. package/dash_antd_components/async-locale-cs.js +1 -1
  12. package/dash_antd_components/async-locale-da.js +1 -1
  13. package/dash_antd_components/async-locale-de.js +1 -1
  14. package/dash_antd_components/async-locale-el.js +1 -1
  15. package/dash_antd_components/async-locale-en.js +1 -1
  16. package/dash_antd_components/async-locale-es.js +1 -1
  17. package/dash_antd_components/async-locale-et.js +1 -1
  18. package/dash_antd_components/async-locale-eu.js +1 -1
  19. package/dash_antd_components/async-locale-fa.js +1 -1
  20. package/dash_antd_components/async-locale-fi.js +1 -1
  21. package/dash_antd_components/async-locale-fr.js +1 -1
  22. package/dash_antd_components/async-locale-ga.js +1 -1
  23. package/dash_antd_components/async-locale-gl.js +1 -1
  24. package/dash_antd_components/async-locale-he.js +1 -1
  25. package/dash_antd_components/async-locale-hi.js +1 -1
  26. package/dash_antd_components/async-locale-hr.js +1 -1
  27. package/dash_antd_components/async-locale-hu.js +1 -1
  28. package/dash_antd_components/async-locale-id.js +1 -1
  29. package/dash_antd_components/async-locale-is.js +1 -1
  30. package/dash_antd_components/async-locale-it.js +1 -1
  31. package/dash_antd_components/async-locale-ja.js +1 -1
  32. package/dash_antd_components/async-locale-ka.js +1 -1
  33. package/dash_antd_components/async-locale-kk.js +1 -1
  34. package/dash_antd_components/async-locale-km.js +1 -1
  35. package/dash_antd_components/async-locale-kmr.js +1 -1
  36. package/dash_antd_components/async-locale-kn.js +1 -1
  37. package/dash_antd_components/async-locale-ko.js +1 -1
  38. package/dash_antd_components/async-locale-ku.js +1 -1
  39. package/dash_antd_components/async-locale-lt.js +1 -1
  40. package/dash_antd_components/async-locale-lv.js +1 -1
  41. package/dash_antd_components/async-locale-mk.js +1 -1
  42. package/dash_antd_components/async-locale-ml.js +1 -1
  43. package/dash_antd_components/async-locale-mn.js +1 -1
  44. package/dash_antd_components/async-locale-mr.js +1 -1
  45. package/dash_antd_components/async-locale-ms.js +1 -1
  46. package/dash_antd_components/async-locale-my.js +1 -1
  47. package/dash_antd_components/async-locale-nb.js +1 -1
  48. package/dash_antd_components/async-locale-nl.js +1 -1
  49. package/dash_antd_components/async-locale-pl.js +1 -1
  50. package/dash_antd_components/async-locale-pt.js +1 -1
  51. package/dash_antd_components/async-locale-ro.js +1 -1
  52. package/dash_antd_components/async-locale-ru.js +1 -1
  53. package/dash_antd_components/async-locale-si.js +1 -1
  54. package/dash_antd_components/async-locale-sk.js +1 -1
  55. package/dash_antd_components/async-locale-sr.js +1 -1
  56. package/dash_antd_components/async-locale-sv.js +1 -1
  57. package/dash_antd_components/async-locale-ta.js +1 -1
  58. package/dash_antd_components/async-locale-th.js +1 -1
  59. package/dash_antd_components/async-locale-tk.js +1 -1
  60. package/dash_antd_components/async-locale-tr.js +1 -1
  61. package/dash_antd_components/async-locale-uk.js +1 -1
  62. package/dash_antd_components/async-locale-ur.js +1 -1
  63. package/dash_antd_components/async-locale-uz.js +1 -1
  64. package/dash_antd_components/async-locale-vi.js +1 -1
  65. package/dash_antd_components/async-locale-zh.js +1 -1
  66. package/dash_antd_components/async-markdown.js +1 -1
  67. package/dash_antd_components/async-navigation.js +1 -1
  68. package/dash_antd_components/async-picker.js +1 -1
  69. package/dash_antd_components/async-sheet.js +1 -1
  70. package/dash_antd_components/async-table.js +1 -1
  71. package/dash_antd_components/async-viz-shared.js +1 -1
  72. package/dash_antd_components/dash_antd_components.js +1 -1
  73. package/package.json +2 -2
@@ -1 +1 @@
1
- (self.webpackChunkdash_antd_components=self.webpackChunkdash_antd_components||[]).push([["async-chart"],{"./node_modules/.pnpm/@antv+coord@0.4.7/node_modules/@antv/coord/dist/coordinate.min.js"(t,e){!function(t){"use strict";function e(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&r>=t.length?void 0:t)&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function n(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||0<e--)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function r(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||((r=r||Array.prototype.slice.call(e,0,o))[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))}function o(t){return a(t,"Function")}var i={}.toString,a=function(t,e){return i.call(t)==="[object "+e+"]"},s=function(t){return Array.isArray?Array.isArray(t):a(t,"Array")},c=function(t){if("object"!=typeof(e=t)||null===e||!a(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},l=function(t){return a(t,"Number")},u=Object.values?function(t){return Object.values(t)}:function(t){var e,n=[],r=t,i=function(e,r){o(t)&&"prototype"===r||n.push(e)};if(r)if(s(r))for(var a=0,c=r.length;a<c&&!1!==i(r[a],a);a++);else if(e=typeof r,null!==r&&"object"==e||"function"==e)for(var l in r)if(r.hasOwnProperty(l)&&!1===i(r[l],l))break;return n},f=5;function d(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,o){for(var i in r=r||0,o=o||f,n){var a;n.hasOwnProperty(i)&&(null!==(a=n[i])&&c(a)?(c(e[i])||(e[i]={}),r<o?t(e[i],a,r+1,o):e[i]=n[i]):s(a)?(e[i]=[],e[i]=e[i].concat(a)):void 0!==a&&(e[i]=a))}}(t,e[r]);return t}function p(t){return t}!function(t,e){var n;if(o(t))return(n=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];var i,a=e?e.apply(this,r):r[0],s=n.cache;return s.has(a)?s.get(a):(i=t.apply(this,r),s.set(a,i),i)}).cache=new Map;throw new TypeError("Expected a function")}(function(t,e){var n=(e=void 0===e?{}:e).fontSize,r=e.fontFamily,o=e.fontWeight,i=e.fontStyle;return e=e.fontVariant,(h=h||document.createElement("canvas").getContext("2d")).font=[i,e,o,n+"px",r].join(" "),h.measureText(a(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;var r=Array(t),o=0;for(e=0;e<n;e++)for(var i=arguments[e],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r}([t],u(e=void 0===e?{}:e)).join("")});var h,g="undefined"!=typeof Float32Array?Float32Array:Array;function m(){var t=new g(9);return g!=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 y=function(t,e,n){var r=e[0],o=e[1],i=e[2],a=e[3],s=e[4],c=e[5],l=e[6],u=e[7],f=(e=e[8],n[0]),d=n[1],p=n[2],h=n[3],g=n[4],m=n[5],y=n[6],b=n[7];return n=n[8],t[0]=f*r+d*a+p*l,t[1]=f*o+d*s+p*u,t[2]=f*i+d*c+p*e,t[3]=h*r+g*a+m*l,t[4]=h*o+g*s+m*u,t[5]=h*i+g*c+m*e,t[6]=y*r+b*a+n*l,t[7]=y*o+b*s+n*u,t[8]=y*i+b*c+n*e,t};function b(){var t=new g(16);return g!=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}var v=function(t,e,n){var r=e[0],o=e[1],i=e[2],a=e[3],s=e[4],c=e[5],l=e[6],u=e[7],f=e[8],d=e[9],p=e[10],h=e[11],g=e[12],m=e[13],y=e[14],b=(e=e[15],n[0]),v=n[1],x=n[2],O=n[3];return t[0]=b*r+v*s+x*f+O*g,t[1]=b*o+v*c+x*d+O*m,t[2]=b*i+v*l+x*p+O*y,t[3]=b*a+v*u+x*h+O*e,t[4]=(b=n[4])*r+(v=n[5])*s+(x=n[6])*f+(O=n[7])*g,t[5]=b*o+v*c+x*d+O*m,t[6]=b*i+v*l+x*p+O*y,t[7]=b*a+v*u+x*h+O*e,t[8]=(b=n[8])*r+(v=n[9])*s+(x=n[10])*f+(O=n[11])*g,t[9]=b*o+v*c+x*d+O*m,t[10]=b*i+v*l+x*p+O*y,t[11]=b*a+v*u+x*h+O*e,t[12]=(b=n[12])*r+(v=n[13])*s+(x=n[14])*f+(O=n[15])*g,t[13]=b*o+v*c+x*d+O*m,t[14]=b*i+v*l+x*p+O*y,t[15]=b*a+v*u+x*h+O*e,t};function x(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return t?e.reduce(function(t,e){return function(n){return e(t(n))}},t):p}function O(t){return t instanceof Float32Array||t instanceof Array}function w(t,e,n){for(;t<e;)t+=2*Math.PI;for(;n<t;)t-=2*Math.PI;return t}function j(t,e,r,o,i){var a=(t=n(t,2))[0];return a=[a,t=t[1]],(t=m())[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 k(t,...e){return e.reduce((t,e)=>n=>t(e(n)),t)}function A(t,e){return e-t?n=>(n-t)/(e-t):t=>.5}T=new g(3),g!=Float32Array&&(T[0]=0,T[1]=0,T[2]=0),T=new g(4),g!=Float32Array&&(T[0]=0,T[1]=0,T[2]=0,T[3]=0);const M=Math.sqrt(50),_=Math.sqrt(10),S=Math.sqrt(2);function E(t,e,n){return n=(e=(e-t)/Math.max(0,n))/10**(t=Math.floor(Math.log(e)/Math.LN10)),0<=t?(n>=M?10:n>=_?5:n>=S?2:1)*10**t:-(10**-t)/(n>=M?10:n>=_?5:n>=S?2:1)}const P=(t,e,n=5)=>{let r,o=0,i=(t=[t,e]).length-1,a=t[o],s=t[i];return s<a&&([a,s]=[s,a],[o,i]=[i,o]),0<(r=E(a,s,n))?(a=Math.floor(a/r)*r,s=Math.ceil(s/r)*r,r=E(a,s,n)):r<0&&(a=Math.ceil(a*r)/r,s=Math.floor(s*r)/r,r=E(a,s,n)),0<r?(t[o]=Math.floor(a/r)*r,t[i]=Math.ceil(s/r)*r):r<0&&(t[o]=Math.ceil(a*r)/r,t[i]=Math.floor(s*r)/r),t};function L(t){return null!=t&&!Number.isNaN(t)}function C(t,e){return n=>{n.prototype.rescale=function(){this.initRange(),this.nice();var[t]=this.chooseTransforms();this.composeOutput(t,this.chooseClamp(t))},n.prototype.initRange=function(){this.options.range=t(this.options.interpolator)},n.prototype.composeOutput=function(t,n){var r,{domain:o,interpolator:i,round:a}=this.getOptions(),o=e(o.map(t)),a=a?(r=i,t=>(t=r(t),l(t)?Math.round(t):t)):i;this.output=k(a,o,n,t)},n.prototype.invert=void 0}}var z,T={exports:{}},B={exports:{}},I=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))},N=Array.prototype.concat,R=Array.prototype.slice,F=B.exports=function(t){for(var e=[],n=0,r=t.length;n<r;n++){var o=t[n];I(o)?e=N.call(e,R.call(o)):e.push(o)}return e},D=(F.wrap=function(t){return function(){return t(F(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]}),$=B.exports,W=Object.hasOwnProperty,H=Object.create(null);for(z in D)W.call(D,z)&&(H[D[z]]=z);var q=T.exports={to:{},get:{}};function Y(t,e,n){return Math.min(Math.max(e,t),n)}function X(t){return(t=Math.round(t).toString(16).toUpperCase()).length<2?"0"+t:t}q.get=function(t){var e,n;switch(t.substring(0,3).toLowerCase()){case"hsl":e=q.get.hsl(t),n="hsl";break;case"hwb":e=q.get.hwb(t),n="hwb";break;default:e=q.get.rgb(t),n="rgb"}return e?{model:n,value:e}:null},q.get.rgb=function(t){if(!t)return null;var e,n,r,o=[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 i=2*n;o[n]=parseInt(e.slice(i,2+i),16)}r&&(o[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++)o[n]=parseInt(e[n]+e[n],16);r&&(o[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++)o[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]:W.call(D,e[1])?((o=D[e[1]])[3]=1,o):null:null;for(n=0;n<3;n++)o[n]=Math.round(2.55*parseFloat(e[n+1]))}e[4]&&(o[3]=e[5]?.01*parseFloat(e[4]):parseFloat(e[4]))}for(n=0;n<3;n++)o[n]=Y(o[n],0,255);return o[3]=Y(o[3],0,1),o},q.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,Y(parseFloat(t[2]),0,100),Y(parseFloat(t[3]),0,100),Y(isNaN(e)?1:e,0,1)]):null},q.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,Y(parseFloat(t[2]),0,100),Y(parseFloat(t[3]),0,100),Y(isNaN(e)?1:e,0,1)]):null},q.to.hex=function(){var t=$(arguments);return"#"+X(t[0])+X(t[1])+X(t[2])+(t[3]<1?X(Math.round(255*t[3])):"")},q.to.rgb=function(){var t=$(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]+")"},q.to.rgb.percent=function(){var t=$(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]+")"},q.to.hsl=function(){var t=$(arguments);return t.length<4||1===t[3]?"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)":"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+t[3]+")"},q.to.hwb=function(){var t=$(arguments),e="";return 4<=t.length&&1!==t[3]&&(e=", "+t[3]),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+e+")"},q.to.keyword=function(t){return H[t.slice(0,3)]};var G=T.exports;function V(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 K(t){var e,n,r;return(t=G.get(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*V(n=2*r-(r=r<.5?r*(1+n):r+n-r*n),r,e+1/3),255*V(n,r,e),255*V(n,r,e-1/3),t]):null):null}const U=(t,e)=>n=>t*(1-n)+e*n,Z=(t,e)=>{if("number"==typeof t&&"number"==typeof e)return U(t,e);if("string"!=typeof t||"string"!=typeof e)return()=>t;{var n=t,r=e;const o=K(n),i=K(r);return null===o||null===i?o?()=>n:()=>r:t=>{var e=new Array(4);for(let n=0;n<4;n+=1)e[n]=o[n]*(1-t)+i[n]*t;var[n,r,a,s]=e;return`rgba(${Math.round(n)}, ${Math.round(r)}, ${Math.round(a)}, ${s})`}}},J=(t,e)=>{const n=U(t,e);return t=>Math.round(n(t))};function Q({map:t,initKey:e},n){return e=e(n),t.has(e)?t.get(e):n}function tt(t){return"object"==typeof t?t.valueOf():t}class et extends Map{constructor(t){if(super(),this.map=new Map,this.initKey=tt,null!==t)for(var[e,n]of t)this.set(e,n)}get(t){return super.get(Q({map:this.map,initKey:this.initKey},t))}has(t){return super.has(Q({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 nt{constructor(t){this.options=d({},this.getDefaultOptions()),this.update(t)}getOptions(){return this.options}update(t={}){this.options=d({},this.options,t),this.rescale(t)}rescale(t){}}const rt=Symbol("defaultUnknown");function ot(t,e,n){for(let r=0;r<e.length;r+=1)t.has(e[r])||t.set(n(e[r]),r)}function it(t){var{value:t,from:e,to:n,mapper:r,notFoundReturn:o}=t;let i=r.get(t);if(void 0===i){if(o!==rt)return o;i=e.push(t)-1,r.set(t,i)}return n[i%n.length]}function at(t){return t instanceof Date?t=>""+t:"object"==typeof t?t=>JSON.stringify(t):t=>t}class st extends nt{getDefaultOptions(){return{domain:[],range:[],unknown:rt}}constructor(t){super(t)}map(t){return 0===this.domainIndexMap.size&&ot(this.domainIndexMap,this.getDomain(),this.domainKey),it({value:this.domainKey(t),mapper:this.domainIndexMap,from:this.getDomain(),to:this.getRange(),notFoundReturn:this.options.unknown})}invert(t){return 0===this.rangeIndexMap.size&&ot(this.rangeIndexMap,this.getRange(),this.rangeKey),it({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=at(e),this.rangeKey=at(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 st(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 ct(t){const{domain:e,range:n,paddingOuter:r,paddingInner:o,flex:i,round:a,align:s}=t;var c,l=e.length,u=0<(u=(t=l)-(c=i).length)?[...c,...new Array(u).fill(1)]:u<0?c.slice(0,t):c,[t,c]=n;const f=(g=(c-=t)/(2/l*r+1-1/l*o))*o/l;g-=l*f;const d=function(t){const e=Math.min(...t);return t.map(t=>t/e)}(u),p=g/d.reduce((t,e)=>t+e);u=new et(e.map((t,e)=>(e=d[e]*p,[t,a?Math.floor(e):e])));var h=new et(e.map((t,e)=>(e=d[e]*p+f,[t,a?Math.floor(e):e]))),g=Array.from(h.values()).reduce((t,e)=>t+e);t+=(c-(g-g/l*o))*s;let m=a?Math.round(t):t;var y=new Array(l);for(let t=0;t<l;t+=1){y[t]=(b=m,Math.round(1e12*b)/1e12);var b=e[t];m+=h.get(b)}return{valueBandWidth:u,valueStep:h,adjustedRange:y}}class lt extends st{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,paddingInner:0,paddingOuter:0,padding:0,unknown:rt,flex:[]}}constructor(t){super(t)}clone(){return new lt(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:o}=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 ct(t);var{range:n,paddingOuter:t,paddingInner:r,round:o,align:i}=t;let a,s,c=n[0];return a=(n=n[1]-c)/Math.max(1,2*t+(e-r)),o&&(a=Math.floor(a)),c+=(n-a*(e-r))*i,s=a*(1-r),o&&(c=Math.round(c),s=Math.round(s)),t=new Array(e).fill(0).map((t,e)=>c+e*a),{valueStep:a,valueBandWidth:s,adjustedRange:t}}({align:t,range:n,round:r,flex:o,paddingInner:this.getPaddingInner(),paddingOuter:this.getPaddingOuter(),domain:e});this.valueStep=r,this.valueBandWidth=n,this.adjustedRange=t}}const ut=(t,e,n)=>{let r,o,i=t,a=e;if(i===a&&0<n)return[i];let s=E(i,a,n);if(0===s||!Number.isFinite(s))return[];if(0<s){i=Math.ceil(i/s),a=Math.floor(a/s),o=new Array(r=Math.ceil(a-i+1));for(let t=0;t<r;t+=1)o[t]=(i+t)*s}else{s=-s,i=Math.ceil(i*s),a=Math.floor(a*s),o=new Array(r=Math.ceil(a-i+1));for(let t=0;t<r;t+=1)o[t]=(i+t)/s}return o},ft=(t,e,n)=>{var[t,r]=t,[e,o]=e;let i,a;return k(a=t<r?(i=A(t,r),n(e,o)):(i=A(r,t),n(o,e)),i)},dt=(t,e,n)=>{const r=Math.min(t.length,e.length)-1,o=new Array(r),i=new Array(r);var a=t[0]>t[r],s=a?[...t].reverse():t,c=a?[...e].reverse():e;for(let t=0;t<r;t+=1)o[t]=A(s[t],s[t+1]),i[t]=n(c[t],c[t+1]);return e=>{var n=function(t,e,n,r){let o=1,i=r||t.length;for(var a=t=>t;o<i;){var s=Math.floor((o+i)/2);a(t[s])>e?i=s:o=s+1}return o}(t,e,0,r)-1;return k(i[n],o[n])(e)}},pt=(t,e,n,r)=>(2<Math.min(t.length,e.length)?dt:ft)(t,e,r?J:n);class ht extends nt{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:U,tickCount:5}}map(t){return L(t)?this.output(t):this.options.unknown}invert(t){return L(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,...o]=this.getTickMethodOptions();return t(e,n,r,...o)}getTickMethodOptions(){var{domain:t,tickCount:e}=this.options;return[t[0],t[t.length-1],e]}chooseNice(){return P}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,n=(t=this.options.domain.map(t),Math.min(t.length,n.length));if(e){e=t[0];const r=(t=t[n-1])<e?t:e,o=t<e?e:t;return t=>Math.min(Math.max(r,t),o)}return p}composeOutput(t,e){var{domain:n,range:r,round:o,interpolate:i}=this.options,n=pt(n.map(t),r,i,o);this.output=k(n,e,t)}composeInput(t,e,n){var{domain:r,range:o}=this.options,o=pt(o,r.map(t),U);this.input=k(e,n,o)}}class gt extends ht{getDefaultOptions(){return{domain:[0,1],range:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolate:Z,tickMethod:ut,tickCount:5}}chooseTransforms(){return[p,p]}clone(){return new gt(this.options)}}class mt extends lt{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,padding:0,unknown:rt,paddingInner:1,paddingOuter:0}}constructor(t){super(t)}getPaddingInner(){return 1}clone(){return new mt(this.options)}update(t){super.update(t)}getPaddingOuter(){return this.options.padding}}function yt(t,e){for(var n=[],r=0,o=t.length;r<o;r++)n.push(t[r].substr(0,e));return n}B=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];var bt,vt,xt=yt(T=["January","February","March","April","May","June","July","August","September","October","November","December"],3);!function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0,o=e;r<o.length;r++){var i,a=o[r];for(i in a)t[i]=a[i]}}({},{dayNamesShort:yt(B,3),dayNames:B,monthNamesShort:xt,monthNames:T,amPm:["am","pm"],DoFn:function(t){return t+["th","st","nd","rd"][3<t%10?0:(t-t%10!=10?1:0)*t%10]}});let Ot=bt=class extends gt{getDefaultOptions(){return{domain:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolator:p,tickMethod:ut,tickCount:5}}constructor(t){super(t)}clone(){return new bt(this.options)}};Ot=bt=function(t,e,n,r){var o,i=arguments.length,a=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;0<=s;s--)(o=t[s])&&(a=(i<3?o(a):3<i?o(e,n,a):o(e,n))||a);return 3<i&&a&&Object.defineProperty(e,n,a),a}([C(function(t){return[t(0),t(1)]},t=>{var[t,e]=t;return k(U(0,1),A(t,e))})],Ot);let wt=vt=class extends gt{getDefaultOptions(){return{domain:[0,.5,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolator:p,tickMethod:ut,tickCount:5}}constructor(t){super(t)}clone(){return new vt(this.options)}};function jt(t,e,r,o,i){var a=new gt({range:[e,e+o]}),s=new gt({range:[r,r+i]});return{transform:function(t){var e=(t=n(t,2))[0];return t=t[1],[a.map(e),s.map(t)]},untransform:function(t){var e=(t=n(t,2))[0];return t=t[1],[a.invert(e),s.invert(t)]}}}function kt(t,e,r,o,i){return(0,n(t,1)[0])(e,r,o,i)}function At(t,e,r,o,i){return n(t,1)[0]}function Mt(t,e,r,o,i){var a=(t=n(t,4))[0],s=t[1],c=t[2],l=new gt({range:[c,t=t[3]]}),u=new gt({range:[a,s]}),f=1<(c=i/o)?1:c,d=1<c?1/c:1;return{transform:function(t){var e=(t=n(t,2))[0];return t=t[1],e=u.map(e),[(t=l.map(t))*Math.cos(e)*f*.5+.5,t*Math.sin(e)*d*.5+.5]},untransform:function(t){var e=2*((e=(t=n(t,2))[0])-.5)/f,r=(t=2*((t=t[1])-.5)/d,Math.sqrt(Math.pow(e,2)+Math.pow(t,2)));return t=w(Math.atan2(t,e),a,s),[u.invert(t),l.invert(r)]}}}function _t(t,e,r,o,i){return{transform:function(t){return[(t=n(t,2))[1],t[0]]},untransform:function(t){return[(t=n(t,2))[1],t[0]]}}}function St(t){for(var e=[],o=1;o<arguments.length;o++)e[o-1]=arguments[o];return Tt.apply(void 0,r([[-1,-1]],n(e),!1))}function Et(t){for(var e=[],o=1;o<arguments.length;o++)e[o-1]=arguments[o];return Tt.apply(void 0,r([[-1,1]],n(e),!1))}function Pt(t){for(var e=[],o=1;o<arguments.length;o++)e[o-1]=arguments[o];return Tt.apply(void 0,r([[1,-1]],n(e),!1))}function Lt(t,e,r,o,i){t=n(t,1)[0];var a,s=m();return a=Math.sin(t),t=Math.cos(t),s[0]=t,s[1]=a,s[2]=0,s[3]=-a,s[4]=t,s[5]=0,s[6]=0,s[7]=0,s[8]=1,s}function Ct(t,e,r,o,i){var a=(t=n(t,4))[0],s=t[1],c=t[2],l=(t[3]-c)/(+s/(2*Math.PI)+1),u=l/(2*Math.PI),f=new gt({range:[c,c+.99*l]}),d=new gt({range:[a,s]}),p=1<(t=i/o)?1:t,h=1<t?1/t:1;return{transform:function(t){var e=(t=n(t,2))[0];return t=t[1],e=d.map(e),t=f.map(t),[Math.cos(e)*(u*e+t)*p*.5+.5,Math.sin(e)*(u*e+t)*h*.5+.5]},untransform:function(t){var e=2*((e=(t=n(t,2))[0])-.5)/p,r=(t=2*((t=t[1])-.5)/h,Math.sqrt(Math.pow(e,2)+Math.pow(t,2)));return t=w(Math.atan2(t,e)+Math.floor(r/l)*Math.PI*2,a,s),e=r-u*t,[d.invert(t),f.invert(e)]}}}function zt(t,e,r,o,i){var a=(t=n(t,4))[0],s=t[1],c=new gt({range:[t[2],t=t[3]]});return{transform:function(t){for(var e=[],n=t.length,r=new mt({domain:new Array(n).fill(0).map(function(t,e){return e}),range:[a,s]}),o=0;o<n;o++){var i=t[o],l=r.map(o);i=c.map(i),e.push(l,i)}return e},untransform:function(t){for(var e=[],n=0;n<t.length;n+=2)e.push(c.invert(t[n+1]));return e}}}wt=vt=function(t,e,n,r){var o,i=arguments.length,a=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;0<=s;s--)(o=t[s])&&(a=(i<3?o(a):3<i?o(e,n,a):o(e,n))||a);return 3<i&&a&&Object.defineProperty(e,n,a),a}([C(function(t){return[t(0),t(.5),t(1)]},t=>{const[e,n,r]=t,o=k(U(0,.5),A(e,n)),i=k(U(.5,1),A(n,r));return t=>(e>r?t<n?i:o:t<n?o:i)(t)})],wt);var Tt=function(t,e,r,o,i){var a=(t=n(t,2))[0];return a=[a,t=t[1]],(t=m())[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};function Bt(t){return 1/Math.tan(t)}function It(t,e,r,o,i){var a=Bt(n(t,1)[0]);return{transform:function(t){return[(t=n(t,2))[0]+(t=t[1])*a,t]},untransform:function(t){return[(t=n(t,2))[0]-(t=t[1])*a,t]}}}function Nt(t,e,r,o,i){var a=Bt(n(t,1)[0]);return{transform:function(t){var e=(t=n(t,2))[0];return[e,t[1]+e*a]},untransform:function(t){var e=(t=n(t,2))[0];return[e,t[1]-e*a]}}}function Rt(t,e,n,r,o){var i=t<e;return o=(i?e-r:o-e)||o-r,(r=i?-1:1)*o*(n+1)/(n+o/((t-e)*r))+e}function Ft(t,e,n,r,o){var i=t<e;return(o=(i?e-r:o-e)||o-r)/(o*(n+1)/(t-e)-n*(i?-1:1))+e}function Dt(t,e,n){return n?new gt({range:[0,1],domain:[0,e]}).map(t):t}function $t(t,e,r,o,i){var a=(t=n(t,3))[0],s=t[1],c=Dt(a,o,void 0!==(t=t[2])&&t);return{transform:function(t){var e=(t=n(t,2))[0];return t=t[1],[Rt(e,c,s,0,1),t]},untransform:function(t){var e=(t=n(t,2))[0];return t=t[1],[Ft(e,c,s,0,1),t]}}}function Wt(t,e,r,o,i){var a=(t=n(t,3))[0],s=t[1],c=Dt(a,i,void 0!==(t=t[2])&&t);return{transform:function(t){return[(t=n(t,2))[0],Rt(t[1],c,s,0,1)]},untransform:function(t){return[(t=n(t,2))[0],Ft(t[1],c,s,0,1)]}}}function Ht(t,e,r,o,i){var a=(t=n(t,5))[0],s=t[1],c=t[2],l=t[3],u=Dt(a,o,t=void 0!==(t=t[4])&&t),f=Dt(s,i,t);return{transform:function(t){var e=(t=n(t,2))[0];return t=t[1],[Rt(e,u,c,0,1),Rt(t,f,l,0,1)]},untransform:function(t){var e=(t=n(t,2))[0];return t=t[1],[Ft(e,u,c,0,1),Ft(t,f,l,0,1)]}}}function qt(t,e,r,o,i){var a=(t=n(t,5))[0],s=t[1],c=t[2],l=t[3],u=(t=void 0!==(t=t[4])&&t,new gt({range:[0,o]})),f=new gt({range:[0,i]}),d=t?a:u.map(a),p=t?s:f.map(s);return{transform:function(t){var e=(t=n(t,2))[0],r=(t=t[1],u.map(e)-d),o=f.map(t)-p,i=Math.sqrt(r*r+o*o);return c<i?[e,t]:(e=Rt(i,0,l,0,c),t=Math.atan2(o,r),i=d+e*Math.cos(t),o=p+e*Math.sin(t),[u.invert(i),f.invert(o)])},untransform:function(t){var e=(t=n(t,2))[0],r=(t=t[1],u.map(e)-d),o=f.map(t)-p,i=Math.sqrt(r*r+o*o);return c<i?[e,t]:(e=Ft(i,0,l,0,c),t=Math.atan2(o,r),i=d+e*Math.cos(t),o=p+e*Math.sin(t),[u.invert(i),f.invert(o)])}}}function Yt(t,e,r,o,i,a,s){var c=new gt({range:[e,e+i]}),l=new gt({range:[r,r+a]}),u=new gt({range:[o,o+s]});return{transform:function(t){var e=(t=n(t,3))[0],r=t[1];return t=t[2],[c.map(e),l.map(r),u.map(t)]},untransform:function(t){var e=(t=n(t,3))[0],r=t[1];return t=t[2],[c.invert(e),l.invert(r),u.invert(t)]}}}function Xt(t,e,r,o,i,a,s){var c,l=(t=n(t,3))[0];return l=[l,t[1],t=t[2]],(c=b())[0]=1,c[1]=0,c[2]=0,c[3]=0,c[4]=0,c[5]=1,c[6]=0,c[7]=0,c[8]=0,c[9]=0,c[10]=1,c[11]=0,c[12]=l[0],c[13]=l[1],c[14]=l[2],c[15]=1,c}function Gt(t,e,r,o,i,a,s){return{transform:function(t){return[(t=n(t,3))[1],t[0],t[2]]},untransform:function(t){return[(t=n(t,3))[1],t[0],t[2]]}}}function Vt(t,e,r,o,i,a,s){var c,l=(t=n(t,3))[0],u=t[1];return t=t[2],(c=b())[0]=(l=[l,u,t])[0],c[1]=0,c[2]=0,c[3]=0,c[4]=0,c[5]=l[1],c[6]=0,c[7]=0,c[8]=0,c[9]=0,c[10]=l[2],c[11]=0,c[12]=0,c[13]=0,c[14]=0,c[15]=1,c}function Kt(t){this.options={x:0,y:0,width:300,height:150,transformations:[]},this.transformers={cartesian:jt,translate:j,custom:kt,matrix:At,polar:Mt,transpose:_t,scale:Tt,"shear.x":It,"shear.y":Nt,reflect:St,"reflect.x":Et,"reflect.y":Pt,rotate:Lt,helix:Ct,parallel:zt,fisheye:Ht,"fisheye.x":$t,"fisheye.y":Wt,"fisheye.circular":qt},this.update(t)}function Ut(t){this.options={x:0,y:0,z:0,width:300,height:150,depth:150,transformations:[]},this.transformers={cartesian3D:Yt,translate3D:Xt,scale3D:Vt,transpose3D:Gt},this.update(t)}Kt.prototype.update=function(t){this.options=d({},this.options,t),this.recoordinate()},Kt.prototype.clone=function(){return new Kt(this.options)},Kt.prototype.getOptions=function(){return this.options},Kt.prototype.clear=function(){this.update({transformations:[]})},Kt.prototype.getSize=function(){var t=this.options;return[t.width,t.height]},Kt.prototype.getCenter=function(){var t=this.options;return[(2*t.x+t.width)/2,(2*t.y+t.height)/2]},Kt.prototype.transform=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this.update({transformations:r(r([],n(this.options.transformations),!1),[r([],n(t),!1)],!1)}),this},Kt.prototype.map=function(t){return this.output(t)},Kt.prototype.invert=function(t){return this.input(t)},Kt.prototype.recoordinate=function(){this.output=this.compose(),this.input=this.compose(!0)},Kt.prototype.compose=function(t){function o(t,e){var o;u.push((e=void 0===e||e)?(o=t,function(t){for(var e=[],i=0;i<t.length-1;i+=2){var a=o(a=[t[i],t[i+1]]);e.push.apply(e,r([],n(a),!1))}return e}):t)}var i,a,s=(t=void 0!==t&&t)?r([],n(this.options.transformations),!1).reverse():this.options.transformations,c=t?function(t){return t.untransform}:function(t){return t.transform},l=[],u=[];try{for(var f=e(s),d=f.next();!d.done;d=f.next()){var h,g,m,y,b,v,w=n(d.value),j=w[0],k=w.slice(1),A=this.transformers[j];A&&(g=(h=this.options).x,m=h.y,y=h.width,b=h.height,O(v=A(r([],n(k),!1),g,m,y,b))?l.push(v):(l.length&&(o(this.createMatrixTransform(l,t)),l.splice(0,l.length)),o(c(v)||p,"parallel"!==j)))}}catch(t){i={error:t}}finally{try{d&&!d.done&&(a=f.return)&&a.call(f)}finally{if(i)throw i.error}}return l.length&&o(this.createMatrixTransform(l,t)),x.apply(void 0,r([],n(u),!1))},Kt.prototype.createMatrixTransform=function(t,e){var n,r,o,i,a,s,c,l,u,f,d,p,h=m();return e&&t.reverse(),t.forEach(function(t){return y(h,h,t)}),e&&(e=t=h,(p=new g(9))[0]=e[0],p[1]=e[1],p[2]=e[2],p[3]=e[3],p[4]=e[4],p[5]=e[5],p[6]=e[6],p[7]=e[7],p[8]=e[8],p=(e=p)[0],n=e[1],r=e[2],o=e[3],i=e[4],a=e[5],s=e[6],c=e[7],d=p*(l=(e=e[8])*i-a*c)+n*(u=-e*o+a*s)+r*(f=c*o-i*s))&&(t[0]=l*(d=1/d),t[1]=(-e*n+r*c)*d,t[2]=(a*n-r*i)*d,t[3]=u*d,t[4]=(e*p-r*s)*d,t[5]=(-a*p+r*o)*d,t[6]=f*d,t[7]=(-c*p+n*s)*d,t[8]=(i*p-n*o)*d),function(t){var e,n,r,o,i;return o=(n=e=t=[t[0],t[1],1])[0],e[0]=o*(r=h)[0]+(i=n[1])*r[3]+(n=n[2])*r[6],e[1]=o*r[1]+i*r[4]+n*r[7],e[2]=o*r[2]+i*r[5]+n*r[8],[t[0],t[1]]}},B=Kt,Ut.prototype.update=function(t){this.options=d({},this.options,t),this.recoordinate()},Ut.prototype.clone=function(){return new Ut(this.options)},Ut.prototype.getOptions=function(){return this.options},Ut.prototype.clear=function(){this.update({transformations:[]})},Ut.prototype.getSize=function(){var t=this.options;return[t.width,t.height,t.depth]},Ut.prototype.getCenter=function(){var t=this.options;return[(2*t.x+t.width)/2,(2*t.y+t.height)/2,(2*t.z+t.depth)/2]},Ut.prototype.transform=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this.update({transformations:r(r([],n(this.options.transformations),!1),[r([],n(t),!1)],!1)}),this},Ut.prototype.map=function(t){return this.output(t)},Ut.prototype.invert=function(t){return this.input(t)},Ut.prototype.recoordinate=function(){this.output=this.compose(),this.input=this.compose(!0)},Ut.prototype.compose=function(t){function o(t,e){var o;u.push((e=void 0===e||e)?(o=t,function(t){for(var e=[],i=0;i<t.length-1;i+=3){var a=o(a=[t[i],t[i+1],t[i+2]]);e.push.apply(e,r([],n(a),!1))}return e}):t)}var i,a,s=(t=void 0!==t&&t)?r([],n(this.options.transformations),!1).reverse():this.options.transformations,c=t?function(t){return t.untransform}:function(t){return t.transform},l=[],u=[];try{for(var f=e(s),d=f.next();!d.done;d=f.next()){var h,g,m,y,b,v,w,j,k=n(d.value),A=k[0],M=k.slice(1),_=this.transformers[A];_&&(g=(h=this.options).x,m=h.y,y=h.z,b=h.width,v=h.height,w=h.depth,O(j=_(r([],n(M),!1),g,m,y,b,v,w))?l.push(j):(l.length&&(o(this.createMatrixTransform(l,t)),l.splice(0,l.length)),o(c(j)||p,!0)))}}catch(t){i={error:t}}finally{try{d&&!d.done&&(a=f.return)&&a.call(f)}finally{if(i)throw i.error}}return l.length&&o(this.createMatrixTransform(l,t)),x.apply(void 0,r([],n(u),!1))},Ut.prototype.createMatrixTransform=function(t,e){var n,r,o,i,a,s,c,l,u,f,d,p,h,m,y,x,O,w,j,k,A,M,_,S,E,P,L,C,z=b();return e&&t.reverse(),t.forEach(function(t){return v(z,z,t)}),e&&(e=t=z,(C=new g(16))[0]=e[0],C[1]=e[1],C[2]=e[2],C[3]=e[3],C[4]=e[4],C[5]=e[5],C[6]=e[6],C[7]=e[7],C[8]=e[8],C[9]=e[9],C[10]=e[10],C[11]=e[11],C[12]=e[12],C[13]=e[13],C[14]=e[14],C[15]=e[15],C=(e=C)[0],r=e[2],o=e[3],s=e[6],c=e[7],l=e[8],u=e[9],d=e[11],p=e[12],h=e[13],m=e[14],L=(y=C*(a=e[5])-(n=e[1])*(i=e[4]))*(P=(f=e[10])*(e=e[15])-d*m)-(x=C*s-r*i)*(E=u*e-d*h)+(O=C*c-o*i)*(S=u*m-f*h)+(w=n*s-r*a)*(_=l*e-d*p)-(j=n*c-o*a)*(M=l*m-f*p)+(k=r*c-o*s)*(A=l*h-u*p))&&(t[0]=(a*P-s*E+c*S)*(L=1/L),t[1]=(r*E-n*P-o*S)*L,t[2]=(h*k-m*j+e*w)*L,t[3]=(f*j-u*k-d*w)*L,t[4]=(s*_-i*P-c*M)*L,t[5]=(C*P-r*_+o*M)*L,t[6]=(m*O-p*k-e*x)*L,t[7]=(l*k-f*O+d*x)*L,t[8]=(i*E-a*_+c*A)*L,t[9]=(n*_-C*E-o*A)*L,t[10]=(p*j-h*O+e*y)*L,t[11]=(u*O-l*j-d*y)*L,t[12]=(a*M-i*S-s*A)*L,t[13]=(C*S-n*M+r*A)*L,t[14]=(h*x-p*w-m*y)*L,t[15]=(l*w-u*x+f*y)*L),function(t){var e,n,r,o,i,a;return o=(n=e=t=[t[0],t[1],t[2],1])[0],e[0]=(r=z)[0]*o+r[4]*(i=n[1])+r[8]*(a=n[2])+r[12]*(n=n[3]),e[1]=r[1]*o+r[5]*i+r[9]*a+r[13]*n,e[2]=r[2]*o+r[6]*i+r[10]*a+r[14]*n,e[3]=r[3]*o+r[7]*i+r[11]*a+r[15]*n,[t[0],t[1],t[2]]}},xt=Ut,t.Coordinate=B,t.Coordinate3D=xt,Object.defineProperty(t,"__esModule",{value:!0})}(e)},"./node_modules/.pnpm/@antv+util@3.3.11/node_modules/@antv/util/esm/lodash/deep-mix.js"(t,e,n){"use strict";var r=n("./node_modules/.pnpm/@antv+util@3.3.11/node_modules/@antv/util/esm/lodash/is-array.js"),o=n("./node_modules/.pnpm/@antv+util@3.3.11/node_modules/@antv/util/esm/lodash/is-plain-object.js");function i(t,e){if(Object.hasOwn)return Object.hasOwn(t,e);if(null==t)throw new TypeError("Cannot convert undefined or null to object");return Object.prototype.hasOwnProperty.call(Object(t),e)}function a(t,e,n,s){for(var c in n=n||0,s=s||5,e)if(i(e,c)){var l=e[c];null!==l&&(0,o.A)(l)?((0,o.A)(t[c])||(t[c]={}),n<s?a(t[c],l,n+1,s):t[c]=e[c]):(0,r.A)(l)?(t[c]=[],t[c]=t[c].concat(l)):void 0!==l&&(t[c]=l)}}const s=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)a(t,e[r]);return t};n.d(e,["A",0,s])},"./node_modules/.pnpm/@antv+util@3.3.11/node_modules/@antv/util/esm/lodash/is-object-like.js"(t,e,n){"use strict";n.d(e,["A",0,function(t){return"object"==typeof t&&null!==t}])},"./node_modules/.pnpm/@antv+util@3.3.11/node_modules/@antv/util/esm/lodash/is-plain-object.js"(t,e,n){"use strict";var r=n("./node_modules/.pnpm/@antv+util@3.3.11/node_modules/@antv/util/esm/lodash/is-object-like.js"),o=n("./node_modules/.pnpm/@antv+util@3.3.11/node_modules/@antv/util/esm/lodash/is-type.js");n.d(e,["A",0,function(t){if(!(0,r.A)(t)||!(0,o.A)(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}])},"./node_modules/.pnpm/color-name@1.1.4/node_modules/color-name/index.js"(t){"use strict";t.exports={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]}},"./node_modules/.pnpm/color-string@1.9.1/node_modules/color-string/index.js"(t,e,n){var r=n("./node_modules/.pnpm/color-name@1.1.4/node_modules/color-name/index.js"),o=n("./node_modules/.pnpm/simple-swizzle@0.2.4/node_modules/simple-swizzle/index.js"),i=Object.hasOwnProperty,a=Object.create(null);for(var s in r)i.call(r,s)&&(a[r[s]]=s);var c=t.exports={to:{},get:{}};function l(t,e,n){return Math.min(Math.max(e,t),n)}function u(t){var e=Math.round(t).toString(16).toUpperCase();return e.length<2?"0"+e:e}c.get=function(t){var e,n;switch(t.substring(0,3).toLowerCase()){case"hsl":e=c.get.hsl(t),n="hsl";break;case"hwb":e=c.get.hwb(t),n="hwb";break;default:e=c.get.rgb(t),n="rgb"}return e?{model:n,value:e}:null},c.get.rgb=function(t){if(!t)return null;var e,n,o,a=[0,0,0,1];if(e=t.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(o=e[2],e=e[1],n=0;n<3;n++){var s=2*n;a[n]=parseInt(e.slice(s,s+2),16)}o&&(a[3]=parseInt(o,16)/255)}else if(e=t.match(/^#([a-f0-9]{3,4})$/i)){for(o=(e=e[1])[3],n=0;n<3;n++)a[n]=parseInt(e[n]+e[n],16);o&&(a[3]=parseInt(o+o,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++)a[n]=parseInt(e[n+1],0);e[4]&&(a[3]=e[5]?.01*parseFloat(e[4]):parseFloat(e[4]))}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]:i.call(r,e[1])?((a=r[e[1]])[3]=1,a):null:null;for(n=0;n<3;n++)a[n]=Math.round(2.55*parseFloat(e[n+1]));e[4]&&(a[3]=e[5]?.01*parseFloat(e[4]):parseFloat(e[4]))}for(n=0;n<3;n++)a[n]=l(a[n],0,255);return a[3]=l(a[3],0,1),a},c.get.hsl=function(t){if(!t)return null;var e=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*)?\)$/);if(e){var n=parseFloat(e[4]);return[(parseFloat(e[1])%360+360)%360,l(parseFloat(e[2]),0,100),l(parseFloat(e[3]),0,100),l(isNaN(n)?1:n,0,1)]}return null},c.get.hwb=function(t){if(!t)return null;var e=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*)?\)$/);if(e){var n=parseFloat(e[4]);return[(parseFloat(e[1])%360+360)%360,l(parseFloat(e[2]),0,100),l(parseFloat(e[3]),0,100),l(isNaN(n)?1:n,0,1)]}return null},c.to.hex=function(){var t=o(arguments);return"#"+u(t[0])+u(t[1])+u(t[2])+(t[3]<1?u(Math.round(255*t[3])):"")},c.to.rgb=function(){var t=o(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]+")"},c.to.rgb.percent=function(){var t=o(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]+")"},c.to.hsl=function(){var t=o(arguments);return t.length<4||1===t[3]?"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)":"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+t[3]+")"},c.to.hwb=function(){var t=o(arguments),e="";return t.length>=4&&1!==t[3]&&(e=", "+t[3]),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+e+")"},c.to.keyword=function(t){return a[t.slice(0,3)]}},"./node_modules/.pnpm/is-arrayish@0.3.4/node_modules/is-arrayish/index.js"(t){t.exports=function(t){return!(!t||"string"==typeof t)&&(t instanceof Array||Array.isArray(t)||t.length>=0&&(t.splice instanceof Function||Object.getOwnPropertyDescriptor(t,t.length-1)&&"String"!==t.constructor.name))}},"./node_modules/.pnpm/pdfast@0.2.0/node_modules/pdfast/src/helper.js"(t){"use strict";var e=t.exports;t.exports.isNumber=function(t){return"number"==typeof t},t.exports.findMin=function(t){if(0===t.length)return 1/0;for(var e=t[0],n=1;n<t.length;n++)e=Math.min(e,t[n]);return e},t.exports.findMax=function(t){if(0===t.length)return-1/0;for(var e=t[0],n=1;n<t.length;n++)e=Math.max(e,t[n]);return e},t.exports.findMinMulti=function(t){for(var n=e.findMin(t[0]),r=1;r<t.length;r++)n=Math.min(n,e.findMin(t[r]));return n},t.exports.findMaxMulti=function(t){for(var n=e.findMax(t[0]),r=1;r<t.length;r++)n=Math.max(n,e.findMax(t[r]));return n},t.exports.inside=function(t,e,n){return t<=n&&n<=e}},"./node_modules/.pnpm/pdfast@0.2.0/node_modules/pdfast/src/index.js"(t,e,n){"use strict";var r=Math.log(2),o=t.exports,i=n("./node_modules/.pnpm/pdfast@0.2.0/node_modules/pdfast/src/helper.js");function a(t){return 1-Math.abs(t)}t.exports.getUnifiedMinMax=function(t,e){return o.getUnifiedMinMaxMulti([t],e)},t.exports.getUnifiedMinMaxMulti=function(t,e){var n=!1,r=!1,o=i.isNumber((e=e||{}).width)?e.width:2,a=i.isNumber(e.size)?e.size:50,s=i.isNumber(e.min)?e.min:(n=!0,i.findMinMulti(t)),c=i.isNumber(e.max)?e.max:(r=!0,i.findMaxMulti(t)),l=(c-s)/(a-1);return n&&(s-=2*o*l),r&&(c+=2*o*l),{min:s,max:c}},t.exports.create=function(t,e){if(!t||0===t.length)return[];var n=i.isNumber((e=e||{}).size)?e.size:50,r=i.isNumber(e.width)?e.width:2,s=o.getUnifiedMinMax(t,{size:n,width:r,min:e.min,max:e.max}),c=s.min,l=s.max-c,u=l/(n-1);if(0===l)return[{x:c,y:1}];for(var f=[],d=0;d<n;d++)f.push({x:c+d*u,y:0});var p=function(t,e){for(var n={},r=0,o=-e;o<=e;o++)r+=t(o/e),n[o]=r;return n}(a,r),h=p[r],g=p[r-1]-p[r-2],m=0;t.forEach(function(t){var e=function(t){return Math.floor((t-c)/u)}(t);if(!(e+r<0||e-r>=f.length)){var n=Math.max(e-r,0),o=e,a=Math.min(e+r,f.length-1),s=n-(e-r),l=h/(h-(p[-r-1+s]||0)-(p[-r-1+(e+r-a)]||0));s>0&&(m+=l*(s-1)*g);var d=Math.max(0,e-r+1);i.inside(0,f.length-1,d)&&(f[d].y+=1*l*g),i.inside(0,f.length-1,o+1)&&(f[o+1].y-=2*l*g),i.inside(0,f.length-1,a+1)&&(f[a+1].y+=1*l*g)}});var y=m,b=0,v=0;return f.forEach(function(t){t.y=y+=b+=t.y,v+=y}),v>0&&f.forEach(function(t){t.y/=v}),f},t.exports.getExpectedValueFromPdf=function(t){if(t&&0!==t.length){var e=0;return t.forEach(function(t){e+=t.x*t.y}),e}},t.exports.getXWithLeftTailArea=function(t,e){if(t&&0!==t.length){for(var n=0,r=0,o=0;o<t.length&&(r=o,!((n+=t[o].y)>=e));o++);return t[r].x}},t.exports.getPerplexity=function(t){if(t&&0!==t.length){var e=0;return t.forEach(function(t){var n=Math.log(t.y);isFinite(n)&&(e+=t.y*n)}),e=-e/r,Math.pow(2,e)}}},"./node_modules/.pnpm/simple-swizzle@0.2.4/node_modules/simple-swizzle/index.js"(t,e,n){"use strict";var r=n("./node_modules/.pnpm/is-arrayish@0.3.4/node_modules/is-arrayish/index.js"),o=Array.prototype.concat,i=Array.prototype.slice,a=t.exports=function(t){for(var e=[],n=0,a=t.length;n<a;n++){var s=t[n];r(s)?e=o.call(e,i.call(s)):e.push(s)}return e};a.wrap=function(t){return function(){return t(a(arguments))}}},"./src/components/fragments/async/extensions/Chart.tsx"(t,e,n){"use strict";n.r(e),n.d(e,{default:()=>DI});var r={};n.r(r),n.d(r,{area:()=>mc,bottom:()=>kc,bottomLeft:()=>kc,bottomRight:()=>kc,inside:()=>kc,left:()=>kc,outside:()=>Sc,right:()=>kc,spider:()=>Nc,surround:()=>Fc,top:()=>kc,topLeft:()=>kc,topRight:()=>kc});var o={};n.r(o),n.d(o,{interpolateBlues:()=>xf,interpolateBrBG:()=>Lu,interpolateBuGn:()=>Ku,interpolateBuPu:()=>Zu,interpolateCividis:()=>Lf,interpolateCool:()=>Zf,interpolateCubehelixDefault:()=>Kf,interpolateGnBu:()=>Qu,interpolateGreens:()=>wf,interpolateGreys:()=>kf,interpolateInferno:()=>cd,interpolateMagma:()=>sd,interpolateOrRd:()=>ef,interpolateOranges:()=>Pf,interpolatePRGn:()=>zu,interpolatePiYG:()=>Bu,interpolatePlasma:()=>ld,interpolatePuBu:()=>af,interpolatePuBuGn:()=>rf,interpolatePuOr:()=>Nu,interpolatePuRd:()=>cf,interpolatePurples:()=>Mf,interpolateRainbow:()=>Qf,interpolateRdBu:()=>Fu,interpolateRdGy:()=>$u,interpolateRdPu:()=>uf,interpolateRdYlBu:()=>Hu,interpolateRdYlGn:()=>Yu,interpolateReds:()=>Sf,interpolateSinebow:()=>rd,interpolateSpectral:()=>Gu,interpolateTurbo:()=>od,interpolateViridis:()=>ad,interpolateWarm:()=>Uf,interpolateYlGn:()=>hf,interpolateYlGnBu:()=>df,interpolateYlOrBr:()=>mf,interpolateYlOrRd:()=>bf,schemeAccent:()=>bu,schemeBlues:()=>vf,schemeBrBG:()=>Pu,schemeBuGn:()=>Vu,schemeBuPu:()=>Uu,schemeCategory10:()=>yu,schemeDark2:()=>vu,schemeGnBu:()=>Ju,schemeGreens:()=>Of,schemeGreys:()=>jf,schemeObservable10:()=>xu,schemeOrRd:()=>tf,schemeOranges:()=>Ef,schemePRGn:()=>Cu,schemePaired:()=>Ou,schemePastel1:()=>wu,schemePastel2:()=>ju,schemePiYG:()=>Tu,schemePuBu:()=>of,schemePuBuGn:()=>nf,schemePuOr:()=>Iu,schemePuRd:()=>sf,schemePurples:()=>Af,schemeRdBu:()=>Ru,schemeRdGy:()=>Du,schemeRdPu:()=>lf,schemeRdYlBu:()=>Wu,schemeRdYlGn:()=>qu,schemeReds:()=>_f,schemeSet1:()=>ku,schemeSet2:()=>Au,schemeSet3:()=>Mu,schemeSpectral:()=>Xu,schemeTableau10:()=>_u,schemeYlGn:()=>pf,schemeYlGnBu:()=>ff,schemeYlOrBr:()=>gf,schemeYlOrRd:()=>yf});var i={};n.r(i),n.d(i,{geoAlbers:()=>LC,geoAlbersUsa:()=>CC,geoAzimuthalEqualArea:()=>IC,geoAzimuthalEqualAreaRaw:()=>BC,geoAzimuthalEquidistant:()=>RC,geoAzimuthalEquidistantRaw:()=>NC,geoConicConformal:()=>qC,geoConicConformalRaw:()=>HC,geoConicEqualArea:()=>PC,geoConicEqualAreaRaw:()=>EC,geoConicEquidistant:()=>VC,geoConicEquidistantRaw:()=>GC,geoEqualEarth:()=>ez,geoEqualEarthRaw:()=>tz,geoEquirectangular:()=>XC,geoEquirectangularRaw:()=>YC,geoGnomonic:()=>rz,geoGnomonicRaw:()=>nz,geoIdentity:()=>oz,geoMercator:()=>DC,geoMercatorRaw:()=>FC,geoNaturalEarth1:()=>az,geoNaturalEarth1Raw:()=>iz,geoOrthographic:()=>cz,geoOrthographicRaw:()=>sz,geoProjection:()=>MC,geoProjectionMutator:()=>_C,geoStereographic:()=>uz,geoStereographicRaw:()=>lz,geoTransverseMercator:()=>dz,geoTransverseMercatorRaw:()=>fz});var a={};n.r(a),n.d(a,{frequency:()=>TT,id:()=>BT,name:()=>IT,weight:()=>zT});var s=n("react"),c=n.n(s),l=n("./node_modules/.pnpm/@antv+g@6.3.3/node_modules/@antv/g/dist/index.esm.js"),u=n("./node_modules/.pnpm/@antv+g-canvas@2.2.2/node_modules/@antv/g-canvas/dist/index.esm.js"),f=n("./node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/objectSpread2.js"),d=n("./node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/classCallCheck.js"),p=n("./node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/createClass.js"),h=n("./node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/callSuper.js"),g=n("./node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/inherits.js"),m=n("./node_modules/.pnpm/@antv+g-lite@2.7.2/node_modules/@antv/g-lite/dist/index.esm.js"),y=n("./node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js"),b=n("./node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"),v=n("./node_modules/.pnpm/@antv+util@3.3.11/node_modules/@antv/util/esm/path/util/distance-square-root.js"),x=function(){function t(e){(0,d.A)(this,t),this.dragndropPluginOptions=e}return(0,p.A)(t,[{key:"apply",value:function(e){var n=this,r=e.renderingService,o=e.renderingContext.root.ownerDocument,i=o.defaultView,a=function(t){var e=t.target,r=e===o,a=r&&n.dragndropPluginOptions.isDocumentDraggable?o:e.closest&&e.closest("[draggable=true]");if(a){var s=!1,c=t.timeStamp,l=[t.clientX,t.clientY],u=null,f=[t.clientX,t.clientY],d=function(){var t=(0,b.A)((0,y.A)().mark(function t(i){var d,p,h,g,m,b;return(0,y.A)().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(s){t.next=2;break}if(d=i.timeStamp-c,p=(0,v.F)([i.clientX,i.clientY],l),!(d<=n.dragndropPluginOptions.dragstartTimeThreshold||p<=n.dragndropPluginOptions.dragstartDistanceThreshold)){t.next=1;break}return t.abrupt("return");case 1:i.type="dragstart",a.dispatchEvent(i),s=!0;case 2:if(i.type="drag",i.dx=i.clientX-f[0],i.dy=i.clientY-f[1],a.dispatchEvent(i),f=[i.clientX,i.clientY],r){t.next=4;break}return h="pointer"===n.dragndropPluginOptions.overlap?[i.canvasX,i.canvasY]:e.getBounds().center,t.next=3,o.elementsFromPoint(h[0],h[1]);case 3:m=(g=t.sent)[g.indexOf(e)+1],b=(null==m?void 0:m.closest("[droppable=true]"))||(n.dragndropPluginOptions.isDocumentDroppable?o:null),u!==b&&(u&&(i.type="dragleave",i.target=u,u.dispatchEvent(i)),b&&(i.type="dragenter",i.target=b,b.dispatchEvent(i)),(u=b)&&(i.type="dragover",i.target=u,u.dispatchEvent(i)));case 4:case"end":return t.stop()}},t)}));return function(e){return t.apply(this,arguments)}}();i.addEventListener("pointermove",d);var p=function(t){if(s){t.detail={preventClick:!0};var e=t.clone();u&&(e.type="drop",e.target=u,u.dispatchEvent(e)),e.type="dragend",a.dispatchEvent(e),s=!1}i.removeEventListener("pointermove",d)};e.addEventListener("pointerup",p,{once:!0}),e.addEventListener("pointerupoutside",p,{once:!0})}};r.hooks.init.tap(t.tag,function(){i.addEventListener("pointerdown",a)}),r.hooks.destroy.tap(t.tag,function(){i.removeEventListener("pointerdown",a)})}}])}();x.tag="Dragndrop";var O=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,d.A)(this,e),(t=(0,h.A)(this,e)).name="dragndrop",t.options=n,t}return(0,g.A)(e,t),(0,p.A)(e,[{key:"init",value:function(){this.addRenderingPlugin(new x((0,f.A)({overlap:"pointer",isDocumentDraggable:!1,isDocumentDroppable:!1,dragstartDistanceThreshold:0,dragstartTimeThreshold:0},this.options)))}},{key:"destroy",value:function(){this.removeAllRenderingPlugins()}},{key:"setOptions",value:function(t){Object.assign(this.plugins[0].dragndropPluginOptions,t)}}])}(m.V1);const w=function(t,e,n){var r;return function(){var o=this,i=arguments,a=n&&!r;clearTimeout(r),r=setTimeout(function(){r=null,n||t.apply(o,i)},e),a&&t.apply(o,i)}};var j=n("./node_modules/.pnpm/@antv+util@3.3.11/node_modules/@antv/util/esm/lodash/is-string.js");const k=function(t,e,n){for(var r=0,o=(0,j.A)(e)?e.split("."):e;t&&r<o.length;)t=t[o[r++]];return void 0===t||r<o.length?n:t};var A=n("./node_modules/.pnpm/@antv+event-emitter@0.1.3/node_modules/@antv/event-emitter/esm/index.js");class M extends Map{constructor(t,e=P){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(_(this,t))}has(t){return super.has(_(this,t))}set(t,e){return super.set(S(this,t),e)}delete(t){return super.delete(E(this,t))}}Set;function _({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function S({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function E({_intern:t,_key:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function P(t){return null!==t&&"object"==typeof t?t.valueOf():t}function L(t){return t}function C(t,...e){return I(t,L,L,e)}function z(t,...e){return I(t,Array.from,L,e)}function T(t,e,...n){return I(t,L,e,n)}function B(t,e,...n){return I(t,Array.from,e,n)}function I(t,e,n,r){return function t(o,i){if(i>=r.length)return n(o);const a=new M,s=r[i++];let c=-1;for(const t of o){const e=s(t,++c,o),n=a.get(e);n?n.push(t):a.set(e,[t])}for(const[e,n]of a)a.set(e,t(n,i));return e(a)}(t,0)}var N=n("./node_modules/.pnpm/@antv+util@3.3.11/node_modules/@antv/util/esm/lodash/deep-mix.js"),R=n("./node_modules/.pnpm/@antv+util@3.3.11/node_modules/@antv/util/esm/lodash/is-nil.js");const F=function(t){return(0,R.A)(t)?"":t.toString()};const D=function(t){var e=F(t);return e.charAt(0).toLowerCase()+e.substring(1)};var $=n("./node_modules/.pnpm/@antv+util@3.3.11/node_modules/@antv/util/esm/lodash/is-plain-object.js");function W({map:t,initKey:e},n){const r=e(n);return t.has(r)?t.get(r):n}function H(t){return"object"==typeof t?t.valueOf():t}class q extends Map{constructor(t){if(super(),this.map=new Map,this.initKey=H,null!==t)for(const[e,n]of t)this.set(e,n)}get(t){return super.get(W({map:this.map,initKey:this.initKey},t))}has(t){return super.has(W({map:this.map,initKey:this.initKey},t))}set(t,e){return super.set(function({map:t,initKey:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}({map:this.map,initKey:this.initKey},t),e)}delete(t){return super.delete(function({map:t,initKey:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}({map:this.map,initKey:this.initKey},t))}}class Y{transformBreaks(t){return t}constructor(t){var e;this.options=(0,N.A)({},this.getDefaultOptions()),this.update((null===(e=null==t?void 0:t.breaks)||void 0===e?void 0:e.length)?this.transformBreaks(t):t)}getOptions(){return this.options}update(t={}){const e=t.breaks?this.transformBreaks(t):t;this.options=(0,N.A)({},this.options,e),this.rescale(e)}rescale(t){}}const X=Symbol("defaultUnknown");function G(t,e,n){for(let r=0;r<e.length;r+=1)t.has(e[r])||t.set(n(e[r]),r)}function V(t){const{value:e,from:n,to:r,mapper:o,notFoundReturn:i}=t;let a=o.get(e);if(void 0===a){if(i!==X)return i;a=n.push(e)-1,o.set(e,a)}return r[a%r.length]}function K(t){return t instanceof Date?t=>`${t}`:"object"==typeof t?t=>JSON.stringify(t):t=>t}class U extends Y{getDefaultOptions(){return{domain:[],range:[],unknown:X}}constructor(t){super(t)}map(t){return 0===this.domainIndexMap.size&&G(this.domainIndexMap,this.getDomain(),this.domainKey),V({value:this.domainKey(t),mapper:this.domainIndexMap,from:this.getDomain(),to:this.getRange(),notFoundReturn:this.options.unknown})}invert(t){return 0===this.rangeIndexMap.size&&G(this.rangeIndexMap,this.getRange(),this.rangeKey),V({value:this.rangeKey(t),mapper:this.rangeIndexMap,from:this.getRange(),to:this.getDomain(),notFoundReturn:this.options.unknown})}rescale(t){const[e]=this.options.domain,[n]=this.options.range;if(this.domainKey=K(e),this.rangeKey=K(n),!this.rangeIndexMap)return this.rangeIndexMap=new Map,void(this.domainIndexMap=new Map);t&&!t.range||this.rangeIndexMap.clear(),(!t||t.domain||t.compare)&&(this.domainIndexMap.clear(),this.sortedDomain=void 0)}clone(){return new U(this.options)}getRange(){return this.options.range}getDomain(){if(this.sortedDomain)return this.sortedDomain;const{domain:t,compare:e}=this.options;return this.sortedDomain=e?[...t].sort(e):t,this.sortedDomain}}function Z(t){return Math.round(1e12*t)/1e12}function J(t){const{domain:e,range:n,paddingOuter:r,paddingInner:o,flex:i,round:a,align:s}=t,c=e.length,l=function(t,e){const n=e-t.length;return n>0?[...t,...new Array(n).fill(1)]:n<0?t.slice(0,e):t}(i,c),[u,f]=n,d=f-u,p=d/(2/c*r+1-1/c*o),h=p*o/c,g=p-c*h,m=function(t){const e=t.reduce((t,e)=>Math.min(t,e),1/0);return e===1/0?[]:t.map(t=>t/e)}(l),y=m.reduce((t,e)=>t+e),b=g/y,v=new q(e.map((t,e)=>{const n=m[e]*b;return[t,a?Math.floor(n):n]})),x=new q(e.map((t,e)=>{const n=m[e]*b+h;return[t,a?Math.floor(n):n]})),O=Array.from(x.values()).reduce((t,e)=>t+e),w=u+(d-(O-O/c*o))*s;let j=a?Math.round(w):w;const k=new Array(c);for(let t=0;t<c;t+=1){k[t]=Z(j);j+=x.get(e[t])}return{valueBandWidth:v,valueStep:x,adjustedRange:k}}class Q extends U{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,paddingInner:0,paddingOuter:0,padding:0,unknown:X,flex:[]}}constructor(t){super(t)}clone(){return new Q(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(){const{padding:t,paddingInner:e}=this.options;return t>0?t:e}getPaddingOuter(){const{padding:t,paddingOuter:e}=this.options;return t>0?t:e}rescale(){super.rescale();const{align:t,domain:e,range:n,round:r,flex:o}=this.options,{adjustedRange:i,valueBandWidth:a,valueStep:s}=function(t){var e;const{domain:n}=t,r=n.length;if(0===r)return{valueBandWidth:void 0,valueStep:void 0,adjustedRange:[]};if(null===(e=t.flex)||void 0===e?void 0:e.length)return J(t);const{range:o,paddingOuter:i,paddingInner:a,round:s,align:c}=t;let l,u,f=o[0];const d=o[1]-f;l=d/Math.max(1,2*i+(r-a)),s&&(l=Math.floor(l)),f+=(d-l*(r-a))*c,u=l*(1-a),s&&(f=Math.round(f),u=Math.round(u));const p=new Array(r).fill(0).map((t,e)=>f+e*l);return{valueStep:l,valueBandWidth:u,adjustedRange:p}}({align:t,range:n,round:r,flex:o,paddingInner:this.getPaddingInner(),paddingOuter:this.getPaddingOuter(),domain:e});this.valueStep=s,this.valueBandWidth=a,this.adjustedRange=i}}var tt=n("./node_modules/.pnpm/@antv+util@3.3.11/node_modules/@antv/util/esm/lodash/is-number.js");const et=Math.sqrt(50),nt=Math.sqrt(10),rt=Math.sqrt(2);function ot(t,e,n){const r=(e-t)/Math.max(0,n),o=Math.floor(Math.log(r)/Math.LN10),i=r/10**o;return o>=0?(i>=et?10:i>=nt?5:i>=rt?2:1)*10**o:-(10**-o)/(i>=et?10:i>=nt?5:i>=rt?2:1)}function it(t,e,n){const r=Math.abs(e-t)/Math.max(0,n);let o=10**Math.floor(Math.log(r)/Math.LN10);const i=r/o;return i>=et?o*=10:i>=nt?o*=5:i>=rt&&(o*=2),e<t?-o:o}const at=(t,e,n,r)=>{let o,i,a=t,s=e;if(a===s&&n>0)return[a];let c=ot(a,s,n);if(0===c||!Number.isFinite(c))return[];if(c>0){a=Math.ceil(a/c),s=Math.floor(s/c),i=new Array(o=Math.ceil(s-a+1));for(let t=0;t<o;t+=1)i[t]=(a+t)*c}else{c=-c,a=Math.ceil(a*c),s=Math.floor(s*c),i=new Array(o=Math.ceil(s-a+1));for(let t=0;t<o;t+=1)i[t]=(a+t)/c}return((t,e)=>{if(!(null==e?void 0:e.length))return t;const n=[...t,...e.flatMap(t=>[t.start,t.end])],r=Array.from(new Set(n)).sort((t,e)=>t-e),o=r.filter(t=>!e.some(({start:e,end:n})=>t>e&&t<n));return o.length?o:t})(i,r)};class st extends Y{getDefaultOptions(){return{range:[0],domain:[0,1],unknown:void 0,tickCount:5,tickMethod:at}}map(t){const[e]=this.options.range;return void 0!==e?e:this.options.unknown}invert(t){const[e]=this.options.range;return t===e&&void 0!==e?this.options.domain:[]}getTicks(){const{tickMethod:t,domain:e,tickCount:n}=this.options,[r,o]=e;return(0,tt.A)(r)&&(0,tt.A)(o)?t(r,o,n):[]}clone(){return new st(this.options)}}var ct=function(t,e,n,r){return new(n||(n=Promise))(function(o,i){function a(t){try{c(r.next(t))}catch(t){i(t)}}function s(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){t.done?o(t.value):function(t){return t instanceof n?t:new n(function(e){e(t)})}(t.value).then(a,s)}c((r=r.apply(t,e||[])).next())})};function lt(t){var e;let n=t;for(;n;){if("view"===(null===(e=n.attributes)||void 0===e?void 0:e.class))return n;n=n.parentNode}return null}function ut(t){const{markType:e,nodeName:n}=t;return"heatmap"===e&&"image"===n}function ft(t,e){const n=null!=e?e:lt(t).__data__,r=t.__data__,{markKey:o,index:i,seriesIndex:a,normalized:s={x:0}}=r,{markState:c}=n,l=Array.from(c.keys()).find(t=>t.key===o);if(l)return a?a.map(t=>l.data[t]):ut(t)?l.data[Math.round(l.data.length*s.x)]:l.data[i]}function dt(t,e){const{color:n,facet:r=!1}=t,{color:o,series:i}=e,a=function(t,e){var n,r,o,i;const a=null!==(n=e.markKey)&&void 0!==n?n:null===(o=null===(r=e.element)||void 0===r?void 0:r.__data__)||void 0===o?void 0:o.markKey,s=Object.keys(t).find(e=>{if(e.startsWith("series")){const n=t[e].getOptions();return"series"===n.name&&n.markKey===a}});return null!==(i=t[s])&&void 0!==i?i:t.series}(t,e),s=t=>t&&t.invert&&!(t instanceof Q)&&!(t instanceof st);if(s(a)){return a.clone().invert(i)}if(i&&a instanceof Q&&a.invert(i)!==o&&!r)return a.invert(i);if(s(n)){const t=n.invert(o);return Array.isArray(t)?null:t}return null}function pt(t){return t}function ht(t){return t.reduce((t,e)=>(n,...r)=>e(t(n,...r),...r),pt)}function gt(t){return t.replace(/( |^)[a-z]/g,t=>t.toUpperCase())}function mt(t=""){throw new Error(t)}function yt(t,e){const{attributes:n}=e,r=new Set(["id","className"]);for(const[e,o]of Object.entries(n))r.has(e)||t.attr(e,o)}function bt(t){return null!=t&&!Number.isNaN(t)}function vt(t){const e=new Map;return n=>{if(e.has(n))return e.get(n);const r=t(n);return e.set(n,r),r}}function xt(t,e){return Ot(t,e)||{}}function Ot(t,e){const n=Object.entries(t||{}).filter(([t])=>t.startsWith(e)).map(([t,n])=>[D(t.replace(e,"").trim()),n]).filter(([t])=>!!t);return 0===n.length?null:Object.fromEntries(n)}function wt(t,...e){return Object.fromEntries(Object.entries(t).filter(([t])=>e.every(e=>!t.startsWith(e))))}function jt(t,e){if(void 0===t)return null;if("number"==typeof t)return t;const n=+t.replace("%","");return Number.isNaN(n)?null:n/100*e}function kt(t){return!("object"!=typeof t||t instanceof Date||null===t||Array.isArray(t))}function At(t){return null===t||!1===t}function Mt(t,e,n=5,r=0){if(!(r>=n)){for(const o of Object.keys(e)){const i=e[o];(0,$.A)(i)&&(0,$.A)(t[o])?Mt(t[o],i,n,r+1):t[o]=i}return t}}function _t(t){return new St([t],null,t,t.ownerDocument)}class St{constructor(t=null,e=null,n=null,r=null,o=[null,null,null,null,null],i=[],a=[]){this._elements=Array.from(t),this._data=e,this._parent=n,this._document=r,this._enter=o[0],this._update=o[1],this._exit=o[2],this._merge=o[3],this._split=o[4],this._transitions=i,this._facetElements=a}selectAll(t){const e="string"==typeof t?this._parent.querySelectorAll(t):t;return new St(e,null,this._elements[0],this._document)}selectFacetAll(t){const e="string"==typeof t?this._parent.querySelectorAll(t):t;return new St(this._elements,null,this._parent,this._document,void 0,void 0,e)}select(t){const e="string"==typeof t?this._parent.querySelectorAll(t)[0]||null:t;return new St([e],null,e,this._document)}append(t){const e="function"==typeof t?t:()=>this.createElement(t),n=[];if(null!==this._data){for(let t=0;t<this._data.length;t++){const r=this._data[t],[o,i]=Array.isArray(r)?r:[r,null],a=e(o,t);a.__data__=o,null!==i&&(a.__fromElements__=i),this._parent.appendChild(a),n.push(a)}return new St(n,null,this._parent,this._document)}for(let t=0;t<this._elements.length;t++){const r=this._elements[t],o=e(r.__data__,t);r.appendChild(o),n.push(o)}return new St(n,null,n[0],this._document)}maybeAppend(t,e,n){const r=this._elements[0],o=r.getElementById(t);if(o)return new St([o],null,this._parent,this._document);const i="string"==typeof e?this.createElement(e):e();return i.id=t,n&&(i.className=n),r.appendChild(i),new St([i],null,this._parent,this._document)}data(t,e=t=>t,n=()=>null){const r=[],o=[],i=new Set(this._elements),a=[],s=new Set,c=new Map(this._elements.map((t,n)=>[e(t.__data__,n),t])),l=new Map(this._facetElements.map((t,n)=>[e(t.__data__,n),t])),u=C(this._elements,t=>n(t.__data__));for(let f=0;f<t.length;f++){const d=t[f],p=e(d,f),h=n(d,f);if(c.has(p)){const t=c.get(p);t.__data__=d,t.__facet__=!1,o.push(t),i.delete(t),c.delete(p)}else if(l.has(p)){const t=l.get(p);t.__data__=d,t.__facet__=!0,o.push(t),l.delete(p)}else if(u.has(p)){const t=u.get(p);a.push([d,t]);for(const e of t)i.delete(e);u.delete(p)}else if(c.has(h)){const t=c.get(h);t.__toData__?t.__toData__.push(d):t.__toData__=[d],s.add(t),i.delete(t)}else r.push(d)}const f=[new St([],r,this._parent,this._document),new St(o,null,this._parent,this._document),new St(i,null,this._parent,this._document),new St([],a,this._parent,this._document),new St(s,null,this._parent,this._document)];return new St(this._elements,null,this._parent,this._document,f)}merge(t){const e=[...this._elements,...t._elements],n=[...this._transitions,...t._transitions];return new St(e,null,this._parent,this._document,void 0,n)}createElement(t){if(this._document)return this._document.createElement(t,{});const e=St.registry[t];return e?new e:mt(`Unknown node type: ${t}`)}join(t=t=>t,e=t=>t,n=t=>t.remove(),r=t=>t,o=t=>t.remove()){const i=t(this._enter),a=e(this._update),s=n(this._exit),c=r(this._merge),l=o(this._split);return a.merge(i).merge(s).merge(c).merge(l)}remove(){for(let t=0;t<this._elements.length;t++){const e=this._transitions[t];if(this._elements[t].__removed__=!0,e){const n=Array.isArray(e)?e:[e];Promise.all(n.map(t=>t.finished)).then(()=>{const e=this._elements[t];e.__removed__&&e.remove()})}else{const e=this._elements[t];e.__removed__&&e.remove()}}return new St([],null,this._parent,this._document,void 0,this._transitions)}each(t){for(let e=0;e<this._elements.length;e++){const n=this._elements[e];t(n.__data__,e,n)}return this}attr(t,e){const n="function"!=typeof e?()=>e:e;return this.each(function(r,o,i){void 0!==e&&(i[t]=n(r,o,i))})}style(t,e){const n="function"!=typeof e?()=>e:e;return this.each(function(r,o,i){void 0!==e&&(i.style[t]=n(r,o,i))})}transition(t){const e="function"!=typeof t?()=>t:t,{_transitions:n}=this;return this.each(function(t,r,o){n[r]=e(t,r,o)})}on(t,e){return this.each(function(n,r,o){o.addEventListener(t,e)}),this}call(t,...e){return t(this,...e),this}node(){return this._elements[0]}nodes(){return this._elements}transitions(){return this._transitions}parent(){return this._parent}}St.registry={g:l.YJ,rect:l.rw,circle:l.jl,path:l.wA,text:l.EY,ellipse:l.Pp,image:l._V,line:l.N1,polygon:l.tS,polyline:l.Ro,html:l.g3};const Et="beforerender",Pt="afterrender",Lt="beforepaint",Ct="afterpaint",zt="beforeclear",Tt="afterclear",Bt="beforedestroy",It="afterdestroy",Nt="beforechangesize",Rt="afterchangesize",Ft="pointertap",Dt="pointerdown",$t="pointerup",Wt="pointerover",Ht="pointerout",qt="pointermove",Yt="pointerenter",Xt="pointerleave",Gt="pointerupoutside",Vt="dragstart",Kt="drag",Ut="dragend",Zt="dragenter",Jt="dragleave",Qt="dragover",te="DROP",ee="click",ne="dblclick",re={abs:Math.abs,ceil:Math.ceil,floor:Math.floor,max:Math.max,min:Math.min,round:Math.round,sqrt:Math.sqrt,pow:Math.pow};class oe extends Error{constructor(t,e,n){super(t),this.position=e,this.token=n,this.name="ExpressionError"}}var ie;!function(t){t[t.STRING=0]="STRING",t[t.NUMBER=1]="NUMBER",t[t.BOOLEAN=2]="BOOLEAN",t[t.NULL=3]="NULL",t[t.IDENTIFIER=4]="IDENTIFIER",t[t.OPERATOR=5]="OPERATOR",t[t.FUNCTION=6]="FUNCTION",t[t.DOT=7]="DOT",t[t.BRACKET_LEFT=8]="BRACKET_LEFT",t[t.BRACKET_RIGHT=9]="BRACKET_RIGHT",t[t.PAREN_LEFT=10]="PAREN_LEFT",t[t.PAREN_RIGHT=11]="PAREN_RIGHT",t[t.COMMA=12]="COMMA",t[t.QUESTION=13]="QUESTION",t[t.COLON=14]="COLON",t[t.DOLLAR=15]="DOLLAR"}(ie||(ie={}));const ae=new Set([32,9,10,13]),se=new Set([43,45,42,47,37,33,38,124,61,60,62]),ce=new Map([["true",ie.BOOLEAN],["false",ie.BOOLEAN],["null",ie.NULL]]),le=new Map([["===",!0],["!==",!0],["<=",!0],[">=",!0],["&&",!0],["||",!0],["+",!0],["-",!0],["*",!0],["/",!0],["%",!0],["!",!0],["<",!0],[">",!0]]),ue=new Map([[46,ie.DOT],[91,ie.BRACKET_LEFT],[93,ie.BRACKET_RIGHT],[40,ie.PAREN_LEFT],[41,ie.PAREN_RIGHT],[44,ie.COMMA],[63,ie.QUESTION],[58,ie.COLON],[36,ie.DOLLAR]]),fe=new Map;for(const[t,e]of ue.entries())fe.set(t,{type:e,value:String.fromCharCode(t)});function de(t){return t>=48&&t<=57}function pe(t){return t>=97&&t<=122||t>=65&&t<=90||95===t}function he(t){return pe(t)||de(t)}function ge(t){return se.has(t)}var me;!function(t){t[t.Program=0]="Program",t[t.Literal=1]="Literal",t[t.Identifier=2]="Identifier",t[t.MemberExpression=3]="MemberExpression",t[t.CallExpression=4]="CallExpression",t[t.BinaryExpression=5]="BinaryExpression",t[t.UnaryExpression=6]="UnaryExpression",t[t.ConditionalExpression=7]="ConditionalExpression"}(me||(me={}));const ye=new Map([["||",2],["&&",3],["===",4],["!==",4],[">",5],[">=",5],["<",5],["<=",5],["+",6],["-",6],["*",7],["/",7],["%",7],["!",8]]),be={type:me.Literal,value:null},ve={type:me.Literal,value:!0},xe={type:me.Literal,value:!1},Oe=t=>{let e=0;const n=t.length,r=()=>e>=n?null:t[e],o=()=>t[e++],i=t=>{const e=r();return null!==e&&e.type===t},a=t=>t.type===ie.OPERATOR?ye.get(t.value)||-1:t.type===ie.DOT||t.type===ie.BRACKET_LEFT?9:t.type===ie.QUESTION?1:-1,s=t=>{let n,a;if(o().type===ie.DOT){if(!i(ie.IDENTIFIER)){const t=r();throw new oe("Expected property name",e,t?t.value:"<end of input>")}const t=o();n={type:me.Identifier,name:t.value},a=!1}else{if(n=l(0),!i(ie.BRACKET_RIGHT)){const t=r();throw new oe("Expected closing bracket",e,t?t.value:"<end of input>")}o(),a=!0}return{type:me.MemberExpression,object:t,property:n,computed:a}},c=()=>{const t=r();if(!t)throw new oe("Unexpected end of input",e,"<end of input>");if(t.type===ie.OPERATOR&&("!"===t.value||"-"===t.value)){o();const e=c();return{type:me.UnaryExpression,operator:t.value,argument:e,prefix:!0}}switch(t.type){case ie.NUMBER:return o(),{type:me.Literal,value:Number(t.value)};case ie.STRING:return o(),{type:me.Literal,value:t.value};case ie.BOOLEAN:return o(),"true"===t.value?ve:xe;case ie.NULL:return o(),be;case ie.IDENTIFIER:return o(),{type:me.Identifier,name:t.value};case ie.FUNCTION:return(()=>{const t=o(),n=[];if(!i(ie.PAREN_LEFT)){const t=r();throw new oe("Expected opening parenthesis after function name",e,t?t.value:"<end of input>")}for(o();;){if(i(ie.PAREN_RIGHT)){o();break}if(!r()){const t=r();throw new oe("Expected closing parenthesis",e,t?t.value:"<end of input>")}if(n.length>0){if(!i(ie.COMMA)){const t=r();throw new oe("Expected comma between function arguments",e,t?t.value:"<end of input>")}o()}const t=l(0);n.push(t)}return{type:me.CallExpression,callee:{type:me.Identifier,name:t.value},arguments:n}})();case ie.PAREN_LEFT:{o();const t=l(0);if(!i(ie.PAREN_RIGHT)){const t=r();throw new oe("Expected closing parenthesis",e,t?t.value:"<end of input>")}return o(),t}default:throw new oe(`Unexpected token: ${t.type}`,e,t.value)}},l=(u=0)=>{let f=c();for(;e<n;){const n=t[e],c=a(n);if(c<=u)break;if(n.type!==ie.QUESTION)if(n.type!==ie.OPERATOR){if(n.type!==ie.DOT&&n.type!==ie.BRACKET_LEFT)break;f=s(f)}else{o();const t=l(c);f={type:me.BinaryExpression,operator:n.value,left:f,right:t}}else{o();const t=l(0);if(!i(ie.COLON)){const t=r();throw new oe("Expected : in conditional expression",e,t?t.value:"<end of input>")}o();const n=l(0);f={type:me.ConditionalExpression,test:f,consequent:t,alternate:n}}}return f},u=l();return{type:me.Program,body:u}},we=(t,e,n)=>{let r=e;n&&(r={...e,context:{...e.context,...n}});const o=t=>{switch(t.type){case me.Literal:return(t=>t.value)(t);case me.Identifier:return(t=>{if(!(t.name in r.context))throw new oe(`Undefined variable: ${t.name}`);return r.context[t.name]})(t);case me.MemberExpression:return(t=>{const e=o(t.object);if(null==e)throw new oe("Cannot access property of null or undefined");return e[t.computed?o(t.property):t.property.name]})(t);case me.CallExpression:return(t=>{const e=r.functions[t.callee.name];if(!e)throw new oe(`Undefined function: ${t.callee.name}`);return e(...t.arguments.map(t=>o(t)))})(t);case me.BinaryExpression:return(t=>{if("&&"===t.operator){const e=o(t.left);return e?o(t.right):e}if("||"===t.operator)return o(t.left)||o(t.right);const e=o(t.left),n=o(t.right);switch(t.operator){case"+":return e+n;case"-":return e-n;case"*":return e*n;case"/":return e/n;case"%":return e%n;case"===":return e===n;case"!==":return e!==n;case">":return e>n;case">=":return e>=n;case"<":return e<n;case"<=":return e<=n;default:throw new oe(`Unknown operator: ${t.operator}`)}})(t);case me.UnaryExpression:return(t=>{const e=o(t.argument);if(t.prefix)switch(t.operator){case"!":return!e;case"-":if("number"!=typeof e)throw new oe(`Cannot apply unary - to non-number: ${e}`);return-e;default:throw new oe(`Unknown operator: ${t.operator}`)}throw new oe(`Postfix operators are not supported: ${t.operator}`)})(t);case me.ConditionalExpression:return(t=>{const e=o(t.test);return o(e?t.consequent:t.alternate)})(t);default:throw new oe(`Evaluation error: Unsupported node type: ${t.type}`)}};return o(t.body)};function je(t){const e=(t=>{const e=t,n=e.length,r=new Array(Math.ceil(n/3));let o=0,i=0;function a(t){const r=i+1;i++;let o="",a=!1;for(;i<n;){const n=e.charCodeAt(i);if(n===t)return a||(o=e.substring(r,i)),i++,{type:ie.STRING,value:o};92===n?(a||(o=e.substring(r,i),a=!0),i++,o+=e[i]):a&&(o+=e[i]),i++}throw new oe(`Unterminated string starting with ${String.fromCharCode(t)}`,i,e.substring(Math.max(0,i-10),i))}function s(){const t=i;for(45===e.charCodeAt(i)&&i++;i<n&&de(e.charCodeAt(i));)i++;if(i<n&&46===e.charCodeAt(i))for(i++;i<n&&de(e.charCodeAt(i));)i++;const r=e.slice(t,i);return{type:ie.NUMBER,value:r}}function c(){i++;const t=i;if(i<n&&pe(e.charCodeAt(i)))for(i++;i<n&&he(e.charCodeAt(i));)i++;const r=e.slice(t,i);return{type:ie.FUNCTION,value:r}}function l(){const t=i++;for(;i<n&&he(e.charCodeAt(i));)i++;const r=e.slice(t,i),o=ce.get(r);return o?{type:o,value:r}:{type:ie.IDENTIFIER,value:r}}function u(){if(i+2<n){const t=e.substring(i,i+3);if(le.has(t))return i+=3,{type:ie.OPERATOR,value:t}}if(i+1<n){const t=e.substring(i,i+2);if(le.has(t))return i+=2,{type:ie.OPERATOR,value:t}}const t=e[i];if(le.has(t))return i++,{type:ie.OPERATOR,value:t};throw new oe(`Unknown operator at position ${i}: ${e.substring(i,i+1)}`,i,e.substring(Math.max(0,i-10),i))}for(;i<n;){const t=e.charCodeAt(i);if(ae.has(t)){i++;continue}const f=fe.get(t);if(f)r[o++]=f,i++;else if(34!==t&&39!==t)if(de(t)||45===t&&i+1<n&&de(e.charCodeAt(i+1)))r[o++]=s();else if(64!==t)if(pe(t))r[o++]=l();else{if(!ge(t))throw new oe(`Unexpected character: ${e[i]}`,i,e.substring(Math.max(0,i-10),i));r[o++]=u()}else r[o++]=c();else r[o++]=a(t)}return o===r.length?r:r.slice(0,o)})(t),n=Oe(e),r=((t={},e={})=>({context:t,functions:e}))({},re);return(t={})=>we(n,r,t)}var ke=n("./node_modules/.pnpm/@antv+util@3.3.11/node_modules/@antv/util/esm/lodash/is-object.js"),Ae=function(t){return t};var Me=n("./node_modules/.pnpm/flru@1.0.2/node_modules/flru/dist/flru.mjs");(0,Me.A)(3);function _e(t,e=(...t)=>`${t[0]}`,n=16){const r=(0,Me.A)(n);return(...n)=>{const o=e(...n);let i=r.get(o);return r.has(o)?r.get(o):(i=t(...n),r.set(o,i),i)}}const Se=["style","encode","labels","children"],Ee=_e(t=>{const e=je(t);return(...t)=>{const n=Array.from({length:t.length},(t,e)=>String.fromCharCode(97+e)),r=Object.fromEntries(t.map((t,e)=>[n[e],t]));return e(Object.assign(Object.assign({},r),{global:Object.assign({},r)}))}},t=>t,128);function Pe(t,e=!0){if(Array.isArray(t))return t.map((n,r)=>Pe(t[r],e));if("object"==typeof t&&t)return function(t,e){void 0===e&&(e=Ae);var n={};return(0,ke.A)(t)&&!(0,R.A)(t)&&Object.keys(t).forEach(function(r){n[r]=e(t[r],r)}),n}(t,(t,n)=>e&&Se.includes(n)?Pe(t,"children"===n):e?t:Pe(t,!1));if("string"==typeof t){const e=t.trim();if(e.startsWith("{")&&e.endsWith("}"))return Ee(e.slice(1,-1))}return t}var Le=n("./node_modules/.pnpm/@antv+util@3.3.11/node_modules/@antv/util/esm/lodash/is-array.js");const Ce=function(t){var e=F(t);return e.charAt(0).toUpperCase()+e.substring(1)};var ze=n("./node_modules/.pnpm/d3-format@3.1.2/node_modules/d3-format/src/defaultLocale.js");function Te(t,e){return Object.entries(t).reduce((n,[r,o])=>(n[r]=e(o,r,t),n),{})}function Be(t){return t.map((t,e)=>e)}function Ie(t){return t[0]}function Ne(t){return t[t.length-1]}function Re(t,e){const n=[[],[]];return t.forEach(t=>{n[e(t)?0:1].push(t)}),n}function Fe(t,e=t.length){if(1===e)return t.map(t=>[t]);const n=[];for(let r=0;r<t.length;r++){Fe(t.slice(r+1),e-1).forEach(e=>{n.push([t[r],...e])})}return n}var De=n("./node_modules/.pnpm/@antv+util@3.3.11/node_modules/@antv/util/esm/lodash/is-object-like.js");const $e=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)};var We=function(t,e){if(t===e)return!0;if(!t||!e)return!1;if((0,j.A)(t)||(0,j.A)(e))return!1;if($e(t)||$e(e)){if(t.length!==e.length)return!1;for(var n=!0,r=0;r<t.length&&(n=We(t[r],e[r]));r++);return n}if((0,De.A)(t)||(0,De.A)(e)){var o=Object.keys(t),i=Object.keys(e);if(o.length!==i.length)return!1;for(n=!0,r=0;r<o.length&&(n=We(t[o[r]],e[o[r]]));r++);return n}return!1};const He=We;function qe(t,e){let n=0;if(void 0===e)for(let e of t)(e=+e)&&(n+=e);else{let r=-1;for(let o of t)(o=+e(o,++r,t))&&(n+=o)}return n}function Ye(t,e){let n;if(void 0===e)for(const e of t)null!=e&&(n<e||void 0===n&&e>=e)&&(n=e);else{let r=-1;for(let o of t)null!=(o=e(o,++r,t))&&(n<o||void 0===n&&o>=o)&&(n=o)}return n}const Xe=(t={})=>{const e={startAngle:-Math.PI/2,endAngle:3*Math.PI/2,innerRadius:0,outerRadius:1},n=Object.assign(Object.assign({},e),t);return Object.assign(Object.assign({},n),(r=n.startAngle,o=n.endAngle,r%=2*Math.PI,o%=2*Math.PI,r<0&&(r=2*Math.PI+r),o<0&&(o=2*Math.PI+o),r>=o&&(o+=2*Math.PI),{startAngle:r,endAngle:o}));var r,o},Ge=t=>{const{startAngle:e,endAngle:n,innerRadius:r,outerRadius:o}=Xe(t);return[["translate",0,.5],["reflect.y"],["translate",0,-.5],["polar",e,n,r,o]]};Ge.props={};const Ve=(t={})=>{const e={startAngle:-Math.PI/2,endAngle:3*Math.PI/2,innerRadius:0,outerRadius:1};return Object.assign(Object.assign({},e),t)},Ke=t=>{const{startAngle:e,endAngle:n,innerRadius:r,outerRadius:o}=Ve(t);return[["transpose"],["translate",.5,.5],["reflect"],["translate",-.5,-.5],...Ge({startAngle:e,endAngle:n,innerRadius:r,outerRadius:o})]};function Ue(t,e,n){return Math.max(e,Math.min(t,n))}function Ze(t,e=10){return"number"!=typeof t||Math.abs(t)<1e-15?t:parseFloat(t.toFixed(e))}Ke.props={};function Je(t){return`.g2-${t}`}const Qe=[["legendCategory",[[["color","discrete"],["opacity","discrete"],["shape","discrete"],["size","constant"]],[["color","discrete"],["opacity","constant"],["shape","discrete"],["size","constant"]],[["color","discrete"],["opacity","discrete"],["shape","constant"],["size","constant"]],[["color","discrete"],["opacity","constant"],["shape","constant"],["size","constant"]],[["color","constant"],["opacity","discrete"],["shape","discrete"],["size","constant"]],[["color","constant"],["opacity","constant"],["shape","discrete"],["size","constant"]],[["color","constant"],["opacity","discrete"],["shape","constant"],["size","constant"]],[["color","discrete"],["shape","discrete"],["size","constant"]],[["color","discrete"],["opacity","discrete"],["shape","discrete"]],[["color","discrete"],["opacity","discrete"],["size","constant"]],[["color","discrete"],["opacity","constant"],["shape","discrete"]],[["color","discrete"],["opacity","constant"],["size","constant"]],[["color","discrete"],["shape","constant"],["size","constant"]],[["color","discrete"],["opacity","discrete"],["shape","constant"]],[["color","discrete"],["opacity","constant"],["shape","constant"]],[["color","constant"],["shape","discrete"],["size","constant"]],[["color","constant"],["opacity","discrete"],["shape","discrete"]],[["color","constant"],["opacity","discrete"],["size","constant"]],[["color","constant"],["opacity","constant"],["shape","discrete"]],[["color","constant"],["opacity","discrete"],["shape","constant"]],[["color","discrete"],["shape","discrete"]],[["color","discrete"],["size","constant"]],[["color","discrete"],["opacity","discrete"]],[["color","discrete"],["opacity","constant"]],[["color","discrete"],["shape","constant"]],[["color","constant"],["shape","discrete"]],[["color","constant"],["size","constant"]],[["color","constant"],["opacity","discrete"]],[["color","discrete"]]]],["legendContinuousSize",[[["color","continuous"],["opacity","continuous"],["size","continuous"]],[["color","constant"],["opacity","continuous"],["size","continuous"]],[["color","continuous"],["size","continuous"]],[["color","constant"],["size","continuous"]],[["size","continuous"],["opacity","continuous"]],[["size","continuous"]]]],["legendContinuousBlockSize",[[["color","distribution"],["opacity","distribution"],["size","distribution"]],[["color","distribution"],["size","distribution"]]]],["legendContinuousBlock",[[["color","distribution"],["opacity","continuous"]],[["color","distribution"]]]],["legendContinuous",[[["color","continuous"],["opacity","continuous"]],[["color","continuous"]],[["opacity","continuous"]]]]],tn=["lineX","lineY","rangeX","rangeY","range","connector"];var en=n("./node_modules/.pnpm/@antv+coord@0.4.7/node_modules/@antv/coord/dist/coordinate.min.js");function nn(t){const{transformations:e}=t.getOptions();return e.map(([t])=>t).filter(t=>"transpose"===t).length%2!=0}function rn(t){const{transformations:e}=t.getOptions();return e.some(([t])=>"polar"===t)}function on(t){const{transformations:e}=t.getOptions();return e.some(([t])=>"reflect"===t)&&e.some(([t])=>t.startsWith("transpose"))}function an(t){const{transformations:e}=t.getOptions();return e.some(([t])=>"helix"===t)}function sn(t){const{transformations:e}=t.getOptions();return e.some(([t])=>"parallel"===t)}function cn(t){const{transformations:e}=t.getOptions();return e.some(([t])=>"fisheye"===t)}function ln(t){return an(t)||rn(t)}function un(t){return rn(t)&&nn(t)}function fn(t){const{transformations:e}=t.getOptions(),[,,,n,r]=e.find(t=>"polar"===t[0]);return[+n,+r]}function dn(t,e=!0){const{transformations:n}=t.getOptions(),[,r,o]=n.find(t=>"polar"===t[0]);return e?[180*+r/Math.PI,180*+o/Math.PI]:[r,o]}var pn=n("./node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.mjs");function hn(t,e){e(t),t.children&&t.children.forEach(function(t){t&&hn(t,e)})}function gn(t){yn(t,!0)}function mn(t){yn(t,!1)}function yn(t,e){var n=e?"visible":"hidden";hn(t,function(t){t.attr("visibility",n)})}function bn(t){if(!t)return{enter:!1,update:!1,exit:!1};var e=["enter","update","exit"],n=Object.fromEntries(Object.entries(t).filter(function(t){var n=(0,pn.zs)(t,1);return!e.includes(n[0])}));return Object.fromEntries(e.map(function(e){return function(t){return"boolean"!=typeof t&&"enter"in t&&"update"in t&&"exit"in t}(t)?!1===t[e]?[e,!1]:[e,(0,pn.Cl)((0,pn.Cl)({},t[e]),n)]:[e,n]}))}function vn(t,e){t?t.finished.then(e):e()}function xn(t,e){"update"in t?t.update(e):t.attr(e)}function On(t,e,n){return 0===e.length?null:n?t.animate(e,n):(xn(t,{style:e.slice(-1)[0]}),null)}function wn(t,e,n){var r={},o={};return Object.entries(e).forEach(function(e){var n=(0,pn.zs)(e,2),i=n[0],a=n[1];if(!(0,R.A)(a)){var s=t.style[i]||t.parsedStyle[i]||0;s!==a&&(r[i]=s,o[i]=a)}}),n?On(t,[r,o],(0,pn.Cl)({fill:"both"},n)):(xn(t,o),null)}var jn=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=5),Object.entries(e).forEach(function(o){var i=(0,pn.zs)(o,2),a=i[0],s=i[1],c=t;Object.prototype.hasOwnProperty.call(e,a)&&(s?(0,$.A)(s)?((0,$.A)(t[a])||(c[a]={}),n<r?jn(t[a],s,n+1,r):c[a]=e[a]):(0,Le.A)(s)?(c[a]=[],c[a]=c[a].concat(s)):c[a]=s:c[a]=s)})},kn=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)jn(t,e[r]);return t},An=function(t){function e(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=t.apply(this,(0,pn.fX)([],(0,pn.zs)(e),!1))||this;return r.isMutationObserved=!0,r.addEventListener(l.jX.INSERTED,function(){mn(r)}),r}return(0,pn.C6)(e,t),e}(l.YJ);function Mn(t){var e=t.appendChild(new An({class:"offscreen"}));return mn(e),e}function _n(){yn(this,"hidden"!==this.attributes.visibility)}var Sn=function(t){function e(e,n){void 0===n&&(n={});var r=t.call(this,kn({},{style:n},e))||this;return r.initialized=!1,r._defaultOptions=n,r}return(0,pn.C6)(e,t),Object.defineProperty(e.prototype,"offscreenGroup",{get:function(){return this._offscreen||(this._offscreen=Mn(this)),this._offscreen},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"defaultOptions",{get:function(){return this._defaultOptions},enumerable:!1,configurable:!0}),e.prototype.connectedCallback=function(){this.render(this.attributes,this),this.bindEvents(this.attributes,this),this.initialized=!0},e.prototype.disconnectedCallback=function(){var t;null===(t=this._offscreen)||void 0===t||t.destroy()},e.prototype.attributeChangedCallback=function(t){"visibility"===t&&_n.call(this)},e.prototype.update=function(t,e){var n;return this.attr(kn({},this.attributes,t||{})),null===(n=this.render)||void 0===n?void 0:n.call(this,this.attributes,this,e)},e.prototype.clear=function(){this.removeChildren()},e.prototype.bindEvents=function(t,e){},e.prototype.getSubShapeStyle=function(t){return(0,pn.Tt)(t,["x","y","transform","transformOrigin","class","className","zIndex"])},e}(l.K9);function En(t,e,n,r,o){return void 0===r&&(r=!0),void 0===o&&(o=function(t){t.node().removeChildren()}),t?n(e):(r&&o(e),null)}const Pn=function(t){if(!(0,Le.A)(t))return[];for(var e=[],n=0;n<t.length;n++)e=e.concat(t[n]);return e};var Ln=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=(0,pn.Tt)(e,["style"]);return t.call(this,(0,pn.Cl)({style:(0,pn.Cl)({text:"",fill:"black",fontFamily:"sans-serif",fontSize:16,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",lineWidth:1,textAlign:"start",textBaseline:"middle"},n)},r))||this}return(0,pn.C6)(e,t),Object.defineProperty(e.prototype,"offscreenGroup",{get:function(){return this._offscreen||(this._offscreen=Mn(this)),this._offscreen},enumerable:!1,configurable:!0}),e.prototype.disconnectedCallback=function(){var t;null===(t=this._offscreen)||void 0===t||t.destroy()},e}(l.EY);var Cn=function(){function t(t,n,r,o,i,a,s){void 0===t&&(t=null),void 0===n&&(n=null),void 0===r&&(r=null),void 0===o&&(o=null),void 0===i&&(i=[null,null,null,null,null]),void 0===a&&(a=[]),void 0===s&&(s=[]),e.add(this),this._elements=Array.from(t),this._data=n,this._parent=r,this._document=o,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=s}var e,n,r;return t.prototype.selectAll=function(t){var e="string"==typeof t?this._parent.querySelectorAll(t):t;return new n(e,null,this._elements[0],this._document)},t.prototype.selectFacetAll=function(t){var e="string"==typeof t?this._parent.querySelectorAll(t):t;return new n(this._elements,null,this._parent,this._document,void 0,void 0,e)},t.prototype.select=function(t){var e="string"==typeof t?this._parent.querySelectorAll(t)[0]||null:t;return new n([e],null,e,this._document)},t.prototype.append=function(t){var e=this,r="function"==typeof t?t:function(){return e.createElement(t)},o=[];if(null!==this._data){for(var i=0;i<this._data.length;i++){var a=this._data[i],s=(0,pn.zs)(Array.isArray(a)?a:[a,null],2),c=s[1];(f=r(l=s[0],i)).__data__=l,null!==c&&(f.__fromElements__=c),this._parent.appendChild(f),o.push(f)}return new n(o,null,this._parent,this._document)}for(i=0;i<this._elements.length;i++){var l,u=this._elements[i],f=r(l=u.__data__,i);u.appendChild(f),o.push(f)}return new n(o,null,o[0],this._document)},t.prototype.maybeAppend=function(t,n){var o=(0,pn.gn)(this,e,"m",r).call(this,"#"===t[0]?t:"#".concat(t),n);return o.attr("id",t),o},t.prototype.maybeAppendByClassName=function(t,n){var o=t.toString(),i=(0,pn.gn)(this,e,"m",r).call(this,"."===o[0]?o:".".concat(o),n);return i.attr("className",o),i},t.prototype.maybeAppendByName=function(t,n){var o=(0,pn.gn)(this,e,"m",r).call(this,'[name="'.concat(t,'"]'),n);return o.attr("name",t),o},t.prototype.data=function(t,e,r){var o,i;void 0===e&&(e=function(t){return t}),void 0===r&&(r=function(){return null});for(var a=[],s=[],c=new Set(this._elements),l=[],u=new Set,f=new Map(this._elements.map(function(t,n){return[e(t.__data__,n),t]})),d=new Map(this._facetElements.map(function(t,n){return[e(t.__data__,n),t]})),p=function(t,e){var n=new Map;return t.forEach(function(t){var r=e(t);n.has(r)||n.set(r,[]),n.get(r).push(t)}),n}(this._elements,function(t){return r(t.__data__)}),h=0;h<t.length;h++){var g=t[h],m=e(g,h),y=r(g,h);if(f.has(m))(O=f.get(m)).__data__=g,O.__facet__=!1,s.push(O),c.delete(O),f.delete(m);else if(d.has(m)){(O=d.get(m)).__data__=g,O.__facet__=!0,s.push(O),d.delete(m)}else if(p.has(m)){var b=p.get(m);l.push([g,b]);try{for(var v=(o=void 0,(0,pn.Ju)(b)),x=v.next();!x.done;x=v.next()){c.delete(O=x.value)}}catch(t){o={error:t}}finally{try{x&&!x.done&&(i=v.return)&&i.call(v)}finally{if(o)throw o.error}}p.delete(m)}else if(f.has(y)){var O;(O=f.get(y)).__toData__?O.__toData__.push(g):O.__toData__=[g],u.add(O),c.delete(O)}else a.push(g)}var w=[new n([],a,this._parent,this._document),new n(s,null,this._parent,this._document),new n(c,null,this._parent,this._document),new n([],l,this._parent,this._document),new n(u,null,this._parent,this._document)];return new n(this._elements,null,this._parent,this._document,w)},t.prototype.merge=function(t){var e=(0,pn.fX)((0,pn.fX)([],(0,pn.zs)(this._elements),!1),(0,pn.zs)(t._elements),!1),r=(0,pn.fX)((0,pn.fX)([],(0,pn.zs)(this._transitions),!1),(0,pn.zs)(t._transitions),!1);return new n(e,null,this._parent,this._document,void 0,r)},t.prototype.createElement=function(t){if(this._document)return this._document.createElement(t,{});var e=n.registry[t];return e?new e:function(t){throw new Error(t)}("Unknown node type: ".concat(t))},t.prototype.join=function(t,e,n,r,o){void 0===t&&(t=function(t){return t}),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===o&&(o=function(t){return t.remove()});var i=t(this._enter),a=e(this._update),s=n(this._exit),c=r(this._merge),l=o(this._split);return a.merge(i).merge(s).merge(c).merge(l)},t.prototype.remove=function(){for(var t=function(t){var n=e._elements[t],r=e._transitions[t];r?r.then(function(){return n.remove()}):n.remove()},e=this,r=0;r<this._elements.length;r++)t(r);return new n([],null,this._parent,this._document,void 0,this._transitions)},t.prototype.each=function(t){for(var e=0;e<this._elements.length;e++){var n=this._elements[e];t.call(n,n.__data__,e)}return this},t.prototype.attr=function(t,e){var n="function"!=typeof e?function(){return e}:e;return this.each(function(r,o){void 0!==e&&(this[t]=n.call(this,r,o))})},t.prototype.style=function(t,e,n){void 0===n&&(n=!0);var r="function"==typeof e&&n?e:function(){return e};return this.each(function(n,o){void 0!==e&&(this.style[t]=r.call(this,n,o))})},t.prototype.styles=function(t,e){return void 0===t&&(t={}),void 0===e&&(e=!0),this.each(function(n,r){var o=this;Object.entries(t).forEach(function(t){var i=(0,pn.zs)(t,2),a=i[1];void 0!==a&&o.attr(i[0],("function"==typeof a&&e?a:function(){return a}).call(o,n,r))})})},t.prototype.update=function(t,e){void 0===e&&(e=!0);var n="function"==typeof t&&e?t:function(){return t};return this.each(function(e,r){t&&this.update&&this.update(n.call(this,e,r))})},t.prototype.maybeUpdate=function(t,e){void 0===e&&(e=!0);var n="function"==typeof t&&e?t:function(){return t};return this.each(function(e,r){t&&this.update&&this.update(n.call(this,e,r))})},t.prototype.transition=function(t){var e=new Array(this._elements.length);return this.each(function(n,r){e[r]=t.call(this,n,r)}),this._transitions=Pn(e),this},t.prototype.on=function(t,e){return this.each(function(){this.addEventListener(t,e)}),this},t.prototype.call=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return t.call.apply(t,(0,pn.fX)([this._parent,this],(0,pn.zs)(e),!1)),this},t.prototype.node=function(){return this._elements[0]},t.prototype.nodes=function(){return this._elements},t.prototype.transitions=function(){return this._transitions.filter(function(t){return!!t})},t.prototype.parent=function(){return this._parent},n=t,e=new WeakSet,r=function(t,e){var r=this._elements[0],o=r.querySelector(t);if(o)return new n([o],null,this._parent,this._document);var i="string"==typeof e?this.createElement(e):e();return r.appendChild(i),new n([i],null,this._parent,this._document)},t.registry={g:l.YJ,rect:l.rw,circle:l.jl,path:l.wA,text:Ln,ellipse:l.Pp,image:l._V,line:l.N1,polygon:l.tS,polyline:l.Ro,html:l.g3},t}();function zn(t){return new Cn([t],null,t,t.ownerDocument)}var Tn=function(t,e){var n=function(t){return"".concat(e,"-").concat(t)},r=Object.fromEntries(Object.entries(t).map(function(t){var e=(0,pn.zs)(t,2),r=e[0],o=n(e[1]);return[r,{name:o,class:".".concat(o),id:"#".concat(o),toString:function(){return o}}]}));return Object.assign(r,{prefix:n}),r},Bn="grid-group",In="main-group",Nn="line-group",Rn="tick-group",Fn="label-group",Dn="title-group",$n="grid",Wn="line",Hn="line-first",qn="line-second",Yn="tick",Xn="tick-item",Gn="label",Vn="label-item",Kn="title",Un={data:[],animate:{enter:!1,update:{duration:100,easing:"ease-in-out-sine",fill:"both"},exit:{duration:100,fill:"both"}},showArrow:!0,showGrid:!0,showLabel:!0,showLine:!0,showTick:!0,showTitle:!0,showTrunc:!1,dataThreshold:100,lineLineWidth:1,lineStroke:"black",crossPadding:10,titleFill:"black",titleFontSize:12,titlePosition:"lb",titleSpacing:0,titleTextAlign:"center",titleTextBaseline:"middle",lineArrow:function(){return new l.wA({style:{d:[["M",10,10],["L",-10,0],["L",10,-10],["L",0,0],["L",10,10],["Z"]],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",labelOverlap:[]},Zn=((0,N.A)({},Un,{style:{type:"arc"}}),(0,N.A)({},Un,{style:{}}),Tn({mainGroup:In,gridGroup:Bn,grid:$n,lineGroup:Nn,line:Wn,tickGroup:Rn,tick:Yn,tickItem:Xn,labelGroup:Fn,label:Gn,labelItem:Vn,titleGroup:Dn,title:Kn,lineFirst:Hn,lineSecond:qn},"axis")),Jn=n("./node_modules/.pnpm/@antv+util@3.3.11/node_modules/@antv/util/esm/lodash/is-function.js");function Qn(t,e){return[t[0]*e,t[1]*e]}function tr(t,e){return[t[0]+e[0],t[1]+e[1]]}function er(t,e){return[t[0]-e[0],t[1]-e[1]]}function nr(t,e){return[Math.min(t[0],e[0]),Math.min(t[1],e[1])]}function rr(t,e){return[Math.max(t[0],e[0]),Math.max(t[1],e[1])]}function or(t,e){return Math.sqrt(Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2))}function ir(t){if(0===t[0]&&0===t[1])return[0,0];var e=Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2));return[t[0]/e,t[1]/e]}function ar(t){return t*Math.PI/180}function sr(t){return Number((180*t/Math.PI).toPrecision(5))}function cr(t){return t.toString().charAt(0).toUpperCase()+t.toString().slice(1)}function lr(t,e,n){var r;void 0===n&&(n=!0);var o=e||(null===(r=t.match(/^([a-z][a-z0-9]+)/))||void 0===r?void 0:r[0])||"",i=t.replace(new RegExp("^(".concat(o,")")),"");return n?function(t){return t.toString().charAt(0).toLowerCase()+t.toString().slice(1)}(i):i}var ur=function(t,e){if(!(null==t?void 0:t.startsWith(e)))return!1;var n=t[e.length];return n>="A"&&n<="Z"};function fr(t,e,n){void 0===n&&(n=!1);var r={};return Object.entries(t).forEach(function(t){var o=(0,pn.zs)(t,2),i=o[0],a=o[1];if("className"===i||"class"===i);else if(ur(i,"show")&&ur(lr(i,"show"),e)!==n)i===function(t,e){return"".concat(e).concat(cr(t))}(e,"show")?r[i]=a:r[i.replace(new RegExp(cr(e)),"")]=a;else if(!ur(i,"show")&&ur(i,e)!==n){var s=lr(i,e);"filter"===s&&"function"==typeof a||(r[s]=a)}}),r}function dr(t,e){return Object.entries(t).reduce(function(t,n){var r=(0,pn.zs)(n,2),o=r[0],i=r[1];return o.startsWith("show")?t["show".concat(e).concat(o.slice(4))]=i:t["".concat(e).concat(cr(o))]=i,t},{})}function pr(t,e){void 0===e&&(e=["x","y","class","className"]);var n=["transform","transformOrigin","anchor","visibility","pointerEvents","zIndex","cursor","clipPath","clipPathTargets","offsetPath","offsetPathTargets","offsetDistance","draggable","droppable"],r={},o={};return Object.entries(t).forEach(function(t){var i=(0,pn.zs)(t,2),a=i[0],s=i[1];e.includes(a)||(-1!==n.indexOf(a)?o[a]=s:r[a]=s)}),[r,o]}function hr(t,e){return(0,Jn.A)(t)?t.apply(void 0,(0,pn.fX)([],(0,pn.zs)(e),!1)):t}function gr(t,e){return t.style.opacity||(t.style.opacity=1),wn(t,{opacity:0},e)}var mr=["$el","cx","cy","d","dx","dy","fill","fillOpacity","filter","fontFamily","fontSize","fontStyle","fontVariant","fontWeight","height","img","increasedLineWidthForHitTesting","innerHTML","isBillboard","billboardRotation","isSizeAttenuation","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 yr(t){return mr.includes(t)}function br(t){var e={};for(var n in t)yr(n)&&(e[n]=t[n]);return e}var vr=Tn({lineGroup:"line-group",line:"line",regionGroup:"region-group",region:"region"},"grid");function xr(t){return t.reduce(function(t,e,n){return t.push((0,pn.fX)([0===n?"M":"L"],(0,pn.zs)(e),!1)),t},[])}function Or(t,e,n){return"surround"===e.type?function(t,e,n){var r=e.connect,o=e.center;if("line"===(void 0===r?"line":r))return xr(t);if(!o)return[];var i=or(t[0],o),a=n?0:1;return t.reduce(function(t,e,n){return t.push((0,pn.fX)(0===n?["M"]:["A",i,i,0,0,a],(0,pn.zs)(e),!1)),t},[])}(t,e,n):xr(t)}function wr(t,e,n){var r=n.type,o=n.connect,i=n.center,a=n.closed?[["Z"]]:[],s=(0,pn.zs)([Or(t,n),Or(e.slice().reverse(),n,!0)],2),c=s[0],l=s[1],u=(0,pn.zs)([t[0],e.slice(-1)[0]],2),f=u[0],d=u[1],p=function(t,e){return[c,t,l,e,a].flat()};if("line"===o||"surround"===r)return p([(0,pn.fX)(["L"],(0,pn.zs)(d),!1)],[(0,pn.fX)(["L"],(0,pn.zs)(f),!1)]);if(!i)throw new Error("Arc grid need to specified center");var h=(0,pn.zs)([or(d,i),or(f,i)],2),g=h[0],m=h[1];return p([(0,pn.fX)(["A",g,g,0,0,1],(0,pn.zs)(d),!1),(0,pn.fX)(["L"],(0,pn.zs)(d),!1)],[(0,pn.fX)(["A",m,m,0,0,0],(0,pn.zs)(f),!1),(0,pn.fX)(["L"],(0,pn.zs)(f),!1)])}var jr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,pn.C6)(e,t),e.prototype.render=function(t,e){var n=(0,pn.Tt)(t,["type","center","areaFill","closed"]),r=function(t){var e=t.data,n=void 0===e?[]:e;return t.closed?n.map(function(t){var e=t.points,n=(0,pn.zs)(e,1)[0];return(0,pn.Cl)((0,pn.Cl)({},t),{points:(0,pn.fX)((0,pn.fX)([],(0,pn.zs)(e),!1),[n],!1)})}):n}(t),o=zn(e).maybeAppendByClassName(vr.lineGroup,"g"),i=zn(e).maybeAppendByClassName(vr.regionGroup,"g"),a=function(t,e,n,r){var o=n.animate,i=n.isBillboard,a=e.map(function(t,e){return{id:t.id||"grid-line-".concat(e),d:Or(t.points,n)}});return t.selectAll(vr.line.class).data(a,function(t){return t.id}).join(function(t){return t.append("path").each(function(t,e){var n=hr(br((0,pn.Cl)({d:t.d},r)),[t,e,a]);this.attr((0,pn.Cl)({class:vr.line.name,stroke:"#D9D9D9",lineWidth:1,lineDash:[4,4],isBillboard:i},n))})},function(t){return t.transition(function(t,e){return wn(this,hr(br((0,pn.Cl)({d:t.d},r)),[t,e,a]),o.update)})},function(t){return t.transition(function(){var t=this,e=gr(this,o.exit);return vn(e,function(){return t.remove()}),e})}).transitions()}(o,r,t,n),s=function(t,e,n){var r=n.animate,o=n.areaFill;if(e.length<2||!o||!n.connect)return[];for(var i=Array.isArray(o)?o:[o,"transparent"],a=function(t){return i[t%i.length]},s=[],c=0;c<e.length-1;c++){var l=(0,pn.zs)([e[c].points,e[c+1].points],2),u=wr(l[0],l[1],n);s.push({d:u,fill:a(c)})}return t.selectAll(vr.region.class).data(s,function(t,e){return e}).join(function(t){return t.append("path").each(function(t,e){var n=hr(t,[t,e,s]);this.attr(n)}).attr("className",vr.region.name)},function(t){return t.transition(function(t,e){return wn(this,hr(t,[t,e,s]),r.update)})},function(t){return t.transition(function(){var t=this,e=gr(this,r.exit);return vn(e,function(){return t.remove()}),e})}).transitions()}(i,r,t);return(0,pn.fX)((0,pn.fX)([],(0,pn.zs)(a),!1),(0,pn.zs)(s),!1)},e}(Sn);function kr(t,e){return"number"==typeof t&&"number"==typeof e?function(t,e){return function(n){return t*(1-n)+e*n}}(t,e):Array.isArray(t)&&Array.isArray(e)?function(t,e){var n=e?e.length:0,r=t?Math.min(n,t.length):0;return function(o){var i=new Array(r),a=new Array(n),s=0;for(s=0;s<r;++s)i[s]=kr(t[s],e[s]);for(;s<n;++s)a[s]=e[s];for(s=0;s<r;++s)a[s]=i[s](o);return a}}(t,e):"object"==typeof t&&"object"==typeof e?function(t,e){void 0===t&&(t={}),void 0===e&&(e={});var n={},r={};return Object.entries(e).forEach(function(e){var o=(0,pn.zs)(e,2),i=o[0],a=o[1];i in t?n[i]=kr(t[i],a):r[i]=a}),function(t){return Object.entries(n).forEach(function(e){var n=(0,pn.zs)(e,2);return r[n[0]]=(0,n[1])(t)}),r}}(t,e):function(e){return t}}function Ar(t){return"function"==typeof t?t():(0,j.A)(t)||(0,tt.A)(t)?new Ln({style:{text:String(t)}}):t}function Mr(t,e,n){void 0===n&&(n=!1);var r=t.getBBox(),o=e/Math.max(r.width,r.height);return n&&(t.style.transform="scale(".concat(o,")")),o}function _r(t,e){var n={},r=Array.isArray(e)?e:[e];for(var o in t)r.includes(o)||(n[o]=t[o]);return n}function Sr(t,e){return Object.fromEntries(Object.entries(t).map(function(t){var n=(0,pn.zs)(t,2);return[n[0],hr(n[1],e)]}))}function Er(t,e){return e&&(0,Jn.A)(e)?t.filter(e):t}function Pr(t,e){var n=e.startAngle;return(e.endAngle-n)*t+n}function Lr(t,e){if("linear"===e.type){var n=(0,pn.zs)(e.startPos,2),r=n[0],o=n[1],i=(0,pn.zs)(e.endPos,2),a=(0,pn.zs)([i[0]-r,i[1]-o],2);return ir([a[0],a[1]])}var s=ar(Pr(t,e));return[-Math.sin(s),Math.cos(s)]}function Cr(t,e,n){var r,o=Lr(t,n);return r=o,"positive"!==e?[r[1],-r[0]]:[-r[1],r[0]]}function zr(t,e){return Cr(t,e.labelDirection,e)}function Tr(t,e,n){return n?"".concat(t," ").concat(n,"axis-").concat(e):t}function Br(t,e,n,r){return r&&t.attr("className",Tr(e.name,n,r)),t}function Ir(t,e){return"linear"===e.type?function(t,e){var n=(0,pn.zs)(e.startPos,2),r=n[0],o=n[1],i=(0,pn.zs)(e.endPos,2),a=(0,pn.zs)([i[0]-r,i[1]-o],2);return[r+a[0]*t,o+a[1]*t]}(t,e):function(t,e){var n=e.radius,r=(0,pn.zs)(e.center,2),o=r[0],i=r[1],a=ar(Pr(t,e));return[o+n*Math.cos(a),i+n*Math.sin(a)]}(t,e)}function Nr(t){return 0===Lr(0,t)[1]}function Rr(t){return 0===Lr(0,t)[0]}function Fr(t,e){return e-t===360}function Dr(t,e,n,r,o){var i=e-t,a=(0,pn.zs)([o,o],2),s=a[0],c=a[1],l=(0,pn.zs)([ar(t),ar(e)],2),u=l[0],f=l[1],d=function(t){return[n+o*Math.cos(t),r+o*Math.sin(t)]},p=(0,pn.zs)(d(u),2),h=p[0],g=p[1],m=(0,pn.zs)(d(f),2),y=m[0],b=m[1];if(Fr(t,e)){var v=(0,pn.zs)(d((f+u)/2),2);return[["M",h,g],["A",s,c,0,1,0,v[0],v[1]],["A",s,c,0,1,0,y,b]]}var x=i>180?1:0,O=t>e?0:1;return"M".concat(h,",").concat(g,",A").concat(s,",").concat(c,",0,").concat(x,",").concat(O,",").concat(y,",").concat(b)}function $r(t,e,n,r){var o=e.startAngle,i=e.endAngle,a=e.center,s=e.radius,c=e.classNamePrefix;return t.selectAll(Zn.line.class).data([{d:Dr.apply(void 0,(0,pn.fX)((0,pn.fX)([o,i],(0,pn.zs)(a),!1),[s],!1))}],function(t,e){return e}).join(function(t){var n=t.append("path").attr("className",Zn.line.name).styles(e).styles({d:function(t){return t.d}});return Br(n,Zn.line,Wn,c),n},function(t){return t.transition(function(){var t=this,e=function(t,e,n,r){if(!r)return t.attr("__keyframe_data__",n),null;var o=r.duration,i=void 0===o?0:o,a=kr(e,n),s=Math.ceil(+i/16),c=new Array(s).fill(0).map(function(t,e,n){return{__keyframe_data__:a(e/(n.length-1))}});return t.animate(c,(0,pn.Cl)({fill:"both"},r))}(this,function(t){var e=t.attributes,n=e.radius;return(0,pn.fX)((0,pn.fX)([e.startAngle,e.endAngle],(0,pn.zs)(e.center),!1),[n],!1)}(this),(0,pn.fX)((0,pn.fX)([o,i],(0,pn.zs)(a),!1),[s],!1),r.update);if(e){var n=function(){var e=k(t.attributes,"__keyframe_data__");t.style.d=Dr.apply(void 0,(0,pn.fX)([],(0,pn.zs)(e),!1))};e.onframe=n,e.onfinish=n}return e}).styles(e)},function(t){return t.remove()}).styles(n).transitions()}function Wr(t){var e=(0,pn.zs)(t,2),n=(0,pn.zs)(e[0],2),r=n[0],o=n[1],i=(0,pn.zs)(e[1],2);return{x1:r,y1:o,x2:i[0],y2:i[1]}}function Hr(t,e,n,r){var o=e.showTrunc,i=e.startPos,a=e.endPos,s=e.truncRange,c=e.lineExtension,l=e.classNamePrefix,u=(0,pn.zs)([i,a],2),f=(0,pn.zs)(u[0],2),d=f[0],p=f[1],h=(0,pn.zs)(u[1],2),g=h[0],m=h[1],y=(0,pn.zs)(c?function(t,e,n){void 0===n&&(n=[0,0]);var r=(0,pn.zs)([t,e,n],3),o=(0,pn.zs)(r[0],2),i=o[0],a=o[1],s=(0,pn.zs)(r[1],2),c=s[0],l=s[1],u=(0,pn.zs)(r[2],2),f=u[0],d=u[1],p=(0,pn.zs)([c-i,l-a],2),h=p[0],g=p[1],m=Math.sqrt(Math.pow(h,2)+Math.pow(g,2)),y=(0,pn.zs)([-f/m,d/m],2),b=y[0],v=y[1];return[b*h,b*g,v*h,v*g]}(i,a,c):new Array(4).fill(0),4),b=y[0],v=y[1],x=y[2],O=y[3],w=function(e){return t.selectAll(Zn.line.class).data(e,function(t,e){return e}).join(function(t){var e=t.append("line").styles(n).transition(function(t){return wn(this,Wr(t.line),!1)});return e.attr("className",function(t){if(!l)return"".concat(Zn.line.name," ").concat(t.className);var e=Tr(Zn.line.name,Wn,l);if(t.className===Zn.lineFirst.name){var n=Tr(Zn.lineFirst.name,Hn,l);return"".concat(e," ").concat(n)}if(t.className===Zn.lineSecond.name){n=Tr(Zn.lineSecond.name,qn,l);return"".concat(e," ").concat(n)}return e}),e},function(t){return t.styles(n).transition(function(t){return wn(this,Wr(t.line),r.update)})},function(t){return t.remove()}).transitions()};if(!o||!s)return w([{line:[[d+b,p+v],[g+x,m+O]],className:Zn.line.name}]);var j=(0,pn.zs)(s,2),k=j[0],A=j[1],M=g-d,_=m-p,S=(0,pn.zs)([d+M*k,p+_*k],2),E=S[0],P=S[1],L=(0,pn.zs)([d+M*A,p+_*A],2);return w([{line:[[d+b,p+v],[E,P]],className:Zn.lineFirst.name},{line:[[L[0],L[1]],[g+x,m+O]],className:Zn.lineSecond.name}])}function qr(t,e,n){var r,o=e.type,i=fr(e,"line");return r="linear"===o?Hr(t,e,_r(i,"arrow"),n):$r(t,e,_r(i,"arrow"),n),function(t,e,n,r){var o,i=n.showArrow,a=n.lineArrow,s=n.lineArrowOffset,c=n.lineArrowSize;if(o=t.select("arc"===e?Zn.line.class:n.showTrunc?Zn.lineSecond.class:Zn.line.class),!i||!a||"arc"===n.type&&Fr(n.startAngle,n.endAngle)){var l=o.node();l&&(l.style.markerEnd=void 0)}else{var u=Ar(a);u.attr(r),Mr(u,c,!0),o.style("markerEnd",u).style("markerEndOffset",-s)}}(t,o,e,i),r}function Yr(t){var e=t.gridCenter;return"linear"===t.type?e:e||t.center}function Xr(t,e){var n=e.gridLength;return t.map(function(t,r){var o=t.value,i=(0,pn.zs)(Ir(o,e),2),a=i[0],s=i[1],c=(0,pn.zs)(Qn(function(t,e){return Cr(t,e.gridDirection,e)}(o,e),n),2);return{id:r,points:[[a,s],[a+c[0],s+c[1]]]}})}function Gr(t,e,n,r){var o=n.classNamePrefix,i=fr(n,"grid"),a=i.type,s=i.areaFill,c=Yr(n),l=Er(e,n.gridFilter),u="segment"===a?Xr(l,n):function(t,e){var n=e.gridControlAngles,r=Yr(e);if(!r)throw new Error("grid center is not provide");if(t.length<2)throw new Error("Invalid grid data");if(!n||0===n.length)throw new Error("Invalid gridControlAngles");var o=(0,pn.zs)(r,2),i=o[0],a=o[1];return t.map(function(t,r){var o=(0,pn.zs)(Ir(t.value,e),2),s=(0,pn.zs)([o[0]-i,o[1]-a],2),c=s[0],l=s[1],u=[];return n.forEach(function(t){var e=ar(t),n=(0,pn.zs)([Math.cos(e),Math.sin(e)],2),r=n[0],o=n[1];u.push([c*r-l*o+i,c*o+l*r+a])}),{points:u,id:r}})}(l,n),f=(0,pn.Cl)((0,pn.Cl)({},i),{center:c,areaFill:(0,Jn.A)(s)?l.map(function(t,e){return hr(s,[t,e,l])}):s,animate:r,data:u});return t.selectAll(Zn.grid.class).data([1]).join(function(t){var e=t.append(function(){return new jr({style:f})}).attr("className",Zn.grid.name);return Br(e,Zn.grid,$n,o),e},function(t){return t.transition(function(){return this.update(f)})},function(t){return t.remove()}).transitions()}function Vr(t,e,n,r,o){return void 0===r&&(r=!0),void 0===o&&(o=!1),!!(r&&t===e||o&&t===n)||t>e&&t<n}var Kr,Ur,Zr=new Map;var Jr,Qr,to,eo=(Jr=function(t,e){var n=e.fontSize,r=e.fontFamily,o=e.fontWeight,i=e.fontStyle,a=e.fontVariant;return Ur?Ur(t,n):(Kr||(Kr=l.fA.offscreenCanvasCreator.getOrCreateContext(void 0)),Kr.font=[i,a,o,"".concat(n,"px"),r].join(" "),Kr.measureText(t).width)},Qr=function(t,e){return[t,Object.values(e||no(t)).join()].join("")},void 0===(to=4096)&&(to=128),function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Qr?Qr.apply(this,t):t[0];Zr.has(Jr)||Zr.set(Jr,function(t){var e,n,r,o=t||1;function i(t,i){++e>o&&(r=n,a(1),++e),n[t]=i}function a(t){e=0,n=Object.create(null),t||(r=Object.create(null))}return a(),{clear:a,has:function(t){return void 0!==n[t]||void 0!==r[t]},get:function(t){var e=n[t];return void 0!==e?e:void 0!==(e=r[t])?(i(t,e),e):void 0},set:function(t,e){void 0!==n[t]?n[t]=e:i(t,e)}}}(to));var r=Zr.get(Jr);if(r.has(n))return r.get(n);var o=Jr.apply(this,t);return r.set(n,o),o}),no=function(t){var e=t.style.fontSize;return{fontSize:e="object"==typeof e?e.value:e,fontFamily:t.style.fontFamily||"sans-serif",fontWeight:t.style.fontWeight||"normal",fontStyle:t.style.fontStyle||"normal",fontVariant:t.style.fontVariant}};function ro(t){return"text"===t.nodeName?t:"g"===t.nodeName&&1===t.children.length&&"text"===t.children[0].nodeName?t.children[0]:null}function oo(t,e){var n=ro(t);n&&n.attr(e)}function io(t,e,n){void 0===n&&(n="..."),oo(t,{wordWrap:!0,wordWrapWidth:e,maxLines:1,textOverflow:n})}function ao(t,e){if(e)try{var n=e.replace(/translate\(([+-]*[\d]+[%]*),[ ]*([+-]*[\d]+[%]*)\)/g,function(e,n,r){return"translate(".concat(function(t,e,n){var r=t.getBBox(),o=r.width,i=r.height,a=(0,pn.zs)([e,n].map(function(t,e){var n;return t.includes("%")?parseFloat((null===(n=t.match(/[+-]?([0-9]*[.])?[0-9]+/))||void 0===n?void 0:n[0])||"0")/100*(0===e?o:i):t}),2);return[a[0],a[1]]}(t,n,r),")")});t.attr("transform",n)}catch(t){}}function so(t){if((0,tt.A)(t))return[t,t,t,t];if((0,Le.A)(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]}var co=function(){function t(t,e,n,r){this.set(t,e,n,r)}return Object.defineProperty(t.prototype,"left",{get:function(){return this.x1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"top",{get:function(){return this.y1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"right",{get:function(){return this.x2},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"bottom",{get:function(){return this.y2},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return this.defined("x2")&&this.defined("x1")?this.x2-this.x1:void 0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.defined("y2")&&this.defined("y1")?this.y2-this.y1:void 0},enumerable:!1,configurable:!0}),t.prototype.rotatedPoints=function(t,e,n){var r=this,o=r.x1,i=r.y1,a=r.x2,s=r.y2,c=Math.cos(t),l=Math.sin(t),u=e-e*c+n*l,f=n-e*l-n*c;return[[c*o-l*s+u,l*o+c*s+f],[c*a-l*s+u,l*a+c*s+f],[c*o-l*i+u,l*o+c*i+f],[c*a-l*i+u,l*a+c*i+f]]},t.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},t.prototype.defined=function(t){return this[t]!==Number.MAX_VALUE&&this[t]!==-Number.MAX_VALUE},t}();function lo(t,e){var n=t.getEulerAngles()||0;t.setEulerAngles(0);var r=t.getBounds(),o=(0,pn.zs)(r.min,2),i=o[0],a=o[1],s=(0,pn.zs)(r.max,2),c=s[0],l=s[1],u=t.getBBox(),f=u.width,d=u.height,p=0,h=0,g=i,m=a,y=ro(t);if(y){d-=1.5;var b=y.style.textAlign,v=y.style.textBaseline;"center"===b?g=(i+c)/2:"right"!==b&&"end"!==b||(g=c),"middle"===v?m=(a+l)/2:"bottom"===v&&(m=l)}var x=(0,pn.zs)(so(e),4),O=x[0],w=void 0===O?0:O,j=x[1],k=void 0===j?0:j,A=x[2],M=x[3],_=new co((p+=i)-(void 0===M?k:M),(h+=a)-w,p+f+k,h+d+(void 0===A?w:A));return t.setEulerAngles(n),_.rotatedPoints(ar(n),g,m)}function uo(t,e){return e[0]<=Math.max(t[0][0],t[1][0])&&e[0]<=Math.min(t[0][0],t[1][0])&&e[1]<=Math.max(t[0][1],t[1][1])&&e[1]<=Math.min(t[0][1],t[1][1])}function fo(t,e,n){var r=(e[1]-t[1])*(n[0]-e[0])-(e[0]-t[0])*(n[1]-e[1]);return 0===r?0:r<0?2:1}function po(t,e){var n=fo(t[0],t[1],e[0]),r=fo(t[0],t[1],e[1]),o=fo(e[0],e[1],t[0]),i=fo(e[0],e[1],t[1]);return n!==r&&o!==i||(!(0!==n||!uo(t,e[0]))||(!(0!==r||!uo(t,e[1]))||(!(0!==o||!uo(e,t[0]))||!(0!==i||!uo(e,t[1])))))}function ho(t,e){return e.every(function(e){return function(t,e){var n=t.length;if(n<3)return!1;var r=[e,[9999,e[1]]],o=0,i=0;do{var a=[t[i],t[(i+1)%n]];if(po(a,r)){if(0===fo(a[0],e,a[1]))return uo(a,e);o++}i=(i+1)%n}while(0!==i);return!!(1&o)}(t,e)})}function go(t,e){var n=(0,pn.zs)(t,4),r=n[0],o=n[1],i=n[2],a=n[3],s=(0,pn.zs)(e,4),c=s[0],l=s[1],u=i-r,f=a-o,d=s[2]-c,p=s[3]-l,h=u*p-d*f;if(0===h)return!1;var g=h>0,m=r-c,y=o-l,b=u*y-f*m;if(b<0===g)return!1;var v=d*y-p*m;return v<0!==g&&(b>h!==g&&v>h!==g)}function mo(t,e){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 go(e,t)})}function yo(t,e,n){var r,o,i=e.crossPadding,a=new Set,s=null,c=function(t,e){var n=t.labelDirection,r=t.crossSize;if(!r)return!1;if("arc"===t.type){var o=t.radius,i=(0,pn.zs)(t.center,2),a=i[0],s=i[1],c="negative"===n?0:r,l=-o-c,u=o+c,f=(0,pn.zs)(so(e),4);return new co(a+l-f[3],s+l-f[0],a+u+f[1],s+u+f[2])}var d=(0,pn.zs)(t.startPos,2),p=d[0],h=d[1],g=(0,pn.zs)(t.endPos,2),m=g[0],y=g[1],b=(0,pn.zs)(Rr(t)?[-e,0,e,0]:[0,e,0,-e],4),v=b[0],x=b[1],O=b[2],w=b[3],j=Qn(zr(0,t),r),k=new co(p,h,m,y);return k.x1+=w,k.y1+=v,k.x2+=x+j[0],k.y2+=O+j[1],k}(e,i),l=function(t){return!c||function(t,e,n){var r=t.x1,o=t.x2,i=t.y1,a=t.y2;return ho([[r,i],[o,i],[o,a],[r,a]],lo(e,n))}(c,t)},u=function(t,e){return!t||!t.firstChild||!function(t,e,n){var r,o,i=lo(t,n).flat(1),a=lo(e,n).flat(1),s=[[i[0],i[1],i[2],i[3]],[i[0],i[1],i[4],i[5]],[i[4],i[5],i[6],i[7]],[i[2],i[3],i[6],i[7]]];try{for(var c=(0,pn.Ju)(s),l=c.next();!l.done;l=c.next())if(mo(a,l.value))return!0}catch(t){r={error:t}}finally{try{l&&!l.done&&(o=c.return)&&o.call(c)}finally{if(r)throw r.error}}return!1}(t.firstChild,e.firstChild,so(n))};try{for(var f=(0,pn.Ju)(t),d=f.next();!d.done;d=f.next()){var p=d.value;l(p)?!s||u(s,p)?s=p:(a.add(s),a.add(p)):a.add(p)}}catch(t){r={error:t}}finally{try{d&&!d.done&&(o=f.return)&&o.call(f)}finally{if(r)throw r.error}}return Array.from(a)}function bo(t,e){return void 0===e&&(e={}),(0,R.A)(t)?0:"number"==typeof t?t:Math.floor(eo(t,e))}var vo=function(t){return void 0!==t&&null!=t&&!Number.isNaN(t)};function xo(t){var e=t.getLocalBounds(),n=(0,pn.zs)([e.min,e.max],2),r=(0,pn.zs)(n[0],2),o=r[0],i=r[1],a=(0,pn.zs)(n[1],2),s=a[0],c=a[1];return{x:o,y:i,width:s-o,height:c-i,left:o,bottom:c,top:i,right:s}}function Oo(t,e){var n=(0,pn.zs)(t,2),r=n[0],o=n[1],i=(0,pn.zs)(e,2);return r!==i[0]&&o===i[1]}var wo=function(t,e){var n=e.seq,r=void 0===n?2:n;return t.filter(function(t,e){return!(e%r)||(mn(t),!1)})},jo=function(t){return t.filter(vo)};var ko=new Map([["hide",function(t,e,n,r){var o=t.length,i=e.keepHeader,a=e.keepTail;if(!(o<=1||2===o&&i&&a)){var s,c,l=wo,u=function(t){return t.forEach(r.show),t},f=2,d=t.slice(),p=t.slice(),h=Math.min.apply(Math,(0,pn.fX)([1],(0,pn.zs)(t.map(function(t){return t.getBBox().width})),!1));if("linear"===n.type&&(Nr(n)||Rr(n))){var g=xo(t[0]).left,m=xo(t[o-1]).right,y=Math.abs(m-g)||1;f=Math.max(Math.floor(o*h/y),f)}for(i&&(s=d.splice(0,1)[0]),a&&(c=d.splice(-1,1)[0],d.reverse()),u(d);f<t.length&&yo(jo(c?(0,pn.fX)((0,pn.fX)([c],(0,pn.zs)(p),!1),[s],!1):(0,pn.fX)([s],(0,pn.zs)(p),!1)),n,null==e?void 0:e.margin).length;){if(c&&!s&&f%2==0)d.splice(0,1).forEach(r.hide);else if(c&&s){d.splice(0,1).forEach(r.hide)}p=l(u(d),{seq:f}),f++}}}],["rotate",function(t,e,n,r){var o,i,a=e.optionalAngles,s=void 0===a?[0,45,90]:a,c=e.margin,l=e.recoverWhenFailed,u=void 0===l||l,f=t.map(function(t){return t.getLocalEulerAngles()}),d=function(){return yo(t,n,c).length<1},p=function(e){return t.forEach(function(t,n){var o=Array.isArray(e)?e[n]:e;r.rotate(t,+o)})};try{for(var h=(0,pn.Ju)(s),g=h.next();!g.done;g=h.next()){if(p(g.value),d())return}}catch(t){o={error:t}}finally{try{g&&!g.done&&(i=h.return)&&i.call(h)}finally{if(o)throw o.error}}u&&p(f)}],["ellipsis",function(t,e,n,r){if(!(t.length<=0)){var o=e.suffix,i=void 0===o?"...":o,a=e.minLength,s=e.maxLength,c=void 0===s?1/0:s,l=e.step,u=void 0===l?" ":l,f=e.margin,d=void 0===f?[0,0,0,0]:f,p=no(r.getTextShape(t[0])),h=bo(u,p),g=a?bo(a,p):h,m=bo(c,p);((0,R.A)(m)||m===1/0)&&(m=Math.max.apply(null,t.map(function(t){return t.getBBox().width})));for(var y=t.slice(),b=((0,pn.zs)(d,4),function(e){if(y.forEach(function(t){r.ellipsis(r.getTextShape(t),e,i)}),(y=yo(t,n,d)).length<1)return{value:void 0}}),v=m;v>g+h;v-=h){var x=b(v);if("object"==typeof x)return x.value}}}],["wrap",function(t,e,n,r,o){var i,a=e.maxLines,s=void 0===a?3:a,c=e.recoverWhenFailed,l=void 0===c||c,u=e.margin,f=void 0===u?[0,0,0,0]:u,d=hr(null!==(i=e.wordWrapWidth)&&void 0!==i?i:50,[o]),p=t.map(function(t){return t.attr("maxLines")||1}),h=Math.min.apply(Math,(0,pn.fX)([],(0,pn.zs)(p),!1)),g=function(){return yo(t,n,f).length<1},m=function(t){var e=t.labelDirection;return"linear"===t.type&&Nr(t)?"negative"===e?"bottom":"top":"middle"}(n),y=function(e){return t.forEach(function(t,n){var o=Array.isArray(e)?e[n]:e;r.wrap(t,d,o,m)})};if(!(h>s)){if("linear"===n.type&&Nr(n)){if(y(s),g())return}else for(var b=h;b<=s;b++)if(y(b),g())return;l&&y(p)}}]]);function Ao(){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)}function Mo(t){for(var e=t;e<0;)e+=360;return Math.round(e%360)}function _o(t,e){var n=(0,pn.zs)(t,2),r=n[0],o=n[1],i=(0,pn.zs)(e,2),a=i[0],s=i[1],c=(0,pn.zs)([r*a+o*s,r*s-o*a],2);return Math.atan2(c[1],c[0])}function So(t,e,n){var r,o=n.labelAlign;if(null===(r=e.style.transform)||void 0===r?void 0:r.includes("rotate"))return e.getLocalEulerAngles();var i=zr(t.value,n),a=Lr(t.value,n);return"horizontal"===o?0:function(t){var e=(t+360)%180;return Vr(e,-90,90)||(e+=180),e}(sr("perpendicular"===o?_o([1,0],i):_o([a[0]<0?-1:1,0],a)))}function Eo(t,e,n){var r=n.type,o=n.labelAlign,i=zr(t,n),a=Mo(e),s=Mo(sr(_o([1,0],i))),c="center",l="middle";return"linear"===r?[90,270].includes(s)&&0===a?(c="center",l=1===i[1]?"top":"bottom"):s%180||![90,270].includes(a)?0===s?(Vr(a,0,90,!1,!0)||Vr(a,0,90)||Vr(a,270,360))&&(c="start"):90===s?Vr(a,0,90,!1,!0)?c="start":(Vr(a,90,180)||Vr(a,270,360))&&(c="end"):270===s?Vr(a,0,90,!1,!0)?c="end":(Vr(a,90,180)||Vr(a,270,360))&&(c="start"):180===s&&(90===a?c="start":(Vr(a,0,90)||Vr(a,270,360))&&(c="end")):c="center":"parallel"===o?l=Vr(s,0,180,!0)?"top":"bottom":"horizontal"===o?Vr(s,90,270,!1)?c="end":(Vr(s,270,360,!1)||Vr(s,0,90))&&(c="start"):"perpendicular"===o&&(c=Vr(s,90,270)?"end":"start"),{textAlign:c,textBaseline:l}}function Po(t,e,n){var r=n.showTick,o=n.tickLength,i=n.tickDirection,a=n.labelDirection,s=n.labelSpacing,c=e.indexOf(t),l=hr(s,[t,c,e]),u=(0,pn.zs)([zr(t.value,n),Ao(a,i)],2),f=u[0],d=1===u[1]?hr(r?o:0,[t,c,e]):0,p=(0,pn.zs)(tr(Qn(f,l+d),Ir(t.value,n)),2);return{x:p[0],y:p[1]}}function Lo(t,e,n,r){var o=r.labelRender,i=(k(r,"endPos.0",400)-k(r,"startPos.0",0))/n.length,a=(0,Jn.A)(o)?hr(o,[t,e,n,zr(t.value,r)]):t.label||"",s=function(t){var e=(new DOMParser).parseFromString(t,"text/html").body.firstElementChild;if(console.log(null==e?void 0:e.getClientRects(),11),!e)return 0;var n=e.getAttribute("style")||"",r=Object.fromEntries(n.split(";").map(function(t){return t.trim()}).filter(function(t){return t.includes(":")}).map(function(t){var e=(0,pn.zs)(t.split(":").map(function(t){return t.trim()}),2),n=e[1];return[e[0].toLowerCase(),n]})),o=function(t){if(!t)return 0;var e=t.match(/([\d.]+)px/);return e?parseFloat(e[1]):0};if(r.height)return o(r.height);var i,a=o(r["font-size"])||16,s=r["line-height"];i=s&&"normal"!==s?s.endsWith("px")?o(s):/^[\d.]+$/.test(s)?parseFloat(s)*a:a:1.2*a;var c=o(r["padding-top"]),l=o(r["padding-bottom"]);r.padding&&(1===(u=r.padding.split(/\s+/).map(o)).length||2===u.length?(c=u[0],l=u[0]):(3===u.length||4===u.length)&&(c=u[0],l=u[2]));var u,f=o(r["border-top-width"]),d=o(r["border-bottom-width"]);if(r.border){var p=r.border.match(/([\d.]+)px/);p&&(f=parseFloat(p[1]),d=parseFloat(p[1]))}return r["border-width"]&&(1===(u=r["border-width"].split(/\s+/).map(o)).length||2===u.length?(f=u[0],d=u[0]):(3===u.length||4===u.length)&&(f=u[0],d=u[2])),i+c+l+f+d}(a)||30;return function(){return e={width:i,height:s},"function"==typeof(t=a)?t():(0,j.A)(t)||(0,tt.A)(t)?new l.g3({style:(0,pn.Cl)((0,pn.Cl)({},e),{innerHTML:String(t)})}):t;var t,e}}function Co(t,e){["text","html"].includes(t.nodeName)&&t.attr(e)}function zo(t,e){!function(t,e,n,r){var o=e.labelOverlap,i=void 0===o?[]:o;i.length&&i.forEach(function(o){var i=o.type,a=ko.get(i);(function(t,e,n){return!(e.labelOverlap.length<1)&&("hide"===n?!function(t){for(var e=t;e;){if("offscreen"===e.className)return!0;e=e.parent}return!1}(t[0]):"rotate"===n?!t.some(function(t){var e;return!!(null===(e=t.attr("transform"))||void 0===e?void 0:e.includes("rotate"))}):"ellipsis"!==n&&"wrap"!==n||t.filter(function(t){return t.querySelector("text")}).length>=1)})(t,e,i)&&(null==a||a(t,o,e,r,n))})}(this.node().childNodes,t,e,{hide:mn,show:gn,rotate:function(e,n){!function(t,e,n){e.setLocalEulerAngles(t);var r=Eo(e.__data__.value,t,n),o=e.querySelector(Zn.labelItem.class);o&&Co(o,r)}(+n,e,t)},ellipsis:function(t,e,n){t&&io(t,e||1/0,n)},wrap:function(t,e,n){var r,o;t&&(void 0===(r=n)&&(r=2),void 0===o&&(o="top"),oo(t,{wordWrap:!0,wordWrapWidth:e,maxLines:r,textBaseline:o}))},getTextShape:function(t){return t.querySelector(Zn.labelItem.class)}})}function To(t,e,n,r,o){var i=n.indexOf(e),a=o.labelRender,s=o.classNamePrefix,c=zn(t).append(a?Lo(e,i,n,o):function(t,e,n,r){var o=r.labelFormatter;return(0,Jn.A)(o)?function(){return Ar(hr(o,[t,e,n,zr(t.value,r)]))}:function(){return Ar(t.label||"")}}(e,i,n,o)).attr("className",Zn.labelItem.name).node();Br(zn(c),Zn.labelItem,Vn,s);var l=(0,pn.zs)(pr(Sr(r,[e,i,n])),2),u=l[0],f=l[1],d=f.transform,p=(0,pn.Tt)(f,["transform"]);ao(c,d);var h=So(e,c,o);return c.getLocalEulerAngles()||c.setLocalEulerAngles(h),Co(c,(0,pn.Cl)((0,pn.Cl)({},Eo(e.value,h,o)),u)),t.attr(p),c}function Bo(t,e,n,r,o){var i,a,s,c=n.classNamePrefix,l=Er(e,n.labelFilter),u=fr(n,"label"),f=t.selectAll(Zn.label.class).data(l,function(t,e){return e}).join(function(t){var r=t.append("g").attr("className",Zn.label.name).transition(function(t){To(this,t,e,u,n);var r=Po(t,e,n),o=r.y;return this.style.transform="translate(".concat(r.x,", ").concat(o,")"),null});return Br(r,Zn.label,Gn,c),r},function(t){return t.transition(function(t){var o=function(t,e,n,r){if(void 0===r&&(r="destroy"),function(t,e){return"text"===t.nodeName&&"text"===e.nodeName&&t.attributes.text===e.attributes.text}(t,e))return t.remove(),[null];var o=function(){"destroy"===r?t.destroy():"hide"===r&&mn(t),e.isVisible()&&gn(e)};if(!n)return o(),[null];var i=n.duration,a=void 0===i?0:i,s=n.delay,c=void 0===s?0:s,l=Math.ceil(+a/2),u=+a/4,f=(0,pn.zs)(t.getGeometryBounds().center,2),d=f[0],p=f[1],h=(0,pn.zs)(e.getGeometryBounds().center,2),g=(0,pn.zs)([(d+h[0])/2-d,(p+h[1])/2-p],2),m=g[0],y=g[1],b=t.style.opacity,v=e.style.opacity,x=void 0===v?1:v,O=t.style.transform||"",w=e.style.transform||"",j=t.animate([{opacity:void 0===b?1:b,transform:"translate(0, 0) ".concat(O)},{opacity:0,transform:"translate(".concat(m,", ").concat(y,") ").concat(O)}],(0,pn.Cl)((0,pn.Cl)({fill:"both"},n),{duration:c+l+u})),k=e.animate([{opacity:0,transform:"translate(".concat(-m,", ").concat(-y,") ").concat(w),offset:.01},{opacity:x,transform:"translate(0, 0) ".concat(w)}],(0,pn.Cl)((0,pn.Cl)({fill:"both"},n),{duration:l+u,delay:c+l-u}));return vn(k,o),[j,k]}(this.querySelector(Zn.labelItem.class),To(this,t,e,u,n),r.update),i=Po(t,e,n),a=i.y,s=wn(this,{transform:"translate(".concat(i.x,", ").concat(a,")")},r.update);return(0,pn.fX)((0,pn.fX)([],(0,pn.zs)(o),!1),[s],!1)})},function(t){return i=t,t.transition(function(){var t=this,e=gr(this.childNodes[0],r.exit);return vn(e,function(){return zn(t).remove()}),e}),i}).transitions();return s=function(){zo.call(t,n,o)},0===(a=f).length?s():Promise.all(a.map(function(t){return null==t?void 0:t.finished})).then(s),f}function Io(t,e){return Cr(t,e.tickDirection,e)}function No(t,e,n,r,o){var i=(0,pn.zs)(function(t,e){var n=(0,pn.zs)(t,2);return[[0,0],[n[0]*e,n[1]*e]]}(r,hr(o.tickLength,[t,e,n])),2),a=(0,pn.zs)(i[0],2),s=a[0],c=a[1],l=(0,pn.zs)(i[1],2);return{x1:s,x2:l[0],y1:c,y2:l[1]}}function Ro(t,e,n,r,o,i){var a=function(t,e,n,r,o){var i=o.tickFormatter,a=o.classNamePrefix,s=Io(e.value,o),c="line";(0,Jn.A)(i)&&(c=function(){return hr(i,[e,n,r,s])});var l=t.append(c).attr("className",Zn.tickItem.name);return Br(l,Zn.tickItem,Xn,a),l}(zn(this),t,e,n,r);!function(t,e,n,r,o,i,a){var s=Io(t.value,i),c=No(t,e,n,s,i),l=c.x1,u=c.x2,f=c.y1,d=c.y2,p=(0,pn.zs)(pr(Sr(a,[t,e,n,s])),2),h=p[0],g=p[1];"line"===r.node().nodeName&&r.styles((0,pn.Cl)({x1:l,x2:u,y1:f,y2:d},h)),o.attr(g),r.styles(h)}(t,e,n,a,this,r,o);var s=(0,pn.zs)(Ir(t.value,r),2),c=s[1];return wn(this,{transform:"translate(".concat(s[0],", ").concat(c,")")},i)}function Fo(t){return/\S+-\S+/g.test(t)?t.split("-").map(function(t){return t[0]}):t.length>2?[t[0]]:t.split("")}function Do(t,e,n,r,o){var i=fr(r,"title"),a=(0,pn.zs)(pr(i),2),s=a[0],c=a[1],l=c.transform,u=c.transformOrigin,f=(0,pn.Tt)(c,["transform","transformOrigin"]);e.styles(f);var d=l||function(t,e,n){var r=2*t.getGeometryBounds().halfExtents[1];if("vertical"===e){if("left"===n)return"rotate(-90) translate(0, ".concat(r/2,")");if("right"===n)return"rotate(-90) translate(0, -".concat(r/2,")")}return""}(t.node(),s.direction,s.position);t.styles((0,pn.Cl)((0,pn.Cl)({},s),{transformOrigin:u})),ao(t.node(),d);var p=function(t,e,n){var r=n.titlePosition,o=void 0===r?"lb":r,i=n.titleSpacing,a=Fo(o),s=t.node().getLocalBounds(),c=(0,pn.zs)(s.min,2),l=c[0],u=c[1],f=(0,pn.zs)(s.halfExtents,2),d=f[0],p=f[1],h=(0,pn.zs)(e.node().getLocalBounds().halfExtents,2),g=h[0],m=h[1],y=(0,pn.zs)([l+d,u+p],2),b=y[0],v=y[1],x=(0,pn.zs)(so(i),4),O=x[0],w=x[1],j=x[2],k=x[3];if(["start","end"].includes(o)&&"linear"===n.type){var A=n.startPos,M=n.endPos,_=(0,pn.zs)("start"===o?[A,M]:[M,A],2),S=_[0],E=_[1],P=ir([-E[0]+S[0],-E[1]+S[1]]),L=(0,pn.zs)(Qn(P,O),2);return{x:S[0]+L[0],y:S[1]+L[1]}}return a.includes("t")&&(v-=p+m+O),a.includes("r")&&(b+=d+g+w),a.includes("l")&&(b-=d+g+k),a.includes("b")&&(v+=p+m+j),{x:b,y:v}}(zn(n._offscreen||n.querySelector(Zn.mainGroup.class)),e,r),h=p.x,g=p.y;return wn(e.node(),{transform:"translate(".concat(h,", ").concat(g,")")},o)}function $o(t,e,n,r){var o=t.showLine,i=t.showTick,a=t.showLabel,s=t.classNamePrefix,c=e.maybeAppendByClassName(Zn.lineGroup,"g");Br(c,Zn.lineGroup,Nn,s);var l=En(o,c,function(e){return qr(e,t,r)})||[],u=e.maybeAppendByClassName(Zn.tickGroup,"g");Br(u,Zn.tickGroup,Rn,s);var f=En(i,u,function(e){return function(t,e,n,r){var o=n.classNamePrefix,i=Er(e,n.tickFilter),a=fr(n,"tick");return t.selectAll(Zn.tick.class).data(i,function(t){return t.id||t.label}).join(function(t){var e=t.append("g").attr("className",Zn.tick.name).transition(function(t,e){return Ro.call(this,t,e,i,n,a,!1)});return Br(e,Zn.tick,Yn,o),e},function(t){return t.transition(function(t,e){return this.removeChildren(),Ro.call(this,t,e,i,n,a,r.update)})},function(t){return t.transition(function(){var t=this,e=gr(this.childNodes[0],r.exit);return vn(e,function(){return t.remove()}),e})}).transitions()}(e,n,t,r)})||[],d=e.maybeAppendByClassName(Zn.labelGroup,"g");Br(d,Zn.labelGroup,Fn,s);var p=En(a,d,function(o){return Bo(o,n,t,r,e.node())})||[];return(0,pn.fX)((0,pn.fX)((0,pn.fX)([],(0,pn.zs)(l),!1),(0,pn.zs)(f),!1),(0,pn.zs)(p),!1).filter(function(t){return!!t})}var Wo=function(t){function e(e){return t.call(this,e,Un)||this}return(0,pn.C6)(e,t),e.prototype.render=function(t,e,n){var r=this,o=t.titleText,i=t.data,a=t.animate,s=t.showTitle,c=t.showGrid,l=t.dataThreshold,u=t.truncRange,f=t.classNamePrefix;f?e.attr("className","".concat(e.className||"axis"," ").concat(f,"axis")):e.className||e.attr("className","axis");var d=function(t,e){if(t.length<=e)return t;for(var n=Math.floor(t.length/e),r=[],o=0;o<t.length;o+=n)r.push(t[o]);return r}(i,l).filter(function(t){var e=t.value;return!(u&&e>u[0]&&e<u[1])}),p=bn(void 0===n?a:n),h=zn(e).maybeAppendByClassName(Zn.gridGroup,"g");Br(h,Zn.gridGroup,Bn,f);var g=En(c,h,function(e){return Gr(e,d,t,p)})||[],m=zn(e).maybeAppendByClassName(Zn.mainGroup,"g");Br(m,Zn.mainGroup,In,f),o&&(!this.initialized&&p.enter||this.initialized&&p.update)&&$o(t,zn(this.offscreenGroup),d,bn(!1));var y=$o(t,zn(m.node()),d,p),b=zn(e).maybeAppendByClassName(Zn.titleGroup,"g");Br(b,Zn.titleGroup,Dn,f);var v=En(s,b,function(e){return function(t,e,n,r){var o=n.titleText,i=n.classNamePrefix;return t.selectAll(Zn.title.class).data([{title:o}].filter(function(t){return!!t.title}),function(t,e){return t.title}).join(function(a){var s=a.append(function(){return Ar(o)}).attr("className",Zn.title.name).transition(function(){return Do(zn(this),t,e,n,r.enter)});return Br(s,Zn.title,Kn,i),s},function(o){return o.transition(function(){return Do(zn(this),t,e,n,r.update)})},function(t){return t.remove()}).transitions()}(e,r,t,p)})||[];return(0,pn.fX)((0,pn.fX)((0,pn.fX)([],(0,pn.zs)(g),!1),(0,pn.zs)(y),!1),(0,pn.zs)(v),!1).flat().filter(function(t){return!!t})},e}(Sn);function Ho(t){if($e(t)){return t[t.length-1]}}const qo=function(t){return t};function Yo(t,e){return e-t?n=>(n-t)/(e-t):t=>.5}function Xo(t,...e){return e.reduce((t,e)=>n=>t(e(n)),t)}function Go(t,e,n,r,o){let i=n||0,a=r||t.length;const s=o||(t=>t);for(;i<a;){const n=Math.floor((i+a)/2);s(t[n])>e?a=n:i=n+1}return i}var Vo=n("./node_modules/.pnpm/color-string@1.9.1/node_modules/color-string/index.js"),Ko=n.n(Vo);function Uo(t,e,n){let r=n;return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function Zo(t){const e=Ko().get(t);if(!e)return null;const{model:n,value:r}=e;return"rgb"===n?r:"hsl"===n?function(t){const e=t[0]/360,n=t[1]/100,r=t[2]/100,o=t[3];if(0===n)return[255*r,255*r,255*r,o];const i=r<.5?r*(1+n):r+n-r*n,a=2*r-i;return[255*Uo(a,i,e+1/3),255*Uo(a,i,e),255*Uo(a,i,e-1/3),o]}(r):null}const Jo=(t,e)=>n=>t*(1-n)+e*n,Qo=(t,e)=>"number"==typeof t&&"number"==typeof e?Jo(t,e):"string"==typeof t&&"string"==typeof e?((t,e)=>{const n=Zo(t),r=Zo(e);return null===n||null===r?n?()=>t:()=>e:t=>{const e=new Array(4);for(let o=0;o<4;o+=1)e[o]=n[o]*(1-t)+r[o]*t;const[o,i,a,s]=e;return`rgba(${Math.round(o)}, ${Math.round(i)}, ${Math.round(a)}, ${s})`}})(t,e):()=>t,ti=(t,e)=>{const n=Jo(t,e);return t=>Math.round(n(t))};var ei=n("./node_modules/.pnpm/@antv+util@3.3.11/node_modules/@antv/util/esm/lodash/is-undefined.js");function ni(t){return null===t}function ri(t){return!(0,ei.A)(t)&&!ni(t)&&!Number.isNaN(t)}const oi=(t,e,n=5)=>{const r=[t,e];let o,i=0,a=r.length-1,s=r[i],c=r[a];return c<s&&([s,c]=[c,s],[i,a]=[a,i]),o=ot(s,c,n),o>0?(s=Math.floor(s/o)*o,c=Math.ceil(c/o)*o,o=ot(s,c,n)):o<0&&(s=Math.ceil(s*o)/o,c=Math.floor(c*o)/o,o=ot(s,c,n)),o>0?(r[i]=Math.floor(s/o)*o,r[a]=Math.ceil(c/o)*o):o<0&&(r[i]=Math.ceil(s*o)/o,r[a]=Math.floor(c*o)/o),r};const ii=(t,e,n)=>{const[r,o]=t,[i,a]=e;let s,c;return r<o?(s=Yo(r,o),c=n(i,a)):(s=Yo(o,r),c=n(a,i)),Xo(c,s)},ai=(t,e,n)=>{const r=Math.min(t.length,e.length)-1,o=new Array(r),i=new Array(r),a=t[0]>t[r],s=a?[...t].reverse():t,c=a?[...e].reverse():e;for(let t=0;t<r;t+=1)o[t]=Yo(s[t],s[t+1]),i[t]=n(c[t],c[t+1]);return e=>{const n=Go(t,e,1,r)-1;return Xo(i[n],o[n])(e)}},si=(t,e,n,r)=>(Math.min(t.length,e.length)>2?ai:ii)(t,e,r?ti:n);class ci extends Y{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:Jo,tickCount:5}}map(t){return ri(t)?this.output(t):this.options.unknown}invert(t){return ri(t)?this.input(t):this.options.unknown}nice(){if(!this.options.nice)return;const[t,e,n,...r]=this.getTickMethodOptions();this.options.domain=this.chooseNice()(t,e,n,...r)}getTicks(){const{tickMethod:t}=this.options,[e,n,r,...o]=this.getTickMethodOptions();return t(e,n,r,...o)}getTickMethodOptions(){const{domain:t,tickCount:e}=this.options;return[t[0],t[t.length-1],e]}chooseNice(){return oi}rescale(){this.nice();const[t,e]=this.chooseTransforms();this.composeOutput(t,this.chooseClamp(t)),this.composeInput(t,e,this.chooseClamp(e))}chooseClamp(t){const{clamp:e,range:n}=this.options,r=this.options.domain.map(t),o=Math.min(r.length,n.length);return e?function(t,e){const n=e<t?e:t,r=t>e?t:e;return t=>Math.min(Math.max(n,t),r)}(r[0],r[o-1]):qo}composeOutput(t,e){const{domain:n,range:r,round:o,interpolate:i}=this.options,a=si(n.map(t),r,i,o);this.output=Xo(a,e,t)}composeInput(t,e,n){const{domain:r,range:o}=this.options,i=si(o,r.map(t),Jo);this.input=Xo(e,n,i)}}class li extends ci{getDefaultOptions(){return{domain:[0,1],range:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolate:Qo,tickMethod:at,tickCount:5}}removeUnsortedValues(t,e,n){let r=-1/0;const o=e.reduce((t,o,i)=>{if(0===i)return t;const a=r>0?r:o;if(r>0&&(n?o>r:o<r))t.push(i);else{(a-e[i-1])*(n?-1:1)<0?(r<0&&(r=e[i-1]),t.push(i)):r=-1/0}return t},[]);return o.slice().reverse().forEach(n=>{t.splice(n,1),e.splice(n,1)}),{breaksDomain:t,breaksRange:e}}transformDomain(t){const{domain:e=[],range:n=[1,0],breaks:r=[],tickCount:o=5}=t,[i,a]=[Math.min(...e),Math.max(...e)],s=r.filter(({end:t})=>t<a).sort((t,e)=>t.start-e.start),c=at(i,a,o,s);Ho(c)<a&&c.push(a);const[l,u]=[n[0],Ho(n)],f=a-i,d=Math.abs(u-l),p=l>u,h=c.map(t=>{const e=(t-i)/f;return p?l-e*d:l+e*d}),[g,m]=[.2,.8];return s.forEach(({start:t,end:e,gap:n=.03,compress:r="middle"})=>{const o=c.indexOf(t),i=c.indexOf(e);let a=(h[o]+h[i])/2;"start"===r&&(a=h[o]),"end"===r&&(a=h[i]);const s=n*d/2;let l=p?a+s:a-s,u=p?a-s:a+s;l<g&&(u+=g-l,l=g),u>m&&(l-=u-m,u=m),l>m&&(u-=l-m,l=m),u<g&&(l+=g-u,u=g),h[o]=l,h[i]=u}),this.removeUnsortedValues(c,h,p)}transformBreaks(t){const{domain:e,breaks:n=[]}=t;if(!(0,Le.A)(t.breaks))return t;const r=Math.max(...e),o=n.filter(({end:t})=>t<r),i={...t,breaks:o},{breaksDomain:a,breaksRange:s}=this.transformDomain(i);return{...t,domain:a,range:s,breaks:o,tickMethod:()=>[...a]}}chooseTransforms(){return[qo,qo]}clone(){return new li(this.options)}}const ui=function(t,e){if(t)if((0,Le.A)(t))for(var n=0,r=t.length;n<r&&!1!==e(t[n],n);n++);else if((0,ke.A)(t))for(var o in t)if(t.hasOwnProperty(o)&&!1===e(t[o],o))break};const fi=function(t,e,n){if(!(0,Le.A)(t)&&!(0,$.A)(t))return t;var r=n;return ui(t,function(t,n){r=e(r,t,n)}),r},di=function(t,e){return fi(t,function(t,n,r){return e.includes(r)||(t[r]=n),t},{})};function pi(t,e){let n,r;if(void 0===e)for(const e of t)null!=e&&(void 0===n?e>=e&&(n=r=e):(n>e&&(n=e),r<e&&(r=e)));else{let o=-1;for(let i of t)null!=(i=e(i,++o,t))&&(void 0===n?i>=i&&(n=r=i):(n>i&&(n=i),r<i&&(r=i)))}return[n,r]}var hi=function(){function t(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}return Object.defineProperty(t.prototype,"bottom",{get:function(){return this.y+this.height},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"left",{get:function(){return this.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"right",{get:function(){return this.x+this.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"top",{get:function(){return this.y},enumerable:!1,configurable:!0}),t.fromRect=function(e){return new t(e.x,e.y,e.width,e.height)},t.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}},t.prototype.isPointIn=function(t,e){return t>=this.left&&t<=this.right&&e>=this.top&&e<=this.bottom},t}();function gi(t){for(var e=1/0,n=1/0,r=-1/0,o=-1/0,i=0;i<t.length;i++){var a=t[i],s=a.x,c=a.y,l=(0,pn.zs)([s+a.width,c+a.height],2),u=l[0],f=l[1];s<e&&(e=s),c<n&&(n=c),u>r&&(r=u),f>o&&(o=f)}return new hi(e,n,r-e,o-n)}var mi=function(t,e,n){var r=t.width,o=t.height,i=n.flexDirection,a=void 0===i?"row":i,s=n.justifyContent,c=void 0===s?"flex-start":s,l=n.alignItems,u=void 0===l?"flex-start":l,f="row"===a,d="row"===a||"column"===a,p=f?d?[1,0]:[-1,0]:d?[0,1]:[0,-1],h=(0,pn.zs)([0,0],2),g=h[0],m=h[1],y=e.map(function(t){var e,n=t.width,r=t.height,o=(0,pn.zs)([g,m],2),i=o[0],a=o[1];return e=(0,pn.zs)([g+n*p[0],m+r*p[1]],2),g=e[0],m=e[1],new hi(i,a,n,r)}),b=gi(y),v={"flex-start":0,"flex-end":f?r-b.width:o-b.height,center:f?(r-b.width)/2:(o-b.height)/2},x=y.map(function(t){var e=t.x,n=t.y,r=hi.fromRect(t);return r.x=f?e+v[c]:e,r.y=f?n:n+v[c],r}),O=(gi(x),function(t){var e=(0,pn.zs)(f?["height",o]:["width",r],2),n=e[0],i=e[1];switch(u){case"flex-start":default:return 0;case"flex-end":return i-t[n];case"center":return i/2-t[n]/2}}),w=x.map(function(t){var e=t.x,n=t.y,r=hi.fromRect(t);return r.x=f?e:e+O(r),r.y=f?n+O(r):n,r}),j=w.map(function(e){var n,r,o=hi.fromRect(e);return o.x+=null!==(n=t.x)&&void 0!==n?n:0,o.y+=null!==(r=t.y)&&void 0!==r?r:0,o});return j},yi=function(t,e,n){return[]};var bi=function(t){function e(e){var n=t.call(this,e)||this;n.layoutEvents=[l.jX.BOUNDS_CHANGED,l.jX.INSERTED,l.jX.REMOVED],n.$margin=so(0),n.$padding=so(0);var r=e.style||{},o=r.margin,i=r.padding,a=void 0===i?0:i;return n.margin=void 0===o?0:o,n.padding=a,n.isMutationObserved=!0,n.bindEvents(),n}return(0,pn.C6)(e,t),Object.defineProperty(e.prototype,"margin",{get:function(){return this.$margin},set:function(t){this.$margin=so(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"padding",{get:function(){return this.$padding},set:function(t){this.$padding=so(t)},enumerable:!1,configurable:!0}),e.prototype.getBBox=function(){var t=this.attributes,e=t.x,n=void 0===e?0:e,r=t.y,o=void 0===r?0:r,i=t.width,a=t.height,s=(0,pn.zs)(this.$margin,4),c=s[0],l=s[3];return new hi(n-l,o-c,i+l+s[1],a+c+s[2])},e.prototype.appendChild=function(e,n){return e.isMutationObserved=!0,t.prototype.appendChild.call(this,e,n),e},e.prototype.getAvailableSpace=function(){var t=this.attributes,e=t.width,n=t.height,r=(0,pn.zs)(this.$padding,4),o=r[0],i=r[1],a=r[2],s=r[3],c=(0,pn.zs)(this.$margin,4);return new hi(s+c[3],o+c[0],e-s-i,n-o-a)},e.prototype.layout=function(){if(this.attributes.display&&this.isConnected&&!this.children.some(function(t){return!t.isConnected}))try{var t=this.attributes,e=t.y;this.style.transform="translate(".concat(t.x,", ").concat(e,")");var n=function(t,e,n){if(0===e.length)return[];var r={flex:mi,grid:yi},o=n.display in r?r[n.display]:null;return(null==o?void 0:o.call(null,t,e,n))||[]}(this.getAvailableSpace(),this.children.map(function(t){return t.getBBox()}),this.attributes);this.children.forEach(function(t,e){var r=n[e],o=r.y;t.style.transform="translate(".concat(r.x,", ").concat(o,")")})}catch(t){}},e.prototype.bindEvents=function(){var t=this;this.layoutEvents.forEach(function(e){t.addEventListener(e,function(e){e.target&&(e.target.isMutationObserved=!0,t.layout())})})},e.prototype.attributeChangedCallback=function(t,e,n){"margin"===t?this.margin=n:"padding"===t&&(this.padding=n),this.layout()},e}(l.YJ),vi=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};function xi(t,e,n){return t.querySelector(e)?_t(t).select(e):_t(t).append(n)}function Oi(t){return Array.isArray(t)?t.join(", "):`${t||""}`}function wi(t,e){let{flexDirection:n,justifyContent:r,alignItems:o}={display:"flex",flexDirection:"row",justifyContent:"flex-start",alignItems:"center"};const i={top:["row","flex-start","center"],bottom:["row","flex-start","center"],left:["column","flex-start","center"],right:["column","flex-start","center"],center:["column","center","center"]};return t in i&&([n,r,o]=i[t]),Object.assign({display:"flex",flexDirection:n,justifyContent:r,alignItems:o},e)}class ji extends bi{get child(){var t;return null===(t=this.children)||void 0===t?void 0:t[0]}update(t){var e;const{subOptions:n}=t;null===(e=this.child)||void 0===e||e.update(n),this.attr(t)}}class ki extends ji{update(t){var e;const{subOptions:n}=t;null===(e=this.child)||void 0===e||e.update(n),this.attr(t)}}function Ai(t,e){var n;return null===(n=t.filter(t=>t.getOptions().name===e))||void 0===n?void 0:n[0]}function Mi(t){return"vertical"===t||t===-Math.PI/2}function _i(t,e,n){const{bbox:r}=t,{position:o="top",size:i,length:a}=e,s=["top","bottom","center"].includes(o),[c,l]=s?[r.height,r.width]:[r.width,r.height],{defaultSize:u,defaultLength:f}=n.props,d=i||u||c,p=a||f||l,h=s?"horizontal":"vertical",[g,m]=s?[p,d]:[d,p];return{orientation:h,width:g,height:m,size:d,length:p}}function Si(t){const e=["arrow","crosshairs","grid","handle","handleLabel","indicator","label","line","tick","tip","title","trunc"],{style:n}=t,r=vi(t,["style"]),o={};return Object.entries(r).forEach(([t,n])=>{e.includes(t)?o[`show${Ce(t)}`]=n:o[t]=n}),Object.assign(Object.assign({},o),n)}var Ei=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};function Pi(t,e){const{eulerAngles:n,origin:r}=e;r&&t.setOrigin(r),n&&t.rotate(n[0],n[1],n[2])}function Li(t){const{innerWidth:e,innerHeight:n,depth:r}=t.getOptions();return[e,n,r]}function Ci(t,e,n,r,o,i,a,s){var c;void 0===n&&void 0===i||t.update(Object.assign(Object.assign({},n&&{tickCount:n}),i&&{tickMethod:i}));const l=function(t,e,n){if(t.getTicks)return t.getTicks();if(!n)return e;const[r,o]=pi(e,t=>+t),{tickCount:i}=t.getOptions();return n(r,o,i)}(t,e,i),u=o?l.filter(o):l,f=t=>t instanceof Date?String(t):"object"==typeof t&&t?t:String(t),d=r||(null===(c=t.getFormatter)||void 0===c?void 0:c.call(t))||f,p=function(t,e){if(rn(e))return t=>t;const n=e.getOptions(),{innerWidth:r,innerHeight:o,insetTop:i,insetBottom:a,insetLeft:s,insetRight:c}=n,[l,u,f]="left"===t||"right"===t?[i,a,o]:[s,c,r],d=new li({domain:[0,1],range:[l/f,1-u/f]});return t=>d.map(t)}(a,s),h=function(t,e){const{width:n,height:r}=e.getOptions();return o=>{if(!cn(e))return o;const i=e.map("bottom"===t?[o,1]:[0,o]);if("bottom"===t){const t=i[0];return new li({domain:[0,n],range:[0,1]}).map(t)}if("left"===t){const t=i[1];return new li({domain:[0,r],range:[0,1]}).map(t)}return o}}(a,s),g=t=>["left","right"].includes(t);return rn(s)||nn(s)?u.map((e,n,r)=>{var o,i;const c=(null===(o=t.getBandWidth)||void 0===o?void 0:o.call(t,e))/2||0,l=p(t.map(e)+c);return{value:on(s)&&"center"===a||nn(s)&&(null===(i=t.getTicks)||void 0===i?void 0:i.call(t))&&(t=>["top","bottom","center","outer"].includes(t))(a)||nn(s)&&g(a)?1-l:l,label:f(d(Ze(e),n,r)),id:String(n)}}):u.map((e,n,r)=>{var o;const i=(null===(o=t.getBandWidth)||void 0===o?void 0:o.call(t,e))/2||0,s=h(p(t.map(e)+i));return{value:g(a)?1-s:s,label:f(d(Ze(e),n,r)),id:String(n)}})}function zi(t=[],e){if(t.length>0)return t;const{labelAutoRotate:n,labelAutoHide:r,labelAutoEllipsis:o,labelAutoWrap:i}=e,a=[],s=(t,e)=>{e&&a.push(Object.assign(Object.assign({},t),e))};return s({type:"rotate",optionalAngles:[0,15,30,45,60,90]},n),s({type:"ellipsis",minLength:20},o),s({type:"hide"},r),s({type:"wrap",wordWrapWidth:100,maxLines:3,recoveryWhenFail:!0},i),a}function Ti(t,e,n){return!un(e)&&!sn(e)&&(void 0===t?!!n.getTicks:t)}function Bi(t,e,n,r,o,i){const a=function(t,e,n,r,o){const i=n.axis,a=["top","right","bottom","left"].includes(o)?n[`axis${gt(o)}`]:n.axisLinear,s=t.getOptions().name,c=n[`axis${Ce(s)}`]||{};return Object.assign({},i,a,c)}(t,0,n,0,o);return"center"===o?Object.assign(Object.assign(Object.assign(Object.assign({},a),{labelDirection:"right"===r?"negative":"positive"}),"center"===r?{labelTransform:"translate(50%,0)"}:null),{tickDirection:"right"===r?"negative":"positive",labelSpacing:"center"===r?0:4,titleSpacing:Mi(i)?10:0,tick:"center"!==r&&void 0}):a}const Ii=t=>e=>{const{labelFormatter:n,labelFilter:r=()=>!0}=e;return o=>{var i;const{scales:[a]}=o,s=(null===(i=a.getTicks)||void 0===i?void 0:i.call(a))||a.getOptions().domain,c="string"==typeof n?(0,ze.GP)(n):n,l=Object.assign(Object.assign({},e),{labelFormatter:c,labelFilter:(t,e,n)=>r(s[e],e,s),scale:a});return t(l)(o)}},Ni=Ii(t=>{const{direction:e="left",important:n={},labelFormatter:r,orientation:o,actualPosition:i,position:a,size:s,style:c={},title:l,tickCount:u,tickFilter:f,tickMethod:d,tickLength:p,transform:h,indexBBox:g}=t,m=Ei(t,["direction","important","labelFormatter","order","orientation","actualPosition","position","size","style","title","tickCount","tickFilter","tickMethod","tickLength","transform","indexBBox"]);return({scales:y,value:b,coordinate:v,theme:x})=>{const{bbox:O}=b,[w]=y,{domain:j,xScale:k}=w.getOptions(),A=Bi(w,0,x,e,a,o),M=Object.assign(Object.assign(Object.assign({},A),c),m),_=function(t,e,n="xy"){const[r,o,i]=Li(e);return"xy"===n?t.includes("bottom")||t.includes("top")?o:r:"xz"===n?t.includes("bottom")||t.includes("top")?i:r:t.includes("bottom")||t.includes("top")?o:i}(i||a,v,t.plane),S=function(t,e,n,r,o){const{x:i,y:a,width:s,height:c}=n;if("bottom"===t)return{startPos:[i,a],endPos:[i+s,a]};if("left"===t)return{startPos:[i+s,a+c],endPos:[i+s,a]};if("right"===t)return{startPos:[i,a+c],endPos:[i,a]};if("top"===t)return{startPos:[i,a+c],endPos:[i+s,a+c]};if("center"===t){if("vertical"===e)return{startPos:[i,a],endPos:[i,a+c]};if("horizontal"===e)return{startPos:[i,a],endPos:[i+s,a]};if("number"==typeof e){const[t,n]=r.getCenter(),[l,u]=fn(r),[f,d]=dn(r),p=Math.min(s,c)/2,{insetLeft:h,insetTop:g}=r.getOptions(),m=l*p,y=u*p,[b,v]=[t+i-h,n+a-g],[x,O]=[Math.cos(e),Math.sin(e)],w=[b+y*x,v+y*O],j=[b+m*x,v+m*O],k=()=>{const{domain:t}=o.getOptions();return t.length},A=rn(r)&&o?k():3;return{startPos:w,endPos:j,gridClosed:Math.abs(d-f-360)<1e-6,gridCenter:[b,v],gridControlAngles:new Array(A).fill(0).map((t,e,n)=>(d-f)/A*e)}}}return{}}(a,o,O,v,k),E=function(t){const{depth:e}=t.getOptions();return e?{tickIsBillboard:!0,lineIsBillboard:!0,labelIsBillboard:!0,titleIsBillboard:!0,gridIsBillboard:!0}:{}}(v),P=Ci(w,j,u,r,f,d,a,v),L=g?P.map((t,e)=>{const n=g.get(e);return n?n[0]!==t.label?t:Object.assign(Object.assign({},t),{bbox:n[1]}):t}):P,C=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},M),{type:"linear",data:L,crossSize:s,titleText:Oi(l),labelOverlap:zi(h,M),grid:Ti(M.grid,v,w),gridLength:_,line:!0,indexBBox:g,classNamePrefix:"g2-"}),void 0!==p?{tickLength:p}:null),M.line?null:{lineOpacity:0}),S),E),n),z=C.labelOverlap.find(t=>"hide"===t.type);return z&&(C.crossSize=!1),new Wo({className:"axis",style:Si(C)})}}),Ri=Ii(t=>{const{position:e,labelFormatter:n,tickFilter:r,tickCount:o,tickMethod:i,tickLength:a,important:s={},style:c={},indexBBox:l,title:u,grid:f=!1}=t,d=Ei(t,["order","size","position","orientation","labelFormatter","tickFilter","tickCount","tickMethod","tickLength","important","style","indexBBox","title","grid"]);return({scales:[t],value:c,coordinate:p,theme:h})=>{const{bbox:g}=c,{domain:m}=t.getOptions(),y=Ci(t,m,o,n,r,i,e,p),b=l?y.map((t,e)=>{const n=l.get(e);return n?n[0]!==t.label?t:Object.assign(Object.assign({},t),{bbox:n[1]}):t}):y,[v,x]=fn(p),O=function(t,e,n,r,o){const{x:i,y:a,width:s,height:c}=e,l=[i+s/2,a+c/2],u=Math.min(s,c)/2,[f,d]=dn(o),[p,h]=Li(o),g={center:l,radius:u,startAngle:f,endAngle:d,gridLength:(r-n)*(Math.min(p,h)/2)};if("inner"===t){const{insetLeft:t,insetTop:e}=o.getOptions();return Object.assign(Object.assign({},g),{center:[l[0]-t,l[1]-e],labelAlign:"perpendicular",labelDirection:"positive",tickDirection:"positive",gridDirection:"negative"})}return Object.assign(Object.assign({},g),{labelAlign:"parallel",labelDirection:"negative",tickDirection:"negative",gridDirection:"positive"})}(e,g,v,x,p),{axis:w,axisArc:j={}}=h,k=Si((0,N.A)({},w,j,O,Object.assign(Object.assign(Object.assign({type:"arc",data:b,titleText:Oi(u),grid:f,classNamePrefix:"g2-"},void 0!==a?{tickLength:a}:null),d),s)));return new Wo({style:di(k,["transform"])})}});Ni.props={defaultPosition:"center",defaultSize:45,defaultOrder:0,defaultCrossPadding:[12,12],defaultPadding:[12,12]},Ri.props={defaultPosition:"outer",defaultOrientation:"vertical",defaultSize:45,defaultOrder:0,defaultCrossPadding:[12,12],defaultPadding:[12,12]};var Fi=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};function Di(t,e,n,r){const{radar:o}=t,[i]=r,a=i.getOptions().name,[s,c]=dn(n),{axisRadar:l={}}=e;return Object.assign(Object.assign({},l),{grid:"position"===a,gridConnect:"line",gridControlAngles:new Array(o.count).fill(0).map((t,e)=>(c-s)/o.count*e)})}const $i=t=>{const{important:e={}}=t,n=Fi(t,["important"]);return r=>{const{theme:o,coordinate:i,scales:a}=r;return Ni(Object.assign(Object.assign(Object.assign({},n),function(t){const e=t%(2*Math.PI);return e===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)"}:{}}(t.orientation)),{important:Object.assign(Object.assign({},Di(t,o,i,a)),e)}))(r)}};$i.props=Object.assign(Object.assign({},Ni.props),{defaultPosition:"center"});class Wi{constructor(t){this.options=(0,N.A)({},this.getDefaultOptions()),this.update(t)}getOptions(){return this.options}update(t={}){this.options=(0,N.A)({},this.options,t),this.rescale(t)}rescale(t){}}function Hi(t,e){return e-t?n=>(n-t)/(e-t):t=>.5}function qi(t,...e){return e.reduce((t,e)=>n=>t(e(n)),t)}function Yi(t,e,n){let r=n;return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function Xi(t){const e=Ko().get(t);if(!e)return null;const{model:n,value:r}=e;return"rgb"===n?r:"hsl"===n?function(t){const e=t[0]/360,n=t[1]/100,r=t[2]/100,o=t[3];if(0===n)return[255*r,255*r,255*r,o];const i=r<.5?r*(1+n):r+n-r*n,a=2*r-i;return[255*Yi(a,i,e+1/3),255*Yi(a,i,e),255*Yi(a,i,e-1/3),o]}(r):null}const Gi=(t,e)=>n=>t*(1-n)+e*n,Vi=(t,e)=>"number"==typeof t&&"number"==typeof e?Gi(t,e):"string"==typeof t&&"string"==typeof e?((t,e)=>{const n=Xi(t),r=Xi(e);return null===n||null===r?n?()=>t:()=>e:t=>{const e=new Array(4);for(let o=0;o<4;o+=1)e[o]=n[o]*(1-t)+r[o]*t;const[o,i,a,s]=e;return`rgba(${Math.round(o)}, ${Math.round(i)}, ${Math.round(a)}, ${s})`}})(t,e):()=>t,Ki=(t,e)=>{const n=Gi(t,e);return t=>Math.round(n(t))};function Ui(t){return!(0,ei.A)(t)&&!ni(t)&&!Number.isNaN(t)}const Zi=Math.sqrt(50),Ji=Math.sqrt(10),Qi=Math.sqrt(2);function ta(t,e,n){const r=(e-t)/Math.max(0,n),o=Math.floor(Math.log(r)/Math.LN10),i=r/10**o;return o>=0?(i>=Zi?10:i>=Ji?5:i>=Qi?2:1)*10**o:-(10**-o)/(i>=Zi?10:i>=Ji?5:i>=Qi?2:1)}const ea=(t,e,n=5)=>{const r=[t,e];let o,i=0,a=r.length-1,s=r[i],c=r[a];return c<s&&([s,c]=[c,s],[i,a]=[a,i]),o=ta(s,c,n),o>0?(s=Math.floor(s/o)*o,c=Math.ceil(c/o)*o,o=ta(s,c,n)):o<0&&(s=Math.ceil(s*o)/o,c=Math.floor(c*o)/o,o=ta(s,c,n)),o>0?(r[i]=Math.floor(s/o)*o,r[a]=Math.ceil(c/o)*o):o<0&&(r[i]=Math.ceil(s*o)/o,r[a]=Math.floor(c*o)/o),r};const na=(t,e,n)=>{const[r,o]=t,[i,a]=e;let s,c;return r<o?(s=Hi(r,o),c=n(i,a)):(s=Hi(o,r),c=n(a,i)),qi(c,s)},ra=(t,e,n)=>{const r=Math.min(t.length,e.length)-1,o=new Array(r),i=new Array(r),a=t[0]>t[r],s=a?[...t].reverse():t,c=a?[...e].reverse():e;for(let t=0;t<r;t+=1)o[t]=Hi(s[t],s[t+1]),i[t]=n(c[t],c[t+1]);return e=>{const n=function(t,e,n,r,o){let i=n||0,a=r||t.length;const s=o||(t=>t);for(;i<a;){const n=Math.floor((i+a)/2);s(t[n])>e?a=n:i=n+1}return i}(t,e,1,r)-1;return qi(i[n],o[n])(e)}},oa=(t,e,n,r)=>(Math.min(t.length,e.length)>2?ra:na)(t,e,r?Ki:n);class ia extends Wi{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:Gi,tickCount:5}}map(t){return Ui(t)?this.output(t):this.options.unknown}invert(t){return Ui(t)?this.input(t):this.options.unknown}nice(){if(!this.options.nice)return;const[t,e,n,...r]=this.getTickMethodOptions();this.options.domain=this.chooseNice()(t,e,n,...r)}getTicks(){const{tickMethod:t}=this.options,[e,n,r,...o]=this.getTickMethodOptions();return t(e,n,r,...o)}getTickMethodOptions(){const{domain:t,tickCount:e}=this.options;return[t[0],t[t.length-1],e]}chooseNice(){return ea}rescale(){this.nice();const[t,e]=this.chooseTransforms();this.composeOutput(t,this.chooseClamp(t)),this.composeInput(t,e,this.chooseClamp(e))}chooseClamp(t){const{clamp:e,range:n}=this.options,r=this.options.domain.map(t),o=Math.min(r.length,n.length);return e?function(t,e){const n=e<t?e:t,r=t>e?t:e;return t=>Math.min(Math.max(n,t),r)}(r[0],r[o-1]):qo}composeOutput(t,e){const{domain:n,range:r,round:o,interpolate:i}=this.options,a=oa(n.map(t),r,i,o);this.output=qi(a,e,t)}composeInput(t,e,n){const{domain:r,range:o}=this.options,i=oa(o,r.map(t),Gi);this.input=qi(e,n,i)}}const aa=(t,e,n)=>{let r,o,i=t,a=e;if(i===a&&n>0)return[i];let s=ta(i,a,n);if(0===s||!Number.isFinite(s))return[];if(s>0){i=Math.ceil(i/s),a=Math.floor(a/s),o=new Array(r=Math.ceil(a-i+1));for(let t=0;t<r;t+=1)o[t]=(i+t)*s}else{s=-s,i=Math.ceil(i*s),a=Math.floor(a*s),o=new Array(r=Math.ceil(a-i+1));for(let t=0;t<r;t+=1)o[t]=(i+t)/s}return o};class sa extends ia{getDefaultOptions(){return{domain:[0,1],range:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolate:Vi,tickMethod:aa,tickCount:5}}chooseTransforms(){return[qo,qo]}clone(){return new sa(this.options)}}var ca=n("./node_modules/.pnpm/@antv+util@3.3.11/node_modules/@antv/util/esm/lodash/clamp.js");function la(t,e){return+t.toPrecision(e)}function ua(t){var e=t.canvas,n=t.touches,r=t.offsetX,o=t.offsetY;if(e)return[e.x,e.y];if(n){var i=n[0];return[i.clientX,i.clientY]}return r&&o?[r,o]:[0,0]}var fa={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",radius:0,zIndex:999},da=Tn({background:"background",labelGroup:"label-group",label:"label"},"indicator"),pa=function(t){function e(e){var n=t.call(this,e,fa)||this;return n.point=[0,0],n.group=n.appendChild(new l.YJ({})),n.isMutationObserved=!0,n}return(0,pn.C6)(e,t),e.prototype.renderBackground=function(){if(this.label){var t=this.attributes,e=t.position,n=(0,pn.zs)(so(t.padding),4),r=n[0],o=n[1],i=n[2],a=n[3],s=this.label.node().getLocalBounds(),c=s.min,l=s.max,u=new hi(c[0]-a,c[1]-r,l[0]+o-c[0]+a,l[1]+i-c[1]+r),f=this.getPath(e,u),d=fr(this.attributes,"background");this.background=zn(this.group).maybeAppendByClassName(da.background,"path").styles((0,pn.Cl)((0,pn.Cl)({},d),{d:f})),this.group.appendChild(this.label.node())}},e.prototype.renderLabel=function(){var t=this.attributes,e=t.formatter,n=t.labelText,r=fr(this.attributes,"label"),o=(0,pn.zs)(pr(r),2),i=o[0],a=o[1],s=(0,pn.Tt)(i,["text"]);(this.label=zn(this.group).maybeAppendByClassName(da.labelGroup,"g").styles(a),n)&&this.label.maybeAppendByClassName(da.label,function(){return Ar(e(n))}).style("text",e(n).toString()).selectAll("text").styles(s)},e.prototype.adjustLayout=function(){var t=(0,pn.zs)(this.point,2),e=t[1],n=this.attributes,r=n.y;this.group.attr("transform","translate(".concat(n.x-t[0],", ").concat(r-e,")"))},e.prototype.getPath=function(t,e){var n=this.attributes.radius,r=e.x,o=e.y,i=e.width,a=e.height,s=[["M",r+n,o],["L",r+i-n,o],["A",n,n,0,0,1,r+i,o+n],["L",r+i,o+a-n],["A",n,n,0,0,1,r+i-n,o+a],["L",r+n,o+a],["A",n,n,0,0,1,r,o+a-n],["L",r,o+n],["A",n,n,0,0,1,r+n,o],["Z"]],c={top:4,right:6,bottom:0,left:2}[t],l=this.createCorner([s[c].slice(-2),s[c+1].slice(-2)]);return s.splice.apply(s,(0,pn.fX)([c+1,1],(0,pn.zs)(l),!1)),s[0][0]="M",s},e.prototype.createCorner=function(t,e){void 0===e&&(e=10);var n=Oo.apply(void 0,(0,pn.fX)([],(0,pn.zs)(t),!1)),r=(0,pn.zs)(t,2),o=(0,pn.zs)(r[0],2),i=o[0],a=o[1],s=(0,pn.zs)(r[1],2),c=s[0],l=s[1],u=(0,pn.zs)(n?[c-i,[i,c]]:[l-a,[a,l]],2),f=u[0],d=(0,pn.zs)(u[1],2),p=d[0],h=d[1],g=f/2,m=e*(f/Math.abs(f)),y=m/2,b=m*Math.sqrt(3)/2*.8,v=(0,pn.zs)([p,p+g-y,p+g,p+g+y,h],5),x=v[0],O=v[1],w=v[2],j=v[3],k=v[4];return n?(this.point=[w,a-b],[["L",x,a],["L",O,a],["L",w,a-b],["L",j,a],["L",k,a]]):(this.point=[i+b,w],[["L",i,x],["L",i,O],["L",i+b,w],["L",i,j],["L",i,k]])},e.prototype.applyVisibility=function(){"hidden"===this.attributes.visibility?mn(this):gn(this)},e.prototype.bindEvents=function(){this.label.on(l.jX.BOUNDS_CHANGED,this.renderBackground)},e.prototype.render=function(){this.renderLabel(),this.renderBackground(),this.adjustLayout(),this.applyVisibility()},e}(Sn),ha={fill:"#fff",lineWidth:1,radius:2,size:10,stroke:"#bfbfbf",strokeOpacity:1,zIndex:0},ga={fill:"#000",fillOpacity:.45,fontSize:12,textAlign:"center",textBaseline:"middle",zIndex:1},ma={x:0,y:0,orientation:"horizontal",showLabel:!0,type:"start"},ya=Tn({foreground:"foreground",handle:"handle",selection:"selection",sparkline:"sparkline",sparklineGroup:"sparkline-group",track:"track",brushArea:"brush-area"},"slider"),ba=Tn({labelGroup:"label-group",label:"label",iconGroup:"icon-group",icon:"icon",iconRect:"icon-rect",iconLine:"icon-line"},"handle"),va=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,pn.C6)(e,t),e.prototype.render=function(t,e){var n=t.x,r=t.y,o=t.size,i=void 0===o?10:o,a=t.radius,s=void 0===a?i/4:a,c=t.orientation,l=t.classNamePrefix,u=(0,pn.Tt)(t,["x","y","size","radius","orientation","classNamePrefix"]),f=i,d=2.4*f,p=l?"".concat(ba.iconRect.name," ").concat(l,"handle-icon-rect"):ba.iconRect.name,h=function(t){return l?"".concat(ba.iconLine,"-").concat(t," ").concat(l,"handle-icon-line"):"".concat(ba.iconLine,"-").concat(t)},g=zn(e).maybeAppendByClassName(ba.iconRect,"rect").attr("className",p).styles((0,pn.Cl)((0,pn.Cl)({},u),{width:f,height:d,radius:s,x:n-f/2,y:r-d/2,transformOrigin:"center"})),m=n+1/3*f-f/2,y=n+2/3*f-f/2,b=r+1/4*d-d/2,v=r+3/4*d-d/2;g.maybeAppendByClassName("".concat(ba.iconLine,"-1"),"line").attr("className",h(1)).styles((0,pn.Cl)({x1:m,x2:m,y1:b,y2:v},u)),g.maybeAppendByClassName("".concat(ba.iconLine,"-2"),"line").attr("className",h(2)).styles((0,pn.Cl)({x1:y,x2:y,y1:b,y2:v},u)),"vertical"===c&&(g.node().style.transform="rotate(90)")},e}(Sn),xa=function(t){function e(e){return t.call(this,e,ma)||this}return(0,pn.C6)(e,t),e.prototype.renderLabel=function(t){var e=this,n=this.attributes,r=n.x,o=n.y,i=n.showLabel,a=fr(this.attributes,"label"),s=a.x,c=void 0===s?0:s,l=a.y,u=void 0===l?0:l,f=a.transform,d=a.transformOrigin,p=(0,pn.Tt)(a,["x","y","transform","transformOrigin"]),h=(0,pn.zs)(pr(p,[]),2),g=h[0],m=h[1],y=zn(t).maybeAppendByClassName(ba.labelGroup,"g").styles(m),b=(0,pn.Cl)((0,pn.Cl)({},ga),g),v=b.text,x=(0,pn.Tt)(b,["text"]);En(!!i,y,function(t){e.label=t.maybeAppendByClassName(ba.label,"text").styles((0,pn.Cl)((0,pn.Cl)({},x),{x:r+c,y:o+u,transform:f,transformOrigin:d,text:"".concat(v)})),e.label.on("mousedown",function(t){t.stopPropagation()}),e.label.on("touchstart",function(t){t.stopPropagation()})})},e.prototype.renderIcon=function(t){var e=this.attributes,n=e.type,r=(0,pn.Cl)((0,pn.Cl)({x:e.x,y:e.y,orientation:e.orientation,classNamePrefix:e.classNamePrefix},ha),fr(this.attributes,"icon")),o=this.attributes.iconShape,i=void 0===o?function(){return new va({style:r})}:o;zn(t).maybeAppendByClassName(ba.iconGroup,"g").selectAll(ba.icon.class).data([i]).join(function(t){return t.append("string"==typeof i?i:function(){return i(n)}).attr("className",ba.icon.name)},function(t){return t.update(r)},function(t){return t.remove()})},e.prototype.render=function(t,e){this.renderIcon(e),this.renderLabel(e)},e}(Sn);function Oa(t,e,n){return n?"".concat(t," ").concat(n,"legend-").concat(e):t}var wa="title",ja="item",ka="marker",Aa="label",Ma="value",_a="focus-icon",Sa="background",Ea="ribbon",Pa="track",La="selection",Ca="handle",za="handle-marker",Ta="handle-label",Ba="indicator",Ia="prev-btn",Na="next-btn",Ra="page-info",Fa=Tn({text:"text"},"title");function Da(t,e){var n=Object.entries(e).reduce(function(e,n){var r=(0,pn.zs)(n,2),o=r[0],i=r[1];return t.node().attr(o)||(e[o]=i),e},{});t.styles(n)}var $a=function(t){function e(e){return t.call(this,e,{text:"",width:0,height:0,fill:"#4a505a",fontWeight:"bold",fontSize:12,fontFamily:"sans-serif",inset:0,spacing:0,position:"top-left"})||this}return(0,pn.C6)(e,t),e.prototype.getAvailableSpace=function(){var t=this.attributes,e=t.width,n=t.height,r=t.position,o=t.spacing,i=t.inset,a=this.querySelector(Fa.text.class);if(!a)return new hi(0,0,+e,+n);var s=a.getBBox(),c=s.width,l=s.height,u=(0,pn.zs)(so(o),4),f=u[0],d=u[1],p=u[2],h=u[3],g=(0,pn.zs)([0,0,+e,+n],4),m=g[0],y=g[1],b=g[2],v=g[3],x=Fo(r);if(x.includes("i"))return new hi(m,y,b,v);x.forEach(function(t,r){var o,i,a,s;"t"===t&&(o=(0,pn.zs)(0===r?[l+p,+n-l-p]:[0,+n],2),y=o[0],v=o[1]),"r"===t&&(i=(0,pn.zs)([+e-c-h],1),b=i[0]),"b"===t&&(a=(0,pn.zs)([+n-l-f],1),v=a[0]),"l"===t&&(s=(0,pn.zs)(0===r?[c+d,+e-c-d]:[0,+e],2),m=s[0],b=s[1])});var O=(0,pn.zs)(so(i),4),w=O[0],j=O[3],k=(0,pn.zs)([j+O[1],w+O[2]],2);return new hi(m+j,y+w,b-k[0],v-k[1])},e.prototype.getBBox=function(){return this.title?this.title.getBBox():new hi(0,0,0,0)},e.prototype.render=function(t,e){var n=this,r=t.classNamePrefix,o=(0,pn.Tt)(t,["width","height","position","spacing","classNamePrefix"]),i=(0,pn.zs)(pr(o),1)[0],a=function(t){var e,n,r,o,i=t.width,a=t.height,s=t.position,c=(0,pn.zs)([+i/2,+a/2],2),l=(0,pn.zs)([+c[0],+c[1],"center","middle"],4),u=l[0],f=l[1],d=l[2],p=l[3],h=Fo(s);return h.includes("l")&&(u=(e=(0,pn.zs)([0,"start"],2))[0],d=e[1]),h.includes("r")&&(u=(n=(0,pn.zs)([+i,"end"],2))[0],d=n[1]),h.includes("t")&&(f=(r=(0,pn.zs)([0,"top"],2))[0],p=r[1]),h.includes("b")&&(f=(o=(0,pn.zs)([+a,"bottom"],2))[0],p=o[1]),{x:u,y:f,textAlign:d,textBaseline:p}}(t),s=a.x,c=a.y,l=a.textAlign,u=a.textBaseline;En(!!o.text,zn(e),function(t){var e=Oa(Fa.text.name,wa,r);n.title=t.maybeAppendByClassName(Fa.text,"text").attr("className",e).styles(i).call(Da,{x:s,y:c,textAlign:l,textBaseline:u}).node()})},e}(Sn),Wa=function(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"]]},Ha=Wa,qa=function(t,e,n){return[["M",t,e+n],["L",t,e-n]]},Ya=function(t,e,n){return[["M",t-n,e],["L",t+n,e]]},Xa=Ya;var Ga=function(t,e,n){return[["M",t-n,e-n],["L",t+n,e],["L",t-n,e+n],["Z"]]};function Va(t){var e=function(t){var e="default";if((0,ke.A)(t)&&t instanceof Image)e="image";else if((0,Jn.A)(t))e="symbol";else if((0,j.A)(t)){var n=new RegExp("data:(image|text)");e=t.match(n)?"base64":/^(https?:\/\/(([a-zA-Z0-9]+-?)+[a-zA-Z0-9]+\.)+[a-zA-Z]+)(:\d+)?(\/.*)?(\?.*)?(#.*)?$/.test(t)?"url":"symbol"}return e}(t);return["base64","url","image"].includes(e)?"image":t&&"symbol"===e?"path":null}var Ka=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,pn.C6)(e,t),e.prototype.render=function(t,n){var r=t.x,o=void 0===r?0:r,i=t.y,a=void 0===i?0:i,s=this.getSubShapeStyle(t),c=s.symbol,l=s.size,u=void 0===l?16:l,f=(0,pn.Tt)(s,["symbol","size"]),d=Va(c);En(!!d,zn(n),function(t){t.maybeAppendByClassName("marker",d).attr("className","marker ".concat(d,"-marker")).call(function(t){if("image"===d){t.styles({img:c,width:n=2*u,height:n,x:o-u,y:a-u})}else{var n=u/2,r=(0,Jn.A)(c)?c:e.getSymbol(c);t.styles((0,pn.Cl)({d:null==r?void 0:r(o,a,n)},f))}})})},e.MARKER_SYMBOL_MAP=new Map,e.registerSymbol=function(t,n){e.MARKER_SYMBOL_MAP.set(t,n)},e.getSymbol=function(t){return e.MARKER_SYMBOL_MAP.get(t)},e.getSymbols=function(){return Array.from(e.MARKER_SYMBOL_MAP.keys())},e}(Sn);Ka.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]]}),Ka.registerSymbol("hyphen",function(t,e,n){return[["M",t-n,e],["L",t+n,e]]}),Ka.registerSymbol("line",qa),Ka.registerSymbol("plus",function(t,e,n){return[["M",t-n,e],["L",t+n,e],["M",t,e-n],["L",t,e+n]]}),Ka.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]]}),Ka.registerSymbol("circle",Wa),Ka.registerSymbol("point",Ha),Ka.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"]]}),Ka.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"]]}),Ka.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"]]}),Ka.registerSymbol("diamond",function(t,e,n){return[["M",t-n,e],["L",t,e-n],["L",t+n,e],["L",t,e+n],["Z"]]}),Ka.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"]]}),Ka.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"]]}),Ka.registerSymbol("line",qa),Ka.registerSymbol("dot",Ya),Ka.registerSymbol("dash",Xa),Ka.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]]}),Ka.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]]}),Ka.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]]}),Ka.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]]}),Ka.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]]}),Ka.registerSymbol("focus",function(t,e,n){var r=.2*n,o=.7*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"],["M",t-o,e],["L",t-r,e],["M",t+r,e],["L",t+o,e],["M",t,e-o],["L",t,e-r],["M",t,e+r],["L",t,e+o]]});Ka.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"]]}),Ka.registerSymbol("verticalHandle",function(t,e,n){var r=1.4*n,o=n/2,i=n/6,a=t+.4*r;return[["M",t,e],["L",a,e+o],["L",t+r,e+o],["L",t+r,e-o],["L",a,e-o],["Z"],["M",a,e+i],["L",t+r-2,e+i],["M",a,e-i],["L",t+r-2,e-i]]}),Ka.registerSymbol("horizontalHandle",function(t,e,n){var r=1.4*n,o=n/2,i=n/6,a=e+.4*r;return[["M",t,e],["L",t-o,a],["L",t-o,e+r],["L",t+o,e+r],["L",t+o,a],["Z"],["M",t-i,a],["L",t-i,e+r-2],["M",t+i,a],["L",t+i,e+r-2]]});function Ua(t,e,n){return void 0===t&&(t="horizontal"),"horizontal"===t?e:n}var Za=Tn({markerGroup:"marker-group",marker:"marker",labelGroup:"label-group",label:"label"},"handle"),Ja={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},Qa=function(t){function e(e){return t.call(this,e,Ja)||this}return(0,pn.C6)(e,t),e.prototype.render=function(t,e){var n=zn(e).maybeAppendByClassName(Za.markerGroup,"g");this.renderMarker(n);var r=zn(e).maybeAppendByClassName(Za.labelGroup,"g");this.renderLabel(r)},e.prototype.renderMarker=function(t){var e=this,n=this.attributes,r=n.classNamePrefix,o=n.markerSymbol,i=void 0===o?Ua(n.orientation,"horizontalHandle","verticalHandle"):o;En(!!i,t,function(t){var n=fr(e.attributes,"marker"),o=(0,pn.Cl)({symbol:i},n),a=Oa(Za.marker.name,za,r);if(e.marker=t.maybeAppendByClassName(Za.marker,function(){return new Ka({style:o,className:a})}).update(o),r){var s=e.marker.node().querySelector(".marker");if(s){var c=Oa((s.getAttribute("class")||"").split(" ")[0],za,r);s.setAttribute("class",c)}}})},e.prototype.renderLabel=function(t){var e=this,n=this.attributes,r=n.orientation,o=n.spacing,i=void 0===o?0:o,a=n.formatter,s=n.classNamePrefix;En(n.showLabel,t,function(t){var n,o=fr(e.attributes,"label"),c=o.text,l=(0,pn.Tt)(o,["text"]),u=(null===(n=t.select(Za.marker.class))||void 0===n?void 0:n.node().getBBox())||{},f=u.width,d=u.height,p=(0,pn.zs)(Ua(r,[0,(void 0===d?0:d)+i,"center","top"],[(void 0===f?0:f)+i,0,"start","middle"]),4),h=p[0],g=p[1],m=p[2],y=p[3],b=Oa(Za.label.name,Ta,s);t.maybeAppendByClassName(Za.label,"text").attr("className",b).styles((0,pn.Cl)((0,pn.Cl)({},l),{x:h,y:g,text:a(c).toString(),textAlign:m,textBaseline:y}))})},e}(Sn),ts={showTitle:!0,padding:0,orientation:"horizontal",backgroundFill:"transparent",titleText:"",titleSpacing:4,titlePosition:"top-left",titleFill:"#2C3542",titleFontWeight:"bold",titleFontFamily:"sans-serif",titleFontSize:12},es=kn({},ts,{}),ns=kn({},ts,dr(Ja,"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"}),rs=Tn({title:"title",html:"html",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");function os(t,e){var n=(0,pn.zs)(function(t,e){for(var n=1;n<t.length;n+=1){var r=t[n-1],o=t[n];if(e>=r&&e<=o)return[r,o]}return[e,e]}(t,e),2),r=n[0],o=n[1];return{tick:e>(r+o)/2?o:r,range:[r,o]}}var is=Tn({trackGroup:"background-group",track:"background",selectionGroup:"ribbon-group",selection:"ribbon",clipPath:"clip-path"},"ribbon");function as(t){var e=t.size,n=t.length;return Ua(t.orientation,[n,e],[e,n])}function ss(t){var e=t.type,n=(0,pn.zs)(as(t),2),r=n[0],o=n[1];return"size"===e?[["M",0,o],["L",0+r,0],["L",0+r,o],["Z"]]:[["M",0,o],["L",0,0],["L",0+r,0],["L",0+r,o],["Z"]]}function cs(t){return ss(t)}function ls(t){var e,n=t.orientation,r=t.color,o=t.block,i=t.partition;if((0,Jn.A)(r)){e=new Array(20).fill(0).map(function(t,e,n){return r(e/(n.length-1))})}else e=r;var a=e.length,s=e.map(function(t){return(0,l.H0)(t).toString()});return a?1===a?s[0]:o?function(t,e,n){var r=Array.from(e),o=t.length;return new Array(o).fill(0).reduce(function(e,n,i){var a=r[i%r.length];return e+" ".concat(t[i],":").concat(a).concat(i<o-1?" ".concat(t[i+1],":").concat(a):"")},"l(".concat("horizontal"===n?"0":"270",")"))}(i,s,n):s.reduce(function(t,e,n){return t+" ".concat(n/(a-1),":").concat(e)},"l(".concat(Ua(n,"0","270"),")")):""}function us(t){var e=t.orientation,n=t.range;if(!n)return[];var r=(0,pn.zs)(as(t),2),o=r[0],i=r[1],a=(0,pn.zs)(n,2),s=a[0],c=a[1],l=Ua(e,s*o,0),u=Ua(e,0,s*i),f=Ua(e,c*o,o),d=Ua(e,i,c*i);return[["M",l,u],["L",l,d],["L",f,d],["L",f,u],["Z"]]}var fs=function(t){function e(e){return t.call(this,e,{type:"color",orientation:"horizontal",size:30,range:[0,1],length:200,block:!1,partition:[],color:["#fff","#000"],trackFill:"#e5e5e5"})||this}return(0,pn.C6)(e,t),e.prototype.render=function(t,e){!function(t,e){var n=fr(e,"track"),r=Oa(is.track.name,Pa,e.classNamePrefix);t.maybeAppendByClassName(is.track,"path").attr("className",r).styles((0,pn.Cl)({d:ss(e)},n))}(zn(e).maybeAppendByClassName(is.trackGroup,"g"),t),function(t,e){var n=fr(e,"selection"),r=ls(e),o=Oa(is.selection.name,La,e.classNamePrefix),i=t.maybeAppendByClassName(is.selection,"path").attr("className",o).styles((0,pn.Cl)({d:cs(e),fill:r},n)),a=i.maybeAppendByClassName(is.clipPath,"path").styles({d:us(e)}).node();i.style("clipPath",a)}(zn(e).maybeAppendByClassName(is.selectionGroup,"g"),t)},e}(Sn);var ds=function(t){function e(e){var n=t.call(this,e,ns)||this;return n.eventToOffsetScale=new sa({}),n.innerRibbonScale=new sa({}),n.cacheLabelBBox=null,n.cacheHandleBBox=null,n.onHovering=function(t){var e=n.attributes,r=e.data,o=e.block;t.stopPropagation();var i=n.getValueByCanvasPoint(t);if(o){var a=os(r.map(function(t){return t.value}),i).range,s=n.getRealSelection(a);n.showIndicator((a[0]+a[1])/2,"".concat(s[0],"-").concat(s[1])),n.dispatchIndicated(i,a)}else{var c=n.getTickValue(i);n.showIndicator(c,"".concat(n.getRealValue(c))),n.dispatchIndicated(c)}},n.onDragStart=function(t){return function(e){e.stopPropagation(),n.attributes.slidable&&(n.target=t,n.prevValue=n.getTickValue(n.getValueByCanvasPoint(e)),document.addEventListener("mousemove",n.onDragging),document.addEventListener("touchmove",n.onDragging),document.addEventListener("mouseleave",n.onDragEnd),document.addEventListener("mouseup",n.onDragEnd),document.addEventListener("mouseup",n.onDragEnd),document.addEventListener("touchend",n.onDragEnd))}},n.onDragging=function(t){var e=n.target;n.updateMouse();var r=(0,pn.zs)(n.selection,2),o=r[0],i=r[1],a=n.getTickValue(n.getValueByCanvasPoint(t)),s=a-n.prevValue;"start"===e?o!==a&&n.updateSelection(a,i):"end"===e?i!==a&&n.updateSelection(o,a):"ribbon"===e&&0!==s&&(n.prevValue=a,n.updateSelection(s,s,!0))},n.onDragEnd=function(){n.style.cursor="pointer",document.removeEventListener("mousemove",n.onDragging),document.removeEventListener("touchmove",n.onDragging),document.removeEventListener("mouseup",n.onDragEnd),document.removeEventListener("touchend",n.onDragEnd)},n}return(0,pn.C6)(e,t),Object.defineProperty(e.prototype,"handleOffsetRatio",{get:function(){return this.ifHorizontal(.5,.5)},enumerable:!1,configurable:!0}),e.prototype.getBBox=function(){var t=this.attributes;return new hi(0,0,t.width,t.height)},e.prototype.render=function(t,e){var n=this,r=t.classNamePrefix;r?e.attr("className","".concat(e.className||"legend-continuous"," ").concat(r,"legend")):e.className||e.attr("className","legend-continuous");var o=t.showLabel;this.renderTitle(zn(e));var i=this.availableSpace,a=i.x,s=i.y,c=zn(e).maybeAppendByClassName(rs.contentGroup,"g").styles({transform:"translate(".concat(a,", ").concat(s,")")});En(!!o,c.maybeAppendByClassName(rs.labelGroup,"g").styles({zIndex:1}),function(t){n.renderLabel(t)});var l=c.maybeAppendByClassName(rs.ribbonGroup,"g").styles({zIndex:0});this.handlesGroup=c.maybeAppendByClassName(rs.handlesGroup,"g").styles({zIndex:2}),this.renderHandles(),this.renderRibbon(l),this.renderIndicator(c),this.adjustLabel(),this.adjustHandles()},Object.defineProperty(e.prototype,"range",{get:function(){var t=this.attributes,e=t.domain;return e?{min:e[0],max:e[1]}:function(t){return{min:Math.min.apply(Math,(0,pn.fX)([],(0,pn.zs)(t.map(function(t){return t.value})),!1)),max:Math.max.apply(Math,(0,pn.fX)([],(0,pn.zs)(t.map(function(t){return t.value})),!1))}}(t.data)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ribbonScale",{get:function(){var t=this.range;return this.innerRibbonScale.update({domain:[t.min,t.max],range:[0,1]}),this.innerRibbonScale},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ribbonRange",{get:function(){var t=(0,pn.zs)(this.selection,2),e=t[1],n=this.ribbonScale;return[n.map(t[0]),n.map(e)]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"selection",{get:function(){var t=this.range,e=this.attributes.defaultValue,n=(0,pn.zs)(void 0===e?[t.min,t.max]:e,2);return[n[0],n[1]]},enumerable:!1,configurable:!0}),e.prototype.ifHorizontal=function(t,e){return Ua(this.attributes.orientation,"function"==typeof t?t():t,"function"==typeof e?e():e)},e.prototype.renderTitle=function(t){var e=this.attributes,n=e.showTitle,r=e.titleText,o=e.width,i=e.height,a=e.classNamePrefix,s=fr(this.attributes,"title"),c=(0,pn.Cl)((0,pn.Cl)({},s),{width:o,height:i,text:r,classNamePrefix:a}),l=this;t.selectAll(rs.title.class).data(n?[r]:[]).join(function(t){return t.append(function(){return new $a({style:c})}).attr("className",rs.title.name).each(function(){l.title=this})},function(t){return t.update(c)},function(t){return t.each(function(){l.title=void 0}).remove()})},Object.defineProperty(e.prototype,"availableSpace",{get:function(){if(this.title)return this.title.getAvailableSpace();var t=this.attributes;return new hi(0,0,t.width,t.height)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"labelFixedSpacing",{get:function(){return this.attributes.showTick?5:0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"labelPosition",{get:function(){var t=this.attributes;return{vertical:{positive:"right",negative:"left"},horizontal:{positive:"bottom",negative:"top"}}[t.orientation][t.labelDirection]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"labelBBox",{get:function(){var t;if(!this.attributes.showLabel)return new hi(0,0,0,0);if(this.cacheLabelBBox)return this.cacheLabelBBox;var e=(null===(t=this.label.querySelector(Zn.labelGroup.class))||void 0===t?void 0:t.children.slice(-1)[0]).getBBox();return this.cacheLabelBBox=new hi(0,0,e.width,e.height),this.cacheLabelBBox},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"labelShape",{get:function(){var t=this.attributes,e=t.labelSpacing,n=void 0===e?0:e;if(!t.showLabel)return{width:0,height:0,size:0,length:0};var r=this.labelBBox,o=r.width,i=r.height;return{width:o,height:i,size:this.ifHorizontal(i,o)+n+this.labelFixedSpacing,length:this.ifHorizontal(o,i)}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ribbonBBox",{get:function(){var t=this.attributes,e=t.showHandle,n=t.ribbonSize,r=this.availableSpace,o=r.width,i=r.height,a=this.labelShape,s=a.size,c=a.length,l=(0,pn.zs)(this.ifHorizontal([i,o],[o,i]),2),u=l[0],f=l[1],d=e?this.handleShape:{size:0,length:0},p=d.size,h=d.length,g=this.handleOffsetRatio,m=0,y=this.labelPosition;m=n||(["bottom","right"].includes(y)?Math.min(u-s,(u-p)/g):u*(1-g)>p?Math.max(u-s,0):Math.max((u-s-p)/g,0));var b=Math.max(h,c),v=f-b,x=(0,pn.zs)(this.ifHorizontal([v,m],[m,v]),2),O=x[0],w=x[1],j=["top","left"].includes(y)?s:0,k=(0,pn.zs)(this.ifHorizontal([b/2,j],[j,b/2]),2);return new hi(k[0],k[1],O,w)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ribbonShape",{get:function(){var t=this.ribbonBBox,e=t.width,n=t.height;return this.ifHorizontal({size:n,length:e},{size:e,length:n})},enumerable:!1,configurable:!0}),e.prototype.renderRibbon=function(t){var e=this.attributes,n=e.data,r=e.type,o=e.orientation,i=e.color,a=e.block,s=e.classNamePrefix,c=fr(this.attributes,"ribbon"),l=this.range,u=l.min,f=l.max,d=this.ribbonBBox,p=d.y,h=this.ribbonShape,g=h.length,m=h.size,y=kn({transform:"translate(".concat(d.x,", ").concat(p,")"),length:g,size:m,type:r,orientation:o,color:i,block:a,partition:n.map(function(t){return(t.value-u)/(f-u)}),range:this.ribbonRange,classNamePrefix:s},c),b=Oa(rs.ribbon.name,Ea,s);this.ribbon=t.maybeAppendByClassName(rs.ribbon,function(){return new fs({style:y,className:b})}).update(y)},e.prototype.getHandleClassName=function(t){return"".concat(rs.prefix("".concat(t,"-handle")))},e.prototype.renderHandles=function(){var t=this.attributes,e=t.showHandle,n=t.orientation,r=t.classNamePrefix,o=fr(this.attributes,"handle"),i=(0,pn.zs)(this.selection,2),a=i[0],s=i[1],c=(0,pn.Cl)((0,pn.Cl)({},o),{orientation:n,classNamePrefix:r}),l=o.shape,u="basic"===(void 0===l?"slider":l)?Qa:xa,f=this,d=Oa(rs.handle.name,Ca,r);this.handlesGroup.selectAll(rs.handle.class).data(e?[{value:a,type:"start"},{value:s,type:"end"}]:[],function(t){return t.type}).join(function(t){return t.append(function(){return new u({style:c,className:d})}).attr("className",function(t){var e=t.type;return"".concat(d," ").concat(f.getHandleClassName(e))}).each(function(t){var e=t.type;this.update({labelText:t.value});var n="".concat(e,"Handle");f[n]=this,this.addEventListener("pointerdown",f.onDragStart(e))})},function(t){return t.update(c).each(function(t){this.update({labelText:t.value})})},function(t){return t.each(function(t){var e="".concat(t.type,"Handle");f[e]=void 0}).remove()})},e.prototype.adjustHandles=function(){var t=(0,pn.zs)(this.selection,2),e=t[1];this.setHandlePosition("start",t[0]),this.setHandlePosition("end",e);var n=this.attributes,r=n.classNamePrefix,o=n.showHandle,i=fr(this.attributes,"handle").shape;o&&"slider"===(void 0===i?"slider":i)&&r&&(this.startHandle&&this.updateSliderHandleClassNames(this.startHandle,r),this.endHandle&&this.updateSliderHandleClassNames(this.endHandle,r))},e.prototype.updateSliderHandleClassNames=function(t,e){var n=t.container||t,r=n.querySelector(".handle-icon-rect");if(r){var o=Oa("handle-icon-rect",za,e);r.setAttribute("class",o),r.querySelectorAll("line").forEach(function(t){var n=Oa((t.getAttribute("class")||"").split(" ")[0],za,e);t.setAttribute("class",n)})}var i=n.querySelector(".handle-label");if(i){var a=Oa("handle-label",Ta,e);i.setAttribute("class",a)}},Object.defineProperty(e.prototype,"handleBBox",{get:function(){if(this.cacheHandleBBox)return this.cacheHandleBBox;if(!this.attributes.showHandle)return new hi(0,0,0,0);var t=this.startHandle.getBBox(),e=t.width,n=t.height,r=this.endHandle.getBBox(),o=r.height,i=(0,pn.zs)([Math.max(e,r.width),Math.max(n,o)],2);return this.cacheHandleBBox=new hi(0,0,i[0],i[1]),this.cacheHandleBBox},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"handleShape",{get:function(){var t=this.handleBBox,e=t.width,n=t.height,r=(0,pn.zs)(this.ifHorizontal([n,e],[e,n]),2);return{width:e,height:n,size:r[0],length:r[1]}},enumerable:!1,configurable:!0}),e.prototype.setHandlePosition=function(t,e){var n=this.attributes.handleFormatter,r=this.ribbonBBox,o=r.x,i=r.y,a=this.ribbonShape.size,s=this.getOffset(e),c=(0,pn.zs)(this.ifHorizontal([o+s,i+a*this.handleOffsetRatio],[o+a*this.handleOffsetRatio,i+s]),2),l=c[0],u=c[1],f=this.handlesGroup.select(".".concat(this.getHandleClassName(t))).node();null==f||f.update({transform:"translate(".concat(l,", ").concat(u,")"),formatter:n})},e.prototype.renderIndicator=function(t){var e=this.attributes.classNamePrefix,n=fr(this.attributes,"indicator"),r=Oa(rs.indicator.name,Ba,e);this.indicator=t.maybeAppendByClassName(rs.indicator,function(){return new pa({style:n,className:r})}).update(n)},Object.defineProperty(e.prototype,"labelData",{get:function(){var t=this;return this.attributes.data.reduce(function(e,n,r,o){var i,a,s=null!==(i=null==n?void 0:n.id)&&void 0!==i?i:r.toString();if(e.push((0,pn.Cl)((0,pn.Cl)({},n),{id:s,index:r,type:"value",label:null!==(a=null==n?void 0:n.label)&&void 0!==a?a:n.value.toString(),value:t.ribbonScale.map(n.value)})),r<o.length-1){var c=(0,pn.zs)([n.value,o[r+1].value],2),l=c[0],u=c[1],f=(l+u)/2;e.push((0,pn.Cl)((0,pn.Cl)({},n),{id:s,index:r,type:"range",range:[l,u],label:[l,u].join("~"),value:t.ribbonScale.map(f)}))}return e},[])},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"labelStyle",{get:function(){var t=(0,pn.zs)(["center","middle"],2),e=t[0],n=t[1],r=this.labelPosition;return"top"===r?n="bottom":"bottom"===r?n="top":"left"===r?e="end":"right"===r&&(e="start"),{labelTextAlign:e,labelTextBaseline:n}},enumerable:!1,configurable:!0}),e.prototype.renderLabel=function(t){var e=this.attributes,n=e.showTick,r=void 0!==n&&n,o=e.labelFilter,i=e.labelFormatter,a=fr(this.attributes,"tick"),s=fr(this.attributes,"label"),c=s.align,l=kn((0,pn.Cl)({showLine:!1,showGrid:!1,showTick:r,type:"linear",startPos:[0,0],endPos:[0,0],tickDirection:"negative",labelTransform:"rotate(0)"},this.labelStyle),dr(a,"tick"),dr(s,"label"),{data:this.labelData}),u={tickFilter:function(t,e,n){return"value"===(null==t?void 0:t.type)&&(!o||o(t,t.index,n.filter(function(t){return"value"!==t.type})))},labelFilter:function(t,e,n){return(null==t?void 0:t.type)===c&&(!o||o(t,t.index,n.filter(function(t){return t.type===c})))},labelFormatter:i},f=(0,pn.Cl)((0,pn.Cl)((0,pn.Cl)({},l),u),{labelOverlap:[{type:"hide"}]});this.label=t.maybeAppendByClassName(rs.label,function(){return new Wo({style:f})}).node(),this.label.update(f,!1)},Object.defineProperty(e.prototype,"labelAxisStyle",{get:function(){var t=this.attributes,e=t.showTick,n=t.labelDirection,r=t.labelSpacing,o=t.tickLength,i=this.ribbonShape.size,a=this.labelPosition,s=this.labelFixedSpacing,c=(0,pn.zs)([0,0,0],3),l=c[0],u=c[1],f=c[2],d=null!=o?o:i;return e?(f=d,u=s,"positive"===n?"right"===a?(l=d,f=d):"bottom"===a&&(l=f):"negative"===n&&("top"===a||"left"===a)&&(l=i)):"positive"===n?"right"===a?u=d:"bottom"===a&&(l=i+s,u=r):"negative"===n&&("left"===a||"top"===a)&&(u=r),{offset:l,spacing:u,tickLength:f}},enumerable:!1,configurable:!0}),e.prototype.adjustLabel=function(){if(this.attributes.showLabel){var t=this.ribbonBBox,e=t.x,n=t.y,r=this.labelAxisStyle,o=r.offset,i=r.spacing,a=r.tickLength,s=(0,pn.zs)(this.ifHorizontal([[e,n+o],[e+t.width,n+o]],[[e+o,n+t.height],[e+o,n]]),2);this.label.update({startPos:s[0],endPos:s[1],tickLength:a,labelSpacing:i},!1)}},e.prototype.bindEvents=function(){this.style.cursor="pointer",this.ribbon.on("pointerdown",this.onDragStart("ribbon")),this.ribbon.on("pointermove",this.onHovering),this.addEventListener("pointerout",this.hideIndicator)},e.prototype.showIndicator=function(t,e){if(void 0===e&&(e="".concat(t)),this.attributes.showIndicator&&"number"==typeof t){var n=this.range,r=this.ribbonBBox,o=r.x,i=r.y,a=(0,ca.A)(t,n.min,n.max),s=this.getOffset(a),c=this.ifHorizontal([s+o,i],[o,s+i]);this.indicator.update({x:c[0],y:c[1],position:this.ifHorizontal("top","left"),labelText:e}),gn(this.indicator.node())}else this.hideIndicator()},e.prototype.hideIndicator=function(){mn(this.indicator.node())},e.prototype.updateMouse=function(){this.attributes.slidable&&(this.style.cursor="grabbing")},e.prototype.setSelection=function(t,e){this.updateSelection(t,e)},e.prototype.updateSelection=function(t,e,n){var r;void 0===n&&(n=!1);var o=(0,pn.zs)(this.selection,2),i=o[0],a=o[1],s=(0,pn.zs)([t,e],2),c=s[0],l=s[1];n&&(c+=i,l+=a);var u=this.range;r=(0,pn.zs)(function(t,e,n,r){var o;void 0===r&&(r=4);var i=(0,pn.zs)(t,2),a=i[0],s=i[1],c=(0,pn.zs)(e,2),l=c[0],u=c[1],f=(0,pn.zs)(n,2),d=f[0],p=f[1],h=(0,pn.zs)([l,u],2),g=h[0],m=h[1],y=m-g;return g>m&&(g=(o=(0,pn.zs)([m,g],2))[0],m=o[1]),y>s-a?[a,s]:g<a?d===a&&p===m?[a,m]:[a,y+a]:m>s?p===s&&d===g?[g,s]:[s-y,s]:[g,m]}([u.min,u.max],[c,l],this.selection),2),this.update({defaultValue:[c=r[0],l=r[1]]}),this.dispatchSelection()},Object.defineProperty(e.prototype,"step",{get:function(){var t=this.attributes.step,e=void 0===t?1:t,n=this.range,r=n.min,o=n.max;return(0,ei.A)(e)?la(.01*(o-r),0):e},enumerable:!1,configurable:!0}),e.prototype.getTickValue=function(t){var e=this.attributes,n=this.range.min;return e.block?os(e.data.map(function(t){return t.value}),t).tick:function(t,e,n){return n+Math.round((t-n)/e)*e}(t,this.step,n)},e.prototype.getValueByCanvasPoint=function(t){var e=this.range,n=e.min,r=e.max,o=(0,pn.zs)(this.ribbon.node().getPosition(),2),i=this.ifHorizontal(o[0],o[1]),a=this.ifHorizontal.apply(this,(0,pn.fX)([],(0,pn.zs)(ua(t)),!1));return(0,ca.A)(this.getOffset(a-i,!0),n,r)},e.prototype.getOffset=function(t,e){void 0===e&&(e=!1);var n=this.range,r=this.eventToOffsetScale;return r.update({domain:[n.min,n.max],range:[0,this.ribbonShape.length]}),e?r.invert(t):r.map(t)},e.prototype.getRealSelection=function(t){var e=this.range.max,n=(0,pn.zs)(t,2),r=n[0],o=n[1];return this.ifHorizontal([r,o],[e-o,e-r])},e.prototype.getRealValue=function(t){return this.ifHorizontal(t,this.range.max-t)},e.prototype.dispatchSelection=function(){var t=this.getRealSelection(this.selection),e=new l.up("valuechange",{detail:{value:t}});this.dispatchEvent(e)},e.prototype.dispatchIndicated=function(t,e){var n=this,r=this.range.max,o=this.ifHorizontal(function(){return{value:t,range:e}},function(){return{value:r-t,range:e?n.getRealSelection(e):void 0}}),i=new l.up("indicate",{detail:o});this.dispatchEvent(i)},e}(Sn);class ps extends Y{getDefaultOptions(){return{domain:[.5],range:[0,1]}}constructor(t){super(t)}map(t){if(!ri(t))return this.options.unknown;const e=Go(this.thresholds,t,0,this.n);return this.options.range[e]}invert(t){const{range:e}=this.options,n=e.indexOf(t),r=this.thresholds;return[r[n-1],r[n]]}clone(){return new ps(this.options)}rescale(){const{domain:t,range:e}=this.options;this.n=Math.min(t.length,e.length-1),this.thresholds=t}}function hs(t){return(0,R.A)(t)?0:$e(t)?t.length:Object.keys(t).length}const gs=function(t,e){if(!$e(t))return-1;var n=Array.prototype.indexOf;if(n)return n.call(t,e);for(var r=-1,o=0;o<t.length;o++)if(t[o]===e){r=o;break}return r};function ms(t){return Math.abs(t)<1e-14?t:parseFloat(t.toFixed(14))}const ys=[1,5,2,2.5,4,3],bs=100*Number.EPSILON;function vs(t,e,n,r,o,i){const a=hs(e),s=gs(e,t);let c=0;const l=function(t,e){return(t%e+e)%e}(r,i);return(l<bs||i-l<bs)&&r<=0&&o>=0&&(c=1),1-s/(a-1)-n+c}function xs(t,e,n){const r=hs(e);return 1-gs(e,t)/(r-1)-n+1}function Os(t,e,n,r,o,i){const a=(t-1)/(i-o),s=(e-1)/(Math.max(i,r)-Math.min(n,o));return 2-Math.max(a/s,s/a)}function ws(t,e){return t>=e?2-(t-1)/(e-1):1}function js(t,e,n,r){return 1-.5*((e-r)**2+(t-n)**2)/(.1*(e-t))**2}function ks(t,e,n){const r=e-t;if(n>r){return 1-((n-r)/2)**2/(.1*r)**2}return 1}function As(){return 1}const Ms=(t,e,n=5,r=!0,o=ys,i=[.25,.2,.5,.05])=>{const a=n<0?0:Math.round(n);if(Number.isNaN(t)||Number.isNaN(e)||"number"!=typeof t||"number"!=typeof e||!a)return[];if(e-t<1e-15||1===a)return[t];const s={score:-2,lmin:0,lmax:0,lstep:0};let c=1;for(;c<1/0;){for(let n=0;n<o.length;n+=1){const l=o[n],u=xs(l,o,c);if(i[0]*u+i[1]+i[2]+i[3]<s.score){c=1/0;break}let f=2;for(;f<1/0;){const n=ws(f,a);if(i[0]*u+i[1]+i[2]*n+i[3]<s.score)break;let d=Math.ceil(Math.log10((e-t)/(f+1)/c/l));for(;d<1/0;){const p=c*l*10**d,h=ks(t,e,p*(f-1));if(i[0]*u+i[1]*h+i[2]*n+i[3]<s.score)break;const g=Math.floor(e/p)*c-(f-1)*c,m=Math.ceil(t/p)*c;if(g<=m){const n=m-g;for(let u=0;u<=n;u+=1){const n=(g+u)*(p/c),d=n+p*(f-1),h=p,m=vs(l,o,c,n,d,h),y=js(t,e,n,d),b=Os(f,a,t,e,n,d),v=As(),x=i[0]*m+i[1]*y+i[2]*b+i[3]*v;x>s.score&&(!r||n<=t&&d>=e)&&(s.lmin=n,s.lmax=d,s.lstep=h,s.score=x)}}d+=1}f+=1}}c+=1}const l=ms(s.lmax),u=ms(s.lmin),f=ms(s.lstep),d=Math.floor(function(t){return Math.round(1e12*t)/1e12}((l-u)/f))+1,p=new Array(d);p[0]=ms(u);for(let t=1;t<d;t+=1)p[t]=ms(p[t-1]+f);return p};class _s extends ps{getDefaultOptions(){return{domain:[0,1],range:[.5],nice:!1,tickCount:5,tickMethod:Ms}}constructor(t){super(t)}nice(){const{nice:t}=this.options;if(t){const[t,e,n]=this.getTickMethodOptions();this.options.domain=oi(t,e,n)}}getTicks(){const{tickMethod:t}=this.options,[e,n,r]=this.getTickMethodOptions();return t(e,n,r)}getTickMethodOptions(){const{domain:t,tickCount:e}=this.options;return[t[0],t[t.length-1],e]}rescale(){this.nice();const{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){const[e,n]=super.invert(t),[r,o]=this.options.domain;return void 0===e&&void 0===n?[e,n]:[e||r,n||o]}getThresholds(){return this.thresholds}clone(){return new _s(this.options)}}function Ss(t,e){const n=t.length;if(!n)return;if(n<2)return t[n-1];const r=(n-1)*e,o=Math.floor(r),i=t[o];return i+(t[o+1]-i)*(r-o)}class Es extends ps{getDefaultOptions(){return{domain:[],range:[],tickCount:5,unknown:void 0,tickMethod:Ms}}constructor(t){super(t)}rescale(){const{domain:t,range:e}=this.options;this.n=e.length-1,this.thresholds=function(t,e,n=!1){const r=t;n||r.sort((t,e)=>t-e);const o=[];for(let t=1;t<e;t+=1)o.push(Ss(r,t/e));return o}(t,this.n+1,!1)}invert(t){const[e,n]=super.invert(t),{domain:r}=this.options;return void 0===e&&void 0===n?[e,n]:[e||r[0],n||r[r.length-1]]}getThresholds(){return this.thresholds}clone(){return new Es(this.options)}getTicks(){const{tickCount:t,domain:e,tickMethod:n}=this.options;return n(e[0],e[e.length-1],t)}}var Ps=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};function Ls(t,e,n,r,o){const i=e.thresholds,a=function(t){return e=>({value:e/t,label:String(e),domainValue:e})}(r);return Object.assign(Object.assign({},t),{color:o,data:[n,...i,r].map(a)})}function Cs(t){const{domain:e}=t.getOptions(),[n,r]=[e[0],Ne(e)];return[n,r]}function zs(t,e,n,r,o,i){const{length:a}=t,s=o.color?i.legendContinuous.ribbonFill||"black":i.color,c=e||function(t,e){const n=t.getOptions(),r=t.clone();return r.update(Object.assign(Object.assign({},n),{range:[(0,l.H0)(e).toString()]})),r}(n||r,s),[u,f]=Cs(c),[d,p]=Cs([e,n,r].filter(t=>void 0!==t).find(t=>!(t instanceof st)));return Object.assign(Object.assign({},t),{domain:[d,p],data:c.getTicks().map(t=>({value:t})),color:new Array(Math.floor(a)).fill(0).map((t,e)=>{const n=(f-u)/(a-1)*e+u,o=c.map(n)||s,i=r?r.map(n):1;return o.replace(/rgb[a]*\(([\d]{1,3}) *, *([\d]{1,3}) *, *([\d]{1,3})[\S\s]*\)/,(t,e,n,r)=>`rgba(${e}, ${n}, ${r}, ${i})`)})})}function Ts(t,e,n,r,o,i){const a=Ai(t,"color"),s=function(t,e,n){const{size:r}=e,o=_i(t,e,n);return function(t,e,n){return t.size=e,function(t){return"horizontal"===t||0===t}(n)?t.height=e:t.width=e,t}(o,r,o.orientation)}(n,r,o);if(a instanceof ps){const{range:t}=a.getOptions(),[e,n]=Cs(a);return a instanceof _s||a instanceof Es?Ls(s,a,e,n,t):function(t,e,n){const r=[-1/0,...e.thresholds,1/0].map((t,e)=>({value:e,domainValue:t,label:t}));return Object.assign(Object.assign({},t),{data:r,color:n,labelFilter:(t,e)=>e>0&&e<r.length-1})}(s,a,t)}return zs(s,a,Ai(t,"size"),Ai(t,"opacity"),e,i)}const Bs=t=>{const{labelFormatter:e,layout:n,position:r,title:o,style:i}=t,a=Ps(t,["labelFormatter","layout","order","orientation","position","size","title","style","crossPadding","padding"]);return({scales:s,value:c,theme:l,scale:u})=>{const{bbox:f}=c,{x:d,y:p,width:h,height:g}=f,m=wi(r,n),{legendContinuous:y={}}=l,b=Si(Object.assign({},y,Object.assign(Object.assign(Object.assign({titleText:Oi(o),labelAlign:"value",labelFormatter:"string"==typeof e?t=>(0,ze.GP)(e)(t.label):e},Ts(s,u,c,t,Bs,l)),i),{classNamePrefix:"g2-"}),a)),v=new ji({style:Object.assign(Object.assign({x:d,y:p,width:h,height:g},m),{subOptions:b})});return v.appendChild(new ds({className:"legend-continuous",style:b})),v}};Bs.props={defaultPosition:"top",defaultOrientation:"vertical",defaultOrder:1,defaultSize:60,defaultLength:200,defaultLegendSize:60,defaultPadding:[20,10],defaultCrossPadding:[12,12]};const Is=t=>(...e)=>Bs(Object.assign({},{block:!0},t))(...e);Is.props=Object.assign(Object.assign({},Bs.props),{defaultPosition:"top",defaultOrientation:"horizontal"});const Ns=t=>e=>{const{scales:n}=e,r=Ai(n,"size");return Bs(Object.assign({},{type:"size",data:r.getTicks().map((t,e)=>({value:t,label:String(t)}))},t))(e)};Ns.props=Object.assign(Object.assign({},Bs.props),{defaultPosition:"top",defaultOrientation:"horizontal"});const Rs=t=>Ns(Object.assign({},{block:!0},t));Rs.props=Object.assign(Object.assign({},Bs.props),{defaultPosition:"top",defaultOrientation:"horizontal"});var Fs=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const Ds=({static:t=!1}={})=>e=>{const{width:n,height:r,depth:o,paddingLeft:i,paddingRight:a,paddingTop:s,paddingBottom:c,padding:l,inset:u,insetLeft:f,insetTop:d,insetRight:p,insetBottom:h,margin:g,marginLeft:m,marginBottom:y,marginTop:b,marginRight:v,data:x,coordinate:O,theme:w,component:j,interaction:k,x:A,y:M,z:_,key:S,frame:E,labelTransform:P,parentKey:L,clip:C,viewStyle:z,title:T}=e,B=Fs(e,["width","height","depth","paddingLeft","paddingRight","paddingTop","paddingBottom","padding","inset","insetLeft","insetTop","insetRight","insetBottom","margin","marginLeft","marginBottom","marginTop","marginRight","data","coordinate","theme","component","interaction","x","y","z","key","frame","labelTransform","parentKey","clip","viewStyle","title"]);return[Object.assign(Object.assign({type:"standardView",x:A,y:M,z:_,key:S,width:n,height:r,depth:o,padding:l,paddingLeft:i,paddingRight:a,paddingTop:s,inset:u,insetLeft:f,insetTop:d,insetRight:p,insetBottom:h,paddingBottom:c,theme:w,coordinate:O,component:j,interaction:k,frame:E,labelTransform:P,margin:g,marginLeft:m,marginBottom:y,marginTop:b,marginRight:v,parentKey:L,clip:C,style:z},!t&&{title:T}),{marks:[Object.assign(Object.assign(Object.assign({},B),{key:`${S}-0`,data:x}),t&&{title:T})]})]};Ds.props={};var $s=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};function Ws(t){return(e,...n)=>(0,N.A)({},t(e,...n),e)}function Hs(t){return(e,...n)=>(0,N.A)({},e,t(e,...n))}function qs(t,e){if(!t)return e;if(Array.isArray(t))return t;if(function(t){return!(t instanceof Date)&&"object"==typeof t}(t)){const{value:n=e}=t,r=$s(t,["value"]);return Object.assign(Object.assign({},r),{value:n})}return t}var Ys=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const Xs=()=>t=>{const{children:e}=t,n=Ys(t,["children"]);if(!Array.isArray(e))return[];const{data:r,scale:o={},axis:i={},legend:a={},encode:s={},transform:c=[],slider:l={}}=n,u=Ys(n,["data","scale","axis","legend","encode","transform","slider"]),f=e.map(t=>{var{data:e,scale:n={},axis:u={},legend:f={},encode:d={},transform:p=[],slider:h={}}=t,g=Ys(t,["data","scale","axis","legend","encode","transform","slider"]);return Object.assign({data:qs(e,r),scale:(0,N.A)({},o,n),encode:(0,N.A)({},s,d),transform:[...c,...p],axis:!(!u||!i)&&(0,N.A)({},i,u),legend:!(!f||!a)&&(0,N.A)({},a,f),slider:(0,N.A)({},l,h)},g)});return[Object.assign(Object.assign({},u),{marks:f,type:"standardView",slider:l})]};function Gs([t,e],[n,r]){return[t-n,e-r]}function Vs([t,e],[n,r]){return[t+n,e+r]}function Ks([t,e],[n,r]){return Math.sqrt(Math.pow(t-n,2)+Math.pow(e-r,2))}function Us([t,e]){return Math.atan2(e,t)}function Zs([t,e]){return Us([t,e])+Math.PI/2}function Js(t,e){const n=Us(t),r=Us(e);return n<r?r-n:2*Math.PI-(n-r)}function Qs(t){let e=1/0,n=-1/0,r=1/0,o=-1/0;for(const[i,a]of t)e=Math.min(i,e),n=Math.max(i,n),r=Math.min(a,r),o=Math.max(a,o);return[e,r,n-e,o-r]}function tc([t,e],[n,r]){return[(t+n)/2,(e+r)/2]}function ec(t,e){for(const[n,r]of Object.entries(e))t.style(n,r)}function nc(t,e,n,r,o){const i=Us(Gs(r,e))+Math.PI,a=Us(Gs(r,n))+Math.PI;return t.arc(r[0],r[1],o,i,a,a-i<0),t}function rc(t,e,n,r="y",o="between",i=!1){const a="y"===r||!0===r?n:e,s=((t,e)=>"y"===t||!0===t?e?180:90:e?90:0)(r,i),c=Be(a),[l,u]=pi(c,t=>a[t]),f=new li({domain:[l,u],range:[0,100]}),d=t=>(0,tt.A)(a[t])&&!Number.isNaN(a[t])?f.map(a[t]):0,p={between:e=>`${t[e]} ${d(e)}%`,start:e=>0===e?`${t[e]} ${d(e)}%`:`${t[e-1]} ${d(e)}%, ${t[e]} ${d(e)}%`,end:e=>e===t.length-1?`${t[e]} ${d(e)}%`:`${t[e]} ${d(e)}%, ${t[e+1]} ${d(e)}%`},h=c.sort((t,e)=>d(t)-d(e)).map(p[o]||p.between).join(",");return`linear-gradient(${s}deg, ${h})`}function oc(t){const[e,n,r,o]=t;return[o,e,n,r]}function ic(t,e,n){const[r,o,,i]=nn(t)?oc(e):e,[a,s]=n,c=t.getCenter(),l=Zs(Gs(r,c)),u=Zs(Gs(o,c)),f=u===l&&a!==s?u+2*Math.PI:u,d=1e-4;return{startAngle:l+d,endAngle:(f-l>=0?f:2*Math.PI+f)-d,innerRadius:Ks(i,c),outerRadius:Ks(r,c)}}function ac(t){const{colorAttribute:e,opacityAttribute:n=e}=t;return`${n}Opacity`}function sc(t,e){if(!rn(t))return"";const n=t.getCenter(),{transform:r}=e;return`translate(${n[0]}, ${n[1]}) ${r||""}`}function cc(t){if(1===t.length)return t[0];const[[e,n,r=0],[o,i,a=0]]=t;return[(e+o)/2,(n+i)/2,(r+a)/2]}function lc(t){return t.replace(/-(\w)/g,function(t,e){return e.toUpperCase()})}Xs.props={};var uc=n("./node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/line.js");function fc(t){const e="function"==typeof t?t:t.render;return class extends l.K9{connectedCallback(){this.draw()}attributeChangedCallback(){this.draw()}draw(){e(this)}}}var dc=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};function pc(t){const{min:[e,n],max:[r,o]}=t.getLocalBounds();let i=0,a=0;return e>0&&(i=e),r<0&&(i=r),n>0&&(a=n),o<0&&(a=o),[i,a]}const hc=fc(t=>{const e=t.attributes,{className:n,labelTransform:r,labelTransformOrigin:o,x:i,y:a,x0:s=i,y0:c=a,text:l,background:u,connector:f,startMarker:d,endMarker:p,coordCenter:h,innerHTML:g}=e,m=dc(e,["className","class","transform","rotate","labelTransform","labelTransformOrigin","x","y","x0","y0","text","background","connector","startMarker","endMarker","coordCenter","innerHTML"]);if(t.style.transform=`translate(${i}, ${a})`,[i,a,s,c].some(t=>!(0,tt.A)(t)))return void t.children.forEach(t=>t.remove());const y=xt(m,"background"),{padding:b}=y,v=dc(y,["padding"]),x=xt(m,"connector"),{points:O=[]}=x,w=dc(x,["points"]);let j;j=g?_t(t).maybeAppend("html","html",n).style("zIndex",0).style("innerHTML",g).call(ec,Object.assign({transform:r,transformOrigin:o},m)).node():_t(t).maybeAppend("text","text").style("zIndex",0).style("text",l).call(ec,Object.assign({textBaseline:"middle",transform:r,transformOrigin:o},m)).node();const k=_t(t).maybeAppend("background","rect").style("zIndex",-1).call(ec,function(t,e=[]){const[n=0,r=0,o=n,i=r]=e,a=t.parentNode,s=a.getEulerAngles();a.setEulerAngles(0);const{min:c,halfExtents:l}=t.getLocalBounds(),[u,f]=c,[d,p]=l;return a.setEulerAngles(s),{x:u-i,y:f-n,width:2*d+i+r,height:2*p+n+o}}(j,b)).call(ec,u?v:{}).node(),A=function(t,e,n,r,o=!0,i=!0){const a=t=>(0,uc.A)()(t);if(!e[0]&&!e[1])return a([pc(t),e]);if(!n.length)return a([[0,0],e]);const[s,c]=n,l=[...c],u=[...s];if(c[0]!==s[0]){const t=o?-4:4;l[1]=c[1],i&&!o&&(l[0]=Math.max(s[0],c[0]-t),c[1]<s[1]?u[1]=l[1]:(u[1]=s[1],u[0]=Math.max(u[0],l[0]-t))),i||o||(l[0]=Math.max(s[0],c[0]-t),c[1]>s[1]?u[1]=l[1]:(u[1]=s[1],u[0]=Math.max(u[0],l[0]-t))),!i&&o&&(l[0]=Math.min(s[0],c[0]-t),c[1]>s[1]?u[1]=l[1]:(u[1]=s[1],u[0]=Math.min(u[0],l[0]-t))),i&&o&&(l[0]=Math.min(s[0],c[0]-t),c[1]<s[1]?u[1]=l[1]:(u[1]=s[1],u[0]=Math.min(u[0],l[0]-t)))}return a([c,l,u,s,e])}(k,[+s-+i,+c-+a],O,0,+s<h[0],+c<h[1]),M=d&&new Ka({id:"startMarker",style:Object.assign({x:0,y:0},xt(m,"startMarker"))}),_=p&&new Ka({id:"endMarker",style:Object.assign({x:0,y:0},xt(m,"endMarker"))});_t(t).maybeAppend("connector","path").style("zIndex",0).style("d",A).style("markerStart",M).style("markerEnd",_).call(ec,f?w:{})});function gc(t,e){let n,r=-1,o=-1;if(void 0===e)for(const e of t)++o,null!=e&&(n<e||void 0===n&&e>=e)&&(n=e,r=o);else for(let i of t)null!=(i=e(i,++o,t))&&(n<i||void 0===n&&i>=i)&&(n=i,r=o);return r}function mc(t,e,n,r){const o=e.length/2,i=e.slice(0,o),a=e.slice(o);let s=gc(i,(t,e)=>Math.abs(t[1]-a[e][1]));s=Math.max(Math.min(s,o-2),1);const c=t=>[i[t][0],(i[t][1]+a[t][1])/2],l=c(s),u=c(s-1),f=Us(Gs(c(s+1),u))/Math.PI*180;return{x:l[0],y:l[1],transform:`rotate(${f})`,textAlign:"center",textBaseline:"middle"}}function yc(t,e,n,r){const{bounds:o}=n,[[i,a],[s,c]]=o,l=s-i,u=c-a,f=t=>{const{x:e,y:r}=t,o=jt(n.x,l),s=jt(n.y,u);return Object.assign(Object.assign({},t),{x:(o||e)+i,y:(s||r)+a})};return f("left"===t?{x:0,y:u/2,textAlign:"start",textBaseline:"middle"}:"right"===t?{x:l,y:u/2,textAlign:"end",textBaseline:"middle"}:"top"===t?{x:l/2,y:0,textAlign:"center",textBaseline:"top"}:"bottom"===t?{x:l/2,y:u,textAlign:"center",textBaseline:"bottom"}:"top-left"===t?{x:0,y:0,textAlign:"start",textBaseline:"top"}:"top-right"===t?{x:l,y:0,textAlign:"end",textBaseline:"top"}:"bottom-left"===t?{x:0,y:u,textAlign:"start",textBaseline:"bottom"}:"bottom-right"===t?{x:l,y:u,textAlign:"end",textBaseline:"bottom"}:{x:l/2,y:u/2,textAlign:"center",textBaseline:"middle"})}function bc(t,e,n,r){const{y:o,y1:i,autoRotate:a,rotateToAlignArc:s}=n,c=r.getCenter(),l=ic(r,e,[o,i]),{innerRadius:u,outerRadius:f,startAngle:d,endAngle:p}=l,h="inside"===t?(d+p)/2:p,g=xc(h,a,s),m=(()=>{const[n,r]=e,o=u+.5*(f-u),[i,a]="inside"===t?vc(c,h,o):tc(n,r);return{x:i,y:a}})();return Object.assign(Object.assign({},m),{textAlign:"inside"===t?"center":"start",textBaseline:"middle",rotate:g})}function vc(t,e,n){return[t[0]+Math.sin(e)*n,t[1]-Math.cos(e)*n]}function xc(t,e,n){if(!e)return 0;const r=n?0:Math.sin(t)<0?90:-90;return t/Math.PI*180+r}function Oc(t,e,n,r){const{y:o,y1:i,autoRotate:a,rotateToAlignArc:s,radius:c=.5,offset:l=0}=n,u=ic(r,e,[o,i]),{startAngle:f,endAngle:d}=u,p=r.getCenter(),h=(f+d)/2,g={textAlign:"center",textBaseline:"middle",rotate:xc(h,a,s)},{innerRadius:m,outerRadius:y}=u,b=m+(y-m)*c+l,[v,x]=vc(p,h,b);return Object.assign({x:v,y:x},g)}function wc(t){return void 0===t?null:t}function jc(t,e,n,r){const{bounds:o}=n,[i]=o;return{x:wc(i[0]),y:wc(i[1])}}function kc(t,e,n,r){const{bounds:o}=n;if(1===o.length)return jc(0,0,n);return(on(r)?bc:ln(r)?Oc:yc)(t,e,n,r)}function Ac(t,e,n){const r=ic(n,t,[e.y,e.y1]),{innerRadius:o,outerRadius:i}=r;return o+(i-o)}function Mc(t,e,n){const r=ic(n,t,[e.y,e.y1]),{startAngle:o,endAngle:i}=r;return(o+i)/2}function _c(t,e,n,r){const{autoRotate:o,rotateToAlignArc:i,offset:a=0,connector:s=!0,connectorLength:c=a,connectorLength2:l=0,connectorDistance:u=0}=n,f=r.getCenter(),d=Mc(e,n,r),p=Math.sin(d)>0?1:-1,h=xc(d,o,i),g={textAlign:p>0||on(r)?"start":"end",textBaseline:"middle",rotate:h},m=Ac(e,n,r),y=m+(s?c:a),[[b,v],[x,O],[w,j]]=function(t,e,n,r,o){const[i,a]=vc(t,e,n),[s,c]=vc(t,e,r);return[[i,a],[s,c],[s+(Math.sin(e)>0?1:-1)*o,c]]}(f,d,m,y,s?l:0),k=s?+u*p:0,A=w+k,M={connector:s,connectorPoints:[[x-A,O-j],[w-A,j-j]]};return Object.assign(Object.assign({x0:b,y0:v,x:w+k,y:j},g),M)}function Sc(t,e,n,r){const{bounds:o}=n;if(1===o.length)return jc(0,0,n);return(on(r)?bc:ln(r)?_c:yc)(t,e,n,r)}var Ec=n("./node_modules/.pnpm/d3-array@3.2.4/node_modules/d3-array/src/ascending.js");function Pc(t,...e){if("function"!=typeof t[Symbol.iterator])throw new TypeError("values is not iterable");t=Array.from(t);let[n]=e;if(n&&2!==n.length||e.length>1){const r=Uint32Array.from(t,(t,e)=>e);return e.length>1?(e=e.map(e=>t.map(e)),r.sort((t,n)=>{for(const r of e){const e=Cc(r[t],r[n]);if(e)return e}})):(n=t.map(n),r.sort((t,e)=>Cc(n[t],n[e]))),function(t,e){return Array.from(e,e=>t[e])}(t,r)}return t.sort(Lc(n))}function Lc(t=Ec.A){if(t===Ec.A)return Cc;if("function"!=typeof t)throw new TypeError("compare is not a function");return(e,n)=>{const r=t(e,n);return r||0===r?r:(0===t(n,n))-(0===t(e,e))}}function Cc(t,e){return(null==t||!(t>=t))-(null==e||!(e>=e))||(t<e?-1:t>e?1:0)}function zc(t,e={}){const{labelHeight:n=14,height:r}=e,o=Pc(t,t=>t.y),i=o.length,a=new Array(i);for(let t=0;t<i;t++){const e=o[t],{y:r}=e;a[t]={y:r,y1:r+n,labels:[r]}}let s=!0;for(;s;){s=!1;for(let t=a.length-1;t>0;t--){const e=a[t],n=a[t-1];if(n.y1>e.y){s=!0,n.labels.push(...e.labels),a.splice(t,1),n.y1+=e.y1-e.y;const o=n.y1-n.y;n.y1=Math.max(Math.min(n.y1,r),o),n.y=n.y1-o}}}let c=0;for(const t of a){const{y:e,labels:r}=t;let i=e-n;for(const t of r){const e=o[c++];e.connectorPoints[0][1]-=i+n-t,e.y=i+n,i+=n}}}function Tc(t,e){const n=Pc(t,t=>t.y),{height:r,labelHeight:o=14}=e,i=Math.ceil(r/o);if(n.length<=i)return zc(n,e);const a=[];for(let t=0;t<n.length;t++)t<n.length-i?(n[t].opacity=0,n[t].connector=!1):a.push(n[t]);zc(a,e)}var Bc=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const Ic=new WeakMap;function Nc(t,e,n,r,o,i){if(!ln(r))return{};if(Ic.has(e))return Ic.get(e);const a=i.map(t=>function(t,e,n){const{connectorLength:r,connectorLength2:o,connectorDistance:i}=e,a=Bc(_c(0,t,e,n),[]),s=n.getCenter(),c=Ac(t,e,n),l=Mc(t,e,n),u=c+r+o,f=Math.sin(l)>0?1:-1,d=s[0]+(u+ +i)*f,{x:p}=a,h=d-p;return a.x+=h,a.connectorPoints[0][0]-=h,a}(t,n,r)),{width:s,height:c}=r.getOptions(),l=a.filter(t=>t.x<s/2),u=a.filter(t=>t.x>=s/2),f=Object.assign(Object.assign({},o),{height:c});return Tc(l,f),Tc(u,f),a.forEach((t,e)=>Ic.set(i[e],t)),Ic.get(e)}var Rc=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};function Fc(t,e,n,r){if(!ln(r))return{};const{connectorLength:o,connectorLength2:i,connectorDistance:a}=n,s=Rc(_c(0,e,n,r),[]),{x0:c,y0:l}=s,u=r.getCenter(),f=function(t){if(ln(t)){const[e,n]=t.getSize(),r=t.getOptions().transformations.find(t=>"polar"===t[0]);if(r)return Math.max(e,n)/2*r[4]}return 0}(r),d=f+o,p=Zs([c-u[0],l-u[1]]),h=Math.sin(p)>0?1:-1,[g,m]=vc(u,p,d);return s.x=g+(i+a)*h,s.y=m,s}var Dc=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};function $c(t,e,n,o,i,a){const{position:s}=e,{render:c}=i,l=function(t,e){return void 0!==t?t:ln(e)?"inside":nn(e)?"right":"top"}(s,n),u=o[c?"htmlLabel":"inside"===l?"innerLabel":"label"],f=Object.assign({},u,e),d=r[lc(l)];if(!d)throw new Error(`Unknown position: ${l}`);return Object.assign(Object.assign({},u),d(l,t,f,n,i,a))}const Wc=(t,e)=>{const{coordinate:n,theme:r}=e,{render:o}=t;return(e,i,a,s)=>{const{text:c,transform:l="",transformOrigin:u,className:f=""}=i,d=Dc(i,["text","x","y","transform","transformOrigin","className"]),p=$c(e,i,n,r,t,s),{rotate:h=0,transform:g=""}=p,m=Dc(p,["rotate","transform"]);return _t(new hc).call(ec,m).style("text",`${c}`).style("className",`${f} g2-label`).style("innerHTML",o?o(c,i.datum,i.index):void 0).style("labelTransform",`${g} rotate(${+h}) ${l}`.trim()).style("labelTransformOrigin",u).style("coordCenter",n.getCenter()).call(ec,d).node()}};Wc.props={defaultMarker:"point"};const Hc=function(t,e,n){var r=t,o=(0,j.A)(e)?e.split("."):e;return o.forEach(function(t,e){e<o.length-1?((0,ke.A)(r[t])||(r[t]=(0,tt.A)(o[e+1])?[]:{}),r=r[t]):r[t]=n}),t},qc="main-layer",Yc="label-layer",Xc="element",Gc="component",Vc="axis-breaks",Kc="axis-breaks-group";var Uc=function(t,e,n,r){return new(n||(n=Promise))(function(o,i){function a(t){try{c(r.next(t))}catch(t){i(t)}}function s(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){t.done?o(t.value):function(t){return t instanceof n?t:new n(function(e){e(t)})}(t.value).then(a,s)}c((r=r.apply(t,e||[])).next())})},Zc=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const Jc=.03,Qc={fill:"#fff",stroke:"#aaa",lineDash:"4 3",lineWidth:.5,fillOpacity:1,strokeOpacity:1},tl=(t,e,n,r,o,i)=>{const a=[],s=[],c=r-1;for(let r=1;r<c;r++){const l=r/c*e,u=t+(r%2==0?n:-n);a.push(`${l},${u}`),s.push(`${l},${o?u-i:u+i}`)}return a.push(`${e},${t}`),s.push(`${e+i},${t}`),[a,s]},el=(t,e)=>{const{context:n,selection:r,view:o}=e,i=r.select(".plot").node(),{document:a}=n.canvas,{scale:s}=o,c=new Map;return t=>{const{key:e,start:r,end:o,gap:u=Jc,vertices:f=50,lineWidth:d=.5,verticeOffset:p=3}=t,h=Zc(t,["key","start","end","gap","vertices","lineWidth","verticeOffset"]),g=a.createElement("g",{id:`break-group-${e}`,className:Kc}),m=k(s,"x.sortedDomain",[]),y=s.y.getOptions(),{range:b,domain:v}=y,x=v.indexOf(r),O=v.indexOf(o),{width:w,height:j}=i.getBBox();if(-1===x||-1===O||!m.length)return g;const A=b[0]>b[1],M=b[x]*j,_=b[O]*j;let S="",E="";for(const[t,{y:e,isLower:n}]of[{y:_,isLower:!1},{y:M,isLower:!0}].entries()){const r=A?d:-d,[o,i]=tl(e,w-0,p,f,n,r);0===t?(S=`M 0,${e} L ${o.join(" L ")} `,E=`M ${0-d},${e+r} L ${i.join(" L ")} `):(S+=`L ${w-0},${e} L ${[...o].reverse().join(" L ")} L 0,${e} Z`,E+=`L ${w-0+d+2},${e-r} L ${[...i].reverse().join(" L ")} L ${0-d},${e-r} Z`)}const P=Object.assign(Object.assign({},Qc),h);try{const t=new l.wA({style:Object.assign(Object.assign({},P),{d:S})}),a=new l.wA({style:Object.assign(Object.assign({},P),{d:E,lineWidth:0,cursor:"pointer"})});a.addEventListener("click",t=>Uc(void 0,void 0,void 0,function*(){t.stopPropagation(),2===t.detail&&(yield((t,e,r)=>Uc(void 0,void 0,void 0,function*(){const{update:o,setState:i}=n.externals;i("options",n=>{const{marks:o}=n;if(!o||!o.length)return n;const i=o.map(t=>{const n=k(t,"scale.y.breaks",[]),o=n.filter(t=>t.start!==e&&t.end!==r&&!t.collapsed);return n.forEach(t=>{t.start===e&&t.end===r&&(t.collapsed=!0)}),console.log("breaks group:",n,o),(0,N.A)({},t,{scale:{y:{breaks:o}}})});return c.set(t,{start:e,end:r}),Object.assign(Object.assign({},n),{marks:i})}),yield o()}))(e,r,o))})),g.appendChild(t),g.appendChild(a),i.addEventListener("click",t=>Uc(void 0,void 0,void 0,function*(){2===t.detail&&(yield Uc(void 0,void 0,void 0,function*(){if(!c.size)return;const{update:t,setState:e}=n.externals;e("options",t=>{const{marks:e}=t,n=e.map(t=>{const e=k(t,"scale.y.breaks",[]);return Hc(t,"scale.y.breaks",e.map(t=>Object.assign(Object.assign({},t),{collapsed:!1}))),t});return c.clear(),Object.assign(Object.assign({},t),{marks:n})}),yield t()}))})),i.appendChild(g)}catch(t){console.error("Failed to create break path:",t)}return g}};el.props={};var nl=n("./node_modules/.pnpm/d3-path@3.1.0/node_modules/d3-path/src/path.js"),rl=n("./node_modules/.pnpm/d3-array@3.2.4/node_modules/d3-array/src/bisector.js");const ol=function(t,e){if(!$e(t))return t;for(var n=[],r=0;r<t.length;r++){var o=t[r];e(o,r)&&n.push(o)}return n};var il=n("./node_modules/.pnpm/d3-array@3.2.4/node_modules/d3-array/src/bisect.js");function al(t){return!!t.getBandWidth}function sl(t,e,n){if(!al(t))return t.invert(e);const{adjustedRange:r}=t;if(r.includes(e))return t.invert(e);const{domain:o}=t.getOptions(),i=n?-1:0,a=t.getStep(),s=n?r:r.map(t=>t+a),c=function(t,e,n){return Math.min(n,Math.max(e,t))}((0,il.ah)(s,e)+i,0,o.length-1);return o[c]}function cl(t,e,n){if(!e)return t.getOptions().domain;if(!al(t)){const r=Pc(e);if(!n)return r;const[o]=r,{range:i}=t.getOptions(),[a,s]=i,c=a>s?-1:1;return[o,t.invert(t.map(o)+c*n)]}const{domain:r}=t.getOptions(),o=r.indexOf(e[0]);if(n){const t=o+Math.round(r.length*n);return r.slice(o,t)}const i=r.indexOf(e[e.length-1]);return r.slice(o,i+1)}function ll(t,e,n,r,o,i){const{x:a,y:s}=o,c=(t,e)=>{const[n,r]=i.invert(t);return[sl(a,n,e),sl(s,r,e)]},l=c([t,e],!0),u=c([n,r],!1);return[cl(a,[l[0],u[0]]),cl(s,[l[1],u[1]])]}function ul(t,e){const[n,r]=t;return[e.map(n),e.map(r)+(t=>t.getStep?t.getStep():0)(e)]}const fl=(t,e)=>{var n,r;const[o,i]=t,a=(null===(r=null===(n=e.getOptions)||void 0===n?void 0:n.call(e))||void 0===r?void 0:r.domain)||[],s=a.indexOf(o),c=a.indexOf(i);if(-1===s||-1===c)return[e.map(o),e.map(i)];const l=a.length;return l<=1?[0,1]:[s/(l-1),c/(l-1)]};var dl=n("./node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/arc.js"),pl=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};function hl(t,e,n,r,o={}){const{inset:i=0,radius:a=0,insetLeft:s=i,insetTop:c=i,insetRight:l=i,insetBottom:u=i,radiusBottomLeft:f=a,radiusBottomRight:d=a,radiusTopLeft:p=a,radiusTopRight:h=a,minWidth:g=-1/0,maxWidth:m=1/0,minHeight:y=-1/0}=o,b=pl(o,["inset","radius","insetLeft","insetTop","insetRight","insetBottom","radiusBottomLeft","radiusBottomRight","radiusTopLeft","radiusTopRight","minWidth","maxWidth","minHeight"]);if(!rn(r)&&!an(r)){const n=!!nn(r),[o,,i]=n?oc(e):e,[a,v]=o,[x,O]=Gs(i,o),w=(x>0?a:a+x)+s,j=(O>0?v:v+O)+c,k=Math.abs(x)-(s+l),A=Math.abs(O)-(c+u),M=n?Ue(k,y,1/0):Ue(k,g,m),_=n?Ue(A,g,m):Ue(A,y,1/0),S=n?w:w-(M-k)/2,E=n?j-(_-A)/2:j-(_-A);return _t(t.createElement("rect",{})).style("x",S).style("y",E).style("width",M).style("height",_).style("radius",[p,h,d,f]).call(ec,b).node()}const{y:v,y1:x}=n,O=r.getCenter(),w=ic(r,e,[v,x]),j=(0,dl.A)().cornerRadius(a).padAngle(i*Math.PI/180);return _t(t.createElement("path",{})).style("d",j(w)).style("transform",`translate(${O[0]}, ${O[1]})`).style("radius",a).style("inset",i).call(ec,b).node()}const gl=(t,e)=>{const{colorAttribute:n,opacityAttribute:r="fill",first:o=!0,last:i=!0}=t,a=pl(t,["colorAttribute","opacityAttribute","first","last"]),{coordinate:s,document:c}=e;return(e,r,l)=>{const{color:u,radius:f=0}=l,d=pl(l,["color","radius"]),p=d.lineWidth||1,{stroke:h,radius:g=f,radiusTopLeft:m=g,radiusTopRight:y=g,radiusBottomRight:b=g,radiusBottomLeft:v=g,innerRadius:x=0,innerRadiusTopLeft:O=x,innerRadiusTopRight:w=x,innerRadiusBottomRight:j=x,innerRadiusBottomLeft:k=x,lineWidth:A=("stroke"===n||h?p:0),inset:M=0,insetLeft:_=M,insetRight:S=M,insetBottom:E=M,insetTop:P=M,minWidth:L,maxWidth:C,minHeight:z}=a,T=pl(a,["stroke","radius","radiusTopLeft","radiusTopRight","radiusBottomRight","radiusBottomLeft","innerRadius","innerRadiusTopLeft","innerRadiusTopRight","innerRadiusBottomRight","innerRadiusBottomLeft","lineWidth","inset","insetLeft","insetRight","insetBottom","insetTop","minWidth","maxWidth","minHeight"]),{color:B=u,opacity:I}=r,N=[o?m:O,o?y:w,i?b:j,i?v:k],R=["radiusTopLeft","radiusTopRight","radiusBottomRight","radiusBottomLeft"];nn(s)&&R.push(R.shift());const F=Object.assign(Object.assign({radius:g},Object.fromEntries(R.map((t,e)=>[t,N[e]]))),{inset:M,insetLeft:_,insetRight:S,insetBottom:E,insetTop:P,minWidth:L,maxWidth:C,minHeight:z});return _t(hl(c,e,r,s,F)).call(ec,d).style("fill","transparent").style(n,B).style(ac(t),I).style("lineWidth",A).style("stroke",void 0===h?B:h).call(ec,T).node()}};function ml(t,e){if(e(t))return!0;if("g"===t.tagName){const{childNodes:n=[]}=t;for(const t of n)if(ml(t,e))return!0}return!1}gl.props={defaultEnterAnimation:"scaleInY",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const yl={visibility:"visible",opacity:1,fillOpacity:1,strokeOpacity:1};function bl(t,e){let n;return ml(t,t=>{var r;return"g"!==t.tagName&&void 0!==(null===(r=t.style)||void 0===r?void 0:r[e])&&(n=t.style[e],!0)}),null!=n?n:yl[e]}function vl(t,e,n,r){t.style[e]=n,r&&t.children.forEach(t=>vl(t,e,n,r))}function xl(t){vl(t,"visibility","hidden",!0)}function Ol(t){vl(t,"visibility","visible",!0)}var wl=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};function jl(t){return _t(t).selectAll(`.${Xc}`).nodes().filter(t=>!t.__removed__)}function kl(t,e){return Al(t,e).flatMap(({container:t})=>jl(t))}function Al(t,e){return e.filter(e=>e!==t&&e.options.parentKey===t.options.key)}function Ml(t){return _t(t).select(".plot").node()}function _l(t){if("g"===t.tagName)return t.getRenderBounds();const e=t.getGeometryBounds(),n=new l.F5;return n.setFromTransformedAABB(e,t.getWorldTransform()),n}function Sl(t,e){const{offsetX:n,offsetY:r}=e,o=_l(t),{min:[i,a],max:[s,c]}=o;return n<i||n>s||(r<a||r>c)?null:[n-i,r-a]}function El(t,e){const{offsetX:n,offsetY:r}=e,[o,i,a,s]=function(t){const e=t.getRenderBounds(),{min:[n,r],max:[o,i]}=e;return[n,r,o,i]}(t);return[Math.min(a,Math.max(o,n))-o,Math.min(s,Math.max(i,r))-i]}function Pl(t){return t=>t.__data__.color}function Ll(t){return t=>t.__data__.x}function Cl(t){const e=Array.isArray(t)?t:[t],n=new Map(e.flatMap(t=>Array.from(t.markState.keys()).map(e=>[Rl(t.key,e.key),e.data])));return t=>{const{index:e,markKey:r,viewKey:o}=t.__data__;return n.get(Rl(o,r))[e]}}const zl={selected:3,unselected:3,active:2,inactive:2,default:1},Tl={selection:["selected","unselected"],highlight:["active","inactive"]},Bl=(t,e,n)=>{ml(t,t=>{"setAttribute"in t&&"function"==typeof t.setAttribute&&t.setAttribute(e,n)})};function Il(t,e){return e.forEach(e=>{const n=e.__interactionStyle__;e.__interactionStyle__=n?Object.assign(Object.assign({},n),t):t}),(t=(t,e)=>t,e=Bl)=>Nl(void 0,t,e)}function Nl(t,e=(t,e)=>t,n=Bl){const r="__states__",o="__ordinal__",i=t=>zl[t]||zl.default,a=t=>{var e;return null===(e=Object.entries(Tl).find(([e,n])=>n.includes(t)))||void 0===e?void 0:e[0]},s=a=>{var s;const{[r]:c=[],[o]:l={}}=a,u=[...c].sort((t,e)=>i(e)-i(t)),f=new Map;for(const e of u){const n=(null===(s=null!=t?t:a.__interactionStyle__)||void 0===s?void 0:s[e])||{};for(const[t,e]of Object.entries(n))f.has(t)||f.set(t,e)}const d=Object.assign({},l);for(const[t,e]of f.entries())d[t]=e;if(0!==Object.keys(d).length){for(const[t,r]of Object.entries(d)){const o=bl(a,t),i=e(r,a);n(a,t,i),t in l||(l[t]=o)}a[o]=l}},c=t=>{t[r]||(t[r]=[])};return{setState:(t,...e)=>{c(t),t[r]=[...e],s(t)},updateState:(t,...e)=>{c(t);const n=t[r],o=new Set(e.map(t=>a(t)).filter(t=>void 0!==t)),i=n.filter(t=>!o.has(a(t)));t[r]=[...i,...e],s(t)},removeState:(t,...e)=>{c(t);for(const n of e){const e=t[r].indexOf(n);-1!==e&&t[r].splice(e,1)}s(t)},hasState:(t,e)=>(c(t),-1!==t[r].indexOf(e))}}function Rl(t,e){return`${t},${e}`}function Fl(t,e){const n=(Array.isArray(t)?t:[t]).flatMap(t=>t.marks.map(e=>[Rl(t.key,e.key),e.state])),r={};for(const t of e){const[e,o]=Array.isArray(t)?t:[t,{}];r[e]=n.reduce((t,n)=>{const[r,i={}]=n,a=void 0===(s=i[e])||"object"==typeof s&&0===Object.keys(s).length?o:i[e];var s;for(const[e,n]of Object.entries(a)){const o=t[e],i=(t,e,i,a)=>{const s=Rl(a.__data__.viewKey,a.__data__.markKey);return r!==s?null==o?void 0:o(t,e,i,a):"function"!=typeof n?n:n(t,e,i,a)};t[e]=i}return t},{})}return r}function Dl(t,e){const n=new Map(t.map((t,e)=>[t,e])),r=e?t.map(e):t;return(t,o)=>{if("function"!=typeof t)return t;const i=n.get(o);return t(e?e(o):o,i,r,o)}}function $l(t){var{link:e=!1,valueof:n=(t,e)=>t}=t,r=wl(t,["link","valueof","coordinate"]);if(!e)return[()=>{},()=>{}];const o=t=>t.__data__.points,i=(t,e)=>{const[,n,r]=t,[o,,,i]=e;return[n,o,i,r]};return[t=>{var e;if(t.length<=1)return;const a=Pc(t,(t,e)=>{const{x:n}=t.__data__,{x:r}=e.__data__;return n-r});for(let t=1;t<a.length;t++){const s=(0,nl.Ae)(),c=a[t-1],u=a[t],[f,d,p,h]=i(o(c),o(u));s.moveTo(...f),s.lineTo(...d),s.lineTo(...p),s.lineTo(...h),s.closePath();const g=Te(r,t=>n(t,c)),{fill:m=c.getAttribute("fill")}=g,y=wl(g,["fill"]),b=new l.wA({className:"element-link",style:Object.assign({d:s.toString(),fill:m,zIndex:-2},y)});null===(e=c.link)||void 0===e||e.remove(),c.parentNode.appendChild(b),c.link=b}},t=>{var e;null===(e=t.link)||void 0===e||e.remove(),t.link=null}]}function Wl(t,e,n){const r=e=>{const{transform:n}=t.style;return n?`${n} ${e}`:e};if(rn(n)){const{points:o}=t.__data__,[i,a]=nn(n)?oc(o):o,s=n.getCenter(),c=Gs(i,s),l=Gs(a,s),u=Us(c)+Js(c,l)/2;return r(`translate(${e*Math.cos(u)}, ${e*Math.sin(u)})`)}return nn(n)?r(`translate(${e}, 0)`):r(`translate(0, ${-e})`)}function Hl(t){var{document:e,background:n,scale:r,coordinate:o,valueof:i}=t,a=wl(t,["document","background","scale","coordinate","valueof"]);const s="element-background";if(!n)return[()=>{},()=>{}];const c=(t,e,n)=>{const r=t.invert(e),o=e+t.getBandWidth(r)/2,i=t.getStep(r)/2,a=i*n;return[o-i+a,o+i-a]},l=(t,n)=>{const{padding:i}=n,[a,s]=((t,e)=>{const{x:n}=r;if(!al(n))return[0,1];const{__data__:o}=t,{x:i}=o,[a,s]=c(n,i,e);return[a,s]})(t,i),[l,u]=((t,e)=>{const{y:n}=r;if(!al(n))return[0,1];const{__data__:o}=t,{y:i}=o,[a,s]=c(n,i,e);return[a,s]})(t,i),f=[[a,l],[s,l],[s,u],[a,u]].map(t=>o.map(t)),{__data__:d}=t,{y:p,y1:h}=d;return hl(e,f,{y:p,y1:h},o,n)},u=(t,e)=>{const{transform:n="scale(1.2, 1.2)",transformOrigin:r="center center",stroke:o=""}=e,i=wl(e,["transform","transformOrigin","stroke"]),a=Object.assign({transform:n,transformOrigin:r,stroke:o},i),s=t.cloneNode(!0);for(const[t,e]of Object.entries(a))s.style[t]=e;return s};return[t=>{t.background&&t.background.remove();const e=Te(a,e=>i(e,t)),{fill:n="#CCD6EC",fillOpacity:o=.3,zIndex:c=-2,padding:f=.001,lineWidth:d=0}=e,p=wl(e,["fill","fillOpacity","zIndex","padding","lineWidth"]),h=Object.assign(Object.assign({},p),{fill:n,fillOpacity:o,zIndex:c,padding:f,lineWidth:d}),g=(()=>{const{x:t,y:e}=r;return[t,e].some(al)})()?l:u,m=g(t,h);m.className=s,t.parentNode.parentNode.appendChild(m),t.background=m},t=>{var e;null===(e=t.background)||void 0===e||e.remove(),t.background=null},t=>t.className===s]}function ql(t,e){const n=t.getRootNode().defaultView.getContextService().getDomElement();(null==n?void 0:n.style)&&(t.cursor=n.style.cursor,n.style.cursor=e)}function Yl(t){ql(t,t.cursor)}function Xl(t,e,n){return t.find(t=>Object.entries(e).every(([e,r])=>n(t)[e]===r))}function Gl(t,e){return Math.sqrt(Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2))}function Vl(t,e=!1){const n=ol(t,t=>!!t).map((t,e)=>[0===e?"M":"L",...t]);return e&&n.push(["Z"]),n}function Kl(t){return t.querySelectorAll(".element")}function Ul(t,e){if(e(t))return t;let n=t.parent;for(;n&&!e(n);)n=n.parent;return n}const Zl=["interval","point","density"];function Jl({elementsof:t,root:e,coordinate:n,scale:r,validFindByXMarks:o=Zl}){var i,a;let s=t(e);const c=t=>o.includes(t.markType);if(s.find(c)){s=s.filter(c);const t=r.x,o=r.series,l=null!==(a=null===(i=null==t?void 0:t.getBandWidth)||void 0===i?void 0:i.call(t))&&void 0!==a?a:0,u=o?t=>{var e,n;const r=Math.round(1/(null!==(e=o.valueBandWidth)&&void 0!==e?e:1));return t.__data__.x+(null!==(n=t.__data__.series)&&void 0!==n?n:0)*l+l/(2*r)}:t=>t.__data__.x+l/2;return s.sort((t,e)=>u(t)-u(e)),t=>{const r=Sl(e,t);if(!r)return;const[o]=n.invert(r),i=(0,(0,rl.A)(u).center)(s,o);return s[i]}}return t=>{const{target:e}=t;return Ul(e,t=>!!t.classList&&t.classList.includes("element"))}}function Ql(t){const e=.01/Math.max(t,1e-4);return Math.max(.1,Math.min(100,e))}function tu(t){return!1===t||null==t}function eu(t,e){const n=new Set;for(const r of e){const{scale:e}=r,o=null==e?void 0:e[t];if(!o)continue;if(o.independent)return!0;if(n.add(o.key||"default"),n.size>1)return!0}return!1}function nu(t){var e,n,r,o,i,a,s,c;const l=Array.from(t.markState.keys()),u=eu("x",l),f=eu("y",l),d=[],p=[],h=[],g=[],m=new Map,y=new Map,b=new Map,v=new Map;let x=1,O=1;for(const[l]of t.markState.entries()){const t=l.key,w=(null===(n=null===(e=null==l?void 0:l.scale)||void 0===e?void 0:e.x)||void 0===n?void 0:n.key)||"x";if(!!(null===(o=null===(r=null==l?void 0:l.scale)||void 0===r?void 0:r.x)||void 0===o?void 0:o.independent)||u&&"x"!==w){p.push(t),b.has(w)||b.set(w,x++);const e=b.get(w);m.set(t,`x${e}`)}else d.push(t),m.set(t,"x");const j=(null===(a=null===(i=null==l?void 0:l.scale)||void 0===i?void 0:i.y)||void 0===a?void 0:a.key)||"y";if(!!(null===(c=null===(s=null==l?void 0:l.scale)||void 0===s?void 0:s.y)||void 0===c?void 0:c.independent)||f&&"y"!==j){g.push(t),v.has(j)||v.set(j,O++);const e=v.get(j);y.set(t,`y${e}`)}else h.push(t),y.set(t,"y")}return{hasIndependentX:u,hasIndependentY:f,marksWithSharedX:d,marksWithIndependentX:p,marksWithSharedY:h,marksWithIndependentY:g,markToXScaleMap:m,markToYScaleMap:y}}function ru(t,e,n,r=t=>!0){return o=>{if(!r(o))return;n.emit(`plot:${t}`,o);const{target:i}=o;if(!i)return;const{className:a}=i;if("plot"===a)return;const s=Ul(i,t=>"element"===t.className);const c=function(t){return Ul(t,t=>"component"===t.className)}(i),l=function(t){return Ul(t,t=>"label"===t.className)}(i),u=s||c||l;if(!u)return;const{className:f,markType:d}=u,p=Object.assign(Object.assign({},o),{nativeEvent:!0});if("element"===f)p.data={data:ft(u,e)},n.emit(`element:${t}`,p),n.emit(`${d}:${t}`,p);else if("label"===f){p.data={data:u.attributes.datum},n.emit(`label:${t}`,p);a.split(/\s+/).filter(Boolean).forEach(e=>{n.emit(`${e}:${t}`,p)})}else{n.emit(`component:${t}`,p);a.split(/\s+/).filter(Boolean).forEach(e=>{n.emit(`${e}:${t}`,p)})}}}function ou(){return(t,e,n)=>{const{container:r,view:o}=t,i=ru(ee,o,n,t=>1===t.detail),a=ru(ne,o,n,t=>2===t.detail),s=ru(Ft,o,n),c=ru(Dt,o,n),l=ru($t,o,n),u=ru(Wt,o,n),f=ru(Ht,o,n),d=ru(qt,o,n),p=ru(Yt,o,n),h=ru(Xt,o,n),g=ru(Gt,o,n),m=ru(Vt,o,n),y=ru(Kt,o,n),b=ru(Ut,o,n),v=ru(Zt,o,n),x=ru(Jt,o,n),O=ru(Qt,o,n),w=ru(te,o,n);return r.addEventListener("click",i),r.addEventListener("click",a),r.addEventListener("pointertap",s),r.addEventListener("pointerdown",c),r.addEventListener("pointerup",l),r.addEventListener("pointerover",u),r.addEventListener("pointerout",f),r.addEventListener("pointermove",d),r.addEventListener("pointerenter",p),r.addEventListener("pointerleave",h),r.addEventListener("pointerupoutside",g),r.addEventListener("dragstart",m),r.addEventListener("drag",y),r.addEventListener("dragend",b),r.addEventListener("dragenter",v),r.addEventListener("dragleave",x),r.addEventListener("dragover",O),r.addEventListener("drop",w),()=>{r.removeEventListener("click",i),r.removeEventListener("click",a),r.removeEventListener("pointertap",s),r.removeEventListener("pointerdown",c),r.removeEventListener("pointerup",l),r.removeEventListener("pointerover",u),r.removeEventListener("pointerout",f),r.removeEventListener("pointermove",d),r.removeEventListener("pointerenter",p),r.removeEventListener("pointerleave",h),r.removeEventListener("pointerupoutside",g),r.removeEventListener("dragstart",m),r.removeEventListener("drag",y),r.removeEventListener("dragend",b),r.removeEventListener("dragenter",v),r.removeEventListener("dragleave",x),r.removeEventListener("dragover",O),r.removeEventListener("drop",w)}}}ou.props={reapplyWhenUpdate:!0};var iu=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};function au(t,e){const n=Object.assign(Object.assign({},{"component.axisRadar":$i,"component.axisLinear":Ni,"component.axisArc":Ri,"component.legendContinuousBlock":Is,"component.legendContinuousBlockSize":Rs,"component.legendContinuousSize":Ns,"interaction.event":ou,"composition.mark":Ds,"composition.view":Xs,"shape.label.label":Wc,"shape.break":el}),e),r=e=>{if("string"!=typeof e)return e;const r=`${t}.${e}`;return n[r]||mt(`Unknown Component: ${r}`)};return[(t,e)=>{const{type:n}=t,o=iu(t,["type"]);n||mt("Plot type is required!");const i=r(n);return null==i?void 0:i(o,e)},r]}function su(t){const{canvas:e,group:n}=t;return(null==e?void 0:e.document)||(null==n?void 0:n.ownerDocument)||mt("Cannot find library document")}var cu=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};function lu(t,e){const{coordinate:n={},coordinates:r}=t,o=cu(t,["coordinate","coordinates"]);if(r)return t;const{type:i,transform:a=[]}=n,s=cu(n,["type","transform"]);if(!i)return Object.assign(Object.assign({},o),{coordinates:a});const[,c]=au("coordinate",e),{transform:l=!1}=c(i).props||{};if(l)throw new Error(`Unknown coordinate: ${i}.`);return Object.assign(Object.assign({},o),{coordinates:[Object.assign({type:i},s),...a]})}function uu(t,e){return t.filter(t=>t.type===e)}function fu(t){return uu(t,"polar").length>0}function du(t){return uu(t,"transpose").length%2==1}function pu(t){return uu(t,"theta").length>0}function hu(t){return uu(t,"radial").length>0}function gu(t){return uu(t,"radar").length>0}function mu(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}const yu=mu("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),bu=mu("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),vu=mu("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),xu=mu("4269d0efb118ff725c6cc5b03ca951ff8ab7a463f297bbf59c6b4e9498a0"),Ou=mu("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),wu=mu("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),ju=mu("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),ku=mu("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),Au=mu("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),Mu=mu("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),_u=mu("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");var Su=n("./node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/rgb.js");const Eu=t=>(0,Su.Ik)(t[t.length-1]);var Pu=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(mu);const Lu=Eu(Pu);var Cu=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(mu);const zu=Eu(Cu);var Tu=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(mu);const Bu=Eu(Tu);var Iu=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(mu);const Nu=Eu(Iu);var Ru=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(mu);const Fu=Eu(Ru);var Du=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(mu);const $u=Eu(Du);var Wu=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(mu);const Hu=Eu(Wu);var qu=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(mu);const Yu=Eu(qu);var Xu=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(mu);const Gu=Eu(Xu);var Vu=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(mu);const Ku=Eu(Vu);var Uu=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(mu);const Zu=Eu(Uu);var Ju=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(mu);const Qu=Eu(Ju);var tf=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(mu);const ef=Eu(tf);var nf=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(mu);const rf=Eu(nf);var of=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(mu);const af=Eu(of);var sf=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(mu);const cf=Eu(sf);var lf=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(mu);const uf=Eu(lf);var ff=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(mu);const df=Eu(ff);var pf=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(mu);const hf=Eu(pf);var gf=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(mu);const mf=Eu(gf);var yf=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(mu);const bf=Eu(yf);var vf=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(mu);const xf=Eu(vf);var Of=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(mu);const wf=Eu(Of);var jf=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(mu);const kf=Eu(jf);var Af=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(mu);const Mf=Eu(Af);var _f=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(mu);const Sf=Eu(_f);var Ef=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(mu);const Pf=Eu(Ef);function Lf(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)))))))+")"}var Cf=n("./node_modules/.pnpm/d3-color@3.1.0/node_modules/d3-color/src/define.js"),zf=n("./node_modules/.pnpm/d3-color@3.1.0/node_modules/d3-color/src/color.js");const Tf=Math.PI/180,Bf=180/Math.PI;var If=-.14861,Nf=1.78277,Rf=-.29227,Ff=-.90649,Df=1.97294,$f=-1.7884503806,Wf=3.5172982438,Hf=Nf*Rf-.1347134789;function qf(t,e,n,r){return 1===arguments.length?function(t){if(t instanceof Yf)return new Yf(t.h,t.s,t.l,t.opacity);t instanceof zf.Gw||(t=(0,zf.b)(t));var e=t.g/255,n=t.b/255,r=(Hf*n+$f*(t.r/255)-Wf*e)/(Hf+$f-Wf),o=n-r,i=(Df*(e-r)-Rf*o)/Ff,a=Math.sqrt(i*i+o*o)/(Df*r*(1-r)),s=a?Math.atan2(i,o)*Bf-120:NaN;return new Yf(s<0?s+360:s,a,r,t.opacity)}(t):new Yf(t,e,n,r??1)}function Yf(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}(0,Cf.A)(Yf,qf,(0,Cf.X)(zf.Q1,{brighter(t){return t=null==t?zf.Uw:Math.pow(zf.Uw,t),new Yf(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?zf.ef:Math.pow(zf.ef,t),new Yf(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=isNaN(this.h)?0:(this.h+120)*Tf,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),o=Math.sin(t);return new zf.Gw(255*(e+n*(If*r+Nf*o)),255*(e+n*(Rf*r+Ff*o)),255*(e+n*(Df*r)),this.opacity)}}));var Xf=n("./node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/color.js");function Gf(t){return function e(n){function r(e,r){var o=t((e=qf(e)).h,(r=qf(r)).h),i=(0,Xf.Ay)(e.s,r.s),a=(0,Xf.Ay)(e.l,r.l),s=(0,Xf.Ay)(e.opacity,r.opacity);return function(t){return e.h=o(t),e.s=i(t),e.l=a(Math.pow(t,n)),e.opacity=s(t),e+""}}return n=+n,r.gamma=e,r}(1)}Gf(Xf.lG);var Vf=Gf(Xf.Ay);const Kf=Vf(qf(300,.5,0),qf(-240,.5,1));var Uf=Vf(qf(-100,.75,.35),qf(80,1.5,.8)),Zf=Vf(qf(260,.75,.35),qf(80,1.5,.8)),Jf=qf();function Qf(t){(t<0||t>1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return Jf.h=360*t-100,Jf.s=1.5-1.5*e,Jf.l=.8-.9*e,Jf+""}var td=(0,zf.Qh)(),ed=Math.PI/3,nd=2*Math.PI/3;function rd(t){var e;return t=(.5-t)*Math.PI,td.r=255*(e=Math.sin(t))*e,td.g=255*(e=Math.sin(t+ed))*e,td.b=255*(e=Math.sin(t+nd))*e,td+""}function od(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)))))))+")"}function id(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}const ad=id(mu("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));var sd=id(mu("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),cd=id(mu("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),ld=id(mu("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));function ud(t,e,n,r,i,a){const{guide:s={}}=n,c=function(t,e,n){const{type:r,domain:o,range:i,quantitative:a,ordinal:s}=n;if(void 0!==r)return r;if(function(t){return Md(t,kt)}(e))return"identity";if("string"==typeof i)return"linear";if((o||i||[]).length>2)return Od(t,s);if(void 0!==o)return kd([o])?Od(t,s):Ad(e)?"time":wd(t,i,a);return kd(e)?Od(t,s):Ad(e)?"time":wd(t,i,a)}(t,e,n);if("string"!=typeof c)return n;const l=function(t,e,n,r){const{domain:o}=r;if(void 0!==o)return o;switch(t){case"linear":case"time":case"log":case"pow":case"sqrt":case"quantize":case"threshold":return jd(function(t,e){const{zero:n=!1}=e;let r=1/0,o=-1/0;for(const e of t)for(const t of e)bt(t)&&(r=Math.min(r,+t),o=Math.max(o,+t));return r===1/0?[]:n?[Math.min(0,r),o]:[r,o]}(n,r),r);case"band":case"ordinal":case"point":return function(t){return Array.from(new Set(t.flat()))}(n);case"quantile":return function(t){return t.flat().sort()}(n);case"sequential":return jd(function(t){let e=1/0,n=-1/0;for(const r of t)for(const t of r)bt(t)&&(e=Math.min(e,+t),n=Math.max(n,+t));return e===1/0?[]:[e<0?-n:e,n]}(n),r);default:return[]}}(c,0,e,n),u=function(t,e,n){const{ratio:r}=n;if(null==r)return e;if(yd({type:t}))return function(t,e,n){const r=t.map(Number),o=new li({domain:r,range:[r[0],r[0]+(r[r.length-1]-r[0])*e]});return t.map("time"===n?t=>new Date(o.map(t)):t=>o.map(t))}(e,r,t);return bd({type:t})?function(t,e){const n=Math.round(t.length*e);return t.slice(0,n)}(e,r):e}(c,l,n);return Object.assign(Object.assign(Object.assign({},n),function(t,e,n,r,i){switch(t){case"linear":case"time":case"log":case"pow":case"sqrt":return function(t,e){const{interpolate:n=Qo,nice:r=!1,tickCount:o=5}=e;return Object.assign(Object.assign({},e),{interpolate:n,nice:r,tickCount:o})}(0,r);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});const o=function(t,e,n){return"enterDelay"===e||"enterDuration"===e||"size"===e?0:"band"===t?pu(n)?0:.1:"point"===t?.5:0}(t,e,n),{paddingInner:i=o,paddingOuter:a=o}=r;return Object.assign(Object.assign({},r),{paddingInner:i,paddingOuter:a,padding:o,unknown:NaN})}(t,e,i,r);case"sequential":return function(t){const{palette:e="ylGnBu",offset:n}=t,r=Ce(e),i=o[`interpolate${r}`];if(!i)throw new Error(`Unknown palette: ${r}`);return{interpolator:n?t=>i(n(t)):i}}(r);default:return r}}(c,t,0,n,r)),{domain:u,range:vd(c,t,e,n,u,i,a),expectedDomain:l,guide:s,name:t,type:c})}function fd(t,e){const n={};for(const r of t){const{values:t,name:o}=r,i=e[o];for(const e of t){const{name:t,value:r}=e;n[t]=r.map(t=>i.map(t))}}return n}function dd(t,e){const n=Object.keys(t);for(const r of Object.values(e)){const{name:e}=r.getOptions();if(e in t){const o=n.filter(t=>t.startsWith(e)).map(t=>+(t.replace(e,"")||0)),i=Ye(o)+1,a=`${e}${i}`;t[a]=r,r.getOptions().key=a}else t[e]=r}return t}function pd(t,e){const[n]=au("scale",e),{relations:r}=t,[o]=function(t){if(!t||!Array.isArray(t))return[pt,pt];let e,n;return[r=>{var o;e=r.map.bind(r),n=null===(o=r.invert)||void 0===o?void 0:o.bind(r);const i=t.filter(([t])=>"function"==typeof t),a=t.filter(([t])=>"function"!=typeof t),s=new Map(a);if(r.map=t=>{for(const[e,n]of i)if(e(t))return n;return s.has(t)?s.get(t):e(t)},!n)return r;const c=new Map(a.map(([t,e])=>[e,t])),l=new Map(i.map(([t,e])=>[e,t]));return r.invert=t=>l.has(t)?t:c.has(t)?c.get(t):n(t),r},t=>(null!==e&&(t.map=e),null!==n&&(t.invert=n),t)]}(r);return o(n(t))}function hd(t){const e=t.flatMap(t=>Array.from(t.values())).flatMap(t=>t.channels.map(t=>t.scale));md(e,"x"),md(e,"y")}function gd(t){const{channels:e=[],type:n,scale:r={}}=t,o=["shape","color","opacity","size"];return 0!==e.length?e:"axisX"===n?["x"]:"axisY"===n?["y"]:"legends"===n?Object.keys(r).filter(t=>o.includes(t)):[]}function md(t,e){const n=t.filter(({name:t,facet:n=!0})=>n&&t===e),r=n.flatMap(t=>t.domain),o=n.every(yd)?pi(r):n.every(bd)?Array.from(new Set(r)):null;if(null!==o)for(const t of n)t.domain=o}function yd(t){const{type:e}=t;if("string"!=typeof e)return!1;return["linear","log","pow","time"].includes(e)}function bd(t){const{type:e}=t;if("string"!=typeof e)return!1;return["band","point","ordinal"].includes(e)}function vd(t,e,n,r,o,i,a){const{range:s}=r;if("string"==typeof s)return function(t){return t.split("-")}(s);if(void 0!==s)return s;const{rangeMin:c,rangeMax:l}=r;switch(t){case"linear":case"time":case"log":case"pow":case"sqrt":{const t=xd(n,r,o,i,a),[s,u]=function(t,e){return"enterDelay"===t?[0,1e3]:"enterDuration"==t?[300,1e3]:t.startsWith("y")||t.startsWith("position")?[1,0]:"color"===t?[Ie(e),Ne(e)]:"opacity"===t?[0,1]:"size"===t?[1,10]:[0,1]}(e,t);return[null!=c?c:s,null!=l?l:u]}case"band":case"point":return[null!=c?c:"size"===e?5:0,null!=l?l:"size"===e?10:1];case"ordinal":return xd(n,r,o,i,a);case"sequential":return;case"constant":return[n[0][0]];default:return[]}}function xd(t,e,n,r,i){const[a]=au("palette",i),{category10:s,category20:c}=r,l=function(t){return Array.from(new Set(t))}(n).length<=s.length?s:c,{palette:u=l,offset:f}=e;if(Array.isArray(u))return u;try{return a({type:u})}catch(t){const e=function(t,e,n=t=>t){if(!t)return null;const r=Ce(t),i=o[`scheme${r}`],a=o[`interpolate${r}`];if(!i&&!a)return null;if(i){if(!i.some(Array.isArray))return i;const t=i[e.length];if(t)return t}return e.map((t,r)=>a(n(r/e.length)))}(u,n,f);if(e)return e;throw new Error(`Unknown Component: ${u} `)}}function Od(t,e){return e||(function(t){return t.startsWith("x")||t.startsWith("y")||t.startsWith("position")||t.startsWith("size")}(t)?"point":"ordinal")}function wd(t,e,n){return n||("color"!==t||e?"linear":"sequential")}function jd(t,e){if(0===t.length)return t;const{domainMin:n,domainMax:r}=e,[o,i]=t;return[null!=n?n:o,null!=r?r:i]}function kd(t){return Md(t,t=>{const e=typeof t;return"string"===e||"boolean"===e})}function Ad(t){return Md(t,t=>t instanceof Date)}function Md(t,e){for(const n of t)if(n.some(e))return!0;return!1}const _d={linear:"linear",identity:"identity",log:"log",pow:"pow",sqrt:"sqrt",sequential:"sequential"},Sd={threshold:"threshold",quantize:"quantize",quantile:"quantile"},Ed={ordinal:"ordinal",band:"band",point:"point"},Pd={constant:"constant"};var Ld=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};function Cd(t,e,n){const{coordinates:r=[],title:o}=e,[,i]=au("component",n),a=t.filter(({guide:t})=>null!==t),s=[],c=function(t,e,n){const[,r]=au("component",n),{coordinates:o}=t;function i(t,e,n,i){const a=function(t,e,n=[]){return"x"===t?du(n)?`${e}Y`:`${e}X`:"y"===t?du(n)?`${e}X`:`${e}Y`:null}(e,t,o);if(!i||!a)return;const{props:s}=r(a),{defaultPosition:c,defaultSize:l,defaultOrder:u,defaultCrossPadding:[f]}=s;return Object.assign(Object.assign({position:c,defaultSize:l,order:u,type:a,crossPadding:f},i),{scales:[n]})}return e.filter(t=>t.slider||t.scrollbar).flatMap(t=>{const{slider:e,scrollbar:n,name:r}=t;return[i("slider",r,t,e),i("scrollbar",r,t,n)]}).filter(t=>!!t)}(e,t,n);if(s.push(...c),o){const{props:t}=i("title"),{defaultPosition:e,defaultOrientation:n,defaultOrder:r,defaultSize:a,defaultCrossPadding:c}=t;s.push(Object.assign({type:"title",position:e,orientation:n,order:r,crossPadding:c[0],defaultSize:a},"string"==typeof o?{title:o}:o))}const l=function(t,e){const n=t.filter(t=>function(t){if(!t||!t.type)return!1;if("function"==typeof t.type)return!0;const{type:e,domain:n,range:r,interpolator:o}=t,i=n&&n.length>0,a=r&&r.length>0;return!!(["linear","sqrt","log","time","pow","threshold","quantize","quantile","ordinal","band","point"].includes(e)&&i&&a)||!(!["sequential"].includes(e)||!i||!a&&!o)||!(!["constant","identity"].includes(e)||!a)}(t));return[...Bd(n,e),...Nd(n,e)]}(a,r);return l.forEach(([t,e])=>{const{props:n}=i(t),{defaultPosition:o,defaultPlane:c="xy",defaultOrientation:l,defaultSize:u,defaultOrder:f,defaultLength:d,defaultPadding:p=[0,0],defaultCrossPadding:h=[0,0]}=n,g=(0,N.A)({},...e),{guide:m,field:y}=g,b=Array.isArray(m)?m:[m];for(const n of b){const[i,g]=Dd(t,o,l,n,e,a,r);if(!i&&!g)continue;const m="left"===i||"right"===i,b=m?p[1]:p[0],v=m?h[1]:h[0],{size:x,order:O=f,length:w=d,padding:j=b,crossPadding:k=v}=n;s.push(Object.assign(Object.assign({title:y},n),{defaultSize:u,length:w,position:i,plane:c,orientation:g,padding:j,order:O,crossPadding:k,size:x,type:t,scales:e}))}}),s}function zd(t,e,n,r,o){const[i]=au("component",r),{scaleInstances:a,scale:s,bbox:c}=t,l={bbox:c,library:r};return i(Ld(t,["scaleInstances","scale","bbox"]))({coordinate:e,library:r,markState:o,scales:a,theme:n,value:l,scale:s})}function Td(t,e){const n=["left","right","bottom","top"],r=z(t,({type:t,position:e,group:r})=>n.includes(e)?void 0===r?t.startsWith("legend")?`legend-${e}`:Symbol("independent"):"independent"===r?Symbol("independent"):r:Symbol("independent"));return r.flatMap(([,t])=>{if(1===t.length)return t[0];if(void 0!==e){const n=t.filter(t=>void 0!==t.length).map(t=>t.length),r=qe(n);if(r>e)return t.forEach(t=>t.group=Symbol("independent")),t;const o=(e-r)/(t.length-n.length);t.forEach(t=>{void 0===t.length&&(t.length=o)})}const n=Ye(t,t=>t.size),r=Ye(t,t=>t.order),o=Ye(t,t=>t.crossPadding);return{type:"group",size:n,order:r,position:t[0].position,children:t,crossPadding:o}})}function Bd(t,e){const n=["shape","size","color","opacity"],r=t.filter(({type:t,name:e})=>"string"==typeof t&&n.includes(e)&&!((t,e)=>"constant"===t&&"size"===e)(t,e)),o=r.filter(({type:t})=>"constant"===t),i=z(r.filter(({type:t})=>"constant"!==t),t=>t.field?t.field:Symbol("independent")).map(([t,e])=>[t,[...e,...o]]).filter(([,t])=>t.some(t=>"constant"!==t.type)),a=new Map(i);if(0===a.size)return[];const s=t=>t.sort(([t],[e])=>t.localeCompare(e)),c=Array.from(a).map(([,t])=>{const e=function(t){if(1===t.length)return[t];const e=[];for(let n=1;n<=t.length;n++)e.push(...Fe(t,n));return e}(t).sort((t,e)=>e.length-t.length),n=e.map(t=>({combination:t,option:t.map(t=>[t.name,Id(t)])}));for(const{option:t,combination:e}of n)if(!t.every(t=>"constant"===t[1])&&t.every(t=>"discrete"===t[1]||"constant"===t[1]))return["legendCategory",e];for(const[t,e]of Qe)for(const{option:r,combination:o}of n)if(e.some(t=>He(s(t),s(r))))return[t,o];return null}).filter(bt);return c}function Id(t){const{type:e}=t;return"string"!=typeof e?null:e in _d?"continuous":e in Ed?"discrete":e in Sd?"distribution":e in Pd?"constant":null}function Nd(t,e){return t.map(t=>{const{name:n}=t;if(function(t){return uu(t,"helix").length>0}(e)||pu(e))return null;if(du(e)&&(fu(e)||hu(e)))return null;if(n.startsWith("x"))return fu(e)?["axisArc",[t]]:hu(e)?["axisLinear",[t]]:[du(e)?"axisY":"axisX",[t]];if(n.startsWith("y"))return fu(e)?["axisLinear",[t]]:hu(e)?["axisArc",[t]]:[du(e)?"axisX":"axisY",[t]];if(n.startsWith("z"))return["axisZ",[t]];if(n.startsWith("position")){if(gu(e))return["axisRadar",[t]];if(!fu(e))return["axisY",[t]]}return null}).filter(bt)}function Rd(t){const e=uu(t,"polar");if(e.length){const t=e[e.length-1],{startAngle:n,endAngle:r}=Xe(t);return[n,r]}const n=uu(t,"radial");if(n.length){const t=n[n.length-1],{startAngle:e,endAngle:r}=Ve(t);return[e,r]}return[-Math.PI/2,Math.PI/2*3]}function Fd(t,e,n,r,o){const{name:i}=n[0];if("axisRadar"===t){const t=r.filter(t=>t.name.startsWith("position")),e=function(t){const e=/position(\d*)/g.exec(t);return e?+e[1]:null}(i);if(null===e)return[null,null];const[n,a]=Rd(o);return["center",(a-n)/(gu(o)?t.length:t.length-1)*e+n]}if("axisY"===t&&function(t){return uu(t,"parallel").length>0}(o))return du(o)?["center","horizontal"]:["center","vertical"];if("axisLinear"===t){const[t]=Rd(o);return["center",t]}return"axisArc"===t?"inner"===e[0]?["inner",null]:["outer",null]:fu(o)||hu(o)?["center",null]:"axisX"===t&&function(t){return uu(t,"reflect").length>0}(o)||"axisX"===t&&function(t){return uu(t,"reflectY").length>0}(o)?["top",null]:e}function Dd(t,e,n,r,o,i,a){const[s]=Rd(a),c=[r.position||e,null!=s?s:n];return"string"==typeof t&&t.startsWith("axis")?Fd(t,c,o,i,a):"string"==typeof t&&t.startsWith("legend")&&fu(a)&&"center"===r.position?["center","vertical"]:c}function $d(t,e,n,r,o,i){const{type:a}=t;if(!["left","right","bottom","top"].includes(r))return;if("string"!=typeof a)return;const s=a;return(s.startsWith("axis")?Xd:s.startsWith("group")?Wd:s.startsWith("legendContinuous")?Gd:"legendCategory"===s?Vd:s.startsWith("slider")?Yd:"title"===s?qd:s.startsWith("scrollbar")?Hd:()=>{})(t,e,n,r,o,i)}function Wd(t,e,n,r,o,i){const{children:a}=t,s=Ye(a,t=>t.crossPadding);a.forEach(t=>t.crossPadding=s),a.forEach(t=>$d(t,e,n,r,o,i));const c=Ye(a,t=>t.size);t.size=c,a.forEach(t=>t.size=c)}function Hd(t,e,n,r,o,i){const{trackSize:a=6}=(0,N.A)({},o.scrollbar,t);t.size=a}function qd(t,e,n,r,o,i){const a=(0,N.A)({},o.title,t),{title:s,subtitle:c,spacing:l=0}=a,u=Ld(a,["title","subtitle","spacing"]);if(s){const e=tp(s,xt(u,"title"));t.size=e.height}if(c){const e=tp(c,xt(u,"subtitle"));t.size+=l+e.height}}function Yd(t,e,n,r,o,i){const{trackSize:a,handleIconSize:s}=(()=>{const{slider:e}=o;return(0,N.A)({},e,t)})(),c=Math.max(a,2.4*s);t.size=c}function Xd(t,e,n,r,o,i){var a,s;t.transform=t.transform||[{type:"hide"}];const c="left"===r||"right"===r,l=Jd(t,r,o),{tickLength:u=0,labelSpacing:f=0,titleSpacing:d=0,labelAutoRotate:p}=l,h=Ld(l,["tickLength","labelSpacing","titleSpacing","labelAutoRotate"]),g=Kd(t,i),m=Ud(h,g);let y=u;if("function"==typeof t.tickLength){const e=((null===(a=g.getTicks)||void 0===a?void 0:a.call(g))||g.getOptions().domain).map((e,n,r)=>t.tickLength(e,n,r));y=Math.max(...e,0)}const b=y+f;if(m&&m.length){const r=Ye(m,t=>t.width),o=Ye(m,t=>t.height);if(c)t.size=r+b;else{const{tickFilter:i,labelTransform:a}=t;!function(t,e,n,r,o){const i=qe(e,t=>t.width);if(i>n)return!0;const a=t.clone();a.update({range:[0,n]});const s=Qd(t,o),c=s.map(t=>a.map(t)+function(t,e){if(!t.getBandWidth)return 0;const n=t.getBandWidth(e)/2;return n}(a,t)),l=s.map((t,e)=>e),u=-r[0],f=n+r[1],d=(t,e)=>{const{width:n}=e;return[t-n/2,t+n/2]};for(let t=0;t<l.length;t++){const n=c[t],[r,o]=d(n,e[t]);if(r<u||o>f)return!0;const i=c[t+1];if(i){const[n]=d(i,e[t+1]);if(o>n)return!0}}return!1}(g,m,e,n,i)||a||!1===p||null===p?(t.labelTransform=null!==(s=t.labelTransform)&&void 0!==s?s:"rotate(0)",t.size=o+b):(t.labelTransform="rotate(90)",t.size=r+b)}}else t.size=y;const v=Zd(h);v&&(t.size+=c?d+v.width:d+v.height)}function Gd(t,e,n,r,o,i){const a=(()=>{const{legendContinuous:e}=o;return(0,N.A)({},e,t)})(),{labelSpacing:s=0,titleSpacing:c=0}=a,l=Ld(a,["labelSpacing","titleSpacing"]),u="left"===r||"right"===r,f=xt(l,"ribbon"),{size:d}=f,p=xt(l,"handleIcon"),{size:h}=p,g=Math.max(d,2.4*h);t.size=g;const m=Ud(l,Kd(t,i));if(m){const e=u?"width":"height",n=Ye(m,t=>t[e]);t.size+=n+s}const y=Zd(l);y&&(u?t.size=Math.max(t.size,y.width):t.size+=c+y.height)}function Vd(t,e,n,r,o,i){const a=(()=>{const{legendCategory:e}=o,{title:n}=t,[r,i]=Array.isArray(n)?[n,void 0]:[void 0,n];return(0,N.A)({title:r},e,Object.assign(Object.assign({},t),{title:i}))})(),{focus:s,itemSpacing:c,focusMarkerSize:l,itemMarkerSize:u,titleSpacing:f,rowPadding:d,colPadding:p,maxCols:h=1/0,maxRows:g=1/0}=a,m=Ld(a,["focus","itemSpacing","focusMarkerSize","itemMarkerSize","titleSpacing","rowPadding","colPadding","maxCols","maxRows"]),{cols:y,length:b}=t,v=t=>Math.min(t,g),x=t=>Math.min(t,h),O="left"===r||"right"===r,w=void 0===b?e+(O?0:n[0]+n[1]):b,j=Kd(t,i),{render:k}=t;if(k&&"undefined"!=typeof document){const e=j.getOptions().domain,{labelFormatter:n}=m,r=t=>n?"string"==typeof n?(0,ze.GP)(n)(t):n(t):`${t}`,o=e.map((t,e)=>({id:t,index:e,label:r(t),value:t,color:j.map(t)})),i=k(o,m),a=document.createElement("div"),{width:s,height:c}=t,l={position:"absolute",visibility:"hidden",top:"-9999px"};s?l.width=`${s}px`:O||(l.width=`${w}px`),c?l.height=`${c}px`:O&&(l.height=`${w}px`),Object.assign(a.style,l),"string"==typeof i?a.innerHTML=i:i instanceof HTMLElement&&a.appendChild(i),document.body.appendChild(a);const u=a.getBoundingClientRect();return document.body.removeChild(a),void(t.size=O?u.width:u.height)}const A=Zd(m),M=Ud(m,j,"itemLabel"),_=void 0!==m.itemValueText?Ud(m,j,"itemValue"):null,S=Math.max(M[0].height,u,...(null==_?void 0:_[0])?[_[0].height]:[])+d,E=(t,e=0)=>{let n=u+t+c[0]+e;return(null==_?void 0:_[0])&&(n+=_[0].width+c[1]),s&&(n+=l+c[2]),n};O?(()=>{let e=-1/0,n=0,r=1,o=0,i=-1/0,a=-1/0;const s=A?A.height:0,c=w-s;for(const{width:t}of M){const s=E(t,p);e=Math.max(e,s),n+S>c?(r++,i=Math.max(i,o),a=Math.max(a,n),o=1,n=S):(n+=S,o++)}r<=1&&(i=o,a=n),t.size=e*x(r),t.length=a+s,(0,N.A)(t,{cols:x(r),gridRow:i})})():"number"==typeof y?(()=>{const e=Math.ceil(M.length/y),n=Ye(M,t=>E(t.width))*y;t.size=S*v(e)-d,t.length=Math.min(n,w)})():(()=>{let e=1,n=0,r=-1/0;for(const{width:t}of M){const o=E(t,p);n+o>w?(r=Math.max(r,n),n=o,e++):n+=o}1===e&&(r=n),t.size=S*v(e)-d,t.length=r})(),A&&(O?t.size=Math.max(t.size,A.width):t.size+=f+A.height)}function Kd(t,e){const[n]=au("scale",e),{scales:r,tickCount:o,tickMethod:i}=t,a=r.find(t=>"constant"!==t.type&&"identity"!==t.type);return void 0!==o&&(a.tickCount=o),void 0!==i&&(a.tickMethod=i),n(a)}function Ud(t,e,n="label"){const{labelFormatter:r,tickFilter:o,label:i=!0}=t,a=Ld(t,["labelFormatter","tickFilter","label"]);if(!i)return null;const s=function(t,e,n){const r=Qd(t,n),o=r.map(t=>"number"==typeof t?Ze(t):t),i=e?"string"==typeof e?(0,ze.GP)(e):e:t.getFormatter?t.getFormatter():t=>`${t}`;return o.map(i)}(e,r,o),c=xt(a,n),l=s.map((t,e)=>Object.fromEntries(Object.entries(c).map(([n,r])=>[n,"function"==typeof r?r(t,e):r]))),u=s.map((t,e)=>tp(t,l[e])),f=l.some(t=>t.transform);if(!f){const e=s.map((t,e)=>e);t.indexBBox=new Map(e.map(t=>[t,[s[t],u[t]]]))}return u}function Zd(t){const{title:e}=t,n=Ld(t,["title"]);if((t=>!1===t||null===t)(e)||void 0===e)return null;const r=xt(n,"title"),{direction:o,transform:i}=r,a=Array.isArray(e)?e.join(","):e;if("string"!=typeof a)return null;return tp(a,Object.assign(Object.assign({},r),{transform:i||("vertical"===o?"rotate(-90)":"")}))}function Jd(t,e,n){const{title:r}=t,[o,i]=Array.isArray(r)?[r,void 0]:[void 0,r],{axis:a,[`axis${gt(e)}`]:s}=n;return(0,N.A)({title:o},a,s,Object.assign(Object.assign({},t),{title:i}))}function Qd(t,e){const n=t.getTicks?t.getTicks():t.getOptions().domain;return e?n.filter(e):n}function tp(t,e){const n=function(t){return t instanceof l.q9?t:new l.EY({style:{text:`${t}`}})}(t),r=Ld(e,["filter"]);n.attr(Object.assign(Object.assign({},r),{visibility:"none"}));return n.getBBox()}function ep(t,e){let n;if(void 0===e)for(const e of t)null!=e&&(n>e||void 0===n&&e>=e)&&(n=e);else{let r=-1;for(let o of t)null!=(o=e(o,++r,t))&&(n>o||void 0===n&&o>=o)&&(n=o)}return n}function np(t,e,n,r){var o,i,a,s;const{width:c,height:l,depth:u,x:f=0,y:d=0,z:p=0,inset:h=(null!==(o=n.inset)&&void 0!==o?o:0),insetLeft:g=h,insetTop:m=h,insetBottom:y=h,insetRight:b=h,margin:v=(null!==(i=n.margin)&&void 0!==i?i:0),marginLeft:x=v,marginBottom:O=v,marginTop:w=v,marginRight:j=v,padding:A=n.padding,paddingBottom:M=A,paddingLeft:_=A,paddingRight:S=A,paddingTop:E=A}=function(t,e,n,r){const{coordinates:o}=e;if(!fu(o)&&!hu(o))return e;const i=t.filter(t=>"string"==typeof t.type&&t.type.startsWith("axis"));if(0===i.length)return e;const a=i.map(t=>Jd(t,"axisArc"===t.type?"arc":"linear",n)),s=Ye(a,t=>{var e;return null!==(e=t.labelSpacing)&&void 0!==e?e:0}),c=i.flatMap((t,e)=>Ud(a[e],Kd(t,r))).filter(bt),l=Ye(c,t=>t.height)+s,u=i.flatMap((t,e)=>Zd(a[e])).filter(t=>null!==t),f=0===u.length?0:Ye(u,t=>t.height),{inset:d=l,insetLeft:p=d,insetBottom:h=d,insetTop:g=d+f,insetRight:m=d}=e;return Object.assign(Object.assign({},e),{insetLeft:p,insetBottom:h,insetTop:g,insetRight:m})}(t,e,n,r),P=16===x&&"auto"===_,L=16===j&&"auto"===S,C=k(e,"coordinates",[]).some(t=>"transpose"===t.type),z=t.find(({type:t})=>"axisX"===t),{size:T,labelTransform:B}=z||{},I=(t,n,r,o,i)=>{const{marks:a}=e;if(0===a.length)return[o,i];if(t-o-i-.25*t>0)return[o,i];const s=.75*t;return["auto"===n?s*o/(o+i):o,"auto"===r?s*i/(o+i):i]},N=t=>"auto"===t?20:null!=t?t:20,R=N(E),F=N(M),D=rp(t,l-R-F,[R+w,F+O],["left","right"],e,n,r),{paddingLeft:$,paddingRight:W}=D,H=c-x-j;let[q,Y]=I(H,_,S,$,W),X=H-q-Y;const G=rp(t,X,[q+x,Y+j],["bottom","top"],e,n,r),{paddingTop:V,paddingBottom:K}=G,U=l-O-w,[Z,J]=I(U,M,E,K,V),Q=U-Z-J;if(T&&!C&&!B){const{fontSize:t=12,fontFamily:e="sans-serif",scales:n=[]}=z,r=null!==(s=null===(a=null==n?void 0:n[0])||void 0===a?void 0:a.domain)&&void 0!==s?s:[];if(!r.length)return;const o=(n,r,o,i)=>{const a=eo(r,{fontSize:t,fontFamily:e}),s=a/2-o-i;s>0&&(X-=s,"left"===n?q+=a/2-o:Y+=a/2-o)};P&&o("left",function(t){if($e(t))return t[0]}(r),x,q),L&&o("right",Ho(r),j,Y)}return{width:c,height:l,depth:u,insetLeft:g,insetTop:m,insetBottom:y,insetRight:b,innerWidth:X,innerHeight:Q,paddingLeft:q,paddingRight:Y,paddingTop:J,paddingBottom:Z,marginLeft:x,marginBottom:O,marginTop:w,marginRight:j,x:f,y:d,z:p}}function rp(t,e,n,r,o,i,a){const s=C(t,t=>t.position),{padding:c=i.padding,paddingLeft:l=c,paddingRight:u=c,paddingBottom:f=c,paddingTop:d=c}=o,p={paddingBottom:f,paddingLeft:l,paddingTop:d,paddingRight:u};for(const t of r){const r=`padding${gt(lc(t))}`,o=s.get(t)||[],c=p[r],l=t=>{void 0===t.size&&(t.size=t.defaultSize)},u=t=>{"group"===t.type?(t.children.forEach(l),t.size=Ye(t.children,t=>t.size)):t.size=t.defaultSize},f=r=>{r.size||("auto"!==c?u(r):($d(r,e,n,t,i,a),l(r)))},d=t=>{t.type.startsWith("axis")&&void 0===t.labelAutoHide&&(t.labelAutoHide=!0)},h="bottom"===t||"top"===t,g=ep(o,t=>t.order),m=o.filter(t=>t.type.startsWith("axis")&&t.order==g);if(m.length&&(m[0].crossPadding=0),"number"==typeof c)o.forEach(l),o.forEach(d);else if(0===o.length)p[r]=0;else{const t=Td(o,h?e+n[0]+n[1]:e);t.forEach(f);const i=t.reduce((t,{size:e,crossPadding:n=12})=>t+e+n,0);p[r]=i}}return p}function op({width:t,height:e,paddingLeft:n,paddingRight:r,paddingTop:o,paddingBottom:i,marginLeft:a,marginTop:s,marginBottom:c,marginRight:l,innerHeight:u,innerWidth:f,insetBottom:d,insetLeft:p,insetRight:h,insetTop:g}){const m=n+a,y=o+s,b=r+l,v=i+c,x=t-a-l,O=[m+p,y+g,f-p-h,u-g-d,"center",null,null];return{top:[m,0,f,y,"vertical",!0,Ec.A,a,x],right:[t-b,y,b,u,"horizontal",!1,Ec.A],bottom:[m,e-v,f,v,"vertical",!1,Ec.A,a,x],left:[0,y,m,u,"horizontal",!0,Ec.A],"top-left":[m,0,f,y,"vertical",!0,Ec.A],"top-right":[m,0,f,y,"vertical",!0,Ec.A],"bottom-left":[m,e-v,f,v,"vertical",!1,Ec.A],"bottom-right":[m,e-v,f,v,"vertical",!1,Ec.A],center:O,inner:O,outer:O}}function ip(t,e,n,r){const[o,i]=Re(t,t=>!("string"!=typeof t.type||!t.type.startsWith("axis")));!function(t,e,n,r){"center"===r?function(t){return sn(t)&&rn(t)}(e)?function(t,e,n){const[r,o,i,a]=n;for(const e of t)e.bbox={x:r,y:o,width:i,height:a},e.radar={index:t.indexOf(e),count:t.length}}(t,0,n):rn(e)?function(t,e,n){const[r,o,i,a]=n;for(const e of t)e.bbox={x:r,y:o,width:i,height:a}}(t,0,n):sn(e)&&function(t,e,n,r){"horizontal"===r?function(t,e,n){const[r,o,i]=n,a=new Array(t.length).fill(0),s=e.map(a),c=s.filter((t,e)=>e%2==1).map(t=>t+o);for(let e=0;e<t.length;e++){const n=c[e];t[e].bbox={x:r,y:n,width:i,height:c[e+1]-n}}}(t,e,n):"vertical"===r&&function(t,e,n){const[r,o,,i]=n,a=new Array(t.length).fill(0),s=e.map(a),c=s.filter((t,e)=>e%2==0).map(t=>t+r);for(let e=0;e<t.length;e++){const n=c[e];t[e].bbox={x:n,y:o,width:c[e+1]-n,height:i}}}(t,e,n)}(t,e,n,t[0].orientation):"inner"===r?function(t,e,n){const[r,o,,i]=n,[a,s]=e.getCenter(),[c]=fn(e),l=i/2,u=c*l,f=a-u,d=s-u;for(let e=0;e<t.length;e++){t[e].bbox={x:r+f,y:o+d,width:2*u,height:2*u}}}(t,e,n):"outer"===r&&function(t,e,n){const[r,o,i,a]=n;for(const e of t)e.bbox={x:r,y:o,width:i,height:a}}(t,0,n)}(o,e,n,r),function(t,e,n){if(0===t.length)return;const[r,o,i,a]=n,[s]=fn(e),c=a/2*s/Math.sqrt(2),l=r+i/2,u=o+a/2;for(let e=0;e<t.length;e++){t[e].bbox={x:l-c,y:u-c,width:2*c,height:2*c}}}(i,e,n)}function ap(t,e,n){const[r,o,i,a,s,c,l,u,f]=n,[d,p,h,g,m,y,b,v]="vertical"===s?["y",o,"x",r,"height",a,"width",i]:["x",r,"y",o,"width",i,"height",a];t.sort((t,e)=>null==l?void 0:l(t.order,e.order));const x=t=>"title"===t||"group"===t||t.startsWith("legend"),O=(t,e,n)=>void 0===n?e:x(t)?n:e,w=(t,e,n)=>void 0===n?e:x(t)?n:e;for(let e=0,n=c?p+y:p;e<t.length;e++){const r=t[e],{crossPadding:o=0,type:i}=r,{size:a}=r;r.bbox={[d]:c?n-a-o:n+o,[h]:w(i,g,u),[m]:a,[b]:O(i,v,f)},n+=(a+o)*(c?-1:1)}const j=t.filter(t=>"group"===t.type);for(const t of j){const{bbox:e,children:n}=t,r=e[b],o=r/n.length,i=n.reduce((t,e)=>{var n;const r=null===(n=e.layout)||void 0===n?void 0:n.justifyContent;return r||t},"flex-start"),a=n.map((t,e)=>{const{length:r=o,padding:i=0}=t;return r+(e===n.length-1?0:i)}),s=r-qe(a);for(let t=0,r=e[h]+("flex-start"===i?0:"center"===i?s/2:s);t<n.length;t++){const o=n[t],{padding:s=0}=o,c=t===n.length-1?0:s;o.bbox={[m]:e[m],[d]:e[d],[h]:r,[b]:a[t]-c},(0,N.A)(o,{layout:{justifyContent:i}}),r+=a[t]}}}function sp(t,e,n={},r=!1){if(At(t))return t;if(Array.isArray(t)&&r)return t;const o=xt(t,e);return(0,N.A)(n,o)}function cp(t,e={}){return At(t)||Array.isArray(t)?t:lp(t)?(0,N.A)(e,t):t}function lp(t){if(0===Object.keys(t).length)return!0;const{title:e,items:n}=t;return void 0!==e||void 0!==n}function up(t,e){return"object"==typeof t?xt(t,e):t}var fp=function(t,e,n,r){return new(n||(n=Promise))(function(o,i){function a(t){try{c(r.next(t))}catch(t){i(t)}}function s(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){t.done?o(t.value):function(t){return t instanceof n?t:new n(function(e){e(t)})}(t.value).then(a,s)}c((r=r.apply(t,e||[])).next())})},dp=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const pp=Symbol("CALLBACK_ITEM");function hp(t,e,n){const{encode:r={},scale:o={},transform:i=[]}=e,a=dp(e,["encode","scale","transform"]);return[t,Object.assign(Object.assign({},a),{encode:r,scale:o,transform:i})]}function gp(t,e,n){return fp(this,void 0,void 0,function*(){const{library:t}=n,{data:r}=e,[o]=au("data",t),i=function(t){if((0,tt.A)(t))return{type:"inline",value:t};if(!t)return{type:"inline",value:null};if(Array.isArray(t))return{type:"inline",value:t};const{type:e="inline"}=t,n=dp(t,["type"]);return Object.assign(Object.assign({},n),{type:e})}(r),{transform:a=[]}=i,s=[dp(i,["transform"]),...a].map(t=>o(t,n)),c=yield function(t){return t.reduce((t,e)=>n=>ct(this,void 0,void 0,function*(){const r=yield t(n);return e(r)}),pt)}(s)(r),l=!r||Array.isArray(r)||Array.isArray(c)?c:{value:c};return[Array.isArray(c)?Be(c):[],Object.assign(Object.assign({},e),{data:l})]})}function mp(t,e,n){const{encode:r}=e;if(!r)return[t,e];const o={};for(const[t,e]of Object.entries(r))if(Array.isArray(e))for(let n=0;n<e.length;n++){o[`${t}${0===n?"":n}`]=e[n]}else o[t]=e;return[t,Object.assign(Object.assign({},e),{encode:o})]}function yp(t,e,n){const{encode:r,data:o}=e;if(!r)return[t,e];const i=Te(r,t=>{if(function(t){if("object"!=typeof t||t instanceof Date||null===t)return!1;const{type:e}=t;return bt(e)}(t))return t;const e=function(t,e){return"function"==typeof e?"transform":"string"==typeof e&&function(t,e){return!!Array.isArray(t)&&t.some(t=>void 0!==t[e])}(t,e)?"field":"constant"}(o,t);return{type:e,value:t}});return[t,Object.assign(Object.assign({},e),{encode:i})]}function bp(t,e,n){const{encode:r}=e;if(!r)return[t,e];const o=Te(r,(t,e)=>{const{type:n}=t;return"constant"!==n||function(t){return t.startsWith("x")||t.startsWith("y")||t.startsWith("position")||"enterDelay"===t||"enterDuration"===t||"updateDelay"===t||"updateDuration"===t||"exitDelay"===t||"exitDuration"===t}(e)?t:Object.assign(Object.assign({},t),{constant:!0})});return[t,Object.assign(Object.assign({},e),{encode:o})]}function vp(t,e,n){const{encode:r,data:o}=e;if(!r)return[t,e];const{library:i}=n,a=function(t){const[e]=au("encode",t);return(t,n)=>void 0===n||void 0===t?null:Object.assign(Object.assign({},n),{type:"column",value:e(n)(t),field:Ep(n)})}(i),s=Te(r,t=>a(o,t));return[t,Object.assign(Object.assign({},e),{encode:s})]}function xp(t,e,n){const{tooltip:r={}}=e;return At(r)?[t,e]:Array.isArray(r)?[t,Object.assign(Object.assign({},e),{tooltip:{items:r}})]:kt(r)&&lp(r)?[t,Object.assign(Object.assign({},e),{tooltip:r})]:[t,Object.assign(Object.assign({},e),{tooltip:{items:[r]}})]}function Op(t,e,n){const{data:r,encode:o,tooltip:i={}}=e;if(At(i))return[t,e];const a=e=>{if(!e)return e;if("string"==typeof e)return t.map(t=>({name:e,value:r[t][e]}));if(kt(e)){const{field:n,channel:i,color:a,name:s=n,valueFormatter:c=t=>t}=e,l="string"==typeof c?(0,ze.GP)(c):c,u=i&&o[i],f=s||u&&o[i].field||i,d=[];for(const e of t){d[e]={name:f,color:a,value:l(n?r[e][n]:u?o[i].value[e]:null)}}return d}if("function"==typeof e){const n=[];for(const i of t){const t=e(r[i],i,r,o);n[i]=kt(t)?Object.assign(Object.assign({},t),{[pp]:!0}):{value:t}}return n}return e},{title:s,items:c=[]}=i,l=dp(i,["title","items"]),u=Object.assign({title:a(s),items:Array.isArray(c)?c.map(a):[]},l);return[t,Object.assign(Object.assign({},e),{tooltip:u})]}function wp(t,e,n){const{encode:r}=e,o=dp(e,["encode"]);if(!r)return[t,e];const i=Object.entries(r),a=i.filter(([,t])=>{const{value:e}=t;return Array.isArray(e[0])}).flatMap(([e,n])=>{const r=[[e,new Array(t.length).fill(void 0)]],{value:o}=n,i=dp(n,["value"]);for(let n=0;n<o.length;n++){const i=o[n];if(Array.isArray(i))for(let o=0;o<i.length;o++){const a=r[o]||[`${e}${o}`,new Array(t).fill(void 0)];a[1][n]=i[o],r[o]=a}}return r.map(([t,e])=>[t,Object.assign({type:"column",value:e},i)])}),s=Object.fromEntries([...i,...a]);return[t,Object.assign(Object.assign({},o),{encode:s})]}function jp(t,e,n){const{axis:r={},legend:o={},slider:i={},scrollbar:a={}}=e,s=(t,e)=>{if("boolean"==typeof t)return t?{}:null;const n=t[e];return void 0===n||n?n:null},c="object"==typeof r?Array.from(new Set(["x","y","z",...Object.keys(r)])):["x","y","z"];return(0,N.A)(e,{scale:Object.assign(Object.assign({},Object.fromEntries(c.map(t=>{const e=s(a,t);return[t,Object.assign({guide:s(r,t),slider:s(i,t),scrollbar:e},e&&{ratio:void 0===e.ratio?.5:e.ratio})]}))),{color:{guide:s(o,"color")},size:{guide:s(o,"size")},shape:{guide:s(o,"shape")},opacity:{guide:s(o,"opacity")}})}),[t,e]}function kp(t,e,n){const{animate:r}=e;return r||void 0===r||(0,N.A)(e,{animate:{enter:{type:null},exit:{type:null},update:{type:null}}}),[t,e]}function Ap(t,e,n){var r,o;return(0,N.A)(e,{scale:{series:Object.assign({key:`DEFAULT_${e.type}_SERIES_KEY`},null!==(o=null===(r=null==e?void 0:e.scale)||void 0===r?void 0:r.series)&&void 0!==o?o:{})}}),[t,e]}var Mp=function(t,e,n,r){return new(n||(n=Promise))(function(o,i){function a(t){try{c(r.next(t))}catch(t){i(t)}}function s(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){t.done?o(t.value):function(t){return t instanceof n?t:new n(function(e){e(t)})}(t.value).then(a,s)}c((r=r.apply(t,e||[])).next())})},_p=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};function Sp(t,e,n){return Mp(this,void 0,void 0,function*(){const[r,o]=yield function(t,e,n){return Mp(this,void 0,void 0,function*(){const{library:r}=n,[o]=au("transform",r),{preInference:i=[],postInference:a=[]}=e,{transform:s=[]}=t,c=[hp,gp,mp,yp,bp,vp,wp,kp,jp,xp,Ap,...i.map(o),...s.map(o),...a.map(o),Op];let l=[],u=t;for(const t of c)[l,u]=yield t(l,u,n);return[l,u]})}(t,e,n),{encode:i,scale:a,data:s,tooltip:c,key:l}=o;if(!1===Array.isArray(s))return null;const{channels:u}=e,f=B(Object.entries(i).filter(([,t])=>bt(t)),t=>t.map(([t,e])=>Object.assign({name:t},e)),([t])=>{var e;const n=null===(e=/([^\d]+)\d*$/.exec(t))||void 0===e?void 0:e[1],r=u.find(t=>t.name===n);return(null==r?void 0:r.independent)?t:n}),d=u.filter(t=>{const{name:e,required:n}=t;if(f.find(([t])=>t===e))return!0;if(n)throw new Error(`Missing encoding for channel: ${e}.`);return!1}).flatMap(t=>{const{name:e,scale:n,scaleKey:r,range:o,quantitative:i,ordinal:s}=t;return f.filter(([t])=>t.startsWith(e)).map(([t,e],c)=>{const u=e.some(t=>t.visual),f=e.some(t=>t.constant),d=a[t]||{},{independent:p=!1,key:h=r||t,type:g=(f?"constant":u?"identity":n)}=d,m=_p(d,["independent","key","type"]),y="constant"===g,b=y?void 0:o;return{name:t,values:e,scaleKey:p||y?Symbol("independent"):h,scale:Object.assign(Object.assign({type:g,markKey:l,range:b},m),{quantitative:i,ordinal:s})}})});return[o,Object.assign(Object.assign({},e),{index:r,channels:d,tooltip:c})]})}function Ep(t){const{type:e,value:n}=t;return"field"===e&&"string"==typeof n?n:null}var Pp=function(t,e,n,r){return new(n||(n=Promise))(function(o,i){function a(t){try{c(r.next(t))}catch(t){i(t)}}function s(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){t.done?o(t.value):function(t){return t instanceof n?t:new n(function(e){e(t)})}(t.value).then(a,s)}c((r=r.apply(t,e||[])).next())})},Lp=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};function Cp(t,e,n){return Pp(this,void 0,void 0,function*(){var r;const{library:o}=n,[i]=au("composition",o),[a]=au("interaction",o),s=new Set(Object.keys(o).map(t=>{var e;return null===(e=/mark\.(.*)/.exec(t))||void 0===e?void 0:e[1]}).filter(bt)),c=new Set(Object.keys(o).map(t=>{var e;return null===(e=/component\.(.*)/.exec(t))||void 0===e?void 0:e[1]}).filter(bt)),l=t=>{const{type:e}=t;if("function"==typeof e){const{props:t={}}=e,{composite:n=!0}=t;if(n)return"mark"}return"string"!=typeof e?e:s.has(e)||c.has(e)?"mark":e},u=t=>"mark"===l(t),f=t=>"standardView"===l(t),d=t=>{const{type:e}=t;return"string"==typeof e&&!!c.has(e)},p=t=>{if(f(t))return[t];const e=l(t);return i({type:e,static:d(t)})(t)},h=[],g=new Map,m=new Map,y=[t],b=[];for(;y.length;){const t=y.shift();if(f(t)){const e=m.get(t),[r,i]=e?Rp(e,t,o):yield Bp(t,n);g.set(r,t),h.push(r);const a=i.flatMap(p).map(t=>lu(t,o));if(y.push(...a),a.every(f)){const t=yield Promise.all(a.map(t=>Ip(t,n)));hd(t);for(let e=0;e<a.length;e++){m.set(a[e],t[e])}}}else{const e=p(u(t)?t:yield Qp(t,n));Array.isArray(e)?y.push(...e):"function"==typeof e&&b.push(e())}}n.emitter.emit(Lt);const v=new Map,x=new Map,O=[];e.selectAll(rh("view")).data(h,t=>t.key).join(t=>t.append("g").attr("className","view").attr("id",t=>t.key).call(zp).each(function(t,e,r){Fp(t,_t(r),O,n),v.set(t,r)}),t=>t.call(zp).each(function(t,e,r){Fp(t,_t(r),O,n),x.set(t,r)}),t=>t.each(function(t,e,n){const r=n.nameInteraction.values();for(const t of r)t.destroy()}).remove());const w=(t,e,r)=>Array.from(t.entries()).map(([o,i])=>{const a=r||new Map,s=(t,e=t=>t)=>a.set(t,e),c=g.get(o),l=function(t,e,n){const{library:r}=n,o=function(t){const[,e]=au("interaction",t);return t=>{const[n,r]=t;try{return[n,e(n)]}catch(t){return[n,r.type]}}}(r),i=t=>t[1]&&t[1].props&&t[1].props.reapplyWhenUpdate,a=Jp(e),s=a.map(o).filter(i).map(t=>t[0]);return(e,r,o)=>Pp(this,void 0,void 0,function*(){const i=[],[a,c]=yield Bp(e,n);Fp(a,t,i,n);for(const o of s.filter(t=>t!==r))Tp(o,t,e,a,n);for(const e of c)Cp(e,t,n);return o(),{options:e,view:a}})}(_t(i),c,n),u={view:o,container:i,options:c,setState:s,update:(n,r)=>Pp(this,void 0,void 0,function*(){const o=ht(Array.from(a.values()))(c);return yield l(o,n,()=>{(0,Le.A)(r)&&e(t,r,a)})})};return n.externals.update=u.update,n.externals.setState=s,u}),j=(t=x,e,r)=>{var o;const i=w(t,j,r);for(const t of i){const{options:r,container:s}=t,c=s.nameInteraction;let l=Jp(r);e&&(l=l.filter(t=>e.includes(t[0])));for(const e of l){const[r,s]=e,l=c.get(r);if(l&&(null===(o=l.destroy)||void 0===o||o.call(l)),s){const e=Np(t.view,r,s,a)(t,i,n.emitter);c.set(r,{destroy:e})}}}},k=w(v,j);for(const t of k){const{options:e}=t,r=new Map;t.container.nameInteraction=r;for(const o of Jp(e)){const[e,i]=o;if(i){const o=Np(t.view,e,i,a)(t,k,n.emitter);r.set(e,{destroy:o})}}}j();const{width:A,height:M}=t,_=[];for(const t of b){const r=new Promise(r=>Pp(this,void 0,void 0,function*(){for(const r of t){const t=Object.assign({width:A,height:M},r);yield Cp(t,e,n)}r()}));_.push(r)}n.views=h,null===(r=n.animations)||void 0===r||r.forEach(t=>null==t?void 0:t.cancel()),n.animations=O,n.emitter.emit(Ct);const S=O.filter(bt).map(Vp).map(t=>t.finished);return Promise.all([...S,..._])})}function zp(t){t.style("transform",t=>`translate(${t.layout.x}, ${t.layout.y})`)}function Tp(t,e,n,r,o){var i;const{library:a}=o,[s]=au("interaction",a),c=e.node().nameInteraction,l=Jp(n).find(([e])=>e===t),u=c.get(t);if(!u)return;if(null===(i=u.destroy)||void 0===i||i.call(u),!l[1])return;const f=Np(r,t,l[1],s),d={options:n,view:r,container:e.node(),update:t=>Promise.resolve(t)},p=f(d,[],o.emitter);c.set(t,{destroy:p})}function Bp(t,e){return Pp(this,void 0,void 0,function*(){const{library:n}=e,r=yield function(t,e){return Pp(this,void 0,void 0,function*(){const{library:n}=e,[r,o]=au("mark",n),i=new Set(Object.keys(n).map(t=>{var e;return null===(e=/component\.(.*)/.exec(t))||void 0===e?void 0:e[1]}).filter(bt)),{marks:a}=t,s=[],c=[],l=[...a],{width:u,height:f}=function(t){const{height:e,width:n,padding:r=0,paddingLeft:o=r,paddingRight:i=r,paddingTop:a=r,paddingBottom:s=r,margin:c=16,marginLeft:l=c,marginRight:u=c,marginTop:f=c,marginBottom:d=c,inset:p=0,insetLeft:h=p,insetRight:g=p,insetTop:m=p,insetBottom:y=p}=t,b=t=>"auto"===t?20:t;return{width:n-b(o)-b(i)-l-u-h-g,height:e-b(a)-b(s)-f-d-m-y}}(t),d={options:t,width:u,height:f};for(;l.length;){const[t]=l.splice(0,1),n=yield Qp(t,e),{type:a=mt("G2Mark type is required."),key:u}=n;if(i.has(a))c.push(n);else{const{props:t={}}=o(a),{composite:e=!0}=t;if(e){const{data:t}=n,e=Object.assign(Object.assign({},n),{data:t?Array.isArray(t)?t:t.value:t}),o=yield r(e,d),i=Array.isArray(o)?o:[o];l.unshift(...i.map((t,e)=>Object.assign(Object.assign({},t),{key:`${u}-${e}`})))}else s.push(n)}}return Object.assign(Object.assign({},t),{marks:s,components:c})})}(t,e),o=function(t){const{coordinate:e={},interaction:n={},style:r={},marks:o}=t,i=Lp(t,["coordinate","interaction","style","marks"]),a=o.map(t=>t.coordinate||{}),s=o.map(t=>t.interaction||{}),c=o.map(t=>t.viewStyle||{}),l=[...a,e].reduceRight((t,e)=>(0,N.A)(t,e),{}),u=[n,...s].reduce((t,e)=>(0,N.A)(t,e),{}),f=[...c,r].reduce((t,e)=>(0,N.A)(t,e),{});return Object.assign(Object.assign({},i),{marks:o,coordinate:l,interaction:u,style:f})}(r);t.interaction=o.interaction,t.coordinate=o.coordinate,t.marks=[...o.marks,...o.components];const i=lu(o,n);return Rp(yield Ip(i,e),i,n)})}function Ip(t,e){return Pp(this,void 0,void 0,function*(){const{library:n}=e,[r]=au("theme",n),[,o]=au("mark",n),{theme:i,marks:a,coordinates:s=[]}=t,c=r(Zp(i)),l=new Map;for(const t of a){const{type:n}=t,{props:r={}}=o(n),i=yield Sp(t,r,e);if(i){const[t,e]=i;l.set(t,e)}}const u=C(Array.from(l.values()).flatMap(t=>t.channels),({scaleKey:t})=>t);for(const t of u.values()){const e=t.reduce((t,{scale:e})=>(0,N.A)(t,e),{}),{scaleKey:r}=t[0],{values:o}=t[0],i=Array.from(new Set(o.map(t=>t.field).filter(bt))),a=(0,N.A)({guide:{title:0===i.length?void 0:i},field:i[0]},e),{name:l}=t[0],u=t.flatMap(({values:t})=>t.map(t=>t.value)),f=Object.assign(Object.assign({},ud(l,u,a,s,c,n)),{uid:Symbol("scale"),key:r});t.forEach(t=>t.scale=f)}return l})}function Np(t,e,n,r){return r((0,N.A)("string"==typeof e&&t.theme[e]||{},Object.assign({type:e},n)))}function Rp(t,e,n){var r;const[o]=au("mark",n),[i]=au("theme",n),[a]=au("labelTransform",n),{key:s,frame:c=!1,theme:l,clip:u,style:f={},labelTransform:d=[]}=e,p=i(Zp(l)),h=Array.from(t.values()),g=function(t,e){var n;const{components:r=[]}=e,o=["scale","encode","axis","legend","data","transform"],i=Array.from(new Set(t.flatMap(t=>t.channels.map(t=>t.scale)))),a=new Map(i.map(t=>[t.name,t]));for(const t of r){const e=gd(t);for(const r of e){const e=a.get(r),s=(null===(n=t.scale)||void 0===n?void 0:n[r])||{},{independent:c=!1}=s;if(e&&!c){const{guide:n}=e;e.guide=(0,N.A)({},"boolean"==typeof n?{}:n,t),Object.assign(e,s)}else{const e=Object.assign(Object.assign({},s),{expectedDomain:s.domain,name:r,guide:di(t,o)});i.push(e)}}}return i}(h,e),m=function(t){return t.map(t=>{const e=(0,N.A)(t,t.style);return delete e.style,e})}(Cd(function(t,e,n){var r;for(const[e]of n.entries())if("cell"===e.type)return t.filter(t=>"shape"!==t.name);if(1!==e.length||t.some(t=>"shape"===t.name))return t;const{defaultShape:o}=e[0];if(!["point","line","rect","hollow"].includes(o))return t;const i={point:"point",line:"hyphen",rect:"square",hollow:"hollow"},a=(null===(r=t.find(t=>"color"===t.name))||void 0===r?void 0:r.field)||null,s={field:a,name:"shape",type:"constant",domain:[],range:[i[o]]};return[...t,s]}(Array.from(g),h,t),e,n)),y=np(m,e,p,n),b=function(t,e,n){const[r]=au("coordinate",n),{innerHeight:o,innerWidth:i,insetLeft:a,insetTop:s,insetRight:c,insetBottom:l}=t,{coordinates:u=[]}=e,f=(d=u).find(t=>"cartesian"===t.type||"cartesian3D"===t.type)?d:[...d,{type:"cartesian"}];var d;const p="cartesian3D"===f[0].type,h=Object.assign(Object.assign({},t),{x:a,y:s,width:i-a-c,height:o-l-s,transformations:f.flatMap(r)});return p?new en.Coordinate3D(h):new en.Coordinate(h)}(y,e,n),v=c?(0,N.A)({mainLineWidth:1,mainStroke:"#000"},f):f;!function(t,e,n){const r=C(t,t=>`${t.plane||"xy"}-${t.position}`),{paddingLeft:o,paddingRight:i,paddingTop:a,paddingBottom:s,marginLeft:c,marginTop:l,marginBottom:u,marginRight:f,innerHeight:d,innerWidth:p,insetBottom:h,insetLeft:g,insetRight:m,insetTop:y,height:b,width:v,depth:x}=n,O={xy:op({width:v,height:b,paddingLeft:o,paddingRight:i,paddingTop:a,paddingBottom:s,marginLeft:c,marginTop:l,marginBottom:u,marginRight:f,innerHeight:d,innerWidth:p,insetBottom:h,insetLeft:g,insetRight:m,insetTop:y}),yz:op({width:x,height:b,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,marginLeft:0,marginTop:0,marginBottom:0,marginRight:0,innerWidth:x,innerHeight:b,insetBottom:0,insetLeft:0,insetRight:0,insetTop:0}),xz:op({width:v,height:x,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,marginLeft:0,marginTop:0,marginBottom:0,marginRight:0,innerWidth:v,innerHeight:x,insetBottom:0,insetLeft:0,insetRight:0,insetTop:0})};for(const[t,n]of r.entries()){const[r,o]=t.split("-"),i=O[r][o],[a,s]=Re(n,t=>"string"==typeof t.type&&("center"===o||!(!t.type.startsWith("axis")||!["inner","outer"].includes(o))));a.length&&ip(a,e,i,o),s.length&&ap(n,0,i)}}(Td(m),b,y),function(t){const e=t.find(({type:t})=>"axisX"===t),n=t.find(({type:t})=>"axisY"===t),r=t.find(({type:t})=>"axisZ"===t);e&&n&&r&&(e.plane="xy",n.plane="xy",r.plane="yz",r.origin=[e.bbox.x,e.bbox.y,0],r.eulerAngles=[0,-90,0],r.bbox.x=e.bbox.x,r.bbox.y=e.bbox.y,t.push(Object.assign(Object.assign({},e),{plane:"xz",showLabel:!1,showTitle:!1,origin:[e.bbox.x,e.bbox.y,0],eulerAngles:[-90,0,0]})),t.push(Object.assign(Object.assign({},n),{plane:"yz",showLabel:!1,showTitle:!1,origin:[n.bbox.x+n.bbox.width,n.bbox.y,0],eulerAngles:[0,-90,0]})),t.push(Object.assign(Object.assign({},r),{plane:"xz",actualPosition:"left",showLabel:!1,showTitle:!1,eulerAngles:[90,-90,0]})))}(m);const x=new Map(Array.from(t.values()).flatMap(t=>{const{channels:e}=t;return e.map(({scale:t})=>[t.uid,pd(t,n)])}));!function(t,e){const n=Array.from(t.values()).flatMap(t=>t.channels),r=B(n,t=>t.map(t=>e.get(t.scale.uid)),t=>t.name).filter(([,t])=>t.some(t=>"function"==typeof t.getOptions().groupTransform)&&t.every(t=>t.getTicks)).map(t=>t[1]);r.forEach(t=>{const e=t.map(t=>t.getOptions().groupTransform)[0];e(t)})}(t,x);const O={};for(const t of m){const{scales:e=[]}=t,o=[];for(const t of e){const{name:e,uid:i}=t,a=null!==(r=x.get(i))&&void 0!==r?r:pd(t,n);o.push(a),"y"===e&&a.update(Object.assign(Object.assign({},a.getOptions()),{xScale:O.x})),dd(O,{[e]:a})}t.scaleInstances=o}const w=[],j=new Map;for(const[e,n]of t.entries()){const{children:t,dataDomain:r,modifier:i,key:a,data:c}=e;j.set(a,c);const{index:l,channels:u,tooltip:f}=n,d=Te(Object.fromEntries(u.map(({name:t,scale:e})=>[t,e])),({uid:t})=>x.get(t));dd(O,d);const p=fd(u,d),h=o(e),[g,m,v]=Dp(h(l,d,p,b)),k=i?i(m,r||g.length,y):[],A=t=>{var e,n;return null===(n=null===(e=f.title)||void 0===e?void 0:e[t])||void 0===n?void 0:n.value},M=t=>f.items.map(e=>e[t]),_=g.map((t,e)=>{const n=Object.assign({points:m[e],transform:k[e],index:t,markKey:a,viewKey:s,data:c[t]},f&&{title:A(t),items:M(t)});for(const[r,o]of Object.entries(p))n[r]=o[t],v&&(n[`series${Ce(r)}`]=v[e].map(t=>o[t]));return v&&(n.seriesIndex=v[e]),v&&f&&(n.seriesItems=v[e].map(t=>M(t)),n.seriesTitle=v[e].map(t=>A(t))),n});n.data=_,n.index=g;const S=null==t?void 0:t(_,d,y);w.push(...S||[])}return[{layout:y,theme:p,coordinate:b,markState:t,key:s,clip:u,scale:O,style:v,components:m,data:j,options:e,labelTransform:ht(d.map(a))},w]}function Fp(t,e,n,r){return Pp(this,void 0,void 0,function*(){const{library:o}=r,{components:i,theme:a,layout:s,markState:c,coordinate:l,key:u,style:f,clip:d,scale:p}=t,{width:h,height:g}=s,m=Lp(s,["x","y","width","height"]),y=["view","plot","main","content"],b=y.map((t,e)=>e),v=y.map(t=>Ot(Object.assign({},a.view,f),t)),x=["a","margin","padding","inset"].map(t=>xt(m,t)),O=t=>t.style("x",t=>_[t].x).style("y",t=>_[t].y).style("width",t=>_[t].width).style("height",t=>_[t].height).each(function(t,e,n){!function(t,e){for(const[n,r]of Object.entries(e))t.style(n,r)}(_t(n),v[t])});let w=0,j=0,A=h,M=g;const _=b.map(t=>{const e=x[t],{left:n=0,top:r=0,bottom:o=0,right:i=0}=e;return w+=n,j+=r,A-=n+i,M-=r+o,{x:w,y:j,width:A,height:M}});e.selectAll(rh("area")).data(b.filter(t=>bt(v[t])),t=>y[t]).join(t=>t.append("rect").attr("className","area").style("zIndex",-2).call(O),t=>t.call(O),t=>t.remove());const S=function(t){let e=-1/0,n=1/0;for(const[r,o]of t){const{animate:t={}}=r,{data:i}=o,{enter:a={},update:s={},exit:c={}}=t,{type:l,duration:u=300,delay:f=0}=s,{type:d,duration:p=300,delay:h=0}=a,{type:g,duration:m=300,delay:y=0}=c;for(const t of i){const{updateType:r=l,updateDuration:o=u,updateDelay:i=f,enterType:a=d,enterDuration:s=p,enterDelay:c=h,exitDuration:b=m,exitDelay:v=y,exitType:x=g}=t;(void 0===r||r)&&(e=Math.max(e,o+i),n=Math.min(n,i)),(void 0===x||x)&&(e=Math.max(e,b+v),n=Math.min(n,v)),(void 0===a||a)&&(e=Math.max(e,s+c),n=Math.min(n,c))}}return e===-1/0?null:[n,e-n]}(c),E=!!S&&{duration:S[1]};for(const[,t]of z(i,t=>`${t.type}-${t.position}`))t.forEach((t,e)=>t.index=e);const P=e.selectAll(rh(Gc)).data(i,t=>`${t.type}-${t.position}-${t.index}`).join(t=>t.append("g").style("zIndex",({zIndex:t})=>t||-1).attr("className",Gc).append(t=>zd((0,N.A)({animate:E,scale:p},t),l,a,o,c)),t=>t.transition(function(t,e,n){const{preserve:r=!1}=t;if(r)return;const i=zd((0,N.A)({animate:E,scale:p},t),l,a,o,c),{attributes:s}=i,[u]=n.childNodes;return u.update(s,!1)})).transitions();n.push(...P.flat().filter(bt));const L=e.selectAll(rh("plot")).data([s],()=>u).join(t=>t.append("rect").style("zIndex",0).style("fill","transparent").attr("className","plot").call(th).call(nh,Array.from(c.keys())).call(oh,d),t=>t.call(nh,Array.from(c.keys())).call(th).call(oh,d)).transitions();n.push(...L.flat());for(const[i,a]of c.entries()){const{data:s}=a,{key:c,class:l,type:u}=i,f=e.select(`#${c}`),d=qp(i,a,t,r),p=Gp(i,a,t,o),h=Kp(i,a,t,o),g=Up(i,a,t,o),m=Wp(e,f,l,"element"),y=f.selectAll(rh(Xc)).selectFacetAll(m).data(s,t=>t.key,t=>t.groupKey).join(t=>t.append(d).attr("className",Xc).attr("markType",u).transition(function(t,e,n){return p(t,[n])}),t=>t.call(t=>{const e=t.parent(),n=vt(t=>{const[e,n]=t.getBounds().min;return[e,n]});t.transition(function(t,r,o){Hp(o,e,n);const i=d(t,r),a=h(t,[o],[i]);return(null==a?void 0:a.length)||(o.nodeName===i.nodeName&&"g"!==i.nodeName?yt(o,i):(o.parentNode.replaceChild(i,o),i.className=Xc,i.markType=u,i.__data__=o.__data__)),a}).each(function(t,e,n){n.__removed__&&(n.__removed__=!1)}).attr("markType",u).attr("className",Xc)}),t=>t.each(function(t,e,n){n.__removed__=!0}).transition(function(t,e,n){return g(t,[n])}).remove(),t=>t.append(d).attr("className",Xc).attr("markType",u).transition(function(t,e,n){const{__fromElements__:r}=n,o=h(t,r,[n]);return new St(r,null,n.parentNode).transition(o).remove(),o}),t=>t.transition(function(t,e,n){const r=new St([],n.__toData__,n.parentNode).append(d).attr("className",Xc).attr("markType",u).nodes();return h(t,[n],r)}).remove()).transitions();n.push(...y.flat())}!function(t,e,n,r,o){const[i]=au("labelTransform",r),{markState:a,labelTransform:s}=t,c=e.select(rh(Yc)).node(),l=new Map,u=new Map,f=Array.from(a.entries()).flatMap(([n,i])=>{const{labels:a=[],key:s}=n,c=function(t,e,n,r,o){const[i]=au("shape",r),{data:a,encode:s}=t,{data:c,defaultLabelShape:l}=e,u=c.map(t=>t.points),f=Te(s,t=>t.value),{theme:d,coordinate:p}=n,h=Object.assign(Object.assign({},o),{document:su(o),theme:d,coordinate:p});return t=>{const{index:e,points:n}=t,r=a[e],{formatter:o=t=>`${t}`,style:s,render:c,element:p}=t,g=Lp(t,["formatter","transform","style","render","selector","element"]),m=Te(Object.assign(Object.assign({},g),s),t=>$p(t,r,e,a,{channel:f,element:p})),{shape:y=l,text:b}=m,v=Lp(m,["shape","text"]),x="string"==typeof o?(0,ze.GP)(o):o,O=Object.assign(Object.assign({},v),{text:x(b,r,e,a),datum:r}),w=Object.assign({type:`label.${y}`,render:c},v);return i(w,h)(n,O,Yp(d,"label",y,"label"),u)}}(n,i,t,r,o),f=e.select(`#${s}`).selectAll(rh(Xc)).nodes().filter(t=>{var e;if(t.__removed__)return!1;return!("hidden"===(null===(e=t.style)||void 0===e?void 0:e.visibility)||t.children&&t.children.some(t=>{var e;return"hidden"===(null===(e=t.style)||void 0===e?void 0:e.visibility)}))});return a.flatMap((t,e)=>{const{transform:n=[]}=t,r=Lp(t,["transform"]);return f.flatMap(n=>{const o=function(t,e,n){const{seriesIndex:r,seriesKey:o,points:i,key:a,index:s}=n.__data__,c=function(t){const e=t.cloneNode(!0),n=t.getAnimations();e.style.visibility="hidden",n.forEach(t=>{const n=t.effect.getKeyframes();e.attr(n[n.length-1])}),t.parentNode.appendChild(e);const r=e.getLocalBounds();e.destroy();const{min:o,max:i}=r;return[o,i]}(n);if(!r)return[Object.assign(Object.assign({},t),{key:`${a}-${e}`,bounds:c,index:s,points:i,dependentElement:n})];const l=function(t){const{selector:e}=t;if(!e)return null;if("function"==typeof e)return e;if("first"===e)return t=>[t[0]];if("last"===e)return t=>[t[t.length-1]];throw new Error(`Unknown selector: ${e}`)}(t),u=r.map((r,a)=>Object.assign(Object.assign({},t),{key:`${o[a]}-${e}`,bounds:[i[a]],index:r,points:i,dependentElement:n}));return l?l(u):u}(r,e,n);return o.forEach(e=>{l.set(e,t=>c(Object.assign(Object.assign({},t),{element:n}))),u.set(e,t)}),o})})}),d=_t(c).selectAll(rh("label")).data(f,t=>t.key).join(t=>t.append(t=>l.get(t)(t)).attr("className","label"),t=>t.each(function(t,e,n){yt(n,l.get(t)(t))}),t=>t.remove()).nodes(),p=C(d,t=>u.get(t.__data__)),{coordinate:h,layout:g}=t,m={canvas:o.canvas,coordinate:h,layout:g};for(const[t,e]of p){const{transform:n=[]}=t;ht(n.map(i))(e,m)}s&&s(d,m)}(t,e,0,o,r),function(t,e,n,r){const o=t.scale,i=k(o,"y.options.breaks",[]),{document:a}=r.canvas;if([Vc,Kc].forEach(t=>{a.getElementsByClassName(t).forEach(t=>{t.remove()})}),!i.length)return;const s=e.select(rh("plot")).node(),[c]=au("shape",n),l=new Map;i.forEach((n,o)=>{l.set(n,c({type:"break"},{view:t,selection:e,context:r}))}),_t(s).selectAll(rh(Vc)).data(i,t=>t.key).join(t=>t.append((t,e)=>l.get(t)(t,e)).attr("className",Vc),t=>t.each(function(t,e,n){yt(n,l.get(t)(t,e))}),t=>t.remove()).nodes()}(t,e,o,r)})}function Dp([t,e,n]){if(n)return[t,e,n];const r=[],o=[];for(let n=0;n<t.length;n++){const i=t[n],a=e[n];a.every(([t,e])=>bt(t)&&bt(e))&&(r.push(i),o.push(a))}return[r,o]}function $p(t,e,n,r,o){return"function"==typeof t?t(e,n,r,o):"string"!=typeof t?t:kt(e)&&void 0!==e[t]?e[t]:t}function Wp(t,e,n,r){const o=t.node().parentElement;return o&&"function"==typeof o.findAll?o.findAll(t=>void 0!==t.style.facet&&t.style.facet===n&&t!==e.node()).flatMap(t=>t.getElementsByClassName(r)):[]}function Hp(t,e,n){if(!t.__facet__)return;const r=t.parentNode.parentNode,o=e.parentNode,[i,a]=n(r),[s,c]=n(o);!function(t,e){const{transform:n}=t.style,r=(t=>"none"===t||void 0===t)(n)?"":n;t.style.transform=`${r} ${e}`.trimStart()}(t,`translate(${i-s}, ${a-c})`),e.append(t)}function qp(t,e,n,r){const{library:o}=r,[i]=au("shape",o),{data:a,encode:s}=t,{defaultShape:c,data:l,shape:u}=e,f=Te(s,t=>t.value),d=l.map(t=>t.points),{theme:p,coordinate:h}=n,{type:g,style:m={}}=t,y=Object.assign(Object.assign({},r),{document:su(r),coordinate:h,theme:p});return e=>{const{shape:n=c}=m,{shape:r=n,points:o,seriesIndex:s,index:l}=e,h=Lp(e,["shape","points","seriesIndex","index"]),b=Object.assign(Object.assign({},h),{index:l}),v=s?s.map(t=>a[t]):a[l],x=s||l,O=Te(m,t=>$p(t,v,x,a,{channel:f}));return(u[r]?u[r](O,y):i(Object.assign(Object.assign({},O),{type:eh(t,r)}),y))(o,b,Yp(p,g,r,c),d)}}function Yp(t,e,n,r){if("string"!=typeof e)return;const{color:o}=t,i=t[e]||{};return Object.assign({color:o},i[n]||i[r])}function Xp(t,e,n,r,o){var i,a;const[,s]=au("shape",o),[c]=au("animation",o),{defaultShape:l,shape:u}=n,{theme:f,coordinate:d}=r,p=`default${Ce(t)}Animation`,{[p]:h}=(null===(i=u[l])||void 0===i?void 0:i.props)||s(eh(e,l)).props,{[t]:g={}}=f,m=(null===(a=e.animate)||void 0===a?void 0:a[t])||{},y={coordinate:d};return(e,n,r)=>{const{[`${t}Type`]:o,[`${t}Delay`]:i,[`${t}Duration`]:a,[`${t}Easing`]:s}=e,l=Object.assign({type:o||h},m);if(!l.type)return null;const u=c(l,y)(n,r,(0,N.A)(g,{delay:i,duration:a,easing:s}));let f=[];return f=Array.isArray(u)?u:[u],f.filter(Boolean)}}function Gp(t,e,n,r){return Xp("enter",t,e,n,r)}function Vp(t){return t.finished.then(()=>{t.cancel()}),t}function Kp(t,e,n,r){return Xp("update",t,e,n,r)}function Up(t,e,n,r){return Xp("exit",t,e,n,r)}function Zp(t={}){if("string"==typeof t)return{type:t};const{type:e="light"}=t,n=Lp(t,["type"]);return Object.assign(Object.assign({},n),{type:e})}function Jp(t){const{interaction:e={}}=t;return Object.entries((0,N.A)({event:!0,tooltip:!0,sliderFilter:!0,legendFilter:!0,scrollbarFilter:!0},e)).reverse()}function Qp(t,e){return Pp(this,void 0,void 0,function*(){const{data:n}=t,r=Lp(t,["data"]);if(null==n)return t;const[,{data:o}]=yield gp(0,{data:n},e);return Object.assign({data:o},r)})}function th(t){t.style("transform",t=>`translate(${t.paddingLeft+t.marginLeft}, ${t.paddingTop+t.marginTop})`).style("width",t=>t.innerWidth).style("height",t=>t.innerHeight)}function eh(t,e){const{type:n}=t;return"string"==typeof e?`${n}.${e}`:e}function nh(t,e){const n=t=>void 0!==t.class?`${t.class}`:"";if(0===t.nodes().length)return;t.selectAll(rh(qc)).data(e,t=>t.key).join(t=>t.append("g").attr("className",qc).attr("id",t=>t.key).style("facet",n).style("fill","transparent").style("zIndex",t=>{var e;return null!==(e=t.zIndex)&&void 0!==e?e:0}),t=>t.style("facet",n).style("fill","transparent").style("zIndex",t=>{var e;return null!==(e=t.zIndex)&&void 0!==e?e:0}),t=>t.remove());t.select(rh(Yc)).node()||t.append("g").attr("className",Yc).style("zIndex",0)}function rh(...t){return t.map(t=>`.${t}`).join("")}function oh(t,e){t.node()&&t.style("clipPath",t=>{if(!e)return null;const{paddingTop:n,paddingLeft:r,marginLeft:o,marginTop:i,innerWidth:a,innerHeight:s}=t;return new l.rw({style:{x:r+o,y:n+i,width:a,height:s}})})}function ih(t){const{style:e,scale:n,type:r}=t,o={},i=k(e,"columnWidthRatio");return i&&"interval"===r&&(o.x=Object.assign(Object.assign({},null==n?void 0:n.x),{padding:1-i})),Object.assign(Object.assign({},t),{scale:Object.assign(Object.assign({},n),o)})}const ah=t=>{if(!t||"string"!=typeof t)return t;const e=t.endsWith("%")?parseFloat(t.slice(0,-1))/100:parseFloat(t);if(isNaN(e)||e<0||e>1)throw new Error(`Invalid gap value: ${t}. It should be between 0 and 1.`);return e};function sh(t){const{axis:e}=t,n=k(e,"y.breaks");return n&&Hc(t,"scale.y.breaks",n.map(t=>Object.assign(Object.assign({key:`break-${t.start}-${t.end}`},t),{gap:ah(t.gap)}))),t}function ch(t){const e=function(t){return function(...t){return e=>t.reduce((t,e)=>e(t),e)}(ih,sh)(t)}(t);return e.children&&Array.isArray(e.children)&&(e.children=e.children.map(t=>ch(t))),e}function lh(t){const e=(0,N.A)({},t),n=new Map([[e,null]]),r=new Map([[null,-1]]),o=[e];for(;o.length;){const t=o.shift();if(void 0===t.key){const e=n.get(t),o=r.get(t);t.key=null===e?"0":`${e.key}-${o}`}const{children:e=[]}=t;if(Array.isArray(e))for(let i=0;i<e.length;i++){const a=(0,N.A)({},e[i]);e[i]=a,n.set(a,t),r.set(a,i),o.push(a)}}return e}function uh(t,e){const n=new u.A4;return n.registerPlugin(new O),new l.Hl({width:t,height:e,container:document.createElement("div"),renderer:n})}function fh(t,e={},n=()=>{},r=t=>{throw t}){const o=Pe(t),{width:i=640,height:a=480,depth:s=0}=o,c=lh(ch(o)),{canvas:l=uh(i,a),emitter:u=new A.A}=e;e.canvas=l,e.emitter=u,e.externals={};const{width:f,height:d}=l.getConfig();f===i&&d===a||l.resize(i,a),u.emit(Et);const p=_t(l.document.documentElement);return l.ready.then(()=>Cp(Object.assign(Object.assign({},c),{width:i,height:a,depth:s}),p,e)).then(()=>{if(s){const[t,e]=l.document.documentElement.getPosition();l.document.documentElement.setPosition(t,e,-s/2)}l.requestAnimationFrame(()=>{l.requestAnimationFrame(()=>{u.emit(Pt),null==n||n()})})}).catch(t=>{null==r||r(t)}),"string"==typeof(h=l.getConfig().container)?document.getElementById(h):h;var h}function dh(t,e={},n=!1,r=!0){const{canvas:o,emitter:i}=e;o&&(!function(t){const e=t.getRoot().querySelectorAll(".view");null==e||e.forEach(t=>{const{nameInteraction:e=new Map}=t;(null==e?void 0:e.size)>0&&Array.from(null==e?void 0:e.values()).forEach(t=>{null==t||t.destroy()})})}(o),n?o.destroy():o.destroyChildren()),r&&i.off()}function ph(t,e){let n,r=-1,o=-1;if(void 0===e)for(const e of t)++o,null!=e&&(n>e||void 0===n&&e>=e)&&(n=e,r=o);else for(let i of t)null!=(i=e(i,++o,t))&&(n>i||void 0===n&&i>=i)&&(n=i,r=o);return r}function hh(t,e){let n=0,r=0;if(void 0===e)for(let e of t)null!=e&&(e=+e)>=e&&(++n,r+=e);else{let o=-1;for(let i of t)null!=(i=e(i,++o,t))&&(i=+i)>=i&&(++n,r+=i)}if(n)return r/n}const gh=function(t,e,n){var r,o,i,a,s=0;n||(n={});var c=function(){s=!1===n.leading?0:Date.now(),r=null,a=t.apply(o,i),r||(o=i=null)},l=function(){var l=Date.now();s||!1!==n.leading||(s=l);var u=e-(l-s);return o=this,i=arguments,u<=0||u>e?(r&&(clearTimeout(r),r=null),s=l,a=t.apply(o,i),r||(o=i=null)):r||!1===n.trailing||(r=setTimeout(c,u)),a};return l.cancel=function(){clearTimeout(r),s=0,r=o=i=null},l};function mh(t){var e=document.createElement("div");e.innerHTML=t;var n=e.childNodes[0];return n&&e.contains(n)&&e.removeChild(n),n}const yh=function(t,e){return t&&e?t.replace(/\\?\{([^{}]+)\}/g,function(t,n){return"\\"===t.charAt(0)?t.slice(1):void 0===e[n]?"":e[n]}):t};var bh=function(t,e){null!=e?t.replaceChildren?Array.isArray(e)?t.replaceChildren.apply(t,(0,pn.fX)([],(0,pn.zs)(e),!1)):t.replaceChildren(e):(t.innerHTML="",Array.isArray(e)?e.forEach(function(e){return t.appendChild(e)}):t.appendChild(e)):t.innerHTML=""};function vh(t){return void 0===t&&(t=""),{CONTAINER:"".concat(t,"tooltip"),TITLE:"".concat(t,"tooltip-title"),LIST:"".concat(t,"tooltip-list"),LIST_ITEM:"".concat(t,"tooltip-list-item"),NAME:"".concat(t,"tooltip-list-item-name"),MARKER:"".concat(t,"tooltip-list-item-marker"),NAME_LABEL:"".concat(t,"tooltip-list-item-name-label"),VALUE:"".concat(t,"tooltip-list-item-value"),CROSSHAIR_X:"".concat(t,"tooltip-crosshair-x"),CROSSHAIR_Y:"".concat(t,"tooltip-crosshair-y")}}var xh={overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis"};function Oh(t){var e;void 0===t&&(t="");var n=vh(t);return(e={})[".".concat(n.CONTAINER)]={position:"absolute",visibility:"visible","z-index":8,transition:"visibility 0.2s cubic-bezier(0.23, 1, 0.32, 1), left 0.4s cubic-bezier(0.23, 1, 0.32, 1), top 0.4s cubic-bezier(0.23, 1, 0.32, 1)","background-color":"rgba(255, 255, 255, 0.96)","box-shadow":"0 6px 12px 0 rgba(0, 0, 0, 0.12)","border-radius":"4px",color:"rgba(0, 0, 0, 0.65)","font-size":"12px","line-height":"20px",padding:"12px","min-width":"120px","max-width":"360px","font-family":"Roboto-Regular"},e[".".concat(n.TITLE)]={color:"rgba(0, 0, 0, 0.45)"},e[".".concat(n.LIST)]={margin:"0px","list-style-type":"none",padding:"0px"},e[".".concat(n.LIST_ITEM)]={"list-style-type":"none",display:"flex","line-height":"2em","align-items":"center","justify-content":"space-between","white-space":"nowrap"},e[".".concat(n.MARKER)]={width:"8px",height:"8px","border-radius":"50%",display:"inline-block","margin-right":"4px"},e[".".concat(n.NAME)]={display:"flex","align-items":"center","max-width":"216px"},e[".".concat(n.NAME_LABEL)]=(0,pn.Cl)({flex:1},xh),e[".".concat(n.VALUE)]=(0,pn.Cl)({display:"inline-block",float:"right",flex:1,"text-align":"right","min-width":"28px","margin-left":"30px",color:"rgba(0, 0, 0, 0.85)"},xh),e[".".concat(n.CROSSHAIR_X)]={position:"absolute",width:"1px","background-color":"rgba(0, 0, 0, 0.25)"},e[".".concat(n.CROSSHAIR_Y)]={position:"absolute",height:"1px","background-color":"rgba(0, 0, 0, 0.25)"},e}var wh=function(t){function e(e){var n,r,o=this,i=null===(r=null===(n=e.style)||void 0===n?void 0:n.template)||void 0===r?void 0:r.prefixCls,a=vh(i);return(o=t.call(this,e,{data:[],x:0,y:0,visibility:"visible",title:"",position:"bottom-right",offset:[5,5],enterable:!1,container:{x:0,y:0},bounding:null,template:{prefixCls:"",container:'<div class="'.concat(a.CONTAINER,'"></div>'),title:'<div class="'.concat(a.TITLE,'"></div>'),item:'<li class="'.concat(a.LIST_ITEM,'" data-index={index}>\n <span class="').concat(a.NAME,'">\n <span class="').concat(a.MARKER,'" style="background:{color}"></span>\n <span class="').concat(a.NAME_LABEL,'" title="{name}">{name}</span>\n </span>\n <span class="').concat(a.VALUE,'" title="{value}">{value}</span>\n </li>')},style:Oh(i)})||this).timestamp=-1,o.prevCustomContentKey=o.attributes.contentKey,o.initShape(),o.render(o.attributes,o),o}return(0,pn.C6)(e,t),Object.defineProperty(e.prototype,"HTMLTooltipElement",{get:function(){return this.element},enumerable:!1,configurable:!0}),e.prototype.getContainer=function(){return this.element},Object.defineProperty(e.prototype,"elementSize",{get:function(){return{width:this.element.offsetWidth,height:this.element.offsetHeight}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"HTMLTooltipItemsElements",{get:function(){var t=this.attributes,e=t.template;return t.data.map(function(t,n){var r=t.name,o=void 0===r?"":r,i=t.color,a=void 0===i?"black":i,s=t.index,c=(0,pn.Tt)(t,["name","color","index"]),l=(0,pn.Cl)({name:o,color:a,index:null!=s?s:n},c);return mh(yh(e.item,l))})},enumerable:!1,configurable:!0}),e.prototype.render=function(t,e){this.renderHTMLTooltipElement(),this.updatePosition()},e.prototype.destroy=function(){var e;null===(e=this.element)||void 0===e||e.remove(),t.prototype.destroy.call(this)},e.prototype.show=function(t,e){var n=this;if(void 0!==t&&void 0!==e){var r=function(){n.attributes.x=null!=t?t:n.attributes.x,n.attributes.y=null!=e?e:n.attributes.y,n.updatePosition()};"hidden"===this.element.style.visibility?this.closeTransition(r):r()}this.element.style.visibility="visible"},e.prototype.hide=function(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.attributes.enterable&&this.isCursorEntered(t,e)||(this.element.style.visibility="hidden")},e.prototype.initShape=function(){this.element=mh(this.attributes.template.container),this.id&&this.element.setAttribute("id",this.id)},e.prototype.renderCustomContent=function(){if(void 0===this.prevCustomContentKey||this.prevCustomContentKey!==this.attributes.contentKey){this.prevCustomContentKey=this.attributes.contentKey;var t=this.attributes.content;t&&("string"==typeof t?this.element.innerHTML=t:bh(this.element,t))}},e.prototype.renderHTMLTooltipElement=function(){var t,e,n=this.attributes,r=n.template,o=n.title,i=n.enterable,a=n.style,s=n.content,c=vh(r.prefixCls),l=this.element;if(this.element.style.pointerEvents=i?"auto":"none",s)this.renderCustomContent();else{o?(l.innerHTML=r.title,l.getElementsByClassName(c.TITLE)[0].innerHTML=o):null===(e=null===(t=l.getElementsByClassName(c.TITLE))||void 0===t?void 0:t[0])||void 0===e||e.remove();var u=this.HTMLTooltipItemsElements,f=document.createElement("ul");f.className=c.LIST,bh(f,u);var d=this.element.querySelector(".".concat(c.LIST));d?d.replaceWith(f):l.appendChild(f)}!function(t,e){Object.entries(e).forEach(function(e){var n=(0,pn.zs)(e,2),r=n[0],o=n[1];(0,pn.fX)([t],(0,pn.zs)(t.querySelectorAll(r)),!1).filter(function(t){return t.matches(r)}).forEach(function(t){t&&(t.style.cssText+=Object.entries(o).reduce(function(t,e){return"".concat(t).concat(e.join(":"),";")},""))})})}(l,a)},e.prototype.getRelativeOffsetFromCursor=function(t){var e=this.attributes,n=e.offset,r=(t||e.position).split("-"),o={left:[-1,0],right:[1,0],top:[0,-1],bottom:[0,1]},i=this.elementSize,a=i.width,s=i.height,c=[-a/2,-s/2];return r.forEach(function(t){var e=(0,pn.zs)(c,2),r=e[0],i=e[1],l=(0,pn.zs)(o[t],2);c=[r+(a/2+n[0])*l[0],i+(s/2+n[1])*l[1]]}),c},e.prototype.setOffsetPosition=function(t){var e=(0,pn.zs)(t,2),n=e[1],r=this.attributes,o=r.x,i=r.y,a=void 0===i?0:i,s=r.container,c=s.y;this.element.style.left="".concat(+(void 0===o?0:o)+s.x+e[0],"px"),this.element.style.top="".concat(+a+c+n,"px")},e.prototype.updatePosition=function(){var t=this.attributes.showDelay,e=void 0===t?60:t,n=Date.now();this.timestamp>0&&n-this.timestamp<e||(this.timestamp=n,this.setOffsetPosition(this.autoPosition(this.getRelativeOffsetFromCursor())))},e.prototype.autoPosition=function(t){var e=(0,pn.zs)(t,2),n=e[0],r=e[1],o=this.attributes,i=o.bounding,a=o.position;if(!i)return[n,r];var s=this.element,c=s.offsetWidth,l=s.offsetHeight,u=(0,pn.zs)([+o.x+n,+o.y+r],2),f=u[0],d=u[1],p={left:"right",right:"left",top:"bottom",bottom:"top"},h=i.x,g=i.y,m={left:f<h,right:f+c>h+i.width,top:d<g,bottom:d+l>g+i.height},y=[];a.split("-").forEach(function(t){y.push(m[t]?p[t]:t)});var b=y.join("-");return this.getRelativeOffsetFromCursor(b)},e.prototype.isCursorEntered=function(t,e){if(this.element){var n=this.element.getBoundingClientRect();return new hi(n.x,n.y,n.width,n.height).isPointIn(t,e)}return!1},e.prototype.closeTransition=function(t){var e=this,n=this.element.style.transition;this.element.style.transition="none",t(),setTimeout(function(){e.element.style.transition=n},10)},e.tag="tooltip",e}(Sn),jh=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const kh="tooltipLocked";function Ah(t,e){var n;if(e)return"string"==typeof e?document.querySelector(e):e;const r=null===(n=t.ownerDocument)||void 0===n?void 0:n.defaultView;if(!r)return;return r.getContextService().getDomElement().parentElement}function Mh(t,e,n,r,o,i,a,s={},c=[10,10]){const l={[Je("tooltip")]:{},[Je("tooltip-title")]:{overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis"}},u=new wh({className:"tooltip",style:{x:e,y:n,container:a,data:[],bounding:i,position:r,enterable:o,title:"",offset:c,template:{prefixCls:"g2-"},style:(0,N.A)(l,s)}});return t.appendChild(u.HTMLTooltipElement),u}function _h({root:t,data:e,x:n,y:r,render:o,event:i,single:a,position:s="right-bottom",enterable:c=!1,css:l,mount:u,bounding:f,offset:d}){const p=Ah(t,u),h=Ah(t),g=a?h:t,m=f||function(t){const e=t.getRenderBounds(),{min:[n,r],max:[o,i]}=e;return{x:n,y:r,width:o-n,height:i-r}}(t),y=function(t,e){const n=t.getBoundingClientRect(),r=e.getBoundingClientRect();return{x:n.x-r.x,y:n.y-r.y}}(h,p),{tooltipElement:b=Mh(p,n,r,s,c,m,y,l,d)}=g,{items:v,title:x=""}=e;b.update(Object.assign({x:n,y:r,data:v.map(t=>Object.assign(Object.assign({},t),{value:t.value||0===t.value?t.value:""})),title:x,position:s,enterable:c,container:y},void 0!==o&&{content:o(i,{items:v,title:x})})),g.tooltipElement=b}function Sh({root:t,single:e,emitter:n,nativeEvent:r=!0,event:o=null}){r&&n.emit("tooltip:hide",{nativeEvent:r});const i=Ah(t),a=e?i:t,{tooltipElement:s}=a;s&&s.hide(null==o?void 0:o.clientX,null==o?void 0:o.clientY),Nh(t),Rh(t),Fh(t)}function Eh({root:t,single:e}){const n=Ah(t),r=e?n:t;if(!r)return;const{tooltipElement:o}=r;o&&(o.destroy(),r.tooltipElement=void 0),Nh(t),Rh(t),Fh(t)}function Ph(t){const{value:e}=t;return Object.assign(Object.assign({},t),{value:void 0===e?"undefined":e})}function Lh(t){const{__data__:e}=t;if(ut(t))return function(t){var e,n,r,o,i,a,s;const{__data__:c}=t,{title:l,items:u=[]}=c;if(u.some(t=>pp in t)){const e=u.filter(bt).map(e=>{var{color:n=Ch(t)}=e,r=jh(e,["color"]);return Object.assign(Object.assign({},r),{color:n})}).map(Ph);return Object.assign(Object.assign({},l&&{title:l}),{items:e})}const f=null!==(n=null===(e=null==c?void 0:c.normalized)||void 0===e?void 0:e.x)&&void 0!==n?n:0,d=null===(r=t.parentNode)||void 0===r?void 0:r.__data__,p=null!==(o=null==d?void 0:d.encode)&&void 0!==o?o:{},{x:h={},y:g={},color:m={}}=p,{value:y=[]}=h,{value:b=[]}=g,{value:v=[]}=m,x=Math.min(Math.round(y.length*f),y.length-1);return{title:`${y[x]}, ${b[x]}`,items:[{name:null!==(i=m.field)&&void 0!==i?i:"value",value:v[x],color:(null===(a=t.style)||void 0===a?void 0:a.fill)||(null===(s=t.getAttribute)||void 0===s?void 0:s.call(t,"color"))||"#000"}]}}(t);const{title:n,items:r=[]}=e,o=r.filter(bt).map(e=>{var{color:n=Ch(t)}=e,r=jh(e,["color"]);return Object.assign(Object.assign({},r),{color:n})}).map(Ph);return Object.assign(Object.assign({},n&&{title:n}),{items:o})}function Ch(t){const e=t.getAttribute("fill"),n=t.getAttribute("stroke"),{__data__:r}=t,{color:o=(e&&"transparent"!==e?e:n)}=r;return o}function zh(t,e=t=>t){const n=new Map(t.map(t=>[e(t),t]));return Array.from(n.values())}function Th(t,e,n,r=t.map(t=>t.__data__),o={}){const i=t=>t instanceof Date?+t:t,a=zh(r.map(t=>t.title),i).filter(bt),s=r.flatMap((r,i)=>{const a=r.element||t[i],{items:s=[],title:c}=r,l=s.filter(bt),u=void 0!==n?n:s.length<=1;return l.map(t=>{var{color:n=Ch(a)||o.color,name:i}=t,s=jh(t,["color","name"]);const l=dt(e,r),f=u&&!(pp in s)?l||i:i||l;return Object.assign(Object.assign({},s),{color:n,name:f||c})})}).map(Ph);return Object.assign(Object.assign({},a.length>0&&{title:a.join(",")}),{items:zh(s,t=>`(${i(t.name)}, ${i(t.value)}, ${i(t.color)})`)})}function Bh(t,e,n,r){var{plotWidth:o,plotHeight:i,mainWidth:a,mainHeight:s,startX:c,startY:u,transposed:f,polar:d,insetLeft:p,insetTop:h}=r,g=jh(r,["plotWidth","plotHeight","mainWidth","mainHeight","startX","startY","transposed","polar","insetLeft","insetTop"]);const m=Object.assign({lineWidth:1,stroke:"#1b1e23",strokeOpacity:.5},g),y=((t,e)=>{if(1===e.length)return e[0];const n=e.map(e=>Ks(e,t)),r=ph(n,t=>t);return e[r]})(n,e);if(d){const[e,n,r]=(()=>{const t=c+p+a/2,e=u+h+s/2;return[t,e,Ks([t,e],y)]})(),o=t.ruleX||((e,n,r)=>{const o=new l.jl({style:Object.assign({cx:e,cy:n,r},m)});return t.appendChild(o),o})(e,n,r);o.style.cx=e,o.style.cy=n,o.style.r=r,t.ruleX=o}else{const[e,n,r,a]=f?[c+y[0],c+y[0],u,u+i]:[c,c+o,y[1]+u,y[1]+u],s=t.ruleX||((e,n,r,o)=>{const i=new l.N1({style:Object.assign({x1:e,x2:n,y1:r,y2:o},m)});return t.appendChild(i),i})(e,n,r,a);s.style.x1=e,s.style.x2=n,s.style.y1=r,s.style.y2=a,t.ruleX=s}}function Ih(t,e,n){var{plotWidth:r,plotHeight:o,mainWidth:i,mainHeight:a,startX:s,startY:c,transposed:u,polar:f,insetLeft:d,insetTop:p}=n,h=jh(n,["plotWidth","plotHeight","mainWidth","mainHeight","startX","startY","transposed","polar","insetLeft","insetTop"]);const g=Object.assign({lineWidth:1,stroke:"#1b1e23",strokeOpacity:.5},h),m=e.map(t=>t[1]),y=e.map(t=>t[0]),b=hh(m),v=hh(y),[x,O,w,j]=(()=>{if(f){const t=Math.min(i,a)/2,e=s+d+i/2,n=c+p+a/2,r=Us(Gs([v,b],[e,n]));return[e,e+t*Math.cos(r),n,n+t*Math.sin(r)]}return u?[s,s+r,b+c,b+c]:[v+s,v+s,c,c+o]})();if(y.length>0){const e=t.ruleY||(()=>{const e=new l.N1({style:Object.assign({x1:x,x2:O,y1:w,y2:j},g)});return t.appendChild(e),e})();e.style.x1=x,e.style.x2=O,e.style.y1=w,e.style.y2=j,t.ruleY=e}}function Nh(t){t.ruleY&&(t.ruleY.remove(),t.ruleY=void 0)}function Rh(t){t.ruleX&&(t.ruleX.remove(),t.ruleX=void 0)}function Fh(t){t.markers&&(t.markers.forEach(t=>t.remove()),t.markers=[])}function Dh(t,e){return Array.from(t.values()).some(t=>{var n;return null===(n=t.interaction)||void 0===n?void 0:n[e]})}function $h(t,e){return void 0===t?e:t}function Wh(t){const{title:e,items:n}=t;return 0===n.length&&void 0===e}function Hh({root:t,event:e,elements:n=[],coordinate:r,scale:o,shared:i}){var a,s;const c=n.filter(t=>!(t=>tn.includes(t.markType))(t)),l=c.length>0&&c.every(t=>"interval"===t.markType)&&!rn(r),u=o.x,f=function(t){const{x:e}=t;if(!e||!e.valueBandWidth)return!0;const{valueBandWidth:n}=e;return!!(0,tt.A)(n)||1===new Set(n.values()).size}(o),d=o.series,p=null!==(s=null===(a=null==u?void 0:u.getBandWidth)||void 0===a?void 0:a.call(u))&&void 0!==s?s:0,h=d&&d.valueBandWidth?t=>{const e=Math.round(1/d.valueBandWidth);return t.__data__.x+t.__data__.series*p+p/(2*e)}:t=>t.__data__.x+p/2;l&&c.sort((t,e)=>h(t)-h(e));const g=t=>{const{target:e=Ho(n)}=t;return Ul(e,e=>!!e.classList&&(ut(e)&&Hc(e,"__data__.normalized",function(t,e){const{innerWidth:n,innerHeight:r,marginLeft:o,paddingLeft:i,insetLeft:a,marginTop:s,paddingTop:c,insetTop:l}=t.getOptions();return{x:(e.x-o-i-a)/n,y:(e.y-s-c-l)/r}}(r,{x:t.offsetX,y:t.offsetY})),e.classList.includes("element")))},m=l?e=>{const n=Sl(t,e);if(!n)return;const[o]=r.invert(n),a=(0,rl.A)(h).center,s=f?a(c,o):function(t,e){const{adjustedRange:n,valueBandWidth:r,valueStep:o}=t,i=Array.from(r.values()),a=Array.from(o.values()),s=n.map((t,e)=>{const n=(a[e]-i[e])/2;return[t-n,t+i[e]+n]}),c=s.findIndex(([t,n])=>t<=e&&e<=n);return-1!==c?c:e>.5?n.length-1:0}(u,o),l=c[s];if(!i){const t=c.find(t=>t!==l&&h(t)===h(l));if(t)return g(e)||t}return l}:g;return m(e)}function qh({root:t,event:e,elements:n,coordinate:r,scale:o,startX:i,startY:a}){const s=nn(r),c=[],l=[];for(const t of n){if(tn.includes(t.markType))continue;const{__data__:e}=t,{seriesX:n,title:r,items:o}=e;n?c.push(t):(r||o)&&l.push(t)}const u=l.length&&l.every(t=>"interval"===t.markType)&&!rn(r),f=t=>t.__data__.x,d=!!o.x.getBandWidth&&l.length>0;c.sort((t,e)=>{const n=s?0:1,r=t=>t.getBounds().min[n];return s?r(e)-r(t):r(t)-r(e)});const p=t=>{const e=s?1:0,{min:n,max:r}=t.getLocalBounds();return Pc([n[e],r[e]])};l.sort(u?(t,e)=>f(t)-f(e):(t,e)=>{const[n,r]=p(t),[o,i]=p(e),a=(n+r)/2,c=(o+i)/2;return s?c-a:a-c});const h=new Map(c.map(t=>{const{__data__:e}=t,{seriesX:n}=e,r=n.map((t,e)=>e),o=Pc(r,t=>n[+t]);return[t,[o,n]]})),{x:g}=o,m=(null==g?void 0:g.getBandWidth)?g.getBandWidth()/2:0,y=t=>{const[e]=r.invert(t);return e-m},b=(t,e,n,r)=>{const{_x:o}=t,i=void 0!==o?g.map(o):y(e),a=r.filter(bt),[s,c]=Pc([a[0],a[a.length-1]]);if(!d&&(i<s||i>c)&&!(s===c))return null;const l=(0,rl.A)(t=>r[+t]).center;return n[l(n,i)]},v=u?(t,e)=>{const n=e[(0,(0,rl.A)(f).center)(e,y(t))];return C(e,f).get(f(n))}:(t,e)=>{const n=t[s?1:0],r=e.filter(t=>{const[e,r]=p(t);return n>=e&&n<=r});if(!d||r.length>0)return r;const o=(0,rl.A)(t=>{const[e,n]=p(t);return(e+n)/2}).center;return[e[o(e,n)]].filter(bt)},x=(t,e)=>{const{__data__:n}=t;return Object.fromEntries(Object.entries(n).filter(([t])=>t.startsWith("series")&&"series"!==t).map(([t,n])=>{const r=n[e];return[D(t.replace("series","")),r]}))},O=Sl(t,e);if(!O)return;const w=[O[0]-i,O[1]-a];if(!w)return;const j=v(w,l),k=[],A=[];for(const t of c){const[n,o]=h.get(t),i=b(e,w,n,o);if(null!==i){k.push(t);const e=x(t,i),{x:n,y:o}=e,a=r.map([(n||0)+m,o||0]);A.push([Object.assign(Object.assign({},e),{element:t}),a])}}const M=Array.from(new Set(A.map(t=>t[0].x))),_=M[ph(M,t=>Math.abs(t-y(w)))],S=A.filter(t=>t[0].x===_),E=[...S.map(t=>t[0]),...j.map(t=>t.__data__)];return{selectedElements:[...k,...j],selectedData:E,filteredSeriesData:S,abstractX:y}}function Yh(t,e){var{elements:n,sort:r,filter:o,scale:i,coordinate:a,crosshairs:s,crosshairsX:c,crosshairsY:u,render:f,groupName:d,emitter:p,wait:h=50,leading:g=!0,trailing:m=!1,startX:y=0,startY:b=0,body:v=!0,single:x=!0,position:O,enterable:w,mount:j,bounding:k,theme:A,offset:M,disableNative:_=!1,marker:S=!0,preserve:E=!1,style:P={},css:L={},clickLock:C=!1,disableAutoHide:z=!1}=e,T=jh(e,["elements","sort","filter","scale","coordinate","crosshairs","crosshairsX","crosshairsY","render","groupName","emitter","wait","leading","trailing","startX","startY","body","single","position","enterable","mount","bounding","theme","offset","disableNative","marker","preserve","style","css","clickLock","disableAutoHide"]);const B=n(t),I=(0,N.A)(P,T),R=rn(a),F=nn(a),{innerWidth:D,innerHeight:$,width:W,height:H,insetLeft:q,insetTop:Y}=a.getOptions(),X=gh(e=>{var n;if(C&&t.getAttribute(kh))return;const h=Sl(t,e);if(!h)return;const g=_l(t),m=g.min[0],_=g.min[1],{selectedElements:E,selectedData:P,filteredSeriesData:z,abstractX:T}=qh({root:t,event:e,elements:B,coordinate:a,scale:i,startX:y,startY:b}),N=Th(E,i,d,P,A);if(r&&N.items.sort((t,e)=>r(t)-r(e)),o&&(N.items=N.items.filter(o)),0===E.length||Wh(N))return void G(e);if(v&&_h({root:t,data:N,x:h[0]+m,y:h[1]+_,render:f,event:e,single:x,position:O,enterable:w,mount:j,bounding:k,css:L,offset:M}),s||c||u){const e=xt(I,"crosshairs"),n=Object.assign(Object.assign({},e),xt(I,"crosshairsX")),r=Object.assign(Object.assign({},e),xt(I,"crosshairsY")),o=z.map(t=>t[1]);c&&Bh(t,o,h,Object.assign(Object.assign({},n),{plotWidth:D,plotHeight:$,mainWidth:W,mainHeight:H,insetLeft:q,insetTop:Y,startX:y,startY:b,transposed:F,polar:R})),u&&Ih(t,o,Object.assign(Object.assign({},r),{plotWidth:D,plotHeight:$,mainWidth:W,mainHeight:H,insetLeft:q,insetTop:Y,startX:y,startY:b,transposed:F,polar:R}))}if(S){const e=xt(I,"marker");!function(t,{data:e,style:n,theme:r}){t.markers&&t.markers.forEach(t=>t.remove());const{type:o=""}=n,i=e.filter(t=>{const[{x:e,y:n}]=t;return bt(e)&&bt(n)}).map(t=>{const[{color:e,element:i},a]=t,s=e||i.style.fill||i.style.stroke||r.color;return new l.jl({className:"g2-tooltip-marker",style:Object.assign({cx:a[0],cy:a[1],fill:"hollow"===o?"transparent":s,r:4,stroke:"hollow"===o?s:"#fff",lineWidth:2,pointerEvents:"none"},n)})});for(const e of i)t.appendChild(e);t.markers=i}(t,{data:z,style:e,theme:A})}const X=null===(n=z[0])||void 0===n?void 0:n[0].x,V=null!=X?X:T(focus);p.emit("tooltip:show",Object.assign(Object.assign({},e),{nativeEvent:!0,data:Object.assign(Object.assign({},N),{data:{x:sl(i.x,V,!0)}})}))},h,{leading:g,trailing:m}),G=e=>{C&&t.getAttribute(kh)||z||Sh({root:t,single:x,emitter:p,event:e})},V=()=>{Eh({root:t,single:x})},K=e=>{var n,{nativeEvent:r,data:o,offsetX:s,offsetY:c}=e,l=jh(e,["nativeEvent","data","offsetX","offsetY"]);if(r)return;const u=null===(n=null==o?void 0:o.data)||void 0===n?void 0:n.x,f=i.x.map(u),[d,p]=a.map([f,.5]),h=_l(t),g=h.min[0],m=h.min[1];X(Object.assign(Object.assign({},l),{offsetX:void 0!==s?s:g+d,offsetY:void 0!==c?c:m+p,_x:u}))},U=()=>{Sh({root:t,single:x,emitter:p,nativeEvent:!1})},Z=()=>{nt(),V()},J=e=>{Sl(t,e)||G(e)},Q=()=>{et()},tt=e=>{C&&t.setAttribute(kh,!t.getAttribute(kh)),X(e)},et=()=>{_||(t.addEventListener("pointerdown",tt),t.addEventListener("pointerenter",X),t.addEventListener("pointermove",X),t.addEventListener("pointerleave",J),t.addEventListener("pointerup",G))},nt=()=>{_||(t.removeEventListener("pointerdown",tt),t.removeEventListener("pointerenter",X),t.removeEventListener("pointermove",X),t.removeEventListener("pointerleave",J),t.removeEventListener("pointerup",G))};return et(),p.on("tooltip:show",K),p.on("tooltip:hide",U),p.on("tooltip:disable",Z),p.on("tooltip:enable",Q),()=>{nt(),p.off("tooltip:show",K),p.off("tooltip:hide",U),p.off("tooltip:disable",Z),p.off("tooltip:enable",Q),E?Sh({root:t,single:x,emitter:p,nativeEvent:!1}):V()}}function Xh(t){const{shared:e,crosshairs:n,crosshairsX:r,crosshairsY:o,series:i,item:a=()=>({}),facet:s=!1}=t,c=jh(t,["shared","crosshairs","crosshairsX","crosshairsY","series","name","item","facet"]);return(t,l,u)=>{const{container:f,view:d}=t,{scale:p,markState:h,coordinate:g,theme:m}=d,y=Dh(h,"seriesTooltip"),b=Dh(h,"crosshairs"),v=Ml(f),x=$h(i,y),O=$h(n,b);if(c.clickLock&&!s&&v.setAttribute(kh,!1),x&&function(t){return Array.from(t.values()).some(t=>{var e;return(null===(e=t.interaction)||void 0===e?void 0:e.seriesTooltip)&&t.tooltip})}(h)&&!s)return Yh(v,Object.assign(Object.assign({},c),{theme:m,elements:jl,scale:p,coordinate:g,crosshairs:O,crosshairsX:$h($h(r,n),!1),crosshairsY:$h(o,O),item:a,emitter:u}));if(x&&s){const e=l.filter(e=>e!==t&&e.options.parentKey===t.options.key),i=kl(t,l),s=e[0].view.scale,f=v.getBounds(),d=f.min[0],p=f.min[1];Object.assign(s,{facet:!0});const h=v.parentNode.parentNode;return c.clickLock&&h.setAttribute(kh,!1),Yh(h,Object.assign(Object.assign({},c),{theme:m,elements:()=>i,scale:s,coordinate:g,crosshairs:$h(n,b),crosshairsX:$h($h(r,n),!1),crosshairsY:$h(o,O),item:a,startX:d,startY:p,emitter:u}))}return function(t,{elements:e,coordinate:n,scale:r,render:o,groupName:i,sort:a,filter:s,emitter:c,wait:l=50,leading:u=!0,trailing:f=!1,groupKey:d=t=>t,single:p=!0,position:h,enterable:g,datum:m,view:y,mount:b,bounding:v,theme:x,offset:O,shared:w=!1,body:j=!0,disableNative:k=!1,preserve:A=!1,css:M={},clickLock:_=!1,disableAutoHide:S=!1}){const E=e(t),P=C(E,d),L=gh(e=>{if(_&&t.getAttribute(kh))return;const l=Hh({root:t,event:e,elements:E,coordinate:n,scale:r,shared:w});if(!l)return void(S||Sh({root:t,single:p,emitter:c,event:e}));const u=d(l),f=P.get(u);if(!f)return;const m=1!==f.length||w?Th(f,r,i,void 0,x):Lh(f[0]);if(a&&m.items.sort((t,e)=>a(t)-a(e)),s&&(m.items=m.items.filter(s)),Wh(m))return void(S||Sh({root:t,single:p,emitter:c,event:e}));const{offsetX:k,offsetY:A}=e;j&&_h({root:t,data:m,x:k,y:A,render:o,event:e,single:p,position:h,enterable:g,mount:b,bounding:v,css:M,offset:O}),c.emit("tooltip:show",Object.assign(Object.assign({},e),{nativeEvent:!0,data:Object.assign(Object.assign({},m),{data:ft(l,y)})}))},l,{leading:u,trailing:f}),z=e=>{S||Sh({root:t,single:p,emitter:c,event:e})},T=e=>{_&&t.setAttribute(kh,!t.getAttribute(kh)),L(e)},B=()=>{k||(t.addEventListener("pointerdown",T),t.addEventListener("pointermove",L),t.addEventListener("pointerleave",z),t.addEventListener("pointerup",z))},I=()=>{k||(t.removeEventListener("pointerdown",T),t.removeEventListener("pointermove",L),t.removeEventListener("pointerleave",z),t.removeEventListener("pointerup",z))},N=({nativeEvent:e,offsetX:n,offsetY:r,data:o})=>{if(e)return;const{data:i}=o,a=Xl(E,i,m);if(!a)return;const s=a.getBBox(),{x:c,y:l,width:u,height:f}=s,d=t.getBBox();L({target:a,offsetX:void 0!==n?n+d.x:c+u/2,offsetY:void 0!==r?r+d.y:l+f/2})},R=({nativeEvent:e}={})=>{e||Sh({root:t,single:p,emitter:c,nativeEvent:!1})},F=()=>{I(),Eh({root:t,single:p})},D=()=>{B()};return c.on("tooltip:show",N),c.on("tooltip:hide",R),c.on("tooltip:enable",D),c.on("tooltip:disable",F),B(),()=>{I(),c.off("tooltip:show",N),c.off("tooltip:hide",R),c.off("tooltip:enable",D),c.off("tooltip:disable",F),A?Sh({root:t,single:p,emitter:c,nativeEvent:!1}):Eh({root:t,single:p})}}(v,Object.assign(Object.assign({},c),{datum:Cl(d),elements:jl,scale:p,coordinate:g,groupKey:e?t=>t.__data__.x:void 0,item:a,emitter:u,view:d,theme:m,shared:e}))}}Xh.props={reapplyWhenUpdate:!0};const Gh=t=>t?parseInt(t):0;function Vh(t,e){const n=[t];for(;n.length;){const t=n.shift();e&&e(t);const r=t.children||[];for(const t of r)n.push(t)}}class Kh{constructor(t={},e){this.parentNode=null,this.children=[],this.index=0,this.type=e,this.value=t}map(t=t=>t){const e=t(this.value);return this.value=e,this}attr(t,e){return 1===arguments.length?this.value[t]:this.map(n=>(n[t]=e,n))}append(t){const e=new t({});return e.children=[],this.push(e),e}push(t){return t.parentNode=this,t.index=this.children.length,this.children.push(t),this}remove(){const t=this.parentNode;if(t){const{children:e}=t,n=e.findIndex(t=>t===this);e.splice(n,1)}return this}getNodeByKey(t){let e=null;return Vh(this,n=>{t===n.attr("key")&&(e=n)}),e}getNodesByType(t){const e=[];return Vh(this,n=>{t===n.type&&e.push(n)}),e}getNodeByType(t){let e=null;return Vh(this,n=>{e||t===n.type&&(e=n)}),e}call(t,...e){return t(this.map(),...e),this}getRoot(){let t=this;for(;t&&t.parentNode;)t=t.parentNode;return t}}var Uh=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const Zh=["width","height","depth","padding","paddingLeft","paddingRight","paddingBottom","paddingTop","inset","insetLeft","insetRight","insetTop","insetBottom","margin","marginLeft","marginRight","marginTop","marginBottom","autoFit","theme","title","interaction"],Jh="__remove__",Qh="__callback__";function tg(t){return Object.assign(Object.assign({},t.value),{type:t.type})}function eg(t,e){const{width:n,height:r,autoFit:o,depth:i=0}=t;let a=640,s=480;if(o){const{width:t,height:n}=function(t){const e=getComputedStyle(t),n=t.clientWidth||Gh(e.width),r=t.clientHeight||Gh(e.height);return{width:n-(Gh(e.paddingLeft)+Gh(e.paddingRight)),height:r-(Gh(e.paddingTop)+Gh(e.paddingBottom))}}(e);a=t||a,s=n||s}return a=n||a,s=r||s,{width:Math.max((0,tt.A)(a)?a:1,1),height:Math.max((0,tt.A)(s)?s:1,1),depth:i}}function ng(t){const e=function(t){if(null!==t.type)return t;const e=t.children[t.children.length-1];for(const n of Zh)e.attr(n,t.attr(n));return e}(t),n=[e],r=new Map;for(r.set(e,tg(e));n.length;){const t=n.pop(),e=r.get(t),{children:o=[]}=t;for(const t of o)if(t.type===Qh)e.children=t.value;else{const o=tg(t),{children:i=[]}=e;i.push(o),n.push(t),r.set(t,o),e.children=i}}return r.get(e)}function rg(t,e,n,r,o){const{type:i}=t,{type:a=n||i}=e;if(function(t,e){return"function"!=typeof t&&new Set(Object.keys(e)).has(t)}(a,o)){for(const n of Zh)void 0!==t.attr(n)&&void 0===e[n]&&(e[n]=t.attr(n));return e}if(function(t,e){return"function"==typeof t||new Set(Object.keys(e)).has(t)}(a,r)){const t={type:"view"},n=Object.assign({},e);for(const e of Zh)void 0!==n[e]&&(t[e]=n[e],delete n[e]);return Object.assign(Object.assign({},t),{children:[n]})}return e}function og(t,e,n){if("function"==typeof t){const e=new Kh;return e.value=t,e.type=Qh,e}const{type:r}=t,o=Uh(t,["type","children"]),i=function(t,e,n){if("function"==typeof t)return e.mark;const r=Object.assign(Object.assign({},e),n)[t];if(!r)throw new Error(`Unknown mark: ${t}.`);return r}(r,e,n),a=new i;return a.value=o,a.type=r,a}function ig(t,e){const{type:n}=e,r=Uh(e,["type","children"]);t.type===n||void 0===n?Mt(t.value,r):"string"==typeof n&&(t.type=n,t.value=r)}function ag(t,e,n,r){if(!t)return;const o=[[t,e]];for(;o.length;){const[t,e]=o.shift(),i=og(e,n,r);Array.isArray(t.children)&&t.push(i);const{children:a}=e;if(Array.isArray(a))for(const t of a)o.push([i,t]);else"function"==typeof a&&o.push([i,a])}}function sg(t,e,{key:n=e}){t.prototype[e]=function(t){return 0===arguments.length?this.attr(n):this.attr(n,t)}}function cg(t,e,{key:n=e}){t.prototype[e]=function(t){if(0===arguments.length)return this.attr(n);if(Array.isArray(t))return this.attr(n,t);const e=[...this.attr(n)||[],t];return this.attr(n,e)}}function lg(t,e,{key:n=e}){t.prototype[e]=function(t,e){if(0===arguments.length)return this.attr(n);if(1===arguments.length&&"string"!=typeof t)return this.attr(n,t);const r=this.attr(n)||{};return r[t]=1===arguments.length||e,this.attr(n,r)}}function ug(t,e,n){t.prototype[e]=function(t){if(0===arguments.length)return this.attr(e);if(Array.isArray(t))return this.attr(e,{items:t});if(kt(t)&&(void 0!==t.title||void 0!==t.items))return this.attr(e,t);if(null===t||!1===t)return this.attr(e,t);const n=this.attr(e)||{},{items:r=[]}=n;return r.push(t),n.items=r,this.attr(e,n)}}function fg(t,e,{ctor:n}){t.prototype[e]=function(t){const r=this.append(n);return"mark"===e&&(r.type=t),r}}function dg(t,e,{ctor:n}){t.prototype[e]=function(){return this.type=null,this.append(n)}}function pg(t){return e=>{for(const[n,r]of Object.entries(t)){const{type:t}=r;"value"===t?sg(e,n,r):"array"===t?cg(e,n,r):"object"===t?lg(e,n,r):"node"===t?fg(e,n,r):"container"===t?dg(e,n,r):"mix"===t&&ug(e,n)}return e}}function hg(t){return Object.fromEntries(Object.entries(t).map(([t,e])=>[t,{type:"node",ctor:e}]))}const gg={encode:{type:"object"},scale:{type:"object"},data:{type:"value"},transform:{type:"array"},style:{type:"object"},animate:{type:"object"},coordinate:{type:"object"},interaction:{type:"object"},label:{type:"array",key:"labels"},axis:{type:"object"},legend:{type:"object"},slider:{type:"object"},scrollbar:{type:"object"},state:{type:"object"},layout:{type:"object"},theme:{type:"object"},title:{type:"value"}},mg=Object.assign(Object.assign({},gg),{tooltip:{type:"mix"},viewStyle:{type:"object"}}),yg=Object.assign(Object.assign({},gg),{labelTransform:{type:"array"}});var bg=function(t,e,n,r){var o,i=arguments.length,a=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,n,a):o(e,n))||a);return i>3&&a&&Object.defineProperty(e,n,a),a};let vg=class extends Kh{changeData(t){var e;const n=this.getRoot();if(n)return this.attr("data",t),(null===(e=this.children)||void 0===e?void 0:e.length)&&this.children.forEach(e=>{e.attr("data",t)}),null==n?void 0:n.render()}getView(){const t=this.getRoot(),{views:e}=t.getContext();if(null==e?void 0:e.length)return e.find(t=>t.key===this._key)}getScale(){var t;return null===(t=this.getView())||void 0===t?void 0:t.scale}getScaleByChannel(t){const e=this.getScale();if(e)return e[t]}getCoordinate(){var t;return null===(t=this.getView())||void 0===t?void 0:t.coordinate}getTheme(){var t;return null===(t=this.getView())||void 0===t?void 0:t.theme}getGroup(){const t=this._key;if(!t)return;return this.getRoot().getContext().canvas.getRoot().getElementById(t)}show(){const t=this.getGroup();t&&!t.isVisible()&&Ol(t)}hide(){const t=this.getGroup();t&&t.isVisible()&&xl(t)}};vg=bg([pg(yg)],vg);var xg=function(t,e,n,r){var o,i=arguments.length,a=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,n,a):o(e,n))||a);return i>3&&a&&Object.defineProperty(e,n,a),a};let Og=class extends Kh{changeData(t){const e=this.getRoot();if(e)return this.attr("data",t),null==e?void 0:e.render()}getMark(){var t;const e=null===(t=this.getRoot())||void 0===t?void 0:t.getView();if(!e)return;const{markState:n}=e,r=Array.from(n.keys()).find(t=>t.key===this.attr("key"));return n.get(r)}getScale(){var t;const e=null===(t=this.getRoot())||void 0===t?void 0:t.getView();if(e)return null==e?void 0:e.scale}getScaleByChannel(t){var e,n;const r=null===(e=this.getRoot())||void 0===e?void 0:e.getView();if(r)return null===(n=null==r?void 0:r.scale)||void 0===n?void 0:n[t]}getGroup(){const t=this.attr("key");if(!t)return;return this.getRoot().getContext().canvas.getRoot().getElementById(t)}};Og=xg([pg(mg)],Og);const wg={};var jg=function(t,e,n,r){var o,i=arguments.length,a=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,n,a):o(e,n))||a);return i>3&&a&&Object.defineProperty(e,n,a),a},kg=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const Ag="G2_CHART_KEY";const Mg=()=>[["cartesian"]];Mg.props={};const _g=()=>[["transpose"],["translate",.5,.5],["reflect.x"],["translate",-.5,-.5]];_g.props={transform:!0};const Sg=t=>{const{startAngle:e,endAngle:n,innerRadius:r,outerRadius:o}=((t={})=>{const e={startAngle:-Math.PI/2,endAngle:3*Math.PI/2,innerRadius:0,outerRadius:1};return Object.assign(Object.assign({},e),t)})(t);return[["transpose"],["translate",.5,.5],["reflect.x"],["translate",-.5,-.5],...Ge({startAngle:e,endAngle:n,innerRadius:r,outerRadius:o})]};Sg.props={};const Eg=()=>[["parallel",0,1,0,1]];Eg.props={};const Pg=({focusX:t=0,focusY:e=0,distortionX:n=2,distortionY:r=2,visual:o=!1})=>[["fisheye",t,e,n,r,o]];Pg.props={transform:!0};const Lg=t=>{const{startAngle:e=-Math.PI/2,endAngle:n=3*Math.PI/2,innerRadius:r=0,outerRadius:o=1}=t;return[["parallel",0,1,0,1],...Ge({startAngle:e,endAngle:n,innerRadius:r,outerRadius:o})]};Lg.props={};const Cg=({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]];Cg.props={};const zg=({value:t})=>e=>e.map(()=>t);zg.props={};const Tg=({value:t})=>e=>e.map(e=>e[t]);Tg.props={};const Bg=({value:t})=>e=>e.map(t);Bg.props={};const Ig=({value:t})=>()=>t;function Ng(t,e){if(null!==t)return{type:"column",value:t,field:e}}function Rg(t,e){const n=Ng(t,e);return Object.assign(Object.assign({},n),{inferred:!0})}function Fg(t,e){if(null!==t)return{type:"column",value:t,field:e,visual:!0}}function Dg(t,e){const n=Ng(t,e);return Object.assign(Object.assign({},n),{constant:!1})}function $g(t,e){const n=[];for(const r of t)n[r]=e;return n}function Wg(t,e){const n=t[e];if(!n)return[null,null];const{value:r,field:o=null}=n;return[r,o]}function Hg(t,...e){for(const n of e){if("string"!=typeof n)return[n,null];{const[e,r]=Wg(t,n);if(null!==e)return[e,r]}}return[null,null]}function qg(t){return!(t instanceof Date)&&"object"==typeof t}Ig.props={};const Yg=()=>(t,e)=>{const{encode:n}=e,{y1:r}=n;return void 0!==r?[t,e]:[t,(0,N.A)({},e,{encode:{y1:Rg($g(t,0))}})]};Yg.props={};const Xg=()=>(t,e)=>{const{encode:n}=e,{x:r}=n;return void 0!==r?[t,e]:[t,(0,N.A)({},e,{encode:{x:Rg($g(t,0))},scale:{x:{guide:null}}})]};Xg.props={};const Gg=(t,e)=>gl(Object.assign({colorAttribute:"fill"},t),e);Gg.props=Object.assign(Object.assign({},gl.props),{defaultMarker:"square"});const Vg=(t,e)=>gl(Object.assign({colorAttribute:"stroke"},t),e);function Kg(){}function Ug(t){this._context=t}function Zg(t){return new Ug(t)}Vg.props=Object.assign(Object.assign({},gl.props),{defaultMarker:"hollowSquare"}),Ug.prototype={areaStart:Kg,areaEnd:Kg,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))}};var Jg=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};function Qg(t,e,n,r,o){const[i,a,s,c]=t;if(nn(r)){if(o){return[[n?n[1][0]:i[0],i[1]],a,s,[n?n[2][0]:c[0],c[1]]]}return[i,[e?e[0][0]:a[0],a[1]],[e?e[3][0]:s[0],s[1]],c]}if(o){return[[i[0],n?n[1][1]:i[1]],a,s,[c[0],n?n[2][1]:c[1]]]}return[i,[a[0],e?e[0][1]:a[1]],[s[0],e?e[3][1]:s[1]],c]}const tm=(t,e)=>e/Math.tan(t/2);function em(t,e){const[n,r,o,i]=t,[a,s,c,l]=e,u=r[0]-n[0]>o[0]-i[0],f=Math.atan2(Math.abs(r[1]-o[1]),Math.abs(r[0]-o[0])),d=u?[tm(f,a),tm(f,s),c,l]:[a,s,tm(f,c),tm(f,l)],p=u?1:-1,h=d.map(t=>((t,e,n)=>({x:Math.cos(t)*e*n,y:Math.sin(t)*e}))(f,t,p));return[`M${n[0]+d[0]} ${n[1]}`,`L${r[0]-d[1]} ${r[1]}`,`Q${r[0]} ${r[1]} ${r[0]-h[1].x} ${r[1]+h[1].y}`,`L${o[0]+h[2].x} ${o[1]-h[2].y}`,`Q${o[0]} ${o[1]} ${o[0]-d[2]} ${o[1]}`,`L${i[0]+d[3]} ${i[1]}`,`Q${i[0]} ${i[1]} ${i[0]-h[3].x} ${i[1]-h[3].y}`,`L${n[0]+h[0].x} ${n[1]+h[0].y}`,`Q${n[0]} ${n[1]} ${n[0]+d[0]} ${n[1]}`,"Z"].join(" ")}const nm=(t,e)=>{const{adjustPoints:n=Qg,radius:r,radiusTopLeft:o=r,radiusTopRight:i=r,radiusBottomRight:a=r,radiusBottomLeft:s=r,innerRadius:c=0,innerRadiusTopLeft:l=c,innerRadiusTopRight:u=c,innerRadiusBottomRight:f=c,innerRadiusBottomLeft:d=c,first:p=!0,last:h=!0}=t,g=Jg(t,["adjustPoints","radius","radiusTopLeft","radiusTopRight","radiusBottomRight","radiusBottomLeft","innerRadius","innerRadiusTopLeft","innerRadiusTopRight","innerRadiusBottomRight","innerRadiusBottomLeft","first","last"]),{coordinate:m,document:y}=e;return(t,e,r,c)=>{const{index:b}=e,{color:v}=r,x=Jg(r,["color"]),O=n(t,c[b+1],c[b-1],m,g.reverse),w=!!nn(m),[j,k,A,M]=w?oc(O):O,{color:_=v,opacity:S}=e,E=[p&&null!=o?o:l,p&&null!=i?i:u,h&&null!=a?a:f,h&&null!=s?s:d],P=E.find(t=>t>0)?em([j,k,A,M],E):(0,uc.A)().curve(Zg)([j,k,A,M]);return _t(y.createElement("path",{})).call(ec,x).style("d",P).style("fill",_).style("fillOpacity",S).call(ec,g).node()}};function rm(t,e,n,r,o){const[i,a,s,c]=t;if(nn(r)){if(o){return[[n?n[1][0]:(i[0]+c[0])/2,i[1]],a,s,[n?n[2][0]:(i[0]+c[0])/2,c[1]]]}return[i,[e?e[0][0]:(a[0]+s[0])/2,a[1]],[e?e[3][0]:(a[0]+s[0])/2,s[1]],c]}if(o){return[[i[0],n?n[1][1]:(i[1]+c[1])/2],a,s,[c[0],n?n[2][1]:(i[1]+c[1])/2]]}return[i,[a[0],e?e[0][1]:(a[1]+s[1])/2],[s[0],e?e[3][1]:(a[1]+s[1])/2],c]}nm.props={defaultMarker:"square"};const om=(t,e)=>nm(Object.assign({adjustPoints:rm},t),e);function im(t){return Math.abs(t)>10?String(t):t.toString().padStart(2,"0")}function am(t){const e=`${t.getFullYear()}-${im(t.getMonth()+1)}-${im(t.getDate())}`,n=t.getHours(),r=t.getMinutes(),o=t.getSeconds();return n||r||o?`${e} ${im(n)}:${im(r)}:${im(o)}`:e}om.props={defaultMarker:"square"};const sm=(t={})=>{const{channel:e="x"}=t;return(t,n)=>{const{encode:r}=n,{tooltip:o}=n;if(At(o))return[t,n];const{title:i}=o;if(void 0!==i)return[t,n];const a=Object.keys(r).filter(t=>t.startsWith(e)).filter(t=>!r[t].inferred).map(t=>Wg(r,t)).filter(([t])=>t).map(t=>t[0]);if(0===a.length)return[t,n];const s=[];for(const e of t)s[e]={value:a.map(t=>t[e]instanceof Date?am(t[e]):t[e]).join(", ")};return[t,(0,N.A)({},n,{tooltip:{title:s}})]}};sm.props={};const cm=t=>{const{channel:e}=t;return(t,n)=>{const{encode:r,tooltip:o}=n;if(At(o))return[t,n];const{items:i=[]}=o;if(!i||i.length>0)return[t,n];const a=(Array.isArray(e)?e:[e]).flatMap(t=>Object.keys(r).filter(e=>e.startsWith(t)).map(t=>{const{field:e,value:n,inferred:o=!1,aggregate:i}=r[t];return o?null:i&&n?{channel:t}:e?{field:e}:n?{channel:t}:null}).filter(t=>null!==t));return[t,(0,N.A)({},n,{tooltip:{items:a}})]}};cm.props={};var lm=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const um=()=>(t,e)=>{const{encode:n}=e,{key:r}=n,o=lm(n,["key"]);if(void 0!==r)return[t,e];const i=Object.values(o).map(({value:t})=>t),a=t.map(t=>i.filter(Array.isArray).map(e=>e[t]).join("-"));return[t,(0,N.A)({},e,{encode:{key:Ng(a)}})]};function fm(t={}){const{shapes:e}=t;return[{name:"color"},{name:"opacity"},{name:"shape",range:e},{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 dm(t={}){return[...fm(t),{name:"title",scale:"identity"}]}function pm(){return[{type:sm,channel:"color"},{type:cm,channel:["x","y"]}]}function hm(){return[{type:sm,channel:"x"},{type:cm,channel:["y"]}]}function gm(t={}){return fm(t)}function mm(){return[{type:um}]}function ym(t,e){return t.getBandWidth(t.invert(e))}function bm(t,e,n={}){const{x:r,y:o,series:i}=e,{x:a,y:s,series:c}=t,{style:{bandOffset:l=(c?0:.5),bandOffsetX:u=l,bandOffsetY:f=l}={}}=n,d=!!(null==a?void 0:a.getBandWidth),p=!!(null==s?void 0:s.getBandWidth),h=!!(null==c?void 0:c.getBandWidth);return d||p?(t,e)=>{const n=d?ym(a,r[e]):0,l=p?ym(s,o[e]):0,g=h&&i?(ym(c,i[e])/2+ +i[e])*n:0,[m,y]=t;return[m+u*n+g,y+f*l]}:t=>t}function vm(t){return parseFloat(t)/100}function xm(t,e,n,r){const{x:o,y:i}=n,{innerWidth:a,innerHeight:s}=r.getOptions(),c=Array.from(t,t=>{const e=o[t],n=i[t];return[["string"==typeof e?vm(e)*a:+e,"string"==typeof n?vm(n)*s:+n]]});return[t,c]}function Om(t){return"function"==typeof t?t:e=>e[t]}function wm(t,e){return Array.from(t,Om(e))}function jm(t,e){const n=function(t){return Array.isArray(t)?{links:t}:t&&"object"==typeof t?{links:t.links||[],nodes:t.nodes}:{links:[]}}(t),{source:r=t=>t.source,target:o=t=>t.target,value:i=t=>t.value}=e,{links:a,nodes:s}=n;if(!a.length)return{links:[],nodes:s||[]};const c=wm(a,r),l=wm(a,o),u=wm(a,i);return{links:a.map((t,e)=>({target:l[e],source:c[e],value:u[e]})),nodes:s||Array.from(new Set([...c,...l]),t=>({key:t}))}}function km(t,e){return t.getBandWidth(t.invert(e))}um.props={};const Am={rect:Gg,hollow:Vg,funnel:nm,pyramid:om},Mm=()=>(t,e,n,r)=>{const{x:o,y1:i,series:a,size:s}=n;let{y:c}=n;c=c.map(t=>void 0!==t?t:1);const l=e.x,u=e.series,[f]=r.getSize(),d=s?s.map(t=>+t/f):null,p=s?(t,e,n)=>{const r=t+e/2,o=d[n];return[r-o/2,r+o/2]}:(t,e,n)=>[t,t+e],h=Array.from(t,t=>{const e=km(l,o[t]),n=e*(u?km(u,null==a?void 0:a[t]):1),s=+o[t]+(+(null==a?void 0:a[t])||0)*e,[f,d]=p(s,n,t),h=+c[t],g=+i[t];return[[f,h],[d,h],[d,g],[f,g]].map(t=>r.map(t))});return[t,h]};Mm.props={defaultShape:"rect",defaultLabelShape:"label",composite:!1,shape:Am,channels:[...dm({shapes:Object.keys(Am)}),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"series",scale:"band"},{name:"size"}],preInference:[...mm(),{type:Yg},{type:Xg}],postInference:[...hm()],interaction:{shareTooltip:!0}};const _m={rect:Gg,hollow:Vg},Sm=()=>(t,e,n,r)=>{const{x:o,x1:i,y:a,y1:s}=n,c=Array.from(t,t=>[[+o[t],+a[t]],[+i[t],+a[t]],[+i[t],+s[t]],[+o[t],+s[t]]].map(t=>r.map(t)));return[t,c]};Sm.props={defaultShape:"rect",defaultLabelShape:"label",composite:!1,shape:_m,channels:[...dm({shapes:Object.keys(_m)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...mm(),{type:Yg}],postInference:[...hm()],interaction:{shareTooltip:!0}};var Em=n("./node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/curve/linear.js"),Pm=Cm(Em.A);function Lm(t){this._curve=t}function Cm(t){function e(e){return new Lm(t(e))}return e._curve=t,e}function zm(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(Cm(t)):e()._curve},t}Lm.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))}};var Tm=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const Bm=fc(t=>{const{d1:e,d2:n,style1:r,style2:o}=t.attributes,i=t.ownerDocument;_t(t).maybeAppend("line",()=>i.createElement("path",{})).style("d",e).call(ec,r),_t(t).maybeAppend("line1",()=>i.createElement("path",{})).style("d",n).call(ec,o)});const Im=(t,e)=>{const{curve:n,gradient:r=!1,gradientColor:o="between",defined:i=t=>!Number.isNaN(t)&&null!=t,connect:a=!1}=t,s=Tm(t,["curve","gradient","gradientColor","defined","connect"]),{coordinate:c,document:l}=e;return(t,e,u)=>{const{color:f,lineWidth:d}=u,p=Tm(u,["color","lineWidth"]),{color:h=f,size:g=d,seriesColor:m,seriesX:y,seriesY:b}=e,v=sc(c,e),x=nn(c),O=r&&m?rc(m,y,b,r,o,x):h,w=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},p),O&&{stroke:O}),g&&{lineWidth:g}),v&&{transform:v}),s);let j;if(rn(c)){const t=c.getCenter();j=e=>zm((0,uc.A)().curve(Pm)).angle((n,r)=>Zs(Gs(e[r],t))).radius((n,r)=>Ks(e[r],t)).defined(([t,e])=>i(t)&&i(e)).curve(n)(e)}else j=(0,uc.A)().x(t=>t[0]).y(t=>t[1]).defined(([t,e])=>i(t)&&i(e)).curve(n);const[k,A]=function(t,e){const n=[],r=[];let o=!1,i=null;for(const a of t)e(a[0])&&e(a[1])?(n.push(a),o&&(o=!1,r.push([i,a])),i=a):o=!0;return[n,r]}(t,i),M=xt(w,"connect"),_=!!A.length;if(!_||a&&!Object.keys(M).length)return _t(l.createElement("path",{})).style("d",j(k)||[]).call(ec,w).node();if(_&&!a)return _t(l.createElement("path",{})).style("d",j(t)).call(ec,w).node();return _t(new Bm).style("style1",Object.assign(Object.assign({},w),M)).style("style2",w).style("d1",(S=A,S.map(j).join(","))).style("d2",j(t)).node();var S}};Im.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const Nm=(t,e)=>{const{coordinate:n}=e;return(...r)=>{const o=rn(n)?Zg:Em.A;return Im(Object.assign({curve:o},t),e)(...r)}};function Rm(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 Fm(t,e){this._context=t,this._k=(1-e)/6}Nm.props=Object.assign(Object.assign({},Im.props),{defaultMarker:"line"}),Fm.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:Rm(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:Rm(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 t(e){function n(t){return new Fm(t,e)}return n.tension=function(e){return t(+e)},n})(0);function Dm(t,e){this._context=t,this._k=(1-e)/6}Dm.prototype={areaStart:Kg,areaEnd:Kg,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:Rm(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 t(e){function n(t){return new Dm(t,e)}return n.tension=function(e){return t(+e)},n})(0);function $m(t,e,n){var r=t._x1,o=t._y1,i=t._x2,a=t._y2;if(t._l01_a>1e-12){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,c=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/c,o=(o*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/c}if(t._l23_a>1e-12){var l=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,u=3*t._l23_a*(t._l23_a+t._l12_a);i=(i*l+t._x1*t._l23_2a-e*t._l12_2a)/u,a=(a*l+t._y1*t._l23_2a-n*t._l12_2a)/u}t._context.bezierCurveTo(r,o,i,a,t._x2,t._y2)}function Wm(t,e){this._context=t,this._alpha=e}Wm.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){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(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:$m(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}};(function t(e){function n(t){return e?new Wm(t,e):new Fm(t,0)}return n.alpha=function(e){return t(+e)},n})(.5);function Hm(t,e){this._context=t,this._alpha=e}Hm.prototype={areaStart:Kg,areaEnd:Kg,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){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(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:$m(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}};const qm=function t(e){function n(t){return e?new Hm(t,e):new Dm(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function Ym(t){return t<0?-1:1}function Xm(t,e,n){var r=t._x1-t._x0,o=e-t._x1,i=(t._y1-t._y0)/(r||o<0&&-0),a=(n-t._y1)/(o||r<0&&-0),s=(i*o+a*r)/(r+o);return(Ym(i)+Ym(a))*Math.min(Math.abs(i),Math.abs(a),.5*Math.abs(s))||0}function Gm(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function Vm(t,e,n){var r=t._x0,o=t._x1,i=t._y1,a=(o-r)/3;t._context.bezierCurveTo(r+a,t._y0+a*e,o-a,i-a*n,o,i)}function Km(t){this._context=t}function Um(t){this._context=new Zm(t)}function Zm(t){this._context=t}function Jm(t){return new Km(t)}function Qm(t){return new Um(t)}Km.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Vm(this,this._t0,Gm(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(e=+e,(t=+t)!==this._x1||e!==this._y1){switch(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,Vm(this,Gm(this,n=Xm(this,t,e)),n);break;default:Vm(this,this._t0,n=Xm(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(Um.prototype=Object.create(Km.prototype)).point=function(t,e){Km.prototype.point.call(this,e,t)},Zm.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,r,o,i){this._context.bezierCurveTo(e,t,r,n,i,o)}};var ty=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const ey=(t,e)=>{const n=ty(t,[]),{coordinate:r}=e;return(...t)=>{const o=rn(r)?qm:nn(r)?Qm:Jm;return Im(Object.assign({curve:o},n),e)(...t)}};function ny(t,e){this._context=t,this._t=e}function ry(t){return new ny(t,.5)}function oy(t){return new ny(t,0)}function iy(t){return new ny(t,1)}ey.props=Object.assign(Object.assign({},Im.props),{defaultMarker:"smooth"}),ny.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(),this._line>=0&&(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:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var 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 ay=(t,e)=>Im(Object.assign({curve:iy},t),e);ay.props=Object.assign(Object.assign({},Im.props),{defaultMarker:"hv"});const sy=(t,e)=>Im(Object.assign({curve:oy},t),e);sy.props=Object.assign(Object.assign({},Im.props),{defaultMarker:"vh"});const cy=(t,e)=>Im(Object.assign({curve:ry},t),e);cy.props=Object.assign(Object.assign({},Im.props),{defaultMarker:"hvh"});var ly=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};function uy(t,e,n,r,o){const i=Us(Gs(n,e)),a=i+Math.PI/2,s=[r/2*Math.cos(a),r/2*Math.sin(a)],c=[o/2*Math.cos(a),o/2*Math.sin(a)],l=[o/2*Math.cos(i),o/2*Math.sin(i)],u=[r/2*Math.cos(i),r/2*Math.sin(i)],f=Vs(e,s),d=Vs(n,c),p=Vs(d,l),h=Vs(n,l),g=Gs(h,c),m=Gs(n,c),y=Gs(e,s),b=Gs(y,u),v=Gs(e,u),x=Gs(f,u);t.moveTo(...f),t.lineTo(...d),t.arcTo(...p,...h,o/2),t.arcTo(...g,...m,o/2),t.lineTo(...y),t.arcTo(...b,...v,r/2),t.arcTo(...x,...f,r/2),t.closePath()}const fy=(t,e)=>{const{document:n}=e;return(e,r,o)=>{const{seriesSize:i,color:a}=r,{color:s}=o,c=ly(o,["color"]),l=(0,nl.Ae)();for(let t=0;t<e.length-1;t++){const n=e[t],r=e[t+1],o=i[t],a=i[t+1];[...n,...r].every(bt)&&uy(l,n,r,o,a)}return _t(n.createElement("path",{})).call(ec,c).style("fill",a||s).style("d",l.toString()).call(ec,t).node()}};fy.props=Object.assign(Object.assign({},Im.props),{defaultMarker:"line"});const dy=()=>(t,e)=>{const{style:n={},encode:r}=e,{series:o}=r,{gradient:i}=n;return!i||o?[t,e]:[t,(0,N.A)({},e,{encode:{series:Fg($g(t,void 0))}})]};dy.props={};const py=()=>(t,e)=>{const{encode:n}=e,{series:r,color:o}=n;if(void 0!==r||void 0===o)return[t,e];const[i,a]=Wg(n,"color");return[t,(0,N.A)({},e,{encode:{series:Ng(i,a)}})]};py.props={};const hy={line:Nm,smooth:ey,hv:ay,vh:sy,hvh:cy,trail:fy},gy=(t,e,n,r)=>{var o,i;const{series:a,x:s,y:c}=n,{x:l,y:u}=e;if(void 0===s||void 0===c)throw new Error("Missing encode for x or y channel.");const f=a?Array.from(C(t,t=>a[t]).values()):[t],d=f.map(t=>t[0]).filter(t=>void 0!==t),p=((null===(o=null==l?void 0:l.getBandWidth)||void 0===o?void 0:o.call(l))||0)/2,h=((null===(i=null==u?void 0:u.getBandWidth)||void 0===i?void 0:i.call(u))||0)/2,g=Array.from(f,t=>t.map(t=>r.map([+s[t]+p,+c[t]+h])));return[d,g,f]},my=(t,e,n,r)=>{const o=Object.entries(n).filter(([t])=>t.startsWith("position")).map(([,t])=>t);if(0===o.length)throw new Error("Missing encode for position channel.");rn(r)&&o.push(o[0]);const i=Array.from(t,t=>{const e=o.map(e=>+e[t]),n=r.map(e),i=[];for(let t=0;t<n.length;t+=2)i.push([n[t],n[t+1]]);return i});return[t,i]},yy=()=>(t,e,n,r)=>(sn(r)?my:gy)(t,e,n,r);yy.props={defaultShape:"line",defaultLabelShape:"label",composite:!1,shape:hy,channels:[...dm({shapes:Object.keys(hy)}),{name:"x"},{name:"y"},{name:"position",independent:!0},{name:"size"},{name:"series",scale:"band"}],preInference:[...mm(),{type:dy},{type:py}],postInference:[...hm(),{type:sm,channel:"color"},{type:cm,channel:["position"]}],interaction:{shareTooltip:!0,seriesTooltip:!0,crosshairs:!0}};var by=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const vy=(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"]];vy.style=["fill"];const xy=vy.bind(void 0);xy.style=["stroke","lineWidth"];const Oy=(t,e,n)=>[["M",t-n,e-n],["L",t+n,e-n],["L",t+n,e+n],["L",t-n,e+n],["Z"]];Oy.style=["fill"];const wy=Oy.bind(void 0);wy.style=["fill"];const jy=Oy.bind(void 0);jy.style=["stroke","lineWidth"];const ky=(t,e,n)=>{const r=.618*n;return[["M",t-r,e],["L",t,e-n],["L",t+r,e],["L",t,e+n],["Z"]]};ky.style=["fill"];const Ay=ky.bind(void 0);Ay.style=["stroke","lineWidth"];const My=(t,e,n)=>{const r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e+r],["L",t,e-r],["L",t+n,e+r],["Z"]]};My.style=["fill"];const _y=My.bind(void 0);_y.style=["stroke","lineWidth"];const Sy=(t,e,n)=>{const r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e-r],["L",t+n,e-r],["L",t,e+r],["Z"]]};Sy.style=["fill"];const Ey=Sy.bind(void 0);Ey.style=["stroke","lineWidth"];const Py=(t,e,n)=>{const 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"]]};Py.style=["fill"];const Ly=Py.bind(void 0);Ly.style=["stroke","lineWidth"];const Cy=(t,e,n)=>{const 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"]]};Cy.style=["fill"];const zy=Cy.bind(void 0);zy.style=["stroke","lineWidth"];const Ty=(t,e,n)=>[["M",t,e+n],["L",t,e-n]];Ty.style=["stroke","lineWidth"];const By=(t,e,n)=>[["M",t-n,e-n],["L",t+n,e+n],["M",t+n,e-n],["L",t-n,e+n]];By.style=["stroke","lineWidth"];const Iy=(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]];Iy.style=["stroke","lineWidth"];const Ny=(t,e,n)=>[["M",t-n,e],["L",t+n,e],["M",t,e-n],["L",t,e+n]];Ny.style=["stroke","lineWidth"];const Ry=(t,e,n)=>[["M",t-n,e],["L",t+n,e]];Ry.style=["stroke","lineWidth"];const Fy=(t,e,n)=>[["M",t-n,e],["L",t+n,e]];Fy.style=["stroke","lineWidth"];const Dy=Fy.bind(void 0);Dy.style=["stroke","lineWidth"];const $y=(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]];$y.style=["stroke","lineWidth"];const Wy=(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]];Wy.style=["stroke","lineWidth"];const Hy=(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]];Hy.style=["stroke","lineWidth"];const qy=(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]];qy.style=["stroke","lineWidth"];const Yy=(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]];Yy.style=["stroke","lineWidth"];const Xy=new Map([["bowtie",Cy],["cross",By],["dash",Dy],["diamond",ky],["dot",Fy],["hexagon",Py],["hollowBowtie",zy],["hollowDiamond",Ay],["hollowHexagon",Ly],["hollowPoint",xy],["hollowSquare",jy],["hollowTriangle",_y],["hollowTriangleDown",Ey],["hv",Wy],["hvh",qy],["hyphen",Ry],["line",Ty],["plus",Ny],["point",vy],["rect",wy],["smooth",$y],["square",Oy],["tick",Iy],["triangleDown",Sy],["triangle",My],["vh",Hy],["vhv",Yy]]);var Gy=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};function Vy(t,e,n,r){if(1===e.length)return;const{size:o}=n;if("fixed"===t)return o;if("normal"===t||cn(r)){const[[t,n],[r,o]]=e,i=Math.abs((r-t)/2),a=Math.abs((o-n)/2);return Math.max(0,(i+a)/2)}return o}const Ky=(t,e)=>{const{colorAttribute:n,symbol:r,mode:o="auto"}=t,i=Gy(t,["colorAttribute","symbol","mode"]),a=Xy.get(lc(r))||Xy.get("point"),{coordinate:s,document:c}=e;return(e,r,l)=>{const{lineWidth:u,color:f}=l,d=i.stroke?u||1:u,{color:p=f,transform:h,opacity:g}=r,[m,y]=cc(e),b=Vy(o,e,r,s)||i.r||l.r;return _t(c.createElement("path",{})).call(ec,l).style("fill","transparent").style("d",a(m,y,b)).style("lineWidth",d).style("transform",h).style("transformOrigin",`${m-b} ${y-b}`).style("stroke",p).style(ac(t),g).style(n,p).call(ec,i).node()}};Ky.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const Uy=(t,e)=>Ky(Object.assign({colorAttribute:"stroke",symbol:"point"},t),e);Uy.props=Object.assign({defaultMarker:"hollowPoint"},Ky.props);const Zy=(t,e)=>Ky(Object.assign({colorAttribute:"stroke",symbol:"diamond"},t),e);Zy.props=Object.assign({defaultMarker:"hollowDiamond"},Ky.props);const Jy=(t,e)=>Ky(Object.assign({colorAttribute:"stroke",symbol:"hexagon"},t),e);Jy.props=Object.assign({defaultMarker:"hollowHexagon"},Ky.props);const Qy=(t,e)=>Ky(Object.assign({colorAttribute:"stroke",symbol:"square"},t),e);Qy.props=Object.assign({defaultMarker:"hollowSquare"},Ky.props);const tb=(t,e)=>Ky(Object.assign({colorAttribute:"stroke",symbol:"triangle-down"},t),e);tb.props=Object.assign({defaultMarker:"hollowTriangleDown"},Ky.props);const eb=(t,e)=>Ky(Object.assign({colorAttribute:"stroke",symbol:"triangle"},t),e);eb.props=Object.assign({defaultMarker:"hollowTriangle"},Ky.props);const nb=(t,e)=>Ky(Object.assign({colorAttribute:"stroke",symbol:"bowtie"},t),e);nb.props=Object.assign({defaultMarker:"hollowBowtie"},Ky.props);var rb=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const ob=(t,e)=>{const{colorAttribute:n,mode:r="auto"}=t,o=rb(t,["colorAttribute","mode"]),{coordinate:i,document:a}=e;return(e,s,c)=>{const{lineWidth:l,color:u}=c,f=o.stroke?l||1:l,{color:d=u,transform:p,opacity:h}=s,[g,m]=cc(e),y=Vy(r,e,s,i)||o.r||c.r;return _t(a.createElement("circle",{})).call(ec,c).style("fill","transparent").style("cx",g).style("cy",m).style("r",y).style("lineWidth",f).style("transform",p).style("transformOrigin",`${g} ${m}`).style("stroke",d).style(ac(t),h).style(n,d).call(ec,o).node()}},ib=(t,e)=>ob(Object.assign({colorAttribute:"fill"},t),e);ib.props={defaultMarker:"circle",defaultEnterAnimation:"fadeIn",defaultExitAnimation:"fadeOut"};const ab=(t,e)=>ob(Object.assign({colorAttribute:"stroke"},t),e);ab.props=Object.assign({defaultMarker:"hollowPoint"},ib.props);const sb=(t,e)=>Ky(Object.assign({colorAttribute:"fill",symbol:"point"},t),e);sb.props=Object.assign({defaultMarker:"point"},Ky.props);const cb=(t,e)=>Ky(Object.assign({colorAttribute:"stroke",symbol:"plus"},t),e);cb.props=Object.assign({defaultMarker:"plus"},Ky.props);const lb=(t,e)=>Ky(Object.assign({colorAttribute:"fill",symbol:"diamond"},t),e);lb.props=Object.assign({defaultMarker:"diamond"},Ky.props);const ub=(t,e)=>Ky(Object.assign({colorAttribute:"fill",symbol:"square"},t),e);ub.props=Object.assign({defaultMarker:"square"},Ky.props);const fb=(t,e)=>Ky(Object.assign({colorAttribute:"fill",symbol:"triangle"},t),e);fb.props=Object.assign({defaultMarker:"triangle"},Ky.props);const db=(t,e)=>Ky(Object.assign({colorAttribute:"fill",symbol:"hexagon"},t),e);db.props=Object.assign({defaultMarker:"hexagon"},Ky.props);const pb=(t,e)=>Ky(Object.assign({colorAttribute:"stroke",symbol:"cross"},t),e);pb.props=Object.assign({defaultMarker:"cross"},Ky.props);const hb=(t,e)=>Ky(Object.assign({colorAttribute:"fill",symbol:"bowtie"},t),e);hb.props=Object.assign({defaultMarker:"bowtie"},Ky.props);const gb=(t,e)=>Ky(Object.assign({colorAttribute:"stroke",symbol:"hyphen"},t),e);gb.props=Object.assign({defaultMarker:"hyphen"},Ky.props);const mb=(t,e)=>Ky(Object.assign({colorAttribute:"stroke",symbol:"line"},t),e);mb.props=Object.assign({defaultMarker:"line"},Ky.props);const yb=(t,e)=>Ky(Object.assign({colorAttribute:"stroke",symbol:"tick"},t),e);yb.props=Object.assign({defaultMarker:"tick"},Ky.props);const bb=(t,e)=>Ky(Object.assign({colorAttribute:"fill",symbol:"triangle-down"},t),e);bb.props=Object.assign({defaultMarker:"triangleDown"},Ky.props);const vb=()=>(t,e)=>{const{encode:n}=e,{y:r}=n;return void 0!==r?[t,e]:[t,(0,N.A)({},e,{encode:{y:Rg($g(t,0))},scale:{y:{guide:null}}})]};vb.props={};const xb=()=>(t,e)=>{const{encode:n}=e,{size:r}=n;return void 0!==r?[t,e]:[t,(0,N.A)({},e,{encode:{size:Fg($g(t,3))}})]};xb.props={};const Ob={hollow:Uy,hollowDiamond:Zy,hollowHexagon:Jy,hollowSquare:Qy,hollowTriangleDown:tb,hollowTriangle:eb,hollowBowtie:nb,hollowCircle:ab,point:sb,plus:cb,diamond:lb,square:ub,triangle:fb,hexagon:db,cross:pb,bowtie:hb,hyphen:gb,line:mb,tick:yb,triangleDown:bb,circle:ib},wb=t=>(e,n,r,o)=>{const{x:i,y:a,x1:s,y1:c,size:l,dx:u,dy:f}=r,[d,p]=o.getSize(),h=bm(n,r,t),g=t=>[(s?(+i[t]+ +s[t])/2:+i[t])+ +((null==u?void 0:u[t])||0),(c?(+a[t]+ +c[t])/2:+a[t])+ +((null==f?void 0:f[t])||0)],m=Array.from(e,l?t=>{const[e,n]=g(t),r=+l[t],i=r/d,a=r/p,s=[e+i,n+a];return[o.map(h([e-i,n-a],t)),o.map(h(s,t))]}:t=>[o.map(h(g(t),t))]);return[e,m]};wb.props={defaultShape:"hollow",defaultLabelShape:"label",composite:!1,shape:Ob,channels:[...dm({shapes:Object.keys(Ob)}),{name:"x",required:!0},{name:"y",required:!0},{name:"series",scale:"band"},{name:"size",quantitative:"sqrt"},{name:"dx",scale:"identity"},{name:"dy",scale:"identity"}],preInference:[...mm(),{type:Xg},{type:vb}],postInference:[{type:xb},...pm()]};const jb=(t,e)=>{const{coordinate:n}=e;return(e,r,o)=>{const{color:i,text:a="",fontSize:s,rotate:c=0,transform:l=""}=r,u={text:String(a),stroke:i,fill:i,fontSize:s},[[f,d]]=e;return _t(new hc).style("x",f).style("y",d).call(ec,o).style("transform",`${l}rotate(${+c})`).style("coordCenter",n.getCenter()).call(ec,u).call(ec,t).node()}};jb.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var kb=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const Ab=fc(t=>{const e=t.attributes,n=kb(e,["class","x","y","transform"]),r=xt(n,"marker"),{size:o=24}=r,i=()=>function(t){const e=t/Math.sqrt(2),n=t*Math.sqrt(2),[r,o]=[-e,e-n],[i,a]=[0,0],[s,c]=[e,e-n];return[["M",r,o],["A",t,t,0,1,1,s,c],["L",i,a],["Z"]]}(o/2),a=_t(t).maybeAppend("marker",()=>new Ka({})).call(t=>t.node().update(Object.assign({symbol:i},r))).node(),[s,c]=function(t){const{min:e,max:n}=t.getLocalBounds();return[.5*(e[0]+n[0]),.5*(e[1]+n[1])]}(a);_t(t).maybeAppend("text","text").style("x",s).style("y",c).call(ec,n)}),Mb=(t,e)=>{const n=kb(t,[]);return(t,e,r)=>{const{color:o}=r,i=kb(r,["color"]),{color:a=o,text:s=""}=e,c={text:String(s),stroke:a,fill:a},[[l,u]]=t;return _t(new Ab).call(ec,i).style("transform",`translate(${l},${u})`).call(ec,c).call(ec,n).node()}};Mb.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const _b=(t,e)=>{const{coordinate:n}=e;return(e,r,o)=>{const{color:i,text:a="",fontSize:s,rotate:c=0,transform:u=""}=r,f={text:String(a),stroke:i,fill:i,fontSize:s,textAlign:"center",textBaseline:"middle"},[[d,p]]=e;return _t(new l.EY).style("x",d).style("y",p).call(ec,o).style("transformOrigin","center center").style("transform",`${u}rotate(${c}deg)`).style("coordCenter",n.getCenter()).call(ec,f).call(ec,t).node()}};_b.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const Sb=()=>(t,e)=>{const{data:n}=e;if(!Array.isArray(n)||n.some(qg))return[t,e];const r=Array.isArray(n[0])?n:[n],o=r.map(t=>t[0]),i=r.map(t=>t[1]);return[t,(0,N.A)({},e,{encode:{x:Ng(o),y:Ng(i)}})]};Sb.props={};var Eb=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const Pb=()=>(t,e)=>{const{style:n={}}=e,r=Eb(e,["data","style"]),{x:o,y:i}=n,a=Eb(n,["x","y"]);if(null==o||null==i)return[t,e];const s=i||0;return[[0],(0,N.A)({},r,{data:[0],cartesian:!0,encode:{x:Ng([o||0]),y:Ng([s])},scale:{x:{type:"identity",independent:!0,guide:null},y:{type:"identity",independent:!0,guide:null}},style:a})]};Pb.props={};const Lb={text:jb,badge:Mb,tag:_b},Cb=t=>{const{cartesian:e=!1}=t;return e?xm:(e,n,r,o)=>{const{x:i,y:a}=r,s=bm(n,r,t),c=Array.from(e,t=>[o.map(s([+i[t],+a[t]],t))]);return[e,c]}};Cb.props={defaultShape:"text",defaultLabelShape:"label",composite:!1,shape:Lb,channels:[...dm({shapes:Object.keys(Lb)}),{name:"x",required:!0},{name:"y",required:!0},{name:"text",scale:"identity"},{name:"fontSize",scale:"identity"},{name:"rotate",scale:"identity"}],preInference:[...mm(),{type:Sb},{type:Pb}],postInference:[...pm()]};const zb=()=>(t,e)=>[t,(0,N.A)({scale:{x:{padding:0},y:{padding:0}}},e)];zb.props={};const Tb={cell:Gg,hollow:Vg},Bb=()=>(t,e,n,r)=>{const{x:o,y:i}=n,a=e.x,s=e.y,c=Array.from(t,t=>{const e=a.getBandWidth(a.invert(+o[t])),n=s.getBandWidth(s.invert(+i[t])),c=+o[t],l=+i[t];return[[c,l],[c+e,l],[c+e,l+n],[c,l+n]].map(t=>r.map(t))});return[t,c]};Bb.props={defaultShape:"cell",defaultLabelShape:"label",shape:Tb,composite:!1,channels:[...dm({shapes:Object.keys(Tb)}),{name:"x",required:!0,scale:"band"},{name:"y",required:!0,scale:"band"}],preInference:[...mm(),{type:Xg},{type:vb},{type:zb}],postInference:[...pm()]};var Ib=n("./node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/array.js"),Nb=n("./node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/constant.js"),Rb=n("./node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/path.js"),Fb=n("./node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/point.js");function Db(t,e,n){var r=null,o=(0,Nb.A)(!0),i=null,a=Em.A,s=null,c=(0,Rb.i)(l);function l(l){var u,f,d,p,h,g=(l=(0,Ib.A)(l)).length,m=!1,y=new Array(g),b=new Array(g);for(null==i&&(s=a(h=c())),u=0;u<=g;++u){if(!(u<g&&o(p=l[u],u,l))===m)if(m=!m)f=u,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),d=u-1;d>=f;--d)s.point(y[d],b[d]);s.lineEnd(),s.areaEnd()}m&&(y[u]=+t(p,u,l),b[u]=+e(p,u,l),s.point(r?+r(p,u,l):y[u],n?+n(p,u,l):b[u]))}if(h)return s=null,h+""||null}function u(){return(0,uc.A)().defined(o).curve(a).context(i)}return t="function"==typeof t?t:void 0===t?Fb.x:(0,Nb.A)(+t),e="function"==typeof e?e:(0,Nb.A)(void 0===e?0:+e),n="function"==typeof n?n:void 0===n?Fb.y:(0,Nb.A)(+n),l.x=function(e){return arguments.length?(t="function"==typeof e?e:(0,Nb.A)(+e),r=null,l):t},l.x0=function(e){return arguments.length?(t="function"==typeof e?e:(0,Nb.A)(+e),l):t},l.x1=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:(0,Nb.A)(+t),l):r},l.y=function(t){return arguments.length?(e="function"==typeof t?t:(0,Nb.A)(+t),n=null,l):e},l.y0=function(t){return arguments.length?(e="function"==typeof t?t:(0,Nb.A)(+t),l):e},l.y1=function(t){return arguments.length?(n=null==t?null:"function"==typeof t?t:(0,Nb.A)(+t),l):n},l.lineX0=l.lineY0=function(){return u().x(t).y(e)},l.lineY1=function(){return u().x(t).y(n)},l.lineX1=function(){return u().x(r).y(e)},l.defined=function(t){return arguments.length?(o="function"==typeof t?t:(0,Nb.A)(!!t),l):o},l.curve=function(t){return arguments.length?(a=t,null!=i&&(s=a(i)),l):a},l.context=function(t){return arguments.length?(null==t?i=s=null:s=a(i=t),l):i},l}var $b=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const Wb=fc(t=>{const{areaPath:e,connectPath:n,areaStyle:r,connectStyle:o}=t.attributes,i=t.ownerDocument;_t(t).maybeAppend("connect-path",()=>i.createElement("path",{})).style("d",n).call(ec,o),_t(t).maybeAppend("area-path",()=>i.createElement("path",{})).style("d",e).call(ec,r)}),Hb=(t,e)=>{const{curve:n,gradient:r=!1,defined:o=t=>!Number.isNaN(t)&&null!=t,connect:i=!1}=t,a=$b(t,["curve","gradient","defined","connect"]),{coordinate:s,document:c}=e;return(t,e,l)=>{const{color:u}=l,{color:f=u,seriesColor:d,seriesX:p,seriesY:h}=e,g=nn(s),m=sc(s,e),y=r&&d?rc(d,p,h,r,void 0,g):f,b=Object.assign(Object.assign(Object.assign(Object.assign({},l),{stroke:y,fill:y}),m&&{transform:m}),a),[v,x]=function(t,e){const n=[],r=[],o=[];let i=!1,a=null;const s=t.length/2;for(let c=0;c<s;c++){const l=t[c],u=t[c+s];if([...l,...u].some(t=>!e(t)))i=!0;else{if(n.push(l),r.push(u),i&&a){i=!1;const[t,e]=a;o.push([t,l,e,u])}a=[l,u]}}return[n.concat(r),o]}(t,o),O=xt(b,"connect"),w=!!x.length,j=t=>_t(c.createElement("path",{})).style("d",t||"").call(ec,b).node();if(rn(s)){const e=t=>{const e=s.getCenter(),r=t.slice(0,t.length/2),i=t.slice(t.length/2);return function(){var t=Db().curve(Pm),e=t.curve,n=t.lineX0,r=t.lineX1,o=t.lineY0,i=t.lineY1;return 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 zm(n())},delete t.lineX0,t.lineEndAngle=function(){return zm(r())},delete t.lineX1,t.lineInnerRadius=function(){return zm(o())},delete t.lineY0,t.lineOuterRadius=function(){return zm(i())},delete t.lineY1,t.curve=function(t){return arguments.length?e(Cm(t)):e()._curve},t}().angle((t,n)=>Zs(Gs(r[n],e))).outerRadius((t,n)=>Ks(r[n],e)).innerRadius((t,n)=>Ks(i[n],e)).defined((t,e)=>[...r[e],...i[e]].every(o)).curve(n)(i)};return!w||i&&!Object.keys(O).length?j(e(v)):w&&!i?j(e(t)):_t(new Wb).style("areaStyle",b).style("connectStyle",Object.assign(Object.assign({},O),a)).style("areaPath",e(t)).style("connectPath",x.map(e).join("")).node()}{const e=t=>{const e=t.slice(0,t.length/2),r=t.slice(t.length/2);return g?Db().y((t,n)=>e[n][1]).x1((t,n)=>e[n][0]).x0((t,e)=>r[e][0]).defined((t,n)=>[...e[n],...r[n]].every(o)).curve(n)(e):Db().x((t,n)=>e[n][0]).y1((t,n)=>e[n][1]).y0((t,e)=>r[e][1]).defined((t,n)=>[...e[n],...r[n]].every(o)).curve(n)(e)};return!w||i&&!Object.keys(O).length?j(e(v)):w&&!i?j(e(t)):_t(new Wb).style("areaStyle",b).style("connectStyle",Object.assign(Object.assign({},O),a)).style("areaPath",e(t)).style("connectPath",x.map(e).join("")).node()}}};Hb.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const qb=(t,e)=>{const{coordinate:n}=e;return(...r)=>{const o=rn(n)?Zg:Em.A;return Hb(Object.assign({curve:o},t),e)(...r)}};qb.props=Object.assign(Object.assign({},Hb.props),{defaultMarker:"square"});var Yb=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const Xb=(t,e)=>{const n=Yb(t,[]),{coordinate:r}=e;return(...t)=>{const o=rn(r)?qm:nn(r)?Qm:Jm;return Hb(Object.assign({curve:o},n),e)(...t)}};Xb.props=Object.assign(Object.assign({},Hb.props),{defaultMarker:"smooth"});const Gb=(t,e)=>(...n)=>Hb(Object.assign({curve:ry},t),e)(...n);Gb.props=Object.assign(Object.assign({},Hb.props),{defaultMarker:"hvh"});const Vb=(t,e)=>(...n)=>Hb(Object.assign({curve:oy},t),e)(...n);Vb.props=Object.assign(Object.assign({},Hb.props),{defaultMarker:"vh"});const Kb=(t,e)=>(...n)=>Hb(Object.assign({curve:iy},t),e)(...n);Kb.props=Object.assign(Object.assign({},Hb.props),{defaultMarker:"hv"});const Ub={area:qb,smooth:Xb,hvh:Gb,vh:Vb,hv:Kb},Zb=()=>(t,e,n,r)=>{var o,i;const{x:a,y:s,y1:c,series:l}=n,{x:u,y:f}=e,d=l?Array.from(C(t,t=>l[t]).values()):[t],p=d.map(t=>t[0]).filter(t=>void 0!==t),h=((null===(o=null==u?void 0:u.getBandWidth)||void 0===o?void 0:o.call(u))||0)/2,g=((null===(i=null==f?void 0:f.getBandWidth)||void 0===i?void 0:i.call(f))||0)/2,m=Array.from(d,t=>{const e=t.length,n=new Array(2*e);for(let o=0;o<t.length;o++){const i=t[o];n[o]=r.map([+a[i]+h,+s[i]+g]),n[e+o]=r.map([+a[i]+h,+c[i]+g])}return n});return[p,m,d]};Zb.props={defaultShape:"area",defaultLabelShape:"label",composite:!1,shape:Ub,channels:[...dm({shapes:Object.keys(Ub)}),{name:"x",required:!0},{name:"y",required:!0},{name:"size"},{name:"series",scale:"band"}],preInference:[...mm(),{type:py},{type:Yg},{type:zb}],postInference:[...hm()],interaction:{shareTooltip:!0,seriesTooltip:!0,crosshairs:!0}};const Jb=()=>(t,e)=>{const{encode:n}=e,{y1:r}=n;if(r)return[t,e];const[o]=Wg(n,"y");return[t,(0,N.A)({},e,{encode:{y1:Ng([...o])}})]};Jb.props={};const Qb=()=>(t,e)=>{const{encode:n}=e,{x1:r}=n;if(r)return[t,e];const[o]=Wg(n,"x");return[t,(0,N.A)({},e,{encode:{x1:Ng([...o])}})]};Qb.props={};var tv=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const ev=(t,e)=>{const{arrow:n=!0,arrowSize:r="40%"}=t,o=tv(t,["arrow","arrowSize"]),{document:i}=e;return(t,e,a)=>{const{defaultColor:s}=a,c=tv(a,["defaultColor"]),{color:l=s,transform:u}=e,[f,d]=t,p=(0,nl.Ae)();if(p.moveTo(...f),p.lineTo(...d),n){const[t,e]=function(t,e,n){const{arrowSize:r}=n,o="string"==typeof r?+parseFloat(r)/100*Ks(t,e):r,i=Math.PI/6,a=Math.atan2(e[1]-t[1],e[0]-t[0]),s=Math.PI/2-a-i,c=a-i;return[[e[0]-o*Math.sin(s),e[1]-o*Math.cos(s)],[e[0]-o*Math.cos(c),e[1]-o*Math.sin(c)]]}(f,d,{arrowSize:r});p.moveTo(...t),p.lineTo(...d),p.lineTo(...e)}return _t(i.createElement("path",{})).call(ec,c).style("d",p.toString()).style("stroke",l).style("transform",u).call(ec,o).node()}};ev.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const nv=(t,e)=>{const{arrow:n=!1}=t;return(...r)=>ev(Object.assign(Object.assign({},t),{arrow:n}),e)(...r)};nv.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var rv=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const ov=(t,e)=>{const n=rv(t,[]),{coordinate:r,document:o}=e;return(t,e,i)=>{const{color:a}=i,s=rv(i,["color"]),{color:c=a,transform:l}=e,[u,f]=t,d=(0,nl.Ae)();if(d.moveTo(u[0],u[1]),rn(r)){const t=r.getCenter();d.quadraticCurveTo(t[0],t[1],f[0],f[1])}else{nc(d,u,f,tc(u,f),Ks(u,f)/2)}return _t(o.createElement("path",{})).call(ec,s).style("d",d.toString()).style("stroke",c).style("transform",l).call(ec,n).node()}};ov.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var iv=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const av=(t,e)=>{const n=iv(t,[]),{document:r}=e;return(t,e,o)=>{const{color:i}=o,a=iv(o,["color"]),{color:s=i,transform:c}=e,[l,u]=t,f=(0,nl.Ae)();return f.moveTo(l[0],l[1]),f.bezierCurveTo(l[0]/2+u[0]/2,l[1],l[0]/2+u[0]/2,u[1],u[0],u[1]),_t(r.createElement("path",{})).call(ec,a).style("d",f.toString()).style("stroke",s).style("transform",c).call(ec,n).node()}};av.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var sv=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const cv=(t,e)=>{const{cornerRatio:n=1/3}=t,r=sv(t,["cornerRatio"]),{coordinate:o,document:i}=e;return(t,e,a)=>{const{defaultColor:s}=a,c=sv(a,["defaultColor"]),{color:l=s,transform:u}=e,[f,d]=t,p=function(t,e,n,r){const o=(0,nl.Ae)();if(rn(n)){const i=n.getCenter(),a=Ks(t,i),s=(Ks(e,i)-a)*r+a;return o.moveTo(t[0],t[1]),nc(o,t,e,i,s),o.lineTo(e[0],e[1]),o}return nn(n)?(o.moveTo(t[0],t[1]),o.lineTo(t[0]+(e[0]-t[0])*r,t[1]),o.lineTo(t[0]+(e[0]-t[0])*r,e[1]),o.lineTo(e[0],e[1]),o):(o.moveTo(t[0],t[1]),o.lineTo(t[0],t[1]+(e[1]-t[1])*r),o.lineTo(e[0],t[1]+(e[1]-t[1])*r),o.lineTo(e[0],e[1]),o)}(f,d,o,n);return _t(i.createElement("path",{})).call(ec,c).style("d",p.toString()).style("stroke",l).style("transform",u).call(ec,r).node()}};cv.props={defaultMarker:"vhv",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const lv={link:nv,arc:ov,smooth:av,vhv:cv},uv=t=>(e,n,r,o)=>{const{x:i,y:a,x1:s=i,y1:c=a}=r,l=bm(n,r,t),u=e.map(t=>[o.map(l([+i[t],+a[t]],t)),o.map(l([+s[t],+c[t]],t))]);return[e,u]};uv.props={defaultShape:"link",defaultLabelShape:"label",composite:!1,shape:lv,channels:[...dm({shapes:Object.keys(lv)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...mm(),{type:Jb},{type:Qb}],postInference:[...pm()]};var fv=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const dv=(t,e)=>{const{coordinate:n,document:r}=e;return(e,o,i)=>{const{color:a}=i,s=fv(i,["color"]),{color:c=a,src:l="",size:u=32,transform:f=""}=o;let{width:d=u,height:p=u}=t;const[[h,g]]=e,[m,y]=n.getSize();d="string"==typeof d?vm(d)*m:d,p="string"==typeof p?vm(p)*y:p;const b=h-Number(d)/2,v=g-Number(p)/2;return _t(r.createElement("image",{})).call(ec,s).style("x",b).style("y",v).style("src",l).style("stroke",c).style("transform",f).call(ec,t).style("width",d).style("height",p).node()}};dv.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const pv={image:dv},hv=t=>{const{cartesian:e}=t;return e?xm:(e,n,r,o)=>{const{x:i,y:a}=r,s=bm(n,r,t),c=Array.from(e,t=>[o.map(s([+i[t],+a[t]],t))]);return[e,c]}};hv.props={defaultShape:"image",defaultLabelShape:"label",composite:!1,shape:pv,channels:[...dm({shapes:Object.keys(pv)}),{name:"x",required:!0},{name:"y",required:!0},{name:"src",scale:"identity"},{name:"size"}],preInference:[...mm(),{type:Sb},{type:Pb}],postInference:[...pm()]};var gv=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const mv=(t,e)=>{const{coordinate:n,document:r}=e;return(e,o,i)=>{const{color:a}=i,s=gv(i,["color"]),{color:c=a,transform:l}=o,u=function(t,e){const n=(0,nl.Ae)();if(rn(e)){const r=e.getCenter(),o=[...t,t[0]],i=o.map(t=>Ks(t,r));return o.forEach((e,o)=>{if(0===o)return void n.moveTo(e[0],e[1]);const a=i[o],s=t[o-1],c=i[o-1];void 0!==c&&Math.abs(a-c)<1e-10?nc(n,s,e,r,a):n.lineTo(e[0],e[1])}),n.closePath(),n}return function(t,e){return e.forEach((e,n)=>0===n?t.moveTo(e[0],e[1]):t.lineTo(e[0],e[1])),t.closePath(),t}(n,t)}(e,n);return _t(r.createElement("path",{})).call(ec,s).style("d",u.toString()).style("stroke",c).style("fill",c).style("transform",l).call(ec,t).node()}};mv.props={defaultMarker:"square",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var yv=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const bv=(t,e)=>{const n=yv(t,[]),{coordinate:r,document:o}=e;return(t,e,i)=>{const{color:a}=i,s=yv(i,["color"]),{color:c=a,transform:l}=e,u=function(t,e){const[n,r,o,i]=t,a=(0,nl.Ae)();if(rn(e)){const t=e.getCenter(),s=Ks(t,n);return a.moveTo(n[0],n[1]),a.quadraticCurveTo(t[0],t[1],o[0],o[1]),nc(a,o,i,t,s),a.quadraticCurveTo(t[0],t[1],r[0],r[1]),nc(a,r,n,t,s),a.closePath(),a}return a.moveTo(n[0],n[1]),a.bezierCurveTo(n[0]/2+o[0]/2,n[1],n[0]/2+o[0]/2,o[1],o[0],o[1]),a.lineTo(i[0],i[1]),a.bezierCurveTo(i[0]/2+r[0]/2,i[1],i[0]/2+r[0]/2,r[1],r[0],r[1]),a.lineTo(n[0],n[1]),a.closePath(),a}(t,r);return _t(o.createElement("path",{})).call(ec,s).style("d",u.toString()).style("fill",c||a).style("stroke",c||a).style("transform",l).call(ec,n).node()}};bv.props={defaultMarker:"square",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const vv={polygon:mv,ribbon:bv},xv=()=>(t,e,n,r)=>{const o=Object.entries(n).filter(([t])=>t.startsWith("x")).map(([,t])=>t),i=Object.entries(n).filter(([t])=>t.startsWith("y")).map(([,t])=>t),a=t.map(t=>{const e=[];for(let n=0;n<o.length;n++){const a=o[n][t];if(void 0===a)break;e.push(r.map([+a,+i[n][t]]))}return e});return[t,a]};xv.props={defaultShape:"polygon",defaultLabelShape:"label",composite:!1,shape:vv,channels:[...dm({shapes:Object.keys(vv)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...mm()],postInference:[...pm()]};var Ov=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const wv=(t,e)=>{const{coordinate:n,document:r}=e;return(e,o,i)=>{const{color:a,transform:s}=o,{color:c,fill:l=c,stroke:u=c}=i,f=Ov(i,["color","fill","stroke"]),d=function(t,e){const n=(0,nl.Ae)();if(rn(e)){const r=e.getCenter(),[o,i]=r,a=Us(Gs(t[0],r)),s=Us(Gs(t[1],r)),c=Ks(r,t[2]),l=Ks(r,t[3]),u=Ks(r,t[8]),f=Ks(r,t[10]),d=Ks(r,t[11]);n.moveTo(...t[0]),n.arc(o,i,c,a,s),n.arc(o,i,c,s,a,!0),n.moveTo(...t[2]),n.lineTo(...t[3]),n.moveTo(...t[4]),n.arc(o,i,l,a,s),n.lineTo(...t[6]),n.arc(o,i,f,s,a,!0),n.closePath(),n.moveTo(...t[8]),n.arc(o,i,u,a,s),n.arc(o,i,u,s,a,!0),n.moveTo(...t[10]),n.lineTo(...t[11]),n.moveTo(...t[12]),n.arc(o,i,d,a,s),n.arc(o,i,d,s,a,!0)}else n.moveTo(...t[0]),n.lineTo(...t[1]),n.moveTo(...t[2]),n.lineTo(...t[3]),n.moveTo(...t[4]),n.lineTo(...t[5]),n.lineTo(...t[6]),n.lineTo(...t[7]),n.closePath(),n.moveTo(...t[8]),n.lineTo(...t[9]),n.moveTo(...t[10]),n.lineTo(...t[11]),n.moveTo(...t[12]),n.lineTo(...t[13]);return n}(e,n);return _t(r.createElement("path",{})).call(ec,f).style("d",d.toString()).style("stroke",u).style("fill",a||l).style("transform",s).call(ec,t).node()}};wv.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var jv=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const kv=(t,e)=>{const{coordinate:n,document:r}=e;return(e,o,i)=>{const{color:a,transform:s}=o,{color:c,fill:l=c,stroke:u=c}=i,f=jv(i,["color","fill","stroke"]),d=function(t,e,n=4){const r=(0,nl.Ae)();if(!rn(e))return r.moveTo(...t[2]),r.lineTo(...t[3]),r.lineTo(t[3][0]-n,t[3][1]),r.lineTo(t[10][0]-n,t[10][1]),r.lineTo(t[10][0]+n,t[10][1]),r.lineTo(t[3][0]+n,t[3][1]),r.lineTo(...t[3]),r.closePath(),r.moveTo(...t[10]),r.lineTo(...t[11]),r.moveTo(t[3][0]+n/2,t[8][1]),r.arc(t[3][0],t[8][1],n/2,0,2*Math.PI),r.closePath(),r;const o=e.getCenter(),[i,a]=o,s=Ks(o,t[3]),c=Ks(o,t[8]),l=Ks(o,t[10]),u=Us(Gs(t[2],o)),f=Math.asin(n/c),d=u-f,p=u+f;r.moveTo(...t[2]),r.lineTo(...t[3]),r.moveTo(Math.cos(d)*s+i,Math.sin(d)*s+a),r.arc(i,a,s,d,p),r.lineTo(Math.cos(p)*l+i,Math.sin(p)*l+a),r.arc(i,a,l,p,d,!0),r.lineTo(Math.cos(d)*s+i,Math.sin(d)*s+a),r.closePath(),r.moveTo(...t[10]),r.lineTo(...t[11]);const h=(d+p)/2;return r.moveTo(Math.cos(h)*(c+n/2)+i,Math.sin(h)*(c+n/2)+a),r.arc(Math.cos(h)*c+i,Math.sin(h)*c+a,n/2,h,2*Math.PI+h),r.closePath(),r}(e,n,4);return _t(r.createElement("path",{})).call(ec,f).style("d",d.toString()).style("stroke",u).style("fill",a||l).style("transform",s).call(ec,t).node()}};kv.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const Av={box:wv,violin:kv},Mv=()=>(t,e,n,r)=>{const{x:o,y:i,y1:a,y2:s,y3:c,y4:l,series:u}=n,f=e.x,d=e.series,p=Array.from(t,t=>{const e=f.getBandWidth(f.invert(+o[t])),n=e*(d?d.getBandWidth(d.invert(+(null==u?void 0:u[t]))):1),p=+o[t]+(+(null==u?void 0:u[t])||0)*e+n/2,[h,g,m,y,b]=[+i[t],+a[t],+s[t],+c[t],+l[t]];return[[p-n/2,b],[p+n/2,b],[p,b],[p,y],[p-n/2,y],[p+n/2,y],[p+n/2,g],[p-n/2,g],[p-n/2,m],[p+n/2,m],[p,g],[p,h],[p-n/2,h],[p+n/2,h]].map(t=>r.map(t))});return[t,p]};Mv.props={defaultShape:"box",defaultLabelShape:"label",composite:!1,shape:Av,channels:[...dm({shapes:Object.keys(Av)}),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"series",scale:"band"}],preInference:[...mm(),{type:Xg}],postInference:[...hm()],interaction:{shareTooltip:!0}};const _v={vector:ev},Sv=()=>(t,e,n,r)=>{const{x:o,y:i,size:a,rotate:s}=n,[c,l]=r.getSize(),u=t.map(t=>{const e=+s[t]/180*Math.PI,n=+a[t],u=n/l,f=n/c*Math.cos(e),d=-u*Math.sin(e);return[r.map([+o[t]-f/2,+i[t]-d/2]),r.map([+o[t]+f/2,+i[t]+d/2])]});return[t,u]};Sv.props={defaultShape:"vector",defaultLabelShape:"label",composite:!1,shape:_v,channels:[...dm({shapes:Object.keys(_v)}),{name:"x",required:!0},{name:"y",required:!0},{name:"rotate",required:!0,scale:"identity"},{name:"size",required:!0}],preInference:[...mm()],postInference:[...pm()]};var Ev=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const Pv=(t,e)=>{const{arrow:n,arrowSize:r=4}=t,o=Ev(t,["arrow","arrowSize"]),{coordinate:i,document:a}=e;return(t,e,s)=>{const{color:c,lineWidth:l}=s,u=Ev(s,["color","lineWidth"]),{color:f=c,size:d=l}=e,p=n?function(t,e,n){return t.createElement("path",{style:Object.assign({d:`M ${e},${e} L -${e},0 L ${e},-${e} L 0,0 Z`,transformOrigin:"center"},n)})}(a,r,Object.assign({fill:o.stroke||f,stroke:o.stroke||f},xt(o,"arrow"))):null,h=function(t,e){if(!rn(e))return(0,uc.A)().x(t=>t[0]).y(t=>t[1])(t);const n=e.getCenter();return(0,dl.A)()({startAngle:0,endAngle:2*Math.PI,outerRadius:Ks(t[0],n),innerRadius:Ks(t[1],n)})}(t,i),g=function(t,e){if(!rn(t))return e;const[n,r]=t.getCenter();return`translate(${n}, ${r}) ${e||""}`}(i,e.transform);return _t(a.createElement("path",{})).call(ec,u).style("d",h).style("stroke",f).style("lineWidth",d).style("transform",g).style("markerEnd",p).call(ec,o).node()}};Pv.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const Lv=()=>(t,e)=>{const{data:n}=e;return!Array.isArray(n)||n.some(qg)?[t,e]:[t,(0,N.A)({},e,{encode:{x:Ng(n)}})]};Lv.props={};const Cv={line:Pv},zv=t=>(e,n,r,o)=>{const{x:i}=r,a=bm(n,r,(0,N.A)({style:{bandOffset:0}},t)),s=Array.from(e,t=>[[i[t],1],[i[t],0]].map(e=>o.map(a(e,t))));return[e,s]};zv.props={defaultShape:"line",defaultLabelShape:"label",composite:!1,shape:Cv,channels:[...gm({shapes:Object.keys(Cv)}),{name:"x",required:!0}],preInference:[...mm(),{type:Lv}],postInference:[]};const Tv=()=>(t,e)=>{const{data:n}=e;return!Array.isArray(n)||n.some(qg)?[t,e]:[t,(0,N.A)({},e,{encode:{y:Ng(n)}})]};Tv.props={};const Bv={line:Pv},Iv=t=>(e,n,r,o)=>{const{y:i}=r,a=bm(n,r,(0,N.A)({style:{bandOffset:0}},t)),s=Array.from(e,t=>[[0,i[t]],[1,i[t]]].map(e=>o.map(a(e,t))));return[e,s]};Iv.props={defaultShape:"line",defaultLabelShape:"label",composite:!1,shape:Bv,channels:[...gm({shapes:Object.keys(Bv)}),{name:"y",required:!0}],preInference:[...mm(),{type:Tv}],postInference:[]};var Nv=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};function Rv(t,e,n){return[["M",t,e],["L",t+2*n,e-n],["L",t+2*n,e+n],["Z"]]}const Fv=(t,e)=>{const{offsetX:n=0,sourceOffsetX:r=n,targetOffsetX:o=n,offsetY:i=0,sourceOffsetY:a=i,targetOffsetY:s=i,connectLength1:c,endMarker:u=!0}=t,f=Nv(t,["offsetX","sourceOffsetX","targetOffsetX","offsetY","sourceOffsetY","targetOffsetY","connectLength1","endMarker"]),{coordinate:d}=e;return(t,e,n)=>{const{color:i,connectLength1:p}=n,h=Nv(n,["color","connectLength1"]),{color:g,transform:m}=e,y=function(t,e,n,r,o,i,a=0){const[[s,c],[l,u]]=e;if(nn(t)){const t=s+n,e=t+a,f=c+o,d=u+i;return[[t,f],[e,f],[e,d],[l+r,d]]}const f=c-n,d=f-a,p=s-o,h=l-i;return[[p,f],[p,d],[h,d],[h,u-r]]}(d,t,a,s,r,o,null!=c?c:p),b=xt(Object.assign(Object.assign({},f),n),"endMarker");return _t(new l.wA).call(ec,h).style("d",function(t){return(0,uc.A)().x(t=>t[0]).y(t=>t[1])(t)}(y)).style("stroke",g||i).style("transform",m).style("markerEnd",u?new Ka({className:"marker",style:Object.assign(Object.assign({},b),{symbol:Rv})}):null).call(ec,f).node()}};Fv.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const Dv={connector:Fv},$v=(...t)=>uv(...t);function Wv(t,e,n,r){if(e)return()=>[0,1];const{[t]:o,[`${t}1`]:i}=n;return t=>{var e;const n=(null===(e=r.getBandWidth)||void 0===e?void 0:e.call(r,r.invert(+i[t])))||0;return[o[t],i[t]+n]}}function Hv(t={}){const{extendX:e=!1,extendY:n=!1}=t;return(t,r,o,i)=>{const a=Wv("x",e,o,r.x),s=Wv("y",n,o,r.y),c=Array.from(t,t=>{const[e,n]=a(t),[r,o]=s(t);return[[e,r],[n,r],[n,o],[e,o]].map(t=>i.map(t))});return[t,c]}}$v.props={defaultShape:"connector",defaultLabelShape:"label",composite:!1,shape:Dv,channels:[...gm({shapes:Object.keys(Dv)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...mm()],postInference:[]};const qv={range:Gg},Yv=()=>Hv();Yv.props={defaultShape:"range",defaultLabelShape:"label",composite:!1,shape:qv,channels:[...gm({shapes:Object.keys(qv)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...mm()],postInference:[]};const Xv=()=>(t,e)=>{const{data:n}=e;if(Array.isArray(n)&&(n.every(Array.isArray)||!n.some(qg))){const r=(t,e)=>Array.isArray(t[0])?t.map(t=>t[e]):[t[e]];return[t,(0,N.A)({},e,{encode:{x:Ng(r(n,0)),x1:Ng(r(n,1))}})]}return[t,e]};Xv.props={};const Gv={range:Gg},Vv=()=>Hv({extendY:!0});Vv.props={defaultShape:"range",defaultLabelShape:"label",composite:!1,shape:Gv,channels:[...gm({shapes:Object.keys(Gv)}),{name:"x",required:!0}],preInference:[...mm(),{type:Xv}],postInference:[]};const Kv=()=>(t,e)=>{const{data:n}=e;if(Array.isArray(n)&&(n.every(Array.isArray)||!n.some(qg))){const r=(t,e)=>Array.isArray(t[0])?t.map(t=>t[e]):[t[e]];return[t,(0,N.A)({},e,{encode:{y:Ng(r(n,0)),y1:Ng(r(n,1))}})]}return[t,e]};Kv.props={};const Uv={range:Gg},Zv=()=>Hv({extendX:!0});Zv.props={defaultShape:"range",defaultLabelShape:"label",composite:!1,shape:Uv,channels:[...gm({shapes:Object.keys(Uv)}),{name:"y",required:!0}],preInference:[...mm(),{type:Kv}],postInference:[]};var Jv=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const Qv=(t,e)=>{const{colorAttribute:n}=t,r=Jv(t,["arrow","colorAttribute"]),{coordinate:o,document:i}=e;return(t,e,a)=>{const{color:s}=a,c=Jv(a,["color","stroke"]),{d:l,color:u=s}=e,[f,d]=o.getSize();return _t(i.createElement("path",{})).call(ec,c).style("d","function"==typeof l?l({width:f,height:d}):l).style(n,u).call(ec,r).node()}};Qv.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const tx=(t,e)=>Qv(Object.assign({colorAttribute:"fill"},t),e);tx.props={defaultMarker:"hvh",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const ex=(t,e)=>Qv(Object.assign({fill:"none",colorAttribute:"stroke"},t),e);ex.props={defaultMarker:"hvh",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const nx={path:tx,hollow:ex},rx=t=>(t,e,n,r)=>[t,t.map(()=>[[0,0]])];rx.props={defaultShape:"path",defaultLabelShape:"label",shape:nx,composite:!1,channels:[...dm({shapes:Object.keys(nx)}),{name:"d",scale:"identity"}],preInference:[...mm()],postInference:[]};var ox=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const ix=(t,e)=>{const{render:n}=t,r=ox(t,["render"]);return t=>{const[[o,i]]=t;return n(Object.assign(Object.assign({},r),{x:o,y:i}),e)}};ix.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const ax=()=>(t,e)=>{const{style:n={}}=e;return[t,(0,N.A)({},e,{style:Object.assign(Object.assign({},n),Object.fromEntries(Object.entries(n).filter(([,t])=>"function"==typeof t).map(([t,e])=>[t,()=>e])))})]};ax.props={};const sx=t=>{const{cartesian:e}=t;return e?xm:(e,n,r,o)=>{const{x:i,y:a}=r,s=bm(n,r,t),c=Array.from(e,t=>[o.map(s([+i[t],+a[t]],t))]);return[e,c]}};sx.props={defaultShape:"shape",defaultLabelShape:"label",composite:!1,shape:{shape:ix},channels:[{name:"x",required:!0},{name:"y",required:!0}],preInference:[...mm(),{type:Sb},{type:Pb},{type:ax}]};var cx=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const lx=(t,e)=>{const{document:n}=e;return(e,r,o)=>{const{transform:i}=r,{color:a}=o,s=cx(o,["color"]),{color:c=a}=r,[l,...u]=e,f=(0,nl.Ae)();return f.moveTo(...l),u.forEach(([t,e])=>{f.lineTo(t,e)}),f.closePath(),_t(n.createElement("path",{})).call(ec,s).style("d",f.toString()).style("stroke",c||a).style("fill",c||a).style("fillOpacity",.4).style("transform",i).call(ec,t).node()}};lx.props={defaultMarker:"square",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const ux={density:lx},fx=()=>(t,e,n,r)=>{const{x:o,series:i}=n,a=Object.entries(n).filter(([t])=>t.startsWith("y")).map(([,t])=>t),s=Object.entries(n).filter(([t])=>t.startsWith("size")).map(([,t])=>t);if(void 0===o||void 0===a||void 0===s)throw new Error("Missing encode for x or y or size channel.");const c=e.x,l=e.series,u=Array.from(t,e=>{const n=c.getBandWidth(c.invert(+o[e])),u=l?l.getBandWidth(l.invert(+(null==i?void 0:i[e]))):1,f=+o[e]+(+(null==i?void 0:i[e])||0)*n+n*u/2;return[...a.map((n,r)=>[f+ +s[r][e]/t.length,+a[r][e]]),...a.map((n,r)=>[f-+s[r][e]/t.length,+a[r][e]]).reverse()].map(t=>r.map(t))});return[t,u]};function dx(t,e,n){const r=t?t():document.createElement("canvas");return r.width=e,r.height=n,r}fx.props={defaultShape:"density",defaultLabelShape:"label",composite:!1,shape:ux,channels:[...dm({shapes:Object.keys(ux)}),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"size",required:!0},{name:"series",scale:"band"},{name:"size",required:!0,scale:"identity"}],preInference:[...mm(),{type:Yg},{type:Xg}],postInference:[...hm()],interaction:{shareTooltip:!0}};const px=_e((t,e,n)=>{const r=dx(n,2*t,2*t),o=r.getContext("2d"),i=t,a=t;if(1===e)o.beginPath(),o.arc(i,a,t,0,2*Math.PI,!1),o.fillStyle="rgba(0,0,0,1)",o.fill();else{const n=o.createRadialGradient(i,a,t*e,i,a,t);n.addColorStop(0,"rgba(0,0,0,1)"),n.addColorStop(1,"rgba(0,0,0,0)"),o.fillStyle=n,o.fillRect(0,0,2*t,2*t)}return r},t=>`${t}`);function hx(t,e,n,r,o,i,a){const s=Object.assign({blur:.85,minOpacity:0,opacity:.6,maxOpacity:1,gradient:[[.25,"rgb(0,0,255)"],[.55,"rgb(0,255,0)"],[.85,"yellow"],[1,"rgb(255,0,0)"]]},i);s.minOpacity*=255,s.opacity*=255,s.maxOpacity*=255;const c=dx(a,t,e).getContext("2d"),l=function(t,e){const n=dx(e,256,1).getContext("2d"),r=n.createLinearGradient(0,0,256,1);return function(t){return"string"==typeof t?t.split(" ").map(t=>{const[e,n]=t.split(":");return[+e,n]}):t}(t).forEach(([t,e])=>{r.addColorStop(t,e)}),n.fillStyle=r,n.fillRect(0,0,256,1),n.getImageData(0,0,256,1).data}(s.gradient,a);c.clearRect(0,0,t,e),function(t,e,n,r,o,i){const{blur:a}=o;let s=r.length;for(;s--;){const{x:o,y:c,value:l,radius:u}=r[s],f=Math.min(l,n),d=o-u,p=c-u,h=px(u,1-a,i);t.globalAlpha=Math.max((f-e)/(n-e),.001),t.drawImage(h,d,p)}}(c,n,r,o,s,a);const u=function(t,e,n,r,o){const{minOpacity:i,opacity:a,maxOpacity:s,useGradientOpacity:c}=o,l=t.getImageData(0,0,e,n),u=l.data,f=u.length;for(let t=3;t<f;t+=4){const e=u[t],n=4*e;if(!n)continue;const o=a||Math.max(0,Math.min(s,Math.max(i,e)));u[t-3]=r[n],u[t-2]=r[n+1],u[t-1]=r[n+2],u[t]=c?r[n+3]:o}return l}(c,t,e,l,s),f=dx(a,t,e).getContext("2d");return f.putImageData(u,0,0),f}var gx=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const mx=(t,e)=>{const{gradient:n,opacity:r,maxOpacity:o,minOpacity:i,blur:a,useGradientOpacity:s}=t,c=gx(t,["gradient","opacity","maxOpacity","minOpacity","blur","useGradientOpacity"]),{coordinate:l,createCanvas:u,document:f}=e;return(t,e,d)=>{const{transform:p}=e,[h,g]=l.getSize(),m=t.map(t=>({x:t[0],y:t[1],value:t[2],radius:t[3]})),y=ep(t,t=>t[2]),b=Ye(t,t=>t[2]),v=h&&g?hx(h,g,y,b,m,function(t,e){return Object.keys(t).reduce((n,r)=>{const o=t[r];return e(o,r)||(n[r]=o),n},{})}({gradient:n,opacity:r,minOpacity:i,maxOpacity:o,blur:a,useGradientOpacity:s},t=>void 0===t),u):{canvas:null};return _t(f.createElement("image",{})).call(ec,d).style("x",0).style("y",0).style("width",h).style("height",g).style("src",v.canvas.toDataURL()).style("transform",p).call(ec,c).node()}};mx.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const yx={heatmap:mx},bx=t=>(t,e,n,r)=>{const{x:o,y:i,size:a,color:s}=n,c=Array.from(t,t=>{const e=a?+a[t]:40;return[...r.map([+o[t],+i[t]]),s[t],e]});return[[0],[c]]};bx.props={defaultShape:"heatmap",defaultLabelShape:"label",composite:!1,shape:yx,channels:[...dm({shapes:Object.keys(yx)}),{name:"x",required:!0},{name:"y",required:!0},{name:"color",scale:"identity",required:!0},{name:"size"}],preInference:[...mm(),{type:Xg},{type:vb}],postInference:[...pm()]};var vx=function(t,e,n,r){return new(n||(n=Promise))(function(o,i){function a(t){try{c(r.next(t))}catch(t){i(t)}}function s(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){t.done?o(t.value):function(t){return t instanceof n?t:new n(function(e){e(t)})}(t.value).then(a,s)}c((r=r.apply(t,e||[])).next())})},xx=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const Ox=(t,e)=>vx(void 0,void 0,void 0,function*(){const{width:n,height:r}=e,{data:o,encode:i={},scale:a,style:s={},layout:c={}}=t,l=xx(t,["data","encode","scale","style","layout"]),u=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]}))}(o,i);return(0,N.A)({},{axis:!1,type:"text",encode:{x:"x",y:"y",text:"text",rotate:"rotate",fontSize:"size",shape:"tag"},scale:{x:{range:[0,1]},y:{range:[0,1]}},style:{fontFamily:t=>t.fontFamily},tooltip:{items:[t=>({name:t.text,value:t.value})]}},Object.assign(Object.assign({data:{value:u,transform:[Object.assign({type:"wordCloud",size:[n,r]},c)]},encode:i,scale:a,style:s},l),{axis:!1}))});Ox.props={};var wx=n("./node_modules/.pnpm/d3-force@3.0.0/node_modules/d3-force/src/simulation.js"),jx=n("./node_modules/.pnpm/d3-force@3.0.0/node_modules/d3-force/src/collide.js"),kx=n("./node_modules/.pnpm/d3-force@3.0.0/node_modules/d3-force/src/constant.js");function Ax(t){var e,n,r,o=(0,kx.A)(.1);function i(t){for(var o,i=0,a=e.length;i<a;++i)(o=e[i]).vx+=(r[i]-o.x)*n[i]*t}function a(){if(e){var i,a=e.length;for(n=new Array(a),r=new Array(a),i=0;i<a;++i)n[i]=isNaN(r[i]=+t(e[i],i,e))?0:+o(e[i],i,e)}}return"function"!=typeof t&&(t=(0,kx.A)(null==t?0:+t)),i.initialize=function(t){e=t,a()},i.strength=function(t){return arguments.length?(o="function"==typeof t?t:(0,kx.A)(+t),a(),i):o},i.x=function(e){return arguments.length?(t="function"==typeof e?e:(0,kx.A)(+e),a(),i):t},i}function Mx(t){var e,n,r,o=(0,kx.A)(.1);function i(t){for(var o,i=0,a=e.length;i<a;++i)(o=e[i]).vy+=(r[i]-o.y)*n[i]*t}function a(){if(e){var i,a=e.length;for(n=new Array(a),r=new Array(a),i=0;i<a;++i)n[i]=isNaN(r[i]=+t(e[i],i,e))?0:+o(e[i],i,e)}}return"function"!=typeof t&&(t=(0,kx.A)(null==t?0:+t)),i.initialize=function(t){e=t,a()},i.strength=function(t){return arguments.length?(o="function"==typeof t?t:(0,kx.A)(+t),a(),i):o},i.y=function(e){return arguments.length?(t="function"==typeof e?e:(0,kx.A)(+e),a(),i):t},i}const _x={hollow:Uy,hollowDiamond:Zy,hollowHexagon:Jy,hollowSquare:Qy,hollowTriangleDown:tb,hollowTriangle:eb,hollowBowtie:nb,hollowCircle:ab,point:sb,plus:cb,diamond:lb,square:ub,triangle:fb,hexagon:db,cross:pb,bowtie:hb,hyphen:gb,line:mb,tick:yb,triangleDown:bb,circle:ib},Sx=t=>(e,n,r,o)=>{const{x:i,y:a,size:s}=r;if(!i.length||!a.length)return[e,a.map(()=>[[]])];const[c,l]=o.getSize(),u=bm(n,r,t),f=Array.from(e,t=>({i:t,x:+i[t]*c,y:+a[t]*l,r:+s[t]||4})),d=(0,wx.A)(f).stop().force("collide",(0,jx.A)().radius(t=>t.r+1).strength(1));d.force("x",Ax(t=>t.x).strength(0)),d.force("y",Mx(t=>t.y).strength(5));for(let t=0;t<200;t++)d.tick();d.stop();const p=t=>{const e=f.find(e=>e.i===t);return[e.x/c,e.y/l]},h=Array.from(e,s?t=>{const[e,n]=p(t),r=+s[t],i=r/c,a=r/l,f=[e+i,n+a];return[o.map(u([e-i,n-a],t)),o.map(u(f,t))]}:t=>[o.map(u(p(t),t))]);return[e,h]};Sx.props={defaultShape:"point",defaultLabelShape:"label",composite:!1,shape:_x,channels:[...dm({shapes:Object.keys(_x)}),{name:"x",required:!0},{name:"y",required:!0},{name:"series",scale:"band"},{name:"size",quantitative:"sqrt"}],preInference:[...mm(),{type:Xg},{type:vb}],postInference:[{type:xb},...pm()]};const Ex=()=>["#5B8FF9","#5AD8A6","#5D7092","#F6BD16","#6F5EF9","#6DC8EC","#945FB9","#FF9845","#1E9493","#FF99C3"];Ex.props={};const Px=()=>["#5B8FF9","#CDDDFD","#5AD8A6","#CDF3E4","#5D7092","#CED4DE","#F6BD16","#FCEBB9","#6F5EF9","#D3CEFD","#6DC8EC","#D3EEF9","#945FB9","#DECFEA","#FF9845","#FFE0C7","#1E9493","#BBDEDE","#FF99C3","#FFE0ED"];Px.props={};const Lx=t=>new li(t);Lx.props={};const Cx=t=>new U(t);Cx.props={};const zx=t=>new Q(t);zx.props={};class Tx extends Y{getDefaultOptions(){return{domain:[0,1],range:[0,1],tickCount:5,unknown:void 0,tickMethod:Ms}}map(t){return ri(t)?t:this.options.unknown}invert(t){return this.map(t)}clone(){return new Tx(this.options)}getTicks(){const{domain:t,tickCount:e,tickMethod:n}=this.options,[r,o]=t;return(0,tt.A)(r)&&(0,tt.A)(o)?n(r,o,e):[]}}const Bx=t=>new Tx(t);Bx.props={};class Ix extends Q{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,padding:0,unknown:X,paddingInner:1,paddingOuter:0}}constructor(t){super(t)}getPaddingInner(){return 1}clone(){return new Ix(this.options)}update(t){super.update(t)}getPaddingOuter(){return this.options.padding}}const Nx=t=>new Ix(t);Nx.props={};var Rx=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,Fx="\\d\\d?",Dx="\\d\\d",$x="[^\\s]+",Wx=/\[([^]*?)\]/gm;function Hx(t,e){for(var n=[],r=0,o=t.length;r<o;r++)n.push(t[r].substr(0,e));return n}var qx=function(t){return function(e,n){var r=n[t].map(function(t){return t.toLowerCase()}),o=r.indexOf(e.toLowerCase());return o>-1?o:null}};function Yx(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0,o=e;r<o.length;r++){var i=o[r];for(var a in i)t[a]=i[a]}return t}var Xx=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Gx=["January","February","March","April","May","June","July","August","September","October","November","December"],Vx=Hx(Gx,3),Kx={dayNamesShort:Hx(Xx,3),dayNames:Xx,monthNamesShort:Vx,monthNames:Gx,amPm:["am","pm"],DoFn:function(t){return t+["th","st","nd","rd"][t%10>3?0:(t-t%10!=10?1:0)*t%10]}},Ux=Yx({},Kx),Zx=function(t,e){for(void 0===e&&(e=2),t=String(t);t.length<e;)t="0"+t;return t},Jx={D:function(t){return String(t.getDate())},DD:function(t){return Zx(t.getDate())},Do:function(t,e){return e.DoFn(t.getDate())},d:function(t){return String(t.getDay())},dd:function(t){return Zx(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 Zx(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 Zx(String(t.getFullYear()),4).substr(2)},YYYY:function(t){return Zx(t.getFullYear(),4)},h:function(t){return String(t.getHours()%12||12)},hh:function(t){return Zx(t.getHours()%12||12)},H:function(t){return String(t.getHours())},HH:function(t){return Zx(t.getHours())},m:function(t){return String(t.getMinutes())},mm:function(t){return Zx(t.getMinutes())},s:function(t){return String(t.getSeconds())},ss:function(t){return Zx(t.getSeconds())},S:function(t){return String(Math.round(t.getMilliseconds()/100))},SS:function(t){return Zx(Math.round(t.getMilliseconds()/10),2)},SSS:function(t){return Zx(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].toUpperCase():e.amPm[1].toUpperCase()},ZZ:function(t){var e=t.getTimezoneOffset();return(e>0?"-":"+")+Zx(100*Math.floor(Math.abs(e)/60)+Math.abs(e)%60,4)},Z:function(t){var e=t.getTimezoneOffset();return(e>0?"-":"+")+Zx(Math.floor(Math.abs(e)/60),2)+":"+Zx(Math.abs(e)%60,2)}},Qx=function(t){return+t-1},tO=[null,Fx],eO=[null,$x],nO=["isPm",$x,function(t,e){var n=t.toLowerCase();return n===e.amPm[0]?0:n===e.amPm[1]?1:null}],rO=["timezoneOffset","[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z?",function(t){var e=(t+"").match(/([+-]|\d\d)/gi);if(e){var n=60*+e[1]+parseInt(e[2],10);return"+"===e[0]?n:-n}return 0}],oO=(qx("monthNamesShort"),qx("monthNames"),{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"}),iO=function(t,e,n){if(void 0===e&&(e=oO.default),void 0===n&&(n={}),"number"==typeof t&&(t=new Date(t)),"[object Date]"!==Object.prototype.toString.call(t)||isNaN(t.getTime()))throw new Error("Invalid Date pass to format");var r=[];e=(e=oO[e]||e).replace(Wx,function(t,e){return r.push(e),"@@@"});var o=Yx(Yx({},Ux),n);return(e=e.replace(Rx,function(e){return Jx[e](t,o)})).replace(/@@@/g,function(){return r.shift()})};const aO=1e3,sO=6e4,cO=36e5,lO=864e5,uO=6048e5,fO=2592e6,dO=31536e6;function pO(t,e,n,r){const o=(t,o)=>{o&&((t,e)=>{const o=t=>r(t)%e===0;let i=e;for(;i&&!o(t);)n(t,-1),i-=1})(t,o),e(t)},i=(t,e)=>{const r=new Date(+t-1);return o(r,e),n(r,e),o(r),r};return{ceil:i,floor:(t,e)=>{const n=new Date(+t);return o(n,e),n},range:(t,e,r,a)=>{const s=[],c=Math.floor(r);for(let l=a?i(t,r):i(t);l<e;n(l,c),o(l))s.push(new Date(+l));return s},duration:t}}const hO=pO(1,t=>t,(t,e=1)=>{t.setTime(+t+e)},t=>t.getTime()),gO=pO(aO,t=>{t.setMilliseconds(0)},(t,e=1)=>{t.setTime(+t+aO*e)},t=>t.getSeconds()),mO=pO(sO,t=>{t.setSeconds(0,0)},(t,e=1)=>{t.setTime(+t+sO*e)},t=>t.getMinutes()),yO=pO(cO,t=>{t.setMinutes(0,0,0)},(t,e=1)=>{t.setTime(+t+cO*e)},t=>t.getHours()),bO=pO(lO,t=>{t.setHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+lO*e)},t=>t.getDate()-1),vO=pO(fO,t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e=1)=>{const n=t.getMonth();t.setMonth(n+e)},t=>t.getMonth()),xO=pO(uO,t=>{t.setDate(t.getDate()-t.getDay()%7),t.setHours(0,0,0,0)},(t,e=1)=>{t.setDate(t.getDate()+7*e)},t=>{const e=vO.floor(t),n=new Date(+t);return Math.floor((+n-+e)/uO)}),OO=pO(dO,t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e=1)=>{const n=t.getFullYear();t.setFullYear(n+e)},t=>t.getFullYear()),wO={millisecond:hO,second:gO,minute:mO,hour:yO,day:bO,week:xO,month:vO,year:OO},jO=pO(1,t=>t,(t,e=1)=>{t.setTime(+t+e)},t=>t.getTime()),kO=pO(1e3,t=>{t.setUTCMilliseconds(0)},(t,e=1)=>{t.setTime(+t+1e3*e)},t=>t.getUTCSeconds()),AO=pO(6e4,t=>{t.setUTCSeconds(0,0)},(t,e=1)=>{t.setTime(+t+6e4*e)},t=>t.getUTCMinutes()),MO=pO(cO,t=>{t.setUTCMinutes(0,0,0)},(t,e=1)=>{t.setTime(+t+cO*e)},t=>t.getUTCHours()),_O=pO(lO,t=>{t.setUTCHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+lO*e)},t=>t.getUTCDate()-1),SO=pO(fO,t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e=1)=>{const n=t.getUTCMonth();t.setUTCMonth(n+e)},t=>t.getUTCMonth()),EO=pO(uO,t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7)%7),t.setUTCHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+uO*e)},t=>{const e=SO.floor(t),n=new Date(+t);return Math.floor((+n-+e)/uO)}),PO=pO(dO,t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e=1)=>{const n=t.getUTCFullYear();t.setUTCFullYear(n+e)},t=>t.getUTCFullYear()),LO={millisecond:jO,second:kO,minute:AO,hour:MO,day:_O,week:EO,month:SO,year:PO};function CO(t,e,n,r,o){const i=+t,a=+e,{tickIntervals:s,year:c,millisecond:l}=function(t){const e=t?LO:wO,{year:n,month:r,week:o,day:i,hour:a,minute:s,second:c,millisecond:l}=e;return{tickIntervals:[[c,1],[c,5],[c,15],[c,30],[s,1],[s,5],[s,15],[s,30],[a,1],[a,3],[a,6],[a,12],[i,1],[i,2],[o,1],[r,1],[r,3],[n,1]],year:n,millisecond:l}}(o),u=([t,e])=>t.duration*e,f=r?(a-i)/r:n||5,d=r||(a-i)/f,p=s.length,h=Go(s,d,0,p,u);let g;if(h===p){g=[c,it(i/c.duration,a/c.duration,f)]}else if(h){const t=d/u(s[h-1])<u(s[h])/d,[e,n]=t?s[h-1]:s[h];g=[e,r?Math.ceil(r/e.duration):n]}else{g=[l,Math.max(it(i,a,f),1)]}return g}const zO=(t,e,n,r,o)=>{const i=t>e,a=i?e:t,s=i?t:e,[c,l]=CO(a,s,n,r,o),u=c.range(a,new Date(+s+1),l,!0);return i?u.reverse():u},TO=(t,e,n,r,o)=>{const i=t>e,a=i?e:t,s=i?t:e,[c,l]=CO(a,s,n,r,o),u=[c.floor(a,l),c.ceil(s,l)];return i?u.reverse():u};function BO(t){const e=t.getTimezoneOffset(),n=new Date(t);return n.setMinutes(n.getMinutes()+e,n.getSeconds(),n.getMilliseconds()),n}class IO extends ci{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:zO,interpolate:Jo,mask:void 0,utc:!1}}chooseTransforms(){return[t=>+t,t=>new Date(t)]}chooseNice(){return TO}getTickMethodOptions(){const{domain:t,tickCount:e,tickInterval:n,utc:r}=this.options;return[t[0],t[t.length-1],e,n,r]}getFormatter(){const{mask:t,utc:e}=this.options,n=e?LO:wO,r=e?BO:qo;return e=>iO(r(e),t||function(t,e){const{second:n,minute:r,hour:o,day:i,week:a,month:s,year:c}=e;return n.floor(t)<t?".SSS":r.floor(t)<t?":ss":o.floor(t)<t?"hh:mm":i.floor(t)<t?"hh A":s.floor(t)<t?a.floor(t)<t?"MMM DD":"ddd DD":c.floor(t)<t?"MMMM":"YYYY"}(e,n))}clone(){return new IO(this.options)}}const NO=t=>new IO(t);NO.props={};const RO=t=>e=>-t(-e),FO=(t,e)=>{const n=Math.log(t),r=t===Math.E?Math.log:10===t?Math.log10:2===t?Math.log2:t=>Math.log(t)/n;return e?RO(r):r},DO=(t,e)=>{const n=t===Math.E?Math.exp:e=>t**e;return e?RO(n):n},$O=(t,e,n,r=10)=>{const o=t<0,i=DO(r,o),a=FO(r,o),s=e<t,c=s?e:t,l=s?t:e;let u=a(c),f=a(l),d=[];if(!(r%1)&&f-u<n){if(u=Math.floor(u),f=Math.ceil(f),o)for(;u<=f;u+=1){const t=i(u);for(let e=r-1;e>=1;e-=1){const n=t*e;if(n>l)break;n>=c&&d.push(n)}}else for(;u<=f;u+=1){const t=i(u);for(let e=1;e<r;e+=1){const n=t*e;if(n>l)break;n>=c&&d.push(n)}}2*d.length<n&&(d=at(c,l,n))}else{const t=-1===n?f-u:Math.min(f-u,n);d=at(u,f,t).map(i)}return s?d.reverse():d},WO=(t,e,n,r)=>{const o=t<0,i=FO(r,o),a=DO(r,o),s=t>e,c=s?t:e,l=[a(Math.floor(i(s?e:t))),a(Math.ceil(i(c)))];return s?l.reverse():l};class HO extends ci{getDefaultOptions(){return{domain:[1,10],range:[0,1],base:10,interpolate:Qo,tickMethod:$O,tickCount:5}}chooseNice(){return WO}getTickMethodOptions(){const{domain:t,tickCount:e,base:n}=this.options;return[t[0],t[t.length-1],e,n]}chooseTransforms(){const{base:t,domain:e}=this.options,n=e[0]<0;return[FO(t,n),DO(t,n)]}clone(){return new HO(this.options)}}const qO=t=>new HO(t);qO.props={};const YO=t=>t<0?-Math.sqrt(-t):Math.sqrt(t);class XO extends ci{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,exponent:2,interpolate:Qo,tickMethod:at,tickCount:5}}constructor(t){super(t)}chooseTransforms(){const{exponent:t}=this.options;if(1===t)return[qo,qo];const e=.5===t?YO:(t=>e=>e<0?-((-e)**t):e**t)(t),n=(t=>e=>e<0?-((-e)**(1/t)):e**(1/t))(t);return[e,n]}clone(){return new XO(this.options)}}const GO=t=>new XO(t);GO.props={};class VO extends XO{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:Qo,tickMethod:at,tickCount:5,exponent:.5}}constructor(t){super(t)}update(t){super.update(t)}clone(){return new VO(this.options)}}const KO=t=>new VO(t);KO.props={};const UO=t=>new ps(t);UO.props={};const ZO=t=>new Es(t);ZO.props={};const JO=t=>new _s(t);JO.props={};var QO,tw=function(t,e,n,r){var o,i=arguments.length,a=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,n,a):o(e,n))||a);return i>3&&a&&Object.defineProperty(e,n,a),a};let ew=QO=class extends li{getDefaultOptions(){return{domain:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolator:qo,tickMethod:at,tickCount:5}}constructor(t){super(t)}clone(){return new QO(this.options)}};ew=QO=tw([function(t,e){return n=>{n.prototype.rescale=function(){this.initRange(),this.nice();const[t]=this.chooseTransforms();this.composeOutput(t,this.chooseClamp(t))},n.prototype.initRange=function(){const{interpolator:e}=this.options;this.options.range=t(e)},n.prototype.composeOutput=function(t,n){const{domain:r,interpolator:o,round:i}=this.getOptions(),a=e(r.map(t)),s=i?(t=>e=>{const n=t(e);return(0,tt.A)(n)?Math.round(n):n})(o):o;this.output=Xo(s,a,n,t)},n.prototype.invert=void 0}}(function(t){return[t(0),t(1)]},t=>{const[e,n]=t;return Xo(Jo(0,1),Yo(e,n))})],ew);const nw=t=>new ew(t);nw.props={};const rw=t=>new st(t);function ow({colorDefault:t,colorBlack:e,colorWhite:n,colorStroke:r,colorBackground:o,padding1:i,padding2:a,alpha90:s,alpha65:c,alpha45:l,alpha10:u,category10:f,category20:d,sizeDefault:p=1,padding:h="auto",margin:g=16}){return{padding:h,margin:g,size:p,color:t,category10:f,category20:d,enter:{duration:300,fill:"both",delay:0},update:{duration:300,fill:"both",delay:0},exit:{duration:300,fill:"both",delay:0},view:{viewFill:o,plotFill:"transparent",mainFill:"transparent",contentFill:"transparent"},line:{line:{fill:"",strokeOpacity:1,lineWidth:1,lineCap:"round"}},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:e,lineWidth:1}},text:{text:{fill:"#1D2129",fontSize:12,lineWidth:0,connectorStroke:r,connectorStrokeOpacity:.45,connectorLineWidth:1,backgroundFill:r,backgroundFillOpacity:.15,backgroundPadding:[2,4],startMarkerSymbol:"circle",startMarkerSize:4,endMarkerSymbol:"circle",endMarkerSize:4},badge:{fill:"#1D2129",fillOpacity:.65,lineWidth:0,fontSize:10,textAlign:"center",textBaseline:"middle",markerFill:r,markerFillOpacity:.25,markerStrokeOpacity:0}},lineX:{line:{stroke:r,strokeOpacity:.45,lineWidth:1}},lineY:{line:{stroke:r,strokeOpacity:.45,lineWidth:1}},rangeX:{range:{fill:r,fillOpacity:.15,lineWidth:0}},rangeY:{range:{fill:r,fillOpacity:.15,lineWidth:0}},connector:{connector:{stroke:r,strokeOpacity:.45,lineWidth:1,connectLength1:12,endMarker:!0,endMarkerSize:6,endMarkerFill:r,endMarkerFillOpacity:.95}},axis:{arrow:!1,gridLineDash:[3,4],gridLineWidth:.5,gridStroke:e,gridStrokeOpacity:u,labelAlign:"horizontal",labelFill:e,labelOpacity:l,labelFontSize:12,labelFontWeight:"normal",labelSpacing:i,line:!1,lineLineWidth:.5,lineStroke:e,lineStrokeOpacity:l,tickLength:4,tickLineWidth:1,tickStroke:e,tickOpacity:l,titleFill:e,titleOpacity:s,titleFontSize:12,titleFontWeight:"normal",titleSpacing:12,titleTransformOrigin:"center",lineArrowOffset:6,lineArrowSize:6},axisTop:{gridDirection:"positive",labelDirection:"negative",tickDirection:"negative",titlePosition:"top",titleSpacing:12,labelSpacing:4,titleTextBaseline:"middle"},axisBottom:{gridDirection:"negative",labelDirection:"positive",tickDirection:"positive",titlePosition:"bottom",titleSpacing:12,labelSpacing:4,titleTextBaseline:"bottom",titleTransform:"translate(0, 8)"},axisLeft:{gridDirection:"positive",labelDirection:"negative",labelSpacing:4,tickDirection:"negative",titlePosition:"left",titleSpacing:12,titleTextBaseline:"middle",titleDirection:"vertical",titleTransform:"rotate(-90) translate(0, -8)",titleTransformOrigin:"center"},axisRight:{gridDirection:"negative",labelDirection:"positive",labelSpacing:4,tickDirection:"positive",titlePosition:"right",titleSpacing:12,titleTextBaseline:"top",titleDirection:"vertical",titleTransformOrigin:"center"},axisLinear:{girdClosed:!0,gridConnect:"arc",gridDirection:"negative",gridType:"surround",titlePosition:"top",titleSpacing:0},axisArc:{title:!1,titlePosition:"inner",line:!1,tick:!0,labelSpacing:4},axisRadar:{girdClosed:!0,gridStrokeOpacity:.3,gridType:"surround",tick:!1,titlePosition:"start"},legendCategory:{backgroundFill:"transparent",itemBackgroundFill:"transparent",itemLabelFill:e,itemLabelFillOpacity:s,itemLabelFontSize:12,itemLabelFontWeight:"normal",itemMarkerFillOpacity:1,itemMarkerSize:8,focusMarkerSize:12,itemSpacing:[i,i,i/2],itemValueFill:e,itemValueFillOpacity:.65,itemValueFontSize:12,itemValueFontWeight:"normal",navButtonFill:e,navButtonFillOpacity:.65,navPageNumFill:e,navPageNumFillOpacity:.45,navPageNumFontSize:12,padding:8,title:!1,titleFill:e,titleFillOpacity:.65,titleFontSize:12,titleFontWeight:"normal",titleSpacing:4,tickStroke:e,tickStrokeOpacity:.25,rowPadding:i,colPadding:a,maxRows:3,maxCols:3},legendContinuous:{handleHeight:12,handleLabelFill:e,handleLabelFillOpacity:l,handleLabelFontSize:12,handleLabelFontWeight:"normal",handleMarkerFill:e,handleMarkerFillOpacity:.6,handleMarkerLineWidth:1,handleMarkerStroke:e,handleMarkerStrokeOpacity:.25,handleWidth:10,labelFill:e,labelFillOpacity:l,labelFontSize:12,labelFontWeight:"normal",labelSpacing:3,tick:!0,tickLength:12,ribbonSize:12,ribbonFill:"#aaa",handle:!0,handleLabel:!1,handleShape:"slider",handleIconSize:12/1.8,indicator:!1,titleFontSize:12,titleSpacing:4,titleFontWeight:"normal",titleFillOpacity:s,tickStroke:e,tickStrokeOpacity:l},label:{fill:e,fillOpacity:.65,fontSize:12,fontWeight:"normal",stroke:void 0,offset:12,connectorStroke:e,connectorStrokeOpacity:.45,connectorLineWidth:1,connectorLength:12,connectorLength2:8,connectorDistance:4},innerLabel:{fill:n,fontSize:12,fillOpacity:.85,fontWeight:"normal",stroke:void 0,offset:0},htmlLabel:{fontSize:12,opacity:.65,color:e,fontWeight:"normal"},slider:{trackSize:16,trackFill:r,trackFillOpacity:1,selectionFill:t,selectionFillOpacity:.15,handleIconSize:10,handleIconFill:"#f7f7f7",handleIconFillOpacity:1,handleIconStroke:e,handleIconStrokeOpacity:.25,handleIconLineWidth:1,handleIconRadius:2,handleLabelFill:e,handleLabelFillOpacity:.45,handleLabelFontSize:12,handleLabelFontWeight:"normal"},scrollbar:{padding:[0,0,0,0],trackSize:6,isRound:!0,slidable:!0,scrollable:!0,trackFill:"#e5e5e5",trackFillOpacity:0,thumbFill:"#000",thumbFillOpacity:.15,thumbHighlightedFillOpacity:.2},title:{spacing:8,titleFill:e,titleFillOpacity:s,titleFontSize:16,titleFontWeight:"bold",titleTextBaseline:"top",subtitleFill:e,subtitleFillOpacity:c,subtitleFontSize:12,subtitleFontWeight:"normal",subtitleTextBaseline:"top"},tooltip:{css:{[Je("tooltip")]:{"font-family":"sans-serif"}}}}}rw.props={};const iw=ow({colorBlack:"#1D2129",colorWhite:"#ffffff",colorStroke:"#416180",colorDefault:"#1783FF",colorBackground:"transparent",category10:["#1783FF","#00C9C9","#F0884D","#D580FF","#7863FF","#60C42D","#BD8F24","#FF80CA","#2491B3","#17C76F"],category20:["#1783FF","#00C9C9","#F0884D","#D580FF","#7863FF","#60C42D","#BD8F24","#FF80CA","#2491B3","#17C76F","#AABA01","#BC7CFC","#237CBC","#2DE379","#CE8032","#FF7AF4","#545FD3","#AFE410","#D8C608","#FFA1E0"],padding1:8,padding2:12,padding3:20,alpha90:.9,alpha65:.65,alpha45:.45,alpha25:.25,alpha10:.1}),aw=t=>(0,N.A)({},iw,t);aw.props={};const sw=t=>(0,N.A)({},aw(),{category10:"category10",category20:"category20"},t);sw.props={};const cw=ow({colorBlack:"#fff",colorWhite:"#000",colorStroke:"#416180",colorDefault:"#1783FF",colorBackground:"transparent",category10:["#1783FF","#00C9C9","#F0884D","#D580FF","#7863FF","#60C42D","#BD8F24","#FF80CA","#2491B3","#17C76F"],category20:["#1783FF","#00C9C9","#F0884D","#D580FF","#7863FF","#60C42D","#BD8F24","#FF80CA","#2491B3","#17C76F","#AABA01","#BC7CFC","#237CBC","#2DE379","#CE8032","#FF7AF4","#545FD3","#AFE410","#D8C608","#FFA1E0"],padding1:8,padding2:12,padding3:20,alpha90:.9,alpha65:.65,alpha45:.45,alpha25:.25,alpha10:.25}),lw=t=>(0,N.A)({},cw,{tooltip:{crosshairsStroke:"#fff",crosshairsLineWidth:1,crosshairsStrokeOpacity:.25,css:{[Je("tooltip")]:{background:"#1f1f1f",opacity:.95},[Je("tooltip-title")]:{color:"#A6A6A6"},[Je("tooltip-list-item-name-label")]:{color:"#A6A6A6"},[Je("tooltip-list-item-value")]:{color:"#A6A6A6"}}}},t),uw=t=>Object.assign({},lw(),{category10:"category10",category20:"category20"},t);uw.props={};const fw=ow({colorBlack:"#000",colorWhite:"#fff",colorStroke:"#888",colorDefault:"#4e79a7",colorBackground:"transparent",category10:["#4e79a7","#f28e2c","#e15759","#76b7b2","#59a14f","#edc949","#af7aa1","#ff9da7","#9c755f","#bab0ab"],category20:["#4e79a7","#f28e2c","#e15759","#76b7b2","#59a14f","#edc949","#af7aa1","#ff9da7","#9c755f","#bab0ab"],padding1:8,padding2:12,padding3:20,alpha90:.9,alpha65:.65,alpha45:.45,alpha25:.25,alpha10:.1}),dw=t=>(0,N.A)({},fw,{text:{text:{fontSize:10}},axis:{gridLineDash:[0,0],gridLineWidth:1,gridStroke:"#ddd",gridStrokeOpacity:1,labelOpacity:1,labelStrokeOpacity:1,labelFontSize:10,line:!0,lineLineWidth:1,lineStroke:"#888",lineStrokeOpacity:1,tickLength:5,tickStrokeOpacity:1,titleOpacity:1,titleStrokeOpacity:1,titleFillOpacity:1,titleFontSize:11,titleFontWeight:"bold"},axisLeft:{gridFilter:(t,e)=>0!==e},axisRight:{gridFilter:(t,e)=>0!==e},legendCategory:{itemLabelFillOpacity:1,itemLabelFontSize:10,itemValueFillOpacity:1,itemValueFontSize:10,titleFillOpacity:1,titleFontSize:11,titleFontWeight:"bold"},legendContinuous:{handleLabelFontSize:10,labelFillOpacity:.45,labelFontSize:10},label:{fontSize:10},innerLabel:{fontSize:10},htmlLabel:{fontSize:10},slider:{handleLabelFontSize:10,trackFillOpacity:.05}},t);dw.props={};const pw=t=>(...e)=>{const n=Ni(Object.assign({},{crossPadding:50},t))(...e);return Pi(n,t),n};pw.props=Object.assign(Object.assign({},Ni.props),{defaultPosition:"bottom"});const hw=t=>(...e)=>{const n=Ni(Object.assign({},{crossPadding:10},t))(...e);return Pi(n,t),n};hw.props=Object.assign(Object.assign({},Ni.props),{defaultPosition:"left"});const gw=function(){};var mw,yw=Tn({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"),bw=function(t){function e(e){var n=t.call(this,e,{x:0,y:0,animate:{easing:"linear",duration:200,fill:"both"},buttonCursor:"pointer",buttonFill:"black",buttonD:Ga(0,0,6),buttonSize:12,controllerPadding:5,controllerSpacing:5,formatter:function(t,e){return"".concat(t,"/").concat(e)},defaultPage:0,loop:!1,orientation:"horizontal",pageNumFill:"black",pageNumFontSize:12,pageNumTextAlign:"start",pageNumTextBaseline:"middle"})||this;return n.playState="idle",n.contentGroup=n.appendChild(new l.YJ({class:yw.contentGroup.name})),n.playWindow=n.contentGroup.appendChild(new l.YJ({class:yw.playWindow.name})),n.innerCurrPage=n.defaultPage,n}return(0,pn.C6)(e,t),Object.defineProperty(e.prototype,"defaultPage",{get:function(){return(0,ca.A)(this.attributes.defaultPage,0,Math.max(this.pageViews.length-1,0))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pageViews",{get:function(){return this.playWindow.children},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"controllerShape",{get:function(){return this.totalPages>1?{width:55,height:0}:{width:0,height:0}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pageShape",{get:function(){var t=(0,pn.zs)(function(t){var e;return(null===(e=t[0])||void 0===e?void 0:e.map(function(e,n){return t.map(function(t){return t[n]})}))||[]}(this.pageViews.map(function(t){var e=t.getBBox();return[e.width,e.height]})).map(function(t){return Math.max.apply(Math,(0,pn.fX)([],(0,pn.zs)(t),!1))}),2),e=this.attributes,n=e.pageWidth,r=e.pageHeight;return{pageWidth:void 0===n?t[0]:n,pageHeight:void 0===r?t[1]:r}},enumerable:!1,configurable:!0}),e.prototype.getContainer=function(){return this.playWindow},Object.defineProperty(e.prototype,"totalPages",{get:function(){return this.pageViews.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currPage",{get:function(){return this.innerCurrPage},enumerable:!1,configurable:!0}),e.prototype.getBBox=function(){var e=t.prototype.getBBox.call(this),n=this.pageShape;return new hi(e.x,e.y,n.pageWidth+this.controllerShape.width,n.pageHeight)},e.prototype.goTo=function(t){var e=this,n=this.attributes.animate,r=this,o=r.playWindow,i=r.pageViews;if("idle"!==r.playState||t<0||i.length<=0||t>=i.length)return null;i[r.currPage].setLocalPosition(0,0),this.prepareFollowingPage(t);var a=(0,pn.zs)(this.getFollowingPageDiff(t),2),s=a[0],c=a[1];this.playState="running";var l=On(o,[{transform:"translate(0, 0)"},{transform:"translate(".concat(-s,", ").concat(-c,")")}],n);return vn(l,function(){e.innerCurrPage=t,e.playState="idle",e.setVisiblePages([t]),e.updatePageInfo()}),l},e.prototype.prev=function(){var t=this.attributes.loop,e=this.pageViews.length,n=this.currPage;if(!t&&n<=0)return null;var r=t?(n-1+e)%e:(0,ca.A)(n-1,0,e);return this.goTo(r)},e.prototype.next=function(){var t=this.attributes.loop,e=this.pageViews.length,n=this.currPage;if(!t&&n>=e-1)return null;var r=t?(n+1)%e:(0,ca.A)(n+1,0,e);return this.goTo(r)},e.prototype.renderClipPath=function(t){var e=this.pageShape,n=e.pageWidth,r=e.pageHeight;n&&r?(this.clipPath=t.maybeAppendByClassName(yw.clipPath,"rect").styles({width:n,height:r}),this.contentGroup.attr("clipPath",this.clipPath.node())):this.contentGroup.style.clipPath=void 0},e.prototype.setVisiblePages=function(t){this.playWindow.children.forEach(function(e,n){t.includes(n)?gn(e):mn(e)})},e.prototype.adjustControllerLayout=function(){var t=this,e=t.prevBtnGroup,n=t.nextBtnGroup,r=t.pageInfoGroup,o=this.attributes,i=o.orientation,a=o.controllerPadding,s=r.getBBox(),c=s.width,l=(0,pn.zs)("horizontal"===i?[-180,0]:[-90,90],2),u=l[1];e.setLocalEulerAngles(l[0]),n.setLocalEulerAngles(u);var f=e.getBBox(),d=f.width,p=f.height,h=n.getBBox(),g=h.height,m=Math.max(d,c,h.width),y="horizontal"===i?{offset:[[0,0],[d/2+a,0],[d+c+2*a,0]],textAlign:"start"}:{offset:[[m/2,-p-a],[m/2,0],[m/2,g+a]],textAlign:"center"},b=(0,pn.zs)(y.offset,3),v=(0,pn.zs)(b[0],2),x=v[0],O=v[1],w=(0,pn.zs)(b[1],2),j=w[0],k=w[1],A=(0,pn.zs)(b[2],2),M=A[0],_=A[1],S=y.textAlign,E=r.querySelector("text");E&&(E.style.textAlign=S),e.setLocalPosition(x,O),r.setLocalPosition(j,k),n.setLocalPosition(M,_)},e.prototype.updatePageInfo=function(){var t,e=this,n=e.currPage,r=e.pageViews,o=e.attributes.formatter;r.length<2||(null===(t=this.pageInfoGroup.querySelector(yw.pageInfo.class))||void 0===t||t.attr("text",o(n+1,r.length)),this.adjustControllerLayout())},e.prototype.getFollowingPageDiff=function(t){var e=this.currPage;if(e===t)return[0,0];var n=this.pageShape,r=t<e?-1:1;return"horizontal"===this.attributes.orientation?[r*n.pageWidth,0]:[0,r*n.pageHeight]},e.prototype.prepareFollowingPage=function(t){var e=this.currPage,n=this.pageViews;if(this.setVisiblePages([t,e]),t!==e){var r=(0,pn.zs)(this.getFollowingPageDiff(t),2);n[t].setLocalPosition(r[0],r[1])}},e.prototype.renderController=function(t){var e=this,n=this.attributes,r=n.controllerSpacing,o=n.classNamePrefix,i=void 0===o?"":o,a=this.pageShape,s=a.pageWidth,c=a.pageHeight,l=this.pageViews.length>=2,u=t.maybeAppendByClassName(yw.controller,"g");if(yn(u.node(),l),l){var f=fr(this.attributes,"button"),d=fr(this.attributes,"pageNum"),p=(0,pn.zs)(pr(f),2),h=p[0],g=p[1],m=h.size,y=(0,pn.Tt)(h,["size"]),b=!u.select(yw.prevBtnGroup.class).node(),v=u.maybeAppendByClassName(yw.prevBtnGroup,"g").styles(g);this.prevBtnGroup=v.node();var x=v.maybeAppendByClassName(yw.prevBtn,"path");if(i){var O=Oa(yw.prevBtn.name,Ia,i);x.node().setAttribute("class",O)}var w=u.maybeAppendByClassName(yw.nextBtnGroup,"g").styles(g);this.nextBtnGroup=w.node();var j=w.maybeAppendByClassName(yw.nextBtn,"path");if(i){var k=Oa(yw.nextBtn.name,Na,i);j.node().setAttribute("class",k)}[x,j].forEach(function(t){t.styles((0,pn.Cl)((0,pn.Cl)({},y),{transformOrigin:"center"})),Mr(t.node(),m,!0)});var A=u.maybeAppendByClassName(yw.pageInfoGroup,"g");this.pageInfoGroup=A.node();var M=A.maybeAppendByClassName(yw.pageInfo,"text");if(M.styles(d),i){var _=Oa(yw.pageInfo.name,Ra,i);M.node().setAttribute("class",_)}this.updatePageInfo(),u.node().setLocalPosition(s+r,c/2),b&&(this.prevBtnGroup.addEventListener("click",function(){e.prev()}),this.nextBtnGroup.addEventListener("click",function(){e.next()}))}},e.prototype.render=function(t,e){var n=t.x,r=t.y,o=void 0===r?0:r;this.attr("transform","translate(".concat(void 0===n?0:n,", ").concat(o,")"));var i=zn(e);this.renderClipPath(i),this.renderController(i),this.setVisiblePages([this.defaultPage]),this.goTo(this.defaultPage)},e.prototype.bindEvents=function(){var t=this,e=w(function(){return t.render(t.attributes,t)},50);this.playWindow.addEventListener(l.jX.INSERTED,e),this.playWindow.addEventListener(l.jX.REMOVED,e)},e}(Sn);function vw(t,e){for(var n in e)e.hasOwnProperty(n)&&"constructor"!==n&&void 0!==e[n]&&(t[n]=e[n])}function xw(t,e,n,r){return e&&vw(t,e),n&&vw(t,n),r&&vw(t,r),t}var Ow="component-poptip",ww="component-poptip-arrow",jw="component-poptip-text",kw=((mw={})[".".concat(Ow)]={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"},mw[".".concat(jw)]={"text-align":"center"},mw[".".concat(Ow,"[data-position='top']")]={transform:"translate(-50%, -100%)"},mw[".".concat(Ow,"[data-position='left']")]={transform:"translate(-100%, -50%)"},mw[".".concat(Ow,"[data-position='right']")]={transform:"translate(0, -50%)"},mw[".".concat(Ow,"[data-position='bottom']")]={transform:"translate(-50%, 0)"},mw[".".concat(Ow,"[data-position='top-left']")]={transform:"translate(0,-100%)"},mw[".".concat(Ow,"[data-position='top-right']")]={transform:"translate(-100%,-100%)"},mw[".".concat(Ow,"[data-position='left-top']")]={transform:"translate(-100%, 0)"},mw[".".concat(Ow,"[data-position='left-bottom']")]={transform:"translate(-100%, -100%)"},mw[".".concat(Ow,"[data-position='right-top']")]={transform:"translate(0, 0)"},mw[".".concat(Ow,"[data-position='right-bottom']")]={transform:"translate(0, -100%)"},mw[".".concat(Ow,"[data-position='bottom-left']")]={transform:"translate(0, 0)"},mw[".".concat(Ow,"[data-position='bottom-right']")]={transform:"translate(-100%, 0)"},mw[".".concat(ww)]={width:"4px",height:"4px",transform:"rotate(45deg)","background-color":"rgba(0, 0, 0)",position:"absolute","z-index":-1},mw[".".concat(Ow,"[data-position='top']")]={transform:"translate(-50%, calc(-100% - 5px))"},mw["[data-position='top'] .".concat(ww)]={bottom:"-2px"},mw[".".concat(Ow,"[data-position='left']")]={transform:"translate(calc(-100% - 5px), -50%)"},mw["[data-position='left'] .".concat(ww)]={right:"-2px"},mw[".".concat(Ow,"[data-position='right']")]={transform:"translate(5px, -50%)"},mw["[data-position='right'] .".concat(ww)]={left:"-2px"},mw[".".concat(Ow,"[data-position='bottom']")]={transform:"translate(-50%, 5px)"},mw["[data-position='bottom'] .".concat(ww)]={top:"-2px"},mw[".".concat(Ow,"[data-position='top-left']")]={transform:"translate(0, calc(-100% - 5px))"},mw["[data-position='top-left'] .".concat(ww)]={left:"10px",bottom:"-2px"},mw[".".concat(Ow,"[data-position='top-right']")]={transform:"translate(-100%, calc(-100% - 5px))"},mw["[data-position='top-right'] .".concat(ww)]={right:"10px",bottom:"-2px"},mw[".".concat(Ow,"[data-position='left-top']")]={transform:"translate(calc(-100% - 5px), 0)"},mw["[data-position='left-top'] .".concat(ww)]={right:"-2px",top:"8px"},mw[".".concat(Ow,"[data-position='left-bottom']")]={transform:"translate(calc(-100% - 5px), -100%)"},mw["[data-position='left-bottom'] .".concat(ww)]={right:"-2px",bottom:"8px"},mw[".".concat(Ow,"[data-position='right-top']")]={transform:"translate(5px, 0)"},mw["[data-position='right-top'] .".concat(ww)]={left:"-2px",top:"8px"},mw[".".concat(Ow,"[data-position='right-bottom']")]={transform:"translate(5px, -100%)"},mw["[data-position='right-bottom'] .".concat(ww)]={left:"-2px",bottom:"8px"},mw[".".concat(Ow,"[data-position='bottom-left']")]={transform:"translate(0, 5px)"},mw["[data-position='bottom-left'] .".concat(ww)]={top:"-2px",left:"8px"},mw[".".concat(Ow,"[data-position='bottom-right']")]={transform:"translate(-100%, 5px)"},mw["[data-position='bottom-right'] .".concat(ww)]={top:"-2px",right:"8px"},mw);function Aw(t){var e=t&&document.getElementById(t);return e||((e=document.createElement("div")).setAttribute("id",t),document.body.appendChild(e)),e}var Mw=function(t){function e(n){var r=t.call(this,(0,N.A)({style:{id:"component-poptip"}},e.defaultOptions,n))||this;return r.visibility="visible",r.map=new Map,r.domStyles="",r.initShape(),r.render(r.attributes,r),r}return(0,pn.C6)(e,t),Object.defineProperty(e.prototype,"visible",{get:function(){return"visible"===this.visibility},enumerable:!1,configurable:!0}),e.prototype.render=function(t,e){this.visibility=this.style.visibility,this.updatePoptipElement()},e.prototype.update=function(t){this.attr((0,N.A)({},this.style,t)),this.render(this.attributes,this)},e.prototype.bind=function(t,e){var n=this;if(t){var r=this.style.text,o=function(o){var i=t,a=n.style,s=r;if(e){var c="function"==typeof e?e.call(null,o):e,l=c.html,u=c.target,f=(0,pn.Tt)(c,["html","target"]);a=xw({},n.style,f),(u||!1===u)&&(i=u),"string"==typeof l&&(s=l)}var d=a.position,p=a.offset;if(i){var h=(0,pn.zs)(function(t,e,n,r,o,i){if(void 0===o&&(o=!1),void 0===i&&(i=!1),i)return[t,e];var a=n.getBoundingClientRect(),s=a.x,c=a.y,l=a.width,u=a.height;switch(r){case"top":return o?[s+l/2,c]:[t,c];case"left":return o?[s,c+u/2]:[s,e];case"bottom":return o?[s+l/2,c+u]:[t,c+u];case"right":return o?[s+l,c+u/2]:[s+l,e];case"top-right":case"right-top":return[s+l,c];case"left-bottom":case"bottom-left":return[s,c+u];case"right-bottom":case"bottom-right":return[s+l,c+u];default:return[s,c]}}(o.clientX,o.clientY,i,d,a.arrowPointAtCenter,a.follow),2);n.showTip(h[0],h[1],{text:s,position:d,offset:p})}else n.hideTip()},i=function(){n.hideTip()};t.addEventListener("mousemove",o),t.addEventListener("mouseleave",i),this.map.set(t,[o,i])}},e.prototype.unbind=function(t){if(this.map.has(t)){var e=(0,pn.zs)(this.map.get(t)||[],2),n=e[0],r=e[1];n&&t.removeEventListener("mousemove",n),r&&t.removeEventListener("mouseleave",r),this.map.delete(t)}},e.prototype.clear=function(){this.container.innerHTML=""},e.prototype.destroy=function(){var e,n=this;(0,pn.fX)([],(0,pn.zs)(this.map.keys()),!1).forEach(function(t){return n.unbind(t)}),null===(e=this.container)||void 0===e||e.remove(),t.prototype.destroy.call(this)},e.prototype.showTip=function(t,e,n){var r=k(n,"text");if((!r||"string"==typeof r)&&(this.applyStyles(),t&&e&&n)){var o=n.offset,i=n.position;if(i&&this.container.setAttribute("data-position",i),this.setOffsetPosition(t,e,o),"string"==typeof r){var a=this.container.querySelector(".".concat(jw));a&&(a.innerHTML=r)}this.visibility="visible",this.container.style.visibility="visible"}},e.prototype.hideTip=function(){this.visibility="hidden",this.container.style.visibility="hidden"},e.prototype.getContainer=function(){return this.container},e.prototype.getClassName=function(){var t=this.style.containerClassName;return"".concat(Ow).concat(t?" ".concat(t):"")},e.prototype.initShape=function(){var t=this;this.container=function(t){var e=function(t){var e;return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return e||(e=t.apply(void 0,n)),e}}(Aw)(t);return e}(this.style.id),this.container.className=this.getClassName(),this.container.addEventListener("mousemove",function(){return t.showTip()}),this.container.addEventListener("mouseleave",function(){return t.hideTip()})},e.prototype.updatePoptipElement=function(){var t=this.container;this.clear();var e=this.style,n=e.template,r=e.text;this.container.setAttribute("id",e.id),this.container.className=this.getClassName();var o='<span class="'.concat(ww,'"></span>');t.innerHTML=o,(0,j.A)(n)?t.innerHTML+=n:n&&function(t){return t instanceof Element||t instanceof Document}(n)&&t.appendChild(n),r&&(t.getElementsByClassName(jw)[0].textContent=r),this.applyStyles(),this.container.style.visibility=this.visibility},e.prototype.applyStyles=function(){var t=kn({},kw,this.style.domStyles),e=Object.entries(t).reduce(function(t,e){var n=(0,pn.zs)(e,2),r=n[0],o=Object.entries(n[1]).reduce(function(t,e){var n=(0,pn.zs)(e,2),r=n[0],o=n[1];return"".concat(t).concat(r,": ").concat(o,";")},"");return"".concat(t).concat(r,"{").concat(o,"}")},"");if(this.domStyles!==e){this.domStyles=e;var n=this.container.querySelector("style");n&&this.container.removeChild(n),(n=document.createElement("style")).innerHTML=e,this.container.appendChild(n)}},e.prototype.setOffsetPosition=function(t,e,n){void 0===n&&(n=this.style.offset);var r=(0,pn.zs)(n,2),o=r[0],i=r[1],a=void 0===i?0:i;this.container.style.left="".concat(t+(void 0===o?0:o),"px"),this.container.style.top="".concat(e+a,"px")},e.tag="poptip",e.defaultOptions={style:{x:0,y:0,width:0,height:0,target:null,visibility:"hidden",text:"",position:"top",follow:!1,offset:[0,0],domStyles:kw,template:'<div class="'.concat(jw,'"></div>')}},e}(Sn),_w=Tn({layout:"flex",markerGroup:"marker-group",marker:"marker",labelGroup:"label-group",label:"label",valueGroup:"value-group",focusGroup:"focus-group",focus:"focus",value:"value",backgroundGroup:"background-group",background:"background"},"legend-category-item"),Sw={offset:[0,20],domStyles:{".component-poptip":{opacity:"1",padding:"8px 12px",background:"#fff",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.15)"},".component-poptip-arrow":{display:"none"},".component-poptip-text":{color:"#000",lineHeight:"20px"}}};var Ew=function(t){function e(e,n){var r=t.call(this,e,{span:[1,1],marker:function(){return new l.jl({style:{r:6}})},markerSize:10,labelFill:"#646464",valueFill:"#646464",labelFontSize:12,valueFontSize:12,labelTextBaseline:"middle",valueTextBaseline:"middle"})||this;return r.keyFields={},r.keyFields=n||{},r}return(0,pn.C6)(e,t),Object.defineProperty(e.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(e.prototype,"actualSpace",{get:function(){var t=this.valueGroup,e=this.attributes,n=e.markerSize,r=e.focus,o=e.focusMarkerSize,i=this.labelGroup.node().getBBox(),a=i.width,s=i.height,c=t.node().getBBox();return{markerWidth:n,labelWidth:a,valueWidth:c.width,focusWidth:r?null!=o?o:12:0,height:Math.max(n,s,c.height)}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"span",{get:function(){var t=this.attributes.span;if(!t)return[1,1];var e=(0,pn.zs)(so(t),2),n=e[0],r=this.showValue?e[1]:0,o=n+r;return[n/o,r/o]},enumerable:!1,configurable:!0}),e.prototype.setAttribute=function(e,n){t.prototype.setAttribute.call(this,e,n)},Object.defineProperty(e.prototype,"shape",{get:function(){var t,e=this.attributes,n=e.markerSize,r=e.width,o=this.actualSpace,i=o.markerWidth,a=o.focusWidth,s=o.height,c=this.actualSpace,l=c.labelWidth,u=c.valueWidth,f=(0,pn.zs)(this.spacing,3),d=f[0],p=f[1],h=f[2];if(r){var g=r-n-d-p-a-h,m=(0,pn.zs)(this.span,2);l=(t=(0,pn.zs)([m[0]*g,m[1]*g],2))[0],u=t[1]}return{width:i+l+u+d+p+a+h,height:s,markerWidth:i,labelWidth:l,valueWidth:u,focusWidth:a}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"spacing",{get:function(){var t=this.attributes,e=t.spacing,n=t.focus;if(!e)return[0,0,0];var r=(0,pn.zs)(so(e),3);return[r[0],this.showValue?r[1]:0,n?r[2]:0]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"layout",{get:function(){var t=this.shape,e=t.markerWidth,n=t.labelWidth,r=t.valueWidth,o=t.focusWidth,i=t.width,a=t.height,s=(0,pn.zs)(this.spacing,3),c=s[0],l=s[1];return{height:a,width:i,markerWidth:e,labelWidth:n,valueWidth:r,focusWidth:o,position:[e/2,e+c,e+n+c+l,e+n+r+c+l+s[2]+o/2]}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scaleSize",{get:function(){var t=function(t){var e=t.querySelector(_w.marker.class);return e?e.style:{}}(this.markerGroup.node()),e=this.attributes,n=e.markerSize,r=e.markerStrokeWidth,o=e.markerLineWidth,i=e.markerStroke,a=+((void 0===r?t.strokeWidth:r)||(void 0===o?t.lineWidth:o)||((void 0===i?t.stroke:i)?1:0))*Math.sqrt(2),s=this.markerGroup.node().getBBox();return(1-a/Math.max(s.width,s.height))*n},enumerable:!1,configurable:!0}),e.prototype.renderMarker=function(t){var e=this,n=this.attributes,r=n.marker,o=n.classNamePrefix,i=fr(this.attributes,"marker");this.markerGroup=t.maybeAppendByClassName(_w.markerGroup,"g").style("zIndex",0),En(!!r,this.markerGroup,function(){var t,n=e.markerGroup.node(),a=null===(t=n.childNodes)||void 0===t?void 0:t[0],s=Oa(_w.marker.name,ka,o),c="string"==typeof r?new Ka({style:{symbol:r},className:s}):r();if(a)if(c.nodeName===a.nodeName)a instanceof Ka?a.update((0,pn.Cl)((0,pn.Cl)({},i),{symbol:r})):(!function(t,e){var n,r,o=e.attributes;try{for(var i=(0,pn.Ju)(Object.entries(o)),a=i.next();!a.done;a=i.next()){var s=(0,pn.zs)(a.value,2),c=s[0];"id"!==c&&"className"!==c&&t.attr(c,s[1])}}catch(t){n={error:t}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}(a,c),zn(a).styles(i));else{if(a.remove(),!(c instanceof Ka)){var l=Oa(_w.marker.name,ka,o);c.className=l}zn(c).styles(i),n.appendChild(c)}else{if(!(c instanceof Ka)){var u=Oa(_w.marker.name,ka,o);c.className=u,zn(c).styles(i)}n.appendChild(c)}e.markerGroup.node().scale(1/e.markerGroup.node().getScale()[0]);var f=Mr(e.markerGroup.node(),e.scaleSize,!0);e.markerGroup.node().style._transform="scale(".concat(f,")")})},e.prototype.renderLabel=function(t){var e=fr(this.attributes,"label"),n=e.text,r=(0,pn.Tt)(e,["text"]),o=this.attributes.classNamePrefix;this.labelGroup=t.maybeAppendByClassName(_w.labelGroup,"g").style("zIndex",0);var i=Oa(_w.label.name,Aa,o),a=this.labelGroup.maybeAppendByClassName(_w.label,function(){return Ar(n)});a.node().setAttribute("class",i),a.styles(r)},e.prototype.renderValue=function(t){var e=this,n=fr(this.attributes,"value"),r=n.text,o=(0,pn.Tt)(n,["text"]),i=this.attributes.classNamePrefix;this.valueGroup=t.maybeAppendByClassName(_w.valueGroup,"g").style("zIndex",0),En(this.showValue,this.valueGroup,function(){var t=Oa(_w.value.name,Ma,i),n=e.valueGroup.maybeAppendByClassName(_w.value,function(){return Ar(r)});n.node().setAttribute("class",t),n.styles(o)})},e.prototype.createPoptip=function(){var t=this.attributes.poptip||{},e=(0,pn.Tt)(t,["render"]),n=new Mw({style:kn(Sw,e)});return this.poptipGroup=n,n},e.prototype.bindPoptip=function(t){var e=this,n=this.attributes.poptip;n&&(this.poptipGroup||this.createPoptip()).bind(t,function(){var t=e.attributes,r=t.labelText,o=t.valueText,i=t.markerFill,a="string"==typeof r?r:null==r?void 0:r.attr("text"),s="string"==typeof o?o:null==o?void 0:o.attr("text");if("function"==typeof n.render)return{html:n.render((0,pn.Cl)((0,pn.Cl)({},e.keyFields),{label:a,value:s,color:i}))};var c="";return"string"!=typeof a&&"number"!=typeof a||(c+='<div class="component-poptip-label">'.concat(a,"</div>")),"string"!=typeof s&&"number"!=typeof s||(c+='<div class="component-poptip-value">'.concat(s,"</div>")),{html:c}})},e.prototype.renderFocus=function(t){var e=this,n=this.attributes,r=n.focus,o=n.classNamePrefix,i={x:0,y:0,size:n.focusMarkerSize,opacity:.6,symbol:"focus",stroke:"#aaaaaa",lineWidth:1};(0,ei.A)(r)||(this.focusGroup=t.maybeAppendByClassName(_w.focusGroup,"g").style("zIndex",0),En(r,this.focusGroup,function(){var n=Oa(_w.focus.name,_a,o),r=new Ka({style:(0,pn.Cl)((0,pn.Cl)({},i),{symbol:"focus"}),className:n}),a=new l.jl({style:{r:i.size/2,fill:"transparent"}}),s=e.focusGroup.node();s.appendChild(a),s.appendChild(r),r.update({opacity:0}),t.node().addEventListener("pointerenter",function(){r.update({opacity:1})}),t.node().addEventListener("pointerleave",function(){r.update({opacity:0})})}))},e.prototype.renderPoptip=function(t){var e=this;this.attributes.poptip&&[t.maybeAppendByClassName(_w.value,"g").node(),t.maybeAppendByClassName(_w.label,"g").node()].forEach(function(t){t&&e.bindPoptip(t)})},e.prototype.renderBackground=function(t){var e=this.shape,n=e.width,r=e.height,o=fr(this.attributes,"background");this.background=t.maybeAppendByClassName(_w.backgroundGroup,"g").style("zIndex",-1);var i=this.background.maybeAppendByClassName(_w.background,"rect");i.styles((0,pn.Cl)({width:n,height:r},o));var a=this.attributes.classNamePrefix,s=void 0===a?"":a;if(s){var c=Oa(_w.background.name,Sa,s);i.node().setAttribute("class",c)}},e.prototype.adjustLayout=function(){var t=this.layout,e=t.labelWidth,n=t.valueWidth,r=t.height,o=(0,pn.zs)(t.position,4),i=o[1],a=o[2],s=o[3],c=r/2;this.markerGroup.styles({transform:"translate(".concat(o[0],", ").concat(c,")").concat(this.markerGroup.node().style._transform)}),this.labelGroup.styles({transform:"translate(".concat(i,", ").concat(c,")")}),this.focusGroup&&this.focusGroup.styles({transform:"translate(".concat(s,", ").concat(c,")")}),io(this.labelGroup.select(_w.label.class).node(),Math.ceil(e)),this.showValue&&(this.valueGroup.styles({transform:"translate(".concat(a,", ").concat(c,")")}),io(this.valueGroup.select(_w.value.class).node(),Math.ceil(n)))},e.prototype.render=function(t,e){var n=zn(e),r=t.x,o=t.y,i=void 0===o?0:o;n.styles({transform:"translate(".concat(void 0===r?0:r,", ").concat(i,")")}),this.renderMarker(n),this.renderLabel(n),this.renderValue(n),this.renderBackground(n),this.renderPoptip(n),this.renderFocus(n),this.adjustLayout()},e}(Sn),Pw=Tn({page:"item-page",navigator:"navigator",item:"item"},"items"),Lw=function(t,e,n){return void 0===n&&(n=!0),t?e(t):n},Cw=function(t){function e(e){var n=t.call(this,e,{data:[],gridRow:1/0,gridCol:void 0,padding:0,width:1e3,height:100,rowPadding:0,colPadding:0,layout:"flex",orientation:"horizontal",click:gw,mouseenter:gw,mouseleave:gw})||this;return n.navigatorShape=[0,0],n}return(0,pn.C6)(e,t),Object.defineProperty(e.prototype,"pageViews",{get:function(){return this.navigator.getContainer()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"grid",{get:function(){var t=this.attributes,e=t.gridRow,n=t.gridCol,r=t.data;if(!e&&!n)throw new Error("gridRow and gridCol can not be set null at the same time");return e&&n?[e,n]:e?[e,r.length]:[r.length,n]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"renderData",{get:function(){var t=this.attributes,e=t.data,n=t.layout,r=t.poptip,o=t.focus,i=t.focusMarkerSize,a=t.classNamePrefix,s=fr(this.attributes,"item"),c=e.map(function(t,c){var l=t.id,u=t.label,f=t.value;return{id:"".concat(void 0===l?c:l),index:c,style:(0,pn.Cl)({layout:n,labelText:u,valueText:f,poptip:r,focus:o,focusMarkerSize:i,classNamePrefix:a},Object.fromEntries(Object.entries(s).map(function(n){var r=(0,pn.zs)(n,2);return[r[0],hr(r[1],[t,c,e])]})))}});return c},enumerable:!1,configurable:!0}),e.prototype.getGridLayout=function(){var t=this,e=this.attributes,n=e.orientation,r=e.width,o=e.rowPadding,i=e.colPadding,a=(0,pn.zs)(this.navigatorShape,1)[0],s=(0,pn.zs)(this.grid,2),c=s[0],l=s[1],u=l*c,f=0;return this.pageViews.children.map(function(e,s){var d,p,h=Math.floor(s/u),g=s%u,m=t.ifHorizontal(l,c),y=[Math.floor(g/m),g%m];"vertical"===n&&y.reverse();var b=(0,pn.zs)(y,2),v=b[0],x=b[1],O=(r-a-(l-1)*i)/l,w=e.getBBox().height,j=(0,pn.zs)([0,0],2),k=j[0],A=j[1];return"horizontal"===n?(k=(d=(0,pn.zs)([f,v*(w+o)],2))[0],A=d[1],f=x===l-1?0:f+O+i):(k=(p=(0,pn.zs)([x*(O+i),f],2))[0],A=p[1],f=v===c-1?0:f+w+o),{page:h,index:s,row:v,col:x,pageIndex:g,width:O,height:w,x:k,y:A}})},e.prototype.getFlexLayout=function(){var t=this.attributes,e=t.width,n=t.height,r=t.rowPadding,o=t.colPadding,i=(0,pn.zs)(this.navigatorShape,1)[0],a=(0,pn.zs)(this.grid,2),s=a[0],c=a[1],l=(0,pn.zs)([e-i,n],2),u=l[0],f=l[1],d=(0,pn.zs)([0,0,0,0,0,0,0,0],8),p=d[2],h=d[3],g=d[4],m=d[5],y=d[6],b=d[7];return this.pageViews.children.map(function(t,e){var n,i,a,l,d=t.getBBox(),v=d.width,x=d.height,O=0===y?0:o,w=y+O+v;return w<=u&&Lw(g,function(t){return t<c})?(n=(0,pn.zs)([y+O,b,w],3),y=n[2],{width:v,height:x,x:n[0],y:n[1],page:p,index:e,pageIndex:h++,row:m,col:g++}):(i=(0,pn.zs)([m+1,0,0,b+x+r],4),m=i[0],g=i[1],y=i[2],(b=i[3])+x<=f&&Lw(m,function(t){return t<s})?(a=(0,pn.zs)([y,b,v],3),y=a[2],{width:v,height:x,x:a[0],y:a[1],page:p,index:e,pageIndex:h++,row:m,col:g++}):(l=(0,pn.zs)([0,0,v,0,p+1,0,0,0],8),y=l[2],b=l[3],h=l[5],g=l[7],{width:v,height:x,x:l[0],y:l[1],page:p=l[4],index:e,pageIndex:h++,row:m=l[6],col:g++}))})},Object.defineProperty(e.prototype,"itemsLayout",{get:function(){this.navigatorShape=[0,0];var t="grid"===this.attributes.layout?this.getGridLayout:this.getFlexLayout,e=t.call(this);return e.slice(-1)[0].page>0?(this.navigatorShape=[55,0],t.call(this)):e},enumerable:!1,configurable:!0}),e.prototype.ifHorizontal=function(t,e){return Ua(this.attributes.orientation,t,e)},e.prototype.flattenPage=function(t){t.querySelectorAll(Pw.item.class).forEach(function(e){t.appendChild(e)}),t.querySelectorAll(Pw.page.class).forEach(function(e){t.removeChild(e).destroy()})},e.prototype.renderItems=function(t){var e=this.attributes,n=e.click,r=e.mouseenter,o=e.mouseleave,i=e.classNamePrefix;this.flattenPage(t);var a=this.dispatchCustomEvent.bind(this),s=Oa(Pw.item.name,ja,i);zn(t).selectAll(Pw.item.class).data(this.renderData,function(t){return t.id}).join(function(t){return t.append(function(t){var e=t.style,n=(0,pn.Tt)(t,["style"]);return new Ew({style:e},n)}).attr("className",s).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==o||o(this),a("itemMouseleave",{item:this})})},function(t){return t.each(function(t){this.update(t.style)})},function(t){return t.remove()})},e.prototype.relayoutNavigator=function(){var t,e=this.attributes,n=e.layout,r=e.width,o=(null===(t=this.pageViews.children[0])||void 0===t?void 0:t.getBBox().height)||0,i=(0,pn.zs)(this.navigatorShape,2);this.navigator.update("grid"===n?{pageWidth:r-i[0],pageHeight:o-i[1]}:{})},e.prototype.adjustLayout=function(){var t,e,n=this,r=Object.entries((t=this.itemsLayout,e="page",t.reduce(function(t,n){return(t[n[e]]=t[n[e]]||[]).push(n),t},{}))).map(function(t){var e=(0,pn.zs)(t,2);return{page:e[0],layouts:e[1]}}),o=(0,pn.fX)([],(0,pn.zs)(this.navigator.getContainer().children),!1);r.forEach(function(t){var e=t.layouts,r=n.pageViews.appendChild(new l.YJ({className:Pw.page.name}));e.forEach(function(t){var e=t.x,n=t.y,i=t.width,a=t.height,s=o[t.index];r.appendChild(s),Hc(s,"__layout__",t),s.update({x:e,y:n,width:i,height:a})})}),this.relayoutNavigator()},e.prototype.renderNavigator=function(t){var e=this.attributes,n=e.orientation,r=e.classNamePrefix,o=fr(this.attributes,"nav"),i=kn({orientation:n,classNamePrefix:r},o),a=this;return t.selectAll(Pw.navigator.class).data(["nav"]).join(function(t){return t.append(function(){return new bw({style:i})}).attr("className",Pw.navigator.name).each(function(){a.navigator=this})},function(t){return t.each(function(){this.update(i)})},function(t){return t.remove()}),this.navigator},e.prototype.getBBox=function(){return this.navigator.getBBox()},e.prototype.render=function(t,e){var n=this.attributes.data;if(n&&0!==n.length){var r=this.renderNavigator(zn(e));this.renderItems(r.getContainer()),this.adjustLayout()}},e.prototype.dispatchCustomEvent=function(t,e){var n=new l.up(t,{detail:e});this.dispatchEvent(n)},e}(Sn),zw=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,pn.C6)(e,t),e.prototype.update=function(t){this.attr(t)},e}(l.g3),Tw=function(t){function e(e){return t.call(this,e,es)||this}return(0,pn.C6)(e,t),e.prototype.renderTitle=function(t,e,n){var r=this.attributes,o=r.showTitle,i=r.titleText,a=r.classNamePrefix,s=fr(this.attributes,"title"),c=(0,pn.zs)(pr(s),2),l=c[0],u=c[1];this.titleGroup=t.maybeAppendByClassName(rs.titleGroup,"g").styles(u);var f=(0,pn.Cl)((0,pn.Cl)({width:e,height:n},l),{text:o?i:"",classNamePrefix:a});this.title=this.titleGroup.maybeAppendByClassName(rs.title,function(){return new $a({style:f})}).update(f)},e.prototype.renderCustom=function(t){var e={innerHTML:this.attributes.render(this.attributes.data),pointerEvents:"auto"};t.maybeAppendByClassName(rs.html,function(){return new zw({className:rs.html.name,style:e})}).update(e)},e.prototype.renderItems=function(t,e){var n=e.x,r=e.y,o=e.width,i=e.height,a=fr(this.attributes,"title",!0),s=(0,pn.zs)(pr(a),2),c=s[1],l=(0,pn.Cl)((0,pn.Cl)({},s[0]),{width:o,height:i,x:0,y:0});this.itemsGroup=t.maybeAppendByClassName(rs.itemsGroup,"g").styles((0,pn.Cl)((0,pn.Cl)({},c),{transform:"translate(".concat(n,", ").concat(r,")")}));var u=this;this.itemsGroup.selectAll(rs.items.class).data(["items"]).join(function(t){return t.append(function(){return new Cw({style:l})}).attr("className",rs.items.name).each(function(){u.items=zn(this)})},function(t){return t.update(l)},function(t){return t.remove()})},e.prototype.adjustLayout=function(){if(this.attributes.showTitle){var t=this.title.node().getAvailableSpace(),e=t.x,n=t.y;this.itemsGroup.node().style.transform="translate(".concat(e,", ").concat(n,")")}},Object.defineProperty(e.prototype,"availableSpace",{get:function(){var t=this.attributes,e=t.width,n=t.height;return t.showTitle?this.title.node().getAvailableSpace():new hi(0,0,e,n)},enumerable:!1,configurable:!0}),e.prototype.getBBox=function(){var e,n,r=null===(e=this.title)||void 0===e?void 0:e.node(),o=null===(n=this.items)||void 0===n?void 0:n.node();return r&&o?function(t,e){var n=t.attributes,r=n.position,o=n.spacing,i=n.inset,a=n.text,s=t.getBBox(),c=e.getBBox(),l=Fo(r),u=(0,pn.zs)(so(a?o:0),4),f=u[0],d=u[1],p=u[2],h=u[3],g=(0,pn.zs)(so(i),4),m=g[0],y=g[1],b=g[2],v=g[3],x=(0,pn.zs)([h+d,f+p],2),O=x[0],w=x[1],j=(0,pn.zs)([v+y,m+b],2),k=j[0],A=j[1];if("l"===l[0])return new hi(s.x,s.y,c.width+s.width+O+k,Math.max(c.height+A,s.height));if("t"===l[0])return new hi(s.x,s.y,Math.max(c.width+k,s.width),c.height+s.height+w+A);var M=(0,pn.zs)([e.attributes.width||c.width,e.attributes.height||c.height],2);return new hi(c.x,c.y,M[0]+s.width+O+k,M[1]+s.height+w+A)}(r,o):t.prototype.getBBox.call(this)},e.prototype.render=function(t,e){var n=this.attributes,r=n.width,o=n.height,i=n.x,a=void 0===i?0:i,s=n.y,c=void 0===s?0:s,l=n.classNamePrefix,u=n.render,f=zn(e);l?e.attr("className","".concat(e.className||"legend-category"," ").concat(l,"legend")):e.className||e.attr("className","legend-category"),e.style.transform="translate(".concat(a,", ").concat(c,")"),u?this.renderCustom(f):(this.renderTitle(f,r,o),this.renderItems(f,this.availableSpace),this.adjustLayout())},e}(Sn),Bw=function(t,e,n,r){return new(n||(n=Promise))(function(o,i){function a(t){try{c(r.next(t))}catch(t){i(t)}}function s(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){t.done?o(t.value):function(t){return t instanceof n?t:new n(function(e){e(t)})}(t.value).then(a,s)}c((r=r.apply(t,e||[])).next())})};const Iw="legend-category",Nw="legend-html-category";function Rw(t){return t.getElementsByClassName("legend-category-item-marker")[0]}function Fw(t){return t.getElementsByClassName("legend-category-item-label")[0]}function Dw(t){return t.getElementsByClassName("legend-category-item-focus-group")[0]}function $w(t){return t.getElementsByClassName("items-item")}function Ww(t){return t.getElementsByClassName(Iw)}function Hw(t){return t.getElementsByClassName("legend-continuous")}function qw(t){let e=t.parentNode;for(;e&&!e.__data__;)e=e.parentNode;return e.__data__}function Yw(t,e){return Bw(this,arguments,void 0,function*(t,{legend:e,channel:n,value:r,ordinal:o,channels:i,allChannels:a,facet:s=!1}){const{view:c,update:l,setState:u}=t;u(e,t=>{var l,u;const{marks:f}=t,d=null===(u=null===(l=e.attributes)||void 0===l?void 0:l.scales)||void 0===u?void 0:u.find(t=>t.name===n),p=f.map(e=>{var l,u;if((null!==(l=e.scale[n].key)&&void 0!==l?l:n)!==(null!==(u=null==d?void 0:d.key)&&void 0!==u?u:null==d?void 0:d.name))return e;if("legends"===e.type)return e;if(tn.includes(e.type))return e;const{transform:f=[],data:p=[]}=e,h=f.findIndex(({type:t})=>t.startsWith("group")||t.startsWith("bin")),g=[...f];p.length&&g.splice(h+1,0,{type:"filter",[n]:{value:r,ordinal:o}});const m=Object.fromEntries(i.map(e=>{const n=function(t,e,n){var r;const o=Object.keys(t).find(r=>{if(r.startsWith(n)){const o=t[r].getOptions();return o.name===n&&o.markKey===e}});return null!==(r=t[o])&&void 0!==r?r:t[n]}(c.scale,t.key,e);return[e,{domain:n.getOptions().domain}]}));return(0,N.A)({},e,Object.assign(Object.assign({transform:g,scale:m},!o&&{animate:!1}),{legend:!s&&Object.fromEntries(a.map(t=>[t,{preserve:!0}]))}))});return Object.assign(Object.assign({},t),{marks:p})}),yield l()})}function Xw(t,e){for(const n of t)Yw(n,Object.assign(Object.assign({},e),{facet:!0}))}function Gw(){return(t,e,n)=>{const{container:r}=t,o=e.filter(e=>e!==t),i=o.length>0,a=t=>qw(t).scales.map(t=>t.name),s=[...Ww(r),...(c=r,c.getElementsByClassName(Nw)),...Hw(r)];var c;const l=s.flatMap(a),u=gh(i?Xw:Yw,50,{trailing:!0}),f=s.map(e=>{const{name:s,domain:c}=qw(e).scales[0],f={legend:e,channel:s,channels:a(e),allChannels:l};return e.className===Iw?function(t,{legends:e,marker:n,label:r,datum:o,filter:i,defaultSelect:a,emitter:s,channel:c,state:l={}}){const u=new Map,f=new Map,d=new Map,p=new Map,{unselected:h={markerStroke:"#aaa",markerFill:"#aaa",labelFill:"#aaa"}}=l,g={unselected:xt(h,"marker")},m={unselected:xt(h,"label")},{setState:y,removeState:b}=Nl(g,void 0),{setState:v,removeState:x}=Nl(m,void 0),O=Array.from(e(t));let w=O.map(o);const j=()=>{for(const t of O){const e=o(t),i=n(t),a=r(t);w.includes(e)?(b(i,"unselected"),x(a,"unselected")):(y(i,"unselected"),v(a,"unselected"))}};for(const e of O){const n=()=>{ql(t,"pointer")},r=()=>{Yl(t)},a=t=>Bw(this,void 0,void 0,function*(){const n=o(e),r=w.indexOf(n);-1===r?w.push(n):w.splice(r,1),yield i(w),j();const{nativeEvent:a=!0}=t;a&&(w.length===O.length?s.emit("legend:reset",{nativeEvent:a}):s.emit("legend:filter",Object.assign(Object.assign({},t),{nativeEvent:a,data:{channel:c,values:w}})))});e.addEventListener("click",a),e.addEventListener("pointerenter",n),e.addEventListener("pointerout",r),u.set(e,a),f.set(e,n),d.set(e,r);const l=Dw(e);if(l){const t=t=>Bw(this,void 0,void 0,function*(){t.stopPropagation();const n=o(e),r=w.indexOf(n),{nativeEvent:a=!0}=t;if(-1!==r&&1===w.length){if(!a)return;w=O.map(o),yield i(w),j(),s.emit("legend:reset",{nativeEvent:a})}else{if(w=[n],yield i(w),j(),!a)return;s.emit("legend:focus",Object.assign(Object.assign({},t),{nativeEvent:a,data:{channel:c,value:n}}))}});l.addEventListener("click",t),p.set(e,t)}}const k=t=>Bw(this,void 0,void 0,function*(){const{nativeEvent:e}=t;if(e)return;const{data:n}=t,{channel:r,value:o}=n;r===c&&(w=[o],yield i(w),j())}),A=t=>Bw(this,void 0,void 0,function*(){const{nativeEvent:e}=t;if(e)return;const{data:n}=t,{channel:r,values:o}=n;r===c&&(w=o,yield i(w),j())}),M=t=>Bw(this,void 0,void 0,function*(){const{nativeEvent:e}=t;e||(w=O.map(o),yield i(w),j())});return s.on("legend:filter",A),s.on("legend:focus",k),s.on("legend:reset",M),a&&s.emit("legend:filter",{data:{channel:c,values:a}}),()=>{for(const t of O){t.removeEventListener("click",u.get(t)),t.removeEventListener("pointerenter",f.get(t)),t.removeEventListener("pointerout",d.get(t));const e=Dw(t);e&&e.removeEventListener("click",p.get(t))}s.off("legend:focus",k),s.off("legend:filter",A),s.off("legend:reset",M)}}(e,{legends:$w,marker:Rw,label:Fw,datum:t=>{const{__data__:e}=t,{index:n}=e;return c[n]},filter:e=>{const n=Object.assign(Object.assign({},f),{value:e,ordinal:!0});u(i?o:t,n)},state:e.attributes.state,defaultSelect:e.attributes.defaultSelect,channel:s,emitter:n}):e.className===Nw?function(t,{domain:e,filter:n,defaultSelect:r,emitter:o,channel:i}){const a=new Map,s=new Map,c=new Map;let l=[...e];const u=()=>{var e;const n=null===(e=t.ownerDocument)||void 0===e?void 0:e.defaultView;return n&&n.getContextService().getDomElement().parentElement||document.body},f=()=>{u().querySelectorAll("[legend-value]").forEach(t=>{const n=t.getAttribute("legend-value");if(!n)return;if(!e.includes(n))return;const r=t;l.includes(n)?(r.style.opacity="1",r.classList.remove("legend-item-inactive")):(r.style.opacity="0.4",r.classList.add("legend-item-inactive"))})};(()=>{const t=u().querySelector(".legend-html"),r=r=>Bw(this,void 0,void 0,function*(){let a=r.target;for(;a&&!a.hasAttribute("legend-value")&&(a=a.parentElement,a!==t););if(!a||!a.hasAttribute("legend-value"))return;r.preventDefault(),r.stopPropagation();const s=a.getAttribute("legend-value");if(!s)return;const c=l.indexOf(s);-1===c?l.push(s):l.splice(c,1),yield n(l),f(),l.length===e.length?o.emit("legend:reset",{nativeEvent:!0}):o.emit("legend:filter",{nativeEvent:!0,data:{channel:i,values:l}})});t.addEventListener("click",r),a.set(t,r)})();const d=t=>Bw(this,void 0,void 0,function*(){const{nativeEvent:e}=t;if(e)return;const{data:r}=t,{channel:o,value:a}=r;o===i&&(l=[a],yield n(l),f())}),p=t=>Bw(this,void 0,void 0,function*(){const{nativeEvent:e}=t;if(e)return;const{data:r}=t,{channel:o,values:a}=r;o===i&&(l=a,yield n(l),f())}),h=t=>Bw(this,void 0,void 0,function*(){const{nativeEvent:r}=t;r||(l=[...e],yield n(l),f())});return o.on("legend:filter",p),o.on("legend:focus",d),o.on("legend:reset",h),r&&o.emit("legend:filter",{data:{channel:i,values:r}}),()=>{u().querySelectorAll("[legend-value]").forEach(t=>{const n=t.getAttribute("legend-value");if(!n)return;if(!e.includes(n))return;const r=a.get(t),o=s.get(t),i=c.get(t);r&&t.removeEventListener("click",r),o&&t.removeEventListener("pointerenter",o),i&&t.removeEventListener("pointerout",i)}),a.clear(),s.clear(),c.clear(),o.off("legend:filter",p),o.off("legend:focus",d),o.off("legend:reset",h)}}(r,{domain:c,filter:e=>{const n=Object.assign(Object.assign({},f),{value:e,ordinal:!0});u(i?o:t,n)},defaultSelect:e.attributes.defaultSelect,channel:s,emitter:n}):function(t,{legend:e,filter:n,emitter:r,channel:o}){const{attributes:i}=e,a=t=>{const{value:e}=t.detail,a=e.map(t=>{var e,n;const r=null===(e=i.data)||void 0===e?void 0:e.find(e=>e.value===t);return r&&null!==(n=r.domainValue)&&void 0!==n?n:t});n(a),r.emit({nativeEvent:!0,data:{channel:o,values:a}})};return e.addEventListener("valuechange",a),()=>{e.removeEventListener("valuechange",a)}}(0,{legend:e,filter:e=>{const n=Object.assign(Object.assign({},f),{value:e,ordinal:!1});u(i?o:t,n)},emitter:n,channel:s})});return()=>{f.forEach(t=>t())}}}var Vw=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};function Kw(t,e){const n=Ai(t,"shape"),r=Ai(t,"color"),o=n?n.clone():null,i=[];for(const[t,n]of e){const e=t.type,a=((null==r?void 0:r.getOptions().domain.length)>0?null==r?void 0:r.getOptions().domain:n.data).map((e,r)=>{var i;return o?o.map(e||"point"):(null===(i=null==t?void 0:t.style)||void 0===i?void 0:i.shape)||n.defaultShape||"point"});"string"==typeof e&&i.push([e,a])}if(0===i.length)return["point",["point"]];if(1===i.length)return i[0];if(!n)return i[0];const{range:a}=n.getOptions();return i.map(([t,e])=>{let n=0;for(let t=0;t<i.length;t++){e[t]===a[t%a.length]&&n++}return[n/e.length,[t,e]]}).sort((t,e)=>e[0]-t[0])[0][1]}function Uw(t,e){const{scales:n,library:r,markState:o}=e,[i,a]=Kw(n,o),{itemMarker:s,itemMarkerSize:c}=t,u=(t,e)=>{var n,o,a;const s=(null===(a=null===(o=null===(n=r[`mark.${i}`])||void 0===n?void 0:n.props)||void 0===o?void 0:o.shape[t])||void 0===a?void 0:a.props.defaultMarker)||Ho(t.split(".")),u="function"==typeof c?c(e):c;return()=>function(t,e){var{fill:n,lineWidth:r,stroke:o,color:i}=e,a=by(e,["d","fill","lineWidth","path","stroke","color"]);const s=Xy.get(t)||Xy.get("point");return(...t)=>new l.wA({style:Object.assign(Object.assign({},a),{d:s(...t),stroke:s.style.includes("stroke")?i||o:"",fill:s.style.includes("fill")?i||n:"",lineWidth:s.style.includes("lineWidth")?r||r||2:0})})}(s,{color:e.color})(0,0,u)},f=t=>`${a[t]}`;return Ai(n,"shape")&&!s?(t,e)=>u(f(e),t):"function"==typeof s?(t,e)=>{const n=s(t.id,e);return"string"==typeof n?u(n,t):n}:(t,e)=>u(s||f(e),t)}function Zw(t){const e=Ai(t,"opacity");if(e){const{range:t}=e.getOptions();return(e,n)=>t[n]}}function Jw(t,e){const{scales:n,markState:r}=e,[o,i]=Kw(n,r),{itemMarker:a,itemMarkerLineWidth:s}=t;if(void 0!==s)return s;const c=["line","hyphen","dash","smooth","hv","hvh","vh","vhv"];if("string"==typeof a&&c.includes(a))return 4;if("function"==typeof a)return(t,e)=>{const n=a(t.id,e);if("string"==typeof n&&c.includes(n))return 4};const l=(Array.isArray(i)?i:[i]).some(t=>c.includes(t));return l?4:void 0}function Qw(t,e){const{labelFormatter:n=t=>`${t}`}=t,{scales:r,theme:o}=e,i=function(t,e){const n=Ai(t,"size");return n instanceof Tx?2*n.map(NaN):e}(r,o.legendCategory.itemMarkerSize),a={itemMarker:Uw(Object.assign(Object.assign({},t),{itemMarkerSize:i}),e),itemMarkerSize:i,itemMarkerOpacity:Zw(r),itemMarkerLineWidth:Jw(t,e)},s="string"==typeof n?(0,ze.GP)(n):n,c=Ai(r,"color"),l=function(t){return t.find(t=>t.getOptions().domain.length>0).getOptions().domain}(r),u=c?t=>c.map(t):()=>e.theme.color;return Object.assign(Object.assign({},a),{data:l.map(t=>({id:t,label:s(t),color:u(t)}))})}const tj=t=>{const{layout:e,position:n,title:r,cols:o,render:i}=t,a=Vw(t,["labelFormatter","layout","order","orientation","position","size","title","cols","itemMarker","render"]),{gridRow:s}=a;return c=>{const{value:l,theme:u}=c,{bbox:f}=l,{width:d,height:p}=function(t,e,n){const{position:r}=e;if("center"===r){const{bbox:e}=t,{width:n,height:r}=e;return{width:n,height:r}}const{width:o,height:i}=_i(t,e,n);return{width:o,height:i}}(l,t,tj),h=wi(n,e),g=Object.assign(Object.assign(Object.assign(Object.assign({orientation:["right","left","center"].includes(n)?"vertical":"horizontal",width:d,height:p,layout:void 0!==o?"grid":"flex"},void 0!==o&&{gridCol:o}),void 0!==s&&{gridRow:s}),{titleText:Oi(r)}),Qw(t,c)),{legendCategory:m={}}=u,y=Si(Object.assign({},m,function(t){return Object.assign(Object.assign({},t),{data:(null==t?void 0:t.data.filter(t=>""!==t.id&&void 0!==t.id))||[]})}(g),a,{classNamePrefix:"g2-"}));if(i)return new Tw({className:Nw,style:Object.assign(Object.assign({},y),{x:f.x,y:f.y,render:i})});const b=new ki({style:Object.assign(Object.assign({x:f.x,y:f.y,width:f.width,height:f.height},h),{subOptions:y})});return b.appendChild(new Tw({className:"legend-category",style:y})),b}};tj.props={defaultPosition:"top",defaultOrder:1,defaultSize:40,defaultCrossPadding:[12,12],defaultPadding:[12,12]};const ej=t=>()=>new l.YJ;ej.props={};var nj=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};function rj(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"}}}const oj=(ij={render(t,e){const{width:n,title:r,subtitle:o,spacing:i=2,align:a="left",x:s,y:c}=t,l=nj(t,["width","title","subtitle","spacing","align","x","y"]);e.style.transform=`translate(${s}, ${c})`;const u=xt(l,"title"),f=xt(l,"subtitle"),d=xi(e,".title","text").attr("className","title").call(ec,Object.assign(Object.assign(Object.assign({},rj(0,0,n,a)),{fontSize:14,textBaseline:"top",text:r}),u)).node().getLocalBounds();xi(e,".sub-title","text").attr("className","sub-title").call(t=>{if(!o)return t.node().remove();t.node().attr(Object.assign(Object.assign(Object.assign({},rj(0,d.max[1]+i,n,a)),{fontSize:12,textBaseline:"top",text:o}),f))})}},class extends l.K9{constructor(t){super(t),this.descriptor=ij}connectedCallback(){var t,e;null===(e=(t=this.descriptor).render)||void 0===e||e.call(t,this.attributes,this)}update(t={}){var e,n;this.attr((0,N.A)({},this.attributes,t)),null===(n=(e=this.descriptor).render)||void 0===n||n.call(e,this.attributes,this)}});var ij;const aj=t=>({value:e,theme:n})=>{const{x:r,y:o,width:i,height:a}=e.bbox;return new oj({style:(0,N.A)({},n.title,Object.assign({x:r,y:o,width:i,height:a},t))})};function sj({map:t,initKey:e},n){const r=e(n);return t.has(r)?t.get(r):n}function cj(t){return"object"==typeof t?t.valueOf():t}aj.props={defaultPosition:"top",defaultOrder:2,defaultSize:36,defaultCrossPadding:[20,20],defaultPadding:[12,12]};class lj extends Map{constructor(t){if(super(),this.map=new Map,this.initKey=cj,null!==t)for(const[e,n]of t)this.set(e,n)}get(t){return super.get(sj({map:this.map,initKey:this.initKey},t))}has(t){return super.has(sj({map:this.map,initKey:this.initKey},t))}set(t,e){return super.set(function({map:t,initKey:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}({map:this.map,initKey:this.initKey},t),e)}delete(t){return super.delete(function({map:t,initKey:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}({map:this.map,initKey:this.initKey},t))}}const uj=Symbol("defaultUnknown");function fj(t,e,n){for(let r=0;r<e.length;r+=1)t.has(e[r])||t.set(n(e[r]),r)}function dj(t){const{value:e,from:n,to:r,mapper:o,notFoundReturn:i}=t;let a=o.get(e);if(void 0===a){if(i!==uj)return i;a=n.push(e)-1,o.set(e,a)}return r[a%r.length]}function pj(t){return t instanceof Date?t=>`${t}`:"object"==typeof t?t=>JSON.stringify(t):t=>t}class hj extends Wi{getDefaultOptions(){return{domain:[],range:[],unknown:uj}}constructor(t){super(t)}map(t){return 0===this.domainIndexMap.size&&fj(this.domainIndexMap,this.getDomain(),this.domainKey),dj({value:this.domainKey(t),mapper:this.domainIndexMap,from:this.getDomain(),to:this.getRange(),notFoundReturn:this.options.unknown})}invert(t){return 0===this.rangeIndexMap.size&&fj(this.rangeIndexMap,this.getRange(),this.rangeKey),dj({value:this.rangeKey(t),mapper:this.rangeIndexMap,from:this.getRange(),to:this.getDomain(),notFoundReturn:this.options.unknown})}rescale(t){const[e]=this.options.domain,[n]=this.options.range;if(this.domainKey=pj(e),this.rangeKey=pj(n),!this.rangeIndexMap)return this.rangeIndexMap=new Map,void(this.domainIndexMap=new Map);t&&!t.range||this.rangeIndexMap.clear(),(!t||t.domain||t.compare)&&(this.domainIndexMap.clear(),this.sortedDomain=void 0)}clone(){return new hj(this.options)}getRange(){return this.options.range}getDomain(){if(this.sortedDomain)return this.sortedDomain;const{domain:t,compare:e}=this.options;return this.sortedDomain=e?[...t].sort(e):t,this.sortedDomain}}function gj(t){return Math.round(1e12*t)/1e12}function mj(t){const{domain:e,range:n,paddingOuter:r,paddingInner:o,flex:i,round:a,align:s}=t,c=e.length,l=function(t,e){const n=e-t.length;return n>0?[...t,...new Array(n).fill(1)]:n<0?t.slice(0,e):t}(i,c),[u,f]=n,d=f-u,p=d/(2/c*r+1-1/c*o),h=p*o/c,g=p-c*h,m=function(t){const e=Math.min(...t);return t.map(t=>t/e)}(l),y=m.reduce((t,e)=>t+e),b=g/y,v=new lj(e.map((t,e)=>{const n=m[e]*b;return[t,a?Math.floor(n):n]})),x=new lj(e.map((t,e)=>{const n=m[e]*b+h;return[t,a?Math.floor(n):n]})),O=Array.from(x.values()).reduce((t,e)=>t+e),w=u+(d-(O-O/c*o))*s;let j=a?Math.round(w):w;const k=new Array(c);for(let t=0;t<c;t+=1){k[t]=gj(j);j+=x.get(e[t])}return{valueBandWidth:v,valueStep:x,adjustedRange:k}}class yj extends hj{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,paddingInner:0,paddingOuter:0,padding:0,unknown:uj,flex:[]}}constructor(t){super(t)}clone(){return new yj(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(){const{padding:t,paddingInner:e}=this.options;return t>0?t:e}getPaddingOuter(){const{padding:t,paddingOuter:e}=this.options;return t>0?t:e}rescale(){super.rescale();const{align:t,domain:e,range:n,round:r,flex:o}=this.options,{adjustedRange:i,valueBandWidth:a,valueStep:s}=function(t){var e;const{domain:n}=t,r=n.length;if(0===r)return{valueBandWidth:void 0,valueStep:void 0,adjustedRange:[]};if(null===(e=t.flex)||void 0===e?void 0:e.length)return mj(t);const{range:o,paddingOuter:i,paddingInner:a,round:s,align:c}=t;let l,u,f=o[0];const d=o[1]-f;l=d/Math.max(1,2*i+(r-a)),s&&(l=Math.floor(l)),f+=(d-l*(r-a))*c,u=l*(1-a),s&&(f=Math.round(f),u=Math.round(u));const p=new Array(r).fill(0).map((t,e)=>f+e*l);return{valueStep:l,valueBandWidth:u,adjustedRange:p}}({align:t,range:n,round:r,flex:o,paddingInner:this.getPaddingInner(),paddingOuter:this.getPaddingOuter(),domain:e});this.valueStep=s,this.valueBandWidth=a,this.adjustedRange=i}}var bj=function(t){if("object"!=typeof t||null===t)return t;var e;if((0,Le.A)(t)){e=[];for(var n=0,r=t.length;n<r;n++)e[n]="object"==typeof t[n]&&null!=t[n]?bj(t[n]):t[n]}else for(var o in e={},t)e[o]="object"==typeof t[o]&&null!=t[o]?bj(t[o]):t[o];return e};const vj=bj;var xj=function(t){function e(e){var n=this,r=e.style,o=(0,pn.Tt)(e,["style"]);return(n=t.call(this,(0,N.A)({},{type:"column"},(0,pn.Cl)({style:r},o)))||this).columnsGroup=new l.YJ({name:"columns"}),n.appendChild(n.columnsGroup),n.render(),n}return(0,pn.C6)(e,t),e.prototype.render=function(){var t=this.attributes,e=t.columns,n=t.y;this.columnsGroup.style.transform="translate(".concat(t.x,", ").concat(n,")"),zn(this.columnsGroup).selectAll(".column").data(e.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()})},e.prototype.update=function(t){this.attr(kn({},this.attributes,t)),this.render()},e.prototype.clear=function(){this.removeChildren()},e}(l.q9),Oj=function(t){function e(e){var n=this,r=e.style,o=(0,pn.Tt)(e,["style"]);return(n=t.call(this,(0,N.A)({},{type:"lines"},(0,pn.Cl)({style:r},o)))||this).linesGroup=n.appendChild(new l.YJ),n.areasGroup=n.appendChild(new l.YJ),n.render(),n}return(0,pn.C6)(e,t),e.prototype.render=function(){var t=this.attributes,e=t.lines,n=t.areas,r=t.y;this.style.transform="translate(".concat(t.x,", ").concat(r,")"),e&&this.renderLines(e),n&&this.renderAreas(n)},e.prototype.clear=function(){this.linesGroup.removeChildren(),this.areasGroup.removeChildren()},e.prototype.update=function(t){this.attr(kn({},this.attributes,t)),this.render()},e.prototype.renderLines=function(t){zn(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()})},e.prototype.renderAreas=function(t){zn(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()})},e}(l.q9);function wj(t,e,n){var r;void 0===e&&(e=!1),void 0===n&&(n=[[0,0],[1,1]]);for(var o=!!e,i=[],a=0,s=t.length;a<s;a+=2)i.push([t[a],t[a+1]]);var c,l,u,f=function(t,e,n,r){var o,i,a,s,c,l,u=[],f=!!r,d=[1/0,1/0],p=[-1/0,-1/0];if(f){d=(o=(0,pn.zs)(r,2))[0],p=o[1];for(var h=0,g=t.length;h<g;h+=1)d=nr(d,y=t[h]),p=rr(p,y)}h=0;for(var m=t.length;h<m;h+=1){var y=t[h];if(0!==h||n)if(h!==m-1||n){var b=[0,0];b=Qn(b=er(a=t[n?(h+1)%m:h+1],i=t[[h?h-1:m-1,h-1][n?0:1]]),e);var v=or(y,i),x=or(y,a),O=v+x;0!==O&&(v/=O,x/=O);var w=Qn(b,-v),j=Qn(b,x);c=tr(y,w),s=nr(s=tr(y,j),rr(a,y)),s=rr(s,nr(a,y)),c=nr(c=tr(y,w=Qn(w=er(s,y),-v/x)),rr(i,y)),s=tr(y,j=Qn(j=er(y,c=rr(c,nr(i,y))),x/v)),f&&(c=nr(c=rr(c,d),p),s=nr(s=rr(s,d),p)),u.push(l),u.push(c),l=s}else c=y,u.push(l),u.push(c);else l=y}return n&&u.push(u.shift()),u}(i,.4,o,n),d=i.length,p=[];for(a=0;a<d-1;a+=1)p.push(["C",(c=f[2*a])[0],c[1],(l=f[2*a+1])[0],l[1],(u=i[a+1])[0],u[1]]);return o&&(c=f[d],l=f[d+1],r=(0,pn.zs)(i,1),p.push(["C",c[0],c[1],l[0],l[1],(u=r[0])[0],u[1]])),p}function jj(t,e){void 0===e&&(e=!1);var n=e?t.length-1:0,r=t.map(function(t,e){return(0,pn.fX)([e===n?"M":"L"],(0,pn.zs)(t),!1)});return e?r.reverse():r}function kj(t,e){if(void 0===e&&(e=!1),t.length<=2)return jj(t);for(var n=[],r=t.length,o=0;o<r;o+=1){var i=e?t[r-o-1]:t[o];He(i,n.slice(-2))||n.push.apply(n,(0,pn.fX)([],(0,pn.zs)(i),!1))}var a=wj(n,!1);return a.unshift((0,pn.fX)(["M"],(0,pn.zs)(e?t[r-1]:t[0]),!1)),a}function Aj(t,e,n){var r=vj(t);return r.push(["L",e,n],["L",0,n],["Z"]),r}var Mj=n("./node_modules/.pnpm/@antv+util@3.3.11/node_modules/@antv/util/esm/lodash/min.js");const _j=function(t,e){if((0,Le.A)(t)){for(var n,r=1/0,o=0;o<t.length;o++){var i=t[o],a=(0,Jn.A)(e)?e(i):i[e];a<r&&(n=i,r=a)}return n}};var Sj=n("./node_modules/.pnpm/@antv+util@3.3.11/node_modules/@antv/util/esm/lodash/max.js");const Ej=function(t,e){if((0,Le.A)(t)){for(var n,r=-1/0,o=0;o<t.length;o++){var i=t[o],a=(0,Jn.A)(e)?e(i):i[e];a>r&&(n=i,r=a)}return n}};function Pj(t){return 0===t.length?[0,0]:[(0,Mj.A)(_j(t,function(t){return(0,Mj.A)(t)||0})),(0,Sj.A)(Ej(t,function(t){return(0,Sj.A)(t)||0}))]}function Lj(t){for(var e=vj(t),n=e[0].length,r=(0,pn.zs)([Array(n).fill(0),Array(n).fill(0)],2),o=r[0],i=r[1],a=0;a<e.length;a+=1)for(var s=e[a],c=0;c<n;c+=1)s[c]>=0?(s[c]+=o[c],o[c]=s[c]):(s[c]+=i[c],i[c]=s[c]);return e}var Cj=function(t){function e(e){return t.call(this,e,{type:"line",x:0,y:0,width:200,height:20,isStack:!1,color:["#83daad","#edbf45","#d2cef9","#e290b3","#6f63f4"],smooth:!0,lineLineWidth:1,areaOpacity:0,isGroup:!1,columnLineWidth:1,columnStroke:"#fff",scale:1,spacing:0})||this}return(0,pn.C6)(e,t),Object.defineProperty(e.prototype,"rawData",{get:function(){var t=this.attributes.data;if(!t||0===(null==t?void 0:t.length))return[[]];var e=vj(t);return(0,tt.A)(e[0])?[e]:e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"data",{get:function(){return this.attributes.isStack?Lj(this.rawData):this.rawData},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scales",{get:function(){return this.createScales(this.data)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"baseline",{get:function(){var t=this.scales.y,e=(0,pn.zs)(t.getOptions().domain||[0,0],2),n=e[0],r=e[1];return t.map(r<0?r:n<0?0:n)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"containerShape",{get:function(){var t=this.attributes;return{width:t.width,height:t.height}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"linesStyle",{get:function(){var t=this,e=this.attributes,n=e.isStack,r=e.smooth;if("line"!==e.type)throw new Error("linesStyle can only be used in line type");var o=fr(this.attributes,"area"),i=fr(this.attributes,"line"),a=this.containerShape.width,s=this.data;if(0===s[0].length)return{lines:[],areas:[]};var c=this.scales,l=function(t,e){var n,r=e.x,o=e.y,i=(0,pn.zs)(o.getOptions().range||[0,0],2),a=i[0],s=i[1];return s>a&&(n=(0,pn.zs)([a,s],2),s=n[0],a=n[1]),t.map(function(t){return t.map(function(t,e){return[r.map(e),(0,ca.A)(o.map(t),s,a)]})})}(s,{type:"line",x:c.x,y:c.y}),u=[];if(o){var f=this.baseline;u=n?r?function(t,e,n){for(var r=[],o=t.length-1;o>=0;o-=1){var i=t[o],a=kj(i),s=void 0;if(0===o)s=Aj(a,e,n);else{var c=kj(t[o-1],!0),l=i[0];c[0][0]="L",s=(0,pn.fX)((0,pn.fX)((0,pn.fX)([],(0,pn.zs)(a),!1),(0,pn.zs)(c),!1),[(0,pn.fX)(["M"],(0,pn.zs)(l),!1),["Z"]],!1)}r.push(s)}return r}(l,a,f):function(t,e,n){for(var r=[],o=t.length-1;o>=0;o-=1){var i=jj(t[o]),a=void 0;if(0===o)a=Aj(i,e,n);else{var s=jj(t[o-1],!0);s[0][0]="L",a=(0,pn.fX)((0,pn.fX)((0,pn.fX)([],(0,pn.zs)(i),!1),(0,pn.zs)(s),!1),[["Z"]],!1)}r.push(a)}return r}(l,a,f):function(t,e,n,r){return t.map(function(t){return Aj(e?kj(t):jj(t),n,r)})}(l,r,a,f)}return{lines:l.map(function(e,n){return(0,pn.Cl)({stroke:t.getColor(n),d:r?kj(e):jj(e)},i)}),areas:u.map(function(e,n){return(0,pn.Cl)({d:e,fill:t.getColor(n)},o)})}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"columnsStyle",{get:function(){var t=this,e=fr(this.attributes,"column"),n=this.attributes,r=n.isStack,o=n.scale;if("column"!==n.type)throw new Error("columnsStyle can only be used in column type");var i=this.containerShape.height,a=this.rawData;if(!a)return{columns:[]};r&&(a=Lj(a));var s=this.createScales(a),c=s.x,l=s.y,u=(0,pn.zs)(Pj(a),2),f=u[0],d=new sa({domain:[0,u[1]-(f>0?0:f)],range:[0,i*o]}),p=c.getBandWidth(),h=this.rawData;return{columns:a.map(function(n,o){return n.map(function(n,i){var s=p/a.length;return(0,pn.Cl)((0,pn.Cl)({fill:t.getColor(o)},e),r?{x:c.map(i),y:l.map(n),width:p,height:d.map(h[o][i])}:{x:c.map(i)+s*o,y:l.map(n>=0?n:0),width:s,height:d.map(Math.abs(n))})})})}},enumerable:!1,configurable:!0}),e.prototype.render=function(t,e){var n,r,o;(n=e,r=".container",o="rect",n.querySelector(r)?zn(n).select(r):zn(n).append(o)).attr("className","container").node();var i=t.type,a=t.x,s=t.y,c="spark".concat(i),l=(0,pn.Cl)({x:a,y:s},"line"===i?this.linesStyle:this.columnsStyle);zn(e).selectAll(".spark").data([i]).join(function(t){return t.append(function(t){return"line"===t?new Oj({className:c,style:l}):new xj({className:c,style:l})}).attr("className","spark ".concat(c))},function(t){return t.update(l)},function(t){return t.remove()})},e.prototype.getColor=function(t){var e=this.attributes.color;return(0,Le.A)(e)?e[t%e.length]:(0,Jn.A)(e)?e.call(null,t):e},e.prototype.createScales=function(t){var e,n,r=this.attributes,o=r.type,i=r.scale,a=r.range,s=void 0===a?[]:a,c=r.spacing,l=this.containerShape,u=l.width,f=l.height,d=(0,pn.zs)(Pj(t),2),p=new sa({domain:[null!==(e=s[0])&&void 0!==e?e:d[0],null!==(n=s[1])&&void 0!==n?n:d[1]],range:[f,f*(1-i)]});return"line"===o?{type:o,x:new sa({domain:[0,t[0].length-1],range:[0,u]}),y:p}:{type:o,x:new yj({domain:t[0].map(function(t,e){return e}),range:[0,u],paddingInner:c,paddingOuter:c/2,align:.5}),y:p}},e.tag="sparkline",e}(Sn),zj=function(t){function e(e){var n=t.call(this,e,(0,pn.Cl)((0,pn.Cl)((0,pn.Cl)({x:0,y:0,animate:{duration:100,fill:"both"},brushable:!0,formatter:function(t){return t.toString()},handleSpacing:2,orientation:"horizontal",padding:0,autoFitLabel:!0,scrollable:!0,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],type:"range",selectionType:"select",handleIconOffset:0},dr(ma,"handle")),dr(ha,"handleIcon")),dr(ga,"handleLabel")))||this;return n.range=[0,1],n.onDragStart=function(t){return function(e){e.stopPropagation(),n.target=t,n.prevPos=n.getOrientVal(ua(e));var r=n.availableSpace,o=r.x,i=r.y,a=n.getBBox(),s=a.x,c=a.y;n.selectionStartPos=n.getRatio(n.prevPos-n.getOrientVal([o,i])-n.getOrientVal([+s,+c])),n.selectionWidth=0,document.addEventListener("pointermove",n.onDragging),document.addEventListener("pointerup",n.onDragEnd)}},n.onDragging=function(t){var e=n.attributes,r=e.slidable,o=e.brushable,i=e.type;t.stopPropagation();var a=n.getOrientVal(ua(t)),s=a-n.prevPos;if(s){var c=n.getRatio(s);switch(n.target){case"start":r&&n.setValuesOffset(c);break;case"end":r&&n.setValuesOffset(0,c);break;case"selection":r&&n.setValuesOffset(c,c);break;case"track":if(!o)return;n.selectionWidth+=c,n.innerSetValues("range"===i?[n.selectionStartPos,n.selectionStartPos+n.selectionWidth].sort():[0,n.selectionStartPos+n.selectionWidth],!0)}n.prevPos=a}},n.onDragEnd=function(){document.removeEventListener("pointermove",n.onDragging),document.removeEventListener("pointermove",n.onDragging),document.removeEventListener("pointerup",n.onDragEnd),n.target="",n.updateHandlesPosition(!1)},n.onValueChange=function(t){var e=n.attributes,r=e.onChange,o=e.type,i="range"===o?t:t[1],a="range"===o?n.getValues():n.getValues()[1],s=new l.up("valuechange",{detail:{oldValue:i,value:a}});n.dispatchEvent(s),null==r||r(a)},n.selectionStartPos=0,n.selectionWidth=0,n.prevPos=0,n.target="",n}return(0,pn.C6)(e,t),Object.defineProperty(e.prototype,"values",{get:function(){return this.attributes.values},set:function(t){this.attributes.values=this.clampValues(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sparklineStyle",{get:function(){if("horizontal"!==this.attributes.orientation)return null;var t=fr(this.attributes,"sparkline");return(0,pn.Cl)((0,pn.Cl)({zIndex:0},this.availableSpace),t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"shape",{get:function(){var t=this.attributes,e=t.trackLength,n=t.trackSize,r=(0,pn.zs)(this.getOrientVal([[e,n],[n,e]]),2);return{width:r[0],height:r[1]}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"availableSpace",{get:function(){var t=this.attributes,e=(0,pn.zs)(so(t.padding),4),n=e[0],r=e[3],o=this.shape;return{x:r,y:n,width:o.width-(r+e[1]),height:o.height-(n+e[2])}},enumerable:!1,configurable:!0}),e.prototype.getValues=function(){return this.values},e.prototype.setValues=function(t,e){void 0===t&&(t=[0,0]),void 0===e&&(e=!1),this.attributes.values=t;var n=!1!==e&&this.attributes.animate;this.updateSelectionArea(n),this.updateHandlesPosition(n)},e.prototype.updateSelectionArea=function(t){var e=this.calcSelectionArea();this.foregroundGroup.selectAll(ya.selection.class).each(function(n,r){wn(this,e[r],t)})},e.prototype.updateHandlesPosition=function(t){this.attributes.showHandle&&(this.startHandle&&wn(this.startHandle,this.getHandleStyle("start"),t),this.endHandle&&wn(this.endHandle,this.getHandleStyle("end"),t))},e.prototype.innerSetValues=function(t,e){void 0===t&&(t=[0,0]),void 0===e&&(e=!1);var n=this.values,r=this.clampValues(t);this.attributes.values=r,this.setValues(r),e&&this.onValueChange(n)},e.prototype.renderTrack=function(t){var e=this.attributes,n=e.x,r=e.y,o=fr(this.attributes,"track");this.trackShape=zn(t).maybeAppendByClassName(ya.track,"rect").styles((0,pn.Cl)((0,pn.Cl)({x:n,y:r},this.shape),o))},e.prototype.renderBrushArea=function(t){var e=this.attributes,n=e.x,r=e.y,o=e.brushable;this.brushArea=zn(t).maybeAppendByClassName(ya.brushArea,"rect").styles((0,pn.Cl)({x:n,y:r,fill:"transparent",cursor:o?"crosshair":"default"},this.shape))},e.prototype.renderSparkline=function(t){var e=this,n=this.attributes,r=n.x,o=n.y;En("horizontal"===n.orientation,zn(t).maybeAppendByClassName(ya.sparklineGroup,"g"),function(t){var n=(0,pn.Cl)((0,pn.Cl)({},e.sparklineStyle),{x:r,y:o});t.maybeAppendByClassName(ya.sparkline,function(){return new Cj({style:n})}).update(n)})},e.prototype.renderHandles=function(){var t,e=this,n=this.attributes,r=n.showHandle?"range"===n.type?["start","end"]:["end"]:[],o=this;null===(t=this.foregroundGroup)||void 0===t||t.selectAll(ya.handle.class).data(r.map(function(t){return{type:t}}),function(t){return t.type}).join(function(t){return t.append(function(t){return new xa({style:e.getHandleStyle(t.type)})}).each(function(t){var e=t.type;this.attr("class","".concat(ya.handle.name," ").concat(e,"-handle"));var n="".concat(e,"Handle");o[n]=this,this.addEventListener("pointerdown",o.onDragStart(e))})},function(t){return t.each(function(t){this.update(o.getHandleStyle(t.type))})},function(t){return t.each(function(t){var e="".concat(t.type,"Handle");o[e]=void 0}).remove()})},e.prototype.renderSelection=function(t){var e=this.attributes,n=e.x,r=e.y,o=e.type,i=e.selectionType;this.foregroundGroup=zn(t).maybeAppendByClassName(ya.foreground,"g");var a=fr(this.attributes,"selection"),s=function(t){return t.style("visibility",function(t){return t.show?"visible":"hidden"}).style("cursor",function(t){return"select"===i?"grab":"invert"===i?"crosshair":"default"}).styles((0,pn.Cl)((0,pn.Cl)({},a),{transform:"translate(".concat(n,", ").concat(r,")")}))},c=this;this.foregroundGroup.selectAll(ya.selection.class).data("value"===o?[]:this.calcSelectionArea().map(function(t,e){return{style:(0,pn.Cl)({},t),index:e,show:"select"===i?1===e:1!==e}}),function(t){return t.index}).join(function(t){return t.append("rect").attr("className",ya.selection.name).call(s).each(function(t,e){var n=this;1===e?(c.selectionShape=zn(this),this.on("pointerdown",function(t){n.attr("cursor","grabbing"),c.onDragStart("selection")(t)}),c.dispatchCustomEvent(this,"pointerenter","selectionMouseenter"),c.dispatchCustomEvent(this,"pointerleave","selectionMouseleave"),c.dispatchCustomEvent(this,"click","selectionClick"),this.addEventListener("pointerdown",function(){n.attr("cursor","grabbing")}),this.addEventListener("pointerup",function(){n.attr("cursor","pointer")}),this.addEventListener("pointerover",function(){n.attr("cursor","pointer")})):this.on("pointerdown",c.onDragStart("track"))})},function(t){return t.call(s)},function(t){return t.remove()}),this.updateSelectionArea(!1),this.renderHandles()},e.prototype.render=function(t,e){this.renderTrack(e),this.renderSparkline(e),this.renderBrushArea(e),this.renderSelection(e)},e.prototype.clampValues=function(t,e){var n;void 0===e&&(e=4);var r=(0,pn.zs)(this.range,2),o=r[0],i=r[1],a=(0,pn.zs)(this.getValues().map(function(t){return la(t,e)}),2),s=a[0],c=a[1],l=Array.isArray(t)?t:[s,null!=t?t:c],u=(0,pn.zs)((l||[s,c]).map(function(t){return la(t,e)}),2),f=u[0],d=u[1];if("value"===this.attributes.type)return[0,(0,ca.A)(d,o,i)];f>d&&(f=(n=(0,pn.zs)([d,f],2))[0],d=n[1]);var p=d-f;return p>i-o?[o,i]:f<o?s===o&&c===d?[o,d]:[o,p+o]:d>i?c===i&&s===f?[f,i]:[i-p,i]:[f,d]},e.prototype.calcSelectionArea=function(t){var e=(0,pn.zs)(this.clampValues(t),2),n=e[0],r=e[1],o=this.availableSpace,i=o.x,a=o.y,s=o.width,c=o.height;return this.getOrientVal([[{y:a,height:c,x:i,width:n*s},{y:a,height:c,x:n*s+i,width:(r-n)*s},{y:a,height:c,x:r*s,width:(1-r)*s}],[{x:i,width:s,y:a,height:n*c},{x:i,width:s,y:n*c+a,height:(r-n)*c},{x:i,width:s,y:r*c,height:(1-r)*c}]])},e.prototype.calcHandlePosition=function(t){var e=this.attributes.handleIconOffset,n=this.availableSpace,r=n.x,o=n.y,i=n.width,a=n.height,s=(0,pn.zs)(this.clampValues(),2),c="start"===t?-e:e,l=("start"===t?s[0]:s[1])*this.getOrientVal([i,a])+c;return{x:r+this.getOrientVal([l,i/2]),y:o+this.getOrientVal([a/2,l])}},e.prototype.inferTextStyle=function(t){return"horizontal"===this.attributes.orientation?{}:"start"===t?{transformOrigin:"left center",transform:"rotate(90)",textAlign:"start"}:"end"===t?{transformOrigin:"right center",transform:"rotate(90)",textAlign:"end"}:{}},e.prototype.calcHandleText=function(t){var e,n=this.attributes,r=n.type,o=n.orientation,i=n.formatter,a=n.autoFitLabel,s=fr(this.attributes,"handle"),c=fr(s,"label"),l=s.spacing,u=this.getHandleSize(),f=this.clampValues(),d=i("start"===t?f[0]:f[1]),p=new Ln({style:(0,pn.Cl)((0,pn.Cl)((0,pn.Cl)({},c),this.inferTextStyle(t)),{text:d})}),h=p.getBBox(),g=h.width,m=h.height;if(p.destroy(),!a){if("value"===r)return{text:d,x:0,y:-m-l};var y=l+u+("horizontal"===o?g/2:0);return(e={text:d})["horizontal"===o?"x":"y"]="start"===t?-y:y,e}var b=0,v=0,x=this.availableSpace,O=x.width,w=x.height,j=this.calcSelectionArea()[1],k=j.x,A=j.y,M=l+u;if("horizontal"===o){var _=M+g/2;if("start"===t)b=k-M-g>0?-_:_;else b=O-k-j.width-M>g?_:-_}else{var S=m+M;v="start"===t?A-u>m?-S:M:w-(A+j.height)-u>m?S:-M}return{x:b,y:v,text:d}},e.prototype.getHandleLabelStyle=function(t){var e=fr(this.attributes,"handleLabel");return(0,pn.Cl)((0,pn.Cl)((0,pn.Cl)({},e),this.calcHandleText(t)),this.inferTextStyle(t))},e.prototype.getHandleIconStyle=function(){var t=this.attributes.handleIconShape,e=fr(this.attributes,"handleIcon"),n=this.getOrientVal(["ew-resize","ns-resize"]),r=this.getHandleSize();return(0,pn.Cl)({cursor:n,shape:t,size:r},e)},e.prototype.getHandleStyle=function(t){var e=this.attributes,n=e.x,r=e.y,o=e.showLabel,i=e.showLabelOnInteraction,a=e.orientation,s=this.calcHandlePosition(t),c=s.x,l=s.y,u=this.calcHandleText(t),f=o;return!o&&i&&(f=!!this.target),(0,pn.Cl)((0,pn.Cl)((0,pn.Cl)({},dr(this.getHandleIconStyle(),"icon")),dr((0,pn.Cl)((0,pn.Cl)({},this.getHandleLabelStyle(t)),u),"label")),{transform:"translate(".concat(c+n,", ").concat(l+r,")"),orientation:a,showLabel:f,type:t,zIndex:3})},e.prototype.getHandleSize=function(){var t=this.attributes,e=t.handleIconSize;return e||Math.floor((this.getOrientVal([+t.height,+t.width])+4)/2.4)},e.prototype.getOrientVal=function(t){var e=(0,pn.zs)(t,2);return"horizontal"===this.attributes.orientation?e[0]:e[1]},e.prototype.setValuesOffset=function(t,e){void 0===e&&(e=0);var n=this.attributes.type,r=(0,pn.zs)(this.getValues(),2),o=[r[0]+("range"===n?t:0),r[1]+e].sort();this.innerSetValues(o,!0)},e.prototype.getRatio=function(t){var e=this.availableSpace;return t/this.getOrientVal([e.width,e.height])},e.prototype.dispatchCustomEvent=function(t,e,n){var r=this;t.on(e,function(t){t.stopPropagation(),r.dispatchEvent(new l.up(n,{detail:t}))})},e.prototype.bindEvents=function(){this.addEventListener("wheel",this.onScroll);var t=this.brushArea;this.dispatchCustomEvent(t,"click","trackClick"),this.dispatchCustomEvent(t,"pointerenter","trackMouseenter"),this.dispatchCustomEvent(t,"pointerleave","trackMouseleave"),t.on("pointerdown",this.onDragStart("track"))},e.prototype.onScroll=function(t){if(this.attributes.scrollable){var e=this.getRatio(t.deltaY||t.deltaX);this.setValuesOffset(e,e)}},e.tag="slider",e}(Sn),Tj=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const Bj=t=>{const{orientation:e,labelFormatter:n,style:r={},position:o}=t,i=Tj(t,["orientation","labelFormatter","size","style","position"]);return a=>{var s;const{scales:[c],value:l,theme:u,coordinate:f}=a,{bbox:d}=l,{width:p,height:h}=d,{slider:g={}}=u,m=(null===(s=c.getFormatter)||void 0===s?void 0:s.call(c))||(t=>t+""),y="string"==typeof n?(0,ze.GP)(n):n,b="horizontal"===e,v=nn(f)&&b,{trackSize:x=g.trackSize}=r,[O,w]=function(t,e,n){const{x:r,y:o,width:i,height:a}=t;return"left"===e?[r+i-n,o]:"right"===e||"bottom"===e?[r,o]:"top"===e?[r,o+a-n]:void 0}(d,o,x);return new zj({className:"slider",style:Object.assign({},g,Object.assign(Object.assign({x:O,y:w,trackLength:b?p:h,orientation:e,formatter:t=>(y||m)(sl(c,v?1-t:t,!0)),sparklineData:Ij(t,a)},r),i))})}};function Ij(t,e){const{markState:n}=e;return(0,Le.A)(t.sparklineData)?t.sparklineData:function(t,e){const[n]=Array.from(t.entries()).filter(([t])=>"line"===t.type||"area"===t.type||"interval"===t.type).filter(([t])=>t.slider).map(([t])=>{const{encode:n,slider:r}=t;if(null==r?void 0:r.x)return Object.fromEntries(e.map(t=>{const e=n[t];return[t,e?e.value:void 0]}))});if(!(null==n?void 0:n.series))return null==n?void 0:n.y;const r=n.series.reduce((t,e,r)=>(t[e]=t[e]||[],t[e].push(n.y[r]),t),{});return Object.values(r)}(n,["y","series"])}Bj.props={defaultPosition:"bottom",defaultSize:24,defaultOrder:1,defaultCrossPadding:[12,12],defaultPadding:[12,12]};const Nj=t=>Bj(Object.assign(Object.assign({},t),{orientation:"horizontal"}));Nj.props=Object.assign(Object.assign({},Bj.props),{defaultPosition:"bottom"});const Rj=t=>Bj(Object.assign(Object.assign({},t),{orientation:"vertical"}));Rj.props=Object.assign(Object.assign({},Bj.props),{defaultPosition:"left"});var Fj=function(t){function e(e){var n=t.call(this,e,{x:0,y:0,isRound:!0,orientation:"vertical",padding:[2,2,2,2],scrollable:!0,slidable:!0,thumbCursor:"default",trackSize:10,value:0})||this;return n.range=[0,1],n.onValueChange=function(t){var e=n.attributes.value;if(t!==e){var r={detail:{oldValue:t,value:e}};n.dispatchEvent(new l.up("scroll",r)),n.dispatchEvent(new l.up("valuechange",r))}},n.onTrackClick=function(t){if(n.attributes.slidable){var e=(0,pn.zs)(n.getLocalPosition(),2),r=e[0],o=e[1],i=(0,pn.zs)(n.padding,4),a=n.getOrientVal([r+i[3],o+i[0]]),s=n.getOrientVal(ua(t));n.setValue((s-a)/n.trackLength,!0)}},n.onThumbMouseenter=function(t){n.dispatchEvent(new l.up("thumbMouseenter",{detail:t.detail}))},n.onTrackMouseenter=function(t){n.dispatchEvent(new l.up("trackMouseenter",{detail:t.detail}))},n.onThumbMouseleave=function(t){n.dispatchEvent(new l.up("thumbMouseleave",{detail:t.detail}))},n.onTrackMouseleave=function(t){n.dispatchEvent(new l.up("trackMouseleave",{detail:t.detail}))},n}return(0,pn.C6)(e,t),Object.defineProperty(e.prototype,"padding",{get:function(){return so(this.attributes.padding)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){var t=this.attributes.value,e=(0,pn.zs)(this.range,2);return(0,ca.A)(t,e[0],e[1])},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"trackLength",{get:function(){var t=this.attributes,e=t.trackLength;return void 0===e?t.viewportLength:e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"availableSpace",{get:function(){var t=this.attributes.trackSize,e=this.trackLength,n=(0,pn.zs)(this.padding,4),r=n[0],o=n[1],i=n[2],a=n[3],s=(0,pn.zs)(this.getOrientVal([[e,t],[t,e]]),2);return{x:a,y:r,width:+s[0]-(a+o),height:+s[1]-(r+i)}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"trackRadius",{get:function(){var t=this.attributes;return t.isRound?t.trackSize/2:0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"thumbRadius",{get:function(){var t=this.attributes;if(!t.isRound)return 0;var e=this.availableSpace;return t.thumbRadius||this.getOrientVal([e.height,e.width])/2},enumerable:!1,configurable:!0}),e.prototype.getValues=function(t){void 0===t&&(t=this.value);var e=this.attributes,n=e.viewportLength/e.contentLength,r=(0,pn.zs)(this.range,2),o=t*(r[1]-r[0]-n);return[o,o+n]},e.prototype.getValue=function(){return this.value},e.prototype.renderSlider=function(t){var e=this.attributes,n=e.x,r=e.y,o=e.orientation,i=e.trackSize,a=e.padding,s=e.slidable,c=fr(this.attributes,"track"),l=fr(this.attributes,"thumb"),u=(0,pn.Cl)((0,pn.Cl)({x:n,y:r,brushable:!1,orientation:o,padding:a,selectionRadius:this.thumbRadius,showHandle:!1,slidable:s,trackLength:this.trackLength,trackRadius:this.trackRadius,trackSize:i,values:this.getValues()},dr(c,"track")),dr(l,"selection"));this.slider=zn(t).maybeAppendByClassName("scrollbar",function(){return new zj({style:u})}).update(u).node()},e.prototype.render=function(t,e){this.renderSlider(e)},e.prototype.setValue=function(t,e){void 0===e&&(e=!1);var n=this.attributes.value,r=(0,pn.zs)(this.range,2);this.slider.setValues(this.getValues((0,ca.A)(t,r[0],r[1])),e),this.onValueChange(n)},e.prototype.bindEvents=function(){var t=this;this.slider.addEventListener("trackClick",function(e){e.stopPropagation(),t.onTrackClick(e.detail)}),this.onHover()},e.prototype.getOrientVal=function(t){return"horizontal"===this.attributes.orientation?t[0]:t[1]},e.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)},e.tag="scrollbar",e}(Sn),Dj=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const $j=t=>{const{orientation:e,style:n}=t,r=Dj(t,["orientation","labelFormatter","style"]);return({scales:[t],value:o,theme:i})=>{const{bbox:a}=o,{x:s,y:c,width:l,height:u}=a,{scrollbar:f={}}=i,{ratio:d,range:p}=t.getOptions(),h="horizontal"===e?l:u,g=h/d,[m,y]=p,b=y>m?0:1;return new Fj({className:"g2-scrollbar",style:Object.assign({},f,Object.assign(Object.assign(Object.assign(Object.assign({},n),{x:s,y:c,trackLength:h,value:b}),r),{orientation:e,contentLength:g,viewportLength:h}))})}};$j.props={defaultPosition:"bottom",defaultSize:24,defaultOrder:1,defaultCrossPadding:[12,12],defaultPadding:[12,12]};const Wj=t=>$j(Object.assign(Object.assign({},t),{orientation:"horizontal"}));Wj.props=Object.assign(Object.assign({},$j.props),{defaultPosition:"bottom"});const Hj=t=>$j(Object.assign(Object.assign({},t),{orientation:"vertical"}));Hj.props=Object.assign(Object.assign({},$j.props),{defaultPosition:"left"});const qj=(t,e)=>{const{coordinate:n}=e;return(e,r,o)=>{const[i]=e,{transform:a="",fillOpacity:s=1,strokeOpacity:c=1,opacity:l=1}=i.style,[u,f]=nn(n)?["left bottom","scale(1, 0.0001)"]:["left top","scale(0.0001, 1)"],d=[{transform:`${a} ${f}`.trimStart(),transformOrigin:u,fillOpacity:0,strokeOpacity:0,opacity:0},{transform:`${a} ${f}`.trimStart(),transformOrigin:u,fillOpacity:s,strokeOpacity:c,opacity:l,offset:.01},{transform:`${a} scale(1, 1)`.trimStart(),transformOrigin:u,fillOpacity:s,strokeOpacity:c,opacity:l}];return i.animate(d,Object.assign(Object.assign({},o),t))}},Yj=(t,e)=>{const{coordinate:n}=e;return(e,r,o)=>{const[i]=e,{transform:a="",fillOpacity:s=1,strokeOpacity:c=1,opacity:l=1}=i.style,[u,f]=nn(n)?["left bottom","scale(1, 0.0001)"]:["left top","scale(0.0001, 1)"],d=[{transform:`${a} scale(1, 1)`.trimStart(),transformOrigin:u},{transform:`${a} ${f}`.trimStart(),transformOrigin:u,fillOpacity:s,strokeOpacity:c,opacity:l,offset:.99},{transform:`${a} ${f}`.trimStart(),transformOrigin:u,fillOpacity:0,strokeOpacity:0,opacity:0}];return i.animate(d,Object.assign(Object.assign({},o),t))}},Xj=(t,e)=>{const n=1e-4,{coordinate:r}=e;return l.Ks.registerProperty({name:"scaleInYRadius",inherits:!1,initialValue:"",interpolable:!0,syntax:l.NZ.NUMBER}),(e,o,i)=>{const[a]=e;return rn(r)?(e=>{const{__data__:o,style:a}=e,{fillOpacity:s=1,strokeOpacity:c=1,opacity:l=1}=a,{points:u,y:f,y1:d}=o,p=ic(r,u,[f,d]),{innerRadius:h,outerRadius:g}=p;return e.animate([{scaleInYRadius:h+n,fillOpacity:0,strokeOpacity:0,opacity:0},{scaleInYRadius:h+n,fillOpacity:s,strokeOpacity:c,opacity:l,offset:.01},{scaleInYRadius:g,fillOpacity:s,strokeOpacity:c,opacity:l}],Object.assign(Object.assign({},i),t))})(a):(e=>{const{style:n}=e,{transform:o="",fillOpacity:a=1,strokeOpacity:s=1,opacity:c=1}=n,[l,u]=nn(r)?["left top","scale(0.0001, 1)"]:["left bottom","scale(1, 0.0001)"],f=[{transform:`${o} ${u}`.trimStart(),transformOrigin:l,fillOpacity:0,strokeOpacity:0,opacity:0},{transform:`${o} ${u}`.trimStart(),transformOrigin:l,fillOpacity:a,strokeOpacity:s,opacity:c,offset:.01},{transform:`${o} scale(1, 1)`.trimStart(),transformOrigin:l,fillOpacity:a,strokeOpacity:s,opacity:c}];return e.animate(f,Object.assign(Object.assign({},i),t))})(a)}},Gj=(t,e)=>{const{coordinate:n}=e;return(e,r,o)=>{const[i]=e,{transform:a="",fillOpacity:s=1,strokeOpacity:c=1,opacity:l=1}=i.style,[u,f]=nn(n)?["left top","scale(0.0001, 1)"]:["left bottom","scale(1, 0.0001)"],d=[{transform:`${a} scale(1, 1)`.trimStart(),transformOrigin:u},{transform:`${a} ${f}`.trimStart(),transformOrigin:u,fillOpacity:s,strokeOpacity:c,opacity:l,offset:.99},{transform:`${a} ${f}`.trimStart(),transformOrigin:u,fillOpacity:0,strokeOpacity:0,opacity:0}];return i.animate(d,Object.assign(Object.assign({},o),t))}},Vj=(t,e)=>{const n=1e-4;l.Ks.registerProperty({name:"waveInArcAngle",inherits:!1,initialValue:"",interpolable:!0,syntax:l.NZ.NUMBER});const{coordinate:r}=e;return(o,i,a)=>{const[s]=o;if(!rn(r))return qj(t,e)(o,i,a);const{__data__:c,style:l}=s,{radius:u=0,inset:f=0,fillOpacity:d=1,strokeOpacity:p=1,opacity:h=1}=l,{points:g,y:m,y1:y}=c,b=(0,dl.A)().cornerRadius(u).padAngle(f*Math.PI/180),v=ic(r,g,[m,y]),{startAngle:x,endAngle:O}=v,w=s.animate([{waveInArcAngle:x+n,fillOpacity:0,strokeOpacity:0,opacity:0},{waveInArcAngle:x+n,fillOpacity:d,strokeOpacity:p,opacity:h,offset:.01},{waveInArcAngle:O,fillOpacity:d,strokeOpacity:p,opacity:h}],Object.assign(Object.assign({},a),t));return w.onframe=function(){s.style.d=b(Object.assign(Object.assign({},v),{endAngle:Number(s.style.waveInArcAngle)}))},w.onfinish=function(){s.style.d=b(Object.assign(Object.assign({},v),{endAngle:O}))},w}};Vj.props={};const Kj=t=>(e,n,r)=>{const[o]=e,{fillOpacity:i=1,strokeOpacity:a=1,opacity:s=1}=o.style;return o.animate([{fillOpacity:0,strokeOpacity:0,opacity:0},{fillOpacity:i,strokeOpacity:a,opacity:s}],Object.assign(Object.assign({},r),t))};Kj.props={};const Uj=t=>(e,n,r)=>{const[o]=e,{fillOpacity:i=1,strokeOpacity:a=1,opacity:s=1}=o.style;return o.animate([{fillOpacity:i,strokeOpacity:a,opacity:s},{fillOpacity:0,strokeOpacity:0,opacity:0}],Object.assign(Object.assign({},r),t))};Uj.props={};const Zj=t=>(e,n,r)=>{const[o]=e,{transform:i="",fillOpacity:a=1,strokeOpacity:s=1,opacity:c=1}=o.style,l="center center",u=[{transform:`${i} scale(0.0001)`.trimStart(),transformOrigin:l,fillOpacity:0,strokeOpacity:0,opacity:0},{transform:`${i} scale(0.0001)`.trimStart(),transformOrigin:l,fillOpacity:a,strokeOpacity:s,opacity:c,offset:.01},{transform:`${i} scale(1)`.trimStart(),transformOrigin:l,fillOpacity:a,strokeOpacity:s,opacity:c}];return o.animate(u,Object.assign(Object.assign({},r),t))},Jj=t=>(e,n,r)=>{const[o]=e,{transform:i="",fillOpacity:a=1,strokeOpacity:s=1,opacity:c=1}=o.style,l="center center",u=[{transform:`${i} scale(1)`.trimStart(),transformOrigin:l},{transform:`${i} scale(0.0001)`.trimStart(),transformOrigin:l,fillOpacity:a,strokeOpacity:s,opacity:c,offset:.99},{transform:`${i} scale(0.0001)`.trimStart(),transformOrigin:l,fillOpacity:0,strokeOpacity:0,opacity:0}];return o.animate(u,Object.assign(Object.assign({},r),t))},Qj=t=>(e,n,r)=>{var o,i;const[a]=e,s=(null===(i=(o=a).getTotalLength)||void 0===i?void 0:i.call(o))||0;return a.animate([{lineDash:[0,s]},{lineDash:[s,0]}],Object.assign(Object.assign({},r),t))};Qj.props={};const tk={opacity:1,strokeOpacity:1,fillOpacity:1,lineWidth:0,x:0,y:0,cx:0,cy:0,r:0,rx:0,ry:0,width:0,height:0},ek={[l.yp.CIRCLE]:["cx","cy","r"],[l.yp.ELLIPSE]:["cx","cy","rx","ry"],[l.yp.RECT]:["x","y","width","height"],[l.yp.IMAGE]:["x","y","width","height"],[l.yp.LINE]:["x1","y1","x2","y2"],[l.yp.POLYLINE]:["points"],[l.yp.POLYGON]:["points"]};function nk(t,e,n=!1){const r={};for(const o of e){const e=t.style[o];e?r[o]=e:n&&(r[o]=tk[o])}return r}const rk=["fill","stroke","fillOpacity","strokeOpacity","opacity","lineWidth"];function ok(t){const{min:e,max:n}=t.getLocalBounds(),[r,o]=e,[i,a]=n;return[r,o,i-r,a-o]}function ik(t){const[e,n,r,o]=t;return`\n M ${e} ${n}\n L ${e+r} ${n}\n L ${e+r} ${n+o}\n L ${e} ${n+o}\n Z\n `}function ak(t,e){const[n,r,o,i]=ok(t),a=Math.ceil(Math.sqrt(e/(i/o))),s=[],c=i/Math.ceil(e/a);let l=0,u=e;for(;u>0;){const t=Math.min(u,a),e=o/t;for(let o=0;o<t;o++){s.push(ik([n+o*e,r+l*c,e,c]))}u-=t,l+=1}return s}function sk(t,e){t.__data__=e.__data__,t.className=e.className,t.markType=e.markType,e.parentNode.replaceChild(t,e)}function ck(t,e){return t.indexOf(e)===t.lastIndexOf(e)}function lk(t){const e=(0,l.O5)(t);if(e&&!function(t){return!ck(t,"m")||!ck(t,"M")}(e))return e}function uk(t){const{nodeName:e}=t;if("path"===e){const e=k(t,"attributes");return e.markerEnd||e.markerStart}return!1}function fk(t,e,n,r){const{nodeName:o}=e,{nodeName:i}=n,a=lk(e),s=lk(n),{opacity:c=1,strokeOpacity:u=1,fillOpacity:f=1}=e.style,{opacity:d=1,strokeOpacity:p=1,fillOpacity:h=1}=n.style,g=o===i&&"path"!==o,m=void 0===a||void 0===s,y=uk(e)||uk(n);if(g||m||y)return function(t,e,n){let{transform:r}=t.style;const{transform:o}=e.style;sk(e,t);let i=rk;if(t.nodeName===l.yp.GROUP){const[n,o,i,a]=ok(t),[s,c,l,u]=ok(e);r=`translate(${n-s}, ${o-c}) scale(${i/l}, ${a/u})`}else i=i.concat(ek[t.nodeName]||[]);const a=[Object.assign({transform:null!=r?r:"none"},nk(t,i,!0)),Object.assign({transform:null!=o?o:"none"},nk(e,i,!0))];return e.animate(a,n)}(e,n,r);const b=function(t,e){const{nodeName:n}=t;if("path"===n)return t;const r=new l.wA({style:Object.assign(Object.assign({},nk(t,rk)),{d:e})});return sk(r,t),r}(t,a),v=Object.assign(Object.assign({},nk(e,rk)),{opacity:c,strokeOpacity:u,fillOpacity:f}),x=Object.assign(Object.assign({},nk(n,rk)),{opacity:d,strokeOpacity:p,fillOpacity:h}),O=[v,x];if(a!==s){O[0].d=a,O[1].d=s;const t=b.animate(O,r);return t.onfinish=()=>{yt(b,n),b.style.d=s,b.style.transform="none"},b.style.transform="none",t}return He(v,x)?null:b.animate(O,r)}const dk=t=>(e,n,r)=>{const o=function(t="pack"){return"function"==typeof t?t:ak}(t.split),i=Object.assign(Object.assign({},r),t),{length:a}=e,{length:s}=n;if(1===a&&1===s||a>1&&s>1){const[t]=e,[r]=n;return fk(t,t,r,i)}if(1===a&&s>1){const[t]=e;return function(t,e,n,r){t.style.visibility="hidden";const o=r(t,e.length);return e.map((e,r)=>fk(e,new l.wA({style:Object.assign({d:o[r]},nk(t,rk))}),e,n))}(t,n,i,o)}if(a>1&&1===s){const[t]=n;return function(t,e,n,r){const o=r(e,t.length),{fillOpacity:i=1,strokeOpacity:a=1,opacity:s=1}=e.style,c=e.animate([{fillOpacity:0,strokeOpacity:0,opacity:0},{fillOpacity:0,strokeOpacity:0,opacity:0,offset:.99},{fillOpacity:i,strokeOpacity:a,opacity:s}],n),u=t.map((t,r)=>fk(t,t,new l.wA({style:{d:o[r],fill:e.style.fill}}),n));return[...u,c]}(e,t,i,o)}return null};dk.props={};const pk=(t,e)=>(n,r,o)=>{const[i]=n,{min:[a,s],halfExtents:c}=i.getLocalBounds(),u=2*c[0],f=2*c[1],d=new l.wA({style:{d:`M${a},${s}L${a+u},${s}L${a+u},${s+f}L${a},${s+f}Z`}});i.appendChild(d),i.style.clipPath=d;return qj(t,e)([d],r,o)};pk.props={};const hk=(t,e)=>(n,r,o)=>{const[i]=n,{min:[a,s],halfExtents:c}=i.getLocalBounds(),u=2*c[0],f=2*c[1],d=new l.wA({style:{d:`M${a},${s}L${a+u},${s}L${a+u},${s+f}L${a},${s+f}Z`}});i.appendChild(d),i.style.clipPath=d;return Xj(t,e)([d],r,o)};hk.props={};var gk=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};function mk(t){var{delay:e,createGroup:n,createRegionGroup:r,background:o=!1,link:i=!1}=t,a=gk(t,["delay","createGroup","createRegionGroup","background","link"]);return(t,s,c)=>{const{container:l,view:u,options:f}=t,{scale:d,coordinate:p}=u;return function(t,{elements:e,datum:n,groupKey:r=t=>t,regionGroupKey:o=t=>t,link:i=!1,background:a=!1,delay:s=60,scale:c,coordinate:l,emitter:u,state:f={},region:d=!1,regionEleFilter:p=t=>Zl.includes(t.markType)}){var h,g;const m=null!==(h=e(t))&&void 0!==h?h:[],y=d?m.filter(p):m,b=new Set(y),v=d?o:r,x=C(y,v),O=Jl({elementsof:e,root:t,coordinate:l,scale:c}),w=Dl(y,n),[j,k]=$l(Object.assign({elements:y,valueof:w,link:i,coordinate:l},xt(f.active,"link"))),[A,M,_]=Hl(Object.assign({document:t.ownerDocument,scale:c,coordinate:l,background:a,valueof:w},xt(f.active,"background"))),S=(0,N.A)(f,{active:Object.assign({},(null===(g=f.active)||void 0===g?void 0:g.offset)&&{transform:(...t)=>{const e=f.active.offset(...t),[,n]=t;return Wl(y[n],e,l)}})}),E=Il(S,y),{updateState:P,removeState:L,hasState:z}=E(w);let T;const B=t=>{const{nativeEvent:e=!0}=t;let r=t.target;if(d&&(r=O(t)),!b.has(r))return;T&&clearTimeout(T);const o=v(r),i=x.get(o),a=new Set(i);for(const t of y)a.has(t)?z(t,"active")||P(t,"active"):(P(t,"inactive"),k(t)),t!==r&&M(t);A(r),j(i),e&&u.emit("element:highlight",{nativeEvent:e,data:{data:n(r),group:i.map(n)}})},I=()=>{T&&clearTimeout(T),T=setTimeout(()=>{R(),T=null},s)},R=(t=!0)=>{for(const t of y)L(t,"active","inactive"),M(t),k(t);t&&u.emit("element:unhighlight",{nativeEvent:t})},F=t=>{let e=t.target;d&&(e=O(t)),e?a&&!_(e)||(a||b.has(e))&&(s>0?I():R()):s>0?I():R()},D=()=>{R()};t.addEventListener("pointerover",B),t.addEventListener("pointermove",B),t.addEventListener("pointerout",F),t.addEventListener("pointerleave",D);const $=t=>{const{nativeEvent:e}=t;e||R(!1)},W=t=>{const{nativeEvent:e}=t;if(e)return;const{data:r}=t.data,o=Xl(y,r,n);o&&B({target:o,nativeEvent:!1})};return u.on("element:highlight",W),u.on("element:unhighlight",$),()=>{t.removeEventListener("pointerover",B),t.removeEventListener("pointermove",B),t.removeEventListener("pointerout",F),t.removeEventListener("pointerleave",D),u.off("element:highlight",W),u.off("element:unhighlight",$);for(const t of y)M(t),k(t)}}(Ml(l),Object.assign({elements:jl,datum:Cl(u),groupKey:n?n(u):void 0,regionGroupKey:r?r(u):t=>t.__data__.x,coordinate:p,scale:d,state:Fl(f,[["active",o?{}:{lineWidth:"1",stroke:"#000"}],"inactive"]),background:o,link:i,delay:e,emitter:c},a))}}function yk(t){return mk(Object.assign(Object.assign({},t),{createGroup:Ll}))}function bk(t){return mk(Object.assign(Object.assign({},t),{createGroup:Pl}))}mk.props={reapplyWhenUpdate:!0},yk.props={reapplyWhenUpdate:!0},bk.props={reapplyWhenUpdate:!0};var vk=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};function xk(t,{elements:e,datum:n,groupKey:r=t=>t,scaleFactor:o=1.04,shadow:i=!0,shadowColor:a="rgba(0, 0, 0, 0.4)",shadowBlur:s=10,shadowOffsetX:c=0,shadowOffsetY:l=2,zIndex:u=10,delay:f=60,emitter:d,state:p={},coordinate:h}){const g=()=>{var n;return null!==(n=e(t))&&void 0!==n?n:[]},m=g(),y=Dl(m,n),b=Il((0,N.A)(p,{active:{}}),m),{updateState:v,removeState:x,hasState:O}=b(y),w=new Map;let j;const k=t=>{if(w.has(t))return;const e=t.style.transform||"",n="none"===e?"":e;if(w.set(t,{transform:e,transformOrigin:t.style.transformOrigin||"",zIndex:t.style.zIndex||0,shadowColor:t.style.shadowColor||"",shadowBlur:t.style.shadowBlur||0,shadowOffsetX:t.style.shadowOffsetX||0,shadowOffsetY:t.style.shadowOffsetY||0}),h&&rn(h)&&!n){const e=h.getCenter();t.style.transformOrigin=`${e[0]}px ${e[1]}px`}const r=`scale(${o})`;t.style.transform=n?`${n} ${r}`:r,t.style.zIndex=u,i&&(t.style.shadowColor=a,t.style.shadowBlur=s,t.style.shadowOffsetX=c,t.style.shadowOffsetY=l)},A=t=>{const e=w.get(t);e&&(t.style.transform=e.transform,t.style.transformOrigin=e.transformOrigin,t.style.zIndex=e.zIndex,t.style.shadowColor=e.shadowColor,t.style.shadowBlur=e.shadowBlur,t.style.shadowOffsetX=e.shadowOffsetX,t.style.shadowOffsetY=e.shadowOffsetY,w.delete(t))},M=t=>{const{nativeEvent:e=!0}=t,o=t.target,i=g();if(!new Set(i).has(o))return;j&&clearTimeout(j);const a=C(i,r),s=r(o),c=a.get(s);if(!c)return;const l=new Set(c);for(const t of i)l.has(t)||(x(t,"active"),A(t));for(const t of c)O(t,"active")||v(t,"active"),k(t);e&&d.emit("element:hoverscale",{nativeEvent:e,data:{data:n(o),group:c.map(n)}})},_=(t=!0)=>{const e=g();for(const t of e)x(t,"active"),A(t);t&&d.emit("element:unhoverscale",{nativeEvent:t})},S=()=>{f>0?(j&&clearTimeout(j),j=setTimeout(()=>{_(),j=null},f)):_()},E=()=>{_()};t.addEventListener("pointerover",M),t.addEventListener("pointermove",M),t.addEventListener("pointerout",S),t.addEventListener("pointerleave",E);const P=t=>{const{nativeEvent:e}=t;e||_(!1)},L=t=>{const{nativeEvent:e}=t;if(e)return;const{data:r}=t.data,o=Xl(g(),r,n);o&&M({target:o,nativeEvent:!1})};return d.on("element:hoverscale",L),d.on("element:unhoverscale",P),()=>{t.removeEventListener("pointerover",M),t.removeEventListener("pointermove",M),t.removeEventListener("pointerout",S),t.removeEventListener("pointerleave",E),d.off("element:hoverscale",L),d.off("element:unhoverscale",P);const e=g();for(const t of e)A(t);w.clear()}}function Ok(t){var{delay:e,createGroup:n,scale:r,shadow:o,shadowColor:i,shadowBlur:a,shadowOffsetX:s,shadowOffsetY:c,zIndex:l}=t,u=vk(t,["delay","createGroup","scale","shadow","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","zIndex"]);return(t,f,d)=>{const{container:p,view:h,options:g}=t,m=Ml(p),y=Cl(h),{coordinate:b}=h;return xk(m,Object.assign({elements:jl,datum:y,groupKey:n?t=>n(h)(y(t)):void 0,state:Fl(g,["active"]),scaleFactor:r,shadow:o,shadowColor:i,shadowBlur:a,shadowOffsetX:s,shadowOffsetY:c,zIndex:l,delay:e,emitter:d,coordinate:b},u))}}Ok.props={reapplyWhenUpdate:!0};var wk=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};function jk(t,{elements:e,datum:n,groupKey:r=t=>t,regionGroupKey:o=t=>t,link:i=!1,single:a=!1,multipleSelectHotkey:s,coordinate:c,background:l=!1,scale:u,emitter:f,state:d={},region:p=!1,regionEleFilter:h=t=>Zl.includes(t.markType)}){var g;const m=e(t),y=new Set(m),b=Jl({elementsof:e,root:t,coordinate:c,scale:u}),v=C(m,r),x=C(m,o),O=Dl(m,n),[w,j]=$l(Object.assign({link:i,elements:m,valueof:O,coordinate:c},xt(d.selected,"link"))),[k,A]=Hl(Object.assign({document:t.ownerDocument,background:l,coordinate:c,scale:u,valueof:O},xt(d.selected,"background"))),M=(0,N.A)(d,{selected:Object.assign({},(null===(g=d.selected)||void 0===g?void 0:g.offset)&&{transform:(...t)=>{const e=d.selected.offset(...t),[,n]=t;return Wl(m[n],e,c)}})}),_=Il(M,m),{updateState:S,removeState:E,hasState:P}=_(O);let L=!a,z=null;const T=(t=!0)=>{for(const t of m)E(t,"selected","unselected"),j(t),A(t);t&&f.emit("element:unselect",{nativeEvent:!0})},B=({event:t,element:e,nativeEvent:o=!0,filter:i=t=>!0,groupBy:a=r,groupMap:s=v})=>{const c=m.filter(i);if(P(e,"selected"))T();else{const r=a(e),i=s.get(r),l=new Set(i);for(const t of c)l.has(t)?S(t,"selected"):(S(t,"unselected"),j(t)),t!==e&&A(t);if(w(i),k(e),!o)return;f.emit("element:select",Object.assign(Object.assign({},t),{nativeEvent:o,data:{data:[n(e),...i.map(n)]}}))}},I=({event:t,element:e,nativeEvent:o=!0,filter:a=t=>!0,groupBy:s=r,groupMap:c=v})=>{const l=s(e),u=c.get(l),d=new Set(u),p=m.filter(a);if(P(e,"selected")){const t=m.some(t=>!d.has(t)&&P(t,"selected"));if(!t)return T();for(const t of u)S(t,"unselected"),j(t),A(t)}else{const t=u.some(t=>P(t,"selected"));for(const t of p)d.has(t)?S(t,"selected"):P(t,"selected")||S(t,"unselected");!t&&i&&w(u),k(e)}o&&f.emit("element:select",Object.assign(Object.assign({},t),{nativeEvent:o,data:{data:m.filter(t=>P(t,"selected")).map(n)}}))},R=t=>{if(y.has(t))return t;for(const e of y){let n=null;if(ml(e,r=>{r===t&&(n=e)}),n)return n}return t},F=t=>{const{target:e,nativeEvent:n=!0}=t,i=L?I:B;let a=e;const s=(t=>{if(y.has(t))return!0;for(const e of y)if(ml(e,e=>e===t))return!0;return!1})(e);return!p||s?s?i({event:t,element:R(a),nativeEvent:n,groupBy:r}):T():(a=b(t),y.has(a)?i({event:t,element:a,nativeEvent:n,filter:h,groupBy:o,groupMap:x}):T())},D=Array.isArray(s)?s:[s],$=t=>{D.includes(t.code)&&!z&&(z=t.code,L=!0)},W=t=>{t.code===z&&(z=null,L=!1)};t.addEventListener("click",F),s&&(L=!1,document.addEventListener("keydown",$),document.addEventListener("keyup",W));const H=t=>{const{nativeEvent:e,data:r}=t;if(e)return;const o=L?r.data:r.data.slice(0,1);for(const t of o){const e=Xl(m,t,n);F({target:e,nativeEvent:!1})}},q=()=>{T(!1)};return f.on("element:select",H),f.on("element:unselect",q),()=>{for(const t of m)j(t);t.removeEventListener("click",F),s&&(document.removeEventListener("keydown",$),document.removeEventListener("keyup",W)),f.off("element:select",H),f.off("element:unselect",q)}}function kk(t){var{createGroup:e,createRegionGroup:n,background:r=!1,link:o=!1}=t,i=wk(t,["createGroup","createRegionGroup","background","link"]);return(t,a,s)=>{const{container:c,view:l,options:u}=t,{coordinate:f,scale:d}=l;return jk(Ml(c),Object.assign({elements:jl,datum:Cl(l),groupKey:e?e(l):void 0,regionGroupKey:n?n(l):t=>t.__data__.x,coordinate:f,scale:d,state:Fl(u,[["selected",r?{}:{lineWidth:"1",stroke:"#000"}],"unselected"]),background:r,link:o,emitter:s},i))}}function Ak(t){return kk(Object.assign(Object.assign({},t),{createGroup:Ll}))}function Mk(t){return kk(Object.assign(Object.assign({},t),{createGroup:Pl}))}function _k({wait:t=30,leading:e,trailing:n=!1}){return r=>{const{update:o,setState:i,container:a}=r,s=Ml(a),c=gh(t=>{const e=Sl(s,t);if(!e)return i("fisheye"),void o();i("fisheye",t=>{const n=(0,N.A)({},t,{interaction:{tooltip:{preserve:!0}}});for(const t of n.marks)t.animate=!1;const[r,o]=e,i=function(t){const{coordinate:e={}}=t,{transform:n=[]}=e,r=n.find(t=>"fisheye"===t.type);if(r)return r;const o={type:"fisheye"};return n.push(o),e.transform=n,t.coordinate=e,o}(n);return i.focusX=r,i.focusY=o,i.visual=!0,n}),o()},t,{leading:e,trailing:n});return s.addEventListener("pointerenter",c),s.addEventListener("pointermove",c),s.addEventListener("pointerleave",c),()=>{s.removeEventListener("pointerenter",c),s.removeEventListener("pointermove",c),s.removeEventListener("pointerleave",c)}}}kk.props={reapplyWhenUpdate:!0},Ak.props={reapplyWhenUpdate:!0},Mk.props={reapplyWhenUpdate:!0};var Sk=function(t,e,n,r){return new(n||(n=Promise))(function(o,i){function a(t){try{c(r.next(t))}catch(t){i(t)}}function s(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){t.done?o(t.value):function(t){return t instanceof n?t:new n(function(e){e(t)})}(t.value).then(a,s)}c((r=r.apply(t,e||[])).next())})},Ek=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};function Pk(t){var{wait:e=20,leading:n,trailing:r=!1,labelFormatter:o=t=>`${t}`}=t,i=Ek(t,["wait","leading","trailing","labelFormatter"]);return t=>{const{view:a,container:s,update:c,setState:u}=t,{markState:f,scale:d,coordinate:p}=a,h=function(t,e,n){const[r]=Array.from(t.entries()).filter(([t])=>t.type===e).map(([t])=>{const{encode:e}=t;return Object.fromEntries(n.map(t=>{const n=e[t];return[t,n?n.value:void 0]}))});return r}(f,"line",["x","y","series"]);if(!h)return;const{y:g,x:m,series:y=[]}=h,b=g.map((t,e)=>e),v=Pc(b.map(t=>m[t])),x=Ml(s),O=s.getElementsByClassName(Xc),w=C(s.getElementsByClassName("label"),t=>t.__data__.key.split("-")[0]),j=new l.N1({style:Object.assign({x1:0,y1:0,x2:0,y2:x.getAttribute("height"),stroke:"black",lineWidth:1},xt(i,"rule"))}),k=new l.EY({style:Object.assign({x:0,y:x.getAttribute("height"),text:"",fontSize:10},xt(i,"label"))});j.append(k),x.appendChild(j);const A=(t,e,n)=>{const[r]=t.invert(n),o=e.invert(r);return v[(0,il.WD)(v,o)]},M=(t,e)=>{j.setAttribute("x1",t[0]),j.setAttribute("x2",t[0]),k.setAttribute("text",o(e))};let _;const S=gh(t=>{const e=Sl(x,t);e&&(t=>{const{scale:e,coordinate:n}=_,{x:r,y:o}=e,i=A(n,r,t);M(t,i);for(const t of O){const{seriesIndex:e,key:r}=t.__data__,a=e[(0,rl.A)(t=>m[+t]).center(e,i)],s=[0,o.map(1)],c=[0,o.map(g[a]/g[e[0]])],[,l]=n.map(s),[,u]=n.map(c),f=l-u;t.setAttribute("transform",`translate(0, ${f})`);const d=w.get(r)||[];for(const t of d)t.setAttribute("dy",f)}})(e)},e,{leading:n,trailing:r});return(t=>{Sk(this,void 0,void 0,function*(){const{x:e}=d,n=A(p,e,t);M(t,n),u("chartIndex",t=>{const e=(0,N.A)({},t),r=e.marks.find(t=>"line"===t.type),o=Ye(T(b,t=>Ye(t,t=>+g[t])/ep(t,t=>+g[t]),t=>y[t]).values());(0,N.A)(r,{scale:{y:{domain:[1/o,o]}}});const i=function(t){const{transform:e=[]}=t,n=e.find(t=>"normalizeY"===t.type);if(n)return n;const r={type:"normalizeY"};return e.push(r),t.transform=e,r}(r);i.groupBy="color",i.basis=(t,e)=>e[t[(0,rl.A)(t=>m[+t]).center(t,n)]];for(const t of e.marks)t.animate=!1;return e});const r=yield c("chartIndex");_=r.view})})([0,0]),x.addEventListener("pointerenter",S),x.addEventListener("pointermove",S),x.addEventListener("pointerleave",S),()=>{j.remove(),x.removeEventListener("pointerenter",S),x.removeEventListener("pointermove",S),x.removeEventListener("pointerleave",S)}}}function Lk(){return(t,e,n)=>{const{container:r,view:o,options:i}=t,a=Ww(r),s=jl(r),c=t=>qw(t).scales[0].name,l=t=>{const{scale:{[t]:e}}=o;return e},u=Fl(i,["active","inactive"]),f=Dl(s,Cl(o)),d=[];for(const t of a){const e=e=>{const{data:n}=t.attributes,{__data__:r}=e,{index:o}=r;return n[o].label},r=c(t),o=$w(t),i=l(r),a=C(s,t=>i.invert(t.__data__[r])),{state:p={}}=t.attributes,{inactive:h={}}=p,{setState:g,removeState:m}=Nl(u,f),y={inactive:xt(h,"marker")},b={inactive:xt(h,"label")},{setState:v,removeState:x}=Nl(y),{setState:O,removeState:w}=Nl(b),j=t=>{for(const e of o){const n=Rw(e),r=Fw(e);e===t||null===t?(x(n,"inactive"),w(r,"inactive")):(v(n,"inactive"),O(r,"inactive"))}},k=(t,o)=>{const i=e(o),c=new Set(a.get(i));for(const t of s)c.has(t)?g(t,"active"):g(t,"inactive");j(o);const{nativeEvent:l=!0}=t;l&&n.emit("legend:highlight",Object.assign(Object.assign({},t),{nativeEvent:l,data:{channel:r,value:i}}))},A=new Map;for(const t of o){const e=e=>{k(e,t)};t.addEventListener("pointerover",e),A.set(t,e)}const M=t=>{for(const t of s)m(t,"inactive","active");j(null);const{nativeEvent:e=!0}=t;e&&n.emit("legend:unhighlight",{nativeEvent:e})},_=t=>{const{nativeEvent:n,data:i}=t;if(n)return;const{channel:a,value:s}=i;if(a!==r)return;const c=o.find(t=>e(t)===s);c&&k({nativeEvent:!1},c)},S=t=>{const{nativeEvent:e}=t;e||M({nativeEvent:!1})};t.addEventListener("pointerleave",M),n.on("legend:highlight",_),n.on("legend:unhighlight",S);d.push(()=>{t.removeEventListener(M),n.off("legend:highlight",_),n.off("legend:unhighlight",S);for(const[t,e]of A)t.removeEventListener(e)})}return()=>d.forEach(t=>t())}}Pk.props={reapplyWhenUpdate:!0};var Ck=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};function zk(t,e){const[n,r,o,i]=t,[a,s,c,l]=e;return!(a>o||c<n||s>i||l<r)}function Tk(t){const{width:e,height:n}=t.getBBox();return[0,0,e,n]}function Bk(t,e){for(const[n,r]of Object.entries(e))t.style(n,r)}const Ik=fc(t=>{const e=t.attributes,{x:n,y:r,width:o,height:i,class:a,renders:s={},handleSize:c=10,document:l}=e,u=Ck(e,["x","y","width","height","class","renders","handleSize","document"]);if(!l||void 0===o||void 0===i||void 0===n||void 0===r)return;const f=c/2,d=(t,e,n)=>{t.handle||(t.handle=n.createElement("rect"),t.append(t.handle));const{handle:r}=t;return r.attr(e),r},p=xt(wt(u,"handleNW","handleNE"),"handleN"),{render:h=d}=p,g=Ck(p,["render"]),m=xt(u,"handleE"),{render:y=d}=m,b=Ck(m,["render"]),v=xt(wt(u,"handleSE","handleSW"),"handleS"),{render:x=d}=v,O=Ck(v,["render"]),w=xt(u,"handleW"),{render:j=d}=w,k=Ck(w,["render"]),A=xt(u,"handleNW"),{render:M=d}=A,_=Ck(A,["render"]),S=xt(u,"handleNE"),{render:E=d}=S,P=Ck(S,["render"]),L=xt(u,"handleSE"),{render:C=d}=L,z=Ck(L,["render"]),T=xt(u,"handleSW"),{render:B=d}=T,I=Ck(T,["render"]),N=t=>()=>{const e=fc(e=>((t,e)=>{const{id:n}=t,r=e(t,t.attributes,l);r.id=n,r.style.draggable=!0})(e,t));return new e({})},R=_t(t).attr("className",a).style("transform",`translate(${n}, ${r})`).style("draggable",!0);R.maybeAppend("selection","rect").style("draggable",!0).style("fill","transparent").call(Bk,Object.assign(Object.assign({width:o,height:i},wt(u,"handle")),{transform:void 0})),R.maybeAppend("handle-n",N(h)).style("x",f).style("y",-f).style("width",o-c).style("height",c).style("fill","transparent").call(Bk,g),R.maybeAppend("handle-e",N(y)).style("x",o-f).style("y",f).style("width",c).style("height",i-c).style("fill","transparent").call(Bk,b),R.maybeAppend("handle-s",N(x)).style("x",f).style("y",i-f).style("width",o-c).style("height",c).style("fill","transparent").call(Bk,O),R.maybeAppend("handle-w",N(j)).style("x",-f).style("y",f).style("width",c).style("height",i-c).style("fill","transparent").call(Bk,k),R.maybeAppend("handle-nw",N(M)).style("x",-f).style("y",-f).style("width",c).style("height",c).style("fill","transparent").call(Bk,_),R.maybeAppend("handle-ne",N(E)).style("x",o-f).style("y",-f).style("width",c).style("height",c).style("fill","transparent").call(Bk,P),R.maybeAppend("handle-se",N(C)).style("x",o-f).style("y",i-f).style("width",c).style("height",c).style("fill","transparent").call(Bk,z),R.maybeAppend("handle-sw",N(B)).style("x",-f).style("y",i-f).style("width",c).style("height",c).style("fill","transparent").call(Bk,I)});function Nk(t,e){var{brushed:n=()=>{},brushended:r=()=>{},brushcreated:o=()=>{},brushstarted:i=()=>{},brushupdated:a=()=>{},extent:s=Tk(t),brushRegion:c=(t,e,n,r,o)=>[t,e,n,r],reverse:u=!1,fill:f="#777",fillOpacity:d="0.3",stroke:p="#fff",selectedHandles:h=["handle-n","handle-e","handle-s","handle-w","handle-nw","handle-ne","handle-se","handle-sw"]}=e,g=Ck(e,["brushed","brushended","brushcreated","brushstarted","brushupdated","extent","brushRegion","reverse","fill","fillOpacity","stroke","selectedHandles"]);let m=null,y=null,b=null,v=null,x=null,O=!1;const[w,j,k,A]=s;ql(t,"crosshair"),t.style.draggable=!0;const M=(t,e,n)=>{if(i(n),v&&v.remove(),x&&x.remove(),m=[t,e],u)return _();S()},_=()=>{x=new l.wA({style:Object.assign(Object.assign({},g),{fill:f,fillOpacity:d,stroke:p,pointerEvents:"none"})}),v=new Ik({style:{x:0,y:0,width:0,height:0,draggable:!0,document:t.ownerDocument},className:"mask"}),t.appendChild(x),t.appendChild(v)},S=()=>{v=new Ik({style:Object.assign(Object.assign({document:t.ownerDocument,x:0,y:0},g),{fill:f,fillOpacity:d,stroke:p,draggable:!0}),className:"mask"}),t.appendChild(v)},E=(t=!0)=>{v&&v.remove(),x&&x.remove(),m=null,y=null,b=null,O=!1,v=null,x=null,r(t)},P=(t,e,r=!0)=>{const[o,i,a,l]=function(t,e,n,r,o){const[i,a,s,c]=o;return[Math.max(i,Math.min(t,n)),Math.max(a,Math.min(e,r)),Math.min(s,Math.max(t,n)),Math.min(c,Math.max(e,r))]}(t[0],t[1],e[0],e[1],s),[f,d,p,h]=c(o,i,a,l,s);return u?C(f,d,p,h):L(f,d,p,h),n(f,d,p,h,r),[f,d,p,h]},L=(t,e,n,r)=>{v.style.x=t,v.style.y=e,v.style.width=n-t,v.style.height=r-e},C=(t,e,n,r)=>{x.style.d=`\n M${w},${j}L${k},${j}L${k},${A}L${w},${A}Z\n M${t},${e}L${t},${r}L${n},${r}L${n},${e}Z\n `,v.style.x=t,v.style.y=e,v.style.width=n-t,v.style.height=r-e},z={"handle-n":{vector:[0,1,0,0],cursor:"ns-resize"},"handle-e":{vector:[0,0,1,0],cursor:"ew-resize"},"handle-s":{vector:[0,0,0,1],cursor:"ns-resize"},"handle-w":{vector:[1,0,0,0],cursor:"ew-resize"},"handle-nw":{vector:[1,1,0,0],cursor:"nwse-resize"},"handle-ne":{vector:[0,1,1,0],cursor:"nesw-resize"},"handle-se":{vector:[0,0,1,1],cursor:"nwse-resize"},"handle-sw":{vector:[1,0,0,1],cursor:"nesw-resize"}},T=t=>I(t)||B(t),B=t=>{const{id:e}=t;return-1!==h.indexOf(e)&&new Set(Object.keys(z)).has(e)},I=t=>t===v.getElementById("selection"),N=e=>{const{target:n}=e,[r,o]=El(t,e);if(!v||!T(n))return M(r,o,e),void(O=!0);T(n)&&(b=[r,o])},R=e=>{const{target:n}=e,r=El(t,e);if(!m)return;if(!b)return P(m,r);if(I(n))return(t=>{const e=(t,e,n,r,o)=>t+e<r?r-e:t+n>o?o-n:t,n=t[1]-b[1],r=e(t[0]-b[0],m[0],y[0],w,k),o=e(n,m[1],y[1],j,A);P([m[0]+r,m[1]+o],[y[0]+r,y[1]+o])})(r);const[o,i]=[r[0]-b[0],r[1]-b[1]],{id:a}=n;if(z[a]){const[t,e,n,r]=z[a].vector;return P([m[0]+o*t,m[1]+i*e],[y[0]+o*n,y[1]+i*r])}},F=e=>{if(b){b=null;const{x:t,y:n,width:r,height:o}=v.style;return m=[t,n],y=[t+r,n+o],void a(t,n,t+r,n+o,e)}y=El(t,e);const[n,r,i,s]=P(m,y);O=!1,o(n,r,i,s,e)},D=t=>{const{target:e}=t;v&&!T(e)&&E()},$=e=>{const{target:n}=e;v&&T(n)&&!O?I(n)?ql(t,"move"):B(n)&&ql(t,z[n.id].cursor):ql(t,"crosshair")},W=()=>{ql(t,"default")};return t.addEventListener("dragstart",N),t.addEventListener("drag",R),t.addEventListener("dragend",F),t.addEventListener("click",D),t.addEventListener("pointermove",$),t.addEventListener("pointerleave",W),{mask:v,move(t,e,n,r,o=!0){v||M(t,e,{}),m=[t,e],y=[n,r],P([t,e],[n,r],o)},remove(t=!0){v&&E(t)},destroy(){v&&E(!1),ql(t,"default"),t.removeEventListener("dragstart",N),t.removeEventListener("drag",R),t.removeEventListener("dragend",F),t.removeEventListener("click",D),t.removeEventListener("pointermove",$),t.removeEventListener("pointerleave",W)}}}function Rk(t,e,n){return e.filter(e=>{if(e===t)return!1;const{interaction:r={}}=e.options;return Object.values(r).find(t=>t.brushKey===n)})}function Fk(t,e,n){return Rk(t,e,n).map(t=>t.options)}function Dk(t,e){var{elements:n,selectedHandles:r,siblings:o=t=>[],datum:i,brushRegion:a,extent:s,reverse:c,scale:u,coordinate:f,series:d=!1,key:p=t=>t,bboxOf:h=t=>{const{x:e,y:n,width:r,height:o}=t.style;return{x:e,y:n,width:r,height:o}},state:g={},emitter:m}=e,y=Ck(e,["elements","selectedHandles","siblings","datum","brushRegion","extent","reverse","scale","coordinate","series","key","bboxOf","state","emitter"]);const b=n(t),v=o(t),x=v.flatMap(n),O=Dl(b,i),w=xt(y,"mask"),{setState:j,removeState:k}=Nl(g,O),A=new Map,{width:M,height:_,x:S=0,y:E=0}=h(t),P=s||[0,0,M,_],L=()=>{for(const t of[...b,...x])k(t,"active","inactive")},C=(t,e,n,r)=>{var o;for(const t of v)null===(o=t.brush)||void 0===o||o.remove();const i=new Set;for(const o of b){const{min:a,max:s}=o.getLocalBounds(),[c,l]=a,[u,f]=s;zk([c,l,u,f],[t,e,n,r])?(j(o,"active"),i.add(p(o))):j(o,"inactive")}for(const t of x)i.has(p(t))?j(t,"active"):j(t,"inactive")},z=()=>{for(const t of b)k(t,"inactive");for(const t of A.values())t.remove();A.clear()},T=(e,n,r,o)=>{const i=t=>{const e=t.cloneNode();return e.__data__=t.__data__,t.parentNode.appendChild(e),A.set(t,e),e},a=new l.rw({style:{x:e+S,y:n+E,width:r-e,height:o-n}});t.appendChild(a);for(const t of b){const e=A.get(t)||i(t);e.style.clipPath=a,j(t,"inactive"),j(e,"active")}},B=Nk(t,Object.assign(Object.assign({},w),{extent:P,brushRegion:a,reverse:c,selectedHandles:r,brushended:t=>{const e=d?z:L;t&&m.emit("brush:remove",{nativeEvent:!0}),e()},brushed:(t,e,n,r,o)=>{const i=ll(t,e,n,r,u,f);o&&m.emit("brush:highlight",{nativeEvent:!0,data:{selection:i}});(d?T:C)(t,e,n,r)},brushcreated:(t,e,n,r,o)=>{const i=ll(t,e,n,r,u,f);m.emit("brush:end",Object.assign(Object.assign({},o),{nativeEvent:!0,data:{selection:i}}))},brushupdated:(t,e,n,r,o)=>{const i=ll(t,e,n,r,u,f);m.emit("brush:end",Object.assign(Object.assign({},o),{nativeEvent:!0,data:{selection:i}}))},brushstarted:t=>{m.emit("brush:start",t)}})),I=({nativeEvent:t,data:e})=>{if(t)return;const{selection:n}=e,[r,o,i,a]=function(t,e,n){const{x:r,y:o}=e,[i,a]=t,s=ul(i,r),c=ul(a,o),l=[s[0],c[0]],u=[s[1],c[1]],[f,d]=n.map(l),[p,h]=n.map(u);return[f,d,p,h]}(n,u,f);B.move(r,o,i,a,!1)};m.on("brush:highlight",I);const N=({nativeEvent:t}={})=>{t||B.remove(!1)};m.on("brush:remove",N);const R=B.destroy.bind(B);return B.destroy=()=>{m.off("brush:highlight",I),m.off("brush:remove",N),R()},B}function $k(t){var{facet:e,brushKey:n}=t,r=Ck(t,["facet","brushKey"]);return(t,o,i)=>{const{container:a,view:s,options:c}=t,l=Ml(a),u={maskFill:"#777",maskFillOpacity:"0.3",maskStroke:"#fff",reverse:!1},f=["active",["inactive",{opacity:.5}]],{scale:d,coordinate:p}=s;if(e){const e=l.getBounds(),n=e.min[0],a=e.min[1],s=e.max[0],c=e.max[1];return Dk(l.parentNode.parentNode,Object.assign(Object.assign({elements:()=>kl(t,o),datum:Cl(Al(t,o).map(t=>t.view)),brushRegion:(t,e,n,r)=>[t,e,n,r],extent:[n,a,s,c],state:Fl(Al(t,o).map(t=>t.options),f),emitter:i,scale:d,coordinate:p,selectedHandles:void 0},u),r))}const h=Dk(l,Object.assign(Object.assign({elements:jl,key:t=>t.__data__.key,siblings:()=>function(t,e,n){return Rk(t,e,n).map(t=>Ml(t.container))}(t,o,n),datum:Cl([s,...Rk(t,o,n).map(t=>t.view)]),brushRegion:(t,e,n,r)=>[t,e,n,r],extent:void 0,state:Fl([c,...Fk(t,o,n)],f),emitter:i,scale:d,coordinate:p,selectedHandles:void 0},u),r));return l.brush=h,()=>h.destroy()}}function Wk(t,e,n,r,o){const[,i,,a]=o;return[t,i,n,a]}function Hk(t){return $k(Object.assign(Object.assign({},t),{brushRegion:Wk,selectedHandles:["handle-e","handle-w"]}))}function qk(t,e,n,r,o){const[i,,a]=o;return[i,e,a,r]}function Yk(t){return $k(Object.assign(Object.assign({},t),{brushRegion:qk,selectedHandles:["handle-n","handle-s"]}))}$k.props={reapplyWhenUpdate:!0};var Xk=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const Gk="axis-hot-area";function Vk(t){return t.getElementsByClassName("axis")}function Kk(t){return t.getElementsByClassName("axis-line")[0]}function Uk(t){return function(t){return t.getElementsByClassName("axis-main-group")[0]}(t).getLocalBounds()}function Zk(t,e){var{cross:n,offsetX:r}=e,o=Xk(e,["cross","offsetX","offsetY"]);const i=Uk(t),a=Kk(t),[s]=a.getLocalBounds().min,[c,u]=i.min,[f,d]=i.max,p=2*(f-c);return{brushRegion:qk,hotZone:new l.rw({className:Gk,style:Object.assign({width:n?p/2:p,transform:`translate(${(n?c:s-p/2).toFixed(2)}, ${u})`,height:d-u},o)}),extent:n?(t,e,n,r)=>[-1/0,e,1/0,r]:(t,e,n,o)=>[Math.floor(c-r),e,Math.ceil(f-r),o]}}function Jk(t,e){var{offsetY:n,cross:r=!1}=e,o=Xk(e,["offsetY","offsetX","cross"]);const i=Uk(t),a=Kk(t),[,s]=a.getLocalBounds().min,[c,u]=i.min,[f,d]=i.max,p=d-u;return{brushRegion:Wk,hotZone:new l.rw({className:Gk,style:Object.assign({width:f-c,height:r?p:2*p,transform:`translate(${c}, ${r?u:s-p})`},o)}),extent:r?(t,e,n,r)=>[t,-1/0,n,1/0]:(t,e,r,o)=>[t,Math.floor(u-n),r,Math.ceil(d-n)]}}function Qk(t){return(e,n,r)=>{const{container:o,view:i,options:a}=e,s=Ml(o),{x:c,y:l}=s.getBBox(),{coordinate:u}=i;return function(t,e){var{axes:n,elements:r,points:o,horizontal:i,datum:a,offsetY:s,offsetX:c,reverse:l=!1,state:u={},emitter:f,coordinate:d}=e,p=Xk(e,["axes","elements","points","horizontal","datum","offsetY","offsetX","reverse","state","emitter","coordinate"]);const h=r(t),g=n(t),m=Dl(h,a),{setState:y,removeState:b}=Nl(u,m),v=new Map,x=xt(p,"mask"),O=t=>Array.from(v.values()).every(([e,n,r,o])=>t.some(([t,i])=>t>=e&&t<=r&&i>=n&&i<=o)),w=g.map(t=>t.attributes.scale),j=t=>t.length>2?[t[0],t[t.length-1]]:t,k=new Map,A=()=>{k.clear();for(let t=0;t<g.length;t++){const e=w[t],{domain:n}=e.getOptions();k.set(t,j(n))}};A();const M=(t,e)=>{const n=[];for(const t of h){const e=o(t);O(e)?(y(t,"active"),n.push(t)):y(t,"inactive")}k.set(t,S(n,t)),e&&f.emit("brushAxis:highlight",{nativeEvent:!0,data:{selection:(()=>{if(!E)return Array.from(k.values());const t=[];for(const[e,n]of k){const r=w[e],{name:o}=r.getOptions();"x"===o?t[0]=n:t[1]=n}return t})()}})},_=t=>{for(const t of h)b(t,"active","inactive");A(),t&&f.emit("brushAxis:remove",{nativeEvent:!0})},S=(t,e)=>{const n=w[e],{name:r}=n.getOptions(),o=t.map(t=>n.invert(t.__data__[r]));return j(cl(n,o))},E=g.some(i)&&g.some(t=>!i(t)),P=[];for(let t=0;t<g.length;t++){const e=g[t],n=i(e)?Jk:Zk,{hotZone:r,brushRegion:o,extent:a}=n(e,{offsetY:s,offsetX:c,cross:E,zIndex:999,fill:"transparent"});e.parentNode.appendChild(r);const u=Nk(r,Object.assign(Object.assign({},x),{reverse:l,brushRegion:o,brushended(n){v.delete(e),0===Array.from(v.entries()).length?_(n):M(t,n)},brushed(n,r,o,i,s){v.set(e,a(n,r,o,i)),M(t,s)}}));P.push(u)}const L=(t={})=>{const{nativeEvent:e}=t;e||P.forEach(t=>t.remove(!1))},C=(t,e,n)=>{const[r,o]=t,a=z(r,e,n),s=z(o,e,n)+(t=>t.getStep?t.getStep():0)(e);return i(n)?[a,-1/0,s,1/0]:[-1/0,a,1/0,s]},z=(t,e,n)=>{const{height:r,width:o}=d.getOptions(),a=e.clone();return i(n)?a.update({range:[0,o]}):a.update({range:[r,0]}),a.map(t)},T=t=>{const{nativeEvent:e}=t;if(e)return;const{selection:n}=t.data;for(let t=0;t<P.length;t++){const e=n[t],r=P[t];e?r.move(...C(e,w[t],g[t]),!1):r.remove(!1)}};return f.on("brushAxis:remove",L),f.on("brushAxis:highlight",T),()=>{P.forEach(t=>t.destroy()),f.off("brushAxis:remove",L),f.off("brushAxis:highlight",T)}}(o,Object.assign({elements:jl,axes:Vk,offsetY:l,offsetX:c,points:t=>t.__data__.points,horizontal:t=>{const{startPos:[e,n],endPos:[r,o]}=t.attributes;return e!==r&&n===o},datum:Cl(i),state:Fl(a,["active",["inactive",{opacity:.5}]]),coordinate:u,emitter:r},t))}}var tA=function(t,e,n,r){return new(n||(n=Promise))(function(o,i){function a(t){try{c(r.next(t))}catch(t){i(t)}}function s(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){t.done?o(t.value):function(t){return t instanceof n?t:new n(function(e){e(t)})}(t.value).then(a,s)}c((r=r.apply(t,e||[])).next())})},eA=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};function nA(t){var{hideX:e=!0,hideY:n=!0}=t,r=eA(t,["hideX","hideY"]);return(t,o,i)=>{const{container:a,view:s,options:c,update:l,setState:u}=t,f=Ml(a);let d=!1,p=!1,h=s;const{scale:g,coordinate:m}=s;return function(t,e){var{filter:n,reset:r,brushRegion:o,extent:i,reverse:a,emitter:s,selection:c,series:l=!1}=e;const u=xt(eA(e,["filter","reset","brushRegion","extent","reverse","emitter","scale","coordinate","selection","series"]),"mask"),{width:f,height:d}=t.getBBox(),p=i||[0,0,f,d],h=function(t=300){let e=null;return n=>{const{timeStamp:r}=n;return null!==e&&r-e<t?(e=r,!0):(e=r,!1)}}(),g=Nk(t,Object.assign(Object.assign({},u),{extent:p,brushRegion:o,reverse:a,brushcreated:function(t,e,r,o,i){t===r&&e===o||(i.nativeEvent=!0,n(c(t,e,r,o),i),g.remove())}}));function m(t){h(t)&&(t.nativeEvent=!0,r(t))}t.addEventListener("click",m);const y=({nativeEvent:t,data:e})=>{if(t)return;const{selection:r}=e;n(r,{nativeEvent:!1})};return s.on("brush:filter",y),()=>{g.destroy(),s.off("brush:filter",y),t.removeEventListener("click",m)}}(f,Object.assign(Object.assign({brushRegion:(t,e,n,r)=>[t,e,n,r],selection:(t,e,n,r)=>{const{scale:o,coordinate:i}=h;return ll(t,e,n,r,o,i)},filter:(t,r)=>tA(this,void 0,void 0,function*(){if(p)return;p=!0;const[o,a]=t;u("brushFilter",t=>{const{marks:r}=t,i=r.map(t=>(0,N.A)({axis:Object.assign(Object.assign({},e&&{x:{transform:[{type:"hide"}]}}),n&&{y:{transform:[{type:"hide"}]}})},t,{scale:{x:{domain:o,nice:!1},y:{domain:a,nice:!1}}}));return Object.assign(Object.assign({},c),{marks:i,clip:!0})}),i.emit("brush:filter",Object.assign(Object.assign({},r),{data:{selection:[o,a]}}));const s=yield l();h=s.view,p=!1,d=!0}),reset:t=>{if(p||!d)return;const{scale:e}=s,{x:n,y:r}=e,o=n.getOptions().domain,a=r.getOptions().domain;i.emit("brush:filter",Object.assign(Object.assign({},t),{data:{selection:[o,a]}})),d=!1,h=s,u("brushFilter"),l()},extent:void 0,emitter:i,scale:g,coordinate:m},{maskFill:"#777",maskFillOpacity:"0.3",maskStroke:"#fff",unhighlightedOpacity:.5,reverse:!1}),r))}}function rA(t){return nA(Object.assign(Object.assign({hideX:!0},t),{brushRegion:Wk}))}function oA(t){return nA(Object.assign(Object.assign({hideY:!0},t),{brushRegion:qk}))}function iA(t,e,n){const r=t?n:e,o=t?e:n,i=al(r),a=al(o),s=o.getOptions().domain;return{currentScale:r,targetScale:o,isSourceDiscrete:i,isTargetDiscrete:a,shouldPreserveZeroBaseline:!a&&s&&s.length>=2&&0===s[0]}}function aA({isTargetDiscrete:t,filteredValues:e,shouldPreserveZeroBaseline:n}){if(t)return Array.from(new Set(e)).sort((t,e)=>t-e);{const t=Math.min(...e),r=Math.max(...e);return n?[0,r]:[t,r]}}function sA(t){return t instanceof Date?t.getTime():"string"==typeof t?parseFloat(t):Number(t)}function cA(t,e,n,r,o,i="filter",a=!1){if(tu(i))return[];const s=a?"y":"x",c=a?"x":"y",l=[];for(const r of t){const{channelData:t}=r,o=t[s]||[],a=t[c]||[],u=Array.isArray(o[0])?o[0]:o,f=Array.isArray(a[0]);if(0===u.length)continue;const d=u.length;for(let t=0;t<d;t++){const r=u[t];let o=!1;if(n)o=e.includes(r);else if(e.length>=2){const t=sA(r),n=sA(e[0]),i=sA(e[e.length-1]);isNaN(t)||isNaN(n)||isNaN(i)||(o=t>=n&&t<=i)}if("filter"===i&&o)if(f){const e=a.length;for(let n=0;n<e;n++){const e=a[n];if(Array.isArray(e)&&t<e.length){const n=sA(e[t]);isNaN(n)||l.push(n)}}}else if(t<a.length){const e=sA(a[t]);isNaN(e)||l.push(e)}}}return l.length>0?aA({isTargetDiscrete:r,filteredValues:l,shouldPreserveZeroBaseline:o}):[]}function lA(t,e,n,r){r&&e instanceof Map?e.forEach((e,n)=>{e&&Array.isArray(e)&&e.length>0&&(t[n]=e)}):!r&&Array.isArray(e)&&e.length>0&&(t[n?"x":"y"]=e)}var uA=function(t,e,n,r){return new(n||(n=Promise))(function(o,i){function a(t){try{c(r.next(t))}catch(t){i(t)}}function s(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){t.done?o(t.value):function(t){return t instanceof n?t:new n(function(e){e(t)})}(t.value).then(a,s)}c((r=r.apply(t,e||[])).next())})};function fA(t){var e,n,r,o;if(!(null==t?void 0:t.markState))return 0;let i=0;for(const[a,s]of t.markState.entries()){if("point"!==a.type||!(null==s?void 0:s.channels))continue;const t=null===(e=s.channels)||void 0===e?void 0:e.find(t=>"size"===t.name);if(t){if((null===(r=null===(n=t.scale)||void 0===n?void 0:n.range)||void 0===r?void 0:r.length)>0){const e=Math.max(...t.scale.range.filter(t=>"number"==typeof t));i=Math.max(i,e);continue}if((null===(o=t.values)||void 0===o?void 0:o.length)>0){const e=t.values.filter(t=>void 0!==t.value).flatMap(t=>Array.isArray(t.value)?t.value:[t.value]).filter(t=>"number"==typeof t&&!isNaN(t));e.length>0&&(i=Math.max(i,...e))}}}return i}function dA(t,e,n,r,o,i,a){if(a){const s=i?r:o.x,c=i?o.y:r;t.emit(e,Object.assign(Object.assign({},n),{nativeEvent:a,data:{selection:[gA(s),gA(c)]}}))}}function pA(t,e,n,r){const{domain0:o,filteredDomain:i,channel0:a,channel1:s,prefix:c,hasState:l,isMultiAxis:u,markToScaleMap:f,enableAdaptiveFiltering:d}=r;u&&i instanceof Map?t(e,t=>Object.assign({},function(t,e,n,r,o=!1,i="x",a="y",s=new Map,c=new Map){const{marks:l}=t,u=fA(e),f=l.map(t=>{var e,l;const u="string"==typeof(null==t?void 0:t.key)?t.key:String((null==t?void 0:t.key)||""),f=s.get(u),d=c.get(f),p=d&&{y:Object.assign({domain:d,nice:!0},"y"!==f?{independent:!0}:void 0)};return(0,N.A)({axis:{x:{transform:[{type:"hide"}]},y:{transform:[{type:"hide"}]}}},t,{scale:Object.assign(Object.assign({},n),p),[r]:Object.assign(Object.assign({},(null===(e=t[r])||void 0===e?void 0:e[i])&&{[i]:Object.assign({preserve:!0},o&&{ratio:null})}),(null===(l=t[r])||void 0===l?void 0:l[a])&&{[a]:{preserve:!0}}),animate:!1})});return Object.assign(Object.assign({},t),{marks:f,insetLeft:u,insetRight:u,insetTop:u,insetBottom:u,clip:!0,animate:!1})}(t,n,{[a]:{domain:o,nice:!1}},c,l,a,s,f||new Map,i))):t(e,t=>Object.assign({},function(t,e,n,r,o=!1,i="x",a="y"){const{marks:s}=t,c=fA(e),l=s.map(t=>{var e,s;return(0,N.A)({axis:{x:{transform:[{type:"hide"}]},y:{transform:[{type:"hide"}]}}},t,{scale:n,[r]:Object.assign(Object.assign({},(null===(e=t[r])||void 0===e?void 0:e[i])&&{[i]:Object.assign({preserve:!0},o&&{ratio:null})}),(null===(s=t[r])||void 0===s?void 0:s[a])&&{[a]:{preserve:!0}}),animate:!1})});return Object.assign(Object.assign({},t),{marks:l,insetLeft:c,insetRight:c,insetTop:c,insetBottom:c,clip:!0,animate:!1})}(t,n,Object.assign({[a]:{domain:o,nice:!1}},d&&Array.isArray(i)?{[s]:{domain:i,nice:!0}}:{}),c,l,a,s)))}function hA(t,e,n){const[r,o]=t,i=n?t=>1-t:t=>t;return cl(e,[sl(e,i(r),!0),sl(e,i(o),!1)])}function gA(t){return[t[0],t[t.length-1]]}function mA({initDomain:t={},className:e="slider",prefix:n="slider",setValue:r=(t,e)=>t.setValues(e),hasState:o=!1,wait:i=50,leading:a=!0,trailing:s=!1,adaptiveMode:c="filter",getInitValues:u=t=>{var e;const n=null===(e=null==t?void 0:t.attributes)||void 0===e?void 0:e.values;if(0!==n[0]||1!==n[1])return n}}){return(f,d,p)=>{const{container:h,view:g,update:m,setState:y}=f,b=h.getElementsByClassName(e);if(!b.length)return()=>{};let v=!1;const{scale:x,coordinate:O}=g,{x:w,y:j}=x,k=nn(O),A=t=>{const e="vertical"===t?"y":"x",n="vertical"===t?"x":"y";return k?[n,e]:[e,n]},M=new Map,_=new Set,S=nu(g),E=function(t,e,n,r,o){var i,a,s,c;const l={x:e.x||n.getOptions().domain||[],y:e.y||r.getOptions().domain||[]},u=o||nu(t),{hasIndependentX:f,hasIndependentY:d}=u;if(f||d){let e=1,n=1;for(const[r,o]of t.markState.entries())if(null==o?void 0:o.channels){if(f){const t=o.channels.find(t=>"x"===t.name);(null===(a=null===(i=null==r?void 0:r.scale)||void 0===i?void 0:i.x)||void 0===a?void 0:a.independent)&&(l[`x${e}`]=t.scale.domain,e++)}if(d){const t=o.channels.find(t=>"y"===t.name);(null===(c=null===(s=null==r?void 0:r.scale)||void 0===s?void 0:s.y)||void 0===c?void 0:c.independent)&&(l[`y${n}`]=t.scale.domain,n++)}}}return l}(g,t,w,j,S),P=Array.from(b),L=t=>P.some(e=>{const{orientation:n}=e.attributes,[r]=A(n);return r===t}),C=L("x")&&!L("y"),z=L("y")&&!L("x"),T=!tu(c)&&(C||z);for(const t of b){const{orientation:e}=t.attributes,[f,d]=A(e),h=`${n}${Ce(f)}:filter`,b="x"===f,{ratio:O}=w.getOptions(),{ratio:P}=j.getOptions(),L=t=>{if(t.data){const{selection:e}=t.data,[n=gA(E.x),r=gA(E.y)]=e;return b?[cl(w,n,O),cl(j,r,P)]:[cl(j,r,P),cl(w,n,O)]}const{value:n}=t.detail;return[hA(n,x[f],k&&"horizontal"===e),E[d]]};let B=!1;const I=t=>{B=t,t||(v=!1)},N=vA({getFiltering:()=>B,setFiltering:I,domainsOf:L,view:g,independentScaleInfo:S,enableAdaptiveFiltering:T,hasOnlyXSlider:C,hasOnlyYSlider:z,adaptiveMode:c,scaleX:w,scaleY:j,scale:x,channelDomain:E,channel0:f,channel1:d,isX:b,emitter:p,eventName:h,setState:y,slider:t,prefix:n,hasState:o,update:m,wait:i,leading:a,trailing:s}),R=e=>{const{nativeEvent:n}=e;if(n)return;const{data:o}=e,{selection:i}=o,[a,s]=i;t.dispatchEvent(new l.up("valuechange",{data:o,nativeEvent:!1}));const c=b?fl(a,w):fl(s,j);r(t,c)};p.on(h,R),t.addEventListener("valuechange",N),M.set(t,N),_.add([h,R]);const F=u(t);F&&t.dispatchEvent(new l.up("valuechange",{detail:{value:F},nativeEvent:!1,initValue:!0}))}return()=>{for(const[t,e]of M)t.removeEventListener("valuechange",e);for(const[t,e]of _)p.off(t,e)}}}function yA({view:t,domain0:e,shouldFilterXAxis:n,enableAdaptiveFiltering:r,markDataPairs:o,adaptiveMode:i,scaleX:a,scaleY:s,scale:c,channelDomain:l,independentScaleInfo:u,channel0:f}){const d=new Map,p=new Map;if(!r||0===o.length||!(null==e?void 0:e.length))return{filteredDomain:d,markToScaleMap:p};const h=k(t,"options.slider");if(Object.keys(h).length>0&&Object.prototype.hasOwnProperty.call(h,f)){const t=function(t,e,n,r,o){const i=t?r:n,a=t=>{const e={};return Object.keys(o).forEach(n=>{(n===t||n.match(new RegExp(`^${t}\\d+$`)))&&(e[n]=o[n])}),e},s=a(t?"x":"y"),c=Object.keys(s),l=c.map(t=>e[t]),u=al(i),f=l.map(t=>al(t)),d=l.map((t,e)=>{const n=t.getOptions().domain;return!f[e]&&n&&n.length>=2&&0===n[0]});return{currentScale:i,targetScales:l,isSourceDiscrete:u,isTargetDiscrete:f,shouldPreserveZeroBaseline:d,targetScaleKeys:c}}(n,c,a,s,l);(n?u.markToXScaleMap:u.markToYScaleMap).forEach((t,e)=>{p.set(e,t)});const r=function({markDataPairs:t,domain:e,scaleInfo:n,markToScaleMap:r,adaptiveMode:o,shouldFilterXAxis:i=!1}){const a=new Map,{isSourceDiscrete:s,isTargetDiscrete:c,shouldPreserveZeroBaseline:l,targetScaleKeys:u}=n;return t.forEach(t=>{const n=r.get(t.markKey);if(!n)return;const f=u.indexOf(n);if(-1===f)return;const d=cA([t],e,s,c[f],l[f],o,i);a.set(n,d)}),a}({markDataPairs:o,domain:e,scaleInfo:t,markToScaleMap:p,adaptiveMode:i,isViewSlider:!0,shouldFilterXAxis:n});return lA(l,r,n,!0),{filteredDomain:r,markToScaleMap:p}}{const r=function(t,e){for(const[n]of t.markState.entries()){const t=k(n,"slider");if(Object.keys(t||{}).length>0&&Object.prototype.hasOwnProperty.call(t,e))return String(n.key||"")}return null}(t,f);if(r){const t=iA(n,a,s),c=n?u.markToXScaleMap:u.markToYScaleMap,l=c.get(r)||"";if(l){p.set(r,l);const a=function(t,e,n,r,o,i,a=!1,s){const c=new Map;if(0===t.length||0===e.length)return c;const{isSourceDiscrete:l,isTargetDiscrete:u,shouldPreserveZeroBaseline:f}=n,d=t.filter(s?t=>s.get(t.markKey)===o:t=>t.markKey===r);if(0===d.length)return c;const p=cA(d,e,l,u,f,i,a);return c.set(o,p),c}(o,e,t,r,l,i,n,c);return{filteredDomain:a,markToScaleMap:p}}}}return{filteredDomain:d,markToScaleMap:p}}function bA({domain0:t,domain1:e,shouldFilterXAxis:n,enableAdaptiveFiltering:r,markDataPairs:o,adaptiveMode:i,scaleX:a,scaleY:s,channelDomain:c,hasOnlyXSlider:l,hasOnlyYSlider:u,isX:f}){let d=e;if(r&&o.length>0&&(l&&f||u&&!f)&&(null==t?void 0:t.length)>0){d=function({markDataPairs:t,domain:e,scaleInfo:n,adaptiveMode:r,shouldFilterXAxis:o=!1}){const{isSourceDiscrete:i,isTargetDiscrete:a,shouldPreserveZeroBaseline:s}=n;return cA(t,e,i,a,s,r,o)}({markDataPairs:o,domain:t,scaleInfo:iA(n,a,s),adaptiveMode:i,shouldFilterXAxis:n}),lA(c,d,n,!1)}return d}function vA({getFiltering:t,setFiltering:e,domainsOf:n,view:r,independentScaleInfo:o,enableAdaptiveFiltering:i,hasOnlyXSlider:a,hasOnlyYSlider:s,adaptiveMode:c,scaleX:l,scaleY:u,scale:f,channelDomain:d,channel0:p,channel1:h,isX:g,emitter:m,eventName:y,setState:b,slider:v,prefix:x,hasState:O,update:w,wait:j,leading:k,trailing:A}){return gh(j=>uA(this,void 0,void 0,function*(){const{initValue:k=!1}=j;if(t()&&!k)return;e(!0);const{nativeEvent:A=!0}=j,{markDataPairs:M}=function(t){var e,n;const r=[],o=[],i=[],a=t.markState;if(a)for(const[t,s]of a.entries())if(null==s?void 0:s.channels){const a={};for(const t of s.channels)if("x"===(null==t?void 0:t.name)&&(null===(e=t.values)||void 0===e?void 0:e.length)>0){let e=[];for(const n of t.values)(null==n?void 0:n.value)&&(e=e.concat(n.value),r.push(n.value));a.x=e}else if(t&&("y"===t.name||t.name.startsWith("y"))&&(null===(n=t.values)||void 0===n?void 0:n.length)>0){const e=t.name,n=[];for(const r of t.values)if(null==r?void 0:r.value){const t=r.value;n.push(t),"y"!==e&&"y1"!==e||(Array.isArray(t)?o.push(t.flat()):o.push([t]))}a[e]=n}(a.x||[]).length>0&&(a.y||[]).length>0&&i.push({markKey:t.key||`mark_${i.length}`,channelData:a})}return{xChannelValues:r.flat(),yChannelValues:o.flat(),markDataPairs:i}}(r);if(o[`hasIndependent${h.toUpperCase()}`]){const[t]=n(j),e=s&&!g,{filteredDomain:w,markToScaleMap:k}=yA({view:r,domain0:t,shouldFilterXAxis:e,enableAdaptiveFiltering:i&&(a&&g||s&&!g),markDataPairs:M,adaptiveMode:c,scaleX:l,scaleY:u,scale:f,channelDomain:d,independentScaleInfo:o,channel0:p});d[p]=t,dA(m,y,j,t,d,g,A),pA(b,v,r,{domain0:t,filteredDomain:w,channel0:p,channel1:h,prefix:x,hasState:O,isMultiAxis:!0,markToScaleMap:k,enableAdaptiveFiltering:i})}else{const[t,e]=n(j),o=bA({domain0:t,domain1:e,shouldFilterXAxis:s&&!g,enableAdaptiveFiltering:i,markDataPairs:M,adaptiveMode:c,scaleX:l,scaleY:u,channelDomain:d,hasOnlyXSlider:a,hasOnlyYSlider:s,isX:g});d[p]=t,dA(m,y,j,t,d,g,A),pA(b,v,r,{domain0:t,filteredDomain:o,channel0:p,channel1:h,prefix:x,hasState:O,isMultiAxis:!1,markToScaleMap:void 0,enableAdaptiveFiltering:i})}yield w(),e(!1)}),j,{leading:k,trailing:A})}function xA({className:t="slider",setValue:e=(t,e)=>t.setValues(e),minRange:n=.01,wheelSensitivity:r=.05,x:o=!0,y:i=!0}={}){return a=>{const{container:s,view:c}=a,{coordinate:u}=c,f=nn(u),d=function(t){var e;try{const n=null===(e=t.ownerDocument)||void 0===e?void 0:e.defaultView;if(!n||"function"!=typeof n.getContextService)return null;const r=n.getContextService().getDomElement();return r instanceof HTMLElement?r:null}catch(t){return null}}(s),p=Math.max(1e-6,Math.min(1,n)),h=s.getElementsByClassName(t);if(!h.length)return()=>{};const g=(t,e)=>!0===t||!1!==t&&("shift"===t?e.shiftKey&&!e.ctrlKey&&!e.altKey:"ctrl"===t?e.ctrlKey&&!e.shiftKey&&!e.altKey:"alt"===t&&(e.altKey&&!e.shiftKey&&!e.ctrlKey)),m=(t,n)=>{e(t,n),t.dispatchEvent(new l.up("valuechange",{detail:{value:n},nativeEvent:!0}))},y=(t,e,n,r,o)=>{const i=Math.max(0,Math.min(1,(t-e)/n));return Math.max(r,Math.min(o,i))},b=t=>{if(!d)return;if(!d.contains(t.target))return;const e=d.getBoundingClientRect(),n=t.clientX-e.left,a=t.clientY-e.top,s=[];for(const e of h){const{values:n,orientation:r}=e.attributes;if(!n)continue;const a="horizontal"===r;g("x"===(f?a?"y":"x":a?"x":"y")?o:i,t)&&s.push(e)}if(0!==s.length){t.preventDefault(),t.stopPropagation();for(const e of s){const{values:o,orientation:i,x:s,y:c,trackLength:l}=e.attributes,[u,f]=o,d=f-u,h="horizontal"===i?y(n,s,l,u,f):y(a,c,l,u,f),g=r*Ql(d),b=Math.max(p,Math.min(1,d*(1+t.deltaY*g)));let v=h-b*((h-u)/d),x=h+b*((f-h)/d);v<0?(v=0,x=Math.min(1,b)):x>1&&(x=1,v=Math.max(0,1-b)),m(e,[v,x])}}};return d&&d.addEventListener("wheel",b,{passive:!1,capture:!0}),()=>{d&&d.removeEventListener("wheel",b,{capture:!0})}}}xA.props={reapplyWhenUpdate:!0};const OA="g2-scrollbar";function wA(t={}){return(e,n,r)=>{const{view:o,container:i}=e;if(!i.getElementsByClassName(OA).length)return()=>{};const{scale:a}=o,{x:s,y:c}=a,l={x:[...s.getOptions().domain],y:[...c.getOptions().domain]};s.update({domain:s.getOptions().expectedDomain}),c.update({domain:c.getOptions().expectedDomain});return mA(Object.assign({initDomain:l,className:OA,prefix:"scrollbar",hasState:!0,setValue:(t,e)=>t.setValue(e[0]),getInitValues:t=>{const e=t.slider.attributes.values;if(0!==e[0]||1!==e[1])return e},adaptiveMode:!1},t))(e,n,r)}}var jA=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};function kA(t,e,n){return`<${t} style="${Object.entries(n).map(([t,e])=>`${function(t){return t.replace(/([A-Z])/g,"-$1").toLowerCase()}(t)}:${e}`).join(";")}">${e}</${t}>`}const AA={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 MA(t){return"text"===t.nodeName&&!!t.isOverflowing()}function _A(t){var{offsetX:e=8,offsetY:n=8}=t,r=jA(t,["offsetX","offsetY"]);return t=>{const{container:o}=t,[i,a]=o.getBounds().min,s=xt(r,"tip"),c=new Set,u=t=>{const{target:r}=t;if(!MA(r))return void t.stopPropagation();const{offsetX:u,offsetY:f}=t,d=u+e-i,p=f+n-a;if(r.tip)return r.tip.style.x=d,void(r.tip.style.y=p);const{text:h}=r.style,g=new l.g3({className:"poptip",style:{innerHTML:kA("div",h,Object.assign(Object.assign({},AA),s)),x:d,y:p}});o.appendChild(g),r.tip=g,c.add(g)},f=t=>{const{target:e}=t;MA(e)?e.tip&&(e.tip.remove(),e.tip=null,c.delete(e.tip)):t.stopPropagation()};return o.addEventListener("pointerover",u),o.addEventListener("pointerout",f),()=>{o.removeEventListener("pointerover",u),o.removeEventListener("pointerout",f),c.forEach(t=>t.remove())}}}_A.props={reapplyWhenUpdate:!0};const SA=Object.keys?function(t){return Object.keys(t)}:function(t){var e=[];return ui(t,function(n,r){(0,Jn.A)(t)&&"prototype"===r||e.push(r)}),e};const EA=function(t,e){var n=SA(e),r=n.length;if((0,R.A)(t))return!r;for(var o=0;o<r;o+=1){var i=n[o];if(e[i]!==t[i]||!(i in t))return!1}return!0};const PA=function(t,e){if(!(0,Le.A)(t))return null;var n;if((0,Jn.A)(e)&&(n=e),(0,$.A)(e)&&(n=function(t){return EA(t,e)}),n)for(var r=0;r<t.length;r+=1)if(n(t[r]))return t[r];return null};var LA=Object.prototype.hasOwnProperty;const CA=function(t,e){if(null===t||!(0,$.A)(t))return{};var n={};return ui(e,function(e){LA.call(t,e)&&(n[e]=t[e])}),n};function zA(t){return null==t?null:TA(t)}function TA(t){if("function"!=typeof t)throw new Error;return t}var BA=n("./node_modules/.pnpm/d3-hierarchy@3.1.2/node_modules/d3-hierarchy/src/hierarchy/index.js"),IA={depth:-1},NA={},RA={};function FA(t){return t.id}function DA(t){return t.parentId}function $A(){var t,e=FA,n=DA;function r(r){var o,i,a,s,c,l,u,f,d=Array.from(r),p=e,h=n,g=new Map;if(null!=t){const e=d.map((e,n)=>function(t){t=`${t}`;let e=t.length;HA(t,e-1)&&!HA(t,e-2)&&(t=t.slice(0,-1));return"/"===t[0]?t:`/${t}`}(t(e,n,r))),n=e.map(WA),o=new Set(e).add("");for(const t of n)o.has(t)||(o.add(t),e.push(t),n.push(WA(t)),d.push(RA));p=(t,n)=>e[n],h=(t,e)=>n[e]}for(a=0,o=d.length;a<o;++a)l=d[a]=new BA.bP(i=d[a]),null!=(u=p(i,a,r))&&(u+="")&&(f=l.id=u,g.set(f,g.has(f)?NA:l)),null!=(u=h(i,a,r))&&(u+="")&&(l.parent=u);for(a=0;a<o;++a)if(u=(l=d[a]).parent){if(!(c=g.get(u)))throw new Error("missing: "+u);if(c===NA)throw new Error("ambiguous: "+u);c.children?c.children.push(l):c.children=[l],l.parent=c}else{if(s)throw new Error("multiple roots");s=l}if(!s)throw new Error("no root");if(null!=t){for(;s.data===RA&&1===s.children.length;)s=s.children[0],--o;for(let t=d.length-1;t>=0&&(l=d[t]).data===RA;--t)l.data=null}if(s.parent=IA,s.eachBefore(function(t){t.depth=t.parent.depth+1,--o}).eachBefore(BA.lW),s.parent=null,o>0)throw new Error("cycle");return s}return r.id=function(t){return arguments.length?(e=zA(t),r):e},r.parentId=function(t){return arguments.length?(n=zA(t),r):n},r.path=function(e){return arguments.length?(t=zA(e),r):t},r}function WA(t){let e=t.length;if(e<2)return"";for(;--e>1&&!HA(t,e););return t.slice(0,e)}function HA(t,e){if("/"===t[e]){let n=0;for(;e>0&&"\\"===t[--e];)++n;if(!(1&n))return!0}return!1}function qA(t,e,n,r,o){var i,a,s=t.children,c=s.length,l=new Array(c+1);for(l[0]=a=i=0;i<c;++i)l[i+1]=a+=s[i].value;!function t(e,n,r,o,i,a,c){if(e>=n-1){var u=s[e];return u.x0=o,u.y0=i,u.x1=a,void(u.y1=c)}var f=l[e],d=r/2+f,p=e+1,h=n-1;for(;p<h;){var g=p+h>>>1;l[g]<d?p=g+1:h=g}d-l[p-1]<l[p]-d&&e+1<p&&--p;var m=l[p]-f,y=r-m;if(a-o>c-i){var b=r?(o*y+a*m)/r:a;t(e,p,m,o,i,b,c),t(p,n,y,b,i,a,c)}else{var v=r?(i*y+c*m)/r:c;t(e,p,m,o,i,a,v),t(p,n,y,o,v,a,c)}}(0,c,t.value,e,n,r,o)}function YA(t,e,n,r,o){for(var i,a=t.children,s=-1,c=a.length,l=t.value&&(r-e)/t.value;++s<c;)(i=a[s]).y0=n,i.y1=o,i.x0=e,i.x1=e+=i.value*l}function XA(t,e,n,r,o){for(var i,a=t.children,s=-1,c=a.length,l=t.value&&(o-n)/t.value;++s<c;)(i=a[s]).x0=e,i.x1=r,i.y0=n,i.y1=n+=i.value*l}function GA(t,e,n,r,o){(1&t.depth?XA:YA)(t,e,n,r,o)}var VA=(1+Math.sqrt(5))/2;function KA(t,e,n,r,o,i){for(var a,s,c,l,u,f,d,p,h,g,m,y=[],b=e.children,v=0,x=0,O=b.length,w=e.value;v<O;){c=o-n,l=i-r;do{u=b[x++].value}while(!u&&x<O);for(f=d=u,m=u*u*(g=Math.max(l/c,c/l)/(w*t)),h=Math.max(d/m,m/f);x<O;++x){if(u+=s=b[x].value,s<f&&(f=s),s>d&&(d=s),m=u*u*g,(p=Math.max(d/m,m/f))>h){u-=s;break}h=p}y.push(a={value:u,dice:c<l,children:b.slice(v,x)}),a.dice?YA(a,n,r,o,w?r+=l*u/w:i):XA(a,n,r,w?n+=c*u/w:o,i),w-=u,v=x}return y}const UA=function t(e){function n(t,n,r,o,i){KA(e,t,n,r,o,i)}return n.ratio=function(e){return t((e=+e)>1?e:1)},n}(VA),ZA=function t(e){function n(t,n,r,o,i){if((a=t._squarify)&&a.ratio===e)for(var a,s,c,l,u,f=-1,d=a.length,p=t.value;++f<d;){for(c=(s=a[f]).children,l=s.value=0,u=c.length;l<u;++l)s.value+=c[l].value;s.dice?YA(s,n,r,o,p?r+=(i-r)*s.value/p:i):XA(s,n,r,p?n+=(o-n)*s.value/p:o,i),p-=s.value}else t._squarify=a=KA(e,t,n,r,o,i),a.ratio=e}return n.ratio=function(e){return t((e=+e)>1?e:1)},n}(VA);function JA(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 QA(){return 0}function tM(t){return function(){return t}}function eM(t,e=[t.data.name]){t.id=t.id||t.data.name,t.path=e,t.children&&t.children.forEach(n=>{n.id=`${t.id}/${n.data.name}`,n.path=[...e,n.data.name],eM(n,n.path)})}function nM(t){const e=k(t,["data","name"]);e.replaceAll&&(t.path=e.replaceAll(".","/").split("/")),t.children&&t.children.forEach(t=>{nM(t)})}function rM(t,e,n){const{value:r}=n,o=function(t,e){const n={treemapBinary:qA,treemapDice:YA,treemapSlice:XA,treemapSliceDice:GA,treemapSquarify:UA,treemapResquarify:ZA},r="treemapSquarify"===t?n[t].ratio(e):n[t];if(!r)throw new TypeError("Invalid tile method!");return r}(e.tile,e.ratio),i=function(t,e){return Array.isArray(t)?"function"==typeof e?$A().path(e)(t):$A()(t):(0,BA.Ay)(t)}(t,e.path);(0,Le.A)(t)?nM(i):eM(i),r?i.sum(t=>e.ignoreParentValue&&t.children?0:Om(r)(t)).sort(e.sort):i.count(),function(){var t=UA,e=!1,n=1,r=1,o=[0],i=QA,a=QA,s=QA,c=QA,l=QA;function u(t){return t.x0=t.y0=0,t.x1=n,t.y1=r,t.eachBefore(f),o=[0],e&&t.eachBefore(JA),t}function f(e){var n=o[e.depth],r=e.x0+n,u=e.y0+n,f=e.x1-n,d=e.y1-n;f<r&&(r=f=(r+f)/2),d<u&&(u=d=(u+d)/2),e.x0=r,e.y0=u,e.x1=f,e.y1=d,e.children&&(n=o[e.depth+1]=i(e)/2,r+=l(e)-n,u+=a(e)-n,(f-=s(e)-n)<r&&(r=f=(r+f)/2),(d-=c(e)-n)<u&&(u=d=(u+d)/2),t(e,r,u,f,d))}return u.round=function(t){return arguments.length?(e=!!t,u):e},u.size=function(t){return arguments.length?(n=+t[0],r=+t[1],u):[n,r]},u.tile=function(e){return arguments.length?(t=TA(e),u):t},u.padding=function(t){return arguments.length?u.paddingInner(t).paddingOuter(t):u.paddingInner()},u.paddingInner=function(t){return arguments.length?(i="function"==typeof t?t:tM(+t),u):i},u.paddingOuter=function(t){return arguments.length?u.paddingTop(t).paddingRight(t).paddingBottom(t).paddingLeft(t):u.paddingTop()},u.paddingTop=function(t){return arguments.length?(a="function"==typeof t?t:tM(+t),u):a},u.paddingRight=function(t){return arguments.length?(s="function"==typeof t?t:tM(+t),u):s},u.paddingBottom=function(t){return arguments.length?(c="function"==typeof t?t:tM(+t),u):c},u.paddingLeft=function(t){return arguments.length?(l="function"==typeof t?t:tM(+t),u):l},u}().tile(o).size(e.size).round(e.round).paddingInner(e.paddingInner).paddingOuter(e.paddingOuter).paddingTop(e.paddingTop).paddingRight(e.paddingRight).paddingBottom(e.paddingBottom).paddingLeft(e.paddingLeft)(i);const a=i.descendants().map(t=>Object.assign(t,{id:t.id.replace(/^\//,""),x:[t.x0,t.x1],y:[t.y0,t.y1]})),s=a.filter("function"==typeof e.layer?e.layer:t=>t.height===e.layer);return[s,a]}var oM=function(t,e,n,r){return new(n||(n=Promise))(function(o,i){function a(t){try{c(r.next(t))}catch(t){i(t)}}function s(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){t.done?o(t.value):function(t){return t instanceof n?t:new n(function(e){e(t)})}(t.value).then(a,s)}c((r=r.apply(t,e||[])).next())})},iM=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const aM={breadCrumbFill:"rgba(0, 0, 0, 0.85)",breadCrumbFontSize:12,breadCrumbY:12,activeFill:"rgba(0, 0, 0, 0.5)"};function sM(t={}){const{originData:e=[],layout:n}=t,r=iM(t,["originData","layout"]),o=(0,N.A)({},aM,r),i=xt(o,"breadCrumb"),a=xt(o,"active");return t=>{const{update:r,setState:o,container:s,options:c}=t,u=_t(s).select(".plot").node();const f=c.marks[0],{state:d}=f,p=new l.YJ;u.appendChild(p);const h=(t,c)=>oM(this,void 0,void 0,function*(){if(p.removeChildren(),c){let e="",n=i.y,r=0;const o=[],s=u.getBBox().width,c=t.map((a,c)=>{e=`${e}${a}/`,o.push(a);const u=new l.EY({name:e.replace(/\/$/,""),style:Object.assign(Object.assign({text:a,x:r,path:[...o],depth:c},i),{y:n})});p.appendChild(u),r+=u.getBBox().width;const f=new l.EY({style:Object.assign(Object.assign({x:r,text:" / "},i),{y:n})});return p.appendChild(f),r+=f.getBBox().width,r>s&&(n=p.getBBox().height+i.y,r=0,u.attr({x:r,y:n}),r+=u.getBBox().width,f.attr({x:r,y:n}),r+=f.getBBox().width),c===hs(t)-1&&f.remove(),u});c.forEach((t,e)=>{if(e===hs(c)-1)return;const n=Object.assign({},t.attributes);t.attr("cursor","pointer"),t.addEventListener("mouseenter",()=>{t.attr(a)}),t.addEventListener("mouseleave",()=>{t.attr(n)}),t.addEventListener("click",()=>{h(k(t,["style","path"]),k(t,["style","depth"]))})})}!function(t,e){[...Ww(t),...Hw(t)].forEach(t=>{e(t,t=>t)})}(s,o),o("treemapDrillDown",r=>{const{marks:o}=r,i=t.join("/"),a=o.map(t=>{if("rect"!==t.type)return t;let r=e;if(c){const t=e.filter(t=>{const e=k(t,["id"]);return e&&(e.match(`${i}/`)||i.match(e))}).map(t=>({value:0===t.height?k(t,["value"]):void 0,name:k(t,["id"])})),{paddingLeft:o,paddingBottom:a,paddingRight:s}=n,l=Object.assign(Object.assign({},n),{paddingTop:(n.paddingTop||p.getBBox().height+10)/(c+1),paddingLeft:o/(c+1),paddingBottom:a/(c+1),paddingRight:s/(c+1),path:t=>t.name,layer:t=>t.depth===c+1});r=rM(t,l,{value:"value"})[0]}else r=e.filter(t=>1===t.depth);const o=[];return r.forEach(({path:t})=>{o.push(Ho(t))}),(0,N.A)({},t,{data:r,scale:{color:{domain:o}}})});return Object.assign(Object.assign({},r),{marks:a})}),yield r(void 0,["legendFilter"])}),g=t=>{const n=t.target,{markType:r,nodeName:o,attributes:i}=n||{};if("rect"!==r&&o!==l.yp.TEXT)return;const a=o===l.yp.TEXT&&!0===k(i,"isTreemapLabel")?(t=>t.attributes.key.split("-")[0])(n):(t=>k(t,["__data__","key"]))(n),s=PA(e,t=>t.id===a);k(s,"height")&&h(k(s,"path"),k(s,"depth"))};u.addEventListener("click",g);const m=SA(Object.assign(Object.assign({},d.active),d.inactive)),y=()=>{Kl(u).forEach(t=>{const n=k(t,["style","cursor"]),r=PA(e,e=>e.id===k(t,["__data__","key"]));if("pointer"!==n&&(null==r?void 0:r.height)){t.style.cursor="pointer";const e=CA(t.attributes,m);t.addEventListener("mouseenter",()=>{t.attr(d.active)}),t.addEventListener("mouseleave",()=>{t.attr((0,N.A)(e,d.inactive))})}})};return y(),u.addEventListener("mousemove",y),()=>{p.remove(),u.removeEventListener("click",g),u.removeEventListener("mousemove",y)}}}var cM=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};function lM(t,e={}){const{valueField:n="value",sort:r,fillParent:o=!0,nameField:i="name"}=e;if(!t||0===t.length)return[];const a=(t,e=null,r=0)=>{const o={data:t,depth:r,parent:e,children:[],x0:0,x1:0,value:t[n]||0};return t.children&&t.children.length>0&&(o.children=t.children.map(t=>a(t,o,r+1))),o},s=[];let c=0;return t.forEach(t=>{const e=a(t),l=(t,e=0,n=!1,i=0)=>{if(n||0===t.depth)t.x0=n?e:0,t.x1=t.x0+t.value;else if(t.x0=e,o&&i>0){const n=t.parent?t.parent.children.reduce((t,e)=>t+e.value,0):t.value;t.x1=e+i*(n>0?t.value/n:1/(t.parent?t.parent.children.length:1))}else t.x1=e+t.value;let a=t.x0;const s=t.x1-t.x0,c=r?[...t.children].sort((t,e)=>r(t.data,e.data)):t.children;if(o&&c.length>0){const e=t.children.reduce((t,e)=>t+e.value,0);c.forEach(t=>{l(t,a,!1,s);a+=s*(e>0?t.value/e:1/c.length)})}else c.forEach(t=>{l(t,a,!1,0),a+=t.x1-t.x0})};l(e,c,!0),c+=e.value;const u=t=>{s.push((t=>{var e,r,o;const a=t=>{var e;return null!==(e=t[i])&&void 0!==e?e:t.name},s=[a(t.data)];let c=t;for(;c.parent;)s.unshift(a(c.parent.data)),c=c.parent;return Object.assign(Object.assign({},CA(t.data,[n])),{[dM]:s,[pM]:null!==(o=null===(r=null===(e=c.parent)||void 0===e?void 0:e.data)||void 0===r?void 0:r[i])&&void 0!==o?o:t.data[i],name:t.data[i],depth:t.depth,value:t.value,x:[t.x0,t.x1],y:[t.depth,t.depth+1],[hM]:t.children.length})})(t)),t.children.forEach(u)};u(e)}),s}const uM="partition",fM="markType",dM="path",pM="ancestor-node",hM="childNodeCount";const gM={id:uM,encode:{x:"x",y:"y",key:dM,color:pM,value:"value",name:"name"},labels:[{style:{pointerEvents:"none"},text:"value",position:"inside",transform:[{type:"overflowHide"}]}],axis:{x:{title:"Time/Order",label:!0},y:!1},style:{[fM]:uM,[hM]:"childNodeCount"},state:{active:{zIndex:2},inactive:{zIndex:1}},legend:!1,coordinate:{type:"cartesian",grid:!1},interaction:{drillDown:!0}},mM=t=>{const{encode:e,data:n=[],layout:r={}}=t,o=cM(t,["encode","data","layout"]),{fillParent:i=!0,sort:a}=r,s=Object.assign(Object.assign({},gM.encode),e),{value:c}=s,l=function(t){const{data:e,encode:n,fillParent:r,sort:o}=t,{color:i,value:a,name:s}=n;return lM(e,{valueField:a,fillParent:r,nameField:s,sort:o}).map(t=>{const e=Object.assign({},t);return i&&i!==pM&&(e[i]=t[i]),e})}({encode:s,data:n,fillParent:i,sort:a});return[(0,N.A)({},gM,Object.assign({type:"rect",data:l,encode:s,tooltip:{title:"path",items:[t=>({name:c,value:t[c]})]},interaction:{elementHighlight:!0}},o))]};mM.props={};var yM=function(t,e,n,r){return new(n||(n=Promise))(function(o,i){function a(t){try{c(r.next(t))}catch(t){i(t)}}function s(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){t.done?o(t.value):function(t){return t instanceof n?t:new n(function(e){e(t)})}(t.value).then(a,s)}c((r=r.apply(t,e||[])).next())})};const bM={rootText:"root",style:{fill:"rgba(0, 0, 0, 0.6)",fontSize:11},y:4,active:{fill:"rgba(0, 0, 0, 0.4)"}};function vM(t={}){const{breadCrumb:e={}}=t,n=(0,N.A)({},bM,e);return t=>{const{update:e,setState:r,container:o,options:i}=t,a=o.ownerDocument,s=_t(o).select(".plot").node();const c=i.marks.find(({id:t})=>t===uM);if(!c)return;const{state:l}=c,u=a.createElement("g");u.style.transform=`translate(${n.x||0}px, ${n.y||0}px)`,u.setAttribute("x","drilldown-breadcrumb"),s.appendChild(u);const f=t=>yM(this,void 0,void 0,function*(){if(u.removeChildren(),t&&t.length>0){const e=a.createElement("text",{style:Object.assign({text:n.rootText},n.style)});u.appendChild(e);let r="";const o=t;let i=n.style.y,c=e.getBBox().width;const l=s.getBBox().width,d=o.map((t,e)=>{const o=a.createElement("text",{style:Object.assign(Object.assign({x:c,text:" / "},n.style),{y:i})});u.appendChild(o),c+=o.getBBox().width,r=`${r}${t} / `;const s=a.createElement("text",{name:r.replace(/\s\/\s$/,""),style:Object.assign(Object.assign({text:t,x:c},n.style),{y:i})});return u.appendChild(s),c+=s.getBBox().width,c>l&&(i=u.getBBox().height,c=0,o.attr({x:c,y:i}),c+=o.getBBox().width,s.attr({x:c,y:i}),c+=s.getBBox().width),s});[e,...d].forEach((e,r)=>{if(r===d.length)return;const o=Object.assign({},e.attributes);e.attr("cursor","pointer"),e.addEventListener("mouseenter",()=>{e.attr(n.active)}),e.addEventListener("mouseleave",()=>{e.attr(o)}),e.addEventListener("click",()=>{f(t.slice(0,r))})})}r("drillDown",e=>{const{marks:n}=e,r=n.map(e=>{if(e.id!==uM&&"rect"!==e.type)return e;const{data:n}=e,r=n.filter(e=>{var n;const r=null!==(n=e.path)&&void 0!==n?n:[];if(0===t.length)return!0;if(!Array.isArray(r)||r.length<t.length)return!1;for(let e=0;e<t.length;e++)if(r[e]!==t[e])return!1;return!0});return(0,N.A)({},e,{data:r})});return Object.assign(Object.assign({},e),{marks:r})}),yield e()}),d=t=>{var e,n;const r=t.target,o=r.style||{},i=r.__data__;if("rect"!==r.markType||o[fM]!==uM||!o[hM])return;const a=null!==(n=null===(e=null==i?void 0:i.data)||void 0===e?void 0:e.path)&&void 0!==n?n:[];f(a)};s.addEventListener("click",d);const p=SA(Object.assign(Object.assign({},l.active),l.inactive)),h=()=>{const t=(t=>t.querySelectorAll(".element").filter(t=>(t.style||{})[fM]===uM))(s);t.forEach(t=>{const e=k(t,["style",hM]);if("pointer"!==k(t,["style","cursor"])&&e){t.style.cursor="pointer";const e=CA(t.attributes,p);t.addEventListener("mouseenter",()=>{t.attr(l.active)}),t.addEventListener("mouseleave",()=>{t.attr((0,N.A)(e,l.inactive))})}})};return s.addEventListener("mousemove",h),()=>{u.remove(),s.removeEventListener("click",d),s.removeEventListener("mousemove",h)}}}var xM=function(t,e,n,r){return new(n||(n=Promise))(function(o,i){function a(t){try{c(r.next(t))}catch(t){i(t)}}function s(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){t.done?o(t.value):function(t){return t instanceof n?t:new n(function(e){e(t)})}(t.value).then(a,s)}c((r=r.apply(t,e||[])).next())})},OM=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const wM={pointR:6,pointStrokeWidth:1,pointStroke:"#888",pointActiveStroke:"#f5f5f5",pathStroke:"#888",pathLineDash:[3,4],labelFontSize:12,labelFill:"#888",labelStroke:"#fff",labelLineWidth:1,labelY:-6,labelX:2},jM="movePoint",kM=t=>{const e=t.target,{markType:n}=e;"line"===n&&(e.attr("_lineWidth",e.attr("lineWidth")||1),e.attr("lineWidth",e.attr("_lineWidth")+3)),"interval"===n&&(e.attr("_opacity",e.attr("opacity")||1),e.attr("opacity",.7*e.attr("_opacity")))},AM=t=>{const e=t.target,{markType:n}=e;"line"===n&&e.attr("lineWidth",e.attr("_lineWidth")),"interval"===n&&e.attr("opacity",e.attr("_opacity"))},MM=(t,e,n)=>{t.forEach((t,r)=>{t.attr("stroke",e[1]===r?n.activeStroke:n.stroke)})},_M=(t,e,n,r)=>{const o=new l.wA({style:n}),i=new l.EY({style:r});return e.appendChild(i),t.appendChild(o),[o,i]},SM=(t,e)=>{if(!k(t,["options","range","indexOf"]))return;const n=t.options.range.indexOf(e);return t.sortedDomain[n]},EM=(t,e,n)=>{const r=Gl(t,e),o=Gl(t,n)/r;return[t[0]+(e[0]-t[0])*o,t[1]+(e[1]-t[1])*o]};function PM(t={}){const{selection:e=[],precision:n=2}=t,r=OM(t,["selection","precision"]),o=Object.assign(Object.assign({},wM),r||{}),i=xt(o,"path"),a=xt(o,"label"),s=xt(o,"point");return(t,r,o)=>{const{update:c,setState:u,container:f,view:d,options:{marks:p,coordinate:h}}=t,g=Ml(f);let m,y=Kl(g),b=e;const{transform:v=[],type:x}=h,O=!!PA(v,({type:t})=>"transpose"===t),w="polar"===x,j="theta"===x,A=!!PA(y,({markType:t})=>"area"===t);A&&(y=y.filter(({markType:t})=>"area"===t));const M=new l.YJ({style:{zIndex:2}});g.appendChild(M);const _=()=>{o.emit("element-point:select",{nativeEvent:!0,data:{selection:b}})},S=t=>{const e=t.target;b=[e.parentNode.childNodes.indexOf(e)],_(),P(e)},E=t=>{const{data:{selection:e},nativeEvent:n}=t;if(n)return;b=e;const r=k(y,[null==b?void 0:b[0]]);r&&P(r)},P=t=>{const{attributes:e,markType:r,__data__:h}=t,{stroke:g}=e,{points:y,seriesTitle:v,color:x,title:S,seriesX:E,y1:L}=h;if(O&&"interval"!==r)return;const{scale:C,coordinate:z}=(null==m?void 0:m.view)||d,{color:T,y:B,x:I}=C,R=z.getCenter();let F;M.removeChildren();const D=(t,e,n,r)=>xM(this,void 0,void 0,function*(){return u("elementPointMove",i=>{var a;const s=((null===(a=null==m?void 0:m.options)||void 0===a?void 0:a.marks)||p).map(i=>{if(!r.includes(i.type))return i;const{data:a,encode:s}=i,c=Object.keys(s).reduce((r,o)=>{const i=s[o];return"x"===o&&(r[i]=t),"y"===o&&(r[i]=e),"color"===o&&(r[i]=n),r},{}),l=((t,e,n)=>e.map(e=>{const r=["x","color"].reduce((r,o)=>{const i=n[o];return i?e[i]===t[i]&&r:r},!0);return r?Object.assign(Object.assign({},e),t):e}))(c,a,s);return((t,e)=>{o.emit("element-point:moved",{nativeEvent:!0,data:{changeData:t,data:e}})})(c,l),(0,N.A)({},i,{data:l,animate:!1})});return Object.assign(Object.assign({},i),{marks:s})}),yield c("elementPointMove")});if(["line","area"].includes(r))y.forEach((e,r)=>{const o=I.invert(E[r]);if(!o)return;const c=new l.jl({name:jM,style:Object.assign({cx:e[0],cy:e[1],fill:g},s)}),u=((t,e)=>{const n=k(t,["__data__","seriesItems",e,"0","value"]),r=k(t,["__data__","seriesIndex",e]),{__data__:{data:o,encode:i,transform:a}}=t.parentNode,s=PA(a,({type:t})=>"normalizeY"===t),c=k(i,["y","field"]),l=o[r][c];return t=>s?1===n?t:t/(1-t)/(n/(1-n))*l:t})(t,r);c.addEventListener("mousedown",l=>{const d=z.output([E[r],0]),p=null==v?void 0:v.length;f.attr("cursor","move"),b[1]!==r&&(b[1]=r,_()),MM(M.childNodes,b,s);const[h,g]=_M(M,c,i,a),O=t=>{const o=e[1]+t.clientY-F[1];if(A)if(w){const i=e[0]+t.clientX-F[0],[a,s]=EM(R,d,[i,o]),[,l]=z.output([1,B.output(0)]),[,f]=z.invert([a,l-(y[r+p][1]-s)]),m=(r+1)%p,b=Vl([y[(r-1+p)%p],[a,s],v[m]&&y[m]]);g.attr("text",u(B.invert(f)).toFixed(n)),h.attr("d",b),c.attr("cx",a),c.attr("cy",s)}else{const[,t]=z.output([1,B.output(0)]),[,i]=z.invert([e[0],t-(y[r+p][1]-o)]),a=Vl([y[r-1],[e[0],o],v[r+1]&&y[r+1]]);g.attr("text",u(B.invert(i)).toFixed(n)),h.attr("d",a),c.attr("cy",o)}else{const[,t]=z.invert([e[0],o]),i=Vl([y[r-1],[e[0],o],y[r+1]]);g.attr("text",B.invert(t).toFixed(n)),h.attr("d",i),c.attr("cy",o)}};F=[l.clientX,l.clientY],window.addEventListener("mousemove",O);const j=()=>xM(this,void 0,void 0,function*(){if(f.attr("cursor","default"),window.removeEventListener("mousemove",O),f.removeEventListener("mouseup",j),(0,ei.A)(g.attr("text")))return;const e=Number(g.attr("text")),n=SM(T,x);m=yield D(o,e,n,["line","area"]),g.remove(),h.remove(),P(t)});f.addEventListener("mouseup",j)}),M.appendChild(c)}),MM(M.childNodes,b,s);else if("interval"===r){let e=[(y[0][0]+y[1][0])/2,y[0][1]];O?e=[y[0][0],(y[0][1]+y[1][1])/2]:j&&(e=y[0]);const o=(t=>{const e=k(t,["__data__","y"]),n=k(t,["__data__","y1"])-e,{__data__:{data:r,encode:o,transform:i},childNodes:a}=t.parentNode,s=PA(i,({type:t})=>"normalizeY"===t),c=k(o,["y","field"]),l=r[a.indexOf(t)][c];return(t,e=!1)=>s||e?t/(1-t)/(n/(1-n))*l:t})(t),c=new l.jl({name:jM,style:Object.assign(Object.assign({cx:e[0],cy:e[1],fill:g},s),{stroke:s.activeStroke})});c.addEventListener("mousedown",s=>{f.attr("cursor","move");const l=SM(T,x),[u,d]=_M(M,c,i,a),p=t=>{if(O){const r=e[0]+t.clientX-F[0],[i]=z.output([B.output(0),B.output(0)]),[,a]=z.invert([i+(r-y[2][0]),e[1]]),s=Vl([[r,y[0][1]],[r,y[1][1]],y[2],y[3]],!0);d.attr("text",o(B.invert(a)).toFixed(n)),u.attr("d",s),c.attr("cx",r)}else if(j){const r=e[1]+t.clientY-F[1],i=e[0]+t.clientX-F[0],[a,s]=EM(R,[i,r],e),[l,f]=EM(R,[i,r],y[1]),p=z.invert([a,s])[1],h=L-p;if(h<0)return;const g=function(t,e,n=0){const r=[["M",...e[1]]],o=Gl(t,e[1]),i=Gl(t,e[0]);return 0===o?r.push(["L",...e[3]],["A",i,i,0,n,1,...e[0]],["Z"]):r.push(["A",o,o,0,n,0,...e[2]],["L",...e[3]],["A",i,i,0,n,1,...e[0]],["Z"]),r}(R,[[a,s],[l,f],y[2],y[3]],h>.5?1:0);d.attr("text",o(h,!0).toFixed(n)),u.attr("d",g),c.attr("cx",a),c.attr("cy",s)}else{const r=e[1]+t.clientY-F[1],[,i]=z.output([1,B.output(0)]),[,a]=z.invert([e[0],i-(y[2][1]-r)]),s=Vl([[y[0][0],r],[y[1][0],r],y[2],y[3]],!0);d.attr("text",o(B.invert(a)).toFixed(n)),u.attr("d",s),c.attr("cy",r)}};F=[s.clientX,s.clientY],window.addEventListener("mousemove",p);const h=()=>xM(this,void 0,void 0,function*(){if(f.attr("cursor","default"),f.removeEventListener("mouseup",h),window.removeEventListener("mousemove",p),(0,ei.A)(d.attr("text")))return;const e=Number(d.attr("text"));m=yield D(S,e,l,[r]),d.remove(),u.remove(),P(t)});f.addEventListener("mouseup",h)}),M.appendChild(c)}};y.forEach((t,e)=>{b[0]===e&&P(t),t.addEventListener("click",S),t.addEventListener("mouseenter",kM),t.addEventListener("mouseleave",AM)});const L=t=>{const e=null==t?void 0:t.target;e&&(e.name===jM||y.includes(e))||(b=[],_(),M.removeChildren())};return o.on("element-point:select",E),o.on("element-point:unselect",L),f.addEventListener("mousedown",L),()=>{M.remove(),o.off("element-point:select",E),o.off("element-point:unselect",L),f.removeEventListener("mousedown",L),y.forEach(t=>{t.removeEventListener("click",S),t.removeEventListener("mouseenter",kM),t.removeEventListener("mouseleave",AM)})}}}var LM=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const CM=()=>t=>{const{children:e}=t;if(!Array.isArray(e))return[];const{x:n=0,y:r=0,width:o,height:i,data:a}=t;return e.map(t=>{var{data:e,x:s,y:c,width:l,height:u}=t,f=LM(t,["data","x","y","width","height"]);return Object.assign(Object.assign({},f),{data:qs(e,a),x:null!=s?s:n,y:null!=c?c:r,width:null!=l?l:o,height:null!=u?u:i})})};CM.props={};var zM=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const TM=()=>t=>{const{children:e}=t;if(!Array.isArray(e))return[];const{direction:n="row",ratio:r=e.map(()=>1),padding:o=0,data:i}=t,[a,s,c,l]="col"===n?["y","height","width","x"]:["x","width","height","y"],u=r.reduce((t,e)=>t+e),f=t[s]-o*(e.length-1),d=r.map(t=>f*(t/u)),p=[];let h=t[a]||0;for(let n=0;n<d.length;n+=1){const r=e[n],{data:u}=r,f=zM(r,["data"]),g=qs(u,i);p.push(Object.assign({[a]:h,[s]:d[n],[l]:t[l]||0,[c]:t[c],data:g},f)),h+=d[n]+o}return p};TM.props={};class BM{constructor(t){this.$value=t}static of(t){return new BM(t)}call(t,...e){return this.$value=t(this.$value,...e),this}value(){return this.$value}}var IM=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const NM=Ws(t=>{const{encode:e,data:n,scale:r,shareSize:o=!1}=t,{x:i,y:a}=e,s=(t,e)=>{var i;if(void 0===t||!o)return{};const a=C(n,e=>e[t]),s=(null===(i=null==r?void 0:r[e])||void 0===i?void 0:i.domain)||Array.from(a.keys()),c=s.map(t=>a.has(t)?a.get(t).length:1);return{domain:s,flex:c}};return{scale:{x:Object.assign(Object.assign({paddingOuter:0,paddingInner:.1,guide:void 0===i?null:{position:"top"}},void 0===i&&{paddingInner:0}),s(i,"x")),y:Object.assign(Object.assign({range:[0,1],paddingOuter:0,paddingInner:.1,guide:void 0===a?null:{position:"right"}},void 0===a&&{paddingInner:0}),s(a,"y"))}}}),RM=Hs(t=>{const{data:e,scale:n,legend:r}=t,o=[t];let i,a,s;for(;o.length;){const t=o.shift(),{children:e,encode:n={},scale:r={},legend:c={}}=t,{color:l}=n,{color:u}=r,{color:f}=c;void 0!==l&&(i=l),void 0!==u&&(a=u),void 0!==f&&(s=f),Array.isArray(e)&&o.push(...e)}const c="string"==typeof i?i:"",[l,u]=(()=>{var t;const r=null===(t=null==n?void 0:n.color)||void 0===t?void 0:t.domain;if(void 0!==r)return[r];if(void 0===i)return[void 0];const o="function"==typeof i?i:t=>t[i],a=e.map(o);return a.some(t=>"number"==typeof t)?[pi(a)]:[Array.from(new Set(a)),"ordinal"]})();return Object.assign({encode:{color:{type:"column",value:null!=l?l:[]}},scale:{color:(0,N.A)({},a,{domain:l,type:u})}},void 0===r&&{legend:{color:(0,N.A)({title:c},s)}})}),FM=Ws(()=>({animate:{enterType:"fadeIn"}})),DM=Hs(()=>({frame:!1,encode:{shape:"hollow"},style:{lineWidth:0}})),$M=Hs(()=>({type:"cell"})),WM=Hs(t=>{const{data:e}=t,n={type:"custom",callback:()=>{const{data:e,encode:n}=t,{x:r,y:o}=n,i=r?Array.from(new Set(e.map(t=>t[r]))):[],a=o?Array.from(new Set(e.map(t=>t[o]))):[];return(()=>{if(i.length&&a.length){const t=[];for(const e of i)for(const n of a)t.push({[r]:e,[o]:n});return t}return i.length?i.map(t=>({[r]:t})):a.length?a.map(t=>({[o]:t})):void 0})()}};return{data:{type:"inline",value:e,transform:[n]}}}),HM=Hs((t,e=qM,n=XM,r=GM,o={})=>{const{data:i,encode:a,children:s,scale:c,x:l=0,y:u=0,shareData:f=!1,key:d}=t,{value:p}=i,{x:h,y:g}=a,{color:m}=c,{domain:y}=m;return{children:(t,i,a)=>{const{x:c,y:m}=i,{paddingLeft:b,paddingTop:v,marginLeft:x,marginTop:O}=a,{domain:w}=c.getOptions(),{domain:j}=m.getOptions(),k=Be(t),A=t.map(e),M=t.map(({x:t,y:e})=>[c.invert(t),m.invert(e)]),_=M.map(([t,e])=>n=>{const{[h]:r,[g]:o}=n;return(void 0===h||r===t)&&(void 0===g||o===e)}),S=_.map(t=>p.filter(t)),E=f?Ye(S,t=>t.length):void 0,P=M.map(([t,e])=>({columnField:h,columnIndex:w.indexOf(t),columnValue:t,columnValuesLength:w.length,rowField:g,rowIndex:j.indexOf(e),rowValue:e,rowValuesLength:j.length})),L=P.map(t=>Array.isArray(s)?s:[s(t)].flat(1));return k.flatMap(t=>{const[e,i,a,s]=A[t],c=P[t],f=S[t];return L[t].map(m=>{var w,j,{scale:k,key:A,facet:M=!0,axis:_={},legend:S={}}=m,P=IM(m,["scale","key","facet","axis","legend"]);const L=(null===(w=null==k?void 0:k.y)||void 0===w?void 0:w.guide)||_.y,C=(null===(j=null==k?void 0:k.x)||void 0===j?void 0:j.guide)||_.x,z={x:{tickCount:h?5:void 0},y:{tickCount:g?5:void 0}},T=M?f:0===f.length?[]:p,B={color:{domain:y}},I={x:VM(C,n)(c,T),y:VM(L,r)(c,T)};return Object.assign(Object.assign({key:`${A}-${t}`,data:T,margin:0,x:e+b+l+x,y:i+v+u+O,parentKey:d,width:a,height:s,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,frame:!!T.length,dataDomain:E,scale:(0,N.A)(z,k,B),axis:(0,N.A)({},_,I),legend:!1},P),o)})})}}});function qM(t){const{points:e}=t;return Qs(e)}function YM(t,e){return(0,N.A)(e.length?{title:!1,tick:null,label:null}:{title:!1,tick:null,label:null,grid:null},t)}function XM(t){return(e,n)=>{const{rowIndex:r,rowValuesLength:o,columnIndex:i,columnValuesLength:a}=e;if(r!==o-1)return YM(t,n);return(0,N.A)({title:i===a-1&&void 0,grid:n.length?void 0:null},t)}}function GM(t){return(e,n)=>{const{rowIndex:r,columnIndex:o}=e;if(0!==o)return YM(t,n);return(0,N.A)({title:0===r&&void 0,grid:n.length?void 0:null},t)}}function VM(t,e){return"function"==typeof t?t:null===t||!1===t?()=>null:e(t)}const KM=()=>t=>[BM.of(t).call($M).call(RM).call(FM).call(NM).call(DM).call(WM).call(HM).value()];KM.props={};var UM=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const ZM=Ws(t=>({scale:{x:{guide:null,paddingOuter:0,paddingInner:.1},y:{guide:null,range:[0,1],paddingOuter:0,paddingInner:.1}}})),JM=Hs(t=>{const{data:e,children:n,x:r=0,y:o=0,key:i}=t;return{children:(t,a,s)=>{const{x:c,y:l}=a,{paddingLeft:u,paddingTop:f,marginLeft:d,marginTop:p}=s,{domain:h}=c.getOptions(),{domain:g}=l.getOptions(),m=Be(t),y=t.map(({points:t})=>Qs(t)),b=t.map(({x:t,y:e})=>[c.invert(t),l.invert(e)]),v=b.map(([t,e])=>({columnField:t,columnIndex:h.indexOf(t),columnValue:t,columnValuesLength:h.length,rowField:e,rowIndex:g.indexOf(e),rowValue:e,rowValuesLength:g.length})),x=v.map(t=>Array.isArray(n)?n:[n(t)].flat(1));return m.flatMap(t=>{const[n,a,s,c]=y[t],[l,h]=b[t],g=v[t];return x[t].map(m=>{var y,b;const{scale:v,key:x,encode:O,axis:w,interaction:j}=m,k=UM(m,["scale","key","encode","axis","interaction"]),A=null===(y=null==v?void 0:v.y)||void 0===y?void 0:y.guide,M={x:t_(null===(b=null==v?void 0:v.x)||void 0===b?void 0:b.guide)(g,e),y:e_(A)(g,e)};return Object.assign({data:e,parentKey:i,key:`${x}-${t}`,x:n+u+r+d,y:a+f+o+p,width:s,height:c,margin:0,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,frame:!0,scale:(0,N.A)({x:{facet:!1},y:{facet:!1}},v),axis:(0,N.A)({x:{tickCount:5},y:{tickCount:5}},w,M),legend:!1,encode:(0,N.A)({},O,{x:l,y:h}),interaction:(0,N.A)({},j,{legendFilter:!1})},k)})})}}}),QM=Hs(t=>{const{encode:e}=t,n=UM(t,["encode"]),{position:r=[],x:o=r,y:i=[...r].reverse()}=e,a=UM(e,["position","x","y"]),s=[];for(const t of[o].flat(1))for(const e of[i].flat(1))s.push({$x:t,$y:e});return Object.assign(Object.assign({},n),{data:s,encode:Object.assign(Object.assign({},a),{x:"$x",y:"$y"}),scale:Object.assign(Object.assign({},1===[o].flat(1).length&&{x:{paddingInner:0}}),1===[i].flat(1).length&&{y:{paddingInner:0}})})});function t_(t){return"function"==typeof t?t:null===t?()=>null:(e,n)=>{const{rowIndex:r,rowValuesLength:o}=e;if(r!==o-1)return YM(t,n)}}function e_(t){return"function"==typeof t?t:null===t?()=>null:(e,n)=>{const{columnIndex:r}=e;if(0!==r)return YM(t,n)}}const n_=()=>t=>[BM.of(t).call($M).call(RM).call(JM).call(QM).call(FM).call(DM).call(ZM).value()];var r_=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const o_=Ws(t=>({scale:{x:{guide:{type:"axisArc"},paddingOuter:0,paddingInner:.1},y:{guide:null,range:[0,1],paddingOuter:0,paddingInner:.1}}})),i_=Ws(t=>({coordinate:{type:"polar"}})),a_=t=>{const{encode:e}=t,n=r_(t,["encode"]),{position:r}=e;return Object.assign(Object.assign({},n),{encode:{x:r}})};function s_(t){return t=>null}function c_(t){const{points:e}=t,[n,r,o,i]=e,a=Ks(n,i),s=Gs(n,i),c=Js(s,Gs(r,o)),l=1/Math.sin(c/2),u=a/(1+l),f=u*Math.sqrt(2),[d,p]=o,h=Zs(s)+c/2,g=u*l;return[d+g*Math.sin(h)-f/2,p-g*Math.cos(h)-f/2,f,f]}const l_=()=>t=>[BM.of(t).call($M).call(a_).call(RM).call(i_).call(WM).call(HM,c_,s_,s_,{frame:!1}).call(FM).call(DM).call(o_).value()];function u_(t,e,n){const r=[0,n],o=[1-n,1];return"normal"===t?r:"reverse"===t?o:"alternate"===t?e%2==0?r:o:"reverse-alternate"===t?e%2==0?o:r:void 0}const f_=()=>t=>{const{children:e=[],duration:n=1e3,iterationCount:r=1,direction:o="normal",easing:i="ease-in-out-sine"}=t,a=e.length;if(!Array.isArray(e)||0===a)return[];const{key:s}=e[0],c=e.map(t=>Object.assign(Object.assign({},t),{key:s})).map(t=>function(t,e,n){const r=[t];for(;r.length;){const t=r.pop();t.animate=(0,N.A)({enter:{duration:e},update:{duration:e,easing:n,type:"morphing",fill:"both"},exit:{type:"fadeOut",duration:e}},t.animate||{});const{children:o}=t;Array.isArray(o)&&r.push(...o)}return t}(t,n,i));return function*(){let t,e=0;for(;"infinite"===r||e<r;){const[n,r]=u_(o,e,a);for(let e=n;e<r;e+=1){const n=Math.abs(e);t!==n&&(yield c[n]),t=n}e++}}};function d_(t,e,n){const{encode:r}=n;if(null===t)return[e];const o=function(t){return Array.isArray(t)?t:[t]}(t).map(t=>{var e;return[t,null===(e=Wg(r,t))||void 0===e?void 0:e[0]]}).filter(([,t])=>bt(t));return Array.from(C(e,t=>o.map(([,e])=>e[t]).join("-")).values())}function p_(t){return Array.isArray(t)?function(t){return(e,n,r)=>(n,r)=>t.reduce((t,o)=>0!==t?t:(0,Ec.A)(e[n][o],e[r][o]),0)}(t):"function"==typeof t?function(t){return(e,n,r)=>x_(n=>t(e[n]))}(t):"series"===t?m_:"value"===t?y_:"sum"===t?b_:"maxIndex"===t?v_:null}function h_(t,e){for(const n of t)n.sort(e)}function g_(t,e){return(null==e?void 0:e.domain)||Array.from(new Set(t))}function m_(t,e,n){return x_(t=>n[t])}function y_(t,e,n){return x_(t=>e[t])}function b_(t,e,n){const r=Be(t),o=Array.from(C(r,t=>n[+t]).entries()),i=new Map(o.map(([t,n])=>[t,n.reduce((t,n)=>t+ +e[n])]));return x_(t=>i.get(n[t]))}function v_(t,e,n){const r=Be(t),o=Array.from(C(r,t=>n[+t]).entries()),i=new Map(o.map(([t,n])=>[t,gc(n,t=>e[t])]));return x_(t=>i.get(n[t]))}function x_(t){return(e,n)=>(0,Ec.A)(t(e),t(n))}f_.props={};const O_=(t={})=>{const{groupBy:e="x",orderBy:n=null,reverse:r=!1,y:o="y",y1:i="y1",series:a=!0}=t;return(t,s)=>{var c;const{data:l,encode:u,style:f={}}=s,[d,p]=Wg(u,"y"),[h,g]=Wg(u,"y1"),[m]=a?Hg(u,"series","color"):Wg(u,"color"),y=d_(e,t,s),b=(null!==(c=p_(n))&&void 0!==c?c:()=>null)(l,d,m);b&&h_(y,b);const v=new Array(t.length),x=new Array(t.length),O=new Array(t.length),w=[],j=[];for(const t of y){r&&t.reverse();const e=h?+h[t[0]]:0,n=[],o=[];for(const r of t){const t=O[r]=+d[r]-e;t<0?o.push(r):t>=0&&n.push(r)}const i=n.length>0?n:o,a=o.length>0?o:n;let s=n.length-1,c=0;for(;s>0&&0===d[i[s]];)s--;for(;c<a.length-1&&0===d[a[c]];)c++;w.push(i[s]),j.push(a[c]);let l=e;for(const t of o.reverse()){const e=O[t];l=v[t]=(x[t]=l)+e}let u=e;for(const t of n){const e=O[t];e>0?u=v[t]=(x[t]=u)+e:v[t]=x[t]=u}}const k=new Set(w),A=new Set(j),M="y"===o?v:x,_="y"===i?v:x;let S;return S="point"===s.type?{y0:Rg(d,p),y:Ng(M,p)}:{y0:Rg(d,p),y:Ng(M,p),y1:Ng(_,g)},[t,(0,N.A)({},s,{encode:Object.assign({},S),style:Object.assign({first:(t,e)=>k.has(e),last:(t,e)=>A.has(e)},f)})]}};function w_(t,e){let n=0;if(void 0===e)for(let e of t)null!=e&&(e=+e)>=e&&++n;else{let r=-1;for(let o of t)null!=(o=e(o,++r,t))&&(o=+o)>=o&&++n}return n}function j_(t,e){const n=function(t,e){let n,r=0,o=0,i=0;if(void 0===e)for(let e of t)null!=e&&(e=+e)>=e&&(n=e-o,o+=n/++r,i+=n*(e-o));else{let a=-1;for(let s of t)null!=(s=e(s,++a,t))&&(s=+s)>=s&&(n=s-o,o+=n/++r,i+=n*(s-o))}if(r>1)return i/(r-1)}(t,e);return n?Math.sqrt(n):n}O_.props={};var k_=Array.prototype,A_=k_.slice;function M_(t){return()=>t}var __=n("./node_modules/.pnpm/d3-array@3.2.4/node_modules/d3-array/src/ticks.js");function S_(t){return Math.max(1,Math.ceil(Math.log(w_(t))/Math.LN2)+1)}function E_(){var t=L,e=pi,n=S_;function r(r){Array.isArray(r)||(r=Array.from(r));var o,i,a,s=r.length,c=new Array(s);for(o=0;o<s;++o)c[o]=t(r[o],o,r);var l=e(c),u=l[0],f=l[1],d=n(c,u,f);if(!Array.isArray(d)){const t=f,n=+d;if(e===pi&&([u,f]=function(t,e,n){let r;for(;;){const o=(0,__.lq)(t,e,n);if(o===r||0===o||!isFinite(o))return[t,e];o>0?(t=Math.floor(t/o)*o,e=Math.ceil(e/o)*o):o<0&&(t=Math.ceil(t*o)/o,e=Math.floor(e*o)/o),r=o}}(u,f,n)),(d=(0,__.Ay)(u,f,n))[0]<=u&&(a=(0,__.lq)(u,f,n)),d[d.length-1]>=f)if(t>=f&&e===pi){const t=(0,__.lq)(u,f,n);isFinite(t)&&(t>0?f=(Math.floor(f/t)+1)*t:t<0&&(f=(Math.ceil(f*-t)+1)/-t))}else d.pop()}for(var p=d.length,h=0,g=p;d[h]<=u;)++h;for(;d[g-1]>f;)--g;(h||g<p)&&(d=d.slice(h,g),p=g-h);var m,y=new Array(p+1);for(o=0;o<=p;++o)(m=y[o]=[]).x0=o>0?d[o-1]:u,m.x1=o<p?d[o]:f;if(isFinite(a)){if(a>0)for(o=0;o<s;++o)null!=(i=c[o])&&u<=i&&i<=f&&y[Math.min(p,Math.floor((i-u)/a))].push(r[o]);else if(a<0)for(o=0;o<s;++o)if(null!=(i=c[o])&&u<=i&&i<=f){const t=Math.floor((u-i)*a);y[Math.min(p,t+(d[t]<=i))].push(r[o])}}else for(o=0;o<s;++o)null!=(i=c[o])&&u<=i&&i<=f&&y[(0,il.Ay)(d,i,0,p)].push(r[o]);return y}return r.value=function(e){return arguments.length?(t="function"==typeof e?e:M_(e),r):t},r.domain=function(t){return arguments.length?(e="function"==typeof t?t:M_([t[0],t[1]]),r):e},r.thresholds=function(t){return arguments.length?(n="function"==typeof t?t:M_(Array.isArray(t)?A_.call(t):t),r):n},r}function P_(t,e,n=0,r=1/0,o){if(e=Math.floor(e),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(t.length-1,r)),!(n<=e&&e<=r))return t;for(o=void 0===o?Cc:Lc(o);r>n;){if(r-n>600){const i=r-n+1,a=e-n+1,s=Math.log(i),c=.5*Math.exp(2*s/3),l=.5*Math.sqrt(s*c*(i-c)/i)*(a-i/2<0?-1:1);P_(t,e,Math.max(n,Math.floor(e-a*c/i+l)),Math.min(r,Math.floor(e+(i-a)*c/i+l)),o)}const i=t[e];let a=n,s=r;for(L_(t,n,e),o(t[r],i)>0&&L_(t,n,r);a<s;){for(L_(t,a,s),++a,--s;o(t[a],i)<0;)++a;for(;o(t[s],i)>0;)--s}0===o(t[n],i)?L_(t,n,s):(++s,L_(t,s,r)),s<=e&&(n=s+1),e<=s&&(r=s-1)}return t}function L_(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}var C_=n("./node_modules/.pnpm/d3-array@3.2.4/node_modules/d3-array/src/number.js");function z_(t,e,n){if((r=(t=Float64Array.from((0,C_.n)(t,n))).length)&&!isNaN(e=+e)){if(e<=0||r<2)return ep(t);if(e>=1)return Ye(t);var r,o=(r-1)*e,i=Math.floor(o),a=Ye(P_(t,i).subarray(0,i+1));return a+(ep(t.subarray(i+1))-a)*(o-i)}}function T_(t,e,n=C_.A){if(!isNaN(e=+e)){if(r=Float64Array.from(t,(e,r)=>(0,C_.A)(n(t[r],r,t))),e<=0)return ph(r);if(e>=1)return gc(r);var r,o=Uint32Array.from(t,(t,e)=>e),i=r.length-1,a=Math.floor(i*e);return P_(o,a,0,i,(t,e)=>Cc(r[t],r[e])),a=function(t,e=Ec.A){let n,r=!1;if(1===e.length){let o;for(const i of t){const t=e(i);(r?(0,Ec.A)(t,o)>0:0===(0,Ec.A)(t,t))&&(n=i,o=t,r=!0)}}else for(const o of t)(r?e(o,n)>0:0===e(o,o))&&(n=o,r=!0);return n}(o.subarray(0,a+1),t=>r[t]),a>=0?a:-1}}function B_(t,e){return z_(t,.5,e)}function I_(t,e){return T_(t,.5,e)}var N_=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};function R_(t){return e=>null===e?t:`${t} of ${e}`}function F_(){return[(t,e)=>hh(t,t=>+e[t]),R_("mean")]}function D_(){return[(t,e)=>B_(t,t=>+e[t]),R_("median")]}function $_(){return[(t,e)=>Ye(t,t=>+e[t]),R_("max")]}function W_(){return[(t,e)=>ep(t,t=>+e[t]),R_("min")]}function H_(){return[(t,e)=>t.length,R_("count")]}function q_(){return[(t,e)=>qe(t,t=>+e[t]),R_("sum")]}function Y_(){return[(t,e)=>e[t[0]],R_("first")]}function X_(){return[(t,e)=>e[t[t.length-1]],R_("last")]}const G_=(t={})=>{const{groupBy:e}=t,n=N_(t,["groupBy"]);return(t,r)=>{const{data:o,encode:i}=r,a=e(t,r);if(!a)return[t,r];const s=Object.entries(n).map(([t,e])=>{const[n,r]=function(t){if("function"==typeof t)return[t,null];const e={mean:F_,max:$_,count:H_,first:Y_,last:X_,sum:q_,min:W_,median:D_}[t];if(!e)throw new Error(`Unknown reducer: ${t}.`);return e()}(e),[s,c]=Wg(i,t),l=((t,e)=>{if(t)return t;const{from:n}=e;if(!n)return t;const[,r]=Wg(i,n);return r})(c,e),u=a.map(t=>n(t,null!=s?s:o));return[t,Object.assign(Object.assign({},Dg(u,(null==r?void 0:r(l))||l)),{aggregate:!0})]}),c=Object.keys(i).map(t=>{const[e,n]=Wg(i,t),r=a.map(t=>e[t[0]]);return[t,Ng(r,n)]}),l=a.map(t=>o[t[0]]);return[Be(a),(0,N.A)({},r,{data:l,encode:Object.fromEntries([...c,...s])})]}};G_.props={};var V_=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const K_="thresholds";function U_(t){const[e,n]=pi(t);return Math.min(200,function(t,e,n){const r=w_(t),o=j_(t);return r&&o?Math.ceil((n-e)*Math.cbrt(r)/(3.49*o)):1}(t,e,n))}const Z_=(t={})=>{const{groupChannels:e=["color"],binChannels:n=["x","y"]}=t,r=V_(t,["groupChannels","binChannels"]),o={};return G_(Object.assign(Object.assign(Object.assign({},Object.fromEntries(Object.entries(r).filter(([t])=>!t.startsWith(K_)))),Object.fromEntries(n.flatMap(t=>{const e=([e])=>+o[t].get(e).split(",")[1];return e.from=t,[[t,([e])=>+o[t].get(e).split(",")[0]],[`${t}1`,e]]}))),{groupBy:(t,i)=>{const{encode:a}=i,s=n.map(t=>{const[e]=Wg(a,t);return e}),c=xt(r,K_),l=t.filter(t=>s.every(e=>bt(e[t]))),u=[...e.map(t=>{const[e]=Wg(a,t);return e}).filter(bt).map(t=>e=>t[e]),...n.map((t,e)=>{const n=s[e],r=c[t]||U_(n),i=E_().thresholds(r).value(t=>+n[t])(l),a=new Map(i.flatMap(t=>{const{x0:e,x1:n}=t,r=`${e},${n}`;return t.map(t=>[t,r])}));return o[t]=a,t=>a.get(t)})];return Array.from(C(l,t=>u.map(e=>e(t)).join("-")).values())}}))};Z_.props={};const J_=(t={})=>{const{thresholds:e}=t;return Z_(Object.assign(Object.assign({},t),{thresholdsX:e,groupChannels:["color"],binChannels:["x"]}))};J_.props={};var Q_=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const tS=(t={})=>{const{groupBy:e="x",reverse:n=!1,orderBy:r,padding:o}=t;Q_(t,["groupBy","reverse","orderBy","padding"]);return(t,i)=>{const{data:a,encode:s,scale:c}=i,{series:l}=c,[u]=Wg(s,"y"),[f]=Hg(s,"series","color"),d=g_(f,l),p=(0,N.A)({},i,{scale:{series:{domain:d,paddingInner:o}}}),h=d_(e,t,i),g=p_(r);if(!g)return[t,(0,N.A)(p,{encode:{series:Ng(f)}})];const m=g(a,u,f);m&&h_(h,m);const y=new Array(t.length);for(const t of h){n&&t.reverse();for(let e=0;e<t.length;e++)y[t[e]]=d[e]}return[t,(0,N.A)(p,{encode:{series:Ng(r?y:f)}})]}};function eS(t,e,n){if(null===t)return[-.5,.5];const r=g_(t,e),o=new Q({domain:r,range:[0,1],padding:n}).getBandWidth();return[-o/2,o/2]}function nS(t,e,n){return e*(1-t)+n*t}tS.props={};const rS=(t={})=>{const{padding:e=0,paddingX:n=e,paddingY:r=e,random:o=Math.random}=t;return(t,e)=>{const{encode:i,scale:a}=e,{x:s,y:c}=a,[l]=Wg(i,"x"),[u]=Wg(i,"y"),f=eS(l,s,n),d=eS(u,c,r),p=t.map(()=>nS(o(),...d)),h=t.map(()=>nS(o(),...f));return[t,(0,N.A)({scale:{x:{padding:.5},y:{padding:.5}}},e,{encode:{dy:Ng(p),dx:Ng(h)}})]}};rS.props={};const oS=(t={})=>{const{padding:e=0,random:n=Math.random}=t;return(t,r)=>{const{encode:o,scale:i}=r,{x:a}=i,[s]=Wg(o,"x"),c=eS(s,a,e),l=t.map(()=>nS(n(),...c));return[t,(0,N.A)({scale:{x:{padding:.5}}},r,{encode:{dx:Ng(l)}})]}};oS.props={};const iS=(t={})=>{const{padding:e=0,random:n=Math.random}=t;return(t,r)=>{const{encode:o,scale:i}=r,{y:a}=i,[s]=Wg(o,"y"),c=eS(s,a,e),l=t.map(()=>nS(n(),...c));return[t,(0,N.A)({scale:{y:{padding:.5}}},r,{encode:{dy:Ng(l)}})]}};iS.props={};var aS=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const sS=(t={})=>{const{groupBy:e="x"}=t;return(t,n)=>{const{encode:r,style:o={}}=n,i=aS(r,["x"]),a=Object.entries(i).filter(([t])=>t.startsWith("y")).map(([t])=>[t,Wg(r,t)[0]]),s=a.map(([e])=>[e,new Array(t.length)]),c=d_(e,t,n),l=new Array(c.length);for(let t=0;t<c.length;t++){const e=c[t].flatMap(t=>a.map(([,e])=>+e[t])),[n,r]=pi(e);l[t]=(n+r)/2}const u=Math.max(...l);for(let t=0;t<c.length;t++){const e=u-l[t],n=c[t];for(const t of n)for(let n=0;n<a.length;n++){const[,r]=a[n],[,o]=s[n];o[t]=+r[t]+e}}return[t,(0,N.A)({},n,{encode:Object.fromEntries(s.map(([t,e])=>[t,Ng(e,Wg(r,t)[1])])),style:Object.assign({first:(t,e)=>0===e,last:(t,e)=>e===c.length-1},o)})]}};sS.props={};const cS=(t={})=>{const{groupBy:e="x"}=t;return(t,n)=>{const{encode:r}=n,[o]=Wg(r,"y"),[i,a]=Wg(r,"y1"),s=d_(e,t,n),c=new Array(t.length);for(const t of s){const e=t.map(t=>+o[t]);for(let n=0;n<t.length;n++){const r=t[n],i=Math.max(...e.filter((t,e)=>e!==n));c[r]=+o[r]>i?i:o[r]}}return[t,(0,N.A)({},n,{encode:{y1:Ng(c,a)}})]}};cS.props={};const lS=t=>{const{groupBy:e=["x"],reducer:n=(t,e)=>e[t[0]],orderBy:r=null,reverse:o=!1,duration:i}=t;return(t,a)=>{const{encode:s}=a,c=(Array.isArray(e)?e:[e]).map(t=>[t,Wg(s,t)[0]]);if(0===c.length)return[t,a];let l=[t];for(const[,t]of c){const e=[];for(const n of l){const r=Array.from(C(n,e=>t[e]).values());e.push(...r)}l=e}if(r){const[t]=Wg(s,r);t&&l.sort((e,r)=>n(e,t)-n(r,t)),o&&l.reverse()}const u=(i||3e3)/l.length,[f]=i?[$g(t,u)]:Hg(s,"enterDuration",$g(t,u)),[d]=Hg(s,"enterDelay",$g(t,0)),p=new Array(t.length);for(let t=0,e=0;t<l.length;t++){const n=l[t],r=Ye(n,t=>+f[t]);for(const t of n)p[t]=+d[t]+e;e+=r}return[t,(0,N.A)({},a,{encode:{enterDuration:Fg(f),enterDelay:Fg(p)}})]}};lS.props={};var uS=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const fS=(t={})=>{const{groupBy:e="x",basis:n="max"}=t;return(t,r)=>{const{encode:o,tooltip:i}=r,a=uS(o,["x"]),s=Object.entries(a).filter(([t])=>t.startsWith("y")).map(([t])=>[t,Wg(o,t)[0]]),[,c]=s.find(([t])=>"y"===t),l=s.map(([e])=>[e,new Array(t.length)]),u=d_(e,t,r),f=function(t){if("function"==typeof t)return t;const e={min:(t,e)=>ep(t,t=>e[+t]),max:(t,e)=>Ye(t,t=>e[+t]),first:(t,e)=>e[t[0]],last:(t,e)=>e[t[t.length-1]],mean:(t,e)=>hh(t,t=>e[+t]),median:(t,e)=>B_(t,t=>e[+t]),sum:(t,e)=>qe(t,t=>e[+t]),deviation:(t,e)=>j_(t,t=>e[+t])};return e[t]||Ye}(n);for(const t of u){const e=f(t,c);for(const n of t)for(let t=0;t<s.length;t++){const[,r]=s[t],[,o]=l[t];o[n]=+r[n]/e}}const d=At(i)||(null==i?void 0:i.items)&&0!==(null==i?void 0:i.items.length);return[t,(0,N.A)({},r,Object.assign({encode:Object.fromEntries(l.map(([t,e])=>[t,Ng(e,Wg(o,t)[1])]))},!d&&o.y0&&{tooltip:{items:[{channel:"y0"}]}}))]}};function dS(t,e){return[t[0]]}function pS(t,e){return[t[t.length-1]]}function hS(t,e){return[t[gc(t,t=>e[t])]]}function gS(t,e){return[t[ph(t,t=>e[t])]]}fS.props={};const mS=(t={})=>{const{groupBy:e="series",channel:n,selector:r}=t;return(t,o)=>{const{encode:i}=o,a=d_(e,t,o),[s]=Wg(i,n),c=function(t){return"function"==typeof t?t:{first:dS,last:pS,max:hS,min:gS}[t]||dS}(r);return[a.flatMap(t=>c(t,s)),o]}};mS.props={};var yS=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const bS=(t={})=>{const{selector:e}=t,n=yS(t,["selector"]);return mS(Object.assign({channel:"x",selector:e},n))};bS.props={};var vS=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const xS=(t={})=>{const{selector:e}=t,n=vS(t,["selector"]);return mS(Object.assign({channel:"y",selector:e},n))};xS.props={};var OS=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const wS=(t={})=>{const{channels:e=["x","y"]}=t,n=OS(t,["channels"]);return G_(Object.assign(Object.assign({},n),{groupBy:(t,n)=>d_(e,t,n)}))};wS.props={};const jS=(t={})=>wS(Object.assign(Object.assign({},t),{channels:["x","color","series"]}));jS.props={};const kS=(t={})=>wS(Object.assign(Object.assign({},t),{channels:["y","color","series"]}));kS.props={};const AS=(t={})=>wS(Object.assign(Object.assign({},t),{channels:["color"]}));AS.props={};const MS=(t={})=>(e,n)=>{const{reverse:r,slice:o,channel:i,by:a,ordinal:s=!0,reducer:c}=t,{encode:l,scale:u={}}=n,f=u[i].domain,[d]=Wg(l,null!=a?a:i),[p]=Wg(l,i),h=function(t,e,n){const{by:r=t,reducer:o="max"}=e,[i]=Wg(n,r);if("function"==typeof o)return t=>o(t,i);if("max"===o)return t=>Ye(t,t=>+i[t]);if("min"===o)return t=>ep(t,t=>+i[t]);if("sum"===o)return t=>qe(t,t=>+i[t]);if("median"===o)return t=>B_(t,t=>+i[t]);if("mean"===o)return t=>hh(t,t=>+i[t]);if("first"===o)return t=>i[t[0]];if("last"===o)return t=>i[t[t.length-1]];throw new Error(`Unknown reducer: ${o}`)}(i,{by:a,reducer:c},l),g=function(t,e,n){if(!Array.isArray(n))return t;const r=new Set(n);return t.filter(t=>r.has(e[t]))}(e,p,f),m=function(t,e,n){return(2!==e.length?Pc(T(t,e,n),([t,e],[n,r])=>(0,Ec.A)(e,r)||(0,Ec.A)(t,n)):Pc(C(t,n),([t,n],[r,o])=>e(n,o)||(0,Ec.A)(t,r))).map(([t])=>t)}(g,h,t=>p[t]),y=s?e:Pc(e,t=>d[t]);r&&(!s&&y.reverse(),m.reverse());const b=o?m.slice(..."number"==typeof o?[0,o]:o):m;return[y,(0,N.A)(n,{scale:{[i]:{domain:b}}})]};MS.props={};const _S=(t={})=>MS(Object.assign(Object.assign({},t),{channel:"x"}));_S.props={};const SS=(t={})=>MS(Object.assign(Object.assign({},t),{channel:"y"}));SS.props={};const ES=(t={})=>MS(Object.assign(Object.assign({},t),{channel:"color"}));ES.props={};const PS=(t={})=>{const{field:e,channel:n="y",reducer:r="sum"}=t;return(t,o)=>{const{data:i,encode:a}=o,[s]=Wg(a,"x"),c=e?function(t,e){return t.map("string"==typeof e?t=>t[e]:e)}(i,e):Wg(a,n)[0],l=function(t,e){if("function"==typeof t)return n=>t(n,e);if("sum"===t)return t=>qe(t,t=>+e[t]);throw new Error(`Unknown reducer: ${t}`)}(r,c),u=B(t,l,t=>s[t]).map(t=>t[1]);return[t,(0,N.A)({},o,{scale:{x:{flex:u}}})]}};function LS(t){const{padding:e=0,direction:n="col"}=t;return(t,r,o)=>{const i=t.length;if(0===i)return[];const{innerWidth:a,innerHeight:s}=o;let c=Math.ceil(Math.sqrt(r/(s/a))),l=a/c,u=Math.ceil(r/c),f=u*l;for(;f>s;)c+=1,l=a/c,u=Math.ceil(r/c),f=u*l;const d=s-u*l,p=u<=1?0:d/(u-1),[h,g]=u<=1?[(a-i*l)/(i-1),(s-l)/2]:[0,0];return t.map((t,r)=>{const[o,i,a,s]=Qs(t),f="col"===n?r%c:Math.floor(r/u),m="col"===n?Math.floor(r/c):r%u;return`translate(${f*l-o+h*f+.5*e}, ${(u-m-1)*l+d-i-p*m-g+.5*e}) scale(${(l-e)/a}, ${(l-e)/s})`})}}PS.props={};const CS=t=>(e,n)=>[e,(0,N.A)({},n,{modifier:LS(t),axis:!1})];function zS(t,e,n,r){const o=t.length;if(r>=o||0===r)return t;const i=n=>1*e[t[n]],a=e=>1*n[t[e]],s=[],c=(o-2)/(r-2);let l,u,f,d=0;s.push(d);for(let t=0;t<r-2;t++){let e=0,n=0,r=Math.floor((t+1)*c)+1,p=Math.floor((t+2)*c)+1;p=Math.min(p,o);const h=p-r;for(;r<p;r++)e+=i(r),n+=a(r);e/=h,n/=h;let g=Math.floor((t+0)*c)+1;const m=Math.floor((t+1)*c)+1,y=[i(d),a(d)];for(l=u=-1;g<m;g++)u=.5*Math.abs((y[0]-e)*(i(g)-y[1])-(y[0]-a(g))*(n-y[0])),u>l&&(l=u,f=g);s.push(f),d=f}return s.push(o-1),s.map(e=>t[e])}CS.props={};const TS=(t={})=>{const{strategy:e="median",thresholds:n=2e3,groupBy:r=["series","color"]}=t,o=function(t){if("function"==typeof t)return t;if("lttb"===t)return zS;const e={first:t=>[t[0]],last:t=>[t[t.length-1]],min:(t,e,n)=>[t[ph(t,t=>n[t])]],max:(t,e,n)=>[t[gc(t,t=>n[t])]],median:(t,e,n)=>[t[I_(t,t=>n[t])]]},n=e[t]||e.median;return(t,e,r,o)=>{const i=function(t,e){const n=t.length,r=[];let o=0;for(;o<n;)r.push(t.slice(o,o+=e));return r}(t,Math.max(1,Math.floor(t.length/o)));return i.flatMap(t=>n(t,e,r))}}(e);return(t,e)=>{const{encode:i}=e,a=d_(r,t,e),[s]=Wg(i,"x"),[c]=Wg(i,"y");return[a.flatMap(t=>o(t,s,c,n)),e]}};TS.props={};const BS=(t={})=>(e,n)=>{const{encode:r,data:o}=n,i=Object.keys(t).length>0,a=Object.entries(t).map(([t,e])=>{const[n]=Wg(r,t);if(!n)return null;const[o,i=!0]=function(t){return"object"==typeof t?[t.value,t.ordinal]:[t,!0]}(e);if("function"==typeof o)return t=>o(n[t]);if(i){const t=Array.isArray(o)?o:[o];return 0===t.length?null:e=>t.includes(n[e])}{const[t,e]=o;return r=>n[r]>=t&&n[r]<=e}}).filter(bt),s=e.filter(t=>a.every(e=>e(t))),c=s.map((t,e)=>e);if(0===a.length&&i){const t=function(t){var e;const{encode:n}=t,r=Object.assign(Object.assign({},t),{encode:Object.assign(Object.assign({},t.encode),{y:Object.assign(Object.assign({},t.encode.y),{value:[]})})}),o=null===(e=null==n?void 0:n.color)||void 0===e?void 0:e.field;if(!n||!o)return r;let i;for(const[t,e]of Object.entries(n))"x"!==t&&"y"!==t||e.field!==o||(i=Object.assign(Object.assign({},i),{[t]:Object.assign(Object.assign({},e),{value:[]})}));return i?Object.assign(Object.assign({},t),{encode:Object.assign(Object.assign({},t.encode),i)}):r}(n);return[[],t]}const l=Object.entries(r).map(([t,e])=>[t,Object.assign(Object.assign({},e),{value:c.map(t=>e.value[s[t]]).filter(t=>void 0!==t)})]);return[c,(0,N.A)({},n,{encode:Object.fromEntries(l),data:s.map(t=>o[t])})]};BS.props={};var IS={},NS={};function RS(t){return new Function("d","return {"+t.map(function(t,e){return JSON.stringify(t)+": d["+e+'] || ""'}).join(",")+"}")}function FS(t){var e=Object.create(null),n=[];return t.forEach(function(t){for(var r in t)r in e||n.push(e[r]=r)}),n}function DS(t,e){var n=t+"",r=n.length;return r<e?new Array(e-r+1).join(0)+n:n}function $S(t){var e=t.getUTCHours(),n=t.getUTCMinutes(),r=t.getUTCSeconds(),o=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":function(t){return t<0?"-"+DS(-t,6):t>9999?"+"+DS(t,6):DS(t,4)}(t.getUTCFullYear())+"-"+DS(t.getUTCMonth()+1,2)+"-"+DS(t.getUTCDate(),2)+(o?"T"+DS(e,2)+":"+DS(n,2)+":"+DS(r,2)+"."+DS(o,3)+"Z":r?"T"+DS(e,2)+":"+DS(n,2)+":"+DS(r,2)+"Z":n||e?"T"+DS(e,2)+":"+DS(n,2)+"Z":"")}function WS(t){var e=new RegExp('["'+t+"\n\r]"),n=t.charCodeAt(0);function r(t,e){var r,o=[],i=t.length,a=0,s=0,c=i<=0,l=!1;function u(){if(c)return NS;if(l)return l=!1,IS;var e,r,o=a;if(34===t.charCodeAt(o)){for(;a++<i&&34!==t.charCodeAt(a)||34===t.charCodeAt(++a););return(e=a)>=i?c=!0:10===(r=t.charCodeAt(a++))?l=!0:13===r&&(l=!0,10===t.charCodeAt(a)&&++a),t.slice(o+1,e-1).replace(/""/g,'"')}for(;a<i;){if(10===(r=t.charCodeAt(e=a++)))l=!0;else if(13===r)l=!0,10===t.charCodeAt(a)&&++a;else if(r!==n)continue;return t.slice(o,e)}return c=!0,t.slice(o,i)}for(10===t.charCodeAt(i-1)&&--i,13===t.charCodeAt(i-1)&&--i;(r=u())!==NS;){for(var f=[];r!==IS&&r!==NS;)f.push(r),r=u();e&&null==(f=e(f,s++))||o.push(f)}return o}function o(e,n){return e.map(function(e){return n.map(function(t){return a(e[t])}).join(t)})}function i(e){return e.map(a).join(t)}function a(t){return null==t?"":t instanceof Date?$S(t):e.test(t+="")?'"'+t.replace(/"/g,'""')+'"':t}return{parse:function(t,e){var n,o,i=r(t,function(t,r){if(n)return n(t,r-1);o=t,n=e?function(t,e){var n=RS(t);return function(r,o){return e(n(r),o,t)}}(t,e):RS(t)});return i.columns=o||[],i},parseRows:r,format:function(e,n){return null==n&&(n=FS(e)),[n.map(a).join(t)].concat(o(e,n)).join("\n")},formatBody:function(t,e){return null==e&&(e=FS(t)),o(t,e).join("\n")},formatRows:function(t){return t.map(i).join("\n")},formatRow:i,formatValue:a}}function HS(t){for(var e in t){var n,r,o=t[e].trim();if(o)if("true"===o)o=!0;else if("false"===o)o=!1;else if("NaN"===o)o=NaN;else if(isNaN(n=+o)){if(!(r=o.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/)))continue;qS&&r[4]&&!r[7]&&(o=o.replace(/-/g,"/").replace(/T/," ")),o=new Date(o)}else o=n;else o=null;t[e]=o}return t}const qS=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours();var YS=function(t,e,n,r){return new(n||(n=Promise))(function(o,i){function a(t){try{c(r.next(t))}catch(t){i(t)}}function s(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){t.done?o(t.value):function(t){return t instanceof n?t:new n(function(e){e(t)})}(t.value).then(a,s)}c((r=r.apply(t,e||[])).next())})};const XS=t=>{const{value:e,format:n=e.split(".").pop(),delimiter:r=",",autoType:o=!0}=t;return()=>YS(void 0,void 0,void 0,function*(){const t=yield fetch(e);if("csv"===n){const e=yield t.text();return WS(r).parse(e,o?HS:pt)}if("json"===n)return yield t.json();throw new Error(`Unknown format: ${n}.`)})};XS.props={};const GS=t=>{const{value:e}=t;return()=>e};GS.props={};const VS=t=>{const{fields:e=[]}=t,n=(r=!0,e.map(t=>{if(Array.isArray(t)){const[e,n=r]=t;return[e,n]}return[t,r]}));var r;return t=>[...t].sort((t,e)=>n.reduce((n,[r,o=!0])=>0!==n?n:o?t[r]<e[r]?-1:+(t[r]!==e[r]):t[r]>e[r]?-1:+(t[r]!==e[r]),0))};VS.props={};const KS=t=>{const{callback:e}=t;return t=>Array.isArray(t)?[...t].sort(e):t};function US(t){return null!=t&&!Number.isNaN(t)}KS.props={};const ZS=t=>{const{callback:e=US}=t;return t=>t.filter(e)};ZS.props={};const JS=t=>{const{fields:e}=t;return t=>t.map(t=>function(t,e=[]){return e.reduce((e,n)=>(n in t&&(e[n]=t[n]),e),{})}(t,e))};JS.props={};const QS=t=>e=>{if(!t||0===Object.keys(t).length)return e;return e.map(e=>Object.entries(e).reduce((e,[n,r])=>(e[t[n]||n]=r,e),{}))};QS.props={};const tE=t=>{const{fields:e,key:n="key",value:r="value"}=t;return t=>{return(o=e)&&0!==Object.keys(o).length?t.flatMap(t=>e.map(e=>Object.assign(Object.assign({},t),{[n]:e,[r]:t[e]}))):t;var o}};tE.props={};const eE=t=>{const{start:e,end:n}=t;return t=>t.slice(e,n)};eE.props={};const nE=t=>{const{callback:e=pt}=t;return t=>e(t)};nE.props={};const rE=t=>{const{callback:e=pt}=t;return t=>Array.isArray(t)?t.map(e):t};function oE(t){return"string"==typeof t?e=>e[t]:t}rE.props={};const iE=t=>{const{join:e,on:n,select:r=[],as:o=r,unknown:i=NaN}=t,[a,s]=n,c=oE(s),l=oE(a),u=T(e,([t])=>t,t=>c(t));return t=>t.map(t=>{const e=u.get(l(t));return Object.assign(Object.assign({},t),r.reduce((t,n,r)=>(t[o[r]]=e?e[n]:i,t),{}))})};iE.props={};var aE=n("./node_modules/.pnpm/pdfast@0.2.0/node_modules/pdfast/src/index.js"),sE=n.n(aE);const cE=t=>{const{field:e,groupBy:n,as:r=["y","size"],min:o,max:i,size:a=10,width:s}=t,[c,l]=r;return t=>{const r=Array.from(C(t,t=>n.map(e=>t[e]).join("-")).values());return r.map(t=>{const n=sE().create(t.map(t=>t[e]),{min:o,max:i,size:a,width:s}),r=n.map(t=>t.x),u=n.map(t=>t.y);return Object.assign(Object.assign({},t[0]),{[c]:r,[l]:u})})}};cE.props={};const lE=()=>t=>(console.log("G2 data section:",t),t);lE.props={};var uE=function(t,e,n,r){return new(n||(n=Promise))(function(o,i){function a(t){try{c(r.next(t))}catch(t){i(t)}}function s(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){t.done?o(t.value):function(t){return t instanceof n?t:new n(function(e){e(t)})}(t.value).then(a,s)}c((r=r.apply(t,e||[])).next())})};const fE=Math.PI/180,dE=2048;function pE(t){return t.text}function hE(){return"serif"}function gE(){return"normal"}function mE(t){return t.value}function yE(){return 90*~~(2*Math.random())}function bE(){return 1}function vE(){}function xE(t,e,n,r){if(e.sprite)return;const o=t.context,i=t.ratio;o.clearRect(0,0,2048/i,dE/i);let a=0,s=0,c=0;const l=n.length;for(--r;++r<l;){e=n[r],o.save(),o.font=e.style+" "+e.weight+" "+~~((e.size+1)/i)+"px "+e.font;let t=o.measureText(e.text+"m").width*i,l=e.size<<1;if(e.rotate){const n=Math.sin(e.rotate*fE),r=Math.cos(e.rotate*fE),o=t*r,i=t*n,a=l*r,s=l*n;t=Math.max(Math.abs(o+s),Math.abs(o-s))+31>>5<<5,l=~~Math.max(Math.abs(i+a),Math.abs(i-a))}else t=t+31>>5<<5;if(l>c&&(c=l),a+t>=2048&&(a=0,s+=c,c=0),s+l>=dE)break;o.translate((a+(t>>1))/i,(s+(l>>1))/i),e.rotate&&o.rotate(e.rotate*fE),o.fillText(e.text,0,0),e.padding&&(o.lineWidth=2*e.padding,o.strokeText(e.text,0,0)),o.restore(),e.width=t,e.height=l,e.xoff=a,e.yoff=s,e.x1=t>>1,e.y1=l>>1,e.x0=-e.x1,e.y0=-e.y1,e.hasText=!0,a+=t}const u=o.getImageData(0,0,2048/i,dE/i).data,f=[];for(;--r>=0;){if(!(e=n[r]).hasText)continue;const t=e.width,o=t>>5;let i=e.y1-e.y0;for(let t=0;t<i*o;t++)f[t]=0;if(a=e.xoff,null==a)return;s=e.yoff;let c=0,l=-1;for(let n=0;n<i;n++){for(let e=0;e<t;e++){const t=u[2048*(s+n)+(a+e)<<2]?1<<31-e%32:0;f[o*n+(e>>5)]|=t,c|=t}c?l=n:(e.y0++,i--,n--,s++)}e.y1=e.y0+l,e.sprite=f.slice(0,(e.y1-e.y0)*o)}}function OE(t,e,n){const r=t.sprite,o=t.width>>5,i=t.x-(o<<4),a=127&i,s=32-a,c=t.y1-t.y0;let l,u=(t.y+t.y0)*(n>>=5)+(i>>5);for(let t=0;t<c;t++){l=0;for(let n=0;n<=o;n++)if((l<<s|(n<o?(l=r[t*o+n])>>>a:0))&e[u+n])return!0;u+=n}return!1}function wE(t,e){const n=t[0],r=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>r.x&&(r.x=e.x+e.x1),e.y+e.y1>r.y&&(r.y=e.y+e.y1)}function jE(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}function kE(t){const e=t[0]/t[1];return function(t){return[e*(t*=.1)*Math.cos(t),t*Math.sin(t)]}}function AE(t){const e=[];let n=-1;for(;++n<t;)e[n]=0;return e}function ME(){return document.createElement("canvas")}function _E(t){return"function"==typeof t?t:function(){return t}}const SE={archimedean:kE,rectangular:function(t){const e=4*t[0]/t[1];let n=0,r=0;return function(t){const o=t<0?-1:1;switch(Math.sqrt(1+4*o*t)-o&3){case 0:n+=e;break;case 1:r+=4;break;case 2:n-=e;break;default:r-=4}return[n,r]}}};function EE(){let t=[256,256],e=pE,n=hE,r=mE,o=gE,i=yE,a=bE,s=kE,c=Math.random,l=vE,u=[],f=null,d=1/0,p=ME;const h=gE,g={};function m(e,n,r){const o=n.x,i=n.y,a=Math.sqrt(t[0]*t[0]+t[1]*t[1]),l=s(t),u=c()<.5?1:-1;let f,d,p,h=-u;for(;(f=l(h+=u))&&(d=~~f[0],p=~~f[1],!(Math.min(Math.abs(d),Math.abs(p))>=a));)if(n.x=o+d,n.y=i+p,!(n.x+n.x0<0||n.y+n.y0<0||n.x+n.x1>t[0]||n.y+n.y1>t[1])&&(!r||!OE(n,e,t[0]))&&(!r||jE(n,r))){const r=n.sprite,o=n.width>>5,i=t[0]>>5,a=n.x-(o<<4),s=127&a,c=32-s,l=n.y1-n.y0;let u,f=(n.y+n.y0)*i+(a>>5);for(let t=0;t<l;t++){u=0;for(let n=0;n<=o;n++)e[f+n]|=u<<c|(n<o?(u=r[t*o+n])>>>s:0);f+=i}return delete n.sprite,!0}return!1}return g.start=function(){const[s,y]=t,b=function(t){t.width=t.height=1;const e=Math.sqrt(t.getContext("2d").getImageData(0,0,1,1).data.length>>2);t.width=2048/e,t.height=dE/e;const n=t.getContext("2d");return n.fillStyle=n.strokeStyle="red",n.textAlign="center",n.textBaseline="middle",{context:n,ratio:e}}(p()),v=g.board?g.board:AE((t[0]>>5)*t[1]),x=u.length,O=[],w=u.map(function(t,s,c){return t.text=e.call(this,t,s,c),t.font=n.call(this,t,s,c),t.style=h.call(this,t,s,c),t.weight=o.call(this,t,s,c),t.rotate=i.call(this,t,s,c),t.size=~~r.call(this,t,s,c),t.padding=a.call(this,t,s,c),t}).sort(function(t,e){return e.size-t.size});let j=-1,k=g.board?[{x:0,y:0},{x:s,y}]:void 0;function A(){const e=Date.now();for(;Date.now()-e<d&&++j<x;){const e=w[j];e.x=s*(c()+.5)>>1,e.y=y*(c()+.5)>>1,xE(b,e,w,j),e.hasText&&m(v,e,k)&&(l.call(null,"word",{cloud:g,word:e}),O.push(e),k?g.hasImage||wE(k,e):k=[{x:e.x+e.x0,y:e.y+e.y0},{x:e.x+e.x1,y:e.y+e.y1}],e.x-=t[0]>>1,e.y-=t[1]>>1)}g._tags=O,g._bounds=k,j>=x&&(g.stop(),l.call(null,"end",{cloud:g,words:O,bounds:k}))}return f&&clearInterval(f),f=setInterval(A,0),A(),g},g.stop=function(){return f&&(clearInterval(f),f=null),g},g.createMask=e=>{const n=document.createElement("canvas"),[r,o]=t;if(!r||!o)return;const i=r>>5,a=AE((r>>5)*o);n.width=r,n.height=o;const s=n.getContext("2d");s.drawImage(e,0,0,e.width,e.height,0,0,r,o);const c=s.getImageData(0,0,r,o).data;for(let t=0;t<o;t++)for(let e=0;e<r;e++){const n=t*r+e<<2;a[i*t+(e>>5)]|=c[n]>=250&&c[n+1]>=250&&c[n+2]>=250?1<<31-e%32:0}g.board=a,g.hasImage=!0},g.timeInterval=function(t){d=t??1/0},g.words=function(t){u=t},g.size=function(e=[]){t=[+e[0],+e[1]]},g.text=function(t){e=_E(t)},g.font=function(t){n=_E(t)},g.fontWeight=function(t){o=_E(t)},g.rotate=function(t){i=_E(t)},g.canvas=function(t){p=_E(t)},g.spiral=function(t){s=SE[t]||t},g.fontSize=function(t){r=_E(t)},g.padding=function(t){a=_E(t)},g.random=function(t){c=_E(t)},g.on=function(t){l=_E(t)},g}var PE=function(t,e,n,r){return new(n||(n=Promise))(function(o,i){function a(t){try{c(r.next(t))}catch(t){i(t)}}function s(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){t.done?o(t.value):function(t){return t instanceof n?t:new n(function(e){e(t)})}(t.value).then(a,s)}c((r=r.apply(t,e||[])).next())})},LE=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const CE={fontSize:[20,60],font:"Impact",padding:2,rotate:function(){return 30*(~~(6*Math.random())-3)}};function zE(t){return new Promise((e,n)=>{if(t instanceof HTMLImageElement)e(t);else{if("string"==typeof t){const r=new Image;return r.crossOrigin="anonymous",r.src=t,r.onload=()=>e(r),void(r.onerror=()=>{console.error(`'image ${t} load failed !!!'`),n()})}n()}})}const TE=(t,e)=>n=>PE(void 0,void 0,void 0,function*(){const r=Object.assign({},CE,t,{canvas:e.createCanvas}),o=EE();var i,a;yield(i=o,a=r,{set(t,e,n){if(void 0===a[t])return this;const r=e?e.call(null,a[t]):a[t];return n?n.call(null,r):"function"==typeof i[t]?i[t](r):i[t]=r,this},setAsync(t,e,n){return uE(this,void 0,void 0,function*(){if(void 0===a[t])return this;const r=e?yield e.call(null,a[t]):a[t];return n?n.call(null,r):"function"==typeof i[t]?i[t](r):i[t]=r,this})}}).set("fontSize",t=>{const e=n.map(t=>t.value);return function(t,e){if("function"==typeof t)return t;if(Array.isArray(t)){const[n,r]=t;if(!e)return()=>(r+n)/2;const[o,i]=e;return i===o?()=>(r+n)/2:({value:t})=>(r-n)/(i-o)*(t-o)+n}return()=>t}(t,[ep(e),Ye(e)])}).set("font").set("fontStyle").set("fontWeight").set("padding").set("rotate").set("size").set("spiral").set("timeInterval").set("random").set("text").set("on").set("canvas").setAsync("imageMask",zE,o.createMask),o.words([...n]);const s=o.start(),[c,l]=r.size,u=[{x:0,y:0},{x:c,y:l}],{_bounds:f=u,_tags:d,hasImage:p}=s,h=d.map(t=>{var{x:e,y:n,font:r}=t,o=LE(t,["x","y","font"]);return Object.assign(Object.assign({},o),{x:e+c/2,y:n+l/2,fontFamily:r})}),[{x:g,y:m},{x:y,y:b}]=f,v={text:"",value:0,opacity:0,fontSize:0};return h.push(Object.assign(Object.assign({},v),{x:p?0:g,y:p?0:m}),Object.assign(Object.assign({},v),{x:p?c:y,y:p?l:b})),h});TE.props={};const BE=t=>{const{field:e="y",alpha:n=.6,as:r=e}=t;return t=>{const o=t.map(t=>t[e]),i=function(t,e){if(e<0||e>1)throw new Error("alpha must be between 0 and 1.");if(0===t.length)return[];let n=t[0];const r=[];for(const o of t){if(null==o){r.push(o),console.warn("EMA:The value is null or undefined",t);continue}null==n&&(n=o);const i=n*e+(1-e)*o;r.push(i),n=i}return r}(o,n);return t.map((t,e)=>Object.assign(Object.assign({},t),{[r]:i[e]}))}};BE.props={};function IE(t){const{min:e,max:n}=t;return[[e[0],e[1]],[n[0],n[1]]]}function NE(t,e,n=.01){const[r,o]=t,[i,a]=e;return r>=i[0]-n&&r<=a[0]+n&&o>=i[1]-n&&o<=a[1]+n}function RE(t,e,n=.01){const[r,o]=t;return!(NE(r,e,n)&&NE(o,e,n))}const FE=t=>{const{priority:e}=t;return t=>{const n=[];return e&&t.sort(e),t.forEach(t=>{Ol(t);const e=t.getLocalBounds(),r=n.some(t=>function(t,e){const[n,r]=t,[o,i]=e;return n[0]<i[0]&&r[0]>o[0]&&n[1]<i[1]&&r[1]>o[1]}(IE(e),IE(t.getLocalBounds())));r?xl(t):n.push(t)}),t}};function DE([t,e],[n,r]){return r>t&&e>n}function $E(){const t=new Map;return[e=>t.get(e),(e,n)=>t.set(e,n)]}function WE(t){const e=t.cloneNode(!0),n=e.getElementById("connector");n&&e.removeChild(n);const{min:r,max:o}=e.getRenderBounds();return e.destroy(),{min:r,max:o}}const HE=t=>{const{maxIterations:e=10,maxError:n=.1,padding:r=1}=t;return t=>{const o=t.length;if(o<=1)return t;const[i,a]=$E(),[s,c]=$E(),[l,u]=$E(),[f,d]=$E();for(const e of t){const{min:t,max:n}=WE(e),[r,o]=t,[i,s]=n;a(e,o),c(e,o),u(e,s-o),d(e,[r,i])}for(let i=0;i<e;i++){t.sort((t,e)=>(0,Ec.A)(s(t),s(e)));let e=0;for(let n=0;n<o-1;n++){const o=t[n];let i,a=n+1;for(;(i=t[a])&&!DE(f(o),f(i));)a+=1;if(i){const t=s(o),n=l(o),a=s(i),u=a-(t+n);if(u<r){const n=(r-u)/2;e=Math.max(e,n),c(o,t-n),c(i,a+n)}}}if(e<n)break}for(const e of t)e.style.y+=s(e)-i(e);return t}},qE=()=>t=>(t.forEach(t=>{Ol(t);const e=t.attr("bounds");RE(IE(t.getLocalBounds()),e)&&xl(t)}),t);function YE(t){return"object"==typeof t?t:(0,l.H0)(t)}function XE(t){let e=t/255;return e=e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4),e}function GE(t,e,n){return.2126*XE(t)+.7152*XE(e)+.0722*XE(n)}function VE(t,e){if(!t||!e||t===e)return 1;const{r:n,g:r,b:o}=t,{r:i,g:a,b:s}=e,c=GE(n,r,o),l=GE(i,a,s);return(Math.max(c,l)+.05)/(Math.min(c,l)+.05)}function KE(t,e){const n=gc(e,e=>VE(t,YE(e)));return e[n]}const UE=t=>{const{threshold:e=4.5,palette:n=["#000","#fff"]}=t;return t=>(t.forEach(t=>{const r=t.attr("dependentElement").parsedStyle.fill;VE(t.parsedStyle.fill,r)<e&&t.attr("fill",KE(r,n))}),t)};function ZE(t){var e;const n=t.getAnimations();if(!n||0===n.length)return _l(t);const r=t.cloneNode(!0);r.style.visibility="hidden",n.forEach(t=>{const e=t.effect.getKeyframes();e&&e.length>0&&r.attr(e[e.length-1])}),null===(e=t.parentNode)||void 0===e||e.appendChild(r);const o=_l(r);return r.destroy(),o}const JE=t=>{const{palette:e=["#000","#fff"],threshold:n=2}=t;return t=>(t.forEach(t=>{var r,o;const i=t.attr("dependentElement"),a=null!==(o=null!==(r=t.attributes.fill)&&void 0!==r?r:t.parsedStyle.fill)&&void 0!==o?o:"#fff";if(RE(IE(ZE(t)),IE(ZE(i)),n)){const n=KE(YE(a),e);t.attr("stroke",n)}else t.removeAttribute("stroke")}),t)},QE=(t={})=>(e,{layout:n})=>{const{bounds:r="view",offsetX:o=0,offsetY:i=0}=t,a=(()=>{if("main"===r){const{x:t=0,y:e=0,width:r=0,height:a=0,marginLeft:s=0,marginRight:c=0,marginTop:l=0,marginBottom:u=0,paddingLeft:f=0,paddingRight:d=0,paddingTop:p=0,paddingBottom:h=0}=n;return[[t+s+f+o,e+l+p+i],[t+r-c-d-o,e+a-u-h-i]]}{const{x:t=0,y:e=0,width:r=0,height:a=0}=n;return[[t+o,e+i],[t+r-o,e+a-i]]}})();return e.forEach(t=>{Ol(t);const{max:e,min:n}=((t,e)=>t&&t.min&&t.max?e&&e.min&&e.max?{min:[Math.min(t.min[0],e.min[0]),Math.min(t.min[1],e.min[1])],max:[Math.max(t.max[0],e.max[0]),Math.max(t.max[1],e.max[1])]}:t:e&&e.min&&e.max?e:{min:[0,0],max:[0,0]})(t.getRenderBounds(),t.getBounds());if(!e||!n||0===e[0]&&0===e[1]&&0===n[0]&&0===n[1])return;const[r,o]=e,[i,s]=n,c=((t,e)=>{const[[n,r],[o,i]]=e,[[a,s],[c,l]]=t;let u=0,f=0;return a<n?u=n-a:c>o&&(u=o-c),s<r?f=r-s:l>i&&(f=i-l),[u,f]})([[i,s],[r,o]],a);t.style.connector&&t.style.connectorPoints&&(t.style.connectorPoints[0][0]-=c[0],t.style.connectorPoints[0][1]-=c[1]),t.style.x+=c[0],t.style.y+=c[1]}),e};const tP=t=>t;function eP(t,e){t&&rP.hasOwnProperty(t.type)&&rP[t.type](t,e)}var nP={Feature:function(t,e){eP(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,o=n.length;++r<o;)eP(n[r].geometry,e)}},rP={Sphere:function(t,e){e.sphere()},Point:function(t,e){e.point((t=t.coordinates)[0],t[1],t[2])},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,o=n.length;++r<o;)e.point((t=n[r])[0],t[1],t[2])},LineString:function(t,e){oP(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,o=n.length;++r<o;)oP(n[r],e,0)},Polygon:function(t,e){iP(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,o=n.length;++r<o;)iP(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,o=n.length;++r<o;)eP(n[r],e)}};function oP(t,e,n){var r,o=-1,i=t.length-n;for(e.lineStart();++o<i;)e.point((r=t[o])[0],r[1],r[2]);e.lineEnd()}function iP(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)oP(t[n],e,1);e.polygonEnd()}function aP(t,e){t&&nP.hasOwnProperty(t.type)?nP[t.type](t,e):eP(t,e)}class sP{constructor(){this._partials=new Float64Array(32),this._n=0}add(t){const e=this._partials;let n=0;for(let r=0;r<this._n&&r<32;r++){const o=e[r],i=t+o,a=Math.abs(t)<Math.abs(o)?t-(i-o):o-(i-t);a&&(e[n++]=a),t=i}return e[n]=t,this._n=n+1,this}valueOf(){const t=this._partials;let e,n,r,o=this._n,i=0;if(o>0){for(i=t[--o];o>0&&(e=i,n=t[--o],i=e+n,r=n-(i-e),!r););o>0&&(r<0&&t[o-1]<0||r>0&&t[o-1]>0)&&(n=2*r,e=i+n,n==e-i&&(i=e))}return i}}var cP=1e-6,lP=Math.PI,uP=lP/2,fP=lP/4,dP=2*lP,pP=180/lP,hP=lP/180,gP=Math.abs,mP=Math.atan,yP=Math.atan2,bP=Math.cos,vP=Math.ceil,xP=Math.exp,OP=(Math,Math,Math.log),wP=Math.pow,jP=Math.sin,kP=Math.sign||function(t){return t>0?1:t<0?-1:0},AP=Math.sqrt,MP=Math.tan;function _P(t){return t>1?0:t<-1?lP:Math.acos(t)}function SP(t){return t>1?uP:t<-1?-uP:Math.asin(t)}function EP(){}var PP,LP,CP,zP,TP=new sP,BP=new sP,IP={point:EP,lineStart:EP,lineEnd:EP,polygonStart:function(){IP.lineStart=NP,IP.lineEnd=DP},polygonEnd:function(){IP.lineStart=IP.lineEnd=IP.point=EP,TP.add(gP(BP)),BP=new sP},result:function(){var t=TP/2;return TP=new sP,t}};function NP(){IP.point=RP}function RP(t,e){IP.point=FP,PP=CP=t,LP=zP=e}function FP(t,e){BP.add(zP*t-CP*e),CP=t,zP=e}function DP(){FP(PP,LP)}const $P=IP;var WP=1/0,HP=WP,qP=-WP,YP=qP,XP={point:function(t,e){t<WP&&(WP=t);t>qP&&(qP=t);e<HP&&(HP=e);e>YP&&(YP=e)},lineStart:EP,lineEnd:EP,polygonStart:EP,polygonEnd:EP,result:function(){var t=[[WP,HP],[qP,YP]];return qP=YP=-(HP=WP=1/0),t}};const GP=XP;var VP,KP,UP,ZP,JP=0,QP=0,tL=0,eL=0,nL=0,rL=0,oL=0,iL=0,aL=0,sL={point:cL,lineStart:lL,lineEnd:dL,polygonStart:function(){sL.lineStart=pL,sL.lineEnd=hL},polygonEnd:function(){sL.point=cL,sL.lineStart=lL,sL.lineEnd=dL},result:function(){var t=aL?[oL/aL,iL/aL]:rL?[eL/rL,nL/rL]:tL?[JP/tL,QP/tL]:[NaN,NaN];return JP=QP=tL=eL=nL=rL=oL=iL=aL=0,t}};function cL(t,e){JP+=t,QP+=e,++tL}function lL(){sL.point=uL}function uL(t,e){sL.point=fL,cL(UP=t,ZP=e)}function fL(t,e){var n=t-UP,r=e-ZP,o=AP(n*n+r*r);eL+=o*(UP+t)/2,nL+=o*(ZP+e)/2,rL+=o,cL(UP=t,ZP=e)}function dL(){sL.point=cL}function pL(){sL.point=gL}function hL(){mL(VP,KP)}function gL(t,e){sL.point=mL,cL(VP=UP=t,KP=ZP=e)}function mL(t,e){var n=t-UP,r=e-ZP,o=AP(n*n+r*r);eL+=o*(UP+t)/2,nL+=o*(ZP+e)/2,rL+=o,oL+=(o=ZP*t-UP*e)*(UP+t),iL+=o*(ZP+e),aL+=3*o,cL(UP=t,ZP=e)}const yL=sL;function bL(t){this._context=t}bL.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,dP)}},result:EP};var vL,xL,OL,wL,jL,kL=new sP,AL={point:EP,lineStart:function(){AL.point=ML},lineEnd:function(){vL&&_L(xL,OL),AL.point=EP},polygonStart:function(){vL=!0},polygonEnd:function(){vL=null},result:function(){var t=+kL;return kL=new sP,t}};function ML(t,e){AL.point=_L,xL=wL=t,OL=jL=e}function _L(t,e){kL.add(AP((wL-=t)*wL+(jL-=e)*jL)),wL=t,jL=e}const SL=AL;let EL,PL,LL,CL;class zL{constructor(t){this._append=null==t?TL:function(t){const e=Math.floor(t);if(!(e>=0))throw new RangeError(`invalid digits: ${t}`);if(e>15)return TL;if(e!==EL){const t=10**e;EL=e,PL=function(e){let n=1;this._+=e[0];for(const r=e.length;n<r;++n)this._+=Math.round(arguments[n]*t)/t+e[n]}}return PL}(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:if(this._append`M${t},${e}`,this._radius!==LL||this._append!==PL){const t=this._radius,e=this._;this._="",this._append`m0,${t}a${t},${t} 0 1,1 0,${-2*t}a${t},${t} 0 1,1 0,${2*t}z`,LL=t,PL=this._append,CL=this._,this._=e}this._+=CL}}result(){const t=this._;return this._="",t.length?t:null}}function TL(t){let e=1;this._+=t[0];for(const n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function BL(t,e){let n,r,o=3,i=4.5;function a(t){return t&&("function"==typeof i&&r.pointRadius(+i.apply(this,arguments)),aP(t,n(r))),r.result()}return a.area=function(t){return aP(t,n($P)),$P.result()},a.measure=function(t){return aP(t,n(SL)),SL.result()},a.bounds=function(t){return aP(t,n(GP)),GP.result()},a.centroid=function(t){return aP(t,n(yL)),yL.result()},a.projection=function(e){return arguments.length?(n=null==e?(t=null,tP):(t=e).stream,a):t},a.context=function(t){return arguments.length?(r=null==t?(e=null,new zL(o)):new bL(e=t),"function"!=typeof i&&r.pointRadius(i),a):e},a.pointRadius=function(t){return arguments.length?(i="function"==typeof t?t:(r.pointRadius(+t),+t),a):i},a.digits=function(t){if(!arguments.length)return o;if(null==t)o=null;else{const e=Math.floor(t);if(!(e>=0))throw new RangeError(`invalid digits: ${t}`);o=e}return null===e&&(r=new zL(o)),a},a.projection(t).digits(o).context(e)}function IL(t,e,n){t=+t,e=+e,n=(o=arguments.length)<2?(e=t,t=0,1):o<3?1:+n;for(var r=-1,o=0|Math.max(0,Math.ceil((e-t)/n)),i=new Array(o);++r<o;)i[r]=t+r*n;return i}function NL(t,e,n){var r=IL(t,e-cP,n).concat(e);return function(t){return r.map(function(e){return[t,e]})}}function RL(t,e,n){var r=IL(t,e-cP,n).concat(e);return function(t){return r.map(function(e){return[e,t]})}}function FL(){return function(){var t,e,n,r,o,i,a,s,c,l,u,f,d=10,p=d,h=90,g=360,m=2.5;function y(){return{type:"MultiLineString",coordinates:b()}}function b(){return IL(vP(r/h)*h,n,h).map(u).concat(IL(vP(s/g)*g,a,g).map(f)).concat(IL(vP(e/d)*d,t,d).filter(function(t){return gP(t%h)>cP}).map(c)).concat(IL(vP(i/p)*p,o,p).filter(function(t){return gP(t%g)>cP}).map(l))}return y.lines=function(){return b().map(function(t){return{type:"LineString",coordinates:t}})},y.outline=function(){return{type:"Polygon",coordinates:[u(r).concat(f(a).slice(1),u(n).reverse().slice(1),f(s).reverse().slice(1))]}},y.extent=function(t){return arguments.length?y.extentMajor(t).extentMinor(t):y.extentMinor()},y.extentMajor=function(t){return arguments.length?(s=+t[0][1],a=+t[1][1],(r=+t[0][0])>(n=+t[1][0])&&(t=r,r=n,n=t),s>a&&(t=s,s=a,a=t),y.precision(m)):[[r,s],[n,a]]},y.extentMinor=function(n){return arguments.length?(i=+n[0][1],o=+n[1][1],(e=+n[0][0])>(t=+n[1][0])&&(n=e,e=t,t=n),i>o&&(n=i,i=o,o=n),y.precision(m)):[[e,i],[t,o]]},y.step=function(t){return arguments.length?y.stepMajor(t).stepMinor(t):y.stepMinor()},y.stepMajor=function(t){return arguments.length?(h=+t[0],g=+t[1],y):[h,g]},y.stepMinor=function(t){return arguments.length?(d=+t[0],p=+t[1],y):[d,p]},y.precision=function(d){return arguments.length?(m=+d,c=NL(i,o,90),l=RL(e,t,m),u=NL(s,a,90),f=RL(r,n,m),y):m},y.extentMajor([[-180,-89.999999],[180,89.999999]]).extentMinor([[-180,-80.000001],[180,80.000001]])}()()}function DL(){var t,e=[];return{point:function(e,n,r){t.push([e,n,r])},lineStart:function(){e.push(t=[])},lineEnd:EP,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function $L(t,e){return gP(t[0]-e[0])<cP&&gP(t[1]-e[1])<cP}function WL(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 HL(t,e,n,r,o){var i,a,s=[],c=[];if(t.forEach(function(t){if(!((e=t.length-1)<=0)){var e,n,r=t[0],a=t[e];if($L(r,a)){if(!r[2]&&!a[2]){for(o.lineStart(),i=0;i<e;++i)o.point((r=t[i])[0],r[1]);return void o.lineEnd()}a[0]+=2e-6}s.push(n=new WL(r,t,null,!0)),c.push(n.o=new WL(r,null,n,!1)),s.push(n=new WL(a,t,null,!1)),c.push(n.o=new WL(a,null,n,!0))}}),s.length){for(c.sort(e),qL(s),qL(c),i=0,a=c.length;i<a;++i)c[i].e=n=!n;for(var l,u,f=s[0];;){for(var d=f,p=!0;d.v;)if((d=d.n)===f)return;l=d.z,o.lineStart();do{if(d.v=d.o.v=!0,d.e){if(p)for(i=0,a=l.length;i<a;++i)o.point((u=l[i])[0],u[1]);else r(d.x,d.n.x,1,o);d=d.n}else{if(p)for(i=(l=d.p.z).length-1;i>=0;--i)o.point((u=l[i])[0],u[1]);else r(d.x,d.p.x,-1,o);d=d.p}l=(d=d.o).z,p=!p}while(!d.v);o.lineEnd()}}}function qL(t){if(e=t.length){for(var e,n,r=0,o=t[0];++r<e;)o.n=n=t[r],n.p=o,o=n;o.n=n=t[0],n.p=o}}function YL(t){return[yP(t[1],t[0]),SP(t[2])]}function XL(t){var e=t[0],n=t[1],r=bP(n);return[r*bP(e),r*jP(e),jP(n)]}function GL(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function VL(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 KL(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function UL(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function ZL(t){var e=AP(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}function JL(t){return gP(t[0])<=lP?t[0]:kP(t[0])*((gP(t[0])+lP)%dP-lP)}function QL(t){return Array.from(function*(t){for(const e of t)yield*e}(t))}function tC(t,e,n,r){return function(o){var i,a,s,c=e(o),l=DL(),u=e(l),f=!1,d={point:p,lineStart:g,lineEnd:m,polygonStart:function(){d.point=y,d.lineStart=b,d.lineEnd=v,a=[],i=[]},polygonEnd:function(){d.point=p,d.lineStart=g,d.lineEnd=m,a=QL(a);var t=function(t,e){var n=JL(e),r=e[1],o=jP(r),i=[jP(n),-bP(n),0],a=0,s=0,c=new sP;1===o?r=uP+cP:-1===o&&(r=-uP-cP);for(var l=0,u=t.length;l<u;++l)if(d=(f=t[l]).length)for(var f,d,p=f[d-1],h=JL(p),g=p[1]/2+fP,m=jP(g),y=bP(g),b=0;b<d;++b,h=x,m=w,y=j,p=v){var v=f[b],x=JL(v),O=v[1]/2+fP,w=jP(O),j=bP(O),k=x-h,A=k>=0?1:-1,M=A*k,_=M>lP,S=m*w;if(c.add(yP(S*A*jP(M),y*j+S*bP(M))),a+=_?k+A*dP:k,_^h>=n^x>=n){var E=VL(XL(p),XL(v));ZL(E);var P=VL(i,E);ZL(P);var L=(_^k>=0?-1:1)*SP(P[2]);(r>L||r===L&&(E[0]||E[1]))&&(s+=_^k>=0?1:-1)}}return(a<-cP||a<cP&&c<-1e-12)^1&s}(i,r);a.length?(f||(o.polygonStart(),f=!0),HL(a,nC,t,n,o)):t&&(f||(o.polygonStart(),f=!0),o.lineStart(),n(null,null,1,o),o.lineEnd()),f&&(o.polygonEnd(),f=!1),a=i=null},sphere:function(){o.polygonStart(),o.lineStart(),n(null,null,1,o),o.lineEnd(),o.polygonEnd()}};function p(e,n){t(e,n)&&o.point(e,n)}function h(t,e){c.point(t,e)}function g(){d.point=h,c.lineStart()}function m(){d.point=p,c.lineEnd()}function y(t,e){s.push([t,e]),u.point(t,e)}function b(){u.lineStart(),s=[]}function v(){y(s[0][0],s[0][1]),u.lineEnd();var t,e,n,r,c=u.clean(),d=l.result(),p=d.length;if(s.pop(),i.push(s),s=null,p)if(1&c){if((e=(n=d[0]).length-1)>0){for(f||(o.polygonStart(),f=!0),o.lineStart(),t=0;t<e;++t)o.point((r=n[t])[0],r[1]);o.lineEnd()}}else p>1&&2&c&&d.push(d.pop().concat(d.shift())),a.push(d.filter(eC))}return d}}function eC(t){return t.length>1}function nC(t,e){return((t=t.x)[0]<0?t[1]-uP-cP:uP-t[1])-((e=e.x)[0]<0?e[1]-uP-cP:uP-e[1])}const rC=tC(function(){return!0},function(t){var e,n=NaN,r=NaN,o=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(i,a){var s=i>0?lP:-lP,c=gP(i-n);gP(c-lP)<cP?(t.point(n,r=(r+a)/2>0?uP:-uP),t.point(o,r),t.lineEnd(),t.lineStart(),t.point(s,r),t.point(i,r),e=0):o!==s&&c>=lP&&(gP(n-o)<cP&&(n-=o*cP),gP(i-s)<cP&&(i-=s*cP),r=function(t,e,n,r){var o,i,a=jP(t-n);return gP(a)>cP?mP((jP(e)*(i=bP(r))*jP(n)-jP(r)*(o=bP(e))*jP(t))/(o*i*a)):(e+r)/2}(n,r,i,a),t.point(o,r),t.lineEnd(),t.lineStart(),t.point(s,r),e=0),t.point(n=i,r=a),o=s},lineEnd:function(){t.lineEnd(),n=r=NaN},clean:function(){return 2-e}}},function(t,e,n,r){var o;if(null==t)r.point(-lP,o=n*uP),r.point(0,o),r.point(lP,o),r.point(lP,0),r.point(lP,-o),r.point(0,-o),r.point(-lP,-o),r.point(-lP,0),r.point(-lP,o);else if(gP(t[0]-e[0])>cP){var i=t[0]<e[0]?lP:-lP;r.point(-i,o=n*i/2),r.point(0,o),r.point(i,o)}else r.point(e[0],e[1])},[-lP,-uP]);function oC(t,e,n,r,o,i){if(n){var a=bP(e),s=jP(e),c=r*n;null==o?(o=e+r*dP,i=e-c/2):(o=iC(a,o),i=iC(a,i),(r>0?o<i:o>i)&&(o+=r*dP));for(var l,u=o;r>0?u>i:u<i;u-=c)l=YL([a,-s*bP(u),-s*jP(u)]),t.point(l[0],l[1])}}function iC(t,e){(e=XL(e))[0]-=t,ZL(e);var n=_P(-e[1]);return((-e[2]<0?-n:n)+dP-cP)%dP}var aC=1e9,sC=-aC;function cC(t,e,n,r){function o(o,i){return t<=o&&o<=n&&e<=i&&i<=r}function i(o,i,s,l){var u=0,f=0;if(null==o||(u=a(o,s))!==(f=a(i,s))||c(o,i)<0^s>0)do{l.point(0===u||3===u?t:n,u>1?r:e)}while((u=(u+s+4)%4)!==f);else l.point(i[0],i[1])}function a(r,o){return gP(r[0]-t)<cP?o>0?0:3:gP(r[0]-n)<cP?o>0?2:1:gP(r[1]-e)<cP?o>0?1:0:o>0?3:2}function s(t,e){return c(t.x,e.x)}function c(t,e){var n=a(t,1),r=a(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(a){var c,l,u,f,d,p,h,g,m,y,b,v=a,x=DL(),O={point:w,lineStart:function(){O.point=j,l&&l.push(u=[]);y=!0,m=!1,h=g=NaN},lineEnd:function(){c&&(j(f,d),p&&m&&x.rejoin(),c.push(x.result()));O.point=w,m&&v.lineEnd()},polygonStart:function(){v=x,c=[],l=[],b=!0},polygonEnd:function(){var e=function(){for(var e=0,n=0,o=l.length;n<o;++n)for(var i,a,s=l[n],c=1,u=s.length,f=s[0],d=f[0],p=f[1];c<u;++c)i=d,a=p,d=(f=s[c])[0],p=f[1],a<=r?p>r&&(d-i)*(r-a)>(p-a)*(t-i)&&++e:p<=r&&(d-i)*(r-a)<(p-a)*(t-i)&&--e;return e}(),n=b&&e,o=(c=QL(c)).length;(n||o)&&(a.polygonStart(),n&&(a.lineStart(),i(null,null,1,a),a.lineEnd()),o&&HL(c,s,e,i,a),a.polygonEnd());v=a,c=l=u=null}};function w(t,e){o(t,e)&&v.point(t,e)}function j(i,a){var s=o(i,a);if(l&&u.push([i,a]),y)f=i,d=a,p=s,y=!1,s&&(v.lineStart(),v.point(i,a));else if(s&&m)v.point(i,a);else{var c=[h=Math.max(sC,Math.min(aC,h)),g=Math.max(sC,Math.min(aC,g))],x=[i=Math.max(sC,Math.min(aC,i)),a=Math.max(sC,Math.min(aC,a))];!function(t,e,n,r,o,i){var a,s=t[0],c=t[1],l=0,u=1,f=e[0]-s,d=e[1]-c;if(a=n-s,f||!(a>0)){if(a/=f,f<0){if(a<l)return;a<u&&(u=a)}else if(f>0){if(a>u)return;a>l&&(l=a)}if(a=o-s,f||!(a<0)){if(a/=f,f<0){if(a>u)return;a>l&&(l=a)}else if(f>0){if(a<l)return;a<u&&(u=a)}if(a=r-c,d||!(a>0)){if(a/=d,d<0){if(a<l)return;a<u&&(u=a)}else if(d>0){if(a>u)return;a>l&&(l=a)}if(a=i-c,d||!(a<0)){if(a/=d,d<0){if(a>u)return;a>l&&(l=a)}else if(d>0){if(a<l)return;a<u&&(u=a)}return l>0&&(t[0]=s+l*f,t[1]=c+l*d),u<1&&(e[0]=s+u*f,e[1]=c+u*d),!0}}}}}(c,x,t,e,n,r)?s&&(v.lineStart(),v.point(i,a),b=!1):(m||(v.lineStart(),v.point(c[0],c[1])),v.point(x[0],x[1]),s||v.lineEnd(),b=!1)}h=i,g=a,m=s}return O}}function lC(t,e){function n(n,r){return n=t(n,r),e(n[0],n[1])}return t.invert&&e.invert&&(n.invert=function(n,r){return(n=e.invert(n,r))&&t.invert(n[0],n[1])}),n}function uC(t,e){return gP(t)>lP&&(t-=Math.round(t/dP)*dP),[t,e]}function fC(t,e,n){return(t%=dP)?e||n?lC(pC(t),hC(e,n)):pC(t):e||n?hC(e,n):uC}function dC(t){return function(e,n){return gP(e+=t)>lP&&(e-=Math.round(e/dP)*dP),[e,n]}}function pC(t){var e=dC(t);return e.invert=dC(-t),e}function hC(t,e){var n=bP(t),r=jP(t),o=bP(e),i=jP(e);function a(t,e){var a=bP(e),s=bP(t)*a,c=jP(t)*a,l=jP(e),u=l*n+s*r;return[yP(c*o-u*i,s*n-l*r),SP(u*o+c*i)]}return a.invert=function(t,e){var a=bP(e),s=bP(t)*a,c=jP(t)*a,l=jP(e),u=l*o-c*i;return[yP(c*o+l*i,s*n+u*r),SP(u*n-s*r)]},a}function gC(t){return function(e){var n=new mC;for(var r in t)n[r]=t[r];return n.stream=e,n}}function mC(){}function yC(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),aP(n,t.stream(GP)),e(GP.result()),null!=r&&t.clipExtent(r),t}function bC(t,e,n){return yC(t,function(n){var r=e[1][0]-e[0][0],o=e[1][1]-e[0][1],i=Math.min(r/(n[1][0]-n[0][0]),o/(n[1][1]-n[0][1])),a=+e[0][0]+(r-i*(n[1][0]+n[0][0]))/2,s=+e[0][1]+(o-i*(n[1][1]+n[0][1]))/2;t.scale(150*i).translate([a,s])},n)}function vC(t,e,n){return bC(t,[[0,0],e],n)}function xC(t,e,n){return yC(t,function(n){var r=+e,o=r/(n[1][0]-n[0][0]),i=(r-o*(n[1][0]+n[0][0]))/2,a=-o*n[0][1];t.scale(150*o).translate([i,a])},n)}function OC(t,e,n){return yC(t,function(n){var r=+e,o=r/(n[1][1]-n[0][1]),i=-o*n[0][0],a=(r-o*(n[1][1]+n[0][1]))/2;t.scale(150*o).translate([i,a])},n)}uC.invert=uC,mC.prototype={constructor:mC,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 wC=bP(30*hP);function jC(t,e){return+e?function(t,e){function n(r,o,i,a,s,c,l,u,f,d,p,h,g,m){var y=l-r,b=u-o,v=y*y+b*b;if(v>4*e&&g--){var x=a+d,O=s+p,w=c+h,j=AP(x*x+O*O+w*w),k=SP(w/=j),A=gP(gP(w)-1)<cP||gP(i-f)<cP?(i+f)/2:yP(O,x),M=t(A,k),_=M[0],S=M[1],E=_-r,P=S-o,L=b*E-y*P;(L*L/v>e||gP((y*E+b*P)/v-.5)>.3||a*d+s*p+c*h<wC)&&(n(r,o,i,a,s,c,_,S,A,x/=j,O/=j,w,g,m),m.point(_,S),n(_,S,A,x,O,w,l,u,f,d,p,h,g,m))}}return function(e){var r,o,i,a,s,c,l,u,f,d,p,h,g={point:m,lineStart:y,lineEnd:v,polygonStart:function(){e.polygonStart(),g.lineStart=x},polygonEnd:function(){e.polygonEnd(),g.lineStart=y}};function m(n,r){n=t(n,r),e.point(n[0],n[1])}function y(){u=NaN,g.point=b,e.lineStart()}function b(r,o){var i=XL([r,o]),a=t(r,o);n(u,f,l,d,p,h,u=a[0],f=a[1],l=r,d=i[0],p=i[1],h=i[2],16,e),e.point(u,f)}function v(){g.point=m,e.lineEnd()}function x(){y(),g.point=O,g.lineEnd=w}function O(t,e){b(r=t,e),o=u,i=f,a=d,s=p,c=h,g.point=b}function w(){n(u,f,l,d,p,h,o,i,r,a,s,c,16,e),g.lineEnd=v,v()}return g}}(t,e):function(t){return gC({point:function(e,n){e=t(e,n),this.stream.point(e[0],e[1])}})}(t)}var kC=gC({point:function(t,e){this.stream.point(t*hP,e*hP)}});function AC(t,e,n,r,o,i){if(!i)return function(t,e,n,r,o){function i(i,a){return[e+t*(i*=r),n-t*(a*=o)]}return i.invert=function(i,a){return[(i-e)/t*r,(n-a)/t*o]},i}(t,e,n,r,o);var a=bP(i),s=jP(i),c=a*t,l=s*t,u=a/t,f=s/t,d=(s*n-a*e)/t,p=(s*e+a*n)/t;function h(t,i){return[c*(t*=r)-l*(i*=o)+e,n-l*t-c*i]}return h.invert=function(t,e){return[r*(u*t-f*e+d),o*(p-f*t-u*e)]},h}function MC(t){return _C(function(){return t})()}function _C(t){var e,n,r,o,i,a,s,c,l,u,f=150,d=480,p=250,h=0,g=0,m=0,y=0,b=0,v=0,x=1,O=1,w=null,j=rC,k=null,A=tP,M=.5;function _(t){return c(t[0]*hP,t[1]*hP)}function S(t){return(t=c.invert(t[0],t[1]))&&[t[0]*pP,t[1]*pP]}function E(){var t=AC(f,0,0,x,O,v).apply(null,e(h,g)),r=AC(f,d-t[0],p-t[1],x,O,v);return n=fC(m,y,b),s=lC(e,r),c=lC(n,s),a=jC(s,M),P()}function P(){return l=u=null,_}return _.stream=function(t){return l&&u===t?l:l=kC(function(t){return gC({point:function(e,n){var r=t(e,n);return this.stream.point(r[0],r[1])}})}(n)(j(a(A(u=t)))))},_.preclip=function(t){return arguments.length?(j=t,w=void 0,P()):j},_.postclip=function(t){return arguments.length?(A=t,k=r=o=i=null,P()):A},_.clipAngle=function(t){return arguments.length?(j=+t?function(t){var e=bP(t),n=2*hP,r=e>0,o=gP(e)>cP;function i(t,n){return bP(t)*bP(n)>e}function a(t,n,r){var o=[1,0,0],i=VL(XL(t),XL(n)),a=GL(i,i),s=i[0],c=a-s*s;if(!c)return!r&&t;var l=e*a/c,u=-e*s/c,f=VL(o,i),d=UL(o,l);KL(d,UL(i,u));var p=f,h=GL(d,p),g=GL(p,p),m=h*h-g*(GL(d,d)-1);if(!(m<0)){var y=AP(m),b=UL(p,(-h-y)/g);if(KL(b,d),b=YL(b),!r)return b;var v,x=t[0],O=n[0],w=t[1],j=n[1];O<x&&(v=x,x=O,O=v);var k=O-x,A=gP(k-lP)<cP;if(!A&&j<w&&(v=w,w=j,j=v),A||k<cP?A?w+j>0^b[1]<(gP(b[0]-x)<cP?w:j):w<=b[1]&&b[1]<=j:k>lP^(x<=b[0]&&b[0]<=O)){var M=UL(p,(-h+y)/g);return KL(M,d),[b,YL(M)]}}}function s(e,n){var o=r?t:lP-t,i=0;return e<-o?i|=1:e>o&&(i|=2),n<-o?i|=4:n>o&&(i|=8),i}return tC(i,function(t){var e,n,c,l,u;return{lineStart:function(){l=c=!1,u=1},point:function(f,d){var p,h=[f,d],g=i(f,d),m=r?g?0:s(f,d):g?s(f+(f<0?lP:-lP),d):0;if(!e&&(l=c=g)&&t.lineStart(),g!==c&&(!(p=a(e,h))||$L(e,p)||$L(h,p))&&(h[2]=1),g!==c)u=0,g?(t.lineStart(),p=a(h,e),t.point(p[0],p[1])):(p=a(e,h),t.point(p[0],p[1],2),t.lineEnd()),e=p;else if(o&&e&&r^g){var y;m&n||!(y=a(h,e,!0))||(u=0,r?(t.lineStart(),t.point(y[0][0],y[0][1]),t.point(y[1][0],y[1][1]),t.lineEnd()):(t.point(y[1][0],y[1][1]),t.lineEnd(),t.lineStart(),t.point(y[0][0],y[0][1],3)))}!g||e&&$L(e,h)||t.point(h[0],h[1]),e=h,c=g,n=m},lineEnd:function(){c&&t.lineEnd(),e=null},clean:function(){return u|(l&&c)<<1}}},function(e,r,o,i){oC(i,t,n,o,e,r)},r?[0,-t]:[-lP,t-lP])}(w=t*hP):(w=null,rC),P()):w*pP},_.clipExtent=function(t){return arguments.length?(A=null==t?(k=r=o=i=null,tP):cC(k=+t[0][0],r=+t[0][1],o=+t[1][0],i=+t[1][1]),P()):null==k?null:[[k,r],[o,i]]},_.scale=function(t){return arguments.length?(f=+t,E()):f},_.translate=function(t){return arguments.length?(d=+t[0],p=+t[1],E()):[d,p]},_.center=function(t){return arguments.length?(h=t[0]%360*hP,g=t[1]%360*hP,E()):[h*pP,g*pP]},_.rotate=function(t){return arguments.length?(m=t[0]%360*hP,y=t[1]%360*hP,b=t.length>2?t[2]%360*hP:0,E()):[m*pP,y*pP,b*pP]},_.angle=function(t){return arguments.length?(v=t%360*hP,E()):v*pP},_.reflectX=function(t){return arguments.length?(x=t?-1:1,E()):x<0},_.reflectY=function(t){return arguments.length?(O=t?-1:1,E()):O<0},_.precision=function(t){return arguments.length?(a=jC(s,M=t*t),P()):AP(M)},_.fitExtent=function(t,e){return bC(_,t,e)},_.fitSize=function(t,e){return vC(_,t,e)},_.fitWidth=function(t,e){return xC(_,t,e)},_.fitHeight=function(t,e){return OC(_,t,e)},function(){return e=t.apply(this,arguments),_.invert=e.invert&&S,E()}}function SC(t){var e=0,n=lP/3,r=_C(t),o=r(e,n);return o.parallels=function(t){return arguments.length?r(e=t[0]*hP,n=t[1]*hP):[e*pP,n*pP]},o}function EC(t,e){var n=jP(t),r=(n+jP(e))/2;if(gP(r)<cP)return function(t){var e=bP(t);function n(t,n){return[t*e,jP(n)/e]}return n.invert=function(t,n){return[t/e,SP(n*e)]},n}(t);var o=1+n*(2*r-n),i=AP(o)/r;function a(t,e){var n=AP(o-2*r*jP(e))/r;return[n*jP(t*=r),i-n*bP(t)]}return a.invert=function(t,e){var n=i-e,a=yP(t,gP(n))*kP(n);return n*r<0&&(a-=lP*kP(t)*kP(n)),[a/r,SP((o-(t*t+n*n)*r*r)/(2*r))]},a}function PC(){return SC(EC).scale(155.424).center([0,33.6442])}function LC(){return PC().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function CC(){var t,e,n,r,o,i,a=LC(),s=PC().rotate([154,0]).center([-2,58.5]).parallels([55,65]),c=PC().rotate([157,0]).center([-3,19.9]).parallels([8,18]),l={point:function(t,e){i=[t,e]}};function u(t){var e=t[0],a=t[1];return i=null,n.point(e,a),i||(r.point(e,a),i)||(o.point(e,a),i)}function f(){return t=e=null,u}return u.invert=function(t){var e=a.scale(),n=a.translate(),r=(t[0]-n[0])/e,o=(t[1]-n[1])/e;return(o>=.12&&o<.234&&r>=-.425&&r<-.214?s:o>=.166&&o<.234&&r>=-.214&&r<-.115?c:a).invert(t)},u.stream=function(n){return t&&e===n?t:t=function(t){var e=t.length;return{point:function(n,r){for(var o=-1;++o<e;)t[o].point(n,r)},sphere:function(){for(var n=-1;++n<e;)t[n].sphere()},lineStart:function(){for(var n=-1;++n<e;)t[n].lineStart()},lineEnd:function(){for(var n=-1;++n<e;)t[n].lineEnd()},polygonStart:function(){for(var n=-1;++n<e;)t[n].polygonStart()},polygonEnd:function(){for(var n=-1;++n<e;)t[n].polygonEnd()}}}([a.stream(e=n),s.stream(n),c.stream(n)])},u.precision=function(t){return arguments.length?(a.precision(t),s.precision(t),c.precision(t),f()):a.precision()},u.scale=function(t){return arguments.length?(a.scale(t),s.scale(.35*t),c.scale(t),u.translate(a.translate())):a.scale()},u.translate=function(t){if(!arguments.length)return a.translate();var e=a.scale(),i=+t[0],u=+t[1];return n=a.translate(t).clipExtent([[i-.455*e,u-.238*e],[i+.455*e,u+.238*e]]).stream(l),r=s.translate([i-.307*e,u+.201*e]).clipExtent([[i-.425*e+cP,u+.12*e+cP],[i-.214*e-cP,u+.234*e-cP]]).stream(l),o=c.translate([i-.205*e,u+.212*e]).clipExtent([[i-.214*e+cP,u+.166*e+cP],[i-.115*e-cP,u+.234*e-cP]]).stream(l),f()},u.fitExtent=function(t,e){return bC(u,t,e)},u.fitSize=function(t,e){return vC(u,t,e)},u.fitWidth=function(t,e){return xC(u,t,e)},u.fitHeight=function(t,e){return OC(u,t,e)},u.scale(1070)}function zC(t){return function(e,n){var r=bP(e),o=bP(n),i=t(r*o);return i===1/0?[2,0]:[i*o*jP(e),i*jP(n)]}}function TC(t){return function(e,n){var r=AP(e*e+n*n),o=t(r),i=jP(o),a=bP(o);return[yP(e*i,r*a),SP(r&&n*i/r)]}}var BC=zC(function(t){return AP(2/(1+t))});function IC(){return MC(BC).scale(124.75).clipAngle(179.999)}BC.invert=TC(function(t){return 2*SP(t/2)});var NC=zC(function(t){return(t=_P(t))&&t/jP(t)});function RC(){return MC(NC).scale(79.4188).clipAngle(179.999)}function FC(t,e){return[t,OP(MP((uP+e)/2))]}function DC(){return $C(FC).scale(961/dP)}function $C(t){var e,n,r,o=MC(t),i=o.center,a=o.scale,s=o.translate,c=o.clipExtent,l=null;function u(){var i=lP*a(),s=o(function(t){function e(e){return(e=t(e[0]*hP,e[1]*hP))[0]*=pP,e[1]*=pP,e}return t=fC(t[0]*hP,t[1]*hP,t.length>2?t[2]*hP:0),e.invert=function(e){return(e=t.invert(e[0]*hP,e[1]*hP))[0]*=pP,e[1]*=pP,e},e}(o.rotate()).invert([0,0]));return c(null==l?[[s[0]-i,s[1]-i],[s[0]+i,s[1]+i]]:t===FC?[[Math.max(s[0]-i,l),e],[Math.min(s[0]+i,n),r]]:[[l,Math.max(s[1]-i,e)],[n,Math.min(s[1]+i,r)]])}return o.scale=function(t){return arguments.length?(a(t),u()):a()},o.translate=function(t){return arguments.length?(s(t),u()):s()},o.center=function(t){return arguments.length?(i(t),u()):i()},o.clipExtent=function(t){return arguments.length?(null==t?l=e=n=r=null:(l=+t[0][0],e=+t[0][1],n=+t[1][0],r=+t[1][1]),u()):null==l?null:[[l,e],[n,r]]},u()}function WC(t){return MP((uP+t)/2)}function HC(t,e){var n=bP(t),r=t===e?jP(t):OP(n/bP(e))/OP(WC(e)/WC(t)),o=n*wP(WC(t),r)/r;if(!r)return FC;function i(t,e){o>0?e<-uP+cP&&(e=-uP+cP):e>uP-cP&&(e=uP-cP);var n=o/wP(WC(e),r);return[n*jP(r*t),o-n*bP(r*t)]}return i.invert=function(t,e){var n=o-e,i=kP(r)*AP(t*t+n*n),a=yP(t,gP(n))*kP(n);return n*r<0&&(a-=lP*kP(t)*kP(n)),[a/r,2*mP(wP(o/i,1/r))-uP]},i}function qC(){return SC(HC).scale(109.5).parallels([30,30])}function YC(t,e){return[t,e]}function XC(){return MC(YC).scale(152.63)}function GC(t,e){var n=bP(t),r=t===e?jP(t):(n-bP(e))/(e-t),o=n/r+t;if(gP(r)<cP)return YC;function i(t,e){var n=o-e,i=r*t;return[n*jP(i),o-n*bP(i)]}return i.invert=function(t,e){var n=o-e,i=yP(t,gP(n))*kP(n);return n*r<0&&(i-=lP*kP(t)*kP(n)),[i/r,o-kP(r)*AP(t*t+n*n)]},i}function VC(){return SC(GC).scale(131.154).center([0,13.9389])}NC.invert=TC(function(t){return t}),FC.invert=function(t,e){return[t,2*mP(xP(e))-uP]},YC.invert=YC;var KC=1.340264,UC=-.081106,ZC=893e-6,JC=.003796,QC=AP(3)/2;function tz(t,e){var n=SP(QC*jP(e)),r=n*n,o=r*r*r;return[t*bP(n)/(QC*(KC+3*UC*r+o*(7*ZC+9*JC*r))),n*(KC+UC*r+o*(ZC+JC*r))]}function ez(){return MC(tz).scale(177.158)}function nz(t,e){var n=bP(e),r=bP(t)*n;return[n*jP(t)/r,jP(e)/r]}function rz(){return MC(nz).scale(144.049).clipAngle(60)}function oz(){var t,e,n,r,o,i,a,s=1,c=0,l=0,u=1,f=1,d=0,p=null,h=1,g=1,m=gC({point:function(t,e){var n=v([t,e]);this.stream.point(n[0],n[1])}}),y=tP;function b(){return h=s*u,g=s*f,i=a=null,v}function v(n){var r=n[0]*h,o=n[1]*g;if(d){var i=o*t-r*e;r=r*t+o*e,o=i}return[r+c,o+l]}return v.invert=function(n){var r=n[0]-c,o=n[1]-l;if(d){var i=o*t+r*e;r=r*t-o*e,o=i}return[r/h,o/g]},v.stream=function(t){return i&&a===t?i:i=m(y(a=t))},v.postclip=function(t){return arguments.length?(y=t,p=n=r=o=null,b()):y},v.clipExtent=function(t){return arguments.length?(y=null==t?(p=n=r=o=null,tP):cC(p=+t[0][0],n=+t[0][1],r=+t[1][0],o=+t[1][1]),b()):null==p?null:[[p,n],[r,o]]},v.scale=function(t){return arguments.length?(s=+t,b()):s},v.translate=function(t){return arguments.length?(c=+t[0],l=+t[1],b()):[c,l]},v.angle=function(n){return arguments.length?(e=jP(d=n%360*hP),t=bP(d),b()):d*pP},v.reflectX=function(t){return arguments.length?(u=t?-1:1,b()):u<0},v.reflectY=function(t){return arguments.length?(f=t?-1:1,b()):f<0},v.fitExtent=function(t,e){return bC(v,t,e)},v.fitSize=function(t,e){return vC(v,t,e)},v.fitWidth=function(t,e){return xC(v,t,e)},v.fitHeight=function(t,e){return OC(v,t,e)},v}function iz(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 az(){return MC(iz).scale(175.295)}function sz(t,e){return[bP(e)*jP(t),jP(e)]}function cz(){return MC(sz).scale(249.5).clipAngle(90.000001)}function lz(t,e){var n=bP(e),r=1+bP(t)*n;return[n*jP(t)/r,jP(e)/r]}function uz(){return MC(lz).scale(250).clipAngle(142)}function fz(t,e){return[OP(MP((uP+e)/2)),-t]}function dz(){var t=$C(fz),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],t.length>2?t[2]+90:90]):[(t=n())[0],t[1],t[2]-90]},n([0,0,90]).scale(159.155)}tz.invert=function(t,e){for(var n,r=e,o=r*r,i=o*o*o,a=0;a<12&&(i=(o=(r-=n=(r*(KC+UC*o+i*(ZC+JC*o))-e)/(KC+3*UC*o+i*(7*ZC+9*JC*o)))*r)*o*o,!(gP(n)<1e-12));++a);return[QC*t*(KC+3*UC*o+i*(7*ZC+9*JC*o))/bP(r),SP(jP(r)/QC)]},nz.invert=TC(mP),iz.invert=function(t,e){var n,r=e,o=25;do{var i=r*r,a=i*i;r-=n=(r*(1.007226+i*(.015085+a*(.028874*i-.044475-.005916*a)))-e)/(1.007226+i*(.045255+a*(.259866*i-.311325-.005916*11*a)))}while(gP(n)>cP&&--o>0);return[t/(.8707+(i=r*r)*(i*(i*i*i*(.003971-.001529*i)-.013791)-.131979)),r]},sz.invert=TC(SP),lz.invert=TC(function(t){return 2*mP(t)}),fz.invert=function(t,e){return[-e,2*mP(xP(t))-uP]};var pz=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};function hz(t,e,n,r){const o=()=>{const t=e.filter(mz),n=t.find(t=>t.sphere);return n?{type:"Sphere"}:(r=t.filter(t=>!t.sphere).flatMap(t=>t.data.value),{type:"FeatureCollection",features:r.flatMap(t=>function(t){if(!t||!t.type)return null;const e={Point:"geometry",MultiPoint:"geometry",LineString:"geometry",MultiLineString:"geometry",Polygon:"geometry",MultiPolygon:"geometry",GeometryCollection:"geometry",Feature:"feature",FeatureCollection:"featureCollection"}[t.type];return e?"geometry"===e?{type:"FeatureCollection",features:[{type:"Feature",properties:{},geometry:t}]}:"feature"===e?{type:"FeatureCollection",features:[t]}:"featureCollection"===e?t:void 0:null}(t).features)});var r},{outline:i=o()}=r,{size:a="fitExtent"}=r;return"fitExtent"===a?function(t,e,n){const{x:r,y:o,width:i,height:a}=n;t.fitExtent([[r,o],[i,a]],e)}(t,i,n):"fitWidth"===a?function(t,e,n){const{width:r,height:o}=n,[[i,a],[s,c]]=BL(t.fitWidth(r,e)).bounds(e),l=Math.ceil(c-a),u=Math.min(Math.ceil(s-i),l),f=t.scale()*(u-1)/u,[d,p]=t.translate(),h=p+(o-l)/2;t.scale(f).translate([d,h]).precision(.2)}(t,i,n):void 0}function gz(t){const{data:e}=t;if(Array.isArray(e))return Object.assign(Object.assign({},t),{data:{value:e}});const{type:n}=e;return"graticule10"===n?Object.assign(Object.assign({},t),{data:{value:[FL()]}}):"sphere"===n?Object.assign(Object.assign({},t),{sphere:!0,data:{value:[{type:"Sphere"}]}}):t}function mz(t){return"geoPath"===t.type}const yz=()=>t=>{const{children:e,coordinate:n={}}=t;if(!Array.isArray(e))return[];const{type:r="equalEarth"}=n,o=pz(n,["type"]),a=function(t){if("function"==typeof t)return t;const e=`geo${Ce(t)}`,n=i[e];if(!n)throw new Error(`Unknown coordinate: ${t}`);return n}(r),s=e.map(e=>Object.assign(Object.assign({},e),{data:qs(e.data,t.data)})).map(gz);let c;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=a();hz(i,s,{x:t,y:e,width:n,height:r},o),function(t,e){var n;for(const[r,o]of Object.entries(e))null===(n=t[r])||void 0===n||n.call(t,o)}(i,o),c=BL(i);const l=new li({domain:[t,t+n]}),u=new li({domain:[e,e+r]});return{transform:t=>(t=>{const e=i(t);if(!e)return[null,null];const[n,r]=e;return[l.map(n),u.map(r)]})(t),untransform:t=>(t=>{if(!t)return null;const[e,n]=t,r=[l.invert(e),u.invert(n)];return i.invert(r)})(t)}}]]}},children:s.flatMap(t=>mz(t)?function(t){const{style:e,tooltip:n={}}=t;return Object.assign(Object.assign({},t),{type:"path",tooltip:cp(n,{title:"id",items:[{channel:"color"}]}),style:Object.assign(Object.assign({},e),{d:t=>c(t)||[]})})}(t):t)})]};yz.props={};var bz=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const vz=()=>t=>{const{data:e,scale:n,encode:r,style:o,animate:i,key:a,state:s,tooltip:c}=t,l=bz(t,["type","data","scale","encode","style","animate","key","state","tooltip"]);return[Object.assign(Object.assign({type:"geoView"},l),{children:[{type:"geoPath",key:`${a}-0`,data:{value:e},scale:n,encode:r,style:o,animate:i,state:s,tooltip:c}]})]};vz.props={};var xz=n("./node_modules/.pnpm/d3-force@3.0.0/node_modules/d3-force/src/manyBody.js"),Oz=n("./node_modules/.pnpm/d3-force@3.0.0/node_modules/d3-force/src/link.js"),wz=n("./node_modules/.pnpm/d3-force@3.0.0/node_modules/d3-force/src/center.js"),jz=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const kz={joint:!0},Az={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}},Mz={type:"point",axis:!1,legend:!1,encode:{x:"x",y:"y",size:5,color:"group",shape:"point"},style:{stroke:"#fff"}},_z={text:""};const Sz=t=>{const{data:e,encode:n={},scale:r,style:o={},layout:i={},nodeLabels:a=[],linkLabels:s=[],animate:c={},tooltip:l={}}=t,{nodeKey:u=t=>t.id,linkKey:f=t=>t.id}=n,d=jz(n,["nodeKey","linkKey"]),p=Object.assign({nodeKey:u,linkKey:f},d),h=xt(p,"node"),g=xt(p,"link"),{links:m,nodes:y}=jm(e,p),{nodesData:b,linksData:v}=function(t,e,n){const{nodes:r,links:o}=t,{joint:i,nodeStrength:a,linkStrength:s}=e,{nodeKey:c=t=>t.id,linkKey:l=t=>t.id}=n,u=(0,xz.A)(),f=(0,Oz.A)(o).id(Om(l));"function"==typeof a&&u.strength(a),"function"==typeof s&&f.strength(s);const d=(0,wx.A)(r).force("link",f).force("charge",u);i?d.force("center",(0,wz.A)()):d.force("x",Ax()).force("y",Mx()),d.stop();const p=Math.ceil(Math.log(d.alphaMin())/Math.log(1-d.alphaDecay()));for(let t=0;t<p;t++)d.tick();return{nodesData:r,linksData:o}}({links:m,nodes:y},(0,N.A)({},kz,i),p),x=sp(l,"link",{items:[t=>({name:"source",value:Om(f)(t.source)}),t=>({name:"target",value:Om(f)(t.target)})]}),O=sp(l,"node",{items:[t=>({name:"key",value:Om(u)(t)})]},!0);return[(0,N.A)({},Az,{data:v,encode:g,labels:s,style:xt(o,"link"),tooltip:x,animate:up(c,"link")}),(0,N.A)({},Mz,{data:b,encode:Object.assign({},h),scale:r,style:xt(o,"node"),tooltip:O,labels:[Object.assign(Object.assign({},_z),xt(o,"label")),...a],animate:up(c,"link")})]};Sz.props={};var Ez=n("./node_modules/.pnpm/d3-hierarchy@3.1.2/node_modules/d3-hierarchy/src/tree.js");function Pz(t,e){return t.parent===e.parent?1:2}function Lz(t,e){return t+e.x}function Cz(t,e){return Math.max(t,e.y)}function zz(){var t=Pz,e=1,n=1,r=!1;function o(o){var i,a=0;o.eachAfter(function(e){var n=e.children;n?(e.x=function(t){return t.reduce(Lz,0)/t.length}(n),e.y=function(t){return 1+t.reduce(Cz,0)}(n)):(e.x=i?a+=t(e,i):0,e.y=0,i=e)});var s=function(t){for(var e;e=t.children;)t=e[0];return t}(o),c=function(t){for(var e;e=t.children;)t=e[e.length-1];return t}(o),l=s.x-t(s,c)/2,u=c.x+t(c,s)/2;return o.eachAfter(r?function(t){t.x=(t.x-o.x)*e,t.y=(o.y-t.y)*n}:function(t){t.x=(t.x-l)/(u-l)*e,t.y=(1-(o.y?t.y/o.y:1))*n})}return o.separation=function(e){return arguments.length?(t=e,o):t},o.size=function(t){return arguments.length?(r=!1,e=+t[0],n=+t[1],o):r?null:[e,n]},o.nodeSize=function(t){return arguments.length?(r=!0,e=+t[0],n=+t[1],o):r?[e,n]:null},o}const Tz=t=>e=>n=>{const{field:r="value",nodeSize:o,separation:i,sortBy:a,as:s=["x","y"]}=e,[c,l]=s,u=(0,BA.Ay)(n,t=>t.children).sum(t=>t[r]).sort(a),f=t();f.size([1,1]),o&&f.nodeSize(o),i&&f.separation(i),f(u);const d=[];u.each(t=>{t[c]=t.x,t[l]=t.y,t.name=t.data.name,d.push(t)});const p=u.links();return p.forEach(t=>{t[c]=[t.source[c],t.target[c]],t[l]=[t.source[l],t.target[l]]}),{nodes:d,edges:p}},Bz=t=>Tz(zz)(t);Bz.props={};const Iz=t=>Tz(Ez.A)(t);Iz.props={};const Nz={sortBy:(t,e)=>e.value-t.value},Rz={axis:!1,legend:!1,type:"point",encode:{x:"x",y:"y",size:2,shape:"point"}},Fz={type:"link",encode:{x:"x",y:"y",shape:"smooth"}},Dz={text:"",fontSize:10},$z=t=>{const{data:e,encode:n={},scale:r={},style:o={},layout:i={},nodeLabels:a=[],linkLabels:s=[],animate:c={},tooltip:l={}}=t,u=null==n?void 0:n.value,{nodes:f,edges:d}=Iz(Object.assign(Object.assign(Object.assign({},Nz),i),{field:u}))(e),p=sp(l,"node",{title:"name",items:["value"]},!0),h=sp(l,"link",{title:"",items:[t=>({name:"source",value:t.source.name}),t=>({name:"target",value:t.target.name})]});return[(0,N.A)({},Fz,{data:d,encode:xt(n,"link"),scale:xt(r,"link"),labels:s,style:Object.assign({stroke:"#999"},xt(o,"link")),tooltip:h,animate:up(c,"link")}),(0,N.A)({},Rz,{data:f,scale:xt(r,"node"),encode:xt(n,"node"),labels:[Object.assign(Object.assign({},Dz),xt(o,"label")),...a],style:Object.assign({},xt(o,"node")),tooltip:p,animate:up(c,"node")})]};$z.props={};const Wz=4294967296;function Hz(t,e){for(var n,r,o=0,i=(t=function(t,e){let n,r,o=t.length;for(;o;)r=e()*o--|0,n=t[o],t[o]=t[r],t[r]=n;return t}(Array.from(t),e)).length,a=[];o<i;)n=t[o],r&&Xz(r,n)?++o:(r=Vz(a=qz(a,n)),o=0);return r}function qz(t,e){var n,r;if(Gz(e,t))return[e];for(n=0;n<t.length;++n)if(Yz(e,t[n])&&Gz(Kz(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(Yz(Kz(t[n],t[r]),e)&&Yz(Kz(t[n],e),t[r])&&Yz(Kz(t[r],e),t[n])&&Gz(Uz(t[n],t[r],e),t))return[t[n],t[r],e];throw new Error}function Yz(t,e){var n=t.r-e.r,r=e.x-t.x,o=e.y-t.y;return n<0||n*n<r*r+o*o}function Xz(t,e){var n=t.r-e.r+1e-9*Math.max(t.r,e.r,1),r=e.x-t.x,o=e.y-t.y;return n>0&&n*n>r*r+o*o}function Gz(t,e){for(var n=0;n<e.length;++n)if(!Xz(t,e[n]))return!1;return!0}function Vz(t){switch(t.length){case 1:return function(t){return{x:t.x,y:t.y,r:t.r}}(t[0]);case 2:return Kz(t[0],t[1]);case 3:return Uz(t[0],t[1],t[2])}}function Kz(t,e){var n=t.x,r=t.y,o=t.r,i=e.x,a=e.y,s=e.r,c=i-n,l=a-r,u=s-o,f=Math.sqrt(c*c+l*l);return{x:(n+i+c/f*u)/2,y:(r+a+l/f*u)/2,r:(f+o+s)/2}}function Uz(t,e,n){var r=t.x,o=t.y,i=t.r,a=e.x,s=e.y,c=e.r,l=n.x,u=n.y,f=n.r,d=r-a,p=r-l,h=o-s,g=o-u,m=c-i,y=f-i,b=r*r+o*o-i*i,v=b-a*a-s*s+c*c,x=b-l*l-u*u+f*f,O=p*h-d*g,w=(h*x-g*v)/(2*O)-r,j=(g*m-h*y)/O,k=(p*v-d*x)/(2*O)-o,A=(d*y-p*m)/O,M=j*j+A*A-1,_=2*(i+w*j+k*A),S=w*w+k*k-i*i,E=-(Math.abs(M)>1e-6?(_+Math.sqrt(_*_-4*M*S))/(2*M):S/_);return{x:r+w+j*E,y:o+k+A*E,r:E}}function Zz(t,e,n){var r,o,i,a,s=t.x-e.x,c=t.y-e.y,l=s*s+c*c;l?(o=e.r+n.r,a=t.r+n.r,(o*=o)>(a*=a)?(r=(l+a-o)/(2*l),i=Math.sqrt(Math.max(0,a/l-r*r)),n.x=t.x-r*s-i*c,n.y=t.y-r*c+i*s):(r=(l+o-a)/(2*l),i=Math.sqrt(Math.max(0,o/l-r*r)),n.x=e.x+r*s-i*c,n.y=e.y+r*c+i*s)):(n.x=e.x+n.r,n.y=e.y)}function Jz(t,e){var n=t.r+e.r-1e-6,r=e.x-t.x,o=e.y-t.y;return n>0&&n*n>r*r+o*o}function Qz(t){var e=t._,n=t.next._,r=e.r+n.r,o=(e.x*n.r+n.x*e.r)/r,i=(e.y*n.r+n.y*e.r)/r;return o*o+i*i}function tT(t){this._=t,this.next=null,this.previous=null}function eT(t,e){if(!(i=(t=function(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}(t)).length))return 0;var n,r,o,i,a,s,c,l,u,f,d;if((n=t[0]).x=0,n.y=0,!(i>1))return n.r;if(n.x=-(r=t[1]).r,r.x=n.r,r.y=0,!(i>2))return n.r+r.r;Zz(r,n,o=t[2]),n=new tT(n),r=new tT(r),o=new tT(o),n.next=o.previous=r,r.next=n.previous=o,o.next=r.previous=n;t:for(c=3;c<i;++c){Zz(n._,r._,o=t[c]),o=new tT(o),l=r.next,u=n.previous,f=r._.r,d=n._.r;do{if(f<=d){if(Jz(l._,o._)){n.next=r=l,r.previous=n,--c;continue t}f+=l._.r,l=l.next}else{if(Jz(u._,o._)){(n=u).next=r,r.previous=n,--c;continue t}d+=u._.r,u=u.previous}}while(l!==u.next);for(o.previous=n,o.next=r,n.next=r.previous=r=o,a=Qz(n);(o=o.next)!==r;)(s=Qz(o))<a&&(n=o,a=s);r=n.next}for(n=[r._],o=r;(o=o.next)!==r;)n.push(o._);for(o=Hz(n,e),c=0;c<i;++c)(n=t[c]).x-=o.x,n.y-=o.y;return o.r}function nT(t){return Math.sqrt(t.value)}function rT(){var t=null,e=1,n=1,r=QA;function o(o){const i=function(){let t=1;return()=>(t=(1664525*t+1013904223)%Wz)/Wz}();return o.x=e/2,o.y=n/2,t?o.eachBefore(oT(t)).eachAfter(iT(r,.5,i)).eachBefore(aT(1)):o.eachBefore(oT(nT)).eachAfter(iT(QA,1,i)).eachAfter(iT(r,o.r/Math.min(e,n),i)).eachBefore(aT(Math.min(e,n)/(2*o.r))),o}return o.radius=function(e){return arguments.length?(t=zA(e),o):t},o.size=function(t){return arguments.length?(e=+t[0],n=+t[1],o):[e,n]},o.padding=function(t){return arguments.length?(r="function"==typeof t?t:tM(+t),o):r},o}function oT(t){return function(e){e.children||(e.r=Math.max(0,+t(e)||0))}}function iT(t,e,n){return function(r){if(o=r.children){var o,i,a,s=o.length,c=t(r)*e||0;if(c)for(i=0;i<s;++i)o[i].r+=c;if(a=eT(o,n),c)for(i=0;i<s;++i)o[i].r-=c;r.r=a+c}}}function aT(t){return function(e){var n=e.parent;e.r*=t,n&&(e.x=n.x+t*e.x,e.y=n.y+t*e.y)}}var sT=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const cT={text:"",position:"inside",textOverflow:"clip",wordWrap:!0,maxLines:1,wordWrapWidth:t=>2*t.r},lT={title:t=>t.data.name,items:[{field:"value"}]},uT=(t,e)=>{const{width:n,height:r}=e,{data:o,encode:i={},scale:a={},style:s={},layout:c={},labels:l=[],tooltip:u={}}=t,f=sT(t,["data","encode","scale","style","layout","labels","tooltip"]),d=((t,e,n)=>({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:n.color?void 0:t=>0===t.height?"#ddd":"#fff",stroke:n.color?void 0:t=>0===t.height?"":"#000"}}))(n,r,i),p=((t,e,n)=>{const{value:r}=n,o=(0,Le.A)(t)?$A().path(e.path)(t):(0,BA.Ay)(t);return r?o.sum(t=>Om(r)(t)).sort(e.sort):o.count(),rT().size(e.size).padding(e.padding)(o),o.descendants()})(o,(0,N.A)({},((t,e)=>({size:[t,e],padding:0,sort:(t,e)=>e.value-t.value}))(n,r),c),(0,N.A)({},d.encode,i)),h=xt(s,"label");return(0,N.A)({},d,Object.assign(Object.assign({data:p,encode:i,scale:a,style:s,labels:[Object.assign(Object.assign({},cT),h),...l]},f),{tooltip:cp(u,lT),axis:!1}))};function fT(t){return t.target.depth}function dT(t,e){return t.sourceLinks.length?t.depth:e-1}function pT(t){return function(){return t}}function hT(t,e){return mT(t.source,e.source)||t.index-e.index}function gT(t,e){return mT(t.target,e.target)||t.index-e.index}function mT(t,e){return t.y0-e.y0}function yT(t){return t.value}function bT(t){return t.index}function vT(t){return t.nodes}function xT(t){return t.links}function OT(t,e){const n=t.get(e);if(!n)throw new Error("missing: "+e);return n}function wT({nodes:t}){for(const e of t){let t=e.y0,n=t;for(const n of e.sourceLinks)n.y0=t+n.width/2,t+=n.width;for(const t of e.targetLinks)t.y1=n+t.width/2,n+=t.width}}function jT(){let t,e,n,r,o=0,i=0,a=1,s=1,c=24,l=8,u=bT,f=dT,d=vT,p=xT,h=6;function g(g){const b={nodes:d(g),links:p(g)};return function({nodes:t,links:e}){t.forEach((t,e)=>{t.index=e,t.sourceLinks=[],t.targetLinks=[]});const n=new Map(t.map(t=>[u(t),t]));if(e.forEach((t,e)=>{t.index=e;let{source:r,target:o}=t;"object"!=typeof r&&(r=t.source=OT(n,r)),"object"!=typeof o&&(o=t.target=OT(n,o)),r.sourceLinks.push(t),o.targetLinks.push(t)}),null!=r)for(const{sourceLinks:e,targetLinks:n}of t)e.sort(r),n.sort(r)}(b),function({nodes:t}){for(const e of t)e.value=void 0===e.fixedValue?Math.max(qe(e.sourceLinks,yT),qe(e.targetLinks,yT)):e.fixedValue}(b),function({nodes:t}){const n=t.length;let r=new Set(t),o=new Set,i=0;for(;r.size;){if(r.forEach(t=>{t.depth=i;for(const{target:e}of t.sourceLinks)o.add(e)}),++i>n)throw new Error("circular link");r=o,o=new Set}if(e){const n=Math.max(Ye(t,t=>t.depth)+1,0);let r;for(let o=0;o<t.length;o++)r=t[o],r.depth=e.call(null,r,n)}}(b),function({nodes:t}){const e=t.length;let n=new Set(t),r=new Set,o=0;for(;n.size;){if(n.forEach(t=>{t.height=o;for(const{source:e}of t.targetLinks)r.add(e)}),++o>e)throw new Error("circular link");n=r,r=new Set}}(b),function(e){const r=function({nodes:t}){const e=Math.max(Ye(t,t=>t.depth)+1,0),r=(a-o-c)/(e-1),i=new Array(e).fill(0).map(()=>[]);for(const n of t){const t=Math.max(0,Math.min(e-1,Math.floor(f.call(null,n,e))));n.layer=t,n.x0=o+t*r,n.x1=n.x0+c,i[t]?i[t].push(n):i[t]=[n]}if(n)for(const t of i)t.sort(n);return i}(e);t=Math.min(l,(s-i)/(Ye(r,t=>t.length)-1)),function(e){const n=ep(e,e=>(s-i-(e.length-1)*t)/qe(e,yT));for(const r of e){let e=i;for(const o of r){o.y0=e,o.y1=e+o.value*n,e=o.y1+t;for(const t of o.sourceLinks)t.width=t.value*n}e=(s-e+t)/(r.length+1);for(let t=0;t<r.length;++t){const n=r[t];n.y0+=e*(t+1),n.y1+=e*(t+1)}w(r)}}(r);for(let t=0;t<h;++t){const e=Math.pow(.99,t),n=Math.max(1-e,(t+1)/h);y(r,e,n),m(r,e,n)}}(b),wT(b),b}function m(t,e,r){for(let o=1,i=t.length;o<i;++o){const i=t[o];for(const t of i){let n=0,r=0;for(const{source:e,value:o}of t.targetLinks){const i=o*(t.layer-e.layer);n+=j(e,t)*i,r+=i}if(!(r>0))continue;const o=(n/r-t.y0)*e;t.y0+=o,t.y1+=o,O(t)}void 0===n&&i.sort(mT),i.length&&b(i,r)}}function y(t,e,r){for(let o=t.length-2;o>=0;--o){const i=t[o];for(const t of i){let n=0,r=0;for(const{target:e,value:o}of t.sourceLinks){const i=o*(e.layer-t.layer);n+=k(t,e)*i,r+=i}if(!(r>0))continue;const o=(n/r-t.y0)*e;t.y0+=o,t.y1+=o,O(t)}void 0===n&&i.sort(mT),i.length&&b(i,r)}}function b(e,n){const r=e.length>>1,o=e[r];x(e,o.y0-t,r-1,n),v(e,o.y1+t,r+1,n),x(e,s,e.length-1,n),v(e,i,0,n)}function v(e,n,r,o){for(;r<e.length;++r){const i=e[r],a=(n-i.y0)*o;a>1e-6&&(i.y0+=a,i.y1+=a),n=i.y1+t}}function x(e,n,r,o){for(;r>=0;--r){const i=e[r],a=(i.y1-n)*o;a>1e-6&&(i.y0-=a,i.y1-=a),n=i.y0-t}}function O({sourceLinks:t,targetLinks:e}){if(void 0===r){for(const{source:{sourceLinks:t}}of e)t.sort(gT);for(const{target:{targetLinks:e}}of t)e.sort(hT)}}function w(t){if(void 0===r)for(const{sourceLinks:e,targetLinks:n}of t)e.sort(gT),n.sort(hT)}function j(e,n){let r=e.y0-(e.sourceLinks.length-1)*t/2;for(const{target:o,width:i}of e.sourceLinks){if(o===n)break;r+=i+t}for(const{source:t,width:o}of n.targetLinks){if(t===e)break;r-=o}return r}function k(e,n){let r=n.y0-(n.targetLinks.length-1)*t/2;for(const{source:o,width:i}of n.targetLinks){if(o===e)break;r+=i+t}for(const{target:t,width:o}of e.sourceLinks){if(t===n)break;r-=o}return r}return g.update=function(t){return wT(t),t},g.nodeId=function(t){return arguments.length?(u="function"==typeof t?t:pT(t),g):u},g.nodeAlign=function(t){return arguments.length?(f="function"==typeof t?t:pT(t),g):f},g.nodeDepth=function(t){return arguments.length?(e=t,g):e},g.nodeSort=function(t){return arguments.length?(n=t,g):n},g.nodeWidth=function(t){return arguments.length?(c=+t,g):c},g.nodePadding=function(e){return arguments.length?(l=t=+e,g):l},g.nodes=function(t){return arguments.length?(d="function"==typeof t?t:pT(t),g):d},g.links=function(t){return arguments.length?(p="function"==typeof t?t:pT(t),g):p},g.linkSort=function(t){return arguments.length?(r=t,g):r},g.size=function(t){return arguments.length?(o=i=0,a=+t[0],s=+t[1],g):[a-o,s-i]},g.extent=function(t){return arguments.length?(o=+t[0][0],a=+t[1][0],i=+t[0][1],s=+t[1][1],g):[[o,i],[a,s]]},g.iterations=function(t){return arguments.length?(h=+t,g):h},g}uT.props={};const kT={nodeAlign:"justify",nodeWidth:.008,nodePadding:.03,nodes:t=>t.nodes,links:t=>t.links,nodeSort:void 0,linkSort:void 0,iterations:6},AT={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?ep(t.sourceLinks,fT)-1:0},justify:dT};const MT=t=>e=>{const{nodeId:n,nodeSort:r,nodeAlign:o,nodeWidth:i,nodePadding:a,nodeDepth:s,nodes:c,links:l,linkSort:u,iterations:f}=Object.assign({},kT,t),d=jT().nodeSort(r).linkSort(u).links(l).nodes(c).nodeWidth(i).nodePadding(a).nodeDepth(s).nodeAlign(function(t){const e=typeof t;return"string"===e?AT[t]||dT:"function"===e?t:dT}(o)).iterations(f).extent([[0,0],[1,1]]);"function"==typeof n&&d.nodeId(n);const p=d(e),{nodes:h,links:g}=p,m=h.map(t=>{const{x0:e,x1:n,y0:r,y1:o}=t;return Object.assign(Object.assign({},t),{x:[e,n,n,e],y:[r,r,o,o]})}),y=g.map(t=>{const{source:e,target:n}=t,r=e.x1,o=n.x0,i=t.width/2;return Object.assign(Object.assign({},t),{x:[r,r,o,o],y:[t.y0+i,t.y0-i,t.y1+i,t.y1-i]})});return{nodes:m,links:y}};MT.props={};var _T=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const ST={nodeId:t=>t.key,nodeWidth:.02,nodePadding:.02},ET={type:"polygon",axis:!1,legend:!1,encode:{shape:"polygon",x:"x",y:"y"},scale:{x:{type:"identity"},y:{type:"identity"}},style:{stroke:"#000"}},PT={type:"polygon",axis:!1,legend:!1,encode:{shape:"ribbon",x:"x",y:"y"},style:{fillOpacity:.5,stroke:void 0}},LT={textAlign:t=>t.x[0]<.5?"start":"end",position:t=>t.x[0]<.5?"right":"left",fontSize:10},CT=t=>{const{data:e,encode:n={},scale:r,style:o={},layout:i={},nodeLabels:a=[],linkLabels:s=[],animate:c={},tooltip:l={},interaction:u,state:f={},viewStyle:d={}}=t,{links:p,nodes:h}=jm(e,n);if(!p||0===p.length)return[(0,N.A)({},ET,{data:[],encode:{},scale:r,style:xt(o,"node"),viewStyle:d,labels:[],tooltip:!1,animate:!1,axis:!1,interaction:u,state:{}}),(0,N.A)({},PT,{data:[],encode:{},labels:[],style:xt(o,"link"),tooltip:!1,animate:!1,interaction:u,state:{}})];const g=xt(n,"node"),m=xt(n,"link"),{key:y=t=>t.key,color:b=y}=g,{links:v,nodes:x}=MT(Object.assign(Object.assign(Object.assign({},ST),{nodeId:Om(y)}),i))({links:p,nodes:h}),O=xt(o,"label"),{text:w=y,spacing:j=5}=O,k=_T(O,["text","spacing"]),A=Om(y),M=sp(l,"node",{title:A,items:[{field:"value"}]},!0),_=sp(l,"link",{title:"",items:[t=>({name:"source",value:A(t.source)}),t=>({name:"target",value:A(t.target)})]}),[S,E]=Object.entries(f).reduce((t,[e,n])=>{const r=wt(n,"node","link"),o=xt(n,"node");t[0][e]=Object.assign(Object.assign({},r),o);const i=xt(n,"link");return t[1][e]=Object.assign(Object.assign({},r),i),t},[{},{}]);return[(0,N.A)({},ET,{data:x,encode:Object.assign(Object.assign({},g),{color:b}),scale:r,style:xt(o,"node"),viewStyle:d,labels:[Object.assign(Object.assign(Object.assign({},LT),{text:w,dx:t=>t.x[0]<.5?j:-j}),k),...a],tooltip:M,animate:up(c,"node"),axis:!1,interaction:u,state:S}),(0,N.A)({},PT,{data:v,encode:m,labels:s,style:Object.assign({fill:m.color?void 0:"#aaa",lineWidth:0},xt(o,"link")),tooltip:_,animate:up(c,"link"),interaction:u,state:E})]};function zT(t,e){return e.value-t.value}function TT(t,e){return e.frequency-t.frequency}function BT(t,e){return`${t.id}`.localeCompare(`${e.id}`)}function IT(t,e){return`${t.name}`.localeCompare(`${e.name}`)}CT.props={};const NT={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 RT(t){const{y:e,thickness:n,weight:r,marginRatio:o,id:i,source:s,target:c,sourceWeight:l,targetWeight:u,sortBy:f}=Object.assign(Object.assign({},NT),t);return function(t){const d=t.nodes.map(t=>Object.assign({},t)),p=t.edges.map(t=>Object.assign({},t));return function(t,e){e.forEach(t=>{t.source=s(t),t.target=c(t),t.sourceWeight=l(t),t.targetWeight=u(t)});const n=C(e,t=>t.source),r=C(e,t=>t.target);t.forEach(t=>{t.id=i(t);const e=n.has(t.id)?n.get(t.id):[],o=r.has(t.id)?r.get(t.id):[];t.frequency=e.length+o.length,t.value=qe(e,t=>t.sourceWeight)+qe(o,t=>t.targetWeight)})}(d,p),function(t){const e="function"==typeof f?f:a[f];e&&t.sort(e)}(d),function(t,i){const a=t.length;if(!a)throw mt("Invalid nodes: it's empty!");if(!r){const n=1/a;return t.forEach((t,r)=>{t.x=(r+.5)*n,t.y=e}),{nodes:t,edges:i}}const s=o/(2*a),c=t.reduce((t,e)=>t+e.value,0);t.reduce((t,r)=>{r.weight=r.value/c,r.width=r.weight*(1-o),r.height=n;const i=s+t,a=i+r.width,l=e-n/2,u=l+n;return r.x=[i,a,a,i],r.y=[l,l,u,u],t+r.width+2*s},0)}(d,p),function(t,n){const o=new Map(t.map(t=>[t.id,t]));if(!r)return n.forEach(t=>{const e=s(t),n=c(t),r=o.get(e),i=o.get(n);r&&i&&(t.x=[r.x,i.x],t.y=[r.y,i.y])}),{nodes:t,edges:n};n.forEach(t=>{t.x=[0,0,0,0],t.y=[e,e,e,e]});const i=C(n,t=>t.source),a=C(n,t=>t.target);t.forEach(t=>{const{width:e,x:n,value:r,id:o}=t,s=i.get(o)||[],c=a.get(o)||[];let l=0;s.map(t=>{const o=t.sourceWeight/r*e;t.x[0]=n[0]+l,t.x[1]=n[0]+l+o,l+=o}),c.forEach(t=>{const o=t.targetWeight/r*e;t.x[3]=n[0]+l,t.x[2]=n[0]+l+o,l+=o})})}(d,p),{nodes:d,edges:p}}}const FT=t=>e=>RT(t)(e);FT.props={};var DT=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const $T={y:0,thickness:.05,marginRatio:.1,id:t=>t.key,source:t=>t.source,target:t=>t.target,sourceWeight:t=>t.value||1,targetWeight:t=>t.value||1,sortBy:null},WT={type:"polygon",axis:!1,legend:!1,encode:{shape:"polygon",x:"x",y:"y"},scale:{x:{type:"identity"},y:{type:"identity"}},style:{opacity:1,fillOpacity:1,lineWidth:1}},HT={type:"polygon",axis:!1,legend:!1,encode:{shape:"ribbon",x:"x",y:"y"},style:{opacity:.5,lineWidth:1}},qT={position:"outside",fontSize:10},YT=(t,e)=>{const{data:n,encode:r={},scale:o,style:i={},layout:a={},nodeLabels:s=[],linkLabels:c=[],animate:l={},tooltip:u={}}=t,{nodes:f,links:d}=jm(n,r),p=xt(r,"node"),h=xt(r,"link"),{key:g=t=>t.key,color:m=g}=p,{linkEncodeColor:y=t=>t.source}=h,{nodeWidthRatio:b=$T.thickness,nodePaddingRatio:v=$T.marginRatio}=a,x=DT(a,["nodeWidthRatio","nodePaddingRatio"]),{nodes:O,edges:w}=FT(Object.assign(Object.assign(Object.assign(Object.assign({},$T),{id:Om(g),thickness:b,marginRatio:v}),x),{weight:!0}))({nodes:f,edges:d}),j=xt(i,"label"),{text:k=g}=j,A=DT(j,["text"]),M=sp(u,"node",{title:"",items:[t=>({name:t.key,value:t.value})]},!0),_=sp(u,"link",{title:"",items:[t=>({name:`${t.source} -> ${t.target}`,value:t.value})]}),{height:S,width:E}=e,P=Math.min(S,E);return[(0,N.A)({},HT,{data:w,encode:Object.assign(Object.assign({},h),{color:y}),labels:c,style:Object.assign({fill:y?void 0:"#aaa"},xt(i,"link")),tooltip:_,animate:up(l,"link")}),(0,N.A)({},WT,{data:O,encode:Object.assign(Object.assign({},p),{color:m}),scale:o,style:xt(i,"node"),coordinate:{type:"polar",outerRadius:(P-20)/P,startAngle:2*-Math.PI,endAngle:0},labels:[Object.assign(Object.assign(Object.assign({},qT),{text:k}),A),...s],tooltip:M,animate:up(l,"node"),axis:!1})]};YT.props={};var XT=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const GT={fontSize:10,text:t=>Ho(t.path),position:"inside",fill:"#000",textOverflow:"clip",wordWrap:!0,maxLines:1,wordWrapWidth:t=>t.x1-t.x0,isTreemapLabel:!0},VT={title:t=>{var e,n;return null===(n=null===(e=t.path)||void 0===e?void 0:e.join)||void 0===n?void 0:n.call(e,".")},items:[{field:"value"}]},KT={title:t=>Ho(t.path),items:[{field:"value"}]},UT=(t,e)=>{const{width:n,height:r,options:o}=e,{data:i,encode:a={},scale:s,style:c={},layout:l={},labels:u=[],tooltip:f={}}=t,d=XT(t,["data","encode","scale","style","layout","labels","tooltip"]),p=k(o,["interaction","treemapDrillDown"])||k(o,["marks",0,"interaction","treemapDrillDown"]),h=(0,N.A)({},((t,e)=>({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}))(n,r),l,{layer:p?t=>1===t.depth:l.layer}),[g,m]=rM(i,h,a),y=xt(c,"label");return(0,N.A)({},((t,e)=>({type:"rect",axis:!1,encode:{x:"x",y:"y",key:"id",color:t=>t.path[1]},scale:{x:{domain:[0,t],range:[0,1]},y:{domain:[0,e],range:[0,1]}},style:{stroke:"#fff"},state:{active:{opacity:.6},inactive:{opacity:1}}}))(n,r),Object.assign(Object.assign({data:g,scale:s,style:c,labels:[Object.assign(Object.assign(Object.assign({},GT),y),p&&{cursor:"pointer"}),...u]},d),{encode:a,tooltip:cp(f,VT),axis:!1}),p?{interaction:Object.assign(Object.assign({},d.interaction),{treemapDrillDown:p?Object.assign(Object.assign({},p),{originData:m,layout:h}):void 0}),encode:Object.assign({color:t=>Ho(t.path)},a),tooltip:cp(f,KT)}:{})};UT.props={};var ZT=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};function JT(t,e){return ep(t,t=>e[t])}function QT(t,e){return Ye(t,t=>e[t])}function tB(t,e){const n=2.5*eB(t,e)-1.5*rB(t,e);return ep(t,t=>e[t]>=n?e[t]:NaN)}function eB(t,e){return z_(t,.25,t=>e[t])}function nB(t,e){return z_(t,.5,t=>e[t])}function rB(t,e){return z_(t,.75,t=>e[t])}function oB(t,e){const n=2.5*rB(t,e)-1.5*eB(t,e);return Ye(t,t=>e[t]<=n?e[t]:NaN)}function iB(){return(t,e)=>{const{encode:n}=e,{y:r,x:o}=n,{value:i}=r,{value:a}=o,s=Array.from(C(t,t=>a[+t]).values()),c=s.flatMap(t=>{const e=tB(t,i),n=oB(t,i);return t.filter(t=>i[t]<e||i[t]>n)});return[c,e]}}const aB=t=>{const{data:e,encode:n,style:r={},tooltip:o={},animate:i}=t,a=ZT(t,["data","encode","style","tooltip","transform","animate"]),{point:s=!0}=r,c=ZT(r,["point"]),{y:l}=n,u={y:l,y1:l,y2:l,y3:l,y4:l},f={y1:eB,y2:nB,y3:rB},d=sp(o,"box",{items:[{channel:"y",name:"min"},{channel:"y1",name:"q1"},{channel:"y2",name:"q2"},{channel:"y3",name:"q3"},{channel:"y4",name:"max"}]},!0),p=sp(o,"point",{title:{channel:"x"},items:[{name:"outlier",channel:"y"}]});if(!s)return Object.assign({type:"box",data:e,transform:[Object.assign(Object.assign({type:"groupX",y:JT},f),{y4:QT})],encode:Object.assign(Object.assign({},n),u),style:c,tooltip:d},a);const h=xt(c,"box"),g=xt(c,"point");return[Object.assign({type:"box",data:e,transform:[Object.assign(Object.assign({type:"groupX",y:tB},f),{y4:oB})],encode:Object.assign(Object.assign({},n),u),style:h,tooltip:d,animate:up(i,"box")},a),{type:"point",data:e,transform:[{type:iB}],encode:n,style:Object.assign({},g),tooltip:p,animate:up(i,"point")}]};aB.props={};const sB=(t,e)=>Math.sqrt(Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2))/2,cB=(t,e)=>{if(!e)return;const{coordinate:n}=e;if(!(null==n?void 0:n.getCenter))return;const r=n.getCenter();return(n,o,i)=>{const{document:a}=e.canvas,{color:s,index:c}=o,l=a.createElement("g",{}),u=sB(n[0],n[1]),f=2*sB(n[0],r),d=((t,e,n)=>{const r=Math.atan2(t[1]-n[1],t[0]-n[0]);let o=Math.atan2(e[1]-n[1],e[0]-n[0])-r;return o<0&&(o+=2*Math.PI),o})(n[3],n[0],r)>Math.PI,p=a.createElement("path",{style:Object.assign(Object.assign(Object.assign({d:[["M",...n[0]],["A",u,u,0,1,0,...n[1]],["A",f+2*u,f+2*u,0,d?1:0,0,...n[2]],["A",u,u,0,1,0===c?0:1,...n[3]],["A",f,f,0,d?1:0,1,...n[0]],["Z"]]},i),di(t,["shape","last","first"])),{fill:s||i.color})});return l.appendChild(p),l}};var lB=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const uB={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"]}}},fB={style:{shape:(t,e)=>{const{radius:n}=t,r=lB(t,["shape","radius"]),o=xt(r,"pointer"),i=xt(r,"pin"),{shape:a}=o,s=lB(o,["shape"]),{shape:c}=i,u=lB(i,["shape"]),{coordinate:f,theme:d}=e;return(t,e)=>{const o=t.map(t=>f.invert(t)),[i,p,h]=function(t,e){const{transformations:n}=t.getOptions(),[,...r]=n.find(t=>t[0]===e);return r}(f,"polar"),g=f.clone(),{color:m}=e,y=Ke({startAngle:i,endAngle:p,innerRadius:h,outerRadius:n});y.push(["cartesian"]),g.update({transformations:y});const b=o.map(t=>g.map(t)),[v,x]=cc(b),[O,w]=f.getCenter(),j=Object.assign(Object.assign({x1:v,y1:x,x2:O,y2:w,stroke:m},s),r),k=Object.assign(Object.assign({cx:O,cy:w,stroke:m},u),r),A=_t(new l.YJ);return At(a)||("function"==typeof a?A.append(()=>a(b,e,g,d)):A.append("line").call(ec,j).node()),At(c)||("function"==typeof c?A.append(()=>c(b,e,g,d)):A.append("circle").call(ec,k).node()),A.node()}},lineWidth:4,pointerLineCap:"round",pinR:10,pinFill:"#fff",radius:.6}},dB={type:"text",style:{x:"50%",y:"60%",textAlign:"center",textBaseline:"middle",fontSize:20,fontWeight:800,fill:"#888"},tooltip:!1};function pB(t,e){const{name:n="score",target:r,total:o,percent:i,thresholds:a=[]}=function(t){if((0,tt.A)(t)){const e=Math.max(0,Math.min(t,1));return{percent:e,target:e,total:1}}return t}(t),s=i||r,c=i?1:o,l=Object.assign({y:{domain:[0,c]}},e);return a.length?{targetData:[{x:n,y:s,color:"target"}],totalData:a.map((t,e)=>({x:n,y:e>=1?t-a[e-1]:t,color:e})),target:s,total:c,scale:l}:{targetData:[{x:n,y:s,color:"target"}],totalData:[{x:n,y:s,color:"target"},{x:n,y:c-s,color:"total"}],target:s,total:c,scale:l}}function hB(t,{target:e,total:n}){const{content:r}=t;return r?r(e,n):e.toString()}const gB=t=>{const{data:e={},scale:n={},style:r={},animate:o={},transform:i=[]}=t,a=lB(t,["data","scale","style","animate","transform"]),{targetData:s,totalData:c,target:l,total:u,scale:f}=pB(e,n),d=xt(r,"text"),{tooltip:p}=d,h=lB(d,["tooltip"]),g=(m=["pointer","pin"],Object.fromEntries(Object.entries(r).filter(([t])=>m.find(e=>t.startsWith(e)))));var m;const y=xt(r,"arc");return[(0,N.A)({},uB,Object.assign({type:"interval",transform:[{type:"stackY"}],data:c,scale:f,style:"round"===y.shape?Object.assign(Object.assign({},y),{shape:cB}):y,animate:"object"==typeof o?xt(o,"arc"):o},a)),(0,N.A)({},uB,fB,Object.assign({type:"point",data:s,scale:f,style:g,animate:"object"==typeof o?xt(o,"indicator"):o},a)),(0,N.A)({},dB,{style:Object.assign({text:hB(h,{target:l,total:u})},h),tooltip:p,animate:"object"==typeof o?xt(o,"text"):o})]};gB.props={};function mB(t,e,n){return t+(e-t)*n}function yB(t,e,n,r){return 0===e?[[t+.5*n/Math.PI/2,r/2],[t+.5*n/Math.PI,r],[t+n/4,r]]:1===e?[[t+.5*n/Math.PI/2*(Math.PI-2),r],[t+.5*n/Math.PI/2*(Math.PI-1),r/2],[t+n/4,0]]:2===e?[[t+.5*n/Math.PI/2,-r/2],[t+.5*n/Math.PI,-r],[t+n/4,-r]]:[[t+.5*n/Math.PI/2*(Math.PI-2),-r],[t+.5*n/Math.PI/2*(Math.PI-1),-r/2],[t+n/4,0]]}function bB(t,e,n,r,o,i,a){const s=4*Math.ceil(2*t/n*4),c=[];let l=r;for(;l<2*-Math.PI;)l+=2*Math.PI;for(;l>0;)l-=2*Math.PI;l=l/Math.PI/2*n;const u=i-t+l-2*t;c.push(["M",u,e]);let f=0;for(let t=0;t<s;++t){const r=yB(t*n/4,t%4,n,o);c.push(["C",r[0][0]+u,-r[0][1]+e,r[1][0]+u,-r[1][1]+e,r[2][0]+u,-r[2][1]+e]),t===s-1&&(f=r[2][0])}return c.push(["L",f+u,a+t]),c.push(["L",u,a+t]),c.push(["Z"]),c}const vB={pin:function(t,e,n){const r=4*n/3,o=Math.max(r,2*n),i=r/2,a=t,s=i+e-o/2,c=Math.asin(i/(.85*(o-i))),l=Math.sin(c)*i,u=Math.cos(c)*i,f=a-u,d=s+l,p=t,h=s+i/Math.sin(c);return`\n M ${f} ${d}\n A ${i} ${i} 0 1 1 ${f+2*u} ${d}\n Q ${p} ${h} ${t} ${e+o/2}\n Q ${p} ${h} ${f} ${d}\n Z \n `},rect:function(t,e,n){const r=.618*n;return`\n M ${t-r} ${e-n}\n L ${t+r} ${e-n}\n L ${t+r} ${e+n}\n L ${t-r} ${e+n}\n Z\n `},circle:function(t,e,n){return`\n M ${t} ${e-n} \n a ${n} ${n} 0 1 0 0 ${2*n}\n a ${n} ${n} 0 1 0 0 ${2*-n}\n Z\n `},diamond:function(t,e,n){return`\n M ${t} ${e-n}\n L ${t+n} ${e}\n L ${t} ${e+n}\n L ${t-n} ${e}\n Z\n `},triangle:function(t,e,n){return`\n M ${t} ${e-n}\n L ${t+n} ${e+n}\n L ${t-n} ${e+n}\n Z\n `}};var xB=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const OB=(t,e)=>{if(!e)return;const{coordinate:n}=e,{liquidOptions:r,styleOptions:o}=t,{liquidShape:i,percent:a}=r,{background:s,outline:c={},wave:l={}}=o,u=xB(o,["background","outline","wave"]),{border:f=2,distance:d=0}=c,p=xB(c,["border","distance"]),{length:h=192,count:g=3}=l;return(t,r,o)=>{const{document:c}=e.canvas,{color:l,fillOpacity:m}=o,y=Object.assign(Object.assign({fill:l},o),u),b=c.createElement("g",{}),[v,x]=n.getCenter(),O=n.getSize(),w=Math.min(...O)/2,j=(0,Jn.A)(i)?i:((t="circle")=>vB[t]||vB.circle)(i),k=j(v,x,w,...O),A=j(v,x,w+f/2,...O);if(Object.keys(s).length){const t=c.createElement("path",{style:Object.assign({d:k,fill:"#fff"},s)});b.appendChild(t)}if(a>0){const t=c.createElement("path",{style:{d:A}});b.appendChild(t),b.style.clipPath=t,function(t,e,n,r,o,i,a,s,c,l,u){const{fill:f,fillOpacity:d,opacity:p}=o;for(let o=0;o<r;o++){const h=r<=1?1:o/(r-1),g=bB(s,a+s*n,c,0,s/40,t,e),m=u.createElement("path",{style:{d:g,fill:f,opacity:mB(.2,.9,h)*Number(p||d)}});i.appendChild(m);try{if(!1===l)return;m.animate([{transform:"translate(0, 0)"},{transform:`translate(${2*c}, 0)`}],{duration:2*mB(2500,5e3,h),iterations:1/0})}catch(t){console.warn("off-screen group animate error!")}}}(v,x,1-a,g,y,b,t.getBBox().y,2*w,h,!0,c)}const M=c.createElement("path",{style:{d:k,fill:"transparent",lineWidth:f+2*d,stroke:"#fff"}}),_=c.createElement("path",{style:Object.assign(Object.assign(Object.assign({d:k,stroke:l,strokeOpacity:m,lineWidth:f},y),p),{fill:"transparent"})});return b.appendChild(M),b.appendChild(_),b}};OB.props={};var wB=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const jB={axis:{x:!1,y:!1},legend:!1,tooltip:!1,encode:{x:"type",y:"percent"},scale:{y:{domain:[0,1]}},style:{shape:OB},animate:{enter:{type:"fadeIn"}}},kB={type:"text",style:{x:"50%",y:"50%",textAlign:"center",textBaseline:"middle",fontSize:20,fontWeight:800,fill:"#888"},animate:{enter:{type:"fadeIn"}}},AB=t=>{const{data:e={},style:n={},animate:r}=t,o=wB(t,["data","style","animate"]),i=Math.max(0,(0,tt.A)(e)?e:null==e?void 0:e.percent),a=[{percent:i,type:"liquid"}],s=Object.assign(Object.assign({},xt(n,"text")),xt(n,"content")),c=xt(n,"outline"),l=xt(n,"wave"),u=xt(n,"background");return[(0,N.A)({},jB,Object.assign({type:"interval",data:a,style:{liquidOptions:{percent:i,liquidShape:null==n?void 0:n.shape},styleOptions:Object.assign(Object.assign({},n),{outline:c,wave:l,background:u})},animate:r},o)),(0,N.A)({},kB,{style:Object.assign({text:`${Ze(100*i)} %`},s),animate:r})]};function MB(t){const e=new Array(t);for(let n=0;n<t;++n)e[n]=0;return e}function _B(t,e){return MB(t).map(()=>MB(e))}function SB(t,e){let n=0;for(let r=0;r<t.length;++r)n+=t[r]*e[r];return n}function EB(t){return Math.sqrt(SB(t,t))}function PB(t,e,n){for(let r=0;r<e.length;++r)t[r]=e[r]*n}function LB(t,e,n,r,o){for(let i=0;i<t.length;++i)t[i]=e*n[i]+r*o[i]}function CB(t,e,n,r,o,i,a){const s=n.fx,c=SB(n.fxprime,e);let l=s,u=s,f=c,d=0;function p(u,d,p){for(let h=0;h<16;++h)if(LB(r.x,1,n.x,o=(u+d)/2,e),l=r.fx=t(r.x,r.fxprime),f=SB(r.fxprime,e),l>s+i*o*c||l>=p)d=o;else{if(Math.abs(f)<=-a*c)return o;f*(d-u)>=0&&(d=u),u=o,p=l}return 0}o=o||1,i=i||1e-6,a=a||.1;for(let h=0;h<10;++h){if(LB(r.x,1,n.x,o,e),l=r.fx=t(r.x,r.fxprime),f=SB(r.fxprime,e),l>s+i*o*c||h&&l>=u)return p(d,o,u);if(Math.abs(f)<=-a*c)return o;if(f>=0)return p(o,d,l);u=l,d=o,o*=2}return o}function zB(t,e,n){let r={x:e.slice(),fx:0,fxprime:e.slice()},o={x:e.slice(),fx:0,fxprime:e.slice()};const i=e.slice();let a,s=1;const c=(n=n||{}).maxIterations||20*e.length;r.fx=t(r.x,r.fxprime);const l=r.fxprime.slice();PB(l,r.fxprime,-1);for(let e=0;e<c;++e){if(s=CB(t,l,r,o,s),n.history&&n.history.push({x:r.x.slice(),fx:r.fx,fxprime:r.fxprime.slice(),alpha:s}),s){LB(i,1,o.fxprime,-1,r.fxprime);const t=SB(r.fxprime,r.fxprime);LB(l,Math.max(0,SB(i,o.fxprime)/t),l,-1,o.fxprime),a=r,r=o,o=a}else PB(l,r.fxprime,-1);if(EB(r.fxprime)<=1e-5)break}return n.history&&n.history.push({x:r.x.slice(),fx:r.fx,fxprime:r.fxprime.slice(),alpha:s}),r}AB.props={};const TB=1e-10;function BB(t,e){const n=function(t){const e=[];for(let n=0;n<t.length;++n)for(let r=n+1;r<t.length;++r){const o=FB(t[n],t[r]);for(let t=0;t<o.length;++t){const i=o[t];i.parentIndex=[n,r],e.push(i)}}return e}(t),r=n.filter(function(e){return function(t,e){for(let n=0;n<e.length;++n)if(NB(t,e[n])>e[n].radius+TB)return!1;return!0}(e,t)});let o,i=0,a=0;const s=[];if(r.length>1){const e=function(t){const e={x:0,y:0};for(let n=0;n<t.length;++n)e.x+=t[n].x,e.y+=t[n].y;return e.x/=t.length,e.y/=t.length,e}(r);for(o=0;o<r.length;++o){const t=r[o];t.angle=Math.atan2(t.x-e.x,t.y-e.y)}r.sort(function(t,e){return e.angle-t.angle});let n=r[r.length-1];for(o=0;o<r.length;++o){const e=r[o];a+=(n.x+e.x)*(e.y-n.y);const c={x:(e.x+n.x)/2,y:(e.y+n.y)/2};let l=null;for(let r=0;r<e.parentIndex.length;++r)if(n.parentIndex.indexOf(e.parentIndex[r])>-1){const o=t[e.parentIndex[r]],i=Math.atan2(e.x-o.x,e.y-o.y),a=Math.atan2(n.x-o.x,n.y-o.y);let s=a-i;s<0&&(s+=2*Math.PI);const u=a-s/2;let f=NB(c,{x:o.x+o.radius*Math.sin(u),y:o.y+o.radius*Math.cos(u)});f>2*o.radius&&(f=2*o.radius),(null===l||l.width>f)&&(l={circle:o,width:f,p1:e,p2:n})}null!==l&&(s.push(l),i+=IB(l.circle.radius,l.width),n=e)}}else{let e=t[0];for(o=1;o<t.length;++o)t[o].radius<e.radius&&(e=t[o]);let n=!1;for(o=0;o<t.length;++o)if(NB(t[o],e)>Math.abs(e.radius-t[o].radius)){n=!0;break}n?i=a=0:(i=e.radius*e.radius*Math.PI,s.push({circle:e,p1:{x:e.x,y:e.y+e.radius},p2:{x:e.x-TB,y:e.y+e.radius},width:2*e.radius}))}return a/=2,e&&(e.area=i+a,e.arcArea=i,e.polygonArea=a,e.arcs=s,e.innerPoints=r,e.intersectionPoints=n),i+a}function IB(t,e){return t*t*Math.acos(1-e/t)-(t-e)*Math.sqrt(e*(2*t-e))}function NB(t,e){return Math.sqrt((t.x-e.x)*(t.x-e.x)+(t.y-e.y)*(t.y-e.y))}function RB(t,e,n){if(n>=t+e)return 0;if(n<=Math.abs(t-e))return Math.PI*Math.min(t,e)*Math.min(t,e);const r=e-(n*n-t*t+e*e)/(2*n);return IB(t,t-(n*n-e*e+t*t)/(2*n))+IB(e,r)}function FB(t,e){const n=NB(t,e),r=t.radius,o=e.radius;if(n>=r+o||n<=Math.abs(r-o))return[];const i=(r*r-o*o+n*n)/(2*n),a=Math.sqrt(r*r-i*i),s=t.x+i*(e.x-t.x)/n,c=t.y+i*(e.y-t.y)/n,l=a/n*-(e.y-t.y),u=a/n*-(e.x-t.x);return[{x:s+l,y:c-u},{x:s-l,y:c+u}]}function DB(t,e){(e=e||{}).maxIterations=e.maxIterations||500;const n=e.initialLayout||HB,r=e.lossFunction||qB;t=function(t){t=t.slice();const e=[],n={};let r,o,i,a;for(r=0;r<t.length;++r){const o=t[r];1==o.sets.length?e.push(o.sets[0]):2==o.sets.length&&(i=o.sets[0],a=o.sets[1],n[[i,a]]=!0,n[[a,i]]=!0)}for(e.sort((t,e)=>t>e?1:-1),r=0;r<e.length;++r)for(i=e[r],o=r+1;o<e.length;++o)a=e[o],[i,a]in n||t.push({sets:[i,a],size:0});return t}(t);const o=n(t,e),i=[],a=[];let s;for(s in o)o.hasOwnProperty(s)&&(i.push(o[s].x),i.push(o[s].y),a.push(s));const c=function(t,e,n){const r=(n=n||{}).maxIterations||200*e.length,o=n.nonZeroDelta||1.05,i=n.zeroDelta||.001,a=n.minErrorDelta||1e-6,s=n.minErrorDelta||1e-5,c=void 0!==n.rho?n.rho:1,l=void 0!==n.chi?n.chi:2,u=void 0!==n.psi?n.psi:-.5,f=void 0!==n.sigma?n.sigma:.5;let d;const p=e.length,h=new Array(p+1);h[0]=e,h[0].fx=t(e),h[0].id=0;for(let n=0;n<p;++n){const r=e.slice();r[n]=r[n]?r[n]*o:i,h[n+1]=r,h[n+1].fx=t(r),h[n+1].id=n+1}function g(t){for(let e=0;e<t.length;e++)h[p][e]=t[e];h[p].fx=t.fx}const m=(t,e)=>t.fx-e.fx,y=e.slice(),b=e.slice(),v=e.slice(),x=e.slice();for(let e=0;e<r;++e){if(h.sort(m),n.history){const t=h.map(t=>{const e=t.slice();return e.fx=t.fx,e.id=t.id,e});t.sort((t,e)=>t.id-e.id),n.history.push({x:h[0].slice(),fx:h[0].fx,simplex:t})}d=0;for(let t=0;t<p;++t)d=Math.max(d,Math.abs(h[0][t]-h[1][t]));if(Math.abs(h[0].fx-h[p].fx)<a&&d<s)break;for(let t=0;t<p;++t){y[t]=0;for(let e=0;e<p;++e)y[t]+=h[e][t];y[t]/=p}const e=h[p];if(LB(b,1+c,y,-c,e),b.fx=t(b),b.fx<h[0].fx)LB(x,1+l,y,-l,e),x.fx=t(x),g(x.fx<b.fx?x:b);else if(b.fx>=h[p-1].fx){let n=!1;if(b.fx>e.fx?(LB(v,1+u,y,-u,e),v.fx=t(v),v.fx<e.fx?g(v):n=!0):(LB(v,1-u*c,y,u*c,e),v.fx=t(v),v.fx<b.fx?g(v):n=!0),n){if(f>=1)break;for(let e=1;e<h.length;++e)LB(h[e],1-f,h[0],f,h[e]),h[e].fx=t(h[e])}}else g(b)}return h.sort(m),{fx:h[0].fx,x:h[0]}}(function(e){const n={};for(let t=0;t<a.length;++t){const r=a[t];n[r]={x:e[2*t],y:e[2*t+1],radius:o[r].radius}}return r(n,t)},i,e),l=c.x;for(let t=0;t<a.length;++t)s=a[t],o[s].x=l[2*t],o[s].y=l[2*t+1];return o}const $B=1e-10;function WB(t,e,n){return Math.min(t,e)*Math.min(t,e)*Math.PI<=n+1e-10?Math.abs(t-e):function(t,e,n,r){const o=(r=r||{}).maxIterations||100,i=r.tolerance||1e-10,a=t(e),s=t(n);let c=n-e;if(a*s>0)throw"Initial bisect points must have opposite signs";if(0===a)return e;if(0===s)return n;for(let n=0;n<o;++n){c/=2;const n=e+c,r=t(n);if(r*a>=0&&(e=n),Math.abs(c)<i||0===r)return n}return e+c}(function(r){return RB(t,e,r)-n},0,t+e)}function HB(t,e){let n=function(t,e){const n=e&&e.lossFunction?e.lossFunction:qB,r={},o={};let i;for(let e=0;e<t.length;++e){const n=t[e];1==n.sets.length&&(i=n.sets[0],r[i]={x:1e10,y:1e10,rowid:Object.keys(r).length,size:n.size,radius:Math.sqrt(n.size/Math.PI)},o[i]=[])}t=t.filter(function(t){return 2==t.sets.length});for(let e=0;e<t.length;++e){const n=t[e];let i=n.hasOwnProperty("weight")?n.weight:1;const a=n.sets[0],s=n.sets[1];n.size+$B>=Math.min(r[a].size,r[s].size)&&(i=0),o[a].push({set:s,size:n.size,weight:i}),o[s].push({set:a,size:n.size,weight:i})}const a=[];for(i in o)if(o.hasOwnProperty(i)){let t=0;for(let e=0;e<o[i].length;++e)t+=o[i][e].size*o[i][e].weight;a.push({set:i,size:t})}function s(t,e){return e.size-t.size}a.sort(s);const c={};function l(t){return t.set in c}function u(t,e){r[e].x=t.x,r[e].y=t.y,c[e]=!0}u({x:0,y:0},a[0].set);for(let e=1;e<a.length;++e){const c=a[e].set,f=o[c].filter(l);if(i=r[c],f.sort(s),0===f.length)throw"ERROR: missing pairwise overlap information";const d=[];for(let t=0;t<f.length;++t){const e=r[f[t].set],n=WB(i.radius,e.radius,f[t].size);d.push({x:e.x+n,y:e.y}),d.push({x:e.x-n,y:e.y}),d.push({y:e.y+n,x:e.x}),d.push({y:e.y-n,x:e.x});for(let o=t+1;o<f.length;++o){const t=r[f[o].set],a=WB(i.radius,t.radius,f[o].size),s=FB({x:e.x,y:e.y,radius:n},{x:t.x,y:t.y,radius:a});for(let t=0;t<s.length;++t)d.push(s[t])}}let p=1e50,h=d[0];for(let e=0;e<d.length;++e){r[c].x=d[e].x,r[c].y=d[e].y;const o=n(r,t);o<p&&(p=o,h=d[e])}u(h,c)}return r}(t,e);const r=e.lossFunction||qB;if(t.length>=8){const o=function(t,e){e=e||{};const n=e.restarts||10,r=[],o={};let i;for(i=0;i<t.length;++i){const e=t[i];1==e.sets.length&&(o[e.sets[0]]=r.length,r.push(e))}const a=function(t,e,n){const r=_B(e.length,e.length),o=_B(e.length,e.length);return t.filter(function(t){return 2==t.sets.length}).map(function(t){const i=n[t.sets[0]],a=n[t.sets[1]],s=WB(Math.sqrt(e[i].size/Math.PI),Math.sqrt(e[a].size/Math.PI),t.size);r[i][a]=r[a][i]=s;let c=0;t.size+1e-10>=Math.min(e[i].size,e[a].size)?c=1:t.size<=1e-10&&(c=-1),o[i][a]=o[a][i]=c}),{distances:r,constraints:o}}(t,r,o);let s=a.distances;const c=a.constraints,l=EB(s.map(EB))/s.length;s=s.map(function(t){return t.map(function(t){return t/l})});const u=function(t,e){return function(t,e,n,r){let o,i=0;for(o=0;o<e.length;++o)e[o]=0;for(o=0;o<n.length;++o){const a=t[2*o],s=t[2*o+1];for(let c=o+1;c<n.length;++c){const l=t[2*c],u=t[2*c+1],f=n[o][c],d=r[o][c],p=(l-a)*(l-a)+(u-s)*(u-s),h=Math.sqrt(p),g=p-f*f;d>0&&h<=f||d<0&&h>=f||(i+=2*g*g,e[2*o]+=4*g*(a-l),e[2*o+1]+=4*g*(s-u),e[2*c]+=4*g*(l-a),e[2*c+1]+=4*g*(u-s))}}return i}(t,e,s,c)};let f,d;for(i=0;i<n;++i){d=zB(u,MB(2*s.length).map(Math.random),e),(!f||d.fx<f.fx)&&(f=d)}const p=f.x,h={};for(i=0;i<r.length;++i){const t=r[i];h[t.sets[0]]={x:p[2*i]*l,y:p[2*i+1]*l,radius:Math.sqrt(t.size/Math.PI)}}if(e.history)for(i=0;i<e.history.length;++i)PB(e.history[i].x,l);return h}(t,e);r(o,t)+1e-8<r(n,t)&&(n=o)}return n}function qB(t,e){let n=0;function r(e){return e.map(function(e){return t[e]})}for(let o=0;o<e.length;++o){const i=e[o];let a;if(1==i.sets.length)continue;if(2==i.sets.length){const e=t[i.sets[0]],n=t[i.sets[1]];a=RB(e.radius,n.radius,NB(e,n))}else a=BB(r(i.sets));n+=(i.hasOwnProperty("weight")?i.weight:1)*(a-i.size)*(a-i.size)}return n}function YB(t){const e=function(e){const n=Math.max.apply(null,t.map(function(t){return t[e]+t.radius})),r=Math.min.apply(null,t.map(function(t){return t[e]-t.radius}));return{max:n,min:r}};return{xRange:e("x"),yRange:e("y")}}const XB=t=>{const{sets:e="sets",size:n="size",as:r=["key","path"],padding:o=0}=t,[i,a]=r;return t=>{const r=t.map(t=>Object.assign(Object.assign({},t),{sets:t[e],size:t[n],[i]:t.sets.join("&")}));r.sort((t,e)=>t.sets.length-e.sets.length);const s=DB(r);let c;return r.map(t=>{const n=t[e];return Object.assign(Object.assign({},t),{[a]:({width:t,height:e})=>{c=c||function(t,e,n,r){const o=[],i=[];for(const e in t)t.hasOwnProperty(e)&&(i.push(e),o.push(t[e]));e-=2*r,n-=2*r;const a=YB(o),s=a.xRange,c=a.yRange;if(s.max==s.min||c.max==c.min)return console.log("not scaling solution: zero size detected"),t;const l=Math.min(n/(c.max-c.min),e/(s.max-s.min)),u=(e-(s.max-s.min)*l)/2,f=(n-(c.max-c.min)*l)/2,d={};for(let t=0;t<o.length;++t){const e=o[t];d[i[t]]={radius:l*e.radius,x:r+u+(e.x-s.min)*l,y:r+f+(e.y-c.min)*l}}return d}(s,t,e,o);const r=n.map(t=>c[t]);let i=function(t){const e={};BB(t,e);const n=e.arcs;if(0===n.length)return"M 0 0";if(1==n.length){const t=n[0].circle;return function(t,e,n){const r=[],o=t-n,i=e;return r.push("M",o,i),r.push("A",n,n,0,1,0,o+2*n,i),r.push("A",n,n,0,1,0,o,i),r.join(" ")}(t.x,t.y,t.radius)}{const t=["\nM",n[0].p2.x,n[0].p2.y];for(let e=0;e<n.length;++e){const r=n[e],o=r.circle.radius;t.push("\nA",o,o,0,r.width>o?1:0,1,r.p1.x,r.p1.y)}return t.join(" ")}}(r);return/[zZ]$/.test(i)||(i+=" Z"),i}})})}};function GB(){var t=1,e=1,n=0,r=!1;function o(o){var i=o.height+1;return o.x0=o.y0=n,o.x1=t,o.y1=e/i,o.eachBefore(function(t,e){return function(r){r.children&&YA(r,r.x0,t*(r.depth+1)/e,r.x1,t*(r.depth+2)/e);var o=r.x0,i=r.y0,a=r.x1-n,s=r.y1-n;a<o&&(o=a=(o+a)/2),s<i&&(i=s=(i+s)/2),r.x0=o,r.y0=i,r.x1=a,r.y1=s}}(e,i)),r&&o.eachBefore(JA),o}return o.round=function(t){return arguments.length?(r=!!t,o):r},o.size=function(n){return arguments.length?(t=+n[0],e=+n[1],o):[t,e]},o.padding=function(t){return arguments.length?(n=+t,o):n},o}XB.props={};const VB={field:"value",size:[1,1],round:!1,padding:0,sort:(t,e)=>e.value-t.value,as:["x","y"],ignoreParentValue:!0},KB="childNodeCount",UB="Invalid field: it must be a string!";function ZB(t,e){const n=(e=xw({},VB,e)).as;if(!(0,Le.A)(n)||2!==n.length)throw new TypeError('Invalid as: it must be an array with 2 strings (e.g. [ "x", "y" ])!');let r;try{r=function(t,e){const{field:n,fields:r}=t;if((0,j.A)(n))return n;if((0,Le.A)(n))return console.warn(UB),n[0];if(console.warn(`${UB} will try to get fields instead.`),(0,j.A)(r))return r;if((0,Le.A)(r)&&r.length)return r[0];if(e)return e;throw new TypeError(UB)}(e)}catch(t){console.warn(t)}const o=(t=>GB().size(e.size).round(e.round).padding(e.padding)(BA.Ay(t).sum(t=>hs(t.children)?e.ignoreParentValue?0:t[r]-fi(t.children,(t,e)=>t+e[r],0):t[r]).sort(e.sort)))(t),i=n[0],a=n[1];return o.each(t=>{var e,r;t[i]=[t.x0,t.x1,t.x1,t.x0],t[a]=[t.y1,t.y1,t.y0,t.y0],t.name=t.name||(null===(e=t.data)||void 0===e?void 0:e.name)||(null===(r=t.data)||void 0===r?void 0:r.label),t.data.name=t.name,["x0","x1","y0","y1"].forEach(e=>{-1===n.indexOf(e)&&delete t[e]})}),function(t){const e=[];if(t&&t.each){let n,r;t.each(t=>{var o,i;t.parent!==n?(n=t.parent,r=0):r+=1;const a=ol(((null===(o=t.ancestors)||void 0===o?void 0:o.call(t))||[]).map(t=>e.find(e=>e.name===t.name)||t),({depth:e})=>e>0&&e<t.depth);t.nodeAncestor=a,t[KB]=(null===(i=t.children)||void 0===i?void 0:i.length)||0,t.nodeIndex=r,e.push(t)})}else t&&t.eachNode&&t.eachNode(t=>{e.push(t)});return e}(o)}var JB=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const QB="sunburst",tI="markType",eI="path",nI="ancestor-node";const rI={id:QB,encode:{x:"x",y:"y",key:eI,color:nI,value:"value"},axis:{x:!1,y:!1},style:{[tI]:QB,stroke:"#fff",lineWidth:.5,fillOpacity:"fillOpacity",[KB]:KB,depth:"depth"},state:{active:{zIndex:2,stroke:"#000"},inactive:{zIndex:1,stroke:"#fff"}},legend:!1,interaction:{drillDown:!0},coordinate:{type:"polar",innerRadius:.2}},oI=t=>{const{encode:e,data:n=[]}=t,r=JB(t,["encode","data"]),o=Object.assign(Object.assign({},r.coordinate),{innerRadius:Math.max(k(r,["coordinate","innerRadius"],.2),1e-5)}),i=Object.assign(Object.assign({},rI.encode),e),{value:a}=i,s=function(t){const{data:e,encode:n}=t,{color:r,value:o}=n,i=ZB(e,{field:o,type:"hierarchy.partition",as:["x","y"]}),a=[];return i.forEach(t=>{var e,n,i,s;if(0===t.depth)return null;let c=t.data.name;const l=[c];let u=Object.assign({},t);for(;u.depth>1;)c=`${null===(e=u.parent.data)||void 0===e?void 0:e.name} / ${c}`,l.unshift(null===(n=u.parent.data)||void 0===n?void 0:n.name),u=u.parent;const f=Object.assign(Object.assign(Object.assign({},CA(t.data,[o])),{[eI]:c,[nI]:u.data.name}),t);r&&r!==nI&&(f[r]=t.data[r]||(null===(s=null===(i=t.parent)||void 0===i?void 0:i.data)||void 0===s?void 0:s[r])),a.push(f)}),a.map(t=>{const e=t.x.slice(0,2),n=[t.y[2],t.y[0]];return e[0]===e[1]&&(n[0]=n[1]=(t.y[2]+t.y[0])/2),Object.assign(Object.assign({},t),{x:e,y:n,fillOpacity:Math.pow(.85,t.depth)})})}({encode:i,data:n});return[(0,N.A)({},rI,Object.assign(Object.assign({type:"rect",data:s,encode:i,tooltip:{title:"path",items:[t=>({name:a,value:t[a]})]}},r),{coordinate:o}))]};oI.props={};var iI=function(t,e,n,r){return new(n||(n=Promise))(function(o,i){function a(t){try{c(r.next(t))}catch(t){i(t)}}function s(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){t.done?o(t.value):function(t){return t instanceof n?t:new n(function(e){e(t)})}(t.value).then(a,s)}c((r=r.apply(t,e||[])).next())})};const aI={rootText:"root",style:{fill:"rgba(0, 0, 0, 0.85)",fontSize:12,y:1},active:{fill:"rgba(0, 0, 0, 0.5)"}};function sI(t={}){const{breadCrumb:e={},isFixedColor:n=!1}=t,r=(0,N.A)({},aI,e);return t=>{const{update:e,setState:o,container:i,view:a,options:s}=t,c=i.ownerDocument,l=_t(i).select(".plot").node();const u=s.marks.find(({id:t})=>t===QB),{state:f}=u,d=c.createElement("g");l.appendChild(d);const p=(t,i)=>iI(this,void 0,void 0,function*(){if(d.removeChildren(),t){const e=c.createElement("text",{style:Object.assign({x:0,text:r.rootText,depth:0},r.style)});d.appendChild(e);let n="";const o=null==t?void 0:t.split(" / ");let i=r.style.y,a=d.getBBox().width;const s=l.getBBox().width,u=o.map((t,e)=>{const o=c.createElement("text",{style:Object.assign(Object.assign({x:a,text:" / "},r.style),{y:i})});d.appendChild(o),a+=o.getBBox().width,n=`${n}${t} / `;const l=c.createElement("text",{name:n.replace(/\s\/\s$/,""),style:Object.assign(Object.assign({text:t,x:a,depth:e+1},r.style),{y:i})});return d.appendChild(l),a+=l.getBBox().width,a>s&&(i=d.getBBox().height,a=0,o.attr({x:a,y:i}),a+=o.getBBox().width,l.attr({x:a,y:i}),a+=l.getBBox().width),l});[e,...u].forEach((t,e)=>{if(e===u.length)return;const n=Object.assign({},t.attributes);t.attr("cursor","pointer"),t.addEventListener("mouseenter",()=>{t.attr(r.active)}),t.addEventListener("mouseleave",()=>{t.attr(n)}),t.addEventListener("click",()=>{p(t.name,k(t,["style","depth"]))})})}o("drillDown",e=>{const{marks:r}=e,o=r.map(e=>{if(e.id!==QB&&"rect"!==e.type)return e;const{data:r}=e,o=Object.fromEntries(["color"].map(t=>[t,{domain:a.scale[t].getOptions().domain}])),s=r.filter(e=>{const r=e.path;if(n||(e[nI]=r.split(" / ")[i]),!t)return!0;return new RegExp(`^${t}.+`).test(r)});return(0,N.A)({},e,n?{data:s,scale:o}:{data:s})});return Object.assign(Object.assign({},e),{marks:o})}),yield e()}),h=t=>{const e=t.target;if(k(e,["style",tI])!==QB||"rect"!==k(e,["markType"])||!k(e,["style",KB]))return;const n=k(e,["__data__","key"]),r=k(e,["style","depth"]);e.style.cursor="pointer",p(n,r)};l.addEventListener("click",h);const g=SA(Object.assign(Object.assign({},f.active),f.inactive)),m=()=>{const t=(t=>t.querySelectorAll(".element").filter(t=>k(t,["style",tI])===QB))(l);t.forEach(t=>{const e=k(t,["style",KB]);if("pointer"!==k(t,["style","cursor"])&&e){t.style.cursor="pointer";const e=CA(t.attributes,g);t.addEventListener("mouseenter",()=>{t.attr(f.active)}),t.addEventListener("mouseleave",()=>{t.attr((0,N.A)(e,f.inactive))})}})};return l.addEventListener("mousemove",m),()=>{d.remove(),l.removeEventListener("click",h),l.removeEventListener("mousemove",m)}}}var cI=n("./node_modules/.pnpm/antd@6.6.8_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/es/theme/index.js"),lI=n("./node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/isEqual.js"),uI=n.n(lI),fI=n("./node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/cloneDeep.js"),dI=n.n(fI),pI=n("./node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/merge.js"),hI=n.n(pI),gI=n("./src/utils/antd.tsx"),mI=n("./src/utils/browserDownload.ts"),yI=n("./src/utils/dashEvents.ts"),bI=n("./src/utils/dash3.ts"),vI=n("./src/utils/funcs.ts"),xI=n("./src/utils/useDeepCompareSignal.ts"),OI=n("./src/utils/visualizationTheme.ts"),wI=n("./src/components/fragments/ImageExportButton.tsx");const jI=function(t,e){return class extends t{constructor(t){super(Object.assign(Object.assign({},t),{lib:e}))}}}(class extends vg{constructor(t){const{container:e,canvas:n,renderer:r,plugins:o,lib:i,createCanvas:a}=t;super(kg(t,["container","canvas","renderer","plugins","lib","createCanvas"]),"view"),this._hasBindAutoFit=!1,this._rendering=!1,this._trailingClear=null,this._trailing=!1,this._trailingResolve=null,this._trailingReject=null,this._previousDefinedType=null,this._onResize=w(()=>{this.forceFit()},300),this._renderer=r||new u.A4,this._plugins=o||[],this._container=function(t){if(void 0===t){const t=document.createElement("div");return t[Jh]=!0,t}if("string"==typeof t)return document.getElementById(t);return t}(e),this._emitter=new A.A,this._context={library:Object.assign(Object.assign({},i),wg),emitter:this._emitter,canvas:n,createCanvas:a},this._create()}render(){if(this._rendering)return this._addToTrailing();this._context.canvas||this._createCanvas(),this._bindAutoFit(),this._rendering=!0;const t=new Promise((t,e)=>fh(this._computedOptions(),this._context,this._createResolve(t),this._createReject(e))),[e,n,r]=function(){let t,e;return[new Promise((n,r)=>{e=n,t=r}),e,t]}();return t.then(n).then(()=>{if(this._trailingClear){const t=this.options();this._trailingClear(),this._trailing&&this.options(t)}}).catch(r).then(()=>{this._trailingClear=null,this._renderTrailing()}),e}options(t){if(0===arguments.length)return ng(this);const{type:e}=t;return e&&(this._previousDefinedType=e),function(t,e,n,r,o){const i=[[null,t,rg(t,e,n,r,o)]];for(;i.length;){const[t,e,n]=i.shift();if(e)if(n){ig(e,n);const{children:t}=n,{children:r}=e;if(Array.isArray(t)&&Array.isArray(r)){const n=Math.max(t.length,r.length);for(let o=0;o<n;o++)i.push([e,r[o],t[o]])}else"function"==typeof t&&i.push([e,null,t])}else e.remove();else ag(t,n,r,o)}}(this,t,this._previousDefinedType,this._marks,this._compositions),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(t=!0){if(this._rendering)return this._trailingClear=()=>{this.clear(t)},void this._reset();this.options();this.emit(zt),this._reset(),dh(0,this._context,!1,t),this.emit(Tt)}destroy(){this.options();this.emit(Bt),this._unbindAutoFit(),this._reset(),dh(0,this._context,!0),this._container[Jh]&&function(t){const e=t.parentNode;e&&e.removeChild(t)}(this._container),this.emit(It)}forceFit(){this.options.autoFit=!0;const{width:t,height:e}=eg(this.options(),this._container);if(t===this._width&&e===this._height)return Promise.resolve(this);this.emit(Nt);const n=this.render();return n.then(()=>{this.emit(Rt)}),n}changeSize(t,e){if(t===this._width&&e===this._height)return Promise.resolve(this);this.emit(Nt),this.attr("width",t),this.attr("height",e);const n=this.render();return n.then(()=>{this.emit(Rt)}),n}getDataByXY(t,e={}){const{shared:n=!1,series:r,facet:o=!1,startX:i=0,startY:a=0}=e,{canvas:s,views:c}=this._context,{document:l}=s,{x:u,y:f}=t,{coordinate:d,scale:p,markState:h,data:g,key:m}=c[0],y=l.getElementsByClassName(Xc),b=n?t=>t.__data__.x:t=>t,v=C(y,b),x=Ml(l.getElementsByClassName("view")[0]),O=t=>Array.from(t.values()).some(t=>{var e,n;return(null===(e=t.interaction)||void 0===e?void 0:e.seriesTooltip)||(null===(n=t.channels)||void 0===n?void 0:n.some(t=>"series"===t.name&&void 0!==t.values))}),w=$h(r,O(h)),j=t=>k(t,"__data__.data",null);try{if(w&&O(h)&&!o){const{selectedData:t}=qh({root:x,event:{offsetX:u,offsetY:f},elements:y,coordinate:d,scale:p,startX:i,startY:a}),e=g.get(`${m}-0`);return t.map(({index:t})=>e[t])}const t=Hh({root:x,event:{offsetX:u,offsetY:f},elements:y,coordinate:d,scale:p,shared:n});if(ut(t))return ft(t,g.get(m));const e=b(t),r=v.get(e);return r?r.map(j):[]}catch(t){const e=s.document.elementFromPointSync(u,f);return e?j(e):[]}}_create(){const{library:t}=this._context,e=["mark.mark",...Object.keys(t).filter(t=>t.startsWith("mark.")||"component.axisX"===t||"component.axisY"===t||"component.legends"===t)];this._marks={};for(const t of e){const e=t.split(".").pop();class n extends Og{constructor(){super({},e)}}this._marks[e]=n,this[e]=function(t){const r=this.append(n);return"mark"===e&&(r.type=t),r}}const n=["composition.view",...Object.keys(t).filter(t=>t.startsWith("composition.")&&"composition.mark"!==t)];this._compositions=Object.fromEntries(n.map(t=>{const e=t.split(".").pop();let n=class extends vg{constructor(){super({},e)}};return n=jg([pg(hg(this._marks))],n),[e,n]}));for(const t of Object.values(this._compositions))pg(hg(this._compositions))(t);for(const t of n){const e=t.split(".").pop();this[e]=function(){const t=this._compositions[e];return this.type=null,this.append(t)}}}_reset(){const t=["theme","type","width","height","autoFit"];this.type="view",this.value=Object.fromEntries(Object.entries(this.value).filter(([e])=>e.startsWith("margin")||e.startsWith("padding")||e.startsWith("inset")||t.includes(e))),this.children=[]}_renderTrailing(){this._trailing&&(this._trailing=!1,this.render().then(()=>{const t=this._trailingResolve.bind(this);this._trailingResolve=null,t(this)}).catch(t=>{const e=this._trailingReject.bind(this);this._trailingReject=null,e(t)}))}_createResolve(t){return()=>{this._rendering=!1,t(this)}}_createReject(t){return e=>{this._rendering=!1,t(e)}}_computedOptions(){const t=this.options(),{key:e=Ag}=t,{width:n,height:r,depth:o}=eg(t,this._container);return this._width=n,this._height=r,this._key=e,Object.assign(Object.assign({key:this._key},t),{width:n,height:r,depth:o})}_createCanvas(){var t,e;const{width:n,height:r}=eg(this.options(),this._container);this._plugins.push(new O),this._plugins.forEach(t=>this._renderer.registerPlugin(t)),this._context.canvas=new l.Hl({container:this._container,width:n,height:r,renderer:this._renderer});const o=null===(e=null===(t=this._context.canvas)||void 0===t?void 0:t.getContextService())||void 0===e?void 0:e.getDomElement();o&&(o.style.display="block")}_addToTrailing(){var t;null===(t=this._trailingResolve)||void 0===t||t.call(this,this),this._trailing=!0;return new Promise((t,e)=>{this._trailingResolve=t,this._trailingReject=e})}_bindAutoFit(){const t=this.options(),{autoFit:e}=t;this._hasBindAutoFit?e||this._unbindAutoFit():e&&(this._hasBindAutoFit=!0,window.addEventListener("resize",this._onResize))}_unbindAutoFit(){this._hasBindAutoFit&&(this._hasBindAutoFit=!1,window.removeEventListener("resize",this._onResize))}},{...Object.assign(Object.assign(Object.assign(Object.assign({},{"composition.geoView":yz,"composition.geoPath":vz}),{"data.arc":FT,"data.cluster":Bz,"mark.forceGraph":Sz,"mark.tree":$z,"mark.pack":uT,"mark.sankey":CT,"mark.chord":YT,"mark.treemap":UT,"mark.partition":mM}),{"data.venn":XB,"mark.boxplot":aB,"mark.gauge":gB,"mark.wordCloud":Ox,"mark.liquid":AB}),{"data.fetch":XS,"data.inline":GS,"data.sortBy":VS,"data.sort":KS,"data.filter":ZS,"data.pick":JS,"data.rename":QS,"data.fold":tE,"data.slice":eE,"data.custom":nE,"data.map":rE,"data.join":iE,"data.kde":cE,"data.log":lE,"data.wordCloud":TE,"data.ema":BE,"transform.stackY":O_,"transform.binX":J_,"transform.bin":Z_,"transform.dodgeX":tS,"transform.jitter":rS,"transform.jitterX":oS,"transform.jitterY":iS,"transform.symmetryY":sS,"transform.diffY":cS,"transform.stackEnter":lS,"transform.normalizeY":fS,"transform.select":mS,"transform.selectX":bS,"transform.selectY":xS,"transform.groupX":jS,"transform.groupY":kS,"transform.groupColor":AS,"transform.group":wS,"transform.sortX":_S,"transform.sortY":SS,"transform.sortColor":ES,"transform.flexX":PS,"transform.pack":CS,"transform.sample":TS,"transform.filter":BS,"coordinate.cartesian":Mg,"coordinate.polar":Ge,"coordinate.transpose":_g,"coordinate.theta":Sg,"coordinate.parallel":Eg,"coordinate.fisheye":Pg,"coordinate.radial":Ke,"coordinate.radar":Lg,"coordinate.helix":Cg,"encode.constant":zg,"encode.field":Tg,"encode.transform":Bg,"encode.column":Ig,"mark.interval":Mm,"mark.rect":Sm,"mark.line":yy,"mark.point":wb,"mark.text":Cb,"mark.cell":Bb,"mark.area":Zb,"mark.link":uv,"mark.image":hv,"mark.polygon":xv,"mark.box":Mv,"mark.vector":Sv,"mark.lineX":zv,"mark.lineY":Iv,"mark.connector":$v,"mark.range":Yv,"mark.rangeX":Vv,"mark.rangeY":Zv,"mark.path":rx,"mark.shape":sx,"mark.density":fx,"mark.heatmap":bx,"mark.wordCloud":Ox,"mark.beeswarm":Sx,"palette.category10":Ex,"palette.category20":Px,"scale.linear":Lx,"scale.ordinal":Cx,"scale.band":zx,"scale.identity":Bx,"scale.point":Nx,"scale.time":NO,"scale.log":qO,"scale.pow":GO,"scale.sqrt":KO,"scale.threshold":UO,"scale.quantile":ZO,"scale.quantize":JO,"scale.sequential":nw,"scale.constant":rw,"theme.classic":sw,"theme.classicDark":uw,"theme.academy":dw,"theme.light":aw,"theme.dark":lw,"component.axisX":pw,"component.axisY":hw,"component.legendCategory":tj,"component.legendContinuous":Bs,"component.legends":ej,"component.title":aj,"component.sliderX":Nj,"component.sliderY":Rj,"component.scrollbarX":Wj,"component.scrollbarY":Hj,"animation.scaleInX":qj,"animation.scaleOutX":Yj,"animation.scaleInY":Xj,"animation.scaleOutY":Gj,"animation.waveIn":Vj,"animation.fadeIn":Kj,"animation.fadeOut":Uj,"animation.zoomIn":Zj,"animation.zoomOut":Jj,"animation.pathIn":Qj,"animation.morphing":dk,"animation.growInX":pk,"animation.growInY":hk,"interaction.elementHighlight":mk,"interaction.elementHighlightByX":yk,"interaction.elementHighlightByColor":bk,"interaction.elementHoverScale":Ok,"interaction.elementSelect":kk,"interaction.elementSelectByX":Ak,"interaction.elementSelectByColor":Mk,"interaction.fisheye":_k,"interaction.chartIndex":Pk,"interaction.tooltip":Xh,"interaction.legendFilter":Gw,"interaction.legendHighlight":Lk,"interaction.brushHighlight":$k,"interaction.brushXHighlight":Hk,"interaction.brushYHighlight":Yk,"interaction.brushAxisHighlight":Qk,"interaction.brushFilter":nA,"interaction.brushXFilter":rA,"interaction.brushYFilter":oA,"interaction.sliderFilter":mA,"interaction.sliderWheel":xA,"interaction.scrollbarFilter":wA,"interaction.poptip":_A,"interaction.treemapDrillDown":sM,"interaction.drillDown":vM,"interaction.elementPointMove":PM,"composition.spaceLayer":CM,"composition.spaceFlex":TM,"composition.facetRect":KM,"composition.repeatMatrix":n_,"composition.facetCircle":l_,"composition.timingKeyframe":f_,"labelTransform.overlapHide":FE,"labelTransform.overlapDodgeY":HE,"labelTransform.overflowHide":qE,"labelTransform.contrastReverse":UE,"labelTransform.overflowStroke":JE,"labelTransform.exceedAdjust":QE}),"interaction.drillDown":sI,"mark.sunburst":oI}),kI="auto",AI={png:"image/png",jpeg:"image/jpeg",webp:"image/webp"},MI=["element:select","element:unselect","brush:end","brush:remove","brush:filter","brushAxis:highlight","brushAxis:remove"],_I=(t,e)=>{if(!t||"object"!=typeof t||Array.isArray(t))return t;const n=t,r=Object.keys(n).reduce((t,r)=>(t[r]=_I(n[r],e),t),{});return new Set(Object.keys(n).map(t=>t.match(/^(.*)Font(?:Size|Weight|Style|Variant)$/)?.[1]).filter(t=>void 0!==t)).forEach(t=>{r[`${t}FontFamily`]=e}),["fontSize","fontWeight","fontStyle","fontVariant","fontFamily"].some(t=>t in n)&&(r.fontFamily=e),"font-family"in n&&(r["font-family"]=e),r},SI=t=>({breadCrumb:{style:{fill:t.colorTextSecondary,fontFamily:t.fontFamily},active:{fill:t.colorPrimary}}}),EI=t=>Boolean(t)&&"object"==typeof t&&!Array.isArray(t),PI=t=>EI(t)?t.key??t.id??t.name??t.label:t,LI=t=>{const e={...t,...Array.isArray(t.children)?{children:t.children.map(t=>EI(t)?LI(t):t)}:{}};if("sankey"!==e.type||!EI(e.tooltip))return e;const n=e.tooltip;if(!Array.isArray(n.linkItems))return e;const r=n.linkItems.map(t=>{if(!EI(t)||"source"!==t.field&&"target"!==t.field)return t;const{field:e,...n}=t;return t=>({...n,value:PI(t[e])})});return{...e,tooltip:{...n,linkItems:r}}},CI=(t,e)=>{const n={...t,...Array.isArray(t.children)?{children:t.children.map(t=>EI(t)?CI(t,e):t)}:{}};if("sunburst"!==n.type)return n;const r=EI(n.style)?n.style:{},o=EI(n.state)?n.state:{},i=EI(o.active)?o.active:{},a=EI(o.inactive)?o.inactive:{},s=EI(n.interaction)?n.interaction:{},c=s.drillDown;if(!(!1!==n.interaction&&!1!==c))return{...n,style:{stroke:e.colorBgContainer,...r},state:{...o,active:{stroke:e.colorText,...i},inactive:{stroke:e.colorBgContainer,...a}}};const l=EI(c)?c:{},u=EI(l.breadCrumb)?l.breadCrumb:{},f=EI(u.style)?u.style:{},d=EI(u.active)?u.active:{};return{...n,style:{stroke:e.colorBgContainer,...r},state:{...o,active:{stroke:e.colorText,...i},inactive:{stroke:e.colorBgContainer,...a}},interaction:{...s,drillDown:{...l,breadCrumb:{...u,style:{...SI(e).breadCrumb.style,...f},active:{fill:e.colorPrimary,...d}}}}}},zI=(...t)=>t.find(t=>"number"==typeof t&&Number.isFinite(t)),TI=t=>{const e=t&&"object"==typeof t?t:{},n=e.data&&"object"==typeof e.data?e.data:void 0,r=e.client&&"object"==typeof e.client?e.client:void 0,o=zI(r?.x,e.offsetX,e.x),i=zI(r?.y,e.offsetY,e.y),a=(0,gI.xE)(n&&"data"in n?n.data:n),s=(0,gI.xE)(n?.selection),c=Array.isArray(a)?a:void 0;return{...void 0===a||Array.isArray(a)?{}:{datum:a},...void 0===c?{}:{data:c},...void 0===s?{}:{selection:s},...void 0===o||void 0===i?{}:{pointer:{x:o,y:i}}}},BI=t=>{const{data:e,...n}=t;return n},II=t=>!!Array.isArray(t.children)&&t.children.some(t=>null!=t&&"object"==typeof t&&(Object.prototype.hasOwnProperty.call(t,"data")||II(t))),NI=(t,e)=>{if(null!=t&&"object"==typeof t){return"constant"===t.type?t.value:void 0}if("string"!=typeof t||!Array.isArray(e)||!e.some(e=>null!=e&&"object"==typeof e&&t in e))return t},RI=(t,e)=>{if(!0===t||!1===t)return t;const n=e.autoFit;return"boolean"==typeof n?n:!("number"==typeof e.width&&"number"==typeof e.height)},FI=t=>{const{token:e}=cI.A.useToken(),{id:r,className:o,style:i,tabIndex:a,role:u,dir:f,lang:d,hidden:p,options:h={},events:g,responsive:m="auto",eventData:y,selectionState:b,viewState:v,export:x,loading_state:O,setProps:w,...j}=t,k=(0,s.useMemo)(()=>(t=>{const e="dark"===(0,OI.n)(t);return hI()({},_I(e?uw():sw(),t.fontFamily),{type:e?"classicDark":"classic",view:{viewFill:t.colorBgContainer},axis:{gridStroke:t.colorBorderSecondary,labelFill:t.colorText,labelOpacity:1,lineStroke:t.colorBorder,tickStroke:t.colorBorder,titleFill:t.colorText,titleOpacity:1},legendCategory:{itemLabelFill:t.colorText,itemLabelFillOpacity:1,itemValueFill:t.colorText,itemValueFillOpacity:1,navButtonFill:t.colorTextSecondary,navPageNumFill:t.colorTextTertiary,titleFill:t.colorText,titleFillOpacity:1},legendContinuous:{connectorStroke:t.colorBorder,handleLabelFill:t.colorText,handleLabelFillOpacity:1,handleMarkerFill:t.colorBgElevated,handleMarkerStroke:t.colorBorder,labelFill:t.colorText,labelFillOpacity:1,titleFill:t.colorText,titleFillOpacity:1},label:{connectorStroke:t.colorBorder,fill:t.colorText,fillOpacity:1},innerLabel:{fill:t.colorTextLightSolid,fillOpacity:1},htmlLabel:{color:t.colorText,opacity:1},title:{subtitleFill:t.colorTextSecondary,titleFill:t.colorText},drillDown:SI(t)})})(e),[e]),A=(0,s.useRef)(null),M=(0,s.useRef)(null),_=(0,s.useRef)(h),S=(0,s.useRef)(k),E=(0,s.useRef)(t),P=(0,s.useRef)(w),L=(0,s.useRef)(m),C=(0,s.useRef)(x),z=(0,s.useRef)(h),T=(0,s.useRef)(null),B=(0,s.useRef)(0),I=(0,s.useRef)(0),N=(0,s.useRef)(Promise.resolve()),[R,F]=(0,s.useState)(!1),D=(0,s.useRef)({component:"Chart",id:r,props:t,chart:null}),$=(0,s.useRef)(new Map),{emit:W,emitLazy:H,getOptions:q}=(0,yI.i)("g2",g,w),Y=(0,xI.$)(h),X=(0,xI.$)(k),G=(0,xI.$)({responsive:m,imageExport:Boolean(x)});_.current=h,S.current=k,E.current=t,P.current=w,L.current=m,C.current=x,D.current.id=r,D.current.props=E.current;const V=(0,s.useMemo)(()=>Object.fromEntries(Object.entries(j).filter(([t,e])=>(t.startsWith("data-")||t.startsWith("aria-"))&&null!=e)),[j]),K=t=>{const n=(0,vI.qF)(dI()(_.current),D.current),r=RI(L.current,n);let o={...n,autoFit:r};return void 0===o.theme?o.theme=S.current:o.theme&&"object"==typeof o.theme&&!Array.isArray(o.theme)&&(o.theme=hI()({},S.current,o.theme)),!0===L.current&&(delete o.width,delete o.height),o=((t,e)=>{if(!e)return t;const n="number"==typeof t.marginRight?t.marginRight:"number"==typeof t.margin?t.margin:0;return{...t,marginRight:Math.max(n,30)}})(o,Boolean(C.current)),o=LI(o),o=CI(o,e),o=(t=>{const e=t.encode;if(null==e||"object"!=typeof e)return t;const n=e,r=NI(n.updateDuration,t.data),o=NI(n.updateEasing,t.data);if("number"!=typeof r&&"string"!=typeof o)return t;const i=t.animate,a=null!=i&&"object"==typeof i?i:{},s=a.update,c=null!=s&&"object"==typeof s?s:{},l=!1===i||!1===s?t:{...t,animate:{...a,update:{..."number"==typeof r?{duration:r}:{},..."string"==typeof o?{easing:o}:{},...c}}},u=l.axis;if(!1===u)return l;const f=null!=u&&"object"==typeof u?u:{},d=f.x;if(!1===d)return l;const p=null!=d&&"object"==typeof d?d:{};return void 0!==p.animate?l:{...l,axis:{...f,x:{...p,animate:{..."number"==typeof r?{duration:r}:{},..."string"==typeof o?{easing:o}:{}}}}}})(o),D.current.chart=t,o},U=(t,e,o)=>{const i=++I.current;z.current=_.current;return N.current=N.current.then(async()=>{try{const r=await(async t=>{if(t.type!==kI)return t;const{Auto:e}=await Promise.all([n.e("async-viz-shared"),n.e("async-chart-ava")]).then(n.bind(n,"./node_modules/.pnpm/@antv+g2-extension-ava@0.2.0_@antv+g2@5.4.8_@antv+g2plot@2.3.27_@antv+g6@4.3.11/node_modules/@antv/g2-extension-ava/esm/index.js"));return{...t,type:e}})(e);if(o!==B.current||i!==I.current||t!==M.current)return;s=e,null!=(a=T.current)&&a.type!==kI&&s.type!==kI&&Object.prototype.hasOwnProperty.call(a,"data")&&Object.prototype.hasOwnProperty.call(s,"data")&&!II(a)&&!II(s)&&!uI()(a.data,s.data)&&uI()(BI(a),BI(s))?await t.changeData(r.data):(t.clear(!1),Object.keys(t.options()).forEach(e=>t.attr(e,void 0)),t.options({type:"view",...r}),await t.render()),o===B.current&&t===M.current&&(T.current=e)}catch(e){o===B.current&&t===M.current&&(T.current=null,i===I.current&&console.error(`G2${r?` "${r}"`:""} failed to render.`,e))}var a,s}),N.current};(0,s.useEffect)(()=>{const t=A.current;if(!t)return;const e=++B.current;N.current=Promise.resolve(),T.current=null;const n=RI(L.current,_.current),r=new jI({container:t,autoFit:n}),o=D.current;return M.current=r,o.chart=r,r.on("element:click",t=>{H("element:click","pointer",()=>TI(t))}),r.on("plot:click",t=>{const e=t&&"object"==typeof t?t:{};"plot"===e.target?.className&&H("plot:click","pointer",()=>TI(t))}),r.on("element:pointerover",t=>{H("element:pointerover","pointer",()=>TI(t))}),r.on("element:pointerout",t=>{H("element:pointerout","pointer",()=>TI(t))}),MI.forEach(t=>{r.on(t,e=>{const n=TI(e),r=t.endsWith(":remove"),o=t.startsWith("element:"),i=o?"element":t.startsWith("brushAxis:")?"axis":"brush";if(o&&void 0!==n.datum){const e=JSON.stringify(n.datum);"element:unselect"===t?$.current.delete(e):$.current.set(e,n.datum)}else r&&$.current.clear();const a=o?[...$.current.values()]:(t=>t.data??(void 0===t.datum?[]:[t.datum]))(n),s=Math.max(0,Math.floor(q(t)?.maxItems??500)),c=r?null:{mode:i,data:a.slice(0,s),count:a.length,truncated:a.length>s,...void 0===n.selection?{}:{selection:n.selection},timestamp:Date.now()};P.current?.({selectionState:c}),W(t,"selection",{...n,data:a.slice(0,s),count:a.length,truncated:a.length>s})})}),r.on(Rt,()=>{const e=t.getBoundingClientRect(),n={width:e.width,height:e.height,autoFit:Boolean(r.options().autoFit),timestamp:Date.now()};P.current?.({viewState:n}),W("afterchangesize","viewport",n)}),U(r,K(r),e),()=>{B.current+=1,r.off(),r.destroy(),M.current===r&&(M.current=null),o.chart===r&&(o.chart=null)}},[G,W,H,q,X]),(0,s.useEffect)(()=>{const t=M.current;if(!t||uI()(z.current,_.current))return;const e=K(t);$.current.clear(),P.current?.({selectionState:null}),U(t,e,B.current)},[Y]);const Z={width:"100%",height:i?.height??h.height??450,...i};return c().createElement("div",{...V,id:r,className:o,style:Z,tabIndex:a,role:u,dir:f,lang:d,hidden:p,"data-dash-is-loading":(0,bI.A_)(O)||void 0},c().createElement("div",{style:{position:"relative",isolation:"isolate",width:"100%",height:"100%"}},c().createElement("div",{ref:A,style:{width:"100%",height:"100%"}}),x?c().createElement(wI.A,{label:!0===x?void 0:x.label,loading:R,onClick:()=>{const t=M.current;if(!t||!x||R)return;const e=!0===x?{}:x,{format:n="png",filename:o="chart",quality:i=.92,pixelRatio:a=1}=e,s=Math.min(1,Math.max(0,i)),c=Math.max(.1,a);F(!0),(async()=>{const e=t.getContext().canvas;if(!e)throw new Error("G2 canvas is unavailable for image export.");const r=new l.Nz({canvas:e}),i=((t,e)=>{if(1===e)return t;const n=document.createElement("canvas");n.width=Math.max(1,Math.round(t.width*e)),n.height=Math.max(1,Math.round(t.height*e));const r=n.getContext("2d");return r?(r.drawImage(t,0,0,n.width,n.height),n):t})(await r.toCanvas(),c),a=i.toDataURL(AI[n],s);(0,mI.Kh)(a,`${o}.${n}`)})().catch(t=>{console.error(`G2${r?` "${r}"`:""} failed to export image.`,t)}).finally(()=>{F(!1)})}}):null))},DI=t=>c().createElement(FI,{...t})}}]);
1
+ (self.webpackChunkdash_antd_components=self.webpackChunkdash_antd_components||[]).push([["async-chart"],{"./node_modules/.pnpm/@antv+coord@0.4.7/node_modules/@antv/coord/dist/coordinate.min.js"(t,e){!function(t){"use strict";function e(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&r>=t.length?void 0:t)&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function n(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||0<e--)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function r(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||((r=r||Array.prototype.slice.call(e,0,o))[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))}function o(t){return a(t,"Function")}var i={}.toString,a=function(t,e){return i.call(t)==="[object "+e+"]"},s=function(t){return Array.isArray?Array.isArray(t):a(t,"Array")},c=function(t){if("object"!=typeof(e=t)||null===e||!a(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},l=function(t){return a(t,"Number")},u=Object.values?function(t){return Object.values(t)}:function(t){var e,n=[],r=t,i=function(e,r){o(t)&&"prototype"===r||n.push(e)};if(r)if(s(r))for(var a=0,c=r.length;a<c&&!1!==i(r[a],a);a++);else if(e=typeof r,null!==r&&"object"==e||"function"==e)for(var l in r)if(r.hasOwnProperty(l)&&!1===i(r[l],l))break;return n},f=5;function d(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,o){for(var i in r=r||0,o=o||f,n){var a;n.hasOwnProperty(i)&&(null!==(a=n[i])&&c(a)?(c(e[i])||(e[i]={}),r<o?t(e[i],a,r+1,o):e[i]=n[i]):s(a)?(e[i]=[],e[i]=e[i].concat(a)):void 0!==a&&(e[i]=a))}}(t,e[r]);return t}function p(t){return t}!function(t,e){var n;if(o(t))return(n=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];var i,a=e?e.apply(this,r):r[0],s=n.cache;return s.has(a)?s.get(a):(i=t.apply(this,r),s.set(a,i),i)}).cache=new Map;throw new TypeError("Expected a function")}(function(t,e){var n=(e=void 0===e?{}:e).fontSize,r=e.fontFamily,o=e.fontWeight,i=e.fontStyle;return e=e.fontVariant,(h=h||document.createElement("canvas").getContext("2d")).font=[i,e,o,n+"px",r].join(" "),h.measureText(a(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;var r=Array(t),o=0;for(e=0;e<n;e++)for(var i=arguments[e],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r}([t],u(e=void 0===e?{}:e)).join("")});var h,g="undefined"!=typeof Float32Array?Float32Array:Array;function m(){var t=new g(9);return g!=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 y=function(t,e,n){var r=e[0],o=e[1],i=e[2],a=e[3],s=e[4],c=e[5],l=e[6],u=e[7],f=(e=e[8],n[0]),d=n[1],p=n[2],h=n[3],g=n[4],m=n[5],y=n[6],b=n[7];return n=n[8],t[0]=f*r+d*a+p*l,t[1]=f*o+d*s+p*u,t[2]=f*i+d*c+p*e,t[3]=h*r+g*a+m*l,t[4]=h*o+g*s+m*u,t[5]=h*i+g*c+m*e,t[6]=y*r+b*a+n*l,t[7]=y*o+b*s+n*u,t[8]=y*i+b*c+n*e,t};function b(){var t=new g(16);return g!=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}var v=function(t,e,n){var r=e[0],o=e[1],i=e[2],a=e[3],s=e[4],c=e[5],l=e[6],u=e[7],f=e[8],d=e[9],p=e[10],h=e[11],g=e[12],m=e[13],y=e[14],b=(e=e[15],n[0]),v=n[1],x=n[2],O=n[3];return t[0]=b*r+v*s+x*f+O*g,t[1]=b*o+v*c+x*d+O*m,t[2]=b*i+v*l+x*p+O*y,t[3]=b*a+v*u+x*h+O*e,t[4]=(b=n[4])*r+(v=n[5])*s+(x=n[6])*f+(O=n[7])*g,t[5]=b*o+v*c+x*d+O*m,t[6]=b*i+v*l+x*p+O*y,t[7]=b*a+v*u+x*h+O*e,t[8]=(b=n[8])*r+(v=n[9])*s+(x=n[10])*f+(O=n[11])*g,t[9]=b*o+v*c+x*d+O*m,t[10]=b*i+v*l+x*p+O*y,t[11]=b*a+v*u+x*h+O*e,t[12]=(b=n[12])*r+(v=n[13])*s+(x=n[14])*f+(O=n[15])*g,t[13]=b*o+v*c+x*d+O*m,t[14]=b*i+v*l+x*p+O*y,t[15]=b*a+v*u+x*h+O*e,t};function x(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return t?e.reduce(function(t,e){return function(n){return e(t(n))}},t):p}function O(t){return t instanceof Float32Array||t instanceof Array}function w(t,e,n){for(;t<e;)t+=2*Math.PI;for(;n<t;)t-=2*Math.PI;return t}function j(t,e,r,o,i){var a=(t=n(t,2))[0];return a=[a,t=t[1]],(t=m())[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 k(t,...e){return e.reduce((t,e)=>n=>t(e(n)),t)}function A(t,e){return e-t?n=>(n-t)/(e-t):t=>.5}T=new g(3),g!=Float32Array&&(T[0]=0,T[1]=0,T[2]=0),T=new g(4),g!=Float32Array&&(T[0]=0,T[1]=0,T[2]=0,T[3]=0);const M=Math.sqrt(50),_=Math.sqrt(10),S=Math.sqrt(2);function E(t,e,n){return n=(e=(e-t)/Math.max(0,n))/10**(t=Math.floor(Math.log(e)/Math.LN10)),0<=t?(n>=M?10:n>=_?5:n>=S?2:1)*10**t:-(10**-t)/(n>=M?10:n>=_?5:n>=S?2:1)}const P=(t,e,n=5)=>{let r,o=0,i=(t=[t,e]).length-1,a=t[o],s=t[i];return s<a&&([a,s]=[s,a],[o,i]=[i,o]),0<(r=E(a,s,n))?(a=Math.floor(a/r)*r,s=Math.ceil(s/r)*r,r=E(a,s,n)):r<0&&(a=Math.ceil(a*r)/r,s=Math.floor(s*r)/r,r=E(a,s,n)),0<r?(t[o]=Math.floor(a/r)*r,t[i]=Math.ceil(s/r)*r):r<0&&(t[o]=Math.ceil(a*r)/r,t[i]=Math.floor(s*r)/r),t};function L(t){return null!=t&&!Number.isNaN(t)}function C(t,e){return n=>{n.prototype.rescale=function(){this.initRange(),this.nice();var[t]=this.chooseTransforms();this.composeOutput(t,this.chooseClamp(t))},n.prototype.initRange=function(){this.options.range=t(this.options.interpolator)},n.prototype.composeOutput=function(t,n){var r,{domain:o,interpolator:i,round:a}=this.getOptions(),o=e(o.map(t)),a=a?(r=i,t=>(t=r(t),l(t)?Math.round(t):t)):i;this.output=k(a,o,n,t)},n.prototype.invert=void 0}}var z,T={exports:{}},B={exports:{}},I=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))},N=Array.prototype.concat,R=Array.prototype.slice,F=B.exports=function(t){for(var e=[],n=0,r=t.length;n<r;n++){var o=t[n];I(o)?e=N.call(e,R.call(o)):e.push(o)}return e},D=(F.wrap=function(t){return function(){return t(F(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]}),$=B.exports,W=Object.hasOwnProperty,H=Object.create(null);for(z in D)W.call(D,z)&&(H[D[z]]=z);var q=T.exports={to:{},get:{}};function Y(t,e,n){return Math.min(Math.max(e,t),n)}function X(t){return(t=Math.round(t).toString(16).toUpperCase()).length<2?"0"+t:t}q.get=function(t){var e,n;switch(t.substring(0,3).toLowerCase()){case"hsl":e=q.get.hsl(t),n="hsl";break;case"hwb":e=q.get.hwb(t),n="hwb";break;default:e=q.get.rgb(t),n="rgb"}return e?{model:n,value:e}:null},q.get.rgb=function(t){if(!t)return null;var e,n,r,o=[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 i=2*n;o[n]=parseInt(e.slice(i,2+i),16)}r&&(o[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++)o[n]=parseInt(e[n]+e[n],16);r&&(o[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++)o[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]:W.call(D,e[1])?((o=D[e[1]])[3]=1,o):null:null;for(n=0;n<3;n++)o[n]=Math.round(2.55*parseFloat(e[n+1]))}e[4]&&(o[3]=e[5]?.01*parseFloat(e[4]):parseFloat(e[4]))}for(n=0;n<3;n++)o[n]=Y(o[n],0,255);return o[3]=Y(o[3],0,1),o},q.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,Y(parseFloat(t[2]),0,100),Y(parseFloat(t[3]),0,100),Y(isNaN(e)?1:e,0,1)]):null},q.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,Y(parseFloat(t[2]),0,100),Y(parseFloat(t[3]),0,100),Y(isNaN(e)?1:e,0,1)]):null},q.to.hex=function(){var t=$(arguments);return"#"+X(t[0])+X(t[1])+X(t[2])+(t[3]<1?X(Math.round(255*t[3])):"")},q.to.rgb=function(){var t=$(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]+")"},q.to.rgb.percent=function(){var t=$(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]+")"},q.to.hsl=function(){var t=$(arguments);return t.length<4||1===t[3]?"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)":"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+t[3]+")"},q.to.hwb=function(){var t=$(arguments),e="";return 4<=t.length&&1!==t[3]&&(e=", "+t[3]),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+e+")"},q.to.keyword=function(t){return H[t.slice(0,3)]};var G=T.exports;function V(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 K(t){var e,n,r;return(t=G.get(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*V(n=2*r-(r=r<.5?r*(1+n):r+n-r*n),r,e+1/3),255*V(n,r,e),255*V(n,r,e-1/3),t]):null):null}const U=(t,e)=>n=>t*(1-n)+e*n,Z=(t,e)=>{if("number"==typeof t&&"number"==typeof e)return U(t,e);if("string"!=typeof t||"string"!=typeof e)return()=>t;{var n=t,r=e;const o=K(n),i=K(r);return null===o||null===i?o?()=>n:()=>r:t=>{var e=new Array(4);for(let n=0;n<4;n+=1)e[n]=o[n]*(1-t)+i[n]*t;var[n,r,a,s]=e;return`rgba(${Math.round(n)}, ${Math.round(r)}, ${Math.round(a)}, ${s})`}}},J=(t,e)=>{const n=U(t,e);return t=>Math.round(n(t))};function Q({map:t,initKey:e},n){return e=e(n),t.has(e)?t.get(e):n}function tt(t){return"object"==typeof t?t.valueOf():t}class et extends Map{constructor(t){if(super(),this.map=new Map,this.initKey=tt,null!==t)for(var[e,n]of t)this.set(e,n)}get(t){return super.get(Q({map:this.map,initKey:this.initKey},t))}has(t){return super.has(Q({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 nt{constructor(t){this.options=d({},this.getDefaultOptions()),this.update(t)}getOptions(){return this.options}update(t={}){this.options=d({},this.options,t),this.rescale(t)}rescale(t){}}const rt=Symbol("defaultUnknown");function ot(t,e,n){for(let r=0;r<e.length;r+=1)t.has(e[r])||t.set(n(e[r]),r)}function it(t){var{value:t,from:e,to:n,mapper:r,notFoundReturn:o}=t;let i=r.get(t);if(void 0===i){if(o!==rt)return o;i=e.push(t)-1,r.set(t,i)}return n[i%n.length]}function at(t){return t instanceof Date?t=>""+t:"object"==typeof t?t=>JSON.stringify(t):t=>t}class st extends nt{getDefaultOptions(){return{domain:[],range:[],unknown:rt}}constructor(t){super(t)}map(t){return 0===this.domainIndexMap.size&&ot(this.domainIndexMap,this.getDomain(),this.domainKey),it({value:this.domainKey(t),mapper:this.domainIndexMap,from:this.getDomain(),to:this.getRange(),notFoundReturn:this.options.unknown})}invert(t){return 0===this.rangeIndexMap.size&&ot(this.rangeIndexMap,this.getRange(),this.rangeKey),it({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=at(e),this.rangeKey=at(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 st(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 ct(t){const{domain:e,range:n,paddingOuter:r,paddingInner:o,flex:i,round:a,align:s}=t;var c,l=e.length,u=0<(u=(t=l)-(c=i).length)?[...c,...new Array(u).fill(1)]:u<0?c.slice(0,t):c,[t,c]=n;const f=(g=(c-=t)/(2/l*r+1-1/l*o))*o/l;g-=l*f;const d=function(t){const e=Math.min(...t);return t.map(t=>t/e)}(u),p=g/d.reduce((t,e)=>t+e);u=new et(e.map((t,e)=>(e=d[e]*p,[t,a?Math.floor(e):e])));var h=new et(e.map((t,e)=>(e=d[e]*p+f,[t,a?Math.floor(e):e]))),g=Array.from(h.values()).reduce((t,e)=>t+e);t+=(c-(g-g/l*o))*s;let m=a?Math.round(t):t;var y=new Array(l);for(let t=0;t<l;t+=1){y[t]=(b=m,Math.round(1e12*b)/1e12);var b=e[t];m+=h.get(b)}return{valueBandWidth:u,valueStep:h,adjustedRange:y}}class lt extends st{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,paddingInner:0,paddingOuter:0,padding:0,unknown:rt,flex:[]}}constructor(t){super(t)}clone(){return new lt(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:o}=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 ct(t);var{range:n,paddingOuter:t,paddingInner:r,round:o,align:i}=t;let a,s,c=n[0];return a=(n=n[1]-c)/Math.max(1,2*t+(e-r)),o&&(a=Math.floor(a)),c+=(n-a*(e-r))*i,s=a*(1-r),o&&(c=Math.round(c),s=Math.round(s)),t=new Array(e).fill(0).map((t,e)=>c+e*a),{valueStep:a,valueBandWidth:s,adjustedRange:t}}({align:t,range:n,round:r,flex:o,paddingInner:this.getPaddingInner(),paddingOuter:this.getPaddingOuter(),domain:e});this.valueStep=r,this.valueBandWidth=n,this.adjustedRange=t}}const ut=(t,e,n)=>{let r,o,i=t,a=e;if(i===a&&0<n)return[i];let s=E(i,a,n);if(0===s||!Number.isFinite(s))return[];if(0<s){i=Math.ceil(i/s),a=Math.floor(a/s),o=new Array(r=Math.ceil(a-i+1));for(let t=0;t<r;t+=1)o[t]=(i+t)*s}else{s=-s,i=Math.ceil(i*s),a=Math.floor(a*s),o=new Array(r=Math.ceil(a-i+1));for(let t=0;t<r;t+=1)o[t]=(i+t)/s}return o},ft=(t,e,n)=>{var[t,r]=t,[e,o]=e;let i,a;return k(a=t<r?(i=A(t,r),n(e,o)):(i=A(r,t),n(o,e)),i)},dt=(t,e,n)=>{const r=Math.min(t.length,e.length)-1,o=new Array(r),i=new Array(r);var a=t[0]>t[r],s=a?[...t].reverse():t,c=a?[...e].reverse():e;for(let t=0;t<r;t+=1)o[t]=A(s[t],s[t+1]),i[t]=n(c[t],c[t+1]);return e=>{var n=function(t,e,n,r){let o=1,i=r||t.length;for(var a=t=>t;o<i;){var s=Math.floor((o+i)/2);a(t[s])>e?i=s:o=s+1}return o}(t,e,0,r)-1;return k(i[n],o[n])(e)}},pt=(t,e,n,r)=>(2<Math.min(t.length,e.length)?dt:ft)(t,e,r?J:n);class ht extends nt{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:U,tickCount:5}}map(t){return L(t)?this.output(t):this.options.unknown}invert(t){return L(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,...o]=this.getTickMethodOptions();return t(e,n,r,...o)}getTickMethodOptions(){var{domain:t,tickCount:e}=this.options;return[t[0],t[t.length-1],e]}chooseNice(){return P}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,n=(t=this.options.domain.map(t),Math.min(t.length,n.length));if(e){e=t[0];const r=(t=t[n-1])<e?t:e,o=t<e?e:t;return t=>Math.min(Math.max(r,t),o)}return p}composeOutput(t,e){var{domain:n,range:r,round:o,interpolate:i}=this.options,n=pt(n.map(t),r,i,o);this.output=k(n,e,t)}composeInput(t,e,n){var{domain:r,range:o}=this.options,o=pt(o,r.map(t),U);this.input=k(e,n,o)}}class gt extends ht{getDefaultOptions(){return{domain:[0,1],range:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolate:Z,tickMethod:ut,tickCount:5}}chooseTransforms(){return[p,p]}clone(){return new gt(this.options)}}class mt extends lt{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,padding:0,unknown:rt,paddingInner:1,paddingOuter:0}}constructor(t){super(t)}getPaddingInner(){return 1}clone(){return new mt(this.options)}update(t){super.update(t)}getPaddingOuter(){return this.options.padding}}function yt(t,e){for(var n=[],r=0,o=t.length;r<o;r++)n.push(t[r].substr(0,e));return n}B=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];var bt,vt,xt=yt(T=["January","February","March","April","May","June","July","August","September","October","November","December"],3);!function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0,o=e;r<o.length;r++){var i,a=o[r];for(i in a)t[i]=a[i]}}({},{dayNamesShort:yt(B,3),dayNames:B,monthNamesShort:xt,monthNames:T,amPm:["am","pm"],DoFn:function(t){return t+["th","st","nd","rd"][3<t%10?0:(t-t%10!=10?1:0)*t%10]}});let Ot=bt=class extends gt{getDefaultOptions(){return{domain:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolator:p,tickMethod:ut,tickCount:5}}constructor(t){super(t)}clone(){return new bt(this.options)}};Ot=bt=function(t,e,n,r){var o,i=arguments.length,a=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;0<=s;s--)(o=t[s])&&(a=(i<3?o(a):3<i?o(e,n,a):o(e,n))||a);return 3<i&&a&&Object.defineProperty(e,n,a),a}([C(function(t){return[t(0),t(1)]},t=>{var[t,e]=t;return k(U(0,1),A(t,e))})],Ot);let wt=vt=class extends gt{getDefaultOptions(){return{domain:[0,.5,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolator:p,tickMethod:ut,tickCount:5}}constructor(t){super(t)}clone(){return new vt(this.options)}};function jt(t,e,r,o,i){var a=new gt({range:[e,e+o]}),s=new gt({range:[r,r+i]});return{transform:function(t){var e=(t=n(t,2))[0];return t=t[1],[a.map(e),s.map(t)]},untransform:function(t){var e=(t=n(t,2))[0];return t=t[1],[a.invert(e),s.invert(t)]}}}function kt(t,e,r,o,i){return(0,n(t,1)[0])(e,r,o,i)}function At(t,e,r,o,i){return n(t,1)[0]}function Mt(t,e,r,o,i){var a=(t=n(t,4))[0],s=t[1],c=t[2],l=new gt({range:[c,t=t[3]]}),u=new gt({range:[a,s]}),f=1<(c=i/o)?1:c,d=1<c?1/c:1;return{transform:function(t){var e=(t=n(t,2))[0];return t=t[1],e=u.map(e),[(t=l.map(t))*Math.cos(e)*f*.5+.5,t*Math.sin(e)*d*.5+.5]},untransform:function(t){var e=2*((e=(t=n(t,2))[0])-.5)/f,r=(t=2*((t=t[1])-.5)/d,Math.sqrt(Math.pow(e,2)+Math.pow(t,2)));return t=w(Math.atan2(t,e),a,s),[u.invert(t),l.invert(r)]}}}function _t(t,e,r,o,i){return{transform:function(t){return[(t=n(t,2))[1],t[0]]},untransform:function(t){return[(t=n(t,2))[1],t[0]]}}}function St(t){for(var e=[],o=1;o<arguments.length;o++)e[o-1]=arguments[o];return Tt.apply(void 0,r([[-1,-1]],n(e),!1))}function Et(t){for(var e=[],o=1;o<arguments.length;o++)e[o-1]=arguments[o];return Tt.apply(void 0,r([[-1,1]],n(e),!1))}function Pt(t){for(var e=[],o=1;o<arguments.length;o++)e[o-1]=arguments[o];return Tt.apply(void 0,r([[1,-1]],n(e),!1))}function Lt(t,e,r,o,i){t=n(t,1)[0];var a,s=m();return a=Math.sin(t),t=Math.cos(t),s[0]=t,s[1]=a,s[2]=0,s[3]=-a,s[4]=t,s[5]=0,s[6]=0,s[7]=0,s[8]=1,s}function Ct(t,e,r,o,i){var a=(t=n(t,4))[0],s=t[1],c=t[2],l=(t[3]-c)/(+s/(2*Math.PI)+1),u=l/(2*Math.PI),f=new gt({range:[c,c+.99*l]}),d=new gt({range:[a,s]}),p=1<(t=i/o)?1:t,h=1<t?1/t:1;return{transform:function(t){var e=(t=n(t,2))[0];return t=t[1],e=d.map(e),t=f.map(t),[Math.cos(e)*(u*e+t)*p*.5+.5,Math.sin(e)*(u*e+t)*h*.5+.5]},untransform:function(t){var e=2*((e=(t=n(t,2))[0])-.5)/p,r=(t=2*((t=t[1])-.5)/h,Math.sqrt(Math.pow(e,2)+Math.pow(t,2)));return t=w(Math.atan2(t,e)+Math.floor(r/l)*Math.PI*2,a,s),e=r-u*t,[d.invert(t),f.invert(e)]}}}function zt(t,e,r,o,i){var a=(t=n(t,4))[0],s=t[1],c=new gt({range:[t[2],t=t[3]]});return{transform:function(t){for(var e=[],n=t.length,r=new mt({domain:new Array(n).fill(0).map(function(t,e){return e}),range:[a,s]}),o=0;o<n;o++){var i=t[o],l=r.map(o);i=c.map(i),e.push(l,i)}return e},untransform:function(t){for(var e=[],n=0;n<t.length;n+=2)e.push(c.invert(t[n+1]));return e}}}wt=vt=function(t,e,n,r){var o,i=arguments.length,a=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;0<=s;s--)(o=t[s])&&(a=(i<3?o(a):3<i?o(e,n,a):o(e,n))||a);return 3<i&&a&&Object.defineProperty(e,n,a),a}([C(function(t){return[t(0),t(.5),t(1)]},t=>{const[e,n,r]=t,o=k(U(0,.5),A(e,n)),i=k(U(.5,1),A(n,r));return t=>(e>r?t<n?i:o:t<n?o:i)(t)})],wt);var Tt=function(t,e,r,o,i){var a=(t=n(t,2))[0];return a=[a,t=t[1]],(t=m())[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};function Bt(t){return 1/Math.tan(t)}function It(t,e,r,o,i){var a=Bt(n(t,1)[0]);return{transform:function(t){return[(t=n(t,2))[0]+(t=t[1])*a,t]},untransform:function(t){return[(t=n(t,2))[0]-(t=t[1])*a,t]}}}function Nt(t,e,r,o,i){var a=Bt(n(t,1)[0]);return{transform:function(t){var e=(t=n(t,2))[0];return[e,t[1]+e*a]},untransform:function(t){var e=(t=n(t,2))[0];return[e,t[1]-e*a]}}}function Rt(t,e,n,r,o){var i=t<e;return o=(i?e-r:o-e)||o-r,(r=i?-1:1)*o*(n+1)/(n+o/((t-e)*r))+e}function Ft(t,e,n,r,o){var i=t<e;return(o=(i?e-r:o-e)||o-r)/(o*(n+1)/(t-e)-n*(i?-1:1))+e}function Dt(t,e,n){return n?new gt({range:[0,1],domain:[0,e]}).map(t):t}function $t(t,e,r,o,i){var a=(t=n(t,3))[0],s=t[1],c=Dt(a,o,void 0!==(t=t[2])&&t);return{transform:function(t){var e=(t=n(t,2))[0];return t=t[1],[Rt(e,c,s,0,1),t]},untransform:function(t){var e=(t=n(t,2))[0];return t=t[1],[Ft(e,c,s,0,1),t]}}}function Wt(t,e,r,o,i){var a=(t=n(t,3))[0],s=t[1],c=Dt(a,i,void 0!==(t=t[2])&&t);return{transform:function(t){return[(t=n(t,2))[0],Rt(t[1],c,s,0,1)]},untransform:function(t){return[(t=n(t,2))[0],Ft(t[1],c,s,0,1)]}}}function Ht(t,e,r,o,i){var a=(t=n(t,5))[0],s=t[1],c=t[2],l=t[3],u=Dt(a,o,t=void 0!==(t=t[4])&&t),f=Dt(s,i,t);return{transform:function(t){var e=(t=n(t,2))[0];return t=t[1],[Rt(e,u,c,0,1),Rt(t,f,l,0,1)]},untransform:function(t){var e=(t=n(t,2))[0];return t=t[1],[Ft(e,u,c,0,1),Ft(t,f,l,0,1)]}}}function qt(t,e,r,o,i){var a=(t=n(t,5))[0],s=t[1],c=t[2],l=t[3],u=(t=void 0!==(t=t[4])&&t,new gt({range:[0,o]})),f=new gt({range:[0,i]}),d=t?a:u.map(a),p=t?s:f.map(s);return{transform:function(t){var e=(t=n(t,2))[0],r=(t=t[1],u.map(e)-d),o=f.map(t)-p,i=Math.sqrt(r*r+o*o);return c<i?[e,t]:(e=Rt(i,0,l,0,c),t=Math.atan2(o,r),i=d+e*Math.cos(t),o=p+e*Math.sin(t),[u.invert(i),f.invert(o)])},untransform:function(t){var e=(t=n(t,2))[0],r=(t=t[1],u.map(e)-d),o=f.map(t)-p,i=Math.sqrt(r*r+o*o);return c<i?[e,t]:(e=Ft(i,0,l,0,c),t=Math.atan2(o,r),i=d+e*Math.cos(t),o=p+e*Math.sin(t),[u.invert(i),f.invert(o)])}}}function Yt(t,e,r,o,i,a,s){var c=new gt({range:[e,e+i]}),l=new gt({range:[r,r+a]}),u=new gt({range:[o,o+s]});return{transform:function(t){var e=(t=n(t,3))[0],r=t[1];return t=t[2],[c.map(e),l.map(r),u.map(t)]},untransform:function(t){var e=(t=n(t,3))[0],r=t[1];return t=t[2],[c.invert(e),l.invert(r),u.invert(t)]}}}function Xt(t,e,r,o,i,a,s){var c,l=(t=n(t,3))[0];return l=[l,t[1],t=t[2]],(c=b())[0]=1,c[1]=0,c[2]=0,c[3]=0,c[4]=0,c[5]=1,c[6]=0,c[7]=0,c[8]=0,c[9]=0,c[10]=1,c[11]=0,c[12]=l[0],c[13]=l[1],c[14]=l[2],c[15]=1,c}function Gt(t,e,r,o,i,a,s){return{transform:function(t){return[(t=n(t,3))[1],t[0],t[2]]},untransform:function(t){return[(t=n(t,3))[1],t[0],t[2]]}}}function Vt(t,e,r,o,i,a,s){var c,l=(t=n(t,3))[0],u=t[1];return t=t[2],(c=b())[0]=(l=[l,u,t])[0],c[1]=0,c[2]=0,c[3]=0,c[4]=0,c[5]=l[1],c[6]=0,c[7]=0,c[8]=0,c[9]=0,c[10]=l[2],c[11]=0,c[12]=0,c[13]=0,c[14]=0,c[15]=1,c}function Kt(t){this.options={x:0,y:0,width:300,height:150,transformations:[]},this.transformers={cartesian:jt,translate:j,custom:kt,matrix:At,polar:Mt,transpose:_t,scale:Tt,"shear.x":It,"shear.y":Nt,reflect:St,"reflect.x":Et,"reflect.y":Pt,rotate:Lt,helix:Ct,parallel:zt,fisheye:Ht,"fisheye.x":$t,"fisheye.y":Wt,"fisheye.circular":qt},this.update(t)}function Ut(t){this.options={x:0,y:0,z:0,width:300,height:150,depth:150,transformations:[]},this.transformers={cartesian3D:Yt,translate3D:Xt,scale3D:Vt,transpose3D:Gt},this.update(t)}Kt.prototype.update=function(t){this.options=d({},this.options,t),this.recoordinate()},Kt.prototype.clone=function(){return new Kt(this.options)},Kt.prototype.getOptions=function(){return this.options},Kt.prototype.clear=function(){this.update({transformations:[]})},Kt.prototype.getSize=function(){var t=this.options;return[t.width,t.height]},Kt.prototype.getCenter=function(){var t=this.options;return[(2*t.x+t.width)/2,(2*t.y+t.height)/2]},Kt.prototype.transform=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this.update({transformations:r(r([],n(this.options.transformations),!1),[r([],n(t),!1)],!1)}),this},Kt.prototype.map=function(t){return this.output(t)},Kt.prototype.invert=function(t){return this.input(t)},Kt.prototype.recoordinate=function(){this.output=this.compose(),this.input=this.compose(!0)},Kt.prototype.compose=function(t){function o(t,e){var o;u.push((e=void 0===e||e)?(o=t,function(t){for(var e=[],i=0;i<t.length-1;i+=2){var a=o(a=[t[i],t[i+1]]);e.push.apply(e,r([],n(a),!1))}return e}):t)}var i,a,s=(t=void 0!==t&&t)?r([],n(this.options.transformations),!1).reverse():this.options.transformations,c=t?function(t){return t.untransform}:function(t){return t.transform},l=[],u=[];try{for(var f=e(s),d=f.next();!d.done;d=f.next()){var h,g,m,y,b,v,w=n(d.value),j=w[0],k=w.slice(1),A=this.transformers[j];A&&(g=(h=this.options).x,m=h.y,y=h.width,b=h.height,O(v=A(r([],n(k),!1),g,m,y,b))?l.push(v):(l.length&&(o(this.createMatrixTransform(l,t)),l.splice(0,l.length)),o(c(v)||p,"parallel"!==j)))}}catch(t){i={error:t}}finally{try{d&&!d.done&&(a=f.return)&&a.call(f)}finally{if(i)throw i.error}}return l.length&&o(this.createMatrixTransform(l,t)),x.apply(void 0,r([],n(u),!1))},Kt.prototype.createMatrixTransform=function(t,e){var n,r,o,i,a,s,c,l,u,f,d,p,h=m();return e&&t.reverse(),t.forEach(function(t){return y(h,h,t)}),e&&(e=t=h,(p=new g(9))[0]=e[0],p[1]=e[1],p[2]=e[2],p[3]=e[3],p[4]=e[4],p[5]=e[5],p[6]=e[6],p[7]=e[7],p[8]=e[8],p=(e=p)[0],n=e[1],r=e[2],o=e[3],i=e[4],a=e[5],s=e[6],c=e[7],d=p*(l=(e=e[8])*i-a*c)+n*(u=-e*o+a*s)+r*(f=c*o-i*s))&&(t[0]=l*(d=1/d),t[1]=(-e*n+r*c)*d,t[2]=(a*n-r*i)*d,t[3]=u*d,t[4]=(e*p-r*s)*d,t[5]=(-a*p+r*o)*d,t[6]=f*d,t[7]=(-c*p+n*s)*d,t[8]=(i*p-n*o)*d),function(t){var e,n,r,o,i;return o=(n=e=t=[t[0],t[1],1])[0],e[0]=o*(r=h)[0]+(i=n[1])*r[3]+(n=n[2])*r[6],e[1]=o*r[1]+i*r[4]+n*r[7],e[2]=o*r[2]+i*r[5]+n*r[8],[t[0],t[1]]}},B=Kt,Ut.prototype.update=function(t){this.options=d({},this.options,t),this.recoordinate()},Ut.prototype.clone=function(){return new Ut(this.options)},Ut.prototype.getOptions=function(){return this.options},Ut.prototype.clear=function(){this.update({transformations:[]})},Ut.prototype.getSize=function(){var t=this.options;return[t.width,t.height,t.depth]},Ut.prototype.getCenter=function(){var t=this.options;return[(2*t.x+t.width)/2,(2*t.y+t.height)/2,(2*t.z+t.depth)/2]},Ut.prototype.transform=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this.update({transformations:r(r([],n(this.options.transformations),!1),[r([],n(t),!1)],!1)}),this},Ut.prototype.map=function(t){return this.output(t)},Ut.prototype.invert=function(t){return this.input(t)},Ut.prototype.recoordinate=function(){this.output=this.compose(),this.input=this.compose(!0)},Ut.prototype.compose=function(t){function o(t,e){var o;u.push((e=void 0===e||e)?(o=t,function(t){for(var e=[],i=0;i<t.length-1;i+=3){var a=o(a=[t[i],t[i+1],t[i+2]]);e.push.apply(e,r([],n(a),!1))}return e}):t)}var i,a,s=(t=void 0!==t&&t)?r([],n(this.options.transformations),!1).reverse():this.options.transformations,c=t?function(t){return t.untransform}:function(t){return t.transform},l=[],u=[];try{for(var f=e(s),d=f.next();!d.done;d=f.next()){var h,g,m,y,b,v,w,j,k=n(d.value),A=k[0],M=k.slice(1),_=this.transformers[A];_&&(g=(h=this.options).x,m=h.y,y=h.z,b=h.width,v=h.height,w=h.depth,O(j=_(r([],n(M),!1),g,m,y,b,v,w))?l.push(j):(l.length&&(o(this.createMatrixTransform(l,t)),l.splice(0,l.length)),o(c(j)||p,!0)))}}catch(t){i={error:t}}finally{try{d&&!d.done&&(a=f.return)&&a.call(f)}finally{if(i)throw i.error}}return l.length&&o(this.createMatrixTransform(l,t)),x.apply(void 0,r([],n(u),!1))},Ut.prototype.createMatrixTransform=function(t,e){var n,r,o,i,a,s,c,l,u,f,d,p,h,m,y,x,O,w,j,k,A,M,_,S,E,P,L,C,z=b();return e&&t.reverse(),t.forEach(function(t){return v(z,z,t)}),e&&(e=t=z,(C=new g(16))[0]=e[0],C[1]=e[1],C[2]=e[2],C[3]=e[3],C[4]=e[4],C[5]=e[5],C[6]=e[6],C[7]=e[7],C[8]=e[8],C[9]=e[9],C[10]=e[10],C[11]=e[11],C[12]=e[12],C[13]=e[13],C[14]=e[14],C[15]=e[15],C=(e=C)[0],r=e[2],o=e[3],s=e[6],c=e[7],l=e[8],u=e[9],d=e[11],p=e[12],h=e[13],m=e[14],L=(y=C*(a=e[5])-(n=e[1])*(i=e[4]))*(P=(f=e[10])*(e=e[15])-d*m)-(x=C*s-r*i)*(E=u*e-d*h)+(O=C*c-o*i)*(S=u*m-f*h)+(w=n*s-r*a)*(_=l*e-d*p)-(j=n*c-o*a)*(M=l*m-f*p)+(k=r*c-o*s)*(A=l*h-u*p))&&(t[0]=(a*P-s*E+c*S)*(L=1/L),t[1]=(r*E-n*P-o*S)*L,t[2]=(h*k-m*j+e*w)*L,t[3]=(f*j-u*k-d*w)*L,t[4]=(s*_-i*P-c*M)*L,t[5]=(C*P-r*_+o*M)*L,t[6]=(m*O-p*k-e*x)*L,t[7]=(l*k-f*O+d*x)*L,t[8]=(i*E-a*_+c*A)*L,t[9]=(n*_-C*E-o*A)*L,t[10]=(p*j-h*O+e*y)*L,t[11]=(u*O-l*j-d*y)*L,t[12]=(a*M-i*S-s*A)*L,t[13]=(C*S-n*M+r*A)*L,t[14]=(h*x-p*w-m*y)*L,t[15]=(l*w-u*x+f*y)*L),function(t){var e,n,r,o,i,a;return o=(n=e=t=[t[0],t[1],t[2],1])[0],e[0]=(r=z)[0]*o+r[4]*(i=n[1])+r[8]*(a=n[2])+r[12]*(n=n[3]),e[1]=r[1]*o+r[5]*i+r[9]*a+r[13]*n,e[2]=r[2]*o+r[6]*i+r[10]*a+r[14]*n,e[3]=r[3]*o+r[7]*i+r[11]*a+r[15]*n,[t[0],t[1],t[2]]}},xt=Ut,t.Coordinate=B,t.Coordinate3D=xt,Object.defineProperty(t,"__esModule",{value:!0})}(e)},"./node_modules/.pnpm/@antv+util@3.3.11/node_modules/@antv/util/esm/lodash/deep-mix.js"(t,e,n){"use strict";var r=n("./node_modules/.pnpm/@antv+util@3.3.11/node_modules/@antv/util/esm/lodash/is-array.js"),o=n("./node_modules/.pnpm/@antv+util@3.3.11/node_modules/@antv/util/esm/lodash/is-plain-object.js");function i(t,e){if(Object.hasOwn)return Object.hasOwn(t,e);if(null==t)throw new TypeError("Cannot convert undefined or null to object");return Object.prototype.hasOwnProperty.call(Object(t),e)}function a(t,e,n,s){for(var c in n=n||0,s=s||5,e)if(i(e,c)){var l=e[c];null!==l&&(0,o.A)(l)?((0,o.A)(t[c])||(t[c]={}),n<s?a(t[c],l,n+1,s):t[c]=e[c]):(0,r.A)(l)?(t[c]=[],t[c]=t[c].concat(l)):void 0!==l&&(t[c]=l)}}const s=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)a(t,e[r]);return t};n.d(e,["A",0,s])},"./node_modules/.pnpm/@antv+util@3.3.11/node_modules/@antv/util/esm/lodash/is-object-like.js"(t,e,n){"use strict";n.d(e,["A",0,function(t){return"object"==typeof t&&null!==t}])},"./node_modules/.pnpm/@antv+util@3.3.11/node_modules/@antv/util/esm/lodash/is-plain-object.js"(t,e,n){"use strict";var r=n("./node_modules/.pnpm/@antv+util@3.3.11/node_modules/@antv/util/esm/lodash/is-object-like.js"),o=n("./node_modules/.pnpm/@antv+util@3.3.11/node_modules/@antv/util/esm/lodash/is-type.js");n.d(e,["A",0,function(t){if(!(0,r.A)(t)||!(0,o.A)(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}])},"./node_modules/.pnpm/color-name@1.1.4/node_modules/color-name/index.js"(t){"use strict";t.exports={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]}},"./node_modules/.pnpm/color-string@1.9.1/node_modules/color-string/index.js"(t,e,n){var r=n("./node_modules/.pnpm/color-name@1.1.4/node_modules/color-name/index.js"),o=n("./node_modules/.pnpm/simple-swizzle@0.2.4/node_modules/simple-swizzle/index.js"),i=Object.hasOwnProperty,a=Object.create(null);for(var s in r)i.call(r,s)&&(a[r[s]]=s);var c=t.exports={to:{},get:{}};function l(t,e,n){return Math.min(Math.max(e,t),n)}function u(t){var e=Math.round(t).toString(16).toUpperCase();return e.length<2?"0"+e:e}c.get=function(t){var e,n;switch(t.substring(0,3).toLowerCase()){case"hsl":e=c.get.hsl(t),n="hsl";break;case"hwb":e=c.get.hwb(t),n="hwb";break;default:e=c.get.rgb(t),n="rgb"}return e?{model:n,value:e}:null},c.get.rgb=function(t){if(!t)return null;var e,n,o,a=[0,0,0,1];if(e=t.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(o=e[2],e=e[1],n=0;n<3;n++){var s=2*n;a[n]=parseInt(e.slice(s,s+2),16)}o&&(a[3]=parseInt(o,16)/255)}else if(e=t.match(/^#([a-f0-9]{3,4})$/i)){for(o=(e=e[1])[3],n=0;n<3;n++)a[n]=parseInt(e[n]+e[n],16);o&&(a[3]=parseInt(o+o,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++)a[n]=parseInt(e[n+1],0);e[4]&&(a[3]=e[5]?.01*parseFloat(e[4]):parseFloat(e[4]))}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]:i.call(r,e[1])?((a=r[e[1]])[3]=1,a):null:null;for(n=0;n<3;n++)a[n]=Math.round(2.55*parseFloat(e[n+1]));e[4]&&(a[3]=e[5]?.01*parseFloat(e[4]):parseFloat(e[4]))}for(n=0;n<3;n++)a[n]=l(a[n],0,255);return a[3]=l(a[3],0,1),a},c.get.hsl=function(t){if(!t)return null;var e=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*)?\)$/);if(e){var n=parseFloat(e[4]);return[(parseFloat(e[1])%360+360)%360,l(parseFloat(e[2]),0,100),l(parseFloat(e[3]),0,100),l(isNaN(n)?1:n,0,1)]}return null},c.get.hwb=function(t){if(!t)return null;var e=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*)?\)$/);if(e){var n=parseFloat(e[4]);return[(parseFloat(e[1])%360+360)%360,l(parseFloat(e[2]),0,100),l(parseFloat(e[3]),0,100),l(isNaN(n)?1:n,0,1)]}return null},c.to.hex=function(){var t=o(arguments);return"#"+u(t[0])+u(t[1])+u(t[2])+(t[3]<1?u(Math.round(255*t[3])):"")},c.to.rgb=function(){var t=o(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]+")"},c.to.rgb.percent=function(){var t=o(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]+")"},c.to.hsl=function(){var t=o(arguments);return t.length<4||1===t[3]?"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)":"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+t[3]+")"},c.to.hwb=function(){var t=o(arguments),e="";return t.length>=4&&1!==t[3]&&(e=", "+t[3]),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+e+")"},c.to.keyword=function(t){return a[t.slice(0,3)]}},"./node_modules/.pnpm/is-arrayish@0.3.4/node_modules/is-arrayish/index.js"(t){t.exports=function(t){return!(!t||"string"==typeof t)&&(t instanceof Array||Array.isArray(t)||t.length>=0&&(t.splice instanceof Function||Object.getOwnPropertyDescriptor(t,t.length-1)&&"String"!==t.constructor.name))}},"./node_modules/.pnpm/pdfast@0.2.0/node_modules/pdfast/src/helper.js"(t){"use strict";var e=t.exports;t.exports.isNumber=function(t){return"number"==typeof t},t.exports.findMin=function(t){if(0===t.length)return 1/0;for(var e=t[0],n=1;n<t.length;n++)e=Math.min(e,t[n]);return e},t.exports.findMax=function(t){if(0===t.length)return-1/0;for(var e=t[0],n=1;n<t.length;n++)e=Math.max(e,t[n]);return e},t.exports.findMinMulti=function(t){for(var n=e.findMin(t[0]),r=1;r<t.length;r++)n=Math.min(n,e.findMin(t[r]));return n},t.exports.findMaxMulti=function(t){for(var n=e.findMax(t[0]),r=1;r<t.length;r++)n=Math.max(n,e.findMax(t[r]));return n},t.exports.inside=function(t,e,n){return t<=n&&n<=e}},"./node_modules/.pnpm/pdfast@0.2.0/node_modules/pdfast/src/index.js"(t,e,n){"use strict";var r=Math.log(2),o=t.exports,i=n("./node_modules/.pnpm/pdfast@0.2.0/node_modules/pdfast/src/helper.js");function a(t){return 1-Math.abs(t)}t.exports.getUnifiedMinMax=function(t,e){return o.getUnifiedMinMaxMulti([t],e)},t.exports.getUnifiedMinMaxMulti=function(t,e){var n=!1,r=!1,o=i.isNumber((e=e||{}).width)?e.width:2,a=i.isNumber(e.size)?e.size:50,s=i.isNumber(e.min)?e.min:(n=!0,i.findMinMulti(t)),c=i.isNumber(e.max)?e.max:(r=!0,i.findMaxMulti(t)),l=(c-s)/(a-1);return n&&(s-=2*o*l),r&&(c+=2*o*l),{min:s,max:c}},t.exports.create=function(t,e){if(!t||0===t.length)return[];var n=i.isNumber((e=e||{}).size)?e.size:50,r=i.isNumber(e.width)?e.width:2,s=o.getUnifiedMinMax(t,{size:n,width:r,min:e.min,max:e.max}),c=s.min,l=s.max-c,u=l/(n-1);if(0===l)return[{x:c,y:1}];for(var f=[],d=0;d<n;d++)f.push({x:c+d*u,y:0});var p=function(t,e){for(var n={},r=0,o=-e;o<=e;o++)r+=t(o/e),n[o]=r;return n}(a,r),h=p[r],g=p[r-1]-p[r-2],m=0;t.forEach(function(t){var e=function(t){return Math.floor((t-c)/u)}(t);if(!(e+r<0||e-r>=f.length)){var n=Math.max(e-r,0),o=e,a=Math.min(e+r,f.length-1),s=n-(e-r),l=h/(h-(p[-r-1+s]||0)-(p[-r-1+(e+r-a)]||0));s>0&&(m+=l*(s-1)*g);var d=Math.max(0,e-r+1);i.inside(0,f.length-1,d)&&(f[d].y+=1*l*g),i.inside(0,f.length-1,o+1)&&(f[o+1].y-=2*l*g),i.inside(0,f.length-1,a+1)&&(f[a+1].y+=1*l*g)}});var y=m,b=0,v=0;return f.forEach(function(t){t.y=y+=b+=t.y,v+=y}),v>0&&f.forEach(function(t){t.y/=v}),f},t.exports.getExpectedValueFromPdf=function(t){if(t&&0!==t.length){var e=0;return t.forEach(function(t){e+=t.x*t.y}),e}},t.exports.getXWithLeftTailArea=function(t,e){if(t&&0!==t.length){for(var n=0,r=0,o=0;o<t.length&&(r=o,!((n+=t[o].y)>=e));o++);return t[r].x}},t.exports.getPerplexity=function(t){if(t&&0!==t.length){var e=0;return t.forEach(function(t){var n=Math.log(t.y);isFinite(n)&&(e+=t.y*n)}),e=-e/r,Math.pow(2,e)}}},"./node_modules/.pnpm/simple-swizzle@0.2.4/node_modules/simple-swizzle/index.js"(t,e,n){"use strict";var r=n("./node_modules/.pnpm/is-arrayish@0.3.4/node_modules/is-arrayish/index.js"),o=Array.prototype.concat,i=Array.prototype.slice,a=t.exports=function(t){for(var e=[],n=0,a=t.length;n<a;n++){var s=t[n];r(s)?e=o.call(e,i.call(s)):e.push(s)}return e};a.wrap=function(t){return function(){return t(a(arguments))}}},"./src/components/fragments/async/extensions/Chart.tsx"(t,e,n){"use strict";n.r(e),n.d(e,{default:()=>$I});var r={};n.r(r),n.d(r,{area:()=>mc,bottom:()=>kc,bottomLeft:()=>kc,bottomRight:()=>kc,inside:()=>kc,left:()=>kc,outside:()=>Sc,right:()=>kc,spider:()=>Nc,surround:()=>Fc,top:()=>kc,topLeft:()=>kc,topRight:()=>kc});var o={};n.r(o),n.d(o,{interpolateBlues:()=>xf,interpolateBrBG:()=>Lu,interpolateBuGn:()=>Ku,interpolateBuPu:()=>Zu,interpolateCividis:()=>Lf,interpolateCool:()=>Zf,interpolateCubehelixDefault:()=>Kf,interpolateGnBu:()=>Qu,interpolateGreens:()=>wf,interpolateGreys:()=>kf,interpolateInferno:()=>cd,interpolateMagma:()=>sd,interpolateOrRd:()=>ef,interpolateOranges:()=>Pf,interpolatePRGn:()=>zu,interpolatePiYG:()=>Bu,interpolatePlasma:()=>ld,interpolatePuBu:()=>af,interpolatePuBuGn:()=>rf,interpolatePuOr:()=>Nu,interpolatePuRd:()=>cf,interpolatePurples:()=>Mf,interpolateRainbow:()=>Qf,interpolateRdBu:()=>Fu,interpolateRdGy:()=>$u,interpolateRdPu:()=>uf,interpolateRdYlBu:()=>Hu,interpolateRdYlGn:()=>Yu,interpolateReds:()=>Sf,interpolateSinebow:()=>rd,interpolateSpectral:()=>Gu,interpolateTurbo:()=>od,interpolateViridis:()=>ad,interpolateWarm:()=>Uf,interpolateYlGn:()=>hf,interpolateYlGnBu:()=>df,interpolateYlOrBr:()=>mf,interpolateYlOrRd:()=>bf,schemeAccent:()=>bu,schemeBlues:()=>vf,schemeBrBG:()=>Pu,schemeBuGn:()=>Vu,schemeBuPu:()=>Uu,schemeCategory10:()=>yu,schemeDark2:()=>vu,schemeGnBu:()=>Ju,schemeGreens:()=>Of,schemeGreys:()=>jf,schemeObservable10:()=>xu,schemeOrRd:()=>tf,schemeOranges:()=>Ef,schemePRGn:()=>Cu,schemePaired:()=>Ou,schemePastel1:()=>wu,schemePastel2:()=>ju,schemePiYG:()=>Tu,schemePuBu:()=>of,schemePuBuGn:()=>nf,schemePuOr:()=>Iu,schemePuRd:()=>sf,schemePurples:()=>Af,schemeRdBu:()=>Ru,schemeRdGy:()=>Du,schemeRdPu:()=>lf,schemeRdYlBu:()=>Wu,schemeRdYlGn:()=>qu,schemeReds:()=>_f,schemeSet1:()=>ku,schemeSet2:()=>Au,schemeSet3:()=>Mu,schemeSpectral:()=>Xu,schemeTableau10:()=>_u,schemeYlGn:()=>pf,schemeYlGnBu:()=>ff,schemeYlOrBr:()=>gf,schemeYlOrRd:()=>yf});var i={};n.r(i),n.d(i,{geoAlbers:()=>LC,geoAlbersUsa:()=>CC,geoAzimuthalEqualArea:()=>IC,geoAzimuthalEqualAreaRaw:()=>BC,geoAzimuthalEquidistant:()=>RC,geoAzimuthalEquidistantRaw:()=>NC,geoConicConformal:()=>qC,geoConicConformalRaw:()=>HC,geoConicEqualArea:()=>PC,geoConicEqualAreaRaw:()=>EC,geoConicEquidistant:()=>VC,geoConicEquidistantRaw:()=>GC,geoEqualEarth:()=>ez,geoEqualEarthRaw:()=>tz,geoEquirectangular:()=>XC,geoEquirectangularRaw:()=>YC,geoGnomonic:()=>rz,geoGnomonicRaw:()=>nz,geoIdentity:()=>oz,geoMercator:()=>DC,geoMercatorRaw:()=>FC,geoNaturalEarth1:()=>az,geoNaturalEarth1Raw:()=>iz,geoOrthographic:()=>cz,geoOrthographicRaw:()=>sz,geoProjection:()=>MC,geoProjectionMutator:()=>_C,geoStereographic:()=>uz,geoStereographicRaw:()=>lz,geoTransverseMercator:()=>dz,geoTransverseMercatorRaw:()=>fz});var a={};n.r(a),n.d(a,{frequency:()=>TT,id:()=>BT,name:()=>IT,weight:()=>zT});var s=n("react"),c=n.n(s),l=n("./node_modules/.pnpm/@antv+g@6.3.3/node_modules/@antv/g/dist/index.esm.js"),u=n("./node_modules/.pnpm/@antv+g-canvas@2.2.2/node_modules/@antv/g-canvas/dist/index.esm.js"),f=n("./node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/objectSpread2.js"),d=n("./node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/classCallCheck.js"),p=n("./node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/createClass.js"),h=n("./node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/callSuper.js"),g=n("./node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/inherits.js"),m=n("./node_modules/.pnpm/@antv+g-lite@2.7.2/node_modules/@antv/g-lite/dist/index.esm.js"),y=n("./node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js"),b=n("./node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"),v=n("./node_modules/.pnpm/@antv+util@3.3.11/node_modules/@antv/util/esm/path/util/distance-square-root.js"),x=function(){function t(e){(0,d.A)(this,t),this.dragndropPluginOptions=e}return(0,p.A)(t,[{key:"apply",value:function(e){var n=this,r=e.renderingService,o=e.renderingContext.root.ownerDocument,i=o.defaultView,a=function(t){var e=t.target,r=e===o,a=r&&n.dragndropPluginOptions.isDocumentDraggable?o:e.closest&&e.closest("[draggable=true]");if(a){var s=!1,c=t.timeStamp,l=[t.clientX,t.clientY],u=null,f=[t.clientX,t.clientY],d=function(){var t=(0,b.A)((0,y.A)().mark(function t(i){var d,p,h,g,m,b;return(0,y.A)().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(s){t.next=2;break}if(d=i.timeStamp-c,p=(0,v.F)([i.clientX,i.clientY],l),!(d<=n.dragndropPluginOptions.dragstartTimeThreshold||p<=n.dragndropPluginOptions.dragstartDistanceThreshold)){t.next=1;break}return t.abrupt("return");case 1:i.type="dragstart",a.dispatchEvent(i),s=!0;case 2:if(i.type="drag",i.dx=i.clientX-f[0],i.dy=i.clientY-f[1],a.dispatchEvent(i),f=[i.clientX,i.clientY],r){t.next=4;break}return h="pointer"===n.dragndropPluginOptions.overlap?[i.canvasX,i.canvasY]:e.getBounds().center,t.next=3,o.elementsFromPoint(h[0],h[1]);case 3:m=(g=t.sent)[g.indexOf(e)+1],b=(null==m?void 0:m.closest("[droppable=true]"))||(n.dragndropPluginOptions.isDocumentDroppable?o:null),u!==b&&(u&&(i.type="dragleave",i.target=u,u.dispatchEvent(i)),b&&(i.type="dragenter",i.target=b,b.dispatchEvent(i)),(u=b)&&(i.type="dragover",i.target=u,u.dispatchEvent(i)));case 4:case"end":return t.stop()}},t)}));return function(e){return t.apply(this,arguments)}}();i.addEventListener("pointermove",d);var p=function(t){if(s){t.detail={preventClick:!0};var e=t.clone();u&&(e.type="drop",e.target=u,u.dispatchEvent(e)),e.type="dragend",a.dispatchEvent(e),s=!1}i.removeEventListener("pointermove",d)};e.addEventListener("pointerup",p,{once:!0}),e.addEventListener("pointerupoutside",p,{once:!0})}};r.hooks.init.tap(t.tag,function(){i.addEventListener("pointerdown",a)}),r.hooks.destroy.tap(t.tag,function(){i.removeEventListener("pointerdown",a)})}}])}();x.tag="Dragndrop";var O=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,d.A)(this,e),(t=(0,h.A)(this,e)).name="dragndrop",t.options=n,t}return(0,g.A)(e,t),(0,p.A)(e,[{key:"init",value:function(){this.addRenderingPlugin(new x((0,f.A)({overlap:"pointer",isDocumentDraggable:!1,isDocumentDroppable:!1,dragstartDistanceThreshold:0,dragstartTimeThreshold:0},this.options)))}},{key:"destroy",value:function(){this.removeAllRenderingPlugins()}},{key:"setOptions",value:function(t){Object.assign(this.plugins[0].dragndropPluginOptions,t)}}])}(m.V1);const w=function(t,e,n){var r;return function(){var o=this,i=arguments,a=n&&!r;clearTimeout(r),r=setTimeout(function(){r=null,n||t.apply(o,i)},e),a&&t.apply(o,i)}};var j=n("./node_modules/.pnpm/@antv+util@3.3.11/node_modules/@antv/util/esm/lodash/is-string.js");const k=function(t,e,n){for(var r=0,o=(0,j.A)(e)?e.split("."):e;t&&r<o.length;)t=t[o[r++]];return void 0===t||r<o.length?n:t};var A=n("./node_modules/.pnpm/@antv+event-emitter@0.1.3/node_modules/@antv/event-emitter/esm/index.js");class M extends Map{constructor(t,e=P){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(_(this,t))}has(t){return super.has(_(this,t))}set(t,e){return super.set(S(this,t),e)}delete(t){return super.delete(E(this,t))}}Set;function _({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function S({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function E({_intern:t,_key:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function P(t){return null!==t&&"object"==typeof t?t.valueOf():t}function L(t){return t}function C(t,...e){return I(t,L,L,e)}function z(t,...e){return I(t,Array.from,L,e)}function T(t,e,...n){return I(t,L,e,n)}function B(t,e,...n){return I(t,Array.from,e,n)}function I(t,e,n,r){return function t(o,i){if(i>=r.length)return n(o);const a=new M,s=r[i++];let c=-1;for(const t of o){const e=s(t,++c,o),n=a.get(e);n?n.push(t):a.set(e,[t])}for(const[e,n]of a)a.set(e,t(n,i));return e(a)}(t,0)}var N=n("./node_modules/.pnpm/@antv+util@3.3.11/node_modules/@antv/util/esm/lodash/deep-mix.js"),R=n("./node_modules/.pnpm/@antv+util@3.3.11/node_modules/@antv/util/esm/lodash/is-nil.js");const F=function(t){return(0,R.A)(t)?"":t.toString()};const D=function(t){var e=F(t);return e.charAt(0).toLowerCase()+e.substring(1)};var $=n("./node_modules/.pnpm/@antv+util@3.3.11/node_modules/@antv/util/esm/lodash/is-plain-object.js");function W({map:t,initKey:e},n){const r=e(n);return t.has(r)?t.get(r):n}function H(t){return"object"==typeof t?t.valueOf():t}class q extends Map{constructor(t){if(super(),this.map=new Map,this.initKey=H,null!==t)for(const[e,n]of t)this.set(e,n)}get(t){return super.get(W({map:this.map,initKey:this.initKey},t))}has(t){return super.has(W({map:this.map,initKey:this.initKey},t))}set(t,e){return super.set(function({map:t,initKey:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}({map:this.map,initKey:this.initKey},t),e)}delete(t){return super.delete(function({map:t,initKey:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}({map:this.map,initKey:this.initKey},t))}}class Y{transformBreaks(t){return t}constructor(t){var e;this.options=(0,N.A)({},this.getDefaultOptions()),this.update((null===(e=null==t?void 0:t.breaks)||void 0===e?void 0:e.length)?this.transformBreaks(t):t)}getOptions(){return this.options}update(t={}){const e=t.breaks?this.transformBreaks(t):t;this.options=(0,N.A)({},this.options,e),this.rescale(e)}rescale(t){}}const X=Symbol("defaultUnknown");function G(t,e,n){for(let r=0;r<e.length;r+=1)t.has(e[r])||t.set(n(e[r]),r)}function V(t){const{value:e,from:n,to:r,mapper:o,notFoundReturn:i}=t;let a=o.get(e);if(void 0===a){if(i!==X)return i;a=n.push(e)-1,o.set(e,a)}return r[a%r.length]}function K(t){return t instanceof Date?t=>`${t}`:"object"==typeof t?t=>JSON.stringify(t):t=>t}class U extends Y{getDefaultOptions(){return{domain:[],range:[],unknown:X}}constructor(t){super(t)}map(t){return 0===this.domainIndexMap.size&&G(this.domainIndexMap,this.getDomain(),this.domainKey),V({value:this.domainKey(t),mapper:this.domainIndexMap,from:this.getDomain(),to:this.getRange(),notFoundReturn:this.options.unknown})}invert(t){return 0===this.rangeIndexMap.size&&G(this.rangeIndexMap,this.getRange(),this.rangeKey),V({value:this.rangeKey(t),mapper:this.rangeIndexMap,from:this.getRange(),to:this.getDomain(),notFoundReturn:this.options.unknown})}rescale(t){const[e]=this.options.domain,[n]=this.options.range;if(this.domainKey=K(e),this.rangeKey=K(n),!this.rangeIndexMap)return this.rangeIndexMap=new Map,void(this.domainIndexMap=new Map);t&&!t.range||this.rangeIndexMap.clear(),(!t||t.domain||t.compare)&&(this.domainIndexMap.clear(),this.sortedDomain=void 0)}clone(){return new U(this.options)}getRange(){return this.options.range}getDomain(){if(this.sortedDomain)return this.sortedDomain;const{domain:t,compare:e}=this.options;return this.sortedDomain=e?[...t].sort(e):t,this.sortedDomain}}function Z(t){return Math.round(1e12*t)/1e12}function J(t){const{domain:e,range:n,paddingOuter:r,paddingInner:o,flex:i,round:a,align:s}=t,c=e.length,l=function(t,e){const n=e-t.length;return n>0?[...t,...new Array(n).fill(1)]:n<0?t.slice(0,e):t}(i,c),[u,f]=n,d=f-u,p=d/(2/c*r+1-1/c*o),h=p*o/c,g=p-c*h,m=function(t){const e=t.reduce((t,e)=>Math.min(t,e),1/0);return e===1/0?[]:t.map(t=>t/e)}(l),y=m.reduce((t,e)=>t+e),b=g/y,v=new q(e.map((t,e)=>{const n=m[e]*b;return[t,a?Math.floor(n):n]})),x=new q(e.map((t,e)=>{const n=m[e]*b+h;return[t,a?Math.floor(n):n]})),O=Array.from(x.values()).reduce((t,e)=>t+e),w=u+(d-(O-O/c*o))*s;let j=a?Math.round(w):w;const k=new Array(c);for(let t=0;t<c;t+=1){k[t]=Z(j);j+=x.get(e[t])}return{valueBandWidth:v,valueStep:x,adjustedRange:k}}class Q extends U{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,paddingInner:0,paddingOuter:0,padding:0,unknown:X,flex:[]}}constructor(t){super(t)}clone(){return new Q(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(){const{padding:t,paddingInner:e}=this.options;return t>0?t:e}getPaddingOuter(){const{padding:t,paddingOuter:e}=this.options;return t>0?t:e}rescale(){super.rescale();const{align:t,domain:e,range:n,round:r,flex:o}=this.options,{adjustedRange:i,valueBandWidth:a,valueStep:s}=function(t){var e;const{domain:n}=t,r=n.length;if(0===r)return{valueBandWidth:void 0,valueStep:void 0,adjustedRange:[]};if(null===(e=t.flex)||void 0===e?void 0:e.length)return J(t);const{range:o,paddingOuter:i,paddingInner:a,round:s,align:c}=t;let l,u,f=o[0];const d=o[1]-f;l=d/Math.max(1,2*i+(r-a)),s&&(l=Math.floor(l)),f+=(d-l*(r-a))*c,u=l*(1-a),s&&(f=Math.round(f),u=Math.round(u));const p=new Array(r).fill(0).map((t,e)=>f+e*l);return{valueStep:l,valueBandWidth:u,adjustedRange:p}}({align:t,range:n,round:r,flex:o,paddingInner:this.getPaddingInner(),paddingOuter:this.getPaddingOuter(),domain:e});this.valueStep=s,this.valueBandWidth=a,this.adjustedRange=i}}var tt=n("./node_modules/.pnpm/@antv+util@3.3.11/node_modules/@antv/util/esm/lodash/is-number.js");const et=Math.sqrt(50),nt=Math.sqrt(10),rt=Math.sqrt(2);function ot(t,e,n){const r=(e-t)/Math.max(0,n),o=Math.floor(Math.log(r)/Math.LN10),i=r/10**o;return o>=0?(i>=et?10:i>=nt?5:i>=rt?2:1)*10**o:-(10**-o)/(i>=et?10:i>=nt?5:i>=rt?2:1)}function it(t,e,n){const r=Math.abs(e-t)/Math.max(0,n);let o=10**Math.floor(Math.log(r)/Math.LN10);const i=r/o;return i>=et?o*=10:i>=nt?o*=5:i>=rt&&(o*=2),e<t?-o:o}const at=(t,e,n,r)=>{let o,i,a=t,s=e;if(a===s&&n>0)return[a];let c=ot(a,s,n);if(0===c||!Number.isFinite(c))return[];if(c>0){a=Math.ceil(a/c),s=Math.floor(s/c),i=new Array(o=Math.ceil(s-a+1));for(let t=0;t<o;t+=1)i[t]=(a+t)*c}else{c=-c,a=Math.ceil(a*c),s=Math.floor(s*c),i=new Array(o=Math.ceil(s-a+1));for(let t=0;t<o;t+=1)i[t]=(a+t)/c}return((t,e)=>{if(!(null==e?void 0:e.length))return t;const n=[...t,...e.flatMap(t=>[t.start,t.end])],r=Array.from(new Set(n)).sort((t,e)=>t-e),o=r.filter(t=>!e.some(({start:e,end:n})=>t>e&&t<n));return o.length?o:t})(i,r)};class st extends Y{getDefaultOptions(){return{range:[0],domain:[0,1],unknown:void 0,tickCount:5,tickMethod:at}}map(t){const[e]=this.options.range;return void 0!==e?e:this.options.unknown}invert(t){const[e]=this.options.range;return t===e&&void 0!==e?this.options.domain:[]}getTicks(){const{tickMethod:t,domain:e,tickCount:n}=this.options,[r,o]=e;return(0,tt.A)(r)&&(0,tt.A)(o)?t(r,o,n):[]}clone(){return new st(this.options)}}var ct=function(t,e,n,r){return new(n||(n=Promise))(function(o,i){function a(t){try{c(r.next(t))}catch(t){i(t)}}function s(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){t.done?o(t.value):function(t){return t instanceof n?t:new n(function(e){e(t)})}(t.value).then(a,s)}c((r=r.apply(t,e||[])).next())})};function lt(t){var e;let n=t;for(;n;){if("view"===(null===(e=n.attributes)||void 0===e?void 0:e.class))return n;n=n.parentNode}return null}function ut(t){const{markType:e,nodeName:n}=t;return"heatmap"===e&&"image"===n}function ft(t,e){const n=null!=e?e:lt(t).__data__,r=t.__data__,{markKey:o,index:i,seriesIndex:a,normalized:s={x:0}}=r,{markState:c}=n,l=Array.from(c.keys()).find(t=>t.key===o);if(l)return a?a.map(t=>l.data[t]):ut(t)?l.data[Math.round(l.data.length*s.x)]:l.data[i]}function dt(t,e){const{color:n,facet:r=!1}=t,{color:o,series:i}=e,a=function(t,e){var n,r,o,i;const a=null!==(n=e.markKey)&&void 0!==n?n:null===(o=null===(r=e.element)||void 0===r?void 0:r.__data__)||void 0===o?void 0:o.markKey,s=Object.keys(t).find(e=>{if(e.startsWith("series")){const n=t[e].getOptions();return"series"===n.name&&n.markKey===a}});return null!==(i=t[s])&&void 0!==i?i:t.series}(t,e),s=t=>t&&t.invert&&!(t instanceof Q)&&!(t instanceof st);if(s(a)){return a.clone().invert(i)}if(i&&a instanceof Q&&a.invert(i)!==o&&!r)return a.invert(i);if(s(n)){const t=n.invert(o);return Array.isArray(t)?null:t}return null}function pt(t){return t}function ht(t){return t.reduce((t,e)=>(n,...r)=>e(t(n,...r),...r),pt)}function gt(t){return t.replace(/( |^)[a-z]/g,t=>t.toUpperCase())}function mt(t=""){throw new Error(t)}function yt(t,e){const{attributes:n}=e,r=new Set(["id","className"]);for(const[e,o]of Object.entries(n))r.has(e)||t.attr(e,o)}function bt(t){return null!=t&&!Number.isNaN(t)}function vt(t){const e=new Map;return n=>{if(e.has(n))return e.get(n);const r=t(n);return e.set(n,r),r}}function xt(t,e){return Ot(t,e)||{}}function Ot(t,e){const n=Object.entries(t||{}).filter(([t])=>t.startsWith(e)).map(([t,n])=>[D(t.replace(e,"").trim()),n]).filter(([t])=>!!t);return 0===n.length?null:Object.fromEntries(n)}function wt(t,...e){return Object.fromEntries(Object.entries(t).filter(([t])=>e.every(e=>!t.startsWith(e))))}function jt(t,e){if(void 0===t)return null;if("number"==typeof t)return t;const n=+t.replace("%","");return Number.isNaN(n)?null:n/100*e}function kt(t){return!("object"!=typeof t||t instanceof Date||null===t||Array.isArray(t))}function At(t){return null===t||!1===t}function Mt(t,e,n=5,r=0){if(!(r>=n)){for(const o of Object.keys(e)){const i=e[o];(0,$.A)(i)&&(0,$.A)(t[o])?Mt(t[o],i,n,r+1):t[o]=i}return t}}function _t(t){return new St([t],null,t,t.ownerDocument)}class St{constructor(t=null,e=null,n=null,r=null,o=[null,null,null,null,null],i=[],a=[]){this._elements=Array.from(t),this._data=e,this._parent=n,this._document=r,this._enter=o[0],this._update=o[1],this._exit=o[2],this._merge=o[3],this._split=o[4],this._transitions=i,this._facetElements=a}selectAll(t){const e="string"==typeof t?this._parent.querySelectorAll(t):t;return new St(e,null,this._elements[0],this._document)}selectFacetAll(t){const e="string"==typeof t?this._parent.querySelectorAll(t):t;return new St(this._elements,null,this._parent,this._document,void 0,void 0,e)}select(t){const e="string"==typeof t?this._parent.querySelectorAll(t)[0]||null:t;return new St([e],null,e,this._document)}append(t){const e="function"==typeof t?t:()=>this.createElement(t),n=[];if(null!==this._data){for(let t=0;t<this._data.length;t++){const r=this._data[t],[o,i]=Array.isArray(r)?r:[r,null],a=e(o,t);a.__data__=o,null!==i&&(a.__fromElements__=i),this._parent.appendChild(a),n.push(a)}return new St(n,null,this._parent,this._document)}for(let t=0;t<this._elements.length;t++){const r=this._elements[t],o=e(r.__data__,t);r.appendChild(o),n.push(o)}return new St(n,null,n[0],this._document)}maybeAppend(t,e,n){const r=this._elements[0],o=r.getElementById(t);if(o)return new St([o],null,this._parent,this._document);const i="string"==typeof e?this.createElement(e):e();return i.id=t,n&&(i.className=n),r.appendChild(i),new St([i],null,this._parent,this._document)}data(t,e=t=>t,n=()=>null){const r=[],o=[],i=new Set(this._elements),a=[],s=new Set,c=new Map(this._elements.map((t,n)=>[e(t.__data__,n),t])),l=new Map(this._facetElements.map((t,n)=>[e(t.__data__,n),t])),u=C(this._elements,t=>n(t.__data__));for(let f=0;f<t.length;f++){const d=t[f],p=e(d,f),h=n(d,f);if(c.has(p)){const t=c.get(p);t.__data__=d,t.__facet__=!1,o.push(t),i.delete(t),c.delete(p)}else if(l.has(p)){const t=l.get(p);t.__data__=d,t.__facet__=!0,o.push(t),l.delete(p)}else if(u.has(p)){const t=u.get(p);a.push([d,t]);for(const e of t)i.delete(e);u.delete(p)}else if(c.has(h)){const t=c.get(h);t.__toData__?t.__toData__.push(d):t.__toData__=[d],s.add(t),i.delete(t)}else r.push(d)}const f=[new St([],r,this._parent,this._document),new St(o,null,this._parent,this._document),new St(i,null,this._parent,this._document),new St([],a,this._parent,this._document),new St(s,null,this._parent,this._document)];return new St(this._elements,null,this._parent,this._document,f)}merge(t){const e=[...this._elements,...t._elements],n=[...this._transitions,...t._transitions];return new St(e,null,this._parent,this._document,void 0,n)}createElement(t){if(this._document)return this._document.createElement(t,{});const e=St.registry[t];return e?new e:mt(`Unknown node type: ${t}`)}join(t=t=>t,e=t=>t,n=t=>t.remove(),r=t=>t,o=t=>t.remove()){const i=t(this._enter),a=e(this._update),s=n(this._exit),c=r(this._merge),l=o(this._split);return a.merge(i).merge(s).merge(c).merge(l)}remove(){for(let t=0;t<this._elements.length;t++){const e=this._transitions[t];if(this._elements[t].__removed__=!0,e){const n=Array.isArray(e)?e:[e];Promise.all(n.map(t=>t.finished)).then(()=>{const e=this._elements[t];e.__removed__&&e.remove()})}else{const e=this._elements[t];e.__removed__&&e.remove()}}return new St([],null,this._parent,this._document,void 0,this._transitions)}each(t){for(let e=0;e<this._elements.length;e++){const n=this._elements[e];t(n.__data__,e,n)}return this}attr(t,e){const n="function"!=typeof e?()=>e:e;return this.each(function(r,o,i){void 0!==e&&(i[t]=n(r,o,i))})}style(t,e){const n="function"!=typeof e?()=>e:e;return this.each(function(r,o,i){void 0!==e&&(i.style[t]=n(r,o,i))})}transition(t){const e="function"!=typeof t?()=>t:t,{_transitions:n}=this;return this.each(function(t,r,o){n[r]=e(t,r,o)})}on(t,e){return this.each(function(n,r,o){o.addEventListener(t,e)}),this}call(t,...e){return t(this,...e),this}node(){return this._elements[0]}nodes(){return this._elements}transitions(){return this._transitions}parent(){return this._parent}}St.registry={g:l.YJ,rect:l.rw,circle:l.jl,path:l.wA,text:l.EY,ellipse:l.Pp,image:l._V,line:l.N1,polygon:l.tS,polyline:l.Ro,html:l.g3};const Et="beforerender",Pt="afterrender",Lt="beforepaint",Ct="afterpaint",zt="beforeclear",Tt="afterclear",Bt="beforedestroy",It="afterdestroy",Nt="beforechangesize",Rt="afterchangesize",Ft="pointertap",Dt="pointerdown",$t="pointerup",Wt="pointerover",Ht="pointerout",qt="pointermove",Yt="pointerenter",Xt="pointerleave",Gt="pointerupoutside",Vt="dragstart",Kt="drag",Ut="dragend",Zt="dragenter",Jt="dragleave",Qt="dragover",te="DROP",ee="click",ne="dblclick",re={abs:Math.abs,ceil:Math.ceil,floor:Math.floor,max:Math.max,min:Math.min,round:Math.round,sqrt:Math.sqrt,pow:Math.pow};class oe extends Error{constructor(t,e,n){super(t),this.position=e,this.token=n,this.name="ExpressionError"}}var ie;!function(t){t[t.STRING=0]="STRING",t[t.NUMBER=1]="NUMBER",t[t.BOOLEAN=2]="BOOLEAN",t[t.NULL=3]="NULL",t[t.IDENTIFIER=4]="IDENTIFIER",t[t.OPERATOR=5]="OPERATOR",t[t.FUNCTION=6]="FUNCTION",t[t.DOT=7]="DOT",t[t.BRACKET_LEFT=8]="BRACKET_LEFT",t[t.BRACKET_RIGHT=9]="BRACKET_RIGHT",t[t.PAREN_LEFT=10]="PAREN_LEFT",t[t.PAREN_RIGHT=11]="PAREN_RIGHT",t[t.COMMA=12]="COMMA",t[t.QUESTION=13]="QUESTION",t[t.COLON=14]="COLON",t[t.DOLLAR=15]="DOLLAR"}(ie||(ie={}));const ae=new Set([32,9,10,13]),se=new Set([43,45,42,47,37,33,38,124,61,60,62]),ce=new Map([["true",ie.BOOLEAN],["false",ie.BOOLEAN],["null",ie.NULL]]),le=new Map([["===",!0],["!==",!0],["<=",!0],[">=",!0],["&&",!0],["||",!0],["+",!0],["-",!0],["*",!0],["/",!0],["%",!0],["!",!0],["<",!0],[">",!0]]),ue=new Map([[46,ie.DOT],[91,ie.BRACKET_LEFT],[93,ie.BRACKET_RIGHT],[40,ie.PAREN_LEFT],[41,ie.PAREN_RIGHT],[44,ie.COMMA],[63,ie.QUESTION],[58,ie.COLON],[36,ie.DOLLAR]]),fe=new Map;for(const[t,e]of ue.entries())fe.set(t,{type:e,value:String.fromCharCode(t)});function de(t){return t>=48&&t<=57}function pe(t){return t>=97&&t<=122||t>=65&&t<=90||95===t}function he(t){return pe(t)||de(t)}function ge(t){return se.has(t)}var me;!function(t){t[t.Program=0]="Program",t[t.Literal=1]="Literal",t[t.Identifier=2]="Identifier",t[t.MemberExpression=3]="MemberExpression",t[t.CallExpression=4]="CallExpression",t[t.BinaryExpression=5]="BinaryExpression",t[t.UnaryExpression=6]="UnaryExpression",t[t.ConditionalExpression=7]="ConditionalExpression"}(me||(me={}));const ye=new Map([["||",2],["&&",3],["===",4],["!==",4],[">",5],[">=",5],["<",5],["<=",5],["+",6],["-",6],["*",7],["/",7],["%",7],["!",8]]),be={type:me.Literal,value:null},ve={type:me.Literal,value:!0},xe={type:me.Literal,value:!1},Oe=t=>{let e=0;const n=t.length,r=()=>e>=n?null:t[e],o=()=>t[e++],i=t=>{const e=r();return null!==e&&e.type===t},a=t=>t.type===ie.OPERATOR?ye.get(t.value)||-1:t.type===ie.DOT||t.type===ie.BRACKET_LEFT?9:t.type===ie.QUESTION?1:-1,s=t=>{let n,a;if(o().type===ie.DOT){if(!i(ie.IDENTIFIER)){const t=r();throw new oe("Expected property name",e,t?t.value:"<end of input>")}const t=o();n={type:me.Identifier,name:t.value},a=!1}else{if(n=l(0),!i(ie.BRACKET_RIGHT)){const t=r();throw new oe("Expected closing bracket",e,t?t.value:"<end of input>")}o(),a=!0}return{type:me.MemberExpression,object:t,property:n,computed:a}},c=()=>{const t=r();if(!t)throw new oe("Unexpected end of input",e,"<end of input>");if(t.type===ie.OPERATOR&&("!"===t.value||"-"===t.value)){o();const e=c();return{type:me.UnaryExpression,operator:t.value,argument:e,prefix:!0}}switch(t.type){case ie.NUMBER:return o(),{type:me.Literal,value:Number(t.value)};case ie.STRING:return o(),{type:me.Literal,value:t.value};case ie.BOOLEAN:return o(),"true"===t.value?ve:xe;case ie.NULL:return o(),be;case ie.IDENTIFIER:return o(),{type:me.Identifier,name:t.value};case ie.FUNCTION:return(()=>{const t=o(),n=[];if(!i(ie.PAREN_LEFT)){const t=r();throw new oe("Expected opening parenthesis after function name",e,t?t.value:"<end of input>")}for(o();;){if(i(ie.PAREN_RIGHT)){o();break}if(!r()){const t=r();throw new oe("Expected closing parenthesis",e,t?t.value:"<end of input>")}if(n.length>0){if(!i(ie.COMMA)){const t=r();throw new oe("Expected comma between function arguments",e,t?t.value:"<end of input>")}o()}const t=l(0);n.push(t)}return{type:me.CallExpression,callee:{type:me.Identifier,name:t.value},arguments:n}})();case ie.PAREN_LEFT:{o();const t=l(0);if(!i(ie.PAREN_RIGHT)){const t=r();throw new oe("Expected closing parenthesis",e,t?t.value:"<end of input>")}return o(),t}default:throw new oe(`Unexpected token: ${t.type}`,e,t.value)}},l=(u=0)=>{let f=c();for(;e<n;){const n=t[e],c=a(n);if(c<=u)break;if(n.type!==ie.QUESTION)if(n.type!==ie.OPERATOR){if(n.type!==ie.DOT&&n.type!==ie.BRACKET_LEFT)break;f=s(f)}else{o();const t=l(c);f={type:me.BinaryExpression,operator:n.value,left:f,right:t}}else{o();const t=l(0);if(!i(ie.COLON)){const t=r();throw new oe("Expected : in conditional expression",e,t?t.value:"<end of input>")}o();const n=l(0);f={type:me.ConditionalExpression,test:f,consequent:t,alternate:n}}}return f},u=l();return{type:me.Program,body:u}},we=(t,e,n)=>{let r=e;n&&(r={...e,context:{...e.context,...n}});const o=t=>{switch(t.type){case me.Literal:return(t=>t.value)(t);case me.Identifier:return(t=>{if(!(t.name in r.context))throw new oe(`Undefined variable: ${t.name}`);return r.context[t.name]})(t);case me.MemberExpression:return(t=>{const e=o(t.object);if(null==e)throw new oe("Cannot access property of null or undefined");return e[t.computed?o(t.property):t.property.name]})(t);case me.CallExpression:return(t=>{const e=r.functions[t.callee.name];if(!e)throw new oe(`Undefined function: ${t.callee.name}`);return e(...t.arguments.map(t=>o(t)))})(t);case me.BinaryExpression:return(t=>{if("&&"===t.operator){const e=o(t.left);return e?o(t.right):e}if("||"===t.operator)return o(t.left)||o(t.right);const e=o(t.left),n=o(t.right);switch(t.operator){case"+":return e+n;case"-":return e-n;case"*":return e*n;case"/":return e/n;case"%":return e%n;case"===":return e===n;case"!==":return e!==n;case">":return e>n;case">=":return e>=n;case"<":return e<n;case"<=":return e<=n;default:throw new oe(`Unknown operator: ${t.operator}`)}})(t);case me.UnaryExpression:return(t=>{const e=o(t.argument);if(t.prefix)switch(t.operator){case"!":return!e;case"-":if("number"!=typeof e)throw new oe(`Cannot apply unary - to non-number: ${e}`);return-e;default:throw new oe(`Unknown operator: ${t.operator}`)}throw new oe(`Postfix operators are not supported: ${t.operator}`)})(t);case me.ConditionalExpression:return(t=>{const e=o(t.test);return o(e?t.consequent:t.alternate)})(t);default:throw new oe(`Evaluation error: Unsupported node type: ${t.type}`)}};return o(t.body)};function je(t){const e=(t=>{const e=t,n=e.length,r=new Array(Math.ceil(n/3));let o=0,i=0;function a(t){const r=i+1;i++;let o="",a=!1;for(;i<n;){const n=e.charCodeAt(i);if(n===t)return a||(o=e.substring(r,i)),i++,{type:ie.STRING,value:o};92===n?(a||(o=e.substring(r,i),a=!0),i++,o+=e[i]):a&&(o+=e[i]),i++}throw new oe(`Unterminated string starting with ${String.fromCharCode(t)}`,i,e.substring(Math.max(0,i-10),i))}function s(){const t=i;for(45===e.charCodeAt(i)&&i++;i<n&&de(e.charCodeAt(i));)i++;if(i<n&&46===e.charCodeAt(i))for(i++;i<n&&de(e.charCodeAt(i));)i++;const r=e.slice(t,i);return{type:ie.NUMBER,value:r}}function c(){i++;const t=i;if(i<n&&pe(e.charCodeAt(i)))for(i++;i<n&&he(e.charCodeAt(i));)i++;const r=e.slice(t,i);return{type:ie.FUNCTION,value:r}}function l(){const t=i++;for(;i<n&&he(e.charCodeAt(i));)i++;const r=e.slice(t,i),o=ce.get(r);return o?{type:o,value:r}:{type:ie.IDENTIFIER,value:r}}function u(){if(i+2<n){const t=e.substring(i,i+3);if(le.has(t))return i+=3,{type:ie.OPERATOR,value:t}}if(i+1<n){const t=e.substring(i,i+2);if(le.has(t))return i+=2,{type:ie.OPERATOR,value:t}}const t=e[i];if(le.has(t))return i++,{type:ie.OPERATOR,value:t};throw new oe(`Unknown operator at position ${i}: ${e.substring(i,i+1)}`,i,e.substring(Math.max(0,i-10),i))}for(;i<n;){const t=e.charCodeAt(i);if(ae.has(t)){i++;continue}const f=fe.get(t);if(f)r[o++]=f,i++;else if(34!==t&&39!==t)if(de(t)||45===t&&i+1<n&&de(e.charCodeAt(i+1)))r[o++]=s();else if(64!==t)if(pe(t))r[o++]=l();else{if(!ge(t))throw new oe(`Unexpected character: ${e[i]}`,i,e.substring(Math.max(0,i-10),i));r[o++]=u()}else r[o++]=c();else r[o++]=a(t)}return o===r.length?r:r.slice(0,o)})(t),n=Oe(e),r=((t={},e={})=>({context:t,functions:e}))({},re);return(t={})=>we(n,r,t)}var ke=n("./node_modules/.pnpm/@antv+util@3.3.11/node_modules/@antv/util/esm/lodash/is-object.js"),Ae=function(t){return t};var Me=n("./node_modules/.pnpm/flru@1.0.2/node_modules/flru/dist/flru.mjs");(0,Me.A)(3);function _e(t,e=(...t)=>`${t[0]}`,n=16){const r=(0,Me.A)(n);return(...n)=>{const o=e(...n);let i=r.get(o);return r.has(o)?r.get(o):(i=t(...n),r.set(o,i),i)}}const Se=["style","encode","labels","children"],Ee=_e(t=>{const e=je(t);return(...t)=>{const n=Array.from({length:t.length},(t,e)=>String.fromCharCode(97+e)),r=Object.fromEntries(t.map((t,e)=>[n[e],t]));return e(Object.assign(Object.assign({},r),{global:Object.assign({},r)}))}},t=>t,128);function Pe(t,e=!0){if(Array.isArray(t))return t.map((n,r)=>Pe(t[r],e));if("object"==typeof t&&t)return function(t,e){void 0===e&&(e=Ae);var n={};return(0,ke.A)(t)&&!(0,R.A)(t)&&Object.keys(t).forEach(function(r){n[r]=e(t[r],r)}),n}(t,(t,n)=>e&&Se.includes(n)?Pe(t,"children"===n):e?t:Pe(t,!1));if("string"==typeof t){const e=t.trim();if(e.startsWith("{")&&e.endsWith("}"))return Ee(e.slice(1,-1))}return t}var Le=n("./node_modules/.pnpm/@antv+util@3.3.11/node_modules/@antv/util/esm/lodash/is-array.js");const Ce=function(t){var e=F(t);return e.charAt(0).toUpperCase()+e.substring(1)};var ze=n("./node_modules/.pnpm/d3-format@3.1.2/node_modules/d3-format/src/defaultLocale.js");function Te(t,e){return Object.entries(t).reduce((n,[r,o])=>(n[r]=e(o,r,t),n),{})}function Be(t){return t.map((t,e)=>e)}function Ie(t){return t[0]}function Ne(t){return t[t.length-1]}function Re(t,e){const n=[[],[]];return t.forEach(t=>{n[e(t)?0:1].push(t)}),n}function Fe(t,e=t.length){if(1===e)return t.map(t=>[t]);const n=[];for(let r=0;r<t.length;r++){Fe(t.slice(r+1),e-1).forEach(e=>{n.push([t[r],...e])})}return n}var De=n("./node_modules/.pnpm/@antv+util@3.3.11/node_modules/@antv/util/esm/lodash/is-object-like.js");const $e=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)};var We=function(t,e){if(t===e)return!0;if(!t||!e)return!1;if((0,j.A)(t)||(0,j.A)(e))return!1;if($e(t)||$e(e)){if(t.length!==e.length)return!1;for(var n=!0,r=0;r<t.length&&(n=We(t[r],e[r]));r++);return n}if((0,De.A)(t)||(0,De.A)(e)){var o=Object.keys(t),i=Object.keys(e);if(o.length!==i.length)return!1;for(n=!0,r=0;r<o.length&&(n=We(t[o[r]],e[o[r]]));r++);return n}return!1};const He=We;function qe(t,e){let n=0;if(void 0===e)for(let e of t)(e=+e)&&(n+=e);else{let r=-1;for(let o of t)(o=+e(o,++r,t))&&(n+=o)}return n}function Ye(t,e){let n;if(void 0===e)for(const e of t)null!=e&&(n<e||void 0===n&&e>=e)&&(n=e);else{let r=-1;for(let o of t)null!=(o=e(o,++r,t))&&(n<o||void 0===n&&o>=o)&&(n=o)}return n}const Xe=(t={})=>{const e={startAngle:-Math.PI/2,endAngle:3*Math.PI/2,innerRadius:0,outerRadius:1},n=Object.assign(Object.assign({},e),t);return Object.assign(Object.assign({},n),(r=n.startAngle,o=n.endAngle,r%=2*Math.PI,o%=2*Math.PI,r<0&&(r=2*Math.PI+r),o<0&&(o=2*Math.PI+o),r>=o&&(o+=2*Math.PI),{startAngle:r,endAngle:o}));var r,o},Ge=t=>{const{startAngle:e,endAngle:n,innerRadius:r,outerRadius:o}=Xe(t);return[["translate",0,.5],["reflect.y"],["translate",0,-.5],["polar",e,n,r,o]]};Ge.props={};const Ve=(t={})=>{const e={startAngle:-Math.PI/2,endAngle:3*Math.PI/2,innerRadius:0,outerRadius:1};return Object.assign(Object.assign({},e),t)},Ke=t=>{const{startAngle:e,endAngle:n,innerRadius:r,outerRadius:o}=Ve(t);return[["transpose"],["translate",.5,.5],["reflect"],["translate",-.5,-.5],...Ge({startAngle:e,endAngle:n,innerRadius:r,outerRadius:o})]};function Ue(t,e,n){return Math.max(e,Math.min(t,n))}function Ze(t,e=10){return"number"!=typeof t||Math.abs(t)<1e-15?t:parseFloat(t.toFixed(e))}Ke.props={};function Je(t){return`.g2-${t}`}const Qe=[["legendCategory",[[["color","discrete"],["opacity","discrete"],["shape","discrete"],["size","constant"]],[["color","discrete"],["opacity","constant"],["shape","discrete"],["size","constant"]],[["color","discrete"],["opacity","discrete"],["shape","constant"],["size","constant"]],[["color","discrete"],["opacity","constant"],["shape","constant"],["size","constant"]],[["color","constant"],["opacity","discrete"],["shape","discrete"],["size","constant"]],[["color","constant"],["opacity","constant"],["shape","discrete"],["size","constant"]],[["color","constant"],["opacity","discrete"],["shape","constant"],["size","constant"]],[["color","discrete"],["shape","discrete"],["size","constant"]],[["color","discrete"],["opacity","discrete"],["shape","discrete"]],[["color","discrete"],["opacity","discrete"],["size","constant"]],[["color","discrete"],["opacity","constant"],["shape","discrete"]],[["color","discrete"],["opacity","constant"],["size","constant"]],[["color","discrete"],["shape","constant"],["size","constant"]],[["color","discrete"],["opacity","discrete"],["shape","constant"]],[["color","discrete"],["opacity","constant"],["shape","constant"]],[["color","constant"],["shape","discrete"],["size","constant"]],[["color","constant"],["opacity","discrete"],["shape","discrete"]],[["color","constant"],["opacity","discrete"],["size","constant"]],[["color","constant"],["opacity","constant"],["shape","discrete"]],[["color","constant"],["opacity","discrete"],["shape","constant"]],[["color","discrete"],["shape","discrete"]],[["color","discrete"],["size","constant"]],[["color","discrete"],["opacity","discrete"]],[["color","discrete"],["opacity","constant"]],[["color","discrete"],["shape","constant"]],[["color","constant"],["shape","discrete"]],[["color","constant"],["size","constant"]],[["color","constant"],["opacity","discrete"]],[["color","discrete"]]]],["legendContinuousSize",[[["color","continuous"],["opacity","continuous"],["size","continuous"]],[["color","constant"],["opacity","continuous"],["size","continuous"]],[["color","continuous"],["size","continuous"]],[["color","constant"],["size","continuous"]],[["size","continuous"],["opacity","continuous"]],[["size","continuous"]]]],["legendContinuousBlockSize",[[["color","distribution"],["opacity","distribution"],["size","distribution"]],[["color","distribution"],["size","distribution"]]]],["legendContinuousBlock",[[["color","distribution"],["opacity","continuous"]],[["color","distribution"]]]],["legendContinuous",[[["color","continuous"],["opacity","continuous"]],[["color","continuous"]],[["opacity","continuous"]]]]],tn=["lineX","lineY","rangeX","rangeY","range","connector"];var en=n("./node_modules/.pnpm/@antv+coord@0.4.7/node_modules/@antv/coord/dist/coordinate.min.js");function nn(t){const{transformations:e}=t.getOptions();return e.map(([t])=>t).filter(t=>"transpose"===t).length%2!=0}function rn(t){const{transformations:e}=t.getOptions();return e.some(([t])=>"polar"===t)}function on(t){const{transformations:e}=t.getOptions();return e.some(([t])=>"reflect"===t)&&e.some(([t])=>t.startsWith("transpose"))}function an(t){const{transformations:e}=t.getOptions();return e.some(([t])=>"helix"===t)}function sn(t){const{transformations:e}=t.getOptions();return e.some(([t])=>"parallel"===t)}function cn(t){const{transformations:e}=t.getOptions();return e.some(([t])=>"fisheye"===t)}function ln(t){return an(t)||rn(t)}function un(t){return rn(t)&&nn(t)}function fn(t){const{transformations:e}=t.getOptions(),[,,,n,r]=e.find(t=>"polar"===t[0]);return[+n,+r]}function dn(t,e=!0){const{transformations:n}=t.getOptions(),[,r,o]=n.find(t=>"polar"===t[0]);return e?[180*+r/Math.PI,180*+o/Math.PI]:[r,o]}var pn=n("./node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.mjs");function hn(t,e){e(t),t.children&&t.children.forEach(function(t){t&&hn(t,e)})}function gn(t){yn(t,!0)}function mn(t){yn(t,!1)}function yn(t,e){var n=e?"visible":"hidden";hn(t,function(t){t.attr("visibility",n)})}function bn(t){if(!t)return{enter:!1,update:!1,exit:!1};var e=["enter","update","exit"],n=Object.fromEntries(Object.entries(t).filter(function(t){var n=(0,pn.zs)(t,1);return!e.includes(n[0])}));return Object.fromEntries(e.map(function(e){return function(t){return"boolean"!=typeof t&&"enter"in t&&"update"in t&&"exit"in t}(t)?!1===t[e]?[e,!1]:[e,(0,pn.Cl)((0,pn.Cl)({},t[e]),n)]:[e,n]}))}function vn(t,e){t?t.finished.then(e):e()}function xn(t,e){"update"in t?t.update(e):t.attr(e)}function On(t,e,n){return 0===e.length?null:n?t.animate(e,n):(xn(t,{style:e.slice(-1)[0]}),null)}function wn(t,e,n){var r={},o={};return Object.entries(e).forEach(function(e){var n=(0,pn.zs)(e,2),i=n[0],a=n[1];if(!(0,R.A)(a)){var s=t.style[i]||t.parsedStyle[i]||0;s!==a&&(r[i]=s,o[i]=a)}}),n?On(t,[r,o],(0,pn.Cl)({fill:"both"},n)):(xn(t,o),null)}var jn=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=5),Object.entries(e).forEach(function(o){var i=(0,pn.zs)(o,2),a=i[0],s=i[1],c=t;Object.prototype.hasOwnProperty.call(e,a)&&(s?(0,$.A)(s)?((0,$.A)(t[a])||(c[a]={}),n<r?jn(t[a],s,n+1,r):c[a]=e[a]):(0,Le.A)(s)?(c[a]=[],c[a]=c[a].concat(s)):c[a]=s:c[a]=s)})},kn=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)jn(t,e[r]);return t},An=function(t){function e(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=t.apply(this,(0,pn.fX)([],(0,pn.zs)(e),!1))||this;return r.isMutationObserved=!0,r.addEventListener(l.jX.INSERTED,function(){mn(r)}),r}return(0,pn.C6)(e,t),e}(l.YJ);function Mn(t){var e=t.appendChild(new An({class:"offscreen"}));return mn(e),e}function _n(){yn(this,"hidden"!==this.attributes.visibility)}var Sn=function(t){function e(e,n){void 0===n&&(n={});var r=t.call(this,kn({},{style:n},e))||this;return r.initialized=!1,r._defaultOptions=n,r}return(0,pn.C6)(e,t),Object.defineProperty(e.prototype,"offscreenGroup",{get:function(){return this._offscreen||(this._offscreen=Mn(this)),this._offscreen},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"defaultOptions",{get:function(){return this._defaultOptions},enumerable:!1,configurable:!0}),e.prototype.connectedCallback=function(){this.render(this.attributes,this),this.bindEvents(this.attributes,this),this.initialized=!0},e.prototype.disconnectedCallback=function(){var t;null===(t=this._offscreen)||void 0===t||t.destroy()},e.prototype.attributeChangedCallback=function(t){"visibility"===t&&_n.call(this)},e.prototype.update=function(t,e){var n;return this.attr(kn({},this.attributes,t||{})),null===(n=this.render)||void 0===n?void 0:n.call(this,this.attributes,this,e)},e.prototype.clear=function(){this.removeChildren()},e.prototype.bindEvents=function(t,e){},e.prototype.getSubShapeStyle=function(t){return(0,pn.Tt)(t,["x","y","transform","transformOrigin","class","className","zIndex"])},e}(l.K9);function En(t,e,n,r,o){return void 0===r&&(r=!0),void 0===o&&(o=function(t){t.node().removeChildren()}),t?n(e):(r&&o(e),null)}const Pn=function(t){if(!(0,Le.A)(t))return[];for(var e=[],n=0;n<t.length;n++)e=e.concat(t[n]);return e};var Ln=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=(0,pn.Tt)(e,["style"]);return t.call(this,(0,pn.Cl)({style:(0,pn.Cl)({text:"",fill:"black",fontFamily:"sans-serif",fontSize:16,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",lineWidth:1,textAlign:"start",textBaseline:"middle"},n)},r))||this}return(0,pn.C6)(e,t),Object.defineProperty(e.prototype,"offscreenGroup",{get:function(){return this._offscreen||(this._offscreen=Mn(this)),this._offscreen},enumerable:!1,configurable:!0}),e.prototype.disconnectedCallback=function(){var t;null===(t=this._offscreen)||void 0===t||t.destroy()},e}(l.EY);var Cn=function(){function t(t,n,r,o,i,a,s){void 0===t&&(t=null),void 0===n&&(n=null),void 0===r&&(r=null),void 0===o&&(o=null),void 0===i&&(i=[null,null,null,null,null]),void 0===a&&(a=[]),void 0===s&&(s=[]),e.add(this),this._elements=Array.from(t),this._data=n,this._parent=r,this._document=o,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=s}var e,n,r;return t.prototype.selectAll=function(t){var e="string"==typeof t?this._parent.querySelectorAll(t):t;return new n(e,null,this._elements[0],this._document)},t.prototype.selectFacetAll=function(t){var e="string"==typeof t?this._parent.querySelectorAll(t):t;return new n(this._elements,null,this._parent,this._document,void 0,void 0,e)},t.prototype.select=function(t){var e="string"==typeof t?this._parent.querySelectorAll(t)[0]||null:t;return new n([e],null,e,this._document)},t.prototype.append=function(t){var e=this,r="function"==typeof t?t:function(){return e.createElement(t)},o=[];if(null!==this._data){for(var i=0;i<this._data.length;i++){var a=this._data[i],s=(0,pn.zs)(Array.isArray(a)?a:[a,null],2),c=s[1];(f=r(l=s[0],i)).__data__=l,null!==c&&(f.__fromElements__=c),this._parent.appendChild(f),o.push(f)}return new n(o,null,this._parent,this._document)}for(i=0;i<this._elements.length;i++){var l,u=this._elements[i],f=r(l=u.__data__,i);u.appendChild(f),o.push(f)}return new n(o,null,o[0],this._document)},t.prototype.maybeAppend=function(t,n){var o=(0,pn.gn)(this,e,"m",r).call(this,"#"===t[0]?t:"#".concat(t),n);return o.attr("id",t),o},t.prototype.maybeAppendByClassName=function(t,n){var o=t.toString(),i=(0,pn.gn)(this,e,"m",r).call(this,"."===o[0]?o:".".concat(o),n);return i.attr("className",o),i},t.prototype.maybeAppendByName=function(t,n){var o=(0,pn.gn)(this,e,"m",r).call(this,'[name="'.concat(t,'"]'),n);return o.attr("name",t),o},t.prototype.data=function(t,e,r){var o,i;void 0===e&&(e=function(t){return t}),void 0===r&&(r=function(){return null});for(var a=[],s=[],c=new Set(this._elements),l=[],u=new Set,f=new Map(this._elements.map(function(t,n){return[e(t.__data__,n),t]})),d=new Map(this._facetElements.map(function(t,n){return[e(t.__data__,n),t]})),p=function(t,e){var n=new Map;return t.forEach(function(t){var r=e(t);n.has(r)||n.set(r,[]),n.get(r).push(t)}),n}(this._elements,function(t){return r(t.__data__)}),h=0;h<t.length;h++){var g=t[h],m=e(g,h),y=r(g,h);if(f.has(m))(O=f.get(m)).__data__=g,O.__facet__=!1,s.push(O),c.delete(O),f.delete(m);else if(d.has(m)){(O=d.get(m)).__data__=g,O.__facet__=!0,s.push(O),d.delete(m)}else if(p.has(m)){var b=p.get(m);l.push([g,b]);try{for(var v=(o=void 0,(0,pn.Ju)(b)),x=v.next();!x.done;x=v.next()){c.delete(O=x.value)}}catch(t){o={error:t}}finally{try{x&&!x.done&&(i=v.return)&&i.call(v)}finally{if(o)throw o.error}}p.delete(m)}else if(f.has(y)){var O;(O=f.get(y)).__toData__?O.__toData__.push(g):O.__toData__=[g],u.add(O),c.delete(O)}else a.push(g)}var w=[new n([],a,this._parent,this._document),new n(s,null,this._parent,this._document),new n(c,null,this._parent,this._document),new n([],l,this._parent,this._document),new n(u,null,this._parent,this._document)];return new n(this._elements,null,this._parent,this._document,w)},t.prototype.merge=function(t){var e=(0,pn.fX)((0,pn.fX)([],(0,pn.zs)(this._elements),!1),(0,pn.zs)(t._elements),!1),r=(0,pn.fX)((0,pn.fX)([],(0,pn.zs)(this._transitions),!1),(0,pn.zs)(t._transitions),!1);return new n(e,null,this._parent,this._document,void 0,r)},t.prototype.createElement=function(t){if(this._document)return this._document.createElement(t,{});var e=n.registry[t];return e?new e:function(t){throw new Error(t)}("Unknown node type: ".concat(t))},t.prototype.join=function(t,e,n,r,o){void 0===t&&(t=function(t){return t}),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===o&&(o=function(t){return t.remove()});var i=t(this._enter),a=e(this._update),s=n(this._exit),c=r(this._merge),l=o(this._split);return a.merge(i).merge(s).merge(c).merge(l)},t.prototype.remove=function(){for(var t=function(t){var n=e._elements[t],r=e._transitions[t];r?r.then(function(){return n.remove()}):n.remove()},e=this,r=0;r<this._elements.length;r++)t(r);return new n([],null,this._parent,this._document,void 0,this._transitions)},t.prototype.each=function(t){for(var e=0;e<this._elements.length;e++){var n=this._elements[e];t.call(n,n.__data__,e)}return this},t.prototype.attr=function(t,e){var n="function"!=typeof e?function(){return e}:e;return this.each(function(r,o){void 0!==e&&(this[t]=n.call(this,r,o))})},t.prototype.style=function(t,e,n){void 0===n&&(n=!0);var r="function"==typeof e&&n?e:function(){return e};return this.each(function(n,o){void 0!==e&&(this.style[t]=r.call(this,n,o))})},t.prototype.styles=function(t,e){return void 0===t&&(t={}),void 0===e&&(e=!0),this.each(function(n,r){var o=this;Object.entries(t).forEach(function(t){var i=(0,pn.zs)(t,2),a=i[1];void 0!==a&&o.attr(i[0],("function"==typeof a&&e?a:function(){return a}).call(o,n,r))})})},t.prototype.update=function(t,e){void 0===e&&(e=!0);var n="function"==typeof t&&e?t:function(){return t};return this.each(function(e,r){t&&this.update&&this.update(n.call(this,e,r))})},t.prototype.maybeUpdate=function(t,e){void 0===e&&(e=!0);var n="function"==typeof t&&e?t:function(){return t};return this.each(function(e,r){t&&this.update&&this.update(n.call(this,e,r))})},t.prototype.transition=function(t){var e=new Array(this._elements.length);return this.each(function(n,r){e[r]=t.call(this,n,r)}),this._transitions=Pn(e),this},t.prototype.on=function(t,e){return this.each(function(){this.addEventListener(t,e)}),this},t.prototype.call=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return t.call.apply(t,(0,pn.fX)([this._parent,this],(0,pn.zs)(e),!1)),this},t.prototype.node=function(){return this._elements[0]},t.prototype.nodes=function(){return this._elements},t.prototype.transitions=function(){return this._transitions.filter(function(t){return!!t})},t.prototype.parent=function(){return this._parent},n=t,e=new WeakSet,r=function(t,e){var r=this._elements[0],o=r.querySelector(t);if(o)return new n([o],null,this._parent,this._document);var i="string"==typeof e?this.createElement(e):e();return r.appendChild(i),new n([i],null,this._parent,this._document)},t.registry={g:l.YJ,rect:l.rw,circle:l.jl,path:l.wA,text:Ln,ellipse:l.Pp,image:l._V,line:l.N1,polygon:l.tS,polyline:l.Ro,html:l.g3},t}();function zn(t){return new Cn([t],null,t,t.ownerDocument)}var Tn=function(t,e){var n=function(t){return"".concat(e,"-").concat(t)},r=Object.fromEntries(Object.entries(t).map(function(t){var e=(0,pn.zs)(t,2),r=e[0],o=n(e[1]);return[r,{name:o,class:".".concat(o),id:"#".concat(o),toString:function(){return o}}]}));return Object.assign(r,{prefix:n}),r},Bn="grid-group",In="main-group",Nn="line-group",Rn="tick-group",Fn="label-group",Dn="title-group",$n="grid",Wn="line",Hn="line-first",qn="line-second",Yn="tick",Xn="tick-item",Gn="label",Vn="label-item",Kn="title",Un={data:[],animate:{enter:!1,update:{duration:100,easing:"ease-in-out-sine",fill:"both"},exit:{duration:100,fill:"both"}},showArrow:!0,showGrid:!0,showLabel:!0,showLine:!0,showTick:!0,showTitle:!0,showTrunc:!1,dataThreshold:100,lineLineWidth:1,lineStroke:"black",crossPadding:10,titleFill:"black",titleFontSize:12,titlePosition:"lb",titleSpacing:0,titleTextAlign:"center",titleTextBaseline:"middle",lineArrow:function(){return new l.wA({style:{d:[["M",10,10],["L",-10,0],["L",10,-10],["L",0,0],["L",10,10],["Z"]],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",labelOverlap:[]},Zn=((0,N.A)({},Un,{style:{type:"arc"}}),(0,N.A)({},Un,{style:{}}),Tn({mainGroup:In,gridGroup:Bn,grid:$n,lineGroup:Nn,line:Wn,tickGroup:Rn,tick:Yn,tickItem:Xn,labelGroup:Fn,label:Gn,labelItem:Vn,titleGroup:Dn,title:Kn,lineFirst:Hn,lineSecond:qn},"axis")),Jn=n("./node_modules/.pnpm/@antv+util@3.3.11/node_modules/@antv/util/esm/lodash/is-function.js");function Qn(t,e){return[t[0]*e,t[1]*e]}function tr(t,e){return[t[0]+e[0],t[1]+e[1]]}function er(t,e){return[t[0]-e[0],t[1]-e[1]]}function nr(t,e){return[Math.min(t[0],e[0]),Math.min(t[1],e[1])]}function rr(t,e){return[Math.max(t[0],e[0]),Math.max(t[1],e[1])]}function or(t,e){return Math.sqrt(Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2))}function ir(t){if(0===t[0]&&0===t[1])return[0,0];var e=Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2));return[t[0]/e,t[1]/e]}function ar(t){return t*Math.PI/180}function sr(t){return Number((180*t/Math.PI).toPrecision(5))}function cr(t){return t.toString().charAt(0).toUpperCase()+t.toString().slice(1)}function lr(t,e,n){var r;void 0===n&&(n=!0);var o=e||(null===(r=t.match(/^([a-z][a-z0-9]+)/))||void 0===r?void 0:r[0])||"",i=t.replace(new RegExp("^(".concat(o,")")),"");return n?function(t){return t.toString().charAt(0).toLowerCase()+t.toString().slice(1)}(i):i}var ur=function(t,e){if(!(null==t?void 0:t.startsWith(e)))return!1;var n=t[e.length];return n>="A"&&n<="Z"};function fr(t,e,n){void 0===n&&(n=!1);var r={};return Object.entries(t).forEach(function(t){var o=(0,pn.zs)(t,2),i=o[0],a=o[1];if("className"===i||"class"===i);else if(ur(i,"show")&&ur(lr(i,"show"),e)!==n)i===function(t,e){return"".concat(e).concat(cr(t))}(e,"show")?r[i]=a:r[i.replace(new RegExp(cr(e)),"")]=a;else if(!ur(i,"show")&&ur(i,e)!==n){var s=lr(i,e);"filter"===s&&"function"==typeof a||(r[s]=a)}}),r}function dr(t,e){return Object.entries(t).reduce(function(t,n){var r=(0,pn.zs)(n,2),o=r[0],i=r[1];return o.startsWith("show")?t["show".concat(e).concat(o.slice(4))]=i:t["".concat(e).concat(cr(o))]=i,t},{})}function pr(t,e){void 0===e&&(e=["x","y","class","className"]);var n=["transform","transformOrigin","anchor","visibility","pointerEvents","zIndex","cursor","clipPath","clipPathTargets","offsetPath","offsetPathTargets","offsetDistance","draggable","droppable"],r={},o={};return Object.entries(t).forEach(function(t){var i=(0,pn.zs)(t,2),a=i[0],s=i[1];e.includes(a)||(-1!==n.indexOf(a)?o[a]=s:r[a]=s)}),[r,o]}function hr(t,e){return(0,Jn.A)(t)?t.apply(void 0,(0,pn.fX)([],(0,pn.zs)(e),!1)):t}function gr(t,e){return t.style.opacity||(t.style.opacity=1),wn(t,{opacity:0},e)}var mr=["$el","cx","cy","d","dx","dy","fill","fillOpacity","filter","fontFamily","fontSize","fontStyle","fontVariant","fontWeight","height","img","increasedLineWidthForHitTesting","innerHTML","isBillboard","billboardRotation","isSizeAttenuation","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 yr(t){return mr.includes(t)}function br(t){var e={};for(var n in t)yr(n)&&(e[n]=t[n]);return e}var vr=Tn({lineGroup:"line-group",line:"line",regionGroup:"region-group",region:"region"},"grid");function xr(t){return t.reduce(function(t,e,n){return t.push((0,pn.fX)([0===n?"M":"L"],(0,pn.zs)(e),!1)),t},[])}function Or(t,e,n){return"surround"===e.type?function(t,e,n){var r=e.connect,o=e.center;if("line"===(void 0===r?"line":r))return xr(t);if(!o)return[];var i=or(t[0],o),a=n?0:1;return t.reduce(function(t,e,n){return t.push((0,pn.fX)(0===n?["M"]:["A",i,i,0,0,a],(0,pn.zs)(e),!1)),t},[])}(t,e,n):xr(t)}function wr(t,e,n){var r=n.type,o=n.connect,i=n.center,a=n.closed?[["Z"]]:[],s=(0,pn.zs)([Or(t,n),Or(e.slice().reverse(),n,!0)],2),c=s[0],l=s[1],u=(0,pn.zs)([t[0],e.slice(-1)[0]],2),f=u[0],d=u[1],p=function(t,e){return[c,t,l,e,a].flat()};if("line"===o||"surround"===r)return p([(0,pn.fX)(["L"],(0,pn.zs)(d),!1)],[(0,pn.fX)(["L"],(0,pn.zs)(f),!1)]);if(!i)throw new Error("Arc grid need to specified center");var h=(0,pn.zs)([or(d,i),or(f,i)],2),g=h[0],m=h[1];return p([(0,pn.fX)(["A",g,g,0,0,1],(0,pn.zs)(d),!1),(0,pn.fX)(["L"],(0,pn.zs)(d),!1)],[(0,pn.fX)(["A",m,m,0,0,0],(0,pn.zs)(f),!1),(0,pn.fX)(["L"],(0,pn.zs)(f),!1)])}var jr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,pn.C6)(e,t),e.prototype.render=function(t,e){var n=(0,pn.Tt)(t,["type","center","areaFill","closed"]),r=function(t){var e=t.data,n=void 0===e?[]:e;return t.closed?n.map(function(t){var e=t.points,n=(0,pn.zs)(e,1)[0];return(0,pn.Cl)((0,pn.Cl)({},t),{points:(0,pn.fX)((0,pn.fX)([],(0,pn.zs)(e),!1),[n],!1)})}):n}(t),o=zn(e).maybeAppendByClassName(vr.lineGroup,"g"),i=zn(e).maybeAppendByClassName(vr.regionGroup,"g"),a=function(t,e,n,r){var o=n.animate,i=n.isBillboard,a=e.map(function(t,e){return{id:t.id||"grid-line-".concat(e),d:Or(t.points,n)}});return t.selectAll(vr.line.class).data(a,function(t){return t.id}).join(function(t){return t.append("path").each(function(t,e){var n=hr(br((0,pn.Cl)({d:t.d},r)),[t,e,a]);this.attr((0,pn.Cl)({class:vr.line.name,stroke:"#D9D9D9",lineWidth:1,lineDash:[4,4],isBillboard:i},n))})},function(t){return t.transition(function(t,e){return wn(this,hr(br((0,pn.Cl)({d:t.d},r)),[t,e,a]),o.update)})},function(t){return t.transition(function(){var t=this,e=gr(this,o.exit);return vn(e,function(){return t.remove()}),e})}).transitions()}(o,r,t,n),s=function(t,e,n){var r=n.animate,o=n.areaFill;if(e.length<2||!o||!n.connect)return[];for(var i=Array.isArray(o)?o:[o,"transparent"],a=function(t){return i[t%i.length]},s=[],c=0;c<e.length-1;c++){var l=(0,pn.zs)([e[c].points,e[c+1].points],2),u=wr(l[0],l[1],n);s.push({d:u,fill:a(c)})}return t.selectAll(vr.region.class).data(s,function(t,e){return e}).join(function(t){return t.append("path").each(function(t,e){var n=hr(t,[t,e,s]);this.attr(n)}).attr("className",vr.region.name)},function(t){return t.transition(function(t,e){return wn(this,hr(t,[t,e,s]),r.update)})},function(t){return t.transition(function(){var t=this,e=gr(this,r.exit);return vn(e,function(){return t.remove()}),e})}).transitions()}(i,r,t);return(0,pn.fX)((0,pn.fX)([],(0,pn.zs)(a),!1),(0,pn.zs)(s),!1)},e}(Sn);function kr(t,e){return"number"==typeof t&&"number"==typeof e?function(t,e){return function(n){return t*(1-n)+e*n}}(t,e):Array.isArray(t)&&Array.isArray(e)?function(t,e){var n=e?e.length:0,r=t?Math.min(n,t.length):0;return function(o){var i=new Array(r),a=new Array(n),s=0;for(s=0;s<r;++s)i[s]=kr(t[s],e[s]);for(;s<n;++s)a[s]=e[s];for(s=0;s<r;++s)a[s]=i[s](o);return a}}(t,e):"object"==typeof t&&"object"==typeof e?function(t,e){void 0===t&&(t={}),void 0===e&&(e={});var n={},r={};return Object.entries(e).forEach(function(e){var o=(0,pn.zs)(e,2),i=o[0],a=o[1];i in t?n[i]=kr(t[i],a):r[i]=a}),function(t){return Object.entries(n).forEach(function(e){var n=(0,pn.zs)(e,2);return r[n[0]]=(0,n[1])(t)}),r}}(t,e):function(e){return t}}function Ar(t){return"function"==typeof t?t():(0,j.A)(t)||(0,tt.A)(t)?new Ln({style:{text:String(t)}}):t}function Mr(t,e,n){void 0===n&&(n=!1);var r=t.getBBox(),o=e/Math.max(r.width,r.height);return n&&(t.style.transform="scale(".concat(o,")")),o}function _r(t,e){var n={},r=Array.isArray(e)?e:[e];for(var o in t)r.includes(o)||(n[o]=t[o]);return n}function Sr(t,e){return Object.fromEntries(Object.entries(t).map(function(t){var n=(0,pn.zs)(t,2);return[n[0],hr(n[1],e)]}))}function Er(t,e){return e&&(0,Jn.A)(e)?t.filter(e):t}function Pr(t,e){var n=e.startAngle;return(e.endAngle-n)*t+n}function Lr(t,e){if("linear"===e.type){var n=(0,pn.zs)(e.startPos,2),r=n[0],o=n[1],i=(0,pn.zs)(e.endPos,2),a=(0,pn.zs)([i[0]-r,i[1]-o],2);return ir([a[0],a[1]])}var s=ar(Pr(t,e));return[-Math.sin(s),Math.cos(s)]}function Cr(t,e,n){var r,o=Lr(t,n);return r=o,"positive"!==e?[r[1],-r[0]]:[-r[1],r[0]]}function zr(t,e){return Cr(t,e.labelDirection,e)}function Tr(t,e,n){return n?"".concat(t," ").concat(n,"axis-").concat(e):t}function Br(t,e,n,r){return r&&t.attr("className",Tr(e.name,n,r)),t}function Ir(t,e){return"linear"===e.type?function(t,e){var n=(0,pn.zs)(e.startPos,2),r=n[0],o=n[1],i=(0,pn.zs)(e.endPos,2),a=(0,pn.zs)([i[0]-r,i[1]-o],2);return[r+a[0]*t,o+a[1]*t]}(t,e):function(t,e){var n=e.radius,r=(0,pn.zs)(e.center,2),o=r[0],i=r[1],a=ar(Pr(t,e));return[o+n*Math.cos(a),i+n*Math.sin(a)]}(t,e)}function Nr(t){return 0===Lr(0,t)[1]}function Rr(t){return 0===Lr(0,t)[0]}function Fr(t,e){return e-t===360}function Dr(t,e,n,r,o){var i=e-t,a=(0,pn.zs)([o,o],2),s=a[0],c=a[1],l=(0,pn.zs)([ar(t),ar(e)],2),u=l[0],f=l[1],d=function(t){return[n+o*Math.cos(t),r+o*Math.sin(t)]},p=(0,pn.zs)(d(u),2),h=p[0],g=p[1],m=(0,pn.zs)(d(f),2),y=m[0],b=m[1];if(Fr(t,e)){var v=(0,pn.zs)(d((f+u)/2),2);return[["M",h,g],["A",s,c,0,1,0,v[0],v[1]],["A",s,c,0,1,0,y,b]]}var x=i>180?1:0,O=t>e?0:1;return"M".concat(h,",").concat(g,",A").concat(s,",").concat(c,",0,").concat(x,",").concat(O,",").concat(y,",").concat(b)}function $r(t,e,n,r){var o=e.startAngle,i=e.endAngle,a=e.center,s=e.radius,c=e.classNamePrefix;return t.selectAll(Zn.line.class).data([{d:Dr.apply(void 0,(0,pn.fX)((0,pn.fX)([o,i],(0,pn.zs)(a),!1),[s],!1))}],function(t,e){return e}).join(function(t){var n=t.append("path").attr("className",Zn.line.name).styles(e).styles({d:function(t){return t.d}});return Br(n,Zn.line,Wn,c),n},function(t){return t.transition(function(){var t=this,e=function(t,e,n,r){if(!r)return t.attr("__keyframe_data__",n),null;var o=r.duration,i=void 0===o?0:o,a=kr(e,n),s=Math.ceil(+i/16),c=new Array(s).fill(0).map(function(t,e,n){return{__keyframe_data__:a(e/(n.length-1))}});return t.animate(c,(0,pn.Cl)({fill:"both"},r))}(this,function(t){var e=t.attributes,n=e.radius;return(0,pn.fX)((0,pn.fX)([e.startAngle,e.endAngle],(0,pn.zs)(e.center),!1),[n],!1)}(this),(0,pn.fX)((0,pn.fX)([o,i],(0,pn.zs)(a),!1),[s],!1),r.update);if(e){var n=function(){var e=k(t.attributes,"__keyframe_data__");t.style.d=Dr.apply(void 0,(0,pn.fX)([],(0,pn.zs)(e),!1))};e.onframe=n,e.onfinish=n}return e}).styles(e)},function(t){return t.remove()}).styles(n).transitions()}function Wr(t){var e=(0,pn.zs)(t,2),n=(0,pn.zs)(e[0],2),r=n[0],o=n[1],i=(0,pn.zs)(e[1],2);return{x1:r,y1:o,x2:i[0],y2:i[1]}}function Hr(t,e,n,r){var o=e.showTrunc,i=e.startPos,a=e.endPos,s=e.truncRange,c=e.lineExtension,l=e.classNamePrefix,u=(0,pn.zs)([i,a],2),f=(0,pn.zs)(u[0],2),d=f[0],p=f[1],h=(0,pn.zs)(u[1],2),g=h[0],m=h[1],y=(0,pn.zs)(c?function(t,e,n){void 0===n&&(n=[0,0]);var r=(0,pn.zs)([t,e,n],3),o=(0,pn.zs)(r[0],2),i=o[0],a=o[1],s=(0,pn.zs)(r[1],2),c=s[0],l=s[1],u=(0,pn.zs)(r[2],2),f=u[0],d=u[1],p=(0,pn.zs)([c-i,l-a],2),h=p[0],g=p[1],m=Math.sqrt(Math.pow(h,2)+Math.pow(g,2)),y=(0,pn.zs)([-f/m,d/m],2),b=y[0],v=y[1];return[b*h,b*g,v*h,v*g]}(i,a,c):new Array(4).fill(0),4),b=y[0],v=y[1],x=y[2],O=y[3],w=function(e){return t.selectAll(Zn.line.class).data(e,function(t,e){return e}).join(function(t){var e=t.append("line").styles(n).transition(function(t){return wn(this,Wr(t.line),!1)});return e.attr("className",function(t){if(!l)return"".concat(Zn.line.name," ").concat(t.className);var e=Tr(Zn.line.name,Wn,l);if(t.className===Zn.lineFirst.name){var n=Tr(Zn.lineFirst.name,Hn,l);return"".concat(e," ").concat(n)}if(t.className===Zn.lineSecond.name){n=Tr(Zn.lineSecond.name,qn,l);return"".concat(e," ").concat(n)}return e}),e},function(t){return t.styles(n).transition(function(t){return wn(this,Wr(t.line),r.update)})},function(t){return t.remove()}).transitions()};if(!o||!s)return w([{line:[[d+b,p+v],[g+x,m+O]],className:Zn.line.name}]);var j=(0,pn.zs)(s,2),k=j[0],A=j[1],M=g-d,_=m-p,S=(0,pn.zs)([d+M*k,p+_*k],2),E=S[0],P=S[1],L=(0,pn.zs)([d+M*A,p+_*A],2);return w([{line:[[d+b,p+v],[E,P]],className:Zn.lineFirst.name},{line:[[L[0],L[1]],[g+x,m+O]],className:Zn.lineSecond.name}])}function qr(t,e,n){var r,o=e.type,i=fr(e,"line");return r="linear"===o?Hr(t,e,_r(i,"arrow"),n):$r(t,e,_r(i,"arrow"),n),function(t,e,n,r){var o,i=n.showArrow,a=n.lineArrow,s=n.lineArrowOffset,c=n.lineArrowSize;if(o=t.select("arc"===e?Zn.line.class:n.showTrunc?Zn.lineSecond.class:Zn.line.class),!i||!a||"arc"===n.type&&Fr(n.startAngle,n.endAngle)){var l=o.node();l&&(l.style.markerEnd=void 0)}else{var u=Ar(a);u.attr(r),Mr(u,c,!0),o.style("markerEnd",u).style("markerEndOffset",-s)}}(t,o,e,i),r}function Yr(t){var e=t.gridCenter;return"linear"===t.type?e:e||t.center}function Xr(t,e){var n=e.gridLength;return t.map(function(t,r){var o=t.value,i=(0,pn.zs)(Ir(o,e),2),a=i[0],s=i[1],c=(0,pn.zs)(Qn(function(t,e){return Cr(t,e.gridDirection,e)}(o,e),n),2);return{id:r,points:[[a,s],[a+c[0],s+c[1]]]}})}function Gr(t,e,n,r){var o=n.classNamePrefix,i=fr(n,"grid"),a=i.type,s=i.areaFill,c=Yr(n),l=Er(e,n.gridFilter),u="segment"===a?Xr(l,n):function(t,e){var n=e.gridControlAngles,r=Yr(e);if(!r)throw new Error("grid center is not provide");if(t.length<2)throw new Error("Invalid grid data");if(!n||0===n.length)throw new Error("Invalid gridControlAngles");var o=(0,pn.zs)(r,2),i=o[0],a=o[1];return t.map(function(t,r){var o=(0,pn.zs)(Ir(t.value,e),2),s=(0,pn.zs)([o[0]-i,o[1]-a],2),c=s[0],l=s[1],u=[];return n.forEach(function(t){var e=ar(t),n=(0,pn.zs)([Math.cos(e),Math.sin(e)],2),r=n[0],o=n[1];u.push([c*r-l*o+i,c*o+l*r+a])}),{points:u,id:r}})}(l,n),f=(0,pn.Cl)((0,pn.Cl)({},i),{center:c,areaFill:(0,Jn.A)(s)?l.map(function(t,e){return hr(s,[t,e,l])}):s,animate:r,data:u});return t.selectAll(Zn.grid.class).data([1]).join(function(t){var e=t.append(function(){return new jr({style:f})}).attr("className",Zn.grid.name);return Br(e,Zn.grid,$n,o),e},function(t){return t.transition(function(){return this.update(f)})},function(t){return t.remove()}).transitions()}function Vr(t,e,n,r,o){return void 0===r&&(r=!0),void 0===o&&(o=!1),!!(r&&t===e||o&&t===n)||t>e&&t<n}var Kr,Ur,Zr=new Map;var Jr,Qr,to,eo=(Jr=function(t,e){var n=e.fontSize,r=e.fontFamily,o=e.fontWeight,i=e.fontStyle,a=e.fontVariant;return Ur?Ur(t,n):(Kr||(Kr=l.fA.offscreenCanvasCreator.getOrCreateContext(void 0)),Kr.font=[i,a,o,"".concat(n,"px"),r].join(" "),Kr.measureText(t).width)},Qr=function(t,e){return[t,Object.values(e||no(t)).join()].join("")},void 0===(to=4096)&&(to=128),function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Qr?Qr.apply(this,t):t[0];Zr.has(Jr)||Zr.set(Jr,function(t){var e,n,r,o=t||1;function i(t,i){++e>o&&(r=n,a(1),++e),n[t]=i}function a(t){e=0,n=Object.create(null),t||(r=Object.create(null))}return a(),{clear:a,has:function(t){return void 0!==n[t]||void 0!==r[t]},get:function(t){var e=n[t];return void 0!==e?e:void 0!==(e=r[t])?(i(t,e),e):void 0},set:function(t,e){void 0!==n[t]?n[t]=e:i(t,e)}}}(to));var r=Zr.get(Jr);if(r.has(n))return r.get(n);var o=Jr.apply(this,t);return r.set(n,o),o}),no=function(t){var e=t.style.fontSize;return{fontSize:e="object"==typeof e?e.value:e,fontFamily:t.style.fontFamily||"sans-serif",fontWeight:t.style.fontWeight||"normal",fontStyle:t.style.fontStyle||"normal",fontVariant:t.style.fontVariant}};function ro(t){return"text"===t.nodeName?t:"g"===t.nodeName&&1===t.children.length&&"text"===t.children[0].nodeName?t.children[0]:null}function oo(t,e){var n=ro(t);n&&n.attr(e)}function io(t,e,n){void 0===n&&(n="..."),oo(t,{wordWrap:!0,wordWrapWidth:e,maxLines:1,textOverflow:n})}function ao(t,e){if(e)try{var n=e.replace(/translate\(([+-]*[\d]+[%]*),[ ]*([+-]*[\d]+[%]*)\)/g,function(e,n,r){return"translate(".concat(function(t,e,n){var r=t.getBBox(),o=r.width,i=r.height,a=(0,pn.zs)([e,n].map(function(t,e){var n;return t.includes("%")?parseFloat((null===(n=t.match(/[+-]?([0-9]*[.])?[0-9]+/))||void 0===n?void 0:n[0])||"0")/100*(0===e?o:i):t}),2);return[a[0],a[1]]}(t,n,r),")")});t.attr("transform",n)}catch(t){}}function so(t){if((0,tt.A)(t))return[t,t,t,t];if((0,Le.A)(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]}var co=function(){function t(t,e,n,r){this.set(t,e,n,r)}return Object.defineProperty(t.prototype,"left",{get:function(){return this.x1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"top",{get:function(){return this.y1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"right",{get:function(){return this.x2},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"bottom",{get:function(){return this.y2},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return this.defined("x2")&&this.defined("x1")?this.x2-this.x1:void 0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.defined("y2")&&this.defined("y1")?this.y2-this.y1:void 0},enumerable:!1,configurable:!0}),t.prototype.rotatedPoints=function(t,e,n){var r=this,o=r.x1,i=r.y1,a=r.x2,s=r.y2,c=Math.cos(t),l=Math.sin(t),u=e-e*c+n*l,f=n-e*l-n*c;return[[c*o-l*s+u,l*o+c*s+f],[c*a-l*s+u,l*a+c*s+f],[c*o-l*i+u,l*o+c*i+f],[c*a-l*i+u,l*a+c*i+f]]},t.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},t.prototype.defined=function(t){return this[t]!==Number.MAX_VALUE&&this[t]!==-Number.MAX_VALUE},t}();function lo(t,e){var n=t.getEulerAngles()||0;t.setEulerAngles(0);var r=t.getBounds(),o=(0,pn.zs)(r.min,2),i=o[0],a=o[1],s=(0,pn.zs)(r.max,2),c=s[0],l=s[1],u=t.getBBox(),f=u.width,d=u.height,p=0,h=0,g=i,m=a,y=ro(t);if(y){d-=1.5;var b=y.style.textAlign,v=y.style.textBaseline;"center"===b?g=(i+c)/2:"right"!==b&&"end"!==b||(g=c),"middle"===v?m=(a+l)/2:"bottom"===v&&(m=l)}var x=(0,pn.zs)(so(e),4),O=x[0],w=void 0===O?0:O,j=x[1],k=void 0===j?0:j,A=x[2],M=x[3],_=new co((p+=i)-(void 0===M?k:M),(h+=a)-w,p+f+k,h+d+(void 0===A?w:A));return t.setEulerAngles(n),_.rotatedPoints(ar(n),g,m)}function uo(t,e){return e[0]<=Math.max(t[0][0],t[1][0])&&e[0]<=Math.min(t[0][0],t[1][0])&&e[1]<=Math.max(t[0][1],t[1][1])&&e[1]<=Math.min(t[0][1],t[1][1])}function fo(t,e,n){var r=(e[1]-t[1])*(n[0]-e[0])-(e[0]-t[0])*(n[1]-e[1]);return 0===r?0:r<0?2:1}function po(t,e){var n=fo(t[0],t[1],e[0]),r=fo(t[0],t[1],e[1]),o=fo(e[0],e[1],t[0]),i=fo(e[0],e[1],t[1]);return n!==r&&o!==i||(!(0!==n||!uo(t,e[0]))||(!(0!==r||!uo(t,e[1]))||(!(0!==o||!uo(e,t[0]))||!(0!==i||!uo(e,t[1])))))}function ho(t,e){return e.every(function(e){return function(t,e){var n=t.length;if(n<3)return!1;var r=[e,[9999,e[1]]],o=0,i=0;do{var a=[t[i],t[(i+1)%n]];if(po(a,r)){if(0===fo(a[0],e,a[1]))return uo(a,e);o++}i=(i+1)%n}while(0!==i);return!!(1&o)}(t,e)})}function go(t,e){var n=(0,pn.zs)(t,4),r=n[0],o=n[1],i=n[2],a=n[3],s=(0,pn.zs)(e,4),c=s[0],l=s[1],u=i-r,f=a-o,d=s[2]-c,p=s[3]-l,h=u*p-d*f;if(0===h)return!1;var g=h>0,m=r-c,y=o-l,b=u*y-f*m;if(b<0===g)return!1;var v=d*y-p*m;return v<0!==g&&(b>h!==g&&v>h!==g)}function mo(t,e){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 go(e,t)})}function yo(t,e,n){var r,o,i=e.crossPadding,a=new Set,s=null,c=function(t,e){var n=t.labelDirection,r=t.crossSize;if(!r)return!1;if("arc"===t.type){var o=t.radius,i=(0,pn.zs)(t.center,2),a=i[0],s=i[1],c="negative"===n?0:r,l=-o-c,u=o+c,f=(0,pn.zs)(so(e),4);return new co(a+l-f[3],s+l-f[0],a+u+f[1],s+u+f[2])}var d=(0,pn.zs)(t.startPos,2),p=d[0],h=d[1],g=(0,pn.zs)(t.endPos,2),m=g[0],y=g[1],b=(0,pn.zs)(Rr(t)?[-e,0,e,0]:[0,e,0,-e],4),v=b[0],x=b[1],O=b[2],w=b[3],j=Qn(zr(0,t),r),k=new co(p,h,m,y);return k.x1+=w,k.y1+=v,k.x2+=x+j[0],k.y2+=O+j[1],k}(e,i),l=function(t){return!c||function(t,e,n){var r=t.x1,o=t.x2,i=t.y1,a=t.y2;return ho([[r,i],[o,i],[o,a],[r,a]],lo(e,n))}(c,t)},u=function(t,e){return!t||!t.firstChild||!function(t,e,n){var r,o,i=lo(t,n).flat(1),a=lo(e,n).flat(1),s=[[i[0],i[1],i[2],i[3]],[i[0],i[1],i[4],i[5]],[i[4],i[5],i[6],i[7]],[i[2],i[3],i[6],i[7]]];try{for(var c=(0,pn.Ju)(s),l=c.next();!l.done;l=c.next())if(mo(a,l.value))return!0}catch(t){r={error:t}}finally{try{l&&!l.done&&(o=c.return)&&o.call(c)}finally{if(r)throw r.error}}return!1}(t.firstChild,e.firstChild,so(n))};try{for(var f=(0,pn.Ju)(t),d=f.next();!d.done;d=f.next()){var p=d.value;l(p)?!s||u(s,p)?s=p:(a.add(s),a.add(p)):a.add(p)}}catch(t){r={error:t}}finally{try{d&&!d.done&&(o=f.return)&&o.call(f)}finally{if(r)throw r.error}}return Array.from(a)}function bo(t,e){return void 0===e&&(e={}),(0,R.A)(t)?0:"number"==typeof t?t:Math.floor(eo(t,e))}var vo=function(t){return void 0!==t&&null!=t&&!Number.isNaN(t)};function xo(t){var e=t.getLocalBounds(),n=(0,pn.zs)([e.min,e.max],2),r=(0,pn.zs)(n[0],2),o=r[0],i=r[1],a=(0,pn.zs)(n[1],2),s=a[0],c=a[1];return{x:o,y:i,width:s-o,height:c-i,left:o,bottom:c,top:i,right:s}}function Oo(t,e){var n=(0,pn.zs)(t,2),r=n[0],o=n[1],i=(0,pn.zs)(e,2);return r!==i[0]&&o===i[1]}var wo=function(t,e){var n=e.seq,r=void 0===n?2:n;return t.filter(function(t,e){return!(e%r)||(mn(t),!1)})},jo=function(t){return t.filter(vo)};var ko=new Map([["hide",function(t,e,n,r){var o=t.length,i=e.keepHeader,a=e.keepTail;if(!(o<=1||2===o&&i&&a)){var s,c,l=wo,u=function(t){return t.forEach(r.show),t},f=2,d=t.slice(),p=t.slice(),h=Math.min.apply(Math,(0,pn.fX)([1],(0,pn.zs)(t.map(function(t){return t.getBBox().width})),!1));if("linear"===n.type&&(Nr(n)||Rr(n))){var g=xo(t[0]).left,m=xo(t[o-1]).right,y=Math.abs(m-g)||1;f=Math.max(Math.floor(o*h/y),f)}for(i&&(s=d.splice(0,1)[0]),a&&(c=d.splice(-1,1)[0],d.reverse()),u(d);f<t.length&&yo(jo(c?(0,pn.fX)((0,pn.fX)([c],(0,pn.zs)(p),!1),[s],!1):(0,pn.fX)([s],(0,pn.zs)(p),!1)),n,null==e?void 0:e.margin).length;){if(c&&!s&&f%2==0)d.splice(0,1).forEach(r.hide);else if(c&&s){d.splice(0,1).forEach(r.hide)}p=l(u(d),{seq:f}),f++}}}],["rotate",function(t,e,n,r){var o,i,a=e.optionalAngles,s=void 0===a?[0,45,90]:a,c=e.margin,l=e.recoverWhenFailed,u=void 0===l||l,f=t.map(function(t){return t.getLocalEulerAngles()}),d=function(){return yo(t,n,c).length<1},p=function(e){return t.forEach(function(t,n){var o=Array.isArray(e)?e[n]:e;r.rotate(t,+o)})};try{for(var h=(0,pn.Ju)(s),g=h.next();!g.done;g=h.next()){if(p(g.value),d())return}}catch(t){o={error:t}}finally{try{g&&!g.done&&(i=h.return)&&i.call(h)}finally{if(o)throw o.error}}u&&p(f)}],["ellipsis",function(t,e,n,r){if(!(t.length<=0)){var o=e.suffix,i=void 0===o?"...":o,a=e.minLength,s=e.maxLength,c=void 0===s?1/0:s,l=e.step,u=void 0===l?" ":l,f=e.margin,d=void 0===f?[0,0,0,0]:f,p=no(r.getTextShape(t[0])),h=bo(u,p),g=a?bo(a,p):h,m=bo(c,p);((0,R.A)(m)||m===1/0)&&(m=Math.max.apply(null,t.map(function(t){return t.getBBox().width})));for(var y=t.slice(),b=((0,pn.zs)(d,4),function(e){if(y.forEach(function(t){r.ellipsis(r.getTextShape(t),e,i)}),(y=yo(t,n,d)).length<1)return{value:void 0}}),v=m;v>g+h;v-=h){var x=b(v);if("object"==typeof x)return x.value}}}],["wrap",function(t,e,n,r,o){var i,a=e.maxLines,s=void 0===a?3:a,c=e.recoverWhenFailed,l=void 0===c||c,u=e.margin,f=void 0===u?[0,0,0,0]:u,d=hr(null!==(i=e.wordWrapWidth)&&void 0!==i?i:50,[o]),p=t.map(function(t){return t.attr("maxLines")||1}),h=Math.min.apply(Math,(0,pn.fX)([],(0,pn.zs)(p),!1)),g=function(){return yo(t,n,f).length<1},m=function(t){var e=t.labelDirection;return"linear"===t.type&&Nr(t)?"negative"===e?"bottom":"top":"middle"}(n),y=function(e){return t.forEach(function(t,n){var o=Array.isArray(e)?e[n]:e;r.wrap(t,d,o,m)})};if(!(h>s)){if("linear"===n.type&&Nr(n)){if(y(s),g())return}else for(var b=h;b<=s;b++)if(y(b),g())return;l&&y(p)}}]]);function Ao(){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)}function Mo(t){for(var e=t;e<0;)e+=360;return Math.round(e%360)}function _o(t,e){var n=(0,pn.zs)(t,2),r=n[0],o=n[1],i=(0,pn.zs)(e,2),a=i[0],s=i[1],c=(0,pn.zs)([r*a+o*s,r*s-o*a],2);return Math.atan2(c[1],c[0])}function So(t,e,n){var r,o=n.labelAlign;if(null===(r=e.style.transform)||void 0===r?void 0:r.includes("rotate"))return e.getLocalEulerAngles();var i=zr(t.value,n),a=Lr(t.value,n);return"horizontal"===o?0:function(t){var e=(t+360)%180;return Vr(e,-90,90)||(e+=180),e}(sr("perpendicular"===o?_o([1,0],i):_o([a[0]<0?-1:1,0],a)))}function Eo(t,e,n){var r=n.type,o=n.labelAlign,i=zr(t,n),a=Mo(e),s=Mo(sr(_o([1,0],i))),c="center",l="middle";return"linear"===r?[90,270].includes(s)&&0===a?(c="center",l=1===i[1]?"top":"bottom"):s%180||![90,270].includes(a)?0===s?(Vr(a,0,90,!1,!0)||Vr(a,0,90)||Vr(a,270,360))&&(c="start"):90===s?Vr(a,0,90,!1,!0)?c="start":(Vr(a,90,180)||Vr(a,270,360))&&(c="end"):270===s?Vr(a,0,90,!1,!0)?c="end":(Vr(a,90,180)||Vr(a,270,360))&&(c="start"):180===s&&(90===a?c="start":(Vr(a,0,90)||Vr(a,270,360))&&(c="end")):c="center":"parallel"===o?l=Vr(s,0,180,!0)?"top":"bottom":"horizontal"===o?Vr(s,90,270,!1)?c="end":(Vr(s,270,360,!1)||Vr(s,0,90))&&(c="start"):"perpendicular"===o&&(c=Vr(s,90,270)?"end":"start"),{textAlign:c,textBaseline:l}}function Po(t,e,n){var r=n.showTick,o=n.tickLength,i=n.tickDirection,a=n.labelDirection,s=n.labelSpacing,c=e.indexOf(t),l=hr(s,[t,c,e]),u=(0,pn.zs)([zr(t.value,n),Ao(a,i)],2),f=u[0],d=1===u[1]?hr(r?o:0,[t,c,e]):0,p=(0,pn.zs)(tr(Qn(f,l+d),Ir(t.value,n)),2);return{x:p[0],y:p[1]}}function Lo(t,e,n,r){var o=r.labelRender,i=(k(r,"endPos.0",400)-k(r,"startPos.0",0))/n.length,a=(0,Jn.A)(o)?hr(o,[t,e,n,zr(t.value,r)]):t.label||"",s=function(t){var e=(new DOMParser).parseFromString(t,"text/html").body.firstElementChild;if(console.log(null==e?void 0:e.getClientRects(),11),!e)return 0;var n=e.getAttribute("style")||"",r=Object.fromEntries(n.split(";").map(function(t){return t.trim()}).filter(function(t){return t.includes(":")}).map(function(t){var e=(0,pn.zs)(t.split(":").map(function(t){return t.trim()}),2),n=e[1];return[e[0].toLowerCase(),n]})),o=function(t){if(!t)return 0;var e=t.match(/([\d.]+)px/);return e?parseFloat(e[1]):0};if(r.height)return o(r.height);var i,a=o(r["font-size"])||16,s=r["line-height"];i=s&&"normal"!==s?s.endsWith("px")?o(s):/^[\d.]+$/.test(s)?parseFloat(s)*a:a:1.2*a;var c=o(r["padding-top"]),l=o(r["padding-bottom"]);r.padding&&(1===(u=r.padding.split(/\s+/).map(o)).length||2===u.length?(c=u[0],l=u[0]):(3===u.length||4===u.length)&&(c=u[0],l=u[2]));var u,f=o(r["border-top-width"]),d=o(r["border-bottom-width"]);if(r.border){var p=r.border.match(/([\d.]+)px/);p&&(f=parseFloat(p[1]),d=parseFloat(p[1]))}return r["border-width"]&&(1===(u=r["border-width"].split(/\s+/).map(o)).length||2===u.length?(f=u[0],d=u[0]):(3===u.length||4===u.length)&&(f=u[0],d=u[2])),i+c+l+f+d}(a)||30;return function(){return e={width:i,height:s},"function"==typeof(t=a)?t():(0,j.A)(t)||(0,tt.A)(t)?new l.g3({style:(0,pn.Cl)((0,pn.Cl)({},e),{innerHTML:String(t)})}):t;var t,e}}function Co(t,e){["text","html"].includes(t.nodeName)&&t.attr(e)}function zo(t,e){!function(t,e,n,r){var o=e.labelOverlap,i=void 0===o?[]:o;i.length&&i.forEach(function(o){var i=o.type,a=ko.get(i);(function(t,e,n){return!(e.labelOverlap.length<1)&&("hide"===n?!function(t){for(var e=t;e;){if("offscreen"===e.className)return!0;e=e.parent}return!1}(t[0]):"rotate"===n?!t.some(function(t){var e;return!!(null===(e=t.attr("transform"))||void 0===e?void 0:e.includes("rotate"))}):"ellipsis"!==n&&"wrap"!==n||t.filter(function(t){return t.querySelector("text")}).length>=1)})(t,e,i)&&(null==a||a(t,o,e,r,n))})}(this.node().childNodes,t,e,{hide:mn,show:gn,rotate:function(e,n){!function(t,e,n){e.setLocalEulerAngles(t);var r=Eo(e.__data__.value,t,n),o=e.querySelector(Zn.labelItem.class);o&&Co(o,r)}(+n,e,t)},ellipsis:function(t,e,n){t&&io(t,e||1/0,n)},wrap:function(t,e,n){var r,o;t&&(void 0===(r=n)&&(r=2),void 0===o&&(o="top"),oo(t,{wordWrap:!0,wordWrapWidth:e,maxLines:r,textBaseline:o}))},getTextShape:function(t){return t.querySelector(Zn.labelItem.class)}})}function To(t,e,n,r,o){var i=n.indexOf(e),a=o.labelRender,s=o.classNamePrefix,c=zn(t).append(a?Lo(e,i,n,o):function(t,e,n,r){var o=r.labelFormatter;return(0,Jn.A)(o)?function(){return Ar(hr(o,[t,e,n,zr(t.value,r)]))}:function(){return Ar(t.label||"")}}(e,i,n,o)).attr("className",Zn.labelItem.name).node();Br(zn(c),Zn.labelItem,Vn,s);var l=(0,pn.zs)(pr(Sr(r,[e,i,n])),2),u=l[0],f=l[1],d=f.transform,p=(0,pn.Tt)(f,["transform"]);ao(c,d);var h=So(e,c,o);return c.getLocalEulerAngles()||c.setLocalEulerAngles(h),Co(c,(0,pn.Cl)((0,pn.Cl)({},Eo(e.value,h,o)),u)),t.attr(p),c}function Bo(t,e,n,r,o){var i,a,s,c=n.classNamePrefix,l=Er(e,n.labelFilter),u=fr(n,"label"),f=t.selectAll(Zn.label.class).data(l,function(t,e){return e}).join(function(t){var r=t.append("g").attr("className",Zn.label.name).transition(function(t){To(this,t,e,u,n);var r=Po(t,e,n),o=r.y;return this.style.transform="translate(".concat(r.x,", ").concat(o,")"),null});return Br(r,Zn.label,Gn,c),r},function(t){return t.transition(function(t){var o=function(t,e,n,r){if(void 0===r&&(r="destroy"),function(t,e){return"text"===t.nodeName&&"text"===e.nodeName&&t.attributes.text===e.attributes.text}(t,e))return t.remove(),[null];var o=function(){"destroy"===r?t.destroy():"hide"===r&&mn(t),e.isVisible()&&gn(e)};if(!n)return o(),[null];var i=n.duration,a=void 0===i?0:i,s=n.delay,c=void 0===s?0:s,l=Math.ceil(+a/2),u=+a/4,f=(0,pn.zs)(t.getGeometryBounds().center,2),d=f[0],p=f[1],h=(0,pn.zs)(e.getGeometryBounds().center,2),g=(0,pn.zs)([(d+h[0])/2-d,(p+h[1])/2-p],2),m=g[0],y=g[1],b=t.style.opacity,v=e.style.opacity,x=void 0===v?1:v,O=t.style.transform||"",w=e.style.transform||"",j=t.animate([{opacity:void 0===b?1:b,transform:"translate(0, 0) ".concat(O)},{opacity:0,transform:"translate(".concat(m,", ").concat(y,") ").concat(O)}],(0,pn.Cl)((0,pn.Cl)({fill:"both"},n),{duration:c+l+u})),k=e.animate([{opacity:0,transform:"translate(".concat(-m,", ").concat(-y,") ").concat(w),offset:.01},{opacity:x,transform:"translate(0, 0) ".concat(w)}],(0,pn.Cl)((0,pn.Cl)({fill:"both"},n),{duration:l+u,delay:c+l-u}));return vn(k,o),[j,k]}(this.querySelector(Zn.labelItem.class),To(this,t,e,u,n),r.update),i=Po(t,e,n),a=i.y,s=wn(this,{transform:"translate(".concat(i.x,", ").concat(a,")")},r.update);return(0,pn.fX)((0,pn.fX)([],(0,pn.zs)(o),!1),[s],!1)})},function(t){return i=t,t.transition(function(){var t=this,e=gr(this.childNodes[0],r.exit);return vn(e,function(){return zn(t).remove()}),e}),i}).transitions();return s=function(){zo.call(t,n,o)},0===(a=f).length?s():Promise.all(a.map(function(t){return null==t?void 0:t.finished})).then(s),f}function Io(t,e){return Cr(t,e.tickDirection,e)}function No(t,e,n,r,o){var i=(0,pn.zs)(function(t,e){var n=(0,pn.zs)(t,2);return[[0,0],[n[0]*e,n[1]*e]]}(r,hr(o.tickLength,[t,e,n])),2),a=(0,pn.zs)(i[0],2),s=a[0],c=a[1],l=(0,pn.zs)(i[1],2);return{x1:s,x2:l[0],y1:c,y2:l[1]}}function Ro(t,e,n,r,o,i){var a=function(t,e,n,r,o){var i=o.tickFormatter,a=o.classNamePrefix,s=Io(e.value,o),c="line";(0,Jn.A)(i)&&(c=function(){return hr(i,[e,n,r,s])});var l=t.append(c).attr("className",Zn.tickItem.name);return Br(l,Zn.tickItem,Xn,a),l}(zn(this),t,e,n,r);!function(t,e,n,r,o,i,a){var s=Io(t.value,i),c=No(t,e,n,s,i),l=c.x1,u=c.x2,f=c.y1,d=c.y2,p=(0,pn.zs)(pr(Sr(a,[t,e,n,s])),2),h=p[0],g=p[1];"line"===r.node().nodeName&&r.styles((0,pn.Cl)({x1:l,x2:u,y1:f,y2:d},h)),o.attr(g),r.styles(h)}(t,e,n,a,this,r,o);var s=(0,pn.zs)(Ir(t.value,r),2),c=s[1];return wn(this,{transform:"translate(".concat(s[0],", ").concat(c,")")},i)}function Fo(t){return/\S+-\S+/g.test(t)?t.split("-").map(function(t){return t[0]}):t.length>2?[t[0]]:t.split("")}function Do(t,e,n,r,o){var i=fr(r,"title"),a=(0,pn.zs)(pr(i),2),s=a[0],c=a[1],l=c.transform,u=c.transformOrigin,f=(0,pn.Tt)(c,["transform","transformOrigin"]);e.styles(f);var d=l||function(t,e,n){var r=2*t.getGeometryBounds().halfExtents[1];if("vertical"===e){if("left"===n)return"rotate(-90) translate(0, ".concat(r/2,")");if("right"===n)return"rotate(-90) translate(0, -".concat(r/2,")")}return""}(t.node(),s.direction,s.position);t.styles((0,pn.Cl)((0,pn.Cl)({},s),{transformOrigin:u})),ao(t.node(),d);var p=function(t,e,n){var r=n.titlePosition,o=void 0===r?"lb":r,i=n.titleSpacing,a=Fo(o),s=t.node().getLocalBounds(),c=(0,pn.zs)(s.min,2),l=c[0],u=c[1],f=(0,pn.zs)(s.halfExtents,2),d=f[0],p=f[1],h=(0,pn.zs)(e.node().getLocalBounds().halfExtents,2),g=h[0],m=h[1],y=(0,pn.zs)([l+d,u+p],2),b=y[0],v=y[1],x=(0,pn.zs)(so(i),4),O=x[0],w=x[1],j=x[2],k=x[3];if(["start","end"].includes(o)&&"linear"===n.type){var A=n.startPos,M=n.endPos,_=(0,pn.zs)("start"===o?[A,M]:[M,A],2),S=_[0],E=_[1],P=ir([-E[0]+S[0],-E[1]+S[1]]),L=(0,pn.zs)(Qn(P,O),2);return{x:S[0]+L[0],y:S[1]+L[1]}}return a.includes("t")&&(v-=p+m+O),a.includes("r")&&(b+=d+g+w),a.includes("l")&&(b-=d+g+k),a.includes("b")&&(v+=p+m+j),{x:b,y:v}}(zn(n._offscreen||n.querySelector(Zn.mainGroup.class)),e,r),h=p.x,g=p.y;return wn(e.node(),{transform:"translate(".concat(h,", ").concat(g,")")},o)}function $o(t,e,n,r){var o=t.showLine,i=t.showTick,a=t.showLabel,s=t.classNamePrefix,c=e.maybeAppendByClassName(Zn.lineGroup,"g");Br(c,Zn.lineGroup,Nn,s);var l=En(o,c,function(e){return qr(e,t,r)})||[],u=e.maybeAppendByClassName(Zn.tickGroup,"g");Br(u,Zn.tickGroup,Rn,s);var f=En(i,u,function(e){return function(t,e,n,r){var o=n.classNamePrefix,i=Er(e,n.tickFilter),a=fr(n,"tick");return t.selectAll(Zn.tick.class).data(i,function(t){return t.id||t.label}).join(function(t){var e=t.append("g").attr("className",Zn.tick.name).transition(function(t,e){return Ro.call(this,t,e,i,n,a,!1)});return Br(e,Zn.tick,Yn,o),e},function(t){return t.transition(function(t,e){return this.removeChildren(),Ro.call(this,t,e,i,n,a,r.update)})},function(t){return t.transition(function(){var t=this,e=gr(this.childNodes[0],r.exit);return vn(e,function(){return t.remove()}),e})}).transitions()}(e,n,t,r)})||[],d=e.maybeAppendByClassName(Zn.labelGroup,"g");Br(d,Zn.labelGroup,Fn,s);var p=En(a,d,function(o){return Bo(o,n,t,r,e.node())})||[];return(0,pn.fX)((0,pn.fX)((0,pn.fX)([],(0,pn.zs)(l),!1),(0,pn.zs)(f),!1),(0,pn.zs)(p),!1).filter(function(t){return!!t})}var Wo=function(t){function e(e){return t.call(this,e,Un)||this}return(0,pn.C6)(e,t),e.prototype.render=function(t,e,n){var r=this,o=t.titleText,i=t.data,a=t.animate,s=t.showTitle,c=t.showGrid,l=t.dataThreshold,u=t.truncRange,f=t.classNamePrefix;f?e.attr("className","".concat(e.className||"axis"," ").concat(f,"axis")):e.className||e.attr("className","axis");var d=function(t,e){if(t.length<=e)return t;for(var n=Math.floor(t.length/e),r=[],o=0;o<t.length;o+=n)r.push(t[o]);return r}(i,l).filter(function(t){var e=t.value;return!(u&&e>u[0]&&e<u[1])}),p=bn(void 0===n?a:n),h=zn(e).maybeAppendByClassName(Zn.gridGroup,"g");Br(h,Zn.gridGroup,Bn,f);var g=En(c,h,function(e){return Gr(e,d,t,p)})||[],m=zn(e).maybeAppendByClassName(Zn.mainGroup,"g");Br(m,Zn.mainGroup,In,f),o&&(!this.initialized&&p.enter||this.initialized&&p.update)&&$o(t,zn(this.offscreenGroup),d,bn(!1));var y=$o(t,zn(m.node()),d,p),b=zn(e).maybeAppendByClassName(Zn.titleGroup,"g");Br(b,Zn.titleGroup,Dn,f);var v=En(s,b,function(e){return function(t,e,n,r){var o=n.titleText,i=n.classNamePrefix;return t.selectAll(Zn.title.class).data([{title:o}].filter(function(t){return!!t.title}),function(t,e){return t.title}).join(function(a){var s=a.append(function(){return Ar(o)}).attr("className",Zn.title.name).transition(function(){return Do(zn(this),t,e,n,r.enter)});return Br(s,Zn.title,Kn,i),s},function(o){return o.transition(function(){return Do(zn(this),t,e,n,r.update)})},function(t){return t.remove()}).transitions()}(e,r,t,p)})||[];return(0,pn.fX)((0,pn.fX)((0,pn.fX)([],(0,pn.zs)(g),!1),(0,pn.zs)(y),!1),(0,pn.zs)(v),!1).flat().filter(function(t){return!!t})},e}(Sn);function Ho(t){if($e(t)){return t[t.length-1]}}const qo=function(t){return t};function Yo(t,e){return e-t?n=>(n-t)/(e-t):t=>.5}function Xo(t,...e){return e.reduce((t,e)=>n=>t(e(n)),t)}function Go(t,e,n,r,o){let i=n||0,a=r||t.length;const s=o||(t=>t);for(;i<a;){const n=Math.floor((i+a)/2);s(t[n])>e?a=n:i=n+1}return i}var Vo=n("./node_modules/.pnpm/color-string@1.9.1/node_modules/color-string/index.js"),Ko=n.n(Vo);function Uo(t,e,n){let r=n;return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function Zo(t){const e=Ko().get(t);if(!e)return null;const{model:n,value:r}=e;return"rgb"===n?r:"hsl"===n?function(t){const e=t[0]/360,n=t[1]/100,r=t[2]/100,o=t[3];if(0===n)return[255*r,255*r,255*r,o];const i=r<.5?r*(1+n):r+n-r*n,a=2*r-i;return[255*Uo(a,i,e+1/3),255*Uo(a,i,e),255*Uo(a,i,e-1/3),o]}(r):null}const Jo=(t,e)=>n=>t*(1-n)+e*n,Qo=(t,e)=>"number"==typeof t&&"number"==typeof e?Jo(t,e):"string"==typeof t&&"string"==typeof e?((t,e)=>{const n=Zo(t),r=Zo(e);return null===n||null===r?n?()=>t:()=>e:t=>{const e=new Array(4);for(let o=0;o<4;o+=1)e[o]=n[o]*(1-t)+r[o]*t;const[o,i,a,s]=e;return`rgba(${Math.round(o)}, ${Math.round(i)}, ${Math.round(a)}, ${s})`}})(t,e):()=>t,ti=(t,e)=>{const n=Jo(t,e);return t=>Math.round(n(t))};var ei=n("./node_modules/.pnpm/@antv+util@3.3.11/node_modules/@antv/util/esm/lodash/is-undefined.js");function ni(t){return null===t}function ri(t){return!(0,ei.A)(t)&&!ni(t)&&!Number.isNaN(t)}const oi=(t,e,n=5)=>{const r=[t,e];let o,i=0,a=r.length-1,s=r[i],c=r[a];return c<s&&([s,c]=[c,s],[i,a]=[a,i]),o=ot(s,c,n),o>0?(s=Math.floor(s/o)*o,c=Math.ceil(c/o)*o,o=ot(s,c,n)):o<0&&(s=Math.ceil(s*o)/o,c=Math.floor(c*o)/o,o=ot(s,c,n)),o>0?(r[i]=Math.floor(s/o)*o,r[a]=Math.ceil(c/o)*o):o<0&&(r[i]=Math.ceil(s*o)/o,r[a]=Math.floor(c*o)/o),r};const ii=(t,e,n)=>{const[r,o]=t,[i,a]=e;let s,c;return r<o?(s=Yo(r,o),c=n(i,a)):(s=Yo(o,r),c=n(a,i)),Xo(c,s)},ai=(t,e,n)=>{const r=Math.min(t.length,e.length)-1,o=new Array(r),i=new Array(r),a=t[0]>t[r],s=a?[...t].reverse():t,c=a?[...e].reverse():e;for(let t=0;t<r;t+=1)o[t]=Yo(s[t],s[t+1]),i[t]=n(c[t],c[t+1]);return e=>{const n=Go(t,e,1,r)-1;return Xo(i[n],o[n])(e)}},si=(t,e,n,r)=>(Math.min(t.length,e.length)>2?ai:ii)(t,e,r?ti:n);class ci extends Y{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:Jo,tickCount:5}}map(t){return ri(t)?this.output(t):this.options.unknown}invert(t){return ri(t)?this.input(t):this.options.unknown}nice(){if(!this.options.nice)return;const[t,e,n,...r]=this.getTickMethodOptions();this.options.domain=this.chooseNice()(t,e,n,...r)}getTicks(){const{tickMethod:t}=this.options,[e,n,r,...o]=this.getTickMethodOptions();return t(e,n,r,...o)}getTickMethodOptions(){const{domain:t,tickCount:e}=this.options;return[t[0],t[t.length-1],e]}chooseNice(){return oi}rescale(){this.nice();const[t,e]=this.chooseTransforms();this.composeOutput(t,this.chooseClamp(t)),this.composeInput(t,e,this.chooseClamp(e))}chooseClamp(t){const{clamp:e,range:n}=this.options,r=this.options.domain.map(t),o=Math.min(r.length,n.length);return e?function(t,e){const n=e<t?e:t,r=t>e?t:e;return t=>Math.min(Math.max(n,t),r)}(r[0],r[o-1]):qo}composeOutput(t,e){const{domain:n,range:r,round:o,interpolate:i}=this.options,a=si(n.map(t),r,i,o);this.output=Xo(a,e,t)}composeInput(t,e,n){const{domain:r,range:o}=this.options,i=si(o,r.map(t),Jo);this.input=Xo(e,n,i)}}class li extends ci{getDefaultOptions(){return{domain:[0,1],range:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolate:Qo,tickMethod:at,tickCount:5}}removeUnsortedValues(t,e,n){let r=-1/0;const o=e.reduce((t,o,i)=>{if(0===i)return t;const a=r>0?r:o;if(r>0&&(n?o>r:o<r))t.push(i);else{(a-e[i-1])*(n?-1:1)<0?(r<0&&(r=e[i-1]),t.push(i)):r=-1/0}return t},[]);return o.slice().reverse().forEach(n=>{t.splice(n,1),e.splice(n,1)}),{breaksDomain:t,breaksRange:e}}transformDomain(t){const{domain:e=[],range:n=[1,0],breaks:r=[],tickCount:o=5}=t,[i,a]=[Math.min(...e),Math.max(...e)],s=r.filter(({end:t})=>t<a).sort((t,e)=>t.start-e.start),c=at(i,a,o,s);Ho(c)<a&&c.push(a);const[l,u]=[n[0],Ho(n)],f=a-i,d=Math.abs(u-l),p=l>u,h=c.map(t=>{const e=(t-i)/f;return p?l-e*d:l+e*d}),[g,m]=[.2,.8];return s.forEach(({start:t,end:e,gap:n=.03,compress:r="middle"})=>{const o=c.indexOf(t),i=c.indexOf(e);let a=(h[o]+h[i])/2;"start"===r&&(a=h[o]),"end"===r&&(a=h[i]);const s=n*d/2;let l=p?a+s:a-s,u=p?a-s:a+s;l<g&&(u+=g-l,l=g),u>m&&(l-=u-m,u=m),l>m&&(u-=l-m,l=m),u<g&&(l+=g-u,u=g),h[o]=l,h[i]=u}),this.removeUnsortedValues(c,h,p)}transformBreaks(t){const{domain:e,breaks:n=[]}=t;if(!(0,Le.A)(t.breaks))return t;const r=Math.max(...e),o=n.filter(({end:t})=>t<r),i={...t,breaks:o},{breaksDomain:a,breaksRange:s}=this.transformDomain(i);return{...t,domain:a,range:s,breaks:o,tickMethod:()=>[...a]}}chooseTransforms(){return[qo,qo]}clone(){return new li(this.options)}}const ui=function(t,e){if(t)if((0,Le.A)(t))for(var n=0,r=t.length;n<r&&!1!==e(t[n],n);n++);else if((0,ke.A)(t))for(var o in t)if(t.hasOwnProperty(o)&&!1===e(t[o],o))break};const fi=function(t,e,n){if(!(0,Le.A)(t)&&!(0,$.A)(t))return t;var r=n;return ui(t,function(t,n){r=e(r,t,n)}),r},di=function(t,e){return fi(t,function(t,n,r){return e.includes(r)||(t[r]=n),t},{})};function pi(t,e){let n,r;if(void 0===e)for(const e of t)null!=e&&(void 0===n?e>=e&&(n=r=e):(n>e&&(n=e),r<e&&(r=e)));else{let o=-1;for(let i of t)null!=(i=e(i,++o,t))&&(void 0===n?i>=i&&(n=r=i):(n>i&&(n=i),r<i&&(r=i)))}return[n,r]}var hi=function(){function t(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}return Object.defineProperty(t.prototype,"bottom",{get:function(){return this.y+this.height},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"left",{get:function(){return this.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"right",{get:function(){return this.x+this.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"top",{get:function(){return this.y},enumerable:!1,configurable:!0}),t.fromRect=function(e){return new t(e.x,e.y,e.width,e.height)},t.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}},t.prototype.isPointIn=function(t,e){return t>=this.left&&t<=this.right&&e>=this.top&&e<=this.bottom},t}();function gi(t){for(var e=1/0,n=1/0,r=-1/0,o=-1/0,i=0;i<t.length;i++){var a=t[i],s=a.x,c=a.y,l=(0,pn.zs)([s+a.width,c+a.height],2),u=l[0],f=l[1];s<e&&(e=s),c<n&&(n=c),u>r&&(r=u),f>o&&(o=f)}return new hi(e,n,r-e,o-n)}var mi=function(t,e,n){var r=t.width,o=t.height,i=n.flexDirection,a=void 0===i?"row":i,s=n.justifyContent,c=void 0===s?"flex-start":s,l=n.alignItems,u=void 0===l?"flex-start":l,f="row"===a,d="row"===a||"column"===a,p=f?d?[1,0]:[-1,0]:d?[0,1]:[0,-1],h=(0,pn.zs)([0,0],2),g=h[0],m=h[1],y=e.map(function(t){var e,n=t.width,r=t.height,o=(0,pn.zs)([g,m],2),i=o[0],a=o[1];return e=(0,pn.zs)([g+n*p[0],m+r*p[1]],2),g=e[0],m=e[1],new hi(i,a,n,r)}),b=gi(y),v={"flex-start":0,"flex-end":f?r-b.width:o-b.height,center:f?(r-b.width)/2:(o-b.height)/2},x=y.map(function(t){var e=t.x,n=t.y,r=hi.fromRect(t);return r.x=f?e+v[c]:e,r.y=f?n:n+v[c],r}),O=(gi(x),function(t){var e=(0,pn.zs)(f?["height",o]:["width",r],2),n=e[0],i=e[1];switch(u){case"flex-start":default:return 0;case"flex-end":return i-t[n];case"center":return i/2-t[n]/2}}),w=x.map(function(t){var e=t.x,n=t.y,r=hi.fromRect(t);return r.x=f?e:e+O(r),r.y=f?n+O(r):n,r}),j=w.map(function(e){var n,r,o=hi.fromRect(e);return o.x+=null!==(n=t.x)&&void 0!==n?n:0,o.y+=null!==(r=t.y)&&void 0!==r?r:0,o});return j},yi=function(t,e,n){return[]};var bi=function(t){function e(e){var n=t.call(this,e)||this;n.layoutEvents=[l.jX.BOUNDS_CHANGED,l.jX.INSERTED,l.jX.REMOVED],n.$margin=so(0),n.$padding=so(0);var r=e.style||{},o=r.margin,i=r.padding,a=void 0===i?0:i;return n.margin=void 0===o?0:o,n.padding=a,n.isMutationObserved=!0,n.bindEvents(),n}return(0,pn.C6)(e,t),Object.defineProperty(e.prototype,"margin",{get:function(){return this.$margin},set:function(t){this.$margin=so(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"padding",{get:function(){return this.$padding},set:function(t){this.$padding=so(t)},enumerable:!1,configurable:!0}),e.prototype.getBBox=function(){var t=this.attributes,e=t.x,n=void 0===e?0:e,r=t.y,o=void 0===r?0:r,i=t.width,a=t.height,s=(0,pn.zs)(this.$margin,4),c=s[0],l=s[3];return new hi(n-l,o-c,i+l+s[1],a+c+s[2])},e.prototype.appendChild=function(e,n){return e.isMutationObserved=!0,t.prototype.appendChild.call(this,e,n),e},e.prototype.getAvailableSpace=function(){var t=this.attributes,e=t.width,n=t.height,r=(0,pn.zs)(this.$padding,4),o=r[0],i=r[1],a=r[2],s=r[3],c=(0,pn.zs)(this.$margin,4);return new hi(s+c[3],o+c[0],e-s-i,n-o-a)},e.prototype.layout=function(){if(this.attributes.display&&this.isConnected&&!this.children.some(function(t){return!t.isConnected}))try{var t=this.attributes,e=t.y;this.style.transform="translate(".concat(t.x,", ").concat(e,")");var n=function(t,e,n){if(0===e.length)return[];var r={flex:mi,grid:yi},o=n.display in r?r[n.display]:null;return(null==o?void 0:o.call(null,t,e,n))||[]}(this.getAvailableSpace(),this.children.map(function(t){return t.getBBox()}),this.attributes);this.children.forEach(function(t,e){var r=n[e],o=r.y;t.style.transform="translate(".concat(r.x,", ").concat(o,")")})}catch(t){}},e.prototype.bindEvents=function(){var t=this;this.layoutEvents.forEach(function(e){t.addEventListener(e,function(e){e.target&&(e.target.isMutationObserved=!0,t.layout())})})},e.prototype.attributeChangedCallback=function(t,e,n){"margin"===t?this.margin=n:"padding"===t&&(this.padding=n),this.layout()},e}(l.YJ),vi=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};function xi(t,e,n){return t.querySelector(e)?_t(t).select(e):_t(t).append(n)}function Oi(t){return Array.isArray(t)?t.join(", "):`${t||""}`}function wi(t,e){let{flexDirection:n,justifyContent:r,alignItems:o}={display:"flex",flexDirection:"row",justifyContent:"flex-start",alignItems:"center"};const i={top:["row","flex-start","center"],bottom:["row","flex-start","center"],left:["column","flex-start","center"],right:["column","flex-start","center"],center:["column","center","center"]};return t in i&&([n,r,o]=i[t]),Object.assign({display:"flex",flexDirection:n,justifyContent:r,alignItems:o},e)}class ji extends bi{get child(){var t;return null===(t=this.children)||void 0===t?void 0:t[0]}update(t){var e;const{subOptions:n}=t;null===(e=this.child)||void 0===e||e.update(n),this.attr(t)}}class ki extends ji{update(t){var e;const{subOptions:n}=t;null===(e=this.child)||void 0===e||e.update(n),this.attr(t)}}function Ai(t,e){var n;return null===(n=t.filter(t=>t.getOptions().name===e))||void 0===n?void 0:n[0]}function Mi(t){return"vertical"===t||t===-Math.PI/2}function _i(t,e,n){const{bbox:r}=t,{position:o="top",size:i,length:a}=e,s=["top","bottom","center"].includes(o),[c,l]=s?[r.height,r.width]:[r.width,r.height],{defaultSize:u,defaultLength:f}=n.props,d=i||u||c,p=a||f||l,h=s?"horizontal":"vertical",[g,m]=s?[p,d]:[d,p];return{orientation:h,width:g,height:m,size:d,length:p}}function Si(t){const e=["arrow","crosshairs","grid","handle","handleLabel","indicator","label","line","tick","tip","title","trunc"],{style:n}=t,r=vi(t,["style"]),o={};return Object.entries(r).forEach(([t,n])=>{e.includes(t)?o[`show${Ce(t)}`]=n:o[t]=n}),Object.assign(Object.assign({},o),n)}var Ei=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};function Pi(t,e){const{eulerAngles:n,origin:r}=e;r&&t.setOrigin(r),n&&t.rotate(n[0],n[1],n[2])}function Li(t){const{innerWidth:e,innerHeight:n,depth:r}=t.getOptions();return[e,n,r]}function Ci(t,e,n,r,o,i,a,s){var c;void 0===n&&void 0===i||t.update(Object.assign(Object.assign({},n&&{tickCount:n}),i&&{tickMethod:i}));const l=function(t,e,n){if(t.getTicks)return t.getTicks();if(!n)return e;const[r,o]=pi(e,t=>+t),{tickCount:i}=t.getOptions();return n(r,o,i)}(t,e,i),u=o?l.filter(o):l,f=t=>t instanceof Date?String(t):"object"==typeof t&&t?t:String(t),d=r||(null===(c=t.getFormatter)||void 0===c?void 0:c.call(t))||f,p=function(t,e){if(rn(e))return t=>t;const n=e.getOptions(),{innerWidth:r,innerHeight:o,insetTop:i,insetBottom:a,insetLeft:s,insetRight:c}=n,[l,u,f]="left"===t||"right"===t?[i,a,o]:[s,c,r],d=new li({domain:[0,1],range:[l/f,1-u/f]});return t=>d.map(t)}(a,s),h=function(t,e){const{width:n,height:r}=e.getOptions();return o=>{if(!cn(e))return o;const i=e.map("bottom"===t?[o,1]:[0,o]);if("bottom"===t){const t=i[0];return new li({domain:[0,n],range:[0,1]}).map(t)}if("left"===t){const t=i[1];return new li({domain:[0,r],range:[0,1]}).map(t)}return o}}(a,s),g=t=>["left","right"].includes(t);return rn(s)||nn(s)?u.map((e,n,r)=>{var o,i;const c=(null===(o=t.getBandWidth)||void 0===o?void 0:o.call(t,e))/2||0,l=p(t.map(e)+c);return{value:on(s)&&"center"===a||nn(s)&&(null===(i=t.getTicks)||void 0===i?void 0:i.call(t))&&(t=>["top","bottom","center","outer"].includes(t))(a)||nn(s)&&g(a)?1-l:l,label:f(d(Ze(e),n,r)),id:String(n)}}):u.map((e,n,r)=>{var o;const i=(null===(o=t.getBandWidth)||void 0===o?void 0:o.call(t,e))/2||0,s=h(p(t.map(e)+i));return{value:g(a)?1-s:s,label:f(d(Ze(e),n,r)),id:String(n)}})}function zi(t=[],e){if(t.length>0)return t;const{labelAutoRotate:n,labelAutoHide:r,labelAutoEllipsis:o,labelAutoWrap:i}=e,a=[],s=(t,e)=>{e&&a.push(Object.assign(Object.assign({},t),e))};return s({type:"rotate",optionalAngles:[0,15,30,45,60,90]},n),s({type:"ellipsis",minLength:20},o),s({type:"hide"},r),s({type:"wrap",wordWrapWidth:100,maxLines:3,recoveryWhenFail:!0},i),a}function Ti(t,e,n){return!un(e)&&!sn(e)&&(void 0===t?!!n.getTicks:t)}function Bi(t,e,n,r,o,i){const a=function(t,e,n,r,o){const i=n.axis,a=["top","right","bottom","left"].includes(o)?n[`axis${gt(o)}`]:n.axisLinear,s=t.getOptions().name,c=n[`axis${Ce(s)}`]||{};return Object.assign({},i,a,c)}(t,0,n,0,o);return"center"===o?Object.assign(Object.assign(Object.assign(Object.assign({},a),{labelDirection:"right"===r?"negative":"positive"}),"center"===r?{labelTransform:"translate(50%,0)"}:null),{tickDirection:"right"===r?"negative":"positive",labelSpacing:"center"===r?0:4,titleSpacing:Mi(i)?10:0,tick:"center"!==r&&void 0}):a}const Ii=t=>e=>{const{labelFormatter:n,labelFilter:r=()=>!0}=e;return o=>{var i;const{scales:[a]}=o,s=(null===(i=a.getTicks)||void 0===i?void 0:i.call(a))||a.getOptions().domain,c="string"==typeof n?(0,ze.GP)(n):n,l=Object.assign(Object.assign({},e),{labelFormatter:c,labelFilter:(t,e,n)=>r(s[e],e,s),scale:a});return t(l)(o)}},Ni=Ii(t=>{const{direction:e="left",important:n={},labelFormatter:r,orientation:o,actualPosition:i,position:a,size:s,style:c={},title:l,tickCount:u,tickFilter:f,tickMethod:d,tickLength:p,transform:h,indexBBox:g}=t,m=Ei(t,["direction","important","labelFormatter","order","orientation","actualPosition","position","size","style","title","tickCount","tickFilter","tickMethod","tickLength","transform","indexBBox"]);return({scales:y,value:b,coordinate:v,theme:x})=>{const{bbox:O}=b,[w]=y,{domain:j,xScale:k}=w.getOptions(),A=Bi(w,0,x,e,a,o),M=Object.assign(Object.assign(Object.assign({},A),c),m),_=function(t,e,n="xy"){const[r,o,i]=Li(e);return"xy"===n?t.includes("bottom")||t.includes("top")?o:r:"xz"===n?t.includes("bottom")||t.includes("top")?i:r:t.includes("bottom")||t.includes("top")?o:i}(i||a,v,t.plane),S=function(t,e,n,r,o){const{x:i,y:a,width:s,height:c}=n;if("bottom"===t)return{startPos:[i,a],endPos:[i+s,a]};if("left"===t)return{startPos:[i+s,a+c],endPos:[i+s,a]};if("right"===t)return{startPos:[i,a+c],endPos:[i,a]};if("top"===t)return{startPos:[i,a+c],endPos:[i+s,a+c]};if("center"===t){if("vertical"===e)return{startPos:[i,a],endPos:[i,a+c]};if("horizontal"===e)return{startPos:[i,a],endPos:[i+s,a]};if("number"==typeof e){const[t,n]=r.getCenter(),[l,u]=fn(r),[f,d]=dn(r),p=Math.min(s,c)/2,{insetLeft:h,insetTop:g}=r.getOptions(),m=l*p,y=u*p,[b,v]=[t+i-h,n+a-g],[x,O]=[Math.cos(e),Math.sin(e)],w=[b+y*x,v+y*O],j=[b+m*x,v+m*O],k=()=>{const{domain:t}=o.getOptions();return t.length},A=rn(r)&&o?k():3;return{startPos:w,endPos:j,gridClosed:Math.abs(d-f-360)<1e-6,gridCenter:[b,v],gridControlAngles:new Array(A).fill(0).map((t,e,n)=>(d-f)/A*e)}}}return{}}(a,o,O,v,k),E=function(t){const{depth:e}=t.getOptions();return e?{tickIsBillboard:!0,lineIsBillboard:!0,labelIsBillboard:!0,titleIsBillboard:!0,gridIsBillboard:!0}:{}}(v),P=Ci(w,j,u,r,f,d,a,v),L=g?P.map((t,e)=>{const n=g.get(e);return n?n[0]!==t.label?t:Object.assign(Object.assign({},t),{bbox:n[1]}):t}):P,C=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},M),{type:"linear",data:L,crossSize:s,titleText:Oi(l),labelOverlap:zi(h,M),grid:Ti(M.grid,v,w),gridLength:_,line:!0,indexBBox:g,classNamePrefix:"g2-"}),void 0!==p?{tickLength:p}:null),M.line?null:{lineOpacity:0}),S),E),n),z=C.labelOverlap.find(t=>"hide"===t.type);return z&&(C.crossSize=!1),new Wo({className:"axis",style:Si(C)})}}),Ri=Ii(t=>{const{position:e,labelFormatter:n,tickFilter:r,tickCount:o,tickMethod:i,tickLength:a,important:s={},style:c={},indexBBox:l,title:u,grid:f=!1}=t,d=Ei(t,["order","size","position","orientation","labelFormatter","tickFilter","tickCount","tickMethod","tickLength","important","style","indexBBox","title","grid"]);return({scales:[t],value:c,coordinate:p,theme:h})=>{const{bbox:g}=c,{domain:m}=t.getOptions(),y=Ci(t,m,o,n,r,i,e,p),b=l?y.map((t,e)=>{const n=l.get(e);return n?n[0]!==t.label?t:Object.assign(Object.assign({},t),{bbox:n[1]}):t}):y,[v,x]=fn(p),O=function(t,e,n,r,o){const{x:i,y:a,width:s,height:c}=e,l=[i+s/2,a+c/2],u=Math.min(s,c)/2,[f,d]=dn(o),[p,h]=Li(o),g={center:l,radius:u,startAngle:f,endAngle:d,gridLength:(r-n)*(Math.min(p,h)/2)};if("inner"===t){const{insetLeft:t,insetTop:e}=o.getOptions();return Object.assign(Object.assign({},g),{center:[l[0]-t,l[1]-e],labelAlign:"perpendicular",labelDirection:"positive",tickDirection:"positive",gridDirection:"negative"})}return Object.assign(Object.assign({},g),{labelAlign:"parallel",labelDirection:"negative",tickDirection:"negative",gridDirection:"positive"})}(e,g,v,x,p),{axis:w,axisArc:j={}}=h,k=Si((0,N.A)({},w,j,O,Object.assign(Object.assign(Object.assign({type:"arc",data:b,titleText:Oi(u),grid:f,classNamePrefix:"g2-"},void 0!==a?{tickLength:a}:null),d),s)));return new Wo({style:di(k,["transform"])})}});Ni.props={defaultPosition:"center",defaultSize:45,defaultOrder:0,defaultCrossPadding:[12,12],defaultPadding:[12,12]},Ri.props={defaultPosition:"outer",defaultOrientation:"vertical",defaultSize:45,defaultOrder:0,defaultCrossPadding:[12,12],defaultPadding:[12,12]};var Fi=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};function Di(t,e,n,r){const{radar:o}=t,[i]=r,a=i.getOptions().name,[s,c]=dn(n),{axisRadar:l={}}=e;return Object.assign(Object.assign({},l),{grid:"position"===a,gridConnect:"line",gridControlAngles:new Array(o.count).fill(0).map((t,e)=>(c-s)/o.count*e)})}const $i=t=>{const{important:e={}}=t,n=Fi(t,["important"]);return r=>{const{theme:o,coordinate:i,scales:a}=r;return Ni(Object.assign(Object.assign(Object.assign({},n),function(t){const e=t%(2*Math.PI);return e===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)"}:{}}(t.orientation)),{important:Object.assign(Object.assign({},Di(t,o,i,a)),e)}))(r)}};$i.props=Object.assign(Object.assign({},Ni.props),{defaultPosition:"center"});class Wi{constructor(t){this.options=(0,N.A)({},this.getDefaultOptions()),this.update(t)}getOptions(){return this.options}update(t={}){this.options=(0,N.A)({},this.options,t),this.rescale(t)}rescale(t){}}function Hi(t,e){return e-t?n=>(n-t)/(e-t):t=>.5}function qi(t,...e){return e.reduce((t,e)=>n=>t(e(n)),t)}function Yi(t,e,n){let r=n;return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function Xi(t){const e=Ko().get(t);if(!e)return null;const{model:n,value:r}=e;return"rgb"===n?r:"hsl"===n?function(t){const e=t[0]/360,n=t[1]/100,r=t[2]/100,o=t[3];if(0===n)return[255*r,255*r,255*r,o];const i=r<.5?r*(1+n):r+n-r*n,a=2*r-i;return[255*Yi(a,i,e+1/3),255*Yi(a,i,e),255*Yi(a,i,e-1/3),o]}(r):null}const Gi=(t,e)=>n=>t*(1-n)+e*n,Vi=(t,e)=>"number"==typeof t&&"number"==typeof e?Gi(t,e):"string"==typeof t&&"string"==typeof e?((t,e)=>{const n=Xi(t),r=Xi(e);return null===n||null===r?n?()=>t:()=>e:t=>{const e=new Array(4);for(let o=0;o<4;o+=1)e[o]=n[o]*(1-t)+r[o]*t;const[o,i,a,s]=e;return`rgba(${Math.round(o)}, ${Math.round(i)}, ${Math.round(a)}, ${s})`}})(t,e):()=>t,Ki=(t,e)=>{const n=Gi(t,e);return t=>Math.round(n(t))};function Ui(t){return!(0,ei.A)(t)&&!ni(t)&&!Number.isNaN(t)}const Zi=Math.sqrt(50),Ji=Math.sqrt(10),Qi=Math.sqrt(2);function ta(t,e,n){const r=(e-t)/Math.max(0,n),o=Math.floor(Math.log(r)/Math.LN10),i=r/10**o;return o>=0?(i>=Zi?10:i>=Ji?5:i>=Qi?2:1)*10**o:-(10**-o)/(i>=Zi?10:i>=Ji?5:i>=Qi?2:1)}const ea=(t,e,n=5)=>{const r=[t,e];let o,i=0,a=r.length-1,s=r[i],c=r[a];return c<s&&([s,c]=[c,s],[i,a]=[a,i]),o=ta(s,c,n),o>0?(s=Math.floor(s/o)*o,c=Math.ceil(c/o)*o,o=ta(s,c,n)):o<0&&(s=Math.ceil(s*o)/o,c=Math.floor(c*o)/o,o=ta(s,c,n)),o>0?(r[i]=Math.floor(s/o)*o,r[a]=Math.ceil(c/o)*o):o<0&&(r[i]=Math.ceil(s*o)/o,r[a]=Math.floor(c*o)/o),r};const na=(t,e,n)=>{const[r,o]=t,[i,a]=e;let s,c;return r<o?(s=Hi(r,o),c=n(i,a)):(s=Hi(o,r),c=n(a,i)),qi(c,s)},ra=(t,e,n)=>{const r=Math.min(t.length,e.length)-1,o=new Array(r),i=new Array(r),a=t[0]>t[r],s=a?[...t].reverse():t,c=a?[...e].reverse():e;for(let t=0;t<r;t+=1)o[t]=Hi(s[t],s[t+1]),i[t]=n(c[t],c[t+1]);return e=>{const n=function(t,e,n,r,o){let i=n||0,a=r||t.length;const s=o||(t=>t);for(;i<a;){const n=Math.floor((i+a)/2);s(t[n])>e?a=n:i=n+1}return i}(t,e,1,r)-1;return qi(i[n],o[n])(e)}},oa=(t,e,n,r)=>(Math.min(t.length,e.length)>2?ra:na)(t,e,r?Ki:n);class ia extends Wi{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:Gi,tickCount:5}}map(t){return Ui(t)?this.output(t):this.options.unknown}invert(t){return Ui(t)?this.input(t):this.options.unknown}nice(){if(!this.options.nice)return;const[t,e,n,...r]=this.getTickMethodOptions();this.options.domain=this.chooseNice()(t,e,n,...r)}getTicks(){const{tickMethod:t}=this.options,[e,n,r,...o]=this.getTickMethodOptions();return t(e,n,r,...o)}getTickMethodOptions(){const{domain:t,tickCount:e}=this.options;return[t[0],t[t.length-1],e]}chooseNice(){return ea}rescale(){this.nice();const[t,e]=this.chooseTransforms();this.composeOutput(t,this.chooseClamp(t)),this.composeInput(t,e,this.chooseClamp(e))}chooseClamp(t){const{clamp:e,range:n}=this.options,r=this.options.domain.map(t),o=Math.min(r.length,n.length);return e?function(t,e){const n=e<t?e:t,r=t>e?t:e;return t=>Math.min(Math.max(n,t),r)}(r[0],r[o-1]):qo}composeOutput(t,e){const{domain:n,range:r,round:o,interpolate:i}=this.options,a=oa(n.map(t),r,i,o);this.output=qi(a,e,t)}composeInput(t,e,n){const{domain:r,range:o}=this.options,i=oa(o,r.map(t),Gi);this.input=qi(e,n,i)}}const aa=(t,e,n)=>{let r,o,i=t,a=e;if(i===a&&n>0)return[i];let s=ta(i,a,n);if(0===s||!Number.isFinite(s))return[];if(s>0){i=Math.ceil(i/s),a=Math.floor(a/s),o=new Array(r=Math.ceil(a-i+1));for(let t=0;t<r;t+=1)o[t]=(i+t)*s}else{s=-s,i=Math.ceil(i*s),a=Math.floor(a*s),o=new Array(r=Math.ceil(a-i+1));for(let t=0;t<r;t+=1)o[t]=(i+t)/s}return o};class sa extends ia{getDefaultOptions(){return{domain:[0,1],range:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolate:Vi,tickMethod:aa,tickCount:5}}chooseTransforms(){return[qo,qo]}clone(){return new sa(this.options)}}var ca=n("./node_modules/.pnpm/@antv+util@3.3.11/node_modules/@antv/util/esm/lodash/clamp.js");function la(t,e){return+t.toPrecision(e)}function ua(t){var e=t.canvas,n=t.touches,r=t.offsetX,o=t.offsetY;if(e)return[e.x,e.y];if(n){var i=n[0];return[i.clientX,i.clientY]}return r&&o?[r,o]:[0,0]}var fa={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",radius:0,zIndex:999},da=Tn({background:"background",labelGroup:"label-group",label:"label"},"indicator"),pa=function(t){function e(e){var n=t.call(this,e,fa)||this;return n.point=[0,0],n.group=n.appendChild(new l.YJ({})),n.isMutationObserved=!0,n}return(0,pn.C6)(e,t),e.prototype.renderBackground=function(){if(this.label){var t=this.attributes,e=t.position,n=(0,pn.zs)(so(t.padding),4),r=n[0],o=n[1],i=n[2],a=n[3],s=this.label.node().getLocalBounds(),c=s.min,l=s.max,u=new hi(c[0]-a,c[1]-r,l[0]+o-c[0]+a,l[1]+i-c[1]+r),f=this.getPath(e,u),d=fr(this.attributes,"background");this.background=zn(this.group).maybeAppendByClassName(da.background,"path").styles((0,pn.Cl)((0,pn.Cl)({},d),{d:f})),this.group.appendChild(this.label.node())}},e.prototype.renderLabel=function(){var t=this.attributes,e=t.formatter,n=t.labelText,r=fr(this.attributes,"label"),o=(0,pn.zs)(pr(r),2),i=o[0],a=o[1],s=(0,pn.Tt)(i,["text"]);(this.label=zn(this.group).maybeAppendByClassName(da.labelGroup,"g").styles(a),n)&&this.label.maybeAppendByClassName(da.label,function(){return Ar(e(n))}).style("text",e(n).toString()).selectAll("text").styles(s)},e.prototype.adjustLayout=function(){var t=(0,pn.zs)(this.point,2),e=t[1],n=this.attributes,r=n.y;this.group.attr("transform","translate(".concat(n.x-t[0],", ").concat(r-e,")"))},e.prototype.getPath=function(t,e){var n=this.attributes.radius,r=e.x,o=e.y,i=e.width,a=e.height,s=[["M",r+n,o],["L",r+i-n,o],["A",n,n,0,0,1,r+i,o+n],["L",r+i,o+a-n],["A",n,n,0,0,1,r+i-n,o+a],["L",r+n,o+a],["A",n,n,0,0,1,r,o+a-n],["L",r,o+n],["A",n,n,0,0,1,r+n,o],["Z"]],c={top:4,right:6,bottom:0,left:2}[t],l=this.createCorner([s[c].slice(-2),s[c+1].slice(-2)]);return s.splice.apply(s,(0,pn.fX)([c+1,1],(0,pn.zs)(l),!1)),s[0][0]="M",s},e.prototype.createCorner=function(t,e){void 0===e&&(e=10);var n=Oo.apply(void 0,(0,pn.fX)([],(0,pn.zs)(t),!1)),r=(0,pn.zs)(t,2),o=(0,pn.zs)(r[0],2),i=o[0],a=o[1],s=(0,pn.zs)(r[1],2),c=s[0],l=s[1],u=(0,pn.zs)(n?[c-i,[i,c]]:[l-a,[a,l]],2),f=u[0],d=(0,pn.zs)(u[1],2),p=d[0],h=d[1],g=f/2,m=e*(f/Math.abs(f)),y=m/2,b=m*Math.sqrt(3)/2*.8,v=(0,pn.zs)([p,p+g-y,p+g,p+g+y,h],5),x=v[0],O=v[1],w=v[2],j=v[3],k=v[4];return n?(this.point=[w,a-b],[["L",x,a],["L",O,a],["L",w,a-b],["L",j,a],["L",k,a]]):(this.point=[i+b,w],[["L",i,x],["L",i,O],["L",i+b,w],["L",i,j],["L",i,k]])},e.prototype.applyVisibility=function(){"hidden"===this.attributes.visibility?mn(this):gn(this)},e.prototype.bindEvents=function(){this.label.on(l.jX.BOUNDS_CHANGED,this.renderBackground)},e.prototype.render=function(){this.renderLabel(),this.renderBackground(),this.adjustLayout(),this.applyVisibility()},e}(Sn),ha={fill:"#fff",lineWidth:1,radius:2,size:10,stroke:"#bfbfbf",strokeOpacity:1,zIndex:0},ga={fill:"#000",fillOpacity:.45,fontSize:12,textAlign:"center",textBaseline:"middle",zIndex:1},ma={x:0,y:0,orientation:"horizontal",showLabel:!0,type:"start"},ya=Tn({foreground:"foreground",handle:"handle",selection:"selection",sparkline:"sparkline",sparklineGroup:"sparkline-group",track:"track",brushArea:"brush-area"},"slider"),ba=Tn({labelGroup:"label-group",label:"label",iconGroup:"icon-group",icon:"icon",iconRect:"icon-rect",iconLine:"icon-line"},"handle"),va=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,pn.C6)(e,t),e.prototype.render=function(t,e){var n=t.x,r=t.y,o=t.size,i=void 0===o?10:o,a=t.radius,s=void 0===a?i/4:a,c=t.orientation,l=t.classNamePrefix,u=(0,pn.Tt)(t,["x","y","size","radius","orientation","classNamePrefix"]),f=i,d=2.4*f,p=l?"".concat(ba.iconRect.name," ").concat(l,"handle-icon-rect"):ba.iconRect.name,h=function(t){return l?"".concat(ba.iconLine,"-").concat(t," ").concat(l,"handle-icon-line"):"".concat(ba.iconLine,"-").concat(t)},g=zn(e).maybeAppendByClassName(ba.iconRect,"rect").attr("className",p).styles((0,pn.Cl)((0,pn.Cl)({},u),{width:f,height:d,radius:s,x:n-f/2,y:r-d/2,transformOrigin:"center"})),m=n+1/3*f-f/2,y=n+2/3*f-f/2,b=r+1/4*d-d/2,v=r+3/4*d-d/2;g.maybeAppendByClassName("".concat(ba.iconLine,"-1"),"line").attr("className",h(1)).styles((0,pn.Cl)({x1:m,x2:m,y1:b,y2:v},u)),g.maybeAppendByClassName("".concat(ba.iconLine,"-2"),"line").attr("className",h(2)).styles((0,pn.Cl)({x1:y,x2:y,y1:b,y2:v},u)),"vertical"===c&&(g.node().style.transform="rotate(90)")},e}(Sn),xa=function(t){function e(e){return t.call(this,e,ma)||this}return(0,pn.C6)(e,t),e.prototype.renderLabel=function(t){var e=this,n=this.attributes,r=n.x,o=n.y,i=n.showLabel,a=fr(this.attributes,"label"),s=a.x,c=void 0===s?0:s,l=a.y,u=void 0===l?0:l,f=a.transform,d=a.transformOrigin,p=(0,pn.Tt)(a,["x","y","transform","transformOrigin"]),h=(0,pn.zs)(pr(p,[]),2),g=h[0],m=h[1],y=zn(t).maybeAppendByClassName(ba.labelGroup,"g").styles(m),b=(0,pn.Cl)((0,pn.Cl)({},ga),g),v=b.text,x=(0,pn.Tt)(b,["text"]);En(!!i,y,function(t){e.label=t.maybeAppendByClassName(ba.label,"text").styles((0,pn.Cl)((0,pn.Cl)({},x),{x:r+c,y:o+u,transform:f,transformOrigin:d,text:"".concat(v)})),e.label.on("mousedown",function(t){t.stopPropagation()}),e.label.on("touchstart",function(t){t.stopPropagation()})})},e.prototype.renderIcon=function(t){var e=this.attributes,n=e.type,r=(0,pn.Cl)((0,pn.Cl)({x:e.x,y:e.y,orientation:e.orientation,classNamePrefix:e.classNamePrefix},ha),fr(this.attributes,"icon")),o=this.attributes.iconShape,i=void 0===o?function(){return new va({style:r})}:o;zn(t).maybeAppendByClassName(ba.iconGroup,"g").selectAll(ba.icon.class).data([i]).join(function(t){return t.append("string"==typeof i?i:function(){return i(n)}).attr("className",ba.icon.name)},function(t){return t.update(r)},function(t){return t.remove()})},e.prototype.render=function(t,e){this.renderIcon(e),this.renderLabel(e)},e}(Sn);function Oa(t,e,n){return n?"".concat(t," ").concat(n,"legend-").concat(e):t}var wa="title",ja="item",ka="marker",Aa="label",Ma="value",_a="focus-icon",Sa="background",Ea="ribbon",Pa="track",La="selection",Ca="handle",za="handle-marker",Ta="handle-label",Ba="indicator",Ia="prev-btn",Na="next-btn",Ra="page-info",Fa=Tn({text:"text"},"title");function Da(t,e){var n=Object.entries(e).reduce(function(e,n){var r=(0,pn.zs)(n,2),o=r[0],i=r[1];return t.node().attr(o)||(e[o]=i),e},{});t.styles(n)}var $a=function(t){function e(e){return t.call(this,e,{text:"",width:0,height:0,fill:"#4a505a",fontWeight:"bold",fontSize:12,fontFamily:"sans-serif",inset:0,spacing:0,position:"top-left"})||this}return(0,pn.C6)(e,t),e.prototype.getAvailableSpace=function(){var t=this.attributes,e=t.width,n=t.height,r=t.position,o=t.spacing,i=t.inset,a=this.querySelector(Fa.text.class);if(!a)return new hi(0,0,+e,+n);var s=a.getBBox(),c=s.width,l=s.height,u=(0,pn.zs)(so(o),4),f=u[0],d=u[1],p=u[2],h=u[3],g=(0,pn.zs)([0,0,+e,+n],4),m=g[0],y=g[1],b=g[2],v=g[3],x=Fo(r);if(x.includes("i"))return new hi(m,y,b,v);x.forEach(function(t,r){var o,i,a,s;"t"===t&&(o=(0,pn.zs)(0===r?[l+p,+n-l-p]:[0,+n],2),y=o[0],v=o[1]),"r"===t&&(i=(0,pn.zs)([+e-c-h],1),b=i[0]),"b"===t&&(a=(0,pn.zs)([+n-l-f],1),v=a[0]),"l"===t&&(s=(0,pn.zs)(0===r?[c+d,+e-c-d]:[0,+e],2),m=s[0],b=s[1])});var O=(0,pn.zs)(so(i),4),w=O[0],j=O[3],k=(0,pn.zs)([j+O[1],w+O[2]],2);return new hi(m+j,y+w,b-k[0],v-k[1])},e.prototype.getBBox=function(){return this.title?this.title.getBBox():new hi(0,0,0,0)},e.prototype.render=function(t,e){var n=this,r=t.classNamePrefix,o=(0,pn.Tt)(t,["width","height","position","spacing","classNamePrefix"]),i=(0,pn.zs)(pr(o),1)[0],a=function(t){var e,n,r,o,i=t.width,a=t.height,s=t.position,c=(0,pn.zs)([+i/2,+a/2],2),l=(0,pn.zs)([+c[0],+c[1],"center","middle"],4),u=l[0],f=l[1],d=l[2],p=l[3],h=Fo(s);return h.includes("l")&&(u=(e=(0,pn.zs)([0,"start"],2))[0],d=e[1]),h.includes("r")&&(u=(n=(0,pn.zs)([+i,"end"],2))[0],d=n[1]),h.includes("t")&&(f=(r=(0,pn.zs)([0,"top"],2))[0],p=r[1]),h.includes("b")&&(f=(o=(0,pn.zs)([+a,"bottom"],2))[0],p=o[1]),{x:u,y:f,textAlign:d,textBaseline:p}}(t),s=a.x,c=a.y,l=a.textAlign,u=a.textBaseline;En(!!o.text,zn(e),function(t){var e=Oa(Fa.text.name,wa,r);n.title=t.maybeAppendByClassName(Fa.text,"text").attr("className",e).styles(i).call(Da,{x:s,y:c,textAlign:l,textBaseline:u}).node()})},e}(Sn),Wa=function(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"]]},Ha=Wa,qa=function(t,e,n){return[["M",t,e+n],["L",t,e-n]]},Ya=function(t,e,n){return[["M",t-n,e],["L",t+n,e]]},Xa=Ya;var Ga=function(t,e,n){return[["M",t-n,e-n],["L",t+n,e],["L",t-n,e+n],["Z"]]};function Va(t){var e=function(t){var e="default";if((0,ke.A)(t)&&t instanceof Image)e="image";else if((0,Jn.A)(t))e="symbol";else if((0,j.A)(t)){var n=new RegExp("data:(image|text)");e=t.match(n)?"base64":/^(https?:\/\/(([a-zA-Z0-9]+-?)+[a-zA-Z0-9]+\.)+[a-zA-Z]+)(:\d+)?(\/.*)?(\?.*)?(#.*)?$/.test(t)?"url":"symbol"}return e}(t);return["base64","url","image"].includes(e)?"image":t&&"symbol"===e?"path":null}var Ka=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,pn.C6)(e,t),e.prototype.render=function(t,n){var r=t.x,o=void 0===r?0:r,i=t.y,a=void 0===i?0:i,s=this.getSubShapeStyle(t),c=s.symbol,l=s.size,u=void 0===l?16:l,f=(0,pn.Tt)(s,["symbol","size"]),d=Va(c);En(!!d,zn(n),function(t){t.maybeAppendByClassName("marker",d).attr("className","marker ".concat(d,"-marker")).call(function(t){if("image"===d){t.styles({img:c,width:n=2*u,height:n,x:o-u,y:a-u})}else{var n=u/2,r=(0,Jn.A)(c)?c:e.getSymbol(c);t.styles((0,pn.Cl)({d:null==r?void 0:r(o,a,n)},f))}})})},e.MARKER_SYMBOL_MAP=new Map,e.registerSymbol=function(t,n){e.MARKER_SYMBOL_MAP.set(t,n)},e.getSymbol=function(t){return e.MARKER_SYMBOL_MAP.get(t)},e.getSymbols=function(){return Array.from(e.MARKER_SYMBOL_MAP.keys())},e}(Sn);Ka.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]]}),Ka.registerSymbol("hyphen",function(t,e,n){return[["M",t-n,e],["L",t+n,e]]}),Ka.registerSymbol("line",qa),Ka.registerSymbol("plus",function(t,e,n){return[["M",t-n,e],["L",t+n,e],["M",t,e-n],["L",t,e+n]]}),Ka.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]]}),Ka.registerSymbol("circle",Wa),Ka.registerSymbol("point",Ha),Ka.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"]]}),Ka.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"]]}),Ka.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"]]}),Ka.registerSymbol("diamond",function(t,e,n){return[["M",t-n,e],["L",t,e-n],["L",t+n,e],["L",t,e+n],["Z"]]}),Ka.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"]]}),Ka.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"]]}),Ka.registerSymbol("line",qa),Ka.registerSymbol("dot",Ya),Ka.registerSymbol("dash",Xa),Ka.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]]}),Ka.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]]}),Ka.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]]}),Ka.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]]}),Ka.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]]}),Ka.registerSymbol("focus",function(t,e,n){var r=.2*n,o=.7*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"],["M",t-o,e],["L",t-r,e],["M",t+r,e],["L",t+o,e],["M",t,e-o],["L",t,e-r],["M",t,e+r],["L",t,e+o]]});Ka.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"]]}),Ka.registerSymbol("verticalHandle",function(t,e,n){var r=1.4*n,o=n/2,i=n/6,a=t+.4*r;return[["M",t,e],["L",a,e+o],["L",t+r,e+o],["L",t+r,e-o],["L",a,e-o],["Z"],["M",a,e+i],["L",t+r-2,e+i],["M",a,e-i],["L",t+r-2,e-i]]}),Ka.registerSymbol("horizontalHandle",function(t,e,n){var r=1.4*n,o=n/2,i=n/6,a=e+.4*r;return[["M",t,e],["L",t-o,a],["L",t-o,e+r],["L",t+o,e+r],["L",t+o,a],["Z"],["M",t-i,a],["L",t-i,e+r-2],["M",t+i,a],["L",t+i,e+r-2]]});function Ua(t,e,n){return void 0===t&&(t="horizontal"),"horizontal"===t?e:n}var Za=Tn({markerGroup:"marker-group",marker:"marker",labelGroup:"label-group",label:"label"},"handle"),Ja={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},Qa=function(t){function e(e){return t.call(this,e,Ja)||this}return(0,pn.C6)(e,t),e.prototype.render=function(t,e){var n=zn(e).maybeAppendByClassName(Za.markerGroup,"g");this.renderMarker(n);var r=zn(e).maybeAppendByClassName(Za.labelGroup,"g");this.renderLabel(r)},e.prototype.renderMarker=function(t){var e=this,n=this.attributes,r=n.classNamePrefix,o=n.markerSymbol,i=void 0===o?Ua(n.orientation,"horizontalHandle","verticalHandle"):o;En(!!i,t,function(t){var n=fr(e.attributes,"marker"),o=(0,pn.Cl)({symbol:i},n),a=Oa(Za.marker.name,za,r);if(e.marker=t.maybeAppendByClassName(Za.marker,function(){return new Ka({style:o,className:a})}).update(o),r){var s=e.marker.node().querySelector(".marker");if(s){var c=Oa((s.getAttribute("class")||"").split(" ")[0],za,r);s.setAttribute("class",c)}}})},e.prototype.renderLabel=function(t){var e=this,n=this.attributes,r=n.orientation,o=n.spacing,i=void 0===o?0:o,a=n.formatter,s=n.classNamePrefix;En(n.showLabel,t,function(t){var n,o=fr(e.attributes,"label"),c=o.text,l=(0,pn.Tt)(o,["text"]),u=(null===(n=t.select(Za.marker.class))||void 0===n?void 0:n.node().getBBox())||{},f=u.width,d=u.height,p=(0,pn.zs)(Ua(r,[0,(void 0===d?0:d)+i,"center","top"],[(void 0===f?0:f)+i,0,"start","middle"]),4),h=p[0],g=p[1],m=p[2],y=p[3],b=Oa(Za.label.name,Ta,s);t.maybeAppendByClassName(Za.label,"text").attr("className",b).styles((0,pn.Cl)((0,pn.Cl)({},l),{x:h,y:g,text:a(c).toString(),textAlign:m,textBaseline:y}))})},e}(Sn),ts={showTitle:!0,padding:0,orientation:"horizontal",backgroundFill:"transparent",titleText:"",titleSpacing:4,titlePosition:"top-left",titleFill:"#2C3542",titleFontWeight:"bold",titleFontFamily:"sans-serif",titleFontSize:12},es=kn({},ts,{}),ns=kn({},ts,dr(Ja,"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"}),rs=Tn({title:"title",html:"html",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");function os(t,e){var n=(0,pn.zs)(function(t,e){for(var n=1;n<t.length;n+=1){var r=t[n-1],o=t[n];if(e>=r&&e<=o)return[r,o]}return[e,e]}(t,e),2),r=n[0],o=n[1];return{tick:e>(r+o)/2?o:r,range:[r,o]}}var is=Tn({trackGroup:"background-group",track:"background",selectionGroup:"ribbon-group",selection:"ribbon",clipPath:"clip-path"},"ribbon");function as(t){var e=t.size,n=t.length;return Ua(t.orientation,[n,e],[e,n])}function ss(t){var e=t.type,n=(0,pn.zs)(as(t),2),r=n[0],o=n[1];return"size"===e?[["M",0,o],["L",0+r,0],["L",0+r,o],["Z"]]:[["M",0,o],["L",0,0],["L",0+r,0],["L",0+r,o],["Z"]]}function cs(t){return ss(t)}function ls(t){var e,n=t.orientation,r=t.color,o=t.block,i=t.partition;if((0,Jn.A)(r)){e=new Array(20).fill(0).map(function(t,e,n){return r(e/(n.length-1))})}else e=r;var a=e.length,s=e.map(function(t){return(0,l.H0)(t).toString()});return a?1===a?s[0]:o?function(t,e,n){var r=Array.from(e),o=t.length;return new Array(o).fill(0).reduce(function(e,n,i){var a=r[i%r.length];return e+" ".concat(t[i],":").concat(a).concat(i<o-1?" ".concat(t[i+1],":").concat(a):"")},"l(".concat("horizontal"===n?"0":"270",")"))}(i,s,n):s.reduce(function(t,e,n){return t+" ".concat(n/(a-1),":").concat(e)},"l(".concat(Ua(n,"0","270"),")")):""}function us(t){var e=t.orientation,n=t.range;if(!n)return[];var r=(0,pn.zs)(as(t),2),o=r[0],i=r[1],a=(0,pn.zs)(n,2),s=a[0],c=a[1],l=Ua(e,s*o,0),u=Ua(e,0,s*i),f=Ua(e,c*o,o),d=Ua(e,i,c*i);return[["M",l,u],["L",l,d],["L",f,d],["L",f,u],["Z"]]}var fs=function(t){function e(e){return t.call(this,e,{type:"color",orientation:"horizontal",size:30,range:[0,1],length:200,block:!1,partition:[],color:["#fff","#000"],trackFill:"#e5e5e5"})||this}return(0,pn.C6)(e,t),e.prototype.render=function(t,e){!function(t,e){var n=fr(e,"track"),r=Oa(is.track.name,Pa,e.classNamePrefix);t.maybeAppendByClassName(is.track,"path").attr("className",r).styles((0,pn.Cl)({d:ss(e)},n))}(zn(e).maybeAppendByClassName(is.trackGroup,"g"),t),function(t,e){var n=fr(e,"selection"),r=ls(e),o=Oa(is.selection.name,La,e.classNamePrefix),i=t.maybeAppendByClassName(is.selection,"path").attr("className",o).styles((0,pn.Cl)({d:cs(e),fill:r},n)),a=i.maybeAppendByClassName(is.clipPath,"path").styles({d:us(e)}).node();i.style("clipPath",a)}(zn(e).maybeAppendByClassName(is.selectionGroup,"g"),t)},e}(Sn);var ds=function(t){function e(e){var n=t.call(this,e,ns)||this;return n.eventToOffsetScale=new sa({}),n.innerRibbonScale=new sa({}),n.cacheLabelBBox=null,n.cacheHandleBBox=null,n.onHovering=function(t){var e=n.attributes,r=e.data,o=e.block;t.stopPropagation();var i=n.getValueByCanvasPoint(t);if(o){var a=os(r.map(function(t){return t.value}),i).range,s=n.getRealSelection(a);n.showIndicator((a[0]+a[1])/2,"".concat(s[0],"-").concat(s[1])),n.dispatchIndicated(i,a)}else{var c=n.getTickValue(i);n.showIndicator(c,"".concat(n.getRealValue(c))),n.dispatchIndicated(c)}},n.onDragStart=function(t){return function(e){e.stopPropagation(),n.attributes.slidable&&(n.target=t,n.prevValue=n.getTickValue(n.getValueByCanvasPoint(e)),document.addEventListener("mousemove",n.onDragging),document.addEventListener("touchmove",n.onDragging),document.addEventListener("mouseleave",n.onDragEnd),document.addEventListener("mouseup",n.onDragEnd),document.addEventListener("mouseup",n.onDragEnd),document.addEventListener("touchend",n.onDragEnd))}},n.onDragging=function(t){var e=n.target;n.updateMouse();var r=(0,pn.zs)(n.selection,2),o=r[0],i=r[1],a=n.getTickValue(n.getValueByCanvasPoint(t)),s=a-n.prevValue;"start"===e?o!==a&&n.updateSelection(a,i):"end"===e?i!==a&&n.updateSelection(o,a):"ribbon"===e&&0!==s&&(n.prevValue=a,n.updateSelection(s,s,!0))},n.onDragEnd=function(){n.style.cursor="pointer",document.removeEventListener("mousemove",n.onDragging),document.removeEventListener("touchmove",n.onDragging),document.removeEventListener("mouseup",n.onDragEnd),document.removeEventListener("touchend",n.onDragEnd)},n}return(0,pn.C6)(e,t),Object.defineProperty(e.prototype,"handleOffsetRatio",{get:function(){return this.ifHorizontal(.5,.5)},enumerable:!1,configurable:!0}),e.prototype.getBBox=function(){var t=this.attributes;return new hi(0,0,t.width,t.height)},e.prototype.render=function(t,e){var n=this,r=t.classNamePrefix;r?e.attr("className","".concat(e.className||"legend-continuous"," ").concat(r,"legend")):e.className||e.attr("className","legend-continuous");var o=t.showLabel;this.renderTitle(zn(e));var i=this.availableSpace,a=i.x,s=i.y,c=zn(e).maybeAppendByClassName(rs.contentGroup,"g").styles({transform:"translate(".concat(a,", ").concat(s,")")});En(!!o,c.maybeAppendByClassName(rs.labelGroup,"g").styles({zIndex:1}),function(t){n.renderLabel(t)});var l=c.maybeAppendByClassName(rs.ribbonGroup,"g").styles({zIndex:0});this.handlesGroup=c.maybeAppendByClassName(rs.handlesGroup,"g").styles({zIndex:2}),this.renderHandles(),this.renderRibbon(l),this.renderIndicator(c),this.adjustLabel(),this.adjustHandles()},Object.defineProperty(e.prototype,"range",{get:function(){var t=this.attributes,e=t.domain;return e?{min:e[0],max:e[1]}:function(t){return{min:Math.min.apply(Math,(0,pn.fX)([],(0,pn.zs)(t.map(function(t){return t.value})),!1)),max:Math.max.apply(Math,(0,pn.fX)([],(0,pn.zs)(t.map(function(t){return t.value})),!1))}}(t.data)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ribbonScale",{get:function(){var t=this.range;return this.innerRibbonScale.update({domain:[t.min,t.max],range:[0,1]}),this.innerRibbonScale},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ribbonRange",{get:function(){var t=(0,pn.zs)(this.selection,2),e=t[1],n=this.ribbonScale;return[n.map(t[0]),n.map(e)]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"selection",{get:function(){var t=this.range,e=this.attributes.defaultValue,n=(0,pn.zs)(void 0===e?[t.min,t.max]:e,2);return[n[0],n[1]]},enumerable:!1,configurable:!0}),e.prototype.ifHorizontal=function(t,e){return Ua(this.attributes.orientation,"function"==typeof t?t():t,"function"==typeof e?e():e)},e.prototype.renderTitle=function(t){var e=this.attributes,n=e.showTitle,r=e.titleText,o=e.width,i=e.height,a=e.classNamePrefix,s=fr(this.attributes,"title"),c=(0,pn.Cl)((0,pn.Cl)({},s),{width:o,height:i,text:r,classNamePrefix:a}),l=this;t.selectAll(rs.title.class).data(n?[r]:[]).join(function(t){return t.append(function(){return new $a({style:c})}).attr("className",rs.title.name).each(function(){l.title=this})},function(t){return t.update(c)},function(t){return t.each(function(){l.title=void 0}).remove()})},Object.defineProperty(e.prototype,"availableSpace",{get:function(){if(this.title)return this.title.getAvailableSpace();var t=this.attributes;return new hi(0,0,t.width,t.height)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"labelFixedSpacing",{get:function(){return this.attributes.showTick?5:0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"labelPosition",{get:function(){var t=this.attributes;return{vertical:{positive:"right",negative:"left"},horizontal:{positive:"bottom",negative:"top"}}[t.orientation][t.labelDirection]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"labelBBox",{get:function(){var t;if(!this.attributes.showLabel)return new hi(0,0,0,0);if(this.cacheLabelBBox)return this.cacheLabelBBox;var e=(null===(t=this.label.querySelector(Zn.labelGroup.class))||void 0===t?void 0:t.children.slice(-1)[0]).getBBox();return this.cacheLabelBBox=new hi(0,0,e.width,e.height),this.cacheLabelBBox},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"labelShape",{get:function(){var t=this.attributes,e=t.labelSpacing,n=void 0===e?0:e;if(!t.showLabel)return{width:0,height:0,size:0,length:0};var r=this.labelBBox,o=r.width,i=r.height;return{width:o,height:i,size:this.ifHorizontal(i,o)+n+this.labelFixedSpacing,length:this.ifHorizontal(o,i)}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ribbonBBox",{get:function(){var t=this.attributes,e=t.showHandle,n=t.ribbonSize,r=this.availableSpace,o=r.width,i=r.height,a=this.labelShape,s=a.size,c=a.length,l=(0,pn.zs)(this.ifHorizontal([i,o],[o,i]),2),u=l[0],f=l[1],d=e?this.handleShape:{size:0,length:0},p=d.size,h=d.length,g=this.handleOffsetRatio,m=0,y=this.labelPosition;m=n||(["bottom","right"].includes(y)?Math.min(u-s,(u-p)/g):u*(1-g)>p?Math.max(u-s,0):Math.max((u-s-p)/g,0));var b=Math.max(h,c),v=f-b,x=(0,pn.zs)(this.ifHorizontal([v,m],[m,v]),2),O=x[0],w=x[1],j=["top","left"].includes(y)?s:0,k=(0,pn.zs)(this.ifHorizontal([b/2,j],[j,b/2]),2);return new hi(k[0],k[1],O,w)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ribbonShape",{get:function(){var t=this.ribbonBBox,e=t.width,n=t.height;return this.ifHorizontal({size:n,length:e},{size:e,length:n})},enumerable:!1,configurable:!0}),e.prototype.renderRibbon=function(t){var e=this.attributes,n=e.data,r=e.type,o=e.orientation,i=e.color,a=e.block,s=e.classNamePrefix,c=fr(this.attributes,"ribbon"),l=this.range,u=l.min,f=l.max,d=this.ribbonBBox,p=d.y,h=this.ribbonShape,g=h.length,m=h.size,y=kn({transform:"translate(".concat(d.x,", ").concat(p,")"),length:g,size:m,type:r,orientation:o,color:i,block:a,partition:n.map(function(t){return(t.value-u)/(f-u)}),range:this.ribbonRange,classNamePrefix:s},c),b=Oa(rs.ribbon.name,Ea,s);this.ribbon=t.maybeAppendByClassName(rs.ribbon,function(){return new fs({style:y,className:b})}).update(y)},e.prototype.getHandleClassName=function(t){return"".concat(rs.prefix("".concat(t,"-handle")))},e.prototype.renderHandles=function(){var t=this.attributes,e=t.showHandle,n=t.orientation,r=t.classNamePrefix,o=fr(this.attributes,"handle"),i=(0,pn.zs)(this.selection,2),a=i[0],s=i[1],c=(0,pn.Cl)((0,pn.Cl)({},o),{orientation:n,classNamePrefix:r}),l=o.shape,u="basic"===(void 0===l?"slider":l)?Qa:xa,f=this,d=Oa(rs.handle.name,Ca,r);this.handlesGroup.selectAll(rs.handle.class).data(e?[{value:a,type:"start"},{value:s,type:"end"}]:[],function(t){return t.type}).join(function(t){return t.append(function(){return new u({style:c,className:d})}).attr("className",function(t){var e=t.type;return"".concat(d," ").concat(f.getHandleClassName(e))}).each(function(t){var e=t.type;this.update({labelText:t.value});var n="".concat(e,"Handle");f[n]=this,this.addEventListener("pointerdown",f.onDragStart(e))})},function(t){return t.update(c).each(function(t){this.update({labelText:t.value})})},function(t){return t.each(function(t){var e="".concat(t.type,"Handle");f[e]=void 0}).remove()})},e.prototype.adjustHandles=function(){var t=(0,pn.zs)(this.selection,2),e=t[1];this.setHandlePosition("start",t[0]),this.setHandlePosition("end",e);var n=this.attributes,r=n.classNamePrefix,o=n.showHandle,i=fr(this.attributes,"handle").shape;o&&"slider"===(void 0===i?"slider":i)&&r&&(this.startHandle&&this.updateSliderHandleClassNames(this.startHandle,r),this.endHandle&&this.updateSliderHandleClassNames(this.endHandle,r))},e.prototype.updateSliderHandleClassNames=function(t,e){var n=t.container||t,r=n.querySelector(".handle-icon-rect");if(r){var o=Oa("handle-icon-rect",za,e);r.setAttribute("class",o),r.querySelectorAll("line").forEach(function(t){var n=Oa((t.getAttribute("class")||"").split(" ")[0],za,e);t.setAttribute("class",n)})}var i=n.querySelector(".handle-label");if(i){var a=Oa("handle-label",Ta,e);i.setAttribute("class",a)}},Object.defineProperty(e.prototype,"handleBBox",{get:function(){if(this.cacheHandleBBox)return this.cacheHandleBBox;if(!this.attributes.showHandle)return new hi(0,0,0,0);var t=this.startHandle.getBBox(),e=t.width,n=t.height,r=this.endHandle.getBBox(),o=r.height,i=(0,pn.zs)([Math.max(e,r.width),Math.max(n,o)],2);return this.cacheHandleBBox=new hi(0,0,i[0],i[1]),this.cacheHandleBBox},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"handleShape",{get:function(){var t=this.handleBBox,e=t.width,n=t.height,r=(0,pn.zs)(this.ifHorizontal([n,e],[e,n]),2);return{width:e,height:n,size:r[0],length:r[1]}},enumerable:!1,configurable:!0}),e.prototype.setHandlePosition=function(t,e){var n=this.attributes.handleFormatter,r=this.ribbonBBox,o=r.x,i=r.y,a=this.ribbonShape.size,s=this.getOffset(e),c=(0,pn.zs)(this.ifHorizontal([o+s,i+a*this.handleOffsetRatio],[o+a*this.handleOffsetRatio,i+s]),2),l=c[0],u=c[1],f=this.handlesGroup.select(".".concat(this.getHandleClassName(t))).node();null==f||f.update({transform:"translate(".concat(l,", ").concat(u,")"),formatter:n})},e.prototype.renderIndicator=function(t){var e=this.attributes.classNamePrefix,n=fr(this.attributes,"indicator"),r=Oa(rs.indicator.name,Ba,e);this.indicator=t.maybeAppendByClassName(rs.indicator,function(){return new pa({style:n,className:r})}).update(n)},Object.defineProperty(e.prototype,"labelData",{get:function(){var t=this;return this.attributes.data.reduce(function(e,n,r,o){var i,a,s=null!==(i=null==n?void 0:n.id)&&void 0!==i?i:r.toString();if(e.push((0,pn.Cl)((0,pn.Cl)({},n),{id:s,index:r,type:"value",label:null!==(a=null==n?void 0:n.label)&&void 0!==a?a:n.value.toString(),value:t.ribbonScale.map(n.value)})),r<o.length-1){var c=(0,pn.zs)([n.value,o[r+1].value],2),l=c[0],u=c[1],f=(l+u)/2;e.push((0,pn.Cl)((0,pn.Cl)({},n),{id:s,index:r,type:"range",range:[l,u],label:[l,u].join("~"),value:t.ribbonScale.map(f)}))}return e},[])},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"labelStyle",{get:function(){var t=(0,pn.zs)(["center","middle"],2),e=t[0],n=t[1],r=this.labelPosition;return"top"===r?n="bottom":"bottom"===r?n="top":"left"===r?e="end":"right"===r&&(e="start"),{labelTextAlign:e,labelTextBaseline:n}},enumerable:!1,configurable:!0}),e.prototype.renderLabel=function(t){var e=this.attributes,n=e.showTick,r=void 0!==n&&n,o=e.labelFilter,i=e.labelFormatter,a=fr(this.attributes,"tick"),s=fr(this.attributes,"label"),c=s.align,l=kn((0,pn.Cl)({showLine:!1,showGrid:!1,showTick:r,type:"linear",startPos:[0,0],endPos:[0,0],tickDirection:"negative",labelTransform:"rotate(0)"},this.labelStyle),dr(a,"tick"),dr(s,"label"),{data:this.labelData}),u={tickFilter:function(t,e,n){return"value"===(null==t?void 0:t.type)&&(!o||o(t,t.index,n.filter(function(t){return"value"!==t.type})))},labelFilter:function(t,e,n){return(null==t?void 0:t.type)===c&&(!o||o(t,t.index,n.filter(function(t){return t.type===c})))},labelFormatter:i},f=(0,pn.Cl)((0,pn.Cl)((0,pn.Cl)({},l),u),{labelOverlap:[{type:"hide"}]});this.label=t.maybeAppendByClassName(rs.label,function(){return new Wo({style:f})}).node(),this.label.update(f,!1)},Object.defineProperty(e.prototype,"labelAxisStyle",{get:function(){var t=this.attributes,e=t.showTick,n=t.labelDirection,r=t.labelSpacing,o=t.tickLength,i=this.ribbonShape.size,a=this.labelPosition,s=this.labelFixedSpacing,c=(0,pn.zs)([0,0,0],3),l=c[0],u=c[1],f=c[2],d=null!=o?o:i;return e?(f=d,u=s,"positive"===n?"right"===a?(l=d,f=d):"bottom"===a&&(l=f):"negative"===n&&("top"===a||"left"===a)&&(l=i)):"positive"===n?"right"===a?u=d:"bottom"===a&&(l=i+s,u=r):"negative"===n&&("left"===a||"top"===a)&&(u=r),{offset:l,spacing:u,tickLength:f}},enumerable:!1,configurable:!0}),e.prototype.adjustLabel=function(){if(this.attributes.showLabel){var t=this.ribbonBBox,e=t.x,n=t.y,r=this.labelAxisStyle,o=r.offset,i=r.spacing,a=r.tickLength,s=(0,pn.zs)(this.ifHorizontal([[e,n+o],[e+t.width,n+o]],[[e+o,n+t.height],[e+o,n]]),2);this.label.update({startPos:s[0],endPos:s[1],tickLength:a,labelSpacing:i},!1)}},e.prototype.bindEvents=function(){this.style.cursor="pointer",this.ribbon.on("pointerdown",this.onDragStart("ribbon")),this.ribbon.on("pointermove",this.onHovering),this.addEventListener("pointerout",this.hideIndicator)},e.prototype.showIndicator=function(t,e){if(void 0===e&&(e="".concat(t)),this.attributes.showIndicator&&"number"==typeof t){var n=this.range,r=this.ribbonBBox,o=r.x,i=r.y,a=(0,ca.A)(t,n.min,n.max),s=this.getOffset(a),c=this.ifHorizontal([s+o,i],[o,s+i]);this.indicator.update({x:c[0],y:c[1],position:this.ifHorizontal("top","left"),labelText:e}),gn(this.indicator.node())}else this.hideIndicator()},e.prototype.hideIndicator=function(){mn(this.indicator.node())},e.prototype.updateMouse=function(){this.attributes.slidable&&(this.style.cursor="grabbing")},e.prototype.setSelection=function(t,e){this.updateSelection(t,e)},e.prototype.updateSelection=function(t,e,n){var r;void 0===n&&(n=!1);var o=(0,pn.zs)(this.selection,2),i=o[0],a=o[1],s=(0,pn.zs)([t,e],2),c=s[0],l=s[1];n&&(c+=i,l+=a);var u=this.range;r=(0,pn.zs)(function(t,e,n,r){var o;void 0===r&&(r=4);var i=(0,pn.zs)(t,2),a=i[0],s=i[1],c=(0,pn.zs)(e,2),l=c[0],u=c[1],f=(0,pn.zs)(n,2),d=f[0],p=f[1],h=(0,pn.zs)([l,u],2),g=h[0],m=h[1],y=m-g;return g>m&&(g=(o=(0,pn.zs)([m,g],2))[0],m=o[1]),y>s-a?[a,s]:g<a?d===a&&p===m?[a,m]:[a,y+a]:m>s?p===s&&d===g?[g,s]:[s-y,s]:[g,m]}([u.min,u.max],[c,l],this.selection),2),this.update({defaultValue:[c=r[0],l=r[1]]}),this.dispatchSelection()},Object.defineProperty(e.prototype,"step",{get:function(){var t=this.attributes.step,e=void 0===t?1:t,n=this.range,r=n.min,o=n.max;return(0,ei.A)(e)?la(.01*(o-r),0):e},enumerable:!1,configurable:!0}),e.prototype.getTickValue=function(t){var e=this.attributes,n=this.range.min;return e.block?os(e.data.map(function(t){return t.value}),t).tick:function(t,e,n){return n+Math.round((t-n)/e)*e}(t,this.step,n)},e.prototype.getValueByCanvasPoint=function(t){var e=this.range,n=e.min,r=e.max,o=(0,pn.zs)(this.ribbon.node().getPosition(),2),i=this.ifHorizontal(o[0],o[1]),a=this.ifHorizontal.apply(this,(0,pn.fX)([],(0,pn.zs)(ua(t)),!1));return(0,ca.A)(this.getOffset(a-i,!0),n,r)},e.prototype.getOffset=function(t,e){void 0===e&&(e=!1);var n=this.range,r=this.eventToOffsetScale;return r.update({domain:[n.min,n.max],range:[0,this.ribbonShape.length]}),e?r.invert(t):r.map(t)},e.prototype.getRealSelection=function(t){var e=this.range.max,n=(0,pn.zs)(t,2),r=n[0],o=n[1];return this.ifHorizontal([r,o],[e-o,e-r])},e.prototype.getRealValue=function(t){return this.ifHorizontal(t,this.range.max-t)},e.prototype.dispatchSelection=function(){var t=this.getRealSelection(this.selection),e=new l.up("valuechange",{detail:{value:t}});this.dispatchEvent(e)},e.prototype.dispatchIndicated=function(t,e){var n=this,r=this.range.max,o=this.ifHorizontal(function(){return{value:t,range:e}},function(){return{value:r-t,range:e?n.getRealSelection(e):void 0}}),i=new l.up("indicate",{detail:o});this.dispatchEvent(i)},e}(Sn);class ps extends Y{getDefaultOptions(){return{domain:[.5],range:[0,1]}}constructor(t){super(t)}map(t){if(!ri(t))return this.options.unknown;const e=Go(this.thresholds,t,0,this.n);return this.options.range[e]}invert(t){const{range:e}=this.options,n=e.indexOf(t),r=this.thresholds;return[r[n-1],r[n]]}clone(){return new ps(this.options)}rescale(){const{domain:t,range:e}=this.options;this.n=Math.min(t.length,e.length-1),this.thresholds=t}}function hs(t){return(0,R.A)(t)?0:$e(t)?t.length:Object.keys(t).length}const gs=function(t,e){if(!$e(t))return-1;var n=Array.prototype.indexOf;if(n)return n.call(t,e);for(var r=-1,o=0;o<t.length;o++)if(t[o]===e){r=o;break}return r};function ms(t){return Math.abs(t)<1e-14?t:parseFloat(t.toFixed(14))}const ys=[1,5,2,2.5,4,3],bs=100*Number.EPSILON;function vs(t,e,n,r,o,i){const a=hs(e),s=gs(e,t);let c=0;const l=function(t,e){return(t%e+e)%e}(r,i);return(l<bs||i-l<bs)&&r<=0&&o>=0&&(c=1),1-s/(a-1)-n+c}function xs(t,e,n){const r=hs(e);return 1-gs(e,t)/(r-1)-n+1}function Os(t,e,n,r,o,i){const a=(t-1)/(i-o),s=(e-1)/(Math.max(i,r)-Math.min(n,o));return 2-Math.max(a/s,s/a)}function ws(t,e){return t>=e?2-(t-1)/(e-1):1}function js(t,e,n,r){return 1-.5*((e-r)**2+(t-n)**2)/(.1*(e-t))**2}function ks(t,e,n){const r=e-t;if(n>r){return 1-((n-r)/2)**2/(.1*r)**2}return 1}function As(){return 1}const Ms=(t,e,n=5,r=!0,o=ys,i=[.25,.2,.5,.05])=>{const a=n<0?0:Math.round(n);if(Number.isNaN(t)||Number.isNaN(e)||"number"!=typeof t||"number"!=typeof e||!a)return[];if(e-t<1e-15||1===a)return[t];const s={score:-2,lmin:0,lmax:0,lstep:0};let c=1;for(;c<1/0;){for(let n=0;n<o.length;n+=1){const l=o[n],u=xs(l,o,c);if(i[0]*u+i[1]+i[2]+i[3]<s.score){c=1/0;break}let f=2;for(;f<1/0;){const n=ws(f,a);if(i[0]*u+i[1]+i[2]*n+i[3]<s.score)break;let d=Math.ceil(Math.log10((e-t)/(f+1)/c/l));for(;d<1/0;){const p=c*l*10**d,h=ks(t,e,p*(f-1));if(i[0]*u+i[1]*h+i[2]*n+i[3]<s.score)break;const g=Math.floor(e/p)*c-(f-1)*c,m=Math.ceil(t/p)*c;if(g<=m){const n=m-g;for(let u=0;u<=n;u+=1){const n=(g+u)*(p/c),d=n+p*(f-1),h=p,m=vs(l,o,c,n,d,h),y=js(t,e,n,d),b=Os(f,a,t,e,n,d),v=As(),x=i[0]*m+i[1]*y+i[2]*b+i[3]*v;x>s.score&&(!r||n<=t&&d>=e)&&(s.lmin=n,s.lmax=d,s.lstep=h,s.score=x)}}d+=1}f+=1}}c+=1}const l=ms(s.lmax),u=ms(s.lmin),f=ms(s.lstep),d=Math.floor(function(t){return Math.round(1e12*t)/1e12}((l-u)/f))+1,p=new Array(d);p[0]=ms(u);for(let t=1;t<d;t+=1)p[t]=ms(p[t-1]+f);return p};class _s extends ps{getDefaultOptions(){return{domain:[0,1],range:[.5],nice:!1,tickCount:5,tickMethod:Ms}}constructor(t){super(t)}nice(){const{nice:t}=this.options;if(t){const[t,e,n]=this.getTickMethodOptions();this.options.domain=oi(t,e,n)}}getTicks(){const{tickMethod:t}=this.options,[e,n,r]=this.getTickMethodOptions();return t(e,n,r)}getTickMethodOptions(){const{domain:t,tickCount:e}=this.options;return[t[0],t[t.length-1],e]}rescale(){this.nice();const{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){const[e,n]=super.invert(t),[r,o]=this.options.domain;return void 0===e&&void 0===n?[e,n]:[e||r,n||o]}getThresholds(){return this.thresholds}clone(){return new _s(this.options)}}function Ss(t,e){const n=t.length;if(!n)return;if(n<2)return t[n-1];const r=(n-1)*e,o=Math.floor(r),i=t[o];return i+(t[o+1]-i)*(r-o)}class Es extends ps{getDefaultOptions(){return{domain:[],range:[],tickCount:5,unknown:void 0,tickMethod:Ms}}constructor(t){super(t)}rescale(){const{domain:t,range:e}=this.options;this.n=e.length-1,this.thresholds=function(t,e,n=!1){const r=t;n||r.sort((t,e)=>t-e);const o=[];for(let t=1;t<e;t+=1)o.push(Ss(r,t/e));return o}(t,this.n+1,!1)}invert(t){const[e,n]=super.invert(t),{domain:r}=this.options;return void 0===e&&void 0===n?[e,n]:[e||r[0],n||r[r.length-1]]}getThresholds(){return this.thresholds}clone(){return new Es(this.options)}getTicks(){const{tickCount:t,domain:e,tickMethod:n}=this.options;return n(e[0],e[e.length-1],t)}}var Ps=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};function Ls(t,e,n,r,o){const i=e.thresholds,a=function(t){return e=>({value:e/t,label:String(e),domainValue:e})}(r);return Object.assign(Object.assign({},t),{color:o,data:[n,...i,r].map(a)})}function Cs(t){const{domain:e}=t.getOptions(),[n,r]=[e[0],Ne(e)];return[n,r]}function zs(t,e,n,r,o,i){const{length:a}=t,s=o.color?i.legendContinuous.ribbonFill||"black":i.color,c=e||function(t,e){const n=t.getOptions(),r=t.clone();return r.update(Object.assign(Object.assign({},n),{range:[(0,l.H0)(e).toString()]})),r}(n||r,s),[u,f]=Cs(c),[d,p]=Cs([e,n,r].filter(t=>void 0!==t).find(t=>!(t instanceof st)));return Object.assign(Object.assign({},t),{domain:[d,p],data:c.getTicks().map(t=>({value:t})),color:new Array(Math.floor(a)).fill(0).map((t,e)=>{const n=(f-u)/(a-1)*e+u,o=c.map(n)||s,i=r?r.map(n):1;return o.replace(/rgb[a]*\(([\d]{1,3}) *, *([\d]{1,3}) *, *([\d]{1,3})[\S\s]*\)/,(t,e,n,r)=>`rgba(${e}, ${n}, ${r}, ${i})`)})})}function Ts(t,e,n,r,o,i){const a=Ai(t,"color"),s=function(t,e,n){const{size:r}=e,o=_i(t,e,n);return function(t,e,n){return t.size=e,function(t){return"horizontal"===t||0===t}(n)?t.height=e:t.width=e,t}(o,r,o.orientation)}(n,r,o);if(a instanceof ps){const{range:t}=a.getOptions(),[e,n]=Cs(a);return a instanceof _s||a instanceof Es?Ls(s,a,e,n,t):function(t,e,n){const r=[-1/0,...e.thresholds,1/0].map((t,e)=>({value:e,domainValue:t,label:t}));return Object.assign(Object.assign({},t),{data:r,color:n,labelFilter:(t,e)=>e>0&&e<r.length-1})}(s,a,t)}return zs(s,a,Ai(t,"size"),Ai(t,"opacity"),e,i)}const Bs=t=>{const{labelFormatter:e,layout:n,position:r,title:o,style:i}=t,a=Ps(t,["labelFormatter","layout","order","orientation","position","size","title","style","crossPadding","padding"]);return({scales:s,value:c,theme:l,scale:u})=>{const{bbox:f}=c,{x:d,y:p,width:h,height:g}=f,m=wi(r,n),{legendContinuous:y={}}=l,b=Si(Object.assign({},y,Object.assign(Object.assign(Object.assign({titleText:Oi(o),labelAlign:"value",labelFormatter:"string"==typeof e?t=>(0,ze.GP)(e)(t.label):e},Ts(s,u,c,t,Bs,l)),i),{classNamePrefix:"g2-"}),a)),v=new ji({style:Object.assign(Object.assign({x:d,y:p,width:h,height:g},m),{subOptions:b})});return v.appendChild(new ds({className:"legend-continuous",style:b})),v}};Bs.props={defaultPosition:"top",defaultOrientation:"vertical",defaultOrder:1,defaultSize:60,defaultLength:200,defaultLegendSize:60,defaultPadding:[20,10],defaultCrossPadding:[12,12]};const Is=t=>(...e)=>Bs(Object.assign({},{block:!0},t))(...e);Is.props=Object.assign(Object.assign({},Bs.props),{defaultPosition:"top",defaultOrientation:"horizontal"});const Ns=t=>e=>{const{scales:n}=e,r=Ai(n,"size");return Bs(Object.assign({},{type:"size",data:r.getTicks().map((t,e)=>({value:t,label:String(t)}))},t))(e)};Ns.props=Object.assign(Object.assign({},Bs.props),{defaultPosition:"top",defaultOrientation:"horizontal"});const Rs=t=>Ns(Object.assign({},{block:!0},t));Rs.props=Object.assign(Object.assign({},Bs.props),{defaultPosition:"top",defaultOrientation:"horizontal"});var Fs=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const Ds=({static:t=!1}={})=>e=>{const{width:n,height:r,depth:o,paddingLeft:i,paddingRight:a,paddingTop:s,paddingBottom:c,padding:l,inset:u,insetLeft:f,insetTop:d,insetRight:p,insetBottom:h,margin:g,marginLeft:m,marginBottom:y,marginTop:b,marginRight:v,data:x,coordinate:O,theme:w,component:j,interaction:k,x:A,y:M,z:_,key:S,frame:E,labelTransform:P,parentKey:L,clip:C,viewStyle:z,title:T}=e,B=Fs(e,["width","height","depth","paddingLeft","paddingRight","paddingTop","paddingBottom","padding","inset","insetLeft","insetTop","insetRight","insetBottom","margin","marginLeft","marginBottom","marginTop","marginRight","data","coordinate","theme","component","interaction","x","y","z","key","frame","labelTransform","parentKey","clip","viewStyle","title"]);return[Object.assign(Object.assign({type:"standardView",x:A,y:M,z:_,key:S,width:n,height:r,depth:o,padding:l,paddingLeft:i,paddingRight:a,paddingTop:s,inset:u,insetLeft:f,insetTop:d,insetRight:p,insetBottom:h,paddingBottom:c,theme:w,coordinate:O,component:j,interaction:k,frame:E,labelTransform:P,margin:g,marginLeft:m,marginBottom:y,marginTop:b,marginRight:v,parentKey:L,clip:C,style:z},!t&&{title:T}),{marks:[Object.assign(Object.assign(Object.assign({},B),{key:`${S}-0`,data:x}),t&&{title:T})]})]};Ds.props={};var $s=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};function Ws(t){return(e,...n)=>(0,N.A)({},t(e,...n),e)}function Hs(t){return(e,...n)=>(0,N.A)({},e,t(e,...n))}function qs(t,e){if(!t)return e;if(Array.isArray(t))return t;if(function(t){return!(t instanceof Date)&&"object"==typeof t}(t)){const{value:n=e}=t,r=$s(t,["value"]);return Object.assign(Object.assign({},r),{value:n})}return t}var Ys=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const Xs=()=>t=>{const{children:e}=t,n=Ys(t,["children"]);if(!Array.isArray(e))return[];const{data:r,scale:o={},axis:i={},legend:a={},encode:s={},transform:c=[],slider:l={}}=n,u=Ys(n,["data","scale","axis","legend","encode","transform","slider"]),f=e.map(t=>{var{data:e,scale:n={},axis:u={},legend:f={},encode:d={},transform:p=[],slider:h={}}=t,g=Ys(t,["data","scale","axis","legend","encode","transform","slider"]);return Object.assign({data:qs(e,r),scale:(0,N.A)({},o,n),encode:(0,N.A)({},s,d),transform:[...c,...p],axis:!(!u||!i)&&(0,N.A)({},i,u),legend:!(!f||!a)&&(0,N.A)({},a,f),slider:(0,N.A)({},l,h)},g)});return[Object.assign(Object.assign({},u),{marks:f,type:"standardView",slider:l})]};function Gs([t,e],[n,r]){return[t-n,e-r]}function Vs([t,e],[n,r]){return[t+n,e+r]}function Ks([t,e],[n,r]){return Math.sqrt(Math.pow(t-n,2)+Math.pow(e-r,2))}function Us([t,e]){return Math.atan2(e,t)}function Zs([t,e]){return Us([t,e])+Math.PI/2}function Js(t,e){const n=Us(t),r=Us(e);return n<r?r-n:2*Math.PI-(n-r)}function Qs(t){let e=1/0,n=-1/0,r=1/0,o=-1/0;for(const[i,a]of t)e=Math.min(i,e),n=Math.max(i,n),r=Math.min(a,r),o=Math.max(a,o);return[e,r,n-e,o-r]}function tc([t,e],[n,r]){return[(t+n)/2,(e+r)/2]}function ec(t,e){for(const[n,r]of Object.entries(e))t.style(n,r)}function nc(t,e,n,r,o){const i=Us(Gs(r,e))+Math.PI,a=Us(Gs(r,n))+Math.PI;return t.arc(r[0],r[1],o,i,a,a-i<0),t}function rc(t,e,n,r="y",o="between",i=!1){const a="y"===r||!0===r?n:e,s=((t,e)=>"y"===t||!0===t?e?180:90:e?90:0)(r,i),c=Be(a),[l,u]=pi(c,t=>a[t]),f=new li({domain:[l,u],range:[0,100]}),d=t=>(0,tt.A)(a[t])&&!Number.isNaN(a[t])?f.map(a[t]):0,p={between:e=>`${t[e]} ${d(e)}%`,start:e=>0===e?`${t[e]} ${d(e)}%`:`${t[e-1]} ${d(e)}%, ${t[e]} ${d(e)}%`,end:e=>e===t.length-1?`${t[e]} ${d(e)}%`:`${t[e]} ${d(e)}%, ${t[e+1]} ${d(e)}%`},h=c.sort((t,e)=>d(t)-d(e)).map(p[o]||p.between).join(",");return`linear-gradient(${s}deg, ${h})`}function oc(t){const[e,n,r,o]=t;return[o,e,n,r]}function ic(t,e,n){const[r,o,,i]=nn(t)?oc(e):e,[a,s]=n,c=t.getCenter(),l=Zs(Gs(r,c)),u=Zs(Gs(o,c)),f=u===l&&a!==s?u+2*Math.PI:u,d=1e-4;return{startAngle:l+d,endAngle:(f-l>=0?f:2*Math.PI+f)-d,innerRadius:Ks(i,c),outerRadius:Ks(r,c)}}function ac(t){const{colorAttribute:e,opacityAttribute:n=e}=t;return`${n}Opacity`}function sc(t,e){if(!rn(t))return"";const n=t.getCenter(),{transform:r}=e;return`translate(${n[0]}, ${n[1]}) ${r||""}`}function cc(t){if(1===t.length)return t[0];const[[e,n,r=0],[o,i,a=0]]=t;return[(e+o)/2,(n+i)/2,(r+a)/2]}function lc(t){return t.replace(/-(\w)/g,function(t,e){return e.toUpperCase()})}Xs.props={};var uc=n("./node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/line.js");function fc(t){const e="function"==typeof t?t:t.render;return class extends l.K9{connectedCallback(){this.draw()}attributeChangedCallback(){this.draw()}draw(){e(this)}}}var dc=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};function pc(t){const{min:[e,n],max:[r,o]}=t.getLocalBounds();let i=0,a=0;return e>0&&(i=e),r<0&&(i=r),n>0&&(a=n),o<0&&(a=o),[i,a]}const hc=fc(t=>{const e=t.attributes,{className:n,labelTransform:r,labelTransformOrigin:o,x:i,y:a,x0:s=i,y0:c=a,text:l,background:u,connector:f,startMarker:d,endMarker:p,coordCenter:h,innerHTML:g}=e,m=dc(e,["className","class","transform","rotate","labelTransform","labelTransformOrigin","x","y","x0","y0","text","background","connector","startMarker","endMarker","coordCenter","innerHTML"]);if(t.style.transform=`translate(${i}, ${a})`,[i,a,s,c].some(t=>!(0,tt.A)(t)))return void t.children.forEach(t=>t.remove());const y=xt(m,"background"),{padding:b}=y,v=dc(y,["padding"]),x=xt(m,"connector"),{points:O=[]}=x,w=dc(x,["points"]);let j;j=g?_t(t).maybeAppend("html","html",n).style("zIndex",0).style("innerHTML",g).call(ec,Object.assign({transform:r,transformOrigin:o},m)).node():_t(t).maybeAppend("text","text").style("zIndex",0).style("text",l).call(ec,Object.assign({textBaseline:"middle",transform:r,transformOrigin:o},m)).node();const k=_t(t).maybeAppend("background","rect").style("zIndex",-1).call(ec,function(t,e=[]){const[n=0,r=0,o=n,i=r]=e,a=t.parentNode,s=a.getEulerAngles();a.setEulerAngles(0);const{min:c,halfExtents:l}=t.getLocalBounds(),[u,f]=c,[d,p]=l;return a.setEulerAngles(s),{x:u-i,y:f-n,width:2*d+i+r,height:2*p+n+o}}(j,b)).call(ec,u?v:{}).node(),A=function(t,e,n,r,o=!0,i=!0){const a=t=>(0,uc.A)()(t);if(!e[0]&&!e[1])return a([pc(t),e]);if(!n.length)return a([[0,0],e]);const[s,c]=n,l=[...c],u=[...s];if(c[0]!==s[0]){const t=o?-4:4;l[1]=c[1],i&&!o&&(l[0]=Math.max(s[0],c[0]-t),c[1]<s[1]?u[1]=l[1]:(u[1]=s[1],u[0]=Math.max(u[0],l[0]-t))),i||o||(l[0]=Math.max(s[0],c[0]-t),c[1]>s[1]?u[1]=l[1]:(u[1]=s[1],u[0]=Math.max(u[0],l[0]-t))),!i&&o&&(l[0]=Math.min(s[0],c[0]-t),c[1]>s[1]?u[1]=l[1]:(u[1]=s[1],u[0]=Math.min(u[0],l[0]-t))),i&&o&&(l[0]=Math.min(s[0],c[0]-t),c[1]<s[1]?u[1]=l[1]:(u[1]=s[1],u[0]=Math.min(u[0],l[0]-t)))}return a([c,l,u,s,e])}(k,[+s-+i,+c-+a],O,0,+s<h[0],+c<h[1]),M=d&&new Ka({id:"startMarker",style:Object.assign({x:0,y:0},xt(m,"startMarker"))}),_=p&&new Ka({id:"endMarker",style:Object.assign({x:0,y:0},xt(m,"endMarker"))});_t(t).maybeAppend("connector","path").style("zIndex",0).style("d",A).style("markerStart",M).style("markerEnd",_).call(ec,f?w:{})});function gc(t,e){let n,r=-1,o=-1;if(void 0===e)for(const e of t)++o,null!=e&&(n<e||void 0===n&&e>=e)&&(n=e,r=o);else for(let i of t)null!=(i=e(i,++o,t))&&(n<i||void 0===n&&i>=i)&&(n=i,r=o);return r}function mc(t,e,n,r){const o=e.length/2,i=e.slice(0,o),a=e.slice(o);let s=gc(i,(t,e)=>Math.abs(t[1]-a[e][1]));s=Math.max(Math.min(s,o-2),1);const c=t=>[i[t][0],(i[t][1]+a[t][1])/2],l=c(s),u=c(s-1),f=Us(Gs(c(s+1),u))/Math.PI*180;return{x:l[0],y:l[1],transform:`rotate(${f})`,textAlign:"center",textBaseline:"middle"}}function yc(t,e,n,r){const{bounds:o}=n,[[i,a],[s,c]]=o,l=s-i,u=c-a,f=t=>{const{x:e,y:r}=t,o=jt(n.x,l),s=jt(n.y,u);return Object.assign(Object.assign({},t),{x:(o||e)+i,y:(s||r)+a})};return f("left"===t?{x:0,y:u/2,textAlign:"start",textBaseline:"middle"}:"right"===t?{x:l,y:u/2,textAlign:"end",textBaseline:"middle"}:"top"===t?{x:l/2,y:0,textAlign:"center",textBaseline:"top"}:"bottom"===t?{x:l/2,y:u,textAlign:"center",textBaseline:"bottom"}:"top-left"===t?{x:0,y:0,textAlign:"start",textBaseline:"top"}:"top-right"===t?{x:l,y:0,textAlign:"end",textBaseline:"top"}:"bottom-left"===t?{x:0,y:u,textAlign:"start",textBaseline:"bottom"}:"bottom-right"===t?{x:l,y:u,textAlign:"end",textBaseline:"bottom"}:{x:l/2,y:u/2,textAlign:"center",textBaseline:"middle"})}function bc(t,e,n,r){const{y:o,y1:i,autoRotate:a,rotateToAlignArc:s}=n,c=r.getCenter(),l=ic(r,e,[o,i]),{innerRadius:u,outerRadius:f,startAngle:d,endAngle:p}=l,h="inside"===t?(d+p)/2:p,g=xc(h,a,s),m=(()=>{const[n,r]=e,o=u+.5*(f-u),[i,a]="inside"===t?vc(c,h,o):tc(n,r);return{x:i,y:a}})();return Object.assign(Object.assign({},m),{textAlign:"inside"===t?"center":"start",textBaseline:"middle",rotate:g})}function vc(t,e,n){return[t[0]+Math.sin(e)*n,t[1]-Math.cos(e)*n]}function xc(t,e,n){if(!e)return 0;const r=n?0:Math.sin(t)<0?90:-90;return t/Math.PI*180+r}function Oc(t,e,n,r){const{y:o,y1:i,autoRotate:a,rotateToAlignArc:s,radius:c=.5,offset:l=0}=n,u=ic(r,e,[o,i]),{startAngle:f,endAngle:d}=u,p=r.getCenter(),h=(f+d)/2,g={textAlign:"center",textBaseline:"middle",rotate:xc(h,a,s)},{innerRadius:m,outerRadius:y}=u,b=m+(y-m)*c+l,[v,x]=vc(p,h,b);return Object.assign({x:v,y:x},g)}function wc(t){return void 0===t?null:t}function jc(t,e,n,r){const{bounds:o}=n,[i]=o;return{x:wc(i[0]),y:wc(i[1])}}function kc(t,e,n,r){const{bounds:o}=n;if(1===o.length)return jc(0,0,n);return(on(r)?bc:ln(r)?Oc:yc)(t,e,n,r)}function Ac(t,e,n){const r=ic(n,t,[e.y,e.y1]),{innerRadius:o,outerRadius:i}=r;return o+(i-o)}function Mc(t,e,n){const r=ic(n,t,[e.y,e.y1]),{startAngle:o,endAngle:i}=r;return(o+i)/2}function _c(t,e,n,r){const{autoRotate:o,rotateToAlignArc:i,offset:a=0,connector:s=!0,connectorLength:c=a,connectorLength2:l=0,connectorDistance:u=0}=n,f=r.getCenter(),d=Mc(e,n,r),p=Math.sin(d)>0?1:-1,h=xc(d,o,i),g={textAlign:p>0||on(r)?"start":"end",textBaseline:"middle",rotate:h},m=Ac(e,n,r),y=m+(s?c:a),[[b,v],[x,O],[w,j]]=function(t,e,n,r,o){const[i,a]=vc(t,e,n),[s,c]=vc(t,e,r);return[[i,a],[s,c],[s+(Math.sin(e)>0?1:-1)*o,c]]}(f,d,m,y,s?l:0),k=s?+u*p:0,A=w+k,M={connector:s,connectorPoints:[[x-A,O-j],[w-A,j-j]]};return Object.assign(Object.assign({x0:b,y0:v,x:w+k,y:j},g),M)}function Sc(t,e,n,r){const{bounds:o}=n;if(1===o.length)return jc(0,0,n);return(on(r)?bc:ln(r)?_c:yc)(t,e,n,r)}var Ec=n("./node_modules/.pnpm/d3-array@3.2.4/node_modules/d3-array/src/ascending.js");function Pc(t,...e){if("function"!=typeof t[Symbol.iterator])throw new TypeError("values is not iterable");t=Array.from(t);let[n]=e;if(n&&2!==n.length||e.length>1){const r=Uint32Array.from(t,(t,e)=>e);return e.length>1?(e=e.map(e=>t.map(e)),r.sort((t,n)=>{for(const r of e){const e=Cc(r[t],r[n]);if(e)return e}})):(n=t.map(n),r.sort((t,e)=>Cc(n[t],n[e]))),function(t,e){return Array.from(e,e=>t[e])}(t,r)}return t.sort(Lc(n))}function Lc(t=Ec.A){if(t===Ec.A)return Cc;if("function"!=typeof t)throw new TypeError("compare is not a function");return(e,n)=>{const r=t(e,n);return r||0===r?r:(0===t(n,n))-(0===t(e,e))}}function Cc(t,e){return(null==t||!(t>=t))-(null==e||!(e>=e))||(t<e?-1:t>e?1:0)}function zc(t,e={}){const{labelHeight:n=14,height:r}=e,o=Pc(t,t=>t.y),i=o.length,a=new Array(i);for(let t=0;t<i;t++){const e=o[t],{y:r}=e;a[t]={y:r,y1:r+n,labels:[r]}}let s=!0;for(;s;){s=!1;for(let t=a.length-1;t>0;t--){const e=a[t],n=a[t-1];if(n.y1>e.y){s=!0,n.labels.push(...e.labels),a.splice(t,1),n.y1+=e.y1-e.y;const o=n.y1-n.y;n.y1=Math.max(Math.min(n.y1,r),o),n.y=n.y1-o}}}let c=0;for(const t of a){const{y:e,labels:r}=t;let i=e-n;for(const t of r){const e=o[c++];e.connectorPoints[0][1]-=i+n-t,e.y=i+n,i+=n}}}function Tc(t,e){const n=Pc(t,t=>t.y),{height:r,labelHeight:o=14}=e,i=Math.ceil(r/o);if(n.length<=i)return zc(n,e);const a=[];for(let t=0;t<n.length;t++)t<n.length-i?(n[t].opacity=0,n[t].connector=!1):a.push(n[t]);zc(a,e)}var Bc=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const Ic=new WeakMap;function Nc(t,e,n,r,o,i){if(!ln(r))return{};if(Ic.has(e))return Ic.get(e);const a=i.map(t=>function(t,e,n){const{connectorLength:r,connectorLength2:o,connectorDistance:i}=e,a=Bc(_c(0,t,e,n),[]),s=n.getCenter(),c=Ac(t,e,n),l=Mc(t,e,n),u=c+r+o,f=Math.sin(l)>0?1:-1,d=s[0]+(u+ +i)*f,{x:p}=a,h=d-p;return a.x+=h,a.connectorPoints[0][0]-=h,a}(t,n,r)),{width:s,height:c}=r.getOptions(),l=a.filter(t=>t.x<s/2),u=a.filter(t=>t.x>=s/2),f=Object.assign(Object.assign({},o),{height:c});return Tc(l,f),Tc(u,f),a.forEach((t,e)=>Ic.set(i[e],t)),Ic.get(e)}var Rc=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};function Fc(t,e,n,r){if(!ln(r))return{};const{connectorLength:o,connectorLength2:i,connectorDistance:a}=n,s=Rc(_c(0,e,n,r),[]),{x0:c,y0:l}=s,u=r.getCenter(),f=function(t){if(ln(t)){const[e,n]=t.getSize(),r=t.getOptions().transformations.find(t=>"polar"===t[0]);if(r)return Math.max(e,n)/2*r[4]}return 0}(r),d=f+o,p=Zs([c-u[0],l-u[1]]),h=Math.sin(p)>0?1:-1,[g,m]=vc(u,p,d);return s.x=g+(i+a)*h,s.y=m,s}var Dc=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};function $c(t,e,n,o,i,a){const{position:s}=e,{render:c}=i,l=function(t,e){return void 0!==t?t:ln(e)?"inside":nn(e)?"right":"top"}(s,n),u=o[c?"htmlLabel":"inside"===l?"innerLabel":"label"],f=Object.assign({},u,e),d=r[lc(l)];if(!d)throw new Error(`Unknown position: ${l}`);return Object.assign(Object.assign({},u),d(l,t,f,n,i,a))}const Wc=(t,e)=>{const{coordinate:n,theme:r}=e,{render:o}=t;return(e,i,a,s)=>{const{text:c,transform:l="",transformOrigin:u,className:f=""}=i,d=Dc(i,["text","x","y","transform","transformOrigin","className"]),p=$c(e,i,n,r,t,s),{rotate:h=0,transform:g=""}=p,m=Dc(p,["rotate","transform"]);return _t(new hc).call(ec,m).style("text",`${c}`).style("className",`${f} g2-label`).style("innerHTML",o?o(c,i.datum,i.index):void 0).style("labelTransform",`${g} rotate(${+h}) ${l}`.trim()).style("labelTransformOrigin",u).style("coordCenter",n.getCenter()).call(ec,d).node()}};Wc.props={defaultMarker:"point"};const Hc=function(t,e,n){var r=t,o=(0,j.A)(e)?e.split("."):e;return o.forEach(function(t,e){e<o.length-1?((0,ke.A)(r[t])||(r[t]=(0,tt.A)(o[e+1])?[]:{}),r=r[t]):r[t]=n}),t},qc="main-layer",Yc="label-layer",Xc="element",Gc="component",Vc="axis-breaks",Kc="axis-breaks-group";var Uc=function(t,e,n,r){return new(n||(n=Promise))(function(o,i){function a(t){try{c(r.next(t))}catch(t){i(t)}}function s(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){t.done?o(t.value):function(t){return t instanceof n?t:new n(function(e){e(t)})}(t.value).then(a,s)}c((r=r.apply(t,e||[])).next())})},Zc=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const Jc=.03,Qc={fill:"#fff",stroke:"#aaa",lineDash:"4 3",lineWidth:.5,fillOpacity:1,strokeOpacity:1},tl=(t,e,n,r,o,i)=>{const a=[],s=[],c=r-1;for(let r=1;r<c;r++){const l=r/c*e,u=t+(r%2==0?n:-n);a.push(`${l},${u}`),s.push(`${l},${o?u-i:u+i}`)}return a.push(`${e},${t}`),s.push(`${e+i},${t}`),[a,s]},el=(t,e)=>{const{context:n,selection:r,view:o}=e,i=r.select(".plot").node(),{document:a}=n.canvas,{scale:s}=o,c=new Map;return t=>{const{key:e,start:r,end:o,gap:u=Jc,vertices:f=50,lineWidth:d=.5,verticeOffset:p=3}=t,h=Zc(t,["key","start","end","gap","vertices","lineWidth","verticeOffset"]),g=a.createElement("g",{id:`break-group-${e}`,className:Kc}),m=k(s,"x.sortedDomain",[]),y=s.y.getOptions(),{range:b,domain:v}=y,x=v.indexOf(r),O=v.indexOf(o),{width:w,height:j}=i.getBBox();if(-1===x||-1===O||!m.length)return g;const A=b[0]>b[1],M=b[x]*j,_=b[O]*j;let S="",E="";for(const[t,{y:e,isLower:n}]of[{y:_,isLower:!1},{y:M,isLower:!0}].entries()){const r=A?d:-d,[o,i]=tl(e,w-0,p,f,n,r);0===t?(S=`M 0,${e} L ${o.join(" L ")} `,E=`M ${0-d},${e+r} L ${i.join(" L ")} `):(S+=`L ${w-0},${e} L ${[...o].reverse().join(" L ")} L 0,${e} Z`,E+=`L ${w-0+d+2},${e-r} L ${[...i].reverse().join(" L ")} L ${0-d},${e-r} Z`)}const P=Object.assign(Object.assign({},Qc),h);try{const t=new l.wA({style:Object.assign(Object.assign({},P),{d:S})}),a=new l.wA({style:Object.assign(Object.assign({},P),{d:E,lineWidth:0,cursor:"pointer"})});a.addEventListener("click",t=>Uc(void 0,void 0,void 0,function*(){t.stopPropagation(),2===t.detail&&(yield((t,e,r)=>Uc(void 0,void 0,void 0,function*(){const{update:o,setState:i}=n.externals;i("options",n=>{const{marks:o}=n;if(!o||!o.length)return n;const i=o.map(t=>{const n=k(t,"scale.y.breaks",[]),o=n.filter(t=>t.start!==e&&t.end!==r&&!t.collapsed);return n.forEach(t=>{t.start===e&&t.end===r&&(t.collapsed=!0)}),console.log("breaks group:",n,o),(0,N.A)({},t,{scale:{y:{breaks:o}}})});return c.set(t,{start:e,end:r}),Object.assign(Object.assign({},n),{marks:i})}),yield o()}))(e,r,o))})),g.appendChild(t),g.appendChild(a),i.addEventListener("click",t=>Uc(void 0,void 0,void 0,function*(){2===t.detail&&(yield Uc(void 0,void 0,void 0,function*(){if(!c.size)return;const{update:t,setState:e}=n.externals;e("options",t=>{const{marks:e}=t,n=e.map(t=>{const e=k(t,"scale.y.breaks",[]);return Hc(t,"scale.y.breaks",e.map(t=>Object.assign(Object.assign({},t),{collapsed:!1}))),t});return c.clear(),Object.assign(Object.assign({},t),{marks:n})}),yield t()}))})),i.appendChild(g)}catch(t){console.error("Failed to create break path:",t)}return g}};el.props={};var nl=n("./node_modules/.pnpm/d3-path@3.1.0/node_modules/d3-path/src/path.js"),rl=n("./node_modules/.pnpm/d3-array@3.2.4/node_modules/d3-array/src/bisector.js");const ol=function(t,e){if(!$e(t))return t;for(var n=[],r=0;r<t.length;r++){var o=t[r];e(o,r)&&n.push(o)}return n};var il=n("./node_modules/.pnpm/d3-array@3.2.4/node_modules/d3-array/src/bisect.js");function al(t){return!!t.getBandWidth}function sl(t,e,n){if(!al(t))return t.invert(e);const{adjustedRange:r}=t;if(r.includes(e))return t.invert(e);const{domain:o}=t.getOptions(),i=n?-1:0,a=t.getStep(),s=n?r:r.map(t=>t+a),c=function(t,e,n){return Math.min(n,Math.max(e,t))}((0,il.ah)(s,e)+i,0,o.length-1);return o[c]}function cl(t,e,n){if(!e)return t.getOptions().domain;if(!al(t)){const r=Pc(e);if(!n)return r;const[o]=r,{range:i}=t.getOptions(),[a,s]=i,c=a>s?-1:1;return[o,t.invert(t.map(o)+c*n)]}const{domain:r}=t.getOptions(),o=r.indexOf(e[0]);if(n){const t=o+Math.round(r.length*n);return r.slice(o,t)}const i=r.indexOf(e[e.length-1]);return r.slice(o,i+1)}function ll(t,e,n,r,o,i){const{x:a,y:s}=o,c=(t,e)=>{const[n,r]=i.invert(t);return[sl(a,n,e),sl(s,r,e)]},l=c([t,e],!0),u=c([n,r],!1);return[cl(a,[l[0],u[0]]),cl(s,[l[1],u[1]])]}function ul(t,e){const[n,r]=t;return[e.map(n),e.map(r)+(t=>t.getStep?t.getStep():0)(e)]}const fl=(t,e)=>{var n,r;const[o,i]=t,a=(null===(r=null===(n=e.getOptions)||void 0===n?void 0:n.call(e))||void 0===r?void 0:r.domain)||[],s=a.indexOf(o),c=a.indexOf(i);if(-1===s||-1===c)return[e.map(o),e.map(i)];const l=a.length;return l<=1?[0,1]:[s/(l-1),c/(l-1)]};var dl=n("./node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/arc.js"),pl=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};function hl(t,e,n,r,o={}){const{inset:i=0,radius:a=0,insetLeft:s=i,insetTop:c=i,insetRight:l=i,insetBottom:u=i,radiusBottomLeft:f=a,radiusBottomRight:d=a,radiusTopLeft:p=a,radiusTopRight:h=a,minWidth:g=-1/0,maxWidth:m=1/0,minHeight:y=-1/0}=o,b=pl(o,["inset","radius","insetLeft","insetTop","insetRight","insetBottom","radiusBottomLeft","radiusBottomRight","radiusTopLeft","radiusTopRight","minWidth","maxWidth","minHeight"]);if(!rn(r)&&!an(r)){const n=!!nn(r),[o,,i]=n?oc(e):e,[a,v]=o,[x,O]=Gs(i,o),w=(x>0?a:a+x)+s,j=(O>0?v:v+O)+c,k=Math.abs(x)-(s+l),A=Math.abs(O)-(c+u),M=n?Ue(k,y,1/0):Ue(k,g,m),_=n?Ue(A,g,m):Ue(A,y,1/0),S=n?w:w-(M-k)/2,E=n?j-(_-A)/2:j-(_-A);return _t(t.createElement("rect",{})).style("x",S).style("y",E).style("width",M).style("height",_).style("radius",[p,h,d,f]).call(ec,b).node()}const{y:v,y1:x}=n,O=r.getCenter(),w=ic(r,e,[v,x]),j=(0,dl.A)().cornerRadius(a).padAngle(i*Math.PI/180);return _t(t.createElement("path",{})).style("d",j(w)).style("transform",`translate(${O[0]}, ${O[1]})`).style("radius",a).style("inset",i).call(ec,b).node()}const gl=(t,e)=>{const{colorAttribute:n,opacityAttribute:r="fill",first:o=!0,last:i=!0}=t,a=pl(t,["colorAttribute","opacityAttribute","first","last"]),{coordinate:s,document:c}=e;return(e,r,l)=>{const{color:u,radius:f=0}=l,d=pl(l,["color","radius"]),p=d.lineWidth||1,{stroke:h,radius:g=f,radiusTopLeft:m=g,radiusTopRight:y=g,radiusBottomRight:b=g,radiusBottomLeft:v=g,innerRadius:x=0,innerRadiusTopLeft:O=x,innerRadiusTopRight:w=x,innerRadiusBottomRight:j=x,innerRadiusBottomLeft:k=x,lineWidth:A=("stroke"===n||h?p:0),inset:M=0,insetLeft:_=M,insetRight:S=M,insetBottom:E=M,insetTop:P=M,minWidth:L,maxWidth:C,minHeight:z}=a,T=pl(a,["stroke","radius","radiusTopLeft","radiusTopRight","radiusBottomRight","radiusBottomLeft","innerRadius","innerRadiusTopLeft","innerRadiusTopRight","innerRadiusBottomRight","innerRadiusBottomLeft","lineWidth","inset","insetLeft","insetRight","insetBottom","insetTop","minWidth","maxWidth","minHeight"]),{color:B=u,opacity:I}=r,N=[o?m:O,o?y:w,i?b:j,i?v:k],R=["radiusTopLeft","radiusTopRight","radiusBottomRight","radiusBottomLeft"];nn(s)&&R.push(R.shift());const F=Object.assign(Object.assign({radius:g},Object.fromEntries(R.map((t,e)=>[t,N[e]]))),{inset:M,insetLeft:_,insetRight:S,insetBottom:E,insetTop:P,minWidth:L,maxWidth:C,minHeight:z});return _t(hl(c,e,r,s,F)).call(ec,d).style("fill","transparent").style(n,B).style(ac(t),I).style("lineWidth",A).style("stroke",void 0===h?B:h).call(ec,T).node()}};function ml(t,e){if(e(t))return!0;if("g"===t.tagName){const{childNodes:n=[]}=t;for(const t of n)if(ml(t,e))return!0}return!1}gl.props={defaultEnterAnimation:"scaleInY",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const yl={visibility:"visible",opacity:1,fillOpacity:1,strokeOpacity:1};function bl(t,e){let n;return ml(t,t=>{var r;return"g"!==t.tagName&&void 0!==(null===(r=t.style)||void 0===r?void 0:r[e])&&(n=t.style[e],!0)}),null!=n?n:yl[e]}function vl(t,e,n,r){t.style[e]=n,r&&t.children.forEach(t=>vl(t,e,n,r))}function xl(t){vl(t,"visibility","hidden",!0)}function Ol(t){vl(t,"visibility","visible",!0)}var wl=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};function jl(t){return _t(t).selectAll(`.${Xc}`).nodes().filter(t=>!t.__removed__)}function kl(t,e){return Al(t,e).flatMap(({container:t})=>jl(t))}function Al(t,e){return e.filter(e=>e!==t&&e.options.parentKey===t.options.key)}function Ml(t){return _t(t).select(".plot").node()}function _l(t){if("g"===t.tagName)return t.getRenderBounds();const e=t.getGeometryBounds(),n=new l.F5;return n.setFromTransformedAABB(e,t.getWorldTransform()),n}function Sl(t,e){const{offsetX:n,offsetY:r}=e,o=_l(t),{min:[i,a],max:[s,c]}=o;return n<i||n>s||(r<a||r>c)?null:[n-i,r-a]}function El(t,e){const{offsetX:n,offsetY:r}=e,[o,i,a,s]=function(t){const e=t.getRenderBounds(),{min:[n,r],max:[o,i]}=e;return[n,r,o,i]}(t);return[Math.min(a,Math.max(o,n))-o,Math.min(s,Math.max(i,r))-i]}function Pl(t){return t=>t.__data__.color}function Ll(t){return t=>t.__data__.x}function Cl(t){const e=Array.isArray(t)?t:[t],n=new Map(e.flatMap(t=>Array.from(t.markState.keys()).map(e=>[Rl(t.key,e.key),e.data])));return t=>{const{index:e,markKey:r,viewKey:o}=t.__data__;return n.get(Rl(o,r))[e]}}const zl={selected:3,unselected:3,active:2,inactive:2,default:1},Tl={selection:["selected","unselected"],highlight:["active","inactive"]},Bl=(t,e,n)=>{ml(t,t=>{"setAttribute"in t&&"function"==typeof t.setAttribute&&t.setAttribute(e,n)})};function Il(t,e){return e.forEach(e=>{const n=e.__interactionStyle__;e.__interactionStyle__=n?Object.assign(Object.assign({},n),t):t}),(t=(t,e)=>t,e=Bl)=>Nl(void 0,t,e)}function Nl(t,e=(t,e)=>t,n=Bl){const r="__states__",o="__ordinal__",i=t=>zl[t]||zl.default,a=t=>{var e;return null===(e=Object.entries(Tl).find(([e,n])=>n.includes(t)))||void 0===e?void 0:e[0]},s=a=>{var s;const{[r]:c=[],[o]:l={}}=a,u=[...c].sort((t,e)=>i(e)-i(t)),f=new Map;for(const e of u){const n=(null===(s=null!=t?t:a.__interactionStyle__)||void 0===s?void 0:s[e])||{};for(const[t,e]of Object.entries(n))f.has(t)||f.set(t,e)}const d=Object.assign({},l);for(const[t,e]of f.entries())d[t]=e;if(0!==Object.keys(d).length){for(const[t,r]of Object.entries(d)){const o=bl(a,t),i=e(r,a);n(a,t,i),t in l||(l[t]=o)}a[o]=l}},c=t=>{t[r]||(t[r]=[])};return{setState:(t,...e)=>{c(t),t[r]=[...e],s(t)},updateState:(t,...e)=>{c(t);const n=t[r],o=new Set(e.map(t=>a(t)).filter(t=>void 0!==t)),i=n.filter(t=>!o.has(a(t)));t[r]=[...i,...e],s(t)},removeState:(t,...e)=>{c(t);for(const n of e){const e=t[r].indexOf(n);-1!==e&&t[r].splice(e,1)}s(t)},hasState:(t,e)=>(c(t),-1!==t[r].indexOf(e))}}function Rl(t,e){return`${t},${e}`}function Fl(t,e){const n=(Array.isArray(t)?t:[t]).flatMap(t=>t.marks.map(e=>[Rl(t.key,e.key),e.state])),r={};for(const t of e){const[e,o]=Array.isArray(t)?t:[t,{}];r[e]=n.reduce((t,n)=>{const[r,i={}]=n,a=void 0===(s=i[e])||"object"==typeof s&&0===Object.keys(s).length?o:i[e];var s;for(const[e,n]of Object.entries(a)){const o=t[e],i=(t,e,i,a)=>{const s=Rl(a.__data__.viewKey,a.__data__.markKey);return r!==s?null==o?void 0:o(t,e,i,a):"function"!=typeof n?n:n(t,e,i,a)};t[e]=i}return t},{})}return r}function Dl(t,e){const n=new Map(t.map((t,e)=>[t,e])),r=e?t.map(e):t;return(t,o)=>{if("function"!=typeof t)return t;const i=n.get(o);return t(e?e(o):o,i,r,o)}}function $l(t){var{link:e=!1,valueof:n=(t,e)=>t}=t,r=wl(t,["link","valueof","coordinate"]);if(!e)return[()=>{},()=>{}];const o=t=>t.__data__.points,i=(t,e)=>{const[,n,r]=t,[o,,,i]=e;return[n,o,i,r]};return[t=>{var e;if(t.length<=1)return;const a=Pc(t,(t,e)=>{const{x:n}=t.__data__,{x:r}=e.__data__;return n-r});for(let t=1;t<a.length;t++){const s=(0,nl.Ae)(),c=a[t-1],u=a[t],[f,d,p,h]=i(o(c),o(u));s.moveTo(...f),s.lineTo(...d),s.lineTo(...p),s.lineTo(...h),s.closePath();const g=Te(r,t=>n(t,c)),{fill:m=c.getAttribute("fill")}=g,y=wl(g,["fill"]),b=new l.wA({className:"element-link",style:Object.assign({d:s.toString(),fill:m,zIndex:-2},y)});null===(e=c.link)||void 0===e||e.remove(),c.parentNode.appendChild(b),c.link=b}},t=>{var e;null===(e=t.link)||void 0===e||e.remove(),t.link=null}]}function Wl(t,e,n){const r=e=>{const{transform:n}=t.style;return n?`${n} ${e}`:e};if(rn(n)){const{points:o}=t.__data__,[i,a]=nn(n)?oc(o):o,s=n.getCenter(),c=Gs(i,s),l=Gs(a,s),u=Us(c)+Js(c,l)/2;return r(`translate(${e*Math.cos(u)}, ${e*Math.sin(u)})`)}return nn(n)?r(`translate(${e}, 0)`):r(`translate(0, ${-e})`)}function Hl(t){var{document:e,background:n,scale:r,coordinate:o,valueof:i}=t,a=wl(t,["document","background","scale","coordinate","valueof"]);const s="element-background";if(!n)return[()=>{},()=>{}];const c=(t,e,n)=>{const r=t.invert(e),o=e+t.getBandWidth(r)/2,i=t.getStep(r)/2,a=i*n;return[o-i+a,o+i-a]},l=(t,n)=>{const{padding:i}=n,[a,s]=((t,e)=>{const{x:n}=r;if(!al(n))return[0,1];const{__data__:o}=t,{x:i}=o,[a,s]=c(n,i,e);return[a,s]})(t,i),[l,u]=((t,e)=>{const{y:n}=r;if(!al(n))return[0,1];const{__data__:o}=t,{y:i}=o,[a,s]=c(n,i,e);return[a,s]})(t,i),f=[[a,l],[s,l],[s,u],[a,u]].map(t=>o.map(t)),{__data__:d}=t,{y:p,y1:h}=d;return hl(e,f,{y:p,y1:h},o,n)},u=(t,e)=>{const{transform:n="scale(1.2, 1.2)",transformOrigin:r="center center",stroke:o=""}=e,i=wl(e,["transform","transformOrigin","stroke"]),a=Object.assign({transform:n,transformOrigin:r,stroke:o},i),s=t.cloneNode(!0);for(const[t,e]of Object.entries(a))s.style[t]=e;return s};return[t=>{t.background&&t.background.remove();const e=Te(a,e=>i(e,t)),{fill:n="#CCD6EC",fillOpacity:o=.3,zIndex:c=-2,padding:f=.001,lineWidth:d=0}=e,p=wl(e,["fill","fillOpacity","zIndex","padding","lineWidth"]),h=Object.assign(Object.assign({},p),{fill:n,fillOpacity:o,zIndex:c,padding:f,lineWidth:d}),g=(()=>{const{x:t,y:e}=r;return[t,e].some(al)})()?l:u,m=g(t,h);m.className=s,t.parentNode.parentNode.appendChild(m),t.background=m},t=>{var e;null===(e=t.background)||void 0===e||e.remove(),t.background=null},t=>t.className===s]}function ql(t,e){const n=t.getRootNode().defaultView.getContextService().getDomElement();(null==n?void 0:n.style)&&(t.cursor=n.style.cursor,n.style.cursor=e)}function Yl(t){ql(t,t.cursor)}function Xl(t,e,n){return t.find(t=>Object.entries(e).every(([e,r])=>n(t)[e]===r))}function Gl(t,e){return Math.sqrt(Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2))}function Vl(t,e=!1){const n=ol(t,t=>!!t).map((t,e)=>[0===e?"M":"L",...t]);return e&&n.push(["Z"]),n}function Kl(t){return t.querySelectorAll(".element")}function Ul(t,e){if(e(t))return t;let n=t.parent;for(;n&&!e(n);)n=n.parent;return n}const Zl=["interval","point","density"];function Jl({elementsof:t,root:e,coordinate:n,scale:r,validFindByXMarks:o=Zl}){var i,a;let s=t(e);const c=t=>o.includes(t.markType);if(s.find(c)){s=s.filter(c);const t=r.x,o=r.series,l=null!==(a=null===(i=null==t?void 0:t.getBandWidth)||void 0===i?void 0:i.call(t))&&void 0!==a?a:0,u=o?t=>{var e,n;const r=Math.round(1/(null!==(e=o.valueBandWidth)&&void 0!==e?e:1));return t.__data__.x+(null!==(n=t.__data__.series)&&void 0!==n?n:0)*l+l/(2*r)}:t=>t.__data__.x+l/2;return s.sort((t,e)=>u(t)-u(e)),t=>{const r=Sl(e,t);if(!r)return;const[o]=n.invert(r),i=(0,(0,rl.A)(u).center)(s,o);return s[i]}}return t=>{const{target:e}=t;return Ul(e,t=>!!t.classList&&t.classList.includes("element"))}}function Ql(t){const e=.01/Math.max(t,1e-4);return Math.max(.1,Math.min(100,e))}function tu(t){return!1===t||null==t}function eu(t,e){const n=new Set;for(const r of e){const{scale:e}=r,o=null==e?void 0:e[t];if(!o)continue;if(o.independent)return!0;if(n.add(o.key||"default"),n.size>1)return!0}return!1}function nu(t){var e,n,r,o,i,a,s,c;const l=Array.from(t.markState.keys()),u=eu("x",l),f=eu("y",l),d=[],p=[],h=[],g=[],m=new Map,y=new Map,b=new Map,v=new Map;let x=1,O=1;for(const[l]of t.markState.entries()){const t=l.key,w=(null===(n=null===(e=null==l?void 0:l.scale)||void 0===e?void 0:e.x)||void 0===n?void 0:n.key)||"x";if(!!(null===(o=null===(r=null==l?void 0:l.scale)||void 0===r?void 0:r.x)||void 0===o?void 0:o.independent)||u&&"x"!==w){p.push(t),b.has(w)||b.set(w,x++);const e=b.get(w);m.set(t,`x${e}`)}else d.push(t),m.set(t,"x");const j=(null===(a=null===(i=null==l?void 0:l.scale)||void 0===i?void 0:i.y)||void 0===a?void 0:a.key)||"y";if(!!(null===(c=null===(s=null==l?void 0:l.scale)||void 0===s?void 0:s.y)||void 0===c?void 0:c.independent)||f&&"y"!==j){g.push(t),v.has(j)||v.set(j,O++);const e=v.get(j);y.set(t,`y${e}`)}else h.push(t),y.set(t,"y")}return{hasIndependentX:u,hasIndependentY:f,marksWithSharedX:d,marksWithIndependentX:p,marksWithSharedY:h,marksWithIndependentY:g,markToXScaleMap:m,markToYScaleMap:y}}function ru(t,e,n,r=t=>!0){return o=>{if(!r(o))return;n.emit(`plot:${t}`,o);const{target:i}=o;if(!i)return;const{className:a}=i;if("plot"===a)return;const s=Ul(i,t=>"element"===t.className);const c=function(t){return Ul(t,t=>"component"===t.className)}(i),l=function(t){return Ul(t,t=>"label"===t.className)}(i),u=s||c||l;if(!u)return;const{className:f,markType:d}=u,p=Object.assign(Object.assign({},o),{nativeEvent:!0});if("element"===f)p.data={data:ft(u,e)},n.emit(`element:${t}`,p),n.emit(`${d}:${t}`,p);else if("label"===f){p.data={data:u.attributes.datum},n.emit(`label:${t}`,p);a.split(/\s+/).filter(Boolean).forEach(e=>{n.emit(`${e}:${t}`,p)})}else{n.emit(`component:${t}`,p);a.split(/\s+/).filter(Boolean).forEach(e=>{n.emit(`${e}:${t}`,p)})}}}function ou(){return(t,e,n)=>{const{container:r,view:o}=t,i=ru(ee,o,n,t=>1===t.detail),a=ru(ne,o,n,t=>2===t.detail),s=ru(Ft,o,n),c=ru(Dt,o,n),l=ru($t,o,n),u=ru(Wt,o,n),f=ru(Ht,o,n),d=ru(qt,o,n),p=ru(Yt,o,n),h=ru(Xt,o,n),g=ru(Gt,o,n),m=ru(Vt,o,n),y=ru(Kt,o,n),b=ru(Ut,o,n),v=ru(Zt,o,n),x=ru(Jt,o,n),O=ru(Qt,o,n),w=ru(te,o,n);return r.addEventListener("click",i),r.addEventListener("click",a),r.addEventListener("pointertap",s),r.addEventListener("pointerdown",c),r.addEventListener("pointerup",l),r.addEventListener("pointerover",u),r.addEventListener("pointerout",f),r.addEventListener("pointermove",d),r.addEventListener("pointerenter",p),r.addEventListener("pointerleave",h),r.addEventListener("pointerupoutside",g),r.addEventListener("dragstart",m),r.addEventListener("drag",y),r.addEventListener("dragend",b),r.addEventListener("dragenter",v),r.addEventListener("dragleave",x),r.addEventListener("dragover",O),r.addEventListener("drop",w),()=>{r.removeEventListener("click",i),r.removeEventListener("click",a),r.removeEventListener("pointertap",s),r.removeEventListener("pointerdown",c),r.removeEventListener("pointerup",l),r.removeEventListener("pointerover",u),r.removeEventListener("pointerout",f),r.removeEventListener("pointermove",d),r.removeEventListener("pointerenter",p),r.removeEventListener("pointerleave",h),r.removeEventListener("pointerupoutside",g),r.removeEventListener("dragstart",m),r.removeEventListener("drag",y),r.removeEventListener("dragend",b),r.removeEventListener("dragenter",v),r.removeEventListener("dragleave",x),r.removeEventListener("dragover",O),r.removeEventListener("drop",w)}}}ou.props={reapplyWhenUpdate:!0};var iu=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};function au(t,e){const n=Object.assign(Object.assign({},{"component.axisRadar":$i,"component.axisLinear":Ni,"component.axisArc":Ri,"component.legendContinuousBlock":Is,"component.legendContinuousBlockSize":Rs,"component.legendContinuousSize":Ns,"interaction.event":ou,"composition.mark":Ds,"composition.view":Xs,"shape.label.label":Wc,"shape.break":el}),e),r=e=>{if("string"!=typeof e)return e;const r=`${t}.${e}`;return n[r]||mt(`Unknown Component: ${r}`)};return[(t,e)=>{const{type:n}=t,o=iu(t,["type"]);n||mt("Plot type is required!");const i=r(n);return null==i?void 0:i(o,e)},r]}function su(t){const{canvas:e,group:n}=t;return(null==e?void 0:e.document)||(null==n?void 0:n.ownerDocument)||mt("Cannot find library document")}var cu=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};function lu(t,e){const{coordinate:n={},coordinates:r}=t,o=cu(t,["coordinate","coordinates"]);if(r)return t;const{type:i,transform:a=[]}=n,s=cu(n,["type","transform"]);if(!i)return Object.assign(Object.assign({},o),{coordinates:a});const[,c]=au("coordinate",e),{transform:l=!1}=c(i).props||{};if(l)throw new Error(`Unknown coordinate: ${i}.`);return Object.assign(Object.assign({},o),{coordinates:[Object.assign({type:i},s),...a]})}function uu(t,e){return t.filter(t=>t.type===e)}function fu(t){return uu(t,"polar").length>0}function du(t){return uu(t,"transpose").length%2==1}function pu(t){return uu(t,"theta").length>0}function hu(t){return uu(t,"radial").length>0}function gu(t){return uu(t,"radar").length>0}function mu(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}const yu=mu("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),bu=mu("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),vu=mu("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),xu=mu("4269d0efb118ff725c6cc5b03ca951ff8ab7a463f297bbf59c6b4e9498a0"),Ou=mu("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),wu=mu("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),ju=mu("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),ku=mu("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),Au=mu("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),Mu=mu("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),_u=mu("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");var Su=n("./node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/rgb.js");const Eu=t=>(0,Su.Ik)(t[t.length-1]);var Pu=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(mu);const Lu=Eu(Pu);var Cu=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(mu);const zu=Eu(Cu);var Tu=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(mu);const Bu=Eu(Tu);var Iu=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(mu);const Nu=Eu(Iu);var Ru=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(mu);const Fu=Eu(Ru);var Du=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(mu);const $u=Eu(Du);var Wu=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(mu);const Hu=Eu(Wu);var qu=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(mu);const Yu=Eu(qu);var Xu=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(mu);const Gu=Eu(Xu);var Vu=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(mu);const Ku=Eu(Vu);var Uu=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(mu);const Zu=Eu(Uu);var Ju=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(mu);const Qu=Eu(Ju);var tf=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(mu);const ef=Eu(tf);var nf=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(mu);const rf=Eu(nf);var of=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(mu);const af=Eu(of);var sf=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(mu);const cf=Eu(sf);var lf=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(mu);const uf=Eu(lf);var ff=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(mu);const df=Eu(ff);var pf=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(mu);const hf=Eu(pf);var gf=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(mu);const mf=Eu(gf);var yf=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(mu);const bf=Eu(yf);var vf=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(mu);const xf=Eu(vf);var Of=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(mu);const wf=Eu(Of);var jf=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(mu);const kf=Eu(jf);var Af=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(mu);const Mf=Eu(Af);var _f=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(mu);const Sf=Eu(_f);var Ef=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(mu);const Pf=Eu(Ef);function Lf(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)))))))+")"}var Cf=n("./node_modules/.pnpm/d3-color@3.1.0/node_modules/d3-color/src/define.js"),zf=n("./node_modules/.pnpm/d3-color@3.1.0/node_modules/d3-color/src/color.js");const Tf=Math.PI/180,Bf=180/Math.PI;var If=-.14861,Nf=1.78277,Rf=-.29227,Ff=-.90649,Df=1.97294,$f=-1.7884503806,Wf=3.5172982438,Hf=Nf*Rf-.1347134789;function qf(t,e,n,r){return 1===arguments.length?function(t){if(t instanceof Yf)return new Yf(t.h,t.s,t.l,t.opacity);t instanceof zf.Gw||(t=(0,zf.b)(t));var e=t.g/255,n=t.b/255,r=(Hf*n+$f*(t.r/255)-Wf*e)/(Hf+$f-Wf),o=n-r,i=(Df*(e-r)-Rf*o)/Ff,a=Math.sqrt(i*i+o*o)/(Df*r*(1-r)),s=a?Math.atan2(i,o)*Bf-120:NaN;return new Yf(s<0?s+360:s,a,r,t.opacity)}(t):new Yf(t,e,n,r??1)}function Yf(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}(0,Cf.A)(Yf,qf,(0,Cf.X)(zf.Q1,{brighter(t){return t=null==t?zf.Uw:Math.pow(zf.Uw,t),new Yf(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?zf.ef:Math.pow(zf.ef,t),new Yf(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=isNaN(this.h)?0:(this.h+120)*Tf,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),o=Math.sin(t);return new zf.Gw(255*(e+n*(If*r+Nf*o)),255*(e+n*(Rf*r+Ff*o)),255*(e+n*(Df*r)),this.opacity)}}));var Xf=n("./node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/color.js");function Gf(t){return function e(n){function r(e,r){var o=t((e=qf(e)).h,(r=qf(r)).h),i=(0,Xf.Ay)(e.s,r.s),a=(0,Xf.Ay)(e.l,r.l),s=(0,Xf.Ay)(e.opacity,r.opacity);return function(t){return e.h=o(t),e.s=i(t),e.l=a(Math.pow(t,n)),e.opacity=s(t),e+""}}return n=+n,r.gamma=e,r}(1)}Gf(Xf.lG);var Vf=Gf(Xf.Ay);const Kf=Vf(qf(300,.5,0),qf(-240,.5,1));var Uf=Vf(qf(-100,.75,.35),qf(80,1.5,.8)),Zf=Vf(qf(260,.75,.35),qf(80,1.5,.8)),Jf=qf();function Qf(t){(t<0||t>1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return Jf.h=360*t-100,Jf.s=1.5-1.5*e,Jf.l=.8-.9*e,Jf+""}var td=(0,zf.Qh)(),ed=Math.PI/3,nd=2*Math.PI/3;function rd(t){var e;return t=(.5-t)*Math.PI,td.r=255*(e=Math.sin(t))*e,td.g=255*(e=Math.sin(t+ed))*e,td.b=255*(e=Math.sin(t+nd))*e,td+""}function od(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)))))))+")"}function id(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}const ad=id(mu("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));var sd=id(mu("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),cd=id(mu("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),ld=id(mu("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));function ud(t,e,n,r,i,a){const{guide:s={}}=n,c=function(t,e,n){const{type:r,domain:o,range:i,quantitative:a,ordinal:s}=n;if(void 0!==r)return r;if(function(t){return Md(t,kt)}(e))return"identity";if("string"==typeof i)return"linear";if((o||i||[]).length>2)return Od(t,s);if(void 0!==o)return kd([o])?Od(t,s):Ad(e)?"time":wd(t,i,a);return kd(e)?Od(t,s):Ad(e)?"time":wd(t,i,a)}(t,e,n);if("string"!=typeof c)return n;const l=function(t,e,n,r){const{domain:o}=r;if(void 0!==o)return o;switch(t){case"linear":case"time":case"log":case"pow":case"sqrt":case"quantize":case"threshold":return jd(function(t,e){const{zero:n=!1}=e;let r=1/0,o=-1/0;for(const e of t)for(const t of e)bt(t)&&(r=Math.min(r,+t),o=Math.max(o,+t));return r===1/0?[]:n?[Math.min(0,r),o]:[r,o]}(n,r),r);case"band":case"ordinal":case"point":return function(t){return Array.from(new Set(t.flat()))}(n);case"quantile":return function(t){return t.flat().sort()}(n);case"sequential":return jd(function(t){let e=1/0,n=-1/0;for(const r of t)for(const t of r)bt(t)&&(e=Math.min(e,+t),n=Math.max(n,+t));return e===1/0?[]:[e<0?-n:e,n]}(n),r);default:return[]}}(c,0,e,n),u=function(t,e,n){const{ratio:r}=n;if(null==r)return e;if(yd({type:t}))return function(t,e,n){const r=t.map(Number),o=new li({domain:r,range:[r[0],r[0]+(r[r.length-1]-r[0])*e]});return t.map("time"===n?t=>new Date(o.map(t)):t=>o.map(t))}(e,r,t);return bd({type:t})?function(t,e){const n=Math.round(t.length*e);return t.slice(0,n)}(e,r):e}(c,l,n);return Object.assign(Object.assign(Object.assign({},n),function(t,e,n,r,i){switch(t){case"linear":case"time":case"log":case"pow":case"sqrt":return function(t,e){const{interpolate:n=Qo,nice:r=!1,tickCount:o=5}=e;return Object.assign(Object.assign({},e),{interpolate:n,nice:r,tickCount:o})}(0,r);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});const o=function(t,e,n){return"enterDelay"===e||"enterDuration"===e||"size"===e?0:"band"===t?pu(n)?0:.1:"point"===t?.5:0}(t,e,n),{paddingInner:i=o,paddingOuter:a=o}=r;return Object.assign(Object.assign({},r),{paddingInner:i,paddingOuter:a,padding:o,unknown:NaN})}(t,e,i,r);case"sequential":return function(t){const{palette:e="ylGnBu",offset:n}=t,r=Ce(e),i=o[`interpolate${r}`];if(!i)throw new Error(`Unknown palette: ${r}`);return{interpolator:n?t=>i(n(t)):i}}(r);default:return r}}(c,t,0,n,r)),{domain:u,range:vd(c,t,e,n,u,i,a),expectedDomain:l,guide:s,name:t,type:c})}function fd(t,e){const n={};for(const r of t){const{values:t,name:o}=r,i=e[o];for(const e of t){const{name:t,value:r}=e;n[t]=r.map(t=>i.map(t))}}return n}function dd(t,e){const n=Object.keys(t);for(const r of Object.values(e)){const{name:e}=r.getOptions();if(e in t){const o=n.filter(t=>t.startsWith(e)).map(t=>+(t.replace(e,"")||0)),i=Ye(o)+1,a=`${e}${i}`;t[a]=r,r.getOptions().key=a}else t[e]=r}return t}function pd(t,e){const[n]=au("scale",e),{relations:r}=t,[o]=function(t){if(!t||!Array.isArray(t))return[pt,pt];let e,n;return[r=>{var o;e=r.map.bind(r),n=null===(o=r.invert)||void 0===o?void 0:o.bind(r);const i=t.filter(([t])=>"function"==typeof t),a=t.filter(([t])=>"function"!=typeof t),s=new Map(a);if(r.map=t=>{for(const[e,n]of i)if(e(t))return n;return s.has(t)?s.get(t):e(t)},!n)return r;const c=new Map(a.map(([t,e])=>[e,t])),l=new Map(i.map(([t,e])=>[e,t]));return r.invert=t=>l.has(t)?t:c.has(t)?c.get(t):n(t),r},t=>(null!==e&&(t.map=e),null!==n&&(t.invert=n),t)]}(r);return o(n(t))}function hd(t){const e=t.flatMap(t=>Array.from(t.values())).flatMap(t=>t.channels.map(t=>t.scale));md(e,"x"),md(e,"y")}function gd(t){const{channels:e=[],type:n,scale:r={}}=t,o=["shape","color","opacity","size"];return 0!==e.length?e:"axisX"===n?["x"]:"axisY"===n?["y"]:"legends"===n?Object.keys(r).filter(t=>o.includes(t)):[]}function md(t,e){const n=t.filter(({name:t,facet:n=!0})=>n&&t===e),r=n.flatMap(t=>t.domain),o=n.every(yd)?pi(r):n.every(bd)?Array.from(new Set(r)):null;if(null!==o)for(const t of n)t.domain=o}function yd(t){const{type:e}=t;if("string"!=typeof e)return!1;return["linear","log","pow","time"].includes(e)}function bd(t){const{type:e}=t;if("string"!=typeof e)return!1;return["band","point","ordinal"].includes(e)}function vd(t,e,n,r,o,i,a){const{range:s}=r;if("string"==typeof s)return function(t){return t.split("-")}(s);if(void 0!==s)return s;const{rangeMin:c,rangeMax:l}=r;switch(t){case"linear":case"time":case"log":case"pow":case"sqrt":{const t=xd(n,r,o,i,a),[s,u]=function(t,e){return"enterDelay"===t?[0,1e3]:"enterDuration"==t?[300,1e3]:t.startsWith("y")||t.startsWith("position")?[1,0]:"color"===t?[Ie(e),Ne(e)]:"opacity"===t?[0,1]:"size"===t?[1,10]:[0,1]}(e,t);return[null!=c?c:s,null!=l?l:u]}case"band":case"point":return[null!=c?c:"size"===e?5:0,null!=l?l:"size"===e?10:1];case"ordinal":return xd(n,r,o,i,a);case"sequential":return;case"constant":return[n[0][0]];default:return[]}}function xd(t,e,n,r,i){const[a]=au("palette",i),{category10:s,category20:c}=r,l=function(t){return Array.from(new Set(t))}(n).length<=s.length?s:c,{palette:u=l,offset:f}=e;if(Array.isArray(u))return u;try{return a({type:u})}catch(t){const e=function(t,e,n=t=>t){if(!t)return null;const r=Ce(t),i=o[`scheme${r}`],a=o[`interpolate${r}`];if(!i&&!a)return null;if(i){if(!i.some(Array.isArray))return i;const t=i[e.length];if(t)return t}return e.map((t,r)=>a(n(r/e.length)))}(u,n,f);if(e)return e;throw new Error(`Unknown Component: ${u} `)}}function Od(t,e){return e||(function(t){return t.startsWith("x")||t.startsWith("y")||t.startsWith("position")||t.startsWith("size")}(t)?"point":"ordinal")}function wd(t,e,n){return n||("color"!==t||e?"linear":"sequential")}function jd(t,e){if(0===t.length)return t;const{domainMin:n,domainMax:r}=e,[o,i]=t;return[null!=n?n:o,null!=r?r:i]}function kd(t){return Md(t,t=>{const e=typeof t;return"string"===e||"boolean"===e})}function Ad(t){return Md(t,t=>t instanceof Date)}function Md(t,e){for(const n of t)if(n.some(e))return!0;return!1}const _d={linear:"linear",identity:"identity",log:"log",pow:"pow",sqrt:"sqrt",sequential:"sequential"},Sd={threshold:"threshold",quantize:"quantize",quantile:"quantile"},Ed={ordinal:"ordinal",band:"band",point:"point"},Pd={constant:"constant"};var Ld=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};function Cd(t,e,n){const{coordinates:r=[],title:o}=e,[,i]=au("component",n),a=t.filter(({guide:t})=>null!==t),s=[],c=function(t,e,n){const[,r]=au("component",n),{coordinates:o}=t;function i(t,e,n,i){const a=function(t,e,n=[]){return"x"===t?du(n)?`${e}Y`:`${e}X`:"y"===t?du(n)?`${e}X`:`${e}Y`:null}(e,t,o);if(!i||!a)return;const{props:s}=r(a),{defaultPosition:c,defaultSize:l,defaultOrder:u,defaultCrossPadding:[f]}=s;return Object.assign(Object.assign({position:c,defaultSize:l,order:u,type:a,crossPadding:f},i),{scales:[n]})}return e.filter(t=>t.slider||t.scrollbar).flatMap(t=>{const{slider:e,scrollbar:n,name:r}=t;return[i("slider",r,t,e),i("scrollbar",r,t,n)]}).filter(t=>!!t)}(e,t,n);if(s.push(...c),o){const{props:t}=i("title"),{defaultPosition:e,defaultOrientation:n,defaultOrder:r,defaultSize:a,defaultCrossPadding:c}=t;s.push(Object.assign({type:"title",position:e,orientation:n,order:r,crossPadding:c[0],defaultSize:a},"string"==typeof o?{title:o}:o))}const l=function(t,e){const n=t.filter(t=>function(t){if(!t||!t.type)return!1;if("function"==typeof t.type)return!0;const{type:e,domain:n,range:r,interpolator:o}=t,i=n&&n.length>0,a=r&&r.length>0;return!!(["linear","sqrt","log","time","pow","threshold","quantize","quantile","ordinal","band","point"].includes(e)&&i&&a)||!(!["sequential"].includes(e)||!i||!a&&!o)||!(!["constant","identity"].includes(e)||!a)}(t));return[...Bd(n,e),...Nd(n,e)]}(a,r);return l.forEach(([t,e])=>{const{props:n}=i(t),{defaultPosition:o,defaultPlane:c="xy",defaultOrientation:l,defaultSize:u,defaultOrder:f,defaultLength:d,defaultPadding:p=[0,0],defaultCrossPadding:h=[0,0]}=n,g=(0,N.A)({},...e),{guide:m,field:y}=g,b=Array.isArray(m)?m:[m];for(const n of b){const[i,g]=Dd(t,o,l,n,e,a,r);if(!i&&!g)continue;const m="left"===i||"right"===i,b=m?p[1]:p[0],v=m?h[1]:h[0],{size:x,order:O=f,length:w=d,padding:j=b,crossPadding:k=v}=n;s.push(Object.assign(Object.assign({title:y},n),{defaultSize:u,length:w,position:i,plane:c,orientation:g,padding:j,order:O,crossPadding:k,size:x,type:t,scales:e}))}}),s}function zd(t,e,n,r,o){const[i]=au("component",r),{scaleInstances:a,scale:s,bbox:c}=t,l={bbox:c,library:r};return i(Ld(t,["scaleInstances","scale","bbox"]))({coordinate:e,library:r,markState:o,scales:a,theme:n,value:l,scale:s})}function Td(t,e){const n=["left","right","bottom","top"],r=z(t,({type:t,position:e,group:r})=>n.includes(e)?void 0===r?t.startsWith("legend")?`legend-${e}`:Symbol("independent"):"independent"===r?Symbol("independent"):r:Symbol("independent"));return r.flatMap(([,t])=>{if(1===t.length)return t[0];if(void 0!==e){const n=t.filter(t=>void 0!==t.length).map(t=>t.length),r=qe(n);if(r>e)return t.forEach(t=>t.group=Symbol("independent")),t;const o=(e-r)/(t.length-n.length);t.forEach(t=>{void 0===t.length&&(t.length=o)})}const n=Ye(t,t=>t.size),r=Ye(t,t=>t.order),o=Ye(t,t=>t.crossPadding);return{type:"group",size:n,order:r,position:t[0].position,children:t,crossPadding:o}})}function Bd(t,e){const n=["shape","size","color","opacity"],r=t.filter(({type:t,name:e})=>"string"==typeof t&&n.includes(e)&&!((t,e)=>"constant"===t&&"size"===e)(t,e)),o=r.filter(({type:t})=>"constant"===t),i=z(r.filter(({type:t})=>"constant"!==t),t=>t.field?t.field:Symbol("independent")).map(([t,e])=>[t,[...e,...o]]).filter(([,t])=>t.some(t=>"constant"!==t.type)),a=new Map(i);if(0===a.size)return[];const s=t=>t.sort(([t],[e])=>t.localeCompare(e)),c=Array.from(a).map(([,t])=>{const e=function(t){if(1===t.length)return[t];const e=[];for(let n=1;n<=t.length;n++)e.push(...Fe(t,n));return e}(t).sort((t,e)=>e.length-t.length),n=e.map(t=>({combination:t,option:t.map(t=>[t.name,Id(t)])}));for(const{option:t,combination:e}of n)if(!t.every(t=>"constant"===t[1])&&t.every(t=>"discrete"===t[1]||"constant"===t[1]))return["legendCategory",e];for(const[t,e]of Qe)for(const{option:r,combination:o}of n)if(e.some(t=>He(s(t),s(r))))return[t,o];return null}).filter(bt);return c}function Id(t){const{type:e}=t;return"string"!=typeof e?null:e in _d?"continuous":e in Ed?"discrete":e in Sd?"distribution":e in Pd?"constant":null}function Nd(t,e){return t.map(t=>{const{name:n}=t;if(function(t){return uu(t,"helix").length>0}(e)||pu(e))return null;if(du(e)&&(fu(e)||hu(e)))return null;if(n.startsWith("x"))return fu(e)?["axisArc",[t]]:hu(e)?["axisLinear",[t]]:[du(e)?"axisY":"axisX",[t]];if(n.startsWith("y"))return fu(e)?["axisLinear",[t]]:hu(e)?["axisArc",[t]]:[du(e)?"axisX":"axisY",[t]];if(n.startsWith("z"))return["axisZ",[t]];if(n.startsWith("position")){if(gu(e))return["axisRadar",[t]];if(!fu(e))return["axisY",[t]]}return null}).filter(bt)}function Rd(t){const e=uu(t,"polar");if(e.length){const t=e[e.length-1],{startAngle:n,endAngle:r}=Xe(t);return[n,r]}const n=uu(t,"radial");if(n.length){const t=n[n.length-1],{startAngle:e,endAngle:r}=Ve(t);return[e,r]}return[-Math.PI/2,Math.PI/2*3]}function Fd(t,e,n,r,o){const{name:i}=n[0];if("axisRadar"===t){const t=r.filter(t=>t.name.startsWith("position")),e=function(t){const e=/position(\d*)/g.exec(t);return e?+e[1]:null}(i);if(null===e)return[null,null];const[n,a]=Rd(o);return["center",(a-n)/(gu(o)?t.length:t.length-1)*e+n]}if("axisY"===t&&function(t){return uu(t,"parallel").length>0}(o))return du(o)?["center","horizontal"]:["center","vertical"];if("axisLinear"===t){const[t]=Rd(o);return["center",t]}return"axisArc"===t?"inner"===e[0]?["inner",null]:["outer",null]:fu(o)||hu(o)?["center",null]:"axisX"===t&&function(t){return uu(t,"reflect").length>0}(o)||"axisX"===t&&function(t){return uu(t,"reflectY").length>0}(o)?["top",null]:e}function Dd(t,e,n,r,o,i,a){const[s]=Rd(a),c=[r.position||e,null!=s?s:n];return"string"==typeof t&&t.startsWith("axis")?Fd(t,c,o,i,a):"string"==typeof t&&t.startsWith("legend")&&fu(a)&&"center"===r.position?["center","vertical"]:c}function $d(t,e,n,r,o,i){const{type:a}=t;if(!["left","right","bottom","top"].includes(r))return;if("string"!=typeof a)return;const s=a;return(s.startsWith("axis")?Xd:s.startsWith("group")?Wd:s.startsWith("legendContinuous")?Gd:"legendCategory"===s?Vd:s.startsWith("slider")?Yd:"title"===s?qd:s.startsWith("scrollbar")?Hd:()=>{})(t,e,n,r,o,i)}function Wd(t,e,n,r,o,i){const{children:a}=t,s=Ye(a,t=>t.crossPadding);a.forEach(t=>t.crossPadding=s),a.forEach(t=>$d(t,e,n,r,o,i));const c=Ye(a,t=>t.size);t.size=c,a.forEach(t=>t.size=c)}function Hd(t,e,n,r,o,i){const{trackSize:a=6}=(0,N.A)({},o.scrollbar,t);t.size=a}function qd(t,e,n,r,o,i){const a=(0,N.A)({},o.title,t),{title:s,subtitle:c,spacing:l=0}=a,u=Ld(a,["title","subtitle","spacing"]);if(s){const e=tp(s,xt(u,"title"));t.size=e.height}if(c){const e=tp(c,xt(u,"subtitle"));t.size+=l+e.height}}function Yd(t,e,n,r,o,i){const{trackSize:a,handleIconSize:s}=(()=>{const{slider:e}=o;return(0,N.A)({},e,t)})(),c=Math.max(a,2.4*s);t.size=c}function Xd(t,e,n,r,o,i){var a,s;t.transform=t.transform||[{type:"hide"}];const c="left"===r||"right"===r,l=Jd(t,r,o),{tickLength:u=0,labelSpacing:f=0,titleSpacing:d=0,labelAutoRotate:p}=l,h=Ld(l,["tickLength","labelSpacing","titleSpacing","labelAutoRotate"]),g=Kd(t,i),m=Ud(h,g);let y=u;if("function"==typeof t.tickLength){const e=((null===(a=g.getTicks)||void 0===a?void 0:a.call(g))||g.getOptions().domain).map((e,n,r)=>t.tickLength(e,n,r));y=Math.max(...e,0)}const b=y+f;if(m&&m.length){const r=Ye(m,t=>t.width),o=Ye(m,t=>t.height);if(c)t.size=r+b;else{const{tickFilter:i,labelTransform:a}=t;!function(t,e,n,r,o){const i=qe(e,t=>t.width);if(i>n)return!0;const a=t.clone();a.update({range:[0,n]});const s=Qd(t,o),c=s.map(t=>a.map(t)+function(t,e){if(!t.getBandWidth)return 0;const n=t.getBandWidth(e)/2;return n}(a,t)),l=s.map((t,e)=>e),u=-r[0],f=n+r[1],d=(t,e)=>{const{width:n}=e;return[t-n/2,t+n/2]};for(let t=0;t<l.length;t++){const n=c[t],[r,o]=d(n,e[t]);if(r<u||o>f)return!0;const i=c[t+1];if(i){const[n]=d(i,e[t+1]);if(o>n)return!0}}return!1}(g,m,e,n,i)||a||!1===p||null===p?(t.labelTransform=null!==(s=t.labelTransform)&&void 0!==s?s:"rotate(0)",t.size=o+b):(t.labelTransform="rotate(90)",t.size=r+b)}}else t.size=y;const v=Zd(h);v&&(t.size+=c?d+v.width:d+v.height)}function Gd(t,e,n,r,o,i){const a=(()=>{const{legendContinuous:e}=o;return(0,N.A)({},e,t)})(),{labelSpacing:s=0,titleSpacing:c=0}=a,l=Ld(a,["labelSpacing","titleSpacing"]),u="left"===r||"right"===r,f=xt(l,"ribbon"),{size:d}=f,p=xt(l,"handleIcon"),{size:h}=p,g=Math.max(d,2.4*h);t.size=g;const m=Ud(l,Kd(t,i));if(m){const e=u?"width":"height",n=Ye(m,t=>t[e]);t.size+=n+s}const y=Zd(l);y&&(u?t.size=Math.max(t.size,y.width):t.size+=c+y.height)}function Vd(t,e,n,r,o,i){const a=(()=>{const{legendCategory:e}=o,{title:n}=t,[r,i]=Array.isArray(n)?[n,void 0]:[void 0,n];return(0,N.A)({title:r},e,Object.assign(Object.assign({},t),{title:i}))})(),{focus:s,itemSpacing:c,focusMarkerSize:l,itemMarkerSize:u,titleSpacing:f,rowPadding:d,colPadding:p,maxCols:h=1/0,maxRows:g=1/0}=a,m=Ld(a,["focus","itemSpacing","focusMarkerSize","itemMarkerSize","titleSpacing","rowPadding","colPadding","maxCols","maxRows"]),{cols:y,length:b}=t,v=t=>Math.min(t,g),x=t=>Math.min(t,h),O="left"===r||"right"===r,w=void 0===b?e+(O?0:n[0]+n[1]):b,j=Kd(t,i),{render:k}=t;if(k&&"undefined"!=typeof document){const e=j.getOptions().domain,{labelFormatter:n}=m,r=t=>n?"string"==typeof n?(0,ze.GP)(n)(t):n(t):`${t}`,o=e.map((t,e)=>({id:t,index:e,label:r(t),value:t,color:j.map(t)})),i=k(o,m),a=document.createElement("div"),{width:s,height:c}=t,l={position:"absolute",visibility:"hidden",top:"-9999px"};s?l.width=`${s}px`:O||(l.width=`${w}px`),c?l.height=`${c}px`:O&&(l.height=`${w}px`),Object.assign(a.style,l),"string"==typeof i?a.innerHTML=i:i instanceof HTMLElement&&a.appendChild(i),document.body.appendChild(a);const u=a.getBoundingClientRect();return document.body.removeChild(a),void(t.size=O?u.width:u.height)}const A=Zd(m),M=Ud(m,j,"itemLabel"),_=void 0!==m.itemValueText?Ud(m,j,"itemValue"):null,S=Math.max(M[0].height,u,...(null==_?void 0:_[0])?[_[0].height]:[])+d,E=(t,e=0)=>{let n=u+t+c[0]+e;return(null==_?void 0:_[0])&&(n+=_[0].width+c[1]),s&&(n+=l+c[2]),n};O?(()=>{let e=-1/0,n=0,r=1,o=0,i=-1/0,a=-1/0;const s=A?A.height:0,c=w-s;for(const{width:t}of M){const s=E(t,p);e=Math.max(e,s),n+S>c?(r++,i=Math.max(i,o),a=Math.max(a,n),o=1,n=S):(n+=S,o++)}r<=1&&(i=o,a=n),t.size=e*x(r),t.length=a+s,(0,N.A)(t,{cols:x(r),gridRow:i})})():"number"==typeof y?(()=>{const e=Math.ceil(M.length/y),n=Ye(M,t=>E(t.width))*y;t.size=S*v(e)-d,t.length=Math.min(n,w)})():(()=>{let e=1,n=0,r=-1/0;for(const{width:t}of M){const o=E(t,p);n+o>w?(r=Math.max(r,n),n=o,e++):n+=o}1===e&&(r=n),t.size=S*v(e)-d,t.length=r})(),A&&(O?t.size=Math.max(t.size,A.width):t.size+=f+A.height)}function Kd(t,e){const[n]=au("scale",e),{scales:r,tickCount:o,tickMethod:i}=t,a=r.find(t=>"constant"!==t.type&&"identity"!==t.type);return void 0!==o&&(a.tickCount=o),void 0!==i&&(a.tickMethod=i),n(a)}function Ud(t,e,n="label"){const{labelFormatter:r,tickFilter:o,label:i=!0}=t,a=Ld(t,["labelFormatter","tickFilter","label"]);if(!i)return null;const s=function(t,e,n){const r=Qd(t,n),o=r.map(t=>"number"==typeof t?Ze(t):t),i=e?"string"==typeof e?(0,ze.GP)(e):e:t.getFormatter?t.getFormatter():t=>`${t}`;return o.map(i)}(e,r,o),c=xt(a,n),l=s.map((t,e)=>Object.fromEntries(Object.entries(c).map(([n,r])=>[n,"function"==typeof r?r(t,e):r]))),u=s.map((t,e)=>tp(t,l[e])),f=l.some(t=>t.transform);if(!f){const e=s.map((t,e)=>e);t.indexBBox=new Map(e.map(t=>[t,[s[t],u[t]]]))}return u}function Zd(t){const{title:e}=t,n=Ld(t,["title"]);if((t=>!1===t||null===t)(e)||void 0===e)return null;const r=xt(n,"title"),{direction:o,transform:i}=r,a=Array.isArray(e)?e.join(","):e;if("string"!=typeof a)return null;return tp(a,Object.assign(Object.assign({},r),{transform:i||("vertical"===o?"rotate(-90)":"")}))}function Jd(t,e,n){const{title:r}=t,[o,i]=Array.isArray(r)?[r,void 0]:[void 0,r],{axis:a,[`axis${gt(e)}`]:s}=n;return(0,N.A)({title:o},a,s,Object.assign(Object.assign({},t),{title:i}))}function Qd(t,e){const n=t.getTicks?t.getTicks():t.getOptions().domain;return e?n.filter(e):n}function tp(t,e){const n=function(t){return t instanceof l.q9?t:new l.EY({style:{text:`${t}`}})}(t),r=Ld(e,["filter"]);n.attr(Object.assign(Object.assign({},r),{visibility:"none"}));return n.getBBox()}function ep(t,e){let n;if(void 0===e)for(const e of t)null!=e&&(n>e||void 0===n&&e>=e)&&(n=e);else{let r=-1;for(let o of t)null!=(o=e(o,++r,t))&&(n>o||void 0===n&&o>=o)&&(n=o)}return n}function np(t,e,n,r){var o,i,a,s;const{width:c,height:l,depth:u,x:f=0,y:d=0,z:p=0,inset:h=(null!==(o=n.inset)&&void 0!==o?o:0),insetLeft:g=h,insetTop:m=h,insetBottom:y=h,insetRight:b=h,margin:v=(null!==(i=n.margin)&&void 0!==i?i:0),marginLeft:x=v,marginBottom:O=v,marginTop:w=v,marginRight:j=v,padding:A=n.padding,paddingBottom:M=A,paddingLeft:_=A,paddingRight:S=A,paddingTop:E=A}=function(t,e,n,r){const{coordinates:o}=e;if(!fu(o)&&!hu(o))return e;const i=t.filter(t=>"string"==typeof t.type&&t.type.startsWith("axis"));if(0===i.length)return e;const a=i.map(t=>Jd(t,"axisArc"===t.type?"arc":"linear",n)),s=Ye(a,t=>{var e;return null!==(e=t.labelSpacing)&&void 0!==e?e:0}),c=i.flatMap((t,e)=>Ud(a[e],Kd(t,r))).filter(bt),l=Ye(c,t=>t.height)+s,u=i.flatMap((t,e)=>Zd(a[e])).filter(t=>null!==t),f=0===u.length?0:Ye(u,t=>t.height),{inset:d=l,insetLeft:p=d,insetBottom:h=d,insetTop:g=d+f,insetRight:m=d}=e;return Object.assign(Object.assign({},e),{insetLeft:p,insetBottom:h,insetTop:g,insetRight:m})}(t,e,n,r),P=16===x&&"auto"===_,L=16===j&&"auto"===S,C=k(e,"coordinates",[]).some(t=>"transpose"===t.type),z=t.find(({type:t})=>"axisX"===t),{size:T,labelTransform:B}=z||{},I=(t,n,r,o,i)=>{const{marks:a}=e;if(0===a.length)return[o,i];if(t-o-i-.25*t>0)return[o,i];const s=.75*t;return["auto"===n?s*o/(o+i):o,"auto"===r?s*i/(o+i):i]},N=t=>"auto"===t?20:null!=t?t:20,R=N(E),F=N(M),D=rp(t,l-R-F,[R+w,F+O],["left","right"],e,n,r),{paddingLeft:$,paddingRight:W}=D,H=c-x-j;let[q,Y]=I(H,_,S,$,W),X=H-q-Y;const G=rp(t,X,[q+x,Y+j],["bottom","top"],e,n,r),{paddingTop:V,paddingBottom:K}=G,U=l-O-w,[Z,J]=I(U,M,E,K,V),Q=U-Z-J;if(T&&!C&&!B){const{fontSize:t=12,fontFamily:e="sans-serif",scales:n=[]}=z,r=null!==(s=null===(a=null==n?void 0:n[0])||void 0===a?void 0:a.domain)&&void 0!==s?s:[];if(!r.length)return;const o=(n,r,o,i)=>{const a=eo(r,{fontSize:t,fontFamily:e}),s=a/2-o-i;s>0&&(X-=s,"left"===n?q+=a/2-o:Y+=a/2-o)};P&&o("left",function(t){if($e(t))return t[0]}(r),x,q),L&&o("right",Ho(r),j,Y)}return{width:c,height:l,depth:u,insetLeft:g,insetTop:m,insetBottom:y,insetRight:b,innerWidth:X,innerHeight:Q,paddingLeft:q,paddingRight:Y,paddingTop:J,paddingBottom:Z,marginLeft:x,marginBottom:O,marginTop:w,marginRight:j,x:f,y:d,z:p}}function rp(t,e,n,r,o,i,a){const s=C(t,t=>t.position),{padding:c=i.padding,paddingLeft:l=c,paddingRight:u=c,paddingBottom:f=c,paddingTop:d=c}=o,p={paddingBottom:f,paddingLeft:l,paddingTop:d,paddingRight:u};for(const t of r){const r=`padding${gt(lc(t))}`,o=s.get(t)||[],c=p[r],l=t=>{void 0===t.size&&(t.size=t.defaultSize)},u=t=>{"group"===t.type?(t.children.forEach(l),t.size=Ye(t.children,t=>t.size)):t.size=t.defaultSize},f=r=>{r.size||("auto"!==c?u(r):($d(r,e,n,t,i,a),l(r)))},d=t=>{t.type.startsWith("axis")&&void 0===t.labelAutoHide&&(t.labelAutoHide=!0)},h="bottom"===t||"top"===t,g=ep(o,t=>t.order),m=o.filter(t=>t.type.startsWith("axis")&&t.order==g);if(m.length&&(m[0].crossPadding=0),"number"==typeof c)o.forEach(l),o.forEach(d);else if(0===o.length)p[r]=0;else{const t=Td(o,h?e+n[0]+n[1]:e);t.forEach(f);const i=t.reduce((t,{size:e,crossPadding:n=12})=>t+e+n,0);p[r]=i}}return p}function op({width:t,height:e,paddingLeft:n,paddingRight:r,paddingTop:o,paddingBottom:i,marginLeft:a,marginTop:s,marginBottom:c,marginRight:l,innerHeight:u,innerWidth:f,insetBottom:d,insetLeft:p,insetRight:h,insetTop:g}){const m=n+a,y=o+s,b=r+l,v=i+c,x=t-a-l,O=[m+p,y+g,f-p-h,u-g-d,"center",null,null];return{top:[m,0,f,y,"vertical",!0,Ec.A,a,x],right:[t-b,y,b,u,"horizontal",!1,Ec.A],bottom:[m,e-v,f,v,"vertical",!1,Ec.A,a,x],left:[0,y,m,u,"horizontal",!0,Ec.A],"top-left":[m,0,f,y,"vertical",!0,Ec.A],"top-right":[m,0,f,y,"vertical",!0,Ec.A],"bottom-left":[m,e-v,f,v,"vertical",!1,Ec.A],"bottom-right":[m,e-v,f,v,"vertical",!1,Ec.A],center:O,inner:O,outer:O}}function ip(t,e,n,r){const[o,i]=Re(t,t=>!("string"!=typeof t.type||!t.type.startsWith("axis")));!function(t,e,n,r){"center"===r?function(t){return sn(t)&&rn(t)}(e)?function(t,e,n){const[r,o,i,a]=n;for(const e of t)e.bbox={x:r,y:o,width:i,height:a},e.radar={index:t.indexOf(e),count:t.length}}(t,0,n):rn(e)?function(t,e,n){const[r,o,i,a]=n;for(const e of t)e.bbox={x:r,y:o,width:i,height:a}}(t,0,n):sn(e)&&function(t,e,n,r){"horizontal"===r?function(t,e,n){const[r,o,i]=n,a=new Array(t.length).fill(0),s=e.map(a),c=s.filter((t,e)=>e%2==1).map(t=>t+o);for(let e=0;e<t.length;e++){const n=c[e];t[e].bbox={x:r,y:n,width:i,height:c[e+1]-n}}}(t,e,n):"vertical"===r&&function(t,e,n){const[r,o,,i]=n,a=new Array(t.length).fill(0),s=e.map(a),c=s.filter((t,e)=>e%2==0).map(t=>t+r);for(let e=0;e<t.length;e++){const n=c[e];t[e].bbox={x:n,y:o,width:c[e+1]-n,height:i}}}(t,e,n)}(t,e,n,t[0].orientation):"inner"===r?function(t,e,n){const[r,o,,i]=n,[a,s]=e.getCenter(),[c]=fn(e),l=i/2,u=c*l,f=a-u,d=s-u;for(let e=0;e<t.length;e++){t[e].bbox={x:r+f,y:o+d,width:2*u,height:2*u}}}(t,e,n):"outer"===r&&function(t,e,n){const[r,o,i,a]=n;for(const e of t)e.bbox={x:r,y:o,width:i,height:a}}(t,0,n)}(o,e,n,r),function(t,e,n){if(0===t.length)return;const[r,o,i,a]=n,[s]=fn(e),c=a/2*s/Math.sqrt(2),l=r+i/2,u=o+a/2;for(let e=0;e<t.length;e++){t[e].bbox={x:l-c,y:u-c,width:2*c,height:2*c}}}(i,e,n)}function ap(t,e,n){const[r,o,i,a,s,c,l,u,f]=n,[d,p,h,g,m,y,b,v]="vertical"===s?["y",o,"x",r,"height",a,"width",i]:["x",r,"y",o,"width",i,"height",a];t.sort((t,e)=>null==l?void 0:l(t.order,e.order));const x=t=>"title"===t||"group"===t||t.startsWith("legend"),O=(t,e,n)=>void 0===n?e:x(t)?n:e,w=(t,e,n)=>void 0===n?e:x(t)?n:e;for(let e=0,n=c?p+y:p;e<t.length;e++){const r=t[e],{crossPadding:o=0,type:i}=r,{size:a}=r;r.bbox={[d]:c?n-a-o:n+o,[h]:w(i,g,u),[m]:a,[b]:O(i,v,f)},n+=(a+o)*(c?-1:1)}const j=t.filter(t=>"group"===t.type);for(const t of j){const{bbox:e,children:n}=t,r=e[b],o=r/n.length,i=n.reduce((t,e)=>{var n;const r=null===(n=e.layout)||void 0===n?void 0:n.justifyContent;return r||t},"flex-start"),a=n.map((t,e)=>{const{length:r=o,padding:i=0}=t;return r+(e===n.length-1?0:i)}),s=r-qe(a);for(let t=0,r=e[h]+("flex-start"===i?0:"center"===i?s/2:s);t<n.length;t++){const o=n[t],{padding:s=0}=o,c=t===n.length-1?0:s;o.bbox={[m]:e[m],[d]:e[d],[h]:r,[b]:a[t]-c},(0,N.A)(o,{layout:{justifyContent:i}}),r+=a[t]}}}function sp(t,e,n={},r=!1){if(At(t))return t;if(Array.isArray(t)&&r)return t;const o=xt(t,e);return(0,N.A)(n,o)}function cp(t,e={}){return At(t)||Array.isArray(t)?t:lp(t)?(0,N.A)(e,t):t}function lp(t){if(0===Object.keys(t).length)return!0;const{title:e,items:n}=t;return void 0!==e||void 0!==n}function up(t,e){return"object"==typeof t?xt(t,e):t}var fp=function(t,e,n,r){return new(n||(n=Promise))(function(o,i){function a(t){try{c(r.next(t))}catch(t){i(t)}}function s(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){t.done?o(t.value):function(t){return t instanceof n?t:new n(function(e){e(t)})}(t.value).then(a,s)}c((r=r.apply(t,e||[])).next())})},dp=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const pp=Symbol("CALLBACK_ITEM");function hp(t,e,n){const{encode:r={},scale:o={},transform:i=[]}=e,a=dp(e,["encode","scale","transform"]);return[t,Object.assign(Object.assign({},a),{encode:r,scale:o,transform:i})]}function gp(t,e,n){return fp(this,void 0,void 0,function*(){const{library:t}=n,{data:r}=e,[o]=au("data",t),i=function(t){if((0,tt.A)(t))return{type:"inline",value:t};if(!t)return{type:"inline",value:null};if(Array.isArray(t))return{type:"inline",value:t};const{type:e="inline"}=t,n=dp(t,["type"]);return Object.assign(Object.assign({},n),{type:e})}(r),{transform:a=[]}=i,s=[dp(i,["transform"]),...a].map(t=>o(t,n)),c=yield function(t){return t.reduce((t,e)=>n=>ct(this,void 0,void 0,function*(){const r=yield t(n);return e(r)}),pt)}(s)(r),l=!r||Array.isArray(r)||Array.isArray(c)?c:{value:c};return[Array.isArray(c)?Be(c):[],Object.assign(Object.assign({},e),{data:l})]})}function mp(t,e,n){const{encode:r}=e;if(!r)return[t,e];const o={};for(const[t,e]of Object.entries(r))if(Array.isArray(e))for(let n=0;n<e.length;n++){o[`${t}${0===n?"":n}`]=e[n]}else o[t]=e;return[t,Object.assign(Object.assign({},e),{encode:o})]}function yp(t,e,n){const{encode:r,data:o}=e;if(!r)return[t,e];const i=Te(r,t=>{if(function(t){if("object"!=typeof t||t instanceof Date||null===t)return!1;const{type:e}=t;return bt(e)}(t))return t;const e=function(t,e){return"function"==typeof e?"transform":"string"==typeof e&&function(t,e){return!!Array.isArray(t)&&t.some(t=>void 0!==t[e])}(t,e)?"field":"constant"}(o,t);return{type:e,value:t}});return[t,Object.assign(Object.assign({},e),{encode:i})]}function bp(t,e,n){const{encode:r}=e;if(!r)return[t,e];const o=Te(r,(t,e)=>{const{type:n}=t;return"constant"!==n||function(t){return t.startsWith("x")||t.startsWith("y")||t.startsWith("position")||"enterDelay"===t||"enterDuration"===t||"updateDelay"===t||"updateDuration"===t||"exitDelay"===t||"exitDuration"===t}(e)?t:Object.assign(Object.assign({},t),{constant:!0})});return[t,Object.assign(Object.assign({},e),{encode:o})]}function vp(t,e,n){const{encode:r,data:o}=e;if(!r)return[t,e];const{library:i}=n,a=function(t){const[e]=au("encode",t);return(t,n)=>void 0===n||void 0===t?null:Object.assign(Object.assign({},n),{type:"column",value:e(n)(t),field:Ep(n)})}(i),s=Te(r,t=>a(o,t));return[t,Object.assign(Object.assign({},e),{encode:s})]}function xp(t,e,n){const{tooltip:r={}}=e;return At(r)?[t,e]:Array.isArray(r)?[t,Object.assign(Object.assign({},e),{tooltip:{items:r}})]:kt(r)&&lp(r)?[t,Object.assign(Object.assign({},e),{tooltip:r})]:[t,Object.assign(Object.assign({},e),{tooltip:{items:[r]}})]}function Op(t,e,n){const{data:r,encode:o,tooltip:i={}}=e;if(At(i))return[t,e];const a=e=>{if(!e)return e;if("string"==typeof e)return t.map(t=>({name:e,value:r[t][e]}));if(kt(e)){const{field:n,channel:i,color:a,name:s=n,valueFormatter:c=t=>t}=e,l="string"==typeof c?(0,ze.GP)(c):c,u=i&&o[i],f=s||u&&o[i].field||i,d=[];for(const e of t){d[e]={name:f,color:a,value:l(n?r[e][n]:u?o[i].value[e]:null)}}return d}if("function"==typeof e){const n=[];for(const i of t){const t=e(r[i],i,r,o);n[i]=kt(t)?Object.assign(Object.assign({},t),{[pp]:!0}):{value:t}}return n}return e},{title:s,items:c=[]}=i,l=dp(i,["title","items"]),u=Object.assign({title:a(s),items:Array.isArray(c)?c.map(a):[]},l);return[t,Object.assign(Object.assign({},e),{tooltip:u})]}function wp(t,e,n){const{encode:r}=e,o=dp(e,["encode"]);if(!r)return[t,e];const i=Object.entries(r),a=i.filter(([,t])=>{const{value:e}=t;return Array.isArray(e[0])}).flatMap(([e,n])=>{const r=[[e,new Array(t.length).fill(void 0)]],{value:o}=n,i=dp(n,["value"]);for(let n=0;n<o.length;n++){const i=o[n];if(Array.isArray(i))for(let o=0;o<i.length;o++){const a=r[o]||[`${e}${o}`,new Array(t).fill(void 0)];a[1][n]=i[o],r[o]=a}}return r.map(([t,e])=>[t,Object.assign({type:"column",value:e},i)])}),s=Object.fromEntries([...i,...a]);return[t,Object.assign(Object.assign({},o),{encode:s})]}function jp(t,e,n){const{axis:r={},legend:o={},slider:i={},scrollbar:a={}}=e,s=(t,e)=>{if("boolean"==typeof t)return t?{}:null;const n=t[e];return void 0===n||n?n:null},c="object"==typeof r?Array.from(new Set(["x","y","z",...Object.keys(r)])):["x","y","z"];return(0,N.A)(e,{scale:Object.assign(Object.assign({},Object.fromEntries(c.map(t=>{const e=s(a,t);return[t,Object.assign({guide:s(r,t),slider:s(i,t),scrollbar:e},e&&{ratio:void 0===e.ratio?.5:e.ratio})]}))),{color:{guide:s(o,"color")},size:{guide:s(o,"size")},shape:{guide:s(o,"shape")},opacity:{guide:s(o,"opacity")}})}),[t,e]}function kp(t,e,n){const{animate:r}=e;return r||void 0===r||(0,N.A)(e,{animate:{enter:{type:null},exit:{type:null},update:{type:null}}}),[t,e]}function Ap(t,e,n){var r,o;return(0,N.A)(e,{scale:{series:Object.assign({key:`DEFAULT_${e.type}_SERIES_KEY`},null!==(o=null===(r=null==e?void 0:e.scale)||void 0===r?void 0:r.series)&&void 0!==o?o:{})}}),[t,e]}var Mp=function(t,e,n,r){return new(n||(n=Promise))(function(o,i){function a(t){try{c(r.next(t))}catch(t){i(t)}}function s(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){t.done?o(t.value):function(t){return t instanceof n?t:new n(function(e){e(t)})}(t.value).then(a,s)}c((r=r.apply(t,e||[])).next())})},_p=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};function Sp(t,e,n){return Mp(this,void 0,void 0,function*(){const[r,o]=yield function(t,e,n){return Mp(this,void 0,void 0,function*(){const{library:r}=n,[o]=au("transform",r),{preInference:i=[],postInference:a=[]}=e,{transform:s=[]}=t,c=[hp,gp,mp,yp,bp,vp,wp,kp,jp,xp,Ap,...i.map(o),...s.map(o),...a.map(o),Op];let l=[],u=t;for(const t of c)[l,u]=yield t(l,u,n);return[l,u]})}(t,e,n),{encode:i,scale:a,data:s,tooltip:c,key:l}=o;if(!1===Array.isArray(s))return null;const{channels:u}=e,f=B(Object.entries(i).filter(([,t])=>bt(t)),t=>t.map(([t,e])=>Object.assign({name:t},e)),([t])=>{var e;const n=null===(e=/([^\d]+)\d*$/.exec(t))||void 0===e?void 0:e[1],r=u.find(t=>t.name===n);return(null==r?void 0:r.independent)?t:n}),d=u.filter(t=>{const{name:e,required:n}=t;if(f.find(([t])=>t===e))return!0;if(n)throw new Error(`Missing encoding for channel: ${e}.`);return!1}).flatMap(t=>{const{name:e,scale:n,scaleKey:r,range:o,quantitative:i,ordinal:s}=t;return f.filter(([t])=>t.startsWith(e)).map(([t,e],c)=>{const u=e.some(t=>t.visual),f=e.some(t=>t.constant),d=a[t]||{},{independent:p=!1,key:h=r||t,type:g=(f?"constant":u?"identity":n)}=d,m=_p(d,["independent","key","type"]),y="constant"===g,b=y?void 0:o;return{name:t,values:e,scaleKey:p||y?Symbol("independent"):h,scale:Object.assign(Object.assign({type:g,markKey:l,range:b},m),{quantitative:i,ordinal:s})}})});return[o,Object.assign(Object.assign({},e),{index:r,channels:d,tooltip:c})]})}function Ep(t){const{type:e,value:n}=t;return"field"===e&&"string"==typeof n?n:null}var Pp=function(t,e,n,r){return new(n||(n=Promise))(function(o,i){function a(t){try{c(r.next(t))}catch(t){i(t)}}function s(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){t.done?o(t.value):function(t){return t instanceof n?t:new n(function(e){e(t)})}(t.value).then(a,s)}c((r=r.apply(t,e||[])).next())})},Lp=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};function Cp(t,e,n){return Pp(this,void 0,void 0,function*(){var r;const{library:o}=n,[i]=au("composition",o),[a]=au("interaction",o),s=new Set(Object.keys(o).map(t=>{var e;return null===(e=/mark\.(.*)/.exec(t))||void 0===e?void 0:e[1]}).filter(bt)),c=new Set(Object.keys(o).map(t=>{var e;return null===(e=/component\.(.*)/.exec(t))||void 0===e?void 0:e[1]}).filter(bt)),l=t=>{const{type:e}=t;if("function"==typeof e){const{props:t={}}=e,{composite:n=!0}=t;if(n)return"mark"}return"string"!=typeof e?e:s.has(e)||c.has(e)?"mark":e},u=t=>"mark"===l(t),f=t=>"standardView"===l(t),d=t=>{const{type:e}=t;return"string"==typeof e&&!!c.has(e)},p=t=>{if(f(t))return[t];const e=l(t);return i({type:e,static:d(t)})(t)},h=[],g=new Map,m=new Map,y=[t],b=[];for(;y.length;){const t=y.shift();if(f(t)){const e=m.get(t),[r,i]=e?Rp(e,t,o):yield Bp(t,n);g.set(r,t),h.push(r);const a=i.flatMap(p).map(t=>lu(t,o));if(y.push(...a),a.every(f)){const t=yield Promise.all(a.map(t=>Ip(t,n)));hd(t);for(let e=0;e<a.length;e++){m.set(a[e],t[e])}}}else{const e=p(u(t)?t:yield Qp(t,n));Array.isArray(e)?y.push(...e):"function"==typeof e&&b.push(e())}}n.emitter.emit(Lt);const v=new Map,x=new Map,O=[];e.selectAll(rh("view")).data(h,t=>t.key).join(t=>t.append("g").attr("className","view").attr("id",t=>t.key).call(zp).each(function(t,e,r){Fp(t,_t(r),O,n),v.set(t,r)}),t=>t.call(zp).each(function(t,e,r){Fp(t,_t(r),O,n),x.set(t,r)}),t=>t.each(function(t,e,n){const r=n.nameInteraction.values();for(const t of r)t.destroy()}).remove());const w=(t,e,r)=>Array.from(t.entries()).map(([o,i])=>{const a=r||new Map,s=(t,e=t=>t)=>a.set(t,e),c=g.get(o),l=function(t,e,n){const{library:r}=n,o=function(t){const[,e]=au("interaction",t);return t=>{const[n,r]=t;try{return[n,e(n)]}catch(t){return[n,r.type]}}}(r),i=t=>t[1]&&t[1].props&&t[1].props.reapplyWhenUpdate,a=Jp(e),s=a.map(o).filter(i).map(t=>t[0]);return(e,r,o)=>Pp(this,void 0,void 0,function*(){const i=[],[a,c]=yield Bp(e,n);Fp(a,t,i,n);for(const o of s.filter(t=>t!==r))Tp(o,t,e,a,n);for(const e of c)Cp(e,t,n);return o(),{options:e,view:a}})}(_t(i),c,n),u={view:o,container:i,options:c,setState:s,update:(n,r)=>Pp(this,void 0,void 0,function*(){const o=ht(Array.from(a.values()))(c);return yield l(o,n,()=>{(0,Le.A)(r)&&e(t,r,a)})})};return n.externals.update=u.update,n.externals.setState=s,u}),j=(t=x,e,r)=>{var o;const i=w(t,j,r);for(const t of i){const{options:r,container:s}=t,c=s.nameInteraction;let l=Jp(r);e&&(l=l.filter(t=>e.includes(t[0])));for(const e of l){const[r,s]=e,l=c.get(r);if(l&&(null===(o=l.destroy)||void 0===o||o.call(l)),s){const e=Np(t.view,r,s,a)(t,i,n.emitter);c.set(r,{destroy:e})}}}},k=w(v,j);for(const t of k){const{options:e}=t,r=new Map;t.container.nameInteraction=r;for(const o of Jp(e)){const[e,i]=o;if(i){const o=Np(t.view,e,i,a)(t,k,n.emitter);r.set(e,{destroy:o})}}}j();const{width:A,height:M}=t,_=[];for(const t of b){const r=new Promise(r=>Pp(this,void 0,void 0,function*(){for(const r of t){const t=Object.assign({width:A,height:M},r);yield Cp(t,e,n)}r()}));_.push(r)}n.views=h,null===(r=n.animations)||void 0===r||r.forEach(t=>null==t?void 0:t.cancel()),n.animations=O,n.emitter.emit(Ct);const S=O.filter(bt).map(Vp).map(t=>t.finished);return Promise.all([...S,..._])})}function zp(t){t.style("transform",t=>`translate(${t.layout.x}, ${t.layout.y})`)}function Tp(t,e,n,r,o){var i;const{library:a}=o,[s]=au("interaction",a),c=e.node().nameInteraction,l=Jp(n).find(([e])=>e===t),u=c.get(t);if(!u)return;if(null===(i=u.destroy)||void 0===i||i.call(u),!l[1])return;const f=Np(r,t,l[1],s),d={options:n,view:r,container:e.node(),update:t=>Promise.resolve(t)},p=f(d,[],o.emitter);c.set(t,{destroy:p})}function Bp(t,e){return Pp(this,void 0,void 0,function*(){const{library:n}=e,r=yield function(t,e){return Pp(this,void 0,void 0,function*(){const{library:n}=e,[r,o]=au("mark",n),i=new Set(Object.keys(n).map(t=>{var e;return null===(e=/component\.(.*)/.exec(t))||void 0===e?void 0:e[1]}).filter(bt)),{marks:a}=t,s=[],c=[],l=[...a],{width:u,height:f}=function(t){const{height:e,width:n,padding:r=0,paddingLeft:o=r,paddingRight:i=r,paddingTop:a=r,paddingBottom:s=r,margin:c=16,marginLeft:l=c,marginRight:u=c,marginTop:f=c,marginBottom:d=c,inset:p=0,insetLeft:h=p,insetRight:g=p,insetTop:m=p,insetBottom:y=p}=t,b=t=>"auto"===t?20:t;return{width:n-b(o)-b(i)-l-u-h-g,height:e-b(a)-b(s)-f-d-m-y}}(t),d={options:t,width:u,height:f};for(;l.length;){const[t]=l.splice(0,1),n=yield Qp(t,e),{type:a=mt("G2Mark type is required."),key:u}=n;if(i.has(a))c.push(n);else{const{props:t={}}=o(a),{composite:e=!0}=t;if(e){const{data:t}=n,e=Object.assign(Object.assign({},n),{data:t?Array.isArray(t)?t:t.value:t}),o=yield r(e,d),i=Array.isArray(o)?o:[o];l.unshift(...i.map((t,e)=>Object.assign(Object.assign({},t),{key:`${u}-${e}`})))}else s.push(n)}}return Object.assign(Object.assign({},t),{marks:s,components:c})})}(t,e),o=function(t){const{coordinate:e={},interaction:n={},style:r={},marks:o}=t,i=Lp(t,["coordinate","interaction","style","marks"]),a=o.map(t=>t.coordinate||{}),s=o.map(t=>t.interaction||{}),c=o.map(t=>t.viewStyle||{}),l=[...a,e].reduceRight((t,e)=>(0,N.A)(t,e),{}),u=[n,...s].reduce((t,e)=>(0,N.A)(t,e),{}),f=[...c,r].reduce((t,e)=>(0,N.A)(t,e),{});return Object.assign(Object.assign({},i),{marks:o,coordinate:l,interaction:u,style:f})}(r);t.interaction=o.interaction,t.coordinate=o.coordinate,t.marks=[...o.marks,...o.components];const i=lu(o,n);return Rp(yield Ip(i,e),i,n)})}function Ip(t,e){return Pp(this,void 0,void 0,function*(){const{library:n}=e,[r]=au("theme",n),[,o]=au("mark",n),{theme:i,marks:a,coordinates:s=[]}=t,c=r(Zp(i)),l=new Map;for(const t of a){const{type:n}=t,{props:r={}}=o(n),i=yield Sp(t,r,e);if(i){const[t,e]=i;l.set(t,e)}}const u=C(Array.from(l.values()).flatMap(t=>t.channels),({scaleKey:t})=>t);for(const t of u.values()){const e=t.reduce((t,{scale:e})=>(0,N.A)(t,e),{}),{scaleKey:r}=t[0],{values:o}=t[0],i=Array.from(new Set(o.map(t=>t.field).filter(bt))),a=(0,N.A)({guide:{title:0===i.length?void 0:i},field:i[0]},e),{name:l}=t[0],u=t.flatMap(({values:t})=>t.map(t=>t.value)),f=Object.assign(Object.assign({},ud(l,u,a,s,c,n)),{uid:Symbol("scale"),key:r});t.forEach(t=>t.scale=f)}return l})}function Np(t,e,n,r){return r((0,N.A)("string"==typeof e&&t.theme[e]||{},Object.assign({type:e},n)))}function Rp(t,e,n){var r;const[o]=au("mark",n),[i]=au("theme",n),[a]=au("labelTransform",n),{key:s,frame:c=!1,theme:l,clip:u,style:f={},labelTransform:d=[]}=e,p=i(Zp(l)),h=Array.from(t.values()),g=function(t,e){var n;const{components:r=[]}=e,o=["scale","encode","axis","legend","data","transform"],i=Array.from(new Set(t.flatMap(t=>t.channels.map(t=>t.scale)))),a=new Map(i.map(t=>[t.name,t]));for(const t of r){const e=gd(t);for(const r of e){const e=a.get(r),s=(null===(n=t.scale)||void 0===n?void 0:n[r])||{},{independent:c=!1}=s;if(e&&!c){const{guide:n}=e;e.guide=(0,N.A)({},"boolean"==typeof n?{}:n,t),Object.assign(e,s)}else{const e=Object.assign(Object.assign({},s),{expectedDomain:s.domain,name:r,guide:di(t,o)});i.push(e)}}}return i}(h,e),m=function(t){return t.map(t=>{const e=(0,N.A)(t,t.style);return delete e.style,e})}(Cd(function(t,e,n){var r;for(const[e]of n.entries())if("cell"===e.type)return t.filter(t=>"shape"!==t.name);if(1!==e.length||t.some(t=>"shape"===t.name))return t;const{defaultShape:o}=e[0];if(!["point","line","rect","hollow"].includes(o))return t;const i={point:"point",line:"hyphen",rect:"square",hollow:"hollow"},a=(null===(r=t.find(t=>"color"===t.name))||void 0===r?void 0:r.field)||null,s={field:a,name:"shape",type:"constant",domain:[],range:[i[o]]};return[...t,s]}(Array.from(g),h,t),e,n)),y=np(m,e,p,n),b=function(t,e,n){const[r]=au("coordinate",n),{innerHeight:o,innerWidth:i,insetLeft:a,insetTop:s,insetRight:c,insetBottom:l}=t,{coordinates:u=[]}=e,f=(d=u).find(t=>"cartesian"===t.type||"cartesian3D"===t.type)?d:[...d,{type:"cartesian"}];var d;const p="cartesian3D"===f[0].type,h=Object.assign(Object.assign({},t),{x:a,y:s,width:i-a-c,height:o-l-s,transformations:f.flatMap(r)});return p?new en.Coordinate3D(h):new en.Coordinate(h)}(y,e,n),v=c?(0,N.A)({mainLineWidth:1,mainStroke:"#000"},f):f;!function(t,e,n){const r=C(t,t=>`${t.plane||"xy"}-${t.position}`),{paddingLeft:o,paddingRight:i,paddingTop:a,paddingBottom:s,marginLeft:c,marginTop:l,marginBottom:u,marginRight:f,innerHeight:d,innerWidth:p,insetBottom:h,insetLeft:g,insetRight:m,insetTop:y,height:b,width:v,depth:x}=n,O={xy:op({width:v,height:b,paddingLeft:o,paddingRight:i,paddingTop:a,paddingBottom:s,marginLeft:c,marginTop:l,marginBottom:u,marginRight:f,innerHeight:d,innerWidth:p,insetBottom:h,insetLeft:g,insetRight:m,insetTop:y}),yz:op({width:x,height:b,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,marginLeft:0,marginTop:0,marginBottom:0,marginRight:0,innerWidth:x,innerHeight:b,insetBottom:0,insetLeft:0,insetRight:0,insetTop:0}),xz:op({width:v,height:x,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,marginLeft:0,marginTop:0,marginBottom:0,marginRight:0,innerWidth:v,innerHeight:x,insetBottom:0,insetLeft:0,insetRight:0,insetTop:0})};for(const[t,n]of r.entries()){const[r,o]=t.split("-"),i=O[r][o],[a,s]=Re(n,t=>"string"==typeof t.type&&("center"===o||!(!t.type.startsWith("axis")||!["inner","outer"].includes(o))));a.length&&ip(a,e,i,o),s.length&&ap(n,0,i)}}(Td(m),b,y),function(t){const e=t.find(({type:t})=>"axisX"===t),n=t.find(({type:t})=>"axisY"===t),r=t.find(({type:t})=>"axisZ"===t);e&&n&&r&&(e.plane="xy",n.plane="xy",r.plane="yz",r.origin=[e.bbox.x,e.bbox.y,0],r.eulerAngles=[0,-90,0],r.bbox.x=e.bbox.x,r.bbox.y=e.bbox.y,t.push(Object.assign(Object.assign({},e),{plane:"xz",showLabel:!1,showTitle:!1,origin:[e.bbox.x,e.bbox.y,0],eulerAngles:[-90,0,0]})),t.push(Object.assign(Object.assign({},n),{plane:"yz",showLabel:!1,showTitle:!1,origin:[n.bbox.x+n.bbox.width,n.bbox.y,0],eulerAngles:[0,-90,0]})),t.push(Object.assign(Object.assign({},r),{plane:"xz",actualPosition:"left",showLabel:!1,showTitle:!1,eulerAngles:[90,-90,0]})))}(m);const x=new Map(Array.from(t.values()).flatMap(t=>{const{channels:e}=t;return e.map(({scale:t})=>[t.uid,pd(t,n)])}));!function(t,e){const n=Array.from(t.values()).flatMap(t=>t.channels),r=B(n,t=>t.map(t=>e.get(t.scale.uid)),t=>t.name).filter(([,t])=>t.some(t=>"function"==typeof t.getOptions().groupTransform)&&t.every(t=>t.getTicks)).map(t=>t[1]);r.forEach(t=>{const e=t.map(t=>t.getOptions().groupTransform)[0];e(t)})}(t,x);const O={};for(const t of m){const{scales:e=[]}=t,o=[];for(const t of e){const{name:e,uid:i}=t,a=null!==(r=x.get(i))&&void 0!==r?r:pd(t,n);o.push(a),"y"===e&&a.update(Object.assign(Object.assign({},a.getOptions()),{xScale:O.x})),dd(O,{[e]:a})}t.scaleInstances=o}const w=[],j=new Map;for(const[e,n]of t.entries()){const{children:t,dataDomain:r,modifier:i,key:a,data:c}=e;j.set(a,c);const{index:l,channels:u,tooltip:f}=n,d=Te(Object.fromEntries(u.map(({name:t,scale:e})=>[t,e])),({uid:t})=>x.get(t));dd(O,d);const p=fd(u,d),h=o(e),[g,m,v]=Dp(h(l,d,p,b)),k=i?i(m,r||g.length,y):[],A=t=>{var e,n;return null===(n=null===(e=f.title)||void 0===e?void 0:e[t])||void 0===n?void 0:n.value},M=t=>f.items.map(e=>e[t]),_=g.map((t,e)=>{const n=Object.assign({points:m[e],transform:k[e],index:t,markKey:a,viewKey:s,data:c[t]},f&&{title:A(t),items:M(t)});for(const[r,o]of Object.entries(p))n[r]=o[t],v&&(n[`series${Ce(r)}`]=v[e].map(t=>o[t]));return v&&(n.seriesIndex=v[e]),v&&f&&(n.seriesItems=v[e].map(t=>M(t)),n.seriesTitle=v[e].map(t=>A(t))),n});n.data=_,n.index=g;const S=null==t?void 0:t(_,d,y);w.push(...S||[])}return[{layout:y,theme:p,coordinate:b,markState:t,key:s,clip:u,scale:O,style:v,components:m,data:j,options:e,labelTransform:ht(d.map(a))},w]}function Fp(t,e,n,r){return Pp(this,void 0,void 0,function*(){const{library:o}=r,{components:i,theme:a,layout:s,markState:c,coordinate:l,key:u,style:f,clip:d,scale:p}=t,{width:h,height:g}=s,m=Lp(s,["x","y","width","height"]),y=["view","plot","main","content"],b=y.map((t,e)=>e),v=y.map(t=>Ot(Object.assign({},a.view,f),t)),x=["a","margin","padding","inset"].map(t=>xt(m,t)),O=t=>t.style("x",t=>_[t].x).style("y",t=>_[t].y).style("width",t=>_[t].width).style("height",t=>_[t].height).each(function(t,e,n){!function(t,e){for(const[n,r]of Object.entries(e))t.style(n,r)}(_t(n),v[t])});let w=0,j=0,A=h,M=g;const _=b.map(t=>{const e=x[t],{left:n=0,top:r=0,bottom:o=0,right:i=0}=e;return w+=n,j+=r,A-=n+i,M-=r+o,{x:w,y:j,width:A,height:M}});e.selectAll(rh("area")).data(b.filter(t=>bt(v[t])),t=>y[t]).join(t=>t.append("rect").attr("className","area").style("zIndex",-2).call(O),t=>t.call(O),t=>t.remove());const S=function(t){let e=-1/0,n=1/0;for(const[r,o]of t){const{animate:t={}}=r,{data:i}=o,{enter:a={},update:s={},exit:c={}}=t,{type:l,duration:u=300,delay:f=0}=s,{type:d,duration:p=300,delay:h=0}=a,{type:g,duration:m=300,delay:y=0}=c;for(const t of i){const{updateType:r=l,updateDuration:o=u,updateDelay:i=f,enterType:a=d,enterDuration:s=p,enterDelay:c=h,exitDuration:b=m,exitDelay:v=y,exitType:x=g}=t;(void 0===r||r)&&(e=Math.max(e,o+i),n=Math.min(n,i)),(void 0===x||x)&&(e=Math.max(e,b+v),n=Math.min(n,v)),(void 0===a||a)&&(e=Math.max(e,s+c),n=Math.min(n,c))}}return e===-1/0?null:[n,e-n]}(c),E=!!S&&{duration:S[1]};for(const[,t]of z(i,t=>`${t.type}-${t.position}`))t.forEach((t,e)=>t.index=e);const P=e.selectAll(rh(Gc)).data(i,t=>`${t.type}-${t.position}-${t.index}`).join(t=>t.append("g").style("zIndex",({zIndex:t})=>t||-1).attr("className",Gc).append(t=>zd((0,N.A)({animate:E,scale:p},t),l,a,o,c)),t=>t.transition(function(t,e,n){const{preserve:r=!1}=t;if(r)return;const i=zd((0,N.A)({animate:E,scale:p},t),l,a,o,c),{attributes:s}=i,[u]=n.childNodes;return u.update(s,!1)})).transitions();n.push(...P.flat().filter(bt));const L=e.selectAll(rh("plot")).data([s],()=>u).join(t=>t.append("rect").style("zIndex",0).style("fill","transparent").attr("className","plot").call(th).call(nh,Array.from(c.keys())).call(oh,d),t=>t.call(nh,Array.from(c.keys())).call(th).call(oh,d)).transitions();n.push(...L.flat());for(const[i,a]of c.entries()){const{data:s}=a,{key:c,class:l,type:u}=i,f=e.select(`#${c}`),d=qp(i,a,t,r),p=Gp(i,a,t,o),h=Kp(i,a,t,o),g=Up(i,a,t,o),m=Wp(e,f,l,"element"),y=f.selectAll(rh(Xc)).selectFacetAll(m).data(s,t=>t.key,t=>t.groupKey).join(t=>t.append(d).attr("className",Xc).attr("markType",u).transition(function(t,e,n){return p(t,[n])}),t=>t.call(t=>{const e=t.parent(),n=vt(t=>{const[e,n]=t.getBounds().min;return[e,n]});t.transition(function(t,r,o){Hp(o,e,n);const i=d(t,r),a=h(t,[o],[i]);return(null==a?void 0:a.length)||(o.nodeName===i.nodeName&&"g"!==i.nodeName?yt(o,i):(o.parentNode.replaceChild(i,o),i.className=Xc,i.markType=u,i.__data__=o.__data__)),a}).each(function(t,e,n){n.__removed__&&(n.__removed__=!1)}).attr("markType",u).attr("className",Xc)}),t=>t.each(function(t,e,n){n.__removed__=!0}).transition(function(t,e,n){return g(t,[n])}).remove(),t=>t.append(d).attr("className",Xc).attr("markType",u).transition(function(t,e,n){const{__fromElements__:r}=n,o=h(t,r,[n]);return new St(r,null,n.parentNode).transition(o).remove(),o}),t=>t.transition(function(t,e,n){const r=new St([],n.__toData__,n.parentNode).append(d).attr("className",Xc).attr("markType",u).nodes();return h(t,[n],r)}).remove()).transitions();n.push(...y.flat())}!function(t,e,n,r,o){const[i]=au("labelTransform",r),{markState:a,labelTransform:s}=t,c=e.select(rh(Yc)).node(),l=new Map,u=new Map,f=Array.from(a.entries()).flatMap(([n,i])=>{const{labels:a=[],key:s}=n,c=function(t,e,n,r,o){const[i]=au("shape",r),{data:a,encode:s}=t,{data:c,defaultLabelShape:l}=e,u=c.map(t=>t.points),f=Te(s,t=>t.value),{theme:d,coordinate:p}=n,h=Object.assign(Object.assign({},o),{document:su(o),theme:d,coordinate:p});return t=>{const{index:e,points:n}=t,r=a[e],{formatter:o=t=>`${t}`,style:s,render:c,element:p}=t,g=Lp(t,["formatter","transform","style","render","selector","element"]),m=Te(Object.assign(Object.assign({},g),s),t=>$p(t,r,e,a,{channel:f,element:p})),{shape:y=l,text:b}=m,v=Lp(m,["shape","text"]),x="string"==typeof o?(0,ze.GP)(o):o,O=Object.assign(Object.assign({},v),{text:x(b,r,e,a),datum:r}),w=Object.assign({type:`label.${y}`,render:c},v);return i(w,h)(n,O,Yp(d,"label",y,"label"),u)}}(n,i,t,r,o),f=e.select(`#${s}`).selectAll(rh(Xc)).nodes().filter(t=>{var e;if(t.__removed__)return!1;return!("hidden"===(null===(e=t.style)||void 0===e?void 0:e.visibility)||t.children&&t.children.some(t=>{var e;return"hidden"===(null===(e=t.style)||void 0===e?void 0:e.visibility)}))});return a.flatMap((t,e)=>{const{transform:n=[]}=t,r=Lp(t,["transform"]);return f.flatMap(n=>{const o=function(t,e,n){const{seriesIndex:r,seriesKey:o,points:i,key:a,index:s}=n.__data__,c=function(t){const e=t.cloneNode(!0),n=t.getAnimations();e.style.visibility="hidden",n.forEach(t=>{const n=t.effect.getKeyframes();e.attr(n[n.length-1])}),t.parentNode.appendChild(e);const r=e.getLocalBounds();e.destroy();const{min:o,max:i}=r;return[o,i]}(n);if(!r)return[Object.assign(Object.assign({},t),{key:`${a}-${e}`,bounds:c,index:s,points:i,dependentElement:n})];const l=function(t){const{selector:e}=t;if(!e)return null;if("function"==typeof e)return e;if("first"===e)return t=>[t[0]];if("last"===e)return t=>[t[t.length-1]];throw new Error(`Unknown selector: ${e}`)}(t),u=r.map((r,a)=>Object.assign(Object.assign({},t),{key:`${o[a]}-${e}`,bounds:[i[a]],index:r,points:i,dependentElement:n}));return l?l(u):u}(r,e,n);return o.forEach(e=>{l.set(e,t=>c(Object.assign(Object.assign({},t),{element:n}))),u.set(e,t)}),o})})}),d=_t(c).selectAll(rh("label")).data(f,t=>t.key).join(t=>t.append(t=>l.get(t)(t)).attr("className","label"),t=>t.each(function(t,e,n){yt(n,l.get(t)(t))}),t=>t.remove()).nodes(),p=C(d,t=>u.get(t.__data__)),{coordinate:h,layout:g}=t,m={canvas:o.canvas,coordinate:h,layout:g};for(const[t,e]of p){const{transform:n=[]}=t;ht(n.map(i))(e,m)}s&&s(d,m)}(t,e,0,o,r),function(t,e,n,r){const o=t.scale,i=k(o,"y.options.breaks",[]),{document:a}=r.canvas;if([Vc,Kc].forEach(t=>{a.getElementsByClassName(t).forEach(t=>{t.remove()})}),!i.length)return;const s=e.select(rh("plot")).node(),[c]=au("shape",n),l=new Map;i.forEach((n,o)=>{l.set(n,c({type:"break"},{view:t,selection:e,context:r}))}),_t(s).selectAll(rh(Vc)).data(i,t=>t.key).join(t=>t.append((t,e)=>l.get(t)(t,e)).attr("className",Vc),t=>t.each(function(t,e,n){yt(n,l.get(t)(t,e))}),t=>t.remove()).nodes()}(t,e,o,r)})}function Dp([t,e,n]){if(n)return[t,e,n];const r=[],o=[];for(let n=0;n<t.length;n++){const i=t[n],a=e[n];a.every(([t,e])=>bt(t)&&bt(e))&&(r.push(i),o.push(a))}return[r,o]}function $p(t,e,n,r,o){return"function"==typeof t?t(e,n,r,o):"string"!=typeof t?t:kt(e)&&void 0!==e[t]?e[t]:t}function Wp(t,e,n,r){const o=t.node().parentElement;return o&&"function"==typeof o.findAll?o.findAll(t=>void 0!==t.style.facet&&t.style.facet===n&&t!==e.node()).flatMap(t=>t.getElementsByClassName(r)):[]}function Hp(t,e,n){if(!t.__facet__)return;const r=t.parentNode.parentNode,o=e.parentNode,[i,a]=n(r),[s,c]=n(o);!function(t,e){const{transform:n}=t.style,r=(t=>"none"===t||void 0===t)(n)?"":n;t.style.transform=`${r} ${e}`.trimStart()}(t,`translate(${i-s}, ${a-c})`),e.append(t)}function qp(t,e,n,r){const{library:o}=r,[i]=au("shape",o),{data:a,encode:s}=t,{defaultShape:c,data:l,shape:u}=e,f=Te(s,t=>t.value),d=l.map(t=>t.points),{theme:p,coordinate:h}=n,{type:g,style:m={}}=t,y=Object.assign(Object.assign({},r),{document:su(r),coordinate:h,theme:p});return e=>{const{shape:n=c}=m,{shape:r=n,points:o,seriesIndex:s,index:l}=e,h=Lp(e,["shape","points","seriesIndex","index"]),b=Object.assign(Object.assign({},h),{index:l}),v=s?s.map(t=>a[t]):a[l],x=s||l,O=Te(m,t=>$p(t,v,x,a,{channel:f}));return(u[r]?u[r](O,y):i(Object.assign(Object.assign({},O),{type:eh(t,r)}),y))(o,b,Yp(p,g,r,c),d)}}function Yp(t,e,n,r){if("string"!=typeof e)return;const{color:o}=t,i=t[e]||{};return Object.assign({color:o},i[n]||i[r])}function Xp(t,e,n,r,o){var i,a;const[,s]=au("shape",o),[c]=au("animation",o),{defaultShape:l,shape:u}=n,{theme:f,coordinate:d}=r,p=`default${Ce(t)}Animation`,{[p]:h}=(null===(i=u[l])||void 0===i?void 0:i.props)||s(eh(e,l)).props,{[t]:g={}}=f,m=(null===(a=e.animate)||void 0===a?void 0:a[t])||{},y={coordinate:d};return(e,n,r)=>{const{[`${t}Type`]:o,[`${t}Delay`]:i,[`${t}Duration`]:a,[`${t}Easing`]:s}=e,l=Object.assign({type:o||h},m);if(!l.type)return null;const u=c(l,y)(n,r,(0,N.A)(g,{delay:i,duration:a,easing:s}));let f=[];return f=Array.isArray(u)?u:[u],f.filter(Boolean)}}function Gp(t,e,n,r){return Xp("enter",t,e,n,r)}function Vp(t){return t.finished.then(()=>{t.cancel()}),t}function Kp(t,e,n,r){return Xp("update",t,e,n,r)}function Up(t,e,n,r){return Xp("exit",t,e,n,r)}function Zp(t={}){if("string"==typeof t)return{type:t};const{type:e="light"}=t,n=Lp(t,["type"]);return Object.assign(Object.assign({},n),{type:e})}function Jp(t){const{interaction:e={}}=t;return Object.entries((0,N.A)({event:!0,tooltip:!0,sliderFilter:!0,legendFilter:!0,scrollbarFilter:!0},e)).reverse()}function Qp(t,e){return Pp(this,void 0,void 0,function*(){const{data:n}=t,r=Lp(t,["data"]);if(null==n)return t;const[,{data:o}]=yield gp(0,{data:n},e);return Object.assign({data:o},r)})}function th(t){t.style("transform",t=>`translate(${t.paddingLeft+t.marginLeft}, ${t.paddingTop+t.marginTop})`).style("width",t=>t.innerWidth).style("height",t=>t.innerHeight)}function eh(t,e){const{type:n}=t;return"string"==typeof e?`${n}.${e}`:e}function nh(t,e){const n=t=>void 0!==t.class?`${t.class}`:"";if(0===t.nodes().length)return;t.selectAll(rh(qc)).data(e,t=>t.key).join(t=>t.append("g").attr("className",qc).attr("id",t=>t.key).style("facet",n).style("fill","transparent").style("zIndex",t=>{var e;return null!==(e=t.zIndex)&&void 0!==e?e:0}),t=>t.style("facet",n).style("fill","transparent").style("zIndex",t=>{var e;return null!==(e=t.zIndex)&&void 0!==e?e:0}),t=>t.remove());t.select(rh(Yc)).node()||t.append("g").attr("className",Yc).style("zIndex",0)}function rh(...t){return t.map(t=>`.${t}`).join("")}function oh(t,e){t.node()&&t.style("clipPath",t=>{if(!e)return null;const{paddingTop:n,paddingLeft:r,marginLeft:o,marginTop:i,innerWidth:a,innerHeight:s}=t;return new l.rw({style:{x:r+o,y:n+i,width:a,height:s}})})}function ih(t){const{style:e,scale:n,type:r}=t,o={},i=k(e,"columnWidthRatio");return i&&"interval"===r&&(o.x=Object.assign(Object.assign({},null==n?void 0:n.x),{padding:1-i})),Object.assign(Object.assign({},t),{scale:Object.assign(Object.assign({},n),o)})}const ah=t=>{if(!t||"string"!=typeof t)return t;const e=t.endsWith("%")?parseFloat(t.slice(0,-1))/100:parseFloat(t);if(isNaN(e)||e<0||e>1)throw new Error(`Invalid gap value: ${t}. It should be between 0 and 1.`);return e};function sh(t){const{axis:e}=t,n=k(e,"y.breaks");return n&&Hc(t,"scale.y.breaks",n.map(t=>Object.assign(Object.assign({key:`break-${t.start}-${t.end}`},t),{gap:ah(t.gap)}))),t}function ch(t){const e=function(t){return function(...t){return e=>t.reduce((t,e)=>e(t),e)}(ih,sh)(t)}(t);return e.children&&Array.isArray(e.children)&&(e.children=e.children.map(t=>ch(t))),e}function lh(t){const e=(0,N.A)({},t),n=new Map([[e,null]]),r=new Map([[null,-1]]),o=[e];for(;o.length;){const t=o.shift();if(void 0===t.key){const e=n.get(t),o=r.get(t);t.key=null===e?"0":`${e.key}-${o}`}const{children:e=[]}=t;if(Array.isArray(e))for(let i=0;i<e.length;i++){const a=(0,N.A)({},e[i]);e[i]=a,n.set(a,t),r.set(a,i),o.push(a)}}return e}function uh(t,e){const n=new u.A4;return n.registerPlugin(new O),new l.Hl({width:t,height:e,container:document.createElement("div"),renderer:n})}function fh(t,e={},n=()=>{},r=t=>{throw t}){const o=Pe(t),{width:i=640,height:a=480,depth:s=0}=o,c=lh(ch(o)),{canvas:l=uh(i,a),emitter:u=new A.A}=e;e.canvas=l,e.emitter=u,e.externals={};const{width:f,height:d}=l.getConfig();f===i&&d===a||l.resize(i,a),u.emit(Et);const p=_t(l.document.documentElement);return l.ready.then(()=>Cp(Object.assign(Object.assign({},c),{width:i,height:a,depth:s}),p,e)).then(()=>{if(s){const[t,e]=l.document.documentElement.getPosition();l.document.documentElement.setPosition(t,e,-s/2)}l.requestAnimationFrame(()=>{l.requestAnimationFrame(()=>{u.emit(Pt),null==n||n()})})}).catch(t=>{null==r||r(t)}),"string"==typeof(h=l.getConfig().container)?document.getElementById(h):h;var h}function dh(t,e={},n=!1,r=!0){const{canvas:o,emitter:i}=e;o&&(!function(t){const e=t.getRoot().querySelectorAll(".view");null==e||e.forEach(t=>{const{nameInteraction:e=new Map}=t;(null==e?void 0:e.size)>0&&Array.from(null==e?void 0:e.values()).forEach(t=>{null==t||t.destroy()})})}(o),n?o.destroy():o.destroyChildren()),r&&i.off()}function ph(t,e){let n,r=-1,o=-1;if(void 0===e)for(const e of t)++o,null!=e&&(n>e||void 0===n&&e>=e)&&(n=e,r=o);else for(let i of t)null!=(i=e(i,++o,t))&&(n>i||void 0===n&&i>=i)&&(n=i,r=o);return r}function hh(t,e){let n=0,r=0;if(void 0===e)for(let e of t)null!=e&&(e=+e)>=e&&(++n,r+=e);else{let o=-1;for(let i of t)null!=(i=e(i,++o,t))&&(i=+i)>=i&&(++n,r+=i)}if(n)return r/n}const gh=function(t,e,n){var r,o,i,a,s=0;n||(n={});var c=function(){s=!1===n.leading?0:Date.now(),r=null,a=t.apply(o,i),r||(o=i=null)},l=function(){var l=Date.now();s||!1!==n.leading||(s=l);var u=e-(l-s);return o=this,i=arguments,u<=0||u>e?(r&&(clearTimeout(r),r=null),s=l,a=t.apply(o,i),r||(o=i=null)):r||!1===n.trailing||(r=setTimeout(c,u)),a};return l.cancel=function(){clearTimeout(r),s=0,r=o=i=null},l};function mh(t){var e=document.createElement("div");e.innerHTML=t;var n=e.childNodes[0];return n&&e.contains(n)&&e.removeChild(n),n}const yh=function(t,e){return t&&e?t.replace(/\\?\{([^{}]+)\}/g,function(t,n){return"\\"===t.charAt(0)?t.slice(1):void 0===e[n]?"":e[n]}):t};var bh=function(t,e){null!=e?t.replaceChildren?Array.isArray(e)?t.replaceChildren.apply(t,(0,pn.fX)([],(0,pn.zs)(e),!1)):t.replaceChildren(e):(t.innerHTML="",Array.isArray(e)?e.forEach(function(e){return t.appendChild(e)}):t.appendChild(e)):t.innerHTML=""};function vh(t){return void 0===t&&(t=""),{CONTAINER:"".concat(t,"tooltip"),TITLE:"".concat(t,"tooltip-title"),LIST:"".concat(t,"tooltip-list"),LIST_ITEM:"".concat(t,"tooltip-list-item"),NAME:"".concat(t,"tooltip-list-item-name"),MARKER:"".concat(t,"tooltip-list-item-marker"),NAME_LABEL:"".concat(t,"tooltip-list-item-name-label"),VALUE:"".concat(t,"tooltip-list-item-value"),CROSSHAIR_X:"".concat(t,"tooltip-crosshair-x"),CROSSHAIR_Y:"".concat(t,"tooltip-crosshair-y")}}var xh={overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis"};function Oh(t){var e;void 0===t&&(t="");var n=vh(t);return(e={})[".".concat(n.CONTAINER)]={position:"absolute",visibility:"visible","z-index":8,transition:"visibility 0.2s cubic-bezier(0.23, 1, 0.32, 1), left 0.4s cubic-bezier(0.23, 1, 0.32, 1), top 0.4s cubic-bezier(0.23, 1, 0.32, 1)","background-color":"rgba(255, 255, 255, 0.96)","box-shadow":"0 6px 12px 0 rgba(0, 0, 0, 0.12)","border-radius":"4px",color:"rgba(0, 0, 0, 0.65)","font-size":"12px","line-height":"20px",padding:"12px","min-width":"120px","max-width":"360px","font-family":"Roboto-Regular"},e[".".concat(n.TITLE)]={color:"rgba(0, 0, 0, 0.45)"},e[".".concat(n.LIST)]={margin:"0px","list-style-type":"none",padding:"0px"},e[".".concat(n.LIST_ITEM)]={"list-style-type":"none",display:"flex","line-height":"2em","align-items":"center","justify-content":"space-between","white-space":"nowrap"},e[".".concat(n.MARKER)]={width:"8px",height:"8px","border-radius":"50%",display:"inline-block","margin-right":"4px"},e[".".concat(n.NAME)]={display:"flex","align-items":"center","max-width":"216px"},e[".".concat(n.NAME_LABEL)]=(0,pn.Cl)({flex:1},xh),e[".".concat(n.VALUE)]=(0,pn.Cl)({display:"inline-block",float:"right",flex:1,"text-align":"right","min-width":"28px","margin-left":"30px",color:"rgba(0, 0, 0, 0.85)"},xh),e[".".concat(n.CROSSHAIR_X)]={position:"absolute",width:"1px","background-color":"rgba(0, 0, 0, 0.25)"},e[".".concat(n.CROSSHAIR_Y)]={position:"absolute",height:"1px","background-color":"rgba(0, 0, 0, 0.25)"},e}var wh=function(t){function e(e){var n,r,o=this,i=null===(r=null===(n=e.style)||void 0===n?void 0:n.template)||void 0===r?void 0:r.prefixCls,a=vh(i);return(o=t.call(this,e,{data:[],x:0,y:0,visibility:"visible",title:"",position:"bottom-right",offset:[5,5],enterable:!1,container:{x:0,y:0},bounding:null,template:{prefixCls:"",container:'<div class="'.concat(a.CONTAINER,'"></div>'),title:'<div class="'.concat(a.TITLE,'"></div>'),item:'<li class="'.concat(a.LIST_ITEM,'" data-index={index}>\n <span class="').concat(a.NAME,'">\n <span class="').concat(a.MARKER,'" style="background:{color}"></span>\n <span class="').concat(a.NAME_LABEL,'" title="{name}">{name}</span>\n </span>\n <span class="').concat(a.VALUE,'" title="{value}">{value}</span>\n </li>')},style:Oh(i)})||this).timestamp=-1,o.prevCustomContentKey=o.attributes.contentKey,o.initShape(),o.render(o.attributes,o),o}return(0,pn.C6)(e,t),Object.defineProperty(e.prototype,"HTMLTooltipElement",{get:function(){return this.element},enumerable:!1,configurable:!0}),e.prototype.getContainer=function(){return this.element},Object.defineProperty(e.prototype,"elementSize",{get:function(){return{width:this.element.offsetWidth,height:this.element.offsetHeight}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"HTMLTooltipItemsElements",{get:function(){var t=this.attributes,e=t.template;return t.data.map(function(t,n){var r=t.name,o=void 0===r?"":r,i=t.color,a=void 0===i?"black":i,s=t.index,c=(0,pn.Tt)(t,["name","color","index"]),l=(0,pn.Cl)({name:o,color:a,index:null!=s?s:n},c);return mh(yh(e.item,l))})},enumerable:!1,configurable:!0}),e.prototype.render=function(t,e){this.renderHTMLTooltipElement(),this.updatePosition()},e.prototype.destroy=function(){var e;null===(e=this.element)||void 0===e||e.remove(),t.prototype.destroy.call(this)},e.prototype.show=function(t,e){var n=this;if(void 0!==t&&void 0!==e){var r=function(){n.attributes.x=null!=t?t:n.attributes.x,n.attributes.y=null!=e?e:n.attributes.y,n.updatePosition()};"hidden"===this.element.style.visibility?this.closeTransition(r):r()}this.element.style.visibility="visible"},e.prototype.hide=function(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.attributes.enterable&&this.isCursorEntered(t,e)||(this.element.style.visibility="hidden")},e.prototype.initShape=function(){this.element=mh(this.attributes.template.container),this.id&&this.element.setAttribute("id",this.id)},e.prototype.renderCustomContent=function(){if(void 0===this.prevCustomContentKey||this.prevCustomContentKey!==this.attributes.contentKey){this.prevCustomContentKey=this.attributes.contentKey;var t=this.attributes.content;t&&("string"==typeof t?this.element.innerHTML=t:bh(this.element,t))}},e.prototype.renderHTMLTooltipElement=function(){var t,e,n=this.attributes,r=n.template,o=n.title,i=n.enterable,a=n.style,s=n.content,c=vh(r.prefixCls),l=this.element;if(this.element.style.pointerEvents=i?"auto":"none",s)this.renderCustomContent();else{o?(l.innerHTML=r.title,l.getElementsByClassName(c.TITLE)[0].innerHTML=o):null===(e=null===(t=l.getElementsByClassName(c.TITLE))||void 0===t?void 0:t[0])||void 0===e||e.remove();var u=this.HTMLTooltipItemsElements,f=document.createElement("ul");f.className=c.LIST,bh(f,u);var d=this.element.querySelector(".".concat(c.LIST));d?d.replaceWith(f):l.appendChild(f)}!function(t,e){Object.entries(e).forEach(function(e){var n=(0,pn.zs)(e,2),r=n[0],o=n[1];(0,pn.fX)([t],(0,pn.zs)(t.querySelectorAll(r)),!1).filter(function(t){return t.matches(r)}).forEach(function(t){t&&(t.style.cssText+=Object.entries(o).reduce(function(t,e){return"".concat(t).concat(e.join(":"),";")},""))})})}(l,a)},e.prototype.getRelativeOffsetFromCursor=function(t){var e=this.attributes,n=e.offset,r=(t||e.position).split("-"),o={left:[-1,0],right:[1,0],top:[0,-1],bottom:[0,1]},i=this.elementSize,a=i.width,s=i.height,c=[-a/2,-s/2];return r.forEach(function(t){var e=(0,pn.zs)(c,2),r=e[0],i=e[1],l=(0,pn.zs)(o[t],2);c=[r+(a/2+n[0])*l[0],i+(s/2+n[1])*l[1]]}),c},e.prototype.setOffsetPosition=function(t){var e=(0,pn.zs)(t,2),n=e[1],r=this.attributes,o=r.x,i=r.y,a=void 0===i?0:i,s=r.container,c=s.y;this.element.style.left="".concat(+(void 0===o?0:o)+s.x+e[0],"px"),this.element.style.top="".concat(+a+c+n,"px")},e.prototype.updatePosition=function(){var t=this.attributes.showDelay,e=void 0===t?60:t,n=Date.now();this.timestamp>0&&n-this.timestamp<e||(this.timestamp=n,this.setOffsetPosition(this.autoPosition(this.getRelativeOffsetFromCursor())))},e.prototype.autoPosition=function(t){var e=(0,pn.zs)(t,2),n=e[0],r=e[1],o=this.attributes,i=o.bounding,a=o.position;if(!i)return[n,r];var s=this.element,c=s.offsetWidth,l=s.offsetHeight,u=(0,pn.zs)([+o.x+n,+o.y+r],2),f=u[0],d=u[1],p={left:"right",right:"left",top:"bottom",bottom:"top"},h=i.x,g=i.y,m={left:f<h,right:f+c>h+i.width,top:d<g,bottom:d+l>g+i.height},y=[];a.split("-").forEach(function(t){y.push(m[t]?p[t]:t)});var b=y.join("-");return this.getRelativeOffsetFromCursor(b)},e.prototype.isCursorEntered=function(t,e){if(this.element){var n=this.element.getBoundingClientRect();return new hi(n.x,n.y,n.width,n.height).isPointIn(t,e)}return!1},e.prototype.closeTransition=function(t){var e=this,n=this.element.style.transition;this.element.style.transition="none",t(),setTimeout(function(){e.element.style.transition=n},10)},e.tag="tooltip",e}(Sn),jh=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const kh="tooltipLocked";function Ah(t,e){var n;if(e)return"string"==typeof e?document.querySelector(e):e;const r=null===(n=t.ownerDocument)||void 0===n?void 0:n.defaultView;if(!r)return;return r.getContextService().getDomElement().parentElement}function Mh(t,e,n,r,o,i,a,s={},c=[10,10]){const l={[Je("tooltip")]:{},[Je("tooltip-title")]:{overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis"}},u=new wh({className:"tooltip",style:{x:e,y:n,container:a,data:[],bounding:i,position:r,enterable:o,title:"",offset:c,template:{prefixCls:"g2-"},style:(0,N.A)(l,s)}});return t.appendChild(u.HTMLTooltipElement),u}function _h({root:t,data:e,x:n,y:r,render:o,event:i,single:a,position:s="right-bottom",enterable:c=!1,css:l,mount:u,bounding:f,offset:d}){const p=Ah(t,u),h=Ah(t),g=a?h:t,m=f||function(t){const e=t.getRenderBounds(),{min:[n,r],max:[o,i]}=e;return{x:n,y:r,width:o-n,height:i-r}}(t),y=function(t,e){const n=t.getBoundingClientRect(),r=e.getBoundingClientRect();return{x:n.x-r.x,y:n.y-r.y}}(h,p),{tooltipElement:b=Mh(p,n,r,s,c,m,y,l,d)}=g,{items:v,title:x=""}=e;b.update(Object.assign({x:n,y:r,data:v.map(t=>Object.assign(Object.assign({},t),{value:t.value||0===t.value?t.value:""})),title:x,position:s,enterable:c,container:y},void 0!==o&&{content:o(i,{items:v,title:x})})),g.tooltipElement=b}function Sh({root:t,single:e,emitter:n,nativeEvent:r=!0,event:o=null}){r&&n.emit("tooltip:hide",{nativeEvent:r});const i=Ah(t),a=e?i:t,{tooltipElement:s}=a;s&&s.hide(null==o?void 0:o.clientX,null==o?void 0:o.clientY),Nh(t),Rh(t),Fh(t)}function Eh({root:t,single:e}){const n=Ah(t),r=e?n:t;if(!r)return;const{tooltipElement:o}=r;o&&(o.destroy(),r.tooltipElement=void 0),Nh(t),Rh(t),Fh(t)}function Ph(t){const{value:e}=t;return Object.assign(Object.assign({},t),{value:void 0===e?"undefined":e})}function Lh(t){const{__data__:e}=t;if(ut(t))return function(t){var e,n,r,o,i,a,s;const{__data__:c}=t,{title:l,items:u=[]}=c;if(u.some(t=>pp in t)){const e=u.filter(bt).map(e=>{var{color:n=Ch(t)}=e,r=jh(e,["color"]);return Object.assign(Object.assign({},r),{color:n})}).map(Ph);return Object.assign(Object.assign({},l&&{title:l}),{items:e})}const f=null!==(n=null===(e=null==c?void 0:c.normalized)||void 0===e?void 0:e.x)&&void 0!==n?n:0,d=null===(r=t.parentNode)||void 0===r?void 0:r.__data__,p=null!==(o=null==d?void 0:d.encode)&&void 0!==o?o:{},{x:h={},y:g={},color:m={}}=p,{value:y=[]}=h,{value:b=[]}=g,{value:v=[]}=m,x=Math.min(Math.round(y.length*f),y.length-1);return{title:`${y[x]}, ${b[x]}`,items:[{name:null!==(i=m.field)&&void 0!==i?i:"value",value:v[x],color:(null===(a=t.style)||void 0===a?void 0:a.fill)||(null===(s=t.getAttribute)||void 0===s?void 0:s.call(t,"color"))||"#000"}]}}(t);const{title:n,items:r=[]}=e,o=r.filter(bt).map(e=>{var{color:n=Ch(t)}=e,r=jh(e,["color"]);return Object.assign(Object.assign({},r),{color:n})}).map(Ph);return Object.assign(Object.assign({},n&&{title:n}),{items:o})}function Ch(t){const e=t.getAttribute("fill"),n=t.getAttribute("stroke"),{__data__:r}=t,{color:o=(e&&"transparent"!==e?e:n)}=r;return o}function zh(t,e=t=>t){const n=new Map(t.map(t=>[e(t),t]));return Array.from(n.values())}function Th(t,e,n,r=t.map(t=>t.__data__),o={}){const i=t=>t instanceof Date?+t:t,a=zh(r.map(t=>t.title),i).filter(bt),s=r.flatMap((r,i)=>{const a=r.element||t[i],{items:s=[],title:c}=r,l=s.filter(bt),u=void 0!==n?n:s.length<=1;return l.map(t=>{var{color:n=Ch(a)||o.color,name:i}=t,s=jh(t,["color","name"]);const l=dt(e,r),f=u&&!(pp in s)?l||i:i||l;return Object.assign(Object.assign({},s),{color:n,name:f||c})})}).map(Ph);return Object.assign(Object.assign({},a.length>0&&{title:a.join(",")}),{items:zh(s,t=>`(${i(t.name)}, ${i(t.value)}, ${i(t.color)})`)})}function Bh(t,e,n,r){var{plotWidth:o,plotHeight:i,mainWidth:a,mainHeight:s,startX:c,startY:u,transposed:f,polar:d,insetLeft:p,insetTop:h}=r,g=jh(r,["plotWidth","plotHeight","mainWidth","mainHeight","startX","startY","transposed","polar","insetLeft","insetTop"]);const m=Object.assign({lineWidth:1,stroke:"#1b1e23",strokeOpacity:.5},g),y=((t,e)=>{if(1===e.length)return e[0];const n=e.map(e=>Ks(e,t)),r=ph(n,t=>t);return e[r]})(n,e);if(d){const[e,n,r]=(()=>{const t=c+p+a/2,e=u+h+s/2;return[t,e,Ks([t,e],y)]})(),o=t.ruleX||((e,n,r)=>{const o=new l.jl({style:Object.assign({cx:e,cy:n,r},m)});return t.appendChild(o),o})(e,n,r);o.style.cx=e,o.style.cy=n,o.style.r=r,t.ruleX=o}else{const[e,n,r,a]=f?[c+y[0],c+y[0],u,u+i]:[c,c+o,y[1]+u,y[1]+u],s=t.ruleX||((e,n,r,o)=>{const i=new l.N1({style:Object.assign({x1:e,x2:n,y1:r,y2:o},m)});return t.appendChild(i),i})(e,n,r,a);s.style.x1=e,s.style.x2=n,s.style.y1=r,s.style.y2=a,t.ruleX=s}}function Ih(t,e,n){var{plotWidth:r,plotHeight:o,mainWidth:i,mainHeight:a,startX:s,startY:c,transposed:u,polar:f,insetLeft:d,insetTop:p}=n,h=jh(n,["plotWidth","plotHeight","mainWidth","mainHeight","startX","startY","transposed","polar","insetLeft","insetTop"]);const g=Object.assign({lineWidth:1,stroke:"#1b1e23",strokeOpacity:.5},h),m=e.map(t=>t[1]),y=e.map(t=>t[0]),b=hh(m),v=hh(y),[x,O,w,j]=(()=>{if(f){const t=Math.min(i,a)/2,e=s+d+i/2,n=c+p+a/2,r=Us(Gs([v,b],[e,n]));return[e,e+t*Math.cos(r),n,n+t*Math.sin(r)]}return u?[s,s+r,b+c,b+c]:[v+s,v+s,c,c+o]})();if(y.length>0){const e=t.ruleY||(()=>{const e=new l.N1({style:Object.assign({x1:x,x2:O,y1:w,y2:j},g)});return t.appendChild(e),e})();e.style.x1=x,e.style.x2=O,e.style.y1=w,e.style.y2=j,t.ruleY=e}}function Nh(t){t.ruleY&&(t.ruleY.remove(),t.ruleY=void 0)}function Rh(t){t.ruleX&&(t.ruleX.remove(),t.ruleX=void 0)}function Fh(t){t.markers&&(t.markers.forEach(t=>t.remove()),t.markers=[])}function Dh(t,e){return Array.from(t.values()).some(t=>{var n;return null===(n=t.interaction)||void 0===n?void 0:n[e]})}function $h(t,e){return void 0===t?e:t}function Wh(t){const{title:e,items:n}=t;return 0===n.length&&void 0===e}function Hh({root:t,event:e,elements:n=[],coordinate:r,scale:o,shared:i}){var a,s;const c=n.filter(t=>!(t=>tn.includes(t.markType))(t)),l=c.length>0&&c.every(t=>"interval"===t.markType)&&!rn(r),u=o.x,f=function(t){const{x:e}=t;if(!e||!e.valueBandWidth)return!0;const{valueBandWidth:n}=e;return!!(0,tt.A)(n)||1===new Set(n.values()).size}(o),d=o.series,p=null!==(s=null===(a=null==u?void 0:u.getBandWidth)||void 0===a?void 0:a.call(u))&&void 0!==s?s:0,h=d&&d.valueBandWidth?t=>{const e=Math.round(1/d.valueBandWidth);return t.__data__.x+t.__data__.series*p+p/(2*e)}:t=>t.__data__.x+p/2;l&&c.sort((t,e)=>h(t)-h(e));const g=t=>{const{target:e=Ho(n)}=t;return Ul(e,e=>!!e.classList&&(ut(e)&&Hc(e,"__data__.normalized",function(t,e){const{innerWidth:n,innerHeight:r,marginLeft:o,paddingLeft:i,insetLeft:a,marginTop:s,paddingTop:c,insetTop:l}=t.getOptions();return{x:(e.x-o-i-a)/n,y:(e.y-s-c-l)/r}}(r,{x:t.offsetX,y:t.offsetY})),e.classList.includes("element")))},m=l?e=>{const n=Sl(t,e);if(!n)return;const[o]=r.invert(n),a=(0,rl.A)(h).center,s=f?a(c,o):function(t,e){const{adjustedRange:n,valueBandWidth:r,valueStep:o}=t,i=Array.from(r.values()),a=Array.from(o.values()),s=n.map((t,e)=>{const n=(a[e]-i[e])/2;return[t-n,t+i[e]+n]}),c=s.findIndex(([t,n])=>t<=e&&e<=n);return-1!==c?c:e>.5?n.length-1:0}(u,o),l=c[s];if(!i){const t=c.find(t=>t!==l&&h(t)===h(l));if(t)return g(e)||t}return l}:g;return m(e)}function qh({root:t,event:e,elements:n,coordinate:r,scale:o,startX:i,startY:a}){const s=nn(r),c=[],l=[];for(const t of n){if(tn.includes(t.markType))continue;const{__data__:e}=t,{seriesX:n,title:r,items:o}=e;n?c.push(t):(r||o)&&l.push(t)}const u=l.length&&l.every(t=>"interval"===t.markType)&&!rn(r),f=t=>t.__data__.x,d=!!o.x.getBandWidth&&l.length>0;c.sort((t,e)=>{const n=s?0:1,r=t=>t.getBounds().min[n];return s?r(e)-r(t):r(t)-r(e)});const p=t=>{const e=s?1:0,{min:n,max:r}=t.getLocalBounds();return Pc([n[e],r[e]])};l.sort(u?(t,e)=>f(t)-f(e):(t,e)=>{const[n,r]=p(t),[o,i]=p(e),a=(n+r)/2,c=(o+i)/2;return s?c-a:a-c});const h=new Map(c.map(t=>{const{__data__:e}=t,{seriesX:n}=e,r=n.map((t,e)=>e),o=Pc(r,t=>n[+t]);return[t,[o,n]]})),{x:g}=o,m=(null==g?void 0:g.getBandWidth)?g.getBandWidth()/2:0,y=t=>{const[e]=r.invert(t);return e-m},b=(t,e,n,r)=>{const{_x:o}=t,i=void 0!==o?g.map(o):y(e),a=r.filter(bt),[s,c]=Pc([a[0],a[a.length-1]]);if(!d&&(i<s||i>c)&&!(s===c))return null;const l=(0,rl.A)(t=>r[+t]).center;return n[l(n,i)]},v=u?(t,e)=>{const n=e[(0,(0,rl.A)(f).center)(e,y(t))];return C(e,f).get(f(n))}:(t,e)=>{const n=t[s?1:0],r=e.filter(t=>{const[e,r]=p(t);return n>=e&&n<=r});if(!d||r.length>0)return r;const o=(0,rl.A)(t=>{const[e,n]=p(t);return(e+n)/2}).center;return[e[o(e,n)]].filter(bt)},x=(t,e)=>{const{__data__:n}=t;return Object.fromEntries(Object.entries(n).filter(([t])=>t.startsWith("series")&&"series"!==t).map(([t,n])=>{const r=n[e];return[D(t.replace("series","")),r]}))},O=Sl(t,e);if(!O)return;const w=[O[0]-i,O[1]-a];if(!w)return;const j=v(w,l),k=[],A=[];for(const t of c){const[n,o]=h.get(t),i=b(e,w,n,o);if(null!==i){k.push(t);const e=x(t,i),{x:n,y:o}=e,a=r.map([(n||0)+m,o||0]);A.push([Object.assign(Object.assign({},e),{element:t}),a])}}const M=Array.from(new Set(A.map(t=>t[0].x))),_=M[ph(M,t=>Math.abs(t-y(w)))],S=A.filter(t=>t[0].x===_),E=[...S.map(t=>t[0]),...j.map(t=>t.__data__)];return{selectedElements:[...k,...j],selectedData:E,filteredSeriesData:S,abstractX:y}}function Yh(t,e){var{elements:n,sort:r,filter:o,scale:i,coordinate:a,crosshairs:s,crosshairsX:c,crosshairsY:u,render:f,groupName:d,emitter:p,wait:h=50,leading:g=!0,trailing:m=!1,startX:y=0,startY:b=0,body:v=!0,single:x=!0,position:O,enterable:w,mount:j,bounding:k,theme:A,offset:M,disableNative:_=!1,marker:S=!0,preserve:E=!1,style:P={},css:L={},clickLock:C=!1,disableAutoHide:z=!1}=e,T=jh(e,["elements","sort","filter","scale","coordinate","crosshairs","crosshairsX","crosshairsY","render","groupName","emitter","wait","leading","trailing","startX","startY","body","single","position","enterable","mount","bounding","theme","offset","disableNative","marker","preserve","style","css","clickLock","disableAutoHide"]);const B=n(t),I=(0,N.A)(P,T),R=rn(a),F=nn(a),{innerWidth:D,innerHeight:$,width:W,height:H,insetLeft:q,insetTop:Y}=a.getOptions(),X=gh(e=>{var n;if(C&&t.getAttribute(kh))return;const h=Sl(t,e);if(!h)return;const g=_l(t),m=g.min[0],_=g.min[1],{selectedElements:E,selectedData:P,filteredSeriesData:z,abstractX:T}=qh({root:t,event:e,elements:B,coordinate:a,scale:i,startX:y,startY:b}),N=Th(E,i,d,P,A);if(r&&N.items.sort((t,e)=>r(t)-r(e)),o&&(N.items=N.items.filter(o)),0===E.length||Wh(N))return void G(e);if(v&&_h({root:t,data:N,x:h[0]+m,y:h[1]+_,render:f,event:e,single:x,position:O,enterable:w,mount:j,bounding:k,css:L,offset:M}),s||c||u){const e=xt(I,"crosshairs"),n=Object.assign(Object.assign({},e),xt(I,"crosshairsX")),r=Object.assign(Object.assign({},e),xt(I,"crosshairsY")),o=z.map(t=>t[1]);c&&Bh(t,o,h,Object.assign(Object.assign({},n),{plotWidth:D,plotHeight:$,mainWidth:W,mainHeight:H,insetLeft:q,insetTop:Y,startX:y,startY:b,transposed:F,polar:R})),u&&Ih(t,o,Object.assign(Object.assign({},r),{plotWidth:D,plotHeight:$,mainWidth:W,mainHeight:H,insetLeft:q,insetTop:Y,startX:y,startY:b,transposed:F,polar:R}))}if(S){const e=xt(I,"marker");!function(t,{data:e,style:n,theme:r}){t.markers&&t.markers.forEach(t=>t.remove());const{type:o=""}=n,i=e.filter(t=>{const[{x:e,y:n}]=t;return bt(e)&&bt(n)}).map(t=>{const[{color:e,element:i},a]=t,s=e||i.style.fill||i.style.stroke||r.color;return new l.jl({className:"g2-tooltip-marker",style:Object.assign({cx:a[0],cy:a[1],fill:"hollow"===o?"transparent":s,r:4,stroke:"hollow"===o?s:"#fff",lineWidth:2,pointerEvents:"none"},n)})});for(const e of i)t.appendChild(e);t.markers=i}(t,{data:z,style:e,theme:A})}const X=null===(n=z[0])||void 0===n?void 0:n[0].x,V=null!=X?X:T(focus);p.emit("tooltip:show",Object.assign(Object.assign({},e),{nativeEvent:!0,data:Object.assign(Object.assign({},N),{data:{x:sl(i.x,V,!0)}})}))},h,{leading:g,trailing:m}),G=e=>{C&&t.getAttribute(kh)||z||Sh({root:t,single:x,emitter:p,event:e})},V=()=>{Eh({root:t,single:x})},K=e=>{var n,{nativeEvent:r,data:o,offsetX:s,offsetY:c}=e,l=jh(e,["nativeEvent","data","offsetX","offsetY"]);if(r)return;const u=null===(n=null==o?void 0:o.data)||void 0===n?void 0:n.x,f=i.x.map(u),[d,p]=a.map([f,.5]),h=_l(t),g=h.min[0],m=h.min[1];X(Object.assign(Object.assign({},l),{offsetX:void 0!==s?s:g+d,offsetY:void 0!==c?c:m+p,_x:u}))},U=()=>{Sh({root:t,single:x,emitter:p,nativeEvent:!1})},Z=()=>{nt(),V()},J=e=>{Sl(t,e)||G(e)},Q=()=>{et()},tt=e=>{C&&t.setAttribute(kh,!t.getAttribute(kh)),X(e)},et=()=>{_||(t.addEventListener("pointerdown",tt),t.addEventListener("pointerenter",X),t.addEventListener("pointermove",X),t.addEventListener("pointerleave",J),t.addEventListener("pointerup",G))},nt=()=>{_||(t.removeEventListener("pointerdown",tt),t.removeEventListener("pointerenter",X),t.removeEventListener("pointermove",X),t.removeEventListener("pointerleave",J),t.removeEventListener("pointerup",G))};return et(),p.on("tooltip:show",K),p.on("tooltip:hide",U),p.on("tooltip:disable",Z),p.on("tooltip:enable",Q),()=>{nt(),p.off("tooltip:show",K),p.off("tooltip:hide",U),p.off("tooltip:disable",Z),p.off("tooltip:enable",Q),E?Sh({root:t,single:x,emitter:p,nativeEvent:!1}):V()}}function Xh(t){const{shared:e,crosshairs:n,crosshairsX:r,crosshairsY:o,series:i,item:a=()=>({}),facet:s=!1}=t,c=jh(t,["shared","crosshairs","crosshairsX","crosshairsY","series","name","item","facet"]);return(t,l,u)=>{const{container:f,view:d}=t,{scale:p,markState:h,coordinate:g,theme:m}=d,y=Dh(h,"seriesTooltip"),b=Dh(h,"crosshairs"),v=Ml(f),x=$h(i,y),O=$h(n,b);if(c.clickLock&&!s&&v.setAttribute(kh,!1),x&&function(t){return Array.from(t.values()).some(t=>{var e;return(null===(e=t.interaction)||void 0===e?void 0:e.seriesTooltip)&&t.tooltip})}(h)&&!s)return Yh(v,Object.assign(Object.assign({},c),{theme:m,elements:jl,scale:p,coordinate:g,crosshairs:O,crosshairsX:$h($h(r,n),!1),crosshairsY:$h(o,O),item:a,emitter:u}));if(x&&s){const e=l.filter(e=>e!==t&&e.options.parentKey===t.options.key),i=kl(t,l),s=e[0].view.scale,f=v.getBounds(),d=f.min[0],p=f.min[1];Object.assign(s,{facet:!0});const h=v.parentNode.parentNode;return c.clickLock&&h.setAttribute(kh,!1),Yh(h,Object.assign(Object.assign({},c),{theme:m,elements:()=>i,scale:s,coordinate:g,crosshairs:$h(n,b),crosshairsX:$h($h(r,n),!1),crosshairsY:$h(o,O),item:a,startX:d,startY:p,emitter:u}))}return function(t,{elements:e,coordinate:n,scale:r,render:o,groupName:i,sort:a,filter:s,emitter:c,wait:l=50,leading:u=!0,trailing:f=!1,groupKey:d=t=>t,single:p=!0,position:h,enterable:g,datum:m,view:y,mount:b,bounding:v,theme:x,offset:O,shared:w=!1,body:j=!0,disableNative:k=!1,preserve:A=!1,css:M={},clickLock:_=!1,disableAutoHide:S=!1}){const E=e(t),P=C(E,d),L=gh(e=>{if(_&&t.getAttribute(kh))return;const l=Hh({root:t,event:e,elements:E,coordinate:n,scale:r,shared:w});if(!l)return void(S||Sh({root:t,single:p,emitter:c,event:e}));const u=d(l),f=P.get(u);if(!f)return;const m=1!==f.length||w?Th(f,r,i,void 0,x):Lh(f[0]);if(a&&m.items.sort((t,e)=>a(t)-a(e)),s&&(m.items=m.items.filter(s)),Wh(m))return void(S||Sh({root:t,single:p,emitter:c,event:e}));const{offsetX:k,offsetY:A}=e;j&&_h({root:t,data:m,x:k,y:A,render:o,event:e,single:p,position:h,enterable:g,mount:b,bounding:v,css:M,offset:O}),c.emit("tooltip:show",Object.assign(Object.assign({},e),{nativeEvent:!0,data:Object.assign(Object.assign({},m),{data:ft(l,y)})}))},l,{leading:u,trailing:f}),z=e=>{S||Sh({root:t,single:p,emitter:c,event:e})},T=e=>{_&&t.setAttribute(kh,!t.getAttribute(kh)),L(e)},B=()=>{k||(t.addEventListener("pointerdown",T),t.addEventListener("pointermove",L),t.addEventListener("pointerleave",z),t.addEventListener("pointerup",z))},I=()=>{k||(t.removeEventListener("pointerdown",T),t.removeEventListener("pointermove",L),t.removeEventListener("pointerleave",z),t.removeEventListener("pointerup",z))},N=({nativeEvent:e,offsetX:n,offsetY:r,data:o})=>{if(e)return;const{data:i}=o,a=Xl(E,i,m);if(!a)return;const s=a.getBBox(),{x:c,y:l,width:u,height:f}=s,d=t.getBBox();L({target:a,offsetX:void 0!==n?n+d.x:c+u/2,offsetY:void 0!==r?r+d.y:l+f/2})},R=({nativeEvent:e}={})=>{e||Sh({root:t,single:p,emitter:c,nativeEvent:!1})},F=()=>{I(),Eh({root:t,single:p})},D=()=>{B()};return c.on("tooltip:show",N),c.on("tooltip:hide",R),c.on("tooltip:enable",D),c.on("tooltip:disable",F),B(),()=>{I(),c.off("tooltip:show",N),c.off("tooltip:hide",R),c.off("tooltip:enable",D),c.off("tooltip:disable",F),A?Sh({root:t,single:p,emitter:c,nativeEvent:!1}):Eh({root:t,single:p})}}(v,Object.assign(Object.assign({},c),{datum:Cl(d),elements:jl,scale:p,coordinate:g,groupKey:e?t=>t.__data__.x:void 0,item:a,emitter:u,view:d,theme:m,shared:e}))}}Xh.props={reapplyWhenUpdate:!0};const Gh=t=>t?parseInt(t):0;function Vh(t,e){const n=[t];for(;n.length;){const t=n.shift();e&&e(t);const r=t.children||[];for(const t of r)n.push(t)}}class Kh{constructor(t={},e){this.parentNode=null,this.children=[],this.index=0,this.type=e,this.value=t}map(t=t=>t){const e=t(this.value);return this.value=e,this}attr(t,e){return 1===arguments.length?this.value[t]:this.map(n=>(n[t]=e,n))}append(t){const e=new t({});return e.children=[],this.push(e),e}push(t){return t.parentNode=this,t.index=this.children.length,this.children.push(t),this}remove(){const t=this.parentNode;if(t){const{children:e}=t,n=e.findIndex(t=>t===this);e.splice(n,1)}return this}getNodeByKey(t){let e=null;return Vh(this,n=>{t===n.attr("key")&&(e=n)}),e}getNodesByType(t){const e=[];return Vh(this,n=>{t===n.type&&e.push(n)}),e}getNodeByType(t){let e=null;return Vh(this,n=>{e||t===n.type&&(e=n)}),e}call(t,...e){return t(this.map(),...e),this}getRoot(){let t=this;for(;t&&t.parentNode;)t=t.parentNode;return t}}var Uh=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const Zh=["width","height","depth","padding","paddingLeft","paddingRight","paddingBottom","paddingTop","inset","insetLeft","insetRight","insetTop","insetBottom","margin","marginLeft","marginRight","marginTop","marginBottom","autoFit","theme","title","interaction"],Jh="__remove__",Qh="__callback__";function tg(t){return Object.assign(Object.assign({},t.value),{type:t.type})}function eg(t,e){const{width:n,height:r,autoFit:o,depth:i=0}=t;let a=640,s=480;if(o){const{width:t,height:n}=function(t){const e=getComputedStyle(t),n=t.clientWidth||Gh(e.width),r=t.clientHeight||Gh(e.height);return{width:n-(Gh(e.paddingLeft)+Gh(e.paddingRight)),height:r-(Gh(e.paddingTop)+Gh(e.paddingBottom))}}(e);a=t||a,s=n||s}return a=n||a,s=r||s,{width:Math.max((0,tt.A)(a)?a:1,1),height:Math.max((0,tt.A)(s)?s:1,1),depth:i}}function ng(t){const e=function(t){if(null!==t.type)return t;const e=t.children[t.children.length-1];for(const n of Zh)e.attr(n,t.attr(n));return e}(t),n=[e],r=new Map;for(r.set(e,tg(e));n.length;){const t=n.pop(),e=r.get(t),{children:o=[]}=t;for(const t of o)if(t.type===Qh)e.children=t.value;else{const o=tg(t),{children:i=[]}=e;i.push(o),n.push(t),r.set(t,o),e.children=i}}return r.get(e)}function rg(t,e,n,r,o){const{type:i}=t,{type:a=n||i}=e;if(function(t,e){return"function"!=typeof t&&new Set(Object.keys(e)).has(t)}(a,o)){for(const n of Zh)void 0!==t.attr(n)&&void 0===e[n]&&(e[n]=t.attr(n));return e}if(function(t,e){return"function"==typeof t||new Set(Object.keys(e)).has(t)}(a,r)){const t={type:"view"},n=Object.assign({},e);for(const e of Zh)void 0!==n[e]&&(t[e]=n[e],delete n[e]);return Object.assign(Object.assign({},t),{children:[n]})}return e}function og(t,e,n){if("function"==typeof t){const e=new Kh;return e.value=t,e.type=Qh,e}const{type:r}=t,o=Uh(t,["type","children"]),i=function(t,e,n){if("function"==typeof t)return e.mark;const r=Object.assign(Object.assign({},e),n)[t];if(!r)throw new Error(`Unknown mark: ${t}.`);return r}(r,e,n),a=new i;return a.value=o,a.type=r,a}function ig(t,e){const{type:n}=e,r=Uh(e,["type","children"]);t.type===n||void 0===n?Mt(t.value,r):"string"==typeof n&&(t.type=n,t.value=r)}function ag(t,e,n,r){if(!t)return;const o=[[t,e]];for(;o.length;){const[t,e]=o.shift(),i=og(e,n,r);Array.isArray(t.children)&&t.push(i);const{children:a}=e;if(Array.isArray(a))for(const t of a)o.push([i,t]);else"function"==typeof a&&o.push([i,a])}}function sg(t,e,{key:n=e}){t.prototype[e]=function(t){return 0===arguments.length?this.attr(n):this.attr(n,t)}}function cg(t,e,{key:n=e}){t.prototype[e]=function(t){if(0===arguments.length)return this.attr(n);if(Array.isArray(t))return this.attr(n,t);const e=[...this.attr(n)||[],t];return this.attr(n,e)}}function lg(t,e,{key:n=e}){t.prototype[e]=function(t,e){if(0===arguments.length)return this.attr(n);if(1===arguments.length&&"string"!=typeof t)return this.attr(n,t);const r=this.attr(n)||{};return r[t]=1===arguments.length||e,this.attr(n,r)}}function ug(t,e,n){t.prototype[e]=function(t){if(0===arguments.length)return this.attr(e);if(Array.isArray(t))return this.attr(e,{items:t});if(kt(t)&&(void 0!==t.title||void 0!==t.items))return this.attr(e,t);if(null===t||!1===t)return this.attr(e,t);const n=this.attr(e)||{},{items:r=[]}=n;return r.push(t),n.items=r,this.attr(e,n)}}function fg(t,e,{ctor:n}){t.prototype[e]=function(t){const r=this.append(n);return"mark"===e&&(r.type=t),r}}function dg(t,e,{ctor:n}){t.prototype[e]=function(){return this.type=null,this.append(n)}}function pg(t){return e=>{for(const[n,r]of Object.entries(t)){const{type:t}=r;"value"===t?sg(e,n,r):"array"===t?cg(e,n,r):"object"===t?lg(e,n,r):"node"===t?fg(e,n,r):"container"===t?dg(e,n,r):"mix"===t&&ug(e,n)}return e}}function hg(t){return Object.fromEntries(Object.entries(t).map(([t,e])=>[t,{type:"node",ctor:e}]))}const gg={encode:{type:"object"},scale:{type:"object"},data:{type:"value"},transform:{type:"array"},style:{type:"object"},animate:{type:"object"},coordinate:{type:"object"},interaction:{type:"object"},label:{type:"array",key:"labels"},axis:{type:"object"},legend:{type:"object"},slider:{type:"object"},scrollbar:{type:"object"},state:{type:"object"},layout:{type:"object"},theme:{type:"object"},title:{type:"value"}},mg=Object.assign(Object.assign({},gg),{tooltip:{type:"mix"},viewStyle:{type:"object"}}),yg=Object.assign(Object.assign({},gg),{labelTransform:{type:"array"}});var bg=function(t,e,n,r){var o,i=arguments.length,a=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,n,a):o(e,n))||a);return i>3&&a&&Object.defineProperty(e,n,a),a};let vg=class extends Kh{changeData(t){var e;const n=this.getRoot();if(n)return this.attr("data",t),(null===(e=this.children)||void 0===e?void 0:e.length)&&this.children.forEach(e=>{e.attr("data",t)}),null==n?void 0:n.render()}getView(){const t=this.getRoot(),{views:e}=t.getContext();if(null==e?void 0:e.length)return e.find(t=>t.key===this._key)}getScale(){var t;return null===(t=this.getView())||void 0===t?void 0:t.scale}getScaleByChannel(t){const e=this.getScale();if(e)return e[t]}getCoordinate(){var t;return null===(t=this.getView())||void 0===t?void 0:t.coordinate}getTheme(){var t;return null===(t=this.getView())||void 0===t?void 0:t.theme}getGroup(){const t=this._key;if(!t)return;return this.getRoot().getContext().canvas.getRoot().getElementById(t)}show(){const t=this.getGroup();t&&!t.isVisible()&&Ol(t)}hide(){const t=this.getGroup();t&&t.isVisible()&&xl(t)}};vg=bg([pg(yg)],vg);var xg=function(t,e,n,r){var o,i=arguments.length,a=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,n,a):o(e,n))||a);return i>3&&a&&Object.defineProperty(e,n,a),a};let Og=class extends Kh{changeData(t){const e=this.getRoot();if(e)return this.attr("data",t),null==e?void 0:e.render()}getMark(){var t;const e=null===(t=this.getRoot())||void 0===t?void 0:t.getView();if(!e)return;const{markState:n}=e,r=Array.from(n.keys()).find(t=>t.key===this.attr("key"));return n.get(r)}getScale(){var t;const e=null===(t=this.getRoot())||void 0===t?void 0:t.getView();if(e)return null==e?void 0:e.scale}getScaleByChannel(t){var e,n;const r=null===(e=this.getRoot())||void 0===e?void 0:e.getView();if(r)return null===(n=null==r?void 0:r.scale)||void 0===n?void 0:n[t]}getGroup(){const t=this.attr("key");if(!t)return;return this.getRoot().getContext().canvas.getRoot().getElementById(t)}};Og=xg([pg(mg)],Og);const wg={};var jg=function(t,e,n,r){var o,i=arguments.length,a=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,n,a):o(e,n))||a);return i>3&&a&&Object.defineProperty(e,n,a),a},kg=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const Ag="G2_CHART_KEY";const Mg=()=>[["cartesian"]];Mg.props={};const _g=()=>[["transpose"],["translate",.5,.5],["reflect.x"],["translate",-.5,-.5]];_g.props={transform:!0};const Sg=t=>{const{startAngle:e,endAngle:n,innerRadius:r,outerRadius:o}=((t={})=>{const e={startAngle:-Math.PI/2,endAngle:3*Math.PI/2,innerRadius:0,outerRadius:1};return Object.assign(Object.assign({},e),t)})(t);return[["transpose"],["translate",.5,.5],["reflect.x"],["translate",-.5,-.5],...Ge({startAngle:e,endAngle:n,innerRadius:r,outerRadius:o})]};Sg.props={};const Eg=()=>[["parallel",0,1,0,1]];Eg.props={};const Pg=({focusX:t=0,focusY:e=0,distortionX:n=2,distortionY:r=2,visual:o=!1})=>[["fisheye",t,e,n,r,o]];Pg.props={transform:!0};const Lg=t=>{const{startAngle:e=-Math.PI/2,endAngle:n=3*Math.PI/2,innerRadius:r=0,outerRadius:o=1}=t;return[["parallel",0,1,0,1],...Ge({startAngle:e,endAngle:n,innerRadius:r,outerRadius:o})]};Lg.props={};const Cg=({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]];Cg.props={};const zg=({value:t})=>e=>e.map(()=>t);zg.props={};const Tg=({value:t})=>e=>e.map(e=>e[t]);Tg.props={};const Bg=({value:t})=>e=>e.map(t);Bg.props={};const Ig=({value:t})=>()=>t;function Ng(t,e){if(null!==t)return{type:"column",value:t,field:e}}function Rg(t,e){const n=Ng(t,e);return Object.assign(Object.assign({},n),{inferred:!0})}function Fg(t,e){if(null!==t)return{type:"column",value:t,field:e,visual:!0}}function Dg(t,e){const n=Ng(t,e);return Object.assign(Object.assign({},n),{constant:!1})}function $g(t,e){const n=[];for(const r of t)n[r]=e;return n}function Wg(t,e){const n=t[e];if(!n)return[null,null];const{value:r,field:o=null}=n;return[r,o]}function Hg(t,...e){for(const n of e){if("string"!=typeof n)return[n,null];{const[e,r]=Wg(t,n);if(null!==e)return[e,r]}}return[null,null]}function qg(t){return!(t instanceof Date)&&"object"==typeof t}Ig.props={};const Yg=()=>(t,e)=>{const{encode:n}=e,{y1:r}=n;return void 0!==r?[t,e]:[t,(0,N.A)({},e,{encode:{y1:Rg($g(t,0))}})]};Yg.props={};const Xg=()=>(t,e)=>{const{encode:n}=e,{x:r}=n;return void 0!==r?[t,e]:[t,(0,N.A)({},e,{encode:{x:Rg($g(t,0))},scale:{x:{guide:null}}})]};Xg.props={};const Gg=(t,e)=>gl(Object.assign({colorAttribute:"fill"},t),e);Gg.props=Object.assign(Object.assign({},gl.props),{defaultMarker:"square"});const Vg=(t,e)=>gl(Object.assign({colorAttribute:"stroke"},t),e);function Kg(){}function Ug(t){this._context=t}function Zg(t){return new Ug(t)}Vg.props=Object.assign(Object.assign({},gl.props),{defaultMarker:"hollowSquare"}),Ug.prototype={areaStart:Kg,areaEnd:Kg,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))}};var Jg=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};function Qg(t,e,n,r,o){const[i,a,s,c]=t;if(nn(r)){if(o){return[[n?n[1][0]:i[0],i[1]],a,s,[n?n[2][0]:c[0],c[1]]]}return[i,[e?e[0][0]:a[0],a[1]],[e?e[3][0]:s[0],s[1]],c]}if(o){return[[i[0],n?n[1][1]:i[1]],a,s,[c[0],n?n[2][1]:c[1]]]}return[i,[a[0],e?e[0][1]:a[1]],[s[0],e?e[3][1]:s[1]],c]}const tm=(t,e)=>e/Math.tan(t/2);function em(t,e){const[n,r,o,i]=t,[a,s,c,l]=e,u=r[0]-n[0]>o[0]-i[0],f=Math.atan2(Math.abs(r[1]-o[1]),Math.abs(r[0]-o[0])),d=u?[tm(f,a),tm(f,s),c,l]:[a,s,tm(f,c),tm(f,l)],p=u?1:-1,h=d.map(t=>((t,e,n)=>({x:Math.cos(t)*e*n,y:Math.sin(t)*e}))(f,t,p));return[`M${n[0]+d[0]} ${n[1]}`,`L${r[0]-d[1]} ${r[1]}`,`Q${r[0]} ${r[1]} ${r[0]-h[1].x} ${r[1]+h[1].y}`,`L${o[0]+h[2].x} ${o[1]-h[2].y}`,`Q${o[0]} ${o[1]} ${o[0]-d[2]} ${o[1]}`,`L${i[0]+d[3]} ${i[1]}`,`Q${i[0]} ${i[1]} ${i[0]-h[3].x} ${i[1]-h[3].y}`,`L${n[0]+h[0].x} ${n[1]+h[0].y}`,`Q${n[0]} ${n[1]} ${n[0]+d[0]} ${n[1]}`,"Z"].join(" ")}const nm=(t,e)=>{const{adjustPoints:n=Qg,radius:r,radiusTopLeft:o=r,radiusTopRight:i=r,radiusBottomRight:a=r,radiusBottomLeft:s=r,innerRadius:c=0,innerRadiusTopLeft:l=c,innerRadiusTopRight:u=c,innerRadiusBottomRight:f=c,innerRadiusBottomLeft:d=c,first:p=!0,last:h=!0}=t,g=Jg(t,["adjustPoints","radius","radiusTopLeft","radiusTopRight","radiusBottomRight","radiusBottomLeft","innerRadius","innerRadiusTopLeft","innerRadiusTopRight","innerRadiusBottomRight","innerRadiusBottomLeft","first","last"]),{coordinate:m,document:y}=e;return(t,e,r,c)=>{const{index:b}=e,{color:v}=r,x=Jg(r,["color"]),O=n(t,c[b+1],c[b-1],m,g.reverse),w=!!nn(m),[j,k,A,M]=w?oc(O):O,{color:_=v,opacity:S}=e,E=[p&&null!=o?o:l,p&&null!=i?i:u,h&&null!=a?a:f,h&&null!=s?s:d],P=E.find(t=>t>0)?em([j,k,A,M],E):(0,uc.A)().curve(Zg)([j,k,A,M]);return _t(y.createElement("path",{})).call(ec,x).style("d",P).style("fill",_).style("fillOpacity",S).call(ec,g).node()}};function rm(t,e,n,r,o){const[i,a,s,c]=t;if(nn(r)){if(o){return[[n?n[1][0]:(i[0]+c[0])/2,i[1]],a,s,[n?n[2][0]:(i[0]+c[0])/2,c[1]]]}return[i,[e?e[0][0]:(a[0]+s[0])/2,a[1]],[e?e[3][0]:(a[0]+s[0])/2,s[1]],c]}if(o){return[[i[0],n?n[1][1]:(i[1]+c[1])/2],a,s,[c[0],n?n[2][1]:(i[1]+c[1])/2]]}return[i,[a[0],e?e[0][1]:(a[1]+s[1])/2],[s[0],e?e[3][1]:(a[1]+s[1])/2],c]}nm.props={defaultMarker:"square"};const om=(t,e)=>nm(Object.assign({adjustPoints:rm},t),e);function im(t){return Math.abs(t)>10?String(t):t.toString().padStart(2,"0")}function am(t){const e=`${t.getFullYear()}-${im(t.getMonth()+1)}-${im(t.getDate())}`,n=t.getHours(),r=t.getMinutes(),o=t.getSeconds();return n||r||o?`${e} ${im(n)}:${im(r)}:${im(o)}`:e}om.props={defaultMarker:"square"};const sm=(t={})=>{const{channel:e="x"}=t;return(t,n)=>{const{encode:r}=n,{tooltip:o}=n;if(At(o))return[t,n];const{title:i}=o;if(void 0!==i)return[t,n];const a=Object.keys(r).filter(t=>t.startsWith(e)).filter(t=>!r[t].inferred).map(t=>Wg(r,t)).filter(([t])=>t).map(t=>t[0]);if(0===a.length)return[t,n];const s=[];for(const e of t)s[e]={value:a.map(t=>t[e]instanceof Date?am(t[e]):t[e]).join(", ")};return[t,(0,N.A)({},n,{tooltip:{title:s}})]}};sm.props={};const cm=t=>{const{channel:e}=t;return(t,n)=>{const{encode:r,tooltip:o}=n;if(At(o))return[t,n];const{items:i=[]}=o;if(!i||i.length>0)return[t,n];const a=(Array.isArray(e)?e:[e]).flatMap(t=>Object.keys(r).filter(e=>e.startsWith(t)).map(t=>{const{field:e,value:n,inferred:o=!1,aggregate:i}=r[t];return o?null:i&&n?{channel:t}:e?{field:e}:n?{channel:t}:null}).filter(t=>null!==t));return[t,(0,N.A)({},n,{tooltip:{items:a}})]}};cm.props={};var lm=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const um=()=>(t,e)=>{const{encode:n}=e,{key:r}=n,o=lm(n,["key"]);if(void 0!==r)return[t,e];const i=Object.values(o).map(({value:t})=>t),a=t.map(t=>i.filter(Array.isArray).map(e=>e[t]).join("-"));return[t,(0,N.A)({},e,{encode:{key:Ng(a)}})]};function fm(t={}){const{shapes:e}=t;return[{name:"color"},{name:"opacity"},{name:"shape",range:e},{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 dm(t={}){return[...fm(t),{name:"title",scale:"identity"}]}function pm(){return[{type:sm,channel:"color"},{type:cm,channel:["x","y"]}]}function hm(){return[{type:sm,channel:"x"},{type:cm,channel:["y"]}]}function gm(t={}){return fm(t)}function mm(){return[{type:um}]}function ym(t,e){return t.getBandWidth(t.invert(e))}function bm(t,e,n={}){const{x:r,y:o,series:i}=e,{x:a,y:s,series:c}=t,{style:{bandOffset:l=(c?0:.5),bandOffsetX:u=l,bandOffsetY:f=l}={}}=n,d=!!(null==a?void 0:a.getBandWidth),p=!!(null==s?void 0:s.getBandWidth),h=!!(null==c?void 0:c.getBandWidth);return d||p?(t,e)=>{const n=d?ym(a,r[e]):0,l=p?ym(s,o[e]):0,g=h&&i?(ym(c,i[e])/2+ +i[e])*n:0,[m,y]=t;return[m+u*n+g,y+f*l]}:t=>t}function vm(t){return parseFloat(t)/100}function xm(t,e,n,r){const{x:o,y:i}=n,{innerWidth:a,innerHeight:s}=r.getOptions(),c=Array.from(t,t=>{const e=o[t],n=i[t];return[["string"==typeof e?vm(e)*a:+e,"string"==typeof n?vm(n)*s:+n]]});return[t,c]}function Om(t){return"function"==typeof t?t:e=>e[t]}function wm(t,e){return Array.from(t,Om(e))}function jm(t,e){const n=function(t){return Array.isArray(t)?{links:t}:t&&"object"==typeof t?{links:t.links||[],nodes:t.nodes}:{links:[]}}(t),{source:r=t=>t.source,target:o=t=>t.target,value:i=t=>t.value}=e,{links:a,nodes:s}=n;if(!a.length)return{links:[],nodes:s||[]};const c=wm(a,r),l=wm(a,o),u=wm(a,i);return{links:a.map((t,e)=>({target:l[e],source:c[e],value:u[e]})),nodes:s||Array.from(new Set([...c,...l]),t=>({key:t}))}}function km(t,e){return t.getBandWidth(t.invert(e))}um.props={};const Am={rect:Gg,hollow:Vg,funnel:nm,pyramid:om},Mm=()=>(t,e,n,r)=>{const{x:o,y1:i,series:a,size:s}=n;let{y:c}=n;c=c.map(t=>void 0!==t?t:1);const l=e.x,u=e.series,[f]=r.getSize(),d=s?s.map(t=>+t/f):null,p=s?(t,e,n)=>{const r=t+e/2,o=d[n];return[r-o/2,r+o/2]}:(t,e,n)=>[t,t+e],h=Array.from(t,t=>{const e=km(l,o[t]),n=e*(u?km(u,null==a?void 0:a[t]):1),s=+o[t]+(+(null==a?void 0:a[t])||0)*e,[f,d]=p(s,n,t),h=+c[t],g=+i[t];return[[f,h],[d,h],[d,g],[f,g]].map(t=>r.map(t))});return[t,h]};Mm.props={defaultShape:"rect",defaultLabelShape:"label",composite:!1,shape:Am,channels:[...dm({shapes:Object.keys(Am)}),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"series",scale:"band"},{name:"size"}],preInference:[...mm(),{type:Yg},{type:Xg}],postInference:[...hm()],interaction:{shareTooltip:!0}};const _m={rect:Gg,hollow:Vg},Sm=()=>(t,e,n,r)=>{const{x:o,x1:i,y:a,y1:s}=n,c=Array.from(t,t=>[[+o[t],+a[t]],[+i[t],+a[t]],[+i[t],+s[t]],[+o[t],+s[t]]].map(t=>r.map(t)));return[t,c]};Sm.props={defaultShape:"rect",defaultLabelShape:"label",composite:!1,shape:_m,channels:[...dm({shapes:Object.keys(_m)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...mm(),{type:Yg}],postInference:[...hm()],interaction:{shareTooltip:!0}};var Em=n("./node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/curve/linear.js"),Pm=Cm(Em.A);function Lm(t){this._curve=t}function Cm(t){function e(e){return new Lm(t(e))}return e._curve=t,e}function zm(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(Cm(t)):e()._curve},t}Lm.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))}};var Tm=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const Bm=fc(t=>{const{d1:e,d2:n,style1:r,style2:o}=t.attributes,i=t.ownerDocument;_t(t).maybeAppend("line",()=>i.createElement("path",{})).style("d",e).call(ec,r),_t(t).maybeAppend("line1",()=>i.createElement("path",{})).style("d",n).call(ec,o)});const Im=(t,e)=>{const{curve:n,gradient:r=!1,gradientColor:o="between",defined:i=t=>!Number.isNaN(t)&&null!=t,connect:a=!1}=t,s=Tm(t,["curve","gradient","gradientColor","defined","connect"]),{coordinate:c,document:l}=e;return(t,e,u)=>{const{color:f,lineWidth:d}=u,p=Tm(u,["color","lineWidth"]),{color:h=f,size:g=d,seriesColor:m,seriesX:y,seriesY:b}=e,v=sc(c,e),x=nn(c),O=r&&m?rc(m,y,b,r,o,x):h,w=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},p),O&&{stroke:O}),g&&{lineWidth:g}),v&&{transform:v}),s);let j;if(rn(c)){const t=c.getCenter();j=e=>zm((0,uc.A)().curve(Pm)).angle((n,r)=>Zs(Gs(e[r],t))).radius((n,r)=>Ks(e[r],t)).defined(([t,e])=>i(t)&&i(e)).curve(n)(e)}else j=(0,uc.A)().x(t=>t[0]).y(t=>t[1]).defined(([t,e])=>i(t)&&i(e)).curve(n);const[k,A]=function(t,e){const n=[],r=[];let o=!1,i=null;for(const a of t)e(a[0])&&e(a[1])?(n.push(a),o&&(o=!1,r.push([i,a])),i=a):o=!0;return[n,r]}(t,i),M=xt(w,"connect"),_=!!A.length;if(!_||a&&!Object.keys(M).length)return _t(l.createElement("path",{})).style("d",j(k)||[]).call(ec,w).node();if(_&&!a)return _t(l.createElement("path",{})).style("d",j(t)).call(ec,w).node();return _t(new Bm).style("style1",Object.assign(Object.assign({},w),M)).style("style2",w).style("d1",(S=A,S.map(j).join(","))).style("d2",j(t)).node();var S}};Im.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const Nm=(t,e)=>{const{coordinate:n}=e;return(...r)=>{const o=rn(n)?Zg:Em.A;return Im(Object.assign({curve:o},t),e)(...r)}};function Rm(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 Fm(t,e){this._context=t,this._k=(1-e)/6}Nm.props=Object.assign(Object.assign({},Im.props),{defaultMarker:"line"}),Fm.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:Rm(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:Rm(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 t(e){function n(t){return new Fm(t,e)}return n.tension=function(e){return t(+e)},n})(0);function Dm(t,e){this._context=t,this._k=(1-e)/6}Dm.prototype={areaStart:Kg,areaEnd:Kg,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:Rm(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 t(e){function n(t){return new Dm(t,e)}return n.tension=function(e){return t(+e)},n})(0);function $m(t,e,n){var r=t._x1,o=t._y1,i=t._x2,a=t._y2;if(t._l01_a>1e-12){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,c=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/c,o=(o*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/c}if(t._l23_a>1e-12){var l=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,u=3*t._l23_a*(t._l23_a+t._l12_a);i=(i*l+t._x1*t._l23_2a-e*t._l12_2a)/u,a=(a*l+t._y1*t._l23_2a-n*t._l12_2a)/u}t._context.bezierCurveTo(r,o,i,a,t._x2,t._y2)}function Wm(t,e){this._context=t,this._alpha=e}Wm.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){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(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:$m(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}};(function t(e){function n(t){return e?new Wm(t,e):new Fm(t,0)}return n.alpha=function(e){return t(+e)},n})(.5);function Hm(t,e){this._context=t,this._alpha=e}Hm.prototype={areaStart:Kg,areaEnd:Kg,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){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(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:$m(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}};const qm=function t(e){function n(t){return e?new Hm(t,e):new Dm(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function Ym(t){return t<0?-1:1}function Xm(t,e,n){var r=t._x1-t._x0,o=e-t._x1,i=(t._y1-t._y0)/(r||o<0&&-0),a=(n-t._y1)/(o||r<0&&-0),s=(i*o+a*r)/(r+o);return(Ym(i)+Ym(a))*Math.min(Math.abs(i),Math.abs(a),.5*Math.abs(s))||0}function Gm(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function Vm(t,e,n){var r=t._x0,o=t._x1,i=t._y1,a=(o-r)/3;t._context.bezierCurveTo(r+a,t._y0+a*e,o-a,i-a*n,o,i)}function Km(t){this._context=t}function Um(t){this._context=new Zm(t)}function Zm(t){this._context=t}function Jm(t){return new Km(t)}function Qm(t){return new Um(t)}Km.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Vm(this,this._t0,Gm(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(e=+e,(t=+t)!==this._x1||e!==this._y1){switch(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,Vm(this,Gm(this,n=Xm(this,t,e)),n);break;default:Vm(this,this._t0,n=Xm(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(Um.prototype=Object.create(Km.prototype)).point=function(t,e){Km.prototype.point.call(this,e,t)},Zm.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,r,o,i){this._context.bezierCurveTo(e,t,r,n,i,o)}};var ty=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const ey=(t,e)=>{const n=ty(t,[]),{coordinate:r}=e;return(...t)=>{const o=rn(r)?qm:nn(r)?Qm:Jm;return Im(Object.assign({curve:o},n),e)(...t)}};function ny(t,e){this._context=t,this._t=e}function ry(t){return new ny(t,.5)}function oy(t){return new ny(t,0)}function iy(t){return new ny(t,1)}ey.props=Object.assign(Object.assign({},Im.props),{defaultMarker:"smooth"}),ny.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(),this._line>=0&&(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:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var 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 ay=(t,e)=>Im(Object.assign({curve:iy},t),e);ay.props=Object.assign(Object.assign({},Im.props),{defaultMarker:"hv"});const sy=(t,e)=>Im(Object.assign({curve:oy},t),e);sy.props=Object.assign(Object.assign({},Im.props),{defaultMarker:"vh"});const cy=(t,e)=>Im(Object.assign({curve:ry},t),e);cy.props=Object.assign(Object.assign({},Im.props),{defaultMarker:"hvh"});var ly=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};function uy(t,e,n,r,o){const i=Us(Gs(n,e)),a=i+Math.PI/2,s=[r/2*Math.cos(a),r/2*Math.sin(a)],c=[o/2*Math.cos(a),o/2*Math.sin(a)],l=[o/2*Math.cos(i),o/2*Math.sin(i)],u=[r/2*Math.cos(i),r/2*Math.sin(i)],f=Vs(e,s),d=Vs(n,c),p=Vs(d,l),h=Vs(n,l),g=Gs(h,c),m=Gs(n,c),y=Gs(e,s),b=Gs(y,u),v=Gs(e,u),x=Gs(f,u);t.moveTo(...f),t.lineTo(...d),t.arcTo(...p,...h,o/2),t.arcTo(...g,...m,o/2),t.lineTo(...y),t.arcTo(...b,...v,r/2),t.arcTo(...x,...f,r/2),t.closePath()}const fy=(t,e)=>{const{document:n}=e;return(e,r,o)=>{const{seriesSize:i,color:a}=r,{color:s}=o,c=ly(o,["color"]),l=(0,nl.Ae)();for(let t=0;t<e.length-1;t++){const n=e[t],r=e[t+1],o=i[t],a=i[t+1];[...n,...r].every(bt)&&uy(l,n,r,o,a)}return _t(n.createElement("path",{})).call(ec,c).style("fill",a||s).style("d",l.toString()).call(ec,t).node()}};fy.props=Object.assign(Object.assign({},Im.props),{defaultMarker:"line"});const dy=()=>(t,e)=>{const{style:n={},encode:r}=e,{series:o}=r,{gradient:i}=n;return!i||o?[t,e]:[t,(0,N.A)({},e,{encode:{series:Fg($g(t,void 0))}})]};dy.props={};const py=()=>(t,e)=>{const{encode:n}=e,{series:r,color:o}=n;if(void 0!==r||void 0===o)return[t,e];const[i,a]=Wg(n,"color");return[t,(0,N.A)({},e,{encode:{series:Ng(i,a)}})]};py.props={};const hy={line:Nm,smooth:ey,hv:ay,vh:sy,hvh:cy,trail:fy},gy=(t,e,n,r)=>{var o,i;const{series:a,x:s,y:c}=n,{x:l,y:u}=e;if(void 0===s||void 0===c)throw new Error("Missing encode for x or y channel.");const f=a?Array.from(C(t,t=>a[t]).values()):[t],d=f.map(t=>t[0]).filter(t=>void 0!==t),p=((null===(o=null==l?void 0:l.getBandWidth)||void 0===o?void 0:o.call(l))||0)/2,h=((null===(i=null==u?void 0:u.getBandWidth)||void 0===i?void 0:i.call(u))||0)/2,g=Array.from(f,t=>t.map(t=>r.map([+s[t]+p,+c[t]+h])));return[d,g,f]},my=(t,e,n,r)=>{const o=Object.entries(n).filter(([t])=>t.startsWith("position")).map(([,t])=>t);if(0===o.length)throw new Error("Missing encode for position channel.");rn(r)&&o.push(o[0]);const i=Array.from(t,t=>{const e=o.map(e=>+e[t]),n=r.map(e),i=[];for(let t=0;t<n.length;t+=2)i.push([n[t],n[t+1]]);return i});return[t,i]},yy=()=>(t,e,n,r)=>(sn(r)?my:gy)(t,e,n,r);yy.props={defaultShape:"line",defaultLabelShape:"label",composite:!1,shape:hy,channels:[...dm({shapes:Object.keys(hy)}),{name:"x"},{name:"y"},{name:"position",independent:!0},{name:"size"},{name:"series",scale:"band"}],preInference:[...mm(),{type:dy},{type:py}],postInference:[...hm(),{type:sm,channel:"color"},{type:cm,channel:["position"]}],interaction:{shareTooltip:!0,seriesTooltip:!0,crosshairs:!0}};var by=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const vy=(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"]];vy.style=["fill"];const xy=vy.bind(void 0);xy.style=["stroke","lineWidth"];const Oy=(t,e,n)=>[["M",t-n,e-n],["L",t+n,e-n],["L",t+n,e+n],["L",t-n,e+n],["Z"]];Oy.style=["fill"];const wy=Oy.bind(void 0);wy.style=["fill"];const jy=Oy.bind(void 0);jy.style=["stroke","lineWidth"];const ky=(t,e,n)=>{const r=.618*n;return[["M",t-r,e],["L",t,e-n],["L",t+r,e],["L",t,e+n],["Z"]]};ky.style=["fill"];const Ay=ky.bind(void 0);Ay.style=["stroke","lineWidth"];const My=(t,e,n)=>{const r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e+r],["L",t,e-r],["L",t+n,e+r],["Z"]]};My.style=["fill"];const _y=My.bind(void 0);_y.style=["stroke","lineWidth"];const Sy=(t,e,n)=>{const r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e-r],["L",t+n,e-r],["L",t,e+r],["Z"]]};Sy.style=["fill"];const Ey=Sy.bind(void 0);Ey.style=["stroke","lineWidth"];const Py=(t,e,n)=>{const 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"]]};Py.style=["fill"];const Ly=Py.bind(void 0);Ly.style=["stroke","lineWidth"];const Cy=(t,e,n)=>{const 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"]]};Cy.style=["fill"];const zy=Cy.bind(void 0);zy.style=["stroke","lineWidth"];const Ty=(t,e,n)=>[["M",t,e+n],["L",t,e-n]];Ty.style=["stroke","lineWidth"];const By=(t,e,n)=>[["M",t-n,e-n],["L",t+n,e+n],["M",t+n,e-n],["L",t-n,e+n]];By.style=["stroke","lineWidth"];const Iy=(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]];Iy.style=["stroke","lineWidth"];const Ny=(t,e,n)=>[["M",t-n,e],["L",t+n,e],["M",t,e-n],["L",t,e+n]];Ny.style=["stroke","lineWidth"];const Ry=(t,e,n)=>[["M",t-n,e],["L",t+n,e]];Ry.style=["stroke","lineWidth"];const Fy=(t,e,n)=>[["M",t-n,e],["L",t+n,e]];Fy.style=["stroke","lineWidth"];const Dy=Fy.bind(void 0);Dy.style=["stroke","lineWidth"];const $y=(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]];$y.style=["stroke","lineWidth"];const Wy=(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]];Wy.style=["stroke","lineWidth"];const Hy=(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]];Hy.style=["stroke","lineWidth"];const qy=(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]];qy.style=["stroke","lineWidth"];const Yy=(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]];Yy.style=["stroke","lineWidth"];const Xy=new Map([["bowtie",Cy],["cross",By],["dash",Dy],["diamond",ky],["dot",Fy],["hexagon",Py],["hollowBowtie",zy],["hollowDiamond",Ay],["hollowHexagon",Ly],["hollowPoint",xy],["hollowSquare",jy],["hollowTriangle",_y],["hollowTriangleDown",Ey],["hv",Wy],["hvh",qy],["hyphen",Ry],["line",Ty],["plus",Ny],["point",vy],["rect",wy],["smooth",$y],["square",Oy],["tick",Iy],["triangleDown",Sy],["triangle",My],["vh",Hy],["vhv",Yy]]);var Gy=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};function Vy(t,e,n,r){if(1===e.length)return;const{size:o}=n;if("fixed"===t)return o;if("normal"===t||cn(r)){const[[t,n],[r,o]]=e,i=Math.abs((r-t)/2),a=Math.abs((o-n)/2);return Math.max(0,(i+a)/2)}return o}const Ky=(t,e)=>{const{colorAttribute:n,symbol:r,mode:o="auto"}=t,i=Gy(t,["colorAttribute","symbol","mode"]),a=Xy.get(lc(r))||Xy.get("point"),{coordinate:s,document:c}=e;return(e,r,l)=>{const{lineWidth:u,color:f}=l,d=i.stroke?u||1:u,{color:p=f,transform:h,opacity:g}=r,[m,y]=cc(e),b=Vy(o,e,r,s)||i.r||l.r;return _t(c.createElement("path",{})).call(ec,l).style("fill","transparent").style("d",a(m,y,b)).style("lineWidth",d).style("transform",h).style("transformOrigin",`${m-b} ${y-b}`).style("stroke",p).style(ac(t),g).style(n,p).call(ec,i).node()}};Ky.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const Uy=(t,e)=>Ky(Object.assign({colorAttribute:"stroke",symbol:"point"},t),e);Uy.props=Object.assign({defaultMarker:"hollowPoint"},Ky.props);const Zy=(t,e)=>Ky(Object.assign({colorAttribute:"stroke",symbol:"diamond"},t),e);Zy.props=Object.assign({defaultMarker:"hollowDiamond"},Ky.props);const Jy=(t,e)=>Ky(Object.assign({colorAttribute:"stroke",symbol:"hexagon"},t),e);Jy.props=Object.assign({defaultMarker:"hollowHexagon"},Ky.props);const Qy=(t,e)=>Ky(Object.assign({colorAttribute:"stroke",symbol:"square"},t),e);Qy.props=Object.assign({defaultMarker:"hollowSquare"},Ky.props);const tb=(t,e)=>Ky(Object.assign({colorAttribute:"stroke",symbol:"triangle-down"},t),e);tb.props=Object.assign({defaultMarker:"hollowTriangleDown"},Ky.props);const eb=(t,e)=>Ky(Object.assign({colorAttribute:"stroke",symbol:"triangle"},t),e);eb.props=Object.assign({defaultMarker:"hollowTriangle"},Ky.props);const nb=(t,e)=>Ky(Object.assign({colorAttribute:"stroke",symbol:"bowtie"},t),e);nb.props=Object.assign({defaultMarker:"hollowBowtie"},Ky.props);var rb=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const ob=(t,e)=>{const{colorAttribute:n,mode:r="auto"}=t,o=rb(t,["colorAttribute","mode"]),{coordinate:i,document:a}=e;return(e,s,c)=>{const{lineWidth:l,color:u}=c,f=o.stroke?l||1:l,{color:d=u,transform:p,opacity:h}=s,[g,m]=cc(e),y=Vy(r,e,s,i)||o.r||c.r;return _t(a.createElement("circle",{})).call(ec,c).style("fill","transparent").style("cx",g).style("cy",m).style("r",y).style("lineWidth",f).style("transform",p).style("transformOrigin",`${g} ${m}`).style("stroke",d).style(ac(t),h).style(n,d).call(ec,o).node()}},ib=(t,e)=>ob(Object.assign({colorAttribute:"fill"},t),e);ib.props={defaultMarker:"circle",defaultEnterAnimation:"fadeIn",defaultExitAnimation:"fadeOut"};const ab=(t,e)=>ob(Object.assign({colorAttribute:"stroke"},t),e);ab.props=Object.assign({defaultMarker:"hollowPoint"},ib.props);const sb=(t,e)=>Ky(Object.assign({colorAttribute:"fill",symbol:"point"},t),e);sb.props=Object.assign({defaultMarker:"point"},Ky.props);const cb=(t,e)=>Ky(Object.assign({colorAttribute:"stroke",symbol:"plus"},t),e);cb.props=Object.assign({defaultMarker:"plus"},Ky.props);const lb=(t,e)=>Ky(Object.assign({colorAttribute:"fill",symbol:"diamond"},t),e);lb.props=Object.assign({defaultMarker:"diamond"},Ky.props);const ub=(t,e)=>Ky(Object.assign({colorAttribute:"fill",symbol:"square"},t),e);ub.props=Object.assign({defaultMarker:"square"},Ky.props);const fb=(t,e)=>Ky(Object.assign({colorAttribute:"fill",symbol:"triangle"},t),e);fb.props=Object.assign({defaultMarker:"triangle"},Ky.props);const db=(t,e)=>Ky(Object.assign({colorAttribute:"fill",symbol:"hexagon"},t),e);db.props=Object.assign({defaultMarker:"hexagon"},Ky.props);const pb=(t,e)=>Ky(Object.assign({colorAttribute:"stroke",symbol:"cross"},t),e);pb.props=Object.assign({defaultMarker:"cross"},Ky.props);const hb=(t,e)=>Ky(Object.assign({colorAttribute:"fill",symbol:"bowtie"},t),e);hb.props=Object.assign({defaultMarker:"bowtie"},Ky.props);const gb=(t,e)=>Ky(Object.assign({colorAttribute:"stroke",symbol:"hyphen"},t),e);gb.props=Object.assign({defaultMarker:"hyphen"},Ky.props);const mb=(t,e)=>Ky(Object.assign({colorAttribute:"stroke",symbol:"line"},t),e);mb.props=Object.assign({defaultMarker:"line"},Ky.props);const yb=(t,e)=>Ky(Object.assign({colorAttribute:"stroke",symbol:"tick"},t),e);yb.props=Object.assign({defaultMarker:"tick"},Ky.props);const bb=(t,e)=>Ky(Object.assign({colorAttribute:"fill",symbol:"triangle-down"},t),e);bb.props=Object.assign({defaultMarker:"triangleDown"},Ky.props);const vb=()=>(t,e)=>{const{encode:n}=e,{y:r}=n;return void 0!==r?[t,e]:[t,(0,N.A)({},e,{encode:{y:Rg($g(t,0))},scale:{y:{guide:null}}})]};vb.props={};const xb=()=>(t,e)=>{const{encode:n}=e,{size:r}=n;return void 0!==r?[t,e]:[t,(0,N.A)({},e,{encode:{size:Fg($g(t,3))}})]};xb.props={};const Ob={hollow:Uy,hollowDiamond:Zy,hollowHexagon:Jy,hollowSquare:Qy,hollowTriangleDown:tb,hollowTriangle:eb,hollowBowtie:nb,hollowCircle:ab,point:sb,plus:cb,diamond:lb,square:ub,triangle:fb,hexagon:db,cross:pb,bowtie:hb,hyphen:gb,line:mb,tick:yb,triangleDown:bb,circle:ib},wb=t=>(e,n,r,o)=>{const{x:i,y:a,x1:s,y1:c,size:l,dx:u,dy:f}=r,[d,p]=o.getSize(),h=bm(n,r,t),g=t=>[(s?(+i[t]+ +s[t])/2:+i[t])+ +((null==u?void 0:u[t])||0),(c?(+a[t]+ +c[t])/2:+a[t])+ +((null==f?void 0:f[t])||0)],m=Array.from(e,l?t=>{const[e,n]=g(t),r=+l[t],i=r/d,a=r/p,s=[e+i,n+a];return[o.map(h([e-i,n-a],t)),o.map(h(s,t))]}:t=>[o.map(h(g(t),t))]);return[e,m]};wb.props={defaultShape:"hollow",defaultLabelShape:"label",composite:!1,shape:Ob,channels:[...dm({shapes:Object.keys(Ob)}),{name:"x",required:!0},{name:"y",required:!0},{name:"series",scale:"band"},{name:"size",quantitative:"sqrt"},{name:"dx",scale:"identity"},{name:"dy",scale:"identity"}],preInference:[...mm(),{type:Xg},{type:vb}],postInference:[{type:xb},...pm()]};const jb=(t,e)=>{const{coordinate:n}=e;return(e,r,o)=>{const{color:i,text:a="",fontSize:s,rotate:c=0,transform:l=""}=r,u={text:String(a),stroke:i,fill:i,fontSize:s},[[f,d]]=e;return _t(new hc).style("x",f).style("y",d).call(ec,o).style("transform",`${l}rotate(${+c})`).style("coordCenter",n.getCenter()).call(ec,u).call(ec,t).node()}};jb.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var kb=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const Ab=fc(t=>{const e=t.attributes,n=kb(e,["class","x","y","transform"]),r=xt(n,"marker"),{size:o=24}=r,i=()=>function(t){const e=t/Math.sqrt(2),n=t*Math.sqrt(2),[r,o]=[-e,e-n],[i,a]=[0,0],[s,c]=[e,e-n];return[["M",r,o],["A",t,t,0,1,1,s,c],["L",i,a],["Z"]]}(o/2),a=_t(t).maybeAppend("marker",()=>new Ka({})).call(t=>t.node().update(Object.assign({symbol:i},r))).node(),[s,c]=function(t){const{min:e,max:n}=t.getLocalBounds();return[.5*(e[0]+n[0]),.5*(e[1]+n[1])]}(a);_t(t).maybeAppend("text","text").style("x",s).style("y",c).call(ec,n)}),Mb=(t,e)=>{const n=kb(t,[]);return(t,e,r)=>{const{color:o}=r,i=kb(r,["color"]),{color:a=o,text:s=""}=e,c={text:String(s),stroke:a,fill:a},[[l,u]]=t;return _t(new Ab).call(ec,i).style("transform",`translate(${l},${u})`).call(ec,c).call(ec,n).node()}};Mb.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const _b=(t,e)=>{const{coordinate:n}=e;return(e,r,o)=>{const{color:i,text:a="",fontSize:s,rotate:c=0,transform:u=""}=r,f={text:String(a),stroke:i,fill:i,fontSize:s,textAlign:"center",textBaseline:"middle"},[[d,p]]=e;return _t(new l.EY).style("x",d).style("y",p).call(ec,o).style("transformOrigin","center center").style("transform",`${u}rotate(${c}deg)`).style("coordCenter",n.getCenter()).call(ec,f).call(ec,t).node()}};_b.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const Sb=()=>(t,e)=>{const{data:n}=e;if(!Array.isArray(n)||n.some(qg))return[t,e];const r=Array.isArray(n[0])?n:[n],o=r.map(t=>t[0]),i=r.map(t=>t[1]);return[t,(0,N.A)({},e,{encode:{x:Ng(o),y:Ng(i)}})]};Sb.props={};var Eb=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const Pb=()=>(t,e)=>{const{style:n={}}=e,r=Eb(e,["data","style"]),{x:o,y:i}=n,a=Eb(n,["x","y"]);if(null==o||null==i)return[t,e];const s=i||0;return[[0],(0,N.A)({},r,{data:[0],cartesian:!0,encode:{x:Ng([o||0]),y:Ng([s])},scale:{x:{type:"identity",independent:!0,guide:null},y:{type:"identity",independent:!0,guide:null}},style:a})]};Pb.props={};const Lb={text:jb,badge:Mb,tag:_b},Cb=t=>{const{cartesian:e=!1}=t;return e?xm:(e,n,r,o)=>{const{x:i,y:a}=r,s=bm(n,r,t),c=Array.from(e,t=>[o.map(s([+i[t],+a[t]],t))]);return[e,c]}};Cb.props={defaultShape:"text",defaultLabelShape:"label",composite:!1,shape:Lb,channels:[...dm({shapes:Object.keys(Lb)}),{name:"x",required:!0},{name:"y",required:!0},{name:"text",scale:"identity"},{name:"fontSize",scale:"identity"},{name:"rotate",scale:"identity"}],preInference:[...mm(),{type:Sb},{type:Pb}],postInference:[...pm()]};const zb=()=>(t,e)=>[t,(0,N.A)({scale:{x:{padding:0},y:{padding:0}}},e)];zb.props={};const Tb={cell:Gg,hollow:Vg},Bb=()=>(t,e,n,r)=>{const{x:o,y:i}=n,a=e.x,s=e.y,c=Array.from(t,t=>{const e=a.getBandWidth(a.invert(+o[t])),n=s.getBandWidth(s.invert(+i[t])),c=+o[t],l=+i[t];return[[c,l],[c+e,l],[c+e,l+n],[c,l+n]].map(t=>r.map(t))});return[t,c]};Bb.props={defaultShape:"cell",defaultLabelShape:"label",shape:Tb,composite:!1,channels:[...dm({shapes:Object.keys(Tb)}),{name:"x",required:!0,scale:"band"},{name:"y",required:!0,scale:"band"}],preInference:[...mm(),{type:Xg},{type:vb},{type:zb}],postInference:[...pm()]};var Ib=n("./node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/array.js"),Nb=n("./node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/constant.js"),Rb=n("./node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/path.js"),Fb=n("./node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/point.js");function Db(t,e,n){var r=null,o=(0,Nb.A)(!0),i=null,a=Em.A,s=null,c=(0,Rb.i)(l);function l(l){var u,f,d,p,h,g=(l=(0,Ib.A)(l)).length,m=!1,y=new Array(g),b=new Array(g);for(null==i&&(s=a(h=c())),u=0;u<=g;++u){if(!(u<g&&o(p=l[u],u,l))===m)if(m=!m)f=u,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),d=u-1;d>=f;--d)s.point(y[d],b[d]);s.lineEnd(),s.areaEnd()}m&&(y[u]=+t(p,u,l),b[u]=+e(p,u,l),s.point(r?+r(p,u,l):y[u],n?+n(p,u,l):b[u]))}if(h)return s=null,h+""||null}function u(){return(0,uc.A)().defined(o).curve(a).context(i)}return t="function"==typeof t?t:void 0===t?Fb.x:(0,Nb.A)(+t),e="function"==typeof e?e:(0,Nb.A)(void 0===e?0:+e),n="function"==typeof n?n:void 0===n?Fb.y:(0,Nb.A)(+n),l.x=function(e){return arguments.length?(t="function"==typeof e?e:(0,Nb.A)(+e),r=null,l):t},l.x0=function(e){return arguments.length?(t="function"==typeof e?e:(0,Nb.A)(+e),l):t},l.x1=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:(0,Nb.A)(+t),l):r},l.y=function(t){return arguments.length?(e="function"==typeof t?t:(0,Nb.A)(+t),n=null,l):e},l.y0=function(t){return arguments.length?(e="function"==typeof t?t:(0,Nb.A)(+t),l):e},l.y1=function(t){return arguments.length?(n=null==t?null:"function"==typeof t?t:(0,Nb.A)(+t),l):n},l.lineX0=l.lineY0=function(){return u().x(t).y(e)},l.lineY1=function(){return u().x(t).y(n)},l.lineX1=function(){return u().x(r).y(e)},l.defined=function(t){return arguments.length?(o="function"==typeof t?t:(0,Nb.A)(!!t),l):o},l.curve=function(t){return arguments.length?(a=t,null!=i&&(s=a(i)),l):a},l.context=function(t){return arguments.length?(null==t?i=s=null:s=a(i=t),l):i},l}var $b=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const Wb=fc(t=>{const{areaPath:e,connectPath:n,areaStyle:r,connectStyle:o}=t.attributes,i=t.ownerDocument;_t(t).maybeAppend("connect-path",()=>i.createElement("path",{})).style("d",n).call(ec,o),_t(t).maybeAppend("area-path",()=>i.createElement("path",{})).style("d",e).call(ec,r)}),Hb=(t,e)=>{const{curve:n,gradient:r=!1,defined:o=t=>!Number.isNaN(t)&&null!=t,connect:i=!1}=t,a=$b(t,["curve","gradient","defined","connect"]),{coordinate:s,document:c}=e;return(t,e,l)=>{const{color:u}=l,{color:f=u,seriesColor:d,seriesX:p,seriesY:h}=e,g=nn(s),m=sc(s,e),y=r&&d?rc(d,p,h,r,void 0,g):f,b=Object.assign(Object.assign(Object.assign(Object.assign({},l),{stroke:y,fill:y}),m&&{transform:m}),a),[v,x]=function(t,e){const n=[],r=[],o=[];let i=!1,a=null;const s=t.length/2;for(let c=0;c<s;c++){const l=t[c],u=t[c+s];if([...l,...u].some(t=>!e(t)))i=!0;else{if(n.push(l),r.push(u),i&&a){i=!1;const[t,e]=a;o.push([t,l,e,u])}a=[l,u]}}return[n.concat(r),o]}(t,o),O=xt(b,"connect"),w=!!x.length,j=t=>_t(c.createElement("path",{})).style("d",t||"").call(ec,b).node();if(rn(s)){const e=t=>{const e=s.getCenter(),r=t.slice(0,t.length/2),i=t.slice(t.length/2);return function(){var t=Db().curve(Pm),e=t.curve,n=t.lineX0,r=t.lineX1,o=t.lineY0,i=t.lineY1;return 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 zm(n())},delete t.lineX0,t.lineEndAngle=function(){return zm(r())},delete t.lineX1,t.lineInnerRadius=function(){return zm(o())},delete t.lineY0,t.lineOuterRadius=function(){return zm(i())},delete t.lineY1,t.curve=function(t){return arguments.length?e(Cm(t)):e()._curve},t}().angle((t,n)=>Zs(Gs(r[n],e))).outerRadius((t,n)=>Ks(r[n],e)).innerRadius((t,n)=>Ks(i[n],e)).defined((t,e)=>[...r[e],...i[e]].every(o)).curve(n)(i)};return!w||i&&!Object.keys(O).length?j(e(v)):w&&!i?j(e(t)):_t(new Wb).style("areaStyle",b).style("connectStyle",Object.assign(Object.assign({},O),a)).style("areaPath",e(t)).style("connectPath",x.map(e).join("")).node()}{const e=t=>{const e=t.slice(0,t.length/2),r=t.slice(t.length/2);return g?Db().y((t,n)=>e[n][1]).x1((t,n)=>e[n][0]).x0((t,e)=>r[e][0]).defined((t,n)=>[...e[n],...r[n]].every(o)).curve(n)(e):Db().x((t,n)=>e[n][0]).y1((t,n)=>e[n][1]).y0((t,e)=>r[e][1]).defined((t,n)=>[...e[n],...r[n]].every(o)).curve(n)(e)};return!w||i&&!Object.keys(O).length?j(e(v)):w&&!i?j(e(t)):_t(new Wb).style("areaStyle",b).style("connectStyle",Object.assign(Object.assign({},O),a)).style("areaPath",e(t)).style("connectPath",x.map(e).join("")).node()}}};Hb.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const qb=(t,e)=>{const{coordinate:n}=e;return(...r)=>{const o=rn(n)?Zg:Em.A;return Hb(Object.assign({curve:o},t),e)(...r)}};qb.props=Object.assign(Object.assign({},Hb.props),{defaultMarker:"square"});var Yb=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const Xb=(t,e)=>{const n=Yb(t,[]),{coordinate:r}=e;return(...t)=>{const o=rn(r)?qm:nn(r)?Qm:Jm;return Hb(Object.assign({curve:o},n),e)(...t)}};Xb.props=Object.assign(Object.assign({},Hb.props),{defaultMarker:"smooth"});const Gb=(t,e)=>(...n)=>Hb(Object.assign({curve:ry},t),e)(...n);Gb.props=Object.assign(Object.assign({},Hb.props),{defaultMarker:"hvh"});const Vb=(t,e)=>(...n)=>Hb(Object.assign({curve:oy},t),e)(...n);Vb.props=Object.assign(Object.assign({},Hb.props),{defaultMarker:"vh"});const Kb=(t,e)=>(...n)=>Hb(Object.assign({curve:iy},t),e)(...n);Kb.props=Object.assign(Object.assign({},Hb.props),{defaultMarker:"hv"});const Ub={area:qb,smooth:Xb,hvh:Gb,vh:Vb,hv:Kb},Zb=()=>(t,e,n,r)=>{var o,i;const{x:a,y:s,y1:c,series:l}=n,{x:u,y:f}=e,d=l?Array.from(C(t,t=>l[t]).values()):[t],p=d.map(t=>t[0]).filter(t=>void 0!==t),h=((null===(o=null==u?void 0:u.getBandWidth)||void 0===o?void 0:o.call(u))||0)/2,g=((null===(i=null==f?void 0:f.getBandWidth)||void 0===i?void 0:i.call(f))||0)/2,m=Array.from(d,t=>{const e=t.length,n=new Array(2*e);for(let o=0;o<t.length;o++){const i=t[o];n[o]=r.map([+a[i]+h,+s[i]+g]),n[e+o]=r.map([+a[i]+h,+c[i]+g])}return n});return[p,m,d]};Zb.props={defaultShape:"area",defaultLabelShape:"label",composite:!1,shape:Ub,channels:[...dm({shapes:Object.keys(Ub)}),{name:"x",required:!0},{name:"y",required:!0},{name:"size"},{name:"series",scale:"band"}],preInference:[...mm(),{type:py},{type:Yg},{type:zb}],postInference:[...hm()],interaction:{shareTooltip:!0,seriesTooltip:!0,crosshairs:!0}};const Jb=()=>(t,e)=>{const{encode:n}=e,{y1:r}=n;if(r)return[t,e];const[o]=Wg(n,"y");return[t,(0,N.A)({},e,{encode:{y1:Ng([...o])}})]};Jb.props={};const Qb=()=>(t,e)=>{const{encode:n}=e,{x1:r}=n;if(r)return[t,e];const[o]=Wg(n,"x");return[t,(0,N.A)({},e,{encode:{x1:Ng([...o])}})]};Qb.props={};var tv=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const ev=(t,e)=>{const{arrow:n=!0,arrowSize:r="40%"}=t,o=tv(t,["arrow","arrowSize"]),{document:i}=e;return(t,e,a)=>{const{defaultColor:s}=a,c=tv(a,["defaultColor"]),{color:l=s,transform:u}=e,[f,d]=t,p=(0,nl.Ae)();if(p.moveTo(...f),p.lineTo(...d),n){const[t,e]=function(t,e,n){const{arrowSize:r}=n,o="string"==typeof r?+parseFloat(r)/100*Ks(t,e):r,i=Math.PI/6,a=Math.atan2(e[1]-t[1],e[0]-t[0]),s=Math.PI/2-a-i,c=a-i;return[[e[0]-o*Math.sin(s),e[1]-o*Math.cos(s)],[e[0]-o*Math.cos(c),e[1]-o*Math.sin(c)]]}(f,d,{arrowSize:r});p.moveTo(...t),p.lineTo(...d),p.lineTo(...e)}return _t(i.createElement("path",{})).call(ec,c).style("d",p.toString()).style("stroke",l).style("transform",u).call(ec,o).node()}};ev.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const nv=(t,e)=>{const{arrow:n=!1}=t;return(...r)=>ev(Object.assign(Object.assign({},t),{arrow:n}),e)(...r)};nv.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var rv=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const ov=(t,e)=>{const n=rv(t,[]),{coordinate:r,document:o}=e;return(t,e,i)=>{const{color:a}=i,s=rv(i,["color"]),{color:c=a,transform:l}=e,[u,f]=t,d=(0,nl.Ae)();if(d.moveTo(u[0],u[1]),rn(r)){const t=r.getCenter();d.quadraticCurveTo(t[0],t[1],f[0],f[1])}else{nc(d,u,f,tc(u,f),Ks(u,f)/2)}return _t(o.createElement("path",{})).call(ec,s).style("d",d.toString()).style("stroke",c).style("transform",l).call(ec,n).node()}};ov.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var iv=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const av=(t,e)=>{const n=iv(t,[]),{document:r}=e;return(t,e,o)=>{const{color:i}=o,a=iv(o,["color"]),{color:s=i,transform:c}=e,[l,u]=t,f=(0,nl.Ae)();return f.moveTo(l[0],l[1]),f.bezierCurveTo(l[0]/2+u[0]/2,l[1],l[0]/2+u[0]/2,u[1],u[0],u[1]),_t(r.createElement("path",{})).call(ec,a).style("d",f.toString()).style("stroke",s).style("transform",c).call(ec,n).node()}};av.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var sv=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const cv=(t,e)=>{const{cornerRatio:n=1/3}=t,r=sv(t,["cornerRatio"]),{coordinate:o,document:i}=e;return(t,e,a)=>{const{defaultColor:s}=a,c=sv(a,["defaultColor"]),{color:l=s,transform:u}=e,[f,d]=t,p=function(t,e,n,r){const o=(0,nl.Ae)();if(rn(n)){const i=n.getCenter(),a=Ks(t,i),s=(Ks(e,i)-a)*r+a;return o.moveTo(t[0],t[1]),nc(o,t,e,i,s),o.lineTo(e[0],e[1]),o}return nn(n)?(o.moveTo(t[0],t[1]),o.lineTo(t[0]+(e[0]-t[0])*r,t[1]),o.lineTo(t[0]+(e[0]-t[0])*r,e[1]),o.lineTo(e[0],e[1]),o):(o.moveTo(t[0],t[1]),o.lineTo(t[0],t[1]+(e[1]-t[1])*r),o.lineTo(e[0],t[1]+(e[1]-t[1])*r),o.lineTo(e[0],e[1]),o)}(f,d,o,n);return _t(i.createElement("path",{})).call(ec,c).style("d",p.toString()).style("stroke",l).style("transform",u).call(ec,r).node()}};cv.props={defaultMarker:"vhv",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const lv={link:nv,arc:ov,smooth:av,vhv:cv},uv=t=>(e,n,r,o)=>{const{x:i,y:a,x1:s=i,y1:c=a}=r,l=bm(n,r,t),u=e.map(t=>[o.map(l([+i[t],+a[t]],t)),o.map(l([+s[t],+c[t]],t))]);return[e,u]};uv.props={defaultShape:"link",defaultLabelShape:"label",composite:!1,shape:lv,channels:[...dm({shapes:Object.keys(lv)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...mm(),{type:Jb},{type:Qb}],postInference:[...pm()]};var fv=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const dv=(t,e)=>{const{coordinate:n,document:r}=e;return(e,o,i)=>{const{color:a}=i,s=fv(i,["color"]),{color:c=a,src:l="",size:u=32,transform:f=""}=o;let{width:d=u,height:p=u}=t;const[[h,g]]=e,[m,y]=n.getSize();d="string"==typeof d?vm(d)*m:d,p="string"==typeof p?vm(p)*y:p;const b=h-Number(d)/2,v=g-Number(p)/2;return _t(r.createElement("image",{})).call(ec,s).style("x",b).style("y",v).style("src",l).style("stroke",c).style("transform",f).call(ec,t).style("width",d).style("height",p).node()}};dv.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const pv={image:dv},hv=t=>{const{cartesian:e}=t;return e?xm:(e,n,r,o)=>{const{x:i,y:a}=r,s=bm(n,r,t),c=Array.from(e,t=>[o.map(s([+i[t],+a[t]],t))]);return[e,c]}};hv.props={defaultShape:"image",defaultLabelShape:"label",composite:!1,shape:pv,channels:[...dm({shapes:Object.keys(pv)}),{name:"x",required:!0},{name:"y",required:!0},{name:"src",scale:"identity"},{name:"size"}],preInference:[...mm(),{type:Sb},{type:Pb}],postInference:[...pm()]};var gv=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const mv=(t,e)=>{const{coordinate:n,document:r}=e;return(e,o,i)=>{const{color:a}=i,s=gv(i,["color"]),{color:c=a,transform:l}=o,u=function(t,e){const n=(0,nl.Ae)();if(rn(e)){const r=e.getCenter(),o=[...t,t[0]],i=o.map(t=>Ks(t,r));return o.forEach((e,o)=>{if(0===o)return void n.moveTo(e[0],e[1]);const a=i[o],s=t[o-1],c=i[o-1];void 0!==c&&Math.abs(a-c)<1e-10?nc(n,s,e,r,a):n.lineTo(e[0],e[1])}),n.closePath(),n}return function(t,e){return e.forEach((e,n)=>0===n?t.moveTo(e[0],e[1]):t.lineTo(e[0],e[1])),t.closePath(),t}(n,t)}(e,n);return _t(r.createElement("path",{})).call(ec,s).style("d",u.toString()).style("stroke",c).style("fill",c).style("transform",l).call(ec,t).node()}};mv.props={defaultMarker:"square",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var yv=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const bv=(t,e)=>{const n=yv(t,[]),{coordinate:r,document:o}=e;return(t,e,i)=>{const{color:a}=i,s=yv(i,["color"]),{color:c=a,transform:l}=e,u=function(t,e){const[n,r,o,i]=t,a=(0,nl.Ae)();if(rn(e)){const t=e.getCenter(),s=Ks(t,n);return a.moveTo(n[0],n[1]),a.quadraticCurveTo(t[0],t[1],o[0],o[1]),nc(a,o,i,t,s),a.quadraticCurveTo(t[0],t[1],r[0],r[1]),nc(a,r,n,t,s),a.closePath(),a}return a.moveTo(n[0],n[1]),a.bezierCurveTo(n[0]/2+o[0]/2,n[1],n[0]/2+o[0]/2,o[1],o[0],o[1]),a.lineTo(i[0],i[1]),a.bezierCurveTo(i[0]/2+r[0]/2,i[1],i[0]/2+r[0]/2,r[1],r[0],r[1]),a.lineTo(n[0],n[1]),a.closePath(),a}(t,r);return _t(o.createElement("path",{})).call(ec,s).style("d",u.toString()).style("fill",c||a).style("stroke",c||a).style("transform",l).call(ec,n).node()}};bv.props={defaultMarker:"square",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const vv={polygon:mv,ribbon:bv},xv=()=>(t,e,n,r)=>{const o=Object.entries(n).filter(([t])=>t.startsWith("x")).map(([,t])=>t),i=Object.entries(n).filter(([t])=>t.startsWith("y")).map(([,t])=>t),a=t.map(t=>{const e=[];for(let n=0;n<o.length;n++){const a=o[n][t];if(void 0===a)break;e.push(r.map([+a,+i[n][t]]))}return e});return[t,a]};xv.props={defaultShape:"polygon",defaultLabelShape:"label",composite:!1,shape:vv,channels:[...dm({shapes:Object.keys(vv)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...mm()],postInference:[...pm()]};var Ov=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const wv=(t,e)=>{const{coordinate:n,document:r}=e;return(e,o,i)=>{const{color:a,transform:s}=o,{color:c,fill:l=c,stroke:u=c}=i,f=Ov(i,["color","fill","stroke"]),d=function(t,e){const n=(0,nl.Ae)();if(rn(e)){const r=e.getCenter(),[o,i]=r,a=Us(Gs(t[0],r)),s=Us(Gs(t[1],r)),c=Ks(r,t[2]),l=Ks(r,t[3]),u=Ks(r,t[8]),f=Ks(r,t[10]),d=Ks(r,t[11]);n.moveTo(...t[0]),n.arc(o,i,c,a,s),n.arc(o,i,c,s,a,!0),n.moveTo(...t[2]),n.lineTo(...t[3]),n.moveTo(...t[4]),n.arc(o,i,l,a,s),n.lineTo(...t[6]),n.arc(o,i,f,s,a,!0),n.closePath(),n.moveTo(...t[8]),n.arc(o,i,u,a,s),n.arc(o,i,u,s,a,!0),n.moveTo(...t[10]),n.lineTo(...t[11]),n.moveTo(...t[12]),n.arc(o,i,d,a,s),n.arc(o,i,d,s,a,!0)}else n.moveTo(...t[0]),n.lineTo(...t[1]),n.moveTo(...t[2]),n.lineTo(...t[3]),n.moveTo(...t[4]),n.lineTo(...t[5]),n.lineTo(...t[6]),n.lineTo(...t[7]),n.closePath(),n.moveTo(...t[8]),n.lineTo(...t[9]),n.moveTo(...t[10]),n.lineTo(...t[11]),n.moveTo(...t[12]),n.lineTo(...t[13]);return n}(e,n);return _t(r.createElement("path",{})).call(ec,f).style("d",d.toString()).style("stroke",u).style("fill",a||l).style("transform",s).call(ec,t).node()}};wv.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var jv=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const kv=(t,e)=>{const{coordinate:n,document:r}=e;return(e,o,i)=>{const{color:a,transform:s}=o,{color:c,fill:l=c,stroke:u=c}=i,f=jv(i,["color","fill","stroke"]),d=function(t,e,n=4){const r=(0,nl.Ae)();if(!rn(e))return r.moveTo(...t[2]),r.lineTo(...t[3]),r.lineTo(t[3][0]-n,t[3][1]),r.lineTo(t[10][0]-n,t[10][1]),r.lineTo(t[10][0]+n,t[10][1]),r.lineTo(t[3][0]+n,t[3][1]),r.lineTo(...t[3]),r.closePath(),r.moveTo(...t[10]),r.lineTo(...t[11]),r.moveTo(t[3][0]+n/2,t[8][1]),r.arc(t[3][0],t[8][1],n/2,0,2*Math.PI),r.closePath(),r;const o=e.getCenter(),[i,a]=o,s=Ks(o,t[3]),c=Ks(o,t[8]),l=Ks(o,t[10]),u=Us(Gs(t[2],o)),f=Math.asin(n/c),d=u-f,p=u+f;r.moveTo(...t[2]),r.lineTo(...t[3]),r.moveTo(Math.cos(d)*s+i,Math.sin(d)*s+a),r.arc(i,a,s,d,p),r.lineTo(Math.cos(p)*l+i,Math.sin(p)*l+a),r.arc(i,a,l,p,d,!0),r.lineTo(Math.cos(d)*s+i,Math.sin(d)*s+a),r.closePath(),r.moveTo(...t[10]),r.lineTo(...t[11]);const h=(d+p)/2;return r.moveTo(Math.cos(h)*(c+n/2)+i,Math.sin(h)*(c+n/2)+a),r.arc(Math.cos(h)*c+i,Math.sin(h)*c+a,n/2,h,2*Math.PI+h),r.closePath(),r}(e,n,4);return _t(r.createElement("path",{})).call(ec,f).style("d",d.toString()).style("stroke",u).style("fill",a||l).style("transform",s).call(ec,t).node()}};kv.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const Av={box:wv,violin:kv},Mv=()=>(t,e,n,r)=>{const{x:o,y:i,y1:a,y2:s,y3:c,y4:l,series:u}=n,f=e.x,d=e.series,p=Array.from(t,t=>{const e=f.getBandWidth(f.invert(+o[t])),n=e*(d?d.getBandWidth(d.invert(+(null==u?void 0:u[t]))):1),p=+o[t]+(+(null==u?void 0:u[t])||0)*e+n/2,[h,g,m,y,b]=[+i[t],+a[t],+s[t],+c[t],+l[t]];return[[p-n/2,b],[p+n/2,b],[p,b],[p,y],[p-n/2,y],[p+n/2,y],[p+n/2,g],[p-n/2,g],[p-n/2,m],[p+n/2,m],[p,g],[p,h],[p-n/2,h],[p+n/2,h]].map(t=>r.map(t))});return[t,p]};Mv.props={defaultShape:"box",defaultLabelShape:"label",composite:!1,shape:Av,channels:[...dm({shapes:Object.keys(Av)}),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"series",scale:"band"}],preInference:[...mm(),{type:Xg}],postInference:[...hm()],interaction:{shareTooltip:!0}};const _v={vector:ev},Sv=()=>(t,e,n,r)=>{const{x:o,y:i,size:a,rotate:s}=n,[c,l]=r.getSize(),u=t.map(t=>{const e=+s[t]/180*Math.PI,n=+a[t],u=n/l,f=n/c*Math.cos(e),d=-u*Math.sin(e);return[r.map([+o[t]-f/2,+i[t]-d/2]),r.map([+o[t]+f/2,+i[t]+d/2])]});return[t,u]};Sv.props={defaultShape:"vector",defaultLabelShape:"label",composite:!1,shape:_v,channels:[...dm({shapes:Object.keys(_v)}),{name:"x",required:!0},{name:"y",required:!0},{name:"rotate",required:!0,scale:"identity"},{name:"size",required:!0}],preInference:[...mm()],postInference:[...pm()]};var Ev=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const Pv=(t,e)=>{const{arrow:n,arrowSize:r=4}=t,o=Ev(t,["arrow","arrowSize"]),{coordinate:i,document:a}=e;return(t,e,s)=>{const{color:c,lineWidth:l}=s,u=Ev(s,["color","lineWidth"]),{color:f=c,size:d=l}=e,p=n?function(t,e,n){return t.createElement("path",{style:Object.assign({d:`M ${e},${e} L -${e},0 L ${e},-${e} L 0,0 Z`,transformOrigin:"center"},n)})}(a,r,Object.assign({fill:o.stroke||f,stroke:o.stroke||f},xt(o,"arrow"))):null,h=function(t,e){if(!rn(e))return(0,uc.A)().x(t=>t[0]).y(t=>t[1])(t);const n=e.getCenter();return(0,dl.A)()({startAngle:0,endAngle:2*Math.PI,outerRadius:Ks(t[0],n),innerRadius:Ks(t[1],n)})}(t,i),g=function(t,e){if(!rn(t))return e;const[n,r]=t.getCenter();return`translate(${n}, ${r}) ${e||""}`}(i,e.transform);return _t(a.createElement("path",{})).call(ec,u).style("d",h).style("stroke",f).style("lineWidth",d).style("transform",g).style("markerEnd",p).call(ec,o).node()}};Pv.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const Lv=()=>(t,e)=>{const{data:n}=e;return!Array.isArray(n)||n.some(qg)?[t,e]:[t,(0,N.A)({},e,{encode:{x:Ng(n)}})]};Lv.props={};const Cv={line:Pv},zv=t=>(e,n,r,o)=>{const{x:i}=r,a=bm(n,r,(0,N.A)({style:{bandOffset:0}},t)),s=Array.from(e,t=>[[i[t],1],[i[t],0]].map(e=>o.map(a(e,t))));return[e,s]};zv.props={defaultShape:"line",defaultLabelShape:"label",composite:!1,shape:Cv,channels:[...gm({shapes:Object.keys(Cv)}),{name:"x",required:!0}],preInference:[...mm(),{type:Lv}],postInference:[]};const Tv=()=>(t,e)=>{const{data:n}=e;return!Array.isArray(n)||n.some(qg)?[t,e]:[t,(0,N.A)({},e,{encode:{y:Ng(n)}})]};Tv.props={};const Bv={line:Pv},Iv=t=>(e,n,r,o)=>{const{y:i}=r,a=bm(n,r,(0,N.A)({style:{bandOffset:0}},t)),s=Array.from(e,t=>[[0,i[t]],[1,i[t]]].map(e=>o.map(a(e,t))));return[e,s]};Iv.props={defaultShape:"line",defaultLabelShape:"label",composite:!1,shape:Bv,channels:[...gm({shapes:Object.keys(Bv)}),{name:"y",required:!0}],preInference:[...mm(),{type:Tv}],postInference:[]};var Nv=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};function Rv(t,e,n){return[["M",t,e],["L",t+2*n,e-n],["L",t+2*n,e+n],["Z"]]}const Fv=(t,e)=>{const{offsetX:n=0,sourceOffsetX:r=n,targetOffsetX:o=n,offsetY:i=0,sourceOffsetY:a=i,targetOffsetY:s=i,connectLength1:c,endMarker:u=!0}=t,f=Nv(t,["offsetX","sourceOffsetX","targetOffsetX","offsetY","sourceOffsetY","targetOffsetY","connectLength1","endMarker"]),{coordinate:d}=e;return(t,e,n)=>{const{color:i,connectLength1:p}=n,h=Nv(n,["color","connectLength1"]),{color:g,transform:m}=e,y=function(t,e,n,r,o,i,a=0){const[[s,c],[l,u]]=e;if(nn(t)){const t=s+n,e=t+a,f=c+o,d=u+i;return[[t,f],[e,f],[e,d],[l+r,d]]}const f=c-n,d=f-a,p=s-o,h=l-i;return[[p,f],[p,d],[h,d],[h,u-r]]}(d,t,a,s,r,o,null!=c?c:p),b=xt(Object.assign(Object.assign({},f),n),"endMarker");return _t(new l.wA).call(ec,h).style("d",function(t){return(0,uc.A)().x(t=>t[0]).y(t=>t[1])(t)}(y)).style("stroke",g||i).style("transform",m).style("markerEnd",u?new Ka({className:"marker",style:Object.assign(Object.assign({},b),{symbol:Rv})}):null).call(ec,f).node()}};Fv.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const Dv={connector:Fv},$v=(...t)=>uv(...t);function Wv(t,e,n,r){if(e)return()=>[0,1];const{[t]:o,[`${t}1`]:i}=n;return t=>{var e;const n=(null===(e=r.getBandWidth)||void 0===e?void 0:e.call(r,r.invert(+i[t])))||0;return[o[t],i[t]+n]}}function Hv(t={}){const{extendX:e=!1,extendY:n=!1}=t;return(t,r,o,i)=>{const a=Wv("x",e,o,r.x),s=Wv("y",n,o,r.y),c=Array.from(t,t=>{const[e,n]=a(t),[r,o]=s(t);return[[e,r],[n,r],[n,o],[e,o]].map(t=>i.map(t))});return[t,c]}}$v.props={defaultShape:"connector",defaultLabelShape:"label",composite:!1,shape:Dv,channels:[...gm({shapes:Object.keys(Dv)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...mm()],postInference:[]};const qv={range:Gg},Yv=()=>Hv();Yv.props={defaultShape:"range",defaultLabelShape:"label",composite:!1,shape:qv,channels:[...gm({shapes:Object.keys(qv)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...mm()],postInference:[]};const Xv=()=>(t,e)=>{const{data:n}=e;if(Array.isArray(n)&&(n.every(Array.isArray)||!n.some(qg))){const r=(t,e)=>Array.isArray(t[0])?t.map(t=>t[e]):[t[e]];return[t,(0,N.A)({},e,{encode:{x:Ng(r(n,0)),x1:Ng(r(n,1))}})]}return[t,e]};Xv.props={};const Gv={range:Gg},Vv=()=>Hv({extendY:!0});Vv.props={defaultShape:"range",defaultLabelShape:"label",composite:!1,shape:Gv,channels:[...gm({shapes:Object.keys(Gv)}),{name:"x",required:!0}],preInference:[...mm(),{type:Xv}],postInference:[]};const Kv=()=>(t,e)=>{const{data:n}=e;if(Array.isArray(n)&&(n.every(Array.isArray)||!n.some(qg))){const r=(t,e)=>Array.isArray(t[0])?t.map(t=>t[e]):[t[e]];return[t,(0,N.A)({},e,{encode:{y:Ng(r(n,0)),y1:Ng(r(n,1))}})]}return[t,e]};Kv.props={};const Uv={range:Gg},Zv=()=>Hv({extendX:!0});Zv.props={defaultShape:"range",defaultLabelShape:"label",composite:!1,shape:Uv,channels:[...gm({shapes:Object.keys(Uv)}),{name:"y",required:!0}],preInference:[...mm(),{type:Kv}],postInference:[]};var Jv=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const Qv=(t,e)=>{const{colorAttribute:n}=t,r=Jv(t,["arrow","colorAttribute"]),{coordinate:o,document:i}=e;return(t,e,a)=>{const{color:s}=a,c=Jv(a,["color","stroke"]),{d:l,color:u=s}=e,[f,d]=o.getSize();return _t(i.createElement("path",{})).call(ec,c).style("d","function"==typeof l?l({width:f,height:d}):l).style(n,u).call(ec,r).node()}};Qv.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const tx=(t,e)=>Qv(Object.assign({colorAttribute:"fill"},t),e);tx.props={defaultMarker:"hvh",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const ex=(t,e)=>Qv(Object.assign({fill:"none",colorAttribute:"stroke"},t),e);ex.props={defaultMarker:"hvh",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const nx={path:tx,hollow:ex},rx=t=>(t,e,n,r)=>[t,t.map(()=>[[0,0]])];rx.props={defaultShape:"path",defaultLabelShape:"label",shape:nx,composite:!1,channels:[...dm({shapes:Object.keys(nx)}),{name:"d",scale:"identity"}],preInference:[...mm()],postInference:[]};var ox=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const ix=(t,e)=>{const{render:n}=t,r=ox(t,["render"]);return t=>{const[[o,i]]=t;return n(Object.assign(Object.assign({},r),{x:o,y:i}),e)}};ix.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const ax=()=>(t,e)=>{const{style:n={}}=e;return[t,(0,N.A)({},e,{style:Object.assign(Object.assign({},n),Object.fromEntries(Object.entries(n).filter(([,t])=>"function"==typeof t).map(([t,e])=>[t,()=>e])))})]};ax.props={};const sx=t=>{const{cartesian:e}=t;return e?xm:(e,n,r,o)=>{const{x:i,y:a}=r,s=bm(n,r,t),c=Array.from(e,t=>[o.map(s([+i[t],+a[t]],t))]);return[e,c]}};sx.props={defaultShape:"shape",defaultLabelShape:"label",composite:!1,shape:{shape:ix},channels:[{name:"x",required:!0},{name:"y",required:!0}],preInference:[...mm(),{type:Sb},{type:Pb},{type:ax}]};var cx=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const lx=(t,e)=>{const{document:n}=e;return(e,r,o)=>{const{transform:i}=r,{color:a}=o,s=cx(o,["color"]),{color:c=a}=r,[l,...u]=e,f=(0,nl.Ae)();return f.moveTo(...l),u.forEach(([t,e])=>{f.lineTo(t,e)}),f.closePath(),_t(n.createElement("path",{})).call(ec,s).style("d",f.toString()).style("stroke",c||a).style("fill",c||a).style("fillOpacity",.4).style("transform",i).call(ec,t).node()}};lx.props={defaultMarker:"square",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const ux={density:lx},fx=()=>(t,e,n,r)=>{const{x:o,series:i}=n,a=Object.entries(n).filter(([t])=>t.startsWith("y")).map(([,t])=>t),s=Object.entries(n).filter(([t])=>t.startsWith("size")).map(([,t])=>t);if(void 0===o||void 0===a||void 0===s)throw new Error("Missing encode for x or y or size channel.");const c=e.x,l=e.series,u=Array.from(t,e=>{const n=c.getBandWidth(c.invert(+o[e])),u=l?l.getBandWidth(l.invert(+(null==i?void 0:i[e]))):1,f=+o[e]+(+(null==i?void 0:i[e])||0)*n+n*u/2;return[...a.map((n,r)=>[f+ +s[r][e]/t.length,+a[r][e]]),...a.map((n,r)=>[f-+s[r][e]/t.length,+a[r][e]]).reverse()].map(t=>r.map(t))});return[t,u]};function dx(t,e,n){const r=t?t():document.createElement("canvas");return r.width=e,r.height=n,r}fx.props={defaultShape:"density",defaultLabelShape:"label",composite:!1,shape:ux,channels:[...dm({shapes:Object.keys(ux)}),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"size",required:!0},{name:"series",scale:"band"},{name:"size",required:!0,scale:"identity"}],preInference:[...mm(),{type:Yg},{type:Xg}],postInference:[...hm()],interaction:{shareTooltip:!0}};const px=_e((t,e,n)=>{const r=dx(n,2*t,2*t),o=r.getContext("2d"),i=t,a=t;if(1===e)o.beginPath(),o.arc(i,a,t,0,2*Math.PI,!1),o.fillStyle="rgba(0,0,0,1)",o.fill();else{const n=o.createRadialGradient(i,a,t*e,i,a,t);n.addColorStop(0,"rgba(0,0,0,1)"),n.addColorStop(1,"rgba(0,0,0,0)"),o.fillStyle=n,o.fillRect(0,0,2*t,2*t)}return r},t=>`${t}`);function hx(t,e,n,r,o,i,a){const s=Object.assign({blur:.85,minOpacity:0,opacity:.6,maxOpacity:1,gradient:[[.25,"rgb(0,0,255)"],[.55,"rgb(0,255,0)"],[.85,"yellow"],[1,"rgb(255,0,0)"]]},i);s.minOpacity*=255,s.opacity*=255,s.maxOpacity*=255;const c=dx(a,t,e).getContext("2d"),l=function(t,e){const n=dx(e,256,1).getContext("2d"),r=n.createLinearGradient(0,0,256,1);return function(t){return"string"==typeof t?t.split(" ").map(t=>{const[e,n]=t.split(":");return[+e,n]}):t}(t).forEach(([t,e])=>{r.addColorStop(t,e)}),n.fillStyle=r,n.fillRect(0,0,256,1),n.getImageData(0,0,256,1).data}(s.gradient,a);c.clearRect(0,0,t,e),function(t,e,n,r,o,i){const{blur:a}=o;let s=r.length;for(;s--;){const{x:o,y:c,value:l,radius:u}=r[s],f=Math.min(l,n),d=o-u,p=c-u,h=px(u,1-a,i);t.globalAlpha=Math.max((f-e)/(n-e),.001),t.drawImage(h,d,p)}}(c,n,r,o,s,a);const u=function(t,e,n,r,o){const{minOpacity:i,opacity:a,maxOpacity:s,useGradientOpacity:c}=o,l=t.getImageData(0,0,e,n),u=l.data,f=u.length;for(let t=3;t<f;t+=4){const e=u[t],n=4*e;if(!n)continue;const o=a||Math.max(0,Math.min(s,Math.max(i,e)));u[t-3]=r[n],u[t-2]=r[n+1],u[t-1]=r[n+2],u[t]=c?r[n+3]:o}return l}(c,t,e,l,s),f=dx(a,t,e).getContext("2d");return f.putImageData(u,0,0),f}var gx=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const mx=(t,e)=>{const{gradient:n,opacity:r,maxOpacity:o,minOpacity:i,blur:a,useGradientOpacity:s}=t,c=gx(t,["gradient","opacity","maxOpacity","minOpacity","blur","useGradientOpacity"]),{coordinate:l,createCanvas:u,document:f}=e;return(t,e,d)=>{const{transform:p}=e,[h,g]=l.getSize(),m=t.map(t=>({x:t[0],y:t[1],value:t[2],radius:t[3]})),y=ep(t,t=>t[2]),b=Ye(t,t=>t[2]),v=h&&g?hx(h,g,y,b,m,function(t,e){return Object.keys(t).reduce((n,r)=>{const o=t[r];return e(o,r)||(n[r]=o),n},{})}({gradient:n,opacity:r,minOpacity:i,maxOpacity:o,blur:a,useGradientOpacity:s},t=>void 0===t),u):{canvas:null};return _t(f.createElement("image",{})).call(ec,d).style("x",0).style("y",0).style("width",h).style("height",g).style("src",v.canvas.toDataURL()).style("transform",p).call(ec,c).node()}};mx.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const yx={heatmap:mx},bx=t=>(t,e,n,r)=>{const{x:o,y:i,size:a,color:s}=n,c=Array.from(t,t=>{const e=a?+a[t]:40;return[...r.map([+o[t],+i[t]]),s[t],e]});return[[0],[c]]};bx.props={defaultShape:"heatmap",defaultLabelShape:"label",composite:!1,shape:yx,channels:[...dm({shapes:Object.keys(yx)}),{name:"x",required:!0},{name:"y",required:!0},{name:"color",scale:"identity",required:!0},{name:"size"}],preInference:[...mm(),{type:Xg},{type:vb}],postInference:[...pm()]};var vx=function(t,e,n,r){return new(n||(n=Promise))(function(o,i){function a(t){try{c(r.next(t))}catch(t){i(t)}}function s(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){t.done?o(t.value):function(t){return t instanceof n?t:new n(function(e){e(t)})}(t.value).then(a,s)}c((r=r.apply(t,e||[])).next())})},xx=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const Ox=(t,e)=>vx(void 0,void 0,void 0,function*(){const{width:n,height:r}=e,{data:o,encode:i={},scale:a,style:s={},layout:c={}}=t,l=xx(t,["data","encode","scale","style","layout"]),u=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]}))}(o,i);return(0,N.A)({},{axis:!1,type:"text",encode:{x:"x",y:"y",text:"text",rotate:"rotate",fontSize:"size",shape:"tag"},scale:{x:{range:[0,1]},y:{range:[0,1]}},style:{fontFamily:t=>t.fontFamily},tooltip:{items:[t=>({name:t.text,value:t.value})]}},Object.assign(Object.assign({data:{value:u,transform:[Object.assign({type:"wordCloud",size:[n,r]},c)]},encode:i,scale:a,style:s},l),{axis:!1}))});Ox.props={};var wx=n("./node_modules/.pnpm/d3-force@3.0.0/node_modules/d3-force/src/simulation.js"),jx=n("./node_modules/.pnpm/d3-force@3.0.0/node_modules/d3-force/src/collide.js"),kx=n("./node_modules/.pnpm/d3-force@3.0.0/node_modules/d3-force/src/constant.js");function Ax(t){var e,n,r,o=(0,kx.A)(.1);function i(t){for(var o,i=0,a=e.length;i<a;++i)(o=e[i]).vx+=(r[i]-o.x)*n[i]*t}function a(){if(e){var i,a=e.length;for(n=new Array(a),r=new Array(a),i=0;i<a;++i)n[i]=isNaN(r[i]=+t(e[i],i,e))?0:+o(e[i],i,e)}}return"function"!=typeof t&&(t=(0,kx.A)(null==t?0:+t)),i.initialize=function(t){e=t,a()},i.strength=function(t){return arguments.length?(o="function"==typeof t?t:(0,kx.A)(+t),a(),i):o},i.x=function(e){return arguments.length?(t="function"==typeof e?e:(0,kx.A)(+e),a(),i):t},i}function Mx(t){var e,n,r,o=(0,kx.A)(.1);function i(t){for(var o,i=0,a=e.length;i<a;++i)(o=e[i]).vy+=(r[i]-o.y)*n[i]*t}function a(){if(e){var i,a=e.length;for(n=new Array(a),r=new Array(a),i=0;i<a;++i)n[i]=isNaN(r[i]=+t(e[i],i,e))?0:+o(e[i],i,e)}}return"function"!=typeof t&&(t=(0,kx.A)(null==t?0:+t)),i.initialize=function(t){e=t,a()},i.strength=function(t){return arguments.length?(o="function"==typeof t?t:(0,kx.A)(+t),a(),i):o},i.y=function(e){return arguments.length?(t="function"==typeof e?e:(0,kx.A)(+e),a(),i):t},i}const _x={hollow:Uy,hollowDiamond:Zy,hollowHexagon:Jy,hollowSquare:Qy,hollowTriangleDown:tb,hollowTriangle:eb,hollowBowtie:nb,hollowCircle:ab,point:sb,plus:cb,diamond:lb,square:ub,triangle:fb,hexagon:db,cross:pb,bowtie:hb,hyphen:gb,line:mb,tick:yb,triangleDown:bb,circle:ib},Sx=t=>(e,n,r,o)=>{const{x:i,y:a,size:s}=r;if(!i.length||!a.length)return[e,a.map(()=>[[]])];const[c,l]=o.getSize(),u=bm(n,r,t),f=Array.from(e,t=>({i:t,x:+i[t]*c,y:+a[t]*l,r:+s[t]||4})),d=(0,wx.A)(f).stop().force("collide",(0,jx.A)().radius(t=>t.r+1).strength(1));d.force("x",Ax(t=>t.x).strength(0)),d.force("y",Mx(t=>t.y).strength(5));for(let t=0;t<200;t++)d.tick();d.stop();const p=t=>{const e=f.find(e=>e.i===t);return[e.x/c,e.y/l]},h=Array.from(e,s?t=>{const[e,n]=p(t),r=+s[t],i=r/c,a=r/l,f=[e+i,n+a];return[o.map(u([e-i,n-a],t)),o.map(u(f,t))]}:t=>[o.map(u(p(t),t))]);return[e,h]};Sx.props={defaultShape:"point",defaultLabelShape:"label",composite:!1,shape:_x,channels:[...dm({shapes:Object.keys(_x)}),{name:"x",required:!0},{name:"y",required:!0},{name:"series",scale:"band"},{name:"size",quantitative:"sqrt"}],preInference:[...mm(),{type:Xg},{type:vb}],postInference:[{type:xb},...pm()]};const Ex=()=>["#5B8FF9","#5AD8A6","#5D7092","#F6BD16","#6F5EF9","#6DC8EC","#945FB9","#FF9845","#1E9493","#FF99C3"];Ex.props={};const Px=()=>["#5B8FF9","#CDDDFD","#5AD8A6","#CDF3E4","#5D7092","#CED4DE","#F6BD16","#FCEBB9","#6F5EF9","#D3CEFD","#6DC8EC","#D3EEF9","#945FB9","#DECFEA","#FF9845","#FFE0C7","#1E9493","#BBDEDE","#FF99C3","#FFE0ED"];Px.props={};const Lx=t=>new li(t);Lx.props={};const Cx=t=>new U(t);Cx.props={};const zx=t=>new Q(t);zx.props={};class Tx extends Y{getDefaultOptions(){return{domain:[0,1],range:[0,1],tickCount:5,unknown:void 0,tickMethod:Ms}}map(t){return ri(t)?t:this.options.unknown}invert(t){return this.map(t)}clone(){return new Tx(this.options)}getTicks(){const{domain:t,tickCount:e,tickMethod:n}=this.options,[r,o]=t;return(0,tt.A)(r)&&(0,tt.A)(o)?n(r,o,e):[]}}const Bx=t=>new Tx(t);Bx.props={};class Ix extends Q{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,padding:0,unknown:X,paddingInner:1,paddingOuter:0}}constructor(t){super(t)}getPaddingInner(){return 1}clone(){return new Ix(this.options)}update(t){super.update(t)}getPaddingOuter(){return this.options.padding}}const Nx=t=>new Ix(t);Nx.props={};var Rx=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,Fx="\\d\\d?",Dx="\\d\\d",$x="[^\\s]+",Wx=/\[([^]*?)\]/gm;function Hx(t,e){for(var n=[],r=0,o=t.length;r<o;r++)n.push(t[r].substr(0,e));return n}var qx=function(t){return function(e,n){var r=n[t].map(function(t){return t.toLowerCase()}),o=r.indexOf(e.toLowerCase());return o>-1?o:null}};function Yx(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0,o=e;r<o.length;r++){var i=o[r];for(var a in i)t[a]=i[a]}return t}var Xx=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Gx=["January","February","March","April","May","June","July","August","September","October","November","December"],Vx=Hx(Gx,3),Kx={dayNamesShort:Hx(Xx,3),dayNames:Xx,monthNamesShort:Vx,monthNames:Gx,amPm:["am","pm"],DoFn:function(t){return t+["th","st","nd","rd"][t%10>3?0:(t-t%10!=10?1:0)*t%10]}},Ux=Yx({},Kx),Zx=function(t,e){for(void 0===e&&(e=2),t=String(t);t.length<e;)t="0"+t;return t},Jx={D:function(t){return String(t.getDate())},DD:function(t){return Zx(t.getDate())},Do:function(t,e){return e.DoFn(t.getDate())},d:function(t){return String(t.getDay())},dd:function(t){return Zx(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 Zx(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 Zx(String(t.getFullYear()),4).substr(2)},YYYY:function(t){return Zx(t.getFullYear(),4)},h:function(t){return String(t.getHours()%12||12)},hh:function(t){return Zx(t.getHours()%12||12)},H:function(t){return String(t.getHours())},HH:function(t){return Zx(t.getHours())},m:function(t){return String(t.getMinutes())},mm:function(t){return Zx(t.getMinutes())},s:function(t){return String(t.getSeconds())},ss:function(t){return Zx(t.getSeconds())},S:function(t){return String(Math.round(t.getMilliseconds()/100))},SS:function(t){return Zx(Math.round(t.getMilliseconds()/10),2)},SSS:function(t){return Zx(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].toUpperCase():e.amPm[1].toUpperCase()},ZZ:function(t){var e=t.getTimezoneOffset();return(e>0?"-":"+")+Zx(100*Math.floor(Math.abs(e)/60)+Math.abs(e)%60,4)},Z:function(t){var e=t.getTimezoneOffset();return(e>0?"-":"+")+Zx(Math.floor(Math.abs(e)/60),2)+":"+Zx(Math.abs(e)%60,2)}},Qx=function(t){return+t-1},tO=[null,Fx],eO=[null,$x],nO=["isPm",$x,function(t,e){var n=t.toLowerCase();return n===e.amPm[0]?0:n===e.amPm[1]?1:null}],rO=["timezoneOffset","[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z?",function(t){var e=(t+"").match(/([+-]|\d\d)/gi);if(e){var n=60*+e[1]+parseInt(e[2],10);return"+"===e[0]?n:-n}return 0}],oO=(qx("monthNamesShort"),qx("monthNames"),{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"}),iO=function(t,e,n){if(void 0===e&&(e=oO.default),void 0===n&&(n={}),"number"==typeof t&&(t=new Date(t)),"[object Date]"!==Object.prototype.toString.call(t)||isNaN(t.getTime()))throw new Error("Invalid Date pass to format");var r=[];e=(e=oO[e]||e).replace(Wx,function(t,e){return r.push(e),"@@@"});var o=Yx(Yx({},Ux),n);return(e=e.replace(Rx,function(e){return Jx[e](t,o)})).replace(/@@@/g,function(){return r.shift()})};const aO=1e3,sO=6e4,cO=36e5,lO=864e5,uO=6048e5,fO=2592e6,dO=31536e6;function pO(t,e,n,r){const o=(t,o)=>{o&&((t,e)=>{const o=t=>r(t)%e===0;let i=e;for(;i&&!o(t);)n(t,-1),i-=1})(t,o),e(t)},i=(t,e)=>{const r=new Date(+t-1);return o(r,e),n(r,e),o(r),r};return{ceil:i,floor:(t,e)=>{const n=new Date(+t);return o(n,e),n},range:(t,e,r,a)=>{const s=[],c=Math.floor(r);for(let l=a?i(t,r):i(t);l<e;n(l,c),o(l))s.push(new Date(+l));return s},duration:t}}const hO=pO(1,t=>t,(t,e=1)=>{t.setTime(+t+e)},t=>t.getTime()),gO=pO(aO,t=>{t.setMilliseconds(0)},(t,e=1)=>{t.setTime(+t+aO*e)},t=>t.getSeconds()),mO=pO(sO,t=>{t.setSeconds(0,0)},(t,e=1)=>{t.setTime(+t+sO*e)},t=>t.getMinutes()),yO=pO(cO,t=>{t.setMinutes(0,0,0)},(t,e=1)=>{t.setTime(+t+cO*e)},t=>t.getHours()),bO=pO(lO,t=>{t.setHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+lO*e)},t=>t.getDate()-1),vO=pO(fO,t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e=1)=>{const n=t.getMonth();t.setMonth(n+e)},t=>t.getMonth()),xO=pO(uO,t=>{t.setDate(t.getDate()-t.getDay()%7),t.setHours(0,0,0,0)},(t,e=1)=>{t.setDate(t.getDate()+7*e)},t=>{const e=vO.floor(t),n=new Date(+t);return Math.floor((+n-+e)/uO)}),OO=pO(dO,t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e=1)=>{const n=t.getFullYear();t.setFullYear(n+e)},t=>t.getFullYear()),wO={millisecond:hO,second:gO,minute:mO,hour:yO,day:bO,week:xO,month:vO,year:OO},jO=pO(1,t=>t,(t,e=1)=>{t.setTime(+t+e)},t=>t.getTime()),kO=pO(1e3,t=>{t.setUTCMilliseconds(0)},(t,e=1)=>{t.setTime(+t+1e3*e)},t=>t.getUTCSeconds()),AO=pO(6e4,t=>{t.setUTCSeconds(0,0)},(t,e=1)=>{t.setTime(+t+6e4*e)},t=>t.getUTCMinutes()),MO=pO(cO,t=>{t.setUTCMinutes(0,0,0)},(t,e=1)=>{t.setTime(+t+cO*e)},t=>t.getUTCHours()),_O=pO(lO,t=>{t.setUTCHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+lO*e)},t=>t.getUTCDate()-1),SO=pO(fO,t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e=1)=>{const n=t.getUTCMonth();t.setUTCMonth(n+e)},t=>t.getUTCMonth()),EO=pO(uO,t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7)%7),t.setUTCHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+uO*e)},t=>{const e=SO.floor(t),n=new Date(+t);return Math.floor((+n-+e)/uO)}),PO=pO(dO,t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e=1)=>{const n=t.getUTCFullYear();t.setUTCFullYear(n+e)},t=>t.getUTCFullYear()),LO={millisecond:jO,second:kO,minute:AO,hour:MO,day:_O,week:EO,month:SO,year:PO};function CO(t,e,n,r,o){const i=+t,a=+e,{tickIntervals:s,year:c,millisecond:l}=function(t){const e=t?LO:wO,{year:n,month:r,week:o,day:i,hour:a,minute:s,second:c,millisecond:l}=e;return{tickIntervals:[[c,1],[c,5],[c,15],[c,30],[s,1],[s,5],[s,15],[s,30],[a,1],[a,3],[a,6],[a,12],[i,1],[i,2],[o,1],[r,1],[r,3],[n,1]],year:n,millisecond:l}}(o),u=([t,e])=>t.duration*e,f=r?(a-i)/r:n||5,d=r||(a-i)/f,p=s.length,h=Go(s,d,0,p,u);let g;if(h===p){g=[c,it(i/c.duration,a/c.duration,f)]}else if(h){const t=d/u(s[h-1])<u(s[h])/d,[e,n]=t?s[h-1]:s[h];g=[e,r?Math.ceil(r/e.duration):n]}else{g=[l,Math.max(it(i,a,f),1)]}return g}const zO=(t,e,n,r,o)=>{const i=t>e,a=i?e:t,s=i?t:e,[c,l]=CO(a,s,n,r,o),u=c.range(a,new Date(+s+1),l,!0);return i?u.reverse():u},TO=(t,e,n,r,o)=>{const i=t>e,a=i?e:t,s=i?t:e,[c,l]=CO(a,s,n,r,o),u=[c.floor(a,l),c.ceil(s,l)];return i?u.reverse():u};function BO(t){const e=t.getTimezoneOffset(),n=new Date(t);return n.setMinutes(n.getMinutes()+e,n.getSeconds(),n.getMilliseconds()),n}class IO extends ci{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:zO,interpolate:Jo,mask:void 0,utc:!1}}chooseTransforms(){return[t=>+t,t=>new Date(t)]}chooseNice(){return TO}getTickMethodOptions(){const{domain:t,tickCount:e,tickInterval:n,utc:r}=this.options;return[t[0],t[t.length-1],e,n,r]}getFormatter(){const{mask:t,utc:e}=this.options,n=e?LO:wO,r=e?BO:qo;return e=>iO(r(e),t||function(t,e){const{second:n,minute:r,hour:o,day:i,week:a,month:s,year:c}=e;return n.floor(t)<t?".SSS":r.floor(t)<t?":ss":o.floor(t)<t?"hh:mm":i.floor(t)<t?"hh A":s.floor(t)<t?a.floor(t)<t?"MMM DD":"ddd DD":c.floor(t)<t?"MMMM":"YYYY"}(e,n))}clone(){return new IO(this.options)}}const NO=t=>new IO(t);NO.props={};const RO=t=>e=>-t(-e),FO=(t,e)=>{const n=Math.log(t),r=t===Math.E?Math.log:10===t?Math.log10:2===t?Math.log2:t=>Math.log(t)/n;return e?RO(r):r},DO=(t,e)=>{const n=t===Math.E?Math.exp:e=>t**e;return e?RO(n):n},$O=(t,e,n,r=10)=>{const o=t<0,i=DO(r,o),a=FO(r,o),s=e<t,c=s?e:t,l=s?t:e;let u=a(c),f=a(l),d=[];if(!(r%1)&&f-u<n){if(u=Math.floor(u),f=Math.ceil(f),o)for(;u<=f;u+=1){const t=i(u);for(let e=r-1;e>=1;e-=1){const n=t*e;if(n>l)break;n>=c&&d.push(n)}}else for(;u<=f;u+=1){const t=i(u);for(let e=1;e<r;e+=1){const n=t*e;if(n>l)break;n>=c&&d.push(n)}}2*d.length<n&&(d=at(c,l,n))}else{const t=-1===n?f-u:Math.min(f-u,n);d=at(u,f,t).map(i)}return s?d.reverse():d},WO=(t,e,n,r)=>{const o=t<0,i=FO(r,o),a=DO(r,o),s=t>e,c=s?t:e,l=[a(Math.floor(i(s?e:t))),a(Math.ceil(i(c)))];return s?l.reverse():l};class HO extends ci{getDefaultOptions(){return{domain:[1,10],range:[0,1],base:10,interpolate:Qo,tickMethod:$O,tickCount:5}}chooseNice(){return WO}getTickMethodOptions(){const{domain:t,tickCount:e,base:n}=this.options;return[t[0],t[t.length-1],e,n]}chooseTransforms(){const{base:t,domain:e}=this.options,n=e[0]<0;return[FO(t,n),DO(t,n)]}clone(){return new HO(this.options)}}const qO=t=>new HO(t);qO.props={};const YO=t=>t<0?-Math.sqrt(-t):Math.sqrt(t);class XO extends ci{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,exponent:2,interpolate:Qo,tickMethod:at,tickCount:5}}constructor(t){super(t)}chooseTransforms(){const{exponent:t}=this.options;if(1===t)return[qo,qo];const e=.5===t?YO:(t=>e=>e<0?-((-e)**t):e**t)(t),n=(t=>e=>e<0?-((-e)**(1/t)):e**(1/t))(t);return[e,n]}clone(){return new XO(this.options)}}const GO=t=>new XO(t);GO.props={};class VO extends XO{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:Qo,tickMethod:at,tickCount:5,exponent:.5}}constructor(t){super(t)}update(t){super.update(t)}clone(){return new VO(this.options)}}const KO=t=>new VO(t);KO.props={};const UO=t=>new ps(t);UO.props={};const ZO=t=>new Es(t);ZO.props={};const JO=t=>new _s(t);JO.props={};var QO,tw=function(t,e,n,r){var o,i=arguments.length,a=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,n,a):o(e,n))||a);return i>3&&a&&Object.defineProperty(e,n,a),a};let ew=QO=class extends li{getDefaultOptions(){return{domain:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolator:qo,tickMethod:at,tickCount:5}}constructor(t){super(t)}clone(){return new QO(this.options)}};ew=QO=tw([function(t,e){return n=>{n.prototype.rescale=function(){this.initRange(),this.nice();const[t]=this.chooseTransforms();this.composeOutput(t,this.chooseClamp(t))},n.prototype.initRange=function(){const{interpolator:e}=this.options;this.options.range=t(e)},n.prototype.composeOutput=function(t,n){const{domain:r,interpolator:o,round:i}=this.getOptions(),a=e(r.map(t)),s=i?(t=>e=>{const n=t(e);return(0,tt.A)(n)?Math.round(n):n})(o):o;this.output=Xo(s,a,n,t)},n.prototype.invert=void 0}}(function(t){return[t(0),t(1)]},t=>{const[e,n]=t;return Xo(Jo(0,1),Yo(e,n))})],ew);const nw=t=>new ew(t);nw.props={};const rw=t=>new st(t);function ow({colorDefault:t,colorBlack:e,colorWhite:n,colorStroke:r,colorBackground:o,padding1:i,padding2:a,alpha90:s,alpha65:c,alpha45:l,alpha10:u,category10:f,category20:d,sizeDefault:p=1,padding:h="auto",margin:g=16}){return{padding:h,margin:g,size:p,color:t,category10:f,category20:d,enter:{duration:300,fill:"both",delay:0},update:{duration:300,fill:"both",delay:0},exit:{duration:300,fill:"both",delay:0},view:{viewFill:o,plotFill:"transparent",mainFill:"transparent",contentFill:"transparent"},line:{line:{fill:"",strokeOpacity:1,lineWidth:1,lineCap:"round"}},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:e,lineWidth:1}},text:{text:{fill:"#1D2129",fontSize:12,lineWidth:0,connectorStroke:r,connectorStrokeOpacity:.45,connectorLineWidth:1,backgroundFill:r,backgroundFillOpacity:.15,backgroundPadding:[2,4],startMarkerSymbol:"circle",startMarkerSize:4,endMarkerSymbol:"circle",endMarkerSize:4},badge:{fill:"#1D2129",fillOpacity:.65,lineWidth:0,fontSize:10,textAlign:"center",textBaseline:"middle",markerFill:r,markerFillOpacity:.25,markerStrokeOpacity:0}},lineX:{line:{stroke:r,strokeOpacity:.45,lineWidth:1}},lineY:{line:{stroke:r,strokeOpacity:.45,lineWidth:1}},rangeX:{range:{fill:r,fillOpacity:.15,lineWidth:0}},rangeY:{range:{fill:r,fillOpacity:.15,lineWidth:0}},connector:{connector:{stroke:r,strokeOpacity:.45,lineWidth:1,connectLength1:12,endMarker:!0,endMarkerSize:6,endMarkerFill:r,endMarkerFillOpacity:.95}},axis:{arrow:!1,gridLineDash:[3,4],gridLineWidth:.5,gridStroke:e,gridStrokeOpacity:u,labelAlign:"horizontal",labelFill:e,labelOpacity:l,labelFontSize:12,labelFontWeight:"normal",labelSpacing:i,line:!1,lineLineWidth:.5,lineStroke:e,lineStrokeOpacity:l,tickLength:4,tickLineWidth:1,tickStroke:e,tickOpacity:l,titleFill:e,titleOpacity:s,titleFontSize:12,titleFontWeight:"normal",titleSpacing:12,titleTransformOrigin:"center",lineArrowOffset:6,lineArrowSize:6},axisTop:{gridDirection:"positive",labelDirection:"negative",tickDirection:"negative",titlePosition:"top",titleSpacing:12,labelSpacing:4,titleTextBaseline:"middle"},axisBottom:{gridDirection:"negative",labelDirection:"positive",tickDirection:"positive",titlePosition:"bottom",titleSpacing:12,labelSpacing:4,titleTextBaseline:"bottom",titleTransform:"translate(0, 8)"},axisLeft:{gridDirection:"positive",labelDirection:"negative",labelSpacing:4,tickDirection:"negative",titlePosition:"left",titleSpacing:12,titleTextBaseline:"middle",titleDirection:"vertical",titleTransform:"rotate(-90) translate(0, -8)",titleTransformOrigin:"center"},axisRight:{gridDirection:"negative",labelDirection:"positive",labelSpacing:4,tickDirection:"positive",titlePosition:"right",titleSpacing:12,titleTextBaseline:"top",titleDirection:"vertical",titleTransformOrigin:"center"},axisLinear:{girdClosed:!0,gridConnect:"arc",gridDirection:"negative",gridType:"surround",titlePosition:"top",titleSpacing:0},axisArc:{title:!1,titlePosition:"inner",line:!1,tick:!0,labelSpacing:4},axisRadar:{girdClosed:!0,gridStrokeOpacity:.3,gridType:"surround",tick:!1,titlePosition:"start"},legendCategory:{backgroundFill:"transparent",itemBackgroundFill:"transparent",itemLabelFill:e,itemLabelFillOpacity:s,itemLabelFontSize:12,itemLabelFontWeight:"normal",itemMarkerFillOpacity:1,itemMarkerSize:8,focusMarkerSize:12,itemSpacing:[i,i,i/2],itemValueFill:e,itemValueFillOpacity:.65,itemValueFontSize:12,itemValueFontWeight:"normal",navButtonFill:e,navButtonFillOpacity:.65,navPageNumFill:e,navPageNumFillOpacity:.45,navPageNumFontSize:12,padding:8,title:!1,titleFill:e,titleFillOpacity:.65,titleFontSize:12,titleFontWeight:"normal",titleSpacing:4,tickStroke:e,tickStrokeOpacity:.25,rowPadding:i,colPadding:a,maxRows:3,maxCols:3},legendContinuous:{handleHeight:12,handleLabelFill:e,handleLabelFillOpacity:l,handleLabelFontSize:12,handleLabelFontWeight:"normal",handleMarkerFill:e,handleMarkerFillOpacity:.6,handleMarkerLineWidth:1,handleMarkerStroke:e,handleMarkerStrokeOpacity:.25,handleWidth:10,labelFill:e,labelFillOpacity:l,labelFontSize:12,labelFontWeight:"normal",labelSpacing:3,tick:!0,tickLength:12,ribbonSize:12,ribbonFill:"#aaa",handle:!0,handleLabel:!1,handleShape:"slider",handleIconSize:12/1.8,indicator:!1,titleFontSize:12,titleSpacing:4,titleFontWeight:"normal",titleFillOpacity:s,tickStroke:e,tickStrokeOpacity:l},label:{fill:e,fillOpacity:.65,fontSize:12,fontWeight:"normal",stroke:void 0,offset:12,connectorStroke:e,connectorStrokeOpacity:.45,connectorLineWidth:1,connectorLength:12,connectorLength2:8,connectorDistance:4},innerLabel:{fill:n,fontSize:12,fillOpacity:.85,fontWeight:"normal",stroke:void 0,offset:0},htmlLabel:{fontSize:12,opacity:.65,color:e,fontWeight:"normal"},slider:{trackSize:16,trackFill:r,trackFillOpacity:1,selectionFill:t,selectionFillOpacity:.15,handleIconSize:10,handleIconFill:"#f7f7f7",handleIconFillOpacity:1,handleIconStroke:e,handleIconStrokeOpacity:.25,handleIconLineWidth:1,handleIconRadius:2,handleLabelFill:e,handleLabelFillOpacity:.45,handleLabelFontSize:12,handleLabelFontWeight:"normal"},scrollbar:{padding:[0,0,0,0],trackSize:6,isRound:!0,slidable:!0,scrollable:!0,trackFill:"#e5e5e5",trackFillOpacity:0,thumbFill:"#000",thumbFillOpacity:.15,thumbHighlightedFillOpacity:.2},title:{spacing:8,titleFill:e,titleFillOpacity:s,titleFontSize:16,titleFontWeight:"bold",titleTextBaseline:"top",subtitleFill:e,subtitleFillOpacity:c,subtitleFontSize:12,subtitleFontWeight:"normal",subtitleTextBaseline:"top"},tooltip:{css:{[Je("tooltip")]:{"font-family":"sans-serif"}}}}}rw.props={};const iw=ow({colorBlack:"#1D2129",colorWhite:"#ffffff",colorStroke:"#416180",colorDefault:"#1783FF",colorBackground:"transparent",category10:["#1783FF","#00C9C9","#F0884D","#D580FF","#7863FF","#60C42D","#BD8F24","#FF80CA","#2491B3","#17C76F"],category20:["#1783FF","#00C9C9","#F0884D","#D580FF","#7863FF","#60C42D","#BD8F24","#FF80CA","#2491B3","#17C76F","#AABA01","#BC7CFC","#237CBC","#2DE379","#CE8032","#FF7AF4","#545FD3","#AFE410","#D8C608","#FFA1E0"],padding1:8,padding2:12,padding3:20,alpha90:.9,alpha65:.65,alpha45:.45,alpha25:.25,alpha10:.1}),aw=t=>(0,N.A)({},iw,t);aw.props={};const sw=t=>(0,N.A)({},aw(),{category10:"category10",category20:"category20"},t);sw.props={};const cw=ow({colorBlack:"#fff",colorWhite:"#000",colorStroke:"#416180",colorDefault:"#1783FF",colorBackground:"transparent",category10:["#1783FF","#00C9C9","#F0884D","#D580FF","#7863FF","#60C42D","#BD8F24","#FF80CA","#2491B3","#17C76F"],category20:["#1783FF","#00C9C9","#F0884D","#D580FF","#7863FF","#60C42D","#BD8F24","#FF80CA","#2491B3","#17C76F","#AABA01","#BC7CFC","#237CBC","#2DE379","#CE8032","#FF7AF4","#545FD3","#AFE410","#D8C608","#FFA1E0"],padding1:8,padding2:12,padding3:20,alpha90:.9,alpha65:.65,alpha45:.45,alpha25:.25,alpha10:.25}),lw=t=>(0,N.A)({},cw,{tooltip:{crosshairsStroke:"#fff",crosshairsLineWidth:1,crosshairsStrokeOpacity:.25,css:{[Je("tooltip")]:{background:"#1f1f1f",opacity:.95},[Je("tooltip-title")]:{color:"#A6A6A6"},[Je("tooltip-list-item-name-label")]:{color:"#A6A6A6"},[Je("tooltip-list-item-value")]:{color:"#A6A6A6"}}}},t),uw=t=>Object.assign({},lw(),{category10:"category10",category20:"category20"},t);uw.props={};const fw=ow({colorBlack:"#000",colorWhite:"#fff",colorStroke:"#888",colorDefault:"#4e79a7",colorBackground:"transparent",category10:["#4e79a7","#f28e2c","#e15759","#76b7b2","#59a14f","#edc949","#af7aa1","#ff9da7","#9c755f","#bab0ab"],category20:["#4e79a7","#f28e2c","#e15759","#76b7b2","#59a14f","#edc949","#af7aa1","#ff9da7","#9c755f","#bab0ab"],padding1:8,padding2:12,padding3:20,alpha90:.9,alpha65:.65,alpha45:.45,alpha25:.25,alpha10:.1}),dw=t=>(0,N.A)({},fw,{text:{text:{fontSize:10}},axis:{gridLineDash:[0,0],gridLineWidth:1,gridStroke:"#ddd",gridStrokeOpacity:1,labelOpacity:1,labelStrokeOpacity:1,labelFontSize:10,line:!0,lineLineWidth:1,lineStroke:"#888",lineStrokeOpacity:1,tickLength:5,tickStrokeOpacity:1,titleOpacity:1,titleStrokeOpacity:1,titleFillOpacity:1,titleFontSize:11,titleFontWeight:"bold"},axisLeft:{gridFilter:(t,e)=>0!==e},axisRight:{gridFilter:(t,e)=>0!==e},legendCategory:{itemLabelFillOpacity:1,itemLabelFontSize:10,itemValueFillOpacity:1,itemValueFontSize:10,titleFillOpacity:1,titleFontSize:11,titleFontWeight:"bold"},legendContinuous:{handleLabelFontSize:10,labelFillOpacity:.45,labelFontSize:10},label:{fontSize:10},innerLabel:{fontSize:10},htmlLabel:{fontSize:10},slider:{handleLabelFontSize:10,trackFillOpacity:.05}},t);dw.props={};const pw=t=>(...e)=>{const n=Ni(Object.assign({},{crossPadding:50},t))(...e);return Pi(n,t),n};pw.props=Object.assign(Object.assign({},Ni.props),{defaultPosition:"bottom"});const hw=t=>(...e)=>{const n=Ni(Object.assign({},{crossPadding:10},t))(...e);return Pi(n,t),n};hw.props=Object.assign(Object.assign({},Ni.props),{defaultPosition:"left"});const gw=function(){};var mw,yw=Tn({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"),bw=function(t){function e(e){var n=t.call(this,e,{x:0,y:0,animate:{easing:"linear",duration:200,fill:"both"},buttonCursor:"pointer",buttonFill:"black",buttonD:Ga(0,0,6),buttonSize:12,controllerPadding:5,controllerSpacing:5,formatter:function(t,e){return"".concat(t,"/").concat(e)},defaultPage:0,loop:!1,orientation:"horizontal",pageNumFill:"black",pageNumFontSize:12,pageNumTextAlign:"start",pageNumTextBaseline:"middle"})||this;return n.playState="idle",n.contentGroup=n.appendChild(new l.YJ({class:yw.contentGroup.name})),n.playWindow=n.contentGroup.appendChild(new l.YJ({class:yw.playWindow.name})),n.innerCurrPage=n.defaultPage,n}return(0,pn.C6)(e,t),Object.defineProperty(e.prototype,"defaultPage",{get:function(){return(0,ca.A)(this.attributes.defaultPage,0,Math.max(this.pageViews.length-1,0))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pageViews",{get:function(){return this.playWindow.children},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"controllerShape",{get:function(){return this.totalPages>1?{width:55,height:0}:{width:0,height:0}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pageShape",{get:function(){var t=(0,pn.zs)(function(t){var e;return(null===(e=t[0])||void 0===e?void 0:e.map(function(e,n){return t.map(function(t){return t[n]})}))||[]}(this.pageViews.map(function(t){var e=t.getBBox();return[e.width,e.height]})).map(function(t){return Math.max.apply(Math,(0,pn.fX)([],(0,pn.zs)(t),!1))}),2),e=this.attributes,n=e.pageWidth,r=e.pageHeight;return{pageWidth:void 0===n?t[0]:n,pageHeight:void 0===r?t[1]:r}},enumerable:!1,configurable:!0}),e.prototype.getContainer=function(){return this.playWindow},Object.defineProperty(e.prototype,"totalPages",{get:function(){return this.pageViews.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currPage",{get:function(){return this.innerCurrPage},enumerable:!1,configurable:!0}),e.prototype.getBBox=function(){var e=t.prototype.getBBox.call(this),n=this.pageShape;return new hi(e.x,e.y,n.pageWidth+this.controllerShape.width,n.pageHeight)},e.prototype.goTo=function(t){var e=this,n=this.attributes.animate,r=this,o=r.playWindow,i=r.pageViews;if("idle"!==r.playState||t<0||i.length<=0||t>=i.length)return null;i[r.currPage].setLocalPosition(0,0),this.prepareFollowingPage(t);var a=(0,pn.zs)(this.getFollowingPageDiff(t),2),s=a[0],c=a[1];this.playState="running";var l=On(o,[{transform:"translate(0, 0)"},{transform:"translate(".concat(-s,", ").concat(-c,")")}],n);return vn(l,function(){e.innerCurrPage=t,e.playState="idle",e.setVisiblePages([t]),e.updatePageInfo()}),l},e.prototype.prev=function(){var t=this.attributes.loop,e=this.pageViews.length,n=this.currPage;if(!t&&n<=0)return null;var r=t?(n-1+e)%e:(0,ca.A)(n-1,0,e);return this.goTo(r)},e.prototype.next=function(){var t=this.attributes.loop,e=this.pageViews.length,n=this.currPage;if(!t&&n>=e-1)return null;var r=t?(n+1)%e:(0,ca.A)(n+1,0,e);return this.goTo(r)},e.prototype.renderClipPath=function(t){var e=this.pageShape,n=e.pageWidth,r=e.pageHeight;n&&r?(this.clipPath=t.maybeAppendByClassName(yw.clipPath,"rect").styles({width:n,height:r}),this.contentGroup.attr("clipPath",this.clipPath.node())):this.contentGroup.style.clipPath=void 0},e.prototype.setVisiblePages=function(t){this.playWindow.children.forEach(function(e,n){t.includes(n)?gn(e):mn(e)})},e.prototype.adjustControllerLayout=function(){var t=this,e=t.prevBtnGroup,n=t.nextBtnGroup,r=t.pageInfoGroup,o=this.attributes,i=o.orientation,a=o.controllerPadding,s=r.getBBox(),c=s.width,l=(0,pn.zs)("horizontal"===i?[-180,0]:[-90,90],2),u=l[1];e.setLocalEulerAngles(l[0]),n.setLocalEulerAngles(u);var f=e.getBBox(),d=f.width,p=f.height,h=n.getBBox(),g=h.height,m=Math.max(d,c,h.width),y="horizontal"===i?{offset:[[0,0],[d/2+a,0],[d+c+2*a,0]],textAlign:"start"}:{offset:[[m/2,-p-a],[m/2,0],[m/2,g+a]],textAlign:"center"},b=(0,pn.zs)(y.offset,3),v=(0,pn.zs)(b[0],2),x=v[0],O=v[1],w=(0,pn.zs)(b[1],2),j=w[0],k=w[1],A=(0,pn.zs)(b[2],2),M=A[0],_=A[1],S=y.textAlign,E=r.querySelector("text");E&&(E.style.textAlign=S),e.setLocalPosition(x,O),r.setLocalPosition(j,k),n.setLocalPosition(M,_)},e.prototype.updatePageInfo=function(){var t,e=this,n=e.currPage,r=e.pageViews,o=e.attributes.formatter;r.length<2||(null===(t=this.pageInfoGroup.querySelector(yw.pageInfo.class))||void 0===t||t.attr("text",o(n+1,r.length)),this.adjustControllerLayout())},e.prototype.getFollowingPageDiff=function(t){var e=this.currPage;if(e===t)return[0,0];var n=this.pageShape,r=t<e?-1:1;return"horizontal"===this.attributes.orientation?[r*n.pageWidth,0]:[0,r*n.pageHeight]},e.prototype.prepareFollowingPage=function(t){var e=this.currPage,n=this.pageViews;if(this.setVisiblePages([t,e]),t!==e){var r=(0,pn.zs)(this.getFollowingPageDiff(t),2);n[t].setLocalPosition(r[0],r[1])}},e.prototype.renderController=function(t){var e=this,n=this.attributes,r=n.controllerSpacing,o=n.classNamePrefix,i=void 0===o?"":o,a=this.pageShape,s=a.pageWidth,c=a.pageHeight,l=this.pageViews.length>=2,u=t.maybeAppendByClassName(yw.controller,"g");if(yn(u.node(),l),l){var f=fr(this.attributes,"button"),d=fr(this.attributes,"pageNum"),p=(0,pn.zs)(pr(f),2),h=p[0],g=p[1],m=h.size,y=(0,pn.Tt)(h,["size"]),b=!u.select(yw.prevBtnGroup.class).node(),v=u.maybeAppendByClassName(yw.prevBtnGroup,"g").styles(g);this.prevBtnGroup=v.node();var x=v.maybeAppendByClassName(yw.prevBtn,"path");if(i){var O=Oa(yw.prevBtn.name,Ia,i);x.node().setAttribute("class",O)}var w=u.maybeAppendByClassName(yw.nextBtnGroup,"g").styles(g);this.nextBtnGroup=w.node();var j=w.maybeAppendByClassName(yw.nextBtn,"path");if(i){var k=Oa(yw.nextBtn.name,Na,i);j.node().setAttribute("class",k)}[x,j].forEach(function(t){t.styles((0,pn.Cl)((0,pn.Cl)({},y),{transformOrigin:"center"})),Mr(t.node(),m,!0)});var A=u.maybeAppendByClassName(yw.pageInfoGroup,"g");this.pageInfoGroup=A.node();var M=A.maybeAppendByClassName(yw.pageInfo,"text");if(M.styles(d),i){var _=Oa(yw.pageInfo.name,Ra,i);M.node().setAttribute("class",_)}this.updatePageInfo(),u.node().setLocalPosition(s+r,c/2),b&&(this.prevBtnGroup.addEventListener("click",function(){e.prev()}),this.nextBtnGroup.addEventListener("click",function(){e.next()}))}},e.prototype.render=function(t,e){var n=t.x,r=t.y,o=void 0===r?0:r;this.attr("transform","translate(".concat(void 0===n?0:n,", ").concat(o,")"));var i=zn(e);this.renderClipPath(i),this.renderController(i),this.setVisiblePages([this.defaultPage]),this.goTo(this.defaultPage)},e.prototype.bindEvents=function(){var t=this,e=w(function(){return t.render(t.attributes,t)},50);this.playWindow.addEventListener(l.jX.INSERTED,e),this.playWindow.addEventListener(l.jX.REMOVED,e)},e}(Sn);function vw(t,e){for(var n in e)e.hasOwnProperty(n)&&"constructor"!==n&&void 0!==e[n]&&(t[n]=e[n])}function xw(t,e,n,r){return e&&vw(t,e),n&&vw(t,n),r&&vw(t,r),t}var Ow="component-poptip",ww="component-poptip-arrow",jw="component-poptip-text",kw=((mw={})[".".concat(Ow)]={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"},mw[".".concat(jw)]={"text-align":"center"},mw[".".concat(Ow,"[data-position='top']")]={transform:"translate(-50%, -100%)"},mw[".".concat(Ow,"[data-position='left']")]={transform:"translate(-100%, -50%)"},mw[".".concat(Ow,"[data-position='right']")]={transform:"translate(0, -50%)"},mw[".".concat(Ow,"[data-position='bottom']")]={transform:"translate(-50%, 0)"},mw[".".concat(Ow,"[data-position='top-left']")]={transform:"translate(0,-100%)"},mw[".".concat(Ow,"[data-position='top-right']")]={transform:"translate(-100%,-100%)"},mw[".".concat(Ow,"[data-position='left-top']")]={transform:"translate(-100%, 0)"},mw[".".concat(Ow,"[data-position='left-bottom']")]={transform:"translate(-100%, -100%)"},mw[".".concat(Ow,"[data-position='right-top']")]={transform:"translate(0, 0)"},mw[".".concat(Ow,"[data-position='right-bottom']")]={transform:"translate(0, -100%)"},mw[".".concat(Ow,"[data-position='bottom-left']")]={transform:"translate(0, 0)"},mw[".".concat(Ow,"[data-position='bottom-right']")]={transform:"translate(-100%, 0)"},mw[".".concat(ww)]={width:"4px",height:"4px",transform:"rotate(45deg)","background-color":"rgba(0, 0, 0)",position:"absolute","z-index":-1},mw[".".concat(Ow,"[data-position='top']")]={transform:"translate(-50%, calc(-100% - 5px))"},mw["[data-position='top'] .".concat(ww)]={bottom:"-2px"},mw[".".concat(Ow,"[data-position='left']")]={transform:"translate(calc(-100% - 5px), -50%)"},mw["[data-position='left'] .".concat(ww)]={right:"-2px"},mw[".".concat(Ow,"[data-position='right']")]={transform:"translate(5px, -50%)"},mw["[data-position='right'] .".concat(ww)]={left:"-2px"},mw[".".concat(Ow,"[data-position='bottom']")]={transform:"translate(-50%, 5px)"},mw["[data-position='bottom'] .".concat(ww)]={top:"-2px"},mw[".".concat(Ow,"[data-position='top-left']")]={transform:"translate(0, calc(-100% - 5px))"},mw["[data-position='top-left'] .".concat(ww)]={left:"10px",bottom:"-2px"},mw[".".concat(Ow,"[data-position='top-right']")]={transform:"translate(-100%, calc(-100% - 5px))"},mw["[data-position='top-right'] .".concat(ww)]={right:"10px",bottom:"-2px"},mw[".".concat(Ow,"[data-position='left-top']")]={transform:"translate(calc(-100% - 5px), 0)"},mw["[data-position='left-top'] .".concat(ww)]={right:"-2px",top:"8px"},mw[".".concat(Ow,"[data-position='left-bottom']")]={transform:"translate(calc(-100% - 5px), -100%)"},mw["[data-position='left-bottom'] .".concat(ww)]={right:"-2px",bottom:"8px"},mw[".".concat(Ow,"[data-position='right-top']")]={transform:"translate(5px, 0)"},mw["[data-position='right-top'] .".concat(ww)]={left:"-2px",top:"8px"},mw[".".concat(Ow,"[data-position='right-bottom']")]={transform:"translate(5px, -100%)"},mw["[data-position='right-bottom'] .".concat(ww)]={left:"-2px",bottom:"8px"},mw[".".concat(Ow,"[data-position='bottom-left']")]={transform:"translate(0, 5px)"},mw["[data-position='bottom-left'] .".concat(ww)]={top:"-2px",left:"8px"},mw[".".concat(Ow,"[data-position='bottom-right']")]={transform:"translate(-100%, 5px)"},mw["[data-position='bottom-right'] .".concat(ww)]={top:"-2px",right:"8px"},mw);function Aw(t){var e=t&&document.getElementById(t);return e||((e=document.createElement("div")).setAttribute("id",t),document.body.appendChild(e)),e}var Mw=function(t){function e(n){var r=t.call(this,(0,N.A)({style:{id:"component-poptip"}},e.defaultOptions,n))||this;return r.visibility="visible",r.map=new Map,r.domStyles="",r.initShape(),r.render(r.attributes,r),r}return(0,pn.C6)(e,t),Object.defineProperty(e.prototype,"visible",{get:function(){return"visible"===this.visibility},enumerable:!1,configurable:!0}),e.prototype.render=function(t,e){this.visibility=this.style.visibility,this.updatePoptipElement()},e.prototype.update=function(t){this.attr((0,N.A)({},this.style,t)),this.render(this.attributes,this)},e.prototype.bind=function(t,e){var n=this;if(t){var r=this.style.text,o=function(o){var i=t,a=n.style,s=r;if(e){var c="function"==typeof e?e.call(null,o):e,l=c.html,u=c.target,f=(0,pn.Tt)(c,["html","target"]);a=xw({},n.style,f),(u||!1===u)&&(i=u),"string"==typeof l&&(s=l)}var d=a.position,p=a.offset;if(i){var h=(0,pn.zs)(function(t,e,n,r,o,i){if(void 0===o&&(o=!1),void 0===i&&(i=!1),i)return[t,e];var a=n.getBoundingClientRect(),s=a.x,c=a.y,l=a.width,u=a.height;switch(r){case"top":return o?[s+l/2,c]:[t,c];case"left":return o?[s,c+u/2]:[s,e];case"bottom":return o?[s+l/2,c+u]:[t,c+u];case"right":return o?[s+l,c+u/2]:[s+l,e];case"top-right":case"right-top":return[s+l,c];case"left-bottom":case"bottom-left":return[s,c+u];case"right-bottom":case"bottom-right":return[s+l,c+u];default:return[s,c]}}(o.clientX,o.clientY,i,d,a.arrowPointAtCenter,a.follow),2);n.showTip(h[0],h[1],{text:s,position:d,offset:p})}else n.hideTip()},i=function(){n.hideTip()};t.addEventListener("mousemove",o),t.addEventListener("mouseleave",i),this.map.set(t,[o,i])}},e.prototype.unbind=function(t){if(this.map.has(t)){var e=(0,pn.zs)(this.map.get(t)||[],2),n=e[0],r=e[1];n&&t.removeEventListener("mousemove",n),r&&t.removeEventListener("mouseleave",r),this.map.delete(t)}},e.prototype.clear=function(){this.container.innerHTML=""},e.prototype.destroy=function(){var e,n=this;(0,pn.fX)([],(0,pn.zs)(this.map.keys()),!1).forEach(function(t){return n.unbind(t)}),null===(e=this.container)||void 0===e||e.remove(),t.prototype.destroy.call(this)},e.prototype.showTip=function(t,e,n){var r=k(n,"text");if((!r||"string"==typeof r)&&(this.applyStyles(),t&&e&&n)){var o=n.offset,i=n.position;if(i&&this.container.setAttribute("data-position",i),this.setOffsetPosition(t,e,o),"string"==typeof r){var a=this.container.querySelector(".".concat(jw));a&&(a.innerHTML=r)}this.visibility="visible",this.container.style.visibility="visible"}},e.prototype.hideTip=function(){this.visibility="hidden",this.container.style.visibility="hidden"},e.prototype.getContainer=function(){return this.container},e.prototype.getClassName=function(){var t=this.style.containerClassName;return"".concat(Ow).concat(t?" ".concat(t):"")},e.prototype.initShape=function(){var t=this;this.container=function(t){var e=function(t){var e;return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return e||(e=t.apply(void 0,n)),e}}(Aw)(t);return e}(this.style.id),this.container.className=this.getClassName(),this.container.addEventListener("mousemove",function(){return t.showTip()}),this.container.addEventListener("mouseleave",function(){return t.hideTip()})},e.prototype.updatePoptipElement=function(){var t=this.container;this.clear();var e=this.style,n=e.template,r=e.text;this.container.setAttribute("id",e.id),this.container.className=this.getClassName();var o='<span class="'.concat(ww,'"></span>');t.innerHTML=o,(0,j.A)(n)?t.innerHTML+=n:n&&function(t){return t instanceof Element||t instanceof Document}(n)&&t.appendChild(n),r&&(t.getElementsByClassName(jw)[0].textContent=r),this.applyStyles(),this.container.style.visibility=this.visibility},e.prototype.applyStyles=function(){var t=kn({},kw,this.style.domStyles),e=Object.entries(t).reduce(function(t,e){var n=(0,pn.zs)(e,2),r=n[0],o=Object.entries(n[1]).reduce(function(t,e){var n=(0,pn.zs)(e,2),r=n[0],o=n[1];return"".concat(t).concat(r,": ").concat(o,";")},"");return"".concat(t).concat(r,"{").concat(o,"}")},"");if(this.domStyles!==e){this.domStyles=e;var n=this.container.querySelector("style");n&&this.container.removeChild(n),(n=document.createElement("style")).innerHTML=e,this.container.appendChild(n)}},e.prototype.setOffsetPosition=function(t,e,n){void 0===n&&(n=this.style.offset);var r=(0,pn.zs)(n,2),o=r[0],i=r[1],a=void 0===i?0:i;this.container.style.left="".concat(t+(void 0===o?0:o),"px"),this.container.style.top="".concat(e+a,"px")},e.tag="poptip",e.defaultOptions={style:{x:0,y:0,width:0,height:0,target:null,visibility:"hidden",text:"",position:"top",follow:!1,offset:[0,0],domStyles:kw,template:'<div class="'.concat(jw,'"></div>')}},e}(Sn),_w=Tn({layout:"flex",markerGroup:"marker-group",marker:"marker",labelGroup:"label-group",label:"label",valueGroup:"value-group",focusGroup:"focus-group",focus:"focus",value:"value",backgroundGroup:"background-group",background:"background"},"legend-category-item"),Sw={offset:[0,20],domStyles:{".component-poptip":{opacity:"1",padding:"8px 12px",background:"#fff",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.15)"},".component-poptip-arrow":{display:"none"},".component-poptip-text":{color:"#000",lineHeight:"20px"}}};var Ew=function(t){function e(e,n){var r=t.call(this,e,{span:[1,1],marker:function(){return new l.jl({style:{r:6}})},markerSize:10,labelFill:"#646464",valueFill:"#646464",labelFontSize:12,valueFontSize:12,labelTextBaseline:"middle",valueTextBaseline:"middle"})||this;return r.keyFields={},r.keyFields=n||{},r}return(0,pn.C6)(e,t),Object.defineProperty(e.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(e.prototype,"actualSpace",{get:function(){var t=this.valueGroup,e=this.attributes,n=e.markerSize,r=e.focus,o=e.focusMarkerSize,i=this.labelGroup.node().getBBox(),a=i.width,s=i.height,c=t.node().getBBox();return{markerWidth:n,labelWidth:a,valueWidth:c.width,focusWidth:r?null!=o?o:12:0,height:Math.max(n,s,c.height)}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"span",{get:function(){var t=this.attributes.span;if(!t)return[1,1];var e=(0,pn.zs)(so(t),2),n=e[0],r=this.showValue?e[1]:0,o=n+r;return[n/o,r/o]},enumerable:!1,configurable:!0}),e.prototype.setAttribute=function(e,n){t.prototype.setAttribute.call(this,e,n)},Object.defineProperty(e.prototype,"shape",{get:function(){var t,e=this.attributes,n=e.markerSize,r=e.width,o=this.actualSpace,i=o.markerWidth,a=o.focusWidth,s=o.height,c=this.actualSpace,l=c.labelWidth,u=c.valueWidth,f=(0,pn.zs)(this.spacing,3),d=f[0],p=f[1],h=f[2];if(r){var g=r-n-d-p-a-h,m=(0,pn.zs)(this.span,2);l=(t=(0,pn.zs)([m[0]*g,m[1]*g],2))[0],u=t[1]}return{width:i+l+u+d+p+a+h,height:s,markerWidth:i,labelWidth:l,valueWidth:u,focusWidth:a}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"spacing",{get:function(){var t=this.attributes,e=t.spacing,n=t.focus;if(!e)return[0,0,0];var r=(0,pn.zs)(so(e),3);return[r[0],this.showValue?r[1]:0,n?r[2]:0]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"layout",{get:function(){var t=this.shape,e=t.markerWidth,n=t.labelWidth,r=t.valueWidth,o=t.focusWidth,i=t.width,a=t.height,s=(0,pn.zs)(this.spacing,3),c=s[0],l=s[1];return{height:a,width:i,markerWidth:e,labelWidth:n,valueWidth:r,focusWidth:o,position:[e/2,e+c,e+n+c+l,e+n+r+c+l+s[2]+o/2]}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scaleSize",{get:function(){var t=function(t){var e=t.querySelector(_w.marker.class);return e?e.style:{}}(this.markerGroup.node()),e=this.attributes,n=e.markerSize,r=e.markerStrokeWidth,o=e.markerLineWidth,i=e.markerStroke,a=+((void 0===r?t.strokeWidth:r)||(void 0===o?t.lineWidth:o)||((void 0===i?t.stroke:i)?1:0))*Math.sqrt(2),s=this.markerGroup.node().getBBox();return(1-a/Math.max(s.width,s.height))*n},enumerable:!1,configurable:!0}),e.prototype.renderMarker=function(t){var e=this,n=this.attributes,r=n.marker,o=n.classNamePrefix,i=fr(this.attributes,"marker");this.markerGroup=t.maybeAppendByClassName(_w.markerGroup,"g").style("zIndex",0),En(!!r,this.markerGroup,function(){var t,n=e.markerGroup.node(),a=null===(t=n.childNodes)||void 0===t?void 0:t[0],s=Oa(_w.marker.name,ka,o),c="string"==typeof r?new Ka({style:{symbol:r},className:s}):r();if(a)if(c.nodeName===a.nodeName)a instanceof Ka?a.update((0,pn.Cl)((0,pn.Cl)({},i),{symbol:r})):(!function(t,e){var n,r,o=e.attributes;try{for(var i=(0,pn.Ju)(Object.entries(o)),a=i.next();!a.done;a=i.next()){var s=(0,pn.zs)(a.value,2),c=s[0];"id"!==c&&"className"!==c&&t.attr(c,s[1])}}catch(t){n={error:t}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}(a,c),zn(a).styles(i));else{if(a.remove(),!(c instanceof Ka)){var l=Oa(_w.marker.name,ka,o);c.className=l}zn(c).styles(i),n.appendChild(c)}else{if(!(c instanceof Ka)){var u=Oa(_w.marker.name,ka,o);c.className=u,zn(c).styles(i)}n.appendChild(c)}e.markerGroup.node().scale(1/e.markerGroup.node().getScale()[0]);var f=Mr(e.markerGroup.node(),e.scaleSize,!0);e.markerGroup.node().style._transform="scale(".concat(f,")")})},e.prototype.renderLabel=function(t){var e=fr(this.attributes,"label"),n=e.text,r=(0,pn.Tt)(e,["text"]),o=this.attributes.classNamePrefix;this.labelGroup=t.maybeAppendByClassName(_w.labelGroup,"g").style("zIndex",0);var i=Oa(_w.label.name,Aa,o),a=this.labelGroup.maybeAppendByClassName(_w.label,function(){return Ar(n)});a.node().setAttribute("class",i),a.styles(r)},e.prototype.renderValue=function(t){var e=this,n=fr(this.attributes,"value"),r=n.text,o=(0,pn.Tt)(n,["text"]),i=this.attributes.classNamePrefix;this.valueGroup=t.maybeAppendByClassName(_w.valueGroup,"g").style("zIndex",0),En(this.showValue,this.valueGroup,function(){var t=Oa(_w.value.name,Ma,i),n=e.valueGroup.maybeAppendByClassName(_w.value,function(){return Ar(r)});n.node().setAttribute("class",t),n.styles(o)})},e.prototype.createPoptip=function(){var t=this.attributes.poptip||{},e=(0,pn.Tt)(t,["render"]),n=new Mw({style:kn(Sw,e)});return this.poptipGroup=n,n},e.prototype.bindPoptip=function(t){var e=this,n=this.attributes.poptip;n&&(this.poptipGroup||this.createPoptip()).bind(t,function(){var t=e.attributes,r=t.labelText,o=t.valueText,i=t.markerFill,a="string"==typeof r?r:null==r?void 0:r.attr("text"),s="string"==typeof o?o:null==o?void 0:o.attr("text");if("function"==typeof n.render)return{html:n.render((0,pn.Cl)((0,pn.Cl)({},e.keyFields),{label:a,value:s,color:i}))};var c="";return"string"!=typeof a&&"number"!=typeof a||(c+='<div class="component-poptip-label">'.concat(a,"</div>")),"string"!=typeof s&&"number"!=typeof s||(c+='<div class="component-poptip-value">'.concat(s,"</div>")),{html:c}})},e.prototype.renderFocus=function(t){var e=this,n=this.attributes,r=n.focus,o=n.classNamePrefix,i={x:0,y:0,size:n.focusMarkerSize,opacity:.6,symbol:"focus",stroke:"#aaaaaa",lineWidth:1};(0,ei.A)(r)||(this.focusGroup=t.maybeAppendByClassName(_w.focusGroup,"g").style("zIndex",0),En(r,this.focusGroup,function(){var n=Oa(_w.focus.name,_a,o),r=new Ka({style:(0,pn.Cl)((0,pn.Cl)({},i),{symbol:"focus"}),className:n}),a=new l.jl({style:{r:i.size/2,fill:"transparent"}}),s=e.focusGroup.node();s.appendChild(a),s.appendChild(r),r.update({opacity:0}),t.node().addEventListener("pointerenter",function(){r.update({opacity:1})}),t.node().addEventListener("pointerleave",function(){r.update({opacity:0})})}))},e.prototype.renderPoptip=function(t){var e=this;this.attributes.poptip&&[t.maybeAppendByClassName(_w.value,"g").node(),t.maybeAppendByClassName(_w.label,"g").node()].forEach(function(t){t&&e.bindPoptip(t)})},e.prototype.renderBackground=function(t){var e=this.shape,n=e.width,r=e.height,o=fr(this.attributes,"background");this.background=t.maybeAppendByClassName(_w.backgroundGroup,"g").style("zIndex",-1);var i=this.background.maybeAppendByClassName(_w.background,"rect");i.styles((0,pn.Cl)({width:n,height:r},o));var a=this.attributes.classNamePrefix,s=void 0===a?"":a;if(s){var c=Oa(_w.background.name,Sa,s);i.node().setAttribute("class",c)}},e.prototype.adjustLayout=function(){var t=this.layout,e=t.labelWidth,n=t.valueWidth,r=t.height,o=(0,pn.zs)(t.position,4),i=o[1],a=o[2],s=o[3],c=r/2;this.markerGroup.styles({transform:"translate(".concat(o[0],", ").concat(c,")").concat(this.markerGroup.node().style._transform)}),this.labelGroup.styles({transform:"translate(".concat(i,", ").concat(c,")")}),this.focusGroup&&this.focusGroup.styles({transform:"translate(".concat(s,", ").concat(c,")")}),io(this.labelGroup.select(_w.label.class).node(),Math.ceil(e)),this.showValue&&(this.valueGroup.styles({transform:"translate(".concat(a,", ").concat(c,")")}),io(this.valueGroup.select(_w.value.class).node(),Math.ceil(n)))},e.prototype.render=function(t,e){var n=zn(e),r=t.x,o=t.y,i=void 0===o?0:o;n.styles({transform:"translate(".concat(void 0===r?0:r,", ").concat(i,")")}),this.renderMarker(n),this.renderLabel(n),this.renderValue(n),this.renderBackground(n),this.renderPoptip(n),this.renderFocus(n),this.adjustLayout()},e}(Sn),Pw=Tn({page:"item-page",navigator:"navigator",item:"item"},"items"),Lw=function(t,e,n){return void 0===n&&(n=!0),t?e(t):n},Cw=function(t){function e(e){var n=t.call(this,e,{data:[],gridRow:1/0,gridCol:void 0,padding:0,width:1e3,height:100,rowPadding:0,colPadding:0,layout:"flex",orientation:"horizontal",click:gw,mouseenter:gw,mouseleave:gw})||this;return n.navigatorShape=[0,0],n}return(0,pn.C6)(e,t),Object.defineProperty(e.prototype,"pageViews",{get:function(){return this.navigator.getContainer()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"grid",{get:function(){var t=this.attributes,e=t.gridRow,n=t.gridCol,r=t.data;if(!e&&!n)throw new Error("gridRow and gridCol can not be set null at the same time");return e&&n?[e,n]:e?[e,r.length]:[r.length,n]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"renderData",{get:function(){var t=this.attributes,e=t.data,n=t.layout,r=t.poptip,o=t.focus,i=t.focusMarkerSize,a=t.classNamePrefix,s=fr(this.attributes,"item"),c=e.map(function(t,c){var l=t.id,u=t.label,f=t.value;return{id:"".concat(void 0===l?c:l),index:c,style:(0,pn.Cl)({layout:n,labelText:u,valueText:f,poptip:r,focus:o,focusMarkerSize:i,classNamePrefix:a},Object.fromEntries(Object.entries(s).map(function(n){var r=(0,pn.zs)(n,2);return[r[0],hr(r[1],[t,c,e])]})))}});return c},enumerable:!1,configurable:!0}),e.prototype.getGridLayout=function(){var t=this,e=this.attributes,n=e.orientation,r=e.width,o=e.rowPadding,i=e.colPadding,a=(0,pn.zs)(this.navigatorShape,1)[0],s=(0,pn.zs)(this.grid,2),c=s[0],l=s[1],u=l*c,f=0;return this.pageViews.children.map(function(e,s){var d,p,h=Math.floor(s/u),g=s%u,m=t.ifHorizontal(l,c),y=[Math.floor(g/m),g%m];"vertical"===n&&y.reverse();var b=(0,pn.zs)(y,2),v=b[0],x=b[1],O=(r-a-(l-1)*i)/l,w=e.getBBox().height,j=(0,pn.zs)([0,0],2),k=j[0],A=j[1];return"horizontal"===n?(k=(d=(0,pn.zs)([f,v*(w+o)],2))[0],A=d[1],f=x===l-1?0:f+O+i):(k=(p=(0,pn.zs)([x*(O+i),f],2))[0],A=p[1],f=v===c-1?0:f+w+o),{page:h,index:s,row:v,col:x,pageIndex:g,width:O,height:w,x:k,y:A}})},e.prototype.getFlexLayout=function(){var t=this.attributes,e=t.width,n=t.height,r=t.rowPadding,o=t.colPadding,i=(0,pn.zs)(this.navigatorShape,1)[0],a=(0,pn.zs)(this.grid,2),s=a[0],c=a[1],l=(0,pn.zs)([e-i,n],2),u=l[0],f=l[1],d=(0,pn.zs)([0,0,0,0,0,0,0,0],8),p=d[2],h=d[3],g=d[4],m=d[5],y=d[6],b=d[7];return this.pageViews.children.map(function(t,e){var n,i,a,l,d=t.getBBox(),v=d.width,x=d.height,O=0===y?0:o,w=y+O+v;return w<=u&&Lw(g,function(t){return t<c})?(n=(0,pn.zs)([y+O,b,w],3),y=n[2],{width:v,height:x,x:n[0],y:n[1],page:p,index:e,pageIndex:h++,row:m,col:g++}):(i=(0,pn.zs)([m+1,0,0,b+x+r],4),m=i[0],g=i[1],y=i[2],(b=i[3])+x<=f&&Lw(m,function(t){return t<s})?(a=(0,pn.zs)([y,b,v],3),y=a[2],{width:v,height:x,x:a[0],y:a[1],page:p,index:e,pageIndex:h++,row:m,col:g++}):(l=(0,pn.zs)([0,0,v,0,p+1,0,0,0],8),y=l[2],b=l[3],h=l[5],g=l[7],{width:v,height:x,x:l[0],y:l[1],page:p=l[4],index:e,pageIndex:h++,row:m=l[6],col:g++}))})},Object.defineProperty(e.prototype,"itemsLayout",{get:function(){this.navigatorShape=[0,0];var t="grid"===this.attributes.layout?this.getGridLayout:this.getFlexLayout,e=t.call(this);return e.slice(-1)[0].page>0?(this.navigatorShape=[55,0],t.call(this)):e},enumerable:!1,configurable:!0}),e.prototype.ifHorizontal=function(t,e){return Ua(this.attributes.orientation,t,e)},e.prototype.flattenPage=function(t){t.querySelectorAll(Pw.item.class).forEach(function(e){t.appendChild(e)}),t.querySelectorAll(Pw.page.class).forEach(function(e){t.removeChild(e).destroy()})},e.prototype.renderItems=function(t){var e=this.attributes,n=e.click,r=e.mouseenter,o=e.mouseleave,i=e.classNamePrefix;this.flattenPage(t);var a=this.dispatchCustomEvent.bind(this),s=Oa(Pw.item.name,ja,i);zn(t).selectAll(Pw.item.class).data(this.renderData,function(t){return t.id}).join(function(t){return t.append(function(t){var e=t.style,n=(0,pn.Tt)(t,["style"]);return new Ew({style:e},n)}).attr("className",s).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==o||o(this),a("itemMouseleave",{item:this})})},function(t){return t.each(function(t){this.update(t.style)})},function(t){return t.remove()})},e.prototype.relayoutNavigator=function(){var t,e=this.attributes,n=e.layout,r=e.width,o=(null===(t=this.pageViews.children[0])||void 0===t?void 0:t.getBBox().height)||0,i=(0,pn.zs)(this.navigatorShape,2);this.navigator.update("grid"===n?{pageWidth:r-i[0],pageHeight:o-i[1]}:{})},e.prototype.adjustLayout=function(){var t,e,n=this,r=Object.entries((t=this.itemsLayout,e="page",t.reduce(function(t,n){return(t[n[e]]=t[n[e]]||[]).push(n),t},{}))).map(function(t){var e=(0,pn.zs)(t,2);return{page:e[0],layouts:e[1]}}),o=(0,pn.fX)([],(0,pn.zs)(this.navigator.getContainer().children),!1);r.forEach(function(t){var e=t.layouts,r=n.pageViews.appendChild(new l.YJ({className:Pw.page.name}));e.forEach(function(t){var e=t.x,n=t.y,i=t.width,a=t.height,s=o[t.index];r.appendChild(s),Hc(s,"__layout__",t),s.update({x:e,y:n,width:i,height:a})})}),this.relayoutNavigator()},e.prototype.renderNavigator=function(t){var e=this.attributes,n=e.orientation,r=e.classNamePrefix,o=fr(this.attributes,"nav"),i=kn({orientation:n,classNamePrefix:r},o),a=this;return t.selectAll(Pw.navigator.class).data(["nav"]).join(function(t){return t.append(function(){return new bw({style:i})}).attr("className",Pw.navigator.name).each(function(){a.navigator=this})},function(t){return t.each(function(){this.update(i)})},function(t){return t.remove()}),this.navigator},e.prototype.getBBox=function(){return this.navigator.getBBox()},e.prototype.render=function(t,e){var n=this.attributes.data;if(n&&0!==n.length){var r=this.renderNavigator(zn(e));this.renderItems(r.getContainer()),this.adjustLayout()}},e.prototype.dispatchCustomEvent=function(t,e){var n=new l.up(t,{detail:e});this.dispatchEvent(n)},e}(Sn),zw=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,pn.C6)(e,t),e.prototype.update=function(t){this.attr(t)},e}(l.g3),Tw=function(t){function e(e){return t.call(this,e,es)||this}return(0,pn.C6)(e,t),e.prototype.renderTitle=function(t,e,n){var r=this.attributes,o=r.showTitle,i=r.titleText,a=r.classNamePrefix,s=fr(this.attributes,"title"),c=(0,pn.zs)(pr(s),2),l=c[0],u=c[1];this.titleGroup=t.maybeAppendByClassName(rs.titleGroup,"g").styles(u);var f=(0,pn.Cl)((0,pn.Cl)({width:e,height:n},l),{text:o?i:"",classNamePrefix:a});this.title=this.titleGroup.maybeAppendByClassName(rs.title,function(){return new $a({style:f})}).update(f)},e.prototype.renderCustom=function(t){var e={innerHTML:this.attributes.render(this.attributes.data),pointerEvents:"auto"};t.maybeAppendByClassName(rs.html,function(){return new zw({className:rs.html.name,style:e})}).update(e)},e.prototype.renderItems=function(t,e){var n=e.x,r=e.y,o=e.width,i=e.height,a=fr(this.attributes,"title",!0),s=(0,pn.zs)(pr(a),2),c=s[1],l=(0,pn.Cl)((0,pn.Cl)({},s[0]),{width:o,height:i,x:0,y:0});this.itemsGroup=t.maybeAppendByClassName(rs.itemsGroup,"g").styles((0,pn.Cl)((0,pn.Cl)({},c),{transform:"translate(".concat(n,", ").concat(r,")")}));var u=this;this.itemsGroup.selectAll(rs.items.class).data(["items"]).join(function(t){return t.append(function(){return new Cw({style:l})}).attr("className",rs.items.name).each(function(){u.items=zn(this)})},function(t){return t.update(l)},function(t){return t.remove()})},e.prototype.adjustLayout=function(){if(this.attributes.showTitle){var t=this.title.node().getAvailableSpace(),e=t.x,n=t.y;this.itemsGroup.node().style.transform="translate(".concat(e,", ").concat(n,")")}},Object.defineProperty(e.prototype,"availableSpace",{get:function(){var t=this.attributes,e=t.width,n=t.height;return t.showTitle?this.title.node().getAvailableSpace():new hi(0,0,e,n)},enumerable:!1,configurable:!0}),e.prototype.getBBox=function(){var e,n,r=null===(e=this.title)||void 0===e?void 0:e.node(),o=null===(n=this.items)||void 0===n?void 0:n.node();return r&&o?function(t,e){var n=t.attributes,r=n.position,o=n.spacing,i=n.inset,a=n.text,s=t.getBBox(),c=e.getBBox(),l=Fo(r),u=(0,pn.zs)(so(a?o:0),4),f=u[0],d=u[1],p=u[2],h=u[3],g=(0,pn.zs)(so(i),4),m=g[0],y=g[1],b=g[2],v=g[3],x=(0,pn.zs)([h+d,f+p],2),O=x[0],w=x[1],j=(0,pn.zs)([v+y,m+b],2),k=j[0],A=j[1];if("l"===l[0])return new hi(s.x,s.y,c.width+s.width+O+k,Math.max(c.height+A,s.height));if("t"===l[0])return new hi(s.x,s.y,Math.max(c.width+k,s.width),c.height+s.height+w+A);var M=(0,pn.zs)([e.attributes.width||c.width,e.attributes.height||c.height],2);return new hi(c.x,c.y,M[0]+s.width+O+k,M[1]+s.height+w+A)}(r,o):t.prototype.getBBox.call(this)},e.prototype.render=function(t,e){var n=this.attributes,r=n.width,o=n.height,i=n.x,a=void 0===i?0:i,s=n.y,c=void 0===s?0:s,l=n.classNamePrefix,u=n.render,f=zn(e);l?e.attr("className","".concat(e.className||"legend-category"," ").concat(l,"legend")):e.className||e.attr("className","legend-category"),e.style.transform="translate(".concat(a,", ").concat(c,")"),u?this.renderCustom(f):(this.renderTitle(f,r,o),this.renderItems(f,this.availableSpace),this.adjustLayout())},e}(Sn),Bw=function(t,e,n,r){return new(n||(n=Promise))(function(o,i){function a(t){try{c(r.next(t))}catch(t){i(t)}}function s(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){t.done?o(t.value):function(t){return t instanceof n?t:new n(function(e){e(t)})}(t.value).then(a,s)}c((r=r.apply(t,e||[])).next())})};const Iw="legend-category",Nw="legend-html-category";function Rw(t){return t.getElementsByClassName("legend-category-item-marker")[0]}function Fw(t){return t.getElementsByClassName("legend-category-item-label")[0]}function Dw(t){return t.getElementsByClassName("legend-category-item-focus-group")[0]}function $w(t){return t.getElementsByClassName("items-item")}function Ww(t){return t.getElementsByClassName(Iw)}function Hw(t){return t.getElementsByClassName("legend-continuous")}function qw(t){let e=t.parentNode;for(;e&&!e.__data__;)e=e.parentNode;return e.__data__}function Yw(t,e){return Bw(this,arguments,void 0,function*(t,{legend:e,channel:n,value:r,ordinal:o,channels:i,allChannels:a,facet:s=!1}){const{view:c,update:l,setState:u}=t;u(e,t=>{var l,u;const{marks:f}=t,d=null===(u=null===(l=e.attributes)||void 0===l?void 0:l.scales)||void 0===u?void 0:u.find(t=>t.name===n),p=f.map(e=>{var l,u;if((null!==(l=e.scale[n].key)&&void 0!==l?l:n)!==(null!==(u=null==d?void 0:d.key)&&void 0!==u?u:null==d?void 0:d.name))return e;if("legends"===e.type)return e;if(tn.includes(e.type))return e;const{transform:f=[],data:p=[]}=e,h=f.findIndex(({type:t})=>t.startsWith("group")||t.startsWith("bin")),g=[...f];p.length&&g.splice(h+1,0,{type:"filter",[n]:{value:r,ordinal:o}});const m=Object.fromEntries(i.map(e=>{const n=function(t,e,n){var r;const o=Object.keys(t).find(r=>{if(r.startsWith(n)){const o=t[r].getOptions();return o.name===n&&o.markKey===e}});return null!==(r=t[o])&&void 0!==r?r:t[n]}(c.scale,t.key,e);return[e,{domain:n.getOptions().domain}]}));return(0,N.A)({},e,Object.assign(Object.assign({transform:g,scale:m},!o&&{animate:!1}),{legend:!s&&Object.fromEntries(a.map(t=>[t,{preserve:!0}]))}))});return Object.assign(Object.assign({},t),{marks:p})}),yield l()})}function Xw(t,e){for(const n of t)Yw(n,Object.assign(Object.assign({},e),{facet:!0}))}function Gw(){return(t,e,n)=>{const{container:r}=t,o=e.filter(e=>e!==t),i=o.length>0,a=t=>qw(t).scales.map(t=>t.name),s=[...Ww(r),...(c=r,c.getElementsByClassName(Nw)),...Hw(r)];var c;const l=s.flatMap(a),u=gh(i?Xw:Yw,50,{trailing:!0}),f=s.map(e=>{const{name:s,domain:c}=qw(e).scales[0],f={legend:e,channel:s,channels:a(e),allChannels:l};return e.className===Iw?function(t,{legends:e,marker:n,label:r,datum:o,filter:i,defaultSelect:a,emitter:s,channel:c,state:l={}}){const u=new Map,f=new Map,d=new Map,p=new Map,{unselected:h={markerStroke:"#aaa",markerFill:"#aaa",labelFill:"#aaa"}}=l,g={unselected:xt(h,"marker")},m={unselected:xt(h,"label")},{setState:y,removeState:b}=Nl(g,void 0),{setState:v,removeState:x}=Nl(m,void 0),O=Array.from(e(t));let w=O.map(o);const j=()=>{for(const t of O){const e=o(t),i=n(t),a=r(t);w.includes(e)?(b(i,"unselected"),x(a,"unselected")):(y(i,"unselected"),v(a,"unselected"))}};for(const e of O){const n=()=>{ql(t,"pointer")},r=()=>{Yl(t)},a=t=>Bw(this,void 0,void 0,function*(){const n=o(e),r=w.indexOf(n);-1===r?w.push(n):w.splice(r,1),yield i(w),j();const{nativeEvent:a=!0}=t;a&&(w.length===O.length?s.emit("legend:reset",{nativeEvent:a}):s.emit("legend:filter",Object.assign(Object.assign({},t),{nativeEvent:a,data:{channel:c,values:w}})))});e.addEventListener("click",a),e.addEventListener("pointerenter",n),e.addEventListener("pointerout",r),u.set(e,a),f.set(e,n),d.set(e,r);const l=Dw(e);if(l){const t=t=>Bw(this,void 0,void 0,function*(){t.stopPropagation();const n=o(e),r=w.indexOf(n),{nativeEvent:a=!0}=t;if(-1!==r&&1===w.length){if(!a)return;w=O.map(o),yield i(w),j(),s.emit("legend:reset",{nativeEvent:a})}else{if(w=[n],yield i(w),j(),!a)return;s.emit("legend:focus",Object.assign(Object.assign({},t),{nativeEvent:a,data:{channel:c,value:n}}))}});l.addEventListener("click",t),p.set(e,t)}}const k=t=>Bw(this,void 0,void 0,function*(){const{nativeEvent:e}=t;if(e)return;const{data:n}=t,{channel:r,value:o}=n;r===c&&(w=[o],yield i(w),j())}),A=t=>Bw(this,void 0,void 0,function*(){const{nativeEvent:e}=t;if(e)return;const{data:n}=t,{channel:r,values:o}=n;r===c&&(w=o,yield i(w),j())}),M=t=>Bw(this,void 0,void 0,function*(){const{nativeEvent:e}=t;e||(w=O.map(o),yield i(w),j())});return s.on("legend:filter",A),s.on("legend:focus",k),s.on("legend:reset",M),a&&s.emit("legend:filter",{data:{channel:c,values:a}}),()=>{for(const t of O){t.removeEventListener("click",u.get(t)),t.removeEventListener("pointerenter",f.get(t)),t.removeEventListener("pointerout",d.get(t));const e=Dw(t);e&&e.removeEventListener("click",p.get(t))}s.off("legend:focus",k),s.off("legend:filter",A),s.off("legend:reset",M)}}(e,{legends:$w,marker:Rw,label:Fw,datum:t=>{const{__data__:e}=t,{index:n}=e;return c[n]},filter:e=>{const n=Object.assign(Object.assign({},f),{value:e,ordinal:!0});u(i?o:t,n)},state:e.attributes.state,defaultSelect:e.attributes.defaultSelect,channel:s,emitter:n}):e.className===Nw?function(t,{domain:e,filter:n,defaultSelect:r,emitter:o,channel:i}){const a=new Map,s=new Map,c=new Map;let l=[...e];const u=()=>{var e;const n=null===(e=t.ownerDocument)||void 0===e?void 0:e.defaultView;return n&&n.getContextService().getDomElement().parentElement||document.body},f=()=>{u().querySelectorAll("[legend-value]").forEach(t=>{const n=t.getAttribute("legend-value");if(!n)return;if(!e.includes(n))return;const r=t;l.includes(n)?(r.style.opacity="1",r.classList.remove("legend-item-inactive")):(r.style.opacity="0.4",r.classList.add("legend-item-inactive"))})};(()=>{const t=u().querySelector(".legend-html"),r=r=>Bw(this,void 0,void 0,function*(){let a=r.target;for(;a&&!a.hasAttribute("legend-value")&&(a=a.parentElement,a!==t););if(!a||!a.hasAttribute("legend-value"))return;r.preventDefault(),r.stopPropagation();const s=a.getAttribute("legend-value");if(!s)return;const c=l.indexOf(s);-1===c?l.push(s):l.splice(c,1),yield n(l),f(),l.length===e.length?o.emit("legend:reset",{nativeEvent:!0}):o.emit("legend:filter",{nativeEvent:!0,data:{channel:i,values:l}})});t.addEventListener("click",r),a.set(t,r)})();const d=t=>Bw(this,void 0,void 0,function*(){const{nativeEvent:e}=t;if(e)return;const{data:r}=t,{channel:o,value:a}=r;o===i&&(l=[a],yield n(l),f())}),p=t=>Bw(this,void 0,void 0,function*(){const{nativeEvent:e}=t;if(e)return;const{data:r}=t,{channel:o,values:a}=r;o===i&&(l=a,yield n(l),f())}),h=t=>Bw(this,void 0,void 0,function*(){const{nativeEvent:r}=t;r||(l=[...e],yield n(l),f())});return o.on("legend:filter",p),o.on("legend:focus",d),o.on("legend:reset",h),r&&o.emit("legend:filter",{data:{channel:i,values:r}}),()=>{u().querySelectorAll("[legend-value]").forEach(t=>{const n=t.getAttribute("legend-value");if(!n)return;if(!e.includes(n))return;const r=a.get(t),o=s.get(t),i=c.get(t);r&&t.removeEventListener("click",r),o&&t.removeEventListener("pointerenter",o),i&&t.removeEventListener("pointerout",i)}),a.clear(),s.clear(),c.clear(),o.off("legend:filter",p),o.off("legend:focus",d),o.off("legend:reset",h)}}(r,{domain:c,filter:e=>{const n=Object.assign(Object.assign({},f),{value:e,ordinal:!0});u(i?o:t,n)},defaultSelect:e.attributes.defaultSelect,channel:s,emitter:n}):function(t,{legend:e,filter:n,emitter:r,channel:o}){const{attributes:i}=e,a=t=>{const{value:e}=t.detail,a=e.map(t=>{var e,n;const r=null===(e=i.data)||void 0===e?void 0:e.find(e=>e.value===t);return r&&null!==(n=r.domainValue)&&void 0!==n?n:t});n(a),r.emit({nativeEvent:!0,data:{channel:o,values:a}})};return e.addEventListener("valuechange",a),()=>{e.removeEventListener("valuechange",a)}}(0,{legend:e,filter:e=>{const n=Object.assign(Object.assign({},f),{value:e,ordinal:!1});u(i?o:t,n)},emitter:n,channel:s})});return()=>{f.forEach(t=>t())}}}var Vw=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};function Kw(t,e){const n=Ai(t,"shape"),r=Ai(t,"color"),o=n?n.clone():null,i=[];for(const[t,n]of e){const e=t.type,a=((null==r?void 0:r.getOptions().domain.length)>0?null==r?void 0:r.getOptions().domain:n.data).map((e,r)=>{var i;return o?o.map(e||"point"):(null===(i=null==t?void 0:t.style)||void 0===i?void 0:i.shape)||n.defaultShape||"point"});"string"==typeof e&&i.push([e,a])}if(0===i.length)return["point",["point"]];if(1===i.length)return i[0];if(!n)return i[0];const{range:a}=n.getOptions();return i.map(([t,e])=>{let n=0;for(let t=0;t<i.length;t++){e[t]===a[t%a.length]&&n++}return[n/e.length,[t,e]]}).sort((t,e)=>e[0]-t[0])[0][1]}function Uw(t,e){const{scales:n,library:r,markState:o}=e,[i,a]=Kw(n,o),{itemMarker:s,itemMarkerSize:c}=t,u=(t,e)=>{var n,o,a;const s=(null===(a=null===(o=null===(n=r[`mark.${i}`])||void 0===n?void 0:n.props)||void 0===o?void 0:o.shape[t])||void 0===a?void 0:a.props.defaultMarker)||Ho(t.split(".")),u="function"==typeof c?c(e):c;return()=>function(t,e){var{fill:n,lineWidth:r,stroke:o,color:i}=e,a=by(e,["d","fill","lineWidth","path","stroke","color"]);const s=Xy.get(t)||Xy.get("point");return(...t)=>new l.wA({style:Object.assign(Object.assign({},a),{d:s(...t),stroke:s.style.includes("stroke")?i||o:"",fill:s.style.includes("fill")?i||n:"",lineWidth:s.style.includes("lineWidth")?r||r||2:0})})}(s,{color:e.color})(0,0,u)},f=t=>`${a[t]}`;return Ai(n,"shape")&&!s?(t,e)=>u(f(e),t):"function"==typeof s?(t,e)=>{const n=s(t.id,e);return"string"==typeof n?u(n,t):n}:(t,e)=>u(s||f(e),t)}function Zw(t){const e=Ai(t,"opacity");if(e){const{range:t}=e.getOptions();return(e,n)=>t[n]}}function Jw(t,e){const{scales:n,markState:r}=e,[o,i]=Kw(n,r),{itemMarker:a,itemMarkerLineWidth:s}=t;if(void 0!==s)return s;const c=["line","hyphen","dash","smooth","hv","hvh","vh","vhv"];if("string"==typeof a&&c.includes(a))return 4;if("function"==typeof a)return(t,e)=>{const n=a(t.id,e);if("string"==typeof n&&c.includes(n))return 4};const l=(Array.isArray(i)?i:[i]).some(t=>c.includes(t));return l?4:void 0}function Qw(t,e){const{labelFormatter:n=t=>`${t}`}=t,{scales:r,theme:o}=e,i=function(t,e){const n=Ai(t,"size");return n instanceof Tx?2*n.map(NaN):e}(r,o.legendCategory.itemMarkerSize),a={itemMarker:Uw(Object.assign(Object.assign({},t),{itemMarkerSize:i}),e),itemMarkerSize:i,itemMarkerOpacity:Zw(r),itemMarkerLineWidth:Jw(t,e)},s="string"==typeof n?(0,ze.GP)(n):n,c=Ai(r,"color"),l=function(t){return t.find(t=>t.getOptions().domain.length>0).getOptions().domain}(r),u=c?t=>c.map(t):()=>e.theme.color;return Object.assign(Object.assign({},a),{data:l.map(t=>({id:t,label:s(t),color:u(t)}))})}const tj=t=>{const{layout:e,position:n,title:r,cols:o,render:i}=t,a=Vw(t,["labelFormatter","layout","order","orientation","position","size","title","cols","itemMarker","render"]),{gridRow:s}=a;return c=>{const{value:l,theme:u}=c,{bbox:f}=l,{width:d,height:p}=function(t,e,n){const{position:r}=e;if("center"===r){const{bbox:e}=t,{width:n,height:r}=e;return{width:n,height:r}}const{width:o,height:i}=_i(t,e,n);return{width:o,height:i}}(l,t,tj),h=wi(n,e),g=Object.assign(Object.assign(Object.assign(Object.assign({orientation:["right","left","center"].includes(n)?"vertical":"horizontal",width:d,height:p,layout:void 0!==o?"grid":"flex"},void 0!==o&&{gridCol:o}),void 0!==s&&{gridRow:s}),{titleText:Oi(r)}),Qw(t,c)),{legendCategory:m={}}=u,y=Si(Object.assign({},m,function(t){return Object.assign(Object.assign({},t),{data:(null==t?void 0:t.data.filter(t=>""!==t.id&&void 0!==t.id))||[]})}(g),a,{classNamePrefix:"g2-"}));if(i)return new Tw({className:Nw,style:Object.assign(Object.assign({},y),{x:f.x,y:f.y,render:i})});const b=new ki({style:Object.assign(Object.assign({x:f.x,y:f.y,width:f.width,height:f.height},h),{subOptions:y})});return b.appendChild(new Tw({className:"legend-category",style:y})),b}};tj.props={defaultPosition:"top",defaultOrder:1,defaultSize:40,defaultCrossPadding:[12,12],defaultPadding:[12,12]};const ej=t=>()=>new l.YJ;ej.props={};var nj=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};function rj(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"}}}const oj=(ij={render(t,e){const{width:n,title:r,subtitle:o,spacing:i=2,align:a="left",x:s,y:c}=t,l=nj(t,["width","title","subtitle","spacing","align","x","y"]);e.style.transform=`translate(${s}, ${c})`;const u=xt(l,"title"),f=xt(l,"subtitle"),d=xi(e,".title","text").attr("className","title").call(ec,Object.assign(Object.assign(Object.assign({},rj(0,0,n,a)),{fontSize:14,textBaseline:"top",text:r}),u)).node().getLocalBounds();xi(e,".sub-title","text").attr("className","sub-title").call(t=>{if(!o)return t.node().remove();t.node().attr(Object.assign(Object.assign(Object.assign({},rj(0,d.max[1]+i,n,a)),{fontSize:12,textBaseline:"top",text:o}),f))})}},class extends l.K9{constructor(t){super(t),this.descriptor=ij}connectedCallback(){var t,e;null===(e=(t=this.descriptor).render)||void 0===e||e.call(t,this.attributes,this)}update(t={}){var e,n;this.attr((0,N.A)({},this.attributes,t)),null===(n=(e=this.descriptor).render)||void 0===n||n.call(e,this.attributes,this)}});var ij;const aj=t=>({value:e,theme:n})=>{const{x:r,y:o,width:i,height:a}=e.bbox;return new oj({style:(0,N.A)({},n.title,Object.assign({x:r,y:o,width:i,height:a},t))})};function sj({map:t,initKey:e},n){const r=e(n);return t.has(r)?t.get(r):n}function cj(t){return"object"==typeof t?t.valueOf():t}aj.props={defaultPosition:"top",defaultOrder:2,defaultSize:36,defaultCrossPadding:[20,20],defaultPadding:[12,12]};class lj extends Map{constructor(t){if(super(),this.map=new Map,this.initKey=cj,null!==t)for(const[e,n]of t)this.set(e,n)}get(t){return super.get(sj({map:this.map,initKey:this.initKey},t))}has(t){return super.has(sj({map:this.map,initKey:this.initKey},t))}set(t,e){return super.set(function({map:t,initKey:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}({map:this.map,initKey:this.initKey},t),e)}delete(t){return super.delete(function({map:t,initKey:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}({map:this.map,initKey:this.initKey},t))}}const uj=Symbol("defaultUnknown");function fj(t,e,n){for(let r=0;r<e.length;r+=1)t.has(e[r])||t.set(n(e[r]),r)}function dj(t){const{value:e,from:n,to:r,mapper:o,notFoundReturn:i}=t;let a=o.get(e);if(void 0===a){if(i!==uj)return i;a=n.push(e)-1,o.set(e,a)}return r[a%r.length]}function pj(t){return t instanceof Date?t=>`${t}`:"object"==typeof t?t=>JSON.stringify(t):t=>t}class hj extends Wi{getDefaultOptions(){return{domain:[],range:[],unknown:uj}}constructor(t){super(t)}map(t){return 0===this.domainIndexMap.size&&fj(this.domainIndexMap,this.getDomain(),this.domainKey),dj({value:this.domainKey(t),mapper:this.domainIndexMap,from:this.getDomain(),to:this.getRange(),notFoundReturn:this.options.unknown})}invert(t){return 0===this.rangeIndexMap.size&&fj(this.rangeIndexMap,this.getRange(),this.rangeKey),dj({value:this.rangeKey(t),mapper:this.rangeIndexMap,from:this.getRange(),to:this.getDomain(),notFoundReturn:this.options.unknown})}rescale(t){const[e]=this.options.domain,[n]=this.options.range;if(this.domainKey=pj(e),this.rangeKey=pj(n),!this.rangeIndexMap)return this.rangeIndexMap=new Map,void(this.domainIndexMap=new Map);t&&!t.range||this.rangeIndexMap.clear(),(!t||t.domain||t.compare)&&(this.domainIndexMap.clear(),this.sortedDomain=void 0)}clone(){return new hj(this.options)}getRange(){return this.options.range}getDomain(){if(this.sortedDomain)return this.sortedDomain;const{domain:t,compare:e}=this.options;return this.sortedDomain=e?[...t].sort(e):t,this.sortedDomain}}function gj(t){return Math.round(1e12*t)/1e12}function mj(t){const{domain:e,range:n,paddingOuter:r,paddingInner:o,flex:i,round:a,align:s}=t,c=e.length,l=function(t,e){const n=e-t.length;return n>0?[...t,...new Array(n).fill(1)]:n<0?t.slice(0,e):t}(i,c),[u,f]=n,d=f-u,p=d/(2/c*r+1-1/c*o),h=p*o/c,g=p-c*h,m=function(t){const e=Math.min(...t);return t.map(t=>t/e)}(l),y=m.reduce((t,e)=>t+e),b=g/y,v=new lj(e.map((t,e)=>{const n=m[e]*b;return[t,a?Math.floor(n):n]})),x=new lj(e.map((t,e)=>{const n=m[e]*b+h;return[t,a?Math.floor(n):n]})),O=Array.from(x.values()).reduce((t,e)=>t+e),w=u+(d-(O-O/c*o))*s;let j=a?Math.round(w):w;const k=new Array(c);for(let t=0;t<c;t+=1){k[t]=gj(j);j+=x.get(e[t])}return{valueBandWidth:v,valueStep:x,adjustedRange:k}}class yj extends hj{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,paddingInner:0,paddingOuter:0,padding:0,unknown:uj,flex:[]}}constructor(t){super(t)}clone(){return new yj(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(){const{padding:t,paddingInner:e}=this.options;return t>0?t:e}getPaddingOuter(){const{padding:t,paddingOuter:e}=this.options;return t>0?t:e}rescale(){super.rescale();const{align:t,domain:e,range:n,round:r,flex:o}=this.options,{adjustedRange:i,valueBandWidth:a,valueStep:s}=function(t){var e;const{domain:n}=t,r=n.length;if(0===r)return{valueBandWidth:void 0,valueStep:void 0,adjustedRange:[]};if(null===(e=t.flex)||void 0===e?void 0:e.length)return mj(t);const{range:o,paddingOuter:i,paddingInner:a,round:s,align:c}=t;let l,u,f=o[0];const d=o[1]-f;l=d/Math.max(1,2*i+(r-a)),s&&(l=Math.floor(l)),f+=(d-l*(r-a))*c,u=l*(1-a),s&&(f=Math.round(f),u=Math.round(u));const p=new Array(r).fill(0).map((t,e)=>f+e*l);return{valueStep:l,valueBandWidth:u,adjustedRange:p}}({align:t,range:n,round:r,flex:o,paddingInner:this.getPaddingInner(),paddingOuter:this.getPaddingOuter(),domain:e});this.valueStep=s,this.valueBandWidth=a,this.adjustedRange=i}}var bj=function(t){if("object"!=typeof t||null===t)return t;var e;if((0,Le.A)(t)){e=[];for(var n=0,r=t.length;n<r;n++)e[n]="object"==typeof t[n]&&null!=t[n]?bj(t[n]):t[n]}else for(var o in e={},t)e[o]="object"==typeof t[o]&&null!=t[o]?bj(t[o]):t[o];return e};const vj=bj;var xj=function(t){function e(e){var n=this,r=e.style,o=(0,pn.Tt)(e,["style"]);return(n=t.call(this,(0,N.A)({},{type:"column"},(0,pn.Cl)({style:r},o)))||this).columnsGroup=new l.YJ({name:"columns"}),n.appendChild(n.columnsGroup),n.render(),n}return(0,pn.C6)(e,t),e.prototype.render=function(){var t=this.attributes,e=t.columns,n=t.y;this.columnsGroup.style.transform="translate(".concat(t.x,", ").concat(n,")"),zn(this.columnsGroup).selectAll(".column").data(e.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()})},e.prototype.update=function(t){this.attr(kn({},this.attributes,t)),this.render()},e.prototype.clear=function(){this.removeChildren()},e}(l.q9),Oj=function(t){function e(e){var n=this,r=e.style,o=(0,pn.Tt)(e,["style"]);return(n=t.call(this,(0,N.A)({},{type:"lines"},(0,pn.Cl)({style:r},o)))||this).linesGroup=n.appendChild(new l.YJ),n.areasGroup=n.appendChild(new l.YJ),n.render(),n}return(0,pn.C6)(e,t),e.prototype.render=function(){var t=this.attributes,e=t.lines,n=t.areas,r=t.y;this.style.transform="translate(".concat(t.x,", ").concat(r,")"),e&&this.renderLines(e),n&&this.renderAreas(n)},e.prototype.clear=function(){this.linesGroup.removeChildren(),this.areasGroup.removeChildren()},e.prototype.update=function(t){this.attr(kn({},this.attributes,t)),this.render()},e.prototype.renderLines=function(t){zn(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()})},e.prototype.renderAreas=function(t){zn(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()})},e}(l.q9);function wj(t,e,n){var r;void 0===e&&(e=!1),void 0===n&&(n=[[0,0],[1,1]]);for(var o=!!e,i=[],a=0,s=t.length;a<s;a+=2)i.push([t[a],t[a+1]]);var c,l,u,f=function(t,e,n,r){var o,i,a,s,c,l,u=[],f=!!r,d=[1/0,1/0],p=[-1/0,-1/0];if(f){d=(o=(0,pn.zs)(r,2))[0],p=o[1];for(var h=0,g=t.length;h<g;h+=1)d=nr(d,y=t[h]),p=rr(p,y)}h=0;for(var m=t.length;h<m;h+=1){var y=t[h];if(0!==h||n)if(h!==m-1||n){var b=[0,0];b=Qn(b=er(a=t[n?(h+1)%m:h+1],i=t[[h?h-1:m-1,h-1][n?0:1]]),e);var v=or(y,i),x=or(y,a),O=v+x;0!==O&&(v/=O,x/=O);var w=Qn(b,-v),j=Qn(b,x);c=tr(y,w),s=nr(s=tr(y,j),rr(a,y)),s=rr(s,nr(a,y)),c=nr(c=tr(y,w=Qn(w=er(s,y),-v/x)),rr(i,y)),s=tr(y,j=Qn(j=er(y,c=rr(c,nr(i,y))),x/v)),f&&(c=nr(c=rr(c,d),p),s=nr(s=rr(s,d),p)),u.push(l),u.push(c),l=s}else c=y,u.push(l),u.push(c);else l=y}return n&&u.push(u.shift()),u}(i,.4,o,n),d=i.length,p=[];for(a=0;a<d-1;a+=1)p.push(["C",(c=f[2*a])[0],c[1],(l=f[2*a+1])[0],l[1],(u=i[a+1])[0],u[1]]);return o&&(c=f[d],l=f[d+1],r=(0,pn.zs)(i,1),p.push(["C",c[0],c[1],l[0],l[1],(u=r[0])[0],u[1]])),p}function jj(t,e){void 0===e&&(e=!1);var n=e?t.length-1:0,r=t.map(function(t,e){return(0,pn.fX)([e===n?"M":"L"],(0,pn.zs)(t),!1)});return e?r.reverse():r}function kj(t,e){if(void 0===e&&(e=!1),t.length<=2)return jj(t);for(var n=[],r=t.length,o=0;o<r;o+=1){var i=e?t[r-o-1]:t[o];He(i,n.slice(-2))||n.push.apply(n,(0,pn.fX)([],(0,pn.zs)(i),!1))}var a=wj(n,!1);return a.unshift((0,pn.fX)(["M"],(0,pn.zs)(e?t[r-1]:t[0]),!1)),a}function Aj(t,e,n){var r=vj(t);return r.push(["L",e,n],["L",0,n],["Z"]),r}var Mj=n("./node_modules/.pnpm/@antv+util@3.3.11/node_modules/@antv/util/esm/lodash/min.js");const _j=function(t,e){if((0,Le.A)(t)){for(var n,r=1/0,o=0;o<t.length;o++){var i=t[o],a=(0,Jn.A)(e)?e(i):i[e];a<r&&(n=i,r=a)}return n}};var Sj=n("./node_modules/.pnpm/@antv+util@3.3.11/node_modules/@antv/util/esm/lodash/max.js");const Ej=function(t,e){if((0,Le.A)(t)){for(var n,r=-1/0,o=0;o<t.length;o++){var i=t[o],a=(0,Jn.A)(e)?e(i):i[e];a>r&&(n=i,r=a)}return n}};function Pj(t){return 0===t.length?[0,0]:[(0,Mj.A)(_j(t,function(t){return(0,Mj.A)(t)||0})),(0,Sj.A)(Ej(t,function(t){return(0,Sj.A)(t)||0}))]}function Lj(t){for(var e=vj(t),n=e[0].length,r=(0,pn.zs)([Array(n).fill(0),Array(n).fill(0)],2),o=r[0],i=r[1],a=0;a<e.length;a+=1)for(var s=e[a],c=0;c<n;c+=1)s[c]>=0?(s[c]+=o[c],o[c]=s[c]):(s[c]+=i[c],i[c]=s[c]);return e}var Cj=function(t){function e(e){return t.call(this,e,{type:"line",x:0,y:0,width:200,height:20,isStack:!1,color:["#83daad","#edbf45","#d2cef9","#e290b3","#6f63f4"],smooth:!0,lineLineWidth:1,areaOpacity:0,isGroup:!1,columnLineWidth:1,columnStroke:"#fff",scale:1,spacing:0})||this}return(0,pn.C6)(e,t),Object.defineProperty(e.prototype,"rawData",{get:function(){var t=this.attributes.data;if(!t||0===(null==t?void 0:t.length))return[[]];var e=vj(t);return(0,tt.A)(e[0])?[e]:e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"data",{get:function(){return this.attributes.isStack?Lj(this.rawData):this.rawData},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scales",{get:function(){return this.createScales(this.data)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"baseline",{get:function(){var t=this.scales.y,e=(0,pn.zs)(t.getOptions().domain||[0,0],2),n=e[0],r=e[1];return t.map(r<0?r:n<0?0:n)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"containerShape",{get:function(){var t=this.attributes;return{width:t.width,height:t.height}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"linesStyle",{get:function(){var t=this,e=this.attributes,n=e.isStack,r=e.smooth;if("line"!==e.type)throw new Error("linesStyle can only be used in line type");var o=fr(this.attributes,"area"),i=fr(this.attributes,"line"),a=this.containerShape.width,s=this.data;if(0===s[0].length)return{lines:[],areas:[]};var c=this.scales,l=function(t,e){var n,r=e.x,o=e.y,i=(0,pn.zs)(o.getOptions().range||[0,0],2),a=i[0],s=i[1];return s>a&&(n=(0,pn.zs)([a,s],2),s=n[0],a=n[1]),t.map(function(t){return t.map(function(t,e){return[r.map(e),(0,ca.A)(o.map(t),s,a)]})})}(s,{type:"line",x:c.x,y:c.y}),u=[];if(o){var f=this.baseline;u=n?r?function(t,e,n){for(var r=[],o=t.length-1;o>=0;o-=1){var i=t[o],a=kj(i),s=void 0;if(0===o)s=Aj(a,e,n);else{var c=kj(t[o-1],!0),l=i[0];c[0][0]="L",s=(0,pn.fX)((0,pn.fX)((0,pn.fX)([],(0,pn.zs)(a),!1),(0,pn.zs)(c),!1),[(0,pn.fX)(["M"],(0,pn.zs)(l),!1),["Z"]],!1)}r.push(s)}return r}(l,a,f):function(t,e,n){for(var r=[],o=t.length-1;o>=0;o-=1){var i=jj(t[o]),a=void 0;if(0===o)a=Aj(i,e,n);else{var s=jj(t[o-1],!0);s[0][0]="L",a=(0,pn.fX)((0,pn.fX)((0,pn.fX)([],(0,pn.zs)(i),!1),(0,pn.zs)(s),!1),[["Z"]],!1)}r.push(a)}return r}(l,a,f):function(t,e,n,r){return t.map(function(t){return Aj(e?kj(t):jj(t),n,r)})}(l,r,a,f)}return{lines:l.map(function(e,n){return(0,pn.Cl)({stroke:t.getColor(n),d:r?kj(e):jj(e)},i)}),areas:u.map(function(e,n){return(0,pn.Cl)({d:e,fill:t.getColor(n)},o)})}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"columnsStyle",{get:function(){var t=this,e=fr(this.attributes,"column"),n=this.attributes,r=n.isStack,o=n.scale;if("column"!==n.type)throw new Error("columnsStyle can only be used in column type");var i=this.containerShape.height,a=this.rawData;if(!a)return{columns:[]};r&&(a=Lj(a));var s=this.createScales(a),c=s.x,l=s.y,u=(0,pn.zs)(Pj(a),2),f=u[0],d=new sa({domain:[0,u[1]-(f>0?0:f)],range:[0,i*o]}),p=c.getBandWidth(),h=this.rawData;return{columns:a.map(function(n,o){return n.map(function(n,i){var s=p/a.length;return(0,pn.Cl)((0,pn.Cl)({fill:t.getColor(o)},e),r?{x:c.map(i),y:l.map(n),width:p,height:d.map(h[o][i])}:{x:c.map(i)+s*o,y:l.map(n>=0?n:0),width:s,height:d.map(Math.abs(n))})})})}},enumerable:!1,configurable:!0}),e.prototype.render=function(t,e){var n,r,o;(n=e,r=".container",o="rect",n.querySelector(r)?zn(n).select(r):zn(n).append(o)).attr("className","container").node();var i=t.type,a=t.x,s=t.y,c="spark".concat(i),l=(0,pn.Cl)({x:a,y:s},"line"===i?this.linesStyle:this.columnsStyle);zn(e).selectAll(".spark").data([i]).join(function(t){return t.append(function(t){return"line"===t?new Oj({className:c,style:l}):new xj({className:c,style:l})}).attr("className","spark ".concat(c))},function(t){return t.update(l)},function(t){return t.remove()})},e.prototype.getColor=function(t){var e=this.attributes.color;return(0,Le.A)(e)?e[t%e.length]:(0,Jn.A)(e)?e.call(null,t):e},e.prototype.createScales=function(t){var e,n,r=this.attributes,o=r.type,i=r.scale,a=r.range,s=void 0===a?[]:a,c=r.spacing,l=this.containerShape,u=l.width,f=l.height,d=(0,pn.zs)(Pj(t),2),p=new sa({domain:[null!==(e=s[0])&&void 0!==e?e:d[0],null!==(n=s[1])&&void 0!==n?n:d[1]],range:[f,f*(1-i)]});return"line"===o?{type:o,x:new sa({domain:[0,t[0].length-1],range:[0,u]}),y:p}:{type:o,x:new yj({domain:t[0].map(function(t,e){return e}),range:[0,u],paddingInner:c,paddingOuter:c/2,align:.5}),y:p}},e.tag="sparkline",e}(Sn),zj=function(t){function e(e){var n=t.call(this,e,(0,pn.Cl)((0,pn.Cl)((0,pn.Cl)({x:0,y:0,animate:{duration:100,fill:"both"},brushable:!0,formatter:function(t){return t.toString()},handleSpacing:2,orientation:"horizontal",padding:0,autoFitLabel:!0,scrollable:!0,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],type:"range",selectionType:"select",handleIconOffset:0},dr(ma,"handle")),dr(ha,"handleIcon")),dr(ga,"handleLabel")))||this;return n.range=[0,1],n.onDragStart=function(t){return function(e){e.stopPropagation(),n.target=t,n.prevPos=n.getOrientVal(ua(e));var r=n.availableSpace,o=r.x,i=r.y,a=n.getBBox(),s=a.x,c=a.y;n.selectionStartPos=n.getRatio(n.prevPos-n.getOrientVal([o,i])-n.getOrientVal([+s,+c])),n.selectionWidth=0,document.addEventListener("pointermove",n.onDragging),document.addEventListener("pointerup",n.onDragEnd)}},n.onDragging=function(t){var e=n.attributes,r=e.slidable,o=e.brushable,i=e.type;t.stopPropagation();var a=n.getOrientVal(ua(t)),s=a-n.prevPos;if(s){var c=n.getRatio(s);switch(n.target){case"start":r&&n.setValuesOffset(c);break;case"end":r&&n.setValuesOffset(0,c);break;case"selection":r&&n.setValuesOffset(c,c);break;case"track":if(!o)return;n.selectionWidth+=c,n.innerSetValues("range"===i?[n.selectionStartPos,n.selectionStartPos+n.selectionWidth].sort():[0,n.selectionStartPos+n.selectionWidth],!0)}n.prevPos=a}},n.onDragEnd=function(){document.removeEventListener("pointermove",n.onDragging),document.removeEventListener("pointermove",n.onDragging),document.removeEventListener("pointerup",n.onDragEnd),n.target="",n.updateHandlesPosition(!1)},n.onValueChange=function(t){var e=n.attributes,r=e.onChange,o=e.type,i="range"===o?t:t[1],a="range"===o?n.getValues():n.getValues()[1],s=new l.up("valuechange",{detail:{oldValue:i,value:a}});n.dispatchEvent(s),null==r||r(a)},n.selectionStartPos=0,n.selectionWidth=0,n.prevPos=0,n.target="",n}return(0,pn.C6)(e,t),Object.defineProperty(e.prototype,"values",{get:function(){return this.attributes.values},set:function(t){this.attributes.values=this.clampValues(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sparklineStyle",{get:function(){if("horizontal"!==this.attributes.orientation)return null;var t=fr(this.attributes,"sparkline");return(0,pn.Cl)((0,pn.Cl)({zIndex:0},this.availableSpace),t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"shape",{get:function(){var t=this.attributes,e=t.trackLength,n=t.trackSize,r=(0,pn.zs)(this.getOrientVal([[e,n],[n,e]]),2);return{width:r[0],height:r[1]}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"availableSpace",{get:function(){var t=this.attributes,e=(0,pn.zs)(so(t.padding),4),n=e[0],r=e[3],o=this.shape;return{x:r,y:n,width:o.width-(r+e[1]),height:o.height-(n+e[2])}},enumerable:!1,configurable:!0}),e.prototype.getValues=function(){return this.values},e.prototype.setValues=function(t,e){void 0===t&&(t=[0,0]),void 0===e&&(e=!1),this.attributes.values=t;var n=!1!==e&&this.attributes.animate;this.updateSelectionArea(n),this.updateHandlesPosition(n)},e.prototype.updateSelectionArea=function(t){var e=this.calcSelectionArea();this.foregroundGroup.selectAll(ya.selection.class).each(function(n,r){wn(this,e[r],t)})},e.prototype.updateHandlesPosition=function(t){this.attributes.showHandle&&(this.startHandle&&wn(this.startHandle,this.getHandleStyle("start"),t),this.endHandle&&wn(this.endHandle,this.getHandleStyle("end"),t))},e.prototype.innerSetValues=function(t,e){void 0===t&&(t=[0,0]),void 0===e&&(e=!1);var n=this.values,r=this.clampValues(t);this.attributes.values=r,this.setValues(r),e&&this.onValueChange(n)},e.prototype.renderTrack=function(t){var e=this.attributes,n=e.x,r=e.y,o=fr(this.attributes,"track");this.trackShape=zn(t).maybeAppendByClassName(ya.track,"rect").styles((0,pn.Cl)((0,pn.Cl)({x:n,y:r},this.shape),o))},e.prototype.renderBrushArea=function(t){var e=this.attributes,n=e.x,r=e.y,o=e.brushable;this.brushArea=zn(t).maybeAppendByClassName(ya.brushArea,"rect").styles((0,pn.Cl)({x:n,y:r,fill:"transparent",cursor:o?"crosshair":"default"},this.shape))},e.prototype.renderSparkline=function(t){var e=this,n=this.attributes,r=n.x,o=n.y;En("horizontal"===n.orientation,zn(t).maybeAppendByClassName(ya.sparklineGroup,"g"),function(t){var n=(0,pn.Cl)((0,pn.Cl)({},e.sparklineStyle),{x:r,y:o});t.maybeAppendByClassName(ya.sparkline,function(){return new Cj({style:n})}).update(n)})},e.prototype.renderHandles=function(){var t,e=this,n=this.attributes,r=n.showHandle?"range"===n.type?["start","end"]:["end"]:[],o=this;null===(t=this.foregroundGroup)||void 0===t||t.selectAll(ya.handle.class).data(r.map(function(t){return{type:t}}),function(t){return t.type}).join(function(t){return t.append(function(t){return new xa({style:e.getHandleStyle(t.type)})}).each(function(t){var e=t.type;this.attr("class","".concat(ya.handle.name," ").concat(e,"-handle"));var n="".concat(e,"Handle");o[n]=this,this.addEventListener("pointerdown",o.onDragStart(e))})},function(t){return t.each(function(t){this.update(o.getHandleStyle(t.type))})},function(t){return t.each(function(t){var e="".concat(t.type,"Handle");o[e]=void 0}).remove()})},e.prototype.renderSelection=function(t){var e=this.attributes,n=e.x,r=e.y,o=e.type,i=e.selectionType;this.foregroundGroup=zn(t).maybeAppendByClassName(ya.foreground,"g");var a=fr(this.attributes,"selection"),s=function(t){return t.style("visibility",function(t){return t.show?"visible":"hidden"}).style("cursor",function(t){return"select"===i?"grab":"invert"===i?"crosshair":"default"}).styles((0,pn.Cl)((0,pn.Cl)({},a),{transform:"translate(".concat(n,", ").concat(r,")")}))},c=this;this.foregroundGroup.selectAll(ya.selection.class).data("value"===o?[]:this.calcSelectionArea().map(function(t,e){return{style:(0,pn.Cl)({},t),index:e,show:"select"===i?1===e:1!==e}}),function(t){return t.index}).join(function(t){return t.append("rect").attr("className",ya.selection.name).call(s).each(function(t,e){var n=this;1===e?(c.selectionShape=zn(this),this.on("pointerdown",function(t){n.attr("cursor","grabbing"),c.onDragStart("selection")(t)}),c.dispatchCustomEvent(this,"pointerenter","selectionMouseenter"),c.dispatchCustomEvent(this,"pointerleave","selectionMouseleave"),c.dispatchCustomEvent(this,"click","selectionClick"),this.addEventListener("pointerdown",function(){n.attr("cursor","grabbing")}),this.addEventListener("pointerup",function(){n.attr("cursor","pointer")}),this.addEventListener("pointerover",function(){n.attr("cursor","pointer")})):this.on("pointerdown",c.onDragStart("track"))})},function(t){return t.call(s)},function(t){return t.remove()}),this.updateSelectionArea(!1),this.renderHandles()},e.prototype.render=function(t,e){this.renderTrack(e),this.renderSparkline(e),this.renderBrushArea(e),this.renderSelection(e)},e.prototype.clampValues=function(t,e){var n;void 0===e&&(e=4);var r=(0,pn.zs)(this.range,2),o=r[0],i=r[1],a=(0,pn.zs)(this.getValues().map(function(t){return la(t,e)}),2),s=a[0],c=a[1],l=Array.isArray(t)?t:[s,null!=t?t:c],u=(0,pn.zs)((l||[s,c]).map(function(t){return la(t,e)}),2),f=u[0],d=u[1];if("value"===this.attributes.type)return[0,(0,ca.A)(d,o,i)];f>d&&(f=(n=(0,pn.zs)([d,f],2))[0],d=n[1]);var p=d-f;return p>i-o?[o,i]:f<o?s===o&&c===d?[o,d]:[o,p+o]:d>i?c===i&&s===f?[f,i]:[i-p,i]:[f,d]},e.prototype.calcSelectionArea=function(t){var e=(0,pn.zs)(this.clampValues(t),2),n=e[0],r=e[1],o=this.availableSpace,i=o.x,a=o.y,s=o.width,c=o.height;return this.getOrientVal([[{y:a,height:c,x:i,width:n*s},{y:a,height:c,x:n*s+i,width:(r-n)*s},{y:a,height:c,x:r*s,width:(1-r)*s}],[{x:i,width:s,y:a,height:n*c},{x:i,width:s,y:n*c+a,height:(r-n)*c},{x:i,width:s,y:r*c,height:(1-r)*c}]])},e.prototype.calcHandlePosition=function(t){var e=this.attributes.handleIconOffset,n=this.availableSpace,r=n.x,o=n.y,i=n.width,a=n.height,s=(0,pn.zs)(this.clampValues(),2),c="start"===t?-e:e,l=("start"===t?s[0]:s[1])*this.getOrientVal([i,a])+c;return{x:r+this.getOrientVal([l,i/2]),y:o+this.getOrientVal([a/2,l])}},e.prototype.inferTextStyle=function(t){return"horizontal"===this.attributes.orientation?{}:"start"===t?{transformOrigin:"left center",transform:"rotate(90)",textAlign:"start"}:"end"===t?{transformOrigin:"right center",transform:"rotate(90)",textAlign:"end"}:{}},e.prototype.calcHandleText=function(t){var e,n=this.attributes,r=n.type,o=n.orientation,i=n.formatter,a=n.autoFitLabel,s=fr(this.attributes,"handle"),c=fr(s,"label"),l=s.spacing,u=this.getHandleSize(),f=this.clampValues(),d=i("start"===t?f[0]:f[1]),p=new Ln({style:(0,pn.Cl)((0,pn.Cl)((0,pn.Cl)({},c),this.inferTextStyle(t)),{text:d})}),h=p.getBBox(),g=h.width,m=h.height;if(p.destroy(),!a){if("value"===r)return{text:d,x:0,y:-m-l};var y=l+u+("horizontal"===o?g/2:0);return(e={text:d})["horizontal"===o?"x":"y"]="start"===t?-y:y,e}var b=0,v=0,x=this.availableSpace,O=x.width,w=x.height,j=this.calcSelectionArea()[1],k=j.x,A=j.y,M=l+u;if("horizontal"===o){var _=M+g/2;if("start"===t)b=k-M-g>0?-_:_;else b=O-k-j.width-M>g?_:-_}else{var S=m+M;v="start"===t?A-u>m?-S:M:w-(A+j.height)-u>m?S:-M}return{x:b,y:v,text:d}},e.prototype.getHandleLabelStyle=function(t){var e=fr(this.attributes,"handleLabel");return(0,pn.Cl)((0,pn.Cl)((0,pn.Cl)({},e),this.calcHandleText(t)),this.inferTextStyle(t))},e.prototype.getHandleIconStyle=function(){var t=this.attributes.handleIconShape,e=fr(this.attributes,"handleIcon"),n=this.getOrientVal(["ew-resize","ns-resize"]),r=this.getHandleSize();return(0,pn.Cl)({cursor:n,shape:t,size:r},e)},e.prototype.getHandleStyle=function(t){var e=this.attributes,n=e.x,r=e.y,o=e.showLabel,i=e.showLabelOnInteraction,a=e.orientation,s=this.calcHandlePosition(t),c=s.x,l=s.y,u=this.calcHandleText(t),f=o;return!o&&i&&(f=!!this.target),(0,pn.Cl)((0,pn.Cl)((0,pn.Cl)({},dr(this.getHandleIconStyle(),"icon")),dr((0,pn.Cl)((0,pn.Cl)({},this.getHandleLabelStyle(t)),u),"label")),{transform:"translate(".concat(c+n,", ").concat(l+r,")"),orientation:a,showLabel:f,type:t,zIndex:3})},e.prototype.getHandleSize=function(){var t=this.attributes,e=t.handleIconSize;return e||Math.floor((this.getOrientVal([+t.height,+t.width])+4)/2.4)},e.prototype.getOrientVal=function(t){var e=(0,pn.zs)(t,2);return"horizontal"===this.attributes.orientation?e[0]:e[1]},e.prototype.setValuesOffset=function(t,e){void 0===e&&(e=0);var n=this.attributes.type,r=(0,pn.zs)(this.getValues(),2),o=[r[0]+("range"===n?t:0),r[1]+e].sort();this.innerSetValues(o,!0)},e.prototype.getRatio=function(t){var e=this.availableSpace;return t/this.getOrientVal([e.width,e.height])},e.prototype.dispatchCustomEvent=function(t,e,n){var r=this;t.on(e,function(t){t.stopPropagation(),r.dispatchEvent(new l.up(n,{detail:t}))})},e.prototype.bindEvents=function(){this.addEventListener("wheel",this.onScroll);var t=this.brushArea;this.dispatchCustomEvent(t,"click","trackClick"),this.dispatchCustomEvent(t,"pointerenter","trackMouseenter"),this.dispatchCustomEvent(t,"pointerleave","trackMouseleave"),t.on("pointerdown",this.onDragStart("track"))},e.prototype.onScroll=function(t){if(this.attributes.scrollable){var e=this.getRatio(t.deltaY||t.deltaX);this.setValuesOffset(e,e)}},e.tag="slider",e}(Sn),Tj=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const Bj=t=>{const{orientation:e,labelFormatter:n,style:r={},position:o}=t,i=Tj(t,["orientation","labelFormatter","size","style","position"]);return a=>{var s;const{scales:[c],value:l,theme:u,coordinate:f}=a,{bbox:d}=l,{width:p,height:h}=d,{slider:g={}}=u,m=(null===(s=c.getFormatter)||void 0===s?void 0:s.call(c))||(t=>t+""),y="string"==typeof n?(0,ze.GP)(n):n,b="horizontal"===e,v=nn(f)&&b,{trackSize:x=g.trackSize}=r,[O,w]=function(t,e,n){const{x:r,y:o,width:i,height:a}=t;return"left"===e?[r+i-n,o]:"right"===e||"bottom"===e?[r,o]:"top"===e?[r,o+a-n]:void 0}(d,o,x);return new zj({className:"slider",style:Object.assign({},g,Object.assign(Object.assign({x:O,y:w,trackLength:b?p:h,orientation:e,formatter:t=>(y||m)(sl(c,v?1-t:t,!0)),sparklineData:Ij(t,a)},r),i))})}};function Ij(t,e){const{markState:n}=e;return(0,Le.A)(t.sparklineData)?t.sparklineData:function(t,e){const[n]=Array.from(t.entries()).filter(([t])=>"line"===t.type||"area"===t.type||"interval"===t.type).filter(([t])=>t.slider).map(([t])=>{const{encode:n,slider:r}=t;if(null==r?void 0:r.x)return Object.fromEntries(e.map(t=>{const e=n[t];return[t,e?e.value:void 0]}))});if(!(null==n?void 0:n.series))return null==n?void 0:n.y;const r=n.series.reduce((t,e,r)=>(t[e]=t[e]||[],t[e].push(n.y[r]),t),{});return Object.values(r)}(n,["y","series"])}Bj.props={defaultPosition:"bottom",defaultSize:24,defaultOrder:1,defaultCrossPadding:[12,12],defaultPadding:[12,12]};const Nj=t=>Bj(Object.assign(Object.assign({},t),{orientation:"horizontal"}));Nj.props=Object.assign(Object.assign({},Bj.props),{defaultPosition:"bottom"});const Rj=t=>Bj(Object.assign(Object.assign({},t),{orientation:"vertical"}));Rj.props=Object.assign(Object.assign({},Bj.props),{defaultPosition:"left"});var Fj=function(t){function e(e){var n=t.call(this,e,{x:0,y:0,isRound:!0,orientation:"vertical",padding:[2,2,2,2],scrollable:!0,slidable:!0,thumbCursor:"default",trackSize:10,value:0})||this;return n.range=[0,1],n.onValueChange=function(t){var e=n.attributes.value;if(t!==e){var r={detail:{oldValue:t,value:e}};n.dispatchEvent(new l.up("scroll",r)),n.dispatchEvent(new l.up("valuechange",r))}},n.onTrackClick=function(t){if(n.attributes.slidable){var e=(0,pn.zs)(n.getLocalPosition(),2),r=e[0],o=e[1],i=(0,pn.zs)(n.padding,4),a=n.getOrientVal([r+i[3],o+i[0]]),s=n.getOrientVal(ua(t));n.setValue((s-a)/n.trackLength,!0)}},n.onThumbMouseenter=function(t){n.dispatchEvent(new l.up("thumbMouseenter",{detail:t.detail}))},n.onTrackMouseenter=function(t){n.dispatchEvent(new l.up("trackMouseenter",{detail:t.detail}))},n.onThumbMouseleave=function(t){n.dispatchEvent(new l.up("thumbMouseleave",{detail:t.detail}))},n.onTrackMouseleave=function(t){n.dispatchEvent(new l.up("trackMouseleave",{detail:t.detail}))},n}return(0,pn.C6)(e,t),Object.defineProperty(e.prototype,"padding",{get:function(){return so(this.attributes.padding)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){var t=this.attributes.value,e=(0,pn.zs)(this.range,2);return(0,ca.A)(t,e[0],e[1])},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"trackLength",{get:function(){var t=this.attributes,e=t.trackLength;return void 0===e?t.viewportLength:e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"availableSpace",{get:function(){var t=this.attributes.trackSize,e=this.trackLength,n=(0,pn.zs)(this.padding,4),r=n[0],o=n[1],i=n[2],a=n[3],s=(0,pn.zs)(this.getOrientVal([[e,t],[t,e]]),2);return{x:a,y:r,width:+s[0]-(a+o),height:+s[1]-(r+i)}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"trackRadius",{get:function(){var t=this.attributes;return t.isRound?t.trackSize/2:0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"thumbRadius",{get:function(){var t=this.attributes;if(!t.isRound)return 0;var e=this.availableSpace;return t.thumbRadius||this.getOrientVal([e.height,e.width])/2},enumerable:!1,configurable:!0}),e.prototype.getValues=function(t){void 0===t&&(t=this.value);var e=this.attributes,n=e.viewportLength/e.contentLength,r=(0,pn.zs)(this.range,2),o=t*(r[1]-r[0]-n);return[o,o+n]},e.prototype.getValue=function(){return this.value},e.prototype.renderSlider=function(t){var e=this.attributes,n=e.x,r=e.y,o=e.orientation,i=e.trackSize,a=e.padding,s=e.slidable,c=fr(this.attributes,"track"),l=fr(this.attributes,"thumb"),u=(0,pn.Cl)((0,pn.Cl)({x:n,y:r,brushable:!1,orientation:o,padding:a,selectionRadius:this.thumbRadius,showHandle:!1,slidable:s,trackLength:this.trackLength,trackRadius:this.trackRadius,trackSize:i,values:this.getValues()},dr(c,"track")),dr(l,"selection"));this.slider=zn(t).maybeAppendByClassName("scrollbar",function(){return new zj({style:u})}).update(u).node()},e.prototype.render=function(t,e){this.renderSlider(e)},e.prototype.setValue=function(t,e){void 0===e&&(e=!1);var n=this.attributes.value,r=(0,pn.zs)(this.range,2);this.slider.setValues(this.getValues((0,ca.A)(t,r[0],r[1])),e),this.onValueChange(n)},e.prototype.bindEvents=function(){var t=this;this.slider.addEventListener("trackClick",function(e){e.stopPropagation(),t.onTrackClick(e.detail)}),this.onHover()},e.prototype.getOrientVal=function(t){return"horizontal"===this.attributes.orientation?t[0]:t[1]},e.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)},e.tag="scrollbar",e}(Sn),Dj=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const $j=t=>{const{orientation:e,style:n}=t,r=Dj(t,["orientation","labelFormatter","style"]);return({scales:[t],value:o,theme:i})=>{const{bbox:a}=o,{x:s,y:c,width:l,height:u}=a,{scrollbar:f={}}=i,{ratio:d,range:p}=t.getOptions(),h="horizontal"===e?l:u,g=h/d,[m,y]=p,b=y>m?0:1;return new Fj({className:"g2-scrollbar",style:Object.assign({},f,Object.assign(Object.assign(Object.assign(Object.assign({},n),{x:s,y:c,trackLength:h,value:b}),r),{orientation:e,contentLength:g,viewportLength:h}))})}};$j.props={defaultPosition:"bottom",defaultSize:24,defaultOrder:1,defaultCrossPadding:[12,12],defaultPadding:[12,12]};const Wj=t=>$j(Object.assign(Object.assign({},t),{orientation:"horizontal"}));Wj.props=Object.assign(Object.assign({},$j.props),{defaultPosition:"bottom"});const Hj=t=>$j(Object.assign(Object.assign({},t),{orientation:"vertical"}));Hj.props=Object.assign(Object.assign({},$j.props),{defaultPosition:"left"});const qj=(t,e)=>{const{coordinate:n}=e;return(e,r,o)=>{const[i]=e,{transform:a="",fillOpacity:s=1,strokeOpacity:c=1,opacity:l=1}=i.style,[u,f]=nn(n)?["left bottom","scale(1, 0.0001)"]:["left top","scale(0.0001, 1)"],d=[{transform:`${a} ${f}`.trimStart(),transformOrigin:u,fillOpacity:0,strokeOpacity:0,opacity:0},{transform:`${a} ${f}`.trimStart(),transformOrigin:u,fillOpacity:s,strokeOpacity:c,opacity:l,offset:.01},{transform:`${a} scale(1, 1)`.trimStart(),transformOrigin:u,fillOpacity:s,strokeOpacity:c,opacity:l}];return i.animate(d,Object.assign(Object.assign({},o),t))}},Yj=(t,e)=>{const{coordinate:n}=e;return(e,r,o)=>{const[i]=e,{transform:a="",fillOpacity:s=1,strokeOpacity:c=1,opacity:l=1}=i.style,[u,f]=nn(n)?["left bottom","scale(1, 0.0001)"]:["left top","scale(0.0001, 1)"],d=[{transform:`${a} scale(1, 1)`.trimStart(),transformOrigin:u},{transform:`${a} ${f}`.trimStart(),transformOrigin:u,fillOpacity:s,strokeOpacity:c,opacity:l,offset:.99},{transform:`${a} ${f}`.trimStart(),transformOrigin:u,fillOpacity:0,strokeOpacity:0,opacity:0}];return i.animate(d,Object.assign(Object.assign({},o),t))}},Xj=(t,e)=>{const n=1e-4,{coordinate:r}=e;return l.Ks.registerProperty({name:"scaleInYRadius",inherits:!1,initialValue:"",interpolable:!0,syntax:l.NZ.NUMBER}),(e,o,i)=>{const[a]=e;return rn(r)?(e=>{const{__data__:o,style:a}=e,{fillOpacity:s=1,strokeOpacity:c=1,opacity:l=1}=a,{points:u,y:f,y1:d}=o,p=ic(r,u,[f,d]),{innerRadius:h,outerRadius:g}=p;return e.animate([{scaleInYRadius:h+n,fillOpacity:0,strokeOpacity:0,opacity:0},{scaleInYRadius:h+n,fillOpacity:s,strokeOpacity:c,opacity:l,offset:.01},{scaleInYRadius:g,fillOpacity:s,strokeOpacity:c,opacity:l}],Object.assign(Object.assign({},i),t))})(a):(e=>{const{style:n}=e,{transform:o="",fillOpacity:a=1,strokeOpacity:s=1,opacity:c=1}=n,[l,u]=nn(r)?["left top","scale(0.0001, 1)"]:["left bottom","scale(1, 0.0001)"],f=[{transform:`${o} ${u}`.trimStart(),transformOrigin:l,fillOpacity:0,strokeOpacity:0,opacity:0},{transform:`${o} ${u}`.trimStart(),transformOrigin:l,fillOpacity:a,strokeOpacity:s,opacity:c,offset:.01},{transform:`${o} scale(1, 1)`.trimStart(),transformOrigin:l,fillOpacity:a,strokeOpacity:s,opacity:c}];return e.animate(f,Object.assign(Object.assign({},i),t))})(a)}},Gj=(t,e)=>{const{coordinate:n}=e;return(e,r,o)=>{const[i]=e,{transform:a="",fillOpacity:s=1,strokeOpacity:c=1,opacity:l=1}=i.style,[u,f]=nn(n)?["left top","scale(0.0001, 1)"]:["left bottom","scale(1, 0.0001)"],d=[{transform:`${a} scale(1, 1)`.trimStart(),transformOrigin:u},{transform:`${a} ${f}`.trimStart(),transformOrigin:u,fillOpacity:s,strokeOpacity:c,opacity:l,offset:.99},{transform:`${a} ${f}`.trimStart(),transformOrigin:u,fillOpacity:0,strokeOpacity:0,opacity:0}];return i.animate(d,Object.assign(Object.assign({},o),t))}},Vj=(t,e)=>{const n=1e-4;l.Ks.registerProperty({name:"waveInArcAngle",inherits:!1,initialValue:"",interpolable:!0,syntax:l.NZ.NUMBER});const{coordinate:r}=e;return(o,i,a)=>{const[s]=o;if(!rn(r))return qj(t,e)(o,i,a);const{__data__:c,style:l}=s,{radius:u=0,inset:f=0,fillOpacity:d=1,strokeOpacity:p=1,opacity:h=1}=l,{points:g,y:m,y1:y}=c,b=(0,dl.A)().cornerRadius(u).padAngle(f*Math.PI/180),v=ic(r,g,[m,y]),{startAngle:x,endAngle:O}=v,w=s.animate([{waveInArcAngle:x+n,fillOpacity:0,strokeOpacity:0,opacity:0},{waveInArcAngle:x+n,fillOpacity:d,strokeOpacity:p,opacity:h,offset:.01},{waveInArcAngle:O,fillOpacity:d,strokeOpacity:p,opacity:h}],Object.assign(Object.assign({},a),t));return w.onframe=function(){s.style.d=b(Object.assign(Object.assign({},v),{endAngle:Number(s.style.waveInArcAngle)}))},w.onfinish=function(){s.style.d=b(Object.assign(Object.assign({},v),{endAngle:O}))},w}};Vj.props={};const Kj=t=>(e,n,r)=>{const[o]=e,{fillOpacity:i=1,strokeOpacity:a=1,opacity:s=1}=o.style;return o.animate([{fillOpacity:0,strokeOpacity:0,opacity:0},{fillOpacity:i,strokeOpacity:a,opacity:s}],Object.assign(Object.assign({},r),t))};Kj.props={};const Uj=t=>(e,n,r)=>{const[o]=e,{fillOpacity:i=1,strokeOpacity:a=1,opacity:s=1}=o.style;return o.animate([{fillOpacity:i,strokeOpacity:a,opacity:s},{fillOpacity:0,strokeOpacity:0,opacity:0}],Object.assign(Object.assign({},r),t))};Uj.props={};const Zj=t=>(e,n,r)=>{const[o]=e,{transform:i="",fillOpacity:a=1,strokeOpacity:s=1,opacity:c=1}=o.style,l="center center",u=[{transform:`${i} scale(0.0001)`.trimStart(),transformOrigin:l,fillOpacity:0,strokeOpacity:0,opacity:0},{transform:`${i} scale(0.0001)`.trimStart(),transformOrigin:l,fillOpacity:a,strokeOpacity:s,opacity:c,offset:.01},{transform:`${i} scale(1)`.trimStart(),transformOrigin:l,fillOpacity:a,strokeOpacity:s,opacity:c}];return o.animate(u,Object.assign(Object.assign({},r),t))},Jj=t=>(e,n,r)=>{const[o]=e,{transform:i="",fillOpacity:a=1,strokeOpacity:s=1,opacity:c=1}=o.style,l="center center",u=[{transform:`${i} scale(1)`.trimStart(),transformOrigin:l},{transform:`${i} scale(0.0001)`.trimStart(),transformOrigin:l,fillOpacity:a,strokeOpacity:s,opacity:c,offset:.99},{transform:`${i} scale(0.0001)`.trimStart(),transformOrigin:l,fillOpacity:0,strokeOpacity:0,opacity:0}];return o.animate(u,Object.assign(Object.assign({},r),t))},Qj=t=>(e,n,r)=>{var o,i;const[a]=e,s=(null===(i=(o=a).getTotalLength)||void 0===i?void 0:i.call(o))||0;return a.animate([{lineDash:[0,s]},{lineDash:[s,0]}],Object.assign(Object.assign({},r),t))};Qj.props={};const tk={opacity:1,strokeOpacity:1,fillOpacity:1,lineWidth:0,x:0,y:0,cx:0,cy:0,r:0,rx:0,ry:0,width:0,height:0},ek={[l.yp.CIRCLE]:["cx","cy","r"],[l.yp.ELLIPSE]:["cx","cy","rx","ry"],[l.yp.RECT]:["x","y","width","height"],[l.yp.IMAGE]:["x","y","width","height"],[l.yp.LINE]:["x1","y1","x2","y2"],[l.yp.POLYLINE]:["points"],[l.yp.POLYGON]:["points"]};function nk(t,e,n=!1){const r={};for(const o of e){const e=t.style[o];e?r[o]=e:n&&(r[o]=tk[o])}return r}const rk=["fill","stroke","fillOpacity","strokeOpacity","opacity","lineWidth"];function ok(t){const{min:e,max:n}=t.getLocalBounds(),[r,o]=e,[i,a]=n;return[r,o,i-r,a-o]}function ik(t){const[e,n,r,o]=t;return`\n M ${e} ${n}\n L ${e+r} ${n}\n L ${e+r} ${n+o}\n L ${e} ${n+o}\n Z\n `}function ak(t,e){const[n,r,o,i]=ok(t),a=Math.ceil(Math.sqrt(e/(i/o))),s=[],c=i/Math.ceil(e/a);let l=0,u=e;for(;u>0;){const t=Math.min(u,a),e=o/t;for(let o=0;o<t;o++){s.push(ik([n+o*e,r+l*c,e,c]))}u-=t,l+=1}return s}function sk(t,e){t.__data__=e.__data__,t.className=e.className,t.markType=e.markType,e.parentNode.replaceChild(t,e)}function ck(t,e){return t.indexOf(e)===t.lastIndexOf(e)}function lk(t){const e=(0,l.O5)(t);if(e&&!function(t){return!ck(t,"m")||!ck(t,"M")}(e))return e}function uk(t){const{nodeName:e}=t;if("path"===e){const e=k(t,"attributes");return e.markerEnd||e.markerStart}return!1}function fk(t,e,n,r){const{nodeName:o}=e,{nodeName:i}=n,a=lk(e),s=lk(n),{opacity:c=1,strokeOpacity:u=1,fillOpacity:f=1}=e.style,{opacity:d=1,strokeOpacity:p=1,fillOpacity:h=1}=n.style,g=o===i&&"path"!==o,m=void 0===a||void 0===s,y=uk(e)||uk(n);if(g||m||y)return function(t,e,n){let{transform:r}=t.style;const{transform:o}=e.style;sk(e,t);let i=rk;if(t.nodeName===l.yp.GROUP){const[n,o,i,a]=ok(t),[s,c,l,u]=ok(e);r=`translate(${n-s}, ${o-c}) scale(${i/l}, ${a/u})`}else i=i.concat(ek[t.nodeName]||[]);const a=[Object.assign({transform:null!=r?r:"none"},nk(t,i,!0)),Object.assign({transform:null!=o?o:"none"},nk(e,i,!0))];return e.animate(a,n)}(e,n,r);const b=function(t,e){const{nodeName:n}=t;if("path"===n)return t;const r=new l.wA({style:Object.assign(Object.assign({},nk(t,rk)),{d:e})});return sk(r,t),r}(t,a),v=Object.assign(Object.assign({},nk(e,rk)),{opacity:c,strokeOpacity:u,fillOpacity:f}),x=Object.assign(Object.assign({},nk(n,rk)),{opacity:d,strokeOpacity:p,fillOpacity:h}),O=[v,x];if(a!==s){O[0].d=a,O[1].d=s;const t=b.animate(O,r);return t.onfinish=()=>{yt(b,n),b.style.d=s,b.style.transform="none"},b.style.transform="none",t}return He(v,x)?null:b.animate(O,r)}const dk=t=>(e,n,r)=>{const o=function(t="pack"){return"function"==typeof t?t:ak}(t.split),i=Object.assign(Object.assign({},r),t),{length:a}=e,{length:s}=n;if(1===a&&1===s||a>1&&s>1){const[t]=e,[r]=n;return fk(t,t,r,i)}if(1===a&&s>1){const[t]=e;return function(t,e,n,r){t.style.visibility="hidden";const o=r(t,e.length);return e.map((e,r)=>fk(e,new l.wA({style:Object.assign({d:o[r]},nk(t,rk))}),e,n))}(t,n,i,o)}if(a>1&&1===s){const[t]=n;return function(t,e,n,r){const o=r(e,t.length),{fillOpacity:i=1,strokeOpacity:a=1,opacity:s=1}=e.style,c=e.animate([{fillOpacity:0,strokeOpacity:0,opacity:0},{fillOpacity:0,strokeOpacity:0,opacity:0,offset:.99},{fillOpacity:i,strokeOpacity:a,opacity:s}],n),u=t.map((t,r)=>fk(t,t,new l.wA({style:{d:o[r],fill:e.style.fill}}),n));return[...u,c]}(e,t,i,o)}return null};dk.props={};const pk=(t,e)=>(n,r,o)=>{const[i]=n,{min:[a,s],halfExtents:c}=i.getLocalBounds(),u=2*c[0],f=2*c[1],d=new l.wA({style:{d:`M${a},${s}L${a+u},${s}L${a+u},${s+f}L${a},${s+f}Z`}});i.appendChild(d),i.style.clipPath=d;return qj(t,e)([d],r,o)};pk.props={};const hk=(t,e)=>(n,r,o)=>{const[i]=n,{min:[a,s],halfExtents:c}=i.getLocalBounds(),u=2*c[0],f=2*c[1],d=new l.wA({style:{d:`M${a},${s}L${a+u},${s}L${a+u},${s+f}L${a},${s+f}Z`}});i.appendChild(d),i.style.clipPath=d;return Xj(t,e)([d],r,o)};hk.props={};var gk=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};function mk(t){var{delay:e,createGroup:n,createRegionGroup:r,background:o=!1,link:i=!1}=t,a=gk(t,["delay","createGroup","createRegionGroup","background","link"]);return(t,s,c)=>{const{container:l,view:u,options:f}=t,{scale:d,coordinate:p}=u;return function(t,{elements:e,datum:n,groupKey:r=t=>t,regionGroupKey:o=t=>t,link:i=!1,background:a=!1,delay:s=60,scale:c,coordinate:l,emitter:u,state:f={},region:d=!1,regionEleFilter:p=t=>Zl.includes(t.markType)}){var h,g;const m=null!==(h=e(t))&&void 0!==h?h:[],y=d?m.filter(p):m,b=new Set(y),v=d?o:r,x=C(y,v),O=Jl({elementsof:e,root:t,coordinate:l,scale:c}),w=Dl(y,n),[j,k]=$l(Object.assign({elements:y,valueof:w,link:i,coordinate:l},xt(f.active,"link"))),[A,M,_]=Hl(Object.assign({document:t.ownerDocument,scale:c,coordinate:l,background:a,valueof:w},xt(f.active,"background"))),S=(0,N.A)(f,{active:Object.assign({},(null===(g=f.active)||void 0===g?void 0:g.offset)&&{transform:(...t)=>{const e=f.active.offset(...t),[,n]=t;return Wl(y[n],e,l)}})}),E=Il(S,y),{updateState:P,removeState:L,hasState:z}=E(w);let T;const B=t=>{const{nativeEvent:e=!0}=t;let r=t.target;if(d&&(r=O(t)),!b.has(r))return;T&&clearTimeout(T);const o=v(r),i=x.get(o),a=new Set(i);for(const t of y)a.has(t)?z(t,"active")||P(t,"active"):(P(t,"inactive"),k(t)),t!==r&&M(t);A(r),j(i),e&&u.emit("element:highlight",{nativeEvent:e,data:{data:n(r),group:i.map(n)}})},I=()=>{T&&clearTimeout(T),T=setTimeout(()=>{R(),T=null},s)},R=(t=!0)=>{for(const t of y)L(t,"active","inactive"),M(t),k(t);t&&u.emit("element:unhighlight",{nativeEvent:t})},F=t=>{let e=t.target;d&&(e=O(t)),e?a&&!_(e)||(a||b.has(e))&&(s>0?I():R()):s>0?I():R()},D=()=>{R()};t.addEventListener("pointerover",B),t.addEventListener("pointermove",B),t.addEventListener("pointerout",F),t.addEventListener("pointerleave",D);const $=t=>{const{nativeEvent:e}=t;e||R(!1)},W=t=>{const{nativeEvent:e}=t;if(e)return;const{data:r}=t.data,o=Xl(y,r,n);o&&B({target:o,nativeEvent:!1})};return u.on("element:highlight",W),u.on("element:unhighlight",$),()=>{t.removeEventListener("pointerover",B),t.removeEventListener("pointermove",B),t.removeEventListener("pointerout",F),t.removeEventListener("pointerleave",D),u.off("element:highlight",W),u.off("element:unhighlight",$);for(const t of y)M(t),k(t)}}(Ml(l),Object.assign({elements:jl,datum:Cl(u),groupKey:n?n(u):void 0,regionGroupKey:r?r(u):t=>t.__data__.x,coordinate:p,scale:d,state:Fl(f,[["active",o?{}:{lineWidth:"1",stroke:"#000"}],"inactive"]),background:o,link:i,delay:e,emitter:c},a))}}function yk(t){return mk(Object.assign(Object.assign({},t),{createGroup:Ll}))}function bk(t){return mk(Object.assign(Object.assign({},t),{createGroup:Pl}))}mk.props={reapplyWhenUpdate:!0},yk.props={reapplyWhenUpdate:!0},bk.props={reapplyWhenUpdate:!0};var vk=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};function xk(t,{elements:e,datum:n,groupKey:r=t=>t,scaleFactor:o=1.04,shadow:i=!0,shadowColor:a="rgba(0, 0, 0, 0.4)",shadowBlur:s=10,shadowOffsetX:c=0,shadowOffsetY:l=2,zIndex:u=10,delay:f=60,emitter:d,state:p={},coordinate:h}){const g=()=>{var n;return null!==(n=e(t))&&void 0!==n?n:[]},m=g(),y=Dl(m,n),b=Il((0,N.A)(p,{active:{}}),m),{updateState:v,removeState:x,hasState:O}=b(y),w=new Map;let j;const k=t=>{if(w.has(t))return;const e=t.style.transform||"",n="none"===e?"":e;if(w.set(t,{transform:e,transformOrigin:t.style.transformOrigin||"",zIndex:t.style.zIndex||0,shadowColor:t.style.shadowColor||"",shadowBlur:t.style.shadowBlur||0,shadowOffsetX:t.style.shadowOffsetX||0,shadowOffsetY:t.style.shadowOffsetY||0}),h&&rn(h)&&!n){const e=h.getCenter();t.style.transformOrigin=`${e[0]}px ${e[1]}px`}const r=`scale(${o})`;t.style.transform=n?`${n} ${r}`:r,t.style.zIndex=u,i&&(t.style.shadowColor=a,t.style.shadowBlur=s,t.style.shadowOffsetX=c,t.style.shadowOffsetY=l)},A=t=>{const e=w.get(t);e&&(t.style.transform=e.transform,t.style.transformOrigin=e.transformOrigin,t.style.zIndex=e.zIndex,t.style.shadowColor=e.shadowColor,t.style.shadowBlur=e.shadowBlur,t.style.shadowOffsetX=e.shadowOffsetX,t.style.shadowOffsetY=e.shadowOffsetY,w.delete(t))},M=t=>{const{nativeEvent:e=!0}=t,o=t.target,i=g();if(!new Set(i).has(o))return;j&&clearTimeout(j);const a=C(i,r),s=r(o),c=a.get(s);if(!c)return;const l=new Set(c);for(const t of i)l.has(t)||(x(t,"active"),A(t));for(const t of c)O(t,"active")||v(t,"active"),k(t);e&&d.emit("element:hoverscale",{nativeEvent:e,data:{data:n(o),group:c.map(n)}})},_=(t=!0)=>{const e=g();for(const t of e)x(t,"active"),A(t);t&&d.emit("element:unhoverscale",{nativeEvent:t})},S=()=>{f>0?(j&&clearTimeout(j),j=setTimeout(()=>{_(),j=null},f)):_()},E=()=>{_()};t.addEventListener("pointerover",M),t.addEventListener("pointermove",M),t.addEventListener("pointerout",S),t.addEventListener("pointerleave",E);const P=t=>{const{nativeEvent:e}=t;e||_(!1)},L=t=>{const{nativeEvent:e}=t;if(e)return;const{data:r}=t.data,o=Xl(g(),r,n);o&&M({target:o,nativeEvent:!1})};return d.on("element:hoverscale",L),d.on("element:unhoverscale",P),()=>{t.removeEventListener("pointerover",M),t.removeEventListener("pointermove",M),t.removeEventListener("pointerout",S),t.removeEventListener("pointerleave",E),d.off("element:hoverscale",L),d.off("element:unhoverscale",P);const e=g();for(const t of e)A(t);w.clear()}}function Ok(t){var{delay:e,createGroup:n,scale:r,shadow:o,shadowColor:i,shadowBlur:a,shadowOffsetX:s,shadowOffsetY:c,zIndex:l}=t,u=vk(t,["delay","createGroup","scale","shadow","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","zIndex"]);return(t,f,d)=>{const{container:p,view:h,options:g}=t,m=Ml(p),y=Cl(h),{coordinate:b}=h;return xk(m,Object.assign({elements:jl,datum:y,groupKey:n?t=>n(h)(y(t)):void 0,state:Fl(g,["active"]),scaleFactor:r,shadow:o,shadowColor:i,shadowBlur:a,shadowOffsetX:s,shadowOffsetY:c,zIndex:l,delay:e,emitter:d,coordinate:b},u))}}Ok.props={reapplyWhenUpdate:!0};var wk=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};function jk(t,{elements:e,datum:n,groupKey:r=t=>t,regionGroupKey:o=t=>t,link:i=!1,single:a=!1,multipleSelectHotkey:s,coordinate:c,background:l=!1,scale:u,emitter:f,state:d={},region:p=!1,regionEleFilter:h=t=>Zl.includes(t.markType)}){var g;const m=e(t),y=new Set(m),b=Jl({elementsof:e,root:t,coordinate:c,scale:u}),v=C(m,r),x=C(m,o),O=Dl(m,n),[w,j]=$l(Object.assign({link:i,elements:m,valueof:O,coordinate:c},xt(d.selected,"link"))),[k,A]=Hl(Object.assign({document:t.ownerDocument,background:l,coordinate:c,scale:u,valueof:O},xt(d.selected,"background"))),M=(0,N.A)(d,{selected:Object.assign({},(null===(g=d.selected)||void 0===g?void 0:g.offset)&&{transform:(...t)=>{const e=d.selected.offset(...t),[,n]=t;return Wl(m[n],e,c)}})}),_=Il(M,m),{updateState:S,removeState:E,hasState:P}=_(O);let L=!a,z=null;const T=(t=!0)=>{for(const t of m)E(t,"selected","unselected"),j(t),A(t);t&&f.emit("element:unselect",{nativeEvent:!0})},B=({event:t,element:e,nativeEvent:o=!0,filter:i=t=>!0,groupBy:a=r,groupMap:s=v})=>{const c=m.filter(i);if(P(e,"selected"))T();else{const r=a(e),i=s.get(r),l=new Set(i);for(const t of c)l.has(t)?S(t,"selected"):(S(t,"unselected"),j(t)),t!==e&&A(t);if(w(i),k(e),!o)return;f.emit("element:select",Object.assign(Object.assign({},t),{nativeEvent:o,data:{data:[n(e),...i.map(n)]}}))}},I=({event:t,element:e,nativeEvent:o=!0,filter:a=t=>!0,groupBy:s=r,groupMap:c=v})=>{const l=s(e),u=c.get(l),d=new Set(u),p=m.filter(a);if(P(e,"selected")){const t=m.some(t=>!d.has(t)&&P(t,"selected"));if(!t)return T();for(const t of u)S(t,"unselected"),j(t),A(t)}else{const t=u.some(t=>P(t,"selected"));for(const t of p)d.has(t)?S(t,"selected"):P(t,"selected")||S(t,"unselected");!t&&i&&w(u),k(e)}o&&f.emit("element:select",Object.assign(Object.assign({},t),{nativeEvent:o,data:{data:m.filter(t=>P(t,"selected")).map(n)}}))},R=t=>{if(y.has(t))return t;for(const e of y){let n=null;if(ml(e,r=>{r===t&&(n=e)}),n)return n}return t},F=t=>{const{target:e,nativeEvent:n=!0}=t,i=L?I:B;let a=e;const s=(t=>{if(y.has(t))return!0;for(const e of y)if(ml(e,e=>e===t))return!0;return!1})(e);return!p||s?s?i({event:t,element:R(a),nativeEvent:n,groupBy:r}):T():(a=b(t),y.has(a)?i({event:t,element:a,nativeEvent:n,filter:h,groupBy:o,groupMap:x}):T())},D=Array.isArray(s)?s:[s],$=t=>{D.includes(t.code)&&!z&&(z=t.code,L=!0)},W=t=>{t.code===z&&(z=null,L=!1)};t.addEventListener("click",F),s&&(L=!1,document.addEventListener("keydown",$),document.addEventListener("keyup",W));const H=t=>{const{nativeEvent:e,data:r}=t;if(e)return;const o=L?r.data:r.data.slice(0,1);for(const t of o){const e=Xl(m,t,n);F({target:e,nativeEvent:!1})}},q=()=>{T(!1)};return f.on("element:select",H),f.on("element:unselect",q),()=>{for(const t of m)j(t);t.removeEventListener("click",F),s&&(document.removeEventListener("keydown",$),document.removeEventListener("keyup",W)),f.off("element:select",H),f.off("element:unselect",q)}}function kk(t){var{createGroup:e,createRegionGroup:n,background:r=!1,link:o=!1}=t,i=wk(t,["createGroup","createRegionGroup","background","link"]);return(t,a,s)=>{const{container:c,view:l,options:u}=t,{coordinate:f,scale:d}=l;return jk(Ml(c),Object.assign({elements:jl,datum:Cl(l),groupKey:e?e(l):void 0,regionGroupKey:n?n(l):t=>t.__data__.x,coordinate:f,scale:d,state:Fl(u,[["selected",r?{}:{lineWidth:"1",stroke:"#000"}],"unselected"]),background:r,link:o,emitter:s},i))}}function Ak(t){return kk(Object.assign(Object.assign({},t),{createGroup:Ll}))}function Mk(t){return kk(Object.assign(Object.assign({},t),{createGroup:Pl}))}function _k({wait:t=30,leading:e,trailing:n=!1}){return r=>{const{update:o,setState:i,container:a}=r,s=Ml(a),c=gh(t=>{const e=Sl(s,t);if(!e)return i("fisheye"),void o();i("fisheye",t=>{const n=(0,N.A)({},t,{interaction:{tooltip:{preserve:!0}}});for(const t of n.marks)t.animate=!1;const[r,o]=e,i=function(t){const{coordinate:e={}}=t,{transform:n=[]}=e,r=n.find(t=>"fisheye"===t.type);if(r)return r;const o={type:"fisheye"};return n.push(o),e.transform=n,t.coordinate=e,o}(n);return i.focusX=r,i.focusY=o,i.visual=!0,n}),o()},t,{leading:e,trailing:n});return s.addEventListener("pointerenter",c),s.addEventListener("pointermove",c),s.addEventListener("pointerleave",c),()=>{s.removeEventListener("pointerenter",c),s.removeEventListener("pointermove",c),s.removeEventListener("pointerleave",c)}}}kk.props={reapplyWhenUpdate:!0},Ak.props={reapplyWhenUpdate:!0},Mk.props={reapplyWhenUpdate:!0};var Sk=function(t,e,n,r){return new(n||(n=Promise))(function(o,i){function a(t){try{c(r.next(t))}catch(t){i(t)}}function s(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){t.done?o(t.value):function(t){return t instanceof n?t:new n(function(e){e(t)})}(t.value).then(a,s)}c((r=r.apply(t,e||[])).next())})},Ek=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};function Pk(t){var{wait:e=20,leading:n,trailing:r=!1,labelFormatter:o=t=>`${t}`}=t,i=Ek(t,["wait","leading","trailing","labelFormatter"]);return t=>{const{view:a,container:s,update:c,setState:u}=t,{markState:f,scale:d,coordinate:p}=a,h=function(t,e,n){const[r]=Array.from(t.entries()).filter(([t])=>t.type===e).map(([t])=>{const{encode:e}=t;return Object.fromEntries(n.map(t=>{const n=e[t];return[t,n?n.value:void 0]}))});return r}(f,"line",["x","y","series"]);if(!h)return;const{y:g,x:m,series:y=[]}=h,b=g.map((t,e)=>e),v=Pc(b.map(t=>m[t])),x=Ml(s),O=s.getElementsByClassName(Xc),w=C(s.getElementsByClassName("label"),t=>t.__data__.key.split("-")[0]),j=new l.N1({style:Object.assign({x1:0,y1:0,x2:0,y2:x.getAttribute("height"),stroke:"black",lineWidth:1},xt(i,"rule"))}),k=new l.EY({style:Object.assign({x:0,y:x.getAttribute("height"),text:"",fontSize:10},xt(i,"label"))});j.append(k),x.appendChild(j);const A=(t,e,n)=>{const[r]=t.invert(n),o=e.invert(r);return v[(0,il.WD)(v,o)]},M=(t,e)=>{j.setAttribute("x1",t[0]),j.setAttribute("x2",t[0]),k.setAttribute("text",o(e))};let _;const S=gh(t=>{const e=Sl(x,t);e&&(t=>{const{scale:e,coordinate:n}=_,{x:r,y:o}=e,i=A(n,r,t);M(t,i);for(const t of O){const{seriesIndex:e,key:r}=t.__data__,a=e[(0,rl.A)(t=>m[+t]).center(e,i)],s=[0,o.map(1)],c=[0,o.map(g[a]/g[e[0]])],[,l]=n.map(s),[,u]=n.map(c),f=l-u;t.setAttribute("transform",`translate(0, ${f})`);const d=w.get(r)||[];for(const t of d)t.setAttribute("dy",f)}})(e)},e,{leading:n,trailing:r});return(t=>{Sk(this,void 0,void 0,function*(){const{x:e}=d,n=A(p,e,t);M(t,n),u("chartIndex",t=>{const e=(0,N.A)({},t),r=e.marks.find(t=>"line"===t.type),o=Ye(T(b,t=>Ye(t,t=>+g[t])/ep(t,t=>+g[t]),t=>y[t]).values());(0,N.A)(r,{scale:{y:{domain:[1/o,o]}}});const i=function(t){const{transform:e=[]}=t,n=e.find(t=>"normalizeY"===t.type);if(n)return n;const r={type:"normalizeY"};return e.push(r),t.transform=e,r}(r);i.groupBy="color",i.basis=(t,e)=>e[t[(0,rl.A)(t=>m[+t]).center(t,n)]];for(const t of e.marks)t.animate=!1;return e});const r=yield c("chartIndex");_=r.view})})([0,0]),x.addEventListener("pointerenter",S),x.addEventListener("pointermove",S),x.addEventListener("pointerleave",S),()=>{j.remove(),x.removeEventListener("pointerenter",S),x.removeEventListener("pointermove",S),x.removeEventListener("pointerleave",S)}}}function Lk(){return(t,e,n)=>{const{container:r,view:o,options:i}=t,a=Ww(r),s=jl(r),c=t=>qw(t).scales[0].name,l=t=>{const{scale:{[t]:e}}=o;return e},u=Fl(i,["active","inactive"]),f=Dl(s,Cl(o)),d=[];for(const t of a){const e=e=>{const{data:n}=t.attributes,{__data__:r}=e,{index:o}=r;return n[o].label},r=c(t),o=$w(t),i=l(r),a=C(s,t=>i.invert(t.__data__[r])),{state:p={}}=t.attributes,{inactive:h={}}=p,{setState:g,removeState:m}=Nl(u,f),y={inactive:xt(h,"marker")},b={inactive:xt(h,"label")},{setState:v,removeState:x}=Nl(y),{setState:O,removeState:w}=Nl(b),j=t=>{for(const e of o){const n=Rw(e),r=Fw(e);e===t||null===t?(x(n,"inactive"),w(r,"inactive")):(v(n,"inactive"),O(r,"inactive"))}},k=(t,o)=>{const i=e(o),c=new Set(a.get(i));for(const t of s)c.has(t)?g(t,"active"):g(t,"inactive");j(o);const{nativeEvent:l=!0}=t;l&&n.emit("legend:highlight",Object.assign(Object.assign({},t),{nativeEvent:l,data:{channel:r,value:i}}))},A=new Map;for(const t of o){const e=e=>{k(e,t)};t.addEventListener("pointerover",e),A.set(t,e)}const M=t=>{for(const t of s)m(t,"inactive","active");j(null);const{nativeEvent:e=!0}=t;e&&n.emit("legend:unhighlight",{nativeEvent:e})},_=t=>{const{nativeEvent:n,data:i}=t;if(n)return;const{channel:a,value:s}=i;if(a!==r)return;const c=o.find(t=>e(t)===s);c&&k({nativeEvent:!1},c)},S=t=>{const{nativeEvent:e}=t;e||M({nativeEvent:!1})};t.addEventListener("pointerleave",M),n.on("legend:highlight",_),n.on("legend:unhighlight",S);d.push(()=>{t.removeEventListener(M),n.off("legend:highlight",_),n.off("legend:unhighlight",S);for(const[t,e]of A)t.removeEventListener(e)})}return()=>d.forEach(t=>t())}}Pk.props={reapplyWhenUpdate:!0};var Ck=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};function zk(t,e){const[n,r,o,i]=t,[a,s,c,l]=e;return!(a>o||c<n||s>i||l<r)}function Tk(t){const{width:e,height:n}=t.getBBox();return[0,0,e,n]}function Bk(t,e){for(const[n,r]of Object.entries(e))t.style(n,r)}const Ik=fc(t=>{const e=t.attributes,{x:n,y:r,width:o,height:i,class:a,renders:s={},handleSize:c=10,document:l}=e,u=Ck(e,["x","y","width","height","class","renders","handleSize","document"]);if(!l||void 0===o||void 0===i||void 0===n||void 0===r)return;const f=c/2,d=(t,e,n)=>{t.handle||(t.handle=n.createElement("rect"),t.append(t.handle));const{handle:r}=t;return r.attr(e),r},p=xt(wt(u,"handleNW","handleNE"),"handleN"),{render:h=d}=p,g=Ck(p,["render"]),m=xt(u,"handleE"),{render:y=d}=m,b=Ck(m,["render"]),v=xt(wt(u,"handleSE","handleSW"),"handleS"),{render:x=d}=v,O=Ck(v,["render"]),w=xt(u,"handleW"),{render:j=d}=w,k=Ck(w,["render"]),A=xt(u,"handleNW"),{render:M=d}=A,_=Ck(A,["render"]),S=xt(u,"handleNE"),{render:E=d}=S,P=Ck(S,["render"]),L=xt(u,"handleSE"),{render:C=d}=L,z=Ck(L,["render"]),T=xt(u,"handleSW"),{render:B=d}=T,I=Ck(T,["render"]),N=t=>()=>{const e=fc(e=>((t,e)=>{const{id:n}=t,r=e(t,t.attributes,l);r.id=n,r.style.draggable=!0})(e,t));return new e({})},R=_t(t).attr("className",a).style("transform",`translate(${n}, ${r})`).style("draggable",!0);R.maybeAppend("selection","rect").style("draggable",!0).style("fill","transparent").call(Bk,Object.assign(Object.assign({width:o,height:i},wt(u,"handle")),{transform:void 0})),R.maybeAppend("handle-n",N(h)).style("x",f).style("y",-f).style("width",o-c).style("height",c).style("fill","transparent").call(Bk,g),R.maybeAppend("handle-e",N(y)).style("x",o-f).style("y",f).style("width",c).style("height",i-c).style("fill","transparent").call(Bk,b),R.maybeAppend("handle-s",N(x)).style("x",f).style("y",i-f).style("width",o-c).style("height",c).style("fill","transparent").call(Bk,O),R.maybeAppend("handle-w",N(j)).style("x",-f).style("y",f).style("width",c).style("height",i-c).style("fill","transparent").call(Bk,k),R.maybeAppend("handle-nw",N(M)).style("x",-f).style("y",-f).style("width",c).style("height",c).style("fill","transparent").call(Bk,_),R.maybeAppend("handle-ne",N(E)).style("x",o-f).style("y",-f).style("width",c).style("height",c).style("fill","transparent").call(Bk,P),R.maybeAppend("handle-se",N(C)).style("x",o-f).style("y",i-f).style("width",c).style("height",c).style("fill","transparent").call(Bk,z),R.maybeAppend("handle-sw",N(B)).style("x",-f).style("y",i-f).style("width",c).style("height",c).style("fill","transparent").call(Bk,I)});function Nk(t,e){var{brushed:n=()=>{},brushended:r=()=>{},brushcreated:o=()=>{},brushstarted:i=()=>{},brushupdated:a=()=>{},extent:s=Tk(t),brushRegion:c=(t,e,n,r,o)=>[t,e,n,r],reverse:u=!1,fill:f="#777",fillOpacity:d="0.3",stroke:p="#fff",selectedHandles:h=["handle-n","handle-e","handle-s","handle-w","handle-nw","handle-ne","handle-se","handle-sw"]}=e,g=Ck(e,["brushed","brushended","brushcreated","brushstarted","brushupdated","extent","brushRegion","reverse","fill","fillOpacity","stroke","selectedHandles"]);let m=null,y=null,b=null,v=null,x=null,O=!1;const[w,j,k,A]=s;ql(t,"crosshair"),t.style.draggable=!0;const M=(t,e,n)=>{if(i(n),v&&v.remove(),x&&x.remove(),m=[t,e],u)return _();S()},_=()=>{x=new l.wA({style:Object.assign(Object.assign({},g),{fill:f,fillOpacity:d,stroke:p,pointerEvents:"none"})}),v=new Ik({style:{x:0,y:0,width:0,height:0,draggable:!0,document:t.ownerDocument},className:"mask"}),t.appendChild(x),t.appendChild(v)},S=()=>{v=new Ik({style:Object.assign(Object.assign({document:t.ownerDocument,x:0,y:0},g),{fill:f,fillOpacity:d,stroke:p,draggable:!0}),className:"mask"}),t.appendChild(v)},E=(t=!0)=>{v&&v.remove(),x&&x.remove(),m=null,y=null,b=null,O=!1,v=null,x=null,r(t)},P=(t,e,r=!0)=>{const[o,i,a,l]=function(t,e,n,r,o){const[i,a,s,c]=o;return[Math.max(i,Math.min(t,n)),Math.max(a,Math.min(e,r)),Math.min(s,Math.max(t,n)),Math.min(c,Math.max(e,r))]}(t[0],t[1],e[0],e[1],s),[f,d,p,h]=c(o,i,a,l,s);return u?C(f,d,p,h):L(f,d,p,h),n(f,d,p,h,r),[f,d,p,h]},L=(t,e,n,r)=>{v.style.x=t,v.style.y=e,v.style.width=n-t,v.style.height=r-e},C=(t,e,n,r)=>{x.style.d=`\n M${w},${j}L${k},${j}L${k},${A}L${w},${A}Z\n M${t},${e}L${t},${r}L${n},${r}L${n},${e}Z\n `,v.style.x=t,v.style.y=e,v.style.width=n-t,v.style.height=r-e},z={"handle-n":{vector:[0,1,0,0],cursor:"ns-resize"},"handle-e":{vector:[0,0,1,0],cursor:"ew-resize"},"handle-s":{vector:[0,0,0,1],cursor:"ns-resize"},"handle-w":{vector:[1,0,0,0],cursor:"ew-resize"},"handle-nw":{vector:[1,1,0,0],cursor:"nwse-resize"},"handle-ne":{vector:[0,1,1,0],cursor:"nesw-resize"},"handle-se":{vector:[0,0,1,1],cursor:"nwse-resize"},"handle-sw":{vector:[1,0,0,1],cursor:"nesw-resize"}},T=t=>I(t)||B(t),B=t=>{const{id:e}=t;return-1!==h.indexOf(e)&&new Set(Object.keys(z)).has(e)},I=t=>t===v.getElementById("selection"),N=e=>{const{target:n}=e,[r,o]=El(t,e);if(!v||!T(n))return M(r,o,e),void(O=!0);T(n)&&(b=[r,o])},R=e=>{const{target:n}=e,r=El(t,e);if(!m)return;if(!b)return P(m,r);if(I(n))return(t=>{const e=(t,e,n,r,o)=>t+e<r?r-e:t+n>o?o-n:t,n=t[1]-b[1],r=e(t[0]-b[0],m[0],y[0],w,k),o=e(n,m[1],y[1],j,A);P([m[0]+r,m[1]+o],[y[0]+r,y[1]+o])})(r);const[o,i]=[r[0]-b[0],r[1]-b[1]],{id:a}=n;if(z[a]){const[t,e,n,r]=z[a].vector;return P([m[0]+o*t,m[1]+i*e],[y[0]+o*n,y[1]+i*r])}},F=e=>{if(b){b=null;const{x:t,y:n,width:r,height:o}=v.style;return m=[t,n],y=[t+r,n+o],void a(t,n,t+r,n+o,e)}y=El(t,e);const[n,r,i,s]=P(m,y);O=!1,o(n,r,i,s,e)},D=t=>{const{target:e}=t;v&&!T(e)&&E()},$=e=>{const{target:n}=e;v&&T(n)&&!O?I(n)?ql(t,"move"):B(n)&&ql(t,z[n.id].cursor):ql(t,"crosshair")},W=()=>{ql(t,"default")};return t.addEventListener("dragstart",N),t.addEventListener("drag",R),t.addEventListener("dragend",F),t.addEventListener("click",D),t.addEventListener("pointermove",$),t.addEventListener("pointerleave",W),{mask:v,move(t,e,n,r,o=!0){v||M(t,e,{}),m=[t,e],y=[n,r],P([t,e],[n,r],o)},remove(t=!0){v&&E(t)},destroy(){v&&E(!1),ql(t,"default"),t.removeEventListener("dragstart",N),t.removeEventListener("drag",R),t.removeEventListener("dragend",F),t.removeEventListener("click",D),t.removeEventListener("pointermove",$),t.removeEventListener("pointerleave",W)}}}function Rk(t,e,n){return e.filter(e=>{if(e===t)return!1;const{interaction:r={}}=e.options;return Object.values(r).find(t=>t.brushKey===n)})}function Fk(t,e,n){return Rk(t,e,n).map(t=>t.options)}function Dk(t,e){var{elements:n,selectedHandles:r,siblings:o=t=>[],datum:i,brushRegion:a,extent:s,reverse:c,scale:u,coordinate:f,series:d=!1,key:p=t=>t,bboxOf:h=t=>{const{x:e,y:n,width:r,height:o}=t.style;return{x:e,y:n,width:r,height:o}},state:g={},emitter:m}=e,y=Ck(e,["elements","selectedHandles","siblings","datum","brushRegion","extent","reverse","scale","coordinate","series","key","bboxOf","state","emitter"]);const b=n(t),v=o(t),x=v.flatMap(n),O=Dl(b,i),w=xt(y,"mask"),{setState:j,removeState:k}=Nl(g,O),A=new Map,{width:M,height:_,x:S=0,y:E=0}=h(t),P=s||[0,0,M,_],L=()=>{for(const t of[...b,...x])k(t,"active","inactive")},C=(t,e,n,r)=>{var o;for(const t of v)null===(o=t.brush)||void 0===o||o.remove();const i=new Set;for(const o of b){const{min:a,max:s}=o.getLocalBounds(),[c,l]=a,[u,f]=s;zk([c,l,u,f],[t,e,n,r])?(j(o,"active"),i.add(p(o))):j(o,"inactive")}for(const t of x)i.has(p(t))?j(t,"active"):j(t,"inactive")},z=()=>{for(const t of b)k(t,"inactive");for(const t of A.values())t.remove();A.clear()},T=(e,n,r,o)=>{const i=t=>{const e=t.cloneNode();return e.__data__=t.__data__,t.parentNode.appendChild(e),A.set(t,e),e},a=new l.rw({style:{x:e+S,y:n+E,width:r-e,height:o-n}});t.appendChild(a);for(const t of b){const e=A.get(t)||i(t);e.style.clipPath=a,j(t,"inactive"),j(e,"active")}},B=Nk(t,Object.assign(Object.assign({},w),{extent:P,brushRegion:a,reverse:c,selectedHandles:r,brushended:t=>{const e=d?z:L;t&&m.emit("brush:remove",{nativeEvent:!0}),e()},brushed:(t,e,n,r,o)=>{const i=ll(t,e,n,r,u,f);o&&m.emit("brush:highlight",{nativeEvent:!0,data:{selection:i}});(d?T:C)(t,e,n,r)},brushcreated:(t,e,n,r,o)=>{const i=ll(t,e,n,r,u,f);m.emit("brush:end",Object.assign(Object.assign({},o),{nativeEvent:!0,data:{selection:i}}))},brushupdated:(t,e,n,r,o)=>{const i=ll(t,e,n,r,u,f);m.emit("brush:end",Object.assign(Object.assign({},o),{nativeEvent:!0,data:{selection:i}}))},brushstarted:t=>{m.emit("brush:start",t)}})),I=({nativeEvent:t,data:e})=>{if(t)return;const{selection:n}=e,[r,o,i,a]=function(t,e,n){const{x:r,y:o}=e,[i,a]=t,s=ul(i,r),c=ul(a,o),l=[s[0],c[0]],u=[s[1],c[1]],[f,d]=n.map(l),[p,h]=n.map(u);return[f,d,p,h]}(n,u,f);B.move(r,o,i,a,!1)};m.on("brush:highlight",I);const N=({nativeEvent:t}={})=>{t||B.remove(!1)};m.on("brush:remove",N);const R=B.destroy.bind(B);return B.destroy=()=>{m.off("brush:highlight",I),m.off("brush:remove",N),R()},B}function $k(t){var{facet:e,brushKey:n}=t,r=Ck(t,["facet","brushKey"]);return(t,o,i)=>{const{container:a,view:s,options:c}=t,l=Ml(a),u={maskFill:"#777",maskFillOpacity:"0.3",maskStroke:"#fff",reverse:!1},f=["active",["inactive",{opacity:.5}]],{scale:d,coordinate:p}=s;if(e){const e=l.getBounds(),n=e.min[0],a=e.min[1],s=e.max[0],c=e.max[1];return Dk(l.parentNode.parentNode,Object.assign(Object.assign({elements:()=>kl(t,o),datum:Cl(Al(t,o).map(t=>t.view)),brushRegion:(t,e,n,r)=>[t,e,n,r],extent:[n,a,s,c],state:Fl(Al(t,o).map(t=>t.options),f),emitter:i,scale:d,coordinate:p,selectedHandles:void 0},u),r))}const h=Dk(l,Object.assign(Object.assign({elements:jl,key:t=>t.__data__.key,siblings:()=>function(t,e,n){return Rk(t,e,n).map(t=>Ml(t.container))}(t,o,n),datum:Cl([s,...Rk(t,o,n).map(t=>t.view)]),brushRegion:(t,e,n,r)=>[t,e,n,r],extent:void 0,state:Fl([c,...Fk(t,o,n)],f),emitter:i,scale:d,coordinate:p,selectedHandles:void 0},u),r));return l.brush=h,()=>h.destroy()}}function Wk(t,e,n,r,o){const[,i,,a]=o;return[t,i,n,a]}function Hk(t){return $k(Object.assign(Object.assign({},t),{brushRegion:Wk,selectedHandles:["handle-e","handle-w"]}))}function qk(t,e,n,r,o){const[i,,a]=o;return[i,e,a,r]}function Yk(t){return $k(Object.assign(Object.assign({},t),{brushRegion:qk,selectedHandles:["handle-n","handle-s"]}))}$k.props={reapplyWhenUpdate:!0};var Xk=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const Gk="axis-hot-area";function Vk(t){return t.getElementsByClassName("axis")}function Kk(t){return t.getElementsByClassName("axis-line")[0]}function Uk(t){return function(t){return t.getElementsByClassName("axis-main-group")[0]}(t).getLocalBounds()}function Zk(t,e){var{cross:n,offsetX:r}=e,o=Xk(e,["cross","offsetX","offsetY"]);const i=Uk(t),a=Kk(t),[s]=a.getLocalBounds().min,[c,u]=i.min,[f,d]=i.max,p=2*(f-c);return{brushRegion:qk,hotZone:new l.rw({className:Gk,style:Object.assign({width:n?p/2:p,transform:`translate(${(n?c:s-p/2).toFixed(2)}, ${u})`,height:d-u},o)}),extent:n?(t,e,n,r)=>[-1/0,e,1/0,r]:(t,e,n,o)=>[Math.floor(c-r),e,Math.ceil(f-r),o]}}function Jk(t,e){var{offsetY:n,cross:r=!1}=e,o=Xk(e,["offsetY","offsetX","cross"]);const i=Uk(t),a=Kk(t),[,s]=a.getLocalBounds().min,[c,u]=i.min,[f,d]=i.max,p=d-u;return{brushRegion:Wk,hotZone:new l.rw({className:Gk,style:Object.assign({width:f-c,height:r?p:2*p,transform:`translate(${c}, ${r?u:s-p})`},o)}),extent:r?(t,e,n,r)=>[t,-1/0,n,1/0]:(t,e,r,o)=>[t,Math.floor(u-n),r,Math.ceil(d-n)]}}function Qk(t){return(e,n,r)=>{const{container:o,view:i,options:a}=e,s=Ml(o),{x:c,y:l}=s.getBBox(),{coordinate:u}=i;return function(t,e){var{axes:n,elements:r,points:o,horizontal:i,datum:a,offsetY:s,offsetX:c,reverse:l=!1,state:u={},emitter:f,coordinate:d}=e,p=Xk(e,["axes","elements","points","horizontal","datum","offsetY","offsetX","reverse","state","emitter","coordinate"]);const h=r(t),g=n(t),m=Dl(h,a),{setState:y,removeState:b}=Nl(u,m),v=new Map,x=xt(p,"mask"),O=t=>Array.from(v.values()).every(([e,n,r,o])=>t.some(([t,i])=>t>=e&&t<=r&&i>=n&&i<=o)),w=g.map(t=>t.attributes.scale),j=t=>t.length>2?[t[0],t[t.length-1]]:t,k=new Map,A=()=>{k.clear();for(let t=0;t<g.length;t++){const e=w[t],{domain:n}=e.getOptions();k.set(t,j(n))}};A();const M=(t,e)=>{const n=[];for(const t of h){const e=o(t);O(e)?(y(t,"active"),n.push(t)):y(t,"inactive")}k.set(t,S(n,t)),e&&f.emit("brushAxis:highlight",{nativeEvent:!0,data:{selection:(()=>{if(!E)return Array.from(k.values());const t=[];for(const[e,n]of k){const r=w[e],{name:o}=r.getOptions();"x"===o?t[0]=n:t[1]=n}return t})()}})},_=t=>{for(const t of h)b(t,"active","inactive");A(),t&&f.emit("brushAxis:remove",{nativeEvent:!0})},S=(t,e)=>{const n=w[e],{name:r}=n.getOptions(),o=t.map(t=>n.invert(t.__data__[r]));return j(cl(n,o))},E=g.some(i)&&g.some(t=>!i(t)),P=[];for(let t=0;t<g.length;t++){const e=g[t],n=i(e)?Jk:Zk,{hotZone:r,brushRegion:o,extent:a}=n(e,{offsetY:s,offsetX:c,cross:E,zIndex:999,fill:"transparent"});e.parentNode.appendChild(r);const u=Nk(r,Object.assign(Object.assign({},x),{reverse:l,brushRegion:o,brushended(n){v.delete(e),0===Array.from(v.entries()).length?_(n):M(t,n)},brushed(n,r,o,i,s){v.set(e,a(n,r,o,i)),M(t,s)}}));P.push(u)}const L=(t={})=>{const{nativeEvent:e}=t;e||P.forEach(t=>t.remove(!1))},C=(t,e,n)=>{const[r,o]=t,a=z(r,e,n),s=z(o,e,n)+(t=>t.getStep?t.getStep():0)(e);return i(n)?[a,-1/0,s,1/0]:[-1/0,a,1/0,s]},z=(t,e,n)=>{const{height:r,width:o}=d.getOptions(),a=e.clone();return i(n)?a.update({range:[0,o]}):a.update({range:[r,0]}),a.map(t)},T=t=>{const{nativeEvent:e}=t;if(e)return;const{selection:n}=t.data;for(let t=0;t<P.length;t++){const e=n[t],r=P[t];e?r.move(...C(e,w[t],g[t]),!1):r.remove(!1)}};return f.on("brushAxis:remove",L),f.on("brushAxis:highlight",T),()=>{P.forEach(t=>t.destroy()),f.off("brushAxis:remove",L),f.off("brushAxis:highlight",T)}}(o,Object.assign({elements:jl,axes:Vk,offsetY:l,offsetX:c,points:t=>t.__data__.points,horizontal:t=>{const{startPos:[e,n],endPos:[r,o]}=t.attributes;return e!==r&&n===o},datum:Cl(i),state:Fl(a,["active",["inactive",{opacity:.5}]]),coordinate:u,emitter:r},t))}}var tA=function(t,e,n,r){return new(n||(n=Promise))(function(o,i){function a(t){try{c(r.next(t))}catch(t){i(t)}}function s(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){t.done?o(t.value):function(t){return t instanceof n?t:new n(function(e){e(t)})}(t.value).then(a,s)}c((r=r.apply(t,e||[])).next())})},eA=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};function nA(t){var{hideX:e=!0,hideY:n=!0}=t,r=eA(t,["hideX","hideY"]);return(t,o,i)=>{const{container:a,view:s,options:c,update:l,setState:u}=t,f=Ml(a);let d=!1,p=!1,h=s;const{scale:g,coordinate:m}=s;return function(t,e){var{filter:n,reset:r,brushRegion:o,extent:i,reverse:a,emitter:s,selection:c,series:l=!1}=e;const u=xt(eA(e,["filter","reset","brushRegion","extent","reverse","emitter","scale","coordinate","selection","series"]),"mask"),{width:f,height:d}=t.getBBox(),p=i||[0,0,f,d],h=function(t=300){let e=null;return n=>{const{timeStamp:r}=n;return null!==e&&r-e<t?(e=r,!0):(e=r,!1)}}(),g=Nk(t,Object.assign(Object.assign({},u),{extent:p,brushRegion:o,reverse:a,brushcreated:function(t,e,r,o,i){t===r&&e===o||(i.nativeEvent=!0,n(c(t,e,r,o),i),g.remove())}}));function m(t){h(t)&&(t.nativeEvent=!0,r(t))}t.addEventListener("click",m);const y=({nativeEvent:t,data:e})=>{if(t)return;const{selection:r}=e;n(r,{nativeEvent:!1})};return s.on("brush:filter",y),()=>{g.destroy(),s.off("brush:filter",y),t.removeEventListener("click",m)}}(f,Object.assign(Object.assign({brushRegion:(t,e,n,r)=>[t,e,n,r],selection:(t,e,n,r)=>{const{scale:o,coordinate:i}=h;return ll(t,e,n,r,o,i)},filter:(t,r)=>tA(this,void 0,void 0,function*(){if(p)return;p=!0;const[o,a]=t;u("brushFilter",t=>{const{marks:r}=t,i=r.map(t=>(0,N.A)({axis:Object.assign(Object.assign({},e&&{x:{transform:[{type:"hide"}]}}),n&&{y:{transform:[{type:"hide"}]}})},t,{scale:{x:{domain:o,nice:!1},y:{domain:a,nice:!1}}}));return Object.assign(Object.assign({},c),{marks:i,clip:!0})}),i.emit("brush:filter",Object.assign(Object.assign({},r),{data:{selection:[o,a]}}));const s=yield l();h=s.view,p=!1,d=!0}),reset:t=>{if(p||!d)return;const{scale:e}=s,{x:n,y:r}=e,o=n.getOptions().domain,a=r.getOptions().domain;i.emit("brush:filter",Object.assign(Object.assign({},t),{data:{selection:[o,a]}})),d=!1,h=s,u("brushFilter"),l()},extent:void 0,emitter:i,scale:g,coordinate:m},{maskFill:"#777",maskFillOpacity:"0.3",maskStroke:"#fff",unhighlightedOpacity:.5,reverse:!1}),r))}}function rA(t){return nA(Object.assign(Object.assign({hideX:!0},t),{brushRegion:Wk}))}function oA(t){return nA(Object.assign(Object.assign({hideY:!0},t),{brushRegion:qk}))}function iA(t,e,n){const r=t?n:e,o=t?e:n,i=al(r),a=al(o),s=o.getOptions().domain;return{currentScale:r,targetScale:o,isSourceDiscrete:i,isTargetDiscrete:a,shouldPreserveZeroBaseline:!a&&s&&s.length>=2&&0===s[0]}}function aA({isTargetDiscrete:t,filteredValues:e,shouldPreserveZeroBaseline:n}){if(t)return Array.from(new Set(e)).sort((t,e)=>t-e);{const t=Math.min(...e),r=Math.max(...e);return n?[0,r]:[t,r]}}function sA(t){return t instanceof Date?t.getTime():"string"==typeof t?parseFloat(t):Number(t)}function cA(t,e,n,r,o,i="filter",a=!1){if(tu(i))return[];const s=a?"y":"x",c=a?"x":"y",l=[];for(const r of t){const{channelData:t}=r,o=t[s]||[],a=t[c]||[],u=Array.isArray(o[0])?o[0]:o,f=Array.isArray(a[0]);if(0===u.length)continue;const d=u.length;for(let t=0;t<d;t++){const r=u[t];let o=!1;if(n)o=e.includes(r);else if(e.length>=2){const t=sA(r),n=sA(e[0]),i=sA(e[e.length-1]);isNaN(t)||isNaN(n)||isNaN(i)||(o=t>=n&&t<=i)}if("filter"===i&&o)if(f){const e=a.length;for(let n=0;n<e;n++){const e=a[n];if(Array.isArray(e)&&t<e.length){const n=sA(e[t]);isNaN(n)||l.push(n)}}}else if(t<a.length){const e=sA(a[t]);isNaN(e)||l.push(e)}}}return l.length>0?aA({isTargetDiscrete:r,filteredValues:l,shouldPreserveZeroBaseline:o}):[]}function lA(t,e,n,r){r&&e instanceof Map?e.forEach((e,n)=>{e&&Array.isArray(e)&&e.length>0&&(t[n]=e)}):!r&&Array.isArray(e)&&e.length>0&&(t[n?"x":"y"]=e)}var uA=function(t,e,n,r){return new(n||(n=Promise))(function(o,i){function a(t){try{c(r.next(t))}catch(t){i(t)}}function s(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){t.done?o(t.value):function(t){return t instanceof n?t:new n(function(e){e(t)})}(t.value).then(a,s)}c((r=r.apply(t,e||[])).next())})};function fA(t){var e,n,r,o;if(!(null==t?void 0:t.markState))return 0;let i=0;for(const[a,s]of t.markState.entries()){if("point"!==a.type||!(null==s?void 0:s.channels))continue;const t=null===(e=s.channels)||void 0===e?void 0:e.find(t=>"size"===t.name);if(t){if((null===(r=null===(n=t.scale)||void 0===n?void 0:n.range)||void 0===r?void 0:r.length)>0){const e=Math.max(...t.scale.range.filter(t=>"number"==typeof t));i=Math.max(i,e);continue}if((null===(o=t.values)||void 0===o?void 0:o.length)>0){const e=t.values.filter(t=>void 0!==t.value).flatMap(t=>Array.isArray(t.value)?t.value:[t.value]).filter(t=>"number"==typeof t&&!isNaN(t));e.length>0&&(i=Math.max(i,...e))}}}return i}function dA(t,e,n,r,o,i,a){if(a){const s=i?r:o.x,c=i?o.y:r;t.emit(e,Object.assign(Object.assign({},n),{nativeEvent:a,data:{selection:[gA(s),gA(c)]}}))}}function pA(t,e,n,r){const{domain0:o,filteredDomain:i,channel0:a,channel1:s,prefix:c,hasState:l,isMultiAxis:u,markToScaleMap:f,enableAdaptiveFiltering:d}=r;u&&i instanceof Map?t(e,t=>Object.assign({},function(t,e,n,r,o=!1,i="x",a="y",s=new Map,c=new Map){const{marks:l}=t,u=fA(e),f=l.map(t=>{var e,l;const u="string"==typeof(null==t?void 0:t.key)?t.key:String((null==t?void 0:t.key)||""),f=s.get(u),d=c.get(f),p=d&&{y:Object.assign({domain:d,nice:!0},"y"!==f?{independent:!0}:void 0)};return(0,N.A)({axis:{x:{transform:[{type:"hide"}]},y:{transform:[{type:"hide"}]}}},t,{scale:Object.assign(Object.assign({},n),p),[r]:Object.assign(Object.assign({},(null===(e=t[r])||void 0===e?void 0:e[i])&&{[i]:Object.assign({preserve:!0},o&&{ratio:null})}),(null===(l=t[r])||void 0===l?void 0:l[a])&&{[a]:{preserve:!0}}),animate:!1})});return Object.assign(Object.assign({},t),{marks:f,insetLeft:u,insetRight:u,insetTop:u,insetBottom:u,clip:!0,animate:!1})}(t,n,{[a]:{domain:o,nice:!1}},c,l,a,s,f||new Map,i))):t(e,t=>Object.assign({},function(t,e,n,r,o=!1,i="x",a="y"){const{marks:s}=t,c=fA(e),l=s.map(t=>{var e,s;return(0,N.A)({axis:{x:{transform:[{type:"hide"}]},y:{transform:[{type:"hide"}]}}},t,{scale:n,[r]:Object.assign(Object.assign({},(null===(e=t[r])||void 0===e?void 0:e[i])&&{[i]:Object.assign({preserve:!0},o&&{ratio:null})}),(null===(s=t[r])||void 0===s?void 0:s[a])&&{[a]:{preserve:!0}}),animate:!1})});return Object.assign(Object.assign({},t),{marks:l,insetLeft:c,insetRight:c,insetTop:c,insetBottom:c,clip:!0,animate:!1})}(t,n,Object.assign({[a]:{domain:o,nice:!1}},d&&Array.isArray(i)?{[s]:{domain:i,nice:!0}}:{}),c,l,a,s)))}function hA(t,e,n){const[r,o]=t,i=n?t=>1-t:t=>t;return cl(e,[sl(e,i(r),!0),sl(e,i(o),!1)])}function gA(t){return[t[0],t[t.length-1]]}function mA({initDomain:t={},className:e="slider",prefix:n="slider",setValue:r=(t,e)=>t.setValues(e),hasState:o=!1,wait:i=50,leading:a=!0,trailing:s=!1,adaptiveMode:c="filter",getInitValues:u=t=>{var e;const n=null===(e=null==t?void 0:t.attributes)||void 0===e?void 0:e.values;if(0!==n[0]||1!==n[1])return n}}){return(f,d,p)=>{const{container:h,view:g,update:m,setState:y}=f,b=h.getElementsByClassName(e);if(!b.length)return()=>{};let v=!1;const{scale:x,coordinate:O}=g,{x:w,y:j}=x,k=nn(O),A=t=>{const e="vertical"===t?"y":"x",n="vertical"===t?"x":"y";return k?[n,e]:[e,n]},M=new Map,_=new Set,S=nu(g),E=function(t,e,n,r,o){var i,a,s,c;const l={x:e.x||n.getOptions().domain||[],y:e.y||r.getOptions().domain||[]},u=o||nu(t),{hasIndependentX:f,hasIndependentY:d}=u;if(f||d){let e=1,n=1;for(const[r,o]of t.markState.entries())if(null==o?void 0:o.channels){if(f){const t=o.channels.find(t=>"x"===t.name);(null===(a=null===(i=null==r?void 0:r.scale)||void 0===i?void 0:i.x)||void 0===a?void 0:a.independent)&&(l[`x${e}`]=t.scale.domain,e++)}if(d){const t=o.channels.find(t=>"y"===t.name);(null===(c=null===(s=null==r?void 0:r.scale)||void 0===s?void 0:s.y)||void 0===c?void 0:c.independent)&&(l[`y${n}`]=t.scale.domain,n++)}}}return l}(g,t,w,j,S),P=Array.from(b),L=t=>P.some(e=>{const{orientation:n}=e.attributes,[r]=A(n);return r===t}),C=L("x")&&!L("y"),z=L("y")&&!L("x"),T=!tu(c)&&(C||z);for(const t of b){const{orientation:e}=t.attributes,[f,d]=A(e),h=`${n}${Ce(f)}:filter`,b="x"===f,{ratio:O}=w.getOptions(),{ratio:P}=j.getOptions(),L=t=>{if(t.data){const{selection:e}=t.data,[n=gA(E.x),r=gA(E.y)]=e;return b?[cl(w,n,O),cl(j,r,P)]:[cl(j,r,P),cl(w,n,O)]}const{value:n}=t.detail;return[hA(n,x[f],k&&"horizontal"===e),E[d]]};let B=!1;const I=t=>{B=t,t||(v=!1)},N=vA({getFiltering:()=>B,setFiltering:I,domainsOf:L,view:g,independentScaleInfo:S,enableAdaptiveFiltering:T,hasOnlyXSlider:C,hasOnlyYSlider:z,adaptiveMode:c,scaleX:w,scaleY:j,scale:x,channelDomain:E,channel0:f,channel1:d,isX:b,emitter:p,eventName:h,setState:y,slider:t,prefix:n,hasState:o,update:m,wait:i,leading:a,trailing:s}),R=e=>{const{nativeEvent:n}=e;if(n)return;const{data:o}=e,{selection:i}=o,[a,s]=i;t.dispatchEvent(new l.up("valuechange",{data:o,nativeEvent:!1}));const c=b?fl(a,w):fl(s,j);r(t,c)};p.on(h,R),t.addEventListener("valuechange",N),M.set(t,N),_.add([h,R]);const F=u(t);F&&t.dispatchEvent(new l.up("valuechange",{detail:{value:F},nativeEvent:!1,initValue:!0}))}return()=>{for(const[t,e]of M)t.removeEventListener("valuechange",e);for(const[t,e]of _)p.off(t,e)}}}function yA({view:t,domain0:e,shouldFilterXAxis:n,enableAdaptiveFiltering:r,markDataPairs:o,adaptiveMode:i,scaleX:a,scaleY:s,scale:c,channelDomain:l,independentScaleInfo:u,channel0:f}){const d=new Map,p=new Map;if(!r||0===o.length||!(null==e?void 0:e.length))return{filteredDomain:d,markToScaleMap:p};const h=k(t,"options.slider");if(Object.keys(h).length>0&&Object.prototype.hasOwnProperty.call(h,f)){const t=function(t,e,n,r,o){const i=t?r:n,a=t=>{const e={};return Object.keys(o).forEach(n=>{(n===t||n.match(new RegExp(`^${t}\\d+$`)))&&(e[n]=o[n])}),e},s=a(t?"x":"y"),c=Object.keys(s),l=c.map(t=>e[t]),u=al(i),f=l.map(t=>al(t)),d=l.map((t,e)=>{const n=t.getOptions().domain;return!f[e]&&n&&n.length>=2&&0===n[0]});return{currentScale:i,targetScales:l,isSourceDiscrete:u,isTargetDiscrete:f,shouldPreserveZeroBaseline:d,targetScaleKeys:c}}(n,c,a,s,l);(n?u.markToXScaleMap:u.markToYScaleMap).forEach((t,e)=>{p.set(e,t)});const r=function({markDataPairs:t,domain:e,scaleInfo:n,markToScaleMap:r,adaptiveMode:o,shouldFilterXAxis:i=!1}){const a=new Map,{isSourceDiscrete:s,isTargetDiscrete:c,shouldPreserveZeroBaseline:l,targetScaleKeys:u}=n;return t.forEach(t=>{const n=r.get(t.markKey);if(!n)return;const f=u.indexOf(n);if(-1===f)return;const d=cA([t],e,s,c[f],l[f],o,i);a.set(n,d)}),a}({markDataPairs:o,domain:e,scaleInfo:t,markToScaleMap:p,adaptiveMode:i,isViewSlider:!0,shouldFilterXAxis:n});return lA(l,r,n,!0),{filteredDomain:r,markToScaleMap:p}}{const r=function(t,e){for(const[n]of t.markState.entries()){const t=k(n,"slider");if(Object.keys(t||{}).length>0&&Object.prototype.hasOwnProperty.call(t,e))return String(n.key||"")}return null}(t,f);if(r){const t=iA(n,a,s),c=n?u.markToXScaleMap:u.markToYScaleMap,l=c.get(r)||"";if(l){p.set(r,l);const a=function(t,e,n,r,o,i,a=!1,s){const c=new Map;if(0===t.length||0===e.length)return c;const{isSourceDiscrete:l,isTargetDiscrete:u,shouldPreserveZeroBaseline:f}=n,d=t.filter(s?t=>s.get(t.markKey)===o:t=>t.markKey===r);if(0===d.length)return c;const p=cA(d,e,l,u,f,i,a);return c.set(o,p),c}(o,e,t,r,l,i,n,c);return{filteredDomain:a,markToScaleMap:p}}}}return{filteredDomain:d,markToScaleMap:p}}function bA({domain0:t,domain1:e,shouldFilterXAxis:n,enableAdaptiveFiltering:r,markDataPairs:o,adaptiveMode:i,scaleX:a,scaleY:s,channelDomain:c,hasOnlyXSlider:l,hasOnlyYSlider:u,isX:f}){let d=e;if(r&&o.length>0&&(l&&f||u&&!f)&&(null==t?void 0:t.length)>0){d=function({markDataPairs:t,domain:e,scaleInfo:n,adaptiveMode:r,shouldFilterXAxis:o=!1}){const{isSourceDiscrete:i,isTargetDiscrete:a,shouldPreserveZeroBaseline:s}=n;return cA(t,e,i,a,s,r,o)}({markDataPairs:o,domain:t,scaleInfo:iA(n,a,s),adaptiveMode:i,shouldFilterXAxis:n}),lA(c,d,n,!1)}return d}function vA({getFiltering:t,setFiltering:e,domainsOf:n,view:r,independentScaleInfo:o,enableAdaptiveFiltering:i,hasOnlyXSlider:a,hasOnlyYSlider:s,adaptiveMode:c,scaleX:l,scaleY:u,scale:f,channelDomain:d,channel0:p,channel1:h,isX:g,emitter:m,eventName:y,setState:b,slider:v,prefix:x,hasState:O,update:w,wait:j,leading:k,trailing:A}){return gh(j=>uA(this,void 0,void 0,function*(){const{initValue:k=!1}=j;if(t()&&!k)return;e(!0);const{nativeEvent:A=!0}=j,{markDataPairs:M}=function(t){var e,n;const r=[],o=[],i=[],a=t.markState;if(a)for(const[t,s]of a.entries())if(null==s?void 0:s.channels){const a={};for(const t of s.channels)if("x"===(null==t?void 0:t.name)&&(null===(e=t.values)||void 0===e?void 0:e.length)>0){let e=[];for(const n of t.values)(null==n?void 0:n.value)&&(e=e.concat(n.value),r.push(n.value));a.x=e}else if(t&&("y"===t.name||t.name.startsWith("y"))&&(null===(n=t.values)||void 0===n?void 0:n.length)>0){const e=t.name,n=[];for(const r of t.values)if(null==r?void 0:r.value){const t=r.value;n.push(t),"y"!==e&&"y1"!==e||(Array.isArray(t)?o.push(t.flat()):o.push([t]))}a[e]=n}(a.x||[]).length>0&&(a.y||[]).length>0&&i.push({markKey:t.key||`mark_${i.length}`,channelData:a})}return{xChannelValues:r.flat(),yChannelValues:o.flat(),markDataPairs:i}}(r);if(o[`hasIndependent${h.toUpperCase()}`]){const[t]=n(j),e=s&&!g,{filteredDomain:w,markToScaleMap:k}=yA({view:r,domain0:t,shouldFilterXAxis:e,enableAdaptiveFiltering:i&&(a&&g||s&&!g),markDataPairs:M,adaptiveMode:c,scaleX:l,scaleY:u,scale:f,channelDomain:d,independentScaleInfo:o,channel0:p});d[p]=t,dA(m,y,j,t,d,g,A),pA(b,v,r,{domain0:t,filteredDomain:w,channel0:p,channel1:h,prefix:x,hasState:O,isMultiAxis:!0,markToScaleMap:k,enableAdaptiveFiltering:i})}else{const[t,e]=n(j),o=bA({domain0:t,domain1:e,shouldFilterXAxis:s&&!g,enableAdaptiveFiltering:i,markDataPairs:M,adaptiveMode:c,scaleX:l,scaleY:u,channelDomain:d,hasOnlyXSlider:a,hasOnlyYSlider:s,isX:g});d[p]=t,dA(m,y,j,t,d,g,A),pA(b,v,r,{domain0:t,filteredDomain:o,channel0:p,channel1:h,prefix:x,hasState:O,isMultiAxis:!1,markToScaleMap:void 0,enableAdaptiveFiltering:i})}yield w(),e(!1)}),j,{leading:k,trailing:A})}function xA({className:t="slider",setValue:e=(t,e)=>t.setValues(e),minRange:n=.01,wheelSensitivity:r=.05,x:o=!0,y:i=!0}={}){return a=>{const{container:s,view:c}=a,{coordinate:u}=c,f=nn(u),d=function(t){var e;try{const n=null===(e=t.ownerDocument)||void 0===e?void 0:e.defaultView;if(!n||"function"!=typeof n.getContextService)return null;const r=n.getContextService().getDomElement();return r instanceof HTMLElement?r:null}catch(t){return null}}(s),p=Math.max(1e-6,Math.min(1,n)),h=s.getElementsByClassName(t);if(!h.length)return()=>{};const g=(t,e)=>!0===t||!1!==t&&("shift"===t?e.shiftKey&&!e.ctrlKey&&!e.altKey:"ctrl"===t?e.ctrlKey&&!e.shiftKey&&!e.altKey:"alt"===t&&(e.altKey&&!e.shiftKey&&!e.ctrlKey)),m=(t,n)=>{e(t,n),t.dispatchEvent(new l.up("valuechange",{detail:{value:n},nativeEvent:!0}))},y=(t,e,n,r,o)=>{const i=Math.max(0,Math.min(1,(t-e)/n));return Math.max(r,Math.min(o,i))},b=t=>{if(!d)return;if(!d.contains(t.target))return;const e=d.getBoundingClientRect(),n=t.clientX-e.left,a=t.clientY-e.top,s=[];for(const e of h){const{values:n,orientation:r}=e.attributes;if(!n)continue;const a="horizontal"===r;g("x"===(f?a?"y":"x":a?"x":"y")?o:i,t)&&s.push(e)}if(0!==s.length){t.preventDefault(),t.stopPropagation();for(const e of s){const{values:o,orientation:i,x:s,y:c,trackLength:l}=e.attributes,[u,f]=o,d=f-u,h="horizontal"===i?y(n,s,l,u,f):y(a,c,l,u,f),g=r*Ql(d),b=Math.max(p,Math.min(1,d*(1+t.deltaY*g)));let v=h-b*((h-u)/d),x=h+b*((f-h)/d);v<0?(v=0,x=Math.min(1,b)):x>1&&(x=1,v=Math.max(0,1-b)),m(e,[v,x])}}};return d&&d.addEventListener("wheel",b,{passive:!1,capture:!0}),()=>{d&&d.removeEventListener("wheel",b,{capture:!0})}}}xA.props={reapplyWhenUpdate:!0};const OA="g2-scrollbar";function wA(t={}){return(e,n,r)=>{const{view:o,container:i}=e;if(!i.getElementsByClassName(OA).length)return()=>{};const{scale:a}=o,{x:s,y:c}=a,l={x:[...s.getOptions().domain],y:[...c.getOptions().domain]};s.update({domain:s.getOptions().expectedDomain}),c.update({domain:c.getOptions().expectedDomain});return mA(Object.assign({initDomain:l,className:OA,prefix:"scrollbar",hasState:!0,setValue:(t,e)=>t.setValue(e[0]),getInitValues:t=>{const e=t.slider.attributes.values;if(0!==e[0]||1!==e[1])return e},adaptiveMode:!1},t))(e,n,r)}}var jA=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};function kA(t,e,n){return`<${t} style="${Object.entries(n).map(([t,e])=>`${function(t){return t.replace(/([A-Z])/g,"-$1").toLowerCase()}(t)}:${e}`).join(";")}">${e}</${t}>`}const AA={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 MA(t){return"text"===t.nodeName&&!!t.isOverflowing()}function _A(t){var{offsetX:e=8,offsetY:n=8}=t,r=jA(t,["offsetX","offsetY"]);return t=>{const{container:o}=t,[i,a]=o.getBounds().min,s=xt(r,"tip"),c=new Set,u=t=>{const{target:r}=t;if(!MA(r))return void t.stopPropagation();const{offsetX:u,offsetY:f}=t,d=u+e-i,p=f+n-a;if(r.tip)return r.tip.style.x=d,void(r.tip.style.y=p);const{text:h}=r.style,g=new l.g3({className:"poptip",style:{innerHTML:kA("div",h,Object.assign(Object.assign({},AA),s)),x:d,y:p}});o.appendChild(g),r.tip=g,c.add(g)},f=t=>{const{target:e}=t;MA(e)?e.tip&&(e.tip.remove(),e.tip=null,c.delete(e.tip)):t.stopPropagation()};return o.addEventListener("pointerover",u),o.addEventListener("pointerout",f),()=>{o.removeEventListener("pointerover",u),o.removeEventListener("pointerout",f),c.forEach(t=>t.remove())}}}_A.props={reapplyWhenUpdate:!0};const SA=Object.keys?function(t){return Object.keys(t)}:function(t){var e=[];return ui(t,function(n,r){(0,Jn.A)(t)&&"prototype"===r||e.push(r)}),e};const EA=function(t,e){var n=SA(e),r=n.length;if((0,R.A)(t))return!r;for(var o=0;o<r;o+=1){var i=n[o];if(e[i]!==t[i]||!(i in t))return!1}return!0};const PA=function(t,e){if(!(0,Le.A)(t))return null;var n;if((0,Jn.A)(e)&&(n=e),(0,$.A)(e)&&(n=function(t){return EA(t,e)}),n)for(var r=0;r<t.length;r+=1)if(n(t[r]))return t[r];return null};var LA=Object.prototype.hasOwnProperty;const CA=function(t,e){if(null===t||!(0,$.A)(t))return{};var n={};return ui(e,function(e){LA.call(t,e)&&(n[e]=t[e])}),n};function zA(t){return null==t?null:TA(t)}function TA(t){if("function"!=typeof t)throw new Error;return t}var BA=n("./node_modules/.pnpm/d3-hierarchy@3.1.2/node_modules/d3-hierarchy/src/hierarchy/index.js"),IA={depth:-1},NA={},RA={};function FA(t){return t.id}function DA(t){return t.parentId}function $A(){var t,e=FA,n=DA;function r(r){var o,i,a,s,c,l,u,f,d=Array.from(r),p=e,h=n,g=new Map;if(null!=t){const e=d.map((e,n)=>function(t){t=`${t}`;let e=t.length;HA(t,e-1)&&!HA(t,e-2)&&(t=t.slice(0,-1));return"/"===t[0]?t:`/${t}`}(t(e,n,r))),n=e.map(WA),o=new Set(e).add("");for(const t of n)o.has(t)||(o.add(t),e.push(t),n.push(WA(t)),d.push(RA));p=(t,n)=>e[n],h=(t,e)=>n[e]}for(a=0,o=d.length;a<o;++a)l=d[a]=new BA.bP(i=d[a]),null!=(u=p(i,a,r))&&(u+="")&&(f=l.id=u,g.set(f,g.has(f)?NA:l)),null!=(u=h(i,a,r))&&(u+="")&&(l.parent=u);for(a=0;a<o;++a)if(u=(l=d[a]).parent){if(!(c=g.get(u)))throw new Error("missing: "+u);if(c===NA)throw new Error("ambiguous: "+u);c.children?c.children.push(l):c.children=[l],l.parent=c}else{if(s)throw new Error("multiple roots");s=l}if(!s)throw new Error("no root");if(null!=t){for(;s.data===RA&&1===s.children.length;)s=s.children[0],--o;for(let t=d.length-1;t>=0&&(l=d[t]).data===RA;--t)l.data=null}if(s.parent=IA,s.eachBefore(function(t){t.depth=t.parent.depth+1,--o}).eachBefore(BA.lW),s.parent=null,o>0)throw new Error("cycle");return s}return r.id=function(t){return arguments.length?(e=zA(t),r):e},r.parentId=function(t){return arguments.length?(n=zA(t),r):n},r.path=function(e){return arguments.length?(t=zA(e),r):t},r}function WA(t){let e=t.length;if(e<2)return"";for(;--e>1&&!HA(t,e););return t.slice(0,e)}function HA(t,e){if("/"===t[e]){let n=0;for(;e>0&&"\\"===t[--e];)++n;if(!(1&n))return!0}return!1}function qA(t,e,n,r,o){var i,a,s=t.children,c=s.length,l=new Array(c+1);for(l[0]=a=i=0;i<c;++i)l[i+1]=a+=s[i].value;!function t(e,n,r,o,i,a,c){if(e>=n-1){var u=s[e];return u.x0=o,u.y0=i,u.x1=a,void(u.y1=c)}var f=l[e],d=r/2+f,p=e+1,h=n-1;for(;p<h;){var g=p+h>>>1;l[g]<d?p=g+1:h=g}d-l[p-1]<l[p]-d&&e+1<p&&--p;var m=l[p]-f,y=r-m;if(a-o>c-i){var b=r?(o*y+a*m)/r:a;t(e,p,m,o,i,b,c),t(p,n,y,b,i,a,c)}else{var v=r?(i*y+c*m)/r:c;t(e,p,m,o,i,a,v),t(p,n,y,o,v,a,c)}}(0,c,t.value,e,n,r,o)}function YA(t,e,n,r,o){for(var i,a=t.children,s=-1,c=a.length,l=t.value&&(r-e)/t.value;++s<c;)(i=a[s]).y0=n,i.y1=o,i.x0=e,i.x1=e+=i.value*l}function XA(t,e,n,r,o){for(var i,a=t.children,s=-1,c=a.length,l=t.value&&(o-n)/t.value;++s<c;)(i=a[s]).x0=e,i.x1=r,i.y0=n,i.y1=n+=i.value*l}function GA(t,e,n,r,o){(1&t.depth?XA:YA)(t,e,n,r,o)}var VA=(1+Math.sqrt(5))/2;function KA(t,e,n,r,o,i){for(var a,s,c,l,u,f,d,p,h,g,m,y=[],b=e.children,v=0,x=0,O=b.length,w=e.value;v<O;){c=o-n,l=i-r;do{u=b[x++].value}while(!u&&x<O);for(f=d=u,m=u*u*(g=Math.max(l/c,c/l)/(w*t)),h=Math.max(d/m,m/f);x<O;++x){if(u+=s=b[x].value,s<f&&(f=s),s>d&&(d=s),m=u*u*g,(p=Math.max(d/m,m/f))>h){u-=s;break}h=p}y.push(a={value:u,dice:c<l,children:b.slice(v,x)}),a.dice?YA(a,n,r,o,w?r+=l*u/w:i):XA(a,n,r,w?n+=c*u/w:o,i),w-=u,v=x}return y}const UA=function t(e){function n(t,n,r,o,i){KA(e,t,n,r,o,i)}return n.ratio=function(e){return t((e=+e)>1?e:1)},n}(VA),ZA=function t(e){function n(t,n,r,o,i){if((a=t._squarify)&&a.ratio===e)for(var a,s,c,l,u,f=-1,d=a.length,p=t.value;++f<d;){for(c=(s=a[f]).children,l=s.value=0,u=c.length;l<u;++l)s.value+=c[l].value;s.dice?YA(s,n,r,o,p?r+=(i-r)*s.value/p:i):XA(s,n,r,p?n+=(o-n)*s.value/p:o,i),p-=s.value}else t._squarify=a=KA(e,t,n,r,o,i),a.ratio=e}return n.ratio=function(e){return t((e=+e)>1?e:1)},n}(VA);function JA(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 QA(){return 0}function tM(t){return function(){return t}}function eM(t,e=[t.data.name]){t.id=t.id||t.data.name,t.path=e,t.children&&t.children.forEach(n=>{n.id=`${t.id}/${n.data.name}`,n.path=[...e,n.data.name],eM(n,n.path)})}function nM(t){const e=k(t,["data","name"]);e.replaceAll&&(t.path=e.replaceAll(".","/").split("/")),t.children&&t.children.forEach(t=>{nM(t)})}function rM(t,e,n){const{value:r}=n,o=function(t,e){const n={treemapBinary:qA,treemapDice:YA,treemapSlice:XA,treemapSliceDice:GA,treemapSquarify:UA,treemapResquarify:ZA},r="treemapSquarify"===t?n[t].ratio(e):n[t];if(!r)throw new TypeError("Invalid tile method!");return r}(e.tile,e.ratio),i=function(t,e){return Array.isArray(t)?"function"==typeof e?$A().path(e)(t):$A()(t):(0,BA.Ay)(t)}(t,e.path);(0,Le.A)(t)?nM(i):eM(i),r?i.sum(t=>e.ignoreParentValue&&t.children?0:Om(r)(t)).sort(e.sort):i.count(),function(){var t=UA,e=!1,n=1,r=1,o=[0],i=QA,a=QA,s=QA,c=QA,l=QA;function u(t){return t.x0=t.y0=0,t.x1=n,t.y1=r,t.eachBefore(f),o=[0],e&&t.eachBefore(JA),t}function f(e){var n=o[e.depth],r=e.x0+n,u=e.y0+n,f=e.x1-n,d=e.y1-n;f<r&&(r=f=(r+f)/2),d<u&&(u=d=(u+d)/2),e.x0=r,e.y0=u,e.x1=f,e.y1=d,e.children&&(n=o[e.depth+1]=i(e)/2,r+=l(e)-n,u+=a(e)-n,(f-=s(e)-n)<r&&(r=f=(r+f)/2),(d-=c(e)-n)<u&&(u=d=(u+d)/2),t(e,r,u,f,d))}return u.round=function(t){return arguments.length?(e=!!t,u):e},u.size=function(t){return arguments.length?(n=+t[0],r=+t[1],u):[n,r]},u.tile=function(e){return arguments.length?(t=TA(e),u):t},u.padding=function(t){return arguments.length?u.paddingInner(t).paddingOuter(t):u.paddingInner()},u.paddingInner=function(t){return arguments.length?(i="function"==typeof t?t:tM(+t),u):i},u.paddingOuter=function(t){return arguments.length?u.paddingTop(t).paddingRight(t).paddingBottom(t).paddingLeft(t):u.paddingTop()},u.paddingTop=function(t){return arguments.length?(a="function"==typeof t?t:tM(+t),u):a},u.paddingRight=function(t){return arguments.length?(s="function"==typeof t?t:tM(+t),u):s},u.paddingBottom=function(t){return arguments.length?(c="function"==typeof t?t:tM(+t),u):c},u.paddingLeft=function(t){return arguments.length?(l="function"==typeof t?t:tM(+t),u):l},u}().tile(o).size(e.size).round(e.round).paddingInner(e.paddingInner).paddingOuter(e.paddingOuter).paddingTop(e.paddingTop).paddingRight(e.paddingRight).paddingBottom(e.paddingBottom).paddingLeft(e.paddingLeft)(i);const a=i.descendants().map(t=>Object.assign(t,{id:t.id.replace(/^\//,""),x:[t.x0,t.x1],y:[t.y0,t.y1]})),s=a.filter("function"==typeof e.layer?e.layer:t=>t.height===e.layer);return[s,a]}var oM=function(t,e,n,r){return new(n||(n=Promise))(function(o,i){function a(t){try{c(r.next(t))}catch(t){i(t)}}function s(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){t.done?o(t.value):function(t){return t instanceof n?t:new n(function(e){e(t)})}(t.value).then(a,s)}c((r=r.apply(t,e||[])).next())})},iM=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const aM={breadCrumbFill:"rgba(0, 0, 0, 0.85)",breadCrumbFontSize:12,breadCrumbY:12,activeFill:"rgba(0, 0, 0, 0.5)"};function sM(t={}){const{originData:e=[],layout:n}=t,r=iM(t,["originData","layout"]),o=(0,N.A)({},aM,r),i=xt(o,"breadCrumb"),a=xt(o,"active");return t=>{const{update:r,setState:o,container:s,options:c}=t,u=_t(s).select(".plot").node();const f=c.marks[0],{state:d}=f,p=new l.YJ;u.appendChild(p);const h=(t,c)=>oM(this,void 0,void 0,function*(){if(p.removeChildren(),c){let e="",n=i.y,r=0;const o=[],s=u.getBBox().width,c=t.map((a,c)=>{e=`${e}${a}/`,o.push(a);const u=new l.EY({name:e.replace(/\/$/,""),style:Object.assign(Object.assign({text:a,x:r,path:[...o],depth:c},i),{y:n})});p.appendChild(u),r+=u.getBBox().width;const f=new l.EY({style:Object.assign(Object.assign({x:r,text:" / "},i),{y:n})});return p.appendChild(f),r+=f.getBBox().width,r>s&&(n=p.getBBox().height+i.y,r=0,u.attr({x:r,y:n}),r+=u.getBBox().width,f.attr({x:r,y:n}),r+=f.getBBox().width),c===hs(t)-1&&f.remove(),u});c.forEach((t,e)=>{if(e===hs(c)-1)return;const n=Object.assign({},t.attributes);t.attr("cursor","pointer"),t.addEventListener("mouseenter",()=>{t.attr(a)}),t.addEventListener("mouseleave",()=>{t.attr(n)}),t.addEventListener("click",()=>{h(k(t,["style","path"]),k(t,["style","depth"]))})})}!function(t,e){[...Ww(t),...Hw(t)].forEach(t=>{e(t,t=>t)})}(s,o),o("treemapDrillDown",r=>{const{marks:o}=r,i=t.join("/"),a=o.map(t=>{if("rect"!==t.type)return t;let r=e;if(c){const t=e.filter(t=>{const e=k(t,["id"]);return e&&(e.match(`${i}/`)||i.match(e))}).map(t=>({value:0===t.height?k(t,["value"]):void 0,name:k(t,["id"])})),{paddingLeft:o,paddingBottom:a,paddingRight:s}=n,l=Object.assign(Object.assign({},n),{paddingTop:(n.paddingTop||p.getBBox().height+10)/(c+1),paddingLeft:o/(c+1),paddingBottom:a/(c+1),paddingRight:s/(c+1),path:t=>t.name,layer:t=>t.depth===c+1});r=rM(t,l,{value:"value"})[0]}else r=e.filter(t=>1===t.depth);const o=[];return r.forEach(({path:t})=>{o.push(Ho(t))}),(0,N.A)({},t,{data:r,scale:{color:{domain:o}}})});return Object.assign(Object.assign({},r),{marks:a})}),yield r(void 0,["legendFilter"])}),g=t=>{const n=t.target,{markType:r,nodeName:o,attributes:i}=n||{};if("rect"!==r&&o!==l.yp.TEXT)return;const a=o===l.yp.TEXT&&!0===k(i,"isTreemapLabel")?(t=>t.attributes.key.split("-")[0])(n):(t=>k(t,["__data__","key"]))(n),s=PA(e,t=>t.id===a);k(s,"height")&&h(k(s,"path"),k(s,"depth"))};u.addEventListener("click",g);const m=SA(Object.assign(Object.assign({},d.active),d.inactive)),y=()=>{Kl(u).forEach(t=>{const n=k(t,["style","cursor"]),r=PA(e,e=>e.id===k(t,["__data__","key"]));if("pointer"!==n&&(null==r?void 0:r.height)){t.style.cursor="pointer";const e=CA(t.attributes,m);t.addEventListener("mouseenter",()=>{t.attr(d.active)}),t.addEventListener("mouseleave",()=>{t.attr((0,N.A)(e,d.inactive))})}})};return y(),u.addEventListener("mousemove",y),()=>{p.remove(),u.removeEventListener("click",g),u.removeEventListener("mousemove",y)}}}var cM=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};function lM(t,e={}){const{valueField:n="value",sort:r,fillParent:o=!0,nameField:i="name"}=e;if(!t||0===t.length)return[];const a=(t,e=null,r=0)=>{const o={data:t,depth:r,parent:e,children:[],x0:0,x1:0,value:t[n]||0};return t.children&&t.children.length>0&&(o.children=t.children.map(t=>a(t,o,r+1))),o},s=[];let c=0;return t.forEach(t=>{const e=a(t),l=(t,e=0,n=!1,i=0)=>{if(n||0===t.depth)t.x0=n?e:0,t.x1=t.x0+t.value;else if(t.x0=e,o&&i>0){const n=t.parent?t.parent.children.reduce((t,e)=>t+e.value,0):t.value;t.x1=e+i*(n>0?t.value/n:1/(t.parent?t.parent.children.length:1))}else t.x1=e+t.value;let a=t.x0;const s=t.x1-t.x0,c=r?[...t.children].sort((t,e)=>r(t.data,e.data)):t.children;if(o&&c.length>0){const e=t.children.reduce((t,e)=>t+e.value,0);c.forEach(t=>{l(t,a,!1,s);a+=s*(e>0?t.value/e:1/c.length)})}else c.forEach(t=>{l(t,a,!1,0),a+=t.x1-t.x0})};l(e,c,!0),c+=e.value;const u=t=>{s.push((t=>{var e,r,o;const a=t=>{var e;return null!==(e=t[i])&&void 0!==e?e:t.name},s=[a(t.data)];let c=t;for(;c.parent;)s.unshift(a(c.parent.data)),c=c.parent;return Object.assign(Object.assign({},CA(t.data,[n])),{[dM]:s,[pM]:null!==(o=null===(r=null===(e=c.parent)||void 0===e?void 0:e.data)||void 0===r?void 0:r[i])&&void 0!==o?o:t.data[i],name:t.data[i],depth:t.depth,value:t.value,x:[t.x0,t.x1],y:[t.depth,t.depth+1],[hM]:t.children.length})})(t)),t.children.forEach(u)};u(e)}),s}const uM="partition",fM="markType",dM="path",pM="ancestor-node",hM="childNodeCount";const gM={id:uM,encode:{x:"x",y:"y",key:dM,color:pM,value:"value",name:"name"},labels:[{style:{pointerEvents:"none"},text:"value",position:"inside",transform:[{type:"overflowHide"}]}],axis:{x:{title:"Time/Order",label:!0},y:!1},style:{[fM]:uM,[hM]:"childNodeCount"},state:{active:{zIndex:2},inactive:{zIndex:1}},legend:!1,coordinate:{type:"cartesian",grid:!1},interaction:{drillDown:!0}},mM=t=>{const{encode:e,data:n=[],layout:r={}}=t,o=cM(t,["encode","data","layout"]),{fillParent:i=!0,sort:a}=r,s=Object.assign(Object.assign({},gM.encode),e),{value:c}=s,l=function(t){const{data:e,encode:n,fillParent:r,sort:o}=t,{color:i,value:a,name:s}=n;return lM(e,{valueField:a,fillParent:r,nameField:s,sort:o}).map(t=>{const e=Object.assign({},t);return i&&i!==pM&&(e[i]=t[i]),e})}({encode:s,data:n,fillParent:i,sort:a});return[(0,N.A)({},gM,Object.assign({type:"rect",data:l,encode:s,tooltip:{title:"path",items:[t=>({name:c,value:t[c]})]},interaction:{elementHighlight:!0}},o))]};mM.props={};var yM=function(t,e,n,r){return new(n||(n=Promise))(function(o,i){function a(t){try{c(r.next(t))}catch(t){i(t)}}function s(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){t.done?o(t.value):function(t){return t instanceof n?t:new n(function(e){e(t)})}(t.value).then(a,s)}c((r=r.apply(t,e||[])).next())})};const bM={rootText:"root",style:{fill:"rgba(0, 0, 0, 0.6)",fontSize:11},y:4,active:{fill:"rgba(0, 0, 0, 0.4)"}};function vM(t={}){const{breadCrumb:e={}}=t,n=(0,N.A)({},bM,e);return t=>{const{update:e,setState:r,container:o,options:i}=t,a=o.ownerDocument,s=_t(o).select(".plot").node();const c=i.marks.find(({id:t})=>t===uM);if(!c)return;const{state:l}=c,u=a.createElement("g");u.style.transform=`translate(${n.x||0}px, ${n.y||0}px)`,u.setAttribute("x","drilldown-breadcrumb"),s.appendChild(u);const f=t=>yM(this,void 0,void 0,function*(){if(u.removeChildren(),t&&t.length>0){const e=a.createElement("text",{style:Object.assign({text:n.rootText},n.style)});u.appendChild(e);let r="";const o=t;let i=n.style.y,c=e.getBBox().width;const l=s.getBBox().width,d=o.map((t,e)=>{const o=a.createElement("text",{style:Object.assign(Object.assign({x:c,text:" / "},n.style),{y:i})});u.appendChild(o),c+=o.getBBox().width,r=`${r}${t} / `;const s=a.createElement("text",{name:r.replace(/\s\/\s$/,""),style:Object.assign(Object.assign({text:t,x:c},n.style),{y:i})});return u.appendChild(s),c+=s.getBBox().width,c>l&&(i=u.getBBox().height,c=0,o.attr({x:c,y:i}),c+=o.getBBox().width,s.attr({x:c,y:i}),c+=s.getBBox().width),s});[e,...d].forEach((e,r)=>{if(r===d.length)return;const o=Object.assign({},e.attributes);e.attr("cursor","pointer"),e.addEventListener("mouseenter",()=>{e.attr(n.active)}),e.addEventListener("mouseleave",()=>{e.attr(o)}),e.addEventListener("click",()=>{f(t.slice(0,r))})})}r("drillDown",e=>{const{marks:n}=e,r=n.map(e=>{if(e.id!==uM&&"rect"!==e.type)return e;const{data:n}=e,r=n.filter(e=>{var n;const r=null!==(n=e.path)&&void 0!==n?n:[];if(0===t.length)return!0;if(!Array.isArray(r)||r.length<t.length)return!1;for(let e=0;e<t.length;e++)if(r[e]!==t[e])return!1;return!0});return(0,N.A)({},e,{data:r})});return Object.assign(Object.assign({},e),{marks:r})}),yield e()}),d=t=>{var e,n;const r=t.target,o=r.style||{},i=r.__data__;if("rect"!==r.markType||o[fM]!==uM||!o[hM])return;const a=null!==(n=null===(e=null==i?void 0:i.data)||void 0===e?void 0:e.path)&&void 0!==n?n:[];f(a)};s.addEventListener("click",d);const p=SA(Object.assign(Object.assign({},l.active),l.inactive)),h=()=>{const t=(t=>t.querySelectorAll(".element").filter(t=>(t.style||{})[fM]===uM))(s);t.forEach(t=>{const e=k(t,["style",hM]);if("pointer"!==k(t,["style","cursor"])&&e){t.style.cursor="pointer";const e=CA(t.attributes,p);t.addEventListener("mouseenter",()=>{t.attr(l.active)}),t.addEventListener("mouseleave",()=>{t.attr((0,N.A)(e,l.inactive))})}})};return s.addEventListener("mousemove",h),()=>{u.remove(),s.removeEventListener("click",d),s.removeEventListener("mousemove",h)}}}var xM=function(t,e,n,r){return new(n||(n=Promise))(function(o,i){function a(t){try{c(r.next(t))}catch(t){i(t)}}function s(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){t.done?o(t.value):function(t){return t instanceof n?t:new n(function(e){e(t)})}(t.value).then(a,s)}c((r=r.apply(t,e||[])).next())})},OM=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const wM={pointR:6,pointStrokeWidth:1,pointStroke:"#888",pointActiveStroke:"#f5f5f5",pathStroke:"#888",pathLineDash:[3,4],labelFontSize:12,labelFill:"#888",labelStroke:"#fff",labelLineWidth:1,labelY:-6,labelX:2},jM="movePoint",kM=t=>{const e=t.target,{markType:n}=e;"line"===n&&(e.attr("_lineWidth",e.attr("lineWidth")||1),e.attr("lineWidth",e.attr("_lineWidth")+3)),"interval"===n&&(e.attr("_opacity",e.attr("opacity")||1),e.attr("opacity",.7*e.attr("_opacity")))},AM=t=>{const e=t.target,{markType:n}=e;"line"===n&&e.attr("lineWidth",e.attr("_lineWidth")),"interval"===n&&e.attr("opacity",e.attr("_opacity"))},MM=(t,e,n)=>{t.forEach((t,r)=>{t.attr("stroke",e[1]===r?n.activeStroke:n.stroke)})},_M=(t,e,n,r)=>{const o=new l.wA({style:n}),i=new l.EY({style:r});return e.appendChild(i),t.appendChild(o),[o,i]},SM=(t,e)=>{if(!k(t,["options","range","indexOf"]))return;const n=t.options.range.indexOf(e);return t.sortedDomain[n]},EM=(t,e,n)=>{const r=Gl(t,e),o=Gl(t,n)/r;return[t[0]+(e[0]-t[0])*o,t[1]+(e[1]-t[1])*o]};function PM(t={}){const{selection:e=[],precision:n=2}=t,r=OM(t,["selection","precision"]),o=Object.assign(Object.assign({},wM),r||{}),i=xt(o,"path"),a=xt(o,"label"),s=xt(o,"point");return(t,r,o)=>{const{update:c,setState:u,container:f,view:d,options:{marks:p,coordinate:h}}=t,g=Ml(f);let m,y=Kl(g),b=e;const{transform:v=[],type:x}=h,O=!!PA(v,({type:t})=>"transpose"===t),w="polar"===x,j="theta"===x,A=!!PA(y,({markType:t})=>"area"===t);A&&(y=y.filter(({markType:t})=>"area"===t));const M=new l.YJ({style:{zIndex:2}});g.appendChild(M);const _=()=>{o.emit("element-point:select",{nativeEvent:!0,data:{selection:b}})},S=t=>{const e=t.target;b=[e.parentNode.childNodes.indexOf(e)],_(),P(e)},E=t=>{const{data:{selection:e},nativeEvent:n}=t;if(n)return;b=e;const r=k(y,[null==b?void 0:b[0]]);r&&P(r)},P=t=>{const{attributes:e,markType:r,__data__:h}=t,{stroke:g}=e,{points:y,seriesTitle:v,color:x,title:S,seriesX:E,y1:L}=h;if(O&&"interval"!==r)return;const{scale:C,coordinate:z}=(null==m?void 0:m.view)||d,{color:T,y:B,x:I}=C,R=z.getCenter();let F;M.removeChildren();const D=(t,e,n,r)=>xM(this,void 0,void 0,function*(){return u("elementPointMove",i=>{var a;const s=((null===(a=null==m?void 0:m.options)||void 0===a?void 0:a.marks)||p).map(i=>{if(!r.includes(i.type))return i;const{data:a,encode:s}=i,c=Object.keys(s).reduce((r,o)=>{const i=s[o];return"x"===o&&(r[i]=t),"y"===o&&(r[i]=e),"color"===o&&(r[i]=n),r},{}),l=((t,e,n)=>e.map(e=>{const r=["x","color"].reduce((r,o)=>{const i=n[o];return i?e[i]===t[i]&&r:r},!0);return r?Object.assign(Object.assign({},e),t):e}))(c,a,s);return((t,e)=>{o.emit("element-point:moved",{nativeEvent:!0,data:{changeData:t,data:e}})})(c,l),(0,N.A)({},i,{data:l,animate:!1})});return Object.assign(Object.assign({},i),{marks:s})}),yield c("elementPointMove")});if(["line","area"].includes(r))y.forEach((e,r)=>{const o=I.invert(E[r]);if(!o)return;const c=new l.jl({name:jM,style:Object.assign({cx:e[0],cy:e[1],fill:g},s)}),u=((t,e)=>{const n=k(t,["__data__","seriesItems",e,"0","value"]),r=k(t,["__data__","seriesIndex",e]),{__data__:{data:o,encode:i,transform:a}}=t.parentNode,s=PA(a,({type:t})=>"normalizeY"===t),c=k(i,["y","field"]),l=o[r][c];return t=>s?1===n?t:t/(1-t)/(n/(1-n))*l:t})(t,r);c.addEventListener("mousedown",l=>{const d=z.output([E[r],0]),p=null==v?void 0:v.length;f.attr("cursor","move"),b[1]!==r&&(b[1]=r,_()),MM(M.childNodes,b,s);const[h,g]=_M(M,c,i,a),O=t=>{const o=e[1]+t.clientY-F[1];if(A)if(w){const i=e[0]+t.clientX-F[0],[a,s]=EM(R,d,[i,o]),[,l]=z.output([1,B.output(0)]),[,f]=z.invert([a,l-(y[r+p][1]-s)]),m=(r+1)%p,b=Vl([y[(r-1+p)%p],[a,s],v[m]&&y[m]]);g.attr("text",u(B.invert(f)).toFixed(n)),h.attr("d",b),c.attr("cx",a),c.attr("cy",s)}else{const[,t]=z.output([1,B.output(0)]),[,i]=z.invert([e[0],t-(y[r+p][1]-o)]),a=Vl([y[r-1],[e[0],o],v[r+1]&&y[r+1]]);g.attr("text",u(B.invert(i)).toFixed(n)),h.attr("d",a),c.attr("cy",o)}else{const[,t]=z.invert([e[0],o]),i=Vl([y[r-1],[e[0],o],y[r+1]]);g.attr("text",B.invert(t).toFixed(n)),h.attr("d",i),c.attr("cy",o)}};F=[l.clientX,l.clientY],window.addEventListener("mousemove",O);const j=()=>xM(this,void 0,void 0,function*(){if(f.attr("cursor","default"),window.removeEventListener("mousemove",O),f.removeEventListener("mouseup",j),(0,ei.A)(g.attr("text")))return;const e=Number(g.attr("text")),n=SM(T,x);m=yield D(o,e,n,["line","area"]),g.remove(),h.remove(),P(t)});f.addEventListener("mouseup",j)}),M.appendChild(c)}),MM(M.childNodes,b,s);else if("interval"===r){let e=[(y[0][0]+y[1][0])/2,y[0][1]];O?e=[y[0][0],(y[0][1]+y[1][1])/2]:j&&(e=y[0]);const o=(t=>{const e=k(t,["__data__","y"]),n=k(t,["__data__","y1"])-e,{__data__:{data:r,encode:o,transform:i},childNodes:a}=t.parentNode,s=PA(i,({type:t})=>"normalizeY"===t),c=k(o,["y","field"]),l=r[a.indexOf(t)][c];return(t,e=!1)=>s||e?t/(1-t)/(n/(1-n))*l:t})(t),c=new l.jl({name:jM,style:Object.assign(Object.assign({cx:e[0],cy:e[1],fill:g},s),{stroke:s.activeStroke})});c.addEventListener("mousedown",s=>{f.attr("cursor","move");const l=SM(T,x),[u,d]=_M(M,c,i,a),p=t=>{if(O){const r=e[0]+t.clientX-F[0],[i]=z.output([B.output(0),B.output(0)]),[,a]=z.invert([i+(r-y[2][0]),e[1]]),s=Vl([[r,y[0][1]],[r,y[1][1]],y[2],y[3]],!0);d.attr("text",o(B.invert(a)).toFixed(n)),u.attr("d",s),c.attr("cx",r)}else if(j){const r=e[1]+t.clientY-F[1],i=e[0]+t.clientX-F[0],[a,s]=EM(R,[i,r],e),[l,f]=EM(R,[i,r],y[1]),p=z.invert([a,s])[1],h=L-p;if(h<0)return;const g=function(t,e,n=0){const r=[["M",...e[1]]],o=Gl(t,e[1]),i=Gl(t,e[0]);return 0===o?r.push(["L",...e[3]],["A",i,i,0,n,1,...e[0]],["Z"]):r.push(["A",o,o,0,n,0,...e[2]],["L",...e[3]],["A",i,i,0,n,1,...e[0]],["Z"]),r}(R,[[a,s],[l,f],y[2],y[3]],h>.5?1:0);d.attr("text",o(h,!0).toFixed(n)),u.attr("d",g),c.attr("cx",a),c.attr("cy",s)}else{const r=e[1]+t.clientY-F[1],[,i]=z.output([1,B.output(0)]),[,a]=z.invert([e[0],i-(y[2][1]-r)]),s=Vl([[y[0][0],r],[y[1][0],r],y[2],y[3]],!0);d.attr("text",o(B.invert(a)).toFixed(n)),u.attr("d",s),c.attr("cy",r)}};F=[s.clientX,s.clientY],window.addEventListener("mousemove",p);const h=()=>xM(this,void 0,void 0,function*(){if(f.attr("cursor","default"),f.removeEventListener("mouseup",h),window.removeEventListener("mousemove",p),(0,ei.A)(d.attr("text")))return;const e=Number(d.attr("text"));m=yield D(S,e,l,[r]),d.remove(),u.remove(),P(t)});f.addEventListener("mouseup",h)}),M.appendChild(c)}};y.forEach((t,e)=>{b[0]===e&&P(t),t.addEventListener("click",S),t.addEventListener("mouseenter",kM),t.addEventListener("mouseleave",AM)});const L=t=>{const e=null==t?void 0:t.target;e&&(e.name===jM||y.includes(e))||(b=[],_(),M.removeChildren())};return o.on("element-point:select",E),o.on("element-point:unselect",L),f.addEventListener("mousedown",L),()=>{M.remove(),o.off("element-point:select",E),o.off("element-point:unselect",L),f.removeEventListener("mousedown",L),y.forEach(t=>{t.removeEventListener("click",S),t.removeEventListener("mouseenter",kM),t.removeEventListener("mouseleave",AM)})}}}var LM=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const CM=()=>t=>{const{children:e}=t;if(!Array.isArray(e))return[];const{x:n=0,y:r=0,width:o,height:i,data:a}=t;return e.map(t=>{var{data:e,x:s,y:c,width:l,height:u}=t,f=LM(t,["data","x","y","width","height"]);return Object.assign(Object.assign({},f),{data:qs(e,a),x:null!=s?s:n,y:null!=c?c:r,width:null!=l?l:o,height:null!=u?u:i})})};CM.props={};var zM=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const TM=()=>t=>{const{children:e}=t;if(!Array.isArray(e))return[];const{direction:n="row",ratio:r=e.map(()=>1),padding:o=0,data:i}=t,[a,s,c,l]="col"===n?["y","height","width","x"]:["x","width","height","y"],u=r.reduce((t,e)=>t+e),f=t[s]-o*(e.length-1),d=r.map(t=>f*(t/u)),p=[];let h=t[a]||0;for(let n=0;n<d.length;n+=1){const r=e[n],{data:u}=r,f=zM(r,["data"]),g=qs(u,i);p.push(Object.assign({[a]:h,[s]:d[n],[l]:t[l]||0,[c]:t[c],data:g},f)),h+=d[n]+o}return p};TM.props={};class BM{constructor(t){this.$value=t}static of(t){return new BM(t)}call(t,...e){return this.$value=t(this.$value,...e),this}value(){return this.$value}}var IM=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const NM=Ws(t=>{const{encode:e,data:n,scale:r,shareSize:o=!1}=t,{x:i,y:a}=e,s=(t,e)=>{var i;if(void 0===t||!o)return{};const a=C(n,e=>e[t]),s=(null===(i=null==r?void 0:r[e])||void 0===i?void 0:i.domain)||Array.from(a.keys()),c=s.map(t=>a.has(t)?a.get(t).length:1);return{domain:s,flex:c}};return{scale:{x:Object.assign(Object.assign({paddingOuter:0,paddingInner:.1,guide:void 0===i?null:{position:"top"}},void 0===i&&{paddingInner:0}),s(i,"x")),y:Object.assign(Object.assign({range:[0,1],paddingOuter:0,paddingInner:.1,guide:void 0===a?null:{position:"right"}},void 0===a&&{paddingInner:0}),s(a,"y"))}}}),RM=Hs(t=>{const{data:e,scale:n,legend:r}=t,o=[t];let i,a,s;for(;o.length;){const t=o.shift(),{children:e,encode:n={},scale:r={},legend:c={}}=t,{color:l}=n,{color:u}=r,{color:f}=c;void 0!==l&&(i=l),void 0!==u&&(a=u),void 0!==f&&(s=f),Array.isArray(e)&&o.push(...e)}const c="string"==typeof i?i:"",[l,u]=(()=>{var t;const r=null===(t=null==n?void 0:n.color)||void 0===t?void 0:t.domain;if(void 0!==r)return[r];if(void 0===i)return[void 0];const o="function"==typeof i?i:t=>t[i],a=e.map(o);return a.some(t=>"number"==typeof t)?[pi(a)]:[Array.from(new Set(a)),"ordinal"]})();return Object.assign({encode:{color:{type:"column",value:null!=l?l:[]}},scale:{color:(0,N.A)({},a,{domain:l,type:u})}},void 0===r&&{legend:{color:(0,N.A)({title:c},s)}})}),FM=Ws(()=>({animate:{enterType:"fadeIn"}})),DM=Hs(()=>({frame:!1,encode:{shape:"hollow"},style:{lineWidth:0}})),$M=Hs(()=>({type:"cell"})),WM=Hs(t=>{const{data:e}=t,n={type:"custom",callback:()=>{const{data:e,encode:n}=t,{x:r,y:o}=n,i=r?Array.from(new Set(e.map(t=>t[r]))):[],a=o?Array.from(new Set(e.map(t=>t[o]))):[];return(()=>{if(i.length&&a.length){const t=[];for(const e of i)for(const n of a)t.push({[r]:e,[o]:n});return t}return i.length?i.map(t=>({[r]:t})):a.length?a.map(t=>({[o]:t})):void 0})()}};return{data:{type:"inline",value:e,transform:[n]}}}),HM=Hs((t,e=qM,n=XM,r=GM,o={})=>{const{data:i,encode:a,children:s,scale:c,x:l=0,y:u=0,shareData:f=!1,key:d}=t,{value:p}=i,{x:h,y:g}=a,{color:m}=c,{domain:y}=m;return{children:(t,i,a)=>{const{x:c,y:m}=i,{paddingLeft:b,paddingTop:v,marginLeft:x,marginTop:O}=a,{domain:w}=c.getOptions(),{domain:j}=m.getOptions(),k=Be(t),A=t.map(e),M=t.map(({x:t,y:e})=>[c.invert(t),m.invert(e)]),_=M.map(([t,e])=>n=>{const{[h]:r,[g]:o}=n;return(void 0===h||r===t)&&(void 0===g||o===e)}),S=_.map(t=>p.filter(t)),E=f?Ye(S,t=>t.length):void 0,P=M.map(([t,e])=>({columnField:h,columnIndex:w.indexOf(t),columnValue:t,columnValuesLength:w.length,rowField:g,rowIndex:j.indexOf(e),rowValue:e,rowValuesLength:j.length})),L=P.map(t=>Array.isArray(s)?s:[s(t)].flat(1));return k.flatMap(t=>{const[e,i,a,s]=A[t],c=P[t],f=S[t];return L[t].map(m=>{var w,j,{scale:k,key:A,facet:M=!0,axis:_={},legend:S={}}=m,P=IM(m,["scale","key","facet","axis","legend"]);const L=(null===(w=null==k?void 0:k.y)||void 0===w?void 0:w.guide)||_.y,C=(null===(j=null==k?void 0:k.x)||void 0===j?void 0:j.guide)||_.x,z={x:{tickCount:h?5:void 0},y:{tickCount:g?5:void 0}},T=M?f:0===f.length?[]:p,B={color:{domain:y}},I={x:VM(C,n)(c,T),y:VM(L,r)(c,T)};return Object.assign(Object.assign({key:`${A}-${t}`,data:T,margin:0,x:e+b+l+x,y:i+v+u+O,parentKey:d,width:a,height:s,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,frame:!!T.length,dataDomain:E,scale:(0,N.A)(z,k,B),axis:(0,N.A)({},_,I),legend:!1},P),o)})})}}});function qM(t){const{points:e}=t;return Qs(e)}function YM(t,e){return(0,N.A)(e.length?{title:!1,tick:null,label:null}:{title:!1,tick:null,label:null,grid:null},t)}function XM(t){return(e,n)=>{const{rowIndex:r,rowValuesLength:o,columnIndex:i,columnValuesLength:a}=e;if(r!==o-1)return YM(t,n);return(0,N.A)({title:i===a-1&&void 0,grid:n.length?void 0:null},t)}}function GM(t){return(e,n)=>{const{rowIndex:r,columnIndex:o}=e;if(0!==o)return YM(t,n);return(0,N.A)({title:0===r&&void 0,grid:n.length?void 0:null},t)}}function VM(t,e){return"function"==typeof t?t:null===t||!1===t?()=>null:e(t)}const KM=()=>t=>[BM.of(t).call($M).call(RM).call(FM).call(NM).call(DM).call(WM).call(HM).value()];KM.props={};var UM=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const ZM=Ws(t=>({scale:{x:{guide:null,paddingOuter:0,paddingInner:.1},y:{guide:null,range:[0,1],paddingOuter:0,paddingInner:.1}}})),JM=Hs(t=>{const{data:e,children:n,x:r=0,y:o=0,key:i}=t;return{children:(t,a,s)=>{const{x:c,y:l}=a,{paddingLeft:u,paddingTop:f,marginLeft:d,marginTop:p}=s,{domain:h}=c.getOptions(),{domain:g}=l.getOptions(),m=Be(t),y=t.map(({points:t})=>Qs(t)),b=t.map(({x:t,y:e})=>[c.invert(t),l.invert(e)]),v=b.map(([t,e])=>({columnField:t,columnIndex:h.indexOf(t),columnValue:t,columnValuesLength:h.length,rowField:e,rowIndex:g.indexOf(e),rowValue:e,rowValuesLength:g.length})),x=v.map(t=>Array.isArray(n)?n:[n(t)].flat(1));return m.flatMap(t=>{const[n,a,s,c]=y[t],[l,h]=b[t],g=v[t];return x[t].map(m=>{var y,b;const{scale:v,key:x,encode:O,axis:w,interaction:j}=m,k=UM(m,["scale","key","encode","axis","interaction"]),A=null===(y=null==v?void 0:v.y)||void 0===y?void 0:y.guide,M={x:t_(null===(b=null==v?void 0:v.x)||void 0===b?void 0:b.guide)(g,e),y:e_(A)(g,e)};return Object.assign({data:e,parentKey:i,key:`${x}-${t}`,x:n+u+r+d,y:a+f+o+p,width:s,height:c,margin:0,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,frame:!0,scale:(0,N.A)({x:{facet:!1},y:{facet:!1}},v),axis:(0,N.A)({x:{tickCount:5},y:{tickCount:5}},w,M),legend:!1,encode:(0,N.A)({},O,{x:l,y:h}),interaction:(0,N.A)({},j,{legendFilter:!1})},k)})})}}}),QM=Hs(t=>{const{encode:e}=t,n=UM(t,["encode"]),{position:r=[],x:o=r,y:i=[...r].reverse()}=e,a=UM(e,["position","x","y"]),s=[];for(const t of[o].flat(1))for(const e of[i].flat(1))s.push({$x:t,$y:e});return Object.assign(Object.assign({},n),{data:s,encode:Object.assign(Object.assign({},a),{x:"$x",y:"$y"}),scale:Object.assign(Object.assign({},1===[o].flat(1).length&&{x:{paddingInner:0}}),1===[i].flat(1).length&&{y:{paddingInner:0}})})});function t_(t){return"function"==typeof t?t:null===t?()=>null:(e,n)=>{const{rowIndex:r,rowValuesLength:o}=e;if(r!==o-1)return YM(t,n)}}function e_(t){return"function"==typeof t?t:null===t?()=>null:(e,n)=>{const{columnIndex:r}=e;if(0!==r)return YM(t,n)}}const n_=()=>t=>[BM.of(t).call($M).call(RM).call(JM).call(QM).call(FM).call(DM).call(ZM).value()];var r_=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const o_=Ws(t=>({scale:{x:{guide:{type:"axisArc"},paddingOuter:0,paddingInner:.1},y:{guide:null,range:[0,1],paddingOuter:0,paddingInner:.1}}})),i_=Ws(t=>({coordinate:{type:"polar"}})),a_=t=>{const{encode:e}=t,n=r_(t,["encode"]),{position:r}=e;return Object.assign(Object.assign({},n),{encode:{x:r}})};function s_(t){return t=>null}function c_(t){const{points:e}=t,[n,r,o,i]=e,a=Ks(n,i),s=Gs(n,i),c=Js(s,Gs(r,o)),l=1/Math.sin(c/2),u=a/(1+l),f=u*Math.sqrt(2),[d,p]=o,h=Zs(s)+c/2,g=u*l;return[d+g*Math.sin(h)-f/2,p-g*Math.cos(h)-f/2,f,f]}const l_=()=>t=>[BM.of(t).call($M).call(a_).call(RM).call(i_).call(WM).call(HM,c_,s_,s_,{frame:!1}).call(FM).call(DM).call(o_).value()];function u_(t,e,n){const r=[0,n],o=[1-n,1];return"normal"===t?r:"reverse"===t?o:"alternate"===t?e%2==0?r:o:"reverse-alternate"===t?e%2==0?o:r:void 0}const f_=()=>t=>{const{children:e=[],duration:n=1e3,iterationCount:r=1,direction:o="normal",easing:i="ease-in-out-sine"}=t,a=e.length;if(!Array.isArray(e)||0===a)return[];const{key:s}=e[0],c=e.map(t=>Object.assign(Object.assign({},t),{key:s})).map(t=>function(t,e,n){const r=[t];for(;r.length;){const t=r.pop();t.animate=(0,N.A)({enter:{duration:e},update:{duration:e,easing:n,type:"morphing",fill:"both"},exit:{type:"fadeOut",duration:e}},t.animate||{});const{children:o}=t;Array.isArray(o)&&r.push(...o)}return t}(t,n,i));return function*(){let t,e=0;for(;"infinite"===r||e<r;){const[n,r]=u_(o,e,a);for(let e=n;e<r;e+=1){const n=Math.abs(e);t!==n&&(yield c[n]),t=n}e++}}};function d_(t,e,n){const{encode:r}=n;if(null===t)return[e];const o=function(t){return Array.isArray(t)?t:[t]}(t).map(t=>{var e;return[t,null===(e=Wg(r,t))||void 0===e?void 0:e[0]]}).filter(([,t])=>bt(t));return Array.from(C(e,t=>o.map(([,e])=>e[t]).join("-")).values())}function p_(t){return Array.isArray(t)?function(t){return(e,n,r)=>(n,r)=>t.reduce((t,o)=>0!==t?t:(0,Ec.A)(e[n][o],e[r][o]),0)}(t):"function"==typeof t?function(t){return(e,n,r)=>x_(n=>t(e[n]))}(t):"series"===t?m_:"value"===t?y_:"sum"===t?b_:"maxIndex"===t?v_:null}function h_(t,e){for(const n of t)n.sort(e)}function g_(t,e){return(null==e?void 0:e.domain)||Array.from(new Set(t))}function m_(t,e,n){return x_(t=>n[t])}function y_(t,e,n){return x_(t=>e[t])}function b_(t,e,n){const r=Be(t),o=Array.from(C(r,t=>n[+t]).entries()),i=new Map(o.map(([t,n])=>[t,n.reduce((t,n)=>t+ +e[n])]));return x_(t=>i.get(n[t]))}function v_(t,e,n){const r=Be(t),o=Array.from(C(r,t=>n[+t]).entries()),i=new Map(o.map(([t,n])=>[t,gc(n,t=>e[t])]));return x_(t=>i.get(n[t]))}function x_(t){return(e,n)=>(0,Ec.A)(t(e),t(n))}f_.props={};const O_=(t={})=>{const{groupBy:e="x",orderBy:n=null,reverse:r=!1,y:o="y",y1:i="y1",series:a=!0}=t;return(t,s)=>{var c;const{data:l,encode:u,style:f={}}=s,[d,p]=Wg(u,"y"),[h,g]=Wg(u,"y1"),[m]=a?Hg(u,"series","color"):Wg(u,"color"),y=d_(e,t,s),b=(null!==(c=p_(n))&&void 0!==c?c:()=>null)(l,d,m);b&&h_(y,b);const v=new Array(t.length),x=new Array(t.length),O=new Array(t.length),w=[],j=[];for(const t of y){r&&t.reverse();const e=h?+h[t[0]]:0,n=[],o=[];for(const r of t){const t=O[r]=+d[r]-e;t<0?o.push(r):t>=0&&n.push(r)}const i=n.length>0?n:o,a=o.length>0?o:n;let s=n.length-1,c=0;for(;s>0&&0===d[i[s]];)s--;for(;c<a.length-1&&0===d[a[c]];)c++;w.push(i[s]),j.push(a[c]);let l=e;for(const t of o.reverse()){const e=O[t];l=v[t]=(x[t]=l)+e}let u=e;for(const t of n){const e=O[t];e>0?u=v[t]=(x[t]=u)+e:v[t]=x[t]=u}}const k=new Set(w),A=new Set(j),M="y"===o?v:x,_="y"===i?v:x;let S;return S="point"===s.type?{y0:Rg(d,p),y:Ng(M,p)}:{y0:Rg(d,p),y:Ng(M,p),y1:Ng(_,g)},[t,(0,N.A)({},s,{encode:Object.assign({},S),style:Object.assign({first:(t,e)=>k.has(e),last:(t,e)=>A.has(e)},f)})]}};function w_(t,e){let n=0;if(void 0===e)for(let e of t)null!=e&&(e=+e)>=e&&++n;else{let r=-1;for(let o of t)null!=(o=e(o,++r,t))&&(o=+o)>=o&&++n}return n}function j_(t,e){const n=function(t,e){let n,r=0,o=0,i=0;if(void 0===e)for(let e of t)null!=e&&(e=+e)>=e&&(n=e-o,o+=n/++r,i+=n*(e-o));else{let a=-1;for(let s of t)null!=(s=e(s,++a,t))&&(s=+s)>=s&&(n=s-o,o+=n/++r,i+=n*(s-o))}if(r>1)return i/(r-1)}(t,e);return n?Math.sqrt(n):n}O_.props={};var k_=Array.prototype,A_=k_.slice;function M_(t){return()=>t}var __=n("./node_modules/.pnpm/d3-array@3.2.4/node_modules/d3-array/src/ticks.js");function S_(t){return Math.max(1,Math.ceil(Math.log(w_(t))/Math.LN2)+1)}function E_(){var t=L,e=pi,n=S_;function r(r){Array.isArray(r)||(r=Array.from(r));var o,i,a,s=r.length,c=new Array(s);for(o=0;o<s;++o)c[o]=t(r[o],o,r);var l=e(c),u=l[0],f=l[1],d=n(c,u,f);if(!Array.isArray(d)){const t=f,n=+d;if(e===pi&&([u,f]=function(t,e,n){let r;for(;;){const o=(0,__.lq)(t,e,n);if(o===r||0===o||!isFinite(o))return[t,e];o>0?(t=Math.floor(t/o)*o,e=Math.ceil(e/o)*o):o<0&&(t=Math.ceil(t*o)/o,e=Math.floor(e*o)/o),r=o}}(u,f,n)),(d=(0,__.Ay)(u,f,n))[0]<=u&&(a=(0,__.lq)(u,f,n)),d[d.length-1]>=f)if(t>=f&&e===pi){const t=(0,__.lq)(u,f,n);isFinite(t)&&(t>0?f=(Math.floor(f/t)+1)*t:t<0&&(f=(Math.ceil(f*-t)+1)/-t))}else d.pop()}for(var p=d.length,h=0,g=p;d[h]<=u;)++h;for(;d[g-1]>f;)--g;(h||g<p)&&(d=d.slice(h,g),p=g-h);var m,y=new Array(p+1);for(o=0;o<=p;++o)(m=y[o]=[]).x0=o>0?d[o-1]:u,m.x1=o<p?d[o]:f;if(isFinite(a)){if(a>0)for(o=0;o<s;++o)null!=(i=c[o])&&u<=i&&i<=f&&y[Math.min(p,Math.floor((i-u)/a))].push(r[o]);else if(a<0)for(o=0;o<s;++o)if(null!=(i=c[o])&&u<=i&&i<=f){const t=Math.floor((u-i)*a);y[Math.min(p,t+(d[t]<=i))].push(r[o])}}else for(o=0;o<s;++o)null!=(i=c[o])&&u<=i&&i<=f&&y[(0,il.Ay)(d,i,0,p)].push(r[o]);return y}return r.value=function(e){return arguments.length?(t="function"==typeof e?e:M_(e),r):t},r.domain=function(t){return arguments.length?(e="function"==typeof t?t:M_([t[0],t[1]]),r):e},r.thresholds=function(t){return arguments.length?(n="function"==typeof t?t:M_(Array.isArray(t)?A_.call(t):t),r):n},r}function P_(t,e,n=0,r=1/0,o){if(e=Math.floor(e),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(t.length-1,r)),!(n<=e&&e<=r))return t;for(o=void 0===o?Cc:Lc(o);r>n;){if(r-n>600){const i=r-n+1,a=e-n+1,s=Math.log(i),c=.5*Math.exp(2*s/3),l=.5*Math.sqrt(s*c*(i-c)/i)*(a-i/2<0?-1:1);P_(t,e,Math.max(n,Math.floor(e-a*c/i+l)),Math.min(r,Math.floor(e+(i-a)*c/i+l)),o)}const i=t[e];let a=n,s=r;for(L_(t,n,e),o(t[r],i)>0&&L_(t,n,r);a<s;){for(L_(t,a,s),++a,--s;o(t[a],i)<0;)++a;for(;o(t[s],i)>0;)--s}0===o(t[n],i)?L_(t,n,s):(++s,L_(t,s,r)),s<=e&&(n=s+1),e<=s&&(r=s-1)}return t}function L_(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}var C_=n("./node_modules/.pnpm/d3-array@3.2.4/node_modules/d3-array/src/number.js");function z_(t,e,n){if((r=(t=Float64Array.from((0,C_.n)(t,n))).length)&&!isNaN(e=+e)){if(e<=0||r<2)return ep(t);if(e>=1)return Ye(t);var r,o=(r-1)*e,i=Math.floor(o),a=Ye(P_(t,i).subarray(0,i+1));return a+(ep(t.subarray(i+1))-a)*(o-i)}}function T_(t,e,n=C_.A){if(!isNaN(e=+e)){if(r=Float64Array.from(t,(e,r)=>(0,C_.A)(n(t[r],r,t))),e<=0)return ph(r);if(e>=1)return gc(r);var r,o=Uint32Array.from(t,(t,e)=>e),i=r.length-1,a=Math.floor(i*e);return P_(o,a,0,i,(t,e)=>Cc(r[t],r[e])),a=function(t,e=Ec.A){let n,r=!1;if(1===e.length){let o;for(const i of t){const t=e(i);(r?(0,Ec.A)(t,o)>0:0===(0,Ec.A)(t,t))&&(n=i,o=t,r=!0)}}else for(const o of t)(r?e(o,n)>0:0===e(o,o))&&(n=o,r=!0);return n}(o.subarray(0,a+1),t=>r[t]),a>=0?a:-1}}function B_(t,e){return z_(t,.5,e)}function I_(t,e){return T_(t,.5,e)}var N_=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};function R_(t){return e=>null===e?t:`${t} of ${e}`}function F_(){return[(t,e)=>hh(t,t=>+e[t]),R_("mean")]}function D_(){return[(t,e)=>B_(t,t=>+e[t]),R_("median")]}function $_(){return[(t,e)=>Ye(t,t=>+e[t]),R_("max")]}function W_(){return[(t,e)=>ep(t,t=>+e[t]),R_("min")]}function H_(){return[(t,e)=>t.length,R_("count")]}function q_(){return[(t,e)=>qe(t,t=>+e[t]),R_("sum")]}function Y_(){return[(t,e)=>e[t[0]],R_("first")]}function X_(){return[(t,e)=>e[t[t.length-1]],R_("last")]}const G_=(t={})=>{const{groupBy:e}=t,n=N_(t,["groupBy"]);return(t,r)=>{const{data:o,encode:i}=r,a=e(t,r);if(!a)return[t,r];const s=Object.entries(n).map(([t,e])=>{const[n,r]=function(t){if("function"==typeof t)return[t,null];const e={mean:F_,max:$_,count:H_,first:Y_,last:X_,sum:q_,min:W_,median:D_}[t];if(!e)throw new Error(`Unknown reducer: ${t}.`);return e()}(e),[s,c]=Wg(i,t),l=((t,e)=>{if(t)return t;const{from:n}=e;if(!n)return t;const[,r]=Wg(i,n);return r})(c,e),u=a.map(t=>n(t,null!=s?s:o));return[t,Object.assign(Object.assign({},Dg(u,(null==r?void 0:r(l))||l)),{aggregate:!0})]}),c=Object.keys(i).map(t=>{const[e,n]=Wg(i,t),r=a.map(t=>e[t[0]]);return[t,Ng(r,n)]}),l=a.map(t=>o[t[0]]);return[Be(a),(0,N.A)({},r,{data:l,encode:Object.fromEntries([...c,...s])})]}};G_.props={};var V_=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const K_="thresholds";function U_(t){const[e,n]=pi(t);return Math.min(200,function(t,e,n){const r=w_(t),o=j_(t);return r&&o?Math.ceil((n-e)*Math.cbrt(r)/(3.49*o)):1}(t,e,n))}const Z_=(t={})=>{const{groupChannels:e=["color"],binChannels:n=["x","y"]}=t,r=V_(t,["groupChannels","binChannels"]),o={};return G_(Object.assign(Object.assign(Object.assign({},Object.fromEntries(Object.entries(r).filter(([t])=>!t.startsWith(K_)))),Object.fromEntries(n.flatMap(t=>{const e=([e])=>+o[t].get(e).split(",")[1];return e.from=t,[[t,([e])=>+o[t].get(e).split(",")[0]],[`${t}1`,e]]}))),{groupBy:(t,i)=>{const{encode:a}=i,s=n.map(t=>{const[e]=Wg(a,t);return e}),c=xt(r,K_),l=t.filter(t=>s.every(e=>bt(e[t]))),u=[...e.map(t=>{const[e]=Wg(a,t);return e}).filter(bt).map(t=>e=>t[e]),...n.map((t,e)=>{const n=s[e],r=c[t]||U_(n),i=E_().thresholds(r).value(t=>+n[t])(l),a=new Map(i.flatMap(t=>{const{x0:e,x1:n}=t,r=`${e},${n}`;return t.map(t=>[t,r])}));return o[t]=a,t=>a.get(t)})];return Array.from(C(l,t=>u.map(e=>e(t)).join("-")).values())}}))};Z_.props={};const J_=(t={})=>{const{thresholds:e}=t;return Z_(Object.assign(Object.assign({},t),{thresholdsX:e,groupChannels:["color"],binChannels:["x"]}))};J_.props={};var Q_=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const tS=(t={})=>{const{groupBy:e="x",reverse:n=!1,orderBy:r,padding:o}=t;Q_(t,["groupBy","reverse","orderBy","padding"]);return(t,i)=>{const{data:a,encode:s,scale:c}=i,{series:l}=c,[u]=Wg(s,"y"),[f]=Hg(s,"series","color"),d=g_(f,l),p=(0,N.A)({},i,{scale:{series:{domain:d,paddingInner:o}}}),h=d_(e,t,i),g=p_(r);if(!g)return[t,(0,N.A)(p,{encode:{series:Ng(f)}})];const m=g(a,u,f);m&&h_(h,m);const y=new Array(t.length);for(const t of h){n&&t.reverse();for(let e=0;e<t.length;e++)y[t[e]]=d[e]}return[t,(0,N.A)(p,{encode:{series:Ng(r?y:f)}})]}};function eS(t,e,n){if(null===t)return[-.5,.5];const r=g_(t,e),o=new Q({domain:r,range:[0,1],padding:n}).getBandWidth();return[-o/2,o/2]}function nS(t,e,n){return e*(1-t)+n*t}tS.props={};const rS=(t={})=>{const{padding:e=0,paddingX:n=e,paddingY:r=e,random:o=Math.random}=t;return(t,e)=>{const{encode:i,scale:a}=e,{x:s,y:c}=a,[l]=Wg(i,"x"),[u]=Wg(i,"y"),f=eS(l,s,n),d=eS(u,c,r),p=t.map(()=>nS(o(),...d)),h=t.map(()=>nS(o(),...f));return[t,(0,N.A)({scale:{x:{padding:.5},y:{padding:.5}}},e,{encode:{dy:Ng(p),dx:Ng(h)}})]}};rS.props={};const oS=(t={})=>{const{padding:e=0,random:n=Math.random}=t;return(t,r)=>{const{encode:o,scale:i}=r,{x:a}=i,[s]=Wg(o,"x"),c=eS(s,a,e),l=t.map(()=>nS(n(),...c));return[t,(0,N.A)({scale:{x:{padding:.5}}},r,{encode:{dx:Ng(l)}})]}};oS.props={};const iS=(t={})=>{const{padding:e=0,random:n=Math.random}=t;return(t,r)=>{const{encode:o,scale:i}=r,{y:a}=i,[s]=Wg(o,"y"),c=eS(s,a,e),l=t.map(()=>nS(n(),...c));return[t,(0,N.A)({scale:{y:{padding:.5}}},r,{encode:{dy:Ng(l)}})]}};iS.props={};var aS=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const sS=(t={})=>{const{groupBy:e="x"}=t;return(t,n)=>{const{encode:r,style:o={}}=n,i=aS(r,["x"]),a=Object.entries(i).filter(([t])=>t.startsWith("y")).map(([t])=>[t,Wg(r,t)[0]]),s=a.map(([e])=>[e,new Array(t.length)]),c=d_(e,t,n),l=new Array(c.length);for(let t=0;t<c.length;t++){const e=c[t].flatMap(t=>a.map(([,e])=>+e[t])),[n,r]=pi(e);l[t]=(n+r)/2}const u=Math.max(...l);for(let t=0;t<c.length;t++){const e=u-l[t],n=c[t];for(const t of n)for(let n=0;n<a.length;n++){const[,r]=a[n],[,o]=s[n];o[t]=+r[t]+e}}return[t,(0,N.A)({},n,{encode:Object.fromEntries(s.map(([t,e])=>[t,Ng(e,Wg(r,t)[1])])),style:Object.assign({first:(t,e)=>0===e,last:(t,e)=>e===c.length-1},o)})]}};sS.props={};const cS=(t={})=>{const{groupBy:e="x"}=t;return(t,n)=>{const{encode:r}=n,[o]=Wg(r,"y"),[i,a]=Wg(r,"y1"),s=d_(e,t,n),c=new Array(t.length);for(const t of s){const e=t.map(t=>+o[t]);for(let n=0;n<t.length;n++){const r=t[n],i=Math.max(...e.filter((t,e)=>e!==n));c[r]=+o[r]>i?i:o[r]}}return[t,(0,N.A)({},n,{encode:{y1:Ng(c,a)}})]}};cS.props={};const lS=t=>{const{groupBy:e=["x"],reducer:n=(t,e)=>e[t[0]],orderBy:r=null,reverse:o=!1,duration:i}=t;return(t,a)=>{const{encode:s}=a,c=(Array.isArray(e)?e:[e]).map(t=>[t,Wg(s,t)[0]]);if(0===c.length)return[t,a];let l=[t];for(const[,t]of c){const e=[];for(const n of l){const r=Array.from(C(n,e=>t[e]).values());e.push(...r)}l=e}if(r){const[t]=Wg(s,r);t&&l.sort((e,r)=>n(e,t)-n(r,t)),o&&l.reverse()}const u=(i||3e3)/l.length,[f]=i?[$g(t,u)]:Hg(s,"enterDuration",$g(t,u)),[d]=Hg(s,"enterDelay",$g(t,0)),p=new Array(t.length);for(let t=0,e=0;t<l.length;t++){const n=l[t],r=Ye(n,t=>+f[t]);for(const t of n)p[t]=+d[t]+e;e+=r}return[t,(0,N.A)({},a,{encode:{enterDuration:Fg(f),enterDelay:Fg(p)}})]}};lS.props={};var uS=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const fS=(t={})=>{const{groupBy:e="x",basis:n="max"}=t;return(t,r)=>{const{encode:o,tooltip:i}=r,a=uS(o,["x"]),s=Object.entries(a).filter(([t])=>t.startsWith("y")).map(([t])=>[t,Wg(o,t)[0]]),[,c]=s.find(([t])=>"y"===t),l=s.map(([e])=>[e,new Array(t.length)]),u=d_(e,t,r),f=function(t){if("function"==typeof t)return t;const e={min:(t,e)=>ep(t,t=>e[+t]),max:(t,e)=>Ye(t,t=>e[+t]),first:(t,e)=>e[t[0]],last:(t,e)=>e[t[t.length-1]],mean:(t,e)=>hh(t,t=>e[+t]),median:(t,e)=>B_(t,t=>e[+t]),sum:(t,e)=>qe(t,t=>e[+t]),deviation:(t,e)=>j_(t,t=>e[+t])};return e[t]||Ye}(n);for(const t of u){const e=f(t,c);for(const n of t)for(let t=0;t<s.length;t++){const[,r]=s[t],[,o]=l[t];o[n]=+r[n]/e}}const d=At(i)||(null==i?void 0:i.items)&&0!==(null==i?void 0:i.items.length);return[t,(0,N.A)({},r,Object.assign({encode:Object.fromEntries(l.map(([t,e])=>[t,Ng(e,Wg(o,t)[1])]))},!d&&o.y0&&{tooltip:{items:[{channel:"y0"}]}}))]}};function dS(t,e){return[t[0]]}function pS(t,e){return[t[t.length-1]]}function hS(t,e){return[t[gc(t,t=>e[t])]]}function gS(t,e){return[t[ph(t,t=>e[t])]]}fS.props={};const mS=(t={})=>{const{groupBy:e="series",channel:n,selector:r}=t;return(t,o)=>{const{encode:i}=o,a=d_(e,t,o),[s]=Wg(i,n),c=function(t){return"function"==typeof t?t:{first:dS,last:pS,max:hS,min:gS}[t]||dS}(r);return[a.flatMap(t=>c(t,s)),o]}};mS.props={};var yS=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const bS=(t={})=>{const{selector:e}=t,n=yS(t,["selector"]);return mS(Object.assign({channel:"x",selector:e},n))};bS.props={};var vS=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const xS=(t={})=>{const{selector:e}=t,n=vS(t,["selector"]);return mS(Object.assign({channel:"y",selector:e},n))};xS.props={};var OS=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const wS=(t={})=>{const{channels:e=["x","y"]}=t,n=OS(t,["channels"]);return G_(Object.assign(Object.assign({},n),{groupBy:(t,n)=>d_(e,t,n)}))};wS.props={};const jS=(t={})=>wS(Object.assign(Object.assign({},t),{channels:["x","color","series"]}));jS.props={};const kS=(t={})=>wS(Object.assign(Object.assign({},t),{channels:["y","color","series"]}));kS.props={};const AS=(t={})=>wS(Object.assign(Object.assign({},t),{channels:["color"]}));AS.props={};const MS=(t={})=>(e,n)=>{const{reverse:r,slice:o,channel:i,by:a,ordinal:s=!0,reducer:c}=t,{encode:l,scale:u={}}=n,f=u[i].domain,[d]=Wg(l,null!=a?a:i),[p]=Wg(l,i),h=function(t,e,n){const{by:r=t,reducer:o="max"}=e,[i]=Wg(n,r);if("function"==typeof o)return t=>o(t,i);if("max"===o)return t=>Ye(t,t=>+i[t]);if("min"===o)return t=>ep(t,t=>+i[t]);if("sum"===o)return t=>qe(t,t=>+i[t]);if("median"===o)return t=>B_(t,t=>+i[t]);if("mean"===o)return t=>hh(t,t=>+i[t]);if("first"===o)return t=>i[t[0]];if("last"===o)return t=>i[t[t.length-1]];throw new Error(`Unknown reducer: ${o}`)}(i,{by:a,reducer:c},l),g=function(t,e,n){if(!Array.isArray(n))return t;const r=new Set(n);return t.filter(t=>r.has(e[t]))}(e,p,f),m=function(t,e,n){return(2!==e.length?Pc(T(t,e,n),([t,e],[n,r])=>(0,Ec.A)(e,r)||(0,Ec.A)(t,n)):Pc(C(t,n),([t,n],[r,o])=>e(n,o)||(0,Ec.A)(t,r))).map(([t])=>t)}(g,h,t=>p[t]),y=s?e:Pc(e,t=>d[t]);r&&(!s&&y.reverse(),m.reverse());const b=o?m.slice(..."number"==typeof o?[0,o]:o):m;return[y,(0,N.A)(n,{scale:{[i]:{domain:b}}})]};MS.props={};const _S=(t={})=>MS(Object.assign(Object.assign({},t),{channel:"x"}));_S.props={};const SS=(t={})=>MS(Object.assign(Object.assign({},t),{channel:"y"}));SS.props={};const ES=(t={})=>MS(Object.assign(Object.assign({},t),{channel:"color"}));ES.props={};const PS=(t={})=>{const{field:e,channel:n="y",reducer:r="sum"}=t;return(t,o)=>{const{data:i,encode:a}=o,[s]=Wg(a,"x"),c=e?function(t,e){return t.map("string"==typeof e?t=>t[e]:e)}(i,e):Wg(a,n)[0],l=function(t,e){if("function"==typeof t)return n=>t(n,e);if("sum"===t)return t=>qe(t,t=>+e[t]);throw new Error(`Unknown reducer: ${t}`)}(r,c),u=B(t,l,t=>s[t]).map(t=>t[1]);return[t,(0,N.A)({},o,{scale:{x:{flex:u}}})]}};function LS(t){const{padding:e=0,direction:n="col"}=t;return(t,r,o)=>{const i=t.length;if(0===i)return[];const{innerWidth:a,innerHeight:s}=o;let c=Math.ceil(Math.sqrt(r/(s/a))),l=a/c,u=Math.ceil(r/c),f=u*l;for(;f>s;)c+=1,l=a/c,u=Math.ceil(r/c),f=u*l;const d=s-u*l,p=u<=1?0:d/(u-1),[h,g]=u<=1?[(a-i*l)/(i-1),(s-l)/2]:[0,0];return t.map((t,r)=>{const[o,i,a,s]=Qs(t),f="col"===n?r%c:Math.floor(r/u),m="col"===n?Math.floor(r/c):r%u;return`translate(${f*l-o+h*f+.5*e}, ${(u-m-1)*l+d-i-p*m-g+.5*e}) scale(${(l-e)/a}, ${(l-e)/s})`})}}PS.props={};const CS=t=>(e,n)=>[e,(0,N.A)({},n,{modifier:LS(t),axis:!1})];function zS(t,e,n,r){const o=t.length;if(r>=o||0===r)return t;const i=n=>1*e[t[n]],a=e=>1*n[t[e]],s=[],c=(o-2)/(r-2);let l,u,f,d=0;s.push(d);for(let t=0;t<r-2;t++){let e=0,n=0,r=Math.floor((t+1)*c)+1,p=Math.floor((t+2)*c)+1;p=Math.min(p,o);const h=p-r;for(;r<p;r++)e+=i(r),n+=a(r);e/=h,n/=h;let g=Math.floor((t+0)*c)+1;const m=Math.floor((t+1)*c)+1,y=[i(d),a(d)];for(l=u=-1;g<m;g++)u=.5*Math.abs((y[0]-e)*(i(g)-y[1])-(y[0]-a(g))*(n-y[0])),u>l&&(l=u,f=g);s.push(f),d=f}return s.push(o-1),s.map(e=>t[e])}CS.props={};const TS=(t={})=>{const{strategy:e="median",thresholds:n=2e3,groupBy:r=["series","color"]}=t,o=function(t){if("function"==typeof t)return t;if("lttb"===t)return zS;const e={first:t=>[t[0]],last:t=>[t[t.length-1]],min:(t,e,n)=>[t[ph(t,t=>n[t])]],max:(t,e,n)=>[t[gc(t,t=>n[t])]],median:(t,e,n)=>[t[I_(t,t=>n[t])]]},n=e[t]||e.median;return(t,e,r,o)=>{const i=function(t,e){const n=t.length,r=[];let o=0;for(;o<n;)r.push(t.slice(o,o+=e));return r}(t,Math.max(1,Math.floor(t.length/o)));return i.flatMap(t=>n(t,e,r))}}(e);return(t,e)=>{const{encode:i}=e,a=d_(r,t,e),[s]=Wg(i,"x"),[c]=Wg(i,"y");return[a.flatMap(t=>o(t,s,c,n)),e]}};TS.props={};const BS=(t={})=>(e,n)=>{const{encode:r,data:o}=n,i=Object.keys(t).length>0,a=Object.entries(t).map(([t,e])=>{const[n]=Wg(r,t);if(!n)return null;const[o,i=!0]=function(t){return"object"==typeof t?[t.value,t.ordinal]:[t,!0]}(e);if("function"==typeof o)return t=>o(n[t]);if(i){const t=Array.isArray(o)?o:[o];return 0===t.length?null:e=>t.includes(n[e])}{const[t,e]=o;return r=>n[r]>=t&&n[r]<=e}}).filter(bt),s=e.filter(t=>a.every(e=>e(t))),c=s.map((t,e)=>e);if(0===a.length&&i){const t=function(t){var e;const{encode:n}=t,r=Object.assign(Object.assign({},t),{encode:Object.assign(Object.assign({},t.encode),{y:Object.assign(Object.assign({},t.encode.y),{value:[]})})}),o=null===(e=null==n?void 0:n.color)||void 0===e?void 0:e.field;if(!n||!o)return r;let i;for(const[t,e]of Object.entries(n))"x"!==t&&"y"!==t||e.field!==o||(i=Object.assign(Object.assign({},i),{[t]:Object.assign(Object.assign({},e),{value:[]})}));return i?Object.assign(Object.assign({},t),{encode:Object.assign(Object.assign({},t.encode),i)}):r}(n);return[[],t]}const l=Object.entries(r).map(([t,e])=>[t,Object.assign(Object.assign({},e),{value:c.map(t=>e.value[s[t]]).filter(t=>void 0!==t)})]);return[c,(0,N.A)({},n,{encode:Object.fromEntries(l),data:s.map(t=>o[t])})]};BS.props={};var IS={},NS={};function RS(t){return new Function("d","return {"+t.map(function(t,e){return JSON.stringify(t)+": d["+e+'] || ""'}).join(",")+"}")}function FS(t){var e=Object.create(null),n=[];return t.forEach(function(t){for(var r in t)r in e||n.push(e[r]=r)}),n}function DS(t,e){var n=t+"",r=n.length;return r<e?new Array(e-r+1).join(0)+n:n}function $S(t){var e=t.getUTCHours(),n=t.getUTCMinutes(),r=t.getUTCSeconds(),o=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":function(t){return t<0?"-"+DS(-t,6):t>9999?"+"+DS(t,6):DS(t,4)}(t.getUTCFullYear())+"-"+DS(t.getUTCMonth()+1,2)+"-"+DS(t.getUTCDate(),2)+(o?"T"+DS(e,2)+":"+DS(n,2)+":"+DS(r,2)+"."+DS(o,3)+"Z":r?"T"+DS(e,2)+":"+DS(n,2)+":"+DS(r,2)+"Z":n||e?"T"+DS(e,2)+":"+DS(n,2)+"Z":"")}function WS(t){var e=new RegExp('["'+t+"\n\r]"),n=t.charCodeAt(0);function r(t,e){var r,o=[],i=t.length,a=0,s=0,c=i<=0,l=!1;function u(){if(c)return NS;if(l)return l=!1,IS;var e,r,o=a;if(34===t.charCodeAt(o)){for(;a++<i&&34!==t.charCodeAt(a)||34===t.charCodeAt(++a););return(e=a)>=i?c=!0:10===(r=t.charCodeAt(a++))?l=!0:13===r&&(l=!0,10===t.charCodeAt(a)&&++a),t.slice(o+1,e-1).replace(/""/g,'"')}for(;a<i;){if(10===(r=t.charCodeAt(e=a++)))l=!0;else if(13===r)l=!0,10===t.charCodeAt(a)&&++a;else if(r!==n)continue;return t.slice(o,e)}return c=!0,t.slice(o,i)}for(10===t.charCodeAt(i-1)&&--i,13===t.charCodeAt(i-1)&&--i;(r=u())!==NS;){for(var f=[];r!==IS&&r!==NS;)f.push(r),r=u();e&&null==(f=e(f,s++))||o.push(f)}return o}function o(e,n){return e.map(function(e){return n.map(function(t){return a(e[t])}).join(t)})}function i(e){return e.map(a).join(t)}function a(t){return null==t?"":t instanceof Date?$S(t):e.test(t+="")?'"'+t.replace(/"/g,'""')+'"':t}return{parse:function(t,e){var n,o,i=r(t,function(t,r){if(n)return n(t,r-1);o=t,n=e?function(t,e){var n=RS(t);return function(r,o){return e(n(r),o,t)}}(t,e):RS(t)});return i.columns=o||[],i},parseRows:r,format:function(e,n){return null==n&&(n=FS(e)),[n.map(a).join(t)].concat(o(e,n)).join("\n")},formatBody:function(t,e){return null==e&&(e=FS(t)),o(t,e).join("\n")},formatRows:function(t){return t.map(i).join("\n")},formatRow:i,formatValue:a}}function HS(t){for(var e in t){var n,r,o=t[e].trim();if(o)if("true"===o)o=!0;else if("false"===o)o=!1;else if("NaN"===o)o=NaN;else if(isNaN(n=+o)){if(!(r=o.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/)))continue;qS&&r[4]&&!r[7]&&(o=o.replace(/-/g,"/").replace(/T/," ")),o=new Date(o)}else o=n;else o=null;t[e]=o}return t}const qS=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours();var YS=function(t,e,n,r){return new(n||(n=Promise))(function(o,i){function a(t){try{c(r.next(t))}catch(t){i(t)}}function s(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){t.done?o(t.value):function(t){return t instanceof n?t:new n(function(e){e(t)})}(t.value).then(a,s)}c((r=r.apply(t,e||[])).next())})};const XS=t=>{const{value:e,format:n=e.split(".").pop(),delimiter:r=",",autoType:o=!0}=t;return()=>YS(void 0,void 0,void 0,function*(){const t=yield fetch(e);if("csv"===n){const e=yield t.text();return WS(r).parse(e,o?HS:pt)}if("json"===n)return yield t.json();throw new Error(`Unknown format: ${n}.`)})};XS.props={};const GS=t=>{const{value:e}=t;return()=>e};GS.props={};const VS=t=>{const{fields:e=[]}=t,n=(r=!0,e.map(t=>{if(Array.isArray(t)){const[e,n=r]=t;return[e,n]}return[t,r]}));var r;return t=>[...t].sort((t,e)=>n.reduce((n,[r,o=!0])=>0!==n?n:o?t[r]<e[r]?-1:+(t[r]!==e[r]):t[r]>e[r]?-1:+(t[r]!==e[r]),0))};VS.props={};const KS=t=>{const{callback:e}=t;return t=>Array.isArray(t)?[...t].sort(e):t};function US(t){return null!=t&&!Number.isNaN(t)}KS.props={};const ZS=t=>{const{callback:e=US}=t;return t=>t.filter(e)};ZS.props={};const JS=t=>{const{fields:e}=t;return t=>t.map(t=>function(t,e=[]){return e.reduce((e,n)=>(n in t&&(e[n]=t[n]),e),{})}(t,e))};JS.props={};const QS=t=>e=>{if(!t||0===Object.keys(t).length)return e;return e.map(e=>Object.entries(e).reduce((e,[n,r])=>(e[t[n]||n]=r,e),{}))};QS.props={};const tE=t=>{const{fields:e,key:n="key",value:r="value"}=t;return t=>{return(o=e)&&0!==Object.keys(o).length?t.flatMap(t=>e.map(e=>Object.assign(Object.assign({},t),{[n]:e,[r]:t[e]}))):t;var o}};tE.props={};const eE=t=>{const{start:e,end:n}=t;return t=>t.slice(e,n)};eE.props={};const nE=t=>{const{callback:e=pt}=t;return t=>e(t)};nE.props={};const rE=t=>{const{callback:e=pt}=t;return t=>Array.isArray(t)?t.map(e):t};function oE(t){return"string"==typeof t?e=>e[t]:t}rE.props={};const iE=t=>{const{join:e,on:n,select:r=[],as:o=r,unknown:i=NaN}=t,[a,s]=n,c=oE(s),l=oE(a),u=T(e,([t])=>t,t=>c(t));return t=>t.map(t=>{const e=u.get(l(t));return Object.assign(Object.assign({},t),r.reduce((t,n,r)=>(t[o[r]]=e?e[n]:i,t),{}))})};iE.props={};var aE=n("./node_modules/.pnpm/pdfast@0.2.0/node_modules/pdfast/src/index.js"),sE=n.n(aE);const cE=t=>{const{field:e,groupBy:n,as:r=["y","size"],min:o,max:i,size:a=10,width:s}=t,[c,l]=r;return t=>{const r=Array.from(C(t,t=>n.map(e=>t[e]).join("-")).values());return r.map(t=>{const n=sE().create(t.map(t=>t[e]),{min:o,max:i,size:a,width:s}),r=n.map(t=>t.x),u=n.map(t=>t.y);return Object.assign(Object.assign({},t[0]),{[c]:r,[l]:u})})}};cE.props={};const lE=()=>t=>(console.log("G2 data section:",t),t);lE.props={};var uE=function(t,e,n,r){return new(n||(n=Promise))(function(o,i){function a(t){try{c(r.next(t))}catch(t){i(t)}}function s(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){t.done?o(t.value):function(t){return t instanceof n?t:new n(function(e){e(t)})}(t.value).then(a,s)}c((r=r.apply(t,e||[])).next())})};const fE=Math.PI/180,dE=2048;function pE(t){return t.text}function hE(){return"serif"}function gE(){return"normal"}function mE(t){return t.value}function yE(){return 90*~~(2*Math.random())}function bE(){return 1}function vE(){}function xE(t,e,n,r){if(e.sprite)return;const o=t.context,i=t.ratio;o.clearRect(0,0,2048/i,dE/i);let a=0,s=0,c=0;const l=n.length;for(--r;++r<l;){e=n[r],o.save(),o.font=e.style+" "+e.weight+" "+~~((e.size+1)/i)+"px "+e.font;let t=o.measureText(e.text+"m").width*i,l=e.size<<1;if(e.rotate){const n=Math.sin(e.rotate*fE),r=Math.cos(e.rotate*fE),o=t*r,i=t*n,a=l*r,s=l*n;t=Math.max(Math.abs(o+s),Math.abs(o-s))+31>>5<<5,l=~~Math.max(Math.abs(i+a),Math.abs(i-a))}else t=t+31>>5<<5;if(l>c&&(c=l),a+t>=2048&&(a=0,s+=c,c=0),s+l>=dE)break;o.translate((a+(t>>1))/i,(s+(l>>1))/i),e.rotate&&o.rotate(e.rotate*fE),o.fillText(e.text,0,0),e.padding&&(o.lineWidth=2*e.padding,o.strokeText(e.text,0,0)),o.restore(),e.width=t,e.height=l,e.xoff=a,e.yoff=s,e.x1=t>>1,e.y1=l>>1,e.x0=-e.x1,e.y0=-e.y1,e.hasText=!0,a+=t}const u=o.getImageData(0,0,2048/i,dE/i).data,f=[];for(;--r>=0;){if(!(e=n[r]).hasText)continue;const t=e.width,o=t>>5;let i=e.y1-e.y0;for(let t=0;t<i*o;t++)f[t]=0;if(a=e.xoff,null==a)return;s=e.yoff;let c=0,l=-1;for(let n=0;n<i;n++){for(let e=0;e<t;e++){const t=u[2048*(s+n)+(a+e)<<2]?1<<31-e%32:0;f[o*n+(e>>5)]|=t,c|=t}c?l=n:(e.y0++,i--,n--,s++)}e.y1=e.y0+l,e.sprite=f.slice(0,(e.y1-e.y0)*o)}}function OE(t,e,n){const r=t.sprite,o=t.width>>5,i=t.x-(o<<4),a=127&i,s=32-a,c=t.y1-t.y0;let l,u=(t.y+t.y0)*(n>>=5)+(i>>5);for(let t=0;t<c;t++){l=0;for(let n=0;n<=o;n++)if((l<<s|(n<o?(l=r[t*o+n])>>>a:0))&e[u+n])return!0;u+=n}return!1}function wE(t,e){const n=t[0],r=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>r.x&&(r.x=e.x+e.x1),e.y+e.y1>r.y&&(r.y=e.y+e.y1)}function jE(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}function kE(t){const e=t[0]/t[1];return function(t){return[e*(t*=.1)*Math.cos(t),t*Math.sin(t)]}}function AE(t){const e=[];let n=-1;for(;++n<t;)e[n]=0;return e}function ME(){return document.createElement("canvas")}function _E(t){return"function"==typeof t?t:function(){return t}}const SE={archimedean:kE,rectangular:function(t){const e=4*t[0]/t[1];let n=0,r=0;return function(t){const o=t<0?-1:1;switch(Math.sqrt(1+4*o*t)-o&3){case 0:n+=e;break;case 1:r+=4;break;case 2:n-=e;break;default:r-=4}return[n,r]}}};function EE(){let t=[256,256],e=pE,n=hE,r=mE,o=gE,i=yE,a=bE,s=kE,c=Math.random,l=vE,u=[],f=null,d=1/0,p=ME;const h=gE,g={};function m(e,n,r){const o=n.x,i=n.y,a=Math.sqrt(t[0]*t[0]+t[1]*t[1]),l=s(t),u=c()<.5?1:-1;let f,d,p,h=-u;for(;(f=l(h+=u))&&(d=~~f[0],p=~~f[1],!(Math.min(Math.abs(d),Math.abs(p))>=a));)if(n.x=o+d,n.y=i+p,!(n.x+n.x0<0||n.y+n.y0<0||n.x+n.x1>t[0]||n.y+n.y1>t[1])&&(!r||!OE(n,e,t[0]))&&(!r||jE(n,r))){const r=n.sprite,o=n.width>>5,i=t[0]>>5,a=n.x-(o<<4),s=127&a,c=32-s,l=n.y1-n.y0;let u,f=(n.y+n.y0)*i+(a>>5);for(let t=0;t<l;t++){u=0;for(let n=0;n<=o;n++)e[f+n]|=u<<c|(n<o?(u=r[t*o+n])>>>s:0);f+=i}return delete n.sprite,!0}return!1}return g.start=function(){const[s,y]=t,b=function(t){t.width=t.height=1;const e=Math.sqrt(t.getContext("2d").getImageData(0,0,1,1).data.length>>2);t.width=2048/e,t.height=dE/e;const n=t.getContext("2d");return n.fillStyle=n.strokeStyle="red",n.textAlign="center",n.textBaseline="middle",{context:n,ratio:e}}(p()),v=g.board?g.board:AE((t[0]>>5)*t[1]),x=u.length,O=[],w=u.map(function(t,s,c){return t.text=e.call(this,t,s,c),t.font=n.call(this,t,s,c),t.style=h.call(this,t,s,c),t.weight=o.call(this,t,s,c),t.rotate=i.call(this,t,s,c),t.size=~~r.call(this,t,s,c),t.padding=a.call(this,t,s,c),t}).sort(function(t,e){return e.size-t.size});let j=-1,k=g.board?[{x:0,y:0},{x:s,y}]:void 0;function A(){const e=Date.now();for(;Date.now()-e<d&&++j<x;){const e=w[j];e.x=s*(c()+.5)>>1,e.y=y*(c()+.5)>>1,xE(b,e,w,j),e.hasText&&m(v,e,k)&&(l.call(null,"word",{cloud:g,word:e}),O.push(e),k?g.hasImage||wE(k,e):k=[{x:e.x+e.x0,y:e.y+e.y0},{x:e.x+e.x1,y:e.y+e.y1}],e.x-=t[0]>>1,e.y-=t[1]>>1)}g._tags=O,g._bounds=k,j>=x&&(g.stop(),l.call(null,"end",{cloud:g,words:O,bounds:k}))}return f&&clearInterval(f),f=setInterval(A,0),A(),g},g.stop=function(){return f&&(clearInterval(f),f=null),g},g.createMask=e=>{const n=document.createElement("canvas"),[r,o]=t;if(!r||!o)return;const i=r>>5,a=AE((r>>5)*o);n.width=r,n.height=o;const s=n.getContext("2d");s.drawImage(e,0,0,e.width,e.height,0,0,r,o);const c=s.getImageData(0,0,r,o).data;for(let t=0;t<o;t++)for(let e=0;e<r;e++){const n=t*r+e<<2;a[i*t+(e>>5)]|=c[n]>=250&&c[n+1]>=250&&c[n+2]>=250?1<<31-e%32:0}g.board=a,g.hasImage=!0},g.timeInterval=function(t){d=t??1/0},g.words=function(t){u=t},g.size=function(e=[]){t=[+e[0],+e[1]]},g.text=function(t){e=_E(t)},g.font=function(t){n=_E(t)},g.fontWeight=function(t){o=_E(t)},g.rotate=function(t){i=_E(t)},g.canvas=function(t){p=_E(t)},g.spiral=function(t){s=SE[t]||t},g.fontSize=function(t){r=_E(t)},g.padding=function(t){a=_E(t)},g.random=function(t){c=_E(t)},g.on=function(t){l=_E(t)},g}var PE=function(t,e,n,r){return new(n||(n=Promise))(function(o,i){function a(t){try{c(r.next(t))}catch(t){i(t)}}function s(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){t.done?o(t.value):function(t){return t instanceof n?t:new n(function(e){e(t)})}(t.value).then(a,s)}c((r=r.apply(t,e||[])).next())})},LE=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const CE={fontSize:[20,60],font:"Impact",padding:2,rotate:function(){return 30*(~~(6*Math.random())-3)}};function zE(t){return new Promise((e,n)=>{if(t instanceof HTMLImageElement)e(t);else{if("string"==typeof t){const r=new Image;return r.crossOrigin="anonymous",r.src=t,r.onload=()=>e(r),void(r.onerror=()=>{console.error(`'image ${t} load failed !!!'`),n()})}n()}})}const TE=(t,e)=>n=>PE(void 0,void 0,void 0,function*(){const r=Object.assign({},CE,t,{canvas:e.createCanvas}),o=EE();var i,a;yield(i=o,a=r,{set(t,e,n){if(void 0===a[t])return this;const r=e?e.call(null,a[t]):a[t];return n?n.call(null,r):"function"==typeof i[t]?i[t](r):i[t]=r,this},setAsync(t,e,n){return uE(this,void 0,void 0,function*(){if(void 0===a[t])return this;const r=e?yield e.call(null,a[t]):a[t];return n?n.call(null,r):"function"==typeof i[t]?i[t](r):i[t]=r,this})}}).set("fontSize",t=>{const e=n.map(t=>t.value);return function(t,e){if("function"==typeof t)return t;if(Array.isArray(t)){const[n,r]=t;if(!e)return()=>(r+n)/2;const[o,i]=e;return i===o?()=>(r+n)/2:({value:t})=>(r-n)/(i-o)*(t-o)+n}return()=>t}(t,[ep(e),Ye(e)])}).set("font").set("fontStyle").set("fontWeight").set("padding").set("rotate").set("size").set("spiral").set("timeInterval").set("random").set("text").set("on").set("canvas").setAsync("imageMask",zE,o.createMask),o.words([...n]);const s=o.start(),[c,l]=r.size,u=[{x:0,y:0},{x:c,y:l}],{_bounds:f=u,_tags:d,hasImage:p}=s,h=d.map(t=>{var{x:e,y:n,font:r}=t,o=LE(t,["x","y","font"]);return Object.assign(Object.assign({},o),{x:e+c/2,y:n+l/2,fontFamily:r})}),[{x:g,y:m},{x:y,y:b}]=f,v={text:"",value:0,opacity:0,fontSize:0};return h.push(Object.assign(Object.assign({},v),{x:p?0:g,y:p?0:m}),Object.assign(Object.assign({},v),{x:p?c:y,y:p?l:b})),h});TE.props={};const BE=t=>{const{field:e="y",alpha:n=.6,as:r=e}=t;return t=>{const o=t.map(t=>t[e]),i=function(t,e){if(e<0||e>1)throw new Error("alpha must be between 0 and 1.");if(0===t.length)return[];let n=t[0];const r=[];for(const o of t){if(null==o){r.push(o),console.warn("EMA:The value is null or undefined",t);continue}null==n&&(n=o);const i=n*e+(1-e)*o;r.push(i),n=i}return r}(o,n);return t.map((t,e)=>Object.assign(Object.assign({},t),{[r]:i[e]}))}};BE.props={};function IE(t){const{min:e,max:n}=t;return[[e[0],e[1]],[n[0],n[1]]]}function NE(t,e,n=.01){const[r,o]=t,[i,a]=e;return r>=i[0]-n&&r<=a[0]+n&&o>=i[1]-n&&o<=a[1]+n}function RE(t,e,n=.01){const[r,o]=t;return!(NE(r,e,n)&&NE(o,e,n))}const FE=t=>{const{priority:e}=t;return t=>{const n=[];return e&&t.sort(e),t.forEach(t=>{Ol(t);const e=t.getLocalBounds(),r=n.some(t=>function(t,e){const[n,r]=t,[o,i]=e;return n[0]<i[0]&&r[0]>o[0]&&n[1]<i[1]&&r[1]>o[1]}(IE(e),IE(t.getLocalBounds())));r?xl(t):n.push(t)}),t}};function DE([t,e],[n,r]){return r>t&&e>n}function $E(){const t=new Map;return[e=>t.get(e),(e,n)=>t.set(e,n)]}function WE(t){const e=t.cloneNode(!0),n=e.getElementById("connector");n&&e.removeChild(n);const{min:r,max:o}=e.getRenderBounds();return e.destroy(),{min:r,max:o}}const HE=t=>{const{maxIterations:e=10,maxError:n=.1,padding:r=1}=t;return t=>{const o=t.length;if(o<=1)return t;const[i,a]=$E(),[s,c]=$E(),[l,u]=$E(),[f,d]=$E();for(const e of t){const{min:t,max:n}=WE(e),[r,o]=t,[i,s]=n;a(e,o),c(e,o),u(e,s-o),d(e,[r,i])}for(let i=0;i<e;i++){t.sort((t,e)=>(0,Ec.A)(s(t),s(e)));let e=0;for(let n=0;n<o-1;n++){const o=t[n];let i,a=n+1;for(;(i=t[a])&&!DE(f(o),f(i));)a+=1;if(i){const t=s(o),n=l(o),a=s(i),u=a-(t+n);if(u<r){const n=(r-u)/2;e=Math.max(e,n),c(o,t-n),c(i,a+n)}}}if(e<n)break}for(const e of t)e.style.y+=s(e)-i(e);return t}},qE=()=>t=>(t.forEach(t=>{Ol(t);const e=t.attr("bounds");RE(IE(t.getLocalBounds()),e)&&xl(t)}),t);function YE(t){return"object"==typeof t?t:(0,l.H0)(t)}function XE(t){let e=t/255;return e=e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4),e}function GE(t,e,n){return.2126*XE(t)+.7152*XE(e)+.0722*XE(n)}function VE(t,e){if(!t||!e||t===e)return 1;const{r:n,g:r,b:o}=t,{r:i,g:a,b:s}=e,c=GE(n,r,o),l=GE(i,a,s);return(Math.max(c,l)+.05)/(Math.min(c,l)+.05)}function KE(t,e){const n=gc(e,e=>VE(t,YE(e)));return e[n]}const UE=t=>{const{threshold:e=4.5,palette:n=["#000","#fff"]}=t;return t=>(t.forEach(t=>{const r=t.attr("dependentElement").parsedStyle.fill;VE(t.parsedStyle.fill,r)<e&&t.attr("fill",KE(r,n))}),t)};function ZE(t){var e;const n=t.getAnimations();if(!n||0===n.length)return _l(t);const r=t.cloneNode(!0);r.style.visibility="hidden",n.forEach(t=>{const e=t.effect.getKeyframes();e&&e.length>0&&r.attr(e[e.length-1])}),null===(e=t.parentNode)||void 0===e||e.appendChild(r);const o=_l(r);return r.destroy(),o}const JE=t=>{const{palette:e=["#000","#fff"],threshold:n=2}=t;return t=>(t.forEach(t=>{var r,o;const i=t.attr("dependentElement"),a=null!==(o=null!==(r=t.attributes.fill)&&void 0!==r?r:t.parsedStyle.fill)&&void 0!==o?o:"#fff";if(RE(IE(ZE(t)),IE(ZE(i)),n)){const n=KE(YE(a),e);t.attr("stroke",n)}else t.removeAttribute("stroke")}),t)},QE=(t={})=>(e,{layout:n})=>{const{bounds:r="view",offsetX:o=0,offsetY:i=0}=t,a=(()=>{if("main"===r){const{x:t=0,y:e=0,width:r=0,height:a=0,marginLeft:s=0,marginRight:c=0,marginTop:l=0,marginBottom:u=0,paddingLeft:f=0,paddingRight:d=0,paddingTop:p=0,paddingBottom:h=0}=n;return[[t+s+f+o,e+l+p+i],[t+r-c-d-o,e+a-u-h-i]]}{const{x:t=0,y:e=0,width:r=0,height:a=0}=n;return[[t+o,e+i],[t+r-o,e+a-i]]}})();return e.forEach(t=>{Ol(t);const{max:e,min:n}=((t,e)=>t&&t.min&&t.max?e&&e.min&&e.max?{min:[Math.min(t.min[0],e.min[0]),Math.min(t.min[1],e.min[1])],max:[Math.max(t.max[0],e.max[0]),Math.max(t.max[1],e.max[1])]}:t:e&&e.min&&e.max?e:{min:[0,0],max:[0,0]})(t.getRenderBounds(),t.getBounds());if(!e||!n||0===e[0]&&0===e[1]&&0===n[0]&&0===n[1])return;const[r,o]=e,[i,s]=n,c=((t,e)=>{const[[n,r],[o,i]]=e,[[a,s],[c,l]]=t;let u=0,f=0;return a<n?u=n-a:c>o&&(u=o-c),s<r?f=r-s:l>i&&(f=i-l),[u,f]})([[i,s],[r,o]],a);t.style.connector&&t.style.connectorPoints&&(t.style.connectorPoints[0][0]-=c[0],t.style.connectorPoints[0][1]-=c[1]),t.style.x+=c[0],t.style.y+=c[1]}),e};const tP=t=>t;function eP(t,e){t&&rP.hasOwnProperty(t.type)&&rP[t.type](t,e)}var nP={Feature:function(t,e){eP(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,o=n.length;++r<o;)eP(n[r].geometry,e)}},rP={Sphere:function(t,e){e.sphere()},Point:function(t,e){e.point((t=t.coordinates)[0],t[1],t[2])},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,o=n.length;++r<o;)e.point((t=n[r])[0],t[1],t[2])},LineString:function(t,e){oP(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,o=n.length;++r<o;)oP(n[r],e,0)},Polygon:function(t,e){iP(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,o=n.length;++r<o;)iP(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,o=n.length;++r<o;)eP(n[r],e)}};function oP(t,e,n){var r,o=-1,i=t.length-n;for(e.lineStart();++o<i;)e.point((r=t[o])[0],r[1],r[2]);e.lineEnd()}function iP(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)oP(t[n],e,1);e.polygonEnd()}function aP(t,e){t&&nP.hasOwnProperty(t.type)?nP[t.type](t,e):eP(t,e)}class sP{constructor(){this._partials=new Float64Array(32),this._n=0}add(t){const e=this._partials;let n=0;for(let r=0;r<this._n&&r<32;r++){const o=e[r],i=t+o,a=Math.abs(t)<Math.abs(o)?t-(i-o):o-(i-t);a&&(e[n++]=a),t=i}return e[n]=t,this._n=n+1,this}valueOf(){const t=this._partials;let e,n,r,o=this._n,i=0;if(o>0){for(i=t[--o];o>0&&(e=i,n=t[--o],i=e+n,r=n-(i-e),!r););o>0&&(r<0&&t[o-1]<0||r>0&&t[o-1]>0)&&(n=2*r,e=i+n,n==e-i&&(i=e))}return i}}var cP=1e-6,lP=Math.PI,uP=lP/2,fP=lP/4,dP=2*lP,pP=180/lP,hP=lP/180,gP=Math.abs,mP=Math.atan,yP=Math.atan2,bP=Math.cos,vP=Math.ceil,xP=Math.exp,OP=(Math,Math,Math.log),wP=Math.pow,jP=Math.sin,kP=Math.sign||function(t){return t>0?1:t<0?-1:0},AP=Math.sqrt,MP=Math.tan;function _P(t){return t>1?0:t<-1?lP:Math.acos(t)}function SP(t){return t>1?uP:t<-1?-uP:Math.asin(t)}function EP(){}var PP,LP,CP,zP,TP=new sP,BP=new sP,IP={point:EP,lineStart:EP,lineEnd:EP,polygonStart:function(){IP.lineStart=NP,IP.lineEnd=DP},polygonEnd:function(){IP.lineStart=IP.lineEnd=IP.point=EP,TP.add(gP(BP)),BP=new sP},result:function(){var t=TP/2;return TP=new sP,t}};function NP(){IP.point=RP}function RP(t,e){IP.point=FP,PP=CP=t,LP=zP=e}function FP(t,e){BP.add(zP*t-CP*e),CP=t,zP=e}function DP(){FP(PP,LP)}const $P=IP;var WP=1/0,HP=WP,qP=-WP,YP=qP,XP={point:function(t,e){t<WP&&(WP=t);t>qP&&(qP=t);e<HP&&(HP=e);e>YP&&(YP=e)},lineStart:EP,lineEnd:EP,polygonStart:EP,polygonEnd:EP,result:function(){var t=[[WP,HP],[qP,YP]];return qP=YP=-(HP=WP=1/0),t}};const GP=XP;var VP,KP,UP,ZP,JP=0,QP=0,tL=0,eL=0,nL=0,rL=0,oL=0,iL=0,aL=0,sL={point:cL,lineStart:lL,lineEnd:dL,polygonStart:function(){sL.lineStart=pL,sL.lineEnd=hL},polygonEnd:function(){sL.point=cL,sL.lineStart=lL,sL.lineEnd=dL},result:function(){var t=aL?[oL/aL,iL/aL]:rL?[eL/rL,nL/rL]:tL?[JP/tL,QP/tL]:[NaN,NaN];return JP=QP=tL=eL=nL=rL=oL=iL=aL=0,t}};function cL(t,e){JP+=t,QP+=e,++tL}function lL(){sL.point=uL}function uL(t,e){sL.point=fL,cL(UP=t,ZP=e)}function fL(t,e){var n=t-UP,r=e-ZP,o=AP(n*n+r*r);eL+=o*(UP+t)/2,nL+=o*(ZP+e)/2,rL+=o,cL(UP=t,ZP=e)}function dL(){sL.point=cL}function pL(){sL.point=gL}function hL(){mL(VP,KP)}function gL(t,e){sL.point=mL,cL(VP=UP=t,KP=ZP=e)}function mL(t,e){var n=t-UP,r=e-ZP,o=AP(n*n+r*r);eL+=o*(UP+t)/2,nL+=o*(ZP+e)/2,rL+=o,oL+=(o=ZP*t-UP*e)*(UP+t),iL+=o*(ZP+e),aL+=3*o,cL(UP=t,ZP=e)}const yL=sL;function bL(t){this._context=t}bL.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,dP)}},result:EP};var vL,xL,OL,wL,jL,kL=new sP,AL={point:EP,lineStart:function(){AL.point=ML},lineEnd:function(){vL&&_L(xL,OL),AL.point=EP},polygonStart:function(){vL=!0},polygonEnd:function(){vL=null},result:function(){var t=+kL;return kL=new sP,t}};function ML(t,e){AL.point=_L,xL=wL=t,OL=jL=e}function _L(t,e){kL.add(AP((wL-=t)*wL+(jL-=e)*jL)),wL=t,jL=e}const SL=AL;let EL,PL,LL,CL;class zL{constructor(t){this._append=null==t?TL:function(t){const e=Math.floor(t);if(!(e>=0))throw new RangeError(`invalid digits: ${t}`);if(e>15)return TL;if(e!==EL){const t=10**e;EL=e,PL=function(e){let n=1;this._+=e[0];for(const r=e.length;n<r;++n)this._+=Math.round(arguments[n]*t)/t+e[n]}}return PL}(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:if(this._append`M${t},${e}`,this._radius!==LL||this._append!==PL){const t=this._radius,e=this._;this._="",this._append`m0,${t}a${t},${t} 0 1,1 0,${-2*t}a${t},${t} 0 1,1 0,${2*t}z`,LL=t,PL=this._append,CL=this._,this._=e}this._+=CL}}result(){const t=this._;return this._="",t.length?t:null}}function TL(t){let e=1;this._+=t[0];for(const n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function BL(t,e){let n,r,o=3,i=4.5;function a(t){return t&&("function"==typeof i&&r.pointRadius(+i.apply(this,arguments)),aP(t,n(r))),r.result()}return a.area=function(t){return aP(t,n($P)),$P.result()},a.measure=function(t){return aP(t,n(SL)),SL.result()},a.bounds=function(t){return aP(t,n(GP)),GP.result()},a.centroid=function(t){return aP(t,n(yL)),yL.result()},a.projection=function(e){return arguments.length?(n=null==e?(t=null,tP):(t=e).stream,a):t},a.context=function(t){return arguments.length?(r=null==t?(e=null,new zL(o)):new bL(e=t),"function"!=typeof i&&r.pointRadius(i),a):e},a.pointRadius=function(t){return arguments.length?(i="function"==typeof t?t:(r.pointRadius(+t),+t),a):i},a.digits=function(t){if(!arguments.length)return o;if(null==t)o=null;else{const e=Math.floor(t);if(!(e>=0))throw new RangeError(`invalid digits: ${t}`);o=e}return null===e&&(r=new zL(o)),a},a.projection(t).digits(o).context(e)}function IL(t,e,n){t=+t,e=+e,n=(o=arguments.length)<2?(e=t,t=0,1):o<3?1:+n;for(var r=-1,o=0|Math.max(0,Math.ceil((e-t)/n)),i=new Array(o);++r<o;)i[r]=t+r*n;return i}function NL(t,e,n){var r=IL(t,e-cP,n).concat(e);return function(t){return r.map(function(e){return[t,e]})}}function RL(t,e,n){var r=IL(t,e-cP,n).concat(e);return function(t){return r.map(function(e){return[e,t]})}}function FL(){return function(){var t,e,n,r,o,i,a,s,c,l,u,f,d=10,p=d,h=90,g=360,m=2.5;function y(){return{type:"MultiLineString",coordinates:b()}}function b(){return IL(vP(r/h)*h,n,h).map(u).concat(IL(vP(s/g)*g,a,g).map(f)).concat(IL(vP(e/d)*d,t,d).filter(function(t){return gP(t%h)>cP}).map(c)).concat(IL(vP(i/p)*p,o,p).filter(function(t){return gP(t%g)>cP}).map(l))}return y.lines=function(){return b().map(function(t){return{type:"LineString",coordinates:t}})},y.outline=function(){return{type:"Polygon",coordinates:[u(r).concat(f(a).slice(1),u(n).reverse().slice(1),f(s).reverse().slice(1))]}},y.extent=function(t){return arguments.length?y.extentMajor(t).extentMinor(t):y.extentMinor()},y.extentMajor=function(t){return arguments.length?(s=+t[0][1],a=+t[1][1],(r=+t[0][0])>(n=+t[1][0])&&(t=r,r=n,n=t),s>a&&(t=s,s=a,a=t),y.precision(m)):[[r,s],[n,a]]},y.extentMinor=function(n){return arguments.length?(i=+n[0][1],o=+n[1][1],(e=+n[0][0])>(t=+n[1][0])&&(n=e,e=t,t=n),i>o&&(n=i,i=o,o=n),y.precision(m)):[[e,i],[t,o]]},y.step=function(t){return arguments.length?y.stepMajor(t).stepMinor(t):y.stepMinor()},y.stepMajor=function(t){return arguments.length?(h=+t[0],g=+t[1],y):[h,g]},y.stepMinor=function(t){return arguments.length?(d=+t[0],p=+t[1],y):[d,p]},y.precision=function(d){return arguments.length?(m=+d,c=NL(i,o,90),l=RL(e,t,m),u=NL(s,a,90),f=RL(r,n,m),y):m},y.extentMajor([[-180,-89.999999],[180,89.999999]]).extentMinor([[-180,-80.000001],[180,80.000001]])}()()}function DL(){var t,e=[];return{point:function(e,n,r){t.push([e,n,r])},lineStart:function(){e.push(t=[])},lineEnd:EP,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function $L(t,e){return gP(t[0]-e[0])<cP&&gP(t[1]-e[1])<cP}function WL(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 HL(t,e,n,r,o){var i,a,s=[],c=[];if(t.forEach(function(t){if(!((e=t.length-1)<=0)){var e,n,r=t[0],a=t[e];if($L(r,a)){if(!r[2]&&!a[2]){for(o.lineStart(),i=0;i<e;++i)o.point((r=t[i])[0],r[1]);return void o.lineEnd()}a[0]+=2e-6}s.push(n=new WL(r,t,null,!0)),c.push(n.o=new WL(r,null,n,!1)),s.push(n=new WL(a,t,null,!1)),c.push(n.o=new WL(a,null,n,!0))}}),s.length){for(c.sort(e),qL(s),qL(c),i=0,a=c.length;i<a;++i)c[i].e=n=!n;for(var l,u,f=s[0];;){for(var d=f,p=!0;d.v;)if((d=d.n)===f)return;l=d.z,o.lineStart();do{if(d.v=d.o.v=!0,d.e){if(p)for(i=0,a=l.length;i<a;++i)o.point((u=l[i])[0],u[1]);else r(d.x,d.n.x,1,o);d=d.n}else{if(p)for(i=(l=d.p.z).length-1;i>=0;--i)o.point((u=l[i])[0],u[1]);else r(d.x,d.p.x,-1,o);d=d.p}l=(d=d.o).z,p=!p}while(!d.v);o.lineEnd()}}}function qL(t){if(e=t.length){for(var e,n,r=0,o=t[0];++r<e;)o.n=n=t[r],n.p=o,o=n;o.n=n=t[0],n.p=o}}function YL(t){return[yP(t[1],t[0]),SP(t[2])]}function XL(t){var e=t[0],n=t[1],r=bP(n);return[r*bP(e),r*jP(e),jP(n)]}function GL(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function VL(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 KL(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function UL(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function ZL(t){var e=AP(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}function JL(t){return gP(t[0])<=lP?t[0]:kP(t[0])*((gP(t[0])+lP)%dP-lP)}function QL(t){return Array.from(function*(t){for(const e of t)yield*e}(t))}function tC(t,e,n,r){return function(o){var i,a,s,c=e(o),l=DL(),u=e(l),f=!1,d={point:p,lineStart:g,lineEnd:m,polygonStart:function(){d.point=y,d.lineStart=b,d.lineEnd=v,a=[],i=[]},polygonEnd:function(){d.point=p,d.lineStart=g,d.lineEnd=m,a=QL(a);var t=function(t,e){var n=JL(e),r=e[1],o=jP(r),i=[jP(n),-bP(n),0],a=0,s=0,c=new sP;1===o?r=uP+cP:-1===o&&(r=-uP-cP);for(var l=0,u=t.length;l<u;++l)if(d=(f=t[l]).length)for(var f,d,p=f[d-1],h=JL(p),g=p[1]/2+fP,m=jP(g),y=bP(g),b=0;b<d;++b,h=x,m=w,y=j,p=v){var v=f[b],x=JL(v),O=v[1]/2+fP,w=jP(O),j=bP(O),k=x-h,A=k>=0?1:-1,M=A*k,_=M>lP,S=m*w;if(c.add(yP(S*A*jP(M),y*j+S*bP(M))),a+=_?k+A*dP:k,_^h>=n^x>=n){var E=VL(XL(p),XL(v));ZL(E);var P=VL(i,E);ZL(P);var L=(_^k>=0?-1:1)*SP(P[2]);(r>L||r===L&&(E[0]||E[1]))&&(s+=_^k>=0?1:-1)}}return(a<-cP||a<cP&&c<-1e-12)^1&s}(i,r);a.length?(f||(o.polygonStart(),f=!0),HL(a,nC,t,n,o)):t&&(f||(o.polygonStart(),f=!0),o.lineStart(),n(null,null,1,o),o.lineEnd()),f&&(o.polygonEnd(),f=!1),a=i=null},sphere:function(){o.polygonStart(),o.lineStart(),n(null,null,1,o),o.lineEnd(),o.polygonEnd()}};function p(e,n){t(e,n)&&o.point(e,n)}function h(t,e){c.point(t,e)}function g(){d.point=h,c.lineStart()}function m(){d.point=p,c.lineEnd()}function y(t,e){s.push([t,e]),u.point(t,e)}function b(){u.lineStart(),s=[]}function v(){y(s[0][0],s[0][1]),u.lineEnd();var t,e,n,r,c=u.clean(),d=l.result(),p=d.length;if(s.pop(),i.push(s),s=null,p)if(1&c){if((e=(n=d[0]).length-1)>0){for(f||(o.polygonStart(),f=!0),o.lineStart(),t=0;t<e;++t)o.point((r=n[t])[0],r[1]);o.lineEnd()}}else p>1&&2&c&&d.push(d.pop().concat(d.shift())),a.push(d.filter(eC))}return d}}function eC(t){return t.length>1}function nC(t,e){return((t=t.x)[0]<0?t[1]-uP-cP:uP-t[1])-((e=e.x)[0]<0?e[1]-uP-cP:uP-e[1])}const rC=tC(function(){return!0},function(t){var e,n=NaN,r=NaN,o=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(i,a){var s=i>0?lP:-lP,c=gP(i-n);gP(c-lP)<cP?(t.point(n,r=(r+a)/2>0?uP:-uP),t.point(o,r),t.lineEnd(),t.lineStart(),t.point(s,r),t.point(i,r),e=0):o!==s&&c>=lP&&(gP(n-o)<cP&&(n-=o*cP),gP(i-s)<cP&&(i-=s*cP),r=function(t,e,n,r){var o,i,a=jP(t-n);return gP(a)>cP?mP((jP(e)*(i=bP(r))*jP(n)-jP(r)*(o=bP(e))*jP(t))/(o*i*a)):(e+r)/2}(n,r,i,a),t.point(o,r),t.lineEnd(),t.lineStart(),t.point(s,r),e=0),t.point(n=i,r=a),o=s},lineEnd:function(){t.lineEnd(),n=r=NaN},clean:function(){return 2-e}}},function(t,e,n,r){var o;if(null==t)r.point(-lP,o=n*uP),r.point(0,o),r.point(lP,o),r.point(lP,0),r.point(lP,-o),r.point(0,-o),r.point(-lP,-o),r.point(-lP,0),r.point(-lP,o);else if(gP(t[0]-e[0])>cP){var i=t[0]<e[0]?lP:-lP;r.point(-i,o=n*i/2),r.point(0,o),r.point(i,o)}else r.point(e[0],e[1])},[-lP,-uP]);function oC(t,e,n,r,o,i){if(n){var a=bP(e),s=jP(e),c=r*n;null==o?(o=e+r*dP,i=e-c/2):(o=iC(a,o),i=iC(a,i),(r>0?o<i:o>i)&&(o+=r*dP));for(var l,u=o;r>0?u>i:u<i;u-=c)l=YL([a,-s*bP(u),-s*jP(u)]),t.point(l[0],l[1])}}function iC(t,e){(e=XL(e))[0]-=t,ZL(e);var n=_P(-e[1]);return((-e[2]<0?-n:n)+dP-cP)%dP}var aC=1e9,sC=-aC;function cC(t,e,n,r){function o(o,i){return t<=o&&o<=n&&e<=i&&i<=r}function i(o,i,s,l){var u=0,f=0;if(null==o||(u=a(o,s))!==(f=a(i,s))||c(o,i)<0^s>0)do{l.point(0===u||3===u?t:n,u>1?r:e)}while((u=(u+s+4)%4)!==f);else l.point(i[0],i[1])}function a(r,o){return gP(r[0]-t)<cP?o>0?0:3:gP(r[0]-n)<cP?o>0?2:1:gP(r[1]-e)<cP?o>0?1:0:o>0?3:2}function s(t,e){return c(t.x,e.x)}function c(t,e){var n=a(t,1),r=a(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(a){var c,l,u,f,d,p,h,g,m,y,b,v=a,x=DL(),O={point:w,lineStart:function(){O.point=j,l&&l.push(u=[]);y=!0,m=!1,h=g=NaN},lineEnd:function(){c&&(j(f,d),p&&m&&x.rejoin(),c.push(x.result()));O.point=w,m&&v.lineEnd()},polygonStart:function(){v=x,c=[],l=[],b=!0},polygonEnd:function(){var e=function(){for(var e=0,n=0,o=l.length;n<o;++n)for(var i,a,s=l[n],c=1,u=s.length,f=s[0],d=f[0],p=f[1];c<u;++c)i=d,a=p,d=(f=s[c])[0],p=f[1],a<=r?p>r&&(d-i)*(r-a)>(p-a)*(t-i)&&++e:p<=r&&(d-i)*(r-a)<(p-a)*(t-i)&&--e;return e}(),n=b&&e,o=(c=QL(c)).length;(n||o)&&(a.polygonStart(),n&&(a.lineStart(),i(null,null,1,a),a.lineEnd()),o&&HL(c,s,e,i,a),a.polygonEnd());v=a,c=l=u=null}};function w(t,e){o(t,e)&&v.point(t,e)}function j(i,a){var s=o(i,a);if(l&&u.push([i,a]),y)f=i,d=a,p=s,y=!1,s&&(v.lineStart(),v.point(i,a));else if(s&&m)v.point(i,a);else{var c=[h=Math.max(sC,Math.min(aC,h)),g=Math.max(sC,Math.min(aC,g))],x=[i=Math.max(sC,Math.min(aC,i)),a=Math.max(sC,Math.min(aC,a))];!function(t,e,n,r,o,i){var a,s=t[0],c=t[1],l=0,u=1,f=e[0]-s,d=e[1]-c;if(a=n-s,f||!(a>0)){if(a/=f,f<0){if(a<l)return;a<u&&(u=a)}else if(f>0){if(a>u)return;a>l&&(l=a)}if(a=o-s,f||!(a<0)){if(a/=f,f<0){if(a>u)return;a>l&&(l=a)}else if(f>0){if(a<l)return;a<u&&(u=a)}if(a=r-c,d||!(a>0)){if(a/=d,d<0){if(a<l)return;a<u&&(u=a)}else if(d>0){if(a>u)return;a>l&&(l=a)}if(a=i-c,d||!(a<0)){if(a/=d,d<0){if(a>u)return;a>l&&(l=a)}else if(d>0){if(a<l)return;a<u&&(u=a)}return l>0&&(t[0]=s+l*f,t[1]=c+l*d),u<1&&(e[0]=s+u*f,e[1]=c+u*d),!0}}}}}(c,x,t,e,n,r)?s&&(v.lineStart(),v.point(i,a),b=!1):(m||(v.lineStart(),v.point(c[0],c[1])),v.point(x[0],x[1]),s||v.lineEnd(),b=!1)}h=i,g=a,m=s}return O}}function lC(t,e){function n(n,r){return n=t(n,r),e(n[0],n[1])}return t.invert&&e.invert&&(n.invert=function(n,r){return(n=e.invert(n,r))&&t.invert(n[0],n[1])}),n}function uC(t,e){return gP(t)>lP&&(t-=Math.round(t/dP)*dP),[t,e]}function fC(t,e,n){return(t%=dP)?e||n?lC(pC(t),hC(e,n)):pC(t):e||n?hC(e,n):uC}function dC(t){return function(e,n){return gP(e+=t)>lP&&(e-=Math.round(e/dP)*dP),[e,n]}}function pC(t){var e=dC(t);return e.invert=dC(-t),e}function hC(t,e){var n=bP(t),r=jP(t),o=bP(e),i=jP(e);function a(t,e){var a=bP(e),s=bP(t)*a,c=jP(t)*a,l=jP(e),u=l*n+s*r;return[yP(c*o-u*i,s*n-l*r),SP(u*o+c*i)]}return a.invert=function(t,e){var a=bP(e),s=bP(t)*a,c=jP(t)*a,l=jP(e),u=l*o-c*i;return[yP(c*o+l*i,s*n+u*r),SP(u*n-s*r)]},a}function gC(t){return function(e){var n=new mC;for(var r in t)n[r]=t[r];return n.stream=e,n}}function mC(){}function yC(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),aP(n,t.stream(GP)),e(GP.result()),null!=r&&t.clipExtent(r),t}function bC(t,e,n){return yC(t,function(n){var r=e[1][0]-e[0][0],o=e[1][1]-e[0][1],i=Math.min(r/(n[1][0]-n[0][0]),o/(n[1][1]-n[0][1])),a=+e[0][0]+(r-i*(n[1][0]+n[0][0]))/2,s=+e[0][1]+(o-i*(n[1][1]+n[0][1]))/2;t.scale(150*i).translate([a,s])},n)}function vC(t,e,n){return bC(t,[[0,0],e],n)}function xC(t,e,n){return yC(t,function(n){var r=+e,o=r/(n[1][0]-n[0][0]),i=(r-o*(n[1][0]+n[0][0]))/2,a=-o*n[0][1];t.scale(150*o).translate([i,a])},n)}function OC(t,e,n){return yC(t,function(n){var r=+e,o=r/(n[1][1]-n[0][1]),i=-o*n[0][0],a=(r-o*(n[1][1]+n[0][1]))/2;t.scale(150*o).translate([i,a])},n)}uC.invert=uC,mC.prototype={constructor:mC,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 wC=bP(30*hP);function jC(t,e){return+e?function(t,e){function n(r,o,i,a,s,c,l,u,f,d,p,h,g,m){var y=l-r,b=u-o,v=y*y+b*b;if(v>4*e&&g--){var x=a+d,O=s+p,w=c+h,j=AP(x*x+O*O+w*w),k=SP(w/=j),A=gP(gP(w)-1)<cP||gP(i-f)<cP?(i+f)/2:yP(O,x),M=t(A,k),_=M[0],S=M[1],E=_-r,P=S-o,L=b*E-y*P;(L*L/v>e||gP((y*E+b*P)/v-.5)>.3||a*d+s*p+c*h<wC)&&(n(r,o,i,a,s,c,_,S,A,x/=j,O/=j,w,g,m),m.point(_,S),n(_,S,A,x,O,w,l,u,f,d,p,h,g,m))}}return function(e){var r,o,i,a,s,c,l,u,f,d,p,h,g={point:m,lineStart:y,lineEnd:v,polygonStart:function(){e.polygonStart(),g.lineStart=x},polygonEnd:function(){e.polygonEnd(),g.lineStart=y}};function m(n,r){n=t(n,r),e.point(n[0],n[1])}function y(){u=NaN,g.point=b,e.lineStart()}function b(r,o){var i=XL([r,o]),a=t(r,o);n(u,f,l,d,p,h,u=a[0],f=a[1],l=r,d=i[0],p=i[1],h=i[2],16,e),e.point(u,f)}function v(){g.point=m,e.lineEnd()}function x(){y(),g.point=O,g.lineEnd=w}function O(t,e){b(r=t,e),o=u,i=f,a=d,s=p,c=h,g.point=b}function w(){n(u,f,l,d,p,h,o,i,r,a,s,c,16,e),g.lineEnd=v,v()}return g}}(t,e):function(t){return gC({point:function(e,n){e=t(e,n),this.stream.point(e[0],e[1])}})}(t)}var kC=gC({point:function(t,e){this.stream.point(t*hP,e*hP)}});function AC(t,e,n,r,o,i){if(!i)return function(t,e,n,r,o){function i(i,a){return[e+t*(i*=r),n-t*(a*=o)]}return i.invert=function(i,a){return[(i-e)/t*r,(n-a)/t*o]},i}(t,e,n,r,o);var a=bP(i),s=jP(i),c=a*t,l=s*t,u=a/t,f=s/t,d=(s*n-a*e)/t,p=(s*e+a*n)/t;function h(t,i){return[c*(t*=r)-l*(i*=o)+e,n-l*t-c*i]}return h.invert=function(t,e){return[r*(u*t-f*e+d),o*(p-f*t-u*e)]},h}function MC(t){return _C(function(){return t})()}function _C(t){var e,n,r,o,i,a,s,c,l,u,f=150,d=480,p=250,h=0,g=0,m=0,y=0,b=0,v=0,x=1,O=1,w=null,j=rC,k=null,A=tP,M=.5;function _(t){return c(t[0]*hP,t[1]*hP)}function S(t){return(t=c.invert(t[0],t[1]))&&[t[0]*pP,t[1]*pP]}function E(){var t=AC(f,0,0,x,O,v).apply(null,e(h,g)),r=AC(f,d-t[0],p-t[1],x,O,v);return n=fC(m,y,b),s=lC(e,r),c=lC(n,s),a=jC(s,M),P()}function P(){return l=u=null,_}return _.stream=function(t){return l&&u===t?l:l=kC(function(t){return gC({point:function(e,n){var r=t(e,n);return this.stream.point(r[0],r[1])}})}(n)(j(a(A(u=t)))))},_.preclip=function(t){return arguments.length?(j=t,w=void 0,P()):j},_.postclip=function(t){return arguments.length?(A=t,k=r=o=i=null,P()):A},_.clipAngle=function(t){return arguments.length?(j=+t?function(t){var e=bP(t),n=2*hP,r=e>0,o=gP(e)>cP;function i(t,n){return bP(t)*bP(n)>e}function a(t,n,r){var o=[1,0,0],i=VL(XL(t),XL(n)),a=GL(i,i),s=i[0],c=a-s*s;if(!c)return!r&&t;var l=e*a/c,u=-e*s/c,f=VL(o,i),d=UL(o,l);KL(d,UL(i,u));var p=f,h=GL(d,p),g=GL(p,p),m=h*h-g*(GL(d,d)-1);if(!(m<0)){var y=AP(m),b=UL(p,(-h-y)/g);if(KL(b,d),b=YL(b),!r)return b;var v,x=t[0],O=n[0],w=t[1],j=n[1];O<x&&(v=x,x=O,O=v);var k=O-x,A=gP(k-lP)<cP;if(!A&&j<w&&(v=w,w=j,j=v),A||k<cP?A?w+j>0^b[1]<(gP(b[0]-x)<cP?w:j):w<=b[1]&&b[1]<=j:k>lP^(x<=b[0]&&b[0]<=O)){var M=UL(p,(-h+y)/g);return KL(M,d),[b,YL(M)]}}}function s(e,n){var o=r?t:lP-t,i=0;return e<-o?i|=1:e>o&&(i|=2),n<-o?i|=4:n>o&&(i|=8),i}return tC(i,function(t){var e,n,c,l,u;return{lineStart:function(){l=c=!1,u=1},point:function(f,d){var p,h=[f,d],g=i(f,d),m=r?g?0:s(f,d):g?s(f+(f<0?lP:-lP),d):0;if(!e&&(l=c=g)&&t.lineStart(),g!==c&&(!(p=a(e,h))||$L(e,p)||$L(h,p))&&(h[2]=1),g!==c)u=0,g?(t.lineStart(),p=a(h,e),t.point(p[0],p[1])):(p=a(e,h),t.point(p[0],p[1],2),t.lineEnd()),e=p;else if(o&&e&&r^g){var y;m&n||!(y=a(h,e,!0))||(u=0,r?(t.lineStart(),t.point(y[0][0],y[0][1]),t.point(y[1][0],y[1][1]),t.lineEnd()):(t.point(y[1][0],y[1][1]),t.lineEnd(),t.lineStart(),t.point(y[0][0],y[0][1],3)))}!g||e&&$L(e,h)||t.point(h[0],h[1]),e=h,c=g,n=m},lineEnd:function(){c&&t.lineEnd(),e=null},clean:function(){return u|(l&&c)<<1}}},function(e,r,o,i){oC(i,t,n,o,e,r)},r?[0,-t]:[-lP,t-lP])}(w=t*hP):(w=null,rC),P()):w*pP},_.clipExtent=function(t){return arguments.length?(A=null==t?(k=r=o=i=null,tP):cC(k=+t[0][0],r=+t[0][1],o=+t[1][0],i=+t[1][1]),P()):null==k?null:[[k,r],[o,i]]},_.scale=function(t){return arguments.length?(f=+t,E()):f},_.translate=function(t){return arguments.length?(d=+t[0],p=+t[1],E()):[d,p]},_.center=function(t){return arguments.length?(h=t[0]%360*hP,g=t[1]%360*hP,E()):[h*pP,g*pP]},_.rotate=function(t){return arguments.length?(m=t[0]%360*hP,y=t[1]%360*hP,b=t.length>2?t[2]%360*hP:0,E()):[m*pP,y*pP,b*pP]},_.angle=function(t){return arguments.length?(v=t%360*hP,E()):v*pP},_.reflectX=function(t){return arguments.length?(x=t?-1:1,E()):x<0},_.reflectY=function(t){return arguments.length?(O=t?-1:1,E()):O<0},_.precision=function(t){return arguments.length?(a=jC(s,M=t*t),P()):AP(M)},_.fitExtent=function(t,e){return bC(_,t,e)},_.fitSize=function(t,e){return vC(_,t,e)},_.fitWidth=function(t,e){return xC(_,t,e)},_.fitHeight=function(t,e){return OC(_,t,e)},function(){return e=t.apply(this,arguments),_.invert=e.invert&&S,E()}}function SC(t){var e=0,n=lP/3,r=_C(t),o=r(e,n);return o.parallels=function(t){return arguments.length?r(e=t[0]*hP,n=t[1]*hP):[e*pP,n*pP]},o}function EC(t,e){var n=jP(t),r=(n+jP(e))/2;if(gP(r)<cP)return function(t){var e=bP(t);function n(t,n){return[t*e,jP(n)/e]}return n.invert=function(t,n){return[t/e,SP(n*e)]},n}(t);var o=1+n*(2*r-n),i=AP(o)/r;function a(t,e){var n=AP(o-2*r*jP(e))/r;return[n*jP(t*=r),i-n*bP(t)]}return a.invert=function(t,e){var n=i-e,a=yP(t,gP(n))*kP(n);return n*r<0&&(a-=lP*kP(t)*kP(n)),[a/r,SP((o-(t*t+n*n)*r*r)/(2*r))]},a}function PC(){return SC(EC).scale(155.424).center([0,33.6442])}function LC(){return PC().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function CC(){var t,e,n,r,o,i,a=LC(),s=PC().rotate([154,0]).center([-2,58.5]).parallels([55,65]),c=PC().rotate([157,0]).center([-3,19.9]).parallels([8,18]),l={point:function(t,e){i=[t,e]}};function u(t){var e=t[0],a=t[1];return i=null,n.point(e,a),i||(r.point(e,a),i)||(o.point(e,a),i)}function f(){return t=e=null,u}return u.invert=function(t){var e=a.scale(),n=a.translate(),r=(t[0]-n[0])/e,o=(t[1]-n[1])/e;return(o>=.12&&o<.234&&r>=-.425&&r<-.214?s:o>=.166&&o<.234&&r>=-.214&&r<-.115?c:a).invert(t)},u.stream=function(n){return t&&e===n?t:t=function(t){var e=t.length;return{point:function(n,r){for(var o=-1;++o<e;)t[o].point(n,r)},sphere:function(){for(var n=-1;++n<e;)t[n].sphere()},lineStart:function(){for(var n=-1;++n<e;)t[n].lineStart()},lineEnd:function(){for(var n=-1;++n<e;)t[n].lineEnd()},polygonStart:function(){for(var n=-1;++n<e;)t[n].polygonStart()},polygonEnd:function(){for(var n=-1;++n<e;)t[n].polygonEnd()}}}([a.stream(e=n),s.stream(n),c.stream(n)])},u.precision=function(t){return arguments.length?(a.precision(t),s.precision(t),c.precision(t),f()):a.precision()},u.scale=function(t){return arguments.length?(a.scale(t),s.scale(.35*t),c.scale(t),u.translate(a.translate())):a.scale()},u.translate=function(t){if(!arguments.length)return a.translate();var e=a.scale(),i=+t[0],u=+t[1];return n=a.translate(t).clipExtent([[i-.455*e,u-.238*e],[i+.455*e,u+.238*e]]).stream(l),r=s.translate([i-.307*e,u+.201*e]).clipExtent([[i-.425*e+cP,u+.12*e+cP],[i-.214*e-cP,u+.234*e-cP]]).stream(l),o=c.translate([i-.205*e,u+.212*e]).clipExtent([[i-.214*e+cP,u+.166*e+cP],[i-.115*e-cP,u+.234*e-cP]]).stream(l),f()},u.fitExtent=function(t,e){return bC(u,t,e)},u.fitSize=function(t,e){return vC(u,t,e)},u.fitWidth=function(t,e){return xC(u,t,e)},u.fitHeight=function(t,e){return OC(u,t,e)},u.scale(1070)}function zC(t){return function(e,n){var r=bP(e),o=bP(n),i=t(r*o);return i===1/0?[2,0]:[i*o*jP(e),i*jP(n)]}}function TC(t){return function(e,n){var r=AP(e*e+n*n),o=t(r),i=jP(o),a=bP(o);return[yP(e*i,r*a),SP(r&&n*i/r)]}}var BC=zC(function(t){return AP(2/(1+t))});function IC(){return MC(BC).scale(124.75).clipAngle(179.999)}BC.invert=TC(function(t){return 2*SP(t/2)});var NC=zC(function(t){return(t=_P(t))&&t/jP(t)});function RC(){return MC(NC).scale(79.4188).clipAngle(179.999)}function FC(t,e){return[t,OP(MP((uP+e)/2))]}function DC(){return $C(FC).scale(961/dP)}function $C(t){var e,n,r,o=MC(t),i=o.center,a=o.scale,s=o.translate,c=o.clipExtent,l=null;function u(){var i=lP*a(),s=o(function(t){function e(e){return(e=t(e[0]*hP,e[1]*hP))[0]*=pP,e[1]*=pP,e}return t=fC(t[0]*hP,t[1]*hP,t.length>2?t[2]*hP:0),e.invert=function(e){return(e=t.invert(e[0]*hP,e[1]*hP))[0]*=pP,e[1]*=pP,e},e}(o.rotate()).invert([0,0]));return c(null==l?[[s[0]-i,s[1]-i],[s[0]+i,s[1]+i]]:t===FC?[[Math.max(s[0]-i,l),e],[Math.min(s[0]+i,n),r]]:[[l,Math.max(s[1]-i,e)],[n,Math.min(s[1]+i,r)]])}return o.scale=function(t){return arguments.length?(a(t),u()):a()},o.translate=function(t){return arguments.length?(s(t),u()):s()},o.center=function(t){return arguments.length?(i(t),u()):i()},o.clipExtent=function(t){return arguments.length?(null==t?l=e=n=r=null:(l=+t[0][0],e=+t[0][1],n=+t[1][0],r=+t[1][1]),u()):null==l?null:[[l,e],[n,r]]},u()}function WC(t){return MP((uP+t)/2)}function HC(t,e){var n=bP(t),r=t===e?jP(t):OP(n/bP(e))/OP(WC(e)/WC(t)),o=n*wP(WC(t),r)/r;if(!r)return FC;function i(t,e){o>0?e<-uP+cP&&(e=-uP+cP):e>uP-cP&&(e=uP-cP);var n=o/wP(WC(e),r);return[n*jP(r*t),o-n*bP(r*t)]}return i.invert=function(t,e){var n=o-e,i=kP(r)*AP(t*t+n*n),a=yP(t,gP(n))*kP(n);return n*r<0&&(a-=lP*kP(t)*kP(n)),[a/r,2*mP(wP(o/i,1/r))-uP]},i}function qC(){return SC(HC).scale(109.5).parallels([30,30])}function YC(t,e){return[t,e]}function XC(){return MC(YC).scale(152.63)}function GC(t,e){var n=bP(t),r=t===e?jP(t):(n-bP(e))/(e-t),o=n/r+t;if(gP(r)<cP)return YC;function i(t,e){var n=o-e,i=r*t;return[n*jP(i),o-n*bP(i)]}return i.invert=function(t,e){var n=o-e,i=yP(t,gP(n))*kP(n);return n*r<0&&(i-=lP*kP(t)*kP(n)),[i/r,o-kP(r)*AP(t*t+n*n)]},i}function VC(){return SC(GC).scale(131.154).center([0,13.9389])}NC.invert=TC(function(t){return t}),FC.invert=function(t,e){return[t,2*mP(xP(e))-uP]},YC.invert=YC;var KC=1.340264,UC=-.081106,ZC=893e-6,JC=.003796,QC=AP(3)/2;function tz(t,e){var n=SP(QC*jP(e)),r=n*n,o=r*r*r;return[t*bP(n)/(QC*(KC+3*UC*r+o*(7*ZC+9*JC*r))),n*(KC+UC*r+o*(ZC+JC*r))]}function ez(){return MC(tz).scale(177.158)}function nz(t,e){var n=bP(e),r=bP(t)*n;return[n*jP(t)/r,jP(e)/r]}function rz(){return MC(nz).scale(144.049).clipAngle(60)}function oz(){var t,e,n,r,o,i,a,s=1,c=0,l=0,u=1,f=1,d=0,p=null,h=1,g=1,m=gC({point:function(t,e){var n=v([t,e]);this.stream.point(n[0],n[1])}}),y=tP;function b(){return h=s*u,g=s*f,i=a=null,v}function v(n){var r=n[0]*h,o=n[1]*g;if(d){var i=o*t-r*e;r=r*t+o*e,o=i}return[r+c,o+l]}return v.invert=function(n){var r=n[0]-c,o=n[1]-l;if(d){var i=o*t+r*e;r=r*t-o*e,o=i}return[r/h,o/g]},v.stream=function(t){return i&&a===t?i:i=m(y(a=t))},v.postclip=function(t){return arguments.length?(y=t,p=n=r=o=null,b()):y},v.clipExtent=function(t){return arguments.length?(y=null==t?(p=n=r=o=null,tP):cC(p=+t[0][0],n=+t[0][1],r=+t[1][0],o=+t[1][1]),b()):null==p?null:[[p,n],[r,o]]},v.scale=function(t){return arguments.length?(s=+t,b()):s},v.translate=function(t){return arguments.length?(c=+t[0],l=+t[1],b()):[c,l]},v.angle=function(n){return arguments.length?(e=jP(d=n%360*hP),t=bP(d),b()):d*pP},v.reflectX=function(t){return arguments.length?(u=t?-1:1,b()):u<0},v.reflectY=function(t){return arguments.length?(f=t?-1:1,b()):f<0},v.fitExtent=function(t,e){return bC(v,t,e)},v.fitSize=function(t,e){return vC(v,t,e)},v.fitWidth=function(t,e){return xC(v,t,e)},v.fitHeight=function(t,e){return OC(v,t,e)},v}function iz(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 az(){return MC(iz).scale(175.295)}function sz(t,e){return[bP(e)*jP(t),jP(e)]}function cz(){return MC(sz).scale(249.5).clipAngle(90.000001)}function lz(t,e){var n=bP(e),r=1+bP(t)*n;return[n*jP(t)/r,jP(e)/r]}function uz(){return MC(lz).scale(250).clipAngle(142)}function fz(t,e){return[OP(MP((uP+e)/2)),-t]}function dz(){var t=$C(fz),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],t.length>2?t[2]+90:90]):[(t=n())[0],t[1],t[2]-90]},n([0,0,90]).scale(159.155)}tz.invert=function(t,e){for(var n,r=e,o=r*r,i=o*o*o,a=0;a<12&&(i=(o=(r-=n=(r*(KC+UC*o+i*(ZC+JC*o))-e)/(KC+3*UC*o+i*(7*ZC+9*JC*o)))*r)*o*o,!(gP(n)<1e-12));++a);return[QC*t*(KC+3*UC*o+i*(7*ZC+9*JC*o))/bP(r),SP(jP(r)/QC)]},nz.invert=TC(mP),iz.invert=function(t,e){var n,r=e,o=25;do{var i=r*r,a=i*i;r-=n=(r*(1.007226+i*(.015085+a*(.028874*i-.044475-.005916*a)))-e)/(1.007226+i*(.045255+a*(.259866*i-.311325-.005916*11*a)))}while(gP(n)>cP&&--o>0);return[t/(.8707+(i=r*r)*(i*(i*i*i*(.003971-.001529*i)-.013791)-.131979)),r]},sz.invert=TC(SP),lz.invert=TC(function(t){return 2*mP(t)}),fz.invert=function(t,e){return[-e,2*mP(xP(t))-uP]};var pz=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};function hz(t,e,n,r){const o=()=>{const t=e.filter(mz),n=t.find(t=>t.sphere);return n?{type:"Sphere"}:(r=t.filter(t=>!t.sphere).flatMap(t=>t.data.value),{type:"FeatureCollection",features:r.flatMap(t=>function(t){if(!t||!t.type)return null;const e={Point:"geometry",MultiPoint:"geometry",LineString:"geometry",MultiLineString:"geometry",Polygon:"geometry",MultiPolygon:"geometry",GeometryCollection:"geometry",Feature:"feature",FeatureCollection:"featureCollection"}[t.type];return e?"geometry"===e?{type:"FeatureCollection",features:[{type:"Feature",properties:{},geometry:t}]}:"feature"===e?{type:"FeatureCollection",features:[t]}:"featureCollection"===e?t:void 0:null}(t).features)});var r},{outline:i=o()}=r,{size:a="fitExtent"}=r;return"fitExtent"===a?function(t,e,n){const{x:r,y:o,width:i,height:a}=n;t.fitExtent([[r,o],[i,a]],e)}(t,i,n):"fitWidth"===a?function(t,e,n){const{width:r,height:o}=n,[[i,a],[s,c]]=BL(t.fitWidth(r,e)).bounds(e),l=Math.ceil(c-a),u=Math.min(Math.ceil(s-i),l),f=t.scale()*(u-1)/u,[d,p]=t.translate(),h=p+(o-l)/2;t.scale(f).translate([d,h]).precision(.2)}(t,i,n):void 0}function gz(t){const{data:e}=t;if(Array.isArray(e))return Object.assign(Object.assign({},t),{data:{value:e}});const{type:n}=e;return"graticule10"===n?Object.assign(Object.assign({},t),{data:{value:[FL()]}}):"sphere"===n?Object.assign(Object.assign({},t),{sphere:!0,data:{value:[{type:"Sphere"}]}}):t}function mz(t){return"geoPath"===t.type}const yz=()=>t=>{const{children:e,coordinate:n={}}=t;if(!Array.isArray(e))return[];const{type:r="equalEarth"}=n,o=pz(n,["type"]),a=function(t){if("function"==typeof t)return t;const e=`geo${Ce(t)}`,n=i[e];if(!n)throw new Error(`Unknown coordinate: ${t}`);return n}(r),s=e.map(e=>Object.assign(Object.assign({},e),{data:qs(e.data,t.data)})).map(gz);let c;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=a();hz(i,s,{x:t,y:e,width:n,height:r},o),function(t,e){var n;for(const[r,o]of Object.entries(e))null===(n=t[r])||void 0===n||n.call(t,o)}(i,o),c=BL(i);const l=new li({domain:[t,t+n]}),u=new li({domain:[e,e+r]});return{transform:t=>(t=>{const e=i(t);if(!e)return[null,null];const[n,r]=e;return[l.map(n),u.map(r)]})(t),untransform:t=>(t=>{if(!t)return null;const[e,n]=t,r=[l.invert(e),u.invert(n)];return i.invert(r)})(t)}}]]}},children:s.flatMap(t=>mz(t)?function(t){const{style:e,tooltip:n={}}=t;return Object.assign(Object.assign({},t),{type:"path",tooltip:cp(n,{title:"id",items:[{channel:"color"}]}),style:Object.assign(Object.assign({},e),{d:t=>c(t)||[]})})}(t):t)})]};yz.props={};var bz=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const vz=()=>t=>{const{data:e,scale:n,encode:r,style:o,animate:i,key:a,state:s,tooltip:c}=t,l=bz(t,["type","data","scale","encode","style","animate","key","state","tooltip"]);return[Object.assign(Object.assign({type:"geoView"},l),{children:[{type:"geoPath",key:`${a}-0`,data:{value:e},scale:n,encode:r,style:o,animate:i,state:s,tooltip:c}]})]};vz.props={};var xz=n("./node_modules/.pnpm/d3-force@3.0.0/node_modules/d3-force/src/manyBody.js"),Oz=n("./node_modules/.pnpm/d3-force@3.0.0/node_modules/d3-force/src/link.js"),wz=n("./node_modules/.pnpm/d3-force@3.0.0/node_modules/d3-force/src/center.js"),jz=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const kz={joint:!0},Az={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}},Mz={type:"point",axis:!1,legend:!1,encode:{x:"x",y:"y",size:5,color:"group",shape:"point"},style:{stroke:"#fff"}},_z={text:""};const Sz=t=>{const{data:e,encode:n={},scale:r,style:o={},layout:i={},nodeLabels:a=[],linkLabels:s=[],animate:c={},tooltip:l={}}=t,{nodeKey:u=t=>t.id,linkKey:f=t=>t.id}=n,d=jz(n,["nodeKey","linkKey"]),p=Object.assign({nodeKey:u,linkKey:f},d),h=xt(p,"node"),g=xt(p,"link"),{links:m,nodes:y}=jm(e,p),{nodesData:b,linksData:v}=function(t,e,n){const{nodes:r,links:o}=t,{joint:i,nodeStrength:a,linkStrength:s}=e,{nodeKey:c=t=>t.id,linkKey:l=t=>t.id}=n,u=(0,xz.A)(),f=(0,Oz.A)(o).id(Om(l));"function"==typeof a&&u.strength(a),"function"==typeof s&&f.strength(s);const d=(0,wx.A)(r).force("link",f).force("charge",u);i?d.force("center",(0,wz.A)()):d.force("x",Ax()).force("y",Mx()),d.stop();const p=Math.ceil(Math.log(d.alphaMin())/Math.log(1-d.alphaDecay()));for(let t=0;t<p;t++)d.tick();return{nodesData:r,linksData:o}}({links:m,nodes:y},(0,N.A)({},kz,i),p),x=sp(l,"link",{items:[t=>({name:"source",value:Om(f)(t.source)}),t=>({name:"target",value:Om(f)(t.target)})]}),O=sp(l,"node",{items:[t=>({name:"key",value:Om(u)(t)})]},!0);return[(0,N.A)({},Az,{data:v,encode:g,labels:s,style:xt(o,"link"),tooltip:x,animate:up(c,"link")}),(0,N.A)({},Mz,{data:b,encode:Object.assign({},h),scale:r,style:xt(o,"node"),tooltip:O,labels:[Object.assign(Object.assign({},_z),xt(o,"label")),...a],animate:up(c,"link")})]};Sz.props={};var Ez=n("./node_modules/.pnpm/d3-hierarchy@3.1.2/node_modules/d3-hierarchy/src/tree.js");function Pz(t,e){return t.parent===e.parent?1:2}function Lz(t,e){return t+e.x}function Cz(t,e){return Math.max(t,e.y)}function zz(){var t=Pz,e=1,n=1,r=!1;function o(o){var i,a=0;o.eachAfter(function(e){var n=e.children;n?(e.x=function(t){return t.reduce(Lz,0)/t.length}(n),e.y=function(t){return 1+t.reduce(Cz,0)}(n)):(e.x=i?a+=t(e,i):0,e.y=0,i=e)});var s=function(t){for(var e;e=t.children;)t=e[0];return t}(o),c=function(t){for(var e;e=t.children;)t=e[e.length-1];return t}(o),l=s.x-t(s,c)/2,u=c.x+t(c,s)/2;return o.eachAfter(r?function(t){t.x=(t.x-o.x)*e,t.y=(o.y-t.y)*n}:function(t){t.x=(t.x-l)/(u-l)*e,t.y=(1-(o.y?t.y/o.y:1))*n})}return o.separation=function(e){return arguments.length?(t=e,o):t},o.size=function(t){return arguments.length?(r=!1,e=+t[0],n=+t[1],o):r?null:[e,n]},o.nodeSize=function(t){return arguments.length?(r=!0,e=+t[0],n=+t[1],o):r?[e,n]:null},o}const Tz=t=>e=>n=>{const{field:r="value",nodeSize:o,separation:i,sortBy:a,as:s=["x","y"]}=e,[c,l]=s,u=(0,BA.Ay)(n,t=>t.children).sum(t=>t[r]).sort(a),f=t();f.size([1,1]),o&&f.nodeSize(o),i&&f.separation(i),f(u);const d=[];u.each(t=>{t[c]=t.x,t[l]=t.y,t.name=t.data.name,d.push(t)});const p=u.links();return p.forEach(t=>{t[c]=[t.source[c],t.target[c]],t[l]=[t.source[l],t.target[l]]}),{nodes:d,edges:p}},Bz=t=>Tz(zz)(t);Bz.props={};const Iz=t=>Tz(Ez.A)(t);Iz.props={};const Nz={sortBy:(t,e)=>e.value-t.value},Rz={axis:!1,legend:!1,type:"point",encode:{x:"x",y:"y",size:2,shape:"point"}},Fz={type:"link",encode:{x:"x",y:"y",shape:"smooth"}},Dz={text:"",fontSize:10},$z=t=>{const{data:e,encode:n={},scale:r={},style:o={},layout:i={},nodeLabels:a=[],linkLabels:s=[],animate:c={},tooltip:l={}}=t,u=null==n?void 0:n.value,{nodes:f,edges:d}=Iz(Object.assign(Object.assign(Object.assign({},Nz),i),{field:u}))(e),p=sp(l,"node",{title:"name",items:["value"]},!0),h=sp(l,"link",{title:"",items:[t=>({name:"source",value:t.source.name}),t=>({name:"target",value:t.target.name})]});return[(0,N.A)({},Fz,{data:d,encode:xt(n,"link"),scale:xt(r,"link"),labels:s,style:Object.assign({stroke:"#999"},xt(o,"link")),tooltip:h,animate:up(c,"link")}),(0,N.A)({},Rz,{data:f,scale:xt(r,"node"),encode:xt(n,"node"),labels:[Object.assign(Object.assign({},Dz),xt(o,"label")),...a],style:Object.assign({},xt(o,"node")),tooltip:p,animate:up(c,"node")})]};$z.props={};const Wz=4294967296;function Hz(t,e){for(var n,r,o=0,i=(t=function(t,e){let n,r,o=t.length;for(;o;)r=e()*o--|0,n=t[o],t[o]=t[r],t[r]=n;return t}(Array.from(t),e)).length,a=[];o<i;)n=t[o],r&&Xz(r,n)?++o:(r=Vz(a=qz(a,n)),o=0);return r}function qz(t,e){var n,r;if(Gz(e,t))return[e];for(n=0;n<t.length;++n)if(Yz(e,t[n])&&Gz(Kz(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(Yz(Kz(t[n],t[r]),e)&&Yz(Kz(t[n],e),t[r])&&Yz(Kz(t[r],e),t[n])&&Gz(Uz(t[n],t[r],e),t))return[t[n],t[r],e];throw new Error}function Yz(t,e){var n=t.r-e.r,r=e.x-t.x,o=e.y-t.y;return n<0||n*n<r*r+o*o}function Xz(t,e){var n=t.r-e.r+1e-9*Math.max(t.r,e.r,1),r=e.x-t.x,o=e.y-t.y;return n>0&&n*n>r*r+o*o}function Gz(t,e){for(var n=0;n<e.length;++n)if(!Xz(t,e[n]))return!1;return!0}function Vz(t){switch(t.length){case 1:return function(t){return{x:t.x,y:t.y,r:t.r}}(t[0]);case 2:return Kz(t[0],t[1]);case 3:return Uz(t[0],t[1],t[2])}}function Kz(t,e){var n=t.x,r=t.y,o=t.r,i=e.x,a=e.y,s=e.r,c=i-n,l=a-r,u=s-o,f=Math.sqrt(c*c+l*l);return{x:(n+i+c/f*u)/2,y:(r+a+l/f*u)/2,r:(f+o+s)/2}}function Uz(t,e,n){var r=t.x,o=t.y,i=t.r,a=e.x,s=e.y,c=e.r,l=n.x,u=n.y,f=n.r,d=r-a,p=r-l,h=o-s,g=o-u,m=c-i,y=f-i,b=r*r+o*o-i*i,v=b-a*a-s*s+c*c,x=b-l*l-u*u+f*f,O=p*h-d*g,w=(h*x-g*v)/(2*O)-r,j=(g*m-h*y)/O,k=(p*v-d*x)/(2*O)-o,A=(d*y-p*m)/O,M=j*j+A*A-1,_=2*(i+w*j+k*A),S=w*w+k*k-i*i,E=-(Math.abs(M)>1e-6?(_+Math.sqrt(_*_-4*M*S))/(2*M):S/_);return{x:r+w+j*E,y:o+k+A*E,r:E}}function Zz(t,e,n){var r,o,i,a,s=t.x-e.x,c=t.y-e.y,l=s*s+c*c;l?(o=e.r+n.r,a=t.r+n.r,(o*=o)>(a*=a)?(r=(l+a-o)/(2*l),i=Math.sqrt(Math.max(0,a/l-r*r)),n.x=t.x-r*s-i*c,n.y=t.y-r*c+i*s):(r=(l+o-a)/(2*l),i=Math.sqrt(Math.max(0,o/l-r*r)),n.x=e.x+r*s-i*c,n.y=e.y+r*c+i*s)):(n.x=e.x+n.r,n.y=e.y)}function Jz(t,e){var n=t.r+e.r-1e-6,r=e.x-t.x,o=e.y-t.y;return n>0&&n*n>r*r+o*o}function Qz(t){var e=t._,n=t.next._,r=e.r+n.r,o=(e.x*n.r+n.x*e.r)/r,i=(e.y*n.r+n.y*e.r)/r;return o*o+i*i}function tT(t){this._=t,this.next=null,this.previous=null}function eT(t,e){if(!(i=(t=function(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}(t)).length))return 0;var n,r,o,i,a,s,c,l,u,f,d;if((n=t[0]).x=0,n.y=0,!(i>1))return n.r;if(n.x=-(r=t[1]).r,r.x=n.r,r.y=0,!(i>2))return n.r+r.r;Zz(r,n,o=t[2]),n=new tT(n),r=new tT(r),o=new tT(o),n.next=o.previous=r,r.next=n.previous=o,o.next=r.previous=n;t:for(c=3;c<i;++c){Zz(n._,r._,o=t[c]),o=new tT(o),l=r.next,u=n.previous,f=r._.r,d=n._.r;do{if(f<=d){if(Jz(l._,o._)){n.next=r=l,r.previous=n,--c;continue t}f+=l._.r,l=l.next}else{if(Jz(u._,o._)){(n=u).next=r,r.previous=n,--c;continue t}d+=u._.r,u=u.previous}}while(l!==u.next);for(o.previous=n,o.next=r,n.next=r.previous=r=o,a=Qz(n);(o=o.next)!==r;)(s=Qz(o))<a&&(n=o,a=s);r=n.next}for(n=[r._],o=r;(o=o.next)!==r;)n.push(o._);for(o=Hz(n,e),c=0;c<i;++c)(n=t[c]).x-=o.x,n.y-=o.y;return o.r}function nT(t){return Math.sqrt(t.value)}function rT(){var t=null,e=1,n=1,r=QA;function o(o){const i=function(){let t=1;return()=>(t=(1664525*t+1013904223)%Wz)/Wz}();return o.x=e/2,o.y=n/2,t?o.eachBefore(oT(t)).eachAfter(iT(r,.5,i)).eachBefore(aT(1)):o.eachBefore(oT(nT)).eachAfter(iT(QA,1,i)).eachAfter(iT(r,o.r/Math.min(e,n),i)).eachBefore(aT(Math.min(e,n)/(2*o.r))),o}return o.radius=function(e){return arguments.length?(t=zA(e),o):t},o.size=function(t){return arguments.length?(e=+t[0],n=+t[1],o):[e,n]},o.padding=function(t){return arguments.length?(r="function"==typeof t?t:tM(+t),o):r},o}function oT(t){return function(e){e.children||(e.r=Math.max(0,+t(e)||0))}}function iT(t,e,n){return function(r){if(o=r.children){var o,i,a,s=o.length,c=t(r)*e||0;if(c)for(i=0;i<s;++i)o[i].r+=c;if(a=eT(o,n),c)for(i=0;i<s;++i)o[i].r-=c;r.r=a+c}}}function aT(t){return function(e){var n=e.parent;e.r*=t,n&&(e.x=n.x+t*e.x,e.y=n.y+t*e.y)}}var sT=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const cT={text:"",position:"inside",textOverflow:"clip",wordWrap:!0,maxLines:1,wordWrapWidth:t=>2*t.r},lT={title:t=>t.data.name,items:[{field:"value"}]},uT=(t,e)=>{const{width:n,height:r}=e,{data:o,encode:i={},scale:a={},style:s={},layout:c={},labels:l=[],tooltip:u={}}=t,f=sT(t,["data","encode","scale","style","layout","labels","tooltip"]),d=((t,e,n)=>({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:n.color?void 0:t=>0===t.height?"#ddd":"#fff",stroke:n.color?void 0:t=>0===t.height?"":"#000"}}))(n,r,i),p=((t,e,n)=>{const{value:r}=n,o=(0,Le.A)(t)?$A().path(e.path)(t):(0,BA.Ay)(t);return r?o.sum(t=>Om(r)(t)).sort(e.sort):o.count(),rT().size(e.size).padding(e.padding)(o),o.descendants()})(o,(0,N.A)({},((t,e)=>({size:[t,e],padding:0,sort:(t,e)=>e.value-t.value}))(n,r),c),(0,N.A)({},d.encode,i)),h=xt(s,"label");return(0,N.A)({},d,Object.assign(Object.assign({data:p,encode:i,scale:a,style:s,labels:[Object.assign(Object.assign({},cT),h),...l]},f),{tooltip:cp(u,lT),axis:!1}))};function fT(t){return t.target.depth}function dT(t,e){return t.sourceLinks.length?t.depth:e-1}function pT(t){return function(){return t}}function hT(t,e){return mT(t.source,e.source)||t.index-e.index}function gT(t,e){return mT(t.target,e.target)||t.index-e.index}function mT(t,e){return t.y0-e.y0}function yT(t){return t.value}function bT(t){return t.index}function vT(t){return t.nodes}function xT(t){return t.links}function OT(t,e){const n=t.get(e);if(!n)throw new Error("missing: "+e);return n}function wT({nodes:t}){for(const e of t){let t=e.y0,n=t;for(const n of e.sourceLinks)n.y0=t+n.width/2,t+=n.width;for(const t of e.targetLinks)t.y1=n+t.width/2,n+=t.width}}function jT(){let t,e,n,r,o=0,i=0,a=1,s=1,c=24,l=8,u=bT,f=dT,d=vT,p=xT,h=6;function g(g){const b={nodes:d(g),links:p(g)};return function({nodes:t,links:e}){t.forEach((t,e)=>{t.index=e,t.sourceLinks=[],t.targetLinks=[]});const n=new Map(t.map(t=>[u(t),t]));if(e.forEach((t,e)=>{t.index=e;let{source:r,target:o}=t;"object"!=typeof r&&(r=t.source=OT(n,r)),"object"!=typeof o&&(o=t.target=OT(n,o)),r.sourceLinks.push(t),o.targetLinks.push(t)}),null!=r)for(const{sourceLinks:e,targetLinks:n}of t)e.sort(r),n.sort(r)}(b),function({nodes:t}){for(const e of t)e.value=void 0===e.fixedValue?Math.max(qe(e.sourceLinks,yT),qe(e.targetLinks,yT)):e.fixedValue}(b),function({nodes:t}){const n=t.length;let r=new Set(t),o=new Set,i=0;for(;r.size;){if(r.forEach(t=>{t.depth=i;for(const{target:e}of t.sourceLinks)o.add(e)}),++i>n)throw new Error("circular link");r=o,o=new Set}if(e){const n=Math.max(Ye(t,t=>t.depth)+1,0);let r;for(let o=0;o<t.length;o++)r=t[o],r.depth=e.call(null,r,n)}}(b),function({nodes:t}){const e=t.length;let n=new Set(t),r=new Set,o=0;for(;n.size;){if(n.forEach(t=>{t.height=o;for(const{source:e}of t.targetLinks)r.add(e)}),++o>e)throw new Error("circular link");n=r,r=new Set}}(b),function(e){const r=function({nodes:t}){const e=Math.max(Ye(t,t=>t.depth)+1,0),r=(a-o-c)/(e-1),i=new Array(e).fill(0).map(()=>[]);for(const n of t){const t=Math.max(0,Math.min(e-1,Math.floor(f.call(null,n,e))));n.layer=t,n.x0=o+t*r,n.x1=n.x0+c,i[t]?i[t].push(n):i[t]=[n]}if(n)for(const t of i)t.sort(n);return i}(e);t=Math.min(l,(s-i)/(Ye(r,t=>t.length)-1)),function(e){const n=ep(e,e=>(s-i-(e.length-1)*t)/qe(e,yT));for(const r of e){let e=i;for(const o of r){o.y0=e,o.y1=e+o.value*n,e=o.y1+t;for(const t of o.sourceLinks)t.width=t.value*n}e=(s-e+t)/(r.length+1);for(let t=0;t<r.length;++t){const n=r[t];n.y0+=e*(t+1),n.y1+=e*(t+1)}w(r)}}(r);for(let t=0;t<h;++t){const e=Math.pow(.99,t),n=Math.max(1-e,(t+1)/h);y(r,e,n),m(r,e,n)}}(b),wT(b),b}function m(t,e,r){for(let o=1,i=t.length;o<i;++o){const i=t[o];for(const t of i){let n=0,r=0;for(const{source:e,value:o}of t.targetLinks){const i=o*(t.layer-e.layer);n+=j(e,t)*i,r+=i}if(!(r>0))continue;const o=(n/r-t.y0)*e;t.y0+=o,t.y1+=o,O(t)}void 0===n&&i.sort(mT),i.length&&b(i,r)}}function y(t,e,r){for(let o=t.length-2;o>=0;--o){const i=t[o];for(const t of i){let n=0,r=0;for(const{target:e,value:o}of t.sourceLinks){const i=o*(e.layer-t.layer);n+=k(t,e)*i,r+=i}if(!(r>0))continue;const o=(n/r-t.y0)*e;t.y0+=o,t.y1+=o,O(t)}void 0===n&&i.sort(mT),i.length&&b(i,r)}}function b(e,n){const r=e.length>>1,o=e[r];x(e,o.y0-t,r-1,n),v(e,o.y1+t,r+1,n),x(e,s,e.length-1,n),v(e,i,0,n)}function v(e,n,r,o){for(;r<e.length;++r){const i=e[r],a=(n-i.y0)*o;a>1e-6&&(i.y0+=a,i.y1+=a),n=i.y1+t}}function x(e,n,r,o){for(;r>=0;--r){const i=e[r],a=(i.y1-n)*o;a>1e-6&&(i.y0-=a,i.y1-=a),n=i.y0-t}}function O({sourceLinks:t,targetLinks:e}){if(void 0===r){for(const{source:{sourceLinks:t}}of e)t.sort(gT);for(const{target:{targetLinks:e}}of t)e.sort(hT)}}function w(t){if(void 0===r)for(const{sourceLinks:e,targetLinks:n}of t)e.sort(gT),n.sort(hT)}function j(e,n){let r=e.y0-(e.sourceLinks.length-1)*t/2;for(const{target:o,width:i}of e.sourceLinks){if(o===n)break;r+=i+t}for(const{source:t,width:o}of n.targetLinks){if(t===e)break;r-=o}return r}function k(e,n){let r=n.y0-(n.targetLinks.length-1)*t/2;for(const{source:o,width:i}of n.targetLinks){if(o===e)break;r+=i+t}for(const{target:t,width:o}of e.sourceLinks){if(t===n)break;r-=o}return r}return g.update=function(t){return wT(t),t},g.nodeId=function(t){return arguments.length?(u="function"==typeof t?t:pT(t),g):u},g.nodeAlign=function(t){return arguments.length?(f="function"==typeof t?t:pT(t),g):f},g.nodeDepth=function(t){return arguments.length?(e=t,g):e},g.nodeSort=function(t){return arguments.length?(n=t,g):n},g.nodeWidth=function(t){return arguments.length?(c=+t,g):c},g.nodePadding=function(e){return arguments.length?(l=t=+e,g):l},g.nodes=function(t){return arguments.length?(d="function"==typeof t?t:pT(t),g):d},g.links=function(t){return arguments.length?(p="function"==typeof t?t:pT(t),g):p},g.linkSort=function(t){return arguments.length?(r=t,g):r},g.size=function(t){return arguments.length?(o=i=0,a=+t[0],s=+t[1],g):[a-o,s-i]},g.extent=function(t){return arguments.length?(o=+t[0][0],a=+t[1][0],i=+t[0][1],s=+t[1][1],g):[[o,i],[a,s]]},g.iterations=function(t){return arguments.length?(h=+t,g):h},g}uT.props={};const kT={nodeAlign:"justify",nodeWidth:.008,nodePadding:.03,nodes:t=>t.nodes,links:t=>t.links,nodeSort:void 0,linkSort:void 0,iterations:6},AT={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?ep(t.sourceLinks,fT)-1:0},justify:dT};const MT=t=>e=>{const{nodeId:n,nodeSort:r,nodeAlign:o,nodeWidth:i,nodePadding:a,nodeDepth:s,nodes:c,links:l,linkSort:u,iterations:f}=Object.assign({},kT,t),d=jT().nodeSort(r).linkSort(u).links(l).nodes(c).nodeWidth(i).nodePadding(a).nodeDepth(s).nodeAlign(function(t){const e=typeof t;return"string"===e?AT[t]||dT:"function"===e?t:dT}(o)).iterations(f).extent([[0,0],[1,1]]);"function"==typeof n&&d.nodeId(n);const p=d(e),{nodes:h,links:g}=p,m=h.map(t=>{const{x0:e,x1:n,y0:r,y1:o}=t;return Object.assign(Object.assign({},t),{x:[e,n,n,e],y:[r,r,o,o]})}),y=g.map(t=>{const{source:e,target:n}=t,r=e.x1,o=n.x0,i=t.width/2;return Object.assign(Object.assign({},t),{x:[r,r,o,o],y:[t.y0+i,t.y0-i,t.y1+i,t.y1-i]})});return{nodes:m,links:y}};MT.props={};var _T=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const ST={nodeId:t=>t.key,nodeWidth:.02,nodePadding:.02},ET={type:"polygon",axis:!1,legend:!1,encode:{shape:"polygon",x:"x",y:"y"},scale:{x:{type:"identity"},y:{type:"identity"}},style:{stroke:"#000"}},PT={type:"polygon",axis:!1,legend:!1,encode:{shape:"ribbon",x:"x",y:"y"},style:{fillOpacity:.5,stroke:void 0}},LT={textAlign:t=>t.x[0]<.5?"start":"end",position:t=>t.x[0]<.5?"right":"left",fontSize:10},CT=t=>{const{data:e,encode:n={},scale:r,style:o={},layout:i={},nodeLabels:a=[],linkLabels:s=[],animate:c={},tooltip:l={},interaction:u,state:f={},viewStyle:d={}}=t,{links:p,nodes:h}=jm(e,n);if(!p||0===p.length)return[(0,N.A)({},ET,{data:[],encode:{},scale:r,style:xt(o,"node"),viewStyle:d,labels:[],tooltip:!1,animate:!1,axis:!1,interaction:u,state:{}}),(0,N.A)({},PT,{data:[],encode:{},labels:[],style:xt(o,"link"),tooltip:!1,animate:!1,interaction:u,state:{}})];const g=xt(n,"node"),m=xt(n,"link"),{key:y=t=>t.key,color:b=y}=g,{links:v,nodes:x}=MT(Object.assign(Object.assign(Object.assign({},ST),{nodeId:Om(y)}),i))({links:p,nodes:h}),O=xt(o,"label"),{text:w=y,spacing:j=5}=O,k=_T(O,["text","spacing"]),A=Om(y),M=sp(l,"node",{title:A,items:[{field:"value"}]},!0),_=sp(l,"link",{title:"",items:[t=>({name:"source",value:A(t.source)}),t=>({name:"target",value:A(t.target)})]}),[S,E]=Object.entries(f).reduce((t,[e,n])=>{const r=wt(n,"node","link"),o=xt(n,"node");t[0][e]=Object.assign(Object.assign({},r),o);const i=xt(n,"link");return t[1][e]=Object.assign(Object.assign({},r),i),t},[{},{}]);return[(0,N.A)({},ET,{data:x,encode:Object.assign(Object.assign({},g),{color:b}),scale:r,style:xt(o,"node"),viewStyle:d,labels:[Object.assign(Object.assign(Object.assign({},LT),{text:w,dx:t=>t.x[0]<.5?j:-j}),k),...a],tooltip:M,animate:up(c,"node"),axis:!1,interaction:u,state:S}),(0,N.A)({},PT,{data:v,encode:m,labels:s,style:Object.assign({fill:m.color?void 0:"#aaa",lineWidth:0},xt(o,"link")),tooltip:_,animate:up(c,"link"),interaction:u,state:E})]};function zT(t,e){return e.value-t.value}function TT(t,e){return e.frequency-t.frequency}function BT(t,e){return`${t.id}`.localeCompare(`${e.id}`)}function IT(t,e){return`${t.name}`.localeCompare(`${e.name}`)}CT.props={};const NT={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 RT(t){const{y:e,thickness:n,weight:r,marginRatio:o,id:i,source:s,target:c,sourceWeight:l,targetWeight:u,sortBy:f}=Object.assign(Object.assign({},NT),t);return function(t){const d=t.nodes.map(t=>Object.assign({},t)),p=t.edges.map(t=>Object.assign({},t));return function(t,e){e.forEach(t=>{t.source=s(t),t.target=c(t),t.sourceWeight=l(t),t.targetWeight=u(t)});const n=C(e,t=>t.source),r=C(e,t=>t.target);t.forEach(t=>{t.id=i(t);const e=n.has(t.id)?n.get(t.id):[],o=r.has(t.id)?r.get(t.id):[];t.frequency=e.length+o.length,t.value=qe(e,t=>t.sourceWeight)+qe(o,t=>t.targetWeight)})}(d,p),function(t){const e="function"==typeof f?f:a[f];e&&t.sort(e)}(d),function(t,i){const a=t.length;if(!a)throw mt("Invalid nodes: it's empty!");if(!r){const n=1/a;return t.forEach((t,r)=>{t.x=(r+.5)*n,t.y=e}),{nodes:t,edges:i}}const s=o/(2*a),c=t.reduce((t,e)=>t+e.value,0);t.reduce((t,r)=>{r.weight=r.value/c,r.width=r.weight*(1-o),r.height=n;const i=s+t,a=i+r.width,l=e-n/2,u=l+n;return r.x=[i,a,a,i],r.y=[l,l,u,u],t+r.width+2*s},0)}(d,p),function(t,n){const o=new Map(t.map(t=>[t.id,t]));if(!r)return n.forEach(t=>{const e=s(t),n=c(t),r=o.get(e),i=o.get(n);r&&i&&(t.x=[r.x,i.x],t.y=[r.y,i.y])}),{nodes:t,edges:n};n.forEach(t=>{t.x=[0,0,0,0],t.y=[e,e,e,e]});const i=C(n,t=>t.source),a=C(n,t=>t.target);t.forEach(t=>{const{width:e,x:n,value:r,id:o}=t,s=i.get(o)||[],c=a.get(o)||[];let l=0;s.map(t=>{const o=t.sourceWeight/r*e;t.x[0]=n[0]+l,t.x[1]=n[0]+l+o,l+=o}),c.forEach(t=>{const o=t.targetWeight/r*e;t.x[3]=n[0]+l,t.x[2]=n[0]+l+o,l+=o})})}(d,p),{nodes:d,edges:p}}}const FT=t=>e=>RT(t)(e);FT.props={};var DT=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const $T={y:0,thickness:.05,marginRatio:.1,id:t=>t.key,source:t=>t.source,target:t=>t.target,sourceWeight:t=>t.value||1,targetWeight:t=>t.value||1,sortBy:null},WT={type:"polygon",axis:!1,legend:!1,encode:{shape:"polygon",x:"x",y:"y"},scale:{x:{type:"identity"},y:{type:"identity"}},style:{opacity:1,fillOpacity:1,lineWidth:1}},HT={type:"polygon",axis:!1,legend:!1,encode:{shape:"ribbon",x:"x",y:"y"},style:{opacity:.5,lineWidth:1}},qT={position:"outside",fontSize:10},YT=(t,e)=>{const{data:n,encode:r={},scale:o,style:i={},layout:a={},nodeLabels:s=[],linkLabels:c=[],animate:l={},tooltip:u={}}=t,{nodes:f,links:d}=jm(n,r),p=xt(r,"node"),h=xt(r,"link"),{key:g=t=>t.key,color:m=g}=p,{linkEncodeColor:y=t=>t.source}=h,{nodeWidthRatio:b=$T.thickness,nodePaddingRatio:v=$T.marginRatio}=a,x=DT(a,["nodeWidthRatio","nodePaddingRatio"]),{nodes:O,edges:w}=FT(Object.assign(Object.assign(Object.assign(Object.assign({},$T),{id:Om(g),thickness:b,marginRatio:v}),x),{weight:!0}))({nodes:f,edges:d}),j=xt(i,"label"),{text:k=g}=j,A=DT(j,["text"]),M=sp(u,"node",{title:"",items:[t=>({name:t.key,value:t.value})]},!0),_=sp(u,"link",{title:"",items:[t=>({name:`${t.source} -> ${t.target}`,value:t.value})]}),{height:S,width:E}=e,P=Math.min(S,E);return[(0,N.A)({},HT,{data:w,encode:Object.assign(Object.assign({},h),{color:y}),labels:c,style:Object.assign({fill:y?void 0:"#aaa"},xt(i,"link")),tooltip:_,animate:up(l,"link")}),(0,N.A)({},WT,{data:O,encode:Object.assign(Object.assign({},p),{color:m}),scale:o,style:xt(i,"node"),coordinate:{type:"polar",outerRadius:(P-20)/P,startAngle:2*-Math.PI,endAngle:0},labels:[Object.assign(Object.assign(Object.assign({},qT),{text:k}),A),...s],tooltip:M,animate:up(l,"node"),axis:!1})]};YT.props={};var XT=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const GT={fontSize:10,text:t=>Ho(t.path),position:"inside",fill:"#000",textOverflow:"clip",wordWrap:!0,maxLines:1,wordWrapWidth:t=>t.x1-t.x0,isTreemapLabel:!0},VT={title:t=>{var e,n;return null===(n=null===(e=t.path)||void 0===e?void 0:e.join)||void 0===n?void 0:n.call(e,".")},items:[{field:"value"}]},KT={title:t=>Ho(t.path),items:[{field:"value"}]},UT=(t,e)=>{const{width:n,height:r,options:o}=e,{data:i,encode:a={},scale:s,style:c={},layout:l={},labels:u=[],tooltip:f={}}=t,d=XT(t,["data","encode","scale","style","layout","labels","tooltip"]),p=k(o,["interaction","treemapDrillDown"])||k(o,["marks",0,"interaction","treemapDrillDown"]),h=(0,N.A)({},((t,e)=>({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}))(n,r),l,{layer:p?t=>1===t.depth:l.layer}),[g,m]=rM(i,h,a),y=xt(c,"label");return(0,N.A)({},((t,e)=>({type:"rect",axis:!1,encode:{x:"x",y:"y",key:"id",color:t=>t.path[1]},scale:{x:{domain:[0,t],range:[0,1]},y:{domain:[0,e],range:[0,1]}},style:{stroke:"#fff"},state:{active:{opacity:.6},inactive:{opacity:1}}}))(n,r),Object.assign(Object.assign({data:g,scale:s,style:c,labels:[Object.assign(Object.assign(Object.assign({},GT),y),p&&{cursor:"pointer"}),...u]},d),{encode:a,tooltip:cp(f,VT),axis:!1}),p?{interaction:Object.assign(Object.assign({},d.interaction),{treemapDrillDown:p?Object.assign(Object.assign({},p),{originData:m,layout:h}):void 0}),encode:Object.assign({color:t=>Ho(t.path)},a),tooltip:cp(f,KT)}:{})};UT.props={};var ZT=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};function JT(t,e){return ep(t,t=>e[t])}function QT(t,e){return Ye(t,t=>e[t])}function tB(t,e){const n=2.5*eB(t,e)-1.5*rB(t,e);return ep(t,t=>e[t]>=n?e[t]:NaN)}function eB(t,e){return z_(t,.25,t=>e[t])}function nB(t,e){return z_(t,.5,t=>e[t])}function rB(t,e){return z_(t,.75,t=>e[t])}function oB(t,e){const n=2.5*rB(t,e)-1.5*eB(t,e);return Ye(t,t=>e[t]<=n?e[t]:NaN)}function iB(){return(t,e)=>{const{encode:n}=e,{y:r,x:o}=n,{value:i}=r,{value:a}=o,s=Array.from(C(t,t=>a[+t]).values()),c=s.flatMap(t=>{const e=tB(t,i),n=oB(t,i);return t.filter(t=>i[t]<e||i[t]>n)});return[c,e]}}const aB=t=>{const{data:e,encode:n,style:r={},tooltip:o={},animate:i}=t,a=ZT(t,["data","encode","style","tooltip","transform","animate"]),{point:s=!0}=r,c=ZT(r,["point"]),{y:l}=n,u={y:l,y1:l,y2:l,y3:l,y4:l},f={y1:eB,y2:nB,y3:rB},d=sp(o,"box",{items:[{channel:"y",name:"min"},{channel:"y1",name:"q1"},{channel:"y2",name:"q2"},{channel:"y3",name:"q3"},{channel:"y4",name:"max"}]},!0),p=sp(o,"point",{title:{channel:"x"},items:[{name:"outlier",channel:"y"}]});if(!s)return Object.assign({type:"box",data:e,transform:[Object.assign(Object.assign({type:"groupX",y:JT},f),{y4:QT})],encode:Object.assign(Object.assign({},n),u),style:c,tooltip:d},a);const h=xt(c,"box"),g=xt(c,"point");return[Object.assign({type:"box",data:e,transform:[Object.assign(Object.assign({type:"groupX",y:tB},f),{y4:oB})],encode:Object.assign(Object.assign({},n),u),style:h,tooltip:d,animate:up(i,"box")},a),{type:"point",data:e,transform:[{type:iB}],encode:n,style:Object.assign({},g),tooltip:p,animate:up(i,"point")}]};aB.props={};const sB=(t,e)=>Math.sqrt(Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2))/2,cB=(t,e)=>{if(!e)return;const{coordinate:n}=e;if(!(null==n?void 0:n.getCenter))return;const r=n.getCenter();return(n,o,i)=>{const{document:a}=e.canvas,{color:s,index:c}=o,l=a.createElement("g",{}),u=sB(n[0],n[1]),f=2*sB(n[0],r),d=((t,e,n)=>{const r=Math.atan2(t[1]-n[1],t[0]-n[0]);let o=Math.atan2(e[1]-n[1],e[0]-n[0])-r;return o<0&&(o+=2*Math.PI),o})(n[3],n[0],r)>Math.PI,p=a.createElement("path",{style:Object.assign(Object.assign(Object.assign({d:[["M",...n[0]],["A",u,u,0,1,0,...n[1]],["A",f+2*u,f+2*u,0,d?1:0,0,...n[2]],["A",u,u,0,1,0===c?0:1,...n[3]],["A",f,f,0,d?1:0,1,...n[0]],["Z"]]},i),di(t,["shape","last","first"])),{fill:s||i.color})});return l.appendChild(p),l}};var lB=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const uB={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"]}}},fB={style:{shape:(t,e)=>{const{radius:n}=t,r=lB(t,["shape","radius"]),o=xt(r,"pointer"),i=xt(r,"pin"),{shape:a}=o,s=lB(o,["shape"]),{shape:c}=i,u=lB(i,["shape"]),{coordinate:f,theme:d}=e;return(t,e)=>{const o=t.map(t=>f.invert(t)),[i,p,h]=function(t,e){const{transformations:n}=t.getOptions(),[,...r]=n.find(t=>t[0]===e);return r}(f,"polar"),g=f.clone(),{color:m}=e,y=Ke({startAngle:i,endAngle:p,innerRadius:h,outerRadius:n});y.push(["cartesian"]),g.update({transformations:y});const b=o.map(t=>g.map(t)),[v,x]=cc(b),[O,w]=f.getCenter(),j=Object.assign(Object.assign({x1:v,y1:x,x2:O,y2:w,stroke:m},s),r),k=Object.assign(Object.assign({cx:O,cy:w,stroke:m},u),r),A=_t(new l.YJ);return At(a)||("function"==typeof a?A.append(()=>a(b,e,g,d)):A.append("line").call(ec,j).node()),At(c)||("function"==typeof c?A.append(()=>c(b,e,g,d)):A.append("circle").call(ec,k).node()),A.node()}},lineWidth:4,pointerLineCap:"round",pinR:10,pinFill:"#fff",radius:.6}},dB={type:"text",style:{x:"50%",y:"60%",textAlign:"center",textBaseline:"middle",fontSize:20,fontWeight:800,fill:"#888"},tooltip:!1};function pB(t,e){const{name:n="score",target:r,total:o,percent:i,thresholds:a=[]}=function(t){if((0,tt.A)(t)){const e=Math.max(0,Math.min(t,1));return{percent:e,target:e,total:1}}return t}(t),s=i||r,c=i?1:o,l=Object.assign({y:{domain:[0,c]}},e);return a.length?{targetData:[{x:n,y:s,color:"target"}],totalData:a.map((t,e)=>({x:n,y:e>=1?t-a[e-1]:t,color:e})),target:s,total:c,scale:l}:{targetData:[{x:n,y:s,color:"target"}],totalData:[{x:n,y:s,color:"target"},{x:n,y:c-s,color:"total"}],target:s,total:c,scale:l}}function hB(t,{target:e,total:n}){const{content:r}=t;return r?r(e,n):e.toString()}const gB=t=>{const{data:e={},scale:n={},style:r={},animate:o={},transform:i=[]}=t,a=lB(t,["data","scale","style","animate","transform"]),{targetData:s,totalData:c,target:l,total:u,scale:f}=pB(e,n),d=xt(r,"text"),{tooltip:p}=d,h=lB(d,["tooltip"]),g=(m=["pointer","pin"],Object.fromEntries(Object.entries(r).filter(([t])=>m.find(e=>t.startsWith(e)))));var m;const y=xt(r,"arc");return[(0,N.A)({},uB,Object.assign({type:"interval",transform:[{type:"stackY"}],data:c,scale:f,style:"round"===y.shape?Object.assign(Object.assign({},y),{shape:cB}):y,animate:"object"==typeof o?xt(o,"arc"):o},a)),(0,N.A)({},uB,fB,Object.assign({type:"point",data:s,scale:f,style:g,animate:"object"==typeof o?xt(o,"indicator"):o},a)),(0,N.A)({},dB,{style:Object.assign({text:hB(h,{target:l,total:u})},h),tooltip:p,animate:"object"==typeof o?xt(o,"text"):o})]};gB.props={};function mB(t,e,n){return t+(e-t)*n}function yB(t,e,n,r){return 0===e?[[t+.5*n/Math.PI/2,r/2],[t+.5*n/Math.PI,r],[t+n/4,r]]:1===e?[[t+.5*n/Math.PI/2*(Math.PI-2),r],[t+.5*n/Math.PI/2*(Math.PI-1),r/2],[t+n/4,0]]:2===e?[[t+.5*n/Math.PI/2,-r/2],[t+.5*n/Math.PI,-r],[t+n/4,-r]]:[[t+.5*n/Math.PI/2*(Math.PI-2),-r],[t+.5*n/Math.PI/2*(Math.PI-1),-r/2],[t+n/4,0]]}function bB(t,e,n,r,o,i,a){const s=4*Math.ceil(2*t/n*4),c=[];let l=r;for(;l<2*-Math.PI;)l+=2*Math.PI;for(;l>0;)l-=2*Math.PI;l=l/Math.PI/2*n;const u=i-t+l-2*t;c.push(["M",u,e]);let f=0;for(let t=0;t<s;++t){const r=yB(t*n/4,t%4,n,o);c.push(["C",r[0][0]+u,-r[0][1]+e,r[1][0]+u,-r[1][1]+e,r[2][0]+u,-r[2][1]+e]),t===s-1&&(f=r[2][0])}return c.push(["L",f+u,a+t]),c.push(["L",u,a+t]),c.push(["Z"]),c}const vB={pin:function(t,e,n){const r=4*n/3,o=Math.max(r,2*n),i=r/2,a=t,s=i+e-o/2,c=Math.asin(i/(.85*(o-i))),l=Math.sin(c)*i,u=Math.cos(c)*i,f=a-u,d=s+l,p=t,h=s+i/Math.sin(c);return`\n M ${f} ${d}\n A ${i} ${i} 0 1 1 ${f+2*u} ${d}\n Q ${p} ${h} ${t} ${e+o/2}\n Q ${p} ${h} ${f} ${d}\n Z \n `},rect:function(t,e,n){const r=.618*n;return`\n M ${t-r} ${e-n}\n L ${t+r} ${e-n}\n L ${t+r} ${e+n}\n L ${t-r} ${e+n}\n Z\n `},circle:function(t,e,n){return`\n M ${t} ${e-n} \n a ${n} ${n} 0 1 0 0 ${2*n}\n a ${n} ${n} 0 1 0 0 ${2*-n}\n Z\n `},diamond:function(t,e,n){return`\n M ${t} ${e-n}\n L ${t+n} ${e}\n L ${t} ${e+n}\n L ${t-n} ${e}\n Z\n `},triangle:function(t,e,n){return`\n M ${t} ${e-n}\n L ${t+n} ${e+n}\n L ${t-n} ${e+n}\n Z\n `}};var xB=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const OB=(t,e)=>{if(!e)return;const{coordinate:n}=e,{liquidOptions:r,styleOptions:o}=t,{liquidShape:i,percent:a}=r,{background:s,outline:c={},wave:l={}}=o,u=xB(o,["background","outline","wave"]),{border:f=2,distance:d=0}=c,p=xB(c,["border","distance"]),{length:h=192,count:g=3}=l;return(t,r,o)=>{const{document:c}=e.canvas,{color:l,fillOpacity:m}=o,y=Object.assign(Object.assign({fill:l},o),u),b=c.createElement("g",{}),[v,x]=n.getCenter(),O=n.getSize(),w=Math.min(...O)/2,j=(0,Jn.A)(i)?i:((t="circle")=>vB[t]||vB.circle)(i),k=j(v,x,w,...O),A=j(v,x,w+f/2,...O);if(Object.keys(s).length){const t=c.createElement("path",{style:Object.assign({d:k,fill:"#fff"},s)});b.appendChild(t)}if(a>0){const t=c.createElement("path",{style:{d:A}});b.appendChild(t),b.style.clipPath=t,function(t,e,n,r,o,i,a,s,c,l,u){const{fill:f,fillOpacity:d,opacity:p}=o;for(let o=0;o<r;o++){const h=r<=1?1:o/(r-1),g=bB(s,a+s*n,c,0,s/40,t,e),m=u.createElement("path",{style:{d:g,fill:f,opacity:mB(.2,.9,h)*Number(p||d)}});i.appendChild(m);try{if(!1===l)return;m.animate([{transform:"translate(0, 0)"},{transform:`translate(${2*c}, 0)`}],{duration:2*mB(2500,5e3,h),iterations:1/0})}catch(t){console.warn("off-screen group animate error!")}}}(v,x,1-a,g,y,b,t.getBBox().y,2*w,h,!0,c)}const M=c.createElement("path",{style:{d:k,fill:"transparent",lineWidth:f+2*d,stroke:"#fff"}}),_=c.createElement("path",{style:Object.assign(Object.assign(Object.assign({d:k,stroke:l,strokeOpacity:m,lineWidth:f},y),p),{fill:"transparent"})});return b.appendChild(M),b.appendChild(_),b}};OB.props={};var wB=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const jB={axis:{x:!1,y:!1},legend:!1,tooltip:!1,encode:{x:"type",y:"percent"},scale:{y:{domain:[0,1]}},style:{shape:OB},animate:{enter:{type:"fadeIn"}}},kB={type:"text",style:{x:"50%",y:"50%",textAlign:"center",textBaseline:"middle",fontSize:20,fontWeight:800,fill:"#888"},animate:{enter:{type:"fadeIn"}}},AB=t=>{const{data:e={},style:n={},animate:r}=t,o=wB(t,["data","style","animate"]),i=Math.max(0,(0,tt.A)(e)?e:null==e?void 0:e.percent),a=[{percent:i,type:"liquid"}],s=Object.assign(Object.assign({},xt(n,"text")),xt(n,"content")),c=xt(n,"outline"),l=xt(n,"wave"),u=xt(n,"background");return[(0,N.A)({},jB,Object.assign({type:"interval",data:a,style:{liquidOptions:{percent:i,liquidShape:null==n?void 0:n.shape},styleOptions:Object.assign(Object.assign({},n),{outline:c,wave:l,background:u})},animate:r},o)),(0,N.A)({},kB,{style:Object.assign({text:`${Ze(100*i)} %`},s),animate:r})]};function MB(t){const e=new Array(t);for(let n=0;n<t;++n)e[n]=0;return e}function _B(t,e){return MB(t).map(()=>MB(e))}function SB(t,e){let n=0;for(let r=0;r<t.length;++r)n+=t[r]*e[r];return n}function EB(t){return Math.sqrt(SB(t,t))}function PB(t,e,n){for(let r=0;r<e.length;++r)t[r]=e[r]*n}function LB(t,e,n,r,o){for(let i=0;i<t.length;++i)t[i]=e*n[i]+r*o[i]}function CB(t,e,n,r,o,i,a){const s=n.fx,c=SB(n.fxprime,e);let l=s,u=s,f=c,d=0;function p(u,d,p){for(let h=0;h<16;++h)if(LB(r.x,1,n.x,o=(u+d)/2,e),l=r.fx=t(r.x,r.fxprime),f=SB(r.fxprime,e),l>s+i*o*c||l>=p)d=o;else{if(Math.abs(f)<=-a*c)return o;f*(d-u)>=0&&(d=u),u=o,p=l}return 0}o=o||1,i=i||1e-6,a=a||.1;for(let h=0;h<10;++h){if(LB(r.x,1,n.x,o,e),l=r.fx=t(r.x,r.fxprime),f=SB(r.fxprime,e),l>s+i*o*c||h&&l>=u)return p(d,o,u);if(Math.abs(f)<=-a*c)return o;if(f>=0)return p(o,d,l);u=l,d=o,o*=2}return o}function zB(t,e,n){let r={x:e.slice(),fx:0,fxprime:e.slice()},o={x:e.slice(),fx:0,fxprime:e.slice()};const i=e.slice();let a,s=1;const c=(n=n||{}).maxIterations||20*e.length;r.fx=t(r.x,r.fxprime);const l=r.fxprime.slice();PB(l,r.fxprime,-1);for(let e=0;e<c;++e){if(s=CB(t,l,r,o,s),n.history&&n.history.push({x:r.x.slice(),fx:r.fx,fxprime:r.fxprime.slice(),alpha:s}),s){LB(i,1,o.fxprime,-1,r.fxprime);const t=SB(r.fxprime,r.fxprime);LB(l,Math.max(0,SB(i,o.fxprime)/t),l,-1,o.fxprime),a=r,r=o,o=a}else PB(l,r.fxprime,-1);if(EB(r.fxprime)<=1e-5)break}return n.history&&n.history.push({x:r.x.slice(),fx:r.fx,fxprime:r.fxprime.slice(),alpha:s}),r}AB.props={};const TB=1e-10;function BB(t,e){const n=function(t){const e=[];for(let n=0;n<t.length;++n)for(let r=n+1;r<t.length;++r){const o=FB(t[n],t[r]);for(let t=0;t<o.length;++t){const i=o[t];i.parentIndex=[n,r],e.push(i)}}return e}(t),r=n.filter(function(e){return function(t,e){for(let n=0;n<e.length;++n)if(NB(t,e[n])>e[n].radius+TB)return!1;return!0}(e,t)});let o,i=0,a=0;const s=[];if(r.length>1){const e=function(t){const e={x:0,y:0};for(let n=0;n<t.length;++n)e.x+=t[n].x,e.y+=t[n].y;return e.x/=t.length,e.y/=t.length,e}(r);for(o=0;o<r.length;++o){const t=r[o];t.angle=Math.atan2(t.x-e.x,t.y-e.y)}r.sort(function(t,e){return e.angle-t.angle});let n=r[r.length-1];for(o=0;o<r.length;++o){const e=r[o];a+=(n.x+e.x)*(e.y-n.y);const c={x:(e.x+n.x)/2,y:(e.y+n.y)/2};let l=null;for(let r=0;r<e.parentIndex.length;++r)if(n.parentIndex.indexOf(e.parentIndex[r])>-1){const o=t[e.parentIndex[r]],i=Math.atan2(e.x-o.x,e.y-o.y),a=Math.atan2(n.x-o.x,n.y-o.y);let s=a-i;s<0&&(s+=2*Math.PI);const u=a-s/2;let f=NB(c,{x:o.x+o.radius*Math.sin(u),y:o.y+o.radius*Math.cos(u)});f>2*o.radius&&(f=2*o.radius),(null===l||l.width>f)&&(l={circle:o,width:f,p1:e,p2:n})}null!==l&&(s.push(l),i+=IB(l.circle.radius,l.width),n=e)}}else{let e=t[0];for(o=1;o<t.length;++o)t[o].radius<e.radius&&(e=t[o]);let n=!1;for(o=0;o<t.length;++o)if(NB(t[o],e)>Math.abs(e.radius-t[o].radius)){n=!0;break}n?i=a=0:(i=e.radius*e.radius*Math.PI,s.push({circle:e,p1:{x:e.x,y:e.y+e.radius},p2:{x:e.x-TB,y:e.y+e.radius},width:2*e.radius}))}return a/=2,e&&(e.area=i+a,e.arcArea=i,e.polygonArea=a,e.arcs=s,e.innerPoints=r,e.intersectionPoints=n),i+a}function IB(t,e){return t*t*Math.acos(1-e/t)-(t-e)*Math.sqrt(e*(2*t-e))}function NB(t,e){return Math.sqrt((t.x-e.x)*(t.x-e.x)+(t.y-e.y)*(t.y-e.y))}function RB(t,e,n){if(n>=t+e)return 0;if(n<=Math.abs(t-e))return Math.PI*Math.min(t,e)*Math.min(t,e);const r=e-(n*n-t*t+e*e)/(2*n);return IB(t,t-(n*n-e*e+t*t)/(2*n))+IB(e,r)}function FB(t,e){const n=NB(t,e),r=t.radius,o=e.radius;if(n>=r+o||n<=Math.abs(r-o))return[];const i=(r*r-o*o+n*n)/(2*n),a=Math.sqrt(r*r-i*i),s=t.x+i*(e.x-t.x)/n,c=t.y+i*(e.y-t.y)/n,l=a/n*-(e.y-t.y),u=a/n*-(e.x-t.x);return[{x:s+l,y:c-u},{x:s-l,y:c+u}]}function DB(t,e){(e=e||{}).maxIterations=e.maxIterations||500;const n=e.initialLayout||HB,r=e.lossFunction||qB;t=function(t){t=t.slice();const e=[],n={};let r,o,i,a;for(r=0;r<t.length;++r){const o=t[r];1==o.sets.length?e.push(o.sets[0]):2==o.sets.length&&(i=o.sets[0],a=o.sets[1],n[[i,a]]=!0,n[[a,i]]=!0)}for(e.sort((t,e)=>t>e?1:-1),r=0;r<e.length;++r)for(i=e[r],o=r+1;o<e.length;++o)a=e[o],[i,a]in n||t.push({sets:[i,a],size:0});return t}(t);const o=n(t,e),i=[],a=[];let s;for(s in o)o.hasOwnProperty(s)&&(i.push(o[s].x),i.push(o[s].y),a.push(s));const c=function(t,e,n){const r=(n=n||{}).maxIterations||200*e.length,o=n.nonZeroDelta||1.05,i=n.zeroDelta||.001,a=n.minErrorDelta||1e-6,s=n.minErrorDelta||1e-5,c=void 0!==n.rho?n.rho:1,l=void 0!==n.chi?n.chi:2,u=void 0!==n.psi?n.psi:-.5,f=void 0!==n.sigma?n.sigma:.5;let d;const p=e.length,h=new Array(p+1);h[0]=e,h[0].fx=t(e),h[0].id=0;for(let n=0;n<p;++n){const r=e.slice();r[n]=r[n]?r[n]*o:i,h[n+1]=r,h[n+1].fx=t(r),h[n+1].id=n+1}function g(t){for(let e=0;e<t.length;e++)h[p][e]=t[e];h[p].fx=t.fx}const m=(t,e)=>t.fx-e.fx,y=e.slice(),b=e.slice(),v=e.slice(),x=e.slice();for(let e=0;e<r;++e){if(h.sort(m),n.history){const t=h.map(t=>{const e=t.slice();return e.fx=t.fx,e.id=t.id,e});t.sort((t,e)=>t.id-e.id),n.history.push({x:h[0].slice(),fx:h[0].fx,simplex:t})}d=0;for(let t=0;t<p;++t)d=Math.max(d,Math.abs(h[0][t]-h[1][t]));if(Math.abs(h[0].fx-h[p].fx)<a&&d<s)break;for(let t=0;t<p;++t){y[t]=0;for(let e=0;e<p;++e)y[t]+=h[e][t];y[t]/=p}const e=h[p];if(LB(b,1+c,y,-c,e),b.fx=t(b),b.fx<h[0].fx)LB(x,1+l,y,-l,e),x.fx=t(x),g(x.fx<b.fx?x:b);else if(b.fx>=h[p-1].fx){let n=!1;if(b.fx>e.fx?(LB(v,1+u,y,-u,e),v.fx=t(v),v.fx<e.fx?g(v):n=!0):(LB(v,1-u*c,y,u*c,e),v.fx=t(v),v.fx<b.fx?g(v):n=!0),n){if(f>=1)break;for(let e=1;e<h.length;++e)LB(h[e],1-f,h[0],f,h[e]),h[e].fx=t(h[e])}}else g(b)}return h.sort(m),{fx:h[0].fx,x:h[0]}}(function(e){const n={};for(let t=0;t<a.length;++t){const r=a[t];n[r]={x:e[2*t],y:e[2*t+1],radius:o[r].radius}}return r(n,t)},i,e),l=c.x;for(let t=0;t<a.length;++t)s=a[t],o[s].x=l[2*t],o[s].y=l[2*t+1];return o}const $B=1e-10;function WB(t,e,n){return Math.min(t,e)*Math.min(t,e)*Math.PI<=n+1e-10?Math.abs(t-e):function(t,e,n,r){const o=(r=r||{}).maxIterations||100,i=r.tolerance||1e-10,a=t(e),s=t(n);let c=n-e;if(a*s>0)throw"Initial bisect points must have opposite signs";if(0===a)return e;if(0===s)return n;for(let n=0;n<o;++n){c/=2;const n=e+c,r=t(n);if(r*a>=0&&(e=n),Math.abs(c)<i||0===r)return n}return e+c}(function(r){return RB(t,e,r)-n},0,t+e)}function HB(t,e){let n=function(t,e){const n=e&&e.lossFunction?e.lossFunction:qB,r={},o={};let i;for(let e=0;e<t.length;++e){const n=t[e];1==n.sets.length&&(i=n.sets[0],r[i]={x:1e10,y:1e10,rowid:Object.keys(r).length,size:n.size,radius:Math.sqrt(n.size/Math.PI)},o[i]=[])}t=t.filter(function(t){return 2==t.sets.length});for(let e=0;e<t.length;++e){const n=t[e];let i=n.hasOwnProperty("weight")?n.weight:1;const a=n.sets[0],s=n.sets[1];n.size+$B>=Math.min(r[a].size,r[s].size)&&(i=0),o[a].push({set:s,size:n.size,weight:i}),o[s].push({set:a,size:n.size,weight:i})}const a=[];for(i in o)if(o.hasOwnProperty(i)){let t=0;for(let e=0;e<o[i].length;++e)t+=o[i][e].size*o[i][e].weight;a.push({set:i,size:t})}function s(t,e){return e.size-t.size}a.sort(s);const c={};function l(t){return t.set in c}function u(t,e){r[e].x=t.x,r[e].y=t.y,c[e]=!0}u({x:0,y:0},a[0].set);for(let e=1;e<a.length;++e){const c=a[e].set,f=o[c].filter(l);if(i=r[c],f.sort(s),0===f.length)throw"ERROR: missing pairwise overlap information";const d=[];for(let t=0;t<f.length;++t){const e=r[f[t].set],n=WB(i.radius,e.radius,f[t].size);d.push({x:e.x+n,y:e.y}),d.push({x:e.x-n,y:e.y}),d.push({y:e.y+n,x:e.x}),d.push({y:e.y-n,x:e.x});for(let o=t+1;o<f.length;++o){const t=r[f[o].set],a=WB(i.radius,t.radius,f[o].size),s=FB({x:e.x,y:e.y,radius:n},{x:t.x,y:t.y,radius:a});for(let t=0;t<s.length;++t)d.push(s[t])}}let p=1e50,h=d[0];for(let e=0;e<d.length;++e){r[c].x=d[e].x,r[c].y=d[e].y;const o=n(r,t);o<p&&(p=o,h=d[e])}u(h,c)}return r}(t,e);const r=e.lossFunction||qB;if(t.length>=8){const o=function(t,e){e=e||{};const n=e.restarts||10,r=[],o={};let i;for(i=0;i<t.length;++i){const e=t[i];1==e.sets.length&&(o[e.sets[0]]=r.length,r.push(e))}const a=function(t,e,n){const r=_B(e.length,e.length),o=_B(e.length,e.length);return t.filter(function(t){return 2==t.sets.length}).map(function(t){const i=n[t.sets[0]],a=n[t.sets[1]],s=WB(Math.sqrt(e[i].size/Math.PI),Math.sqrt(e[a].size/Math.PI),t.size);r[i][a]=r[a][i]=s;let c=0;t.size+1e-10>=Math.min(e[i].size,e[a].size)?c=1:t.size<=1e-10&&(c=-1),o[i][a]=o[a][i]=c}),{distances:r,constraints:o}}(t,r,o);let s=a.distances;const c=a.constraints,l=EB(s.map(EB))/s.length;s=s.map(function(t){return t.map(function(t){return t/l})});const u=function(t,e){return function(t,e,n,r){let o,i=0;for(o=0;o<e.length;++o)e[o]=0;for(o=0;o<n.length;++o){const a=t[2*o],s=t[2*o+1];for(let c=o+1;c<n.length;++c){const l=t[2*c],u=t[2*c+1],f=n[o][c],d=r[o][c],p=(l-a)*(l-a)+(u-s)*(u-s),h=Math.sqrt(p),g=p-f*f;d>0&&h<=f||d<0&&h>=f||(i+=2*g*g,e[2*o]+=4*g*(a-l),e[2*o+1]+=4*g*(s-u),e[2*c]+=4*g*(l-a),e[2*c+1]+=4*g*(u-s))}}return i}(t,e,s,c)};let f,d;for(i=0;i<n;++i){d=zB(u,MB(2*s.length).map(Math.random),e),(!f||d.fx<f.fx)&&(f=d)}const p=f.x,h={};for(i=0;i<r.length;++i){const t=r[i];h[t.sets[0]]={x:p[2*i]*l,y:p[2*i+1]*l,radius:Math.sqrt(t.size/Math.PI)}}if(e.history)for(i=0;i<e.history.length;++i)PB(e.history[i].x,l);return h}(t,e);r(o,t)+1e-8<r(n,t)&&(n=o)}return n}function qB(t,e){let n=0;function r(e){return e.map(function(e){return t[e]})}for(let o=0;o<e.length;++o){const i=e[o];let a;if(1==i.sets.length)continue;if(2==i.sets.length){const e=t[i.sets[0]],n=t[i.sets[1]];a=RB(e.radius,n.radius,NB(e,n))}else a=BB(r(i.sets));n+=(i.hasOwnProperty("weight")?i.weight:1)*(a-i.size)*(a-i.size)}return n}function YB(t){const e=function(e){const n=Math.max.apply(null,t.map(function(t){return t[e]+t.radius})),r=Math.min.apply(null,t.map(function(t){return t[e]-t.radius}));return{max:n,min:r}};return{xRange:e("x"),yRange:e("y")}}const XB=t=>{const{sets:e="sets",size:n="size",as:r=["key","path"],padding:o=0}=t,[i,a]=r;return t=>{const r=t.map(t=>Object.assign(Object.assign({},t),{sets:t[e],size:t[n],[i]:t.sets.join("&")}));r.sort((t,e)=>t.sets.length-e.sets.length);const s=DB(r);let c;return r.map(t=>{const n=t[e];return Object.assign(Object.assign({},t),{[a]:({width:t,height:e})=>{c=c||function(t,e,n,r){const o=[],i=[];for(const e in t)t.hasOwnProperty(e)&&(i.push(e),o.push(t[e]));e-=2*r,n-=2*r;const a=YB(o),s=a.xRange,c=a.yRange;if(s.max==s.min||c.max==c.min)return console.log("not scaling solution: zero size detected"),t;const l=Math.min(n/(c.max-c.min),e/(s.max-s.min)),u=(e-(s.max-s.min)*l)/2,f=(n-(c.max-c.min)*l)/2,d={};for(let t=0;t<o.length;++t){const e=o[t];d[i[t]]={radius:l*e.radius,x:r+u+(e.x-s.min)*l,y:r+f+(e.y-c.min)*l}}return d}(s,t,e,o);const r=n.map(t=>c[t]);let i=function(t){const e={};BB(t,e);const n=e.arcs;if(0===n.length)return"M 0 0";if(1==n.length){const t=n[0].circle;return function(t,e,n){const r=[],o=t-n,i=e;return r.push("M",o,i),r.push("A",n,n,0,1,0,o+2*n,i),r.push("A",n,n,0,1,0,o,i),r.join(" ")}(t.x,t.y,t.radius)}{const t=["\nM",n[0].p2.x,n[0].p2.y];for(let e=0;e<n.length;++e){const r=n[e],o=r.circle.radius;t.push("\nA",o,o,0,r.width>o?1:0,1,r.p1.x,r.p1.y)}return t.join(" ")}}(r);return/[zZ]$/.test(i)||(i+=" Z"),i}})})}};function GB(){var t=1,e=1,n=0,r=!1;function o(o){var i=o.height+1;return o.x0=o.y0=n,o.x1=t,o.y1=e/i,o.eachBefore(function(t,e){return function(r){r.children&&YA(r,r.x0,t*(r.depth+1)/e,r.x1,t*(r.depth+2)/e);var o=r.x0,i=r.y0,a=r.x1-n,s=r.y1-n;a<o&&(o=a=(o+a)/2),s<i&&(i=s=(i+s)/2),r.x0=o,r.y0=i,r.x1=a,r.y1=s}}(e,i)),r&&o.eachBefore(JA),o}return o.round=function(t){return arguments.length?(r=!!t,o):r},o.size=function(n){return arguments.length?(t=+n[0],e=+n[1],o):[t,e]},o.padding=function(t){return arguments.length?(n=+t,o):n},o}XB.props={};const VB={field:"value",size:[1,1],round:!1,padding:0,sort:(t,e)=>e.value-t.value,as:["x","y"],ignoreParentValue:!0},KB="childNodeCount",UB="Invalid field: it must be a string!";function ZB(t,e){const n=(e=xw({},VB,e)).as;if(!(0,Le.A)(n)||2!==n.length)throw new TypeError('Invalid as: it must be an array with 2 strings (e.g. [ "x", "y" ])!');let r;try{r=function(t,e){const{field:n,fields:r}=t;if((0,j.A)(n))return n;if((0,Le.A)(n))return console.warn(UB),n[0];if(console.warn(`${UB} will try to get fields instead.`),(0,j.A)(r))return r;if((0,Le.A)(r)&&r.length)return r[0];if(e)return e;throw new TypeError(UB)}(e)}catch(t){console.warn(t)}const o=(t=>GB().size(e.size).round(e.round).padding(e.padding)(BA.Ay(t).sum(t=>hs(t.children)?e.ignoreParentValue?0:t[r]-fi(t.children,(t,e)=>t+e[r],0):t[r]).sort(e.sort)))(t),i=n[0],a=n[1];return o.each(t=>{var e,r;t[i]=[t.x0,t.x1,t.x1,t.x0],t[a]=[t.y1,t.y1,t.y0,t.y0],t.name=t.name||(null===(e=t.data)||void 0===e?void 0:e.name)||(null===(r=t.data)||void 0===r?void 0:r.label),t.data.name=t.name,["x0","x1","y0","y1"].forEach(e=>{-1===n.indexOf(e)&&delete t[e]})}),function(t){const e=[];if(t&&t.each){let n,r;t.each(t=>{var o,i;t.parent!==n?(n=t.parent,r=0):r+=1;const a=ol(((null===(o=t.ancestors)||void 0===o?void 0:o.call(t))||[]).map(t=>e.find(e=>e.name===t.name)||t),({depth:e})=>e>0&&e<t.depth);t.nodeAncestor=a,t[KB]=(null===(i=t.children)||void 0===i?void 0:i.length)||0,t.nodeIndex=r,e.push(t)})}else t&&t.eachNode&&t.eachNode(t=>{e.push(t)});return e}(o)}var JB=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const QB="sunburst",tI="markType",eI="path",nI="ancestor-node";const rI={id:QB,encode:{x:"x",y:"y",key:eI,color:nI,value:"value"},axis:{x:!1,y:!1},style:{[tI]:QB,stroke:"#fff",lineWidth:.5,fillOpacity:"fillOpacity",[KB]:KB,depth:"depth"},state:{active:{zIndex:2,stroke:"#000"},inactive:{zIndex:1,stroke:"#fff"}},legend:!1,interaction:{drillDown:!0},coordinate:{type:"polar",innerRadius:.2}},oI=t=>{const{encode:e,data:n=[]}=t,r=JB(t,["encode","data"]),o=Object.assign(Object.assign({},r.coordinate),{innerRadius:Math.max(k(r,["coordinate","innerRadius"],.2),1e-5)}),i=Object.assign(Object.assign({},rI.encode),e),{value:a}=i,s=function(t){const{data:e,encode:n}=t,{color:r,value:o}=n,i=ZB(e,{field:o,type:"hierarchy.partition",as:["x","y"]}),a=[];return i.forEach(t=>{var e,n,i,s;if(0===t.depth)return null;let c=t.data.name;const l=[c];let u=Object.assign({},t);for(;u.depth>1;)c=`${null===(e=u.parent.data)||void 0===e?void 0:e.name} / ${c}`,l.unshift(null===(n=u.parent.data)||void 0===n?void 0:n.name),u=u.parent;const f=Object.assign(Object.assign(Object.assign({},CA(t.data,[o])),{[eI]:c,[nI]:u.data.name}),t);r&&r!==nI&&(f[r]=t.data[r]||(null===(s=null===(i=t.parent)||void 0===i?void 0:i.data)||void 0===s?void 0:s[r])),a.push(f)}),a.map(t=>{const e=t.x.slice(0,2),n=[t.y[2],t.y[0]];return e[0]===e[1]&&(n[0]=n[1]=(t.y[2]+t.y[0])/2),Object.assign(Object.assign({},t),{x:e,y:n,fillOpacity:Math.pow(.85,t.depth)})})}({encode:i,data:n});return[(0,N.A)({},rI,Object.assign(Object.assign({type:"rect",data:s,encode:i,tooltip:{title:"path",items:[t=>({name:a,value:t[a]})]}},r),{coordinate:o}))]};oI.props={};var iI=function(t,e,n,r){return new(n||(n=Promise))(function(o,i){function a(t){try{c(r.next(t))}catch(t){i(t)}}function s(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){t.done?o(t.value):function(t){return t instanceof n?t:new n(function(e){e(t)})}(t.value).then(a,s)}c((r=r.apply(t,e||[])).next())})};const aI={rootText:"root",style:{fill:"rgba(0, 0, 0, 0.85)",fontSize:12,y:1},active:{fill:"rgba(0, 0, 0, 0.5)"}};function sI(t={}){const{breadCrumb:e={},isFixedColor:n=!1}=t,r=(0,N.A)({},aI,e);return t=>{const{update:e,setState:o,container:i,view:a,options:s}=t,c=i.ownerDocument,l=_t(i).select(".plot").node();const u=s.marks.find(({id:t})=>t===QB),{state:f}=u,d=c.createElement("g");l.appendChild(d);const p=(t,i)=>iI(this,void 0,void 0,function*(){if(d.removeChildren(),t){const e=c.createElement("text",{style:Object.assign({x:0,text:r.rootText,depth:0},r.style)});d.appendChild(e);let n="";const o=null==t?void 0:t.split(" / ");let i=r.style.y,a=d.getBBox().width;const s=l.getBBox().width,u=o.map((t,e)=>{const o=c.createElement("text",{style:Object.assign(Object.assign({x:a,text:" / "},r.style),{y:i})});d.appendChild(o),a+=o.getBBox().width,n=`${n}${t} / `;const l=c.createElement("text",{name:n.replace(/\s\/\s$/,""),style:Object.assign(Object.assign({text:t,x:a,depth:e+1},r.style),{y:i})});return d.appendChild(l),a+=l.getBBox().width,a>s&&(i=d.getBBox().height,a=0,o.attr({x:a,y:i}),a+=o.getBBox().width,l.attr({x:a,y:i}),a+=l.getBBox().width),l});[e,...u].forEach((t,e)=>{if(e===u.length)return;const n=Object.assign({},t.attributes);t.attr("cursor","pointer"),t.addEventListener("mouseenter",()=>{t.attr(r.active)}),t.addEventListener("mouseleave",()=>{t.attr(n)}),t.addEventListener("click",()=>{p(t.name,k(t,["style","depth"]))})})}o("drillDown",e=>{const{marks:r}=e,o=r.map(e=>{if(e.id!==QB&&"rect"!==e.type)return e;const{data:r}=e,o=Object.fromEntries(["color"].map(t=>[t,{domain:a.scale[t].getOptions().domain}])),s=r.filter(e=>{const r=e.path;if(n||(e[nI]=r.split(" / ")[i]),!t)return!0;return new RegExp(`^${t}.+`).test(r)});return(0,N.A)({},e,n?{data:s,scale:o}:{data:s})});return Object.assign(Object.assign({},e),{marks:o})}),yield e()}),h=t=>{const e=t.target;if(k(e,["style",tI])!==QB||"rect"!==k(e,["markType"])||!k(e,["style",KB]))return;const n=k(e,["__data__","key"]),r=k(e,["style","depth"]);e.style.cursor="pointer",p(n,r)};l.addEventListener("click",h);const g=SA(Object.assign(Object.assign({},f.active),f.inactive)),m=()=>{const t=(t=>t.querySelectorAll(".element").filter(t=>k(t,["style",tI])===QB))(l);t.forEach(t=>{const e=k(t,["style",KB]);if("pointer"!==k(t,["style","cursor"])&&e){t.style.cursor="pointer";const e=CA(t.attributes,g);t.addEventListener("mouseenter",()=>{t.attr(f.active)}),t.addEventListener("mouseleave",()=>{t.attr((0,N.A)(e,f.inactive))})}})};return l.addEventListener("mousemove",m),()=>{d.remove(),l.removeEventListener("click",h),l.removeEventListener("mousemove",m)}}}var cI=n("./node_modules/.pnpm/antd@6.6.8_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/es/theme/index.js"),lI=n("./node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/isEqual.js"),uI=n.n(lI),fI=n("./node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/cloneDeep.js"),dI=n.n(fI),pI=n("./node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/merge.js"),hI=n.n(pI),gI=n("./src/utils/antd.tsx"),mI=n("./src/utils/browserDownload.ts"),yI=n("./src/utils/dashEvents.ts"),bI=n("./src/utils/dash3.ts"),vI=n("./src/utils/funcs.ts"),xI=n("./src/utils/useDeepCompareSignal.ts"),OI=n("./src/utils/visualizationTheme.ts"),wI=n("./src/utils/visualizationFonts.ts"),jI=n("./src/components/fragments/ImageExportButton.tsx");const kI=function(t,e){return class extends t{constructor(t){super(Object.assign(Object.assign({},t),{lib:e}))}}}(class extends vg{constructor(t){const{container:e,canvas:n,renderer:r,plugins:o,lib:i,createCanvas:a}=t;super(kg(t,["container","canvas","renderer","plugins","lib","createCanvas"]),"view"),this._hasBindAutoFit=!1,this._rendering=!1,this._trailingClear=null,this._trailing=!1,this._trailingResolve=null,this._trailingReject=null,this._previousDefinedType=null,this._onResize=w(()=>{this.forceFit()},300),this._renderer=r||new u.A4,this._plugins=o||[],this._container=function(t){if(void 0===t){const t=document.createElement("div");return t[Jh]=!0,t}if("string"==typeof t)return document.getElementById(t);return t}(e),this._emitter=new A.A,this._context={library:Object.assign(Object.assign({},i),wg),emitter:this._emitter,canvas:n,createCanvas:a},this._create()}render(){if(this._rendering)return this._addToTrailing();this._context.canvas||this._createCanvas(),this._bindAutoFit(),this._rendering=!0;const t=new Promise((t,e)=>fh(this._computedOptions(),this._context,this._createResolve(t),this._createReject(e))),[e,n,r]=function(){let t,e;return[new Promise((n,r)=>{e=n,t=r}),e,t]}();return t.then(n).then(()=>{if(this._trailingClear){const t=this.options();this._trailingClear(),this._trailing&&this.options(t)}}).catch(r).then(()=>{this._trailingClear=null,this._renderTrailing()}),e}options(t){if(0===arguments.length)return ng(this);const{type:e}=t;return e&&(this._previousDefinedType=e),function(t,e,n,r,o){const i=[[null,t,rg(t,e,n,r,o)]];for(;i.length;){const[t,e,n]=i.shift();if(e)if(n){ig(e,n);const{children:t}=n,{children:r}=e;if(Array.isArray(t)&&Array.isArray(r)){const n=Math.max(t.length,r.length);for(let o=0;o<n;o++)i.push([e,r[o],t[o]])}else"function"==typeof t&&i.push([e,null,t])}else e.remove();else ag(t,n,r,o)}}(this,t,this._previousDefinedType,this._marks,this._compositions),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(t=!0){if(this._rendering)return this._trailingClear=()=>{this.clear(t)},void this._reset();this.options();this.emit(zt),this._reset(),dh(0,this._context,!1,t),this.emit(Tt)}destroy(){this.options();this.emit(Bt),this._unbindAutoFit(),this._reset(),dh(0,this._context,!0),this._container[Jh]&&function(t){const e=t.parentNode;e&&e.removeChild(t)}(this._container),this.emit(It)}forceFit(){this.options.autoFit=!0;const{width:t,height:e}=eg(this.options(),this._container);if(t===this._width&&e===this._height)return Promise.resolve(this);this.emit(Nt);const n=this.render();return n.then(()=>{this.emit(Rt)}),n}changeSize(t,e){if(t===this._width&&e===this._height)return Promise.resolve(this);this.emit(Nt),this.attr("width",t),this.attr("height",e);const n=this.render();return n.then(()=>{this.emit(Rt)}),n}getDataByXY(t,e={}){const{shared:n=!1,series:r,facet:o=!1,startX:i=0,startY:a=0}=e,{canvas:s,views:c}=this._context,{document:l}=s,{x:u,y:f}=t,{coordinate:d,scale:p,markState:h,data:g,key:m}=c[0],y=l.getElementsByClassName(Xc),b=n?t=>t.__data__.x:t=>t,v=C(y,b),x=Ml(l.getElementsByClassName("view")[0]),O=t=>Array.from(t.values()).some(t=>{var e,n;return(null===(e=t.interaction)||void 0===e?void 0:e.seriesTooltip)||(null===(n=t.channels)||void 0===n?void 0:n.some(t=>"series"===t.name&&void 0!==t.values))}),w=$h(r,O(h)),j=t=>k(t,"__data__.data",null);try{if(w&&O(h)&&!o){const{selectedData:t}=qh({root:x,event:{offsetX:u,offsetY:f},elements:y,coordinate:d,scale:p,startX:i,startY:a}),e=g.get(`${m}-0`);return t.map(({index:t})=>e[t])}const t=Hh({root:x,event:{offsetX:u,offsetY:f},elements:y,coordinate:d,scale:p,shared:n});if(ut(t))return ft(t,g.get(m));const e=b(t),r=v.get(e);return r?r.map(j):[]}catch(t){const e=s.document.elementFromPointSync(u,f);return e?j(e):[]}}_create(){const{library:t}=this._context,e=["mark.mark",...Object.keys(t).filter(t=>t.startsWith("mark.")||"component.axisX"===t||"component.axisY"===t||"component.legends"===t)];this._marks={};for(const t of e){const e=t.split(".").pop();class n extends Og{constructor(){super({},e)}}this._marks[e]=n,this[e]=function(t){const r=this.append(n);return"mark"===e&&(r.type=t),r}}const n=["composition.view",...Object.keys(t).filter(t=>t.startsWith("composition.")&&"composition.mark"!==t)];this._compositions=Object.fromEntries(n.map(t=>{const e=t.split(".").pop();let n=class extends vg{constructor(){super({},e)}};return n=jg([pg(hg(this._marks))],n),[e,n]}));for(const t of Object.values(this._compositions))pg(hg(this._compositions))(t);for(const t of n){const e=t.split(".").pop();this[e]=function(){const t=this._compositions[e];return this.type=null,this.append(t)}}}_reset(){const t=["theme","type","width","height","autoFit"];this.type="view",this.value=Object.fromEntries(Object.entries(this.value).filter(([e])=>e.startsWith("margin")||e.startsWith("padding")||e.startsWith("inset")||t.includes(e))),this.children=[]}_renderTrailing(){this._trailing&&(this._trailing=!1,this.render().then(()=>{const t=this._trailingResolve.bind(this);this._trailingResolve=null,t(this)}).catch(t=>{const e=this._trailingReject.bind(this);this._trailingReject=null,e(t)}))}_createResolve(t){return()=>{this._rendering=!1,t(this)}}_createReject(t){return e=>{this._rendering=!1,t(e)}}_computedOptions(){const t=this.options(),{key:e=Ag}=t,{width:n,height:r,depth:o}=eg(t,this._container);return this._width=n,this._height=r,this._key=e,Object.assign(Object.assign({key:this._key},t),{width:n,height:r,depth:o})}_createCanvas(){var t,e;const{width:n,height:r}=eg(this.options(),this._container);this._plugins.push(new O),this._plugins.forEach(t=>this._renderer.registerPlugin(t)),this._context.canvas=new l.Hl({container:this._container,width:n,height:r,renderer:this._renderer});const o=null===(e=null===(t=this._context.canvas)||void 0===t?void 0:t.getContextService())||void 0===e?void 0:e.getDomElement();o&&(o.style.display="block")}_addToTrailing(){var t;null===(t=this._trailingResolve)||void 0===t||t.call(this,this),this._trailing=!0;return new Promise((t,e)=>{this._trailingResolve=t,this._trailingReject=e})}_bindAutoFit(){const t=this.options(),{autoFit:e}=t;this._hasBindAutoFit?e||this._unbindAutoFit():e&&(this._hasBindAutoFit=!0,window.addEventListener("resize",this._onResize))}_unbindAutoFit(){this._hasBindAutoFit&&(this._hasBindAutoFit=!1,window.removeEventListener("resize",this._onResize))}},{...Object.assign(Object.assign(Object.assign(Object.assign({},{"composition.geoView":yz,"composition.geoPath":vz}),{"data.arc":FT,"data.cluster":Bz,"mark.forceGraph":Sz,"mark.tree":$z,"mark.pack":uT,"mark.sankey":CT,"mark.chord":YT,"mark.treemap":UT,"mark.partition":mM}),{"data.venn":XB,"mark.boxplot":aB,"mark.gauge":gB,"mark.wordCloud":Ox,"mark.liquid":AB}),{"data.fetch":XS,"data.inline":GS,"data.sortBy":VS,"data.sort":KS,"data.filter":ZS,"data.pick":JS,"data.rename":QS,"data.fold":tE,"data.slice":eE,"data.custom":nE,"data.map":rE,"data.join":iE,"data.kde":cE,"data.log":lE,"data.wordCloud":TE,"data.ema":BE,"transform.stackY":O_,"transform.binX":J_,"transform.bin":Z_,"transform.dodgeX":tS,"transform.jitter":rS,"transform.jitterX":oS,"transform.jitterY":iS,"transform.symmetryY":sS,"transform.diffY":cS,"transform.stackEnter":lS,"transform.normalizeY":fS,"transform.select":mS,"transform.selectX":bS,"transform.selectY":xS,"transform.groupX":jS,"transform.groupY":kS,"transform.groupColor":AS,"transform.group":wS,"transform.sortX":_S,"transform.sortY":SS,"transform.sortColor":ES,"transform.flexX":PS,"transform.pack":CS,"transform.sample":TS,"transform.filter":BS,"coordinate.cartesian":Mg,"coordinate.polar":Ge,"coordinate.transpose":_g,"coordinate.theta":Sg,"coordinate.parallel":Eg,"coordinate.fisheye":Pg,"coordinate.radial":Ke,"coordinate.radar":Lg,"coordinate.helix":Cg,"encode.constant":zg,"encode.field":Tg,"encode.transform":Bg,"encode.column":Ig,"mark.interval":Mm,"mark.rect":Sm,"mark.line":yy,"mark.point":wb,"mark.text":Cb,"mark.cell":Bb,"mark.area":Zb,"mark.link":uv,"mark.image":hv,"mark.polygon":xv,"mark.box":Mv,"mark.vector":Sv,"mark.lineX":zv,"mark.lineY":Iv,"mark.connector":$v,"mark.range":Yv,"mark.rangeX":Vv,"mark.rangeY":Zv,"mark.path":rx,"mark.shape":sx,"mark.density":fx,"mark.heatmap":bx,"mark.wordCloud":Ox,"mark.beeswarm":Sx,"palette.category10":Ex,"palette.category20":Px,"scale.linear":Lx,"scale.ordinal":Cx,"scale.band":zx,"scale.identity":Bx,"scale.point":Nx,"scale.time":NO,"scale.log":qO,"scale.pow":GO,"scale.sqrt":KO,"scale.threshold":UO,"scale.quantile":ZO,"scale.quantize":JO,"scale.sequential":nw,"scale.constant":rw,"theme.classic":sw,"theme.classicDark":uw,"theme.academy":dw,"theme.light":aw,"theme.dark":lw,"component.axisX":pw,"component.axisY":hw,"component.legendCategory":tj,"component.legendContinuous":Bs,"component.legends":ej,"component.title":aj,"component.sliderX":Nj,"component.sliderY":Rj,"component.scrollbarX":Wj,"component.scrollbarY":Hj,"animation.scaleInX":qj,"animation.scaleOutX":Yj,"animation.scaleInY":Xj,"animation.scaleOutY":Gj,"animation.waveIn":Vj,"animation.fadeIn":Kj,"animation.fadeOut":Uj,"animation.zoomIn":Zj,"animation.zoomOut":Jj,"animation.pathIn":Qj,"animation.morphing":dk,"animation.growInX":pk,"animation.growInY":hk,"interaction.elementHighlight":mk,"interaction.elementHighlightByX":yk,"interaction.elementHighlightByColor":bk,"interaction.elementHoverScale":Ok,"interaction.elementSelect":kk,"interaction.elementSelectByX":Ak,"interaction.elementSelectByColor":Mk,"interaction.fisheye":_k,"interaction.chartIndex":Pk,"interaction.tooltip":Xh,"interaction.legendFilter":Gw,"interaction.legendHighlight":Lk,"interaction.brushHighlight":$k,"interaction.brushXHighlight":Hk,"interaction.brushYHighlight":Yk,"interaction.brushAxisHighlight":Qk,"interaction.brushFilter":nA,"interaction.brushXFilter":rA,"interaction.brushYFilter":oA,"interaction.sliderFilter":mA,"interaction.sliderWheel":xA,"interaction.scrollbarFilter":wA,"interaction.poptip":_A,"interaction.treemapDrillDown":sM,"interaction.drillDown":vM,"interaction.elementPointMove":PM,"composition.spaceLayer":CM,"composition.spaceFlex":TM,"composition.facetRect":KM,"composition.repeatMatrix":n_,"composition.facetCircle":l_,"composition.timingKeyframe":f_,"labelTransform.overlapHide":FE,"labelTransform.overlapDodgeY":HE,"labelTransform.overflowHide":qE,"labelTransform.contrastReverse":UE,"labelTransform.overflowStroke":JE,"labelTransform.exceedAdjust":QE}),"interaction.drillDown":sI,"mark.sunburst":oI}),AI="auto",MI={png:"image/png",jpeg:"image/jpeg",webp:"image/webp"},_I=["element:select","element:unselect","brush:end","brush:remove","brush:filter","brushAxis:highlight","brushAxis:remove"],SI=(t,e)=>{if(!t||"object"!=typeof t||Array.isArray(t))return t;const n=t,r=Object.keys(n).reduce((t,r)=>(t[r]=SI(n[r],e),t),{});return new Set(Object.keys(n).map(t=>t.match(/^(.*)Font(?:Size|Weight|Style|Variant)$/)?.[1]).filter(t=>void 0!==t)).forEach(t=>{r[`${t}FontFamily`]=e}),["fontSize","fontWeight","fontStyle","fontVariant","fontFamily"].some(t=>t in n)&&(r.fontFamily=e),"font-family"in n&&(r["font-family"]=e),r},EI=t=>({breadCrumb:{style:{fill:t.colorTextSecondary,fontFamily:t.fontFamily},active:{fill:t.colorPrimary}}}),PI=t=>Boolean(t)&&"object"==typeof t&&!Array.isArray(t),LI=t=>PI(t)?t.key??t.id??t.name??t.label:t,CI=t=>{const e={...t,...Array.isArray(t.children)?{children:t.children.map(t=>PI(t)?CI(t):t)}:{}};if("sankey"!==e.type||!PI(e.tooltip))return e;const n=e.tooltip;if(!Array.isArray(n.linkItems))return e;const r=n.linkItems.map(t=>{if(!PI(t)||"source"!==t.field&&"target"!==t.field)return t;const{field:e,...n}=t;return t=>({...n,value:LI(t[e])})});return{...e,tooltip:{...n,linkItems:r}}},zI=(t,e)=>{const n={...t,...Array.isArray(t.children)?{children:t.children.map(t=>PI(t)?zI(t,e):t)}:{}};if("sunburst"!==n.type)return n;const r=PI(n.style)?n.style:{},o=PI(n.state)?n.state:{},i=PI(o.active)?o.active:{},a=PI(o.inactive)?o.inactive:{},s=PI(n.interaction)?n.interaction:{},c=s.drillDown;if(!(!1!==n.interaction&&!1!==c))return{...n,style:{stroke:e.colorBgContainer,...r},state:{...o,active:{stroke:e.colorText,...i},inactive:{stroke:e.colorBgContainer,...a}}};const l=PI(c)?c:{},u=PI(l.breadCrumb)?l.breadCrumb:{},f=PI(u.style)?u.style:{},d=PI(u.active)?u.active:{};return{...n,style:{stroke:e.colorBgContainer,...r},state:{...o,active:{stroke:e.colorText,...i},inactive:{stroke:e.colorBgContainer,...a}},interaction:{...s,drillDown:{...l,breadCrumb:{...u,style:{...EI(e).breadCrumb.style,...f},active:{fill:e.colorPrimary,...d}}}}}},TI=(...t)=>t.find(t=>"number"==typeof t&&Number.isFinite(t)),BI=t=>{const e=t&&"object"==typeof t?t:{},n=e.data&&"object"==typeof e.data?e.data:void 0,r=e.client&&"object"==typeof e.client?e.client:void 0,o=TI(r?.x,e.offsetX,e.x),i=TI(r?.y,e.offsetY,e.y),a=(0,gI.xE)(n&&"data"in n?n.data:n),s=(0,gI.xE)(n?.selection),c=Array.isArray(a)?a:void 0;return{...void 0===a||Array.isArray(a)?{}:{datum:a},...void 0===c?{}:{data:c},...void 0===s?{}:{selection:s},...void 0===o||void 0===i?{}:{pointer:{x:o,y:i}}}},II=t=>{const{data:e,...n}=t;return n},NI=t=>!!Array.isArray(t.children)&&t.children.some(t=>null!=t&&"object"==typeof t&&(Object.prototype.hasOwnProperty.call(t,"data")||NI(t))),RI=(t,e)=>{if(null!=t&&"object"==typeof t){return"constant"===t.type?t.value:void 0}if("string"!=typeof t||!Array.isArray(e)||!e.some(e=>null!=e&&"object"==typeof e&&t in e))return t},FI=(t,e)=>{if(!0===t||!1===t)return t;const n=e.autoFit;return"boolean"==typeof n?n:!("number"==typeof e.width&&"number"==typeof e.height)},DI=t=>{const{token:e}=cI.A.useToken(),{id:r,className:o,style:i,tabIndex:a,role:u,dir:f,lang:d,hidden:p,options:h={},events:g,responsive:m="auto",eventData:y,selectionState:b,viewState:v,export:x,loading_state:O,setProps:w,...j}=t,k=(0,s.useMemo)(()=>(t=>{const e="dark"===(0,OI.n)(t);return hI()({},SI(e?uw():sw(),t.fontFamily),{type:e?"classicDark":"classic",view:{viewFill:t.colorBgContainer},axis:{gridStroke:t.colorBorderSecondary,labelFill:t.colorText,labelOpacity:1,lineStroke:t.colorBorder,tickStroke:t.colorBorder,titleFill:t.colorText,titleOpacity:1},legendCategory:{itemLabelFill:t.colorText,itemLabelFillOpacity:1,itemValueFill:t.colorText,itemValueFillOpacity:1,navButtonFill:t.colorTextSecondary,navPageNumFill:t.colorTextTertiary,titleFill:t.colorText,titleFillOpacity:1},legendContinuous:{connectorStroke:t.colorBorder,handleLabelFill:t.colorText,handleLabelFillOpacity:1,handleMarkerFill:t.colorBgElevated,handleMarkerStroke:t.colorBorder,labelFill:t.colorText,labelFillOpacity:1,titleFill:t.colorText,titleFillOpacity:1},label:{connectorStroke:t.colorBorder,fill:t.colorText,fillOpacity:1},innerLabel:{fill:t.colorTextLightSolid,fillOpacity:1},htmlLabel:{color:t.colorText,opacity:1},title:{subtitleFill:t.colorTextSecondary,titleFill:t.colorText},drillDown:EI(t)})})(e),[e]),A=(0,s.useRef)(null),M=(0,s.useRef)(null),_=(0,s.useRef)(h),S=(0,s.useRef)(k),E=(0,s.useRef)(t),P=(0,s.useRef)(w),L=(0,s.useRef)(m),C=(0,s.useRef)(x),z=(0,s.useRef)(h),T=(0,s.useRef)(null),B=(0,s.useRef)(0),I=(0,s.useRef)(0),N=(0,s.useRef)(Promise.resolve()),[R,F]=(0,s.useState)(!1),D=(0,s.useRef)({component:"Chart",id:r,props:t,chart:null}),$=(0,s.useRef)(new Map),{emit:W,emitLazy:H,getOptions:q}=(0,yI.i)("g2",g,w),Y=(0,xI.$)(h),X=(0,xI.$)(k),G=(0,xI.$)({responsive:m,imageExport:Boolean(x)});_.current=h,S.current=k,E.current=t,P.current=w,L.current=m,C.current=x,D.current.id=r,D.current.props=E.current;const V=(0,s.useMemo)(()=>Object.fromEntries(Object.entries(j).filter(([t,e])=>(t.startsWith("data-")||t.startsWith("aria-"))&&null!=e)),[j]),K=t=>{const n=(0,vI.qF)(dI()(_.current),D.current),r=FI(L.current,n);let o={...n,autoFit:r};return void 0===o.theme?o.theme=S.current:o.theme&&"object"==typeof o.theme&&!Array.isArray(o.theme)&&(o.theme=hI()({},S.current,o.theme)),!0===L.current&&(delete o.width,delete o.height),o=((t,e)=>{if(!e)return t;const n="number"==typeof t.marginRight?t.marginRight:"number"==typeof t.margin?t.margin:0;return{...t,marginRight:Math.max(n,30)}})(o,Boolean(C.current)),o=CI(o),o=zI(o,e),o=(t=>{const e=t.encode;if(null==e||"object"!=typeof e)return t;const n=e,r=RI(n.updateDuration,t.data),o=RI(n.updateEasing,t.data);if("number"!=typeof r&&"string"!=typeof o)return t;const i=t.animate,a=null!=i&&"object"==typeof i?i:{},s=a.update,c=null!=s&&"object"==typeof s?s:{},l=!1===i||!1===s?t:{...t,animate:{...a,update:{..."number"==typeof r?{duration:r}:{},..."string"==typeof o?{easing:o}:{},...c}}},u=l.axis;if(!1===u)return l;const f=null!=u&&"object"==typeof u?u:{},d=f.x;if(!1===d)return l;const p=null!=d&&"object"==typeof d?d:{};return void 0!==p.animate?l:{...l,axis:{...f,x:{...p,animate:{..."number"==typeof r?{duration:r}:{},..."string"==typeof o?{easing:o}:{}}}}}})(o),A.current&&(o.theme=(0,wI.l)(o.theme,A.current),PI(o.interaction)&&(o.interaction=(0,wI.l)(o.interaction,A.current))),D.current.chart=t,o},U=(t,e,o)=>{const i=++I.current;z.current=_.current;return N.current=N.current.then(async()=>{try{const r=await(async t=>{if(t.type!==AI)return t;const{Auto:e}=await Promise.all([n.e("async-viz-shared"),n.e("async-chart-ava")]).then(n.bind(n,"./node_modules/.pnpm/@antv+g2-extension-ava@0.2.0_@antv+g2@5.4.8_@antv+g2plot@2.4.35_@antv+g6@4.8.25/node_modules/@antv/g2-extension-ava/esm/index.js"));return{...t,type:e}})(e);if(o!==B.current||i!==I.current||t!==M.current)return;s=e,null!=(a=T.current)&&a.type!==AI&&s.type!==AI&&Object.prototype.hasOwnProperty.call(a,"data")&&Object.prototype.hasOwnProperty.call(s,"data")&&!NI(a)&&!NI(s)&&!uI()(a.data,s.data)&&uI()(II(a),II(s))?await t.changeData(r.data):(t.clear(!1),Object.keys(t.options()).forEach(e=>t.attr(e,void 0)),t.options({type:"view",...r}),await t.render()),o===B.current&&t===M.current&&(T.current=e)}catch(e){o===B.current&&t===M.current&&(T.current=null,i===I.current&&console.error(`G2${r?` "${r}"`:""} failed to render.`,e))}var a,s}),N.current};(0,s.useEffect)(()=>{const t=A.current;if(!t)return;const e=++B.current;N.current=Promise.resolve(),T.current=null;const n=FI(L.current,_.current),r=new kI({container:t,autoFit:n}),o=D.current;return M.current=r,o.chart=r,r.on("element:click",t=>{H("element:click","pointer",()=>BI(t))}),r.on("plot:click",t=>{const e=t&&"object"==typeof t?t:{};"plot"===e.target?.className&&H("plot:click","pointer",()=>BI(t))}),r.on("element:pointerover",t=>{H("element:pointerover","pointer",()=>BI(t))}),r.on("element:pointerout",t=>{H("element:pointerout","pointer",()=>BI(t))}),_I.forEach(t=>{r.on(t,e=>{const n=BI(e),r=t.endsWith(":remove"),o=t.startsWith("element:"),i=o?"element":t.startsWith("brushAxis:")?"axis":"brush";if(o&&void 0!==n.datum){const e=JSON.stringify(n.datum);"element:unselect"===t?$.current.delete(e):$.current.set(e,n.datum)}else r&&$.current.clear();const a=o?[...$.current.values()]:(t=>t.data??(void 0===t.datum?[]:[t.datum]))(n),s=Math.max(0,Math.floor(q(t)?.maxItems??500)),c=r?null:{mode:i,data:a.slice(0,s),count:a.length,truncated:a.length>s,...void 0===n.selection?{}:{selection:n.selection},timestamp:Date.now()};P.current?.({selectionState:c}),W(t,"selection",{...n,data:a.slice(0,s),count:a.length,truncated:a.length>s})})}),r.on(Rt,()=>{const e=t.getBoundingClientRect(),n={width:e.width,height:e.height,autoFit:Boolean(r.options().autoFit),timestamp:Date.now()};P.current?.({viewState:n}),W("afterchangesize","viewport",n)}),U(r,K(r),e),()=>{B.current+=1,r.off(),r.destroy(),M.current===r&&(M.current=null),o.chart===r&&(o.chart=null)}},[G,W,H,q,X]),(0,s.useEffect)(()=>{const t=M.current;if(!t||uI()(z.current,_.current))return;const e=K(t);$.current.clear(),P.current?.({selectionState:null}),U(t,e,B.current)},[Y]);const Z={width:"100%",height:i?.height??h.height??450,...i};return c().createElement("div",{...V,id:r,className:o,style:Z,tabIndex:a,role:u,dir:f,lang:d,hidden:p,"data-dash-is-loading":(0,bI.A_)(O)||void 0},c().createElement("div",{style:{position:"relative",isolation:"isolate",width:"100%",height:"100%"}},c().createElement("div",{ref:A,style:{width:"100%",height:"100%"}}),x?c().createElement(jI.A,{label:!0===x?void 0:x.label,loading:R,onClick:()=>{const t=M.current;if(!t||!x||R)return;const e=!0===x?{}:x,{format:n="png",filename:o="chart",quality:i=.92,pixelRatio:a=1}=e,s=Math.min(1,Math.max(0,i)),c=Math.max(.1,a);F(!0),(async()=>{const e=t.getContext().canvas;if(!e)throw new Error("G2 canvas is unavailable for image export.");const r=new l.Nz({canvas:e}),i=((t,e)=>{if(1===e)return t;const n=document.createElement("canvas");n.width=Math.max(1,Math.round(t.width*e)),n.height=Math.max(1,Math.round(t.height*e));const r=n.getContext("2d");return r?(r.drawImage(t,0,0,n.width,n.height),n):t})(await r.toCanvas(),c),a=i.toDataURL(MI[n],s);(0,mI.Kh)(a,`${o}.${n}`)})().catch(t=>{console.error(`G2${r?` "${r}"`:""} failed to export image.`,t)}).finally(()=>{F(!1)})}}):null))},$I=t=>c().createElement(DI,{...t})}}]);