@orbcharts/core 3.0.0-beta.10 → 3.0.0-beta.11
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/dist/orbcharts-core.es.js +195 -171
- package/dist/orbcharts-core.umd.js +1 -1
- package/package.json +1 -1
- package/src/defaults.ts +26 -2
@@ -1,4 +1,4 @@
|
|
1
|
-
(function(g,ot){typeof exports=="object"&&typeof module<"u"?ot(exports):typeof define=="function"&&define.amd?define(["exports"],ot):(g=typeof globalThis<"u"?globalThis:g||self,ot(g["orbcharts-core"]={}))})(this,function(g){"use strict";const ot={width:"auto",height:"auto"},Fe={top:60,right:60,bottom:60,left:60},Le={padding:Fe,highlightTarget:"datum",highlightDefault:null,colorScheme:"light",colors:{light:{label:["#67B7DC","#6794DC","#6771DC","#8067DC","#A367DC","#C767DC","#DC67CE","#DC67AB","#DC6788","#DC6967","#DC8C67","#DCAF67"],primary:"#1b1e23",secondary:"#e1e1e1",labelContrast:["#ffffff","#1b1e23"],background:"#ffffff"},dark:{label:["#67B7DC","#6794DC","#6771DC","#8067DC","#A367DC","#C767DC","#DC67CE","#DC67AB","#DC6788","#DC6967","#DC8C67","#DCAF67"],primary:"#f0f0f0",secondary:"#e1e1e1",labelContrast:["#ffffff","#1b1e23"],background:"#000000"}},styles:{textSize:"0.875rem",unhighlightedOpacity:.3},transitionDuration:800,transitionEase:"easeCubic"},Xn=800,Yn=500,Ji=[],Ki=[],Zi=[],Qi=[],ta=[],ea={nodes:[],edges:[]},Y={position:"left",scaleDomain:["auto","auto"],scaleRange:[0,.9],label:""},Un={position:"bottom",scaleDomain:[0,"max"],scalePadding:.5,label:""},Ee={scaleDomain:["auto","auto"],scaleRange:[0,.9],label:""},Nt={gap:120,rowAmount:1,columnAmount:1},Oe={type:"series",visibleFilter:(t,e)=>!0,sort:null,seriesLabels:[],container:{...Nt},separateSeries:!1,sumSeries:!1};Oe.visibleFilter.toString=()=>"(datum, context) => true";const Pe={seriesDirection:"row",rowLabels:[],columnLabels:[],valueAxis:{...Y},groupAxis:{...Un},separateSeries:!1},Re={type:"grid",visibleFilter:(t,e)=>!0,...Pe,container:{...Nt}};Re.visibleFilter.toString=()=>"(datum, context) => true";const Bt={...Pe},Ie={type:"multiGrid",visibleFilter:(t,e)=>!0,gridList:[{...Bt}],separateGrid:!1,container:{...Nt}};Ie.visibleFilter.toString=()=>"(datum, context) => true";const ke={type:"multiValue",visibleFilter:(t,e)=>!0,categoryLabels:[],xAxis:{...Ee},yAxis:{...Ee},container:{...Nt},separateCategory:!1};ke.visibleFilter.toString=()=>"(datum, context) => true";const Ne={type:"tree",visibleFilter:(t,e)=>!0,categoryLabels:[]};Ne.visibleFilter.toString=()=>"(datum, context) => true";const Be={type:"relationship",visibleFilter:(t,e)=>!0,categoryLabels:[]};Be.visibleFilter.toString=()=>"(datum, context) => true";function U(t){return Object.prototype.toString.call(t)==="[object Object]"}function Hn(t){return Object.prototype.toString.call(t)==="[object Function]"}function zn(t){return!!(t&&t.nodeType)}function ut(t,e){if(U(t)===!1||U(e)===!1)return Object.assign({},e);const n=(r,i)=>{const a=Object.assign({},i);for(let o of Object.keys(r)){if(!(o in i))continue;let u;U(r[o])&&U(i[o])?(u=n(r[o],i[o]),a[o]=u):a[o]=r[o]}return a};return n(t,e)}function na(t=0){try{let e=t.toString().split(".");return e[0]=e[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),e.join(".")}catch(e){console.error(e)}}function ra(t,e){const n={string:a=>typeof a=="string",number:a=>typeof a=="number",boolean:a=>typeof a=="boolean",object:a=>U(a),"object[]":a=>Array.isArray(a)&&a.every(o=>U(o)),"string[]":a=>Array.isArray(a)&&a.every(o=>typeof o=="string"),"number[]":a=>Array.isArray(a)&&a.every(o=>typeof o=="number"),Function:a=>Hn(a),null:a=>a===null,undefined:a=>a===void 0},r={ColorType:a=>a==="none"||a==="label"||a==="primary"||a==="secondary"||a==="labelContrast"||a==="background"};return Object.keys(t).find(a=>{if(e[a]){const o=e[a],u=t[a];if(o.toBeTypes){if(o.toBeTypes.some(c=>n[c](u))===!1)return!0}else if(o.toBe){const{toBe:s,test:l}=o;if(l(u)===!1)return!0}else if(o.toBeOption){const s=o.toBeOption;if(r[s](u)===!1)return!0}}return!1})}function F(t,e){const n=ra(t,e);if(n){const r=e[n],i=r.toBeTypes?r.toBeTypes.join(" | "):r.toBe?r.toBe:r.toBeOption?r.toBeOption:"";return{status:"error",columnName:n,expectToBe:i}}else return{status:"success",columnName:"",expectToBe:""}}const ia=t=>{const e=F(t,{visibleFilter:{toBeTypes:["Function"]},sort:{toBeTypes:["Function","null"]},seriesLabels:{toBeTypes:["string[]"]},container:{toBeTypes:["object"]},separateSeries:{toBeTypes:["boolean"]},sumSeries:{toBeTypes:["boolean"]}});if(t.container){const n=F(t.container,{gap:{toBeTypes:["number"]},rowAmount:{toBeTypes:["number"]},columnAmount:{toBeTypes:["number"]}});if(n.status==="error")return n}return e};function te(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function aa(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function jn(t){let e,n,r;t.length!==2?(e=te,n=(u,s)=>te(t(u),s),r=(u,s)=>t(u)-s):(e=t===te||t===aa?t:oa,n=t,r=t);function i(u,s,l=0,c=u.length){if(l<c){if(e(s,s)!==0)return c;do{const f=l+c>>>1;n(u[f],s)<0?l=f+1:c=f}while(l<c)}return l}function a(u,s,l=0,c=u.length){if(l<c){if(e(s,s)!==0)return c;do{const f=l+c>>>1;n(u[f],s)<=0?l=f+1:c=f}while(l<c)}return l}function o(u,s,l=0,c=u.length){const f=i(u,s,l,c-1);return f>l&&r(u[f-1],s)>-r(u[f],s)?f-1:f}return{left:i,center:o,right:a}}function oa(){return 0}function ua(t){return t===null?NaN:+t}const qn=jn(te).right;jn(ua).center;class Wn extends Map{constructor(e,n=ca){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),e!=null)for(const[r,i]of e)this.set(r,i)}get(e){return super.get(Jn(this,e))}has(e){return super.has(Jn(this,e))}set(e,n){return super.set(sa(this,e),n)}delete(e){return super.delete(la(this,e))}}function Jn({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function sa({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function la({_intern:t,_key:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function ca(t){return t!==null&&typeof t=="object"?t.valueOf():t}const fa=Math.sqrt(50),ha=Math.sqrt(10),pa=Math.sqrt(2);function ee(t,e,n){const r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/Math.pow(10,i),o=a>=fa?10:a>=ha?5:a>=pa?2:1;let u,s,l;return i<0?(l=Math.pow(10,-i)/o,u=Math.round(t*l),s=Math.round(e*l),u/l<t&&++u,s/l>e&&--s,l=-l):(l=Math.pow(10,i)*o,u=Math.round(t/l),s=Math.round(e/l),u*l<t&&++u,s*l>e&&--s),s<u&&.5<=n&&n<2?ee(t,e,n*2):[u,s,l]}function da(t,e,n){if(e=+e,t=+t,n=+n,!(n>0))return[];if(t===e)return[t];const r=e<t,[i,a,o]=r?ee(e,t,n):ee(t,e,n);if(!(a>=i))return[];const u=a-i+1,s=new Array(u);if(r)if(o<0)for(let l=0;l<u;++l)s[l]=(a-l)/-o;else for(let l=0;l<u;++l)s[l]=(a-l)*o;else if(o<0)for(let l=0;l<u;++l)s[l]=(i+l)/-o;else for(let l=0;l<u;++l)s[l]=(i+l)*o;return s}function Ve(t,e,n){return e=+e,t=+t,n=+n,ee(t,e,n)[2]}function ma(t,e,n){e=+e,t=+t,n=+n;const r=e<t,i=r?Ve(e,t,n):Ve(t,e,n);return(r?-1:1)*(i<0?1/-i:i)}function ga(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((e-t)/n))|0,a=new Array(i);++r<i;)a[r]=t+r*n;return a}var ya={value:()=>{}};function Kn(){for(var t=0,e=arguments.length,n={},r;t<e;++t){if(!(r=arguments[t]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new ne(n)}function ne(t){this._=t}function va(t,e){return t.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&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}ne.prototype=Kn.prototype={constructor:ne,on:function(t,e){var n=this._,r=va(t+"",n),i,a=-1,o=r.length;if(arguments.length<2){for(;++a<o;)if((i=(t=r[a]).type)&&(i=ba(n[i],t.name)))return i;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++a<o;)if(i=(t=r[a]).type)n[i]=Zn(n[i],t.name,e);else if(e==null)for(i in n)n[i]=Zn(n[i],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new ne(t)},call:function(t,e){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,a;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=this._[t],r=0,i=a.length;r<i;++r)a[r].value.apply(e,n)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,a=r.length;i<a;++i)r[i].value.apply(e,n)}};function ba(t,e){for(var n=0,r=t.length,i;n<r;++n)if((i=t[n]).name===e)return i.value}function Zn(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=ya,t=t.slice(0,r).concat(t.slice(r+1));break}return n!=null&&t.push({name:e,value:n}),t}var Ge="http://www.w3.org/1999/xhtml";const Qn={svg:"http://www.w3.org/2000/svg",xhtml:Ge,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function re(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),Qn.hasOwnProperty(e)?{space:Qn[e],local:t}:t}function wa(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Ge&&e.documentElement.namespaceURI===Ge?e.createElement(t):e.createElementNS(n,t)}}function Da(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function tr(t){var e=re(t);return(e.local?Da:wa)(e)}function xa(){}function Xe(t){return t==null?xa:function(){return this.querySelector(t)}}function _a(t){typeof t!="function"&&(t=Xe(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a=e[i],o=a.length,u=r[i]=new Array(o),s,l,c=0;c<o;++c)(s=a[c])&&(l=t.call(s,s.__data__,c,a))&&("__data__"in s&&(l.__data__=s.__data__),u[c]=l);return new z(r,this._parents)}function $a(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function Aa(){return[]}function er(t){return t==null?Aa:function(){return this.querySelectorAll(t)}}function Ta(t){return function(){return $a(t.apply(this,arguments))}}function Sa(t){typeof t=="function"?t=Ta(t):t=er(t);for(var e=this._groups,n=e.length,r=[],i=[],a=0;a<n;++a)for(var o=e[a],u=o.length,s,l=0;l<u;++l)(s=o[l])&&(r.push(t.call(s,s.__data__,l,o)),i.push(s));return new z(r,i)}function nr(t){return function(){return this.matches(t)}}function rr(t){return function(e){return e.matches(t)}}var Ma=Array.prototype.find;function Ca(t){return function(){return Ma.call(this.children,t)}}function Fa(){return this.firstElementChild}function La(t){return this.select(t==null?Fa:Ca(typeof t=="function"?t:rr(t)))}var Ea=Array.prototype.filter;function Oa(){return Array.from(this.children)}function Pa(t){return function(){return Ea.call(this.children,t)}}function Ra(t){return this.selectAll(t==null?Oa:Pa(typeof t=="function"?t:rr(t)))}function Ia(t){typeof t!="function"&&(t=nr(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a=e[i],o=a.length,u=r[i]=[],s,l=0;l<o;++l)(s=a[l])&&t.call(s,s.__data__,l,a)&&u.push(s);return new z(r,this._parents)}function ir(t){return new Array(t.length)}function ka(){return new z(this._enter||this._groups.map(ir),this._parents)}function ie(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}ie.prototype={constructor:ie,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function Na(t){return function(){return t}}function Ba(t,e,n,r,i,a){for(var o=0,u,s=e.length,l=a.length;o<l;++o)(u=e[o])?(u.__data__=a[o],r[o]=u):n[o]=new ie(t,a[o]);for(;o<s;++o)(u=e[o])&&(i[o]=u)}function Va(t,e,n,r,i,a,o){var u,s,l=new Map,c=e.length,f=a.length,h=new Array(c),p;for(u=0;u<c;++u)(s=e[u])&&(h[u]=p=o.call(s,s.__data__,u,e)+"",l.has(p)?i[u]=s:l.set(p,s));for(u=0;u<f;++u)p=o.call(t,a[u],u,a)+"",(s=l.get(p))?(r[u]=s,s.__data__=a[u],l.delete(p)):n[u]=new ie(t,a[u]);for(u=0;u<c;++u)(s=e[u])&&l.get(h[u])===s&&(i[u]=s)}function Ga(t){return t.__data__}function Xa(t,e){if(!arguments.length)return Array.from(this,Ga);var n=e?Va:Ba,r=this._parents,i=this._groups;typeof t!="function"&&(t=Na(t));for(var a=i.length,o=new Array(a),u=new Array(a),s=new Array(a),l=0;l<a;++l){var c=r[l],f=i[l],h=f.length,p=Ya(t.call(c,c&&c.__data__,l,r)),d=p.length,m=u[l]=new Array(d),b=o[l]=new Array(d),_=s[l]=new Array(h);n(c,f,m,b,_,p,e);for(var T=0,$=0,E,A;T<d;++T)if(E=m[T]){for(T>=$&&($=T+1);!(A=b[$])&&++$<d;);E._next=A||null}}return o=new z(o,r),o._enter=u,o._exit=s,o}function Ya(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function Ua(){return new z(this._exit||this._groups.map(ir),this._parents)}function Ha(t,e,n){var r=this.enter(),i=this,a=this.exit();return typeof t=="function"?(r=t(r),r&&(r=r.selection())):r=r.append(t+""),e!=null&&(i=e(i),i&&(i=i.selection())),n==null?a.remove():n(a),r&&i?r.merge(i).order():i}function za(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,a=r.length,o=Math.min(i,a),u=new Array(i),s=0;s<o;++s)for(var l=n[s],c=r[s],f=l.length,h=u[s]=new Array(f),p,d=0;d<f;++d)(p=l[d]||c[d])&&(h[d]=p);for(;s<i;++s)u[s]=n[s];return new z(u,this._parents)}function ja(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r=t[e],i=r.length-1,a=r[i],o;--i>=0;)(o=r[i])&&(a&&o.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(o,a),a=o);return this}function qa(t){t||(t=Wa);function e(f,h){return f&&h?t(f.__data__,h.__data__):!f-!h}for(var n=this._groups,r=n.length,i=new Array(r),a=0;a<r;++a){for(var o=n[a],u=o.length,s=i[a]=new Array(u),l,c=0;c<u;++c)(l=o[c])&&(s[c]=l);s.sort(e)}return new z(i,this._parents).order()}function Wa(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function Ja(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function Ka(){return Array.from(this)}function Za(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,a=r.length;i<a;++i){var o=r[i];if(o)return o}return null}function Qa(){let t=0;for(const e of this)++t;return t}function to(){return!this.node()}function eo(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i=e[n],a=0,o=i.length,u;a<o;++a)(u=i[a])&&t.call(u,u.__data__,a,i);return this}function no(t){return function(){this.removeAttribute(t)}}function ro(t){return function(){this.removeAttributeNS(t.space,t.local)}}function io(t,e){return function(){this.setAttribute(t,e)}}function ao(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function oo(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function uo(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function so(t,e){var n=re(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((e==null?n.local?ro:no:typeof e=="function"?n.local?uo:oo:n.local?ao:io)(n,e))}function ar(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function lo(t){return function(){this.style.removeProperty(t)}}function co(t,e,n){return function(){this.style.setProperty(t,e,n)}}function fo(t,e,n){return function(){var r=e.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function ho(t,e,n){return arguments.length>1?this.each((e==null?lo:typeof e=="function"?fo:co)(t,e,n??"")):At(this.node(),t)}function At(t,e){return t.style.getPropertyValue(e)||ar(t).getComputedStyle(t,null).getPropertyValue(e)}function po(t){return function(){delete this[t]}}function mo(t,e){return function(){this[t]=e}}function go(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function yo(t,e){return arguments.length>1?this.each((e==null?po:typeof e=="function"?go:mo)(t,e)):this.node()[t]}function or(t){return t.trim().split(/^|\s+/)}function Ye(t){return t.classList||new ur(t)}function ur(t){this._node=t,this._names=or(t.getAttribute("class")||"")}ur.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function sr(t,e){for(var n=Ye(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function lr(t,e){for(var n=Ye(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function vo(t){return function(){sr(this,t)}}function bo(t){return function(){lr(this,t)}}function wo(t,e){return function(){(e.apply(this,arguments)?sr:lr)(this,t)}}function Do(t,e){var n=or(t+"");if(arguments.length<2){for(var r=Ye(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof e=="function"?wo:e?vo:bo)(n,e))}function xo(){this.textContent=""}function _o(t){return function(){this.textContent=t}}function $o(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function Ao(t){return arguments.length?this.each(t==null?xo:(typeof t=="function"?$o:_o)(t)):this.node().textContent}function To(){this.innerHTML=""}function So(t){return function(){this.innerHTML=t}}function Mo(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function Co(t){return arguments.length?this.each(t==null?To:(typeof t=="function"?Mo:So)(t)):this.node().innerHTML}function Fo(){this.nextSibling&&this.parentNode.appendChild(this)}function Lo(){return this.each(Fo)}function Eo(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Oo(){return this.each(Eo)}function Po(t){var e=typeof t=="function"?t:tr(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function Ro(){return null}function Io(t,e){var n=typeof t=="function"?t:tr(t),r=e==null?Ro:typeof e=="function"?e:Xe(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function ko(){var t=this.parentNode;t&&t.removeChild(this)}function No(){return this.each(ko)}function Bo(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Vo(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Go(t){return this.select(t?Vo:Bo)}function Xo(t){return arguments.length?this.property("__data__",t):this.node().__data__}function Yo(t){return function(e){t.call(this,e,this.__data__)}}function Uo(t){return t.trim().split(/^|\s+/).map(function(e){var n="",r=e.indexOf(".");return r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),{type:e,name:n}})}function Ho(t){return function(){var e=this.__on;if(e){for(var n=0,r=-1,i=e.length,a;n<i;++n)a=e[n],(!t.type||a.type===t.type)&&a.name===t.name?this.removeEventListener(a.type,a.listener,a.options):e[++r]=a;++r?e.length=r:delete this.__on}}}function zo(t,e,n){return function(){var r=this.__on,i,a=Yo(e);if(r){for(var o=0,u=r.length;o<u;++o)if((i=r[o]).type===t.type&&i.name===t.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=a,i.options=n),i.value=e;return}}this.addEventListener(t.type,a,n),i={type:t.type,name:t.name,value:e,listener:a,options:n},r?r.push(i):this.__on=[i]}}function jo(t,e,n){var r=Uo(t+""),i,a=r.length,o;if(arguments.length<2){var u=this.node().__on;if(u){for(var s=0,l=u.length,c;s<l;++s)for(i=0,c=u[s];i<a;++i)if((o=r[i]).type===c.type&&o.name===c.name)return c.value}return}for(u=e?zo:Ho,i=0;i<a;++i)this.each(u(r[i],e,n));return this}function cr(t,e,n){var r=ar(t),i=r.CustomEvent;typeof i=="function"?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function qo(t,e){return function(){return cr(this,t,e)}}function Wo(t,e){return function(){return cr(this,t,e.apply(this,arguments))}}function Jo(t,e){return this.each((typeof e=="function"?Wo:qo)(t,e))}function*Ko(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,a=r.length,o;i<a;++i)(o=r[i])&&(yield o)}var fr=[null];function z(t,e){this._groups=t,this._parents=e}function Vt(){return new z([[document.documentElement]],fr)}function Zo(){return this}z.prototype=Vt.prototype={constructor:z,select:_a,selectAll:Sa,selectChild:La,selectChildren:Ra,filter:Ia,data:Xa,enter:ka,exit:Ua,join:Ha,merge:za,selection:Zo,order:ja,sort:qa,call:Ja,nodes:Ka,node:Za,size:Qa,empty:to,each:eo,attr:so,style:ho,property:yo,classed:Do,text:Ao,html:Co,raise:Lo,lower:Oo,append:Po,insert:Io,remove:No,clone:Go,datum:Xo,on:jo,dispatch:Jo,[Symbol.iterator]:Ko};function ae(t){return typeof t=="string"?new z([[document.querySelector(t)]],[document.documentElement]):new z([[t]],fr)}function Ue(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function hr(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Gt(){}var Xt=.7,oe=1/Xt,Tt="\\s*([+-]?\\d+)\\s*",Yt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Q="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Qo=/^#([0-9a-f]{3,8})$/,tu=new RegExp(`^rgb\\(${Tt},${Tt},${Tt}\\)$`),eu=new RegExp(`^rgb\\(${Q},${Q},${Q}\\)$`),nu=new RegExp(`^rgba\\(${Tt},${Tt},${Tt},${Yt}\\)$`),ru=new RegExp(`^rgba\\(${Q},${Q},${Q},${Yt}\\)$`),iu=new RegExp(`^hsl\\(${Yt},${Q},${Q}\\)$`),au=new RegExp(`^hsla\\(${Yt},${Q},${Q},${Yt}\\)$`),pr={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};Ue(Gt,mt,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:dr,formatHex:dr,formatHex8:ou,formatHsl:uu,formatRgb:mr,toString:mr});function dr(){return this.rgb().formatHex()}function ou(){return this.rgb().formatHex8()}function uu(){return wr(this).formatHsl()}function mr(){return this.rgb().formatRgb()}function mt(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Qo.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?gr(e):n===3?new H(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?ue(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?ue(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=tu.exec(t))?new H(e[1],e[2],e[3],1):(e=eu.exec(t))?new H(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=nu.exec(t))?ue(e[1],e[2],e[3],e[4]):(e=ru.exec(t))?ue(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=iu.exec(t))?br(e[1],e[2]/100,e[3]/100,1):(e=au.exec(t))?br(e[1],e[2]/100,e[3]/100,e[4]):pr.hasOwnProperty(t)?gr(pr[t]):t==="transparent"?new H(NaN,NaN,NaN,0):null}function gr(t){return new H(t>>16&255,t>>8&255,t&255,1)}function ue(t,e,n,r){return r<=0&&(t=e=n=NaN),new H(t,e,n,r)}function su(t){return t instanceof Gt||(t=mt(t)),t?(t=t.rgb(),new H(t.r,t.g,t.b,t.opacity)):new H}function He(t,e,n,r){return arguments.length===1?su(t):new H(t,e,n,r??1)}function H(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}Ue(H,He,hr(Gt,{brighter(t){return t=t==null?oe:Math.pow(oe,t),new H(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?Xt:Math.pow(Xt,t),new H(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new H(gt(this.r),gt(this.g),gt(this.b),se(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:yr,formatHex:yr,formatHex8:lu,formatRgb:vr,toString:vr}));function yr(){return`#${yt(this.r)}${yt(this.g)}${yt(this.b)}`}function lu(){return`#${yt(this.r)}${yt(this.g)}${yt(this.b)}${yt((isNaN(this.opacity)?1:this.opacity)*255)}`}function vr(){const t=se(this.opacity);return`${t===1?"rgb(":"rgba("}${gt(this.r)}, ${gt(this.g)}, ${gt(this.b)}${t===1?")":`, ${t})`}`}function se(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function gt(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function yt(t){return t=gt(t),(t<16?"0":"")+t.toString(16)}function br(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new W(t,e,n,r)}function wr(t){if(t instanceof W)return new W(t.h,t.s,t.l,t.opacity);if(t instanceof Gt||(t=mt(t)),!t)return new W;if(t instanceof W)return t;t=t.rgb();var e=t.r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),a=Math.max(e,n,r),o=NaN,u=a-i,s=(a+i)/2;return u?(e===a?o=(n-r)/u+(n<r)*6:n===a?o=(r-e)/u+2:o=(e-n)/u+4,u/=s<.5?a+i:2-a-i,o*=60):u=s>0&&s<1?0:o,new W(o,u,s,t.opacity)}function cu(t,e,n,r){return arguments.length===1?wr(t):new W(t,e,n,r??1)}function W(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}Ue(W,cu,hr(Gt,{brighter(t){return t=t==null?oe:Math.pow(oe,t),new W(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Xt:Math.pow(Xt,t),new W(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new H(ze(t>=240?t-240:t+120,i,r),ze(t,i,r),ze(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new W(Dr(this.h),le(this.s),le(this.l),se(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 t=se(this.opacity);return`${t===1?"hsl(":"hsla("}${Dr(this.h)}, ${le(this.s)*100}%, ${le(this.l)*100}%${t===1?")":`, ${t})`}`}}));function Dr(t){return t=(t||0)%360,t<0?t+360:t}function le(t){return Math.max(0,Math.min(1,t||0))}function ze(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}const je=t=>()=>t;function fu(t,e){return function(n){return t+n*e}}function hu(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}function pu(t){return(t=+t)==1?xr:function(e,n){return n-e?hu(e,n,t):je(isNaN(e)?n:e)}}function xr(t,e){var n=e-t;return n?fu(t,n):je(isNaN(t)?e:t)}const ce=function t(e){var n=pu(e);function r(i,a){var o=n((i=He(i)).r,(a=He(a)).r),u=n(i.g,a.g),s=n(i.b,a.b),l=xr(i.opacity,a.opacity);return function(c){return i.r=o(c),i.g=u(c),i.b=s(c),i.opacity=l(c),i+""}}return r.gamma=t,r}(1);function du(t,e){e||(e=[]);var n=t?Math.min(e.length,t.length):0,r=e.slice(),i;return function(a){for(i=0;i<n;++i)r[i]=t[i]*(1-a)+e[i]*a;return r}}function mu(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function gu(t,e){var n=e?e.length:0,r=t?Math.min(n,t.length):0,i=new Array(r),a=new Array(n),o;for(o=0;o<r;++o)i[o]=Je(t[o],e[o]);for(;o<n;++o)a[o]=e[o];return function(u){for(o=0;o<r;++o)a[o]=i[o](u);return a}}function yu(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function J(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function vu(t,e){var n={},r={},i;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(i in e)i in t?n[i]=Je(t[i],e[i]):r[i]=e[i];return function(a){for(i in n)r[i]=n[i](a);return r}}var qe=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,We=new RegExp(qe.source,"g");function bu(t){return function(){return t}}function wu(t){return function(e){return t(e)+""}}function _r(t,e){var n=qe.lastIndex=We.lastIndex=0,r,i,a,o=-1,u=[],s=[];for(t=t+"",e=e+"";(r=qe.exec(t))&&(i=We.exec(e));)(a=i.index)>n&&(a=e.slice(n,a),u[o]?u[o]+=a:u[++o]=a),(r=r[0])===(i=i[0])?u[o]?u[o]+=i:u[++o]=i:(u[++o]=null,s.push({i:o,x:J(r,i)})),n=We.lastIndex;return n<e.length&&(a=e.slice(n),u[o]?u[o]+=a:u[++o]=a),u.length<2?s[0]?wu(s[0].x):bu(e):(e=s.length,function(l){for(var c=0,f;c<e;++c)u[(f=s[c]).i]=f.x(l);return u.join("")})}function Je(t,e){var n=typeof e,r;return e==null||n==="boolean"?je(e):(n==="number"?J:n==="string"?(r=mt(e))?(e=r,ce):_r:e instanceof mt?ce:e instanceof Date?yu:mu(e)?du:Array.isArray(e)?gu:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?vu:J)(t,e)}function Du(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var $r=180/Math.PI,Ke={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Ar(t,e,n,r,i,a){var o,u,s;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(s=t*n+e*r)&&(n-=t*s,r-=e*s),(u=Math.sqrt(n*n+r*r))&&(n/=u,r/=u,s/=u),t*r<e*n&&(t=-t,e=-e,s=-s,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(e,t)*$r,skewX:Math.atan(s)*$r,scaleX:o,scaleY:u}}var fe;function xu(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?Ke:Ar(e.a,e.b,e.c,e.d,e.e,e.f)}function _u(t){return t==null||(fe||(fe=document.createElementNS("http://www.w3.org/2000/svg","g")),fe.setAttribute("transform",t),!(t=fe.transform.baseVal.consolidate()))?Ke:(t=t.matrix,Ar(t.a,t.b,t.c,t.d,t.e,t.f))}function Tr(t,e,n,r){function i(l){return l.length?l.pop()+" ":""}function a(l,c,f,h,p,d){if(l!==f||c!==h){var m=p.push("translate(",null,e,null,n);d.push({i:m-4,x:J(l,f)},{i:m-2,x:J(c,h)})}else(f||h)&&p.push("translate("+f+e+h+n)}function o(l,c,f,h){l!==c?(l-c>180?c+=360:c-l>180&&(l+=360),h.push({i:f.push(i(f)+"rotate(",null,r)-2,x:J(l,c)})):c&&f.push(i(f)+"rotate("+c+r)}function u(l,c,f,h){l!==c?h.push({i:f.push(i(f)+"skewX(",null,r)-2,x:J(l,c)}):c&&f.push(i(f)+"skewX("+c+r)}function s(l,c,f,h,p,d){if(l!==f||c!==h){var m=p.push(i(p)+"scale(",null,",",null,")");d.push({i:m-4,x:J(l,f)},{i:m-2,x:J(c,h)})}else(f!==1||h!==1)&&p.push(i(p)+"scale("+f+","+h+")")}return function(l,c){var f=[],h=[];return l=t(l),c=t(c),a(l.translateX,l.translateY,c.translateX,c.translateY,f,h),o(l.rotate,c.rotate,f,h),u(l.skewX,c.skewX,f,h),s(l.scaleX,l.scaleY,c.scaleX,c.scaleY,f,h),l=c=null,function(p){for(var d=-1,m=h.length,b;++d<m;)f[(b=h[d]).i]=b.x(p);return f.join("")}}}var $u=Tr(xu,"px, ","px)","deg)"),Au=Tr(_u,", ",")",")"),St=0,Ut=0,Ht=0,Sr=1e3,he,zt,pe=0,vt=0,de=0,jt=typeof performance=="object"&&performance.now?performance:Date,Mr=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Ze(){return vt||(Mr(Tu),vt=jt.now()+de)}function Tu(){vt=0}function me(){this._call=this._time=this._next=null}me.prototype=Cr.prototype={constructor:me,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?Ze():+n)+(e==null?0:+e),!this._next&&zt!==this&&(zt?zt._next=this:he=this,zt=this),this._call=t,this._time=n,Qe()},stop:function(){this._call&&(this._call=null,this._time=1/0,Qe())}};function Cr(t,e,n){var r=new me;return r.restart(t,e,n),r}function Su(){Ze(),++St;for(var t=he,e;t;)(e=vt-t._time)>=0&&t._call.call(void 0,e),t=t._next;--St}function Fr(){vt=(pe=jt.now())+de,St=Ut=0;try{Su()}finally{St=0,Cu(),vt=0}}function Mu(){var t=jt.now(),e=t-pe;e>Sr&&(de-=e,pe=t)}function Cu(){for(var t,e=he,n,r=1/0;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:he=n);zt=t,Qe(r)}function Qe(t){if(!St){Ut&&(Ut=clearTimeout(Ut));var e=t-vt;e>24?(t<1/0&&(Ut=setTimeout(Fr,t-jt.now()-de)),Ht&&(Ht=clearInterval(Ht))):(Ht||(pe=jt.now(),Ht=setInterval(Mu,Sr)),St=1,Mr(Fr))}}function Lr(t,e,n){var r=new me;return e=e==null?0:+e,r.restart(i=>{r.stop(),t(i+e)},e,n),r}var Fu=Kn("start","end","cancel","interrupt"),Lu=[],Er=0,Or=1,tn=2,ge=3,Pr=4,en=5,ye=6;function ve(t,e,n,r,i,a){var o=t.__transition;if(!o)t.__transition={};else if(n in o)return;Eu(t,n,{name:e,index:r,group:i,on:Fu,tween:Lu,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:Er})}function nn(t,e){var n=K(t,e);if(n.state>Er)throw new Error("too late; already scheduled");return n}function tt(t,e){var n=K(t,e);if(n.state>ge)throw new Error("too late; already running");return n}function K(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function Eu(t,e,n){var r=t.__transition,i;r[e]=n,n.timer=Cr(a,0,n.time);function a(l){n.state=Or,n.timer.restart(o,n.delay,n.time),n.delay<=l&&o(l-n.delay)}function o(l){var c,f,h,p;if(n.state!==Or)return s();for(c in r)if(p=r[c],p.name===n.name){if(p.state===ge)return Lr(o);p.state===Pr?(p.state=ye,p.timer.stop(),p.on.call("interrupt",t,t.__data__,p.index,p.group),delete r[c]):+c<e&&(p.state=ye,p.timer.stop(),p.on.call("cancel",t,t.__data__,p.index,p.group),delete r[c])}if(Lr(function(){n.state===ge&&(n.state=Pr,n.timer.restart(u,n.delay,n.time),u(l))}),n.state=tn,n.on.call("start",t,t.__data__,n.index,n.group),n.state===tn){for(n.state=ge,i=new Array(h=n.tween.length),c=0,f=-1;c<h;++c)(p=n.tween[c].value.call(t,t.__data__,n.index,n.group))&&(i[++f]=p);i.length=f+1}}function u(l){for(var c=l<n.duration?n.ease.call(null,l/n.duration):(n.timer.restart(s),n.state=en,1),f=-1,h=i.length;++f<h;)i[f].call(t,c);n.state===en&&(n.on.call("end",t,t.__data__,n.index,n.group),s())}function s(){n.state=ye,n.timer.stop(),delete r[e];for(var l in r)return;delete t.__transition}}function Ou(t,e){var n=t.__transition,r,i,a=!0,o;if(n){e=e==null?null:e+"";for(o in n){if((r=n[o]).name!==e){a=!1;continue}i=r.state>tn&&r.state<en,r.state=ye,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete n[o]}a&&delete t.__transition}}function Pu(t){return this.each(function(){Ou(this,t)})}function Ru(t,e){var n,r;return function(){var i=tt(this,t),a=i.tween;if(a!==n){r=n=a;for(var o=0,u=r.length;o<u;++o)if(r[o].name===e){r=r.slice(),r.splice(o,1);break}}i.tween=r}}function Iu(t,e,n){var r,i;if(typeof n!="function")throw new Error;return function(){var a=tt(this,t),o=a.tween;if(o!==r){i=(r=o).slice();for(var u={name:e,value:n},s=0,l=i.length;s<l;++s)if(i[s].name===e){i[s]=u;break}s===l&&i.push(u)}a.tween=i}}function ku(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r=K(this.node(),n).tween,i=0,a=r.length,o;i<a;++i)if((o=r[i]).name===t)return o.value;return null}return this.each((e==null?Ru:Iu)(n,t,e))}function rn(t,e,n){var r=t._id;return t.each(function(){var i=tt(this,r);(i.value||(i.value={}))[e]=n.apply(this,arguments)}),function(i){return K(i,r).value[e]}}function Rr(t,e){var n;return(typeof e=="number"?J:e instanceof mt?ce:(n=mt(e))?(e=n,ce):_r)(t,e)}function Nu(t){return function(){this.removeAttribute(t)}}function Bu(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Vu(t,e,n){var r,i=n+"",a;return function(){var o=this.getAttribute(t);return o===i?null:o===r?a:a=e(r=o,n)}}function Gu(t,e,n){var r,i=n+"",a;return function(){var o=this.getAttributeNS(t.space,t.local);return o===i?null:o===r?a:a=e(r=o,n)}}function Xu(t,e,n){var r,i,a;return function(){var o,u=n(this),s;return u==null?void this.removeAttribute(t):(o=this.getAttribute(t),s=u+"",o===s?null:o===r&&s===i?a:(i=s,a=e(r=o,u)))}}function Yu(t,e,n){var r,i,a;return function(){var o,u=n(this),s;return u==null?void this.removeAttributeNS(t.space,t.local):(o=this.getAttributeNS(t.space,t.local),s=u+"",o===s?null:o===r&&s===i?a:(i=s,a=e(r=o,u)))}}function Uu(t,e){var n=re(t),r=n==="transform"?Au:Rr;return this.attrTween(t,typeof e=="function"?(n.local?Yu:Xu)(n,r,rn(this,"attr."+t,e)):e==null?(n.local?Bu:Nu)(n):(n.local?Gu:Vu)(n,r,e))}function Hu(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function zu(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function ju(t,e){var n,r;function i(){var a=e.apply(this,arguments);return a!==r&&(n=(r=a)&&zu(t,a)),n}return i._value=e,i}function qu(t,e){var n,r;function i(){var a=e.apply(this,arguments);return a!==r&&(n=(r=a)&&Hu(t,a)),n}return i._value=e,i}function Wu(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;var r=re(t);return this.tween(n,(r.local?ju:qu)(r,e))}function Ju(t,e){return function(){nn(this,t).delay=+e.apply(this,arguments)}}function Ku(t,e){return e=+e,function(){nn(this,t).delay=e}}function Zu(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?Ju:Ku)(e,t)):K(this.node(),e).delay}function Qu(t,e){return function(){tt(this,t).duration=+e.apply(this,arguments)}}function ts(t,e){return e=+e,function(){tt(this,t).duration=e}}function es(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?Qu:ts)(e,t)):K(this.node(),e).duration}function ns(t,e){if(typeof e!="function")throw new Error;return function(){tt(this,t).ease=e}}function rs(t){var e=this._id;return arguments.length?this.each(ns(e,t)):K(this.node(),e).ease}function is(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;tt(this,t).ease=n}}function as(t){if(typeof t!="function")throw new Error;return this.each(is(this._id,t))}function os(t){typeof t!="function"&&(t=nr(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a=e[i],o=a.length,u=r[i]=[],s,l=0;l<o;++l)(s=a[l])&&t.call(s,s.__data__,l,a)&&u.push(s);return new nt(r,this._parents,this._name,this._id)}function us(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,a=Math.min(r,i),o=new Array(r),u=0;u<a;++u)for(var s=e[u],l=n[u],c=s.length,f=o[u]=new Array(c),h,p=0;p<c;++p)(h=s[p]||l[p])&&(f[p]=h);for(;u<r;++u)o[u]=e[u];return new nt(o,this._parents,this._name,this._id)}function ss(t){return(t+"").trim().split(/^|\s+/).every(function(e){var n=e.indexOf(".");return n>=0&&(e=e.slice(0,n)),!e||e==="start"})}function ls(t,e,n){var r,i,a=ss(e)?nn:tt;return function(){var o=a(this,t),u=o.on;u!==r&&(i=(r=u).copy()).on(e,n),o.on=i}}function cs(t,e){var n=this._id;return arguments.length<2?K(this.node(),n).on.on(t):this.each(ls(n,t,e))}function fs(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function hs(){return this.on("end.remove",fs(this._id))}function ps(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Xe(t));for(var r=this._groups,i=r.length,a=new Array(i),o=0;o<i;++o)for(var u=r[o],s=u.length,l=a[o]=new Array(s),c,f,h=0;h<s;++h)(c=u[h])&&(f=t.call(c,c.__data__,h,u))&&("__data__"in c&&(f.__data__=c.__data__),l[h]=f,ve(l[h],e,n,h,l,K(c,n)));return new nt(a,this._parents,e,n)}function ds(t){var e=this._name,n=this._id;typeof t!="function"&&(t=er(t));for(var r=this._groups,i=r.length,a=[],o=[],u=0;u<i;++u)for(var s=r[u],l=s.length,c,f=0;f<l;++f)if(c=s[f]){for(var h=t.call(c,c.__data__,f,s),p,d=K(c,n),m=0,b=h.length;m<b;++m)(p=h[m])&&ve(p,e,n,m,h,d);a.push(h),o.push(c)}return new nt(a,o,e,n)}var ms=Vt.prototype.constructor;function gs(){return new ms(this._groups,this._parents)}function ys(t,e){var n,r,i;return function(){var a=At(this,t),o=(this.style.removeProperty(t),At(this,t));return a===o?null:a===n&&o===r?i:i=e(n=a,r=o)}}function Ir(t){return function(){this.style.removeProperty(t)}}function vs(t,e,n){var r,i=n+"",a;return function(){var o=At(this,t);return o===i?null:o===r?a:a=e(r=o,n)}}function bs(t,e,n){var r,i,a;return function(){var o=At(this,t),u=n(this),s=u+"";return u==null&&(s=u=(this.style.removeProperty(t),At(this,t))),o===s?null:o===r&&s===i?a:(i=s,a=e(r=o,u))}}function ws(t,e){var n,r,i,a="style."+e,o="end."+a,u;return function(){var s=tt(this,t),l=s.on,c=s.value[a]==null?u||(u=Ir(e)):void 0;(l!==n||i!==c)&&(r=(n=l).copy()).on(o,i=c),s.on=r}}function Ds(t,e,n){var r=(t+="")=="transform"?$u:Rr;return e==null?this.styleTween(t,ys(t,r)).on("end.style."+t,Ir(t)):typeof e=="function"?this.styleTween(t,bs(t,r,rn(this,"style."+t,e))).each(ws(this._id,t)):this.styleTween(t,vs(t,r,e),n).on("end.style."+t,null)}function xs(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function _s(t,e,n){var r,i;function a(){var o=e.apply(this,arguments);return o!==i&&(r=(i=o)&&xs(t,o,n)),r}return a._value=e,a}function $s(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error;return this.tween(r,_s(t,e,n??""))}function As(t){return function(){this.textContent=t}}function Ts(t){return function(){var e=t(this);this.textContent=e??""}}function Ss(t){return this.tween("text",typeof t=="function"?Ts(rn(this,"text",t)):As(t==null?"":t+""))}function Ms(t){return function(e){this.textContent=t.call(this,e)}}function Cs(t){var e,n;function r(){var i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&Ms(i)),e}return r._value=t,r}function Fs(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,Cs(t))}function Ls(){for(var t=this._name,e=this._id,n=kr(),r=this._groups,i=r.length,a=0;a<i;++a)for(var o=r[a],u=o.length,s,l=0;l<u;++l)if(s=o[l]){var c=K(s,e);ve(s,t,n,l,o,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new nt(r,this._parents,t,n)}function Es(){var t,e,n=this,r=n._id,i=n.size();return new Promise(function(a,o){var u={value:o},s={value:function(){--i===0&&a()}};n.each(function(){var l=tt(this,r),c=l.on;c!==t&&(e=(t=c).copy(),e._.cancel.push(u),e._.interrupt.push(u),e._.end.push(s)),l.on=e}),i===0&&a()})}var Os=0;function nt(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function kr(){return++Os}var rt=Vt.prototype;nt.prototype={constructor:nt,select:ps,selectAll:ds,selectChild:rt.selectChild,selectChildren:rt.selectChildren,filter:os,merge:us,selection:gs,transition:Ls,call:rt.call,nodes:rt.nodes,node:rt.node,size:rt.size,empty:rt.empty,each:rt.each,on:cs,attr:Uu,attrTween:Wu,style:Ds,styleTween:$s,text:Ss,textTween:Fs,remove:hs,tween:ku,delay:Zu,duration:es,ease:rs,easeVarying:as,end:Es,[Symbol.iterator]:rt[Symbol.iterator]};function Ps(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var Rs={time:null,delay:0,duration:250,ease:Ps};function Is(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}function ks(t){var e,n;t instanceof nt?(e=t._id,t=t._name):(e=kr(),(n=Rs).time=Ze(),t=t==null?null:t+"");for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var o=r[a],u=o.length,s,l=0;l<u;++l)(s=o[l])&&ve(s,t,e,l,o,n||Is(s,e));return new nt(r,this._parents,t,e)}Vt.prototype.interrupt=Pu,Vt.prototype.transition=ks;function Ns(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function be(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function Mt(t){return t=be(Math.abs(t)),t?t[1]:NaN}function Bs(t,e){return function(n,r){for(var i=n.length,a=[],o=0,u=t[0],s=0;i>0&&u>0&&(s+u+1>r&&(u=Math.max(1,r-s)),a.push(n.substring(i-=u,i+u)),!((s+=u+1)>r));)u=t[o=(o+1)%t.length];return a.reverse().join(e)}}function Vs(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var Gs=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function we(t){if(!(e=Gs.exec(t)))throw new Error("invalid format: "+t);var e;return new an({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}we.prototype=an.prototype;function an(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}an.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 Xs(t){t:for(var e=t.length,n=1,r=-1,i;n<e;++n)switch(t[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+t[n])break t;r>0&&(r=0);break}return r>0?t.slice(0,r)+t.slice(i+1):t}var Nr;function Ys(t,e){var n=be(t,e);if(!n)return t+"";var r=n[0],i=n[1],a=i-(Nr=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=r.length;return a===o?r:a>o?r+new Array(a-o+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+be(t,Math.max(0,e+a-1))[0]}function Br(t,e){var n=be(t,e);if(!n)return t+"";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 Vr={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:Ns,e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>Br(t*100,e),r:Br,s:Ys,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Gr(t){return t}var Xr=Array.prototype.map,Yr=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Us(t){var e=t.grouping===void 0||t.thousands===void 0?Gr:Bs(Xr.call(t.grouping,Number),t.thousands+""),n=t.currency===void 0?"":t.currency[0]+"",r=t.currency===void 0?"":t.currency[1]+"",i=t.decimal===void 0?".":t.decimal+"",a=t.numerals===void 0?Gr:Vs(Xr.call(t.numerals,String)),o=t.percent===void 0?"%":t.percent+"",u=t.minus===void 0?"−":t.minus+"",s=t.nan===void 0?"NaN":t.nan+"";function l(f){f=we(f);var h=f.fill,p=f.align,d=f.sign,m=f.symbol,b=f.zero,_=f.width,T=f.comma,$=f.precision,E=f.trim,A=f.type;A==="n"?(T=!0,A="g"):Vr[A]||($===void 0&&($=12),E=!0,A="g"),(b||h==="0"&&p==="=")&&(b=!0,h="0",p="=");var N=m==="$"?n:m==="#"&&/[boxX]/.test(A)?"0"+A.toLowerCase():"",X=m==="$"?r:/[%p]/.test(A)?o:"",k=Vr[A],w=/[defgprs%]/.test(A);$=$===void 0?6:/[gprs]/.test(A)?Math.max(1,Math.min(21,$)):Math.max(0,Math.min(20,$));function x(y){var S=N,C=X,B,dt,$t;if(A==="c")C=k(y)+C,y="";else{y=+y;var Z=y<0||1/y<0;if(y=isNaN(y)?s:k(Math.abs(y),$),E&&(y=Xs(y)),Z&&+y==0&&d!=="+"&&(Z=!1),S=(Z?d==="("?d:u:d==="-"||d==="("?"":d)+S,C=(A==="s"?Yr[8+Nr/3]:"")+C+(Z&&d==="("?")":""),w){for(B=-1,dt=y.length;++B<dt;)if($t=y.charCodeAt(B),48>$t||$t>57){C=($t===46?i+y.slice(B+1):y.slice(B))+C,y=y.slice(0,B);break}}}T&&!b&&(y=e(y,1/0));var Ce=S.length+y.length+C.length,at=Ce<_?new Array(_-Ce+1).join(h):"";switch(T&&b&&(y=e(at+y,at.length?_-C.length:1/0),at=""),p){case"<":y=S+y+C+at;break;case"=":y=S+at+y+C;break;case"^":y=at.slice(0,Ce=at.length>>1)+S+y+C+at.slice(Ce);break;default:y=at+S+y+C;break}return a(y)}return x.toString=function(){return f+""},x}function c(f,h){var p=l((f=we(f),f.type="f",f)),d=Math.max(-8,Math.min(8,Math.floor(Mt(h)/3)))*3,m=Math.pow(10,-d),b=Yr[8+d/3];return function(_){return p(m*_)+b}}return{format:l,formatPrefix:c}}var De,on,Ur;Hs({thousands:",",grouping:[3],currency:["$",""]});function Hs(t){return De=Us(t),on=De.format,Ur=De.formatPrefix,De}function zs(t){return Math.max(0,-Mt(Math.abs(t)))}function js(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Mt(e)/3)))*3-Mt(Math.abs(t)))}function qs(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Mt(e)-Mt(t))+1}function xe(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}const Hr=Symbol("implicit");function zr(){var t=new Wn,e=[],n=[],r=Hr;function i(a){let o=t.get(a);if(o===void 0){if(r!==Hr)return r;t.set(a,o=e.push(a)-1)}return n[o%n.length]}return i.domain=function(a){if(!arguments.length)return e.slice();e=[],t=new Wn;for(const o of a)t.has(o)||t.set(o,e.push(o)-1);return i},i.range=function(a){return arguments.length?(n=Array.from(a),i):n.slice()},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return zr(e,n).unknown(r)},xe.apply(i,arguments),i}function jr(){var t=zr().unknown(void 0),e=t.domain,n=t.range,r=0,i=1,a,o,u=!1,s=0,l=0,c=.5;delete t.unknown;function f(){var h=e().length,p=i<r,d=p?i:r,m=p?r:i;a=(m-d)/Math.max(1,h-s+l*2),u&&(a=Math.floor(a)),d+=(m-d-a*(h-s))*c,o=a*(1-s),u&&(d=Math.round(d),o=Math.round(o));var b=ga(h).map(function(_){return d+a*_});return n(p?b.reverse():b)}return t.domain=function(h){return arguments.length?(e(h),f()):e()},t.range=function(h){return arguments.length?([r,i]=h,r=+r,i=+i,f()):[r,i]},t.rangeRound=function(h){return[r,i]=h,r=+r,i=+i,u=!0,f()},t.bandwidth=function(){return o},t.step=function(){return a},t.round=function(h){return arguments.length?(u=!!h,f()):u},t.padding=function(h){return arguments.length?(s=Math.min(1,l=+h),f()):s},t.paddingInner=function(h){return arguments.length?(s=Math.min(1,h),f()):s},t.paddingOuter=function(h){return arguments.length?(l=+h,f()):l},t.align=function(h){return arguments.length?(c=Math.max(0,Math.min(1,h)),f()):c},t.copy=function(){return jr(e(),[r,i]).round(u).paddingInner(s).paddingOuter(l).align(c)},xe.apply(f(),arguments)}function qr(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return qr(e())},t}function Ws(){return qr(jr.apply(null,arguments).paddingInner(1))}function Js(t){return function(){return t}}function Ks(t){return+t}var Wr=[0,1];function Ct(t){return t}function un(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:Js(isNaN(e)?NaN:.5)}function Zs(t,e){var n;return t>e&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function Qs(t,e,n){var r=t[0],i=t[1],a=e[0],o=e[1];return i<r?(r=un(i,r),a=n(o,a)):(r=un(r,i),a=n(a,o)),function(u){return a(r(u))}}function tl(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),a=new Array(r),o=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++o<r;)i[o]=un(t[o],t[o+1]),a[o]=n(e[o],e[o+1]);return function(u){var s=qn(t,u,1,r)-1;return a[s](i[s](u))}}function el(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function nl(){var t=Wr,e=Wr,n=Je,r,i,a,o=Ct,u,s,l;function c(){var h=Math.min(t.length,e.length);return o!==Ct&&(o=Zs(t[0],t[h-1])),u=h>2?tl:Qs,s=l=null,f}function f(h){return h==null||isNaN(h=+h)?a:(s||(s=u(t.map(r),e,n)))(r(o(h)))}return f.invert=function(h){return o(i((l||(l=u(e,t.map(r),J)))(h)))},f.domain=function(h){return arguments.length?(t=Array.from(h,Ks),c()):t.slice()},f.range=function(h){return arguments.length?(e=Array.from(h),c()):e.slice()},f.rangeRound=function(h){return e=Array.from(h),n=Du,c()},f.clamp=function(h){return arguments.length?(o=h?!0:Ct,c()):o!==Ct},f.interpolate=function(h){return arguments.length?(n=h,c()):n},f.unknown=function(h){return arguments.length?(a=h,f):a},function(h,p){return r=h,i=p,c()}}function rl(){return nl()(Ct,Ct)}function il(t,e,n,r){var i=ma(t,e,n),a;switch(r=we(r??",f"),r.type){case"s":{var o=Math.max(Math.abs(t),Math.abs(e));return r.precision==null&&!isNaN(a=js(i,o))&&(r.precision=a),Ur(r,o)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(a=qs(i,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=a-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(a=zs(i))&&(r.precision=a-(r.type==="%")*2);break}}return on(r)}function Jr(t){var e=t.domain;return t.ticks=function(n){var r=e();return da(r[0],r[r.length-1],n??10)},t.tickFormat=function(n,r){var i=e();return il(i[0],i[i.length-1],n??10,r)},t.nice=function(n){n==null&&(n=10);var r=e(),i=0,a=r.length-1,o=r[i],u=r[a],s,l,c=10;for(u<o&&(l=o,o=u,u=l,l=i,i=a,a=l);c-- >0;){if(l=Ve(o,u,n),l===s)return r[i]=o,r[a]=u,e(r);if(l>0)o=Math.floor(o/l)*l,u=Math.ceil(u/l)*l;else if(l<0)o=Math.ceil(o*l)/l,u=Math.floor(u*l)/l;else break;s=l}return t},t}function qt(){var t=rl();return t.copy=function(){return el(t,qt())},xe.apply(t,arguments),Jr(t)}function Kr(){var t=0,e=1,n=1,r=[.5],i=[0,1],a;function o(s){return s!=null&&s<=s?i[qn(r,s,0,n)]:a}function u(){var s=-1;for(r=new Array(n);++s<n;)r[s]=((s+1)*e-(s-n)*t)/(n+1);return o}return o.domain=function(s){return arguments.length?([t,e]=s,t=+t,e=+e,u()):[t,e]},o.range=function(s){return arguments.length?(n=(i=Array.from(s)).length-1,u()):i.slice()},o.invertExtent=function(s){var l=i.indexOf(s);return l<0?[NaN,NaN]:l<1?[t,r[0]]:l>=n?[r[n-1],e]:[r[l-1],r[l]]},o.unknown=function(s){return arguments.length&&(a=s),o},o.thresholds=function(){return r.slice()},o.copy=function(){return Kr().domain([t,e]).range(i).unknown(a)},xe.apply(Jr(o),arguments)}function Wt(t,e,n){this.k=t,this.x=e,this.y=n}Wt.prototype={constructor:Wt,scale:function(t){return t===1?this:new Wt(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new Wt(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}},Wt.prototype;function al(t,e){return e instanceof Function?e(t):on(e)(t)}function Jt(t,e,n,r){let i=`${t}_${e}`;return n!=null&&(i+=`_${n}`),r!=null&&(i+=`_${r}`),i}function _e(t,e){return`${t}_series${e}`}function sn(t,e){return`${t}_group${e}`}function $e(){return""}function ln({transposedDataGrid:t,dataFormatterGrid:e,chartType:n="grid"}){const r=e.seriesDirection==="row"?e.rowLabels:e.columnLabels;return t.map((i,a)=>r[a]!=null?r[a]:_e(n,a))}function Zr({transposedDataGrid:t,dataFormatterGrid:e,chartType:n="multiGrid",gridIndex:r=0}){const i=e.seriesDirection==="row"?e.rowLabels:e.columnLabels;return t.map((a,o)=>i[o]!=null?i[o]:_e(`${n}_grid${r}`,o))}function Qr({transposedDataGrid:t,dataFormatterGrid:e,chartType:n="grid"}){if(t[0]==null)return[];const r=e.seriesDirection==="row"?e.columnLabels:e.rowLabels;return t[0].map((i,a)=>r[a]!=null?r[a]:sn(n,a))}function ti({transposedDataGrid:t,dataFormatterGrid:e,chartType:n="multiGrid",gridIndex:r=0}){if(t[0]==null)return[];const i=e.seriesDirection==="row"?e.columnLabels:e.rowLabels;return t[0].map((a,o)=>i[o]!=null?i[o]:sn(`${n}_grid${r}`,o))}function st(t){const e=[0,0];return t.length?t.reduce((r,i)=>[i<r[0]?i:r[0],i>r[1]?i:r[1]],[t[0],t[0]]):e}function ei(t){const e=t.filter(n=>n!=null&&n.value!=null).map(n=>n.value);return st(e)}function ol(t){const n=(t[0]&&Array.isArray(t[0])?t.flat():t).filter(r=>(r==null||U(r)&&r.value==null)===!1).map(r=>typeof r=="number"?r:r.value);return st(n)}function cn(t){const n=t.flat().filter(r=>(r==null||U(r)&&r.value==null)===!1).map(r=>typeof r=="number"?r:r.value);return st(n)}function ul(t){const n=t.flat().flat().filter(r=>(r==null||U(r)&&r.value==null)===!1).map(r=>typeof r=="number"?r:r.value);return st(n)}function sl(t,e){const n=t.map(r=>Array.isArray(r)?r[e]??null:U(r)?r.value[e]??null:null).filter(r=>r!=null);return st(n)}function ll({data:t,minX:e,maxX:n,minY:r,maxY:i}){let a=[],o=null,u=null,s=null,l=null;for(let c of t)for(let f of c)f.axisX>=e&&f.axisX<=n&&f.axisY>=r&&f.axisY<=i&&(a.push(c),(o==null||f.axisX<o.axisX)&&(o=f),(u==null||f.axisX>u.axisX)&&(u=f),(s==null||f.axisY<s.axisY)&&(s=f),(l==null||f.axisY>l.axisY)&&(l=f));return{minXDatum:o,maxXDatum:u,minYDatum:s,maxYDatum:l,filteredData:a}}function ni(t,e){if(t==="row")return Object.assign([],e);const n=e.length,r=e.reduce((a,o)=>Math.max(a,o.length),0),i=new Array(r).fill(null).map(()=>new Array(n).fill(null));for(let a=0;a<n;a++)for(let o=0;o<r;o++)i[o][a]=e[a][o];return i}function lt(t,e){return t<e.colors[e.colorScheme].label.length?e.colors[e.colorScheme].label[t]:e.colors[e.colorScheme].label[t%e.colors[e.colorScheme].label.length]}function ri(t){let e=Math.floor(Math.sqrt(t)),n=Math.ceil(t/e);for(;e*n<t;)n++;return{rowAmount:e,columnAmount:n}}function fn(t,e,n){const{gap:r}=e,{rowAmount:i,columnAmount:a}=e.rowAmount*e.columnAmount>=n?e:ri(n);return new Array(n).fill(null).map((o,u)=>{const s=u%a,l=Math.floor(u/a),c=(t.width-r*(a-1))/a,f=(t.height-r*(i-1))/i,h=s*c+s*r,p=l*f+l*r;return{slotIndex:u,rowIndex:l,columnIndex:s,startX:h,startY:p,centerX:h+c/2,centerY:p+f/2,width:c,height:f}})}function Ft(t,e,n){const{gap:r}=e,{rowAmount:i,columnAmount:a}=e.rowAmount*e.columnAmount>=n?e:ri(n);return new Array(n).fill(null).map((o,u)=>{const s=u%a,l=Math.floor(u/a),c=(t.width-r*(a-1))/a,f=(t.height-r*(i-1))/i,h=s*c+s*r,p=l*f+l*r,d=[h,p],m=[c/t.width,f/t.height];return{slotIndex:u,rowIndex:l,columnIndex:s,translate:d,scale:m}})}const cl=t=>{const{data:e=[],dataFormatter:n,chartParams:r}=t;if(!e.length)return[];let i=[];try{const a=(o,u,s,l)=>{const c=Jt(n.type,u,s),f=n.seriesLabels[u]||_e("series",u),h=lt(u,r);return typeof o=="number"?{id:c,index:l,seq:0,label:c,description:"",data:{},value:o,seriesIndex:u,seriesLabel:f,color:h,visible:!0}:{id:o.id?o.id:c,index:l,seq:0,label:o.label?o.label:c,description:o.description,data:o.data??{},value:o.value,seriesIndex:u,seriesLabel:f,color:h,visible:!0}};i=e.map((o,u)=>Array.isArray(o)?o.map((s,l)=>a(s,u,l,i.length+l)):a(o,u,0,i.length)).flat().sort(n.sort??void 0).map((o,u)=>(o.seq=u,o)).map(o=>(o.visible=n.visibleFilter(o,t),o)).sort((o,u)=>o.index-u.index).reduce((o,u)=>(o[u.seriesIndex]||(o[u.seriesIndex]=[]),o[u.seriesIndex].push(u),o),[])}catch(a){throw Error(a)}return i},fl=t=>F({data:t},{data:{toBe:"(DataSeriesDatum | DataSeriesValue)[][] | (DataSeriesDatum | DataSeriesValue)[]",test:n=>Array.isArray(n)}});var hn=function(t,e){return hn=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},hn(t,e)};function et(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");hn(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}function hl(t,e,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function u(c){try{l(r.next(c))}catch(f){o(f)}}function s(c){try{l(r.throw(c))}catch(f){o(f)}}function l(c){c.done?a(c.value):i(c.value).then(u,s)}l((r=r.apply(t,e||[])).next())})}function ii(t,e){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return o.next=u(0),o.throw=u(1),o.return=u(2),typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function u(l){return function(c){return s([l,c])}}function s(l){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,l[0]&&(n=0)),n;)try{if(r=1,i&&(a=l[0]&2?i.return:l[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,l[1])).done)return a;switch(i=0,a&&(l=[l[0]&2,a.value]),l[0]){case 0:case 1:a=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!a||l[1]>a[0]&&l[1]<a[3])){n.label=l[1];break}if(l[0]===6&&n.label<a[1]){n.label=a[1],a=l;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(l);break}a[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(c){l=[6,c],i=0}finally{r=a=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function Lt(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function ct(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,a=[],o;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(u){o={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function ft(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,a;r<i;r++)(a||!(r in e))&&(a||(a=Array.prototype.slice.call(e,0,r)),a[r]=e[r]);return t.concat(a||Array.prototype.slice.call(e))}function Et(t){return this instanceof Et?(this.v=t,this):new Et(t)}function pl(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(t,e||[]),i,a=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),u("next"),u("throw"),u("return",o),i[Symbol.asyncIterator]=function(){return this},i;function o(p){return function(d){return Promise.resolve(d).then(p,f)}}function u(p,d){r[p]&&(i[p]=function(m){return new Promise(function(b,_){a.push([p,m,b,_])>1||s(p,m)})},d&&(i[p]=d(i[p])))}function s(p,d){try{l(r[p](d))}catch(m){h(a[0][3],m)}}function l(p){p.value instanceof Et?Promise.resolve(p.value.v).then(c,f):h(a[0][2],p)}function c(p){s("next",p)}function f(p){s("throw",p)}function h(p,d){p(d),a.shift(),a.length&&s(a[0][0],a[0][1])}}function dl(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],n;return e?e.call(t):(t=typeof Lt=="function"?Lt(t):t[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(a){n[a]=t[a]&&function(o){return new Promise(function(u,s){o=t[a](o),i(u,s,o.done,o.value)})}}function i(a,o,u,s){Promise.resolve(s).then(function(l){a({value:l,done:u})},o)}}typeof SuppressedError=="function"&&SuppressedError;function I(t){return typeof t=="function"}function pn(t){var e=function(r){Error.call(r),r.stack=new Error().stack},n=t(e);return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var dn=pn(function(t){return function(n){t(this),this.message=n?n.length+` errors occurred during unsubscription:
|
1
|
+
(function(g,ot){typeof exports=="object"&&typeof module<"u"?ot(exports):typeof define=="function"&&define.amd?define(["exports"],ot):(g=typeof globalThis<"u"?globalThis:g||self,ot(g["orbcharts-core"]={}))})(this,function(g){"use strict";const ot={width:"auto",height:"auto"},Fe={top:60,right:60,bottom:60,left:60},Le={padding:Fe,highlightTarget:"datum",highlightDefault:null,colorScheme:"light",colors:{light:{label:["#6CBAFF","#FF6C6C","#F9B052","#7DD3C4","#AA93D2","#0088FF","#FFBABA","#86DC72","#EF76FF","#C4C4C4"],primary:"#1b1e23",secondary:"#e1e1e1",labelContrast:["#ffffff","#1b1e23"],background:"#ffffff"},dark:{label:["#6CBAFF","#FF6C6C","#F9B052","#7DD3C4","#AA93D2","#0088FF","#FFBABA","#86DC72","#EF76FF","#C4C4C4"],primary:"#f0f0f0",secondary:"#e1e1e1",labelContrast:["#ffffff","#1b1e23"],background:"#000000"}},styles:{textSize:"0.875rem",unhighlightedOpacity:.3},transitionDuration:800,transitionEase:"easeCubic"},Xn=800,Yn=500,Ji=[],Ki=[],Zi=[],Qi=[],ta=[],ea={nodes:[],edges:[]},Y={position:"left",scaleDomain:["auto","auto"],scaleRange:[0,.9],label:""},Un={position:"bottom",scaleDomain:[0,"max"],scalePadding:.5,label:""},Ee={scaleDomain:["auto","auto"],scaleRange:[0,.9],label:""},Nt={gap:120,rowAmount:1,columnAmount:1},Oe={type:"series",visibleFilter:(t,e)=>!0,sort:null,seriesLabels:[],container:{...Nt},separateSeries:!1,sumSeries:!1};Oe.visibleFilter.toString=()=>"(datum, context) => true";const Pe={seriesDirection:"row",rowLabels:[],columnLabels:[],valueAxis:{...Y},groupAxis:{...Un},separateSeries:!1},Re={type:"grid",visibleFilter:(t,e)=>!0,...Pe,container:{...Nt}};Re.visibleFilter.toString=()=>"(datum, context) => true";const Bt={...Pe},Ie={type:"multiGrid",visibleFilter:(t,e)=>!0,gridList:[{...Bt}],separateGrid:!1,container:{...Nt}};Ie.visibleFilter.toString=()=>"(datum, context) => true";const ke={type:"multiValue",visibleFilter:(t,e)=>!0,categoryLabels:[],xAxis:{...Ee},yAxis:{...Ee},container:{...Nt},separateCategory:!1};ke.visibleFilter.toString=()=>"(datum, context) => true";const Ne={type:"tree",visibleFilter:(t,e)=>!0,categoryLabels:[]};Ne.visibleFilter.toString=()=>"(datum, context) => true";const Be={type:"relationship",visibleFilter:(t,e)=>!0,categoryLabels:[]};Be.visibleFilter.toString=()=>"(datum, context) => true";function U(t){return Object.prototype.toString.call(t)==="[object Object]"}function Hn(t){return Object.prototype.toString.call(t)==="[object Function]"}function zn(t){return!!(t&&t.nodeType)}function ut(t,e){if(U(t)===!1||U(e)===!1)return Object.assign({},e);const n=(r,i)=>{const a=Object.assign({},i);for(let o of Object.keys(r)){if(!(o in i))continue;let u;U(r[o])&&U(i[o])?(u=n(r[o],i[o]),a[o]=u):a[o]=r[o]}return a};return n(t,e)}function na(t=0){try{let e=t.toString().split(".");return e[0]=e[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),e.join(".")}catch(e){console.error(e)}}function ra(t,e){const n={string:a=>typeof a=="string",number:a=>typeof a=="number",boolean:a=>typeof a=="boolean",object:a=>U(a),"object[]":a=>Array.isArray(a)&&a.every(o=>U(o)),"string[]":a=>Array.isArray(a)&&a.every(o=>typeof o=="string"),"number[]":a=>Array.isArray(a)&&a.every(o=>typeof o=="number"),Function:a=>Hn(a),null:a=>a===null,undefined:a=>a===void 0},r={ColorType:a=>a==="none"||a==="label"||a==="primary"||a==="secondary"||a==="labelContrast"||a==="background"};return Object.keys(t).find(a=>{if(e[a]){const o=e[a],u=t[a];if(o.toBeTypes){if(o.toBeTypes.some(c=>n[c](u))===!1)return!0}else if(o.toBe){const{toBe:s,test:l}=o;if(l(u)===!1)return!0}else if(o.toBeOption){const s=o.toBeOption;if(r[s](u)===!1)return!0}}return!1})}function F(t,e){const n=ra(t,e);if(n){const r=e[n],i=r.toBeTypes?r.toBeTypes.join(" | "):r.toBe?r.toBe:r.toBeOption?r.toBeOption:"";return{status:"error",columnName:n,expectToBe:i}}else return{status:"success",columnName:"",expectToBe:""}}const ia=t=>{const e=F(t,{visibleFilter:{toBeTypes:["Function"]},sort:{toBeTypes:["Function","null"]},seriesLabels:{toBeTypes:["string[]"]},container:{toBeTypes:["object"]},separateSeries:{toBeTypes:["boolean"]},sumSeries:{toBeTypes:["boolean"]}});if(t.container){const n=F(t.container,{gap:{toBeTypes:["number"]},rowAmount:{toBeTypes:["number"]},columnAmount:{toBeTypes:["number"]}});if(n.status==="error")return n}return e};function te(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function aa(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function jn(t){let e,n,r;t.length!==2?(e=te,n=(u,s)=>te(t(u),s),r=(u,s)=>t(u)-s):(e=t===te||t===aa?t:oa,n=t,r=t);function i(u,s,l=0,c=u.length){if(l<c){if(e(s,s)!==0)return c;do{const f=l+c>>>1;n(u[f],s)<0?l=f+1:c=f}while(l<c)}return l}function a(u,s,l=0,c=u.length){if(l<c){if(e(s,s)!==0)return c;do{const f=l+c>>>1;n(u[f],s)<=0?l=f+1:c=f}while(l<c)}return l}function o(u,s,l=0,c=u.length){const f=i(u,s,l,c-1);return f>l&&r(u[f-1],s)>-r(u[f],s)?f-1:f}return{left:i,center:o,right:a}}function oa(){return 0}function ua(t){return t===null?NaN:+t}const qn=jn(te).right;jn(ua).center;class Wn extends Map{constructor(e,n=ca){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),e!=null)for(const[r,i]of e)this.set(r,i)}get(e){return super.get(Jn(this,e))}has(e){return super.has(Jn(this,e))}set(e,n){return super.set(sa(this,e),n)}delete(e){return super.delete(la(this,e))}}function Jn({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function sa({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function la({_intern:t,_key:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function ca(t){return t!==null&&typeof t=="object"?t.valueOf():t}const fa=Math.sqrt(50),ha=Math.sqrt(10),pa=Math.sqrt(2);function ee(t,e,n){const r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/Math.pow(10,i),o=a>=fa?10:a>=ha?5:a>=pa?2:1;let u,s,l;return i<0?(l=Math.pow(10,-i)/o,u=Math.round(t*l),s=Math.round(e*l),u/l<t&&++u,s/l>e&&--s,l=-l):(l=Math.pow(10,i)*o,u=Math.round(t/l),s=Math.round(e/l),u*l<t&&++u,s*l>e&&--s),s<u&&.5<=n&&n<2?ee(t,e,n*2):[u,s,l]}function da(t,e,n){if(e=+e,t=+t,n=+n,!(n>0))return[];if(t===e)return[t];const r=e<t,[i,a,o]=r?ee(e,t,n):ee(t,e,n);if(!(a>=i))return[];const u=a-i+1,s=new Array(u);if(r)if(o<0)for(let l=0;l<u;++l)s[l]=(a-l)/-o;else for(let l=0;l<u;++l)s[l]=(a-l)*o;else if(o<0)for(let l=0;l<u;++l)s[l]=(i+l)/-o;else for(let l=0;l<u;++l)s[l]=(i+l)*o;return s}function Ve(t,e,n){return e=+e,t=+t,n=+n,ee(t,e,n)[2]}function ma(t,e,n){e=+e,t=+t,n=+n;const r=e<t,i=r?Ve(e,t,n):Ve(t,e,n);return(r?-1:1)*(i<0?1/-i:i)}function ga(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((e-t)/n))|0,a=new Array(i);++r<i;)a[r]=t+r*n;return a}var ya={value:()=>{}};function Kn(){for(var t=0,e=arguments.length,n={},r;t<e;++t){if(!(r=arguments[t]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new ne(n)}function ne(t){this._=t}function va(t,e){return t.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&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}ne.prototype=Kn.prototype={constructor:ne,on:function(t,e){var n=this._,r=va(t+"",n),i,a=-1,o=r.length;if(arguments.length<2){for(;++a<o;)if((i=(t=r[a]).type)&&(i=ba(n[i],t.name)))return i;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++a<o;)if(i=(t=r[a]).type)n[i]=Zn(n[i],t.name,e);else if(e==null)for(i in n)n[i]=Zn(n[i],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new ne(t)},call:function(t,e){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,a;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=this._[t],r=0,i=a.length;r<i;++r)a[r].value.apply(e,n)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,a=r.length;i<a;++i)r[i].value.apply(e,n)}};function ba(t,e){for(var n=0,r=t.length,i;n<r;++n)if((i=t[n]).name===e)return i.value}function Zn(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=ya,t=t.slice(0,r).concat(t.slice(r+1));break}return n!=null&&t.push({name:e,value:n}),t}var Ge="http://www.w3.org/1999/xhtml";const Qn={svg:"http://www.w3.org/2000/svg",xhtml:Ge,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function re(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),Qn.hasOwnProperty(e)?{space:Qn[e],local:t}:t}function wa(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Ge&&e.documentElement.namespaceURI===Ge?e.createElement(t):e.createElementNS(n,t)}}function Da(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function tr(t){var e=re(t);return(e.local?Da:wa)(e)}function xa(){}function Xe(t){return t==null?xa:function(){return this.querySelector(t)}}function _a(t){typeof t!="function"&&(t=Xe(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a=e[i],o=a.length,u=r[i]=new Array(o),s,l,c=0;c<o;++c)(s=a[c])&&(l=t.call(s,s.__data__,c,a))&&("__data__"in s&&(l.__data__=s.__data__),u[c]=l);return new z(r,this._parents)}function $a(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function Aa(){return[]}function er(t){return t==null?Aa:function(){return this.querySelectorAll(t)}}function Ta(t){return function(){return $a(t.apply(this,arguments))}}function Sa(t){typeof t=="function"?t=Ta(t):t=er(t);for(var e=this._groups,n=e.length,r=[],i=[],a=0;a<n;++a)for(var o=e[a],u=o.length,s,l=0;l<u;++l)(s=o[l])&&(r.push(t.call(s,s.__data__,l,o)),i.push(s));return new z(r,i)}function nr(t){return function(){return this.matches(t)}}function rr(t){return function(e){return e.matches(t)}}var Ma=Array.prototype.find;function Ca(t){return function(){return Ma.call(this.children,t)}}function Fa(){return this.firstElementChild}function La(t){return this.select(t==null?Fa:Ca(typeof t=="function"?t:rr(t)))}var Ea=Array.prototype.filter;function Oa(){return Array.from(this.children)}function Pa(t){return function(){return Ea.call(this.children,t)}}function Ra(t){return this.selectAll(t==null?Oa:Pa(typeof t=="function"?t:rr(t)))}function Ia(t){typeof t!="function"&&(t=nr(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a=e[i],o=a.length,u=r[i]=[],s,l=0;l<o;++l)(s=a[l])&&t.call(s,s.__data__,l,a)&&u.push(s);return new z(r,this._parents)}function ir(t){return new Array(t.length)}function ka(){return new z(this._enter||this._groups.map(ir),this._parents)}function ie(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}ie.prototype={constructor:ie,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function Na(t){return function(){return t}}function Ba(t,e,n,r,i,a){for(var o=0,u,s=e.length,l=a.length;o<l;++o)(u=e[o])?(u.__data__=a[o],r[o]=u):n[o]=new ie(t,a[o]);for(;o<s;++o)(u=e[o])&&(i[o]=u)}function Va(t,e,n,r,i,a,o){var u,s,l=new Map,c=e.length,f=a.length,h=new Array(c),p;for(u=0;u<c;++u)(s=e[u])&&(h[u]=p=o.call(s,s.__data__,u,e)+"",l.has(p)?i[u]=s:l.set(p,s));for(u=0;u<f;++u)p=o.call(t,a[u],u,a)+"",(s=l.get(p))?(r[u]=s,s.__data__=a[u],l.delete(p)):n[u]=new ie(t,a[u]);for(u=0;u<c;++u)(s=e[u])&&l.get(h[u])===s&&(i[u]=s)}function Ga(t){return t.__data__}function Xa(t,e){if(!arguments.length)return Array.from(this,Ga);var n=e?Va:Ba,r=this._parents,i=this._groups;typeof t!="function"&&(t=Na(t));for(var a=i.length,o=new Array(a),u=new Array(a),s=new Array(a),l=0;l<a;++l){var c=r[l],f=i[l],h=f.length,p=Ya(t.call(c,c&&c.__data__,l,r)),d=p.length,m=u[l]=new Array(d),b=o[l]=new Array(d),_=s[l]=new Array(h);n(c,f,m,b,_,p,e);for(var T=0,$=0,E,A;T<d;++T)if(E=m[T]){for(T>=$&&($=T+1);!(A=b[$])&&++$<d;);E._next=A||null}}return o=new z(o,r),o._enter=u,o._exit=s,o}function Ya(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function Ua(){return new z(this._exit||this._groups.map(ir),this._parents)}function Ha(t,e,n){var r=this.enter(),i=this,a=this.exit();return typeof t=="function"?(r=t(r),r&&(r=r.selection())):r=r.append(t+""),e!=null&&(i=e(i),i&&(i=i.selection())),n==null?a.remove():n(a),r&&i?r.merge(i).order():i}function za(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,a=r.length,o=Math.min(i,a),u=new Array(i),s=0;s<o;++s)for(var l=n[s],c=r[s],f=l.length,h=u[s]=new Array(f),p,d=0;d<f;++d)(p=l[d]||c[d])&&(h[d]=p);for(;s<i;++s)u[s]=n[s];return new z(u,this._parents)}function ja(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r=t[e],i=r.length-1,a=r[i],o;--i>=0;)(o=r[i])&&(a&&o.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(o,a),a=o);return this}function qa(t){t||(t=Wa);function e(f,h){return f&&h?t(f.__data__,h.__data__):!f-!h}for(var n=this._groups,r=n.length,i=new Array(r),a=0;a<r;++a){for(var o=n[a],u=o.length,s=i[a]=new Array(u),l,c=0;c<u;++c)(l=o[c])&&(s[c]=l);s.sort(e)}return new z(i,this._parents).order()}function Wa(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function Ja(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function Ka(){return Array.from(this)}function Za(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,a=r.length;i<a;++i){var o=r[i];if(o)return o}return null}function Qa(){let t=0;for(const e of this)++t;return t}function to(){return!this.node()}function eo(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i=e[n],a=0,o=i.length,u;a<o;++a)(u=i[a])&&t.call(u,u.__data__,a,i);return this}function no(t){return function(){this.removeAttribute(t)}}function ro(t){return function(){this.removeAttributeNS(t.space,t.local)}}function io(t,e){return function(){this.setAttribute(t,e)}}function ao(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function oo(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function uo(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function so(t,e){var n=re(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((e==null?n.local?ro:no:typeof e=="function"?n.local?uo:oo:n.local?ao:io)(n,e))}function ar(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function lo(t){return function(){this.style.removeProperty(t)}}function co(t,e,n){return function(){this.style.setProperty(t,e,n)}}function fo(t,e,n){return function(){var r=e.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function ho(t,e,n){return arguments.length>1?this.each((e==null?lo:typeof e=="function"?fo:co)(t,e,n??"")):At(this.node(),t)}function At(t,e){return t.style.getPropertyValue(e)||ar(t).getComputedStyle(t,null).getPropertyValue(e)}function po(t){return function(){delete this[t]}}function mo(t,e){return function(){this[t]=e}}function go(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function yo(t,e){return arguments.length>1?this.each((e==null?po:typeof e=="function"?go:mo)(t,e)):this.node()[t]}function or(t){return t.trim().split(/^|\s+/)}function Ye(t){return t.classList||new ur(t)}function ur(t){this._node=t,this._names=or(t.getAttribute("class")||"")}ur.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function sr(t,e){for(var n=Ye(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function lr(t,e){for(var n=Ye(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function vo(t){return function(){sr(this,t)}}function bo(t){return function(){lr(this,t)}}function wo(t,e){return function(){(e.apply(this,arguments)?sr:lr)(this,t)}}function Do(t,e){var n=or(t+"");if(arguments.length<2){for(var r=Ye(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof e=="function"?wo:e?vo:bo)(n,e))}function xo(){this.textContent=""}function _o(t){return function(){this.textContent=t}}function $o(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function Ao(t){return arguments.length?this.each(t==null?xo:(typeof t=="function"?$o:_o)(t)):this.node().textContent}function To(){this.innerHTML=""}function So(t){return function(){this.innerHTML=t}}function Mo(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function Co(t){return arguments.length?this.each(t==null?To:(typeof t=="function"?Mo:So)(t)):this.node().innerHTML}function Fo(){this.nextSibling&&this.parentNode.appendChild(this)}function Lo(){return this.each(Fo)}function Eo(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Oo(){return this.each(Eo)}function Po(t){var e=typeof t=="function"?t:tr(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function Ro(){return null}function Io(t,e){var n=typeof t=="function"?t:tr(t),r=e==null?Ro:typeof e=="function"?e:Xe(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function ko(){var t=this.parentNode;t&&t.removeChild(this)}function No(){return this.each(ko)}function Bo(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Vo(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Go(t){return this.select(t?Vo:Bo)}function Xo(t){return arguments.length?this.property("__data__",t):this.node().__data__}function Yo(t){return function(e){t.call(this,e,this.__data__)}}function Uo(t){return t.trim().split(/^|\s+/).map(function(e){var n="",r=e.indexOf(".");return r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),{type:e,name:n}})}function Ho(t){return function(){var e=this.__on;if(e){for(var n=0,r=-1,i=e.length,a;n<i;++n)a=e[n],(!t.type||a.type===t.type)&&a.name===t.name?this.removeEventListener(a.type,a.listener,a.options):e[++r]=a;++r?e.length=r:delete this.__on}}}function zo(t,e,n){return function(){var r=this.__on,i,a=Yo(e);if(r){for(var o=0,u=r.length;o<u;++o)if((i=r[o]).type===t.type&&i.name===t.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=a,i.options=n),i.value=e;return}}this.addEventListener(t.type,a,n),i={type:t.type,name:t.name,value:e,listener:a,options:n},r?r.push(i):this.__on=[i]}}function jo(t,e,n){var r=Uo(t+""),i,a=r.length,o;if(arguments.length<2){var u=this.node().__on;if(u){for(var s=0,l=u.length,c;s<l;++s)for(i=0,c=u[s];i<a;++i)if((o=r[i]).type===c.type&&o.name===c.name)return c.value}return}for(u=e?zo:Ho,i=0;i<a;++i)this.each(u(r[i],e,n));return this}function cr(t,e,n){var r=ar(t),i=r.CustomEvent;typeof i=="function"?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function qo(t,e){return function(){return cr(this,t,e)}}function Wo(t,e){return function(){return cr(this,t,e.apply(this,arguments))}}function Jo(t,e){return this.each((typeof e=="function"?Wo:qo)(t,e))}function*Ko(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,a=r.length,o;i<a;++i)(o=r[i])&&(yield o)}var fr=[null];function z(t,e){this._groups=t,this._parents=e}function Vt(){return new z([[document.documentElement]],fr)}function Zo(){return this}z.prototype=Vt.prototype={constructor:z,select:_a,selectAll:Sa,selectChild:La,selectChildren:Ra,filter:Ia,data:Xa,enter:ka,exit:Ua,join:Ha,merge:za,selection:Zo,order:ja,sort:qa,call:Ja,nodes:Ka,node:Za,size:Qa,empty:to,each:eo,attr:so,style:ho,property:yo,classed:Do,text:Ao,html:Co,raise:Lo,lower:Oo,append:Po,insert:Io,remove:No,clone:Go,datum:Xo,on:jo,dispatch:Jo,[Symbol.iterator]:Ko};function ae(t){return typeof t=="string"?new z([[document.querySelector(t)]],[document.documentElement]):new z([[t]],fr)}function Ue(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function hr(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Gt(){}var Xt=.7,oe=1/Xt,Tt="\\s*([+-]?\\d+)\\s*",Yt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Q="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Qo=/^#([0-9a-f]{3,8})$/,tu=new RegExp(`^rgb\\(${Tt},${Tt},${Tt}\\)$`),eu=new RegExp(`^rgb\\(${Q},${Q},${Q}\\)$`),nu=new RegExp(`^rgba\\(${Tt},${Tt},${Tt},${Yt}\\)$`),ru=new RegExp(`^rgba\\(${Q},${Q},${Q},${Yt}\\)$`),iu=new RegExp(`^hsl\\(${Yt},${Q},${Q}\\)$`),au=new RegExp(`^hsla\\(${Yt},${Q},${Q},${Yt}\\)$`),pr={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};Ue(Gt,mt,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:dr,formatHex:dr,formatHex8:ou,formatHsl:uu,formatRgb:mr,toString:mr});function dr(){return this.rgb().formatHex()}function ou(){return this.rgb().formatHex8()}function uu(){return wr(this).formatHsl()}function mr(){return this.rgb().formatRgb()}function mt(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Qo.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?gr(e):n===3?new H(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?ue(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?ue(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=tu.exec(t))?new H(e[1],e[2],e[3],1):(e=eu.exec(t))?new H(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=nu.exec(t))?ue(e[1],e[2],e[3],e[4]):(e=ru.exec(t))?ue(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=iu.exec(t))?br(e[1],e[2]/100,e[3]/100,1):(e=au.exec(t))?br(e[1],e[2]/100,e[3]/100,e[4]):pr.hasOwnProperty(t)?gr(pr[t]):t==="transparent"?new H(NaN,NaN,NaN,0):null}function gr(t){return new H(t>>16&255,t>>8&255,t&255,1)}function ue(t,e,n,r){return r<=0&&(t=e=n=NaN),new H(t,e,n,r)}function su(t){return t instanceof Gt||(t=mt(t)),t?(t=t.rgb(),new H(t.r,t.g,t.b,t.opacity)):new H}function He(t,e,n,r){return arguments.length===1?su(t):new H(t,e,n,r??1)}function H(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}Ue(H,He,hr(Gt,{brighter(t){return t=t==null?oe:Math.pow(oe,t),new H(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?Xt:Math.pow(Xt,t),new H(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new H(gt(this.r),gt(this.g),gt(this.b),se(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:yr,formatHex:yr,formatHex8:lu,formatRgb:vr,toString:vr}));function yr(){return`#${yt(this.r)}${yt(this.g)}${yt(this.b)}`}function lu(){return`#${yt(this.r)}${yt(this.g)}${yt(this.b)}${yt((isNaN(this.opacity)?1:this.opacity)*255)}`}function vr(){const t=se(this.opacity);return`${t===1?"rgb(":"rgba("}${gt(this.r)}, ${gt(this.g)}, ${gt(this.b)}${t===1?")":`, ${t})`}`}function se(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function gt(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function yt(t){return t=gt(t),(t<16?"0":"")+t.toString(16)}function br(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new W(t,e,n,r)}function wr(t){if(t instanceof W)return new W(t.h,t.s,t.l,t.opacity);if(t instanceof Gt||(t=mt(t)),!t)return new W;if(t instanceof W)return t;t=t.rgb();var e=t.r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),a=Math.max(e,n,r),o=NaN,u=a-i,s=(a+i)/2;return u?(e===a?o=(n-r)/u+(n<r)*6:n===a?o=(r-e)/u+2:o=(e-n)/u+4,u/=s<.5?a+i:2-a-i,o*=60):u=s>0&&s<1?0:o,new W(o,u,s,t.opacity)}function cu(t,e,n,r){return arguments.length===1?wr(t):new W(t,e,n,r??1)}function W(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}Ue(W,cu,hr(Gt,{brighter(t){return t=t==null?oe:Math.pow(oe,t),new W(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Xt:Math.pow(Xt,t),new W(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new H(ze(t>=240?t-240:t+120,i,r),ze(t,i,r),ze(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new W(Dr(this.h),le(this.s),le(this.l),se(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 t=se(this.opacity);return`${t===1?"hsl(":"hsla("}${Dr(this.h)}, ${le(this.s)*100}%, ${le(this.l)*100}%${t===1?")":`, ${t})`}`}}));function Dr(t){return t=(t||0)%360,t<0?t+360:t}function le(t){return Math.max(0,Math.min(1,t||0))}function ze(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}const je=t=>()=>t;function fu(t,e){return function(n){return t+n*e}}function hu(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}function pu(t){return(t=+t)==1?xr:function(e,n){return n-e?hu(e,n,t):je(isNaN(e)?n:e)}}function xr(t,e){var n=e-t;return n?fu(t,n):je(isNaN(t)?e:t)}const ce=function t(e){var n=pu(e);function r(i,a){var o=n((i=He(i)).r,(a=He(a)).r),u=n(i.g,a.g),s=n(i.b,a.b),l=xr(i.opacity,a.opacity);return function(c){return i.r=o(c),i.g=u(c),i.b=s(c),i.opacity=l(c),i+""}}return r.gamma=t,r}(1);function du(t,e){e||(e=[]);var n=t?Math.min(e.length,t.length):0,r=e.slice(),i;return function(a){for(i=0;i<n;++i)r[i]=t[i]*(1-a)+e[i]*a;return r}}function mu(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function gu(t,e){var n=e?e.length:0,r=t?Math.min(n,t.length):0,i=new Array(r),a=new Array(n),o;for(o=0;o<r;++o)i[o]=Je(t[o],e[o]);for(;o<n;++o)a[o]=e[o];return function(u){for(o=0;o<r;++o)a[o]=i[o](u);return a}}function yu(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function J(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function vu(t,e){var n={},r={},i;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(i in e)i in t?n[i]=Je(t[i],e[i]):r[i]=e[i];return function(a){for(i in n)r[i]=n[i](a);return r}}var qe=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,We=new RegExp(qe.source,"g");function bu(t){return function(){return t}}function wu(t){return function(e){return t(e)+""}}function _r(t,e){var n=qe.lastIndex=We.lastIndex=0,r,i,a,o=-1,u=[],s=[];for(t=t+"",e=e+"";(r=qe.exec(t))&&(i=We.exec(e));)(a=i.index)>n&&(a=e.slice(n,a),u[o]?u[o]+=a:u[++o]=a),(r=r[0])===(i=i[0])?u[o]?u[o]+=i:u[++o]=i:(u[++o]=null,s.push({i:o,x:J(r,i)})),n=We.lastIndex;return n<e.length&&(a=e.slice(n),u[o]?u[o]+=a:u[++o]=a),u.length<2?s[0]?wu(s[0].x):bu(e):(e=s.length,function(l){for(var c=0,f;c<e;++c)u[(f=s[c]).i]=f.x(l);return u.join("")})}function Je(t,e){var n=typeof e,r;return e==null||n==="boolean"?je(e):(n==="number"?J:n==="string"?(r=mt(e))?(e=r,ce):_r:e instanceof mt?ce:e instanceof Date?yu:mu(e)?du:Array.isArray(e)?gu:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?vu:J)(t,e)}function Du(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var $r=180/Math.PI,Ke={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Ar(t,e,n,r,i,a){var o,u,s;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(s=t*n+e*r)&&(n-=t*s,r-=e*s),(u=Math.sqrt(n*n+r*r))&&(n/=u,r/=u,s/=u),t*r<e*n&&(t=-t,e=-e,s=-s,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(e,t)*$r,skewX:Math.atan(s)*$r,scaleX:o,scaleY:u}}var fe;function xu(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?Ke:Ar(e.a,e.b,e.c,e.d,e.e,e.f)}function _u(t){return t==null||(fe||(fe=document.createElementNS("http://www.w3.org/2000/svg","g")),fe.setAttribute("transform",t),!(t=fe.transform.baseVal.consolidate()))?Ke:(t=t.matrix,Ar(t.a,t.b,t.c,t.d,t.e,t.f))}function Tr(t,e,n,r){function i(l){return l.length?l.pop()+" ":""}function a(l,c,f,h,p,d){if(l!==f||c!==h){var m=p.push("translate(",null,e,null,n);d.push({i:m-4,x:J(l,f)},{i:m-2,x:J(c,h)})}else(f||h)&&p.push("translate("+f+e+h+n)}function o(l,c,f,h){l!==c?(l-c>180?c+=360:c-l>180&&(l+=360),h.push({i:f.push(i(f)+"rotate(",null,r)-2,x:J(l,c)})):c&&f.push(i(f)+"rotate("+c+r)}function u(l,c,f,h){l!==c?h.push({i:f.push(i(f)+"skewX(",null,r)-2,x:J(l,c)}):c&&f.push(i(f)+"skewX("+c+r)}function s(l,c,f,h,p,d){if(l!==f||c!==h){var m=p.push(i(p)+"scale(",null,",",null,")");d.push({i:m-4,x:J(l,f)},{i:m-2,x:J(c,h)})}else(f!==1||h!==1)&&p.push(i(p)+"scale("+f+","+h+")")}return function(l,c){var f=[],h=[];return l=t(l),c=t(c),a(l.translateX,l.translateY,c.translateX,c.translateY,f,h),o(l.rotate,c.rotate,f,h),u(l.skewX,c.skewX,f,h),s(l.scaleX,l.scaleY,c.scaleX,c.scaleY,f,h),l=c=null,function(p){for(var d=-1,m=h.length,b;++d<m;)f[(b=h[d]).i]=b.x(p);return f.join("")}}}var $u=Tr(xu,"px, ","px)","deg)"),Au=Tr(_u,", ",")",")"),St=0,Ut=0,Ht=0,Sr=1e3,he,zt,pe=0,vt=0,de=0,jt=typeof performance=="object"&&performance.now?performance:Date,Mr=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Ze(){return vt||(Mr(Tu),vt=jt.now()+de)}function Tu(){vt=0}function me(){this._call=this._time=this._next=null}me.prototype=Cr.prototype={constructor:me,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?Ze():+n)+(e==null?0:+e),!this._next&&zt!==this&&(zt?zt._next=this:he=this,zt=this),this._call=t,this._time=n,Qe()},stop:function(){this._call&&(this._call=null,this._time=1/0,Qe())}};function Cr(t,e,n){var r=new me;return r.restart(t,e,n),r}function Su(){Ze(),++St;for(var t=he,e;t;)(e=vt-t._time)>=0&&t._call.call(void 0,e),t=t._next;--St}function Fr(){vt=(pe=jt.now())+de,St=Ut=0;try{Su()}finally{St=0,Cu(),vt=0}}function Mu(){var t=jt.now(),e=t-pe;e>Sr&&(de-=e,pe=t)}function Cu(){for(var t,e=he,n,r=1/0;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:he=n);zt=t,Qe(r)}function Qe(t){if(!St){Ut&&(Ut=clearTimeout(Ut));var e=t-vt;e>24?(t<1/0&&(Ut=setTimeout(Fr,t-jt.now()-de)),Ht&&(Ht=clearInterval(Ht))):(Ht||(pe=jt.now(),Ht=setInterval(Mu,Sr)),St=1,Mr(Fr))}}function Lr(t,e,n){var r=new me;return e=e==null?0:+e,r.restart(i=>{r.stop(),t(i+e)},e,n),r}var Fu=Kn("start","end","cancel","interrupt"),Lu=[],Er=0,Or=1,tn=2,ge=3,Pr=4,en=5,ye=6;function ve(t,e,n,r,i,a){var o=t.__transition;if(!o)t.__transition={};else if(n in o)return;Eu(t,n,{name:e,index:r,group:i,on:Fu,tween:Lu,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:Er})}function nn(t,e){var n=K(t,e);if(n.state>Er)throw new Error("too late; already scheduled");return n}function tt(t,e){var n=K(t,e);if(n.state>ge)throw new Error("too late; already running");return n}function K(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function Eu(t,e,n){var r=t.__transition,i;r[e]=n,n.timer=Cr(a,0,n.time);function a(l){n.state=Or,n.timer.restart(o,n.delay,n.time),n.delay<=l&&o(l-n.delay)}function o(l){var c,f,h,p;if(n.state!==Or)return s();for(c in r)if(p=r[c],p.name===n.name){if(p.state===ge)return Lr(o);p.state===Pr?(p.state=ye,p.timer.stop(),p.on.call("interrupt",t,t.__data__,p.index,p.group),delete r[c]):+c<e&&(p.state=ye,p.timer.stop(),p.on.call("cancel",t,t.__data__,p.index,p.group),delete r[c])}if(Lr(function(){n.state===ge&&(n.state=Pr,n.timer.restart(u,n.delay,n.time),u(l))}),n.state=tn,n.on.call("start",t,t.__data__,n.index,n.group),n.state===tn){for(n.state=ge,i=new Array(h=n.tween.length),c=0,f=-1;c<h;++c)(p=n.tween[c].value.call(t,t.__data__,n.index,n.group))&&(i[++f]=p);i.length=f+1}}function u(l){for(var c=l<n.duration?n.ease.call(null,l/n.duration):(n.timer.restart(s),n.state=en,1),f=-1,h=i.length;++f<h;)i[f].call(t,c);n.state===en&&(n.on.call("end",t,t.__data__,n.index,n.group),s())}function s(){n.state=ye,n.timer.stop(),delete r[e];for(var l in r)return;delete t.__transition}}function Ou(t,e){var n=t.__transition,r,i,a=!0,o;if(n){e=e==null?null:e+"";for(o in n){if((r=n[o]).name!==e){a=!1;continue}i=r.state>tn&&r.state<en,r.state=ye,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete n[o]}a&&delete t.__transition}}function Pu(t){return this.each(function(){Ou(this,t)})}function Ru(t,e){var n,r;return function(){var i=tt(this,t),a=i.tween;if(a!==n){r=n=a;for(var o=0,u=r.length;o<u;++o)if(r[o].name===e){r=r.slice(),r.splice(o,1);break}}i.tween=r}}function Iu(t,e,n){var r,i;if(typeof n!="function")throw new Error;return function(){var a=tt(this,t),o=a.tween;if(o!==r){i=(r=o).slice();for(var u={name:e,value:n},s=0,l=i.length;s<l;++s)if(i[s].name===e){i[s]=u;break}s===l&&i.push(u)}a.tween=i}}function ku(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r=K(this.node(),n).tween,i=0,a=r.length,o;i<a;++i)if((o=r[i]).name===t)return o.value;return null}return this.each((e==null?Ru:Iu)(n,t,e))}function rn(t,e,n){var r=t._id;return t.each(function(){var i=tt(this,r);(i.value||(i.value={}))[e]=n.apply(this,arguments)}),function(i){return K(i,r).value[e]}}function Rr(t,e){var n;return(typeof e=="number"?J:e instanceof mt?ce:(n=mt(e))?(e=n,ce):_r)(t,e)}function Nu(t){return function(){this.removeAttribute(t)}}function Bu(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Vu(t,e,n){var r,i=n+"",a;return function(){var o=this.getAttribute(t);return o===i?null:o===r?a:a=e(r=o,n)}}function Gu(t,e,n){var r,i=n+"",a;return function(){var o=this.getAttributeNS(t.space,t.local);return o===i?null:o===r?a:a=e(r=o,n)}}function Xu(t,e,n){var r,i,a;return function(){var o,u=n(this),s;return u==null?void this.removeAttribute(t):(o=this.getAttribute(t),s=u+"",o===s?null:o===r&&s===i?a:(i=s,a=e(r=o,u)))}}function Yu(t,e,n){var r,i,a;return function(){var o,u=n(this),s;return u==null?void this.removeAttributeNS(t.space,t.local):(o=this.getAttributeNS(t.space,t.local),s=u+"",o===s?null:o===r&&s===i?a:(i=s,a=e(r=o,u)))}}function Uu(t,e){var n=re(t),r=n==="transform"?Au:Rr;return this.attrTween(t,typeof e=="function"?(n.local?Yu:Xu)(n,r,rn(this,"attr."+t,e)):e==null?(n.local?Bu:Nu)(n):(n.local?Gu:Vu)(n,r,e))}function Hu(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function zu(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function ju(t,e){var n,r;function i(){var a=e.apply(this,arguments);return a!==r&&(n=(r=a)&&zu(t,a)),n}return i._value=e,i}function qu(t,e){var n,r;function i(){var a=e.apply(this,arguments);return a!==r&&(n=(r=a)&&Hu(t,a)),n}return i._value=e,i}function Wu(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;var r=re(t);return this.tween(n,(r.local?ju:qu)(r,e))}function Ju(t,e){return function(){nn(this,t).delay=+e.apply(this,arguments)}}function Ku(t,e){return e=+e,function(){nn(this,t).delay=e}}function Zu(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?Ju:Ku)(e,t)):K(this.node(),e).delay}function Qu(t,e){return function(){tt(this,t).duration=+e.apply(this,arguments)}}function ts(t,e){return e=+e,function(){tt(this,t).duration=e}}function es(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?Qu:ts)(e,t)):K(this.node(),e).duration}function ns(t,e){if(typeof e!="function")throw new Error;return function(){tt(this,t).ease=e}}function rs(t){var e=this._id;return arguments.length?this.each(ns(e,t)):K(this.node(),e).ease}function is(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;tt(this,t).ease=n}}function as(t){if(typeof t!="function")throw new Error;return this.each(is(this._id,t))}function os(t){typeof t!="function"&&(t=nr(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a=e[i],o=a.length,u=r[i]=[],s,l=0;l<o;++l)(s=a[l])&&t.call(s,s.__data__,l,a)&&u.push(s);return new nt(r,this._parents,this._name,this._id)}function us(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,a=Math.min(r,i),o=new Array(r),u=0;u<a;++u)for(var s=e[u],l=n[u],c=s.length,f=o[u]=new Array(c),h,p=0;p<c;++p)(h=s[p]||l[p])&&(f[p]=h);for(;u<r;++u)o[u]=e[u];return new nt(o,this._parents,this._name,this._id)}function ss(t){return(t+"").trim().split(/^|\s+/).every(function(e){var n=e.indexOf(".");return n>=0&&(e=e.slice(0,n)),!e||e==="start"})}function ls(t,e,n){var r,i,a=ss(e)?nn:tt;return function(){var o=a(this,t),u=o.on;u!==r&&(i=(r=u).copy()).on(e,n),o.on=i}}function cs(t,e){var n=this._id;return arguments.length<2?K(this.node(),n).on.on(t):this.each(ls(n,t,e))}function fs(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function hs(){return this.on("end.remove",fs(this._id))}function ps(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Xe(t));for(var r=this._groups,i=r.length,a=new Array(i),o=0;o<i;++o)for(var u=r[o],s=u.length,l=a[o]=new Array(s),c,f,h=0;h<s;++h)(c=u[h])&&(f=t.call(c,c.__data__,h,u))&&("__data__"in c&&(f.__data__=c.__data__),l[h]=f,ve(l[h],e,n,h,l,K(c,n)));return new nt(a,this._parents,e,n)}function ds(t){var e=this._name,n=this._id;typeof t!="function"&&(t=er(t));for(var r=this._groups,i=r.length,a=[],o=[],u=0;u<i;++u)for(var s=r[u],l=s.length,c,f=0;f<l;++f)if(c=s[f]){for(var h=t.call(c,c.__data__,f,s),p,d=K(c,n),m=0,b=h.length;m<b;++m)(p=h[m])&&ve(p,e,n,m,h,d);a.push(h),o.push(c)}return new nt(a,o,e,n)}var ms=Vt.prototype.constructor;function gs(){return new ms(this._groups,this._parents)}function ys(t,e){var n,r,i;return function(){var a=At(this,t),o=(this.style.removeProperty(t),At(this,t));return a===o?null:a===n&&o===r?i:i=e(n=a,r=o)}}function Ir(t){return function(){this.style.removeProperty(t)}}function vs(t,e,n){var r,i=n+"",a;return function(){var o=At(this,t);return o===i?null:o===r?a:a=e(r=o,n)}}function bs(t,e,n){var r,i,a;return function(){var o=At(this,t),u=n(this),s=u+"";return u==null&&(s=u=(this.style.removeProperty(t),At(this,t))),o===s?null:o===r&&s===i?a:(i=s,a=e(r=o,u))}}function ws(t,e){var n,r,i,a="style."+e,o="end."+a,u;return function(){var s=tt(this,t),l=s.on,c=s.value[a]==null?u||(u=Ir(e)):void 0;(l!==n||i!==c)&&(r=(n=l).copy()).on(o,i=c),s.on=r}}function Ds(t,e,n){var r=(t+="")=="transform"?$u:Rr;return e==null?this.styleTween(t,ys(t,r)).on("end.style."+t,Ir(t)):typeof e=="function"?this.styleTween(t,bs(t,r,rn(this,"style."+t,e))).each(ws(this._id,t)):this.styleTween(t,vs(t,r,e),n).on("end.style."+t,null)}function xs(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function _s(t,e,n){var r,i;function a(){var o=e.apply(this,arguments);return o!==i&&(r=(i=o)&&xs(t,o,n)),r}return a._value=e,a}function $s(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error;return this.tween(r,_s(t,e,n??""))}function As(t){return function(){this.textContent=t}}function Ts(t){return function(){var e=t(this);this.textContent=e??""}}function Ss(t){return this.tween("text",typeof t=="function"?Ts(rn(this,"text",t)):As(t==null?"":t+""))}function Ms(t){return function(e){this.textContent=t.call(this,e)}}function Cs(t){var e,n;function r(){var i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&Ms(i)),e}return r._value=t,r}function Fs(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,Cs(t))}function Ls(){for(var t=this._name,e=this._id,n=kr(),r=this._groups,i=r.length,a=0;a<i;++a)for(var o=r[a],u=o.length,s,l=0;l<u;++l)if(s=o[l]){var c=K(s,e);ve(s,t,n,l,o,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new nt(r,this._parents,t,n)}function Es(){var t,e,n=this,r=n._id,i=n.size();return new Promise(function(a,o){var u={value:o},s={value:function(){--i===0&&a()}};n.each(function(){var l=tt(this,r),c=l.on;c!==t&&(e=(t=c).copy(),e._.cancel.push(u),e._.interrupt.push(u),e._.end.push(s)),l.on=e}),i===0&&a()})}var Os=0;function nt(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function kr(){return++Os}var rt=Vt.prototype;nt.prototype={constructor:nt,select:ps,selectAll:ds,selectChild:rt.selectChild,selectChildren:rt.selectChildren,filter:os,merge:us,selection:gs,transition:Ls,call:rt.call,nodes:rt.nodes,node:rt.node,size:rt.size,empty:rt.empty,each:rt.each,on:cs,attr:Uu,attrTween:Wu,style:Ds,styleTween:$s,text:Ss,textTween:Fs,remove:hs,tween:ku,delay:Zu,duration:es,ease:rs,easeVarying:as,end:Es,[Symbol.iterator]:rt[Symbol.iterator]};function Ps(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var Rs={time:null,delay:0,duration:250,ease:Ps};function Is(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}function ks(t){var e,n;t instanceof nt?(e=t._id,t=t._name):(e=kr(),(n=Rs).time=Ze(),t=t==null?null:t+"");for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var o=r[a],u=o.length,s,l=0;l<u;++l)(s=o[l])&&ve(s,t,e,l,o,n||Is(s,e));return new nt(r,this._parents,t,e)}Vt.prototype.interrupt=Pu,Vt.prototype.transition=ks;function Ns(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function be(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function Mt(t){return t=be(Math.abs(t)),t?t[1]:NaN}function Bs(t,e){return function(n,r){for(var i=n.length,a=[],o=0,u=t[0],s=0;i>0&&u>0&&(s+u+1>r&&(u=Math.max(1,r-s)),a.push(n.substring(i-=u,i+u)),!((s+=u+1)>r));)u=t[o=(o+1)%t.length];return a.reverse().join(e)}}function Vs(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var Gs=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function we(t){if(!(e=Gs.exec(t)))throw new Error("invalid format: "+t);var e;return new an({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}we.prototype=an.prototype;function an(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}an.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 Xs(t){t:for(var e=t.length,n=1,r=-1,i;n<e;++n)switch(t[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+t[n])break t;r>0&&(r=0);break}return r>0?t.slice(0,r)+t.slice(i+1):t}var Nr;function Ys(t,e){var n=be(t,e);if(!n)return t+"";var r=n[0],i=n[1],a=i-(Nr=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=r.length;return a===o?r:a>o?r+new Array(a-o+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+be(t,Math.max(0,e+a-1))[0]}function Br(t,e){var n=be(t,e);if(!n)return t+"";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 Vr={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:Ns,e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>Br(t*100,e),r:Br,s:Ys,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Gr(t){return t}var Xr=Array.prototype.map,Yr=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Us(t){var e=t.grouping===void 0||t.thousands===void 0?Gr:Bs(Xr.call(t.grouping,Number),t.thousands+""),n=t.currency===void 0?"":t.currency[0]+"",r=t.currency===void 0?"":t.currency[1]+"",i=t.decimal===void 0?".":t.decimal+"",a=t.numerals===void 0?Gr:Vs(Xr.call(t.numerals,String)),o=t.percent===void 0?"%":t.percent+"",u=t.minus===void 0?"−":t.minus+"",s=t.nan===void 0?"NaN":t.nan+"";function l(f){f=we(f);var h=f.fill,p=f.align,d=f.sign,m=f.symbol,b=f.zero,_=f.width,T=f.comma,$=f.precision,E=f.trim,A=f.type;A==="n"?(T=!0,A="g"):Vr[A]||($===void 0&&($=12),E=!0,A="g"),(b||h==="0"&&p==="=")&&(b=!0,h="0",p="=");var N=m==="$"?n:m==="#"&&/[boxX]/.test(A)?"0"+A.toLowerCase():"",X=m==="$"?r:/[%p]/.test(A)?o:"",k=Vr[A],w=/[defgprs%]/.test(A);$=$===void 0?6:/[gprs]/.test(A)?Math.max(1,Math.min(21,$)):Math.max(0,Math.min(20,$));function x(y){var S=N,C=X,B,dt,$t;if(A==="c")C=k(y)+C,y="";else{y=+y;var Z=y<0||1/y<0;if(y=isNaN(y)?s:k(Math.abs(y),$),E&&(y=Xs(y)),Z&&+y==0&&d!=="+"&&(Z=!1),S=(Z?d==="("?d:u:d==="-"||d==="("?"":d)+S,C=(A==="s"?Yr[8+Nr/3]:"")+C+(Z&&d==="("?")":""),w){for(B=-1,dt=y.length;++B<dt;)if($t=y.charCodeAt(B),48>$t||$t>57){C=($t===46?i+y.slice(B+1):y.slice(B))+C,y=y.slice(0,B);break}}}T&&!b&&(y=e(y,1/0));var Ce=S.length+y.length+C.length,at=Ce<_?new Array(_-Ce+1).join(h):"";switch(T&&b&&(y=e(at+y,at.length?_-C.length:1/0),at=""),p){case"<":y=S+y+C+at;break;case"=":y=S+at+y+C;break;case"^":y=at.slice(0,Ce=at.length>>1)+S+y+C+at.slice(Ce);break;default:y=at+S+y+C;break}return a(y)}return x.toString=function(){return f+""},x}function c(f,h){var p=l((f=we(f),f.type="f",f)),d=Math.max(-8,Math.min(8,Math.floor(Mt(h)/3)))*3,m=Math.pow(10,-d),b=Yr[8+d/3];return function(_){return p(m*_)+b}}return{format:l,formatPrefix:c}}var De,on,Ur;Hs({thousands:",",grouping:[3],currency:["$",""]});function Hs(t){return De=Us(t),on=De.format,Ur=De.formatPrefix,De}function zs(t){return Math.max(0,-Mt(Math.abs(t)))}function js(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Mt(e)/3)))*3-Mt(Math.abs(t)))}function qs(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Mt(e)-Mt(t))+1}function xe(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}const Hr=Symbol("implicit");function zr(){var t=new Wn,e=[],n=[],r=Hr;function i(a){let o=t.get(a);if(o===void 0){if(r!==Hr)return r;t.set(a,o=e.push(a)-1)}return n[o%n.length]}return i.domain=function(a){if(!arguments.length)return e.slice();e=[],t=new Wn;for(const o of a)t.has(o)||t.set(o,e.push(o)-1);return i},i.range=function(a){return arguments.length?(n=Array.from(a),i):n.slice()},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return zr(e,n).unknown(r)},xe.apply(i,arguments),i}function jr(){var t=zr().unknown(void 0),e=t.domain,n=t.range,r=0,i=1,a,o,u=!1,s=0,l=0,c=.5;delete t.unknown;function f(){var h=e().length,p=i<r,d=p?i:r,m=p?r:i;a=(m-d)/Math.max(1,h-s+l*2),u&&(a=Math.floor(a)),d+=(m-d-a*(h-s))*c,o=a*(1-s),u&&(d=Math.round(d),o=Math.round(o));var b=ga(h).map(function(_){return d+a*_});return n(p?b.reverse():b)}return t.domain=function(h){return arguments.length?(e(h),f()):e()},t.range=function(h){return arguments.length?([r,i]=h,r=+r,i=+i,f()):[r,i]},t.rangeRound=function(h){return[r,i]=h,r=+r,i=+i,u=!0,f()},t.bandwidth=function(){return o},t.step=function(){return a},t.round=function(h){return arguments.length?(u=!!h,f()):u},t.padding=function(h){return arguments.length?(s=Math.min(1,l=+h),f()):s},t.paddingInner=function(h){return arguments.length?(s=Math.min(1,h),f()):s},t.paddingOuter=function(h){return arguments.length?(l=+h,f()):l},t.align=function(h){return arguments.length?(c=Math.max(0,Math.min(1,h)),f()):c},t.copy=function(){return jr(e(),[r,i]).round(u).paddingInner(s).paddingOuter(l).align(c)},xe.apply(f(),arguments)}function qr(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return qr(e())},t}function Ws(){return qr(jr.apply(null,arguments).paddingInner(1))}function Js(t){return function(){return t}}function Ks(t){return+t}var Wr=[0,1];function Ct(t){return t}function un(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:Js(isNaN(e)?NaN:.5)}function Zs(t,e){var n;return t>e&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function Qs(t,e,n){var r=t[0],i=t[1],a=e[0],o=e[1];return i<r?(r=un(i,r),a=n(o,a)):(r=un(r,i),a=n(a,o)),function(u){return a(r(u))}}function tl(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),a=new Array(r),o=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++o<r;)i[o]=un(t[o],t[o+1]),a[o]=n(e[o],e[o+1]);return function(u){var s=qn(t,u,1,r)-1;return a[s](i[s](u))}}function el(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function nl(){var t=Wr,e=Wr,n=Je,r,i,a,o=Ct,u,s,l;function c(){var h=Math.min(t.length,e.length);return o!==Ct&&(o=Zs(t[0],t[h-1])),u=h>2?tl:Qs,s=l=null,f}function f(h){return h==null||isNaN(h=+h)?a:(s||(s=u(t.map(r),e,n)))(r(o(h)))}return f.invert=function(h){return o(i((l||(l=u(e,t.map(r),J)))(h)))},f.domain=function(h){return arguments.length?(t=Array.from(h,Ks),c()):t.slice()},f.range=function(h){return arguments.length?(e=Array.from(h),c()):e.slice()},f.rangeRound=function(h){return e=Array.from(h),n=Du,c()},f.clamp=function(h){return arguments.length?(o=h?!0:Ct,c()):o!==Ct},f.interpolate=function(h){return arguments.length?(n=h,c()):n},f.unknown=function(h){return arguments.length?(a=h,f):a},function(h,p){return r=h,i=p,c()}}function rl(){return nl()(Ct,Ct)}function il(t,e,n,r){var i=ma(t,e,n),a;switch(r=we(r??",f"),r.type){case"s":{var o=Math.max(Math.abs(t),Math.abs(e));return r.precision==null&&!isNaN(a=js(i,o))&&(r.precision=a),Ur(r,o)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(a=qs(i,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=a-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(a=zs(i))&&(r.precision=a-(r.type==="%")*2);break}}return on(r)}function Jr(t){var e=t.domain;return t.ticks=function(n){var r=e();return da(r[0],r[r.length-1],n??10)},t.tickFormat=function(n,r){var i=e();return il(i[0],i[i.length-1],n??10,r)},t.nice=function(n){n==null&&(n=10);var r=e(),i=0,a=r.length-1,o=r[i],u=r[a],s,l,c=10;for(u<o&&(l=o,o=u,u=l,l=i,i=a,a=l);c-- >0;){if(l=Ve(o,u,n),l===s)return r[i]=o,r[a]=u,e(r);if(l>0)o=Math.floor(o/l)*l,u=Math.ceil(u/l)*l;else if(l<0)o=Math.ceil(o*l)/l,u=Math.floor(u*l)/l;else break;s=l}return t},t}function qt(){var t=rl();return t.copy=function(){return el(t,qt())},xe.apply(t,arguments),Jr(t)}function Kr(){var t=0,e=1,n=1,r=[.5],i=[0,1],a;function o(s){return s!=null&&s<=s?i[qn(r,s,0,n)]:a}function u(){var s=-1;for(r=new Array(n);++s<n;)r[s]=((s+1)*e-(s-n)*t)/(n+1);return o}return o.domain=function(s){return arguments.length?([t,e]=s,t=+t,e=+e,u()):[t,e]},o.range=function(s){return arguments.length?(n=(i=Array.from(s)).length-1,u()):i.slice()},o.invertExtent=function(s){var l=i.indexOf(s);return l<0?[NaN,NaN]:l<1?[t,r[0]]:l>=n?[r[n-1],e]:[r[l-1],r[l]]},o.unknown=function(s){return arguments.length&&(a=s),o},o.thresholds=function(){return r.slice()},o.copy=function(){return Kr().domain([t,e]).range(i).unknown(a)},xe.apply(Jr(o),arguments)}function Wt(t,e,n){this.k=t,this.x=e,this.y=n}Wt.prototype={constructor:Wt,scale:function(t){return t===1?this:new Wt(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new Wt(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}},Wt.prototype;function al(t,e){return e instanceof Function?e(t):on(e)(t)}function Jt(t,e,n,r){let i=`${t}_${e}`;return n!=null&&(i+=`_${n}`),r!=null&&(i+=`_${r}`),i}function _e(t,e){return`${t}_series${e}`}function sn(t,e){return`${t}_group${e}`}function $e(){return""}function ln({transposedDataGrid:t,dataFormatterGrid:e,chartType:n="grid"}){const r=e.seriesDirection==="row"?e.rowLabels:e.columnLabels;return t.map((i,a)=>r[a]!=null?r[a]:_e(n,a))}function Zr({transposedDataGrid:t,dataFormatterGrid:e,chartType:n="multiGrid",gridIndex:r=0}){const i=e.seriesDirection==="row"?e.rowLabels:e.columnLabels;return t.map((a,o)=>i[o]!=null?i[o]:_e(`${n}_grid${r}`,o))}function Qr({transposedDataGrid:t,dataFormatterGrid:e,chartType:n="grid"}){if(t[0]==null)return[];const r=e.seriesDirection==="row"?e.columnLabels:e.rowLabels;return t[0].map((i,a)=>r[a]!=null?r[a]:sn(n,a))}function ti({transposedDataGrid:t,dataFormatterGrid:e,chartType:n="multiGrid",gridIndex:r=0}){if(t[0]==null)return[];const i=e.seriesDirection==="row"?e.columnLabels:e.rowLabels;return t[0].map((a,o)=>i[o]!=null?i[o]:sn(`${n}_grid${r}`,o))}function st(t){const e=[0,0];return t.length?t.reduce((r,i)=>[i<r[0]?i:r[0],i>r[1]?i:r[1]],[t[0],t[0]]):e}function ei(t){const e=t.filter(n=>n!=null&&n.value!=null).map(n=>n.value);return st(e)}function ol(t){const n=(t[0]&&Array.isArray(t[0])?t.flat():t).filter(r=>(r==null||U(r)&&r.value==null)===!1).map(r=>typeof r=="number"?r:r.value);return st(n)}function cn(t){const n=t.flat().filter(r=>(r==null||U(r)&&r.value==null)===!1).map(r=>typeof r=="number"?r:r.value);return st(n)}function ul(t){const n=t.flat().flat().filter(r=>(r==null||U(r)&&r.value==null)===!1).map(r=>typeof r=="number"?r:r.value);return st(n)}function sl(t,e){const n=t.map(r=>Array.isArray(r)?r[e]??null:U(r)?r.value[e]??null:null).filter(r=>r!=null);return st(n)}function ll({data:t,minX:e,maxX:n,minY:r,maxY:i}){let a=[],o=null,u=null,s=null,l=null;for(let c of t)for(let f of c)f.axisX>=e&&f.axisX<=n&&f.axisY>=r&&f.axisY<=i&&(a.push(c),(o==null||f.axisX<o.axisX)&&(o=f),(u==null||f.axisX>u.axisX)&&(u=f),(s==null||f.axisY<s.axisY)&&(s=f),(l==null||f.axisY>l.axisY)&&(l=f));return{minXDatum:o,maxXDatum:u,minYDatum:s,maxYDatum:l,filteredData:a}}function ni(t,e){if(t==="row")return Object.assign([],e);const n=e.length,r=e.reduce((a,o)=>Math.max(a,o.length),0),i=new Array(r).fill(null).map(()=>new Array(n).fill(null));for(let a=0;a<n;a++)for(let o=0;o<r;o++)i[o][a]=e[a][o];return i}function lt(t,e){return t<e.colors[e.colorScheme].label.length?e.colors[e.colorScheme].label[t]:e.colors[e.colorScheme].label[t%e.colors[e.colorScheme].label.length]}function ri(t){let e=Math.floor(Math.sqrt(t)),n=Math.ceil(t/e);for(;e*n<t;)n++;return{rowAmount:e,columnAmount:n}}function fn(t,e,n){const{gap:r}=e,{rowAmount:i,columnAmount:a}=e.rowAmount*e.columnAmount>=n?e:ri(n);return new Array(n).fill(null).map((o,u)=>{const s=u%a,l=Math.floor(u/a),c=(t.width-r*(a-1))/a,f=(t.height-r*(i-1))/i,h=s*c+s*r,p=l*f+l*r;return{slotIndex:u,rowIndex:l,columnIndex:s,startX:h,startY:p,centerX:h+c/2,centerY:p+f/2,width:c,height:f}})}function Ft(t,e,n){const{gap:r}=e,{rowAmount:i,columnAmount:a}=e.rowAmount*e.columnAmount>=n?e:ri(n);return new Array(n).fill(null).map((o,u)=>{const s=u%a,l=Math.floor(u/a),c=(t.width-r*(a-1))/a,f=(t.height-r*(i-1))/i,h=s*c+s*r,p=l*f+l*r,d=[h,p],m=[c/t.width,f/t.height];return{slotIndex:u,rowIndex:l,columnIndex:s,translate:d,scale:m}})}const cl=t=>{const{data:e=[],dataFormatter:n,chartParams:r}=t;if(!e.length)return[];let i=[];try{const a=(o,u,s,l)=>{const c=Jt(n.type,u,s),f=n.seriesLabels[u]||_e("series",u),h=lt(u,r);return typeof o=="number"?{id:c,index:l,seq:0,label:c,description:"",data:{},value:o,seriesIndex:u,seriesLabel:f,color:h,visible:!0}:{id:o.id?o.id:c,index:l,seq:0,label:o.label?o.label:c,description:o.description,data:o.data??{},value:o.value,seriesIndex:u,seriesLabel:f,color:h,visible:!0}};i=e.map((o,u)=>Array.isArray(o)?o.map((s,l)=>a(s,u,l,i.length+l)):a(o,u,0,i.length)).flat().sort(n.sort??void 0).map((o,u)=>(o.seq=u,o)).map(o=>(o.visible=n.visibleFilter(o,t),o)).sort((o,u)=>o.index-u.index).reduce((o,u)=>(o[u.seriesIndex]||(o[u.seriesIndex]=[]),o[u.seriesIndex].push(u),o),[])}catch(a){throw Error(a)}return i},fl=t=>F({data:t},{data:{toBe:"(DataSeriesDatum | DataSeriesValue)[][] | (DataSeriesDatum | DataSeriesValue)[]",test:n=>Array.isArray(n)}});var hn=function(t,e){return hn=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},hn(t,e)};function et(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");hn(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}function hl(t,e,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function u(c){try{l(r.next(c))}catch(f){o(f)}}function s(c){try{l(r.throw(c))}catch(f){o(f)}}function l(c){c.done?a(c.value):i(c.value).then(u,s)}l((r=r.apply(t,e||[])).next())})}function ii(t,e){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return o.next=u(0),o.throw=u(1),o.return=u(2),typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function u(l){return function(c){return s([l,c])}}function s(l){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,l[0]&&(n=0)),n;)try{if(r=1,i&&(a=l[0]&2?i.return:l[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,l[1])).done)return a;switch(i=0,a&&(l=[l[0]&2,a.value]),l[0]){case 0:case 1:a=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!a||l[1]>a[0]&&l[1]<a[3])){n.label=l[1];break}if(l[0]===6&&n.label<a[1]){n.label=a[1],a=l;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(l);break}a[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(c){l=[6,c],i=0}finally{r=a=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function Lt(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function ct(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,a=[],o;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(u){o={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function ft(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,a;r<i;r++)(a||!(r in e))&&(a||(a=Array.prototype.slice.call(e,0,r)),a[r]=e[r]);return t.concat(a||Array.prototype.slice.call(e))}function Et(t){return this instanceof Et?(this.v=t,this):new Et(t)}function pl(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(t,e||[]),i,a=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),u("next"),u("throw"),u("return",o),i[Symbol.asyncIterator]=function(){return this},i;function o(p){return function(d){return Promise.resolve(d).then(p,f)}}function u(p,d){r[p]&&(i[p]=function(m){return new Promise(function(b,_){a.push([p,m,b,_])>1||s(p,m)})},d&&(i[p]=d(i[p])))}function s(p,d){try{l(r[p](d))}catch(m){h(a[0][3],m)}}function l(p){p.value instanceof Et?Promise.resolve(p.value.v).then(c,f):h(a[0][2],p)}function c(p){s("next",p)}function f(p){s("throw",p)}function h(p,d){p(d),a.shift(),a.length&&s(a[0][0],a[0][1])}}function dl(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],n;return e?e.call(t):(t=typeof Lt=="function"?Lt(t):t[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(a){n[a]=t[a]&&function(o){return new Promise(function(u,s){o=t[a](o),i(u,s,o.done,o.value)})}}function i(a,o,u,s){Promise.resolve(s).then(function(l){a({value:l,done:u})},o)}}typeof SuppressedError=="function"&&SuppressedError;function I(t){return typeof t=="function"}function pn(t){var e=function(r){Error.call(r),r.stack=new Error().stack},n=t(e);return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var dn=pn(function(t){return function(n){t(this),this.message=n?n.length+` errors occurred during unsubscription:
|
2
2
|
`+n.map(function(r,i){return i+1+") "+r.toString()}).join(`
|
3
3
|
`):"",this.name="UnsubscriptionError",this.errors=n}});function Ae(t,e){if(t){var n=t.indexOf(e);0<=n&&t.splice(n,1)}}var Kt=function(){function t(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){var e,n,r,i,a;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var u=Lt(o),s=u.next();!s.done;s=u.next()){var l=s.value;l.remove(this)}}catch(m){e={error:m}}finally{try{s&&!s.done&&(n=u.return)&&n.call(u)}finally{if(e)throw e.error}}else o.remove(this);var c=this.initialTeardown;if(I(c))try{c()}catch(m){a=m instanceof dn?m.errors:[m]}var f=this._finalizers;if(f){this._finalizers=null;try{for(var h=Lt(f),p=h.next();!p.done;p=h.next()){var d=p.value;try{ui(d)}catch(m){a=a??[],m instanceof dn?a=ft(ft([],ct(a)),ct(m.errors)):a.push(m)}}}catch(m){r={error:m}}finally{try{p&&!p.done&&(i=h.return)&&i.call(h)}finally{if(r)throw r.error}}}if(a)throw new dn(a)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)ui(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(e)}},t.prototype._hasParent=function(e){var n=this._parentage;return n===e||Array.isArray(n)&&n.includes(e)},t.prototype._addParent=function(e){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(e),n):n?[n,e]:e},t.prototype._removeParent=function(e){var n=this._parentage;n===e?this._parentage=null:Array.isArray(n)&&Ae(n,e)},t.prototype.remove=function(e){var n=this._finalizers;n&&Ae(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=function(){var e=new t;return e.closed=!0,e}(),t}(),ai=Kt.EMPTY;function oi(t){return t instanceof Kt||t&&"closed"in t&&I(t.remove)&&I(t.add)&&I(t.unsubscribe)}function ui(t){I(t)?t():t.unsubscribe()}var si={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},li={setTimeout:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,ft([t,e],ct(n)))},clearTimeout:function(t){var e=li.delegate;return((e==null?void 0:e.clearTimeout)||clearTimeout)(t)},delegate:void 0};function ci(t){li.setTimeout(function(){throw t})}function mn(){}function Te(t){t()}var gn=function(t){et(e,t);function e(n){var r=t.call(this)||this;return r.isStopped=!1,n?(r.destination=n,oi(n)&&n.add(r)):r.destination=vl,r}return e.create=function(n,r,i){return new Zt(n,r,i)},e.prototype.next=function(n){this.isStopped||this._next(n)},e.prototype.error=function(n){this.isStopped||(this.isStopped=!0,this._error(n))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(n){this.destination.next(n)},e.prototype._error=function(n){try{this.destination.error(n)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(Kt),ml=Function.prototype.bind;function yn(t,e){return ml.call(t,e)}var gl=function(){function t(e){this.partialObserver=e}return t.prototype.next=function(e){var n=this.partialObserver;if(n.next)try{n.next(e)}catch(r){Se(r)}},t.prototype.error=function(e){var n=this.partialObserver;if(n.error)try{n.error(e)}catch(r){Se(r)}else Se(e)},t.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(n){Se(n)}},t}(),Zt=function(t){et(e,t);function e(n,r,i){var a=t.call(this)||this,o;if(I(n)||!n)o={next:n??void 0,error:r??void 0,complete:i??void 0};else{var u;a&&si.useDeprecatedNextContext?(u=Object.create(n),u.unsubscribe=function(){return a.unsubscribe()},o={next:n.next&&yn(n.next,u),error:n.error&&yn(n.error,u),complete:n.complete&&yn(n.complete,u)}):o=n}return a.destination=new gl(o),a}return e}(gn);function Se(t){ci(t)}function yl(t){throw t}var vl={closed:!0,next:mn,error:yl,complete:mn},vn=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function Ot(t){return t}function bl(t){return t.length===0?Ot:t.length===1?t[0]:function(n){return t.reduce(function(r,i){return i(r)},n)}}var P=function(){function t(e){e&&(this._subscribe=e)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(e,n,r){var i=this,a=Dl(e)?e:new Zt(e,n,r);return Te(function(){var o=i,u=o.operator,s=o.source;a.add(u?u.call(a,s):s?i._subscribe(a):i._trySubscribe(a))}),a},t.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(n){e.error(n)}},t.prototype.forEach=function(e,n){var r=this;return n=fi(n),new n(function(i,a){var o=new Zt({next:function(u){try{e(u)}catch(s){a(s),o.unsubscribe()}},error:a,complete:i});r.subscribe(o)})},t.prototype._subscribe=function(e){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(e)},t.prototype[vn]=function(){return this},t.prototype.pipe=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return bl(e)(this)},t.prototype.toPromise=function(e){var n=this;return e=fi(e),new e(function(r,i){var a;n.subscribe(function(o){return a=o},function(o){return i(o)},function(){return r(a)})})},t.create=function(e){return new t(e)},t}();function fi(t){var e;return(e=t??si.Promise)!==null&&e!==void 0?e:Promise}function wl(t){return t&&I(t.next)&&I(t.error)&&I(t.complete)}function Dl(t){return t&&t instanceof gn||wl(t)&&oi(t)}function xl(t){return I(t==null?void 0:t.lift)}function V(t){return function(e){if(xl(e))return e.lift(function(n){try{return t(n,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}function G(t,e,n,r,i){return new _l(t,e,n,r,i)}var _l=function(t){et(e,t);function e(n,r,i,a,o,u){var s=t.call(this,n)||this;return s.onFinalize=o,s.shouldUnsubscribe=u,s._next=r?function(l){try{r(l)}catch(c){n.error(c)}}:t.prototype._next,s._error=a?function(l){try{a(l)}catch(c){n.error(c)}finally{this.unsubscribe()}}:t.prototype._error,s._complete=i?function(){try{i()}catch(l){n.error(l)}finally{this.unsubscribe()}}:t.prototype._complete,s}return e.prototype.unsubscribe=function(){var n;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;t.prototype.unsubscribe.call(this),!r&&((n=this.onFinalize)===null||n===void 0||n.call(this))}},e}(gn),$l=pn(function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),R=function(t){et(e,t);function e(){var n=t.call(this)||this;return n.closed=!1,n.currentObservers=null,n.observers=[],n.isStopped=!1,n.hasError=!1,n.thrownError=null,n}return e.prototype.lift=function(n){var r=new hi(this,this);return r.operator=n,r},e.prototype._throwIfClosed=function(){if(this.closed)throw new $l},e.prototype.next=function(n){var r=this;Te(function(){var i,a;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var o=Lt(r.currentObservers),u=o.next();!u.done;u=o.next()){var s=u.value;s.next(n)}}catch(l){i={error:l}}finally{try{u&&!u.done&&(a=o.return)&&a.call(o)}finally{if(i)throw i.error}}}})},e.prototype.error=function(n){var r=this;Te(function(){if(r._throwIfClosed(),!r.isStopped){r.hasError=r.isStopped=!0,r.thrownError=n;for(var i=r.observers;i.length;)i.shift().error(n)}})},e.prototype.complete=function(){var n=this;Te(function(){if(n._throwIfClosed(),!n.isStopped){n.isStopped=!0;for(var r=n.observers;r.length;)r.shift().complete()}})},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var n;return((n=this.observers)===null||n===void 0?void 0:n.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(n){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,n)},e.prototype._subscribe=function(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)},e.prototype._innerSubscribe=function(n){var r=this,i=this,a=i.hasError,o=i.isStopped,u=i.observers;return a||o?ai:(this.currentObservers=null,u.push(n),new Kt(function(){r.currentObservers=null,Ae(u,n)}))},e.prototype._checkFinalizedStatuses=function(n){var r=this,i=r.hasError,a=r.thrownError,o=r.isStopped;i?n.error(a):o&&n.complete()},e.prototype.asObservable=function(){var n=new P;return n.source=this,n},e.create=function(n,r){return new hi(n,r)},e}(P),hi=function(t){et(e,t);function e(n,r){var i=t.call(this)||this;return i.destination=n,i.source=r,i}return e.prototype.next=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.next)===null||i===void 0||i.call(r,n)},e.prototype.error=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.error)===null||i===void 0||i.call(r,n)},e.prototype.complete=function(){var n,r;(r=(n=this.destination)===null||n===void 0?void 0:n.complete)===null||r===void 0||r.call(n)},e.prototype._subscribe=function(n){var r,i;return(i=(r=this.source)===null||r===void 0?void 0:r.subscribe(n))!==null&&i!==void 0?i:ai},e}(R),pi=function(t){et(e,t);function e(n){var r=t.call(this)||this;return r._value=n,r}return Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),e.prototype._subscribe=function(n){var r=t.prototype._subscribe.call(this,n);return!r.closed&&n.next(this._value),r},e.prototype.getValue=function(){var n=this,r=n.hasError,i=n.thrownError,a=n._value;if(r)throw i;return this._throwIfClosed(),a},e.prototype.next=function(n){t.prototype.next.call(this,this._value=n)},e}(R),bn={now:function(){return(bn.delegate||Date).now()},delegate:void 0},Al=function(t){et(e,t);function e(n,r,i){n===void 0&&(n=1/0),r===void 0&&(r=1/0),i===void 0&&(i=bn);var a=t.call(this)||this;return a._bufferSize=n,a._windowTime=r,a._timestampProvider=i,a._buffer=[],a._infiniteTimeWindow=!0,a._infiniteTimeWindow=r===1/0,a._bufferSize=Math.max(1,n),a._windowTime=Math.max(1,r),a}return e.prototype.next=function(n){var r=this,i=r.isStopped,a=r._buffer,o=r._infiniteTimeWindow,u=r._timestampProvider,s=r._windowTime;i||(a.push(n),!o&&a.push(u.now()+s)),this._trimBuffer(),t.prototype.next.call(this,n)},e.prototype._subscribe=function(n){this._throwIfClosed(),this._trimBuffer();for(var r=this._innerSubscribe(n),i=this,a=i._infiniteTimeWindow,o=i._buffer,u=o.slice(),s=0;s<u.length&&!n.closed;s+=a?1:2)n.next(u[s]);return this._checkFinalizedStatuses(n),r},e.prototype._trimBuffer=function(){var n=this,r=n._bufferSize,i=n._timestampProvider,a=n._buffer,o=n._infiniteTimeWindow,u=(o?1:2)*r;if(r<1/0&&u<a.length&&a.splice(0,a.length-u),!o){for(var s=i.now(),l=0,c=1;c<a.length&&a[c]<=s;c+=2)l=c;l&&a.splice(0,l+1)}},e}(R),Tl=function(t){et(e,t);function e(n,r){return t.call(this)||this}return e.prototype.schedule=function(n,r){return this},e}(Kt),wn={setInterval:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setInterval.apply(void 0,ft([t,e],ct(n)))},clearInterval:function(t){var e=wn.delegate;return((e==null?void 0:e.clearInterval)||clearInterval)(t)},delegate:void 0},Sl=function(t){et(e,t);function e(n,r){var i=t.call(this,n,r)||this;return i.scheduler=n,i.work=r,i.pending=!1,i}return e.prototype.schedule=function(n,r){var i;if(r===void 0&&(r=0),this.closed)return this;this.state=n;var a=this.id,o=this.scheduler;return a!=null&&(this.id=this.recycleAsyncId(o,a,r)),this.pending=!0,this.delay=r,this.id=(i=this.id)!==null&&i!==void 0?i:this.requestAsyncId(o,this.id,r),this},e.prototype.requestAsyncId=function(n,r,i){return i===void 0&&(i=0),wn.setInterval(n.flush.bind(n,this),i)},e.prototype.recycleAsyncId=function(n,r,i){if(i===void 0&&(i=0),i!=null&&this.delay===i&&this.pending===!1)return r;r!=null&&wn.clearInterval(r)},e.prototype.execute=function(n,r){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var i=this._execute(n,r);if(i)return i;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(n,r){var i=!1,a;try{this.work(n)}catch(o){i=!0,a=o||new Error("Scheduled action threw falsy error")}if(i)return this.unsubscribe(),a},e.prototype.unsubscribe=function(){if(!this.closed){var n=this,r=n.id,i=n.scheduler,a=i.actions;this.work=this.state=this.scheduler=null,this.pending=!1,Ae(a,this),r!=null&&(this.id=this.recycleAsyncId(i,r,null)),this.delay=null,t.prototype.unsubscribe.call(this)}},e}(Tl),di=function(){function t(e,n){n===void 0&&(n=t.now),this.schedulerActionCtor=e,this.now=n}return t.prototype.schedule=function(e,n,r){return n===void 0&&(n=0),new this.schedulerActionCtor(this,e).schedule(r,n)},t.now=bn.now,t}(),Ml=function(t){et(e,t);function e(n,r){r===void 0&&(r=di.now);var i=t.call(this,n,r)||this;return i.actions=[],i._active=!1,i}return e.prototype.flush=function(n){var r=this.actions;if(this._active){r.push(n);return}var i;this._active=!0;do if(i=n.execute(n.state,n.delay))break;while(n=r.shift());if(this._active=!1,i){for(;n=r.shift();)n.unsubscribe();throw i}},e}(di),Dn=new Ml(Sl),Cl=Dn,mi=new P(function(t){return t.complete()});function gi(t){return t&&I(t.schedule)}function xn(t){return t[t.length-1]}function Fl(t){return I(xn(t))?t.pop():void 0}function Pt(t){return gi(xn(t))?t.pop():void 0}function yi(t,e){return typeof xn(t)=="number"?t.pop():e}var vi=function(t){return t&&typeof t.length=="number"&&typeof t!="function"};function bi(t){return I(t==null?void 0:t.then)}function wi(t){return I(t[vn])}function Di(t){return Symbol.asyncIterator&&I(t==null?void 0:t[Symbol.asyncIterator])}function xi(t){return new TypeError("You provided "+(t!==null&&typeof t=="object"?"an invalid object":"'"+t+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function Ll(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var _i=Ll();function $i(t){return I(t==null?void 0:t[_i])}function Ai(t){return pl(this,arguments,function(){var n,r,i,a;return ii(this,function(o){switch(o.label){case 0:n=t.getReader(),o.label=1;case 1:o.trys.push([1,,9,10]),o.label=2;case 2:return[4,Et(n.read())];case 3:return r=o.sent(),i=r.value,a=r.done,a?[4,Et(void 0)]:[3,5];case 4:return[2,o.sent()];case 5:return[4,Et(i)];case 6:return[4,o.sent()];case 7:return o.sent(),[3,2];case 8:return[3,10];case 9:return n.releaseLock(),[7];case 10:return[2]}})})}function Ti(t){return I(t==null?void 0:t.getReader)}function j(t){if(t instanceof P)return t;if(t!=null){if(wi(t))return El(t);if(vi(t))return Ol(t);if(bi(t))return Pl(t);if(Di(t))return Si(t);if($i(t))return Rl(t);if(Ti(t))return Il(t)}throw xi(t)}function El(t){return new P(function(e){var n=t[vn]();if(I(n.subscribe))return n.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function Ol(t){return new P(function(e){for(var n=0;n<t.length&&!e.closed;n++)e.next(t[n]);e.complete()})}function Pl(t){return new P(function(e){t.then(function(n){e.closed||(e.next(n),e.complete())},function(n){return e.error(n)}).then(null,ci)})}function Rl(t){return new P(function(e){var n,r;try{for(var i=Lt(t),a=i.next();!a.done;a=i.next()){var o=a.value;if(e.next(o),e.closed)return}}catch(u){n={error:u}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}e.complete()})}function Si(t){return new P(function(e){kl(t,e).catch(function(n){return e.error(n)})})}function Il(t){return Si(Ai(t))}function kl(t,e){var n,r,i,a;return hl(this,void 0,void 0,function(){var o,u;return ii(this,function(s){switch(s.label){case 0:s.trys.push([0,5,6,11]),n=dl(t),s.label=1;case 1:return[4,n.next()];case 2:if(r=s.sent(),!!r.done)return[3,4];if(o=r.value,e.next(o),e.closed)return[2];s.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return u=s.sent(),i={error:u},[3,11];case 6:return s.trys.push([6,,9,10]),r&&!r.done&&(a=n.return)?[4,a.call(n)]:[3,8];case 7:s.sent(),s.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return e.complete(),[2]}})})}function ht(t,e,n,r,i){r===void 0&&(r=0),i===void 0&&(i=!1);var a=e.schedule(function(){n(),i?t.add(this.schedule(null,r)):this.unsubscribe()},r);if(t.add(a),!i)return a}function Mi(t,e){return e===void 0&&(e=0),V(function(n,r){n.subscribe(G(r,function(i){return ht(r,t,function(){return r.next(i)},e)},function(){return ht(r,t,function(){return r.complete()},e)},function(i){return ht(r,t,function(){return r.error(i)},e)}))})}function Ci(t,e){return e===void 0&&(e=0),V(function(n,r){r.add(t.schedule(function(){return n.subscribe(r)},e))})}function Nl(t,e){return j(t).pipe(Ci(e),Mi(e))}function Bl(t,e){return j(t).pipe(Ci(e),Mi(e))}function Vl(t,e){return new P(function(n){var r=0;return e.schedule(function(){r===t.length?n.complete():(n.next(t[r++]),n.closed||this.schedule())})})}function Gl(t,e){return new P(function(n){var r;return ht(n,e,function(){r=t[_i](),ht(n,e,function(){var i,a,o;try{i=r.next(),a=i.value,o=i.done}catch(u){n.error(u);return}o?n.complete():n.next(a)},0,!0)}),function(){return I(r==null?void 0:r.return)&&r.return()}})}function Fi(t,e){if(!t)throw new Error("Iterable cannot be null");return new P(function(n){ht(n,e,function(){var r=t[Symbol.asyncIterator]();ht(n,e,function(){r.next().then(function(i){i.done?n.complete():n.next(i.value)})},0,!0)})})}function Xl(t,e){return Fi(Ai(t),e)}function Yl(t,e){if(t!=null){if(wi(t))return Nl(t,e);if(vi(t))return Vl(t,e);if(bi(t))return Bl(t,e);if(Di(t))return Fi(t,e);if($i(t))return Gl(t,e);if(Ti(t))return Xl(t,e)}throw xi(t)}function Rt(t,e){return e?Yl(t,e):j(t)}function bt(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Pt(t);return Rt(t,n)}var Li=pn(function(t){return function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}});function Ul(t){return t instanceof Date&&!isNaN(t)}function D(t,e){return V(function(n,r){var i=0;n.subscribe(G(r,function(a){r.next(t.call(e,a,i++))}))})}var Hl=Array.isArray;function zl(t,e){return Hl(e)?t.apply(void 0,ft([],ct(e))):t(e)}function jl(t){return D(function(e){return zl(t,e)})}var ql=Array.isArray,Wl=Object.getPrototypeOf,Jl=Object.prototype,Kl=Object.keys;function Zl(t){if(t.length===1){var e=t[0];if(ql(e))return{args:e,keys:null};if(Ql(e)){var n=Kl(e);return{args:n.map(function(r){return e[r]}),keys:n}}}return{args:t,keys:null}}function Ql(t){return t&&typeof t=="object"&&Wl(t)===Jl}function tc(t,e){return t.reduce(function(n,r,i){return n[r]=e[i],n},{})}function O(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Pt(t),r=Fl(t),i=Zl(t),a=i.args,o=i.keys;if(a.length===0)return Rt([],n);var u=new P(ec(a,n,o?function(s){return tc(o,s)}:Ot));return r?u.pipe(jl(r)):u}function ec(t,e,n){return n===void 0&&(n=Ot),function(r){Ei(e,function(){for(var i=t.length,a=new Array(i),o=i,u=i,s=function(c){Ei(e,function(){var f=Rt(t[c],e),h=!1;f.subscribe(G(r,function(p){a[c]=p,h||(h=!0,u--),u||r.next(n(a.slice()))},function(){--o||r.complete()}))},r)},l=0;l<i;l++)s(l)},r)}}function Ei(t,e,n){t?ht(n,t,e):e()}function nc(t,e,n,r,i,a,o,u){var s=[],l=0,c=0,f=!1,h=function(){f&&!s.length&&!l&&e.complete()},p=function(m){return l<r?d(m):s.push(m)},d=function(m){l++;var b=!1;j(n(m,c++)).subscribe(G(e,function(_){e.next(_)},function(){b=!0},void 0,function(){if(b)try{l--;for(var _=function(){var T=s.shift();o||d(T)};s.length&&l<r;)_();h()}catch(T){e.error(T)}}))};return t.subscribe(G(e,p,function(){f=!0,h()})),function(){}}function Oi(t,e,n){return n===void 0&&(n=1/0),I(e)?Oi(function(r,i){return D(function(a,o){return e(r,a,i,o)})(j(t(r,i)))},n):(typeof e=="number"&&(n=e),V(function(r,i){return nc(r,i,t,n)}))}function _n(t){return t===void 0&&(t=1/0),Oi(Ot,t)}function rc(){return _n(1)}function Pi(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return rc()(Rt(t,Pt(t)))}function ic(t){return new P(function(e){j(t()).subscribe(e)})}function Ri(t,e,n){return ic(function(){return t()?e:n})}function ac(t,e,n){n===void 0&&(n=Cl);var r=-1;return e!=null&&(gi(e)?n=e:r=e),new P(function(i){var a=Ul(t)?+t-n.now():t;a<0&&(a=0);var o=0;return n.schedule(function(){i.closed||(i.next(o++),0<=r?this.schedule(void 0,r):i.complete())},a)})}function oc(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Pt(t),r=yi(t,1/0),i=t;return i.length?i.length===1?j(i[0]):_n(r)(Rt(i,n)):mi}var uc=Array.isArray;function sc(t){return t.length===1&&uc(t[0])?t[0]:t}function Ii(t,e){return V(function(n,r){var i=0;n.subscribe(G(r,function(a){return t.call(e,a,i++)&&r.next(a)}))})}function lc(t,e){return e===void 0&&(e=Dn),V(function(n,r){var i=null,a=null,o=null,u=function(){if(i){i.unsubscribe(),i=null;var l=a;a=null,r.next(l)}};function s(){var l=o+t,c=e.now();if(c<l){i=this.schedule(void 0,l-c),r.add(i);return}u()}n.subscribe(G(r,function(l){a=l,o=e.now(),i||(i=e.schedule(s,t),r.add(i))},function(){u(),r.complete()},void 0,function(){a=i=null}))})}function cc(t){return V(function(e,n){var r=!1;e.subscribe(G(n,function(i){r=!0,n.next(i)},function(){r||n.next(t),n.complete()}))})}function fc(t){return t<=0?function(){return mi}:V(function(e,n){var r=0;e.subscribe(G(n,function(i){++r<=t&&(n.next(i),t<=r&&n.complete())}))})}function q(t,e){return e===void 0&&(e=Ot),t=t??hc,V(function(n,r){var i,a=!0;n.subscribe(G(r,function(o){var u=e(o);(a||!t(i,u))&&(a=!1,i=u,r.next(o))}))})}function hc(t,e){return t===e}function pc(t){return t===void 0&&(t=dc),V(function(e,n){var r=!1;e.subscribe(G(n,function(i){r=!0,n.next(i)},function(){return r?n.complete():n.error(t())}))})}function dc(){return new Li}function mc(t,e){var n=arguments.length>=2;return function(r){return r.pipe(Ot,fc(1),n?cc(e):pc(function(){return new Li}))}}function gc(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Pt(t),r=yi(t,1/0);return t=sc(t),V(function(i,a){_n(r)(Rt(ft([i],ct(t)),n)).subscribe(a)})}function yc(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return gc.apply(void 0,ft([],ct(t)))}function $n(t){t===void 0&&(t={});var e=t.connector,n=e===void 0?function(){return new R}:e,r=t.resetOnError,i=r===void 0?!0:r,a=t.resetOnComplete,o=a===void 0?!0:a,u=t.resetOnRefCountZero,s=u===void 0?!0:u;return function(l){var c,f,h,p=0,d=!1,m=!1,b=function(){f==null||f.unsubscribe(),f=void 0},_=function(){b(),c=h=void 0,d=m=!1},T=function(){var $=c;_(),$==null||$.unsubscribe()};return V(function($,E){p++,!m&&!d&&b();var A=h=h??n();E.add(function(){p--,p===0&&!m&&!d&&(f=An(T,s))}),A.subscribe(E),!c&&p>0&&(c=new Zt({next:function(N){return A.next(N)},error:function(N){m=!0,b(),f=An(_,i,N),A.error(N)},complete:function(){d=!0,b(),f=An(_,o),A.complete()}}),j($).subscribe(c))})(l)}}function An(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];if(e===!0){t();return}if(e!==!1){var i=new Zt({next:function(){i.unsubscribe(),t()}});return j(e.apply(void 0,ft([],ct(n)))).subscribe(i)}}function v(t,e,n){var r,i=!1;return r=t,$n({connector:function(){return new Al(r,e,n)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:i})}function Tn(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Pt(t);return V(function(r,i){(n?Pi(t,r,n):Pi(t,r)).subscribe(i)})}function L(t,e){return V(function(n,r){var i=null,a=0,o=!1,u=function(){return o&&!i&&r.complete()};n.subscribe(G(r,function(s){i==null||i.unsubscribe();var l=0,c=a++;j(t(s,c)).subscribe(i=G(r,function(f){return r.next(e?e(s,f,c,l++):f)},function(){i=null,u()}))},function(){o=!0,u()}))})}function M(t){return V(function(e,n){j(t).subscribe(G(n,function(){return n.complete()},mn)),!n.closed&&e.subscribe(n)})}function vc(t,e){return V(function(n,r){var i=e??{},a=i.leading,o=a===void 0?!0:a,u=i.trailing,s=u===void 0?!1:u,l=!1,c=null,f=null,h=!1,p=function(){f==null||f.unsubscribe(),f=null,s&&(b(),h&&r.complete())},d=function(){f=null,h&&r.complete()},m=function(_){return f=j(t(_)).subscribe(G(r,p,d))},b=function(){if(l){l=!1;var _=c;c=null,r.next(_),!h&&m(_)}};n.subscribe(G(r,function(_){l=!0,c=_,!(f&&!f.closed)&&(o?b():m(_))},function(){h=!0,!(s&&l&&f&&!f.closed)&&r.complete()}))})}function bc(t,e,n){e===void 0&&(e=Dn);var r=ac(t,e);return vc(function(){return r},n)}function ki(t){return new P(e=>{const n=new ResizeObserver(r=>{const i=r[0];i&&i.contentRect&&e.next(i.contentRect)});return n.observe(t),function(){n.unobserve(t)}})}const pt=({datumList$:t,fullChartParams$:e,event$:n})=>{const r=new R,i=e.pipe(M(r),D(f=>({id:null,label:null,seriesLabel:null,groupLabel:null,categoryLabel:null,highlightDefault:f.highlightDefault})),q()),a=n.pipe(M(r),Ii(f=>f.eventName==="mouseover"),D(f=>{const h=f;return h.datum?{id:h.datum.id,label:h.datum.label,seriesLabel:h.datum.seriesLabel,groupLabel:h.datum.groupLabel,categoryLabel:h.datum.categoryLabel,highlightDefault:null}:{id:null,label:null,seriesLabel:null,groupLabel:null,categoryLabel:null,highlightDefault:null}})),o=n.pipe(M(r),Ii(f=>f.eventName==="mouseout"),L(f=>i));function u(f,h,p){return h==null&&p==null?[]:f.filter(d=>d.id===h||d.label===p)}function s(f,h){return h==null?[]:f.filter(p=>p.seriesLabel===h)}function l(f,h){return h==null?[]:f.filter(p=>p.groupLabel===h)}function c(f,h){return h==null?[]:f.filter(p=>p.categoryLabel===h)}return new P(f=>(O({target:oc(a,o,i),datumList:t,fullChartParams:e}).pipe(M(r),L(async h=>h)).subscribe(h=>{let p=[];h.fullChartParams.highlightTarget==="datum"?p=u(h.datumList,h.target.id,h.target.label):h.fullChartParams.highlightTarget==="series"?p=s(h.datumList,h.target.seriesLabel):h.fullChartParams.highlightTarget==="group"?p=l(h.datumList,h.target.groupLabel):h.fullChartParams.highlightTarget==="category"&&(p=c(h.datumList,h.target.categoryLabel)),f.next(p)}),function(){r.next(void 0)}))},Me=({datumList$:t})=>t.pipe(D(e=>{const n=new Map;return e.forEach(r=>{const i=n.get(r.seriesLabel)??[];i.push(r),n.set(r.seriesLabel,i)}),n})),Sn=({datumList$:t})=>t.pipe(D(e=>{const n=new Map;return e.forEach(r=>{const i=n.get(r.groupLabel)??[];i.push(r),n.set(r.groupLabel,i)}),n})),Qt=({datumList$:t})=>t.pipe(D(e=>{const n=new Map;return e.filter(r=>r.categoryLabel!=null).forEach(r=>{const i=n.get(r.categoryLabel)??[];i.push(r),n.set(r.categoryLabel,i)}),n})),wt=t=>t.pipe(D(e=>e.styles.textSize),q(),D(e=>{let n=NaN;if(typeof e=="string")if(e.includes("rem")){const r=parseFloat(getComputedStyle(document.documentElement).fontSize);n=parseFloat(e)*r}else e.includes("px")&&(n=parseFloat(e));else if(typeof e=="number")return e;return n||14})),Ni=({fullDataFormatter$:t})=>t.pipe(D(e=>e.separateSeries),q()),Bi=({computedData$:t})=>t.pipe(D(e=>e.filter(n=>n.length).map(n=>n[0].seriesLabel)),q((e,n)=>JSON.stringify(e).length===JSON.stringify(n).length)),Mn=({computedData$:t})=>t.pipe(D(e=>e.map(n=>n.filter(r=>r.visible!=!1)))),Vi=({computedData$:t,fullDataFormatter$:e})=>O({computedData:t,fullDataFormatter:e}).pipe(L(async n=>n),D(n=>{const r=n.fullDataFormatter.sumSeries==!0?n.computedData.map(i=>[i.reduce((a,o)=>a==null?o:(a.value=a.value+o.value,a),null)]):n.computedData;return n.fullDataFormatter.separateSeries==!0?r.map(i=>i.sort((a,o)=>a.seq-o.seq)):[r.flat().sort((i,a)=>i.seq-a.seq)]})),Gi=({computedData$:t,fullDataFormatter$:e,layout$:n})=>O({computedData:t,fullDataFormatter:e,layout:n}).pipe(L(async i=>i),D(i=>i.fullDataFormatter.separateSeries?fn(i.layout,i.fullDataFormatter.container,i.computedData.length):fn(i.layout,i.fullDataFormatter.container,1))),Xi=({seriesContainerPosition$:t,seriesLabels$:e,separateSeries$:n})=>O({seriesContainerPosition:t,seriesLabels:e,separateSeries:n}).pipe(L(async r=>r),D(r=>r.separateSeries?new Map(r.seriesLabels.map((i,a)=>[i,r.seriesContainerPosition[a]??r.seriesContainerPosition[0]])):new Map(r.seriesLabels.map((i,a)=>[i,r.seriesContainerPosition[0]])))),wc=({subject:t,observer:e})=>{const n=wt(e.fullChartParams$).pipe(v(1)),r=Ni({fullDataFormatter$:e.fullDataFormatter$}),i=Mn({computedData$:e.computedData$}),a=Vi({computedData$:e.computedData$,fullDataFormatter$:e.fullDataFormatter$}).pipe(v(1)),o=Mn({computedData$:a}),u=e.computedData$.pipe(D(p=>p.flat())).pipe(v(1)),s=pt({datumList$:u,fullChartParams$:e.fullChartParams$,event$:t.event$}).pipe(v(1)),l=Bi({computedData$:e.computedData$}),c=Me({datumList$:u}).pipe(v(1)),f=Gi({computedData$:e.computedData$,fullDataFormatter$:e.fullDataFormatter$,layout$:e.layout$}).pipe(v(1)),h=Xi({seriesContainerPosition$:f,seriesLabels$:l,separateSeries$:r}).pipe(v(1));return{fullParams$:e.fullParams$,fullChartParams$:e.fullChartParams$,fullDataFormatter$:e.fullDataFormatter$,computedData$:e.computedData$,layout$:e.layout$,textSizePx$:n,visibleComputedData$:i,visibleComputedLayoutData$:o,separateSeries$:r,computedLayoutData$:a,seriesHighlight$:s,seriesLabels$:l,SeriesDataMap$:c,seriesContainerPosition$:f,SeriesContainerPositionMap$:h}},it=({maxValue:t=1,minValue:e=0,axisWidth:n,scaleDomain:r=Y.scaleDomain,scaleRange:i=Y.scaleRange,reverse:a=!1})=>{const o=r[0]??Y.scaleDomain[0],u=r[1]??Y.scaleDomain[1],s=i[0]??Y.scaleRange[0],l=i[1]??Y.scaleRange[1];let c=o==="auto"?e<0?e:0:o==="min"?e:o,f=u==="auto"?t>=0?t:0:u==="max"?t:u;const h=t-(t-c)/(1-s),p=f/l;return a?qt().domain([h,p]).range([n,0]):qt().domain([h,p]).range([0,n])},Dc=({maxValue:t=1,minValue:e=0,axisWidth:n,scaleDomain:r=Y.scaleDomain,scaleRange:i=Y.scaleRange,reverse:a=!1})=>{e===t&&(t+=1,e-=1);const o=r[0]??Y.scaleDomain[0],u=r[1]??Y.scaleDomain[1],s=i[0]??Y.scaleRange[0],l=i[1]??Y.scaleRange[1];let c=o==="auto"?e<0?e:0:o==="min"?e:o,f=u==="auto"?t>=0?t:0:u==="max"?t:u;const h=t-(t-c)/(1-s),p=f/l;return a?qt().domain([n,0]).range([h,p]):qt().domain([0,n]).range([h,p])},xc=({axisLabels:t,axisWidth:e,padding:n=.5})=>{let r=[0,e];return Ws().domain(t).range(r).padding(n)},_c=({axisLabels:t,axisWidth:e,padding:n=0,reverse:r=!1})=>{let i=t.map((s,l)=>l);r&&i.reverse();const a=i.length-1+n*2,o=e/a,u=o*n-o*.5;return Kr().domain([u,e-u]).range(i)},Cn=({computedData$:t,fullDataFormatter$:e,layout$:n})=>{function r(a,o,u){const s=o.groupAxis.position==="top"||o.groupAxis.position==="bottom"?u.width:u.height,l=a[0]?a[0].length-1:0;return it({maxValue:l,minValue:0,axisWidth:s,scaleDomain:[0,l],scaleRange:[0,1]})}function i(a,o,u){const s=o.valueAxis.position==="left"||o.valueAxis.position==="right"?u.height:u.width,l=a.flat();let[c,f]=ei(l);return c===f&&f===0&&(f=1),it({maxValue:f,minValue:c,axisWidth:s,scaleDomain:["auto","auto"],scaleRange:[0,1]})}return O({computedData:t,fullDataFormatter:e,layout:n}).pipe(L(async a=>a),D(a=>{const o=r(a.computedData,a.fullDataFormatter,a.layout),u=i(a.computedData,a.fullDataFormatter,a.layout),s=u(0);return a.computedData.map((l,c)=>l.map((f,h)=>{const p=o(h),d=u(f.value??0);return{...f,axisX:p,axisY:d,axisYFromZero:d-s}}))}))},Fn=({fullDataFormatter$:t,layout$:e})=>{const n=new R;function r({xAxisPosition:i,yAxisPosition:a,width:o,height:u}){return(i==="bottom"||i==="top")&&(a==="left"||a==="right")?{width:o,height:u}:(i==="left"||i==="right")&&(a==="bottom"||a==="top")?{width:u,height:o}:{width:o,height:u}}return new P(i=>{O({fullDataFormatter:t,layout:e}).pipe(M(n),L(async a=>a)).subscribe(a=>{const o=r({xAxisPosition:a.fullDataFormatter.groupAxis.position,yAxisPosition:a.fullDataFormatter.valueAxis.position,width:a.layout.width,height:a.layout.height});return i.next(o),function(){n.next(void 0)}})})},Ln=({computedData$:t})=>t.pipe(D(e=>e.filter(n=>n.length).map(n=>n[0].seriesLabel)),q((e,n)=>JSON.stringify(e).length===JSON.stringify(n).length)),En=({computedData$:t})=>t.pipe(D(e=>e.map(r=>r.filter(i=>i.visible==!0)).filter(r=>r.length))),On=({computedLayoutData$:t})=>t.pipe(D(e=>e.map(r=>r.filter(i=>i.visible==!0)).filter(r=>r.length))),Yi=({computedData$:t,fullDataFormatter$:e,layout$:n})=>O({computedData:t,fullDataFormatter:e,layout:n}).pipe(L(async i=>i),D(i=>{if(i.fullDataFormatter.separateSeries)return Ft(i.layout,i.fullDataFormatter.container,i.computedData.length);{const a=Ft(i.layout,i.fullDataFormatter.container,1);return i.computedData.map((o,u)=>a[0])}})),Pn=({isSeriesSeprate$:t,computedData$:e})=>{const n=e.pipe(D(r=>{const i=new Array(r[0]?r[0].length:0).fill(null).map((o,u)=>r.reduce((s,l)=>{if(l&&l[u]){const c=l[u].value==null||l[u].visible==!1?0:l[u].value;return s+c}return s},0));return r.map((o,u)=>o.map((s,l)=>({...s,value:i[l]})))}));return t.pipe(L(r=>Ri(()=>r,e,n)))},Rn=({computedData$:t,fullDataFormatter$:e})=>O({computedData:t,fullDataFormatter:e}).pipe(L(async n=>n),D(n=>{const r=n.fullDataFormatter.groupAxis,i=n.computedData[0]?n.computedData[0].length-1:0,a=r.scaleDomain[0]-r.scalePadding,o=r.scaleDomain[1]==="max"?i+r.scalePadding:r.scaleDomain[1]+r.scalePadding;return[a,o]})),In=({computedData$:t,groupScaleDomainValue$:e})=>O({computedData:t,groupScaleDomainValue:e}).pipe(D(n=>{const r=n.computedData.map((a,o)=>a.filter((u,s)=>s>=n.groupScaleDomainValue[0]&&s<=n.groupScaleDomainValue[1]&&u.visible==!0));return cn(r)})),kn=({fullDataFormatter$:t,layout$:e})=>{const n=new R;function r({xAxis:i,yAxis:a,width:o,height:u}){if(!i||!a)return{translate:[0,0],scale:[1,1],rotate:0,rotateX:0,rotateY:0,value:""};let s=0,l=0,c=0,f=0,h=0;return i.position==="bottom"?a.position==="left"?(f=180,l=u):a.position==="right"?(f=180,h=180,s=o,l=u):(f=180,l=u):i.position==="top"?a.position==="left"||(a.position==="right"?(h=180,s=o):(f=180,l=u)):i.position==="left"?a.position==="bottom"?(c=-90,l=u):a.position==="top"?(c=-90,h=180):(f=180,l=u):i.position==="right"?a.position==="bottom"?(c=-90,f=180,l=u,s=o):a.position==="top"?(c=-90,f=180,h=180,s=o):(f=180,l=u):(f=180,l=u),{translate:[s,l],scale:[1,1],rotate:c,rotateX:f,rotateY:h,value:`translate(${s}px, ${l}px) rotate(${c}deg) rotateX(${f}deg) rotateY(${h}deg)`}}return new P(i=>(O({fullDataFormatter:t,layout:e}).pipe(M(n),L(async a=>a)).subscribe(a=>{const o=r({xAxis:a.fullDataFormatter.groupAxis,yAxis:a.fullDataFormatter.valueAxis,width:a.layout.width,height:a.layout.height});i.next(o)}),function(){n.next(void 0)}))},Nn=({gridAxesTransform$:t})=>t.pipe(D(e=>{const n=[0,0],r=[1/e.scale[0],1/e.scale[1]],i=e.rotate*-1,a=e.rotateX*-1,o=e.rotateY*-1;return{translate:n,scale:r,rotate:i,rotateX:a,rotateY:o,value:`translate(${n[0]}px, ${n[1]}px) rotateX(${a}deg) rotateY(${o}deg) rotate(${i}deg)`}})),Bn=({computedData$:t,groupScaleDomainValue$:e,filteredMinMaxValue$:n,fullDataFormatter$:r,layout$:i})=>{const a=new R;function o({data:u,groupAxis:s,valueAxis:l,groupScaleDomainValue:c,filteredMinMaxValue:f,width:h,height:p}){let d=0,m=0,b=0,_=0;const T=s.position==="top"||s.position==="bottom"?h:p,$=0,E=u[0]?u[0].length-1:0,A=it({maxValue:E,minValue:$,axisWidth:T,scaleDomain:c,scaleRange:[0,1]}),N=A($),X=A(E);$==E?(d=0,b=1):(d=N,b=(X-N)/T),f[0]===f[1]&&f[1]===0&&(f[1]=1);const k=l.position==="left"||l.position==="right"?p:h,w=it({maxValue:f[1],minValue:f[0],axisWidth:k,scaleDomain:l.scaleDomain,scaleRange:l.scaleRange}),x=cn(u);x[0]===x[1]&&x[1]===0&&(x[1]=1);const y=w(x[0]>0?0:x[0]),S=w(x[1]<0?0:x[1]);return m=y,_=(S-y)/k,{translate:[d,m],scale:[b,_],rotate:0,rotateX:0,rotateY:0,value:`translate(${d}px, ${m}px) scale(${b}, ${_})`}}return new P(u=>(O({computedData:t,groupScaleDomainValue:e,filteredMinMaxValue:n,fullDataFormatter:r,layout:i}).pipe(M(a),L(async s=>s)).subscribe(s=>{const l=o({data:s.computedData,groupAxis:s.fullDataFormatter.groupAxis,valueAxis:s.fullDataFormatter.valueAxis,groupScaleDomainValue:s.groupScaleDomainValue,filteredMinMaxValue:s.filteredMinMaxValue,width:s.layout.width,height:s.layout.height});u.next(l)}),function(){a.next(void 0)}))},Vn=({gridContainerPosition$:t,gridAxesTransform$:e,gridGraphicTransform$:n})=>O({gridContainerPosition:t,gridAxesTransform:e,gridGraphicTransform:n}).pipe(L(async r=>r),D(r=>r.gridAxesTransform.rotate==0||r.gridAxesTransform.rotate==180?r.gridContainerPosition.map((i,a)=>[1/r.gridGraphicTransform.scale[0]/r.gridContainerPosition[a].scale[0],1/r.gridGraphicTransform.scale[1]/r.gridContainerPosition[a].scale[1]]):r.gridContainerPosition.map((i,a)=>[1/r.gridGraphicTransform.scale[0]/r.gridContainerPosition[a].scale[1],1/r.gridGraphicTransform.scale[1]/r.gridContainerPosition[a].scale[0]]))),Ui=({fullDataFormatter$:t,computedData$:e,layout$:n,fullChartParams$:r,event$:i})=>{const a=new R,o=pt({datumList$:e.pipe(D(s=>s.flat().flat()),v(1)),fullChartParams$:r,event$:i}).pipe(v(1)),u=Gn({computedData$:e,fullDataFormatter$:t,layout$:n}).pipe(v(1));return O({fullDataFormatter:t,computedData:e,multiGridContainer:u}).pipe(L(async s=>s),D(s=>{a.next(void 0);const l=s.fullDataFormatter.gridList[0]??Bt;return s.computedData.map((c,f)=>{const h=s.fullDataFormatter.gridList[f]??l,p={type:"grid",visibleFilter:s.fullDataFormatter.visibleFilter,...h,container:{...s.fullDataFormatter.container}},d=bt(p).pipe(M(a),v(1)),m=bt(c).pipe(M(a),v(1)),b=d.pipe(D(Z=>Z.separateSeries),q(),v(1)),_=bt(s.multiGridContainer[f]).pipe(M(a),v(1)),T=Fn({fullDataFormatter$:d,layout$:n}).pipe(M(a),v(1)),$=m.pipe(D(Z=>Z.flat())).pipe(M(a),v(1)),E=Ln({computedData$:m}).pipe(M(a),v(1)),A=Me({datumList$:$}).pipe(M(a),v(1)),N=Sn({datumList$:$}).pipe(M(a),v(1)),X=En({computedData$:m}).pipe(M(a),v(1)),k=Cn({computedData$:m,fullDataFormatter$:d,layout$:n}).pipe(M(a),v(1)),w=On({computedLayoutData$:k}).pipe(M(a),v(1)),x=Pn({computedData$:m,isSeriesSeprate$:b}).pipe(v(1)),y=Rn({computedData$:m,fullDataFormatter$:d}).pipe(M(a),v(1)),S=In({computedData$:m,groupScaleDomainValue$:y}).pipe(M(a),v(1)),C=kn({fullDataFormatter$:d,layout$:n}).pipe(M(a),v(1)),B=Nn({gridAxesTransform$:C}).pipe(M(a),v(1)),dt=Bn({computedData$:m,groupScaleDomainValue$:y,filteredMinMaxValue$:S,fullDataFormatter$:d,layout$:n}).pipe(M(a),v(1)),$t=Vn({gridContainerPosition$:_,gridAxesTransform$:C,gridGraphicTransform$:dt});return{isSeriesSeprate$:b,gridContainerPosition$:_,gridAxesSize$:T,gridHighlight$:o,seriesLabels$:E,SeriesDataMap$:A,GroupDataMap$:N,dataFormatter$:d,computedData$:m,computedLayoutData$:k,visibleComputedData$:X,visibleComputedLayoutData$:w,computedStackedData$:x,groupScaleDomainValue$:y,filteredMinMaxValue$:S,gridAxesTransform$:C,gridAxesReverseTransform$:B,gridGraphicTransform$:dt,gridGraphicReverseScale$:$t}})}))},Gn=({computedData$:t,fullDataFormatter$:e,layout$:n})=>O({computedData:t,fullDataFormatter:e,layout:n}).pipe(L(async r=>r),D(r=>{const i=r.fullDataFormatter.gridList[0]??Bt,a=r.computedData.reduce((l,c,f)=>{const p=(r.fullDataFormatter.gridList[f]??i).separateSeries?c.length:r.fullDataFormatter.separateGrid?1:0;return l+p},0)||1,o=Ft(r.layout,r.fullDataFormatter.container,a);let u=0;return r.computedData.map((l,c)=>{const f=r.fullDataFormatter.gridList[c]??i,h=l.map((p,d)=>{const m=o[u];return f.separateSeries&&(u+=1),m});return!f.separateSeries&&r.fullDataFormatter.separateGrid&&(u+=1),h})})),Hi=({computedData$:t})=>t.pipe(D(e=>{function n(r,i){return r.push(i),i.children&&i.children.forEach(a=>{r=n(r,a)}),r}return n([],e)})),zi=t=>t.pipe(D(e=>Array.from(e.keys())),q((e,n)=>JSON.stringify(e).length===JSON.stringify(n).length)),ji=({computedData$:t})=>t.pipe(D(e=>{function n(r){return r.children&&(r.children=r.children.filter(i=>i.visible).map(i=>n(i))),r}return n(e)}));function It(t){return`[OrbCharts warn]: ${t.message}`}function Dt({columnName:t,expectToBe:e,from:n}){return`Invalid value: '${t}' must be '${e}'
|
4
4
|
|
package/package.json
CHANGED
package/src/defaults.ts
CHANGED
@@ -57,7 +57,19 @@ export const DEFAULT_CHART_PARAMS: ChartParams = {
|
|
57
57
|
colorScheme: 'light',
|
58
58
|
colors: {
|
59
59
|
light: {
|
60
|
-
label: [
|
60
|
+
label: [
|
61
|
+
"#6CBAFF",
|
62
|
+
"#FF6C6C",
|
63
|
+
"#F9B052",
|
64
|
+
"#7DD3C4",
|
65
|
+
"#AA93D2",
|
66
|
+
"#0088FF",
|
67
|
+
"#FFBABA",
|
68
|
+
"#86DC72",
|
69
|
+
"#EF76FF",
|
70
|
+
"#C4C4C4"
|
71
|
+
],
|
72
|
+
// label: ['#67B7DC', '#6794DC', '#6771DC', '#8067DC', '#A367DC', '#C767DC', '#DC67CE', '#DC67AB', '#DC6788', '#DC6967', '#DC8C67', '#DCAF67'],
|
61
73
|
// label: ['#F3A356', '#7A60F0', '#38B1AF', '#60A2F0', '#F06062', '#FF383C', '#6580EA', '#079F9C', '#9F65EA', '#EA7465', '#EA7465', '#8657D2', '#59B757', '#2797FF', '#D25786', '#F54BA6', '#4BECF5', '#74FD72', '#CA4BF5', '#EFE26E'],
|
62
74
|
// label: ['#60A2F0', '#F3A356', '#7A60F0', '#38B1AF', '#F06062', '#FF383C', '#6580EA', '#079F9C', '#9F65EA', '#EA7465', '#EA7465', '#8657D2', '#59B757', '#2797FF', '#D25786', '#F54BA6', '#4BECF5', '#74FD72', '#CA4BF5', '#EFE26E'],
|
63
75
|
// primary: '#454545',
|
@@ -68,7 +80,19 @@ export const DEFAULT_CHART_PARAMS: ChartParams = {
|
|
68
80
|
background: '#ffffff'
|
69
81
|
},
|
70
82
|
dark: {
|
71
|
-
label: [
|
83
|
+
label: [
|
84
|
+
"#6CBAFF",
|
85
|
+
"#FF6C6C",
|
86
|
+
"#F9B052",
|
87
|
+
"#7DD3C4",
|
88
|
+
"#AA93D2",
|
89
|
+
"#0088FF",
|
90
|
+
"#FFBABA",
|
91
|
+
"#86DC72",
|
92
|
+
"#EF76FF",
|
93
|
+
"#C4C4C4"
|
94
|
+
],
|
95
|
+
// label: ['#67B7DC', '#6794DC', '#6771DC', '#8067DC', '#A367DC', '#C767DC', '#DC67CE', '#DC67AB', '#DC6788', '#DC6967', '#DC8C67', '#DCAF67'],
|
72
96
|
// label: ['#67B7DC', '#6794DC', '#38B1AF', '#6771DC', '#8067DC', '#A367DC', '#C767DC', '#DC67CE', '#DC67AB', '#DC6788', '#DC6967', '#DC8C67', '#DCAF67'],
|
73
97
|
// label: ['#60A2F0', '#F3A356', '#7A60F0', '#38B1AF', '#F06062', '#FF383C', '#6580EA', '#079F9C', '#9F65EA', '#EA7465', '#EA7465', '#8657D2', '#59B757', '#2797FF', '#D25786', '#F54BA6', '#4BECF5', '#74FD72', '#CA4BF5', '#EFE26E'],
|
74
98
|
primary: '#f0f0f0',
|