@carbon/charts 1.11.21 → 1.13.0

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 (85) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/README.md +3 -3
  3. package/dist/{angle-utils-6b17e95b.mjs → angle-utils-7844066d.mjs} +69 -57
  4. package/dist/{angle-utils-6b17e95b.mjs.map → angle-utils-7844066d.mjs.map} +1 -1
  5. package/dist/{choropleth-17b85d55.mjs → choropleth-d4b2bac9.mjs} +2 -2
  6. package/dist/{choropleth-17b85d55.mjs.map → choropleth-d4b2bac9.mjs.map} +1 -1
  7. package/dist/components/index.mjs +2 -2
  8. package/dist/demo/index.mjs +227 -244
  9. package/dist/demo/index.mjs.map +1 -1
  10. package/dist/demo/styles.css +4499 -692
  11. package/dist/demo/styles.css.map +1 -1
  12. package/dist/demo/utils/package-versions.d.ts +0 -2
  13. package/dist/{index-b0e98af9.mjs → index-0bab3ec3.mjs} +2 -2
  14. package/dist/{index-b0e98af9.mjs.map → index-0bab3ec3.mjs.map} +1 -1
  15. package/dist/index.mjs +5 -5
  16. package/dist/interfaces/charts.d.ts +6 -0
  17. package/dist/model/index.mjs +21 -13
  18. package/dist/model/index.mjs.map +1 -1
  19. package/dist/services/index.mjs +2 -2
  20. package/dist/styles.css +4249 -781
  21. package/dist/styles.css.map +1 -1
  22. package/dist/styles.min.css +1 -1
  23. package/dist/styles.min.css.map +1 -1
  24. package/dist/umd/bundle.umd.js +3 -3
  25. package/dist/umd/bundle.umd.js.map +1 -1
  26. package/package.json +21 -21
  27. package/scss/_chart-holder.scss +18 -17
  28. package/scss/_chart-wrapper.scss +6 -0
  29. package/scss/_color-palette.scss +2 -2
  30. package/scss/_colors.scss +26 -25
  31. package/scss/_globals.scss +8 -0
  32. package/scss/_tokens.scss +50 -50
  33. package/scss/_transition.scss +4 -0
  34. package/scss/_type.scss +14 -14
  35. package/scss/components/_axis.scss +12 -11
  36. package/scss/components/_callouts.scss +4 -3
  37. package/scss/components/_color-legend.scss +4 -4
  38. package/scss/components/_grid-brush.scss +7 -5
  39. package/scss/components/_grid.scss +9 -8
  40. package/scss/components/_highlights.scss +6 -3
  41. package/scss/components/_layout.scss +5 -3
  42. package/scss/components/_legend.scss +14 -11
  43. package/scss/components/_meter-title.scss +11 -9
  44. package/scss/components/_modal.scss +14 -11
  45. package/scss/components/_ruler.scss +6 -3
  46. package/scss/components/_skeleton-lines.scss +9 -6
  47. package/scss/components/_skeleton.scss +9 -6
  48. package/scss/components/_threshold.scss +12 -11
  49. package/scss/components/_title.scss +5 -5
  50. package/scss/components/_toolbar.scss +6 -6
  51. package/scss/components/_tooltip.scss +12 -11
  52. package/scss/components/_zero-line.scss +4 -3
  53. package/scss/components/_zoom-bar.scss +16 -14
  54. package/scss/components/diagrams/_card-node.scss +74 -74
  55. package/scss/components/diagrams/_edge.scss +46 -49
  56. package/scss/components/diagrams/_marker.scss +4 -5
  57. package/scss/components/diagrams/_shape-node.scss +72 -73
  58. package/scss/components/diagrams/index.scss +4 -4
  59. package/scss/components/index.scss +20 -20
  60. package/scss/demos.scss +1 -0
  61. package/scss/graphs/_alluvial.scss +7 -6
  62. package/scss/graphs/_area.scss +4 -2
  63. package/scss/graphs/_bubble.scss +6 -5
  64. package/scss/graphs/_bullet.scss +11 -13
  65. package/scss/graphs/_choropleth.scss +7 -7
  66. package/scss/graphs/_circle-pack.scss +7 -6
  67. package/scss/graphs/_donut.scss +3 -1
  68. package/scss/graphs/_gauge.scss +7 -6
  69. package/scss/graphs/_heatmap.scss +6 -6
  70. package/scss/graphs/_line.scss +6 -4
  71. package/scss/graphs/_lollipop.scss +3 -1
  72. package/scss/graphs/_meter.scss +11 -10
  73. package/scss/graphs/_pie.scss +3 -1
  74. package/scss/graphs/_radar.scss +6 -5
  75. package/scss/graphs/_scatter-stacked.scss +4 -3
  76. package/scss/graphs/_scatter.scss +6 -5
  77. package/scss/graphs/_tree.scss +11 -9
  78. package/scss/graphs/_treemap.scss +3 -1
  79. package/scss/graphs/_wordcloud.scss +3 -1
  80. package/scss/graphs/index.scss +19 -19
  81. package/scss/index.scss +10 -31
  82. package/styles.css +4249 -781
  83. package/styles.min.css +1 -1
  84. package/scss/components/_edge.scss +0 -65
  85. package/scss/components/_marker.scss +0 -7
@@ -1,6 +1,6 @@
1
- (function(z,xe){typeof exports=="object"&&typeof module<"u"?xe(exports):typeof define=="function"&&define.amd?define(["exports"],xe):(z=typeof globalThis<"u"?globalThis:z||self,xe(z.Charts={}))})(this,function(z){"use strict";function xe(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Wm(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Ga(e){let t,n,r;e.length!==2?(t=xe,n=(o,l)=>xe(e(o),l),r=(o,l)=>e(o)-l):(t=e===xe||e===Wm?e:Ym,n=e,r=e);function i(o,l,c=0,u=o.length){if(c<u){if(t(l,l)!==0)return u;do{const d=c+u>>>1;n(o[d],l)<0?c=d+1:u=d}while(c<u)}return c}function s(o,l,c=0,u=o.length){if(c<u){if(t(l,l)!==0)return u;do{const d=c+u>>>1;n(o[d],l)<=0?c=d+1:u=d}while(c<u)}return c}function a(o,l,c=0,u=o.length){const d=i(o,l,c,u-1);return d>c&&r(o[d-1],l)>-r(o[d],l)?d-1:d}return{left:i,center:a,right:s}}function Ym(){return 0}function qm(e){return e===null?NaN:+e}function*Xm(e,t){if(t===void 0)for(let n of e)n!=null&&(n=+n)>=n&&(yield n);else{let n=-1;for(let r of e)(r=t(r,++n,e))!=null&&(r=+r)>=r&&(yield r)}}const jm=Ga(xe).right;Ga(qm).center;const Ha=jm;function Zm(e,t){let n=0;if(t===void 0)for(let r of e)r!=null&&(r=+r)>=r&&++n;else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(i=+i)>=i&&++n}return n}function be(e,t){let n,r;if(t===void 0)for(const i of e)i!=null&&(n===void 0?i>=i&&(n=r=i):(n>i&&(n=i),r<i&&(r=i)));else{let i=-1;for(let s of e)(s=t(s,++i,e))!=null&&(n===void 0?s>=s&&(n=r=s):(n>s&&(n=s),r<s&&(r=s)))}return[n,r]}class bn{constructor(){this._partials=new Float64Array(32),this._n=0}add(t){const n=this._partials;let r=0;for(let i=0;i<this._n&&i<32;i++){const s=n[i],a=t+s,o=Math.abs(t)<Math.abs(s)?t-(a-s):s-(a-t);o&&(n[r++]=o),t=a}return n[r]=t,this._n=r+1,this}valueOf(){const t=this._partials;let n=this._n,r,i,s,a=0;if(n>0){for(a=t[--n];n>0&&(r=a,i=t[--n],a=r+i,s=i-(a-r),!s););n>0&&(s<0&&t[n-1]<0||s>0&&t[n-1]>0)&&(i=s*2,r=a+i,i==r-a&&(a=r))}return a}}class tu extends Map{constructor(t,n=Jm){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,i]of t)this.set(r,i)}get(t){return super.get(eu(this,t))}has(t){return super.has(eu(this,t))}set(t,n){return super.set(Km(this,t),n)}delete(t){return super.delete(Qm(this,t))}}function eu({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function Km({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function Qm({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function Jm(e){return e!==null&&typeof e=="object"?e.valueOf():e}function tv(e){return e}function ev(e=xe){if(e===xe)return nu;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function nu(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}var nv=Array.prototype,rv=nv.slice;function Fa(e){return()=>e}const iv=Math.sqrt(50),sv=Math.sqrt(10),av=Math.sqrt(2);function Fi(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),s=r/Math.pow(10,i),a=s>=iv?10:s>=sv?5:s>=av?2:1;let o,l,c;return i<0?(c=Math.pow(10,-i)/a,o=Math.round(e*c),l=Math.round(t*c),o/c<e&&++o,l/c>t&&--l,c=-c):(c=Math.pow(10,i)*a,o=Math.round(e/c),l=Math.round(t/c),o*c<e&&++o,l*c>t&&--l),l<o&&.5<=n&&n<2?Fi(e,t,n*2):[o,l,c]}function zi(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const r=t<e,[i,s,a]=r?Fi(t,e,n):Fi(e,t,n);if(!(s>=i))return[];const o=s-i+1,l=new Array(o);if(r)if(a<0)for(let c=0;c<o;++c)l[c]=(s-c)/-a;else for(let c=0;c<o;++c)l[c]=(s-c)*a;else if(a<0)for(let c=0;c<o;++c)l[c]=(i+c)/-a;else for(let c=0;c<o;++c)l[c]=(i+c)*a;return l}function qn(e,t,n){return t=+t,e=+e,n=+n,Fi(e,t,n)[2]}function za(e,t,n){t=+t,e=+e,n=+n;const r=t<e,i=r?qn(t,e,n):qn(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function ov(e,t,n){let r;for(;;){const i=qn(e,t,n);if(i===r||i===0||!isFinite(i))return[e,t];i>0?(e=Math.floor(e/i)*i,t=Math.ceil(t/i)*i):i<0&&(e=Math.ceil(e*i)/i,t=Math.floor(t*i)/i),r=i}}function lv(e){return Math.max(1,Math.ceil(Math.log(Zm(e))/Math.LN2)+1)}function cv(){var e=tv,t=be,n=lv;function r(i){Array.isArray(i)||(i=Array.from(i));var s,a=i.length,o,l,c=new Array(a);for(s=0;s<a;++s)c[s]=e(i[s],s,i);var u=t(c),d=u[0],h=u[1],f=n(c,d,h);if(!Array.isArray(f)){const b=h,S=+f;if(t===be&&([d,h]=ov(d,h,S)),f=zi(d,h,S),f[0]<=d&&(l=qn(d,h,S)),f[f.length-1]>=h)if(b>=h&&t===be){const _=qn(d,h,S);isFinite(_)&&(_>0?h=(Math.floor(h/_)+1)*_:_<0&&(h=(Math.ceil(h*-_)+1)/-_))}else f.pop()}for(var p=f.length,g=0,v=p;f[g]<=d;)++g;for(;f[v-1]>h;)--v;(g||v<p)&&(f=f.slice(g,v),p=v-g);var m=new Array(p+1),y;for(s=0;s<=p;++s)y=m[s]=[],y.x0=s>0?f[s-1]:d,y.x1=s<p?f[s]:h;if(isFinite(l)){if(l>0)for(s=0;s<a;++s)(o=c[s])!=null&&d<=o&&o<=h&&m[Math.min(p,Math.floor((o-d)/l))].push(i[s]);else if(l<0){for(s=0;s<a;++s)if((o=c[s])!=null&&d<=o&&o<=h){const b=Math.floor((d-o)*l);m[Math.min(p,b+(f[b]<=o))].push(i[s])}}}else for(s=0;s<a;++s)(o=c[s])!=null&&d<=o&&o<=h&&m[Ha(f,o,0,p)].push(i[s]);return m}return r.value=function(i){return arguments.length?(e=typeof i=="function"?i:Fa(i),r):e},r.domain=function(i){return arguments.length?(t=typeof i=="function"?i:Fa([i[0],i[1]]),r):t},r.thresholds=function(i){return arguments.length?(n=typeof i=="function"?i:Fa(Array.isArray(i)?rv.call(i):i),r):n},r}function En(e,t){let n;if(t===void 0)for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n<i||n===void 0&&i>=i)&&(n=i)}return n}function cn(e,t){let n;if(t===void 0)for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function ru(e,t,n=0,r=1/0,i){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(i=i===void 0?nu:ev(i);r>n;){if(r-n>600){const l=r-n+1,c=t-n+1,u=Math.log(l),d=.5*Math.exp(2*u/3),h=.5*Math.sqrt(u*d*(l-d)/l)*(c-l/2<0?-1:1),f=Math.max(n,Math.floor(t-c*d/l+h)),p=Math.min(r,Math.floor(t+(l-c)*d/l+h));ru(e,t,f,p,i)}const s=e[t];let a=n,o=r;for(kr(e,n,t),i(e[r],s)>0&&kr(e,n,r);a<o;){for(kr(e,a,o),++a,--o;i(e[a],s)<0;)++a;for(;i(e[o],s)>0;)--o}i(e[n],s)===0?kr(e,n,o):(++o,kr(e,o,r)),o<=t&&(n=o+1),t<=o&&(r=o-1)}return e}function kr(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function Wa(e,t,n){if(e=Float64Array.from(Xm(e,n)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return cn(e);if(t>=1)return En(e);var r,i=(r-1)*t,s=Math.floor(i),a=En(ru(e,s).subarray(0,s+1)),o=cn(e.subarray(s+1));return a+(o-a)*(i-s)}}function*uv(e){for(const t of e)yield*t}function iu(e){return Array.from(uv(e))}function hv(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,s=new Array(i);++r<i;)s[r]=e+r*n;return s}function dv(e){return e}var Wi=1,Yi=2,Ya=3,$r=4,su=1e-6;function fv(e){return"translate("+e+",0)"}function pv(e){return"translate(0,"+e+")"}function gv(e){return t=>+e(t)}function mv(e,t){return t=Math.max(0,e.bandwidth()-t*2)/2,e.round()&&(t=Math.round(t)),n=>+e(n)+t}function vv(){return!this.__axis}function qi(e,t){var n=[],r=null,i=null,s=6,a=6,o=3,l=typeof window<"u"&&window.devicePixelRatio>1?0:.5,c=e===Wi||e===$r?-1:1,u=e===$r||e===Yi?"x":"y",d=e===Wi||e===Ya?fv:pv;function h(f){var p=r??(t.ticks?t.ticks.apply(t,n):t.domain()),g=i??(t.tickFormat?t.tickFormat.apply(t,n):dv),v=Math.max(s,0)+o,m=t.range(),y=+m[0]+l,b=+m[m.length-1]+l,S=(t.bandwidth?mv:gv)(t.copy(),l),_=f.selection?f.selection():f,E=_.selectAll(".domain").data([null]),M=_.selectAll(".tick").data(p,t).order(),C=M.exit(),G=M.enter().append("g").attr("class","tick"),I=M.select("line"),T=M.select("text");E=E.merge(E.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),M=M.merge(G),I=I.merge(G.append("line").attr("stroke","currentColor").attr(u+"2",c*s)),T=T.merge(G.append("text").attr("fill","currentColor").attr(u,c*v).attr("dy",e===Wi?"0em":e===Ya?"0.71em":"0.32em")),f!==_&&(E=E.transition(f),M=M.transition(f),I=I.transition(f),T=T.transition(f),C=C.transition(f).attr("opacity",su).attr("transform",function(L){return isFinite(L=S(L))?d(L+l):this.getAttribute("transform")}),G.attr("opacity",su).attr("transform",function(L){var R=this.parentNode.__axis;return d((R&&isFinite(R=R(L))?R:S(L))+l)})),C.remove(),E.attr("d",e===$r||e===Yi?a?"M"+c*a+","+y+"H"+l+"V"+b+"H"+c*a:"M"+l+","+y+"V"+b:a?"M"+y+","+c*a+"V"+l+"H"+b+"V"+c*a:"M"+y+","+l+"H"+b),M.attr("opacity",1).attr("transform",function(L){return d(S(L)+l)}),I.attr(u+"2",c*s),T.attr(u,c*v).text(g),_.filter(vv).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",e===Yi?"start":e===$r?"end":"middle"),_.each(function(){this.__axis=S})}return h.scale=function(f){return arguments.length?(t=f,h):t},h.ticks=function(){return n=Array.from(arguments),h},h.tickArguments=function(f){return arguments.length?(n=f==null?[]:Array.from(f),h):n.slice()},h.tickValues=function(f){return arguments.length?(r=f==null?null:Array.from(f),h):r&&r.slice()},h.tickFormat=function(f){return arguments.length?(i=f,h):i},h.tickSize=function(f){return arguments.length?(s=a=+f,h):s},h.tickSizeInner=function(f){return arguments.length?(s=+f,h):s},h.tickSizeOuter=function(f){return arguments.length?(a=+f,h):a},h.tickPadding=function(f){return arguments.length?(o=+f,h):o},h.offset=function(f){return arguments.length?(l=+f,h):l},h}function yv(e){return qi(Wi,e)}function xv(e){return qi(Yi,e)}function qa(e){return qi(Ya,e)}function au(e){return qi($r,e)}var bv={value:()=>{}};function Xa(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new Xi(n)}function Xi(e){this._=e}function Ev(e,t){return e.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}Xi.prototype=Xa.prototype={constructor:Xi,on:function(e,t){var n=this._,r=Ev(e+"",n),i,s=-1,a=r.length;if(arguments.length<2){for(;++s<a;)if((i=(e=r[s]).type)&&(i=Sv(n[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++s<a;)if(i=(e=r[s]).type)n[i]=ou(n[i],e.name,t);else if(t==null)for(i in n)n[i]=ou(n[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new Xi(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,s;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(s=this._[e],r=0,i=s.length;r<i;++r)s[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],i=0,s=r.length;i<s;++i)r[i].value.apply(t,n)}};function Sv(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function ou(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=bv,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var ja="http://www.w3.org/1999/xhtml";const lu={svg:"http://www.w3.org/2000/svg",xhtml:ja,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function ji(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),lu.hasOwnProperty(t)?{space:lu[t],local:e}:e}function _v(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===ja&&t.documentElement.namespaceURI===ja?t.createElement(e):t.createElementNS(n,e)}}function wv(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function cu(e){var t=ji(e);return(t.local?wv:_v)(t)}function Ov(){}function Za(e){return e==null?Ov:function(){return this.querySelector(e)}}function Tv(e){typeof e!="function"&&(e=Za(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var s=t[i],a=s.length,o=r[i]=new Array(a),l,c,u=0;u<a;++u)(l=s[u])&&(c=e.call(l,l.__data__,u,s))&&("__data__"in l&&(c.__data__=l.__data__),o[u]=c);return new se(r,this._parents)}function Mv(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function Cv(){return[]}function uu(e){return e==null?Cv:function(){return this.querySelectorAll(e)}}function Av(e){return function(){return Mv(e.apply(this,arguments))}}function Dv(e){typeof e=="function"?e=Av(e):e=uu(e);for(var t=this._groups,n=t.length,r=[],i=[],s=0;s<n;++s)for(var a=t[s],o=a.length,l,c=0;c<o;++c)(l=a[c])&&(r.push(e.call(l,l.__data__,c,a)),i.push(l));return new se(r,i)}function hu(e){return function(){return this.matches(e)}}function du(e){return function(t){return t.matches(e)}}var Lv=Array.prototype.find;function Rv(e){return function(){return Lv.call(this.children,e)}}function Iv(){return this.firstElementChild}function kv(e){return this.select(e==null?Iv:Rv(typeof e=="function"?e:du(e)))}var $v=Array.prototype.filter;function Pv(){return Array.from(this.children)}function Nv(e){return function(){return $v.call(this.children,e)}}function Uv(e){return this.selectAll(e==null?Pv:Nv(typeof e=="function"?e:du(e)))}function Bv(e){typeof e!="function"&&(e=hu(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var s=t[i],a=s.length,o=r[i]=[],l,c=0;c<a;++c)(l=s[c])&&e.call(l,l.__data__,c,s)&&o.push(l);return new se(r,this._parents)}function fu(e){return new Array(e.length)}function Vv(){return new se(this._enter||this._groups.map(fu),this._parents)}function Zi(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Zi.prototype={constructor:Zi,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function Gv(e){return function(){return e}}function Hv(e,t,n,r,i,s){for(var a=0,o,l=t.length,c=s.length;a<c;++a)(o=t[a])?(o.__data__=s[a],r[a]=o):n[a]=new Zi(e,s[a]);for(;a<l;++a)(o=t[a])&&(i[a]=o)}function Fv(e,t,n,r,i,s,a){var o,l,c=new Map,u=t.length,d=s.length,h=new Array(u),f;for(o=0;o<u;++o)(l=t[o])&&(h[o]=f=a.call(l,l.__data__,o,t)+"",c.has(f)?i[o]=l:c.set(f,l));for(o=0;o<d;++o)f=a.call(e,s[o],o,s)+"",(l=c.get(f))?(r[o]=l,l.__data__=s[o],c.delete(f)):n[o]=new Zi(e,s[o]);for(o=0;o<u;++o)(l=t[o])&&c.get(h[o])===l&&(i[o]=l)}function zv(e){return e.__data__}function Wv(e,t){if(!arguments.length)return Array.from(this,zv);var n=t?Fv:Hv,r=this._parents,i=this._groups;typeof e!="function"&&(e=Gv(e));for(var s=i.length,a=new Array(s),o=new Array(s),l=new Array(s),c=0;c<s;++c){var u=r[c],d=i[c],h=d.length,f=Yv(e.call(u,u&&u.__data__,c,r)),p=f.length,g=o[c]=new Array(p),v=a[c]=new Array(p),m=l[c]=new Array(h);n(u,d,g,v,m,f,t);for(var y=0,b=0,S,_;y<p;++y)if(S=g[y]){for(y>=b&&(b=y+1);!(_=v[b])&&++b<p;);S._next=_||null}}return a=new se(a,r),a._enter=o,a._exit=l,a}function Yv(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function qv(){return new se(this._exit||this._groups.map(fu),this._parents)}function Xv(e,t,n){var r=this.enter(),i=this,s=this.exit();return typeof e=="function"?(r=e(r),r&&(r=r.selection())):r=r.append(e+""),t!=null&&(i=t(i),i&&(i=i.selection())),n==null?s.remove():n(s),r&&i?r.merge(i).order():i}function jv(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,i=n.length,s=r.length,a=Math.min(i,s),o=new Array(i),l=0;l<a;++l)for(var c=n[l],u=r[l],d=c.length,h=o[l]=new Array(d),f,p=0;p<d;++p)(f=c[p]||u[p])&&(h[p]=f);for(;l<i;++l)o[l]=n[l];return new se(o,this._parents)}function Zv(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],i=r.length-1,s=r[i],a;--i>=0;)(a=r[i])&&(s&&a.compareDocumentPosition(s)^4&&s.parentNode.insertBefore(a,s),s=a);return this}function Kv(e){e||(e=Qv);function t(d,h){return d&&h?e(d.__data__,h.__data__):!d-!h}for(var n=this._groups,r=n.length,i=new Array(r),s=0;s<r;++s){for(var a=n[s],o=a.length,l=i[s]=new Array(o),c,u=0;u<o;++u)(c=a[u])&&(l[u]=c);l.sort(t)}return new se(i,this._parents).order()}function Qv(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Jv(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function t0(){return Array.from(this)}function e0(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,s=r.length;i<s;++i){var a=r[i];if(a)return a}return null}function n0(){let e=0;for(const t of this)++e;return e}function r0(){return!this.node()}function i0(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var i=t[n],s=0,a=i.length,o;s<a;++s)(o=i[s])&&e.call(o,o.__data__,s,i);return this}function s0(e){return function(){this.removeAttribute(e)}}function a0(e){return function(){this.removeAttributeNS(e.space,e.local)}}function o0(e,t){return function(){this.setAttribute(e,t)}}function l0(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function c0(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function u0(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function h0(e,t){var n=ji(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?a0:s0:typeof t=="function"?n.local?u0:c0:n.local?l0:o0)(n,t))}function pu(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function d0(e){return function(){this.style.removeProperty(e)}}function f0(e,t,n){return function(){this.style.setProperty(e,t,n)}}function p0(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function g0(e,t,n){return arguments.length>1?this.each((t==null?d0:typeof t=="function"?p0:f0)(e,t,n??"")):Xn(this.node(),e)}function Xn(e,t){return e.style.getPropertyValue(t)||pu(e).getComputedStyle(e,null).getPropertyValue(t)}function m0(e){return function(){delete this[e]}}function v0(e,t){return function(){this[e]=t}}function y0(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function x0(e,t){return arguments.length>1?this.each((t==null?m0:typeof t=="function"?y0:v0)(e,t)):this.node()[e]}function gu(e){return e.trim().split(/^|\s+/)}function Ka(e){return e.classList||new mu(e)}function mu(e){this._node=e,this._names=gu(e.getAttribute("class")||"")}mu.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function vu(e,t){for(var n=Ka(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function yu(e,t){for(var n=Ka(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function b0(e){return function(){vu(this,e)}}function E0(e){return function(){yu(this,e)}}function S0(e,t){return function(){(t.apply(this,arguments)?vu:yu)(this,e)}}function _0(e,t){var n=gu(e+"");if(arguments.length<2){for(var r=Ka(this.node()),i=-1,s=n.length;++i<s;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof t=="function"?S0:t?b0:E0)(n,t))}function w0(){this.textContent=""}function O0(e){return function(){this.textContent=e}}function T0(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function M0(e){return arguments.length?this.each(e==null?w0:(typeof e=="function"?T0:O0)(e)):this.node().textContent}function C0(){this.innerHTML=""}function A0(e){return function(){this.innerHTML=e}}function D0(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function L0(e){return arguments.length?this.each(e==null?C0:(typeof e=="function"?D0:A0)(e)):this.node().innerHTML}function R0(){this.nextSibling&&this.parentNode.appendChild(this)}function I0(){return this.each(R0)}function k0(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function $0(){return this.each(k0)}function P0(e){var t=typeof e=="function"?e:cu(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function N0(){return null}function U0(e,t){var n=typeof e=="function"?e:cu(e),r=t==null?N0:typeof t=="function"?t:Za(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function B0(){var e=this.parentNode;e&&e.removeChild(this)}function V0(){return this.each(B0)}function G0(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function H0(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function F0(e){return this.select(e?H0:G0)}function z0(e){return arguments.length?this.property("__data__",e):this.node().__data__}function W0(e){return function(t){e.call(this,t,this.__data__)}}function Y0(e){return e.trim().split(/^|\s+/).map(function(t){var n="",r=t.indexOf(".");return r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function q0(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,s;n<i;++n)s=t[n],(!e.type||s.type===e.type)&&s.name===e.name?this.removeEventListener(s.type,s.listener,s.options):t[++r]=s;++r?t.length=r:delete this.__on}}}function X0(e,t,n){return function(){var r=this.__on,i,s=W0(t);if(r){for(var a=0,o=r.length;a<o;++a)if((i=r[a]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=s,i.options=n),i.value=t;return}}this.addEventListener(e.type,s,n),i={type:e.type,name:e.name,value:t,listener:s,options:n},r?r.push(i):this.__on=[i]}}function j0(e,t,n){var r=Y0(e+""),i,s=r.length,a;if(arguments.length<2){var o=this.node().__on;if(o){for(var l=0,c=o.length,u;l<c;++l)for(i=0,u=o[l];i<s;++i)if((a=r[i]).type===u.type&&a.name===u.name)return u.value}return}for(o=t?X0:q0,i=0;i<s;++i)this.each(o(r[i],t,n));return this}function xu(e,t,n){var r=pu(e),i=r.CustomEvent;typeof i=="function"?i=new i(t,n):(i=r.document.createEvent("Event"),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function Z0(e,t){return function(){return xu(this,e,t)}}function K0(e,t){return function(){return xu(this,e,t.apply(this,arguments))}}function Q0(e,t){return this.each((typeof t=="function"?K0:Z0)(e,t))}function*J0(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,s=r.length,a;i<s;++i)(a=r[i])&&(yield a)}var bu=[null];function se(e,t){this._groups=e,this._parents=t}function Pr(){return new se([[document.documentElement]],bu)}function ty(){return this}se.prototype=Pr.prototype={constructor:se,select:Tv,selectAll:Dv,selectChild:kv,selectChildren:Uv,filter:Bv,data:Wv,enter:Vv,exit:qv,join:Xv,merge:jv,selection:ty,order:Zv,sort:Kv,call:Jv,nodes:t0,node:e0,size:n0,empty:r0,each:i0,attr:h0,style:g0,property:x0,classed:_0,text:M0,html:L0,raise:I0,lower:$0,append:P0,insert:U0,remove:V0,clone:F0,datum:z0,on:j0,dispatch:Q0,[Symbol.iterator]:J0};function D(e){return typeof e=="string"?new se([[document.querySelector(e)]],[document.documentElement]):new se([[e]],bu)}function ey(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Sn(e,t){if(e=ey(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}if(t.getBoundingClientRect){var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}}return[e.pageX,e.pageY]}const Qa={capture:!0,passive:!1};function Ja(e){e.preventDefault(),e.stopImmediatePropagation()}function ny(e){var t=e.document.documentElement,n=D(e).on("dragstart.drag",Ja,Qa);"onselectstart"in t?n.on("selectstart.drag",Ja,Qa):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function ry(e,t){var n=e.document.documentElement,r=D(e).on("dragstart.drag",null);t&&(r.on("click.drag",Ja,Qa),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}function to(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Eu(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Nr(){}var Ur=.7,Ki=1/Ur,jn="\\s*([+-]?\\d+)\\s*",Br="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Re="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",iy=/^#([0-9a-f]{3,8})$/,sy=new RegExp(`^rgb\\(${jn},${jn},${jn}\\)$`),ay=new RegExp(`^rgb\\(${Re},${Re},${Re}\\)$`),oy=new RegExp(`^rgba\\(${jn},${jn},${jn},${Br}\\)$`),ly=new RegExp(`^rgba\\(${Re},${Re},${Re},${Br}\\)$`),cy=new RegExp(`^hsl\\(${Br},${Re},${Re}\\)$`),uy=new RegExp(`^hsla\\(${Br},${Re},${Re},${Br}\\)$`),Su={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};to(Nr,Fe,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:_u,formatHex:_u,formatHex8:hy,formatHsl:dy,formatRgb:wu,toString:wu});function _u(){return this.rgb().formatHex()}function hy(){return this.rgb().formatHex8()}function dy(){return Au(this).formatHsl()}function wu(){return this.rgb().formatRgb()}function Fe(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=iy.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?Ou(t):n===3?new Jt(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Qi(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Qi(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=sy.exec(e))?new Jt(t[1],t[2],t[3],1):(t=ay.exec(e))?new Jt(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=oy.exec(e))?Qi(t[1],t[2],t[3],t[4]):(t=ly.exec(e))?Qi(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=cy.exec(e))?Cu(t[1],t[2]/100,t[3]/100,1):(t=uy.exec(e))?Cu(t[1],t[2]/100,t[3]/100,t[4]):Su.hasOwnProperty(e)?Ou(Su[e]):e==="transparent"?new Jt(NaN,NaN,NaN,0):null}function Ou(e){return new Jt(e>>16&255,e>>8&255,e&255,1)}function Qi(e,t,n,r){return r<=0&&(e=t=n=NaN),new Jt(e,t,n,r)}function fy(e){return e instanceof Nr||(e=Fe(e)),e?(e=e.rgb(),new Jt(e.r,e.g,e.b,e.opacity)):new Jt}function eo(e,t,n,r){return arguments.length===1?fy(e):new Jt(e,t,n,r??1)}function Jt(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}to(Jt,eo,Eu(Nr,{brighter(e){return e=e==null?Ki:Math.pow(Ki,e),new Jt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Ur:Math.pow(Ur,e),new Jt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Jt(_n(this.r),_n(this.g),_n(this.b),Ji(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Tu,formatHex:Tu,formatHex8:py,formatRgb:Mu,toString:Mu}));function Tu(){return`#${wn(this.r)}${wn(this.g)}${wn(this.b)}`}function py(){return`#${wn(this.r)}${wn(this.g)}${wn(this.b)}${wn((isNaN(this.opacity)?1:this.opacity)*255)}`}function Mu(){const e=Ji(this.opacity);return`${e===1?"rgb(":"rgba("}${_n(this.r)}, ${_n(this.g)}, ${_n(this.b)}${e===1?")":`, ${e})`}`}function Ji(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function _n(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function wn(e){return e=_n(e),(e<16?"0":"")+e.toString(16)}function Cu(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Ee(e,t,n,r)}function Au(e){if(e instanceof Ee)return new Ee(e.h,e.s,e.l,e.opacity);if(e instanceof Nr||(e=Fe(e)),!e)return new Ee;if(e instanceof Ee)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),s=Math.max(t,n,r),a=NaN,o=s-i,l=(s+i)/2;return o?(t===s?a=(n-r)/o+(n<r)*6:n===s?a=(r-t)/o+2:a=(t-n)/o+4,o/=l<.5?s+i:2-s-i,a*=60):o=l>0&&l<1?0:a,new Ee(a,o,l,e.opacity)}function no(e,t,n,r){return arguments.length===1?Au(e):new Ee(e,t,n,r??1)}function Ee(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}to(Ee,no,Eu(Nr,{brighter(e){return e=e==null?Ki:Math.pow(Ki,e),new Ee(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Ur:Math.pow(Ur,e),new Ee(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new Jt(ro(e>=240?e-240:e+120,i,r),ro(e,i,r),ro(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Ee(Du(this.h),ts(this.s),ts(this.l),Ji(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Ji(this.opacity);return`${e===1?"hsl(":"hsla("}${Du(this.h)}, ${ts(this.s)*100}%, ${ts(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Du(e){return e=(e||0)%360,e<0?e+360:e}function ts(e){return Math.max(0,Math.min(1,e||0))}function ro(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const io=e=>()=>e;function gy(e,t){return function(n){return e+n*t}}function my(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function vy(e){return(e=+e)==1?Lu:function(t,n){return n-t?my(t,n,e):io(isNaN(t)?n:t)}}function Lu(e,t){var n=t-e;return n?gy(e,n):io(isNaN(e)?t:e)}const es=function e(t){var n=vy(t);function r(i,s){var a=n((i=eo(i)).r,(s=eo(s)).r),o=n(i.g,s.g),l=n(i.b,s.b),c=Lu(i.opacity,s.opacity);return function(u){return i.r=a(u),i.g=o(u),i.b=l(u),i.opacity=c(u),i+""}}return r.gamma=e,r}(1);function yy(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(s){for(i=0;i<n;++i)r[i]=e[i]*(1-s)+t[i]*s;return r}}function xy(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function by(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=new Array(r),s=new Array(n),a;for(a=0;a<r;++a)i[a]=Vr(e[a],t[a]);for(;a<n;++a)s[a]=t[a];return function(o){for(a=0;a<r;++a)s[a]=i[a](o);return s}}function Ey(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function ae(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function Sy(e,t){var n={},r={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?n[i]=Vr(e[i],t[i]):r[i]=t[i];return function(s){for(i in n)r[i]=n[i](s);return r}}var so=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ao=new RegExp(so.source,"g");function _y(e){return function(){return e}}function wy(e){return function(t){return e(t)+""}}function Ru(e,t){var n=so.lastIndex=ao.lastIndex=0,r,i,s,a=-1,o=[],l=[];for(e=e+"",t=t+"";(r=so.exec(e))&&(i=ao.exec(t));)(s=i.index)>n&&(s=t.slice(n,s),o[a]?o[a]+=s:o[++a]=s),(r=r[0])===(i=i[0])?o[a]?o[a]+=i:o[++a]=i:(o[++a]=null,l.push({i:a,x:ae(r,i)})),n=ao.lastIndex;return n<t.length&&(s=t.slice(n),o[a]?o[a]+=s:o[++a]=s),o.length<2?l[0]?wy(l[0].x):_y(t):(t=l.length,function(c){for(var u=0,d;u<t;++u)o[(d=l[u]).i]=d.x(c);return o.join("")})}function Vr(e,t){var n=typeof t,r;return t==null||n==="boolean"?io(t):(n==="number"?ae:n==="string"?(r=Fe(t))?(t=r,es):Ru:t instanceof Fe?es:t instanceof Date?Ey:xy(t)?yy:Array.isArray(t)?by:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?Sy:ae)(e,t)}function Iu(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var ku=180/Math.PI,oo={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function $u(e,t,n,r,i,s){var a,o,l;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(l=e*n+t*r)&&(n-=e*l,r-=t*l),(o=Math.sqrt(n*n+r*r))&&(n/=o,r/=o,l/=o),e*r<t*n&&(e=-e,t=-t,l=-l,a=-a),{translateX:i,translateY:s,rotate:Math.atan2(t,e)*ku,skewX:Math.atan(l)*ku,scaleX:a,scaleY:o}}var ns;function Oy(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?oo:$u(t.a,t.b,t.c,t.d,t.e,t.f)}function Ty(e){return e==null||(ns||(ns=document.createElementNS("http://www.w3.org/2000/svg","g")),ns.setAttribute("transform",e),!(e=ns.transform.baseVal.consolidate()))?oo:(e=e.matrix,$u(e.a,e.b,e.c,e.d,e.e,e.f))}function Pu(e,t,n,r){function i(c){return c.length?c.pop()+" ":""}function s(c,u,d,h,f,p){if(c!==d||u!==h){var g=f.push("translate(",null,t,null,n);p.push({i:g-4,x:ae(c,d)},{i:g-2,x:ae(u,h)})}else(d||h)&&f.push("translate("+d+t+h+n)}function a(c,u,d,h){c!==u?(c-u>180?u+=360:u-c>180&&(c+=360),h.push({i:d.push(i(d)+"rotate(",null,r)-2,x:ae(c,u)})):u&&d.push(i(d)+"rotate("+u+r)}function o(c,u,d,h){c!==u?h.push({i:d.push(i(d)+"skewX(",null,r)-2,x:ae(c,u)}):u&&d.push(i(d)+"skewX("+u+r)}function l(c,u,d,h,f,p){if(c!==d||u!==h){var g=f.push(i(f)+"scale(",null,",",null,")");p.push({i:g-4,x:ae(c,d)},{i:g-2,x:ae(u,h)})}else(d!==1||h!==1)&&f.push(i(f)+"scale("+d+","+h+")")}return function(c,u){var d=[],h=[];return c=e(c),u=e(u),s(c.translateX,c.translateY,u.translateX,u.translateY,d,h),a(c.rotate,u.rotate,d,h),o(c.skewX,u.skewX,d,h),l(c.scaleX,c.scaleY,u.scaleX,u.scaleY,d,h),c=u=null,function(f){for(var p=-1,g=h.length,v;++p<g;)d[(v=h[p]).i]=v.x(f);return d.join("")}}}var My=Pu(Oy,"px, ","px)","deg)"),Cy=Pu(Ty,", ",")",")");function Ay(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e(r/(t-1));return n}var Zn=0,Gr=0,Hr=0,Nu=1e3,rs,Fr,is=0,On=0,ss=0,zr=typeof performance=="object"&&performance.now?performance:Date,Uu=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function lo(){return On||(Uu(Dy),On=zr.now()+ss)}function Dy(){On=0}function as(){this._call=this._time=this._next=null}as.prototype=Bu.prototype={constructor:as,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?lo():+n)+(t==null?0:+t),!this._next&&Fr!==this&&(Fr?Fr._next=this:rs=this,Fr=this),this._call=e,this._time=n,co()},stop:function(){this._call&&(this._call=null,this._time=1/0,co())}};function Bu(e,t,n){var r=new as;return r.restart(e,t,n),r}function Ly(){lo(),++Zn;for(var e=rs,t;e;)(t=On-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Zn}function Vu(){On=(is=zr.now())+ss,Zn=Gr=0;try{Ly()}finally{Zn=0,Iy(),On=0}}function Ry(){var e=zr.now(),t=e-is;t>Nu&&(ss-=t,is=e)}function Iy(){for(var e,t=rs,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:rs=n);Fr=e,co(r)}function co(e){if(!Zn){Gr&&(Gr=clearTimeout(Gr));var t=e-On;t>24?(e<1/0&&(Gr=setTimeout(Vu,e-zr.now()-ss)),Hr&&(Hr=clearInterval(Hr))):(Hr||(is=zr.now(),Hr=setInterval(Ry,Nu)),Zn=1,Uu(Vu))}}function Gu(e,t,n){var r=new as;return t=t==null?0:+t,r.restart(i=>{r.stop(),e(i+t)},t,n),r}var ky=Xa("start","end","cancel","interrupt"),$y=[],Hu=0,Fu=1,uo=2,os=3,zu=4,ho=5,ls=6;function cs(e,t,n,r,i,s){var a=e.__transition;if(!a)e.__transition={};else if(n in a)return;Py(e,n,{name:t,index:r,group:i,on:ky,tween:$y,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:Hu})}function fo(e,t){var n=Se(e,t);if(n.state>Hu)throw new Error("too late; already scheduled");return n}function Ie(e,t){var n=Se(e,t);if(n.state>os)throw new Error("too late; already running");return n}function Se(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function Py(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=Bu(s,0,n.time);function s(c){n.state=Fu,n.timer.restart(a,n.delay,n.time),n.delay<=c&&a(c-n.delay)}function a(c){var u,d,h,f;if(n.state!==Fu)return l();for(u in r)if(f=r[u],f.name===n.name){if(f.state===os)return Gu(a);f.state===zu?(f.state=ls,f.timer.stop(),f.on.call("interrupt",e,e.__data__,f.index,f.group),delete r[u]):+u<t&&(f.state=ls,f.timer.stop(),f.on.call("cancel",e,e.__data__,f.index,f.group),delete r[u])}if(Gu(function(){n.state===os&&(n.state=zu,n.timer.restart(o,n.delay,n.time),o(c))}),n.state=uo,n.on.call("start",e,e.__data__,n.index,n.group),n.state===uo){for(n.state=os,i=new Array(h=n.tween.length),u=0,d=-1;u<h;++u)(f=n.tween[u].value.call(e,e.__data__,n.index,n.group))&&(i[++d]=f);i.length=d+1}}function o(c){for(var u=c<n.duration?n.ease.call(null,c/n.duration):(n.timer.restart(l),n.state=ho,1),d=-1,h=i.length;++d<h;)i[d].call(e,u);n.state===ho&&(n.on.call("end",e,e.__data__,n.index,n.group),l())}function l(){n.state=ls,n.timer.stop(),delete r[t];for(var c in r)return;delete e.__transition}}function po(e,t){var n=e.__transition,r,i,s=!0,a;if(n){t=t==null?null:t+"";for(a in n){if((r=n[a]).name!==t){s=!1;continue}i=r.state>uo&&r.state<ho,r.state=ls,r.timer.stop(),r.on.call(i?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete n[a]}s&&delete e.__transition}}function Ny(e){return this.each(function(){po(this,e)})}function Uy(e,t){var n,r;return function(){var i=Ie(this,e),s=i.tween;if(s!==n){r=n=s;for(var a=0,o=r.length;a<o;++a)if(r[a].name===t){r=r.slice(),r.splice(a,1);break}}i.tween=r}}function By(e,t,n){var r,i;if(typeof n!="function")throw new Error;return function(){var s=Ie(this,e),a=s.tween;if(a!==r){i=(r=a).slice();for(var o={name:t,value:n},l=0,c=i.length;l<c;++l)if(i[l].name===t){i[l]=o;break}l===c&&i.push(o)}s.tween=i}}function Vy(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r=Se(this.node(),n).tween,i=0,s=r.length,a;i<s;++i)if((a=r[i]).name===e)return a.value;return null}return this.each((t==null?Uy:By)(n,e,t))}function go(e,t,n){var r=e._id;return e.each(function(){var i=Ie(this,r);(i.value||(i.value={}))[t]=n.apply(this,arguments)}),function(i){return Se(i,r).value[t]}}function Wu(e,t){var n;return(typeof t=="number"?ae:t instanceof Fe?es:(n=Fe(t))?(t=n,es):Ru)(e,t)}function Gy(e){return function(){this.removeAttribute(e)}}function Hy(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Fy(e,t,n){var r,i=n+"",s;return function(){var a=this.getAttribute(e);return a===i?null:a===r?s:s=t(r=a,n)}}function zy(e,t,n){var r,i=n+"",s;return function(){var a=this.getAttributeNS(e.space,e.local);return a===i?null:a===r?s:s=t(r=a,n)}}function Wy(e,t,n){var r,i,s;return function(){var a,o=n(this),l;return o==null?void this.removeAttribute(e):(a=this.getAttribute(e),l=o+"",a===l?null:a===r&&l===i?s:(i=l,s=t(r=a,o)))}}function Yy(e,t,n){var r,i,s;return function(){var a,o=n(this),l;return o==null?void this.removeAttributeNS(e.space,e.local):(a=this.getAttributeNS(e.space,e.local),l=o+"",a===l?null:a===r&&l===i?s:(i=l,s=t(r=a,o)))}}function qy(e,t){var n=ji(e),r=n==="transform"?Cy:Wu;return this.attrTween(e,typeof t=="function"?(n.local?Yy:Wy)(n,r,go(this,"attr."+e,t)):t==null?(n.local?Hy:Gy)(n):(n.local?zy:Fy)(n,r,t))}function Xy(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function jy(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function Zy(e,t){var n,r;function i(){var s=t.apply(this,arguments);return s!==r&&(n=(r=s)&&jy(e,s)),n}return i._value=t,i}function Ky(e,t){var n,r;function i(){var s=t.apply(this,arguments);return s!==r&&(n=(r=s)&&Xy(e,s)),n}return i._value=t,i}function Qy(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var r=ji(e);return this.tween(n,(r.local?Zy:Ky)(r,t))}function Jy(e,t){return function(){fo(this,e).delay=+t.apply(this,arguments)}}function t1(e,t){return t=+t,function(){fo(this,e).delay=t}}function e1(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Jy:t1)(t,e)):Se(this.node(),t).delay}function n1(e,t){return function(){Ie(this,e).duration=+t.apply(this,arguments)}}function r1(e,t){return t=+t,function(){Ie(this,e).duration=t}}function i1(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?n1:r1)(t,e)):Se(this.node(),t).duration}function s1(e,t){if(typeof t!="function")throw new Error;return function(){Ie(this,e).ease=t}}function a1(e){var t=this._id;return arguments.length?this.each(s1(t,e)):Se(this.node(),t).ease}function o1(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;Ie(this,e).ease=n}}function l1(e){if(typeof e!="function")throw new Error;return this.each(o1(this._id,e))}function c1(e){typeof e!="function"&&(e=hu(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var s=t[i],a=s.length,o=r[i]=[],l,c=0;c<a;++c)(l=s[c])&&e.call(l,l.__data__,c,s)&&o.push(l);return new ze(r,this._parents,this._name,this._id)}function u1(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,i=n.length,s=Math.min(r,i),a=new Array(r),o=0;o<s;++o)for(var l=t[o],c=n[o],u=l.length,d=a[o]=new Array(u),h,f=0;f<u;++f)(h=l[f]||c[f])&&(d[f]=h);for(;o<r;++o)a[o]=t[o];return new ze(a,this._parents,this._name,this._id)}function h1(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function d1(e,t,n){var r,i,s=h1(t)?fo:Ie;return function(){var a=s(this,e),o=a.on;o!==r&&(i=(r=o).copy()).on(t,n),a.on=i}}function f1(e,t){var n=this._id;return arguments.length<2?Se(this.node(),n).on.on(e):this.each(d1(n,e,t))}function p1(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function g1(){return this.on("end.remove",p1(this._id))}function m1(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Za(e));for(var r=this._groups,i=r.length,s=new Array(i),a=0;a<i;++a)for(var o=r[a],l=o.length,c=s[a]=new Array(l),u,d,h=0;h<l;++h)(u=o[h])&&(d=e.call(u,u.__data__,h,o))&&("__data__"in u&&(d.__data__=u.__data__),c[h]=d,cs(c[h],t,n,h,c,Se(u,n)));return new ze(s,this._parents,t,n)}function v1(e){var t=this._name,n=this._id;typeof e!="function"&&(e=uu(e));for(var r=this._groups,i=r.length,s=[],a=[],o=0;o<i;++o)for(var l=r[o],c=l.length,u,d=0;d<c;++d)if(u=l[d]){for(var h=e.call(u,u.__data__,d,l),f,p=Se(u,n),g=0,v=h.length;g<v;++g)(f=h[g])&&cs(f,t,n,g,h,p);s.push(h),a.push(u)}return new ze(s,a,t,n)}var y1=Pr.prototype.constructor;function x1(){return new y1(this._groups,this._parents)}function b1(e,t){var n,r,i;return function(){var s=Xn(this,e),a=(this.style.removeProperty(e),Xn(this,e));return s===a?null:s===n&&a===r?i:i=t(n=s,r=a)}}function Yu(e){return function(){this.style.removeProperty(e)}}function E1(e,t,n){var r,i=n+"",s;return function(){var a=Xn(this,e);return a===i?null:a===r?s:s=t(r=a,n)}}function S1(e,t,n){var r,i,s;return function(){var a=Xn(this,e),o=n(this),l=o+"";return o==null&&(l=o=(this.style.removeProperty(e),Xn(this,e))),a===l?null:a===r&&l===i?s:(i=l,s=t(r=a,o))}}function _1(e,t){var n,r,i,s="style."+t,a="end."+s,o;return function(){var l=Ie(this,e),c=l.on,u=l.value[s]==null?o||(o=Yu(t)):void 0;(c!==n||i!==u)&&(r=(n=c).copy()).on(a,i=u),l.on=r}}function w1(e,t,n){var r=(e+="")=="transform"?My:Wu;return t==null?this.styleTween(e,b1(e,r)).on("end.style."+e,Yu(e)):typeof t=="function"?this.styleTween(e,S1(e,r,go(this,"style."+e,t))).each(_1(this._id,e)):this.styleTween(e,E1(e,r,t),n).on("end.style."+e,null)}function O1(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function T1(e,t,n){var r,i;function s(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&O1(e,a,n)),r}return s._value=t,s}function M1(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;return this.tween(r,T1(e,t,n??""))}function C1(e){return function(){this.textContent=e}}function A1(e){return function(){var t=e(this);this.textContent=t??""}}function D1(e){return this.tween("text",typeof e=="function"?A1(go(this,"text",e)):C1(e==null?"":e+""))}function L1(e){return function(t){this.textContent=e.call(this,t)}}function R1(e){var t,n;function r(){var i=e.apply(this,arguments);return i!==n&&(t=(n=i)&&L1(i)),t}return r._value=e,r}function I1(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,R1(e))}function k1(){for(var e=this._name,t=this._id,n=qu(),r=this._groups,i=r.length,s=0;s<i;++s)for(var a=r[s],o=a.length,l,c=0;c<o;++c)if(l=a[c]){var u=Se(l,t);cs(l,e,n,c,a,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new ze(r,this._parents,e,n)}function $1(){var e,t,n=this,r=n._id,i=n.size();return new Promise(function(s,a){var o={value:a},l={value:function(){--i===0&&s()}};n.each(function(){var c=Ie(this,r),u=c.on;u!==e&&(t=(e=u).copy(),t._.cancel.push(o),t._.interrupt.push(o),t._.end.push(l)),c.on=t}),i===0&&s()})}var P1=0;function ze(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function qu(){return++P1}var We=Pr.prototype;ze.prototype={constructor:ze,select:m1,selectAll:v1,selectChild:We.selectChild,selectChildren:We.selectChildren,filter:c1,merge:u1,selection:x1,transition:k1,call:We.call,nodes:We.nodes,node:We.node,size:We.size,empty:We.empty,each:We.each,on:f1,attr:qy,attrTween:Qy,style:w1,styleTween:M1,text:D1,textTween:I1,remove:g1,tween:Vy,delay:e1,duration:i1,ease:a1,easeVarying:l1,end:$1,[Symbol.iterator]:We[Symbol.iterator]};const N1=e=>+e;function Xu(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var U1={time:null,delay:0,duration:250,ease:Xu};function B1(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function V1(e){var t,n;e instanceof ze?(t=e._id,e=e._name):(t=qu(),(n=U1).time=lo(),e=e==null?null:e+"");for(var r=this._groups,i=r.length,s=0;s<i;++s)for(var a=r[s],o=a.length,l,c=0;c<o;++c)(l=a[c])&&cs(l,e,t,c,a,n||B1(l,t));return new ze(r,this._parents,e,t)}Pr.prototype.interrupt=Ny,Pr.prototype.transition=V1;const mo=e=>()=>e;function G1(e,{sourceEvent:t,target:n,selection:r,mode:i,dispatch:s}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},selection:{value:r,enumerable:!0,configurable:!0},mode:{value:i,enumerable:!0,configurable:!0},_:{value:s}})}function H1(e){e.stopImmediatePropagation()}function vo(e){e.preventDefault(),e.stopImmediatePropagation()}var ju={name:"drag"},yo={name:"space"},Kn={name:"handle"},Qn={name:"center"};const{abs:Zu,max:Ft,min:zt}=Math;function Ku(e){return[+e[0],+e[1]]}function Qu(e){return[Ku(e[0]),Ku(e[1])]}var us={name:"x",handles:["w","e"].map(hs),input:function(e,t){return e==null?null:[[+e[0],t[0][1]],[+e[1],t[1][1]]]},output:function(e){return e&&[e[0][0],e[1][0]]}},xo={name:"y",handles:["n","s"].map(hs),input:function(e,t){return e==null?null:[[t[0][0],+e[0]],[t[1][0],+e[1]]]},output:function(e){return e&&[e[0][1],e[1][1]]}},Ye={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Ju={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},th={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},F1={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},z1={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function hs(e){return{type:e}}function W1(e){return!e.ctrlKey&&!e.button}function Y1(){var e=this.ownerSVGElement||this;return e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]}function q1(){return navigator.maxTouchPoints||"ontouchstart"in this}function bo(e){for(;!e.__brush;)if(!(e=e.parentNode))return;return e.__brush}function X1(e){return e[0][0]===e[1][0]||e[0][1]===e[1][1]}function eh(){return j1(us)}function j1(e){var t=Y1,n=W1,r=q1,i=!0,s=Xa("start","brush","end"),a=6,o;function l(v){var m=v.property("__brush",g).selectAll(".overlay").data([hs("overlay")]);m.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",Ye.overlay).merge(m).each(function(){var b=bo(this).extent;D(this).attr("x",b[0][0]).attr("y",b[0][1]).attr("width",b[1][0]-b[0][0]).attr("height",b[1][1]-b[0][1])}),v.selectAll(".selection").data([hs("selection")]).enter().append("rect").attr("class","selection").attr("cursor",Ye.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var y=v.selectAll(".handle").data(e.handles,function(b){return b.type});y.exit().remove(),y.enter().append("rect").attr("class",function(b){return"handle handle--"+b.type}).attr("cursor",function(b){return Ye[b.type]}),v.each(c).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",h).filter(r).on("touchstart.brush",h).on("touchmove.brush",f).on("touchend.brush touchcancel.brush",p).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}l.move=function(v,m,y){v.tween?v.on("start.brush",function(b){u(this,arguments).beforestart().start(b)}).on("interrupt.brush end.brush",function(b){u(this,arguments).end(b)}).tween("brush",function(){var b=this,S=b.__brush,_=u(b,arguments),E=S.selection,M=e.input(typeof m=="function"?m.apply(this,arguments):m,S.extent),C=Vr(E,M);function G(I){S.selection=I===1&&M===null?null:C(I),c.call(b),_.brush()}return E!==null&&M!==null?G:G(1)}):v.each(function(){var b=this,S=arguments,_=b.__brush,E=e.input(typeof m=="function"?m.apply(b,S):m,_.extent),M=u(b,S).beforestart();po(b),_.selection=E===null?null:E,c.call(b),M.start(y).brush(y).end(y)})},l.clear=function(v,m){l.move(v,null,m)};function c(){var v=D(this),m=bo(this).selection;m?(v.selectAll(".selection").style("display",null).attr("x",m[0][0]).attr("y",m[0][1]).attr("width",m[1][0]-m[0][0]).attr("height",m[1][1]-m[0][1]),v.selectAll(".handle").style("display",null).attr("x",function(y){return y.type[y.type.length-1]==="e"?m[1][0]-a/2:m[0][0]-a/2}).attr("y",function(y){return y.type[0]==="s"?m[1][1]-a/2:m[0][1]-a/2}).attr("width",function(y){return y.type==="n"||y.type==="s"?m[1][0]-m[0][0]+a:a}).attr("height",function(y){return y.type==="e"||y.type==="w"?m[1][1]-m[0][1]+a:a})):v.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function u(v,m,y){var b=v.__brush.emitter;return b&&(!y||!b.clean)?b:new d(v,m,y)}function d(v,m,y){this.that=v,this.args=m,this.state=v.__brush,this.active=0,this.clean=y}d.prototype={beforestart:function(){return++this.active===1&&(this.state.emitter=this,this.starting=!0),this},start:function(v,m){return this.starting?(this.starting=!1,this.emit("start",v,m)):this.emit("brush",v),this},brush:function(v,m){return this.emit("brush",v,m),this},end:function(v,m){return--this.active===0&&(delete this.state.emitter,this.emit("end",v,m)),this},emit:function(v,m,y){var b=D(this.that).datum();s.call(v,this.that,new G1(v,{sourceEvent:m,target:l,selection:e.output(this.state.selection),mode:y,dispatch:s}),b)}};function h(v){if(o&&!v.touches||!n.apply(this,arguments))return;var m=this,y=v.target.__data__.type,b=(i&&v.metaKey?y="overlay":y)==="selection"?ju:i&&v.altKey?Qn:Kn,S=e===xo?null:F1[y],_=e===us?null:z1[y],E=bo(m),M=E.extent,C=E.selection,G=M[0][0],I,T,L=M[0][1],R,k,O=M[1][0],U,P,N=M[1][1],B,Y,X=0,J=0,ct,W=S&&_&&i&&v.shiftKey,K,ut,rt=Array.from(v.touches||[v],et=>{const Rt=et.identifier;return et=Sn(et,m),et.point0=et.slice(),et.identifier=Rt,et});po(m);var Tt=u(m,arguments,!0).beforestart();if(y==="overlay"){C&&(ct=!0);const et=[rt[0],rt[1]||rt[0]];E.selection=C=[[I=e===xo?G:zt(et[0][0],et[1][0]),R=e===us?L:zt(et[0][1],et[1][1])],[U=e===xo?O:Ft(et[0][0],et[1][0]),B=e===us?N:Ft(et[0][1],et[1][1])]],rt.length>1&&pt(v)}else I=C[0][0],R=C[0][1],U=C[1][0],B=C[1][1];T=I,k=R,P=U,Y=B;var q=D(m).attr("pointer-events","none"),V=q.selectAll(".overlay").attr("cursor",Ye[y]);if(v.touches)Tt.moved=$,Tt.ended=yt;else{var H=D(v.view).on("mousemove.brush",$,!0).on("mouseup.brush",yt,!0);i&&H.on("keydown.brush",Kt,!0).on("keyup.brush",Qt,!0),ny(v.view)}c.call(m),Tt.start(v,b.name);function $(et){for(const Rt of et.changedTouches||[et])for(const Hi of rt)Hi.identifier===Rt.identifier&&(Hi.cur=Sn(Rt,m));if(W&&!K&&!ut&&rt.length===1){const Rt=rt[0];Zu(Rt.cur[0]-Rt[0])>Zu(Rt.cur[1]-Rt[1])?ut=!0:K=!0}for(const Rt of rt)Rt.cur&&(Rt[0]=Rt.cur[0],Rt[1]=Rt.cur[1]);ct=!0,vo(et),pt(et)}function pt(et){const Rt=rt[0],Hi=Rt.point0;var xn;switch(X=Rt[0]-Hi[0],J=Rt[1]-Hi[1],b){case yo:case ju:{S&&(X=Ft(G-I,zt(O-U,X)),T=I+X,P=U+X),_&&(J=Ft(L-R,zt(N-B,J)),k=R+J,Y=B+J);break}case Kn:{rt[1]?(S&&(T=Ft(G,zt(O,rt[0][0])),P=Ft(G,zt(O,rt[1][0])),S=1),_&&(k=Ft(L,zt(N,rt[0][1])),Y=Ft(L,zt(N,rt[1][1])),_=1)):(S<0?(X=Ft(G-I,zt(O-I,X)),T=I+X,P=U):S>0&&(X=Ft(G-U,zt(O-U,X)),T=I,P=U+X),_<0?(J=Ft(L-R,zt(N-R,J)),k=R+J,Y=B):_>0&&(J=Ft(L-B,zt(N-B,J)),k=R,Y=B+J));break}case Qn:{S&&(T=Ft(G,zt(O,I-X*S)),P=Ft(G,zt(O,U+X*S))),_&&(k=Ft(L,zt(N,R-J*_)),Y=Ft(L,zt(N,B+J*_)));break}}P<T&&(S*=-1,xn=I,I=U,U=xn,xn=T,T=P,P=xn,y in Ju&&V.attr("cursor",Ye[y=Ju[y]])),Y<k&&(_*=-1,xn=R,R=B,B=xn,xn=k,k=Y,Y=xn,y in th&&V.attr("cursor",Ye[y=th[y]])),E.selection&&(C=E.selection),K&&(T=C[0][0],P=C[1][0]),ut&&(k=C[0][1],Y=C[1][1]),(C[0][0]!==T||C[0][1]!==k||C[1][0]!==P||C[1][1]!==Y)&&(E.selection=[[T,k],[P,Y]],c.call(m),Tt.brush(et,b.name))}function yt(et){if(H1(et),et.touches){if(et.touches.length)return;o&&clearTimeout(o),o=setTimeout(function(){o=null},500)}else ry(et.view,ct),H.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);q.attr("pointer-events","all"),V.attr("cursor",Ye.overlay),E.selection&&(C=E.selection),X1(C)&&(E.selection=null,c.call(m)),Tt.end(et,b.name)}function Kt(et){switch(et.keyCode){case 16:{W=S&&_;break}case 18:{b===Kn&&(S&&(U=P-X*S,I=T+X*S),_&&(B=Y-J*_,R=k+J*_),b=Qn,pt(et));break}case 32:{(b===Kn||b===Qn)&&(S<0?U=P-X:S>0&&(I=T-X),_<0?B=Y-J:_>0&&(R=k-J),b=yo,V.attr("cursor",Ye.selection),pt(et));break}default:return}vo(et)}function Qt(et){switch(et.keyCode){case 16:{W&&(K=ut=W=!1,pt(et));break}case 18:{b===Qn&&(S<0?U=P:S>0&&(I=T),_<0?B=Y:_>0&&(R=k),b=Kn,pt(et));break}case 32:{b===yo&&(et.altKey?(S&&(U=P-X*S,I=T+X*S),_&&(B=Y-J*_,R=k+J*_),b=Qn):(S<0?U=P:S>0&&(I=T),_<0?B=Y:_>0&&(R=k),b=Kn),V.attr("cursor",Ye[y]),pt(et));break}default:return}vo(et)}}function f(v){u(this,arguments).moved(v)}function p(v){u(this,arguments).ended(v)}function g(){var v=this.__brush||{selection:null};return v.extent=Qu(t.apply(this,arguments)),v.dim=e,v}return l.extent=function(v){return arguments.length?(t=typeof v=="function"?v:mo(Qu(v)),l):t},l.filter=function(v){return arguments.length?(n=typeof v=="function"?v:mo(!!v),l):n},l.touchable=function(v){return arguments.length?(r=typeof v=="function"?v:mo(!!v),l):r},l.handleSize=function(v){return arguments.length?(a=+v,l):a},l.keyModifiers=function(v){return arguments.length?(i=!!v,l):i},l.on=function(){var v=s.on.apply(s,arguments);return v===s?l:v},l}const Eo=Math.PI,So=2*Eo,Tn=1e-6,Z1=So-Tn;function nh(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function K1(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return nh;const n=10**t;return function(r){this._+=r[0];for(let i=1,s=r.length;i<s;++i)this._+=Math.round(arguments[i]*n)/n+r[i]}}let Q1=class{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?nh:K1(t)}moveTo(t,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,n){this._append`L${this._x1=+t},${this._y1=+n}`}quadraticCurveTo(t,n,r,i){this._append`Q${+t},${+n},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(t,n,r,i,s,a){this._append`C${+t},${+n},${+r},${+i},${this._x1=+s},${this._y1=+a}`}arcTo(t,n,r,i,s){if(t=+t,n=+n,r=+r,i=+i,s=+s,s<0)throw new Error(`negative radius: ${s}`);let a=this._x1,o=this._y1,l=r-t,c=i-n,u=a-t,d=o-n,h=u*u+d*d;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(h>Tn)if(!(Math.abs(d*l-c*u)>Tn)||!s)this._append`L${this._x1=t},${this._y1=n}`;else{let f=r-a,p=i-o,g=l*l+c*c,v=f*f+p*p,m=Math.sqrt(g),y=Math.sqrt(h),b=s*Math.tan((Eo-Math.acos((g+h-v)/(2*m*y)))/2),S=b/y,_=b/m;Math.abs(S-1)>Tn&&this._append`L${t+S*u},${n+S*d}`,this._append`A${s},${s},0,0,${+(d*f>u*p)},${this._x1=t+_*l},${this._y1=n+_*c}`}}arc(t,n,r,i,s,a){if(t=+t,n=+n,r=+r,a=!!a,r<0)throw new Error(`negative radius: ${r}`);let o=r*Math.cos(i),l=r*Math.sin(i),c=t+o,u=n+l,d=1^a,h=a?i-s:s-i;this._x1===null?this._append`M${c},${u}`:(Math.abs(this._x1-c)>Tn||Math.abs(this._y1-u)>Tn)&&this._append`L${c},${u}`,r&&(h<0&&(h=h%So+So),h>Z1?this._append`A${r},${r},0,1,${d},${t-o},${n-l}A${r},${r},0,1,${d},${this._x1=c},${this._y1=u}`:h>Tn&&this._append`A${r},${r},0,${+(h>=Eo)},${d},${this._x1=t+r*Math.cos(s)},${this._y1=n+r*Math.sin(s)}`)}rect(t,n,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}};function J1(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function ds(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function Jn(e){return e=ds(Math.abs(e)),e?e[1]:NaN}function tx(e,t){return function(n,r){for(var i=n.length,s=[],a=0,o=e[0],l=0;i>0&&o>0&&(l+o+1>r&&(o=Math.max(1,r-l)),s.push(n.substring(i-=o,i+o)),!((l+=o+1)>r));)o=e[a=(a+1)%e.length];return s.reverse().join(t)}}function ex(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var nx=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Wr(e){if(!(t=nx.exec(e)))throw new Error("invalid format: "+e);var t;return new _o({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Wr.prototype=_o.prototype;function _o(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}_o.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function rx(e){t:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+e[n])break t;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var rh;function ix(e,t){var n=ds(e,t);if(!n)return e+"";var r=n[0],i=n[1],s=i-(rh=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=r.length;return s===a?r:s>a?r+new Array(s-a+1).join("0"):s>0?r.slice(0,s)+"."+r.slice(s):"0."+new Array(1-s).join("0")+ds(e,Math.max(0,t+s-1))[0]}function ih(e,t){var n=ds(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const sh={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:J1,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>ih(e*100,t),r:ih,s:ix,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function ah(e){return e}var oh=Array.prototype.map,lh=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function sx(e){var t=e.grouping===void 0||e.thousands===void 0?ah:tx(oh.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",s=e.numerals===void 0?ah:ex(oh.call(e.numerals,String)),a=e.percent===void 0?"%":e.percent+"",o=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function c(d){d=Wr(d);var h=d.fill,f=d.align,p=d.sign,g=d.symbol,v=d.zero,m=d.width,y=d.comma,b=d.precision,S=d.trim,_=d.type;_==="n"?(y=!0,_="g"):sh[_]||(b===void 0&&(b=12),S=!0,_="g"),(v||h==="0"&&f==="=")&&(v=!0,h="0",f="=");var E=g==="$"?n:g==="#"&&/[boxX]/.test(_)?"0"+_.toLowerCase():"",M=g==="$"?r:/[%p]/.test(_)?a:"",C=sh[_],G=/[defgprs%]/.test(_);b=b===void 0?6:/[gprs]/.test(_)?Math.max(1,Math.min(21,b)):Math.max(0,Math.min(20,b));function I(T){var L=E,R=M,k,O,U;if(_==="c")R=C(T)+R,T="";else{T=+T;var P=T<0||1/T<0;if(T=isNaN(T)?l:C(Math.abs(T),b),S&&(T=rx(T)),P&&+T==0&&p!=="+"&&(P=!1),L=(P?p==="("?p:o:p==="-"||p==="("?"":p)+L,R=(_==="s"?lh[8+rh/3]:"")+R+(P&&p==="("?")":""),G){for(k=-1,O=T.length;++k<O;)if(U=T.charCodeAt(k),48>U||U>57){R=(U===46?i+T.slice(k+1):T.slice(k))+R,T=T.slice(0,k);break}}}y&&!v&&(T=t(T,1/0));var N=L.length+T.length+R.length,B=N<m?new Array(m-N+1).join(h):"";switch(y&&v&&(T=t(B+T,B.length?m-R.length:1/0),B=""),f){case"<":T=L+T+R+B;break;case"=":T=L+B+T+R;break;case"^":T=B.slice(0,N=B.length>>1)+L+T+R+B.slice(N);break;default:T=B+L+T+R;break}return s(T)}return I.toString=function(){return d+""},I}function u(d,h){var f=c((d=Wr(d),d.type="f",d)),p=Math.max(-8,Math.min(8,Math.floor(Jn(h)/3)))*3,g=Math.pow(10,-p),v=lh[8+p/3];return function(m){return f(g*m)+v}}return{format:c,formatPrefix:u}}var fs,wo,ch;ax({thousands:",",grouping:[3],currency:["$",""]});function ax(e){return fs=sx(e),wo=fs.format,ch=fs.formatPrefix,fs}function ox(e){return Math.max(0,-Jn(Math.abs(e)))}function lx(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Jn(t)/3)))*3-Jn(Math.abs(e)))}function cx(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Jn(t)-Jn(e))+1}var gt=1e-6,uh=1e-12,ot=Math.PI,te=ot/2,hh=ot/4,oe=ot*2,Xt=180/ot,Dt=ot/180,mt=Math.abs,dh=Math.atan,Mn=Math.atan2,xt=Math.cos,ux=Math.exp,hx=Math.log,ft=Math.sin,un=Math.sign||function(e){return e>0?1:e<0?-1:0},_e=Math.sqrt,dx=Math.tan;function fx(e){return e>1?0:e<-1?ot:Math.acos(e)}function qe(e){return e>1?te:e<-1?-te:Math.asin(e)}function fe(){}function ps(e,t){e&&ph.hasOwnProperty(e.type)&&ph[e.type](e,t)}var fh={Feature:function(e,t){ps(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,r=-1,i=n.length;++r<i;)ps(n[r].geometry,t)}},ph={Sphere:function(e,t){t.sphere()},Point:function(e,t){e=e.coordinates,t.point(e[0],e[1],e[2])},MultiPoint:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)e=n[r],t.point(e[0],e[1],e[2])},LineString:function(e,t){Oo(e.coordinates,t,0)},MultiLineString:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)Oo(n[r],t,0)},Polygon:function(e,t){gh(e.coordinates,t)},MultiPolygon:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)gh(n[r],t)},GeometryCollection:function(e,t){for(var n=e.geometries,r=-1,i=n.length;++r<i;)ps(n[r],t)}};function Oo(e,t,n){var r=-1,i=e.length-n,s;for(t.lineStart();++r<i;)s=e[r],t.point(s[0],s[1],s[2]);t.lineEnd()}function gh(e,t){var n=-1,r=e.length;for(t.polygonStart();++n<r;)Oo(e[n],t,1);t.polygonEnd()}function tr(e,t){e&&fh.hasOwnProperty(e.type)?fh[e.type](e,t):ps(e,t)}function To(e){return[Mn(e[1],e[0]),qe(e[2])]}function er(e){var t=e[0],n=e[1],r=xt(n);return[r*xt(t),r*ft(t),ft(n)]}function gs(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function ms(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function Mo(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function vs(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function Co(e){var t=_e(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}function Ao(e,t){function n(r,i){return r=e(r,i),t(r[0],r[1])}return e.invert&&t.invert&&(n.invert=function(r,i){return r=t.invert(r,i),r&&e.invert(r[0],r[1])}),n}function Do(e,t){return mt(e)>ot&&(e-=Math.round(e/oe)*oe),[e,t]}Do.invert=Do;function mh(e,t,n){return(e%=oe)?t||n?Ao(yh(e),xh(t,n)):yh(e):t||n?xh(t,n):Do}function vh(e){return function(t,n){return t+=e,mt(t)>ot&&(t-=Math.round(t/oe)*oe),[t,n]}}function yh(e){var t=vh(e);return t.invert=vh(-e),t}function xh(e,t){var n=xt(e),r=ft(e),i=xt(t),s=ft(t);function a(o,l){var c=xt(l),u=xt(o)*c,d=ft(o)*c,h=ft(l),f=h*n+u*r;return[Mn(d*i-f*s,u*n-h*r),qe(f*i+d*s)]}return a.invert=function(o,l){var c=xt(l),u=xt(o)*c,d=ft(o)*c,h=ft(l),f=h*i-d*s;return[Mn(d*i+h*s,u*n+f*r),qe(f*n-u*r)]},a}function px(e){e=mh(e[0]*Dt,e[1]*Dt,e.length>2?e[2]*Dt:0);function t(n){return n=e(n[0]*Dt,n[1]*Dt),n[0]*=Xt,n[1]*=Xt,n}return t.invert=function(n){return n=e.invert(n[0]*Dt,n[1]*Dt),n[0]*=Xt,n[1]*=Xt,n},t}function gx(e,t,n,r,i,s){if(n){var a=xt(t),o=ft(t),l=r*n;i==null?(i=t+r*oe,s=t-l/2):(i=bh(a,i),s=bh(a,s),(r>0?i<s:i>s)&&(i+=r*oe));for(var c,u=i;r>0?u>s:u<s;u-=l)c=To([a,-o*xt(u),-o*ft(u)]),e.point(c[0],c[1])}}function bh(e,t){t=er(t),t[0]-=e,Co(t);var n=fx(-t[1]);return((-t[2]<0?-n:n)+oe-gt)%oe}function Eh(){var e=[],t;return{point:function(n,r,i){t.push([n,r,i])},lineStart:function(){e.push(t=[])},lineEnd:fe,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function ys(e,t){return mt(e[0]-t[0])<gt&&mt(e[1]-t[1])<gt}function xs(e,t,n,r){this.x=e,this.z=t,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function Sh(e,t,n,r,i){var s=[],a=[],o,l;if(e.forEach(function(p){if(!((g=p.length-1)<=0)){var g,v=p[0],m=p[g],y;if(ys(v,m)){if(!v[2]&&!m[2]){for(i.lineStart(),o=0;o<g;++o)i.point((v=p[o])[0],v[1]);i.lineEnd();return}m[0]+=2*gt}s.push(y=new xs(v,p,null,!0)),a.push(y.o=new xs(v,null,y,!1)),s.push(y=new xs(m,p,null,!1)),a.push(y.o=new xs(m,null,y,!0))}}),!!s.length){for(a.sort(t),_h(s),_h(a),o=0,l=a.length;o<l;++o)a[o].e=n=!n;for(var c=s[0],u,d;;){for(var h=c,f=!0;h.v;)if((h=h.n)===c)return;u=h.z,i.lineStart();do{if(h.v=h.o.v=!0,h.e){if(f)for(o=0,l=u.length;o<l;++o)i.point((d=u[o])[0],d[1]);else r(h.x,h.n.x,1,i);h=h.n}else{if(f)for(u=h.p.z,o=u.length-1;o>=0;--o)i.point((d=u[o])[0],d[1]);else r(h.x,h.p.x,-1,i);h=h.p}h=h.o,u=h.z,f=!f}while(!h.v);i.lineEnd()}}}function _h(e){if(t=e.length){for(var t,n=0,r=e[0],i;++n<t;)r.n=i=e[n],i.p=r,r=i;r.n=i=e[0],i.p=r}}function Lo(e){return mt(e[0])<=ot?e[0]:un(e[0])*((mt(e[0])+ot)%oe-ot)}function mx(e,t){var n=Lo(t),r=t[1],i=ft(r),s=[ft(n),-xt(n),0],a=0,o=0,l=new bn;i===1?r=te+gt:i===-1&&(r=-te-gt);for(var c=0,u=e.length;c<u;++c)if(h=(d=e[c]).length)for(var d,h,f=d[h-1],p=Lo(f),g=f[1]/2+hh,v=ft(g),m=xt(g),y=0;y<h;++y,p=S,v=E,m=M,f=b){var b=d[y],S=Lo(b),_=b[1]/2+hh,E=ft(_),M=xt(_),C=S-p,G=C>=0?1:-1,I=G*C,T=I>ot,L=v*E;if(l.add(Mn(L*G*ft(I),m*M+L*xt(I))),a+=T?C+G*oe:C,T^p>=n^S>=n){var R=ms(er(f),er(b));Co(R);var k=ms(s,R);Co(k);var O=(T^C>=0?-1:1)*qe(k[2]);(r>O||r===O&&(R[0]||R[1]))&&(o+=T^C>=0?1:-1)}}return(a<-gt||a<gt&&l<-uh)^o&1}function wh(e,t,n,r){return function(i){var s=t(i),a=Eh(),o=t(a),l=!1,c,u,d,h={point:f,lineStart:g,lineEnd:v,polygonStart:function(){h.point=m,h.lineStart=y,h.lineEnd=b,u=[],c=[]},polygonEnd:function(){h.point=f,h.lineStart=g,h.lineEnd=v,u=iu(u);var S=mx(c,r);u.length?(l||(i.polygonStart(),l=!0),Sh(u,yx,S,n,i)):S&&(l||(i.polygonStart(),l=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),l&&(i.polygonEnd(),l=!1),u=c=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function f(S,_){e(S,_)&&i.point(S,_)}function p(S,_){s.point(S,_)}function g(){h.point=p,s.lineStart()}function v(){h.point=f,s.lineEnd()}function m(S,_){d.push([S,_]),o.point(S,_)}function y(){o.lineStart(),d=[]}function b(){m(d[0][0],d[0][1]),o.lineEnd();var S=o.clean(),_=a.result(),E,M=_.length,C,G,I;if(d.pop(),c.push(d),d=null,!!M){if(S&1){if(G=_[0],(C=G.length-1)>0){for(l||(i.polygonStart(),l=!0),i.lineStart(),E=0;E<C;++E)i.point((I=G[E])[0],I[1]);i.lineEnd()}return}M>1&&S&2&&_.push(_.pop().concat(_.shift())),u.push(_.filter(vx))}}return h}}function vx(e){return e.length>1}function yx(e,t){return((e=e.x)[0]<0?e[1]-te-gt:te-e[1])-((t=t.x)[0]<0?t[1]-te-gt:te-t[1])}const Oh=wh(function(){return!0},xx,Ex,[-ot,-te]);function xx(e){var t=NaN,n=NaN,r=NaN,i;return{lineStart:function(){e.lineStart(),i=1},point:function(s,a){var o=s>0?ot:-ot,l=mt(s-t);mt(l-ot)<gt?(e.point(t,n=(n+a)/2>0?te:-te),e.point(r,n),e.lineEnd(),e.lineStart(),e.point(o,n),e.point(s,n),i=0):r!==o&&l>=ot&&(mt(t-r)<gt&&(t-=r*gt),mt(s-o)<gt&&(s-=o*gt),n=bx(t,n,s,a),e.point(r,n),e.lineEnd(),e.lineStart(),e.point(o,n),i=0),e.point(t=s,n=a),r=o},lineEnd:function(){e.lineEnd(),t=n=NaN},clean:function(){return 2-i}}}function bx(e,t,n,r){var i,s,a=ft(e-n);return mt(a)>gt?dh((ft(t)*(s=xt(r))*ft(n)-ft(r)*(i=xt(t))*ft(e))/(i*s*a)):(t+r)/2}function Ex(e,t,n,r){var i;if(e==null)i=n*te,r.point(-ot,i),r.point(0,i),r.point(ot,i),r.point(ot,0),r.point(ot,-i),r.point(0,-i),r.point(-ot,-i),r.point(-ot,0),r.point(-ot,i);else if(mt(e[0]-t[0])>gt){var s=e[0]<t[0]?ot:-ot;i=n*s/2,r.point(-s,i),r.point(0,i),r.point(s,i)}else r.point(t[0],t[1])}function Sx(e){var t=xt(e),n=6*Dt,r=t>0,i=mt(t)>gt;function s(u,d,h,f){gx(f,e,n,h,u,d)}function a(u,d){return xt(u)*xt(d)>t}function o(u){var d,h,f,p,g;return{lineStart:function(){p=f=!1,g=1},point:function(v,m){var y=[v,m],b,S=a(v,m),_=r?S?0:c(v,m):S?c(v+(v<0?ot:-ot),m):0;if(!d&&(p=f=S)&&u.lineStart(),S!==f&&(b=l(d,y),(!b||ys(d,b)||ys(y,b))&&(y[2]=1)),S!==f)g=0,S?(u.lineStart(),b=l(y,d),u.point(b[0],b[1])):(b=l(d,y),u.point(b[0],b[1],2),u.lineEnd()),d=b;else if(i&&d&&r^S){var E;!(_&h)&&(E=l(y,d,!0))&&(g=0,r?(u.lineStart(),u.point(E[0][0],E[0][1]),u.point(E[1][0],E[1][1]),u.lineEnd()):(u.point(E[1][0],E[1][1]),u.lineEnd(),u.lineStart(),u.point(E[0][0],E[0][1],3)))}S&&(!d||!ys(d,y))&&u.point(y[0],y[1]),d=y,f=S,h=_},lineEnd:function(){f&&u.lineEnd(),d=null},clean:function(){return g|(p&&f)<<1}}}function l(u,d,h){var f=er(u),p=er(d),g=[1,0,0],v=ms(f,p),m=gs(v,v),y=v[0],b=m-y*y;if(!b)return!h&&u;var S=t*m/b,_=-t*y/b,E=ms(g,v),M=vs(g,S),C=vs(v,_);Mo(M,C);var G=E,I=gs(M,G),T=gs(G,G),L=I*I-T*(gs(M,M)-1);if(!(L<0)){var R=_e(L),k=vs(G,(-I-R)/T);if(Mo(k,M),k=To(k),!h)return k;var O=u[0],U=d[0],P=u[1],N=d[1],B;U<O&&(B=O,O=U,U=B);var Y=U-O,X=mt(Y-ot)<gt,J=X||Y<gt;if(!X&&N<P&&(B=P,P=N,N=B),J?X?P+N>0^k[1]<(mt(k[0]-O)<gt?P:N):P<=k[1]&&k[1]<=N:Y>ot^(O<=k[0]&&k[0]<=U)){var ct=vs(G,(-I+R)/T);return Mo(ct,M),[k,To(ct)]}}}function c(u,d){var h=r?e:ot-e,f=0;return u<-h?f|=1:u>h&&(f|=2),d<-h?f|=4:d>h&&(f|=8),f}return wh(a,o,s,r?[0,-e]:[-ot,e-ot])}function _x(e,t,n,r,i,s){var a=e[0],o=e[1],l=t[0],c=t[1],u=0,d=1,h=l-a,f=c-o,p;if(p=n-a,!(!h&&p>0)){if(p/=h,h<0){if(p<u)return;p<d&&(d=p)}else if(h>0){if(p>d)return;p>u&&(u=p)}if(p=i-a,!(!h&&p<0)){if(p/=h,h<0){if(p>d)return;p>u&&(u=p)}else if(h>0){if(p<u)return;p<d&&(d=p)}if(p=r-o,!(!f&&p>0)){if(p/=f,f<0){if(p<u)return;p<d&&(d=p)}else if(f>0){if(p>d)return;p>u&&(u=p)}if(p=s-o,!(!f&&p<0)){if(p/=f,f<0){if(p>d)return;p>u&&(u=p)}else if(f>0){if(p<u)return;p<d&&(d=p)}return u>0&&(e[0]=a+u*h,e[1]=o+u*f),d<1&&(t[0]=a+d*h,t[1]=o+d*f),!0}}}}}var Yr=1e9,bs=-Yr;function wx(e,t,n,r){function i(c,u){return e<=c&&c<=n&&t<=u&&u<=r}function s(c,u,d,h){var f=0,p=0;if(c==null||(f=a(c,d))!==(p=a(u,d))||l(c,u)<0^d>0)do h.point(f===0||f===3?e:n,f>1?r:t);while((f=(f+d+4)%4)!==p);else h.point(u[0],u[1])}function a(c,u){return mt(c[0]-e)<gt?u>0?0:3:mt(c[0]-n)<gt?u>0?2:1:mt(c[1]-t)<gt?u>0?1:0:u>0?3:2}function o(c,u){return l(c.x,u.x)}function l(c,u){var d=a(c,1),h=a(u,1);return d!==h?d-h:d===0?u[1]-c[1]:d===1?c[0]-u[0]:d===2?c[1]-u[1]:u[0]-c[0]}return function(c){var u=c,d=Eh(),h,f,p,g,v,m,y,b,S,_,E,M={point:C,lineStart:L,lineEnd:R,polygonStart:I,polygonEnd:T};function C(O,U){i(O,U)&&u.point(O,U)}function G(){for(var O=0,U=0,P=f.length;U<P;++U)for(var N=f[U],B=1,Y=N.length,X=N[0],J,ct,W=X[0],K=X[1];B<Y;++B)J=W,ct=K,X=N[B],W=X[0],K=X[1],ct<=r?K>r&&(W-J)*(r-ct)>(K-ct)*(e-J)&&++O:K<=r&&(W-J)*(r-ct)<(K-ct)*(e-J)&&--O;return O}function I(){u=d,h=[],f=[],E=!0}function T(){var O=G(),U=E&&O,P=(h=iu(h)).length;(U||P)&&(c.polygonStart(),U&&(c.lineStart(),s(null,null,1,c),c.lineEnd()),P&&Sh(h,o,O,s,c),c.polygonEnd()),u=c,h=f=p=null}function L(){M.point=k,f&&f.push(p=[]),_=!0,S=!1,y=b=NaN}function R(){h&&(k(g,v),m&&S&&d.rejoin(),h.push(d.result())),M.point=C,S&&u.lineEnd()}function k(O,U){var P=i(O,U);if(f&&p.push([O,U]),_)g=O,v=U,m=P,_=!1,P&&(u.lineStart(),u.point(O,U));else if(P&&S)u.point(O,U);else{var N=[y=Math.max(bs,Math.min(Yr,y)),b=Math.max(bs,Math.min(Yr,b))],B=[O=Math.max(bs,Math.min(Yr,O)),U=Math.max(bs,Math.min(Yr,U))];_x(N,B,e,t,n,r)?(S||(u.lineStart(),u.point(N[0],N[1])),u.point(B[0],B[1]),P||u.lineEnd(),E=!1):P&&(u.lineStart(),u.point(O,U),E=!1)}y=O,b=U,S=P}return M}}const Ro=e=>e;var Io=new bn,ko=new bn,Th,Mh,$o,Po,hn={point:fe,lineStart:fe,lineEnd:fe,polygonStart:function(){hn.lineStart=Ox,hn.lineEnd=Mx},polygonEnd:function(){hn.lineStart=hn.lineEnd=hn.point=fe,Io.add(mt(ko)),ko=new bn},result:function(){var e=Io/2;return Io=new bn,e}};function Ox(){hn.point=Tx}function Tx(e,t){hn.point=Ch,Th=$o=e,Mh=Po=t}function Ch(e,t){ko.add(Po*e-$o*t),$o=e,Po=t}function Mx(){Ch(Th,Mh)}const Ah=hn;var nr=1/0,Es=nr,qr=-nr,Ss=qr,Cx={point:Ax,lineStart:fe,lineEnd:fe,polygonStart:fe,polygonEnd:fe,result:function(){var e=[[nr,Es],[qr,Ss]];return qr=Ss=-(Es=nr=1/0),e}};function Ax(e,t){e<nr&&(nr=e),e>qr&&(qr=e),t<Es&&(Es=t),t>Ss&&(Ss=t)}const _s=Cx;var No=0,Uo=0,Xr=0,ws=0,Os=0,rr=0,Bo=0,Vo=0,jr=0,Dh,Lh,ke,$e,we={point:Cn,lineStart:Rh,lineEnd:Ih,polygonStart:function(){we.lineStart=Rx,we.lineEnd=Ix},polygonEnd:function(){we.point=Cn,we.lineStart=Rh,we.lineEnd=Ih},result:function(){var e=jr?[Bo/jr,Vo/jr]:rr?[ws/rr,Os/rr]:Xr?[No/Xr,Uo/Xr]:[NaN,NaN];return No=Uo=Xr=ws=Os=rr=Bo=Vo=jr=0,e}};function Cn(e,t){No+=e,Uo+=t,++Xr}function Rh(){we.point=Dx}function Dx(e,t){we.point=Lx,Cn(ke=e,$e=t)}function Lx(e,t){var n=e-ke,r=t-$e,i=_e(n*n+r*r);ws+=i*(ke+e)/2,Os+=i*($e+t)/2,rr+=i,Cn(ke=e,$e=t)}function Ih(){we.point=Cn}function Rx(){we.point=kx}function Ix(){kh(Dh,Lh)}function kx(e,t){we.point=kh,Cn(Dh=ke=e,Lh=$e=t)}function kh(e,t){var n=e-ke,r=t-$e,i=_e(n*n+r*r);ws+=i*(ke+e)/2,Os+=i*($e+t)/2,rr+=i,i=$e*e-ke*t,Bo+=i*(ke+e),Vo+=i*($e+t),jr+=i*3,Cn(ke=e,$e=t)}const $h=we;function Ph(e){this._context=e}Ph.prototype={_radius:4.5,pointRadius:function(e){return this._radius=e,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._context.closePath(),this._point=NaN},point:function(e,t){switch(this._point){case 0:{this._context.moveTo(e,t),this._point=1;break}case 1:{this._context.lineTo(e,t);break}default:{this._context.moveTo(e+this._radius,t),this._context.arc(e,t,this._radius,0,oe);break}}},result:fe};var Go=new bn,Ho,Nh,Uh,Zr,Kr,Ts={point:fe,lineStart:function(){Ts.point=$x},lineEnd:function(){Ho&&Bh(Nh,Uh),Ts.point=fe},polygonStart:function(){Ho=!0},polygonEnd:function(){Ho=null},result:function(){var e=+Go;return Go=new bn,e}};function $x(e,t){Ts.point=Bh,Nh=Zr=e,Uh=Kr=t}function Bh(e,t){Zr-=e,Kr-=t,Go.add(_e(Zr*Zr+Kr*Kr)),Zr=e,Kr=t}const Vh=Ts;let Gh,Ms,Hh,Fh;class zh{constructor(t){this._append=t==null?Wh:Px(t),this._radius=4.5,this._=""}pointRadius(t){return this._radius=+t,this}polygonStart(){this._line=0}polygonEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){this._line===0&&(this._+="Z"),this._point=NaN}point(t,n){switch(this._point){case 0:{this._append`M${t},${n}`,this._point=1;break}case 1:{this._append`L${t},${n}`;break}default:{if(this._append`M${t},${n}`,this._radius!==Hh||this._append!==Ms){const r=this._radius,i=this._;this._="",this._append`m0,${r}a${r},${r} 0 1,1 0,${-2*r}a${r},${r} 0 1,1 0,${2*r}z`,Hh=r,Ms=this._append,Fh=this._,this._=i}this._+=Fh;break}}}result(){const t=this._;return this._="",t.length?t:null}}function Wh(e){let t=1;this._+=e[0];for(const n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function Px(e){const t=Math.floor(e);if(!(t>=0))throw new RangeError(`invalid digits: ${e}`);if(t>15)return Wh;if(t!==Gh){const n=10**t;Gh=t,Ms=function(i){let s=1;this._+=i[0];for(const a=i.length;s<a;++s)this._+=Math.round(arguments[s]*n)/n+i[s]}}return Ms}function Nx(e,t){let n=3,r=4.5,i,s;function a(o){return o&&(typeof r=="function"&&s.pointRadius(+r.apply(this,arguments)),tr(o,i(s))),s.result()}return a.area=function(o){return tr(o,i(Ah)),Ah.result()},a.measure=function(o){return tr(o,i(Vh)),Vh.result()},a.bounds=function(o){return tr(o,i(_s)),_s.result()},a.centroid=function(o){return tr(o,i($h)),$h.result()},a.projection=function(o){return arguments.length?(i=o==null?(e=null,Ro):(e=o).stream,a):e},a.context=function(o){return arguments.length?(s=o==null?(t=null,new zh(n)):new Ph(t=o),typeof r!="function"&&s.pointRadius(r),a):t},a.pointRadius=function(o){return arguments.length?(r=typeof o=="function"?o:(s.pointRadius(+o),+o),a):r},a.digits=function(o){if(!arguments.length)return n;if(o==null)n=null;else{const l=Math.floor(o);if(!(l>=0))throw new RangeError(`invalid digits: ${o}`);n=l}return t===null&&(s=new zh(n)),a},a.projection(e).digits(n).context(t)}function Fo(e){return function(t){var n=new zo;for(var r in e)n[r]=e[r];return n.stream=t,n}}function zo(){}zo.prototype={constructor:zo,point:function(e,t){this.stream.point(e,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function Wo(e,t,n){var r=e.clipExtent&&e.clipExtent();return e.scale(150).translate([0,0]),r!=null&&e.clipExtent(null),tr(n,e.stream(_s)),t(_s.result()),r!=null&&e.clipExtent(r),e}function Yh(e,t,n){return Wo(e,function(r){var i=t[1][0]-t[0][0],s=t[1][1]-t[0][1],a=Math.min(i/(r[1][0]-r[0][0]),s/(r[1][1]-r[0][1])),o=+t[0][0]+(i-a*(r[1][0]+r[0][0]))/2,l=+t[0][1]+(s-a*(r[1][1]+r[0][1]))/2;e.scale(150*a).translate([o,l])},n)}function Ux(e,t,n){return Yh(e,[[0,0],t],n)}function Bx(e,t,n){return Wo(e,function(r){var i=+t,s=i/(r[1][0]-r[0][0]),a=(i-s*(r[1][0]+r[0][0]))/2,o=-s*r[0][1];e.scale(150*s).translate([a,o])},n)}function Vx(e,t,n){return Wo(e,function(r){var i=+t,s=i/(r[1][1]-r[0][1]),a=-s*r[0][0],o=(i-s*(r[1][1]+r[0][1]))/2;e.scale(150*s).translate([a,o])},n)}var qh=16,Gx=xt(30*Dt);function Xh(e,t){return+t?Fx(e,t):Hx(e)}function Hx(e){return Fo({point:function(t,n){t=e(t,n),this.stream.point(t[0],t[1])}})}function Fx(e,t){function n(r,i,s,a,o,l,c,u,d,h,f,p,g,v){var m=c-r,y=u-i,b=m*m+y*y;if(b>4*t&&g--){var S=a+h,_=o+f,E=l+p,M=_e(S*S+_*_+E*E),C=qe(E/=M),G=mt(mt(E)-1)<gt||mt(s-d)<gt?(s+d)/2:Mn(_,S),I=e(G,C),T=I[0],L=I[1],R=T-r,k=L-i,O=y*R-m*k;(O*O/b>t||mt((m*R+y*k)/b-.5)>.3||a*h+o*f+l*p<Gx)&&(n(r,i,s,a,o,l,T,L,G,S/=M,_/=M,E,g,v),v.point(T,L),n(T,L,G,S,_,E,c,u,d,h,f,p,g,v))}}return function(r){var i,s,a,o,l,c,u,d,h,f,p,g,v={point:m,lineStart:y,lineEnd:S,polygonStart:function(){r.polygonStart(),v.lineStart=_},polygonEnd:function(){r.polygonEnd(),v.lineStart=y}};function m(C,G){C=e(C,G),r.point(C[0],C[1])}function y(){d=NaN,v.point=b,r.lineStart()}function b(C,G){var I=er([C,G]),T=e(C,G);n(d,h,u,f,p,g,d=T[0],h=T[1],u=C,f=I[0],p=I[1],g=I[2],qh,r),r.point(d,h)}function S(){v.point=m,r.lineEnd()}function _(){y(),v.point=E,v.lineEnd=M}function E(C,G){b(i=C,G),s=d,a=h,o=f,l=p,c=g,v.point=b}function M(){n(d,h,u,f,p,g,s,a,i,o,l,c,qh,r),v.lineEnd=S,S()}return v}}var zx=Fo({point:function(e,t){this.stream.point(e*Dt,t*Dt)}});function Wx(e){return Fo({point:function(t,n){var r=e(t,n);return this.stream.point(r[0],r[1])}})}function Yx(e,t,n,r,i){function s(a,o){return a*=r,o*=i,[t+e*a,n-e*o]}return s.invert=function(a,o){return[(a-t)/e*r,(n-o)/e*i]},s}function jh(e,t,n,r,i,s){if(!s)return Yx(e,t,n,r,i);var a=xt(s),o=ft(s),l=a*e,c=o*e,u=a/e,d=o/e,h=(o*n-a*t)/e,f=(o*t+a*n)/e;function p(g,v){return g*=r,v*=i,[l*g-c*v+t,n-c*g-l*v]}return p.invert=function(g,v){return[r*(u*g-d*v+h),i*(f-d*g-u*v)]},p}function Cs(e){return Zh(function(){return e})()}function Zh(e){var t,n=150,r=480,i=250,s=0,a=0,o=0,l=0,c=0,u,d=0,h=1,f=1,p=null,g=Oh,v=null,m,y,b,S=Ro,_=.5,E,M,C,G,I;function T(O){return C(O[0]*Dt,O[1]*Dt)}function L(O){return O=C.invert(O[0],O[1]),O&&[O[0]*Xt,O[1]*Xt]}T.stream=function(O){return G&&I===O?G:G=zx(Wx(u)(g(E(S(I=O)))))},T.preclip=function(O){return arguments.length?(g=O,p=void 0,k()):g},T.postclip=function(O){return arguments.length?(S=O,v=m=y=b=null,k()):S},T.clipAngle=function(O){return arguments.length?(g=+O?Sx(p=O*Dt):(p=null,Oh),k()):p*Xt},T.clipExtent=function(O){return arguments.length?(S=O==null?(v=m=y=b=null,Ro):wx(v=+O[0][0],m=+O[0][1],y=+O[1][0],b=+O[1][1]),k()):v==null?null:[[v,m],[y,b]]},T.scale=function(O){return arguments.length?(n=+O,R()):n},T.translate=function(O){return arguments.length?(r=+O[0],i=+O[1],R()):[r,i]},T.center=function(O){return arguments.length?(s=O[0]%360*Dt,a=O[1]%360*Dt,R()):[s*Xt,a*Xt]},T.rotate=function(O){return arguments.length?(o=O[0]%360*Dt,l=O[1]%360*Dt,c=O.length>2?O[2]%360*Dt:0,R()):[o*Xt,l*Xt,c*Xt]},T.angle=function(O){return arguments.length?(d=O%360*Dt,R()):d*Xt},T.reflectX=function(O){return arguments.length?(h=O?-1:1,R()):h<0},T.reflectY=function(O){return arguments.length?(f=O?-1:1,R()):f<0},T.precision=function(O){return arguments.length?(E=Xh(M,_=O*O),k()):_e(_)},T.fitExtent=function(O,U){return Yh(T,O,U)},T.fitSize=function(O,U){return Ux(T,O,U)},T.fitWidth=function(O,U){return Bx(T,O,U)},T.fitHeight=function(O,U){return Vx(T,O,U)};function R(){var O=jh(n,0,0,h,f,d).apply(null,t(s,a)),U=jh(n,r-O[0],i-O[1],h,f,d);return u=mh(o,l,c),M=Ao(t,U),C=Ao(u,M),E=Xh(M,_),k()}function k(){return G=I=null,T}return function(){return t=e.apply(this,arguments),T.invert=t.invert&&L,R()}}function Kh(e){var t=0,n=ot/3,r=Zh(e),i=r(t,n);return i.parallels=function(s){return arguments.length?r(t=s[0]*Dt,n=s[1]*Dt):[t*Xt,n*Xt]},i}function qx(e){var t=xt(e);function n(r,i){return[r*t,ft(i)/t]}return n.invert=function(r,i){return[r/t,qe(i*t)]},n}function Xx(e,t){var n=ft(e),r=(n+ft(t))/2;if(mt(r)<gt)return qx(e);var i=1+n*(2*r-n),s=_e(i)/r;function a(o,l){var c=_e(i-2*r*ft(l))/r;return[c*ft(o*=r),s-c*xt(o)]}return a.invert=function(o,l){var c=s-l,u=Mn(o,mt(c))*un(c);return c*r<0&&(u-=ot*un(o)*un(c)),[u/r,qe((i-(o*o+c*c)*r*r)/(2*r))]},a}function Qh(){return Kh(Xx).scale(155.424).center([0,33.6442])}function jx(){return Qh().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function Yo(e,t){return[e,hx(dx((te+t)/2))]}Yo.invert=function(e,t){return[e,2*dh(ux(t))-te]};function Zx(){return Kx(Yo).scale(961/oe)}function Kx(e){var t=Cs(e),n=t.center,r=t.scale,i=t.translate,s=t.clipExtent,a=null,o,l,c;t.scale=function(d){return arguments.length?(r(d),u()):r()},t.translate=function(d){return arguments.length?(i(d),u()):i()},t.center=function(d){return arguments.length?(n(d),u()):n()},t.clipExtent=function(d){return arguments.length?(d==null?a=o=l=c=null:(a=+d[0][0],o=+d[0][1],l=+d[1][0],c=+d[1][1]),u()):a==null?null:[[a,o],[l,c]]};function u(){var d=ot*r(),h=t(px(t.rotate()).invert([0,0]));return s(a==null?[[h[0]-d,h[1]-d],[h[0]+d,h[1]+d]]:e===Yo?[[Math.max(h[0]-d,a),o],[Math.min(h[0]+d,l),c]]:[[a,Math.max(h[1]-d,o)],[l,Math.min(h[1]+d,c)]])}return u()}function As(e,t){return[e,t]}As.invert=As;function Qx(){return Cs(As).scale(152.63)}function Jx(e,t){var n=xt(e),r=e===t?ft(e):(n-xt(t))/(t-e),i=n/r+e;if(mt(r)<gt)return As;function s(a,o){var l=i-o,c=r*a;return[l*ft(c),i-l*xt(c)]}return s.invert=function(a,o){var l=i-o,c=Mn(a,mt(l))*un(l);return l*r<0&&(c-=ot*un(a)*un(l)),[c/r,i-un(r)*_e(a*a+l*l)]},s}function tb(){return Kh(Jx).scale(131.154).center([0,13.9389])}var Qr=1.340264,Jr=-.081106,ti=893e-6,ei=.003796,Ds=_e(3)/2,eb=12;function Jh(e,t){var n=qe(Ds*ft(t)),r=n*n,i=r*r*r;return[e*xt(n)/(Ds*(Qr+3*Jr*r+i*(7*ti+9*ei*r))),n*(Qr+Jr*r+i*(ti+ei*r))]}Jh.invert=function(e,t){for(var n=t,r=n*n,i=r*r*r,s=0,a,o,l;s<eb&&(o=n*(Qr+Jr*r+i*(ti+ei*r))-t,l=Qr+3*Jr*r+i*(7*ti+9*ei*r),n-=a=o/l,r=n*n,i=r*r*r,!(mt(a)<uh));++s);return[Ds*e*(Qr+3*Jr*r+i*(7*ti+9*ei*r))/xt(n),qe(ft(n)/Ds)]};function nb(){return Cs(Jh).scale(177.158)}function td(e,t){var n=t*t,r=n*n;return[e*(.8707-.131979*n+r*(-.013791+r*(.003971*n-.001529*r))),t*(1.007226+n*(.015085+r*(-.044475+.028874*n-.005916*r)))]}td.invert=function(e,t){var n=t,r=25,i;do{var s=n*n,a=s*s;n-=i=(n*(1.007226+s*(.015085+a*(-.044475+.028874*s-.005916*a)))-t)/(1.007226+s*(.015085*3+a*(-.044475*7+.028874*9*s-.005916*11*a)))}while(mt(i)>gt&&--r>0);return[e/(.8707+(s=n*n)*(-.131979+s*(-.013791+s*s*s*(.003971-.001529*s)))),n]};function rb(){return Cs(td).scale(175.295)}function ib(e,t){return e.parent===t.parent?1:2}function sb(e){return e.reduce(ab,0)/e.length}function ab(e,t){return e+t.x}function ob(e){return 1+e.reduce(lb,0)}function lb(e,t){return Math.max(e,t.y)}function cb(e){for(var t;t=e.children;)e=t[0];return e}function ub(e){for(var t;t=e.children;)e=t[t.length-1];return e}function hb(){var e=ib,t=1,n=1,r=!1;function i(s){var a,o=0;s.eachAfter(function(h){var f=h.children;f?(h.x=sb(f),h.y=ob(f)):(h.x=a?o+=e(h,a):0,h.y=0,a=h)});var l=cb(s),c=ub(s),u=l.x-e(l,c)/2,d=c.x+e(c,l)/2;return s.eachAfter(r?function(h){h.x=(h.x-s.x)*t,h.y=(s.y-h.y)*n}:function(h){h.x=(h.x-u)/(d-u)*t,h.y=(1-(s.y?h.y/s.y:1))*n})}return i.separation=function(s){return arguments.length?(e=s,i):e},i.size=function(s){return arguments.length?(r=!1,t=+s[0],n=+s[1],i):r?null:[t,n]},i.nodeSize=function(s){return arguments.length?(r=!0,t=+s[0],n=+s[1],i):r?[t,n]:null},i}function db(e){var t=0,n=e.children,r=n&&n.length;if(!r)t=1;else for(;--r>=0;)t+=n[r].value;e.value=t}function fb(){return this.eachAfter(db)}function pb(e,t){let n=-1;for(const r of this)e.call(t,r,++n,this);return this}function gb(e,t){for(var n=this,r=[n],i,s,a=-1;n=r.pop();)if(e.call(t,n,++a,this),i=n.children)for(s=i.length-1;s>=0;--s)r.push(i[s]);return this}function mb(e,t){for(var n=this,r=[n],i=[],s,a,o,l=-1;n=r.pop();)if(i.push(n),s=n.children)for(a=0,o=s.length;a<o;++a)r.push(s[a]);for(;n=i.pop();)e.call(t,n,++l,this);return this}function vb(e,t){let n=-1;for(const r of this)if(e.call(t,r,++n,this))return r}function yb(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n})}function xb(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function bb(e){for(var t=this,n=Eb(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r}function Eb(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}function Sb(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function _b(){return Array.from(this)}function wb(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function Ob(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function*Tb(){var e=this,t,n=[e],r,i,s;do for(t=n.reverse(),n=[];e=t.pop();)if(yield e,r=e.children)for(i=0,s=r.length;i<s;++i)n.push(r[i]);while(n.length)}function ni(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=Ab)):t===void 0&&(t=Cb);for(var n=new ri(e),r,i=[n],s,a,o,l;r=i.pop();)if((a=t(r.data))&&(l=(a=Array.from(a)).length))for(r.children=a,o=l-1;o>=0;--o)i.push(s=a[o]=new ri(a[o])),s.parent=r,s.depth=r.depth+1;return n.eachBefore(Lb)}function Mb(){return ni(this).eachBefore(Db)}function Cb(e){return e.children}function Ab(e){return Array.isArray(e)?e[1]:null}function Db(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function Lb(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function ri(e){this.data=e,this.depth=this.height=0,this.parent=null}ri.prototype=ni.prototype={constructor:ri,count:fb,each:pb,eachAfter:mb,eachBefore:gb,find:vb,sum:yb,sort:xb,path:bb,ancestors:Sb,descendants:_b,leaves:wb,links:Ob,copy:Mb,[Symbol.iterator]:Tb};function Rb(e){return e==null?null:ed(e)}function ed(e){if(typeof e!="function")throw new Error;return e}function An(){return 0}function ir(e){return function(){return e}}const Ib=1664525,kb=1013904223,nd=4294967296;function $b(){let e=1;return()=>(e=(Ib*e+kb)%nd)/nd}function Pb(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Nb(e,t){let n=e.length,r,i;for(;n;)i=t()*n--|0,r=e[n],e[n]=e[i],e[i]=r;return e}function Ub(e,t){for(var n=0,r=(e=Nb(Array.from(e),t)).length,i=[],s,a;n<r;)s=e[n],a&&rd(a,s)?++n:(a=Vb(i=Bb(i,s)),n=0);return a}function Bb(e,t){var n,r;if(qo(t,e))return[t];for(n=0;n<e.length;++n)if(Ls(t,e[n])&&qo(ii(e[n],t),e))return[e[n],t];for(n=0;n<e.length-1;++n)for(r=n+1;r<e.length;++r)if(Ls(ii(e[n],e[r]),t)&&Ls(ii(e[n],t),e[r])&&Ls(ii(e[r],t),e[n])&&qo(id(e[n],e[r],t),e))return[e[n],e[r],t];throw new Error}function Ls(e,t){var n=e.r-t.r,r=t.x-e.x,i=t.y-e.y;return n<0||n*n<r*r+i*i}function rd(e,t){var n=e.r-t.r+Math.max(e.r,t.r,1)*1e-9,r=t.x-e.x,i=t.y-e.y;return n>0&&n*n>r*r+i*i}function qo(e,t){for(var n=0;n<t.length;++n)if(!rd(e,t[n]))return!1;return!0}function Vb(e){switch(e.length){case 1:return Gb(e[0]);case 2:return ii(e[0],e[1]);case 3:return id(e[0],e[1],e[2])}}function Gb(e){return{x:e.x,y:e.y,r:e.r}}function ii(e,t){var n=e.x,r=e.y,i=e.r,s=t.x,a=t.y,o=t.r,l=s-n,c=a-r,u=o-i,d=Math.sqrt(l*l+c*c);return{x:(n+s+l/d*u)/2,y:(r+a+c/d*u)/2,r:(d+i+o)/2}}function id(e,t,n){var r=e.x,i=e.y,s=e.r,a=t.x,o=t.y,l=t.r,c=n.x,u=n.y,d=n.r,h=r-a,f=r-c,p=i-o,g=i-u,v=l-s,m=d-s,y=r*r+i*i-s*s,b=y-a*a-o*o+l*l,S=y-c*c-u*u+d*d,_=f*p-h*g,E=(p*S-g*b)/(_*2)-r,M=(g*v-p*m)/_,C=(f*b-h*S)/(_*2)-i,G=(h*m-f*v)/_,I=M*M+G*G-1,T=2*(s+E*M+C*G),L=E*E+C*C-s*s,R=-(Math.abs(I)>1e-6?(T+Math.sqrt(T*T-4*I*L))/(2*I):L/T);return{x:r+E+M*R,y:i+C+G*R,r:R}}function sd(e,t,n){var r=e.x-t.x,i,s,a=e.y-t.y,o,l,c=r*r+a*a;c?(s=t.r+n.r,s*=s,l=e.r+n.r,l*=l,s>l?(i=(c+l-s)/(2*c),o=Math.sqrt(Math.max(0,l/c-i*i)),n.x=e.x-i*r-o*a,n.y=e.y-i*a+o*r):(i=(c+s-l)/(2*c),o=Math.sqrt(Math.max(0,s/c-i*i)),n.x=t.x+i*r-o*a,n.y=t.y+i*a+o*r)):(n.x=t.x+n.r,n.y=t.y)}function ad(e,t){var n=e.r+t.r-1e-6,r=t.x-e.x,i=t.y-e.y;return n>0&&n*n>r*r+i*i}function od(e){var t=e._,n=e.next._,r=t.r+n.r,i=(t.x*n.r+n.x*t.r)/r,s=(t.y*n.r+n.y*t.r)/r;return i*i+s*s}function Rs(e){this._=e,this.next=null,this.previous=null}function Hb(e,t){if(!(s=(e=Pb(e)).length))return 0;var n,r,i,s,a,o,l,c,u,d,h;if(n=e[0],n.x=0,n.y=0,!(s>1))return n.r;if(r=e[1],n.x=-r.r,r.x=n.r,r.y=0,!(s>2))return n.r+r.r;sd(r,n,i=e[2]),n=new Rs(n),r=new Rs(r),i=new Rs(i),n.next=i.previous=r,r.next=n.previous=i,i.next=r.previous=n;t:for(l=3;l<s;++l){sd(n._,r._,i=e[l]),i=new Rs(i),c=r.next,u=n.previous,d=r._.r,h=n._.r;do if(d<=h){if(ad(c._,i._)){r=c,n.next=r,r.previous=n,--l;continue t}d+=c._.r,c=c.next}else{if(ad(u._,i._)){n=u,n.next=r,r.previous=n,--l;continue t}h+=u._.r,u=u.previous}while(c!==u.next);for(i.previous=n,i.next=r,n.next=r.previous=r=i,a=od(n);(i=i.next)!==r;)(o=od(i))<a&&(n=i,a=o);r=n.next}for(n=[r._],i=r;(i=i.next)!==r;)n.push(i._);for(i=Ub(n,t),l=0;l<s;++l)n=e[l],n.x-=i.x,n.y-=i.y;return i.r}function Fb(e){return Math.sqrt(e.value)}function zb(){var e=null,t=1,n=1,r=An;function i(s){const a=$b();return s.x=t/2,s.y=n/2,e?s.eachBefore(ld(e)).eachAfter(Xo(r,.5,a)).eachBefore(cd(1)):s.eachBefore(ld(Fb)).eachAfter(Xo(An,1,a)).eachAfter(Xo(r,s.r/Math.min(t,n),a)).eachBefore(cd(Math.min(t,n)/(2*s.r))),s}return i.radius=function(s){return arguments.length?(e=Rb(s),i):e},i.size=function(s){return arguments.length?(t=+s[0],n=+s[1],i):[t,n]},i.padding=function(s){return arguments.length?(r=typeof s=="function"?s:ir(+s),i):r},i}function ld(e){return function(t){t.children||(t.r=Math.max(0,+e(t)||0))}}function Xo(e,t,n){return function(r){if(i=r.children){var i,s,a=i.length,o=e(r)*t||0,l;if(o)for(s=0;s<a;++s)i[s].r+=o;if(l=Hb(i,n),o)for(s=0;s<a;++s)i[s].r-=o;r.r=l+o}}}function cd(e){return function(t){var n=t.parent;t.r*=e,n&&(t.x=n.x+e*t.x,t.y=n.y+e*t.y)}}function Wb(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function Yb(e,t,n,r,i){for(var s=e.children,a,o=-1,l=s.length,c=e.value&&(r-t)/e.value;++o<l;)a=s[o],a.y0=n,a.y1=i,a.x0=t,a.x1=t+=a.value*c}function qb(e,t){return e.parent===t.parent?1:2}function jo(e){var t=e.children;return t?t[0]:e.t}function Zo(e){var t=e.children;return t?t[t.length-1]:e.t}function Xb(e,t,n){var r=n/(t.i-e.i);t.c-=r,t.s+=n,e.c+=r,t.z+=n,t.m+=n}function jb(e){for(var t=0,n=0,r=e.children,i=r.length,s;--i>=0;)s=r[i],s.z+=t,s.m+=t,t+=s.s+(n+=s.c)}function Zb(e,t,n){return e.a.parent===t.parent?e.a:n}function Is(e,t){this._=e,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=t}Is.prototype=Object.create(ri.prototype);function Kb(e){for(var t=new Is(e,0),n,r=[t],i,s,a,o;n=r.pop();)if(s=n._.children)for(n.children=new Array(o=s.length),a=o-1;a>=0;--a)r.push(i=n.children[a]=new Is(s[a],a)),i.parent=n;return(t.parent=new Is(null,0)).children=[t],t}function Qb(){var e=qb,t=1,n=1,r=null;function i(c){var u=Kb(c);if(u.eachAfter(s),u.parent.m=-u.z,u.eachBefore(a),r)c.eachBefore(l);else{var d=c,h=c,f=c;c.eachBefore(function(y){y.x<d.x&&(d=y),y.x>h.x&&(h=y),y.depth>f.depth&&(f=y)});var p=d===h?1:e(d,h)/2,g=p-d.x,v=t/(h.x+p+g),m=n/(f.depth||1);c.eachBefore(function(y){y.x=(y.x+g)*v,y.y=y.depth*m})}return c}function s(c){var u=c.children,d=c.parent.children,h=c.i?d[c.i-1]:null;if(u){jb(c);var f=(u[0].z+u[u.length-1].z)/2;h?(c.z=h.z+e(c._,h._),c.m=c.z-f):c.z=f}else h&&(c.z=h.z+e(c._,h._));c.parent.A=o(c,h,c.parent.A||d[0])}function a(c){c._.x=c.z+c.parent.m,c.m+=c.parent.m}function o(c,u,d){if(u){for(var h=c,f=c,p=u,g=h.parent.children[0],v=h.m,m=f.m,y=p.m,b=g.m,S;p=Zo(p),h=jo(h),p&&h;)g=jo(g),f=Zo(f),f.a=c,S=p.z+y-h.z-v+e(p._,h._),S>0&&(Xb(Zb(p,c,d),c,S),v+=S,m+=S),y+=p.m,v+=h.m,b+=g.m,m+=f.m;p&&!Zo(f)&&(f.t=p,f.m+=y-m),h&&!jo(g)&&(g.t=h,g.m+=v-b,d=c)}return d}function l(c){c.x*=t,c.y=c.depth*n}return i.separation=function(c){return arguments.length?(e=c,i):e},i.size=function(c){return arguments.length?(r=!1,t=+c[0],n=+c[1],i):r?null:[t,n]},i.nodeSize=function(c){return arguments.length?(r=!0,t=+c[0],n=+c[1],i):r?[t,n]:null},i}function Jb(e,t,n,r,i){for(var s=e.children,a,o=-1,l=s.length,c=e.value&&(i-n)/e.value;++o<l;)a=s[o],a.x0=t,a.x1=r,a.y0=n,a.y1=n+=a.value*c}var tE=(1+Math.sqrt(5))/2;function eE(e,t,n,r,i,s){for(var a=[],o=t.children,l,c,u=0,d=0,h=o.length,f,p,g=t.value,v,m,y,b,S,_,E;u<h;){f=i-n,p=s-r;do v=o[d++].value;while(!v&&d<h);for(m=y=v,_=Math.max(p/f,f/p)/(g*e),E=v*v*_,S=Math.max(y/E,E/m);d<h;++d){if(v+=c=o[d].value,c<m&&(m=c),c>y&&(y=c),E=v*v*_,b=Math.max(y/E,E/m),b>S){v-=c;break}S=b}a.push(l={value:v,dice:f<p,children:o.slice(u,d)}),l.dice?Yb(l,n,r,i,g?r+=p*v/g:s):Jb(l,n,r,g?n+=f*v/g:i,s),g-=v,u=d}return a}const nE=function e(t){function n(r,i,s,a,o){eE(t,r,i,s,a,o)}return n.ratio=function(r){return e((r=+r)>1?r:1)},n}(tE);function rE(){var e=nE,t=!1,n=1,r=1,i=[0],s=An,a=An,o=An,l=An,c=An;function u(h){return h.x0=h.y0=0,h.x1=n,h.y1=r,h.eachBefore(d),i=[0],t&&h.eachBefore(Wb),h}function d(h){var f=i[h.depth],p=h.x0+f,g=h.y0+f,v=h.x1-f,m=h.y1-f;v<p&&(p=v=(p+v)/2),m<g&&(g=m=(g+m)/2),h.x0=p,h.y0=g,h.x1=v,h.y1=m,h.children&&(f=i[h.depth+1]=s(h)/2,p+=c(h)-f,g+=a(h)-f,v-=o(h)-f,m-=l(h)-f,v<p&&(p=v=(p+v)/2),m<g&&(g=m=(g+m)/2),e(h,p,g,v,m))}return u.round=function(h){return arguments.length?(t=!!h,u):t},u.size=function(h){return arguments.length?(n=+h[0],r=+h[1],u):[n,r]},u.tile=function(h){return arguments.length?(e=ed(h),u):e},u.padding=function(h){return arguments.length?u.paddingInner(h).paddingOuter(h):u.paddingInner()},u.paddingInner=function(h){return arguments.length?(s=typeof h=="function"?h:ir(+h),u):s},u.paddingOuter=function(h){return arguments.length?u.paddingTop(h).paddingRight(h).paddingBottom(h).paddingLeft(h):u.paddingTop()},u.paddingTop=function(h){return arguments.length?(a=typeof h=="function"?h:ir(+h),u):a},u.paddingRight=function(h){return arguments.length?(o=typeof h=="function"?h:ir(+h),u):o},u.paddingBottom=function(h){return arguments.length?(l=typeof h=="function"?h:ir(+h),u):l},u.paddingLeft=function(h){return arguments.length?(c=typeof h=="function"?h:ir(+h),u):c},u}function sr(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}const ud=Symbol("implicit");function ks(){var e=new tu,t=[],n=[],r=ud;function i(s){let a=e.get(s);if(a===void 0){if(r!==ud)return r;e.set(s,a=t.push(s)-1)}return n[a%n.length]}return i.domain=function(s){if(!arguments.length)return t.slice();t=[],e=new tu;for(const a of s)e.has(a)||e.set(a,t.push(a)-1);return i},i.range=function(s){return arguments.length?(n=Array.from(s),i):n.slice()},i.unknown=function(s){return arguments.length?(r=s,i):r},i.copy=function(){return ks(t,n).unknown(r)},sr.apply(i,arguments),i}function si(){var e=ks().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,s,a,o=!1,l=0,c=0,u=.5;delete e.unknown;function d(){var h=t().length,f=i<r,p=f?i:r,g=f?r:i;s=(g-p)/Math.max(1,h-l+c*2),o&&(s=Math.floor(s)),p+=(g-p-s*(h-l))*u,a=s*(1-l),o&&(p=Math.round(p),a=Math.round(a));var v=hv(h).map(function(m){return p+s*m});return n(f?v.reverse():v)}return e.domain=function(h){return arguments.length?(t(h),d()):t()},e.range=function(h){return arguments.length?([r,i]=h,r=+r,i=+i,d()):[r,i]},e.rangeRound=function(h){return[r,i]=h,r=+r,i=+i,o=!0,d()},e.bandwidth=function(){return a},e.step=function(){return s},e.round=function(h){return arguments.length?(o=!!h,d()):o},e.padding=function(h){return arguments.length?(l=Math.min(1,c=+h),d()):l},e.paddingInner=function(h){return arguments.length?(l=Math.min(1,h),d()):l},e.paddingOuter=function(h){return arguments.length?(c=+h,d()):c},e.align=function(h){return arguments.length?(u=Math.max(0,Math.min(1,h)),d()):u},e.copy=function(){return si(t(),[r,i]).round(o).paddingInner(l).paddingOuter(c).align(u)},sr.apply(d(),arguments)}function iE(e){return function(){return e}}function sE(e){return+e}var hd=[0,1];function ar(e){return e}function Ko(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:iE(isNaN(t)?NaN:.5)}function aE(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function oE(e,t,n){var r=e[0],i=e[1],s=t[0],a=t[1];return i<r?(r=Ko(i,r),s=n(a,s)):(r=Ko(r,i),s=n(s,a)),function(o){return s(r(o))}}function lE(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),s=new Array(r),a=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<r;)i[a]=Ko(e[a],e[a+1]),s[a]=n(t[a],t[a+1]);return function(o){var l=Ha(e,o,1,r)-1;return s[l](i[l](o))}}function Qo(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function dd(){var e=hd,t=hd,n=Vr,r,i,s,a=ar,o,l,c;function u(){var h=Math.min(e.length,t.length);return a!==ar&&(a=aE(e[0],e[h-1])),o=h>2?lE:oE,l=c=null,d}function d(h){return h==null||isNaN(h=+h)?s:(l||(l=o(e.map(r),t,n)))(r(a(h)))}return d.invert=function(h){return a(i((c||(c=o(t,e.map(r),ae)))(h)))},d.domain=function(h){return arguments.length?(e=Array.from(h,sE),u()):e.slice()},d.range=function(h){return arguments.length?(t=Array.from(h),u()):t.slice()},d.rangeRound=function(h){return t=Array.from(h),n=Iu,u()},d.clamp=function(h){return arguments.length?(a=h?!0:ar,u()):a!==ar},d.interpolate=function(h){return arguments.length?(n=h,u()):n},d.unknown=function(h){return arguments.length?(s=h,d):s},function(h,f){return r=h,i=f,u()}}function fd(){return dd()(ar,ar)}function cE(e,t,n,r){var i=za(e,t,n),s;switch(r=Wr(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(s=lx(i,a))&&(r.precision=s),ch(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(s=cx(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=s-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(s=ox(i))&&(r.precision=s-(r.type==="%")*2);break}}return wo(r)}function pd(e){var t=e.domain;return e.ticks=function(n){var r=t();return zi(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return cE(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,s=r.length-1,a=r[i],o=r[s],l,c,u=10;for(o<a&&(c=a,a=o,o=c,c=i,i=s,s=c);u-- >0;){if(c=qn(a,o,n),c===l)return r[i]=a,r[s]=o,t(r);if(c>0)a=Math.floor(a/c)*c,o=Math.ceil(o/c)*c;else if(c<0)a=Math.ceil(a*c)/c,o=Math.floor(o*c)/c;else break;l=c}return e},e}function Oe(){var e=fd();return e.copy=function(){return Qo(e,Oe())},sr.apply(e,arguments),pd(e)}function gd(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],s=e[r],a;return s<i&&(a=n,n=r,r=a,a=i,i=s,s=a),e[n]=t.floor(i),e[r]=t.ceil(s),e}function md(e){return Math.log(e)}function vd(e){return Math.exp(e)}function uE(e){return-Math.log(-e)}function hE(e){return-Math.exp(-e)}function dE(e){return isFinite(e)?+("1e"+e):e<0?0:e}function fE(e){return e===10?dE:e===Math.E?Math.exp:t=>Math.pow(e,t)}function pE(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function yd(e){return(t,n)=>-e(-t,n)}function gE(e){const t=e(md,vd),n=t.domain;let r=10,i,s;function a(){return i=pE(r),s=fE(r),n()[0]<0?(i=yd(i),s=yd(s),e(uE,hE)):e(md,vd),t}return t.base=function(o){return arguments.length?(r=+o,a()):r},t.domain=function(o){return arguments.length?(n(o),a()):n()},t.ticks=o=>{const l=n();let c=l[0],u=l[l.length-1];const d=u<c;d&&([c,u]=[u,c]);let h=i(c),f=i(u),p,g;const v=o==null?10:+o;let m=[];if(!(r%1)&&f-h<v){if(h=Math.floor(h),f=Math.ceil(f),c>0){for(;h<=f;++h)for(p=1;p<r;++p)if(g=h<0?p/s(-h):p*s(h),!(g<c)){if(g>u)break;m.push(g)}}else for(;h<=f;++h)for(p=r-1;p>=1;--p)if(g=h>0?p/s(-h):p*s(h),!(g<c)){if(g>u)break;m.push(g)}m.length*2<v&&(m=zi(c,u,v))}else m=zi(h,f,Math.min(f-h,v)).map(s);return d?m.reverse():m},t.tickFormat=(o,l)=>{if(o==null&&(o=10),l==null&&(l=r===10?"s":","),typeof l!="function"&&(!(r%1)&&(l=Wr(l)).precision==null&&(l.trim=!0),l=wo(l)),o===1/0)return l;const c=Math.max(1,r*o/t.ticks().length);return u=>{let d=u/s(Math.round(i(u)));return d*r<r-.5&&(d*=r),d<=c?l(u):""}},t.nice=()=>n(gd(n(),{floor:o=>s(Math.floor(i(o))),ceil:o=>s(Math.ceil(i(o)))})),t}function xd(){const e=gE(dd()).domain([1,10]);return e.copy=()=>Qo(e,xd()).base(e.base()),sr.apply(e,arguments),e}function Jo(){var e=0,t=1,n=1,r=[.5],i=[0,1],s;function a(l){return l!=null&&l<=l?i[Ha(r,l,0,n)]:s}function o(){var l=-1;for(r=new Array(n);++l<n;)r[l]=((l+1)*t-(l-n)*e)/(n+1);return a}return a.domain=function(l){return arguments.length?([e,t]=l,e=+e,t=+t,o()):[e,t]},a.range=function(l){return arguments.length?(n=(i=Array.from(l)).length-1,o()):i.slice()},a.invertExtent=function(l){var c=i.indexOf(l);return c<0?[NaN,NaN]:c<1?[e,r[0]]:c>=n?[r[n-1],t]:[r[c-1],r[c]]},a.unknown=function(l){return arguments.length&&(s=l),a},a.thresholds=function(){return r.slice()},a.copy=function(){return Jo().domain([e,t]).range(i).unknown(s)},sr.apply(pd(a),arguments)}const tl=new Date,el=new Date;function Pt(e,t,n,r){function i(s){return e(s=arguments.length===0?new Date:new Date(+s)),s}return i.floor=s=>(e(s=new Date(+s)),s),i.ceil=s=>(e(s=new Date(s-1)),t(s,1),e(s),s),i.round=s=>{const a=i(s),o=i.ceil(s);return s-a<o-s?a:o},i.offset=(s,a)=>(t(s=new Date(+s),a==null?1:Math.floor(a)),s),i.range=(s,a,o)=>{const l=[];if(s=i.ceil(s),o=o==null?1:Math.floor(o),!(s<a)||!(o>0))return l;let c;do l.push(c=new Date(+s)),t(s,o),e(s);while(c<s&&s<a);return l},i.filter=s=>Pt(a=>{if(a>=a)for(;e(a),!s(a);)a.setTime(a-1)},(a,o)=>{if(a>=a)if(o<0)for(;++o<=0;)for(;t(a,-1),!s(a););else for(;--o>=0;)for(;t(a,1),!s(a););}),n&&(i.count=(s,a)=>(tl.setTime(+s),el.setTime(+a),e(tl),e(el),Math.floor(n(tl,el))),i.every=s=>(s=Math.floor(s),!isFinite(s)||!(s>0)?null:s>1?i.filter(r?a=>r(a)%s===0:a=>i.count(0,a)%s===0):i)),i}const $s=Pt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);$s.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Pt(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):$s),$s.range;const Xe=1e3,pe=Xe*60,je=pe*60,Ze=je*24,nl=Ze*7,bd=Ze*30,rl=Ze*365,or=Pt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Xe)},(e,t)=>(t-e)/Xe,e=>e.getUTCSeconds());or.range;const il=Pt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Xe)},(e,t)=>{e.setTime(+e+t*pe)},(e,t)=>(t-e)/pe,e=>e.getMinutes());il.range,Pt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*pe)},(e,t)=>(t-e)/pe,e=>e.getUTCMinutes()).range;const sl=Pt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Xe-e.getMinutes()*pe)},(e,t)=>{e.setTime(+e+t*je)},(e,t)=>(t-e)/je,e=>e.getHours());sl.range,Pt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*je)},(e,t)=>(t-e)/je,e=>e.getUTCHours()).range;const ai=Pt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*pe)/Ze,e=>e.getDate()-1);ai.range;const al=Pt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Ze,e=>e.getUTCDate()-1);al.range,Pt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Ze,e=>Math.floor(e/Ze)).range;function Dn(e){return Pt(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*pe)/nl)}const Ps=Dn(0),Ns=Dn(1),mE=Dn(2),vE=Dn(3),lr=Dn(4),yE=Dn(5),xE=Dn(6);Ps.range,Ns.range,mE.range,vE.range,lr.range,yE.range,xE.range;function Ln(e){return Pt(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/nl)}const Ed=Ln(0),Us=Ln(1),bE=Ln(2),EE=Ln(3),cr=Ln(4),SE=Ln(5),_E=Ln(6);Ed.range,Us.range,bE.range,EE.range,cr.range,SE.range,_E.range;const ol=Pt(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());ol.range,Pt(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth()).range;const Ke=Pt(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());Ke.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Pt(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)}),Ke.range;const Rn=Pt(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());Rn.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Pt(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)}),Rn.range;function wE(e,t,n,r,i,s){const a=[[or,1,Xe],[or,5,5*Xe],[or,15,15*Xe],[or,30,30*Xe],[s,1,pe],[s,5,5*pe],[s,15,15*pe],[s,30,30*pe],[i,1,je],[i,3,3*je],[i,6,6*je],[i,12,12*je],[r,1,Ze],[r,2,2*Ze],[n,1,nl],[t,1,bd],[t,3,3*bd],[e,1,rl]];function o(c,u,d){const h=u<c;h&&([c,u]=[u,c]);const f=d&&typeof d.range=="function"?d:l(c,u,d),p=f?f.range(c,+u+1):[];return h?p.reverse():p}function l(c,u,d){const h=Math.abs(u-c)/d,f=Ga(([,,v])=>v).right(a,h);if(f===a.length)return e.every(za(c/rl,u/rl,d));if(f===0)return $s.every(Math.max(za(c,u,d),1));const[p,g]=a[h/a[f-1][2]<a[f][2]/h?f-1:f];return p.every(g)}return[o,l]}const[OE,TE]=wE(Ke,ol,Ps,ai,sl,il);function ll(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function cl(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function oi(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function ME(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,s=e.days,a=e.shortDays,o=e.months,l=e.shortMonths,c=li(i),u=ci(i),d=li(s),h=ci(s),f=li(a),p=ci(a),g=li(o),v=ci(o),m=li(l),y=ci(l),b={a:P,A:N,b:B,B:Y,c:null,d:Md,e:Md,f:ZE,g:aS,G:lS,H:qE,I:XE,j:jE,L:Cd,m:KE,M:QE,p:X,q:J,Q:kd,s:$d,S:JE,u:tS,U:eS,V:nS,w:rS,W:iS,x:null,X:null,y:sS,Y:oS,Z:cS,"%":Id},S={a:ct,A:W,b:K,B:ut,c:null,d:Dd,e:Dd,f:fS,g:_S,G:OS,H:uS,I:hS,j:dS,L:Ld,m:pS,M:gS,p:rt,q:Tt,Q:kd,s:$d,S:mS,u:vS,U:yS,V:xS,w:bS,W:ES,x:null,X:null,y:SS,Y:wS,Z:TS,"%":Id},_={a:I,A:T,b:L,B:R,c:k,d:Od,e:Od,f:FE,g:wd,G:_d,H:Td,I:Td,j:BE,L:HE,m:UE,M:VE,p:G,q:NE,Q:WE,s:YE,S:GE,u:RE,U:IE,V:kE,w:LE,W:$E,x:O,X:U,y:wd,Y:_d,Z:PE,"%":zE};b.x=E(n,b),b.X=E(r,b),b.c=E(t,b),S.x=E(n,S),S.X=E(r,S),S.c=E(t,S);function E(q,V){return function(H){var $=[],pt=-1,yt=0,Kt=q.length,Qt,et,Rt;for(H instanceof Date||(H=new Date(+H));++pt<Kt;)q.charCodeAt(pt)===37&&($.push(q.slice(yt,pt)),(et=Sd[Qt=q.charAt(++pt)])!=null?Qt=q.charAt(++pt):et=Qt==="e"?" ":"0",(Rt=V[Qt])&&(Qt=Rt(H,et)),$.push(Qt),yt=pt+1);return $.push(q.slice(yt,pt)),$.join("")}}function M(q,V){return function(H){var $=oi(1900,void 0,1),pt=C($,q,H+="",0),yt,Kt;if(pt!=H.length)return null;if("Q"in $)return new Date($.Q);if("s"in $)return new Date($.s*1e3+("L"in $?$.L:0));if(V&&!("Z"in $)&&($.Z=0),"p"in $&&($.H=$.H%12+$.p*12),$.m===void 0&&($.m="q"in $?$.q:0),"V"in $){if($.V<1||$.V>53)return null;"w"in $||($.w=1),"Z"in $?(yt=cl(oi($.y,0,1)),Kt=yt.getUTCDay(),yt=Kt>4||Kt===0?Us.ceil(yt):Us(yt),yt=al.offset(yt,($.V-1)*7),$.y=yt.getUTCFullYear(),$.m=yt.getUTCMonth(),$.d=yt.getUTCDate()+($.w+6)%7):(yt=ll(oi($.y,0,1)),Kt=yt.getDay(),yt=Kt>4||Kt===0?Ns.ceil(yt):Ns(yt),yt=ai.offset(yt,($.V-1)*7),$.y=yt.getFullYear(),$.m=yt.getMonth(),$.d=yt.getDate()+($.w+6)%7)}else("W"in $||"U"in $)&&("w"in $||($.w="u"in $?$.u%7:"W"in $?1:0),Kt="Z"in $?cl(oi($.y,0,1)).getUTCDay():ll(oi($.y,0,1)).getDay(),$.m=0,$.d="W"in $?($.w+6)%7+$.W*7-(Kt+5)%7:$.w+$.U*7-(Kt+6)%7);return"Z"in $?($.H+=$.Z/100|0,$.M+=$.Z%100,cl($)):ll($)}}function C(q,V,H,$){for(var pt=0,yt=V.length,Kt=H.length,Qt,et;pt<yt;){if($>=Kt)return-1;if(Qt=V.charCodeAt(pt++),Qt===37){if(Qt=V.charAt(pt++),et=_[Qt in Sd?V.charAt(pt++):Qt],!et||($=et(q,H,$))<0)return-1}else if(Qt!=H.charCodeAt($++))return-1}return $}function G(q,V,H){var $=c.exec(V.slice(H));return $?(q.p=u.get($[0].toLowerCase()),H+$[0].length):-1}function I(q,V,H){var $=f.exec(V.slice(H));return $?(q.w=p.get($[0].toLowerCase()),H+$[0].length):-1}function T(q,V,H){var $=d.exec(V.slice(H));return $?(q.w=h.get($[0].toLowerCase()),H+$[0].length):-1}function L(q,V,H){var $=m.exec(V.slice(H));return $?(q.m=y.get($[0].toLowerCase()),H+$[0].length):-1}function R(q,V,H){var $=g.exec(V.slice(H));return $?(q.m=v.get($[0].toLowerCase()),H+$[0].length):-1}function k(q,V,H){return C(q,t,V,H)}function O(q,V,H){return C(q,n,V,H)}function U(q,V,H){return C(q,r,V,H)}function P(q){return a[q.getDay()]}function N(q){return s[q.getDay()]}function B(q){return l[q.getMonth()]}function Y(q){return o[q.getMonth()]}function X(q){return i[+(q.getHours()>=12)]}function J(q){return 1+~~(q.getMonth()/3)}function ct(q){return a[q.getUTCDay()]}function W(q){return s[q.getUTCDay()]}function K(q){return l[q.getUTCMonth()]}function ut(q){return o[q.getUTCMonth()]}function rt(q){return i[+(q.getUTCHours()>=12)]}function Tt(q){return 1+~~(q.getUTCMonth()/3)}return{format:function(q){var V=E(q+="",b);return V.toString=function(){return q},V},parse:function(q){var V=M(q+="",!1);return V.toString=function(){return q},V},utcFormat:function(q){var V=E(q+="",S);return V.toString=function(){return q},V},utcParse:function(q){var V=M(q+="",!0);return V.toString=function(){return q},V}}}var Sd={"-":"",_:" ",0:"0"},Bt=/^\s*\d+/,CE=/^%/,AE=/[\\^$*+?|[\]().{}]/g;function ht(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",s=i.length;return r+(s<n?new Array(n-s+1).join(t)+i:i)}function DE(e){return e.replace(AE,"\\$&")}function li(e){return new RegExp("^(?:"+e.map(DE).join("|")+")","i")}function ci(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function LE(e,t,n){var r=Bt.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function RE(e,t,n){var r=Bt.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function IE(e,t,n){var r=Bt.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function kE(e,t,n){var r=Bt.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function $E(e,t,n){var r=Bt.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function _d(e,t,n){var r=Bt.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function wd(e,t,n){var r=Bt.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function PE(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function NE(e,t,n){var r=Bt.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function UE(e,t,n){var r=Bt.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function Od(e,t,n){var r=Bt.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function BE(e,t,n){var r=Bt.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function Td(e,t,n){var r=Bt.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function VE(e,t,n){var r=Bt.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function GE(e,t,n){var r=Bt.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function HE(e,t,n){var r=Bt.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function FE(e,t,n){var r=Bt.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function zE(e,t,n){var r=CE.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function WE(e,t,n){var r=Bt.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function YE(e,t,n){var r=Bt.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function Md(e,t){return ht(e.getDate(),t,2)}function qE(e,t){return ht(e.getHours(),t,2)}function XE(e,t){return ht(e.getHours()%12||12,t,2)}function jE(e,t){return ht(1+ai.count(Ke(e),e),t,3)}function Cd(e,t){return ht(e.getMilliseconds(),t,3)}function ZE(e,t){return Cd(e,t)+"000"}function KE(e,t){return ht(e.getMonth()+1,t,2)}function QE(e,t){return ht(e.getMinutes(),t,2)}function JE(e,t){return ht(e.getSeconds(),t,2)}function tS(e){var t=e.getDay();return t===0?7:t}function eS(e,t){return ht(Ps.count(Ke(e)-1,e),t,2)}function Ad(e){var t=e.getDay();return t>=4||t===0?lr(e):lr.ceil(e)}function nS(e,t){return e=Ad(e),ht(lr.count(Ke(e),e)+(Ke(e).getDay()===4),t,2)}function rS(e){return e.getDay()}function iS(e,t){return ht(Ns.count(Ke(e)-1,e),t,2)}function sS(e,t){return ht(e.getFullYear()%100,t,2)}function aS(e,t){return e=Ad(e),ht(e.getFullYear()%100,t,2)}function oS(e,t){return ht(e.getFullYear()%1e4,t,4)}function lS(e,t){var n=e.getDay();return e=n>=4||n===0?lr(e):lr.ceil(e),ht(e.getFullYear()%1e4,t,4)}function cS(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+ht(t/60|0,"0",2)+ht(t%60,"0",2)}function Dd(e,t){return ht(e.getUTCDate(),t,2)}function uS(e,t){return ht(e.getUTCHours(),t,2)}function hS(e,t){return ht(e.getUTCHours()%12||12,t,2)}function dS(e,t){return ht(1+al.count(Rn(e),e),t,3)}function Ld(e,t){return ht(e.getUTCMilliseconds(),t,3)}function fS(e,t){return Ld(e,t)+"000"}function pS(e,t){return ht(e.getUTCMonth()+1,t,2)}function gS(e,t){return ht(e.getUTCMinutes(),t,2)}function mS(e,t){return ht(e.getUTCSeconds(),t,2)}function vS(e){var t=e.getUTCDay();return t===0?7:t}function yS(e,t){return ht(Ed.count(Rn(e)-1,e),t,2)}function Rd(e){var t=e.getUTCDay();return t>=4||t===0?cr(e):cr.ceil(e)}function xS(e,t){return e=Rd(e),ht(cr.count(Rn(e),e)+(Rn(e).getUTCDay()===4),t,2)}function bS(e){return e.getUTCDay()}function ES(e,t){return ht(Us.count(Rn(e)-1,e),t,2)}function SS(e,t){return ht(e.getUTCFullYear()%100,t,2)}function _S(e,t){return e=Rd(e),ht(e.getUTCFullYear()%100,t,2)}function wS(e,t){return ht(e.getUTCFullYear()%1e4,t,4)}function OS(e,t){var n=e.getUTCDay();return e=n>=4||n===0?cr(e):cr.ceil(e),ht(e.getUTCFullYear()%1e4,t,4)}function TS(){return"+0000"}function Id(){return"%"}function kd(e){return+e}function $d(e){return Math.floor(+e/1e3)}var ur,Pd;MS({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function MS(e){return ur=ME(e),Pd=ur.format,ur.parse,ur.utcFormat,ur.utcParse,ur}function CS(e){return new Date(e)}function AS(e){return e instanceof Date?+e:+new Date(+e)}function Nd(e,t,n,r,i,s,a,o,l,c){var u=fd(),d=u.invert,h=u.domain,f=c(".%L"),p=c(":%S"),g=c("%I:%M"),v=c("%I %p"),m=c("%a %d"),y=c("%b %d"),b=c("%B"),S=c("%Y");function _(E){return(l(E)<E?f:o(E)<E?p:a(E)<E?g:s(E)<E?v:r(E)<E?i(E)<E?m:y:n(E)<E?b:S)(E)}return u.invert=function(E){return new Date(d(E))},u.domain=function(E){return arguments.length?h(Array.from(E,AS)):h().map(CS)},u.ticks=function(E){var M=h();return e(M[0],M[M.length-1],E??10)},u.tickFormat=function(E,M){return M==null?_:c(M)},u.nice=function(E){var M=h();return(!E||typeof E.range!="function")&&(E=t(M[0],M[M.length-1],E??10)),E?h(gd(M,E)):u},u.copy=function(){return Qo(u,Nd(e,t,n,r,i,s,a,o,l,c))},u}function Ud(){return sr.apply(Nd(OE,TE,Ke,ol,Ps,ai,sl,il,or,Pd).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function at(e){return function(){return e}}const Bd=Math.abs,Wt=Math.atan2,In=Math.cos,DS=Math.max,ul=Math.min,Pe=Math.sin,hr=Math.sqrt,Yt=1e-12,ui=Math.PI,Bs=ui/2,Vs=2*ui;function LS(e){return e>1?0:e<-1?ui:Math.acos(e)}function Vd(e){return e>=1?Bs:e<=-1?-Bs:Math.asin(e)}function Gs(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new Q1(t)}function RS(e){return e.innerRadius}function IS(e){return e.outerRadius}function kS(e){return e.startAngle}function $S(e){return e.endAngle}function PS(e){return e&&e.padAngle}function NS(e,t,n,r,i,s,a,o){var l=n-e,c=r-t,u=a-i,d=o-s,h=d*l-u*c;if(!(h*h<Yt))return h=(u*(t-s)-d*(e-i))/h,[e+h*l,t+h*c]}function Hs(e,t,n,r,i,s,a){var o=e-n,l=t-r,c=(a?s:-s)/hr(o*o+l*l),u=c*l,d=-c*o,h=e+u,f=t+d,p=n+u,g=r+d,v=(h+p)/2,m=(f+g)/2,y=p-h,b=g-f,S=y*y+b*b,_=i-s,E=h*g-p*f,M=(b<0?-1:1)*hr(DS(0,_*_*S-E*E)),C=(E*b-y*M)/S,G=(-E*y-b*M)/S,I=(E*b+y*M)/S,T=(-E*y+b*M)/S,L=C-v,R=G-m,k=I-v,O=T-m;return L*L+R*R>k*k+O*O&&(C=I,G=T),{cx:C,cy:G,x01:-u,y01:-d,x11:C*(i/_-1),y11:G*(i/_-1)}}function hi(){var e=RS,t=IS,n=at(0),r=null,i=kS,s=$S,a=PS,o=null,l=Gs(c);function c(){var u,d,h=+e.apply(this,arguments),f=+t.apply(this,arguments),p=i.apply(this,arguments)-Bs,g=s.apply(this,arguments)-Bs,v=Bd(g-p),m=g>p;if(o||(o=u=l()),f<h&&(d=f,f=h,h=d),!(f>Yt))o.moveTo(0,0);else if(v>Vs-Yt)o.moveTo(f*In(p),f*Pe(p)),o.arc(0,0,f,p,g,!m),h>Yt&&(o.moveTo(h*In(g),h*Pe(g)),o.arc(0,0,h,g,p,m));else{var y=p,b=g,S=p,_=g,E=v,M=v,C=a.apply(this,arguments)/2,G=C>Yt&&(r?+r.apply(this,arguments):hr(h*h+f*f)),I=ul(Bd(f-h)/2,+n.apply(this,arguments)),T=I,L=I,R,k;if(G>Yt){var O=Vd(G/h*Pe(C)),U=Vd(G/f*Pe(C));(E-=O*2)>Yt?(O*=m?1:-1,S+=O,_-=O):(E=0,S=_=(p+g)/2),(M-=U*2)>Yt?(U*=m?1:-1,y+=U,b-=U):(M=0,y=b=(p+g)/2)}var P=f*In(y),N=f*Pe(y),B=h*In(_),Y=h*Pe(_);if(I>Yt){var X=f*In(b),J=f*Pe(b),ct=h*In(S),W=h*Pe(S),K;if(v<ui)if(K=NS(P,N,ct,W,X,J,B,Y)){var ut=P-K[0],rt=N-K[1],Tt=X-K[0],q=J-K[1],V=1/Pe(LS((ut*Tt+rt*q)/(hr(ut*ut+rt*rt)*hr(Tt*Tt+q*q)))/2),H=hr(K[0]*K[0]+K[1]*K[1]);T=ul(I,(h-H)/(V-1)),L=ul(I,(f-H)/(V+1))}else T=L=0}M>Yt?L>Yt?(R=Hs(ct,W,P,N,f,L,m),k=Hs(X,J,B,Y,f,L,m),o.moveTo(R.cx+R.x01,R.cy+R.y01),L<I?o.arc(R.cx,R.cy,L,Wt(R.y01,R.x01),Wt(k.y01,k.x01),!m):(o.arc(R.cx,R.cy,L,Wt(R.y01,R.x01),Wt(R.y11,R.x11),!m),o.arc(0,0,f,Wt(R.cy+R.y11,R.cx+R.x11),Wt(k.cy+k.y11,k.cx+k.x11),!m),o.arc(k.cx,k.cy,L,Wt(k.y11,k.x11),Wt(k.y01,k.x01),!m))):(o.moveTo(P,N),o.arc(0,0,f,y,b,!m)):o.moveTo(P,N),!(h>Yt)||!(E>Yt)?o.lineTo(B,Y):T>Yt?(R=Hs(B,Y,X,J,h,-T,m),k=Hs(P,N,ct,W,h,-T,m),o.lineTo(R.cx+R.x01,R.cy+R.y01),T<I?o.arc(R.cx,R.cy,T,Wt(R.y01,R.x01),Wt(k.y01,k.x01),!m):(o.arc(R.cx,R.cy,T,Wt(R.y01,R.x01),Wt(R.y11,R.x11),!m),o.arc(0,0,h,Wt(R.cy+R.y11,R.cx+R.x11),Wt(k.cy+k.y11,k.cx+k.x11),m),o.arc(k.cx,k.cy,T,Wt(k.y11,k.x11),Wt(k.y01,k.x01),!m))):o.arc(0,0,h,_,S,m)}if(o.closePath(),u)return o=null,u+""||null}return c.centroid=function(){var u=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,d=(+i.apply(this,arguments)+ +s.apply(this,arguments))/2-ui/2;return[In(d)*u,Pe(d)*u]},c.innerRadius=function(u){return arguments.length?(e=typeof u=="function"?u:at(+u),c):e},c.outerRadius=function(u){return arguments.length?(t=typeof u=="function"?u:at(+u),c):t},c.cornerRadius=function(u){return arguments.length?(n=typeof u=="function"?u:at(+u),c):n},c.padRadius=function(u){return arguments.length?(r=u==null?null:typeof u=="function"?u:at(+u),c):r},c.startAngle=function(u){return arguments.length?(i=typeof u=="function"?u:at(+u),c):i},c.endAngle=function(u){return arguments.length?(s=typeof u=="function"?u:at(+u),c):s},c.padAngle=function(u){return arguments.length?(a=typeof u=="function"?u:at(+u),c):a},c.context=function(u){return arguments.length?(o=u??null,c):o},c}var US=Array.prototype.slice;function Fs(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Gd(e){this._context=e}Gd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function zs(e){return new Gd(e)}function hl(e){return e[0]}function dl(e){return e[1]}function di(e,t){var n=at(!0),r=null,i=zs,s=null,a=Gs(o);e=typeof e=="function"?e:e===void 0?hl:at(e),t=typeof t=="function"?t:t===void 0?dl:at(t);function o(l){var c,u=(l=Fs(l)).length,d,h=!1,f;for(r==null&&(s=i(f=a())),c=0;c<=u;++c)!(c<u&&n(d=l[c],c,l))===h&&((h=!h)?s.lineStart():s.lineEnd()),h&&s.point(+e(d,c,l),+t(d,c,l));if(f)return s=null,f+""||null}return o.x=function(l){return arguments.length?(e=typeof l=="function"?l:at(+l),o):e},o.y=function(l){return arguments.length?(t=typeof l=="function"?l:at(+l),o):t},o.defined=function(l){return arguments.length?(n=typeof l=="function"?l:at(!!l),o):n},o.curve=function(l){return arguments.length?(i=l,r!=null&&(s=i(r)),o):i},o.context=function(l){return arguments.length?(l==null?r=s=null:s=i(r=l),o):r},o}function fl(e,t,n){var r=null,i=at(!0),s=null,a=zs,o=null,l=Gs(c);e=typeof e=="function"?e:e===void 0?hl:at(+e),t=typeof t=="function"?t:at(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?dl:at(+n);function c(d){var h,f,p,g=(d=Fs(d)).length,v,m=!1,y,b=new Array(g),S=new Array(g);for(s==null&&(o=a(y=l())),h=0;h<=g;++h){if(!(h<g&&i(v=d[h],h,d))===m)if(m=!m)f=h,o.areaStart(),o.lineStart();else{for(o.lineEnd(),o.lineStart(),p=h-1;p>=f;--p)o.point(b[p],S[p]);o.lineEnd(),o.areaEnd()}m&&(b[h]=+e(v,h,d),S[h]=+t(v,h,d),o.point(r?+r(v,h,d):b[h],n?+n(v,h,d):S[h]))}if(y)return o=null,y+""||null}function u(){return di().defined(i).curve(a).context(s)}return c.x=function(d){return arguments.length?(e=typeof d=="function"?d:at(+d),r=null,c):e},c.x0=function(d){return arguments.length?(e=typeof d=="function"?d:at(+d),c):e},c.x1=function(d){return arguments.length?(r=d==null?null:typeof d=="function"?d:at(+d),c):r},c.y=function(d){return arguments.length?(t=typeof d=="function"?d:at(+d),n=null,c):t},c.y0=function(d){return arguments.length?(t=typeof d=="function"?d:at(+d),c):t},c.y1=function(d){return arguments.length?(n=d==null?null:typeof d=="function"?d:at(+d),c):n},c.lineX0=c.lineY0=function(){return u().x(e).y(t)},c.lineY1=function(){return u().x(e).y(n)},c.lineX1=function(){return u().x(r).y(t)},c.defined=function(d){return arguments.length?(i=typeof d=="function"?d:at(!!d),c):i},c.curve=function(d){return arguments.length?(a=d,s!=null&&(o=a(s)),c):a},c.context=function(d){return arguments.length?(d==null?s=o=null:o=a(s=d),c):s},c}function BS(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function VS(e){return e}function GS(){var e=VS,t=BS,n=null,r=at(0),i=at(Vs),s=at(0);function a(o){var l,c=(o=Fs(o)).length,u,d,h=0,f=new Array(c),p=new Array(c),g=+r.apply(this,arguments),v=Math.min(Vs,Math.max(-Vs,i.apply(this,arguments)-g)),m,y=Math.min(Math.abs(v)/c,s.apply(this,arguments)),b=y*(v<0?-1:1),S;for(l=0;l<c;++l)(S=p[f[l]=l]=+e(o[l],l,o))>0&&(h+=S);for(t!=null?f.sort(function(_,E){return t(p[_],p[E])}):n!=null&&f.sort(function(_,E){return n(o[_],o[E])}),l=0,d=h?(v-c*b)/h:0;l<c;++l,g=m)u=f[l],S=p[u],m=g+(S>0?S*d:0)+b,p[u]={data:o[u],index:l,value:S,startAngle:g,endAngle:m,padAngle:y};return p}return a.value=function(o){return arguments.length?(e=typeof o=="function"?o:at(+o),a):e},a.sortValues=function(o){return arguments.length?(t=o,n=null,a):t},a.sort=function(o){return arguments.length?(n=o,t=null,a):n},a.startAngle=function(o){return arguments.length?(r=typeof o=="function"?o:at(+o),a):r},a.endAngle=function(o){return arguments.length?(i=typeof o=="function"?o:at(+o),a):i},a.padAngle=function(o){return arguments.length?(s=typeof o=="function"?o:at(+o),a):s},a}var HS=Fd(zs);function Hd(e){this._curve=e}Hd.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(e,t){this._curve.point(t*Math.sin(e),t*-Math.cos(e))}};function Fd(e){function t(n){return new Hd(e(n))}return t._curve=e,t}function FS(e){var t=e.curve;return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e.curve=function(n){return arguments.length?t(Fd(n)):t()._curve},e}function zS(){return FS(di().curve(HS))}class WS{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function YS(e){return new WS(e,!0)}function qS(e){return e.source}function XS(e){return e.target}function jS(e){let t=qS,n=XS,r=hl,i=dl,s=null,a=null,o=Gs(l);function l(){let c;const u=US.call(arguments),d=t.apply(this,u),h=n.apply(this,u);if(s==null&&(a=e(c=o())),a.lineStart(),u[0]=d,a.point(+r.apply(this,u),+i.apply(this,u)),u[0]=h,a.point(+r.apply(this,u),+i.apply(this,u)),a.lineEnd(),c)return a=null,c+""||null}return l.source=function(c){return arguments.length?(t=c,l):t},l.target=function(c){return arguments.length?(n=c,l):n},l.x=function(c){return arguments.length?(r=typeof c=="function"?c:at(+c),l):r},l.y=function(c){return arguments.length?(i=typeof c=="function"?c:at(+c),l):i},l.context=function(c){return arguments.length?(c==null?s=a=null:a=e(s=c),l):s},l}function ZS(){return jS(YS)}function dn(){}function Ws(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function Ys(e){this._context=e}Ys.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Ws(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Ws(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function KS(e){return new Ys(e)}function zd(e){this._context=e}zd.prototype={areaStart:dn,areaEnd:dn,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Ws(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function QS(e){return new zd(e)}function Wd(e){this._context=e}Wd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:Ws(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function JS(e){return new Wd(e)}function Yd(e,t){this._basis=new Ys(e),this._beta=t}Yd.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,n=e.length-1;if(n>0)for(var r=e[0],i=t[0],s=e[n]-r,a=t[n]-i,o=-1,l;++o<=n;)l=o/n,this._basis.point(this._beta*e[o]+(1-this._beta)*(r+l*s),this._beta*t[o]+(1-this._beta)*(i+l*a));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const t_=function e(t){function n(r){return t===1?new Ys(r):new Yd(r,t)}return n.beta=function(r){return e(+r)},n}(.85);function qs(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function pl(e,t){this._context=e,this._k=(1-t)/6}pl.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:qs(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:qs(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const e_=function e(t){function n(r){return new pl(r,t)}return n.tension=function(r){return e(+r)},n}(0);function gl(e,t){this._context=e,this._k=(1-t)/6}gl.prototype={areaStart:dn,areaEnd:dn,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:qs(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const n_=function e(t){function n(r){return new gl(r,t)}return n.tension=function(r){return e(+r)},n}(0);function ml(e,t){this._context=e,this._k=(1-t)/6}ml.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:qs(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const r_=function e(t){function n(r){return new ml(r,t)}return n.tension=function(r){return e(+r)},n}(0);function vl(e,t,n){var r=e._x1,i=e._y1,s=e._x2,a=e._y2;if(e._l01_a>Yt){var o=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*o-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,i=(i*o-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>Yt){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,u=3*e._l23_a*(e._l23_a+e._l12_a);s=(s*c+e._x1*e._l23_2a-t*e._l12_2a)/u,a=(a*c+e._y1*e._l23_2a-n*e._l12_2a)/u}e._context.bezierCurveTo(r,i,s,a,e._x2,e._y2)}function qd(e,t){this._context=e,this._alpha=t}qd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;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(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:vl(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const i_=function e(t){function n(r){return t?new qd(r,t):new pl(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function Xd(e,t){this._context=e,this._alpha=t}Xd.prototype={areaStart:dn,areaEnd:dn,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;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=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:vl(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const s_=function e(t){function n(r){return t?new Xd(r,t):new gl(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function jd(e,t){this._context=e,this._alpha=t}jd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:vl(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const a_=function e(t){function n(r){return t?new jd(r,t):new ml(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function Zd(e){this._context=e}Zd.prototype={areaStart:dn,areaEnd:dn,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function Kd(e){return new Zd(e)}function Qd(e){return e<0?-1:1}function Jd(e,t,n){var r=e._x1-e._x0,i=t-e._x1,s=(e._y1-e._y0)/(r||i<0&&-0),a=(n-e._y1)/(i||r<0&&-0),o=(s*i+a*r)/(r+i);return(Qd(s)+Qd(a))*Math.min(Math.abs(s),Math.abs(a),.5*Math.abs(o))||0}function tf(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function yl(e,t,n){var r=e._x0,i=e._y0,s=e._x1,a=e._y1,o=(s-r)/3;e._context.bezierCurveTo(r+o,i+o*t,s-o,a-o*n,s,a)}function Xs(e){this._context=e}Xs.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:yl(this,this._t0,tf(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,yl(this,tf(this,n=Jd(this,e,t)),n);break;default:yl(this,this._t0,n=Jd(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function ef(e){this._context=new nf(e)}(ef.prototype=Object.create(Xs.prototype)).point=function(e,t){Xs.prototype.point.call(this,t,e)};function nf(e){this._context=e}nf.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,s){this._context.bezierCurveTo(t,e,r,n,s,i)}};function o_(e){return new Xs(e)}function l_(e){return new ef(e)}function rf(e){this._context=e}rf.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=sf(e),i=sf(t),s=0,a=1;a<n;++s,++a)this._context.bezierCurveTo(r[0][s],i[0][s],r[1][s],i[1][s],e[a],t[a]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function sf(e){var t,n=e.length-1,r,i=new Array(n),s=new Array(n),a=new Array(n);for(i[0]=0,s[0]=2,a[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,s[t]=4,a[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,s[n-1]=7,a[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/s[t-1],s[t]-=r,a[t]-=r*a[t-1];for(i[n-1]=a[n-1]/s[n-1],t=n-2;t>=0;--t)i[t]=(a[t]-i[t+1])/s[t];for(s[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)s[t]=2*e[t+1]-i[t+1];return[i,s]}function c_(e){return new rf(e)}function js(e,t){this._context=e,this._t=t}js.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&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function u_(e){return new js(e,.5)}function h_(e){return new js(e,0)}function d_(e){return new js(e,1)}function af(e,t){if((a=e.length)>1)for(var n=1,r,i,s=e[t[0]],a,o=s.length;n<a;++n)for(i=s,s=e[t[n]],r=0;r<o;++r)s[r][1]+=s[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function of(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function f_(e,t){return e[t]}function p_(e){const t=[];return t.key=e,t}function xl(){var e=at([]),t=of,n=af,r=f_;function i(s){var a=Array.from(e.apply(this,arguments),p_),o,l=a.length,c=-1,u;for(const d of s)for(o=0,++c;o<l;++o)(a[o][c]=[0,+r(d,a[o].key,c,s)]).data=d;for(o=0,u=Fs(t(a));o<l;++o)a[u[o]].index=o;return n(a,u),a}return i.keys=function(s){return arguments.length?(e=typeof s=="function"?s:at(Array.from(s)),i):e},i.value=function(s){return arguments.length?(r=typeof s=="function"?s:at(+s),i):r},i.order=function(s){return arguments.length?(t=s==null?of:typeof s=="function"?s:at(Array.from(s)),i):t},i.offset=function(s){return arguments.length?(n=s??af,i):n},i}function g_(e,t){if((l=e.length)>0)for(var n,r=0,i,s,a,o,l,c=e[t[0]].length;r<c;++r)for(a=o=0,n=0;n<l;++n)(s=(i=e[t[n]][r])[1]-i[0])>0?(i[0]=a,i[1]=a+=s):s<0?(i[1]=o,i[0]=o+=s):(i[0]=0,i[1]=s)}function fi(e,t,n){this.k=e,this.x=t,this.y=n}fi.prototype={constructor:fi,scale:function(e){return e===1?this:new fi(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new fi(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}},fi.prototype;var m_=typeof global=="object"&&global&&global.Object===Object&&global;const lf=m_;var v_=typeof self=="object"&&self&&self.Object===Object&&self,y_=lf||v_||Function("return this")();const Te=y_;var x_=Te.Symbol;const ge=x_;var cf=Object.prototype,b_=cf.hasOwnProperty,E_=cf.toString,pi=ge?ge.toStringTag:void 0;function S_(e){var t=b_.call(e,pi),n=e[pi];try{e[pi]=void 0;var r=!0}catch{}var i=E_.call(e);return r&&(t?e[pi]=n:delete e[pi]),i}var __=Object.prototype,w_=__.toString;function O_(e){return w_.call(e)}var T_="[object Null]",M_="[object Undefined]",uf=ge?ge.toStringTag:void 0;function kn(e){return e==null?e===void 0?M_:T_:uf&&uf in Object(e)?S_(e):O_(e)}function Ne(e){return e!=null&&typeof e=="object"}var C_="[object Symbol]";function Zs(e){return typeof e=="symbol"||Ne(e)&&kn(e)==C_}function hf(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var A_=Array.isArray;const Vt=A_;var D_=1/0,df=ge?ge.prototype:void 0,ff=df?df.toString:void 0;function pf(e){if(typeof e=="string")return e;if(Vt(e))return hf(e,pf)+"";if(Zs(e))return ff?ff.call(e):"";var t=e+"";return t=="0"&&1/e==-D_?"-0":t}var L_=/\s/;function R_(e){for(var t=e.length;t--&&L_.test(e.charAt(t)););return t}var I_=/^\s+/;function k_(e){return e&&e.slice(0,R_(e)+1).replace(I_,"")}function me(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var gf=0/0,$_=/^[-+]0x[0-9a-f]+$/i,P_=/^0b[01]+$/i,N_=/^0o[0-7]+$/i,U_=parseInt;function gi(e){if(typeof e=="number")return e;if(Zs(e))return gf;if(me(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=me(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=k_(e);var n=P_.test(e);return n||N_.test(e)?U_(e.slice(2),n?2:8):$_.test(e)?gf:+e}function bl(e){return e}var B_="[object AsyncFunction]",V_="[object Function]",G_="[object GeneratorFunction]",H_="[object Proxy]";function El(e){if(!me(e))return!1;var t=kn(e);return t==V_||t==G_||t==B_||t==H_}var F_=Te["__core-js_shared__"];const Sl=F_;var mf=function(){var e=/[^.]+$/.exec(Sl&&Sl.keys&&Sl.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function z_(e){return!!mf&&mf in e}var W_=Function.prototype,Y_=W_.toString;function $n(e){if(e!=null){try{return Y_.call(e)}catch{}try{return e+""}catch{}}return""}var q_=/[\\^$.*+?()[\]{}|]/g,X_=/^\[object .+?Constructor\]$/,j_=Function.prototype,Z_=Object.prototype,K_=j_.toString,Q_=Z_.hasOwnProperty,J_=RegExp("^"+K_.call(Q_).replace(q_,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function tw(e){if(!me(e)||z_(e))return!1;var t=El(e)?J_:X_;return t.test($n(e))}function ew(e,t){return e==null?void 0:e[t]}function Pn(e,t){var n=ew(e,t);return tw(n)?n:void 0}var nw=Pn(Te,"WeakMap");const _l=nw;var vf=Object.create,rw=function(){function e(){}return function(t){if(!me(t))return{};if(vf)return vf(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();const iw=rw;function sw(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function aw(){}function yf(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var ow=800,lw=16,cw=Date.now;function uw(e){var t=0,n=0;return function(){var r=cw(),i=lw-(r-n);if(n=r,i>0){if(++t>=ow)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function hw(e){return function(){return e}}var dw=function(){try{var e=Pn(Object,"defineProperty");return e({},"",{}),e}catch{}}();const Ks=dw;var fw=Ks?function(e,t){return Ks(e,"toString",{configurable:!0,enumerable:!1,value:hw(t),writable:!0})}:bl,pw=uw(fw);const gw=pw;function mw(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}function vw(e,t,n,r){for(var i=e.length,s=n+(r?1:-1);r?s--:++s<i;)if(t(e[s],s,e))return s;return-1}function yw(e){return e!==e}function xw(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}function bw(e,t,n){return t===t?xw(e,t,n):vw(e,yw,n)}function Ew(e,t){var n=e==null?0:e.length;return!!n&&bw(e,t,0)>-1}var Sw=9007199254740991,_w=/^(?:0|[1-9]\d*)$/;function wl(e,t){var n=typeof e;return t=t??Sw,!!t&&(n=="number"||n!="symbol"&&_w.test(e))&&e>-1&&e%1==0&&e<t}function Qs(e,t,n){t=="__proto__"&&Ks?Ks(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function mi(e,t){return e===t||e!==e&&t!==t}var ww=Object.prototype,Ow=ww.hasOwnProperty;function xf(e,t,n){var r=e[t];(!(Ow.call(e,t)&&mi(r,n))||n===void 0&&!(t in e))&&Qs(e,t,n)}function vi(e,t,n,r){var i=!n;n||(n={});for(var s=-1,a=t.length;++s<a;){var o=t[s],l=r?r(n[o],e[o],o,n,e):void 0;l===void 0&&(l=e[o]),i?Qs(n,o,l):xf(n,o,l)}return n}var bf=Math.max;function Tw(e,t,n){return t=bf(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,s=bf(r.length-t,0),a=Array(s);++i<s;)a[i]=r[t+i];i=-1;for(var o=Array(t+1);++i<t;)o[i]=r[i];return o[t]=n(a),sw(e,this,o)}}function Ef(e,t){return gw(Tw(e,t,bl),e+"")}var Mw=9007199254740991;function Ol(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Mw}function Nn(e){return e!=null&&Ol(e.length)&&!El(e)}function Sf(e,t,n){if(!me(n))return!1;var r=typeof t;return(r=="number"?Nn(n)&&wl(t,n.length):r=="string"&&t in n)?mi(n[t],e):!1}function Cw(e){return Ef(function(t,n){var r=-1,i=n.length,s=i>1?n[i-1]:void 0,a=i>2?n[2]:void 0;for(s=e.length>3&&typeof s=="function"?(i--,s):void 0,a&&Sf(n[0],n[1],a)&&(s=i<3?void 0:s,i=1),t=Object(t);++r<i;){var o=n[r];o&&e(t,o,r,s)}return t})}var Aw=Object.prototype;function Js(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||Aw;return e===n}function Dw(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var Lw="[object Arguments]";function _f(e){return Ne(e)&&kn(e)==Lw}var wf=Object.prototype,Rw=wf.hasOwnProperty,Iw=wf.propertyIsEnumerable,kw=_f(function(){return arguments}())?_f:function(e){return Ne(e)&&Rw.call(e,"callee")&&!Iw.call(e,"callee")};const dr=kw;function $w(){return!1}var Of=typeof z=="object"&&z&&!z.nodeType&&z,Tf=Of&&typeof module=="object"&&module&&!module.nodeType&&module,Pw=Tf&&Tf.exports===Of,Mf=Pw?Te.Buffer:void 0,Nw=Mf?Mf.isBuffer:void 0,Uw=Nw||$w;const fr=Uw;var Bw="[object Arguments]",Vw="[object Array]",Gw="[object Boolean]",Hw="[object Date]",Fw="[object Error]",zw="[object Function]",Ww="[object Map]",Yw="[object Number]",qw="[object Object]",Xw="[object RegExp]",jw="[object Set]",Zw="[object String]",Kw="[object WeakMap]",Qw="[object ArrayBuffer]",Jw="[object DataView]",tO="[object Float32Array]",eO="[object Float64Array]",nO="[object Int8Array]",rO="[object Int16Array]",iO="[object Int32Array]",sO="[object Uint8Array]",aO="[object Uint8ClampedArray]",oO="[object Uint16Array]",lO="[object Uint32Array]",Ot={};Ot[tO]=Ot[eO]=Ot[nO]=Ot[rO]=Ot[iO]=Ot[sO]=Ot[aO]=Ot[oO]=Ot[lO]=!0,Ot[Bw]=Ot[Vw]=Ot[Qw]=Ot[Gw]=Ot[Jw]=Ot[Hw]=Ot[Fw]=Ot[zw]=Ot[Ww]=Ot[Yw]=Ot[qw]=Ot[Xw]=Ot[jw]=Ot[Zw]=Ot[Kw]=!1;function cO(e){return Ne(e)&&Ol(e.length)&&!!Ot[kn(e)]}function Tl(e){return function(t){return e(t)}}var Cf=typeof z=="object"&&z&&!z.nodeType&&z,yi=Cf&&typeof module=="object"&&module&&!module.nodeType&&module,uO=yi&&yi.exports===Cf,Ml=uO&&lf.process,hO=function(){try{var e=yi&&yi.require&&yi.require("util").types;return e||Ml&&Ml.binding&&Ml.binding("util")}catch{}}();const pr=hO;var Af=pr&&pr.isTypedArray,dO=Af?Tl(Af):cO;const ta=dO;var fO=Object.prototype,pO=fO.hasOwnProperty;function Df(e,t){var n=Vt(e),r=!n&&dr(e),i=!n&&!r&&fr(e),s=!n&&!r&&!i&&ta(e),a=n||r||i||s,o=a?Dw(e.length,String):[],l=o.length;for(var c in e)(t||pO.call(e,c))&&!(a&&(c=="length"||i&&(c=="offset"||c=="parent")||s&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||wl(c,l)))&&o.push(c);return o}function Lf(e,t){return function(n){return e(t(n))}}var gO=Lf(Object.keys,Object);const mO=gO;var vO=Object.prototype,yO=vO.hasOwnProperty;function Rf(e){if(!Js(e))return mO(e);var t=[];for(var n in Object(e))yO.call(e,n)&&n!="constructor"&&t.push(n);return t}function xi(e){return Nn(e)?Df(e):Rf(e)}function xO(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var bO=Object.prototype,EO=bO.hasOwnProperty;function SO(e){if(!me(e))return xO(e);var t=Js(e),n=[];for(var r in e)r=="constructor"&&(t||!EO.call(e,r))||n.push(r);return n}function bi(e){return Nn(e)?Df(e,!0):SO(e)}var _O=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,wO=/^\w*$/;function Cl(e,t){if(Vt(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||Zs(e)?!0:wO.test(e)||!_O.test(e)||t!=null&&e in Object(t)}var OO=Pn(Object,"create");const Ei=OO;function TO(){this.__data__=Ei?Ei(null):{},this.size=0}function MO(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var CO="__lodash_hash_undefined__",AO=Object.prototype,DO=AO.hasOwnProperty;function LO(e){var t=this.__data__;if(Ei){var n=t[e];return n===CO?void 0:n}return DO.call(t,e)?t[e]:void 0}var RO=Object.prototype,IO=RO.hasOwnProperty;function kO(e){var t=this.__data__;return Ei?t[e]!==void 0:IO.call(t,e)}var $O="__lodash_hash_undefined__";function PO(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Ei&&t===void 0?$O:t,this}function Un(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Un.prototype.clear=TO,Un.prototype.delete=MO,Un.prototype.get=LO,Un.prototype.has=kO,Un.prototype.set=PO;function NO(){this.__data__=[],this.size=0}function ea(e,t){for(var n=e.length;n--;)if(mi(e[n][0],t))return n;return-1}var UO=Array.prototype,BO=UO.splice;function VO(e){var t=this.__data__,n=ea(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():BO.call(t,n,1),--this.size,!0}function GO(e){var t=this.__data__,n=ea(t,e);return n<0?void 0:t[n][1]}function HO(e){return ea(this.__data__,e)>-1}function FO(e,t){var n=this.__data__,r=ea(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function Qe(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Qe.prototype.clear=NO,Qe.prototype.delete=VO,Qe.prototype.get=GO,Qe.prototype.has=HO,Qe.prototype.set=FO;var zO=Pn(Te,"Map");const Si=zO;function WO(){this.size=0,this.__data__={hash:new Un,map:new(Si||Qe),string:new Un}}function YO(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function na(e,t){var n=e.__data__;return YO(t)?n[typeof t=="string"?"string":"hash"]:n.map}function qO(e){var t=na(this,e).delete(e);return this.size-=t?1:0,t}function XO(e){return na(this,e).get(e)}function jO(e){return na(this,e).has(e)}function ZO(e,t){var n=na(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function Je(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Je.prototype.clear=WO,Je.prototype.delete=qO,Je.prototype.get=XO,Je.prototype.has=jO,Je.prototype.set=ZO;var KO="Expected a function";function Al(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(KO);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],s=n.cache;if(s.has(i))return s.get(i);var a=e.apply(this,r);return n.cache=s.set(i,a)||s,a};return n.cache=new(Al.Cache||Je),n}Al.Cache=Je;var QO=500;function JO(e){var t=Al(e,function(r){return n.size===QO&&n.clear(),r}),n=t.cache;return t}var tT=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,eT=/\\(\\)?/g,nT=JO(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(tT,function(n,r,i,s){t.push(i?s.replace(eT,"$1"):r||n)}),t});const rT=nT;function _i(e){return e==null?"":pf(e)}function If(e,t){return Vt(e)?e:Cl(e,t)?[e]:rT(_i(e))}var iT=1/0;function ra(e){if(typeof e=="string"||Zs(e))return e;var t=e+"";return t=="0"&&1/e==-iT?"-0":t}function kf(e,t){t=If(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[ra(t[n++])];return n&&n==r?e:void 0}function St(e,t,n){var r=e==null?void 0:kf(e,t);return r===void 0?n:r}function Dl(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var $f=ge?ge.isConcatSpreadable:void 0;function sT(e){return Vt(e)||dr(e)||!!($f&&e&&e[$f])}function ia(e,t,n,r,i){var s=-1,a=e.length;for(n||(n=sT),i||(i=[]);++s<a;){var o=e[s];t>0&&n(o)?t>1?ia(o,t-1,n,r,i):Dl(i,o):r||(i[i.length]=o)}return i}function Pf(e){var t=e==null?0:e.length;return t?ia(e,1):[]}var aT=Lf(Object.getPrototypeOf,Object);const Ll=aT;var oT="[object Object]",lT=Function.prototype,cT=Object.prototype,Nf=lT.toString,uT=cT.hasOwnProperty,hT=Nf.call(Object);function dT(e){if(!Ne(e)||kn(e)!=oT)return!1;var t=Ll(e);if(t===null)return!0;var n=uT.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Nf.call(n)==hT}function fT(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var s=Array(i);++r<i;)s[r]=e[r+t];return s}function pT(e,t,n){var r=e.length;return n=n===void 0?r:n,!t&&n>=r?e:fT(e,t,n)}var gT="\\ud800-\\udfff",mT="\\u0300-\\u036f",vT="\\ufe20-\\ufe2f",yT="\\u20d0-\\u20ff",xT=mT+vT+yT,bT="\\ufe0e\\ufe0f",ET="\\u200d",ST=RegExp("["+ET+gT+xT+bT+"]");function Uf(e){return ST.test(e)}function _T(e){return e.split("")}var Bf="\\ud800-\\udfff",wT="\\u0300-\\u036f",OT="\\ufe20-\\ufe2f",TT="\\u20d0-\\u20ff",MT=wT+OT+TT,CT="\\ufe0e\\ufe0f",AT="["+Bf+"]",Rl="["+MT+"]",Il="\\ud83c[\\udffb-\\udfff]",DT="(?:"+Rl+"|"+Il+")",Vf="[^"+Bf+"]",Gf="(?:\\ud83c[\\udde6-\\uddff]){2}",Hf="[\\ud800-\\udbff][\\udc00-\\udfff]",LT="\\u200d",Ff=DT+"?",zf="["+CT+"]?",RT="(?:"+LT+"(?:"+[Vf,Gf,Hf].join("|")+")"+zf+Ff+")*",IT=zf+Ff+RT,kT="(?:"+[Vf+Rl+"?",Rl,Gf,Hf,AT].join("|")+")",$T=RegExp(Il+"(?="+Il+")|"+kT+IT,"g");function PT(e){return e.match($T)||[]}function NT(e){return Uf(e)?PT(e):_T(e)}function UT(e){return function(t){t=_i(t);var n=Uf(t)?NT(t):void 0,r=n?n[0]:t.charAt(0),i=n?pT(n,1).join(""):t.slice(1);return r[e]()+i}}var BT=UT("toUpperCase");const VT=BT;function GT(e){return VT(_i(e).toLowerCase())}function HT(e,t,n,r){var i=-1,s=e==null?0:e.length;for(r&&s&&(n=e[++i]);++i<s;)n=t(n,e[i],i,e);return n}function FT(e){return function(t){return e==null?void 0:e[t]}}var zT={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},WT=FT(zT);const YT=WT;var qT=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,XT="\\u0300-\\u036f",jT="\\ufe20-\\ufe2f",ZT="\\u20d0-\\u20ff",KT=XT+jT+ZT,QT="["+KT+"]",JT=RegExp(QT,"g");function tM(e){return e=_i(e),e&&e.replace(qT,YT).replace(JT,"")}var eM=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function nM(e){return e.match(eM)||[]}var rM=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function iM(e){return rM.test(e)}var Wf="\\ud800-\\udfff",sM="\\u0300-\\u036f",aM="\\ufe20-\\ufe2f",oM="\\u20d0-\\u20ff",lM=sM+aM+oM,Yf="\\u2700-\\u27bf",qf="a-z\\xdf-\\xf6\\xf8-\\xff",cM="\\xac\\xb1\\xd7\\xf7",uM="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",hM="\\u2000-\\u206f",dM=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Xf="A-Z\\xc0-\\xd6\\xd8-\\xde",fM="\\ufe0e\\ufe0f",jf=cM+uM+hM+dM,Zf="['’]",Kf="["+jf+"]",pM="["+lM+"]",Qf="\\d+",gM="["+Yf+"]",Jf="["+qf+"]",tp="[^"+Wf+jf+Qf+Yf+qf+Xf+"]",mM="\\ud83c[\\udffb-\\udfff]",vM="(?:"+pM+"|"+mM+")",yM="[^"+Wf+"]",ep="(?:\\ud83c[\\udde6-\\uddff]){2}",np="[\\ud800-\\udbff][\\udc00-\\udfff]",gr="["+Xf+"]",xM="\\u200d",rp="(?:"+Jf+"|"+tp+")",bM="(?:"+gr+"|"+tp+")",ip="(?:"+Zf+"(?:d|ll|m|re|s|t|ve))?",sp="(?:"+Zf+"(?:D|LL|M|RE|S|T|VE))?",ap=vM+"?",op="["+fM+"]?",EM="(?:"+xM+"(?:"+[yM,ep,np].join("|")+")"+op+ap+")*",SM="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",_M="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",wM=op+ap+EM,OM="(?:"+[gM,ep,np].join("|")+")"+wM,TM=RegExp([gr+"?"+Jf+"+"+ip+"(?="+[Kf,gr,"$"].join("|")+")",bM+"+"+sp+"(?="+[Kf,gr+rp,"$"].join("|")+")",gr+"?"+rp+"+"+ip,gr+"+"+sp,_M,SM,Qf,OM].join("|"),"g");function MM(e){return e.match(TM)||[]}function CM(e,t,n){return e=_i(e),t=n?void 0:t,t===void 0?iM(e)?MM(e):nM(e):e.match(t)||[]}var AM="['’]",DM=RegExp(AM,"g");function lp(e){return function(t){return HT(CM(tM(t).replace(DM,"")),e,"")}}var LM=lp(function(e,t,n){return t=t.toLowerCase(),e+(n?GT(t):t)});const RM=LM;function IM(e,t,n){return e===e&&(n!==void 0&&(e=e<=n?e:n),t!==void 0&&(e=e>=t?e:t)),e}function cp(e,t,n){return n===void 0&&(n=t,t=void 0),n!==void 0&&(n=gi(n),n=n===n?n:0),t!==void 0&&(t=gi(t),t=t===t?t:0),IM(gi(e),t,n)}function kM(){this.__data__=new Qe,this.size=0}function $M(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function PM(e){return this.__data__.get(e)}function NM(e){return this.__data__.has(e)}var UM=200;function BM(e,t){var n=this.__data__;if(n instanceof Qe){var r=n.__data__;if(!Si||r.length<UM-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Je(r)}return n.set(e,t),this.size=n.size,this}function Me(e){var t=this.__data__=new Qe(e);this.size=t.size}Me.prototype.clear=kM,Me.prototype.delete=$M,Me.prototype.get=PM,Me.prototype.has=NM,Me.prototype.set=BM;function VM(e,t){return e&&vi(t,xi(t),e)}function GM(e,t){return e&&vi(t,bi(t),e)}var up=typeof z=="object"&&z&&!z.nodeType&&z,hp=up&&typeof module=="object"&&module&&!module.nodeType&&module,HM=hp&&hp.exports===up,dp=HM?Te.Buffer:void 0,fp=dp?dp.allocUnsafe:void 0;function pp(e,t){if(t)return e.slice();var n=e.length,r=fp?fp(n):new e.constructor(n);return e.copy(r),r}function FM(e,t){for(var n=-1,r=e==null?0:e.length,i=0,s=[];++n<r;){var a=e[n];t(a,n,e)&&(s[i++]=a)}return s}function gp(){return[]}var zM=Object.prototype,WM=zM.propertyIsEnumerable,mp=Object.getOwnPropertySymbols,YM=mp?function(e){return e==null?[]:(e=Object(e),FM(mp(e),function(t){return WM.call(e,t)}))}:gp;const kl=YM;function qM(e,t){return vi(e,kl(e),t)}var XM=Object.getOwnPropertySymbols,jM=XM?function(e){for(var t=[];e;)Dl(t,kl(e)),e=Ll(e);return t}:gp;const vp=jM;function ZM(e,t){return vi(e,vp(e),t)}function yp(e,t,n){var r=t(e);return Vt(e)?r:Dl(r,n(e))}function $l(e){return yp(e,xi,kl)}function KM(e){return yp(e,bi,vp)}var QM=Pn(Te,"DataView");const Pl=QM;var JM=Pn(Te,"Promise");const Nl=JM;var tC=Pn(Te,"Set");const mr=tC;var xp="[object Map]",eC="[object Object]",bp="[object Promise]",Ep="[object Set]",Sp="[object WeakMap]",_p="[object DataView]",nC=$n(Pl),rC=$n(Si),iC=$n(Nl),sC=$n(mr),aC=$n(_l),Bn=kn;(Pl&&Bn(new Pl(new ArrayBuffer(1)))!=_p||Si&&Bn(new Si)!=xp||Nl&&Bn(Nl.resolve())!=bp||mr&&Bn(new mr)!=Ep||_l&&Bn(new _l)!=Sp)&&(Bn=function(e){var t=kn(e),n=t==eC?e.constructor:void 0,r=n?$n(n):"";if(r)switch(r){case nC:return _p;case rC:return xp;case iC:return bp;case sC:return Ep;case aC:return Sp}return t});const vr=Bn;var oC=Object.prototype,lC=oC.hasOwnProperty;function cC(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&lC.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var uC=Te.Uint8Array;const sa=uC;function Ul(e){var t=new e.constructor(e.byteLength);return new sa(t).set(new sa(e)),t}function hC(e,t){var n=t?Ul(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var dC=/\w*$/;function fC(e){var t=new e.constructor(e.source,dC.exec(e));return t.lastIndex=e.lastIndex,t}var wp=ge?ge.prototype:void 0,Op=wp?wp.valueOf:void 0;function pC(e){return Op?Object(Op.call(e)):{}}function Tp(e,t){var n=t?Ul(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var gC="[object Boolean]",mC="[object Date]",vC="[object Map]",yC="[object Number]",xC="[object RegExp]",bC="[object Set]",EC="[object String]",SC="[object Symbol]",_C="[object ArrayBuffer]",wC="[object DataView]",OC="[object Float32Array]",TC="[object Float64Array]",MC="[object Int8Array]",CC="[object Int16Array]",AC="[object Int32Array]",DC="[object Uint8Array]",LC="[object Uint8ClampedArray]",RC="[object Uint16Array]",IC="[object Uint32Array]";function kC(e,t,n){var r=e.constructor;switch(t){case _C:return Ul(e);case gC:case mC:return new r(+e);case wC:return hC(e,n);case OC:case TC:case MC:case CC:case AC:case DC:case LC:case RC:case IC:return Tp(e,n);case vC:return new r;case yC:case EC:return new r(e);case xC:return fC(e);case bC:return new r;case SC:return pC(e)}}function Mp(e){return typeof e.constructor=="function"&&!Js(e)?iw(Ll(e)):{}}var $C="[object Map]";function PC(e){return Ne(e)&&vr(e)==$C}var Cp=pr&&pr.isMap,NC=Cp?Tl(Cp):PC;const UC=NC;var BC="[object Set]";function VC(e){return Ne(e)&&vr(e)==BC}var Ap=pr&&pr.isSet,GC=Ap?Tl(Ap):VC;const HC=GC;var FC=1,zC=2,WC=4,Dp="[object Arguments]",YC="[object Array]",qC="[object Boolean]",XC="[object Date]",jC="[object Error]",Lp="[object Function]",ZC="[object GeneratorFunction]",KC="[object Map]",QC="[object Number]",Rp="[object Object]",JC="[object RegExp]",tA="[object Set]",eA="[object String]",nA="[object Symbol]",rA="[object WeakMap]",iA="[object ArrayBuffer]",sA="[object DataView]",aA="[object Float32Array]",oA="[object Float64Array]",lA="[object Int8Array]",cA="[object Int16Array]",uA="[object Int32Array]",hA="[object Uint8Array]",dA="[object Uint8ClampedArray]",fA="[object Uint16Array]",pA="[object Uint32Array]",_t={};_t[Dp]=_t[YC]=_t[iA]=_t[sA]=_t[qC]=_t[XC]=_t[aA]=_t[oA]=_t[lA]=_t[cA]=_t[uA]=_t[KC]=_t[QC]=_t[Rp]=_t[JC]=_t[tA]=_t[eA]=_t[nA]=_t[hA]=_t[dA]=_t[fA]=_t[pA]=!0,_t[jC]=_t[Lp]=_t[rA]=!1;function aa(e,t,n,r,i,s){var a,o=t&FC,l=t&zC,c=t&WC;if(n&&(a=i?n(e,r,i,s):n(e)),a!==void 0)return a;if(!me(e))return e;var u=Vt(e);if(u){if(a=cC(e),!o)return yf(e,a)}else{var d=vr(e),h=d==Lp||d==ZC;if(fr(e))return pp(e,o);if(d==Rp||d==Dp||h&&!i){if(a=l||h?{}:Mp(e),!o)return l?ZM(e,GM(a,e)):qM(e,VM(a,e))}else{if(!_t[d])return i?e:{};a=kC(e,d,o)}}s||(s=new Me);var f=s.get(e);if(f)return f;s.set(e,a),HC(e)?e.forEach(function(v){a.add(aa(v,t,n,v,e,s))}):UC(e)&&e.forEach(function(v,m){a.set(m,aa(v,t,n,m,e,s))});var p=c?l?KM:$l:l?bi:xi,g=u?void 0:p(e);return mw(g||e,function(v,m){g&&(m=v,v=e[m]),xf(a,m,aa(v,t,n,m,e,s))}),a}var gA=1,mA=4;function tn(e){return aa(e,gA|mA)}var vA="__lodash_hash_undefined__";function yA(e){return this.__data__.set(e,vA),this}function xA(e){return this.__data__.has(e)}function wi(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new Je;++t<n;)this.add(e[t])}wi.prototype.add=wi.prototype.push=yA,wi.prototype.has=xA;function Ip(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function kp(e,t){return e.has(t)}var bA=1,EA=2;function $p(e,t,n,r,i,s){var a=n&bA,o=e.length,l=t.length;if(o!=l&&!(a&&l>o))return!1;var c=s.get(e),u=s.get(t);if(c&&u)return c==t&&u==e;var d=-1,h=!0,f=n&EA?new wi:void 0;for(s.set(e,t),s.set(t,e);++d<o;){var p=e[d],g=t[d];if(r)var v=a?r(g,p,d,t,e,s):r(p,g,d,e,t,s);if(v!==void 0){if(v)continue;h=!1;break}if(f){if(!Ip(t,function(m,y){if(!kp(f,y)&&(p===m||i(p,m,n,r,s)))return f.push(y)})){h=!1;break}}else if(!(p===g||i(p,g,n,r,s))){h=!1;break}}return s.delete(e),s.delete(t),h}function SA(e){var t=-1,n=Array(e.size);return e.forEach(function(r,i){n[++t]=[i,r]}),n}function Bl(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var _A=1,wA=2,OA="[object Boolean]",TA="[object Date]",MA="[object Error]",CA="[object Map]",AA="[object Number]",DA="[object RegExp]",LA="[object Set]",RA="[object String]",IA="[object Symbol]",kA="[object ArrayBuffer]",$A="[object DataView]",Pp=ge?ge.prototype:void 0,Vl=Pp?Pp.valueOf:void 0;function PA(e,t,n,r,i,s,a){switch(n){case $A:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case kA:return!(e.byteLength!=t.byteLength||!s(new sa(e),new sa(t)));case OA:case TA:case AA:return mi(+e,+t);case MA:return e.name==t.name&&e.message==t.message;case DA:case RA:return e==t+"";case CA:var o=SA;case LA:var l=r&_A;if(o||(o=Bl),e.size!=t.size&&!l)return!1;var c=a.get(e);if(c)return c==t;r|=wA,a.set(e,t);var u=$p(o(e),o(t),r,i,s,a);return a.delete(e),u;case IA:if(Vl)return Vl.call(e)==Vl.call(t)}return!1}var NA=1,UA=Object.prototype,BA=UA.hasOwnProperty;function VA(e,t,n,r,i,s){var a=n&NA,o=$l(e),l=o.length,c=$l(t),u=c.length;if(l!=u&&!a)return!1;for(var d=l;d--;){var h=o[d];if(!(a?h in t:BA.call(t,h)))return!1}var f=s.get(e),p=s.get(t);if(f&&p)return f==t&&p==e;var g=!0;s.set(e,t),s.set(t,e);for(var v=a;++d<l;){h=o[d];var m=e[h],y=t[h];if(r)var b=a?r(y,m,h,t,e,s):r(m,y,h,e,t,s);if(!(b===void 0?m===y||i(m,y,n,r,s):b)){g=!1;break}v||(v=h=="constructor")}if(g&&!v){var S=e.constructor,_=t.constructor;S!=_&&"constructor"in e&&"constructor"in t&&!(typeof S=="function"&&S instanceof S&&typeof _=="function"&&_ instanceof _)&&(g=!1)}return s.delete(e),s.delete(t),g}var GA=1,Np="[object Arguments]",Up="[object Array]",oa="[object Object]",HA=Object.prototype,Bp=HA.hasOwnProperty;function FA(e,t,n,r,i,s){var a=Vt(e),o=Vt(t),l=a?Up:vr(e),c=o?Up:vr(t);l=l==Np?oa:l,c=c==Np?oa:c;var u=l==oa,d=c==oa,h=l==c;if(h&&fr(e)){if(!fr(t))return!1;a=!0,u=!1}if(h&&!u)return s||(s=new Me),a||ta(e)?$p(e,t,n,r,i,s):PA(e,t,l,n,r,i,s);if(!(n&GA)){var f=u&&Bp.call(e,"__wrapped__"),p=d&&Bp.call(t,"__wrapped__");if(f||p){var g=f?e.value():e,v=p?t.value():t;return s||(s=new Me),i(g,v,n,r,s)}}return h?(s||(s=new Me),VA(e,t,n,r,i,s)):!1}function la(e,t,n,r,i){return e===t?!0:e==null||t==null||!Ne(e)&&!Ne(t)?e!==e&&t!==t:FA(e,t,n,r,la,i)}var zA=1,WA=2;function YA(e,t,n,r){var i=n.length,s=i,a=!r;if(e==null)return!s;for(e=Object(e);i--;){var o=n[i];if(a&&o[2]?o[1]!==e[o[0]]:!(o[0]in e))return!1}for(;++i<s;){o=n[i];var l=o[0],c=e[l],u=o[1];if(a&&o[2]){if(c===void 0&&!(l in e))return!1}else{var d=new Me;if(r)var h=r(c,u,l,e,t,d);if(!(h===void 0?la(u,c,zA|WA,r,d):h))return!1}}return!0}function Vp(e){return e===e&&!me(e)}function qA(e){for(var t=xi(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,Vp(i)]}return t}function Gp(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function XA(e){var t=qA(e);return t.length==1&&t[0][2]?Gp(t[0][0],t[0][1]):function(n){return n===e||YA(n,e,t)}}function jA(e,t){return e!=null&&t in Object(e)}function ZA(e,t,n){t=If(t,e);for(var r=-1,i=t.length,s=!1;++r<i;){var a=ra(t[r]);if(!(s=e!=null&&n(e,a)))break;e=e[a]}return s||++r!=i?s:(i=e==null?0:e.length,!!i&&Ol(i)&&wl(a,i)&&(Vt(e)||dr(e)))}function KA(e,t){return e!=null&&ZA(e,t,jA)}var QA=1,JA=2;function tD(e,t){return Cl(e)&&Vp(t)?Gp(ra(e),t):function(n){var r=St(n,e);return r===void 0&&r===t?KA(n,e):la(t,r,QA|JA)}}function eD(e){return function(t){return t==null?void 0:t[e]}}function nD(e){return function(t){return kf(t,e)}}function rD(e){return Cl(e)?eD(ra(e)):nD(e)}function ca(e){return typeof e=="function"?e:e==null?bl:typeof e=="object"?Vt(e)?tD(e[0],e[1]):XA(e):rD(e)}function iD(e,t,n,r){for(var i=-1,s=e==null?0:e.length;++i<s;){var a=e[i];t(r,a,n(a),e)}return r}function sD(e){return function(t,n,r){for(var i=-1,s=Object(t),a=r(t),o=a.length;o--;){var l=a[e?o:++i];if(n(s[l],l,s)===!1)break}return t}}var aD=sD();const Hp=aD;function oD(e,t){return e&&Hp(e,t,xi)}function lD(e,t){return function(n,r){if(n==null)return n;if(!Nn(n))return e(n,r);for(var i=n.length,s=t?i:-1,a=Object(n);(t?s--:++s<i)&&r(a[s],s,a)!==!1;);return n}}var cD=lD(oD);const Gl=cD;function uD(e,t,n,r){return Gl(e,function(i,s,a){t(r,i,n(i),a)}),r}function hD(e,t){return function(n,r){var i=Vt(n)?iD:uD,s=t?t():{};return i(n,e,ca(r),s)}}var dD=function(){return Te.Date.now()};const Hl=dD;var fD="Expected a function",pD=Math.max,gD=Math.min;function ua(e,t,n){var r,i,s,a,o,l,c=0,u=!1,d=!1,h=!0;if(typeof e!="function")throw new TypeError(fD);t=gi(t)||0,me(n)&&(u=!!n.leading,d="maxWait"in n,s=d?pD(gi(n.maxWait)||0,t):s,h="trailing"in n?!!n.trailing:h);function f(E){var M=r,C=i;return r=i=void 0,c=E,a=e.apply(C,M),a}function p(E){return c=E,o=setTimeout(m,t),u?f(E):a}function g(E){var M=E-l,C=E-c,G=t-M;return d?gD(G,s-C):G}function v(E){var M=E-l,C=E-c;return l===void 0||M>=t||M<0||d&&C>=s}function m(){var E=Hl();if(v(E))return y(E);o=setTimeout(m,g(E))}function y(E){return o=void 0,h&&r?f(E):(r=i=void 0,a)}function b(){o!==void 0&&clearTimeout(o),c=0,r=l=i=o=void 0}function S(){return o===void 0?a:y(Hl())}function _(){var E=Hl(),M=v(E);if(r=arguments,i=this,l=E,M){if(o===void 0)return p(l);if(d)return clearTimeout(o),o=setTimeout(m,t),f(l)}return o===void 0&&(o=setTimeout(m,t)),a}return _.cancel=b,_.flush=S,_}function Fl(e,t,n){(n!==void 0&&!mi(e[t],n)||n===void 0&&!(t in e))&&Qs(e,t,n)}function zl(e){return Ne(e)&&Nn(e)}function Wl(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function mD(e){return vi(e,bi(e))}function vD(e,t,n,r,i,s,a){var o=Wl(e,n),l=Wl(t,n),c=a.get(l);if(c){Fl(e,n,c);return}var u=s?s(o,l,n+"",e,t,a):void 0,d=u===void 0;if(d){var h=Vt(l),f=!h&&fr(l),p=!h&&!f&&ta(l);u=l,h||f||p?Vt(o)?u=o:zl(o)?u=yf(o):f?(d=!1,u=pp(l,!0)):p?(d=!1,u=Tp(l,!0)):u=[]:dT(l)||dr(l)?(u=o,dr(o)?u=mD(o):(!me(o)||El(o))&&(u=Mp(l))):d=!1}d&&(a.set(l,u),i(u,l,r,s,a),a.delete(l)),Fl(e,n,u)}function Fp(e,t,n,r,i){e!==t&&Hp(t,function(s,a){if(i||(i=new Me),me(s))vD(e,t,a,n,Fp,r,i);else{var o=r?r(Wl(e,a),s,a+"",e,t,i):void 0;o===void 0&&(o=s),Fl(e,a,o)}},bi)}function yD(e,t,n){for(var r=-1,i=e==null?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function xD(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}function bD(e,t){var n=-1,r=Nn(e)?Array(e.length):[];return Gl(e,function(i,s,a){r[++n]=t(i,s,a)}),r}function ED(e,t){var n=Vt(e)?hf:bD;return n(e,ca(t))}var SD=1/0;function _D(e,t){return ia(ED(e,t),SD)}function wD(e){for(var t=-1,n=e==null?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r}var OD=Object.prototype,TD=OD.hasOwnProperty,MD=hD(function(e,t,n){TD.call(e,n)?e[n].push(t):Qs(e,n,[t])});const CD=MD;var AD="[object Map]",DD="[object Set]",LD=Object.prototype,RD=LD.hasOwnProperty;function Ce(e){if(e==null)return!0;if(Nn(e)&&(Vt(e)||typeof e=="string"||typeof e.splice=="function"||fr(e)||ta(e)||dr(e)))return!e.length;var t=vr(e);if(t==AD||t==DD)return!e.size;if(Js(e))return!Rf(e).length;for(var n in e)if(RD.call(e,n))return!1;return!0}function zp(e,t){return la(e,t)}var ID=lp(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()});const yr=ID;var kD=Cw(function(e,t,n){Fp(e,t,n)});const tt=kD;function $D(e,t){var n;return Gl(e,function(r,i,s){return n=t(r,i,s),!n}),!!n}function PD(e,t,n){var r=Vt(e)?Ip:$D;return n&&Sf(e,t,n)&&(t=void 0),r(e,ca(t))}var ND=1/0,UD=mr&&1/Bl(new mr([,-0]))[1]==ND?function(e){return new mr(e)}:aw;const BD=UD;var VD=200;function Wp(e,t,n){var r=-1,i=Ew,s=e.length,a=!0,o=[],l=o;if(n)a=!1,i=yD;else if(s>=VD){var c=t?null:BD(e);if(c)return Bl(c);a=!1,i=kp,l=new wi}else l=t?[]:o;t:for(;++r<s;){var u=e[r],d=t?t(u):u;if(u=n||u!==0?u:0,a&&d===d){for(var h=l.length;h--;)if(l[h]===d)continue t;t&&l.push(d),o.push(u)}else i(l,d,n)||(l!==o&&l.push(d),o.push(u))}return o}var GD=Ef(function(e){var t=xD(e);return zl(t)&&(t=void 0),Wp(ia(e,1,zl,!0),ca(t))});const HD=GD;function Oi(e){return e&&e.length?Wp(e):[]}var Yl=(e=>(e.RENDER_FINISHED="render-finished",e.RESIZE="chart-resize",e.MOUSEOVER="chart-mouseover",e.MOUSEOUT="chart-mouseout",e))(Yl||{}),ql=(e=>(e.SHOW="show-modal",e.HIDE="hide-modal",e))(ql||{}),Xl=(e=>(e.UPDATE="model-update",e))(Xl||{}),Yp=(e=>(e.SHOW_OVERFLOW_MENU="show-toolbar-overflow-menu",e.HIDE_OVERFLOW_MENU="hide-toolbar-overflow-menu",e.BUTTON_CLICK="toolbar-button-click",e))(Yp||{}),jl=(e=>(e.UPDATE="zoom-bar-update",e.SELECTION_START="zoom-bar-selection-start",e.SELECTION_IN_PROGRESS="zoom-bar-selection-in-progress",e.SELECTION_END="zoom-bar-selection-end",e))(jl||{}),Zl=(e=>(e.CHANGE="zoom-domain-change",e))(Zl||{}),Kl=(e=>(e.CANVAS_ZOOM_IN="canvas-zoom-in",e.CANVAS_ZOOM_OUT="canvas-zoom-out",e))(Kl||{}),Ql=(e=>(e.LABEL_MOUSEOVER="axis-label-mouseover",e.LABEL_MOUSEMOVE="axis-label-mousemove",e.LABEL_CLICK="axis-label-click",e.LABEL_MOUSEOUT="axis-label-mouseout",e.LABEL_FOCUS="axis-label-focus",e.LABEL_BLUR="axis-label-blur",e.RENDER_COMPLETE="axis-render-complete",e))(Ql||{}),Jl=(e=>(e.POINT_MOUSEOVER="scatter-mouseover",e.POINT_MOUSEMOVE="scatter-mousemove",e.POINT_CLICK="scatter-click",e.POINT_MOUSEOUT="scatter-mouseout",e))(Jl||{}),tc=(e=>(e.WORD_MOUSEOVER="wordcloud-word-mouseover",e.WORD_MOUSEMOVE="wordcloud-word-mousemove",e.WORD_CLICK="wordcloud-word-click",e.WORD_MOUSEOUT="wordcloud-word-mouseout",e))(tc||{}),ec=(e=>(e.SLICE_MOUSEOVER="pie-slice-mouseover",e.SLICE_MOUSEMOVE="pie-slice-mousemove",e.SLICE_CLICK="pie-slice-click",e.SLICE_MOUSEOUT="pie-slice-mouseout",e))(ec||{}),nc=(e=>(e.ARC_MOUSEOVER="gauge-arc-mouseover",e.ARC_MOUSEMOVE="gauge-arc-mousemove",e.ARC_CLICK="gauge-arc-click",e.ARC_MOUSEOUT="gauge-arc-mouseout",e))(nc||{}),rc=(e=>(e.BAR_MOUSEOVER="bar-mouseover",e.BAR_MOUSEMOVE="bar-mousemove",e.BAR_CLICK="bar-click",e.BAR_MOUSEOUT="bar-mouseout",e))(rc||{}),ic=(e=>(e.BOX_MOUSEOVER="box-mouseover",e.BOX_MOUSEMOVE="box-mousemove",e.BOX_CLICK="box-click",e.BOX_MOUSEOUT="box-mouseout",e.OUTLIER_MOUSEOVER="outlier-mouseover",e.OUTLIER_MOUSEMOVE="outlier-mousemove",e.OUTLIER_CLICK="outlier-click",e.OUTLIER_MOUSEOUT="outlier-mouseout",e))(ic||{}),sc=(e=>(e.SCATTER_MOUSEOVER="scatter-mouseover",e.SCATTER_MOUSEMOVE="scatter-mousemove",e.SCATTER_CLICK="scatter-click",e.SCATTER_MOUSEOUT="scatter-mouseout",e))(sc||{}),ac=(e=>(e.POINT_MOUSEOVER="scatter-mouseover",e.POINT_MOUSEMOVE="scatter-mousemove",e.POINT_CLICK="scatter-click",e.POINT_MOUSEOUT="scatter-mouseout",e))(ac||{}),oc=(e=>(e.X_AXIS_MOUSEOVER="radar-x-axis-mouseover",e.X_AXIS_MOUSEMOVE="radar-x-axis-mousemove",e.X_AXIS_CLICK="radar-x-axis-click",e.X_AXIS_MOUSEOUT="radar-x-axis-mouseout",e))(oc||{}),lc=(e=>(e.NODE_MOUSEOVER="tree-node-mouseover",e.NODE_CLICK="tree-node-click",e.NODE_MOUSEOUT="tree-node-mouseout",e))(lc||{}),cc=(e=>(e.LEAF_MOUSEOVER="leaf-mouseover",e.LEAF_MOUSEMOVE="leaf-mousemove",e.LEAF_CLICK="leaf-click",e.LEAF_MOUSEOUT="leaf-mouseout",e))(cc||{}),xr=(e=>(e.SHOW="show-tooltip",e.MOVE="move-tooltip",e.HIDE="hide-tooltip",e))(xr||{}),uc=(e=>(e.SHOW="show-threshold",e.HIDE="hide-threshold",e))(uc||{}),qp=(e=>(e.ITEM_HOVER="legend-item-onhover",e.ITEM_CLICK="legend-item-onclick",e.ITEM_MOUSEOUT="legend-item-onmouseout",e.ITEMS_UPDATE="legend-items-update",e))(qp||{}),Xp=(e=>(e.CIRCLE_MOUSEOVER="circle-leaf-mouseover",e.CIRCLE_CLICK="circle-leaf-click",e.CIRCLE_MOUSEOUT="circle-leaf-mouseout",e.CIRCLE_MOUSEMOVE="circle-leaf-mousemove",e))(Xp||{}),jp=(e=>(e.NODE_MOUSEOVER="alluvial-node-mouseover",e.NODE_CLICK="alluvial-node-click",e.NODE_MOUSEOUT="alluvial-node-mouseout",e.NODE_MOUSEMOVE="alluvial-node-mousemove",e.LINE_MOUSEOVER="alluvial-line-mouseover",e.LINE_CLICK="alluvial-line-click",e.LINE_MOUSEOUT="alluvial-line-mouseout",e.LINE_MOUSEMOVE="alluvial-line-mousemove",e))(jp||{}),Zp=(e=>(e.METER_MOUSEOVER="meter-mouseover",e.METER_CLICK="meter-click",e.METER_MOUSEOUT="meter-mouseout",e.METER_MOUSEMOVE="meter-mousemove",e))(Zp||{}),Kp=(e=>(e.HEATMAP_MOUSEOVER="heatmap-mouseover",e.HEATMAP_CLICK="heatmap-click",e.HEATMAP_MOUSEOUT="heatmap-mouseout",e.HEATMAP_MOUSEMOVE="hetmap-mousemove",e))(Kp||{}),br=(e=>(e.CHOROPLETH_MOUSEOVER="choropleth-mouseover",e.CHOROPLETH_CLICK="choropleth-click",e.CHOROPLETH_MOUSEOUT="choropleth-mouseout",e.CHOROPLETH_MOUSEMOVE="choropleth-mousemove",e))(br||{});const w=Object.freeze(Object.defineProperty({__proto__:null,Alluvial:jp,Area:Jl,Axis:Ql,Bar:rc,Boxplot:ic,CanvasZoom:Kl,Chart:Yl,Choropleth:br,CirclePack:Xp,Gauge:nc,Heatmap:Kp,Legend:qp,Line:ac,Meter:Zp,Modal:ql,Model:Xl,Pie:ec,Radar:oc,Scatter:sc,Threshold:uc,Toolbar:Yp,Tooltip:xr,Tree:lc,Treemap:cc,WordCloud:tc,ZoomBar:jl,ZoomDomain:Zl},Symbol.toStringTag,{value:"Module"}));var Z=(e=>(e.HTML="html",e.SVG="svg",e))(Z||{}),hc=(e=>(e.WHITE="white",e.G100="g100",e.G90="g90",e.G10="g10",e))(hc||{}),Q=(e=>(e.BACKGROUND="background",e.FILL="fill",e.STROKE="stroke",e.TOOLTIP="tooltip",e))(Q||{}),F=(e=>(e.LEFT="left",e.RIGHT="right",e.TOP="top",e.BOTTOM="bottom",e))(F||{}),Ae=(e=>(e.GRAPH_VIEW="graph_view",e.SLIDER_VIEW="slider_view",e))(Ae||{}),ve=(e=>(e.END_LINE="end_line",e.MID_LINE="mid_line",e.FRONT_LINE="front_line",e.NONE="none",e))(ve||{}),Nt=(e=>(e.VERTICAL="vertical",e.HORIZONTAL="horizontal",e))(Nt||{}),j=(e=>(e.TIME="time",e.LINEAR="linear",e.LOG="log",e.LABELS="labels",e.LABELS_RATIO="labels-ratio",e))(j||{}),Er=(e=>(e.RIGHT="right",e.LEFT="left",e.TOP="top",e.BOTTOM="bottom",e))(Er||{}),It=(e=>(e.LEFT="left",e.CENTER="center",e.RIGHT="right",e))(It||{}),Sr=(e=>(e.HORIZONTAL="horizontal",e.VERTICAL="vertical",e))(Sr||{}),ha=(e=>(e.TREE="tree",e.DENDROGRAM="dendrogram",e))(ha||{}),bt=(e=>(e.ROW="row",e.COLUMN="column",e.ROW_REVERSE="row-reverse",e.COLUMN_REVERSE="column-reverse",e))(bt||{}),nt=(e=>(e.FIXED="fixed",e.PREFERRED="preferred",e.STRETCH="stretch",e))(nt||{}),Vn=(e=>(e.CENTER="center",e))(Vn||{}),Ti=(e=>(e.LEFT="left",e.RIGHT="right",e))(Ti||{}),kt=(e=>(e.GRID="grid",e.VERT_OR_HORIZ="vertOrHoriz",e.PIE="pie",e.DONUT="donut",e))(kt||{}),Ue=(e=>(e.START="start",e.MIDDLE="middle",e.END="end",e))(Ue||{}),Be=(e=>(e.BASELINE="baseline",e.MIDDLE="middle",e.HANGING="hanging",e))(Be||{}),Gn=(e=>(e.SEMI="semi",e.FULL="full",e))(Gn||{}),da=(e=>(e.UP="up",e.DOWN="down",e))(da||{}),Mi=(e=>(e.SUCCESS="success",e.WARNING="warning",e.DANGER="danger",e))(Mi||{}),Ci=(e=>(e.ALWAYS="always",e.AUTO="auto",e.NEVER="never",e))(Ci||{}),le=(e=>(e.SCATTER="scatter",e.LINE="line",e.SIMPLE_BAR="simple-bar",e.STACKED_BAR="stacked-bar",e.GROUPED_BAR="grouped-bar",e.AREA="area",e.STACKED_AREA="stacked-area",e))(le||{}),Mt=(e=>(e.EXPORT_CSV="Export as CSV",e.EXPORT_PNG="Export as PNG",e.EXPORT_JPG="Export as JPG",e.ZOOM_IN="Zoom in",e.ZOOM_OUT="Zoom out",e.RESET_ZOOM="Reset zoom",e.MAKE_FULLSCREEN="Make fullscreen",e.SHOW_AS_DATATABLE="Show as data-table",e.CUSTOM="Custom",e))(Mt||{}),fa=(e=>(e.LEFT="left",e.RIGHT="right",e))(fa||{}),$t=(e=>(e.CHECKBOX="checkbox",e.RADIUS="radius",e.AREA="area",e.SIZE="size",e.LINE="line",e.QUARTILE="quartile",e.ZOOM="zoom",e))($t||{}),Ai=(e=>(e.LINEAR="linear",e.QUANTIZE="quantize",e))(Ai||{}),_r=(e=>(e.ON="on",e.AUTO="auto",e.OFF="off",e))(_r||{}),Di=(e=>(e.DEFAULT="default",e.HOVERABLE="hoverable",e))(Di||{}),Ve=(e=>(e.geoEqualEarth="geoEqualEarth",e.geoAlbers="geoAlbers",e.geoConicEqualArea="geoConicEqualArea",e.geoConicEquidistant="geoConicEquidistant",e.geoEquirectangular="geoEquirectangular",e.geoMercator="geoMercator",e.geoNaturalEarth1="geoNaturalEarth1",e))(Ve||{});const ee="cds",en={opacity:{unselected:.05,selected:.4}},fn={ticks:{number:7,rotateIfSmallerThan:30,verticalSpaceRatio:2.5,horizontalSpaceRatio:3.5},ratio:{reference:"value",compareTo:"marker"},paddingRatio:.1,hover:{rectanglePadding:4}},wr={duration:1e3,ease:Xu,zoomLevel:3},Or={circles:{fillOpacity:.3,hover:{stroke:"#FFF"}},padding:{mainGroup:4,children:2},hierarchyLevel:2},Qp={pairingOptions:{"1-color":4,"2-color":5,"3-color":5,"4-color":3,"5-color":2,"14-color":1}},ye={circle:{radius:4,opacity:{hovered:1,default:.3}},box:{opacity:{hovered:.5,default:.3}},strokeWidth:{default:1,thicker:2}},FD={defaultBins:10},At={items:{status:{ACTIVE:1,DISABLED:0},horizontalSpace:12,verticalSpace:24,textYOffset:8,spaceAfter:4},checkbox:{radius:6.5},radius:{iconData:[{cx:7,cy:7,r:6.5},{cx:7,cy:10,r:3.5}],fill:null,stroke:"#8c8c8c"},line:{yPosition:6,width:24,strokeWidth:1.4,fill:null,stroke:"#999999"},area:{width:24,height:14,fill:"#6f6f6f",stroke:null},size:{iconData:[{width:23,height:12},{width:13,height:6}],fill:null,stroke:"#8D8D8D"},quartile:{iconData:[{x:0,y:0,width:24,height:13},{x:11,y:4,width:1,height:4}]},zoom:{iconData:[{x:0,y:0,width:12,height:12}],color:"#8D8D8D"},color:{barWidth:300,barHeight:8,axisYTranslation:10}},nn={opacity:{unselected:.3,selected:1},weight:{selected:2,unselected:1}},Gt={statusBar:{paddingRight:5},status:{indicatorSize:16,paddingLeft:15},total:{paddingLeft:36,paddingRight:24},height:{default:8,proportional:16},dividerWidth:2},wt={radiusOffset:-15,innerRadius:2,padAngle:.007,hoverArc:{outerRadiusOffset:3},xOffset:30,yOffset:20,yOffsetCallout:10,callout:{minSliceDegree:5,offsetX:15,offsetY:12,horizontalLineLength:8,textMargin:2}},Hn={opacity:{unselected:.1,selected:.3},xLabelPadding:10,yLabelPadding:8,yTicksNumber:4,minRange:10,xAxisRectHeight:50,dotsRadius:5},De={nodeWidth:4,nodeHoveredWidth:8,minNodePadding:24,opacity:{unfocus:.3,default:.8,selected:1}},Jp={minCellDividerDimension:16,chartPadding:.5},tg={default:{size:24}},zD={horizontalOffset:10},eg={default:{duration:300},pie_slice_mouseover:{duration:100},pie_chart_titles:{duration:375},graph_element_mouseover_fill_update:{duration:100},graph_element_mouseout_fill_update:{duration:100}},ce={height:{[Ae.GRAPH_VIEW]:32,[Ae.SLIDER_VIEW]:10},spacerHeight:8,handleWidth:5,handleBarWidth:1,handleBarHeight:12},WD=[{type:$t.RADIUS,name:"Radius"},{type:$t.AREA,name:"Poor area"},{type:$t.AREA,name:"Satisfactory area"},{type:$t.AREA,name:"Great area"},{type:$t.QUARTILE,name:"Quartiles"}];function YD(e,t,n){let r=null;return function(...i){const s=this;s.mousePosition=Sn(i[0],n),clearTimeout(r),r=setTimeout(function(){e.apply(s,i)},t)}}function Ct(e,t){var i;const n=tn(e),r=Object.keys(t.axes||{});(i=t==null?void 0:t.toolbar)!=null&&i.controls&&delete n.toolbar.controls,r.length===0&&delete n.axes;for(const s in n.axes)if(r.includes(s)){const a=t.axes[s];(a.primary||a.secondary)&&console.warn("`primary` & `secondary` are no longer needed for axis configurations. Read more here https://carbon-design-system.github.io/carbon-charts/?path=/story/docs-tutorials--tabular-data-format");const o=a.mapsTo;if(o==null){const l=a.scaleType;l==null?a.mapsTo="value":l===j.TIME?a.mapsTo="date":l===j.LABELS&&(a.mapsTo="key")}}else delete n.axes[s];return dc(n,t),tt(n,t)}function rn(e){if(!e)return;const t=/translate\([0-9]+\.?[0-9]*,[0-9]+\.?[0-9]*\)/,n=e.getAttribute("transform").match(t);if(!n)return null;if(n[0]){const r=n[0].replace(/translate\(/,"").replace(/\)/,"").split(",");return{tx:r[0],ty:r[1]}}return null}function Li(e){const n=/\(([^)]+)\)/.exec(e);if(n&&n.length>1){const r=n[1].split(",");if(r.length>1)return{x:parseFloat(r[0]),y:parseFloat(r[1])}}return{x:0,y:0}}function ng(e,t,n="value"){const r=e/t.reduce((i,s)=>i+s[n],0)*100;return r%1!==0?parseFloat(r.toFixed(1)):r}function Ri(e,t,n){if(n>e.length)return e;if(t===ve.MID_LINE)return e.substr(0,n/2)+"..."+e.substr(-n/2);if(t===ve.FRONT_LINE)return"..."+e.substr(-n);if(t===ve.END_LINE)return e.substr(0,n)+"..."}function dc(e,t){const n=x(e,"legend","additionalItems"),r=x(t,"legend","additionalItems");if(n&&r){const i=r.map(o=>o.type),s=n.map(o=>o.type),a=WD.filter(o=>s.includes(o.type)&&!i.includes(o.type));e.legend.additionalItems=a,t.legend.additionalItems=HD(a,r,"name")}}const x=(e,...t)=>{let n=e;if(n){for(const r of t)if(n[r]!==null&&n[r]!==void 0)n=n[r];else return null;return n}return null},rg=(e,t)=>t===Nt.HORIZONTAL?{y0:e.x0,y1:e.x1,x0:e.y0,x1:e.y1}:e,jt=(e,t)=>{const{x0:n,x1:r,y0:i,y1:s}=rg(e,t);return`M${n},${i}L${n},${s}L${r},${s}L${r},${i}L${n},${i}`};function sn(e,t,n){return n===Nt.VERTICAL?[e,t]:[t,e]}function fc(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth,r=e.formats[n]||e.formats[e.defaultWidth];return r}}function Ii(e){return function(t,n){var r=n!=null&&n.context?String(n.context):"standalone",i;if(r==="formatting"&&e.formattingValues){var s=e.defaultFormattingWidth||e.defaultWidth,a=n!=null&&n.width?String(n.width):s;i=e.formattingValues[a]||e.formattingValues[s]}else{var o=e.defaultWidth,l=n!=null&&n.width?String(n.width):e.defaultWidth;i=e.values[l]||e.values[o]}var c=e.argumentCallback?e.argumentCallback(t):t;return i[c]}}function ki(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],s=t.match(i);if(!s)return null;var a=s[0],o=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(o)?XD(o,function(d){return d.test(a)}):qD(o,function(d){return d.test(a)}),c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;var u=t.slice(a.length);return{value:c,rest:u}}}function qD(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n}function XD(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return n}function jD(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.match(e.matchPattern);if(!r)return null;var i=r[0],s=t.match(e.parsePattern);if(!s)return null;var a=e.valueCallback?e.valueCallback(s[0]):s[0];a=n.valueCallback?n.valueCallback(a):a;var o=t.slice(i.length);return{value:a,rest:o}}}function pa(e){"@babel/helpers - typeof";return pa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pa(e)}function Ut(e){if(e===null||e===!0||e===!1)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function it(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function dt(e){it(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||pa(e)==="object"&&t==="[object Date]"?new Date(e.getTime()):typeof e=="number"||t==="[object Number]"?new Date(e):((typeof e=="string"||t==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function ig(e,t){it(2,arguments);var n=dt(e),r=Ut(t);return isNaN(r)?new Date(NaN):(r&&n.setDate(n.getDate()+r),n)}function pc(e,t){it(2,arguments);var n=dt(e),r=Ut(t);if(isNaN(r))return new Date(NaN);if(!r)return n;var i=n.getDate(),s=new Date(n.getTime());s.setMonth(n.getMonth()+r+1,0);var a=s.getDate();return i>=a?s:(n.setFullYear(s.getFullYear(),s.getMonth(),i),n)}function ga(e,t){it(2,arguments);var n=dt(e).getTime(),r=Ut(t);return new Date(n+r)}var ZD=36e5;function sg(e,t){it(2,arguments);var n=Ut(t);return ga(e,n*ZD)}var KD={};function ma(){return KD}function gc(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}function ag(e){it(1,arguments);var t=dt(e);return t.setHours(0,0,0,0),t}var QD=864e5;function JD(e,t){it(2,arguments);var n=ag(e),r=ag(t),i=n.getTime()-gc(n),s=r.getTime()-gc(r);return Math.round((i-s)/QD)}var tL=6e4;function mc(e,t){it(2,arguments);var n=Ut(t);return ga(e,n*tL)}function vc(e,t){it(2,arguments);var n=Ut(t);return ga(e,n*1e3)}function og(e,t){it(2,arguments);var n=Ut(t);return pc(e,n*12)}function $i(e,t){it(2,arguments);var n=dt(e),r=dt(t),i=n.getTime()-r.getTime();return i<0?-1:i>0?1:i}var eL=6e4,nL=36e5;function rL(e){return it(1,arguments),e instanceof Date||pa(e)==="object"&&Object.prototype.toString.call(e)==="[object Date]"}function iL(e){if(it(1,arguments),!rL(e)&&typeof e!="number")return!1;var t=dt(e);return!isNaN(Number(t))}function sL(e,t){it(2,arguments);var n=dt(e),r=dt(t),i=n.getFullYear()-r.getFullYear(),s=n.getMonth()-r.getMonth();return i*12+s}function aL(e,t){it(2,arguments);var n=dt(e),r=dt(t);return n.getFullYear()-r.getFullYear()}function lg(e,t){var n=e.getFullYear()-t.getFullYear()||e.getMonth()-t.getMonth()||e.getDate()-t.getDate()||e.getHours()-t.getHours()||e.getMinutes()-t.getMinutes()||e.getSeconds()-t.getSeconds()||e.getMilliseconds()-t.getMilliseconds();return n<0?-1:n>0?1:n}function oL(e,t){it(2,arguments);var n=dt(e),r=dt(t),i=lg(n,r),s=Math.abs(JD(n,r));n.setDate(n.getDate()-i*s);var a=+(lg(n,r)===-i),o=i*(s-a);return o===0?0:o}function yc(e,t){return it(2,arguments),dt(e).getTime()-dt(t).getTime()}var cg={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(t){return t<0?Math.ceil(t):Math.floor(t)}},lL="trunc";function xc(e){return e?cg[e]:cg[lL]}function cL(e,t,n){it(2,arguments);var r=yc(e,t)/nL;return xc(n==null?void 0:n.roundingMethod)(r)}function ug(e,t,n){it(2,arguments);var r=yc(e,t)/eL;return xc(n==null?void 0:n.roundingMethod)(r)}function uL(e){it(1,arguments);var t=dt(e);return t.setHours(23,59,59,999),t}function hL(e){it(1,arguments);var t=dt(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}function dL(e){it(1,arguments);var t=dt(e);return uL(t).getTime()===hL(t).getTime()}function fL(e,t){it(2,arguments);var n=dt(e),r=dt(t),i=$i(n,r),s=Math.abs(sL(n,r)),a;if(s<1)a=0;else{n.getMonth()===1&&n.getDate()>27&&n.setDate(30),n.setMonth(n.getMonth()-i*s);var o=$i(n,r)===-i;dL(dt(e))&&s===1&&$i(e,r)===1&&(o=!1),a=i*(s-Number(o))}return a===0?0:a}function hg(e,t,n){it(2,arguments);var r=yc(e,t)/1e3;return xc(n==null?void 0:n.roundingMethod)(r)}function pL(e,t){it(2,arguments);var n=dt(e),r=dt(t),i=$i(n,r),s=Math.abs(aL(n,r));n.setFullYear(1584),r.setFullYear(1584);var a=$i(n,r)===-i,o=i*(s-Number(a));return o===0?0:o}function gL(e,t){it(2,arguments);var n=Ut(t);return ga(e,-n)}var mL=864e5;function vL(e){it(1,arguments);var t=dt(e),n=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var r=t.getTime(),i=n-r;return Math.floor(i/mL)+1}function va(e){it(1,arguments);var t=1,n=dt(e),r=n.getUTCDay(),i=(r<t?7:0)+r-t;return n.setUTCDate(n.getUTCDate()-i),n.setUTCHours(0,0,0,0),n}function dg(e){it(1,arguments);var t=dt(e),n=t.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(n+1,0,4),r.setUTCHours(0,0,0,0);var i=va(r),s=new Date(0);s.setUTCFullYear(n,0,4),s.setUTCHours(0,0,0,0);var a=va(s);return t.getTime()>=i.getTime()?n+1:t.getTime()>=a.getTime()?n:n-1}function yL(e){it(1,arguments);var t=dg(e),n=new Date(0);n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0);var r=va(n);return r}var xL=6048e5;function bL(e){it(1,arguments);var t=dt(e),n=va(t).getTime()-yL(t).getTime();return Math.round(n/xL)+1}function ya(e,t){var n,r,i,s,a,o,l,c;it(1,arguments);var u=ma(),d=Ut((n=(r=(i=(s=t==null?void 0:t.weekStartsOn)!==null&&s!==void 0?s:t==null||(a=t.locale)===null||a===void 0||(o=a.options)===null||o===void 0?void 0:o.weekStartsOn)!==null&&i!==void 0?i:u.weekStartsOn)!==null&&r!==void 0?r:(l=u.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&n!==void 0?n:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=dt(e),f=h.getUTCDay(),p=(f<d?7:0)+f-d;return h.setUTCDate(h.getUTCDate()-p),h.setUTCHours(0,0,0,0),h}function fg(e,t){var n,r,i,s,a,o,l,c;it(1,arguments);var u=dt(e),d=u.getUTCFullYear(),h=ma(),f=Ut((n=(r=(i=(s=t==null?void 0:t.firstWeekContainsDate)!==null&&s!==void 0?s:t==null||(a=t.locale)===null||a===void 0||(o=a.options)===null||o===void 0?void 0:o.firstWeekContainsDate)!==null&&i!==void 0?i:h.firstWeekContainsDate)!==null&&r!==void 0?r:(l=h.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&n!==void 0?n:1);if(!(f>=1&&f<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var p=new Date(0);p.setUTCFullYear(d+1,0,f),p.setUTCHours(0,0,0,0);var g=ya(p,t),v=new Date(0);v.setUTCFullYear(d,0,f),v.setUTCHours(0,0,0,0);var m=ya(v,t);return u.getTime()>=g.getTime()?d+1:u.getTime()>=m.getTime()?d:d-1}function EL(e,t){var n,r,i,s,a,o,l,c;it(1,arguments);var u=ma(),d=Ut((n=(r=(i=(s=t==null?void 0:t.firstWeekContainsDate)!==null&&s!==void 0?s:t==null||(a=t.locale)===null||a===void 0||(o=a.options)===null||o===void 0?void 0:o.firstWeekContainsDate)!==null&&i!==void 0?i:u.firstWeekContainsDate)!==null&&r!==void 0?r:(l=u.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&n!==void 0?n:1),h=fg(e,t),f=new Date(0);f.setUTCFullYear(h,0,d),f.setUTCHours(0,0,0,0);var p=ya(f,t);return p}var SL=6048e5;function _L(e,t){it(1,arguments);var n=dt(e),r=ya(n,t).getTime()-EL(n,t).getTime();return Math.round(r/SL)+1}function vt(e,t){for(var n=e<0?"-":"",r=Math.abs(e).toString();r.length<t;)r="0"+r;return n+r}var wL={y:function(t,n){var r=t.getUTCFullYear(),i=r>0?r:1-r;return vt(n==="yy"?i%100:i,n.length)},M:function(t,n){var r=t.getUTCMonth();return n==="M"?String(r+1):vt(r+1,2)},d:function(t,n){return vt(t.getUTCDate(),n.length)},a:function(t,n){var r=t.getUTCHours()/12>=1?"pm":"am";switch(n){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];case"aaaa":default:return r==="am"?"a.m.":"p.m."}},h:function(t,n){return vt(t.getUTCHours()%12||12,n.length)},H:function(t,n){return vt(t.getUTCHours(),n.length)},m:function(t,n){return vt(t.getUTCMinutes(),n.length)},s:function(t,n){return vt(t.getUTCSeconds(),n.length)},S:function(t,n){var r=n.length,i=t.getUTCMilliseconds(),s=Math.floor(i*Math.pow(10,r-3));return vt(s,n.length)}};const pn=wL;var Tr={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},OL={G:function(t,n,r){var i=t.getUTCFullYear()>0?1:0;switch(n){case"G":case"GG":case"GGG":return r.era(i,{width:"abbreviated"});case"GGGGG":return r.era(i,{width:"narrow"});case"GGGG":default:return r.era(i,{width:"wide"})}},y:function(t,n,r){if(n==="yo"){var i=t.getUTCFullYear(),s=i>0?i:1-i;return r.ordinalNumber(s,{unit:"year"})}return pn.y(t,n)},Y:function(t,n,r,i){var s=fg(t,i),a=s>0?s:1-s;if(n==="YY"){var o=a%100;return vt(o,2)}return n==="Yo"?r.ordinalNumber(a,{unit:"year"}):vt(a,n.length)},R:function(t,n){var r=dg(t);return vt(r,n.length)},u:function(t,n){var r=t.getUTCFullYear();return vt(r,n.length)},Q:function(t,n,r){var i=Math.ceil((t.getUTCMonth()+1)/3);switch(n){case"Q":return String(i);case"QQ":return vt(i,2);case"Qo":return r.ordinalNumber(i,{unit:"quarter"});case"QQQ":return r.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(i,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(i,{width:"wide",context:"formatting"})}},q:function(t,n,r){var i=Math.ceil((t.getUTCMonth()+1)/3);switch(n){case"q":return String(i);case"qq":return vt(i,2);case"qo":return r.ordinalNumber(i,{unit:"quarter"});case"qqq":return r.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(i,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(i,{width:"wide",context:"standalone"})}},M:function(t,n,r){var i=t.getUTCMonth();switch(n){case"M":case"MM":return pn.M(t,n);case"Mo":return r.ordinalNumber(i+1,{unit:"month"});case"MMM":return r.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(i,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(i,{width:"wide",context:"formatting"})}},L:function(t,n,r){var i=t.getUTCMonth();switch(n){case"L":return String(i+1);case"LL":return vt(i+1,2);case"Lo":return r.ordinalNumber(i+1,{unit:"month"});case"LLL":return r.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(i,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(i,{width:"wide",context:"standalone"})}},w:function(t,n,r,i){var s=_L(t,i);return n==="wo"?r.ordinalNumber(s,{unit:"week"}):vt(s,n.length)},I:function(t,n,r){var i=bL(t);return n==="Io"?r.ordinalNumber(i,{unit:"week"}):vt(i,n.length)},d:function(t,n,r){return n==="do"?r.ordinalNumber(t.getUTCDate(),{unit:"date"}):pn.d(t,n)},D:function(t,n,r){var i=vL(t);return n==="Do"?r.ordinalNumber(i,{unit:"dayOfYear"}):vt(i,n.length)},E:function(t,n,r){var i=t.getUTCDay();switch(n){case"E":case"EE":case"EEE":return r.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(i,{width:"short",context:"formatting"});case"EEEE":default:return r.day(i,{width:"wide",context:"formatting"})}},e:function(t,n,r,i){var s=t.getUTCDay(),a=(s-i.weekStartsOn+8)%7||7;switch(n){case"e":return String(a);case"ee":return vt(a,2);case"eo":return r.ordinalNumber(a,{unit:"day"});case"eee":return r.day(s,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(s,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(s,{width:"short",context:"formatting"});case"eeee":default:return r.day(s,{width:"wide",context:"formatting"})}},c:function(t,n,r,i){var s=t.getUTCDay(),a=(s-i.weekStartsOn+8)%7||7;switch(n){case"c":return String(a);case"cc":return vt(a,n.length);case"co":return r.ordinalNumber(a,{unit:"day"});case"ccc":return r.day(s,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(s,{width:"narrow",context:"standalone"});case"cccccc":return r.day(s,{width:"short",context:"standalone"});case"cccc":default:return r.day(s,{width:"wide",context:"standalone"})}},i:function(t,n,r){var i=t.getUTCDay(),s=i===0?7:i;switch(n){case"i":return String(s);case"ii":return vt(s,n.length);case"io":return r.ordinalNumber(s,{unit:"day"});case"iii":return r.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(i,{width:"short",context:"formatting"});case"iiii":default:return r.day(i,{width:"wide",context:"formatting"})}},a:function(t,n,r){var i=t.getUTCHours(),s=i/12>=1?"pm":"am";switch(n){case"a":case"aa":return r.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(s,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(s,{width:"wide",context:"formatting"})}},b:function(t,n,r){var i=t.getUTCHours(),s;switch(i===12?s=Tr.noon:i===0?s=Tr.midnight:s=i/12>=1?"pm":"am",n){case"b":case"bb":return r.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(s,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(s,{width:"wide",context:"formatting"})}},B:function(t,n,r){var i=t.getUTCHours(),s;switch(i>=17?s=Tr.evening:i>=12?s=Tr.afternoon:i>=4?s=Tr.morning:s=Tr.night,n){case"B":case"BB":case"BBB":return r.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(s,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(s,{width:"wide",context:"formatting"})}},h:function(t,n,r){if(n==="ho"){var i=t.getUTCHours()%12;return i===0&&(i=12),r.ordinalNumber(i,{unit:"hour"})}return pn.h(t,n)},H:function(t,n,r){return n==="Ho"?r.ordinalNumber(t.getUTCHours(),{unit:"hour"}):pn.H(t,n)},K:function(t,n,r){var i=t.getUTCHours()%12;return n==="Ko"?r.ordinalNumber(i,{unit:"hour"}):vt(i,n.length)},k:function(t,n,r){var i=t.getUTCHours();return i===0&&(i=24),n==="ko"?r.ordinalNumber(i,{unit:"hour"}):vt(i,n.length)},m:function(t,n,r){return n==="mo"?r.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):pn.m(t,n)},s:function(t,n,r){return n==="so"?r.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):pn.s(t,n)},S:function(t,n){return pn.S(t,n)},X:function(t,n,r,i){var s=i._originalDate||t,a=s.getTimezoneOffset();if(a===0)return"Z";switch(n){case"X":return gg(a);case"XXXX":case"XX":return Fn(a);case"XXXXX":case"XXX":default:return Fn(a,":")}},x:function(t,n,r,i){var s=i._originalDate||t,a=s.getTimezoneOffset();switch(n){case"x":return gg(a);case"xxxx":case"xx":return Fn(a);case"xxxxx":case"xxx":default:return Fn(a,":")}},O:function(t,n,r,i){var s=i._originalDate||t,a=s.getTimezoneOffset();switch(n){case"O":case"OO":case"OOO":return"GMT"+pg(a,":");case"OOOO":default:return"GMT"+Fn(a,":")}},z:function(t,n,r,i){var s=i._originalDate||t,a=s.getTimezoneOffset();switch(n){case"z":case"zz":case"zzz":return"GMT"+pg(a,":");case"zzzz":default:return"GMT"+Fn(a,":")}},t:function(t,n,r,i){var s=i._originalDate||t,a=Math.floor(s.getTime()/1e3);return vt(a,n.length)},T:function(t,n,r,i){var s=i._originalDate||t,a=s.getTime();return vt(a,n.length)}};function pg(e,t){var n=e>0?"-":"+",r=Math.abs(e),i=Math.floor(r/60),s=r%60;if(s===0)return n+String(i);var a=t||"";return n+String(i)+a+vt(s,2)}function gg(e,t){if(e%60===0){var n=e>0?"-":"+";return n+vt(Math.abs(e)/60,2)}return Fn(e,t)}function Fn(e,t){var n=t||"",r=e>0?"-":"+",i=Math.abs(e),s=vt(Math.floor(i/60),2),a=vt(i%60,2);return r+s+n+a}const TL=OL;var mg=function(t,n){switch(t){case"P":return n.date({width:"short"});case"PP":return n.date({width:"medium"});case"PPP":return n.date({width:"long"});case"PPPP":default:return n.date({width:"full"})}},vg=function(t,n){switch(t){case"p":return n.time({width:"short"});case"pp":return n.time({width:"medium"});case"ppp":return n.time({width:"long"});case"pppp":default:return n.time({width:"full"})}},ML=function(t,n){var r=t.match(/(P+)(p+)?/)||[],i=r[1],s=r[2];if(!s)return mg(t,n);var a;switch(i){case"P":a=n.dateTime({width:"short"});break;case"PP":a=n.dateTime({width:"medium"});break;case"PPP":a=n.dateTime({width:"long"});break;case"PPPP":default:a=n.dateTime({width:"full"});break}return a.replace("{{date}}",mg(i,n)).replace("{{time}}",vg(s,n))},CL={p:vg,P:ML};const AL=CL;var DL=["D","DD"],LL=["YY","YYYY"];function RL(e){return DL.indexOf(e)!==-1}function IL(e){return LL.indexOf(e)!==-1}function yg(e,t,n){if(e==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var kL={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},$L=function(t,n,r){var i,s=kL[t];return typeof s=="string"?i=s:n===1?i=s.one:i=s.other.replace("{{count}}",n.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"in "+i:i+" ago":i};const PL=$L;var NL={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},UL={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},BL={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},VL={date:fc({formats:NL,defaultWidth:"full"}),time:fc({formats:UL,defaultWidth:"full"}),dateTime:fc({formats:BL,defaultWidth:"full"})};const GL=VL;var HL={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},FL=function(t,n,r,i){return HL[t]};const zL=FL;var WL={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},YL={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},qL={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},XL={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},jL={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},ZL={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},KL=function(t,n){var r=Number(t),i=r%100;if(i>20||i<10)switch(i%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},QL={ordinalNumber:KL,era:Ii({values:WL,defaultWidth:"wide"}),quarter:Ii({values:YL,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:Ii({values:qL,defaultWidth:"wide"}),day:Ii({values:XL,defaultWidth:"wide"}),dayPeriod:Ii({values:jL,defaultWidth:"wide",formattingValues:ZL,defaultFormattingWidth:"wide"})};const JL=QL;var tR=/^(\d+)(th|st|nd|rd)?/i,eR=/\d+/i,nR={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},rR={any:[/^b/i,/^(a|c)/i]},iR={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},sR={any:[/1/i,/2/i,/3/i,/4/i]},aR={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},oR={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},lR={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},cR={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},uR={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},hR={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},dR={ordinalNumber:jD({matchPattern:tR,parsePattern:eR,valueCallback:function(t){return parseInt(t,10)}}),era:ki({matchPatterns:nR,defaultMatchWidth:"wide",parsePatterns:rR,defaultParseWidth:"any"}),quarter:ki({matchPatterns:iR,defaultMatchWidth:"wide",parsePatterns:sR,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:ki({matchPatterns:aR,defaultMatchWidth:"wide",parsePatterns:oR,defaultParseWidth:"any"}),day:ki({matchPatterns:lR,defaultMatchWidth:"wide",parsePatterns:cR,defaultParseWidth:"any"}),dayPeriod:ki({matchPatterns:uR,defaultMatchWidth:"any",parsePatterns:hR,defaultParseWidth:"any"})},fR={code:"en-US",formatDistance:PL,formatLong:GL,formatRelative:zL,localize:JL,match:dR,options:{weekStartsOn:0,firstWeekContainsDate:1}};const xg=fR;var pR=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,gR=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,mR=/^'([^]*?)'?$/,vR=/''/g,yR=/[a-zA-Z]/;function Mr(e,t,n){var r,i,s,a,o,l,c,u,d,h,f,p,g,v,m,y,b,S;it(2,arguments);var _=String(t),E=ma(),M=(r=(i=n==null?void 0:n.locale)!==null&&i!==void 0?i:E.locale)!==null&&r!==void 0?r:xg,C=Ut((s=(a=(o=(l=n==null?void 0:n.firstWeekContainsDate)!==null&&l!==void 0?l:n==null||(c=n.locale)===null||c===void 0||(u=c.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&o!==void 0?o:E.firstWeekContainsDate)!==null&&a!==void 0?a:(d=E.locale)===null||d===void 0||(h=d.options)===null||h===void 0?void 0:h.firstWeekContainsDate)!==null&&s!==void 0?s:1);if(!(C>=1&&C<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var G=Ut((f=(p=(g=(v=n==null?void 0:n.weekStartsOn)!==null&&v!==void 0?v:n==null||(m=n.locale)===null||m===void 0||(y=m.options)===null||y===void 0?void 0:y.weekStartsOn)!==null&&g!==void 0?g:E.weekStartsOn)!==null&&p!==void 0?p:(b=E.locale)===null||b===void 0||(S=b.options)===null||S===void 0?void 0:S.weekStartsOn)!==null&&f!==void 0?f:0);if(!(G>=0&&G<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!M.localize)throw new RangeError("locale must contain localize property");if(!M.formatLong)throw new RangeError("locale must contain formatLong property");var I=dt(e);if(!iL(I))throw new RangeError("Invalid time value");var T=gc(I),L=gL(I,T),R={firstWeekContainsDate:C,weekStartsOn:G,locale:M,_originalDate:I},k=_.match(gR).map(function(O){var U=O[0];if(U==="p"||U==="P"){var P=AL[U];return P(O,M.formatLong)}return O}).join("").match(pR).map(function(O){if(O==="''")return"'";var U=O[0];if(U==="'")return xR(O);var P=TL[U];if(P)return!(n!=null&&n.useAdditionalWeekYearTokens)&&IL(O)&&yg(O,t,String(e)),!(n!=null&&n.useAdditionalDayOfYearTokens)&&RL(O)&&yg(O,t,String(e)),P(L,O,M.localize,R);if(U.match(yR))throw new RangeError("Format string contains an unescaped latin alphabet character `"+U+"`");return O}).join("");return k}function xR(e){var t=e.match(mR);return t?t[1].replace(vR,"'"):e}function bR(e,t){it(2,arguments);var n=Ut(t);return ig(e,-n)}function ER(e,t){it(2,arguments);var n=Ut(t);return pc(e,-n)}function SR(e,t){it(2,arguments);var n=Ut(t);return sg(e,-n)}function bg(e,t){it(2,arguments);var n=Ut(t);return mc(e,-n)}function Eg(e,t){it(2,arguments);var n=Ut(t);return vc(e,-n)}function _R(e,t){it(2,arguments);var n=Ut(t);return og(e,-n)}const Cr={type:ve.END_LINE,threshold:16,numCharacter:14},wR={enabled:!0,position:Er.BOTTOM,clickable:!0,truncation:Cr,alignment:It.LEFT,order:null,additionalItems:[]},OR={x:{enabled:!0,numberOfTicks:15,alignWithAxisTicks:!1},y:{enabled:!0,numberOfTicks:5,alignWithAxisTicks:!1}},TR={enabled:!0},Sg={enabled:!0,showTotal:!0,truncation:Cr,groupLabel:"Group"},_g={top:{visible:!0,includeZero:!0,truncation:Cr},bottom:{visible:!0,includeZero:!0,truncation:Cr},left:{visible:!0,includeZero:!0,truncation:Cr},right:{visible:!0,includeZero:!0,truncation:Cr}},xa={addSpaceOnEdges:1,showDayName:!1,localeObject:xg,timeIntervalFormats:{"15seconds":{primary:"MMM d, pp",secondary:"pp"},minute:{primary:"MMM d, p",secondary:"p"},"30minutes":{primary:"MMM d, p",secondary:"p"},hourly:{primary:"MMM d, hh a",secondary:"hh a"},daily:{primary:"MMM d",secondary:"d"},weekly:{primary:"eee, MMM d",secondary:"eee"},monthly:{primary:"MMM yyyy",secondary:"MMM"},quarterly:{primary:"QQQ ''yy",secondary:"QQQ"},yearly:{primary:"yyyy",secondary:"yyyy"}}},MR=typeof document<"u"&&(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled),qt={width:null,height:null,resizable:!0,theme:hc.WHITE,tooltip:Sg,legend:wR,style:{prefix:"cc"},data:{groupMapsTo:"group",loading:!1,selectedGroups:[]},color:{scale:null,pairing:{numberOfVariants:null,option:1},gradient:{enabled:!1}},toolbar:{enabled:!0,numberOfIcons:3,controls:[{type:Mt.SHOW_AS_DATATABLE},...MR?[{type:Mt.MAKE_FULLSCREEN}]:[],{type:Mt.EXPORT_CSV},{type:Mt.EXPORT_PNG},{type:Mt.EXPORT_JPG}]}},wg=tt({},qt,{thematic:{projection:Ve.geoNaturalEarth1}}),Pi=tt({},qt,{axes:_g,timeScale:xa,grid:OR,ruler:TR,zoomBar:{zoomRatio:.4,minZoomRatio:.01,top:{enabled:!1,type:Ae.GRAPH_VIEW}}}),zn=tt({},Pi,{bars:{maxWidth:16,spacingFactor:.25},timeScale:tt(xa,{addSpaceOnEdges:1})}),CR=tt({},zn,{}),AR=tt({},zn,{}),DR=tt({},zn,{bars:tt({},zn.bars,{dividerSize:1.5})}),LR=tt({},zn,{}),bc=tt({},Pi,{points:{radius:4,fillOpacity:.3,filled:!0,enabled:!0}}),RR=bc,Og=tt({},bc,{points:{radius:3,filled:!1,enabled:!0}}),Tg=tt({},Og,{timeScale:tt(xa,{addSpaceOnEdges:0})}),IR=Tg,kR=tt({},Pi,{bubble:{radiusMapsTo:"radius",radiusLabel:"Radius",radiusRange:e=>{const t=Math.min(e.width,e.height);return[t*3/400,t*25/400]},fillOpacity:.2,enabled:!0},points:{filled:!0},legend:{additionalItems:[{type:$t.RADIUS,name:"Radius"}]}}),$R=tt({},Pi,{bullet:{performanceAreaTitles:["Poor","Satisfactory","Great"]},grid:{x:{enabled:!1},y:{enabled:!1}},legend:{additionalItems:[{type:$t.AREA,name:"Poor area"},{type:$t.AREA,name:"Satisfactory area"},{type:$t.AREA,name:"Great area"},{type:$t.QUARTILE,name:"Quartiles"}]}}),PR=tt({},zn,{bars:{dividerSize:1.5},timeScale:tt(xa,{addSpaceOnEdges:0})}),NR=tt({},qt,{tooltip:tt({},Sg,{wordLabel:"Word",valueLabel:"Value"}),wordCloud:{fontSizeMapsTo:"value",fontSizeRange:e=>{const t=Math.min(e.width,e.height);return[t*20/400,t*75/400]},wordMapsTo:"word"}}),Mg=tt({},qt,{pie:{labels:{formatter:null,enabled:!0},alignment:It.LEFT,sortFunction:null,valueMapsTo:"value"}}),UR=tt({},qt,{legend:{enabled:!1},gauge:{type:Gn.SEMI,arcWidth:16,deltaArrow:{size:e=>e/8,enabled:!0},showPercentageSymbol:!0,status:null,numberSpacing:10,deltaFontSize:e=>e/8,valueFontSize:e=>e/2.5,numberFormatter:e=>Number(e.toFixed(2))%1!==0?e.toFixed(2).toLocaleString():e.toFixed().toLocaleString(),alignment:It.LEFT}}),BR=tt({},Mg,{donut:{center:{numberFontSize:e=>`${Math.min(e/100*24,24)}px`,titleFontSize:e=>`${Math.min(e/100*15,15)}px`,titleYPosition:e=>Math.min(e/80*20,20),numberFormatter:e=>Math.floor(e).toLocaleString()},alignment:It.LEFT}}),Cg=tt({},qt,{legend:{enabled:!1,clickable:!1},meter:{showLabels:!0,proportional:null,statusBar:{percentageIndicator:{enabled:!0}}}}),VR=tt({},Cg,{legend:{enabled:!0}}),GR=tt({},qt,{radar:{axes:{angle:"key",value:"value"},alignment:It.LEFT},tooltip:{gridline:{enabled:!0},valueFormatter:e=>e??"N/A"}}),HR=tt({},zn,{comboChartTypes:[]}),FR=tt({tree:{type:ha.TREE}},qt,{}),zR=tt({},qt,{data:tt(qt.data,{groupMapsTo:"name"})}),WR=tt({},qt,Or,{data:tt(qt.data,{groupMapsTo:"name"})}),YR=tt({},qt,{alluvial:{data:tt(qt.data,{groupMapsTo:"source"}),nodeAlignment:It.CENTER,nodePadding:24,monochrome:!1,nodes:[]}}),qR=tt({},qt,{axes:_g,heatmap:{divider:{state:_r.AUTO},colorLegend:{type:"linear"}}}),XR=tt({},wg,{choropleth:{colorLegend:{type:"linear"}}}),Et={alluvialChart:YR,areaChart:Tg,axisChart:Pi,boxplotChart:LR,bubbleChart:kR,bulletChart:$R,chart:qt,circlePackChart:WR,choroplethChart:XR,comboChart:HR,donutChart:BR,gaugeChart:UR,groupedBarChart:AR,heatmapChart:qR,histogramChart:PR,lineChart:Og,lollipopChart:RR,meterChart:Cg,pieChart:Mg,proportionalMeterChart:VR,radarChart:GR,scatterChart:bc,simpleBarChart:CR,stackedAreaChart:IR,stackedBarChart:DR,thematicChart:wg,treeChart:FR,treemapChart:zR,wordCloudChart:NR};var Ag=(e=>(e["15seconds"]="15seconds",e.minute="minute",e["30minutes"]="30minutes",e.hourly="hourly",e.daily="daily",e.weekly="weekly",e.monthly="monthly",e.quarterly="quarterly",e.yearly="yearly",e))(Ag||{});const Ec=[["15seconds",15*1e3],["minute",60*1e3],["30minutes",30*60*1e3],["hourly",60*60*1e3],["daily",24*60*60*1e3],["monthly",30*24*60*60*1e3],["quarterly",3*30*24*60*60*1e3],["yearly",12*30*24*60*60*1e3]];function Dg(e,t,n,r,i){const s=t===0,a=Number(Mr(new Date(e),"c"))===2,o=Number(Mr(new Date(e),"q"))===1,l=t!==0?n[t-1]:null;switch(r){case"15seconds":return s||Ea(e)||Ni(e,l)||gn(e);case"minute":return s||Ea(e)||Ni(e,l)||gn(e);case"30minutes":return s||Ea(e)||Ni(e,l)||gn(e);case"hourly":return s||Ea(e)||Ni(e,l)||gn(e);case"daily":return i?s||a||gn(e):s||Ni(e,l)||gn(e);case"weekly":return s||a||gn(e);case"monthly":return s||gn(e);case"quarterly":return s||o;case"yearly":return!1;default:throw new Error(`${r} is not a valid time interval.`)}}function Sc(e,t,n,r,i){const s=i.showDayName,a=r==="daily"&&s?"weekly":r,o=new Date(e),l=x(i,"timeIntervalFormats")[a],c=x(l,"primary"),u=x(l,"secondary");let d=Dg(e,t,n,r,s)?c:u;r==="15seconds"&&o.getMilliseconds()!==0&&(d=d.replace("pp","h:mm:ss.SSS a"));const h=i.localeObject;return Mr(o,d,{locale:h})}function ba(e){const t=new Date(e);return{M:t.getMonth()+1,d:t.getDate(),H:t.getHours(),m:t.getMinutes(),s:t.getSeconds()}}function jR(e){if(e)return e.slice(1).map((t,n)=>t-e[n])}function ZR(e){const t=Ec.reduce((n,[,r],i)=>{const s=Ec[n][1],a=Math.abs(s-e),o=Math.abs(r-e);return a<o?n:i},0);return Ec[t][0]}function _c(e,t){if(Ag[t])return t;if(e.length===1)return"15seconds";const n=jR(e),r=cn(n);return ZR(r)}function Ea(e){const{s:t,m:n,H:r}=ba(e);return r===0&&n===0&&t===0}function Ni(e,t){const n=ba(e).M,r=ba(t).M;return n!==r}function gn(e){const{M:t,d:n,s:r,m:i,H:s}=ba(e);return t===1&&n===1&&s===0&&i===0&&r===0}function Lg(e){return e===void 0?"":e.toISOString()}class Ge{constructor(t){this.state={options:{}},this.colorScale={},this.colorClassNames={},this.services=t}getAllDataFromDomain(t){if(!this.getData())return null;const n=this.getOptions();let r=this.getData();const i=this.getDataGroups(),{groupMapsTo:s}=x(n,"data"),a=x(n,"axes");return t&&(r=r.filter(o=>t.includes(o[s]))),a&&Object.keys(a).forEach(o=>{const l=a[o].mapsTo,c=a[o].scaleType;if((c===j.LINEAR||c===j.LOG)&&(r=r.map(u=>({...u,[l]:u[l]===null?u[l]:Number(u[l])}))),l&&a[o].domain)if(c===j.LABELS)r=r.filter(u=>a[o].domain.includes(u[l]));else{const[u,d]=a[o].domain;r=r.filter(h=>!(l in h)||h[l]>=u&&h[l]<=d)}}),r.filter(o=>i.find(l=>l.name===o[s]))}getDisplayData(t){if(!this.get("data"))return null;const{ACTIVE:n}=At.items.status,r=this.getDataGroups(t),{groupMapsTo:i}=this.getOptions().data;return this.getAllDataFromDomain(t).filter(a=>r.find(o=>o.name===a[i]&&o.status===n))}getData(){return this.get("data")}isDataEmpty(){return!this.getData().length}setData(t){const n=this.sanitize(tn(t)),r=this.generateDataGroups(n);return this.set({data:n,dataGroups:r}),n}getDataGroups(t){return x(this.getOptions(),"data","loading")?[]:t?this.get("dataGroups").filter(r=>t.includes(r.name)):this.get("dataGroups")}getActiveDataGroups(t){const{ACTIVE:n}=At.items.status;return this.getDataGroups(t).filter(r=>r.status===n)}getDataGroupNames(t){return this.getDataGroups(t).map(r=>r.name)}getActiveDataGroupNames(t){return this.getActiveDataGroups(t).map(r=>r.name)}aggregateBinDataByGroup(t){return CD(t,"group")}getBinConfigurations(){const t=this.getDisplayData(),n=this.getOptions(),r=this.services.cartesianScales.getMainXAxisPosition(),i=this.services.cartesianScales.getDomainIdentifier(),s=n.axes[r],{groupMapsTo:a}=n.data,{bins:o=FD.defaultBins}=s,l=Array.isArray(o),c=cv().value(f=>f[i]).thresholds(o)(t);if(l)c[c.length-1].x1=o[o.length-1];else{const f=c[0].x1-c[0].x0;c[c.length-1].x1=+c[c.length-1].x0+f}const u=l?[o[0],o[o.length-1]]:[c[0].x0,c[c.length-1].x1],d=Array.from(new Set(t.map(f=>f[a]))),h=[];return c.forEach(f=>{const p=`${f.x0}-${f.x1}`,g=this.aggregateBinDataByGroup(f);d.forEach(v=>{h.push({group:v,key:p,value:g[v]||0,bin:f.x0})})}),{bins:c,binsDomain:u}}getBinnedStackedData(){const t=this.getOptions(),{groupMapsTo:n}=t.data,r=this.getActiveDataGroupNames(),{bins:i}=this.getBinConfigurations(),s=this.getDataValuesGroupedByKeys({bins:i});return xl().keys(r)(s).map((a,o)=>Object.keys(a).filter(l=>!isNaN(l)).map(l=>{const c=a[l];return c[n]=r[o],c}))}getGroupedData(t){const n=this.getDisplayData(t),r={},{groupMapsTo:i}=this.getOptions().data;return n.map(s=>{const a=s[i];r[a]!==null&&r[a]!==void 0?r[a].push(s):r[a]=[s]}),Object.keys(r).map(s=>({name:s,data:r[s]}))}getStackKeys({bins:t=null,groups:n=null}={bins:null,groups:null}){const r=this.getOptions(),i=this.getDisplayData(n);let s;t?s=t.map(l=>`${l.x0}-${l.x1}`):s=Oi(i.map(l=>{const c=this.services.cartesianScales.getDomainIdentifier(l);return l[c]instanceof Date?Lg(l[c]):l[c]&&typeof l[c].toString=="function"?l[c].toString():l[c]}));const a=this.services.cartesianScales.domainAxisPosition,o=r.axes[a].scaleType;return o===j.TIME?s.sort((l,c)=>{const u=new Date(l),d=new Date(c);return u-d}):(o===j.LOG||o===j.LINEAR)&&s.sort((l,c)=>l-c),s}getDataValuesGroupedByKeys({bins:t=null,groups:n=null}){const r=this.getOptions(),{groupMapsTo:i}=r.data,s=this.getDisplayData(n),a=this.getDataGroupNames(),o=this.getStackKeys({bins:t,groups:n});return t?o.map(l=>{const[c,u]=l.split("-"),d={x0:c,x1:u},h=t.find(f=>f.x0.toString()===c.toString());return a.forEach(f=>{d[f]=h.filter(p=>p[i]===f).length}),d}):o.map(l=>{const c={sharedStackKey:l};return a.forEach(u=>{const d=s.find(f=>{const p=this.services.cartesianScales.getDomainIdentifier(f);return f[i]===u&&Object.prototype.hasOwnProperty.call(f,p)&&(f[p]instanceof Date?Lg(f[p])===l:f[p].toString()===l)}),h=this.services.cartesianScales.getRangeIdentifier(c);c[u]=d?d[h]:null}),c})}getStackedData({percentage:t=!1,groups:n=null,divergent:r=!1}){const i=this.getOptions(),{groupMapsTo:s}=i.data,a=this.getActiveDataGroupNames(n),o=this.getDataValuesGroupedByKeys({groups:n});if(t){const c=wD(o.map(u=>[u.sharedStackKey,0]));o.forEach(u=>{a.forEach(d=>{c[u.sharedStackKey]+=u[d]})}),o.forEach(u=>{a.forEach(d=>{const h=c[u.sharedStackKey];c[u.sharedStackKey]?u[d]=u[d]/h*100:u[d]=0})})}return(r?xl().offset(g_):xl()).keys(a)(o).map((c,u)=>Object.keys(c).filter(d=>!isNaN(d)).map(d=>{const h=c[d];return h[s]=a[u],h}))}getOptions(){return this.state.options}set(t,n){this.state=Object.assign({},this.state,t);const r=Object.assign({skipUpdate:!1,animate:!0},n);r.skipUpdate||this.update(r.animate)}get(t){return t?this.state[t]:this.state}setOptions(t){const n=this.getOptions();dc(n,t),this.set({options:tt(n,t)})}update(t=!0){this.getDisplayData()&&(this.updateAllDataGroups(),this.setCustomColorScale(),this.setColorClassNames(),this.services.events.dispatchEvent(w.Model.UPDATE,{animate:t}))}toggleDataLabel(t){const{ACTIVE:n,DISABLED:r}=At.items.status,i=this.getDataGroups(),s=i.some(u=>u.status===r),a=i.filter(u=>u.status===n);if(s)if(a.length===1&&a[0].name===t)i.forEach((u,d)=>{i[d].status=n});else{const u=i.findIndex(d=>d.name===t);i[u].status=i[u].status===r?n:r}else i.forEach((u,d)=>{i[d].status=u.name===t?n:r});const o=i.filter(u=>u.status===n),l=this.getOptions();i.some(u=>u.status===r)?l.data.selectedGroups=o.map(u=>u.name):l.data.selectedGroups=[],this.services.events.dispatchEvent(w.Legend.ITEMS_UPDATE,{dataGroups:i}),this.set({dataGroups:i})}getIsFilled(t,n,r,i){const s=this.getOptions();return s.getIsFilled?s.getIsFilled(t,n,r,i):i}getFillColor(t,n,r){const i=this.getOptions(),s=x(this.colorScale,t);return i.getFillColor?i.getFillColor(t,n,r,s):s}getStrokeColor(t,n,r){const i=this.getOptions(),s=x(this.colorScale,t);return i.getStrokeColor?i.getStrokeColor(t,n,r,s):s}isUserProvidedColorScaleValid(){const t=x(this.getOptions(),"color","scale"),n=this.getDataGroups();return t==null||Object.keys(t).length==0?!1:n.some(r=>Object.keys(t).includes(r.name))}getColorClassName(t){const n=this.colorClassNames(t.dataGroupName);let r=t.originalClassName;return t.classNameTypes.forEach(i=>r=t.originalClassName?`${r} ${i}-${n}`:`${i}-${n}`),r||""}getStatus(){return null}getAllDataGroupsNames(){return this.allDataGroups}transformToTabularData(t){console.warn("We've updated the charting data format to be tabular by default. The current format you're using is deprecated and will be removed in v1.0, read more here https://carbon-design-system.github.io/carbon-charts/?path=/story/docs-tutorials--tabular-data-format");const n=[],{datasets:r,labels:i}=t;return r.forEach(s=>{s.data.forEach((a,o)=>{let l;const c=x(s,"label");if(c===null){const d=x(i,o);d?l=d:l="Ungrouped"}else l=c;const u={group:l,key:i[o]};isNaN(a)?(u.value=a.value,u.date=a.date):u.value=a,n.push(u)})}),n}getTabularDataArray(){return[]}exportToCSV(){const t=this.getTabularDataArray().map(i=>i.map(s=>`"${s==="&ndash;"?"–":s}"`));let n="",r="";t.forEach(function(i,s){r=i.join(","),n+=s<t.length?r+`
2
- `:r}),this.services.files.downloadCSV(n,"myChart.csv")}getTabularData(t){return Array.isArray(t)?t:this.transformToTabularData(t)}sanitize(t){return t=this.getTabularData(t),t}updateAllDataGroups(){this.allDataGroups?this.getDataGroupNames().forEach(t=>{this.allDataGroups.indexOf(t)===-1&&this.allDataGroups.push(t)}):this.allDataGroups=this.getDataGroupNames()}generateDataGroups(t){const{groupMapsTo:n}=this.getOptions().data,{ACTIVE:r,DISABLED:i}=At.items.status,s=this.getOptions(),a=Oi(t.map(l=>l[n]));s.data.selectedGroups.length&&(s.data.selectedGroups.every(c=>a.includes(c))||(s.data.selectedGroups=[]));const o=l=>!s.data.selectedGroups.length||s.data.selectedGroups.includes(l)?r:i;return a.map(l=>({name:l,status:o(l)}))}setCustomColorScale(){if(!this.isUserProvidedColorScaleValid())return;const t=this.getOptions(),n=x(t,"color","scale");Object.keys(n).forEach(i=>{this.allDataGroups.includes(i)||console.warn(`"${i}" does not exist in data groups.`)}),this.allDataGroups.filter(i=>n[i]).forEach(i=>this.colorScale[i]=n[i])}setColorClassNames(){const t=x(this.getOptions(),"color","pairing");let n=x(t,"numberOfVariants");(!n||n<this.allDataGroups.length)&&(n=this.allDataGroups.length);let r=x(t,"option");const i=Qp.pairingOptions,s=n>5?14:n,a=`${s}-color`;r=r<=i[a]?r:1;const o=this.allDataGroups.map((l,c)=>`${s}-${r}-${c%14+1}`);this.colorClassNames=ks().range(o).domain(this.allDataGroups)}}function KR(e,t){if(e.match(/^[a-z]+:\/\//i))return e;if(e.match(/^\/\//))return window.location.protocol+e;if(e.match(/^[a-z]+:/i))return e;const n=document.implementation.createHTMLDocument(),r=n.createElement("base"),i=n.createElement("a");return n.head.appendChild(r),n.body.appendChild(i),t&&(r.href=t),i.href=e,i.href}const QR=(()=>{let e=0;const t=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(e+=1,`u${t()}${e}`)})();function an(e){const t=[];for(let n=0,r=e.length;n<r;n++)t.push(e[n]);return t}function Sa(e,t){const r=(e.ownerDocument.defaultView||window).getComputedStyle(e).getPropertyValue(t);return r?parseFloat(r.replace("px","")):0}function JR(e){const t=Sa(e,"border-left-width"),n=Sa(e,"border-right-width");return e.clientWidth+t+n}function t2(e){const t=Sa(e,"border-top-width"),n=Sa(e,"border-bottom-width");return e.clientHeight+t+n}function Rg(e,t={}){const n=t.width||JR(e),r=t.height||t2(e);return{width:n,height:r}}function e2(){let e,t;try{t=process}catch{}const n=t&&t.env?t.env.devicePixelRatio:null;return n&&(e=parseInt(n,10),Number.isNaN(e)&&(e=1)),e||window.devicePixelRatio||1}const ue=16384;function n2(e){(e.width>ue||e.height>ue)&&(e.width>ue&&e.height>ue?e.width>e.height?(e.height*=ue/e.width,e.width=ue):(e.width*=ue/e.height,e.height=ue):e.width>ue?(e.height*=ue/e.width,e.width=ue):(e.width*=ue/e.height,e.height=ue))}function _a(e){return new Promise((t,n)=>{const r=new Image;r.decode=()=>t(r),r.onload=()=>t(r),r.onerror=n,r.crossOrigin="anonymous",r.decoding="async",r.src=e})}async function r2(e){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then(t=>`data:image/svg+xml;charset=utf-8,${t}`)}async function i2(e,t,n){const r="http://www.w3.org/2000/svg",i=document.createElementNS(r,"svg"),s=document.createElementNS(r,"foreignObject");return i.setAttribute("width",`${t}`),i.setAttribute("height",`${n}`),i.setAttribute("viewBox",`0 0 ${t} ${n}`),s.setAttribute("width","100%"),s.setAttribute("height","100%"),s.setAttribute("x","0"),s.setAttribute("y","0"),s.setAttribute("externalResourcesRequired","true"),i.appendChild(s),s.appendChild(e),r2(i)}const ne=(e,t)=>{if(e instanceof t)return!0;const n=Object.getPrototypeOf(e);return n===null?!1:n.constructor.name===t.name||ne(n,t)};function s2(e){const t=e.getPropertyValue("content");return`${e.cssText} content: '${t.replace(/'|"/g,"")}';`}function a2(e){return an(e).map(t=>{const n=e.getPropertyValue(t),r=e.getPropertyPriority(t);return`${t}: ${n}${r?" !important":""};`}).join(" ")}function o2(e,t,n){const r=`.${e}:${t}`,i=n.cssText?s2(n):a2(n);return document.createTextNode(`${r}{${i}}`)}function Ig(e,t,n){const r=window.getComputedStyle(e,n),i=r.getPropertyValue("content");if(i===""||i==="none")return;const s=QR();try{t.className=`${t.className} ${s}`}catch{return}const a=document.createElement("style");a.appendChild(o2(s,n,r)),t.appendChild(a)}function l2(e,t){Ig(e,t,":before"),Ig(e,t,":after")}const kg="application/font-woff",$g="image/jpeg",c2={woff:kg,woff2:kg,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:$g,jpeg:$g,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function u2(e){const t=/\.([^./]*?)$/g.exec(e);return t?t[1]:""}function wc(e){const t=u2(e).toLowerCase();return c2[t]||""}function h2(e){return e.split(/,/)[1]}function Oc(e){return e.search(/^(data:)/)!==-1}function Pg(e,t){return`data:${t};base64,${e}`}async function Ng(e,t,n){const r=await fetch(e,t);if(r.status===404)throw new Error(`Resource "${r.url}" not found`);const i=await r.blob();return new Promise((s,a)=>{const o=new FileReader;o.onerror=a,o.onloadend=()=>{try{s(n({res:r,result:o.result}))}catch(l){a(l)}},o.readAsDataURL(i)})}const Tc={};function d2(e,t,n){let r=e.replace(/\?.*/,"");return n&&(r=e),/ttf|otf|eot|woff2?/i.test(r)&&(r=r.replace(/.*\//,"")),t?`[${t}]${r}`:r}async function Mc(e,t,n){const r=d2(e,t,n.includeQueryParams);if(Tc[r]!=null)return Tc[r];n.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+new Date().getTime());let i;try{const s=await Ng(e,n.fetchRequestInit,({res:a,result:o})=>(t||(t=a.headers.get("Content-Type")||""),h2(o)));i=Pg(s,t)}catch(s){i=n.imagePlaceholder||"";let a=`Failed to fetch resource: ${e}`;s&&(a=typeof s=="string"?s:s.message),a&&console.warn(a)}return Tc[r]=i,i}async function f2(e){const t=e.toDataURL();return t==="data:,"?e.cloneNode(!1):_a(t)}async function p2(e,t){if(e.currentSrc){const s=document.createElement("canvas"),a=s.getContext("2d");s.width=e.clientWidth,s.height=e.clientHeight,a==null||a.drawImage(e,0,0,s.width,s.height);const o=s.toDataURL();return _a(o)}const n=e.poster,r=wc(n),i=await Mc(n,r,t);return _a(i)}async function g2(e){var t;try{if(!((t=e==null?void 0:e.contentDocument)===null||t===void 0)&&t.body)return await wa(e.contentDocument.body,{},!0)}catch{}return e.cloneNode(!1)}async function m2(e,t){return ne(e,HTMLCanvasElement)?f2(e):ne(e,HTMLVideoElement)?p2(e,t):ne(e,HTMLIFrameElement)?g2(e):e.cloneNode(!1)}const v2=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SLOT";async function y2(e,t,n){var r,i;let s=[];return v2(e)&&e.assignedNodes?s=an(e.assignedNodes()):ne(e,HTMLIFrameElement)&&(!((r=e.contentDocument)===null||r===void 0)&&r.body)?s=an(e.contentDocument.body.childNodes):s=an(((i=e.shadowRoot)!==null&&i!==void 0?i:e).childNodes),s.length===0||ne(e,HTMLVideoElement)||await s.reduce((a,o)=>a.then(()=>wa(o,n)).then(l=>{l&&t.appendChild(l)}),Promise.resolve()),t}function x2(e,t){const n=t.style;if(!n)return;const r=window.getComputedStyle(e);r.cssText?(n.cssText=r.cssText,n.transformOrigin=r.transformOrigin):an(r).forEach(i=>{let s=r.getPropertyValue(i);i==="font-size"&&s.endsWith("px")&&(s=`${Math.floor(parseFloat(s.substring(0,s.length-2)))-.1}px`),ne(e,HTMLIFrameElement)&&i==="display"&&s==="inline"&&(s="block"),i==="d"&&t.getAttribute("d")&&(s=`path(${t.getAttribute("d")})`),n.setProperty(i,s,r.getPropertyPriority(i))})}function b2(e,t){ne(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),ne(e,HTMLInputElement)&&t.setAttribute("value",e.value)}function E2(e,t){if(ne(e,HTMLSelectElement)){const n=t,r=Array.from(n.children).find(i=>e.value===i.getAttribute("value"));r&&r.setAttribute("selected","")}}function S2(e,t){return ne(t,Element)&&(x2(e,t),l2(e,t),b2(e,t),E2(e,t)),t}async function _2(e,t){const n=e.querySelectorAll?e.querySelectorAll("use"):[];if(n.length===0)return e;const r={};for(let s=0;s<n.length;s++){const o=n[s].getAttribute("xlink:href");if(o){const l=e.querySelector(o),c=document.querySelector(o);!l&&c&&!r[o]&&(r[o]=await wa(c,t,!0))}}const i=Object.values(r);if(i.length){const s="http://www.w3.org/1999/xhtml",a=document.createElementNS(s,"svg");a.setAttribute("xmlns",s),a.style.position="absolute",a.style.width="0",a.style.height="0",a.style.overflow="hidden",a.style.display="none";const o=document.createElementNS(s,"defs");a.appendChild(o);for(let l=0;l<i.length;l++)o.appendChild(i[l]);e.appendChild(a)}return e}async function wa(e,t,n){return!n&&t.filter&&!t.filter(e)?null:Promise.resolve(e).then(r=>m2(r,t)).then(r=>y2(e,r,t)).then(r=>S2(e,r)).then(r=>_2(r,t))}const Ug=/url\((['"]?)([^'"]+?)\1\)/g,w2=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,O2=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function T2(e){const t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}function M2(e){const t=[];return e.replace(Ug,(n,r,i)=>(t.push(i),n)),t.filter(n=>!Oc(n))}async function C2(e,t,n,r,i){try{const s=n?KR(t,n):t,a=wc(t);let o;if(i){const l=await i(s);o=Pg(l,a)}else o=await Mc(s,a,r);return e.replace(T2(t),`$1${o}$3`)}catch{}return e}function A2(e,{preferredFontFormat:t}){return t?e.replace(O2,n=>{for(;;){const[r,,i]=w2.exec(n)||[];if(!i)return"";if(i===t)return`src: ${r};`}}):e}function Bg(e){return e.search(Ug)!==-1}async function Vg(e,t,n){if(!Bg(e))return e;const r=A2(e,n);return M2(r).reduce((s,a)=>s.then(o=>C2(o,a,t,n)),Promise.resolve(r))}async function Oa(e,t,n){var r;const i=(r=t.style)===null||r===void 0?void 0:r.getPropertyValue(e);if(i){const s=await Vg(i,null,n);return t.style.setProperty(e,s,t.style.getPropertyPriority(e)),!0}return!1}async function D2(e,t){await Oa("background",e,t)||await Oa("background-image",e,t),await Oa("mask",e,t)||await Oa("mask-image",e,t)}async function L2(e,t){const n=ne(e,HTMLImageElement);if(!(n&&!Oc(e.src))&&!(ne(e,SVGImageElement)&&!Oc(e.href.baseVal)))return;const r=n?e.src:e.href.baseVal,i=await Mc(r,wc(r),t);await new Promise((s,a)=>{e.onload=s,e.onerror=a;const o=e;o.decode&&(o.decode=s),o.loading==="lazy"&&(o.loading="eager"),n?(e.srcset="",e.src=i):e.href.baseVal=i})}async function R2(e,t){const r=an(e.childNodes).map(i=>Gg(i,t));await Promise.all(r).then(()=>e)}async function Gg(e,t){ne(e,Element)&&(await D2(e,t),await L2(e,t),await R2(e,t))}function I2(e,t){const{style:n}=e;t.backgroundColor&&(n.backgroundColor=t.backgroundColor),t.width&&(n.width=`${t.width}px`),t.height&&(n.height=`${t.height}px`);const r=t.style;return r!=null&&Object.keys(r).forEach(i=>{n[i]=r[i]}),e}const Hg={};async function Fg(e){let t=Hg[e];if(t!=null)return t;const r=await(await fetch(e)).text();return t={url:e,cssText:r},Hg[e]=t,t}async function zg(e,t){let n=e.cssText;const r=/url\(["']?([^"')]+)["']?\)/g,s=(n.match(/url\([^)]+\)/g)||[]).map(async a=>{let o=a.replace(r,"$1");return o.startsWith("https://")||(o=new URL(o,e.url).href),Ng(o,t.fetchRequestInit,({result:l})=>(n=n.replace(a,`url(${l})`),[a,l]))});return Promise.all(s).then(()=>n)}function Wg(e){if(e==null)return[];const t=[],n=/(\/\*[\s\S]*?\*\/)/gi;let r=e.replace(n,"");const i=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){const l=i.exec(r);if(l===null)break;t.push(l[0])}r=r.replace(i,"");const s=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,a="((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})",o=new RegExp(a,"gi");for(;;){let l=s.exec(r);if(l===null){if(l=o.exec(r),l===null)break;s.lastIndex=o.lastIndex}else o.lastIndex=s.lastIndex;t.push(l[0])}return t}async function k2(e,t){const n=[],r=[];return e.forEach(i=>{if("cssRules"in i)try{an(i.cssRules||[]).forEach((s,a)=>{if(s.type===CSSRule.IMPORT_RULE){let o=a+1;const l=s.href,c=Fg(l).then(u=>zg(u,t)).then(u=>Wg(u).forEach(d=>{try{i.insertRule(d,d.startsWith("@import")?o+=1:i.cssRules.length)}catch(h){console.error("Error inserting rule from remote css",{rule:d,error:h})}})).catch(u=>{console.error("Error loading remote css",u.toString())});r.push(c)}})}catch(s){const a=e.find(o=>o.href==null)||document.styleSheets[0];i.href!=null&&r.push(Fg(i.href).then(o=>zg(o,t)).then(o=>Wg(o).forEach(l=>{a.insertRule(l,i.cssRules.length)})).catch(o=>{console.error("Error loading remote stylesheet",o)})),console.error("Error inlining remote css file",s)}}),Promise.all(r).then(()=>(e.forEach(i=>{if("cssRules"in i)try{an(i.cssRules||[]).forEach(s=>{n.push(s)})}catch(s){console.error(`Error while reading CSS rules from ${i.href}`,s)}}),n))}function $2(e){return e.filter(t=>t.type===CSSRule.FONT_FACE_RULE).filter(t=>Bg(t.style.getPropertyValue("src")))}async function P2(e,t){if(e.ownerDocument==null)throw new Error("Provided element is not within a Document");const n=an(e.ownerDocument.styleSheets),r=await k2(n,t);return $2(r)}async function N2(e,t){const n=await P2(e,t);return(await Promise.all(n.map(i=>{const s=i.parentStyleSheet?i.parentStyleSheet.href:null;return Vg(i.cssText,s,t)}))).join(`
3
- `)}async function U2(e,t){const n=t.fontEmbedCSS!=null?t.fontEmbedCSS:t.skipFonts?null:await N2(e,t);if(n){const r=document.createElement("style"),i=document.createTextNode(n);r.appendChild(i),e.firstChild?e.insertBefore(r,e.firstChild):e.appendChild(r)}}async function B2(e,t={}){const{width:n,height:r}=Rg(e,t),i=await wa(e,t,!0);return await U2(i,t),await Gg(i,t),I2(i,t),await i2(i,n,r)}async function Yg(e,t={}){const{width:n,height:r}=Rg(e,t),i=await B2(e,t),s=await _a(i),a=document.createElement("canvas"),o=a.getContext("2d"),l=t.pixelRatio||e2(),c=t.canvasWidth||n,u=t.canvasHeight||r;return a.width=c*l,a.height=u*l,t.skipAutoScale||n2(a),a.style.width=`${c}`,a.style.height=`${u}`,t.backgroundColor&&(o.fillStyle=t.backgroundColor,o.fillRect(0,0,a.width,a.height)),o.drawImage(s,0,0,a.width,a.height),a}async function V2(e,t={}){return(await Yg(e,t)).toDataURL()}async function G2(e,t={}){return(await Yg(e,t)).toDataURL("image/jpeg",t.quality||1)}class on{constructor(t,n){this.model=t,this.services=n,this.init()}init(){}update(){}setModel(t){this.model=t}setServices(t){this.services=t}}const H2="DONT_STYLE_ME_css_styles_verifier";class A extends on{constructor(t,n){super(t,n),this.chartID=""}static getHTMLElementSize(t){return{width:t.clientWidth,height:t.clientHeight}}static getSVGElementSize(t,n={useAttrs:!1,useClientDimensions:!1,useBBox:!1,useBoundingRect:!1}){t.attr||(t=D(t));const r={width:0,height:0},i=h=>{h&&Object.keys(r).forEach(f=>{if(h[f]){const p=h[f],g=parseFloat(p);p&&g>r[f]&&(""+p).indexOf("%")===-1&&(r[f]=g)}})},s={width:t.attr("width"),height:t.attr("height")},a=t.node();let o,l,c,u;try{typeof a.getBBox=="function"&&(o=a.getBBox(),l={width:o.width,height:o.height})}catch(h){console.error(h)}try{typeof(a==null?void 0:a.getBoundingClientRect)=="function"&&(c=a.getBoundingClientRect(),u={width:c.width,height:c.height})}catch(h){console.error(h)}let d;if(a instanceof SVGSVGElement&&(d={width:a.clientWidth,height:a.clientHeight}),n){if(n.useAttrs&&(i(s),r.width>0&&r.height>0))return r;if(n.useClientDimensions&&(i(d),r.width>0&&r.height>0))return d;if(n.useBBox&&(i(l),r.width>0&&r.height>0))return l;if(n.useBoundingRect&&(i(u),r.width>0&&r.height>0))return u}try{const h={width:x(t.node(),"width","baseVal","value"),height:x(t.node(),"height","baseVal","value")};i(h)}catch{i(d),i(l),i(s)}return r}static appendOrSelect(t,n){const r=t.select(`${n}`);if(r.empty()){let i=n.split("#"),s,a;return i.length===2?(s=i[0],i=i[1].split("."),a=i[0]):(i=n.split("."),s=i[0]),t.append(s).attr("id",a).attr("class",i.slice(1).join(" "))}return r}init(){this.styleHolderElement(),this.initializeID(),this.addMainContainer(),this.model.getOptions().resizable&&this.addResizeListener(),this.addHolderListeners(),this.handleFullscreenChange()}getChartID(){return this.chartID}generateElementIDString(t){return`chart-${this.chartID}-${t}`}initializeID(){this.chartID=Math.floor((1+Math.random())*281474976710656).toString(16)}addMainContainer(){const t=this.model.getOptions(),n=x(t,"style","prefix"),r=D(this.getHolder()).append("div").classed(`${ee}--${n}--chart-wrapper`,!0).attr("id",`chart-${this.getChartID()}`).style("height","100%").style("width","100%");r.append("g").attr("class",H2),this.mainContainer=r.node()}update(){this.styleHolderElement()}styleHolderElement(){const t=this.getHolder(),{width:n,height:r,theme:i}=this.model.getOptions();n!==this.width&&(t.style.width=n,this.width=n),r!==this.height&&(t.style.height=r,this.height=r),D(this.getHolder()).classed(`${ee}--chart-holder`,!0).attr("data-carbon-theme",i)}getHolder(){return this.model.get("holder")}exportToJPG(){const t=this,n=this.getHolder(),r=D(n);r.classed("filled",!0),G2(this.getMainContainer(),{quality:1,filter:i=>!(i.classList&&i.classList.contains("cds--cc--toolbar"))}).then(function(i){var s;(s=t.services.files)==null||s.downloadImage(i,"myChart.jpg"),r.classed("filled",!1)})}exportToPNG(){const t=this,n=this.getHolder(),r=D(n);r.classed("filled",!0),V2(this.getMainContainer(),{quality:1,filter:i=>!(i.classList&&i.classList.contains("cds--cc--toolbar"))}).then(function(i){var s;(s=t.services.files)==null||s.downloadImage(i,"myChart.png"),r.classed("filled",!1)}).catch(function(i){console.error("oops, something went wrong!",i)})}toggleFullscreen(){const t=this.getHolder();D(t).classed("fullscreen")&&(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement)?document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen():t.requestFullscreen?t.requestFullscreen():t.webkitRequestFullscreen?t.webkitRequestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.msRequestFullscreen&&t.msRequestFullscreen()}handleFullscreenChange(){document.addEventListener("fullscreenchange",()=>{const t=D(this.getHolder()),n=t.classed("fullscreen");t.classed("fullscreen",!n)})}setSVGMaxHeight(){if(!this.model.getOptions().height){const{height:t}=A.getSVGElementSize(D(this.mainContainer),{useBBox:!0}),n=D(this.mainContainer).attr("class"),r=D(this.mainContainer).selectAll(`.${n} > svg`);let i=0;r.nodes().forEach(function(s){i+=Number(A.getSVGElementSize(D(s),{useBBox:!0}).height)}),i<=t?D(this.mainContainer).attr("height",i):D(this.mainContainer).attr("height","100%")}}getMainContainer(){return this.mainContainer}addHolderListeners(){const t=this.getHolder();t&&D(t).on("mouseover",()=>{var n;(n=this.services.events)==null||n.dispatchEvent(w.Chart.MOUSEOVER)}).on("mouseout",()=>{var n;(n=this.services.events)==null||n.dispatchEvent(w.Chart.MOUSEOUT)})}addResizeListener(){const t=this.getHolder();if(!t)return;let n=t.clientWidth,r=t.clientHeight;const i=ua(()=>{var a;t&&(Math.abs(n-t.clientWidth)>1||Math.abs(r-t.clientHeight)>1)&&(n=t.clientWidth,r=t.clientHeight,(a=this.services.events)==null||a.dispatchEvent(w.Chart.RESIZE))},12.5);new ResizeObserver(i).observe(t)}}class lt{constructor(t,n,r){if(this.type="",this.renderType=Z.HTML,this.id="",this.parent=void 0,this.configs={},this.model=t,this.services=n,r&&(this.configs=r,this.configs.id)){const i=x(this.model.getOptions(),"style","prefix");this.id=`${i}--${this.configs.id}`}this.parent||this.setParent(D(this.services.domUtils.getMainContainer()))}init(){}render(t=!0){console.error("Error: Component did not provide the required render function.")}destroy(){}setModel(t){this.model=t}setServices(t){this.services=t}setParent(t){var r;const n=this.parent;if(this.parent=t,!(n&&n.node()===t.node())&&this.type){const i=x(this.model.getOptions(),"style","prefix");(r=this.parent)==null||r.classed(`${ee}--${i}--${this.type}`,!0),n&&n.classed(`${ee}--${i}--${this.type}`,!1)}}getParent(){return this.parent}getComponentContainer(t={withinChartClip:!1}){if(this.type){const n=x(this.model.getOptions(),"style","prefix"),r=this.id?`#${this.id}`:"",i=A.appendOrSelect(this.parent,`${this.renderType===Z.SVG?"svg":"div"}${r}.${ee}--${n}--${this.type}`);if(t.withinChartClip){const s=this.model.get("chartClipId");if(s){const o=D(`#${s}`).select("rect");o.size()!==0&&parseFloat(o.attr("height"))>0&&i.attr("clip-path",`url(#${s})`)}}return i.attr("width","100%").attr("height","100%")}return this.parent}getOptions(){return this.configs.options?tt({},this.model.getOptions(),this.configs.options):this.model.getOptions()}}const qg=class Fm extends lt{constructor(){super(...arguments),this.type="toolbar",this.renderType=Z.HTML}init(){const t=()=>this.updateOverflowMenu(!1);this.services.events.addEventListener(w.Toolbar.SHOW_OVERFLOW_MENU,()=>{this.renderOverflowMenu(),document.body.addEventListener("click",t)}),this.services.events.addEventListener(w.Toolbar.HIDE_OVERFLOW_MENU,()=>{document.body.removeEventListener("click",t)})}render(t=!0){const n=this.getComponentContainer().attr("role","toolbar").attr("aria-label",`chart-${this.services.domUtils.getChartID()} toolbar`);if(x(this.getOptions(),"data","loading"))n.html(""),this.overflowMenu=null;else{this.overflowMenu||(this.overflowMenu=n.append("div").attr("class","cds--overflow-menu-options cds--overflow-menu--flip cds--overflow-menu-options cds--overflow-menu--flip").attr("tabindex",-1).html("<ul role='menu'></ul>"));const{buttonList:i,overflowMenuItemList:s}=this.getControlConfigs();s&&i.push(this.getOverflowButtonConfig());const a=n.selectAll("div.toolbar-control").data(i,c=>c.id);a.exit().remove();const o=a.enter().append("div").attr("class","toolbar-control cds--overflow-menu cds--overflow-menu").attr("role","button"),l=this;o.merge(a).classed("disabled",c=>c.shouldBeDisabled()).attr("aria-disabled",c=>c.shouldBeDisabled()).attr("aria-label",c=>c.title).html(c=>`
1
+ (function(z,xe){typeof exports=="object"&&typeof module<"u"?xe(exports):typeof define=="function"&&define.amd?define(["exports"],xe):(z=typeof globalThis<"u"?globalThis:z||self,xe(z.Charts={}))})(this,function(z){"use strict";function xe(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Wm(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Ga(e){let t,n,r;e.length!==2?(t=xe,n=(o,l)=>xe(e(o),l),r=(o,l)=>e(o)-l):(t=e===xe||e===Wm?e:Ym,n=e,r=e);function i(o,l,c=0,u=o.length){if(c<u){if(t(l,l)!==0)return u;do{const d=c+u>>>1;n(o[d],l)<0?c=d+1:u=d}while(c<u)}return c}function s(o,l,c=0,u=o.length){if(c<u){if(t(l,l)!==0)return u;do{const d=c+u>>>1;n(o[d],l)<=0?c=d+1:u=d}while(c<u)}return c}function a(o,l,c=0,u=o.length){const d=i(o,l,c,u-1);return d>c&&r(o[d-1],l)>-r(o[d],l)?d-1:d}return{left:i,center:a,right:s}}function Ym(){return 0}function qm(e){return e===null?NaN:+e}function*Xm(e,t){if(t===void 0)for(let n of e)n!=null&&(n=+n)>=n&&(yield n);else{let n=-1;for(let r of e)(r=t(r,++n,e))!=null&&(r=+r)>=r&&(yield r)}}const jm=Ga(xe).right;Ga(qm).center;const Ha=jm;function Zm(e,t){let n=0;if(t===void 0)for(let r of e)r!=null&&(r=+r)>=r&&++n;else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(i=+i)>=i&&++n}return n}function be(e,t){let n,r;if(t===void 0)for(const i of e)i!=null&&(n===void 0?i>=i&&(n=r=i):(n>i&&(n=i),r<i&&(r=i)));else{let i=-1;for(let s of e)(s=t(s,++i,e))!=null&&(n===void 0?s>=s&&(n=r=s):(n>s&&(n=s),r<s&&(r=s)))}return[n,r]}class bn{constructor(){this._partials=new Float64Array(32),this._n=0}add(t){const n=this._partials;let r=0;for(let i=0;i<this._n&&i<32;i++){const s=n[i],a=t+s,o=Math.abs(t)<Math.abs(s)?t-(a-s):s-(a-t);o&&(n[r++]=o),t=a}return n[r]=t,this._n=r+1,this}valueOf(){const t=this._partials;let n=this._n,r,i,s,a=0;if(n>0){for(a=t[--n];n>0&&(r=a,i=t[--n],a=r+i,s=i-(a-r),!s););n>0&&(s<0&&t[n-1]<0||s>0&&t[n-1]>0)&&(i=s*2,r=a+i,i==r-a&&(a=r))}return a}}class tu extends Map{constructor(t,n=Jm){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,i]of t)this.set(r,i)}get(t){return super.get(eu(this,t))}has(t){return super.has(eu(this,t))}set(t,n){return super.set(Km(this,t),n)}delete(t){return super.delete(Qm(this,t))}}function eu({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function Km({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function Qm({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function Jm(e){return e!==null&&typeof e=="object"?e.valueOf():e}function tv(e){return e}function ev(e=xe){if(e===xe)return nu;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function nu(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}var nv=Array.prototype,rv=nv.slice;function Fa(e){return()=>e}const iv=Math.sqrt(50),sv=Math.sqrt(10),av=Math.sqrt(2);function Fi(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),s=r/Math.pow(10,i),a=s>=iv?10:s>=sv?5:s>=av?2:1;let o,l,c;return i<0?(c=Math.pow(10,-i)/a,o=Math.round(e*c),l=Math.round(t*c),o/c<e&&++o,l/c>t&&--l,c=-c):(c=Math.pow(10,i)*a,o=Math.round(e/c),l=Math.round(t/c),o*c<e&&++o,l*c>t&&--l),l<o&&.5<=n&&n<2?Fi(e,t,n*2):[o,l,c]}function zi(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const r=t<e,[i,s,a]=r?Fi(t,e,n):Fi(e,t,n);if(!(s>=i))return[];const o=s-i+1,l=new Array(o);if(r)if(a<0)for(let c=0;c<o;++c)l[c]=(s-c)/-a;else for(let c=0;c<o;++c)l[c]=(s-c)*a;else if(a<0)for(let c=0;c<o;++c)l[c]=(i+c)/-a;else for(let c=0;c<o;++c)l[c]=(i+c)*a;return l}function qn(e,t,n){return t=+t,e=+e,n=+n,Fi(e,t,n)[2]}function za(e,t,n){t=+t,e=+e,n=+n;const r=t<e,i=r?qn(t,e,n):qn(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function ov(e,t,n){let r;for(;;){const i=qn(e,t,n);if(i===r||i===0||!isFinite(i))return[e,t];i>0?(e=Math.floor(e/i)*i,t=Math.ceil(t/i)*i):i<0&&(e=Math.ceil(e*i)/i,t=Math.floor(t*i)/i),r=i}}function lv(e){return Math.max(1,Math.ceil(Math.log(Zm(e))/Math.LN2)+1)}function cv(){var e=tv,t=be,n=lv;function r(i){Array.isArray(i)||(i=Array.from(i));var s,a=i.length,o,l,c=new Array(a);for(s=0;s<a;++s)c[s]=e(i[s],s,i);var u=t(c),d=u[0],h=u[1],f=n(c,d,h);if(!Array.isArray(f)){const b=h,S=+f;if(t===be&&([d,h]=ov(d,h,S)),f=zi(d,h,S),f[0]<=d&&(l=qn(d,h,S)),f[f.length-1]>=h)if(b>=h&&t===be){const _=qn(d,h,S);isFinite(_)&&(_>0?h=(Math.floor(h/_)+1)*_:_<0&&(h=(Math.ceil(h*-_)+1)/-_))}else f.pop()}for(var p=f.length,g=0,v=p;f[g]<=d;)++g;for(;f[v-1]>h;)--v;(g||v<p)&&(f=f.slice(g,v),p=v-g);var m=new Array(p+1),y;for(s=0;s<=p;++s)y=m[s]=[],y.x0=s>0?f[s-1]:d,y.x1=s<p?f[s]:h;if(isFinite(l)){if(l>0)for(s=0;s<a;++s)(o=c[s])!=null&&d<=o&&o<=h&&m[Math.min(p,Math.floor((o-d)/l))].push(i[s]);else if(l<0){for(s=0;s<a;++s)if((o=c[s])!=null&&d<=o&&o<=h){const b=Math.floor((d-o)*l);m[Math.min(p,b+(f[b]<=o))].push(i[s])}}}else for(s=0;s<a;++s)(o=c[s])!=null&&d<=o&&o<=h&&m[Ha(f,o,0,p)].push(i[s]);return m}return r.value=function(i){return arguments.length?(e=typeof i=="function"?i:Fa(i),r):e},r.domain=function(i){return arguments.length?(t=typeof i=="function"?i:Fa([i[0],i[1]]),r):t},r.thresholds=function(i){return arguments.length?(n=typeof i=="function"?i:Fa(Array.isArray(i)?rv.call(i):i),r):n},r}function En(e,t){let n;if(t===void 0)for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n<i||n===void 0&&i>=i)&&(n=i)}return n}function cn(e,t){let n;if(t===void 0)for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function ru(e,t,n=0,r=1/0,i){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(i=i===void 0?nu:ev(i);r>n;){if(r-n>600){const l=r-n+1,c=t-n+1,u=Math.log(l),d=.5*Math.exp(2*u/3),h=.5*Math.sqrt(u*d*(l-d)/l)*(c-l/2<0?-1:1),f=Math.max(n,Math.floor(t-c*d/l+h)),p=Math.min(r,Math.floor(t+(l-c)*d/l+h));ru(e,t,f,p,i)}const s=e[t];let a=n,o=r;for(kr(e,n,t),i(e[r],s)>0&&kr(e,n,r);a<o;){for(kr(e,a,o),++a,--o;i(e[a],s)<0;)++a;for(;i(e[o],s)>0;)--o}i(e[n],s)===0?kr(e,n,o):(++o,kr(e,o,r)),o<=t&&(n=o+1),t<=o&&(r=o-1)}return e}function kr(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function Wa(e,t,n){if(e=Float64Array.from(Xm(e,n)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return cn(e);if(t>=1)return En(e);var r,i=(r-1)*t,s=Math.floor(i),a=En(ru(e,s).subarray(0,s+1)),o=cn(e.subarray(s+1));return a+(o-a)*(i-s)}}function*uv(e){for(const t of e)yield*t}function iu(e){return Array.from(uv(e))}function hv(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,s=new Array(i);++r<i;)s[r]=e+r*n;return s}function dv(e){return e}var Wi=1,Yi=2,Ya=3,$r=4,su=1e-6;function fv(e){return"translate("+e+",0)"}function pv(e){return"translate(0,"+e+")"}function gv(e){return t=>+e(t)}function mv(e,t){return t=Math.max(0,e.bandwidth()-t*2)/2,e.round()&&(t=Math.round(t)),n=>+e(n)+t}function vv(){return!this.__axis}function qi(e,t){var n=[],r=null,i=null,s=6,a=6,o=3,l=typeof window<"u"&&window.devicePixelRatio>1?0:.5,c=e===Wi||e===$r?-1:1,u=e===$r||e===Yi?"x":"y",d=e===Wi||e===Ya?fv:pv;function h(f){var p=r??(t.ticks?t.ticks.apply(t,n):t.domain()),g=i??(t.tickFormat?t.tickFormat.apply(t,n):dv),v=Math.max(s,0)+o,m=t.range(),y=+m[0]+l,b=+m[m.length-1]+l,S=(t.bandwidth?mv:gv)(t.copy(),l),_=f.selection?f.selection():f,E=_.selectAll(".domain").data([null]),M=_.selectAll(".tick").data(p,t).order(),C=M.exit(),G=M.enter().append("g").attr("class","tick"),I=M.select("line"),T=M.select("text");E=E.merge(E.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),M=M.merge(G),I=I.merge(G.append("line").attr("stroke","currentColor").attr(u+"2",c*s)),T=T.merge(G.append("text").attr("fill","currentColor").attr(u,c*v).attr("dy",e===Wi?"0em":e===Ya?"0.71em":"0.32em")),f!==_&&(E=E.transition(f),M=M.transition(f),I=I.transition(f),T=T.transition(f),C=C.transition(f).attr("opacity",su).attr("transform",function(L){return isFinite(L=S(L))?d(L+l):this.getAttribute("transform")}),G.attr("opacity",su).attr("transform",function(L){var R=this.parentNode.__axis;return d((R&&isFinite(R=R(L))?R:S(L))+l)})),C.remove(),E.attr("d",e===$r||e===Yi?a?"M"+c*a+","+y+"H"+l+"V"+b+"H"+c*a:"M"+l+","+y+"V"+b:a?"M"+y+","+c*a+"V"+l+"H"+b+"V"+c*a:"M"+y+","+l+"H"+b),M.attr("opacity",1).attr("transform",function(L){return d(S(L)+l)}),I.attr(u+"2",c*s),T.attr(u,c*v).text(g),_.filter(vv).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",e===Yi?"start":e===$r?"end":"middle"),_.each(function(){this.__axis=S})}return h.scale=function(f){return arguments.length?(t=f,h):t},h.ticks=function(){return n=Array.from(arguments),h},h.tickArguments=function(f){return arguments.length?(n=f==null?[]:Array.from(f),h):n.slice()},h.tickValues=function(f){return arguments.length?(r=f==null?null:Array.from(f),h):r&&r.slice()},h.tickFormat=function(f){return arguments.length?(i=f,h):i},h.tickSize=function(f){return arguments.length?(s=a=+f,h):s},h.tickSizeInner=function(f){return arguments.length?(s=+f,h):s},h.tickSizeOuter=function(f){return arguments.length?(a=+f,h):a},h.tickPadding=function(f){return arguments.length?(o=+f,h):o},h.offset=function(f){return arguments.length?(l=+f,h):l},h}function yv(e){return qi(Wi,e)}function xv(e){return qi(Yi,e)}function qa(e){return qi(Ya,e)}function au(e){return qi($r,e)}var bv={value:()=>{}};function Xa(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new Xi(n)}function Xi(e){this._=e}function Ev(e,t){return e.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}Xi.prototype=Xa.prototype={constructor:Xi,on:function(e,t){var n=this._,r=Ev(e+"",n),i,s=-1,a=r.length;if(arguments.length<2){for(;++s<a;)if((i=(e=r[s]).type)&&(i=Sv(n[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++s<a;)if(i=(e=r[s]).type)n[i]=ou(n[i],e.name,t);else if(t==null)for(i in n)n[i]=ou(n[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new Xi(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,s;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(s=this._[e],r=0,i=s.length;r<i;++r)s[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],i=0,s=r.length;i<s;++i)r[i].value.apply(t,n)}};function Sv(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function ou(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=bv,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var ja="http://www.w3.org/1999/xhtml";const lu={svg:"http://www.w3.org/2000/svg",xhtml:ja,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function ji(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),lu.hasOwnProperty(t)?{space:lu[t],local:e}:e}function _v(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===ja&&t.documentElement.namespaceURI===ja?t.createElement(e):t.createElementNS(n,e)}}function wv(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function cu(e){var t=ji(e);return(t.local?wv:_v)(t)}function Ov(){}function Za(e){return e==null?Ov:function(){return this.querySelector(e)}}function Tv(e){typeof e!="function"&&(e=Za(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var s=t[i],a=s.length,o=r[i]=new Array(a),l,c,u=0;u<a;++u)(l=s[u])&&(c=e.call(l,l.__data__,u,s))&&("__data__"in l&&(c.__data__=l.__data__),o[u]=c);return new se(r,this._parents)}function Mv(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function Cv(){return[]}function uu(e){return e==null?Cv:function(){return this.querySelectorAll(e)}}function Av(e){return function(){return Mv(e.apply(this,arguments))}}function Dv(e){typeof e=="function"?e=Av(e):e=uu(e);for(var t=this._groups,n=t.length,r=[],i=[],s=0;s<n;++s)for(var a=t[s],o=a.length,l,c=0;c<o;++c)(l=a[c])&&(r.push(e.call(l,l.__data__,c,a)),i.push(l));return new se(r,i)}function hu(e){return function(){return this.matches(e)}}function du(e){return function(t){return t.matches(e)}}var Lv=Array.prototype.find;function Rv(e){return function(){return Lv.call(this.children,e)}}function Iv(){return this.firstElementChild}function kv(e){return this.select(e==null?Iv:Rv(typeof e=="function"?e:du(e)))}var $v=Array.prototype.filter;function Pv(){return Array.from(this.children)}function Nv(e){return function(){return $v.call(this.children,e)}}function Uv(e){return this.selectAll(e==null?Pv:Nv(typeof e=="function"?e:du(e)))}function Bv(e){typeof e!="function"&&(e=hu(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var s=t[i],a=s.length,o=r[i]=[],l,c=0;c<a;++c)(l=s[c])&&e.call(l,l.__data__,c,s)&&o.push(l);return new se(r,this._parents)}function fu(e){return new Array(e.length)}function Vv(){return new se(this._enter||this._groups.map(fu),this._parents)}function Zi(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Zi.prototype={constructor:Zi,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function Gv(e){return function(){return e}}function Hv(e,t,n,r,i,s){for(var a=0,o,l=t.length,c=s.length;a<c;++a)(o=t[a])?(o.__data__=s[a],r[a]=o):n[a]=new Zi(e,s[a]);for(;a<l;++a)(o=t[a])&&(i[a]=o)}function Fv(e,t,n,r,i,s,a){var o,l,c=new Map,u=t.length,d=s.length,h=new Array(u),f;for(o=0;o<u;++o)(l=t[o])&&(h[o]=f=a.call(l,l.__data__,o,t)+"",c.has(f)?i[o]=l:c.set(f,l));for(o=0;o<d;++o)f=a.call(e,s[o],o,s)+"",(l=c.get(f))?(r[o]=l,l.__data__=s[o],c.delete(f)):n[o]=new Zi(e,s[o]);for(o=0;o<u;++o)(l=t[o])&&c.get(h[o])===l&&(i[o]=l)}function zv(e){return e.__data__}function Wv(e,t){if(!arguments.length)return Array.from(this,zv);var n=t?Fv:Hv,r=this._parents,i=this._groups;typeof e!="function"&&(e=Gv(e));for(var s=i.length,a=new Array(s),o=new Array(s),l=new Array(s),c=0;c<s;++c){var u=r[c],d=i[c],h=d.length,f=Yv(e.call(u,u&&u.__data__,c,r)),p=f.length,g=o[c]=new Array(p),v=a[c]=new Array(p),m=l[c]=new Array(h);n(u,d,g,v,m,f,t);for(var y=0,b=0,S,_;y<p;++y)if(S=g[y]){for(y>=b&&(b=y+1);!(_=v[b])&&++b<p;);S._next=_||null}}return a=new se(a,r),a._enter=o,a._exit=l,a}function Yv(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function qv(){return new se(this._exit||this._groups.map(fu),this._parents)}function Xv(e,t,n){var r=this.enter(),i=this,s=this.exit();return typeof e=="function"?(r=e(r),r&&(r=r.selection())):r=r.append(e+""),t!=null&&(i=t(i),i&&(i=i.selection())),n==null?s.remove():n(s),r&&i?r.merge(i).order():i}function jv(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,i=n.length,s=r.length,a=Math.min(i,s),o=new Array(i),l=0;l<a;++l)for(var c=n[l],u=r[l],d=c.length,h=o[l]=new Array(d),f,p=0;p<d;++p)(f=c[p]||u[p])&&(h[p]=f);for(;l<i;++l)o[l]=n[l];return new se(o,this._parents)}function Zv(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],i=r.length-1,s=r[i],a;--i>=0;)(a=r[i])&&(s&&a.compareDocumentPosition(s)^4&&s.parentNode.insertBefore(a,s),s=a);return this}function Kv(e){e||(e=Qv);function t(d,h){return d&&h?e(d.__data__,h.__data__):!d-!h}for(var n=this._groups,r=n.length,i=new Array(r),s=0;s<r;++s){for(var a=n[s],o=a.length,l=i[s]=new Array(o),c,u=0;u<o;++u)(c=a[u])&&(l[u]=c);l.sort(t)}return new se(i,this._parents).order()}function Qv(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Jv(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function t0(){return Array.from(this)}function e0(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,s=r.length;i<s;++i){var a=r[i];if(a)return a}return null}function n0(){let e=0;for(const t of this)++e;return e}function r0(){return!this.node()}function i0(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var i=t[n],s=0,a=i.length,o;s<a;++s)(o=i[s])&&e.call(o,o.__data__,s,i);return this}function s0(e){return function(){this.removeAttribute(e)}}function a0(e){return function(){this.removeAttributeNS(e.space,e.local)}}function o0(e,t){return function(){this.setAttribute(e,t)}}function l0(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function c0(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function u0(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function h0(e,t){var n=ji(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?a0:s0:typeof t=="function"?n.local?u0:c0:n.local?l0:o0)(n,t))}function pu(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function d0(e){return function(){this.style.removeProperty(e)}}function f0(e,t,n){return function(){this.style.setProperty(e,t,n)}}function p0(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function g0(e,t,n){return arguments.length>1?this.each((t==null?d0:typeof t=="function"?p0:f0)(e,t,n??"")):Xn(this.node(),e)}function Xn(e,t){return e.style.getPropertyValue(t)||pu(e).getComputedStyle(e,null).getPropertyValue(t)}function m0(e){return function(){delete this[e]}}function v0(e,t){return function(){this[e]=t}}function y0(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function x0(e,t){return arguments.length>1?this.each((t==null?m0:typeof t=="function"?y0:v0)(e,t)):this.node()[e]}function gu(e){return e.trim().split(/^|\s+/)}function Ka(e){return e.classList||new mu(e)}function mu(e){this._node=e,this._names=gu(e.getAttribute("class")||"")}mu.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function vu(e,t){for(var n=Ka(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function yu(e,t){for(var n=Ka(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function b0(e){return function(){vu(this,e)}}function E0(e){return function(){yu(this,e)}}function S0(e,t){return function(){(t.apply(this,arguments)?vu:yu)(this,e)}}function _0(e,t){var n=gu(e+"");if(arguments.length<2){for(var r=Ka(this.node()),i=-1,s=n.length;++i<s;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof t=="function"?S0:t?b0:E0)(n,t))}function w0(){this.textContent=""}function O0(e){return function(){this.textContent=e}}function T0(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function M0(e){return arguments.length?this.each(e==null?w0:(typeof e=="function"?T0:O0)(e)):this.node().textContent}function C0(){this.innerHTML=""}function A0(e){return function(){this.innerHTML=e}}function D0(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function L0(e){return arguments.length?this.each(e==null?C0:(typeof e=="function"?D0:A0)(e)):this.node().innerHTML}function R0(){this.nextSibling&&this.parentNode.appendChild(this)}function I0(){return this.each(R0)}function k0(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function $0(){return this.each(k0)}function P0(e){var t=typeof e=="function"?e:cu(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function N0(){return null}function U0(e,t){var n=typeof e=="function"?e:cu(e),r=t==null?N0:typeof t=="function"?t:Za(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function B0(){var e=this.parentNode;e&&e.removeChild(this)}function V0(){return this.each(B0)}function G0(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function H0(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function F0(e){return this.select(e?H0:G0)}function z0(e){return arguments.length?this.property("__data__",e):this.node().__data__}function W0(e){return function(t){e.call(this,t,this.__data__)}}function Y0(e){return e.trim().split(/^|\s+/).map(function(t){var n="",r=t.indexOf(".");return r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function q0(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,s;n<i;++n)s=t[n],(!e.type||s.type===e.type)&&s.name===e.name?this.removeEventListener(s.type,s.listener,s.options):t[++r]=s;++r?t.length=r:delete this.__on}}}function X0(e,t,n){return function(){var r=this.__on,i,s=W0(t);if(r){for(var a=0,o=r.length;a<o;++a)if((i=r[a]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=s,i.options=n),i.value=t;return}}this.addEventListener(e.type,s,n),i={type:e.type,name:e.name,value:t,listener:s,options:n},r?r.push(i):this.__on=[i]}}function j0(e,t,n){var r=Y0(e+""),i,s=r.length,a;if(arguments.length<2){var o=this.node().__on;if(o){for(var l=0,c=o.length,u;l<c;++l)for(i=0,u=o[l];i<s;++i)if((a=r[i]).type===u.type&&a.name===u.name)return u.value}return}for(o=t?X0:q0,i=0;i<s;++i)this.each(o(r[i],t,n));return this}function xu(e,t,n){var r=pu(e),i=r.CustomEvent;typeof i=="function"?i=new i(t,n):(i=r.document.createEvent("Event"),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function Z0(e,t){return function(){return xu(this,e,t)}}function K0(e,t){return function(){return xu(this,e,t.apply(this,arguments))}}function Q0(e,t){return this.each((typeof t=="function"?K0:Z0)(e,t))}function*J0(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,s=r.length,a;i<s;++i)(a=r[i])&&(yield a)}var bu=[null];function se(e,t){this._groups=e,this._parents=t}function Pr(){return new se([[document.documentElement]],bu)}function ty(){return this}se.prototype=Pr.prototype={constructor:se,select:Tv,selectAll:Dv,selectChild:kv,selectChildren:Uv,filter:Bv,data:Wv,enter:Vv,exit:qv,join:Xv,merge:jv,selection:ty,order:Zv,sort:Kv,call:Jv,nodes:t0,node:e0,size:n0,empty:r0,each:i0,attr:h0,style:g0,property:x0,classed:_0,text:M0,html:L0,raise:I0,lower:$0,append:P0,insert:U0,remove:V0,clone:F0,datum:z0,on:j0,dispatch:Q0,[Symbol.iterator]:J0};function D(e){return typeof e=="string"?new se([[document.querySelector(e)]],[document.documentElement]):new se([[e]],bu)}function ey(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Sn(e,t){if(e=ey(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}if(t.getBoundingClientRect){var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}}return[e.pageX,e.pageY]}const Qa={capture:!0,passive:!1};function Ja(e){e.preventDefault(),e.stopImmediatePropagation()}function ny(e){var t=e.document.documentElement,n=D(e).on("dragstart.drag",Ja,Qa);"onselectstart"in t?n.on("selectstart.drag",Ja,Qa):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function ry(e,t){var n=e.document.documentElement,r=D(e).on("dragstart.drag",null);t&&(r.on("click.drag",Ja,Qa),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}function to(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Eu(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Nr(){}var Ur=.7,Ki=1/Ur,jn="\\s*([+-]?\\d+)\\s*",Br="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Re="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",iy=/^#([0-9a-f]{3,8})$/,sy=new RegExp(`^rgb\\(${jn},${jn},${jn}\\)$`),ay=new RegExp(`^rgb\\(${Re},${Re},${Re}\\)$`),oy=new RegExp(`^rgba\\(${jn},${jn},${jn},${Br}\\)$`),ly=new RegExp(`^rgba\\(${Re},${Re},${Re},${Br}\\)$`),cy=new RegExp(`^hsl\\(${Br},${Re},${Re}\\)$`),uy=new RegExp(`^hsla\\(${Br},${Re},${Re},${Br}\\)$`),Su={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};to(Nr,Fe,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:_u,formatHex:_u,formatHex8:hy,formatHsl:dy,formatRgb:wu,toString:wu});function _u(){return this.rgb().formatHex()}function hy(){return this.rgb().formatHex8()}function dy(){return Au(this).formatHsl()}function wu(){return this.rgb().formatRgb()}function Fe(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=iy.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?Ou(t):n===3?new Jt(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Qi(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Qi(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=sy.exec(e))?new Jt(t[1],t[2],t[3],1):(t=ay.exec(e))?new Jt(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=oy.exec(e))?Qi(t[1],t[2],t[3],t[4]):(t=ly.exec(e))?Qi(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=cy.exec(e))?Cu(t[1],t[2]/100,t[3]/100,1):(t=uy.exec(e))?Cu(t[1],t[2]/100,t[3]/100,t[4]):Su.hasOwnProperty(e)?Ou(Su[e]):e==="transparent"?new Jt(NaN,NaN,NaN,0):null}function Ou(e){return new Jt(e>>16&255,e>>8&255,e&255,1)}function Qi(e,t,n,r){return r<=0&&(e=t=n=NaN),new Jt(e,t,n,r)}function fy(e){return e instanceof Nr||(e=Fe(e)),e?(e=e.rgb(),new Jt(e.r,e.g,e.b,e.opacity)):new Jt}function eo(e,t,n,r){return arguments.length===1?fy(e):new Jt(e,t,n,r??1)}function Jt(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}to(Jt,eo,Eu(Nr,{brighter(e){return e=e==null?Ki:Math.pow(Ki,e),new Jt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Ur:Math.pow(Ur,e),new Jt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Jt(_n(this.r),_n(this.g),_n(this.b),Ji(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Tu,formatHex:Tu,formatHex8:py,formatRgb:Mu,toString:Mu}));function Tu(){return`#${wn(this.r)}${wn(this.g)}${wn(this.b)}`}function py(){return`#${wn(this.r)}${wn(this.g)}${wn(this.b)}${wn((isNaN(this.opacity)?1:this.opacity)*255)}`}function Mu(){const e=Ji(this.opacity);return`${e===1?"rgb(":"rgba("}${_n(this.r)}, ${_n(this.g)}, ${_n(this.b)}${e===1?")":`, ${e})`}`}function Ji(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function _n(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function wn(e){return e=_n(e),(e<16?"0":"")+e.toString(16)}function Cu(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Ee(e,t,n,r)}function Au(e){if(e instanceof Ee)return new Ee(e.h,e.s,e.l,e.opacity);if(e instanceof Nr||(e=Fe(e)),!e)return new Ee;if(e instanceof Ee)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),s=Math.max(t,n,r),a=NaN,o=s-i,l=(s+i)/2;return o?(t===s?a=(n-r)/o+(n<r)*6:n===s?a=(r-t)/o+2:a=(t-n)/o+4,o/=l<.5?s+i:2-s-i,a*=60):o=l>0&&l<1?0:a,new Ee(a,o,l,e.opacity)}function no(e,t,n,r){return arguments.length===1?Au(e):new Ee(e,t,n,r??1)}function Ee(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}to(Ee,no,Eu(Nr,{brighter(e){return e=e==null?Ki:Math.pow(Ki,e),new Ee(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Ur:Math.pow(Ur,e),new Ee(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new Jt(ro(e>=240?e-240:e+120,i,r),ro(e,i,r),ro(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Ee(Du(this.h),ts(this.s),ts(this.l),Ji(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Ji(this.opacity);return`${e===1?"hsl(":"hsla("}${Du(this.h)}, ${ts(this.s)*100}%, ${ts(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Du(e){return e=(e||0)%360,e<0?e+360:e}function ts(e){return Math.max(0,Math.min(1,e||0))}function ro(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const io=e=>()=>e;function gy(e,t){return function(n){return e+n*t}}function my(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function vy(e){return(e=+e)==1?Lu:function(t,n){return n-t?my(t,n,e):io(isNaN(t)?n:t)}}function Lu(e,t){var n=t-e;return n?gy(e,n):io(isNaN(e)?t:e)}const es=function e(t){var n=vy(t);function r(i,s){var a=n((i=eo(i)).r,(s=eo(s)).r),o=n(i.g,s.g),l=n(i.b,s.b),c=Lu(i.opacity,s.opacity);return function(u){return i.r=a(u),i.g=o(u),i.b=l(u),i.opacity=c(u),i+""}}return r.gamma=e,r}(1);function yy(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(s){for(i=0;i<n;++i)r[i]=e[i]*(1-s)+t[i]*s;return r}}function xy(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function by(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=new Array(r),s=new Array(n),a;for(a=0;a<r;++a)i[a]=Vr(e[a],t[a]);for(;a<n;++a)s[a]=t[a];return function(o){for(a=0;a<r;++a)s[a]=i[a](o);return s}}function Ey(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function ae(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function Sy(e,t){var n={},r={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?n[i]=Vr(e[i],t[i]):r[i]=t[i];return function(s){for(i in n)r[i]=n[i](s);return r}}var so=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ao=new RegExp(so.source,"g");function _y(e){return function(){return e}}function wy(e){return function(t){return e(t)+""}}function Ru(e,t){var n=so.lastIndex=ao.lastIndex=0,r,i,s,a=-1,o=[],l=[];for(e=e+"",t=t+"";(r=so.exec(e))&&(i=ao.exec(t));)(s=i.index)>n&&(s=t.slice(n,s),o[a]?o[a]+=s:o[++a]=s),(r=r[0])===(i=i[0])?o[a]?o[a]+=i:o[++a]=i:(o[++a]=null,l.push({i:a,x:ae(r,i)})),n=ao.lastIndex;return n<t.length&&(s=t.slice(n),o[a]?o[a]+=s:o[++a]=s),o.length<2?l[0]?wy(l[0].x):_y(t):(t=l.length,function(c){for(var u=0,d;u<t;++u)o[(d=l[u]).i]=d.x(c);return o.join("")})}function Vr(e,t){var n=typeof t,r;return t==null||n==="boolean"?io(t):(n==="number"?ae:n==="string"?(r=Fe(t))?(t=r,es):Ru:t instanceof Fe?es:t instanceof Date?Ey:xy(t)?yy:Array.isArray(t)?by:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?Sy:ae)(e,t)}function Iu(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var ku=180/Math.PI,oo={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function $u(e,t,n,r,i,s){var a,o,l;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(l=e*n+t*r)&&(n-=e*l,r-=t*l),(o=Math.sqrt(n*n+r*r))&&(n/=o,r/=o,l/=o),e*r<t*n&&(e=-e,t=-t,l=-l,a=-a),{translateX:i,translateY:s,rotate:Math.atan2(t,e)*ku,skewX:Math.atan(l)*ku,scaleX:a,scaleY:o}}var ns;function Oy(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?oo:$u(t.a,t.b,t.c,t.d,t.e,t.f)}function Ty(e){return e==null||(ns||(ns=document.createElementNS("http://www.w3.org/2000/svg","g")),ns.setAttribute("transform",e),!(e=ns.transform.baseVal.consolidate()))?oo:(e=e.matrix,$u(e.a,e.b,e.c,e.d,e.e,e.f))}function Pu(e,t,n,r){function i(c){return c.length?c.pop()+" ":""}function s(c,u,d,h,f,p){if(c!==d||u!==h){var g=f.push("translate(",null,t,null,n);p.push({i:g-4,x:ae(c,d)},{i:g-2,x:ae(u,h)})}else(d||h)&&f.push("translate("+d+t+h+n)}function a(c,u,d,h){c!==u?(c-u>180?u+=360:u-c>180&&(c+=360),h.push({i:d.push(i(d)+"rotate(",null,r)-2,x:ae(c,u)})):u&&d.push(i(d)+"rotate("+u+r)}function o(c,u,d,h){c!==u?h.push({i:d.push(i(d)+"skewX(",null,r)-2,x:ae(c,u)}):u&&d.push(i(d)+"skewX("+u+r)}function l(c,u,d,h,f,p){if(c!==d||u!==h){var g=f.push(i(f)+"scale(",null,",",null,")");p.push({i:g-4,x:ae(c,d)},{i:g-2,x:ae(u,h)})}else(d!==1||h!==1)&&f.push(i(f)+"scale("+d+","+h+")")}return function(c,u){var d=[],h=[];return c=e(c),u=e(u),s(c.translateX,c.translateY,u.translateX,u.translateY,d,h),a(c.rotate,u.rotate,d,h),o(c.skewX,u.skewX,d,h),l(c.scaleX,c.scaleY,u.scaleX,u.scaleY,d,h),c=u=null,function(f){for(var p=-1,g=h.length,v;++p<g;)d[(v=h[p]).i]=v.x(f);return d.join("")}}}var My=Pu(Oy,"px, ","px)","deg)"),Cy=Pu(Ty,", ",")",")");function Ay(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e(r/(t-1));return n}var Zn=0,Gr=0,Hr=0,Nu=1e3,rs,Fr,is=0,On=0,ss=0,zr=typeof performance=="object"&&performance.now?performance:Date,Uu=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function lo(){return On||(Uu(Dy),On=zr.now()+ss)}function Dy(){On=0}function as(){this._call=this._time=this._next=null}as.prototype=Bu.prototype={constructor:as,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?lo():+n)+(t==null?0:+t),!this._next&&Fr!==this&&(Fr?Fr._next=this:rs=this,Fr=this),this._call=e,this._time=n,co()},stop:function(){this._call&&(this._call=null,this._time=1/0,co())}};function Bu(e,t,n){var r=new as;return r.restart(e,t,n),r}function Ly(){lo(),++Zn;for(var e=rs,t;e;)(t=On-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Zn}function Vu(){On=(is=zr.now())+ss,Zn=Gr=0;try{Ly()}finally{Zn=0,Iy(),On=0}}function Ry(){var e=zr.now(),t=e-is;t>Nu&&(ss-=t,is=e)}function Iy(){for(var e,t=rs,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:rs=n);Fr=e,co(r)}function co(e){if(!Zn){Gr&&(Gr=clearTimeout(Gr));var t=e-On;t>24?(e<1/0&&(Gr=setTimeout(Vu,e-zr.now()-ss)),Hr&&(Hr=clearInterval(Hr))):(Hr||(is=zr.now(),Hr=setInterval(Ry,Nu)),Zn=1,Uu(Vu))}}function Gu(e,t,n){var r=new as;return t=t==null?0:+t,r.restart(i=>{r.stop(),e(i+t)},t,n),r}var ky=Xa("start","end","cancel","interrupt"),$y=[],Hu=0,Fu=1,uo=2,os=3,zu=4,ho=5,ls=6;function cs(e,t,n,r,i,s){var a=e.__transition;if(!a)e.__transition={};else if(n in a)return;Py(e,n,{name:t,index:r,group:i,on:ky,tween:$y,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:Hu})}function fo(e,t){var n=Se(e,t);if(n.state>Hu)throw new Error("too late; already scheduled");return n}function Ie(e,t){var n=Se(e,t);if(n.state>os)throw new Error("too late; already running");return n}function Se(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function Py(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=Bu(s,0,n.time);function s(c){n.state=Fu,n.timer.restart(a,n.delay,n.time),n.delay<=c&&a(c-n.delay)}function a(c){var u,d,h,f;if(n.state!==Fu)return l();for(u in r)if(f=r[u],f.name===n.name){if(f.state===os)return Gu(a);f.state===zu?(f.state=ls,f.timer.stop(),f.on.call("interrupt",e,e.__data__,f.index,f.group),delete r[u]):+u<t&&(f.state=ls,f.timer.stop(),f.on.call("cancel",e,e.__data__,f.index,f.group),delete r[u])}if(Gu(function(){n.state===os&&(n.state=zu,n.timer.restart(o,n.delay,n.time),o(c))}),n.state=uo,n.on.call("start",e,e.__data__,n.index,n.group),n.state===uo){for(n.state=os,i=new Array(h=n.tween.length),u=0,d=-1;u<h;++u)(f=n.tween[u].value.call(e,e.__data__,n.index,n.group))&&(i[++d]=f);i.length=d+1}}function o(c){for(var u=c<n.duration?n.ease.call(null,c/n.duration):(n.timer.restart(l),n.state=ho,1),d=-1,h=i.length;++d<h;)i[d].call(e,u);n.state===ho&&(n.on.call("end",e,e.__data__,n.index,n.group),l())}function l(){n.state=ls,n.timer.stop(),delete r[t];for(var c in r)return;delete e.__transition}}function po(e,t){var n=e.__transition,r,i,s=!0,a;if(n){t=t==null?null:t+"";for(a in n){if((r=n[a]).name!==t){s=!1;continue}i=r.state>uo&&r.state<ho,r.state=ls,r.timer.stop(),r.on.call(i?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete n[a]}s&&delete e.__transition}}function Ny(e){return this.each(function(){po(this,e)})}function Uy(e,t){var n,r;return function(){var i=Ie(this,e),s=i.tween;if(s!==n){r=n=s;for(var a=0,o=r.length;a<o;++a)if(r[a].name===t){r=r.slice(),r.splice(a,1);break}}i.tween=r}}function By(e,t,n){var r,i;if(typeof n!="function")throw new Error;return function(){var s=Ie(this,e),a=s.tween;if(a!==r){i=(r=a).slice();for(var o={name:t,value:n},l=0,c=i.length;l<c;++l)if(i[l].name===t){i[l]=o;break}l===c&&i.push(o)}s.tween=i}}function Vy(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r=Se(this.node(),n).tween,i=0,s=r.length,a;i<s;++i)if((a=r[i]).name===e)return a.value;return null}return this.each((t==null?Uy:By)(n,e,t))}function go(e,t,n){var r=e._id;return e.each(function(){var i=Ie(this,r);(i.value||(i.value={}))[t]=n.apply(this,arguments)}),function(i){return Se(i,r).value[t]}}function Wu(e,t){var n;return(typeof t=="number"?ae:t instanceof Fe?es:(n=Fe(t))?(t=n,es):Ru)(e,t)}function Gy(e){return function(){this.removeAttribute(e)}}function Hy(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Fy(e,t,n){var r,i=n+"",s;return function(){var a=this.getAttribute(e);return a===i?null:a===r?s:s=t(r=a,n)}}function zy(e,t,n){var r,i=n+"",s;return function(){var a=this.getAttributeNS(e.space,e.local);return a===i?null:a===r?s:s=t(r=a,n)}}function Wy(e,t,n){var r,i,s;return function(){var a,o=n(this),l;return o==null?void this.removeAttribute(e):(a=this.getAttribute(e),l=o+"",a===l?null:a===r&&l===i?s:(i=l,s=t(r=a,o)))}}function Yy(e,t,n){var r,i,s;return function(){var a,o=n(this),l;return o==null?void this.removeAttributeNS(e.space,e.local):(a=this.getAttributeNS(e.space,e.local),l=o+"",a===l?null:a===r&&l===i?s:(i=l,s=t(r=a,o)))}}function qy(e,t){var n=ji(e),r=n==="transform"?Cy:Wu;return this.attrTween(e,typeof t=="function"?(n.local?Yy:Wy)(n,r,go(this,"attr."+e,t)):t==null?(n.local?Hy:Gy)(n):(n.local?zy:Fy)(n,r,t))}function Xy(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function jy(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function Zy(e,t){var n,r;function i(){var s=t.apply(this,arguments);return s!==r&&(n=(r=s)&&jy(e,s)),n}return i._value=t,i}function Ky(e,t){var n,r;function i(){var s=t.apply(this,arguments);return s!==r&&(n=(r=s)&&Xy(e,s)),n}return i._value=t,i}function Qy(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var r=ji(e);return this.tween(n,(r.local?Zy:Ky)(r,t))}function Jy(e,t){return function(){fo(this,e).delay=+t.apply(this,arguments)}}function t1(e,t){return t=+t,function(){fo(this,e).delay=t}}function e1(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Jy:t1)(t,e)):Se(this.node(),t).delay}function n1(e,t){return function(){Ie(this,e).duration=+t.apply(this,arguments)}}function r1(e,t){return t=+t,function(){Ie(this,e).duration=t}}function i1(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?n1:r1)(t,e)):Se(this.node(),t).duration}function s1(e,t){if(typeof t!="function")throw new Error;return function(){Ie(this,e).ease=t}}function a1(e){var t=this._id;return arguments.length?this.each(s1(t,e)):Se(this.node(),t).ease}function o1(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;Ie(this,e).ease=n}}function l1(e){if(typeof e!="function")throw new Error;return this.each(o1(this._id,e))}function c1(e){typeof e!="function"&&(e=hu(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var s=t[i],a=s.length,o=r[i]=[],l,c=0;c<a;++c)(l=s[c])&&e.call(l,l.__data__,c,s)&&o.push(l);return new ze(r,this._parents,this._name,this._id)}function u1(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,i=n.length,s=Math.min(r,i),a=new Array(r),o=0;o<s;++o)for(var l=t[o],c=n[o],u=l.length,d=a[o]=new Array(u),h,f=0;f<u;++f)(h=l[f]||c[f])&&(d[f]=h);for(;o<r;++o)a[o]=t[o];return new ze(a,this._parents,this._name,this._id)}function h1(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function d1(e,t,n){var r,i,s=h1(t)?fo:Ie;return function(){var a=s(this,e),o=a.on;o!==r&&(i=(r=o).copy()).on(t,n),a.on=i}}function f1(e,t){var n=this._id;return arguments.length<2?Se(this.node(),n).on.on(e):this.each(d1(n,e,t))}function p1(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function g1(){return this.on("end.remove",p1(this._id))}function m1(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Za(e));for(var r=this._groups,i=r.length,s=new Array(i),a=0;a<i;++a)for(var o=r[a],l=o.length,c=s[a]=new Array(l),u,d,h=0;h<l;++h)(u=o[h])&&(d=e.call(u,u.__data__,h,o))&&("__data__"in u&&(d.__data__=u.__data__),c[h]=d,cs(c[h],t,n,h,c,Se(u,n)));return new ze(s,this._parents,t,n)}function v1(e){var t=this._name,n=this._id;typeof e!="function"&&(e=uu(e));for(var r=this._groups,i=r.length,s=[],a=[],o=0;o<i;++o)for(var l=r[o],c=l.length,u,d=0;d<c;++d)if(u=l[d]){for(var h=e.call(u,u.__data__,d,l),f,p=Se(u,n),g=0,v=h.length;g<v;++g)(f=h[g])&&cs(f,t,n,g,h,p);s.push(h),a.push(u)}return new ze(s,a,t,n)}var y1=Pr.prototype.constructor;function x1(){return new y1(this._groups,this._parents)}function b1(e,t){var n,r,i;return function(){var s=Xn(this,e),a=(this.style.removeProperty(e),Xn(this,e));return s===a?null:s===n&&a===r?i:i=t(n=s,r=a)}}function Yu(e){return function(){this.style.removeProperty(e)}}function E1(e,t,n){var r,i=n+"",s;return function(){var a=Xn(this,e);return a===i?null:a===r?s:s=t(r=a,n)}}function S1(e,t,n){var r,i,s;return function(){var a=Xn(this,e),o=n(this),l=o+"";return o==null&&(l=o=(this.style.removeProperty(e),Xn(this,e))),a===l?null:a===r&&l===i?s:(i=l,s=t(r=a,o))}}function _1(e,t){var n,r,i,s="style."+t,a="end."+s,o;return function(){var l=Ie(this,e),c=l.on,u=l.value[s]==null?o||(o=Yu(t)):void 0;(c!==n||i!==u)&&(r=(n=c).copy()).on(a,i=u),l.on=r}}function w1(e,t,n){var r=(e+="")=="transform"?My:Wu;return t==null?this.styleTween(e,b1(e,r)).on("end.style."+e,Yu(e)):typeof t=="function"?this.styleTween(e,S1(e,r,go(this,"style."+e,t))).each(_1(this._id,e)):this.styleTween(e,E1(e,r,t),n).on("end.style."+e,null)}function O1(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function T1(e,t,n){var r,i;function s(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&O1(e,a,n)),r}return s._value=t,s}function M1(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;return this.tween(r,T1(e,t,n??""))}function C1(e){return function(){this.textContent=e}}function A1(e){return function(){var t=e(this);this.textContent=t??""}}function D1(e){return this.tween("text",typeof e=="function"?A1(go(this,"text",e)):C1(e==null?"":e+""))}function L1(e){return function(t){this.textContent=e.call(this,t)}}function R1(e){var t,n;function r(){var i=e.apply(this,arguments);return i!==n&&(t=(n=i)&&L1(i)),t}return r._value=e,r}function I1(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,R1(e))}function k1(){for(var e=this._name,t=this._id,n=qu(),r=this._groups,i=r.length,s=0;s<i;++s)for(var a=r[s],o=a.length,l,c=0;c<o;++c)if(l=a[c]){var u=Se(l,t);cs(l,e,n,c,a,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new ze(r,this._parents,e,n)}function $1(){var e,t,n=this,r=n._id,i=n.size();return new Promise(function(s,a){var o={value:a},l={value:function(){--i===0&&s()}};n.each(function(){var c=Ie(this,r),u=c.on;u!==e&&(t=(e=u).copy(),t._.cancel.push(o),t._.interrupt.push(o),t._.end.push(l)),c.on=t}),i===0&&s()})}var P1=0;function ze(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function qu(){return++P1}var We=Pr.prototype;ze.prototype={constructor:ze,select:m1,selectAll:v1,selectChild:We.selectChild,selectChildren:We.selectChildren,filter:c1,merge:u1,selection:x1,transition:k1,call:We.call,nodes:We.nodes,node:We.node,size:We.size,empty:We.empty,each:We.each,on:f1,attr:qy,attrTween:Qy,style:w1,styleTween:M1,text:D1,textTween:I1,remove:g1,tween:Vy,delay:e1,duration:i1,ease:a1,easeVarying:l1,end:$1,[Symbol.iterator]:We[Symbol.iterator]};const N1=e=>+e;function Xu(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var U1={time:null,delay:0,duration:250,ease:Xu};function B1(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function V1(e){var t,n;e instanceof ze?(t=e._id,e=e._name):(t=qu(),(n=U1).time=lo(),e=e==null?null:e+"");for(var r=this._groups,i=r.length,s=0;s<i;++s)for(var a=r[s],o=a.length,l,c=0;c<o;++c)(l=a[c])&&cs(l,e,t,c,a,n||B1(l,t));return new ze(r,this._parents,e,t)}Pr.prototype.interrupt=Ny,Pr.prototype.transition=V1;const mo=e=>()=>e;function G1(e,{sourceEvent:t,target:n,selection:r,mode:i,dispatch:s}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},selection:{value:r,enumerable:!0,configurable:!0},mode:{value:i,enumerable:!0,configurable:!0},_:{value:s}})}function H1(e){e.stopImmediatePropagation()}function vo(e){e.preventDefault(),e.stopImmediatePropagation()}var ju={name:"drag"},yo={name:"space"},Kn={name:"handle"},Qn={name:"center"};const{abs:Zu,max:Ft,min:zt}=Math;function Ku(e){return[+e[0],+e[1]]}function Qu(e){return[Ku(e[0]),Ku(e[1])]}var us={name:"x",handles:["w","e"].map(hs),input:function(e,t){return e==null?null:[[+e[0],t[0][1]],[+e[1],t[1][1]]]},output:function(e){return e&&[e[0][0],e[1][0]]}},xo={name:"y",handles:["n","s"].map(hs),input:function(e,t){return e==null?null:[[t[0][0],+e[0]],[t[1][0],+e[1]]]},output:function(e){return e&&[e[0][1],e[1][1]]}},Ye={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Ju={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},th={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},F1={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},z1={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function hs(e){return{type:e}}function W1(e){return!e.ctrlKey&&!e.button}function Y1(){var e=this.ownerSVGElement||this;return e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]}function q1(){return navigator.maxTouchPoints||"ontouchstart"in this}function bo(e){for(;!e.__brush;)if(!(e=e.parentNode))return;return e.__brush}function X1(e){return e[0][0]===e[1][0]||e[0][1]===e[1][1]}function eh(){return j1(us)}function j1(e){var t=Y1,n=W1,r=q1,i=!0,s=Xa("start","brush","end"),a=6,o;function l(v){var m=v.property("__brush",g).selectAll(".overlay").data([hs("overlay")]);m.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",Ye.overlay).merge(m).each(function(){var b=bo(this).extent;D(this).attr("x",b[0][0]).attr("y",b[0][1]).attr("width",b[1][0]-b[0][0]).attr("height",b[1][1]-b[0][1])}),v.selectAll(".selection").data([hs("selection")]).enter().append("rect").attr("class","selection").attr("cursor",Ye.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var y=v.selectAll(".handle").data(e.handles,function(b){return b.type});y.exit().remove(),y.enter().append("rect").attr("class",function(b){return"handle handle--"+b.type}).attr("cursor",function(b){return Ye[b.type]}),v.each(c).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",h).filter(r).on("touchstart.brush",h).on("touchmove.brush",f).on("touchend.brush touchcancel.brush",p).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}l.move=function(v,m,y){v.tween?v.on("start.brush",function(b){u(this,arguments).beforestart().start(b)}).on("interrupt.brush end.brush",function(b){u(this,arguments).end(b)}).tween("brush",function(){var b=this,S=b.__brush,_=u(b,arguments),E=S.selection,M=e.input(typeof m=="function"?m.apply(this,arguments):m,S.extent),C=Vr(E,M);function G(I){S.selection=I===1&&M===null?null:C(I),c.call(b),_.brush()}return E!==null&&M!==null?G:G(1)}):v.each(function(){var b=this,S=arguments,_=b.__brush,E=e.input(typeof m=="function"?m.apply(b,S):m,_.extent),M=u(b,S).beforestart();po(b),_.selection=E===null?null:E,c.call(b),M.start(y).brush(y).end(y)})},l.clear=function(v,m){l.move(v,null,m)};function c(){var v=D(this),m=bo(this).selection;m?(v.selectAll(".selection").style("display",null).attr("x",m[0][0]).attr("y",m[0][1]).attr("width",m[1][0]-m[0][0]).attr("height",m[1][1]-m[0][1]),v.selectAll(".handle").style("display",null).attr("x",function(y){return y.type[y.type.length-1]==="e"?m[1][0]-a/2:m[0][0]-a/2}).attr("y",function(y){return y.type[0]==="s"?m[1][1]-a/2:m[0][1]-a/2}).attr("width",function(y){return y.type==="n"||y.type==="s"?m[1][0]-m[0][0]+a:a}).attr("height",function(y){return y.type==="e"||y.type==="w"?m[1][1]-m[0][1]+a:a})):v.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function u(v,m,y){var b=v.__brush.emitter;return b&&(!y||!b.clean)?b:new d(v,m,y)}function d(v,m,y){this.that=v,this.args=m,this.state=v.__brush,this.active=0,this.clean=y}d.prototype={beforestart:function(){return++this.active===1&&(this.state.emitter=this,this.starting=!0),this},start:function(v,m){return this.starting?(this.starting=!1,this.emit("start",v,m)):this.emit("brush",v),this},brush:function(v,m){return this.emit("brush",v,m),this},end:function(v,m){return--this.active===0&&(delete this.state.emitter,this.emit("end",v,m)),this},emit:function(v,m,y){var b=D(this.that).datum();s.call(v,this.that,new G1(v,{sourceEvent:m,target:l,selection:e.output(this.state.selection),mode:y,dispatch:s}),b)}};function h(v){if(o&&!v.touches||!n.apply(this,arguments))return;var m=this,y=v.target.__data__.type,b=(i&&v.metaKey?y="overlay":y)==="selection"?ju:i&&v.altKey?Qn:Kn,S=e===xo?null:F1[y],_=e===us?null:z1[y],E=bo(m),M=E.extent,C=E.selection,G=M[0][0],I,T,L=M[0][1],R,k,O=M[1][0],U,P,N=M[1][1],B,Y,X=0,J=0,ct,W=S&&_&&i&&v.shiftKey,K,ut,rt=Array.from(v.touches||[v],et=>{const Rt=et.identifier;return et=Sn(et,m),et.point0=et.slice(),et.identifier=Rt,et});po(m);var Tt=u(m,arguments,!0).beforestart();if(y==="overlay"){C&&(ct=!0);const et=[rt[0],rt[1]||rt[0]];E.selection=C=[[I=e===xo?G:zt(et[0][0],et[1][0]),R=e===us?L:zt(et[0][1],et[1][1])],[U=e===xo?O:Ft(et[0][0],et[1][0]),B=e===us?N:Ft(et[0][1],et[1][1])]],rt.length>1&&pt(v)}else I=C[0][0],R=C[0][1],U=C[1][0],B=C[1][1];T=I,k=R,P=U,Y=B;var q=D(m).attr("pointer-events","none"),V=q.selectAll(".overlay").attr("cursor",Ye[y]);if(v.touches)Tt.moved=$,Tt.ended=yt;else{var H=D(v.view).on("mousemove.brush",$,!0).on("mouseup.brush",yt,!0);i&&H.on("keydown.brush",Kt,!0).on("keyup.brush",Qt,!0),ny(v.view)}c.call(m),Tt.start(v,b.name);function $(et){for(const Rt of et.changedTouches||[et])for(const Hi of rt)Hi.identifier===Rt.identifier&&(Hi.cur=Sn(Rt,m));if(W&&!K&&!ut&&rt.length===1){const Rt=rt[0];Zu(Rt.cur[0]-Rt[0])>Zu(Rt.cur[1]-Rt[1])?ut=!0:K=!0}for(const Rt of rt)Rt.cur&&(Rt[0]=Rt.cur[0],Rt[1]=Rt.cur[1]);ct=!0,vo(et),pt(et)}function pt(et){const Rt=rt[0],Hi=Rt.point0;var xn;switch(X=Rt[0]-Hi[0],J=Rt[1]-Hi[1],b){case yo:case ju:{S&&(X=Ft(G-I,zt(O-U,X)),T=I+X,P=U+X),_&&(J=Ft(L-R,zt(N-B,J)),k=R+J,Y=B+J);break}case Kn:{rt[1]?(S&&(T=Ft(G,zt(O,rt[0][0])),P=Ft(G,zt(O,rt[1][0])),S=1),_&&(k=Ft(L,zt(N,rt[0][1])),Y=Ft(L,zt(N,rt[1][1])),_=1)):(S<0?(X=Ft(G-I,zt(O-I,X)),T=I+X,P=U):S>0&&(X=Ft(G-U,zt(O-U,X)),T=I,P=U+X),_<0?(J=Ft(L-R,zt(N-R,J)),k=R+J,Y=B):_>0&&(J=Ft(L-B,zt(N-B,J)),k=R,Y=B+J));break}case Qn:{S&&(T=Ft(G,zt(O,I-X*S)),P=Ft(G,zt(O,U+X*S))),_&&(k=Ft(L,zt(N,R-J*_)),Y=Ft(L,zt(N,B+J*_)));break}}P<T&&(S*=-1,xn=I,I=U,U=xn,xn=T,T=P,P=xn,y in Ju&&V.attr("cursor",Ye[y=Ju[y]])),Y<k&&(_*=-1,xn=R,R=B,B=xn,xn=k,k=Y,Y=xn,y in th&&V.attr("cursor",Ye[y=th[y]])),E.selection&&(C=E.selection),K&&(T=C[0][0],P=C[1][0]),ut&&(k=C[0][1],Y=C[1][1]),(C[0][0]!==T||C[0][1]!==k||C[1][0]!==P||C[1][1]!==Y)&&(E.selection=[[T,k],[P,Y]],c.call(m),Tt.brush(et,b.name))}function yt(et){if(H1(et),et.touches){if(et.touches.length)return;o&&clearTimeout(o),o=setTimeout(function(){o=null},500)}else ry(et.view,ct),H.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);q.attr("pointer-events","all"),V.attr("cursor",Ye.overlay),E.selection&&(C=E.selection),X1(C)&&(E.selection=null,c.call(m)),Tt.end(et,b.name)}function Kt(et){switch(et.keyCode){case 16:{W=S&&_;break}case 18:{b===Kn&&(S&&(U=P-X*S,I=T+X*S),_&&(B=Y-J*_,R=k+J*_),b=Qn,pt(et));break}case 32:{(b===Kn||b===Qn)&&(S<0?U=P-X:S>0&&(I=T-X),_<0?B=Y-J:_>0&&(R=k-J),b=yo,V.attr("cursor",Ye.selection),pt(et));break}default:return}vo(et)}function Qt(et){switch(et.keyCode){case 16:{W&&(K=ut=W=!1,pt(et));break}case 18:{b===Qn&&(S<0?U=P:S>0&&(I=T),_<0?B=Y:_>0&&(R=k),b=Kn,pt(et));break}case 32:{b===yo&&(et.altKey?(S&&(U=P-X*S,I=T+X*S),_&&(B=Y-J*_,R=k+J*_),b=Qn):(S<0?U=P:S>0&&(I=T),_<0?B=Y:_>0&&(R=k),b=Kn),V.attr("cursor",Ye[y]),pt(et));break}default:return}vo(et)}}function f(v){u(this,arguments).moved(v)}function p(v){u(this,arguments).ended(v)}function g(){var v=this.__brush||{selection:null};return v.extent=Qu(t.apply(this,arguments)),v.dim=e,v}return l.extent=function(v){return arguments.length?(t=typeof v=="function"?v:mo(Qu(v)),l):t},l.filter=function(v){return arguments.length?(n=typeof v=="function"?v:mo(!!v),l):n},l.touchable=function(v){return arguments.length?(r=typeof v=="function"?v:mo(!!v),l):r},l.handleSize=function(v){return arguments.length?(a=+v,l):a},l.keyModifiers=function(v){return arguments.length?(i=!!v,l):i},l.on=function(){var v=s.on.apply(s,arguments);return v===s?l:v},l}const Eo=Math.PI,So=2*Eo,Tn=1e-6,Z1=So-Tn;function nh(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function K1(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return nh;const n=10**t;return function(r){this._+=r[0];for(let i=1,s=r.length;i<s;++i)this._+=Math.round(arguments[i]*n)/n+r[i]}}let Q1=class{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?nh:K1(t)}moveTo(t,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,n){this._append`L${this._x1=+t},${this._y1=+n}`}quadraticCurveTo(t,n,r,i){this._append`Q${+t},${+n},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(t,n,r,i,s,a){this._append`C${+t},${+n},${+r},${+i},${this._x1=+s},${this._y1=+a}`}arcTo(t,n,r,i,s){if(t=+t,n=+n,r=+r,i=+i,s=+s,s<0)throw new Error(`negative radius: ${s}`);let a=this._x1,o=this._y1,l=r-t,c=i-n,u=a-t,d=o-n,h=u*u+d*d;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(h>Tn)if(!(Math.abs(d*l-c*u)>Tn)||!s)this._append`L${this._x1=t},${this._y1=n}`;else{let f=r-a,p=i-o,g=l*l+c*c,v=f*f+p*p,m=Math.sqrt(g),y=Math.sqrt(h),b=s*Math.tan((Eo-Math.acos((g+h-v)/(2*m*y)))/2),S=b/y,_=b/m;Math.abs(S-1)>Tn&&this._append`L${t+S*u},${n+S*d}`,this._append`A${s},${s},0,0,${+(d*f>u*p)},${this._x1=t+_*l},${this._y1=n+_*c}`}}arc(t,n,r,i,s,a){if(t=+t,n=+n,r=+r,a=!!a,r<0)throw new Error(`negative radius: ${r}`);let o=r*Math.cos(i),l=r*Math.sin(i),c=t+o,u=n+l,d=1^a,h=a?i-s:s-i;this._x1===null?this._append`M${c},${u}`:(Math.abs(this._x1-c)>Tn||Math.abs(this._y1-u)>Tn)&&this._append`L${c},${u}`,r&&(h<0&&(h=h%So+So),h>Z1?this._append`A${r},${r},0,1,${d},${t-o},${n-l}A${r},${r},0,1,${d},${this._x1=c},${this._y1=u}`:h>Tn&&this._append`A${r},${r},0,${+(h>=Eo)},${d},${this._x1=t+r*Math.cos(s)},${this._y1=n+r*Math.sin(s)}`)}rect(t,n,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}};function J1(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function ds(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function Jn(e){return e=ds(Math.abs(e)),e?e[1]:NaN}function tx(e,t){return function(n,r){for(var i=n.length,s=[],a=0,o=e[0],l=0;i>0&&o>0&&(l+o+1>r&&(o=Math.max(1,r-l)),s.push(n.substring(i-=o,i+o)),!((l+=o+1)>r));)o=e[a=(a+1)%e.length];return s.reverse().join(t)}}function ex(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var nx=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Wr(e){if(!(t=nx.exec(e)))throw new Error("invalid format: "+e);var t;return new _o({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Wr.prototype=_o.prototype;function _o(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}_o.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function rx(e){t:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+e[n])break t;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var rh;function ix(e,t){var n=ds(e,t);if(!n)return e+"";var r=n[0],i=n[1],s=i-(rh=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=r.length;return s===a?r:s>a?r+new Array(s-a+1).join("0"):s>0?r.slice(0,s)+"."+r.slice(s):"0."+new Array(1-s).join("0")+ds(e,Math.max(0,t+s-1))[0]}function ih(e,t){var n=ds(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const sh={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:J1,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>ih(e*100,t),r:ih,s:ix,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function ah(e){return e}var oh=Array.prototype.map,lh=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function sx(e){var t=e.grouping===void 0||e.thousands===void 0?ah:tx(oh.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",s=e.numerals===void 0?ah:ex(oh.call(e.numerals,String)),a=e.percent===void 0?"%":e.percent+"",o=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function c(d){d=Wr(d);var h=d.fill,f=d.align,p=d.sign,g=d.symbol,v=d.zero,m=d.width,y=d.comma,b=d.precision,S=d.trim,_=d.type;_==="n"?(y=!0,_="g"):sh[_]||(b===void 0&&(b=12),S=!0,_="g"),(v||h==="0"&&f==="=")&&(v=!0,h="0",f="=");var E=g==="$"?n:g==="#"&&/[boxX]/.test(_)?"0"+_.toLowerCase():"",M=g==="$"?r:/[%p]/.test(_)?a:"",C=sh[_],G=/[defgprs%]/.test(_);b=b===void 0?6:/[gprs]/.test(_)?Math.max(1,Math.min(21,b)):Math.max(0,Math.min(20,b));function I(T){var L=E,R=M,k,O,U;if(_==="c")R=C(T)+R,T="";else{T=+T;var P=T<0||1/T<0;if(T=isNaN(T)?l:C(Math.abs(T),b),S&&(T=rx(T)),P&&+T==0&&p!=="+"&&(P=!1),L=(P?p==="("?p:o:p==="-"||p==="("?"":p)+L,R=(_==="s"?lh[8+rh/3]:"")+R+(P&&p==="("?")":""),G){for(k=-1,O=T.length;++k<O;)if(U=T.charCodeAt(k),48>U||U>57){R=(U===46?i+T.slice(k+1):T.slice(k))+R,T=T.slice(0,k);break}}}y&&!v&&(T=t(T,1/0));var N=L.length+T.length+R.length,B=N<m?new Array(m-N+1).join(h):"";switch(y&&v&&(T=t(B+T,B.length?m-R.length:1/0),B=""),f){case"<":T=L+T+R+B;break;case"=":T=L+B+T+R;break;case"^":T=B.slice(0,N=B.length>>1)+L+T+R+B.slice(N);break;default:T=B+L+T+R;break}return s(T)}return I.toString=function(){return d+""},I}function u(d,h){var f=c((d=Wr(d),d.type="f",d)),p=Math.max(-8,Math.min(8,Math.floor(Jn(h)/3)))*3,g=Math.pow(10,-p),v=lh[8+p/3];return function(m){return f(g*m)+v}}return{format:c,formatPrefix:u}}var fs,wo,ch;ax({thousands:",",grouping:[3],currency:["$",""]});function ax(e){return fs=sx(e),wo=fs.format,ch=fs.formatPrefix,fs}function ox(e){return Math.max(0,-Jn(Math.abs(e)))}function lx(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Jn(t)/3)))*3-Jn(Math.abs(e)))}function cx(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Jn(t)-Jn(e))+1}var gt=1e-6,uh=1e-12,ot=Math.PI,te=ot/2,hh=ot/4,oe=ot*2,Xt=180/ot,Dt=ot/180,mt=Math.abs,dh=Math.atan,Mn=Math.atan2,xt=Math.cos,ux=Math.exp,hx=Math.log,ft=Math.sin,un=Math.sign||function(e){return e>0?1:e<0?-1:0},_e=Math.sqrt,dx=Math.tan;function fx(e){return e>1?0:e<-1?ot:Math.acos(e)}function qe(e){return e>1?te:e<-1?-te:Math.asin(e)}function fe(){}function ps(e,t){e&&ph.hasOwnProperty(e.type)&&ph[e.type](e,t)}var fh={Feature:function(e,t){ps(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,r=-1,i=n.length;++r<i;)ps(n[r].geometry,t)}},ph={Sphere:function(e,t){t.sphere()},Point:function(e,t){e=e.coordinates,t.point(e[0],e[1],e[2])},MultiPoint:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)e=n[r],t.point(e[0],e[1],e[2])},LineString:function(e,t){Oo(e.coordinates,t,0)},MultiLineString:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)Oo(n[r],t,0)},Polygon:function(e,t){gh(e.coordinates,t)},MultiPolygon:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)gh(n[r],t)},GeometryCollection:function(e,t){for(var n=e.geometries,r=-1,i=n.length;++r<i;)ps(n[r],t)}};function Oo(e,t,n){var r=-1,i=e.length-n,s;for(t.lineStart();++r<i;)s=e[r],t.point(s[0],s[1],s[2]);t.lineEnd()}function gh(e,t){var n=-1,r=e.length;for(t.polygonStart();++n<r;)Oo(e[n],t,1);t.polygonEnd()}function tr(e,t){e&&fh.hasOwnProperty(e.type)?fh[e.type](e,t):ps(e,t)}function To(e){return[Mn(e[1],e[0]),qe(e[2])]}function er(e){var t=e[0],n=e[1],r=xt(n);return[r*xt(t),r*ft(t),ft(n)]}function gs(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function ms(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function Mo(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function vs(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function Co(e){var t=_e(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}function Ao(e,t){function n(r,i){return r=e(r,i),t(r[0],r[1])}return e.invert&&t.invert&&(n.invert=function(r,i){return r=t.invert(r,i),r&&e.invert(r[0],r[1])}),n}function Do(e,t){return mt(e)>ot&&(e-=Math.round(e/oe)*oe),[e,t]}Do.invert=Do;function mh(e,t,n){return(e%=oe)?t||n?Ao(yh(e),xh(t,n)):yh(e):t||n?xh(t,n):Do}function vh(e){return function(t,n){return t+=e,mt(t)>ot&&(t-=Math.round(t/oe)*oe),[t,n]}}function yh(e){var t=vh(e);return t.invert=vh(-e),t}function xh(e,t){var n=xt(e),r=ft(e),i=xt(t),s=ft(t);function a(o,l){var c=xt(l),u=xt(o)*c,d=ft(o)*c,h=ft(l),f=h*n+u*r;return[Mn(d*i-f*s,u*n-h*r),qe(f*i+d*s)]}return a.invert=function(o,l){var c=xt(l),u=xt(o)*c,d=ft(o)*c,h=ft(l),f=h*i-d*s;return[Mn(d*i+h*s,u*n+f*r),qe(f*n-u*r)]},a}function px(e){e=mh(e[0]*Dt,e[1]*Dt,e.length>2?e[2]*Dt:0);function t(n){return n=e(n[0]*Dt,n[1]*Dt),n[0]*=Xt,n[1]*=Xt,n}return t.invert=function(n){return n=e.invert(n[0]*Dt,n[1]*Dt),n[0]*=Xt,n[1]*=Xt,n},t}function gx(e,t,n,r,i,s){if(n){var a=xt(t),o=ft(t),l=r*n;i==null?(i=t+r*oe,s=t-l/2):(i=bh(a,i),s=bh(a,s),(r>0?i<s:i>s)&&(i+=r*oe));for(var c,u=i;r>0?u>s:u<s;u-=l)c=To([a,-o*xt(u),-o*ft(u)]),e.point(c[0],c[1])}}function bh(e,t){t=er(t),t[0]-=e,Co(t);var n=fx(-t[1]);return((-t[2]<0?-n:n)+oe-gt)%oe}function Eh(){var e=[],t;return{point:function(n,r,i){t.push([n,r,i])},lineStart:function(){e.push(t=[])},lineEnd:fe,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function ys(e,t){return mt(e[0]-t[0])<gt&&mt(e[1]-t[1])<gt}function xs(e,t,n,r){this.x=e,this.z=t,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function Sh(e,t,n,r,i){var s=[],a=[],o,l;if(e.forEach(function(p){if(!((g=p.length-1)<=0)){var g,v=p[0],m=p[g],y;if(ys(v,m)){if(!v[2]&&!m[2]){for(i.lineStart(),o=0;o<g;++o)i.point((v=p[o])[0],v[1]);i.lineEnd();return}m[0]+=2*gt}s.push(y=new xs(v,p,null,!0)),a.push(y.o=new xs(v,null,y,!1)),s.push(y=new xs(m,p,null,!1)),a.push(y.o=new xs(m,null,y,!0))}}),!!s.length){for(a.sort(t),_h(s),_h(a),o=0,l=a.length;o<l;++o)a[o].e=n=!n;for(var c=s[0],u,d;;){for(var h=c,f=!0;h.v;)if((h=h.n)===c)return;u=h.z,i.lineStart();do{if(h.v=h.o.v=!0,h.e){if(f)for(o=0,l=u.length;o<l;++o)i.point((d=u[o])[0],d[1]);else r(h.x,h.n.x,1,i);h=h.n}else{if(f)for(u=h.p.z,o=u.length-1;o>=0;--o)i.point((d=u[o])[0],d[1]);else r(h.x,h.p.x,-1,i);h=h.p}h=h.o,u=h.z,f=!f}while(!h.v);i.lineEnd()}}}function _h(e){if(t=e.length){for(var t,n=0,r=e[0],i;++n<t;)r.n=i=e[n],i.p=r,r=i;r.n=i=e[0],i.p=r}}function Lo(e){return mt(e[0])<=ot?e[0]:un(e[0])*((mt(e[0])+ot)%oe-ot)}function mx(e,t){var n=Lo(t),r=t[1],i=ft(r),s=[ft(n),-xt(n),0],a=0,o=0,l=new bn;i===1?r=te+gt:i===-1&&(r=-te-gt);for(var c=0,u=e.length;c<u;++c)if(h=(d=e[c]).length)for(var d,h,f=d[h-1],p=Lo(f),g=f[1]/2+hh,v=ft(g),m=xt(g),y=0;y<h;++y,p=S,v=E,m=M,f=b){var b=d[y],S=Lo(b),_=b[1]/2+hh,E=ft(_),M=xt(_),C=S-p,G=C>=0?1:-1,I=G*C,T=I>ot,L=v*E;if(l.add(Mn(L*G*ft(I),m*M+L*xt(I))),a+=T?C+G*oe:C,T^p>=n^S>=n){var R=ms(er(f),er(b));Co(R);var k=ms(s,R);Co(k);var O=(T^C>=0?-1:1)*qe(k[2]);(r>O||r===O&&(R[0]||R[1]))&&(o+=T^C>=0?1:-1)}}return(a<-gt||a<gt&&l<-uh)^o&1}function wh(e,t,n,r){return function(i){var s=t(i),a=Eh(),o=t(a),l=!1,c,u,d,h={point:f,lineStart:g,lineEnd:v,polygonStart:function(){h.point=m,h.lineStart=y,h.lineEnd=b,u=[],c=[]},polygonEnd:function(){h.point=f,h.lineStart=g,h.lineEnd=v,u=iu(u);var S=mx(c,r);u.length?(l||(i.polygonStart(),l=!0),Sh(u,yx,S,n,i)):S&&(l||(i.polygonStart(),l=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),l&&(i.polygonEnd(),l=!1),u=c=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function f(S,_){e(S,_)&&i.point(S,_)}function p(S,_){s.point(S,_)}function g(){h.point=p,s.lineStart()}function v(){h.point=f,s.lineEnd()}function m(S,_){d.push([S,_]),o.point(S,_)}function y(){o.lineStart(),d=[]}function b(){m(d[0][0],d[0][1]),o.lineEnd();var S=o.clean(),_=a.result(),E,M=_.length,C,G,I;if(d.pop(),c.push(d),d=null,!!M){if(S&1){if(G=_[0],(C=G.length-1)>0){for(l||(i.polygonStart(),l=!0),i.lineStart(),E=0;E<C;++E)i.point((I=G[E])[0],I[1]);i.lineEnd()}return}M>1&&S&2&&_.push(_.pop().concat(_.shift())),u.push(_.filter(vx))}}return h}}function vx(e){return e.length>1}function yx(e,t){return((e=e.x)[0]<0?e[1]-te-gt:te-e[1])-((t=t.x)[0]<0?t[1]-te-gt:te-t[1])}const Oh=wh(function(){return!0},xx,Ex,[-ot,-te]);function xx(e){var t=NaN,n=NaN,r=NaN,i;return{lineStart:function(){e.lineStart(),i=1},point:function(s,a){var o=s>0?ot:-ot,l=mt(s-t);mt(l-ot)<gt?(e.point(t,n=(n+a)/2>0?te:-te),e.point(r,n),e.lineEnd(),e.lineStart(),e.point(o,n),e.point(s,n),i=0):r!==o&&l>=ot&&(mt(t-r)<gt&&(t-=r*gt),mt(s-o)<gt&&(s-=o*gt),n=bx(t,n,s,a),e.point(r,n),e.lineEnd(),e.lineStart(),e.point(o,n),i=0),e.point(t=s,n=a),r=o},lineEnd:function(){e.lineEnd(),t=n=NaN},clean:function(){return 2-i}}}function bx(e,t,n,r){var i,s,a=ft(e-n);return mt(a)>gt?dh((ft(t)*(s=xt(r))*ft(n)-ft(r)*(i=xt(t))*ft(e))/(i*s*a)):(t+r)/2}function Ex(e,t,n,r){var i;if(e==null)i=n*te,r.point(-ot,i),r.point(0,i),r.point(ot,i),r.point(ot,0),r.point(ot,-i),r.point(0,-i),r.point(-ot,-i),r.point(-ot,0),r.point(-ot,i);else if(mt(e[0]-t[0])>gt){var s=e[0]<t[0]?ot:-ot;i=n*s/2,r.point(-s,i),r.point(0,i),r.point(s,i)}else r.point(t[0],t[1])}function Sx(e){var t=xt(e),n=6*Dt,r=t>0,i=mt(t)>gt;function s(u,d,h,f){gx(f,e,n,h,u,d)}function a(u,d){return xt(u)*xt(d)>t}function o(u){var d,h,f,p,g;return{lineStart:function(){p=f=!1,g=1},point:function(v,m){var y=[v,m],b,S=a(v,m),_=r?S?0:c(v,m):S?c(v+(v<0?ot:-ot),m):0;if(!d&&(p=f=S)&&u.lineStart(),S!==f&&(b=l(d,y),(!b||ys(d,b)||ys(y,b))&&(y[2]=1)),S!==f)g=0,S?(u.lineStart(),b=l(y,d),u.point(b[0],b[1])):(b=l(d,y),u.point(b[0],b[1],2),u.lineEnd()),d=b;else if(i&&d&&r^S){var E;!(_&h)&&(E=l(y,d,!0))&&(g=0,r?(u.lineStart(),u.point(E[0][0],E[0][1]),u.point(E[1][0],E[1][1]),u.lineEnd()):(u.point(E[1][0],E[1][1]),u.lineEnd(),u.lineStart(),u.point(E[0][0],E[0][1],3)))}S&&(!d||!ys(d,y))&&u.point(y[0],y[1]),d=y,f=S,h=_},lineEnd:function(){f&&u.lineEnd(),d=null},clean:function(){return g|(p&&f)<<1}}}function l(u,d,h){var f=er(u),p=er(d),g=[1,0,0],v=ms(f,p),m=gs(v,v),y=v[0],b=m-y*y;if(!b)return!h&&u;var S=t*m/b,_=-t*y/b,E=ms(g,v),M=vs(g,S),C=vs(v,_);Mo(M,C);var G=E,I=gs(M,G),T=gs(G,G),L=I*I-T*(gs(M,M)-1);if(!(L<0)){var R=_e(L),k=vs(G,(-I-R)/T);if(Mo(k,M),k=To(k),!h)return k;var O=u[0],U=d[0],P=u[1],N=d[1],B;U<O&&(B=O,O=U,U=B);var Y=U-O,X=mt(Y-ot)<gt,J=X||Y<gt;if(!X&&N<P&&(B=P,P=N,N=B),J?X?P+N>0^k[1]<(mt(k[0]-O)<gt?P:N):P<=k[1]&&k[1]<=N:Y>ot^(O<=k[0]&&k[0]<=U)){var ct=vs(G,(-I+R)/T);return Mo(ct,M),[k,To(ct)]}}}function c(u,d){var h=r?e:ot-e,f=0;return u<-h?f|=1:u>h&&(f|=2),d<-h?f|=4:d>h&&(f|=8),f}return wh(a,o,s,r?[0,-e]:[-ot,e-ot])}function _x(e,t,n,r,i,s){var a=e[0],o=e[1],l=t[0],c=t[1],u=0,d=1,h=l-a,f=c-o,p;if(p=n-a,!(!h&&p>0)){if(p/=h,h<0){if(p<u)return;p<d&&(d=p)}else if(h>0){if(p>d)return;p>u&&(u=p)}if(p=i-a,!(!h&&p<0)){if(p/=h,h<0){if(p>d)return;p>u&&(u=p)}else if(h>0){if(p<u)return;p<d&&(d=p)}if(p=r-o,!(!f&&p>0)){if(p/=f,f<0){if(p<u)return;p<d&&(d=p)}else if(f>0){if(p>d)return;p>u&&(u=p)}if(p=s-o,!(!f&&p<0)){if(p/=f,f<0){if(p>d)return;p>u&&(u=p)}else if(f>0){if(p<u)return;p<d&&(d=p)}return u>0&&(e[0]=a+u*h,e[1]=o+u*f),d<1&&(t[0]=a+d*h,t[1]=o+d*f),!0}}}}}var Yr=1e9,bs=-Yr;function wx(e,t,n,r){function i(c,u){return e<=c&&c<=n&&t<=u&&u<=r}function s(c,u,d,h){var f=0,p=0;if(c==null||(f=a(c,d))!==(p=a(u,d))||l(c,u)<0^d>0)do h.point(f===0||f===3?e:n,f>1?r:t);while((f=(f+d+4)%4)!==p);else h.point(u[0],u[1])}function a(c,u){return mt(c[0]-e)<gt?u>0?0:3:mt(c[0]-n)<gt?u>0?2:1:mt(c[1]-t)<gt?u>0?1:0:u>0?3:2}function o(c,u){return l(c.x,u.x)}function l(c,u){var d=a(c,1),h=a(u,1);return d!==h?d-h:d===0?u[1]-c[1]:d===1?c[0]-u[0]:d===2?c[1]-u[1]:u[0]-c[0]}return function(c){var u=c,d=Eh(),h,f,p,g,v,m,y,b,S,_,E,M={point:C,lineStart:L,lineEnd:R,polygonStart:I,polygonEnd:T};function C(O,U){i(O,U)&&u.point(O,U)}function G(){for(var O=0,U=0,P=f.length;U<P;++U)for(var N=f[U],B=1,Y=N.length,X=N[0],J,ct,W=X[0],K=X[1];B<Y;++B)J=W,ct=K,X=N[B],W=X[0],K=X[1],ct<=r?K>r&&(W-J)*(r-ct)>(K-ct)*(e-J)&&++O:K<=r&&(W-J)*(r-ct)<(K-ct)*(e-J)&&--O;return O}function I(){u=d,h=[],f=[],E=!0}function T(){var O=G(),U=E&&O,P=(h=iu(h)).length;(U||P)&&(c.polygonStart(),U&&(c.lineStart(),s(null,null,1,c),c.lineEnd()),P&&Sh(h,o,O,s,c),c.polygonEnd()),u=c,h=f=p=null}function L(){M.point=k,f&&f.push(p=[]),_=!0,S=!1,y=b=NaN}function R(){h&&(k(g,v),m&&S&&d.rejoin(),h.push(d.result())),M.point=C,S&&u.lineEnd()}function k(O,U){var P=i(O,U);if(f&&p.push([O,U]),_)g=O,v=U,m=P,_=!1,P&&(u.lineStart(),u.point(O,U));else if(P&&S)u.point(O,U);else{var N=[y=Math.max(bs,Math.min(Yr,y)),b=Math.max(bs,Math.min(Yr,b))],B=[O=Math.max(bs,Math.min(Yr,O)),U=Math.max(bs,Math.min(Yr,U))];_x(N,B,e,t,n,r)?(S||(u.lineStart(),u.point(N[0],N[1])),u.point(B[0],B[1]),P||u.lineEnd(),E=!1):P&&(u.lineStart(),u.point(O,U),E=!1)}y=O,b=U,S=P}return M}}const Ro=e=>e;var Io=new bn,ko=new bn,Th,Mh,$o,Po,hn={point:fe,lineStart:fe,lineEnd:fe,polygonStart:function(){hn.lineStart=Ox,hn.lineEnd=Mx},polygonEnd:function(){hn.lineStart=hn.lineEnd=hn.point=fe,Io.add(mt(ko)),ko=new bn},result:function(){var e=Io/2;return Io=new bn,e}};function Ox(){hn.point=Tx}function Tx(e,t){hn.point=Ch,Th=$o=e,Mh=Po=t}function Ch(e,t){ko.add(Po*e-$o*t),$o=e,Po=t}function Mx(){Ch(Th,Mh)}const Ah=hn;var nr=1/0,Es=nr,qr=-nr,Ss=qr,Cx={point:Ax,lineStart:fe,lineEnd:fe,polygonStart:fe,polygonEnd:fe,result:function(){var e=[[nr,Es],[qr,Ss]];return qr=Ss=-(Es=nr=1/0),e}};function Ax(e,t){e<nr&&(nr=e),e>qr&&(qr=e),t<Es&&(Es=t),t>Ss&&(Ss=t)}const _s=Cx;var No=0,Uo=0,Xr=0,ws=0,Os=0,rr=0,Bo=0,Vo=0,jr=0,Dh,Lh,ke,$e,we={point:Cn,lineStart:Rh,lineEnd:Ih,polygonStart:function(){we.lineStart=Rx,we.lineEnd=Ix},polygonEnd:function(){we.point=Cn,we.lineStart=Rh,we.lineEnd=Ih},result:function(){var e=jr?[Bo/jr,Vo/jr]:rr?[ws/rr,Os/rr]:Xr?[No/Xr,Uo/Xr]:[NaN,NaN];return No=Uo=Xr=ws=Os=rr=Bo=Vo=jr=0,e}};function Cn(e,t){No+=e,Uo+=t,++Xr}function Rh(){we.point=Dx}function Dx(e,t){we.point=Lx,Cn(ke=e,$e=t)}function Lx(e,t){var n=e-ke,r=t-$e,i=_e(n*n+r*r);ws+=i*(ke+e)/2,Os+=i*($e+t)/2,rr+=i,Cn(ke=e,$e=t)}function Ih(){we.point=Cn}function Rx(){we.point=kx}function Ix(){kh(Dh,Lh)}function kx(e,t){we.point=kh,Cn(Dh=ke=e,Lh=$e=t)}function kh(e,t){var n=e-ke,r=t-$e,i=_e(n*n+r*r);ws+=i*(ke+e)/2,Os+=i*($e+t)/2,rr+=i,i=$e*e-ke*t,Bo+=i*(ke+e),Vo+=i*($e+t),jr+=i*3,Cn(ke=e,$e=t)}const $h=we;function Ph(e){this._context=e}Ph.prototype={_radius:4.5,pointRadius:function(e){return this._radius=e,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._context.closePath(),this._point=NaN},point:function(e,t){switch(this._point){case 0:{this._context.moveTo(e,t),this._point=1;break}case 1:{this._context.lineTo(e,t);break}default:{this._context.moveTo(e+this._radius,t),this._context.arc(e,t,this._radius,0,oe);break}}},result:fe};var Go=new bn,Ho,Nh,Uh,Zr,Kr,Ts={point:fe,lineStart:function(){Ts.point=$x},lineEnd:function(){Ho&&Bh(Nh,Uh),Ts.point=fe},polygonStart:function(){Ho=!0},polygonEnd:function(){Ho=null},result:function(){var e=+Go;return Go=new bn,e}};function $x(e,t){Ts.point=Bh,Nh=Zr=e,Uh=Kr=t}function Bh(e,t){Zr-=e,Kr-=t,Go.add(_e(Zr*Zr+Kr*Kr)),Zr=e,Kr=t}const Vh=Ts;let Gh,Ms,Hh,Fh;class zh{constructor(t){this._append=t==null?Wh:Px(t),this._radius=4.5,this._=""}pointRadius(t){return this._radius=+t,this}polygonStart(){this._line=0}polygonEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){this._line===0&&(this._+="Z"),this._point=NaN}point(t,n){switch(this._point){case 0:{this._append`M${t},${n}`,this._point=1;break}case 1:{this._append`L${t},${n}`;break}default:{if(this._append`M${t},${n}`,this._radius!==Hh||this._append!==Ms){const r=this._radius,i=this._;this._="",this._append`m0,${r}a${r},${r} 0 1,1 0,${-2*r}a${r},${r} 0 1,1 0,${2*r}z`,Hh=r,Ms=this._append,Fh=this._,this._=i}this._+=Fh;break}}}result(){const t=this._;return this._="",t.length?t:null}}function Wh(e){let t=1;this._+=e[0];for(const n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function Px(e){const t=Math.floor(e);if(!(t>=0))throw new RangeError(`invalid digits: ${e}`);if(t>15)return Wh;if(t!==Gh){const n=10**t;Gh=t,Ms=function(i){let s=1;this._+=i[0];for(const a=i.length;s<a;++s)this._+=Math.round(arguments[s]*n)/n+i[s]}}return Ms}function Nx(e,t){let n=3,r=4.5,i,s;function a(o){return o&&(typeof r=="function"&&s.pointRadius(+r.apply(this,arguments)),tr(o,i(s))),s.result()}return a.area=function(o){return tr(o,i(Ah)),Ah.result()},a.measure=function(o){return tr(o,i(Vh)),Vh.result()},a.bounds=function(o){return tr(o,i(_s)),_s.result()},a.centroid=function(o){return tr(o,i($h)),$h.result()},a.projection=function(o){return arguments.length?(i=o==null?(e=null,Ro):(e=o).stream,a):e},a.context=function(o){return arguments.length?(s=o==null?(t=null,new zh(n)):new Ph(t=o),typeof r!="function"&&s.pointRadius(r),a):t},a.pointRadius=function(o){return arguments.length?(r=typeof o=="function"?o:(s.pointRadius(+o),+o),a):r},a.digits=function(o){if(!arguments.length)return n;if(o==null)n=null;else{const l=Math.floor(o);if(!(l>=0))throw new RangeError(`invalid digits: ${o}`);n=l}return t===null&&(s=new zh(n)),a},a.projection(e).digits(n).context(t)}function Fo(e){return function(t){var n=new zo;for(var r in e)n[r]=e[r];return n.stream=t,n}}function zo(){}zo.prototype={constructor:zo,point:function(e,t){this.stream.point(e,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function Wo(e,t,n){var r=e.clipExtent&&e.clipExtent();return e.scale(150).translate([0,0]),r!=null&&e.clipExtent(null),tr(n,e.stream(_s)),t(_s.result()),r!=null&&e.clipExtent(r),e}function Yh(e,t,n){return Wo(e,function(r){var i=t[1][0]-t[0][0],s=t[1][1]-t[0][1],a=Math.min(i/(r[1][0]-r[0][0]),s/(r[1][1]-r[0][1])),o=+t[0][0]+(i-a*(r[1][0]+r[0][0]))/2,l=+t[0][1]+(s-a*(r[1][1]+r[0][1]))/2;e.scale(150*a).translate([o,l])},n)}function Ux(e,t,n){return Yh(e,[[0,0],t],n)}function Bx(e,t,n){return Wo(e,function(r){var i=+t,s=i/(r[1][0]-r[0][0]),a=(i-s*(r[1][0]+r[0][0]))/2,o=-s*r[0][1];e.scale(150*s).translate([a,o])},n)}function Vx(e,t,n){return Wo(e,function(r){var i=+t,s=i/(r[1][1]-r[0][1]),a=-s*r[0][0],o=(i-s*(r[1][1]+r[0][1]))/2;e.scale(150*s).translate([a,o])},n)}var qh=16,Gx=xt(30*Dt);function Xh(e,t){return+t?Fx(e,t):Hx(e)}function Hx(e){return Fo({point:function(t,n){t=e(t,n),this.stream.point(t[0],t[1])}})}function Fx(e,t){function n(r,i,s,a,o,l,c,u,d,h,f,p,g,v){var m=c-r,y=u-i,b=m*m+y*y;if(b>4*t&&g--){var S=a+h,_=o+f,E=l+p,M=_e(S*S+_*_+E*E),C=qe(E/=M),G=mt(mt(E)-1)<gt||mt(s-d)<gt?(s+d)/2:Mn(_,S),I=e(G,C),T=I[0],L=I[1],R=T-r,k=L-i,O=y*R-m*k;(O*O/b>t||mt((m*R+y*k)/b-.5)>.3||a*h+o*f+l*p<Gx)&&(n(r,i,s,a,o,l,T,L,G,S/=M,_/=M,E,g,v),v.point(T,L),n(T,L,G,S,_,E,c,u,d,h,f,p,g,v))}}return function(r){var i,s,a,o,l,c,u,d,h,f,p,g,v={point:m,lineStart:y,lineEnd:S,polygonStart:function(){r.polygonStart(),v.lineStart=_},polygonEnd:function(){r.polygonEnd(),v.lineStart=y}};function m(C,G){C=e(C,G),r.point(C[0],C[1])}function y(){d=NaN,v.point=b,r.lineStart()}function b(C,G){var I=er([C,G]),T=e(C,G);n(d,h,u,f,p,g,d=T[0],h=T[1],u=C,f=I[0],p=I[1],g=I[2],qh,r),r.point(d,h)}function S(){v.point=m,r.lineEnd()}function _(){y(),v.point=E,v.lineEnd=M}function E(C,G){b(i=C,G),s=d,a=h,o=f,l=p,c=g,v.point=b}function M(){n(d,h,u,f,p,g,s,a,i,o,l,c,qh,r),v.lineEnd=S,S()}return v}}var zx=Fo({point:function(e,t){this.stream.point(e*Dt,t*Dt)}});function Wx(e){return Fo({point:function(t,n){var r=e(t,n);return this.stream.point(r[0],r[1])}})}function Yx(e,t,n,r,i){function s(a,o){return a*=r,o*=i,[t+e*a,n-e*o]}return s.invert=function(a,o){return[(a-t)/e*r,(n-o)/e*i]},s}function jh(e,t,n,r,i,s){if(!s)return Yx(e,t,n,r,i);var a=xt(s),o=ft(s),l=a*e,c=o*e,u=a/e,d=o/e,h=(o*n-a*t)/e,f=(o*t+a*n)/e;function p(g,v){return g*=r,v*=i,[l*g-c*v+t,n-c*g-l*v]}return p.invert=function(g,v){return[r*(u*g-d*v+h),i*(f-d*g-u*v)]},p}function Cs(e){return Zh(function(){return e})()}function Zh(e){var t,n=150,r=480,i=250,s=0,a=0,o=0,l=0,c=0,u,d=0,h=1,f=1,p=null,g=Oh,v=null,m,y,b,S=Ro,_=.5,E,M,C,G,I;function T(O){return C(O[0]*Dt,O[1]*Dt)}function L(O){return O=C.invert(O[0],O[1]),O&&[O[0]*Xt,O[1]*Xt]}T.stream=function(O){return G&&I===O?G:G=zx(Wx(u)(g(E(S(I=O)))))},T.preclip=function(O){return arguments.length?(g=O,p=void 0,k()):g},T.postclip=function(O){return arguments.length?(S=O,v=m=y=b=null,k()):S},T.clipAngle=function(O){return arguments.length?(g=+O?Sx(p=O*Dt):(p=null,Oh),k()):p*Xt},T.clipExtent=function(O){return arguments.length?(S=O==null?(v=m=y=b=null,Ro):wx(v=+O[0][0],m=+O[0][1],y=+O[1][0],b=+O[1][1]),k()):v==null?null:[[v,m],[y,b]]},T.scale=function(O){return arguments.length?(n=+O,R()):n},T.translate=function(O){return arguments.length?(r=+O[0],i=+O[1],R()):[r,i]},T.center=function(O){return arguments.length?(s=O[0]%360*Dt,a=O[1]%360*Dt,R()):[s*Xt,a*Xt]},T.rotate=function(O){return arguments.length?(o=O[0]%360*Dt,l=O[1]%360*Dt,c=O.length>2?O[2]%360*Dt:0,R()):[o*Xt,l*Xt,c*Xt]},T.angle=function(O){return arguments.length?(d=O%360*Dt,R()):d*Xt},T.reflectX=function(O){return arguments.length?(h=O?-1:1,R()):h<0},T.reflectY=function(O){return arguments.length?(f=O?-1:1,R()):f<0},T.precision=function(O){return arguments.length?(E=Xh(M,_=O*O),k()):_e(_)},T.fitExtent=function(O,U){return Yh(T,O,U)},T.fitSize=function(O,U){return Ux(T,O,U)},T.fitWidth=function(O,U){return Bx(T,O,U)},T.fitHeight=function(O,U){return Vx(T,O,U)};function R(){var O=jh(n,0,0,h,f,d).apply(null,t(s,a)),U=jh(n,r-O[0],i-O[1],h,f,d);return u=mh(o,l,c),M=Ao(t,U),C=Ao(u,M),E=Xh(M,_),k()}function k(){return G=I=null,T}return function(){return t=e.apply(this,arguments),T.invert=t.invert&&L,R()}}function Kh(e){var t=0,n=ot/3,r=Zh(e),i=r(t,n);return i.parallels=function(s){return arguments.length?r(t=s[0]*Dt,n=s[1]*Dt):[t*Xt,n*Xt]},i}function qx(e){var t=xt(e);function n(r,i){return[r*t,ft(i)/t]}return n.invert=function(r,i){return[r/t,qe(i*t)]},n}function Xx(e,t){var n=ft(e),r=(n+ft(t))/2;if(mt(r)<gt)return qx(e);var i=1+n*(2*r-n),s=_e(i)/r;function a(o,l){var c=_e(i-2*r*ft(l))/r;return[c*ft(o*=r),s-c*xt(o)]}return a.invert=function(o,l){var c=s-l,u=Mn(o,mt(c))*un(c);return c*r<0&&(u-=ot*un(o)*un(c)),[u/r,qe((i-(o*o+c*c)*r*r)/(2*r))]},a}function Qh(){return Kh(Xx).scale(155.424).center([0,33.6442])}function jx(){return Qh().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function Yo(e,t){return[e,hx(dx((te+t)/2))]}Yo.invert=function(e,t){return[e,2*dh(ux(t))-te]};function Zx(){return Kx(Yo).scale(961/oe)}function Kx(e){var t=Cs(e),n=t.center,r=t.scale,i=t.translate,s=t.clipExtent,a=null,o,l,c;t.scale=function(d){return arguments.length?(r(d),u()):r()},t.translate=function(d){return arguments.length?(i(d),u()):i()},t.center=function(d){return arguments.length?(n(d),u()):n()},t.clipExtent=function(d){return arguments.length?(d==null?a=o=l=c=null:(a=+d[0][0],o=+d[0][1],l=+d[1][0],c=+d[1][1]),u()):a==null?null:[[a,o],[l,c]]};function u(){var d=ot*r(),h=t(px(t.rotate()).invert([0,0]));return s(a==null?[[h[0]-d,h[1]-d],[h[0]+d,h[1]+d]]:e===Yo?[[Math.max(h[0]-d,a),o],[Math.min(h[0]+d,l),c]]:[[a,Math.max(h[1]-d,o)],[l,Math.min(h[1]+d,c)]])}return u()}function As(e,t){return[e,t]}As.invert=As;function Qx(){return Cs(As).scale(152.63)}function Jx(e,t){var n=xt(e),r=e===t?ft(e):(n-xt(t))/(t-e),i=n/r+e;if(mt(r)<gt)return As;function s(a,o){var l=i-o,c=r*a;return[l*ft(c),i-l*xt(c)]}return s.invert=function(a,o){var l=i-o,c=Mn(a,mt(l))*un(l);return l*r<0&&(c-=ot*un(a)*un(l)),[c/r,i-un(r)*_e(a*a+l*l)]},s}function tb(){return Kh(Jx).scale(131.154).center([0,13.9389])}var Qr=1.340264,Jr=-.081106,ti=893e-6,ei=.003796,Ds=_e(3)/2,eb=12;function Jh(e,t){var n=qe(Ds*ft(t)),r=n*n,i=r*r*r;return[e*xt(n)/(Ds*(Qr+3*Jr*r+i*(7*ti+9*ei*r))),n*(Qr+Jr*r+i*(ti+ei*r))]}Jh.invert=function(e,t){for(var n=t,r=n*n,i=r*r*r,s=0,a,o,l;s<eb&&(o=n*(Qr+Jr*r+i*(ti+ei*r))-t,l=Qr+3*Jr*r+i*(7*ti+9*ei*r),n-=a=o/l,r=n*n,i=r*r*r,!(mt(a)<uh));++s);return[Ds*e*(Qr+3*Jr*r+i*(7*ti+9*ei*r))/xt(n),qe(ft(n)/Ds)]};function nb(){return Cs(Jh).scale(177.158)}function td(e,t){var n=t*t,r=n*n;return[e*(.8707-.131979*n+r*(-.013791+r*(.003971*n-.001529*r))),t*(1.007226+n*(.015085+r*(-.044475+.028874*n-.005916*r)))]}td.invert=function(e,t){var n=t,r=25,i;do{var s=n*n,a=s*s;n-=i=(n*(1.007226+s*(.015085+a*(-.044475+.028874*s-.005916*a)))-t)/(1.007226+s*(.015085*3+a*(-.044475*7+.028874*9*s-.005916*11*a)))}while(mt(i)>gt&&--r>0);return[e/(.8707+(s=n*n)*(-.131979+s*(-.013791+s*s*s*(.003971-.001529*s)))),n]};function rb(){return Cs(td).scale(175.295)}function ib(e,t){return e.parent===t.parent?1:2}function sb(e){return e.reduce(ab,0)/e.length}function ab(e,t){return e+t.x}function ob(e){return 1+e.reduce(lb,0)}function lb(e,t){return Math.max(e,t.y)}function cb(e){for(var t;t=e.children;)e=t[0];return e}function ub(e){for(var t;t=e.children;)e=t[t.length-1];return e}function hb(){var e=ib,t=1,n=1,r=!1;function i(s){var a,o=0;s.eachAfter(function(h){var f=h.children;f?(h.x=sb(f),h.y=ob(f)):(h.x=a?o+=e(h,a):0,h.y=0,a=h)});var l=cb(s),c=ub(s),u=l.x-e(l,c)/2,d=c.x+e(c,l)/2;return s.eachAfter(r?function(h){h.x=(h.x-s.x)*t,h.y=(s.y-h.y)*n}:function(h){h.x=(h.x-u)/(d-u)*t,h.y=(1-(s.y?h.y/s.y:1))*n})}return i.separation=function(s){return arguments.length?(e=s,i):e},i.size=function(s){return arguments.length?(r=!1,t=+s[0],n=+s[1],i):r?null:[t,n]},i.nodeSize=function(s){return arguments.length?(r=!0,t=+s[0],n=+s[1],i):r?[t,n]:null},i}function db(e){var t=0,n=e.children,r=n&&n.length;if(!r)t=1;else for(;--r>=0;)t+=n[r].value;e.value=t}function fb(){return this.eachAfter(db)}function pb(e,t){let n=-1;for(const r of this)e.call(t,r,++n,this);return this}function gb(e,t){for(var n=this,r=[n],i,s,a=-1;n=r.pop();)if(e.call(t,n,++a,this),i=n.children)for(s=i.length-1;s>=0;--s)r.push(i[s]);return this}function mb(e,t){for(var n=this,r=[n],i=[],s,a,o,l=-1;n=r.pop();)if(i.push(n),s=n.children)for(a=0,o=s.length;a<o;++a)r.push(s[a]);for(;n=i.pop();)e.call(t,n,++l,this);return this}function vb(e,t){let n=-1;for(const r of this)if(e.call(t,r,++n,this))return r}function yb(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n})}function xb(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function bb(e){for(var t=this,n=Eb(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r}function Eb(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}function Sb(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function _b(){return Array.from(this)}function wb(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function Ob(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function*Tb(){var e=this,t,n=[e],r,i,s;do for(t=n.reverse(),n=[];e=t.pop();)if(yield e,r=e.children)for(i=0,s=r.length;i<s;++i)n.push(r[i]);while(n.length)}function ni(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=Ab)):t===void 0&&(t=Cb);for(var n=new ri(e),r,i=[n],s,a,o,l;r=i.pop();)if((a=t(r.data))&&(l=(a=Array.from(a)).length))for(r.children=a,o=l-1;o>=0;--o)i.push(s=a[o]=new ri(a[o])),s.parent=r,s.depth=r.depth+1;return n.eachBefore(Lb)}function Mb(){return ni(this).eachBefore(Db)}function Cb(e){return e.children}function Ab(e){return Array.isArray(e)?e[1]:null}function Db(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function Lb(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function ri(e){this.data=e,this.depth=this.height=0,this.parent=null}ri.prototype=ni.prototype={constructor:ri,count:fb,each:pb,eachAfter:mb,eachBefore:gb,find:vb,sum:yb,sort:xb,path:bb,ancestors:Sb,descendants:_b,leaves:wb,links:Ob,copy:Mb,[Symbol.iterator]:Tb};function Rb(e){return e==null?null:ed(e)}function ed(e){if(typeof e!="function")throw new Error;return e}function An(){return 0}function ir(e){return function(){return e}}const Ib=1664525,kb=1013904223,nd=4294967296;function $b(){let e=1;return()=>(e=(Ib*e+kb)%nd)/nd}function Pb(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Nb(e,t){let n=e.length,r,i;for(;n;)i=t()*n--|0,r=e[n],e[n]=e[i],e[i]=r;return e}function Ub(e,t){for(var n=0,r=(e=Nb(Array.from(e),t)).length,i=[],s,a;n<r;)s=e[n],a&&rd(a,s)?++n:(a=Vb(i=Bb(i,s)),n=0);return a}function Bb(e,t){var n,r;if(qo(t,e))return[t];for(n=0;n<e.length;++n)if(Ls(t,e[n])&&qo(ii(e[n],t),e))return[e[n],t];for(n=0;n<e.length-1;++n)for(r=n+1;r<e.length;++r)if(Ls(ii(e[n],e[r]),t)&&Ls(ii(e[n],t),e[r])&&Ls(ii(e[r],t),e[n])&&qo(id(e[n],e[r],t),e))return[e[n],e[r],t];throw new Error}function Ls(e,t){var n=e.r-t.r,r=t.x-e.x,i=t.y-e.y;return n<0||n*n<r*r+i*i}function rd(e,t){var n=e.r-t.r+Math.max(e.r,t.r,1)*1e-9,r=t.x-e.x,i=t.y-e.y;return n>0&&n*n>r*r+i*i}function qo(e,t){for(var n=0;n<t.length;++n)if(!rd(e,t[n]))return!1;return!0}function Vb(e){switch(e.length){case 1:return Gb(e[0]);case 2:return ii(e[0],e[1]);case 3:return id(e[0],e[1],e[2])}}function Gb(e){return{x:e.x,y:e.y,r:e.r}}function ii(e,t){var n=e.x,r=e.y,i=e.r,s=t.x,a=t.y,o=t.r,l=s-n,c=a-r,u=o-i,d=Math.sqrt(l*l+c*c);return{x:(n+s+l/d*u)/2,y:(r+a+c/d*u)/2,r:(d+i+o)/2}}function id(e,t,n){var r=e.x,i=e.y,s=e.r,a=t.x,o=t.y,l=t.r,c=n.x,u=n.y,d=n.r,h=r-a,f=r-c,p=i-o,g=i-u,v=l-s,m=d-s,y=r*r+i*i-s*s,b=y-a*a-o*o+l*l,S=y-c*c-u*u+d*d,_=f*p-h*g,E=(p*S-g*b)/(_*2)-r,M=(g*v-p*m)/_,C=(f*b-h*S)/(_*2)-i,G=(h*m-f*v)/_,I=M*M+G*G-1,T=2*(s+E*M+C*G),L=E*E+C*C-s*s,R=-(Math.abs(I)>1e-6?(T+Math.sqrt(T*T-4*I*L))/(2*I):L/T);return{x:r+E+M*R,y:i+C+G*R,r:R}}function sd(e,t,n){var r=e.x-t.x,i,s,a=e.y-t.y,o,l,c=r*r+a*a;c?(s=t.r+n.r,s*=s,l=e.r+n.r,l*=l,s>l?(i=(c+l-s)/(2*c),o=Math.sqrt(Math.max(0,l/c-i*i)),n.x=e.x-i*r-o*a,n.y=e.y-i*a+o*r):(i=(c+s-l)/(2*c),o=Math.sqrt(Math.max(0,s/c-i*i)),n.x=t.x+i*r-o*a,n.y=t.y+i*a+o*r)):(n.x=t.x+n.r,n.y=t.y)}function ad(e,t){var n=e.r+t.r-1e-6,r=t.x-e.x,i=t.y-e.y;return n>0&&n*n>r*r+i*i}function od(e){var t=e._,n=e.next._,r=t.r+n.r,i=(t.x*n.r+n.x*t.r)/r,s=(t.y*n.r+n.y*t.r)/r;return i*i+s*s}function Rs(e){this._=e,this.next=null,this.previous=null}function Hb(e,t){if(!(s=(e=Pb(e)).length))return 0;var n,r,i,s,a,o,l,c,u,d,h;if(n=e[0],n.x=0,n.y=0,!(s>1))return n.r;if(r=e[1],n.x=-r.r,r.x=n.r,r.y=0,!(s>2))return n.r+r.r;sd(r,n,i=e[2]),n=new Rs(n),r=new Rs(r),i=new Rs(i),n.next=i.previous=r,r.next=n.previous=i,i.next=r.previous=n;t:for(l=3;l<s;++l){sd(n._,r._,i=e[l]),i=new Rs(i),c=r.next,u=n.previous,d=r._.r,h=n._.r;do if(d<=h){if(ad(c._,i._)){r=c,n.next=r,r.previous=n,--l;continue t}d+=c._.r,c=c.next}else{if(ad(u._,i._)){n=u,n.next=r,r.previous=n,--l;continue t}h+=u._.r,u=u.previous}while(c!==u.next);for(i.previous=n,i.next=r,n.next=r.previous=r=i,a=od(n);(i=i.next)!==r;)(o=od(i))<a&&(n=i,a=o);r=n.next}for(n=[r._],i=r;(i=i.next)!==r;)n.push(i._);for(i=Ub(n,t),l=0;l<s;++l)n=e[l],n.x-=i.x,n.y-=i.y;return i.r}function Fb(e){return Math.sqrt(e.value)}function zb(){var e=null,t=1,n=1,r=An;function i(s){const a=$b();return s.x=t/2,s.y=n/2,e?s.eachBefore(ld(e)).eachAfter(Xo(r,.5,a)).eachBefore(cd(1)):s.eachBefore(ld(Fb)).eachAfter(Xo(An,1,a)).eachAfter(Xo(r,s.r/Math.min(t,n),a)).eachBefore(cd(Math.min(t,n)/(2*s.r))),s}return i.radius=function(s){return arguments.length?(e=Rb(s),i):e},i.size=function(s){return arguments.length?(t=+s[0],n=+s[1],i):[t,n]},i.padding=function(s){return arguments.length?(r=typeof s=="function"?s:ir(+s),i):r},i}function ld(e){return function(t){t.children||(t.r=Math.max(0,+e(t)||0))}}function Xo(e,t,n){return function(r){if(i=r.children){var i,s,a=i.length,o=e(r)*t||0,l;if(o)for(s=0;s<a;++s)i[s].r+=o;if(l=Hb(i,n),o)for(s=0;s<a;++s)i[s].r-=o;r.r=l+o}}}function cd(e){return function(t){var n=t.parent;t.r*=e,n&&(t.x=n.x+e*t.x,t.y=n.y+e*t.y)}}function Wb(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function Yb(e,t,n,r,i){for(var s=e.children,a,o=-1,l=s.length,c=e.value&&(r-t)/e.value;++o<l;)a=s[o],a.y0=n,a.y1=i,a.x0=t,a.x1=t+=a.value*c}function qb(e,t){return e.parent===t.parent?1:2}function jo(e){var t=e.children;return t?t[0]:e.t}function Zo(e){var t=e.children;return t?t[t.length-1]:e.t}function Xb(e,t,n){var r=n/(t.i-e.i);t.c-=r,t.s+=n,e.c+=r,t.z+=n,t.m+=n}function jb(e){for(var t=0,n=0,r=e.children,i=r.length,s;--i>=0;)s=r[i],s.z+=t,s.m+=t,t+=s.s+(n+=s.c)}function Zb(e,t,n){return e.a.parent===t.parent?e.a:n}function Is(e,t){this._=e,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=t}Is.prototype=Object.create(ri.prototype);function Kb(e){for(var t=new Is(e,0),n,r=[t],i,s,a,o;n=r.pop();)if(s=n._.children)for(n.children=new Array(o=s.length),a=o-1;a>=0;--a)r.push(i=n.children[a]=new Is(s[a],a)),i.parent=n;return(t.parent=new Is(null,0)).children=[t],t}function Qb(){var e=qb,t=1,n=1,r=null;function i(c){var u=Kb(c);if(u.eachAfter(s),u.parent.m=-u.z,u.eachBefore(a),r)c.eachBefore(l);else{var d=c,h=c,f=c;c.eachBefore(function(y){y.x<d.x&&(d=y),y.x>h.x&&(h=y),y.depth>f.depth&&(f=y)});var p=d===h?1:e(d,h)/2,g=p-d.x,v=t/(h.x+p+g),m=n/(f.depth||1);c.eachBefore(function(y){y.x=(y.x+g)*v,y.y=y.depth*m})}return c}function s(c){var u=c.children,d=c.parent.children,h=c.i?d[c.i-1]:null;if(u){jb(c);var f=(u[0].z+u[u.length-1].z)/2;h?(c.z=h.z+e(c._,h._),c.m=c.z-f):c.z=f}else h&&(c.z=h.z+e(c._,h._));c.parent.A=o(c,h,c.parent.A||d[0])}function a(c){c._.x=c.z+c.parent.m,c.m+=c.parent.m}function o(c,u,d){if(u){for(var h=c,f=c,p=u,g=h.parent.children[0],v=h.m,m=f.m,y=p.m,b=g.m,S;p=Zo(p),h=jo(h),p&&h;)g=jo(g),f=Zo(f),f.a=c,S=p.z+y-h.z-v+e(p._,h._),S>0&&(Xb(Zb(p,c,d),c,S),v+=S,m+=S),y+=p.m,v+=h.m,b+=g.m,m+=f.m;p&&!Zo(f)&&(f.t=p,f.m+=y-m),h&&!jo(g)&&(g.t=h,g.m+=v-b,d=c)}return d}function l(c){c.x*=t,c.y=c.depth*n}return i.separation=function(c){return arguments.length?(e=c,i):e},i.size=function(c){return arguments.length?(r=!1,t=+c[0],n=+c[1],i):r?null:[t,n]},i.nodeSize=function(c){return arguments.length?(r=!0,t=+c[0],n=+c[1],i):r?[t,n]:null},i}function Jb(e,t,n,r,i){for(var s=e.children,a,o=-1,l=s.length,c=e.value&&(i-n)/e.value;++o<l;)a=s[o],a.x0=t,a.x1=r,a.y0=n,a.y1=n+=a.value*c}var tE=(1+Math.sqrt(5))/2;function eE(e,t,n,r,i,s){for(var a=[],o=t.children,l,c,u=0,d=0,h=o.length,f,p,g=t.value,v,m,y,b,S,_,E;u<h;){f=i-n,p=s-r;do v=o[d++].value;while(!v&&d<h);for(m=y=v,_=Math.max(p/f,f/p)/(g*e),E=v*v*_,S=Math.max(y/E,E/m);d<h;++d){if(v+=c=o[d].value,c<m&&(m=c),c>y&&(y=c),E=v*v*_,b=Math.max(y/E,E/m),b>S){v-=c;break}S=b}a.push(l={value:v,dice:f<p,children:o.slice(u,d)}),l.dice?Yb(l,n,r,i,g?r+=p*v/g:s):Jb(l,n,r,g?n+=f*v/g:i,s),g-=v,u=d}return a}const nE=function e(t){function n(r,i,s,a,o){eE(t,r,i,s,a,o)}return n.ratio=function(r){return e((r=+r)>1?r:1)},n}(tE);function rE(){var e=nE,t=!1,n=1,r=1,i=[0],s=An,a=An,o=An,l=An,c=An;function u(h){return h.x0=h.y0=0,h.x1=n,h.y1=r,h.eachBefore(d),i=[0],t&&h.eachBefore(Wb),h}function d(h){var f=i[h.depth],p=h.x0+f,g=h.y0+f,v=h.x1-f,m=h.y1-f;v<p&&(p=v=(p+v)/2),m<g&&(g=m=(g+m)/2),h.x0=p,h.y0=g,h.x1=v,h.y1=m,h.children&&(f=i[h.depth+1]=s(h)/2,p+=c(h)-f,g+=a(h)-f,v-=o(h)-f,m-=l(h)-f,v<p&&(p=v=(p+v)/2),m<g&&(g=m=(g+m)/2),e(h,p,g,v,m))}return u.round=function(h){return arguments.length?(t=!!h,u):t},u.size=function(h){return arguments.length?(n=+h[0],r=+h[1],u):[n,r]},u.tile=function(h){return arguments.length?(e=ed(h),u):e},u.padding=function(h){return arguments.length?u.paddingInner(h).paddingOuter(h):u.paddingInner()},u.paddingInner=function(h){return arguments.length?(s=typeof h=="function"?h:ir(+h),u):s},u.paddingOuter=function(h){return arguments.length?u.paddingTop(h).paddingRight(h).paddingBottom(h).paddingLeft(h):u.paddingTop()},u.paddingTop=function(h){return arguments.length?(a=typeof h=="function"?h:ir(+h),u):a},u.paddingRight=function(h){return arguments.length?(o=typeof h=="function"?h:ir(+h),u):o},u.paddingBottom=function(h){return arguments.length?(l=typeof h=="function"?h:ir(+h),u):l},u.paddingLeft=function(h){return arguments.length?(c=typeof h=="function"?h:ir(+h),u):c},u}function sr(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}const ud=Symbol("implicit");function ks(){var e=new tu,t=[],n=[],r=ud;function i(s){let a=e.get(s);if(a===void 0){if(r!==ud)return r;e.set(s,a=t.push(s)-1)}return n[a%n.length]}return i.domain=function(s){if(!arguments.length)return t.slice();t=[],e=new tu;for(const a of s)e.has(a)||e.set(a,t.push(a)-1);return i},i.range=function(s){return arguments.length?(n=Array.from(s),i):n.slice()},i.unknown=function(s){return arguments.length?(r=s,i):r},i.copy=function(){return ks(t,n).unknown(r)},sr.apply(i,arguments),i}function si(){var e=ks().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,s,a,o=!1,l=0,c=0,u=.5;delete e.unknown;function d(){var h=t().length,f=i<r,p=f?i:r,g=f?r:i;s=(g-p)/Math.max(1,h-l+c*2),o&&(s=Math.floor(s)),p+=(g-p-s*(h-l))*u,a=s*(1-l),o&&(p=Math.round(p),a=Math.round(a));var v=hv(h).map(function(m){return p+s*m});return n(f?v.reverse():v)}return e.domain=function(h){return arguments.length?(t(h),d()):t()},e.range=function(h){return arguments.length?([r,i]=h,r=+r,i=+i,d()):[r,i]},e.rangeRound=function(h){return[r,i]=h,r=+r,i=+i,o=!0,d()},e.bandwidth=function(){return a},e.step=function(){return s},e.round=function(h){return arguments.length?(o=!!h,d()):o},e.padding=function(h){return arguments.length?(l=Math.min(1,c=+h),d()):l},e.paddingInner=function(h){return arguments.length?(l=Math.min(1,h),d()):l},e.paddingOuter=function(h){return arguments.length?(c=+h,d()):c},e.align=function(h){return arguments.length?(u=Math.max(0,Math.min(1,h)),d()):u},e.copy=function(){return si(t(),[r,i]).round(o).paddingInner(l).paddingOuter(c).align(u)},sr.apply(d(),arguments)}function iE(e){return function(){return e}}function sE(e){return+e}var hd=[0,1];function ar(e){return e}function Ko(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:iE(isNaN(t)?NaN:.5)}function aE(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function oE(e,t,n){var r=e[0],i=e[1],s=t[0],a=t[1];return i<r?(r=Ko(i,r),s=n(a,s)):(r=Ko(r,i),s=n(s,a)),function(o){return s(r(o))}}function lE(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),s=new Array(r),a=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<r;)i[a]=Ko(e[a],e[a+1]),s[a]=n(t[a],t[a+1]);return function(o){var l=Ha(e,o,1,r)-1;return s[l](i[l](o))}}function Qo(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function dd(){var e=hd,t=hd,n=Vr,r,i,s,a=ar,o,l,c;function u(){var h=Math.min(e.length,t.length);return a!==ar&&(a=aE(e[0],e[h-1])),o=h>2?lE:oE,l=c=null,d}function d(h){return h==null||isNaN(h=+h)?s:(l||(l=o(e.map(r),t,n)))(r(a(h)))}return d.invert=function(h){return a(i((c||(c=o(t,e.map(r),ae)))(h)))},d.domain=function(h){return arguments.length?(e=Array.from(h,sE),u()):e.slice()},d.range=function(h){return arguments.length?(t=Array.from(h),u()):t.slice()},d.rangeRound=function(h){return t=Array.from(h),n=Iu,u()},d.clamp=function(h){return arguments.length?(a=h?!0:ar,u()):a!==ar},d.interpolate=function(h){return arguments.length?(n=h,u()):n},d.unknown=function(h){return arguments.length?(s=h,d):s},function(h,f){return r=h,i=f,u()}}function fd(){return dd()(ar,ar)}function cE(e,t,n,r){var i=za(e,t,n),s;switch(r=Wr(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(s=lx(i,a))&&(r.precision=s),ch(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(s=cx(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=s-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(s=ox(i))&&(r.precision=s-(r.type==="%")*2);break}}return wo(r)}function pd(e){var t=e.domain;return e.ticks=function(n){var r=t();return zi(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return cE(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,s=r.length-1,a=r[i],o=r[s],l,c,u=10;for(o<a&&(c=a,a=o,o=c,c=i,i=s,s=c);u-- >0;){if(c=qn(a,o,n),c===l)return r[i]=a,r[s]=o,t(r);if(c>0)a=Math.floor(a/c)*c,o=Math.ceil(o/c)*c;else if(c<0)a=Math.ceil(a*c)/c,o=Math.floor(o*c)/c;else break;l=c}return e},e}function Oe(){var e=fd();return e.copy=function(){return Qo(e,Oe())},sr.apply(e,arguments),pd(e)}function gd(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],s=e[r],a;return s<i&&(a=n,n=r,r=a,a=i,i=s,s=a),e[n]=t.floor(i),e[r]=t.ceil(s),e}function md(e){return Math.log(e)}function vd(e){return Math.exp(e)}function uE(e){return-Math.log(-e)}function hE(e){return-Math.exp(-e)}function dE(e){return isFinite(e)?+("1e"+e):e<0?0:e}function fE(e){return e===10?dE:e===Math.E?Math.exp:t=>Math.pow(e,t)}function pE(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function yd(e){return(t,n)=>-e(-t,n)}function gE(e){const t=e(md,vd),n=t.domain;let r=10,i,s;function a(){return i=pE(r),s=fE(r),n()[0]<0?(i=yd(i),s=yd(s),e(uE,hE)):e(md,vd),t}return t.base=function(o){return arguments.length?(r=+o,a()):r},t.domain=function(o){return arguments.length?(n(o),a()):n()},t.ticks=o=>{const l=n();let c=l[0],u=l[l.length-1];const d=u<c;d&&([c,u]=[u,c]);let h=i(c),f=i(u),p,g;const v=o==null?10:+o;let m=[];if(!(r%1)&&f-h<v){if(h=Math.floor(h),f=Math.ceil(f),c>0){for(;h<=f;++h)for(p=1;p<r;++p)if(g=h<0?p/s(-h):p*s(h),!(g<c)){if(g>u)break;m.push(g)}}else for(;h<=f;++h)for(p=r-1;p>=1;--p)if(g=h>0?p/s(-h):p*s(h),!(g<c)){if(g>u)break;m.push(g)}m.length*2<v&&(m=zi(c,u,v))}else m=zi(h,f,Math.min(f-h,v)).map(s);return d?m.reverse():m},t.tickFormat=(o,l)=>{if(o==null&&(o=10),l==null&&(l=r===10?"s":","),typeof l!="function"&&(!(r%1)&&(l=Wr(l)).precision==null&&(l.trim=!0),l=wo(l)),o===1/0)return l;const c=Math.max(1,r*o/t.ticks().length);return u=>{let d=u/s(Math.round(i(u)));return d*r<r-.5&&(d*=r),d<=c?l(u):""}},t.nice=()=>n(gd(n(),{floor:o=>s(Math.floor(i(o))),ceil:o=>s(Math.ceil(i(o)))})),t}function xd(){const e=gE(dd()).domain([1,10]);return e.copy=()=>Qo(e,xd()).base(e.base()),sr.apply(e,arguments),e}function Jo(){var e=0,t=1,n=1,r=[.5],i=[0,1],s;function a(l){return l!=null&&l<=l?i[Ha(r,l,0,n)]:s}function o(){var l=-1;for(r=new Array(n);++l<n;)r[l]=((l+1)*t-(l-n)*e)/(n+1);return a}return a.domain=function(l){return arguments.length?([e,t]=l,e=+e,t=+t,o()):[e,t]},a.range=function(l){return arguments.length?(n=(i=Array.from(l)).length-1,o()):i.slice()},a.invertExtent=function(l){var c=i.indexOf(l);return c<0?[NaN,NaN]:c<1?[e,r[0]]:c>=n?[r[n-1],t]:[r[c-1],r[c]]},a.unknown=function(l){return arguments.length&&(s=l),a},a.thresholds=function(){return r.slice()},a.copy=function(){return Jo().domain([e,t]).range(i).unknown(s)},sr.apply(pd(a),arguments)}const tl=new Date,el=new Date;function Pt(e,t,n,r){function i(s){return e(s=arguments.length===0?new Date:new Date(+s)),s}return i.floor=s=>(e(s=new Date(+s)),s),i.ceil=s=>(e(s=new Date(s-1)),t(s,1),e(s),s),i.round=s=>{const a=i(s),o=i.ceil(s);return s-a<o-s?a:o},i.offset=(s,a)=>(t(s=new Date(+s),a==null?1:Math.floor(a)),s),i.range=(s,a,o)=>{const l=[];if(s=i.ceil(s),o=o==null?1:Math.floor(o),!(s<a)||!(o>0))return l;let c;do l.push(c=new Date(+s)),t(s,o),e(s);while(c<s&&s<a);return l},i.filter=s=>Pt(a=>{if(a>=a)for(;e(a),!s(a);)a.setTime(a-1)},(a,o)=>{if(a>=a)if(o<0)for(;++o<=0;)for(;t(a,-1),!s(a););else for(;--o>=0;)for(;t(a,1),!s(a););}),n&&(i.count=(s,a)=>(tl.setTime(+s),el.setTime(+a),e(tl),e(el),Math.floor(n(tl,el))),i.every=s=>(s=Math.floor(s),!isFinite(s)||!(s>0)?null:s>1?i.filter(r?a=>r(a)%s===0:a=>i.count(0,a)%s===0):i)),i}const $s=Pt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);$s.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Pt(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):$s),$s.range;const Xe=1e3,pe=Xe*60,je=pe*60,Ze=je*24,nl=Ze*7,bd=Ze*30,rl=Ze*365,or=Pt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Xe)},(e,t)=>(t-e)/Xe,e=>e.getUTCSeconds());or.range;const il=Pt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Xe)},(e,t)=>{e.setTime(+e+t*pe)},(e,t)=>(t-e)/pe,e=>e.getMinutes());il.range,Pt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*pe)},(e,t)=>(t-e)/pe,e=>e.getUTCMinutes()).range;const sl=Pt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Xe-e.getMinutes()*pe)},(e,t)=>{e.setTime(+e+t*je)},(e,t)=>(t-e)/je,e=>e.getHours());sl.range,Pt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*je)},(e,t)=>(t-e)/je,e=>e.getUTCHours()).range;const ai=Pt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*pe)/Ze,e=>e.getDate()-1);ai.range;const al=Pt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Ze,e=>e.getUTCDate()-1);al.range,Pt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Ze,e=>Math.floor(e/Ze)).range;function Dn(e){return Pt(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*pe)/nl)}const Ps=Dn(0),Ns=Dn(1),mE=Dn(2),vE=Dn(3),lr=Dn(4),yE=Dn(5),xE=Dn(6);Ps.range,Ns.range,mE.range,vE.range,lr.range,yE.range,xE.range;function Ln(e){return Pt(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/nl)}const Ed=Ln(0),Us=Ln(1),bE=Ln(2),EE=Ln(3),cr=Ln(4),SE=Ln(5),_E=Ln(6);Ed.range,Us.range,bE.range,EE.range,cr.range,SE.range,_E.range;const ol=Pt(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());ol.range,Pt(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth()).range;const Ke=Pt(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());Ke.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Pt(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)}),Ke.range;const Rn=Pt(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());Rn.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Pt(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)}),Rn.range;function wE(e,t,n,r,i,s){const a=[[or,1,Xe],[or,5,5*Xe],[or,15,15*Xe],[or,30,30*Xe],[s,1,pe],[s,5,5*pe],[s,15,15*pe],[s,30,30*pe],[i,1,je],[i,3,3*je],[i,6,6*je],[i,12,12*je],[r,1,Ze],[r,2,2*Ze],[n,1,nl],[t,1,bd],[t,3,3*bd],[e,1,rl]];function o(c,u,d){const h=u<c;h&&([c,u]=[u,c]);const f=d&&typeof d.range=="function"?d:l(c,u,d),p=f?f.range(c,+u+1):[];return h?p.reverse():p}function l(c,u,d){const h=Math.abs(u-c)/d,f=Ga(([,,v])=>v).right(a,h);if(f===a.length)return e.every(za(c/rl,u/rl,d));if(f===0)return $s.every(Math.max(za(c,u,d),1));const[p,g]=a[h/a[f-1][2]<a[f][2]/h?f-1:f];return p.every(g)}return[o,l]}const[OE,TE]=wE(Ke,ol,Ps,ai,sl,il);function ll(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function cl(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function oi(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function ME(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,s=e.days,a=e.shortDays,o=e.months,l=e.shortMonths,c=li(i),u=ci(i),d=li(s),h=ci(s),f=li(a),p=ci(a),g=li(o),v=ci(o),m=li(l),y=ci(l),b={a:P,A:N,b:B,B:Y,c:null,d:Md,e:Md,f:ZE,g:aS,G:lS,H:qE,I:XE,j:jE,L:Cd,m:KE,M:QE,p:X,q:J,Q:kd,s:$d,S:JE,u:tS,U:eS,V:nS,w:rS,W:iS,x:null,X:null,y:sS,Y:oS,Z:cS,"%":Id},S={a:ct,A:W,b:K,B:ut,c:null,d:Dd,e:Dd,f:fS,g:_S,G:OS,H:uS,I:hS,j:dS,L:Ld,m:pS,M:gS,p:rt,q:Tt,Q:kd,s:$d,S:mS,u:vS,U:yS,V:xS,w:bS,W:ES,x:null,X:null,y:SS,Y:wS,Z:TS,"%":Id},_={a:I,A:T,b:L,B:R,c:k,d:Od,e:Od,f:FE,g:wd,G:_d,H:Td,I:Td,j:BE,L:HE,m:UE,M:VE,p:G,q:NE,Q:WE,s:YE,S:GE,u:RE,U:IE,V:kE,w:LE,W:$E,x:O,X:U,y:wd,Y:_d,Z:PE,"%":zE};b.x=E(n,b),b.X=E(r,b),b.c=E(t,b),S.x=E(n,S),S.X=E(r,S),S.c=E(t,S);function E(q,V){return function(H){var $=[],pt=-1,yt=0,Kt=q.length,Qt,et,Rt;for(H instanceof Date||(H=new Date(+H));++pt<Kt;)q.charCodeAt(pt)===37&&($.push(q.slice(yt,pt)),(et=Sd[Qt=q.charAt(++pt)])!=null?Qt=q.charAt(++pt):et=Qt==="e"?" ":"0",(Rt=V[Qt])&&(Qt=Rt(H,et)),$.push(Qt),yt=pt+1);return $.push(q.slice(yt,pt)),$.join("")}}function M(q,V){return function(H){var $=oi(1900,void 0,1),pt=C($,q,H+="",0),yt,Kt;if(pt!=H.length)return null;if("Q"in $)return new Date($.Q);if("s"in $)return new Date($.s*1e3+("L"in $?$.L:0));if(V&&!("Z"in $)&&($.Z=0),"p"in $&&($.H=$.H%12+$.p*12),$.m===void 0&&($.m="q"in $?$.q:0),"V"in $){if($.V<1||$.V>53)return null;"w"in $||($.w=1),"Z"in $?(yt=cl(oi($.y,0,1)),Kt=yt.getUTCDay(),yt=Kt>4||Kt===0?Us.ceil(yt):Us(yt),yt=al.offset(yt,($.V-1)*7),$.y=yt.getUTCFullYear(),$.m=yt.getUTCMonth(),$.d=yt.getUTCDate()+($.w+6)%7):(yt=ll(oi($.y,0,1)),Kt=yt.getDay(),yt=Kt>4||Kt===0?Ns.ceil(yt):Ns(yt),yt=ai.offset(yt,($.V-1)*7),$.y=yt.getFullYear(),$.m=yt.getMonth(),$.d=yt.getDate()+($.w+6)%7)}else("W"in $||"U"in $)&&("w"in $||($.w="u"in $?$.u%7:"W"in $?1:0),Kt="Z"in $?cl(oi($.y,0,1)).getUTCDay():ll(oi($.y,0,1)).getDay(),$.m=0,$.d="W"in $?($.w+6)%7+$.W*7-(Kt+5)%7:$.w+$.U*7-(Kt+6)%7);return"Z"in $?($.H+=$.Z/100|0,$.M+=$.Z%100,cl($)):ll($)}}function C(q,V,H,$){for(var pt=0,yt=V.length,Kt=H.length,Qt,et;pt<yt;){if($>=Kt)return-1;if(Qt=V.charCodeAt(pt++),Qt===37){if(Qt=V.charAt(pt++),et=_[Qt in Sd?V.charAt(pt++):Qt],!et||($=et(q,H,$))<0)return-1}else if(Qt!=H.charCodeAt($++))return-1}return $}function G(q,V,H){var $=c.exec(V.slice(H));return $?(q.p=u.get($[0].toLowerCase()),H+$[0].length):-1}function I(q,V,H){var $=f.exec(V.slice(H));return $?(q.w=p.get($[0].toLowerCase()),H+$[0].length):-1}function T(q,V,H){var $=d.exec(V.slice(H));return $?(q.w=h.get($[0].toLowerCase()),H+$[0].length):-1}function L(q,V,H){var $=m.exec(V.slice(H));return $?(q.m=y.get($[0].toLowerCase()),H+$[0].length):-1}function R(q,V,H){var $=g.exec(V.slice(H));return $?(q.m=v.get($[0].toLowerCase()),H+$[0].length):-1}function k(q,V,H){return C(q,t,V,H)}function O(q,V,H){return C(q,n,V,H)}function U(q,V,H){return C(q,r,V,H)}function P(q){return a[q.getDay()]}function N(q){return s[q.getDay()]}function B(q){return l[q.getMonth()]}function Y(q){return o[q.getMonth()]}function X(q){return i[+(q.getHours()>=12)]}function J(q){return 1+~~(q.getMonth()/3)}function ct(q){return a[q.getUTCDay()]}function W(q){return s[q.getUTCDay()]}function K(q){return l[q.getUTCMonth()]}function ut(q){return o[q.getUTCMonth()]}function rt(q){return i[+(q.getUTCHours()>=12)]}function Tt(q){return 1+~~(q.getUTCMonth()/3)}return{format:function(q){var V=E(q+="",b);return V.toString=function(){return q},V},parse:function(q){var V=M(q+="",!1);return V.toString=function(){return q},V},utcFormat:function(q){var V=E(q+="",S);return V.toString=function(){return q},V},utcParse:function(q){var V=M(q+="",!0);return V.toString=function(){return q},V}}}var Sd={"-":"",_:" ",0:"0"},Bt=/^\s*\d+/,CE=/^%/,AE=/[\\^$*+?|[\]().{}]/g;function ht(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",s=i.length;return r+(s<n?new Array(n-s+1).join(t)+i:i)}function DE(e){return e.replace(AE,"\\$&")}function li(e){return new RegExp("^(?:"+e.map(DE).join("|")+")","i")}function ci(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function LE(e,t,n){var r=Bt.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function RE(e,t,n){var r=Bt.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function IE(e,t,n){var r=Bt.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function kE(e,t,n){var r=Bt.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function $E(e,t,n){var r=Bt.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function _d(e,t,n){var r=Bt.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function wd(e,t,n){var r=Bt.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function PE(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function NE(e,t,n){var r=Bt.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function UE(e,t,n){var r=Bt.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function Od(e,t,n){var r=Bt.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function BE(e,t,n){var r=Bt.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function Td(e,t,n){var r=Bt.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function VE(e,t,n){var r=Bt.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function GE(e,t,n){var r=Bt.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function HE(e,t,n){var r=Bt.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function FE(e,t,n){var r=Bt.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function zE(e,t,n){var r=CE.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function WE(e,t,n){var r=Bt.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function YE(e,t,n){var r=Bt.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function Md(e,t){return ht(e.getDate(),t,2)}function qE(e,t){return ht(e.getHours(),t,2)}function XE(e,t){return ht(e.getHours()%12||12,t,2)}function jE(e,t){return ht(1+ai.count(Ke(e),e),t,3)}function Cd(e,t){return ht(e.getMilliseconds(),t,3)}function ZE(e,t){return Cd(e,t)+"000"}function KE(e,t){return ht(e.getMonth()+1,t,2)}function QE(e,t){return ht(e.getMinutes(),t,2)}function JE(e,t){return ht(e.getSeconds(),t,2)}function tS(e){var t=e.getDay();return t===0?7:t}function eS(e,t){return ht(Ps.count(Ke(e)-1,e),t,2)}function Ad(e){var t=e.getDay();return t>=4||t===0?lr(e):lr.ceil(e)}function nS(e,t){return e=Ad(e),ht(lr.count(Ke(e),e)+(Ke(e).getDay()===4),t,2)}function rS(e){return e.getDay()}function iS(e,t){return ht(Ns.count(Ke(e)-1,e),t,2)}function sS(e,t){return ht(e.getFullYear()%100,t,2)}function aS(e,t){return e=Ad(e),ht(e.getFullYear()%100,t,2)}function oS(e,t){return ht(e.getFullYear()%1e4,t,4)}function lS(e,t){var n=e.getDay();return e=n>=4||n===0?lr(e):lr.ceil(e),ht(e.getFullYear()%1e4,t,4)}function cS(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+ht(t/60|0,"0",2)+ht(t%60,"0",2)}function Dd(e,t){return ht(e.getUTCDate(),t,2)}function uS(e,t){return ht(e.getUTCHours(),t,2)}function hS(e,t){return ht(e.getUTCHours()%12||12,t,2)}function dS(e,t){return ht(1+al.count(Rn(e),e),t,3)}function Ld(e,t){return ht(e.getUTCMilliseconds(),t,3)}function fS(e,t){return Ld(e,t)+"000"}function pS(e,t){return ht(e.getUTCMonth()+1,t,2)}function gS(e,t){return ht(e.getUTCMinutes(),t,2)}function mS(e,t){return ht(e.getUTCSeconds(),t,2)}function vS(e){var t=e.getUTCDay();return t===0?7:t}function yS(e,t){return ht(Ed.count(Rn(e)-1,e),t,2)}function Rd(e){var t=e.getUTCDay();return t>=4||t===0?cr(e):cr.ceil(e)}function xS(e,t){return e=Rd(e),ht(cr.count(Rn(e),e)+(Rn(e).getUTCDay()===4),t,2)}function bS(e){return e.getUTCDay()}function ES(e,t){return ht(Us.count(Rn(e)-1,e),t,2)}function SS(e,t){return ht(e.getUTCFullYear()%100,t,2)}function _S(e,t){return e=Rd(e),ht(e.getUTCFullYear()%100,t,2)}function wS(e,t){return ht(e.getUTCFullYear()%1e4,t,4)}function OS(e,t){var n=e.getUTCDay();return e=n>=4||n===0?cr(e):cr.ceil(e),ht(e.getUTCFullYear()%1e4,t,4)}function TS(){return"+0000"}function Id(){return"%"}function kd(e){return+e}function $d(e){return Math.floor(+e/1e3)}var ur,Pd;MS({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function MS(e){return ur=ME(e),Pd=ur.format,ur.parse,ur.utcFormat,ur.utcParse,ur}function CS(e){return new Date(e)}function AS(e){return e instanceof Date?+e:+new Date(+e)}function Nd(e,t,n,r,i,s,a,o,l,c){var u=fd(),d=u.invert,h=u.domain,f=c(".%L"),p=c(":%S"),g=c("%I:%M"),v=c("%I %p"),m=c("%a %d"),y=c("%b %d"),b=c("%B"),S=c("%Y");function _(E){return(l(E)<E?f:o(E)<E?p:a(E)<E?g:s(E)<E?v:r(E)<E?i(E)<E?m:y:n(E)<E?b:S)(E)}return u.invert=function(E){return new Date(d(E))},u.domain=function(E){return arguments.length?h(Array.from(E,AS)):h().map(CS)},u.ticks=function(E){var M=h();return e(M[0],M[M.length-1],E??10)},u.tickFormat=function(E,M){return M==null?_:c(M)},u.nice=function(E){var M=h();return(!E||typeof E.range!="function")&&(E=t(M[0],M[M.length-1],E??10)),E?h(gd(M,E)):u},u.copy=function(){return Qo(u,Nd(e,t,n,r,i,s,a,o,l,c))},u}function Ud(){return sr.apply(Nd(OE,TE,Ke,ol,Ps,ai,sl,il,or,Pd).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function at(e){return function(){return e}}const Bd=Math.abs,Wt=Math.atan2,In=Math.cos,DS=Math.max,ul=Math.min,Pe=Math.sin,hr=Math.sqrt,Yt=1e-12,ui=Math.PI,Bs=ui/2,Vs=2*ui;function LS(e){return e>1?0:e<-1?ui:Math.acos(e)}function Vd(e){return e>=1?Bs:e<=-1?-Bs:Math.asin(e)}function Gs(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new Q1(t)}function RS(e){return e.innerRadius}function IS(e){return e.outerRadius}function kS(e){return e.startAngle}function $S(e){return e.endAngle}function PS(e){return e&&e.padAngle}function NS(e,t,n,r,i,s,a,o){var l=n-e,c=r-t,u=a-i,d=o-s,h=d*l-u*c;if(!(h*h<Yt))return h=(u*(t-s)-d*(e-i))/h,[e+h*l,t+h*c]}function Hs(e,t,n,r,i,s,a){var o=e-n,l=t-r,c=(a?s:-s)/hr(o*o+l*l),u=c*l,d=-c*o,h=e+u,f=t+d,p=n+u,g=r+d,v=(h+p)/2,m=(f+g)/2,y=p-h,b=g-f,S=y*y+b*b,_=i-s,E=h*g-p*f,M=(b<0?-1:1)*hr(DS(0,_*_*S-E*E)),C=(E*b-y*M)/S,G=(-E*y-b*M)/S,I=(E*b+y*M)/S,T=(-E*y+b*M)/S,L=C-v,R=G-m,k=I-v,O=T-m;return L*L+R*R>k*k+O*O&&(C=I,G=T),{cx:C,cy:G,x01:-u,y01:-d,x11:C*(i/_-1),y11:G*(i/_-1)}}function hi(){var e=RS,t=IS,n=at(0),r=null,i=kS,s=$S,a=PS,o=null,l=Gs(c);function c(){var u,d,h=+e.apply(this,arguments),f=+t.apply(this,arguments),p=i.apply(this,arguments)-Bs,g=s.apply(this,arguments)-Bs,v=Bd(g-p),m=g>p;if(o||(o=u=l()),f<h&&(d=f,f=h,h=d),!(f>Yt))o.moveTo(0,0);else if(v>Vs-Yt)o.moveTo(f*In(p),f*Pe(p)),o.arc(0,0,f,p,g,!m),h>Yt&&(o.moveTo(h*In(g),h*Pe(g)),o.arc(0,0,h,g,p,m));else{var y=p,b=g,S=p,_=g,E=v,M=v,C=a.apply(this,arguments)/2,G=C>Yt&&(r?+r.apply(this,arguments):hr(h*h+f*f)),I=ul(Bd(f-h)/2,+n.apply(this,arguments)),T=I,L=I,R,k;if(G>Yt){var O=Vd(G/h*Pe(C)),U=Vd(G/f*Pe(C));(E-=O*2)>Yt?(O*=m?1:-1,S+=O,_-=O):(E=0,S=_=(p+g)/2),(M-=U*2)>Yt?(U*=m?1:-1,y+=U,b-=U):(M=0,y=b=(p+g)/2)}var P=f*In(y),N=f*Pe(y),B=h*In(_),Y=h*Pe(_);if(I>Yt){var X=f*In(b),J=f*Pe(b),ct=h*In(S),W=h*Pe(S),K;if(v<ui)if(K=NS(P,N,ct,W,X,J,B,Y)){var ut=P-K[0],rt=N-K[1],Tt=X-K[0],q=J-K[1],V=1/Pe(LS((ut*Tt+rt*q)/(hr(ut*ut+rt*rt)*hr(Tt*Tt+q*q)))/2),H=hr(K[0]*K[0]+K[1]*K[1]);T=ul(I,(h-H)/(V-1)),L=ul(I,(f-H)/(V+1))}else T=L=0}M>Yt?L>Yt?(R=Hs(ct,W,P,N,f,L,m),k=Hs(X,J,B,Y,f,L,m),o.moveTo(R.cx+R.x01,R.cy+R.y01),L<I?o.arc(R.cx,R.cy,L,Wt(R.y01,R.x01),Wt(k.y01,k.x01),!m):(o.arc(R.cx,R.cy,L,Wt(R.y01,R.x01),Wt(R.y11,R.x11),!m),o.arc(0,0,f,Wt(R.cy+R.y11,R.cx+R.x11),Wt(k.cy+k.y11,k.cx+k.x11),!m),o.arc(k.cx,k.cy,L,Wt(k.y11,k.x11),Wt(k.y01,k.x01),!m))):(o.moveTo(P,N),o.arc(0,0,f,y,b,!m)):o.moveTo(P,N),!(h>Yt)||!(E>Yt)?o.lineTo(B,Y):T>Yt?(R=Hs(B,Y,X,J,h,-T,m),k=Hs(P,N,ct,W,h,-T,m),o.lineTo(R.cx+R.x01,R.cy+R.y01),T<I?o.arc(R.cx,R.cy,T,Wt(R.y01,R.x01),Wt(k.y01,k.x01),!m):(o.arc(R.cx,R.cy,T,Wt(R.y01,R.x01),Wt(R.y11,R.x11),!m),o.arc(0,0,h,Wt(R.cy+R.y11,R.cx+R.x11),Wt(k.cy+k.y11,k.cx+k.x11),m),o.arc(k.cx,k.cy,T,Wt(k.y11,k.x11),Wt(k.y01,k.x01),!m))):o.arc(0,0,h,_,S,m)}if(o.closePath(),u)return o=null,u+""||null}return c.centroid=function(){var u=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,d=(+i.apply(this,arguments)+ +s.apply(this,arguments))/2-ui/2;return[In(d)*u,Pe(d)*u]},c.innerRadius=function(u){return arguments.length?(e=typeof u=="function"?u:at(+u),c):e},c.outerRadius=function(u){return arguments.length?(t=typeof u=="function"?u:at(+u),c):t},c.cornerRadius=function(u){return arguments.length?(n=typeof u=="function"?u:at(+u),c):n},c.padRadius=function(u){return arguments.length?(r=u==null?null:typeof u=="function"?u:at(+u),c):r},c.startAngle=function(u){return arguments.length?(i=typeof u=="function"?u:at(+u),c):i},c.endAngle=function(u){return arguments.length?(s=typeof u=="function"?u:at(+u),c):s},c.padAngle=function(u){return arguments.length?(a=typeof u=="function"?u:at(+u),c):a},c.context=function(u){return arguments.length?(o=u??null,c):o},c}var US=Array.prototype.slice;function Fs(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Gd(e){this._context=e}Gd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function zs(e){return new Gd(e)}function hl(e){return e[0]}function dl(e){return e[1]}function di(e,t){var n=at(!0),r=null,i=zs,s=null,a=Gs(o);e=typeof e=="function"?e:e===void 0?hl:at(e),t=typeof t=="function"?t:t===void 0?dl:at(t);function o(l){var c,u=(l=Fs(l)).length,d,h=!1,f;for(r==null&&(s=i(f=a())),c=0;c<=u;++c)!(c<u&&n(d=l[c],c,l))===h&&((h=!h)?s.lineStart():s.lineEnd()),h&&s.point(+e(d,c,l),+t(d,c,l));if(f)return s=null,f+""||null}return o.x=function(l){return arguments.length?(e=typeof l=="function"?l:at(+l),o):e},o.y=function(l){return arguments.length?(t=typeof l=="function"?l:at(+l),o):t},o.defined=function(l){return arguments.length?(n=typeof l=="function"?l:at(!!l),o):n},o.curve=function(l){return arguments.length?(i=l,r!=null&&(s=i(r)),o):i},o.context=function(l){return arguments.length?(l==null?r=s=null:s=i(r=l),o):r},o}function fl(e,t,n){var r=null,i=at(!0),s=null,a=zs,o=null,l=Gs(c);e=typeof e=="function"?e:e===void 0?hl:at(+e),t=typeof t=="function"?t:at(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?dl:at(+n);function c(d){var h,f,p,g=(d=Fs(d)).length,v,m=!1,y,b=new Array(g),S=new Array(g);for(s==null&&(o=a(y=l())),h=0;h<=g;++h){if(!(h<g&&i(v=d[h],h,d))===m)if(m=!m)f=h,o.areaStart(),o.lineStart();else{for(o.lineEnd(),o.lineStart(),p=h-1;p>=f;--p)o.point(b[p],S[p]);o.lineEnd(),o.areaEnd()}m&&(b[h]=+e(v,h,d),S[h]=+t(v,h,d),o.point(r?+r(v,h,d):b[h],n?+n(v,h,d):S[h]))}if(y)return o=null,y+""||null}function u(){return di().defined(i).curve(a).context(s)}return c.x=function(d){return arguments.length?(e=typeof d=="function"?d:at(+d),r=null,c):e},c.x0=function(d){return arguments.length?(e=typeof d=="function"?d:at(+d),c):e},c.x1=function(d){return arguments.length?(r=d==null?null:typeof d=="function"?d:at(+d),c):r},c.y=function(d){return arguments.length?(t=typeof d=="function"?d:at(+d),n=null,c):t},c.y0=function(d){return arguments.length?(t=typeof d=="function"?d:at(+d),c):t},c.y1=function(d){return arguments.length?(n=d==null?null:typeof d=="function"?d:at(+d),c):n},c.lineX0=c.lineY0=function(){return u().x(e).y(t)},c.lineY1=function(){return u().x(e).y(n)},c.lineX1=function(){return u().x(r).y(t)},c.defined=function(d){return arguments.length?(i=typeof d=="function"?d:at(!!d),c):i},c.curve=function(d){return arguments.length?(a=d,s!=null&&(o=a(s)),c):a},c.context=function(d){return arguments.length?(d==null?s=o=null:o=a(s=d),c):s},c}function BS(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function VS(e){return e}function GS(){var e=VS,t=BS,n=null,r=at(0),i=at(Vs),s=at(0);function a(o){var l,c=(o=Fs(o)).length,u,d,h=0,f=new Array(c),p=new Array(c),g=+r.apply(this,arguments),v=Math.min(Vs,Math.max(-Vs,i.apply(this,arguments)-g)),m,y=Math.min(Math.abs(v)/c,s.apply(this,arguments)),b=y*(v<0?-1:1),S;for(l=0;l<c;++l)(S=p[f[l]=l]=+e(o[l],l,o))>0&&(h+=S);for(t!=null?f.sort(function(_,E){return t(p[_],p[E])}):n!=null&&f.sort(function(_,E){return n(o[_],o[E])}),l=0,d=h?(v-c*b)/h:0;l<c;++l,g=m)u=f[l],S=p[u],m=g+(S>0?S*d:0)+b,p[u]={data:o[u],index:l,value:S,startAngle:g,endAngle:m,padAngle:y};return p}return a.value=function(o){return arguments.length?(e=typeof o=="function"?o:at(+o),a):e},a.sortValues=function(o){return arguments.length?(t=o,n=null,a):t},a.sort=function(o){return arguments.length?(n=o,t=null,a):n},a.startAngle=function(o){return arguments.length?(r=typeof o=="function"?o:at(+o),a):r},a.endAngle=function(o){return arguments.length?(i=typeof o=="function"?o:at(+o),a):i},a.padAngle=function(o){return arguments.length?(s=typeof o=="function"?o:at(+o),a):s},a}var HS=Fd(zs);function Hd(e){this._curve=e}Hd.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(e,t){this._curve.point(t*Math.sin(e),t*-Math.cos(e))}};function Fd(e){function t(n){return new Hd(e(n))}return t._curve=e,t}function FS(e){var t=e.curve;return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e.curve=function(n){return arguments.length?t(Fd(n)):t()._curve},e}function zS(){return FS(di().curve(HS))}class WS{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function YS(e){return new WS(e,!0)}function qS(e){return e.source}function XS(e){return e.target}function jS(e){let t=qS,n=XS,r=hl,i=dl,s=null,a=null,o=Gs(l);function l(){let c;const u=US.call(arguments),d=t.apply(this,u),h=n.apply(this,u);if(s==null&&(a=e(c=o())),a.lineStart(),u[0]=d,a.point(+r.apply(this,u),+i.apply(this,u)),u[0]=h,a.point(+r.apply(this,u),+i.apply(this,u)),a.lineEnd(),c)return a=null,c+""||null}return l.source=function(c){return arguments.length?(t=c,l):t},l.target=function(c){return arguments.length?(n=c,l):n},l.x=function(c){return arguments.length?(r=typeof c=="function"?c:at(+c),l):r},l.y=function(c){return arguments.length?(i=typeof c=="function"?c:at(+c),l):i},l.context=function(c){return arguments.length?(c==null?s=a=null:a=e(s=c),l):s},l}function ZS(){return jS(YS)}function dn(){}function Ws(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function Ys(e){this._context=e}Ys.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Ws(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Ws(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function KS(e){return new Ys(e)}function zd(e){this._context=e}zd.prototype={areaStart:dn,areaEnd:dn,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Ws(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function QS(e){return new zd(e)}function Wd(e){this._context=e}Wd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:Ws(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function JS(e){return new Wd(e)}function Yd(e,t){this._basis=new Ys(e),this._beta=t}Yd.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,n=e.length-1;if(n>0)for(var r=e[0],i=t[0],s=e[n]-r,a=t[n]-i,o=-1,l;++o<=n;)l=o/n,this._basis.point(this._beta*e[o]+(1-this._beta)*(r+l*s),this._beta*t[o]+(1-this._beta)*(i+l*a));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const t_=function e(t){function n(r){return t===1?new Ys(r):new Yd(r,t)}return n.beta=function(r){return e(+r)},n}(.85);function qs(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function pl(e,t){this._context=e,this._k=(1-t)/6}pl.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:qs(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:qs(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const e_=function e(t){function n(r){return new pl(r,t)}return n.tension=function(r){return e(+r)},n}(0);function gl(e,t){this._context=e,this._k=(1-t)/6}gl.prototype={areaStart:dn,areaEnd:dn,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:qs(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const n_=function e(t){function n(r){return new gl(r,t)}return n.tension=function(r){return e(+r)},n}(0);function ml(e,t){this._context=e,this._k=(1-t)/6}ml.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:qs(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const r_=function e(t){function n(r){return new ml(r,t)}return n.tension=function(r){return e(+r)},n}(0);function vl(e,t,n){var r=e._x1,i=e._y1,s=e._x2,a=e._y2;if(e._l01_a>Yt){var o=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*o-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,i=(i*o-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>Yt){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,u=3*e._l23_a*(e._l23_a+e._l12_a);s=(s*c+e._x1*e._l23_2a-t*e._l12_2a)/u,a=(a*c+e._y1*e._l23_2a-n*e._l12_2a)/u}e._context.bezierCurveTo(r,i,s,a,e._x2,e._y2)}function qd(e,t){this._context=e,this._alpha=t}qd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;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(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:vl(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const i_=function e(t){function n(r){return t?new qd(r,t):new pl(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function Xd(e,t){this._context=e,this._alpha=t}Xd.prototype={areaStart:dn,areaEnd:dn,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;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=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:vl(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const s_=function e(t){function n(r){return t?new Xd(r,t):new gl(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function jd(e,t){this._context=e,this._alpha=t}jd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:vl(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const a_=function e(t){function n(r){return t?new jd(r,t):new ml(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function Zd(e){this._context=e}Zd.prototype={areaStart:dn,areaEnd:dn,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function Kd(e){return new Zd(e)}function Qd(e){return e<0?-1:1}function Jd(e,t,n){var r=e._x1-e._x0,i=t-e._x1,s=(e._y1-e._y0)/(r||i<0&&-0),a=(n-e._y1)/(i||r<0&&-0),o=(s*i+a*r)/(r+i);return(Qd(s)+Qd(a))*Math.min(Math.abs(s),Math.abs(a),.5*Math.abs(o))||0}function tf(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function yl(e,t,n){var r=e._x0,i=e._y0,s=e._x1,a=e._y1,o=(s-r)/3;e._context.bezierCurveTo(r+o,i+o*t,s-o,a-o*n,s,a)}function Xs(e){this._context=e}Xs.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:yl(this,this._t0,tf(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,yl(this,tf(this,n=Jd(this,e,t)),n);break;default:yl(this,this._t0,n=Jd(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function ef(e){this._context=new nf(e)}(ef.prototype=Object.create(Xs.prototype)).point=function(e,t){Xs.prototype.point.call(this,t,e)};function nf(e){this._context=e}nf.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,s){this._context.bezierCurveTo(t,e,r,n,s,i)}};function o_(e){return new Xs(e)}function l_(e){return new ef(e)}function rf(e){this._context=e}rf.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=sf(e),i=sf(t),s=0,a=1;a<n;++s,++a)this._context.bezierCurveTo(r[0][s],i[0][s],r[1][s],i[1][s],e[a],t[a]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function sf(e){var t,n=e.length-1,r,i=new Array(n),s=new Array(n),a=new Array(n);for(i[0]=0,s[0]=2,a[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,s[t]=4,a[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,s[n-1]=7,a[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/s[t-1],s[t]-=r,a[t]-=r*a[t-1];for(i[n-1]=a[n-1]/s[n-1],t=n-2;t>=0;--t)i[t]=(a[t]-i[t+1])/s[t];for(s[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)s[t]=2*e[t+1]-i[t+1];return[i,s]}function c_(e){return new rf(e)}function js(e,t){this._context=e,this._t=t}js.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&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function u_(e){return new js(e,.5)}function h_(e){return new js(e,0)}function d_(e){return new js(e,1)}function af(e,t){if((a=e.length)>1)for(var n=1,r,i,s=e[t[0]],a,o=s.length;n<a;++n)for(i=s,s=e[t[n]],r=0;r<o;++r)s[r][1]+=s[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function of(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function f_(e,t){return e[t]}function p_(e){const t=[];return t.key=e,t}function xl(){var e=at([]),t=of,n=af,r=f_;function i(s){var a=Array.from(e.apply(this,arguments),p_),o,l=a.length,c=-1,u;for(const d of s)for(o=0,++c;o<l;++o)(a[o][c]=[0,+r(d,a[o].key,c,s)]).data=d;for(o=0,u=Fs(t(a));o<l;++o)a[u[o]].index=o;return n(a,u),a}return i.keys=function(s){return arguments.length?(e=typeof s=="function"?s:at(Array.from(s)),i):e},i.value=function(s){return arguments.length?(r=typeof s=="function"?s:at(+s),i):r},i.order=function(s){return arguments.length?(t=s==null?of:typeof s=="function"?s:at(Array.from(s)),i):t},i.offset=function(s){return arguments.length?(n=s??af,i):n},i}function g_(e,t){if((l=e.length)>0)for(var n,r=0,i,s,a,o,l,c=e[t[0]].length;r<c;++r)for(a=o=0,n=0;n<l;++n)(s=(i=e[t[n]][r])[1]-i[0])>0?(i[0]=a,i[1]=a+=s):s<0?(i[1]=o,i[0]=o+=s):(i[0]=0,i[1]=s)}function fi(e,t,n){this.k=e,this.x=t,this.y=n}fi.prototype={constructor:fi,scale:function(e){return e===1?this:new fi(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new fi(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}},fi.prototype;var m_=typeof global=="object"&&global&&global.Object===Object&&global;const lf=m_;var v_=typeof self=="object"&&self&&self.Object===Object&&self,y_=lf||v_||Function("return this")();const Te=y_;var x_=Te.Symbol;const ge=x_;var cf=Object.prototype,b_=cf.hasOwnProperty,E_=cf.toString,pi=ge?ge.toStringTag:void 0;function S_(e){var t=b_.call(e,pi),n=e[pi];try{e[pi]=void 0;var r=!0}catch{}var i=E_.call(e);return r&&(t?e[pi]=n:delete e[pi]),i}var __=Object.prototype,w_=__.toString;function O_(e){return w_.call(e)}var T_="[object Null]",M_="[object Undefined]",uf=ge?ge.toStringTag:void 0;function kn(e){return e==null?e===void 0?M_:T_:uf&&uf in Object(e)?S_(e):O_(e)}function Ne(e){return e!=null&&typeof e=="object"}var C_="[object Symbol]";function Zs(e){return typeof e=="symbol"||Ne(e)&&kn(e)==C_}function hf(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var A_=Array.isArray;const Vt=A_;var D_=1/0,df=ge?ge.prototype:void 0,ff=df?df.toString:void 0;function pf(e){if(typeof e=="string")return e;if(Vt(e))return hf(e,pf)+"";if(Zs(e))return ff?ff.call(e):"";var t=e+"";return t=="0"&&1/e==-D_?"-0":t}var L_=/\s/;function R_(e){for(var t=e.length;t--&&L_.test(e.charAt(t)););return t}var I_=/^\s+/;function k_(e){return e&&e.slice(0,R_(e)+1).replace(I_,"")}function me(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var gf=0/0,$_=/^[-+]0x[0-9a-f]+$/i,P_=/^0b[01]+$/i,N_=/^0o[0-7]+$/i,U_=parseInt;function gi(e){if(typeof e=="number")return e;if(Zs(e))return gf;if(me(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=me(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=k_(e);var n=P_.test(e);return n||N_.test(e)?U_(e.slice(2),n?2:8):$_.test(e)?gf:+e}function bl(e){return e}var B_="[object AsyncFunction]",V_="[object Function]",G_="[object GeneratorFunction]",H_="[object Proxy]";function El(e){if(!me(e))return!1;var t=kn(e);return t==V_||t==G_||t==B_||t==H_}var F_=Te["__core-js_shared__"];const Sl=F_;var mf=function(){var e=/[^.]+$/.exec(Sl&&Sl.keys&&Sl.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function z_(e){return!!mf&&mf in e}var W_=Function.prototype,Y_=W_.toString;function $n(e){if(e!=null){try{return Y_.call(e)}catch{}try{return e+""}catch{}}return""}var q_=/[\\^$.*+?()[\]{}|]/g,X_=/^\[object .+?Constructor\]$/,j_=Function.prototype,Z_=Object.prototype,K_=j_.toString,Q_=Z_.hasOwnProperty,J_=RegExp("^"+K_.call(Q_).replace(q_,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function tw(e){if(!me(e)||z_(e))return!1;var t=El(e)?J_:X_;return t.test($n(e))}function ew(e,t){return e==null?void 0:e[t]}function Pn(e,t){var n=ew(e,t);return tw(n)?n:void 0}var nw=Pn(Te,"WeakMap");const _l=nw;var vf=Object.create,rw=function(){function e(){}return function(t){if(!me(t))return{};if(vf)return vf(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();const iw=rw;function sw(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function aw(){}function yf(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var ow=800,lw=16,cw=Date.now;function uw(e){var t=0,n=0;return function(){var r=cw(),i=lw-(r-n);if(n=r,i>0){if(++t>=ow)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function hw(e){return function(){return e}}var dw=function(){try{var e=Pn(Object,"defineProperty");return e({},"",{}),e}catch{}}();const Ks=dw;var fw=Ks?function(e,t){return Ks(e,"toString",{configurable:!0,enumerable:!1,value:hw(t),writable:!0})}:bl,pw=uw(fw);const gw=pw;function mw(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}function vw(e,t,n,r){for(var i=e.length,s=n+(r?1:-1);r?s--:++s<i;)if(t(e[s],s,e))return s;return-1}function yw(e){return e!==e}function xw(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}function bw(e,t,n){return t===t?xw(e,t,n):vw(e,yw,n)}function Ew(e,t){var n=e==null?0:e.length;return!!n&&bw(e,t,0)>-1}var Sw=9007199254740991,_w=/^(?:0|[1-9]\d*)$/;function wl(e,t){var n=typeof e;return t=t??Sw,!!t&&(n=="number"||n!="symbol"&&_w.test(e))&&e>-1&&e%1==0&&e<t}function Qs(e,t,n){t=="__proto__"&&Ks?Ks(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function mi(e,t){return e===t||e!==e&&t!==t}var ww=Object.prototype,Ow=ww.hasOwnProperty;function xf(e,t,n){var r=e[t];(!(Ow.call(e,t)&&mi(r,n))||n===void 0&&!(t in e))&&Qs(e,t,n)}function vi(e,t,n,r){var i=!n;n||(n={});for(var s=-1,a=t.length;++s<a;){var o=t[s],l=r?r(n[o],e[o],o,n,e):void 0;l===void 0&&(l=e[o]),i?Qs(n,o,l):xf(n,o,l)}return n}var bf=Math.max;function Tw(e,t,n){return t=bf(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,s=bf(r.length-t,0),a=Array(s);++i<s;)a[i]=r[t+i];i=-1;for(var o=Array(t+1);++i<t;)o[i]=r[i];return o[t]=n(a),sw(e,this,o)}}function Ef(e,t){return gw(Tw(e,t,bl),e+"")}var Mw=9007199254740991;function Ol(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Mw}function Nn(e){return e!=null&&Ol(e.length)&&!El(e)}function Sf(e,t,n){if(!me(n))return!1;var r=typeof t;return(r=="number"?Nn(n)&&wl(t,n.length):r=="string"&&t in n)?mi(n[t],e):!1}function Cw(e){return Ef(function(t,n){var r=-1,i=n.length,s=i>1?n[i-1]:void 0,a=i>2?n[2]:void 0;for(s=e.length>3&&typeof s=="function"?(i--,s):void 0,a&&Sf(n[0],n[1],a)&&(s=i<3?void 0:s,i=1),t=Object(t);++r<i;){var o=n[r];o&&e(t,o,r,s)}return t})}var Aw=Object.prototype;function Js(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||Aw;return e===n}function Dw(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var Lw="[object Arguments]";function _f(e){return Ne(e)&&kn(e)==Lw}var wf=Object.prototype,Rw=wf.hasOwnProperty,Iw=wf.propertyIsEnumerable,kw=_f(function(){return arguments}())?_f:function(e){return Ne(e)&&Rw.call(e,"callee")&&!Iw.call(e,"callee")};const dr=kw;function $w(){return!1}var Of=typeof z=="object"&&z&&!z.nodeType&&z,Tf=Of&&typeof module=="object"&&module&&!module.nodeType&&module,Pw=Tf&&Tf.exports===Of,Mf=Pw?Te.Buffer:void 0,Nw=Mf?Mf.isBuffer:void 0,Uw=Nw||$w;const fr=Uw;var Bw="[object Arguments]",Vw="[object Array]",Gw="[object Boolean]",Hw="[object Date]",Fw="[object Error]",zw="[object Function]",Ww="[object Map]",Yw="[object Number]",qw="[object Object]",Xw="[object RegExp]",jw="[object Set]",Zw="[object String]",Kw="[object WeakMap]",Qw="[object ArrayBuffer]",Jw="[object DataView]",tO="[object Float32Array]",eO="[object Float64Array]",nO="[object Int8Array]",rO="[object Int16Array]",iO="[object Int32Array]",sO="[object Uint8Array]",aO="[object Uint8ClampedArray]",oO="[object Uint16Array]",lO="[object Uint32Array]",Ot={};Ot[tO]=Ot[eO]=Ot[nO]=Ot[rO]=Ot[iO]=Ot[sO]=Ot[aO]=Ot[oO]=Ot[lO]=!0,Ot[Bw]=Ot[Vw]=Ot[Qw]=Ot[Gw]=Ot[Jw]=Ot[Hw]=Ot[Fw]=Ot[zw]=Ot[Ww]=Ot[Yw]=Ot[qw]=Ot[Xw]=Ot[jw]=Ot[Zw]=Ot[Kw]=!1;function cO(e){return Ne(e)&&Ol(e.length)&&!!Ot[kn(e)]}function Tl(e){return function(t){return e(t)}}var Cf=typeof z=="object"&&z&&!z.nodeType&&z,yi=Cf&&typeof module=="object"&&module&&!module.nodeType&&module,uO=yi&&yi.exports===Cf,Ml=uO&&lf.process,hO=function(){try{var e=yi&&yi.require&&yi.require("util").types;return e||Ml&&Ml.binding&&Ml.binding("util")}catch{}}();const pr=hO;var Af=pr&&pr.isTypedArray,dO=Af?Tl(Af):cO;const ta=dO;var fO=Object.prototype,pO=fO.hasOwnProperty;function Df(e,t){var n=Vt(e),r=!n&&dr(e),i=!n&&!r&&fr(e),s=!n&&!r&&!i&&ta(e),a=n||r||i||s,o=a?Dw(e.length,String):[],l=o.length;for(var c in e)(t||pO.call(e,c))&&!(a&&(c=="length"||i&&(c=="offset"||c=="parent")||s&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||wl(c,l)))&&o.push(c);return o}function Lf(e,t){return function(n){return e(t(n))}}var gO=Lf(Object.keys,Object);const mO=gO;var vO=Object.prototype,yO=vO.hasOwnProperty;function Rf(e){if(!Js(e))return mO(e);var t=[];for(var n in Object(e))yO.call(e,n)&&n!="constructor"&&t.push(n);return t}function xi(e){return Nn(e)?Df(e):Rf(e)}function xO(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var bO=Object.prototype,EO=bO.hasOwnProperty;function SO(e){if(!me(e))return xO(e);var t=Js(e),n=[];for(var r in e)r=="constructor"&&(t||!EO.call(e,r))||n.push(r);return n}function bi(e){return Nn(e)?Df(e,!0):SO(e)}var _O=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,wO=/^\w*$/;function Cl(e,t){if(Vt(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||Zs(e)?!0:wO.test(e)||!_O.test(e)||t!=null&&e in Object(t)}var OO=Pn(Object,"create");const Ei=OO;function TO(){this.__data__=Ei?Ei(null):{},this.size=0}function MO(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var CO="__lodash_hash_undefined__",AO=Object.prototype,DO=AO.hasOwnProperty;function LO(e){var t=this.__data__;if(Ei){var n=t[e];return n===CO?void 0:n}return DO.call(t,e)?t[e]:void 0}var RO=Object.prototype,IO=RO.hasOwnProperty;function kO(e){var t=this.__data__;return Ei?t[e]!==void 0:IO.call(t,e)}var $O="__lodash_hash_undefined__";function PO(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Ei&&t===void 0?$O:t,this}function Un(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Un.prototype.clear=TO,Un.prototype.delete=MO,Un.prototype.get=LO,Un.prototype.has=kO,Un.prototype.set=PO;function NO(){this.__data__=[],this.size=0}function ea(e,t){for(var n=e.length;n--;)if(mi(e[n][0],t))return n;return-1}var UO=Array.prototype,BO=UO.splice;function VO(e){var t=this.__data__,n=ea(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():BO.call(t,n,1),--this.size,!0}function GO(e){var t=this.__data__,n=ea(t,e);return n<0?void 0:t[n][1]}function HO(e){return ea(this.__data__,e)>-1}function FO(e,t){var n=this.__data__,r=ea(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function Qe(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Qe.prototype.clear=NO,Qe.prototype.delete=VO,Qe.prototype.get=GO,Qe.prototype.has=HO,Qe.prototype.set=FO;var zO=Pn(Te,"Map");const Si=zO;function WO(){this.size=0,this.__data__={hash:new Un,map:new(Si||Qe),string:new Un}}function YO(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function na(e,t){var n=e.__data__;return YO(t)?n[typeof t=="string"?"string":"hash"]:n.map}function qO(e){var t=na(this,e).delete(e);return this.size-=t?1:0,t}function XO(e){return na(this,e).get(e)}function jO(e){return na(this,e).has(e)}function ZO(e,t){var n=na(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function Je(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Je.prototype.clear=WO,Je.prototype.delete=qO,Je.prototype.get=XO,Je.prototype.has=jO,Je.prototype.set=ZO;var KO="Expected a function";function Al(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(KO);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],s=n.cache;if(s.has(i))return s.get(i);var a=e.apply(this,r);return n.cache=s.set(i,a)||s,a};return n.cache=new(Al.Cache||Je),n}Al.Cache=Je;var QO=500;function JO(e){var t=Al(e,function(r){return n.size===QO&&n.clear(),r}),n=t.cache;return t}var tT=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,eT=/\\(\\)?/g,nT=JO(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(tT,function(n,r,i,s){t.push(i?s.replace(eT,"$1"):r||n)}),t});const rT=nT;function _i(e){return e==null?"":pf(e)}function If(e,t){return Vt(e)?e:Cl(e,t)?[e]:rT(_i(e))}var iT=1/0;function ra(e){if(typeof e=="string"||Zs(e))return e;var t=e+"";return t=="0"&&1/e==-iT?"-0":t}function kf(e,t){t=If(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[ra(t[n++])];return n&&n==r?e:void 0}function St(e,t,n){var r=e==null?void 0:kf(e,t);return r===void 0?n:r}function Dl(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var $f=ge?ge.isConcatSpreadable:void 0;function sT(e){return Vt(e)||dr(e)||!!($f&&e&&e[$f])}function ia(e,t,n,r,i){var s=-1,a=e.length;for(n||(n=sT),i||(i=[]);++s<a;){var o=e[s];t>0&&n(o)?t>1?ia(o,t-1,n,r,i):Dl(i,o):r||(i[i.length]=o)}return i}function Pf(e){var t=e==null?0:e.length;return t?ia(e,1):[]}var aT=Lf(Object.getPrototypeOf,Object);const Ll=aT;var oT="[object Object]",lT=Function.prototype,cT=Object.prototype,Nf=lT.toString,uT=cT.hasOwnProperty,hT=Nf.call(Object);function dT(e){if(!Ne(e)||kn(e)!=oT)return!1;var t=Ll(e);if(t===null)return!0;var n=uT.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Nf.call(n)==hT}function fT(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var s=Array(i);++r<i;)s[r]=e[r+t];return s}function pT(e,t,n){var r=e.length;return n=n===void 0?r:n,!t&&n>=r?e:fT(e,t,n)}var gT="\\ud800-\\udfff",mT="\\u0300-\\u036f",vT="\\ufe20-\\ufe2f",yT="\\u20d0-\\u20ff",xT=mT+vT+yT,bT="\\ufe0e\\ufe0f",ET="\\u200d",ST=RegExp("["+ET+gT+xT+bT+"]");function Uf(e){return ST.test(e)}function _T(e){return e.split("")}var Bf="\\ud800-\\udfff",wT="\\u0300-\\u036f",OT="\\ufe20-\\ufe2f",TT="\\u20d0-\\u20ff",MT=wT+OT+TT,CT="\\ufe0e\\ufe0f",AT="["+Bf+"]",Rl="["+MT+"]",Il="\\ud83c[\\udffb-\\udfff]",DT="(?:"+Rl+"|"+Il+")",Vf="[^"+Bf+"]",Gf="(?:\\ud83c[\\udde6-\\uddff]){2}",Hf="[\\ud800-\\udbff][\\udc00-\\udfff]",LT="\\u200d",Ff=DT+"?",zf="["+CT+"]?",RT="(?:"+LT+"(?:"+[Vf,Gf,Hf].join("|")+")"+zf+Ff+")*",IT=zf+Ff+RT,kT="(?:"+[Vf+Rl+"?",Rl,Gf,Hf,AT].join("|")+")",$T=RegExp(Il+"(?="+Il+")|"+kT+IT,"g");function PT(e){return e.match($T)||[]}function NT(e){return Uf(e)?PT(e):_T(e)}function UT(e){return function(t){t=_i(t);var n=Uf(t)?NT(t):void 0,r=n?n[0]:t.charAt(0),i=n?pT(n,1).join(""):t.slice(1);return r[e]()+i}}var BT=UT("toUpperCase");const VT=BT;function GT(e){return VT(_i(e).toLowerCase())}function HT(e,t,n,r){var i=-1,s=e==null?0:e.length;for(r&&s&&(n=e[++i]);++i<s;)n=t(n,e[i],i,e);return n}function FT(e){return function(t){return e==null?void 0:e[t]}}var zT={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},WT=FT(zT);const YT=WT;var qT=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,XT="\\u0300-\\u036f",jT="\\ufe20-\\ufe2f",ZT="\\u20d0-\\u20ff",KT=XT+jT+ZT,QT="["+KT+"]",JT=RegExp(QT,"g");function tM(e){return e=_i(e),e&&e.replace(qT,YT).replace(JT,"")}var eM=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function nM(e){return e.match(eM)||[]}var rM=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function iM(e){return rM.test(e)}var Wf="\\ud800-\\udfff",sM="\\u0300-\\u036f",aM="\\ufe20-\\ufe2f",oM="\\u20d0-\\u20ff",lM=sM+aM+oM,Yf="\\u2700-\\u27bf",qf="a-z\\xdf-\\xf6\\xf8-\\xff",cM="\\xac\\xb1\\xd7\\xf7",uM="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",hM="\\u2000-\\u206f",dM=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Xf="A-Z\\xc0-\\xd6\\xd8-\\xde",fM="\\ufe0e\\ufe0f",jf=cM+uM+hM+dM,Zf="['’]",Kf="["+jf+"]",pM="["+lM+"]",Qf="\\d+",gM="["+Yf+"]",Jf="["+qf+"]",tp="[^"+Wf+jf+Qf+Yf+qf+Xf+"]",mM="\\ud83c[\\udffb-\\udfff]",vM="(?:"+pM+"|"+mM+")",yM="[^"+Wf+"]",ep="(?:\\ud83c[\\udde6-\\uddff]){2}",np="[\\ud800-\\udbff][\\udc00-\\udfff]",gr="["+Xf+"]",xM="\\u200d",rp="(?:"+Jf+"|"+tp+")",bM="(?:"+gr+"|"+tp+")",ip="(?:"+Zf+"(?:d|ll|m|re|s|t|ve))?",sp="(?:"+Zf+"(?:D|LL|M|RE|S|T|VE))?",ap=vM+"?",op="["+fM+"]?",EM="(?:"+xM+"(?:"+[yM,ep,np].join("|")+")"+op+ap+")*",SM="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",_M="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",wM=op+ap+EM,OM="(?:"+[gM,ep,np].join("|")+")"+wM,TM=RegExp([gr+"?"+Jf+"+"+ip+"(?="+[Kf,gr,"$"].join("|")+")",bM+"+"+sp+"(?="+[Kf,gr+rp,"$"].join("|")+")",gr+"?"+rp+"+"+ip,gr+"+"+sp,_M,SM,Qf,OM].join("|"),"g");function MM(e){return e.match(TM)||[]}function CM(e,t,n){return e=_i(e),t=n?void 0:t,t===void 0?iM(e)?MM(e):nM(e):e.match(t)||[]}var AM="['’]",DM=RegExp(AM,"g");function lp(e){return function(t){return HT(CM(tM(t).replace(DM,"")),e,"")}}var LM=lp(function(e,t,n){return t=t.toLowerCase(),e+(n?GT(t):t)});const RM=LM;function IM(e,t,n){return e===e&&(n!==void 0&&(e=e<=n?e:n),t!==void 0&&(e=e>=t?e:t)),e}function cp(e,t,n){return n===void 0&&(n=t,t=void 0),n!==void 0&&(n=gi(n),n=n===n?n:0),t!==void 0&&(t=gi(t),t=t===t?t:0),IM(gi(e),t,n)}function kM(){this.__data__=new Qe,this.size=0}function $M(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function PM(e){return this.__data__.get(e)}function NM(e){return this.__data__.has(e)}var UM=200;function BM(e,t){var n=this.__data__;if(n instanceof Qe){var r=n.__data__;if(!Si||r.length<UM-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Je(r)}return n.set(e,t),this.size=n.size,this}function Me(e){var t=this.__data__=new Qe(e);this.size=t.size}Me.prototype.clear=kM,Me.prototype.delete=$M,Me.prototype.get=PM,Me.prototype.has=NM,Me.prototype.set=BM;function VM(e,t){return e&&vi(t,xi(t),e)}function GM(e,t){return e&&vi(t,bi(t),e)}var up=typeof z=="object"&&z&&!z.nodeType&&z,hp=up&&typeof module=="object"&&module&&!module.nodeType&&module,HM=hp&&hp.exports===up,dp=HM?Te.Buffer:void 0,fp=dp?dp.allocUnsafe:void 0;function pp(e,t){if(t)return e.slice();var n=e.length,r=fp?fp(n):new e.constructor(n);return e.copy(r),r}function FM(e,t){for(var n=-1,r=e==null?0:e.length,i=0,s=[];++n<r;){var a=e[n];t(a,n,e)&&(s[i++]=a)}return s}function gp(){return[]}var zM=Object.prototype,WM=zM.propertyIsEnumerable,mp=Object.getOwnPropertySymbols,YM=mp?function(e){return e==null?[]:(e=Object(e),FM(mp(e),function(t){return WM.call(e,t)}))}:gp;const kl=YM;function qM(e,t){return vi(e,kl(e),t)}var XM=Object.getOwnPropertySymbols,jM=XM?function(e){for(var t=[];e;)Dl(t,kl(e)),e=Ll(e);return t}:gp;const vp=jM;function ZM(e,t){return vi(e,vp(e),t)}function yp(e,t,n){var r=t(e);return Vt(e)?r:Dl(r,n(e))}function $l(e){return yp(e,xi,kl)}function KM(e){return yp(e,bi,vp)}var QM=Pn(Te,"DataView");const Pl=QM;var JM=Pn(Te,"Promise");const Nl=JM;var tC=Pn(Te,"Set");const mr=tC;var xp="[object Map]",eC="[object Object]",bp="[object Promise]",Ep="[object Set]",Sp="[object WeakMap]",_p="[object DataView]",nC=$n(Pl),rC=$n(Si),iC=$n(Nl),sC=$n(mr),aC=$n(_l),Bn=kn;(Pl&&Bn(new Pl(new ArrayBuffer(1)))!=_p||Si&&Bn(new Si)!=xp||Nl&&Bn(Nl.resolve())!=bp||mr&&Bn(new mr)!=Ep||_l&&Bn(new _l)!=Sp)&&(Bn=function(e){var t=kn(e),n=t==eC?e.constructor:void 0,r=n?$n(n):"";if(r)switch(r){case nC:return _p;case rC:return xp;case iC:return bp;case sC:return Ep;case aC:return Sp}return t});const vr=Bn;var oC=Object.prototype,lC=oC.hasOwnProperty;function cC(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&lC.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var uC=Te.Uint8Array;const sa=uC;function Ul(e){var t=new e.constructor(e.byteLength);return new sa(t).set(new sa(e)),t}function hC(e,t){var n=t?Ul(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var dC=/\w*$/;function fC(e){var t=new e.constructor(e.source,dC.exec(e));return t.lastIndex=e.lastIndex,t}var wp=ge?ge.prototype:void 0,Op=wp?wp.valueOf:void 0;function pC(e){return Op?Object(Op.call(e)):{}}function Tp(e,t){var n=t?Ul(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var gC="[object Boolean]",mC="[object Date]",vC="[object Map]",yC="[object Number]",xC="[object RegExp]",bC="[object Set]",EC="[object String]",SC="[object Symbol]",_C="[object ArrayBuffer]",wC="[object DataView]",OC="[object Float32Array]",TC="[object Float64Array]",MC="[object Int8Array]",CC="[object Int16Array]",AC="[object Int32Array]",DC="[object Uint8Array]",LC="[object Uint8ClampedArray]",RC="[object Uint16Array]",IC="[object Uint32Array]";function kC(e,t,n){var r=e.constructor;switch(t){case _C:return Ul(e);case gC:case mC:return new r(+e);case wC:return hC(e,n);case OC:case TC:case MC:case CC:case AC:case DC:case LC:case RC:case IC:return Tp(e,n);case vC:return new r;case yC:case EC:return new r(e);case xC:return fC(e);case bC:return new r;case SC:return pC(e)}}function Mp(e){return typeof e.constructor=="function"&&!Js(e)?iw(Ll(e)):{}}var $C="[object Map]";function PC(e){return Ne(e)&&vr(e)==$C}var Cp=pr&&pr.isMap,NC=Cp?Tl(Cp):PC;const UC=NC;var BC="[object Set]";function VC(e){return Ne(e)&&vr(e)==BC}var Ap=pr&&pr.isSet,GC=Ap?Tl(Ap):VC;const HC=GC;var FC=1,zC=2,WC=4,Dp="[object Arguments]",YC="[object Array]",qC="[object Boolean]",XC="[object Date]",jC="[object Error]",Lp="[object Function]",ZC="[object GeneratorFunction]",KC="[object Map]",QC="[object Number]",Rp="[object Object]",JC="[object RegExp]",tA="[object Set]",eA="[object String]",nA="[object Symbol]",rA="[object WeakMap]",iA="[object ArrayBuffer]",sA="[object DataView]",aA="[object Float32Array]",oA="[object Float64Array]",lA="[object Int8Array]",cA="[object Int16Array]",uA="[object Int32Array]",hA="[object Uint8Array]",dA="[object Uint8ClampedArray]",fA="[object Uint16Array]",pA="[object Uint32Array]",_t={};_t[Dp]=_t[YC]=_t[iA]=_t[sA]=_t[qC]=_t[XC]=_t[aA]=_t[oA]=_t[lA]=_t[cA]=_t[uA]=_t[KC]=_t[QC]=_t[Rp]=_t[JC]=_t[tA]=_t[eA]=_t[nA]=_t[hA]=_t[dA]=_t[fA]=_t[pA]=!0,_t[jC]=_t[Lp]=_t[rA]=!1;function aa(e,t,n,r,i,s){var a,o=t&FC,l=t&zC,c=t&WC;if(n&&(a=i?n(e,r,i,s):n(e)),a!==void 0)return a;if(!me(e))return e;var u=Vt(e);if(u){if(a=cC(e),!o)return yf(e,a)}else{var d=vr(e),h=d==Lp||d==ZC;if(fr(e))return pp(e,o);if(d==Rp||d==Dp||h&&!i){if(a=l||h?{}:Mp(e),!o)return l?ZM(e,GM(a,e)):qM(e,VM(a,e))}else{if(!_t[d])return i?e:{};a=kC(e,d,o)}}s||(s=new Me);var f=s.get(e);if(f)return f;s.set(e,a),HC(e)?e.forEach(function(v){a.add(aa(v,t,n,v,e,s))}):UC(e)&&e.forEach(function(v,m){a.set(m,aa(v,t,n,m,e,s))});var p=c?l?KM:$l:l?bi:xi,g=u?void 0:p(e);return mw(g||e,function(v,m){g&&(m=v,v=e[m]),xf(a,m,aa(v,t,n,m,e,s))}),a}var gA=1,mA=4;function tn(e){return aa(e,gA|mA)}var vA="__lodash_hash_undefined__";function yA(e){return this.__data__.set(e,vA),this}function xA(e){return this.__data__.has(e)}function wi(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new Je;++t<n;)this.add(e[t])}wi.prototype.add=wi.prototype.push=yA,wi.prototype.has=xA;function Ip(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function kp(e,t){return e.has(t)}var bA=1,EA=2;function $p(e,t,n,r,i,s){var a=n&bA,o=e.length,l=t.length;if(o!=l&&!(a&&l>o))return!1;var c=s.get(e),u=s.get(t);if(c&&u)return c==t&&u==e;var d=-1,h=!0,f=n&EA?new wi:void 0;for(s.set(e,t),s.set(t,e);++d<o;){var p=e[d],g=t[d];if(r)var v=a?r(g,p,d,t,e,s):r(p,g,d,e,t,s);if(v!==void 0){if(v)continue;h=!1;break}if(f){if(!Ip(t,function(m,y){if(!kp(f,y)&&(p===m||i(p,m,n,r,s)))return f.push(y)})){h=!1;break}}else if(!(p===g||i(p,g,n,r,s))){h=!1;break}}return s.delete(e),s.delete(t),h}function SA(e){var t=-1,n=Array(e.size);return e.forEach(function(r,i){n[++t]=[i,r]}),n}function Bl(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var _A=1,wA=2,OA="[object Boolean]",TA="[object Date]",MA="[object Error]",CA="[object Map]",AA="[object Number]",DA="[object RegExp]",LA="[object Set]",RA="[object String]",IA="[object Symbol]",kA="[object ArrayBuffer]",$A="[object DataView]",Pp=ge?ge.prototype:void 0,Vl=Pp?Pp.valueOf:void 0;function PA(e,t,n,r,i,s,a){switch(n){case $A:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case kA:return!(e.byteLength!=t.byteLength||!s(new sa(e),new sa(t)));case OA:case TA:case AA:return mi(+e,+t);case MA:return e.name==t.name&&e.message==t.message;case DA:case RA:return e==t+"";case CA:var o=SA;case LA:var l=r&_A;if(o||(o=Bl),e.size!=t.size&&!l)return!1;var c=a.get(e);if(c)return c==t;r|=wA,a.set(e,t);var u=$p(o(e),o(t),r,i,s,a);return a.delete(e),u;case IA:if(Vl)return Vl.call(e)==Vl.call(t)}return!1}var NA=1,UA=Object.prototype,BA=UA.hasOwnProperty;function VA(e,t,n,r,i,s){var a=n&NA,o=$l(e),l=o.length,c=$l(t),u=c.length;if(l!=u&&!a)return!1;for(var d=l;d--;){var h=o[d];if(!(a?h in t:BA.call(t,h)))return!1}var f=s.get(e),p=s.get(t);if(f&&p)return f==t&&p==e;var g=!0;s.set(e,t),s.set(t,e);for(var v=a;++d<l;){h=o[d];var m=e[h],y=t[h];if(r)var b=a?r(y,m,h,t,e,s):r(m,y,h,e,t,s);if(!(b===void 0?m===y||i(m,y,n,r,s):b)){g=!1;break}v||(v=h=="constructor")}if(g&&!v){var S=e.constructor,_=t.constructor;S!=_&&"constructor"in e&&"constructor"in t&&!(typeof S=="function"&&S instanceof S&&typeof _=="function"&&_ instanceof _)&&(g=!1)}return s.delete(e),s.delete(t),g}var GA=1,Np="[object Arguments]",Up="[object Array]",oa="[object Object]",HA=Object.prototype,Bp=HA.hasOwnProperty;function FA(e,t,n,r,i,s){var a=Vt(e),o=Vt(t),l=a?Up:vr(e),c=o?Up:vr(t);l=l==Np?oa:l,c=c==Np?oa:c;var u=l==oa,d=c==oa,h=l==c;if(h&&fr(e)){if(!fr(t))return!1;a=!0,u=!1}if(h&&!u)return s||(s=new Me),a||ta(e)?$p(e,t,n,r,i,s):PA(e,t,l,n,r,i,s);if(!(n&GA)){var f=u&&Bp.call(e,"__wrapped__"),p=d&&Bp.call(t,"__wrapped__");if(f||p){var g=f?e.value():e,v=p?t.value():t;return s||(s=new Me),i(g,v,n,r,s)}}return h?(s||(s=new Me),VA(e,t,n,r,i,s)):!1}function la(e,t,n,r,i){return e===t?!0:e==null||t==null||!Ne(e)&&!Ne(t)?e!==e&&t!==t:FA(e,t,n,r,la,i)}var zA=1,WA=2;function YA(e,t,n,r){var i=n.length,s=i,a=!r;if(e==null)return!s;for(e=Object(e);i--;){var o=n[i];if(a&&o[2]?o[1]!==e[o[0]]:!(o[0]in e))return!1}for(;++i<s;){o=n[i];var l=o[0],c=e[l],u=o[1];if(a&&o[2]){if(c===void 0&&!(l in e))return!1}else{var d=new Me;if(r)var h=r(c,u,l,e,t,d);if(!(h===void 0?la(u,c,zA|WA,r,d):h))return!1}}return!0}function Vp(e){return e===e&&!me(e)}function qA(e){for(var t=xi(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,Vp(i)]}return t}function Gp(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function XA(e){var t=qA(e);return t.length==1&&t[0][2]?Gp(t[0][0],t[0][1]):function(n){return n===e||YA(n,e,t)}}function jA(e,t){return e!=null&&t in Object(e)}function ZA(e,t,n){t=If(t,e);for(var r=-1,i=t.length,s=!1;++r<i;){var a=ra(t[r]);if(!(s=e!=null&&n(e,a)))break;e=e[a]}return s||++r!=i?s:(i=e==null?0:e.length,!!i&&Ol(i)&&wl(a,i)&&(Vt(e)||dr(e)))}function KA(e,t){return e!=null&&ZA(e,t,jA)}var QA=1,JA=2;function tD(e,t){return Cl(e)&&Vp(t)?Gp(ra(e),t):function(n){var r=St(n,e);return r===void 0&&r===t?KA(n,e):la(t,r,QA|JA)}}function eD(e){return function(t){return t==null?void 0:t[e]}}function nD(e){return function(t){return kf(t,e)}}function rD(e){return Cl(e)?eD(ra(e)):nD(e)}function ca(e){return typeof e=="function"?e:e==null?bl:typeof e=="object"?Vt(e)?tD(e[0],e[1]):XA(e):rD(e)}function iD(e,t,n,r){for(var i=-1,s=e==null?0:e.length;++i<s;){var a=e[i];t(r,a,n(a),e)}return r}function sD(e){return function(t,n,r){for(var i=-1,s=Object(t),a=r(t),o=a.length;o--;){var l=a[e?o:++i];if(n(s[l],l,s)===!1)break}return t}}var aD=sD();const Hp=aD;function oD(e,t){return e&&Hp(e,t,xi)}function lD(e,t){return function(n,r){if(n==null)return n;if(!Nn(n))return e(n,r);for(var i=n.length,s=t?i:-1,a=Object(n);(t?s--:++s<i)&&r(a[s],s,a)!==!1;);return n}}var cD=lD(oD);const Gl=cD;function uD(e,t,n,r){return Gl(e,function(i,s,a){t(r,i,n(i),a)}),r}function hD(e,t){return function(n,r){var i=Vt(n)?iD:uD,s=t?t():{};return i(n,e,ca(r),s)}}var dD=function(){return Te.Date.now()};const Hl=dD;var fD="Expected a function",pD=Math.max,gD=Math.min;function ua(e,t,n){var r,i,s,a,o,l,c=0,u=!1,d=!1,h=!0;if(typeof e!="function")throw new TypeError(fD);t=gi(t)||0,me(n)&&(u=!!n.leading,d="maxWait"in n,s=d?pD(gi(n.maxWait)||0,t):s,h="trailing"in n?!!n.trailing:h);function f(E){var M=r,C=i;return r=i=void 0,c=E,a=e.apply(C,M),a}function p(E){return c=E,o=setTimeout(m,t),u?f(E):a}function g(E){var M=E-l,C=E-c,G=t-M;return d?gD(G,s-C):G}function v(E){var M=E-l,C=E-c;return l===void 0||M>=t||M<0||d&&C>=s}function m(){var E=Hl();if(v(E))return y(E);o=setTimeout(m,g(E))}function y(E){return o=void 0,h&&r?f(E):(r=i=void 0,a)}function b(){o!==void 0&&clearTimeout(o),c=0,r=l=i=o=void 0}function S(){return o===void 0?a:y(Hl())}function _(){var E=Hl(),M=v(E);if(r=arguments,i=this,l=E,M){if(o===void 0)return p(l);if(d)return clearTimeout(o),o=setTimeout(m,t),f(l)}return o===void 0&&(o=setTimeout(m,t)),a}return _.cancel=b,_.flush=S,_}function Fl(e,t,n){(n!==void 0&&!mi(e[t],n)||n===void 0&&!(t in e))&&Qs(e,t,n)}function zl(e){return Ne(e)&&Nn(e)}function Wl(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function mD(e){return vi(e,bi(e))}function vD(e,t,n,r,i,s,a){var o=Wl(e,n),l=Wl(t,n),c=a.get(l);if(c){Fl(e,n,c);return}var u=s?s(o,l,n+"",e,t,a):void 0,d=u===void 0;if(d){var h=Vt(l),f=!h&&fr(l),p=!h&&!f&&ta(l);u=l,h||f||p?Vt(o)?u=o:zl(o)?u=yf(o):f?(d=!1,u=pp(l,!0)):p?(d=!1,u=Tp(l,!0)):u=[]:dT(l)||dr(l)?(u=o,dr(o)?u=mD(o):(!me(o)||El(o))&&(u=Mp(l))):d=!1}d&&(a.set(l,u),i(u,l,r,s,a),a.delete(l)),Fl(e,n,u)}function Fp(e,t,n,r,i){e!==t&&Hp(t,function(s,a){if(i||(i=new Me),me(s))vD(e,t,a,n,Fp,r,i);else{var o=r?r(Wl(e,a),s,a+"",e,t,i):void 0;o===void 0&&(o=s),Fl(e,a,o)}},bi)}function yD(e,t,n){for(var r=-1,i=e==null?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function xD(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}function bD(e,t){var n=-1,r=Nn(e)?Array(e.length):[];return Gl(e,function(i,s,a){r[++n]=t(i,s,a)}),r}function ED(e,t){var n=Vt(e)?hf:bD;return n(e,ca(t))}var SD=1/0;function _D(e,t){return ia(ED(e,t),SD)}function wD(e){for(var t=-1,n=e==null?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r}var OD=Object.prototype,TD=OD.hasOwnProperty,MD=hD(function(e,t,n){TD.call(e,n)?e[n].push(t):Qs(e,n,[t])});const CD=MD;var AD="[object Map]",DD="[object Set]",LD=Object.prototype,RD=LD.hasOwnProperty;function Ce(e){if(e==null)return!0;if(Nn(e)&&(Vt(e)||typeof e=="string"||typeof e.splice=="function"||fr(e)||ta(e)||dr(e)))return!e.length;var t=vr(e);if(t==AD||t==DD)return!e.size;if(Js(e))return!Rf(e).length;for(var n in e)if(RD.call(e,n))return!1;return!0}function zp(e,t){return la(e,t)}var ID=lp(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()});const yr=ID;var kD=Cw(function(e,t,n){Fp(e,t,n)});const tt=kD;function $D(e,t){var n;return Gl(e,function(r,i,s){return n=t(r,i,s),!n}),!!n}function PD(e,t,n){var r=Vt(e)?Ip:$D;return n&&Sf(e,t,n)&&(t=void 0),r(e,ca(t))}var ND=1/0,UD=mr&&1/Bl(new mr([,-0]))[1]==ND?function(e){return new mr(e)}:aw;const BD=UD;var VD=200;function Wp(e,t,n){var r=-1,i=Ew,s=e.length,a=!0,o=[],l=o;if(n)a=!1,i=yD;else if(s>=VD){var c=t?null:BD(e);if(c)return Bl(c);a=!1,i=kp,l=new wi}else l=t?[]:o;t:for(;++r<s;){var u=e[r],d=t?t(u):u;if(u=n||u!==0?u:0,a&&d===d){for(var h=l.length;h--;)if(l[h]===d)continue t;t&&l.push(d),o.push(u)}else i(l,d,n)||(l!==o&&l.push(d),o.push(u))}return o}var GD=Ef(function(e){var t=xD(e);return zl(t)&&(t=void 0),Wp(ia(e,1,zl,!0),ca(t))});const HD=GD;function Oi(e){return e&&e.length?Wp(e):[]}var Yl=(e=>(e.RENDER_FINISHED="render-finished",e.RESIZE="chart-resize",e.MOUSEOVER="chart-mouseover",e.MOUSEOUT="chart-mouseout",e))(Yl||{}),ql=(e=>(e.SHOW="show-modal",e.HIDE="hide-modal",e))(ql||{}),Xl=(e=>(e.UPDATE="model-update",e))(Xl||{}),Yp=(e=>(e.SHOW_OVERFLOW_MENU="show-toolbar-overflow-menu",e.HIDE_OVERFLOW_MENU="hide-toolbar-overflow-menu",e.BUTTON_CLICK="toolbar-button-click",e))(Yp||{}),jl=(e=>(e.UPDATE="zoom-bar-update",e.SELECTION_START="zoom-bar-selection-start",e.SELECTION_IN_PROGRESS="zoom-bar-selection-in-progress",e.SELECTION_END="zoom-bar-selection-end",e))(jl||{}),Zl=(e=>(e.CHANGE="zoom-domain-change",e))(Zl||{}),Kl=(e=>(e.CANVAS_ZOOM_IN="canvas-zoom-in",e.CANVAS_ZOOM_OUT="canvas-zoom-out",e))(Kl||{}),Ql=(e=>(e.LABEL_MOUSEOVER="axis-label-mouseover",e.LABEL_MOUSEMOVE="axis-label-mousemove",e.LABEL_CLICK="axis-label-click",e.LABEL_MOUSEOUT="axis-label-mouseout",e.LABEL_FOCUS="axis-label-focus",e.LABEL_BLUR="axis-label-blur",e.RENDER_COMPLETE="axis-render-complete",e))(Ql||{}),Jl=(e=>(e.POINT_MOUSEOVER="scatter-mouseover",e.POINT_MOUSEMOVE="scatter-mousemove",e.POINT_CLICK="scatter-click",e.POINT_MOUSEOUT="scatter-mouseout",e))(Jl||{}),tc=(e=>(e.WORD_MOUSEOVER="wordcloud-word-mouseover",e.WORD_MOUSEMOVE="wordcloud-word-mousemove",e.WORD_CLICK="wordcloud-word-click",e.WORD_MOUSEOUT="wordcloud-word-mouseout",e))(tc||{}),ec=(e=>(e.SLICE_MOUSEOVER="pie-slice-mouseover",e.SLICE_MOUSEMOVE="pie-slice-mousemove",e.SLICE_CLICK="pie-slice-click",e.SLICE_MOUSEOUT="pie-slice-mouseout",e))(ec||{}),nc=(e=>(e.ARC_MOUSEOVER="gauge-arc-mouseover",e.ARC_MOUSEMOVE="gauge-arc-mousemove",e.ARC_CLICK="gauge-arc-click",e.ARC_MOUSEOUT="gauge-arc-mouseout",e))(nc||{}),rc=(e=>(e.BAR_MOUSEOVER="bar-mouseover",e.BAR_MOUSEMOVE="bar-mousemove",e.BAR_CLICK="bar-click",e.BAR_MOUSEOUT="bar-mouseout",e))(rc||{}),ic=(e=>(e.BOX_MOUSEOVER="box-mouseover",e.BOX_MOUSEMOVE="box-mousemove",e.BOX_CLICK="box-click",e.BOX_MOUSEOUT="box-mouseout",e.OUTLIER_MOUSEOVER="outlier-mouseover",e.OUTLIER_MOUSEMOVE="outlier-mousemove",e.OUTLIER_CLICK="outlier-click",e.OUTLIER_MOUSEOUT="outlier-mouseout",e))(ic||{}),sc=(e=>(e.SCATTER_MOUSEOVER="scatter-mouseover",e.SCATTER_MOUSEMOVE="scatter-mousemove",e.SCATTER_CLICK="scatter-click",e.SCATTER_MOUSEOUT="scatter-mouseout",e))(sc||{}),ac=(e=>(e.POINT_MOUSEOVER="scatter-mouseover",e.POINT_MOUSEMOVE="scatter-mousemove",e.POINT_CLICK="scatter-click",e.POINT_MOUSEOUT="scatter-mouseout",e))(ac||{}),oc=(e=>(e.X_AXIS_MOUSEOVER="radar-x-axis-mouseover",e.X_AXIS_MOUSEMOVE="radar-x-axis-mousemove",e.X_AXIS_CLICK="radar-x-axis-click",e.X_AXIS_MOUSEOUT="radar-x-axis-mouseout",e))(oc||{}),lc=(e=>(e.NODE_MOUSEOVER="tree-node-mouseover",e.NODE_CLICK="tree-node-click",e.NODE_MOUSEOUT="tree-node-mouseout",e))(lc||{}),cc=(e=>(e.LEAF_MOUSEOVER="leaf-mouseover",e.LEAF_MOUSEMOVE="leaf-mousemove",e.LEAF_CLICK="leaf-click",e.LEAF_MOUSEOUT="leaf-mouseout",e))(cc||{}),xr=(e=>(e.SHOW="show-tooltip",e.MOVE="move-tooltip",e.HIDE="hide-tooltip",e))(xr||{}),uc=(e=>(e.SHOW="show-threshold",e.HIDE="hide-threshold",e))(uc||{}),qp=(e=>(e.ITEM_HOVER="legend-item-onhover",e.ITEM_CLICK="legend-item-onclick",e.ITEM_MOUSEOUT="legend-item-onmouseout",e.ITEMS_UPDATE="legend-items-update",e))(qp||{}),Xp=(e=>(e.CIRCLE_MOUSEOVER="circle-leaf-mouseover",e.CIRCLE_CLICK="circle-leaf-click",e.CIRCLE_MOUSEOUT="circle-leaf-mouseout",e.CIRCLE_MOUSEMOVE="circle-leaf-mousemove",e))(Xp||{}),jp=(e=>(e.NODE_MOUSEOVER="alluvial-node-mouseover",e.NODE_CLICK="alluvial-node-click",e.NODE_MOUSEOUT="alluvial-node-mouseout",e.NODE_MOUSEMOVE="alluvial-node-mousemove",e.LINE_MOUSEOVER="alluvial-line-mouseover",e.LINE_CLICK="alluvial-line-click",e.LINE_MOUSEOUT="alluvial-line-mouseout",e.LINE_MOUSEMOVE="alluvial-line-mousemove",e))(jp||{}),Zp=(e=>(e.METER_MOUSEOVER="meter-mouseover",e.METER_CLICK="meter-click",e.METER_MOUSEOUT="meter-mouseout",e.METER_MOUSEMOVE="meter-mousemove",e))(Zp||{}),Kp=(e=>(e.HEATMAP_MOUSEOVER="heatmap-mouseover",e.HEATMAP_CLICK="heatmap-click",e.HEATMAP_MOUSEOUT="heatmap-mouseout",e.HEATMAP_MOUSEMOVE="hetmap-mousemove",e))(Kp||{}),br=(e=>(e.CHOROPLETH_MOUSEOVER="choropleth-mouseover",e.CHOROPLETH_CLICK="choropleth-click",e.CHOROPLETH_MOUSEOUT="choropleth-mouseout",e.CHOROPLETH_MOUSEMOVE="choropleth-mousemove",e))(br||{});const w=Object.freeze(Object.defineProperty({__proto__:null,Alluvial:jp,Area:Jl,Axis:Ql,Bar:rc,Boxplot:ic,CanvasZoom:Kl,Chart:Yl,Choropleth:br,CirclePack:Xp,Gauge:nc,Heatmap:Kp,Legend:qp,Line:ac,Meter:Zp,Modal:ql,Model:Xl,Pie:ec,Radar:oc,Scatter:sc,Threshold:uc,Toolbar:Yp,Tooltip:xr,Tree:lc,Treemap:cc,WordCloud:tc,ZoomBar:jl,ZoomDomain:Zl},Symbol.toStringTag,{value:"Module"}));var Z=(e=>(e.HTML="html",e.SVG="svg",e))(Z||{}),hc=(e=>(e.WHITE="white",e.G100="g100",e.G90="g90",e.G10="g10",e))(hc||{}),Q=(e=>(e.BACKGROUND="background",e.FILL="fill",e.STROKE="stroke",e.TOOLTIP="tooltip",e))(Q||{}),F=(e=>(e.LEFT="left",e.RIGHT="right",e.TOP="top",e.BOTTOM="bottom",e))(F||{}),Ae=(e=>(e.GRAPH_VIEW="graph_view",e.SLIDER_VIEW="slider_view",e))(Ae||{}),ve=(e=>(e.END_LINE="end_line",e.MID_LINE="mid_line",e.FRONT_LINE="front_line",e.NONE="none",e))(ve||{}),Nt=(e=>(e.VERTICAL="vertical",e.HORIZONTAL="horizontal",e))(Nt||{}),j=(e=>(e.TIME="time",e.LINEAR="linear",e.LOG="log",e.LABELS="labels",e.LABELS_RATIO="labels-ratio",e))(j||{}),Er=(e=>(e.RIGHT="right",e.LEFT="left",e.TOP="top",e.BOTTOM="bottom",e))(Er||{}),It=(e=>(e.LEFT="left",e.CENTER="center",e.RIGHT="right",e))(It||{}),Sr=(e=>(e.HORIZONTAL="horizontal",e.VERTICAL="vertical",e))(Sr||{}),ha=(e=>(e.TREE="tree",e.DENDROGRAM="dendrogram",e))(ha||{}),bt=(e=>(e.ROW="row",e.COLUMN="column",e.ROW_REVERSE="row-reverse",e.COLUMN_REVERSE="column-reverse",e))(bt||{}),nt=(e=>(e.FIXED="fixed",e.PREFERRED="preferred",e.STRETCH="stretch",e))(nt||{}),Vn=(e=>(e.CENTER="center",e))(Vn||{}),Ti=(e=>(e.LEFT="left",e.RIGHT="right",e))(Ti||{}),kt=(e=>(e.GRID="grid",e.VERT_OR_HORIZ="vertOrHoriz",e.PIE="pie",e.DONUT="donut",e))(kt||{}),Ue=(e=>(e.START="start",e.MIDDLE="middle",e.END="end",e))(Ue||{}),Be=(e=>(e.BASELINE="baseline",e.MIDDLE="middle",e.HANGING="hanging",e))(Be||{}),Gn=(e=>(e.SEMI="semi",e.FULL="full",e))(Gn||{}),da=(e=>(e.UP="up",e.DOWN="down",e))(da||{}),Mi=(e=>(e.SUCCESS="success",e.WARNING="warning",e.DANGER="danger",e))(Mi||{}),Ci=(e=>(e.ALWAYS="always",e.AUTO="auto",e.NEVER="never",e))(Ci||{}),le=(e=>(e.SCATTER="scatter",e.LINE="line",e.SIMPLE_BAR="simple-bar",e.STACKED_BAR="stacked-bar",e.GROUPED_BAR="grouped-bar",e.AREA="area",e.STACKED_AREA="stacked-area",e))(le||{}),Mt=(e=>(e.EXPORT_CSV="Export as CSV",e.EXPORT_PNG="Export as PNG",e.EXPORT_JPG="Export as JPG",e.ZOOM_IN="Zoom in",e.ZOOM_OUT="Zoom out",e.RESET_ZOOM="Reset zoom",e.MAKE_FULLSCREEN="Make fullscreen",e.SHOW_AS_DATATABLE="Show as data-table",e.CUSTOM="Custom",e))(Mt||{}),fa=(e=>(e.LEFT="left",e.RIGHT="right",e))(fa||{}),$t=(e=>(e.CHECKBOX="checkbox",e.RADIUS="radius",e.AREA="area",e.SIZE="size",e.LINE="line",e.QUARTILE="quartile",e.ZOOM="zoom",e))($t||{}),Ai=(e=>(e.LINEAR="linear",e.QUANTIZE="quantize",e))(Ai||{}),_r=(e=>(e.ON="on",e.AUTO="auto",e.OFF="off",e))(_r||{}),Di=(e=>(e.DEFAULT="default",e.HOVERABLE="hoverable",e))(Di||{}),Ve=(e=>(e.geoEqualEarth="geoEqualEarth",e.geoAlbers="geoAlbers",e.geoConicEqualArea="geoConicEqualArea",e.geoConicEquidistant="geoConicEquidistant",e.geoEquirectangular="geoEquirectangular",e.geoMercator="geoMercator",e.geoNaturalEarth1="geoNaturalEarth1",e))(Ve||{});const ee="cds",en={opacity:{unselected:.05,selected:.4}},fn={ticks:{number:7,rotateIfSmallerThan:30,verticalSpaceRatio:2.5,horizontalSpaceRatio:3.5},ratio:{reference:"value",compareTo:"marker"},paddingRatio:.1,hover:{rectanglePadding:4}},wr={duration:1e3,ease:Xu,zoomLevel:3},Or={circles:{fillOpacity:.3,hover:{stroke:"#FFF"}},padding:{mainGroup:4,children:2},hierarchyLevel:2},Qp={pairingOptions:{"1-color":4,"2-color":5,"3-color":5,"4-color":3,"5-color":2,"14-color":1}},ye={circle:{radius:4,opacity:{hovered:1,default:.3}},box:{opacity:{hovered:.5,default:.3}},strokeWidth:{default:1,thicker:2}},FD={defaultBins:10},At={items:{status:{ACTIVE:1,DISABLED:0},horizontalSpace:12,verticalSpace:24,textYOffset:8,spaceAfter:4},checkbox:{radius:6.5},radius:{iconData:[{cx:7,cy:7,r:6.5},{cx:7,cy:10,r:3.5}],fill:null,stroke:"#8c8c8c"},line:{yPosition:6,width:24,strokeWidth:1.4,fill:null,stroke:"#999999"},area:{width:24,height:14,fill:"#6f6f6f",stroke:null},size:{iconData:[{width:23,height:12},{width:13,height:6}],fill:null,stroke:"#8D8D8D"},quartile:{iconData:[{x:0,y:0,width:24,height:13},{x:11,y:4,width:1,height:4}]},zoom:{iconData:[{x:0,y:0,width:12,height:12}],color:"#8D8D8D"},color:{barWidth:300,barHeight:8,axisYTranslation:10}},nn={opacity:{unselected:.3,selected:1},weight:{selected:2,unselected:1}},Gt={statusBar:{paddingRight:5},status:{indicatorSize:16,paddingLeft:15},total:{paddingLeft:36,paddingRight:24},height:{default:8,proportional:16},dividerWidth:2},wt={radiusOffset:-15,innerRadius:2,padAngle:.007,hoverArc:{outerRadiusOffset:3},xOffset:30,yOffset:20,yOffsetCallout:10,callout:{minSliceDegree:5,offsetX:15,offsetY:12,horizontalLineLength:8,textMargin:2}},Hn={opacity:{unselected:.1,selected:.3},xLabelPadding:10,yLabelPadding:8,yTicksNumber:4,minRange:10,xAxisRectHeight:50,dotsRadius:5},De={nodeWidth:4,nodeHoveredWidth:8,minNodePadding:24,opacity:{unfocus:.3,default:.8,selected:1}},Jp={minCellDividerDimension:16,chartPadding:.5},tg={default:{size:24}},zD={horizontalOffset:10},eg={default:{duration:300},pie_slice_mouseover:{duration:100},pie_chart_titles:{duration:375},graph_element_mouseover_fill_update:{duration:100},graph_element_mouseout_fill_update:{duration:100}},ce={height:{[Ae.GRAPH_VIEW]:32,[Ae.SLIDER_VIEW]:10},spacerHeight:8,handleWidth:5,handleBarWidth:1,handleBarHeight:12},WD=[{type:$t.RADIUS,name:"Radius"},{type:$t.AREA,name:"Poor area"},{type:$t.AREA,name:"Satisfactory area"},{type:$t.AREA,name:"Great area"},{type:$t.QUARTILE,name:"Quartiles"}];function YD(e,t,n){let r=null;return function(...i){const s=this;s.mousePosition=Sn(i[0],n),clearTimeout(r),r=setTimeout(function(){e.apply(s,i)},t)}}function Ct(e,t){var i;const n=tn(e),r=Object.keys(t.axes||{});(i=t==null?void 0:t.toolbar)!=null&&i.controls&&delete n.toolbar.controls,r.length===0&&delete n.axes;for(const s in n.axes)if(r.includes(s)){const a=t.axes[s];(a.primary||a.secondary)&&console.warn("`primary` & `secondary` are no longer needed for axis configurations. Read more here https://carbon-design-system.github.io/carbon-charts/?path=/story/docs-tutorials--tabular-data-format");const o=a.mapsTo;if(o==null){const l=a.scaleType;l==null?a.mapsTo="value":l===j.TIME?a.mapsTo="date":l===j.LABELS&&(a.mapsTo="key")}}else delete n.axes[s];return dc(n,t),tt(n,t)}function rn(e){if(!e)return;const t=/translate\([0-9]+\.?[0-9]*,[0-9]+\.?[0-9]*\)/,n=e.getAttribute("transform").match(t);if(!n)return null;if(n[0]){const r=n[0].replace(/translate\(/,"").replace(/\)/,"").split(",");return{tx:r[0],ty:r[1]}}return null}function Li(e){const n=/\(([^)]+)\)/.exec(e);if(n&&n.length>1){const r=n[1].split(",");if(r.length>1)return{x:parseFloat(r[0]),y:parseFloat(r[1])}}return{x:0,y:0}}function ng(e,t,n="value"){const r=e/t.reduce((i,s)=>i+s[n],0)*100;return r%1!==0?parseFloat(r.toFixed(1)):r}function Ri(e,t,n){if(n>e.length)return e;if(t===ve.MID_LINE)return e.substr(0,n/2)+"..."+e.substr(-n/2);if(t===ve.FRONT_LINE)return"..."+e.substr(-n);if(t===ve.END_LINE)return e.substr(0,n)+"..."}function dc(e,t){const n=x(e,"legend","additionalItems"),r=x(t,"legend","additionalItems");if(n&&r){const i=r.map(o=>o.type),s=n.map(o=>o.type),a=WD.filter(o=>s.includes(o.type)&&!i.includes(o.type));e.legend.additionalItems=a,t.legend.additionalItems=HD(a,r,"name")}}const x=(e,...t)=>{let n=e;if(n){for(const r of t)if(n[r]!==null&&n[r]!==void 0)n=n[r];else return null;return n}return null},rg=(e,t)=>t===Nt.HORIZONTAL?{y0:e.x0,y1:e.x1,x0:e.y0,x1:e.y1}:e,jt=(e,t)=>{const{x0:n,x1:r,y0:i,y1:s}=rg(e,t);return`M${n},${i}L${n},${s}L${r},${s}L${r},${i}L${n},${i}`};function sn(e,t,n){return n===Nt.VERTICAL?[e,t]:[t,e]}function fc(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth,r=e.formats[n]||e.formats[e.defaultWidth];return r}}function Ii(e){return function(t,n){var r=n!=null&&n.context?String(n.context):"standalone",i;if(r==="formatting"&&e.formattingValues){var s=e.defaultFormattingWidth||e.defaultWidth,a=n!=null&&n.width?String(n.width):s;i=e.formattingValues[a]||e.formattingValues[s]}else{var o=e.defaultWidth,l=n!=null&&n.width?String(n.width):e.defaultWidth;i=e.values[l]||e.values[o]}var c=e.argumentCallback?e.argumentCallback(t):t;return i[c]}}function ki(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],s=t.match(i);if(!s)return null;var a=s[0],o=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(o)?XD(o,function(d){return d.test(a)}):qD(o,function(d){return d.test(a)}),c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;var u=t.slice(a.length);return{value:c,rest:u}}}function qD(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n}function XD(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return n}function jD(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.match(e.matchPattern);if(!r)return null;var i=r[0],s=t.match(e.parsePattern);if(!s)return null;var a=e.valueCallback?e.valueCallback(s[0]):s[0];a=n.valueCallback?n.valueCallback(a):a;var o=t.slice(i.length);return{value:a,rest:o}}}function pa(e){"@babel/helpers - typeof";return pa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pa(e)}function Ut(e){if(e===null||e===!0||e===!1)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function it(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function dt(e){it(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||pa(e)==="object"&&t==="[object Date]"?new Date(e.getTime()):typeof e=="number"||t==="[object Number]"?new Date(e):((typeof e=="string"||t==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function ig(e,t){it(2,arguments);var n=dt(e),r=Ut(t);return isNaN(r)?new Date(NaN):(r&&n.setDate(n.getDate()+r),n)}function pc(e,t){it(2,arguments);var n=dt(e),r=Ut(t);if(isNaN(r))return new Date(NaN);if(!r)return n;var i=n.getDate(),s=new Date(n.getTime());s.setMonth(n.getMonth()+r+1,0);var a=s.getDate();return i>=a?s:(n.setFullYear(s.getFullYear(),s.getMonth(),i),n)}function ga(e,t){it(2,arguments);var n=dt(e).getTime(),r=Ut(t);return new Date(n+r)}var ZD=36e5;function sg(e,t){it(2,arguments);var n=Ut(t);return ga(e,n*ZD)}var KD={};function ma(){return KD}function gc(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}function ag(e){it(1,arguments);var t=dt(e);return t.setHours(0,0,0,0),t}var QD=864e5;function JD(e,t){it(2,arguments);var n=ag(e),r=ag(t),i=n.getTime()-gc(n),s=r.getTime()-gc(r);return Math.round((i-s)/QD)}var tL=6e4;function mc(e,t){it(2,arguments);var n=Ut(t);return ga(e,n*tL)}function vc(e,t){it(2,arguments);var n=Ut(t);return ga(e,n*1e3)}function og(e,t){it(2,arguments);var n=Ut(t);return pc(e,n*12)}function $i(e,t){it(2,arguments);var n=dt(e),r=dt(t),i=n.getTime()-r.getTime();return i<0?-1:i>0?1:i}var eL=6e4,nL=36e5;function rL(e){return it(1,arguments),e instanceof Date||pa(e)==="object"&&Object.prototype.toString.call(e)==="[object Date]"}function iL(e){if(it(1,arguments),!rL(e)&&typeof e!="number")return!1;var t=dt(e);return!isNaN(Number(t))}function sL(e,t){it(2,arguments);var n=dt(e),r=dt(t),i=n.getFullYear()-r.getFullYear(),s=n.getMonth()-r.getMonth();return i*12+s}function aL(e,t){it(2,arguments);var n=dt(e),r=dt(t);return n.getFullYear()-r.getFullYear()}function lg(e,t){var n=e.getFullYear()-t.getFullYear()||e.getMonth()-t.getMonth()||e.getDate()-t.getDate()||e.getHours()-t.getHours()||e.getMinutes()-t.getMinutes()||e.getSeconds()-t.getSeconds()||e.getMilliseconds()-t.getMilliseconds();return n<0?-1:n>0?1:n}function oL(e,t){it(2,arguments);var n=dt(e),r=dt(t),i=lg(n,r),s=Math.abs(JD(n,r));n.setDate(n.getDate()-i*s);var a=+(lg(n,r)===-i),o=i*(s-a);return o===0?0:o}function yc(e,t){return it(2,arguments),dt(e).getTime()-dt(t).getTime()}var cg={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(t){return t<0?Math.ceil(t):Math.floor(t)}},lL="trunc";function xc(e){return e?cg[e]:cg[lL]}function cL(e,t,n){it(2,arguments);var r=yc(e,t)/nL;return xc(n==null?void 0:n.roundingMethod)(r)}function ug(e,t,n){it(2,arguments);var r=yc(e,t)/eL;return xc(n==null?void 0:n.roundingMethod)(r)}function uL(e){it(1,arguments);var t=dt(e);return t.setHours(23,59,59,999),t}function hL(e){it(1,arguments);var t=dt(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}function dL(e){it(1,arguments);var t=dt(e);return uL(t).getTime()===hL(t).getTime()}function fL(e,t){it(2,arguments);var n=dt(e),r=dt(t),i=$i(n,r),s=Math.abs(sL(n,r)),a;if(s<1)a=0;else{n.getMonth()===1&&n.getDate()>27&&n.setDate(30),n.setMonth(n.getMonth()-i*s);var o=$i(n,r)===-i;dL(dt(e))&&s===1&&$i(e,r)===1&&(o=!1),a=i*(s-Number(o))}return a===0?0:a}function hg(e,t,n){it(2,arguments);var r=yc(e,t)/1e3;return xc(n==null?void 0:n.roundingMethod)(r)}function pL(e,t){it(2,arguments);var n=dt(e),r=dt(t),i=$i(n,r),s=Math.abs(aL(n,r));n.setFullYear(1584),r.setFullYear(1584);var a=$i(n,r)===-i,o=i*(s-Number(a));return o===0?0:o}function gL(e,t){it(2,arguments);var n=Ut(t);return ga(e,-n)}var mL=864e5;function vL(e){it(1,arguments);var t=dt(e),n=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var r=t.getTime(),i=n-r;return Math.floor(i/mL)+1}function va(e){it(1,arguments);var t=1,n=dt(e),r=n.getUTCDay(),i=(r<t?7:0)+r-t;return n.setUTCDate(n.getUTCDate()-i),n.setUTCHours(0,0,0,0),n}function dg(e){it(1,arguments);var t=dt(e),n=t.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(n+1,0,4),r.setUTCHours(0,0,0,0);var i=va(r),s=new Date(0);s.setUTCFullYear(n,0,4),s.setUTCHours(0,0,0,0);var a=va(s);return t.getTime()>=i.getTime()?n+1:t.getTime()>=a.getTime()?n:n-1}function yL(e){it(1,arguments);var t=dg(e),n=new Date(0);n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0);var r=va(n);return r}var xL=6048e5;function bL(e){it(1,arguments);var t=dt(e),n=va(t).getTime()-yL(t).getTime();return Math.round(n/xL)+1}function ya(e,t){var n,r,i,s,a,o,l,c;it(1,arguments);var u=ma(),d=Ut((n=(r=(i=(s=t==null?void 0:t.weekStartsOn)!==null&&s!==void 0?s:t==null||(a=t.locale)===null||a===void 0||(o=a.options)===null||o===void 0?void 0:o.weekStartsOn)!==null&&i!==void 0?i:u.weekStartsOn)!==null&&r!==void 0?r:(l=u.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&n!==void 0?n:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=dt(e),f=h.getUTCDay(),p=(f<d?7:0)+f-d;return h.setUTCDate(h.getUTCDate()-p),h.setUTCHours(0,0,0,0),h}function fg(e,t){var n,r,i,s,a,o,l,c;it(1,arguments);var u=dt(e),d=u.getUTCFullYear(),h=ma(),f=Ut((n=(r=(i=(s=t==null?void 0:t.firstWeekContainsDate)!==null&&s!==void 0?s:t==null||(a=t.locale)===null||a===void 0||(o=a.options)===null||o===void 0?void 0:o.firstWeekContainsDate)!==null&&i!==void 0?i:h.firstWeekContainsDate)!==null&&r!==void 0?r:(l=h.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&n!==void 0?n:1);if(!(f>=1&&f<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var p=new Date(0);p.setUTCFullYear(d+1,0,f),p.setUTCHours(0,0,0,0);var g=ya(p,t),v=new Date(0);v.setUTCFullYear(d,0,f),v.setUTCHours(0,0,0,0);var m=ya(v,t);return u.getTime()>=g.getTime()?d+1:u.getTime()>=m.getTime()?d:d-1}function EL(e,t){var n,r,i,s,a,o,l,c;it(1,arguments);var u=ma(),d=Ut((n=(r=(i=(s=t==null?void 0:t.firstWeekContainsDate)!==null&&s!==void 0?s:t==null||(a=t.locale)===null||a===void 0||(o=a.options)===null||o===void 0?void 0:o.firstWeekContainsDate)!==null&&i!==void 0?i:u.firstWeekContainsDate)!==null&&r!==void 0?r:(l=u.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&n!==void 0?n:1),h=fg(e,t),f=new Date(0);f.setUTCFullYear(h,0,d),f.setUTCHours(0,0,0,0);var p=ya(f,t);return p}var SL=6048e5;function _L(e,t){it(1,arguments);var n=dt(e),r=ya(n,t).getTime()-EL(n,t).getTime();return Math.round(r/SL)+1}function vt(e,t){for(var n=e<0?"-":"",r=Math.abs(e).toString();r.length<t;)r="0"+r;return n+r}var wL={y:function(t,n){var r=t.getUTCFullYear(),i=r>0?r:1-r;return vt(n==="yy"?i%100:i,n.length)},M:function(t,n){var r=t.getUTCMonth();return n==="M"?String(r+1):vt(r+1,2)},d:function(t,n){return vt(t.getUTCDate(),n.length)},a:function(t,n){var r=t.getUTCHours()/12>=1?"pm":"am";switch(n){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];case"aaaa":default:return r==="am"?"a.m.":"p.m."}},h:function(t,n){return vt(t.getUTCHours()%12||12,n.length)},H:function(t,n){return vt(t.getUTCHours(),n.length)},m:function(t,n){return vt(t.getUTCMinutes(),n.length)},s:function(t,n){return vt(t.getUTCSeconds(),n.length)},S:function(t,n){var r=n.length,i=t.getUTCMilliseconds(),s=Math.floor(i*Math.pow(10,r-3));return vt(s,n.length)}};const pn=wL;var Tr={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},OL={G:function(t,n,r){var i=t.getUTCFullYear()>0?1:0;switch(n){case"G":case"GG":case"GGG":return r.era(i,{width:"abbreviated"});case"GGGGG":return r.era(i,{width:"narrow"});case"GGGG":default:return r.era(i,{width:"wide"})}},y:function(t,n,r){if(n==="yo"){var i=t.getUTCFullYear(),s=i>0?i:1-i;return r.ordinalNumber(s,{unit:"year"})}return pn.y(t,n)},Y:function(t,n,r,i){var s=fg(t,i),a=s>0?s:1-s;if(n==="YY"){var o=a%100;return vt(o,2)}return n==="Yo"?r.ordinalNumber(a,{unit:"year"}):vt(a,n.length)},R:function(t,n){var r=dg(t);return vt(r,n.length)},u:function(t,n){var r=t.getUTCFullYear();return vt(r,n.length)},Q:function(t,n,r){var i=Math.ceil((t.getUTCMonth()+1)/3);switch(n){case"Q":return String(i);case"QQ":return vt(i,2);case"Qo":return r.ordinalNumber(i,{unit:"quarter"});case"QQQ":return r.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(i,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(i,{width:"wide",context:"formatting"})}},q:function(t,n,r){var i=Math.ceil((t.getUTCMonth()+1)/3);switch(n){case"q":return String(i);case"qq":return vt(i,2);case"qo":return r.ordinalNumber(i,{unit:"quarter"});case"qqq":return r.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(i,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(i,{width:"wide",context:"standalone"})}},M:function(t,n,r){var i=t.getUTCMonth();switch(n){case"M":case"MM":return pn.M(t,n);case"Mo":return r.ordinalNumber(i+1,{unit:"month"});case"MMM":return r.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(i,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(i,{width:"wide",context:"formatting"})}},L:function(t,n,r){var i=t.getUTCMonth();switch(n){case"L":return String(i+1);case"LL":return vt(i+1,2);case"Lo":return r.ordinalNumber(i+1,{unit:"month"});case"LLL":return r.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(i,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(i,{width:"wide",context:"standalone"})}},w:function(t,n,r,i){var s=_L(t,i);return n==="wo"?r.ordinalNumber(s,{unit:"week"}):vt(s,n.length)},I:function(t,n,r){var i=bL(t);return n==="Io"?r.ordinalNumber(i,{unit:"week"}):vt(i,n.length)},d:function(t,n,r){return n==="do"?r.ordinalNumber(t.getUTCDate(),{unit:"date"}):pn.d(t,n)},D:function(t,n,r){var i=vL(t);return n==="Do"?r.ordinalNumber(i,{unit:"dayOfYear"}):vt(i,n.length)},E:function(t,n,r){var i=t.getUTCDay();switch(n){case"E":case"EE":case"EEE":return r.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(i,{width:"short",context:"formatting"});case"EEEE":default:return r.day(i,{width:"wide",context:"formatting"})}},e:function(t,n,r,i){var s=t.getUTCDay(),a=(s-i.weekStartsOn+8)%7||7;switch(n){case"e":return String(a);case"ee":return vt(a,2);case"eo":return r.ordinalNumber(a,{unit:"day"});case"eee":return r.day(s,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(s,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(s,{width:"short",context:"formatting"});case"eeee":default:return r.day(s,{width:"wide",context:"formatting"})}},c:function(t,n,r,i){var s=t.getUTCDay(),a=(s-i.weekStartsOn+8)%7||7;switch(n){case"c":return String(a);case"cc":return vt(a,n.length);case"co":return r.ordinalNumber(a,{unit:"day"});case"ccc":return r.day(s,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(s,{width:"narrow",context:"standalone"});case"cccccc":return r.day(s,{width:"short",context:"standalone"});case"cccc":default:return r.day(s,{width:"wide",context:"standalone"})}},i:function(t,n,r){var i=t.getUTCDay(),s=i===0?7:i;switch(n){case"i":return String(s);case"ii":return vt(s,n.length);case"io":return r.ordinalNumber(s,{unit:"day"});case"iii":return r.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(i,{width:"short",context:"formatting"});case"iiii":default:return r.day(i,{width:"wide",context:"formatting"})}},a:function(t,n,r){var i=t.getUTCHours(),s=i/12>=1?"pm":"am";switch(n){case"a":case"aa":return r.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(s,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(s,{width:"wide",context:"formatting"})}},b:function(t,n,r){var i=t.getUTCHours(),s;switch(i===12?s=Tr.noon:i===0?s=Tr.midnight:s=i/12>=1?"pm":"am",n){case"b":case"bb":return r.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(s,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(s,{width:"wide",context:"formatting"})}},B:function(t,n,r){var i=t.getUTCHours(),s;switch(i>=17?s=Tr.evening:i>=12?s=Tr.afternoon:i>=4?s=Tr.morning:s=Tr.night,n){case"B":case"BB":case"BBB":return r.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(s,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(s,{width:"wide",context:"formatting"})}},h:function(t,n,r){if(n==="ho"){var i=t.getUTCHours()%12;return i===0&&(i=12),r.ordinalNumber(i,{unit:"hour"})}return pn.h(t,n)},H:function(t,n,r){return n==="Ho"?r.ordinalNumber(t.getUTCHours(),{unit:"hour"}):pn.H(t,n)},K:function(t,n,r){var i=t.getUTCHours()%12;return n==="Ko"?r.ordinalNumber(i,{unit:"hour"}):vt(i,n.length)},k:function(t,n,r){var i=t.getUTCHours();return i===0&&(i=24),n==="ko"?r.ordinalNumber(i,{unit:"hour"}):vt(i,n.length)},m:function(t,n,r){return n==="mo"?r.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):pn.m(t,n)},s:function(t,n,r){return n==="so"?r.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):pn.s(t,n)},S:function(t,n){return pn.S(t,n)},X:function(t,n,r,i){var s=i._originalDate||t,a=s.getTimezoneOffset();if(a===0)return"Z";switch(n){case"X":return gg(a);case"XXXX":case"XX":return Fn(a);case"XXXXX":case"XXX":default:return Fn(a,":")}},x:function(t,n,r,i){var s=i._originalDate||t,a=s.getTimezoneOffset();switch(n){case"x":return gg(a);case"xxxx":case"xx":return Fn(a);case"xxxxx":case"xxx":default:return Fn(a,":")}},O:function(t,n,r,i){var s=i._originalDate||t,a=s.getTimezoneOffset();switch(n){case"O":case"OO":case"OOO":return"GMT"+pg(a,":");case"OOOO":default:return"GMT"+Fn(a,":")}},z:function(t,n,r,i){var s=i._originalDate||t,a=s.getTimezoneOffset();switch(n){case"z":case"zz":case"zzz":return"GMT"+pg(a,":");case"zzzz":default:return"GMT"+Fn(a,":")}},t:function(t,n,r,i){var s=i._originalDate||t,a=Math.floor(s.getTime()/1e3);return vt(a,n.length)},T:function(t,n,r,i){var s=i._originalDate||t,a=s.getTime();return vt(a,n.length)}};function pg(e,t){var n=e>0?"-":"+",r=Math.abs(e),i=Math.floor(r/60),s=r%60;if(s===0)return n+String(i);var a=t||"";return n+String(i)+a+vt(s,2)}function gg(e,t){if(e%60===0){var n=e>0?"-":"+";return n+vt(Math.abs(e)/60,2)}return Fn(e,t)}function Fn(e,t){var n=t||"",r=e>0?"-":"+",i=Math.abs(e),s=vt(Math.floor(i/60),2),a=vt(i%60,2);return r+s+n+a}const TL=OL;var mg=function(t,n){switch(t){case"P":return n.date({width:"short"});case"PP":return n.date({width:"medium"});case"PPP":return n.date({width:"long"});case"PPPP":default:return n.date({width:"full"})}},vg=function(t,n){switch(t){case"p":return n.time({width:"short"});case"pp":return n.time({width:"medium"});case"ppp":return n.time({width:"long"});case"pppp":default:return n.time({width:"full"})}},ML=function(t,n){var r=t.match(/(P+)(p+)?/)||[],i=r[1],s=r[2];if(!s)return mg(t,n);var a;switch(i){case"P":a=n.dateTime({width:"short"});break;case"PP":a=n.dateTime({width:"medium"});break;case"PPP":a=n.dateTime({width:"long"});break;case"PPPP":default:a=n.dateTime({width:"full"});break}return a.replace("{{date}}",mg(i,n)).replace("{{time}}",vg(s,n))},CL={p:vg,P:ML};const AL=CL;var DL=["D","DD"],LL=["YY","YYYY"];function RL(e){return DL.indexOf(e)!==-1}function IL(e){return LL.indexOf(e)!==-1}function yg(e,t,n){if(e==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var kL={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},$L=function(t,n,r){var i,s=kL[t];return typeof s=="string"?i=s:n===1?i=s.one:i=s.other.replace("{{count}}",n.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"in "+i:i+" ago":i};const PL=$L;var NL={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},UL={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},BL={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},VL={date:fc({formats:NL,defaultWidth:"full"}),time:fc({formats:UL,defaultWidth:"full"}),dateTime:fc({formats:BL,defaultWidth:"full"})};const GL=VL;var HL={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},FL=function(t,n,r,i){return HL[t]};const zL=FL;var WL={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},YL={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},qL={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},XL={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},jL={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},ZL={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},KL=function(t,n){var r=Number(t),i=r%100;if(i>20||i<10)switch(i%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},QL={ordinalNumber:KL,era:Ii({values:WL,defaultWidth:"wide"}),quarter:Ii({values:YL,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:Ii({values:qL,defaultWidth:"wide"}),day:Ii({values:XL,defaultWidth:"wide"}),dayPeriod:Ii({values:jL,defaultWidth:"wide",formattingValues:ZL,defaultFormattingWidth:"wide"})};const JL=QL;var tR=/^(\d+)(th|st|nd|rd)?/i,eR=/\d+/i,nR={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},rR={any:[/^b/i,/^(a|c)/i]},iR={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},sR={any:[/1/i,/2/i,/3/i,/4/i]},aR={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},oR={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},lR={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},cR={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},uR={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},hR={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},dR={ordinalNumber:jD({matchPattern:tR,parsePattern:eR,valueCallback:function(t){return parseInt(t,10)}}),era:ki({matchPatterns:nR,defaultMatchWidth:"wide",parsePatterns:rR,defaultParseWidth:"any"}),quarter:ki({matchPatterns:iR,defaultMatchWidth:"wide",parsePatterns:sR,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:ki({matchPatterns:aR,defaultMatchWidth:"wide",parsePatterns:oR,defaultParseWidth:"any"}),day:ki({matchPatterns:lR,defaultMatchWidth:"wide",parsePatterns:cR,defaultParseWidth:"any"}),dayPeriod:ki({matchPatterns:uR,defaultMatchWidth:"any",parsePatterns:hR,defaultParseWidth:"any"})},fR={code:"en-US",formatDistance:PL,formatLong:GL,formatRelative:zL,localize:JL,match:dR,options:{weekStartsOn:0,firstWeekContainsDate:1}};const xg=fR;var pR=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,gR=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,mR=/^'([^]*?)'?$/,vR=/''/g,yR=/[a-zA-Z]/;function Mr(e,t,n){var r,i,s,a,o,l,c,u,d,h,f,p,g,v,m,y,b,S;it(2,arguments);var _=String(t),E=ma(),M=(r=(i=n==null?void 0:n.locale)!==null&&i!==void 0?i:E.locale)!==null&&r!==void 0?r:xg,C=Ut((s=(a=(o=(l=n==null?void 0:n.firstWeekContainsDate)!==null&&l!==void 0?l:n==null||(c=n.locale)===null||c===void 0||(u=c.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&o!==void 0?o:E.firstWeekContainsDate)!==null&&a!==void 0?a:(d=E.locale)===null||d===void 0||(h=d.options)===null||h===void 0?void 0:h.firstWeekContainsDate)!==null&&s!==void 0?s:1);if(!(C>=1&&C<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var G=Ut((f=(p=(g=(v=n==null?void 0:n.weekStartsOn)!==null&&v!==void 0?v:n==null||(m=n.locale)===null||m===void 0||(y=m.options)===null||y===void 0?void 0:y.weekStartsOn)!==null&&g!==void 0?g:E.weekStartsOn)!==null&&p!==void 0?p:(b=E.locale)===null||b===void 0||(S=b.options)===null||S===void 0?void 0:S.weekStartsOn)!==null&&f!==void 0?f:0);if(!(G>=0&&G<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!M.localize)throw new RangeError("locale must contain localize property");if(!M.formatLong)throw new RangeError("locale must contain formatLong property");var I=dt(e);if(!iL(I))throw new RangeError("Invalid time value");var T=gc(I),L=gL(I,T),R={firstWeekContainsDate:C,weekStartsOn:G,locale:M,_originalDate:I},k=_.match(gR).map(function(O){var U=O[0];if(U==="p"||U==="P"){var P=AL[U];return P(O,M.formatLong)}return O}).join("").match(pR).map(function(O){if(O==="''")return"'";var U=O[0];if(U==="'")return xR(O);var P=TL[U];if(P)return!(n!=null&&n.useAdditionalWeekYearTokens)&&IL(O)&&yg(O,t,String(e)),!(n!=null&&n.useAdditionalDayOfYearTokens)&&RL(O)&&yg(O,t,String(e)),P(L,O,M.localize,R);if(U.match(yR))throw new RangeError("Format string contains an unescaped latin alphabet character `"+U+"`");return O}).join("");return k}function xR(e){var t=e.match(mR);return t?t[1].replace(vR,"'"):e}function bR(e,t){it(2,arguments);var n=Ut(t);return ig(e,-n)}function ER(e,t){it(2,arguments);var n=Ut(t);return pc(e,-n)}function SR(e,t){it(2,arguments);var n=Ut(t);return sg(e,-n)}function bg(e,t){it(2,arguments);var n=Ut(t);return mc(e,-n)}function Eg(e,t){it(2,arguments);var n=Ut(t);return vc(e,-n)}function _R(e,t){it(2,arguments);var n=Ut(t);return og(e,-n)}const Cr={type:ve.END_LINE,threshold:16,numCharacter:14},wR={enabled:!0,position:Er.BOTTOM,clickable:!0,truncation:Cr,alignment:It.LEFT,order:null,additionalItems:[]},OR={x:{enabled:!0,numberOfTicks:15,alignWithAxisTicks:!1},y:{enabled:!0,numberOfTicks:5,alignWithAxisTicks:!1}},TR={enabled:!0},Sg={enabled:!0,showTotal:!0,truncation:Cr,groupLabel:"Group"},_g={top:{visible:!0,includeZero:!0,truncation:Cr},bottom:{visible:!0,includeZero:!0,truncation:Cr},left:{visible:!0,includeZero:!0,truncation:Cr},right:{visible:!0,includeZero:!0,truncation:Cr}},xa={addSpaceOnEdges:1,showDayName:!1,localeObject:xg,timeIntervalFormats:{"15seconds":{primary:"MMM d, pp",secondary:"pp"},minute:{primary:"MMM d, p",secondary:"p"},"30minutes":{primary:"MMM d, p",secondary:"p"},hourly:{primary:"MMM d, hh a",secondary:"hh a"},daily:{primary:"MMM d",secondary:"d"},weekly:{primary:"eee, MMM d",secondary:"eee"},monthly:{primary:"MMM yyyy",secondary:"MMM"},quarterly:{primary:"QQQ ''yy",secondary:"QQQ"},yearly:{primary:"yyyy",secondary:"yyyy"}}},MR=typeof document<"u"&&(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled),qt={width:null,height:null,resizable:!0,theme:hc.WHITE,tooltip:Sg,legend:wR,style:{prefix:"cc"},data:{groupMapsTo:"group",loading:!1,selectedGroups:[]},color:{scale:null,pairing:{numberOfVariants:null,option:1},gradient:{enabled:!1}},toolbar:{enabled:!0,numberOfIcons:3,controls:[{type:Mt.SHOW_AS_DATATABLE},...MR?[{type:Mt.MAKE_FULLSCREEN}]:[],{type:Mt.EXPORT_CSV},{type:Mt.EXPORT_PNG},{type:Mt.EXPORT_JPG}]}},wg=tt({},qt,{thematic:{projection:Ve.geoNaturalEarth1}}),Pi=tt({},qt,{axes:_g,timeScale:xa,grid:OR,ruler:TR,zoomBar:{zoomRatio:.4,minZoomRatio:.01,top:{enabled:!1,type:Ae.GRAPH_VIEW}}}),zn=tt({},Pi,{bars:{maxWidth:16,spacingFactor:.25},timeScale:tt(xa,{addSpaceOnEdges:1})}),CR=tt({},zn,{}),AR=tt({},zn,{}),DR=tt({},zn,{bars:tt({},zn.bars,{dividerSize:1.5})}),LR=tt({},zn,{}),bc=tt({},Pi,{points:{radius:4,fillOpacity:.3,filled:!0,enabled:!0}}),RR=bc,Og=tt({},bc,{points:{radius:3,filled:!1,enabled:!0}}),Tg=tt({},Og,{timeScale:tt(xa,{addSpaceOnEdges:0})}),IR=Tg,kR=tt({},Pi,{bubble:{radiusMapsTo:"radius",radiusLabel:"Radius",radiusRange:e=>{const t=Math.min(e.width,e.height);return[t*3/400,t*25/400]},fillOpacity:.2,enabled:!0},points:{filled:!0},legend:{additionalItems:[{type:$t.RADIUS,name:"Radius"}]}}),$R=tt({},Pi,{bullet:{performanceAreaTitles:["Poor","Satisfactory","Great"]},grid:{x:{enabled:!1},y:{enabled:!1}},legend:{additionalItems:[{type:$t.AREA,name:"Poor area"},{type:$t.AREA,name:"Satisfactory area"},{type:$t.AREA,name:"Great area"},{type:$t.QUARTILE,name:"Quartiles"}]}}),PR=tt({},zn,{bars:{dividerSize:1.5},timeScale:tt(xa,{addSpaceOnEdges:0})}),NR=tt({},qt,{tooltip:tt({},Sg,{wordLabel:"Word",valueLabel:"Value"}),wordCloud:{fontSizeMapsTo:"value",fontSizeRange:e=>{const t=Math.min(e.width,e.height);return[t*20/400,t*75/400]},wordMapsTo:"word"}}),Mg=tt({},qt,{pie:{labels:{formatter:null,enabled:!0},alignment:It.LEFT,sortFunction:null,valueMapsTo:"value"}}),UR=tt({},qt,{legend:{enabled:!1},gauge:{type:Gn.SEMI,arcWidth:16,deltaArrow:{size:e=>e/8,enabled:!0},showPercentageSymbol:!0,status:null,numberSpacing:10,deltaFontSize:e=>e/8,valueFontSize:e=>e/2.5,numberFormatter:e=>Number(e.toFixed(2))%1!==0?e.toFixed(2).toLocaleString():e.toFixed().toLocaleString(),alignment:It.LEFT}}),BR=tt({},Mg,{donut:{center:{numberFontSize:e=>`${Math.min(e/100*24,24)}px`,titleFontSize:e=>`${Math.min(e/100*15,15)}px`,titleYPosition:e=>Math.min(e/80*20,20),numberFormatter:e=>Math.floor(e).toLocaleString()},alignment:It.LEFT}}),Cg=tt({},qt,{legend:{enabled:!1,clickable:!1},meter:{showLabels:!0,proportional:null,statusBar:{percentageIndicator:{enabled:!0}}}}),VR=tt({},Cg,{legend:{enabled:!0}}),GR=tt({},qt,{radar:{axes:{angle:"key",value:"value"},alignment:It.LEFT},tooltip:{gridline:{enabled:!0},valueFormatter:e=>e??"N/A"}}),HR=tt({},zn,{comboChartTypes:[]}),FR=tt({tree:{type:ha.TREE}},qt,{}),zR=tt({},qt,{data:tt(qt.data,{groupMapsTo:"name"})}),WR=tt({},qt,Or,{data:tt(qt.data,{groupMapsTo:"name"})}),YR=tt({},qt,{alluvial:{data:tt(qt.data,{groupMapsTo:"source"}),nodeAlignment:It.CENTER,nodePadding:24,monochrome:!1,nodes:[]}}),qR=tt({},qt,{axes:_g,heatmap:{divider:{state:_r.AUTO},colorLegend:{type:"linear"}}}),XR=tt({},wg,{choropleth:{colorLegend:{type:"linear"}}}),Et={alluvialChart:YR,areaChart:Tg,axisChart:Pi,boxplotChart:LR,bubbleChart:kR,bulletChart:$R,chart:qt,circlePackChart:WR,choroplethChart:XR,comboChart:HR,donutChart:BR,gaugeChart:UR,groupedBarChart:AR,heatmapChart:qR,histogramChart:PR,lineChart:Og,lollipopChart:RR,meterChart:Cg,pieChart:Mg,proportionalMeterChart:VR,radarChart:GR,scatterChart:bc,simpleBarChart:CR,stackedAreaChart:IR,stackedBarChart:DR,thematicChart:wg,treeChart:FR,treemapChart:zR,wordCloudChart:NR};var Ag=(e=>(e["15seconds"]="15seconds",e.minute="minute",e["30minutes"]="30minutes",e.hourly="hourly",e.daily="daily",e.weekly="weekly",e.monthly="monthly",e.quarterly="quarterly",e.yearly="yearly",e))(Ag||{});const Ec=[["15seconds",15*1e3],["minute",60*1e3],["30minutes",30*60*1e3],["hourly",60*60*1e3],["daily",24*60*60*1e3],["monthly",30*24*60*60*1e3],["quarterly",3*30*24*60*60*1e3],["yearly",12*30*24*60*60*1e3]];function Dg(e,t,n,r,i){const s=t===0,a=Number(Mr(new Date(e),"c"))===2,o=Number(Mr(new Date(e),"q"))===1,l=t!==0?n[t-1]:null;switch(r){case"15seconds":return s||Ea(e)||Ni(e,l)||gn(e);case"minute":return s||Ea(e)||Ni(e,l)||gn(e);case"30minutes":return s||Ea(e)||Ni(e,l)||gn(e);case"hourly":return s||Ea(e)||Ni(e,l)||gn(e);case"daily":return i?s||a||gn(e):s||Ni(e,l)||gn(e);case"weekly":return s||a||gn(e);case"monthly":return s||gn(e);case"quarterly":return s||o;case"yearly":return!1;default:throw new Error(`${r} is not a valid time interval.`)}}function Sc(e,t,n,r,i){const s=i.showDayName,a=r==="daily"&&s?"weekly":r,o=new Date(e),l=x(i,"timeIntervalFormats")[a],c=x(l,"primary"),u=x(l,"secondary");let d=Dg(e,t,n,r,s)?c:u;r==="15seconds"&&o.getMilliseconds()!==0&&(d=d.replace("pp","h:mm:ss.SSS a"));const h=i.localeObject;return Mr(o,d,{locale:h})}function ba(e){const t=new Date(e);return{M:t.getMonth()+1,d:t.getDate(),H:t.getHours(),m:t.getMinutes(),s:t.getSeconds()}}function jR(e){if(e)return e.slice(1).map((t,n)=>t-e[n])}function ZR(e){const t=Ec.reduce((n,[,r],i)=>{const s=Ec[n][1],a=Math.abs(s-e),o=Math.abs(r-e);return a<o?n:i},0);return Ec[t][0]}function _c(e,t){if(Ag[t])return t;if(e.length===1)return"15seconds";const n=jR(e),r=cn(n);return ZR(r)}function Ea(e){const{s:t,m:n,H:r}=ba(e);return r===0&&n===0&&t===0}function Ni(e,t){const n=ba(e).M,r=ba(t).M;return n!==r}function gn(e){const{M:t,d:n,s:r,m:i,H:s}=ba(e);return t===1&&n===1&&s===0&&i===0&&r===0}function Lg(e){return e===void 0?"":e.toISOString()}class Ge{constructor(t){this.state={options:{}},this.colorScale={},this.colorClassNames={},this.services=t}getAllDataFromDomain(t){if(!this.getData())return null;const n=this.getOptions();let r=this.getData();const i=this.getDataGroups(),{groupMapsTo:s}=x(n,"data"),a=x(n,"axes");return t&&(r=r.filter(o=>t.includes(o[s]))),a&&Object.keys(a).forEach(o=>{const l=a[o].mapsTo,c=a[o].scaleType;if((c===j.LINEAR||c===j.LOG)&&(r=r.map(u=>({...u,[l]:u[l]===null?u[l]:Number(u[l])}))),l&&a[o].domain)if(c===j.LABELS)r=r.filter(u=>a[o].domain.includes(u[l]));else{const[u,d]=a[o].domain;r=r.filter(h=>!(l in h)||h[l]>=u&&h[l]<=d)}}),r.filter(o=>i.find(l=>l.name===o[s]))}getDisplayData(t){if(!this.get("data"))return null;const{ACTIVE:n}=At.items.status,r=this.getDataGroups(t),{groupMapsTo:i}=this.getOptions().data;return this.getAllDataFromDomain(t).filter(a=>r.find(o=>o.name===a[i]&&o.status===n))}getData(){return this.get("data")}isDataEmpty(){return!this.getData().length}setData(t){const n=this.sanitize(tn(t)),r=this.generateDataGroups(n);return this.set({data:n,dataGroups:r}),n}getDataGroups(t){return x(this.getOptions(),"data","loading")?[]:t?this.get("dataGroups").filter(r=>t.includes(r.name)):this.get("dataGroups")}getActiveDataGroups(t){const{ACTIVE:n}=At.items.status;return this.getDataGroups(t).filter(r=>r.status===n)}getDataGroupNames(t){return this.getDataGroups(t).map(r=>r.name)}getActiveDataGroupNames(t){return this.getActiveDataGroups(t).map(r=>r.name)}aggregateBinDataByGroup(t){return CD(t,"group")}getBinConfigurations(){const t=this.getDisplayData(),n=this.getOptions(),r=this.services.cartesianScales.getMainXAxisPosition(),i=this.services.cartesianScales.getDomainIdentifier(),s=n.axes[r],{groupMapsTo:a}=n.data,{bins:o=FD.defaultBins}=s,l=Array.isArray(o),c=cv().value(f=>f[i]).thresholds(o)(t);if(l)c[c.length-1].x1=o[o.length-1];else{const f=c[0].x1-c[0].x0;c[c.length-1].x1=+c[c.length-1].x0+f}const u=l?[o[0],o[o.length-1]]:[c[0].x0,c[c.length-1].x1],d=Array.from(new Set(t.map(f=>f[a]))),h=[];return c.forEach(f=>{const p=`${f.x0}-${f.x1}`,g=this.aggregateBinDataByGroup(f);d.forEach(v=>{h.push({group:v,key:p,value:g[v]||0,bin:f.x0})})}),{bins:c,binsDomain:u}}getBinnedStackedData(){const t=this.getOptions(),{groupMapsTo:n}=t.data,r=this.getActiveDataGroupNames(),{bins:i}=this.getBinConfigurations(),s=this.getDataValuesGroupedByKeys({bins:i});return xl().keys(r)(s).map((a,o)=>Object.keys(a).filter(l=>!isNaN(l)).map(l=>{const c=a[l];return c[n]=r[o],c}))}getGroupedData(t){const n=this.getDisplayData(t),r={},{groupMapsTo:i}=this.getOptions().data;return n.map(s=>{const a=s[i];r[a]!==null&&r[a]!==void 0?r[a].push(s):r[a]=[s]}),Object.keys(r).map(s=>({name:s,data:r[s]}))}getStackKeys({bins:t=null,groups:n=null}={bins:null,groups:null}){const r=this.getOptions(),i=this.getDisplayData(n);let s;t?s=t.map(l=>`${l.x0}-${l.x1}`):s=Oi(i.map(l=>{const c=this.services.cartesianScales.getDomainIdentifier(l);return l[c]instanceof Date?Lg(l[c]):l[c]&&typeof l[c].toString=="function"?l[c].toString():l[c]}));const a=this.services.cartesianScales.domainAxisPosition,o=r.axes[a].scaleType;return o===j.TIME?s.sort((l,c)=>{const u=new Date(l),d=new Date(c);return u-d}):(o===j.LOG||o===j.LINEAR)&&s.sort((l,c)=>l-c),s}getDataValuesGroupedByKeys({bins:t=null,groups:n=null}){const r=this.getOptions(),{groupMapsTo:i}=r.data,s=this.getDisplayData(n),a=this.getDataGroupNames(),o=this.getStackKeys({bins:t,groups:n});return t?o.map(l=>{const[c,u]=l.split("-"),d={x0:c,x1:u},h=t.find(f=>f.x0.toString()===c.toString());return a.forEach(f=>{d[f]=h.filter(p=>p[i]===f).length}),d}):o.map(l=>{const c={sharedStackKey:l};return a.forEach(u=>{const d=s.find(f=>{const p=this.services.cartesianScales.getDomainIdentifier(f);return f[i]===u&&Object.prototype.hasOwnProperty.call(f,p)&&(f[p]instanceof Date?Lg(f[p])===l:f[p].toString()===l)}),h=this.services.cartesianScales.getRangeIdentifier(c);c[u]=d?d[h]:null}),c})}getStackedData({percentage:t=!1,groups:n=null,divergent:r=!1}){const i=this.getOptions(),{groupMapsTo:s}=i.data,a=this.getActiveDataGroupNames(n),o=this.getDataValuesGroupedByKeys({groups:n});if(t){const c=wD(o.map(u=>[u.sharedStackKey,0]));o.forEach(u=>{a.forEach(d=>{c[u.sharedStackKey]+=u[d]})}),o.forEach(u=>{a.forEach(d=>{const h=c[u.sharedStackKey];c[u.sharedStackKey]?u[d]=u[d]/h*100:u[d]=0})})}return(r?xl().offset(g_):xl()).keys(a)(o).map((c,u)=>Object.keys(c).filter(d=>!isNaN(d)).map(d=>{const h=c[d];return h[s]=a[u],h}))}getOptions(){return this.state.options}set(t,n){this.state=Object.assign({},this.state,t);const r=Object.assign({skipUpdate:!1,animate:!0},n);r.skipUpdate||this.update(r.animate)}get(t){return t?this.state[t]:this.state}setOptions(t){const n=this.getOptions();dc(n,t),this.set({options:tt(n,t)})}update(t=!0){this.getDisplayData()&&(this.updateAllDataGroups(),this.setCustomColorScale(),this.setColorClassNames(),this.services.events.dispatchEvent(w.Model.UPDATE,{animate:t}))}toggleDataLabel(t){const{ACTIVE:n,DISABLED:r}=At.items.status,i=this.getDataGroups(),s=i.some(u=>u.status===r),a=i.filter(u=>u.status===n);if(s)if(a.length===1&&a[0].name===t)i.forEach((u,d)=>{i[d].status=n});else{const u=i.findIndex(d=>d.name===t);i[u].status=i[u].status===r?n:r}else i.forEach((u,d)=>{i[d].status=u.name===t?n:r});const o=i.filter(u=>u.status===n),l=this.getOptions();i.some(u=>u.status===r)?l.data.selectedGroups=o.map(u=>u.name):l.data.selectedGroups=[],this.services.events.dispatchEvent(w.Legend.ITEMS_UPDATE,{dataGroups:i}),this.set({dataGroups:i})}getIsFilled(t,n,r,i){const s=this.getOptions();return s.getIsFilled?s.getIsFilled(t,n,r,i):i}getFillColor(t,n,r){const i=this.getOptions(),s=x(this.colorScale,t);return i.getFillColor?i.getFillColor(t,n,r,s):s}getStrokeColor(t,n,r){const i=this.getOptions(),s=x(this.colorScale,t);return i.getStrokeColor?i.getStrokeColor(t,n,r,s):s}isUserProvidedColorScaleValid(){const t=x(this.getOptions(),"color","scale"),n=this.getDataGroups();return t==null||Object.keys(t).length==0?!1:n.some(r=>Object.keys(t).includes(r.name))}getColorClassName(t){const n=this.colorClassNames(t.dataGroupName);let r=t.originalClassName;return t.classNameTypes.forEach(i=>r=t.originalClassName?`${r} ${i}-${n}`:`${i}-${n}`),r||""}getStatus(){return null}getAllDataGroupsNames(){return this.allDataGroups}transformToTabularData(t){console.warn("We've updated the charting data format to be tabular by default. The current format you're using is deprecated and will be removed in v1.0, read more here https://carbon-design-system.github.io/carbon-charts/?path=/story/docs-tutorials--tabular-data-format");const n=[],{datasets:r,labels:i}=t;return r.forEach(s=>{s.data.forEach((a,o)=>{let l;const c=x(s,"label");if(c===null){const d=x(i,o);d?l=d:l="Ungrouped"}else l=c;const u={group:l,key:i[o]};isNaN(a)?(u.value=a.value,u.date=a.date):u.value=a,n.push(u)})}),n}getTabularDataArray(){return[]}exportToCSV(){const t=this.getTabularDataArray().map(o=>o.map(l=>`"${l==="&ndash;"?"–":l}"`));let n="",r="";t.forEach(function(o,l){r=o.join(","),n+=l<t.length?r+`
2
+ `:r});const i=this.getOptions();let s="myChart";const a=x(i,"fileDownload","fileName");typeof a=="function"?s=a("csv"):typeof a=="string"&&(s=a),this.services.files.downloadCSV(n,`${s}.csv`)}getTabularData(t){return Array.isArray(t)?t:this.transformToTabularData(t)}sanitize(t){return t=this.getTabularData(t),t}updateAllDataGroups(){this.allDataGroups?this.getDataGroupNames().forEach(t=>{this.allDataGroups.indexOf(t)===-1&&this.allDataGroups.push(t)}):this.allDataGroups=this.getDataGroupNames()}generateDataGroups(t){const{groupMapsTo:n}=this.getOptions().data,{ACTIVE:r,DISABLED:i}=At.items.status,s=this.getOptions(),a=Oi(t.map(l=>l[n]));s.data.selectedGroups.length&&(s.data.selectedGroups.every(c=>a.includes(c))||(s.data.selectedGroups=[]));const o=l=>!s.data.selectedGroups.length||s.data.selectedGroups.includes(l)?r:i;return a.map(l=>({name:l,status:o(l)}))}setCustomColorScale(){if(!this.isUserProvidedColorScaleValid())return;const t=this.getOptions(),n=x(t,"color","scale");Object.keys(n).forEach(i=>{this.allDataGroups.includes(i)||console.warn(`"${i}" does not exist in data groups.`)}),this.allDataGroups.filter(i=>n[i]).forEach(i=>this.colorScale[i]=n[i])}setColorClassNames(){const t=x(this.getOptions(),"color","pairing");let n=x(t,"numberOfVariants");(!n||n<this.allDataGroups.length)&&(n=this.allDataGroups.length);let r=x(t,"option");const i=Qp.pairingOptions,s=n>5?14:n,a=`${s}-color`;r=r<=i[a]?r:1;const o=this.allDataGroups.map((l,c)=>`${s}-${r}-${c%14+1}`);this.colorClassNames=ks().range(o).domain(this.allDataGroups)}}function KR(e,t){if(e.match(/^[a-z]+:\/\//i))return e;if(e.match(/^\/\//))return window.location.protocol+e;if(e.match(/^[a-z]+:/i))return e;const n=document.implementation.createHTMLDocument(),r=n.createElement("base"),i=n.createElement("a");return n.head.appendChild(r),n.body.appendChild(i),t&&(r.href=t),i.href=e,i.href}const QR=(()=>{let e=0;const t=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(e+=1,`u${t()}${e}`)})();function an(e){const t=[];for(let n=0,r=e.length;n<r;n++)t.push(e[n]);return t}function Sa(e,t){const r=(e.ownerDocument.defaultView||window).getComputedStyle(e).getPropertyValue(t);return r?parseFloat(r.replace("px","")):0}function JR(e){const t=Sa(e,"border-left-width"),n=Sa(e,"border-right-width");return e.clientWidth+t+n}function t2(e){const t=Sa(e,"border-top-width"),n=Sa(e,"border-bottom-width");return e.clientHeight+t+n}function Rg(e,t={}){const n=t.width||JR(e),r=t.height||t2(e);return{width:n,height:r}}function e2(){let e,t;try{t=process}catch{}const n=t&&t.env?t.env.devicePixelRatio:null;return n&&(e=parseInt(n,10),Number.isNaN(e)&&(e=1)),e||window.devicePixelRatio||1}const ue=16384;function n2(e){(e.width>ue||e.height>ue)&&(e.width>ue&&e.height>ue?e.width>e.height?(e.height*=ue/e.width,e.width=ue):(e.width*=ue/e.height,e.height=ue):e.width>ue?(e.height*=ue/e.width,e.width=ue):(e.width*=ue/e.height,e.height=ue))}function _a(e){return new Promise((t,n)=>{const r=new Image;r.decode=()=>t(r),r.onload=()=>t(r),r.onerror=n,r.crossOrigin="anonymous",r.decoding="async",r.src=e})}async function r2(e){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then(t=>`data:image/svg+xml;charset=utf-8,${t}`)}async function i2(e,t,n){const r="http://www.w3.org/2000/svg",i=document.createElementNS(r,"svg"),s=document.createElementNS(r,"foreignObject");return i.setAttribute("width",`${t}`),i.setAttribute("height",`${n}`),i.setAttribute("viewBox",`0 0 ${t} ${n}`),s.setAttribute("width","100%"),s.setAttribute("height","100%"),s.setAttribute("x","0"),s.setAttribute("y","0"),s.setAttribute("externalResourcesRequired","true"),i.appendChild(s),s.appendChild(e),r2(i)}const ne=(e,t)=>{if(e instanceof t)return!0;const n=Object.getPrototypeOf(e);return n===null?!1:n.constructor.name===t.name||ne(n,t)};function s2(e){const t=e.getPropertyValue("content");return`${e.cssText} content: '${t.replace(/'|"/g,"")}';`}function a2(e){return an(e).map(t=>{const n=e.getPropertyValue(t),r=e.getPropertyPriority(t);return`${t}: ${n}${r?" !important":""};`}).join(" ")}function o2(e,t,n){const r=`.${e}:${t}`,i=n.cssText?s2(n):a2(n);return document.createTextNode(`${r}{${i}}`)}function Ig(e,t,n){const r=window.getComputedStyle(e,n),i=r.getPropertyValue("content");if(i===""||i==="none")return;const s=QR();try{t.className=`${t.className} ${s}`}catch{return}const a=document.createElement("style");a.appendChild(o2(s,n,r)),t.appendChild(a)}function l2(e,t){Ig(e,t,":before"),Ig(e,t,":after")}const kg="application/font-woff",$g="image/jpeg",c2={woff:kg,woff2:kg,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:$g,jpeg:$g,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function u2(e){const t=/\.([^./]*?)$/g.exec(e);return t?t[1]:""}function wc(e){const t=u2(e).toLowerCase();return c2[t]||""}function h2(e){return e.split(/,/)[1]}function Oc(e){return e.search(/^(data:)/)!==-1}function Pg(e,t){return`data:${t};base64,${e}`}async function Ng(e,t,n){const r=await fetch(e,t);if(r.status===404)throw new Error(`Resource "${r.url}" not found`);const i=await r.blob();return new Promise((s,a)=>{const o=new FileReader;o.onerror=a,o.onloadend=()=>{try{s(n({res:r,result:o.result}))}catch(l){a(l)}},o.readAsDataURL(i)})}const Tc={};function d2(e,t,n){let r=e.replace(/\?.*/,"");return n&&(r=e),/ttf|otf|eot|woff2?/i.test(r)&&(r=r.replace(/.*\//,"")),t?`[${t}]${r}`:r}async function Mc(e,t,n){const r=d2(e,t,n.includeQueryParams);if(Tc[r]!=null)return Tc[r];n.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+new Date().getTime());let i;try{const s=await Ng(e,n.fetchRequestInit,({res:a,result:o})=>(t||(t=a.headers.get("Content-Type")||""),h2(o)));i=Pg(s,t)}catch(s){i=n.imagePlaceholder||"";let a=`Failed to fetch resource: ${e}`;s&&(a=typeof s=="string"?s:s.message),a&&console.warn(a)}return Tc[r]=i,i}async function f2(e){const t=e.toDataURL();return t==="data:,"?e.cloneNode(!1):_a(t)}async function p2(e,t){if(e.currentSrc){const s=document.createElement("canvas"),a=s.getContext("2d");s.width=e.clientWidth,s.height=e.clientHeight,a==null||a.drawImage(e,0,0,s.width,s.height);const o=s.toDataURL();return _a(o)}const n=e.poster,r=wc(n),i=await Mc(n,r,t);return _a(i)}async function g2(e){var t;try{if(!((t=e==null?void 0:e.contentDocument)===null||t===void 0)&&t.body)return await wa(e.contentDocument.body,{},!0)}catch{}return e.cloneNode(!1)}async function m2(e,t){return ne(e,HTMLCanvasElement)?f2(e):ne(e,HTMLVideoElement)?p2(e,t):ne(e,HTMLIFrameElement)?g2(e):e.cloneNode(!1)}const v2=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SLOT";async function y2(e,t,n){var r,i;let s=[];return v2(e)&&e.assignedNodes?s=an(e.assignedNodes()):ne(e,HTMLIFrameElement)&&(!((r=e.contentDocument)===null||r===void 0)&&r.body)?s=an(e.contentDocument.body.childNodes):s=an(((i=e.shadowRoot)!==null&&i!==void 0?i:e).childNodes),s.length===0||ne(e,HTMLVideoElement)||await s.reduce((a,o)=>a.then(()=>wa(o,n)).then(l=>{l&&t.appendChild(l)}),Promise.resolve()),t}function x2(e,t){const n=t.style;if(!n)return;const r=window.getComputedStyle(e);r.cssText?(n.cssText=r.cssText,n.transformOrigin=r.transformOrigin):an(r).forEach(i=>{let s=r.getPropertyValue(i);i==="font-size"&&s.endsWith("px")&&(s=`${Math.floor(parseFloat(s.substring(0,s.length-2)))-.1}px`),ne(e,HTMLIFrameElement)&&i==="display"&&s==="inline"&&(s="block"),i==="d"&&t.getAttribute("d")&&(s=`path(${t.getAttribute("d")})`),n.setProperty(i,s,r.getPropertyPriority(i))})}function b2(e,t){ne(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),ne(e,HTMLInputElement)&&t.setAttribute("value",e.value)}function E2(e,t){if(ne(e,HTMLSelectElement)){const n=t,r=Array.from(n.children).find(i=>e.value===i.getAttribute("value"));r&&r.setAttribute("selected","")}}function S2(e,t){return ne(t,Element)&&(x2(e,t),l2(e,t),b2(e,t),E2(e,t)),t}async function _2(e,t){const n=e.querySelectorAll?e.querySelectorAll("use"):[];if(n.length===0)return e;const r={};for(let s=0;s<n.length;s++){const o=n[s].getAttribute("xlink:href");if(o){const l=e.querySelector(o),c=document.querySelector(o);!l&&c&&!r[o]&&(r[o]=await wa(c,t,!0))}}const i=Object.values(r);if(i.length){const s="http://www.w3.org/1999/xhtml",a=document.createElementNS(s,"svg");a.setAttribute("xmlns",s),a.style.position="absolute",a.style.width="0",a.style.height="0",a.style.overflow="hidden",a.style.display="none";const o=document.createElementNS(s,"defs");a.appendChild(o);for(let l=0;l<i.length;l++)o.appendChild(i[l]);e.appendChild(a)}return e}async function wa(e,t,n){return!n&&t.filter&&!t.filter(e)?null:Promise.resolve(e).then(r=>m2(r,t)).then(r=>y2(e,r,t)).then(r=>S2(e,r)).then(r=>_2(r,t))}const Ug=/url\((['"]?)([^'"]+?)\1\)/g,w2=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,O2=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function T2(e){const t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}function M2(e){const t=[];return e.replace(Ug,(n,r,i)=>(t.push(i),n)),t.filter(n=>!Oc(n))}async function C2(e,t,n,r,i){try{const s=n?KR(t,n):t,a=wc(t);let o;if(i){const l=await i(s);o=Pg(l,a)}else o=await Mc(s,a,r);return e.replace(T2(t),`$1${o}$3`)}catch{}return e}function A2(e,{preferredFontFormat:t}){return t?e.replace(O2,n=>{for(;;){const[r,,i]=w2.exec(n)||[];if(!i)return"";if(i===t)return`src: ${r};`}}):e}function Bg(e){return e.search(Ug)!==-1}async function Vg(e,t,n){if(!Bg(e))return e;const r=A2(e,n);return M2(r).reduce((s,a)=>s.then(o=>C2(o,a,t,n)),Promise.resolve(r))}async function Oa(e,t,n){var r;const i=(r=t.style)===null||r===void 0?void 0:r.getPropertyValue(e);if(i){const s=await Vg(i,null,n);return t.style.setProperty(e,s,t.style.getPropertyPriority(e)),!0}return!1}async function D2(e,t){await Oa("background",e,t)||await Oa("background-image",e,t),await Oa("mask",e,t)||await Oa("mask-image",e,t)}async function L2(e,t){const n=ne(e,HTMLImageElement);if(!(n&&!Oc(e.src))&&!(ne(e,SVGImageElement)&&!Oc(e.href.baseVal)))return;const r=n?e.src:e.href.baseVal,i=await Mc(r,wc(r),t);await new Promise((s,a)=>{e.onload=s,e.onerror=a;const o=e;o.decode&&(o.decode=s),o.loading==="lazy"&&(o.loading="eager"),n?(e.srcset="",e.src=i):e.href.baseVal=i})}async function R2(e,t){const r=an(e.childNodes).map(i=>Gg(i,t));await Promise.all(r).then(()=>e)}async function Gg(e,t){ne(e,Element)&&(await D2(e,t),await L2(e,t),await R2(e,t))}function I2(e,t){const{style:n}=e;t.backgroundColor&&(n.backgroundColor=t.backgroundColor),t.width&&(n.width=`${t.width}px`),t.height&&(n.height=`${t.height}px`);const r=t.style;return r!=null&&Object.keys(r).forEach(i=>{n[i]=r[i]}),e}const Hg={};async function Fg(e){let t=Hg[e];if(t!=null)return t;const r=await(await fetch(e)).text();return t={url:e,cssText:r},Hg[e]=t,t}async function zg(e,t){let n=e.cssText;const r=/url\(["']?([^"')]+)["']?\)/g,s=(n.match(/url\([^)]+\)/g)||[]).map(async a=>{let o=a.replace(r,"$1");return o.startsWith("https://")||(o=new URL(o,e.url).href),Ng(o,t.fetchRequestInit,({result:l})=>(n=n.replace(a,`url(${l})`),[a,l]))});return Promise.all(s).then(()=>n)}function Wg(e){if(e==null)return[];const t=[],n=/(\/\*[\s\S]*?\*\/)/gi;let r=e.replace(n,"");const i=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){const l=i.exec(r);if(l===null)break;t.push(l[0])}r=r.replace(i,"");const s=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,a="((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})",o=new RegExp(a,"gi");for(;;){let l=s.exec(r);if(l===null){if(l=o.exec(r),l===null)break;s.lastIndex=o.lastIndex}else o.lastIndex=s.lastIndex;t.push(l[0])}return t}async function k2(e,t){const n=[],r=[];return e.forEach(i=>{if("cssRules"in i)try{an(i.cssRules||[]).forEach((s,a)=>{if(s.type===CSSRule.IMPORT_RULE){let o=a+1;const l=s.href,c=Fg(l).then(u=>zg(u,t)).then(u=>Wg(u).forEach(d=>{try{i.insertRule(d,d.startsWith("@import")?o+=1:i.cssRules.length)}catch(h){console.error("Error inserting rule from remote css",{rule:d,error:h})}})).catch(u=>{console.error("Error loading remote css",u.toString())});r.push(c)}})}catch(s){const a=e.find(o=>o.href==null)||document.styleSheets[0];i.href!=null&&r.push(Fg(i.href).then(o=>zg(o,t)).then(o=>Wg(o).forEach(l=>{a.insertRule(l,i.cssRules.length)})).catch(o=>{console.error("Error loading remote stylesheet",o)})),console.error("Error inlining remote css file",s)}}),Promise.all(r).then(()=>(e.forEach(i=>{if("cssRules"in i)try{an(i.cssRules||[]).forEach(s=>{n.push(s)})}catch(s){console.error(`Error while reading CSS rules from ${i.href}`,s)}}),n))}function $2(e){return e.filter(t=>t.type===CSSRule.FONT_FACE_RULE).filter(t=>Bg(t.style.getPropertyValue("src")))}async function P2(e,t){if(e.ownerDocument==null)throw new Error("Provided element is not within a Document");const n=an(e.ownerDocument.styleSheets),r=await k2(n,t);return $2(r)}async function N2(e,t){const n=await P2(e,t);return(await Promise.all(n.map(i=>{const s=i.parentStyleSheet?i.parentStyleSheet.href:null;return Vg(i.cssText,s,t)}))).join(`
3
+ `)}async function U2(e,t){const n=t.fontEmbedCSS!=null?t.fontEmbedCSS:t.skipFonts?null:await N2(e,t);if(n){const r=document.createElement("style"),i=document.createTextNode(n);r.appendChild(i),e.firstChild?e.insertBefore(r,e.firstChild):e.appendChild(r)}}async function B2(e,t={}){const{width:n,height:r}=Rg(e,t),i=await wa(e,t,!0);return await U2(i,t),await Gg(i,t),I2(i,t),await i2(i,n,r)}async function Yg(e,t={}){const{width:n,height:r}=Rg(e,t),i=await B2(e,t),s=await _a(i),a=document.createElement("canvas"),o=a.getContext("2d"),l=t.pixelRatio||e2(),c=t.canvasWidth||n,u=t.canvasHeight||r;return a.width=c*l,a.height=u*l,t.skipAutoScale||n2(a),a.style.width=`${c}`,a.style.height=`${u}`,t.backgroundColor&&(o.fillStyle=t.backgroundColor,o.fillRect(0,0,a.width,a.height)),o.drawImage(s,0,0,a.width,a.height),a}async function V2(e,t={}){return(await Yg(e,t)).toDataURL()}async function G2(e,t={}){return(await Yg(e,t)).toDataURL("image/jpeg",t.quality||1)}class on{constructor(t,n){this.model=t,this.services=n,this.init()}init(){}update(){}setModel(t){this.model=t}setServices(t){this.services=t}}const H2="DONT_STYLE_ME_css_styles_verifier";class A extends on{constructor(t,n){super(t,n),this.chartID=""}static getHTMLElementSize(t){return{width:t.clientWidth,height:t.clientHeight}}static getSVGElementSize(t,n={useAttrs:!1,useClientDimensions:!1,useBBox:!1,useBoundingRect:!1}){t.attr||(t=D(t));const r={width:0,height:0},i=h=>{h&&Object.keys(r).forEach(f=>{if(h[f]){const p=h[f],g=parseFloat(p);p&&g>r[f]&&(""+p).indexOf("%")===-1&&(r[f]=g)}})},s={width:t.attr("width"),height:t.attr("height")},a=t.node();let o,l,c,u;try{typeof a.getBBox=="function"&&(o=a.getBBox(),l={width:o.width,height:o.height})}catch(h){console.error(h)}try{typeof(a==null?void 0:a.getBoundingClientRect)=="function"&&(c=a.getBoundingClientRect(),u={width:c.width,height:c.height})}catch(h){console.error(h)}let d;if(a instanceof SVGSVGElement&&(d={width:a.clientWidth,height:a.clientHeight}),n){if(n.useAttrs&&(i(s),r.width>0&&r.height>0))return r;if(n.useClientDimensions&&(i(d),r.width>0&&r.height>0))return d;if(n.useBBox&&(i(l),r.width>0&&r.height>0))return l;if(n.useBoundingRect&&(i(u),r.width>0&&r.height>0))return u}try{const h={width:x(t.node(),"width","baseVal","value"),height:x(t.node(),"height","baseVal","value")};i(h)}catch{i(d),i(l),i(s)}return r}static appendOrSelect(t,n){const r=t.select(`${n}`);if(r.empty()){let i=n.split("#"),s,a;return i.length===2?(s=i[0],i=i[1].split("."),a=i[0]):(i=n.split("."),s=i[0]),t.append(s).attr("id",a).attr("class",i.slice(1).join(" "))}return r}init(){this.styleHolderElement(),this.initializeID(),this.addMainContainer(),this.model.getOptions().resizable&&this.addResizeListener(),this.addHolderListeners(),this.handleFullscreenChange()}getChartID(){return this.chartID}generateElementIDString(t){return`chart-${this.chartID}-${t}`}initializeID(){this.chartID=Math.floor((1+Math.random())*281474976710656).toString(16)}addMainContainer(){const t=this.model.getOptions(),n=x(t,"style","prefix"),r=D(this.getHolder()).append("div").classed(`${ee}--${n}--chart-wrapper`,!0).attr("id",`chart-${this.getChartID()}`).style("height","100%").style("width","100%");r.append("g").attr("class",H2),this.mainContainer=r.node()}update(){this.styleHolderElement()}styleHolderElement(){const t=this.getHolder(),{width:n,height:r,theme:i}=this.model.getOptions();n!==this.width&&(t.style.width=n,this.width=n),r!==this.height&&(t.style.height=r,this.height=r),D(this.getHolder()).classed(`${ee}--chart-holder`,!0).attr("data-carbon-theme",i)}getHolder(){return this.model.get("holder")}exportToJPG(){const t=this,n=this.model.getOptions(),r=this.getHolder(),i=D(r);i.classed("filled",!0),G2(this.getMainContainer(),{quality:1,filter:s=>!(s.classList&&s.classList.contains("cds--cc--toolbar"))}).then(function(s){var l;let a="myChart";const o=x(n,"fileDownload","fileName");typeof o=="function"?a=o("jpg"):typeof o=="string"&&(a=o),(l=t.services.files)==null||l.downloadImage(s,`${a}.jpg`),i.classed("filled",!1)})}exportToPNG(){const t=this,n=this.model.getOptions(),r=this.getHolder(),i=D(r);i.classed("filled",!0),V2(this.getMainContainer(),{quality:1,filter:s=>!(s.classList&&s.classList.contains("cds--cc--toolbar"))}).then(function(s){var l;let a="myChart";const o=x(n,"fileDownload","fileName");typeof o=="function"?a=o("png"):typeof o=="string"&&(a=o),(l=t.services.files)==null||l.downloadImage(s,`${a}.png`),i.classed("filled",!1)}).catch(function(s){console.error("oops, something went wrong!",s)})}toggleFullscreen(){const t=this.getHolder();D(t).classed("fullscreen")&&(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement)?document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen():t.requestFullscreen?t.requestFullscreen():t.webkitRequestFullscreen?t.webkitRequestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.msRequestFullscreen&&t.msRequestFullscreen()}handleFullscreenChange(){document.addEventListener("fullscreenchange",()=>{const t=D(this.getHolder()),n=t.classed("fullscreen");t.classed("fullscreen",!n)})}setSVGMaxHeight(){if(!this.model.getOptions().height){const{height:t}=A.getSVGElementSize(D(this.mainContainer),{useBBox:!0}),n=D(this.mainContainer).attr("class"),r=D(this.mainContainer).selectAll(`.${n} > svg`);let i=0;r.nodes().forEach(function(s){i+=Number(A.getSVGElementSize(D(s),{useBBox:!0}).height)}),i<=t?D(this.mainContainer).attr("height",i):D(this.mainContainer).attr("height","100%")}}getMainContainer(){return this.mainContainer}addHolderListeners(){const t=this.getHolder();t&&D(t).on("mouseover",()=>{var n;(n=this.services.events)==null||n.dispatchEvent(w.Chart.MOUSEOVER)}).on("mouseout",()=>{var n;(n=this.services.events)==null||n.dispatchEvent(w.Chart.MOUSEOUT)})}addResizeListener(){const t=this.getHolder();if(!t)return;let n=t.clientWidth,r=t.clientHeight;const i=ua(()=>{var a;t&&(Math.abs(n-t.clientWidth)>1||Math.abs(r-t.clientHeight)>1)&&(n=t.clientWidth,r=t.clientHeight,(a=this.services.events)==null||a.dispatchEvent(w.Chart.RESIZE))},12.5);new ResizeObserver(i).observe(t)}}class lt{constructor(t,n,r){if(this.type="",this.renderType=Z.HTML,this.id="",this.parent=void 0,this.configs={},this.model=t,this.services=n,r&&(this.configs=r,this.configs.id)){const i=x(this.model.getOptions(),"style","prefix");this.id=`${i}--${this.configs.id}`}this.parent||this.setParent(D(this.services.domUtils.getMainContainer()))}init(){}render(t=!0){console.error("Error: Component did not provide the required render function.")}destroy(){}setModel(t){this.model=t}setServices(t){this.services=t}setParent(t){var r;const n=this.parent;if(this.parent=t,!(n&&n.node()===t.node())&&this.type){const i=x(this.model.getOptions(),"style","prefix");(r=this.parent)==null||r.classed(`${ee}--${i}--${this.type}`,!0),n&&n.classed(`${ee}--${i}--${this.type}`,!1)}}getParent(){return this.parent}getComponentContainer(t={withinChartClip:!1}){if(this.type){const n=x(this.model.getOptions(),"style","prefix"),r=this.id?`#${this.id}`:"",i=A.appendOrSelect(this.parent,`${this.renderType===Z.SVG?"svg":"div"}${r}.${ee}--${n}--${this.type}`);if(t.withinChartClip){const s=this.model.get("chartClipId");if(s){const o=D(`#${s}`).select("rect");o.size()!==0&&parseFloat(o.attr("height"))>0&&i.attr("clip-path",`url(#${s})`)}}return i.attr("width","100%").attr("height","100%")}return this.parent}getOptions(){return this.configs.options?tt({},this.model.getOptions(),this.configs.options):this.model.getOptions()}}const qg=class Fm extends lt{constructor(){super(...arguments),this.type="toolbar",this.renderType=Z.HTML}init(){const t=()=>this.updateOverflowMenu(!1);this.services.events.addEventListener(w.Toolbar.SHOW_OVERFLOW_MENU,()=>{this.renderOverflowMenu(),document.body.addEventListener("click",t)}),this.services.events.addEventListener(w.Toolbar.HIDE_OVERFLOW_MENU,()=>{document.body.removeEventListener("click",t)})}render(t=!0){const n=this.getComponentContainer().attr("role","toolbar").attr("aria-label",`chart-${this.services.domUtils.getChartID()} toolbar`);if(x(this.getOptions(),"data","loading"))n.html(""),this.overflowMenu=null;else{this.overflowMenu||(this.overflowMenu=n.append("div").attr("class","cds--overflow-menu-options cds--overflow-menu--flip cds--overflow-menu-options cds--overflow-menu--flip").attr("tabindex",-1).html("<ul role='menu'></ul>"));const{buttonList:i,overflowMenuItemList:s}=this.getControlConfigs();s&&i.push(this.getOverflowButtonConfig());const a=n.selectAll("div.toolbar-control").data(i,c=>c.id);a.exit().remove();const o=a.enter().append("div").attr("class","toolbar-control cds--overflow-menu cds--overflow-menu").attr("role","button"),l=this;o.merge(a).classed("disabled",c=>c.shouldBeDisabled()).attr("aria-disabled",c=>c.shouldBeDisabled()).attr("aria-label",c=>c.title).html(c=>`
4
4
  <button
5
5
  class="cds--overflow-menu__trigger cds--overflow-menu__trigger"
6
6
  aria-haspopup="true" aria-expanded="false" id="${this.services.domUtils.generateElementIDString(`control-${c.id}`)}" aria-label="${c.title}">