1&&(this.minTickInterval=s-n),u(t)&&(this.min=n),u(a)&&(this.max=r)}},t}(Yt),Qt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="quantize",t}return st(t,e),t.prototype.invert=function(e){var t=this.ticks,a=t.length,i=this.getInvertPercent(e),n=Math.floor(i*(a-1));if(n>=a-1)return b(t);if(n<0)return p(t);var s=t[n],r=n/(a-1);return s+(i-r)/((n+1)/(a-1)-r)*(t[n+1]-s)},t.prototype.initCfg=function(){this.tickMethod="r-pretty",this.tickCount=5,this.nice=!0},t.prototype.calculateTicks=function(){var t=e.prototype.calculateTicks.call(this);return this.nice||(b(t)!==this.max&&t.push(this.max),p(t)!==this.min&&t.unshift(this.min)),t},t.prototype.getScalePercent=function(e){var t=this.ticks;if(eb(t))return 1;var a=0;return f(t,(function(t,i){if(!(e>=t))return!1;a=i})),a/(t.length-1)},t}(Vt),Zt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="quantile",t}return st(t,e),t.prototype.initCfg=function(){this.tickMethod="quantile",this.tickCount=5,this.nice=!0},t}(Qt),Kt={};function ea(e){return Kt[e]}function ta(e,t){if(ea(e))throw new Error("type '"+e+"' existed.");Kt[e]=t}var aa=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="identity",t.isIdentity=!0,t}return st(t,e),t.prototype.calculateTicks=function(){return this.values},t.prototype.scale=function(e){return this.values[0]!==e&&w(e)?e:this.range[0]},t.prototype.invert=function(e){var t=this.range;return et[1]?NaN:this.values[0]},t}(it),ia=[1,5,2,2.5,4,3],na=100*Number.EPSILON;function sa(e,t,a,i,n,s){var r=B(t),o=D(t,e),l=0,u=function(e,t){return(e%t+t)%t}(i,s);return(u=0&&(l=1),1-o/(r-1)-a+l}function ra(e,t,a){var i=B(t);return 1-D(t,e)/(i-1)-a+1}function oa(e,t,a,i,n,s){var r=(e-1)/(s-n),o=(t-1)/(Math.max(s,i)-Math.min(a,n));return 2-Math.max(r/o,o/r)}function la(e,t){return e>=t?2-(e-1)/(t-1):1}function ua(e,t,a,i){var n=t-e;return 1-.5*(Math.pow(t-i,2)+Math.pow(e-a,2))/Math.pow(.1*n,2)}function ca(e,t,a){var i=t-e;if(a>i){var n=(a-i)/2;return 1-Math.pow(n,2)/Math.pow(.1*i,2)}return 1}function da(e,t,a,i,n,s){if(void 0===a&&(a=5),void 0===i&&(i=!0),void 0===n&&(n=ia),void 0===s&&(s=[.25,.2,.5,.05]),"number"!=typeof e||"number"!=typeof t)return{min:0,max:0,ticks:[]};if(e===t||1===a)return{min:e,max:t,ticks:[e]};for(var r={score:-2,lmin:0,lmax:0,lstep:0},o=1;o<1/0;){for(var l=0,u=n;lw)v+=1;else{for(var $=y;$<=w;$+=1){var C=$*(m/o),x=C+m*(f-1),k=m,S=sa(c,n,o,C,x,k),T=ua(e,t,C,x),P=oa(f,a,e,t,C,x),I=s[0]*S+s[1]*T+s[2]*P+1*s[3];I>r.score&&(!i||C<=e&&x>=t)&&(r.lmin=C,r.lmax=x,r.lstep=k,r.score=I)}v+=1}}f+=1}}o+=1}for(var O=Number.isInteger(r.lstep)?0:Math.ceil(Math.abs(Math.log10(r.lstep))),A=[],M=r.lmin;M<=r.lmax;M+=r.lstep)A.push(M);var j=O?R(A,(function(e){return Number.parseFloat(e.toFixed(O))})):A;return{min:Math.min(e,p(j)),max:Math.max(t,b(j)),ticks:j}}function fa(e){var t=e.values,a=e.tickInterval,i=e.tickCount,n=t;if(w(a))return s(n,(function(e,t){return t%a==0}));var r=e.min,o=e.max;if(u(r)&&(r=0),u(o)&&(o=t.length-1),w(i)&&i=r&&e<=o})).map((function(e){return t[e]}))}return t.slice(r,o+1)}var ha=Math.sqrt(50),_a=Math.sqrt(10),va=Math.sqrt(2),ma=function(){function e(){this._domain=[0,1]}return e.prototype.domain=function(e){return e?(this._domain=Array.from(e,Number),this):this._domain.slice()},e.prototype.nice=function(e){var t,a;void 0===e&&(e=5);var i,n=this._domain.slice(),s=0,r=this._domain.length-1,o=this._domain[s],l=this._domain[r];return l0?i=ga(o=Math.floor(o/i)*i,l=Math.ceil(l/i)*i,e):i<0&&(i=ga(o=Math.ceil(o*i)/i,l=Math.floor(l*i)/i,e)),i>0?(n[s]=Math.floor(o/i)*i,n[r]=Math.ceil(l/i)*i,this.domain(n)):i<0&&(n[s]=Math.ceil(o*i)/i,n[r]=Math.floor(l*i)/i,this.domain(n)),this},e.prototype.ticks=function(e){return void 0===e&&(e=5),function(e,t,a){var i,n,s,r,o=-1;if(a=+a,(e=+e)===(t=+t)&&a>0)return[e];if((i=t0)for(e=Math.ceil(e/r),t=Math.floor(t/r),s=new Array(n=Math.ceil(t-e+1));++o