diff --git "a/web/dist-embed/index.html" "b/web/dist-embed/index.html" --- "a/web/dist-embed/index.html" +++ "b/web/dist-embed/index.html" @@ -185,9 +185,9 @@ Please report this to https://github.com/markedjs/marked.`,e){let e=`
An error
allowNegative: `+a+`
`),a=!1),Object.assign(Object.assign({},e),{allowNegative:a})}function mu(e){e=pu(e),e.decimalSeparator,e.allowedDecimalSeparators,e.thousandsGroupStyle;var t=e.suffix,n=e.allowNegative,r=e.allowLeadingZeros,i=e.onKeyDown;i===void 0&&(i=jl);var a=e.onBlur;a===void 0&&(a=jl);var o=e.thousandSeparator,s=e.decimalScale,c=e.fixedDecimalScale,l=e.prefix;l===void 0&&(l=``);var u=e.defaultValue,d=e.value,f=e.valueIsNumericString,p=e.onValueChange,m=Al(e,[`decimalSeparator`,`allowedDecimalSeparators`,`thousandsGroupStyle`,`suffix`,`allowNegative`,`allowLeadingZeros`,`onKeyDown`,`onBlur`,`thousandSeparator`,`decimalScale`,`fixedDecimalScale`,`prefix`,`defaultValue`,`value`,`valueIsNumericString`,`onValueChange`]),h=su(e),g=h.decimalSeparator,_=h.allowedDecimalSeparators,v=function(t){return ou(t,e)},y=function(t,n){return du(t,n,e)},b=Pl(d)?u:d,x=f??uu(b,l,t);Pl(d)?Pl(u)||(x||=typeof u==`number`):x||=typeof d==`number`;var S=function(e){return Il(e)?e:(typeof e==`number`&&(e=Gl(e)),x&&typeof s==`number`?Kl(e,s,!!c):e)},C=nu(S(d),S(u),!!x,v,y,p),w=C[0],T=w.numAsString,E=w.formattedValue,D=C[1];return Object.assign(Object.assign({},m),{value:E,valueIsNumericString:!1,isValidInputCharacter:function(e){return e===g||Nl(e)},isCharacterSame:function(e){var t=e.currentValue,n=e.lastValue,r=e.formattedValue,i=e.currentValueIndex,a=e.formattedValueIndex,o=t[i],u=r[a],f=vu(n,t).to,p=function(e){return y(e).indexOf(`.`)+l.length};return d===0&&c&&s&&t[f.start]===g&&p(t)a?!1:i>=f.start&&i =d;--f)s.point(_[f],v[f]);s.lineEnd(),s.areaEnd()}h&&(_[u]=+e(m,u,l),v[u]=+t(m,u,l),s.point(r?+r(m,u,l):_[u],n?+n(m,u,l):v[u]))}if(g)return s=null,g+``||null}function u(){return Uw().defined(i).curve(o).context(a)}return l.x=function(t){return arguments.length?(e=typeof t==`function`?t:uw(+t),r=null,l):e},l.x0=function(t){return arguments.length?(e=typeof t==`function`?t:uw(+t),l):e},l.x1=function(e){return arguments.length?(r=e==null?null:typeof e==`function`?e:uw(+e),l):r},l.y=function(e){return arguments.length?(t=typeof e==`function`?e:uw(+e),n=null,l):t},l.y0=function(e){return arguments.length?(t=typeof e==`function`?e:uw(+e),l):t},l.y1=function(e){return arguments.length?(n=e==null?null:typeof e==`function`?e:uw(+e),l):n},l.lineX0=l.lineY0=function(){return u().x(e).y(t)},l.lineY1=function(){return u().x(e).y(n)},l.lineX1=function(){return u().x(r).y(t)},l.defined=function(e){return arguments.length?(i=typeof e==`function`?e:uw(!!e),l):i},l.curve=function(e){return arguments.length?(o=e,a!=null&&(s=o(a)),l):o},l.context=function(e){return arguments.length?(e==null?a=s=null:s=o(a=e),l):a},l}var Hle=o((()=>{Iw(),dw(),zw(),Ww(),Nw(),Hw()})),Kw,qw=o((()=>{Cw(),Kw={draw(e,t){let n=yw(t/bw);e.moveTo(n,0),e.arc(0,0,n,0,Sw)}}}));function Ule(e,t){let n=null,r=Mw(i);e=typeof e==`function`?e:uw(e||Kw),t=typeof t==`function`?t:uw(t===void 0?64:+t);function i(){let i;if(n||=i=r(),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),i)return n=null,i+``||null}return i.type=function(t){return arguments.length?(e=typeof t==`function`?t:uw(t),i):e},i.size=function(e){return arguments.length?(t=typeof e==`function`?e:uw(+e),i):t},i.context=function(e){return arguments.length?(n=e??null,i):n},i}var Wle=o((()=>{dw(),Nw(),qw()}));function Jw(){}var Yw=o((()=>{}));function Xw(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function Zw(e){this._context=e}function Gle(e){return new Zw(e)}var Qw=o((()=>{Zw.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Xw(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Xw(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}}}));function $w(e){this._context=e}function Kle(e){return new $w(e)}var qle=o((()=>{Yw(),Qw(),$w.prototype={areaStart:Jw,areaEnd:Jw,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Xw(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}}}));function eT(e){this._context=e}function Jle(e){return new eT(e)}var Yle=o((()=>{Qw(),eT.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:Xw(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}}}));function tT(e,t){this._basis=new Zw(e),this._beta=t}var nT,Xle=o((()=>{Qw(),tT.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,n=e.length-1;if(n>0)for(var r=e[0],i=t[0],a=e[n]-r,o=t[n]-i,s=-1,c;++s<=n;)c=s/n,this._basis.point(this._beta*e[s]+(1-this._beta)*(r+c*a),this._beta*t[s]+(1-this._beta)*(i+c*o));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}},nT=(function e(t){function n(e){return t===1?new Zw(e):new tT(e,t)}return n.beta=function(t){return e(+t)},n})(.85)}));function rT(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function iT(e,t){this._context=e,this._k=(1-t)/6}var aT,oT=o((()=>{iT.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:rT(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:rT(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}},aT=(function e(t){function n(e){return new iT(e,t)}return n.tension=function(t){return e(+t)},n})(0)}));function sT(e,t){this._context=e,this._k=(1-t)/6}var cT,lT=o((()=>{Yw(),oT(),sT.prototype={areaStart:Jw,areaEnd:Jw,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:rT(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}},cT=(function e(t){function n(e){return new sT(e,t)}return n.tension=function(t){return e(+t)},n})(0)}));function uT(e,t){this._context=e,this._k=(1-t)/6}var dT,fT=o((()=>{oT(),uT.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:rT(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}},dT=(function e(t){function n(e){return new uT(e,t)}return n.tension=function(t){return e(+t)},n})(0)}));function pT(e,t,n){var r=e._x1,i=e._y1,a=e._x2,o=e._y2;if(e._l01_a>1e-12){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,c=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/c,i=(i*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/c}if(e._l23_a>1e-12){var l=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,u=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*l+e._x1*e._l23_2a-t*e._l12_2a)/u,o=(o*l+e._y1*e._l23_2a-n*e._l12_2a)/u}e._context.bezierCurveTo(r,i,a,o,e._x2,e._y2)}function mT(e,t){this._context=e,this._alpha=t}var hT,gT=o((()=>{Cw(),oT(),mT.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+this._alpha)}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:pT(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}},hT=(function e(t){function n(e){return t?new mT(e,t):new iT(e,0)}return n.alpha=function(t){return e(+t)},n})(.5)}));function _T(e,t){this._context=e,this._alpha=t}var vT,Zle=o((()=>{lT(),Yw(),gT(),_T.prototype={areaStart:Jw,areaEnd:Jw,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+this._alpha)}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:pT(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}},vT=(function e(t){function n(e){return t?new _T(e,t):new sT(e,0)}return n.alpha=function(t){return e(+t)},n})(.5)}));function yT(e,t){this._context=e,this._alpha=t}var bT,Qle=o((()=>{fT(),gT(),yT.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+this._alpha)}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:pT(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}},bT=(function e(t){function n(e){return t?new yT(e,t):new uT(e,0)}return n.alpha=function(t){return e(+t)},n})(.5)}));function xT(e){this._context=e}function $le(e){return new xT(e)}var eue=o((()=>{Yw(),xT.prototype={areaStart:Jw,areaEnd:Jw,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}}}));function ST(e){return e<0?-1:1}function CT(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(ST(a)+ST(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function wT(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function TT(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-r)/3;e._context.bezierCurveTo(r+s,i+s*t,a-s,o-s*n,a,o)}function ET(e){this._context=e}function DT(e){this._context=new OT(e)}function OT(e){this._context=e}function tue(e){return new ET(e)}function nue(e){return new DT(e)}var rue=o((()=>{ET.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:TT(this,this._t0,wT(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,TT(this,wT(this,n=CT(this,e,t)),n);break;default:TT(this,this._t0,n=CT(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}},(DT.prototype=Object.create(ET.prototype)).point=function(e,t){ET.prototype.point.call(this,t,e)},OT.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,a){this._context.bezierCurveTo(t,e,r,n,a,i)}}}));function kT(e){this._context=e}function AT(e){var t,n=e.length-1,r,i=Array(n),a=Array(n),o=Array(n);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t {if(e??=10,n??=r===10?`s`:`,`,typeof n!=`function`&&(!(r%1)&&(n=p_(n)).precision==null&&(n.trim=!0),n=b_(n)),e===1/0)return n;let o=Math.max(1,r*e/t.ticks().length);return e=>{let t=e/a(Math.round(i(e)));return t*r=s){o=c=s;break}if(r===n)return[-1,-1];for(i=a=r;++r{}));function _g(e,t){return Object.hasOwn(e,t)}var vg=o((()=>{}));function yg(e){let t={},n;function r(e){return _g(t,e)&&t[e]!==bg}let i={size:0,empty:0,object:t,has:r,get(e){return r(e)?t[e]:void 0},set(e,n){return r(e)||(++i.size,t[e]===bg&&--i.empty),t[e]=n,this},delete(e){return r(e)&&(--i.size,++i.empty,t[e]=bg),this},clear(){i.size=i.empty=0,i.object=t={}},test(e){return arguments.length?(n=e,i):n},clean(){let e={},r=0;for(let i in t){let a=t[i];a!==bg&&(!n||!n(a))&&(e[i]=a,++r)}i.size=r,i.empty=0,i.object=t=e}};return e&&Object.keys(e).forEach(t=>{i.set(t,e[t])}),i}var bg,jie=o((()=>{vg(),bg={}}));function Mie(e,t,n,r,i,a){if(!n&&n!==0)return a;let o=+n,s=e[0],c=Mh(e),l;if(c===void 0)return a;c{Nh()}));function U(e,t,n){let r=e.prototype=Object.create(t.prototype);return Object.defineProperty(r,"constructor",{value:e,writable:!0,enumerable:!0,configurable:!0}),hg(r,n)}var Pie=o((()=>{Die()}));function xg(e,t,n,r){let i=t[0],a=t[t.length-1],o;return i>a&&(o=i,i=a,a=o),n=n===void 0||n,r=r===void 0||r,(n?i<=e:i=s){o=c=s;break}if(r===n)return[-1,-1];for(i=a=r;++r{}));function fg(e,t){return Object.hasOwn(e,t)}var pg=o((()=>{}));function mg(e){let t={},n;function r(e){return fg(t,e)&&t[e]!==hg}let i={size:0,empty:0,object:t,has:r,get(e){return r(e)?t[e]:void 0},set(e,n){return r(e)||(++i.size,t[e]===hg&&--i.empty),t[e]=n,this},delete(e){return r(e)&&(--i.size,++i.empty,t[e]=hg),this},clear(){i.size=i.empty=0,i.object=t={}},test(e){return arguments.length?(n=e,i):n},clean(){let e={},r=0;for(let i in t){let a=t[i];a!==hg&&(!n||!n(a))&&(e[i]=a,++r)}i.size=r,i.empty=0,i.object=t=e}};return e&&Object.keys(e).forEach(t=>{i.set(t,e[t])}),i}var hg,Uie=o((()=>{pg(),hg={}}));function Wie(e,t,n,r,i,a){if(!n&&n!==0)return a;let o=+n,s=e[0],c=jh(e),l;if(c===void 0)return a;c{Mh()}));function U(e,t,n){let r=e.prototype=Object.create(t.prototype);return Object.defineProperty(r,"constructor",{value:e,writable:!0,enumerable:!0,configurable:!0}),ug(r,n)}var Kie=o((()=>{zie()}));function gg(e,t,n,r){let i=t[0],a=t[t.length-1],o;return i>a&&(o=i,i=a,a=o),n=n===void 0||n,r=r===void 0||r,(n?i<=e:i0))return[];if(e===t)return[e];let r=t{roe=Math.sqrt(50),ioe=Math.sqrt(10),aoe=Math.sqrt(2)}));function r_(e,t){let n;if(t===void 0)for(let t of e)t!=null&&(n0;)--s}i(e[n],a)===0?a_(e,n,s):(++s,a_(e,s,r)),s<=t&&(n=s+1),t<=s&&(r=s-1)}return e}function a_(e,t,n){let r=e[t];e[t]=e[n],e[n]=r}var uoe=o((()=>{noe()}));function o_(e,t,n){if(e=Float64Array.from(Vae(e,n)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return i_(e);if(t>=1)return r_(e);var r,i=(r-1)*t,a=Math.floor(i),o=r_(loe(e,a).subarray(0,a+1));return o+(i_(e.subarray(a+1))-o)*(i-a)}}function doe(e,t,n=Bae){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,a=Math.floor(i),o=+n(e[a],a,e);return o+(+n(e[a+1],a+1,e)-o)*(i-a)}}var foe=o((()=>{soe(),coe(),uoe(),Hae()}));function poe(e,t){let n=0,r=0;if(t===void 0)for(let t of e)t!=null&&(t=+t)>=t&&(++n,r+=t);else{let i=-1;for(let a of e)(a=t(a,++i,e))!=null&&(a=+a)>=a&&(++n,r+=a)}if(n)return r/n}var moe=o((()=>{}));function hoe(e,t){return o_(e,.5,t)}var goe=o((()=>{foe()}));function*_oe(e){for(let t of e)yield*t}function voe(e){return Array.from(_oe(e))}var yoe=o((()=>{}));function s_(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,a=Array(i);++r{}));function xoe(e,t){let n=0;if(t===void 0)for(let t of e)(t=+t)&&(n+=t);else{let r=-1;for(let i of e)(i=+t(i,++r,e))&&(n+=i)}return n}var Soe=o((()=>{}));function Coe(e,...t){e=new Zg(e),t=t.map(woe);out:for(let n of e)for(let r of t)if(!r.has(n)){e.delete(n);continue out}return e}function woe(e){return e instanceof Zg?e:new Zg(e)}var Toe=o((()=>{Qg()}));function Eoe(...e){let t=new Zg;for(let n of e)for(let e of n)t.add(e);return t}var Doe=o((()=>{Qg()})),c_=o((()=>{Uae(),Ug(),zae(),Lae(),qae(),Jae(),Qg(),noe(),ooe(),foe(),soe(),moe(),goe(),yoe(),coe(),$ae(),uoe(),boe(),Soe(),Gae(),Toe(),Doe()}));function Ooe(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString(`en`).replace(/,/g,``):e.toString(10)}function l_(e,t){if(!isFinite(e)||e===0)return null;var n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf(`e`),r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}var u_=o((()=>{}));function d_(e){return e=l_(Math.abs(e)),e?e[1]:NaN}var f_=o((()=>{u_()}));function koe(e,t){return function(n,r){for(var i=n.length,a=[],o=0,s=e[0],c=0;i>0&&s>0&&(c+s+1>r&&(s=Math.max(1,r-c)),a.push(n.substring(i-=s,i+s)),!((c+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(t)}}var Aoe=o((()=>{}));function joe(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}var Moe=o((()=>{}));function p_(e){if(!(t=Noe.exec(e)))throw Error(`invalid format: `+e);var t;return new m_({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function m_(e){this.fill=e.fill===void 0?` `:e.fill+``,this.align=e.align===void 0?`>`:e.align+``,this.sign=e.sign===void 0?`-`:e.sign+``,this.symbol=e.symbol===void 0?``:e.symbol+``,this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?``:e.type+``}var Noe,Poe=o((()=>{Noe=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i,p_.prototype=m_.prototype,m_.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 Foe(e){out:for(var t=e.length,n=1,r=-1,i;n>1);oi;)e[o--]=e[r]}r=i,i=a}return e}function Uce(e){return function(){return e=(1103515245*e+12345)%2147483647,e/2147483647}}function Wce(e,t){t??(t=e,e=0);let n,r,i,a={min(e){return arguments.length?(n=e||0,i=r-n,a):n},max(e){return arguments.length?(r=e||0,i=r-n,a):r},sample(){return n+Math.floor(i*IS())},pdf(e){return e===Math.floor(e)&&e>=n&&e(e-=a,y*e*e+b*e+x+o);return{coef:[x-b*a+y*a*a+o,b-2*y*a,y],predict:S,rSquared:DS(e,t,n,o,S)}}function NS(e,t,n,r){if(r===0)return CS(e,t,n);if(r===1)return OS(e,t,n);if(r===2)return MS(e,t,n);let[i,a,o,s]=TS(e,t,n),c=i.length,l=[],u=[],d=r+1,f,p,m,h,g;for(f=0;ft(n,e),sh(t),oh(t))}function lC(e){G.call(this,[void 0,void 0],e)}function uC(e,t){mx.call(this,e),this.parent=t,this.count=0}function dC(e){G.call(this,{},e),this._keys=yg();let t=this._targets=[];t.active=0,t.forEach=e=>{for(let n=0,r=t.active;n{for(let t=0,a;tt.modified(e.fields)),c|=p?t.MOD:0),t.visit(c,d),l.modifies(u)}}),U(TC,mx),U(EC,mx),U(DC,G,{transform(e,t){return this.modified(e.modified()),this.value=e,t.fork(t.NO_SOURCE|t.NO_FIELDS)}}),OC.Definition={type:`Pivot`,metadata:{generates:!0,changes:!0},params:[{name:`groupby`,type:`field`,array:!0},{name:`field`,type:`field`,required:!0},{name:`value`,type:`field`,required:!0},{name:`op`,type:`enum`,values:KC,default:`sum`},{name:`limit`,type:`number`,default:0},{name:`key`,type:`field`}]},U(OC,XS,{_transform:XS.prototype.transform,transform(e,t){return this._transform(ble(e,t),t)}}),U(kC,dC,{transform(e,t){let n=e.subflow,r=e.field,i=e=>this.subflow(ix(e),n,t,e);return(e.modified(`field`)||r&&t.modified(sh(r)))&&V(`PreFacet does not support field modification.`),this.initTargets(),r?(t.visit(t.MOD,e=>{let t=i(e);r(e).forEach(e=>t.mod(e))}),t.visit(t.ADD,e=>{let t=i(e);r(e).forEach(e=>t.add(ox(e)))}),t.visit(t.REM,e=>{let t=i(e);r(e).forEach(e=>t.rem(e))})):(t.visit(t.MOD,e=>i(e).mod(e)),t.visit(t.ADD,e=>i(e).add(e)),t.visit(t.REM,e=>i(e).rem(e))),t.clean()&&t.runAfter(()=>this.clean()),t}}),AC.Definition={type:`Project`,metadata:{generates:!0,changes:!0},params:[{name:`fields`,type:`field`,array:!0},{name:`as`,type:`string`,null:!0,array:!0}]},U(AC,G,{transform(e,t){let n=t.fork(t.NO_SOURCE),r=e.fields,i=aC(e.fields,e.as||[]),a=r?(e,t)=>Cle(e,t,r,i):cx,o;return this.value?o=this.value:(t=t.addAll(),o=this.value={}),t.visit(t.REM,e=>{let t=ix(e);n.rem.push(o[t]),o[t]=null}),t.visit(t.ADD,e=>{let t=a(e,ox({}));o[ix(e)]=t,n.add.push(t)}),t.visit(t.MOD,e=>{n.mod.push(a(e,o[ix(e)]))}),n}}),U(jC,G,{transform(e,t){return this.value=e.value,e.modified(`value`)?t.fork(t.NO_SOURCE|t.NO_FIELDS):t.StopPropagation}}),MC.Definition={type:`Quantile`,metadata:{generates:!0,changes:!0},params:[{name:`groupby`,type:`field`,array:!0},{name:`field`,type:`field`,required:!0},{name:`probs`,type:`number`,array:!0},{name:`step`,type:`number`,default:.01},{name:`as`,type:`string`,array:!0,default:[`prob`,`value`]}]},aw=1e-14,U(MC,G,{transform(e,t){let n=t.fork(t.NO_SOURCE|t.NO_FIELDS),r=e.as||[`prob`,`value`];if(this.value&&!e.modified()&&!t.changed())return n.source=this.value,n;let i=t.materialize(t.SOURCE).source,a=oC(i,e.groupby,e.field),o=(e.groupby||[]).map(oh),s=[],c=e.step||.01,l=e.probs||s_(c/2,1-aw,c),u=l.length;return a.forEach(e=>{let t=eS(e,l);for(let n=0;n{let t=ix(e);n.rem.push(r[t]),r[t]=null}),t.visit(t.ADD,e=>{let t=sx(e);r[ix(e)]=t,n.add.push(t)}),t.visit(t.MOD,e=>{let t=r[ix(e)];for(let r in e)t[r]=e[r],n.modifies(r);n.mod.push(t)})),n}}),PC.Definition={type:`Sample`,metadata:{},params:[{name:`size`,type:`number`,default:1e3}]},U(PC,G,{transform(e,t){let n=t.fork(t.NO_SOURCE),r=e.modified(`size`),i=e.size,a=this.value.reduce((e,t)=>(e[ix(t)]=1,e),{}),o=this.value,s=this.count,c=0;function l(e){let t,r;o.length=c&&(t=o[r],a[ix(t)]&&n.rem.push(t),o[r]=e)),++s}if(t.rem.length&&(t.visit(t.REM,e=>{let t=ix(e);a[t]&&(a[t]=-1,n.rem.push(e)),--s}),o=o.filter(e=>a[ix(e)]!==-1)),(t.rem.length||r)&&o.length{a[ix(e)]||l(e)}),c=-1),r&&o.length>i){let e=o.length-i;for(let t=0;t>>1),r(t.slice(0,c))