"use strict";vart=require("obsidian");functione(t,e,n,r){returnnew(n||(n=Promise))((function(i,a){functionl(t){try{u(r.next(t))}catch(t){a(t)}}functiono(t){try{u(r.throw(t))}catch(t){a(t)}}functionu(t){vare;t.done?i(t.value):(e=t.value,einstanceofn?e:newn((function(t){t(e)}))).then(l,o)}u((r=r.apply(t,e||[])).next())}))}functionn(t,e){returnnull==t||null==e?NaN:t<e?-1:t>e?1:t>=e?0:NaN}functionr(t,e){returnnull==t||null==e?NaN:e<t?-1:e>t?1:e>=t?0:NaN}functioni(t){lete,i,l;functiono(t,n,r=0,a=t.length){if(r<a){if(0!==e(n,n))returna;do{conste=r+a>>>1;i(t[e],n)<0?r=e+1:a=e}while(r<a)}returnr}return2!==t.length?(e=n,i=(e,r)=>n(t(e),r),l=(e,n)=>t(e)-n):(e=t===n||t===r?t:a,i=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,n,r=0,a=t.length){if(r<a){if(0!==e(n,n))returna;do{conste=r+a>>>1;i(t[e],n)<=0?r=e+1:a=e}while(r<a)}returnr}}}functiona(){return0}"function"==typeofSuppressedError&&SuppressedError;constl=i(n).right;i((function(t){returnnull===t?NaN:+t})).center;varo=l;classuextendsMap{constructor(t,e=f){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(s(this,t))}has(t){returnsuper.has(s(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))}}functions({_intern:t,_key:e},n){constr=e(n);returnt.has(r)?t.get(r):n}functionf(t){returnnull!==t&&"object"==typeoft?t.valueOf():t}functionc(t,e){return(null==t||!(t>=t))-(null==e||!(e>=e))||(t<e?-1:t>e?1:0)}consth=Math.sqrt(50),d=Math.sqrt(10),g=Math.sqrt(2);functionp(t,e,n){constr=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/Math.pow(10,i),l=a>=h?10:a>=d?5:a>=g?2:1;leto,u,s;returni<0?(s=Math.pow(10,-i)/l,o=Math.round(t*s),u=Math.round(e*s),o/s<t&&++o,u/s>e&&--u,s=-s):(s=Math.pow(10,i)*l,o=Math.round(t/s),u=Math.round(e/s),o*s<t&&++o,u*s>e&&--u),u<o&&.5<=n&&n<2?p(t,e,2*n):[o,u,s]}functiony(t,e,n){returnp(t=+t,e=+e,n=+n)[2]}functionm(t,e,n){n=+n;constr=(e=+e)<(t=+t),i=r?y(e,t,n):y(t,e,n);return(r?-1:1)*(i<0?1/-i:i)}functionv(t,e){letn;if(void0===e)for(consteoft)null!=e&&(n<e||void0===n&&e>=e)&&(n=e);else{letr=-1;for(letioft)null!=(i=e(i,++r,t))&&(n<i||void0===n&&i>=i)&&(n=i)}returnn}functionx(t,e){letn;if(void0===e)for(consteoft)null!=e&&(n>e||void0===n&&e>=e)&&(n=e);else{letr=-1;for(letioft)null!=(i=e(i,++r,t))&&(n>i||void0===n&&i>=i)&&(n=i)}returnn}functionA(t,e,r=0,i=1/0,a){if(e=Math.floor(e),r=Math.floor(Math.max(0,r)),i=Math.floor(Math.min(t.length-1,i)),!(r<=e&&e<=i))returnt;for(a=void0===a?c:function(t=n){if(t===n)returnc;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){constn=i-r+1,l=e-r+1,o=Math.log(n),u=.5*Math.exp(2*o/3),s=.5*Math.sqrt(o*u*(n-u)/n)*(l-n/2<0?-1:1);A(t,e,Math.max(r,Math.floor(e-l*u/n+s)),Math.min(i,Math.floor(e+(n-l)*u/n+s)),a)}constn=t[e];letl=r,o=i;for(w(t,r,e),a(t[i],n)>0&&w(t,r,i);l<o;){for(w(t,l,o),++l,--o;a(t[l],n)<0;)++l;for(;a(t[o],n)>0;)--o}0===a(t[r],n)?w(t,r,o):(++o,w(t,o,i)),o<=e&&(r=o+1),e<=o&&(i=o-1)}returnt}functionw(t,e,n){constr=t[e];t[e]=t[n],t[n]=r}functionb(t,e){returnfunction(t,e,n){if(t=Float64Array.from(function*(t,e){if(void0===e)for(leteoft)null!=e&&(e=+e)>=e&&(yielde);else{letn=-1;for(letroft)null!=(r=e(r,++n,t))&&(r=+r)>=r&&(yieldr)}}(t,n)),(r=t.length)&&!isNaN(e=+e)){if(e<=0||r<2)returnx(t);if(e>=1)returnv(t);varr,i=(r-1)*e,a=Math.floor(i),l=v(A(t,a).subarray(0,a+1));returnl+(x(t.subarray(a+1))-l)*(i-a)}}(t,.5,e)}functionD(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}functionk(t,e){letn=0;if(void0===e)for(leteoft)(e=+e)