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,23 +185,23 @@ 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 fu(e){e=du(e),e.decimalSeparator,e.allowedDecimalSeparators,e.thousandsGroupStyle;var t=e.suffix,n=e.allowNegative,r=e.allowLeadingZeros,i=e.onKeyDown;i===void 0&&(i=kl);var a=e.onBlur;a===void 0&&(a=kl);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=Ol(e,[`decimalSeparator`,`allowedDecimalSeparators`,`thousandsGroupStyle`,`suffix`,`allowNegative`,`allowLeadingZeros`,`onKeyDown`,`onBlur`,`thousandSeparator`,`decimalScale`,`fixedDecimalScale`,`prefix`,`defaultValue`,`value`,`valueIsNumericString`,`onValueChange`]),h=au(e),g=h.decimalSeparator,_=h.allowedDecimalSeparators,v=function(t){return iu(t,e)},y=function(t,n){return lu(t,n,e)},b=Ml(d)?u:d,x=f??cu(b,l,t);Ml(d)?Ml(u)||(x||=typeof u==`number`):x||=typeof d==`number`;var S=function(e){return Pl(e)?e:(typeof e==`number`&&(e=Ul(e)),x&&typeof s==`number`?Wl(e,s,!!c):e)},C=eu(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||jl(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=gu(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 Gw().defined(i).curve(o).context(a)}return l.x=function(t){return arguments.length?(e=typeof t==`function`?t:fw(+t),r=null,l):e},l.x0=function(t){return arguments.length?(e=typeof t==`function`?t:fw(+t),l):e},l.x1=function(e){return arguments.length?(r=e==null?null:typeof e==`function`?e:fw(+e),l):r},l.y=function(e){return arguments.length?(t=typeof e==`function`?e:fw(+e),n=null,l):t},l.y0=function(e){return arguments.length?(t=typeof e==`function`?e:fw(+e),l):t},l.y1=function(e){return arguments.length?(n=e==null?null:typeof e==`function`?e:fw(+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:fw(!!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 Eue=o((()=>{Rw(),pw(),Vw(),Kw(),Fw(),Ww()})),Jw,Yw=o((()=>{Tw(),Jw={draw(e,t){let n=xw(t/Sw);e.moveTo(n,0),e.arc(0,0,n,0,ww)}}}));function Due(e,t){let n=null,r=Pw(i);e=typeof e==`function`?e:fw(e||Jw),t=typeof t==`function`?t:fw(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:fw(t),i):e},i.size=function(e){return arguments.length?(t=typeof e==`function`?e:fw(+e),i):t},i.context=function(e){return arguments.length?(n=e??null,i):n},i}var Oue=o((()=>{pw(),Fw(),Yw()}));function Xw(){}var Zw=o((()=>{}));function Qw(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 $w(e){this._context=e}function kue(e){return new $w(e)}var eT=o((()=>{$w.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:Qw(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:Qw(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}}}));function tT(e){this._context=e}function Aue(e){return new tT(e)}var jue=o((()=>{Zw(),eT(),tT.prototype={areaStart:Xw,areaEnd:Xw,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:Qw(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}}}));function nT(e){this._context=e}function Mue(e){return new nT(e)}var Nue=o((()=>{eT(),nT.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:Qw(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}}}));function rT(e,t){this._basis=new $w(e),this._beta=t}var iT,Pue=o((()=>{eT(),rT.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)}},iT=(function e(t){function n(e){return t===1?new $w(e):new rT(e,t)}return n.beta=function(t){return e(+t)},n})(.85)}));function aT(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 oT(e,t){this._context=e,this._k=(1-t)/6}var sT,cT=o((()=>{oT.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:aT(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:aT(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}},sT=(function e(t){function n(e){return new oT(e,t)}return n.tension=function(t){return e(+t)},n})(0)}));function lT(e,t){this._context=e,this._k=(1-t)/6}var uT,dT=o((()=>{Zw(),cT(),lT.prototype={areaStart:Xw,areaEnd:Xw,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:aT(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}},uT=(function e(t){function n(e){return new lT(e,t)}return n.tension=function(t){return e(+t)},n})(0)}));function fT(e,t){this._context=e,this._k=(1-t)/6}var pT,mT=o((()=>{cT(),fT.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:aT(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}},pT=(function e(t){function n(e){return new fT(e,t)}return n.tension=function(t){return e(+t)},n})(0)}));function hT(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 gT(e,t){this._context=e,this._alpha=t}var _T,vT=o((()=>{Tw(),cT(),gT.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:hT(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}},_T=(function e(t){function n(e){return t?new gT(e,t):new oT(e,0)}return n.alpha=function(t){return e(+t)},n})(.5)}));function yT(e,t){this._context=e,this._alpha=t}var bT,Fue=o((()=>{dT(),Zw(),vT(),yT.prototype={areaStart:Xw,areaEnd:Xw,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:hT(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 lT(e,0)}return n.alpha=function(t){return e(+t)},n})(.5)}));function xT(e,t){this._context=e,this._alpha=t}var ST,Iue=o((()=>{mT(),vT(),xT.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:hT(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}},ST=(function e(t){function n(e){return t?new xT(e,t):new fT(e,0)}return n.alpha=function(t){return e(+t)},n})(.5)}));function CT(e){this._context=e}function Lue(e){return new CT(e)}var Rue=o((()=>{Zw(),CT.prototype={areaStart:Xw,areaEnd:Xw,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 wT(e){return e<0?-1:1}function TT(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(wT(a)+wT(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function ET(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function DT(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 OT(e){this._context=e}function kT(e){this._context=new AT(e)}function AT(e){this._context=e}function zue(e){return new OT(e)}function Bue(e){return new kT(e)}var Vue=o((()=>{OT.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:DT(this,this._t0,ET(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,DT(this,ET(this,n=TT(this,e,t)),n);break;default:DT(this,this._t0,n=TT(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}},(kT.prototype=Object.create(OT.prototype)).point=function(e,t){OT.prototype.point.call(this,t,e)},AT.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 jT(e){this._context=e}function MT(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=a_(n)).precision==null&&(n.trim=!0),n=y_(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 cg(e,t){return Object.hasOwn(e,t)}var lg=o((()=>{}));function ug(e){let t={},n;function r(e){return cg(t,e)&&t[e]!==dg}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]===dg&&--i.empty),t[e]=n,this},delete(e){return r(e)&&(--i.size,++i.empty,t[e]=dg),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!==dg&&(!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 dg,Tae=o((()=>{lg(),dg={}}));function Eae(e,t,n,r,i,a){if(!n&&n!==0)return a;let o=+n,s=e[0],c=Ih(e),l;if(c===void 0)return a;c{Lh()}));function fg(e,t,n){let r=e.prototype=Object.create(t.prototype);return Object.defineProperty(r,"constructor",{value:e,writable:!0,enumerable:!0,configurable:!0}),og(r,n)}var Oae=o((()=>{xae()}));function pg(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 cg(e,t){return Object.hasOwn(e,t)}var lg=o((()=>{}));function ug(e){let t={},n;function r(e){return cg(t,e)&&t[e]!==dg}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]===dg&&--i.empty),t[e]=n,this},delete(e){return r(e)&&(--i.size,++i.empty,t[e]=dg),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!==dg&&(!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 dg,Eae=o((()=>{lg(),dg={}}));function Dae(e,t,n,r,i,a){if(!n&&n!==0)return a;let o=+n,s=e[0],c=Ih(e),l;if(c===void 0)return a;c{Lh()}));function fg(e,t,n){let r=e.prototype=Object.create(t.prototype);return Object.defineProperty(r,"constructor",{value:e,writable:!0,enumerable:!0,configurable:!0}),og(r,n)}var kae=o((()=>{Sae()}));function pg(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{Zoe=Math.sqrt(50),Qoe=Math.sqrt(10),$oe=Math.sqrt(2)}));function Yg(e,t){let n;if(t===void 0)for(let t of e)t!=null&&(n0;)--s}i(e[n],a)===0?Zg(e,n,s):(++s,Zg(e,s,r)),s<=t&&(n=s+1),t<=s&&(r=s-1)}return e}function Zg(e,t,n){let r=e[t];e[t]=e[n],e[n]=r}var ise=o((()=>{Xoe()}));function Qg(e,t,n){if(e=Float64Array.from(Foe(e,n)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return Xg(e);if(t>=1)return Yg(e);var r,i=(r-1)*t,a=Math.floor(i),o=Yg(rse(e,a).subarray(0,a+1));return o+(Xg(e.subarray(a+1))-o)*(i-a)}}function ase(e,t,n=Poe){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 ose=o((()=>{tse(),nse(),ise(),Ioe()}));function sse(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 cse=o((()=>{}));function lse(e,t){return Qg(e,.5,t)}var use=o((()=>{ose()}));function*dse(e){for(let t of e)yield*t}function fse(e){return Array.from(dse(e))}var pse=o((()=>{}));function $g(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 hse(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 gse=o((()=>{}));function _se(e,...t){e=new Ug(e),t=t.map(vse);out:for(let n of e)for(let r of t)if(!r.has(n)){e.delete(n);continue out}return e}function vse(e){return e instanceof Ug?e:new Ug(e)}var yse=o((()=>{Wg()}));function bse(...e){let t=new Ug;for(let n of e)for(let e of n)t.add(e);return t}var xse=o((()=>{Wg()})),e_=o((()=>{Loe(),Fg(),Noe(),joe(),Voe(),Hoe(),Wg(),Xoe(),ese(),ose(),tse(),cse(),use(),pse(),nse(),qoe(),ise(),mse(),gse(),zoe(),yse(),xse()}));function Sse(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString(`en`).replace(/,/g,``):e.toString(10)}function t_(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 n_=o((()=>{}));function r_(e){return e=t_(Math.abs(e)),e?e[1]:NaN}var i_=o((()=>{n_()}));function Cse(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 wse=o((()=>{}));function Tse(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}var Ese=o((()=>{}));function a_(e){if(!(t=s_.exec(e)))throw Error(`invalid format: `+e);var t;return new o_({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 o_(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 s_,c_=o((()=>{s_=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i,a_.prototype=o_.prototype,o_.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 Dse(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 Dle(e){return function(){return e=(1103515245*e+12345)%2147483647,e/2147483647}}function Ole(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*RS())},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:kS(e,t,n,o,S)}}function FS(e,t,n,r){if(r===0)return TS(e,t,n);if(r===1)return AS(e,t,n);if(r===2)return PS(e,t,n);let[i,a,o,s]=DS(e,t,n),c=i.length,l=[],u=[],d=r+1,f,p,m,h,g;for(f=0;ft(n,e),dh(t),uh(t))}function dC(e){K.call(this,[void 0,void 0],e)}function fC(e,t){gx.call(this,e),this.parent=t,this.count=0}function pC(e){K.call(this,{},e),this._keys=ug();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)}}),fg(DC,gx),fg(OC,gx),fg(kC,K,{transform(e,t){return this.modified(e.modified()),this.value=e,t.fork(t.NO_SOURCE|t.NO_FIELDS)}}),AC.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:JC,default:`sum`},{name:`limit`,type:`number`,default:0},{name:`key`,type:`field`}]},fg(AC,QS,{_transform:QS.prototype.transform,transform(e,t){return this._transform(iue(e,t),t)}}),fg(jC,pC,{transform(e,t){let n=e.subflow,r=e.field,i=e=>this.subflow(ox(e),n,t,e);return(e.modified(`field`)||r&&t.modified(dh(r)))&&U(`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(cx(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}}),MC.Definition={type:`Project`,metadata:{generates:!0,changes:!0},params:[{name:`fields`,type:`field`,array:!0},{name:`as`,type:`string`,null:!0,array:!0}]},fg(MC,K,{transform(e,t){let n=t.fork(t.NO_SOURCE),r=e.fields,i=sC(e.fields,e.as||[]),a=r?(e,t)=>sue(e,t,r,i):ux,o;return this.value?o=this.value:(t=t.addAll(),o=this.value={}),t.visit(t.REM,e=>{let t=ox(e);n.rem.push(o[t]),o[t]=null}),t.visit(t.ADD,e=>{let t=a(e,cx({}));o[ox(e)]=t,n.add.push(t)}),t.visit(t.MOD,e=>{n.mod.push(a(e,o[ox(e)]))}),n}}),fg(NC,K,{transform(e,t){return this.value=e.value,e.modified(`value`)?t.fork(t.NO_SOURCE|t.NO_FIELDS):t.StopPropagation}}),PC.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`]}]},sw=1e-14,fg(PC,K,{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=cC(i,e.groupby,e.field),o=(e.groupby||[]).map(uh),s=[],c=e.step||.01,l=e.probs||$g(c/2,1-sw,c),u=l.length;return a.forEach(e=>{let t=nS(e,l);for(let n=0;n{let t=ox(e);n.rem.push(r[t]),r[t]=null}),t.visit(t.ADD,e=>{let t=lx(e);r[ox(e)]=t,n.add.push(t)}),t.visit(t.MOD,e=>{let t=r[ox(e)];for(let r in e)t[r]=e[r],n.modifies(r);n.mod.push(t)})),n}}),IC.Definition={type:`Sample`,metadata:{},params:[{name:`size`,type:`number`,default:1e3}]},fg(IC,K,{transform(e,t){let n=t.fork(t.NO_SOURCE),r=e.modified(`size`),i=e.size,a=this.value.reduce((e,t)=>(e[ox(t)]=1,e),{}),o=this.value,s=this.count,c=0;function l(e){let t,r;o.length=c&&(t=o[r],a[ox(t)]&&n.rem.push(t),o[r]=e)),++s}if(t.rem.length&&(t.visit(t.REM,e=>{let t=ox(e);a[t]&&(a[t]=-1,n.rem.push(e)),--s}),o=o.filter(e=>a[ox(e)]!==-1)),(t.rem.length||r)&&o.length{a[ox(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))