UNPKG

mathjslab

Version:

MathJSLab - An interpreter with language syntax like MATLAB®/Octave, ISBN 978-65-00-82338-7.

2 lines 1.06 MB
/*! For license information please see mathjslab.web.umd2015.js.LICENSE.txt */ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.mathjslab=t():e.mathjslab=t()}(globalThis,()=>(()=>{var __webpack_modules__={3110(e,t,r){var n;!function(){"use strict";var s,i,a,o=9e15,l=1e9,c="0123456789abcdef",u="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",h="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",d={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-o,maxE:o,crypto:!1},m=!0,p="[DecimalError] ",f=p+"Invalid argument: ",g=p+"Precision limit exceeded",x=p+"crypto unavailable",y="[object Decimal]",C=Math.floor,E=Math.pow,A=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,_=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,v=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,S=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,T=1e7,b=u.length-1,M=h.length-1,N={toStringTag:y};function I(e){var t,r,n,s=e.length-1,i="",a=e[0];if(s>0){for(i+=a,t=1;t<s;t++)(r=7-(n=e[t]+"").length)&&(i+=$(r)),i+=n;(r=7-(n=(a=e[t])+"").length)&&(i+=$(r))}else if(0===a)return"0";for(;a%10==0;)a/=10;return i+a}function L(e,t,r){if(e!==~~e||e<t||e>r)throw Error(f+e)}function w(e,t,r,n){var s,i,a,o;for(i=e[0];i>=10;i/=10)--t;return--t<0?(t+=7,s=0):(s=Math.ceil((t+1)/7),t%=7),i=E(10,7-t),o=e[s]%i|0,null==n?t<3?(0==t?o=o/100|0:1==t&&(o=o/10|0),a=r<4&&99999==o||r>3&&49999==o||5e4==o||0==o):a=(r<4&&o+1==i||r>3&&o+1==i/2)&&(e[s+1]/i/100|0)==E(10,t-2)-1||(o==i/2||0==o)&&!(e[s+1]/i/100|0):t<4?(0==t?o=o/1e3|0:1==t?o=o/100|0:2==t&&(o=o/10|0),a=(n||r<4)&&9999==o||!n&&r>3&&4999==o):a=((n||r<4)&&o+1==i||!n&&r>3&&o+1==i/2)&&(e[s+1]/i/1e3|0)==E(10,t-3)-1,a}function R(e,t,r){for(var n,s,i=[0],a=0,o=e.length;a<o;){for(s=i.length;s--;)i[s]*=t;for(i[0]+=c.indexOf(e.charAt(a++)),n=0;n<i.length;n++)i[n]>r-1&&(void 0===i[n+1]&&(i[n+1]=0),i[n+1]+=i[n]/r|0,i[n]%=r)}return i.reverse()}N.absoluteValue=N.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),D(e)},N.ceil=function(){return D(new this.constructor(this),this.e+1,2)},N.clampedTo=N.clamp=function(e,t){var r=this,n=r.constructor;if(e=new n(e),t=new n(t),!e.s||!t.s)return new n(NaN);if(e.gt(t))throw Error(f+t);return r.cmp(e)<0?e:r.cmp(t)>0?t:new n(r)},N.comparedTo=N.cmp=function(e){var t,r,n,s,i=this,a=i.d,o=(e=new i.constructor(e)).d,l=i.s,c=e.s;if(!a||!o)return l&&c?l!==c?l:a===o?0:!a^l<0?1:-1:NaN;if(!a[0]||!o[0])return a[0]?l:o[0]?-c:0;if(l!==c)return l;if(i.e!==e.e)return i.e>e.e^l<0?1:-1;for(t=0,r=(n=a.length)<(s=o.length)?n:s;t<r;++t)if(a[t]!==o[t])return a[t]>o[t]^l<0?1:-1;return n===s?0:n>s^l<0?1:-1},N.cosine=N.cos=function(){var e,t,r=this,n=r.constructor;return r.d?r.d[0]?(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+7,n.rounding=1,r=function(e,t){var r,n,s;if(t.isZero())return t;(n=t.d.length)<32?s=(1/K(4,r=Math.ceil(n/3))).toString():(r=16,s="2.3283064365386962890625e-10"),e.precision+=r,t=J(e,1,t.times(s),new e(1));for(var i=r;i--;){var a=t.times(t);t=a.times(a).minus(a).times(8).plus(1)}return e.precision-=r,t}(n,Z(n,r)),n.precision=e,n.rounding=t,D(2==a||3==a?r.neg():r,e,t,!0)):new n(1):new n(NaN)},N.cubeRoot=N.cbrt=function(){var e,t,r,n,s,i,a,o,l,c,u=this,h=u.constructor;if(!u.isFinite()||u.isZero())return new h(u);for(m=!1,(i=u.s*E(u.s*u,1/3))&&Math.abs(i)!=1/0?n=new h(i.toString()):(r=I(u.d),(i=((e=u.e)-r.length+1)%3)&&(r+=1==i||-2==i?"0":"00"),i=E(r,1/3),e=C((e+1)/3)-(e%3==(e<0?-1:2)),(n=new h(r=i==1/0?"5e"+e:(r=i.toExponential()).slice(0,r.indexOf("e")+1)+e)).s=u.s),a=(e=h.precision)+3;;)if(c=(l=(o=n).times(o).times(o)).plus(u),n=O(c.plus(u).times(o),c.plus(l),a+2,1),I(o.d).slice(0,a)===(r=I(n.d)).slice(0,a)){if("9999"!=(r=r.slice(a-3,a+1))&&(s||"4999"!=r)){+r&&(+r.slice(1)||"5"!=r.charAt(0))||(D(n,e+1,1),t=!n.times(n).times(n).eq(u));break}if(!s&&(D(o,e+1,0),o.times(o).times(o).eq(u))){n=o;break}a+=4,s=1}return m=!0,D(n,e,h.rounding,t)},N.decimalPlaces=N.dp=function(){var e,t=this.d,r=NaN;if(t){if(r=7*((e=t.length-1)-C(this.e/7)),e=t[e])for(;e%10==0;e/=10)r--;r<0&&(r=0)}return r},N.dividedBy=N.div=function(e){return O(this,new this.constructor(e))},N.dividedToIntegerBy=N.divToInt=function(e){var t=this.constructor;return D(O(this,new t(e),0,1,1),t.precision,t.rounding)},N.equals=N.eq=function(e){return 0===this.cmp(e)},N.floor=function(){return D(new this.constructor(this),this.e+1,3)},N.greaterThan=N.gt=function(e){return this.cmp(e)>0},N.greaterThanOrEqualTo=N.gte=function(e){var t=this.cmp(e);return 1==t||0===t},N.hyperbolicCosine=N.cosh=function(){var e,t,r,n,s,i=this,a=i.constructor,o=new a(1);if(!i.isFinite())return new a(i.s?1/0:NaN);if(i.isZero())return o;r=a.precision,n=a.rounding,a.precision=r+Math.max(i.e,i.sd())+4,a.rounding=1,(s=i.d.length)<32?t=(1/K(4,e=Math.ceil(s/3))).toString():(e=16,t="2.3283064365386962890625e-10"),i=J(a,1,i.times(t),new a(1),!0);for(var l,c=e,u=new a(8);c--;)l=i.times(i),i=o.minus(l.times(u.minus(l.times(u))));return D(i,a.precision=r,a.rounding=n,!0)},N.hyperbolicSine=N.sinh=function(){var e,t,r,n,s=this,i=s.constructor;if(!s.isFinite()||s.isZero())return new i(s);if(t=i.precision,r=i.rounding,i.precision=t+Math.max(s.e,s.sd())+4,i.rounding=1,(n=s.d.length)<3)s=J(i,2,s,s,!0);else{e=(e=1.4*Math.sqrt(n))>16?16:0|e,s=J(i,2,s=s.times(1/K(5,e)),s,!0);for(var a,o=new i(5),l=new i(16),c=new i(20);e--;)a=s.times(s),s=s.times(o.plus(a.times(l.times(a).plus(c))))}return i.precision=t,i.rounding=r,D(s,t,r,!0)},N.hyperbolicTangent=N.tanh=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+7,n.rounding=1,O(r.sinh(),r.cosh(),n.precision=e,n.rounding=t)):new n(r.s)},N.inverseCosine=N.acos=function(){var e=this,t=e.constructor,r=e.abs().cmp(1),n=t.precision,s=t.rounding;return-1!==r?0===r?e.isNeg()?V(t,n,s):new t(0):new t(NaN):e.isZero()?V(t,n+4,s).times(.5):(t.precision=n+6,t.rounding=1,e=new t(1).minus(e).div(e.plus(1)).sqrt().atan(),t.precision=n,t.rounding=s,e.times(2))},N.inverseHyperbolicCosine=N.acosh=function(){var e,t,r=this,n=r.constructor;return r.lte(1)?new n(r.eq(1)?0:NaN):r.isFinite()?(e=n.precision,t=n.rounding,n.precision=e+Math.max(Math.abs(r.e),r.sd())+4,n.rounding=1,m=!1,r=r.times(r).minus(1).sqrt().plus(r),m=!0,n.precision=e,n.rounding=t,r.ln()):new n(r)},N.inverseHyperbolicSine=N.asinh=function(){var e,t,r=this,n=r.constructor;return!r.isFinite()||r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+2*Math.max(Math.abs(r.e),r.sd())+6,n.rounding=1,m=!1,r=r.times(r).plus(1).sqrt().plus(r),m=!0,n.precision=e,n.rounding=t,r.ln())},N.inverseHyperbolicTangent=N.atanh=function(){var e,t,r,n,s=this,i=s.constructor;return s.isFinite()?s.e>=0?new i(s.abs().eq(1)?s.s/0:s.isZero()?s:NaN):(e=i.precision,t=i.rounding,n=s.sd(),Math.max(n,e)<2*-s.e-1?D(new i(s),e,t,!0):(i.precision=r=n-s.e,s=O(s.plus(1),new i(1).minus(s),r+e,1),i.precision=e+4,i.rounding=1,s=s.ln(),i.precision=e,i.rounding=t,s.times(.5))):new i(NaN)},N.inverseSine=N.asin=function(){var e,t,r,n,s=this,i=s.constructor;return s.isZero()?new i(s):(t=s.abs().cmp(1),r=i.precision,n=i.rounding,-1!==t?0===t?((e=V(i,r+4,n).times(.5)).s=s.s,e):new i(NaN):(i.precision=r+6,i.rounding=1,s=s.div(new i(1).minus(s.times(s)).sqrt().plus(1)).atan(),i.precision=r,i.rounding=n,s.times(2)))},N.inverseTangent=N.atan=function(){var e,t,r,n,s,i,a,o,l,c=this,u=c.constructor,h=u.precision,d=u.rounding;if(c.isFinite()){if(c.isZero())return new u(c);if(c.abs().eq(1)&&h+4<=M)return(a=V(u,h+4,d).times(.25)).s=c.s,a}else{if(!c.s)return new u(NaN);if(h+4<=M)return(a=V(u,h+4,d).times(.5)).s=c.s,a}for(u.precision=o=h+10,u.rounding=1,e=r=Math.min(28,o/7+2|0);e;--e)c=c.div(c.times(c).plus(1).sqrt().plus(1));for(m=!1,t=Math.ceil(o/7),n=1,l=c.times(c),a=new u(c),s=c;-1!==e;)if(s=s.times(l),i=a.minus(s.div(n+=2)),s=s.times(l),void 0!==(a=i.plus(s.div(n+=2))).d[t])for(e=t;a.d[e]===i.d[e]&&e--;);return r&&(a=a.times(2<<r-1)),m=!0,D(a,u.precision=h,u.rounding=d,!0)},N.isFinite=function(){return!!this.d},N.isInteger=N.isInt=function(){return!!this.d&&C(this.e/7)>this.d.length-2},N.isNaN=function(){return!this.s},N.isNegative=N.isNeg=function(){return this.s<0},N.isPositive=N.isPos=function(){return this.s>0},N.isZero=function(){return!!this.d&&0===this.d[0]},N.lessThan=N.lt=function(e){return this.cmp(e)<0},N.lessThanOrEqualTo=N.lte=function(e){return this.cmp(e)<1},N.logarithm=N.log=function(e){var t,r,n,s,i,a,o,l,c=this,u=c.constructor,h=u.precision,d=u.rounding;if(null==e)e=new u(10),t=!0;else{if(r=(e=new u(e)).d,e.s<0||!r||!r[0]||e.eq(1))return new u(NaN);t=e.eq(10)}if(r=c.d,c.s<0||!r||!r[0]||c.eq(1))return new u(r&&!r[0]?-1/0:1!=c.s?NaN:r?0:1/0);if(t)if(r.length>1)i=!0;else{for(s=r[0];s%10==0;)s/=10;i=1!==s}if(m=!1,a=z(c,o=h+5),n=t?P(u,o+10):z(e,o),w((l=O(a,n,o,1)).d,s=h,d))do{if(a=z(c,o+=10),n=t?P(u,o+10):z(e,o),l=O(a,n,o,1),!i){+I(l.d).slice(s+1,s+15)+1==1e14&&(l=D(l,h+1,0));break}}while(w(l.d,s+=10,d));return m=!0,D(l,h,d)},N.minus=N.sub=function(e){var t,r,n,s,i,a,o,l,c,u,h,d,p=this,f=p.constructor;if(e=new f(e),!p.d||!e.d)return p.s&&e.s?p.d?e.s=-e.s:e=new f(e.d||p.s!==e.s?p:NaN):e=new f(NaN),e;if(p.s!=e.s)return e.s=-e.s,p.plus(e);if(c=p.d,d=e.d,o=f.precision,l=f.rounding,!c[0]||!d[0]){if(d[0])e.s=-e.s;else{if(!c[0])return new f(3===l?-0:0);e=new f(p)}return m?D(e,o,l):e}if(r=C(e.e/7),u=C(p.e/7),c=c.slice(),i=u-r){for((h=i<0)?(t=c,i=-i,a=d.length):(t=d,r=u,a=c.length),i>(n=Math.max(Math.ceil(o/7),a)+2)&&(i=n,t.length=1),t.reverse(),n=i;n--;)t.push(0);t.reverse()}else{for((h=(n=c.length)<(a=d.length))&&(a=n),n=0;n<a;n++)if(c[n]!=d[n]){h=c[n]<d[n];break}i=0}for(h&&(t=c,c=d,d=t,e.s=-e.s),a=c.length,n=d.length-a;n>0;--n)c[a++]=0;for(n=d.length;n>i;){if(c[--n]<d[n]){for(s=n;s&&0===c[--s];)c[s]=T-1;--c[s],c[n]+=T}c[n]-=d[n]}for(;0===c[--a];)c.pop();for(;0===c[0];c.shift())--r;return c[0]?(e.d=c,e.e=k(c,r),m?D(e,o,l):e):new f(3===l?-0:0)},N.modulo=N.mod=function(e){var t,r=this,n=r.constructor;return e=new n(e),!r.d||!e.s||e.d&&!e.d[0]?new n(NaN):!e.d||r.d&&!r.d[0]?D(new n(r),n.precision,n.rounding):(m=!1,9==n.modulo?(t=O(r,e.abs(),0,3,1)).s*=e.s:t=O(r,e,0,n.modulo,1),t=t.times(e),m=!0,r.minus(t))},N.naturalExponential=N.exp=function(){return j(this)},N.naturalLogarithm=N.ln=function(){return z(this)},N.negated=N.neg=function(){var e=new this.constructor(this);return e.s=-e.s,D(e)},N.plus=N.add=function(e){var t,r,n,s,i,a,o,l,c,u,h=this,d=h.constructor;if(e=new d(e),!h.d||!e.d)return h.s&&e.s?h.d||(e=new d(e.d||h.s===e.s?h:NaN)):e=new d(NaN),e;if(h.s!=e.s)return e.s=-e.s,h.minus(e);if(c=h.d,u=e.d,o=d.precision,l=d.rounding,!c[0]||!u[0])return u[0]||(e=new d(h)),m?D(e,o,l):e;if(i=C(h.e/7),n=C(e.e/7),c=c.slice(),s=i-n){for(s<0?(r=c,s=-s,a=u.length):(r=u,n=i,a=c.length),s>(a=(i=Math.ceil(o/7))>a?i+1:a+1)&&(s=a,r.length=1),r.reverse();s--;)r.push(0);r.reverse()}for((a=c.length)-(s=u.length)<0&&(s=a,r=u,u=c,c=r),t=0;s;)t=(c[--s]=c[s]+u[s]+t)/T|0,c[s]%=T;for(t&&(c.unshift(t),++n),a=c.length;0==c[--a];)c.pop();return e.d=c,e.e=k(c,n),m?D(e,o,l):e},N.precision=N.sd=function(e){var t,r=this;if(void 0!==e&&e!==!!e&&1!==e&&0!==e)throw Error(f+e);return r.d?(t=U(r.d),e&&r.e+1>t&&(t=r.e+1)):t=NaN,t},N.round=function(){var e=this,t=e.constructor;return D(new t(e),e.e+1,t.rounding)},N.sine=N.sin=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+7,n.rounding=1,r=function(e,t){var r,n=t.d.length;if(n<3)return t.isZero()?t:J(e,2,t,t);r=(r=1.4*Math.sqrt(n))>16?16:0|r,t=J(e,2,t=t.times(1/K(5,r)),t);for(var s,i=new e(5),a=new e(16),o=new e(20);r--;)s=t.times(t),t=t.times(i.plus(s.times(a.times(s).minus(o))));return t}(n,Z(n,r)),n.precision=e,n.rounding=t,D(a>2?r.neg():r,e,t,!0)):new n(NaN)},N.squareRoot=N.sqrt=function(){var e,t,r,n,s,i,a=this,o=a.d,l=a.e,c=a.s,u=a.constructor;if(1!==c||!o||!o[0])return new u(!c||c<0&&(!o||o[0])?NaN:o?a:1/0);for(m=!1,0==(c=Math.sqrt(+a))||c==1/0?(((t=I(o)).length+l)%2==0&&(t+="0"),c=Math.sqrt(t),l=C((l+1)/2)-(l<0||l%2),n=new u(t=c==1/0?"5e"+l:(t=c.toExponential()).slice(0,t.indexOf("e")+1)+l)):n=new u(c.toString()),r=(l=u.precision)+3;;)if(n=(i=n).plus(O(a,i,r+2,1)).times(.5),I(i.d).slice(0,r)===(t=I(n.d)).slice(0,r)){if("9999"!=(t=t.slice(r-3,r+1))&&(s||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(D(n,l+1,1),e=!n.times(n).eq(a));break}if(!s&&(D(i,l+1,0),i.times(i).eq(a))){n=i;break}r+=4,s=1}return m=!0,D(n,l,u.rounding,e)},N.tangent=N.tan=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+10,n.rounding=1,(r=r.sin()).s=1,r=O(r,new n(1).minus(r.times(r)).sqrt(),e+10,0),n.precision=e,n.rounding=t,D(2==a||4==a?r.neg():r,e,t,!0)):new n(NaN)},N.times=N.mul=function(e){var t,r,n,s,i,a,o,l,c,u=this,h=u.constructor,d=u.d,p=(e=new h(e)).d;if(e.s*=u.s,!(d&&d[0]&&p&&p[0]))return new h(!e.s||d&&!d[0]&&!p||p&&!p[0]&&!d?NaN:d&&p?0*e.s:e.s/0);for(r=C(u.e/7)+C(e.e/7),(l=d.length)<(c=p.length)&&(i=d,d=p,p=i,a=l,l=c,c=a),i=[],n=a=l+c;n--;)i.push(0);for(n=c;--n>=0;){for(t=0,s=l+n;s>n;)o=i[s]+p[n]*d[s-n-1]+t,i[s--]=o%T|0,t=o/T|0;i[s]=(i[s]+t)%T|0}for(;!i[--a];)i.pop();return t?++r:i.shift(),e.d=i,e.e=k(i,r),m?D(e,h.precision,h.rounding):e},N.toBinary=function(e,t){return X(this,2,e,t)},N.toDecimalPlaces=N.toDP=function(e,t){var r=this,n=r.constructor;return r=new n(r),void 0===e?r:(L(e,0,l),void 0===t?t=n.rounding:L(t,0,8),D(r,e+r.e+1,t))},N.toExponential=function(e,t){var r,n=this,s=n.constructor;return void 0===e?r=F(n,!0):(L(e,0,l),void 0===t?t=s.rounding:L(t,0,8),r=F(n=D(new s(n),e+1,t),!0,e+1)),n.isNeg()&&!n.isZero()?"-"+r:r},N.toFixed=function(e,t){var r,n,s=this,i=s.constructor;return void 0===e?r=F(s):(L(e,0,l),void 0===t?t=i.rounding:L(t,0,8),r=F(n=D(new i(s),e+s.e+1,t),!1,e+n.e+1)),s.isNeg()&&!s.isZero()?"-"+r:r},N.toFraction=function(e){var t,r,n,s,i,a,o,l,c,u,h,d,p=this,g=p.d,x=p.constructor;if(!g)return new x(p);if(c=r=new x(1),n=l=new x(0),a=(i=(t=new x(n)).e=U(g)-p.e-1)%7,t.d[0]=E(10,a<0?7+a:a),null==e)e=i>0?t:c;else{if(!(o=new x(e)).isInt()||o.lt(c))throw Error(f+o);e=o.gt(t)?i>0?t:c:o}for(m=!1,o=new x(I(g)),u=x.precision,x.precision=i=7*g.length*2;h=O(o,t,0,1,1),1!=(s=r.plus(h.times(n))).cmp(e);)r=n,n=s,s=c,c=l.plus(h.times(s)),l=s,s=t,t=o.minus(h.times(s)),o=s;return s=O(e.minus(r),n,0,1,1),l=l.plus(s.times(c)),r=r.plus(s.times(n)),l.s=c.s=p.s,d=O(c,n,i,1).minus(p).abs().cmp(O(l,r,i,1).minus(p).abs())<1?[c,n]:[l,r],x.precision=u,m=!0,d},N.toHexadecimal=N.toHex=function(e,t){return X(this,16,e,t)},N.toNearest=function(e,t){var r=this,n=r.constructor;if(r=new n(r),null==e){if(!r.d)return r;e=new n(1),t=n.rounding}else{if(e=new n(e),void 0===t?t=n.rounding:L(t,0,8),!r.d)return e.s?r:e;if(!e.d)return e.s&&(e.s=r.s),e}return e.d[0]?(m=!1,r=O(r,e,0,t,1).times(e),m=!0,D(r)):(e.s=r.s,r=e),r},N.toNumber=function(){return+this},N.toOctal=function(e,t){return X(this,8,e,t)},N.toPower=N.pow=function(e){var t,r,n,s,i,a,o=this,l=o.constructor,c=+(e=new l(e));if(!(o.d&&e.d&&o.d[0]&&e.d[0]))return new l(E(+o,c));if((o=new l(o)).eq(1))return o;if(n=l.precision,i=l.rounding,e.eq(1))return D(o,n,i);if((t=C(e.e/7))>=e.d.length-1&&(r=c<0?-c:c)<=9007199254740991)return s=B(l,o,r,n),e.s<0?new l(1).div(s):D(s,n,i);if((a=o.s)<0){if(t<e.d.length-1)return new l(NaN);if(1&e.d[t]||(a=1),0==o.e&&1==o.d[0]&&1==o.d.length)return o.s=a,o}return(t=0!=(r=E(+o,c))&&isFinite(r)?new l(r+"").e:C(c*(Math.log("0."+I(o.d))/Math.LN10+o.e+1)))>l.maxE+1||t<l.minE-1?new l(t>0?a/0:0):(m=!1,l.rounding=o.s=1,r=Math.min(12,(t+"").length),(s=j(e.times(z(o,n+r)),n)).d&&w((s=D(s,n+5,1)).d,n,i)&&(t=n+10,+I((s=D(j(e.times(z(o,t+r)),t),t+5,1)).d).slice(n+1,n+15)+1==1e14&&(s=D(s,n+1,0))),s.s=a,m=!0,l.rounding=i,D(s,n,i))},N.toPrecision=function(e,t){var r,n=this,s=n.constructor;return void 0===e?r=F(n,n.e<=s.toExpNeg||n.e>=s.toExpPos):(L(e,1,l),void 0===t?t=s.rounding:L(t,0,8),r=F(n=D(new s(n),e,t),e<=n.e||n.e<=s.toExpNeg,e)),n.isNeg()&&!n.isZero()?"-"+r:r},N.toSignificantDigits=N.toSD=function(e,t){var r=this.constructor;return void 0===e?(e=r.precision,t=r.rounding):(L(e,1,l),void 0===t?t=r.rounding:L(t,0,8)),D(new r(this),e,t)},N.toString=function(){var e=this,t=e.constructor,r=F(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+r:r},N.truncated=N.trunc=function(){return D(new this.constructor(this),this.e+1,1)},N.valueOf=N.toJSON=function(){var e=this,t=e.constructor,r=F(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+r:r};var O=function(){function e(e,t,r){var n,s=0,i=e.length;for(e=e.slice();i--;)n=e[i]*t+s,e[i]=n%r|0,s=n/r|0;return s&&e.unshift(s),e}function t(e,t,r,n){var s,i;if(r!=n)i=r>n?1:-1;else for(s=i=0;s<r;s++)if(e[s]!=t[s]){i=e[s]>t[s]?1:-1;break}return i}function r(e,t,r,n){for(var s=0;r--;)e[r]-=s,s=e[r]<t[r]?1:0,e[r]=s*n+e[r]-t[r];for(;!e[0]&&e.length>1;)e.shift()}return function(n,s,a,o,l,c){var u,h,d,m,p,f,g,x,y,E,A,_,v,S,b,M,N,I,L,w,R=n.constructor,O=n.s==s.s?1:-1,F=n.d,k=s.d;if(!(F&&F[0]&&k&&k[0]))return new R(n.s&&s.s&&(F?!k||F[0]!=k[0]:k)?F&&0==F[0]||!k?0*O:O/0:NaN);for(c?(p=1,h=n.e-s.e):(c=T,p=7,h=C(n.e/p)-C(s.e/p)),L=k.length,N=F.length,E=(y=new R(O)).d=[],d=0;k[d]==(F[d]||0);d++);if(k[d]>(F[d]||0)&&h--,null==a?(S=a=R.precision,o=R.rounding):S=l?a+(n.e-s.e)+1:a,S<0)E.push(1),f=!0;else{if(S=S/p+2|0,d=0,1==L){for(m=0,k=k[0],S++;(d<N||m)&&S--;d++)b=m*c+(F[d]||0),E[d]=b/k|0,m=b%k|0;f=m||d<N}else{for((m=c/(k[0]+1)|0)>1&&(k=e(k,m,c),F=e(F,m,c),L=k.length,N=F.length),M=L,_=(A=F.slice(0,L)).length;_<L;)A[_++]=0;(w=k.slice()).unshift(0),I=k[0],k[1]>=c/2&&++I;do{m=0,(u=t(k,A,L,_))<0?(v=A[0],L!=_&&(v=v*c+(A[1]||0)),(m=v/I|0)>1?(m>=c&&(m=c-1),1==(u=t(g=e(k,m,c),A,x=g.length,_=A.length))&&(m--,r(g,L<x?w:k,x,c))):(0==m&&(u=m=1),g=k.slice()),(x=g.length)<_&&g.unshift(0),r(A,g,_,c),-1==u&&(u=t(k,A,L,_=A.length))<1&&(m++,r(A,L<_?w:k,_,c)),_=A.length):0===u&&(m++,A=[0]),E[d++]=m,u&&A[0]?A[_++]=F[M]||0:(A=[F[M]],_=1)}while((M++<N||void 0!==A[0])&&S--);f=void 0!==A[0]}E[0]||E.shift()}if(1==p)y.e=h,i=f;else{for(d=1,m=E[0];m>=10;m/=10)d++;y.e=d+h*p-1,D(y,l?a+y.e+1:a,o,f)}return y}}();function D(e,t,r,n){var s,i,a,o,l,c,u,h,d,p=e.constructor;e:if(null!=t){if(!(h=e.d))return e;for(s=1,o=h[0];o>=10;o/=10)s++;if((i=t-s)<0)i+=7,a=t,l=(u=h[d=0])/E(10,s-a-1)%10|0;else if((d=Math.ceil((i+1)/7))>=(o=h.length)){if(!n)break e;for(;o++<=d;)h.push(0);u=l=0,s=1,a=(i%=7)-7+1}else{for(u=o=h[d],s=1;o>=10;o/=10)s++;l=(a=(i%=7)-7+s)<0?0:u/E(10,s-a-1)%10|0}if(n=n||t<0||void 0!==h[d+1]||(a<0?u:u%E(10,s-a-1)),c=r<4?(l||n)&&(0==r||r==(e.s<0?3:2)):l>5||5==l&&(4==r||n||6==r&&(i>0?a>0?u/E(10,s-a):0:h[d-1])%10&1||r==(e.s<0?8:7)),t<1||!h[0])return h.length=0,c?(t-=e.e+1,h[0]=E(10,(7-t%7)%7),e.e=-t||0):h[0]=e.e=0,e;if(0==i?(h.length=d,o=1,d--):(h.length=d+1,o=E(10,7-i),h[d]=a>0?(u/E(10,s-a)%E(10,a)|0)*o:0),c)for(;;){if(0==d){for(i=1,a=h[0];a>=10;a/=10)i++;for(a=h[0]+=o,o=1;a>=10;a/=10)o++;i!=o&&(e.e++,h[0]==T&&(h[0]=1));break}if(h[d]+=o,h[d]!=T)break;h[d--]=0,o=1}for(i=h.length;0===h[--i];)h.pop()}return m&&(e.e>p.maxE?(e.d=null,e.e=NaN):e.e<p.minE&&(e.e=0,e.d=[0])),e}function F(e,t,r){if(!e.isFinite())return G(e);var n,s=e.e,i=I(e.d),a=i.length;return t?(r&&(n=r-a)>0?i=i.charAt(0)+"."+i.slice(1)+$(n):a>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(e.e<0?"e":"e+")+e.e):s<0?(i="0."+$(-s-1)+i,r&&(n=r-a)>0&&(i+=$(n))):s>=a?(i+=$(s+1-a),r&&(n=r-s-1)>0&&(i=i+"."+$(n))):((n=s+1)<a&&(i=i.slice(0,n)+"."+i.slice(n)),r&&(n=r-a)>0&&(s+1===a&&(i+="."),i+=$(n))),i}function k(e,t){var r=e[0];for(t*=7;r>=10;r/=10)t++;return t}function P(e,t,r){if(t>b)throw m=!0,r&&(e.precision=r),Error(g);return D(new e(u),t,1,!0)}function V(e,t,r){if(t>M)throw Error(g);return D(new e(h),t,r,!0)}function U(e){var t=e.length-1,r=7*t+1;if(t=e[t]){for(;t%10==0;t/=10)r--;for(t=e[0];t>=10;t/=10)r++}return r}function $(e){for(var t="";e--;)t+="0";return t}function B(e,t,r,n){var s,i=new e(1),a=Math.ceil(n/7+4);for(m=!1;;){if(r%2&&Y((i=i.times(t)).d,a)&&(s=!0),0===(r=C(r/2))){r=i.d.length-1,s&&0===i.d[r]&&++i.d[r];break}Y((t=t.times(t)).d,a)}return m=!0,i}function H(e){return 1&e.d[e.d.length-1]}function q(e,t,r){for(var n,s,i=new e(t[0]),a=0;++a<t.length;){if(!(s=new e(t[a])).s){i=s;break}((n=i.cmp(s))===r||0===n&&i.s===r)&&(i=s)}return i}function j(e,t){var r,n,s,i,a,o,l,c=0,u=0,h=0,d=e.constructor,p=d.rounding,f=d.precision;if(!e.d||!e.d[0]||e.e>17)return new d(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(null==t?(m=!1,l=f):l=t,o=new d(.03125);e.e>-2;)e=e.times(o),h+=5;for(l+=n=Math.log(E(2,h))/Math.LN10*2+5|0,r=i=a=new d(1),d.precision=l;;){if(i=D(i.times(e),l,1),r=r.times(++u),I((o=a.plus(O(i,r,l,1))).d).slice(0,l)===I(a.d).slice(0,l)){for(s=h;s--;)a=D(a.times(a),l,1);if(null!=t)return d.precision=f,a;if(!(c<3&&w(a.d,l-n,p,c)))return D(a,d.precision=f,p,m=!0);d.precision=l+=10,r=i=o=new d(1),u=0,c++}a=o}}function z(e,t){var r,n,s,i,a,o,l,c,u,h,d,p=1,f=e,g=f.d,x=f.constructor,y=x.rounding,C=x.precision;if(f.s<0||!g||!g[0]||!f.e&&1==g[0]&&1==g.length)return new x(g&&!g[0]?-1/0:1!=f.s?NaN:g?0:f);if(null==t?(m=!1,u=C):u=t,x.precision=u+=10,n=(r=I(g)).charAt(0),!(Math.abs(i=f.e)<15e14))return c=P(x,u+2,C).times(i+""),f=z(new x(n+"."+r.slice(1)),u-10).plus(c),x.precision=C,null==t?D(f,C,y,m=!0):f;for(;n<7&&1!=n||1==n&&r.charAt(1)>3;)n=(r=I((f=f.times(e)).d)).charAt(0),p++;for(i=f.e,n>1?(f=new x("0."+r),i++):f=new x(n+"."+r.slice(1)),h=f,l=a=f=O(f.minus(1),f.plus(1),u,1),d=D(f.times(f),u,1),s=3;;){if(a=D(a.times(d),u,1),I((c=l.plus(O(a,new x(s),u,1))).d).slice(0,u)===I(l.d).slice(0,u)){if(l=l.times(2),0!==i&&(l=l.plus(P(x,u+2,C).times(i+""))),l=O(l,new x(p),u,1),null!=t)return x.precision=C,l;if(!w(l.d,u-10,y,o))return D(l,x.precision=C,y,m=!0);x.precision=u+=10,c=a=f=O(h.minus(1),h.plus(1),u,1),d=D(f.times(f),u,1),s=o=1}l=c,s+=2}}function G(e){return String(e.s*e.s/0)}function W(e,t){var r,n,s;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;48===t.charCodeAt(n);n++);for(s=t.length;48===t.charCodeAt(s-1);--s);if(t=t.slice(n,s)){if(s-=n,e.e=r=r-n-1,e.d=[],n=(r+1)%7,r<0&&(n+=7),n<s){for(n&&e.d.push(+t.slice(0,n)),s-=7;n<s;)e.d.push(+t.slice(n,n+=7));n=7-(t=t.slice(n)).length}else n-=s;for(;n--;)t+="0";e.d.push(+t),m&&(e.e>e.constructor.maxE?(e.d=null,e.e=NaN):e.e<e.constructor.minE&&(e.e=0,e.d=[0]))}else e.e=0,e.d=[0];return e}function Q(e,t){var r,n,i,a,o,l,c,u,h;if(t.indexOf("_")>-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),S.test(t))return W(e,t)}else if("Infinity"===t||"NaN"===t)return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(_.test(t))r=16,t=t.toLowerCase();else if(A.test(t))r=2;else{if(!v.test(t))throw Error(f+t);r=8}for((a=t.search(/p/i))>0?(c=+t.slice(a+1),t=t.substring(2,a)):t=t.slice(2),o=(a=t.indexOf("."))>=0,n=e.constructor,o&&(a=(l=(t=t.replace(".","")).length)-a,i=B(n,new n(r),a,2*a)),a=h=(u=R(t,r,T)).length-1;0===u[a];--a)u.pop();return a<0?new n(0*e.s):(e.e=k(u,h),e.d=u,m=!1,o&&(e=O(e,i,4*l)),c&&(e=e.times(Math.abs(c)<54?E(2,c):s.pow(2,c))),m=!0,e)}function J(e,t,r,n,s){var i,a,o,l,c=e.precision,u=Math.ceil(c/7);for(m=!1,l=r.times(r),o=new e(n);;){if(a=O(o.times(l),new e(t++*t++),c,1),o=s?n.plus(a):n.minus(a),n=O(a.times(l),new e(t++*t++),c,1),void 0!==(a=o.plus(n)).d[u]){for(i=u;a.d[i]===o.d[i]&&i--;);if(-1==i)break}i=o,o=n,n=a,a=i}return m=!0,a.d.length=u+1,a}function K(e,t){for(var r=e;--t;)r*=e;return r}function Z(e,t){var r,n=t.s<0,s=V(e,e.precision,1),i=s.times(.5);if((t=t.abs()).lte(i))return a=n?4:1,t;if((r=t.divToInt(s)).isZero())a=n?3:2;else{if((t=t.minus(r.times(s))).lte(i))return a=H(r)?n?2:3:n?4:1,t;a=H(r)?n?1:4:n?3:2}return t.minus(s).abs()}function X(e,t,r,n){var s,a,o,u,h,d,m,p,f,g=e.constructor,x=void 0!==r;if(x?(L(r,1,l),void 0===n?n=g.rounding:L(n,0,8)):(r=g.precision,n=g.rounding),e.isFinite()){for(x?(s=2,16==t?r=4*r-3:8==t&&(r=3*r-2)):s=t,(o=(m=F(e)).indexOf("."))>=0&&(m=m.replace(".",""),(f=new g(1)).e=m.length-o,f.d=R(F(f),10,s),f.e=f.d.length),a=h=(p=R(m,10,s)).length;0==p[--h];)p.pop();if(p[0]){if(o<0?a--:((e=new g(e)).d=p,e.e=a,p=(e=O(e,f,r,n,0,s)).d,a=e.e,d=i),o=p[r],u=s/2,d=d||void 0!==p[r+1],d=n<4?(void 0!==o||d)&&(0===n||n===(e.s<0?3:2)):o>u||o===u&&(4===n||d||6===n&&1&p[r-1]||n===(e.s<0?8:7)),p.length=r,d)for(;++p[--r]>s-1;)p[r]=0,r||(++a,p.unshift(1));for(h=p.length;!p[h-1];--h);for(o=0,m="";o<h;o++)m+=c.charAt(p[o]);if(x){if(h>1)if(16==t||8==t){for(o=16==t?4:3,--h;h%o;h++)m+="0";for(h=(p=R(m,s,t)).length;!p[h-1];--h);for(o=1,m="1.";o<h;o++)m+=c.charAt(p[o])}else m=m.charAt(0)+"."+m.slice(1);m=m+(a<0?"p":"p+")+a}else if(a<0){for(;++a;)m="0"+m;m="0."+m}else if(++a>h)for(a-=h;a--;)m+="0";else a<h&&(m=m.slice(0,a)+"."+m.slice(a))}else m=x?"0p+0":"0";m=(16==t?"0x":2==t?"0b":8==t?"0o":"")+m}else m=G(e);return e.s<0?"-"+m:m}function Y(e,t){if(e.length>t)return e.length=t,!0}function ee(e){return new this(e).abs()}function te(e){return new this(e).acos()}function re(e){return new this(e).acosh()}function ne(e,t){return new this(e).plus(t)}function se(e){return new this(e).asin()}function ie(e){return new this(e).asinh()}function ae(e){return new this(e).atan()}function oe(e){return new this(e).atanh()}function le(e,t){e=new this(e),t=new this(t);var r,n=this.precision,s=this.rounding,i=n+4;return e.s&&t.s?e.d||t.d?!t.d||e.isZero()?(r=t.s<0?V(this,n,s):new this(0)).s=e.s:!e.d||t.isZero()?(r=V(this,i,1).times(.5)).s=e.s:t.s<0?(this.precision=i,this.rounding=1,r=this.atan(O(e,t,i,1)),t=V(this,i,1),this.precision=n,this.rounding=s,r=e.s<0?r.minus(t):r.plus(t)):r=this.atan(O(e,t,i,1)):(r=V(this,i,1).times(t.s>0?.25:.75)).s=e.s:r=new this(NaN),r}function ce(e){return new this(e).cbrt()}function ue(e){return D(e=new this(e),e.e+1,2)}function he(e,t,r){return new this(e).clamp(t,r)}function de(e){if(!e||"object"!=typeof e)throw Error(p+"Object expected");var t,r,n,s=!0===e.defaults,i=["precision",1,l,"rounding",0,8,"toExpNeg",-o,0,"toExpPos",0,o,"maxE",0,o,"minE",-o,0,"modulo",0,9];for(t=0;t<i.length;t+=3)if(r=i[t],s&&(this[r]=d[r]),void 0!==(n=e[r])){if(!(C(n)===n&&n>=i[t+1]&&n<=i[t+2]))throw Error(f+r+": "+n);this[r]=n}if(r="crypto",s&&(this[r]=d[r]),void 0!==(n=e[r])){if(!0!==n&&!1!==n&&0!==n&&1!==n)throw Error(f+r+": "+n);if(n){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw Error(x);this[r]=!0}else this[r]=!1}return this}function me(e){return new this(e).cos()}function pe(e){return new this(e).cosh()}function fe(e,t){return new this(e).div(t)}function ge(e){return new this(e).exp()}function xe(e){return D(e=new this(e),e.e+1,3)}function ye(){var e,t,r=new this(0);for(m=!1,e=0;e<arguments.length;)if((t=new this(arguments[e++])).d)r.d&&(r=r.plus(t.times(t)));else{if(t.s)return m=!0,new this(1/0);r=t}return m=!0,r.sqrt()}function Ce(e){return e instanceof s||e&&e.toStringTag===y||!1}function Ee(e){return new this(e).ln()}function Ae(e,t){return new this(e).log(t)}function _e(e){return new this(e).log(2)}function ve(e){return new this(e).log(10)}function Se(){return q(this,arguments,-1)}function Te(){return q(this,arguments,1)}function be(e,t){return new this(e).mod(t)}function Me(e,t){return new this(e).mul(t)}function Ne(e,t){return new this(e).pow(t)}function Ie(e){var t,r,n,s,i=0,a=new this(1),o=[];if(void 0===e?e=this.precision:L(e,1,l),n=Math.ceil(e/7),this.crypto)if(crypto.getRandomValues)for(t=crypto.getRandomValues(new Uint32Array(n));i<n;)(s=t[i])>=429e7?t[i]=crypto.getRandomValues(new Uint32Array(1))[0]:o[i++]=s%1e7;else{if(!crypto.randomBytes)throw Error(x);for(t=crypto.randomBytes(n*=4);i<n;)(s=t[i]+(t[i+1]<<8)+(t[i+2]<<16)+((127&t[i+3])<<24))>=214e7?crypto.randomBytes(4).copy(t,i):(o.push(s%1e7),i+=4);i=n/4}else for(;i<n;)o[i++]=1e7*Math.random()|0;for(e%=7,(n=o[--i])&&e&&(s=E(10,7-e),o[i]=(n/s|0)*s);0===o[i];i--)o.pop();if(i<0)r=0,o=[0];else{for(r=-1;0===o[0];r-=7)o.shift();for(n=1,s=o[0];s>=10;s/=10)n++;n<7&&(r-=7-n)}return a.e=r,a.d=o,a}function Le(e){return D(e=new this(e),e.e+1,this.rounding)}function we(e){return(e=new this(e)).d?e.d[0]?e.s:0*e.s:e.s||NaN}function Re(e){return new this(e).sin()}function Oe(e){return new this(e).sinh()}function De(e){return new this(e).sqrt()}function Fe(e,t){return new this(e).sub(t)}function ke(){var e=0,t=arguments,r=new this(t[e]);for(m=!1;r.s&&++e<t.length;)r=r.plus(t[e]);return m=!0,D(r,this.precision,this.rounding)}function Pe(e){return new this(e).tan()}function Ve(e){return new this(e).tanh()}function Ue(e){return D(e=new this(e),e.e+1,1)}(s=function e(t){var r,n,s;function i(e){var t,r,n,s=this;if(!(s instanceof i))return new i(e);if(s.constructor=i,Ce(e))return s.s=e.s,void(m?!e.d||e.e>i.maxE?(s.e=NaN,s.d=null):e.e<i.minE?(s.e=0,s.d=[0]):(s.e=e.e,s.d=e.d.slice()):(s.e=e.e,s.d=e.d?e.d.slice():e.d));if("number"==(n=typeof e)){if(0===e)return s.s=1/e<0?-1:1,s.e=0,void(s.d=[0]);if(e<0?(e=-e,s.s=-1):s.s=1,e===~~e&&e<1e7){for(t=0,r=e;r>=10;r/=10)t++;return void(m?t>i.maxE?(s.e=NaN,s.d=null):t<i.minE?(s.e=0,s.d=[0]):(s.e=t,s.d=[e]):(s.e=t,s.d=[e]))}return 0*e!=0?(e||(s.s=NaN),s.e=NaN,void(s.d=null)):W(s,e.toString())}if("string"===n)return 45===(r=e.charCodeAt(0))?(e=e.slice(1),s.s=-1):(43===r&&(e=e.slice(1)),s.s=1),S.test(e)?W(s,e):Q(s,e);if("bigint"===n)return e<0?(e=-e,s.s=-1):s.s=1,W(s,e.toString());throw Error(f+e)}if(i.prototype=N,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.EUCLID=9,i.config=i.set=de,i.clone=e,i.isDecimal=Ce,i.abs=ee,i.acos=te,i.acosh=re,i.add=ne,i.asin=se,i.asinh=ie,i.atan=ae,i.atanh=oe,i.atan2=le,i.cbrt=ce,i.ceil=ue,i.clamp=he,i.cos=me,i.cosh=pe,i.div=fe,i.exp=ge,i.floor=xe,i.hypot=ye,i.ln=Ee,i.log=Ae,i.log10=ve,i.log2=_e,i.max=Se,i.min=Te,i.mod=be,i.mul=Me,i.pow=Ne,i.random=Ie,i.round=Le,i.sign=we,i.sin=Re,i.sinh=Oe,i.sqrt=De,i.sub=Fe,i.sum=ke,i.tan=Pe,i.tanh=Ve,i.trunc=Ue,void 0===t&&(t={}),t&&!0!==t.defaults)for(s=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],r=0;r<s.length;)t.hasOwnProperty(n=s[r++])||(t[n]=this[n]);return i.config(t),i}(d)).prototype.constructor=s,s.default=s.Decimal=s,u=new s(u),h=new s(h),void 0===(n=function(){return s}.call(t,r,t,e))||(e.exports=n)}()},7820(e){"use strict";"undefined"!=typeof self?e.exports=self:"undefined"!=typeof window?e.exports=window:e.exports=Function("return this")()},5323(e,t,r){"use strict";var n=r(7820);e.exports=function(){return"object"==typeof r.g&&r.g&&r.g.Math===Math&&r.g.Array===Array?r.g:n}},6109(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AST=void 0;const n=r(5956),s=r(845),i=r(1271),a=r(7679),o=["+","-",".*","*","./","/",".\\","\\",".^","^",".**","**","<","<=","==",">=",">","!=","~=","&","|","&&","||","=","+=","-=","*=","/=","\\=","^=","**=",".*=","./=",".\\=",".^=",".**=","&=","|=","()","!","~","+_","-_","++_","--_",".'","'","_++","_--"],l=["+","-",".*","*","./","/",".\\","\\",".^","^",".**","**","<","<=","==",">=",">","!=","~=","&","|","&&","||","=","+=","-=","*=","/=","\\=","^=","**=",".*=","./=",".\\=",".^=",".**=","&=","|="],c=["()","!","~","+_","-_","++_","--_"],u=[".'","'","_++","_--"];class h{}t.AST=h,h.nodeString=n.CharString.create,h.nodeNumber=s.Complex.parse,h.firstRow=a.MultiArray.firstRow,h.appendRow=a.MultiArray.appendRow,h.emptyArray=a.MultiArray.emptyArray,h.reload=()=>{h.nodeString=n.CharString.create,h.nodeNumber=s.Complex.parse,h.firstRow=a.MultiArray.firstRow,h.appendRow=a.MultiArray.appendRow,h.emptyArray=a.MultiArray.emptyArray},h.nodeCopy=e=>Object.assign({},e),h.isNodeBase=e=>{if("object"!=typeof e||null===e||!("type"in e))return!1;const t=Reflect.get(e,"type");return"string"==typeof t||"number"==typeof t},h.isNodeIdentifier=e=>h.isNodeBase(e)&&"IDENT"===e.type&&"string"==typeof Reflect.get(e,"id"),h.isNodeList=e=>h.isNodeBase(e)&&"LIST"===e.type&&Array.isArray(Reflect.get(e,"list")),h.isNodeCmdWList=e=>h.isNodeBase(e)&&"CMDWLIST"===e.type&&"string"==typeof Reflect.get(e,"id")&&Array.isArray(Reflect.get(e,"args")),h.isNodeIndexExpr=e=>h.isNodeBase(e)&&"IDX"===e.type&&("()"===Reflect.get(e,"delim")||"{}"===Reflect.get(e,"delim"))&&Array.isArray(Reflect.get(e,"args")),h.isNodeSuperclassConstructor=e=>h.isNodeBase(e)&&"SUPERCLASS_CTOR"===e.type&&h.isNodeIdentifier(Reflect.get(e,"superclass"))&&Array.isArray(Reflect.get(e,"args")),h.isNodeRange=e=>h.isNodeBase(e)&&"RANGE"===e.type&&"start_"in e&&"stop_"in e,h.isNodeColon=e=>h.isNodeBase(e)&&":"===e.type,h.isNodeEndRange=e=>h.isNodeBase(e)&&"ENDRANGE"===e.type,h.isNodeIndirectRef=e=>h.isNodeBase(e)&&"."===e.type&&Array.isArray(Reflect.get(e,"field")),h.isNodeReturnList=e=>h.isNodeBase(e)&&"RETLIST"===e.type&&"function"==typeof Reflect.get(e,"selector")&&"function"==typeof Reflect.get(e,"handler"),h.isNodeIgnoredTarget=e=>h.isNodeBase(e)&&"<~>"===e.type,h.isNodeOperation=e=>h.isNodeBase(e)&&o.includes(e.type),h.isNodeBinaryOperation=e=>h.isNodeOperation(e)&&l.includes(e.type)&&"left"in e&&"right"in e,h.isNodePrefixOperation=e=>h.isNodeOperation(e)&&c.includes(e.type)&&"right"in e,h.isNodePostfixOperation=e=>h.isNodeOperation(e)&&u.includes(e.type)&&"left"in e,h.isNodeFunctionReturn=e=>h.isNodeIdentifier(e)||h.isNodeIgnoredTarget(e),h.isNodeDeclarationElement=e=>h.isNodeIdentifier(e)||h.isNodeDefaultedParameter(e),h.isNodeDefaultedParameter=e=>h.isNodeBinaryOperation(e)&&"="===e.type&&h.isNodeIdentifier(e.left),h.isNodeFunctionParameter=e=>h.isNodeIdentifier(e)||h.isNodeIgnoredTarget(e)||h.isNodeDefaultedParameter(e),h.isNodeAssignmentTarget=e=>h.isNodeIdentifier(e)||h.isNodeIgnoredTarget(e)||h.isNodeIndexExpr(e)||h.isNodeIndirectRef(e)||a.MultiArray.isInstanceOf(e),h.isNodeDeclaration=e=>h.isNodeBase(e)&&("GLOBAL"===e.type||"PERSIST"===e.type),h.isNodeImport=e=>h.isNodeBase(e)&&"IMPORT"===e.type&&Array.isArray(e.imports),h.isNodeStatement=e=>h.isNodeDeclaration(e)||h.isNodeImport(e)||h.isNodeBase(e)&&("RETURN"===e.type||"BREAK"===e.type||"CONTINUE"===e.type||"IF"===e.type||"SWITCH"===e.type||"WHILE"===e.type||"DO_UNTIL"===e.type||"FOR"===e.type||"SPMD"===e.type||"TRY"===e.type||"UNWIND_PROTECT"===e.type)||h.isNodeFunctionDefinition(e)||h.isNodeClassDef(e),h.isNodeClassMember=e=>h.isNodeClassSection(e)||h.isNodeClassAttribute(e)||h.isNodeClassProperty(e)||h.isNodeClassEvent(e)||h.isNodeClassEnumeration(e),h.isNodeProgramElement=e=>h.isStrictNodeExpr(e)||h.isNodeStatement(e)||h.isNodeClassMember(e),h.isNodeFunctionDefinition=e=>h.isNodeBase(e)&&"FCNDEF"===e.type,h.isNodeClassDef=e=>h.isNodeBase(e)&&"CLASSDEF"===e.type,h.isNodeMetaClass=e=>h.isNodeBase(e)&&"METACLASS"===e.type&&h.isNodeIdentifier(e.className),h.isRuntimeExpressionValue=e=>null!=e&&(a.MultiArray.isInstanceOf(e)||s.Complex.isInstanceOf(e)||n.CharString.isInstanceOf(e)||"object"==typeof e&&"number"==typeof e.type),h.isStrictNodeExpr=e=>h.isRuntimeExpressionValue(e)||h.isNodeBase(e)&&("VOID"===e.type||h.isNodeIdentifier(e)||h.isNodeCmdWList(e)||h.isNodeIndexExpr(e)||h.isNodeSuperclassConstructor(e)||h.isNodeMetaClass(e)||h.isNodeRange(e)||h.isNodeColon(e)||h.isNodeEndRange(e)||h.isNodeOperation(e)||h.isNodeIgnoredTarget(e)||h.isNodeIndirectRef(e)||h.isNodeImport(e)||h.isNodeReturnList(e)),h.isExpressionBoundaryValue=e=>h.isStrictNodeExpr(e)||h.isNodeList(e),h.requireStrictNodeExpr=(e,t="expression")=>{if(!h.isStrictNodeExpr(e))throw new TypeError(`${t} is not an expression node.`);return e},h.isNodeArguments=e=>h.isNodeBase(e)&&"ARGS"===e.type&&Array.isArray(e.validation),h.isNodeArgumentValidation=e=>h.isNodeBase(e)&&"ARGVALID"===e.type&&"name"in e&&Array.isArray(e.size),h.isNodeSwitchCase=e=>h.isNodeBase(e)&&"CASE"===e.type,h.isNodeClassSection=e=>h.isNodeBase(e)&&"CLASS_SECTION"===e.type,h.isNodeClassAttribute=e=>h.isNodeBase(e)&&"CLASS_ATTRIBUTE"===e.type,h.isNodeClassProperty=e=>h.isNodeBase(e)&&"CLASS_PROPERTY"===e.type,h.isNodeClassEvent=e=>h.isNodeBase(e)&&"CLASS_EVENT"===e.type,h.isNodeClassEnumeration=e=>h.isNodeBase(e)&&"CLASS_ENUMERATION"===e.type,h.nodeVoid=()=>({type:"VOID",omitAnswer:!0,omitOutput:!0}),h.nodeIdentifier=e=>({type:"IDENT",id:e.replace(/(\r\n|[\n\r])|[\ ]/gm,""),omitAnswer:!1,omitOutput:!1}),h.nodeMetaClass=e=>{const t={type:"METACLASS",className:e,omitAnswer:!1,omitOutput:!1};return t.className.parent=t,t},h.factoryExpression=(e,t,r=!1)=>r&&h.isNodeList(e)?e:h.requireStrictNodeExpr(e,t),h.factoryExpressionList=(e,t)=>e?e.list.map((e,r)=>h.factoryExpression(e,`${t}${r+1}`)):[],h.factoryCommandWordList=(e,t)=>e?e.list.map((e,r)=>{if(!n.CharString.isInstanceOf(e))throw new TypeError(`${t}${r+1} is not a command word.`);return e}):[],h.factoryNodeList=(e,t,r)=>e.list.map((e,n)=>{if(!t(e))throw new TypeError(`${r}${n+1} has invalid node type.`);return e}),h.factoryProgramElementList=(e,t)=>h.factoryNodeList(e,h.isNodeProgramElement,t),h.factoryArrayElementList=(e,t)=>h.factoryExpressionList(e,t),h.factoryArgumentClass=(e,t)=>{if(null===e||h.isNodeList(e)&&0===e.list.length)return e;if(!h.isNodeIdentifier(e)&&!h.isNodeMetaClass(e))throw new TypeError(`${t} has invalid node type.`);return e},h.nodeCmdWList=(e,t)=>{const r={type:"CMDWLIST",id:e.id,args:h.factoryCommandWordList(t,"command argument ")};return e.parent=r,r.args.forEach(e=>{e.parent=r}),r.omitAnswer=!0,r.omitOutput=!1,r},h.nodeIndexExpr=(e,t=null,r="()")=>{const n={type:"IDX",expr:h.factoryExpression(e,"indexed expression"),args:h.factoryExpressionList(t,"index argument "),delim:r,omitAnswer:!1,omitOutput:!1};return n.expr.parent=n,n.args.forEach((e,t)=>{h.isNodeBase(e)&&(e.parent=n,e.index=t)}),n},h.nodeSuperclassConstructor=(e,t,r=null)=>{const n={type:"SUPERCLASS_CTOR",instance:h.factoryExpression(e,"superclass constructor instance"),superclass:t,args:h.factoryExpressionList(r,"superclass constructor argument "),omitAnswer:!1,omitOutput:!1};return n.instance.parent=n,n.superclass.parent=n,n.args.forEach(e=>{h.isNodeBase(e)&&(e.parent=n)}),n},h.nodeRange=(e,t,r)=>{const n={type:"RANGE",start_:h.factoryExpression(e,"range start"),stop_:h.factoryExpression(t,"range stop"),stride_:r?h.factoryExpression(r,"range stride"):null,omitAnswer:!1,omitOutput:!1};return n.start_.parent=n,n.stop_.parent=n,r&&(n.stride_.parent=n),n},h.nodeColon=()=>({type:":",omitAnswer:!1,omitOutput:!1}),h.nodeEndRange=()=>({type:"ENDRANGE",omitAnswer:!1,omitOutput:!1}),h.omitAnswerNodeOperation=new Set(["=","+=","-=","*=","/=","\\=","^=","**=",".*=","./=",".\\=",".^=",".**=","&=","|=","++_","--_","_++","_--"]),h.assignmentNodeOperation=new Set(["=","+=","-=","*=","/=","\\=","^=","**=",".*=","./=",".\\=",".^=",".**=","&=","|="]),h.anonymousFunctionForbiddenOperation=new Set(["=","+=","-=","*=","/=","\\=","^=","**=",".*=","./=",".\\=",".^=",".**=","&=","|=","++_","--_","_++","_--"]),h.assertAnonymousFunctionExpression=e=>{if(h.isNodeOperation(e)&&h.anonymousFunctionForbiddenOperation.has(e.type))throw new SyntaxError("anonymous function bodies cannot contain assignment, increment, or decrement operators.");h.isNodeBinaryOperation(e)?(h.assertAnonymousFunctionExpression(e.left),h.assertAnonymousFunctionExpression(e.right)):h.isNodePrefixOperation(e)?h.assertAnonymousFunctionExpression(e.right):h.isNodePostfixOperation(e)?h.assertAnonymousFunctionExpression(e.left):h.isNodeIndexExpr(e)?(h.assertAnonymousFunctionExpression(e.expr),e.args.forEach(h.assertAnonymousFunctionExpression)):h.isNodeSuperclassConstructor(e)?(h.assertAnonymousFunctionExpression(e.instance),e.args.forEach(h.assertAnonymousFunctionExpression)):h.isNodeRange(e)?(h.assertAnonymousFunctionExpression(e.start_),h.assertAnonymousFunctionExpression(e.stop_),e.stride_&&h.assertAnonymousFunctionExpression(e.stride_)):h.isNodeIndirectRef(e)?(h.assertAnonymousFunctionExpression(e.obj),e.field.forEach(e=>{"string"!=typeof e&&h.assertAnonymousFunctionExpression(e)})):h.isNodeList(e)?e.list.forEach(h.assertAnonymousFunctionExpression):a.MultiArray.isInstanceOf(e)?a.MultiArray.linearize(e).forEach(h.assertAnonymousFunctionExpression):i.FunctionHandle.isInstanceOf(e)&&e.expression&&h.assertAnonymousFunctionExpression(e.expression)},h.assertFunctionSignatureList=(e,t,r,n)=>{const s=new Set;e.forEach((i,a)=>{if(h.isNodeIgnoredTarget(i))return;let o;if(h.isNodeDefaultedParameter(i)){if("parameter"!==r||"anonymous function"===n)throw new SyntaxError(`invalid ${r} list in ${n}.`);o=i.left.id}else{if(!h.isNodeIdentifier(i))throw new SyntaxError(`invalid ${r} list in ${n}.`);o=i.id}if(s.has(o))throw new SyntaxError(`duplicate ${r} name '${o}' in ${n}.`);if(s.add(o),o===t&&a!==e.length-1)throw new SyntaxError(`${t} must be the last ${r} in ${n}.`);if(h.isNodeDefaultedParameter(i)&&o===t)throw new SyntaxError(`${t} default value is not supported in ${n}.`)})},h.assertAnonymousFunctionParameters=e=>{h.assertFunctionSignatureList(e,"varargin","parameter","anonymous function")},h.nodeOperation=(e,t,r)=>{let n;switch(e){case"+":case"-":case".*":case"*":case"./":case"/":case".\\":case"\\":case".^":case"^":case".**":case"**":case"<":case"<=":case"==":case">=":case">":case"!=":case"~=":case"&":case"|":case"&&":case"||":case"=":case"+=":case"-=":case"*=":case"/=":case"\\=":case"^=":case"**=":case".*=":case"./=":case".\\=":case".^=":case".**=":case"&=":case"|=":if(void 0===r)throw new TypeError(`right operand for ${e} is missing.`);n={type:e,left:h.factoryExpression(t,`left operand for ${e}`),right:h.factoryExpression(r,`right operand for ${e}`,h.assignmentNodeOperation.has(e))},n.left.parent=n,n.right.parent=n;break;case"()":case"!":case"~":case"+_":case"-_":case"++_":case"--_":n={type:e,right:h.factoryExpression(t,`operand for ${e}`)},n.right.parent=n;break;case".'":case"'":case"_++":case"_--":n={type:e,left:h.factoryExpression(t,`operand for ${e}`)},n.left.parent=n;break;default:n={type:`INVALID:${e}`}}return n.omitAnswer=h.omitAnswerNodeOperation.has(n.type),n.omitOutput=!1,n},h.nodeDefaultedParameter=(e,t)=>{const r=h.nodeOperation("=",e,t);if(!h.isNodeDefaultedParameter(r))throw new TypeError("defaulted parameter has invalid node type.");return r},h.nodeIgnoredTarget=()=>({type:"<~>",omitAnswer:!0,omitOutput:!1}),h.nodeListFirst=e=>{const t={type:"LIST",list:e?[e]:[],omitAnswer:!1,omitOutput:!1};return e&&(t.list[0].parent=t),t},h.appendNodeList=(e,t)=>(t.parent=e,e.list.push(t),e),h.nodeList=e=>{const t={type:"LIST",list:e,omitAnswer:!1,omitOutput:!1};return t.list.forEach(e=>e.parent=t),t},h.nodeFirstRow=(e=null,t)=>e?h.firstRow(h.factoryArrayElementList(e,"array element "),t):h.emptyArray(t),h.nodeAppendRow=(e,t=null)=>t?h.appendRow(e,h.factoryArrayElementList(t,"array element ")):e,h.nodeIndirectRef=(e,t)=>{if(h.isNodeIndirectRef(e))return e.field.push("string"==typeof t?t:h.factoryExpression(t,"indirect reference field")),"string"!=typeof t&&(t.parent=e),e;{const r={type:".",obj:h.factoryExpression(e,"indirect reference object"),field:["string"==typeof t?t:h.factoryExpression(t,"indirect reference field")],omitAnswer:!1,omitOutput:!1};return r.obj.parent=r,"string"!=typeof t&&(t.parent=r),r}},h.nodeReturnList=(e,t)=>Object.assign({type:"RETLIST",selector:e},void 0===t?{handler:e=>({length:e})}:"function"==typeof t?{handler:t}:t),h.nodeCommaSeparatedReturnList=(e,t,r)=>{const n=h.nodeReturnList(t,r);return n.commaSeparated=!0,n.returnListLength=e,n},h.nodeBoundedReturnList=(e,t,r,n)=>h.nodeReturnList((r,s)=>(h.throwErrorIfGreaterThanReturnList(e,r.length,n),t(r,s)),t=>(h.throwErrorIfGreaterThanReturnList(e,t,n),r?r(t):{length:t})),h.ensureReturnList=e=>{if(h.isNodeReturnList(e))return e;const t=e;return h.nodeReturnList((e,r)=>{if(0===r)return t;throw h.throwErrorIfGreaterThanReturnList(1,r+1),new EvalError("unreachable return-list selector branch.")})},h.throwErrorIfGreaterThanReturnList=(e,t,r)=>{if(t>e){const t=`element number ${e+1} undefined in return list`;throw r&&r(t),new EvalError(t)}},h.reduceToFirstIfReturnList=e=>{if(h.isNodeReturnList(e)){const t=e.selector(e.handler(1),0);return t.parent=e.parent,t}return e},h.throwInvalidCallError=(e,t=!0,r)=>{if(t){const t=`Invalid call to ${e}. Type 'help ${e}' to see correct usage.`;throw r&&r(t),new SyntaxError(t)}},h.nodeFunctionHandle=(e=null,t=null,r=null)=>{const n=t?h.factoryNodeList(t,h.isNodeFunctionParameter,"function handle parameter "):[],s=r?h.factoryExpression(r,"function handle expression"):null;e||(h.assertAnonymousFunctionParameters(n),s&&h.assertAnonymousFunctionExpression(s));const a=i.FunctionHandle.create(e?e.id:void 0,n,s);return a.parameter.forEach(e=>{e.parent=a}),a.expression&&(a.expression.parent=a),a},h.nodeFunctionDefinition=(e,t,r,n,s)=>{const i=h.factoryNodeList(t,h.isNodeFunctionReturn,"function return "),a=h.factoryNodeList(r,h.isNodeFunctionParameter,"function parameter "),o=h.factoryNodeList(n,h.isNodeArguments,"function arguments block "),l=h.factoryNodeList(s,h.isNodeProgramElement,"function statement "),c={type:"FCNDEF",id:e.id,mapper:1===a.length&&1===i.length,ev:new Array(a.length).fill(!0),func:null,return:t,parameter:r,arguments:n,statements:s,omitAnswer:!0,omitOutput:!0};return c.return.parent=c,c.parameter.parent=c,c.arguments.parent=c,c.statements.parent=c,i.forEach(e=>e.parent=c),a.forEach(e=>e.parent=c),o.forEach(e=>e.parent=c),l.forEach(e=>e.parent=c),c},h.nodeClassAttributeTable=e=>{var t,r;const n={};for(const s of e)null!==(t=n[r=s.id])&&void 0!==t||(n[r]=[]),n[s.id].push(s);return n},h.nodeClassSectionMemberGuard=e=>{switch(e){case"PROPERTIES":return h.isNodeClassProperty;case"METHODS":return h.isNodeFunctionDefinition;case"EVENTS":return h.isNodeClassEvent;case"ENUMERATION":return h.isNodeClassEnumeration;default:return e=>!1}},h.nodeArgumentValidation=(e,t,r=null,n,s=null)=>{const i={type:"ARGVALID",name:h.factoryExpression(e,"argument validation name"),size:h.factoryExpressionList(t,"argument validation size "),class:h.factoryArgumentClass(r,"argument validation class"),functions:h.factoryExpressionList(n,"argument validation function "),default:s?h.factoryExpression(s,"argument validation default"):null,omitAnswer:!0,omitOutput:!0};return i.name.parent=i,i.size.forEach(e=>{h.isNodeBase(e)&&(e.parent=i)}),i.class&&(i.class.parent=i),i.functions.forEach(e=>{h.isNodeBase(e)&&(e.parent=i)}),i.default&&(i.default.parent=i),i},h.nodeArguments=(e,t)=>{var r;const n=e?h.isNodeList(e)?h.factoryNodeList(e,h.isNodeIdentifier,"arguments block attribute "):[e]:[],s={type:"ARGS",attribute:null!==(r=n[0])&&void 0!==r?r:null,attributes:n,validation:h.factoryNodeList(t,h.isNodeArgumentValidation,"arguments validation "),omitAnswer:!0,omitOutput:!0};return s.attributes.forEach(e=>e.parent=s),s.validation.forEach(e=>e.parent=s),s},h.nodeDeclarationFirst=e=>({type:e,list:[],omitAnswer:!0,omitOutput:!0}),h.nodeReturn=()=>({type:"RETURN",omitAnswer:!0,omitOutput:!0}),h.nodeBreak=()=>({type:"BREAK",omitAnswer:!0,omitOutput:!0}),h.nodeContinue=()=>({type:"CONTINUE",omitAnswer:!0,omitOutput:!0}),h.getDeclarationNode=e=>"node"in e?e.node:e,h.nodeAppendDeclaration=(e,t)=>{const r=h.getDeclarationNode(t);if(!h.isNodeDeclarationElement(r))throw new TypeError("declaration entry has invalid node type.");return r.parent=e,e.list.push(r),e},h.nodeImport=()=>({type:"IMPORT",imports:[]}),h.nodeImportFirst=e=>{const t=h.nodeImport();return t.omitAnswer=!0,t.omitOutput=!0,h.nodeAppendImport(t,e)},h.nodeAppendImport=(e,t)=>(t.parent=e,t.index=e.imports.length,e.imports.push(t),e),h.nodeIfBegin=(e,t)=>{h.factoryProgramElementList(t,"if body ");const r={type:"IF",expression:[h.factoryExpression(e,"if condition")],then:[t],else:null,omitAnswer:!0,omitOutput:!0};return r.expression[0].parent=r,r.then[0].parent=r,r},h.nodeIfAppendElse=(e,t)=>(h.factoryProgramElementList(t.else,"else body "),e.else=t.else,e.else.parent=e,e),h.nodeIfAppendElseIf=(e,t)=>(h.factoryProgramElementList(t.then,"elseif body "),t.expression.parent=e,e.expression.push(t.expression),t.then.parent=e,e.then.push(t.then),e),h.nodeElseIf=(e,t)=>{h.factoryProgramElementList(t,"elseif body ");const r={type:"ELSEIF",expression:h.factoryExpression(e,"elseif condition"),then:t,omitAnswer:!0,omitOutput:!0};return r.expression.parent=r,r.then.parent=r,r},h.nodeElse=e=>{h.factoryProgramElementList(e,"else body ");const t={type:"ELSE",else:e,omitAnswer:!0,omitOutput:!0};return t.else.parent=t,t},h.nod