@carbon/charts 1.23.4 → 1.23.6
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.
- package/CHANGELOG.md +22 -0
- package/dist/{angle-utils-CqlSifly.mjs → angle-utils-Re7uVv7K.mjs} +2 -2
- package/dist/{angle-utils-CqlSifly.mjs.map → angle-utils-Re7uVv7K.mjs.map} +1 -1
- package/dist/{array-j65rN_vo.mjs → array-CLq6Q40W.mjs} +2 -2
- package/dist/{array-j65rN_vo.mjs.map → array-CLq6Q40W.mjs.map} +1 -1
- package/dist/{choropleth-EJrtnKv4.mjs → choropleth-C0wftO71.mjs} +6 -6
- package/dist/choropleth-C0wftO71.mjs.map +1 -0
- package/dist/{color-scale-utils-ycwO-Ibq.mjs → color-scale-utils-BPsvYA85.mjs} +799 -795
- package/dist/{color-scale-utils-ycwO-Ibq.mjs.map → color-scale-utils-BPsvYA85.mjs.map} +1 -1
- package/dist/components/essentials/tooltip.d.ts +1 -1
- package/dist/components/index.mjs +1 -1
- package/dist/{index-CuPdtS0D.mjs → index-Ciju2yyn.mjs} +3 -3
- package/dist/{index-CuPdtS0D.mjs.map → index-Ciju2yyn.mjs.map} +1 -1
- package/dist/index.mjs +7 -7
- package/dist/model/index.mjs +2 -2
- package/dist/services/index.mjs +3 -3
- package/dist/umd/bundle.umd.cjs +2 -2
- package/dist/umd/bundle.umd.cjs.map +1 -1
- package/dist/umd/bundle.umd.js +2 -2
- package/package.json +15 -15
- package/dist/choropleth-EJrtnKv4.mjs.map +0 -1
package/dist/umd/bundle.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(q,$e){typeof exports=="object"&&typeof module<"u"?$e(exports):typeof define=="function"&&define.amd?define(["exports"],$e):(q=typeof globalThis<"u"?globalThis:q||self,$e(q.Charts={}))})(this,function(q){"use strict";function $e(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Wv(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function bo(e){let t,n,r;e.length!==2?(t=$e,n=(o,l)=>$e(e(o),l),r=(o,l)=>e(o)-l):(t=e===$e||e===Wv?e:Yv,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 Yv(){return 0}function qv(e){return e===null?NaN:+e}function*Xv(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const So=bo($e).right;bo(qv).center;function Zv(e,t){let n=0;for(let r of e)r!=null&&(r=+r)>=r&&++n;return n}function Fe(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 Gn{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 Pu extends Map{constructor(t,n=Qv){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(Nu(this,t))}has(t){return super.has(Nu(this,t))}set(t,n){return super.set(jv(this,t),n)}delete(t){return super.delete(Kv(this,t))}}function Nu({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function jv({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function Kv({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function Qv(e){return e!==null&&typeof e=="object"?e.valueOf():e}function Jv(e){return e}function t0(e=$e){if(e===$e)return $u;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 $u(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}var e0=Array.prototype,n0=e0.slice;function _o(e){return()=>e}const r0=Math.sqrt(50),i0=Math.sqrt(10),s0=Math.sqrt(2);function Os(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>=r0?10:s>=i0?5:s>=s0?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?Os(e,t,n*2):[o,l,c]}function ws(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?Os(t,e,n):Os(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 vr(e,t,n){return t=+t,e=+e,n=+n,Os(e,t,n)[2]}function To(e,t,n){t=+t,e=+e,n=+n;const r=t<e,i=r?vr(t,e,n):vr(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function a0(e,t,n){let r;for(;;){const i=vr(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 o0(e){return Math.max(1,Math.ceil(Math.log(Zv(e))/Math.LN2)+1)}function l0(){var e=Jv,t=Fe,n=o0;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 E=h,b=+f;if(t===Fe&&([d,h]=a0(d,h,b)),f=ws(d,h,b),f[0]<=d&&(l=vr(d,h,b)),f[f.length-1]>=h)if(E>=h&&t===Fe){const x=vr(d,h,b);isFinite(x)&&(x>0?h=(Math.floor(h/x)+1)*x:x<0&&(h=(Math.ceil(h*-x)+1)/-x))}else f.pop()}for(var p=f.length,g=0,m=p;f[g]<=d;)++g;for(;f[m-1]>h;)--m;(g||m<p)&&(f=f.slice(g,m),p=m-g);var v=new Array(p+1),S;for(s=0;s<=p;++s)S=v[s]=[],S.x0=s>0?f[s-1]:d,S.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&&v[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 E=Math.floor((d-o)*l);v[Math.min(p,E+(f[E]<=o))].push(i[s])}}}else for(s=0;s<a;++s)(o=c[s])!=null&&d<=o&&o<=h&&v[So(f,o,0,p)].push(i[s]);return v}return r.value=function(i){return arguments.length?(e=typeof i=="function"?i:_o(i),r):e},r.domain=function(i){return arguments.length?(t=typeof i=="function"?i:_o([i[0],i[1]]),r):t},r.thresholds=function(i){return arguments.length?(n=typeof i=="function"?i:_o(Array.isArray(i)?n0.call(i):i),r):n},r}function Vn(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 kn(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function Fu(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?$u:t0(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));Fu(e,t,f,p,i)}const s=e[t];let a=n,o=r;for(li(e,n,t),i(e[r],s)>0&&li(e,n,r);a<o;){for(li(e,a,o),++a,--o;i(e[a],s)<0;)++a;for(;i(e[o],s)>0;)--o}i(e[n],s)===0?li(e,n,o):(++o,li(e,o,r)),o<=t&&(n=o+1),t<=o&&(r=o-1)}return e}function li(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function Oo(e,t,n){if(e=Float64Array.from(Xv(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return kn(e);if(t>=1)return Vn(e);var r,i=(r-1)*t,s=Math.floor(i),a=Vn(Fu(e,s).subarray(0,s+1)),o=kn(e.subarray(s+1));return a+(o-a)*(i-s)}}function*c0(e){for(const t of e)yield*t}function Uu(e){return Array.from(c0(e))}function u0(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 h0(e){return e}var Ms=1,Cs=2,wo=3,ci=4,Bu=1e-6;function d0(e){return"translate("+e+",0)"}function f0(e){return"translate(0,"+e+")"}function p0(e){return t=>+e(t)}function g0(e,t){return t=Math.max(0,e.bandwidth()-t*2)/2,e.round()&&(t=Math.round(t)),n=>+e(n)+t}function m0(){return!this.__axis}function As(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===Ms||e===ci?-1:1,u=e===ci||e===Cs?"x":"y",d=e===Ms||e===wo?d0:f0;function h(f){var p=r??(t.ticks?t.ticks.apply(t,n):t.domain()),g=i??(t.tickFormat?t.tickFormat.apply(t,n):h0),m=Math.max(s,0)+o,v=t.range(),S=+v[0]+l,E=+v[v.length-1]+l,b=(t.bandwidth?g0:p0)(t.copy(),l),x=f.selection?f.selection():f,_=x.selectAll(".domain").data([null]),C=x.selectAll(".tick").data(p,t).order(),D=C.exit(),B=C.enter().append("g").attr("class","tick"),P=C.select("line"),w=C.select("text");_=_.merge(_.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),C=C.merge(B),P=P.merge(B.append("line").attr("stroke","currentColor").attr(u+"2",c*s)),w=w.merge(B.append("text").attr("fill","currentColor").attr(u,c*m).attr("dy",e===Ms?"0em":e===wo?"0.71em":"0.32em")),f!==x&&(_=_.transition(f),C=C.transition(f),P=P.transition(f),w=w.transition(f),D=D.transition(f).attr("opacity",Bu).attr("transform",function(H){return isFinite(H=b(H))?d(H+l):this.getAttribute("transform")}),B.attr("opacity",Bu).attr("transform",function(H){var N=this.parentNode.__axis;return d((N&&isFinite(N=N(H))?N:b(H))+l)})),D.remove(),_.attr("d",e===ci||e===Cs?a?"M"+c*a+","+S+"H"+l+"V"+E+"H"+c*a:"M"+l+","+S+"V"+E:a?"M"+S+","+c*a+"V"+l+"H"+E+"V"+c*a:"M"+S+","+l+"H"+E),C.attr("opacity",1).attr("transform",function(H){return d(b(H)+l)}),P.attr(u+"2",c*s),w.attr(u,c*m).text(g),x.filter(m0).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",e===Cs?"start":e===ci?"end":"middle"),x.each(function(){this.__axis=b})}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 v0(e){return As(Ms,e)}function y0(e){return As(Cs,e)}function Mo(e){return As(wo,e)}function Hu(e){return As(ci,e)}var E0={value:()=>{}};function Co(){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 Ds(n)}function Ds(e){this._=e}function x0(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}})}Ds.prototype=Co.prototype={constructor:Ds,on:function(e,t){var n=this._,r=x0(e+"",n),i,s=-1,a=r.length;if(arguments.length<2){for(;++s<a;)if((i=(e=r[s]).type)&&(i=b0(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]=Gu(n[i],e.name,t);else if(t==null)for(i in n)n[i]=Gu(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 Ds(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 b0(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function Gu(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=E0,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var Ao="http://www.w3.org/1999/xhtml";const Vu={svg:"http://www.w3.org/2000/svg",xhtml:Ao,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ls(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),Vu.hasOwnProperty(t)?{space:Vu[t],local:e}:e}function S0(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Ao&&t.documentElement.namespaceURI===Ao?t.createElement(e):t.createElementNS(n,e)}}function _0(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function zu(e){var t=Ls(e);return(t.local?_0:S0)(t)}function T0(){}function Do(e){return e==null?T0:function(){return this.querySelector(e)}}function O0(e){typeof e!="function"&&(e=Do(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 ye(r,this._parents)}function w0(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function M0(){return[]}function Wu(e){return e==null?M0:function(){return this.querySelectorAll(e)}}function C0(e){return function(){return w0(e.apply(this,arguments))}}function A0(e){typeof e=="function"?e=C0(e):e=Wu(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 ye(r,i)}function Yu(e){return function(){return this.matches(e)}}function qu(e){return function(t){return t.matches(e)}}var D0=Array.prototype.find;function L0(e){return function(){return D0.call(this.children,e)}}function R0(){return this.firstElementChild}function I0(e){return this.select(e==null?R0:L0(typeof e=="function"?e:qu(e)))}var k0=Array.prototype.filter;function P0(){return Array.from(this.children)}function N0(e){return function(){return k0.call(this.children,e)}}function $0(e){return this.selectAll(e==null?P0:N0(typeof e=="function"?e:qu(e)))}function F0(e){typeof e!="function"&&(e=Yu(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 ye(r,this._parents)}function Xu(e){return new Array(e.length)}function U0(){return new ye(this._enter||this._groups.map(Xu),this._parents)}function Rs(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Rs.prototype={constructor:Rs,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 B0(e){return function(){return e}}function H0(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 Rs(e,s[a]);for(;a<l;++a)(o=t[a])&&(i[a]=o)}function G0(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 Rs(e,s[o]);for(o=0;o<u;++o)(l=t[o])&&c.get(h[o])===l&&(i[o]=l)}function V0(e){return e.__data__}function z0(e,t){if(!arguments.length)return Array.from(this,V0);var n=t?G0:H0,r=this._parents,i=this._groups;typeof e!="function"&&(e=B0(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=W0(e.call(u,u&&u.__data__,c,r)),p=f.length,g=o[c]=new Array(p),m=a[c]=new Array(p),v=l[c]=new Array(h);n(u,d,g,m,v,f,t);for(var S=0,E=0,b,x;S<p;++S)if(b=g[S]){for(S>=E&&(E=S+1);!(x=m[E])&&++E<p;);b._next=x||null}}return a=new ye(a,r),a._enter=o,a._exit=l,a}function W0(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Y0(){return new ye(this._exit||this._groups.map(Xu),this._parents)}function q0(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 X0(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 ye(o,this._parents)}function Z0(){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 j0(e){e||(e=K0);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 ye(i,this._parents).order()}function K0(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Q0(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function J0(){return Array.from(this)}function ty(){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 ey(){let e=0;for(const t of this)++e;return e}function ny(){return!this.node()}function ry(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 iy(e){return function(){this.removeAttribute(e)}}function sy(e){return function(){this.removeAttributeNS(e.space,e.local)}}function ay(e,t){return function(){this.setAttribute(e,t)}}function oy(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function ly(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function cy(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 uy(e,t){var n=Ls(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?sy:iy:typeof t=="function"?n.local?cy:ly:n.local?oy:ay)(n,t))}function Zu(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function hy(e){return function(){this.style.removeProperty(e)}}function dy(e,t,n){return function(){this.style.setProperty(e,t,n)}}function fy(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function py(e,t,n){return arguments.length>1?this.each((t==null?hy:typeof t=="function"?fy:dy)(e,t,n??"")):yr(this.node(),e)}function yr(e,t){return e.style.getPropertyValue(t)||Zu(e).getComputedStyle(e,null).getPropertyValue(t)}function gy(e){return function(){delete this[e]}}function my(e,t){return function(){this[e]=t}}function vy(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function yy(e,t){return arguments.length>1?this.each((t==null?gy:typeof t=="function"?vy:my)(e,t)):this.node()[e]}function ju(e){return e.trim().split(/^|\s+/)}function Lo(e){return e.classList||new Ku(e)}function Ku(e){this._node=e,this._names=ju(e.getAttribute("class")||"")}Ku.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 Qu(e,t){for(var n=Lo(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function Ju(e,t){for(var n=Lo(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function Ey(e){return function(){Qu(this,e)}}function xy(e){return function(){Ju(this,e)}}function by(e,t){return function(){(t.apply(this,arguments)?Qu:Ju)(this,e)}}function Sy(e,t){var n=ju(e+"");if(arguments.length<2){for(var r=Lo(this.node()),i=-1,s=n.length;++i<s;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof t=="function"?by:t?Ey:xy)(n,t))}function _y(){this.textContent=""}function Ty(e){return function(){this.textContent=e}}function Oy(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function wy(e){return arguments.length?this.each(e==null?_y:(typeof e=="function"?Oy:Ty)(e)):this.node().textContent}function My(){this.innerHTML=""}function Cy(e){return function(){this.innerHTML=e}}function Ay(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function Dy(e){return arguments.length?this.each(e==null?My:(typeof e=="function"?Ay:Cy)(e)):this.node().innerHTML}function Ly(){this.nextSibling&&this.parentNode.appendChild(this)}function Ry(){return this.each(Ly)}function Iy(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function ky(){return this.each(Iy)}function Py(e){var t=typeof e=="function"?e:zu(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function Ny(){return null}function $y(e,t){var n=typeof e=="function"?e:zu(e),r=t==null?Ny:typeof t=="function"?t:Do(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function Fy(){var e=this.parentNode;e&&e.removeChild(this)}function Uy(){return this.each(Fy)}function By(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Hy(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Gy(e){return this.select(e?Hy:By)}function Vy(e){return arguments.length?this.property("__data__",e):this.node().__data__}function zy(e){return function(t){e.call(this,t,this.__data__)}}function Wy(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 Yy(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 qy(e,t,n){return function(){var r=this.__on,i,s=zy(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 Xy(e,t,n){var r=Wy(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?qy:Yy,i=0;i<s;++i)this.each(o(r[i],t,n));return this}function th(e,t,n){var r=Zu(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 Zy(e,t){return function(){return th(this,e,t)}}function jy(e,t){return function(){return th(this,e,t.apply(this,arguments))}}function Ky(e,t){return this.each((typeof t=="function"?jy:Zy)(e,t))}function*Qy(){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 eh=[null];function ye(e,t){this._groups=e,this._parents=t}function ui(){return new ye([[document.documentElement]],eh)}function Jy(){return this}ye.prototype=ui.prototype={constructor:ye,select:O0,selectAll:A0,selectChild:I0,selectChildren:$0,filter:F0,data:z0,enter:U0,exit:Y0,join:q0,merge:X0,selection:Jy,order:Z0,sort:j0,call:Q0,nodes:J0,node:ty,size:ey,empty:ny,each:ry,attr:uy,style:py,property:yy,classed:Sy,text:wy,html:Dy,raise:Ry,lower:ky,append:Py,insert:$y,remove:Uy,clone:Gy,datum:Vy,on:Xy,dispatch:Ky,[Symbol.iterator]:Qy};function I(e){return typeof e=="string"?new ye([[document.querySelector(e)]],[document.documentElement]):new ye([[e]],eh)}function t1(e){let t;for(;t=e.sourceEvent;)e=t;return e}function zn(e,t){if(e=t1(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 Ro={capture:!0,passive:!1};function Io(e){e.preventDefault(),e.stopImmediatePropagation()}function e1(e){var t=e.document.documentElement,n=I(e).on("dragstart.drag",Io,Ro);"onselectstart"in t?n.on("selectstart.drag",Io,Ro):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function n1(e,t){var n=e.document.documentElement,r=I(e).on("dragstart.drag",null);t&&(r.on("click.drag",Io,Ro),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 ko(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function nh(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function hi(){}var di=.7,Is=1/di,Er="\\s*([+-]?\\d+)\\s*",fi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ke="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",r1=/^#([0-9a-f]{3,8})$/,i1=new RegExp(`^rgb\\(${Er},${Er},${Er}\\)$`),s1=new RegExp(`^rgb\\(${Ke},${Ke},${Ke}\\)$`),a1=new RegExp(`^rgba\\(${Er},${Er},${Er},${fi}\\)$`),o1=new RegExp(`^rgba\\(${Ke},${Ke},${Ke},${fi}\\)$`),l1=new RegExp(`^hsl\\(${fi},${Ke},${Ke}\\)$`),c1=new RegExp(`^hsla\\(${fi},${Ke},${Ke},${fi}\\)$`),rh={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};ko(hi,dn,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:ih,formatHex:ih,formatHex8:u1,formatHsl:h1,formatRgb:sh,toString:sh});function ih(){return this.rgb().formatHex()}function u1(){return this.rgb().formatHex8()}function h1(){return uh(this).formatHsl()}function sh(){return this.rgb().formatRgb()}function dn(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=r1.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?ah(t):n===3?new he(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?ks(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?ks(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=i1.exec(e))?new he(t[1],t[2],t[3],1):(t=s1.exec(e))?new he(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=a1.exec(e))?ks(t[1],t[2],t[3],t[4]):(t=o1.exec(e))?ks(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=l1.exec(e))?ch(t[1],t[2]/100,t[3]/100,1):(t=c1.exec(e))?ch(t[1],t[2]/100,t[3]/100,t[4]):rh.hasOwnProperty(e)?ah(rh[e]):e==="transparent"?new he(NaN,NaN,NaN,0):null}function ah(e){return new he(e>>16&255,e>>8&255,e&255,1)}function ks(e,t,n,r){return r<=0&&(e=t=n=NaN),new he(e,t,n,r)}function d1(e){return e instanceof hi||(e=dn(e)),e?(e=e.rgb(),new he(e.r,e.g,e.b,e.opacity)):new he}function Po(e,t,n,r){return arguments.length===1?d1(e):new he(e,t,n,r??1)}function he(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}ko(he,Po,nh(hi,{brighter(e){return e=e==null?Is:Math.pow(Is,e),new he(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?di:Math.pow(di,e),new he(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new he(Wn(this.r),Wn(this.g),Wn(this.b),Ps(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:oh,formatHex:oh,formatHex8:f1,formatRgb:lh,toString:lh}));function oh(){return`#${Yn(this.r)}${Yn(this.g)}${Yn(this.b)}`}function f1(){return`#${Yn(this.r)}${Yn(this.g)}${Yn(this.b)}${Yn((isNaN(this.opacity)?1:this.opacity)*255)}`}function lh(){const e=Ps(this.opacity);return`${e===1?"rgb(":"rgba("}${Wn(this.r)}, ${Wn(this.g)}, ${Wn(this.b)}${e===1?")":`, ${e})`}`}function Ps(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Wn(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Yn(e){return e=Wn(e),(e<16?"0":"")+e.toString(16)}function ch(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Ue(e,t,n,r)}function uh(e){if(e instanceof Ue)return new Ue(e.h,e.s,e.l,e.opacity);if(e instanceof hi||(e=dn(e)),!e)return new Ue;if(e instanceof Ue)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 Ue(a,o,l,e.opacity)}function hh(e,t,n,r){return arguments.length===1?uh(e):new Ue(e,t,n,r??1)}function Ue(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}ko(Ue,hh,nh(hi,{brighter(e){return e=e==null?Is:Math.pow(Is,e),new Ue(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?di:Math.pow(di,e),new Ue(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 he(No(e>=240?e-240:e+120,i,r),No(e,i,r),No(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Ue(dh(this.h),Ns(this.s),Ns(this.l),Ps(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=Ps(this.opacity);return`${e===1?"hsl(":"hsla("}${dh(this.h)}, ${Ns(this.s)*100}%, ${Ns(this.l)*100}%${e===1?")":`, ${e})`}`}}));function dh(e){return e=(e||0)%360,e<0?e+360:e}function Ns(e){return Math.max(0,Math.min(1,e||0))}function No(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 $o=e=>()=>e;function p1(e,t){return function(n){return e+n*t}}function g1(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 m1(e){return(e=+e)==1?fh:function(t,n){return n-t?g1(t,n,e):$o(isNaN(t)?n:t)}}function fh(e,t){var n=t-e;return n?p1(e,n):$o(isNaN(e)?t:e)}const $s=function e(t){var n=m1(t);function r(i,s){var a=n((i=Po(i)).r,(s=Po(s)).r),o=n(i.g,s.g),l=n(i.b,s.b),c=fh(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 v1(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 y1(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function E1(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]=pi(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 x1(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function Ee(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function b1(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]=pi(e[i],t[i]):r[i]=t[i];return function(s){for(i in n)r[i]=n[i](s);return r}}var Fo=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Uo=new RegExp(Fo.source,"g");function S1(e){return function(){return e}}function _1(e){return function(t){return e(t)+""}}function ph(e,t){var n=Fo.lastIndex=Uo.lastIndex=0,r,i,s,a=-1,o=[],l=[];for(e=e+"",t=t+"";(r=Fo.exec(e))&&(i=Uo.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:Ee(r,i)})),n=Uo.lastIndex;return n<t.length&&(s=t.slice(n),o[a]?o[a]+=s:o[++a]=s),o.length<2?l[0]?_1(l[0].x):S1(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 pi(e,t){var n=typeof t,r;return t==null||n==="boolean"?$o(t):(n==="number"?Ee:n==="string"?(r=dn(t))?(t=r,$s):ph:t instanceof dn?$s:t instanceof Date?x1:y1(t)?v1:Array.isArray(t)?E1:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?b1:Ee)(e,t)}function gh(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var mh=180/Math.PI,Bo={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function vh(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)*mh,skewX:Math.atan(l)*mh,scaleX:a,scaleY:o}}var Fs;function T1(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Bo:vh(t.a,t.b,t.c,t.d,t.e,t.f)}function O1(e){return e==null||(Fs||(Fs=document.createElementNS("http://www.w3.org/2000/svg","g")),Fs.setAttribute("transform",e),!(e=Fs.transform.baseVal.consolidate()))?Bo:(e=e.matrix,vh(e.a,e.b,e.c,e.d,e.e,e.f))}function yh(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:Ee(c,d)},{i:g-2,x:Ee(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:Ee(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:Ee(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:Ee(c,d)},{i:g-2,x:Ee(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,m;++p<g;)d[(m=h[p]).i]=m.x(f);return d.join("")}}}var w1=yh(T1,"px, ","px)","deg)"),M1=yh(O1,", ",")",")");function C1(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e(r/(t-1));return n}var xr=0,gi=0,mi=0,Eh=1e3,Us,vi,Bs=0,qn=0,Hs=0,yi=typeof performance=="object"&&performance.now?performance:Date,xh=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Ho(){return qn||(xh(A1),qn=yi.now()+Hs)}function A1(){qn=0}function Gs(){this._call=this._time=this._next=null}Gs.prototype=bh.prototype={constructor:Gs,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?Ho():+n)+(t==null?0:+t),!this._next&&vi!==this&&(vi?vi._next=this:Us=this,vi=this),this._call=e,this._time=n,Go()},stop:function(){this._call&&(this._call=null,this._time=1/0,Go())}};function bh(e,t,n){var r=new Gs;return r.restart(e,t,n),r}function D1(){Ho(),++xr;for(var e=Us,t;e;)(t=qn-e._time)>=0&&e._call.call(void 0,t),e=e._next;--xr}function Sh(){qn=(Bs=yi.now())+Hs,xr=gi=0;try{D1()}finally{xr=0,R1(),qn=0}}function L1(){var e=yi.now(),t=e-Bs;t>Eh&&(Hs-=t,Bs=e)}function R1(){for(var e,t=Us,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:Us=n);vi=e,Go(r)}function Go(e){if(!xr){gi&&(gi=clearTimeout(gi));var t=e-qn;t>24?(e<1/0&&(gi=setTimeout(Sh,e-yi.now()-Hs)),mi&&(mi=clearInterval(mi))):(mi||(Bs=yi.now(),mi=setInterval(L1,Eh)),xr=1,xh(Sh))}}function _h(e,t,n){var r=new Gs;return t=t==null?0:+t,r.restart(i=>{r.stop(),e(i+t)},t,n),r}var I1=Co("start","end","cancel","interrupt"),k1=[],Th=0,Oh=1,Vo=2,Vs=3,wh=4,zo=5,zs=6;function Ws(e,t,n,r,i,s){var a=e.__transition;if(!a)e.__transition={};else if(n in a)return;P1(e,n,{name:t,index:r,group:i,on:I1,tween:k1,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:Th})}function Wo(e,t){var n=Be(e,t);if(n.state>Th)throw new Error("too late; already scheduled");return n}function Qe(e,t){var n=Be(e,t);if(n.state>Vs)throw new Error("too late; already running");return n}function Be(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function P1(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=bh(s,0,n.time);function s(c){n.state=Oh,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!==Oh)return l();for(u in r)if(f=r[u],f.name===n.name){if(f.state===Vs)return _h(a);f.state===wh?(f.state=zs,f.timer.stop(),f.on.call("interrupt",e,e.__data__,f.index,f.group),delete r[u]):+u<t&&(f.state=zs,f.timer.stop(),f.on.call("cancel",e,e.__data__,f.index,f.group),delete r[u])}if(_h(function(){n.state===Vs&&(n.state=wh,n.timer.restart(o,n.delay,n.time),o(c))}),n.state=Vo,n.on.call("start",e,e.__data__,n.index,n.group),n.state===Vo){for(n.state=Vs,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=zo,1),d=-1,h=i.length;++d<h;)i[d].call(e,u);n.state===zo&&(n.on.call("end",e,e.__data__,n.index,n.group),l())}function l(){n.state=zs,n.timer.stop(),delete r[t];for(var c in r)return;delete e.__transition}}function Yo(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>Vo&&r.state<zo,r.state=zs,r.timer.stop(),r.on.call(i?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete n[a]}s&&delete e.__transition}}function N1(e){return this.each(function(){Yo(this,e)})}function $1(e,t){var n,r;return function(){var i=Qe(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 F1(e,t,n){var r,i;if(typeof n!="function")throw new Error;return function(){var s=Qe(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 U1(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r=Be(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?$1:F1)(n,e,t))}function qo(e,t,n){var r=e._id;return e.each(function(){var i=Qe(this,r);(i.value||(i.value={}))[t]=n.apply(this,arguments)}),function(i){return Be(i,r).value[t]}}function Mh(e,t){var n;return(typeof t=="number"?Ee:t instanceof dn?$s:(n=dn(t))?(t=n,$s):ph)(e,t)}function B1(e){return function(){this.removeAttribute(e)}}function H1(e){return function(){this.removeAttributeNS(e.space,e.local)}}function G1(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 V1(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 z1(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 W1(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 Y1(e,t){var n=Ls(e),r=n==="transform"?M1:Mh;return this.attrTween(e,typeof t=="function"?(n.local?W1:z1)(n,r,qo(this,"attr."+e,t)):t==null?(n.local?H1:B1)(n):(n.local?V1:G1)(n,r,t))}function q1(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function X1(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function Z1(e,t){var n,r;function i(){var s=t.apply(this,arguments);return s!==r&&(n=(r=s)&&X1(e,s)),n}return i._value=t,i}function j1(e,t){var n,r;function i(){var s=t.apply(this,arguments);return s!==r&&(n=(r=s)&&q1(e,s)),n}return i._value=t,i}function K1(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=Ls(e);return this.tween(n,(r.local?Z1:j1)(r,t))}function Q1(e,t){return function(){Wo(this,e).delay=+t.apply(this,arguments)}}function J1(e,t){return t=+t,function(){Wo(this,e).delay=t}}function tE(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Q1:J1)(t,e)):Be(this.node(),t).delay}function eE(e,t){return function(){Qe(this,e).duration=+t.apply(this,arguments)}}function nE(e,t){return t=+t,function(){Qe(this,e).duration=t}}function rE(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?eE:nE)(t,e)):Be(this.node(),t).duration}function iE(e,t){if(typeof t!="function")throw new Error;return function(){Qe(this,e).ease=t}}function sE(e){var t=this._id;return arguments.length?this.each(iE(t,e)):Be(this.node(),t).ease}function aE(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;Qe(this,e).ease=n}}function oE(e){if(typeof e!="function")throw new Error;return this.each(aE(this._id,e))}function lE(e){typeof e!="function"&&(e=Yu(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 fn(r,this._parents,this._name,this._id)}function cE(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 fn(a,this._parents,this._name,this._id)}function uE(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 hE(e,t,n){var r,i,s=uE(t)?Wo:Qe;return function(){var a=s(this,e),o=a.on;o!==r&&(i=(r=o).copy()).on(t,n),a.on=i}}function dE(e,t){var n=this._id;return arguments.length<2?Be(this.node(),n).on.on(e):this.each(hE(n,e,t))}function fE(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function pE(){return this.on("end.remove",fE(this._id))}function gE(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Do(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,Ws(c[h],t,n,h,c,Be(u,n)));return new fn(s,this._parents,t,n)}function mE(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Wu(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=Be(u,n),g=0,m=h.length;g<m;++g)(f=h[g])&&Ws(f,t,n,g,h,p);s.push(h),a.push(u)}return new fn(s,a,t,n)}var vE=ui.prototype.constructor;function yE(){return new vE(this._groups,this._parents)}function EE(e,t){var n,r,i;return function(){var s=yr(this,e),a=(this.style.removeProperty(e),yr(this,e));return s===a?null:s===n&&a===r?i:i=t(n=s,r=a)}}function Ch(e){return function(){this.style.removeProperty(e)}}function xE(e,t,n){var r,i=n+"",s;return function(){var a=yr(this,e);return a===i?null:a===r?s:s=t(r=a,n)}}function bE(e,t,n){var r,i,s;return function(){var a=yr(this,e),o=n(this),l=o+"";return o==null&&(l=o=(this.style.removeProperty(e),yr(this,e))),a===l?null:a===r&&l===i?s:(i=l,s=t(r=a,o))}}function SE(e,t){var n,r,i,s="style."+t,a="end."+s,o;return function(){var l=Qe(this,e),c=l.on,u=l.value[s]==null?o||(o=Ch(t)):void 0;(c!==n||i!==u)&&(r=(n=c).copy()).on(a,i=u),l.on=r}}function _E(e,t,n){var r=(e+="")=="transform"?w1:Mh;return t==null?this.styleTween(e,EE(e,r)).on("end.style."+e,Ch(e)):typeof t=="function"?this.styleTween(e,bE(e,r,qo(this,"style."+e,t))).each(SE(this._id,e)):this.styleTween(e,xE(e,r,t),n).on("end.style."+e,null)}function TE(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function OE(e,t,n){var r,i;function s(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&TE(e,a,n)),r}return s._value=t,s}function wE(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,OE(e,t,n??""))}function ME(e){return function(){this.textContent=e}}function CE(e){return function(){var t=e(this);this.textContent=t??""}}function AE(e){return this.tween("text",typeof e=="function"?CE(qo(this,"text",e)):ME(e==null?"":e+""))}function DE(e){return function(t){this.textContent=e.call(this,t)}}function LE(e){var t,n;function r(){var i=e.apply(this,arguments);return i!==n&&(t=(n=i)&&DE(i)),t}return r._value=e,r}function RE(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,LE(e))}function IE(){for(var e=this._name,t=this._id,n=Ah(),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=Be(l,t);Ws(l,e,n,c,a,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new fn(r,this._parents,e,n)}function kE(){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=Qe(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 PE=0;function fn(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function Ah(){return++PE}var pn=ui.prototype;fn.prototype={constructor:fn,select:gE,selectAll:mE,selectChild:pn.selectChild,selectChildren:pn.selectChildren,filter:lE,merge:cE,selection:yE,transition:IE,call:pn.call,nodes:pn.nodes,node:pn.node,size:pn.size,empty:pn.empty,each:pn.each,on:dE,attr:Y1,attrTween:K1,style:_E,styleTween:wE,text:AE,textTween:RE,remove:pE,tween:U1,delay:tE,duration:rE,ease:sE,easeVarying:oE,end:kE,[Symbol.iterator]:pn[Symbol.iterator]};const NE=e=>+e;function Dh(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var $E={time:null,delay:0,duration:250,ease:Dh};function FE(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 UE(e){var t,n;e instanceof fn?(t=e._id,e=e._name):(t=Ah(),(n=$E).time=Ho(),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])&&Ws(l,e,t,c,a,n||FE(l,t));return new fn(r,this._parents,e,t)}ui.prototype.interrupt=N1,ui.prototype.transition=UE;const Xo=e=>()=>e;function BE(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 HE(e){e.stopImmediatePropagation()}function Zo(e){e.preventDefault(),e.stopImmediatePropagation()}var Lh={name:"drag"},jo={name:"space"},br={name:"handle"},Sr={name:"center"};const{abs:Rh,max:Kt,min:Qt}=Math;function Ih(e){return[+e[0],+e[1]]}function kh(e){return[Ih(e[0]),Ih(e[1])]}var Ys={name:"x",handles:["w","e"].map(Qo),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]]}},Ko={},gn={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"},Ph={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},Nh={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},GE={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},VE={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function Qo(e){return{type:e}}function zE(e){return!e.ctrlKey&&!e.button}function WE(){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 YE(){return navigator.maxTouchPoints||"ontouchstart"in this}function Jo(e){for(;!e.__brush;)if(!(e=e.parentNode))return;return e.__brush}function qE(e){return e[0][0]===e[1][0]||e[0][1]===e[1][1]}function $h(){return XE(Ys)}function XE(e){var t=WE,n=zE,r=YE,i=!0,s=Co("start","brush","end"),a=6,o;function l(m){var v=m.property("__brush",g).selectAll(".overlay").data([Qo("overlay")]);v.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",gn.overlay).merge(v).each(function(){var E=Jo(this).extent;I(this).attr("x",E[0][0]).attr("y",E[0][1]).attr("width",E[1][0]-E[0][0]).attr("height",E[1][1]-E[0][1])}),m.selectAll(".selection").data([Qo("selection")]).enter().append("rect").attr("class","selection").attr("cursor",gn.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var S=m.selectAll(".handle").data(e.handles,function(E){return E.type});S.exit().remove(),S.enter().append("rect").attr("class",function(E){return"handle handle--"+E.type}).attr("cursor",function(E){return gn[E.type]}),m.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(m,v,S){m.tween?m.on("start.brush",function(E){u(this,arguments).beforestart().start(E)}).on("interrupt.brush end.brush",function(E){u(this,arguments).end(E)}).tween("brush",function(){var E=this,b=E.__brush,x=u(E,arguments),_=b.selection,C=e.input(typeof v=="function"?v.apply(this,arguments):v,b.extent),D=pi(_,C);function B(P){b.selection=P===1&&C===null?null:D(P),c.call(E),x.brush()}return _!==null&&C!==null?B:B(1)}):m.each(function(){var E=this,b=arguments,x=E.__brush,_=e.input(typeof v=="function"?v.apply(E,b):v,x.extent),C=u(E,b).beforestart();Yo(E),x.selection=_===null?null:_,c.call(E),C.start(S).brush(S).end(S)})},l.clear=function(m,v){l.move(m,null,v)};function c(){var m=I(this),v=Jo(this).selection;v?(m.selectAll(".selection").style("display",null).attr("x",v[0][0]).attr("y",v[0][1]).attr("width",v[1][0]-v[0][0]).attr("height",v[1][1]-v[0][1]),m.selectAll(".handle").style("display",null).attr("x",function(S){return S.type[S.type.length-1]==="e"?v[1][0]-a/2:v[0][0]-a/2}).attr("y",function(S){return S.type[0]==="s"?v[1][1]-a/2:v[0][1]-a/2}).attr("width",function(S){return S.type==="n"||S.type==="s"?v[1][0]-v[0][0]+a:a}).attr("height",function(S){return S.type==="e"||S.type==="w"?v[1][1]-v[0][1]+a:a})):m.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function u(m,v,S){var E=m.__brush.emitter;return E&&(!S||!E.clean)?E:new d(m,v,S)}function d(m,v,S){this.that=m,this.args=v,this.state=m.__brush,this.active=0,this.clean=S}d.prototype={beforestart:function(){return++this.active===1&&(this.state.emitter=this,this.starting=!0),this},start:function(m,v){return this.starting?(this.starting=!1,this.emit("start",m,v)):this.emit("brush",m),this},brush:function(m,v){return this.emit("brush",m,v),this},end:function(m,v){return--this.active===0&&(delete this.state.emitter,this.emit("end",m,v)),this},emit:function(m,v,S){var E=I(this.that).datum();s.call(m,this.that,new BE(m,{sourceEvent:v,target:l,selection:e.output(this.state.selection),mode:S,dispatch:s}),E)}};function h(m){if(o&&!m.touches||!n.apply(this,arguments))return;var v=this,S=m.target.__data__.type,E=(i&&m.metaKey?S="overlay":S)==="selection"?Lh:i&&m.altKey?Sr:br,b=e===Ko?null:GE[S],x=e===Ys?null:VE[S],_=Jo(v),C=_.extent,D=_.selection,B=C[0][0],P,w,H=C[0][1],N,M,O=C[1][0],$,F,L=C[1][1],U,tt,X=0,Y=0,Q,ut=b&&x&&i&&m.shiftKey,et,K,nt=Array.from(m.touches||[m],st=>{const _t=st.identifier;return st=zn(st,v),st.point0=st.slice(),st.identifier=_t,st});Yo(v);var ht=u(v,arguments,!0).beforestart();if(S==="overlay"){D&&(Q=!0);const st=[nt[0],nt[1]||nt[0]];_.selection=D=[[P=e===Ko?B:Qt(st[0][0],st[1][0]),N=e===Ys?H:Qt(st[0][1],st[1][1])],[$=e===Ko?O:Kt(st[0][0],st[1][0]),U=e===Ys?L:Kt(st[0][1],st[1][1])]],nt.length>1&&G(m)}else P=D[0][0],N=D[0][1],$=D[1][0],U=D[1][1];w=P,M=N,F=$,tt=U;var W=I(v).attr("pointer-events","none"),j=W.selectAll(".overlay").attr("cursor",gn[S]);if(m.touches)ht.moved=A,ht.ended=V;else{var J=I(m.view).on("mousemove.brush",A,!0).on("mouseup.brush",V,!0);i&&J.on("keydown.brush",xt,!0).on("keyup.brush",Ut,!0),e1(m.view)}c.call(v),ht.start(m,E.name);function A(st){for(const _t of st.changedTouches||[st])for(const Ne of nt)Ne.identifier===_t.identifier&&(Ne.cur=zn(_t,v));if(ut&&!et&&!K&&nt.length===1){const _t=nt[0];Rh(_t.cur[0]-_t[0])>Rh(_t.cur[1]-_t[1])?K=!0:et=!0}for(const _t of nt)_t.cur&&(_t[0]=_t.cur[0],_t[1]=_t.cur[1]);Q=!0,Zo(st),G(st)}function G(st){const _t=nt[0],Ne=_t.point0;var Oe;switch(X=_t[0]-Ne[0],Y=_t[1]-Ne[1],E){case jo:case Lh:{b&&(X=Kt(B-P,Qt(O-$,X)),w=P+X,F=$+X),x&&(Y=Kt(H-N,Qt(L-U,Y)),M=N+Y,tt=U+Y);break}case br:{nt[1]?(b&&(w=Kt(B,Qt(O,nt[0][0])),F=Kt(B,Qt(O,nt[1][0])),b=1),x&&(M=Kt(H,Qt(L,nt[0][1])),tt=Kt(H,Qt(L,nt[1][1])),x=1)):(b<0?(X=Kt(B-P,Qt(O-P,X)),w=P+X,F=$):b>0&&(X=Kt(B-$,Qt(O-$,X)),w=P,F=$+X),x<0?(Y=Kt(H-N,Qt(L-N,Y)),M=N+Y,tt=U):x>0&&(Y=Kt(H-U,Qt(L-U,Y)),M=N,tt=U+Y));break}case Sr:{b&&(w=Kt(B,Qt(O,P-X*b)),F=Kt(B,Qt(O,$+X*b))),x&&(M=Kt(H,Qt(L,N-Y*x)),tt=Kt(H,Qt(L,U+Y*x)));break}}F<w&&(b*=-1,Oe=P,P=$,$=Oe,Oe=w,w=F,F=Oe,S in Ph&&j.attr("cursor",gn[S=Ph[S]])),tt<M&&(x*=-1,Oe=N,N=U,U=Oe,Oe=M,M=tt,tt=Oe,S in Nh&&j.attr("cursor",gn[S=Nh[S]])),_.selection&&(D=_.selection),et&&(w=D[0][0],F=D[1][0]),K&&(M=D[0][1],tt=D[1][1]),(D[0][0]!==w||D[0][1]!==M||D[1][0]!==F||D[1][1]!==tt)&&(_.selection=[[w,M],[F,tt]],c.call(v),ht.brush(st,E.name))}function V(st){if(HE(st),st.touches){if(st.touches.length)return;o&&clearTimeout(o),o=setTimeout(function(){o=null},500)}else n1(st.view,Q),J.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);W.attr("pointer-events","all"),j.attr("cursor",gn.overlay),_.selection&&(D=_.selection),qE(D)&&(_.selection=null,c.call(v)),ht.end(st,E.name)}function xt(st){switch(st.keyCode){case 16:{ut=b&&x;break}case 18:{E===br&&(b&&($=F-X*b,P=w+X*b),x&&(U=tt-Y*x,N=M+Y*x),E=Sr,G(st));break}case 32:{(E===br||E===Sr)&&(b<0?$=F-X:b>0&&(P=w-X),x<0?U=tt-Y:x>0&&(N=M-Y),E=jo,j.attr("cursor",gn.selection),G(st));break}default:return}Zo(st)}function Ut(st){switch(st.keyCode){case 16:{ut&&(et=K=ut=!1,G(st));break}case 18:{E===Sr&&(b<0?$=F:b>0&&(P=w),x<0?U=tt:x>0&&(N=M),E=br,G(st));break}case 32:{E===jo&&(st.altKey?(b&&($=F-X*b,P=w+X*b),x&&(U=tt-Y*x,N=M+Y*x),E=Sr):(b<0?$=F:b>0&&(P=w),x<0?U=tt:x>0&&(N=M),E=br),j.attr("cursor",gn[S]),G(st));break}default:return}Zo(st)}}function f(m){u(this,arguments).moved(m)}function p(m){u(this,arguments).ended(m)}function g(){var m=this.__brush||{selection:null};return m.extent=kh(t.apply(this,arguments)),m.dim=e,m}return l.extent=function(m){return arguments.length?(t=typeof m=="function"?m:Xo(kh(m)),l):t},l.filter=function(m){return arguments.length?(n=typeof m=="function"?m:Xo(!!m),l):n},l.touchable=function(m){return arguments.length?(r=typeof m=="function"?m:Xo(!!m),l):r},l.handleSize=function(m){return arguments.length?(a=+m,l):a},l.keyModifiers=function(m){return arguments.length?(i=!!m,l):i},l.on=function(){var m=s.on.apply(s,arguments);return m===s?l:m},l}const tl=Math.PI,el=2*tl,Xn=1e-6,ZE=el-Xn;function Fh(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function jE(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Fh;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 KE=class{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?Fh:jE(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>Xn)if(!(Math.abs(d*l-c*u)>Xn)||!s)this._append`L${this._x1=t},${this._y1=n}`;else{let f=r-a,p=i-o,g=l*l+c*c,m=f*f+p*p,v=Math.sqrt(g),S=Math.sqrt(h),E=s*Math.tan((tl-Math.acos((g+h-m)/(2*v*S)))/2),b=E/S,x=E/v;Math.abs(b-1)>Xn&&this._append`L${t+b*u},${n+b*d}`,this._append`A${s},${s},0,0,${+(d*f>u*p)},${this._x1=t+x*l},${this._y1=n+x*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)>Xn||Math.abs(this._y1-u)>Xn)&&this._append`L${c},${u}`,r&&(h<0&&(h=h%el+el),h>ZE?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>Xn&&this._append`A${r},${r},0,${+(h>=tl)},${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 QE(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function qs(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 _r(e){return e=qs(Math.abs(e)),e?e[1]:NaN}function JE(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 tx(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var ex=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ei(e){if(!(t=ex.exec(e)))throw new Error("invalid format: "+e);var t;return new nl({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]})}Ei.prototype=nl.prototype;function nl(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+""}nl.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 nx(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 Uh;function rx(e,t){var n=qs(e,t);if(!n)return e+"";var r=n[0],i=n[1],s=i-(Uh=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")+qs(e,Math.max(0,t+s-1))[0]}function Bh(e,t){var n=qs(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 Hh={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:QE,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)=>Bh(e*100,t),r:Bh,s:rx,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Gh(e){return e}var Vh=Array.prototype.map,zh=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function ix(e){var t=e.grouping===void 0||e.thousands===void 0?Gh:JE(Vh.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?Gh:tx(Vh.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=Ei(d);var h=d.fill,f=d.align,p=d.sign,g=d.symbol,m=d.zero,v=d.width,S=d.comma,E=d.precision,b=d.trim,x=d.type;x==="n"?(S=!0,x="g"):Hh[x]||(E===void 0&&(E=12),b=!0,x="g"),(m||h==="0"&&f==="=")&&(m=!0,h="0",f="=");var _=g==="$"?n:g==="#"&&/[boxX]/.test(x)?"0"+x.toLowerCase():"",C=g==="$"?r:/[%p]/.test(x)?a:"",D=Hh[x],B=/[defgprs%]/.test(x);E=E===void 0?6:/[gprs]/.test(x)?Math.max(1,Math.min(21,E)):Math.max(0,Math.min(20,E));function P(w){var H=_,N=C,M,O,$;if(x==="c")N=D(w)+N,w="";else{w=+w;var F=w<0||1/w<0;if(w=isNaN(w)?l:D(Math.abs(w),E),b&&(w=nx(w)),F&&+w==0&&p!=="+"&&(F=!1),H=(F?p==="("?p:o:p==="-"||p==="("?"":p)+H,N=(x==="s"?zh[8+Uh/3]:"")+N+(F&&p==="("?")":""),B){for(M=-1,O=w.length;++M<O;)if($=w.charCodeAt(M),48>$||$>57){N=($===46?i+w.slice(M+1):w.slice(M))+N,w=w.slice(0,M);break}}}S&&!m&&(w=t(w,1/0));var L=H.length+w.length+N.length,U=L<v?new Array(v-L+1).join(h):"";switch(S&&m&&(w=t(U+w,U.length?v-N.length:1/0),U=""),f){case"<":w=H+w+N+U;break;case"=":w=H+U+w+N;break;case"^":w=U.slice(0,L=U.length>>1)+H+w+N+U.slice(L);break;default:w=U+H+w+N;break}return s(w)}return P.toString=function(){return d+""},P}function u(d,h){var f=c((d=Ei(d),d.type="f",d)),p=Math.max(-8,Math.min(8,Math.floor(_r(h)/3)))*3,g=Math.pow(10,-p),m=zh[8+p/3];return function(v){return f(g*v)+m}}return{format:c,formatPrefix:u}}var Xs,rl,Wh;sx({thousands:",",grouping:[3],currency:["$",""]});function sx(e){return Xs=ix(e),rl=Xs.format,Wh=Xs.formatPrefix,Xs}function ax(e){return Math.max(0,-_r(Math.abs(e)))}function ox(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(_r(t)/3)))*3-_r(Math.abs(e)))}function lx(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,_r(t)-_r(e))+1}var wt=1e-6,cx=1e-12,gt=Math.PI,de=gt/2,Yh=gt/4,xe=gt*2,re=180/gt,Nt=gt/180,Tt=Math.abs,qh=Math.atan,Zn=Math.atan2,Mt=Math.cos,ux=Math.exp,hx=Math.log,bt=Math.sin,Pn=Math.sign||function(e){return e>0?1:e<0?-1:0},He=Math.sqrt,dx=Math.tan;function fx(e){return e>1?0:e<-1?gt:Math.acos(e)}function mn(e){return e>1?de:e<-1?-de:Math.asin(e)}function we(){}function Zs(e,t){e&&Zh.hasOwnProperty(e.type)&&Zh[e.type](e,t)}var Xh={Feature:function(e,t){Zs(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,r=-1,i=n.length;++r<i;)Zs(n[r].geometry,t)}},Zh={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){il(e.coordinates,t,0)},MultiLineString:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)il(n[r],t,0)},Polygon:function(e,t){jh(e.coordinates,t)},MultiPolygon:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)jh(n[r],t)},GeometryCollection:function(e,t){for(var n=e.geometries,r=-1,i=n.length;++r<i;)Zs(n[r],t)}};function il(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 jh(e,t){var n=-1,r=e.length;for(t.polygonStart();++n<r;)il(e[n],t,1);t.polygonEnd()}function Tr(e,t){e&&Xh.hasOwnProperty(e.type)?Xh[e.type](e,t):Zs(e,t)}function sl(e){return[Zn(e[1],e[0]),mn(e[2])]}function Or(e){var t=e[0],n=e[1],r=Mt(n);return[r*Mt(t),r*bt(t),bt(n)]}function js(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function Ks(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 al(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function Qs(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function ol(e){var t=He(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}function ll(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 cl(e,t){return Tt(e)>gt&&(e-=Math.round(e/xe)*xe),[e,t]}cl.invert=cl;function Kh(e,t,n){return(e%=xe)?t||n?ll(Jh(e),td(t,n)):Jh(e):t||n?td(t,n):cl}function Qh(e){return function(t,n){return t+=e,Tt(t)>gt&&(t-=Math.round(t/xe)*xe),[t,n]}}function Jh(e){var t=Qh(e);return t.invert=Qh(-e),t}function td(e,t){var n=Mt(e),r=bt(e),i=Mt(t),s=bt(t);function a(o,l){var c=Mt(l),u=Mt(o)*c,d=bt(o)*c,h=bt(l),f=h*n+u*r;return[Zn(d*i-f*s,u*n-h*r),mn(f*i+d*s)]}return a.invert=function(o,l){var c=Mt(l),u=Mt(o)*c,d=bt(o)*c,h=bt(l),f=h*i-d*s;return[Zn(d*i+h*s,u*n+f*r),mn(f*n-u*r)]},a}function px(e){e=Kh(e[0]*Nt,e[1]*Nt,e.length>2?e[2]*Nt:0);function t(n){return n=e(n[0]*Nt,n[1]*Nt),n[0]*=re,n[1]*=re,n}return t.invert=function(n){return n=e.invert(n[0]*Nt,n[1]*Nt),n[0]*=re,n[1]*=re,n},t}function gx(e,t,n,r,i,s){if(n){var a=Mt(t),o=bt(t),l=r*n;i==null?(i=t+r*xe,s=t-l/2):(i=ed(a,i),s=ed(a,s),(r>0?i<s:i>s)&&(i+=r*xe));for(var c,u=i;r>0?u>s:u<s;u-=l)c=sl([a,-o*Mt(u),-o*bt(u)]),e.point(c[0],c[1])}}function ed(e,t){t=Or(t),t[0]-=e,ol(t);var n=fx(-t[1]);return((-t[2]<0?-n:n)+xe-wt)%xe}function nd(){var e=[],t;return{point:function(n,r,i){t.push([n,r,i])},lineStart:function(){e.push(t=[])},lineEnd:we,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function Js(e,t){return Tt(e[0]-t[0])<wt&&Tt(e[1]-t[1])<wt}function ta(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 rd(e,t,n,r,i){var s=[],a=[],o,l;if(e.forEach(function(p){if(!((g=p.length-1)<=0)){var g,m=p[0],v=p[g],S;if(Js(m,v)){if(!m[2]&&!v[2]){for(i.lineStart(),o=0;o<g;++o)i.point((m=p[o])[0],m[1]);i.lineEnd();return}v[0]+=2*wt}s.push(S=new ta(m,p,null,!0)),a.push(S.o=new ta(m,null,S,!1)),s.push(S=new ta(v,p,null,!1)),a.push(S.o=new ta(v,null,S,!0))}}),!!s.length){for(a.sort(t),id(s),id(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 id(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 ul(e){return Tt(e[0])<=gt?e[0]:Pn(e[0])*((Tt(e[0])+gt)%xe-gt)}function mx(e,t){var n=ul(t),r=t[1],i=bt(r),s=[bt(n),-Mt(n),0],a=0,o=0,l=new Gn;i===1?r=de+wt:i===-1&&(r=-de-wt);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=ul(f),g=f[1]/2+Yh,m=bt(g),v=Mt(g),S=0;S<h;++S,p=b,m=_,v=C,f=E){var E=d[S],b=ul(E),x=E[1]/2+Yh,_=bt(x),C=Mt(x),D=b-p,B=D>=0?1:-1,P=B*D,w=P>gt,H=m*_;if(l.add(Zn(H*B*bt(P),v*C+H*Mt(P))),a+=w?D+B*xe:D,w^p>=n^b>=n){var N=Ks(Or(f),Or(E));ol(N);var M=Ks(s,N);ol(M);var O=(w^D>=0?-1:1)*mn(M[2]);(r>O||r===O&&(N[0]||N[1]))&&(o+=w^D>=0?1:-1)}}return(a<-1e-6||a<wt&&l<-1e-12)^o&1}function sd(e,t,n,r){return function(i){var s=t(i),a=nd(),o=t(a),l=!1,c,u,d,h={point:f,lineStart:g,lineEnd:m,polygonStart:function(){h.point=v,h.lineStart=S,h.lineEnd=E,u=[],c=[]},polygonEnd:function(){h.point=f,h.lineStart=g,h.lineEnd=m,u=Uu(u);var b=mx(c,r);u.length?(l||(i.polygonStart(),l=!0),rd(u,yx,b,n,i)):b&&(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(b,x){e(b,x)&&i.point(b,x)}function p(b,x){s.point(b,x)}function g(){h.point=p,s.lineStart()}function m(){h.point=f,s.lineEnd()}function v(b,x){d.push([b,x]),o.point(b,x)}function S(){o.lineStart(),d=[]}function E(){v(d[0][0],d[0][1]),o.lineEnd();var b=o.clean(),x=a.result(),_,C=x.length,D,B,P;if(d.pop(),c.push(d),d=null,!!C){if(b&1){if(B=x[0],(D=B.length-1)>0){for(l||(i.polygonStart(),l=!0),i.lineStart(),_=0;_<D;++_)i.point((P=B[_])[0],P[1]);i.lineEnd()}return}C>1&&b&2&&x.push(x.pop().concat(x.shift())),u.push(x.filter(vx))}}return h}}function vx(e){return e.length>1}function yx(e,t){return((e=e.x)[0]<0?e[1]-de-wt:de-e[1])-((t=t.x)[0]<0?t[1]-de-wt:de-t[1])}const ad=sd(function(){return!0},Ex,bx,[-gt,-de]);function Ex(e){var t=NaN,n=NaN,r=NaN,i;return{lineStart:function(){e.lineStart(),i=1},point:function(s,a){var o=s>0?gt:-gt,l=Tt(s-t);Tt(l-gt)<wt?(e.point(t,n=(n+a)/2>0?de:-de),e.point(r,n),e.lineEnd(),e.lineStart(),e.point(o,n),e.point(s,n),i=0):r!==o&&l>=gt&&(Tt(t-r)<wt&&(t-=r*wt),Tt(s-o)<wt&&(s-=o*wt),n=xx(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 xx(e,t,n,r){var i,s,a=bt(e-n);return Tt(a)>wt?qh((bt(t)*(s=Mt(r))*bt(n)-bt(r)*(i=Mt(t))*bt(e))/(i*s*a)):(t+r)/2}function bx(e,t,n,r){var i;if(e==null)i=n*de,r.point(-gt,i),r.point(0,i),r.point(gt,i),r.point(gt,0),r.point(gt,-i),r.point(0,-i),r.point(-gt,-i),r.point(-gt,0),r.point(-gt,i);else if(Tt(e[0]-t[0])>wt){var s=e[0]<t[0]?gt:-gt;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=Mt(e),n=2*Nt,r=t>0,i=Tt(t)>wt;function s(u,d,h,f){gx(f,e,n,h,u,d)}function a(u,d){return Mt(u)*Mt(d)>t}function o(u){var d,h,f,p,g;return{lineStart:function(){p=f=!1,g=1},point:function(m,v){var S=[m,v],E,b=a(m,v),x=r?b?0:c(m,v):b?c(m+(m<0?gt:-gt),v):0;if(!d&&(p=f=b)&&u.lineStart(),b!==f&&(E=l(d,S),(!E||Js(d,E)||Js(S,E))&&(S[2]=1)),b!==f)g=0,b?(u.lineStart(),E=l(S,d),u.point(E[0],E[1])):(E=l(d,S),u.point(E[0],E[1],2),u.lineEnd()),d=E;else if(i&&d&&r^b){var _;!(x&h)&&(_=l(S,d,!0))&&(g=0,r?(u.lineStart(),u.point(_[0][0],_[0][1]),u.point(_[1][0],_[1][1]),u.lineEnd()):(u.point(_[1][0],_[1][1]),u.lineEnd(),u.lineStart(),u.point(_[0][0],_[0][1],3)))}b&&(!d||!Js(d,S))&&u.point(S[0],S[1]),d=S,f=b,h=x},lineEnd:function(){f&&u.lineEnd(),d=null},clean:function(){return g|(p&&f)<<1}}}function l(u,d,h){var f=Or(u),p=Or(d),g=[1,0,0],m=Ks(f,p),v=js(m,m),S=m[0],E=v-S*S;if(!E)return!h&&u;var b=t*v/E,x=-t*S/E,_=Ks(g,m),C=Qs(g,b),D=Qs(m,x);al(C,D);var B=_,P=js(C,B),w=js(B,B),H=P*P-w*(js(C,C)-1);if(!(H<0)){var N=He(H),M=Qs(B,(-P-N)/w);if(al(M,C),M=sl(M),!h)return M;var O=u[0],$=d[0],F=u[1],L=d[1],U;$<O&&(U=O,O=$,$=U);var tt=$-O,X=Tt(tt-gt)<wt,Y=X||tt<wt;if(!X&&L<F&&(U=F,F=L,L=U),Y?X?F+L>0^M[1]<(Tt(M[0]-O)<wt?F:L):F<=M[1]&&M[1]<=L:tt>gt^(O<=M[0]&&M[0]<=$)){var Q=Qs(B,(-P+N)/w);return al(Q,C),[M,sl(Q)]}}}function c(u,d){var h=r?e:gt-e,f=0;return u<-h?f|=1:u>h&&(f|=2),d<-h?f|=4:d>h&&(f|=8),f}return sd(a,o,s,r?[0,-e]:[-gt,e-gt])}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 ea=1e9,na=-1e9;function Tx(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 Tt(c[0]-e)<wt?u>0?0:3:Tt(c[0]-n)<wt?u>0?2:1:Tt(c[1]-t)<wt?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=nd(),h,f,p,g,m,v,S,E,b,x,_,C={point:D,lineStart:H,lineEnd:N,polygonStart:P,polygonEnd:w};function D(O,$){i(O,$)&&u.point(O,$)}function B(){for(var O=0,$=0,F=f.length;$<F;++$)for(var L=f[$],U=1,tt=L.length,X=L[0],Y,Q,ut=X[0],et=X[1];U<tt;++U)Y=ut,Q=et,X=L[U],ut=X[0],et=X[1],Q<=r?et>r&&(ut-Y)*(r-Q)>(et-Q)*(e-Y)&&++O:et<=r&&(ut-Y)*(r-Q)<(et-Q)*(e-Y)&&--O;return O}function P(){u=d,h=[],f=[],_=!0}function w(){var O=B(),$=_&&O,F=(h=Uu(h)).length;($||F)&&(c.polygonStart(),$&&(c.lineStart(),s(null,null,1,c),c.lineEnd()),F&&rd(h,o,O,s,c),c.polygonEnd()),u=c,h=f=p=null}function H(){C.point=M,f&&f.push(p=[]),x=!0,b=!1,S=E=NaN}function N(){h&&(M(g,m),v&&b&&d.rejoin(),h.push(d.result())),C.point=D,b&&u.lineEnd()}function M(O,$){var F=i(O,$);if(f&&p.push([O,$]),x)g=O,m=$,v=F,x=!1,F&&(u.lineStart(),u.point(O,$));else if(F&&b)u.point(O,$);else{var L=[S=Math.max(na,Math.min(ea,S)),E=Math.max(na,Math.min(ea,E))],U=[O=Math.max(na,Math.min(ea,O)),$=Math.max(na,Math.min(ea,$))];_x(L,U,e,t,n,r)?(b||(u.lineStart(),u.point(L[0],L[1])),u.point(U[0],U[1]),F||u.lineEnd(),_=!1):F&&(u.lineStart(),u.point(O,$),_=!1)}S=O,E=$,b=F}return C}}const hl=e=>e;var dl=new Gn,fl=new Gn,od,ld,pl,gl,vn={point:we,lineStart:we,lineEnd:we,polygonStart:function(){vn.lineStart=Ox,vn.lineEnd=Mx},polygonEnd:function(){vn.lineStart=vn.lineEnd=vn.point=we,dl.add(Tt(fl)),fl=new Gn},result:function(){var e=dl/2;return dl=new Gn,e}};function Ox(){vn.point=wx}function wx(e,t){vn.point=cd,od=pl=e,ld=gl=t}function cd(e,t){fl.add(gl*e-pl*t),pl=e,gl=t}function Mx(){cd(od,ld)}var wr=1/0,ra=wr,xi=-wr,ia=xi,sa={point:Cx,lineStart:we,lineEnd:we,polygonStart:we,polygonEnd:we,result:function(){var e=[[wr,ra],[xi,ia]];return xi=ia=-(ra=wr=1/0),e}};function Cx(e,t){e<wr&&(wr=e),e>xi&&(xi=e),t<ra&&(ra=t),t>ia&&(ia=t)}var ml=0,vl=0,bi=0,aa=0,oa=0,Mr=0,yl=0,El=0,Si=0,ud,hd,Je,tn,Me={point:jn,lineStart:dd,lineEnd:fd,polygonStart:function(){Me.lineStart=Lx,Me.lineEnd=Rx},polygonEnd:function(){Me.point=jn,Me.lineStart=dd,Me.lineEnd=fd},result:function(){var e=Si?[yl/Si,El/Si]:Mr?[aa/Mr,oa/Mr]:bi?[ml/bi,vl/bi]:[NaN,NaN];return ml=vl=bi=aa=oa=Mr=yl=El=Si=0,e}};function jn(e,t){ml+=e,vl+=t,++bi}function dd(){Me.point=Ax}function Ax(e,t){Me.point=Dx,jn(Je=e,tn=t)}function Dx(e,t){var n=e-Je,r=t-tn,i=He(n*n+r*r);aa+=i*(Je+e)/2,oa+=i*(tn+t)/2,Mr+=i,jn(Je=e,tn=t)}function fd(){Me.point=jn}function Lx(){Me.point=Ix}function Rx(){pd(ud,hd)}function Ix(e,t){Me.point=pd,jn(ud=Je=e,hd=tn=t)}function pd(e,t){var n=e-Je,r=t-tn,i=He(n*n+r*r);aa+=i*(Je+e)/2,oa+=i*(tn+t)/2,Mr+=i,i=tn*e-Je*t,yl+=i*(Je+e),El+=i*(tn+t),Si+=i*3,jn(Je=e,tn=t)}function gd(e){this._context=e}gd.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,xe);break}}},result:we};var xl=new Gn,bl,md,vd,_i,Ti,Oi={point:we,lineStart:function(){Oi.point=kx},lineEnd:function(){bl&&yd(md,vd),Oi.point=we},polygonStart:function(){bl=!0},polygonEnd:function(){bl=null},result:function(){var e=+xl;return xl=new Gn,e}};function kx(e,t){Oi.point=yd,md=_i=e,vd=Ti=t}function yd(e,t){_i-=e,Ti-=t,xl.add(He(_i*_i+Ti*Ti)),_i=e,Ti=t}let Ed,la,xd,bd;class Sd{constructor(t){this._append=t==null?_d: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!==xd||this._append!==la){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`,xd=r,la=this._append,bd=this._,this._=i}this._+=bd;break}}}result(){const t=this._;return this._="",t.length?t:null}}function _d(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 _d;if(t!==Ed){const n=10**t;Ed=t,la=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 la}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(vn)),vn.result()},a.measure=function(o){return Tr(o,i(Oi)),Oi.result()},a.bounds=function(o){return Tr(o,i(sa)),sa.result()},a.centroid=function(o){return Tr(o,i(Me)),Me.result()},a.projection=function(o){return arguments.length?(i=o==null?(e=null,hl):(e=o).stream,a):e},a.context=function(o){return arguments.length?(s=o==null?(t=null,new Sd(n)):new gd(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 Sd(n)),a},a.projection(e).digits(n).context(t)}function Sl(e){return function(t){var n=new _l;for(var r in e)n[r]=e[r];return n.stream=t,n}}function _l(){}_l.prototype={constructor:_l,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 Tl(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(sa)),t(sa.result()),r!=null&&e.clipExtent(r),e}function Td(e,t,n){return Tl(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 $x(e,t,n){return Td(e,[[0,0],t],n)}function Fx(e,t,n){return Tl(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 Ux(e,t,n){return Tl(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 Od=16,Bx=Mt(30*Nt);function wd(e,t){return+t?Gx(e,t):Hx(e)}function Hx(e){return Sl({point:function(t,n){t=e(t,n),this.stream.point(t[0],t[1])}})}function Gx(e,t){function n(r,i,s,a,o,l,c,u,d,h,f,p,g,m){var v=c-r,S=u-i,E=v*v+S*S;if(E>4*t&&g--){var b=a+h,x=o+f,_=l+p,C=He(b*b+x*x+_*_),D=mn(_/=C),B=Tt(Tt(_)-1)<wt||Tt(s-d)<wt?(s+d)/2:Zn(x,b),P=e(B,D),w=P[0],H=P[1],N=w-r,M=H-i,O=S*N-v*M;(O*O/E>t||Tt((v*N+S*M)/E-.5)>.3||a*h+o*f+l*p<Bx)&&(n(r,i,s,a,o,l,w,H,B,b/=C,x/=C,_,g,m),m.point(w,H),n(w,H,B,b,x,_,c,u,d,h,f,p,g,m))}}return function(r){var i,s,a,o,l,c,u,d,h,f,p,g,m={point:v,lineStart:S,lineEnd:b,polygonStart:function(){r.polygonStart(),m.lineStart=x},polygonEnd:function(){r.polygonEnd(),m.lineStart=S}};function v(D,B){D=e(D,B),r.point(D[0],D[1])}function S(){d=NaN,m.point=E,r.lineStart()}function E(D,B){var P=Or([D,B]),w=e(D,B);n(d,h,u,f,p,g,d=w[0],h=w[1],u=D,f=P[0],p=P[1],g=P[2],Od,r),r.point(d,h)}function b(){m.point=v,r.lineEnd()}function x(){S(),m.point=_,m.lineEnd=C}function _(D,B){E(i=D,B),s=d,a=h,o=f,l=p,c=g,m.point=E}function C(){n(d,h,u,f,p,g,s,a,i,o,l,c,Od,r),m.lineEnd=b,b()}return m}}var Vx=Sl({point:function(e,t){this.stream.point(e*Nt,t*Nt)}});function zx(e){return Sl({point:function(t,n){var r=e(t,n);return this.stream.point(r[0],r[1])}})}function Wx(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 Md(e,t,n,r,i,s){if(!s)return Wx(e,t,n,r,i);var a=Mt(s),o=bt(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,m){return g*=r,m*=i,[l*g-c*m+t,n-c*g-l*m]}return p.invert=function(g,m){return[r*(u*g-d*m+h),i*(f-d*g-u*m)]},p}function ca(e){return Cd(function(){return e})()}function Cd(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=ad,m=null,v,S,E,b=hl,x=.5,_,C,D,B,P;function w(O){return D(O[0]*Nt,O[1]*Nt)}function H(O){return O=D.invert(O[0],O[1]),O&&[O[0]*re,O[1]*re]}w.stream=function(O){return B&&P===O?B:B=Vx(zx(u)(g(_(b(P=O)))))},w.preclip=function(O){return arguments.length?(g=O,p=void 0,M()):g},w.postclip=function(O){return arguments.length?(b=O,m=v=S=E=null,M()):b},w.clipAngle=function(O){return arguments.length?(g=+O?Sx(p=O*Nt):(p=null,ad),M()):p*re},w.clipExtent=function(O){return arguments.length?(b=O==null?(m=v=S=E=null,hl):Tx(m=+O[0][0],v=+O[0][1],S=+O[1][0],E=+O[1][1]),M()):m==null?null:[[m,v],[S,E]]},w.scale=function(O){return arguments.length?(n=+O,N()):n},w.translate=function(O){return arguments.length?(r=+O[0],i=+O[1],N()):[r,i]},w.center=function(O){return arguments.length?(s=O[0]%360*Nt,a=O[1]%360*Nt,N()):[s*re,a*re]},w.rotate=function(O){return arguments.length?(o=O[0]%360*Nt,l=O[1]%360*Nt,c=O.length>2?O[2]%360*Nt:0,N()):[o*re,l*re,c*re]},w.angle=function(O){return arguments.length?(d=O%360*Nt,N()):d*re},w.reflectX=function(O){return arguments.length?(h=O?-1:1,N()):h<0},w.reflectY=function(O){return arguments.length?(f=O?-1:1,N()):f<0},w.precision=function(O){return arguments.length?(_=wd(C,x=O*O),M()):He(x)},w.fitExtent=function(O,$){return Td(w,O,$)},w.fitSize=function(O,$){return $x(w,O,$)},w.fitWidth=function(O,$){return Fx(w,O,$)},w.fitHeight=function(O,$){return Ux(w,O,$)};function N(){var O=Md(n,0,0,h,f,d).apply(null,t(s,a)),$=Md(n,r-O[0],i-O[1],h,f,d);return u=Kh(o,l,c),C=ll(t,$),D=ll(u,C),_=wd(C,x),M()}function M(){return B=P=null,w}return function(){return t=e.apply(this,arguments),w.invert=t.invert&&H,N()}}function Ad(e){var t=0,n=gt/3,r=Cd(e),i=r(t,n);return i.parallels=function(s){return arguments.length?r(t=s[0]*Nt,n=s[1]*Nt):[t*re,n*re]},i}function Yx(e){var t=Mt(e);function n(r,i){return[r*t,bt(i)/t]}return n.invert=function(r,i){return[r/t,mn(i*t)]},n}function qx(e,t){var n=bt(e),r=(n+bt(t))/2;if(Tt(r)<wt)return Yx(e);var i=1+n*(2*r-n),s=He(i)/r;function a(o,l){var c=He(i-2*r*bt(l))/r;return[c*bt(o*=r),s-c*Mt(o)]}return a.invert=function(o,l){var c=s-l,u=Zn(o,Tt(c))*Pn(c);return c*r<0&&(u-=gt*Pn(o)*Pn(c)),[u/r,mn((i-(o*o+c*c)*r*r)/(2*r))]},a}function Dd(){return Ad(qx).scale(155.424).center([0,33.6442])}function Xx(){return Dd().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function Ol(e,t){return[e,hx(dx((de+t)/2))]}Ol.invert=function(e,t){return[e,2*qh(ux(t))-de]};function Zx(){return jx(Ol).scale(961/xe)}function jx(e){var t=ca(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=gt*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===Ol?[[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 ua(e,t){return[e,t]}ua.invert=ua;function Kx(){return ca(ua).scale(152.63)}function Qx(e,t){var n=Mt(e),r=e===t?bt(e):(n-Mt(t))/(t-e),i=n/r+e;if(Tt(r)<wt)return ua;function s(a,o){var l=i-o,c=r*a;return[l*bt(c),i-l*Mt(c)]}return s.invert=function(a,o){var l=i-o,c=Zn(a,Tt(l))*Pn(l);return l*r<0&&(c-=gt*Pn(a)*Pn(l)),[c/r,i-Pn(r)*He(a*a+l*l)]},s}function Jx(){return Ad(Qx).scale(131.154).center([0,13.9389])}var wi=1.340264,Mi=-.081106,Ci=893e-6,Ai=.003796,ha=He(3)/2,tb=12;function Ld(e,t){var n=mn(ha*bt(t)),r=n*n,i=r*r*r;return[e*Mt(n)/(ha*(wi+3*Mi*r+i*(7*Ci+9*Ai*r))),n*(wi+Mi*r+i*(Ci+Ai*r))]}Ld.invert=function(e,t){for(var n=t,r=n*n,i=r*r*r,s=0,a,o,l;s<tb&&(o=n*(wi+Mi*r+i*(Ci+Ai*r))-t,l=wi+3*Mi*r+i*(7*Ci+9*Ai*r),n-=a=o/l,r=n*n,i=r*r*r,!(Tt(a)<cx));++s);return[ha*e*(wi+3*Mi*r+i*(7*Ci+9*Ai*r))/Mt(n),mn(bt(n)/ha)]};function eb(){return ca(Ld).scale(177.158)}function Rd(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)))]}Rd.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(Tt(i)>wt&&--r>0);return[e/(.8707+(s=n*n)*(-.131979+s*(-.013791+s*s*s*(.003971-.001529*s)))),n]};function nb(){return ca(Rd).scale(175.295)}function rb(e,t){return e.parent===t.parent?1:2}function ib(e){return e.reduce(sb,0)/e.length}function sb(e,t){return e+t.x}function ab(e){return 1+e.reduce(ob,0)}function ob(e,t){return Math.max(e,t.y)}function lb(e){for(var t;t=e.children;)e=t[0];return e}function cb(e){for(var t;t=e.children;)e=t[t.length-1];return e}function ub(){var e=rb,t=1,n=1,r=!1;function i(s){var a,o=0;s.eachAfter(function(h){var f=h.children;f?(h.x=ib(f),h.y=ab(f)):(h.x=a?o+=e(h,a):0,h.y=0,a=h)});var l=lb(s),c=cb(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 hb(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 db(){return this.eachAfter(hb)}function fb(e,t){let n=-1;for(const r of this)e.call(t,r,++n,this);return this}function pb(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 gb(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 mb(e,t){let n=-1;for(const r of this)if(e.call(t,r,++n,this))return r}function vb(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 yb(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function Eb(e){for(var t=this,n=xb(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 xb(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 bb(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function Sb(){return Array.from(this)}function _b(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function Tb(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function*Ob(){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 Di(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=Cb)):t===void 0&&(t=Mb);for(var n=new Li(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 Li(a[o])),s.parent=r,s.depth=r.depth+1;return n.eachBefore(Db)}function wb(){return Di(this).eachBefore(Ab)}function Mb(e){return e.children}function Cb(e){return Array.isArray(e)?e[1]:null}function Ab(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function Db(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function Li(e){this.data=e,this.depth=this.height=0,this.parent=null}Li.prototype=Di.prototype={constructor:Li,count:db,each:fb,eachAfter:gb,eachBefore:pb,find:mb,sum:vb,sort:yb,path:Eb,ancestors:bb,descendants:Sb,leaves:_b,links:Tb,copy:wb,[Symbol.iterator]:Ob};function Lb(e){return e==null?null:Id(e)}function Id(e){if(typeof e!="function")throw new Error;return e}function Kn(){return 0}function Cr(e){return function(){return e}}const Rb=1664525,Ib=1013904223,kd=4294967296;function kb(){let e=1;return()=>(e=(Rb*e+Ib)%kd)/kd}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 $b(e,t){for(var n=0,r=(e=Nb(Array.from(e),t)).length,i=[],s,a;n<r;)s=e[n],a&&Pd(a,s)?++n:(a=Ub(i=Fb(i,s)),n=0);return a}function Fb(e,t){var n,r;if(wl(t,e))return[t];for(n=0;n<e.length;++n)if(da(t,e[n])&&wl(Ri(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(da(Ri(e[n],e[r]),t)&&da(Ri(e[n],t),e[r])&&da(Ri(e[r],t),e[n])&&wl(Nd(e[n],e[r],t),e))return[e[n],e[r],t];throw new Error}function da(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 Pd(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 wl(e,t){for(var n=0;n<t.length;++n)if(!Pd(e,t[n]))return!1;return!0}function Ub(e){switch(e.length){case 1:return Bb(e[0]);case 2:return Ri(e[0],e[1]);case 3:return Nd(e[0],e[1],e[2])}}function Bb(e){return{x:e.x,y:e.y,r:e.r}}function Ri(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 Nd(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,m=l-s,v=d-s,S=r*r+i*i-s*s,E=S-a*a-o*o+l*l,b=S-c*c-u*u+d*d,x=f*p-h*g,_=(p*b-g*E)/(x*2)-r,C=(g*m-p*v)/x,D=(f*E-h*b)/(x*2)-i,B=(h*v-f*m)/x,P=C*C+B*B-1,w=2*(s+_*C+D*B),H=_*_+D*D-s*s,N=-(Math.abs(P)>1e-6?(w+Math.sqrt(w*w-4*P*H))/(2*P):H/w);return{x:r+_+C*N,y:i+D+B*N,r:N}}function $d(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 Fd(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 Ud(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 fa(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;$d(r,n,i=e[2]),n=new fa(n),r=new fa(r),i=new fa(i),n.next=i.previous=r,r.next=n.previous=i,i.next=r.previous=n;t:for(l=3;l<s;++l){$d(n._,r._,i=e[l]),i=new fa(i),c=r.next,u=n.previous,d=r._.r,h=n._.r;do if(d<=h){if(Fd(c._,i._)){r=c,n.next=r,r.previous=n,--l;continue t}d+=c._.r,c=c.next}else{if(Fd(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=Ud(n);(i=i.next)!==r;)(o=Ud(i))<a&&(n=i,a=o);r=n.next}for(n=[r._],i=r;(i=i.next)!==r;)n.push(i._);for(i=$b(n,t),l=0;l<s;++l)n=e[l],n.x-=i.x,n.y-=i.y;return i.r}function Gb(e){return Math.sqrt(e.value)}function Vb(){var e=null,t=1,n=1,r=Kn;function i(s){const a=kb();return s.x=t/2,s.y=n/2,e?s.eachBefore(Bd(e)).eachAfter(Ml(r,.5,a)).eachBefore(Hd(1)):s.eachBefore(Bd(Gb)).eachAfter(Ml(Kn,1,a)).eachAfter(Ml(r,s.r/Math.min(t,n),a)).eachBefore(Hd(Math.min(t,n)/(2*s.r))),s}return i.radius=function(s){return arguments.length?(e=Lb(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:Cr(+s),i):r},i}function Bd(e){return function(t){t.children||(t.r=Math.max(0,+e(t)||0))}}function Ml(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 Hd(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 zb(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 Wb(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 Yb(e,t){return e.parent===t.parent?1:2}function Cl(e){var t=e.children;return t?t[0]:e.t}function Al(e){var t=e.children;return t?t[t.length-1]:e.t}function qb(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 Xb(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 pa(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}pa.prototype=Object.create(Li.prototype);function jb(e){for(var t=new pa(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 pa(s[a],a)),i.parent=n;return(t.parent=new pa(null,0)).children=[t],t}function Kb(){var e=Yb,t=1,n=1,r=null;function i(c){var u=jb(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(S){S.x<d.x&&(d=S),S.x>h.x&&(h=S),S.depth>f.depth&&(f=S)});var p=d===h?1:e(d,h)/2,g=p-d.x,m=t/(h.x+p+g),v=n/(f.depth||1);c.eachBefore(function(S){S.x=(S.x+g)*m,S.y=S.depth*v})}return c}function s(c){var u=c.children,d=c.parent.children,h=c.i?d[c.i-1]:null;if(u){Xb(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],m=h.m,v=f.m,S=p.m,E=g.m,b;p=Al(p),h=Cl(h),p&&h;)g=Cl(g),f=Al(f),f.a=c,b=p.z+S-h.z-m+e(p._,h._),b>0&&(qb(Zb(p,c,d),c,b),m+=b,v+=b),S+=p.m,m+=h.m,E+=g.m,v+=f.m;p&&!Al(f)&&(f.t=p,f.m+=S-v),h&&!Cl(g)&&(g.t=h,g.m+=m-E,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 Qb(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 Jb=(1+Math.sqrt(5))/2;function tS(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,m,v,S,E,b,x,_;u<h;){f=i-n,p=s-r;do m=o[d++].value;while(!m&&d<h);for(v=S=m,x=Math.max(p/f,f/p)/(g*e),_=m*m*x,b=Math.max(S/_,_/v);d<h;++d){if(m+=c=o[d].value,c<v&&(v=c),c>S&&(S=c),_=m*m*x,E=Math.max(S/_,_/v),E>b){m-=c;break}b=E}a.push(l={value:m,dice:f<p,children:o.slice(u,d)}),l.dice?Wb(l,n,r,i,g?r+=p*m/g:s):Qb(l,n,r,g?n+=f*m/g:i,s),g-=m,u=d}return a}const eS=function e(t){function n(r,i,s,a,o){tS(t,r,i,s,a,o)}return n.ratio=function(r){return e((r=+r)>1?r:1)},n}(Jb);function nS(){var e=eS,t=!1,n=1,r=1,i=[0],s=Kn,a=Kn,o=Kn,l=Kn,c=Kn;function u(h){return h.x0=h.y0=0,h.x1=n,h.y1=r,h.eachBefore(d),i=[0],t&&h.eachBefore(zb),h}function d(h){var f=i[h.depth],p=h.x0+f,g=h.y0+f,m=h.x1-f,v=h.y1-f;m<p&&(p=m=(p+m)/2),v<g&&(g=v=(g+v)/2),h.x0=p,h.y0=g,h.x1=m,h.y1=v,h.children&&(f=i[h.depth+1]=s(h)/2,p+=c(h)-f,g+=a(h)-f,m-=o(h)-f,v-=l(h)-f,m<p&&(p=m=(p+m)/2),v<g&&(g=v=(g+v)/2),e(h,p,g,m,v))}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=Id(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:Cr(+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:Cr(+h),u):a},u.paddingRight=function(h){return arguments.length?(o=typeof h=="function"?h:Cr(+h),u):o},u.paddingBottom=function(h){return arguments.length?(l=typeof h=="function"?h:Cr(+h),u):l},u.paddingLeft=function(h){return arguments.length?(c=typeof h=="function"?h:Cr(+h),u):c},u}function Ar(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}const Gd=Symbol("implicit");function ga(){var e=new Pu,t=[],n=[],r=Gd;function i(s){let a=e.get(s);if(a===void 0){if(r!==Gd)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 Pu;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 ga(t,n).unknown(r)},Ar.apply(i,arguments),i}function Ii(){var e=ga().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 m=u0(h).map(function(v){return p+s*v});return n(f?m.reverse():m)}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 Ii(t(),[r,i]).round(o).paddingInner(l).paddingOuter(c).align(u)},Ar.apply(d(),arguments)}function rS(e){return function(){return e}}function iS(e){return+e}var Vd=[0,1];function Dr(e){return e}function Dl(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:rS(isNaN(t)?NaN:.5)}function sS(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function aS(e,t,n){var r=e[0],i=e[1],s=t[0],a=t[1];return i<r?(r=Dl(i,r),s=n(a,s)):(r=Dl(r,i),s=n(s,a)),function(o){return s(r(o))}}function oS(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]=Dl(e[a],e[a+1]),s[a]=n(t[a],t[a+1]);return function(o){var l=So(e,o,1,r)-1;return s[l](i[l](o))}}function Ll(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function zd(){var e=Vd,t=Vd,n=pi,r,i,s,a=Dr,o,l,c;function u(){var h=Math.min(e.length,t.length);return a!==Dr&&(a=sS(e[0],e[h-1])),o=h>2?oS:aS,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),Ee)))(h)))},d.domain=function(h){return arguments.length?(e=Array.from(h,iS),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=gh,u()},d.clamp=function(h){return arguments.length?(a=h?!0:Dr,u()):a!==Dr},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 Wd(){return zd()(Dr,Dr)}function lS(e,t,n,r){var i=To(e,t,n),s;switch(r=Ei(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(s=ox(i,a))&&(r.precision=s),Wh(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(s=lx(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=s-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(s=ax(i))&&(r.precision=s-(r.type==="%")*2);break}}return rl(r)}function Yd(e){var t=e.domain;return e.ticks=function(n){var r=t();return ws(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return lS(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=vr(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 Ge(){var e=Wd();return e.copy=function(){return Ll(e,Ge())},Ar.apply(e,arguments),Yd(e)}function qd(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 Xd(e){return Math.log(e)}function Zd(e){return Math.exp(e)}function cS(e){return-Math.log(-e)}function uS(e){return-Math.exp(-e)}function hS(e){return isFinite(e)?+("1e"+e):e<0?0:e}function dS(e){return e===10?hS:e===Math.E?Math.exp:t=>Math.pow(e,t)}function fS(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 jd(e){return(t,n)=>-e(-t,n)}function pS(e){const t=e(Xd,Zd),n=t.domain;let r=10,i,s;function a(){return i=fS(r),s=dS(r),n()[0]<0?(i=jd(i),s=jd(s),e(cS,uS)):e(Xd,Zd),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 m=o==null?10:+o;let v=[];if(!(r%1)&&f-h<m){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;v.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;v.push(g)}v.length*2<m&&(v=ws(c,u,m))}else v=ws(h,f,Math.min(f-h,m)).map(s);return d?v.reverse():v},t.tickFormat=(o,l)=>{if(o==null&&(o=10),l==null&&(l=r===10?"s":","),typeof l!="function"&&(!(r%1)&&(l=Ei(l)).precision==null&&(l.trim=!0),l=rl(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(qd(n(),{floor:o=>s(Math.floor(i(o))),ceil:o=>s(Math.ceil(i(o)))})),t}function Kd(){const e=pS(zd()).domain([1,10]);return e.copy=()=>Ll(e,Kd()).base(e.base()),Ar.apply(e,arguments),e}function Rl(){var e=0,t=1,n=1,r=[.5],i=[0,1],s;function a(l){return l!=null&&l<=l?i[So(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 Rl().domain([e,t]).range(i).unknown(s)},Ar.apply(Yd(a),arguments)}const Il=new Date,kl=new Date;function Wt(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=>Wt(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)=>(Il.setTime(+s),kl.setTime(+a),e(Il),e(kl),Math.floor(n(Il,kl))),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 ma=Wt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);ma.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Wt(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):ma),ma.range;const yn=1e3,Ce=yn*60,En=Ce*60,xn=En*24,Pl=xn*7,Qd=xn*30,Nl=xn*365,Lr=Wt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*yn)},(e,t)=>(t-e)/yn,e=>e.getUTCSeconds());Lr.range;const $l=Wt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*yn)},(e,t)=>{e.setTime(+e+t*Ce)},(e,t)=>(t-e)/Ce,e=>e.getMinutes());$l.range,Wt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Ce)},(e,t)=>(t-e)/Ce,e=>e.getUTCMinutes()).range;const Fl=Wt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*yn-e.getMinutes()*Ce)},(e,t)=>{e.setTime(+e+t*En)},(e,t)=>(t-e)/En,e=>e.getHours());Fl.range,Wt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*En)},(e,t)=>(t-e)/En,e=>e.getUTCHours()).range;const ki=Wt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Ce)/xn,e=>e.getDate()-1);ki.range;const Ul=Wt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/xn,e=>e.getUTCDate()-1);Ul.range,Wt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/xn,e=>Math.floor(e/xn)).range;function Qn(e){return Wt(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())*Ce)/Pl)}const va=Qn(0),ya=Qn(1),gS=Qn(2),mS=Qn(3),Rr=Qn(4),vS=Qn(5),yS=Qn(6);va.range,ya.range,gS.range,mS.range,Rr.range,vS.range,yS.range;function Jn(e){return Wt(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)/Pl)}const Jd=Jn(0),Ea=Jn(1),ES=Jn(2),xS=Jn(3),Ir=Jn(4),bS=Jn(5),SS=Jn(6);Jd.range,Ea.range,ES.range,xS.range,Ir.range,bS.range,SS.range;const Bl=Wt(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());Bl.range,Wt(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 bn=Wt(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());bn.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Wt(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)}),bn.range;const tr=Wt(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());tr.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Wt(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)}),tr.range;function _S(e,t,n,r,i,s){const a=[[Lr,1,yn],[Lr,5,5*yn],[Lr,15,15*yn],[Lr,30,30*yn],[s,1,Ce],[s,5,5*Ce],[s,15,15*Ce],[s,30,30*Ce],[i,1,En],[i,3,3*En],[i,6,6*En],[i,12,12*En],[r,1,xn],[r,2,2*xn],[n,1,Pl],[t,1,Qd],[t,3,3*Qd],[e,1,Nl]];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=bo(([,,m])=>m).right(a,h);if(f===a.length)return e.every(To(c/Nl,u/Nl,d));if(f===0)return ma.every(Math.max(To(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[TS,OS]=_S(bn,Bl,va,ki,Fl,$l);function Hl(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 Gl(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 Pi(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function wS(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=Ni(i),u=$i(i),d=Ni(s),h=$i(s),f=Ni(a),p=$i(a),g=Ni(o),m=$i(o),v=Ni(l),S=$i(l),E={a:F,A:L,b:U,B:tt,c:null,d:af,e:af,f:ZS,g:s_,G:o_,H:YS,I:qS,j:XS,L:of,m:jS,M:KS,p:X,q:Y,Q:ff,s:pf,S:QS,u:JS,U:t_,V:e_,w:n_,W:r_,x:null,X:null,y:i_,Y:a_,Z:l_,"%":df},b={a:Q,A:ut,b:et,B:K,c:null,d:cf,e:cf,f:d_,g:S_,G:T_,H:c_,I:u_,j:h_,L:uf,m:f_,M:p_,p:nt,q:ht,Q:ff,s:pf,S:g_,u:m_,U:v_,V:y_,w:E_,W:x_,x:null,X:null,y:b_,Y:__,Z:O_,"%":df},x={a:P,A:w,b:H,B:N,c:M,d:rf,e:rf,f:GS,g:nf,G:ef,H:sf,I:sf,j:FS,L:HS,m:$S,M:US,p:B,q:NS,Q:zS,s:WS,S:BS,u:LS,U:RS,V:IS,w:DS,W:kS,x:O,X:$,y:nf,Y:ef,Z:PS,"%":VS};E.x=_(n,E),E.X=_(r,E),E.c=_(t,E),b.x=_(n,b),b.X=_(r,b),b.c=_(t,b);function _(W,j){return function(J){var A=[],G=-1,V=0,xt=W.length,Ut,st,_t;for(J instanceof Date||(J=new Date(+J));++G<xt;)W.charCodeAt(G)===37&&(A.push(W.slice(V,G)),(st=tf[Ut=W.charAt(++G)])!=null?Ut=W.charAt(++G):st=Ut==="e"?" ":"0",(_t=j[Ut])&&(Ut=_t(J,st)),A.push(Ut),V=G+1);return A.push(W.slice(V,G)),A.join("")}}function C(W,j){return function(J){var A=Pi(1900,void 0,1),G=D(A,W,J+="",0),V,xt;if(G!=J.length)return null;if("Q"in A)return new Date(A.Q);if("s"in A)return new Date(A.s*1e3+("L"in A?A.L:0));if(j&&!("Z"in A)&&(A.Z=0),"p"in A&&(A.H=A.H%12+A.p*12),A.m===void 0&&(A.m="q"in A?A.q:0),"V"in A){if(A.V<1||A.V>53)return null;"w"in A||(A.w=1),"Z"in A?(V=Gl(Pi(A.y,0,1)),xt=V.getUTCDay(),V=xt>4||xt===0?Ea.ceil(V):Ea(V),V=Ul.offset(V,(A.V-1)*7),A.y=V.getUTCFullYear(),A.m=V.getUTCMonth(),A.d=V.getUTCDate()+(A.w+6)%7):(V=Hl(Pi(A.y,0,1)),xt=V.getDay(),V=xt>4||xt===0?ya.ceil(V):ya(V),V=ki.offset(V,(A.V-1)*7),A.y=V.getFullYear(),A.m=V.getMonth(),A.d=V.getDate()+(A.w+6)%7)}else("W"in A||"U"in A)&&("w"in A||(A.w="u"in A?A.u%7:"W"in A?1:0),xt="Z"in A?Gl(Pi(A.y,0,1)).getUTCDay():Hl(Pi(A.y,0,1)).getDay(),A.m=0,A.d="W"in A?(A.w+6)%7+A.W*7-(xt+5)%7:A.w+A.U*7-(xt+6)%7);return"Z"in A?(A.H+=A.Z/100|0,A.M+=A.Z%100,Gl(A)):Hl(A)}}function D(W,j,J,A){for(var G=0,V=j.length,xt=J.length,Ut,st;G<V;){if(A>=xt)return-1;if(Ut=j.charCodeAt(G++),Ut===37){if(Ut=j.charAt(G++),st=x[Ut in tf?j.charAt(G++):Ut],!st||(A=st(W,J,A))<0)return-1}else if(Ut!=J.charCodeAt(A++))return-1}return A}function B(W,j,J){var A=c.exec(j.slice(J));return A?(W.p=u.get(A[0].toLowerCase()),J+A[0].length):-1}function P(W,j,J){var A=f.exec(j.slice(J));return A?(W.w=p.get(A[0].toLowerCase()),J+A[0].length):-1}function w(W,j,J){var A=d.exec(j.slice(J));return A?(W.w=h.get(A[0].toLowerCase()),J+A[0].length):-1}function H(W,j,J){var A=v.exec(j.slice(J));return A?(W.m=S.get(A[0].toLowerCase()),J+A[0].length):-1}function N(W,j,J){var A=g.exec(j.slice(J));return A?(W.m=m.get(A[0].toLowerCase()),J+A[0].length):-1}function M(W,j,J){return D(W,t,j,J)}function O(W,j,J){return D(W,n,j,J)}function $(W,j,J){return D(W,r,j,J)}function F(W){return a[W.getDay()]}function L(W){return s[W.getDay()]}function U(W){return l[W.getMonth()]}function tt(W){return o[W.getMonth()]}function X(W){return i[+(W.getHours()>=12)]}function Y(W){return 1+~~(W.getMonth()/3)}function Q(W){return a[W.getUTCDay()]}function ut(W){return s[W.getUTCDay()]}function et(W){return l[W.getUTCMonth()]}function K(W){return o[W.getUTCMonth()]}function nt(W){return i[+(W.getUTCHours()>=12)]}function ht(W){return 1+~~(W.getUTCMonth()/3)}return{format:function(W){var j=_(W+="",E);return j.toString=function(){return W},j},parse:function(W){var j=C(W+="",!1);return j.toString=function(){return W},j},utcFormat:function(W){var j=_(W+="",b);return j.toString=function(){return W},j},utcParse:function(W){var j=C(W+="",!0);return j.toString=function(){return W},j}}}var tf={"-":"",_:" ",0:"0"},Yt=/^\s*\d+/,MS=/^%/,CS=/[\\^$*+?|[\]().{}]/g;function Et(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 AS(e){return e.replace(CS,"\\$&")}function Ni(e){return new RegExp("^(?:"+e.map(AS).join("|")+")","i")}function $i(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function DS(e,t,n){var r=Yt.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function LS(e,t,n){var r=Yt.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function RS(e,t,n){var r=Yt.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function IS(e,t,n){var r=Yt.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function kS(e,t,n){var r=Yt.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function ef(e,t,n){var r=Yt.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function nf(e,t,n){var r=Yt.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function PS(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 NS(e,t,n){var r=Yt.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function $S(e,t,n){var r=Yt.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function rf(e,t,n){var r=Yt.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function FS(e,t,n){var r=Yt.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function sf(e,t,n){var r=Yt.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function US(e,t,n){var r=Yt.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function BS(e,t,n){var r=Yt.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function HS(e,t,n){var r=Yt.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function GS(e,t,n){var r=Yt.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function VS(e,t,n){var r=MS.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function zS(e,t,n){var r=Yt.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function WS(e,t,n){var r=Yt.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function af(e,t){return Et(e.getDate(),t,2)}function YS(e,t){return Et(e.getHours(),t,2)}function qS(e,t){return Et(e.getHours()%12||12,t,2)}function XS(e,t){return Et(1+ki.count(bn(e),e),t,3)}function of(e,t){return Et(e.getMilliseconds(),t,3)}function ZS(e,t){return of(e,t)+"000"}function jS(e,t){return Et(e.getMonth()+1,t,2)}function KS(e,t){return Et(e.getMinutes(),t,2)}function QS(e,t){return Et(e.getSeconds(),t,2)}function JS(e){var t=e.getDay();return t===0?7:t}function t_(e,t){return Et(va.count(bn(e)-1,e),t,2)}function lf(e){var t=e.getDay();return t>=4||t===0?Rr(e):Rr.ceil(e)}function e_(e,t){return e=lf(e),Et(Rr.count(bn(e),e)+(bn(e).getDay()===4),t,2)}function n_(e){return e.getDay()}function r_(e,t){return Et(ya.count(bn(e)-1,e),t,2)}function i_(e,t){return Et(e.getFullYear()%100,t,2)}function s_(e,t){return e=lf(e),Et(e.getFullYear()%100,t,2)}function a_(e,t){return Et(e.getFullYear()%1e4,t,4)}function o_(e,t){var n=e.getDay();return e=n>=4||n===0?Rr(e):Rr.ceil(e),Et(e.getFullYear()%1e4,t,4)}function l_(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Et(t/60|0,"0",2)+Et(t%60,"0",2)}function cf(e,t){return Et(e.getUTCDate(),t,2)}function c_(e,t){return Et(e.getUTCHours(),t,2)}function u_(e,t){return Et(e.getUTCHours()%12||12,t,2)}function h_(e,t){return Et(1+Ul.count(tr(e),e),t,3)}function uf(e,t){return Et(e.getUTCMilliseconds(),t,3)}function d_(e,t){return uf(e,t)+"000"}function f_(e,t){return Et(e.getUTCMonth()+1,t,2)}function p_(e,t){return Et(e.getUTCMinutes(),t,2)}function g_(e,t){return Et(e.getUTCSeconds(),t,2)}function m_(e){var t=e.getUTCDay();return t===0?7:t}function v_(e,t){return Et(Jd.count(tr(e)-1,e),t,2)}function hf(e){var t=e.getUTCDay();return t>=4||t===0?Ir(e):Ir.ceil(e)}function y_(e,t){return e=hf(e),Et(Ir.count(tr(e),e)+(tr(e).getUTCDay()===4),t,2)}function E_(e){return e.getUTCDay()}function x_(e,t){return Et(Ea.count(tr(e)-1,e),t,2)}function b_(e,t){return Et(e.getUTCFullYear()%100,t,2)}function S_(e,t){return e=hf(e),Et(e.getUTCFullYear()%100,t,2)}function __(e,t){return Et(e.getUTCFullYear()%1e4,t,4)}function T_(e,t){var n=e.getUTCDay();return e=n>=4||n===0?Ir(e):Ir.ceil(e),Et(e.getUTCFullYear()%1e4,t,4)}function O_(){return"+0000"}function df(){return"%"}function ff(e){return+e}function pf(e){return Math.floor(+e/1e3)}var kr,gf;w_({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 w_(e){return kr=wS(e),gf=kr.format,kr.parse,kr.utcFormat,kr.utcParse,kr}function M_(e){return new Date(e)}function C_(e){return e instanceof Date?+e:+new Date(+e)}function mf(e,t,n,r,i,s,a,o,l,c){var u=Wd(),d=u.invert,h=u.domain,f=c(".%L"),p=c(":%S"),g=c("%I:%M"),m=c("%I %p"),v=c("%a %d"),S=c("%b %d"),E=c("%B"),b=c("%Y");function x(_){return(l(_)<_?f:o(_)<_?p:a(_)<_?g:s(_)<_?m:r(_)<_?i(_)<_?v:S:n(_)<_?E:b)(_)}return u.invert=function(_){return new Date(d(_))},u.domain=function(_){return arguments.length?h(Array.from(_,C_)):h().map(M_)},u.ticks=function(_){var C=h();return e(C[0],C[C.length-1],_??10)},u.tickFormat=function(_,C){return C==null?x:c(C)},u.nice=function(_){var C=h();return(!_||typeof _.range!="function")&&(_=t(C[0],C[C.length-1],_??10)),_?h(qd(C,_)):u},u.copy=function(){return Ll(u,mf(e,t,n,r,i,s,a,o,l,c))},u}function vf(){return Ar.apply(mf(TS,OS,bn,Bl,va,ki,Fl,$l,Lr,gf).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function pt(e){return function(){return e}}const yf=Math.abs,Jt=Math.atan2,er=Math.cos,A_=Math.max,Vl=Math.min,en=Math.sin,Pr=Math.sqrt,te=1e-12,Fi=Math.PI,xa=Fi/2,ba=2*Fi;function D_(e){return e>1?0:e<-1?Fi:Math.acos(e)}function Ef(e){return e>=1?xa:e<=-1?-xa:Math.asin(e)}function Sa(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 KE(t)}function L_(e){return e.innerRadius}function R_(e){return e.outerRadius}function I_(e){return e.startAngle}function k_(e){return e.endAngle}function P_(e){return e&&e.padAngle}function N_(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<te))return h=(u*(t-s)-d*(e-i))/h,[e+h*l,t+h*c]}function _a(e,t,n,r,i,s,a){var o=e-n,l=t-r,c=(a?s:-s)/Pr(o*o+l*l),u=c*l,d=-c*o,h=e+u,f=t+d,p=n+u,g=r+d,m=(h+p)/2,v=(f+g)/2,S=p-h,E=g-f,b=S*S+E*E,x=i-s,_=h*g-p*f,C=(E<0?-1:1)*Pr(A_(0,x*x*b-_*_)),D=(_*E-S*C)/b,B=(-_*S-E*C)/b,P=(_*E+S*C)/b,w=(-_*S+E*C)/b,H=D-m,N=B-v,M=P-m,O=w-v;return H*H+N*N>M*M+O*O&&(D=P,B=w),{cx:D,cy:B,x01:-u,y01:-d,x11:D*(i/x-1),y11:B*(i/x-1)}}function Ui(){var e=L_,t=R_,n=pt(0),r=null,i=I_,s=k_,a=P_,o=null,l=Sa(c);function c(){var u,d,h=+e.apply(this,arguments),f=+t.apply(this,arguments),p=i.apply(this,arguments)-xa,g=s.apply(this,arguments)-xa,m=yf(g-p),v=g>p;if(o||(o=u=l()),f<h&&(d=f,f=h,h=d),!(f>te))o.moveTo(0,0);else if(m>ba-te)o.moveTo(f*er(p),f*en(p)),o.arc(0,0,f,p,g,!v),h>te&&(o.moveTo(h*er(g),h*en(g)),o.arc(0,0,h,g,p,v));else{var S=p,E=g,b=p,x=g,_=m,C=m,D=a.apply(this,arguments)/2,B=D>te&&(r?+r.apply(this,arguments):Pr(h*h+f*f)),P=Vl(yf(f-h)/2,+n.apply(this,arguments)),w=P,H=P,N,M;if(B>te){var O=Ef(B/h*en(D)),$=Ef(B/f*en(D));(_-=O*2)>te?(O*=v?1:-1,b+=O,x-=O):(_=0,b=x=(p+g)/2),(C-=$*2)>te?($*=v?1:-1,S+=$,E-=$):(C=0,S=E=(p+g)/2)}var F=f*er(S),L=f*en(S),U=h*er(x),tt=h*en(x);if(P>te){var X=f*er(E),Y=f*en(E),Q=h*er(b),ut=h*en(b),et;if(m<Fi)if(et=N_(F,L,Q,ut,X,Y,U,tt)){var K=F-et[0],nt=L-et[1],ht=X-et[0],W=Y-et[1],j=1/en(D_((K*ht+nt*W)/(Pr(K*K+nt*nt)*Pr(ht*ht+W*W)))/2),J=Pr(et[0]*et[0]+et[1]*et[1]);w=Vl(P,(h-J)/(j-1)),H=Vl(P,(f-J)/(j+1))}else w=H=0}C>te?H>te?(N=_a(Q,ut,F,L,f,H,v),M=_a(X,Y,U,tt,f,H,v),o.moveTo(N.cx+N.x01,N.cy+N.y01),H<P?o.arc(N.cx,N.cy,H,Jt(N.y01,N.x01),Jt(M.y01,M.x01),!v):(o.arc(N.cx,N.cy,H,Jt(N.y01,N.x01),Jt(N.y11,N.x11),!v),o.arc(0,0,f,Jt(N.cy+N.y11,N.cx+N.x11),Jt(M.cy+M.y11,M.cx+M.x11),!v),o.arc(M.cx,M.cy,H,Jt(M.y11,M.x11),Jt(M.y01,M.x01),!v))):(o.moveTo(F,L),o.arc(0,0,f,S,E,!v)):o.moveTo(F,L),!(h>te)||!(_>te)?o.lineTo(U,tt):w>te?(N=_a(U,tt,X,Y,h,-w,v),M=_a(F,L,Q,ut,h,-w,v),o.lineTo(N.cx+N.x01,N.cy+N.y01),w<P?o.arc(N.cx,N.cy,w,Jt(N.y01,N.x01),Jt(M.y01,M.x01),!v):(o.arc(N.cx,N.cy,w,Jt(N.y01,N.x01),Jt(N.y11,N.x11),!v),o.arc(0,0,h,Jt(N.cy+N.y11,N.cx+N.x11),Jt(M.cy+M.y11,M.cx+M.x11),v),o.arc(M.cx,M.cy,w,Jt(M.y11,M.x11),Jt(M.y01,M.x01),!v))):o.arc(0,0,h,x,b,v)}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-Fi/2;return[er(d)*u,en(d)*u]},c.innerRadius=function(u){return arguments.length?(e=typeof u=="function"?u:pt(+u),c):e},c.outerRadius=function(u){return arguments.length?(t=typeof u=="function"?u:pt(+u),c):t},c.cornerRadius=function(u){return arguments.length?(n=typeof u=="function"?u:pt(+u),c):n},c.padRadius=function(u){return arguments.length?(r=u==null?null:typeof u=="function"?u:pt(+u),c):r},c.startAngle=function(u){return arguments.length?(i=typeof u=="function"?u:pt(+u),c):i},c.endAngle=function(u){return arguments.length?(s=typeof u=="function"?u:pt(+u),c):s},c.padAngle=function(u){return arguments.length?(a=typeof u=="function"?u:pt(+u),c):a},c.context=function(u){return arguments.length?(o=u??null,c):o},c}var $_=Array.prototype.slice;function Ta(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function xf(e){this._context=e}xf.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 Oa(e){return new xf(e)}function zl(e){return e[0]}function Wl(e){return e[1]}function Bi(e,t){var n=pt(!0),r=null,i=Oa,s=null,a=Sa(o);e=typeof e=="function"?e:e===void 0?zl:pt(e),t=typeof t=="function"?t:t===void 0?Wl:pt(t);function o(l){var c,u=(l=Ta(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:pt(+l),o):e},o.y=function(l){return arguments.length?(t=typeof l=="function"?l:pt(+l),o):t},o.defined=function(l){return arguments.length?(n=typeof l=="function"?l:pt(!!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 Yl(e,t,n){var r=null,i=pt(!0),s=null,a=Oa,o=null,l=Sa(c);e=typeof e=="function"?e:e===void 0?zl:pt(+e),t=typeof t=="function"?t:pt(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?Wl:pt(+n);function c(d){var h,f,p,g=(d=Ta(d)).length,m,v=!1,S,E=new Array(g),b=new Array(g);for(s==null&&(o=a(S=l())),h=0;h<=g;++h){if(!(h<g&&i(m=d[h],h,d))===v)if(v=!v)f=h,o.areaStart(),o.lineStart();else{for(o.lineEnd(),o.lineStart(),p=h-1;p>=f;--p)o.point(E[p],b[p]);o.lineEnd(),o.areaEnd()}v&&(E[h]=+e(m,h,d),b[h]=+t(m,h,d),o.point(r?+r(m,h,d):E[h],n?+n(m,h,d):b[h]))}if(S)return o=null,S+""||null}function u(){return Bi().defined(i).curve(a).context(s)}return c.x=function(d){return arguments.length?(e=typeof d=="function"?d:pt(+d),r=null,c):e},c.x0=function(d){return arguments.length?(e=typeof d=="function"?d:pt(+d),c):e},c.x1=function(d){return arguments.length?(r=d==null?null:typeof d=="function"?d:pt(+d),c):r},c.y=function(d){return arguments.length?(t=typeof d=="function"?d:pt(+d),n=null,c):t},c.y0=function(d){return arguments.length?(t=typeof d=="function"?d:pt(+d),c):t},c.y1=function(d){return arguments.length?(n=d==null?null:typeof d=="function"?d:pt(+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:pt(!!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 F_(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function U_(e){return e}function B_(){var e=U_,t=F_,n=null,r=pt(0),i=pt(ba),s=pt(0);function a(o){var l,c=(o=Ta(o)).length,u,d,h=0,f=new Array(c),p=new Array(c),g=+r.apply(this,arguments),m=Math.min(ba,Math.max(-ba,i.apply(this,arguments)-g)),v,S=Math.min(Math.abs(m)/c,s.apply(this,arguments)),E=S*(m<0?-1:1),b;for(l=0;l<c;++l)(b=p[f[l]=l]=+e(o[l],l,o))>0&&(h+=b);for(t!=null?f.sort(function(x,_){return t(p[x],p[_])}):n!=null&&f.sort(function(x,_){return n(o[x],o[_])}),l=0,d=h?(m-c*E)/h:0;l<c;++l,g=v)u=f[l],b=p[u],v=g+(b>0?b*d:0)+E,p[u]={data:o[u],index:l,value:b,startAngle:g,endAngle:v,padAngle:S};return p}return a.value=function(o){return arguments.length?(e=typeof o=="function"?o:pt(+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:pt(+o),a):r},a.endAngle=function(o){return arguments.length?(i=typeof o=="function"?o:pt(+o),a):i},a.padAngle=function(o){return arguments.length?(s=typeof o=="function"?o:pt(+o),a):s},a}var H_=Sf(Oa);function bf(e){this._curve=e}bf.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 Sf(e){function t(n){return new bf(e(n))}return t._curve=e,t}function G_(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(Sf(n)):t()._curve},e}function V_(){return G_(Bi().curve(H_))}class z_{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 W_(e){return new z_(e,!0)}function Y_(e){return e.source}function q_(e){return e.target}function X_(e){let t=Y_,n=q_,r=zl,i=Wl,s=null,a=null,o=Sa(l);function l(){let c;const u=$_.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:pt(+c),l):r},l.y=function(c){return arguments.length?(i=typeof c=="function"?c:pt(+c),l):i},l.context=function(c){return arguments.length?(c==null?s=a=null:a=e(s=c),l):s},l}function Z_(){return X_(W_)}function Nn(){}function wa(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 Ma(e){this._context=e}Ma.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:wa(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:wa(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function j_(e){return new Ma(e)}function _f(e){this._context=e}_f.prototype={areaStart:Nn,areaEnd:Nn,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:wa(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function K_(e){return new _f(e)}function Tf(e){this._context=e}Tf.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:wa(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Q_(e){return new Tf(e)}function Of(e,t){this._basis=new Ma(e),this._beta=t}Of.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 J_=function e(t){function n(r){return t===1?new Ma(r):new Of(r,t)}return n.beta=function(r){return e(+r)},n}(.85);function Ca(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 ql(e,t){this._context=e,this._k=(1-t)/6}ql.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:Ca(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:Ca(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 tT=function e(t){function n(r){return new ql(r,t)}return n.tension=function(r){return e(+r)},n}(0);function Xl(e,t){this._context=e,this._k=(1-t)/6}Xl.prototype={areaStart:Nn,areaEnd:Nn,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:Ca(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 eT=function e(t){function n(r){return new Xl(r,t)}return n.tension=function(r){return e(+r)},n}(0);function Zl(e,t){this._context=e,this._k=(1-t)/6}Zl.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:Ca(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 nT=function e(t){function n(r){return new Zl(r,t)}return n.tension=function(r){return e(+r)},n}(0);function jl(e,t,n){var r=e._x1,i=e._y1,s=e._x2,a=e._y2;if(e._l01_a>te){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>te){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 wf(e,t){this._context=e,this._alpha=t}wf.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:jl(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 rT=function e(t){function n(r){return t?new wf(r,t):new ql(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function Mf(e,t){this._context=e,this._alpha=t}Mf.prototype={areaStart:Nn,areaEnd:Nn,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:jl(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 iT=function e(t){function n(r){return t?new Mf(r,t):new Xl(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function Cf(e,t){this._context=e,this._alpha=t}Cf.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:jl(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 sT=function e(t){function n(r){return t?new Cf(r,t):new Zl(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function Af(e){this._context=e}Af.prototype={areaStart:Nn,areaEnd:Nn,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 Df(e){return new Af(e)}function Lf(e){return e<0?-1:1}function Rf(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(Lf(s)+Lf(a))*Math.min(Math.abs(s),Math.abs(a),.5*Math.abs(o))||0}function If(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function Kl(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 Aa(e){this._context=e}Aa.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:Kl(this,this._t0,If(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,Kl(this,If(this,n=Rf(this,e,t)),n);break;default:Kl(this,this._t0,n=Rf(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function kf(e){this._context=new Pf(e)}(kf.prototype=Object.create(Aa.prototype)).point=function(e,t){Aa.prototype.point.call(this,t,e)};function Pf(e){this._context=e}Pf.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 aT(e){return new Aa(e)}function oT(e){return new kf(e)}function Nf(e){this._context=e}Nf.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=$f(e),i=$f(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 $f(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 lT(e){return new Nf(e)}function Da(e,t){this._context=e,this._t=t}Da.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 cT(e){return new Da(e,.5)}function uT(e){return new Da(e,0)}function hT(e){return new Da(e,1)}function Ff(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 Uf(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function dT(e,t){return e[t]}function fT(e){const t=[];return t.key=e,t}function Ql(){var e=pt([]),t=Uf,n=Ff,r=dT;function i(s){var a=Array.from(e.apply(this,arguments),fT),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=Ta(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:pt(Array.from(s)),i):e},i.value=function(s){return arguments.length?(r=typeof s=="function"?s:pt(+s),i):r},i.order=function(s){return arguments.length?(t=s==null?Uf:typeof s=="function"?s:pt(Array.from(s)),i):t},i.offset=function(s){return arguments.length?(n=s??Ff,i):n},i}function pT(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 Hi(e,t,n){this.k=e,this.x=t,this.y=n}Hi.prototype={constructor:Hi,scale:function(e){return e===1?this:new Hi(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Hi(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+")"}},Hi.prototype;var Bf=typeof global=="object"&&global&&global.Object===Object&&global,gT=typeof self=="object"&&self&&self.Object===Object&&self,Ve=Bf||gT||Function("return this")(),Ae=Ve.Symbol,Hf=Object.prototype,mT=Hf.hasOwnProperty,vT=Hf.toString,Gi=Ae?Ae.toStringTag:void 0;function yT(e){var t=mT.call(e,Gi),n=e[Gi];try{e[Gi]=void 0;var r=!0}catch{}var i=vT.call(e);return r&&(t?e[Gi]=n:delete e[Gi]),i}var ET=Object.prototype,xT=ET.toString;function bT(e){return xT.call(e)}var ST="[object Null]",_T="[object Undefined]",Gf=Ae?Ae.toStringTag:void 0;function nr(e){return e==null?e===void 0?_T:ST:Gf&&Gf in Object(e)?yT(e):bT(e)}function nn(e){return e!=null&&typeof e=="object"}var TT="[object Symbol]";function La(e){return typeof e=="symbol"||nn(e)&&nr(e)==TT}function Jl(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 Xt=Array.isArray,Vf=Ae?Ae.prototype:void 0,zf=Vf?Vf.toString:void 0;function Wf(e){if(typeof e=="string")return e;if(Xt(e))return Jl(e,Wf)+"";if(La(e))return zf?zf.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var OT=/\s/;function wT(e){for(var t=e.length;t--&&OT.test(e.charAt(t)););return t}var MT=/^\s+/;function CT(e){return e&&e.slice(0,wT(e)+1).replace(MT,"")}function De(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Yf=NaN,AT=/^[-+]0x[0-9a-f]+$/i,DT=/^0b[01]+$/i,LT=/^0o[0-7]+$/i,RT=parseInt;function Nr(e){if(typeof e=="number")return e;if(La(e))return Yf;if(De(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=De(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=CT(e);var n=DT.test(e);return n||LT.test(e)?RT(e.slice(2),n?2:8):AT.test(e)?Yf:+e}function tc(e){return e}var IT="[object AsyncFunction]",kT="[object Function]",PT="[object GeneratorFunction]",NT="[object Proxy]";function ec(e){if(!De(e))return!1;var t=nr(e);return t==kT||t==PT||t==IT||t==NT}var nc=Ve["__core-js_shared__"],qf=function(){var e=/[^.]+$/.exec(nc&&nc.keys&&nc.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function $T(e){return!!qf&&qf in e}var FT=Function.prototype,UT=FT.toString;function rr(e){if(e!=null){try{return UT.call(e)}catch{}try{return e+""}catch{}}return""}var BT=/[\\^$.*+?()[\]{}|]/g,HT=/^\[object .+?Constructor\]$/,GT=Function.prototype,VT=Object.prototype,zT=GT.toString,WT=VT.hasOwnProperty,YT=RegExp("^"+zT.call(WT).replace(BT,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function qT(e){if(!De(e)||$T(e))return!1;var t=ec(e)?YT:HT;return t.test(rr(e))}function XT(e,t){return e==null?void 0:e[t]}function ir(e,t){var n=XT(e,t);return qT(n)?n:void 0}var rc=ir(Ve,"WeakMap"),Xf=Object.create,ZT=function(){function e(){}return function(t){if(!De(t))return{};if(Xf)return Xf(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function jT(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 KT(){}function Zf(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var QT=800,JT=16,tO=Date.now;function eO(e){var t=0,n=0;return function(){var r=tO(),i=JT-(r-n);if(n=r,i>0){if(++t>=QT)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function nO(e){return function(){return e}}var Ra=function(){try{var e=ir(Object,"defineProperty");return e({},"",{}),e}catch{}}(),rO=Ra?function(e,t){return Ra(e,"toString",{configurable:!0,enumerable:!1,value:nO(t),writable:!0})}:tc,jf=eO(rO);function iO(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}function sO(e,t,n,r){for(var i=e.length,s=n+-1;++s<i;)if(t(e[s],s,e))return s;return-1}function aO(e){return e!==e}function oO(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}function lO(e,t,n){return t===t?oO(e,t,n):sO(e,aO,n)}function cO(e,t){var n=e==null?0:e.length;return!!n&&lO(e,t,0)>-1}var uO=9007199254740991,hO=/^(?:0|[1-9]\d*)$/;function ic(e,t){var n=typeof e;return t=t??uO,!!t&&(n=="number"||n!="symbol"&&hO.test(e))&&e>-1&&e%1==0&&e<t}function Ia(e,t,n){t=="__proto__"&&Ra?Ra(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function Vi(e,t){return e===t||e!==e&&t!==t}var dO=Object.prototype,fO=dO.hasOwnProperty;function Kf(e,t,n){var r=e[t];(!(fO.call(e,t)&&Vi(r,n))||n===void 0&&!(t in e))&&Ia(e,t,n)}function $r(e,t,n,r){var i=!n;n||(n={});for(var s=-1,a=t.length;++s<a;){var o=t[s],l=void 0;l===void 0&&(l=e[o]),i?Ia(n,o,l):Kf(n,o,l)}return n}var Qf=Math.max;function Jf(e,t,n){return t=Qf(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,s=Qf(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),jT(e,this,o)}}function sc(e,t){return jf(Jf(e,t,tc),e+"")}var pO=9007199254740991;function ac(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=pO}function sr(e){return e!=null&&ac(e.length)&&!ec(e)}function gO(e,t,n){if(!De(n))return!1;var r=typeof t;return(r=="number"?sr(n)&&ic(t,n.length):r=="string"&&t in n)?Vi(n[t],e):!1}function mO(e){return sc(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&&gO(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 vO=Object.prototype;function ka(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||vO;return e===n}function yO(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var EO="[object Arguments]";function tp(e){return nn(e)&&nr(e)==EO}var ep=Object.prototype,xO=ep.hasOwnProperty,bO=ep.propertyIsEnumerable,Fr=tp(function(){return arguments}())?tp:function(e){return nn(e)&&xO.call(e,"callee")&&!bO.call(e,"callee")};function SO(){return!1}var np=typeof q=="object"&&q&&!q.nodeType&&q,rp=np&&typeof module=="object"&&module&&!module.nodeType&&module,_O=rp&&rp.exports===np,ip=_O?Ve.Buffer:void 0,TO=ip?ip.isBuffer:void 0,Ur=TO||SO,OO="[object Arguments]",wO="[object Array]",MO="[object Boolean]",CO="[object Date]",AO="[object Error]",DO="[object Function]",LO="[object Map]",RO="[object Number]",IO="[object Object]",kO="[object RegExp]",PO="[object Set]",NO="[object String]",$O="[object WeakMap]",FO="[object ArrayBuffer]",UO="[object DataView]",BO="[object Float32Array]",HO="[object Float64Array]",GO="[object Int8Array]",VO="[object Int16Array]",zO="[object Int32Array]",WO="[object Uint8Array]",YO="[object Uint8ClampedArray]",qO="[object Uint16Array]",XO="[object Uint32Array]",Rt={};Rt[BO]=Rt[HO]=Rt[GO]=Rt[VO]=Rt[zO]=Rt[WO]=Rt[YO]=Rt[qO]=Rt[XO]=!0,Rt[OO]=Rt[wO]=Rt[FO]=Rt[MO]=Rt[UO]=Rt[CO]=Rt[AO]=Rt[DO]=Rt[LO]=Rt[RO]=Rt[IO]=Rt[kO]=Rt[PO]=Rt[NO]=Rt[$O]=!1;function ZO(e){return nn(e)&&ac(e.length)&&!!Rt[nr(e)]}function oc(e){return function(t){return e(t)}}var sp=typeof q=="object"&&q&&!q.nodeType&&q,zi=sp&&typeof module=="object"&&module&&!module.nodeType&&module,jO=zi&&zi.exports===sp,lc=jO&&Bf.process,Br=function(){try{var e=zi&&zi.require&&zi.require("util").types;return e||lc&&lc.binding&&lc.binding("util")}catch{}}(),ap=Br&&Br.isTypedArray,Pa=ap?oc(ap):ZO,KO=Object.prototype,QO=KO.hasOwnProperty;function op(e,t){var n=Xt(e),r=!n&&Fr(e),i=!n&&!r&&Ur(e),s=!n&&!r&&!i&&Pa(e),a=n||r||i||s,o=a?yO(e.length,String):[],l=o.length;for(var c in e)(t||QO.call(e,c))&&!(a&&(c=="length"||i&&(c=="offset"||c=="parent")||s&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||ic(c,l)))&&o.push(c);return o}function lp(e,t){return function(n){return e(t(n))}}var JO=lp(Object.keys,Object),tw=Object.prototype,ew=tw.hasOwnProperty;function cp(e){if(!ka(e))return JO(e);var t=[];for(var n in Object(e))ew.call(e,n)&&n!="constructor"&&t.push(n);return t}function Wi(e){return sr(e)?op(e):cp(e)}function nw(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var rw=Object.prototype,iw=rw.hasOwnProperty;function sw(e){if(!De(e))return nw(e);var t=ka(e),n=[];for(var r in e)r=="constructor"&&(t||!iw.call(e,r))||n.push(r);return n}function Yi(e){return sr(e)?op(e,!0):sw(e)}var aw=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ow=/^\w*$/;function cc(e,t){if(Xt(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||La(e)?!0:ow.test(e)||!aw.test(e)||t!=null&&e in Object(t)}var qi=ir(Object,"create");function lw(){this.__data__=qi?qi(null):{},this.size=0}function cw(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var uw="__lodash_hash_undefined__",hw=Object.prototype,dw=hw.hasOwnProperty;function fw(e){var t=this.__data__;if(qi){var n=t[e];return n===uw?void 0:n}return dw.call(t,e)?t[e]:void 0}var pw=Object.prototype,gw=pw.hasOwnProperty;function mw(e){var t=this.__data__;return qi?t[e]!==void 0:gw.call(t,e)}var vw="__lodash_hash_undefined__";function yw(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=qi&&t===void 0?vw:t,this}function ar(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])}}ar.prototype.clear=lw,ar.prototype.delete=cw,ar.prototype.get=fw,ar.prototype.has=mw,ar.prototype.set=yw;function Ew(){this.__data__=[],this.size=0}function Na(e,t){for(var n=e.length;n--;)if(Vi(e[n][0],t))return n;return-1}var xw=Array.prototype,bw=xw.splice;function Sw(e){var t=this.__data__,n=Na(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():bw.call(t,n,1),--this.size,!0}function _w(e){var t=this.__data__,n=Na(t,e);return n<0?void 0:t[n][1]}function Tw(e){return Na(this.__data__,e)>-1}function Ow(e,t){var n=this.__data__,r=Na(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function Sn(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])}}Sn.prototype.clear=Ew,Sn.prototype.delete=Sw,Sn.prototype.get=_w,Sn.prototype.has=Tw,Sn.prototype.set=Ow;var Xi=ir(Ve,"Map");function ww(){this.size=0,this.__data__={hash:new ar,map:new(Xi||Sn),string:new ar}}function Mw(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function $a(e,t){var n=e.__data__;return Mw(t)?n[typeof t=="string"?"string":"hash"]:n.map}function Cw(e){var t=$a(this,e).delete(e);return this.size-=t?1:0,t}function Aw(e){return $a(this,e).get(e)}function Dw(e){return $a(this,e).has(e)}function Lw(e,t){var n=$a(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function _n(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])}}_n.prototype.clear=ww,_n.prototype.delete=Cw,_n.prototype.get=Aw,_n.prototype.has=Dw,_n.prototype.set=Lw;var Rw="Expected a function";function uc(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Rw);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(uc.Cache||_n),n}uc.Cache=_n;var Iw=500;function kw(e){var t=uc(e,function(r){return n.size===Iw&&n.clear(),r}),n=t.cache;return t}var Pw=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Nw=/\\(\\)?/g,$w=kw(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Pw,function(n,r,i,s){t.push(i?s.replace(Nw,"$1"):r||n)}),t});function Zi(e){return e==null?"":Wf(e)}function Fa(e,t){return Xt(e)?e:cc(e,t)?[e]:$w(Zi(e))}function ji(e){if(typeof e=="string"||La(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function hc(e,t){t=Fa(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[ji(t[n++])];return n&&n==r?e:void 0}function yt(e,t,n){var r=e==null?void 0:hc(e,t);return r===void 0?n:r}function dc(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var up=Ae?Ae.isConcatSpreadable:void 0;function Fw(e){return Xt(e)||Fr(e)||!!(up&&e&&e[up])}function Ua(e,t,n,r,i){var s=-1,a=e.length;for(n||(n=Fw),i||(i=[]);++s<a;){var o=e[s];t>0&&n(o)?t>1?Ua(o,t-1,n,r,i):dc(i,o):r||(i[i.length]=o)}return i}function fc(e){var t=e==null?0:e.length;return t?Ua(e,1):[]}function Uw(e){return jf(Jf(e,void 0,fc),e+"")}var pc=lp(Object.getPrototypeOf,Object),Bw="[object Object]",Hw=Function.prototype,Gw=Object.prototype,hp=Hw.toString,Vw=Gw.hasOwnProperty,zw=hp.call(Object);function dp(e){if(!nn(e)||nr(e)!=Bw)return!1;var t=pc(e);if(t===null)return!0;var n=Vw.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&hp.call(n)==zw}function fp(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 Ww(e,t,n){var r=e.length;return n=n===void 0?r:n,fp(e,t,n)}var Yw="\\ud800-\\udfff",qw="\\u0300-\\u036f",Xw="\\ufe20-\\ufe2f",Zw="\\u20d0-\\u20ff",jw=qw+Xw+Zw,Kw="\\ufe0e\\ufe0f",Qw="\\u200d",Jw=RegExp("["+Qw+Yw+jw+Kw+"]");function pp(e){return Jw.test(e)}function tM(e){return e.split("")}var gp="\\ud800-\\udfff",eM="\\u0300-\\u036f",nM="\\ufe20-\\ufe2f",rM="\\u20d0-\\u20ff",iM=eM+nM+rM,sM="\\ufe0e\\ufe0f",aM="["+gp+"]",gc="["+iM+"]",mc="\\ud83c[\\udffb-\\udfff]",oM="(?:"+gc+"|"+mc+")",mp="[^"+gp+"]",vp="(?:\\ud83c[\\udde6-\\uddff]){2}",yp="[\\ud800-\\udbff][\\udc00-\\udfff]",lM="\\u200d",Ep=oM+"?",xp="["+sM+"]?",cM="(?:"+lM+"(?:"+[mp,vp,yp].join("|")+")"+xp+Ep+")*",uM=xp+Ep+cM,hM="(?:"+[mp+gc+"?",gc,vp,yp,aM].join("|")+")",dM=RegExp(mc+"(?="+mc+")|"+hM+uM,"g");function fM(e){return e.match(dM)||[]}function pM(e){return pp(e)?fM(e):tM(e)}function gM(e){return function(t){t=Zi(t);var n=pp(t)?pM(t):void 0,r=n?n[0]:t.charAt(0),i=n?Ww(n,1).join(""):t.slice(1);return r[e]()+i}}var mM=gM("toUpperCase");function vM(e){return mM(Zi(e).toLowerCase())}function yM(e,t,n,r){for(var i=-1,s=e==null?0:e.length;++i<s;)n=t(n,e[i],i,e);return n}function EM(e){return function(t){return e==null?void 0:e[t]}}var xM={À:"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"},bM=EM(xM),SM=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,_M="\\u0300-\\u036f",TM="\\ufe20-\\ufe2f",OM="\\u20d0-\\u20ff",wM=_M+TM+OM,MM="["+wM+"]",CM=RegExp(MM,"g");function AM(e){return e=Zi(e),e&&e.replace(SM,bM).replace(CM,"")}var DM=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function LM(e){return e.match(DM)||[]}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 bp="\\ud800-\\udfff",kM="\\u0300-\\u036f",PM="\\ufe20-\\ufe2f",NM="\\u20d0-\\u20ff",$M=kM+PM+NM,Sp="\\u2700-\\u27bf",_p="a-z\\xdf-\\xf6\\xf8-\\xff",FM="\\xac\\xb1\\xd7\\xf7",UM="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",BM="\\u2000-\\u206f",HM=" \\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",Tp="A-Z\\xc0-\\xd6\\xd8-\\xde",GM="\\ufe0e\\ufe0f",Op=FM+UM+BM+HM,wp="['’]",Mp="["+Op+"]",VM="["+$M+"]",Cp="\\d+",zM="["+Sp+"]",Ap="["+_p+"]",Dp="[^"+bp+Op+Cp+Sp+_p+Tp+"]",WM="\\ud83c[\\udffb-\\udfff]",YM="(?:"+VM+"|"+WM+")",qM="[^"+bp+"]",Lp="(?:\\ud83c[\\udde6-\\uddff]){2}",Rp="[\\ud800-\\udbff][\\udc00-\\udfff]",Hr="["+Tp+"]",XM="\\u200d",Ip="(?:"+Ap+"|"+Dp+")",ZM="(?:"+Hr+"|"+Dp+")",kp="(?:"+wp+"(?:d|ll|m|re|s|t|ve))?",Pp="(?:"+wp+"(?:D|LL|M|RE|S|T|VE))?",Np=YM+"?",$p="["+GM+"]?",jM="(?:"+XM+"(?:"+[qM,Lp,Rp].join("|")+")"+$p+Np+")*",KM="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",QM="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",JM=$p+Np+jM,tC="(?:"+[zM,Lp,Rp].join("|")+")"+JM,eC=RegExp([Hr+"?"+Ap+"+"+kp+"(?="+[Mp,Hr,"$"].join("|")+")",ZM+"+"+Pp+"(?="+[Mp,Hr+Ip,"$"].join("|")+")",Hr+"?"+Ip+"+"+kp,Hr+"+"+Pp,QM,KM,Cp,tC].join("|"),"g");function nC(e){return e.match(eC)||[]}function rC(e,t,n){return e=Zi(e),t=t,t===void 0?IM(e)?nC(e):LM(e):e.match(t)||[]}var iC="['’]",sC=RegExp(iC,"g");function Fp(e){return function(t){return yM(rC(AM(t).replace(sC,"")),e,"")}}var aC=Fp(function(e,t,n){return t=t.toLowerCase(),e+(n?vM(t):t)});function oC(e,t,n){return e===e&&(n!==void 0&&(e=e<=n?e:n),t!==void 0&&(e=e>=t?e:t)),e}function Up(e,t,n){return n===void 0&&(n=t,t=void 0),n!==void 0&&(n=Nr(n),n=n===n?n:0),t!==void 0&&(t=Nr(t),t=t===t?t:0),oC(Nr(e),t,n)}function lC(){this.__data__=new Sn,this.size=0}function cC(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function uC(e){return this.__data__.get(e)}function hC(e){return this.__data__.has(e)}var dC=200;function fC(e,t){var n=this.__data__;if(n instanceof Sn){var r=n.__data__;if(!Xi||r.length<dC-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new _n(r)}return n.set(e,t),this.size=n.size,this}function ze(e){var t=this.__data__=new Sn(e);this.size=t.size}ze.prototype.clear=lC,ze.prototype.delete=cC,ze.prototype.get=uC,ze.prototype.has=hC,ze.prototype.set=fC;function pC(e,t){return e&&$r(t,Wi(t),e)}function gC(e,t){return e&&$r(t,Yi(t),e)}var Bp=typeof q=="object"&&q&&!q.nodeType&&q,Hp=Bp&&typeof module=="object"&&module&&!module.nodeType&&module,mC=Hp&&Hp.exports===Bp,Gp=mC?Ve.Buffer:void 0,Vp=Gp?Gp.allocUnsafe:void 0;function zp(e,t){if(t)return e.slice();var n=e.length,r=Vp?Vp(n):new e.constructor(n);return e.copy(r),r}function vC(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 Wp(){return[]}var yC=Object.prototype,EC=yC.propertyIsEnumerable,Yp=Object.getOwnPropertySymbols,vc=Yp?function(e){return e==null?[]:(e=Object(e),vC(Yp(e),function(t){return EC.call(e,t)}))}:Wp;function xC(e,t){return $r(e,vc(e),t)}var bC=Object.getOwnPropertySymbols,qp=bC?function(e){for(var t=[];e;)dc(t,vc(e)),e=pc(e);return t}:Wp;function SC(e,t){return $r(e,qp(e),t)}function Xp(e,t,n){var r=t(e);return Xt(e)?r:dc(r,n(e))}function yc(e){return Xp(e,Wi,vc)}function Zp(e){return Xp(e,Yi,qp)}var Ec=ir(Ve,"DataView"),xc=ir(Ve,"Promise"),Gr=ir(Ve,"Set"),jp="[object Map]",_C="[object Object]",Kp="[object Promise]",Qp="[object Set]",Jp="[object WeakMap]",tg="[object DataView]",TC=rr(Ec),OC=rr(Xi),wC=rr(xc),MC=rr(Gr),CC=rr(rc),Le=nr;(Ec&&Le(new Ec(new ArrayBuffer(1)))!=tg||Xi&&Le(new Xi)!=jp||xc&&Le(xc.resolve())!=Kp||Gr&&Le(new Gr)!=Qp||rc&&Le(new rc)!=Jp)&&(Le=function(e){var t=nr(e),n=t==_C?e.constructor:void 0,r=n?rr(n):"";if(r)switch(r){case TC:return tg;case OC:return jp;case wC:return Kp;case MC:return Qp;case CC:return Jp}return t});var AC=Object.prototype,DC=AC.hasOwnProperty;function LC(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&DC.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var Ba=Ve.Uint8Array;function bc(e){var t=new e.constructor(e.byteLength);return new Ba(t).set(new Ba(e)),t}function RC(e,t){var n=t?bc(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var IC=/\w*$/;function kC(e){var t=new e.constructor(e.source,IC.exec(e));return t.lastIndex=e.lastIndex,t}var eg=Ae?Ae.prototype:void 0,ng=eg?eg.valueOf:void 0;function PC(e){return ng?Object(ng.call(e)):{}}function rg(e,t){var n=t?bc(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var NC="[object Boolean]",$C="[object Date]",FC="[object Map]",UC="[object Number]",BC="[object RegExp]",HC="[object Set]",GC="[object String]",VC="[object Symbol]",zC="[object ArrayBuffer]",WC="[object DataView]",YC="[object Float32Array]",qC="[object Float64Array]",XC="[object Int8Array]",ZC="[object Int16Array]",jC="[object Int32Array]",KC="[object Uint8Array]",QC="[object Uint8ClampedArray]",JC="[object Uint16Array]",tA="[object Uint32Array]";function eA(e,t,n){var r=e.constructor;switch(t){case zC:return bc(e);case NC:case $C:return new r(+e);case WC:return RC(e,n);case YC:case qC:case XC:case ZC:case jC:case KC:case QC:case JC:case tA:return rg(e,n);case FC:return new r;case UC:case GC:return new r(e);case BC:return kC(e);case HC:return new r;case VC:return PC(e)}}function ig(e){return typeof e.constructor=="function"&&!ka(e)?ZT(pc(e)):{}}var nA="[object Map]";function rA(e){return nn(e)&&Le(e)==nA}var sg=Br&&Br.isMap,iA=sg?oc(sg):rA,sA="[object Set]";function aA(e){return nn(e)&&Le(e)==sA}var ag=Br&&Br.isSet,oA=ag?oc(ag):aA,lA=1,cA=2,uA=4,og="[object Arguments]",hA="[object Array]",dA="[object Boolean]",fA="[object Date]",pA="[object Error]",lg="[object Function]",gA="[object GeneratorFunction]",mA="[object Map]",vA="[object Number]",cg="[object Object]",yA="[object RegExp]",EA="[object Set]",xA="[object String]",bA="[object Symbol]",SA="[object WeakMap]",_A="[object ArrayBuffer]",TA="[object DataView]",OA="[object Float32Array]",wA="[object Float64Array]",MA="[object Int8Array]",CA="[object Int16Array]",AA="[object Int32Array]",DA="[object Uint8Array]",LA="[object Uint8ClampedArray]",RA="[object Uint16Array]",IA="[object Uint32Array]",Dt={};Dt[og]=Dt[hA]=Dt[_A]=Dt[TA]=Dt[dA]=Dt[fA]=Dt[OA]=Dt[wA]=Dt[MA]=Dt[CA]=Dt[AA]=Dt[mA]=Dt[vA]=Dt[cg]=Dt[yA]=Dt[EA]=Dt[xA]=Dt[bA]=Dt[DA]=Dt[LA]=Dt[RA]=Dt[IA]=!0,Dt[pA]=Dt[lg]=Dt[SA]=!1;function Ki(e,t,n,r,i,s){var a,o=t&lA,l=t&cA,c=t&uA;if(n&&(a=i?n(e,r,i,s):n(e)),a!==void 0)return a;if(!De(e))return e;var u=Xt(e);if(u){if(a=LC(e),!o)return Zf(e,a)}else{var d=Le(e),h=d==lg||d==gA;if(Ur(e))return zp(e,o);if(d==cg||d==og||h&&!i){if(a=l||h?{}:ig(e),!o)return l?SC(e,gC(a,e)):xC(e,pC(a,e))}else{if(!Dt[d])return i?e:{};a=eA(e,d,o)}}s||(s=new ze);var f=s.get(e);if(f)return f;s.set(e,a),oA(e)?e.forEach(function(m){a.add(Ki(m,t,n,m,e,s))}):iA(e)&&e.forEach(function(m,v){a.set(v,Ki(m,t,n,v,e,s))});var p=c?l?Zp:yc:l?Yi:Wi,g=u?void 0:p(e);return iO(g||e,function(m,v){g&&(v=m,m=e[v]),Kf(a,v,Ki(m,t,n,v,e,s))}),a}var kA=1,PA=4;function Tn(e){return Ki(e,kA|PA)}var NA="__lodash_hash_undefined__";function $A(e){return this.__data__.set(e,NA),this}function FA(e){return this.__data__.has(e)}function Qi(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new _n;++t<n;)this.add(e[t])}Qi.prototype.add=Qi.prototype.push=$A,Qi.prototype.has=FA;function ug(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 hg(e,t){return e.has(t)}var UA=1,BA=2;function dg(e,t,n,r,i,s){var a=n&UA,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&BA?new Qi:void 0;for(s.set(e,t),s.set(t,e);++d<o;){var p=e[d],g=t[d];if(r)var m=a?r(g,p,d,t,e,s):r(p,g,d,e,t,s);if(m!==void 0){if(m)continue;h=!1;break}if(f){if(!ug(t,function(v,S){if(!hg(f,S)&&(p===v||i(p,v,n,r,s)))return f.push(S)})){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 HA(e){var t=-1,n=Array(e.size);return e.forEach(function(r,i){n[++t]=[i,r]}),n}function Sc(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var GA=1,VA=2,zA="[object Boolean]",WA="[object Date]",YA="[object Error]",qA="[object Map]",XA="[object Number]",ZA="[object RegExp]",jA="[object Set]",KA="[object String]",QA="[object Symbol]",JA="[object ArrayBuffer]",tD="[object DataView]",fg=Ae?Ae.prototype:void 0,_c=fg?fg.valueOf:void 0;function eD(e,t,n,r,i,s,a){switch(n){case tD:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case JA:return!(e.byteLength!=t.byteLength||!s(new Ba(e),new Ba(t)));case zA:case WA:case XA:return Vi(+e,+t);case YA:return e.name==t.name&&e.message==t.message;case ZA:case KA:return e==t+"";case qA:var o=HA;case jA:var l=r&GA;if(o||(o=Sc),e.size!=t.size&&!l)return!1;var c=a.get(e);if(c)return c==t;r|=VA,a.set(e,t);var u=dg(o(e),o(t),r,i,s,a);return a.delete(e),u;case QA:if(_c)return _c.call(e)==_c.call(t)}return!1}var nD=1,rD=Object.prototype,iD=rD.hasOwnProperty;function sD(e,t,n,r,i,s){var a=n&nD,o=yc(e),l=o.length,c=yc(t),u=c.length;if(l!=u&&!a)return!1;for(var d=l;d--;){var h=o[d];if(!(a?h in t:iD.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 m=a;++d<l;){h=o[d];var v=e[h],S=t[h];if(r)var E=a?r(S,v,h,t,e,s):r(v,S,h,e,t,s);if(!(E===void 0?v===S||i(v,S,n,r,s):E)){g=!1;break}m||(m=h=="constructor")}if(g&&!m){var b=e.constructor,x=t.constructor;b!=x&&"constructor"in e&&"constructor"in t&&!(typeof b=="function"&&b instanceof b&&typeof x=="function"&&x instanceof x)&&(g=!1)}return s.delete(e),s.delete(t),g}var aD=1,pg="[object Arguments]",gg="[object Array]",Ha="[object Object]",oD=Object.prototype,mg=oD.hasOwnProperty;function lD(e,t,n,r,i,s){var a=Xt(e),o=Xt(t),l=a?gg:Le(e),c=o?gg:Le(t);l=l==pg?Ha:l,c=c==pg?Ha:c;var u=l==Ha,d=c==Ha,h=l==c;if(h&&Ur(e)){if(!Ur(t))return!1;a=!0,u=!1}if(h&&!u)return s||(s=new ze),a||Pa(e)?dg(e,t,n,r,i,s):eD(e,t,l,n,r,i,s);if(!(n&aD)){var f=u&&mg.call(e,"__wrapped__"),p=d&&mg.call(t,"__wrapped__");if(f||p){var g=f?e.value():e,m=p?t.value():t;return s||(s=new ze),i(g,m,n,r,s)}}return h?(s||(s=new ze),sD(e,t,n,r,i,s)):!1}function Ga(e,t,n,r,i){return e===t?!0:e==null||t==null||!nn(e)&&!nn(t)?e!==e&&t!==t:lD(e,t,n,r,Ga,i)}var cD=1,uD=2;function hD(e,t,n,r){var i=n.length,s=i;if(e==null)return!s;for(e=Object(e);i--;){var a=n[i];if(a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++i<s;){a=n[i];var o=a[0],l=e[o],c=a[1];if(a[2]){if(l===void 0&&!(o in e))return!1}else{var u=new ze,d;if(!(d===void 0?Ga(c,l,cD|uD,r,u):d))return!1}}return!0}function vg(e){return e===e&&!De(e)}function dD(e){for(var t=Wi(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,vg(i)]}return t}function yg(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function fD(e){var t=dD(e);return t.length==1&&t[0][2]?yg(t[0][0],t[0][1]):function(n){return n===e||hD(n,e,t)}}function pD(e,t){return e!=null&&t in Object(e)}function gD(e,t,n){t=Fa(t,e);for(var r=-1,i=t.length,s=!1;++r<i;){var a=ji(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&&ac(i)&&ic(a,i)&&(Xt(e)||Fr(e)))}function mD(e,t){return e!=null&&gD(e,t,pD)}var vD=1,yD=2;function ED(e,t){return cc(e)&&vg(t)?yg(ji(e),t):function(n){var r=yt(n,e);return r===void 0&&r===t?mD(n,e):Ga(t,r,vD|yD)}}function xD(e){return function(t){return t==null?void 0:t[e]}}function bD(e){return function(t){return hc(t,e)}}function SD(e){return cc(e)?xD(ji(e)):bD(e)}function Va(e){return typeof e=="function"?e:e==null?tc:typeof e=="object"?Xt(e)?ED(e[0],e[1]):fD(e):SD(e)}function _D(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 TD(e){return function(t,n,r){for(var i=-1,s=Object(t),a=r(t),o=a.length;o--;){var l=a[++i];if(n(s[l],l,s)===!1)break}return t}}var Eg=TD();function OD(e,t){return e&&Eg(e,t,Wi)}function wD(e,t){return function(n,r){if(n==null)return n;if(!sr(n))return e(n,r);for(var i=n.length,s=-1,a=Object(n);++s<i&&r(a[s],s,a)!==!1;);return n}}var Tc=wD(OD);function MD(e,t,n,r){return Tc(e,function(i,s,a){t(r,i,n(i),a)}),r}function CD(e,t){return function(n,r){var i=Xt(n)?_D:MD,s={};return i(n,e,Va(r),s)}}var Oc=function(){return Ve.Date.now()},AD="Expected a function",DD=Math.max,LD=Math.min;function za(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(AD);t=Nr(t)||0,De(n)&&(u=!!n.leading,d="maxWait"in n,s=d?DD(Nr(n.maxWait)||0,t):s,h="trailing"in n?!!n.trailing:h);function f(_){var C=r,D=i;return r=i=void 0,c=_,a=e.apply(D,C),a}function p(_){return c=_,o=setTimeout(v,t),u?f(_):a}function g(_){var C=_-l,D=_-c,B=t-C;return d?LD(B,s-D):B}function m(_){var C=_-l,D=_-c;return l===void 0||C>=t||C<0||d&&D>=s}function v(){var _=Oc();if(m(_))return S(_);o=setTimeout(v,g(_))}function S(_){return o=void 0,h&&r?f(_):(r=i=void 0,a)}function E(){o!==void 0&&clearTimeout(o),c=0,r=l=i=o=void 0}function b(){return o===void 0?a:S(Oc())}function x(){var _=Oc(),C=m(_);if(r=arguments,i=this,l=_,C){if(o===void 0)return p(l);if(d)return clearTimeout(o),o=setTimeout(v,t),f(l)}return o===void 0&&(o=setTimeout(v,t)),a}return x.cancel=E,x.flush=b,x}function wc(e,t,n){(n!==void 0&&!Vi(e[t],n)||n===void 0&&!(t in e))&&Ia(e,t,n)}function Mc(e){return nn(e)&&sr(e)}function Cc(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function RD(e){return $r(e,Yi(e))}function ID(e,t,n,r,i,s,a){var o=Cc(e,n),l=Cc(t,n),c=a.get(l);if(c){wc(e,n,c);return}var u=s?s(o,l,n+"",e,t,a):void 0,d=u===void 0;if(d){var h=Xt(l),f=!h&&Ur(l),p=!h&&!f&&Pa(l);u=l,h||f||p?Xt(o)?u=o:Mc(o)?u=Zf(o):f?(d=!1,u=zp(l,!0)):p?(d=!1,u=rg(l,!0)):u=[]:dp(l)||Fr(l)?(u=o,Fr(o)?u=RD(o):(!De(o)||ec(o))&&(u=ig(l))):d=!1}d&&(a.set(l,u),i(u,l,r,s,a),a.delete(l)),wc(e,n,u)}function xg(e,t,n,r,i){e!==t&&Eg(t,function(s,a){if(i||(i=new ze),De(s))ID(e,t,a,n,xg,r,i);else{var o=r?r(Cc(e,a),s,a+"",e,t,i):void 0;o===void 0&&(o=s),wc(e,a,o)}},Yi)}var kD="Expected a function";function PD(e,t,n){if(typeof e!="function")throw new TypeError(kD);return setTimeout(function(){e.apply(void 0,n)},t)}var ND=sc(function(e,t,n){return PD(e,Nr(t)||0,n)});function bg(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}function $D(e,t){var n=-1,r=sr(e)?Array(e.length):[];return Tc(e,function(i,s,a){r[++n]=t(i,s,a)}),r}function FD(e,t){var n=Xt(e)?Jl:$D;return n(e,Va(t))}var UD=1/0;function BD(e,t){return Ua(FD(e,t),UD)}function HD(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 GD=Object.prototype,VD=GD.hasOwnProperty,zD=CD(function(e,t,n){VD.call(e,n)?e[n].push(t):Ia(e,n,[t])});function WD(e,t){return t.length<2?e:hc(e,fp(t,0,-1))}var YD="[object Map]",qD="[object Set]",XD=Object.prototype,ZD=XD.hasOwnProperty;function We(e){if(e==null)return!0;if(sr(e)&&(Xt(e)||typeof e=="string"||typeof e.splice=="function"||Ur(e)||Pa(e)||Fr(e)))return!e.length;var t=Le(e);if(t==YD||t==qD)return!e.size;if(ka(e))return!cp(e).length;for(var n in e)if(ZD.call(e,n))return!1;return!0}function Sg(e,t){return Ga(e,t)}var Vr=Fp(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}),ct=mO(function(e,t,n){xg(e,t,n)});function jD(e,t){return t=Fa(t,e),e=WD(e,t),e==null||delete e[ji(bg(t))]}function KD(e){return dp(e)?void 0:e}var QD=1,JD=2,tL=4,eL=Uw(function(e,t){var n={};if(e==null)return n;var r=!1;t=Jl(t,function(s){return s=Fa(s,e),r||(r=s.length>1),s}),$r(e,Zp(e),n),r&&(n=Ki(n,QD|JD|tL,KD));for(var i=t.length;i--;)jD(n,t[i]);return n});function nL(e,t){var n;return Tc(e,function(r,i,s){return n=t(r,i,s),!n}),!!n}function rL(e,t,n){var r=Xt(e)?ug:nL;return r(e,Va(t))}var iL=1/0,sL=Gr&&1/Sc(new Gr([,-0]))[1]==iL?function(e){return new Gr(e)}:KT,aL=200;function _g(e,t,n){var r=-1,i=cO,s=e.length,a=!0,o=[],l=o;if(s>=aL){var c=t?null:sL(e);if(c)return Sc(c);a=!1,i=hg,l=new Qi}else l=t?[]:o;t:for(;++r<s;){var u=e[r],d=t?t(u):u;if(u=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 oL=sc(function(e){var t=bg(e);return Mc(t)&&(t=void 0),_g(Ua(e,1,Mc,!0),Va(t))});function Ji(e){return e&&e.length?_g(e):[]}var Ac=(e=>(e.RENDER_FINISHED="render-finished",e.RESIZE="chart-resize",e.MOUSEOVER="chart-mouseover",e.MOUSEOUT="chart-mouseout",e))(Ac||{}),Dc=(e=>(e.SHOW="show-modal",e.HIDE="hide-modal",e))(Dc||{}),Lc=(e=>(e.UPDATE="model-update",e))(Lc||{}),Tg=(e=>(e.SHOW_OVERFLOW_MENU="show-toolbar-overflow-menu",e.HIDE_OVERFLOW_MENU="hide-toolbar-overflow-menu",e.BUTTON_CLICK="toolbar-button-click",e.SHOW_TOOLTIP="toolbar-show-tooltip",e.HIDE_TOOLTIP="toolbar-hide-tooltip",e))(Tg||{}),Rc=(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))(Rc||{}),Ic=(e=>(e.CHANGE="zoom-domain-change",e))(Ic||{}),kc=(e=>(e.CANVAS_ZOOM_IN="canvas-zoom-in",e.CANVAS_ZOOM_OUT="canvas-zoom-out",e))(kc||{}),Pc=(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))(Pc||{}),Nc=(e=>(e.POINT_MOUSEOVER="scatter-mouseover",e.POINT_MOUSEMOVE="scatter-mousemove",e.POINT_CLICK="scatter-click",e.POINT_MOUSEOUT="scatter-mouseout",e))(Nc||{}),$c=(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))($c||{}),Fc=(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))(Fc||{}),Uc=(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))(Uc||{}),Bc=(e=>(e.BAR_MOUSEOVER="bar-mouseover",e.BAR_MOUSEMOVE="bar-mousemove",e.BAR_CLICK="bar-click",e.BAR_MOUSEOUT="bar-mouseout",e))(Bc||{}),Hc=(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))(Hc||{}),Gc=(e=>(e.SCATTER_MOUSEOVER="scatter-mouseover",e.SCATTER_MOUSEMOVE="scatter-mousemove",e.SCATTER_CLICK="scatter-click",e.SCATTER_MOUSEOUT="scatter-mouseout",e))(Gc||{}),Vc=(e=>(e.POINT_MOUSEOVER="scatter-mouseover",e.POINT_MOUSEMOVE="scatter-mousemove",e.POINT_CLICK="scatter-click",e.POINT_MOUSEOUT="scatter-mouseout",e))(Vc||{}),zc=(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))(zc||{}),Wc=(e=>(e.NODE_MOUSEOVER="tree-node-mouseover",e.NODE_CLICK="tree-node-click",e.NODE_MOUSEOUT="tree-node-mouseout",e))(Wc||{}),Yc=(e=>(e.LEAF_MOUSEOVER="leaf-mouseover",e.LEAF_MOUSEMOVE="leaf-mousemove",e.LEAF_CLICK="leaf-click",e.LEAF_MOUSEOUT="leaf-mouseout",e))(Yc||{}),zr=(e=>(e.SHOW="show-tooltip",e.MOVE="move-tooltip",e.HIDE="hide-tooltip",e))(zr||{}),qc=(e=>(e.SHOW="show-threshold",e.HIDE="hide-threshold",e))(qc||{}),Og=(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))(Og||{}),wg=(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))(wg||{}),Mg=(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))(Mg||{}),Cg=(e=>(e.METER_MOUSEOVER="meter-mouseover",e.METER_CLICK="meter-click",e.METER_MOUSEOUT="meter-mouseout",e.METER_MOUSEMOVE="meter-mousemove",e))(Cg||{}),Ag=(e=>(e.HEATMAP_MOUSEOVER="heatmap-mouseover",e.HEATMAP_CLICK="heatmap-click",e.HEATMAP_MOUSEOUT="heatmap-mouseout",e.HEATMAP_MOUSEMOVE="hetmap-mousemove",e))(Ag||{}),Wr=(e=>(e.CHOROPLETH_MOUSEOVER="choropleth-mouseover",e.CHOROPLETH_CLICK="choropleth-click",e.CHOROPLETH_MOUSEOUT="choropleth-mouseout",e.CHOROPLETH_MOUSEMOVE="choropleth-mousemove",e))(Wr||{});const T=Object.freeze(Object.defineProperty({__proto__:null,Alluvial:Mg,Area:Nc,Axis:Pc,Bar:Bc,Boxplot:Hc,CanvasZoom:kc,Chart:Ac,Choropleth:Wr,CirclePack:wg,Gauge:Uc,Heatmap:Ag,Legend:Og,Line:Vc,Meter:Cg,Modal:Dc,Model:Lc,Pie:Fc,Radar:zc,Scatter:Gc,Threshold:qc,Toolbar:Tg,Tooltip:zr,Tree:Wc,Treemap:Yc,WordCloud:$c,ZoomBar:Rc,ZoomDomain:Ic},Symbol.toStringTag,{value:"Module"}));var at=(e=>(e.HTML="html",e.SVG="svg",e))(at||{}),Xc=(e=>(e.WHITE="white",e.G100="g100",e.G90="g90",e.G10="g10",e))(Xc||{}),lt=(e=>(e.BACKGROUND="background",e.FILL="fill",e.STROKE="stroke",e.TOOLTIP="tooltip",e))(lt||{}),z=(e=>(e.LEFT="left",e.RIGHT="right",e.TOP="top",e.BOTTOM="bottom",e))(z||{}),Ye=(e=>(e.GRAPH_VIEW="graph_view",e.SLIDER_VIEW="slider_view",e))(Ye||{}),Re=(e=>(e.END_LINE="end_line",e.MID_LINE="mid_line",e.FRONT_LINE="front_line",e.NONE="none",e))(Re||{}),Ht=(e=>(e.VERTICAL="vertical",e.HORIZONTAL="horizontal",e))(Ht||{}),rt=(e=>(e.TIME="time",e.LINEAR="linear",e.LOG="log",e.LABELS="labels",e.LABELS_RATIO="labels-ratio",e))(rt||{}),Yr=(e=>(e.RIGHT="right",e.LEFT="left",e.TOP="top",e.BOTTOM="bottom",e))(Yr||{}),Gt=(e=>(e.LEFT="left",e.CENTER="center",e.RIGHT="right",e))(Gt||{}),qr=(e=>(e.HORIZONTAL="horizontal",e.VERTICAL="vertical",e))(qr||{}),Wa=(e=>(e.TREE="tree",e.DENDROGRAM="dendrogram",e))(Wa||{}),Ct=(e=>(e.ROW="row",e.COLUMN="column",e.ROW_REVERSE="row-reverse",e.COLUMN_REVERSE="column-reverse",e))(Ct||{}),dt=(e=>(e.FIXED="fixed",e.PREFERRED="preferred",e.STRETCH="stretch",e))(dt||{}),or=(e=>(e.CENTER="center",e))(or||{}),ts=(e=>(e.LEFT="left",e.RIGHT="right",e))(ts||{}),Vt=(e=>(e.GRID="grid",e.VERT_OR_HORIZ="vertOrHoriz",e.PIE="pie",e.DONUT="donut",e))(Vt||{}),rn=(e=>(e.START="start",e.MIDDLE="middle",e.END="end",e))(rn||{}),sn=(e=>(e.BASELINE="baseline",e.MIDDLE="middle",e.HANGING="hanging",e))(sn||{}),lr=(e=>(e.SEMI="semi",e.FULL="full",e))(lr||{}),Ya=(e=>(e.UP="up",e.DOWN="down",e))(Ya||{}),es=(e=>(e.SUCCESS="success",e.WARNING="warning",e.DANGER="danger",e))(es||{}),ns=(e=>(e.ALWAYS="always",e.AUTO="auto",e.NEVER="never",e))(ns||{}),be=(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))(be||{}),St=(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.EXIT_FULLSCREEN="Exit fullscreen",e.SHOW_AS_DATATABLE="Show as data-table",e.CUSTOM="Custom",e))(St||{}),qa=(e=>(e.LEFT="left",e.RIGHT="right",e))(qa||{}),zt=(e=>(e.CHECKBOX="checkbox",e.RADIUS="radius",e.AREA="area",e.SIZE="size",e.LINE="line",e.QUARTILE="quartile",e.ZOOM="zoom",e))(zt||{}),rs=(e=>(e.LINEAR="linear",e.QUANTIZE="quantize",e))(rs||{}),Xr=(e=>(e.ON="on",e.AUTO="auto",e.OFF="off",e))(Xr||{}),is=(e=>(e.DEFAULT="default",e.HOVERABLE="hoverable",e))(is||{}),an=(e=>(e.geoEqualEarth="geoEqualEarth",e.geoAlbers="geoAlbers",e.geoConicEqualArea="geoConicEqualArea",e.geoConicEquidistant="geoConicEquidistant",e.geoEquirectangular="geoEquirectangular",e.geoMercator="geoMercator",e.geoNaturalEarth1="geoNaturalEarth1",e))(an||{});const fe="cds",On={opacity:{unselected:.05,selected:.4}},$n={ticks:{number:7,verticalSpaceRatio:2.5,horizontalSpaceRatio:3.5},ratio:{reference:"value",compareTo:"marker"},paddingRatio:.1,hover:{rectanglePadding:4}},Zr={duration:1e3,ease:Dh,zoomLevel:3},jr={circles:{fillOpacity:.3,hover:{stroke:"#FFF"}},padding:{mainGroup:4,children:2},depth:2},Dg={pairingOptions:{"1-color":4,"2-color":5,"3-color":5,"4-color":3,"5-color":2,"14-color":1}},Ie={circle:{radius:4,opacity:{hovered:1,default:.3}},box:{opacity:{hovered:.5,default:.3}},strokeWidth:{default:1,thicker:2}},lL={defaultBins:10},Pt={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}},wn={opacity:{unselected:.3,selected:1},weight:{selected:2,unselected:1}},Zt={statusBar:{paddingRight:5},status:{indicatorSize:16,paddingLeft:15},total:{paddingLeft:36,paddingRight:24},height:{default:8,proportional:16},dividerWidth:2},Lt={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}},cr={opacity:{unselected:.1,selected:.3},xLabelPadding:10,yLabelPadding:8,yTicksNumber:4,minRange:10,xAxisRectHeight:50,dotsRadius:5},qe={nodeWidth:4,minNodePadding:24,opacity:{unfocus:.3,default:.8,selected:1}},Lg={minCellDividerDimension:16},Rg={default:{size:24}},Ig={defaultOffset:4,horizontalOffset:10},kg={default:{duration:300},pie_slice_mouseover:{duration:100},pie_slice_mouseout:{duration:100},pie_chart_titles:{duration:375},graph_element_mouseover_fill_update:{duration:100},graph_element_mouseout_fill_update:{duration:100}},Se={height:{[Ye.GRAPH_VIEW]:32,[Ye.SLIDER_VIEW]:10},spacerHeight:8,handleWidth:5,handleBarWidth:1,handleBarHeight:12},cL=[{type:zt.RADIUS,name:"Radius"},{type:zt.AREA,name:"Poor area"},{type:zt.AREA,name:"Satisfactory area"},{type:zt.AREA,name:"Great area"},{type:zt.QUARTILE,name:"Quartiles"}];function uL(e,t,n){let r=null;return function(...i){const s=this;s.mousePosition=zn(i[0],n),clearTimeout(r),r=setTimeout(function(){e.apply(s,i)},t)}}function It(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://charts.carbondesignsystem.com/");const o=a.mapsTo;if(o==null){const l=a.scaleType;l==null?a.mapsTo="value":l===rt.TIME?a.mapsTo="date":l===rt.LABELS&&(a.mapsTo="key")}}else delete n.axes[s];return jc(n,t),ct(n,t)}function Mn(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 ss(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 Zc(e,t,n="value",r=!1){const i=e/t.reduce((s,a)=>s+a[n],0)*100;return r?i:i%1!==0?parseFloat(i.toFixed(1)):i}function as(e,t,n){if(n>e.length)return e;if(t===Re.MID_LINE)return e.substr(0,n/2)+"..."+e.substr(-n/2);if(t===Re.FRONT_LINE)return"..."+e.substr(-n);if(t===Re.END_LINE)return e.substr(0,n)+"..."}function jc(e,t){const n=y(e,"legend","additionalItems"),r=y(t,"legend","additionalItems");if(n&&r){const i=r.map(o=>o.type),s=n.map(o=>o.type),a=cL.filter(o=>s.includes(o.type)&&!i.includes(o.type));e.legend.additionalItems=a,t.legend.additionalItems=oL(a,r,"name")}}const y=(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},Pg=(e,t)=>t===Ht.HORIZONTAL?{y0:e.x0,y1:e.x1,x0:e.y0,x1:e.y1}:e,ie=(e,t)=>{const{x0:n,x1:r,y0:i,y1:s}=Pg(e,t);return`M${n},${i}L${n},${s}L${r},${s}L${r},${i}L${n},${i}`};function Cn(e,t,n){return n===Ht.VERTICAL?[e,t]:[t,e]}function Kc(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}function os(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let i;if(r==="formatting"&&e.formattingValues){const a=e.defaultFormattingWidth||e.defaultWidth,o=n!=null&&n.width?String(n.width):a;i=e.formattingValues[o]||e.formattingValues[a]}else{const a=e.defaultWidth,o=n!=null&&n.width?String(n.width):e.defaultWidth;i=e.values[o]||e.values[a]}const s=e.argumentCallback?e.argumentCallback(t):t;return i[s]}}function ls(e){return(t,n={})=>{const r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],s=t.match(i);if(!s)return null;const a=s[0],o=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(o)?dL(o,d=>d.test(a)):hL(o,d=>d.test(a));let c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;const u=t.slice(a.length);return{value:c,rest:u}}}function hL(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function dL(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function fL(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const i=r[0],s=t.match(e.parsePattern);if(!s)return null;let a=e.valueCallback?e.valueCallback(s[0]):s[0];a=n.valueCallback?n.valueCallback(a):a;const o=t.slice(i.length);return{value:a,rest:o}}}const Ng=6048e5,pL=864e5,$g=6e4,Fg=36e5,Ug=Symbol.for("constructDateFrom");function ke(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&Ug in e?e[Ug](t):e instanceof Date?new e.constructor(t):new Date(t)}function ur(e,...t){const n=ke.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}let gL={};function Xa(){return gL}function $t(e,t){return ke(t||e,e)}function cs(e,t){var o,l,c,u;const n=Xa(),r=(t==null?void 0:t.weekStartsOn)??((l=(o=t==null?void 0:t.locale)==null?void 0:o.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((u=(c=n.locale)==null?void 0:c.options)==null?void 0:u.weekStartsOn)??0,i=$t(e,t==null?void 0:t.in),s=i.getDay(),a=(s<r?7:0)+s-r;return i.setDate(i.getDate()-a),i.setHours(0,0,0,0),i}const mL={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"}},vL=(e,t,n)=>{let r;const i=mL[e];return typeof i=="string"?r=i:t===1?r=i.one:r=i.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r},yL={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},EL=(e,t,n,r)=>yL[e],xL={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},bL={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},SL={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"]},_L={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"]},TL={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"}},OL={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"}},wL={ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:os({values:xL,defaultWidth:"wide"}),quarter:os({values:bL,defaultWidth:"wide",argumentCallback:e=>e-1}),month:os({values:SL,defaultWidth:"wide"}),day:os({values:_L,defaultWidth:"wide"}),dayPeriod:os({values:TL,defaultWidth:"wide",formattingValues:OL,defaultFormattingWidth:"wide"})},ML=/^(\d+)(th|st|nd|rd)?/i,CL=/\d+/i,AL={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},DL={any:[/^b/i,/^(a|c)/i]},LL={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},RL={any:[/1/i,/2/i,/3/i,/4/i]},IL={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},kL={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]},PL={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},NL={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]},$L={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},FL={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}},UL={ordinalNumber:fL({matchPattern:ML,parsePattern:CL,valueCallback:e=>parseInt(e,10)}),era:ls({matchPatterns:AL,defaultMatchWidth:"wide",parsePatterns:DL,defaultParseWidth:"any"}),quarter:ls({matchPatterns:LL,defaultMatchWidth:"wide",parsePatterns:RL,defaultParseWidth:"any",valueCallback:e=>e+1}),month:ls({matchPatterns:IL,defaultMatchWidth:"wide",parsePatterns:kL,defaultParseWidth:"any"}),day:ls({matchPatterns:PL,defaultMatchWidth:"wide",parsePatterns:NL,defaultParseWidth:"any"}),dayPeriod:ls({matchPatterns:$L,defaultMatchWidth:"any",parsePatterns:FL,defaultParseWidth:"any"})},BL={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},HL={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},GL={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},VL={date:Kc({formats:BL,defaultWidth:"full"}),time:Kc({formats:HL,defaultWidth:"full"}),dateTime:Kc({formats:GL,defaultWidth:"full"})},Bg={code:"en-US",formatDistance:vL,formatLong:VL,formatRelative:EL,localize:wL,match:UL,options:{weekStartsOn:0,firstWeekContainsDate:1}},Kr={type:Re.END_LINE,threshold:16,numCharacter:14},zL={code:typeof navigator<"u"&&(navigator==null?void 0:navigator.language)||"en-US",number:(e,t=(navigator==null?void 0:navigator.language)||"en-US")=>e.toLocaleString(t),date:(e,t=(navigator==null?void 0:navigator.language)||"en-US",n={},r=null)=>r||e.toLocaleDateString(t,n),time:(e,t=(navigator==null?void 0:navigator.language)||"en-US",n={},r=null)=>r||e.toLocaleTimeString(t,n),optionsObject:{"15seconds":{primary:{"MMM d, pp":{month:"short",day:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit",hourCycle:"h12"},"MMM d, h:mm:ss.SSS a":{month:"short",day:"numeric",hour:"numeric",minute:"2-digit",fractionalSecondDigits:3,hourCycle:"h12"}},secondary:{pp:{hour:"numeric",minute:"2-digit",second:"2-digit",hourCycle:"h12"},"h:mm:ss.SSS a":{hour:"numeric",minute:"2-digit",fractionalSecondDigits:3,hourCycle:"h12"}},type:"time"},minute:{primary:{"MMM d, p":{month:"short",day:"numeric",hour:"numeric",minute:"2-digit",hourCycle:"h12"}},secondary:{p:{hour:"numeric",minute:"2-digit",hourCycle:"h12"}},type:"time"},"30minutes":{primary:{"MMM d, p":{month:"short",day:"numeric",hour:"numeric",minute:"2-digit",hourCycle:"h12"}},secondary:{p:{hour:"numeric",minute:"2-digit",hourCycle:"h12"}},type:"time"},hourly:{primary:{"MMM d, hh a":{month:"short",day:"numeric",hour:"2-digit",hourCycle:"h12"}},secondary:{"hh a":{hour:"2-digit",hourCycle:"h12"}},type:"time"},daily:{primary:{"MMM d":{month:"short",day:"numeric"}},secondary:{d:{day:"numeric"}},type:"date"},weekly:{primary:{"eee, MMM d":{weekday:"short",month:"short",day:"numeric"}},secondary:{eee:{weekday:"short"}},type:"date"},monthly:{primary:{"MMM yyyy":{month:"short",year:"numeric"}},secondary:{MMM:{month:"short"}},type:"date"},quarterly:{primary:{},secondary:{},type:"date"},yearly:{primary:{yyyy:{year:"numeric"}},secondary:{yyyy:{year:"numeric"}},type:"date"}},translations:{group:"Group",total:"Total",meter:{title:""},tabularRep:{title:"Tabular representation",downloadAsCSV:"Download as CSV"},toolbar:{exportAsCSV:"Export to CSV",exportAsJPG:"Export to JPG",exportAsPNG:"Export to PNG",zoomIn:"Zoom in",zoomOut:"Zoom out",resetZoom:"Reset zoom",moreOptions:"More options",makeFullScreen:"Make fullscreen",exitFullScreen:"Exit fullscreen",showAsTable:"Show as table"}}},WL={enabled:!0,position:Yr.BOTTOM,clickable:!0,truncation:Kr,alignment:Gt.LEFT,order:null,additionalItems:[]},YL={x:{enabled:!0,numberOfTicks:15,alignWithAxisTicks:!1},y:{enabled:!0,numberOfTicks:5,alignWithAxisTicks:!1}},qL={enabled:!0},Hg={enabled:!0,showTotal:!0,truncation:Kr,groupLabel:"Group"},Gg={top:{visible:!0,includeZero:!0,truncation:Kr},bottom:{visible:!0,includeZero:!0,truncation:Kr},left:{visible:!0,includeZero:!0,truncation:Kr},right:{visible:!0,includeZero:!0,truncation:Kr}},Za={addSpaceOnEdges:1,showDayName:!1,localeObject:Bg,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"}}};let Vg=!1;try{Vg=typeof document<"u"&&(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled)}catch(e){console.warn("Fullscreen capabilities check failed: ",e.message)}const ee={width:null,height:null,resizable:!0,theme:Xc.WHITE,tooltip:Hg,legend:WL,locale:zL,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:St.SHOW_AS_DATATABLE},...Vg?[{type:St.MAKE_FULLSCREEN}]:[],{type:St.EXPORT_CSV},{type:St.EXPORT_PNG},{type:St.EXPORT_JPG}]}},zg=ct({},ee,{thematic:{projection:an.geoNaturalEarth1}}),us=ct({},ee,{axes:Gg,timeScale:Za,grid:YL,ruler:qL,zoomBar:{zoomRatio:.4,minZoomRatio:.01,top:{enabled:!1,type:Ye.GRAPH_VIEW}}}),hr=ct({},us,{bars:{maxWidth:16,spacingFactor:.25},timeScale:ct(Za,{addSpaceOnEdges:1})}),XL=ct({},hr,{}),ZL=ct({},hr,{}),jL=ct({},hr,{bars:ct({},hr.bars,{dividerSize:1.5})}),KL=ct({},hr,{}),Qc=ct({},us,{points:{radius:4,fillOpacity:.3,filled:!0,enabled:!0}}),QL=Qc,Wg=ct({},Qc,{points:{radius:3,filled:!1,enabled:!0}}),Yg=ct({},Wg,{timeScale:ct(Za,{addSpaceOnEdges:0})}),JL=Yg,tR=ct({},us,{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:zt.RADIUS,name:"Radius"}]}}),eR=ct({},us,{bullet:{performanceAreaTitles:["Poor","Satisfactory","Great"]},grid:{x:{enabled:!1},y:{enabled:!1}},legend:{additionalItems:[{type:zt.AREA,name:"Poor area"},{type:zt.AREA,name:"Satisfactory area"},{type:zt.AREA,name:"Great area"},{type:zt.QUARTILE,name:"Quartiles"}]}}),nR=ct({},hr,{bars:{dividerSize:1.5},timeScale:ct(Za,{addSpaceOnEdges:0})}),rR=ct({},ee,{tooltip:ct({},Hg,{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"}}),qg=ct({},ee,{pie:{labels:{formatter:null,enabled:!0},alignment:Gt.LEFT,sortFunction:null,valueMapsTo:"value"}}),iR=ct({},ee,{legend:{enabled:!1},gauge:{type:lr.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,alignment:Gt.LEFT}}),sR=ct({},qg,{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)},alignment:Gt.LEFT}}),Xg=ct({},ee,{legend:{enabled:!1,clickable:!1},meter:{showLabels:!0,proportional:null,statusBar:{percentageIndicator:{enabled:!0}}}}),aR=ct({},Xg,{legend:{enabled:!0}}),oR=ct({},ee,{radar:{axes:{angle:"key",value:"value"},alignment:Gt.LEFT},tooltip:{gridline:{enabled:!0}}}),lR=ct({},hr,{comboChartTypes:[]}),cR=ct({tree:{type:Wa.TREE}},ee,{}),uR=ct({},ee,{data:ct(ee.data,{groupMapsTo:"name"})}),hR=ct({},ee,jr,{data:ct(ee.data,{groupMapsTo:"name"})}),dR=ct({},ee,{alluvial:{data:ct(ee.data,{groupMapsTo:"source"}),nodeAlignment:Gt.CENTER,nodePadding:24,monochrome:!1,nodes:[]}}),fR=ct({},ee,{axes:Gg,heatmap:{divider:{state:Xr.AUTO},colorLegend:{type:"linear"}}}),pR=ct({},zg,{choropleth:{colorLegend:{type:"linear"}}}),At={alluvialChart:dR,areaChart:Yg,axisChart:us,boxplotChart:KL,bubbleChart:tR,bulletChart:eR,chart:ee,circlePackChart:hR,choroplethChart:pR,comboChart:lR,donutChart:sR,gaugeChart:iR,groupedBarChart:ZL,heatmapChart:fR,histogramChart:nR,lineChart:Wg,lollipopChart:QL,meterChart:Xg,pieChart:qg,proportionalMeterChart:aR,radarChart:oR,scatterChart:Qc,simpleBarChart:XL,stackedAreaChart:JL,stackedBarChart:jL,thematicChart:zg,treeChart:cR,treemapChart:uR,wordCloudChart:rR};function Zg(e){const t=$t(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function jg(e,t){const n=$t(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function Kg(e,t,n){const[r,i]=ur(n==null?void 0:n.in,e,t),s=jg(r),a=jg(i),o=+s-Zg(s),l=+a-Zg(a);return Math.round((o-l)/pL)}function gR(e,t){const n=$t(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function mR(e,t){const n=$t(e,t==null?void 0:t.in);return Kg(n,gR(n))+1}function ja(e,t){return cs(e,{...t,weekStartsOn:1})}function Qg(e,t){const n=$t(e,t==null?void 0:t.in),r=n.getFullYear(),i=ke(n,0);i.setFullYear(r+1,0,4),i.setHours(0,0,0,0);const s=ja(i),a=ke(n,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);const o=ja(a);return n.getTime()>=s.getTime()?r+1:n.getTime()>=o.getTime()?r:r-1}function vR(e,t){const n=Qg(e,t),r=ke(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),ja(r)}function yR(e,t){const n=$t(e,t==null?void 0:t.in),r=+ja(n)-+vR(n);return Math.round(r/Ng)+1}function Jg(e,t){var u,d,h,f;const n=$t(e,t==null?void 0:t.in),r=n.getFullYear(),i=Xa(),s=(t==null?void 0:t.firstWeekContainsDate)??((d=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??i.firstWeekContainsDate??((f=(h=i.locale)==null?void 0:h.options)==null?void 0:f.firstWeekContainsDate)??1,a=ke((t==null?void 0:t.in)||e,0);a.setFullYear(r+1,0,s),a.setHours(0,0,0,0);const o=cs(a,t),l=ke((t==null?void 0:t.in)||e,0);l.setFullYear(r,0,s),l.setHours(0,0,0,0);const c=cs(l,t);return+n>=+o?r+1:+n>=+c?r:r-1}function ER(e,t){var o,l,c,u;const n=Xa(),r=(t==null?void 0:t.firstWeekContainsDate)??((l=(o=t==null?void 0:t.locale)==null?void 0:o.options)==null?void 0:l.firstWeekContainsDate)??n.firstWeekContainsDate??((u=(c=n.locale)==null?void 0:c.options)==null?void 0:u.firstWeekContainsDate)??1,i=Jg(e,t),s=ke((t==null?void 0:t.in)||e,0);return s.setFullYear(i,0,r),s.setHours(0,0,0,0),cs(s,t)}function xR(e,t){const n=$t(e,t==null?void 0:t.in),r=+cs(n,t)-+ER(n,t);return Math.round(r/Ng)+1}function Ot(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Fn={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Ot(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):Ot(n+1,2)},d(e,t){return Ot(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return Ot(e.getHours()%12||12,t.length)},H(e,t){return Ot(e.getHours(),t.length)},m(e,t){return Ot(e.getMinutes(),t.length)},s(e,t){return Ot(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),i=Math.trunc(r*Math.pow(10,n-3));return Ot(i,t.length)}},Qr={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},tm={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return Fn.y(e,t)},Y:function(e,t,n,r){const i=Jg(e,r),s=i>0?i:1-i;if(t==="YY"){const a=s%100;return Ot(a,2)}return t==="Yo"?n.ordinalNumber(s,{unit:"year"}):Ot(s,t.length)},R:function(e,t){const n=Qg(e);return Ot(n,t.length)},u:function(e,t){const n=e.getFullYear();return Ot(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return Ot(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return Ot(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return Fn.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return Ot(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const i=xR(e,r);return t==="wo"?n.ordinalNumber(i,{unit:"week"}):Ot(i,t.length)},I:function(e,t,n){const r=yR(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):Ot(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Fn.d(e,t)},D:function(e,t,n){const r=mR(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):Ot(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const i=e.getDay(),s=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(s);case"ee":return Ot(s,2);case"eo":return n.ordinalNumber(s,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const i=e.getDay(),s=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(s);case"cc":return Ot(s,t.length);case"co":return n.ordinalNumber(s,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),i=r===0?7:r;switch(t){case"i":return String(i);case"ii":return Ot(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const i=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let i;switch(r===12?i=Qr.noon:r===0?i=Qr.midnight:i=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let i;switch(r>=17?i=Qr.evening:r>=12?i=Qr.afternoon:r>=4?i=Qr.morning:i=Qr.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Fn.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Fn.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):Ot(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):Ot(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Fn.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Fn.s(e,t)},S:function(e,t){return Fn.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return nm(r);case"XXXX":case"XX":return dr(r);case"XXXXX":case"XXX":default:return dr(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return nm(r);case"xxxx":case"xx":return dr(r);case"xxxxx":case"xxx":default:return dr(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+em(r,":");case"OOOO":default:return"GMT"+dr(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+em(r,":");case"zzzz":default:return"GMT"+dr(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return Ot(r,t.length)},T:function(e,t,n){return Ot(+e,t.length)}};function em(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Math.trunc(r/60),s=r%60;return s===0?n+String(i):n+String(i)+t+Ot(s,2)}function nm(e,t){return e%60===0?(e>0?"-":"+")+Ot(Math.abs(e)/60,2):dr(e,t)}function dr(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Ot(Math.trunc(r/60),2),s=Ot(r%60,2);return n+i+t+s}const rm=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},im=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},bR={p:im,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return rm(e,t);let s;switch(r){case"P":s=t.dateTime({width:"short"});break;case"PP":s=t.dateTime({width:"medium"});break;case"PPP":s=t.dateTime({width:"long"});break;case"PPPP":default:s=t.dateTime({width:"full"});break}return s.replace("{{date}}",rm(r,t)).replace("{{time}}",im(i,t))}},SR=/^D+$/,_R=/^Y+$/,TR=["D","DD","YY","YYYY"];function OR(e){return SR.test(e)}function wR(e){return _R.test(e)}function MR(e,t,n){const r=CR(e,t,n);if(console.warn(r),TR.includes(e))throw new RangeError(r)}function CR(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}function AR(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function DR(e){return!(!AR(e)&&typeof e!="number"||isNaN(+$t(e)))}const LR=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,RR=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,IR=/^'([^]*?)'?$/,kR=/''/g,PR=/[a-zA-Z]/;function Jc(e,t,n){var u,d,h,f,p,g,m,v;const r=Xa(),i=(n==null?void 0:n.locale)??r.locale??Bg,s=(n==null?void 0:n.firstWeekContainsDate)??((d=(u=n==null?void 0:n.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??r.firstWeekContainsDate??((f=(h=r.locale)==null?void 0:h.options)==null?void 0:f.firstWeekContainsDate)??1,a=(n==null?void 0:n.weekStartsOn)??((g=(p=n==null?void 0:n.locale)==null?void 0:p.options)==null?void 0:g.weekStartsOn)??r.weekStartsOn??((v=(m=r.locale)==null?void 0:m.options)==null?void 0:v.weekStartsOn)??0,o=$t(e,n==null?void 0:n.in);if(!DR(o))throw new RangeError("Invalid time value");let l=t.match(RR).map(S=>{const E=S[0];if(E==="p"||E==="P"){const b=bR[E];return b(S,i.formatLong)}return S}).join("").match(LR).map(S=>{if(S==="''")return{isToken:!1,value:"'"};const E=S[0];if(E==="'")return{isToken:!1,value:NR(S)};if(tm[E])return{isToken:!0,value:S};if(E.match(PR))throw new RangeError("Format string contains an unescaped latin alphabet character `"+E+"`");return{isToken:!1,value:S}});i.localize.preprocessor&&(l=i.localize.preprocessor(o,l));const c={firstWeekContainsDate:s,weekStartsOn:a,locale:i};return l.map(S=>{if(!S.isToken)return S.value;const E=S.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&wR(E)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&OR(E))&&MR(E,t,String(e));const b=tm[E[0]];return b(o,E,i.localize,c)}).join("")}function NR(e){const t=e.match(IR);return t?t[1].replace(kR,"'"):e}var sm=(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))(sm||{});const tu=[["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 am(e,t,n,r,i){const s=t===0,a=Number(Jc(new Date(e),"c"))===2,o=Number(Jc(new Date(e),"q"))===1,l=t!==0?n[t-1]:null;switch(r){case"15seconds":return s||Qa(e)||hs(e,l)||Un(e);case"minute":return s||Qa(e)||hs(e,l)||Un(e);case"30minutes":return s||Qa(e)||hs(e,l)||Un(e);case"hourly":return s||Qa(e)||hs(e,l)||Un(e);case"daily":return i?s||a||Un(e):s||hs(e,l)||Un(e);case"weekly":return s||a||Un(e);case"monthly":return s||Un(e);case"quarterly":return s||o;case"yearly":return!1;default:throw new Error(`${r} is not a valid time interval.`)}}function eu(e,t,n,r,i,s){const a=i.showDayName,o=r==="daily"&&a?"weekly":r,l=new Date(e),c=y(i,"timeIntervalFormats")[o],u=y(c,"primary"),d=y(c,"secondary"),h=am(e,t,n,r,a);let f=h?u:d;r==="15seconds"&&l.getMilliseconds()!==0&&(f=f.replace("pp","h:mm:ss.SSS a"));const p=i.localeObject,{code:g,optionsObject:m}=s,v=m[r].type,S=m[r][h?"primary":"secondary"][f];if(r==="quarterly"||!S){const b=Jc(l,f,{locale:p}).split("").map(x=>{const _=Number(x);return x!==" "&&!Number.isNaN(_)?_.toLocaleString(g):x});return s[v](l,g,{},b.join(""))}else return s[v](l,g,S)}function Ka(e){const t=new Date(e);return{M:t.getMonth()+1,d:t.getDate(),H:t.getHours(),m:t.getMinutes(),s:t.getSeconds()}}function $R(e){if(e)return e.slice(1).map((t,n)=>t-e[n])}function FR(e){const t=tu.reduce((n,[,r],i)=>{const s=tu[n][1],a=Math.abs(s-e),o=Math.abs(r-e);return a<o?n:i},0);return tu[t][0]}function nu(e,t){if(sm[t])return t;if(e.length===1)return"15seconds";const n=$R(e),r=kn(n);return FR(r)}function Qa(e){const{s:t,m:n,H:r}=Ka(e);return r===0&&n===0&&t===0}function hs(e,t){const n=Ka(e).M,r=Ka(t).M;return n!==r}function Un(e){const{M:t,d:n,s:r,m:i,H:s}=Ka(e);return t===1&&n===1&&s===0&&i===0&&r===0}function om(e){return e===void 0?"":e.toISOString()}function UR(e){const t=e.trim();return["=","+","-","@"," ","\r"].includes(t.charAt(0))?` ${t}`:/[,\"\n]/.test(t)?`"${t}"`:t}class on{constructor(t){this.state={options:{}},this.colorScale={},this.colorClassNames={},this.services=t}formatTable({headers:t,cells:n}){const r=this.getOptions(),{code:i,date:s,number:a}=y(r,"locale"),o=y(r,"tabularRepModal","tableHeadingFormatter"),l=y(r,"tabularRepModal","tableCellFormatter"),{cartesianScales:c}=this.services,u=c==null?void 0:c.getDomainAxisScaleType();let d;return u===rt.TIME&&(d=f=>s(f,i,{month:"short",day:"numeric",year:"numeric"})),[typeof o=="function"?o(t):t,...typeof l=="function"?l(n):n.map(f=>{d&&(f[1]=d(f[1]));for(const p in f){const g=f[p];typeof g=="number"&&(f[p]=a(g,i))}return f})]}getAllDataFromDomain(t){if(!this.getData())return null;const n=this.getOptions();let r=this.getData();const i=this.getDataGroups(),{groupMapsTo:s}=y(n,"data"),a=y(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===rt.LINEAR||c===rt.LOG)&&(r=r.map(u=>({...u,[l]:u[l]===null?u[l]:Number(u[l])}))),l&&a[o].domain)if(c===rt.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}=Pt.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 y(this.getOptions(),"data","loading")?[]:t?this.get("dataGroups").filter(r=>t.includes(r.name)):this.get("dataGroups")}getActiveDataGroups(t){const{ACTIVE:n}=Pt.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 zD(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=lL.defaultBins}=s,l=Array.isArray(o),c=l0().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(m=>{h.push({group:m,key:p,value:g[m]||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 Ql().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=Ji(i.map(l=>{const c=this.services.cartesianScales.getDomainIdentifier(l);return l[c]instanceof Date?om(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===rt.TIME?s.sort((l,c)=>{const u=new Date(l),d=new Date(c);return u-d}):(o===rt.LOG||o===rt.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?om(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=HD(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?Ql().offset(pT):Ql()).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();jc(n,t),this.set({options:ct(n,t)})}update(t=!0){this.getDisplayData()&&(this.updateAllDataGroups(),this.setCustomColorScale(),this.setColorClassNames(),this.services.events.dispatchEvent(T.Model.UPDATE,{animate:t}))}toggleDataLabel(t){const{ACTIVE:n,DISABLED:r}=Pt.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(T.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=y(this.colorScale,t);return i.getFillColor?i.getFillColor(t,n,r,s):s}getStrokeColor(t,n,r){const i=this.getOptions(),s=y(this.colorScale,t);return i.getStrokeColor?i.getStrokeColor(t,n,r,s):s}isUserProvidedColorScaleValid(){const t=y(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://charts.carbondesignsystem.com/");const n=[],{datasets:r,labels:i}=t;return r.forEach(s=>{s.data.forEach((a,o)=>{let l;const c=y(s,"label");if(c===null){const d=y(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 n=this.getTabularDataArray().map(a=>a.map(o=>`"${(o==="–"?"–":o).split(/[,;'"`]/).map(u=>UR(u)).join("")}"`)).map(a=>a.join(",")).join(`
|
|
1
|
+
(function(q,$e){typeof exports=="object"&&typeof module<"u"?$e(exports):typeof define=="function"&&define.amd?define(["exports"],$e):(q=typeof globalThis<"u"?globalThis:q||self,$e(q.Charts={}))})(this,function(q){"use strict";function $e(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Wv(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function bo(e){let t,n,r;e.length!==2?(t=$e,n=(o,l)=>$e(e(o),l),r=(o,l)=>e(o)-l):(t=e===$e||e===Wv?e:Yv,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 Yv(){return 0}function qv(e){return e===null?NaN:+e}function*Xv(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const So=bo($e).right;bo(qv).center;function Zv(e,t){let n=0;for(let r of e)r!=null&&(r=+r)>=r&&++n;return n}function Fe(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 Gn{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 Pu extends Map{constructor(t,n=Qv){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(Nu(this,t))}has(t){return super.has(Nu(this,t))}set(t,n){return super.set(jv(this,t),n)}delete(t){return super.delete(Kv(this,t))}}function Nu({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function jv({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function Kv({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function Qv(e){return e!==null&&typeof e=="object"?e.valueOf():e}function Jv(e){return e}function t0(e=$e){if(e===$e)return $u;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 $u(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}var e0=Array.prototype,n0=e0.slice;function _o(e){return()=>e}const r0=Math.sqrt(50),i0=Math.sqrt(10),s0=Math.sqrt(2);function Os(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>=r0?10:s>=i0?5:s>=s0?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?Os(e,t,n*2):[o,l,c]}function ws(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?Os(t,e,n):Os(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 vr(e,t,n){return t=+t,e=+e,n=+n,Os(e,t,n)[2]}function To(e,t,n){t=+t,e=+e,n=+n;const r=t<e,i=r?vr(t,e,n):vr(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function a0(e,t,n){let r;for(;;){const i=vr(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 o0(e){return Math.max(1,Math.ceil(Math.log(Zv(e))/Math.LN2)+1)}function l0(){var e=Jv,t=Fe,n=o0;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 E=h,b=+f;if(t===Fe&&([d,h]=a0(d,h,b)),f=ws(d,h,b),f[0]<=d&&(l=vr(d,h,b)),f[f.length-1]>=h)if(E>=h&&t===Fe){const x=vr(d,h,b);isFinite(x)&&(x>0?h=(Math.floor(h/x)+1)*x:x<0&&(h=(Math.ceil(h*-x)+1)/-x))}else f.pop()}for(var p=f.length,g=0,m=p;f[g]<=d;)++g;for(;f[m-1]>h;)--m;(g||m<p)&&(f=f.slice(g,m),p=m-g);var v=new Array(p+1),S;for(s=0;s<=p;++s)S=v[s]=[],S.x0=s>0?f[s-1]:d,S.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&&v[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 E=Math.floor((d-o)*l);v[Math.min(p,E+(f[E]<=o))].push(i[s])}}}else for(s=0;s<a;++s)(o=c[s])!=null&&d<=o&&o<=h&&v[So(f,o,0,p)].push(i[s]);return v}return r.value=function(i){return arguments.length?(e=typeof i=="function"?i:_o(i),r):e},r.domain=function(i){return arguments.length?(t=typeof i=="function"?i:_o([i[0],i[1]]),r):t},r.thresholds=function(i){return arguments.length?(n=typeof i=="function"?i:_o(Array.isArray(i)?n0.call(i):i),r):n},r}function Vn(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 kn(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function Fu(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?$u:t0(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));Fu(e,t,f,p,i)}const s=e[t];let a=n,o=r;for(li(e,n,t),i(e[r],s)>0&&li(e,n,r);a<o;){for(li(e,a,o),++a,--o;i(e[a],s)<0;)++a;for(;i(e[o],s)>0;)--o}i(e[n],s)===0?li(e,n,o):(++o,li(e,o,r)),o<=t&&(n=o+1),t<=o&&(r=o-1)}return e}function li(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function Oo(e,t,n){if(e=Float64Array.from(Xv(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return kn(e);if(t>=1)return Vn(e);var r,i=(r-1)*t,s=Math.floor(i),a=Vn(Fu(e,s).subarray(0,s+1)),o=kn(e.subarray(s+1));return a+(o-a)*(i-s)}}function*c0(e){for(const t of e)yield*t}function Uu(e){return Array.from(c0(e))}function u0(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 h0(e){return e}var Ms=1,Cs=2,wo=3,ci=4,Bu=1e-6;function d0(e){return"translate("+e+",0)"}function f0(e){return"translate(0,"+e+")"}function p0(e){return t=>+e(t)}function g0(e,t){return t=Math.max(0,e.bandwidth()-t*2)/2,e.round()&&(t=Math.round(t)),n=>+e(n)+t}function m0(){return!this.__axis}function As(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===Ms||e===ci?-1:1,u=e===ci||e===Cs?"x":"y",d=e===Ms||e===wo?d0:f0;function h(f){var p=r??(t.ticks?t.ticks.apply(t,n):t.domain()),g=i??(t.tickFormat?t.tickFormat.apply(t,n):h0),m=Math.max(s,0)+o,v=t.range(),S=+v[0]+l,E=+v[v.length-1]+l,b=(t.bandwidth?g0:p0)(t.copy(),l),x=f.selection?f.selection():f,_=x.selectAll(".domain").data([null]),C=x.selectAll(".tick").data(p,t).order(),D=C.exit(),B=C.enter().append("g").attr("class","tick"),P=C.select("line"),w=C.select("text");_=_.merge(_.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),C=C.merge(B),P=P.merge(B.append("line").attr("stroke","currentColor").attr(u+"2",c*s)),w=w.merge(B.append("text").attr("fill","currentColor").attr(u,c*m).attr("dy",e===Ms?"0em":e===wo?"0.71em":"0.32em")),f!==x&&(_=_.transition(f),C=C.transition(f),P=P.transition(f),w=w.transition(f),D=D.transition(f).attr("opacity",Bu).attr("transform",function(H){return isFinite(H=b(H))?d(H+l):this.getAttribute("transform")}),B.attr("opacity",Bu).attr("transform",function(H){var N=this.parentNode.__axis;return d((N&&isFinite(N=N(H))?N:b(H))+l)})),D.remove(),_.attr("d",e===ci||e===Cs?a?"M"+c*a+","+S+"H"+l+"V"+E+"H"+c*a:"M"+l+","+S+"V"+E:a?"M"+S+","+c*a+"V"+l+"H"+E+"V"+c*a:"M"+S+","+l+"H"+E),C.attr("opacity",1).attr("transform",function(H){return d(b(H)+l)}),P.attr(u+"2",c*s),w.attr(u,c*m).text(g),x.filter(m0).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",e===Cs?"start":e===ci?"end":"middle"),x.each(function(){this.__axis=b})}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 v0(e){return As(Ms,e)}function y0(e){return As(Cs,e)}function Mo(e){return As(wo,e)}function Hu(e){return As(ci,e)}var E0={value:()=>{}};function Co(){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 Ds(n)}function Ds(e){this._=e}function x0(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}})}Ds.prototype=Co.prototype={constructor:Ds,on:function(e,t){var n=this._,r=x0(e+"",n),i,s=-1,a=r.length;if(arguments.length<2){for(;++s<a;)if((i=(e=r[s]).type)&&(i=b0(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]=Gu(n[i],e.name,t);else if(t==null)for(i in n)n[i]=Gu(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 Ds(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 b0(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function Gu(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=E0,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var Ao="http://www.w3.org/1999/xhtml";const Vu={svg:"http://www.w3.org/2000/svg",xhtml:Ao,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ls(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),Vu.hasOwnProperty(t)?{space:Vu[t],local:e}:e}function S0(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Ao&&t.documentElement.namespaceURI===Ao?t.createElement(e):t.createElementNS(n,e)}}function _0(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function zu(e){var t=Ls(e);return(t.local?_0:S0)(t)}function T0(){}function Do(e){return e==null?T0:function(){return this.querySelector(e)}}function O0(e){typeof e!="function"&&(e=Do(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 ye(r,this._parents)}function w0(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function M0(){return[]}function Wu(e){return e==null?M0:function(){return this.querySelectorAll(e)}}function C0(e){return function(){return w0(e.apply(this,arguments))}}function A0(e){typeof e=="function"?e=C0(e):e=Wu(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 ye(r,i)}function Yu(e){return function(){return this.matches(e)}}function qu(e){return function(t){return t.matches(e)}}var D0=Array.prototype.find;function L0(e){return function(){return D0.call(this.children,e)}}function R0(){return this.firstElementChild}function I0(e){return this.select(e==null?R0:L0(typeof e=="function"?e:qu(e)))}var k0=Array.prototype.filter;function P0(){return Array.from(this.children)}function N0(e){return function(){return k0.call(this.children,e)}}function $0(e){return this.selectAll(e==null?P0:N0(typeof e=="function"?e:qu(e)))}function F0(e){typeof e!="function"&&(e=Yu(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 ye(r,this._parents)}function Xu(e){return new Array(e.length)}function U0(){return new ye(this._enter||this._groups.map(Xu),this._parents)}function Rs(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Rs.prototype={constructor:Rs,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 B0(e){return function(){return e}}function H0(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 Rs(e,s[a]);for(;a<l;++a)(o=t[a])&&(i[a]=o)}function G0(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 Rs(e,s[o]);for(o=0;o<u;++o)(l=t[o])&&c.get(h[o])===l&&(i[o]=l)}function V0(e){return e.__data__}function z0(e,t){if(!arguments.length)return Array.from(this,V0);var n=t?G0:H0,r=this._parents,i=this._groups;typeof e!="function"&&(e=B0(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=W0(e.call(u,u&&u.__data__,c,r)),p=f.length,g=o[c]=new Array(p),m=a[c]=new Array(p),v=l[c]=new Array(h);n(u,d,g,m,v,f,t);for(var S=0,E=0,b,x;S<p;++S)if(b=g[S]){for(S>=E&&(E=S+1);!(x=m[E])&&++E<p;);b._next=x||null}}return a=new ye(a,r),a._enter=o,a._exit=l,a}function W0(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Y0(){return new ye(this._exit||this._groups.map(Xu),this._parents)}function q0(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 X0(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 ye(o,this._parents)}function Z0(){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 j0(e){e||(e=K0);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 ye(i,this._parents).order()}function K0(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Q0(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function J0(){return Array.from(this)}function ty(){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 ey(){let e=0;for(const t of this)++e;return e}function ny(){return!this.node()}function ry(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 iy(e){return function(){this.removeAttribute(e)}}function sy(e){return function(){this.removeAttributeNS(e.space,e.local)}}function ay(e,t){return function(){this.setAttribute(e,t)}}function oy(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function ly(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function cy(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 uy(e,t){var n=Ls(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?sy:iy:typeof t=="function"?n.local?cy:ly:n.local?oy:ay)(n,t))}function Zu(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function hy(e){return function(){this.style.removeProperty(e)}}function dy(e,t,n){return function(){this.style.setProperty(e,t,n)}}function fy(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function py(e,t,n){return arguments.length>1?this.each((t==null?hy:typeof t=="function"?fy:dy)(e,t,n??"")):yr(this.node(),e)}function yr(e,t){return e.style.getPropertyValue(t)||Zu(e).getComputedStyle(e,null).getPropertyValue(t)}function gy(e){return function(){delete this[e]}}function my(e,t){return function(){this[e]=t}}function vy(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function yy(e,t){return arguments.length>1?this.each((t==null?gy:typeof t=="function"?vy:my)(e,t)):this.node()[e]}function ju(e){return e.trim().split(/^|\s+/)}function Lo(e){return e.classList||new Ku(e)}function Ku(e){this._node=e,this._names=ju(e.getAttribute("class")||"")}Ku.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 Qu(e,t){for(var n=Lo(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function Ju(e,t){for(var n=Lo(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function Ey(e){return function(){Qu(this,e)}}function xy(e){return function(){Ju(this,e)}}function by(e,t){return function(){(t.apply(this,arguments)?Qu:Ju)(this,e)}}function Sy(e,t){var n=ju(e+"");if(arguments.length<2){for(var r=Lo(this.node()),i=-1,s=n.length;++i<s;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof t=="function"?by:t?Ey:xy)(n,t))}function _y(){this.textContent=""}function Ty(e){return function(){this.textContent=e}}function Oy(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function wy(e){return arguments.length?this.each(e==null?_y:(typeof e=="function"?Oy:Ty)(e)):this.node().textContent}function My(){this.innerHTML=""}function Cy(e){return function(){this.innerHTML=e}}function Ay(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function Dy(e){return arguments.length?this.each(e==null?My:(typeof e=="function"?Ay:Cy)(e)):this.node().innerHTML}function Ly(){this.nextSibling&&this.parentNode.appendChild(this)}function Ry(){return this.each(Ly)}function Iy(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function ky(){return this.each(Iy)}function Py(e){var t=typeof e=="function"?e:zu(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function Ny(){return null}function $y(e,t){var n=typeof e=="function"?e:zu(e),r=t==null?Ny:typeof t=="function"?t:Do(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function Fy(){var e=this.parentNode;e&&e.removeChild(this)}function Uy(){return this.each(Fy)}function By(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Hy(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Gy(e){return this.select(e?Hy:By)}function Vy(e){return arguments.length?this.property("__data__",e):this.node().__data__}function zy(e){return function(t){e.call(this,t,this.__data__)}}function Wy(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 Yy(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 qy(e,t,n){return function(){var r=this.__on,i,s=zy(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 Xy(e,t,n){var r=Wy(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?qy:Yy,i=0;i<s;++i)this.each(o(r[i],t,n));return this}function th(e,t,n){var r=Zu(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 Zy(e,t){return function(){return th(this,e,t)}}function jy(e,t){return function(){return th(this,e,t.apply(this,arguments))}}function Ky(e,t){return this.each((typeof t=="function"?jy:Zy)(e,t))}function*Qy(){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 eh=[null];function ye(e,t){this._groups=e,this._parents=t}function ui(){return new ye([[document.documentElement]],eh)}function Jy(){return this}ye.prototype=ui.prototype={constructor:ye,select:O0,selectAll:A0,selectChild:I0,selectChildren:$0,filter:F0,data:z0,enter:U0,exit:Y0,join:q0,merge:X0,selection:Jy,order:Z0,sort:j0,call:Q0,nodes:J0,node:ty,size:ey,empty:ny,each:ry,attr:uy,style:py,property:yy,classed:Sy,text:wy,html:Dy,raise:Ry,lower:ky,append:Py,insert:$y,remove:Uy,clone:Gy,datum:Vy,on:Xy,dispatch:Ky,[Symbol.iterator]:Qy};function I(e){return typeof e=="string"?new ye([[document.querySelector(e)]],[document.documentElement]):new ye([[e]],eh)}function t1(e){let t;for(;t=e.sourceEvent;)e=t;return e}function zn(e,t){if(e=t1(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 Ro={capture:!0,passive:!1};function Io(e){e.preventDefault(),e.stopImmediatePropagation()}function e1(e){var t=e.document.documentElement,n=I(e).on("dragstart.drag",Io,Ro);"onselectstart"in t?n.on("selectstart.drag",Io,Ro):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function n1(e,t){var n=e.document.documentElement,r=I(e).on("dragstart.drag",null);t&&(r.on("click.drag",Io,Ro),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 ko(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function nh(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function hi(){}var di=.7,Is=1/di,Er="\\s*([+-]?\\d+)\\s*",fi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ke="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",r1=/^#([0-9a-f]{3,8})$/,i1=new RegExp(`^rgb\\(${Er},${Er},${Er}\\)$`),s1=new RegExp(`^rgb\\(${Ke},${Ke},${Ke}\\)$`),a1=new RegExp(`^rgba\\(${Er},${Er},${Er},${fi}\\)$`),o1=new RegExp(`^rgba\\(${Ke},${Ke},${Ke},${fi}\\)$`),l1=new RegExp(`^hsl\\(${fi},${Ke},${Ke}\\)$`),c1=new RegExp(`^hsla\\(${fi},${Ke},${Ke},${fi}\\)$`),rh={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};ko(hi,dn,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:ih,formatHex:ih,formatHex8:u1,formatHsl:h1,formatRgb:sh,toString:sh});function ih(){return this.rgb().formatHex()}function u1(){return this.rgb().formatHex8()}function h1(){return uh(this).formatHsl()}function sh(){return this.rgb().formatRgb()}function dn(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=r1.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?ah(t):n===3?new he(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?ks(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?ks(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=i1.exec(e))?new he(t[1],t[2],t[3],1):(t=s1.exec(e))?new he(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=a1.exec(e))?ks(t[1],t[2],t[3],t[4]):(t=o1.exec(e))?ks(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=l1.exec(e))?ch(t[1],t[2]/100,t[3]/100,1):(t=c1.exec(e))?ch(t[1],t[2]/100,t[3]/100,t[4]):rh.hasOwnProperty(e)?ah(rh[e]):e==="transparent"?new he(NaN,NaN,NaN,0):null}function ah(e){return new he(e>>16&255,e>>8&255,e&255,1)}function ks(e,t,n,r){return r<=0&&(e=t=n=NaN),new he(e,t,n,r)}function d1(e){return e instanceof hi||(e=dn(e)),e?(e=e.rgb(),new he(e.r,e.g,e.b,e.opacity)):new he}function Po(e,t,n,r){return arguments.length===1?d1(e):new he(e,t,n,r??1)}function he(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}ko(he,Po,nh(hi,{brighter(e){return e=e==null?Is:Math.pow(Is,e),new he(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?di:Math.pow(di,e),new he(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new he(Wn(this.r),Wn(this.g),Wn(this.b),Ps(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:oh,formatHex:oh,formatHex8:f1,formatRgb:lh,toString:lh}));function oh(){return`#${Yn(this.r)}${Yn(this.g)}${Yn(this.b)}`}function f1(){return`#${Yn(this.r)}${Yn(this.g)}${Yn(this.b)}${Yn((isNaN(this.opacity)?1:this.opacity)*255)}`}function lh(){const e=Ps(this.opacity);return`${e===1?"rgb(":"rgba("}${Wn(this.r)}, ${Wn(this.g)}, ${Wn(this.b)}${e===1?")":`, ${e})`}`}function Ps(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Wn(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Yn(e){return e=Wn(e),(e<16?"0":"")+e.toString(16)}function ch(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Ue(e,t,n,r)}function uh(e){if(e instanceof Ue)return new Ue(e.h,e.s,e.l,e.opacity);if(e instanceof hi||(e=dn(e)),!e)return new Ue;if(e instanceof Ue)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 Ue(a,o,l,e.opacity)}function hh(e,t,n,r){return arguments.length===1?uh(e):new Ue(e,t,n,r??1)}function Ue(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}ko(Ue,hh,nh(hi,{brighter(e){return e=e==null?Is:Math.pow(Is,e),new Ue(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?di:Math.pow(di,e),new Ue(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 he(No(e>=240?e-240:e+120,i,r),No(e,i,r),No(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Ue(dh(this.h),Ns(this.s),Ns(this.l),Ps(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=Ps(this.opacity);return`${e===1?"hsl(":"hsla("}${dh(this.h)}, ${Ns(this.s)*100}%, ${Ns(this.l)*100}%${e===1?")":`, ${e})`}`}}));function dh(e){return e=(e||0)%360,e<0?e+360:e}function Ns(e){return Math.max(0,Math.min(1,e||0))}function No(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 $o=e=>()=>e;function p1(e,t){return function(n){return e+n*t}}function g1(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 m1(e){return(e=+e)==1?fh:function(t,n){return n-t?g1(t,n,e):$o(isNaN(t)?n:t)}}function fh(e,t){var n=t-e;return n?p1(e,n):$o(isNaN(e)?t:e)}const $s=function e(t){var n=m1(t);function r(i,s){var a=n((i=Po(i)).r,(s=Po(s)).r),o=n(i.g,s.g),l=n(i.b,s.b),c=fh(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 v1(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 y1(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function E1(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]=pi(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 x1(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function Ee(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function b1(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]=pi(e[i],t[i]):r[i]=t[i];return function(s){for(i in n)r[i]=n[i](s);return r}}var Fo=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Uo=new RegExp(Fo.source,"g");function S1(e){return function(){return e}}function _1(e){return function(t){return e(t)+""}}function ph(e,t){var n=Fo.lastIndex=Uo.lastIndex=0,r,i,s,a=-1,o=[],l=[];for(e=e+"",t=t+"";(r=Fo.exec(e))&&(i=Uo.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:Ee(r,i)})),n=Uo.lastIndex;return n<t.length&&(s=t.slice(n),o[a]?o[a]+=s:o[++a]=s),o.length<2?l[0]?_1(l[0].x):S1(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 pi(e,t){var n=typeof t,r;return t==null||n==="boolean"?$o(t):(n==="number"?Ee:n==="string"?(r=dn(t))?(t=r,$s):ph:t instanceof dn?$s:t instanceof Date?x1:y1(t)?v1:Array.isArray(t)?E1:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?b1:Ee)(e,t)}function gh(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var mh=180/Math.PI,Bo={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function vh(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)*mh,skewX:Math.atan(l)*mh,scaleX:a,scaleY:o}}var Fs;function T1(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Bo:vh(t.a,t.b,t.c,t.d,t.e,t.f)}function O1(e){return e==null||(Fs||(Fs=document.createElementNS("http://www.w3.org/2000/svg","g")),Fs.setAttribute("transform",e),!(e=Fs.transform.baseVal.consolidate()))?Bo:(e=e.matrix,vh(e.a,e.b,e.c,e.d,e.e,e.f))}function yh(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:Ee(c,d)},{i:g-2,x:Ee(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:Ee(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:Ee(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:Ee(c,d)},{i:g-2,x:Ee(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,m;++p<g;)d[(m=h[p]).i]=m.x(f);return d.join("")}}}var w1=yh(T1,"px, ","px)","deg)"),M1=yh(O1,", ",")",")");function C1(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e(r/(t-1));return n}var xr=0,gi=0,mi=0,Eh=1e3,Us,vi,Bs=0,qn=0,Hs=0,yi=typeof performance=="object"&&performance.now?performance:Date,xh=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Ho(){return qn||(xh(A1),qn=yi.now()+Hs)}function A1(){qn=0}function Gs(){this._call=this._time=this._next=null}Gs.prototype=bh.prototype={constructor:Gs,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?Ho():+n)+(t==null?0:+t),!this._next&&vi!==this&&(vi?vi._next=this:Us=this,vi=this),this._call=e,this._time=n,Go()},stop:function(){this._call&&(this._call=null,this._time=1/0,Go())}};function bh(e,t,n){var r=new Gs;return r.restart(e,t,n),r}function D1(){Ho(),++xr;for(var e=Us,t;e;)(t=qn-e._time)>=0&&e._call.call(void 0,t),e=e._next;--xr}function Sh(){qn=(Bs=yi.now())+Hs,xr=gi=0;try{D1()}finally{xr=0,R1(),qn=0}}function L1(){var e=yi.now(),t=e-Bs;t>Eh&&(Hs-=t,Bs=e)}function R1(){for(var e,t=Us,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:Us=n);vi=e,Go(r)}function Go(e){if(!xr){gi&&(gi=clearTimeout(gi));var t=e-qn;t>24?(e<1/0&&(gi=setTimeout(Sh,e-yi.now()-Hs)),mi&&(mi=clearInterval(mi))):(mi||(Bs=yi.now(),mi=setInterval(L1,Eh)),xr=1,xh(Sh))}}function _h(e,t,n){var r=new Gs;return t=t==null?0:+t,r.restart(i=>{r.stop(),e(i+t)},t,n),r}var I1=Co("start","end","cancel","interrupt"),k1=[],Th=0,Oh=1,Vo=2,Vs=3,wh=4,zo=5,zs=6;function Ws(e,t,n,r,i,s){var a=e.__transition;if(!a)e.__transition={};else if(n in a)return;P1(e,n,{name:t,index:r,group:i,on:I1,tween:k1,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:Th})}function Wo(e,t){var n=Be(e,t);if(n.state>Th)throw new Error("too late; already scheduled");return n}function Qe(e,t){var n=Be(e,t);if(n.state>Vs)throw new Error("too late; already running");return n}function Be(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function P1(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=bh(s,0,n.time);function s(c){n.state=Oh,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!==Oh)return l();for(u in r)if(f=r[u],f.name===n.name){if(f.state===Vs)return _h(a);f.state===wh?(f.state=zs,f.timer.stop(),f.on.call("interrupt",e,e.__data__,f.index,f.group),delete r[u]):+u<t&&(f.state=zs,f.timer.stop(),f.on.call("cancel",e,e.__data__,f.index,f.group),delete r[u])}if(_h(function(){n.state===Vs&&(n.state=wh,n.timer.restart(o,n.delay,n.time),o(c))}),n.state=Vo,n.on.call("start",e,e.__data__,n.index,n.group),n.state===Vo){for(n.state=Vs,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=zo,1),d=-1,h=i.length;++d<h;)i[d].call(e,u);n.state===zo&&(n.on.call("end",e,e.__data__,n.index,n.group),l())}function l(){n.state=zs,n.timer.stop(),delete r[t];for(var c in r)return;delete e.__transition}}function Yo(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>Vo&&r.state<zo,r.state=zs,r.timer.stop(),r.on.call(i?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete n[a]}s&&delete e.__transition}}function N1(e){return this.each(function(){Yo(this,e)})}function $1(e,t){var n,r;return function(){var i=Qe(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 F1(e,t,n){var r,i;if(typeof n!="function")throw new Error;return function(){var s=Qe(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 U1(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r=Be(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?$1:F1)(n,e,t))}function qo(e,t,n){var r=e._id;return e.each(function(){var i=Qe(this,r);(i.value||(i.value={}))[t]=n.apply(this,arguments)}),function(i){return Be(i,r).value[t]}}function Mh(e,t){var n;return(typeof t=="number"?Ee:t instanceof dn?$s:(n=dn(t))?(t=n,$s):ph)(e,t)}function B1(e){return function(){this.removeAttribute(e)}}function H1(e){return function(){this.removeAttributeNS(e.space,e.local)}}function G1(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 V1(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 z1(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 W1(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 Y1(e,t){var n=Ls(e),r=n==="transform"?M1:Mh;return this.attrTween(e,typeof t=="function"?(n.local?W1:z1)(n,r,qo(this,"attr."+e,t)):t==null?(n.local?H1:B1)(n):(n.local?V1:G1)(n,r,t))}function q1(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function X1(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function Z1(e,t){var n,r;function i(){var s=t.apply(this,arguments);return s!==r&&(n=(r=s)&&X1(e,s)),n}return i._value=t,i}function j1(e,t){var n,r;function i(){var s=t.apply(this,arguments);return s!==r&&(n=(r=s)&&q1(e,s)),n}return i._value=t,i}function K1(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=Ls(e);return this.tween(n,(r.local?Z1:j1)(r,t))}function Q1(e,t){return function(){Wo(this,e).delay=+t.apply(this,arguments)}}function J1(e,t){return t=+t,function(){Wo(this,e).delay=t}}function tE(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Q1:J1)(t,e)):Be(this.node(),t).delay}function eE(e,t){return function(){Qe(this,e).duration=+t.apply(this,arguments)}}function nE(e,t){return t=+t,function(){Qe(this,e).duration=t}}function rE(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?eE:nE)(t,e)):Be(this.node(),t).duration}function iE(e,t){if(typeof t!="function")throw new Error;return function(){Qe(this,e).ease=t}}function sE(e){var t=this._id;return arguments.length?this.each(iE(t,e)):Be(this.node(),t).ease}function aE(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;Qe(this,e).ease=n}}function oE(e){if(typeof e!="function")throw new Error;return this.each(aE(this._id,e))}function lE(e){typeof e!="function"&&(e=Yu(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 fn(r,this._parents,this._name,this._id)}function cE(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 fn(a,this._parents,this._name,this._id)}function uE(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 hE(e,t,n){var r,i,s=uE(t)?Wo:Qe;return function(){var a=s(this,e),o=a.on;o!==r&&(i=(r=o).copy()).on(t,n),a.on=i}}function dE(e,t){var n=this._id;return arguments.length<2?Be(this.node(),n).on.on(e):this.each(hE(n,e,t))}function fE(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function pE(){return this.on("end.remove",fE(this._id))}function gE(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Do(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,Ws(c[h],t,n,h,c,Be(u,n)));return new fn(s,this._parents,t,n)}function mE(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Wu(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=Be(u,n),g=0,m=h.length;g<m;++g)(f=h[g])&&Ws(f,t,n,g,h,p);s.push(h),a.push(u)}return new fn(s,a,t,n)}var vE=ui.prototype.constructor;function yE(){return new vE(this._groups,this._parents)}function EE(e,t){var n,r,i;return function(){var s=yr(this,e),a=(this.style.removeProperty(e),yr(this,e));return s===a?null:s===n&&a===r?i:i=t(n=s,r=a)}}function Ch(e){return function(){this.style.removeProperty(e)}}function xE(e,t,n){var r,i=n+"",s;return function(){var a=yr(this,e);return a===i?null:a===r?s:s=t(r=a,n)}}function bE(e,t,n){var r,i,s;return function(){var a=yr(this,e),o=n(this),l=o+"";return o==null&&(l=o=(this.style.removeProperty(e),yr(this,e))),a===l?null:a===r&&l===i?s:(i=l,s=t(r=a,o))}}function SE(e,t){var n,r,i,s="style."+t,a="end."+s,o;return function(){var l=Qe(this,e),c=l.on,u=l.value[s]==null?o||(o=Ch(t)):void 0;(c!==n||i!==u)&&(r=(n=c).copy()).on(a,i=u),l.on=r}}function _E(e,t,n){var r=(e+="")=="transform"?w1:Mh;return t==null?this.styleTween(e,EE(e,r)).on("end.style."+e,Ch(e)):typeof t=="function"?this.styleTween(e,bE(e,r,qo(this,"style."+e,t))).each(SE(this._id,e)):this.styleTween(e,xE(e,r,t),n).on("end.style."+e,null)}function TE(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function OE(e,t,n){var r,i;function s(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&TE(e,a,n)),r}return s._value=t,s}function wE(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,OE(e,t,n??""))}function ME(e){return function(){this.textContent=e}}function CE(e){return function(){var t=e(this);this.textContent=t??""}}function AE(e){return this.tween("text",typeof e=="function"?CE(qo(this,"text",e)):ME(e==null?"":e+""))}function DE(e){return function(t){this.textContent=e.call(this,t)}}function LE(e){var t,n;function r(){var i=e.apply(this,arguments);return i!==n&&(t=(n=i)&&DE(i)),t}return r._value=e,r}function RE(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,LE(e))}function IE(){for(var e=this._name,t=this._id,n=Ah(),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=Be(l,t);Ws(l,e,n,c,a,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new fn(r,this._parents,e,n)}function kE(){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=Qe(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 PE=0;function fn(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function Ah(){return++PE}var pn=ui.prototype;fn.prototype={constructor:fn,select:gE,selectAll:mE,selectChild:pn.selectChild,selectChildren:pn.selectChildren,filter:lE,merge:cE,selection:yE,transition:IE,call:pn.call,nodes:pn.nodes,node:pn.node,size:pn.size,empty:pn.empty,each:pn.each,on:dE,attr:Y1,attrTween:K1,style:_E,styleTween:wE,text:AE,textTween:RE,remove:pE,tween:U1,delay:tE,duration:rE,ease:sE,easeVarying:oE,end:kE,[Symbol.iterator]:pn[Symbol.iterator]};const NE=e=>+e;function Dh(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var $E={time:null,delay:0,duration:250,ease:Dh};function FE(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 UE(e){var t,n;e instanceof fn?(t=e._id,e=e._name):(t=Ah(),(n=$E).time=Ho(),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])&&Ws(l,e,t,c,a,n||FE(l,t));return new fn(r,this._parents,e,t)}ui.prototype.interrupt=N1,ui.prototype.transition=UE;const Xo=e=>()=>e;function BE(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 HE(e){e.stopImmediatePropagation()}function Zo(e){e.preventDefault(),e.stopImmediatePropagation()}var Lh={name:"drag"},jo={name:"space"},br={name:"handle"},Sr={name:"center"};const{abs:Rh,max:Kt,min:Qt}=Math;function Ih(e){return[+e[0],+e[1]]}function kh(e){return[Ih(e[0]),Ih(e[1])]}var Ys={name:"x",handles:["w","e"].map(Qo),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]]}},Ko={},gn={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"},Ph={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},Nh={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},GE={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},VE={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function Qo(e){return{type:e}}function zE(e){return!e.ctrlKey&&!e.button}function WE(){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 YE(){return navigator.maxTouchPoints||"ontouchstart"in this}function Jo(e){for(;!e.__brush;)if(!(e=e.parentNode))return;return e.__brush}function qE(e){return e[0][0]===e[1][0]||e[0][1]===e[1][1]}function $h(){return XE(Ys)}function XE(e){var t=WE,n=zE,r=YE,i=!0,s=Co("start","brush","end"),a=6,o;function l(m){var v=m.property("__brush",g).selectAll(".overlay").data([Qo("overlay")]);v.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",gn.overlay).merge(v).each(function(){var E=Jo(this).extent;I(this).attr("x",E[0][0]).attr("y",E[0][1]).attr("width",E[1][0]-E[0][0]).attr("height",E[1][1]-E[0][1])}),m.selectAll(".selection").data([Qo("selection")]).enter().append("rect").attr("class","selection").attr("cursor",gn.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var S=m.selectAll(".handle").data(e.handles,function(E){return E.type});S.exit().remove(),S.enter().append("rect").attr("class",function(E){return"handle handle--"+E.type}).attr("cursor",function(E){return gn[E.type]}),m.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(m,v,S){m.tween?m.on("start.brush",function(E){u(this,arguments).beforestart().start(E)}).on("interrupt.brush end.brush",function(E){u(this,arguments).end(E)}).tween("brush",function(){var E=this,b=E.__brush,x=u(E,arguments),_=b.selection,C=e.input(typeof v=="function"?v.apply(this,arguments):v,b.extent),D=pi(_,C);function B(P){b.selection=P===1&&C===null?null:D(P),c.call(E),x.brush()}return _!==null&&C!==null?B:B(1)}):m.each(function(){var E=this,b=arguments,x=E.__brush,_=e.input(typeof v=="function"?v.apply(E,b):v,x.extent),C=u(E,b).beforestart();Yo(E),x.selection=_===null?null:_,c.call(E),C.start(S).brush(S).end(S)})},l.clear=function(m,v){l.move(m,null,v)};function c(){var m=I(this),v=Jo(this).selection;v?(m.selectAll(".selection").style("display",null).attr("x",v[0][0]).attr("y",v[0][1]).attr("width",v[1][0]-v[0][0]).attr("height",v[1][1]-v[0][1]),m.selectAll(".handle").style("display",null).attr("x",function(S){return S.type[S.type.length-1]==="e"?v[1][0]-a/2:v[0][0]-a/2}).attr("y",function(S){return S.type[0]==="s"?v[1][1]-a/2:v[0][1]-a/2}).attr("width",function(S){return S.type==="n"||S.type==="s"?v[1][0]-v[0][0]+a:a}).attr("height",function(S){return S.type==="e"||S.type==="w"?v[1][1]-v[0][1]+a:a})):m.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function u(m,v,S){var E=m.__brush.emitter;return E&&(!S||!E.clean)?E:new d(m,v,S)}function d(m,v,S){this.that=m,this.args=v,this.state=m.__brush,this.active=0,this.clean=S}d.prototype={beforestart:function(){return++this.active===1&&(this.state.emitter=this,this.starting=!0),this},start:function(m,v){return this.starting?(this.starting=!1,this.emit("start",m,v)):this.emit("brush",m),this},brush:function(m,v){return this.emit("brush",m,v),this},end:function(m,v){return--this.active===0&&(delete this.state.emitter,this.emit("end",m,v)),this},emit:function(m,v,S){var E=I(this.that).datum();s.call(m,this.that,new BE(m,{sourceEvent:v,target:l,selection:e.output(this.state.selection),mode:S,dispatch:s}),E)}};function h(m){if(o&&!m.touches||!n.apply(this,arguments))return;var v=this,S=m.target.__data__.type,E=(i&&m.metaKey?S="overlay":S)==="selection"?Lh:i&&m.altKey?Sr:br,b=e===Ko?null:GE[S],x=e===Ys?null:VE[S],_=Jo(v),C=_.extent,D=_.selection,B=C[0][0],P,w,H=C[0][1],N,M,O=C[1][0],$,F,L=C[1][1],U,tt,X=0,Y=0,Q,ut=b&&x&&i&&m.shiftKey,et,K,nt=Array.from(m.touches||[m],st=>{const _t=st.identifier;return st=zn(st,v),st.point0=st.slice(),st.identifier=_t,st});Yo(v);var ht=u(v,arguments,!0).beforestart();if(S==="overlay"){D&&(Q=!0);const st=[nt[0],nt[1]||nt[0]];_.selection=D=[[P=e===Ko?B:Qt(st[0][0],st[1][0]),N=e===Ys?H:Qt(st[0][1],st[1][1])],[$=e===Ko?O:Kt(st[0][0],st[1][0]),U=e===Ys?L:Kt(st[0][1],st[1][1])]],nt.length>1&&G(m)}else P=D[0][0],N=D[0][1],$=D[1][0],U=D[1][1];w=P,M=N,F=$,tt=U;var W=I(v).attr("pointer-events","none"),j=W.selectAll(".overlay").attr("cursor",gn[S]);if(m.touches)ht.moved=A,ht.ended=V;else{var J=I(m.view).on("mousemove.brush",A,!0).on("mouseup.brush",V,!0);i&&J.on("keydown.brush",xt,!0).on("keyup.brush",Ut,!0),e1(m.view)}c.call(v),ht.start(m,E.name);function A(st){for(const _t of st.changedTouches||[st])for(const Ne of nt)Ne.identifier===_t.identifier&&(Ne.cur=zn(_t,v));if(ut&&!et&&!K&&nt.length===1){const _t=nt[0];Rh(_t.cur[0]-_t[0])>Rh(_t.cur[1]-_t[1])?K=!0:et=!0}for(const _t of nt)_t.cur&&(_t[0]=_t.cur[0],_t[1]=_t.cur[1]);Q=!0,Zo(st),G(st)}function G(st){const _t=nt[0],Ne=_t.point0;var Oe;switch(X=_t[0]-Ne[0],Y=_t[1]-Ne[1],E){case jo:case Lh:{b&&(X=Kt(B-P,Qt(O-$,X)),w=P+X,F=$+X),x&&(Y=Kt(H-N,Qt(L-U,Y)),M=N+Y,tt=U+Y);break}case br:{nt[1]?(b&&(w=Kt(B,Qt(O,nt[0][0])),F=Kt(B,Qt(O,nt[1][0])),b=1),x&&(M=Kt(H,Qt(L,nt[0][1])),tt=Kt(H,Qt(L,nt[1][1])),x=1)):(b<0?(X=Kt(B-P,Qt(O-P,X)),w=P+X,F=$):b>0&&(X=Kt(B-$,Qt(O-$,X)),w=P,F=$+X),x<0?(Y=Kt(H-N,Qt(L-N,Y)),M=N+Y,tt=U):x>0&&(Y=Kt(H-U,Qt(L-U,Y)),M=N,tt=U+Y));break}case Sr:{b&&(w=Kt(B,Qt(O,P-X*b)),F=Kt(B,Qt(O,$+X*b))),x&&(M=Kt(H,Qt(L,N-Y*x)),tt=Kt(H,Qt(L,U+Y*x)));break}}F<w&&(b*=-1,Oe=P,P=$,$=Oe,Oe=w,w=F,F=Oe,S in Ph&&j.attr("cursor",gn[S=Ph[S]])),tt<M&&(x*=-1,Oe=N,N=U,U=Oe,Oe=M,M=tt,tt=Oe,S in Nh&&j.attr("cursor",gn[S=Nh[S]])),_.selection&&(D=_.selection),et&&(w=D[0][0],F=D[1][0]),K&&(M=D[0][1],tt=D[1][1]),(D[0][0]!==w||D[0][1]!==M||D[1][0]!==F||D[1][1]!==tt)&&(_.selection=[[w,M],[F,tt]],c.call(v),ht.brush(st,E.name))}function V(st){if(HE(st),st.touches){if(st.touches.length)return;o&&clearTimeout(o),o=setTimeout(function(){o=null},500)}else n1(st.view,Q),J.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);W.attr("pointer-events","all"),j.attr("cursor",gn.overlay),_.selection&&(D=_.selection),qE(D)&&(_.selection=null,c.call(v)),ht.end(st,E.name)}function xt(st){switch(st.keyCode){case 16:{ut=b&&x;break}case 18:{E===br&&(b&&($=F-X*b,P=w+X*b),x&&(U=tt-Y*x,N=M+Y*x),E=Sr,G(st));break}case 32:{(E===br||E===Sr)&&(b<0?$=F-X:b>0&&(P=w-X),x<0?U=tt-Y:x>0&&(N=M-Y),E=jo,j.attr("cursor",gn.selection),G(st));break}default:return}Zo(st)}function Ut(st){switch(st.keyCode){case 16:{ut&&(et=K=ut=!1,G(st));break}case 18:{E===Sr&&(b<0?$=F:b>0&&(P=w),x<0?U=tt:x>0&&(N=M),E=br,G(st));break}case 32:{E===jo&&(st.altKey?(b&&($=F-X*b,P=w+X*b),x&&(U=tt-Y*x,N=M+Y*x),E=Sr):(b<0?$=F:b>0&&(P=w),x<0?U=tt:x>0&&(N=M),E=br),j.attr("cursor",gn[S]),G(st));break}default:return}Zo(st)}}function f(m){u(this,arguments).moved(m)}function p(m){u(this,arguments).ended(m)}function g(){var m=this.__brush||{selection:null};return m.extent=kh(t.apply(this,arguments)),m.dim=e,m}return l.extent=function(m){return arguments.length?(t=typeof m=="function"?m:Xo(kh(m)),l):t},l.filter=function(m){return arguments.length?(n=typeof m=="function"?m:Xo(!!m),l):n},l.touchable=function(m){return arguments.length?(r=typeof m=="function"?m:Xo(!!m),l):r},l.handleSize=function(m){return arguments.length?(a=+m,l):a},l.keyModifiers=function(m){return arguments.length?(i=!!m,l):i},l.on=function(){var m=s.on.apply(s,arguments);return m===s?l:m},l}const tl=Math.PI,el=2*tl,Xn=1e-6,ZE=el-Xn;function Fh(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function jE(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Fh;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 KE=class{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?Fh:jE(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>Xn)if(!(Math.abs(d*l-c*u)>Xn)||!s)this._append`L${this._x1=t},${this._y1=n}`;else{let f=r-a,p=i-o,g=l*l+c*c,m=f*f+p*p,v=Math.sqrt(g),S=Math.sqrt(h),E=s*Math.tan((tl-Math.acos((g+h-m)/(2*v*S)))/2),b=E/S,x=E/v;Math.abs(b-1)>Xn&&this._append`L${t+b*u},${n+b*d}`,this._append`A${s},${s},0,0,${+(d*f>u*p)},${this._x1=t+x*l},${this._y1=n+x*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)>Xn||Math.abs(this._y1-u)>Xn)&&this._append`L${c},${u}`,r&&(h<0&&(h=h%el+el),h>ZE?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>Xn&&this._append`A${r},${r},0,${+(h>=tl)},${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 QE(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function qs(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 _r(e){return e=qs(Math.abs(e)),e?e[1]:NaN}function JE(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 tx(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var ex=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ei(e){if(!(t=ex.exec(e)))throw new Error("invalid format: "+e);var t;return new nl({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]})}Ei.prototype=nl.prototype;function nl(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+""}nl.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 nx(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 Uh;function rx(e,t){var n=qs(e,t);if(!n)return e+"";var r=n[0],i=n[1],s=i-(Uh=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")+qs(e,Math.max(0,t+s-1))[0]}function Bh(e,t){var n=qs(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 Hh={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:QE,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)=>Bh(e*100,t),r:Bh,s:rx,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Gh(e){return e}var Vh=Array.prototype.map,zh=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function ix(e){var t=e.grouping===void 0||e.thousands===void 0?Gh:JE(Vh.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?Gh:tx(Vh.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=Ei(d);var h=d.fill,f=d.align,p=d.sign,g=d.symbol,m=d.zero,v=d.width,S=d.comma,E=d.precision,b=d.trim,x=d.type;x==="n"?(S=!0,x="g"):Hh[x]||(E===void 0&&(E=12),b=!0,x="g"),(m||h==="0"&&f==="=")&&(m=!0,h="0",f="=");var _=g==="$"?n:g==="#"&&/[boxX]/.test(x)?"0"+x.toLowerCase():"",C=g==="$"?r:/[%p]/.test(x)?a:"",D=Hh[x],B=/[defgprs%]/.test(x);E=E===void 0?6:/[gprs]/.test(x)?Math.max(1,Math.min(21,E)):Math.max(0,Math.min(20,E));function P(w){var H=_,N=C,M,O,$;if(x==="c")N=D(w)+N,w="";else{w=+w;var F=w<0||1/w<0;if(w=isNaN(w)?l:D(Math.abs(w),E),b&&(w=nx(w)),F&&+w==0&&p!=="+"&&(F=!1),H=(F?p==="("?p:o:p==="-"||p==="("?"":p)+H,N=(x==="s"?zh[8+Uh/3]:"")+N+(F&&p==="("?")":""),B){for(M=-1,O=w.length;++M<O;)if($=w.charCodeAt(M),48>$||$>57){N=($===46?i+w.slice(M+1):w.slice(M))+N,w=w.slice(0,M);break}}}S&&!m&&(w=t(w,1/0));var L=H.length+w.length+N.length,U=L<v?new Array(v-L+1).join(h):"";switch(S&&m&&(w=t(U+w,U.length?v-N.length:1/0),U=""),f){case"<":w=H+w+N+U;break;case"=":w=H+U+w+N;break;case"^":w=U.slice(0,L=U.length>>1)+H+w+N+U.slice(L);break;default:w=U+H+w+N;break}return s(w)}return P.toString=function(){return d+""},P}function u(d,h){var f=c((d=Ei(d),d.type="f",d)),p=Math.max(-8,Math.min(8,Math.floor(_r(h)/3)))*3,g=Math.pow(10,-p),m=zh[8+p/3];return function(v){return f(g*v)+m}}return{format:c,formatPrefix:u}}var Xs,rl,Wh;sx({thousands:",",grouping:[3],currency:["$",""]});function sx(e){return Xs=ix(e),rl=Xs.format,Wh=Xs.formatPrefix,Xs}function ax(e){return Math.max(0,-_r(Math.abs(e)))}function ox(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(_r(t)/3)))*3-_r(Math.abs(e)))}function lx(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,_r(t)-_r(e))+1}var wt=1e-6,cx=1e-12,gt=Math.PI,de=gt/2,Yh=gt/4,xe=gt*2,re=180/gt,Nt=gt/180,Tt=Math.abs,qh=Math.atan,Zn=Math.atan2,Mt=Math.cos,ux=Math.exp,hx=Math.log,bt=Math.sin,Pn=Math.sign||function(e){return e>0?1:e<0?-1:0},He=Math.sqrt,dx=Math.tan;function fx(e){return e>1?0:e<-1?gt:Math.acos(e)}function mn(e){return e>1?de:e<-1?-de:Math.asin(e)}function we(){}function Zs(e,t){e&&Zh.hasOwnProperty(e.type)&&Zh[e.type](e,t)}var Xh={Feature:function(e,t){Zs(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,r=-1,i=n.length;++r<i;)Zs(n[r].geometry,t)}},Zh={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){il(e.coordinates,t,0)},MultiLineString:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)il(n[r],t,0)},Polygon:function(e,t){jh(e.coordinates,t)},MultiPolygon:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)jh(n[r],t)},GeometryCollection:function(e,t){for(var n=e.geometries,r=-1,i=n.length;++r<i;)Zs(n[r],t)}};function il(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 jh(e,t){var n=-1,r=e.length;for(t.polygonStart();++n<r;)il(e[n],t,1);t.polygonEnd()}function Tr(e,t){e&&Xh.hasOwnProperty(e.type)?Xh[e.type](e,t):Zs(e,t)}function sl(e){return[Zn(e[1],e[0]),mn(e[2])]}function Or(e){var t=e[0],n=e[1],r=Mt(n);return[r*Mt(t),r*bt(t),bt(n)]}function js(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function Ks(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 al(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function Qs(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function ol(e){var t=He(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}function ll(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 cl(e,t){return Tt(e)>gt&&(e-=Math.round(e/xe)*xe),[e,t]}cl.invert=cl;function Kh(e,t,n){return(e%=xe)?t||n?ll(Jh(e),td(t,n)):Jh(e):t||n?td(t,n):cl}function Qh(e){return function(t,n){return t+=e,Tt(t)>gt&&(t-=Math.round(t/xe)*xe),[t,n]}}function Jh(e){var t=Qh(e);return t.invert=Qh(-e),t}function td(e,t){var n=Mt(e),r=bt(e),i=Mt(t),s=bt(t);function a(o,l){var c=Mt(l),u=Mt(o)*c,d=bt(o)*c,h=bt(l),f=h*n+u*r;return[Zn(d*i-f*s,u*n-h*r),mn(f*i+d*s)]}return a.invert=function(o,l){var c=Mt(l),u=Mt(o)*c,d=bt(o)*c,h=bt(l),f=h*i-d*s;return[Zn(d*i+h*s,u*n+f*r),mn(f*n-u*r)]},a}function px(e){e=Kh(e[0]*Nt,e[1]*Nt,e.length>2?e[2]*Nt:0);function t(n){return n=e(n[0]*Nt,n[1]*Nt),n[0]*=re,n[1]*=re,n}return t.invert=function(n){return n=e.invert(n[0]*Nt,n[1]*Nt),n[0]*=re,n[1]*=re,n},t}function gx(e,t,n,r,i,s){if(n){var a=Mt(t),o=bt(t),l=r*n;i==null?(i=t+r*xe,s=t-l/2):(i=ed(a,i),s=ed(a,s),(r>0?i<s:i>s)&&(i+=r*xe));for(var c,u=i;r>0?u>s:u<s;u-=l)c=sl([a,-o*Mt(u),-o*bt(u)]),e.point(c[0],c[1])}}function ed(e,t){t=Or(t),t[0]-=e,ol(t);var n=fx(-t[1]);return((-t[2]<0?-n:n)+xe-wt)%xe}function nd(){var e=[],t;return{point:function(n,r,i){t.push([n,r,i])},lineStart:function(){e.push(t=[])},lineEnd:we,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function Js(e,t){return Tt(e[0]-t[0])<wt&&Tt(e[1]-t[1])<wt}function ta(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 rd(e,t,n,r,i){var s=[],a=[],o,l;if(e.forEach(function(p){if(!((g=p.length-1)<=0)){var g,m=p[0],v=p[g],S;if(Js(m,v)){if(!m[2]&&!v[2]){for(i.lineStart(),o=0;o<g;++o)i.point((m=p[o])[0],m[1]);i.lineEnd();return}v[0]+=2*wt}s.push(S=new ta(m,p,null,!0)),a.push(S.o=new ta(m,null,S,!1)),s.push(S=new ta(v,p,null,!1)),a.push(S.o=new ta(v,null,S,!0))}}),!!s.length){for(a.sort(t),id(s),id(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 id(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 ul(e){return Tt(e[0])<=gt?e[0]:Pn(e[0])*((Tt(e[0])+gt)%xe-gt)}function mx(e,t){var n=ul(t),r=t[1],i=bt(r),s=[bt(n),-Mt(n),0],a=0,o=0,l=new Gn;i===1?r=de+wt:i===-1&&(r=-de-wt);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=ul(f),g=f[1]/2+Yh,m=bt(g),v=Mt(g),S=0;S<h;++S,p=b,m=_,v=C,f=E){var E=d[S],b=ul(E),x=E[1]/2+Yh,_=bt(x),C=Mt(x),D=b-p,B=D>=0?1:-1,P=B*D,w=P>gt,H=m*_;if(l.add(Zn(H*B*bt(P),v*C+H*Mt(P))),a+=w?D+B*xe:D,w^p>=n^b>=n){var N=Ks(Or(f),Or(E));ol(N);var M=Ks(s,N);ol(M);var O=(w^D>=0?-1:1)*mn(M[2]);(r>O||r===O&&(N[0]||N[1]))&&(o+=w^D>=0?1:-1)}}return(a<-1e-6||a<wt&&l<-1e-12)^o&1}function sd(e,t,n,r){return function(i){var s=t(i),a=nd(),o=t(a),l=!1,c,u,d,h={point:f,lineStart:g,lineEnd:m,polygonStart:function(){h.point=v,h.lineStart=S,h.lineEnd=E,u=[],c=[]},polygonEnd:function(){h.point=f,h.lineStart=g,h.lineEnd=m,u=Uu(u);var b=mx(c,r);u.length?(l||(i.polygonStart(),l=!0),rd(u,yx,b,n,i)):b&&(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(b,x){e(b,x)&&i.point(b,x)}function p(b,x){s.point(b,x)}function g(){h.point=p,s.lineStart()}function m(){h.point=f,s.lineEnd()}function v(b,x){d.push([b,x]),o.point(b,x)}function S(){o.lineStart(),d=[]}function E(){v(d[0][0],d[0][1]),o.lineEnd();var b=o.clean(),x=a.result(),_,C=x.length,D,B,P;if(d.pop(),c.push(d),d=null,!!C){if(b&1){if(B=x[0],(D=B.length-1)>0){for(l||(i.polygonStart(),l=!0),i.lineStart(),_=0;_<D;++_)i.point((P=B[_])[0],P[1]);i.lineEnd()}return}C>1&&b&2&&x.push(x.pop().concat(x.shift())),u.push(x.filter(vx))}}return h}}function vx(e){return e.length>1}function yx(e,t){return((e=e.x)[0]<0?e[1]-de-wt:de-e[1])-((t=t.x)[0]<0?t[1]-de-wt:de-t[1])}const ad=sd(function(){return!0},Ex,bx,[-gt,-de]);function Ex(e){var t=NaN,n=NaN,r=NaN,i;return{lineStart:function(){e.lineStart(),i=1},point:function(s,a){var o=s>0?gt:-gt,l=Tt(s-t);Tt(l-gt)<wt?(e.point(t,n=(n+a)/2>0?de:-de),e.point(r,n),e.lineEnd(),e.lineStart(),e.point(o,n),e.point(s,n),i=0):r!==o&&l>=gt&&(Tt(t-r)<wt&&(t-=r*wt),Tt(s-o)<wt&&(s-=o*wt),n=xx(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 xx(e,t,n,r){var i,s,a=bt(e-n);return Tt(a)>wt?qh((bt(t)*(s=Mt(r))*bt(n)-bt(r)*(i=Mt(t))*bt(e))/(i*s*a)):(t+r)/2}function bx(e,t,n,r){var i;if(e==null)i=n*de,r.point(-gt,i),r.point(0,i),r.point(gt,i),r.point(gt,0),r.point(gt,-i),r.point(0,-i),r.point(-gt,-i),r.point(-gt,0),r.point(-gt,i);else if(Tt(e[0]-t[0])>wt){var s=e[0]<t[0]?gt:-gt;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=Mt(e),n=2*Nt,r=t>0,i=Tt(t)>wt;function s(u,d,h,f){gx(f,e,n,h,u,d)}function a(u,d){return Mt(u)*Mt(d)>t}function o(u){var d,h,f,p,g;return{lineStart:function(){p=f=!1,g=1},point:function(m,v){var S=[m,v],E,b=a(m,v),x=r?b?0:c(m,v):b?c(m+(m<0?gt:-gt),v):0;if(!d&&(p=f=b)&&u.lineStart(),b!==f&&(E=l(d,S),(!E||Js(d,E)||Js(S,E))&&(S[2]=1)),b!==f)g=0,b?(u.lineStart(),E=l(S,d),u.point(E[0],E[1])):(E=l(d,S),u.point(E[0],E[1],2),u.lineEnd()),d=E;else if(i&&d&&r^b){var _;!(x&h)&&(_=l(S,d,!0))&&(g=0,r?(u.lineStart(),u.point(_[0][0],_[0][1]),u.point(_[1][0],_[1][1]),u.lineEnd()):(u.point(_[1][0],_[1][1]),u.lineEnd(),u.lineStart(),u.point(_[0][0],_[0][1],3)))}b&&(!d||!Js(d,S))&&u.point(S[0],S[1]),d=S,f=b,h=x},lineEnd:function(){f&&u.lineEnd(),d=null},clean:function(){return g|(p&&f)<<1}}}function l(u,d,h){var f=Or(u),p=Or(d),g=[1,0,0],m=Ks(f,p),v=js(m,m),S=m[0],E=v-S*S;if(!E)return!h&&u;var b=t*v/E,x=-t*S/E,_=Ks(g,m),C=Qs(g,b),D=Qs(m,x);al(C,D);var B=_,P=js(C,B),w=js(B,B),H=P*P-w*(js(C,C)-1);if(!(H<0)){var N=He(H),M=Qs(B,(-P-N)/w);if(al(M,C),M=sl(M),!h)return M;var O=u[0],$=d[0],F=u[1],L=d[1],U;$<O&&(U=O,O=$,$=U);var tt=$-O,X=Tt(tt-gt)<wt,Y=X||tt<wt;if(!X&&L<F&&(U=F,F=L,L=U),Y?X?F+L>0^M[1]<(Tt(M[0]-O)<wt?F:L):F<=M[1]&&M[1]<=L:tt>gt^(O<=M[0]&&M[0]<=$)){var Q=Qs(B,(-P+N)/w);return al(Q,C),[M,sl(Q)]}}}function c(u,d){var h=r?e:gt-e,f=0;return u<-h?f|=1:u>h&&(f|=2),d<-h?f|=4:d>h&&(f|=8),f}return sd(a,o,s,r?[0,-e]:[-gt,e-gt])}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 ea=1e9,na=-1e9;function Tx(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 Tt(c[0]-e)<wt?u>0?0:3:Tt(c[0]-n)<wt?u>0?2:1:Tt(c[1]-t)<wt?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=nd(),h,f,p,g,m,v,S,E,b,x,_,C={point:D,lineStart:H,lineEnd:N,polygonStart:P,polygonEnd:w};function D(O,$){i(O,$)&&u.point(O,$)}function B(){for(var O=0,$=0,F=f.length;$<F;++$)for(var L=f[$],U=1,tt=L.length,X=L[0],Y,Q,ut=X[0],et=X[1];U<tt;++U)Y=ut,Q=et,X=L[U],ut=X[0],et=X[1],Q<=r?et>r&&(ut-Y)*(r-Q)>(et-Q)*(e-Y)&&++O:et<=r&&(ut-Y)*(r-Q)<(et-Q)*(e-Y)&&--O;return O}function P(){u=d,h=[],f=[],_=!0}function w(){var O=B(),$=_&&O,F=(h=Uu(h)).length;($||F)&&(c.polygonStart(),$&&(c.lineStart(),s(null,null,1,c),c.lineEnd()),F&&rd(h,o,O,s,c),c.polygonEnd()),u=c,h=f=p=null}function H(){C.point=M,f&&f.push(p=[]),x=!0,b=!1,S=E=NaN}function N(){h&&(M(g,m),v&&b&&d.rejoin(),h.push(d.result())),C.point=D,b&&u.lineEnd()}function M(O,$){var F=i(O,$);if(f&&p.push([O,$]),x)g=O,m=$,v=F,x=!1,F&&(u.lineStart(),u.point(O,$));else if(F&&b)u.point(O,$);else{var L=[S=Math.max(na,Math.min(ea,S)),E=Math.max(na,Math.min(ea,E))],U=[O=Math.max(na,Math.min(ea,O)),$=Math.max(na,Math.min(ea,$))];_x(L,U,e,t,n,r)?(b||(u.lineStart(),u.point(L[0],L[1])),u.point(U[0],U[1]),F||u.lineEnd(),_=!1):F&&(u.lineStart(),u.point(O,$),_=!1)}S=O,E=$,b=F}return C}}const hl=e=>e;var dl=new Gn,fl=new Gn,od,ld,pl,gl,vn={point:we,lineStart:we,lineEnd:we,polygonStart:function(){vn.lineStart=Ox,vn.lineEnd=Mx},polygonEnd:function(){vn.lineStart=vn.lineEnd=vn.point=we,dl.add(Tt(fl)),fl=new Gn},result:function(){var e=dl/2;return dl=new Gn,e}};function Ox(){vn.point=wx}function wx(e,t){vn.point=cd,od=pl=e,ld=gl=t}function cd(e,t){fl.add(gl*e-pl*t),pl=e,gl=t}function Mx(){cd(od,ld)}var wr=1/0,ra=wr,xi=-wr,ia=xi,sa={point:Cx,lineStart:we,lineEnd:we,polygonStart:we,polygonEnd:we,result:function(){var e=[[wr,ra],[xi,ia]];return xi=ia=-(ra=wr=1/0),e}};function Cx(e,t){e<wr&&(wr=e),e>xi&&(xi=e),t<ra&&(ra=t),t>ia&&(ia=t)}var ml=0,vl=0,bi=0,aa=0,oa=0,Mr=0,yl=0,El=0,Si=0,ud,hd,Je,tn,Me={point:jn,lineStart:dd,lineEnd:fd,polygonStart:function(){Me.lineStart=Lx,Me.lineEnd=Rx},polygonEnd:function(){Me.point=jn,Me.lineStart=dd,Me.lineEnd=fd},result:function(){var e=Si?[yl/Si,El/Si]:Mr?[aa/Mr,oa/Mr]:bi?[ml/bi,vl/bi]:[NaN,NaN];return ml=vl=bi=aa=oa=Mr=yl=El=Si=0,e}};function jn(e,t){ml+=e,vl+=t,++bi}function dd(){Me.point=Ax}function Ax(e,t){Me.point=Dx,jn(Je=e,tn=t)}function Dx(e,t){var n=e-Je,r=t-tn,i=He(n*n+r*r);aa+=i*(Je+e)/2,oa+=i*(tn+t)/2,Mr+=i,jn(Je=e,tn=t)}function fd(){Me.point=jn}function Lx(){Me.point=Ix}function Rx(){pd(ud,hd)}function Ix(e,t){Me.point=pd,jn(ud=Je=e,hd=tn=t)}function pd(e,t){var n=e-Je,r=t-tn,i=He(n*n+r*r);aa+=i*(Je+e)/2,oa+=i*(tn+t)/2,Mr+=i,i=tn*e-Je*t,yl+=i*(Je+e),El+=i*(tn+t),Si+=i*3,jn(Je=e,tn=t)}function gd(e){this._context=e}gd.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,xe);break}}},result:we};var xl=new Gn,bl,md,vd,_i,Ti,Oi={point:we,lineStart:function(){Oi.point=kx},lineEnd:function(){bl&&yd(md,vd),Oi.point=we},polygonStart:function(){bl=!0},polygonEnd:function(){bl=null},result:function(){var e=+xl;return xl=new Gn,e}};function kx(e,t){Oi.point=yd,md=_i=e,vd=Ti=t}function yd(e,t){_i-=e,Ti-=t,xl.add(He(_i*_i+Ti*Ti)),_i=e,Ti=t}let Ed,la,xd,bd;class Sd{constructor(t){this._append=t==null?_d: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!==xd||this._append!==la){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`,xd=r,la=this._append,bd=this._,this._=i}this._+=bd;break}}}result(){const t=this._;return this._="",t.length?t:null}}function _d(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 _d;if(t!==Ed){const n=10**t;Ed=t,la=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 la}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(vn)),vn.result()},a.measure=function(o){return Tr(o,i(Oi)),Oi.result()},a.bounds=function(o){return Tr(o,i(sa)),sa.result()},a.centroid=function(o){return Tr(o,i(Me)),Me.result()},a.projection=function(o){return arguments.length?(i=o==null?(e=null,hl):(e=o).stream,a):e},a.context=function(o){return arguments.length?(s=o==null?(t=null,new Sd(n)):new gd(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 Sd(n)),a},a.projection(e).digits(n).context(t)}function Sl(e){return function(t){var n=new _l;for(var r in e)n[r]=e[r];return n.stream=t,n}}function _l(){}_l.prototype={constructor:_l,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 Tl(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(sa)),t(sa.result()),r!=null&&e.clipExtent(r),e}function Td(e,t,n){return Tl(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 $x(e,t,n){return Td(e,[[0,0],t],n)}function Fx(e,t,n){return Tl(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 Ux(e,t,n){return Tl(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 Od=16,Bx=Mt(30*Nt);function wd(e,t){return+t?Gx(e,t):Hx(e)}function Hx(e){return Sl({point:function(t,n){t=e(t,n),this.stream.point(t[0],t[1])}})}function Gx(e,t){function n(r,i,s,a,o,l,c,u,d,h,f,p,g,m){var v=c-r,S=u-i,E=v*v+S*S;if(E>4*t&&g--){var b=a+h,x=o+f,_=l+p,C=He(b*b+x*x+_*_),D=mn(_/=C),B=Tt(Tt(_)-1)<wt||Tt(s-d)<wt?(s+d)/2:Zn(x,b),P=e(B,D),w=P[0],H=P[1],N=w-r,M=H-i,O=S*N-v*M;(O*O/E>t||Tt((v*N+S*M)/E-.5)>.3||a*h+o*f+l*p<Bx)&&(n(r,i,s,a,o,l,w,H,B,b/=C,x/=C,_,g,m),m.point(w,H),n(w,H,B,b,x,_,c,u,d,h,f,p,g,m))}}return function(r){var i,s,a,o,l,c,u,d,h,f,p,g,m={point:v,lineStart:S,lineEnd:b,polygonStart:function(){r.polygonStart(),m.lineStart=x},polygonEnd:function(){r.polygonEnd(),m.lineStart=S}};function v(D,B){D=e(D,B),r.point(D[0],D[1])}function S(){d=NaN,m.point=E,r.lineStart()}function E(D,B){var P=Or([D,B]),w=e(D,B);n(d,h,u,f,p,g,d=w[0],h=w[1],u=D,f=P[0],p=P[1],g=P[2],Od,r),r.point(d,h)}function b(){m.point=v,r.lineEnd()}function x(){S(),m.point=_,m.lineEnd=C}function _(D,B){E(i=D,B),s=d,a=h,o=f,l=p,c=g,m.point=E}function C(){n(d,h,u,f,p,g,s,a,i,o,l,c,Od,r),m.lineEnd=b,b()}return m}}var Vx=Sl({point:function(e,t){this.stream.point(e*Nt,t*Nt)}});function zx(e){return Sl({point:function(t,n){var r=e(t,n);return this.stream.point(r[0],r[1])}})}function Wx(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 Md(e,t,n,r,i,s){if(!s)return Wx(e,t,n,r,i);var a=Mt(s),o=bt(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,m){return g*=r,m*=i,[l*g-c*m+t,n-c*g-l*m]}return p.invert=function(g,m){return[r*(u*g-d*m+h),i*(f-d*g-u*m)]},p}function ca(e){return Cd(function(){return e})()}function Cd(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=ad,m=null,v,S,E,b=hl,x=.5,_,C,D,B,P;function w(O){return D(O[0]*Nt,O[1]*Nt)}function H(O){return O=D.invert(O[0],O[1]),O&&[O[0]*re,O[1]*re]}w.stream=function(O){return B&&P===O?B:B=Vx(zx(u)(g(_(b(P=O)))))},w.preclip=function(O){return arguments.length?(g=O,p=void 0,M()):g},w.postclip=function(O){return arguments.length?(b=O,m=v=S=E=null,M()):b},w.clipAngle=function(O){return arguments.length?(g=+O?Sx(p=O*Nt):(p=null,ad),M()):p*re},w.clipExtent=function(O){return arguments.length?(b=O==null?(m=v=S=E=null,hl):Tx(m=+O[0][0],v=+O[0][1],S=+O[1][0],E=+O[1][1]),M()):m==null?null:[[m,v],[S,E]]},w.scale=function(O){return arguments.length?(n=+O,N()):n},w.translate=function(O){return arguments.length?(r=+O[0],i=+O[1],N()):[r,i]},w.center=function(O){return arguments.length?(s=O[0]%360*Nt,a=O[1]%360*Nt,N()):[s*re,a*re]},w.rotate=function(O){return arguments.length?(o=O[0]%360*Nt,l=O[1]%360*Nt,c=O.length>2?O[2]%360*Nt:0,N()):[o*re,l*re,c*re]},w.angle=function(O){return arguments.length?(d=O%360*Nt,N()):d*re},w.reflectX=function(O){return arguments.length?(h=O?-1:1,N()):h<0},w.reflectY=function(O){return arguments.length?(f=O?-1:1,N()):f<0},w.precision=function(O){return arguments.length?(_=wd(C,x=O*O),M()):He(x)},w.fitExtent=function(O,$){return Td(w,O,$)},w.fitSize=function(O,$){return $x(w,O,$)},w.fitWidth=function(O,$){return Fx(w,O,$)},w.fitHeight=function(O,$){return Ux(w,O,$)};function N(){var O=Md(n,0,0,h,f,d).apply(null,t(s,a)),$=Md(n,r-O[0],i-O[1],h,f,d);return u=Kh(o,l,c),C=ll(t,$),D=ll(u,C),_=wd(C,x),M()}function M(){return B=P=null,w}return function(){return t=e.apply(this,arguments),w.invert=t.invert&&H,N()}}function Ad(e){var t=0,n=gt/3,r=Cd(e),i=r(t,n);return i.parallels=function(s){return arguments.length?r(t=s[0]*Nt,n=s[1]*Nt):[t*re,n*re]},i}function Yx(e){var t=Mt(e);function n(r,i){return[r*t,bt(i)/t]}return n.invert=function(r,i){return[r/t,mn(i*t)]},n}function qx(e,t){var n=bt(e),r=(n+bt(t))/2;if(Tt(r)<wt)return Yx(e);var i=1+n*(2*r-n),s=He(i)/r;function a(o,l){var c=He(i-2*r*bt(l))/r;return[c*bt(o*=r),s-c*Mt(o)]}return a.invert=function(o,l){var c=s-l,u=Zn(o,Tt(c))*Pn(c);return c*r<0&&(u-=gt*Pn(o)*Pn(c)),[u/r,mn((i-(o*o+c*c)*r*r)/(2*r))]},a}function Dd(){return Ad(qx).scale(155.424).center([0,33.6442])}function Xx(){return Dd().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function Ol(e,t){return[e,hx(dx((de+t)/2))]}Ol.invert=function(e,t){return[e,2*qh(ux(t))-de]};function Zx(){return jx(Ol).scale(961/xe)}function jx(e){var t=ca(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=gt*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===Ol?[[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 ua(e,t){return[e,t]}ua.invert=ua;function Kx(){return ca(ua).scale(152.63)}function Qx(e,t){var n=Mt(e),r=e===t?bt(e):(n-Mt(t))/(t-e),i=n/r+e;if(Tt(r)<wt)return ua;function s(a,o){var l=i-o,c=r*a;return[l*bt(c),i-l*Mt(c)]}return s.invert=function(a,o){var l=i-o,c=Zn(a,Tt(l))*Pn(l);return l*r<0&&(c-=gt*Pn(a)*Pn(l)),[c/r,i-Pn(r)*He(a*a+l*l)]},s}function Jx(){return Ad(Qx).scale(131.154).center([0,13.9389])}var wi=1.340264,Mi=-.081106,Ci=893e-6,Ai=.003796,ha=He(3)/2,tb=12;function Ld(e,t){var n=mn(ha*bt(t)),r=n*n,i=r*r*r;return[e*Mt(n)/(ha*(wi+3*Mi*r+i*(7*Ci+9*Ai*r))),n*(wi+Mi*r+i*(Ci+Ai*r))]}Ld.invert=function(e,t){for(var n=t,r=n*n,i=r*r*r,s=0,a,o,l;s<tb&&(o=n*(wi+Mi*r+i*(Ci+Ai*r))-t,l=wi+3*Mi*r+i*(7*Ci+9*Ai*r),n-=a=o/l,r=n*n,i=r*r*r,!(Tt(a)<cx));++s);return[ha*e*(wi+3*Mi*r+i*(7*Ci+9*Ai*r))/Mt(n),mn(bt(n)/ha)]};function eb(){return ca(Ld).scale(177.158)}function Rd(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)))]}Rd.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(Tt(i)>wt&&--r>0);return[e/(.8707+(s=n*n)*(-.131979+s*(-.013791+s*s*s*(.003971-.001529*s)))),n]};function nb(){return ca(Rd).scale(175.295)}function rb(e,t){return e.parent===t.parent?1:2}function ib(e){return e.reduce(sb,0)/e.length}function sb(e,t){return e+t.x}function ab(e){return 1+e.reduce(ob,0)}function ob(e,t){return Math.max(e,t.y)}function lb(e){for(var t;t=e.children;)e=t[0];return e}function cb(e){for(var t;t=e.children;)e=t[t.length-1];return e}function ub(){var e=rb,t=1,n=1,r=!1;function i(s){var a,o=0;s.eachAfter(function(h){var f=h.children;f?(h.x=ib(f),h.y=ab(f)):(h.x=a?o+=e(h,a):0,h.y=0,a=h)});var l=lb(s),c=cb(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 hb(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 db(){return this.eachAfter(hb)}function fb(e,t){let n=-1;for(const r of this)e.call(t,r,++n,this);return this}function pb(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 gb(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 mb(e,t){let n=-1;for(const r of this)if(e.call(t,r,++n,this))return r}function vb(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 yb(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function Eb(e){for(var t=this,n=xb(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 xb(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 bb(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function Sb(){return Array.from(this)}function _b(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function Tb(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function*Ob(){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 Di(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=Cb)):t===void 0&&(t=Mb);for(var n=new Li(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 Li(a[o])),s.parent=r,s.depth=r.depth+1;return n.eachBefore(Db)}function wb(){return Di(this).eachBefore(Ab)}function Mb(e){return e.children}function Cb(e){return Array.isArray(e)?e[1]:null}function Ab(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function Db(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function Li(e){this.data=e,this.depth=this.height=0,this.parent=null}Li.prototype=Di.prototype={constructor:Li,count:db,each:fb,eachAfter:gb,eachBefore:pb,find:mb,sum:vb,sort:yb,path:Eb,ancestors:bb,descendants:Sb,leaves:_b,links:Tb,copy:wb,[Symbol.iterator]:Ob};function Lb(e){return e==null?null:Id(e)}function Id(e){if(typeof e!="function")throw new Error;return e}function Kn(){return 0}function Cr(e){return function(){return e}}const Rb=1664525,Ib=1013904223,kd=4294967296;function kb(){let e=1;return()=>(e=(Rb*e+Ib)%kd)/kd}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 $b(e,t){for(var n=0,r=(e=Nb(Array.from(e),t)).length,i=[],s,a;n<r;)s=e[n],a&&Pd(a,s)?++n:(a=Ub(i=Fb(i,s)),n=0);return a}function Fb(e,t){var n,r;if(wl(t,e))return[t];for(n=0;n<e.length;++n)if(da(t,e[n])&&wl(Ri(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(da(Ri(e[n],e[r]),t)&&da(Ri(e[n],t),e[r])&&da(Ri(e[r],t),e[n])&&wl(Nd(e[n],e[r],t),e))return[e[n],e[r],t];throw new Error}function da(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 Pd(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 wl(e,t){for(var n=0;n<t.length;++n)if(!Pd(e,t[n]))return!1;return!0}function Ub(e){switch(e.length){case 1:return Bb(e[0]);case 2:return Ri(e[0],e[1]);case 3:return Nd(e[0],e[1],e[2])}}function Bb(e){return{x:e.x,y:e.y,r:e.r}}function Ri(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 Nd(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,m=l-s,v=d-s,S=r*r+i*i-s*s,E=S-a*a-o*o+l*l,b=S-c*c-u*u+d*d,x=f*p-h*g,_=(p*b-g*E)/(x*2)-r,C=(g*m-p*v)/x,D=(f*E-h*b)/(x*2)-i,B=(h*v-f*m)/x,P=C*C+B*B-1,w=2*(s+_*C+D*B),H=_*_+D*D-s*s,N=-(Math.abs(P)>1e-6?(w+Math.sqrt(w*w-4*P*H))/(2*P):H/w);return{x:r+_+C*N,y:i+D+B*N,r:N}}function $d(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 Fd(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 Ud(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 fa(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;$d(r,n,i=e[2]),n=new fa(n),r=new fa(r),i=new fa(i),n.next=i.previous=r,r.next=n.previous=i,i.next=r.previous=n;t:for(l=3;l<s;++l){$d(n._,r._,i=e[l]),i=new fa(i),c=r.next,u=n.previous,d=r._.r,h=n._.r;do if(d<=h){if(Fd(c._,i._)){r=c,n.next=r,r.previous=n,--l;continue t}d+=c._.r,c=c.next}else{if(Fd(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=Ud(n);(i=i.next)!==r;)(o=Ud(i))<a&&(n=i,a=o);r=n.next}for(n=[r._],i=r;(i=i.next)!==r;)n.push(i._);for(i=$b(n,t),l=0;l<s;++l)n=e[l],n.x-=i.x,n.y-=i.y;return i.r}function Gb(e){return Math.sqrt(e.value)}function Vb(){var e=null,t=1,n=1,r=Kn;function i(s){const a=kb();return s.x=t/2,s.y=n/2,e?s.eachBefore(Bd(e)).eachAfter(Ml(r,.5,a)).eachBefore(Hd(1)):s.eachBefore(Bd(Gb)).eachAfter(Ml(Kn,1,a)).eachAfter(Ml(r,s.r/Math.min(t,n),a)).eachBefore(Hd(Math.min(t,n)/(2*s.r))),s}return i.radius=function(s){return arguments.length?(e=Lb(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:Cr(+s),i):r},i}function Bd(e){return function(t){t.children||(t.r=Math.max(0,+e(t)||0))}}function Ml(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 Hd(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 zb(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 Wb(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 Yb(e,t){return e.parent===t.parent?1:2}function Cl(e){var t=e.children;return t?t[0]:e.t}function Al(e){var t=e.children;return t?t[t.length-1]:e.t}function qb(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 Xb(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 pa(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}pa.prototype=Object.create(Li.prototype);function jb(e){for(var t=new pa(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 pa(s[a],a)),i.parent=n;return(t.parent=new pa(null,0)).children=[t],t}function Kb(){var e=Yb,t=1,n=1,r=null;function i(c){var u=jb(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(S){S.x<d.x&&(d=S),S.x>h.x&&(h=S),S.depth>f.depth&&(f=S)});var p=d===h?1:e(d,h)/2,g=p-d.x,m=t/(h.x+p+g),v=n/(f.depth||1);c.eachBefore(function(S){S.x=(S.x+g)*m,S.y=S.depth*v})}return c}function s(c){var u=c.children,d=c.parent.children,h=c.i?d[c.i-1]:null;if(u){Xb(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],m=h.m,v=f.m,S=p.m,E=g.m,b;p=Al(p),h=Cl(h),p&&h;)g=Cl(g),f=Al(f),f.a=c,b=p.z+S-h.z-m+e(p._,h._),b>0&&(qb(Zb(p,c,d),c,b),m+=b,v+=b),S+=p.m,m+=h.m,E+=g.m,v+=f.m;p&&!Al(f)&&(f.t=p,f.m+=S-v),h&&!Cl(g)&&(g.t=h,g.m+=m-E,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 Qb(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 Jb=(1+Math.sqrt(5))/2;function tS(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,m,v,S,E,b,x,_;u<h;){f=i-n,p=s-r;do m=o[d++].value;while(!m&&d<h);for(v=S=m,x=Math.max(p/f,f/p)/(g*e),_=m*m*x,b=Math.max(S/_,_/v);d<h;++d){if(m+=c=o[d].value,c<v&&(v=c),c>S&&(S=c),_=m*m*x,E=Math.max(S/_,_/v),E>b){m-=c;break}b=E}a.push(l={value:m,dice:f<p,children:o.slice(u,d)}),l.dice?Wb(l,n,r,i,g?r+=p*m/g:s):Qb(l,n,r,g?n+=f*m/g:i,s),g-=m,u=d}return a}const eS=function e(t){function n(r,i,s,a,o){tS(t,r,i,s,a,o)}return n.ratio=function(r){return e((r=+r)>1?r:1)},n}(Jb);function nS(){var e=eS,t=!1,n=1,r=1,i=[0],s=Kn,a=Kn,o=Kn,l=Kn,c=Kn;function u(h){return h.x0=h.y0=0,h.x1=n,h.y1=r,h.eachBefore(d),i=[0],t&&h.eachBefore(zb),h}function d(h){var f=i[h.depth],p=h.x0+f,g=h.y0+f,m=h.x1-f,v=h.y1-f;m<p&&(p=m=(p+m)/2),v<g&&(g=v=(g+v)/2),h.x0=p,h.y0=g,h.x1=m,h.y1=v,h.children&&(f=i[h.depth+1]=s(h)/2,p+=c(h)-f,g+=a(h)-f,m-=o(h)-f,v-=l(h)-f,m<p&&(p=m=(p+m)/2),v<g&&(g=v=(g+v)/2),e(h,p,g,m,v))}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=Id(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:Cr(+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:Cr(+h),u):a},u.paddingRight=function(h){return arguments.length?(o=typeof h=="function"?h:Cr(+h),u):o},u.paddingBottom=function(h){return arguments.length?(l=typeof h=="function"?h:Cr(+h),u):l},u.paddingLeft=function(h){return arguments.length?(c=typeof h=="function"?h:Cr(+h),u):c},u}function Ar(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}const Gd=Symbol("implicit");function ga(){var e=new Pu,t=[],n=[],r=Gd;function i(s){let a=e.get(s);if(a===void 0){if(r!==Gd)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 Pu;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 ga(t,n).unknown(r)},Ar.apply(i,arguments),i}function Ii(){var e=ga().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 m=u0(h).map(function(v){return p+s*v});return n(f?m.reverse():m)}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 Ii(t(),[r,i]).round(o).paddingInner(l).paddingOuter(c).align(u)},Ar.apply(d(),arguments)}function rS(e){return function(){return e}}function iS(e){return+e}var Vd=[0,1];function Dr(e){return e}function Dl(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:rS(isNaN(t)?NaN:.5)}function sS(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function aS(e,t,n){var r=e[0],i=e[1],s=t[0],a=t[1];return i<r?(r=Dl(i,r),s=n(a,s)):(r=Dl(r,i),s=n(s,a)),function(o){return s(r(o))}}function oS(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]=Dl(e[a],e[a+1]),s[a]=n(t[a],t[a+1]);return function(o){var l=So(e,o,1,r)-1;return s[l](i[l](o))}}function Ll(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function zd(){var e=Vd,t=Vd,n=pi,r,i,s,a=Dr,o,l,c;function u(){var h=Math.min(e.length,t.length);return a!==Dr&&(a=sS(e[0],e[h-1])),o=h>2?oS:aS,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),Ee)))(h)))},d.domain=function(h){return arguments.length?(e=Array.from(h,iS),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=gh,u()},d.clamp=function(h){return arguments.length?(a=h?!0:Dr,u()):a!==Dr},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 Wd(){return zd()(Dr,Dr)}function lS(e,t,n,r){var i=To(e,t,n),s;switch(r=Ei(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(s=ox(i,a))&&(r.precision=s),Wh(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(s=lx(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=s-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(s=ax(i))&&(r.precision=s-(r.type==="%")*2);break}}return rl(r)}function Yd(e){var t=e.domain;return e.ticks=function(n){var r=t();return ws(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return lS(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=vr(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 Ge(){var e=Wd();return e.copy=function(){return Ll(e,Ge())},Ar.apply(e,arguments),Yd(e)}function qd(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 Xd(e){return Math.log(e)}function Zd(e){return Math.exp(e)}function cS(e){return-Math.log(-e)}function uS(e){return-Math.exp(-e)}function hS(e){return isFinite(e)?+("1e"+e):e<0?0:e}function dS(e){return e===10?hS:e===Math.E?Math.exp:t=>Math.pow(e,t)}function fS(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 jd(e){return(t,n)=>-e(-t,n)}function pS(e){const t=e(Xd,Zd),n=t.domain;let r=10,i,s;function a(){return i=fS(r),s=dS(r),n()[0]<0?(i=jd(i),s=jd(s),e(cS,uS)):e(Xd,Zd),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 m=o==null?10:+o;let v=[];if(!(r%1)&&f-h<m){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;v.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;v.push(g)}v.length*2<m&&(v=ws(c,u,m))}else v=ws(h,f,Math.min(f-h,m)).map(s);return d?v.reverse():v},t.tickFormat=(o,l)=>{if(o==null&&(o=10),l==null&&(l=r===10?"s":","),typeof l!="function"&&(!(r%1)&&(l=Ei(l)).precision==null&&(l.trim=!0),l=rl(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(qd(n(),{floor:o=>s(Math.floor(i(o))),ceil:o=>s(Math.ceil(i(o)))})),t}function Kd(){const e=pS(zd()).domain([1,10]);return e.copy=()=>Ll(e,Kd()).base(e.base()),Ar.apply(e,arguments),e}function Rl(){var e=0,t=1,n=1,r=[.5],i=[0,1],s;function a(l){return l!=null&&l<=l?i[So(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 Rl().domain([e,t]).range(i).unknown(s)},Ar.apply(Yd(a),arguments)}const Il=new Date,kl=new Date;function Wt(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=>Wt(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)=>(Il.setTime(+s),kl.setTime(+a),e(Il),e(kl),Math.floor(n(Il,kl))),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 ma=Wt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);ma.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Wt(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):ma),ma.range;const yn=1e3,Ce=yn*60,En=Ce*60,xn=En*24,Pl=xn*7,Qd=xn*30,Nl=xn*365,Lr=Wt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*yn)},(e,t)=>(t-e)/yn,e=>e.getUTCSeconds());Lr.range;const $l=Wt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*yn)},(e,t)=>{e.setTime(+e+t*Ce)},(e,t)=>(t-e)/Ce,e=>e.getMinutes());$l.range,Wt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Ce)},(e,t)=>(t-e)/Ce,e=>e.getUTCMinutes()).range;const Fl=Wt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*yn-e.getMinutes()*Ce)},(e,t)=>{e.setTime(+e+t*En)},(e,t)=>(t-e)/En,e=>e.getHours());Fl.range,Wt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*En)},(e,t)=>(t-e)/En,e=>e.getUTCHours()).range;const ki=Wt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Ce)/xn,e=>e.getDate()-1);ki.range;const Ul=Wt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/xn,e=>e.getUTCDate()-1);Ul.range,Wt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/xn,e=>Math.floor(e/xn)).range;function Qn(e){return Wt(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())*Ce)/Pl)}const va=Qn(0),ya=Qn(1),gS=Qn(2),mS=Qn(3),Rr=Qn(4),vS=Qn(5),yS=Qn(6);va.range,ya.range,gS.range,mS.range,Rr.range,vS.range,yS.range;function Jn(e){return Wt(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)/Pl)}const Jd=Jn(0),Ea=Jn(1),ES=Jn(2),xS=Jn(3),Ir=Jn(4),bS=Jn(5),SS=Jn(6);Jd.range,Ea.range,ES.range,xS.range,Ir.range,bS.range,SS.range;const Bl=Wt(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());Bl.range,Wt(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 bn=Wt(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());bn.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Wt(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)}),bn.range;const tr=Wt(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());tr.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Wt(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)}),tr.range;function _S(e,t,n,r,i,s){const a=[[Lr,1,yn],[Lr,5,5*yn],[Lr,15,15*yn],[Lr,30,30*yn],[s,1,Ce],[s,5,5*Ce],[s,15,15*Ce],[s,30,30*Ce],[i,1,En],[i,3,3*En],[i,6,6*En],[i,12,12*En],[r,1,xn],[r,2,2*xn],[n,1,Pl],[t,1,Qd],[t,3,3*Qd],[e,1,Nl]];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=bo(([,,m])=>m).right(a,h);if(f===a.length)return e.every(To(c/Nl,u/Nl,d));if(f===0)return ma.every(Math.max(To(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[TS,OS]=_S(bn,Bl,va,ki,Fl,$l);function Hl(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 Gl(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 Pi(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function wS(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=Ni(i),u=$i(i),d=Ni(s),h=$i(s),f=Ni(a),p=$i(a),g=Ni(o),m=$i(o),v=Ni(l),S=$i(l),E={a:F,A:L,b:U,B:tt,c:null,d:af,e:af,f:ZS,g:s_,G:o_,H:YS,I:qS,j:XS,L:of,m:jS,M:KS,p:X,q:Y,Q:ff,s:pf,S:QS,u:JS,U:t_,V:e_,w:n_,W:r_,x:null,X:null,y:i_,Y:a_,Z:l_,"%":df},b={a:Q,A:ut,b:et,B:K,c:null,d:cf,e:cf,f:d_,g:S_,G:T_,H:c_,I:u_,j:h_,L:uf,m:f_,M:p_,p:nt,q:ht,Q:ff,s:pf,S:g_,u:m_,U:v_,V:y_,w:E_,W:x_,x:null,X:null,y:b_,Y:__,Z:O_,"%":df},x={a:P,A:w,b:H,B:N,c:M,d:rf,e:rf,f:GS,g:nf,G:ef,H:sf,I:sf,j:FS,L:HS,m:$S,M:US,p:B,q:NS,Q:zS,s:WS,S:BS,u:LS,U:RS,V:IS,w:DS,W:kS,x:O,X:$,y:nf,Y:ef,Z:PS,"%":VS};E.x=_(n,E),E.X=_(r,E),E.c=_(t,E),b.x=_(n,b),b.X=_(r,b),b.c=_(t,b);function _(W,j){return function(J){var A=[],G=-1,V=0,xt=W.length,Ut,st,_t;for(J instanceof Date||(J=new Date(+J));++G<xt;)W.charCodeAt(G)===37&&(A.push(W.slice(V,G)),(st=tf[Ut=W.charAt(++G)])!=null?Ut=W.charAt(++G):st=Ut==="e"?" ":"0",(_t=j[Ut])&&(Ut=_t(J,st)),A.push(Ut),V=G+1);return A.push(W.slice(V,G)),A.join("")}}function C(W,j){return function(J){var A=Pi(1900,void 0,1),G=D(A,W,J+="",0),V,xt;if(G!=J.length)return null;if("Q"in A)return new Date(A.Q);if("s"in A)return new Date(A.s*1e3+("L"in A?A.L:0));if(j&&!("Z"in A)&&(A.Z=0),"p"in A&&(A.H=A.H%12+A.p*12),A.m===void 0&&(A.m="q"in A?A.q:0),"V"in A){if(A.V<1||A.V>53)return null;"w"in A||(A.w=1),"Z"in A?(V=Gl(Pi(A.y,0,1)),xt=V.getUTCDay(),V=xt>4||xt===0?Ea.ceil(V):Ea(V),V=Ul.offset(V,(A.V-1)*7),A.y=V.getUTCFullYear(),A.m=V.getUTCMonth(),A.d=V.getUTCDate()+(A.w+6)%7):(V=Hl(Pi(A.y,0,1)),xt=V.getDay(),V=xt>4||xt===0?ya.ceil(V):ya(V),V=ki.offset(V,(A.V-1)*7),A.y=V.getFullYear(),A.m=V.getMonth(),A.d=V.getDate()+(A.w+6)%7)}else("W"in A||"U"in A)&&("w"in A||(A.w="u"in A?A.u%7:"W"in A?1:0),xt="Z"in A?Gl(Pi(A.y,0,1)).getUTCDay():Hl(Pi(A.y,0,1)).getDay(),A.m=0,A.d="W"in A?(A.w+6)%7+A.W*7-(xt+5)%7:A.w+A.U*7-(xt+6)%7);return"Z"in A?(A.H+=A.Z/100|0,A.M+=A.Z%100,Gl(A)):Hl(A)}}function D(W,j,J,A){for(var G=0,V=j.length,xt=J.length,Ut,st;G<V;){if(A>=xt)return-1;if(Ut=j.charCodeAt(G++),Ut===37){if(Ut=j.charAt(G++),st=x[Ut in tf?j.charAt(G++):Ut],!st||(A=st(W,J,A))<0)return-1}else if(Ut!=J.charCodeAt(A++))return-1}return A}function B(W,j,J){var A=c.exec(j.slice(J));return A?(W.p=u.get(A[0].toLowerCase()),J+A[0].length):-1}function P(W,j,J){var A=f.exec(j.slice(J));return A?(W.w=p.get(A[0].toLowerCase()),J+A[0].length):-1}function w(W,j,J){var A=d.exec(j.slice(J));return A?(W.w=h.get(A[0].toLowerCase()),J+A[0].length):-1}function H(W,j,J){var A=v.exec(j.slice(J));return A?(W.m=S.get(A[0].toLowerCase()),J+A[0].length):-1}function N(W,j,J){var A=g.exec(j.slice(J));return A?(W.m=m.get(A[0].toLowerCase()),J+A[0].length):-1}function M(W,j,J){return D(W,t,j,J)}function O(W,j,J){return D(W,n,j,J)}function $(W,j,J){return D(W,r,j,J)}function F(W){return a[W.getDay()]}function L(W){return s[W.getDay()]}function U(W){return l[W.getMonth()]}function tt(W){return o[W.getMonth()]}function X(W){return i[+(W.getHours()>=12)]}function Y(W){return 1+~~(W.getMonth()/3)}function Q(W){return a[W.getUTCDay()]}function ut(W){return s[W.getUTCDay()]}function et(W){return l[W.getUTCMonth()]}function K(W){return o[W.getUTCMonth()]}function nt(W){return i[+(W.getUTCHours()>=12)]}function ht(W){return 1+~~(W.getUTCMonth()/3)}return{format:function(W){var j=_(W+="",E);return j.toString=function(){return W},j},parse:function(W){var j=C(W+="",!1);return j.toString=function(){return W},j},utcFormat:function(W){var j=_(W+="",b);return j.toString=function(){return W},j},utcParse:function(W){var j=C(W+="",!0);return j.toString=function(){return W},j}}}var tf={"-":"",_:" ",0:"0"},Yt=/^\s*\d+/,MS=/^%/,CS=/[\\^$*+?|[\]().{}]/g;function Et(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 AS(e){return e.replace(CS,"\\$&")}function Ni(e){return new RegExp("^(?:"+e.map(AS).join("|")+")","i")}function $i(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function DS(e,t,n){var r=Yt.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function LS(e,t,n){var r=Yt.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function RS(e,t,n){var r=Yt.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function IS(e,t,n){var r=Yt.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function kS(e,t,n){var r=Yt.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function ef(e,t,n){var r=Yt.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function nf(e,t,n){var r=Yt.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function PS(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 NS(e,t,n){var r=Yt.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function $S(e,t,n){var r=Yt.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function rf(e,t,n){var r=Yt.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function FS(e,t,n){var r=Yt.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function sf(e,t,n){var r=Yt.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function US(e,t,n){var r=Yt.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function BS(e,t,n){var r=Yt.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function HS(e,t,n){var r=Yt.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function GS(e,t,n){var r=Yt.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function VS(e,t,n){var r=MS.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function zS(e,t,n){var r=Yt.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function WS(e,t,n){var r=Yt.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function af(e,t){return Et(e.getDate(),t,2)}function YS(e,t){return Et(e.getHours(),t,2)}function qS(e,t){return Et(e.getHours()%12||12,t,2)}function XS(e,t){return Et(1+ki.count(bn(e),e),t,3)}function of(e,t){return Et(e.getMilliseconds(),t,3)}function ZS(e,t){return of(e,t)+"000"}function jS(e,t){return Et(e.getMonth()+1,t,2)}function KS(e,t){return Et(e.getMinutes(),t,2)}function QS(e,t){return Et(e.getSeconds(),t,2)}function JS(e){var t=e.getDay();return t===0?7:t}function t_(e,t){return Et(va.count(bn(e)-1,e),t,2)}function lf(e){var t=e.getDay();return t>=4||t===0?Rr(e):Rr.ceil(e)}function e_(e,t){return e=lf(e),Et(Rr.count(bn(e),e)+(bn(e).getDay()===4),t,2)}function n_(e){return e.getDay()}function r_(e,t){return Et(ya.count(bn(e)-1,e),t,2)}function i_(e,t){return Et(e.getFullYear()%100,t,2)}function s_(e,t){return e=lf(e),Et(e.getFullYear()%100,t,2)}function a_(e,t){return Et(e.getFullYear()%1e4,t,4)}function o_(e,t){var n=e.getDay();return e=n>=4||n===0?Rr(e):Rr.ceil(e),Et(e.getFullYear()%1e4,t,4)}function l_(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Et(t/60|0,"0",2)+Et(t%60,"0",2)}function cf(e,t){return Et(e.getUTCDate(),t,2)}function c_(e,t){return Et(e.getUTCHours(),t,2)}function u_(e,t){return Et(e.getUTCHours()%12||12,t,2)}function h_(e,t){return Et(1+Ul.count(tr(e),e),t,3)}function uf(e,t){return Et(e.getUTCMilliseconds(),t,3)}function d_(e,t){return uf(e,t)+"000"}function f_(e,t){return Et(e.getUTCMonth()+1,t,2)}function p_(e,t){return Et(e.getUTCMinutes(),t,2)}function g_(e,t){return Et(e.getUTCSeconds(),t,2)}function m_(e){var t=e.getUTCDay();return t===0?7:t}function v_(e,t){return Et(Jd.count(tr(e)-1,e),t,2)}function hf(e){var t=e.getUTCDay();return t>=4||t===0?Ir(e):Ir.ceil(e)}function y_(e,t){return e=hf(e),Et(Ir.count(tr(e),e)+(tr(e).getUTCDay()===4),t,2)}function E_(e){return e.getUTCDay()}function x_(e,t){return Et(Ea.count(tr(e)-1,e),t,2)}function b_(e,t){return Et(e.getUTCFullYear()%100,t,2)}function S_(e,t){return e=hf(e),Et(e.getUTCFullYear()%100,t,2)}function __(e,t){return Et(e.getUTCFullYear()%1e4,t,4)}function T_(e,t){var n=e.getUTCDay();return e=n>=4||n===0?Ir(e):Ir.ceil(e),Et(e.getUTCFullYear()%1e4,t,4)}function O_(){return"+0000"}function df(){return"%"}function ff(e){return+e}function pf(e){return Math.floor(+e/1e3)}var kr,gf;w_({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 w_(e){return kr=wS(e),gf=kr.format,kr.parse,kr.utcFormat,kr.utcParse,kr}function M_(e){return new Date(e)}function C_(e){return e instanceof Date?+e:+new Date(+e)}function mf(e,t,n,r,i,s,a,o,l,c){var u=Wd(),d=u.invert,h=u.domain,f=c(".%L"),p=c(":%S"),g=c("%I:%M"),m=c("%I %p"),v=c("%a %d"),S=c("%b %d"),E=c("%B"),b=c("%Y");function x(_){return(l(_)<_?f:o(_)<_?p:a(_)<_?g:s(_)<_?m:r(_)<_?i(_)<_?v:S:n(_)<_?E:b)(_)}return u.invert=function(_){return new Date(d(_))},u.domain=function(_){return arguments.length?h(Array.from(_,C_)):h().map(M_)},u.ticks=function(_){var C=h();return e(C[0],C[C.length-1],_??10)},u.tickFormat=function(_,C){return C==null?x:c(C)},u.nice=function(_){var C=h();return(!_||typeof _.range!="function")&&(_=t(C[0],C[C.length-1],_??10)),_?h(qd(C,_)):u},u.copy=function(){return Ll(u,mf(e,t,n,r,i,s,a,o,l,c))},u}function vf(){return Ar.apply(mf(TS,OS,bn,Bl,va,ki,Fl,$l,Lr,gf).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function pt(e){return function(){return e}}const yf=Math.abs,Jt=Math.atan2,er=Math.cos,A_=Math.max,Vl=Math.min,en=Math.sin,Pr=Math.sqrt,te=1e-12,Fi=Math.PI,xa=Fi/2,ba=2*Fi;function D_(e){return e>1?0:e<-1?Fi:Math.acos(e)}function Ef(e){return e>=1?xa:e<=-1?-xa:Math.asin(e)}function Sa(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 KE(t)}function L_(e){return e.innerRadius}function R_(e){return e.outerRadius}function I_(e){return e.startAngle}function k_(e){return e.endAngle}function P_(e){return e&&e.padAngle}function N_(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<te))return h=(u*(t-s)-d*(e-i))/h,[e+h*l,t+h*c]}function _a(e,t,n,r,i,s,a){var o=e-n,l=t-r,c=(a?s:-s)/Pr(o*o+l*l),u=c*l,d=-c*o,h=e+u,f=t+d,p=n+u,g=r+d,m=(h+p)/2,v=(f+g)/2,S=p-h,E=g-f,b=S*S+E*E,x=i-s,_=h*g-p*f,C=(E<0?-1:1)*Pr(A_(0,x*x*b-_*_)),D=(_*E-S*C)/b,B=(-_*S-E*C)/b,P=(_*E+S*C)/b,w=(-_*S+E*C)/b,H=D-m,N=B-v,M=P-m,O=w-v;return H*H+N*N>M*M+O*O&&(D=P,B=w),{cx:D,cy:B,x01:-u,y01:-d,x11:D*(i/x-1),y11:B*(i/x-1)}}function Ui(){var e=L_,t=R_,n=pt(0),r=null,i=I_,s=k_,a=P_,o=null,l=Sa(c);function c(){var u,d,h=+e.apply(this,arguments),f=+t.apply(this,arguments),p=i.apply(this,arguments)-xa,g=s.apply(this,arguments)-xa,m=yf(g-p),v=g>p;if(o||(o=u=l()),f<h&&(d=f,f=h,h=d),!(f>te))o.moveTo(0,0);else if(m>ba-te)o.moveTo(f*er(p),f*en(p)),o.arc(0,0,f,p,g,!v),h>te&&(o.moveTo(h*er(g),h*en(g)),o.arc(0,0,h,g,p,v));else{var S=p,E=g,b=p,x=g,_=m,C=m,D=a.apply(this,arguments)/2,B=D>te&&(r?+r.apply(this,arguments):Pr(h*h+f*f)),P=Vl(yf(f-h)/2,+n.apply(this,arguments)),w=P,H=P,N,M;if(B>te){var O=Ef(B/h*en(D)),$=Ef(B/f*en(D));(_-=O*2)>te?(O*=v?1:-1,b+=O,x-=O):(_=0,b=x=(p+g)/2),(C-=$*2)>te?($*=v?1:-1,S+=$,E-=$):(C=0,S=E=(p+g)/2)}var F=f*er(S),L=f*en(S),U=h*er(x),tt=h*en(x);if(P>te){var X=f*er(E),Y=f*en(E),Q=h*er(b),ut=h*en(b),et;if(m<Fi)if(et=N_(F,L,Q,ut,X,Y,U,tt)){var K=F-et[0],nt=L-et[1],ht=X-et[0],W=Y-et[1],j=1/en(D_((K*ht+nt*W)/(Pr(K*K+nt*nt)*Pr(ht*ht+W*W)))/2),J=Pr(et[0]*et[0]+et[1]*et[1]);w=Vl(P,(h-J)/(j-1)),H=Vl(P,(f-J)/(j+1))}else w=H=0}C>te?H>te?(N=_a(Q,ut,F,L,f,H,v),M=_a(X,Y,U,tt,f,H,v),o.moveTo(N.cx+N.x01,N.cy+N.y01),H<P?o.arc(N.cx,N.cy,H,Jt(N.y01,N.x01),Jt(M.y01,M.x01),!v):(o.arc(N.cx,N.cy,H,Jt(N.y01,N.x01),Jt(N.y11,N.x11),!v),o.arc(0,0,f,Jt(N.cy+N.y11,N.cx+N.x11),Jt(M.cy+M.y11,M.cx+M.x11),!v),o.arc(M.cx,M.cy,H,Jt(M.y11,M.x11),Jt(M.y01,M.x01),!v))):(o.moveTo(F,L),o.arc(0,0,f,S,E,!v)):o.moveTo(F,L),!(h>te)||!(_>te)?o.lineTo(U,tt):w>te?(N=_a(U,tt,X,Y,h,-w,v),M=_a(F,L,Q,ut,h,-w,v),o.lineTo(N.cx+N.x01,N.cy+N.y01),w<P?o.arc(N.cx,N.cy,w,Jt(N.y01,N.x01),Jt(M.y01,M.x01),!v):(o.arc(N.cx,N.cy,w,Jt(N.y01,N.x01),Jt(N.y11,N.x11),!v),o.arc(0,0,h,Jt(N.cy+N.y11,N.cx+N.x11),Jt(M.cy+M.y11,M.cx+M.x11),v),o.arc(M.cx,M.cy,w,Jt(M.y11,M.x11),Jt(M.y01,M.x01),!v))):o.arc(0,0,h,x,b,v)}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-Fi/2;return[er(d)*u,en(d)*u]},c.innerRadius=function(u){return arguments.length?(e=typeof u=="function"?u:pt(+u),c):e},c.outerRadius=function(u){return arguments.length?(t=typeof u=="function"?u:pt(+u),c):t},c.cornerRadius=function(u){return arguments.length?(n=typeof u=="function"?u:pt(+u),c):n},c.padRadius=function(u){return arguments.length?(r=u==null?null:typeof u=="function"?u:pt(+u),c):r},c.startAngle=function(u){return arguments.length?(i=typeof u=="function"?u:pt(+u),c):i},c.endAngle=function(u){return arguments.length?(s=typeof u=="function"?u:pt(+u),c):s},c.padAngle=function(u){return arguments.length?(a=typeof u=="function"?u:pt(+u),c):a},c.context=function(u){return arguments.length?(o=u??null,c):o},c}var $_=Array.prototype.slice;function Ta(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function xf(e){this._context=e}xf.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 Oa(e){return new xf(e)}function zl(e){return e[0]}function Wl(e){return e[1]}function Bi(e,t){var n=pt(!0),r=null,i=Oa,s=null,a=Sa(o);e=typeof e=="function"?e:e===void 0?zl:pt(e),t=typeof t=="function"?t:t===void 0?Wl:pt(t);function o(l){var c,u=(l=Ta(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:pt(+l),o):e},o.y=function(l){return arguments.length?(t=typeof l=="function"?l:pt(+l),o):t},o.defined=function(l){return arguments.length?(n=typeof l=="function"?l:pt(!!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 Yl(e,t,n){var r=null,i=pt(!0),s=null,a=Oa,o=null,l=Sa(c);e=typeof e=="function"?e:e===void 0?zl:pt(+e),t=typeof t=="function"?t:pt(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?Wl:pt(+n);function c(d){var h,f,p,g=(d=Ta(d)).length,m,v=!1,S,E=new Array(g),b=new Array(g);for(s==null&&(o=a(S=l())),h=0;h<=g;++h){if(!(h<g&&i(m=d[h],h,d))===v)if(v=!v)f=h,o.areaStart(),o.lineStart();else{for(o.lineEnd(),o.lineStart(),p=h-1;p>=f;--p)o.point(E[p],b[p]);o.lineEnd(),o.areaEnd()}v&&(E[h]=+e(m,h,d),b[h]=+t(m,h,d),o.point(r?+r(m,h,d):E[h],n?+n(m,h,d):b[h]))}if(S)return o=null,S+""||null}function u(){return Bi().defined(i).curve(a).context(s)}return c.x=function(d){return arguments.length?(e=typeof d=="function"?d:pt(+d),r=null,c):e},c.x0=function(d){return arguments.length?(e=typeof d=="function"?d:pt(+d),c):e},c.x1=function(d){return arguments.length?(r=d==null?null:typeof d=="function"?d:pt(+d),c):r},c.y=function(d){return arguments.length?(t=typeof d=="function"?d:pt(+d),n=null,c):t},c.y0=function(d){return arguments.length?(t=typeof d=="function"?d:pt(+d),c):t},c.y1=function(d){return arguments.length?(n=d==null?null:typeof d=="function"?d:pt(+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:pt(!!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 F_(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function U_(e){return e}function B_(){var e=U_,t=F_,n=null,r=pt(0),i=pt(ba),s=pt(0);function a(o){var l,c=(o=Ta(o)).length,u,d,h=0,f=new Array(c),p=new Array(c),g=+r.apply(this,arguments),m=Math.min(ba,Math.max(-ba,i.apply(this,arguments)-g)),v,S=Math.min(Math.abs(m)/c,s.apply(this,arguments)),E=S*(m<0?-1:1),b;for(l=0;l<c;++l)(b=p[f[l]=l]=+e(o[l],l,o))>0&&(h+=b);for(t!=null?f.sort(function(x,_){return t(p[x],p[_])}):n!=null&&f.sort(function(x,_){return n(o[x],o[_])}),l=0,d=h?(m-c*E)/h:0;l<c;++l,g=v)u=f[l],b=p[u],v=g+(b>0?b*d:0)+E,p[u]={data:o[u],index:l,value:b,startAngle:g,endAngle:v,padAngle:S};return p}return a.value=function(o){return arguments.length?(e=typeof o=="function"?o:pt(+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:pt(+o),a):r},a.endAngle=function(o){return arguments.length?(i=typeof o=="function"?o:pt(+o),a):i},a.padAngle=function(o){return arguments.length?(s=typeof o=="function"?o:pt(+o),a):s},a}var H_=Sf(Oa);function bf(e){this._curve=e}bf.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 Sf(e){function t(n){return new bf(e(n))}return t._curve=e,t}function G_(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(Sf(n)):t()._curve},e}function V_(){return G_(Bi().curve(H_))}class z_{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 W_(e){return new z_(e,!0)}function Y_(e){return e.source}function q_(e){return e.target}function X_(e){let t=Y_,n=q_,r=zl,i=Wl,s=null,a=null,o=Sa(l);function l(){let c;const u=$_.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:pt(+c),l):r},l.y=function(c){return arguments.length?(i=typeof c=="function"?c:pt(+c),l):i},l.context=function(c){return arguments.length?(c==null?s=a=null:a=e(s=c),l):s},l}function Z_(){return X_(W_)}function Nn(){}function wa(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 Ma(e){this._context=e}Ma.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:wa(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:wa(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function j_(e){return new Ma(e)}function _f(e){this._context=e}_f.prototype={areaStart:Nn,areaEnd:Nn,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:wa(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function K_(e){return new _f(e)}function Tf(e){this._context=e}Tf.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:wa(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Q_(e){return new Tf(e)}function Of(e,t){this._basis=new Ma(e),this._beta=t}Of.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 J_=function e(t){function n(r){return t===1?new Ma(r):new Of(r,t)}return n.beta=function(r){return e(+r)},n}(.85);function Ca(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 ql(e,t){this._context=e,this._k=(1-t)/6}ql.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:Ca(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:Ca(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 tT=function e(t){function n(r){return new ql(r,t)}return n.tension=function(r){return e(+r)},n}(0);function Xl(e,t){this._context=e,this._k=(1-t)/6}Xl.prototype={areaStart:Nn,areaEnd:Nn,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:Ca(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 eT=function e(t){function n(r){return new Xl(r,t)}return n.tension=function(r){return e(+r)},n}(0);function Zl(e,t){this._context=e,this._k=(1-t)/6}Zl.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:Ca(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 nT=function e(t){function n(r){return new Zl(r,t)}return n.tension=function(r){return e(+r)},n}(0);function jl(e,t,n){var r=e._x1,i=e._y1,s=e._x2,a=e._y2;if(e._l01_a>te){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>te){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 wf(e,t){this._context=e,this._alpha=t}wf.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:jl(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 rT=function e(t){function n(r){return t?new wf(r,t):new ql(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function Mf(e,t){this._context=e,this._alpha=t}Mf.prototype={areaStart:Nn,areaEnd:Nn,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:jl(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 iT=function e(t){function n(r){return t?new Mf(r,t):new Xl(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function Cf(e,t){this._context=e,this._alpha=t}Cf.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:jl(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 sT=function e(t){function n(r){return t?new Cf(r,t):new Zl(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function Af(e){this._context=e}Af.prototype={areaStart:Nn,areaEnd:Nn,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 Df(e){return new Af(e)}function Lf(e){return e<0?-1:1}function Rf(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(Lf(s)+Lf(a))*Math.min(Math.abs(s),Math.abs(a),.5*Math.abs(o))||0}function If(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function Kl(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 Aa(e){this._context=e}Aa.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:Kl(this,this._t0,If(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,Kl(this,If(this,n=Rf(this,e,t)),n);break;default:Kl(this,this._t0,n=Rf(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function kf(e){this._context=new Pf(e)}(kf.prototype=Object.create(Aa.prototype)).point=function(e,t){Aa.prototype.point.call(this,t,e)};function Pf(e){this._context=e}Pf.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 aT(e){return new Aa(e)}function oT(e){return new kf(e)}function Nf(e){this._context=e}Nf.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=$f(e),i=$f(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 $f(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 lT(e){return new Nf(e)}function Da(e,t){this._context=e,this._t=t}Da.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 cT(e){return new Da(e,.5)}function uT(e){return new Da(e,0)}function hT(e){return new Da(e,1)}function Ff(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 Uf(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function dT(e,t){return e[t]}function fT(e){const t=[];return t.key=e,t}function Ql(){var e=pt([]),t=Uf,n=Ff,r=dT;function i(s){var a=Array.from(e.apply(this,arguments),fT),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=Ta(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:pt(Array.from(s)),i):e},i.value=function(s){return arguments.length?(r=typeof s=="function"?s:pt(+s),i):r},i.order=function(s){return arguments.length?(t=s==null?Uf:typeof s=="function"?s:pt(Array.from(s)),i):t},i.offset=function(s){return arguments.length?(n=s??Ff,i):n},i}function pT(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 Hi(e,t,n){this.k=e,this.x=t,this.y=n}Hi.prototype={constructor:Hi,scale:function(e){return e===1?this:new Hi(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Hi(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+")"}},Hi.prototype;var Bf=typeof global=="object"&&global&&global.Object===Object&&global,gT=typeof self=="object"&&self&&self.Object===Object&&self,Ve=Bf||gT||Function("return this")(),Ae=Ve.Symbol,Hf=Object.prototype,mT=Hf.hasOwnProperty,vT=Hf.toString,Gi=Ae?Ae.toStringTag:void 0;function yT(e){var t=mT.call(e,Gi),n=e[Gi];try{e[Gi]=void 0;var r=!0}catch{}var i=vT.call(e);return r&&(t?e[Gi]=n:delete e[Gi]),i}var ET=Object.prototype,xT=ET.toString;function bT(e){return xT.call(e)}var ST="[object Null]",_T="[object Undefined]",Gf=Ae?Ae.toStringTag:void 0;function nr(e){return e==null?e===void 0?_T:ST:Gf&&Gf in Object(e)?yT(e):bT(e)}function nn(e){return e!=null&&typeof e=="object"}var TT="[object Symbol]";function La(e){return typeof e=="symbol"||nn(e)&&nr(e)==TT}function Jl(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 Xt=Array.isArray,Vf=Ae?Ae.prototype:void 0,zf=Vf?Vf.toString:void 0;function Wf(e){if(typeof e=="string")return e;if(Xt(e))return Jl(e,Wf)+"";if(La(e))return zf?zf.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var OT=/\s/;function wT(e){for(var t=e.length;t--&&OT.test(e.charAt(t)););return t}var MT=/^\s+/;function CT(e){return e&&e.slice(0,wT(e)+1).replace(MT,"")}function De(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Yf=NaN,AT=/^[-+]0x[0-9a-f]+$/i,DT=/^0b[01]+$/i,LT=/^0o[0-7]+$/i,RT=parseInt;function Nr(e){if(typeof e=="number")return e;if(La(e))return Yf;if(De(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=De(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=CT(e);var n=DT.test(e);return n||LT.test(e)?RT(e.slice(2),n?2:8):AT.test(e)?Yf:+e}function tc(e){return e}var IT="[object AsyncFunction]",kT="[object Function]",PT="[object GeneratorFunction]",NT="[object Proxy]";function ec(e){if(!De(e))return!1;var t=nr(e);return t==kT||t==PT||t==IT||t==NT}var nc=Ve["__core-js_shared__"],qf=function(){var e=/[^.]+$/.exec(nc&&nc.keys&&nc.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function $T(e){return!!qf&&qf in e}var FT=Function.prototype,UT=FT.toString;function rr(e){if(e!=null){try{return UT.call(e)}catch{}try{return e+""}catch{}}return""}var BT=/[\\^$.*+?()[\]{}|]/g,HT=/^\[object .+?Constructor\]$/,GT=Function.prototype,VT=Object.prototype,zT=GT.toString,WT=VT.hasOwnProperty,YT=RegExp("^"+zT.call(WT).replace(BT,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function qT(e){if(!De(e)||$T(e))return!1;var t=ec(e)?YT:HT;return t.test(rr(e))}function XT(e,t){return e==null?void 0:e[t]}function ir(e,t){var n=XT(e,t);return qT(n)?n:void 0}var rc=ir(Ve,"WeakMap"),Xf=Object.create,ZT=function(){function e(){}return function(t){if(!De(t))return{};if(Xf)return Xf(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function jT(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 KT(){}function Zf(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var QT=800,JT=16,tO=Date.now;function eO(e){var t=0,n=0;return function(){var r=tO(),i=JT-(r-n);if(n=r,i>0){if(++t>=QT)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function nO(e){return function(){return e}}var Ra=function(){try{var e=ir(Object,"defineProperty");return e({},"",{}),e}catch{}}(),rO=Ra?function(e,t){return Ra(e,"toString",{configurable:!0,enumerable:!1,value:nO(t),writable:!0})}:tc,jf=eO(rO);function iO(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}function sO(e,t,n,r){for(var i=e.length,s=n+-1;++s<i;)if(t(e[s],s,e))return s;return-1}function aO(e){return e!==e}function oO(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}function lO(e,t,n){return t===t?oO(e,t,n):sO(e,aO,n)}function cO(e,t){var n=e==null?0:e.length;return!!n&&lO(e,t,0)>-1}var uO=9007199254740991,hO=/^(?:0|[1-9]\d*)$/;function ic(e,t){var n=typeof e;return t=t??uO,!!t&&(n=="number"||n!="symbol"&&hO.test(e))&&e>-1&&e%1==0&&e<t}function Ia(e,t,n){t=="__proto__"&&Ra?Ra(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function Vi(e,t){return e===t||e!==e&&t!==t}var dO=Object.prototype,fO=dO.hasOwnProperty;function Kf(e,t,n){var r=e[t];(!(fO.call(e,t)&&Vi(r,n))||n===void 0&&!(t in e))&&Ia(e,t,n)}function $r(e,t,n,r){var i=!n;n||(n={});for(var s=-1,a=t.length;++s<a;){var o=t[s],l=void 0;l===void 0&&(l=e[o]),i?Ia(n,o,l):Kf(n,o,l)}return n}var Qf=Math.max;function Jf(e,t,n){return t=Qf(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,s=Qf(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),jT(e,this,o)}}function sc(e,t){return jf(Jf(e,t,tc),e+"")}var pO=9007199254740991;function ac(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=pO}function sr(e){return e!=null&&ac(e.length)&&!ec(e)}function gO(e,t,n){if(!De(n))return!1;var r=typeof t;return(r=="number"?sr(n)&&ic(t,n.length):r=="string"&&t in n)?Vi(n[t],e):!1}function mO(e){return sc(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&&gO(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 vO=Object.prototype;function ka(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||vO;return e===n}function yO(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var EO="[object Arguments]";function tp(e){return nn(e)&&nr(e)==EO}var ep=Object.prototype,xO=ep.hasOwnProperty,bO=ep.propertyIsEnumerable,Fr=tp(function(){return arguments}())?tp:function(e){return nn(e)&&xO.call(e,"callee")&&!bO.call(e,"callee")};function SO(){return!1}var np=typeof q=="object"&&q&&!q.nodeType&&q,rp=np&&typeof module=="object"&&module&&!module.nodeType&&module,_O=rp&&rp.exports===np,ip=_O?Ve.Buffer:void 0,TO=ip?ip.isBuffer:void 0,Ur=TO||SO,OO="[object Arguments]",wO="[object Array]",MO="[object Boolean]",CO="[object Date]",AO="[object Error]",DO="[object Function]",LO="[object Map]",RO="[object Number]",IO="[object Object]",kO="[object RegExp]",PO="[object Set]",NO="[object String]",$O="[object WeakMap]",FO="[object ArrayBuffer]",UO="[object DataView]",BO="[object Float32Array]",HO="[object Float64Array]",GO="[object Int8Array]",VO="[object Int16Array]",zO="[object Int32Array]",WO="[object Uint8Array]",YO="[object Uint8ClampedArray]",qO="[object Uint16Array]",XO="[object Uint32Array]",Rt={};Rt[BO]=Rt[HO]=Rt[GO]=Rt[VO]=Rt[zO]=Rt[WO]=Rt[YO]=Rt[qO]=Rt[XO]=!0,Rt[OO]=Rt[wO]=Rt[FO]=Rt[MO]=Rt[UO]=Rt[CO]=Rt[AO]=Rt[DO]=Rt[LO]=Rt[RO]=Rt[IO]=Rt[kO]=Rt[PO]=Rt[NO]=Rt[$O]=!1;function ZO(e){return nn(e)&&ac(e.length)&&!!Rt[nr(e)]}function oc(e){return function(t){return e(t)}}var sp=typeof q=="object"&&q&&!q.nodeType&&q,zi=sp&&typeof module=="object"&&module&&!module.nodeType&&module,jO=zi&&zi.exports===sp,lc=jO&&Bf.process,Br=function(){try{var e=zi&&zi.require&&zi.require("util").types;return e||lc&&lc.binding&&lc.binding("util")}catch{}}(),ap=Br&&Br.isTypedArray,Pa=ap?oc(ap):ZO,KO=Object.prototype,QO=KO.hasOwnProperty;function op(e,t){var n=Xt(e),r=!n&&Fr(e),i=!n&&!r&&Ur(e),s=!n&&!r&&!i&&Pa(e),a=n||r||i||s,o=a?yO(e.length,String):[],l=o.length;for(var c in e)(t||QO.call(e,c))&&!(a&&(c=="length"||i&&(c=="offset"||c=="parent")||s&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||ic(c,l)))&&o.push(c);return o}function lp(e,t){return function(n){return e(t(n))}}var JO=lp(Object.keys,Object),tw=Object.prototype,ew=tw.hasOwnProperty;function cp(e){if(!ka(e))return JO(e);var t=[];for(var n in Object(e))ew.call(e,n)&&n!="constructor"&&t.push(n);return t}function Wi(e){return sr(e)?op(e):cp(e)}function nw(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var rw=Object.prototype,iw=rw.hasOwnProperty;function sw(e){if(!De(e))return nw(e);var t=ka(e),n=[];for(var r in e)r=="constructor"&&(t||!iw.call(e,r))||n.push(r);return n}function Yi(e){return sr(e)?op(e,!0):sw(e)}var aw=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ow=/^\w*$/;function cc(e,t){if(Xt(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||La(e)?!0:ow.test(e)||!aw.test(e)||t!=null&&e in Object(t)}var qi=ir(Object,"create");function lw(){this.__data__=qi?qi(null):{},this.size=0}function cw(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var uw="__lodash_hash_undefined__",hw=Object.prototype,dw=hw.hasOwnProperty;function fw(e){var t=this.__data__;if(qi){var n=t[e];return n===uw?void 0:n}return dw.call(t,e)?t[e]:void 0}var pw=Object.prototype,gw=pw.hasOwnProperty;function mw(e){var t=this.__data__;return qi?t[e]!==void 0:gw.call(t,e)}var vw="__lodash_hash_undefined__";function yw(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=qi&&t===void 0?vw:t,this}function ar(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])}}ar.prototype.clear=lw,ar.prototype.delete=cw,ar.prototype.get=fw,ar.prototype.has=mw,ar.prototype.set=yw;function Ew(){this.__data__=[],this.size=0}function Na(e,t){for(var n=e.length;n--;)if(Vi(e[n][0],t))return n;return-1}var xw=Array.prototype,bw=xw.splice;function Sw(e){var t=this.__data__,n=Na(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():bw.call(t,n,1),--this.size,!0}function _w(e){var t=this.__data__,n=Na(t,e);return n<0?void 0:t[n][1]}function Tw(e){return Na(this.__data__,e)>-1}function Ow(e,t){var n=this.__data__,r=Na(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function Sn(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])}}Sn.prototype.clear=Ew,Sn.prototype.delete=Sw,Sn.prototype.get=_w,Sn.prototype.has=Tw,Sn.prototype.set=Ow;var Xi=ir(Ve,"Map");function ww(){this.size=0,this.__data__={hash:new ar,map:new(Xi||Sn),string:new ar}}function Mw(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function $a(e,t){var n=e.__data__;return Mw(t)?n[typeof t=="string"?"string":"hash"]:n.map}function Cw(e){var t=$a(this,e).delete(e);return this.size-=t?1:0,t}function Aw(e){return $a(this,e).get(e)}function Dw(e){return $a(this,e).has(e)}function Lw(e,t){var n=$a(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function _n(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])}}_n.prototype.clear=ww,_n.prototype.delete=Cw,_n.prototype.get=Aw,_n.prototype.has=Dw,_n.prototype.set=Lw;var Rw="Expected a function";function uc(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Rw);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(uc.Cache||_n),n}uc.Cache=_n;var Iw=500;function kw(e){var t=uc(e,function(r){return n.size===Iw&&n.clear(),r}),n=t.cache;return t}var Pw=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Nw=/\\(\\)?/g,$w=kw(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Pw,function(n,r,i,s){t.push(i?s.replace(Nw,"$1"):r||n)}),t});function Zi(e){return e==null?"":Wf(e)}function Fa(e,t){return Xt(e)?e:cc(e,t)?[e]:$w(Zi(e))}function ji(e){if(typeof e=="string"||La(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function hc(e,t){t=Fa(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[ji(t[n++])];return n&&n==r?e:void 0}function yt(e,t,n){var r=e==null?void 0:hc(e,t);return r===void 0?n:r}function dc(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var up=Ae?Ae.isConcatSpreadable:void 0;function Fw(e){return Xt(e)||Fr(e)||!!(up&&e&&e[up])}function Ua(e,t,n,r,i){var s=-1,a=e.length;for(n||(n=Fw),i||(i=[]);++s<a;){var o=e[s];t>0&&n(o)?t>1?Ua(o,t-1,n,r,i):dc(i,o):r||(i[i.length]=o)}return i}function fc(e){var t=e==null?0:e.length;return t?Ua(e,1):[]}function Uw(e){return jf(Jf(e,void 0,fc),e+"")}var pc=lp(Object.getPrototypeOf,Object),Bw="[object Object]",Hw=Function.prototype,Gw=Object.prototype,hp=Hw.toString,Vw=Gw.hasOwnProperty,zw=hp.call(Object);function dp(e){if(!nn(e)||nr(e)!=Bw)return!1;var t=pc(e);if(t===null)return!0;var n=Vw.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&hp.call(n)==zw}function fp(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 Ww(e,t,n){var r=e.length;return n=n===void 0?r:n,fp(e,t,n)}var Yw="\\ud800-\\udfff",qw="\\u0300-\\u036f",Xw="\\ufe20-\\ufe2f",Zw="\\u20d0-\\u20ff",jw=qw+Xw+Zw,Kw="\\ufe0e\\ufe0f",Qw="\\u200d",Jw=RegExp("["+Qw+Yw+jw+Kw+"]");function pp(e){return Jw.test(e)}function tM(e){return e.split("")}var gp="\\ud800-\\udfff",eM="\\u0300-\\u036f",nM="\\ufe20-\\ufe2f",rM="\\u20d0-\\u20ff",iM=eM+nM+rM,sM="\\ufe0e\\ufe0f",aM="["+gp+"]",gc="["+iM+"]",mc="\\ud83c[\\udffb-\\udfff]",oM="(?:"+gc+"|"+mc+")",mp="[^"+gp+"]",vp="(?:\\ud83c[\\udde6-\\uddff]){2}",yp="[\\ud800-\\udbff][\\udc00-\\udfff]",lM="\\u200d",Ep=oM+"?",xp="["+sM+"]?",cM="(?:"+lM+"(?:"+[mp,vp,yp].join("|")+")"+xp+Ep+")*",uM=xp+Ep+cM,hM="(?:"+[mp+gc+"?",gc,vp,yp,aM].join("|")+")",dM=RegExp(mc+"(?="+mc+")|"+hM+uM,"g");function fM(e){return e.match(dM)||[]}function pM(e){return pp(e)?fM(e):tM(e)}function gM(e){return function(t){t=Zi(t);var n=pp(t)?pM(t):void 0,r=n?n[0]:t.charAt(0),i=n?Ww(n,1).join(""):t.slice(1);return r[e]()+i}}var mM=gM("toUpperCase");function vM(e){return mM(Zi(e).toLowerCase())}function yM(e,t,n,r){for(var i=-1,s=e==null?0:e.length;++i<s;)n=t(n,e[i],i,e);return n}function EM(e){return function(t){return e==null?void 0:e[t]}}var xM={À:"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"},bM=EM(xM),SM=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,_M="\\u0300-\\u036f",TM="\\ufe20-\\ufe2f",OM="\\u20d0-\\u20ff",wM=_M+TM+OM,MM="["+wM+"]",CM=RegExp(MM,"g");function AM(e){return e=Zi(e),e&&e.replace(SM,bM).replace(CM,"")}var DM=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function LM(e){return e.match(DM)||[]}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 bp="\\ud800-\\udfff",kM="\\u0300-\\u036f",PM="\\ufe20-\\ufe2f",NM="\\u20d0-\\u20ff",$M=kM+PM+NM,Sp="\\u2700-\\u27bf",_p="a-z\\xdf-\\xf6\\xf8-\\xff",FM="\\xac\\xb1\\xd7\\xf7",UM="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",BM="\\u2000-\\u206f",HM=" \\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",Tp="A-Z\\xc0-\\xd6\\xd8-\\xde",GM="\\ufe0e\\ufe0f",Op=FM+UM+BM+HM,wp="['’]",Mp="["+Op+"]",VM="["+$M+"]",Cp="\\d+",zM="["+Sp+"]",Ap="["+_p+"]",Dp="[^"+bp+Op+Cp+Sp+_p+Tp+"]",WM="\\ud83c[\\udffb-\\udfff]",YM="(?:"+VM+"|"+WM+")",qM="[^"+bp+"]",Lp="(?:\\ud83c[\\udde6-\\uddff]){2}",Rp="[\\ud800-\\udbff][\\udc00-\\udfff]",Hr="["+Tp+"]",XM="\\u200d",Ip="(?:"+Ap+"|"+Dp+")",ZM="(?:"+Hr+"|"+Dp+")",kp="(?:"+wp+"(?:d|ll|m|re|s|t|ve))?",Pp="(?:"+wp+"(?:D|LL|M|RE|S|T|VE))?",Np=YM+"?",$p="["+GM+"]?",jM="(?:"+XM+"(?:"+[qM,Lp,Rp].join("|")+")"+$p+Np+")*",KM="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",QM="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",JM=$p+Np+jM,tC="(?:"+[zM,Lp,Rp].join("|")+")"+JM,eC=RegExp([Hr+"?"+Ap+"+"+kp+"(?="+[Mp,Hr,"$"].join("|")+")",ZM+"+"+Pp+"(?="+[Mp,Hr+Ip,"$"].join("|")+")",Hr+"?"+Ip+"+"+kp,Hr+"+"+Pp,QM,KM,Cp,tC].join("|"),"g");function nC(e){return e.match(eC)||[]}function rC(e,t,n){return e=Zi(e),t=t,t===void 0?IM(e)?nC(e):LM(e):e.match(t)||[]}var iC="['’]",sC=RegExp(iC,"g");function Fp(e){return function(t){return yM(rC(AM(t).replace(sC,"")),e,"")}}var aC=Fp(function(e,t,n){return t=t.toLowerCase(),e+(n?vM(t):t)});function oC(e,t,n){return e===e&&(n!==void 0&&(e=e<=n?e:n),t!==void 0&&(e=e>=t?e:t)),e}function Up(e,t,n){return n===void 0&&(n=t,t=void 0),n!==void 0&&(n=Nr(n),n=n===n?n:0),t!==void 0&&(t=Nr(t),t=t===t?t:0),oC(Nr(e),t,n)}function lC(){this.__data__=new Sn,this.size=0}function cC(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function uC(e){return this.__data__.get(e)}function hC(e){return this.__data__.has(e)}var dC=200;function fC(e,t){var n=this.__data__;if(n instanceof Sn){var r=n.__data__;if(!Xi||r.length<dC-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new _n(r)}return n.set(e,t),this.size=n.size,this}function ze(e){var t=this.__data__=new Sn(e);this.size=t.size}ze.prototype.clear=lC,ze.prototype.delete=cC,ze.prototype.get=uC,ze.prototype.has=hC,ze.prototype.set=fC;function pC(e,t){return e&&$r(t,Wi(t),e)}function gC(e,t){return e&&$r(t,Yi(t),e)}var Bp=typeof q=="object"&&q&&!q.nodeType&&q,Hp=Bp&&typeof module=="object"&&module&&!module.nodeType&&module,mC=Hp&&Hp.exports===Bp,Gp=mC?Ve.Buffer:void 0,Vp=Gp?Gp.allocUnsafe:void 0;function zp(e,t){if(t)return e.slice();var n=e.length,r=Vp?Vp(n):new e.constructor(n);return e.copy(r),r}function vC(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 Wp(){return[]}var yC=Object.prototype,EC=yC.propertyIsEnumerable,Yp=Object.getOwnPropertySymbols,vc=Yp?function(e){return e==null?[]:(e=Object(e),vC(Yp(e),function(t){return EC.call(e,t)}))}:Wp;function xC(e,t){return $r(e,vc(e),t)}var bC=Object.getOwnPropertySymbols,qp=bC?function(e){for(var t=[];e;)dc(t,vc(e)),e=pc(e);return t}:Wp;function SC(e,t){return $r(e,qp(e),t)}function Xp(e,t,n){var r=t(e);return Xt(e)?r:dc(r,n(e))}function yc(e){return Xp(e,Wi,vc)}function Zp(e){return Xp(e,Yi,qp)}var Ec=ir(Ve,"DataView"),xc=ir(Ve,"Promise"),Gr=ir(Ve,"Set"),jp="[object Map]",_C="[object Object]",Kp="[object Promise]",Qp="[object Set]",Jp="[object WeakMap]",tg="[object DataView]",TC=rr(Ec),OC=rr(Xi),wC=rr(xc),MC=rr(Gr),CC=rr(rc),Le=nr;(Ec&&Le(new Ec(new ArrayBuffer(1)))!=tg||Xi&&Le(new Xi)!=jp||xc&&Le(xc.resolve())!=Kp||Gr&&Le(new Gr)!=Qp||rc&&Le(new rc)!=Jp)&&(Le=function(e){var t=nr(e),n=t==_C?e.constructor:void 0,r=n?rr(n):"";if(r)switch(r){case TC:return tg;case OC:return jp;case wC:return Kp;case MC:return Qp;case CC:return Jp}return t});var AC=Object.prototype,DC=AC.hasOwnProperty;function LC(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&DC.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var Ba=Ve.Uint8Array;function bc(e){var t=new e.constructor(e.byteLength);return new Ba(t).set(new Ba(e)),t}function RC(e,t){var n=t?bc(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var IC=/\w*$/;function kC(e){var t=new e.constructor(e.source,IC.exec(e));return t.lastIndex=e.lastIndex,t}var eg=Ae?Ae.prototype:void 0,ng=eg?eg.valueOf:void 0;function PC(e){return ng?Object(ng.call(e)):{}}function rg(e,t){var n=t?bc(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var NC="[object Boolean]",$C="[object Date]",FC="[object Map]",UC="[object Number]",BC="[object RegExp]",HC="[object Set]",GC="[object String]",VC="[object Symbol]",zC="[object ArrayBuffer]",WC="[object DataView]",YC="[object Float32Array]",qC="[object Float64Array]",XC="[object Int8Array]",ZC="[object Int16Array]",jC="[object Int32Array]",KC="[object Uint8Array]",QC="[object Uint8ClampedArray]",JC="[object Uint16Array]",tA="[object Uint32Array]";function eA(e,t,n){var r=e.constructor;switch(t){case zC:return bc(e);case NC:case $C:return new r(+e);case WC:return RC(e,n);case YC:case qC:case XC:case ZC:case jC:case KC:case QC:case JC:case tA:return rg(e,n);case FC:return new r;case UC:case GC:return new r(e);case BC:return kC(e);case HC:return new r;case VC:return PC(e)}}function ig(e){return typeof e.constructor=="function"&&!ka(e)?ZT(pc(e)):{}}var nA="[object Map]";function rA(e){return nn(e)&&Le(e)==nA}var sg=Br&&Br.isMap,iA=sg?oc(sg):rA,sA="[object Set]";function aA(e){return nn(e)&&Le(e)==sA}var ag=Br&&Br.isSet,oA=ag?oc(ag):aA,lA=1,cA=2,uA=4,og="[object Arguments]",hA="[object Array]",dA="[object Boolean]",fA="[object Date]",pA="[object Error]",lg="[object Function]",gA="[object GeneratorFunction]",mA="[object Map]",vA="[object Number]",cg="[object Object]",yA="[object RegExp]",EA="[object Set]",xA="[object String]",bA="[object Symbol]",SA="[object WeakMap]",_A="[object ArrayBuffer]",TA="[object DataView]",OA="[object Float32Array]",wA="[object Float64Array]",MA="[object Int8Array]",CA="[object Int16Array]",AA="[object Int32Array]",DA="[object Uint8Array]",LA="[object Uint8ClampedArray]",RA="[object Uint16Array]",IA="[object Uint32Array]",Dt={};Dt[og]=Dt[hA]=Dt[_A]=Dt[TA]=Dt[dA]=Dt[fA]=Dt[OA]=Dt[wA]=Dt[MA]=Dt[CA]=Dt[AA]=Dt[mA]=Dt[vA]=Dt[cg]=Dt[yA]=Dt[EA]=Dt[xA]=Dt[bA]=Dt[DA]=Dt[LA]=Dt[RA]=Dt[IA]=!0,Dt[pA]=Dt[lg]=Dt[SA]=!1;function Ki(e,t,n,r,i,s){var a,o=t&lA,l=t&cA,c=t&uA;if(n&&(a=i?n(e,r,i,s):n(e)),a!==void 0)return a;if(!De(e))return e;var u=Xt(e);if(u){if(a=LC(e),!o)return Zf(e,a)}else{var d=Le(e),h=d==lg||d==gA;if(Ur(e))return zp(e,o);if(d==cg||d==og||h&&!i){if(a=l||h?{}:ig(e),!o)return l?SC(e,gC(a,e)):xC(e,pC(a,e))}else{if(!Dt[d])return i?e:{};a=eA(e,d,o)}}s||(s=new ze);var f=s.get(e);if(f)return f;s.set(e,a),oA(e)?e.forEach(function(m){a.add(Ki(m,t,n,m,e,s))}):iA(e)&&e.forEach(function(m,v){a.set(v,Ki(m,t,n,v,e,s))});var p=c?l?Zp:yc:l?Yi:Wi,g=u?void 0:p(e);return iO(g||e,function(m,v){g&&(v=m,m=e[v]),Kf(a,v,Ki(m,t,n,v,e,s))}),a}var kA=1,PA=4;function Tn(e){return Ki(e,kA|PA)}var NA="__lodash_hash_undefined__";function $A(e){return this.__data__.set(e,NA),this}function FA(e){return this.__data__.has(e)}function Qi(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new _n;++t<n;)this.add(e[t])}Qi.prototype.add=Qi.prototype.push=$A,Qi.prototype.has=FA;function ug(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 hg(e,t){return e.has(t)}var UA=1,BA=2;function dg(e,t,n,r,i,s){var a=n&UA,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&BA?new Qi:void 0;for(s.set(e,t),s.set(t,e);++d<o;){var p=e[d],g=t[d];if(r)var m=a?r(g,p,d,t,e,s):r(p,g,d,e,t,s);if(m!==void 0){if(m)continue;h=!1;break}if(f){if(!ug(t,function(v,S){if(!hg(f,S)&&(p===v||i(p,v,n,r,s)))return f.push(S)})){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 HA(e){var t=-1,n=Array(e.size);return e.forEach(function(r,i){n[++t]=[i,r]}),n}function Sc(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var GA=1,VA=2,zA="[object Boolean]",WA="[object Date]",YA="[object Error]",qA="[object Map]",XA="[object Number]",ZA="[object RegExp]",jA="[object Set]",KA="[object String]",QA="[object Symbol]",JA="[object ArrayBuffer]",tD="[object DataView]",fg=Ae?Ae.prototype:void 0,_c=fg?fg.valueOf:void 0;function eD(e,t,n,r,i,s,a){switch(n){case tD:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case JA:return!(e.byteLength!=t.byteLength||!s(new Ba(e),new Ba(t)));case zA:case WA:case XA:return Vi(+e,+t);case YA:return e.name==t.name&&e.message==t.message;case ZA:case KA:return e==t+"";case qA:var o=HA;case jA:var l=r&GA;if(o||(o=Sc),e.size!=t.size&&!l)return!1;var c=a.get(e);if(c)return c==t;r|=VA,a.set(e,t);var u=dg(o(e),o(t),r,i,s,a);return a.delete(e),u;case QA:if(_c)return _c.call(e)==_c.call(t)}return!1}var nD=1,rD=Object.prototype,iD=rD.hasOwnProperty;function sD(e,t,n,r,i,s){var a=n&nD,o=yc(e),l=o.length,c=yc(t),u=c.length;if(l!=u&&!a)return!1;for(var d=l;d--;){var h=o[d];if(!(a?h in t:iD.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 m=a;++d<l;){h=o[d];var v=e[h],S=t[h];if(r)var E=a?r(S,v,h,t,e,s):r(v,S,h,e,t,s);if(!(E===void 0?v===S||i(v,S,n,r,s):E)){g=!1;break}m||(m=h=="constructor")}if(g&&!m){var b=e.constructor,x=t.constructor;b!=x&&"constructor"in e&&"constructor"in t&&!(typeof b=="function"&&b instanceof b&&typeof x=="function"&&x instanceof x)&&(g=!1)}return s.delete(e),s.delete(t),g}var aD=1,pg="[object Arguments]",gg="[object Array]",Ha="[object Object]",oD=Object.prototype,mg=oD.hasOwnProperty;function lD(e,t,n,r,i,s){var a=Xt(e),o=Xt(t),l=a?gg:Le(e),c=o?gg:Le(t);l=l==pg?Ha:l,c=c==pg?Ha:c;var u=l==Ha,d=c==Ha,h=l==c;if(h&&Ur(e)){if(!Ur(t))return!1;a=!0,u=!1}if(h&&!u)return s||(s=new ze),a||Pa(e)?dg(e,t,n,r,i,s):eD(e,t,l,n,r,i,s);if(!(n&aD)){var f=u&&mg.call(e,"__wrapped__"),p=d&&mg.call(t,"__wrapped__");if(f||p){var g=f?e.value():e,m=p?t.value():t;return s||(s=new ze),i(g,m,n,r,s)}}return h?(s||(s=new ze),sD(e,t,n,r,i,s)):!1}function Ga(e,t,n,r,i){return e===t?!0:e==null||t==null||!nn(e)&&!nn(t)?e!==e&&t!==t:lD(e,t,n,r,Ga,i)}var cD=1,uD=2;function hD(e,t,n,r){var i=n.length,s=i;if(e==null)return!s;for(e=Object(e);i--;){var a=n[i];if(a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++i<s;){a=n[i];var o=a[0],l=e[o],c=a[1];if(a[2]){if(l===void 0&&!(o in e))return!1}else{var u=new ze,d;if(!(d===void 0?Ga(c,l,cD|uD,r,u):d))return!1}}return!0}function vg(e){return e===e&&!De(e)}function dD(e){for(var t=Wi(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,vg(i)]}return t}function yg(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function fD(e){var t=dD(e);return t.length==1&&t[0][2]?yg(t[0][0],t[0][1]):function(n){return n===e||hD(n,e,t)}}function pD(e,t){return e!=null&&t in Object(e)}function gD(e,t,n){t=Fa(t,e);for(var r=-1,i=t.length,s=!1;++r<i;){var a=ji(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&&ac(i)&&ic(a,i)&&(Xt(e)||Fr(e)))}function mD(e,t){return e!=null&&gD(e,t,pD)}var vD=1,yD=2;function ED(e,t){return cc(e)&&vg(t)?yg(ji(e),t):function(n){var r=yt(n,e);return r===void 0&&r===t?mD(n,e):Ga(t,r,vD|yD)}}function xD(e){return function(t){return t==null?void 0:t[e]}}function bD(e){return function(t){return hc(t,e)}}function SD(e){return cc(e)?xD(ji(e)):bD(e)}function Va(e){return typeof e=="function"?e:e==null?tc:typeof e=="object"?Xt(e)?ED(e[0],e[1]):fD(e):SD(e)}function _D(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 TD(e){return function(t,n,r){for(var i=-1,s=Object(t),a=r(t),o=a.length;o--;){var l=a[++i];if(n(s[l],l,s)===!1)break}return t}}var Eg=TD();function OD(e,t){return e&&Eg(e,t,Wi)}function wD(e,t){return function(n,r){if(n==null)return n;if(!sr(n))return e(n,r);for(var i=n.length,s=-1,a=Object(n);++s<i&&r(a[s],s,a)!==!1;);return n}}var Tc=wD(OD);function MD(e,t,n,r){return Tc(e,function(i,s,a){t(r,i,n(i),a)}),r}function CD(e,t){return function(n,r){var i=Xt(n)?_D:MD,s={};return i(n,e,Va(r),s)}}var Oc=function(){return Ve.Date.now()},AD="Expected a function",DD=Math.max,LD=Math.min;function za(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(AD);t=Nr(t)||0,De(n)&&(u=!!n.leading,d="maxWait"in n,s=d?DD(Nr(n.maxWait)||0,t):s,h="trailing"in n?!!n.trailing:h);function f(_){var C=r,D=i;return r=i=void 0,c=_,a=e.apply(D,C),a}function p(_){return c=_,o=setTimeout(v,t),u?f(_):a}function g(_){var C=_-l,D=_-c,B=t-C;return d?LD(B,s-D):B}function m(_){var C=_-l,D=_-c;return l===void 0||C>=t||C<0||d&&D>=s}function v(){var _=Oc();if(m(_))return S(_);o=setTimeout(v,g(_))}function S(_){return o=void 0,h&&r?f(_):(r=i=void 0,a)}function E(){o!==void 0&&clearTimeout(o),c=0,r=l=i=o=void 0}function b(){return o===void 0?a:S(Oc())}function x(){var _=Oc(),C=m(_);if(r=arguments,i=this,l=_,C){if(o===void 0)return p(l);if(d)return clearTimeout(o),o=setTimeout(v,t),f(l)}return o===void 0&&(o=setTimeout(v,t)),a}return x.cancel=E,x.flush=b,x}function wc(e,t,n){(n!==void 0&&!Vi(e[t],n)||n===void 0&&!(t in e))&&Ia(e,t,n)}function Mc(e){return nn(e)&&sr(e)}function Cc(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function RD(e){return $r(e,Yi(e))}function ID(e,t,n,r,i,s,a){var o=Cc(e,n),l=Cc(t,n),c=a.get(l);if(c){wc(e,n,c);return}var u=s?s(o,l,n+"",e,t,a):void 0,d=u===void 0;if(d){var h=Xt(l),f=!h&&Ur(l),p=!h&&!f&&Pa(l);u=l,h||f||p?Xt(o)?u=o:Mc(o)?u=Zf(o):f?(d=!1,u=zp(l,!0)):p?(d=!1,u=rg(l,!0)):u=[]:dp(l)||Fr(l)?(u=o,Fr(o)?u=RD(o):(!De(o)||ec(o))&&(u=ig(l))):d=!1}d&&(a.set(l,u),i(u,l,r,s,a),a.delete(l)),wc(e,n,u)}function xg(e,t,n,r,i){e!==t&&Eg(t,function(s,a){if(i||(i=new ze),De(s))ID(e,t,a,n,xg,r,i);else{var o=r?r(Cc(e,a),s,a+"",e,t,i):void 0;o===void 0&&(o=s),wc(e,a,o)}},Yi)}var kD="Expected a function";function PD(e,t,n){if(typeof e!="function")throw new TypeError(kD);return setTimeout(function(){e.apply(void 0,n)},t)}var ND=sc(function(e,t,n){return PD(e,Nr(t)||0,n)});function bg(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}function $D(e,t){var n=-1,r=sr(e)?Array(e.length):[];return Tc(e,function(i,s,a){r[++n]=t(i,s,a)}),r}function FD(e,t){var n=Xt(e)?Jl:$D;return n(e,Va(t))}var UD=1/0;function BD(e,t){return Ua(FD(e,t),UD)}function HD(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 GD=Object.prototype,VD=GD.hasOwnProperty,zD=CD(function(e,t,n){VD.call(e,n)?e[n].push(t):Ia(e,n,[t])});function WD(e,t){return t.length<2?e:hc(e,fp(t,0,-1))}var YD="[object Map]",qD="[object Set]",XD=Object.prototype,ZD=XD.hasOwnProperty;function We(e){if(e==null)return!0;if(sr(e)&&(Xt(e)||typeof e=="string"||typeof e.splice=="function"||Ur(e)||Pa(e)||Fr(e)))return!e.length;var t=Le(e);if(t==YD||t==qD)return!e.size;if(ka(e))return!cp(e).length;for(var n in e)if(ZD.call(e,n))return!1;return!0}function Sg(e,t){return Ga(e,t)}var Vr=Fp(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}),ct=mO(function(e,t,n){xg(e,t,n)});function jD(e,t){return t=Fa(t,e),e=WD(e,t),e==null||delete e[ji(bg(t))]}function KD(e){return dp(e)?void 0:e}var QD=1,JD=2,tL=4,eL=Uw(function(e,t){var n={};if(e==null)return n;var r=!1;t=Jl(t,function(s){return s=Fa(s,e),r||(r=s.length>1),s}),$r(e,Zp(e),n),r&&(n=Ki(n,QD|JD|tL,KD));for(var i=t.length;i--;)jD(n,t[i]);return n});function nL(e,t){var n;return Tc(e,function(r,i,s){return n=t(r,i,s),!n}),!!n}function rL(e,t,n){var r=Xt(e)?ug:nL;return r(e,Va(t))}var iL=1/0,sL=Gr&&1/Sc(new Gr([,-0]))[1]==iL?function(e){return new Gr(e)}:KT,aL=200;function _g(e,t,n){var r=-1,i=cO,s=e.length,a=!0,o=[],l=o;if(s>=aL){var c=t?null:sL(e);if(c)return Sc(c);a=!1,i=hg,l=new Qi}else l=t?[]:o;t:for(;++r<s;){var u=e[r],d=t?t(u):u;if(u=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 oL=sc(function(e){var t=bg(e);return Mc(t)&&(t=void 0),_g(Ua(e,1,Mc,!0),Va(t))});function Ji(e){return e&&e.length?_g(e):[]}var Ac=(e=>(e.RENDER_FINISHED="render-finished",e.RESIZE="chart-resize",e.MOUSEOVER="chart-mouseover",e.MOUSEOUT="chart-mouseout",e))(Ac||{}),Dc=(e=>(e.SHOW="show-modal",e.HIDE="hide-modal",e))(Dc||{}),Lc=(e=>(e.UPDATE="model-update",e))(Lc||{}),Tg=(e=>(e.SHOW_OVERFLOW_MENU="show-toolbar-overflow-menu",e.HIDE_OVERFLOW_MENU="hide-toolbar-overflow-menu",e.BUTTON_CLICK="toolbar-button-click",e.SHOW_TOOLTIP="toolbar-show-tooltip",e.HIDE_TOOLTIP="toolbar-hide-tooltip",e))(Tg||{}),Rc=(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))(Rc||{}),Ic=(e=>(e.CHANGE="zoom-domain-change",e))(Ic||{}),kc=(e=>(e.CANVAS_ZOOM_IN="canvas-zoom-in",e.CANVAS_ZOOM_OUT="canvas-zoom-out",e))(kc||{}),Pc=(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))(Pc||{}),Nc=(e=>(e.POINT_MOUSEOVER="scatter-mouseover",e.POINT_MOUSEMOVE="scatter-mousemove",e.POINT_CLICK="scatter-click",e.POINT_MOUSEOUT="scatter-mouseout",e))(Nc||{}),$c=(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))($c||{}),Fc=(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))(Fc||{}),Uc=(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))(Uc||{}),Bc=(e=>(e.BAR_MOUSEOVER="bar-mouseover",e.BAR_MOUSEMOVE="bar-mousemove",e.BAR_CLICK="bar-click",e.BAR_MOUSEOUT="bar-mouseout",e))(Bc||{}),Hc=(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))(Hc||{}),Gc=(e=>(e.SCATTER_MOUSEOVER="scatter-mouseover",e.SCATTER_MOUSEMOVE="scatter-mousemove",e.SCATTER_CLICK="scatter-click",e.SCATTER_MOUSEOUT="scatter-mouseout",e))(Gc||{}),Vc=(e=>(e.POINT_MOUSEOVER="scatter-mouseover",e.POINT_MOUSEMOVE="scatter-mousemove",e.POINT_CLICK="scatter-click",e.POINT_MOUSEOUT="scatter-mouseout",e))(Vc||{}),zc=(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))(zc||{}),Wc=(e=>(e.NODE_MOUSEOVER="tree-node-mouseover",e.NODE_CLICK="tree-node-click",e.NODE_MOUSEOUT="tree-node-mouseout",e))(Wc||{}),Yc=(e=>(e.LEAF_MOUSEOVER="leaf-mouseover",e.LEAF_MOUSEMOVE="leaf-mousemove",e.LEAF_CLICK="leaf-click",e.LEAF_MOUSEOUT="leaf-mouseout",e))(Yc||{}),zr=(e=>(e.SHOW="show-tooltip",e.MOVE="move-tooltip",e.HIDE="hide-tooltip",e))(zr||{}),qc=(e=>(e.SHOW="show-threshold",e.HIDE="hide-threshold",e))(qc||{}),Og=(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))(Og||{}),wg=(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))(wg||{}),Mg=(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))(Mg||{}),Cg=(e=>(e.METER_MOUSEOVER="meter-mouseover",e.METER_CLICK="meter-click",e.METER_MOUSEOUT="meter-mouseout",e.METER_MOUSEMOVE="meter-mousemove",e))(Cg||{}),Ag=(e=>(e.HEATMAP_MOUSEOVER="heatmap-mouseover",e.HEATMAP_CLICK="heatmap-click",e.HEATMAP_MOUSEOUT="heatmap-mouseout",e.HEATMAP_MOUSEMOVE="hetmap-mousemove",e))(Ag||{}),Wr=(e=>(e.CHOROPLETH_MOUSEOVER="choropleth-mouseover",e.CHOROPLETH_CLICK="choropleth-click",e.CHOROPLETH_MOUSEOUT="choropleth-mouseout",e.CHOROPLETH_MOUSEMOVE="choropleth-mousemove",e))(Wr||{});const T=Object.freeze(Object.defineProperty({__proto__:null,Alluvial:Mg,Area:Nc,Axis:Pc,Bar:Bc,Boxplot:Hc,CanvasZoom:kc,Chart:Ac,Choropleth:Wr,CirclePack:wg,Gauge:Uc,Heatmap:Ag,Legend:Og,Line:Vc,Meter:Cg,Modal:Dc,Model:Lc,Pie:Fc,Radar:zc,Scatter:Gc,Threshold:qc,Toolbar:Tg,Tooltip:zr,Tree:Wc,Treemap:Yc,WordCloud:$c,ZoomBar:Rc,ZoomDomain:Ic},Symbol.toStringTag,{value:"Module"}));var at=(e=>(e.HTML="html",e.SVG="svg",e))(at||{}),Xc=(e=>(e.WHITE="white",e.G100="g100",e.G90="g90",e.G10="g10",e))(Xc||{}),lt=(e=>(e.BACKGROUND="background",e.FILL="fill",e.STROKE="stroke",e.TOOLTIP="tooltip",e))(lt||{}),z=(e=>(e.LEFT="left",e.RIGHT="right",e.TOP="top",e.BOTTOM="bottom",e))(z||{}),Ye=(e=>(e.GRAPH_VIEW="graph_view",e.SLIDER_VIEW="slider_view",e))(Ye||{}),Re=(e=>(e.END_LINE="end_line",e.MID_LINE="mid_line",e.FRONT_LINE="front_line",e.NONE="none",e))(Re||{}),Ht=(e=>(e.VERTICAL="vertical",e.HORIZONTAL="horizontal",e))(Ht||{}),rt=(e=>(e.TIME="time",e.LINEAR="linear",e.LOG="log",e.LABELS="labels",e.LABELS_RATIO="labels-ratio",e))(rt||{}),Yr=(e=>(e.RIGHT="right",e.LEFT="left",e.TOP="top",e.BOTTOM="bottom",e))(Yr||{}),Gt=(e=>(e.LEFT="left",e.CENTER="center",e.RIGHT="right",e))(Gt||{}),qr=(e=>(e.HORIZONTAL="horizontal",e.VERTICAL="vertical",e))(qr||{}),Wa=(e=>(e.TREE="tree",e.DENDROGRAM="dendrogram",e))(Wa||{}),Ct=(e=>(e.ROW="row",e.COLUMN="column",e.ROW_REVERSE="row-reverse",e.COLUMN_REVERSE="column-reverse",e))(Ct||{}),dt=(e=>(e.FIXED="fixed",e.PREFERRED="preferred",e.STRETCH="stretch",e))(dt||{}),or=(e=>(e.CENTER="center",e))(or||{}),ts=(e=>(e.LEFT="left",e.RIGHT="right",e))(ts||{}),Vt=(e=>(e.GRID="grid",e.VERT_OR_HORIZ="vertOrHoriz",e.PIE="pie",e.DONUT="donut",e))(Vt||{}),rn=(e=>(e.START="start",e.MIDDLE="middle",e.END="end",e))(rn||{}),sn=(e=>(e.BASELINE="baseline",e.MIDDLE="middle",e.HANGING="hanging",e))(sn||{}),lr=(e=>(e.SEMI="semi",e.FULL="full",e))(lr||{}),Ya=(e=>(e.UP="up",e.DOWN="down",e))(Ya||{}),es=(e=>(e.SUCCESS="success",e.WARNING="warning",e.DANGER="danger",e))(es||{}),ns=(e=>(e.ALWAYS="always",e.AUTO="auto",e.NEVER="never",e))(ns||{}),be=(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))(be||{}),St=(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.EXIT_FULLSCREEN="Exit fullscreen",e.SHOW_AS_DATATABLE="Show as data-table",e.CUSTOM="Custom",e))(St||{}),qa=(e=>(e.LEFT="left",e.RIGHT="right",e))(qa||{}),zt=(e=>(e.CHECKBOX="checkbox",e.RADIUS="radius",e.AREA="area",e.SIZE="size",e.LINE="line",e.QUARTILE="quartile",e.ZOOM="zoom",e))(zt||{}),rs=(e=>(e.LINEAR="linear",e.QUANTIZE="quantize",e))(rs||{}),Xr=(e=>(e.ON="on",e.AUTO="auto",e.OFF="off",e))(Xr||{}),is=(e=>(e.DEFAULT="default",e.HOVERABLE="hoverable",e))(is||{}),an=(e=>(e.geoEqualEarth="geoEqualEarth",e.geoAlbers="geoAlbers",e.geoConicEqualArea="geoConicEqualArea",e.geoConicEquidistant="geoConicEquidistant",e.geoEquirectangular="geoEquirectangular",e.geoMercator="geoMercator",e.geoNaturalEarth1="geoNaturalEarth1",e))(an||{});const fe="cds",On={opacity:{unselected:.05,selected:.4}},$n={ticks:{number:7,verticalSpaceRatio:2.5,horizontalSpaceRatio:3.5},ratio:{reference:"value",compareTo:"marker"},paddingRatio:.1,hover:{rectanglePadding:4}},Zr={duration:1e3,ease:Dh,zoomLevel:3},jr={circles:{fillOpacity:.3,hover:{stroke:"#FFF"}},padding:{mainGroup:4,children:2},depth:2},Dg={pairingOptions:{"1-color":4,"2-color":5,"3-color":5,"4-color":3,"5-color":2,"14-color":1}},Ie={circle:{radius:4,opacity:{hovered:1,default:.3}},box:{opacity:{hovered:.5,default:.3}},strokeWidth:{default:1,thicker:2}},lL={defaultBins:10},Pt={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}},wn={opacity:{unselected:.3,selected:1},weight:{selected:2,unselected:1}},Zt={statusBar:{paddingRight:5},status:{indicatorSize:16,paddingLeft:15},total:{paddingLeft:36,paddingRight:24},height:{default:8,proportional:16},dividerWidth:2},Lt={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}},cr={opacity:{unselected:.1,selected:.3},xLabelPadding:10,yLabelPadding:8,yTicksNumber:4,minRange:10,xAxisRectHeight:50,dotsRadius:5},qe={nodeWidth:4,minNodePadding:24,opacity:{unfocus:.3,default:.8,selected:1}},Lg={minCellDividerDimension:16},Rg={default:{size:24}},Ig={defaultOffset:4,horizontalOffset:10},kg={default:{duration:300},pie_slice_mouseover:{duration:100},pie_slice_mouseout:{duration:100},pie_chart_titles:{duration:375},graph_element_mouseover_fill_update:{duration:100},graph_element_mouseout_fill_update:{duration:100}},Se={height:{[Ye.GRAPH_VIEW]:32,[Ye.SLIDER_VIEW]:10},spacerHeight:8,handleWidth:5,handleBarWidth:1,handleBarHeight:12},cL=[{type:zt.RADIUS,name:"Radius"},{type:zt.AREA,name:"Poor area"},{type:zt.AREA,name:"Satisfactory area"},{type:zt.AREA,name:"Great area"},{type:zt.QUARTILE,name:"Quartiles"}];function uL(e,t,n){let r=null;return function(...i){const s=this;s.mousePosition=zn(i[0],n),clearTimeout(r),r=setTimeout(function(){e.apply(s,i)},t)}}function It(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://charts.carbondesignsystem.com/");const o=a.mapsTo;if(o==null){const l=a.scaleType;l==null?a.mapsTo="value":l===rt.TIME?a.mapsTo="date":l===rt.LABELS&&(a.mapsTo="key")}}else delete n.axes[s];return jc(n,t),ct(n,t)}function Mn(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 ss(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 Zc(e,t,n="value",r=!1){const i=e/t.reduce((s,a)=>s+a[n],0)*100;return r?i:i%1!==0?parseFloat(i.toFixed(1)):i}function as(e,t,n){if(n>e.length)return e;if(t===Re.MID_LINE)return e.substr(0,n/2)+"..."+e.substr(-n/2);if(t===Re.FRONT_LINE)return"..."+e.substr(-n);if(t===Re.END_LINE)return e.substr(0,n)+"..."}function jc(e,t){const n=y(e,"legend","additionalItems"),r=y(t,"legend","additionalItems");if(n&&r){const i=r.map(o=>o.type),s=n.map(o=>o.type),a=cL.filter(o=>s.includes(o.type)&&!i.includes(o.type));e.legend.additionalItems=a,t.legend.additionalItems=oL(a,r,"name")}}const y=(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},Pg=(e,t)=>t===Ht.HORIZONTAL?{y0:e.x0,y1:e.x1,x0:e.y0,x1:e.y1}:e,ie=(e,t)=>{const{x0:n,x1:r,y0:i,y1:s}=Pg(e,t);return`M${n},${i}L${n},${s}L${r},${s}L${r},${i}L${n},${i}`};function Cn(e,t,n){return n===Ht.VERTICAL?[e,t]:[t,e]}function Kc(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}function os(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let i;if(r==="formatting"&&e.formattingValues){const a=e.defaultFormattingWidth||e.defaultWidth,o=n!=null&&n.width?String(n.width):a;i=e.formattingValues[o]||e.formattingValues[a]}else{const a=e.defaultWidth,o=n!=null&&n.width?String(n.width):e.defaultWidth;i=e.values[o]||e.values[a]}const s=e.argumentCallback?e.argumentCallback(t):t;return i[s]}}function ls(e){return(t,n={})=>{const r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],s=t.match(i);if(!s)return null;const a=s[0],o=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(o)?dL(o,d=>d.test(a)):hL(o,d=>d.test(a));let c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;const u=t.slice(a.length);return{value:c,rest:u}}}function hL(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function dL(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function fL(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const i=r[0],s=t.match(e.parsePattern);if(!s)return null;let a=e.valueCallback?e.valueCallback(s[0]):s[0];a=n.valueCallback?n.valueCallback(a):a;const o=t.slice(i.length);return{value:a,rest:o}}}const Ng=6048e5,pL=864e5,$g=6e4,Fg=36e5,Ug=Symbol.for("constructDateFrom");function ke(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&Ug in e?e[Ug](t):e instanceof Date?new e.constructor(t):new Date(t)}function ur(e,...t){const n=ke.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}let gL={};function Xa(){return gL}function $t(e,t){return ke(t||e,e)}function cs(e,t){var o,l,c,u;const n=Xa(),r=(t==null?void 0:t.weekStartsOn)??((l=(o=t==null?void 0:t.locale)==null?void 0:o.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((u=(c=n.locale)==null?void 0:c.options)==null?void 0:u.weekStartsOn)??0,i=$t(e,t==null?void 0:t.in),s=i.getDay(),a=(s<r?7:0)+s-r;return i.setDate(i.getDate()-a),i.setHours(0,0,0,0),i}const mL={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"}},vL=(e,t,n)=>{let r;const i=mL[e];return typeof i=="string"?r=i:t===1?r=i.one:r=i.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r},yL={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},EL=(e,t,n,r)=>yL[e],xL={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},bL={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},SL={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"]},_L={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"]},TL={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"}},OL={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"}},wL={ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:os({values:xL,defaultWidth:"wide"}),quarter:os({values:bL,defaultWidth:"wide",argumentCallback:e=>e-1}),month:os({values:SL,defaultWidth:"wide"}),day:os({values:_L,defaultWidth:"wide"}),dayPeriod:os({values:TL,defaultWidth:"wide",formattingValues:OL,defaultFormattingWidth:"wide"})},ML=/^(\d+)(th|st|nd|rd)?/i,CL=/\d+/i,AL={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},DL={any:[/^b/i,/^(a|c)/i]},LL={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},RL={any:[/1/i,/2/i,/3/i,/4/i]},IL={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},kL={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]},PL={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},NL={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]},$L={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},FL={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}},UL={ordinalNumber:fL({matchPattern:ML,parsePattern:CL,valueCallback:e=>parseInt(e,10)}),era:ls({matchPatterns:AL,defaultMatchWidth:"wide",parsePatterns:DL,defaultParseWidth:"any"}),quarter:ls({matchPatterns:LL,defaultMatchWidth:"wide",parsePatterns:RL,defaultParseWidth:"any",valueCallback:e=>e+1}),month:ls({matchPatterns:IL,defaultMatchWidth:"wide",parsePatterns:kL,defaultParseWidth:"any"}),day:ls({matchPatterns:PL,defaultMatchWidth:"wide",parsePatterns:NL,defaultParseWidth:"any"}),dayPeriod:ls({matchPatterns:$L,defaultMatchWidth:"any",parsePatterns:FL,defaultParseWidth:"any"})},BL={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},HL={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},GL={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},VL={date:Kc({formats:BL,defaultWidth:"full"}),time:Kc({formats:HL,defaultWidth:"full"}),dateTime:Kc({formats:GL,defaultWidth:"full"})},Bg={code:"en-US",formatDistance:vL,formatLong:VL,formatRelative:EL,localize:wL,match:UL,options:{weekStartsOn:0,firstWeekContainsDate:1}},Kr={type:Re.END_LINE,threshold:16,numCharacter:14},zL={code:typeof navigator<"u"&&(navigator==null?void 0:navigator.language)||"en-US",number:(e,t=(navigator==null?void 0:navigator.language)||"en-US")=>{var n;return(n=e==null?void 0:e.toLocaleString)==null?void 0:n.call(e,t)},date:(e,t=(navigator==null?void 0:navigator.language)||"en-US",n={},r=null)=>r||e.toLocaleDateString(t,n),time:(e,t=(navigator==null?void 0:navigator.language)||"en-US",n={},r=null)=>r||e.toLocaleTimeString(t,n),optionsObject:{"15seconds":{primary:{"MMM d, pp":{month:"short",day:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit",hourCycle:"h12"},"MMM d, h:mm:ss.SSS a":{month:"short",day:"numeric",hour:"numeric",minute:"2-digit",fractionalSecondDigits:3,hourCycle:"h12"}},secondary:{pp:{hour:"numeric",minute:"2-digit",second:"2-digit",hourCycle:"h12"},"h:mm:ss.SSS a":{hour:"numeric",minute:"2-digit",fractionalSecondDigits:3,hourCycle:"h12"}},type:"time"},minute:{primary:{"MMM d, p":{month:"short",day:"numeric",hour:"numeric",minute:"2-digit",hourCycle:"h12"}},secondary:{p:{hour:"numeric",minute:"2-digit",hourCycle:"h12"}},type:"time"},"30minutes":{primary:{"MMM d, p":{month:"short",day:"numeric",hour:"numeric",minute:"2-digit",hourCycle:"h12"}},secondary:{p:{hour:"numeric",minute:"2-digit",hourCycle:"h12"}},type:"time"},hourly:{primary:{"MMM d, hh a":{month:"short",day:"numeric",hour:"2-digit",hourCycle:"h12"}},secondary:{"hh a":{hour:"2-digit",hourCycle:"h12"}},type:"time"},daily:{primary:{"MMM d":{month:"short",day:"numeric"}},secondary:{d:{day:"numeric"}},type:"date"},weekly:{primary:{"eee, MMM d":{weekday:"short",month:"short",day:"numeric"}},secondary:{eee:{weekday:"short"}},type:"date"},monthly:{primary:{"MMM yyyy":{month:"short",year:"numeric"}},secondary:{MMM:{month:"short"}},type:"date"},quarterly:{primary:{},secondary:{},type:"date"},yearly:{primary:{yyyy:{year:"numeric"}},secondary:{yyyy:{year:"numeric"}},type:"date"}},translations:{group:"Group",total:"Total",meter:{title:""},tabularRep:{title:"Tabular representation",downloadAsCSV:"Download as CSV"},toolbar:{exportAsCSV:"Export to CSV",exportAsJPG:"Export to JPG",exportAsPNG:"Export to PNG",zoomIn:"Zoom in",zoomOut:"Zoom out",resetZoom:"Reset zoom",moreOptions:"More options",makeFullScreen:"Make fullscreen",exitFullScreen:"Exit fullscreen",showAsTable:"Show as table"}}},WL={enabled:!0,position:Yr.BOTTOM,clickable:!0,truncation:Kr,alignment:Gt.LEFT,order:null,additionalItems:[]},YL={x:{enabled:!0,numberOfTicks:15,alignWithAxisTicks:!1},y:{enabled:!0,numberOfTicks:5,alignWithAxisTicks:!1}},qL={enabled:!0},Hg={enabled:!0,showTotal:!0,truncation:Kr,groupLabel:"Group"},Gg={top:{visible:!0,includeZero:!0,truncation:Kr},bottom:{visible:!0,includeZero:!0,truncation:Kr},left:{visible:!0,includeZero:!0,truncation:Kr},right:{visible:!0,includeZero:!0,truncation:Kr}},Za={addSpaceOnEdges:1,showDayName:!1,localeObject:Bg,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"}}};let Vg=!1;try{Vg=typeof document<"u"&&(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled)}catch(e){console.warn("Fullscreen capabilities check failed: ",e.message)}const ee={width:null,height:null,resizable:!0,theme:Xc.WHITE,tooltip:Hg,legend:WL,locale:zL,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:St.SHOW_AS_DATATABLE},...Vg?[{type:St.MAKE_FULLSCREEN}]:[],{type:St.EXPORT_CSV},{type:St.EXPORT_PNG},{type:St.EXPORT_JPG}]}},zg=ct({},ee,{thematic:{projection:an.geoNaturalEarth1}}),us=ct({},ee,{axes:Gg,timeScale:Za,grid:YL,ruler:qL,zoomBar:{zoomRatio:.4,minZoomRatio:.01,top:{enabled:!1,type:Ye.GRAPH_VIEW}}}),hr=ct({},us,{bars:{maxWidth:16,spacingFactor:.25},timeScale:ct(Za,{addSpaceOnEdges:1})}),XL=ct({},hr,{}),ZL=ct({},hr,{}),jL=ct({},hr,{bars:ct({},hr.bars,{dividerSize:1.5})}),KL=ct({},hr,{}),Qc=ct({},us,{points:{radius:4,fillOpacity:.3,filled:!0,enabled:!0}}),QL=Qc,Wg=ct({},Qc,{points:{radius:3,filled:!1,enabled:!0}}),Yg=ct({},Wg,{timeScale:ct(Za,{addSpaceOnEdges:0})}),JL=Yg,tR=ct({},us,{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:zt.RADIUS,name:"Radius"}]}}),eR=ct({},us,{bullet:{performanceAreaTitles:["Poor","Satisfactory","Great"]},grid:{x:{enabled:!1},y:{enabled:!1}},legend:{additionalItems:[{type:zt.AREA,name:"Poor area"},{type:zt.AREA,name:"Satisfactory area"},{type:zt.AREA,name:"Great area"},{type:zt.QUARTILE,name:"Quartiles"}]}}),nR=ct({},hr,{bars:{dividerSize:1.5},timeScale:ct(Za,{addSpaceOnEdges:0})}),rR=ct({},ee,{tooltip:ct({},Hg,{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"}}),qg=ct({},ee,{pie:{labels:{formatter:null,enabled:!0},alignment:Gt.LEFT,sortFunction:null,valueMapsTo:"value"}}),iR=ct({},ee,{legend:{enabled:!1},gauge:{type:lr.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,alignment:Gt.LEFT}}),sR=ct({},qg,{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)},alignment:Gt.LEFT}}),Xg=ct({},ee,{legend:{enabled:!1,clickable:!1},meter:{showLabels:!0,proportional:null,statusBar:{percentageIndicator:{enabled:!0}}}}),aR=ct({},Xg,{legend:{enabled:!0}}),oR=ct({},ee,{radar:{axes:{angle:"key",value:"value"},alignment:Gt.LEFT},tooltip:{gridline:{enabled:!0}}}),lR=ct({},hr,{comboChartTypes:[]}),cR=ct({tree:{type:Wa.TREE}},ee,{}),uR=ct({},ee,{data:ct(ee.data,{groupMapsTo:"name"})}),hR=ct({},ee,jr,{data:ct(ee.data,{groupMapsTo:"name"})}),dR=ct({},ee,{alluvial:{data:ct(ee.data,{groupMapsTo:"source"}),nodeAlignment:Gt.CENTER,nodePadding:24,monochrome:!1,nodes:[]}}),fR=ct({},ee,{axes:Gg,heatmap:{divider:{state:Xr.AUTO},colorLegend:{type:"linear"}}}),pR=ct({},zg,{choropleth:{colorLegend:{type:"linear"}}}),At={alluvialChart:dR,areaChart:Yg,axisChart:us,boxplotChart:KL,bubbleChart:tR,bulletChart:eR,chart:ee,circlePackChart:hR,choroplethChart:pR,comboChart:lR,donutChart:sR,gaugeChart:iR,groupedBarChart:ZL,heatmapChart:fR,histogramChart:nR,lineChart:Wg,lollipopChart:QL,meterChart:Xg,pieChart:qg,proportionalMeterChart:aR,radarChart:oR,scatterChart:Qc,simpleBarChart:XL,stackedAreaChart:JL,stackedBarChart:jL,thematicChart:zg,treeChart:cR,treemapChart:uR,wordCloudChart:rR};function Zg(e){const t=$t(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function jg(e,t){const n=$t(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function Kg(e,t,n){const[r,i]=ur(n==null?void 0:n.in,e,t),s=jg(r),a=jg(i),o=+s-Zg(s),l=+a-Zg(a);return Math.round((o-l)/pL)}function gR(e,t){const n=$t(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function mR(e,t){const n=$t(e,t==null?void 0:t.in);return Kg(n,gR(n))+1}function ja(e,t){return cs(e,{...t,weekStartsOn:1})}function Qg(e,t){const n=$t(e,t==null?void 0:t.in),r=n.getFullYear(),i=ke(n,0);i.setFullYear(r+1,0,4),i.setHours(0,0,0,0);const s=ja(i),a=ke(n,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);const o=ja(a);return n.getTime()>=s.getTime()?r+1:n.getTime()>=o.getTime()?r:r-1}function vR(e,t){const n=Qg(e,t),r=ke(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),ja(r)}function yR(e,t){const n=$t(e,t==null?void 0:t.in),r=+ja(n)-+vR(n);return Math.round(r/Ng)+1}function Jg(e,t){var u,d,h,f;const n=$t(e,t==null?void 0:t.in),r=n.getFullYear(),i=Xa(),s=(t==null?void 0:t.firstWeekContainsDate)??((d=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??i.firstWeekContainsDate??((f=(h=i.locale)==null?void 0:h.options)==null?void 0:f.firstWeekContainsDate)??1,a=ke((t==null?void 0:t.in)||e,0);a.setFullYear(r+1,0,s),a.setHours(0,0,0,0);const o=cs(a,t),l=ke((t==null?void 0:t.in)||e,0);l.setFullYear(r,0,s),l.setHours(0,0,0,0);const c=cs(l,t);return+n>=+o?r+1:+n>=+c?r:r-1}function ER(e,t){var o,l,c,u;const n=Xa(),r=(t==null?void 0:t.firstWeekContainsDate)??((l=(o=t==null?void 0:t.locale)==null?void 0:o.options)==null?void 0:l.firstWeekContainsDate)??n.firstWeekContainsDate??((u=(c=n.locale)==null?void 0:c.options)==null?void 0:u.firstWeekContainsDate)??1,i=Jg(e,t),s=ke((t==null?void 0:t.in)||e,0);return s.setFullYear(i,0,r),s.setHours(0,0,0,0),cs(s,t)}function xR(e,t){const n=$t(e,t==null?void 0:t.in),r=+cs(n,t)-+ER(n,t);return Math.round(r/Ng)+1}function Ot(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Fn={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Ot(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):Ot(n+1,2)},d(e,t){return Ot(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return Ot(e.getHours()%12||12,t.length)},H(e,t){return Ot(e.getHours(),t.length)},m(e,t){return Ot(e.getMinutes(),t.length)},s(e,t){return Ot(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),i=Math.trunc(r*Math.pow(10,n-3));return Ot(i,t.length)}},Qr={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},tm={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return Fn.y(e,t)},Y:function(e,t,n,r){const i=Jg(e,r),s=i>0?i:1-i;if(t==="YY"){const a=s%100;return Ot(a,2)}return t==="Yo"?n.ordinalNumber(s,{unit:"year"}):Ot(s,t.length)},R:function(e,t){const n=Qg(e);return Ot(n,t.length)},u:function(e,t){const n=e.getFullYear();return Ot(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return Ot(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return Ot(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return Fn.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return Ot(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const i=xR(e,r);return t==="wo"?n.ordinalNumber(i,{unit:"week"}):Ot(i,t.length)},I:function(e,t,n){const r=yR(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):Ot(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Fn.d(e,t)},D:function(e,t,n){const r=mR(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):Ot(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const i=e.getDay(),s=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(s);case"ee":return Ot(s,2);case"eo":return n.ordinalNumber(s,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const i=e.getDay(),s=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(s);case"cc":return Ot(s,t.length);case"co":return n.ordinalNumber(s,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),i=r===0?7:r;switch(t){case"i":return String(i);case"ii":return Ot(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const i=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let i;switch(r===12?i=Qr.noon:r===0?i=Qr.midnight:i=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let i;switch(r>=17?i=Qr.evening:r>=12?i=Qr.afternoon:r>=4?i=Qr.morning:i=Qr.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Fn.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Fn.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):Ot(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):Ot(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Fn.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Fn.s(e,t)},S:function(e,t){return Fn.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return nm(r);case"XXXX":case"XX":return dr(r);case"XXXXX":case"XXX":default:return dr(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return nm(r);case"xxxx":case"xx":return dr(r);case"xxxxx":case"xxx":default:return dr(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+em(r,":");case"OOOO":default:return"GMT"+dr(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+em(r,":");case"zzzz":default:return"GMT"+dr(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return Ot(r,t.length)},T:function(e,t,n){return Ot(+e,t.length)}};function em(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Math.trunc(r/60),s=r%60;return s===0?n+String(i):n+String(i)+t+Ot(s,2)}function nm(e,t){return e%60===0?(e>0?"-":"+")+Ot(Math.abs(e)/60,2):dr(e,t)}function dr(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Ot(Math.trunc(r/60),2),s=Ot(r%60,2);return n+i+t+s}const rm=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},im=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},bR={p:im,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return rm(e,t);let s;switch(r){case"P":s=t.dateTime({width:"short"});break;case"PP":s=t.dateTime({width:"medium"});break;case"PPP":s=t.dateTime({width:"long"});break;case"PPPP":default:s=t.dateTime({width:"full"});break}return s.replace("{{date}}",rm(r,t)).replace("{{time}}",im(i,t))}},SR=/^D+$/,_R=/^Y+$/,TR=["D","DD","YY","YYYY"];function OR(e){return SR.test(e)}function wR(e){return _R.test(e)}function MR(e,t,n){const r=CR(e,t,n);if(console.warn(r),TR.includes(e))throw new RangeError(r)}function CR(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}function AR(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function DR(e){return!(!AR(e)&&typeof e!="number"||isNaN(+$t(e)))}const LR=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,RR=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,IR=/^'([^]*?)'?$/,kR=/''/g,PR=/[a-zA-Z]/;function Jc(e,t,n){var u,d,h,f,p,g,m,v;const r=Xa(),i=(n==null?void 0:n.locale)??r.locale??Bg,s=(n==null?void 0:n.firstWeekContainsDate)??((d=(u=n==null?void 0:n.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??r.firstWeekContainsDate??((f=(h=r.locale)==null?void 0:h.options)==null?void 0:f.firstWeekContainsDate)??1,a=(n==null?void 0:n.weekStartsOn)??((g=(p=n==null?void 0:n.locale)==null?void 0:p.options)==null?void 0:g.weekStartsOn)??r.weekStartsOn??((v=(m=r.locale)==null?void 0:m.options)==null?void 0:v.weekStartsOn)??0,o=$t(e,n==null?void 0:n.in);if(!DR(o))throw new RangeError("Invalid time value");let l=t.match(RR).map(S=>{const E=S[0];if(E==="p"||E==="P"){const b=bR[E];return b(S,i.formatLong)}return S}).join("").match(LR).map(S=>{if(S==="''")return{isToken:!1,value:"'"};const E=S[0];if(E==="'")return{isToken:!1,value:NR(S)};if(tm[E])return{isToken:!0,value:S};if(E.match(PR))throw new RangeError("Format string contains an unescaped latin alphabet character `"+E+"`");return{isToken:!1,value:S}});i.localize.preprocessor&&(l=i.localize.preprocessor(o,l));const c={firstWeekContainsDate:s,weekStartsOn:a,locale:i};return l.map(S=>{if(!S.isToken)return S.value;const E=S.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&wR(E)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&OR(E))&&MR(E,t,String(e));const b=tm[E[0]];return b(o,E,i.localize,c)}).join("")}function NR(e){const t=e.match(IR);return t?t[1].replace(kR,"'"):e}var sm=(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))(sm||{});const tu=[["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 am(e,t,n,r,i){const s=t===0,a=Number(Jc(new Date(e),"c"))===2,o=Number(Jc(new Date(e),"q"))===1,l=t!==0?n[t-1]:null;switch(r){case"15seconds":return s||Qa(e)||hs(e,l)||Un(e);case"minute":return s||Qa(e)||hs(e,l)||Un(e);case"30minutes":return s||Qa(e)||hs(e,l)||Un(e);case"hourly":return s||Qa(e)||hs(e,l)||Un(e);case"daily":return i?s||a||Un(e):s||hs(e,l)||Un(e);case"weekly":return s||a||Un(e);case"monthly":return s||Un(e);case"quarterly":return s||o;case"yearly":return!1;default:throw new Error(`${r} is not a valid time interval.`)}}function eu(e,t,n,r,i,s){const a=i.showDayName,o=r==="daily"&&a?"weekly":r,l=new Date(e),c=y(i,"timeIntervalFormats")[o],u=y(c,"primary"),d=y(c,"secondary"),h=am(e,t,n,r,a);let f=h?u:d;r==="15seconds"&&l.getMilliseconds()!==0&&(f=f.replace("pp","h:mm:ss.SSS a"));const p=i.localeObject,{code:g,optionsObject:m}=s,v=m[r].type,S=m[r][h?"primary":"secondary"][f];if(r==="quarterly"||!S){const b=Jc(l,f,{locale:p}).split("").map(x=>{var C;const _=Number(x);return x!==" "&&!Number.isNaN(_)?(C=_==null?void 0:_.toLocaleString)==null?void 0:C.call(_,g):x});return s[v](l,g,{},b.join(""))}else return s[v](l,g,S)}function Ka(e){const t=new Date(e);return{M:t.getMonth()+1,d:t.getDate(),H:t.getHours(),m:t.getMinutes(),s:t.getSeconds()}}function $R(e){if(e)return e.slice(1).map((t,n)=>t-e[n])}function FR(e){const t=tu.reduce((n,[,r],i)=>{const s=tu[n][1],a=Math.abs(s-e),o=Math.abs(r-e);return a<o?n:i},0);return tu[t][0]}function nu(e,t){if(sm[t])return t;if(e.length===1)return"15seconds";const n=$R(e),r=kn(n);return FR(r)}function Qa(e){const{s:t,m:n,H:r}=Ka(e);return r===0&&n===0&&t===0}function hs(e,t){const n=Ka(e).M,r=Ka(t).M;return n!==r}function Un(e){const{M:t,d:n,s:r,m:i,H:s}=Ka(e);return t===1&&n===1&&s===0&&i===0&&r===0}function om(e){return e===void 0?"":e.toISOString()}function UR(e){const t=e.trim();return["=","+","-","@"," ","\r"].includes(t.charAt(0))?` ${t}`:/[,\"\n]/.test(t)?`"${t}"`:t}class on{constructor(t){this.state={options:{}},this.colorScale={},this.colorClassNames={},this.services=t}formatTable({headers:t,cells:n}){const r=this.getOptions(),{code:i,date:s,number:a}=y(r,"locale"),o=y(r,"tabularRepModal","tableHeadingFormatter"),l=y(r,"tabularRepModal","tableCellFormatter"),{cartesianScales:c}=this.services,u=c==null?void 0:c.getDomainAxisScaleType();let d;return u===rt.TIME&&(d=f=>s(f,i,{month:"short",day:"numeric",year:"numeric"})),[typeof o=="function"?o(t):t,...typeof l=="function"?l(n):n.map(f=>{d&&(f[1]=d(f[1]));for(const p in f){const g=f[p];typeof g=="number"&&(f[p]=a(g,i))}return f})]}getAllDataFromDomain(t){if(!this.getData())return null;const n=this.getOptions();let r=this.getData();const i=this.getDataGroups(),{groupMapsTo:s}=y(n,"data"),a=y(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===rt.LINEAR||c===rt.LOG)&&(r=r.map(u=>({...u,[l]:u[l]===null?u[l]:Number(u[l])}))),l&&a[o].domain)if(c===rt.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}=Pt.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 y(this.getOptions(),"data","loading")?[]:t?this.get("dataGroups").filter(r=>t.includes(r.name)):this.get("dataGroups")}getActiveDataGroups(t){const{ACTIVE:n}=Pt.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 zD(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=lL.defaultBins}=s,l=Array.isArray(o),c=l0().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(m=>{h.push({group:m,key:p,value:g[m]||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 Ql().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=Ji(i.map(l=>{const c=this.services.cartesianScales.getDomainIdentifier(l);return l[c]instanceof Date?om(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===rt.TIME?s.sort((l,c)=>{const u=new Date(l),d=new Date(c);return u-d}):(o===rt.LOG||o===rt.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?om(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=HD(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?Ql().offset(pT):Ql()).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();jc(n,t),this.set({options:ct(n,t)})}update(t=!0){this.getDisplayData()&&(this.updateAllDataGroups(),this.setCustomColorScale(),this.setColorClassNames(),this.services.events.dispatchEvent(T.Model.UPDATE,{animate:t}))}toggleDataLabel(t){const{ACTIVE:n,DISABLED:r}=Pt.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(T.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=y(this.colorScale,t);return i.getFillColor?i.getFillColor(t,n,r,s):s}getStrokeColor(t,n,r){const i=this.getOptions(),s=y(this.colorScale,t);return i.getStrokeColor?i.getStrokeColor(t,n,r,s):s}isUserProvidedColorScaleValid(){const t=y(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://charts.carbondesignsystem.com/");const n=[],{datasets:r,labels:i}=t;return r.forEach(s=>{s.data.forEach((a,o)=>{let l;const c=y(s,"label");if(c===null){const d=y(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 n=this.getTabularDataArray().map(a=>a.map(o=>`"${(o==="–"?"–":o).split(/[,;'"`]/).map(u=>UR(u)).join("")}"`)).map(a=>a.join(",")).join(`
|
|
2
2
|
`),r=this.getOptions();let i="myChart";const s=y(r,"fileDownload","fileName");typeof s=="function"?i=s("csv"):typeof s=="string"&&(i=s),this.services.files.downloadCSV(n,`${i}.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}=Pt.items.status,s=this.getOptions(),a=Ji(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=y(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=y(this.getOptions(),"color","pairing");let n=y(t,"numberOfVariants");(!n||n<this.allDataGroups.length)&&(n=this.allDataGroups.length);let r=y(t,"option");const i=Dg.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=ga().range(o).domain(this.allDataGroups)}}function BR(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 HR=(()=>{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 Ja(e,t){const r=(e.ownerDocument.defaultView||window).getComputedStyle(e).getPropertyValue(t);return r?parseFloat(r.replace("px","")):0}function GR(e){const t=Ja(e,"border-left-width"),n=Ja(e,"border-right-width");return e.clientWidth+t+n}function VR(e){const t=Ja(e,"border-top-width"),n=Ja(e,"border-bottom-width");return e.clientHeight+t+n}function lm(e,t={}){const n=t.width||GR(e),r=t.height||VR(e);return{width:n,height:r}}function zR(){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 _e=16384;function WR(e){(e.width>_e||e.height>_e)&&(e.width>_e&&e.height>_e?e.width>e.height?(e.height*=_e/e.width,e.width=_e):(e.width*=_e/e.height,e.height=_e):e.width>_e?(e.height*=_e/e.width,e.width=_e):(e.width*=_e/e.height,e.height=_e))}function to(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 YR(e){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then(t=>`data:image/svg+xml;charset=utf-8,${t}`)}async function qR(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),YR(i)}const pe=(e,t)=>{if(e instanceof t)return!0;const n=Object.getPrototypeOf(e);return n===null?!1:n.constructor.name===t.name||pe(n,t)};function XR(e){const t=e.getPropertyValue("content");return`${e.cssText} content: '${t.replace(/'|"/g,"")}';`}function ZR(e){return An(e).map(t=>{const n=e.getPropertyValue(t),r=e.getPropertyPriority(t);return`${t}: ${n}${r?" !important":""};`}).join(" ")}function jR(e,t,n){const r=`.${e}:${t}`,i=n.cssText?XR(n):ZR(n);return document.createTextNode(`${r}{${i}}`)}function cm(e,t,n){const r=window.getComputedStyle(e,n),i=r.getPropertyValue("content");if(i===""||i==="none")return;const s=HR();try{t.className=`${t.className} ${s}`}catch{return}const a=document.createElement("style");a.appendChild(jR(s,n,r)),t.appendChild(a)}function KR(e,t){cm(e,t,":before"),cm(e,t,":after")}const um="application/font-woff",hm="image/jpeg",QR={woff:um,woff2:um,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:hm,jpeg:hm,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function JR(e){const t=/\.([^./]*?)$/g.exec(e);return t?t[1]:""}function ru(e){const t=JR(e).toLowerCase();return QR[t]||""}function tI(e){return e.split(/,/)[1]}function iu(e){return e.search(/^(data:)/)!==-1}function eI(e,t){return`data:${t};base64,${e}`}async function dm(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 su={};function nI(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 au(e,t,n){const r=nI(e,t,n.includeQueryParams);if(su[r]!=null)return su[r];n.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+new Date().getTime());let i;try{const s=await dm(e,n.fetchRequestInit,({res:a,result:o})=>(t||(t=a.headers.get("Content-Type")||""),tI(o)));i=eI(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 su[r]=i,i}async function rI(e){const t=e.toDataURL();return t==="data:,"?e.cloneNode(!1):to(t)}async function iI(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 to(o)}const n=e.poster,r=ru(n),i=await au(n,r,t);return to(i)}async function sI(e){var t;try{if(!((t=e==null?void 0:e.contentDocument)===null||t===void 0)&&t.body)return await eo(e.contentDocument.body,{},!0)}catch{}return e.cloneNode(!1)}async function aI(e,t){return pe(e,HTMLCanvasElement)?rI(e):pe(e,HTMLVideoElement)?iI(e,t):pe(e,HTMLIFrameElement)?sI(e):e.cloneNode(!1)}const oI=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SLOT";async function lI(e,t,n){var r,i;let s=[];return oI(e)&&e.assignedNodes?s=An(e.assignedNodes()):pe(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||pe(e,HTMLVideoElement)||await s.reduce((a,o)=>a.then(()=>eo(o,n)).then(l=>{l&&t.appendChild(l)}),Promise.resolve()),t}function cI(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`),pe(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 uI(e,t){pe(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),pe(e,HTMLInputElement)&&t.setAttribute("value",e.value)}function hI(e,t){if(pe(e,HTMLSelectElement)){const n=t,r=Array.from(n.children).find(i=>e.value===i.getAttribute("value"));r&&r.setAttribute("selected","")}}function dI(e,t){return pe(t,Element)&&(cI(e,t),KR(e,t),uI(e,t),hI(e,t)),t}async function fI(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 eo(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 eo(e,t,n){return!n&&t.filter&&!t.filter(e)?null:Promise.resolve(e).then(r=>aI(r,t)).then(r=>lI(e,r,t)).then(r=>dI(e,r)).then(r=>fI(r,t))}const fm=/url\((['"]?)([^'"]+?)\1\)/g,pI=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,gI=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function mI(e){const t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}function vI(e){const t=[];return e.replace(fm,(n,r,i)=>(t.push(i),n)),t.filter(n=>!iu(n))}async function yI(e,t,n,r,i){try{const s=n?BR(t,n):t,a=ru(t);let o;return i||(o=await au(s,a,r)),e.replace(mI(t),`$1${o}$3`)}catch{}return e}function EI(e,{preferredFontFormat:t}){return t?e.replace(gI,n=>{for(;;){const[r,,i]=pI.exec(n)||[];if(!i)return"";if(i===t)return`src: ${r};`}}):e}function pm(e){return e.search(fm)!==-1}async function gm(e,t,n){if(!pm(e))return e;const r=EI(e,n);return vI(r).reduce((s,a)=>s.then(o=>yI(o,a,t,n)),Promise.resolve(r))}async function no(e,t,n){var r;const i=(r=t.style)===null||r===void 0?void 0:r.getPropertyValue(e);if(i){const s=await gm(i,null,n);return t.style.setProperty(e,s,t.style.getPropertyPriority(e)),!0}return!1}async function xI(e,t){await no("background",e,t)||await no("background-image",e,t),await no("mask",e,t)||await no("mask-image",e,t)}async function bI(e,t){const n=pe(e,HTMLImageElement);if(!(n&&!iu(e.src))&&!(pe(e,SVGImageElement)&&!iu(e.href.baseVal)))return;const r=n?e.src:e.href.baseVal,i=await au(r,ru(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 SI(e,t){const r=An(e.childNodes).map(i=>mm(i,t));await Promise.all(r).then(()=>e)}async function mm(e,t){pe(e,Element)&&(await xI(e,t),await bI(e,t),await SI(e,t))}function _I(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 vm={};async function ym(e){let t=vm[e];if(t!=null)return t;const r=await(await fetch(e)).text();return t={url:e,cssText:r},vm[e]=t,t}async function Em(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),dm(o,t.fetchRequestInit,({result:l})=>(n=n.replace(a,`url(${l})`),[a,l]))});return Promise.all(s).then(()=>n)}function xm(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 TI(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=ym(l).then(u=>Em(u,t)).then(u=>xm(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(ym(i.href).then(o=>Em(o,t)).then(o=>xm(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 OI(e){return e.filter(t=>t.type===CSSRule.FONT_FACE_RULE).filter(t=>pm(t.style.getPropertyValue("src")))}async function wI(e,t){if(e.ownerDocument==null)throw new Error("Provided element is not within a Document");const n=An(e.ownerDocument.styleSheets),r=await TI(n,t);return OI(r)}async function MI(e,t){const n=await wI(e,t);return(await Promise.all(n.map(i=>{const s=i.parentStyleSheet?i.parentStyleSheet.href:null;return gm(i.cssText,s,t)}))).join(`
|
|
3
3
|
`)}async function CI(e,t){const n=t.fontEmbedCSS!=null?t.fontEmbedCSS:t.skipFonts?null:await MI(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 AI(e,t={}){const{width:n,height:r}=lm(e,t),i=await eo(e,t,!0);return await CI(i,t),await mm(i,t),_I(i,t),await qR(i,n,r)}async function bm(e,t={}){const{width:n,height:r}=lm(e,t),i=await AI(e,t),s=await to(i),a=document.createElement("canvas"),o=a.getContext("2d"),l=t.pixelRatio||zR(),c=t.canvasWidth||n,u=t.canvasHeight||r;return a.width=c*l,a.height=u*l,t.skipAutoScale||WR(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 DI(e,t={}){return(await bm(e,t)).toDataURL()}async function LI(e,t={}){return(await bm(e,t)).toDataURL("image/jpeg",t.quality||1)}class Dn{constructor(t,n){this.model=t,this.services=n,this.init()}init(){}update(){}setModel(t){this.model=t}setServices(t){this.services=t}}const RI="DONT_STYLE_ME_css_styles_verifier";class k extends Dn{constructor(t,n){super(t,n)}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=I(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:y(t.node(),"width","baseVal","value"),height:y(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.initializeID(),this.styleHolderElement(),this.addMainContainer(),this.model.getOptions().resizable&&this.addResizeListener(),this.addHolderListeners(),this.handleFullscreenChange()}getChartID(){return this.chartID}getElementOffset(t,n=!1){const r={left:0,top:0},i=t.getBoundingClientRect(),s=n?{left:0,top:0}:this.getHolder().getBoundingClientRect();try{r.left=i.left-s.left,r.top=i.top-s.top}catch(a){console.error(a)}return r}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=y(t,"style","prefix"),r=I(this.getHolder()).append("div").classed(`${fe}--${n}--chart-wrapper`,!0).attr("id",`chart-${this.getChartID()}`).style("height","100%").style("width","100%");r.append("g").attr("class",RI),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),I(this.getHolder()).classed(`${fe}--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=I(r);i.classed("filled",!0),LI(this.getMainContainer(),{quality:1,filter:s=>!(s.classList&&s.classList.contains("cds--cc--toolbar"))}).then(function(s){var l;let a="myChart";const o=y(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=I(r);i.classed("filled",!0),DI(this.getMainContainer(),{quality:1,filter:s=>!(s.classList&&s.classList.contains("cds--cc--toolbar"))}).then(function(s){var l;let a="myChart";const o=y(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)})}isFullScreenMode(){return I(this.getHolder()).classed("fullscreen")}toggleFullscreen(){const t=this.getHolder();I(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=I(this.getHolder()),n=t.classed("fullscreen");t.classed("fullscreen",!n)})}setSVGMaxHeight(){if(!this.model.getOptions().height){const{height:t}=k.getSVGElementSize(I(this.mainContainer),{useBBox:!0}),n=I(this.mainContainer).attr("class"),r=I(this.mainContainer).selectAll(`.${n} > svg`);let i=0;r.nodes().forEach(function(s){i+=Number(k.getSVGElementSize(I(s),{useBBox:!0}).height)}),i<=t?I(this.mainContainer).attr("height",i):I(this.mainContainer).attr("height","100%")}}getMainContainer(){return this.mainContainer}addHolderListeners(){const t=this.getHolder();t&&I(t).on("mouseover",()=>{var n;(n=this.services.events)==null||n.dispatchEvent(T.Chart.MOUSEOVER)}).on("mouseout",()=>{var n;(n=this.services.events)==null||n.dispatchEvent(T.Chart.MOUSEOUT)})}addResizeListener(){const t=this.getHolder();if(!t)return;let n=t.clientWidth,r=t.clientHeight;const i=za(()=>{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(T.Chart.RESIZE))},12.5);new ResizeObserver(i).observe(t)}}class mt{constructor(t,n,r){if(this.type="",this.renderType=at.HTML,this.id="",this.parent=void 0,this.configs={},this.model=t,this.services=n,r&&(this.configs=r,this.configs.id)){const i=y(this.model.getOptions(),"style","prefix");this.id=`${i}--${this.configs.id}`}this.parent||this.setParent(I(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=y(this.model.getOptions(),"style","prefix");(r=this.parent)==null||r.classed(`${fe}--${i}--${this.type}`,!0),n&&n.classed(`${fe}--${i}--${this.type}`,!1)}}getParent(){return this.parent}getComponentContainer(t={ariaLabel:null,isPresentational:!1,withinChartClip:!1}){if(this.type){const n=y(this.model.getOptions(),"style","prefix"),r=this.id?`#${this.id}`:"",i=k.appendOrSelect(this.parent,`${this.renderType===at.SVG?"svg":"div"}${r}.${fe}--${n}--${this.type}`);if(t.ariaLabel&&i.attr("aria-label",t.ariaLabel),t.isPresentational&&i.attr("role","presentation"),t.withinChartClip){const s=this.model.get("chartClipId");if(s){const o=I(`#${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?ct({},this.model.getOptions(),this.configs.options):this.model.getOptions()}}/*! @license DOMPurify 3.2.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.5/LICENSE */const{entries:Sm,setPrototypeOf:_m,isFrozen:II,getPrototypeOf:kI,getOwnPropertyDescriptor:PI}=Object;let{freeze:se,seal:Pe,create:Tm}=Object,{apply:ou,construct:lu}=typeof Reflect<"u"&&Reflect;se||(se=function(t){return t}),Pe||(Pe=function(t){return t}),ou||(ou=function(t,n,r){return t.apply(n,r)}),lu||(lu=function(t,n){return new t(...n)});const ro=oe(Array.prototype.forEach),NI=oe(Array.prototype.lastIndexOf),Om=oe(Array.prototype.pop),ds=oe(Array.prototype.push),$I=oe(Array.prototype.splice),io=oe(String.prototype.toLowerCase),cu=oe(String.prototype.toString),wm=oe(String.prototype.match),fs=oe(String.prototype.replace),FI=oe(String.prototype.indexOf),UI=oe(String.prototype.trim),Xe=oe(Object.prototype.hasOwnProperty),ae=oe(RegExp.prototype.test),ps=BI(TypeError);function oe(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return ou(e,t,r)}}function BI(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return lu(e,n)}}function vt(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:io;_m&&_m(e,null);let r=t.length;for(;r--;){let i=t[r];if(typeof i=="string"){const s=n(i);s!==i&&(II(t)||(t[r]=s),i=s)}e[i]=!0}return e}function HI(e){for(let t=0;t<e.length;t++)Xe(e,t)||(e[t]=null);return e}function fr(e){const t=Tm(null);for(const[n,r]of Sm(e))Xe(e,n)&&(Array.isArray(r)?t[n]=HI(r):r&&typeof r=="object"&&r.constructor===Object?t[n]=fr(r):t[n]=r);return t}function gs(e,t){for(;e!==null;){const r=PI(e,t);if(r){if(r.get)return oe(r.get);if(typeof r.value=="function")return oe(r.value)}e=kI(e)}function n(){return null}return n}const Mm=se(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),uu=se(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),hu=se(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),GI=se(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),du=se(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),VI=se(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Cm=se(["#text"]),Am=se(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),fu=se(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Dm=se(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),so=se(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),zI=Pe(/\{\{[\w\W]*|[\w\W]*\}\}/gm),WI=Pe(/<%[\w\W]*|[\w\W]*%>/gm),YI=Pe(/\$\{[\w\W]*/gm),qI=Pe(/^data-[\-\w.\u00B7-\uFFFF]+$/),XI=Pe(/^aria-[\-\w]+$/),Lm=Pe(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ZI=Pe(/^(?:\w+script|data):/i),jI=Pe(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Rm=Pe(/^html$/i),KI=Pe(/^[a-z][.\w]*(-[.\w]+)+$/i);var Im=Object.freeze({__proto__:null,ARIA_ATTR:XI,ATTR_WHITESPACE:jI,CUSTOM_ELEMENT:KI,DATA_ATTR:qI,DOCTYPE_NAME:Rm,ERB_EXPR:WI,IS_ALLOWED_URI:Lm,IS_SCRIPT_OR_DATA:ZI,MUSTACHE_EXPR:zI,TMPLIT_EXPR:YI});const ms={element:1,text:3,progressingInstruction:7,comment:8,document:9},QI=function(){return typeof window>"u"?null:window},JI=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let r=null;const i="data-tt-policy-suffix";n&&n.hasAttribute(i)&&(r=n.getAttribute(i));const s="dompurify"+(r?"#"+r:"");try{return t.createPolicy(s,{createHTML(a){return a},createScriptURL(a){return a}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}},km=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Pm(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:QI();const t=ot=>Pm(ot);if(t.version="3.2.5",t.removed=[],!e||!e.document||e.document.nodeType!==ms.document||!e.Element)return t.isSupported=!1,t;let{document:n}=e;const r=n,i=r.currentScript,{DocumentFragment:s,HTMLTemplateElement:a,Node:o,Element:l,NodeFilter:c,NamedNodeMap:u=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:d,DOMParser:h,trustedTypes:f}=e,p=l.prototype,g=gs(p,"cloneNode"),m=gs(p,"remove"),v=gs(p,"nextSibling"),S=gs(p,"childNodes"),E=gs(p,"parentNode");if(typeof a=="function"){const ot=n.createElement("template");ot.content&&ot.content.ownerDocument&&(n=ot.content.ownerDocument)}let b,x="";const{implementation:_,createNodeIterator:C,createDocumentFragment:D,getElementsByTagName:B}=n,{importNode:P}=r;let w=km();t.isSupported=typeof Sm=="function"&&typeof E=="function"&&_&&_.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:H,ERB_EXPR:N,TMPLIT_EXPR:M,DATA_ATTR:O,ARIA_ATTR:$,IS_SCRIPT_OR_DATA:F,ATTR_WHITESPACE:L,CUSTOM_ELEMENT:U}=Im;let{IS_ALLOWED_URI:tt}=Im,X=null;const Y=vt({},[...Mm,...uu,...hu,...du,...Cm]);let Q=null;const ut=vt({},[...Am,...fu,...Dm,...so]);let et=Object.seal(Tm(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),K=null,nt=null,ht=!0,W=!0,j=!1,J=!0,A=!1,G=!0,V=!1,xt=!1,Ut=!1,st=!1,_t=!1,Ne=!1,Oe=!0,bs=!1;const Ss="user-content-";let mr=!0,je=!1,ii={},si=null;const Av=vt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Dv=null;const Lv=vt({},["audio","video","img","source","image","track"]);let Du=null;const Rv=vt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),mo="http://www.w3.org/1998/Math/MathML",vo="http://www.w3.org/2000/svg",Rn="http://www.w3.org/1999/xhtml";let ai=Rn,Lu=!1,Ru=null;const W$=vt({},[mo,vo,Rn],cu);let yo=vt({},["mi","mo","mn","ms","mtext"]),Eo=vt({},["annotation-xml"]);const Y$=vt({},["title","style","font","a","script"]);let _s=null;const q$=["application/xhtml+xml","text/html"],X$="text/html";let qt=null,oi=null;const Z$=n.createElement("form"),Iv=function(R){return R instanceof RegExp||R instanceof Function},Iu=function(){let R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(oi&&oi===R)){if((!R||typeof R!="object")&&(R={}),R=fr(R),_s=q$.indexOf(R.PARSER_MEDIA_TYPE)===-1?X$:R.PARSER_MEDIA_TYPE,qt=_s==="application/xhtml+xml"?cu:io,X=Xe(R,"ALLOWED_TAGS")?vt({},R.ALLOWED_TAGS,qt):Y,Q=Xe(R,"ALLOWED_ATTR")?vt({},R.ALLOWED_ATTR,qt):ut,Ru=Xe(R,"ALLOWED_NAMESPACES")?vt({},R.ALLOWED_NAMESPACES,cu):W$,Du=Xe(R,"ADD_URI_SAFE_ATTR")?vt(fr(Rv),R.ADD_URI_SAFE_ATTR,qt):Rv,Dv=Xe(R,"ADD_DATA_URI_TAGS")?vt(fr(Lv),R.ADD_DATA_URI_TAGS,qt):Lv,si=Xe(R,"FORBID_CONTENTS")?vt({},R.FORBID_CONTENTS,qt):Av,K=Xe(R,"FORBID_TAGS")?vt({},R.FORBID_TAGS,qt):{},nt=Xe(R,"FORBID_ATTR")?vt({},R.FORBID_ATTR,qt):{},ii=Xe(R,"USE_PROFILES")?R.USE_PROFILES:!1,ht=R.ALLOW_ARIA_ATTR!==!1,W=R.ALLOW_DATA_ATTR!==!1,j=R.ALLOW_UNKNOWN_PROTOCOLS||!1,J=R.ALLOW_SELF_CLOSE_IN_ATTR!==!1,A=R.SAFE_FOR_TEMPLATES||!1,G=R.SAFE_FOR_XML!==!1,V=R.WHOLE_DOCUMENT||!1,st=R.RETURN_DOM||!1,_t=R.RETURN_DOM_FRAGMENT||!1,Ne=R.RETURN_TRUSTED_TYPE||!1,Ut=R.FORCE_BODY||!1,Oe=R.SANITIZE_DOM!==!1,bs=R.SANITIZE_NAMED_PROPS||!1,mr=R.KEEP_CONTENT!==!1,je=R.IN_PLACE||!1,tt=R.ALLOWED_URI_REGEXP||Lm,ai=R.NAMESPACE||Rn,yo=R.MATHML_TEXT_INTEGRATION_POINTS||yo,Eo=R.HTML_INTEGRATION_POINTS||Eo,et=R.CUSTOM_ELEMENT_HANDLING||{},R.CUSTOM_ELEMENT_HANDLING&&Iv(R.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(et.tagNameCheck=R.CUSTOM_ELEMENT_HANDLING.tagNameCheck),R.CUSTOM_ELEMENT_HANDLING&&Iv(R.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(et.attributeNameCheck=R.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),R.CUSTOM_ELEMENT_HANDLING&&typeof R.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(et.allowCustomizedBuiltInElements=R.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),A&&(W=!1),_t&&(st=!0),ii&&(X=vt({},Cm),Q=[],ii.html===!0&&(vt(X,Mm),vt(Q,Am)),ii.svg===!0&&(vt(X,uu),vt(Q,fu),vt(Q,so)),ii.svgFilters===!0&&(vt(X,hu),vt(Q,fu),vt(Q,so)),ii.mathMl===!0&&(vt(X,du),vt(Q,Dm),vt(Q,so))),R.ADD_TAGS&&(X===Y&&(X=fr(X)),vt(X,R.ADD_TAGS,qt)),R.ADD_ATTR&&(Q===ut&&(Q=fr(Q)),vt(Q,R.ADD_ATTR,qt)),R.ADD_URI_SAFE_ATTR&&vt(Du,R.ADD_URI_SAFE_ATTR,qt),R.FORBID_CONTENTS&&(si===Av&&(si=fr(si)),vt(si,R.FORBID_CONTENTS,qt)),mr&&(X["#text"]=!0),V&&vt(X,["html","head","body"]),X.table&&(vt(X,["tbody"]),delete K.tbody),R.TRUSTED_TYPES_POLICY){if(typeof R.TRUSTED_TYPES_POLICY.createHTML!="function")throw ps('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof R.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw ps('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');b=R.TRUSTED_TYPES_POLICY,x=b.createHTML("")}else b===void 0&&(b=JI(f,i)),b!==null&&typeof x=="string"&&(x=b.createHTML(""));se&&se(R),oi=R}},kv=vt({},[...uu,...hu,...GI]),Pv=vt({},[...du,...VI]),j$=function(R){let Z=E(R);(!Z||!Z.tagName)&&(Z={namespaceURI:ai,tagName:"template"});const it=io(R.tagName),kt=io(Z.tagName);return Ru[R.namespaceURI]?R.namespaceURI===vo?Z.namespaceURI===Rn?it==="svg":Z.namespaceURI===mo?it==="svg"&&(kt==="annotation-xml"||yo[kt]):!!kv[it]:R.namespaceURI===mo?Z.namespaceURI===Rn?it==="math":Z.namespaceURI===vo?it==="math"&&Eo[kt]:!!Pv[it]:R.namespaceURI===Rn?Z.namespaceURI===vo&&!Eo[kt]||Z.namespaceURI===mo&&!yo[kt]?!1:!Pv[it]&&(Y$[it]||!kv[it]):!!(_s==="application/xhtml+xml"&&Ru[R.namespaceURI]):!1},un=function(R){ds(t.removed,{element:R});try{E(R).removeChild(R)}catch{m(R)}},xo=function(R,Z){try{ds(t.removed,{attribute:Z.getAttributeNode(R),from:Z})}catch{ds(t.removed,{attribute:null,from:Z})}if(Z.removeAttribute(R),R==="is")if(st||_t)try{un(Z)}catch{}else try{Z.setAttribute(R,"")}catch{}},Nv=function(R){let Z=null,it=null;if(Ut)R="<remove></remove>"+R;else{const jt=wm(R,/^[\r\n\t ]+/);it=jt&&jt[0]}_s==="application/xhtml+xml"&&ai===Rn&&(R='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+R+"</body></html>");const kt=b?b.createHTML(R):R;if(ai===Rn)try{Z=new h().parseFromString(kt,_s)}catch{}if(!Z||!Z.documentElement){Z=_.createDocument(ai,"template",null);try{Z.documentElement.innerHTML=Lu?x:kt}catch{}}const ne=Z.body||Z.documentElement;return R&&it&&ne.insertBefore(n.createTextNode(it),ne.childNodes[0]||null),ai===Rn?B.call(Z,V?"html":"body")[0]:V?Z.documentElement:ne},$v=function(R){return C.call(R.ownerDocument||R,R,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},ku=function(R){return R instanceof d&&(typeof R.nodeName!="string"||typeof R.textContent!="string"||typeof R.removeChild!="function"||!(R.attributes instanceof u)||typeof R.removeAttribute!="function"||typeof R.setAttribute!="function"||typeof R.namespaceURI!="string"||typeof R.insertBefore!="function"||typeof R.hasChildNodes!="function")},Fv=function(R){return typeof o=="function"&&R instanceof o};function In(ot,R,Z){ro(ot,it=>{it.call(t,R,Z,oi)})}const Uv=function(R){let Z=null;if(In(w.beforeSanitizeElements,R,null),ku(R))return un(R),!0;const it=qt(R.nodeName);if(In(w.uponSanitizeElement,R,{tagName:it,allowedTags:X}),R.hasChildNodes()&&!Fv(R.firstElementChild)&&ae(/<[/\w!]/g,R.innerHTML)&&ae(/<[/\w!]/g,R.textContent)||R.nodeType===ms.progressingInstruction||G&&R.nodeType===ms.comment&&ae(/<[/\w]/g,R.data))return un(R),!0;if(!X[it]||K[it]){if(!K[it]&&Hv(it)&&(et.tagNameCheck instanceof RegExp&&ae(et.tagNameCheck,it)||et.tagNameCheck instanceof Function&&et.tagNameCheck(it)))return!1;if(mr&&!si[it]){const kt=E(R)||R.parentNode,ne=S(R)||R.childNodes;if(ne&&kt){const jt=ne.length;for(let ve=jt-1;ve>=0;--ve){const hn=g(ne[ve],!0);hn.__removalCount=(R.__removalCount||0)+1,kt.insertBefore(hn,v(R))}}}return un(R),!0}return R instanceof l&&!j$(R)||(it==="noscript"||it==="noembed"||it==="noframes")&&ae(/<\/no(script|embed|frames)/i,R.innerHTML)?(un(R),!0):(A&&R.nodeType===ms.text&&(Z=R.textContent,ro([H,N,M],kt=>{Z=fs(Z,kt," ")}),R.textContent!==Z&&(ds(t.removed,{element:R.cloneNode()}),R.textContent=Z)),In(w.afterSanitizeElements,R,null),!1)},Bv=function(R,Z,it){if(Oe&&(Z==="id"||Z==="name")&&(it in n||it in Z$))return!1;if(!(W&&!nt[Z]&&ae(O,Z))){if(!(ht&&ae($,Z))){if(!Q[Z]||nt[Z]){if(!(Hv(R)&&(et.tagNameCheck instanceof RegExp&&ae(et.tagNameCheck,R)||et.tagNameCheck instanceof Function&&et.tagNameCheck(R))&&(et.attributeNameCheck instanceof RegExp&&ae(et.attributeNameCheck,Z)||et.attributeNameCheck instanceof Function&&et.attributeNameCheck(Z))||Z==="is"&&et.allowCustomizedBuiltInElements&&(et.tagNameCheck instanceof RegExp&&ae(et.tagNameCheck,it)||et.tagNameCheck instanceof Function&&et.tagNameCheck(it))))return!1}else if(!Du[Z]){if(!ae(tt,fs(it,L,""))){if(!((Z==="src"||Z==="xlink:href"||Z==="href")&&R!=="script"&&FI(it,"data:")===0&&Dv[R])){if(!(j&&!ae(F,fs(it,L,"")))){if(it)return!1}}}}}}return!0},Hv=function(R){return R!=="annotation-xml"&&wm(R,U)},Gv=function(R){In(w.beforeSanitizeAttributes,R,null);const{attributes:Z}=R;if(!Z||ku(R))return;const it={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Q,forceKeepAttr:void 0};let kt=Z.length;for(;kt--;){const ne=Z[kt],{name:jt,namespaceURI:ve,value:hn}=ne,Ts=qt(jt);let ue=jt==="value"?hn:UI(hn);if(it.attrName=Ts,it.attrValue=ue,it.keepAttr=!0,it.forceKeepAttr=void 0,In(w.uponSanitizeAttribute,R,it),ue=it.attrValue,bs&&(Ts==="id"||Ts==="name")&&(xo(jt,R),ue=Ss+ue),G&&ae(/((--!?|])>)|<\/(style|title)/i,ue)){xo(jt,R);continue}if(it.forceKeepAttr||(xo(jt,R),!it.keepAttr))continue;if(!J&&ae(/\/>/i,ue)){xo(jt,R);continue}A&&ro([H,N,M],zv=>{ue=fs(ue,zv," ")});const Vv=qt(R.nodeName);if(Bv(Vv,Ts,ue)){if(b&&typeof f=="object"&&typeof f.getAttributeType=="function"&&!ve)switch(f.getAttributeType(Vv,Ts)){case"TrustedHTML":{ue=b.createHTML(ue);break}case"TrustedScriptURL":{ue=b.createScriptURL(ue);break}}try{ve?R.setAttributeNS(ve,jt,ue):R.setAttribute(jt,ue),ku(R)?un(R):Om(t.removed)}catch{}}}In(w.afterSanitizeAttributes,R,null)},K$=function ot(R){let Z=null;const it=$v(R);for(In(w.beforeSanitizeShadowDOM,R,null);Z=it.nextNode();)In(w.uponSanitizeShadowNode,Z,null),Uv(Z),Gv(Z),Z.content instanceof s&&ot(Z.content);In(w.afterSanitizeShadowDOM,R,null)};return t.sanitize=function(ot){let R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Z=null,it=null,kt=null,ne=null;if(Lu=!ot,Lu&&(ot="<!-->"),typeof ot!="string"&&!Fv(ot))if(typeof ot.toString=="function"){if(ot=ot.toString(),typeof ot!="string")throw ps("dirty is not a string, aborting")}else throw ps("toString is not a function");if(!t.isSupported)return ot;if(xt||Iu(R),t.removed=[],typeof ot=="string"&&(je=!1),je){if(ot.nodeName){const hn=qt(ot.nodeName);if(!X[hn]||K[hn])throw ps("root node is forbidden and cannot be sanitized in-place")}}else if(ot instanceof o)Z=Nv("<!---->"),it=Z.ownerDocument.importNode(ot,!0),it.nodeType===ms.element&&it.nodeName==="BODY"||it.nodeName==="HTML"?Z=it:Z.appendChild(it);else{if(!st&&!A&&!V&&ot.indexOf("<")===-1)return b&&Ne?b.createHTML(ot):ot;if(Z=Nv(ot),!Z)return st?null:Ne?x:""}Z&&Ut&&un(Z.firstChild);const jt=$v(je?ot:Z);for(;kt=jt.nextNode();)Uv(kt),Gv(kt),kt.content instanceof s&&K$(kt.content);if(je)return ot;if(st){if(_t)for(ne=D.call(Z.ownerDocument);Z.firstChild;)ne.appendChild(Z.firstChild);else ne=Z;return(Q.shadowroot||Q.shadowrootmode)&&(ne=P.call(r,ne,!0)),ne}let ve=V?Z.outerHTML:Z.innerHTML;return V&&X["!doctype"]&&Z.ownerDocument&&Z.ownerDocument.doctype&&Z.ownerDocument.doctype.name&&ae(Rm,Z.ownerDocument.doctype.name)&&(ve="<!DOCTYPE "+Z.ownerDocument.doctype.name+`>
|
|
4
4
|
`+ve),A&&ro([H,N,M],hn=>{ve=fs(ve,hn," ")}),b&&Ne?b.createHTML(ve):ve},t.setConfig=function(){let ot=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Iu(ot),xt=!0},t.clearConfig=function(){oi=null,xt=!1},t.isValidAttribute=function(ot,R,Z){oi||Iu({});const it=qt(ot),kt=qt(R);return Bv(it,kt,Z)},t.addHook=function(ot,R){typeof R=="function"&&ds(w[ot],R)},t.removeHook=function(ot,R){if(R!==void 0){const Z=NI(w[ot],R);return Z===-1?void 0:$I(w[ot],Z,1)[0]}return Om(w[ot])},t.removeHooks=function(ot){w[ot]=[]},t.removeAllHooks=function(){w=km()},t}var pu=Pm();const ao=e=>pu.sanitize(e,{USE_PROFILES:{html:!0,svg:!0,svgFilters:!0}}),tk=e=>pu.sanitize(e,{NAMESPACE:"http://www.w3.org/2000/svg",USE_PROFILES:{html:!0,svg:!0,svgFilters:!0}}),ln=e=>pu.sanitize(e,{ALLOWED_TAGS:[]}),po=class po extends mt{constructor(){super(...arguments),this.type="toolbar",this.renderType=at.HTML}init(){const t=()=>this.updateOverflowMenu(!1);this.services.events.addEventListener(T.Toolbar.SHOW_OVERFLOW_MENU,()=>{this.renderOverflowMenu(),document.body.addEventListener("click",t)}),this.services.events.addEventListener(T.Toolbar.HIDE_OVERFLOW_MENU,()=>{document.body.removeEventListener("click",t)})}render(t=!0){const n=this.getComponentContainer({ariaLabel:"toolbar"}).attr("role","group");if(y(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"),l=this;o.merge(a).classed("disabled",c=>c.shouldBeDisabled()).attr("role","button").attr("aria-disabled",c=>c.shouldBeDisabled()).attr("aria-label",c=>c.title).html(c=>`
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
<div class="${fe}--${s}-modal-footer-spacer"></div>
|
|
50
50
|
<button class="cds--btn cds--btn--primary" type="button" data-modal-primary-focus>${i}</button>
|
|
51
51
|
</div>
|
|
52
|
-
</div>`}render(t=!1){const n=this.model.getOptions();if(!this.isEventListenerAdded){const r=I(this.services.domUtils.getHolder()),i=y(n,"style","prefix");this.modal=k.appendOrSelect(r,`div.${fe}--${i}--modal`),this.addEventListeners(),this.isEventListenerAdded=!0}}destroy(){this.removeEventListeners(),this.isEventListenerAdded=!1}}class vs extends mt{constructor(){super(...arguments),this.type="title",this.renderType=at.HTML}render(t=!1){const n=this.getComponentContainer(),r=y(this.getOptions(),"title"),i=n.selectAll("p.title").data([r]);if(i.enter().append("p").classed("title",!0).attr("role","heading").attr("aria-level",2).merge(i).html(s=>ln(s)),i.node()&&i.node().offsetWidth<i.node().scrollWidth){const s=this;i.on("mouseover",function(a){s.services.events.dispatchEvent(T.Tooltip.SHOW,{event:a,hoveredElement:i,content:i.text()})}).on("mousemove",function(a){s.services.events.dispatchEvent(T.Tooltip.MOVE,{event:a})}).on("mouseout",function(){s.services.events.dispatchEvent(T.Tooltip.HIDE)})}i.exit().remove()}truncateTitle(t,n){if(n<=0)return;const r=t.text();if(t.node().getComputedTextLength()>n){t.append("tspan").text("...");const i=k.appendOrSelect(t,"tspan").node().getComputedTextLength(),s=t.text(),a=this.getSubstringIndex(t.node(),0,s.length-1,n-i);t.html(s.substring(0,a-1)).append("tspan").text("...");const o=this;t.on("mouseover",function(l){o.services.events.dispatchEvent(T.Tooltip.SHOW,{event:l,hoveredElement:t,content:r})}).on("mousemove",function(l){o.services.events.dispatchEvent(T.Tooltip.MOVE,{event:l})}).on("mouseout",function(){o.services.events.dispatchEvent(T.Tooltip.HIDE)})}}getMaxTitleWidth(){return k.getSVGElementSize(this.parent.node(),{useAttrs:!0}).width}getSubstringIndex(t,n,r,i){const s=Math.floor((r+n)/2);return t.getSubStringLength(0,s)>i?this.getSubstringIndex(t,n,s,i):t.getSubStringLength(0,s)<i?t.getSubStringLength(0,s+1)>i?s:this.getSubstringIndex(t,s,r,i):s}}var ft=(e=>(e.GRAPHICS_DOCUMENT="graphics-document",e.GRAPHICS_OBJECT="graphics-object",e.GRAPHICS_SYMBOL="graphics-symbol",e.GROUP="group",e.DOCUMENT="document",e.CHECKBOX="checkbox",e.BUTTON="button",e.MENU="menu",e.MENU_ITEM="menuitem",e.IMG="img",e))(ft||{});class gu extends mt{constructor(){super(...arguments),this.type="legend",this.renderType=at.HTML}render(t=!1){const n=this.getOptions(),r=y(n,"legend"),i=y(r,"alignment"),s=y(n,"legend","orientation");let a=this.model.getDataGroups();const{DISABLED:o}=Pt.items.status,l=a.some(S=>S.status===o),c=y(r,"order"),u=this.getComponentContainer().classed("center-aligned",i===Gt.CENTER).classed("right-aligned",i===Gt.RIGHT).classed(s,!0).classed("has-deactivated-items",l).attr("role",ft.GROUP).attr("aria-label","Data groups").attr("data-name","legend-items");c&&(a=this.sortDataGroups(a,c));const d=u.selectAll("div.legend-item").data(a,S=>S.name),h=d.enter().append("div").attr("class","legend-item");h.merge(u.selectAll("div.legend-item")).classed("active",function(S){return S.status===Pt.items.status.ACTIVE});const f=y(this.getOptions(),"legend","clickable");u.classed("clickable",f&&a.length>1);const p=Pt.checkbox.radius,g=h.append("div").classed("checkbox",!0),m=g.merge(d.select("div.checkbox")).attr("role",ft.CHECKBOX).attr("tabindex",f?0:-1).attr("aria-labelledby",(S,E)=>this.services.domUtils.generateElementIDString(`legend-datagroup-${E}-title`)).attr("aria-checked",({status:S})=>S===Pt.items.status.ACTIVE).attr("width",p*2).attr("height",p*2).attr("class",S=>this.model.getColorClassName({classNameTypes:[lt.BACKGROUND],dataGroupName:S.name,originalClassName:"checkbox"})).style("background",S=>S.status===Pt.items.status.ACTIVE?this.model.getFillColor(S.name)||this.model.getStrokeColor(S.name):null).classed("active",function(S){return S.status===Pt.items.status.ACTIVE});g.append("svg").attr("focusable",!1).attr("preserveAspectRatio","xMidYMid meet").attr("xmlns","http://www.w3.org/2000/svg").attr("width","11").attr("height","11").attr("viewBox","0 0 31 28").attr("aria-hidden",!0).style("will-change","transform").append("path").attr("d","M13 21.2l-7.1-7.1-1.4 1.4 7.1 7.1L13 24 27.1 9.9l-1.4-1.5z"),h.append("p").merge(d.select("p"));const v=y(n,"legend","additionalItems");if(v&&a.length){const S=this,E=u.selectAll("div.additional-item").data(v);E.exit().remove();const b=E.enter().append("div").merge(E).classed("legend-item",!0).classed("additional",!0).attr("aria-labelledby",(C,D)=>this.services.domUtils.generateElementIDString(`legend-datagroup-${m.size()+D}-title`));b.selectAll("*").remove();let x,_=1;b.append("svg").classed("icon",!0).each(function(C){const D=I(this);!x||x!=C.type?(x=C.type,_=1):_++,S.addAdditionalItem(D,C,_)}),b.append("p").merge(b.select("p")),this.truncateLegendText()}d.exit().on("mouseover",null).on("click",null).on("mouseout",null).remove(),f&&h.size()>1&&this.addEventListeners()}sortDataGroups(t,n){if(t.sort((r,i)=>n.indexOf(r.name)-n.indexOf(i.name)),n.length<t.length){const r=t.length-n.length;return t.slice(r).concat(t.slice(0,r))}return t}addAdditionalItem(t,n,r){const{width:i,height:s}=Pt.area;if(n.type===zt.RADIUS?t.style("width",`${s}px`).style("height",`${s}px`):t.style("width",`${i}px`).style("height",`${s}px`),n.type===zt.RADIUS){const{iconData:a,fill:o,stroke:l}=Pt.radius;t.attr("fill","none").selectAll("circle").data(a).enter().append("circle").classed("radius",!0).attr("role",ft.IMG).attr("aria-label","radius").attr("cx",u=>u.cx).attr("cy",u=>u.cy).attr("r",u=>u.r).style("fill",n.fill?n.fill:o).style("stroke",n.stroke?n.stroke:l)}else if(n.type===zt.LINE){const a=Pt.line;t.select("line.line").empty()&&t.append("line").classed(`line-${r}`,!0).attr("role",ft.IMG).attr("aria-label","line").attr("x1",0).attr("y1",a.yPosition).attr("x2",i).attr("y2",a.yPosition).style("stroke",n.stroke?n.stroke:a.stroke).style("stroke-width",a.strokeWidth)}else if(n.type===zt.AREA)t.select("rect.area").empty()&&t.append("rect").classed(`area-${r}`,!0).attr("role",ft.IMG).attr("aria-label","area").attr("width",i).attr("height",s).style("fill",r>3&&!n.fill?Pt.area.fill:n.fill).style("stroke",n.stroke);else if(n.type===zt.SIZE){const{iconData:a,fill:o,stroke:l}=Pt.size;t.attr("fill","none").attr("role",ft.IMG).attr("aria-label","size").selectAll("rect").data(a).enter().append("rect").classed("size",!0).attr("width",u=>u.width).attr("height",u=>u.height).attr("y",()=>0).style("fill",n.fill?n.fill:o).style("stroke",n.stroke?n.stroke:l).style("stroke-width",1)}else if(n.type===zt.QUARTILE){const{iconData:a}=Pt.quartile;t.selectAll("rect").attr("role",ft.IMG).attr("aria-label","quartile").data(a).enter().append("rect").attr("class",(l,c)=>`quartile-${c===0?"wrapper":"line"}`).attr("x",l=>l.x).attr("y",l=>l.y).attr("width",l=>l.width).attr("height",l=>l.height)}else if(n.type===zt.ZOOM){const{iconData:a,color:o}=y(Pt,"zoom"),l=t.attr("role",ft.IMG).attr("aria-label","zoom").selectAll("g.icon").data(a).enter();l.append("g").attr("x",c=>c.x).attr("y",c=>c.y).attr("width",c=>c.width).attr("height",c=>c.height).append("polygon").attr("points","7.7 4.82 5.78 4.82 5.78 2.89 4.82 2.89 4.82 4.82 2.89 4.82 2.89 5.78 4.82 5.78 4.82 7.7 5.78 7.7 5.78 5.78 7.7 5.78 7.7 4.82").attr("fill",()=>n.color?n.color:o),l.append("path").attr("d","M9.36,8.67A5.22,5.22,0,0,0,10.59,5.3,5.3,5.3,0,1,0,5.3,10.59,5.22,5.22,0,0,0,8.67,9.36L12.32,13l.68-.68Zm-4.06,1A4.34,4.34,0,1,1,9.63,5.3,4.33,4.33,0,0,1,5.3,9.63Z").attr("fill",()=>n.color?n.color:o)}}truncateLegendText(){const t=this.getComponentContainer(),n=y(this.getOptions(),"legend","truncation"),r=y(n,"type"),i=y(n,"threshold"),s=y(n,"numCharacter"),a=t.selectAll("div.legend-item p");a.attr("id",function(){return(this.parentNode.querySelector("div.checkbox")||this.parentNode).getAttribute("aria-labelledby")}),r!==Re.NONE?a.html(function(o){const l=ln(o.name);return l.length>i&&l.length!==s?as(l,r,s):l}):a.html(o=>ln(o.name))}addEventListeners(){const t=this,n=this.getComponentContainer(),r=this.getOptions(),i=y(r,"legend"),s=y(i,"truncation");n.selectAll("div.legend-item").on("mouseover",function(a){t.services.events.dispatchEvent(T.Legend.ITEM_HOVER,{hoveredElement:I(this)});const o=I(this);o.select("div.checkbox").classed("hovered",!0);const l=o.datum();l.name.length>s.threshold&&s.numCharacter<l.name.length&&s.type!==Re.NONE&&t.services.events.dispatchEvent(T.Tooltip.SHOW,{event:a,hoveredElement:o,content:l.name})}).on("mousemove",function(a){I(this).datum().name.length>s.threshold&&s.type!==Re.NONE&&t.services.events.dispatchEvent(T.Tooltip.MOVE,{event:a})}).on("click",function(){t.services.events.dispatchEvent(T.Legend.ITEM_CLICK,{clickedElement:I(this)});const o=I(this).datum();t.model.toggleDataLabel(o.name)}).on("mouseout",function(){const a=I(this);a.select("div.checkbox").classed("hovered",!1),a.datum().name.length>s.threshold&&s.type!==Re.NONE&&t.services.events.dispatchEvent(T.Tooltip.HIDE),t.services.events.dispatchEvent(T.Legend.ITEM_MOUSEOUT,{hoveredElement:a})}),n.selectAll("div.legend-item div.checkbox").on("keyup",function(a){a.key&&a.key==="Tab"&&t.services.events.dispatchEvent(T.Legend.ITEM_HOVER,{hoveredElement:I(this)})}),n.selectAll("div.legend-item div.checkbox").on("keydown",function(a,o){a.key&&a.key===" "?(a.preventDefault(),t.model.toggleDataLabel(o.name)):a.key&&a.key==="Tab"&&t.services.events.dispatchEvent(T.Legend.ITEM_MOUSEOUT,{hoveredElement:I(this)})}),n.selectAll("g.additional-item").on("mouseover",function(a){const o=I(this),l=o.datum();l.name.length>s.threshold&&t.services.events.dispatchEvent(T.Tooltip.SHOW,{event:a,hoveredElement:o,content:l.name})})}}class Nm extends mt{constructor(t,n,r){super(t,n,r),this.type="chart-clip",this.renderType=at.SVG,this.chartClipId="chart-clip-id-"+Math.floor(Math.random()*99999999999),this.init()}init(){this.model.set({chartClipId:this.chartClipId},{skipUpdate:!0})}render(t=!0){this.createClipPath()}createClipPath(){const t=this.parent,{cartesianScales:n}=this.services;if(!n)throw new Error("Service cartesianScales was undefined");const r=n.getMainXScale(),i=n.getMainYScale(),[s,a]=r.range(),[o,l]=i.range();if(!t)throw new Error("svg is undefined");this.chartClipPath=k.appendOrSelect(t,`clipPath.${this.type}`).attr("id",this.chartClipId);const c=k.appendOrSelect(this.chartClipPath,`rect.${this.type}`);a-s>0&&c.attr("x",s).attr("y",l).attr("width",a-s).attr("height",o-l),this.chartClipPath.merge(c).lower()}}class ek extends Nm{constructor(){super(...arguments),this.type="canvas-chart-clip",this.chartClipId="canvas-chart-clip-id-"+Math.floor(Math.random()*99999999999)}createClipPath(){const t=this.parent,{width:n,height:r}=k.getSVGElementSize(this.parent,{useAttrs:!0});this.chartClipPath=k.appendOrSelect(t,`clipPath.${this.type}`).attr("id",this.chartClipId);const i=k.appendOrSelect(this.chartClipPath,`rect.${this.type}`);i.attr("x",0).attr("y",0).attr("width",n).attr("height",r),this.chartClipPath.merge(i).lower()}}var ti,Bt;(function(e){e.LEFT="left",e.RIGHT="right",e.TOP="top",e.BOTTOM="bottom"})(Bt||(Bt={}));var $m=(ti={},ti[Bt.LEFT]=function(e,t,n){return{top:e.top-Math.round(t.offsetHeight/2)+Math.round(n.height/2),left:Math.round(e.left-t.offsetWidth)}},ti[Bt.RIGHT]=function(e,t,n){return{top:e.top-Math.round(t.offsetHeight/2)+Math.round(n.height/2),left:Math.round(e.left+n.width)}},ti[Bt.TOP]=function(e,t,n){return{top:Math.round(e.top-t.offsetHeight),left:e.left-Math.round(t.offsetWidth/2)+Math.round(n.width/2)}},ti[Bt.BOTTOM]=function(e,t,n){return{top:Math.round(e.top+n.height),left:e.left-Math.round(t.offsetWidth/2)+Math.round(n.width/2)}},ti),Fm=typeof window<"u"?window:{innerHeight:0,innerWidth:0},lo=function(){function e(t){t===void 0&&(t={}),this.positions=$m,this.positions=Object.assign({},$m,t)}return e.prototype.getRelativeOffset=function(t){for(var n={left:t.offsetLeft,top:t.offsetTop};t.offsetParent&&getComputedStyle(t.offsetParent).position==="static";)n.left+=t.offsetLeft,n.top+=t.offsetTop,t=t.offsetParent;return n},e.prototype.getAbsoluteOffset=function(t){for(var n=t,r={top:0,left:0};n.offsetParent;){var i=getComputedStyle(n.offsetParent);i.position==="static"&&i.marginLeft&&i.marginTop&&(parseInt(i.marginTop,10)&&(r.top+=parseInt(i.marginTop,10)),parseInt(i.marginLeft,10)&&(r.left+=parseInt(i.marginLeft,10))),n=n.offsetParent}var s=t.getBoundingClientRect(),a=document.body.getBoundingClientRect();return{top:s.top-a.top+r.top,left:s.left-a.left+r.left}},e.prototype.findRelative=function(t,n,r){var i=this.getRelativeOffset(t),s=t.getBoundingClientRect();return this.calculatePosition(i,s,n,r)},e.prototype.findAbsolute=function(t,n,r){var i=this.getAbsoluteOffset(t),s=t.getBoundingClientRect();return this.calculatePosition(i,s,n,r)},e.prototype.findPosition=function(t,n,r,i){i===void 0&&(i=this.getAbsoluteOffset.bind(this));var s=i(t),a=t.getBoundingClientRect();return this.calculatePosition(s,a,n,r)},e.prototype.findPositionAt=function(t,n,r){return this.calculatePosition(t,{top:0,left:0,height:0,width:0},n,r)},e.prototype.getPlacementBox=function(t,n){var r=t.offsetHeight+n.top,i=t.offsetWidth+n.left;return{top:n.top,bottom:r,left:n.left,right:i}},e.prototype.addOffset=function(t,n,r){return n===void 0&&(n=0),r===void 0&&(r=0),Object.assign({},t,{top:t.top+n,left:t.left+r})},e.prototype.setElement=function(t,n){t.style.top=n.top+"px",t.style.left=n.left+"px"},e.prototype.findBestPlacement=function(t,n,r,i,s){var a=this;i===void 0&&(i=this.defaultContainerFunction.bind(this)),s===void 0&&(s=this.findPosition.bind(this));var o=r.map(function(l){var c=s(t,n,l),u=a.getPlacementBox(n,c),d=0,h=0,f=i();u.top<f.top?d=f.top-u.top:u.bottom>f.height&&(d=u.bottom-f.height),u.left<f.left?h=f.left-u.left:u.right>f.width&&(h=u.right-f.width),d&&!h?h=1:h&&!d&&(d=1);var p=n.offsetHeight*n.offsetWidth,g=d*h,m=p-g,v=m/p;return{placement:l,weight:v}});return o.sort(function(l,c){return c.weight-l.weight}),o[0].placement},e.prototype.findBestPlacementAt=function(t,n,r,i){var s=this;i===void 0&&(i=this.defaultContainerFunction.bind(this));var a=function(o,l,c){return s.findPositionAt(t,l,c)};return this.findBestPlacement(null,n,r,i,a)},e.prototype.defaultContainerFunction=function(){return{top:0,left:0,height:Fm.innerHeight,width:Fm.innerWidth}},e.prototype.calculatePosition=function(t,n,r,i){return this.positions[i]?this.positions[i](t,r,n):(console.error("No function found for placement, defaulting to 0,0"),{left:0,top:0})},e}();new lo;class mu extends mt{constructor(t,n,r){super(t,n,r),this.type="tooltip",this.renderType=at.HTML,this.isEventListenerAdded=!1,this.lastTriggeredEventType="",this.positionService=new lo,this.handleShowTooltip=i=>{const s=i.detail.data||i.detail.items,a=I(i.detail.event.target).datum();let o;const l=this.formatItems(this.getItems(i));i.detail.content?o=`<div class="title-tooltip"><p>${ao(i.detail.content)}</p></div>`:o=ao(this.getTooltipHTML(l));const c=k.appendOrSelect(this.tooltip,"div.content-box");if(y(this.getOptions(),"tooltip","customHTML"))if(i.detail.content){const u=`<div class="title-tooltip"><p>${ao(i.detail.content)}</p></div>`;c.html(u)}else c.html(`<div class="title-tooltip"><p>${ao(this.model.getOptions().tooltip.customHTML(s,o,a))}</p></div>`);else c.html(o);c.selectAll(".datapoint-tooltip").each(function(u,d){const h=l[d];l[d]&&l[d].color&&I(this).select(".tooltip-color").attr("class","tooltip-color").style("background-color",h.color)}),this.positionTooltip(i),this.tooltip.classed("hidden",!1).attr("aria-hidden",!1),this.lastTriggeredEventType=i.type},this.handleHideTooltip=()=>{this.tooltip.classed("hidden",!0).attr("aria-hidden",!0)},this.init()}addTooltipEventListener(){this.services.events.addEventListener(T.Tooltip.MOVE,t=>{this.lastTriggeredEventType!==T.Toolbar.SHOW_TOOLTIP&&this.tooltip.classed("hidden")===!1&&this.positionTooltip(t)}),this.services.events.addEventListener(T.Tooltip.SHOW,this.handleShowTooltip),this.services.events.addEventListener(T.Tooltip.HIDE,this.handleHideTooltip),this.services.events.addEventListener(T.Chart.MOUSEOUT,this.handleHideTooltip),this.services.events.addEventListener(T.Toolbar.SHOW_TOOLTIP,this.handleShowTooltip),this.services.events.addEventListener(T.Toolbar.HIDE_TOOLTIP,this.handleHideTooltip)}removeTooltipEventListener(){this.services.events.removeEventListener(T.Tooltip.MOVE,null),this.services.events.removeEventListener(T.Tooltip.SHOW,this.handleShowTooltip),this.services.events.removeEventListener(T.Tooltip.HIDE,this.handleHideTooltip),this.services.events.removeEventListener(T.Chart.MOUSEOUT,this.handleHideTooltip),this.services.events.removeEventListener(T.Toolbar.SHOW_TOOLTIP,this.handleShowTooltip),this.services.events.removeEventListener(T.Toolbar.HIDE_TOOLTIP,this.handleHideTooltip)}getItems(t){return t.detail.items?t.detail.items:[]}formatItems(t){const n=this.getOptions(),r=y(n,"tooltip","truncation","type"),i=y(n,"tooltip","truncation","threshold"),s=y(n,"tooltip","truncation","numCharacter");return r!==Re.NONE?t.map(a=>{const o=a.labelIcon?12:0;return a.value=a.value?this.valueFormatter(a.value,a.label):a.value,a.label&&a.label.length+o>i&&(a.label=as(a.label,r,s)),a.value&&a.value.length>i&&(a.value=as(a.value,r,s)),a}):t.map(a=>(a.value=a.value?this.valueFormatter(a.value,a.label):a.value,a))}getTooltipHTML(t){return'<ul class="multi-tooltip">'+t.map(n=>`<li>
|
|
52
|
+
</div>`}render(t=!1){const n=this.model.getOptions();if(!this.isEventListenerAdded){const r=I(this.services.domUtils.getHolder()),i=y(n,"style","prefix");this.modal=k.appendOrSelect(r,`div.${fe}--${i}--modal`),this.addEventListeners(),this.isEventListenerAdded=!0}}destroy(){this.removeEventListeners(),this.isEventListenerAdded=!1}}class vs extends mt{constructor(){super(...arguments),this.type="title",this.renderType=at.HTML}render(t=!1){const n=this.getComponentContainer(),r=y(this.getOptions(),"title"),i=n.selectAll("p.title").data([r]);if(i.enter().append("p").classed("title",!0).attr("role","heading").attr("aria-level",2).merge(i).html(s=>ln(s)),i.node()&&i.node().offsetWidth<i.node().scrollWidth){const s=this;i.on("mouseover",function(a){s.services.events.dispatchEvent(T.Tooltip.SHOW,{event:a,hoveredElement:i,content:i.text()})}).on("mousemove",function(a){s.services.events.dispatchEvent(T.Tooltip.MOVE,{event:a})}).on("mouseout",function(){s.services.events.dispatchEvent(T.Tooltip.HIDE)})}i.exit().remove()}truncateTitle(t,n){if(n<=0)return;const r=t.text();if(t.node().getComputedTextLength()>n){t.append("tspan").text("...");const i=k.appendOrSelect(t,"tspan").node().getComputedTextLength(),s=t.text(),a=this.getSubstringIndex(t.node(),0,s.length-1,n-i);t.html(s.substring(0,a-1)).append("tspan").text("...");const o=this;t.on("mouseover",function(l){o.services.events.dispatchEvent(T.Tooltip.SHOW,{event:l,hoveredElement:t,content:r})}).on("mousemove",function(l){o.services.events.dispatchEvent(T.Tooltip.MOVE,{event:l})}).on("mouseout",function(){o.services.events.dispatchEvent(T.Tooltip.HIDE)})}}getMaxTitleWidth(){return k.getSVGElementSize(this.parent.node(),{useAttrs:!0}).width}getSubstringIndex(t,n,r,i){const s=Math.floor((r+n)/2);return t.getSubStringLength(0,s)>i?this.getSubstringIndex(t,n,s,i):t.getSubStringLength(0,s)<i?t.getSubStringLength(0,s+1)>i?s:this.getSubstringIndex(t,s,r,i):s}}var ft=(e=>(e.GRAPHICS_DOCUMENT="graphics-document",e.GRAPHICS_OBJECT="graphics-object",e.GRAPHICS_SYMBOL="graphics-symbol",e.GROUP="group",e.DOCUMENT="document",e.CHECKBOX="checkbox",e.BUTTON="button",e.MENU="menu",e.MENU_ITEM="menuitem",e.IMG="img",e))(ft||{});class gu extends mt{constructor(){super(...arguments),this.type="legend",this.renderType=at.HTML}render(t=!1){const n=this.getOptions(),r=y(n,"legend"),i=y(r,"alignment"),s=y(n,"legend","orientation");let a=this.model.getDataGroups();const{DISABLED:o}=Pt.items.status,l=a.some(S=>S.status===o),c=y(r,"order"),u=this.getComponentContainer().classed("center-aligned",i===Gt.CENTER).classed("right-aligned",i===Gt.RIGHT).classed(s,!0).classed("has-deactivated-items",l).attr("role",ft.GROUP).attr("aria-label","Data groups").attr("data-name","legend-items");c&&(a=this.sortDataGroups(a,c));const d=u.selectAll("div.legend-item").data(a,S=>S.name),h=d.enter().append("div").attr("class","legend-item");h.merge(u.selectAll("div.legend-item")).classed("active",function(S){return S.status===Pt.items.status.ACTIVE});const f=y(this.getOptions(),"legend","clickable");u.classed("clickable",f&&a.length>1);const p=Pt.checkbox.radius,g=h.append("div").classed("checkbox",!0),m=g.merge(d.select("div.checkbox")).attr("role",ft.CHECKBOX).attr("tabindex",f?0:-1).attr("aria-labelledby",(S,E)=>this.services.domUtils.generateElementIDString(`legend-datagroup-${E}-title`)).attr("aria-checked",({status:S})=>S===Pt.items.status.ACTIVE).attr("width",p*2).attr("height",p*2).attr("class",S=>this.model.getColorClassName({classNameTypes:[lt.BACKGROUND],dataGroupName:S.name,originalClassName:"checkbox"})).style("background",S=>S.status===Pt.items.status.ACTIVE?this.model.getFillColor(S.name)||this.model.getStrokeColor(S.name):null).classed("active",function(S){return S.status===Pt.items.status.ACTIVE});g.append("svg").attr("focusable",!1).attr("preserveAspectRatio","xMidYMid meet").attr("xmlns","http://www.w3.org/2000/svg").attr("width","11").attr("height","11").attr("viewBox","0 0 31 28").attr("aria-hidden",!0).style("will-change","transform").append("path").attr("d","M13 21.2l-7.1-7.1-1.4 1.4 7.1 7.1L13 24 27.1 9.9l-1.4-1.5z"),h.append("p").merge(d.select("p"));const v=y(n,"legend","additionalItems");if(v&&a.length){const S=this,E=u.selectAll("div.additional-item").data(v);E.exit().remove();const b=E.enter().append("div").merge(E).classed("legend-item",!0).classed("additional",!0).attr("aria-labelledby",(C,D)=>this.services.domUtils.generateElementIDString(`legend-datagroup-${m.size()+D}-title`));b.selectAll("*").remove();let x,_=1;b.append("svg").classed("icon",!0).each(function(C){const D=I(this);!x||x!=C.type?(x=C.type,_=1):_++,S.addAdditionalItem(D,C,_)}),b.append("p").merge(b.select("p")),this.truncateLegendText()}d.exit().on("mouseover",null).on("click",null).on("mouseout",null).remove(),f&&h.size()>1&&this.addEventListeners()}sortDataGroups(t,n){if(t.sort((r,i)=>n.indexOf(r.name)-n.indexOf(i.name)),n.length<t.length){const r=t.length-n.length;return t.slice(r).concat(t.slice(0,r))}return t}addAdditionalItem(t,n,r){const{width:i,height:s}=Pt.area;if(n.type===zt.RADIUS?t.style("width",`${s}px`).style("height",`${s}px`):t.style("width",`${i}px`).style("height",`${s}px`),n.type===zt.RADIUS){const{iconData:a,fill:o,stroke:l}=Pt.radius;t.attr("fill","none").selectAll("circle").data(a).enter().append("circle").classed("radius",!0).attr("role",ft.IMG).attr("aria-label","radius").attr("cx",u=>u.cx).attr("cy",u=>u.cy).attr("r",u=>u.r).style("fill",n.fill?n.fill:o).style("stroke",n.stroke?n.stroke:l)}else if(n.type===zt.LINE){const a=Pt.line;t.select("line.line").empty()&&t.append("line").classed(`line-${r}`,!0).attr("role",ft.IMG).attr("aria-label","line").attr("x1",0).attr("y1",a.yPosition).attr("x2",i).attr("y2",a.yPosition).style("stroke",n.stroke?n.stroke:a.stroke).style("stroke-width",a.strokeWidth)}else if(n.type===zt.AREA)t.select("rect.area").empty()&&t.append("rect").classed(`area-${r}`,!0).attr("role",ft.IMG).attr("aria-label","area").attr("width",i).attr("height",s).style("fill",r>3&&!n.fill?Pt.area.fill:n.fill).style("stroke",n.stroke);else if(n.type===zt.SIZE){const{iconData:a,fill:o,stroke:l}=Pt.size;t.attr("fill","none").attr("role",ft.IMG).attr("aria-label","size").selectAll("rect").data(a).enter().append("rect").classed("size",!0).attr("width",u=>u.width).attr("height",u=>u.height).attr("y",()=>0).style("fill",n.fill?n.fill:o).style("stroke",n.stroke?n.stroke:l).style("stroke-width",1)}else if(n.type===zt.QUARTILE){const{iconData:a}=Pt.quartile;t.selectAll("rect").attr("role",ft.IMG).attr("aria-label","quartile").data(a).enter().append("rect").attr("class",(l,c)=>`quartile-${c===0?"wrapper":"line"}`).attr("x",l=>l.x).attr("y",l=>l.y).attr("width",l=>l.width).attr("height",l=>l.height)}else if(n.type===zt.ZOOM){const{iconData:a,color:o}=y(Pt,"zoom"),l=t.attr("role",ft.IMG).attr("aria-label","zoom").selectAll("g.icon").data(a).enter();l.append("g").attr("x",c=>c.x).attr("y",c=>c.y).attr("width",c=>c.width).attr("height",c=>c.height).append("polygon").attr("points","7.7 4.82 5.78 4.82 5.78 2.89 4.82 2.89 4.82 4.82 2.89 4.82 2.89 5.78 4.82 5.78 4.82 7.7 5.78 7.7 5.78 5.78 7.7 5.78 7.7 4.82").attr("fill",()=>n.color?n.color:o),l.append("path").attr("d","M9.36,8.67A5.22,5.22,0,0,0,10.59,5.3,5.3,5.3,0,1,0,5.3,10.59,5.22,5.22,0,0,0,8.67,9.36L12.32,13l.68-.68Zm-4.06,1A4.34,4.34,0,1,1,9.63,5.3,4.33,4.33,0,0,1,5.3,9.63Z").attr("fill",()=>n.color?n.color:o)}}truncateLegendText(){const t=this.getComponentContainer(),n=y(this.getOptions(),"legend","truncation"),r=y(n,"type"),i=y(n,"threshold"),s=y(n,"numCharacter"),a=t.selectAll("div.legend-item p");a.attr("id",function(){return(this.parentNode.querySelector("div.checkbox")||this.parentNode).getAttribute("aria-labelledby")}),r!==Re.NONE?a.html(function(o){const l=ln(o.name);return l.length>i&&l.length!==s?as(l,r,s):l}):a.html(o=>ln(o.name))}addEventListeners(){const t=this,n=this.getComponentContainer(),r=this.getOptions(),i=y(r,"legend"),s=y(i,"truncation");n.selectAll("div.legend-item").on("mouseover",function(a){t.services.events.dispatchEvent(T.Legend.ITEM_HOVER,{hoveredElement:I(this)});const o=I(this);o.select("div.checkbox").classed("hovered",!0);const l=o.datum();l.name.length>s.threshold&&s.numCharacter<l.name.length&&s.type!==Re.NONE&&t.services.events.dispatchEvent(T.Tooltip.SHOW,{event:a,hoveredElement:o,content:l.name})}).on("mousemove",function(a){I(this).datum().name.length>s.threshold&&s.type!==Re.NONE&&t.services.events.dispatchEvent(T.Tooltip.MOVE,{event:a})}).on("click",function(){t.services.events.dispatchEvent(T.Legend.ITEM_CLICK,{clickedElement:I(this)});const o=I(this).datum();t.model.toggleDataLabel(o.name)}).on("mouseout",function(){const a=I(this);a.select("div.checkbox").classed("hovered",!1),a.datum().name.length>s.threshold&&s.type!==Re.NONE&&t.services.events.dispatchEvent(T.Tooltip.HIDE),t.services.events.dispatchEvent(T.Legend.ITEM_MOUSEOUT,{hoveredElement:a})}),n.selectAll("div.legend-item div.checkbox").on("keyup",function(a){a.key&&a.key==="Tab"&&t.services.events.dispatchEvent(T.Legend.ITEM_HOVER,{hoveredElement:I(this)})}),n.selectAll("div.legend-item div.checkbox").on("keydown",function(a,o){a.key&&a.key===" "?(a.preventDefault(),t.model.toggleDataLabel(o.name)):a.key&&a.key==="Tab"&&t.services.events.dispatchEvent(T.Legend.ITEM_MOUSEOUT,{hoveredElement:I(this)})}),n.selectAll("g.additional-item").on("mouseover",function(a){const o=I(this),l=o.datum();l.name.length>s.threshold&&t.services.events.dispatchEvent(T.Tooltip.SHOW,{event:a,hoveredElement:o,content:l.name})})}}class Nm extends mt{constructor(t,n,r){super(t,n,r),this.type="chart-clip",this.renderType=at.SVG,this.chartClipId="chart-clip-id-"+Math.floor(Math.random()*99999999999),this.init()}init(){this.model.set({chartClipId:this.chartClipId},{skipUpdate:!0})}render(t=!0){this.createClipPath()}createClipPath(){const t=this.parent,{cartesianScales:n}=this.services;if(!n)throw new Error("Service cartesianScales was undefined");const r=n.getMainXScale(),i=n.getMainYScale(),[s,a]=r.range(),[o,l]=i.range();if(!t)throw new Error("svg is undefined");this.chartClipPath=k.appendOrSelect(t,`clipPath.${this.type}`).attr("id",this.chartClipId);const c=k.appendOrSelect(this.chartClipPath,`rect.${this.type}`);a-s>0&&c.attr("x",s).attr("y",l).attr("width",a-s).attr("height",o-l),this.chartClipPath.merge(c).lower()}}class ek extends Nm{constructor(){super(...arguments),this.type="canvas-chart-clip",this.chartClipId="canvas-chart-clip-id-"+Math.floor(Math.random()*99999999999)}createClipPath(){const t=this.parent,{width:n,height:r}=k.getSVGElementSize(this.parent,{useAttrs:!0});this.chartClipPath=k.appendOrSelect(t,`clipPath.${this.type}`).attr("id",this.chartClipId);const i=k.appendOrSelect(this.chartClipPath,`rect.${this.type}`);i.attr("x",0).attr("y",0).attr("width",n).attr("height",r),this.chartClipPath.merge(i).lower()}}var ti,Bt;(function(e){e.LEFT="left",e.RIGHT="right",e.TOP="top",e.BOTTOM="bottom"})(Bt||(Bt={}));var $m=(ti={},ti[Bt.LEFT]=function(e,t,n){return{top:e.top-Math.round(t.offsetHeight/2)+Math.round(n.height/2),left:Math.round(e.left-t.offsetWidth)}},ti[Bt.RIGHT]=function(e,t,n){return{top:e.top-Math.round(t.offsetHeight/2)+Math.round(n.height/2),left:Math.round(e.left+n.width)}},ti[Bt.TOP]=function(e,t,n){return{top:Math.round(e.top-t.offsetHeight),left:e.left-Math.round(t.offsetWidth/2)+Math.round(n.width/2)}},ti[Bt.BOTTOM]=function(e,t,n){return{top:Math.round(e.top+n.height),left:e.left-Math.round(t.offsetWidth/2)+Math.round(n.width/2)}},ti),Fm=typeof window<"u"?window:{innerHeight:0,innerWidth:0},lo=function(){function e(t){t===void 0&&(t={}),this.positions=$m,this.positions=Object.assign({},$m,t)}return e.prototype.getRelativeOffset=function(t){for(var n={left:t.offsetLeft,top:t.offsetTop};t.offsetParent&&getComputedStyle(t.offsetParent).position==="static";)n.left+=t.offsetLeft,n.top+=t.offsetTop,t=t.offsetParent;return n},e.prototype.getAbsoluteOffset=function(t){for(var n=t,r={top:0,left:0};n.offsetParent;){var i=getComputedStyle(n.offsetParent);i.position==="static"&&i.marginLeft&&i.marginTop&&(parseInt(i.marginTop,10)&&(r.top+=parseInt(i.marginTop,10)),parseInt(i.marginLeft,10)&&(r.left+=parseInt(i.marginLeft,10))),n=n.offsetParent}var s=t.getBoundingClientRect(),a=document.body.getBoundingClientRect();return{top:s.top-a.top+r.top,left:s.left-a.left+r.left}},e.prototype.findRelative=function(t,n,r){var i=this.getRelativeOffset(t),s=t.getBoundingClientRect();return this.calculatePosition(i,s,n,r)},e.prototype.findAbsolute=function(t,n,r){var i=this.getAbsoluteOffset(t),s=t.getBoundingClientRect();return this.calculatePosition(i,s,n,r)},e.prototype.findPosition=function(t,n,r,i){i===void 0&&(i=this.getAbsoluteOffset.bind(this));var s=i(t),a=t.getBoundingClientRect();return this.calculatePosition(s,a,n,r)},e.prototype.findPositionAt=function(t,n,r){return this.calculatePosition(t,{top:0,left:0,height:0,width:0},n,r)},e.prototype.getPlacementBox=function(t,n){var r=t.offsetHeight+n.top,i=t.offsetWidth+n.left;return{top:n.top,bottom:r,left:n.left,right:i}},e.prototype.addOffset=function(t,n,r){return n===void 0&&(n=0),r===void 0&&(r=0),Object.assign({},t,{top:t.top+n,left:t.left+r})},e.prototype.setElement=function(t,n){t.style.top=n.top+"px",t.style.left=n.left+"px"},e.prototype.findBestPlacement=function(t,n,r,i,s){var a=this;i===void 0&&(i=this.defaultContainerFunction.bind(this)),s===void 0&&(s=this.findPosition.bind(this));var o=r.map(function(l){var c=s(t,n,l),u=a.getPlacementBox(n,c),d=0,h=0,f=i();u.top<f.top?d=f.top-u.top:u.bottom>f.height&&(d=u.bottom-f.height),u.left<f.left?h=f.left-u.left:u.right>f.width&&(h=u.right-f.width),d&&!h?h=1:h&&!d&&(d=1);var p=n.offsetHeight*n.offsetWidth,g=d*h,m=p-g,v=m/p;return{placement:l,weight:v}});return o.sort(function(l,c){return c.weight-l.weight}),o[0].placement},e.prototype.findBestPlacementAt=function(t,n,r,i){var s=this;i===void 0&&(i=this.defaultContainerFunction.bind(this));var a=function(o,l,c){return s.findPositionAt(t,l,c)};return this.findBestPlacement(null,n,r,i,a)},e.prototype.defaultContainerFunction=function(){return{top:0,left:0,height:Fm.innerHeight,width:Fm.innerWidth}},e.prototype.calculatePosition=function(t,n,r,i){return this.positions[i]?this.positions[i](t,r,n):(console.error("No function found for placement, defaulting to 0,0"),{left:0,top:0})},e}();new lo;class mu extends mt{constructor(t,n,r){super(t,n,r),this.type="tooltip",this.renderType=at.HTML,this.isEventListenerAdded=!1,this.lastTriggeredEventType="",this.positionService=new lo,this.handleShowTooltip=i=>{const s=i.detail.data||i.detail.items,a=I(i.detail.event.target).datum();let o;const l=this.formatItems(this.getItems(i));i.detail.content?o=`<div class="title-tooltip"><p>${ao(i.detail.content)}</p></div>`:o=ao(this.getTooltipHTML(l));const c=k.appendOrSelect(this.tooltip,"div.content-box");if(y(this.getOptions(),"tooltip","customHTML"))if(i.detail.content){const u=`<div class="title-tooltip"><p>${ao(i.detail.content)}</p></div>`;c.html(u)}else c.html(`<div class="title-tooltip"><p>${ao(this.model.getOptions().tooltip.customHTML(s,o,a))}</p></div>`);else c.html(o);c.selectAll(".datapoint-tooltip").each(function(u,d){const h=l[d];l[d]&&l[d].color&&I(this).select(".tooltip-color").attr("class","tooltip-color").style("background-color",h.color)}),this.positionTooltip(i),this.tooltip.classed("hidden",!1).attr("aria-hidden",!1),this.lastTriggeredEventType=i.type},this.handleHideTooltip=()=>{this.tooltip.classed("hidden",!0).attr("aria-hidden",!0)},this.init()}addTooltipEventListener(){this.services.events.addEventListener(T.Tooltip.MOVE,t=>{this.lastTriggeredEventType!==T.Toolbar.SHOW_TOOLTIP&&this.tooltip.classed("hidden")===!1&&this.positionTooltip(t)}),this.services.events.addEventListener(T.Tooltip.SHOW,this.handleShowTooltip),this.services.events.addEventListener(T.Tooltip.HIDE,this.handleHideTooltip),this.services.events.addEventListener(T.Chart.MOUSEOUT,this.handleHideTooltip),this.services.events.addEventListener(T.Toolbar.SHOW_TOOLTIP,this.handleShowTooltip),this.services.events.addEventListener(T.Toolbar.HIDE_TOOLTIP,this.handleHideTooltip)}removeTooltipEventListener(){this.services.events.removeEventListener(T.Tooltip.MOVE,null),this.services.events.removeEventListener(T.Tooltip.SHOW,this.handleShowTooltip),this.services.events.removeEventListener(T.Tooltip.HIDE,this.handleHideTooltip),this.services.events.removeEventListener(T.Chart.MOUSEOUT,this.handleHideTooltip),this.services.events.removeEventListener(T.Toolbar.SHOW_TOOLTIP,this.handleShowTooltip),this.services.events.removeEventListener(T.Toolbar.HIDE_TOOLTIP,this.handleHideTooltip)}getItems(t){return t.detail.items?t.detail.items:[]}formatItems(t){const n=this.getOptions(),r=y(n,"tooltip","truncation","type"),i=y(n,"tooltip","truncation","threshold"),s=y(n,"tooltip","truncation","numCharacter");return r!==Re.NONE?t.map(a=>{const o=a.labelIcon?12:0;return a.value=this.valueFormatter(a.value,a.label),a.label&&a.label.length+o>i&&(a.label=as(a.label,r,s)),a.value&&a.value.length>i&&(a.value=as(a.value,r,s)),a}):t.map(a=>(a.value=this.valueFormatter(a.value,a.label),a))}getTooltipHTML(t){return'<ul class="multi-tooltip">'+t.map(n=>`<li>
|
|
53
53
|
<div class="datapoint-tooltip${n.bold?" bold":""}">
|
|
54
54
|
${n.class||n.color?`<div class="tooltip-color ${n.class}"></div>`:""}
|
|
55
55
|
<div class="label">
|