"use strict";vart=require("obsidian");functione(t,e){returnnull==t||null==e?NaN:t<e?-1:t>e?1:t>=e?0:NaN}functionn(t,e){returnnull==t||null==e?NaN:e<t?-1:e>t?1:e>=t?0:NaN}functionr(t){letr,a,l;functiono(t,e,n=0,i=t.length){if(n<i){if(0!==r(e,e))returni;do{constr=n+i>>>1;a(t[r],e)<0?n=r+1:i=r}while(n<i)}returnn}return2!==t.length?(r=e,a=(n,r)=>e(t(n),r),l=(e,n)=>t(e)-n):(r=t===e||t===n?t:i,a=t,l=t),{left:o,center:function(t,e,n=0,r=t.length){consti=o(t,e,n,r-1);returni>n&&l(t[i-1],e)>-l(t[i],e)?i-1:i},right:function(t,e,n=0,i=t.length){if(n<i){if(0!==r(e,e))returni;do{constr=n+i>>>1;a(t[r],e)<=0?n=r+1:i=r}while(n<i)}returnn}}}functioni(){return0}consta=r(e).right;r((function(t){returnnull===t?NaN:+t})).center;classlextendsMap{constructor(t,e=s){if(super(),Object.defineProperties(this,{_intern:{value:newMap},_key:{value:e}}),null!=t)for(const[e,n]oft)this.set(e,n)}get(t){returnsuper.get(o(this,t))}has(t){returnsuper.has(o(this,t))}set(t,e){returnsuper.set(function({_intern:t,_key:e},n){constr=e(n);returnt.has(r)?t.get(r):(t.set(r,n),n)}(this,t),e)}delete(t){returnsuper.delete(function({_intern:t,_key:e},n){constr=e(n);t.has(r)&&(n=t.get(r),t.delete(r));returnn}(this,t))}}functiono({_intern:t,_key:e},n){constr=e(n);returnt.has(r)?t.get(r):n}functions(t){returnnull!==t&&"object"==typeoft?t.valueOf():t}functionu(t,e){return(null==t||!(t>=t))-(null==e||!(e>=e))||(t<e?-1:t>e?1:0)}constc=Math.sqrt(50),f=Math.sqrt(10),h=Math.sqrt(2);functiond(t,e,n){constr=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/Math.pow(10,i),l=a>=c?10:a>=f?5:a>=h?2:1;leto,s,u;returni<0?(u=Math.pow(10,-i)/l,o=Math.round(t*u),s=Math.round(e*u),o/u<t&&++o,s/u>e&&--s,u=-u):(u=Math.pow(10,i)*l,o=Math.round(t/u),s=Math.round(e/u),o*u<t&&++o,s*u>e&&--s),s<o&&.5<=n&&n<2?d(t,e,2*n):[o,s,u]}functiong(t,e,n){returnd(t=+t,e=+e,n=+n)[2]}functionp(t,e,n){n=+n;constr=(e=+e)<(t=+t),i=r?g(e,t,n):g(t,e,n);return(r?-1:1)*(i<0?1/-i:i)}functiony(t,e){letn;for(consteoft)null!=e&&(n<e||void0===n&&e>=e)&&(n=e);returnn}functionm(t,e){letn;for(consteoft)null!=e&&(n>e||void0===n&&e>=e)&&(n=e);returnn}functionv(t,n,r=0,i=1/0,a){if(n=Math.floor(n),r=Math.floor(Math.max(0,r)),i=Math.floor(Math.min(t.length-1,i)),!(r<=n&&n<=i))returnt;for(a=void0===a?u:function(t=e){if(t===e)returnu;if("function"!=typeoft)thrownewTypeError("compare is not a function");return(e,n)=>{constr=t(e,n);returnr||0===r?r:(0===t(n,n))-(0===t(e,e))}}(a);i>r;){if(i-r>600){conste=i-r+1,l=n-r+1,o=Math.log(e),s=.5*Math.exp(2*o/3),u=.5*Math.sqrt(o*s*(e-s)/e)*(l-e/2<0?-1:1);v(t,n,Math.max(r,Math.floor(n-l*s/e+u)),Math.min(i,Math.floor(n+(e-l)*s/e+u)),a)}conste=t[n];letl=r,o=i;for(x(t,r,n),a(t[i],e)>0&&x(t,r,i);l<o;){for(x(t,l,o),++l,--o;a(t[l],e)<0;)++l;for(;a(t[o],e)>0;)--o}0===a(t[r],e)?x(t,r,o):(++o,x(t,o,i)),o<=n&&(r=o+1),n<=o&&(i=o-1)}returnt}functionx(t,e,n){constr=t[e];t[e]=t[n],t[n]=r}functionA(t,e){returnfunction(t,e){if((n=(t=Float64Array.from(function*(t){for(leteoft)null!=e&&(e=+e)>=e&&(yielde)}(t))).length)&&!isNaN(e=+e)){if(e<=0||n<2)returnm(t);if(e>=1)returny(t);varn,r=(n-1)*e,i=Math.floor(r),a=y(v(t,i).subarray(0,i+1));returna+(m(t.subarray(i+1))-a)*(r-i)}}(t,.5)}functionw(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(varr=-1,i=0|Math.max(0,Math.ceil((e-t)/n)),a=newArray(i);++r<i;)a[r]=t+r*n;returna}functionb(t,e){letn=0;if(void0===e)for(leteoft)(e=+e)&&(n+=e);else{letr=-1;for(letioft)(i=+e(i,++r,t))&&(n+=i)}returnn}functionD(t){returnt}vark=1e-6;functionC(t){return"translate("+t+",0)"}functionM(t){return"translate(0,"+t+")"}functionT(t){returne=>+t(e)}function_(t,e){returne=Math.max(0,t.bandwidth()-2*e)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}functionE(){return!this.__axis}functionF(t,e){varn=[],r=null,i=null,a=6,l=6,o=3,s="undefined"!=typeofwindow&&window.devicePixelRatio>1?0:.5,u=1===t||4===t?-1:1,c=4===t||2===t?"x":"y",f=1===t||3===t?C:M;functionh(h){vard=null==r?e.ticks?e.ticks.apply(e,n):e.domain():r,g=null==i?e.tickFormat?e.tickFormat.apply(e,n):D:i,p