2 lines
23 KiB
JavaScript
2 lines
23 KiB
JavaScript
|
|
"use strict";(()=>{var ge=Object.create;var K=Object.defineProperty,me=Object.defineProperties,xe=Object.getOwnPropertyDescriptor,ye=Object.getOwnPropertyDescriptors,ve=Object.getOwnPropertyNames,W=Object.getOwnPropertySymbols,we=Object.getPrototypeOf,Y=Object.prototype.hasOwnProperty,Te=Object.prototype.propertyIsEnumerable;var B=(e,t,n)=>t in e?K(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,R=(e,t)=>{for(var n in t||(t={}))Y.call(t,n)&&B(e,n,t[n]);if(W)for(var n of W(t))Te.call(t,n)&&B(e,n,t[n]);return e},Q=(e,t)=>me(e,ye(t));var be=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Ee=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let l of ve(t))!Y.call(e,l)&&l!==n&&K(e,l,{get:()=>t[l],enumerable:!(r=xe(t,l))||r.enumerable});return e};var Me=(e,t,n)=>(n=e!=null?ge(we(e)):{},Ee(t||!e||!e.__esModule?K(n,"default",{value:e,enumerable:!0}):n,e));var L=(e,t,n)=>B(e,typeof t!="symbol"?t+"":t,n);var k=(e,t,n)=>new Promise((r,l)=>{var a=i=>{try{s(n.next(i))}catch(u){l(u)}},o=i=>{try{s(n.throw(i))}catch(u){l(u)}},s=i=>i.done?r(i.value):Promise.resolve(i.value).then(a,o);s((n=n.apply(e,t)).next())});var he=be(de=>{"use strict";function j(e,t,n={}){return{name:e,from:t,meta:n}}function H(e,t){let n=[{value:e,depth:0}];for(let r=0,l=-1,a=0;r>=0;){let{value:o,depth:s}=n[r];if(l<=s&&o.type==="operator"&&o.data.operands.length>0)for(let i=o.data.operands.length;i>0;)n[++r]={value:o.data.operands[--i],depth:s+1};else{let i=t(o,a++,s);if(typeof i<"u")return i;--r}l=s}}var C=class extends Error{constructor(e,t){super(t),this.code=e}};function $(e,t){let n=ke(e);for(let r=0;r<n.length;r++){let l=t(n[r]);if(typeof l<"u")return l}}function ke(e){return e.items}function X(e,t){return $(e,n=>{let{matches:r}=n;for(let l=0;l<r.length;l++){let a=t(r[l],n);if(typeof a<"u")return a}})}function G(e,t=new Map){return(n,...r)=>{let l=t.get(n);return typeof l>"u"&&t.set(n,l=e(n,...r)),l}}function P(e,t){return Object.defineProperty(t,"name",{value:e}),t}function ee(e){return k(this,null,function*(){let t=[];if(typeof e.plugins<"u")for(let n=0;n<e.plugins.length;n++){let r=e.plugins[n];t.push(typeof r=="function"?yield r(e):r)}return t})}function te(e,t){return k(this,null,function*(){for(let n=0;n<e.length;n++){let r=t(e[n]);r instanceof Promise&&(yield r)}})}function q(e,t,n){for(let r=0;r<e.length;r++){let l=t(n,e[r]);typeof l<"u"&&(n=l)}return n}function Fe(e,t,n){return k(this,null,function*(){var r;for(let l=0;l<e.length;l++){let a=t(n,e[l]);typeof a<"u"&&(n=a instanceof Promise?(r=yield a)!=null?r:n:a)}return n})}function Re(e){return typeof e!="object"?{node:e,children:[]}:e}function qe(e){return typeof e=="object"&&e!==null&&"select"in e&&"values"in e}function N(e){return Math.max(1,Math.ceil(Math.log2(e)))}function ze(e){if(e.d+e.f+e.x>32)throw new RangeError("Bit format exceeds 32 bits");return e}function ne(e,t,n){let r=N(e),l=N(t),a=typeof n<"u"?N(n):32-r-l;return ze({d:r,f:l,x:a})}var b=[0];for(let e=0;e<32;e++)b.push(b[e]|1<<e);function Oe(e){return new Uint8Array(e)}function Qe(e){return new Uint32Array(e)}function M(){return[0].slice(0,0)}var J=class{constructor(e=[]){L(this,"magnitude",0);this.data=e}add(e,t,n){this.data.push({start:e,end:t,value:n}),this.magnitude=0}get(e){for(let t=0;t<this.data.length;t++){let{start:n,end:r,value:l}=this.data[t];if(e>=n&&e<r)return l}return 0}forEach(e){for(let t=0;t<this.data.length;t++){let{start:n,end:r,value:l}=this.data[t];for(let a=n;a<r;a++)e(a,l)}}get length(){return this.magnitude||(this.magnitude=re(this))}},D=class{constructor(e,t=M()){L(this,"magnitude",0);this.data=e,this.cols=t}add(e,t){this.cols.push(e),this.data.push(t),this.magnitude=0}get(e){for(let t=0;t<this.cols.length;t++)if(this.cols[t]===e)return this.data[t];return 0}forEach(e){for(let t=0;t<this.cols.length;t++)e(this.cols[t],this.data[t])}get length(){return this.magnitude||(this.magnitude=re(this))}};function re(e){let t=0;return e.forEach((n,r)=>{t+=r*r}),Math.sqrt(t)}function Ae(e,t){e instanceof J?e.data.forEach((n,r)=>{t(n,r)}):e.forEach((n,r)=>{t({start:n,end:n+1,value:
|