text: !function(e){var n={};function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var i in e)t.d(r,i,function(n){return e[n]}.bind(null,i));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=153)}([function(e,n,t){var r=t(3),i=t(21),a=t(13),o=t(14),s=t(22),u=function(e,n,t){var c,f,l,p,d=e&u.F,m=e&u.G,h=e&u.S,y=e&u.P,g=e&u.B,v=m?r:h?r[n]||(r[n]={}):(r[n]||{}).prototype,x=m?i:i[n]||(i[n]={}),b=x.prototype||(x.prototype={});for(c in m&&(t=n),t)l=((f=!d&&v&&void 0!==v[c])?v:t)[c],p=g&&f?s(l,r):y&&"function"==typeof l?s(Function.call,l):l,v&&o(v,c,l,e&u.U),x[c]!=l&&a(x,c,p),y&&b[c]!=l&&(b[c]=l)};r.core=i,u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,e.exports=u},,function(e,n,t){var r=t(5);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,n){var t=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=t)},function(e,n){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,n){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,n,t){var r=t(53)("wks"),i=t(37),a=t(3).Symbol,o="function"==typeof a;(e.exports=function(e){return r[e]||(r[e]=o&&a[e]||(o?a:i)("Symbol."+e))}).store=r},function(e,n,t){var r=t(24),i=Math.min;e.exports=function(e){return e>0?i(r(e),9007199254740991):0}},function(e,n,t){e.exports=!t(4)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(e,n,t){var r=t(2),i=t(103),a=t(26),o=Object.defineProperty;n.f=t(8)?Object.defineProperty:function(e,n,t){if(r(e),n=a(n,!0),r(t),i)try{return o(e,n,t)}catch(e){}if("get"in t||"set"in t)throw TypeError("Accessors not supported!");return"value"in t&&(e[n]=t.value),e}},function(e,n,t){var r=t(27);e.exports=function(e){return Object(r(e))}},function(e,n){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,n,t){var r;
  /**
   * @license Complex.js v2.0.11 11/02/2016
   *
   * Copyright (c) 2016, Robert Eisele (robert@xarg.org)
   * Dual licensed under the MIT or GPL Version 2 licenses.
   **/!function(t){"use strict";var i=function(e){return.5*(Math.exp(e)+Math.exp(-e))},a=function(e){return.5*(Math.exp(e)-Math.exp(-e))},o=function(){throw SyntaxError("Invalid Param")};function s(e,n){var t=Math.abs(e),r=Math.abs(n);return 0===e?Math.log(r):0===n?Math.log(t):t<3e3&&r<3e3?.5*Math.log(e*e+n*n):Math.log(e/Math.cos(Math.atan2(n,e)))}function u(e,n){if(!(this instanceof u))return new u(e,n);var t=function(e,n){var t={re:0,im:0};if(null==e)t.re=t.im=0;else if(void 0!==n)t.re=e,t.im=n;else switch(typeof e){case"object":if("im"in e&&"re"in e)t.re=e.re,t.im=e.im;else if("abs"in e&&"arg"in e){if(!Number.isFinite(e.abs)&&Number.isFinite(e.arg))return u.INFINITY;t.re=e.abs*Math.cos(e.arg),t.im=e.abs*Math.sin(e.arg)}else if("r"in e&&"phi"in e){if(!Number.isFinite(e.r)&&Number.isFinite(e.phi))return u.INFINITY;t.re=e.r*Math.cos(e.phi),t.im=e.r*Math.sin(e.phi)}else 2===e.length?(t.re=e[0],t.im=e[1]):o();break;case"string":t.im=t.re=0;var r=e.match(/\d+\.?\d*e[+-]?\d+|\d+\.?\d*|\.\d+|./g),i=1,a=0;null===r&&o();for(var s=0;s<r.length;s++){var c=r[s];" "===c||"\t"===c||"\n"===c||("+"===c?i++:"-"===c?a++:"i"===c||"I"===c?(i+a===0&&o()," "===r[s+1]||isNaN(r[s+1])?t.im+=parseFloat((a%2?"-":"")+"1"):(t.im+=parseFloat((a%2?"-":"")+r[s+1]),s++),i=a=0):((i+a===0||isNaN(c))&&o(),"i"===r[s+1]||"I"===r[s+1]?(t.im+=parseFloat((a%2?"-":"")+c),s++):t.re+=parseFloat((a%2?"-":"")+c),i=a=0))}i+a>0&&o();break;case"number":t.im=0,t.re=e;break;default:o()}return isNaN(t.re)||isNaN(t.im),t}(e,n);this.re=t.re,this.im=t.im}u.prototype={re:0,im:0,sign:function(){var e=this.abs();return new u(this.re/e,this.im/e)},add:function(e,n){var t=new u(e,n);return this.isInfinite()&&t.isInfinite()?u.NAN:this.isInfinite()||t.isInfinite()?u.INFINITY:new u(this.re+t.re,this.im+t.im)},sub:function(e,n){var t=new u(e,n);return this.isInfinite()&&t.isInfinite()?u.NAN:this.isInfinite()||t.isInfinite()?u.INFINITY:new u(this.re-t.re,this.im-t.im)},mul:function(e,n){var t=new u(e,n);return this.isInfinite()&&t.isZero()||this.isZero()&&t.isInfinite()?u.NAN:this.isInfinite()||t.isInfinite()?u.INFINITY:0===t.im&&0===this.im?new u(this.re*t.re,0):new u(this.re*t.re-this.im*t.im,this.re*t.im+this.im*t.re)},div:function(e,n){var t=new u(e,n);if(this.isZero()&&t.isZero()||this.isInfinite()&&t.isInfinite())return u.NAN;if(this.isInfinite()||t.isZero())return u.INFINITY;if(this.isZero()||t.isInfinite())return u.ZERO;e=this.re,n=this.im;var r,i,a=t.re,o=t.im;return 0===o?new u(e/a,n/a):Math.abs(a)<Math.abs(o)?new u((e*(i=a/o)+n)/(r=a*i+o),(n*i-e)/r):new u((e+n*(i=o/a))/(r=o*i+a),(n-e*i)/r)},pow:function(e,n){var t=new u(e,n);if(e=this.re,n=this.im,t.isZero())return u.ONE;if(0===t.im){if(0===n&&e>=0)return new u(Math.pow(e,t.re),0);if(0===e)switch((t.re%4+4)%4){case 0:return new u(Math.pow(n,t.re),0);case 1:return new u(0,Math.pow(n,t.re));case 2:return new u(-Math.pow(n,t.re),0);case 3:return new u(0,-Math.pow(n,t.re))}}if(0===e&&0===n&&t.re>0&&t.im>=0)return u.ZERO;var r=Math.atan2(n,e),i=s(e,n);return e=Math.exp(t.re*i-t.im*r),n=t.im*i+t.re*r,new u(e*Math.cos(n),e*Math.sin(n))},sqrt:function(){var e,n,t=this.re,r=this.im,i=this.abs();if(t>=0){if(0===r)return new u(Math.sqrt(t),0);e=.5*Math.sqrt(2*(i+t))}else e=Math.abs(r)/Math.sqrt(2*(i-t));return n=t<=0?.5*Math.sqrt(2*(i-t)):Math.abs(r)/Math.sqrt(2*(i+t)),new u(e,r<0?-n:n)},exp:function(){var e=Math.exp(this.re);return this.im,new u(e*Math.cos(this.im),e*Math.sin(this.im))},expm1:function(){var e=this.re,n=this.im;return new u(Math.expm1(e)*Math.cos(n)+function(e){var n=Math.PI/4;if(e<-n||e>n)return Math.cos(e)-1;var t=e*e;return t*(t*(1/24+t*(-1/720+t*(1/40320+t*(-1/3628800+t*(1/4790014600+t*(-1/87178291200+t*(1/20922789888e3)))))))-.5)}(n),Math.exp(e)*Math.sin(n))},log:function(){var e=this.re,n=this.im;return new u(s(e,n),Math.atan2(n,e))},abs:function(){return e=this.re,n=this.im,t=Math.abs(e),r=Math.abs(n),t<3e3&&r<3e3?Math.sqrt(t*t+r*r):(t<r?(t=r,r=e/n):r=n/e,t*Math.sqrt(1+r*r));var e,n,t,r},arg:function(){return Math.atan2(this.im,this.re)},sin:function(){var e=this.re,n=this.im;return new u(Math.sin(e)*i(n),Math.cos(e)*a(n))},cos:function(){var e=this.re,n=this.im;return new u(Math.cos(e)*i(n),-Math.sin(e)*a(n))},tan:function(){var e=2*this.re,n=2*this.im,t=Math.cos(e)+i(n);return new u(Math.sin(e)/t,a(n)/t)},cot:function(){var e=2*this.re,n=2*this.im,t=Math.cos(e)-i(n);return new u(-Math.sin(e)/t,a(n)/t)},sec:function(){var e=this.re,n=this.im,t=.5*i(2*n)+.5*Math.cos(2*e);return new u(Math.cos(e)*i(n)/t,Math.sin(e)*a(n)/t)},csc:function(){var e=this.re,n=this.im,t=.5*i(2*n)-.5*Math.cos(2*e);return new u(Math.sin(e)*i(n)/t,-Math.cos(e)*a(n)/t)},asin:function(){var e=this.re,n=this.im,t=new u(n*n-e*e+1,-2*e*n).sqrt(),r=new u(t.re-n,t.im+e).log();return new u(r.im,-r.re)},acos:function(){var e=this.re,n=this.im,t=new u(n*n-e*e+1,-2*e*n).sqrt(),r=new u(t.re-n,t.im+e).log();return new u(Math.PI/2-r.im,r.re)},atan:function(){var e=this.re,n=this.im;if(0===e){if(1===n)return new u(0,1/0);if(-1===n)return new u(0,-1/0)}var t=e*e+(1-n)*(1-n),r=new u((1-n*n-e*e)/t,-2*e/t).log();return new u(-.5*r.im,.5*r.re)},acot:function(){var e=this.re,n=this.im;if(0===n)return new u(Math.atan2(1,e),0);var t=e*e+n*n;return 0!==t?new u(e/t,-n/t).atan():new u(0!==e?e/0:0,0!==n?-n/0:0).atan()},asec:function(){var e=this.re,n=this.im;if(0===e&&0===n)return new u(0,1/0);var t=e*e+n*n;return 0!==t?new u(e/t,-n/t).acos():new u(0!==e?e/0:0,0!==n?-n/0:0).acos()},acsc:function(){var e=this.re,n=this.im;if(0===e&&0===n)return new u(Math.PI/2,1/0);var t=e*e+n*n;return 0!==t?new u(e/t,-n/t).asin():new u(0!==e?e/0:0,0!==n?-n/0:0).asin()},sinh:function(){var e=this.re,n=this.im;return new u(a(e)*Math.cos(n),i(e)*Math.sin(n))},cosh:function(){var e=this.re,n=this.im;return new u(i(e)*Math.cos(n),a(e)*Math.sin(n))},tanh:function(){var e=2*this.re,n=2*this.im,t=i(e)+Math.cos(n);return new u(a(e)/t,Math.sin(n)/t)},coth:function(){var e=2*this.re,n=2*this.im,t=i(e)-Math.cos(n);return new u(a(e)/t,-Math.sin(n)/t)},csch:function(){var e=this.re,n=this.im,t=Math.cos(2*n)-i(2*e);return new u(-2*a(e)*Math.cos(n)/t,2*i(e)*Math.sin(n)/t)},sech:function(){var e=this.re,n=this.im,t=Math.cos(2*n)+i(2*e);return new u(2*i(e)*Math.cos(n)/t,-2*a(e)*Math.sin(n)/t)},asinh:function(){var e=this.im;this.im=-this.re,this.re=e;var n=this.asin();return this.re=-this.im,this.im=e,e=n.re,n.re=-n.im,n.im=e,n},acosh:function(){var e=this.acos();if(e.im<=0){var n=e.re;e.re=-e.im,e.im=n}else{n=e.im;e.im=-e.re,e.re=n}return e},atanh:function(){var e=this.re,n=this.im,t=e>1&&0===n,r=1-e,i=1+e,a=r*r+n*n,o=0!==a?new u((i*r-n*n)/a,(n*r+i*n)/a):new u(-1!==e?e/0:0,0!==n?n/0:0),c=o.re;return o.re=s(o.re,o.im)/2,o.im=Math.atan2(o.im,c)/2,t&&(o.im=-o.im),o},acoth:function(){var e=this.re,n=this.im;if(0===e&&0===n)return new u(0,Math.PI/2);var t=e*e+n*n;return 0!==t?new u(e/t,-n/t).atanh():new u(0!==e?e/0:0,0!==n?-n/0:0).atanh()},acsch:function(){var e=this.re,n=this.im;if(0===n)return new u(0!==e?Math.log(e+Math.sqrt(e*e+1)):1/0,0);var t=e*e+n*n;return 0!==t?new u(e/t,-n/t).asinh():new u(0!==e?e/0:0,0!==n?-n/0:0).asinh()},asech:function(){var e=this.re,n=this.im;if(this.isZero())return u.INFINITY;var t=e*e+n*n;return 0!==t?new u(e/t,-n/t).acosh():new u(0!==e?e/0:0,0!==n?-n/0:0).acosh()},inverse:function(){if(this.isZero())return u.INFINITY;if(this.isInfinite())return u.ZERO;var e=this.re,n=this.im,t=e*e+n*n;return new u(e/t,-n/t)},conjugate:function(){return new u(this.re,-this.im)},neg:function(){return new u(-this.re,-this.im)},ceil:function(e){return e=Math.pow(10,e||0),new u(Math.ceil(this.re*e)/e,Math.ceil(this.im*e)/e)},floor:function(e){return e=Math.pow(10,e||0),new u(Math.floor(this.re*e)/e,Math.floor(this.im*e)/e)},round:function(e){return e=Math.pow(10,e||0),new u(Math.round(this.re*e)/e,Math.round(this.im*e)/e)},equals:function(e,n){var t=new u(e,n);return Math.abs(t.re-this.re)<=u.EPSILON&&Math.abs(t.im-this.im)<=u.EPSILON},clone:function(){return new u(this.re,this.im)},toString:function(){var e=this.re,n=this.im,t="";return this.isNaN()?"NaN":this.isZero()?"0":this.isInfinite()?"Infinity":(0!==e&&(t+=e),0!==n&&(0!==e?t+=n<0?" - ":" + ":n<0&&(t+="-"),1!==(n=Math.abs(n))&&(t+=n),t+="i"),t||"0")},toVector:function(){return[this.re,this.im]},valueOf:function(){return 0===this.im?this.re:null},isNaN:function(){return isNaN(this.re)||isNaN(this.im)},isZero:function(){return!(0!==this.re&&-0!==this.re||0!==this.im&&-0!==this.im)},isFinite:function(){return isFinite(this.re)&&isFinite(this.im)},isInfinite:function(){return!(this.isNaN()||this.isFinite())}},u.ZERO=new u(0,0),u.ONE=new u(1,0),u.I=new u(0,1),u.PI=new u(Math.PI,0),u.E=new u(Math.E,0),u.INFINITY=new u(1/0,1/0),u.NAN=new u(NaN,NaN),u.EPSILON=1e-16,void 0===(r=function(){return u}.apply(n,[]))||(e.exports=r)}()},function(e,n,t){var r=t(9),i=t(36);e.exports=t(8)?function(e,n,t){return r.f(e,n,i(1,t))}:function(e,n,t){return e[n]=t,e}},function(e,n,t){var r=t(3),i=t(13),a=t(17),o=t(37)("src"),s=t(157),u=(""+s).split("toString");t(21).inspectSource=function(e){return s.call(e)},(e.exports=function(e,n,t,s){var c="function"==typeof t;c&&(a(t,"name")||i(t,"name",n)),e[n]!==t&&(c&&(a(t,o)||i(t,o,e[n]?""+e[n]:u.join(String(n)))),e===r?e[n]=t:s?e[n]?e[n]=t:i(e,n,t):(delete e[n],i(e,n,t)))})(Function.prototype,"toString",(function(){return"function"==typeof this&&this[o]||s.call(this)}))},function(e,n,t){var r=t(0),i=t(4),a=t(27),o=/"/g,s=function(e,n,t,r){var i=String(a(e)),s="<"+n;return""!==t&&(s+=" "+t+'="'+String(r).replace(o,"&quot;")+'"'),s+">"+i+"</"+n+">"};e.exports=function(e,n){var t={};t[e]=n(s),r(r.P+r.F*i((function(){var n=""[e]('"');return n!==n.toLowerCase()||n.split('"').length>3})),"String",t)}},function(e,n,t){"use strict";var r=t(140),i=Object.prototype.toString;function a(e){return"[object Array]"===i.call(e)}function o(e){return void 0===e}function s(e){return null!==e&&"object"==typeof e}function u(e){return"[object Function]"===i.call(e)}function c(e,n){if(null!=e)if("object"!=typeof e&&(e=[e]),a(e))for(var t=0,r=e.length;t<r;t++)n.call(null,e[t],t,e);else for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&n.call(null,e[i],i,e)}e.exports={isArray:a,isArrayBuffer:function(e){return"[object ArrayBuffer]"===i.call(e)},isBuffer:function(e){return null!==e&&!o(e)&&null!==e.constructor&&!o(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:s,isUndefined:o,isDate:function(e){return"[object Date]"===i.call(e)},isFile:function(e){return"[object File]"===i.call(e)},isBlob:function(e){return"[object Blob]"===i.call(e)},isFunction:u,isStream:function(e){return s(e)&&u(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:c,merge:function e(){var n={};function t(t,r){"object"==typeof n[r]&&"object"==typeof t?n[r]=e(n[r],t):n[r]=t}for(var r=0,i=arguments.length;r<i;r++)c(arguments[r],t);return n},deepMerge:function e(){var n={};function t(t,r){"object"==typeof n[r]&&"object"==typeof t?n[r]=e(n[r],t):n[r]="object"==typeof t?e({},t):t}for(var r=0,i=arguments.length;r<i;r++)c(arguments[r],t);return n},extend:function(e,n,t){return c(n,(function(n,i){e[i]=t&&"function"==typeof n?r(n,t):n})),e},trim:function(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}}},function(e,n){var t={}.hasOwnProperty;e.exports=function(e,n){return t.call(e,n)}},function(e,n,t){var r=t(54),i=t(27);e.exports=function(e){return r(i(e))}},function(e,n,t){var r=t(55),i=t(36),a=t(18),o=t(26),s=t(17),u=t(103),c=Object.getOwnPropertyDescriptor;n.f=t(8)?c:function(e,n){if(e=a(e),n=o(n,!0),u)try{return c(e,n)}catch(e){}if(s(e,n))return i(!r.f.call(e,n),e[n])}},function(e,n,t){var r=t(17),i=t(10),a=t(75)("IE_PROTO"),o=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=i(e),r(e,a)?e[a]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?o:null}},function(e,n){var t=e.exports={version:"2.6.11"};"number"==typeof __e&&(__e=t)},function(e,n,t){var r=t(11);e.exports=function(e,n,t){if(r(e),void 0===n)return e;switch(t){case 1:return function(t){return e.call(n,t)};case 2:return function(t,r){return e.call(n,t,r)};case 3:return function(t,r,i){return e.call(n,t,r,i)}}return function(){return e.apply(n,arguments)}}},function(e,n){var t={}.toString;e.exports=function(e){return t.call(e).slice(8,-1)}},function(e,n){var t=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:t)(e)}},function(e,n,t){"use strict";var r=t(4);e.exports=function(e,n){return!!e&&r((function(){n?e.call(null,(function(){}),1):e.call(null)}))}},function(e,n,t){var r=t(5);e.exports=function(e,n){if(!r(e))return e;var t,i;if(n&&"function"==typeof(t=e.toString)&&!r(i=t.call(e)))return i;if("function"==typeof(t=e.valueOf)&&!r(i=t.call(e)))return i;if(!n&&"function"==typeof(t=e.toString)&&!r(i=t.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},function(e,n){e.exports=function(e){if(null==e)throw TypeError("Can't call method on  "+e);return e}},function(e,n,t){var r=t(0),i=t(21),a=t(4);e.exports=function(e,n){var t=(i.Object||{})[e]||Object[e],o={};o[e]=n(t),r(r.S+r.F*a((function(){t(1)})),"Object",o)}},function(e,n,t){var r=t(22),i=t(54),a=t(10),o=t(7),s=t(91);e.exports=function(e,n){var t=1==e,u=2==e,c=3==e,f=4==e,l=6==e,p=5==e||l,d=n||s;return function(n,s,m){for(var h,y,g=a(n),v=i(g),x=r(s,m,3),b=o(v.length),w=0,N=t?d(n,b):u?d(n,0):void 0;b>w;w++)if((p||w in v)&&(y=x(h=v[w],w,g),e))if(t)N[w]=y;else if(y)switch(e){case 3:return!0;case 5:return h;case 6:return w;case 2:N.push(h)}else if(f)return!1;return l?-1:c||f?f:N}}},function(e,n,t){"use strict";if(t(8)){var r=t(33),i=t(3),a=t(4),o=t(0),s=t(68),u=t(99),c=t(22),f=t(43),l=t(36),p=t(13),d=t(45),m=t(24),h=t(7),y=t(131),g=t(39),v=t(26),x=t(17),b=t(50),w=t(5),N=t(10),S=t(88),M=t(40),D=t(20),E=t(41).f,A=t(90),_=t(37),O=t(6),C=t(29),T=t(58),I=t(57),k=t(93),B=t(52),q=t(63),R=t(42),P=t(92),z=t(120),F=t(9),j=t(19),U=F.f,L=j.f,H=i.RangeError,G=i.TypeError,$=i.Uint8Array,V=Array.prototype,W=u.ArrayBuffer,Z=u.DataView,J=C(0),Y=C(2),X=C(3),Q=C(4),K=C(5),ee=C(6),ne=T(!0),te=T(!1),re=k.values,ie=k.keys,ae=k.entries,oe=V.lastIndexOf,se=V.reduce,ue=V.reduceRight,ce=V.join,fe=V.sort,le=V.slice,pe=V.toString,de=V.toLocaleString,me=O("iterator"),he=O("toStringTag"),ye=_("typed_constructor"),ge=_("def_constructor"),ve=s.CONSTR,xe=s.TYPED,be=s.VIEW,we=C(1,(function(e,n){return Ee(I(e,e[ge]),n)})),Ne=a((function(){return 1===new $(new Uint16Array([1]).buffer)[0]})),Se=!!$&&!!$.prototype.set&&a((function(){new $(1).set({})})),Me=function(e,n){var t=m(e);if(t<0||t%n)throw H("Wrong offset!");return t},De=function(e){if(w(e)&&xe in e)return e;throw G(e+" is not a typed array!")},Ee=function(e,n){if(!w(e)||!(ye in e))throw G("It is not a typed array constructor!");return new e(n)},Ae=function(e,n){return _e(I(e,e[ge]),n)},_e=function(e,n){for(var t=0,r=n.length,i=Ee(e,r);r>t;)i[t]=n[t++];return i},Oe=function(e,n,t){U(e,n,{get:function(){return this._d[t]}})},Ce=function(e){var n,t,r,i,a,o,s=N(e),u=arguments.length,f=u>1?arguments[1]:void 0,l=void 0!==f,p=A(s);if(null!=p&&!S(p)){for(o=p.call(s),r=[],n=0;!(a=o.next()).done;n++)r.push(a.value);s=r}for(l&&u>2&&(f=c(f,arguments[2],2)),n=0,t=h(s.length),i=Ee(this,t);t>n;n++)i[n]=l?f(s[n],n):s[n];return i},Te=function(){for(var e=0,n=arguments.length,t=Ee(this,n);n>e;)t[e]=arguments[e++];return t},Ie=!!$&&a((function(){de.call(new $(1))})),ke=function(){return de.apply(Ie?le.call(De(this)):De(this),arguments)},Be={copyWithin:function(e,n){return z.call(De(this),e,n,arguments.length>2?arguments[2]:void 0)},every:function(e){return Q(De(this),e,arguments.length>1?arguments[1]:void 0)},fill:function(e){return P.apply(De(this),arguments)},filter:function(e){return Ae(this,Y(De(this),e,arguments.length>1?arguments[1]:void 0))},find:function(e){return K(De(this),e,arguments.length>1?arguments[1]:void 0)},findIndex:function(e){return ee(De(this),e,arguments.length>1?arguments[1]:void 0)},forEach:function(e){J(De(this),e,arguments.length>1?arguments[1]:void 0)},indexOf:function(e){return te(De(this),e,arguments.length>1?arguments[1]:void 0)},includes:function(e){return ne(De(this),e,arguments.length>1?arguments[1]:void 0)},join:function(e){return ce.apply(De(this),arguments)},lastIndexOf:function(e){return oe.apply(De(this),arguments)},map:function(e){return we(De(this),e,arguments.length>1?arguments[1]:void 0)},reduce:function(e){return se.apply(De(this),arguments)},reduceRight:function(e){return ue.apply(De(this),arguments)},reverse:function(){for(var e,n=De(this).length,t=Math.floor(n/2),r=0;r<t;)e=this[r],this[r++]=this[--n],this[n]=e;return this},some:function(e){return X(De(this),e,arguments.length>1?arguments[1]:void 0)},sort:function(e){return fe.call(De(this),e)},subarray:function(e,n){var t=De(this),r=t.length,i=g(e,r);return new(I(t,t[ge]))(t.buffer,t.byteOffset+i*t.BYTES_PER_ELEMENT,h((void 0===n?r:g(n,r))-i))}},qe=function(e,n){return Ae(this,le.call(De(this),e,n))},Re=function(e){De(this);var n=Me(arguments[1],1),t=this.length,r=N(e),i=h(r.length),a=0;if(i+n>t)throw H("Wrong length!");for(;a<i;)this[n+a]=r[a++]},Pe={entries:function(){return ae.call(De(this))},keys:function(){return ie.call(De(this))},values:function(){return re.call(De(this))}},ze=function(e,n){return w(e)&&e[xe]&&"symbol"!=typeof n&&n in e&&String(+n)==String(n)},Fe=function(e,n){return ze(e,n=v(n,!0))?l(2,e[n]):L(e,n)},je=function(e,n,t){return!(ze(e,n=v(n,!0))&&w(t)&&x(t,"value"))||x(t,"get")||x(t,"set")||t.configurable||x(t,"writable")&&!t.writable||x(t,"enumerable")&&!t.enumerable?U(e,n,t):(e[n]=t.value,e)};ve||(j.f=Fe,F.f=je),o(o.S+o.F*!ve,"Object",{getOwnPropertyDescriptor:Fe,defineProperty:je}),a((function(){pe.call({})}))&&(pe=de=function(){return ce.call(this)});var Ue=d({},Be);d(Ue,Pe),p(Ue,me,Pe.values),d(Ue,{slice:qe,set:Re,constructor:function(){},toString:pe,toLocaleString:ke}),Oe(Ue,"buffer","b"),Oe(Ue,"byteOffset","o"),Oe(Ue,"byteLength","l"),Oe(Ue,"length","e"),U(Ue,he,{get:function(){return this[xe]}}),e.exports=function(e,n,t,u){var c=e+((u=!!u)?"Clamped":"")+"Array",l="get"+e,d="set"+e,m=i[c],g=m||{},v=m&&D(m),x=!m||!s.ABV,N={},S=m&&m.prototype,A=function(e,t){U(e,t,{get:function(){return function(e,t){var r=e._d;return r.v[l](t*n+r.o,Ne)}(this,t)},set:function(e){return function(e,t,r){var i=e._d;u&&(r=(r=Math.round(r))<0?0:r>255?255:255&r),i.v[d](t*n+i.o,r,Ne)}(this,t,e)},enumerable:!0})};x?(m=t((function(e,t,r,i){f(e,m,c,"_d");var a,o,s,u,l=0,d=0;if(w(t)){if(!(t instanceof W||"ArrayBuffer"==(u=b(t))||"SharedArrayBuffer"==u))return xe in t?_e(m,t):Ce.call(m,t);a=t,d=Me(r,n);var g=t.byteLength;if(void 0===i){if(g%n)throw H("Wrong length!");if((o=g-d)<0)throw H("Wrong length!")}else if((o=h(i)*n)+d>g)throw H("Wrong length!");s=o/n}else s=y(t),a=new W(o=s*n);for(p(e,"_d",{b:a,o:d,l:o,e:s,v:new Z(a)});l<s;)A(e,l++)})),S=m.prototype=M(Ue),p(S,"constructor",m)):a((function(){m(1)}))&&a((function(){new m(-1)}))&&q((function(e){new m,new m(null),new m(1.5),new m(e)}),!0)||(m=t((function(e,t,r,i){var a;return f(e,m,c),w(t)?t instanceof W||"ArrayBuffer"==(a=b(t))||"SharedArrayBuffer"==a?void 0!==i?new g(t,Me(r,n),i):void 0!==r?new g(t,Me(r,n)):new g(t):xe in t?_e(m,t):Ce.call(m,t):new g(y(t))})),J(v!==Function.prototype?E(g).concat(E(v)):E(g),(function(e){e in m||p(m,e,g[e])})),m.prototype=S,r||(S.constructor=m));var _=S[me],O=!!_&&("values"==_.name||null==_.name),C=Pe.values;p(m,ye,!0),p(S,xe,c),p(S,be,!0),p(S,ge,m),(u?new m(1)[he]==c:he in S)||U(S,he,{get:function(){return c}}),N[c]=m,o(o.G+o.W+o.F*(m!=g),N),o(o.S,c,{BYTES_PER_ELEMENT:n}),o(o.S+o.F*a((function(){g.of.call(m,1)})),c,{from:Ce,of:Te}),"BYTES_PER_ELEMENT"in S||p(S,"BYTES_PER_ELEMENT",n),o(o.P,c,Be),R(c),o(o.P+o.F*Se,c,{set:Re}),o(o.P+o.F*!O,c,Pe),r||S.toString==pe||(S.toString=pe),o(o.P+o.F*a((function(){new m(1).slice()})),c,{slice:qe}),o(o.P+o.F*(a((function(){return[1,2].toLocaleString()!=new m([1,2]).toLocaleString()}))||!a((function(){S.toLocaleString.call([1,2])}))),c,{toLocaleString:ke}),B[c]=O?_:C,r||O||p(S,me,C)}}else e.exports=function(){}},function(e,n,t){var r=t(126),i=t(0),a=t(53)("metadata"),o=a.store||(a.store=new(t(129))),s=function(e,n,t){var i=o.get(e);if(!i){if(!t)return;o.set(e,i=new r)}var a=i.get(n);if(!a){if(!t)return;i.set(n,a=new r)}return a};e.exports={store:o,map:s,has:function(e,n,t){var r=s(n,t,!1);return void 0!==r&&r.has(e)},get:function(e,n,t){var r=s(n,t,!1);return void 0===r?void 0:r.get(e)},set:function(e,n,t,r){s(t,r,!0).set(e,n)},keys:function(e,n){var t=s(e,n,!1),r=[];return t&&t.forEach((function(e,n){r.push(n)})),r},key:function(e){return void 0===e||"symbol"==typeof e?e:String(e)},exp:function(e){i(i.S,"Reflect",e)}}},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});n.elements={searchForm:document.querySelector(".search"),searchInput:document.querySelector(".search__field"),searchRes:document.querySelector(".results"),searchResList:document.querySelector(".results__list"),searchResPages:document.querySelector(".results__pages"),recipe:document.querySelector(".recipe"),shopping:document.querySelector(".shopping__list"),likesMenu:document.querySelector(".likes__field"),likesList:document.querySelector(".likes__list"),shoppingHeading:document.querySelector(".shopping")};var r=n.elementStrings={loader:"loader"};n.renderLoader=function(e){var n='\n        <div class="'+r.loader+'">\n            <svg>\n                <use href="img/icons.svg#icon-cw"></use>\n            </svg>\n        </div>\n    ';e.insertAdjacentHTML("afterbegin",n)},n.clearLoader=function(){var e=document.querySelector("."+r.loader);e&&e.parentElement.removeChild(e)}},function(e,n){e.exports=!1},function(e,n,t){var r=t(37)("meta"),i=t(5),a=t(17),o=t(9).f,s=0,u=Object.isExtensible||function(){return!0},c=!t(4)((function(){return u(Object.preventExtensions({}))})),f=function(e){o(e,r,{value:{i:"O"+ ++s,w:{}}})},l=e.exports={KEY:r,NEED:!1,fastKey:function(e,n){if(!i(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!a(e,r)){if(!u(e))return"F";if(!n)return"E";f(e)}return e[r].i},getWeak:function(e,n){if(!a(e,r)){if(!u(e))return!0;if(!n)return!1;f(e)}return e[r].w},onFreeze:function(e){return c&&l.NEED&&u(e)&&!a(e,r)&&f(e),e}}},function(e,n,t){var r=t(6)("unscopables"),i=Array.prototype;null==i[r]&&t(13)(i,r,{}),e.exports=function(e){i[r][e]=!0}},function(e,n){e.exports=function(e,n){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:n}}},function(e,n){var t=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++t+r).toString(36))}},function(e,n,t){var r=t(105),i=t(76);e.exports=Object.keys||function(e){return r(e,i)}},function(e,n,t){var r=t(24),i=Math.max,a=Math.min;e.exports=function(e,n){return(e=r(e))<0?i(e+n,0):a(e,n)}},function(e,n,t){var r=t(2),i=t(106),a=t(76),o=t(75)("IE_PROTO"),s=function(){},u=function(){var e,n=t(73)("iframe"),r=a.length;for(n.style.display="none",t(77).appendChild(n),n.src="javascript:",(e=n.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),u=e.F;r--;)delete u.prototype[a[r]];return u()};e.exports=Object.create||function(e,n){var t;return null!==e?(s.prototype=r(e),t=new s,s.prototype=null,t[o]=e):t=u(),void 0===n?t:i(t,n)}},function(e,n,t){var r=t(105),i=t(76).concat("length","prototype");n.f=Object.getOwnPropertyNames||function(e){return r(e,i)}},function(e,n,t){"use strict";var r=t(3),i=t(9),a=t(8),o=t(6)("species");e.exports=function(e){var n=r[e];a&&n&&!n[o]&&i.f(n,o,{configurable:!0,get:function(){return this}})}},function(e,n){e.exports=function(e,n,t,r){if(!(e instanceof n)||void 0!==r&&r in e)throw TypeError(t+": incorrect invocation!");return e}},function(e,n,t){var r=t(22),i=t(118),a=t(88),o=t(2),s=t(7),u=t(90),c={},f={};(n=e.exports=function(e,n,t,l,p){var d,m,h,y,g=p?function(){return e}:u(e),v=r(t,l,n?2:1),x=0;if("function"!=typeof g)throw TypeError(e+" is not iterable!");if(a(g)){for(d=s(e.length);d>x;x++)if((y=n?v(o(m=e[x])[0],m[1]):v(e[x]))===c||y===f)return y}else for(h=g.call(e);!(m=h.next()).done;)if((y=i(h,v,m.value,n))===c||y===f)return y}).BREAK=c,n.RETURN=f},function(e,n,t){var r=t(14);e.exports=function(e,n,t){for(var i in n)r(e,i,n[i],t);return e}},function(e,n,t){var r=t(5);e.exports=function(e,n){if(!r(e)||e._t!==n)throw TypeError("Incompatible receiver, "+n+" required!");return e}},function(e,n,t){var r;
  /**
   * @license Fraction.js v4.0.12 09/09/2015
   * http://www.xarg.org/2014/03/rational-numbers-in-javascript/
   *
   * Copyright (c) 2015, Robert Eisele (robert@xarg.org)
   * Dual licensed under the MIT or GPL Version 2 licenses.
   **/!function(t){"use strict";var i={s:1,n:0,d:1};function a(e){function n(){var n=Error.apply(this,arguments);n.name=this.name=e,this.stack=n.stack,this.message=n.message}function t(){}return t.prototype=Error.prototype,n.prototype=new t,n}var o=p.DivisionByZero=a("DivisionByZero"),s=p.InvalidParameter=a("InvalidParameter");function u(e,n){return isNaN(e=parseInt(e,10))&&c(),e*n}function c(){throw new s}var f=function(e,n){var t,r=0,a=1,s=1,f=0,l=0,p=0,d=1,m=1,h=0,y=1,g=1,v=1,x=1e7;if(null==e);else if(void 0!==n)s=(r=e)*(a=n);else switch(typeof e){case"object":"d"in e&&"n"in e?(r=e.n,a=e.d,"s"in e&&(r*=e.s)):0 in e?(r=e[0],1 in e&&(a=e[1])):c(),s=r*a;break;case"number":if(e<0&&(s=e,e=-e),e%1==0)r=e;else if(e>0){for(e>=1&&(e/=m=Math.pow(10,Math.floor(1+Math.log(e)/Math.LN10)));y<=x&&v<=x;){if(e===(t=(h+g)/(y+v))){y+v<=x?(r=h+g,a=y+v):v>y?(r=g,a=v):(r=h,a=y);break}e>t?(h+=g,y+=v):(g+=h,v+=y),y>x?(r=g,a=v):(r=h,a=y)}r*=m}else(isNaN(e)||isNaN(n))&&(a=r=NaN);break;case"string":if(null===(y=e.match(/\d+|./g))&&c(),"-"===y[h]?(s=-1,h++):"+"===y[h]&&h++,y.length===h+1?l=u(y[h++],s):"."===y[h+1]||"."===y[h]?("."!==y[h]&&(f=u(y[h++],s)),(++h+1===y.length||"("===y[h+1]&&")"===y[h+3]||"'"===y[h+1]&&"'"===y[h+3])&&(l=u(y[h],s),d=Math.pow(10,y[h].length),h++),("("===y[h]&&")"===y[h+2]||"'"===y[h]&&"'"===y[h+2])&&(p=u(y[h+1],s),m=Math.pow(10,y[h+1].length)-1,h+=3)):"/"===y[h+1]||":"===y[h+1]?(l=u(y[h],s),d=u(y[h+2],1),h+=3):"/"===y[h+3]&&" "===y[h+1]&&(f=u(y[h],s),l=u(y[h+2],s),d=u(y[h+4],1),h+=5),y.length<=h){s=r=p+(a=d*m)*f+m*l;break}default:c()}if(0===a)throw new o;i.s=s<0?-1:1,i.n=Math.abs(r),i.d=Math.abs(a)};function l(e,n){if(!e)return n;if(!n)return e;for(;;){if(!(e%=n))return n;if(!(n%=e))return e}}function p(e,n){if(!(this instanceof p))return new p(e,n);f(e,n),e=p.REDUCE?l(i.d,i.n):1,this.s=i.s,this.n=i.n/e,this.d=i.d/e}p.REDUCE=1,p.prototype={s:1,n:0,d:1,abs:function(){return new p(this.n,this.d)},neg:function(){return new p(-this.s*this.n,this.d)},add:function(e,n){return f(e,n),new p(this.s*this.n*i.d+i.s*this.d*i.n,this.d*i.d)},sub:function(e,n){return f(e,n),new p(this.s*this.n*i.d-i.s*this.d*i.n,this.d*i.d)},mul:function(e,n){return f(e,n),new p(this.s*i.s*this.n*i.n,this.d*i.d)},div:function(e,n){return f(e,n),new p(this.s*i.s*this.n*i.d,this.d*i.n)},clone:function(){return new p(this)},mod:function(e,n){return isNaN(this.n)||isNaN(this.d)?new p(NaN):void 0===e?new p(this.s*this.n%this.d,1):(f(e,n),0===i.n&&0===this.d&&p(0,0),new p(this.s*(i.d*this.n)%(i.n*this.d),i.d*this.d))},gcd:function(e,n){return f(e,n),new p(l(i.n,this.n)*l(i.d,this.d),i.d*this.d)},lcm:function(e,n){return f(e,n),0===i.n&&0===this.n?new p:new p(i.n*this.n,l(i.n,this.n)*l(i.d,this.d))},ceil:function(e){return e=Math.pow(10,e||0),isNaN(this.n)||isNaN(this.d)?new p(NaN):new p(Math.ceil(e*this.s*this.n/this.d),e)},floor:function(e){return e=Math.pow(10,e||0),isNaN(this.n)||isNaN(this.d)?new p(NaN):new p(Math.floor(e*this.s*this.n/this.d),e)},round:function(e){return e=Math.pow(10,e||0),isNaN(this.n)||isNaN(this.d)?new p(NaN):new p(Math.round(e*this.s*this.n/this.d),e)},inverse:function(){return new p(this.s*this.d,this.n)},pow:function(e){return e<0?new p(Math.pow(this.s*this.d,-e),Math.pow(this.n,-e)):new p(Math.pow(this.s*this.n,e),Math.pow(this.d,e))},equals:function(e,n){return f(e,n),this.s*this.n*i.d==i.s*i.n*this.d},compare:function(e,n){f(e,n);var t=this.s*this.n*i.d-i.s*i.n*this.d;return(0<t)-(t<0)},simplify:function(e){if(isNaN(this.n)||isNaN(this.d))return this;var n=this.abs().toContinued();function t(e){return 1===e.length?new p(e[0]):t(e.slice(1)).inverse().add(e[0])}e=e||.001;for(var r=0;r<n.length;r++){var i=t(n.slice(0,r+1));if(i.sub(this.abs()).abs().valueOf()<e)return i.mul(this.s)}return this},divisible:function(e,n){return f(e,n),!(!(i.n*this.d)||this.n*i.d%(i.n*this.d))},valueOf:function(){return this.s*this.n/this.d},toFraction:function(e){var n,t="",r=this.n,i=this.d;return this.s<0&&(t+="-"),1===i?t+=r:(e&&(n=Math.floor(r/i))>0&&(t+=n,t+=" ",r%=i),t+=r,t+="/",t+=i),t},toLatex:function(e){var n,t="",r=this.n,i=this.d;return this.s<0&&(t+="-"),1===i?t+=r:(e&&(n=Math.floor(r/i))>0&&(t+=n,r%=i),t+="\\frac{",t+=r,t+="}{",t+=i,t+="}"),t},toContinued:function(){var e,n=this.n,t=this.d,r=[];if(isNaN(this.n)||isNaN(this.d))return r;do{r.push(Math.floor(n/t)),e=n%t,n=t,t=e}while(1!==n);return r},toString:function(e){var n,t=this.n,r=this.d;if(isNaN(t)||isNaN(r))return"NaN";p.REDUCE||(t/=n=l(t,r),r/=n),e=e||15;var i=function(e,n){for(;n%2==0;n/=2);for(;n%5==0;n/=5);if(1===n)return 0;for(var t=10%n,r=1;1!==t;r++)if(t=10*t%n,r>2e3)return 0;return r}(0,r),a=function(e,n,t){for(var r=1,i=function(e,n,t){for(var r=1;n>0;e=e*e%t,n>>=1)1&n&&(r=r*e%t);return r}(10,t,n),a=0;a<300;a++){if(r===i)return a;r=10*r%n,i=10*i%n}return 0}(0,r,i),o=-1===this.s?"-":"";if(o+=t/r|0,t%=r,(t*=10)&&(o+="."),i){for(var s=a;s--;)o+=t/r|0,t%=r,t*=10;o+="(";for(s=i;s--;)o+=t/r|0,t%=r,t*=10;o+=")"}else for(s=e;t&&s--;)o+=t/r|0,t%=r,t*=10;return o}},void 0===(r=function(){return p}.apply(n,[]))||(e.exports=r)}()},function(e,n){e.exports=function e(n,t){"use strict";var r,i,a=/(^([+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?)?$|^0x[0-9a-f]+$|\d+)/gi,o=/(^[ ]*|[ ]*$)/g,s=/(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[\/\-]\d{1,4}[\/\-]\d{1,4}|^\w+, \w+ \d+, \d{4})/,u=/^0x[0-9a-f]+$/i,c=/^0/,f=function(n){return e.insensitive&&(""+n).toLowerCase()||""+n},l=f(n).replace(o,"")||"",p=f(t).replace(o,"")||"",d=l.replace(a,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0"),m=p.replace(a,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0"),h=parseInt(l.match(u),16)||1!==d.length&&l.match(s)&&Date.parse(l),y=parseInt(p.match(u),16)||h&&p.match(s)&&Date.parse(p)||null;if(y){if(h<y)return-1;if(h>y)return 1}for(var g=0,v=Math.max(d.length,m.length);g<v;g++){if(r=!(d[g]||"").match(c)&&parseFloat(d[g])||d[g]||0,i=!(m[g]||"").match(c)&&parseFloat(m[g])||m[g]||0,isNaN(r)!==isNaN(i))return isNaN(r)?1:-1;if(typeof r!=typeof i&&(r+="",i+=""),r<i)return-1;if(r>i)return 1}return 0}},function(e,n,t){var r=t(9).f,i=t(17),a=t(6)("toStringTag");e.exports=function(e,n,t){e&&!i(e=t?e:e.prototype,a)&&r(e,a,{configurable:!0,value:n})}},function(e,n,t){var r=t(23),i=t(6)("toStringTag"),a="Arguments"==r(function(){return arguments}());e.exports=function(e){var n,t,o;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(t=function(e,n){try{return e[n]}catch(e){}}(n=Object(e),i))?t:a?r(n):"Object"==(o=r(n))&&"function"==typeof n.callee?"Arguments":o}},function(e,n,t){var r=t(0),i=t(27),a=t(4),o=t(79),s="["+o+"]",u=RegExp("^"+s+s+"*"),c=RegExp(s+s+"*$"),f=function(e,n,t){var i={},s=a((function(){return!!o[e]()||"​"!="​"[e]()})),u=i[e]=s?n(l):o[e];t&&(i[t]=u),r(r.P+r.F*s,"String",i)},l=f.trim=function(e,n){return e=String(i(e)),1&n&&(e=e.replace(u,"")),2&n&&(e=e.replace(c,"")),e};e.exports=f},function(e,n){e.exports={}},function(e,n,t){var r=t(21),i=t(3),a=i["__core-js_shared__"]||(i["__core-js_shared__"]={});(e.exports=function(e,n){return a[e]||(a[e]=void 0!==n?n:{})})("versions",[]).push({version:r.version,mode:t(33)?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},function(e,n,t){var r=t(23);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},function(e,n){n.f={}.propertyIsEnumerable},function(e,n,t){"use strict";var r=t(2);e.exports=function(){var e=r(this),n="";return e.global&&(n+="g"),e.ignoreCase&&(n+="i"),e.multiline&&(n+="m"),e.unicode&&(n+="u"),e.sticky&&(n+="y"),n}},function(e,n,t){var r=t(2),i=t(11),a=t(6)("species");e.exports=function(e,n){var t,o=r(e).constructor;return void 0===o||null==(t=r(o)[a])?n:i(t)}},function(e,n,t){var r=t(18),i=t(7),a=t(39);e.exports=function(e){return function(n,t,o){var s,u=r(n),c=i(u.length),f=a(o,c);if(e&&t!=t){for(;c>f;)if((s=u[f++])!=s)return!0}else for(;c>f;f++)if((e||f in u)&&u[f]===t)return e||f||0;return!e&&-1}}},function(e,n){n.f=Object.getOwnPropertySymbols},function(e,n,t){var r=t(23);e.exports=Array.isArray||function(e){return"Array"==r(e)}},function(e,n,t){var r=t(24),i=t(27);e.exports=function(e){return function(n,t){var a,o,s=String(i(n)),u=r(t),c=s.length;return u<0||u>=c?e?"":void 0:(a=s.charCodeAt(u))<55296||a>56319||u+1===c||(o=s.charCodeAt(u+1))<56320||o>57343?e?s.charAt(u):a:e?s.slice(u,u+2):o-56320+(a-55296<<10)+65536}}},function(e,n,t){var r=t(5),i=t(23),a=t(6)("match");e.exports=function(e){var n;return r(e)&&(void 0!==(n=e[a])?!!n:"RegExp"==i(e))}},function(e,n,t){var r=t(6)("iterator"),i=!1;try{var a=[7][r]();a.return=function(){i=!0},Array.from(a,(function(){throw 2}))}catch(e){}e.exports=function(e,n){if(!n&&!i)return!1;var t=!1;try{var a=[7],o=a[r]();o.next=function(){return{done:t=!0}},a[r]=function(){return o},e(a)}catch(e){}return t}},function(e,n,t){"use strict";var r=t(50),i=RegExp.prototype.exec;e.exports=function(e,n){var t=e.exec;if("function"==typeof t){var a=t.call(e,n);if("object"!=typeof a)throw new TypeError("RegExp exec method returned something other than an Object or null");return a}if("RegExp"!==r(e))throw new TypeError("RegExp#exec called on incompatible receiver");return i.call(e,n)}},function(e,n,t){"use strict";t(122);var r=t(14),i=t(13),a=t(4),o=t(27),s=t(6),u=t(94),c=s("species"),f=!a((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")})),l=function(){var e=/(?:)/,n=e.exec;e.exec=function(){return n.apply(this,arguments)};var t="ab".split(e);return 2===t.length&&"a"===t[0]&&"b"===t[1]}();e.exports=function(e,n,t){var p=s(e),d=!a((function(){var n={};return n[p]=function(){return 7},7!=""[e](n)})),m=d?!a((function(){var n=!1,t=/a/;return t.exec=function(){return n=!0,null},"split"===e&&(t.constructor={},t.constructor[c]=function(){return t}),t[p](""),!n})):void 0;if(!d||!m||"replace"===e&&!f||"split"===e&&!l){var h=/./[p],y=t(o,p,""[e],(function(e,n,t,r,i){return n.exec===u?d&&!i?{done:!0,value:h.call(n,t,r)}:{done:!0,value:e.call(t,n,r)}:{done:!1}})),g=y[0],v=y[1];r(String.prototype,e,g),i(RegExp.prototype,p,2==n?function(e,n){return v.call(e,this,n)}:function(e){return v.call(e,this)})}}},function(e,n,t){var r=t(3).navigator;e.exports=r&&r.userAgent||""},function(e,n,t){"use strict";var r=t(3),i=t(0),a=t(14),o=t(45),s=t(34),u=t(44),c=t(43),f=t(5),l=t(4),p=t(63),d=t(49),m=t(80);e.exports=function(e,n,t,h,y,g){var v=r[e],x=v,b=y?"set":"add",w=x&&x.prototype,N={},S=function(e){var n=w[e];a(w,e,"delete"==e||"has"==e?function(e){return!(g&&!f(e))&&n.call(this,0===e?0:e)}:"get"==e?function(e){return g&&!f(e)?void 0:n.call(this,0===e?0:e)}:"add"==e?function(e){return n.call(this,0===e?0:e),this}:function(e,t){return n.call(this,0===e?0:e,t),this})};if("function"==typeof x&&(g||w.forEach&&!l((function(){(new x).entries().next()})))){var M=new x,D=M[b](g?{}:-0,1)!=M,E=l((function(){M.has(1)})),A=p((function(e){new x(e)})),_=!g&&l((function(){for(var e=new x,n=5;n--;)e[b](n,n);return!e.has(-0)}));A||((x=n((function(n,t){c(n,x,e);var r=m(new v,n,x);return null!=t&&u(t,y,r[b],r),r}))).prototype=w,w.constructor=x),(E||_)&&(S("delete"),S("has"),y&&S("get")),(_||D)&&S(b),g&&w.clear&&delete w.clear}else x=h.getConstructor(n,e,y,b),o(x.prototype,t),s.NEED=!0;return d(x,e),N[e]=x,i(i.G+i.W+i.F*(x!=v),N),g||h.setStrong(x,e,y),x}},function(e,n,t){for(var r,i=t(3),a=t(13),o=t(37),s=o("typed_array"),u=o("view"),c=!(!i.ArrayBuffer||!i.DataView),f=c,l=0,p="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");l<9;)(r=i[p[l++]])?(a(r.prototype,s,!0),a(r.prototype,u,!0)):f=!1;e.exports={ABV:c,CONSTR:f,TYPED:s,VIEW:u}},function(e,n,t){"use strict";e.exports=t(33)||!t(4)((function(){var e=Math.random();__defineSetter__.call(null,e,(function(){})),delete t(3)[e]}))},function(e,n,t){"use strict";var r=t(0);e.exports=function(e){r(r.S,e,{of:function(){for(var e=arguments.length,n=new Array(e);e--;)n[e]=arguments[e];return new this(n)}})}},function(e,n,t){"use strict";var r=t(0),i=t(11),a=t(22),o=t(44);e.exports=function(e){r(r.S,e,{from:function(e){var n,t,r,s,u=arguments[1];return i(this),(n=void 0!==u)&&i(u),null==e?new this:(t=[],n?(r=0,s=a(u,arguments[2],2),o(e,!1,(function(e){t.push(s(e,r++))}))):o(e,!1,t.push,t),new this(t))}})}},function(e,n){var t;t=function(){return this}();try{t=t||new Function("return this")()}catch(e){"object"==typeof window&&(t=window)}e.exports=t},function(e,n,t){var r=t(5),i=t(3).document,a=r(i)&&r(i.createElement);e.exports=function(e){return a?i.createElement(e):{}}},function(e,n,t){var r=t(3),i=t(21),a=t(33),o=t(104),s=t(9).f;e.exports=function(e){var n=i.Symbol||(i.Symbol=a?{}:r.Symbol||{});"_"==e.charAt(0)||e in n||s(n,e,{value:o.f(e)})}},function(e,n,t){var r=t(53)("keys"),i=t(37);e.exports=function(e){return r[e]||(r[e]=i(e))}},function(e,n){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,n,t){var r=t(3).document;e.exports=r&&r.documentElement},function(e,n,t){var r=t(5),i=t(2),a=function(e,n){if(i(e),!r(n)&&null!==n)throw TypeError(n+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,n,r){try{(r=t(22)(Function.call,t(19).f(Object.prototype,"__proto__").set,2))(e,[]),n=!(e instanceof Array)}catch(e){n=!0}return function(e,t){return a(e,t),n?e.__proto__=t:r(e,t),e}}({},!1):void 0),check:a}},function(e,n){e.exports="\t\n\v\f\r   ᠎             　\u2028\u2029\ufeff"},function(e,n,t){var r=t(5),i=t(78).set;e.exports=function(e,n,t){var a,o=n.constructor;return o!==t&&"function"==typeof o&&(a=o.prototype)!==t.prototype&&r(a)&&i&&i(e,a),e}},function(e,n,t){"use strict";var r=t(24),i=t(27);e.exports=function(e){var n=String(i(this)),t="",a=r(e);if(a<0||a==1/0)throw RangeError("Count can't be negative");for(;a>0;(a>>>=1)&&(n+=n))1&a&&(t+=n);return t}},function(e,n){e.exports=Math.sign||function(e){return 0==(e=+e)||e!=e?e:e<0?-1:1}},function(e,n){var t=Math.expm1;e.exports=!t||t(10)>22025.465794806718||t(10)<22025.465794806718||-2e-17!=t(-2e-17)?function(e){return 0==(e=+e)?e:e>-1e-6&&e<1e-6?e+e*e/2:Math.exp(e)-1}:t},function(e,n,t){"use strict";var r=t(33),i=t(0),a=t(14),o=t(13),s=t(52),u=t(85),c=t(49),f=t(20),l=t(6)("iterator"),p=!([].keys&&"next"in[].keys()),d=function(){return this};e.exports=function(e,n,t,m,h,y,g){u(t,n,m);var v,x,b,w=function(e){if(!p&&e in D)return D[e];switch(e){case"keys":case"values":return function(){return new t(this,e)}}return function(){return new t(this,e)}},N=n+" Iterator",S="values"==h,M=!1,D=e.prototype,E=D[l]||D["@@iterator"]||h&&D[h],A=E||w(h),_=h?S?w("entries"):A:void 0,O="Array"==n&&D.entries||E;if(O&&(b=f(O.call(new e)))!==Object.prototype&&b.next&&(c(b,N,!0),r||"function"==typeof b[l]||o(b,l,d)),S&&E&&"values"!==E.name&&(M=!0,A=function(){return E.call(this)}),r&&!g||!p&&!M&&D[l]||o(D,l,A),s[n]=A,s[N]=d,h)if(v={values:S?A:w("values"),keys:y?A:w("keys"),entries:_},g)for(x in v)x in D||a(D,x,v[x]);else i(i.P+i.F*(p||M),n,v);return v}},function(e,n,t){"use strict";var r=t(40),i=t(36),a=t(49),o={};t(13)(o,t(6)("iterator"),(function(){return this})),e.exports=function(e,n,t){e.prototype=r(o,{next:i(1,t)}),a(e,n+" Iterator")}},function(e,n,t){var r=t(62),i=t(27);e.exports=function(e,n,t){if(r(n))throw TypeError("String#"+t+" doesn't accept regex!");return String(i(e))}},function(e,n,t){var r=t(6)("match");e.exports=function(e){var n=/./;try{"/./"[e](n)}catch(t){try{return n[r]=!1,!"/./"[e](n)}catch(e){}}return!0}},function(e,n,t){var r=t(52),i=t(6)("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(r.Array===e||a[i]===e)}},function(e,n,t){"use strict";var r=t(9),i=t(36);e.exports=function(e,n,t){n in e?r.f(e,n,i(0,t)):e[n]=t}},function(e,n,t){var r=t(50),i=t(6)("iterator"),a=t(52);e.exports=t(21).getIteratorMethod=function(e){if(null!=e)return e[i]||e["@@iterator"]||a[r(e)]}},function(e,n,t){var r=t(246);e.exports=function(e,n){return new(r(e))(n)}},function(e,n,t){"use strict";var r=t(10),i=t(39),a=t(7);e.exports=function(e){for(var n=r(this),t=a(n.length),o=arguments.length,s=i(o>1?arguments[1]:void 0,t),u=o>2?arguments[2]:void 0,c=void 0===u?t:i(u,t);c>s;)n[s++]=e;return n}},function(e,n,t){"use strict";var r=t(35),i=t(121),a=t(52),o=t(18);e.exports=t(84)(Array,"Array",(function(e,n){this._t=o(e),this._i=0,this._k=n}),(function(){var e=this._t,n=this._k,t=this._i++;return!e||t>=e.length?(this._t=void 0,i(1)):i(0,"keys"==n?t:"values"==n?e[t]:[t,e[t]])}),"values"),a.Arguments=a.Array,r("keys"),r("values"),r("entries")},function(e,n,t){"use strict";var r,i,a=t(56),o=RegExp.prototype.exec,s=String.prototype.replace,u=o,c=(r=/a/,i=/b*/g,o.call(r,"a"),o.call(i,"a"),0!==r.lastIndex||0!==i.lastIndex),f=void 0!==/()??/.exec("")[1];(c||f)&&(u=function(e){var n,t,r,i,u=this;return f&&(t=new RegExp("^"+u.source+"$(?!\\s)",a.call(u))),c&&(n=u.lastIndex),r=o.call(u,e),c&&r&&(u.lastIndex=u.global?r.index+r[0].length:n),f&&r&&r.length>1&&s.call(r[0],t,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(r[i]=void 0)})),r}),e.exports=u},function(e,n,t){"use strict";var r=t(61)(!0);e.exports=function(e,n,t){return n+(t?r(e,n).length:1)}},function(e,n,t){var r,i,a,o=t(22),s=t(111),u=t(77),c=t(73),f=t(3),l=f.process,p=f.setImmediate,d=f.clearImmediate,m=f.MessageChannel,h=f.Dispatch,y=0,g={},v=function(){var e=+this;if(g.hasOwnProperty(e)){var n=g[e];delete g[e],n()}},x=function(e){v.call(e.data)};p&&d||(p=function(e){for(var n=[],t=1;arguments.length>t;)n.push(arguments[t++]);return g[++y]=function(){s("function"==typeof e?e:Function(e),n)},r(y),y},d=function(e){delete g[e]},"process"==t(23)(l)?r=function(e){l.nextTick(o(v,e,1))}:h&&h.now?r=function(e){h.now(o(v,e,1))}:m?(a=(i=new m).port2,i.port1.onmessage=x,r=o(a.postMessage,a,1)):f.addEventListener&&"function"==typeof postMessage&&!f.importScripts?(r=function(e){f.postMessage(e+"","*")},f.addEventListener("message",x,!1)):r="onreadystatechange"in c("script")?function(e){u.appendChild(c("script")).onreadystatechange=function(){u.removeChild(this),v.call(e)}}:function(e){setTimeout(o(v,e,1),0)}),e.exports={set:p,clear:d}},function(e,n,t){var r=t(3),i=t(96).set,a=r.MutationObserver||r.WebKitMutationObserver,o=r.process,s=r.Promise,u="process"==t(23)(o);e.exports=function(){var e,n,t,c=function(){var r,i;for(u&&(r=o.domain)&&r.exit();e;){i=e.fn,e=e.next;try{i()}catch(r){throw e?t():n=void 0,r}}n=void 0,r&&r.enter()};if(u)t=function(){o.nextTick(c)};else if(!a||r.navigator&&r.navigator.standalone)if(s&&s.resolve){var f=s.resolve(void 0);t=function(){f.then(c)}}else t=function(){i.call(r,c)};else{var l=!0,p=document.createTextNode("");new a(c).observe(p,{characterData:!0}),t=function(){p.data=l=!l}}return function(r){var i={fn:r,next:void 0};n&&(n.next=i),e||(e=i,t()),n=i}}},function(e,n,t){"use strict";var r=t(11);function i(e){var n,t;this.promise=new e((function(e,r){if(void 0!==n||void 0!==t)throw TypeError("Bad Promise constructor");n=e,t=r})),this.resolve=r(n),this.reject=r(t)}e.exports.f=function(e){return new i(e)}},function(e,n,t){"use strict";var r=t(3),i=t(8),a=t(33),o=t(68),s=t(13),u=t(45),c=t(4),f=t(43),l=t(24),p=t(7),d=t(131),m=t(41).f,h=t(9).f,y=t(92),g=t(49),v=r.ArrayBuffer,x=r.DataView,b=r.Math,w=r.RangeError,N=r.Infinity,S=v,M=b.abs,D=b.pow,E=b.floor,A=b.log,_=b.LN2,O=i?"_b":"buffer",C=i?"_l":"byteLength",T=i?"_o":"byteOffset";function I(e,n,t){var r,i,a,o=new Array(t),s=8*t-n-1,u=(1<<s)-1,c=u>>1,f=23===n?D(2,-24)-D(2,-77):0,l=0,p=e<0||0===e&&1/e<0?1:0;for((e=M(e))!=e||e===N?(i=e!=e?1:0,r=u):(r=E(A(e)/_),e*(a=D(2,-r))<1&&(r--,a*=2),(e+=r+c>=1?f/a:f*D(2,1-c))*a>=2&&(r++,a/=2),r+c>=u?(i=0,r=u):r+c>=1?(i=(e*a-1)*D(2,n),r+=c):(i=e*D(2,c-1)*D(2,n),r=0));n>=8;o[l++]=255&i,i/=256,n-=8);for(r=r<<n|i,s+=n;s>0;o[l++]=255&r,r/=256,s-=8);return o[--l]|=128*p,o}function k(e,n,t){var r,i=8*t-n-1,a=(1<<i)-1,o=a>>1,s=i-7,u=t-1,c=e[u--],f=127&c;for(c>>=7;s>0;f=256*f+e[u],u--,s-=8);for(r=f&(1<<-s)-1,f>>=-s,s+=n;s>0;r=256*r+e[u],u--,s-=8);if(0===f)f=1-o;else{if(f===a)return r?NaN:c?-N:N;r+=D(2,n),f-=o}return(c?-1:1)*r*D(2,f-n)}function B(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]}function q(e){return[255&e]}function R(e){return[255&e,e>>8&255]}function P(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]}function z(e){return I(e,52,8)}function F(e){return I(e,23,4)}function j(e,n,t){h(e.prototype,n,{get:function(){return this[t]}})}function U(e,n,t,r){var i=d(+t);if(i+n>e[C])throw w("Wrong index!");var a=e[O]._b,o=i+e[T],s=a.slice(o,o+n);return r?s:s.reverse()}function L(e,n,t,r,i,a){var o=d(+t);if(o+n>e[C])throw w("Wrong index!");for(var s=e[O]._b,u=o+e[T],c=r(+i),f=0;f<n;f++)s[u+f]=c[a?f:n-f-1]}if(o.ABV){if(!c((function(){v(1)}))||!c((function(){new v(-1)}))||c((function(){return new v,new v(1.5),new v(NaN),"ArrayBuffer"!=v.name}))){for(var H,G=(v=function(e){return f(this,v),new S(d(e))}).prototype=S.prototype,$=m(S),V=0;$.length>V;)(H=$[V++])in v||s(v,H,S[H]);a||(G.constructor=v)}var W=new x(new v(2)),Z=x.prototype.setInt8;W.setInt8(0,2147483648),W.setInt8(1,2147483649),!W.getInt8(0)&&W.getInt8(1)||u(x.prototype,{setInt8:function(e,n){Z.call(this,e,n<<24>>24)},setUint8:function(e,n){Z.call(this,e,n<<24>>24)}},!0)}else v=function(e){f(this,v,"ArrayBuffer");var n=d(e);this._b=y.call(new Array(n),0),this[C]=n},x=function(e,n,t){f(this,x,"DataView"),f(e,v,"DataView");var r=e[C],i=l(n);if(i<0||i>r)throw w("Wrong offset!");if(i+(t=void 0===t?r-i:p(t))>r)throw w("Wrong length!");this[O]=e,this[T]=i,this[C]=t},i&&(j(v,"byteLength","_l"),j(x,"buffer","_b"),j(x,"byteLength","_l"),j(x,"byteOffset","_o")),u(x.prototype,{getInt8:function(e){return U(this,1,e)[0]<<24>>24},getUint8:function(e){return U(this,1,e)[0]},getInt16:function(e){var n=U(this,2,e,arguments[1]);return(n[1]<<8|n[0])<<16>>16},getUint16:function(e){var n=U(this,2,e,arguments[1]);return n[1]<<8|n[0]},getInt32:function(e){return B(U(this,4,e,arguments[1]))},getUint32:function(e){return B(U(this,4,e,arguments[1]))>>>0},getFloat32:function(e){return k(U(this,4,e,arguments[1]),23,4)},getFloat64:function(e){return k(U(this,8,e,arguments[1]),52,8)},setInt8:function(e,n){L(this,1,e,q,n)},setUint8:function(e,n){L(this,1,e,q,n)},setInt16:function(e,n){L(this,2,e,R,n,arguments[2])},setUint16:function(e,n){L(this,2,e,R,n,arguments[2])},setInt32:function(e,n){L(this,4,e,P,n,arguments[2])},setUint32:function(e,n){L(this,4,e,P,n,arguments[2])},setFloat32:function(e,n){L(this,4,e,F,n,arguments[2])},setFloat64:function(e,n){L(this,8,e,z,n,arguments[2])}});g(v,"ArrayBuffer"),g(x,"DataView"),s(x.prototype,o.VIEW,!0),n.ArrayBuffer=v,n.DataView=x},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.clearError=n.recipeError=n.searchError=void 0;var r=t(32),i=(n.searchError=function(e){i();r.elements.recipe.insertAdjacentHTML("afterbegin",'\n        <p style="font-size:20px; color:#f47672; text-align: center; margin-top: 20px">Sorry! There are no recipes for what you just searched :( <br> Please try another one.</p>\n    ')},n.recipeError=function(e){i();r.elements.recipe.insertAdjacentHTML("afterbegin",'\n        <p style="font-size:20px; color:#f47672; text-align: center; margin-top: 10px">Error processing recipe! <br> Please try again!</p>\n    ')},n.clearError=function(){r.elements.recipe.innerHTML=""})},function(e,n,t){"use strict";var r,i,a;i=[],void 0===(a="function"==typeof(r=function(){function e(){return!0}function n(){return!1}function t(){}return function r(){var i=[{name:"number",test:function(e){return"number"==typeof e}},{name:"string",test:function(e){return"string"==typeof e}},{name:"boolean",test:function(e){return"boolean"==typeof e}},{name:"Function",test:function(e){return"function"==typeof e}},{name:"Array",test:Array.isArray},{name:"Date",test:function(e){return e instanceof Date}},{name:"RegExp",test:function(e){return e instanceof RegExp}},{name:"Object",test:function(e){return"object"==typeof e&&null!==e&&e.constructor===Object}},{name:"null",test:function(e){return null===e}},{name:"undefined",test:function(e){return void 0===e}}],a={name:"any",test:e},o=[],s=[],u={types:i,conversions:s,ignore:o};function c(e){var n=F(u.types,(function(n){return n.name===e}));if(n)return n;if("any"===e)return a;var t=F(u.types,(function(n){return n.name.toLowerCase()===e.toLowerCase()}));throw new TypeError('Unknown type "'+e+'"'+(t?'. Did you mean "'+t.name+'"?':""))}function f(e){return e===a?999:u.types.indexOf(e)}function l(e){var n=F(u.types,(function(n){return n.test(e)}));if(n)return n.name;throw new TypeError("Value has unknown type. Value: "+e)}function p(e){return e.map((function(e){var n=e.types.map(b);return(e.restParam?"...":"")+n.join("|")})).join(",")}function d(e,n){var t=0===e.indexOf("..."),r=(t?e.length>3?e.slice(3):"any":e).split("|").map(I).filter(k).filter(T),i=function(e,n){var t={};return e.forEach((function(e){-1!==n.indexOf(e.from)||-1===n.indexOf(e.to)||t[e.from]||(t[e.from]=e)})),Object.keys(t).map((function(e){return t[e]}))}(n,r),a=r.map((function(e){var n=c(e);return{name:e,typeIndex:f(n),test:n.test,conversion:null,conversionIndex:-1}})),o=i.map((function(e){var t=c(e.from);return{name:e.from,typeIndex:f(t),test:t.test,conversion:e,conversionIndex:n.indexOf(e)}}));return{types:a.concat(o),restParam:t}}function m(e){var n=R(e);return!!n&&n.restParam}function h(e){return e.types.some((function(e){return null!=e.conversion}))}function y(n){if(n&&0!==n.types.length){if(1===n.types.length)return c(n.types[0].name).test;if(2===n.types.length){var t=c(n.types[0].name).test,r=c(n.types[1].name).test;return function(e){return t(e)||r(e)}}var i=n.types.map((function(e){return c(e.name).test}));return function(e){for(var n=0;n<i.length;n++)if(i[n](e))return!0;return!1}}return e}function g(e){var n,t,r,i;if(m(e)){var a=(n=(i=e,i.slice(0,i.length-1)).map(y)).length,o=y(R(e));return function(e){for(var t=0;t<n.length;t++)if(!n[t](e[t]))return!1;return function(e){for(var n=a;n<e.length;n++)if(!o(e[n]))return!1;return!0}(e)&&e.length>=a+1}}return 0===e.length?function(e){return 0===e.length}:1===e.length?(t=y(e[0]),function(e){return t(e[0])&&1===e.length}):2===e.length?(t=y(e[0]),r=y(e[1]),function(e){return t(e[0])&&r(e[1])&&2===e.length}):(n=e.map(y),function(e){for(var t=0;t<n.length;t++)if(!n[t](e[t]))return!1;return e.length===n.length})}function v(e,n){return n<e.params.length?e.params[n]:m(e.params)?R(e.params):null}function x(e,n,t){var r=v(e,n);return(r?t?r.types.filter(w):r.types:[]).map(b)}function b(e){return e.name}function w(e){return null===e.conversion||void 0===e.conversion}function N(e,n){var t=function(e){for(var n={},t=0;t<e.length;t++)n[e[t]]=!0;return Object.keys(n)}(j(e,(function(e){return x(e,n,!1)})));return-1!==t.indexOf("any")?["any"]:t}function S(e,n,t){var r,i,a,o=e||"unnamed",s=t;for(a=0;a<n.length;a++){var u=s.filter((function(e){var t=y(v(e,a));return(a<e.params.length||m(e.params))&&t(n[a])}));if(0===u.length){if((i=N(s,a)).length>0){var c=l(n[a]);return(r=new TypeError("Unexpected type of argument in function "+o+" (expected: "+i.join(" or ")+", actual: "+c+", index: "+a+")")).data={category:"wrongType",fn:o,index:a,actual:c,expected:i},r}}else s=u}var f=s.map((function(e){return m(e.params)?1/0:e.params.length}));if(n.length<Math.min.apply(null,f))return i=N(s,a),(r=new TypeError("Too few arguments in function "+o+" (expected: "+i.join(" or ")+", index: "+n.length+")")).data={category:"tooFewArgs",fn:o,index:n.length,expected:i},r;var p=Math.max.apply(null,f);return n.length>p?((r=new TypeError("Too many arguments in function "+o+" (expected: "+p+", actual: "+n.length+")")).data={category:"tooManyArgs",fn:o,index:n.length,expectedLength:p},r):((r=new TypeError('Arguments of type "'+n.join(", ")+'" do not match any of the defined signatures of function '+o+".")).data={category:"mismatch",actual:n.map(l)},r)}function M(e){for(var n=999,t=0;t<e.types.length;t++)w(e.types[t])&&(n=Math.min(n,e.types[t].typeIndex));return n}function D(e){for(var n=999,t=0;t<e.types.length;t++)w(e.types[t])||(n=Math.min(n,e.types[t].conversionIndex));return n}function E(e,n){var t;return 0!=(t=e.restParam-n.restParam)||0!=(t=h(e)-h(n))||0!=(t=M(e)-M(n))?t:D(e)-D(n)}function A(e,n){var t,r,i=Math.min(e.params.length,n.params.length);if(0!=(r=e.params.some(h)-n.params.some(h)))return r;for(t=0;t<i;t++)if(0!=(r=h(e.params[t])-h(n.params[t])))return r;for(t=0;t<i;t++)if(0!==(r=E(e.params[t],n.params[t])))return r;return e.params.length-n.params.length}function _(e){var n,t,r,i,a=[],o=[];switch(e.types.forEach((function(e){e.conversion&&(a.push(c(e.conversion.from).test),o.push(e.conversion.convert))})),o.length){case 0:return function(e){return e};case 1:return n=a[0],r=o[0],function(e){return n(e)?r(e):e};case 2:return n=a[0],t=a[1],r=o[0],i=o[1],function(e){return n(e)?r(e):t(e)?i(e):e};default:return function(e){for(var n=0;n<o.length;n++)if(a[n](e))return o[n](e);return e}}}function O(e,n){return function e(t,r,i){if(r<t.length){var a,o=t[r],s=n?o.types.filter(w):o.types;if(o.restParam){var u=s.filter(w);a=u.length<s.length?[u,s]:[s]}else a=s.map((function(e){return[e]}));return j(a,(function(n){return e(t,r+1,i.concat([n]))}))}return[i.map((function(e,n){return{types:e,restParam:n===t.length-1&&m(t)}}))]}(e,0,[])}function C(e,r){if(0===Object.keys(r).length)throw new SyntaxError("No signatures provided");var i=[];Object.keys(r).map((function(e){return function(e,n,t){var r=[];return""!==e.trim()&&(r=e.split(",").map(I).map((function(e,n,r){var i=d(e,t);if(i.restParam&&n!==r.length-1)throw new SyntaxError('Unexpected rest parameter "'+e+'": only allowed for the last parameter');return i}))),r.some(q)?null:{params:r,fn:n}}(e,r[e],u.conversions)})).filter(B).forEach((function(e){var n=F(i,(function(n){return function(e,n){for(var t=Math.max(e.params.length,n.params.length),r=0;r<t;r++)if(!z(x(e,r,!0),x(n,r,!0)))return!1;var i=e.params.length,a=n.params.length,o=m(e.params),s=m(n.params);return o?s?i===a:a>=i:s?i>=a:i===a}(n,e)}));if(n)throw new TypeError('Conflicting signatures "'+p(n.params)+'" and "'+p(e.params)+'".');i.push(e)}));var a=j(i,(function(e){return(e?O(e.params,!1):[]).map((function(n){return{params:n,fn:e.fn}}))})).filter(B);a.sort(A);var o=a[0]&&a[0].params.length<=2&&!m(a[0].params),s=a[1]&&a[1].params.length<=2&&!m(a[1].params),c=a[2]&&a[2].params.length<=2&&!m(a[2].params),f=a[3]&&a[3].params.length<=2&&!m(a[3].params),l=a[4]&&a[4].params.length<=2&&!m(a[4].params),v=a[5]&&a[5].params.length<=2&&!m(a[5].params),b=o&&s&&c&&f&&l&&v,w=a.map((function(e){return g(e.params)})),N=o?y(a[0].params[0]):n,M=s?y(a[1].params[0]):n,D=c?y(a[2].params[0]):n,E=f?y(a[3].params[0]):n,C=l?y(a[4].params[0]):n,T=v?y(a[5].params[0]):n,k=o?y(a[0].params[1]):n,R=s?y(a[1].params[1]):n,U=c?y(a[2].params[1]):n,L=f?y(a[3].params[1]):n,H=l?y(a[4].params[1]):n,G=v?y(a[5].params[1]):n,$=a.map((function(e){return function(e,n){var t=n;if(e.some(h)){var r=m(e),i=e.map(_);t=function(){for(var e=[],t=r?arguments.length-1:arguments.length,a=0;a<t;a++)e[a]=i[a](arguments[a]);return r&&(e[t]=arguments[t].map(i[t])),n.apply(null,e)}}var a=t;if(m(e)){var o=e.length-1;a=function(){return t.apply(null,P(arguments,0,o).concat([P(arguments,o)]))}}return a}(e.params,e.fn)})),V=o?$[0]:t,W=s?$[1]:t,Z=c?$[2]:t,J=f?$[3]:t,Y=l?$[4]:t,X=v?$[5]:t,Q=o?a[0].params.length:-1,K=s?a[1].params.length:-1,ee=c?a[2].params.length:-1,ne=f?a[3].params.length:-1,te=l?a[4].params.length:-1,re=v?a[5].params.length:-1,ie=b?6:0,ae=a.length,oe=function(){for(var n=ie;n<ae;n++)if(w[n](arguments))return $[n].apply(null,arguments);throw S(e,arguments,a)},se=function(e,n){return arguments.length===Q&&N(e)&&k(n)?V.apply(null,arguments):arguments.length===K&&M(e)&&R(n)?W.apply(null,arguments):arguments.length===ee&&D(e)&&U(n)?Z.apply(null,arguments):arguments.length===ne&&E(e)&&L(n)?J.apply(null,arguments):arguments.length===te&&C(e)&&H(n)?Y.apply(null,arguments):arguments.length===re&&T(e)&&G(n)?X.apply(null,arguments):oe.apply(null,arguments)};try{Object.defineProperty(se,"name",{value:e})}catch(e){}return se.signatures=function(e){var n={};return e.forEach((function(e){e.params.some(h)||O(e.params,!0).forEach((function(t){n[p(t)]=e.fn}))})),n}(a),se}function T(e){return-1===u.ignore.indexOf(e)}function I(e){return e.trim()}function k(e){return!!e}function B(e){return null!==e}function q(e){return 0===e.types.length}function R(e){return e[e.length-1]}function P(e,n,t){return Array.prototype.slice.call(e,n,t)}function z(e,n){for(var t=0;t<e.length;t++)if(r=n,i=e[t],-1!==r.indexOf(i))return!0;var r,i;return!1}function F(e,n){for(var t=0;t<e.length;t++)if(n(e[t]))return e[t]}function j(e,n){return Array.prototype.concat.apply([],e.map(n))}function U(e){for(var n="",t=0;t<e.length;t++){var r=e[t];if(("object"==typeof r.signatures||"string"==typeof r.signature)&&""!==r.name)if(""===n)n=r.name;else if(n!==r.name){var i=new Error("Function names do not match (expected: "+n+", actual: "+r.name+")");throw i.data={actual:r.name,expected:n},i}}return n}function L(e){var n,t={};function r(e,r){if(t.hasOwnProperty(e)&&r!==t[e])throw(n=new Error('Signature "'+e+'" is defined twice')).data={signature:e},n}for(var i=0;i<e.length;i++){var a=e[i];if("object"==typeof a.signatures)for(var o in a.signatures)a.signatures.hasOwnProperty(o)&&(r(o,a.signatures[o]),t[o]=a.signatures[o]);else{if("string"!=typeof a.signature)throw(n=new TypeError("Function is no typed-function (index: "+i+")")).data={index:i},n;r(a.signature,a),t[a.signature]=a}}return t}return(u=C("typed",{"string, Object":C,Object:function(e){var n=[];for(var t in e)e.hasOwnProperty(t)&&n.push(e[t]);return C(U(n),e)},"...Function":function(e){return C(U(e),L(e))},"string, ...Function":function(e,n){return C(e,L(n))}})).create=r,u.types=i,u.conversions=s,u.ignore=o,u.convert=function(e,n){var t=l(e);if(n===t)return e;for(var r=0;r<u.conversions.length;r++){var i=u.conversions[r];if(i.from===t&&i.to===n)return i.convert(e)}throw new Error("Cannot convert from "+t+" to "+n)},u.find=function(e,n){if(!e.signatures)throw new TypeError("Function is no typed-function");var t;if("string"==typeof n){t=n.split(",");for(var r=0;r<t.length;r++)t[r]=t[r].trim()}else{if(!Array.isArray(n))throw new TypeError("String array or a comma separated string expected");t=n}var i=t.join(","),a=e.signatures[i];if(a)return a;throw new TypeError("Signature not found (signature: "+(e.name||"unnamed")+"("+t.join(", ")+"))")},u.addType=function(e,n){if(!e||"string"!=typeof e.name||"function"!=typeof e.test)throw new TypeError("Object with properties {name: string, test: function} expected");if(!1!==n)for(var t=0;t<u.types.length;t++)if("Object"===u.types[t].name)return void u.types.splice(t,0,e);u.types.push(e)},u.addConversion=function(e){if(!e||"string"!=typeof e.from||"string"!=typeof e.to||"function"!=typeof e.convert)throw new TypeError("Object with properties {from: string, to: string, convert: function} expected");u.conversions.push(e)},u}()})?r.apply(n,i):r)||(e.exports=a)},function(e,n,t){"use strict";(function(n){var t=[],r=void 0===n?window:n,i=Math.pow(256,6),a=Math.pow(2,52),o=2*a,s=Math.random;function u(e){var n,t=e.length,r=this,i=0,a=r.i=r.j=0,o=r.S=[];for(t||(e=[t++]);i<256;)o[i]=i++;for(i=0;i<256;i++)o[i]=o[a=255&a+e[i%t]+(n=o[i])],o[a]=n;(r.g=function(e){for(var n,t=0,i=r.i,a=r.j,o=r.S;e--;)n=o[i=255&i+1],t=256*t+o[255&(o[i]=o[a=255&a+n])+(o[a]=n)];return r.i=i,r.j=a,t})(256)}function c(e,n){var t,r=[],i=(typeof e)[0];if(n&&"o"==i)for(t in e)try{r.push(c(e[t],n-1))}catch(e){}return r.length?r:"s"==i?e:e+"\0"}function f(e,n){for(var t,r=e+"",i=0;i<r.length;)n[255&i]=255&(t^=19*n[255&i])+r.charCodeAt(i++);return p(n)}function l(e){try{return r.crypto.getRandomValues(e=new Uint8Array(256)),p(e)}catch(e){return[+new Date,r,r.navigator&&r.navigator.plugins,r.screen,p(t)]}}function p(e){return String.fromCharCode.apply(0,e)}e.exports=function(n,r){if(r&&!0===r.global)return r.global=!1,Math.random=e.exports(n,r),r.global=!0,Math.random;var s=r&&r.entropy||!1,d=[],m=(f(c(s?[n,p(t)]:0 in arguments?n:l(),3),d),new u(d));return f(p(m.S),t),function(){for(var e=m.g(6),n=i,t=0;e<a;)e=256*(e+t),n*=256,t=m.g(1);for(;e>=o;)e/=2,n/=2,t>>>=1;return(e+t)/n}},e.exports.resetGlobal=function(){Math.random=s},f(Math.random(),t)}).call(this,t(72))},function(e,n,t){e.exports=!t(8)&&!t(4)((function(){return 7!=Object.defineProperty(t(73)("div"),"a",{get:function(){return 7}}).a}))},function(e,n,t){n.f=t(6)},function(e,n,t){var r=t(17),i=t(18),a=t(58)(!1),o=t(75)("IE_PROTO");e.exports=function(e,n){var t,s=i(e),u=0,c=[];for(t in s)t!=o&&r(s,t)&&c.push(t);for(;n.length>u;)r(s,t=n[u++])&&(~a(c,t)||c.push(t));return c}},function(e,n,t){var r=t(9),i=t(2),a=t(38);e.exports=t(8)?Object.defineProperties:function(e,n){i(e);for(var t,o=a(n),s=o.length,u=0;s>u;)r.f(e,t=o[u++],n[t]);return e}},function(e,n,t){var r=t(18),i=t(41).f,a={}.toString,o="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return o&&"[object Window]"==a.call(e)?function(e){try{return i(e)}catch(e){return o.slice()}}(e):i(r(e))}},function(e,n,t){"use strict";var r=t(8),i=t(38),a=t(59),o=t(55),s=t(10),u=t(54),c=Object.assign;e.exports=!c||t(4)((function(){var e={},n={},t=Symbol(),r="abcdefghijklmnopqrst";return e[t]=7,r.split("").forEach((function(e){n[e]=e})),7!=c({},e)[t]||Object.keys(c({},n)).join("")!=r}))?function(e,n){for(var t=s(e),c=arguments.length,f=1,l=a.f,p=o.f;c>f;)for(var d,m=u(arguments[f++]),h=l?i(m).concat(l(m)):i(m),y=h.length,g=0;y>g;)d=h[g++],r&&!p.call(m,d)||(t[d]=m[d]);return t}:c},function(e,n){e.exports=Object.is||function(e,n){return e===n?0!==e||1/e==1/n:e!=e&&n!=n}},function(e,n,t){"use strict";var r=t(11),i=t(5),a=t(111),o=[].slice,s={},u=function(e,n,t){if(!(n in s)){for(var r=[],i=0;i<n;i++)r[i]="a["+i+"]";s[n]=Function("F,a","return new F("+r.join(",")+")")}return s[n](e,t)};e.exports=Function.bind||function(e){var n=r(this),t=o.call(arguments,1),s=function(){var r=t.concat(o.call(arguments));return this instanceof s?u(n,r.length,r):a(n,r,e)};return i(n.prototype)&&(s.prototype=n.prototype),s}},function(e,n){e.exports=function(e,n,t){var r=void 0===t;switch(n.length){case 0:return r?e():e.call(t);case 1:return r?e(n[0]):e.call(t,n[0]);case 2:return r?e(n[0],n[1]):e.call(t,n[0],n[1]);case 3:return r?e(n[0],n[1],n[2]):e.call(t,n[0],n[1],n[2]);case 4:return r?e(n[0],n[1],n[2],n[3]):e.call(t,n[0],n[1],n[2],n[3])}return e.apply(t,n)}},function(e,n,t){var r=t(3).parseInt,i=t(51).trim,a=t(79),o=/^[-+]?0[xX]/;e.exports=8!==r(a+"08")||22!==r(a+"0x16")?function(e,n){var t=i(String(e),3);return r(t,n>>>0||(o.test(t)?16:10))}:r},function(e,n,t){var r=t(3).parseFloat,i=t(51).trim;e.exports=1/r(t(79)+"-0")!=-1/0?function(e){var n=i(String(e),3),t=r(n);return 0===t&&"-"==n.charAt(0)?-0:t}:r},function(e,n,t){var r=t(23);e.exports=function(e,n){if("number"!=typeof e&&"Number"!=r(e))throw TypeError(n);return+e}},function(e,n,t){var r=t(5),i=Math.floor;e.exports=function(e){return!r(e)&&isFinite(e)&&i(e)===e}},function(e,n){e.exports=Math.log1p||function(e){return(e=+e)>-1e-8&&e<1e-8?e-e*e/2:Math.log(1+e)}},function(e,n,t){var r=t(82),i=Math.pow,a=i(2,-52),o=i(2,-23),s=i(2,127)*(2-o),u=i(2,-126);e.exports=Math.fround||function(e){var n,t,i=Math.abs(e),c=r(e);return i<u?c*(i/u/o+1/a-1/a)*u*o:(t=(n=(1+o/a)*i)-(n-i))>s||t!=t?c*(1/0):c*t}},function(e,n,t){var r=t(2);e.exports=function(e,n,t,i){try{return i?n(r(t)[0],t[1]):n(t)}catch(n){var a=e.return;throw void 0!==a&&r(a.call(e)),n}}},function(e,n,t){var r=t(11),i=t(10),a=t(54),o=t(7);e.exports=function(e,n,t,s,u){r(n);var c=i(e),f=a(c),l=o(c.length),p=u?l-1:0,d=u?-1:1;if(t<2)for(;;){if(p in f){s=f[p],p+=d;break}if(p+=d,u?p<0:l<=p)throw TypeError("Reduce of empty array with no initial value")}for(;u?p>=0:l>p;p+=d)p in f&&(s=n(s,f[p],p,c));return s}},function(e,n,t){"use strict";var r=t(10),i=t(39),a=t(7);e.exports=[].copyWithin||function(e,n){var t=r(this),o=a(t.length),s=i(e,o),u=i(n,o),c=arguments.length>2?arguments[2]:void 0,f=Math.min((void 0===c?o:i(c,o))-u,o-s),l=1;for(u<s&&s<u+f&&(l=-1,u+=f-1,s+=f-1);f-- >0;)u in t?t[s]=t[u]:delete t[s],s+=l,u+=l;return t}},function(e,n){e.exports=function(e,n){return{value:n,done:!!e}}},function(e,n,t){"use strict";var r=t(94);t(0)({target:"RegExp",proto:!0,forced:r!==/./.exec},{exec:r})},function(e,n,t){t(8)&&"g"!=/./g.flags&&t(9).f(RegExp.prototype,"flags",{configurable:!0,get:t(56)})},function(e,n){e.exports=function(e){try{return{e:!1,v:e()}}catch(e){return{e:!0,v:e}}}},function(e,n,t){var r=t(2),i=t(5),a=t(98);e.exports=function(e,n){if(r(e),i(n)&&n.constructor===e)return n;var t=a.f(e);return(0,t.resolve)(n),t.promise}},function(e,n,t){"use strict";var r=t(127),i=t(46);e.exports=t(67)("Map",(function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}}),{get:function(e){var n=r.getEntry(i(this,"Map"),e);return n&&n.v},set:function(e,n){return r.def(i(this,"Map"),0===e?0:e,n)}},r,!0)},function(e,n,t){"use strict";var r=t(9).f,i=t(40),a=t(45),o=t(22),s=t(43),u=t(44),c=t(84),f=t(121),l=t(42),p=t(8),d=t(34).fastKey,m=t(46),h=p?"_s":"size",y=function(e,n){var t,r=d(n);if("F"!==r)return e._i[r];for(t=e._f;t;t=t.n)if(t.k==n)return t};e.exports={getConstructor:function(e,n,t,c){var f=e((function(e,r){s(e,f,n,"_i"),e._t=n,e._i=i(null),e._f=void 0,e._l=void 0,e[h]=0,null!=r&&u(r,t,e[c],e)}));return a(f.prototype,{clear:function(){for(var e=m(this,n),t=e._i,r=e._f;r;r=r.n)r.r=!0,r.p&&(r.p=r.p.n=void 0),delete t[r.i];e._f=e._l=void 0,e[h]=0},delete:function(e){var t=m(this,n),r=y(t,e);if(r){var i=r.n,a=r.p;delete t._i[r.i],r.r=!0,a&&(a.n=i),i&&(i.p=a),t._f==r&&(t._f=i),t._l==r&&(t._l=a),t[h]--}return!!r},forEach:function(e){m(this,n);for(var t,r=o(e,arguments.length>1?arguments[1]:void 0,3);t=t?t.n:this._f;)for(r(t.v,t.k,this);t&&t.r;)t=t.p},has:function(e){return!!y(m(this,n),e)}}),p&&r(f.prototype,"size",{get:function(){return m(this,n)[h]}}),f},def:function(e,n,t){var r,i,a=y(e,n);return a?a.v=t:(e._l=a={i:i=d(n,!0),k:n,v:t,p:r=e._l,n:void 0,r:!1},e._f||(e._f=a),r&&(r.n=a),e[h]++,"F"!==i&&(e._i[i]=a)),e},getEntry:y,setStrong:function(e,n,t){c(e,n,(function(e,t){this._t=m(e,n),this._k=t,this._l=void 0}),(function(){for(var e=this._k,n=this._l;n&&n.r;)n=n.p;return this._t&&(this._l=n=n?n.n:this._t._f)?f(0,"keys"==e?n.k:"values"==e?n.v:[n.k,n.v]):(this._t=void 0,f(1))}),t?"entries":"values",!t,!0),l(n)}}},function(e,n,t){"use strict";var r=t(127),i=t(46);e.exports=t(67)("Set",(function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}}),{add:function(e){return r.def(i(this,"Set"),e=0===e?0:e,e)}},r)},function(e,n,t){"use strict";var r,i=t(3),a=t(29)(0),o=t(14),s=t(34),u=t(108),c=t(130),f=t(5),l=t(46),p=t(46),d=!i.ActiveXObject&&"ActiveXObject"in i,m=s.getWeak,h=Object.isExtensible,y=c.ufstore,g=function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},v={get:function(e){if(f(e)){var n=m(e);return!0===n?y(l(this,"WeakMap")).get(e):n?n[this._i]:void 0}},set:function(e,n){return c.def(l(this,"WeakMap"),e,n)}},x=e.exports=t(67)("WeakMap",g,v,c,!0,!0);p&&d&&(u((r=c.getConstructor(g,"WeakMap")).prototype,v),s.NEED=!0,a(["delete","has","get","set"],(function(e){var n=x.prototype,t=n[e];o(n,e,(function(n,i){if(f(n)&&!h(n)){this._f||(this._f=new r);var a=this._f[e](n,i);return"set"==e?this:a}return t.call(this,n,i)}))})))},function(e,n,t){"use strict";var r=t(45),i=t(34).getWeak,a=t(2),o=t(5),s=t(43),u=t(44),c=t(29),f=t(17),l=t(46),p=c(5),d=c(6),m=0,h=function(e){return e._l||(e._l=new y)},y=function(){this.a=[]},g=function(e,n){return p(e.a,(function(e){return e[0]===n}))};y.prototype={get:function(e){var n=g(this,e);if(n)return n[1]},has:function(e){return!!g(this,e)},set:function(e,n){var t=g(this,e);t?t[1]=n:this.a.push([e,n])},delete:function(e){var n=d(this.a,(function(n){return n[0]===e}));return~n&&this.a.splice(n,1),!!~n}},e.exports={getConstructor:function(e,n,t,a){var c=e((function(e,r){s(e,c,n,"_i"),e._t=n,e._i=m++,e._l=void 0,null!=r&&u(r,t,e[a],e)}));return r(c.prototype,{delete:function(e){if(!o(e))return!1;var t=i(e);return!0===t?h(l(this,n)).delete(e):t&&f(t,this._i)&&delete t[this._i]},has:function(e){if(!o(e))return!1;var t=i(e);return!0===t?h(l(this,n)).has(e):t&&f(t,this._i)}}),c},def:function(e,n,t){var r=i(a(n),!0);return!0===r?h(e).set(n,t):r[e._i]=t,e},ufstore:h}},function(e,n,t){var r=t(24),i=t(7);e.exports=function(e){if(void 0===e)return 0;var n=r(e),t=i(n);if(n!==t)throw RangeError("Wrong length!");return t}},function(e,n,t){var r=t(41),i=t(59),a=t(2),o=t(3).Reflect;e.exports=o&&o.ownKeys||function(e){var n=r.f(a(e)),t=i.f;return t?n.concat(t(e)):n}},function(e,n,t){"use strict";var r=t(60),i=t(5),a=t(7),o=t(22),s=t(6)("isConcatSpreadable");e.exports=function e(n,t,u,c,f,l,p,d){for(var m,h,y=f,g=0,v=!!p&&o(p,d,3);g<c;){if(g in u){if(m=v?v(u[g],g,t):u[g],h=!1,i(m)&&(h=void 0!==(h=m[s])?!!h:r(m)),h&&l>0)y=e(n,t,m,a(m.length),y,l-1)-1;else{if(y>=9007199254740991)throw TypeError();n[y]=m}y++}g++}return y}},function(e,n,t){var r=t(7),i=t(81),a=t(27);e.exports=function(e,n,t,o){var s=String(a(e)),u=s.length,c=void 0===t?" ":String(t),f=r(n);if(f<=u||""==c)return s;var l=f-u,p=i.call(c,Math.ceil(l/c.length));return p.length>l&&(p=p.slice(0,l)),o?p+s:s+p}},function(e,n,t){var r=t(8),i=t(38),a=t(18),o=t(55).f;e.exports=function(e){return function(n){for(var t,s=a(n),u=i(s),c=u.length,f=0,l=[];c>f;)t=u[f++],r&&!o.call(s,t)||l.push(e?[t,s[t]]:s[t]);return l}}},function(e,n,t){var r=t(50),i=t(137);e.exports=function(e){return function(){if(r(this)!=e)throw TypeError(e+"#toJSON isn't generic");return i(this)}}},function(e,n,t){var r=t(44);e.exports=function(e,n){var t=[];return r(e,!1,t.push,t,n),t}},function(e,n){e.exports=Math.scale||function(e,n,t,r,i){return 0===arguments.length||e!=e||n!=n||t!=t||r!=r||i!=i?NaN:e===1/0||e===-1/0?e:(e-n)*(i-r)/(t-n)+r}},function(e,n,t){e.exports=t(358)},function(e,n,t){"use strict";e.exports=function(e,n){return function(){for(var t=new Array(arguments.length),r=0;r<t.length;r++)t[r]=arguments[r];return e.apply(n,t)}}},function(e,n,t){"use strict";var r=t(16);function i(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,n,t){if(!n)return e;var a;if(t)a=t(n);else if(r.isURLSearchParams(n))a=n.toString();else{var o=[];r.forEach(n,(function(e,n){null!=e&&(r.isArray(e)?n+="[]":e=[e],r.forEach(e,(function(e){r.isDate(e)?e=e.toISOString():r.isObject(e)&&(e=JSON.stringify(e)),o.push(i(n)+"="+i(e))})))})),a=o.join("&")}if(a){var s=e.indexOf("#");-1!==s&&(e=e.slice(0,s)),e+=(-1===e.indexOf("?")?"?":"&")+a}return e}},function(e,n,t){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},function(e,n,t){"use strict";(function(n){var r=t(16),i=t(363),a={"Content-Type":"application/x-www-form-urlencoded"};function o(e,n){!r.isUndefined(e)&&r.isUndefined(e["Content-Type"])&&(e["Content-Type"]=n)}var s,u={adapter:(("undefined"!=typeof XMLHttpRequest||void 0!==n&&"[object process]"===Object.prototype.toString.call(n))&&(s=t(145)),s),transformRequest:[function(e,n){return i(n,"Accept"),i(n,"Content-Type"),r.isFormData(e)||r.isArrayBuffer(e)||r.isBuffer(e)||r.isStream(e)||r.isFile(e)||r.isBlob(e)?e:r.isArrayBufferView(e)?e.buffer:r.isURLSearchParams(e)?(o(n,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):r.isObject(e)?(o(n,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(e){return e>=200&&e<300}};u.headers={common:{Accept:"application/json, text/plain, */*"}},r.forEach(["delete","get","head"],(function(e){u.headers[e]={}})),r.forEach(["post","put","patch"],(function(e){u.headers[e]=r.merge(a)})),e.exports=u}).call(this,t(144))},function(e,n){var t,r,i=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(e){if(t===setTimeout)return setTimeout(e,0);if((t===a||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:a}catch(e){t=a}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(e){r=o}}();var u,c=[],f=!1,l=-1;function p(){f&&u&&(f=!1,u.length?c=u.concat(c):l=-1,c.length&&d())}function d(){if(!f){var e=s(p);f=!0;for(var n=c.length;n;){for(u=c,c=[];++l<n;)u&&u[l].run();l=-1,n=c.length}u=null,f=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===o||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(n){try{return r.call(null,e)}catch(n){return r.call(this,e)}}}(e)}}function m(e,n){this.fun=e,this.array=n}function h(){}i.nextTick=function(e){var n=new Array(arguments.length-1);if(arguments.length>1)for(var t=1;t<arguments.length;t++)n[t-1]=arguments[t];c.push(new m(e,n)),1!==c.length||f||s(d)},m.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=h,i.addListener=h,i.once=h,i.off=h,i.removeListener=h,i.removeAllListeners=h,i.emit=h,i.prependListener=h,i.prependOnceListener=h,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(e,n,t){"use strict";var r=t(16),i=t(364),a=t(141),o=t(366),s=t(369),u=t(370),c=t(146);e.exports=function(e){return new Promise((function(n,f){var l=e.data,p=e.headers;r.isFormData(l)&&delete p["Content-Type"];var d=new XMLHttpRequest;if(e.auth){var m=e.auth.username||"",h=e.auth.password||"";p.Authorization="Basic "+btoa(m+":"+h)}var y=o(e.baseURL,e.url);if(d.open(e.method.toUpperCase(),a(y,e.params,e.paramsSerializer),!0),d.timeout=e.timeout,d.onreadystatechange=function(){if(d&&4===d.readyState&&(0!==d.status||d.responseURL&&0===d.responseURL.indexOf("file:"))){var t="getAllResponseHeaders"in d?s(d.getAllResponseHeaders()):null,r={data:e.responseType&&"text"!==e.responseType?d.response:d.responseText,status:d.status,statusText:d.statusText,headers:t,config:e,request:d};i(n,f,r),d=null}},d.onabort=function(){d&&(f(c("Request aborted",e,"ECONNABORTED",d)),d=null)},d.onerror=function(){f(c("Network Error",e,null,d)),d=null},d.ontimeout=function(){var n="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(n=e.timeoutErrorMessage),f(c(n,e,"ECONNABORTED",d)),d=null},r.isStandardBrowserEnv()){var g=t(371),v=(e.withCredentials||u(y))&&e.xsrfCookieName?g.read(e.xsrfCookieName):void 0;v&&(p[e.xsrfHeaderName]=v)}if("setRequestHeader"in d&&r.forEach(p,(function(e,n){void 0===l&&"content-type"===n.toLowerCase()?delete p[n]:d.setRequestHeader(n,e)})),r.isUndefined(e.withCredentials)||(d.withCredentials=!!e.withCredentials),e.responseType)try{d.responseType=e.responseType}catch(n){if("json"!==e.responseType)throw n}"function"==typeof e.onDownloadProgress&&d.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&d.upload&&d.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){d&&(d.abort(),f(e),d=null)})),void 0===l&&(l=null),d.send(l)}))}},function(e,n,t){"use strict";var r=t(365);e.exports=function(e,n,t,i,a){var o=new Error(e);return r(o,n,t,i,a)}},function(e,n,t){"use strict";var r=t(16);e.exports=function(e,n){n=n||{};var t={},i=["url","method","params","data"],a=["headers","auth","proxy"],o=["baseURL","url","transformRequest","transformResponse","paramsSerializer","timeout","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","maxContentLength","validateStatus","maxRedirects","httpAgent","httpsAgent","cancelToken","socketPath"];r.forEach(i,(function(e){void 0!==n[e]&&(t[e]=n[e])})),r.forEach(a,(function(i){r.isObject(n[i])?t[i]=r.deepMerge(e[i],n[i]):void 0!==n[i]?t[i]=n[i]:r.isObject(e[i])?t[i]=r.deepMerge(e[i]):void 0!==e[i]&&(t[i]=e[i])})),r.forEach(o,(function(r){void 0!==n[r]?t[r]=n[r]:void 0!==e[r]&&(t[r]=e[r])}));var s=i.concat(a).concat(o),u=Object.keys(n).filter((function(e){return-1===s.indexOf(e)}));return r.forEach(u,(function(r){void 0!==n[r]?t[r]=n[r]:void 0!==e[r]&&(t[r]=e[r])})),t}},function(e,n,t){"use strict";function r(e){this.message=e}r.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},r.prototype.__CANCEL__=!0,e.exports=r},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.renderResults=n.limitRecipeTitle=n.highlightSelected=n.clearResults=n.clearInput=n.getInput=void 0;var r=t(32),i=(n.getInput=function(){return r.elements.searchInput.value},n.clearInput=function(){r.elements.searchInput.value=""},n.clearResults=function(){r.elements.searchResList.innerHTML="",r.elements.searchResPages.innerHTML=""},n.highlightSelected=function(e){Array.from(document.querySelectorAll(".results__link")).forEach((function(e){e.classList.remove("results__link--active")})),document.querySelector('.results__link[href="#'+e+'"]').classList.add("results__link--active")},n.limitRecipeTitle=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:17,t=[];return e.length>n?(e.split(" ").reduce((function(e,r){return e+r.length<=n&&t.push(r),e+r.length}),0),t.join(" ")+" ..."):e}),a=function(e){var n='\n            <li>\n                 <a class="results__link" href="#'+e.recipe_id+'">\n                      <figure class="results__fig">\n                            <img src="'+e.image_url+'" alt="'+e.title+'">\n                      </figure>\n                      <div class="results__data">\n                            <h4 class="results__name">'+i(e.title)+'</h4>\n                            <p class="results__author">'+e.publisher+"</p>\n                      </div>\n                    </a>\n            </li>";r.elements.searchResList.insertAdjacentHTML("beforeend",n)},o=function(e,n){return'\n        <button class="btn-inline results__btn--'+n+'" data-goto='+("prev"===n?e-1:e+1)+">\n            <span>Page "+("prev"===n?e-1:e+1)+'</span>\n            <svg class="search__icon">\n                 <use href="img/icons.svg#icon-triangle-'+("prev"===n?"left":"right")+'"></use>\n            </svg>   \n        </button>\n'},s=function(e,n,t){var i=Math.ceil(n/t),a=void 0;1===e&&i>1?a=o(e,"next"):e<i?a="\n            "+o(e,"next")+"\n            "+o(e,"prev")+";\n            ":e===i&&i>1&&(a=o(e,"prev")),r.elements.searchResPages.insertAdjacentHTML("afterbegin",a)};n.renderResults=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,r=(n-1)*t,i=n*t;e.slice(r,i).forEach(a),s(n,e.length,t)}},function(e,n,t){var r;!function(i){"use strict";var a,o,s,u=9e15,c="0123456789abcdef",f="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",l="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",p={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-u,maxE:u,crypto:!1},d=!0,m="[DecimalError] Invalid argument: ",h=Math.floor,y=Math.pow,g=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,v=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,x=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,b=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,w=1e7,N=f.length-1,S=l.length-1,M={name:"[object Decimal]"};function D(e){var n,t,r,i=e.length-1,a="",o=e[0];if(i>0){for(a+=o,n=1;n<i;n++)(t=7-(r=e[n]+"").length)&&(a+=R(t)),a+=r;(t=7-(r=(o=e[n])+"").length)&&(a+=R(t))}else if(0===o)return"0";for(;o%10==0;)o/=10;return a+o}function E(e,n,t){if(e!==~~e||e<n||e>t)throw Error(m+e)}function A(e,n,t,r){var i,a,o,s;for(a=e[0];a>=10;a/=10)--n;return--n<0?(n+=7,i=0):(i=Math.ceil((n+1)/7),n%=7),a=y(10,7-n),s=e[i]%a|0,null==r?n<3?(0==n?s=s/100|0:1==n&&(s=s/10|0),o=t<4&&99999==s||t>3&&49999==s||5e4==s||0==s):o=(t<4&&s+1==a||t>3&&s+1==a/2)&&(e[i+1]/a/100|0)==y(10,n-2)-1||(s==a/2||0==s)&&0==(e[i+1]/a/100|0):n<4?(0==n?s=s/1e3|0:1==n?s=s/100|0:2==n&&(s=s/10|0),o=(r||t<4)&&9999==s||!r&&t>3&&4999==s):o=((r||t<4)&&s+1==a||!r&&t>3&&s+1==a/2)&&(e[i+1]/a/1e3|0)==y(10,n-3)-1,o}function _(e,n,t){for(var r,i,a=[0],o=0,s=e.length;o<s;){for(i=a.length;i--;)a[i]*=n;for(a[0]+=c.indexOf(e.charAt(o++)),r=0;r<a.length;r++)a[r]>t-1&&(void 0===a[r+1]&&(a[r+1]=0),a[r+1]+=a[r]/t|0,a[r]%=t)}return a.reverse()}M.absoluteValue=M.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),C(e)},M.ceil=function(){return C(new this.constructor(this),this.e+1,2)},M.comparedTo=M.cmp=function(e){var n,t,r,i,a=this,o=a.d,s=(e=new a.constructor(e)).d,u=a.s,c=e.s;if(!o||!s)return u&&c?u!==c?u:o===s?0:!o^u<0?1:-1:NaN;if(!o[0]||!s[0])return o[0]?u:s[0]?-c:0;if(u!==c)return u;if(a.e!==e.e)return a.e>e.e^u<0?1:-1;for(n=0,t=(r=o.length)<(i=s.length)?r:i;n<t;++n)if(o[n]!==s[n])return o[n]>s[n]^u<0?1:-1;return r===i?0:r>i^u<0?1:-1},M.cosine=M.cos=function(){var e,n,t=this,r=t.constructor;return t.d?t.d[0]?(e=r.precision,n=r.rounding,r.precision=e+Math.max(t.e,t.sd())+7,r.rounding=1,t=function(e,n){var t,r,i=n.d.length;i<32?(t=Math.ceil(i/3),r=(1/V(4,t)).toString()):(t=16,r="2.3283064365386962890625e-10");e.precision+=t,n=$(e,1,n.times(r),new e(1));for(var a=t;a--;){var o=n.times(n);n=o.times(o).minus(o).times(8).plus(1)}return e.precision-=t,n}(r,W(r,t)),r.precision=e,r.rounding=n,C(2==s||3==s?t.neg():t,e,n,!0)):new r(1):new r(NaN)},M.cubeRoot=M.cbrt=function(){var e,n,t,r,i,a,o,s,u,c,f=this,l=f.constructor;if(!f.isFinite()||f.isZero())return new l(f);for(d=!1,(a=f.s*y(f.s*f,1/3))&&Math.abs(a)!=1/0?r=new l(a.toString()):(t=D(f.d),(a=((e=f.e)-t.length+1)%3)&&(t+=1==a||-2==a?"0":"00"),a=y(t,1/3),e=h((e+1)/3)-(e%3==(e<0?-1:2)),(r=new l(t=a==1/0?"5e"+e:(t=a.toExponential()).slice(0,t.indexOf("e")+1)+e)).s=f.s),o=(e=l.precision)+3;;)if(c=(u=(s=r).times(s).times(s)).plus(f),r=O(c.plus(f).times(s),c.plus(u),o+2,1),D(s.d).slice(0,o)===(t=D(r.d)).slice(0,o)){if("9999"!=(t=t.slice(o-3,o+1))&&(i||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(C(r,e+1,1),n=!r.times(r).times(r).eq(f));break}if(!i&&(C(s,e+1,0),s.times(s).times(s).eq(f))){r=s;break}o+=4,i=1}return d=!0,C(r,e,l.rounding,n)},M.decimalPlaces=M.dp=function(){var e,n=this.d,t=NaN;if(n){if(t=7*((e=n.length-1)-h(this.e/7)),e=n[e])for(;e%10==0;e/=10)t--;t<0&&(t=0)}return t},M.dividedBy=M.div=function(e){return O(this,new this.constructor(e))},M.dividedToIntegerBy=M.divToInt=function(e){var n=this.constructor;return C(O(this,new n(e),0,1,1),n.precision,n.rounding)},M.equals=M.eq=function(e){return 0===this.cmp(e)},M.floor=function(){return C(new this.constructor(this),this.e+1,3)},M.greaterThan=M.gt=function(e){return this.cmp(e)>0},M.greaterThanOrEqualTo=M.gte=function(e){var n=this.cmp(e);return 1==n||0===n},M.hyperbolicCosine=M.cosh=function(){var e,n,t,r,i,a=this,o=a.constructor,s=new o(1);if(!a.isFinite())return new o(a.s?1/0:NaN);if(a.isZero())return s;t=o.precision,r=o.rounding,o.precision=t+Math.max(a.e,a.sd())+4,o.rounding=1,(i=a.d.length)<32?n=(1/V(4,e=Math.ceil(i/3))).toString():(e=16,n="2.3283064365386962890625e-10"),a=$(o,1,a.times(n),new o(1),!0);for(var u,c=e,f=new o(8);c--;)u=a.times(a),a=s.minus(u.times(f.minus(u.times(f))));return C(a,o.precision=t,o.rounding=r,!0)},M.hyperbolicSine=M.sinh=function(){var e,n,t,r,i=this,a=i.constructor;if(!i.isFinite()||i.isZero())return new a(i);if(n=a.precision,t=a.rounding,a.precision=n+Math.max(i.e,i.sd())+4,a.rounding=1,(r=i.d.length)<3)i=$(a,2,i,i,!0);else{e=(e=1.4*Math.sqrt(r))>16?16:0|e,i=$(a,2,i=i.times(1/V(5,e)),i,!0);for(var o,s=new a(5),u=new a(16),c=new a(20);e--;)o=i.times(i),i=i.times(s.plus(o.times(u.times(o).plus(c))))}return a.precision=n,a.rounding=t,C(i,n,t,!0)},M.hyperbolicTangent=M.tanh=function(){var e,n,t=this,r=t.constructor;return t.isFinite()?t.isZero()?new r(t):(e=r.precision,n=r.rounding,r.precision=e+7,r.rounding=1,O(t.sinh(),t.cosh(),r.precision=e,r.rounding=n)):new r(t.s)},M.inverseCosine=M.acos=function(){var e,n=this,t=n.constructor,r=n.abs().cmp(1),i=t.precision,a=t.rounding;return-1!==r?0===r?n.isNeg()?B(t,i,a):new t(0):new t(NaN):n.isZero()?B(t,i+4,a).times(.5):(t.precision=i+6,t.rounding=1,n=n.asin(),e=B(t,i+4,a).times(.5),t.precision=i,t.rounding=a,e.minus(n))},M.inverseHyperbolicCosine=M.acosh=function(){var e,n,t=this,r=t.constructor;return t.lte(1)?new r(t.eq(1)?0:NaN):t.isFinite()?(e=r.precision,n=r.rounding,r.precision=e+Math.max(Math.abs(t.e),t.sd())+4,r.rounding=1,d=!1,t=t.times(t).minus(1).sqrt().plus(t),d=!0,r.precision=e,r.rounding=n,t.ln()):new r(t)},M.inverseHyperbolicSine=M.asinh=function(){var e,n,t=this,r=t.constructor;return!t.isFinite()||t.isZero()?new r(t):(e=r.precision,n=r.rounding,r.precision=e+2*Math.max(Math.abs(t.e),t.sd())+6,r.rounding=1,d=!1,t=t.times(t).plus(1).sqrt().plus(t),d=!0,r.precision=e,r.rounding=n,t.ln())},M.inverseHyperbolicTangent=M.atanh=function(){var e,n,t,r,i=this,a=i.constructor;return i.isFinite()?i.e>=0?new a(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(e=a.precision,n=a.rounding,r=i.sd(),Math.max(r,e)<2*-i.e-1?C(new a(i),e,n,!0):(a.precision=t=r-i.e,i=O(i.plus(1),new a(1).minus(i),t+e,1),a.precision=e+4,a.rounding=1,i=i.ln(),a.precision=e,a.rounding=n,i.times(.5))):new a(NaN)},M.inverseSine=M.asin=function(){var e,n,t,r,i=this,a=i.constructor;return i.isZero()?new a(i):(n=i.abs().cmp(1),t=a.precision,r=a.rounding,-1!==n?0===n?((e=B(a,t+4,r).times(.5)).s=i.s,e):new a(NaN):(a.precision=t+6,a.rounding=1,i=i.div(new a(1).minus(i.times(i)).sqrt().plus(1)).atan(),a.precision=t,a.rounding=r,i.times(2)))},M.inverseTangent=M.atan=function(){var e,n,t,r,i,a,o,s,u,c=this,f=c.constructor,l=f.precision,p=f.rounding;if(c.isFinite()){if(c.isZero())return new f(c);if(c.abs().eq(1)&&l+4<=S)return(o=B(f,l+4,p).times(.25)).s=c.s,o}else{if(!c.s)return new f(NaN);if(l+4<=S)return(o=B(f,l+4,p).times(.5)).s=c.s,o}for(f.precision=s=l+10,f.rounding=1,e=t=Math.min(28,s/7+2|0);e;--e)c=c.div(c.times(c).plus(1).sqrt().plus(1));for(d=!1,n=Math.ceil(s/7),r=1,u=c.times(c),o=new f(c),i=c;-1!==e;)if(i=i.times(u),a=o.minus(i.div(r+=2)),i=i.times(u),void 0!==(o=a.plus(i.div(r+=2))).d[n])for(e=n;o.d[e]===a.d[e]&&e--;);return t&&(o=o.times(2<<t-1)),d=!0,C(o,f.precision=l,f.rounding=p,!0)},M.isFinite=function(){return!!this.d},M.isInteger=M.isInt=function(){return!!this.d&&h(this.e/7)>this.d.length-2},M.isNaN=function(){return!this.s},M.isNegative=M.isNeg=function(){return this.s<0},M.isPositive=M.isPos=function(){return this.s>0},M.isZero=function(){return!!this.d&&0===this.d[0]},M.lessThan=M.lt=function(e){return this.cmp(e)<0},M.lessThanOrEqualTo=M.lte=function(e){return this.cmp(e)<1},M.logarithm=M.log=function(e){var n,t,r,i,a,o,s,u,c=this.constructor,f=c.precision,l=c.rounding;if(null==e)e=new c(10),n=!0;else{if(t=(e=new c(e)).d,e.s<0||!t||!t[0]||e.eq(1))return new c(NaN);n=e.eq(10)}if(t=this.d,this.s<0||!t||!t[0]||this.eq(1))return new c(t&&!t[0]?-1/0:1!=this.s?NaN:t?0:1/0);if(n)if(t.length>1)a=!0;else{for(i=t[0];i%10==0;)i/=10;a=1!==i}if(d=!1,o=U(this,s=f+5),r=n?k(c,s+10):U(e,s),A((u=O(o,r,s,1)).d,i=f,l))do{if(o=U(this,s+=10),r=n?k(c,s+10):U(e,s),u=O(o,r,s,1),!a){+D(u.d).slice(i+1,i+15)+1==1e14&&(u=C(u,f+1,0));break}}while(A(u.d,i+=10,l));return d=!0,C(u,f,l)},M.minus=M.sub=function(e){var n,t,r,i,a,o,s,u,c,f,l,p,m=this,y=m.constructor;if(e=new y(e),!m.d||!e.d)return m.s&&e.s?m.d?e.s=-e.s:e=new y(e.d||m.s!==e.s?m:NaN):e=new y(NaN),e;if(m.s!=e.s)return e.s=-e.s,m.plus(e);if(c=m.d,p=e.d,s=y.precision,u=y.rounding,!c[0]||!p[0]){if(p[0])e.s=-e.s;else{if(!c[0])return new y(3===u?-0:0);e=new y(m)}return d?C(e,s,u):e}if(t=h(e.e/7),f=h(m.e/7),c=c.slice(),a=f-t){for((l=a<0)?(n=c,a=-a,o=p.length):(n=p,t=f,o=c.length),a>(r=Math.max(Math.ceil(s/7),o)+2)&&(a=r,n.length=1),n.reverse(),r=a;r--;)n.push(0);n.reverse()}else{for((l=(r=c.length)<(o=p.length))&&(o=r),r=0;r<o;r++)if(c[r]!=p[r]){l=c[r]<p[r];break}a=0}for(l&&(n=c,c=p,p=n,e.s=-e.s),o=c.length,r=p.length-o;r>0;--r)c[o++]=0;for(r=p.length;r>a;){if(c[--r]<p[r]){for(i=r;i&&0===c[--i];)c[i]=w-1;--c[i],c[r]+=w}c[r]-=p[r]}for(;0===c[--o];)c.pop();for(;0===c[0];c.shift())--t;return c[0]?(e.d=c,e.e=I(c,t),d?C(e,s,u):e):new y(3===u?-0:0)},M.modulo=M.mod=function(e){var n,t=this,r=t.constructor;return e=new r(e),!t.d||!e.s||e.d&&!e.d[0]?new r(NaN):!e.d||t.d&&!t.d[0]?C(new r(t),r.precision,r.rounding):(d=!1,9==r.modulo?(n=O(t,e.abs(),0,3,1)).s*=e.s:n=O(t,e,0,r.modulo,1),n=n.times(e),d=!0,t.minus(n))},M.naturalExponential=M.exp=function(){return j(this)},M.naturalLogarithm=M.ln=function(){return U(this)},M.negated=M.neg=function(){var e=new this.constructor(this);return e.s=-e.s,C(e)},M.plus=M.add=function(e){var n,t,r,i,a,o,s,u,c,f,l=this,p=l.constructor;if(e=new p(e),!l.d||!e.d)return l.s&&e.s?l.d||(e=new p(e.d||l.s===e.s?l:NaN)):e=new p(NaN),e;if(l.s!=e.s)return e.s=-e.s,l.minus(e);if(c=l.d,f=e.d,s=p.precision,u=p.rounding,!c[0]||!f[0])return f[0]||(e=new p(l)),d?C(e,s,u):e;if(a=h(l.e/7),r=h(e.e/7),c=c.slice(),i=a-r){for(i<0?(t=c,i=-i,o=f.length):(t=f,r=a,o=c.length),i>(o=(a=Math.ceil(s/7))>o?a+1:o+1)&&(i=o,t.length=1),t.reverse();i--;)t.push(0);t.reverse()}for((o=c.length)-(i=f.length)<0&&(i=o,t=f,f=c,c=t),n=0;i;)n=(c[--i]=c[i]+f[i]+n)/w|0,c[i]%=w;for(n&&(c.unshift(n),++r),o=c.length;0==c[--o];)c.pop();return e.d=c,e.e=I(c,r),d?C(e,s,u):e},M.precision=M.sd=function(e){var n,t=this;if(void 0!==e&&e!==!!e&&1!==e&&0!==e)throw Error(m+e);return t.d?(n=q(t.d),e&&t.e+1>n&&(n=t.e+1)):n=NaN,n},M.round=function(){var e=this,n=e.constructor;return C(new n(e),e.e+1,n.rounding)},M.sine=M.sin=function(){var e,n,t=this,r=t.constructor;return t.isFinite()?t.isZero()?new r(t):(e=r.precision,n=r.rounding,r.precision=e+Math.max(t.e,t.sd())+7,r.rounding=1,t=function(e,n){var t,r=n.d.length;if(r<3)return $(e,2,n,n);t=(t=1.4*Math.sqrt(r))>16?16:0|t,n=n.times(1/V(5,t)),n=$(e,2,n,n);for(var i,a=new e(5),o=new e(16),s=new e(20);t--;)i=n.times(n),n=n.times(a.plus(i.times(o.times(i).minus(s))));return n}(r,W(r,t)),r.precision=e,r.rounding=n,C(s>2?t.neg():t,e,n,!0)):new r(NaN)},M.squareRoot=M.sqrt=function(){var e,n,t,r,i,a,o=this,s=o.d,u=o.e,c=o.s,f=o.constructor;if(1!==c||!s||!s[0])return new f(!c||c<0&&(!s||s[0])?NaN:s?o:1/0);for(d=!1,0==(c=Math.sqrt(+o))||c==1/0?(((n=D(s)).length+u)%2==0&&(n+="0"),c=Math.sqrt(n),u=h((u+1)/2)-(u<0||u%2),r=new f(n=c==1/0?"1e"+u:(n=c.toExponential()).slice(0,n.indexOf("e")+1)+u)):r=new f(c.toString()),t=(u=f.precision)+3;;)if(r=(a=r).plus(O(o,a,t+2,1)).times(.5),D(a.d).slice(0,t)===(n=D(r.d)).slice(0,t)){if("9999"!=(n=n.slice(t-3,t+1))&&(i||"4999"!=n)){+n&&(+n.slice(1)||"5"!=n.charAt(0))||(C(r,u+1,1),e=!r.times(r).eq(o));break}if(!i&&(C(a,u+1,0),a.times(a).eq(o))){r=a;break}t+=4,i=1}return d=!0,C(r,u,f.rounding,e)},M.tangent=M.tan=function(){var e,n,t=this,r=t.constructor;return t.isFinite()?t.isZero()?new r(t):(e=r.precision,n=r.rounding,r.precision=e+10,r.rounding=1,(t=t.sin()).s=1,t=O(t,new r(1).minus(t.times(t)).sqrt(),e+10,0),r.precision=e,r.rounding=n,C(2==s||4==s?t.neg():t,e,n,!0)):new r(NaN)},M.times=M.mul=function(e){var n,t,r,i,a,o,s,u,c,f=this,l=f.constructor,p=f.d,m=(e=new l(e)).d;if(e.s*=f.s,!(p&&p[0]&&m&&m[0]))return new l(!e.s||p&&!p[0]&&!m||m&&!m[0]&&!p?NaN:p&&m?0*e.s:e.s/0);for(t=h(f.e/7)+h(e.e/7),(u=p.length)<(c=m.length)&&(a=p,p=m,m=a,o=u,u=c,c=o),a=[],r=o=u+c;r--;)a.push(0);for(r=c;--r>=0;){for(n=0,i=u+r;i>r;)s=a[i]+m[r]*p[i-r-1]+n,a[i--]=s%w|0,n=s/w|0;a[i]=(a[i]+n)%w|0}for(;!a[--o];)a.pop();return n?++t:a.shift(),e.d=a,e.e=I(a,t),d?C(e,l.precision,l.rounding):e},M.toBinary=function(e,n){return Z(this,2,e,n)},M.toDecimalPlaces=M.toDP=function(e,n){var t=this,r=t.constructor;return t=new r(t),void 0===e?t:(E(e,0,1e9),void 0===n?n=r.rounding:E(n,0,8),C(t,e+t.e+1,n))},M.toExponential=function(e,n){var t,r=this,i=r.constructor;return void 0===e?t=T(r,!0):(E(e,0,1e9),void 0===n?n=i.rounding:E(n,0,8),t=T(r=C(new i(r),e+1,n),!0,e+1)),r.isNeg()&&!r.isZero()?"-"+t:t},M.toFixed=function(e,n){var t,r,i=this,a=i.constructor;return void 0===e?t=T(i):(E(e,0,1e9),void 0===n?n=a.rounding:E(n,0,8),t=T(r=C(new a(i),e+i.e+1,n),!1,e+r.e+1)),i.isNeg()&&!i.isZero()?"-"+t:t},M.toFraction=function(e){var n,t,r,i,a,o,s,u,c,f,l,p,h=this,g=h.d,v=h.constructor;if(!g)return new v(h);if(c=t=new v(1),r=u=new v(0),o=(a=(n=new v(r)).e=q(g)-h.e-1)%7,n.d[0]=y(10,o<0?7+o:o),null==e)e=a>0?n:c;else{if(!(s=new v(e)).isInt()||s.lt(c))throw Error(m+s);e=s.gt(n)?a>0?n:c:s}for(d=!1,s=new v(D(g)),f=v.precision,v.precision=a=7*g.length*2;l=O(s,n,0,1,1),1!=(i=t.plus(l.times(r))).cmp(e);)t=r,r=i,i=c,c=u.plus(l.times(i)),u=i,i=n,n=s.minus(l.times(i)),s=i;return i=O(e.minus(t),r,0,1,1),u=u.plus(i.times(c)),t=t.plus(i.times(r)),u.s=c.s=h.s,p=O(c,r,a,1).minus(h).abs().cmp(O(u,t,a,1).minus(h).abs())<1?[c,r]:[u,t],v.precision=f,d=!0,p},M.toHexadecimal=M.toHex=function(e,n){return Z(this,16,e,n)},M.toNearest=function(e,n){var t=this,r=t.constructor;if(t=new r(t),null==e){if(!t.d)return t;e=new r(1),n=r.rounding}else{if(e=new r(e),void 0===n?n=r.rounding:E(n,0,8),!t.d)return e.s?t:e;if(!e.d)return e.s&&(e.s=t.s),e}return e.d[0]?(d=!1,t=O(t,e,0,n,1).times(e),d=!0,C(t)):(e.s=t.s,t=e),t},M.toNumber=function(){return+this},M.toOctal=function(e,n){return Z(this,8,e,n)},M.toPower=M.pow=function(e){var n,t,r,i,a,o,s=this,u=s.constructor,c=+(e=new u(e));if(!(s.d&&e.d&&s.d[0]&&e.d[0]))return new u(y(+s,c));if((s=new u(s)).eq(1))return s;if(r=u.precision,a=u.rounding,e.eq(1))return C(s,r,a);if((n=h(e.e/7))>=e.d.length-1&&(t=c<0?-c:c)<=9007199254740991)return i=P(u,s,t,r),e.s<0?new u(1).div(i):C(i,r,a);if((o=s.s)<0){if(n<e.d.length-1)return new u(NaN);if(0==(1&e.d[n])&&(o=1),0==s.e&&1==s.d[0]&&1==s.d.length)return s.s=o,s}return(n=0!=(t=y(+s,c))&&isFinite(t)?new u(t+"").e:h(c*(Math.log("0."+D(s.d))/Math.LN10+s.e+1)))>u.maxE+1||n<u.minE-1?new u(n>0?o/0:0):(d=!1,u.rounding=s.s=1,t=Math.min(12,(n+"").length),(i=j(e.times(U(s,r+t)),r)).d&&A((i=C(i,r+5,1)).d,r,a)&&(n=r+10,+D((i=C(j(e.times(U(s,n+t)),n),n+5,1)).d).slice(r+1,r+15)+1==1e14&&(i=C(i,r+1,0))),i.s=o,d=!0,u.rounding=a,C(i,r,a))},M.toPrecision=function(e,n){var t,r=this,i=r.constructor;return void 0===e?t=T(r,r.e<=i.toExpNeg||r.e>=i.toExpPos):(E(e,1,1e9),void 0===n?n=i.rounding:E(n,0,8),t=T(r=C(new i(r),e,n),e<=r.e||r.e<=i.toExpNeg,e)),r.isNeg()&&!r.isZero()?"-"+t:t},M.toSignificantDigits=M.toSD=function(e,n){var t=this.constructor;return void 0===e?(e=t.precision,n=t.rounding):(E(e,1,1e9),void 0===n?n=t.rounding:E(n,0,8)),C(new t(this),e,n)},M.toString=function(){var e=this,n=e.constructor,t=T(e,e.e<=n.toExpNeg||e.e>=n.toExpPos);return e.isNeg()&&!e.isZero()?"-"+t:t},M.truncated=M.trunc=function(){return C(new this.constructor(this),this.e+1,1)},M.valueOf=M.toJSON=function(){var e=this,n=e.constructor,t=T(e,e.e<=n.toExpNeg||e.e>=n.toExpPos);return e.isNeg()?"-"+t:t};var O=function(){function e(e,n,t){var r,i=0,a=e.length;for(e=e.slice();a--;)r=e[a]*n+i,e[a]=r%t|0,i=r/t|0;return i&&e.unshift(i),e}function n(e,n,t,r){var i,a;if(t!=r)a=t>r?1:-1;else for(i=a=0;i<t;i++)if(e[i]!=n[i]){a=e[i]>n[i]?1:-1;break}return a}function t(e,n,t,r){for(var i=0;t--;)e[t]-=i,i=e[t]<n[t]?1:0,e[t]=i*r+e[t]-n[t];for(;!e[0]&&e.length>1;)e.shift()}return function(r,i,a,s,u,c){var f,l,p,d,m,y,g,v,x,b,N,S,M,D,E,A,_,O,T,I,k=r.constructor,B=r.s==i.s?1:-1,q=r.d,R=i.d;if(!(q&&q[0]&&R&&R[0]))return new k(r.s&&i.s&&(q?!R||q[0]!=R[0]:R)?q&&0==q[0]||!R?0*B:B/0:NaN);for(c?(m=1,l=r.e-i.e):(c=w,m=7,l=h(r.e/m)-h(i.e/m)),T=R.length,_=q.length,b=(x=new k(B)).d=[],p=0;R[p]==(q[p]||0);p++);if(R[p]>(q[p]||0)&&l--,null==a?(D=a=k.precision,s=k.rounding):D=u?a+(r.e-i.e)+1:a,D<0)b.push(1),y=!0;else{if(D=D/m+2|0,p=0,1==T){for(d=0,R=R[0],D++;(p<_||d)&&D--;p++)E=d*c+(q[p]||0),b[p]=E/R|0,d=E%R|0;y=d||p<_}else{for((d=c/(R[0]+1)|0)>1&&(R=e(R,d,c),q=e(q,d,c),T=R.length,_=q.length),A=T,S=(N=q.slice(0,T)).length;S<T;)N[S++]=0;(I=R.slice()).unshift(0),O=R[0],R[1]>=c/2&&++O;do{d=0,(f=n(R,N,T,S))<0?(M=N[0],T!=S&&(M=M*c+(N[1]||0)),(d=M/O|0)>1?(d>=c&&(d=c-1),1==(f=n(g=e(R,d,c),N,v=g.length,S=N.length))&&(d--,t(g,T<v?I:R,v,c))):(0==d&&(f=d=1),g=R.slice()),(v=g.length)<S&&g.unshift(0),t(N,g,S,c),-1==f&&(f=n(R,N,T,S=N.length))<1&&(d++,t(N,T<S?I:R,S,c)),S=N.length):0===f&&(d++,N=[0]),b[p++]=d,f&&N[0]?N[S++]=q[A]||0:(N=[q[A]],S=1)}while((A++<_||void 0!==N[0])&&D--);y=void 0!==N[0]}b[0]||b.shift()}if(1==m)x.e=l,o=y;else{for(p=1,d=b[0];d>=10;d/=10)p++;x.e=p+l*m-1,C(x,u?a+x.e+1:a,s,y)}return x}}();function C(e,n,t,r){var i,a,o,s,u,c,f,l,p,m=e.constructor;e:if(null!=n){if(!(l=e.d))return e;for(i=1,s=l[0];s>=10;s/=10)i++;if((a=n-i)<0)a+=7,o=n,u=(f=l[p=0])/y(10,i-o-1)%10|0;else if((p=Math.ceil((a+1)/7))>=(s=l.length)){if(!r)break e;for(;s++<=p;)l.push(0);f=u=0,i=1,o=(a%=7)-7+1}else{for(f=s=l[p],i=1;s>=10;s/=10)i++;u=(o=(a%=7)-7+i)<0?0:f/y(10,i-o-1)%10|0}if(r=r||n<0||void 0!==l[p+1]||(o<0?f:f%y(10,i-o-1)),c=t<4?(u||r)&&(0==t||t==(e.s<0?3:2)):u>5||5==u&&(4==t||r||6==t&&(a>0?o>0?f/y(10,i-o):0:l[p-1])%10&1||t==(e.s<0?8:7)),n<1||!l[0])return l.length=0,c?(n-=e.e+1,l[0]=y(10,(7-n%7)%7),e.e=-n||0):l[0]=e.e=0,e;if(0==a?(l.length=p,s=1,p--):(l.length=p+1,s=y(10,7-a),l[p]=o>0?(f/y(10,i-o)%y(10,o)|0)*s:0),c)for(;;){if(0==p){for(a=1,o=l[0];o>=10;o/=10)a++;for(o=l[0]+=s,s=1;o>=10;o/=10)s++;a!=s&&(e.e++,l[0]==w&&(l[0]=1));break}if(l[p]+=s,l[p]!=w)break;l[p--]=0,s=1}for(a=l.length;0===l[--a];)l.pop()}return d&&(e.e>m.maxE?(e.d=null,e.e=NaN):e.e<m.minE&&(e.e=0,e.d=[0])),e}function T(e,n,t){if(!e.isFinite())return L(e);var r,i=e.e,a=D(e.d),o=a.length;return n?(t&&(r=t-o)>0?a=a.charAt(0)+"."+a.slice(1)+R(r):o>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(e.e<0?"e":"e+")+e.e):i<0?(a="0."+R(-i-1)+a,t&&(r=t-o)>0&&(a+=R(r))):i>=o?(a+=R(i+1-o),t&&(r=t-i-1)>0&&(a=a+"."+R(r))):((r=i+1)<o&&(a=a.slice(0,r)+"."+a.slice(r)),t&&(r=t-o)>0&&(i+1===o&&(a+="."),a+=R(r))),a}function I(e,n){var t=e[0];for(n*=7;t>=10;t/=10)n++;return n}function k(e,n,t){if(n>N)throw d=!0,t&&(e.precision=t),Error("[DecimalError] Precision limit exceeded");return C(new e(f),n,1,!0)}function B(e,n,t){if(n>S)throw Error("[DecimalError] Precision limit exceeded");return C(new e(l),n,t,!0)}function q(e){var n=e.length-1,t=7*n+1;if(n=e[n]){for(;n%10==0;n/=10)t--;for(n=e[0];n>=10;n/=10)t++}return t}function R(e){for(var n="";e--;)n+="0";return n}function P(e,n,t,r){var i,a=new e(1),o=Math.ceil(r/7+4);for(d=!1;;){if(t%2&&J((a=a.times(n)).d,o)&&(i=!0),0===(t=h(t/2))){t=a.d.length-1,i&&0===a.d[t]&&++a.d[t];break}J((n=n.times(n)).d,o)}return d=!0,a}function z(e){return 1&e.d[e.d.length-1]}function F(e,n,t){for(var r,i=new e(n[0]),a=0;++a<n.length;){if(!(r=new e(n[a])).s){i=r;break}i[t](r)&&(i=r)}return i}function j(e,n){var t,r,i,a,o,s,u,c=0,f=0,l=0,p=e.constructor,m=p.rounding,h=p.precision;if(!e.d||!e.d[0]||e.e>17)return new p(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(null==n?(d=!1,u=h):u=n,s=new p(.03125);e.e>-2;)e=e.times(s),l+=5;for(u+=r=Math.log(y(2,l))/Math.LN10*2+5|0,t=a=o=new p(1),p.precision=u;;){if(a=C(a.times(e),u,1),t=t.times(++f),D((s=o.plus(O(a,t,u,1))).d).slice(0,u)===D(o.d).slice(0,u)){for(i=l;i--;)o=C(o.times(o),u,1);if(null!=n)return p.precision=h,o;if(!(c<3&&A(o.d,u-r,m,c)))return C(o,p.precision=h,m,d=!0);p.precision=u+=10,t=a=s=new p(1),f=0,c++}o=s}}function U(e,n){var t,r,i,a,o,s,u,c,f,l,p,m=1,h=e,y=h.d,g=h.constructor,v=g.rounding,x=g.precision;if(h.s<0||!y||!y[0]||!h.e&&1==y[0]&&1==y.length)return new g(y&&!y[0]?-1/0:1!=h.s?NaN:y?0:h);if(null==n?(d=!1,f=x):f=n,g.precision=f+=10,r=(t=D(y)).charAt(0),!(Math.abs(a=h.e)<15e14))return c=k(g,f+2,x).times(a+""),h=U(new g(r+"."+t.slice(1)),f-10).plus(c),g.precision=x,null==n?C(h,x,v,d=!0):h;for(;r<7&&1!=r||1==r&&t.charAt(1)>3;)r=(t=D((h=h.times(e)).d)).charAt(0),m++;for(a=h.e,r>1?(h=new g("0."+t),a++):h=new g(r+"."+t.slice(1)),l=h,u=o=h=O(h.minus(1),h.plus(1),f,1),p=C(h.times(h),f,1),i=3;;){if(o=C(o.times(p),f,1),D((c=u.plus(O(o,new g(i),f,1))).d).slice(0,f)===D(u.d).slice(0,f)){if(u=u.times(2),0!==a&&(u=u.plus(k(g,f+2,x).times(a+""))),u=O(u,new g(m),f,1),null!=n)return g.precision=x,u;if(!A(u.d,f-10,v,s))return C(u,g.precision=x,v,d=!0);g.precision=f+=10,c=o=h=O(l.minus(1),l.plus(1),f,1),p=C(h.times(h),f,1),i=s=1}u=c,i+=2}}function L(e){return String(e.s*e.s/0)}function H(e,n){var t,r,i;for((t=n.indexOf("."))>-1&&(n=n.replace(".","")),(r=n.search(/e/i))>0?(t<0&&(t=r),t+=+n.slice(r+1),n=n.substring(0,r)):t<0&&(t=n.length),r=0;48===n.charCodeAt(r);r++);for(i=n.length;48===n.charCodeAt(i-1);--i);if(n=n.slice(r,i)){if(i-=r,e.e=t=t-r-1,e.d=[],r=(t+1)%7,t<0&&(r+=7),r<i){for(r&&e.d.push(+n.slice(0,r)),i-=7;r<i;)e.d.push(+n.slice(r,r+=7));r=7-(n=n.slice(r)).length}else r-=i;for(;r--;)n+="0";e.d.push(+n),d&&(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 G(e,n){var t,r,i,o,s,u,c,f,l;if("Infinity"===n||"NaN"===n)return+n||(e.s=NaN),e.e=NaN,e.d=null,e;if(v.test(n))t=16,n=n.toLowerCase();else if(g.test(n))t=2;else{if(!x.test(n))throw Error(m+n);t=8}for((o=n.search(/p/i))>0?(c=+n.slice(o+1),n=n.substring(2,o)):n=n.slice(2),s=(o=n.indexOf("."))>=0,r=e.constructor,s&&(o=(u=(n=n.replace(".","")).length)-o,i=P(r,new r(t),o,2*o)),o=l=(f=_(n,t,w)).length-1;0===f[o];--o)f.pop();return o<0?new r(0*e.s):(e.e=I(f,l),e.d=f,d=!1,s&&(e=O(e,i,4*u)),c&&(e=e.times(Math.abs(c)<54?y(2,c):a.pow(2,c))),d=!0,e)}function $(e,n,t,r,i){var a,o,s,u,c=e.precision,f=Math.ceil(c/7);for(d=!1,u=t.times(t),s=new e(r);;){if(o=O(s.times(u),new e(n++*n++),c,1),s=i?r.plus(o):r.minus(o),r=O(o.times(u),new e(n++*n++),c,1),void 0!==(o=s.plus(r)).d[f]){for(a=f;o.d[a]===s.d[a]&&a--;);if(-1==a)break}a=s,s=r,r=o,o=a}return d=!0,o.d.length=f+1,o}function V(e,n){for(var t=e;--n;)t*=e;return t}function W(e,n){var t,r=n.s<0,i=B(e,e.precision,1),a=i.times(.5);if((n=n.abs()).lte(a))return s=r?4:1,n;if((t=n.divToInt(i)).isZero())s=r?3:2;else{if((n=n.minus(t.times(i))).lte(a))return s=z(t)?r?2:3:r?4:1,n;s=z(t)?r?1:4:r?3:2}return n.minus(i).abs()}function Z(e,n,t,r){var i,a,s,u,f,l,p,d,m,h=e.constructor,y=void 0!==t;if(y?(E(t,1,1e9),void 0===r?r=h.rounding:E(r,0,8)):(t=h.precision,r=h.rounding),e.isFinite()){for(y?(i=2,16==n?t=4*t-3:8==n&&(t=3*t-2)):i=n,(s=(p=T(e)).indexOf("."))>=0&&(p=p.replace(".",""),(m=new h(1)).e=p.length-s,m.d=_(T(m),10,i),m.e=m.d.length),a=f=(d=_(p,10,i)).length;0==d[--f];)d.pop();if(d[0]){if(s<0?a--:((e=new h(e)).d=d,e.e=a,d=(e=O(e,m,t,r,0,i)).d,a=e.e,l=o),s=d[t],u=i/2,l=l||void 0!==d[t+1],l=r<4?(void 0!==s||l)&&(0===r||r===(e.s<0?3:2)):s>u||s===u&&(4===r||l||6===r&&1&d[t-1]||r===(e.s<0?8:7)),d.length=t,l)for(;++d[--t]>i-1;)d[t]=0,t||(++a,d.unshift(1));for(f=d.length;!d[f-1];--f);for(s=0,p="";s<f;s++)p+=c.charAt(d[s]);if(y){if(f>1)if(16==n||8==n){for(s=16==n?4:3,--f;f%s;f++)p+="0";for(f=(d=_(p,i,n)).length;!d[f-1];--f);for(s=1,p="1.";s<f;s++)p+=c.charAt(d[s])}else p=p.charAt(0)+"."+p.slice(1);p=p+(a<0?"p":"p+")+a}else if(a<0){for(;++a;)p="0"+p;p="0."+p}else if(++a>f)for(a-=f;a--;)p+="0";else a<f&&(p=p.slice(0,a)+"."+p.slice(a))}else p=y?"0p+0":"0";p=(16==n?"0x":2==n?"0b":8==n?"0o":"")+p}else p=L(e);return e.s<0?"-"+p:p}function J(e,n){if(e.length>n)return e.length=n,!0}function Y(e){return new this(e).abs()}function X(e){return new this(e).acos()}function Q(e){return new this(e).acosh()}function K(e,n){return new this(e).plus(n)}function ee(e){return new this(e).asin()}function ne(e){return new this(e).asinh()}function te(e){return new this(e).atan()}function re(e){return new this(e).atanh()}function ie(e,n){e=new this(e),n=new this(n);var t,r=this.precision,i=this.rounding,a=r+4;return e.s&&n.s?e.d||n.d?!n.d||e.isZero()?(t=n.s<0?B(this,r,i):new this(0)).s=e.s:!e.d||n.isZero()?(t=B(this,a,1).times(.5)).s=e.s:n.s<0?(this.precision=a,this.rounding=1,t=this.atan(O(e,n,a,1)),n=B(this,a,1),this.precision=r,this.rounding=i,t=e.s<0?t.minus(n):t.plus(n)):t=this.atan(O(e,n,a,1)):(t=B(this,a,1).times(n.s>0?.25:.75)).s=e.s:t=new this(NaN),t}function ae(e){return new this(e).cbrt()}function oe(e){return C(e=new this(e),e.e+1,2)}function se(e){if(!e||"object"!=typeof e)throw Error("[DecimalError] Object expected");var n,t,r,i=!0===e.defaults,a=["precision",1,1e9,"rounding",0,8,"toExpNeg",-u,0,"toExpPos",0,u,"maxE",0,u,"minE",-u,0,"modulo",0,9];for(n=0;n<a.length;n+=3)if(t=a[n],i&&(this[t]=p[t]),void 0!==(r=e[t])){if(!(h(r)===r&&r>=a[n+1]&&r<=a[n+2]))throw Error(m+t+": "+r);this[t]=r}if(t="crypto",i&&(this[t]=p[t]),void 0!==(r=e[t])){if(!0!==r&&!1!==r&&0!==r&&1!==r)throw Error(m+t+": "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw Error("[DecimalError] crypto unavailable");this[t]=!0}else this[t]=!1}return this}function ue(e){return new this(e).cos()}function ce(e){return new this(e).cosh()}function fe(e,n){return new this(e).div(n)}function le(e){return new this(e).exp()}function pe(e){return C(e=new this(e),e.e+1,3)}function de(){var e,n,t=new this(0);for(d=!1,e=0;e<arguments.length;)if((n=new this(arguments[e++])).d)t.d&&(t=t.plus(n.times(n)));else{if(n.s)return d=!0,new this(1/0);t=n}return d=!0,t.sqrt()}function me(e){return e instanceof a||e&&"[object Decimal]"===e.name||!1}function he(e){return new this(e).ln()}function ye(e,n){return new this(e).log(n)}function ge(e){return new this(e).log(2)}function ve(e){return new this(e).log(10)}function xe(){return F(this,arguments,"lt")}function be(){return F(this,arguments,"gt")}function we(e,n){return new this(e).mod(n)}function Ne(e,n){return new this(e).mul(n)}function Se(e,n){return new this(e).pow(n)}function Me(e){var n,t,r,i,a=0,o=new this(1),s=[];if(void 0===e?e=this.precision:E(e,1,1e9),r=Math.ceil(e/7),this.crypto)if(crypto.getRandomValues)for(n=crypto.getRandomValues(new Uint32Array(r));a<r;)(i=n[a])>=429e7?n[a]=crypto.getRandomValues(new Uint32Array(1))[0]:s[a++]=i%1e7;else{if(!crypto.randomBytes)throw Error("[DecimalError] crypto unavailable");for(n=crypto.randomBytes(r*=4);a<r;)(i=n[a]+(n[a+1]<<8)+(n[a+2]<<16)+((127&n[a+3])<<24))>=214e7?crypto.randomBytes(4).copy(n,a):(s.push(i%1e7),a+=4);a=r/4}else for(;a<r;)s[a++]=1e7*Math.random()|0;for(e%=7,(r=s[--a])&&e&&(i=y(10,7-e),s[a]=(r/i|0)*i);0===s[a];a--)s.pop();if(a<0)t=0,s=[0];else{for(t=-1;0===s[0];t-=7)s.shift();for(r=1,i=s[0];i>=10;i/=10)r++;r<7&&(t-=7-r)}return o.e=t,o.d=s,o}function De(e){return C(e=new this(e),e.e+1,this.rounding)}function Ee(e){return(e=new this(e)).d?e.d[0]?e.s:0*e.s:e.s||NaN}function Ae(e){return new this(e).sin()}function _e(e){return new this(e).sinh()}function Oe(e){return new this(e).sqrt()}function Ce(e,n){return new this(e).sub(n)}function Te(e){return new this(e).tan()}function Ie(e){return new this(e).tanh()}function ke(e){return C(e=new this(e),e.e+1,1)}(a=function e(n){var t,r,i;function a(e){var n,t,r,i=this;if(!(i instanceof a))return new a(e);if(i.constructor=a,e instanceof a)return i.s=e.s,void(d?!e.d||e.e>a.maxE?(i.e=NaN,i.d=null):e.e<a.minE?(i.e=0,i.d=[0]):(i.e=e.e,i.d=e.d.slice()):(i.e=e.e,i.d=e.d?e.d.slice():e.d));if("number"===(r=typeof e)){if(0===e)return i.s=1/e<0?-1:1,i.e=0,void(i.d=[0]);if(e<0?(e=-e,i.s=-1):i.s=1,e===~~e&&e<1e7){for(n=0,t=e;t>=10;t/=10)n++;return void(d?n>a.maxE?(i.e=NaN,i.d=null):n<a.minE?(i.e=0,i.d=[0]):(i.e=n,i.d=[e]):(i.e=n,i.d=[e]))}return 0*e!=0?(e||(i.s=NaN),i.e=NaN,void(i.d=null)):H(i,e.toString())}if("string"!==r)throw Error(m+e);return 45===(t=e.charCodeAt(0))?(e=e.slice(1),i.s=-1):(43===t&&(e=e.slice(1)),i.s=1),b.test(e)?H(i,e):G(i,e)}if(a.prototype=M,a.ROUND_UP=0,a.ROUND_DOWN=1,a.ROUND_CEIL=2,a.ROUND_FLOOR=3,a.ROUND_HALF_UP=4,a.ROUND_HALF_DOWN=5,a.ROUND_HALF_EVEN=6,a.ROUND_HALF_CEIL=7,a.ROUND_HALF_FLOOR=8,a.EUCLID=9,a.config=a.set=se,a.clone=e,a.isDecimal=me,a.abs=Y,a.acos=X,a.acosh=Q,a.add=K,a.asin=ee,a.asinh=ne,a.atan=te,a.atanh=re,a.atan2=ie,a.cbrt=ae,a.ceil=oe,a.cos=ue,a.cosh=ce,a.div=fe,a.exp=le,a.floor=pe,a.hypot=de,a.ln=he,a.log=ye,a.log10=ve,a.log2=ge,a.max=xe,a.min=be,a.mod=we,a.mul=Ne,a.pow=Se,a.random=Me,a.round=De,a.sign=Ee,a.sin=Ae,a.sinh=_e,a.sqrt=Oe,a.sub=Ce,a.tan=Te,a.tanh=Ie,a.trunc=ke,void 0===n&&(n={}),n&&!0!==n.defaults)for(i=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],t=0;t<i.length;)n.hasOwnProperty(r=i[t++])||(n[r]=this[r]);return a.config(n),a}(p)).default=a.Decimal=a,f=new a(f),l=new a(l),void 0===(r=function(){return a}.call(n,t,n,e))||(e.exports=r)}()},function(e,n,t){"use strict";var r=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},i={"{":"\\{","}":"\\}","\\":"\\textbackslash{}","#":"\\#",$:"\\$","%":"\\%","&":"\\&","^":"\\textasciicircum{}",_:"\\_","~":"\\textasciitilde{}"},a={"–":"\\--","—":"\\---"," ":"~","\t":"\\qquad{}","\r\n":"\\newline{}","\n":"\\newline{}"},o=function(e,n){return r({},e,n)};e.exports=function(e){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=n.preserveFormatting,s=void 0!==t&&t,u=n.escapeMapFn,c=void 0===u?o:u,f=String(e),l="",p=c(r({},i),s?r({},a):{}),d=Object.keys(p),m=function(){var e=!1;d.forEach((function(n,t){e||f.length>=n.length&&f.slice(0,n.length)===n&&(l+=p[d[t]],f=f.slice(n.length,f.length),e=!0)})),e||(l+=f.slice(0,1),f=f.slice(1,f.length))};f;)m();return l}},function(e,n){function t(){}t.prototype={on:function(e,n,t){var r=this.e||(this.e={});return(r[e]||(r[e]=[])).push({fn:n,ctx:t}),this},once:function(e,n,t){var r=this;function i(){r.off(e,i),n.apply(t,arguments)}return i._=n,this.on(e,i,t)},emit:function(e){for(var n=[].slice.call(arguments,1),t=((this.e||(this.e={}))[e]||[]).slice(),r=0,i=t.length;r<i;r++)t[r].fn.apply(t[r].ctx,n);return this},off:function(e,n){var t=this.e||(this.e={}),r=t[e],i=[];if(r&&n)for(var a=0,o=r.length;a<o;a++)r[a].fn!==n&&r[a].fn._!==n&&i.push(r[a]);return i.length?t[e]=i:delete t[e],this}},e.exports=t,e.exports.TinyEmitter=t},function(e,n,t){t(154),e.exports=t(356)},function(e,n,t){"use strict";(function(e){if(t(155),t(352),t(353),e._babelPolyfill)throw new Error("only one instance of babel-polyfill is allowed");e._babelPolyfill=!0;function n(e,n,t){e[n]||Object.defineProperty(e,n,{writable:!0,configurable:!0,value:t})}n(String.prototype,"padLeft","".padStart),n(String.prototype,"padRight","".padEnd),"pop,reverse,shift,keys,values,entries,indexOf,every,some,forEach,map,filter,find,findIndex,includes,join,slice,concat,push,splice,unshift,sort,lastIndexOf,reduce,reduceRight,copyWithin,fill".split(",").forEach((function(e){[][e]&&n(Array,e,Function.call.bind([][e]))}))}).call(this,t(72))},function(e,n,t){t(156),t(159),t(160),t(161),t(162),t(163),t(164),t(165),t(166),t(167),t(168),t(169),t(170),t(171),t(172),t(173),t(174),t(175),t(176),t(177),t(178),t(179),t(180),t(181),t(182),t(183),t(184),t(185),t(186),t(187),t(188),t(189),t(190),t(191),t(192),t(193),t(194),t(195),t(196),t(197),t(198),t(199),t(200),t(201),t(202),t(203),t(204),t(205),t(206),t(207),t(208),t(209),t(210),t(211),t(212),t(213),t(214),t(215),t(216),t(217),t(218),t(219),t(220),t(221),t(222),t(223),t(224),t(225),t(226),t(227),t(228),t(229),t(230),t(231),t(232),t(233),t(234),t(236),t(237),t(239),t(240),t(241),t(242),t(243),t(244),t(245),t(247),t(248),t(249),t(250),t(251),t(252),t(253),t(254),t(255),t(256),t(257),t(258),t(259),t(93),t(260),t(122),t(261),t(123),t(262),t(263),t(264),t(265),t(266),t(126),t(128),t(129),t(267),t(268),t(269),t(270),t(271),t(272),t(273),t(274),t(275),t(276),t(277),t(278),t(279),t(280),t(281),t(282),t(283),t(284),t(285),t(286),t(287),t(288),t(289),t(290),t(291),t(292),t(293),t(294),t(295),t(296),t(297),t(298),t(299),t(300),t(301),t(302),t(303),t(304),t(305),t(306),t(307),t(308),t(309),t(310),t(311),t(312),t(313),t(314),t(315),t(316),t(317),t(318),t(319),t(320),t(321),t(322),t(323),t(324),t(325),t(326),t(327),t(328),t(329),t(330),t(331),t(332),t(333),t(334),t(335),t(336),t(337),t(338),t(339),t(340),t(341),t(342),t(343),t(344),t(345),t(346),t(347),t(348),t(349),t(350),t(351),e.exports=t(21)},function(e,n,t){"use strict";var r=t(3),i=t(17),a=t(8),o=t(0),s=t(14),u=t(34).KEY,c=t(4),f=t(53),l=t(49),p=t(37),d=t(6),m=t(104),h=t(74),y=t(158),g=t(60),v=t(2),x=t(5),b=t(10),w=t(18),N=t(26),S=t(36),M=t(40),D=t(107),E=t(19),A=t(59),_=t(9),O=t(38),C=E.f,T=_.f,I=D.f,k=r.Symbol,B=r.JSON,q=B&&B.stringify,R=d("_hidden"),P=d("toPrimitive"),z={}.propertyIsEnumerable,F=f("symbol-registry"),j=f("symbols"),U=f("op-symbols"),L=Object.prototype,H="function"==typeof k&&!!A.f,G=r.QObject,$=!G||!G.prototype||!G.prototype.findChild,V=a&&c((function(){return 7!=M(T({},"a",{get:function(){return T(this,"a",{value:7}).a}})).a}))?function(e,n,t){var r=C(L,n);r&&delete L[n],T(e,n,t),r&&e!==L&&T(L,n,r)}:T,W=function(e){var n=j[e]=M(k.prototype);return n._k=e,n},Z=H&&"symbol"==typeof k.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof k},J=function(e,n,t){return e===L&&J(U,n,t),v(e),n=N(n,!0),v(t),i(j,n)?(t.enumerable?(i(e,R)&&e[R][n]&&(e[R][n]=!1),t=M(t,{enumerable:S(0,!1)})):(i(e,R)||T(e,R,S(1,{})),e[R][n]=!0),V(e,n,t)):T(e,n,t)},Y=function(e,n){v(e);for(var t,r=y(n=w(n)),i=0,a=r.length;a>i;)J(e,t=r[i++],n[t]);return e},X=function(e){var n=z.call(this,e=N(e,!0));return!(this===L&&i(j,e)&&!i(U,e))&&(!(n||!i(this,e)||!i(j,e)||i(this,R)&&this[R][e])||n)},Q=function(e,n){if(e=w(e),n=N(n,!0),e!==L||!i(j,n)||i(U,n)){var t=C(e,n);return!t||!i(j,n)||i(e,R)&&e[R][n]||(t.enumerable=!0),t}},K=function(e){for(var n,t=I(w(e)),r=[],a=0;t.length>a;)i(j,n=t[a++])||n==R||n==u||r.push(n);return r},ee=function(e){for(var n,t=e===L,r=I(t?U:w(e)),a=[],o=0;r.length>o;)!i(j,n=r[o++])||t&&!i(L,n)||a.push(j[n]);return a};H||(s((k=function(){if(this instanceof k)throw TypeError("Symbol is not a constructor!");var e=p(arguments.length>0?arguments[0]:void 0),n=function(t){this===L&&n.call(U,t),i(this,R)&&i(this[R],e)&&(this[R][e]=!1),V(this,e,S(1,t))};return a&&$&&V(L,e,{configurable:!0,set:n}),W(e)}).prototype,"toString",(function(){return this._k})),E.f=Q,_.f=J,t(41).f=D.f=K,t(55).f=X,A.f=ee,a&&!t(33)&&s(L,"propertyIsEnumerable",X,!0),m.f=function(e){return W(d(e))}),o(o.G+o.W+o.F*!H,{Symbol:k});for(var ne="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),te=0;ne.length>te;)d(ne[te++]);for(var re=O(d.store),ie=0;re.length>ie;)h(re[ie++]);o(o.S+o.F*!H,"Symbol",{for:function(e){return i(F,e+="")?F[e]:F[e]=k(e)},keyFor:function(e){if(!Z(e))throw TypeError(e+" is not a symbol!");for(var n in F)if(F[n]===e)return n},useSetter:function(){$=!0},useSimple:function(){$=!1}}),o(o.S+o.F*!H,"Object",{create:function(e,n){return void 0===n?M(e):Y(M(e),n)},defineProperty:J,defineProperties:Y,getOwnPropertyDescriptor:Q,getOwnPropertyNames:K,getOwnPropertySymbols:ee});var ae=c((function(){A.f(1)}));o(o.S+o.F*ae,"Object",{getOwnPropertySymbols:function(e){return A.f(b(e))}}),B&&o(o.S+o.F*(!H||c((function(){var e=k();return"[null]"!=q([e])||"{}"!=q({a:e})||"{}"!=q(Object(e))}))),"JSON",{stringify:function(e){for(var n,t,r=[e],i=1;arguments.length>i;)r.push(arguments[i++]);if(t=n=r[1],(x(n)||void 0!==e)&&!Z(e))return g(n)||(n=function(e,n){if("function"==typeof t&&(n=t.call(this,e,n)),!Z(n))return n}),r[1]=n,q.apply(B,r)}}),k.prototype[P]||t(13)(k.prototype,P,k.prototype.valueOf),l(k,"Symbol"),l(Math,"Math",!0),l(r.JSON,"JSON",!0)},function(e,n,t){e.exports=t(53)("native-function-to-string",Function.toString)},function(e,n,t){var r=t(38),i=t(59),a=t(55);e.exports=function(e){var n=r(e),t=i.f;if(t)for(var o,s=t(e),u=a.f,c=0;s.length>c;)u.call(e,o=s[c++])&&n.push(o);return n}},function(e,n,t){var r=t(0);r(r.S,"Object",{create:t(40)})},function(e,n,t){var r=t(0);r(r.S+r.F*!t(8),"Object",{defineProperty:t(9).f})},function(e,n,t){var r=t(0);r(r.S+r.F*!t(8),"Object",{defineProperties:t(106)})},function(e,n,t){var r=t(18),i=t(19).f;t(28)("getOwnPropertyDescriptor",(function(){return function(e,n){return i(r(e),n)}}))},function(e,n,t){var r=t(10),i=t(20);t(28)("getPrototypeOf",(function(){return function(e){return i(r(e))}}))},function(e,n,t){var r=t(10),i=t(38);t(28)("keys",(function(){return function(e){return i(r(e))}}))},function(e,n,t){t(28)("getOwnPropertyNames",(function(){return t(107).f}))},function(e,n,t){var r=t(5),i=t(34).onFreeze;t(28)("freeze",(function(e){return function(n){return e&&r(n)?e(i(n)):n}}))},function(e,n,t){var r=t(5),i=t(34).onFreeze;t(28)("seal",(function(e){return function(n){return e&&r(n)?e(i(n)):n}}))},function(e,n,t){var r=t(5),i=t(34).onFreeze;t(28)("preventExtensions",(function(e){return function(n){return e&&r(n)?e(i(n)):n}}))},function(e,n,t){var r=t(5);t(28)("isFrozen",(function(e){return function(n){return!r(n)||!!e&&e(n)}}))},function(e,n,t){var r=t(5);t(28)("isSealed",(function(e){return function(n){return!r(n)||!!e&&e(n)}}))},function(e,n,t){var r=t(5);t(28)("isExtensible",(function(e){return function(n){return!!r(n)&&(!e||e(n))}}))},function(e,n,t){var r=t(0);r(r.S+r.F,"Object",{assign:t(108)})},function(e,n,t){var r=t(0);r(r.S,"Object",{is:t(109)})},function(e,n,t){var r=t(0);r(r.S,"Object",{setPrototypeOf:t(78).set})},function(e,n,t){"use strict";var r=t(50),i={};i[t(6)("toStringTag")]="z",i+""!="[object z]"&&t(14)(Object.prototype,"toString",(function(){return"[object "+r(this)+"]"}),!0)},function(e,n,t){var r=t(0);r(r.P,"Function",{bind:t(110)})},function(e,n,t){var r=t(9).f,i=Function.prototype,a=/^\s*function ([^ (]*)/;"name"in i||t(8)&&r(i,"name",{configurable:!0,get:function(){try{return(""+this).match(a)[1]}catch(e){return""}}})},function(e,n,t){"use strict";var r=t(5),i=t(20),a=t(6)("hasInstance"),o=Function.prototype;a in o||t(9).f(o,a,{value:function(e){if("function"!=typeof this||!r(e))return!1;if(!r(this.prototype))return e instanceof this;for(;e=i(e);)if(this.prototype===e)return!0;return!1}})},function(e,n,t){var r=t(0),i=t(112);r(r.G+r.F*(parseInt!=i),{parseInt:i})},function(e,n,t){var r=t(0),i=t(113);r(r.G+r.F*(parseFloat!=i),{parseFloat:i})},function(e,n,t){"use strict";var r=t(3),i=t(17),a=t(23),o=t(80),s=t(26),u=t(4),c=t(41).f,f=t(19).f,l=t(9).f,p=t(51).trim,d=r.Number,m=d,h=d.prototype,y="Number"==a(t(40)(h)),g="trim"in String.prototype,v=function(e){var n=s(e,!1);if("string"==typeof n&&n.length>2){var t,r,i,a=(n=g?n.trim():p(n,3)).charCodeAt(0);if(43===a||45===a){if(88===(t=n.charCodeAt(2))||120===t)return NaN}else if(48===a){switch(n.charCodeAt(1)){case 66:case 98:r=2,i=49;break;case 79:case 111:r=8,i=55;break;default:return+n}for(var o,u=n.slice(2),c=0,f=u.length;c<f;c++)if((o=u.charCodeAt(c))<48||o>i)return NaN;return parseInt(u,r)}}return+n};if(!d(" 0o1")||!d("0b1")||d("+0x1")){d=function(e){var n=arguments.length<1?0:e,t=this;return t instanceof d&&(y?u((function(){h.valueOf.call(t)})):"Number"!=a(t))?o(new m(v(n)),t,d):v(n)};for(var x,b=t(8)?c(m):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),w=0;b.length>w;w++)i(m,x=b[w])&&!i(d,x)&&l(d,x,f(m,x));d.prototype=h,h.constructor=d,t(14)(r,"Number",d)}},function(e,n,t){"use strict";var r=t(0),i=t(24),a=t(114),o=t(81),s=1..toFixed,u=Math.floor,c=[0,0,0,0,0,0],f="Number.toFixed: incorrect invocation!",l=function(e,n){for(var t=-1,r=n;++t<6;)r+=e*c[t],c[t]=r%1e7,r=u(r/1e7)},p=function(e){for(var n=6,t=0;--n>=0;)t+=c[n],c[n]=u(t/e),t=t%e*1e7},d=function(){for(var e=6,n="";--e>=0;)if(""!==n||0===e||0!==c[e]){var t=String(c[e]);n=""===n?t:n+o.call("0",7-t.length)+t}return n},m=function(e,n,t){return 0===n?t:n%2==1?m(e,n-1,t*e):m(e*e,n/2,t)};r(r.P+r.F*(!!s&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!t(4)((function(){s.call({})}))),"Number",{toFixed:function(e){var n,t,r,s,u=a(this,f),c=i(e),h="",y="0";if(c<0||c>20)throw RangeError(f);if(u!=u)return"NaN";if(u<=-1e21||u>=1e21)return String(u);if(u<0&&(h="-",u=-u),u>1e-21)if(t=(n=function(e){for(var n=0,t=e;t>=4096;)n+=12,t/=4096;for(;t>=2;)n+=1,t/=2;return n}(u*m(2,69,1))-69)<0?u*m(2,-n,1):u/m(2,n,1),t*=4503599627370496,(n=52-n)>0){for(l(0,t),r=c;r>=7;)l(1e7,0),r-=7;for(l(m(10,r,1),0),r=n-1;r>=23;)p(1<<23),r-=23;p(1<<r),l(1,1),p(2),y=d()}else l(0,t),l(1<<-n,0),y=d()+o.call("0",c);return y=c>0?h+((s=y.length)<=c?"0."+o.call("0",c-s)+y:y.slice(0,s-c)+"."+y.slice(s-c)):h+y}})},function(e,n,t){"use strict";var r=t(0),i=t(4),a=t(114),o=1..toPrecision;r(r.P+r.F*(i((function(){return"1"!==o.call(1,void 0)}))||!i((function(){o.call({})}))),"Number",{toPrecision:function(e){var n=a(this,"Number#toPrecision: incorrect invocation!");return void 0===e?o.call(n):o.call(n,e)}})},function(e,n,t){var r=t(0);r(r.S,"Number",{EPSILON:Math.pow(2,-52)})},function(e,n,t){var r=t(0),i=t(3).isFinite;r(r.S,"Number",{isFinite:function(e){return"number"==typeof e&&i(e)}})},function(e,n,t){var r=t(0);r(r.S,"Number",{isInteger:t(115)})},function(e,n,t){var r=t(0);r(r.S,"Number",{isNaN:function(e){return e!=e}})},function(e,n,t){var r=t(0),i=t(115),a=Math.abs;r(r.S,"Number",{isSafeInteger:function(e){return i(e)&&a(e)<=9007199254740991}})},function(e,n,t){var r=t(0);r(r.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},function(e,n,t){var r=t(0);r(r.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},function(e,n,t){var r=t(0),i=t(113);r(r.S+r.F*(Number.parseFloat!=i),"Number",{parseFloat:i})},function(e,n,t){var r=t(0),i=t(112);r(r.S+r.F*(Number.parseInt!=i),"Number",{parseInt:i})},function(e,n,t){var r=t(0),i=t(116),a=Math.sqrt,o=Math.acosh;r(r.S+r.F*!(o&&710==Math.floor(o(Number.MAX_VALUE))&&o(1/0)==1/0),"Math",{acosh:function(e){return(e=+e)<1?NaN:e>94906265.62425156?Math.log(e)+Math.LN2:i(e-1+a(e-1)*a(e+1))}})},function(e,n,t){var r=t(0),i=Math.asinh;r(r.S+r.F*!(i&&1/i(0)>0),"Math",{asinh:function e(n){return isFinite(n=+n)&&0!=n?n<0?-e(-n):Math.log(n+Math.sqrt(n*n+1)):n}})},function(e,n,t){var r=t(0),i=Math.atanh;r(r.S+r.F*!(i&&1/i(-0)<0),"Math",{atanh:function(e){return 0==(e=+e)?e:Math.log((1+e)/(1-e))/2}})},function(e,n,t){var r=t(0),i=t(82);r(r.S,"Math",{cbrt:function(e){return i(e=+e)*Math.pow(Math.abs(e),1/3)}})},function(e,n,t){var r=t(0);r(r.S,"Math",{clz32:function(e){return(e>>>=0)?31-Math.floor(Math.log(e+.5)*Math.LOG2E):32}})},function(e,n,t){var r=t(0),i=Math.exp;r(r.S,"Math",{cosh:function(e){return(i(e=+e)+i(-e))/2}})},function(e,n,t){var r=t(0),i=t(83);r(r.S+r.F*(i!=Math.expm1),"Math",{expm1:i})},function(e,n,t){var r=t(0);r(r.S,"Math",{fround:t(117)})},function(e,n,t){var r=t(0),i=Math.abs;r(r.S,"Math",{hypot:function(e,n){for(var t,r,a=0,o=0,s=arguments.length,u=0;o<s;)u<(t=i(arguments[o++]))?(a=a*(r=u/t)*r+1,u=t):a+=t>0?(r=t/u)*r:t;return u===1/0?1/0:u*Math.sqrt(a)}})},function(e,n,t){var r=t(0),i=Math.imul;r(r.S+r.F*t(4)((function(){return-5!=i(4294967295,5)||2!=i.length})),"Math",{imul:function(e,n){var t=+e,r=+n,i=65535&t,a=65535&r;return 0|i*a+((65535&t>>>16)*a+i*(65535&r>>>16)<<16>>>0)}})},function(e,n,t){var r=t(0);r(r.S,"Math",{log10:function(e){return Math.log(e)*Math.LOG10E}})},function(e,n,t){var r=t(0);r(r.S,"Math",{log1p:t(116)})},function(e,n,t){var r=t(0);r(r.S,"Math",{log2:function(e){return Math.log(e)/Math.LN2}})},function(e,n,t){var r=t(0);r(r.S,"Math",{sign:t(82)})},function(e,n,t){var r=t(0),i=t(83),a=Math.exp;r(r.S+r.F*t(4)((function(){return-2e-17!=!Math.sinh(-2e-17)})),"Math",{sinh:function(e){return Math.abs(e=+e)<1?(i(e)-i(-e))/2:(a(e-1)-a(-e-1))*(Math.E/2)}})},function(e,n,t){var r=t(0),i=t(83),a=Math.exp;r(r.S,"Math",{tanh:function(e){var n=i(e=+e),t=i(-e);return n==1/0?1:t==1/0?-1:(n-t)/(a(e)+a(-e))}})},function(e,n,t){var r=t(0);r(r.S,"Math",{trunc:function(e){return(e>0?Math.floor:Math.ceil)(e)}})},function(e,n,t){var r=t(0),i=t(39),a=String.fromCharCode,o=String.fromCodePoint;r(r.S+r.F*(!!o&&1!=o.length),"String",{fromCodePoint:function(e){for(var n,t=[],r=arguments.length,o=0;r>o;){if(n=+arguments[o++],i(n,1114111)!==n)throw RangeError(n+" is not a valid code point");t.push(n<65536?a(n):a(55296+((n-=65536)>>10),n%1024+56320))}return t.join("")}})},function(e,n,t){var r=t(0),i=t(18),a=t(7);r(r.S,"String",{raw:function(e){for(var n=i(e.raw),t=a(n.length),r=arguments.length,o=[],s=0;t>s;)o.push(String(n[s++])),s<r&&o.push(String(arguments[s]));return o.join("")}})},function(e,n,t){"use strict";t(51)("trim",(function(e){return function(){return e(this,3)}}))},function(e,n,t){"use strict";var r=t(61)(!0);t(84)(String,"String",(function(e){this._t=String(e),this._i=0}),(function(){var e,n=this._t,t=this._i;return t>=n.length?{value:void 0,done:!0}:(e=r(n,t),this._i+=e.length,{value:e,done:!1})}))},function(e,n,t){"use strict";var r=t(0),i=t(61)(!1);r(r.P,"String",{codePointAt:function(e){return i(this,e)}})},function(e,n,t){"use strict";var r=t(0),i=t(7),a=t(86),o="".endsWith;r(r.P+r.F*t(87)("endsWith"),"String",{endsWith:function(e){var n=a(this,e,"endsWith"),t=arguments.length>1?arguments[1]:void 0,r=i(n.length),s=void 0===t?r:Math.min(i(t),r),u=String(e);return o?o.call(n,u,s):n.slice(s-u.length,s)===u}})},function(e,n,t){"use strict";var r=t(0),i=t(86);r(r.P+r.F*t(87)("includes"),"String",{includes:function(e){return!!~i(this,e,"includes").indexOf(e,arguments.length>1?arguments[1]:void 0)}})},function(e,n,t){var r=t(0);r(r.P,"String",{repeat:t(81)})},function(e,n,t){"use strict";var r=t(0),i=t(7),a=t(86),o="".startsWith;r(r.P+r.F*t(87)("startsWith"),"String",{startsWith:function(e){var n=a(this,e,"startsWith"),t=i(Math.min(arguments.length>1?arguments[1]:void 0,n.length)),r=String(e);return o?o.call(n,r,t):n.slice(t,t+r.length)===r}})},function(e,n,t){"use strict";t(15)("anchor",(function(e){return function(n){return e(this,"a","name",n)}}))},function(e,n,t){"use strict";t(15)("big",(function(e){return function(){return e(this,"big","","")}}))},function(e,n,t){"use strict";t(15)("blink",(function(e){return function(){return e(this,"blink","","")}}))},function(e,n,t){"use strict";t(15)("bold",(function(e){return function(){return e(this,"b","","")}}))},function(e,n,t){"use strict";t(15)("fixed",(function(e){return function(){return e(this,"tt","","")}}))},function(e,n,t){"use strict";t(15)("fontcolor",(function(e){return function(n){return e(this,"font","color",n)}}))},function(e,n,t){"use strict";t(15)("fontsize",(function(e){return function(n){return e(this,"font","size",n)}}))},function(e,n,t){"use strict";t(15)("italics",(function(e){return function(){return e(this,"i","","")}}))},function(e,n,t){"use strict";t(15)("link",(function(e){return function(n){return e(this,"a","href",n)}}))},function(e,n,t){"use strict";t(15)("small",(function(e){return function(){return e(this,"small","","")}}))},function(e,n,t){"use strict";t(15)("strike",(function(e){return function(){return e(this,"strike","","")}}))},function(e,n,t){"use strict";t(15)("sub",(function(e){return function(){return e(this,"sub","","")}}))},function(e,n,t){"use strict";t(15)("sup",(function(e){return function(){return e(this,"sup","","")}}))},function(e,n,t){var r=t(0);r(r.S,"Date",{now:function(){return(new Date).getTime()}})},function(e,n,t){"use strict";var r=t(0),i=t(10),a=t(26);r(r.P+r.F*t(4)((function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})})),"Date",{toJSON:function(e){var n=i(this),t=a(n);return"number"!=typeof t||isFinite(t)?n.toISOString():null}})},function(e,n,t){var r=t(0),i=t(235);r(r.P+r.F*(Date.prototype.toISOString!==i),"Date",{toISOString:i})},function(e,n,t){"use strict";var r=t(4),i=Date.prototype.getTime,a=Date.prototype.toISOString,o=function(e){return e>9?e:"0"+e};e.exports=r((function(){return"0385-07-25T07:06:39.999Z"!=a.call(new Date(-50000000000001))}))||!r((function(){a.call(new Date(NaN))}))?function(){if(!isFinite(i.call(this)))throw RangeError("Invalid time value");var e=this,n=e.getUTCFullYear(),t=e.getUTCMilliseconds(),r=n<0?"-":n>9999?"+":"";return r+("00000"+Math.abs(n)).slice(r?-6:-4)+"-"+o(e.getUTCMonth()+1)+"-"+o(e.getUTCDate())+"T"+o(e.getUTCHours())+":"+o(e.getUTCMinutes())+":"+o(e.getUTCSeconds())+"."+(t>99?t:"0"+o(t))+"Z"}:a},function(e,n,t){var r=Date.prototype,i=r.toString,a=r.getTime;new Date(NaN)+""!="Invalid Date"&&t(14)(r,"toString",(function(){var e=a.call(this);return e==e?i.call(this):"Invalid Date"}))},function(e,n,t){var r=t(6)("toPrimitive"),i=Date.prototype;r in i||t(13)(i,r,t(238))},function(e,n,t){"use strict";var r=t(2),i=t(26);e.exports=function(e){if("string"!==e&&"number"!==e&&"default"!==e)throw TypeError("Incorrect hint");return i(r(this),"number"!=e)}},function(e,n,t){var r=t(0);r(r.S,"Array",{isArray:t(60)})},function(e,n,t){"use strict";var r=t(22),i=t(0),a=t(10),o=t(118),s=t(88),u=t(7),c=t(89),f=t(90);i(i.S+i.F*!t(63)((function(e){Array.from(e)})),"Array",{from:function(e){var n,t,i,l,p=a(e),d="function"==typeof this?this:Array,m=arguments.length,h=m>1?arguments[1]:void 0,y=void 0!==h,g=0,v=f(p);if(y&&(h=r(h,m>2?arguments[2]:void 0,2)),null==v||d==Array&&s(v))for(t=new d(n=u(p.length));n>g;g++)c(t,g,y?h(p[g],g):p[g]);else for(l=v.call(p),t=new d;!(i=l.next()).done;g++)c(t,g,y?o(l,h,[i.value,g],!0):i.value);return t.length=g,t}})},function(e,n,t){"use strict";var r=t(0),i=t(89);r(r.S+r.F*t(4)((function(){function e(){}return!(Array.of.call(e)instanceof e)})),"Array",{of:function(){for(var e=0,n=arguments.length,t=new("function"==typeof this?this:Array)(n);n>e;)i(t,e,arguments[e++]);return t.length=n,t}})},function(e,n,t){"use strict";var r=t(0),i=t(18),a=[].join;r(r.P+r.F*(t(54)!=Object||!t(25)(a)),"Array",{join:function(e){return a.call(i(this),void 0===e?",":e)}})},function(e,n,t){"use strict";var r=t(0),i=t(77),a=t(23),o=t(39),s=t(7),u=[].slice;r(r.P+r.F*t(4)((function(){i&&u.call(i)})),"Array",{slice:function(e,n){var t=s(this.length),r=a(this);if(n=void 0===n?t:n,"Array"==r)return u.call(this,e,n);for(var i=o(e,t),c=o(n,t),f=s(c-i),l=new Array(f),p=0;p<f;p++)l[p]="String"==r?this.charAt(i+p):this[i+p];return l}})},function(e,n,t){"use strict";var r=t(0),i=t(11),a=t(10),o=t(4),s=[].sort,u=[1,2,3];r(r.P+r.F*(o((function(){u.sort(void 0)}))||!o((function(){u.sort(null)}))||!t(25)(s)),"Array",{sort:function(e){return void 0===e?s.call(a(this)):s.call(a(this),i(e))}})},function(e,n,t){"use strict";var r=t(0),i=t(29)(0),a=t(25)([].forEach,!0);r(r.P+r.F*!a,"Array",{forEach:function(e){return i(this,e,arguments[1])}})},function(e,n,t){var r=t(5),i=t(60),a=t(6)("species");e.exports=function(e){var n;return i(e)&&("function"!=typeof(n=e.constructor)||n!==Array&&!i(n.prototype)||(n=void 0),r(n)&&null===(n=n[a])&&(n=void 0)),void 0===n?Array:n}},function(e,n,t){"use strict";var r=t(0),i=t(29)(1);r(r.P+r.F*!t(25)([].map,!0),"Array",{map:function(e){return i(this,e,arguments[1])}})},function(e,n,t){"use strict";var r=t(0),i=t(29)(2);r(r.P+r.F*!t(25)([].filter,!0),"Array",{filter:function(e){return i(this,e,arguments[1])}})},function(e,n,t){"use strict";var r=t(0),i=t(29)(3);r(r.P+r.F*!t(25)([].some,!0),"Array",{some:function(e){return i(this,e,arguments[1])}})},function(e,n,t){"use strict";var r=t(0),i=t(29)(4);r(r.P+r.F*!t(25)([].every,!0),"Array",{every:function(e){return i(this,e,arguments[1])}})},function(e,n,t){"use strict";var r=t(0),i=t(119);r(r.P+r.F*!t(25)([].reduce,!0),"Array",{reduce:function(e){return i(this,e,arguments.length,arguments[1],!1)}})},function(e,n,t){"use strict";var r=t(0),i=t(119);r(r.P+r.F*!t(25)([].reduceRight,!0),"Array",{reduceRight:function(e){return i(this,e,arguments.length,arguments[1],!0)}})},function(e,n,t){"use strict";var r=t(0),i=t(58)(!1),a=[].indexOf,o=!!a&&1/[1].indexOf(1,-0)<0;r(r.P+r.F*(o||!t(25)(a)),"Array",{indexOf:function(e){return o?a.apply(this,arguments)||0:i(this,e,arguments[1])}})},function(e,n,t){"use strict";var r=t(0),i=t(18),a=t(24),o=t(7),s=[].lastIndexOf,u=!!s&&1/[1].lastIndexOf(1,-0)<0;r(r.P+r.F*(u||!t(25)(s)),"Array",{lastIndexOf:function(e){if(u)return s.apply(this,arguments)||0;var n=i(this),t=o(n.length),r=t-1;for(arguments.length>1&&(r=Math.min(r,a(arguments[1]))),r<0&&(r=t+r);r>=0;r--)if(r in n&&n[r]===e)return r||0;return-1}})},function(e,n,t){var r=t(0);r(r.P,"Array",{copyWithin:t(120)}),t(35)("copyWithin")},function(e,n,t){var r=t(0);r(r.P,"Array",{fill:t(92)}),t(35)("fill")},function(e,n,t){"use strict";var r=t(0),i=t(29)(5),a=!0;"find"in[]&&Array(1).find((function(){a=!1})),r(r.P+r.F*a,"Array",{find:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),t(35)("find")},function(e,n,t){"use strict";var r=t(0),i=t(29)(6),a="findIndex",o=!0;a in[]&&Array(1)[a]((function(){o=!1})),r(r.P+r.F*o,"Array",{findIndex:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),t(35)(a)},function(e,n,t){t(42)("Array")},function(e,n,t){var r=t(3),i=t(80),a=t(9).f,o=t(41).f,s=t(62),u=t(56),c=r.RegExp,f=c,l=c.prototype,p=/a/g,d=/a/g,m=new c(p)!==p;if(t(8)&&(!m||t(4)((function(){return d[t(6)("match")]=!1,c(p)!=p||c(d)==d||"/a/i"!=c(p,"i")})))){c=function(e,n){var t=this instanceof c,r=s(e),a=void 0===n;return!t&&r&&e.constructor===c&&a?e:i(m?new f(r&&!a?e.source:e,n):f((r=e instanceof c)?e.source:e,r&&a?u.call(e):n),t?this:l,c)};for(var h=function(e){e in c||a(c,e,{configurable:!0,get:function(){return f[e]},set:function(n){f[e]=n}})},y=o(f),g=0;y.length>g;)h(y[g++]);l.constructor=c,c.prototype=l,t(14)(r,"RegExp",c)}t(42)("RegExp")},function(e,n,t){"use strict";t(123);var r=t(2),i=t(56),a=t(8),o=/./.toString,s=function(e){t(14)(RegExp.prototype,"toString",e,!0)};t(4)((function(){return"/a/b"!=o.call({source:"a",flags:"b"})}))?s((function(){var e=r(this);return"/".concat(e.source,"/","flags"in e?e.flags:!a&&e instanceof RegExp?i.call(e):void 0)})):"toString"!=o.name&&s((function(){return o.call(this)}))},function(e,n,t){"use strict";var r=t(2),i=t(7),a=t(95),o=t(64);t(65)("match",1,(function(e,n,t,s){return[function(t){var r=e(this),i=null==t?void 0:t[n];return void 0!==i?i.call(t,r):new RegExp(t)[n](String(r))},function(e){var n=s(t,e,this);if(n.done)return n.value;var u=r(e),c=String(this);if(!u.global)return o(u,c);var f=u.unicode;u.lastIndex=0;for(var l,p=[],d=0;null!==(l=o(u,c));){var m=String(l[0]);p[d]=m,""===m&&(u.lastIndex=a(c,i(u.lastIndex),f)),d++}return 0===d?null:p}]}))},function(e,n,t){"use strict";var r=t(2),i=t(10),a=t(7),o=t(24),s=t(95),u=t(64),c=Math.max,f=Math.min,l=Math.floor,p=/\$([$&`']|\d\d?|<[^>]*>)/g,d=/\$([$&`']|\d\d?)/g;t(65)("replace",2,(function(e,n,t,m){return[function(r,i){var a=e(this),o=null==r?void 0:r[n];return void 0!==o?o.call(r,a,i):t.call(String(a),r,i)},function(e,n){var i=m(t,e,this,n);if(i.done)return i.value;var l=r(e),p=String(this),d="function"==typeof n;d||(n=String(n));var y=l.global;if(y){var g=l.unicode;l.lastIndex=0}for(var v=[];;){var x=u(l,p);if(null===x)break;if(v.push(x),!y)break;""===String(x[0])&&(l.lastIndex=s(p,a(l.lastIndex),g))}for(var b,w="",N=0,S=0;S<v.length;S++){x=v[S];for(var M=String(x[0]),D=c(f(o(x.index),p.length),0),E=[],A=1;A<x.length;A++)E.push(void 0===(b=x[A])?b:String(b));var _=x.groups;if(d){var O=[M].concat(E,D,p);void 0!==_&&O.push(_);var C=String(n.apply(void 0,O))}else C=h(M,p,D,E,_,n);D>=N&&(w+=p.slice(N,D)+C,N=D+M.length)}return w+p.slice(N)}];function h(e,n,r,a,o,s){var u=r+e.length,c=a.length,f=d;return void 0!==o&&(o=i(o),f=p),t.call(s,f,(function(t,i){var s;switch(i.charAt(0)){case"$":return"$";case"&":return e;case"`":return n.slice(0,r);case"'":return n.slice(u);case"<":s=o[i.slice(1,-1)];break;default:var f=+i;if(0===f)return t;if(f>c){var p=l(f/10);return 0===p?t:p<=c?void 0===a[p-1]?i.charAt(1):a[p-1]+i.charAt(1):t}s=a[f-1]}return void 0===s?"":s}))}}))},function(e,n,t){"use strict";var r=t(2),i=t(109),a=t(64);t(65)("search",1,(function(e,n,t,o){return[function(t){var r=e(this),i=null==t?void 0:t[n];return void 0!==i?i.call(t,r):new RegExp(t)[n](String(r))},function(e){var n=o(t,e,this);if(n.done)return n.value;var s=r(e),u=String(this),c=s.lastIndex;i(c,0)||(s.lastIndex=0);var f=a(s,u);return i(s.lastIndex,c)||(s.lastIndex=c),null===f?-1:f.index}]}))},function(e,n,t){"use strict";var r=t(62),i=t(2),a=t(57),o=t(95),s=t(7),u=t(64),c=t(94),f=t(4),l=Math.min,p=[].push,d="length",m=!f((function(){RegExp(4294967295,"y")}));t(65)("split",2,(function(e,n,t,f){var h;return h="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1)[d]||2!="ab".split(/(?:ab)*/)[d]||4!=".".split(/(.?)(.?)/)[d]||".".split(/()()/)[d]>1||"".split(/.?/)[d]?function(e,n){var i=String(this);if(void 0===e&&0===n)return[];if(!r(e))return t.call(i,e,n);for(var a,o,s,u=[],f=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),l=0,m=void 0===n?4294967295:n>>>0,h=new RegExp(e.source,f+"g");(a=c.call(h,i))&&!((o=h.lastIndex)>l&&(u.push(i.slice(l,a.index)),a[d]>1&&a.index<i[d]&&p.apply(u,a.slice(1)),s=a[0][d],l=o,u[d]>=m));)h.lastIndex===a.index&&h.lastIndex++;return l===i[d]?!s&&h.test("")||u.push(""):u.push(i.slice(l)),u[d]>m?u.slice(0,m):u}:"0".split(void 0,0)[d]?function(e,n){return void 0===e&&0===n?[]:t.call(this,e,n)}:t,[function(t,r){var i=e(this),a=null==t?void 0:t[n];return void 0!==a?a.call(t,i,r):h.call(String(i),t,r)},function(e,n){var r=f(h,e,this,n,h!==t);if(r.done)return r.value;var c=i(e),p=String(this),d=a(c,RegExp),y=c.unicode,g=(c.ignoreCase?"i":"")+(c.multiline?"m":"")+(c.unicode?"u":"")+(m?"y":"g"),v=new d(m?c:"^(?:"+c.source+")",g),x=void 0===n?4294967295:n>>>0;if(0===x)return[];if(0===p.length)return null===u(v,p)?[p]:[];for(var b=0,w=0,N=[];w<p.length;){v.lastIndex=m?w:0;var S,M=u(v,m?p:p.slice(w));if(null===M||(S=l(s(v.lastIndex+(m?0:w)),p.length))===b)w=o(p,w,y);else{if(N.push(p.slice(b,w)),N.length===x)return N;for(var D=1;D<=M.length-1;D++)if(N.push(M[D]),N.length===x)return N;w=b=S}}return N.push(p.slice(b)),N}]}))},function(e,n,t){"use strict";var r,i,a,o,s=t(33),u=t(3),c=t(22),f=t(50),l=t(0),p=t(5),d=t(11),m=t(43),h=t(44),y=t(57),g=t(96).set,v=t(97)(),x=t(98),b=t(124),w=t(66),N=t(125),S=u.TypeError,M=u.process,D=M&&M.versions,E=D&&D.v8||"",A=u.Promise,_="process"==f(M),O=function(){},C=i=x.f,T=!!function(){try{var e=A.resolve(1),n=(e.constructor={})[t(6)("species")]=function(e){e(O,O)};return(_||"function"==typeof PromiseRejectionEvent)&&e.then(O)instanceof n&&0!==E.indexOf("6.6")&&-1===w.indexOf("Chrome/66")}catch(e){}}(),I=function(e){var n;return!(!p(e)||"function"!=typeof(n=e.then))&&n},k=function(e,n){if(!e._n){e._n=!0;var t=e._c;v((function(){for(var r=e._v,i=1==e._s,a=0,o=function(n){var t,a,o,s=i?n.ok:n.fail,u=n.resolve,c=n.reject,f=n.domain;try{s?(i||(2==e._h&&R(e),e._h=1),!0===s?t=r:(f&&f.enter(),t=s(r),f&&(f.exit(),o=!0)),t===n.promise?c(S("Promise-chain cycle")):(a=I(t))?a.call(t,u,c):u(t)):c(r)}catch(e){f&&!o&&f.exit(),c(e)}};t.length>a;)o(t[a++]);e._c=[],e._n=!1,n&&!e._h&&B(e)}))}},B=function(e){g.call(u,(function(){var n,t,r,i=e._v,a=q(e);if(a&&(n=b((function(){_?M.emit("unhandledRejection",i,e):(t=u.onunhandledrejection)?t({promise:e,reason:i}):(r=u.console)&&r.error&&r.error("Unhandled promise rejection",i)})),e._h=_||q(e)?2:1),e._a=void 0,a&&n.e)throw n.v}))},q=function(e){return 1!==e._h&&0===(e._a||e._c).length},R=function(e){g.call(u,(function(){var n;_?M.emit("rejectionHandled",e):(n=u.onrejectionhandled)&&n({promise:e,reason:e._v})}))},P=function(e){var n=this;n._d||(n._d=!0,(n=n._w||n)._v=e,n._s=2,n._a||(n._a=n._c.slice()),k(n,!0))},z=function(e){var n,t=this;if(!t._d){t._d=!0,t=t._w||t;try{if(t===e)throw S("Promise can't be resolved itself");(n=I(e))?v((function(){var r={_w:t,_d:!1};try{n.call(e,c(z,r,1),c(P,r,1))}catch(e){P.call(r,e)}})):(t._v=e,t._s=1,k(t,!1))}catch(e){P.call({_w:t,_d:!1},e)}}};T||(A=function(e){m(this,A,"Promise","_h"),d(e),r.call(this);try{e(c(z,this,1),c(P,this,1))}catch(e){P.call(this,e)}},(r=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=t(45)(A.prototype,{then:function(e,n){var t=C(y(this,A));return t.ok="function"!=typeof e||e,t.fail="function"==typeof n&&n,t.domain=_?M.domain:void 0,this._c.push(t),this._a&&this._a.push(t),this._s&&k(this,!1),t.promise},catch:function(e){return this.then(void 0,e)}}),a=function(){var e=new r;this.promise=e,this.resolve=c(z,e,1),this.reject=c(P,e,1)},x.f=C=function(e){return e===A||e===o?new a(e):i(e)}),l(l.G+l.W+l.F*!T,{Promise:A}),t(49)(A,"Promise"),t(42)("Promise"),o=t(21).Promise,l(l.S+l.F*!T,"Promise",{reject:function(e){var n=C(this);return(0,n.reject)(e),n.promise}}),l(l.S+l.F*(s||!T),"Promise",{resolve:function(e){return N(s&&this===o?A:this,e)}}),l(l.S+l.F*!(T&&t(63)((function(e){A.all(e).catch(O)}))),"Promise",{all:function(e){var n=this,t=C(n),r=t.resolve,i=t.reject,a=b((function(){var t=[],a=0,o=1;h(e,!1,(function(e){var s=a++,u=!1;t.push(void 0),o++,n.resolve(e).then((function(e){u||(u=!0,t[s]=e,--o||r(t))}),i)})),--o||r(t)}));return a.e&&i(a.v),t.promise},race:function(e){var n=this,t=C(n),r=t.reject,i=b((function(){h(e,!1,(function(e){n.resolve(e).then(t.resolve,r)}))}));return i.e&&r(i.v),t.promise}})},function(e,n,t){"use strict";var r=t(130),i=t(46);t(67)("WeakSet",(function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}}),{add:function(e){return r.def(i(this,"WeakSet"),e,!0)}},r,!1,!0)},function(e,n,t){"use strict";var r=t(0),i=t(68),a=t(99),o=t(2),s=t(39),u=t(7),c=t(5),f=t(3).ArrayBuffer,l=t(57),p=a.ArrayBuffer,d=a.DataView,m=i.ABV&&f.isView,h=p.prototype.slice,y=i.VIEW;r(r.G+r.W+r.F*(f!==p),{ArrayBuffer:p}),r(r.S+r.F*!i.CONSTR,"ArrayBuffer",{isView:function(e){return m&&m(e)||c(e)&&y in e}}),r(r.P+r.U+r.F*t(4)((function(){return!new p(2).slice(1,void 0).byteLength})),"ArrayBuffer",{slice:function(e,n){if(void 0!==h&&void 0===n)return h.call(o(this),e);for(var t=o(this).byteLength,r=s(e,t),i=s(void 0===n?t:n,t),a=new(l(this,p))(u(i-r)),c=new d(this),f=new d(a),m=0;r<i;)f.setUint8(m++,c.getUint8(r++));return a}}),t(42)("ArrayBuffer")},function(e,n,t){var r=t(0);r(r.G+r.W+r.F*!t(68).ABV,{DataView:t(99).DataView})},function(e,n,t){t(30)("Int8",1,(function(e){return function(n,t,r){return e(this,n,t,r)}}))},function(e,n,t){t(30)("Uint8",1,(function(e){return function(n,t,r){return e(this,n,t,r)}}))},function(e,n,t){t(30)("Uint8",1,(function(e){return function(n,t,r){return e(this,n,t,r)}}),!0)},function(e,n,t){t(30)("Int16",2,(function(e){return function(n,t,r){return e(this,n,t,r)}}))},function(e,n,t){t(30)("Uint16",2,(function(e){return function(n,t,r){return e(this,n,t,r)}}))},function(e,n,t){t(30)("Int32",4,(function(e){return function(n,t,r){return e(this,n,t,r)}}))},function(e,n,t){t(30)("Uint32",4,(function(e){return function(n,t,r){return e(this,n,t,r)}}))},function(e,n,t){t(30)("Float32",4,(function(e){return function(n,t,r){return e(this,n,t,r)}}))},function(e,n,t){t(30)("Float64",8,(function(e){return function(n,t,r){return e(this,n,t,r)}}))},function(e,n,t){var r=t(0),i=t(11),a=t(2),o=(t(3).Reflect||{}).apply,s=Function.apply;r(r.S+r.F*!t(4)((function(){o((function(){}))})),"Reflect",{apply:function(e,n,t){var r=i(e),u=a(t);return o?o(r,n,u):s.call(r,n,u)}})},function(e,n,t){var r=t(0),i=t(40),a=t(11),o=t(2),s=t(5),u=t(4),c=t(110),f=(t(3).Reflect||{}).construct,l=u((function(){function e(){}return!(f((function(){}),[],e)instanceof e)})),p=!u((function(){f((function(){}))}));r(r.S+r.F*(l||p),"Reflect",{construct:function(e,n){a(e),o(n);var t=arguments.length<3?e:a(arguments[2]);if(p&&!l)return f(e,n,t);if(e==t){switch(n.length){case 0:return new e;case 1:return new e(n[0]);case 2:return new e(n[0],n[1]);case 3:return new e(n[0],n[1],n[2]);case 4:return new e(n[0],n[1],n[2],n[3])}var r=[null];return r.push.apply(r,n),new(c.apply(e,r))}var u=t.prototype,d=i(s(u)?u:Object.prototype),m=Function.apply.call(e,d,n);return s(m)?m:d}})},function(e,n,t){var r=t(9),i=t(0),a=t(2),o=t(26);i(i.S+i.F*t(4)((function(){Reflect.defineProperty(r.f({},1,{value:1}),1,{value:2})})),"Reflect",{defineProperty:function(e,n,t){a(e),n=o(n,!0),a(t);try{return r.f(e,n,t),!0}catch(e){return!1}}})},function(e,n,t){var r=t(0),i=t(19).f,a=t(2);r(r.S,"Reflect",{deleteProperty:function(e,n){var t=i(a(e),n);return!(t&&!t.configurable)&&delete e[n]}})},function(e,n,t){"use strict";var r=t(0),i=t(2),a=function(e){this._t=i(e),this._i=0;var n,t=this._k=[];for(n in e)t.push(n)};t(85)(a,"Object",(function(){var e,n=this._k;do{if(this._i>=n.length)return{value:void 0,done:!0}}while(!((e=n[this._i++])in this._t));return{value:e,done:!1}})),r(r.S,"Reflect",{enumerate:function(e){return new a(e)}})},function(e,n,t){var r=t(19),i=t(20),a=t(17),o=t(0),s=t(5),u=t(2);o(o.S,"Reflect",{get:function e(n,t){var o,c,f=arguments.length<3?n:arguments[2];return u(n)===f?n[t]:(o=r.f(n,t))?a(o,"value")?o.value:void 0!==o.get?o.get.call(f):void 0:s(c=i(n))?e(c,t,f):void 0}})},function(e,n,t){var r=t(19),i=t(0),a=t(2);i(i.S,"Reflect",{getOwnPropertyDescriptor:function(e,n){return r.f(a(e),n)}})},function(e,n,t){var r=t(0),i=t(20),a=t(2);r(r.S,"Reflect",{getPrototypeOf:function(e){return i(a(e))}})},function(e,n,t){var r=t(0);r(r.S,"Reflect",{has:function(e,n){return n in e}})},function(e,n,t){var r=t(0),i=t(2),a=Object.isExtensible;r(r.S,"Reflect",{isExtensible:function(e){return i(e),!a||a(e)}})},function(e,n,t){var r=t(0);r(r.S,"Reflect",{ownKeys:t(132)})},function(e,n,t){var r=t(0),i=t(2),a=Object.preventExtensions;r(r.S,"Reflect",{preventExtensions:function(e){i(e);try{return a&&a(e),!0}catch(e){return!1}}})},function(e,n,t){var r=t(9),i=t(19),a=t(20),o=t(17),s=t(0),u=t(36),c=t(2),f=t(5);s(s.S,"Reflect",{set:function e(n,t,s){var l,p,d=arguments.length<4?n:arguments[3],m=i.f(c(n),t);if(!m){if(f(p=a(n)))return e(p,t,s,d);m=u(0)}if(o(m,"value")){if(!1===m.writable||!f(d))return!1;if(l=i.f(d,t)){if(l.get||l.set||!1===l.writable)return!1;l.value=s,r.f(d,t,l)}else r.f(d,t,u(0,s));return!0}return void 0!==m.set&&(m.set.call(d,s),!0)}})},function(e,n,t){var r=t(0),i=t(78);i&&r(r.S,"Reflect",{setPrototypeOf:function(e,n){i.check(e,n);try{return i.set(e,n),!0}catch(e){return!1}}})},function(e,n,t){"use strict";var r=t(0),i=t(58)(!0);r(r.P,"Array",{includes:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),t(35)("includes")},function(e,n,t){"use strict";var r=t(0),i=t(133),a=t(10),o=t(7),s=t(11),u=t(91);r(r.P,"Array",{flatMap:function(e){var n,t,r=a(this);return s(e),n=o(r.length),t=u(r,0),i(t,r,r,n,0,1,e,arguments[1]),t}}),t(35)("flatMap")},function(e,n,t){"use strict";var r=t(0),i=t(133),a=t(10),o=t(7),s=t(24),u=t(91);r(r.P,"Array",{flatten:function(){var e=arguments[0],n=a(this),t=o(n.length),r=u(n,0);return i(r,n,n,t,0,void 0===e?1:s(e)),r}}),t(35)("flatten")},function(e,n,t){"use strict";var r=t(0),i=t(61)(!0);r(r.P,"String",{at:function(e){return i(this,e)}})},function(e,n,t){"use strict";var r=t(0),i=t(134),a=t(66),o=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(a);r(r.P+r.F*o,"String",{padStart:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0,!0)}})},function(e,n,t){"use strict";var r=t(0),i=t(134),a=t(66),o=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(a);r(r.P+r.F*o,"String",{padEnd:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0,!1)}})},function(e,n,t){"use strict";t(51)("trimLeft",(function(e){return function(){return e(this,1)}}),"trimStart")},function(e,n,t){"use strict";t(51)("trimRight",(function(e){return function(){return e(this,2)}}),"trimEnd")},function(e,n,t){"use strict";var r=t(0),i=t(27),a=t(7),o=t(62),s=t(56),u=RegExp.prototype,c=function(e,n){this._r=e,this._s=n};t(85)(c,"RegExp String",(function(){var e=this._r.exec(this._s);return{value:e,done:null===e}})),r(r.P,"String",{matchAll:function(e){if(i(this),!o(e))throw TypeError(e+" is not a regexp!");var n=String(this),t="flags"in u?String(e.flags):s.call(e),r=new RegExp(e.source,~t.indexOf("g")?t:"g"+t);return r.lastIndex=a(e.lastIndex),new c(r,n)}})},function(e,n,t){t(74)("asyncIterator")},function(e,n,t){t(74)("observable")},function(e,n,t){var r=t(0),i=t(132),a=t(18),o=t(19),s=t(89);r(r.S,"Object",{getOwnPropertyDescriptors:function(e){for(var n,t,r=a(e),u=o.f,c=i(r),f={},l=0;c.length>l;)void 0!==(t=u(r,n=c[l++]))&&s(f,n,t);return f}})},function(e,n,t){var r=t(0),i=t(135)(!1);r(r.S,"Object",{values:function(e){return i(e)}})},function(e,n,t){var r=t(0),i=t(135)(!0);r(r.S,"Object",{entries:function(e){return i(e)}})},function(e,n,t){"use strict";var r=t(0),i=t(10),a=t(11),o=t(9);t(8)&&r(r.P+t(69),"Object",{__defineGetter__:function(e,n){o.f(i(this),e,{get:a(n),enumerable:!0,configurable:!0})}})},function(e,n,t){"use strict";var r=t(0),i=t(10),a=t(11),o=t(9);t(8)&&r(r.P+t(69),"Object",{__defineSetter__:function(e,n){o.f(i(this),e,{set:a(n),enumerable:!0,configurable:!0})}})},function(e,n,t){"use strict";var r=t(0),i=t(10),a=t(26),o=t(20),s=t(19).f;t(8)&&r(r.P+t(69),"Object",{__lookupGetter__:function(e){var n,t=i(this),r=a(e,!0);do{if(n=s(t,r))return n.get}while(t=o(t))}})},function(e,n,t){"use strict";var r=t(0),i=t(10),a=t(26),o=t(20),s=t(19).f;t(8)&&r(r.P+t(69),"Object",{__lookupSetter__:function(e){var n,t=i(this),r=a(e,!0);do{if(n=s(t,r))return n.set}while(t=o(t))}})},function(e,n,t){var r=t(0);r(r.P+r.R,"Map",{toJSON:t(136)("Map")})},function(e,n,t){var r=t(0);r(r.P+r.R,"Set",{toJSON:t(136)("Set")})},function(e,n,t){t(70)("Map")},function(e,n,t){t(70)("Set")},function(e,n,t){t(70)("WeakMap")},function(e,n,t){t(70)("WeakSet")},function(e,n,t){t(71)("Map")},function(e,n,t){t(71)("Set")},function(e,n,t){t(71)("WeakMap")},function(e,n,t){t(71)("WeakSet")},function(e,n,t){var r=t(0);r(r.G,{global:t(3)})},function(e,n,t){var r=t(0);r(r.S,"System",{global:t(3)})},function(e,n,t){var r=t(0),i=t(23);r(r.S,"Error",{isError:function(e){return"Error"===i(e)}})},function(e,n,t){var r=t(0);r(r.S,"Math",{clamp:function(e,n,t){return Math.min(t,Math.max(n,e))}})},function(e,n,t){var r=t(0);r(r.S,"Math",{DEG_PER_RAD:Math.PI/180})},function(e,n,t){var r=t(0),i=180/Math.PI;r(r.S,"Math",{degrees:function(e){return e*i}})},function(e,n,t){var r=t(0),i=t(138),a=t(117);r(r.S,"Math",{fscale:function(e,n,t,r,o){return a(i(e,n,t,r,o))}})},function(e,n,t){var r=t(0);r(r.S,"Math",{iaddh:function(e,n,t,r){var i=e>>>0,a=t>>>0;return(n>>>0)+(r>>>0)+((i&a|(i|a)&~(i+a>>>0))>>>31)|0}})},function(e,n,t){var r=t(0);r(r.S,"Math",{isubh:function(e,n,t,r){var i=e>>>0,a=t>>>0;return(n>>>0)-(r>>>0)-((~i&a|~(i^a)&i-a>>>0)>>>31)|0}})},function(e,n,t){var r=t(0);r(r.S,"Math",{imulh:function(e,n){var t=+e,r=+n,i=65535&t,a=65535&r,o=t>>16,s=r>>16,u=(o*a>>>0)+(i*a>>>16);return o*s+(u>>16)+((i*s>>>0)+(65535&u)>>16)}})},function(e,n,t){var r=t(0);r(r.S,"Math",{RAD_PER_DEG:180/Math.PI})},function(e,n,t){var r=t(0),i=Math.PI/180;r(r.S,"Math",{radians:function(e){return e*i}})},function(e,n,t){var r=t(0);r(r.S,"Math",{scale:t(138)})},function(e,n,t){var r=t(0);r(r.S,"Math",{umulh:function(e,n){var t=+e,r=+n,i=65535&t,a=65535&r,o=t>>>16,s=r>>>16,u=(o*a>>>0)+(i*a>>>16);return o*s+(u>>>16)+((i*s>>>0)+(65535&u)>>>16)}})},function(e,n,t){var r=t(0);r(r.S,"Math",{signbit:function(e){return(e=+e)!=e?e:0==e?1/e==1/0:e>0}})},function(e,n,t){"use strict";var r=t(0),i=t(21),a=t(3),o=t(57),s=t(125);r(r.P+r.R,"Promise",{finally:function(e){var n=o(this,i.Promise||a.Promise),t="function"==typeof e;return this.then(t?function(t){return s(n,e()).then((function(){return t}))}:e,t?function(t){return s(n,e()).then((function(){throw t}))}:e)}})},function(e,n,t){"use strict";var r=t(0),i=t(98),a=t(124);r(r.S,"Promise",{try:function(e){var n=i.f(this),t=a(e);return(t.e?n.reject:n.resolve)(t.v),n.promise}})},function(e,n,t){var r=t(31),i=t(2),a=r.key,o=r.set;r.exp({defineMetadata:function(e,n,t,r){o(e,n,i(t),a(r))}})},function(e,n,t){var r=t(31),i=t(2),a=r.key,o=r.map,s=r.store;r.exp({deleteMetadata:function(e,n){var t=arguments.length<3?void 0:a(arguments[2]),r=o(i(n),t,!1);if(void 0===r||!r.delete(e))return!1;if(r.size)return!0;var u=s.get(n);return u.delete(t),!!u.size||s.delete(n)}})},function(e,n,t){var r=t(31),i=t(2),a=t(20),o=r.has,s=r.get,u=r.key,c=function(e,n,t){if(o(e,n,t))return s(e,n,t);var r=a(n);return null!==r?c(e,r,t):void 0};r.exp({getMetadata:function(e,n){return c(e,i(n),arguments.length<3?void 0:u(arguments[2]))}})},function(e,n,t){var r=t(128),i=t(137),a=t(31),o=t(2),s=t(20),u=a.keys,c=a.key,f=function(e,n){var t=u(e,n),a=s(e);if(null===a)return t;var o=f(a,n);return o.length?t.length?i(new r(t.concat(o))):o:t};a.exp({getMetadataKeys:function(e){return f(o(e),arguments.length<2?void 0:c(arguments[1]))}})},function(e,n,t){var r=t(31),i=t(2),a=r.get,o=r.key;r.exp({getOwnMetadata:function(e,n){return a(e,i(n),arguments.length<3?void 0:o(arguments[2]))}})},function(e,n,t){var r=t(31),i=t(2),a=r.keys,o=r.key;r.exp({getOwnMetadataKeys:function(e){return a(i(e),arguments.length<2?void 0:o(arguments[1]))}})},function(e,n,t){var r=t(31),i=t(2),a=t(20),o=r.has,s=r.key,u=function(e,n,t){if(o(e,n,t))return!0;var r=a(n);return null!==r&&u(e,r,t)};r.exp({hasMetadata:function(e,n){return u(e,i(n),arguments.length<3?void 0:s(arguments[2]))}})},function(e,n,t){var r=t(31),i=t(2),a=r.has,o=r.key;r.exp({hasOwnMetadata:function(e,n){return a(e,i(n),arguments.length<3?void 0:o(arguments[2]))}})},function(e,n,t){var r=t(31),i=t(2),a=t(11),o=r.key,s=r.set;r.exp({metadata:function(e,n){return function(t,r){s(e,n,(void 0!==r?i:a)(t),o(r))}}})},function(e,n,t){var r=t(0),i=t(97)(),a=t(3).process,o="process"==t(23)(a);r(r.G,{asap:function(e){var n=o&&a.domain;i(n?n.bind(e):e)}})},function(e,n,t){"use strict";var r=t(0),i=t(3),a=t(21),o=t(97)(),s=t(6)("observable"),u=t(11),c=t(2),f=t(43),l=t(45),p=t(13),d=t(44),m=d.RETURN,h=function(e){return null==e?void 0:u(e)},y=function(e){var n=e._c;n&&(e._c=void 0,n())},g=function(e){return void 0===e._o},v=function(e){g(e)||(e._o=void 0,y(e))},x=function(e,n){c(e),this._c=void 0,this._o=e,e=new b(this);try{var t=n(e),r=t;null!=t&&("function"==typeof t.unsubscribe?t=function(){r.unsubscribe()}:u(t),this._c=t)}catch(n){return void e.error(n)}g(this)&&y(this)};x.prototype=l({},{unsubscribe:function(){v(this)}});var b=function(e){this._s=e};b.prototype=l({},{next:function(e){var n=this._s;if(!g(n)){var t=n._o;try{var r=h(t.next);if(r)return r.call(t,e)}catch(e){try{v(n)}finally{throw e}}}},error:function(e){var n=this._s;if(g(n))throw e;var t=n._o;n._o=void 0;try{var r=h(t.error);if(!r)throw e;e=r.call(t,e)}catch(e){try{y(n)}finally{throw e}}return y(n),e},complete:function(e){var n=this._s;if(!g(n)){var t=n._o;n._o=void 0;try{var r=h(t.complete);e=r?r.call(t,e):void 0}catch(e){try{y(n)}finally{throw e}}return y(n),e}}});var w=function(e){f(this,w,"Observable","_f")._f=u(e)};l(w.prototype,{subscribe:function(e){return new x(e,this._f)},forEach:function(e){var n=this;return new(a.Promise||i.Promise)((function(t,r){u(e);var i=n.subscribe({next:function(n){try{return e(n)}catch(e){r(e),i.unsubscribe()}},error:r,complete:t})}))}}),l(w,{from:function(e){var n="function"==typeof this?this:w,t=h(c(e)[s]);if(t){var r=c(t.call(e));return r.constructor===n?r:new n((function(e){return r.subscribe(e)}))}return new n((function(n){var t=!1;return o((function(){if(!t){try{if(d(e,!1,(function(e){if(n.next(e),t)return m}))===m)return}catch(e){if(t)throw e;return void n.error(e)}n.complete()}})),function(){t=!0}}))},of:function(){for(var e=0,n=arguments.length,t=new Array(n);e<n;)t[e]=arguments[e++];return new("function"==typeof this?this:w)((function(e){var n=!1;return o((function(){if(!n){for(var r=0;r<t.length;++r)if(e.next(t[r]),n)return;e.complete()}})),function(){n=!0}}))}}),p(w.prototype,s,(function(){return this})),r(r.G,{Observable:w}),t(42)("Observable")},function(e,n,t){var r=t(3),i=t(0),a=t(66),o=[].slice,s=/MSIE .\./.test(a),u=function(e){return function(n,t){var r=arguments.length>2,i=!!r&&o.call(arguments,2);return e(r?function(){("function"==typeof n?n:Function(n)).apply(this,i)}:n,t)}};i(i.G+i.B+i.F*s,{setTimeout:u(r.setTimeout),setInterval:u(r.setInterval)})},function(e,n,t){var r=t(0),i=t(96);r(r.G+r.B,{setImmediate:i.set,clearImmediate:i.clear})},function(e,n,t){for(var r=t(93),i=t(38),a=t(14),o=t(3),s=t(13),u=t(52),c=t(6),f=c("iterator"),l=c("toStringTag"),p=u.Array,d={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},m=i(d),h=0;h<m.length;h++){var y,g=m[h],v=d[g],x=o[g],b=x&&x.prototype;if(b&&(b[f]||s(b,f,p),b[l]||s(b,l,g),u[g]=p,v))for(y in r)b[y]||a(b,y,r[y],!0)}},function(e,n,t){(function(n){!function(n){"use strict";var t=Object.prototype,r=t.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",o=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag",u="object"==typeof e,c=n.regeneratorRuntime;if(c)u&&(e.exports=c);else{(c=n.regeneratorRuntime=u?e.exports:{}).wrap=h;var f={},l={};l[a]=function(){return this};var p=Object.getPrototypeOf,d=p&&p(p(E([])));d&&d!==t&&r.call(d,a)&&(l=d);var m=x.prototype=g.prototype=Object.create(l);v.prototype=m.constructor=x,x.constructor=v,x[s]=v.displayName="GeneratorFunction",c.isGeneratorFunction=function(e){var n="function"==typeof e&&e.constructor;return!!n&&(n===v||"GeneratorFunction"===(n.displayName||n.name))},c.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,x):(e.__proto__=x,s in e||(e[s]="GeneratorFunction")),e.prototype=Object.create(m),e},c.awrap=function(e){return{__await:e}},b(w.prototype),w.prototype[o]=function(){return this},c.AsyncIterator=w,c.async=function(e,n,t,r){var i=new w(h(e,n,t,r));return c.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},b(m),m[s]="Generator",m[a]=function(){return this},m.toString=function(){return"[object Generator]"},c.keys=function(e){var n=[];for(var t in e)n.push(t);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},c.values=E,D.prototype={constructor:D,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(M),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function t(t,r){return o.type="throw",o.arg=e,n.next=t,r&&(n.method="next",n.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],o=a.completion;if("root"===a.tryLoc)return t("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(s&&u){if(this.prev<a.catchLoc)return t(a.catchLoc,!0);if(this.prev<a.finallyLoc)return t(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return t(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return t(a.finallyLoc)}}}},abrupt:function(e,n){for(var t=this.tryEntries.length-1;t>=0;--t){var i=this.tryEntries[t];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=n&&n<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=e,o.arg=n,a?(this.method="next",this.next=a.finallyLoc,f):this.complete(o)},complete:function(e,n){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&n&&(this.next=n),f},finish:function(e){for(var n=this.tryEntries.length-1;n>=0;--n){var t=this.tryEntries[n];if(t.finallyLoc===e)return this.complete(t.completion,t.afterLoc),M(t),f}},catch:function(e){for(var n=this.tryEntries.length-1;n>=0;--n){var t=this.tryEntries[n];if(t.tryLoc===e){var r=t.completion;if("throw"===r.type){var i=r.arg;M(t)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,t){return this.delegate={iterator:E(e),resultName:n,nextLoc:t},"next"===this.method&&(this.arg=void 0),f}}}function h(e,n,t,r){var i=n&&n.prototype instanceof g?n:g,a=Object.create(i.prototype),o=new D(r||[]);return a._invoke=function(e,n,t){var r="suspendedStart";return function(i,a){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw a;return A()}for(t.method=i,t.arg=a;;){var o=t.delegate;if(o){var s=N(o,t);if(s){if(s===f)continue;return s}}if("next"===t.method)t.sent=t._sent=t.arg;else if("throw"===t.method){if("suspendedStart"===r)throw r="completed",t.arg;t.dispatchException(t.arg)}else"return"===t.method&&t.abrupt("return",t.arg);r="executing";var u=y(e,n,t);if("normal"===u.type){if(r=t.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:t.done}}"throw"===u.type&&(r="completed",t.method="throw",t.arg=u.arg)}}}(e,t,o),a}function y(e,n,t){try{return{type:"normal",arg:e.call(n,t)}}catch(e){return{type:"throw",arg:e}}}function g(){}function v(){}function x(){}function b(e){["next","throw","return"].forEach((function(n){e[n]=function(e){return this._invoke(n,e)}}))}function w(e){function t(n,i,a,o){var s=y(e[n],e,i);if("throw"!==s.type){var u=s.arg,c=u.value;return c&&"object"==typeof c&&r.call(c,"__await")?Promise.resolve(c.__await).then((function(e){t("next",e,a,o)}),(function(e){t("throw",e,a,o)})):Promise.resolve(c).then((function(e){u.value=e,a(u)}),o)}o(s.arg)}var i;"object"==typeof n.process&&n.process.domain&&(t=n.process.domain.bind(t)),this._invoke=function(e,n){function r(){return new Promise((function(r,i){t(e,n,r,i)}))}return i=i?i.then(r,r):r()}}function N(e,n){var t=e.iterator[n.method];if(void 0===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=void 0,N(e,n),"throw"===n.method))return f;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var r=y(t,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,f;var i=r.arg;return i?i.done?(n[e.resultName]=i.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=void 0),n.delegate=null,f):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,f)}function S(e){var n={tryLoc:e[0]};1 in e&&(n.catchLoc=e[1]),2 in e&&(n.finallyLoc=e[2],n.afterLoc=e[3]),this.tryEntries.push(n)}function M(e){var n=e.completion||{};n.type="normal",delete n.arg,e.completion=n}function D(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function E(e){if(e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var t=-1,i=function n(){for(;++t<e.length;)if(r.call(e,t))return n.value=e[t],n.done=!1,n;return n.value=void 0,n.done=!0,n};return i.next=i}}return{next:A}}function A(){return{value:void 0,done:!0}}}("object"==typeof n?n:"object"==typeof window?window:"object"==typeof self?self:this)}).call(this,t(72))},function(e,n,t){t(354),e.exports=t(21).RegExp.escape},function(e,n,t){var r=t(0),i=t(355)(/[\\^$*+?.()|[\]{}]/g,"\\$&");r(r.S,"RegExp",{escape:function(e){return i(e)}})},function(e,n){e.exports=function(e,n){var t=n===Object(n)?function(e){return n[e]}:n;return function(n){return String(n).replace(e,t)}}},function(e,n,t){"use strict";var r=m(t(357)),i=m(t(374)),a=m(t(375)),o=m(t(377)),s=d(t(149)),u=d(t(378)),c=d(t(379)),f=d(t(380)),l=d(t(100)),p=t(32);function d(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t]);return n.default=e,n}function m(e){return e&&e.__esModule?e:{default:e}}function h(e){return function(){var n=e.apply(this,arguments);return new Promise((function(e,t){return function r(i,a){try{var o=n[i](a),s=o.value}catch(e){return void t(e)}if(!o.done)return Promise.resolve(s).then((function(e){r("next",e)}),(function(e){r("throw",e)}));e(s)}("next")}))}}var y,g={},v=(y=h(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=s.getInput())){e.next=17;break}return g.search=new r.default(n),s.clearInput(),s.clearResults(),(0,p.renderLoader)(p.elements.searchRes),l.clearError(),e.prev=7,e.next=10,g.search.getResults();case 10:(0,p.clearLoader)(),s.renderResults(g.search.result),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(7),(0,p.clearLoader)();case 17:case"end":return e.stop()}}),e,void 0,[[7,14]])}))),function(){return y.apply(this,arguments)});p.elements.searchForm.addEventListener("submit",(function(e){e.preventDefault(),v()})),p.elements.searchResPages.addEventListener("click",(function(e){var n=e.target.closest(".btn-inline");if(n){var t=parseInt(n.dataset.goto,10);s.clearResults(),s.renderResults(g.search.result,t)}}));var x,b=(x=h(regeneratorRuntime.mark((function e(){var n,t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=window.location.hash.replace("#",""),t=function(){return g.search.result.forEach((function(e){if(e.recipe_id=n)return!0})),!1},!n){e.next=19;break}return u.clearRecipe(),(0,p.renderLoader)(p.elements.recipe),g.search&&t()&&s.highlightSelected(n),g.recipe=new i.default(n),e.prev=7,e.next=10,g.recipe.getRecipe();case 10:g.recipe.parseIngredients(),g.recipe.calcServings(),g.recipe.calcTime(),(0,p.clearLoader)(),u.renderRecipe(g.recipe,g.likes.isLiked(n)),e.next=19;break;case 17:e.prev=17,e.t0=e.catch(7);case 19:case"end":return e.stop()}}),e,void 0,[[7,17]])}))),function(){return x.apply(this,arguments)});["hashchange","load"].forEach((function(e){return window.addEventListener(e,b)}));window.addEventListener("load",(function(){g.likes=new o.default,g.likes.readStorage(),f.toggleLikeMenu(g.likes.getNumberLikes()),g.likes.likes.forEach((function(e){return f.renderLike(e)}))})),window.addEventListener("load",(function(){g.list=new a.default,g.list.readStorage(),g.list.items.length>0&&c.renderDeleteAllItem(),g.list.items.forEach((function(e){return c.renderItem(e)}))})),p.elements.shopping.addEventListener("click",(function(e){var n=e.target.closest(".shopping__item").dataset.itemid;if(e.target.matches(".shopping__delete, .shopping__delete *"))g.list.deleteItem(n),c.deleteItem(n);else if(e.target.matches(".shopping__count-value")){var t=parseFloat(e.target.value,10);g.list.updateCount(n,t)}})),p.elements.shoppingHeading.addEventListener("click",(function(e){if(e.target.matches(".btn-delete-all")){g.list.deleteAllItem(),p.elements.shopping.innerHTML="";var n=document.querySelector(".btn-delete-all").parentElement;n&&n.parentElement.removeChild(n)}})),p.elements.recipe.addEventListener("click",(function(e){e.target.matches(".btn-decrease, .btn-decrease *")?g.recipe.servings>1&&(g.recipe.updateServing("dec"),u.updateServingsIngredients(g.recipe)):e.target.matches(".btn-increase, .btn-increase *")?(g.recipe.updateServing("inc"),u.updateServingsIngredients(g.recipe)):e.target.matches(".recipe__btn--add, .recipe__btn--add *")?(g.list||(g.list=new a.default),g.recipe.ingredients.forEach((function(e){var n=g.list.addItem(e.count,e.unit,e.ingredient);c.renderItem(n)})),g.list.isDeleteAllBtnHere()||c.renderDeleteAllItem()):e.target.matches(".recipe__love, .recipe__love *")&&function(){g.likes||(g.likes=new o.default);var e=g.recipe.id;if(g.likes.isLiked(e))g.likes.deleteLike(e),f.toggleLikeBtn(!1),f.deleteLike(e);else{var n=g.likes.addLike(e,g.recipe.title,g.recipe.author,g.recipe.img);f.toggleLikeBtn(!0),f.renderLike(n)}f.toggleLikeMenu(g.likes.getNumberLikes())}()}))},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,i=function(){function e(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(n,t,r){return t&&e(n.prototype,t),r&&e(n,r),n}}(),a=t(139),o=(r=a)&&r.__esModule?r:{default:r},s=function(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t]);return n.default=e,n}(t(100));var u=function(){function e(n){!function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,e),this.query=n}var n,t;return i(e,[{key:"getResults",value:(n=regeneratorRuntime.mark((function e(){var n,t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,n="https://forkify-api.herokuapp.com/api/search?q="+this.query,e.next=5,(0,o.default)(n);case 5:t=e.sent,this.result=t.data.recipes,e.next=12;break;case 9:e.prev=9,e.t0=e.catch(0),s.searchError(e.t0);case 12:case"end":return e.stop()}}),e,this,[[0,9]])})),t=function(){var e=n.apply(this,arguments);return new Promise((function(n,t){return function r(i,a){try{var o=e[i](a),s=o.value}catch(e){return void t(e)}if(!o.done)return Promise.resolve(s).then((function(e){r("next",e)}),(function(e){r("throw",e)}));n(s)}("next")}))},function(){return t.apply(this,arguments)})}]),e}();n.default=u},function(e,n,t){"use strict";var r=t(16),i=t(140),a=t(359),o=t(147);function s(e){var n=new a(e),t=i(a.prototype.request,n);return r.extend(t,a.prototype,n),r.extend(t,n),t}var u=s(t(143));u.Axios=a,u.create=function(e){return s(o(u.defaults,e))},u.Cancel=t(148),u.CancelToken=t(372),u.isCancel=t(142),u.all=function(e){return Promise.all(e)},u.spread=t(373),e.exports=u,e.exports.default=u},function(e,n,t){"use strict";var r=t(16),i=t(141),a=t(360),o=t(361),s=t(147);function u(e){this.defaults=e,this.interceptors={request:new a,response:new a}}u.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=s(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var n=[o,void 0],t=Promise.resolve(e);for(this.interceptors.request.forEach((function(e){n.unshift(e.fulfilled,e.rejected)})),this.interceptors.response.forEach((function(e){n.push(e.fulfilled,e.rejected)}));n.length;)t=t.then(n.shift(),n.shift());return t},u.prototype.getUri=function(e){return e=s(this.defaults,e),i(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(e){u.prototype[e]=function(n,t){return this.request(r.merge(t||{},{method:e,url:n}))}})),r.forEach(["post","put","patch"],(function(e){u.prototype[e]=function(n,t,i){return this.request(r.merge(i||{},{method:e,url:n,data:t}))}})),e.exports=u},function(e,n,t){"use strict";var r=t(16);function i(){this.handlers=[]}i.prototype.use=function(e,n){return this.handlers.push({fulfilled:e,rejected:n}),this.handlers.length-1},i.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},i.prototype.forEach=function(e){r.forEach(this.handlers,(function(n){null!==n&&e(n)}))},e.exports=i},function(e,n,t){"use strict";var r=t(16),i=t(362),a=t(142),o=t(143);function s(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return s(e),e.headers=e.headers||{},e.data=i(e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(n){delete e.headers[n]})),(e.adapter||o.adapter)(e).then((function(n){return s(e),n.data=i(n.data,n.headers,e.transformResponse),n}),(function(n){return a(n)||(s(e),n&&n.response&&(n.response.data=i(n.response.data,n.response.headers,e.transformResponse))),Promise.reject(n)}))}},function(e,n,t){"use strict";var r=t(16);e.exports=function(e,n,t){return r.forEach(t,(function(t){e=t(e,n)})),e}},function(e,n,t){"use strict";var r=t(16);e.exports=function(e,n){r.forEach(e,(function(t,r){r!==n&&r.toUpperCase()===n.toUpperCase()&&(e[n]=t,delete e[r])}))}},function(e,n,t){"use strict";var r=t(146);e.exports=function(e,n,t){var i=t.config.validateStatus;!i||i(t.status)?e(t):n(r("Request failed with status code "+t.status,t.config,null,t.request,t))}},function(e,n,t){"use strict";e.exports=function(e,n,t,r,i){return e.config=n,t&&(e.code=t),e.request=r,e.response=i,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}},function(e,n,t){"use strict";var r=t(367),i=t(368);e.exports=function(e,n){return e&&!r(n)?i(e,n):n}},function(e,n,t){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,n,t){"use strict";e.exports=function(e,n){return n?e.replace(/\/+$/,"")+"/"+n.replace(/^\/+/,""):e}},function(e,n,t){"use strict";var r=t(16),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var n,t,a,o={};return e?(r.forEach(e.split("\n"),(function(e){if(a=e.indexOf(":"),n=r.trim(e.substr(0,a)).toLowerCase(),t=r.trim(e.substr(a+1)),n){if(o[n]&&i.indexOf(n)>=0)return;o[n]="set-cookie"===n?(o[n]?o[n]:[]).concat([t]):o[n]?o[n]+", "+t:t}})),o):o}},function(e,n,t){"use strict";var r=t(16);e.exports=r.isStandardBrowserEnv()?function(){var e,n=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");function i(e){var r=e;return n&&(t.setAttribute("href",r),r=t.href),t.setAttribute("href",r),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return e=i(window.location.href),function(n){var t=r.isString(n)?i(n):n;return t.protocol===e.protocol&&t.host===e.host}}():function(){return!0}},function(e,n,t){"use strict";var r=t(16);e.exports=r.isStandardBrowserEnv()?{write:function(e,n,t,i,a,o){var s=[];s.push(e+"="+encodeURIComponent(n)),r.isNumber(t)&&s.push("expires="+new Date(t).toGMTString()),r.isString(i)&&s.push("path="+i),r.isString(a)&&s.push("domain="+a),!0===o&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var n=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return n?decodeURIComponent(n[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(e,n,t){"use strict";var r=t(148);function i(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var n;this.promise=new Promise((function(e){n=e}));var t=this;e((function(e){t.reason||(t.reason=new r(e),n(t.reason))}))}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.source=function(){var e;return{token:new i((function(n){e=n})),cancel:e}},e.exports=i},function(e,n,t){"use strict";e.exports=function(e){return function(n){return e.apply(null,n)}}},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _createClass=function(){function e(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(n,t,r){return t&&e(n.prototype,t),r&&e(n,r),n}}(),_axios=__webpack_require__(139),_axios2=_interopRequireDefault(_axios),_errorView=__webpack_require__(100),errorView=_interopRequireWildcard(_errorView);function _interopRequireWildcard(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t]);return n.default=e,n}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _asyncToGenerator(e){return function(){var n=e.apply(this,arguments);return new Promise((function(e,t){return function r(i,a){try{var o=n[i](a),s=o.value}catch(e){return void t(e)}if(!o.done)return Promise.resolve(s).then((function(e){r("next",e)}),(function(e){r("throw",e)}));e(s)}("next")}))}}function _classCallCheck(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}var Recipe=function(){function Recipe(e){_classCallCheck(this,Recipe),this.id=e}var _ref;return _createClass(Recipe,[{key:"getRecipe",value:(_ref=_asyncToGenerator(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,(0,_axios2.default)("https://forkify-api.herokuapp.com/api/get?rId="+this.id);case 3:n=e.sent,this.title=n.data.recipe.title,this.author=n.data.recipe.publisher,this.img=n.data.recipe.image_url,this.url=n.data.recipe.source_url,this.ingredients=n.data.recipe.ingredients,e.next=14;break;case 11:e.prev=11,e.t0=e.catch(0),errorView.recipeError(e.t0);case 14:case"end":return e.stop()}}),e,this,[[0,11]])}))),function(){return _ref.apply(this,arguments)})},{key:"calcTime",value:function(){var e=this.ingredients.length,n=Math.ceil(e/3);this.time=15*n}},{key:"calcServings",value:function(){this.servings=4}},{key:"parseIngredients",value:function parseIngredients(){var unitsLong=["tablespoons","tablespoon","ounces","ounce","teaspoons","teaspoon","cups","pounds"],unitsShort=["tbsp","tbsp","oz","oz","tsp","tsp","cup","pound"],unit=[].concat(unitsShort,["kg","g"]),newIngredients=this.ingredients.map((function(el){var ingredient=el.toLowerCase();unitsLong.forEach((function(e,n){ingredient=ingredient.replace(e,unitsShort[n])})),ingredient=ingredient.replace(/ *\([^)]*\) */g," ");var arrIng=ingredient.split(" "),unitIndex=arrIng.findIndex((function(e){return unit.includes(e)})),objInt=void 0;if(unitIndex>-1){var arrCount=arrIng.slice(0,unitIndex),count=void 0;count=1===arrCount.length?eval(arrIng[0].replace("-","+")):eval(arrIng.slice(0,unitIndex).join("+")),objInt={count:count,unit:arrIng[unitIndex],ingredient:arrIng.slice(unitIndex+1).join(" ")}}else parseInt(arrIng[0],10)?objInt={count:parseInt(arrIng[0],10),unit:"",ingredient:arrIng.slice(1).join(" ")}:-1===unitIndex&&(objInt={count:1,unit:"",ingredient:ingredient});return objInt}));this.ingredients=newIngredients}},{key:"updateServing",value:function(e){var n=this,t="dec"===e?this.servings-1:this.servings+1;this.ingredients.forEach((function(e){e.count*=t/n.servings})),this.servings=t}}]),Recipe}();exports.default=Recipe},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,i=function(){function e(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(n,t,r){return t&&e(n.prototype,t),r&&e(n,r),n}}(),a=t(376),o=(r=a)&&r.__esModule?r:{default:r};t(32);var s=function(){function e(){!function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,e),this.items=[]}return i(e,[{key:"addItem",value:function(e,n,t){var r={id:(0,o.default)(),count:e,unit:n,ingredient:t};return this.persistData(),this.items.push(r),r}},{key:"deleteItem",value:function(e){var n=this.items.findIndex((function(n){return n.id===e}));this.items.splice(n,1),this.persistData()}},{key:"deleteAllItem",value:function(){this.items=[],this.persistData()}},{key:"updateCount",value:function(e,n){this.items.find((function(n){return n.id===e})).count=n,this.persistData()}},{key:"isDeleteAllBtnHere",value:function(){var e=document.querySelector(".btn-delete-all");return e!==document.body&&document.body.contains(e)}},{key:"persistData",value:function(){localStorage.setItem("lists",JSON.stringify(this.items))}},{key:"readStorage",value:function(){var e=JSON.parse(localStorage.getItem("lists"));e&&(this.items=e)}}]),e}();n.default=s},function(e,n,t){(function(n){var t=n&&n.pid?n.pid.toString(36):"";function r(){var e=Date.now(),n=r.last||e;return r.last=e>n?e:n+1}e.exports=e.exports.default=function(e,n){return(e||"")+""+t+r().toString(36)+(n||"")},e.exports.process=function(e,n){return(e||"")+t+r().toString(36)+(n||"")},e.exports.time=function(e,n){return(e||"")+r().toString(36)+(n||"")}}).call(this,t(144))},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function e(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(n,t,r){return t&&e(n.prototype,t),r&&e(n,r),n}}();var i=function(){function e(){!function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,e),this.likes=[]}return r(e,[{key:"addLike",value:function(e,n,t,r){var i={id:e,title:n,author:t,img:r};return this.likes.push(i),this.persistData(),i}},{key:"deleteLike",value:function(e){var n=this.likes.findIndex((function(n){return n.id===e}));this.likes.splice(n,1),this.persistData()}},{key:"isLiked",value:function(e){return-1!==this.likes.findIndex((function(n){return n.id===e}))}},{key:"getNumberLikes",value:function(){return this.likes.length}},{key:"persistData",value:function(){localStorage.setItem("likes",JSON.stringify(this.likes))}},{key:"readStorage",value:function(){var e=JSON.parse(localStorage.getItem("likes"));e&&(this.likes=e)}}]),e}();n.default=i},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.updateServingsIngredients=n.renderRecipe=n.clearRecipe=void 0;var r=function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,n){var t=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(t.push(o.value),!n||t.length!==n);r=!0);}catch(e){i=!0,a=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw a}}return t}(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=t(32),a=t(381),o=(n.clearRecipe=function(){i.elements.recipe.innerHTML=""},function(e){if(e){var n=e.toString().split(".").map((function(e){return parseInt(e,10)})),t=r(n,2),i=t[0];if(!t[1])return e;if(0===i){var o=(0,a.fraction)(e);return o.n+"/"+o.d}var s=(0,a.fraction)(e-i);return i+" "+s.n+"/"+s.d}return"?"});n.renderRecipe=function(e,n){var t='       <figure class="recipe__fig">\n                <img src="'+e.img+'" alt="'+e.title+'" class="recipe__img">\n                <h1 class="recipe__title">\n                    <span>'+e.title+'</span>\n                </h1>\n            </figure>\n            <div class="recipe__details">\n                <div class="recipe__info">\n                    <svg class="recipe__info-icon">\n                        <use href="img/icons.svg#icon-stopwatch"></use>\n                    </svg>\n                    <span class="recipe__info-data recipe__info-data--minutes">'+e.time+'</span>\n                    <span class="recipe__info-text"> minutes</span>\n                </div>\n                <div class="recipe__info">\n                    <svg class="recipe__info-icon">\n                        <use href="img/icons.svg#icon-man"></use>\n                    </svg>\n                    <span class="recipe__info-data recipe__info-data--people">'+e.servings+'</span>\n                    <span class="recipe__info-text"> servings</span>\n\n                    <div class="recipe__info-buttons">\n                        <button class="btn-tiny btn-decrease">\n                            <svg>\n                                <use href="img/icons.svg#icon-circle-with-minus"></use>\n                            </svg>\n                        </button>\n                        <button class="btn-tiny btn-increase">\n                            <svg>\n                                <use href="img/icons.svg#icon-circle-with-plus"></use>\n                            </svg>\n                        </button>\n                    </div>\n\n                </div>\n                <button class="recipe__love">\n                    <svg class="header__likes">\n                        <use href="img/icons.svg#icon-heart'+(n?"":"-outlined")+'"></use>\n                    </svg>\n                </button>\n            </div>\n\n\n\n            <div class="recipe__ingredients">\n                <ul class="recipe__ingredient-list">\n                \n                    '+e.ingredients.map((function(e){return'\n     <li class="recipe__item">\n           <svg class="recipe__icon">\n                 <use href="img/icons.svg#icon-check"></use>\n           </svg>\n           <div class="recipe__count">'+o((n=e).count)+'</div>\n           <div class="recipe__ingredient">\n                <span class="recipe__unit">'+n.unit+"</span>\n                "+n.ingredient+"\n           </div>\n     </li>\n";var n})).join("")+'\n                    \n                </ul>\n\n                <button class="btn-small recipe__btn recipe__btn--add">\n                    <svg class="search__icon">\n                        <use href="img/icons.svg#icon-shopping-cart"></use>\n                    </svg>\n                    <span>Add to shopping list</span>\n                </button>\n            </div>\n\n            <div class="recipe__directions">\n                <h2 class="heading-2">How to cook it</h2>\n                <p class="recipe__directions-text">\n                    This recipe was carefully designed and tested by\n                    <span class="recipe__by">'+e.author+'</span>. Please check out directions at their website.\n                </p>\n                <a class="btn-small recipe__btn" href="'+e.url+'" target="_blank">\n                    <span>Directions</span>\n                    <svg class="search__icon">\n                        <use href="img/icons.svg#icon-triangle-right"></use>\n                    </svg>\n\n                </a>\n            </div>\n        ';i.elements.recipe.insertAdjacentHTML("afterbegin",t)},n.updateServingsIngredients=function(e){document.querySelector(".recipe__info-data--people").textContent=e.servings;var n=Array.from(document.querySelectorAll(".recipe__count"));e.ingredients.forEach((function(e,t){n[t].textContent=o(e.count)}))}},function(e,n,t){"use strict";t.r(n),t.d(n,"renderItem",(function(){return i})),t.d(n,"deleteItem",(function(){return a})),t.d(n,"renderDeleteAllItem",(function(){return o}));var r=t(32);const i=e=>{const n=`\n    <li class="shopping__item" data-itemid="${e.id}">\n         <div class="shopping__count">\n              <input type="number" value="${e.count}" step="${e.count}" class="shopping__count-value">\n                    <p>${e.unit}</p>\n         </div>\n                    <p class="shopping__description">${e.ingredient}</p>\n         <button class="shopping__delete btn-tiny">\n              <svg>\n                    <use href="img/icons.svg#icon-circle-with-cross"></use>\n                        </svg>\n         </button>\n    </li>\n    `;r.elements.shopping.insertAdjacentHTML("beforeend",n)},a=e=>{const n=document.querySelector(`[data-itemid="${e}"]`);n&&n.parentElement.removeChild(n)},o=()=>{r.elements.shopping.insertAdjacentHTML("afterend",'<div class="deleteAll" id="del">\n            <button class="btn-delete-all">Delete All            \n            </button>\n        </div>\n        ')}},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.deleteLike=n.renderLike=n.toggleLikeMenu=n.toggleLikeBtn=void 0;var r=t(32),i=t(149);n.toggleLikeBtn=function(e){var n=e?"icon-heart":"icon-heart-outlined";document.querySelector(".recipe__love use").setAttribute("href","img/icons.svg#"+n)},n.toggleLikeMenu=function(e){r.elements.likesMenu.style.visibility=e>0?"visible":"hidden"},n.renderLike=function(e){var n='\n        <li>\n             <a class="likes__link" href="#'+e.id+'">\n                  <figure class="likes__fig">\n                       <img src="'+e.img+'" alt="'+e.title+'">\n                  </figure>\n                  <div class="likes__data">\n                       <h4 class="likes__name">'+(0,i.limitRecipeTitle)(e.title)+'</h4>\n                       <p class="likes__author">'+e.author+"</p>\n                  </div>\n             </a>\n        </li>\n    ";r.elements.likesList.insertAdjacentHTML("beforeend",n)},n.deleteLike=function(e){var n=document.querySelector('.likes__link[href*="'+e+'"]').parentElement;n&&n.parentElement.removeChild(n)}},function(e,n,t){"use strict";t.r(n),t.d(n,"config",(function(){return ae})),t.d(n,"ResultSet",(function(){return Lc})),t.d(n,"Complex",(function(){return Hc})),t.d(n,"Range",(function(){return Gc})),t.d(n,"_false",(function(){return $c})),t.d(n,"_null",(function(){return Vc})),t.d(n,"_true",(function(){return Wc})),t.d(n,"BigNumber",(function(){return Zc})),t.d(n,"Matrix",(function(){return Jc})),t.d(n,"replacer",(function(){return Yc})),t.d(n,"i",(function(){return Xc})),t.d(n,"LN10",(function(){return Qc})),t.d(n,"LOG10E",(function(){return Kc})),t.d(n,"_NaN",(function(){return ef})),t.d(n,"pi",(function(){return nf})),t.d(n,"SQRT1_2",(function(){return tf})),t.d(n,"tau",(function(){return rf})),t.d(n,"efimovFactor",(function(){return af})),t.d(n,"fineStructure",(function(){return of})),t.d(n,"sackurTetrode",(function(){return sf})),t.d(n,"weakMixingAngle",(function(){return uf})),t.d(n,"Fraction",(function(){return cf})),t.d(n,"e",(function(){return ff})),t.d(n,"_Infinity",(function(){return lf})),t.d(n,"LOG2E",(function(){return pf})),t.d(n,"version",(function(){return df})),t.d(n,"DenseMatrix",(function(){return mf})),t.d(n,"phi",(function(){return hf})),t.d(n,"typed",(function(){return yf})),t.d(n,"isInteger",(function(){return gf})),t.d(n,"isNumeric",(function(){return vf})),t.d(n,"isPositive",(function(){return xf})),t.d(n,"isNaN",(function(){return bf})),t.d(n,"equalScalar",(function(){return wf})),t.d(n,"number",(function(){return Nf})),t.d(n,"boolean",(function(){return Sf})),t.d(n,"complex",(function(){return Mf})),t.d(n,"splitUnit",(function(){return Df})),t.d(n,"unaryPlus",(function(){return Ef})),t.d(n,"apply",(function(){return Af})),t.d(n,"cube",(function(){return _f})),t.d(n,"expm1",(function(){return Of})),t.d(n,"log10",(function(){return Cf})),t.d(n,"multiplyScalar",(function(){return Tf})),t.d(n,"sign",(function(){return If})),t.d(n,"square",(function(){return kf})),t.d(n,"bitNot",(function(){return Bf})),t.d(n,"arg",(function(){return qf})),t.d(n,"im",(function(){return Rf})),t.d(n,"not",(function(){return Pf})),t.d(n,"filter",(function(){return zf})),t.d(n,"forEach",(function(){return Ff})),t.d(n,"map",(function(){return jf})),t.d(n,"erf",(function(){return Uf})),t.d(n,"format",(function(){return Lf})),t.d(n,"isPrime",(function(){return Hf})),t.d(n,"acos",(function(){return Gf})),t.d(n,"acot",(function(){return $f})),t.d(n,"acsc",(function(){return Vf})),t.d(n,"asec",(function(){return Wf})),t.d(n,"asin",(function(){return Zf})),t.d(n,"atan",(function(){return Jf})),t.d(n,"atanh",(function(){return Yf})),t.d(n,"cosh",(function(){return Xf})),t.d(n,"coth",(function(){return Qf})),t.d(n,"csch",(function(){return Kf})),t.d(n,"sech",(function(){return el})),t.d(n,"sinh",(function(){return nl})),t.d(n,"tanh",(function(){return tl})),t.d(n,"combinations",(function(){return rl})),t.d(n,"pickRandom",(function(){return il})),t.d(n,"randomInt",(function(){return al})),t.d(n,"LN2",(function(){return ol})),t.d(n,"clone",(function(){return sl})),t.d(n,"hasNumericValue",(function(){return ul})),t.d(n,"typeOf",(function(){return cl})),t.d(n,"string",(function(){return fl})),t.d(n,"fraction",(function(){return ll})),t.d(n,"unaryMinus",(function(){return pl})),t.d(n,"addScalar",(function(){return dl})),t.d(n,"exp",(function(){return ml})),t.d(n,"log2",(function(){return hl})),t.d(n,"sqrt",(function(){return yl})),t.d(n,"conj",(function(){return gl})),t.d(n,"getMatrixDataType",(function(){return vl})),t.d(n,"mode",(function(){return xl})),t.d(n,"print",(function(){return bl})),t.d(n,"acosh",(function(){return wl})),t.d(n,"acsch",(function(){return Nl})),t.d(n,"asinh",(function(){return Sl})),t.d(n,"cos",(function(){return Ml})),t.d(n,"csc",(function(){return Dl})),t.d(n,"sin",(function(){return El})),t.d(n,"combinationsWithRep",(function(){return Al})),t.d(n,"random",(function(){return _l})),t.d(n,"SQRT2",(function(){return Ol})),t.d(n,"isNegative",(function(){return Cl})),t.d(n,"SparseMatrix",(function(){return Tl})),t.d(n,"matrix",(function(){return Il})),t.d(n,"cbrt",(function(){return kl})),t.d(n,"gcd",(function(){return Bl})),t.d(n,"mod",(function(){return ql})),t.d(n,"nthRoot",(function(){return Rl})),t.d(n,"xgcd",(function(){return Pl})),t.d(n,"bitAnd",(function(){return zl})),t.d(n,"bitXor",(function(){return Fl})),t.d(n,"or",(function(){return jl})),t.d(n,"concat",(function(){return Ul})),t.d(n,"diag",(function(){return Ll})),t.d(n,"identity",(function(){return Hl})),t.d(n,"ones",(function(){return Gl})),t.d(n,"reshape",(function(){return $l})),t.d(n,"size",(function(){return Vl})),t.d(n,"subset",(function(){return Wl})),t.d(n,"zeros",(function(){return Zl})),t.d(n,"to",(function(){return Jl})),t.d(n,"round",(function(){return Yl})),t.d(n,"leftShift",(function(){return Xl})),t.d(n,"rightLogShift",(function(){return Ql})),t.d(n,"compare",(function(){return Kl})),t.d(n,"compareText",(function(){return ep})),t.d(n,"smaller",(function(){return np})),t.d(n,"larger",(function(){return tp})),t.d(n,"unequal",(function(){return rp})),t.d(n,"ImmutableDenseMatrix",(function(){return ip})),t.d(n,"FibonacciHeap",(function(){return ap})),t.d(n,"sparse",(function(){return op})),t.d(n,"acoth",(function(){return sp})),t.d(n,"atan2",(function(){return up})),t.d(n,"sec",(function(){return cp})),t.d(n,"add",(function(){return fp})),t.d(n,"dot",(function(){return lp})),t.d(n,"composition",(function(){return pp})),t.d(n,"isZero",(function(){return dp})),t.d(n,"abs",(function(){return mp})),t.d(n,"floor",(function(){return hp})),t.d(n,"multiply",(function(){return yp})),t.d(n,"dotMultiply",(function(){return gp})),t.d(n,"re",(function(){return vp})),t.d(n,"flatten",(function(){return xp})),t.d(n,"resize",(function(){return bp})),t.d(n,"squeeze",(function(){return wp})),t.d(n,"pow",(function(){return Np})),t.d(n,"dotPow",(function(){return Sp})),t.d(n,"rightArithShift",(function(){return Mp})),t.d(n,"compareNatural",(function(){return Dp})),t.d(n,"equalText",(function(){return Ep})),t.d(n,"largerEq",(function(){return Ap})),t.d(n,"partitionSelect",(function(){return _p})),t.d(n,"Index",(function(){return Op})),t.d(n,"asech",(function(){return Cp})),t.d(n,"tan",(function(){return Tp})),t.d(n,"setDifference",(function(){return Ip})),t.d(n,"setIntersect",(function(){return kp})),t.d(n,"setMultiplicity",(function(){return Bp})),t.d(n,"setSize",(function(){return qp})),t.d(n,"norm",(function(){return Rp})),t.d(n,"index",(function(){return Pp})),t.d(n,"quantileSeq",(function(){return zp})),t.d(n,"gamma",(function(){return Fp})),t.d(n,"bignumber",(function(){return jp})),t.d(n,"lcm",(function(){return Up})),t.d(n,"bitOr",(function(){return Lp})),t.d(n,"kron",(function(){return Hp})),t.d(n,"transpose",(function(){return Gp})),t.d(n,"numeric",(function(){return $p})),t.d(n,"and",(function(){return Vp})),t.d(n,"smallerEq",(function(){return Wp})),t.d(n,"sort",(function(){return Zp})),t.d(n,"min",(function(){return Jp})),t.d(n,"cot",(function(){return Yp})),t.d(n,"setDistinct",(function(){return Xp})),t.d(n,"setPowerset",(function(){return Qp})),t.d(n,"trace",(function(){return Kp})),t.d(n,"sum",(function(){return ed})),t.d(n,"factorial",(function(){return nd})),t.d(n,"permutations",(function(){return td})),t.d(n,"ceil",(function(){return rd})),t.d(n,"subtract",(function(){return id})),t.d(n,"cross",(function(){return ad})),t.d(n,"ctranspose",(function(){return od})),t.d(n,"divideScalar",(function(){return sd})),t.d(n,"nthRoots",(function(){return ud})),t.d(n,"lsolve",(function(){return cd})),t.d(n,"equal",(function(){return fd})),t.d(n,"max",(function(){return ld})),t.d(n,"setCartesian",(function(){return pd})),t.d(n,"setSymDifference",(function(){return dd})),t.d(n,"hypot",(function(){return md})),t.d(n,"qr",(function(){return hd})),t.d(n,"distance",(function(){return yd})),t.d(n,"stirlingS2",(function(){return gd})),t.d(n,"catalan",(function(){return vd})),t.d(n,"fix",(function(){return xd})),t.d(n,"range",(function(){return bd})),t.d(n,"prod",(function(){return wd})),t.d(n,"dotDivide",(function(){return Nd})),t.d(n,"deepEqual",(function(){return Sd})),t.d(n,"Unit",(function(){return Md})),t.d(n,"createUnit",(function(){return Dd})),t.d(n,"setUnion",(function(){return Ed})),t.d(n,"slu",(function(){return Ad})),t.d(n,"intersect",(function(){return _d})),t.d(n,"bellNumbers",(function(){return Od})),t.d(n,"atomicMass",(function(){return Cd})),t.d(n,"bohrMagneton",(function(){return Td})),t.d(n,"boltzmann",(function(){return Id})),t.d(n,"conductanceQuantum",(function(){return kd})),t.d(n,"deuteronMass",(function(){return Bd})),t.d(n,"electronMass",(function(){return qd})),t.d(n,"faraday",(function(){return Rd})),t.d(n,"firstRadiation",(function(){return Pd})),t.d(n,"gravitationConstant",(function(){return zd})),t.d(n,"hartreeEnergy",(function(){return Fd})),t.d(n,"klitzing",(function(){return jd})),t.d(n,"magneticConstant",(function(){return Ud})),t.d(n,"molarMass",(function(){return Ld})),t.d(n,"molarPlanckConstant",(function(){return Hd})),t.d(n,"neutronMass",(function(){return Gd})),t.d(n,"planckCharge",(function(){return $d})),t.d(n,"planckLength",(function(){return Vd})),t.d(n,"planckTemperature",(function(){return Wd})),t.d(n,"protonMass",(function(){return Zd})),t.d(n,"reducedPlanckConstant",(function(){return Jd})),t.d(n,"secondRadiation",(function(){return Yd})),t.d(n,"stefanBoltzmann",(function(){return Xd})),t.d(n,"vacuumImpedance",(function(){return Qd})),t.d(n,"xor",(function(){return Kd})),t.d(n,"row",(function(){return em})),t.d(n,"usolve",(function(){return nm})),t.d(n,"unit",(function(){return tm})),t.d(n,"avogadro",(function(){return rm})),t.d(n,"classicalElectronRadius",(function(){return im})),t.d(n,"electricConstant",(function(){return am})),t.d(n,"fermiCoupling",(function(){return om})),t.d(n,"gravity",(function(){return sm})),t.d(n,"loschmidt",(function(){return um})),t.d(n,"molarMassC12",(function(){return cm})),t.d(n,"nuclearMagneton",(function(){return fm})),t.d(n,"planckMass",(function(){return lm})),t.d(n,"quantumOfCirculation",(function(){return pm})),t.d(n,"speedOfLight",(function(){return dm})),t.d(n,"wienDisplacement",(function(){return mm})),t.d(n,"column",(function(){return hm})),t.d(n,"Spa",(function(){return ym})),t.d(n,"lup",(function(){return gm})),t.d(n,"det",(function(){return vm})),t.d(n,"bohrRadius",(function(){return xm})),t.d(n,"elementaryCharge",(function(){return bm})),t.d(n,"inverseConductanceQuantum",(function(){return wm})),t.d(n,"molarVolume",(function(){return Nm})),t.d(n,"planckTime",(function(){return Sm})),t.d(n,"thomsonCrossSection",(function(){return Mm})),t.d(n,"log",(function(){return Dm})),t.d(n,"setIsSubset",(function(){return Em})),t.d(n,"lusolve",(function(){return Am})),t.d(n,"inv",(function(){return _m})),t.d(n,"expm",(function(){return Om})),t.d(n,"divide",(function(){return Cm})),t.d(n,"median",(function(){return Tm})),t.d(n,"variance",(function(){return Im})),t.d(n,"kldivergence",(function(){return km})),t.d(n,"coulomb",(function(){return Bm})),t.d(n,"magneticFluxQuantum",(function(){return qm})),t.d(n,"rydberg",(function(){return Rm})),t.d(n,"log1p",(function(){return Pm})),t.d(n,"eigs",(function(){return zm})),t.d(n,"mean",(function(){return Fm})),t.d(n,"std",(function(){return jm})),t.d(n,"gasConstant",(function(){return Um})),t.d(n,"sqrtm",(function(){return Lm})),t.d(n,"multinomial",(function(){return Hm})),t.d(n,"planckConstant",(function(){return Gm})),t.d(n,"mad",(function(){return $m})),t.d(n,"Node",(function(){return Ey})),t.d(n,"ArrayNode",(function(){return Ay})),t.d(n,"BlockNode",(function(){return _y})),t.d(n,"ConstantNode",(function(){return Oy})),t.d(n,"ObjectNode",(function(){return Cy})),t.d(n,"ParenthesisNode",(function(){return Ty})),t.d(n,"RelationalNode",(function(){return Iy})),t.d(n,"Chain",(function(){return ky})),t.d(n,"reviver",(function(){return By})),t.d(n,"ConditionalNode",(function(){return qy})),t.d(n,"OperatorNode",(function(){return Ry})),t.d(n,"RangeNode",(function(){return Py})),t.d(n,"FunctionAssignmentNode",(function(){return zy})),t.d(n,"chain",(function(){return Fy})),t.d(n,"AccessorNode",(function(){return jy})),t.d(n,"IndexNode",(function(){return Uy})),t.d(n,"SymbolNode",(function(){return Ly})),t.d(n,"AssignmentNode",(function(){return Hy})),t.d(n,"FunctionNode",(function(){return Gy})),t.d(n,"parse",(function(){return $y})),t.d(n,"evaluate",(function(){return Vy})),t.d(n,"Help",(function(){return Wy})),t.d(n,"compile",(function(){return Zy})),t.d(n,"help",(function(){return Jy})),t.d(n,"simplify",(function(){return Yy})),t.d(n,"rationalize",(function(){return Xy})),t.d(n,"Parser",(function(){return Qy})),t.d(n,"parser",(function(){return Ky})),t.d(n,"derivative",(function(){return eg})),t.d(n,"docs",(function(){return $h})),t.d(n,"isAccessorNode",(function(){return _})),t.d(n,"isArray",(function(){return p})),t.d(n,"isArrayNode",(function(){return O})),t.d(n,"isAssignmentNode",(function(){return C})),t.d(n,"isBigNumber",(function(){return s})),t.d(n,"isBlockNode",(function(){return T})),t.d(n,"isBoolean",(function(){return x})),t.d(n,"isChain",(function(){return H})),t.d(n,"isCollection",(function(){return m})),t.d(n,"isComplex",(function(){return u})),t.d(n,"isConditionalNode",(function(){return I})),t.d(n,"isConstantNode",(function(){return k})),t.d(n,"isDate",(function(){return S})),t.d(n,"isDenseMatrix",(function(){return h})),t.d(n,"isFraction",(function(){return c})),t.d(n,"isFunction",(function(){return N})),t.d(n,"isFunctionAssignmentNode",(function(){return B})),t.d(n,"isFunctionNode",(function(){return q})),t.d(n,"isHelp",(function(){return w})),t.d(n,"isIndex",(function(){return v})),t.d(n,"isIndexNode",(function(){return R})),t.d(n,"isMatrix",(function(){return d})),t.d(n,"isNode",(function(){return P})),t.d(n,"isNull",(function(){return E})),t.d(n,"isNumber",(function(){return o})),t.d(n,"isString",(function(){return l})),t.d(n,"isUndefined",(function(){return A})),t.d(n,"isObject",(function(){return D})),t.d(n,"isObjectNode",(function(){return z})),t.d(n,"isOperatorNode",(function(){return F})),t.d(n,"isParenthesisNode",(function(){return j})),t.d(n,"isRange",(function(){return g})),t.d(n,"isRangeNode",(function(){return U})),t.d(n,"isRegExp",(function(){return M})),t.d(n,"isResultSet",(function(){return b})),t.d(n,"isSparseMatrix",(function(){return y})),t.d(n,"isSymbolNode",(function(){return L})),t.d(n,"isUnit",(function(){return f})),t.d(n,"IndexError",(function(){return Re})),t.d(n,"DimensionError",(function(){return qe})),t.d(n,"ArgumentsError",(function(){return xs})),t.d(n,"typedDependencies",(function(){return og})),t.d(n,"ResultSetDependencies",(function(){return sg})),t.d(n,"BigNumberDependencies",(function(){return ng})),t.d(n,"ComplexDependencies",(function(){return tg})),t.d(n,"FractionDependencies",(function(){return ag})),t.d(n,"RangeDependencies",(function(){return ug})),t.d(n,"MatrixDependencies",(function(){return rg})),t.d(n,"DenseMatrixDependencies",(function(){return ig})),t.d(n,"cloneDependencies",(function(){return cg})),t.d(n,"isIntegerDependencies",(function(){return fg})),t.d(n,"isNegativeDependencies",(function(){return lg})),t.d(n,"isNumericDependencies",(function(){return pg})),t.d(n,"hasNumericValueDependencies",(function(){return dg})),t.d(n,"isPositiveDependencies",(function(){return mg})),t.d(n,"isZeroDependencies",(function(){return hg})),t.d(n,"isNaNDependencies",(function(){return yg})),t.d(n,"typeOfDependencies",(function(){return gg})),t.d(n,"equalScalarDependencies",(function(){return vg})),t.d(n,"SparseMatrixDependencies",(function(){return xg})),t.d(n,"numberDependencies",(function(){return bg})),t.d(n,"stringDependencies",(function(){return wg})),t.d(n,"booleanDependencies",(function(){return Ng})),t.d(n,"bignumberDependencies",(function(){return Sg})),t.d(n,"complexDependencies",(function(){return Mg})),t.d(n,"fractionDependencies",(function(){return Dg})),t.d(n,"matrixDependencies",(function(){return Eg})),t.d(n,"splitUnitDependencies",(function(){return Ag})),t.d(n,"unaryMinusDependencies",(function(){return _g})),t.d(n,"unaryPlusDependencies",(function(){return Og})),t.d(n,"absDependencies",(function(){return Cg})),t.d(n,"applyDependencies",(function(){return Tg})),t.d(n,"addScalarDependencies",(function(){return Ig})),t.d(n,"cbrtDependencies",(function(){return kg})),t.d(n,"ceilDependencies",(function(){return Rg})),t.d(n,"cubeDependencies",(function(){return Pg})),t.d(n,"expDependencies",(function(){return zg})),t.d(n,"expm1Dependencies",(function(){return Fg})),t.d(n,"fixDependencies",(function(){return Ug})),t.d(n,"floorDependencies",(function(){return jg})),t.d(n,"gcdDependencies",(function(){return Lg})),t.d(n,"lcmDependencies",(function(){return Hg})),t.d(n,"log10Dependencies",(function(){return Gg})),t.d(n,"log2Dependencies",(function(){return $g})),t.d(n,"modDependencies",(function(){return Vg})),t.d(n,"multiplyScalarDependencies",(function(){return Wg})),t.d(n,"multiplyDependencies",(function(){return Xg})),t.d(n,"nthRootDependencies",(function(){return Qg})),t.d(n,"signDependencies",(function(){return Kg})),t.d(n,"sqrtDependencies",(function(){return ev})),t.d(n,"squareDependencies",(function(){return nv})),t.d(n,"subtractDependencies",(function(){return tv})),t.d(n,"xgcdDependencies",(function(){return rv})),t.d(n,"dotMultiplyDependencies",(function(){return iv})),t.d(n,"bitAndDependencies",(function(){return av})),t.d(n,"bitNotDependencies",(function(){return ov})),t.d(n,"bitOrDependencies",(function(){return sv})),t.d(n,"bitXorDependencies",(function(){return uv})),t.d(n,"argDependencies",(function(){return cv})),t.d(n,"conjDependencies",(function(){return Zg})),t.d(n,"imDependencies",(function(){return fv})),t.d(n,"reDependencies",(function(){return lv})),t.d(n,"notDependencies",(function(){return pv})),t.d(n,"orDependencies",(function(){return dv})),t.d(n,"xorDependencies",(function(){return mv})),t.d(n,"concatDependencies",(function(){return hv})),t.d(n,"columnDependencies",(function(){return Sv})),t.d(n,"crossDependencies",(function(){return Mv})),t.d(n,"diagDependencies",(function(){return Dv})),t.d(n,"filterDependencies",(function(){return Ev})),t.d(n,"flattenDependencies",(function(){return Av})),t.d(n,"forEachDependencies",(function(){return _v})),t.d(n,"getMatrixDataTypeDependencies",(function(){return Ov})),t.d(n,"identityDependencies",(function(){return Cv})),t.d(n,"kronDependencies",(function(){return Tv})),t.d(n,"mapDependencies",(function(){return Iv})),t.d(n,"onesDependencies",(function(){return kv})),t.d(n,"rangeDependencies",(function(){return Nv})),t.d(n,"reshapeDependencies",(function(){return Bv})),t.d(n,"resizeDependencies",(function(){return qv})),t.d(n,"rowDependencies",(function(){return Rv})),t.d(n,"sizeDependencies",(function(){return Jg})),t.d(n,"squeezeDependencies",(function(){return Pv})),t.d(n,"subsetDependencies",(function(){return zv})),t.d(n,"transposeDependencies",(function(){return Fv})),t.d(n,"ctransposeDependencies",(function(){return jv})),t.d(n,"zerosDependencies",(function(){return Bg})),t.d(n,"erfDependencies",(function(){return Uv})),t.d(n,"modeDependencies",(function(){return Lv})),t.d(n,"prodDependencies",(function(){return Gv})),t.d(n,"formatDependencies",(function(){return $v})),t.d(n,"printDependencies",(function(){return Vv})),t.d(n,"toDependencies",(function(){return Wv})),t.d(n,"isPrimeDependencies",(function(){return Zv})),t.d(n,"numericDependencies",(function(){return Hv})),t.d(n,"divideScalarDependencies",(function(){return Jv})),t.d(n,"powDependencies",(function(){return Yv})),t.d(n,"roundDependencies",(function(){return qg})),t.d(n,"logDependencies",(function(){return Xv})),t.d(n,"log1pDependencies",(function(){return Qv})),t.d(n,"nthRootsDependencies",(function(){return Kv})),t.d(n,"dotPowDependencies",(function(){return ex})),t.d(n,"dotDivideDependencies",(function(){return nx})),t.d(n,"lsolveDependencies",(function(){return tx})),t.d(n,"usolveDependencies",(function(){return rx})),t.d(n,"leftShiftDependencies",(function(){return ix})),t.d(n,"rightArithShiftDependencies",(function(){return ax})),t.d(n,"rightLogShiftDependencies",(function(){return ox})),t.d(n,"andDependencies",(function(){return sx})),t.d(n,"compareDependencies",(function(){return ux})),t.d(n,"compareNaturalDependencies",(function(){return cx})),t.d(n,"compareTextDependencies",(function(){return fx})),t.d(n,"equalDependencies",(function(){return lx})),t.d(n,"equalTextDependencies",(function(){return px})),t.d(n,"smallerDependencies",(function(){return yv})),t.d(n,"smallerEqDependencies",(function(){return wv})),t.d(n,"largerDependencies",(function(){return xv})),t.d(n,"largerEqDependencies",(function(){return bv})),t.d(n,"deepEqualDependencies",(function(){return dx})),t.d(n,"unequalDependencies",(function(){return mx})),t.d(n,"partitionSelectDependencies",(function(){return hx})),t.d(n,"sortDependencies",(function(){return yx})),t.d(n,"maxDependencies",(function(){return gx})),t.d(n,"minDependencies",(function(){return vx})),t.d(n,"ImmutableDenseMatrixDependencies",(function(){return gv})),t.d(n,"IndexDependencies",(function(){return vv})),t.d(n,"FibonacciHeapDependencies",(function(){return xx})),t.d(n,"SpaDependencies",(function(){return bx})),t.d(n,"UnitDependencies",(function(){return wx})),t.d(n,"unitDependencies",(function(){return Nx})),t.d(n,"sparseDependencies",(function(){return Sx})),t.d(n,"createUnitDependencies",(function(){return Mx})),t.d(n,"acosDependencies",(function(){return Dx})),t.d(n,"acoshDependencies",(function(){return Ex})),t.d(n,"acotDependencies",(function(){return Ax})),t.d(n,"acothDependencies",(function(){return _x})),t.d(n,"acscDependencies",(function(){return Ox})),t.d(n,"acschDependencies",(function(){return Cx})),t.d(n,"asecDependencies",(function(){return Tx})),t.d(n,"asechDependencies",(function(){return Ix})),t.d(n,"asinDependencies",(function(){return kx})),t.d(n,"asinhDependencies",(function(){return Bx})),t.d(n,"atanDependencies",(function(){return qx})),t.d(n,"atan2Dependencies",(function(){return Rx})),t.d(n,"atanhDependencies",(function(){return Px})),t.d(n,"cosDependencies",(function(){return zx})),t.d(n,"coshDependencies",(function(){return Fx})),t.d(n,"cotDependencies",(function(){return jx})),t.d(n,"cothDependencies",(function(){return Ux})),t.d(n,"cscDependencies",(function(){return Lx})),t.d(n,"cschDependencies",(function(){return Hx})),t.d(n,"secDependencies",(function(){return Gx})),t.d(n,"sechDependencies",(function(){return $x})),t.d(n,"sinDependencies",(function(){return Vx})),t.d(n,"sinhDependencies",(function(){return Wx})),t.d(n,"tanDependencies",(function(){return Zx})),t.d(n,"tanhDependencies",(function(){return Jx})),t.d(n,"setCartesianDependencies",(function(){return Yx})),t.d(n,"setDifferenceDependencies",(function(){return Xx})),t.d(n,"setDistinctDependencies",(function(){return Qx})),t.d(n,"setIntersectDependencies",(function(){return Kx})),t.d(n,"setIsSubsetDependencies",(function(){return eb})),t.d(n,"setMultiplicityDependencies",(function(){return nb})),t.d(n,"setPowersetDependencies",(function(){return tb})),t.d(n,"setSizeDependencies",(function(){return rb})),t.d(n,"setSymDifferenceDependencies",(function(){return ib})),t.d(n,"setUnionDependencies",(function(){return ab})),t.d(n,"addDependencies",(function(){return ob})),t.d(n,"hypotDependencies",(function(){return sb})),t.d(n,"normDependencies",(function(){return ub})),t.d(n,"dotDependencies",(function(){return Yg})),t.d(n,"traceDependencies",(function(){return cb})),t.d(n,"indexDependencies",(function(){return fb})),t.d(n,"NodeDependencies",(function(){return lb})),t.d(n,"AccessorNodeDependencies",(function(){return pb})),t.d(n,"ArrayNodeDependencies",(function(){return db})),t.d(n,"AssignmentNodeDependencies",(function(){return mb})),t.d(n,"BlockNodeDependencies",(function(){return hb})),t.d(n,"ConditionalNodeDependencies",(function(){return yb})),t.d(n,"ConstantNodeDependencies",(function(){return gb})),t.d(n,"FunctionAssignmentNodeDependencies",(function(){return vb})),t.d(n,"IndexNodeDependencies",(function(){return xb})),t.d(n,"ObjectNodeDependencies",(function(){return bb})),t.d(n,"OperatorNodeDependencies",(function(){return wb})),t.d(n,"ParenthesisNodeDependencies",(function(){return Nb})),t.d(n,"RangeNodeDependencies",(function(){return Sb})),t.d(n,"RelationalNodeDependencies",(function(){return Mb})),t.d(n,"SymbolNodeDependencies",(function(){return Db})),t.d(n,"FunctionNodeDependencies",(function(){return Eb})),t.d(n,"parseDependencies",(function(){return Ab})),t.d(n,"compileDependencies",(function(){return _b})),t.d(n,"evaluateDependencies",(function(){return Ob})),t.d(n,"ParserDependencies",(function(){return Cb})),t.d(n,"parserDependencies",(function(){return Tb})),t.d(n,"lupDependencies",(function(){return Ib})),t.d(n,"qrDependencies",(function(){return kb})),t.d(n,"sluDependencies",(function(){return Bb})),t.d(n,"lusolveDependencies",(function(){return qb})),t.d(n,"HelpDependencies",(function(){return Rb})),t.d(n,"ChainDependencies",(function(){return Pb})),t.d(n,"helpDependencies",(function(){return zb})),t.d(n,"chainDependencies",(function(){return Fb})),t.d(n,"detDependencies",(function(){return jb})),t.d(n,"invDependencies",(function(){return Ub})),t.d(n,"eigsDependencies",(function(){return Lb})),t.d(n,"expmDependencies",(function(){return Hb})),t.d(n,"sqrtmDependencies",(function(){return Gb})),t.d(n,"divideDependencies",(function(){return $b})),t.d(n,"distanceDependencies",(function(){return Vb})),t.d(n,"intersectDependencies",(function(){return Wb})),t.d(n,"sumDependencies",(function(){return Zb})),t.d(n,"meanDependencies",(function(){return Jb})),t.d(n,"medianDependencies",(function(){return Yb})),t.d(n,"madDependencies",(function(){return Xb})),t.d(n,"varianceDependencies",(function(){return Qb})),t.d(n,"quantileSeqDependencies",(function(){return Kb})),t.d(n,"stdDependencies",(function(){return ew})),t.d(n,"combinationsDependencies",(function(){return nw})),t.d(n,"combinationsWithRepDependencies",(function(){return tw})),t.d(n,"gammaDependencies",(function(){return rw})),t.d(n,"factorialDependencies",(function(){return iw})),t.d(n,"kldivergenceDependencies",(function(){return aw})),t.d(n,"multinomialDependencies",(function(){return ow})),t.d(n,"permutationsDependencies",(function(){return sw})),t.d(n,"pickRandomDependencies",(function(){return uw})),t.d(n,"randomDependencies",(function(){return cw})),t.d(n,"randomIntDependencies",(function(){return fw})),t.d(n,"stirlingS2Dependencies",(function(){return lw})),t.d(n,"bellNumbersDependencies",(function(){return pw})),t.d(n,"catalanDependencies",(function(){return dw})),t.d(n,"compositionDependencies",(function(){return mw})),t.d(n,"simplifyDependencies",(function(){return hw})),t.d(n,"derivativeDependencies",(function(){return yw})),t.d(n,"rationalizeDependencies",(function(){return gw})),t.d(n,"reviverDependencies",(function(){return vw})),t.d(n,"replacerDependencies",(function(){return xw})),t.d(n,"eDependencies",(function(){return bw})),t.d(n,"EDependencies",(function(){return ww})),t.d(n,"falseDependencies",(function(){return Nw})),t.d(n,"iDependencies",(function(){return Sw})),t.d(n,"InfinityDependencies",(function(){return Mw})),t.d(n,"LN10Dependencies",(function(){return Dw})),t.d(n,"LN2Dependencies",(function(){return Ew})),t.d(n,"LOG10EDependencies",(function(){return Aw})),t.d(n,"LOG2EDependencies",(function(){return _w})),t.d(n,"NaNDependencies",(function(){return Ow})),t.d(n,"nullDependencies",(function(){return Cw})),t.d(n,"phiDependencies",(function(){return Tw})),t.d(n,"piDependencies",(function(){return Iw})),t.d(n,"PIDependencies",(function(){return kw})),t.d(n,"SQRT1_2Dependencies",(function(){return Bw})),t.d(n,"SQRT2Dependencies",(function(){return qw})),t.d(n,"tauDependencies",(function(){return Rw})),t.d(n,"trueDependencies",(function(){return Pw})),t.d(n,"versionDependencies",(function(){return zw})),t.d(n,"atomicMassDependencies",(function(){return Fw})),t.d(n,"avogadroDependencies",(function(){return jw})),t.d(n,"bohrMagnetonDependencies",(function(){return Uw})),t.d(n,"bohrRadiusDependencies",(function(){return Lw})),t.d(n,"boltzmannDependencies",(function(){return Hw})),t.d(n,"classicalElectronRadiusDependencies",(function(){return Gw})),t.d(n,"conductanceQuantumDependencies",(function(){return $w})),t.d(n,"coulombDependencies",(function(){return Vw})),t.d(n,"deuteronMassDependencies",(function(){return Ww})),t.d(n,"efimovFactorDependencies",(function(){return Zw})),t.d(n,"electricConstantDependencies",(function(){return Jw})),t.d(n,"electronMassDependencies",(function(){return Yw})),t.d(n,"elementaryChargeDependencies",(function(){return Xw})),t.d(n,"faradayDependencies",(function(){return Qw})),t.d(n,"fermiCouplingDependencies",(function(){return Kw})),t.d(n,"fineStructureDependencies",(function(){return eN})),t.d(n,"firstRadiationDependencies",(function(){return nN})),t.d(n,"gasConstantDependencies",(function(){return tN})),t.d(n,"gravitationConstantDependencies",(function(){return rN})),t.d(n,"gravityDependencies",(function(){return iN})),t.d(n,"hartreeEnergyDependencies",(function(){return aN})),t.d(n,"inverseConductanceQuantumDependencies",(function(){return oN})),t.d(n,"klitzingDependencies",(function(){return sN})),t.d(n,"loschmidtDependencies",(function(){return uN})),t.d(n,"magneticConstantDependencies",(function(){return cN})),t.d(n,"magneticFluxQuantumDependencies",(function(){return fN})),t.d(n,"molarMassDependencies",(function(){return lN})),t.d(n,"molarMassC12Dependencies",(function(){return pN})),t.d(n,"molarPlanckConstantDependencies",(function(){return dN})),t.d(n,"molarVolumeDependencies",(function(){return mN})),t.d(n,"neutronMassDependencies",(function(){return hN})),t.d(n,"nuclearMagnetonDependencies",(function(){return yN})),t.d(n,"planckChargeDependencies",(function(){return gN})),t.d(n,"planckConstantDependencies",(function(){return vN})),t.d(n,"planckLengthDependencies",(function(){return xN})),t.d(n,"planckMassDependencies",(function(){return bN})),t.d(n,"planckTemperatureDependencies",(function(){return wN})),t.d(n,"planckTimeDependencies",(function(){return NN})),t.d(n,"protonMassDependencies",(function(){return SN})),t.d(n,"quantumOfCirculationDependencies",(function(){return MN})),t.d(n,"reducedPlanckConstantDependencies",(function(){return DN})),t.d(n,"rydbergDependencies",(function(){return EN})),t.d(n,"sackurTetrodeDependencies",(function(){return AN})),t.d(n,"secondRadiationDependencies",(function(){return _N})),t.d(n,"speedOfLightDependencies",(function(){return ON})),t.d(n,"stefanBoltzmannDependencies",(function(){return CN})),t.d(n,"thomsonCrossSectionDependencies",(function(){return TN})),t.d(n,"vacuumImpedanceDependencies",(function(){return IN})),t.d(n,"weakMixingAngleDependencies",(function(){return kN})),t.d(n,"wienDisplacementDependencies",(function(){return BN})),t.d(n,"applyTransformDependencies",(function(){return qN})),t.d(n,"columnTransformDependencies",(function(){return RN})),t.d(n,"filterTransformDependencies",(function(){return PN})),t.d(n,"forEachTransformDependencies",(function(){return zN})),t.d(n,"indexTransformDependencies",(function(){return FN})),t.d(n,"mapTransformDependencies",(function(){return jN})),t.d(n,"maxTransformDependencies",(function(){return UN})),t.d(n,"meanTransformDependencies",(function(){return LN})),t.d(n,"minTransformDependencies",(function(){return HN})),t.d(n,"rangeTransformDependencies",(function(){return GN})),t.d(n,"rowTransformDependencies",(function(){return $N})),t.d(n,"subsetTransformDependencies",(function(){return VN})),t.d(n,"concatTransformDependencies",(function(){return WN})),t.d(n,"stdTransformDependencies",(function(){return ZN})),t.d(n,"sumTransformDependencies",(function(){return JN})),t.d(n,"varianceTransformDependencies",(function(){return YN})),t.d(n,"all",(function(){return XN})),t.d(n,"createTyped",(function(){return Xt})),t.d(n,"createResultSet",(function(){return rn})),t.d(n,"createBigNumberClass",(function(){return Hn})),t.d(n,"createComplexClass",(function(){return un})),t.d(n,"createFractionClass",(function(){return Vt})),t.d(n,"createRangeClass",(function(){return cn})),t.d(n,"createMatrixClass",(function(){return Gn})),t.d(n,"createDenseMatrixClass",(function(){return Wt})),t.d(n,"createClone",(function(){return Sa})),t.d(n,"createIsInteger",(function(){return sr})),t.d(n,"createIsNegative",(function(){return Wa})),t.d(n,"createIsNumeric",(function(){return ur})),t.d(n,"createHasNumericValue",(function(){return Ma})),t.d(n,"createIsPositive",(function(){return dr})),t.d(n,"createIsZero",(function(){return ps})),t.d(n,"createIsNaN",(function(){return mr})),t.d(n,"createTypeOf",(function(){return Da})),t.d(n,"createEqualScalar",(function(){return yr})),t.d(n,"createSparseMatrixClass",(function(){return Za})),t.d(n,"createNumber",(function(){return gr})),t.d(n,"createString",(function(){return Ea})),t.d(n,"createBoolean",(function(){return vr})),t.d(n,"createBignumber",(function(){return $s})),t.d(n,"createComplex",(function(){return xr})),t.d(n,"createFraction",(function(){return Aa})),t.d(n,"createMatrix",(function(){return Ja})),t.d(n,"createSplitUnit",(function(){return br})),t.d(n,"createUnaryMinus",(function(){return _a})),t.d(n,"createUnaryPlus",(function(){return Gr})),t.d(n,"createAbs",(function(){return ds})),t.d(n,"createApply",(function(){return $r})),t.d(n,"createAddScalar",(function(){return Oa})),t.d(n,"createCbrt",(function(){return Ya})),t.d(n,"createCeil",(function(){return fu})),t.d(n,"createCube",(function(){return Wr})),t.d(n,"createExp",(function(){return Ca})),t.d(n,"createExpm1",(function(){return Zr})),t.d(n,"createFix",(function(){return Ou})),t.d(n,"createFloor",(function(){return ms})),t.d(n,"createGcd",(function(){return to})),t.d(n,"createLcm",(function(){return Vs})),t.d(n,"createLog10",(function(){return Jr})),t.d(n,"createLog2",(function(){return Ta})),t.d(n,"createMod",(function(){return uo})),t.d(n,"createMultiplyScalar",(function(){return Yr})),t.d(n,"createMultiply",(function(){return hs})),t.d(n,"createNthRoot",(function(){return fo})),t.d(n,"createSign",(function(){return Xr})),t.d(n,"createSqrt",(function(){return Ia})),t.d(n,"createSquare",(function(){return Qr})),t.d(n,"createSubtract",(function(){return lu})),t.d(n,"createXgcd",(function(){return lo})),t.d(n,"createDotMultiply",(function(){return ys})),t.d(n,"createBitAnd",(function(){return po})),t.d(n,"createBitNot",(function(){return hi})),t.d(n,"createBitOr",(function(){return Ws})),t.d(n,"createBitXor",(function(){return ho})),t.d(n,"createArg",(function(){return yi})),t.d(n,"createConj",(function(){return ka})),t.d(n,"createIm",(function(){return gi})),t.d(n,"createRe",(function(){return gs})),t.d(n,"createNot",(function(){return Ni})),t.d(n,"createOr",(function(){return yo})),t.d(n,"createXor",(function(){return rc})),t.d(n,"createConcat",(function(){return go})),t.d(n,"createColumn",(function(){return sc})),t.d(n,"createCross",(function(){return du})),t.d(n,"createDiag",(function(){return xo})),t.d(n,"createFilter",(function(){return Si})),t.d(n,"createFlatten",(function(){return vs})),t.d(n,"createForEach",(function(){return Di})),t.d(n,"createGetMatrixDataType",(function(){return Ba})),t.d(n,"createIdentity",(function(){return bo})),t.d(n,"createKron",(function(){return Zs})),t.d(n,"createMap",(function(){return Ai})),t.d(n,"createOnes",(function(){return wo})),t.d(n,"createRange",(function(){return Cu})),t.d(n,"createReshape",(function(){return No})),t.d(n,"createResize",(function(){return bs})),t.d(n,"createRow",(function(){return ic})),t.d(n,"createSize",(function(){return Eo})),t.d(n,"createSqueeze",(function(){return ws})),t.d(n,"createSubset",(function(){return qo})),t.d(n,"createTranspose",(function(){return Js})),t.d(n,"createCtranspose",(function(){return mu})),t.d(n,"createZeros",(function(){return jo})),t.d(n,"createErf",(function(){return Oi})),t.d(n,"createMode",(function(){return qa})),t.d(n,"createProd",(function(){return Tu})),t.d(n,"createFormat",(function(){return qi})),t.d(n,"createPrint",(function(){return Ra})),t.d(n,"createTo",(function(){return Uo})),t.d(n,"createIsPrime",(function(){return Ri})),t.d(n,"createNumeric",(function(){return Ys})),t.d(n,"createDivideScalar",(function(){return hu})),t.d(n,"createPow",(function(){return Ns})),t.d(n,"createRound",(function(){return Vo})),t.d(n,"createLog",(function(){return lc})),t.d(n,"createLog1p",(function(){return Oc})),t.d(n,"createNthRoots",(function(){return yu})),t.d(n,"createDotPow",(function(){return Ss})),t.d(n,"createDotDivide",(function(){return Iu})),t.d(n,"createLsolve",(function(){return vu})),t.d(n,"createUsolve",(function(){return ac})),t.d(n,"createLeftShift",(function(){return Jo})),t.d(n,"createRightArithShift",(function(){return Ms})),t.d(n,"createRightLogShift",(function(){return Yo})),t.d(n,"createAnd",(function(){return Xs})),t.d(n,"createCompare",(function(){return Xo})),t.d(n,"createCompareNatural",(function(){return As})),t.d(n,"createCompareText",(function(){return Qo})),t.d(n,"createEqual",(function(){return xu})),t.d(n,"createEqualText",(function(){return _s})),t.d(n,"createSmaller",(function(){return Ko})),t.d(n,"createSmallerEq",(function(){return Qs})),t.d(n,"createLarger",(function(){return es})),t.d(n,"createLargerEq",(function(){return Os})),t.d(n,"createDeepEqual",(function(){return ku})),t.d(n,"createUnequal",(function(){return ns})),t.d(n,"createPartitionSelect",(function(){return Cs})),t.d(n,"createSort",(function(){return Ks})),t.d(n,"createMax",(function(){return bu})),t.d(n,"createMin",(function(){return nu})),t.d(n,"createImmutableDenseMatrixClass",(function(){return ts})),t.d(n,"createIndexClass",(function(){return Ts})),t.d(n,"createFibonacciHeapClass",(function(){return rs})),t.d(n,"createSpaClass",(function(){return uc})),t.d(n,"createUnitClass",(function(){return Fu})),t.d(n,"createUnitFunction",(function(){return oc})),t.d(n,"createSparse",(function(){return is})),t.d(n,"createCreateUnit",(function(){return ju})),t.d(n,"createAcos",(function(){return Pi})),t.d(n,"createAcosh",(function(){return za}));t.d(n,"createAcot",(function(){return ea})),t.d(n,"createAcoth",(function(){return as})),t.d(n,"createAcsc",(function(){return na})),t.d(n,"createAcsch",(function(){return Fa})),t.d(n,"createAsec",(function(){return ta})),t.d(n,"createAsech",(function(){return Is})),t.d(n,"createAsin",(function(){return ra})),t.d(n,"createAsinh",(function(){return ja})),t.d(n,"createAtan",(function(){return ia})),t.d(n,"createAtan2",(function(){return ss})),t.d(n,"createAtanh",(function(){return aa})),t.d(n,"createCos",(function(){return Ua})),t.d(n,"createCosh",(function(){return oa})),t.d(n,"createCot",(function(){return tu})),t.d(n,"createCoth",(function(){return sa})),t.d(n,"createCsc",(function(){return La})),t.d(n,"createCsch",(function(){return ua})),t.d(n,"createSec",(function(){return us})),t.d(n,"createSech",(function(){return ca})),t.d(n,"createSin",(function(){return Ha})),t.d(n,"createSinh",(function(){return fa})),t.d(n,"createTan",(function(){return ks})),t.d(n,"createTanh",(function(){return la})),t.d(n,"createSetCartesian",(function(){return wu})),t.d(n,"createSetDifference",(function(){return Bs})),t.d(n,"createSetDistinct",(function(){return ru})),t.d(n,"createSetIntersect",(function(){return qs})),t.d(n,"createSetIsSubset",(function(){return pc})),t.d(n,"createSetMultiplicity",(function(){return Rs})),t.d(n,"createSetPowerset",(function(){return iu})),t.d(n,"createSetSize",(function(){return Ps})),t.d(n,"createSetSymDifference",(function(){return Nu})),t.d(n,"createSetUnion",(function(){return Uu})),t.d(n,"createAdd",(function(){return cs})),t.d(n,"createHypot",(function(){return Su})),t.d(n,"createNorm",(function(){return zs})),t.d(n,"createDot",(function(){return fs})),t.d(n,"createTrace",(function(){return au})),t.d(n,"createIndex",(function(){return Fs})),t.d(n,"createNode",(function(){return Zm})),t.d(n,"createAccessorNode",(function(){return Mh})),t.d(n,"createArrayNode",(function(){return Jm})),t.d(n,"createAssignmentNode",(function(){return Ch})),t.d(n,"createBlockNode",(function(){return Ym})),t.d(n,"createConditionalNode",(function(){return yh})),t.d(n,"createConstantNode",(function(){return ah})),t.d(n,"createFunctionAssignmentNode",(function(){return xh})),t.d(n,"createIndexNode",(function(){return Ah})),t.d(n,"createObjectNode",(function(){return sh})),t.d(n,"createOperatorNode",(function(){return gh})),t.d(n,"createParenthesisNode",(function(){return uh})),t.d(n,"createRangeNode",(function(){return vh})),t.d(n,"createRelationalNode",(function(){return dh})),t.d(n,"createSymbolNode",(function(){return _h})),t.d(n,"createFunctionNode",(function(){return kh})),t.d(n,"createParse",(function(){return Rh})),t.d(n,"createCompile",(function(){return Lh})),t.d(n,"createEvaluate",(function(){return zh})),t.d(n,"createParserClass",(function(){return ey})),t.d(n,"createParser",(function(){return ny})),t.d(n,"createLup",(function(){return cc})),t.d(n,"createQr",(function(){return Du})),t.d(n,"createSlu",(function(){return ec})),t.d(n,"createLusolve",(function(){return hc})),t.d(n,"createHelpClass",(function(){return jh})),t.d(n,"createChainClass",(function(){return mh})),t.d(n,"createHelp",(function(){return Vh})),t.d(n,"createChain",(function(){return bh})),t.d(n,"createDet",(function(){return fc})),t.d(n,"createInv",(function(){return gc})),t.d(n,"createEigs",(function(){return Tc})),t.d(n,"createExpm",(function(){return xc})),t.d(n,"createSqrtm",(function(){return Pc})),t.d(n,"createDivide",(function(){return wc})),t.d(n,"createDistance",(function(){return Eu})),t.d(n,"createIntersect",(function(){return nc})),t.d(n,"createSum",(function(){return ou})),t.d(n,"createMean",(function(){return kc})),t.d(n,"createMedian",(function(){return Sc})),t.d(n,"createMad",(function(){return Uc})),t.d(n,"createVariance",(function(){return Dc})),t.d(n,"createQuantileSeq",(function(){return js})),t.d(n,"createStd",(function(){return qc})),t.d(n,"createCombinations",(function(){return ma})),t.d(n,"createCombinationsWithRep",(function(){return Ga})),t.d(n,"createGamma",(function(){return Gs})),t.d(n,"createFactorial",(function(){return su})),t.d(n,"createKldivergence",(function(){return Ac})),t.d(n,"createMultinomial",(function(){return Fc})),t.d(n,"createPermutations",(function(){return uu})),t.d(n,"createPickRandom",(function(){return ba})),t.d(n,"createRandom",(function(){return Va})),t.d(n,"createRandomInt",(function(){return Na})),t.d(n,"createStirlingS2",(function(){return Au})),t.d(n,"createBellNumbers",(function(){return tc})),t.d(n,"createCatalan",(function(){return _u})),t.d(n,"createComposition",(function(){return ls})),t.d(n,"createSimplify",(function(){return Qh})),t.d(n,"createDerivative",(function(){return ty})),t.d(n,"createRationalize",(function(){return Kh})),t.d(n,"createReviver",(function(){return hh})),t.d(n,"createReplacer",(function(){return $n})),t.d(n,"createE",(function(){return _n})),t.d(n,"createUppercaseE",(function(){return zn})),t.d(n,"createFalse",(function(){return Nn})),t.d(n,"createI",(function(){return Rn})),t.d(n,"createInfinity",(function(){return Mn})),t.d(n,"createLN10",(function(){return Tn})),t.d(n,"createLN2",(function(){return Cn})),t.d(n,"createLOG10E",(function(){return kn})),t.d(n,"createLOG2E",(function(){return In})),t.d(n,"createNaN",(function(){return Dn})),t.d(n,"createNull",(function(){return Sn})),t.d(n,"createPhi",(function(){return On})),t.d(n,"createPi",(function(){return En})),t.d(n,"createUppercasePi",(function(){return Pn})),t.d(n,"createSQRT1_2",(function(){return Bn})),t.d(n,"createSQRT2",(function(){return qn})),t.d(n,"createTau",(function(){return An})),t.d(n,"createTrue",(function(){return wn})),t.d(n,"createVersion",(function(){return Fn})),t.d(n,"createAtomicMass",(function(){return wt})),t.d(n,"createAvogadro",(function(){return Nt})),t.d(n,"createBohrMagneton",(function(){return nt})),t.d(n,"createBohrRadius",(function(){return st})),t.d(n,"createBoltzmann",(function(){return St})),t.d(n,"createClassicalElectronRadius",(function(){return ut})),t.d(n,"createConductanceQuantum",(function(){return tt})),t.d(n,"createCoulomb",(function(){return Kn})),t.d(n,"createDeuteronMass",(function(){return mt})),t.d(n,"createEfimovFactor",(function(){return bt})),t.d(n,"createElectricConstant",(function(){return Xn})),t.d(n,"createElectronMass",(function(){return ct})),t.d(n,"createElementaryCharge",(function(){return et})),t.d(n,"createFaraday",(function(){return Mt})),t.d(n,"createFermiCoupling",(function(){return ft})),t.d(n,"createFineStructure",(function(){return lt})),t.d(n,"createFirstRadiation",(function(){return Dt})),t.d(n,"createGasConstant",(function(){return At})),t.d(n,"createGravitationConstant",(function(){return Wn})),t.d(n,"createGravity",(function(){return Rt})),t.d(n,"createHartreeEnergy",(function(){return pt})),t.d(n,"createInverseConductanceQuantum",(function(){return rt})),t.d(n,"createKlitzing",(function(){return ot})),t.d(n,"createLoschmidt",(function(){return Et})),t.d(n,"createMagneticConstant",(function(){return Yn})),t.d(n,"createMagneticFluxQuantum",(function(){return it})),t.d(n,"createMolarMass",(function(){return Bt})),t.d(n,"createMolarMassC12",(function(){return qt})),t.d(n,"createMolarPlanckConstant",(function(){return _t})),t.d(n,"createMolarVolume",(function(){return Ot})),t.d(n,"createNeutronMass",(function(){return ht})),t.d(n,"createNuclearMagneton",(function(){return at})),t.d(n,"createPlanckCharge",(function(){return jt})),t.d(n,"createPlanckConstant",(function(){return Zn})),t.d(n,"createPlanckLength",(function(){return Pt})),t.d(n,"createPlanckMass",(function(){return zt})),t.d(n,"createPlanckTemperature",(function(){return Ut})),t.d(n,"createPlanckTime",(function(){return Ft})),t.d(n,"createProtonMass",(function(){return dt})),t.d(n,"createQuantumOfCirculation",(function(){return yt})),t.d(n,"createReducedPlanckConstant",(function(){return Jn})),t.d(n,"createRydberg",(function(){return gt})),t.d(n,"createSackurTetrode",(function(){return Ct})),t.d(n,"createSecondRadiation",(function(){return Tt})),t.d(n,"createSpeedOfLight",(function(){return Vn})),t.d(n,"createStefanBoltzmann",(function(){return It})),t.d(n,"createThomsonCrossSection",(function(){return vt})),t.d(n,"createVacuumImpedance",(function(){return Qn})),t.d(n,"createWeakMixingAngle",(function(){return xt})),t.d(n,"createWienDisplacement",(function(){return kt})),t.d(n,"createApplyTransform",(function(){return ry})),t.d(n,"createColumnTransform",(function(){return gy})),t.d(n,"createFilterTransform",(function(){return ay})),t.d(n,"createForEachTransform",(function(){return cy})),t.d(n,"createIndexTransform",(function(){return ly})),t.d(n,"createMapTransform",(function(){return sy})),t.d(n,"createMaxTransform",(function(){return dy})),t.d(n,"createMeanTransform",(function(){return by})),t.d(n,"createMinTransform",(function(){return my})),t.d(n,"createRangeTransform",(function(){return yy})),t.d(n,"createRowTransform",(function(){return vy})),t.d(n,"createSubsetTransform",(function(){return fy})),t.d(n,"createConcatTransform",(function(){return py})),t.d(n,"createStdTransform",(function(){return xy})),t.d(n,"createSumTransform",(function(){return hy})),t.d(n,"createVarianceTransform",(function(){return wy})),t.d(n,"create",(function(){return rS})),t.d(n,"factory",(function(){return en}));var r={};t.r(r),t.d(r,"createTyped",(function(){return Xt})),t.d(r,"createResultSet",(function(){return rn})),t.d(r,"createBigNumberClass",(function(){return Hn})),t.d(r,"createComplexClass",(function(){return un})),t.d(r,"createFractionClass",(function(){return Vt})),t.d(r,"createRangeClass",(function(){return cn})),t.d(r,"createMatrixClass",(function(){return Gn})),t.d(r,"createDenseMatrixClass",(function(){return Wt})),t.d(r,"createClone",(function(){return Sa})),t.d(r,"createIsInteger",(function(){return sr})),t.d(r,"createIsNegative",(function(){return Wa})),t.d(r,"createIsNumeric",(function(){return ur})),t.d(r,"createHasNumericValue",(function(){return Ma})),t.d(r,"createIsPositive",(function(){return dr})),t.d(r,"createIsZero",(function(){return ps})),t.d(r,"createIsNaN",(function(){return mr})),t.d(r,"createTypeOf",(function(){return Da})),t.d(r,"createEqualScalar",(function(){return yr})),t.d(r,"createSparseMatrixClass",(function(){return Za})),t.d(r,"createNumber",(function(){return gr})),t.d(r,"createString",(function(){return Ea})),t.d(r,"createBoolean",(function(){return vr})),t.d(r,"createBignumber",(function(){return $s})),t.d(r,"createComplex",(function(){return xr})),t.d(r,"createFraction",(function(){return Aa})),t.d(r,"createMatrix",(function(){return Ja})),t.d(r,"createSplitUnit",(function(){return br})),t.d(r,"createUnaryMinus",(function(){return _a})),t.d(r,"createUnaryPlus",(function(){return Gr})),t.d(r,"createAbs",(function(){return ds})),t.d(r,"createApply",(function(){return $r})),t.d(r,"createAddScalar",(function(){return Oa})),t.d(r,"createCbrt",(function(){return Ya})),t.d(r,"createCeil",(function(){return fu})),t.d(r,"createCube",(function(){return Wr})),t.d(r,"createExp",(function(){return Ca})),t.d(r,"createExpm1",(function(){return Zr})),t.d(r,"createFix",(function(){return Ou})),t.d(r,"createFloor",(function(){return ms})),t.d(r,"createGcd",(function(){return to})),t.d(r,"createLcm",(function(){return Vs})),t.d(r,"createLog10",(function(){return Jr})),t.d(r,"createLog2",(function(){return Ta})),t.d(r,"createMod",(function(){return uo})),t.d(r,"createMultiplyScalar",(function(){return Yr})),t.d(r,"createMultiply",(function(){return hs})),t.d(r,"createNthRoot",(function(){return fo})),t.d(r,"createSign",(function(){return Xr})),t.d(r,"createSqrt",(function(){return Ia})),t.d(r,"createSquare",(function(){return Qr})),t.d(r,"createSubtract",(function(){return lu})),t.d(r,"createXgcd",(function(){return lo})),t.d(r,"createDotMultiply",(function(){return ys})),t.d(r,"createBitAnd",(function(){return po})),t.d(r,"createBitNot",(function(){return hi})),t.d(r,"createBitOr",(function(){return Ws})),t.d(r,"createBitXor",(function(){return ho})),t.d(r,"createArg",(function(){return yi})),t.d(r,"createConj",(function(){return ka})),t.d(r,"createIm",(function(){return gi})),t.d(r,"createRe",(function(){return gs})),t.d(r,"createNot",(function(){return Ni})),t.d(r,"createOr",(function(){return yo})),t.d(r,"createXor",(function(){return rc})),t.d(r,"createConcat",(function(){return go})),t.d(r,"createColumn",(function(){return sc})),t.d(r,"createCross",(function(){return du})),t.d(r,"createDiag",(function(){return xo})),t.d(r,"createFilter",(function(){return Si})),t.d(r,"createFlatten",(function(){return vs})),t.d(r,"createForEach",(function(){return Di})),t.d(r,"createGetMatrixDataType",(function(){return Ba})),t.d(r,"createIdentity",(function(){return bo})),t.d(r,"createKron",(function(){return Zs})),t.d(r,"createMap",(function(){return Ai})),t.d(r,"createOnes",(function(){return wo})),t.d(r,"createRange",(function(){return Cu})),t.d(r,"createReshape",(function(){return No})),t.d(r,"createResize",(function(){return bs})),t.d(r,"createRow",(function(){return ic})),t.d(r,"createSize",(function(){return Eo})),t.d(r,"createSqueeze",(function(){return ws})),t.d(r,"createSubset",(function(){return qo})),t.d(r,"createTranspose",(function(){return Js})),t.d(r,"createCtranspose",(function(){return mu})),t.d(r,"createZeros",(function(){return jo})),t.d(r,"createErf",(function(){return Oi})),t.d(r,"createMode",(function(){return qa})),t.d(r,"createProd",(function(){return Tu})),t.d(r,"createFormat",(function(){return qi})),t.d(r,"createPrint",(function(){return Ra})),t.d(r,"createTo",(function(){return Uo})),t.d(r,"createIsPrime",(function(){return Ri})),t.d(r,"createNumeric",(function(){return Ys})),t.d(r,"createDivideScalar",(function(){return hu})),t.d(r,"createPow",(function(){return Ns})),t.d(r,"createRound",(function(){return Vo})),t.d(r,"createLog",(function(){return lc})),t.d(r,"createLog1p",(function(){return Oc})),t.d(r,"createNthRoots",(function(){return yu})),t.d(r,"createDotPow",(function(){return Ss})),t.d(r,"createDotDivide",(function(){return Iu})),t.d(r,"createLsolve",(function(){return vu})),t.d(r,"createUsolve",(function(){return ac})),t.d(r,"createLeftShift",(function(){return Jo})),t.d(r,"createRightArithShift",(function(){return Ms})),t.d(r,"createRightLogShift",(function(){return Yo})),t.d(r,"createAnd",(function(){return Xs})),t.d(r,"createCompare",(function(){return Xo})),t.d(r,"createCompareNatural",(function(){return As})),t.d(r,"createCompareText",(function(){return Qo})),t.d(r,"createEqual",(function(){return xu})),t.d(r,"createEqualText",(function(){return _s})),t.d(r,"createSmaller",(function(){return Ko})),t.d(r,"createSmallerEq",(function(){return Qs})),t.d(r,"createLarger",(function(){return es})),t.d(r,"createLargerEq",(function(){return Os})),t.d(r,"createDeepEqual",(function(){return ku})),t.d(r,"createUnequal",(function(){return ns})),t.d(r,"createPartitionSelect",(function(){return Cs})),t.d(r,"createSort",(function(){return Ks})),t.d(r,"createMax",(function(){return bu})),t.d(r,"createMin",(function(){return nu})),t.d(r,"createImmutableDenseMatrixClass",(function(){return ts})),t.d(r,"createIndexClass",(function(){return Ts})),t.d(r,"createFibonacciHeapClass",(function(){return rs})),t.d(r,"createSpaClass",(function(){return uc})),t.d(r,"createUnitClass",(function(){return Fu})),t.d(r,"createUnitFunction",(function(){return oc})),t.d(r,"createSparse",(function(){return is})),t.d(r,"createCreateUnit",(function(){return ju})),t.d(r,"createAcos",(function(){return Pi})),t.d(r,"createAcosh",(function(){return za})),t.d(r,"createAcot",(function(){return ea})),t.d(r,"createAcoth",(function(){return as})),t.d(r,"createAcsc",(function(){return na})),t.d(r,"createAcsch",(function(){return Fa})),t.d(r,"createAsec",(function(){return ta})),t.d(r,"createAsech",(function(){return Is})),t.d(r,"createAsin",(function(){return ra})),t.d(r,"createAsinh",(function(){return ja})),t.d(r,"createAtan",(function(){return ia})),t.d(r,"createAtan2",(function(){return ss})),t.d(r,"createAtanh",(function(){return aa})),t.d(r,"createCos",(function(){return Ua})),t.d(r,"createCosh",(function(){return oa})),t.d(r,"createCot",(function(){return tu})),t.d(r,"createCoth",(function(){return sa})),t.d(r,"createCsc",(function(){return La})),t.d(r,"createCsch",(function(){return ua})),t.d(r,"createSec",(function(){return us})),t.d(r,"createSech",(function(){return ca})),t.d(r,"createSin",(function(){return Ha})),t.d(r,"createSinh",(function(){return fa})),t.d(r,"createTan",(function(){return ks})),t.d(r,"createTanh",(function(){return la})),t.d(r,"createSetCartesian",(function(){return wu})),t.d(r,"createSetDifference",(function(){return Bs})),t.d(r,"createSetDistinct",(function(){return ru})),t.d(r,"createSetIntersect",(function(){return qs})),t.d(r,"createSetIsSubset",(function(){return pc})),t.d(r,"createSetMultiplicity",(function(){return Rs})),t.d(r,"createSetPowerset",(function(){return iu})),t.d(r,"createSetSize",(function(){return Ps})),t.d(r,"createSetSymDifference",(function(){return Nu})),t.d(r,"createSetUnion",(function(){return Uu})),t.d(r,"createAdd",(function(){return cs})),t.d(r,"createHypot",(function(){return Su})),t.d(r,"createNorm",(function(){return zs})),t.d(r,"createDot",(function(){return fs})),t.d(r,"createTrace",(function(){return au})),t.d(r,"createIndex",(function(){return Fs})),t.d(r,"createNode",(function(){return Zm})),t.d(r,"createAccessorNode",(function(){return Mh})),t.d(r,"createArrayNode",(function(){return Jm})),t.d(r,"createAssignmentNode",(function(){return Ch})),t.d(r,"createBlockNode",(function(){return Ym})),t.d(r,"createConditionalNode",(function(){return yh})),t.d(r,"createConstantNode",(function(){return ah})),t.d(r,"createFunctionAssignmentNode",(function(){return xh})),t.d(r,"createIndexNode",(function(){return Ah})),t.d(r,"createObjectNode",(function(){return sh})),t.d(r,"createOperatorNode",(function(){return gh})),t.d(r,"createParenthesisNode",(function(){return uh})),t.d(r,"createRangeNode",(function(){return vh})),t.d(r,"createRelationalNode",(function(){return dh})),t.d(r,"createSymbolNode",(function(){return _h})),t.d(r,"createFunctionNode",(function(){return kh})),t.d(r,"createParse",(function(){return Rh})),t.d(r,"createCompile",(function(){return Lh})),t.d(r,"createEvaluate",(function(){return zh})),t.d(r,"createParserClass",(function(){return ey})),t.d(r,"createParser",(function(){return ny})),t.d(r,"createLup",(function(){return cc})),t.d(r,"createQr",(function(){return Du})),t.d(r,"createSlu",(function(){return ec})),t.d(r,"createLusolve",(function(){return hc})),t.d(r,"createHelpClass",(function(){return jh})),t.d(r,"createChainClass",(function(){return mh})),t.d(r,"createHelp",(function(){return Vh})),t.d(r,"createChain",(function(){return bh})),t.d(r,"createDet",(function(){return fc})),t.d(r,"createInv",(function(){return gc})),t.d(r,"createEigs",(function(){return Tc})),t.d(r,"createExpm",(function(){return xc})),t.d(r,"createSqrtm",(function(){return Pc})),t.d(r,"createDivide",(function(){return wc})),t.d(r,"createDistance",(function(){return Eu})),t.d(r,"createIntersect",(function(){return nc})),t.d(r,"createSum",(function(){return ou})),t.d(r,"createMean",(function(){return kc})),t.d(r,"createMedian",(function(){return Sc})),t.d(r,"createMad",(function(){return Uc})),t.d(r,"createVariance",(function(){return Dc})),t.d(r,"createQuantileSeq",(function(){return js})),t.d(r,"createStd",(function(){return qc})),t.d(r,"createCombinations",(function(){return ma})),t.d(r,"createCombinationsWithRep",(function(){return Ga})),t.d(r,"createGamma",(function(){return Gs})),t.d(r,"createFactorial",(function(){return su})),t.d(r,"createKldivergence",(function(){return Ac})),t.d(r,"createMultinomial",(function(){return Fc})),t.d(r,"createPermutations",(function(){return uu})),t.d(r,"createPickRandom",(function(){return ba})),t.d(r,"createRandom",(function(){return Va})),t.d(r,"createRandomInt",(function(){return Na})),t.d(r,"createStirlingS2",(function(){return Au})),t.d(r,"createBellNumbers",(function(){return tc})),t.d(r,"createCatalan",(function(){return _u})),t.d(r,"createComposition",(function(){return ls})),t.d(r,"createSimplify",(function(){return Qh})),t.d(r,"createDerivative",(function(){return ty})),t.d(r,"createRationalize",(function(){return Kh})),t.d(r,"createReviver",(function(){return hh})),t.d(r,"createReplacer",(function(){return $n})),t.d(r,"createE",(function(){return _n})),t.d(r,"createUppercaseE",(function(){return zn})),t.d(r,"createFalse",(function(){return Nn})),t.d(r,"createI",(function(){return Rn})),t.d(r,"createInfinity",(function(){return Mn})),t.d(r,"createLN10",(function(){return Tn})),t.d(r,"createLN2",(function(){return Cn})),t.d(r,"createLOG10E",(function(){return kn})),t.d(r,"createLOG2E",(function(){return In})),t.d(r,"createNaN",(function(){return Dn})),t.d(r,"createNull",(function(){return Sn})),t.d(r,"createPhi",(function(){return On})),t.d(r,"createPi",(function(){return En})),t.d(r,"createUppercasePi",(function(){return Pn})),t.d(r,"createSQRT1_2",(function(){return Bn})),t.d(r,"createSQRT2",(function(){return qn})),t.d(r,"createTau",(function(){return An})),t.d(r,"createTrue",(function(){return wn})),t.d(r,"createVersion",(function(){return Fn})),t.d(r,"createAtomicMass",(function(){return wt})),t.d(r,"createAvogadro",(function(){return Nt})),t.d(r,"createBohrMagneton",(function(){return nt})),t.d(r,"createBohrRadius",(function(){return st})),t.d(r,"createBoltzmann",(function(){return St})),t.d(r,"createClassicalElectronRadius",(function(){return ut})),t.d(r,"createConductanceQuantum",(function(){return tt})),t.d(r,"createCoulomb",(function(){return Kn})),t.d(r,"createDeuteronMass",(function(){return mt})),t.d(r,"createEfimovFactor",(function(){return bt})),t.d(r,"createElectricConstant",(function(){return Xn})),t.d(r,"createElectronMass",(function(){return ct})),t.d(r,"createElementaryCharge",(function(){return et})),t.d(r,"createFaraday",(function(){return Mt})),t.d(r,"createFermiCoupling",(function(){return ft})),t.d(r,"createFineStructure",(function(){return lt})),t.d(r,"createFirstRadiation",(function(){return Dt})),t.d(r,"createGasConstant",(function(){return At})),t.d(r,"createGravitationConstant",(function(){return Wn})),t.d(r,"createGravity",(function(){return Rt})),t.d(r,"createHartreeEnergy",(function(){return pt})),t.d(r,"createInverseConductanceQuantum",(function(){return rt})),t.d(r,"createKlitzing",(function(){return ot})),t.d(r,"createLoschmidt",(function(){return Et})),t.d(r,"createMagneticConstant",(function(){return Yn})),t.d(r,"createMagneticFluxQuantum",(function(){return it})),t.d(r,"createMolarMass",(function(){return Bt})),t.d(r,"createMolarMassC12",(function(){return qt})),t.d(r,"createMolarPlanckConstant",(function(){return _t})),t.d(r,"createMolarVolume",(function(){return Ot})),t.d(r,"createNeutronMass",(function(){return ht})),t.d(r,"createNuclearMagneton",(function(){return at})),t.d(r,"createPlanckCharge",(function(){return jt})),t.d(r,"createPlanckConstant",(function(){return Zn})),t.d(r,"createPlanckLength",(function(){return Pt})),t.d(r,"createPlanckMass",(function(){return zt})),t.d(r,"createPlanckTemperature",(function(){return Ut})),t.d(r,"createPlanckTime",(function(){return Ft})),t.d(r,"createProtonMass",(function(){return dt})),t.d(r,"createQuantumOfCirculation",(function(){return yt})),t.d(r,"createReducedPlanckConstant",(function(){return Jn})),t.d(r,"createRydberg",(function(){return gt})),t.d(r,"createSackurTetrode",(function(){return Ct})),t.d(r,"createSecondRadiation",(function(){return Tt})),t.d(r,"createSpeedOfLight",(function(){return Vn})),t.d(r,"createStefanBoltzmann",(function(){return It})),t.d(r,"createThomsonCrossSection",(function(){return vt})),t.d(r,"createVacuumImpedance",(function(){return Qn})),t.d(r,"createWeakMixingAngle",(function(){return xt})),t.d(r,"createWienDisplacement",(function(){return kt})),t.d(r,"createApplyTransform",(function(){return ry})),t.d(r,"createColumnTransform",(function(){return gy})),t.d(r,"createFilterTransform",(function(){return ay})),t.d(r,"createForEachTransform",(function(){return cy})),t.d(r,"createIndexTransform",(function(){return ly})),t.d(r,"createMapTransform",(function(){return sy})),t.d(r,"createMaxTransform",(function(){return dy})),t.d(r,"createMeanTransform",(function(){return by})),t.d(r,"createMinTransform",(function(){return my})),t.d(r,"createRangeTransform",(function(){return yy})),t.d(r,"createRowTransform",(function(){return vy})),t.d(r,"createSubsetTransform",(function(){return fy})),t.d(r,"createConcatTransform",(function(){return py})),t.d(r,"createStdTransform",(function(){return xy})),t.d(r,"createSumTransform",(function(){return hy})),t.d(r,"createVarianceTransform",(function(){return wy}));var i={epsilon:1e-12,matrix:"Matrix",number:"number",precision:64,predictable:!1,randomSeed:null};function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e){return"number"==typeof e}function s(e){return e&&!0===e.constructor.prototype.isBigNumber||!1}function u(e){return e&&"object"===a(e)&&!0===Object.getPrototypeOf(e).isComplex||!1}function c(e){return e&&"object"===a(e)&&!0===Object.getPrototypeOf(e).isFraction||!1}function f(e){return e&&!0===e.constructor.prototype.isUnit||!1}function l(e){return"string"==typeof e}var p=Array.isArray;function d(e){return e&&!0===e.constructor.prototype.isMatrix||!1}function m(e){return Array.isArray(e)||d(e)}function h(e){return e&&e.isDenseMatrix&&!0===e.constructor.prototype.isMatrix||!1}function y(e){return e&&e.isSparseMatrix&&!0===e.constructor.prototype.isMatrix||!1}function g(e){return e&&!0===e.constructor.prototype.isRange||!1}function v(e){return e&&!0===e.constructor.prototype.isIndex||!1}function x(e){return"boolean"==typeof e}function b(e){return e&&!0===e.constructor.prototype.isResultSet||!1}function w(e){return e&&!0===e.constructor.prototype.isHelp||!1}function N(e){return"function"==typeof e}function S(e){return e instanceof Date}function M(e){return e instanceof RegExp}function D(e){return!(!e||"object"!==a(e)||e.constructor!==Object||u(e)||c(e))}function E(e){return null===e}function A(e){return void 0===e}function _(e){return e&&!0===e.isAccessorNode&&!0===e.constructor.prototype.isNode||!1}function O(e){return e&&!0===e.isArrayNode&&!0===e.constructor.prototype.isNode||!1}function C(e){return e&&!0===e.isAssignmentNode&&!0===e.constructor.prototype.isNode||!1}function T(e){return e&&!0===e.isBlockNode&&!0===e.constructor.prototype.isNode||!1}function I(e){return e&&!0===e.isConditionalNode&&!0===e.constructor.prototype.isNode||!1}function k(e){return e&&!0===e.isConstantNode&&!0===e.constructor.prototype.isNode||!1}function B(e){return e&&!0===e.isFunctionAssignmentNode&&!0===e.constructor.prototype.isNode||!1}function q(e){return e&&!0===e.isFunctionNode&&!0===e.constructor.prototype.isNode||!1}function R(e){return e&&!0===e.isIndexNode&&!0===e.constructor.prototype.isNode||!1}function P(e){return e&&!0===e.isNode&&!0===e.constructor.prototype.isNode||!1}function z(e){return e&&!0===e.isObjectNode&&!0===e.constructor.prototype.isNode||!1}function F(e){return e&&!0===e.isOperatorNode&&!0===e.constructor.prototype.isNode||!1}function j(e){return e&&!0===e.isParenthesisNode&&!0===e.constructor.prototype.isNode||!1}function U(e){return e&&!0===e.isRangeNode&&!0===e.constructor.prototype.isNode||!1}function L(e){return e&&!0===e.isSymbolNode&&!0===e.constructor.prototype.isNode||!1}function H(e){return e&&!0===e.constructor.prototype.isChain||!1}function G(e){var n=a(e);return"object"===n?null===e?"null":Array.isArray(e)?"Array":e instanceof Date?"Date":e instanceof RegExp?"RegExp":s(e)?"BigNumber":u(e)?"Complex":c(e)?"Fraction":d(e)?"Matrix":f(e)?"Unit":v(e)?"Index":g(e)?"Range":b(e)?"ResultSet":P(e)?e.type:H(e)?"Chain":w(e)?"Help":"Object":"function"===n?"Function":n}function $(e){return($="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function V(e){var n=$(e);if("number"===n||"string"===n||"boolean"===n||null==e)return e;if("function"==typeof e.clone)return e.clone();if(Array.isArray(e))return e.map((function(e){return V(e)}));if(e instanceof Date)return new Date(e.valueOf());if(s(e))return e;if(e instanceof RegExp)throw new TypeError("Cannot clone "+e);return W(e,V)}function W(e,n){var t={};for(var r in e)Q(e,r)&&(t[r]=n(e[r]));return t}function Z(e,n){for(var t in n)Q(n,t)&&(e[t]=n[t]);return e}function J(e,n){var t,r,i;if(Array.isArray(e)){if(!Array.isArray(n))return!1;if(e.length!==n.length)return!1;for(r=0,i=e.length;r<i;r++)if(!J(e[r],n[r]))return!1;return!0}if("function"==typeof e)return e===n;if(e instanceof Object){if(Array.isArray(n)||!(n instanceof Object))return!1;for(t in e)if(!(t in n)||!J(e[t],n[t]))return!1;for(t in n)if(!(t in e)||!J(e[t],n[t]))return!1;return!0}return e===n}function Y(e){var n={};return function e(n,t){for(var r in n)if(Q(n,r)){var i=n[r];"object"===$(i)&&null!==i?e(i,t):t[r]=i}}(e,n),n}function X(e,n,t){var r,i=!0;Object.defineProperty(e,n,{get:function(){return i&&(r=t(),i=!1),r},set:function(e){r=e,i=!1},configurable:!0,enumerable:!0})}function Q(e,n){return e&&Object.hasOwnProperty.call(e,n)}function K(e){return Object.keys(e).map((function(n){return e[n]}))}var ee=["Matrix","Array"],ne=["number","BigNumber","Fraction"];function te(e,n){function t(t){if(t){var r=W(e,V);re(t,"matrix",ee),re(t,"number",ne),function e(n,t){if(Array.isArray(t))throw new TypeError("Arrays are not supported by deepExtend");for(var r in t)if(Q(t,r))if(t[r]&&t[r].constructor===Object)void 0===n[r]&&(n[r]={}),n[r]&&n[r].constructor===Object?e(n[r],t[r]):n[r]=t[r];else{if(Array.isArray(t[r]))throw new TypeError("Arrays are not supported by deepExtend");n[r]=t[r]}return n}(e,t);var i=W(e,V),a=W(t,V);return n("config",i,r,a),i}return W(e,V)}return t.MATRIX_OPTIONS=ee,t.NUMBER_OPTIONS=ne,Object.keys(i).forEach((function(n){Object.defineProperty(t,n,{get:function(){return e[n]},enumerable:!0,configurable:!0})})),t}function re(e,n,t){var r,i;void 0!==e[n]&&(r=t,i=e[n],-1===r.indexOf(i))&&console.warn('Warning: Unknown value "'+e[n]+'" for configuration option "'+n+'". Available options: '+t.map((function(e){return JSON.stringify(e)})).join(", ")+".")}function ie(){return(ie=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}var ae=function(e){if(e)throw new Error("The global config is readonly. \nPlease create a mathjs instance if you want to change the default configuration. \nExample:\n\n  import { create, all } from 'mathjs';\n  const mathjs = create(all);\n  mathjs.config({ number: 'BigNumber' });\n");return Object.freeze(i)};function oe(e){return"boolean"==typeof e||!!isFinite(e)&&e===Math.round(e)}ie(ae,i,{MATRIX_OPTIONS:ee,NUMBER_OPTIONS:ne});var se=Math.sign||function(e){return e>0?1:e<0?-1:0},ue=Math.log2||function(e){return Math.log(e)/Math.LN2},ce=Math.log10||function(e){return Math.log(e)/Math.LN10},fe=Math.log1p||function(e){return Math.log(e+1)},le=Math.cbrt||function(e){if(0===e)return e;var n,t=e<0;return t&&(e=-e),n=isFinite(e)?(e/((n=Math.exp(Math.log(e)/3))*n)+2*n)/3:e,t?-n:n},pe=Math.expm1||function(e){return e>=2e-4||e<=-2e-4?Math.exp(e)-1:e+e*e/2+e*e*e/6};function de(e,n){if("function"==typeof n)return n(e);if(e===1/0)return"Infinity";if(e===-1/0)return"-Infinity";if(isNaN(e))return"NaN";var t,r="auto";switch(n&&(n.notation&&(r=n.notation),o(n)?t=n:o(n.precision)&&(t=n.precision)),r){case"fixed":return he(e,t);case"exponential":return ye(e,t);case"engineering":return function(e,n){if(isNaN(e)||!isFinite(e))return String(e);var t=ge(me(e),n),r=t.exponent,i=t.coefficients,a=r%3==0?r:r<0?r-3-r%3:r-r%3;if(o(n))for(;n>i.length||r-a+1>i.length;)i.push(0);else for(var s=Math.abs(r-a)-(i.length-1),u=0;u<s;u++)i.push(0);var c=Math.abs(r-a),f=1;for(;c>0;)f++,c--;var l=i.slice(f).join(""),p=o(n)&&l.length||l.match(/[1-9]/)?"."+l:"",d=i.slice(0,f).join("")+p+"e"+(r>=0?"+":"")+a.toString();return t.sign+d}(e,t);case"auto":return function(e,n,t){if(isNaN(e)||!isFinite(e))return String(e);var r=t&&void 0!==t.lowerExp?t.lowerExp:-3,i=t&&void 0!==t.upperExp?t.upperExp:5,a=me(e),o=n?ge(a,n):a;if(o.exponent<r||o.exponent>=i)return ye(e,n);var s=o.coefficients,u=o.exponent;s.length<n&&(s=s.concat(ve(n-s.length))),s=s.concat(ve(u-s.length+1+(s.length<n?n-s.length:0))),s=ve(-u).concat(s);var c=u>0?u:0;return c<s.length-1&&s.splice(c+1,0,"."),o.sign+s.join("")}(e,t,n&&n).replace(/((\.\d*?)(0+))($|e)/,(function(){var e=arguments[2],n=arguments[4];return"."!==e?e+n:n}));default:throw new Error('Unknown notation "'+r+'". Choose "auto", "exponential", or "fixed".')}}function me(e){var n=String(e).toLowerCase().match(/^0*?(-?)(\d+\.?\d*)(e([+-]?\d+))?$/);if(!n)throw new SyntaxError("Invalid number "+e);var t=n[1],r=n[2],i=parseFloat(n[4]||"0"),a=r.indexOf(".");i+=-1!==a?a-1:r.length-1;var o=r.replace(".","").replace(/^0*/,(function(e){return i-=e.length,""})).replace(/0*$/,"").split("").map((function(e){return parseInt(e)}));return 0===o.length&&(o.push(0),i++),{sign:t,coefficients:o,exponent:i}}function he(e,n){if(isNaN(e)||!isFinite(e))return String(e);var t=me(e),r="number"==typeof n?ge(t,t.exponent+1+n):t,i=r.coefficients,a=r.exponent+1,o=a+(n||0);return i.length<o&&(i=i.concat(ve(o-i.length))),a<0&&(i=ve(1-a).concat(i),a=1),a<i.length&&i.splice(a,0,0===a?"0.":"."),r.sign+i.join("")}function ye(e,n){if(isNaN(e)||!isFinite(e))return String(e);var t=me(e),r=n?ge(t,n):t,i=r.coefficients,a=r.exponent;i.length<n&&(i=i.concat(ve(n-i.length)));var o=i.shift();return r.sign+o+(i.length>0?"."+i.join(""):"")+"e"+(a>=0?"+":"")+a}function ge(e,n){for(var t={sign:e.sign,coefficients:e.coefficients,exponent:e.exponent},r=t.coefficients;n<=0;)r.unshift(0),t.exponent++,n++;if(r.length>n&&r.splice(n,r.length-n)[0]>=5){var i=n-1;for(r[i]++;10===r[i];)r.pop(),0===i&&(r.unshift(0),t.exponent++,i++),r[--i]++}return t}function ve(e){for(var n=[],t=0;t<e;t++)n.push(0);return n}var xe=Number.EPSILON||2220446049250313e-31;function be(e,n,t){if(null==t)return e===n;if(e===n)return!0;if(isNaN(e)||isNaN(n))return!1;if(isFinite(e)&&isFinite(n)){var r=Math.abs(e-n);return r<xe||r<=Math.max(Math.abs(e),Math.abs(n))*t}return!1}var we=Math.acosh||function(e){return Math.log(Math.sqrt(e*e-1)+e)},Ne=Math.asinh||function(e){return Math.log(Math.sqrt(e*e+1)+e)},Se=Math.atanh||function(e){return Math.log((1+e)/(1-e))/2},Me=Math.cosh||function(e){return(Math.exp(e)+Math.exp(-e))/2},De=Math.sinh||function(e){return(Math.exp(e)-Math.exp(-e))/2},Ee=Math.tanh||function(e){var n=Math.exp(2*e);return(n-1)/(n+1)};function Ae(e,n){if("function"==typeof n)return n(e);if(!e.isFinite())return e.isNaN()?"NaN":e.gt(0)?"Infinity":"-Infinity";var t,r="auto";switch(void 0!==n&&(n.notation&&(r=n.notation),"number"==typeof n?t=n:n.precision&&(t=n.precision)),r){case"fixed":return function(e,n){return e.toFixed(n)}(e,t);case"exponential":return _e(e,t);case"engineering":return function(e,n){var t=e.e,r=t%3==0?t:t<0?t-3-t%3:t-t%3,i=e.mul(Math.pow(10,-r)),a=i.toPrecision(n);-1!==a.indexOf("e")&&(a=i.toString());return a+"e"+(t>=0?"+":"")+r.toString()}(e,t);case"auto":var i=n&&void 0!==n.lowerExp?n.lowerExp:-3,a=n&&void 0!==n.upperExp?n.upperExp:5;if(e.isZero())return"0";var o=e.toSignificantDigits(t),s=o.e;return(s>=i&&s<a?o.toFixed():_e(e,t)).replace(/((\.\d*?)(0+))($|e)/,(function(){var e=arguments[2],n=arguments[4];return"."!==e?e+n:n}));default:throw new Error('Unknown notation "'+r+'". Choose "auto", "exponential", or "fixed".')}}function _e(e,n){return void 0!==n?e.toExponential(n-1):e.toExponential()}function Oe(e){return(Oe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ce(e,n){var t=e.length-n.length,r=e.length;return e.substring(t,r)===n}function Te(e,n){return"number"==typeof e?de(e,n):s(e)?Ae(e,n):function(e){return e&&"object"===Oe(e)&&"number"==typeof e.s&&"number"==typeof e.n&&"number"==typeof e.d||!1}(e)?n&&"decimal"===n.fraction?e.toString():e.s*e.n+"/"+e.d:Array.isArray(e)?function e(n,t){if(Array.isArray(n)){for(var r="[",i=n.length,a=0;a<i;a++)0!==a&&(r+=", "),r+=e(n[a],t);return r+="]"}return Te(n,t)}(e,n):l(e)?'"'+e+'"':"function"==typeof e?e.syntax?String(e.syntax):"function":e&&"object"===Oe(e)?"function"==typeof e.format?e.format(n):e&&e.toString(n)!=={}.toString()?e.toString(n):"{"+Object.keys(e).map((function(t){return'"'+t+'": '+Te(e[t],n)})).join(", ")+"}":String(e)}function Ie(e){for(var n=String(e),t="",r=0;r<n.length;){var i=n.charAt(r);"\\"===i?(t+=i,r++,""!==(i=n.charAt(r))&&-1!=='"\\/bfnrtu'.indexOf(i)||(t+="\\"),t+=i):t+='"'===i?'\\"':i,r++}return'"'+t+'"'}function ke(e){var n=String(e);return n=n.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function Be(e,n){if(!l(e))throw new TypeError("Unexpected type of argument in function compareText (expected: string or Array or Matrix, actual: "+G(e)+", index: 0)");if(!l(n))throw new TypeError("Unexpected type of argument in function compareText (expected: string or Array or Matrix, actual: "+G(n)+", index: 1)");return e===n?0:e>n?1:-1}function qe(e,n,t){if(!(this instanceof qe))throw new SyntaxError("Constructor must be called with the new operator");this.actual=e,this.expected=n,this.relation=t,this.message="Dimension mismatch ("+(Array.isArray(e)?"["+e.join(", ")+"]":e)+" "+(this.relation||"!=")+" "+(Array.isArray(n)?"["+n.join(", ")+"]":n)+")",this.stack=(new Error).stack}function Re(e,n,t){if(!(this instanceof Re))throw new SyntaxError("Constructor must be called with the new operator");this.index=e,arguments.length<3?(this.min=0,this.max=n):(this.min=n,this.max=t),void 0!==this.min&&this.index<this.min?this.message="Index out of range ("+this.index+" < "+this.min+")":void 0!==this.max&&this.index>=this.max?this.message="Index out of range ("+this.index+" > "+(this.max-1)+")":this.message="Index out of range ("+this.index+")",this.stack=(new Error).stack}function Pe(e){for(var n=[];Array.isArray(e);)n.push(e.length),e=e[0];return n}function ze(e,n){if(0===n.length){if(Array.isArray(e))throw new qe(e.length,0)}else!function e(n,t,r){var i,a=n.length;if(a!==t[r])throw new qe(a,t[r]);if(r<t.length-1){var o=r+1;for(i=0;i<a;i++){var s=n[i];if(!Array.isArray(s))throw new qe(t.length-1,t.length,"<");e(n[i],t,o)}}else for(i=0;i<a;i++)if(Array.isArray(n[i]))throw new qe(t.length+1,t.length,">")}(e,n,0)}function Fe(e,n){if(!o(e)||!oe(e))throw new TypeError("Index must be an integer (value: "+e+")");if(e<0||"number"==typeof n&&e>=n)throw new Re(e,n)}function je(e,n,t){if(!Array.isArray(e)||!Array.isArray(n))throw new TypeError("Array expected");if(0===n.length)throw new Error("Resizing to scalar is not supported");return n.forEach((function(e){if(!o(e)||!oe(e)||e<0)throw new TypeError("Invalid size, must contain positive integers (size: "+Te(n)+")")})),function e(n,t,r,i){var a,o,s=n.length,u=t[r],c=Math.min(s,u);if(n.length=u,r<t.length-1){var f=r+1;for(a=0;a<c;a++)o=n[a],Array.isArray(o)||(o=[o],n[a]=o),e(o,t,f,i);for(a=c;a<u;a++)o=[],n[a]=o,e(o,t,f,i)}else{for(a=0;a<c;a++)for(;Array.isArray(n[a]);)n[a]=n[a][0];for(a=c;a<u;a++)n[a]=i}}(e,n,0,void 0!==t?t:0),e}function Ue(e,n){var t,r=Ge(e);function i(e){return e.reduce((function(e,n){return e*n}))}if(!Array.isArray(e)||!Array.isArray(n))throw new TypeError("Array expected");if(0===n.length)throw new qe(0,i(Pe(e)),"!=");for(var a=1,o=0;o<n.length;o++)a*=n[o];if(r.length!==a)throw new qe(i(n),i(Pe(e)),"!=");try{t=function(e,n){for(var t,r=e,i=n.length-1;i>0;i--){var a=n[i];t=[];for(var o=r.length/a,s=0;s<o;s++)t.push(r.slice(s*a,(s+1)*a));r=t}return r}(r,n)}catch(t){if(t instanceof qe)throw new qe(i(n),i(Pe(e)),"!=");throw t}return t}function Le(e,n){for(var t=n||Pe(e);Array.isArray(e)&&1===e.length;)e=e[0],t.shift();for(var r=t.length;1===t[r-1];)r--;return r<t.length&&(e=function e(n,t,r){var i,a;if(r<t){var o=r+1;for(i=0,a=n.length;i<a;i++)n[i]=e(n[i],t,o)}else for(;Array.isArray(n);)n=n[0];return n}(e,r,0),t.length=r),e}function He(e,n,t,r){var i=r||Pe(e);if(t)for(var a=0;a<t;a++)e=[e],i.unshift(1);for(e=function e(n,t,r){var i,a;if(Array.isArray(n)){var o=r+1;for(i=0,a=n.length;i<a;i++)n[i]=e(n[i],t,o)}else for(var s=r;s<t;s++)n=[n];return n}(e,n,0);i.length<n;)i.push(1);return e}function Ge(e){if(!Array.isArray(e))return e;var n=[];return e.forEach((function e(t){Array.isArray(t)?t.forEach(e):n.push(t)})),n}function $e(e,n){return Array.prototype.map.call(e,n)}function Ve(e,n){Array.prototype.forEach.call(e,n)}function We(e,n){if(1!==Pe(e).length)throw new Error("Only one dimensional matrices supported");return Array.prototype.filter.call(e,n)}function Ze(e,n){if(1!==Pe(e).length)throw new Error("Only one dimensional matrices supported");return Array.prototype.filter.call(e,(function(e){return n.test(e)}))}function Je(e,n){return Array.prototype.join.call(e,n)}function Ye(e){if(!Array.isArray(e))throw new TypeError("Array input expected");if(0===e.length)return e;var n=[],t=0;n[0]={value:e[0],identifier:0};for(var r=1;r<e.length;r++)e[r]===e[r-1]?t++:t=0,n.push({value:e[r],identifier:t});return n}function Xe(e){if(!Array.isArray(e))throw new TypeError("Array input expected");if(0===e.length)return e;for(var n=[],t=0;t<e.length;t++)n.push(e[t].value);return n}function Qe(e,n){for(var t,r=0,i=0;i<e.length;i++){var a=e[i],o=Array.isArray(a);if(0===i&&o&&(r=a.length),o&&a.length!==r)return;var s=o?Qe(a,n):n(a);if(void 0===t)t=s;else if(t!==s)return"mixed"}return t}function Ke(e,n){return-1!==e.indexOf(n)}function en(e,n,t,r){function i(r){var i=function(e,n){for(var t={},r=0;r<n.length;r++){var i=n[r],a=e[i];void 0!==a&&(t[i]=a)}return t}(r,n.map(tn));return function(e,n,t){if(!n.filter((function(e){return!function(e){return e&&"?"===e[0]}(e)})).every((function(e){return void 0!==t[e]}))){var r=n.filter((function(e){return void 0===t[e]}));throw new Error('Cannot create function "'.concat(e,'", ')+"some dependencies are missing: ".concat(r.map((function(e){return'"'.concat(e,'"')})).join(", "),"."))}}(e,n,r),t(i)}return i.isFactory=!0,i.fn=e,i.dependencies=n.slice().sort(),r&&(i.meta=r),i}function nn(e){return"function"==typeof e&&"string"==typeof e.fn&&Array.isArray(e.dependencies)}function tn(e){return e&&"?"===e[0]?e.slice(1):e}qe.prototype=new RangeError,qe.prototype.constructor=RangeError,qe.prototype.name="DimensionError",qe.prototype.isDimensionError=!0,Re.prototype=new RangeError,Re.prototype.constructor=RangeError,Re.prototype.name="IndexError",Re.prototype.isIndexError=!0;var rn=en("ResultSet",[],(function(){function e(n){if(!(this instanceof e))throw new SyntaxError("Constructor must be called with the new operator");this.entries=n||[]}return e.prototype.type="ResultSet",e.prototype.isResultSet=!0,e.prototype.valueOf=function(){return this.entries},e.prototype.toString=function(){return"["+this.entries.join(", ")+"]"},e.prototype.toJSON=function(){return{mathjs:"ResultSet",entries:this.entries}},e.fromJSON=function(n){return new e(n.entries)},e}),{isClass:!0}),an=t(12),on=t.n(an);function sn(e){return(sn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var un=en("Complex",[],(function(){return on.a.prototype.type="Complex",on.a.prototype.isComplex=!0,on.a.prototype.toJSON=function(){return{mathjs:"Complex",re:this.re,im:this.im}},on.a.prototype.toPolar=function(){return{r:this.abs(),phi:this.arg()}},on.a.prototype.format=function(e){var n=this.im,t=this.re,r=de(this.re,e),i=de(this.im,e),a=o(e)?e:e?e.precision:null;if(null!==a){var s=Math.pow(10,-a);Math.abs(t/n)<s&&(t=0),Math.abs(n/t)<s&&(n=0)}return 0===n?r:0===t?1===n?"i":-1===n?"-i":i+"i":n<0?-1===n?r+" - i":r+" - "+i.substring(1)+"i":1===n?r+" + i":r+" + "+i+"i"},on.a.fromPolar=function(e){switch(arguments.length){case 1:var n=arguments[0];if("object"===sn(n))return on()(n);throw new TypeError("Input has to be an object with r and phi keys.");case 2:var t=arguments[0],r=arguments[1];if(o(t)){if(f(r)&&r.hasBase("ANGLE")&&(r=r.toNumber("rad")),o(r))return new on.a({r:t,phi:r});throw new TypeError("Phi is not a number nor an angle unit.")}throw new TypeError("Radius r is not a number.");default:throw new SyntaxError("Wrong number of arguments in function fromPolar")}},on.a.prototype.valueOf=on.a.prototype.toString,on.a.fromJSON=function(e){return new on.a(e)},on.a.compare=function(e,n){return e.re>n.re?1:e.re<n.re?-1:e.im>n.im?1:e.im<n.im?-1:0},on.a}),{isClass:!0}),cn=en("Range",[],(function(){function e(n,t,r){if(!(this instanceof e))throw new SyntaxError("Constructor must be called with the new operator");var i=null!=n,a=null!=t,o=null!=r;if(i)if(s(n))n=n.toNumber();else if("number"!=typeof n)throw new TypeError("Parameter start must be a number");if(a)if(s(t))t=t.toNumber();else if("number"!=typeof t)throw new TypeError("Parameter end must be a number");if(o)if(s(r))r=r.toNumber();else if("number"!=typeof r)throw new TypeError("Parameter step must be a number");this.start=i?parseFloat(n):0,this.end=a?parseFloat(t):0,this.step=o?parseFloat(r):1}return e.prototype.type="Range",e.prototype.isRange=!0,e.parse=function(n){if("string"!=typeof n)return null;var t=n.split(":").map((function(e){return parseFloat(e)}));if(t.some((function(e){return isNaN(e)})))return null;switch(t.length){case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[2],t[1]);default:return null}},e.prototype.clone=function(){return new e(this.start,this.end,this.step)},e.prototype.size=function(){var e=0,n=this.start,t=this.step,r=this.end-n;return se(t)===se(r)?e=Math.ceil(r/t):0===r&&(e=0),isNaN(e)&&(e=0),[e]},e.prototype.min=function(){var e=this.size()[0];return e>0?this.step>0?this.start:this.start+(e-1)*this.step:void 0},e.prototype.max=function(){var e=this.size()[0];return e>0?this.step>0?this.start+(e-1)*this.step:this.start:void 0},e.prototype.forEach=function(e){var n=this.start,t=this.step,r=this.end,i=0;if(t>0)for(;n<r;)e(n,[i],this),n+=t,i++;else if(t<0)for(;n>r;)e(n,[i],this),n+=t,i++},e.prototype.map=function(e){var n=[];return this.forEach((function(t,r,i){n[r[0]]=e(t,r,i)})),n},e.prototype.toArray=function(){var e=[];return this.forEach((function(n,t){e[t[0]]=n})),e},e.prototype.valueOf=function(){return this.toArray()},e.prototype.format=function(e){var n=de(this.start,e);return 1!==this.step&&(n+=":"+de(this.step,e)),n+=":"+de(this.end,e)},e.prototype.toString=function(){return this.format()},e.prototype.toJSON=function(){return{mathjs:"Range",start:this.start,end:this.end,step:this.step}},e.fromJSON=function(n){return new e(n.start,n.end,n.step)},e}),{isClass:!0});function fn(e){return(fn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ln(e,n){return function t(){"object"!==fn(t.cache)&&(t.cache={});for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var a=n?n(r):JSON.stringify(r);return a in t.cache||(t.cache[a]=e.apply(e,r)),t.cache[a]}}function pn(e){return Object.keys(e.signatures||{}).reduce((function(e,n){var t=(n.match(/,/g)||[]).length+1;return Math.max(e,t)}),-1)}var dn=ln((function(e){return new e(1).exp()}),gn),mn=ln((function(e){return new e(1).plus(new e(5).sqrt()).div(2)}),gn),hn=ln((function(e){return e.acos(-1)}),gn),yn=ln((function(e){return hn(e).times(2)}),gn);function gn(e){return e[0].precision}var vn=Math.PI,xn=2*Math.PI,bn=Math.E,wn=en("true",[],(function(){return!0})),Nn=en("false",[],(function(){return!1})),Sn=en("null",[],(function(){return null})),Mn=jn("Infinity",["config","?BigNumber"],(function(e){var n=e.config,t=e.BigNumber;return"BigNumber"===n.number?new t(1/0):1/0})),Dn=jn("NaN",["config","?BigNumber"],(function(e){var n=e.config,t=e.BigNumber;return"BigNumber"===n.number?new t(NaN):NaN})),En=jn("pi",["config","?BigNumber"],(function(e){var n=e.config,t=e.BigNumber;return"BigNumber"===n.number?hn(t):vn})),An=jn("tau",["config","?BigNumber"],(function(e){var n=e.config,t=e.BigNumber;return"BigNumber"===n.number?yn(t):xn})),_n=jn("e",["config","?BigNumber"],(function(e){var n=e.config,t=e.BigNumber;return"BigNumber"===n.number?dn(t):bn})),On=jn("phi",["config","?BigNumber"],(function(e){var n=e.config,t=e.BigNumber;return"BigNumber"===n.number?mn(t):1.618033988749895})),Cn=jn("LN2",["config","?BigNumber"],(function(e){var n=e.config,t=e.BigNumber;return"BigNumber"===n.number?new t(2).ln():Math.LN2})),Tn=jn("LN10",["config","?BigNumber"],(function(e){var n=e.config,t=e.BigNumber;return"BigNumber"===n.number?new t(10).ln():Math.LN10})),In=jn("LOG2E",["config","?BigNumber"],(function(e){var n=e.config,t=e.BigNumber;return"BigNumber"===n.number?new t(1).div(new t(2).ln()):Math.LOG2E})),kn=jn("LOG10E",["config","?BigNumber"],(function(e){var n=e.config,t=e.BigNumber;return"BigNumber"===n.number?new t(1).div(new t(10).ln()):Math.LOG10E})),Bn=jn("SQRT1_2",["config","?BigNumber"],(function(e){var n=e.config,t=e.BigNumber;return"BigNumber"===n.number?new t("0.5").sqrt():Math.SQRT1_2})),qn=jn("SQRT2",["config","?BigNumber"],(function(e){var n=e.config,t=e.BigNumber;return"BigNumber"===n.number?new t(2).sqrt():Math.SQRT2})),Rn=jn("i",["Complex"],(function(e){return e.Complex.I})),Pn=en("PI",["pi"],(function(e){return e.pi})),zn=en("E",["e"],(function(e){return e.e})),Fn=en("version",[],(function(){return"7.0.2"}));function jn(e,n,t){return en(e,n,t,{recreateOnConfigChange:!0})}var Un=t(150),Ln=t.n(Un),Hn=en("BigNumber",["?on","config"],(function(e){var n=e.on,t=e.config,r=Ln.a.clone({precision:t.precision});return r.prototype.type="BigNumber",r.prototype.isBigNumber=!0,r.prototype.toJSON=function(){return{mathjs:"BigNumber",value:this.toString()}},r.fromJSON=function(e){return new r(e.value)},n&&n("config",(function(e,n){e.precision!==n.precision&&r.config({precision:e.precision})})),r}),{isClass:!0}),Gn=en("Matrix",[],(function(){function e(){if(!(this instanceof e))throw new SyntaxError("Constructor must be called with the new operator")}return e.prototype.type="Matrix",e.prototype.isMatrix=!0,e.prototype.storage=function(){throw new Error("Cannot invoke storage on a Matrix interface")},e.prototype.datatype=function(){throw new Error("Cannot invoke datatype on a Matrix interface")},e.prototype.create=function(e,n){throw new Error("Cannot invoke create on a Matrix interface")},e.prototype.subset=function(e,n,t){throw new Error("Cannot invoke subset on a Matrix interface")},e.prototype.get=function(e){throw new Error("Cannot invoke get on a Matrix interface")},e.prototype.set=function(e,n,t){throw new Error("Cannot invoke set on a Matrix interface")},e.prototype.resize=function(e,n){throw new Error("Cannot invoke resize on a Matrix interface")},e.prototype.reshape=function(e,n){throw new Error("Cannot invoke reshape on a Matrix interface")},e.prototype.clone=function(){throw new Error("Cannot invoke clone on a Matrix interface")},e.prototype.size=function(){throw new Error("Cannot invoke size on a Matrix interface")},e.prototype.map=function(e,n){throw new Error("Cannot invoke map on a Matrix interface")},e.prototype.forEach=function(e){throw new Error("Cannot invoke forEach on a Matrix interface")},e.prototype.toArray=function(){throw new Error("Cannot invoke toArray on a Matrix interface")},e.prototype.valueOf=function(){throw new Error("Cannot invoke valueOf on a Matrix interface")},e.prototype.format=function(e){throw new Error("Cannot invoke format on a Matrix interface")},e.prototype.toString=function(){throw new Error("Cannot invoke toString on a Matrix interface")},e}),{isClass:!0}),$n=en("replacer",[],(function(){return function(e,n){return"number"!=typeof n||isFinite(n)&&!isNaN(n)?n:{mathjs:"number",value:String(n)}}})),Vn=Lt("speedOfLight","299792458","m s^-1"),Wn=Lt("gravitationConstant","6.67430e-11","m^3 kg^-1 s^-2"),Zn=Lt("planckConstant","6.62607015e-34","J s"),Jn=Lt("reducedPlanckConstant","1.0545718176461565e-34","J s"),Yn=Lt("magneticConstant","1.25663706212e-6","N A^-2"),Xn=Lt("electricConstant","8.8541878128e-12","F m^-1"),Qn=Lt("vacuumImpedance","376.730313667","ohm"),Kn=Lt("coulomb","8.987551792261171e9","N m^2 C^-2"),et=Lt("elementaryCharge","1.602176634e-19","C"),nt=Lt("bohrMagneton","9.2740100783e-24","J T^-1"),tt=Lt("conductanceQuantum","7.748091729863649e-5","S"),rt=Lt("inverseConductanceQuantum","12906.403729652257","ohm"),it=Lt("magneticFluxQuantum","2.0678338484619295e-15","Wb"),at=Lt("nuclearMagneton","5.0507837461e-27","J T^-1"),ot=Lt("klitzing","25812.807459304513","ohm"),st=Lt("bohrRadius","5.29177210903e-11","m"),ut=Lt("classicalElectronRadius","2.8179403262e-15","m"),ct=Lt("electronMass","9.1093837015e-31","kg"),ft=Lt("fermiCoupling","1.1663787e-5","GeV^-2"),lt=Ht("fineStructure",.0072973525693),pt=Lt("hartreeEnergy","4.3597447222071e-18","J"),dt=Lt("protonMass","1.67262192369e-27","kg"),mt=Lt("deuteronMass","3.3435830926e-27","kg"),ht=Lt("neutronMass","1.6749271613e-27","kg"),yt=Lt("quantumOfCirculation","3.6369475516e-4","m^2 s^-1"),gt=Lt("rydberg","10973731.568160","m^-1"),vt=Lt("thomsonCrossSection","6.6524587321e-29","m^2"),xt=Ht("weakMixingAngle",.2229),bt=Ht("efimovFactor",22.7),wt=Lt("atomicMass","1.66053906660e-27","kg"),Nt=Lt("avogadro","6.02214076e23","mol^-1"),St=Lt("boltzmann","1.380649e-23","J K^-1"),Mt=Lt("faraday","96485.33212331001","C mol^-1"),Dt=Lt("firstRadiation","3.7417718521927573e-16","W m^2"),Et=Lt("loschmidt","2.686780111798444e25","m^-3"),At=Lt("gasConstant","8.31446261815324","J K^-1 mol^-1"),_t=Lt("molarPlanckConstant","3.990312712893431e-10","J s mol^-1"),Ot=Lt("molarVolume","0.022413969545014137","m^3 mol^-1"),Ct=Ht("sackurTetrode",-1.16487052358),Tt=Lt("secondRadiation","0.014387768775039337","m K"),It=Lt("stefanBoltzmann","5.67037441918443e-8","W m^-2 K^-4"),kt=Lt("wienDisplacement","2.897771955e-3","m K"),Bt=Lt("molarMass","0.99999999965e-3","kg mol^-1"),qt=Lt("molarMassC12","11.9999999958e-3","kg mol^-1"),Rt=Lt("gravity","9.80665","m s^-2"),Pt=Lt("planckLength","1.616255e-35","m"),zt=Lt("planckMass","2.176435e-8","kg"),Ft=Lt("planckTime","5.391245e-44","s"),jt=Lt("planckCharge","1.87554603778e-18","C"),Ut=Lt("planckTemperature","1.416785e+32","K");function Lt(e,n,t){return en(e,["config","Unit","BigNumber"],(function(e){var r=e.config,i=e.Unit,a=e.BigNumber,o=new i("BigNumber"===r.number?new a(n):parseFloat(n),t);return o.fixPrefix=!0,o}))}function Ht(e,n){return en(e,["config","BigNumber"],(function(e){var t=e.config,r=e.BigNumber;return"BigNumber"===t.number?new r(n):n}))}var Gt=t(47),$t=t.n(Gt),Vt=en("Fraction",[],(function(){return $t.a.prototype.type="Fraction",$t.a.prototype.isFraction=!0,$t.a.prototype.toJSON=function(){return{mathjs:"Fraction",n:this.s*this.n,d:this.d}},$t.a.fromJSON=function(e){return new $t.a(e)},$t.a}),{isClass:!0}),Wt=en("DenseMatrix",["Matrix"],(function(e){var n=e.Matrix;function t(e,n){if(!(this instanceof t))throw new SyntaxError("Constructor must be called with the new operator");if(n&&!l(n))throw new Error("Invalid datatype: "+n);if(d(e))"DenseMatrix"===e.type?(this._data=V(e._data),this._size=V(e._size),this._datatype=n||e._datatype):(this._data=e.toArray(),this._size=e.size(),this._datatype=n||e._datatype);else if(e&&p(e.data)&&p(e.size))this._data=e.data,this._size=e.size,ze(this._data,this._size),this._datatype=n||e.datatype;else if(p(e))this._data=function e(n){for(var t=0,r=n.length;t<r;t++){var i=n[t];p(i)?n[t]=e(i):i&&!0===i.isMatrix&&(n[t]=e(i.valueOf()))}return n}(e),this._size=Pe(this._data),ze(this._data,this._size),this._datatype=n;else{if(e)throw new TypeError("Unsupported type of data ("+G(e)+")");this._data=[],this._size=[0],this._datatype=n}}function r(e,n){if(!v(n))throw new TypeError("Invalid index");if(n.isScalar())return e.get(n.min());var r=n.size();if(r.length!==e._size.length)throw new qe(r.length,e._size.length);for(var i=n.min(),a=n.max(),o=0,s=e._size.length;o<s;o++)Fe(i[o],e._size[o]),Fe(a[o],e._size[o]);return new t(function e(n,t,r,i){var a=i===r-1,o=t.dimension(i);return a?o.map((function(e){return Fe(e,n.length),n[e]})).valueOf():o.map((function(a){Fe(a,n.length);var o=n[a];return e(o,t,r,i+1)})).valueOf()}(e._data,n,r.length,0),e._datatype)}function i(e,n,t,r){if(!n||!0!==n.isIndex)throw new TypeError("Invalid index");var i,a=n.size(),o=n.isScalar();if(d(t)?(i=t.size(),t=t.valueOf()):i=Pe(t),o){if(0!==i.length)throw new TypeError("Scalar expected");e.set(n.min(),t,r)}else{if(a.length<e._size.length)throw new qe(a.length,e._size.length,"<");if(i.length<a.length){for(var s=0,c=0;1===a[s]&&1===i[s];)s++;for(;1===a[s];)c++,s++;t=He(t,a.length,c,i)}if(!J(a,i))throw new qe(a,i,">");u(e,n.max().map((function(e){return e+1})),r);var f=a.length;!function e(n,t,r,i,a){var o=a===i-1,s=t.dimension(a);o?s.forEach((function(e,t){Fe(e),n[e]=r[t[0]]})):s.forEach((function(o,s){Fe(o),e(n[o],t,r[s[0]],i,a+1)}))}(e._data,n,t,f,0)}return e}function a(e,n,t){if(0===n.length){for(var r=e._data;p(r);)r=r[0];return r}return e._size=n.slice(0),e._data=je(e._data,e._size,t),e}function u(e,n,t){for(var r=e._size.slice(0),i=!1;r.length<n.length;)r.push(0),i=!0;for(var o=0,s=n.length;o<s;o++)n[o]>r[o]&&(r[o]=n[o],i=!0);i&&a(e,r,t)}return t.prototype=new n,t.prototype.createDenseMatrix=function(e,n){return new t(e,n)},t.prototype.type="DenseMatrix",t.prototype.isDenseMatrix=!0,t.prototype.getDataType=function(){return Qe(this._data,G)},t.prototype.storage=function(){return"dense"},t.prototype.datatype=function(){return this._datatype},t.prototype.create=function(e,n){return new t(e,n)},t.prototype.subset=function(e,n,t){switch(arguments.length){case 1:return r(this,e);case 2:case 3:return i(this,e,n,t);default:throw new SyntaxError("Wrong number of arguments")}},t.prototype.get=function(e){if(!p(e))throw new TypeError("Array expected");if(e.length!==this._size.length)throw new qe(e.length,this._size.length);for(var n=0;n<e.length;n++)Fe(e[n],this._size[n]);for(var t=this._data,r=0,i=e.length;r<i;r++){var a=e[r];Fe(a,t.length),t=t[a]}return t},t.prototype.set=function(e,n,t){if(!p(e))throw new TypeError("Array expected");if(e.length<this._size.length)throw new qe(e.length,this._size.length,"<");var r,i,a;u(this,e.map((function(e){return e+1})),t);var o=this._data;for(r=0,i=e.length-1;r<i;r++)Fe(a=e[r],o.length),o=o[a];return Fe(a=e[e.length-1],o.length),o[a]=n,this},t.prototype.resize=function(e,n,t){if(!m(e))throw new TypeError("Array or Matrix expected");var r=e.valueOf().map((function(e){return Array.isArray(e)&&1===e.length?e[0]:e}));return a(t?this.clone():this,r,n)},t.prototype.reshape=function(e,n){var t=n?this.clone():this;return t._data=Ue(t._data,e),t._size=e.slice(0),t},t.prototype.clone=function(){return new t({data:V(this._data),size:V(this._size),datatype:this._datatype})},t.prototype.size=function(){return this._size.slice(0)},t.prototype.map=function(e){var n=this,r=function t(r,i){return p(r)?r.map((function(e,n){return t(e,i.concat(n))})):e(r,i,n)}(this._data,[]);return new t(r,void 0!==this._datatype?Qe(r,G):void 0)},t.prototype.forEach=function(e){var n=this;!function t(r,i){p(r)?r.forEach((function(e,n){t(e,i.concat(n))})):e(r,i,n)}(this._data,[])},t.prototype.toArray=function(){return V(this._data)},t.prototype.valueOf=function(){return this._data},t.prototype.format=function(e){return Te(this._data,e)},t.prototype.toString=function(){return Te(this._data)},t.prototype.toJSON=function(){return{mathjs:"DenseMatrix",data:this._data,size:this._size,datatype:this._datatype}},t.prototype.diagonal=function(e){if(e){if(s(e)&&(e=e.toNumber()),!o(e)||!oe(e))throw new TypeError("The parameter k must be an integer number")}else e=0;for(var n=e>0?e:0,r=e<0?-e:0,i=this._size[0],a=this._size[1],u=Math.min(i-r,a-n),c=[],f=0;f<u;f++)c[f]=this._data[f+r][f+n];return new t({data:c,size:[u],datatype:this._datatype})},t.diagonal=function(e,n,r,i){if(!p(e))throw new TypeError("Array expected, size parameter");if(2!==e.length)throw new Error("Only two dimensions matrix are supported");if(e=e.map((function(e){if(s(e)&&(e=e.toNumber()),!o(e)||!oe(e)||e<1)throw new Error("Size values must be positive integers");return e})),r){if(s(r)&&(r=r.toNumber()),!o(r)||!oe(r))throw new TypeError("The parameter k must be an integer number")}else r=0;var a,u=r>0?r:0,c=r<0?-r:0,f=e[0],l=e[1],m=Math.min(f-c,l-u);if(p(n)){if(n.length!==m)throw new Error("Invalid value array length");a=function(e){return n[e]}}else if(d(n)){var h=n.size();if(1!==h.length||h[0]!==m)throw new Error("Invalid matrix length");a=function(e){return n.get([e])}}else a=function(){return n};i||(i=s(a(0))?a(0).mul(0):0);var y=[];if(e.length>0){y=je(y,e,i);for(var g=0;g<m;g++)y[g+c][g+u]=a(g)}return new t({data:y,size:[f,l]})},t.fromJSON=function(e){return new t(e)},t.prototype.swapRows=function(e,n){if(!(o(e)&&oe(e)&&o(n)&&oe(n)))throw new Error("Row index must be positive integers");if(2!==this._size.length)throw new Error("Only two dimensional matrix is supported");return Fe(e,this._size[0]),Fe(n,this._size[0]),t._swapRows(e,n,this._data),this},t._swapRows=function(e,n,t){var r=t[e];t[e]=t[n],t[n]=r},t}),{isClass:!0}),Zt=t(101),Jt=t.n(Zt),Yt=function(){return Yt=Jt.a.create,Jt.a},Xt=en("typed",["?BigNumber","?Complex","?DenseMatrix","?Fraction"],(function(e){var n=e.BigNumber,t=e.Complex,r=e.DenseMatrix,i=e.Fraction,a=Yt();return a.types=[{name:"number",test:o},{name:"Complex",test:u},{name:"BigNumber",test:s},{name:"Fraction",test:c},{name:"Unit",test:f},{name:"string",test:l},{name:"Chain",test:H},{name:"Array",test:p},{name:"Matrix",test:d},{name:"DenseMatrix",test:h},{name:"SparseMatrix",test:y},{name:"Range",test:g},{name:"Index",test:v},{name:"boolean",test:x},{name:"ResultSet",test:b},{name:"Help",test:w},{name:"function",test:N},{name:"Date",test:S},{name:"RegExp",test:M},{name:"null",test:E},{name:"undefined",test:A},{name:"AccessorNode",test:_},{name:"ArrayNode",test:O},{name:"AssignmentNode",test:C},{name:"BlockNode",test:T},{name:"ConditionalNode",test:I},{name:"ConstantNode",test:k},{name:"FunctionNode",test:q},{name:"FunctionAssignmentNode",test:B},{name:"IndexNode",test:R},{name:"Node",test:P},{name:"ObjectNode",test:z},{name:"OperatorNode",test:F},{name:"ParenthesisNode",test:j},{name:"RangeNode",test:U},{name:"SymbolNode",test:L},{name:"Object",test:D}],a.conversions=[{from:"number",to:"BigNumber",convert:function(e){if(n||Qt(e),e.toExponential().replace(/e.*$/,"").replace(/^0\.?0*|\./,"").length>15)throw new TypeError("Cannot implicitly convert a number with >15 significant digits to BigNumber (value: "+e+"). Use function bignumber(x) to convert to BigNumber.");return new n(e)}},{from:"number",to:"Complex",convert:function(e){return t||Kt(e),new t(e,0)}},{from:"number",to:"string",convert:function(e){return e+""}},{from:"BigNumber",to:"Complex",convert:function(e){return t||Kt(e),new t(e.toNumber(),0)}},{from:"Fraction",to:"BigNumber",convert:function(e){throw new TypeError("Cannot implicitly convert a Fraction to BigNumber or vice versa. Use function bignumber(x) to convert to BigNumber or fraction(x) to convert to Fraction.")}},{from:"Fraction",to:"Complex",convert:function(e){return t||Kt(e),new t(e.valueOf(),0)}},{from:"number",to:"Fraction",convert:function(e){i||er(e);var n=new i(e);if(n.valueOf()!==e)throw new TypeError("Cannot implicitly convert a number to a Fraction when there will be a loss of precision (value: "+e+"). Use function fraction(x) to convert to Fraction.");return n}},{from:"string",to:"number",convert:function(e){var n=Number(e);if(isNaN(n))throw new Error('Cannot convert "'+e+'" to a number');return n}},{from:"string",to:"BigNumber",convert:function(e){n||Qt(e);try{return new n(e)}catch(n){throw new Error('Cannot convert "'+e+'" to BigNumber')}}},{from:"string",to:"Fraction",convert:function(e){i||er(e);try{return new i(e)}catch(n){throw new Error('Cannot convert "'+e+'" to Fraction')}}},{from:"string",to:"Complex",convert:function(e){t||Kt(e);try{return new t(e)}catch(n){throw new Error('Cannot convert "'+e+'" to Complex')}}},{from:"boolean",to:"number",convert:function(e){return+e}},{from:"boolean",to:"BigNumber",convert:function(e){return n||Qt(e),new n(+e)}},{from:"boolean",to:"Fraction",convert:function(e){return i||er(e),new i(+e)}},{from:"boolean",to:"string",convert:function(e){return String(e)}},{from:"Array",to:"Matrix",convert:function(e){return r||function(){throw new Error("Cannot convert array into a Matrix: no class 'DenseMatrix' provided")}(),new r(e)}},{from:"Matrix",to:"Array",convert:function(e){return e.valueOf()}}],a}));function Qt(e){throw new Error("Cannot convert value ".concat(e," into a BigNumber: no class 'BigNumber' provided"))}function Kt(e){throw new Error("Cannot convert value ".concat(e," into a Complex number: no class 'Complex' provided"))}function er(e){throw new Error("Cannot convert value ".concat(e," into a Fraction, no class 'Fraction' provided."))}function nr(e){for(var n=0;n<e.length;n++)if(m(e[n]))return!0;return!1}function tr(e,n){d(e)&&(e=e.valueOf());for(var t=0,r=e.length;t<r;t++){var i=e[t];Array.isArray(i)?tr(i,n):n(i)}}function rr(e,n,t){return e&&"function"==typeof e.map?e.map((function(e){return rr(e,n,t)})):n(e)}function ir(e,n,t){var r=Array.isArray(e)?Pe(e):e.size();if(n<0||n>=r.length)throw new Re(n,r.length);return d(e)?e.create(ar(e.valueOf(),n,t)):ar(e,n,t)}function ar(e,n,t){var r,i,a,o;if(n<=0){if(Array.isArray(e[0])){for(o=function(e){var n,t,r=e.length,i=e[0].length,a=[];for(t=0;t<i;t++){var o=[];for(n=0;n<r;n++)o.push(e[n][t]);a.push(o)}return a}(e),i=[],r=0;r<o.length;r++)i[r]=ar(o[r],n-1,t);return i}for(a=e[0],r=1;r<e.length;r++)a=t(a,e[r]);return a}for(i=[],r=0;r<e.length;r++)i[r]=ar(e[r],n-1,t);return i}function or(e,n,t,r,i,a,o,s,u,c,f){var l,p,d,m,h=e._values,y=e._index,g=e._ptr;if(r)for(p=g[n],d=g[n+1],l=p;l<d;l++)t[m=y[l]]!==a?(t[m]=a,o.push(m),c?(r[m]=u?s(h[l],f):s(f,h[l]),i[m]=a):r[m]=h[l]):(r[m]=u?s(h[l],r[m]):s(r[m],h[l]),i[m]=a);else for(p=g[n],d=g[n+1],l=p;l<d;l++)t[m=y[l]]!==a?(t[m]=a,o.push(m)):i[m]=a}var sr=en("isInteger",["typed"],(function(e){var n=(0,e.typed)("isInteger",{number:oe,BigNumber:function(e){return e.isInt()},Fraction:function(e){return 1===e.d&&isFinite(e.n)},"Array | Matrix":function(e){return rr(e,n)}});return n})),ur=en("isNumeric",["typed"],(function(e){var n=(0,e.typed)("isNumeric",{"number | BigNumber | Fraction | boolean":function(){return!0},"Complex | Unit | string | null | undefined | Node":function(){return!1},"Array | Matrix":function(e){return rr(e,n)}});return n}));function cr(e){return e<0}function fr(e){return e>0}function lr(e){return 0===e}function pr(e){return Number.isNaN(e)}cr.signature="number",fr.signature="number",lr.signature="number",pr.signature="number";var dr=en("isPositive",["typed"],(function(e){var n=(0,e.typed)("isPositive",{number:fr,BigNumber:function(e){return!e.isNeg()&&!e.isZero()&&!e.isNaN()},Fraction:function(e){return e.s>0&&e.n>0},Unit:function(e){return n(e.value)},"Array | Matrix":function(e){return rr(e,n)}});return n})),mr=en("isNaN",["typed"],(function(e){return(0,e.typed)("isNaN",{number:pr,BigNumber:function(e){return e.isNaN()},Fraction:function(e){return!1},Complex:function(e){return e.isNaN()},Unit:function(e){return Number.isNaN(e.value)},"Array | Matrix":function(e){return rr(e,Number.isNaN)}})}));function hr(e,n,t){if(null==t)return e.eq(n);if(e.eq(n))return!0;if(e.isNaN()||n.isNaN())return!1;if(e.isFinite()&&n.isFinite()){var r=e.minus(n).abs();if(r.isZero())return!0;var i=e.constructor.max(e.abs(),n.abs());return r.lte(i.times(t))}return!1}var yr=en("equalScalar",["typed","config"],(function(e){var n=e.typed,t=e.config,r=n("equalScalar",{"boolean, boolean":function(e,n){return e===n},"number, number":function(e,n){return be(e,n,t.epsilon)},"BigNumber, BigNumber":function(e,n){return e.eq(n)||hr(e,n,t.epsilon)},"Fraction, Fraction":function(e,n){return e.equals(n)},"Complex, Complex":function(e,n){return function(e,n,t){return be(e.re,n.re,t)&&be(e.im,n.im,t)}(e,n,t.epsilon)},"Unit, Unit":function(e,n){if(!e.equalBase(n))throw new Error("Cannot compare units with different base");return r(e.value,n.value)}});return r})),gr=(en("equalScalar",["typed","config"],(function(e){var n=e.typed,t=e.config;return n("equalScalar",{"number, number":function(e,n){return be(e,n,t.epsilon)}})})),en("number",["typed"],(function(e){var n=(0,e.typed)("number",{"":function(){return 0},number:function(e){return e},string:function(e){if("NaN"===e)return NaN;var n=Number(e);if(isNaN(n))throw new SyntaxError('String "'+e+'" is no valid number');return n},BigNumber:function(e){return e.toNumber()},Fraction:function(e){return e.valueOf()},Unit:function(e){throw new Error("Second argument with valueless unit expected")},null:function(e){return 0},"Unit, string | Unit":function(e,n){return e.toNumber(n)},"Array | Matrix":function(e){return rr(e,n)}});return n.fromJSON=function(e){return parseFloat(e.value)},n}))),vr=en("boolean",["typed"],(function(e){var n=(0,e.typed)("boolean",{"":function(){return!1},boolean:function(e){return e},number:function(e){return!!e},null:function(e){return!1},BigNumber:function(e){return!e.isZero()},string:function(e){var n=e.toLowerCase();if("true"===n)return!0;if("false"===n)return!1;var t=Number(e);if(""!==e&&!isNaN(t))return!!t;throw new Error('Cannot convert "'+e+'" to a boolean')},"Array | Matrix":function(e){return rr(e,n)}});return n})),xr=en("complex",["typed","Complex"],(function(e){var n=e.typed,t=e.Complex,r=n("complex",{"":function(){return t.ZERO},number:function(e){return new t(e,0)},"number, number":function(e,n){return new t(e,n)},"BigNumber, BigNumber":function(e,n){return new t(e.toNumber(),n.toNumber())},Fraction:function(e){return new t(e.valueOf(),0)},Complex:function(e){return e.clone()},string:function(e){return t(e)},null:function(e){return t(0)},Object:function(e){if("re"in e&&"im"in e)return new t(e.re,e.im);if("r"in e&&"phi"in e||"abs"in e&&"arg"in e)return new t(e);throw new Error("Expected object with properties (re and im) or (r and phi) or (abs and arg)")},"Array | Matrix":function(e){return rr(e,r)}});return r})),br=en("splitUnit",["typed"],(function(e){return(0,e.typed)("splitUnit",{"Unit, Array":function(e,n){return e.splitUnit(n)}})})),wr="number, number";function Nr(e){return Math.abs(e)}function Sr(e,n){return e+n}function Mr(e,n){return e*n}function Dr(e){return-e}function Er(e){return e}function Ar(e){return le(e)}function _r(e){return Math.ceil(e)}function Or(e){return e*e*e}function Cr(e){return Math.exp(e)}function Tr(e){return pe(e)}function Ir(e,n){if(!oe(e)||!oe(n))throw new Error("Parameters in function gcd must be integer numbers");for(var t;0!==n;)t=e%n,e=n,n=t;return e<0?-e:e}function kr(e,n){if(!oe(e)||!oe(n))throw new Error("Parameters in function lcm must be integer numbers");if(0===e||0===n)return 0;for(var t,r=e*n;0!==n;)n=e%(t=n),e=t;return Math.abs(r/e)}function Br(e){return Math.log(e)}function qr(e){return ce(e)}function Rr(e){return ue(e)}function Pr(e,n){if(n>0)return e-n*Math.floor(e/n);if(0===n)return e;throw new Error("Cannot calculate mod for a negative divisor")}function zr(e,n){var t=n<0;if(t&&(n=-n),0===n)throw new Error("Root must be non-zero");if(e<0&&Math.abs(n)%2!=1)throw new Error("Root must be odd when a is negative.");if(0===e)return t?1/0:0;if(!isFinite(e))return t?0:e;var r=Math.pow(Math.abs(e),1/n);return r=e<0?-r:r,t?1/r:r}function Fr(e){return se(e)}function jr(e){return e*e}function Ur(e,n){var t,r,i,a=0,o=1,s=1,u=0;if(!oe(e)||!oe(n))throw new Error("Parameters in function xgcd must be integer numbers");for(;n;)i=e-(r=Math.floor(e/n))*n,t=a,a=o-r*a,o=t,t=s,s=u-r*s,u=t,e=n,n=i;return e<0?[-e,-o,-u]:[e,e?o:0,u]}function Lr(e,n){return e*e<1&&n===1/0||e*e>1&&n===-1/0?0:Math.pow(e,n)}function Hr(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return parseFloat(he(e,n))}Nr.signature="number",Sr.signature=wr,Mr.signature=wr,Dr.signature="number",Er.signature="number",Ar.signature="number",_r.signature="number",Or.signature="number",Cr.signature="number",Tr.signature="number",Ir.signature=wr,kr.signature=wr,Br.signature="number",qr.signature="number",Rr.signature="number",Pr.signature=wr,zr.signature=wr,Fr.signature="number",jr.signature="number",Ur.signature=wr,Lr.signature=wr,Hr.signature=wr;var Gr=en("unaryPlus",["typed","config","BigNumber"],(function(e){var n=e.typed,t=e.config,r=e.BigNumber,i=n("unaryPlus",{number:Er,Complex:function(e){return e},BigNumber:function(e){return e},Fraction:function(e){return e},Unit:function(e){return e.clone()},"Array | Matrix":function(e){return rr(e,i,!0)},"boolean | string":function(e){return"BigNumber"===t.number?new r(+e):+e}});return i})),$r=en("apply",["typed","isInteger"],(function(e){var n=e.typed,t=e.isInteger;return n("apply",{"Array | Matrix, number | BigNumber, function":function(e,n,r){if(!t(n))throw new TypeError("Integer number expected for dimension");var i=Array.isArray(e)?Pe(e):e.size();if(n<0||n>=i.length)throw new Re(n,i.length);return d(e)?e.create(Vr(e.valueOf(),n,r)):Vr(e,n,r)}})}));function Vr(e,n,t){var r,i,a;if(n<=0){if(Array.isArray(e[0])){for(a=function(e){var n,t,r=e.length,i=e[0].length,a=[];for(t=0;t<i;t++){var o=[];for(n=0;n<r;n++)o.push(e[n][t]);a.push(o)}return a}(e),i=[],r=0;r<a.length;r++)i[r]=Vr(a[r],n-1,t);return i}return t(e)}for(i=[],r=0;r<e.length;r++)i[r]=Vr(e[r],n-1,t);return i}var Wr=en("cube",["typed"],(function(e){var n=(0,e.typed)("cube",{number:Or,Complex:function(e){return e.mul(e).mul(e)},BigNumber:function(e){return e.times(e).times(e)},Fraction:function(e){return e.pow(3)},"Array | Matrix":function(e){return rr(e,n,!0)},Unit:function(e){return e.pow(3)}});return n})),Zr=en("expm1",["typed","Complex"],(function(e){var n=e.typed,t=e.Complex,r=n("expm1",{number:Tr,Complex:function(e){var n=Math.exp(e.re);return new t(n*Math.cos(e.im)-1,n*Math.sin(e.im))},BigNumber:function(e){return e.exp().minus(1)},"Array | Matrix":function(e){return rr(e,r)}});return r})),Jr=en("log10",["typed","config","Complex"],(function(e){var n=e.typed,t=e.config,r=e.Complex,i=n("log10",{number:function(e){return e>=0||t.predictable?qr(e):new r(e,0).log().div(Math.LN10)},Complex:function(e){return new r(e).log().div(Math.LN10)},BigNumber:function(e){return!e.isNegative()||t.predictable?e.log():new r(e.toNumber(),0).log().div(Math.LN10)},"Array | Matrix":function(e){return rr(e,i)}});return i})),Yr=en("multiplyScalar",["typed"],(function(e){var n=(0,e.typed)("multiplyScalar",{"number, number":Mr,"Complex, Complex":function(e,n){return e.mul(n)},"BigNumber, BigNumber":function(e,n){return e.times(n)},"Fraction, Fraction":function(e,n){return e.mul(n)},"number | Fraction | BigNumber | Complex, Unit":function(e,t){var r=t.clone();return r.value=null===r.value?r._normalize(e):n(r.value,e),r},"Unit, number | Fraction | BigNumber | Complex":function(e,t){var r=e.clone();return r.value=null===r.value?r._normalize(t):n(r.value,t),r},"Unit, Unit":function(e,n){return e.multiply(n)}});return n})),Xr=en("sign",["typed","BigNumber","Fraction","complex"],(function(e){var n=e.typed,t=e.BigNumber,r=e.complex,i=e.Fraction,a=n("sign",{number:Fr,Complex:function(e){return 0===e.im?r(Fr(e.re)):e.sign()},BigNumber:function(e){return new t(e.cmp(0))},Fraction:function(e){return new i(e.s,1)},"Array | Matrix":function(e){return rr(e,a,!0)},Unit:function(e){return a(e.value)}});return a})),Qr=en("square",["typed"],(function(e){var n=(0,e.typed)("square",{number:jr,Complex:function(e){return e.mul(e)},BigNumber:function(e){return e.times(e)},Fraction:function(e){return e.mul(e)},"Array | Matrix":function(e){return rr(e,n,!0)},Unit:function(e){return e.pow(2)}});return n}));function Kr(e,n){if(e.isFinite()&&!e.isInteger()||n.isFinite()&&!n.isInteger())throw new Error("Integers expected in function bitAnd");var t=e.constructor;if(e.isNaN()||n.isNaN())return new t(NaN);if(e.isZero()||n.eq(-1)||e.eq(n))return e;if(n.isZero()||e.eq(-1))return n;if(!e.isFinite()||!n.isFinite()){if(!e.isFinite()&&!n.isFinite())return e.isNegative()===n.isNegative()?e:new t(0);if(!e.isFinite())return n.isNegative()?e:e.isNegative()?new t(0):n;if(!n.isFinite())return e.isNegative()?n:n.isNegative()?new t(0):e}return ti(e,n,(function(e,n){return e&n}))}function ei(e){if(e.isFinite()&&!e.isInteger())throw new Error("Integer expected in function bitNot");var n=e.constructor,t=n.precision;n.config({precision:1e9});var r=e.plus(new n(1));return r.s=-r.s||null,n.config({precision:t}),r}function ni(e,n){if(e.isFinite()&&!e.isInteger()||n.isFinite()&&!n.isInteger())throw new Error("Integers expected in function bitOr");var t=e.constructor;if(e.isNaN()||n.isNaN())return new t(NaN);var r=new t(-1);return e.isZero()||n.eq(r)||e.eq(n)?n:n.isZero()||e.eq(r)?e:e.isFinite()&&n.isFinite()?ti(e,n,(function(e,n){return e|n})):!e.isFinite()&&!e.isNegative()&&n.isNegative()||e.isNegative()&&!n.isNegative()&&!n.isFinite()?r:e.isNegative()&&n.isNegative()?e.isFinite()?e:n:e.isFinite()?n:e}function ti(e,n,t){var r,i,a,o,s,u=e.constructor,c=+(e.s<0),f=+(n.s<0);if(c){r=ri(ei(e));for(var l=0;l<r.length;++l)r[l]^=1}else r=ri(e);if(f){i=ri(ei(n));for(var p=0;p<i.length;++p)i[p]^=1}else i=ri(n);r.length<=i.length?(a=r,o=i,s=c):(a=i,o=r,s=f);var d=a.length,m=o.length,h=1^t(c,f),y=new u(1^h),g=new u(1),v=new u(2),x=u.precision;for(u.config({precision:1e9});d>0;)t(a[--d],o[--m])===h&&(y=y.plus(g)),g=g.times(v);for(;m>0;)t(s,o[--m])===h&&(y=y.plus(g)),g=g.times(v);return u.config({precision:x}),0===h&&(y.s=-y.s),y}function ri(e){for(var n=e.d,t=n[0]+"",r=1;r<n.length;++r){for(var i=n[r]+"",a=7-i.length;a--;)i="0"+i;t+=i}for(var o=t.length;"0"===t.charAt(o);)o--;var s=e.e,u=t.slice(0,o+1||1),c=u.length;if(s>0)if(++s>c)for(s-=c;s--;)u+="0";else s<c&&(u=u.slice(0,s)+"."+u.slice(s));for(var f=[0],l=0;l<u.length;){for(var p=f.length;p--;)f[p]*=10;f[0]+=parseInt(u.charAt(l++));for(var d=0;d<f.length;++d)f[d]>1&&(null!==f[d+1]&&void 0!==f[d+1]||(f[d+1]=0),f[d+1]+=f[d]>>1,f[d]&=1)}return f.reverse()}function ii(e,n){if(e.isFinite()&&!e.isInteger()||n.isFinite()&&!n.isInteger())throw new Error("Integers expected in function bitXor");var t=e.constructor;if(e.isNaN()||n.isNaN())return new t(NaN);if(e.isZero())return n;if(n.isZero())return e;if(e.eq(n))return new t(0);var r=new t(-1);return e.eq(r)?ei(n):n.eq(r)?ei(e):e.isFinite()&&n.isFinite()?ti(e,n,(function(e,n){return e^n})):e.isFinite()||n.isFinite()?new t(e.isNegative()===n.isNegative()?1/0:-1/0):r}function ai(e,n){if(e.isFinite()&&!e.isInteger()||n.isFinite()&&!n.isInteger())throw new Error("Integers expected in function leftShift");var t=e.constructor;return e.isNaN()||n.isNaN()||n.isNegative()&&!n.isZero()?new t(NaN):e.isZero()||n.isZero()?e:e.isFinite()||n.isFinite()?n.lt(55)?e.times(Math.pow(2,n.toNumber())+""):e.times(new t(2).pow(n)):new t(NaN)}function oi(e,n){if(e.isFinite()&&!e.isInteger()||n.isFinite()&&!n.isInteger())throw new Error("Integers expected in function rightArithShift");var t=e.constructor;return e.isNaN()||n.isNaN()||n.isNegative()&&!n.isZero()?new t(NaN):e.isZero()||n.isZero()?e:n.isFinite()?n.lt(55)?e.div(Math.pow(2,n.toNumber())+"").floor():e.div(new t(2).pow(n)).floor():e.isNegative()?new t(-1):e.isFinite()?new t(0):new t(NaN)}var si="number, number";function ui(e,n){if(!oe(e)||!oe(n))throw new Error("Integers expected in function bitAnd");return e&n}function ci(e){if(!oe(e))throw new Error("Integer expected in function bitNot");return~e}function fi(e,n){if(!oe(e)||!oe(n))throw new Error("Integers expected in function bitOr");return e|n}function li(e,n){if(!oe(e)||!oe(n))throw new Error("Integers expected in function bitXor");return e^n}function pi(e,n){if(!oe(e)||!oe(n))throw new Error("Integers expected in function leftShift");return e<<n}function di(e,n){if(!oe(e)||!oe(n))throw new Error("Integers expected in function rightArithShift");return e>>n}function mi(e,n){if(!oe(e)||!oe(n))throw new Error("Integers expected in function rightLogShift");return e>>>n}ui.signature=si,ci.signature="number",fi.signature=si,li.signature=si,pi.signature=si,di.signature=si,mi.signature=si;var hi=en("bitNot",["typed"],(function(e){var n=(0,e.typed)("bitNot",{number:ci,BigNumber:ei,"Array | Matrix":function(e){return rr(e,n)}});return n})),yi=en("arg",["typed"],(function(e){var n=(0,e.typed)("arg",{number:function(e){return Math.atan2(0,e)},BigNumber:function(e){return e.constructor.atan2(0,e)},Complex:function(e){return e.arg()},"Array | Matrix":function(e){return rr(e,n)}});return n})),gi=en("im",["typed"],(function(e){var n=(0,e.typed)("im",{number:function(e){return 0},BigNumber:function(e){return e.mul(0)},Complex:function(e){return e.im},"Array | Matrix":function(e){return rr(e,n)}});return n}));function vi(e){return!e}function xi(e,n){return!(!e&&!n)}function bi(e,n){return!!e!=!!n}function wi(e,n){return!(!e||!n)}vi.signature="number",xi.signature="number, number",bi.signature="number, number",wi.signature="number, number";var Ni=en("not",["typed"],(function(e){var n=(0,e.typed)("not",{number:vi,Complex:function(e){return 0===e.re&&0===e.im},BigNumber:function(e){return e.isZero()||e.isNaN()},Unit:function(e){return null===e.value||n(e.value)},"Array | Matrix":function(e){return rr(e,n)}});return n})),Si=en("filter",["typed"],(function(e){return(0,e.typed)("filter",{"Array, function":Mi,"Matrix, function":function(e,n){return e.create(Mi(e.toArray(),n))},"Array, RegExp":Ze,"Matrix, RegExp":function(e,n){return e.create(Ze(e.toArray(),n))}})}));function Mi(e,n){var t=pn(n);return We(e,(function(e,r,i){return 1===t?n(e):2===t?n(e,[r]):n(e,[r],i)}))}var Di=en("forEach",["typed"],(function(e){return(0,e.typed)("forEach",{"Array, function":Ei,"Matrix, function":function(e,n){return e.forEach(n)}})}));function Ei(e,n){var t=pn(n);!function r(i,a){Array.isArray(i)?Ve(i,(function(e,n){r(e,a.concat(n))})):1===t?n(i):2===t?n(i,a):n(i,a,e)}(e,[])}var Ai=en("map",["typed"],(function(e){return(0,e.typed)("map",{"Array, function":_i,"Matrix, function":function(e,n){return e.map(n)}})}));function _i(e,n){var t=pn(n);return function r(i,a){return Array.isArray(i)?i.map((function(e,n){return r(e,a.concat(n))})):1===t?n(i):2===t?n(i,a):n(i,a,e)}(e,[])}var Oi=en("erf",["typed"],(function(e){var n=(0,e.typed)("name",{number:function(e){var n=Math.abs(e);return n>=Bi?se(e):n<=Ci?se(e)*function(e){var n,t=e*e,r=Ii[0][4]*t,i=t;for(n=0;n<3;n+=1)r=(r+Ii[0][n])*t,i=(i+ki[0][n])*t;return e*(r+Ii[0][3])/(i+ki[0][3])}(n):n<=4?se(e)*(1-function(e){var n,t=Ii[1][8]*e,r=e;for(n=0;n<7;n+=1)t=(t+Ii[1][n])*e,r=(r+ki[1][n])*e;var i=(t+Ii[1][7])/(r+ki[1][7]),a=parseInt(16*e)/16,o=(e-a)*(e+a);return Math.exp(-a*a)*Math.exp(-o)*i}(n)):se(e)*(1-function(e){var n,t=1/(e*e),r=Ii[2][5]*t,i=t;for(n=0;n<4;n+=1)r=(r+Ii[2][n])*t,i=(i+ki[2][n])*t;var a=t*(r+Ii[2][4])/(i+ki[2][4]);a=(Ti-a)/e,t=parseInt(16*e)/16;var o=(e-t)*(e+t);return Math.exp(-t*t)*Math.exp(-o)*a}(n))},"Array | Matrix":function(e){return rr(e,n)}});return n})),Ci=.46875,Ti=.5641895835477563,Ii=[[3.1611237438705655,113.86415415105016,377.485237685302,3209.3775891384694,.18577770618460315],[.5641884969886701,8.883149794388377,66.11919063714163,298.6351381974001,881.952221241769,1712.0476126340707,2051.0783778260716,1230.3393547979972,2.1531153547440383e-8],[.30532663496123236,.36034489994980445,.12578172611122926,.016083785148742275,.0006587491615298378,.016315387137302097]],ki=[[23.601290952344122,244.02463793444417,1282.6165260773723,2844.236833439171],[15.744926110709835,117.6939508913125,537.1811018620099,1621.3895745666903,3290.7992357334597,4362.619090143247,3439.3676741437216,1230.3393548037495],[2.568520192289822,1.8729528499234604,.5279051029514285,.06051834131244132,.0023352049762686918]],Bi=Math.pow(2,53),qi=en("format",["typed"],(function(e){return(0,e.typed)("format",{any:Te,"any, Object | function | number":Te})})),Ri=en("isPrime",["typed"],(function(e){var n=(0,e.typed)("isPrime",{number:function(e){if(0*e!=0)return!1;if(e<=3)return e>1;if(e%2==0||e%3==0)return!1;for(var n=5;n*n<=e;n+=6)if(e%n==0||e%(n+2)==0)return!1;return!0},BigNumber:function(e){if(0*e.toNumber()!=0)return!1;if(e.lte(3))return e.gt(1);if(e.mod(2).eq(0)||e.mod(3).eq(0))return!1;for(var n=5;e.gte(n*n);n+=6)if(e.mod(n).eq(0)||e.mod(n+2).eq(0))return!1;return!0},"Array | Matrix":function(e){return rr(e,n)}});return n})),Pi=en("acos",["typed","config","Complex"],(function(e){var n=e.typed,t=e.config,r=e.Complex,i=n("acos",{number:function(e){return e>=-1&&e<=1||t.predictable?Math.acos(e):new r(e,0).acos()},Complex:function(e){return e.acos()},BigNumber:function(e){return e.acos()},"Array | Matrix":function(e){return rr(e,i)}});return i}));function zi(e){return we(e)}function Fi(e){return Math.atan(1/e)}function ji(e){return isFinite(e)?(Math.log((e+1)/e)+Math.log(e/(e-1)))/2:0}function Ui(e){return Math.asin(1/e)}function Li(e){var n=1/e;return Math.log(n+Math.sqrt(n*n+1))}function Hi(e){return Math.acos(1/e)}function Gi(e){var n=1/e,t=Math.sqrt(n*n-1);return Math.log(t+n)}function $i(e){return Ne(e)}function Vi(e){return Se(e)}function Wi(e){return 1/Math.tan(e)}function Zi(e){var n=Math.exp(2*e);return(n+1)/(n-1)}function Ji(e){return 1/Math.sin(e)}function Yi(e){return 0===e?Number.POSITIVE_INFINITY:Math.abs(2/(Math.exp(e)-Math.exp(-e)))*se(e)}function Xi(e){return 1/Math.cos(e)}function Qi(e){return 2/(Math.exp(e)+Math.exp(-e))}function Ki(e){return De(e)}zi.signature="number",Fi.signature="number",ji.signature="number",Ui.signature="number",Li.signature="number",Hi.signature="number",Gi.signature="number",$i.signature="number",Vi.signature="number",Wi.signature="number",Zi.signature="number",Ji.signature="number",Yi.signature="number",Xi.signature="number",Qi.signature="number",Ki.signature="number";var ea=en("acot",["typed","BigNumber"],(function(e){var n=e.typed,t=e.BigNumber,r=n("acot",{number:Fi,Complex:function(e){return e.acot()},BigNumber:function(e){return new t(1).div(e).atan()},"Array | Matrix":function(e){return rr(e,r)}});return r})),na=en("acsc",["typed","config","Complex","BigNumber"],(function(e){var n=e.typed,t=e.config,r=e.Complex,i=e.BigNumber,a=n("acsc",{number:function(e){return e<=-1||e>=1||t.predictable?Ui(e):new r(e,0).acsc()},Complex:function(e){return e.acsc()},BigNumber:function(e){return new i(1).div(e).asin()},"Array | Matrix":function(e){return rr(e,a)}});return a})),ta=en("asec",["typed","config","Complex","BigNumber"],(function(e){var n=e.typed,t=e.config,r=e.Complex,i=e.BigNumber,a=n("asec",{number:function(e){return e<=-1||e>=1||t.predictable?Hi(e):new r(e,0).asec()},Complex:function(e){return e.asec()},BigNumber:function(e){return new i(1).div(e).acos()},"Array | Matrix":function(e){return rr(e,a)}});return a})),ra=en("asin",["typed","config","Complex"],(function(e){var n=e.typed,t=e.config,r=e.Complex,i=n("asin",{number:function(e){return e>=-1&&e<=1||t.predictable?Math.asin(e):new r(e,0).asin()},Complex:function(e){return e.asin()},BigNumber:function(e){return e.asin()},"Array | Matrix":function(e){return rr(e,i,!0)}});return i})),ia=en("atan",["typed"],(function(e){var n=(0,e.typed)("atan",{number:function(e){return Math.atan(e)},Complex:function(e){return e.atan()},BigNumber:function(e){return e.atan()},"Array | Matrix":function(e){return rr(e,n,!0)}});return n})),aa=en("atanh",["typed","config","Complex"],(function(e){var n=e.typed,t=e.config,r=e.Complex,i=n("atanh",{number:function(e){return e<=1&&e>=-1||t.predictable?Vi(e):new r(e,0).atanh()},Complex:function(e){return e.atanh()},BigNumber:function(e){return e.atanh()},"Array | Matrix":function(e){return rr(e,i,!0)}});return i})),oa=en("cosh",["typed"],(function(e){var n=(0,e.typed)("cosh",{number:Me,Complex:function(e){return e.cosh()},BigNumber:function(e){return e.cosh()},Unit:function(e){if(!e.hasBase(e.constructor.BASE_UNITS.ANGLE))throw new TypeError("Unit in function cosh is no angle");return n(e.value)},"Array | Matrix":function(e){return rr(e,n)}});return n})),sa=en("coth",["typed","BigNumber"],(function(e){var n=e.typed,t=e.BigNumber,r=n("coth",{number:Zi,Complex:function(e){return e.coth()},BigNumber:function(e){return new t(1).div(e.tanh())},Unit:function(e){if(!e.hasBase(e.constructor.BASE_UNITS.ANGLE))throw new TypeError("Unit in function coth is no angle");return r(e.value)},"Array | Matrix":function(e){return rr(e,r)}});return r})),ua=en("csch",["typed","BigNumber"],(function(e){var n=e.typed,t=e.BigNumber,r=n("csch",{number:Yi,Complex:function(e){return e.csch()},BigNumber:function(e){return new t(1).div(e.sinh())},Unit:function(e){if(!e.hasBase(e.constructor.BASE_UNITS.ANGLE))throw new TypeError("Unit in function csch is no angle");return r(e.value)},"Array | Matrix":function(e){return rr(e,r)}});return r})),ca=en("sech",["typed","BigNumber"],(function(e){var n=e.typed,t=e.BigNumber,r=n("sech",{number:Qi,Complex:function(e){return e.sech()},BigNumber:function(e){return new t(1).div(e.cosh())},Unit:function(e){if(!e.hasBase(e.constructor.BASE_UNITS.ANGLE))throw new TypeError("Unit in function sech is no angle");return r(e.value)},"Array | Matrix":function(e){return rr(e,r)}});return r})),fa=en("sinh",["typed"],(function(e){var n=(0,e.typed)("sinh",{number:Ki,Complex:function(e){return e.sinh()},BigNumber:function(e){return e.sinh()},Unit:function(e){if(!e.hasBase(e.constructor.BASE_UNITS.ANGLE))throw new TypeError("Unit in function sinh is no angle");return n(e.value)},"Array | Matrix":function(e){return rr(e,n,!0)}});return n})),la=en("tanh",["typed"],(function(e){var n=(0,e.typed)("tanh",{number:Ee,Complex:function(e){return e.tanh()},BigNumber:function(e){return e.tanh()},Unit:function(e){if(!e.hasBase(e.constructor.BASE_UNITS.ANGLE))throw new TypeError("Unit in function tanh is no angle");return n(e.value)},"Array | Matrix":function(e){return rr(e,n,!0)}});return n}));function pa(e,n){if(n<e)return 1;if(n===e)return n;var t=n+e>>1;return pa(e,t)*pa(t+1,n)}function da(e,n){if(!oe(e)||e<0)throw new TypeError("Positive integer value expected in function combinations");if(!oe(n)||n<0)throw new TypeError("Positive integer value expected in function combinations");if(n>e)throw new TypeError("k must be less than or equal to n");var t=e-n;return n<t?pa(t+1,e)/pa(1,n):pa(n+1,e)/pa(1,t)}da.signature="number, number";var ma=en("combinations",["typed"],(function(e){return(0,e.typed)("combinations",{"number, number":da,"BigNumber, BigNumber":function(e,n){var t,r,i=e.constructor,a=e.minus(n),o=new i(1);if(!ha(e)||!ha(n))throw new TypeError("Positive integer value expected in function combinations");if(n.gt(e))throw new TypeError("k must be less than n in function combinations");if(t=o,n.lt(a))for(r=o;r.lte(a);r=r.plus(o))t=t.times(n.plus(r)).dividedBy(r);else for(r=o;r.lte(n);r=r.plus(o))t=t.times(a.plus(r)).dividedBy(r);return t}})}));function ha(e){return e.isInteger()&&e.gte(0)}var ya=t(102),ga=t.n(ya),va=ga()();function xa(e){var n,t;return n=null===(t=e)?va:ga()(String(t)),function(){return n()}}var ba=en("pickRandom",["typed","config","?on"],(function(e){var n=e.typed,t=e.config,r=e.on,i=xa(t.randomSeed);return r&&r("config",(function(e,n){e.randomSeed!==n.randomSeed&&(i=xa(e.randomSeed))})),n({"Array | Matrix":function(e){return a(e)},"Array | Matrix, number":function(e,n){return a(e,n,void 0)},"Array | Matrix, Array":function(e,n){return a(e,void 0,n)},"Array | Matrix, Array | Matrix, number":function(e,n,t){return a(e,t,n)},"Array | Matrix, number, Array | Matrix":function(e,n,t){return a(e,n,t)}});function a(e,n,t){var r=void 0===n;if(r&&(n=1),e=e.valueOf(),t&&(t=t.valueOf()),Pe(e).length>1)throw new Error("Only one dimensional vectors supported");var a=0;if(void 0!==t){if(t.length!==e.length)throw new Error("Weights must have the same length as possibles");for(var s=0,u=t.length;s<u;s++){if(!o(t[s])||t[s]<0)throw new Error("Weights must be an array of positive numbers");a+=t[s]}}var c=e.length;if(0===c)return[];if(n>=c)return n>1?e:e[0];for(var f,l=[];l.length<n;){if(void 0===t)f=e[Math.floor(i()*c)];else for(var p=i()*a,d=0,m=e.length;d<m;d++)if((p-=t[d])<0){f=e[d];break}-1===l.indexOf(f)&&l.push(f)}return r?l[0]:l}}));function wa(e,n){var t=[];if((e=e.slice(0)).length>1)for(var r=0,i=e.shift();r<i;r++)t.push(wa(e,n));else for(var a=0,o=e.shift();a<o;a++)t.push(n());return t}var Na=en("randomInt",["typed","config","?on"],(function(e){var n=e.typed,t=e.config,r=e.on,i=xa(t.randomSeed);return r&&r("config",(function(e,n){e.randomSeed!==n.randomSeed&&(i=xa(e.randomSeed))})),n("randomInt",{"":function(){return o(0,1)},number:function(e){return o(0,e)},"number, number":function(e,n){return o(e,n)},"Array | Matrix":function(e){return a(e,0,1)},"Array | Matrix, number":function(e,n){return a(e,0,n)},"Array | Matrix, number, number":function(e,n,t){return a(e,n,t)}});function a(e,n,t){var r=wa(e.valueOf(),(function(){return o(n,t)}));return d(e)?e.create(r):r}function o(e,n){return Math.floor(e+i()*(n-e))}})),Sa=en("clone",["typed"],(function(e){return(0,e.typed)("clone",{any:V})})),Ma=en("hasNumericValue",["typed","isNumeric"],(function(e){var n=e.typed,t=e.isNumeric;return n("hasNumericValue",{string:function(e){return e.trim().length>0&&!isNaN(Number(e))},any:function(e){return t(e)}})})),Da=en("typeOf",["typed"],(function(e){return(0,e.typed)("typeOf",{any:G})})),Ea=en("string",["typed"],(function(e){var n=(0,e.typed)("string",{"":function(){return""},number:de,null:function(e){return"null"},boolean:function(e){return e+""},string:function(e){return e},"Array | Matrix":function(e){return rr(e,n)},any:function(e){return String(e)}});return n})),Aa=en("fraction",["typed","Fraction"],(function(e){var n=e.typed,t=e.Fraction,r=n("fraction",{number:function(e){if(!isFinite(e)||isNaN(e))throw new Error(e+" cannot be represented as a fraction");return new t(e)},string:function(e){return new t(e)},"number, number":function(e,n){return new t(e,n)},null:function(e){return new t(0)},BigNumber:function(e){return new t(e.toString())},Fraction:function(e){return e},Object:function(e){return new t(e)},"Array | Matrix":function(e){return rr(e,r)}});return r})),_a=en("unaryMinus",["typed"],(function(e){var n=(0,e.typed)("unaryMinus",{number:Dr,Complex:function(e){return e.neg()},BigNumber:function(e){return e.neg()},Fraction:function(e){return e.neg()},Unit:function(e){var t=e.clone();return t.value=n(e.value),t},"Array | Matrix":function(e){return rr(e,n,!0)}});return n})),Oa=en("addScalar",["typed"],(function(e){var n=(0,e.typed)("addScalar",{"number, number":Sr,"Complex, Complex":function(e,n){return e.add(n)},"BigNumber, BigNumber":function(e,n){return e.plus(n)},"Fraction, Fraction":function(e,n){return e.add(n)},"Unit, Unit":function(e,t){if(null===e.value||void 0===e.value)throw new Error("Parameter x contains a unit with undefined value");if(null===t.value||void 0===t.value)throw new Error("Parameter y contains a unit with undefined value");if(!e.equalBase(t))throw new Error("Units do not match");var r=e.clone();return r.value=n(r.value,t.value),r.fixPrefix=!1,r}});return n})),Ca=en("exp",["typed"],(function(e){var n=(0,e.typed)("exp",{number:Cr,Complex:function(e){return e.exp()},BigNumber:function(e){return e.exp()},"Array | Matrix":function(e){return rr(e,n)}});return n})),Ta=en("log2",["typed","config","Complex"],(function(e){var n=e.typed,t=e.config,r=e.Complex,i=n("log2",{number:function(e){return e>=0||t.predictable?Rr(e):a(new r(e,0))},Complex:a,BigNumber:function(e){return!e.isNegative()||t.predictable?e.log(2):a(new r(e.toNumber(),0))},"Array | Matrix":function(e){return rr(e,i)}});function a(e){var n=Math.sqrt(e.re*e.re+e.im*e.im);return new r(Math.log2?Math.log2(n):Math.log(n)/Math.LN2,Math.atan2(e.im,e.re)/Math.LN2)}return i})),Ia=en("sqrt",["config","typed","Complex"],(function(e){var n=e.config,t=e.typed,r=e.Complex,i=t("sqrt",{number:a,Complex:function(e){return e.sqrt()},BigNumber:function(e){return!e.isNegative()||n.predictable?e.sqrt():a(e.toNumber())},"Array | Matrix":function(e){return rr(e,i,!0)},Unit:function(e){return e.pow(.5)}});function a(e){return isNaN(e)?NaN:e>=0||n.predictable?Math.sqrt(e):new r(e,0).sqrt()}return i})),ka=en("conj",["typed"],(function(e){var n=(0,e.typed)("conj",{number:function(e){return e},BigNumber:function(e){return e},Complex:function(e){return e.conjugate()},"Array | Matrix":function(e){return rr(e,n)}});return n})),Ba=en("getMatrixDataType",["typed"],(function(e){return(0,e.typed)("getMatrixDataType",{Array:function(e){return Qe(e,G)},Matrix:function(e){return e.getDataType()}})})),qa=en("mode",["typed","isNaN","isNumeric"],(function(e){var n=e.typed,t=e.isNaN,r=e.isNumeric;return n("mode",{"Array | Matrix":i,"...":function(e){return i(e)}});function i(e){if(0===(e=Ge(e.valueOf())).length)throw new Error("Cannot calculate mode of an empty array");for(var n={},i=[],a=0,o=0;o<e.length;o++){var s=e[o];if(r(s)&&t(s))throw new Error("Cannot calculate mode of an array containing NaN values");s in n||(n[s]=0),n[s]++,n[s]===a?i.push(s):n[s]>a&&(a=n[s],i=[s])}return i}})),Ra=en("print",["typed"],(function(e){return(0,e.typed)("print",{"string, Object | Array":Pa,"string, Object | Array, number | Object":Pa})}));function Pa(e,n,t){return e.replace(/\$([\w.]+)/g,(function(e,r){for(var i=r.split("."),a=n[i.shift()];i.length&&void 0!==a;){var o=i.shift();a=o?a[o]:a+"."}return void 0!==a?l(a)?a:Te(a,t):e}))}var za=en("acosh",["typed","config","Complex"],(function(e){var n=e.typed,t=e.config,r=e.Complex,i=n("acosh",{number:function(e){return e>=1||t.predictable?zi(e):e<=-1?new r(Math.log(Math.sqrt(e*e-1)-e),Math.PI):new r(e,0).acosh()},Complex:function(e){return e.acosh()},BigNumber:function(e){return e.acosh()},"Array | Matrix":function(e){return rr(e,i)}});return i})),Fa=en("acsch",["typed","BigNumber"],(function(e){var n=e.typed,t=e.BigNumber,r=n("acsch",{number:Li,Complex:function(e){return e.acsch()},BigNumber:function(e){return new t(1).div(e).asinh()},"Array | Matrix":function(e){return rr(e,r)}});return r})),ja=en("asinh",["typed"],(function(e){var n=(0,e.typed)("asinh",{number:$i,Complex:function(e){return e.asinh()},BigNumber:function(e){return e.asinh()},"Array | Matrix":function(e){return rr(e,n,!0)}});return n})),Ua=en("cos",["typed"],(function(e){var n=(0,e.typed)("cos",{number:Math.cos,Complex:function(e){return e.cos()},BigNumber:function(e){return e.cos()},Unit:function(e){if(!e.hasBase(e.constructor.BASE_UNITS.ANGLE))throw new TypeError("Unit in function cos is no angle");return n(e.value)},"Array | Matrix":function(e){return rr(e,n)}});return n})),La=en("csc",["typed","BigNumber"],(function(e){var n=e.typed,t=e.BigNumber,r=n("csc",{number:Ji,Complex:function(e){return e.csc()},BigNumber:function(e){return new t(1).div(e.sin())},Unit:function(e){if(!e.hasBase(e.constructor.BASE_UNITS.ANGLE))throw new TypeError("Unit in function csc is no angle");return r(e.value)},"Array | Matrix":function(e){return rr(e,r)}});return r})),Ha=en("sin",["typed"],(function(e){var n=(0,e.typed)("sin",{number:Math.sin,Complex:function(e){return e.sin()},BigNumber:function(e){return e.sin()},Unit:function(e){if(!e.hasBase(e.constructor.BASE_UNITS.ANGLE))throw new TypeError("Unit in function sin is no angle");return n(e.value)},"Array | Matrix":function(e){return rr(e,n,!0)}});return n})),Ga=en("combinationsWithRep",["typed"],(function(e){return(0,e.typed)("combinationsWithRep",{"number, number":function(e,n){if(!oe(e)||e<0)throw new TypeError("Positive integer value expected in function combinationsWithRep");if(!oe(n)||n<0)throw new TypeError("Positive integer value expected in function combinationsWithRep");if(e<1)throw new TypeError("k must be less than or equal to n + k - 1");return n<e-1?pa(e,e+n-1)/pa(1,n):pa(n+1,e+n-1)/pa(1,e-1)},"BigNumber, BigNumber":function(e,n){var t,r,i=new(0,e.constructor)(1),a=e.minus(i);if(!$a(e)||!$a(n))throw new TypeError("Positive integer value expected in function combinationsWithRep");if(e.lt(i))throw new TypeError("k must be less than or equal to n + k - 1 in function combinationsWithRep");if(t=i,n.lt(a))for(r=i;r.lte(a);r=r.plus(i))t=t.times(n.plus(r)).dividedBy(r);else for(r=i;r.lte(n);r=r.plus(i))t=t.times(a.plus(r)).dividedBy(r);return t}})}));function $a(e){return e.isInteger()&&e.gte(0)}var Va=en("random",["typed","config","?on"],(function(e){var n=e.typed,t=e.config,r=e.on,i=xa(t.randomSeed);return r&&r("config",(function(e,n){e.randomSeed!==n.randomSeed&&(i=xa(e.randomSeed))})),n("random",{"":function(){return o(0,1)},number:function(e){return o(0,e)},"number, number":function(e,n){return o(e,n)},"Array | Matrix":function(e){return a(e,0,1)},"Array | Matrix, number":function(e,n){return a(e,0,n)},"Array | Matrix, number, number":function(e,n,t){return a(e,n,t)}});function a(e,n,t){var r=wa(e.valueOf(),(function(){return o(n,t)}));return d(e)?e.create(r):r}function o(e,n){return e+i()*(n-e)}})),Wa=en("isNegative",["typed"],(function(e){var n=(0,e.typed)("isNegative",{number:cr,BigNumber:function(e){return e.isNeg()&&!e.isZero()&&!e.isNaN()},Fraction:function(e){return e.s<0},Unit:function(e){return n(e.value)},"Array | Matrix":function(e){return rr(e,n)}});return n})),Za=en("SparseMatrix",["typed","equalScalar","Matrix"],(function(e){var n=e.typed,t=e.equalScalar,r=e.Matrix;function i(e,n){if(!(this instanceof i))throw new SyntaxError("Constructor must be called with the new operator");if(n&&!l(n))throw new Error("Invalid datatype: "+n);if(d(e))!function(e,n,t){"SparseMatrix"===n.type?(e._values=n._values?V(n._values):void 0,e._index=V(n._index),e._ptr=V(n._ptr),e._size=V(n._size),e._datatype=t||n._datatype):a(e,n.valueOf(),t||n._datatype)}(this,e,n);else if(e&&p(e.index)&&p(e.ptr)&&p(e.size))this._values=e.values,this._index=e.index,this._ptr=e.ptr,this._size=e.size,this._datatype=n||e.datatype;else if(p(e))a(this,e,n);else{if(e)throw new TypeError("Unsupported type of data ("+G(e)+")");this._values=[],this._index=[],this._ptr=[0],this._size=[0,0],this._datatype=n}}function a(e,r,i){e._values=[],e._index=[],e._ptr=[],e._datatype=i;var a=r.length,o=0,s=t,u=0;if(l(i)&&(s=n.find(t,[i,i])||t,u=n.convert(0,i)),a>0){var c=0;do{e._ptr.push(e._index.length);for(var f=0;f<a;f++){var d=r[f];if(p(d)){if(0===c&&o<d.length&&(o=d.length),c<d.length){var m=d[c];s(m,u)||(e._values.push(m),e._index.push(f))}}else 0===c&&o<1&&(o=1),s(d,u)||(e._values.push(d),e._index.push(f))}c++}while(c<o)}e._ptr.push(e._index.length),e._size=[a,o]}function u(e,n){if(!v(n))throw new TypeError("Invalid index");if(n.isScalar())return e.get(n.min());var t,r,a,o,s=n.size();if(s.length!==e._size.length)throw new qe(s.length,e._size.length);var u=n.min(),c=n.max();for(t=0,r=e._size.length;t<r;t++)Fe(u[t],e._size[t]),Fe(c[t],e._size[t]);var f=e._values,l=e._index,p=e._ptr,d=n.dimension(0),m=n.dimension(1),h=[],y=[];d.forEach((function(e,n){y[e]=n[0],h[e]=!0}));var g=f?[]:void 0,x=[],b=[];return m.forEach((function(e){for(b.push(x.length),a=p[e],o=p[e+1];a<o;a++)t=l[a],!0===h[t]&&(x.push(y[t]),g&&g.push(f[a]))})),b.push(x.length),new i({values:g,index:x,ptr:b,size:s,datatype:e._datatype})}function c(e,n,t,r){if(!n||!0!==n.isIndex)throw new TypeError("Invalid index");var i,a=n.size(),o=n.isScalar();if(d(t)?(i=t.size(),t=t.toArray()):i=Pe(t),o){if(0!==i.length)throw new TypeError("Scalar expected");e.set(n.min(),t,r)}else{if(1!==a.length&&2!==a.length)throw new qe(a.length,e._size.length,"<");if(i.length<a.length){for(var s=0,u=0;1===a[s]&&1===i[s];)s++;for(;1===a[s];)u++,s++;t=He(t,a.length,u,i)}if(!J(a,i))throw new qe(a,i,">");for(var c=n.min()[0],f=n.min()[1],l=i[0],p=i[1],m=0;m<l;m++)for(var h=0;h<p;h++){var y=t[m][h];e.set([m+c,h+f],y,r)}}return e}function f(e,n,t,r){if(t-n==0)return t;for(var i=n;i<t;i++)if(r[i]===e)return i;return n}function h(e,n,t,r,i,a,o){i.splice(e,0,r),a.splice(e,0,n);for(var s=t+1;s<o.length;s++)o[s]++}function y(e,r,i,a){var o=a||0,s=t,u=0;l(e._datatype)&&(s=n.find(t,[e._datatype,e._datatype])||t,u=n.convert(0,e._datatype),o=n.convert(o,e._datatype));var c,f,p,d=!s(o,u),m=e._size[0],h=e._size[1];if(i>h){for(f=h;f<i;f++)if(e._ptr[f]=e._values.length,d)for(c=0;c<m;c++)e._values.push(o),e._index.push(c);e._ptr[i]=e._values.length}else i<h&&(e._ptr.splice(i+1,h-i),e._values.splice(e._ptr[i],e._values.length),e._index.splice(e._ptr[i],e._index.length));if(h=i,r>m){if(d){var y=0;for(f=0;f<h;f++){e._ptr[f]=e._ptr[f]+y,p=e._ptr[f+1]+y;var g=0;for(c=m;c<r;c++,g++)e._values.splice(p+g,0,o),e._index.splice(p+g,0,c),y++}e._ptr[h]=e._values.length}}else if(r<m){var v=0;for(f=0;f<h;f++){e._ptr[f]=e._ptr[f]-v;var x=e._ptr[f],b=e._ptr[f+1]-v;for(p=x;p<b;p++)(c=e._index[p])>r-1&&(e._values.splice(p,1),e._index.splice(p,1),v++)}e._ptr[f]=e._values.length}return e._size[0]=r,e._size[1]=i,e}function g(e,n,t,r,i){var a,o,s=r[0],u=r[1],c=[];for(a=0;a<s;a++)for(c[a]=[],o=0;o<u;o++)c[a][o]=0;for(o=0;o<u;o++)for(var f=t[o],l=t[o+1],p=f;p<l;p++)c[a=n[p]][o]=e?i?V(e[p]):e[p]:1;return c}return i.prototype=new r,i.prototype.createSparseMatrix=function(e,n){return new i(e,n)},i.prototype.type="SparseMatrix",i.prototype.isSparseMatrix=!0,i.prototype.getDataType=function(){return Qe(this._values,G)},i.prototype.storage=function(){return"sparse"},i.prototype.datatype=function(){return this._datatype},i.prototype.create=function(e,n){return new i(e,n)},i.prototype.density=function(){var e=this._size[0],n=this._size[1];return 0!==e&&0!==n?this._index.length/(e*n):0},i.prototype.subset=function(e,n,t){if(!this._values)throw new Error("Cannot invoke subset on a Pattern only matrix");switch(arguments.length){case 1:return u(this,e);case 2:case 3:return c(this,e,n,t);default:throw new SyntaxError("Wrong number of arguments")}},i.prototype.get=function(e){if(!p(e))throw new TypeError("Array expected");if(e.length!==this._size.length)throw new qe(e.length,this._size.length);if(!this._values)throw new Error("Cannot invoke get on a Pattern only matrix");var n=e[0],t=e[1];Fe(n,this._size[0]),Fe(t,this._size[1]);var r=f(n,this._ptr[t],this._ptr[t+1],this._index);return r<this._ptr[t+1]&&this._index[r]===n?this._values[r]:0},i.prototype.set=function(e,r,i){if(!p(e))throw new TypeError("Array expected");if(e.length!==this._size.length)throw new qe(e.length,this._size.length);if(!this._values)throw new Error("Cannot invoke set on a Pattern only matrix");var a=e[0],o=e[1],s=this._size[0],u=this._size[1],c=t,d=0;l(this._datatype)&&(c=n.find(t,[this._datatype,this._datatype])||t,d=n.convert(0,this._datatype)),(a>s-1||o>u-1)&&(y(this,Math.max(a+1,s),Math.max(o+1,u),i),s=this._size[0],u=this._size[1]),Fe(a,s),Fe(o,u);var m=f(a,this._ptr[o],this._ptr[o+1],this._index);return m<this._ptr[o+1]&&this._index[m]===a?c(r,d)?function(e,n,t,r,i){t.splice(e,1),r.splice(e,1);for(var a=n+1;a<i.length;a++)i[a]--}(m,o,this._values,this._index,this._ptr):this._values[m]=r:h(m,a,o,r,this._values,this._index,this._ptr),this},i.prototype.resize=function(e,n,t){if(!m(e))throw new TypeError("Array or Matrix expected");var r=e.valueOf().map((function(e){return Array.isArray(e)&&1===e.length?e[0]:e}));if(2!==r.length)throw new Error("Only two dimensions matrix are supported");return r.forEach((function(e){if(!o(e)||!oe(e)||e<0)throw new TypeError("Invalid size, must contain positive integers (size: "+Te(r)+")")})),y(t?this.clone():this,r[0],r[1],n)},i.prototype.reshape=function(e,n){if(!p(e))throw new TypeError("Array expected");if(2!==e.length)throw new Error("Sparse matrices can only be reshaped in two dimensions");if(e.forEach((function(n){if(!o(n)||!oe(n)||n<0)throw new TypeError("Invalid size, must contain positive integers (size: "+Te(e)+")")})),this._size[0]*this._size[1]!=e[0]*e[1])throw new Error("Reshaping sparse matrix will result in the wrong number of elements");var t=n?this.clone():this;if(this._size[0]===e[0]&&this._size[1]===e[1])return t;for(var r=[],i=0;i<t._ptr.length;i++)for(var a=0;a<t._ptr[i+1]-t._ptr[i];a++)r.push(i);for(var s=t._values.slice(),u=t._index.slice(),c=0;c<t._index.length;c++){var l=u[c],d=r[c],m=l*t._size[1]+d;r[c]=m%e[1],u[c]=Math.floor(m/e[1])}t._values.length=0,t._index.length=0,t._ptr.length=e[1]+1,t._size=e.slice();for(var y=0;y<t._ptr.length;y++)t._ptr[y]=0;for(var g=0;g<s.length;g++){var v=u[g],x=r[g],b=s[g];h(f(v,t._ptr[x],t._ptr[x+1],t._index),v,x,b,t._values,t._index,t._ptr)}return t},i.prototype.clone=function(){return new i({values:this._values?V(this._values):void 0,index:V(this._index),ptr:V(this._ptr),size:V(this._size),datatype:this._datatype})},i.prototype.size=function(){return this._size.slice(0)},i.prototype.map=function(e,r){if(!this._values)throw new Error("Cannot invoke map on a Pattern only matrix");var a=this;return function(e,r,a,o,s,u,c){var f=[],p=[],d=[],m=t,h=0;l(e._datatype)&&(m=n.find(t,[e._datatype,e._datatype])||t,h=n.convert(0,e._datatype));for(var y=function(e,n,t){e=u(e,n,t),m(e,h)||(f.push(e),p.push(n))},g=o;g<=s;g++){d.push(f.length);var v=e._ptr[g],x=e._ptr[g+1];if(c)for(var b=v;b<x;b++){var w=e._index[b];w>=r&&w<=a&&y(e._values[b],w-r,g-o)}else{for(var N={},S=v;S<x;S++){var M=e._index[S];N[M]=e._values[S]}for(var D=r;D<=a;D++){var E=D in N?N[D]:0;y(E,D-r,g-o)}}}return d.push(f.length),new i({values:f,index:p,ptr:d,size:[a-r+1,s-o+1]})}(this,0,this._size[0]-1,0,this._size[1]-1,(function(n,t,r){return e(n,[t,r],a)}),r)},i.prototype.forEach=function(e,n){if(!this._values)throw new Error("Cannot invoke forEach on a Pattern only matrix");for(var t=this._size[0],r=this._size[1],i=0;i<r;i++){var a=this._ptr[i],o=this._ptr[i+1];if(n)for(var s=a;s<o;s++){var u=this._index[s];e(this._values[s],[u,i],this)}else{for(var c={},f=a;f<o;f++){c[this._index[f]]=this._values[f]}for(var l=0;l<t;l++){e(l in c?c[l]:0,[l,i],this)}}}},i.prototype.toArray=function(){return g(this._values,this._index,this._ptr,this._size,!0)},i.prototype.valueOf=function(){return g(this._values,this._index,this._ptr,this._size,!1)},i.prototype.format=function(e){for(var n=this._size[0],t=this._size[1],r=this.density(),i="Sparse Matrix ["+Te(n,e)+" x "+Te(t,e)+"] density: "+Te(r,e)+"\n",a=0;a<t;a++)for(var o=this._ptr[a],s=this._ptr[a+1],u=o;u<s;u++){i+="\n    ("+Te(this._index[u],e)+", "+Te(a,e)+") ==> "+(this._values?Te(this._values[u],e):"X")}return i},i.prototype.toString=function(){return Te(this.toArray())},i.prototype.toJSON=function(){return{mathjs:"SparseMatrix",values:this._values,index:this._index,ptr:this._ptr,size:this._size,datatype:this._datatype}},i.prototype.diagonal=function(e){if(e){if(s(e)&&(e=e.toNumber()),!o(e)||!oe(e))throw new TypeError("The parameter k must be an integer number")}else e=0;var n=e>0?e:0,t=e<0?-e:0,r=this._size[0],a=this._size[1],u=Math.min(r-t,a-n),c=[],f=[],l=[];l[0]=0;for(var p=n;p<a&&c.length<u;p++)for(var d=this._ptr[p],m=this._ptr[p+1],h=d;h<m;h++){var y=this._index[h];if(y===p-n+t){c.push(this._values[h]),f[c.length-1]=y-t;break}}return l.push(c.length),new i({values:c,index:f,ptr:l,size:[u,1]})},i.fromJSON=function(e){return new i(e)},i.diagonal=function(e,r,a,u,c){if(!p(e))throw new TypeError("Array expected, size parameter");if(2!==e.length)throw new Error("Only two dimensions matrix are supported");if(e=e.map((function(e){if(s(e)&&(e=e.toNumber()),!o(e)||!oe(e)||e<1)throw new Error("Size values must be positive integers");return e})),a){if(s(a)&&(a=a.toNumber()),!o(a)||!oe(a))throw new TypeError("The parameter k must be an integer number")}else a=0;var f=t,m=0;l(c)&&(f=n.find(t,[c,c])||t,m=n.convert(0,c));var h,y=a>0?a:0,g=a<0?-a:0,v=e[0],x=e[1],b=Math.min(v-g,x-y);if(p(r)){if(r.length!==b)throw new Error("Invalid value array length");h=function(e){return r[e]}}else if(d(r)){var w=r.size();if(1!==w.length||w[0]!==b)throw new Error("Invalid matrix length");h=function(e){return r.get([e])}}else h=function(){return r};for(var N=[],S=[],M=[],D=0;D<x;D++){M.push(N.length);var E=D-y;if(E>=0&&E<b){var A=h(E);f(A,m)||(S.push(E+g),N.push(A))}}return M.push(N.length),new i({values:N,index:S,ptr:M,size:[v,x]})},i.prototype.swapRows=function(e,n){if(!(o(e)&&oe(e)&&o(n)&&oe(n)))throw new Error("Row index must be positive integers");if(2!==this._size.length)throw new Error("Only two dimensional matrix is supported");return Fe(e,this._size[0]),Fe(n,this._size[0]),i._swapRows(e,n,this._size[1],this._values,this._index,this._ptr),this},i._forEachRow=function(e,n,t,r,i){for(var a=r[e],o=r[e+1],s=a;s<o;s++)i(t[s],n[s])},i._swapRows=function(e,n,t,r,i,a){for(var o=0;o<t;o++){var s=a[o],u=a[o+1],c=f(e,s,u,i),l=f(n,s,u,i);if(c<u&&l<u&&i[c]===e&&i[l]===n){if(r){var p=r[c];r[c]=r[l],r[l]=p}}else if(c<u&&i[c]===e&&(l>=u||i[l]!==n)){var d=r?r[c]:void 0;i.splice(l,0,n),r&&r.splice(l,0,d),i.splice(l<=c?c+1:c,1),r&&r.splice(l<=c?c+1:c,1)}else if(l<u&&i[l]===n&&(c>=u||i[c]!==e)){var m=r?r[l]:void 0;i.splice(c,0,e),r&&r.splice(c,0,m),i.splice(c<=l?l+1:l,1),r&&r.splice(c<=l?l+1:l,1)}}},i}),{isClass:!0}),Ja=en("matrix",["typed","Matrix","DenseMatrix","SparseMatrix"],(function(e){var n=e.typed,t=(e.Matrix,e.DenseMatrix),r=e.SparseMatrix;return n("matrix",{"":function(){return i([])},string:function(e){return i([],e)},"string, string":function(e,n){return i([],e,n)},Array:function(e){return i(e)},Matrix:function(e){return i(e,e.storage())},"Array | Matrix, string":i,"Array | Matrix, string, string":i});function i(e,n,i){if("dense"===n||"default"===n||void 0===n)return new t(e,i);if("sparse"===n)return new r(e,i);throw new TypeError("Unknown matrix type "+JSON.stringify(n)+".")}})),Ya=en("cbrt",["config","typed","isNegative","unaryMinus","matrix","Complex","BigNumber","Fraction"],(function(e){var n=e.config,t=e.typed,r=e.isNegative,i=e.unaryMinus,a=e.matrix,o=e.Complex,f=e.BigNumber,l=e.Fraction,p=t("cbrt",{number:Ar,Complex:d,"Complex, boolean":d,BigNumber:function(e){return e.cbrt()},Unit:function(e){if(e.value&&u(e.value)){var n=e.clone();return n.value=1,(n=n.pow(1/3)).value=d(e.value),n}var t,a=r(e.value);a&&(e.value=i(e.value)),t=s(e.value)?new f(1).div(3):c(e.value)?new l(1,3):1/3;var o=e.pow(t);return a&&(o.value=i(o.value)),o},"Array | Matrix":function(e){return rr(e,p,!0)}});function d(e,t){var r=e.arg()/3,i=e.abs(),s=new o(Ar(i),0).mul(new o(0,r).exp());if(t){var u=[s,new o(Ar(i),0).mul(new o(0,r+2*Math.PI/3).exp()),new o(Ar(i),0).mul(new o(0,r-2*Math.PI/3).exp())];return"Array"===n.matrix?u:a(u)}return s}return p})),Xa=en("algorithm01",["typed"],(function(e){var n=e.typed;return function(e,t,r,i){var a=e._data,o=e._size,s=e._datatype,u=t._values,c=t._index,f=t._ptr,l=t._size,p=t._datatype;if(o.length!==l.length)throw new qe(o.length,l.length);if(o[0]!==l[0]||o[1]!==l[1])throw new RangeError("Dimension mismatch. Matrix A ("+o+") must match Matrix B ("+l+")");if(!u)throw new Error("Cannot perform operation on Dense Matrix and Pattern Sparse Matrix");var d,m,h=o[0],y=o[1],g="string"==typeof s&&s===p?s:void 0,v=g?n.find(r,[g,g]):r,x=[];for(d=0;d<h;d++)x[d]=[];var b=[],w=[];for(m=0;m<y;m++){for(var N=m+1,S=f[m],M=f[m+1],D=S;D<M;D++)b[d=c[D]]=i?v(u[D],a[d][m]):v(a[d][m],u[D]),w[d]=N;for(d=0;d<h;d++)w[d]===N?x[d][m]=b[d]:x[d][m]=a[d][m]}return e.createDenseMatrix({data:x,size:[h,y],datatype:g})}})),Qa=en("algorithm04",["typed","equalScalar"],(function(e){var n=e.typed,t=e.equalScalar;return function(e,r,i){var a=e._values,o=e._index,s=e._ptr,u=e._size,c=e._datatype,f=r._values,l=r._index,p=r._ptr,d=r._size,m=r._datatype;if(u.length!==d.length)throw new qe(u.length,d.length);if(u[0]!==d[0]||u[1]!==d[1])throw new RangeError("Dimension mismatch. Matrix A ("+u+") must match Matrix B ("+d+")");var h,y=u[0],g=u[1],v=t,x=0,b=i;"string"==typeof c&&c===m&&(h=c,v=n.find(t,[h,h]),x=n.convert(0,h),b=n.find(i,[h,h]));var w,N,S,M,D,E=a&&f?[]:void 0,A=[],_=[],O=a&&f?[]:void 0,C=a&&f?[]:void 0,T=[],I=[];for(N=0;N<g;N++){_[N]=A.length;var k=N+1;for(M=s[N],D=s[N+1],S=M;S<D;S++)w=o[S],A.push(w),T[w]=k,O&&(O[w]=a[S]);for(M=p[N],D=p[N+1],S=M;S<D;S++)if(T[w=l[S]]===k){if(O){var B=b(O[w],f[S]);v(B,x)?T[w]=null:O[w]=B}}else A.push(w),I[w]=k,C&&(C[w]=f[S]);if(O&&C)for(S=_[N];S<A.length;)T[w=A[S]]===k?(E[S]=O[w],S++):I[w]===k?(E[S]=C[w],S++):A.splice(S,1)}return _[g]=A.length,e.createSparseMatrix({values:E,index:A,ptr:_,size:[y,g],datatype:h})}})),Ka=en("algorithm10",["typed","DenseMatrix"],(function(e){var n=e.typed,t=e.DenseMatrix;return function(e,r,i,a){var o=e._values,s=e._index,u=e._ptr,c=e._size,f=e._datatype;if(!o)throw new Error("Cannot perform operation on Pattern Sparse Matrix and Scalar value");var l,p=c[0],d=c[1],m=i;"string"==typeof f&&(l=f,r=n.convert(r,l),m=n.find(i,[l,l]));for(var h=[],y=[],g=[],v=0;v<d;v++){for(var x=v+1,b=u[v],w=u[v+1],N=b;N<w;N++){var S=s[N];y[S]=o[N],g[S]=x}for(var M=0;M<p;M++)0===v&&(h[M]=[]),g[M]===x?h[M][v]=a?m(r,y[M]):m(y[M],r):h[M][v]=r}return new t({data:h,size:[p,d],datatype:l})}})),eo=en("algorithm13",["typed"],(function(e){var n=e.typed;return function(e,t,r){var i,a=e._data,o=e._size,s=e._datatype,u=t._data,c=t._size,f=t._datatype,l=[];if(o.length!==c.length)throw new qe(o.length,c.length);for(var p=0;p<o.length;p++){if(o[p]!==c[p])throw new RangeError("Dimension mismatch. Matrix A ("+o+") must match Matrix B ("+c+")");l[p]=o[p]}var d=r;"string"==typeof s&&s===f&&(i=s,d=n.find(r,[i,i]));var m=l.length>0?function e(n,t,r,i,a,o){var s=[];if(t===r.length-1)for(var u=0;u<i;u++)s[u]=n(a[u],o[u]);else for(var c=0;c<i;c++)s[c]=e(n,t+1,r,r[t+1],a[c],o[c]);return s}(d,0,l,l[0],a,u):[];return e.createDenseMatrix({data:m,size:l,datatype:i})}})),no=en("algorithm14",["typed"],(function(e){var n=e.typed;return function(e,t,r,i){var a,o=e._data,s=e._size,u=e._datatype,c=r;"string"==typeof u&&(a=u,t=n.convert(t,a),c=n.find(r,[a,a]));var f=s.length>0?function e(n,t,r,i,a,o,s){var u=[];if(t===r.length-1)for(var c=0;c<i;c++)u[c]=s?n(o,a[c]):n(a[c],o);else for(var f=0;f<i;f++)u[f]=e(n,t+1,r,r[t+1],a[f],o,s);return u}(c,0,s,s[0],o,t,i):[];return e.createDenseMatrix({data:f,size:V(s),datatype:a})}})),to=en("gcd",["typed","matrix","equalScalar","BigNumber","DenseMatrix"],(function(e){var n=e.typed,t=e.matrix,r=e.equalScalar,i=e.BigNumber,a=e.DenseMatrix,o=Xa({typed:n}),s=Qa({typed:n,equalScalar:r}),u=Ka({typed:n,DenseMatrix:a}),c=eo({typed:n}),f=no({typed:n}),l=n("gcd",{"number, number":Ir,"BigNumber, BigNumber":function(e,n){if(!e.isInt()||!n.isInt())throw new Error("Parameters in function gcd must be integer numbers");var t=new i(0);for(;!n.isZero();){var r=e.mod(n);e=n,n=r}return e.lt(t)?e.neg():e},"Fraction, Fraction":function(e,n){return e.gcd(n)},"SparseMatrix, SparseMatrix":function(e,n){return s(e,n,l)},"SparseMatrix, DenseMatrix":function(e,n){return o(n,e,l,!0)},"DenseMatrix, SparseMatrix":function(e,n){return o(e,n,l,!1)},"DenseMatrix, DenseMatrix":function(e,n){return c(e,n,l)},"Array, Array":function(e,n){return l(t(e),t(n)).valueOf()},"Array, Matrix":function(e,n){return l(t(e),n)},"Matrix, Array":function(e,n){return l(e,t(n))},"SparseMatrix, number | BigNumber":function(e,n){return u(e,n,l,!1)},"DenseMatrix, number | BigNumber":function(e,n){return f(e,n,l,!1)},"number | BigNumber, SparseMatrix":function(e,n){return u(n,e,l,!0)},"number | BigNumber, DenseMatrix":function(e,n){return f(n,e,l,!0)},"Array, number | BigNumber":function(e,n){return f(t(e),n,l,!1).valueOf()},"number | BigNumber, Array":function(e,n){return f(t(n),e,l,!0).valueOf()},"Array | Matrix | number | BigNumber, Array | Matrix | number | BigNumber, ...Array | Matrix | number | BigNumber":function(e,n,t){for(var r=l(e,n),i=0;i<t.length;i++)r=l(r,t[i]);return r}});return l})),ro=en("algorithm02",["typed","equalScalar"],(function(e){var n=e.typed,t=e.equalScalar;return function(e,r,i,a){var o=e._data,s=e._size,u=e._datatype,c=r._values,f=r._index,l=r._ptr,p=r._size,d=r._datatype;if(s.length!==p.length)throw new qe(s.length,p.length);if(s[0]!==p[0]||s[1]!==p[1])throw new RangeError("Dimension mismatch. Matrix A ("+s+") must match Matrix B ("+p+")");if(!c)throw new Error("Cannot perform operation on Dense Matrix and Pattern Sparse Matrix");var m,h=s[0],y=s[1],g=t,v=0,x=i;"string"==typeof u&&u===d&&(m=u,g=n.find(t,[m,m]),v=n.convert(0,m),x=n.find(i,[m,m]));for(var b=[],w=[],N=[],S=0;S<y;S++){N[S]=w.length;for(var M=l[S],D=l[S+1],E=M;E<D;E++){var A=f[E],_=a?x(c[E],o[A][S]):x(o[A][S],c[E]);g(_,v)||(w.push(A),b.push(_))}}return N[y]=w.length,r.createSparseMatrix({values:b,index:w,ptr:N,size:[h,y],datatype:m})}})),io=en("algorithm03",["typed"],(function(e){var n=e.typed;return function(e,t,r,i){var a=e._data,o=e._size,s=e._datatype,u=t._values,c=t._index,f=t._ptr,l=t._size,p=t._datatype;if(o.length!==l.length)throw new qe(o.length,l.length);if(o[0]!==l[0]||o[1]!==l[1])throw new RangeError("Dimension mismatch. Matrix A ("+o+") must match Matrix B ("+l+")");if(!u)throw new Error("Cannot perform operation on Dense Matrix and Pattern Sparse Matrix");var d,m=o[0],h=o[1],y=0,g=r;"string"==typeof s&&s===p&&(d=s,y=n.convert(0,d),g=n.find(r,[d,d]));for(var v=[],x=0;x<m;x++)v[x]=[];for(var b=[],w=[],N=0;N<h;N++){for(var S=N+1,M=f[N],D=f[N+1],E=M;E<D;E++){var A=c[E];b[A]=i?g(u[E],a[A][N]):g(a[A][N],u[E]),w[A]=S}for(var _=0;_<m;_++)w[_]===S?v[_][N]=b[_]:v[_][N]=i?g(y,a[_][N]):g(a[_][N],y)}return e.createDenseMatrix({data:v,size:[m,h],datatype:d})}})),ao=en("algorithm05",["typed","equalScalar"],(function(e){var n=e.typed,t=e.equalScalar;return function(e,r,i){var a=e._values,o=e._index,s=e._ptr,u=e._size,c=e._datatype,f=r._values,l=r._index,p=r._ptr,d=r._size,m=r._datatype;if(u.length!==d.length)throw new qe(u.length,d.length);if(u[0]!==d[0]||u[1]!==d[1])throw new RangeError("Dimension mismatch. Matrix A ("+u+") must match Matrix B ("+d+")");var h,y=u[0],g=u[1],v=t,x=0,b=i;"string"==typeof c&&c===m&&(h=c,v=n.find(t,[h,h]),x=n.convert(0,h),b=n.find(i,[h,h]));var w,N,S,M,D=a&&f?[]:void 0,E=[],A=[],_=D?[]:void 0,O=D?[]:void 0,C=[],T=[];for(N=0;N<g;N++){A[N]=E.length;var I=N+1;for(S=s[N],M=s[N+1];S<M;S++)w=o[S],E.push(w),C[w]=I,_&&(_[w]=a[S]);for(S=p[N],M=p[N+1];S<M;S++)C[w=l[S]]!==I&&E.push(w),T[w]=I,O&&(O[w]=f[S]);if(D)for(S=A[N];S<E.length;){var k=C[w=E[S]],B=T[w];if(k===I||B===I){var q=b(k===I?_[w]:x,B===I?O[w]:x);v(q,x)?E.splice(S,1):(D.push(q),S++)}}}return A[g]=E.length,e.createSparseMatrix({values:D,index:E,ptr:A,size:[y,g],datatype:h})}})),oo=en("algorithm11",["typed","equalScalar"],(function(e){var n=e.typed,t=e.equalScalar;return function(e,r,i,a){var o=e._values,s=e._index,u=e._ptr,c=e._size,f=e._datatype;if(!o)throw new Error("Cannot perform operation on Pattern Sparse Matrix and Scalar value");var l,p=c[0],d=c[1],m=t,h=0,y=i;"string"==typeof f&&(l=f,m=n.find(t,[l,l]),h=n.convert(0,l),r=n.convert(r,l),y=n.find(i,[l,l]));for(var g=[],v=[],x=[],b=0;b<d;b++){x[b]=v.length;for(var w=u[b],N=u[b+1],S=w;S<N;S++){var M=s[S],D=a?y(r,o[S]):y(o[S],r);m(D,h)||(v.push(M),g.push(D))}}return x[d]=v.length,e.createSparseMatrix({values:g,index:v,ptr:x,size:[p,d],datatype:l})}})),so=en("algorithm12",["typed","DenseMatrix"],(function(e){var n=e.typed,t=e.DenseMatrix;return function(e,r,i,a){var o=e._values,s=e._index,u=e._ptr,c=e._size,f=e._datatype;if(!o)throw new Error("Cannot perform operation on Pattern Sparse Matrix and Scalar value");var l,p=c[0],d=c[1],m=i;"string"==typeof f&&(l=f,r=n.convert(r,l),m=n.find(i,[l,l]));for(var h=[],y=[],g=[],v=0;v<d;v++){for(var x=v+1,b=u[v],w=u[v+1],N=b;N<w;N++){var S=s[N];y[S]=o[N],g[S]=x}for(var M=0;M<p;M++)0===v&&(h[M]=[]),g[M]===x?h[M][v]=a?m(r,y[M]):m(y[M],r):h[M][v]=a?m(r,0):m(0,r)}return new t({data:h,size:[p,d],datatype:l})}})),uo=en("mod",["typed","matrix","equalScalar","DenseMatrix"],(function(e){var n=e.typed,t=e.matrix,r=e.equalScalar,i=e.DenseMatrix,a=ro({typed:n,equalScalar:r}),o=io({typed:n}),s=ao({typed:n,equalScalar:r}),u=oo({typed:n,equalScalar:r}),c=so({typed:n,DenseMatrix:i}),f=eo({typed:n}),l=no({typed:n}),p=n("mod",{"number, number":Pr,"BigNumber, BigNumber":function(e,n){return n.isZero()?e:e.mod(n)},"Fraction, Fraction":function(e,n){return e.mod(n)},"SparseMatrix, SparseMatrix":function(e,n){return s(e,n,p,!1)},"SparseMatrix, DenseMatrix":function(e,n){return a(n,e,p,!0)},"DenseMatrix, SparseMatrix":function(e,n){return o(e,n,p,!1)},"DenseMatrix, DenseMatrix":function(e,n){return f(e,n,p)},"Array, Array":function(e,n){return p(t(e),t(n)).valueOf()},"Array, Matrix":function(e,n){return p(t(e),n)},"Matrix, Array":function(e,n){return p(e,t(n))},"SparseMatrix, any":function(e,n){return u(e,n,p,!1)},"DenseMatrix, any":function(e,n){return l(e,n,p,!1)},"any, SparseMatrix":function(e,n){return c(n,e,p,!0)},"any, DenseMatrix":function(e,n){return l(n,e,p,!0)},"Array, any":function(e,n){return l(t(e),n,p,!1).valueOf()},"any, Array":function(e,n){return l(t(n),e,p,!0).valueOf()}});return p})),co=en("algorithm06",["typed","equalScalar"],(function(e){var n=e.typed,t=e.equalScalar;return function(e,r,i){var a=e._values,o=e._size,s=e._datatype,u=r._values,c=r._size,f=r._datatype;if(o.length!==c.length)throw new qe(o.length,c.length);if(o[0]!==c[0]||o[1]!==c[1])throw new RangeError("Dimension mismatch. Matrix A ("+o+") must match Matrix B ("+c+")");var l,p=o[0],d=o[1],m=t,h=0,y=i;"string"==typeof s&&s===f&&(l=s,m=n.find(t,[l,l]),h=n.convert(0,l),y=n.find(i,[l,l]));for(var g=a&&u?[]:void 0,v=[],x=[],b=g?[]:void 0,w=[],N=[],S=0;S<d;S++){x[S]=v.length;var M=S+1;if(or(e,S,w,b,N,M,v,y),or(r,S,w,b,N,M,v,y),b)for(var D=x[S];D<v.length;){var E=v[D];if(N[E]===M){var A=b[E];m(A,h)?v.splice(D,1):(g.push(A),D++)}else v.splice(D,1)}else for(var _=x[S];_<v.length;){N[v[_]]!==M?v.splice(_,1):_++}}return x[d]=v.length,e.createSparseMatrix({values:g,index:v,ptr:x,size:[p,d],datatype:l})}})),fo=en("nthRoot",["typed","matrix","equalScalar","BigNumber"],(function(e){var n=e.typed,t=e.matrix,r=e.equalScalar,i=e.BigNumber,a=Xa({typed:n}),o=ro({typed:n,equalScalar:r}),s=co({typed:n,equalScalar:r}),u=oo({typed:n,equalScalar:r}),c=eo({typed:n}),f=no({typed:n}),l="Complex number not supported in function nthRoot. Use nthRoots instead.",p=n("nthRoot",{number:function(e){return zr(e,2)},"number, number":zr,BigNumber:function(e){return d(e,new i(2))},Complex:function(e){throw new Error(l)},"Complex, number":function(e,n){throw new Error(l)},"BigNumber, BigNumber":d,"Array | Matrix":function(e){return p(e,2)},"SparseMatrix, SparseMatrix":function(e,n){if(1===n.density())return s(e,n,p);throw new Error("Root must be non-zero")},"SparseMatrix, DenseMatrix":function(e,n){return o(n,e,p,!0)},"DenseMatrix, SparseMatrix":function(e,n){if(1===n.density())return a(e,n,p,!1);throw new Error("Root must be non-zero")},"DenseMatrix, DenseMatrix":function(e,n){return c(e,n,p)},"Array, Array":function(e,n){return p(t(e),t(n)).valueOf()},"Array, Matrix":function(e,n){return p(t(e),n)},"Matrix, Array":function(e,n){return p(e,t(n))},"SparseMatrix, number | BigNumber":function(e,n){return u(e,n,p,!1)},"DenseMatrix, number | BigNumber":function(e,n){return f(e,n,p,!1)},"number | BigNumber, SparseMatrix":function(e,n){if(1===n.density())return u(n,e,p,!0);throw new Error("Root must be non-zero")},"number | BigNumber, DenseMatrix":function(e,n){return f(n,e,p,!0)},"Array, number | BigNumber":function(e,n){return p(t(e),n).valueOf()},"number | BigNumber, Array":function(e,n){return p(e,t(n)).valueOf()}});return p;function d(e,n){var t=i.precision,r=i.clone({precision:t+2}),a=new i(0),o=new r(1),s=n.isNegative();if(s&&(n=n.neg()),n.isZero())throw new Error("Root must be non-zero");if(e.isNegative()&&!n.abs().mod(2).equals(1))throw new Error("Root must be odd when a is negative.");if(e.isZero())return s?new r(1/0):0;if(!e.isFinite())return s?a:e;var u=e.abs().pow(o.div(n));return u=e.isNeg()?u.neg():u,new i((s?o.div(u):u).toPrecision(t))}})),lo=en("xgcd",["typed","config","matrix","BigNumber"],(function(e){var n=e.typed,t=e.config,r=e.matrix,i=e.BigNumber;return n("xgcd",{"number, number":function(e,n){var i=Ur(e,n);return"Array"===t.matrix?i:r(i)},"BigNumber, BigNumber":function(e,n){var a,o,s,u,c=new i(0),f=new i(1),l=c,p=f,d=f,m=c;if(!e.isInt()||!n.isInt())throw new Error("Parameters in function xgcd must be integer numbers");for(;!n.isZero();)o=e.div(n).floor(),s=e.mod(n),a=l,l=p.minus(o.times(l)),p=a,a=d,d=m.minus(o.times(d)),m=a,e=n,n=s;u=e.lt(c)?[e.neg(),p.neg(),m.neg()]:[e,e.isZero()?0:p,m];return"Array"===t.matrix?u:r(u)}})})),po=en("bitAnd",["typed","matrix","equalScalar"],(function(e){var n=e.typed,t=e.matrix,r=e.equalScalar,i=ro({typed:n,equalScalar:r}),a=co({typed:n,equalScalar:r}),o=oo({typed:n,equalScalar:r}),s=eo({typed:n}),u=no({typed:n}),c=n("bitAnd",{"number, number":ui,"BigNumber, BigNumber":Kr,"SparseMatrix, SparseMatrix":function(e,n){return a(e,n,c,!1)},"SparseMatrix, DenseMatrix":function(e,n){return i(n,e,c,!0)},"DenseMatrix, SparseMatrix":function(e,n){return i(e,n,c,!1)},"DenseMatrix, DenseMatrix":function(e,n){return s(e,n,c)},"Array, Array":function(e,n){return c(t(e),t(n)).valueOf()},"Array, Matrix":function(e,n){return c(t(e),n)},"Matrix, Array":function(e,n){return c(e,t(n))},"SparseMatrix, any":function(e,n){return o(e,n,c,!1)},"DenseMatrix, any":function(e,n){return u(e,n,c,!1)},"any, SparseMatrix":function(e,n){return o(n,e,c,!0)},"any, DenseMatrix":function(e,n){return u(n,e,c,!0)},"Array, any":function(e,n){return u(t(e),n,c,!1).valueOf()},"any, Array":function(e,n){return u(t(n),e,c,!0).valueOf()}});return c})),mo=en("algorithm07",["typed","DenseMatrix"],(function(e){var n=e.typed,t=e.DenseMatrix;return function(e,i,a){var o=e._size,s=e._datatype,u=i._size,c=i._datatype;if(o.length!==u.length)throw new qe(o.length,u.length);if(o[0]!==u[0]||o[1]!==u[1])throw new RangeError("Dimension mismatch. Matrix A ("+o+") must match Matrix B ("+u+")");var f,l,p,d=o[0],m=o[1],h=0,y=a;"string"==typeof s&&s===c&&(f=s,h=n.convert(0,f),y=n.find(a,[f,f]));var g=[];for(l=0;l<d;l++)g[l]=[];var v=[],x=[],b=[],w=[];for(p=0;p<m;p++){var N=p+1;for(r(e,p,b,v,N),r(i,p,w,x,N),l=0;l<d;l++){var S=b[l]===N?v[l]:h,M=w[l]===N?x[l]:h;g[l][p]=y(S,M)}}return new t({data:g,size:[d,m],datatype:f})};function r(e,n,t,r,i){for(var a=e._values,o=e._index,s=e._ptr,u=s[n],c=s[n+1];u<c;u++){var f=o[u];t[f]=i,r[f]=a[u]}}})),ho=en("bitXor",["typed","matrix","DenseMatrix"],(function(e){var n=e.typed,t=e.matrix,r=e.DenseMatrix,i=io({typed:n}),a=mo({typed:n,DenseMatrix:r}),o=so({typed:n,DenseMatrix:r}),s=eo({typed:n}),u=no({typed:n}),c=n("bitXor",{"number, number":li,"BigNumber, BigNumber":ii,"SparseMatrix, SparseMatrix":function(e,n){return a(e,n,c)},"SparseMatrix, DenseMatrix":function(e,n){return i(n,e,c,!0)},"DenseMatrix, SparseMatrix":function(e,n){return i(e,n,c,!1)},"DenseMatrix, DenseMatrix":function(e,n){return s(e,n,c)},"Array, Array":function(e,n){return c(t(e),t(n)).valueOf()},"Array, Matrix":function(e,n){return c(t(e),n)},"Matrix, Array":function(e,n){return c(e,t(n))},"SparseMatrix, any":function(e,n){return o(e,n,c,!1)},"DenseMatrix, any":function(e,n){return u(e,n,c,!1)},"any, SparseMatrix":function(e,n){return o(n,e,c,!0)},"any, DenseMatrix":function(e,n){return u(n,e,c,!0)},"Array, any":function(e,n){return u(t(e),n,c,!1).valueOf()},"any, Array":function(e,n){return u(t(n),e,c,!0).valueOf()}});return c})),yo=en("or",["typed","matrix","equalScalar","DenseMatrix"],(function(e){var n=e.typed,t=e.matrix,r=e.equalScalar,i=e.DenseMatrix,a=io({typed:n}),o=ao({typed:n,equalScalar:r}),s=so({typed:n,DenseMatrix:i}),u=eo({typed:n}),c=no({typed:n}),f=n("or",{"number, number":xi,"Complex, Complex":function(e,n){return 0!==e.re||0!==e.im||0!==n.re||0!==n.im},"BigNumber, BigNumber":function(e,n){return!e.isZero()&&!e.isNaN()||!n.isZero()&&!n.isNaN()},"Unit, Unit":function(e,n){return f(e.value||0,n.value||0)},"SparseMatrix, SparseMatrix":function(e,n){return o(e,n,f)},"SparseMatrix, DenseMatrix":function(e,n){return a(n,e,f,!0)},"DenseMatrix, SparseMatrix":function(e,n){return a(e,n,f,!1)},"DenseMatrix, DenseMatrix":function(e,n){return u(e,n,f)},"Array, Array":function(e,n){return f(t(e),t(n)).valueOf()},"Array, Matrix":function(e,n){return f(t(e),n)},"Matrix, Array":function(e,n){return f(e,t(n))},"SparseMatrix, any":function(e,n){return s(e,n,f,!1)},"DenseMatrix, any":function(e,n){return c(e,n,f,!1)},"any, SparseMatrix":function(e,n){return s(n,e,f,!0)},"any, DenseMatrix":function(e,n){return c(n,e,f,!0)},"Array, any":function(e,n){return c(t(e),n,f,!1).valueOf()},"any, Array":function(e,n){return c(t(n),e,f,!0).valueOf()}});return f})),go=en("concat",["typed","matrix","isInteger"],(function(e){var n=e.typed,t=e.matrix,r=e.isInteger;return n("concat",{"...Array | Matrix | number | BigNumber":function(e){var n,i,a=e.length,u=-1,c=!1,f=[];for(n=0;n<a;n++){var l=e[n];if(d(l)&&(c=!0),o(l)||s(l)){if(n!==a-1)throw new Error("Dimension must be specified as last argument");if(i=u,u=l.valueOf(),!r(u))throw new TypeError("Integer number expected for dimension");if(u<0||n>0&&u>i)throw new Re(u,i+1)}else{var p=V(l).valueOf(),m=Pe(p);if(f[n]=p,i=u,u=m.length-1,n>0&&u!==i)throw new qe(i+1,u+1)}}if(0===f.length)throw new SyntaxError("At least one matrix expected");for(var h=f.shift();f.length;)h=vo(h,f.shift(),u,0);return c?t(h):h},"...string":function(e){return e.join("")}})}));function vo(e,n,t,r){if(r<t){if(e.length!==n.length)throw new qe(e.length,n.length);for(var i=[],a=0;a<e.length;a++)i[a]=vo(e[a],n[a],t,r+1);return i}return e.concat(n)}var xo=en("diag",["typed","matrix","DenseMatrix","SparseMatrix"],(function(e){var n=e.typed,t=e.matrix,r=e.DenseMatrix,i=e.SparseMatrix;return n("diag",{Array:function(e){return a(e,0,Pe(e),null)},"Array, number":function(e,n){return a(e,n,Pe(e),null)},"Array, BigNumber":function(e,n){return a(e,n.toNumber(),Pe(e),null)},"Array, string":function(e,n){return a(e,0,Pe(e),n)},"Array, number, string":function(e,n,t){return a(e,n,Pe(e),t)},"Array, BigNumber, string":function(e,n,t){return a(e,n.toNumber(),Pe(e),t)},Matrix:function(e){return a(e,0,e.size(),e.storage())},"Matrix, number":function(e,n){return a(e,n,e.size(),e.storage())},"Matrix, BigNumber":function(e,n){return a(e,n.toNumber(),e.size(),e.storage())},"Matrix, string":function(e,n){return a(e,0,e.size(),n)},"Matrix, number, string":function(e,n,t){return a(e,n,e.size(),t)},"Matrix, BigNumber, string":function(e,n,t){return a(e,n.toNumber(),e.size(),t)}});function a(e,n,a,o){if(!oe(n))throw new TypeError("Second parameter in function diag must be an integer");var s=n>0?n:0,u=n<0?-n:0;switch(a.length){case 1:return function(e,n,t,a,o,s){var u=[a+o,a+s];if(t&&"sparse"!==t&&"dense"!==t)throw new TypeError("Unknown matrix type ".concat(t,'"'));var c="sparse"===t?i.diagonal(u,e,n):r.diagonal(u,e,n);return null!==t?c:c.valueOf()}(e,n,o,a[0],u,s);case 2:return function(e,n,r,i,a,o){if(d(e)){var s=e.diagonal(n);return null!==r?r!==s.storage()?t(s,r):s:s.valueOf()}for(var u=Math.min(i[0]-a,i[1]-o),c=[],f=0;f<u;f++)c[f]=e[f+a][f+o];return null!==r?t(c):c}(e,n,o,a,u,s)}throw new RangeError("Matrix for function diag must be 2 dimensional")}})),bo=en("identity",["typed","config","matrix","BigNumber","DenseMatrix","SparseMatrix"],(function(e){var n=e.typed,t=e.config,r=e.matrix,i=e.BigNumber,a=e.DenseMatrix,o=e.SparseMatrix;return n("identity",{"":function(){return"Matrix"===t.matrix?r([]):[]},string:function(e){return r(e)},"number | BigNumber":function(e){return c(e,e,"Matrix"===t.matrix?"dense":void 0)},"number | BigNumber, string":function(e,n){return c(e,e,n)},"number | BigNumber, number | BigNumber":function(e,n){return c(e,n,"Matrix"===t.matrix?"dense":void 0)},"number | BigNumber, number | BigNumber, string":function(e,n,t){return c(e,n,t)},Array:function(e){return u(e)},"Array, string":function(e,n){return u(e,n)},Matrix:function(e){return u(e.valueOf(),e.storage())},"Matrix, string":function(e,n){return u(e.valueOf(),n)}});function u(e,n){switch(e.length){case 0:return n?r(n):[];case 1:return c(e[0],e[0],n);case 2:return c(e[0],e[1],n);default:throw new Error("Vector containing two values expected")}}function c(e,n,t){var r=s(e)||s(n)?i:null;if(s(e)&&(e=e.toNumber()),s(n)&&(n=n.toNumber()),!oe(e)||e<1)throw new Error("Parameters in function identity must be positive integers");if(!oe(n)||n<1)throw new Error("Parameters in function identity must be positive integers");var u=r?new i(1):1,c=r?new r(0):0,f=[e,n];if(t){if("sparse"===t)return o.diagonal(f,u,0,c);if("dense"===t)return a.diagonal(f,u,0,c);throw new TypeError('Unknown matrix type "'.concat(t,'"'))}for(var l=je([],f,c),p=e<n?e:n,d=0;d<p;d++)l[d][d]=u;return l}})),wo=en("ones",["typed","config","matrix","BigNumber"],(function(e){var n=e.typed,t=e.config,r=e.matrix,i=e.BigNumber;return n("ones",{"":function(){return"Array"===t.matrix?a([]):a([],"default")},"...number | BigNumber | string":function(e){if("string"==typeof e[e.length-1]){var n=e.pop();return a(e,n)}return"Array"===t.matrix?a(e):a(e,"default")},Array:a,Matrix:function(e){var n=e.storage();return a(e.valueOf(),n)},"Array | Matrix, string":function(e,n){return a(e.valueOf(),n)}});function a(e,n){var t=function(e){var n=!1;return e.forEach((function(e,t,r){s(e)&&(n=!0,r[t]=e.toNumber())})),n}(e)?new i(1):1;if(function(e){e.forEach((function(e){if("number"!=typeof e||!oe(e)||e<0)throw new Error("Parameters in function ones must be positive integers")}))}(e),n){var a=r(n);return e.length>0?a.resize(e,t):a}var o=[];return e.length>0?je(o,e,t):o}})),No=en("reshape",["typed","isInteger","matrix"],(function(e){var n=e.typed,t=e.isInteger,r=e.matrix;return n("reshape",{"Matrix, Array":function(e,n){return e.reshape?e.reshape(n):r(Ue(e.valueOf(),n))},"Array, Array":function(e,n){return n.forEach((function(e){if(!t(e))throw new TypeError("Invalid size for dimension: "+e)})),Ue(e,n)}})}));function So(){throw new Error('No "bignumber" implementation available')}function Mo(){throw new Error('No "fraction" implementation available')}function Do(){throw new Error('No "matrix" implementation available')}var Eo=en("size",["typed","config","?matrix"],(function(e){var n=e.typed,t=e.config,r=e.matrix;return n("size",{Matrix:function(e){return e.create(e.size())},Array:Pe,string:function(e){return"Array"===t.matrix?[e.length]:r([e.length])},"number | Complex | BigNumber | Unit | boolean | null":function(e){return"Array"===t.matrix?[]:r?r([]):Do()}})}));function Ao(e){return(Ao="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _o(e,n){if(Io(e)&&Co(e,n))return e[n];if("function"==typeof e[n]&&To(e,n))throw new Error('Cannot access method "'+n+'" as a property');throw new Error('No access to property "'+n+'"')}function Oo(e,n,t){if(Io(e)&&Co(e,n))return e[n]=t,t;throw new Error('No access to property "'+n+'"')}function Co(e,n){return!(!e||"object"!==Ao(e))&&(!!Q(ko,n)||!(n in Object.prototype)&&!(n in Function.prototype))}function To(e,n){return null!=e&&"function"==typeof e[n]&&(!(Q(e,n)&&Object.getPrototypeOf&&n in Object.getPrototypeOf(e))&&(!!Q(Bo,n)||!(n in Object.prototype)&&!(n in Function.prototype)))}function Io(e){return"object"===Ao(e)&&e&&e.constructor===Object}var ko={length:!0,name:!0},Bo={toString:!0,valueOf:!0,toLocaleString:!0},qo=en("subset",["typed","matrix"],(function(e){var n=e.typed,t=e.matrix;return n("subset",{"Array, Index":function(e,n){var r=t(e).subset(n);return n.isScalar()?r:r.valueOf()},"Matrix, Index":function(e,n){return e.subset(n)},"Object, Index":zo,"string, Index":Ro,"Array, Index, any":function(e,n,r){return t(V(e)).subset(n,r,void 0).valueOf()},"Array, Index, any, any":function(e,n,r,i){return t(V(e)).subset(n,r,i).valueOf()},"Matrix, Index, any":function(e,n,t){return e.clone().subset(n,t)},"Matrix, Index, any, any":function(e,n,t,r){return e.clone().subset(n,t,r)},"string, Index, string":Po,"string, Index, string, string":Po,"Object, Index, any":Fo})}));function Ro(e,n){if(!v(n))throw new TypeError("Index expected");if(1!==n.size().length)throw new qe(n.size().length,1);var t=e.length;Fe(n.min()[0],t),Fe(n.max()[0],t);var r=n.dimension(0),i="";return r.forEach((function(n){i+=e.charAt(n)})),i}function Po(e,n,t,r){if(!n||!0!==n.isIndex)throw new TypeError("Index expected");if(1!==n.size().length)throw new qe(n.size().length,1);if(void 0!==r){if("string"!=typeof r||1!==r.length)throw new TypeError("Single character expected as defaultValue")}else r=" ";var i=n.dimension(0);if(i.size()[0]!==t.length)throw new qe(i.size()[0],t.length);var a=e.length;Fe(n.min()[0]),Fe(n.max()[0]);for(var o=[],s=0;s<a;s++)o[s]=e.charAt(s);if(i.forEach((function(e,n){o[e]=t.charAt(n[0])})),o.length>a)for(var u=a-1,c=o.length;u<c;u++)o[u]||(o[u]=r);return o.join("")}function zo(e,n){if(1!==n.size().length)throw new qe(n.size(),1);var t=n.dimension(0);if("string"!=typeof t)throw new TypeError("String expected as index to retrieve an object property");return _o(e,t)}function Fo(e,n,t){if(1!==n.size().length)throw new qe(n.size(),1);var r=n.dimension(0);if("string"!=typeof r)throw new TypeError("String expected as index to retrieve an object property");var i=V(e);return Oo(i,r,t),i}var jo=en("zeros",["typed","config","matrix","BigNumber"],(function(e){var n=e.typed,t=e.config,r=e.matrix,i=e.BigNumber;return n("zeros",{"":function(){return"Array"===t.matrix?a([]):a([],"default")},"...number | BigNumber | string":function(e){if("string"==typeof e[e.length-1]){var n=e.pop();return a(e,n)}return"Array"===t.matrix?a(e):a(e,"default")},Array:a,Matrix:function(e){var n=e.storage();return a(e.valueOf(),n)},"Array | Matrix, string":function(e,n){return a(e.valueOf(),n)}});function a(e,n){var t=function(e){var n=!1;return e.forEach((function(e,t,r){s(e)&&(n=!0,r[t]=e.toNumber())})),n}(e)?new i(0):0;if(function(e){e.forEach((function(e){if("number"!=typeof e||!oe(e)||e<0)throw new Error("Parameters in function zeros must be positive integers")}))}(e),n){var a=r(n);return e.length>0?a.resize(e,t):a}var o=[];return e.length>0?je(o,e,t):o}})),Uo=en("to",["typed","matrix"],(function(e){var n=e.typed,t=e.matrix,r=eo({typed:n}),i=no({typed:n}),a=n("to",{"Unit, Unit | string":function(e,n){return e.to(n)},"Matrix, Matrix":function(e,n){return r(e,n,a)},"Array, Array":function(e,n){return a(t(e),t(n)).valueOf()},"Array, Matrix":function(e,n){return a(t(e),n)},"Matrix, Array":function(e,n){return a(e,t(n))},"Matrix, any":function(e,n){return i(e,n,a,!1)},"any, Matrix":function(e,n){return i(n,e,a,!0)},"Array, any":function(e,n){return i(t(e),n,a,!1).valueOf()},"any, Array":function(e,n){return i(t(n),e,a,!0).valueOf()}});return a}));function Lo(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function Ho(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Lo(Object(t),!0).forEach((function(n){Go(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Lo(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function Go(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var $o="Number of decimals in function round must be an integer",Vo=en("round",["typed","matrix","equalScalar","zeros","BigNumber","DenseMatrix"],(function(e){var n=e.typed,t=e.matrix,r=e.equalScalar,i=e.zeros,a=e.BigNumber,o=e.DenseMatrix,s=oo({typed:n,equalScalar:r}),u=so({typed:n,DenseMatrix:o}),c=no({typed:n}),f=n("round",Ho(Ho({},Wo),{},{Complex:function(e){return e.round()},"Complex, number":function(e,n){if(n%1)throw new TypeError($o);return e.round(n)},"Complex, BigNumber":function(e,n){if(!n.isInteger())throw new TypeError($o);var t=n.toNumber();return e.round(t)},"number, BigNumber":function(e,n){if(!n.isInteger())throw new TypeError($o);return new a(e).toDecimalPlaces(n.toNumber())},BigNumber:function(e){return e.toDecimalPlaces(0)},"BigNumber, BigNumber":function(e,n){if(!n.isInteger())throw new TypeError($o);return e.toDecimalPlaces(n.toNumber())},Fraction:function(e){return e.round()},"Fraction, number":function(e,n){if(n%1)throw new TypeError($o);return e.round(n)},"Array | Matrix":function(e){return rr(e,f,!0)},"SparseMatrix, number | BigNumber":function(e,n){return s(e,n,f,!1)},"DenseMatrix, number | BigNumber":function(e,n){return c(e,n,f,!1)},"number | Complex | BigNumber, SparseMatrix":function(e,n){return r(e,0)?i(n.size(),n.storage()):u(n,e,f,!0)},"number | Complex | BigNumber, DenseMatrix":function(e,n){return r(e,0)?i(n.size(),n.storage()):c(n,e,f,!0)},"Array, number | BigNumber":function(e,n){return c(t(e),n,f,!1).valueOf()},"number | Complex | BigNumber, Array":function(e,n){return c(t(n),e,f,!0).valueOf()}}));return f})),Wo={number:Hr,"number, number":function(e,n){if(!oe(n))throw new TypeError($o);if(n<0||n>15)throw new Error("Number of decimals in function round must be in te range of 0-15");return Hr(e,n)}},Zo=en("algorithm08",["typed","equalScalar"],(function(e){var n=e.typed,t=e.equalScalar;return function(e,r,i){var a=e._values,o=e._index,s=e._ptr,u=e._size,c=e._datatype,f=r._values,l=r._index,p=r._ptr,d=r._size,m=r._datatype;if(u.length!==d.length)throw new qe(u.length,d.length);if(u[0]!==d[0]||u[1]!==d[1])throw new RangeError("Dimension mismatch. Matrix A ("+u+") must match Matrix B ("+d+")");if(!a||!f)throw new Error("Cannot perform operation on Pattern Sparse Matrices");var h,y=u[0],g=u[1],v=t,x=0,b=i;"string"==typeof c&&c===m&&(h=c,v=n.find(t,[h,h]),x=n.convert(0,h),b=n.find(i,[h,h]));for(var w,N,S,M,D=[],E=[],A=[],_=[],O=[],C=0;C<g;C++){A[C]=E.length;var T=C+1;for(N=s[C],S=s[C+1],w=N;w<S;w++)O[M=o[w]]=T,_[M]=a[w],E.push(M);for(N=p[C],S=p[C+1],w=N;w<S;w++)O[M=l[w]]===T&&(_[M]=b(_[M],f[w]));for(w=A[C];w<E.length;){var I=_[M=E[w]];v(I,x)?E.splice(w,1):(D.push(I),w++)}}return A[g]=E.length,e.createSparseMatrix({values:D,index:E,ptr:A,size:[y,g],datatype:h})}})),Jo=en("leftShift",["typed","matrix","equalScalar","zeros","DenseMatrix"],(function(e){var n=e.typed,t=e.matrix,r=e.equalScalar,i=e.zeros,a=e.DenseMatrix,o=Xa({typed:n}),s=ro({typed:n,equalScalar:r}),u=Zo({typed:n,equalScalar:r}),c=Ka({typed:n,DenseMatrix:a}),f=oo({typed:n,equalScalar:r}),l=eo({typed:n}),p=no({typed:n}),d=n("leftShift",{"number, number":pi,"BigNumber, BigNumber":ai,"SparseMatrix, SparseMatrix":function(e,n){return u(e,n,d,!1)},"SparseMatrix, DenseMatrix":function(e,n){return s(n,e,d,!0)},"DenseMatrix, SparseMatrix":function(e,n){return o(e,n,d,!1)},"DenseMatrix, DenseMatrix":function(e,n){return l(e,n,d)},"Array, Array":function(e,n){return d(t(e),t(n)).valueOf()},"Array, Matrix":function(e,n){return d(t(e),n)},"Matrix, Array":function(e,n){return d(e,t(n))},"SparseMatrix, number | BigNumber":function(e,n){return r(n,0)?e.clone():f(e,n,d,!1)},"DenseMatrix, number | BigNumber":function(e,n){return r(n,0)?e.clone():p(e,n,d,!1)},"number | BigNumber, SparseMatrix":function(e,n){return r(e,0)?i(n.size(),n.storage()):c(n,e,d,!0)},"number | BigNumber, DenseMatrix":function(e,n){return r(e,0)?i(n.size(),n.storage()):p(n,e,d,!0)},"Array, number | BigNumber":function(e,n){return d(t(e),n).valueOf()},"number | BigNumber, Array":function(e,n){return d(e,t(n)).valueOf()}});return d})),Yo=en("rightLogShift",["typed","matrix","equalScalar","zeros","DenseMatrix"],(function(e){var n=e.typed,t=e.matrix,r=e.equalScalar,i=e.zeros,a=e.DenseMatrix,o=Xa({typed:n}),s=ro({typed:n,equalScalar:r}),u=Zo({typed:n,equalScalar:r}),c=Ka({typed:n,DenseMatrix:a}),f=oo({typed:n,equalScalar:r}),l=eo({typed:n}),p=no({typed:n}),d=n("rightLogShift",{"number, number":mi,"SparseMatrix, SparseMatrix":function(e,n){return u(e,n,d,!1)},"SparseMatrix, DenseMatrix":function(e,n){return s(n,e,d,!0)},"DenseMatrix, SparseMatrix":function(e,n){return o(e,n,d,!1)},"DenseMatrix, DenseMatrix":function(e,n){return l(e,n,d)},"Array, Array":function(e,n){return d(t(e),t(n)).valueOf()},"Array, Matrix":function(e,n){return d(t(e),n)},"Matrix, Array":function(e,n){return d(e,t(n))},"SparseMatrix, number | BigNumber":function(e,n){return r(n,0)?e.clone():f(e,n,d,!1)},"DenseMatrix, number | BigNumber":function(e,n){return r(n,0)?e.clone():p(e,n,d,!1)},"number | BigNumber, SparseMatrix":function(e,n){return r(e,0)?i(n.size(),n.storage()):c(n,e,d,!0)},"number | BigNumber, DenseMatrix":function(e,n){return r(e,0)?i(n.size(),n.storage()):p(n,e,d,!0)},"Array, number | BigNumber":function(e,n){return d(t(e),n).valueOf()},"number | BigNumber, Array":function(e,n){return d(e,t(n)).valueOf()}});return d})),Xo=en("compare",["typed","config","matrix","equalScalar","BigNumber","Fraction","DenseMatrix"],(function(e){var n=e.typed,t=e.config,r=e.equalScalar,i=e.matrix,a=e.BigNumber,o=e.Fraction,s=e.DenseMatrix,u=io({typed:n}),c=ao({typed:n,equalScalar:r}),f=so({typed:n,DenseMatrix:s}),l=eo({typed:n}),p=no({typed:n}),d=n("compare",{"boolean, boolean":function(e,n){return e===n?0:e>n?1:-1},"number, number":function(e,n){return be(e,n,t.epsilon)?0:e>n?1:-1},"BigNumber, BigNumber":function(e,n){return hr(e,n,t.epsilon)?new a(0):new a(e.cmp(n))},"Fraction, Fraction":function(e,n){return new o(e.compare(n))},"Complex, Complex":function(){throw new TypeError("No ordering relation is defined for complex numbers")},"Unit, Unit":function(e,n){if(!e.equalBase(n))throw new Error("Cannot compare units with different base");return d(e.value,n.value)},"SparseMatrix, SparseMatrix":function(e,n){return c(e,n,d)},"SparseMatrix, DenseMatrix":function(e,n){return u(n,e,d,!0)},"DenseMatrix, SparseMatrix":function(e,n){return u(e,n,d,!1)},"DenseMatrix, DenseMatrix":function(e,n){return l(e,n,d)},"Array, Array":function(e,n){return d(i(e),i(n)).valueOf()},"Array, Matrix":function(e,n){return d(i(e),n)},"Matrix, Array":function(e,n){return d(e,i(n))},"SparseMatrix, any":function(e,n){return f(e,n,d,!1)},"DenseMatrix, any":function(e,n){return p(e,n,d,!1)},"any, SparseMatrix":function(e,n){return f(n,e,d,!0)},"any, DenseMatrix":function(e,n){return p(n,e,d,!0)},"Array, any":function(e,n){return p(i(e),n,d,!1).valueOf()},"any, Array":function(e,n){return p(i(n),e,d,!0).valueOf()}});return d})),Qo=en("compareText",["typed","matrix"],(function(e){var n=e.typed,t=e.matrix,r=eo({typed:n}),i=no({typed:n}),a=n("compareText",{"any, any":Be,"DenseMatrix, DenseMatrix":function(e,n){return r(e,n,Be)},"Array, Array":function(e,n){return a(t(e),t(n)).valueOf()},"Array, Matrix":function(e,n){return a(t(e),n)},"Matrix, Array":function(e,n){return a(e,t(n))},"DenseMatrix, any":function(e,n){return i(e,n,Be,!1)},"any, DenseMatrix":function(e,n){return i(n,e,Be,!0)},"Array, any":function(e,n){return i(t(e),n,Be,!1).valueOf()},"any, Array":function(e,n){return i(t(n),e,Be,!0).valueOf()}});return a})),Ko=en("smaller",["typed","config","matrix","DenseMatrix"],(function(e){var n=e.typed,t=e.config,r=e.matrix,i=e.DenseMatrix,a=io({typed:n}),o=mo({typed:n,DenseMatrix:i}),s=so({typed:n,DenseMatrix:i}),u=eo({typed:n}),c=no({typed:n}),f=n("smaller",{"boolean, boolean":function(e,n){return e<n},"number, number":function(e,n){return e<n&&!be(e,n,t.epsilon)},"BigNumber, BigNumber":function(e,n){return e.lt(n)&&!hr(e,n,t.epsilon)},"Fraction, Fraction":function(e,n){return-1===e.compare(n)},"Complex, Complex":function(e,n){throw new TypeError("No ordering relation is defined for complex numbers")},"Unit, Unit":function(e,n){if(!e.equalBase(n))throw new Error("Cannot compare units with different base");return f(e.value,n.value)},"SparseMatrix, SparseMatrix":function(e,n){return o(e,n,f)},"SparseMatrix, DenseMatrix":function(e,n){return a(n,e,f,!0)},"DenseMatrix, SparseMatrix":function(e,n){return a(e,n,f,!1)},"DenseMatrix, DenseMatrix":function(e,n){return u(e,n,f)},"Array, Array":function(e,n){return f(r(e),r(n)).valueOf()},"Array, Matrix":function(e,n){return f(r(e),n)},"Matrix, Array":function(e,n){return f(e,r(n))},"SparseMatrix, any":function(e,n){return s(e,n,f,!1)},"DenseMatrix, any":function(e,n){return c(e,n,f,!1)},"any, SparseMatrix":function(e,n){return s(n,e,f,!0)},"any, DenseMatrix":function(e,n){return c(n,e,f,!0)},"Array, any":function(e,n){return c(r(e),n,f,!1).valueOf()},"any, Array":function(e,n){return c(r(n),e,f,!0).valueOf()}});return f})),es=en("larger",["typed","config","matrix","DenseMatrix"],(function(e){var n=e.typed,t=e.config,r=e.matrix,i=e.DenseMatrix,a=io({typed:n}),o=mo({typed:n,DenseMatrix:i}),s=so({typed:n,DenseMatrix:i}),u=eo({typed:n}),c=no({typed:n}),f=n("larger",{"boolean, boolean":function(e,n){return e>n},"number, number":function(e,n){return e>n&&!be(e,n,t.epsilon)},"BigNumber, BigNumber":function(e,n){return e.gt(n)&&!hr(e,n,t.epsilon)},"Fraction, Fraction":function(e,n){return 1===e.compare(n)},"Complex, Complex":function(){throw new TypeError("No ordering relation is defined for complex numbers")},"Unit, Unit":function(e,n){if(!e.equalBase(n))throw new Error("Cannot compare units with different base");return f(e.value,n.value)},"SparseMatrix, SparseMatrix":function(e,n){return o(e,n,f)},"SparseMatrix, DenseMatrix":function(e,n){return a(n,e,f,!0)},"DenseMatrix, SparseMatrix":function(e,n){return a(e,n,f,!1)},"DenseMatrix, DenseMatrix":function(e,n){return u(e,n,f)},"Array, Array":function(e,n){return f(r(e),r(n)).valueOf()},"Array, Matrix":function(e,n){return f(r(e),n)},"Matrix, Array":function(e,n){return f(e,r(n))},"SparseMatrix, any":function(e,n){return s(e,n,f,!1)},"DenseMatrix, any":function(e,n){return c(e,n,f,!1)},"any, SparseMatrix":function(e,n){return s(n,e,f,!0)},"any, DenseMatrix":function(e,n){return c(n,e,f,!0)},"Array, any":function(e,n){return c(r(e),n,f,!1).valueOf()},"any, Array":function(e,n){return c(r(n),e,f,!0).valueOf()}});return f})),ns=en("unequal",["typed","config","equalScalar","matrix","DenseMatrix"],(function(e){var n=e.typed,t=(e.config,e.equalScalar),r=e.matrix,i=e.DenseMatrix,a=io({typed:n}),o=mo({typed:n,DenseMatrix:i}),s=so({typed:n,DenseMatrix:i}),u=eo({typed:n}),c=no({typed:n}),f=n("unequal",{"any, any":function(e,n){return null===e?null!==n:null===n?null!==e:void 0===e?void 0!==n:void 0===n?void 0!==e:l(e,n)},"SparseMatrix, SparseMatrix":function(e,n){return o(e,n,l)},"SparseMatrix, DenseMatrix":function(e,n){return a(n,e,l,!0)},"DenseMatrix, SparseMatrix":function(e,n){return a(e,n,l,!1)},"DenseMatrix, DenseMatrix":function(e,n){return u(e,n,l)},"Array, Array":function(e,n){return f(r(e),r(n)).valueOf()},"Array, Matrix":function(e,n){return f(r(e),n)},"Matrix, Array":function(e,n){return f(e,r(n))},"SparseMatrix, any":function(e,n){return s(e,n,l,!1)},"DenseMatrix, any":function(e,n){return c(e,n,l,!1)},"any, SparseMatrix":function(e,n){return s(n,e,l,!0)},"any, DenseMatrix":function(e,n){return c(n,e,l,!0)},"Array, any":function(e,n){return c(r(e),n,l,!1).valueOf()},"any, Array":function(e,n){return c(r(n),e,l,!0).valueOf()}});function l(e,n){return!t(e,n)}return f})),ts=(en("unequal",["typed","equalScalar"],(function(e){var n=e.typed,t=e.equalScalar;return n("unequal",{"any, any":function(e,n){return null===e?null!==n:null===n?null!==e:void 0===e?void 0!==n:void 0===n?void 0!==e:!t(e,n)}})})),en("ImmutableDenseMatrix",["smaller","DenseMatrix"],(function(e){var n=e.smaller,t=e.DenseMatrix;function r(e,n){if(!(this instanceof r))throw new SyntaxError("Constructor must be called with the new operator");if(n&&!l(n))throw new Error("Invalid datatype: "+n);if(d(e)||p(e)){var i=new t(e,n);this._data=i._data,this._size=i._size,this._datatype=i._datatype,this._min=null,this._max=null}else if(e&&p(e.data)&&p(e.size))this._data=e.data,this._size=e.size,this._datatype=e.datatype,this._min=void 0!==e.min?e.min:null,this._max=void 0!==e.max?e.max:null;else{if(e)throw new TypeError("Unsupported type of data ("+G(e)+")");this._data=[],this._size=[0],this._datatype=n,this._min=null,this._max=null}}return r.prototype=new t,r.prototype.type="ImmutableDenseMatrix",r.prototype.isImmutableDenseMatrix=!0,r.prototype.subset=function(e){switch(arguments.length){case 1:var n=t.prototype.subset.call(this,e);return d(n)?new r({data:n._data,size:n._size,datatype:n._datatype}):n;case 2:case 3:throw new Error("Cannot invoke set subset on an Immutable Matrix instance");default:throw new SyntaxError("Wrong number of arguments")}},r.prototype.set=function(){throw new Error("Cannot invoke set on an Immutable Matrix instance")},r.prototype.resize=function(){throw new Error("Cannot invoke resize on an Immutable Matrix instance")},r.prototype.reshape=function(){throw new Error("Cannot invoke reshape on an Immutable Matrix instance")},r.prototype.clone=function(){return new r({data:V(this._data),size:V(this._size),datatype:this._datatype})},r.prototype.toJSON=function(){return{mathjs:"ImmutableDenseMatrix",data:this._data,size:this._size,datatype:this._datatype}},r.fromJSON=function(e){return new r(e)},r.prototype.swapRows=function(){throw new Error("Cannot invoke swapRows on an Immutable Matrix instance")},r.prototype.min=function(){if(null===this._min){var e=null;this.forEach((function(t){(null===e||n(t,e))&&(e=t)})),this._min=null!==e?e:void 0}return this._min},r.prototype.max=function(){if(null===this._max){var e=null;this.forEach((function(t){(null===e||n(e,t))&&(e=t)})),this._max=null!==e?e:void 0}return this._max},r}),{isClass:!0})),rs=en("FibonacciHeap",["smaller","larger"],(function(e){var n=e.smaller,t=e.larger,r=1/Math.log((1+Math.sqrt(5))/2);function i(){if(!(this instanceof i))throw new SyntaxError("Constructor must be called with the new operator");this._minimum=null,this._size=0}function a(e,n,t){n.left.right=n.right,n.right.left=n.left,t.degree--,t.child===n&&(t.child=n.right),0===t.degree&&(t.child=null),n.left=e,n.right=e.right,e.right=n,n.right.left=n,n.parent=null,n.mark=!1}i.prototype.type="FibonacciHeap",i.prototype.isFibonacciHeap=!0,i.prototype.insert=function(e,t){var r={key:e,value:t,degree:0};if(this._minimum){var i=this._minimum;r.left=i,r.right=i.right,i.right=r,r.right.left=r,n(e,i.key)&&(this._minimum=r)}else r.left=r,r.right=r,this._minimum=r;return this._size++,r},i.prototype.size=function(){return this._size},i.prototype.clear=function(){this._minimum=null,this._size=0},i.prototype.isEmpty=function(){return 0===this._size},i.prototype.extractMinimum=function(){var e=this._minimum;if(null===e)return e;for(var i=this._minimum,a=e.degree,s=e.child;a>0;){var u=s.right;s.left.right=s.right,s.right.left=s.left,s.left=i,s.right=i.right,i.right=s,s.right.left=s,s.parent=null,s=u,a--}return e.left.right=e.right,e.right.left=e.left,i=e===e.right?null:function(e,i){var a,s=Math.floor(Math.log(i)*r)+1,u=new Array(s),c=0,f=e;if(f)for(c++,f=f.right;f!==e;)c++,f=f.right;for(;c>0;){for(var l=f.degree,p=f.right;a=u[l];){if(t(f.key,a.key)){var d=a;a=f,f=d}o(a,f),u[l]=null,l++}u[l]=f,f=p,c--}e=null;for(var m=0;m<s;m++)(a=u[m])&&(e?(a.left.right=a.right,a.right.left=a.left,a.left=e,a.right=e.right,e.right=a,a.right.left=a,n(a.key,e.key)&&(e=a)):e=a);return e}(i=e.right,this._size),this._size--,this._minimum=i,e},i.prototype.remove=function(e){this._minimum=function(e,t,r){t.key=r;var i=t.parent;i&&n(t.key,i.key)&&(a(e,t,i),function e(n,t){var r=t.parent;if(!r)return;t.mark?(a(n,t,r),e(r)):t.mark=!0}(e,i));n(t.key,e.key)&&(e=t);return e}(this._minimum,e,-1),this.extractMinimum()};var o=function(e,n){e.left.right=e.right,e.right.left=e.left,e.parent=n,n.child?(e.left=n.child,e.right=n.child.right,n.child.right=e,e.right.left=e):(n.child=e,e.right=e,e.left=e),n.degree++,e.mark=!1};return i}),{isClass:!0}),is=en("sparse",["typed","SparseMatrix"],(function(e){var n=e.typed,t=e.SparseMatrix;return n("sparse",{"":function(){return new t([])},string:function(e){return new t([],e)},"Array | Matrix":function(e){return new t(e)},"Array | Matrix, string":function(e,n){return new t(e,n)}})})),as=en("acoth",["typed","config","Complex","BigNumber"],(function(e){var n=e.typed,t=e.config,r=e.Complex,i=e.BigNumber,a=n("acoth",{number:function(e){return e>=1||e<=-1||t.predictable?ji(e):new r(e,0).acoth()},Complex:function(e){return e.acoth()},BigNumber:function(e){return new i(1).div(e).atanh()},"Array | Matrix":function(e){return rr(e,a)}});return a})),os=en("algorithm09",["typed","equalScalar"],(function(e){var n=e.typed,t=e.equalScalar;return function(e,r,i){var a=e._values,o=e._index,s=e._ptr,u=e._size,c=e._datatype,f=r._values,l=r._index,p=r._ptr,d=r._size,m=r._datatype;if(u.length!==d.length)throw new qe(u.length,d.length);if(u[0]!==d[0]||u[1]!==d[1])throw new RangeError("Dimension mismatch. Matrix A ("+u+") must match Matrix B ("+d+")");var h,y=u[0],g=u[1],v=t,x=0,b=i;"string"==typeof c&&c===m&&(h=c,v=n.find(t,[h,h]),x=n.convert(0,h),b=n.find(i,[h,h]));var w,N,S,M,D,E=a&&f?[]:void 0,A=[],_=[],O=E?[]:void 0,C=[];for(N=0;N<g;N++){_[N]=A.length;var T=N+1;if(O)for(M=p[N],D=p[N+1],S=M;S<D;S++)C[w=l[S]]=T,O[w]=f[S];for(M=s[N],D=s[N+1],S=M;S<D;S++)if(w=o[S],O){var I=C[w]===T?O[w]:x,k=b(a[S],I);v(k,x)||(A.push(w),E.push(k))}else A.push(w)}return _[g]=A.length,e.createSparseMatrix({values:E,index:A,ptr:_,size:[y,g],datatype:h})}})),ss=en("atan2",["typed","matrix","equalScalar","BigNumber","DenseMatrix"],(function(e){var n=e.typed,t=e.matrix,r=e.equalScalar,i=e.BigNumber,a=e.DenseMatrix,o=ro({typed:n,equalScalar:r}),s=io({typed:n}),u=os({typed:n,equalScalar:r}),c=oo({typed:n,equalScalar:r}),f=so({typed:n,DenseMatrix:a}),l=eo({typed:n}),p=no({typed:n}),d=n("atan2",{"number, number":Math.atan2,"BigNumber, BigNumber":function(e,n){return i.atan2(e,n)},"SparseMatrix, SparseMatrix":function(e,n){return u(e,n,d,!1)},"SparseMatrix, DenseMatrix":function(e,n){return o(n,e,d,!0)},"DenseMatrix, SparseMatrix":function(e,n){return s(e,n,d,!1)},"DenseMatrix, DenseMatrix":function(e,n){return l(e,n,d)},"Array, Array":function(e,n){return d(t(e),t(n)).valueOf()},"Array, Matrix":function(e,n){return d(t(e),n)},"Matrix, Array":function(e,n){return d(e,t(n))},"SparseMatrix, number | BigNumber":function(e,n){return c(e,n,d,!1)},"DenseMatrix, number | BigNumber":function(e,n){return p(e,n,d,!1)},"number | BigNumber, SparseMatrix":function(e,n){return f(n,e,d,!0)},"number | BigNumber, DenseMatrix":function(e,n){return p(n,e,d,!0)},"Array, number | BigNumber":function(e,n){return p(t(e),n,d,!1).valueOf()},"number | BigNumber, Array":function(e,n){return p(t(n),e,d,!0).valueOf()}});return d})),us=en("sec",["typed","BigNumber"],(function(e){var n=e.typed,t=e.BigNumber,r=n("sec",{number:Xi,Complex:function(e){return e.sec()},BigNumber:function(e){return new t(1).div(e.cos())},Unit:function(e){if(!e.hasBase(e.constructor.BASE_UNITS.ANGLE))throw new TypeError("Unit in function sec is no angle");return r(e.value)},"Array | Matrix":function(e){return rr(e,r)}});return r})),cs=en("add",["typed","matrix","addScalar","equalScalar","DenseMatrix","SparseMatrix"],(function(e){var n=e.typed,t=e.matrix,r=e.addScalar,i=e.equalScalar,a=e.DenseMatrix,o=(e.SparseMatrix,Xa({typed:n})),s=Qa({typed:n,equalScalar:i}),u=Ka({typed:n,DenseMatrix:a}),c=eo({typed:n}),f=no({typed:n}),l=n("add",Z({"DenseMatrix, DenseMatrix":function(e,n){return c(e,n,r)},"DenseMatrix, SparseMatrix":function(e,n){return o(e,n,r,!1)},"SparseMatrix, DenseMatrix":function(e,n){return o(n,e,r,!0)},"SparseMatrix, SparseMatrix":function(e,n){return s(e,n,r)},"Array, Array":function(e,n){return l(t(e),t(n)).valueOf()},"Array, Matrix":function(e,n){return l(t(e),n)},"Matrix, Array":function(e,n){return l(e,t(n))},"DenseMatrix, any":function(e,n){return f(e,n,r,!1)},"SparseMatrix, any":function(e,n){return u(e,n,r,!1)},"any, DenseMatrix":function(e,n){return f(n,e,r,!0)},"any, SparseMatrix":function(e,n){return u(n,e,r,!0)},"Array, any":function(e,n){return f(t(e),n,r,!1).valueOf()},"any, Array":function(e,n){return f(t(n),e,r,!0).valueOf()},"any, any":r,"any, any, ...any":function(e,n,t){for(var r=l(e,n),i=0;i<t.length;i++)r=l(r,t[i]);return r}},r.signatures));return l})),fs=en("dot",["typed","addScalar","multiplyScalar","conj","size"],(function(e){var n=e.typed,t=e.addScalar,r=e.multiplyScalar,i=e.conj,a=e.size;return n("dot",{"Array | DenseMatrix, Array | DenseMatrix":function(e,a){var u=o(e,a),c=d(e)?e._data:e,f=d(e)?e._datatype:void 0,l=d(a)?a._data:a,p=d(a)?a._datatype:void 0,m=2===s(e).length,h=2===s(a).length,y=t,g=r;if(f&&p&&f===p&&"string"==typeof f){var v=f;y=n.find(t,[v,v]),g=n.find(r,[v,v])}if(!m&&!h){for(var x=g(i(c[0]),l[0]),b=1;b<u;b++)x=y(x,g(i(c[b]),l[b]));return x}if(!m&&h){for(var w=g(i(c[0]),l[0][0]),N=1;N<u;N++)w=y(w,g(i(c[N]),l[N][0]));return w}if(m&&!h){for(var S=g(i(c[0][0]),l[0]),M=1;M<u;M++)S=y(S,g(i(c[M][0]),l[M]));return S}if(m&&h){for(var D=g(i(c[0][0]),l[0][0]),E=1;E<u;E++)D=y(D,g(i(c[E][0]),l[E][0]));return D}},"SparseMatrix, SparseMatrix":function(e,n){o(e,n);var i=e._index,a=e._values,s=n._index,u=n._values,c=0,f=t,l=r,p=0,d=0;for(;p<i.length&&d<s.length;){var m=i[p],h=s[d];m<h?p++:m>h?d++:m===h&&(c=f(c,l(a[p],u[d])),p++,d++)}return c}});function o(e,n){var t,r,i=s(e),a=s(n);if(1===i.length)t=i[0];else{if(2!==i.length||1!==i[1])throw new RangeError("Expected a column vector, instead got a matrix of size ("+i.join(", ")+")");t=i[0]}if(1===a.length)r=a[0];else{if(2!==a.length||1!==a[1])throw new RangeError("Expected a column vector, instead got a matrix of size ("+a.join(", ")+")");r=a[0]}if(t!==r)throw new RangeError("Vectors must have equal length ("+t+" != "+r+")");if(0===t)throw new RangeError("Cannot calculate the dot product of empty vectors");return t}function s(e){return d(e)?e.size():a(e)}})),ls=en("composition",["typed","addScalar","combinations","isNegative","isPositive","isInteger","larger"],(function(e){var n=e.typed,t=e.addScalar,r=e.combinations,i=e.isPositive,a=(e.isNegative,e.isInteger),o=e.larger;return n("composition",{"number | BigNumber, number | BigNumber":function(e,n){if(!(a(e)&&i(e)&&a(n)&&i(n)))throw new TypeError("Positive integer value expected in function composition");if(o(n,e))throw new TypeError("k must be less than or equal to n in function composition");return r(t(e,-1),t(n,-1))}})})),ps=en("isZero",["typed"],(function(e){var n=(0,e.typed)("isZero",{number:lr,BigNumber:function(e){return e.isZero()},Complex:function(e){return 0===e.re&&0===e.im},Fraction:function(e){return 1===e.d&&0===e.n},Unit:function(e){return n(e.value)},"Array | Matrix":function(e){return rr(e,n)}});return n})),ds=en("abs",["typed"],(function(e){var n=(0,e.typed)("abs",{number:Nr,Complex:function(e){return e.abs()},BigNumber:function(e){return e.abs()},Fraction:function(e){return e.abs()},"Array | Matrix":function(e){return rr(e,n,!0)},Unit:function(e){return e.abs()}});return n})),ms=en("floor",["typed","config","round"],(function(e){var n=e.typed,t=e.config,r=e.round,i=n("floor",{number:function(e){return be(e,r(e),t.epsilon)?r(e):Math.floor(e)},Complex:function(e){return e.floor()},BigNumber:function(e){return hr(e,r(e),t.epsilon)?r(e):e.floor()},Fraction:function(e){return e.floor()},"Array | Matrix":function(e){return rr(e,i,!0)}});return i})),hs=en("multiply",["typed","matrix","addScalar","multiplyScalar","equalScalar","dot"],(function(e){var n=e.typed,t=e.matrix,r=e.addScalar,i=e.multiplyScalar,a=e.equalScalar,o=e.dot,s=oo({typed:n,equalScalar:a}),u=no({typed:n}),c=n("multiply",Z({"Array, Array":function(e,n){f(Pe(e),Pe(n));var r=c(t(e),t(n));return d(r)?r.valueOf():r},"Matrix, Matrix":function(e,t){var a=e.size(),s=t.size();return f(a,s),1===a.length?1===s.length?function(e,n,t){if(0===t)throw new Error("Cannot multiply two empty vectors");return o(e,n)}(e,t,a[0]):function(e,t){if("dense"!==t.storage())throw new Error("Support for SparseMatrix not implemented");return function(e,t){var a,o=e._data,s=e._size,u=e._datatype,c=t._data,f=t._size,l=t._datatype,p=s[0],d=f[1],m=r,h=i;u&&l&&u===l&&"string"==typeof u&&(a=u,m=n.find(r,[a,a]),h=n.find(i,[a,a]));for(var y=[],g=0;g<d;g++){for(var v=h(o[0],c[0][g]),x=1;x<p;x++)v=m(v,h(o[x],c[x][g]));y[g]=v}return e.createDenseMatrix({data:y,size:[d],datatype:a})}(e,t)}(e,t):1===s.length?l(e,t):p(e,t)},"Matrix, Array":function(e,n){return c(e,t(n))},"Array, Matrix":function(e,n){return c(t(e,n.storage()),n)},"SparseMatrix, any":function(e,n){return s(e,n,i,!1)},"DenseMatrix, any":function(e,n){return u(e,n,i,!1)},"any, SparseMatrix":function(e,n){return s(n,e,i,!0)},"any, DenseMatrix":function(e,n){return u(n,e,i,!0)},"Array, any":function(e,n){return u(t(e),n,i,!1).valueOf()},"any, Array":function(e,n){return u(t(n),e,i,!0).valueOf()},"any, any":i,"any, any, ...any":function(e,n,t){for(var r=c(e,n),i=0;i<t.length;i++)r=c(r,t[i]);return r}},i.signatures));function f(e,n){switch(e.length){case 1:switch(n.length){case 1:if(e[0]!==n[0])throw new RangeError("Dimension mismatch in multiplication. Vectors must have the same length");break;case 2:if(e[0]!==n[0])throw new RangeError("Dimension mismatch in multiplication. Vector length ("+e[0]+") must match Matrix rows ("+n[0]+")");break;default:throw new Error("Can only multiply a 1 or 2 dimensional matrix (Matrix B has "+n.length+" dimensions)")}break;case 2:switch(n.length){case 1:if(e[1]!==n[0])throw new RangeError("Dimension mismatch in multiplication. Matrix columns ("+e[1]+") must match Vector length ("+n[0]+")");break;case 2:if(e[1]!==n[0])throw new RangeError("Dimension mismatch in multiplication. Matrix A columns ("+e[1]+") must match Matrix B rows ("+n[0]+")");break;default:throw new Error("Can only multiply a 1 or 2 dimensional matrix (Matrix B has "+n.length+" dimensions)")}break;default:throw new Error("Can only multiply a 1 or 2 dimensional matrix (Matrix A has "+e.length+" dimensions)")}}var l=n("_multiplyMatrixVector",{"DenseMatrix, any":function(e,t){var a,o=e._data,s=e._size,u=e._datatype,c=t._data,f=t._datatype,l=s[0],p=s[1],d=r,m=i;u&&f&&u===f&&"string"==typeof u&&(a=u,d=n.find(r,[a,a]),m=n.find(i,[a,a]));for(var h=[],y=0;y<l;y++){for(var g=o[y],v=m(g[0],c[0]),x=1;x<p;x++)v=d(v,m(g[x],c[x]));h[y]=v}return e.createDenseMatrix({data:h,size:[l],datatype:a})},"SparseMatrix, any":function(e,t){var o=e._values,s=e._index,u=e._ptr,c=e._datatype;if(!o)throw new Error("Cannot multiply Pattern only Matrix times Dense Matrix");var f,l=t._data,p=t._datatype,d=e._size[0],m=t._size[0],h=[],y=[],g=[],v=r,x=i,b=a,w=0;c&&p&&c===p&&"string"==typeof c&&(f=c,v=n.find(r,[f,f]),x=n.find(i,[f,f]),b=n.find(a,[f,f]),w=n.convert(0,f));var N=[],S=[];g[0]=0;for(var M=0;M<m;M++){var D=l[M];if(!b(D,w))for(var E=u[M],A=u[M+1],_=E;_<A;_++){var O=s[_];S[O]?N[O]=v(N[O],x(D,o[_])):(S[O]=!0,y.push(O),N[O]=x(D,o[_]))}}for(var C=y.length,T=0;T<C;T++){var I=y[T];h[T]=N[I]}return g[1]=y.length,e.createSparseMatrix({values:h,index:y,ptr:g,size:[d,1],datatype:f})}}),p=n("_multiplyMatrixMatrix",{"DenseMatrix, DenseMatrix":function(e,t){var a,o=e._data,s=e._size,u=e._datatype,c=t._data,f=t._size,l=t._datatype,p=s[0],d=s[1],m=f[1],h=r,y=i;u&&l&&u===l&&"string"==typeof u&&(a=u,h=n.find(r,[a,a]),y=n.find(i,[a,a]));for(var g=[],v=0;v<p;v++){var x=o[v];g[v]=[];for(var b=0;b<m;b++){for(var w=y(x[0],c[0][b]),N=1;N<d;N++)w=h(w,y(x[N],c[N][b]));g[v][b]=w}}return e.createDenseMatrix({data:g,size:[p,m],datatype:a})},"DenseMatrix, SparseMatrix":function(e,t){var o=e._data,s=e._size,u=e._datatype,c=t._values,f=t._index,l=t._ptr,p=t._size,d=t._datatype;if(!c)throw new Error("Cannot multiply Dense Matrix times Pattern only Matrix");var m,h=s[0],y=p[1],g=r,v=i,x=a,b=0;u&&d&&u===d&&"string"==typeof u&&(m=u,g=n.find(r,[m,m]),v=n.find(i,[m,m]),x=n.find(a,[m,m]),b=n.convert(0,m));for(var w=[],N=[],S=[],M=t.createSparseMatrix({values:w,index:N,ptr:S,size:[h,y],datatype:m}),D=0;D<y;D++){S[D]=N.length;var E=l[D],A=l[D+1];if(A>E)for(var _=0,O=0;O<h;O++){for(var C=O+1,T=void 0,I=E;I<A;I++){var k=f[I];_!==C?(T=v(o[O][k],c[I]),_=C):T=g(T,v(o[O][k],c[I]))}_!==C||x(T,b)||(N.push(O),w.push(T))}}return S[y]=N.length,M},"SparseMatrix, DenseMatrix":function(e,t){var o=e._values,s=e._index,u=e._ptr,c=e._datatype;if(!o)throw new Error("Cannot multiply Pattern only Matrix times Dense Matrix");var f,l=t._data,p=t._datatype,d=e._size[0],m=t._size[0],h=t._size[1],y=r,g=i,v=a,x=0;c&&p&&c===p&&"string"==typeof c&&(f=c,y=n.find(r,[f,f]),g=n.find(i,[f,f]),v=n.find(a,[f,f]),x=n.convert(0,f));for(var b=[],w=[],N=[],S=e.createSparseMatrix({values:b,index:w,ptr:N,size:[d,h],datatype:f}),M=[],D=[],E=0;E<h;E++){N[E]=w.length;for(var A=E+1,_=0;_<m;_++){var O=l[_][E];if(!v(O,x))for(var C=u[_],T=u[_+1],I=C;I<T;I++){var k=s[I];D[k]!==A?(D[k]=A,w.push(k),M[k]=g(O,o[I])):M[k]=y(M[k],g(O,o[I]))}}for(var B=N[E],q=w.length,R=B;R<q;R++){var P=w[R];b[R]=M[P]}}return N[h]=w.length,S},"SparseMatrix, SparseMatrix":function(e,t){var a,o=e._values,s=e._index,u=e._ptr,c=e._datatype,f=t._values,l=t._index,p=t._ptr,d=t._datatype,m=e._size[0],h=t._size[1],y=o&&f,g=r,v=i;c&&d&&c===d&&"string"==typeof c&&(a=c,g=n.find(r,[a,a]),v=n.find(i,[a,a]));for(var x,b,w,N,S,M,D,E,A=y?[]:void 0,_=[],O=[],C=e.createSparseMatrix({values:A,index:_,ptr:O,size:[m,h],datatype:a}),T=y?[]:void 0,I=[],k=0;k<h;k++){O[k]=_.length;var B=k+1;for(S=p[k],M=p[k+1],N=S;N<M;N++)if(E=l[N],y)for(b=u[E],w=u[E+1],x=b;x<w;x++)D=s[x],I[D]!==B?(I[D]=B,_.push(D),T[D]=v(f[N],o[x])):T[D]=g(T[D],v(f[N],o[x]));else for(b=u[E],w=u[E+1],x=b;x<w;x++)D=s[x],I[D]!==B&&(I[D]=B,_.push(D));if(y)for(var q=O[k],R=_.length,P=q;P<R;P++){var z=_[P];A[P]=T[z]}}return O[h]=_.length,C}});return c})),ys=en("dotMultiply",["typed","matrix","equalScalar","multiplyScalar"],(function(e){var n=e.typed,t=e.matrix,r=e.equalScalar,i=e.multiplyScalar,a=ro({typed:n,equalScalar:r}),o=os({typed:n,equalScalar:r}),s=oo({typed:n,equalScalar:r}),u=eo({typed:n}),c=no({typed:n}),f=n("dotMultiply",{"any, any":i,"SparseMatrix, SparseMatrix":function(e,n){return o(e,n,i,!1)},"SparseMatrix, DenseMatrix":function(e,n){return a(n,e,i,!0)},"DenseMatrix, SparseMatrix":function(e,n){return a(e,n,i,!1)},"DenseMatrix, DenseMatrix":function(e,n){return u(e,n,i)},"Array, Array":function(e,n){return f(t(e),t(n)).valueOf()},"Array, Matrix":function(e,n){return f(t(e),n)},"Matrix, Array":function(e,n){return f(e,t(n))},"SparseMatrix, any":function(e,n){return s(e,n,i,!1)},"DenseMatrix, any":function(e,n){return c(e,n,i,!1)},"any, SparseMatrix":function(e,n){return s(n,e,i,!0)},"any, DenseMatrix":function(e,n){return c(n,e,i,!0)},"Array, any":function(e,n){return c(t(e),n,i,!1).valueOf()},"any, Array":function(e,n){return c(t(n),e,i,!0).valueOf()}});return f})),gs=en("re",["typed"],(function(e){var n=(0,e.typed)("re",{number:function(e){return e},BigNumber:function(e){return e},Complex:function(e){return e.re},"Array | Matrix":function(e){return rr(e,n)}});return n})),vs=en("flatten",["typed","matrix"],(function(e){var n=e.typed,t=e.matrix;return n("flatten",{Array:function(e){return Ge(V(e))},Matrix:function(e){var n=Ge(V(e.toArray()));return t(n)}})}));function xs(e,n,t,r){if(!(this instanceof xs))throw new SyntaxError("Constructor must be called with the new operator");this.fn=e,this.count=n,this.min=t,this.max=r,this.message="Wrong number of arguments in function "+e+" ("+n+" provided, "+t+(null!=r?"-"+r:"")+" expected)",this.stack=(new Error).stack}xs.prototype=new Error,xs.prototype.constructor=Error,xs.prototype.name="ArgumentsError",xs.prototype.isArgumentsError=!0;var bs=en("resize",["config","matrix"],(function(e){var n=e.config,t=e.matrix;return function(e,i,a){if(2!==arguments.length&&3!==arguments.length)throw new xs("resize",arguments.length,2,3);if(d(i)&&(i=i.valueOf()),s(i[0])&&(i=i.map((function(e){return s(e)?e.toNumber():e}))),d(e))return e.resize(i,a,!0);if("string"==typeof e)return r(e,i,a);var o=!Array.isArray(e)&&"Array"!==n.matrix;if(0===i.length){for(;Array.isArray(e);)e=e[0];return V(e)}Array.isArray(e)||(e=[e]);var u=je(e=V(e),i,a);return o?t(u):u};function r(e,n,t){if(void 0!==t){if("string"!=typeof t||1!==t.length)throw new TypeError("Single character expected as defaultValue")}else t=" ";if(1!==n.length)throw new qe(n.length,1);var r=n[0];if("number"!=typeof r||!oe(r))throw new TypeError("Invalid size, must contain positive integers (size: "+Te(n)+")");if(e.length>r)return e.substring(0,r);if(e.length<r){for(var i=e,a=0,o=r-e.length;a<o;a++)i+=t;return i}return e}})),ws=en("squeeze",["typed","matrix"],(function(e){var n=e.typed,t=e.matrix;return n("squeeze",{Array:function(e){return Le(V(e))},Matrix:function(e){var n=Le(e.toArray());return Array.isArray(n)?t(n):n},any:function(e){return V(e)}})})),Ns=en("pow",["typed","config","identity","multiply","matrix","fraction","number","Complex"],(function(e){var n=e.typed,t=e.config,r=e.identity,i=e.multiply,a=e.matrix,o=e.number,s=e.fraction,u=e.Complex;return n("pow",{"number, number":c,"Complex, Complex":function(e,n){return e.pow(n)},"BigNumber, BigNumber":function(e,n){return n.isInteger()||e>=0||t.predictable?e.pow(n):new u(e.toNumber(),0).pow(n.toNumber(),0)},"Fraction, Fraction":function(e,n){if(1!==n.d){if(t.predictable)throw new Error("Function pow does not support non-integer exponents for fractions.");return c(e.valueOf(),n.valueOf())}return e.pow(n)},"Array, number":f,"Array, BigNumber":function(e,n){return f(e,n.toNumber())},"Matrix, number":l,"Matrix, BigNumber":function(e,n){return l(e,n.toNumber())},"Unit, number | BigNumber":function(e,n){return e.pow(n)}});function c(e,n){if(t.predictable&&!oe(n)&&e<0)try{var r=s(n),i=o(r);if((n===i||Math.abs((n-i)/n)<1e-14)&&r.d%2==1)return(r.n%2==0?1:-1)*Math.pow(-e,n)}catch(e){}return t.predictable&&(e<-1&&n===1/0||e>-1&&e<0&&n===-1/0)?NaN:oe(n)||e>=0||t.predictable?Lr(e,n):e*e<1&&n===1/0||e*e>1&&n===-1/0?0:new u(e,0).pow(n,0)}function f(e,n){if(!oe(n)||n<0)throw new TypeError("For A^b, b must be a positive integer (value is "+n+")");var t=Pe(e);if(2!==t.length)throw new Error("For A^b, A must be 2 dimensional (A has "+t.length+" dimensions)");if(t[0]!==t[1])throw new Error("For A^b, A must be square (size is "+t[0]+"x"+t[1]+")");for(var a=r(t[0]).valueOf(),o=e;n>=1;)1==(1&n)&&(a=i(o,a)),n>>=1,o=i(o,o);return a}function l(e,n){return a(f(e.valueOf(),n))}})),Ss=en("dotPow",["typed","equalScalar","matrix","pow","DenseMatrix"],(function(e){var n=e.typed,t=e.equalScalar,r=e.matrix,i=e.pow,a=e.DenseMatrix,o=io({typed:n}),s=mo({typed:n,DenseMatrix:a}),u=oo({typed:n,equalScalar:t}),c=so({typed:n,DenseMatrix:a}),f=eo({typed:n}),l=no({typed:n}),p=n("dotPow",{"any, any":i,"SparseMatrix, SparseMatrix":function(e,n){return s(e,n,i,!1)},"SparseMatrix, DenseMatrix":function(e,n){return o(n,e,i,!0)},"DenseMatrix, SparseMatrix":function(e,n){return o(e,n,i,!1)},"DenseMatrix, DenseMatrix":function(e,n){return f(e,n,i)},"Array, Array":function(e,n){return p(r(e),r(n)).valueOf()},"Array, Matrix":function(e,n){return p(r(e),n)},"Matrix, Array":function(e,n){return p(e,r(n))},"SparseMatrix, any":function(e,n){return u(e,n,p,!1)},"DenseMatrix, any":function(e,n){return l(e,n,p,!1)},"any, SparseMatrix":function(e,n){return c(n,e,p,!0)},"any, DenseMatrix":function(e,n){return l(n,e,p,!0)},"Array, any":function(e,n){return l(r(e),n,p,!1).valueOf()},"any, Array":function(e,n){return l(r(n),e,p,!0).valueOf()}});return p})),Ms=en("rightArithShift",["typed","matrix","equalScalar","zeros","DenseMatrix"],(function(e){var n=e.typed,t=e.matrix,r=e.equalScalar,i=e.zeros,a=e.DenseMatrix,o=Xa({typed:n}),s=ro({typed:n,equalScalar:r}),u=Zo({typed:n,equalScalar:r}),c=Ka({typed:n,DenseMatrix:a}),f=oo({typed:n,equalScalar:r}),l=eo({typed:n}),p=no({typed:n}),d=n("rightArithShift",{"number, number":di,"BigNumber, BigNumber":oi,"SparseMatrix, SparseMatrix":function(e,n){return u(e,n,d,!1)},"SparseMatrix, DenseMatrix":function(e,n){return s(n,e,d,!0)},"DenseMatrix, SparseMatrix":function(e,n){return o(e,n,d,!1)},"DenseMatrix, DenseMatrix":function(e,n){return l(e,n,d)},"Array, Array":function(e,n){return d(t(e),t(n)).valueOf()},"Array, Matrix":function(e,n){return d(t(e),n)},"Matrix, Array":function(e,n){return d(e,t(n))},"SparseMatrix, number | BigNumber":function(e,n){return r(n,0)?e.clone():f(e,n,d,!1)},"DenseMatrix, number | BigNumber":function(e,n){return r(n,0)?e.clone():p(e,n,d,!1)},"number | BigNumber, SparseMatrix":function(e,n){return r(e,0)?i(n.size(),n.storage()):c(n,e,d,!0)},"number | BigNumber, DenseMatrix":function(e,n){return r(e,0)?i(n.size(),n.storage()):p(n,e,d,!0)},"Array, number | BigNumber":function(e,n){return d(t(e),n).valueOf()},"number | BigNumber, Array":function(e,n){return d(e,t(n)).valueOf()}});return d})),Ds=t(48),Es=t.n(Ds),As=en("compareNatural",["typed","compare"],(function(e){var n=e.typed,t=e.compare,r=t.signatures["boolean,boolean"],i=n("compareNatural",{"any, any":function(e,n){var o,s=G(e),u=G(n);if(!("number"!==s&&"BigNumber"!==s&&"Fraction"!==s||"number"!==u&&"BigNumber"!==u&&"Fraction"!==u))return"0"!==(o=t(e,n)).toString()?o>0?1:-1:Es()(s,u);if("Array"===s||"Matrix"===s||"Array"===u||"Matrix"===u)return 0!==(o=function e(n,t){if(y(n)&&y(t))return a(n.toJSON().values,t.toJSON().values);if(y(n))return e(n.toArray(),t);if(y(t))return e(n,t.toArray());if(h(n))return e(n.toJSON().data,t);if(h(t))return e(n,t.toJSON().data);if(!Array.isArray(n))return e([n],t);if(!Array.isArray(t))return e(n,[t]);return a(n,t)}(e,n))?o:Es()(s,u);if(s!==u)return Es()(s,u);if("Complex"===s)return function(e,n){if(e.re>n.re)return 1;if(e.re<n.re)return-1;if(e.im>n.im)return 1;if(e.im<n.im)return-1;return 0}(e,n);if("Unit"===s)return e.equalBase(n)?i(e.value,n.value):a(e.formatUnits(),n.formatUnits());if("boolean"===s)return r(e,n);if("string"===s)return Es()(e,n);if("Object"===s)return function(e,n){var t=Object.keys(e),r=Object.keys(n);t.sort(Es.a),r.sort(Es.a);var o=a(t,r);if(0!==o)return o;for(var s=0;s<t.length;s++){var u=i(e[t[s]],n[r[s]]);if(0!==u)return u}return 0}(e,n);if("null"===s)return 0;if("undefined"===s)return 0;throw new TypeError('Unsupported type of value "'+s+'"')}});function a(e,n){for(var t=0,r=Math.min(e.length,n.length);t<r;t++){var a=i(e[t],n[t]);if(0!==a)return a}return e.length>n.length?1:e.length<n.length?-1:0}return i}));var _s=en("equalText",["typed","compareText","isZero"],(function(e){var n=e.typed,t=e.compareText,r=e.isZero;return n("equalText",{"any, any":function(e,n){return r(t(e,n))}})})),Os=en("largerEq",["typed","config","matrix","DenseMatrix"],(function(e){var n=e.typed,t=e.config,r=e.matrix,i=e.DenseMatrix,a=io({typed:n}),o=mo({typed:n,DenseMatrix:i}),s=so({typed:n,DenseMatrix:i}),u=eo({typed:n}),c=no({typed:n}),f=n("largerEq",{"boolean, boolean":function(e,n){return e>=n},"number, number":function(e,n){return e>=n||be(e,n,t.epsilon)},"BigNumber, BigNumber":function(e,n){return e.gte(n)||hr(e,n,t.epsilon)},"Fraction, Fraction":function(e,n){return-1!==e.compare(n)},"Complex, Complex":function(){throw new TypeError("No ordering relation is defined for complex numbers")},"Unit, Unit":function(e,n){if(!e.equalBase(n))throw new Error("Cannot compare units with different base");return f(e.value,n.value)},"SparseMatrix, SparseMatrix":function(e,n){return o(e,n,f)},"SparseMatrix, DenseMatrix":function(e,n){return a(n,e,f,!0)},"DenseMatrix, SparseMatrix":function(e,n){return a(e,n,f,!1)},"DenseMatrix, DenseMatrix":function(e,n){return u(e,n,f)},"Array, Array":function(e,n){return f(r(e),r(n)).valueOf()},"Array, Matrix":function(e,n){return f(r(e),n)},"Matrix, Array":function(e,n){return f(e,r(n))},"SparseMatrix, any":function(e,n){return s(e,n,f,!1)},"DenseMatrix, any":function(e,n){return c(e,n,f,!1)},"any, SparseMatrix":function(e,n){return s(n,e,f,!0)},"any, DenseMatrix":function(e,n){return c(n,e,f,!0)},"Array, any":function(e,n){return c(r(e),n,f,!1).valueOf()},"any, Array":function(e,n){return c(r(n),e,f,!0).valueOf()}});return f})),Cs=en("partitionSelect",["typed","isNumeric","isNaN","compare"],(function(e){var n=e.typed,t=e.isNumeric,r=e.isNaN,i=e.compare,a=i,o=function(e,n){return-i(e,n)};return n("partitionSelect",{"Array | Matrix, number":function(e,n){return s(e,n,a)},"Array | Matrix, number, string":function(e,n,t){if("asc"===t)return s(e,n,a);if("desc"===t)return s(e,n,o);throw new Error('Compare string must be "asc" or "desc"')},"Array | Matrix, number, function":s});function s(e,n,t){if(!oe(n)||n<0)throw new Error("k must be a non-negative integer");if(d(e)){if(e.size().length>1)throw new Error("Only one dimensional matrices supported");return u(e.valueOf(),n,t)}if(Array.isArray(e))return u(e,n,t)}function u(e,n,i){if(n>=e.length)throw new Error("k out of bounds");for(var a=0;a<e.length;a++)if(t(e[a])&&r(e[a]))return e[a];for(var o=0,s=e.length-1;o<s;){for(var u=o,c=s,f=e[Math.floor(Math.random()*(s-o+1))+o];u<c;)if(i(e[u],f)>=0){var l=e[c];e[c]=e[u],e[u]=l,--c}else++u;i(e[u],f)>0&&--u,n<=u?s=u:o=u+1}return e[n]}})),Ts=en("Index",["ImmutableDenseMatrix"],(function(e){var n=e.ImmutableDenseMatrix;function t(e){if(!(this instanceof t))throw new SyntaxError("Constructor must be called with the new operator");this._dimensions=[],this._isScalar=!0;for(var n=0,i=arguments.length;n<i;n++){var a=arguments[n];if(g(a))this._dimensions.push(a),this._isScalar=!1;else if(Array.isArray(a)||d(a)){var o=r(a.valueOf());this._dimensions.push(o);var s=o.size();1===s.length&&1===s[0]||(this._isScalar=!1)}else if("number"==typeof a)this._dimensions.push(r([a]));else{if("string"!=typeof a)throw new TypeError("Dimension must be an Array, Matrix, number, string, or Range");this._dimensions.push(a)}}}function r(e){for(var t=0,r=e.length;t<r;t++)if("number"!=typeof e[t]||!oe(e[t]))throw new TypeError("Index parameters must be positive integer numbers");return new n(e)}return t.prototype.type="Index",t.prototype.isIndex=!0,t.prototype.clone=function(){var e=new t;return e._dimensions=V(this._dimensions),e._isScalar=this._isScalar,e},t.create=function(e){var n=new t;return t.apply(n,e),n},t.prototype.size=function(){for(var e=[],n=0,t=this._dimensions.length;n<t;n++){var r=this._dimensions[n];e[n]="string"==typeof r?1:r.size()[0]}return e},t.prototype.max=function(){for(var e=[],n=0,t=this._dimensions.length;n<t;n++){var r=this._dimensions[n];e[n]="string"==typeof r?r:r.max()}return e},t.prototype.min=function(){for(var e=[],n=0,t=this._dimensions.length;n<t;n++){var r=this._dimensions[n];e[n]="string"==typeof r?r:r.min()}return e},t.prototype.forEach=function(e){for(var n=0,t=this._dimensions.length;n<t;n++)e(this._dimensions[n],n,this)},t.prototype.dimension=function(e){return this._dimensions[e]||null},t.prototype.isObjectProperty=function(){return 1===this._dimensions.length&&"string"==typeof this._dimensions[0]},t.prototype.getObjectProperty=function(){return this.isObjectProperty()?this._dimensions[0]:null},t.prototype.isScalar=function(){return this._isScalar},t.prototype.toArray=function(){for(var e=[],n=0,t=this._dimensions.length;n<t;n++){var r=this._dimensions[n];e.push("string"==typeof r?r:r.toArray())}return e},t.prototype.valueOf=t.prototype.toArray,t.prototype.toString=function(){for(var e=[],n=0,t=this._dimensions.length;n<t;n++){var r=this._dimensions[n];"string"==typeof r?e.push(JSON.stringify(r)):e.push(r.toString())}return"["+e.join(", ")+"]"},t.prototype.toJSON=function(){return{mathjs:"Index",dimensions:this._dimensions}},t.fromJSON=function(e){return t.create(e.dimensions)},t}),{isClass:!0}),Is=en("asech",["typed","config","Complex","BigNumber"],(function(e){var n=e.typed,t=e.config,r=e.Complex,i=e.BigNumber,a=n("asech",{number:function(e){if(e<=1&&e>=-1||t.predictable){var n=1/e;if(n>0||t.predictable)return Gi(e);var i=Math.sqrt(n*n-1);return new r(Math.log(i-n),Math.PI)}return new r(e,0).asech()},Complex:function(e){return e.asech()},BigNumber:function(e){return new i(1).div(e).acosh()},"Array | Matrix":function(e){return rr(e,a)}});return a})),ks=en("tan",["typed"],(function(e){var n=(0,e.typed)("tan",{number:Math.tan,Complex:function(e){return e.tan()},BigNumber:function(e){return e.tan()},Unit:function(e){if(!e.hasBase(e.constructor.BASE_UNITS.ANGLE))throw new TypeError("Unit in function tan is no angle");return n(e.value)},"Array | Matrix":function(e){return rr(e,n,!0)}});return n})),Bs=en("setDifference",["typed","size","subset","compareNatural","Index","DenseMatrix"],(function(e){var n=e.typed,t=e.size,r=e.subset,i=e.compareNatural,a=e.Index,o=e.DenseMatrix;return n("setDifference",{"Array | Matrix, Array | Matrix":function(e,n){var s;if(0===r(t(e),new a(0)))s=[];else{if(0===r(t(n),new a(0)))return Ge(e.toArray());var u,c=Ye(Ge(Array.isArray(e)?e:e.toArray()).sort(i)),f=Ye(Ge(Array.isArray(n)?n:n.toArray()).sort(i));s=[];for(var l=0;l<c.length;l++){u=!1;for(var p=0;p<f.length;p++)if(0===i(c[l].value,f[p].value)&&c[l].identifier===f[p].identifier){u=!0;break}u||s.push(c[l])}}return Array.isArray(e)&&Array.isArray(n)?Xe(s):new o(Xe(s))}})})),qs=en("setIntersect",["typed","size","subset","compareNatural","Index","DenseMatrix"],(function(e){var n=e.typed,t=e.size,r=e.subset,i=e.compareNatural,a=e.Index,o=e.DenseMatrix;return n("setIntersect",{"Array | Matrix, Array | Matrix":function(e,n){var s;if(0===r(t(e),new a(0))||0===r(t(n),new a(0)))s=[];else{var u=Ye(Ge(Array.isArray(e)?e:e.toArray()).sort(i)),c=Ye(Ge(Array.isArray(n)?n:n.toArray()).sort(i));s=[];for(var f=0;f<u.length;f++)for(var l=0;l<c.length;l++)if(0===i(u[f].value,c[l].value)&&u[f].identifier===c[l].identifier){s.push(u[f]);break}}return Array.isArray(e)&&Array.isArray(n)?Xe(s):new o(Xe(s))}})})),Rs=en("setMultiplicity",["typed","size","subset","compareNatural","Index"],(function(e){var n=e.typed,t=e.size,r=e.subset,i=e.compareNatural,a=e.Index;return n("setMultiplicity",{"number | BigNumber | Fraction | Complex, Array | Matrix":function(e,n){if(0===r(t(n),new a(0)))return 0;for(var o=Ge(Array.isArray(n)?n:n.toArray()),s=0,u=0;u<o.length;u++)0===i(o[u],e)&&s++;return s}})})),Ps=en("setSize",["typed","compareNatural"],(function(e){var n=e.typed,t=e.compareNatural;return n("setSize",{"Array | Matrix":function(e){return Array.isArray(e)?Ge(e).length:Ge(e.toArray()).length},"Array | Matrix, boolean":function(e,n){if(!1===n||0===e.length)return Array.isArray(e)?Ge(e).length:Ge(e.toArray()).length;for(var r=Ge(Array.isArray(e)?e:e.toArray()).sort(t),i=1,a=1;a<r.length;a++)0!==t(r[a],r[a-1])&&i++;return i}})})),zs=en("norm",["typed","abs","add","pow","conj","sqrt","multiply","equalScalar","larger","smaller","matrix"],(function(e){var n=e.typed,t=e.abs,r=e.add,i=e.pow,a=e.conj,o=e.sqrt,s=e.multiply,u=e.equalScalar,c=e.larger,f=e.smaller,l=e.matrix,p=n("norm",{number:Math.abs,Complex:function(e){return e.abs()},BigNumber:function(e){return e.abs()},boolean:function(e){return Math.abs(e)},Array:function(e){return d(l(e),2)},Matrix:function(e){return d(e,2)},"number | Complex | BigNumber | boolean, number | BigNumber | string":function(e){return p(e)},"Array, number | BigNumber | string":function(e,n){return d(l(e),n)},"Matrix, number | BigNumber | string":function(e,n){return d(e,n)}});function d(e,n){var l=e.size();if(1===l.length){if(n===Number.POSITIVE_INFINITY||"inf"===n){var p=0;return e.forEach((function(e){var n=t(e);c(n,p)&&(p=n)}),!0),p}var m;if(n===Number.NEGATIVE_INFINITY||"-inf"===n)return e.forEach((function(e){var n=t(e);m&&!f(n,m)||(m=n)}),!0),m||0;if("fro"===n)return d(e,2);if("number"==typeof n&&!isNaN(n)){if(!u(n,0)){var h=0;return e.forEach((function(e){h=r(i(t(e),n),h)}),!0),i(h,1/n)}return Number.POSITIVE_INFINITY}throw new Error("Unsupported parameter value")}if(2===l.length){if(1===n){var y=[],g=0;return e.forEach((function(e,n){var i=n[1],a=r(y[i]||0,t(e));c(a,g)&&(g=a),y[i]=a}),!0),g}if(n===Number.POSITIVE_INFINITY||"inf"===n){var v=[],x=0;return e.forEach((function(e,n){var i=n[0],a=r(v[i]||0,t(e));c(a,x)&&(x=a),v[i]=a}),!0),x}if("fro"===n){var b=0;return e.forEach((function(e,n){b=r(b,s(e,a(e)))})),t(o(b))}if(2===n)throw new Error("Unsupported parameter value, missing implementation of matrix singular value decomposition");throw new Error("Unsupported parameter value")}}return p})),Fs=en("index",["typed","Index"],(function(e){var n=e.typed,t=e.Index;return n("index",{"...number | string | BigNumber | Range | Array | Matrix":function(e){var n=e.map((function(e){return s(e)?e.toNumber():Array.isArray(e)||d(e)?e.map((function(e){return s(e)?e.toNumber():e})):e})),r=new t;return t.apply(r,n),r}})})),js=en("quantileSeq",["typed","add","multiply","partitionSelect","compare"],(function(e){var n=e.typed,t=e.add,r=e.multiply,i=e.partitionSelect,a=e.compare;function u(e,n,s){var u=Ge(e),f=u.length;if(0===f)throw new Error("Cannot calculate quantile of an empty sequence");if(o(n)){var l=n*(f-1),p=l%1;if(0===p){var d=s?u[l]:i(u,l);return c(d),d}var m,h,y=Math.floor(l);if(s)m=u[y],h=u[y+1];else{h=i(u,y+1),m=u[y];for(var g=0;g<y;++g)a(u[g],m)>0&&(m=u[g])}return c(m),c(h),t(r(m,1-p),r(h,p))}var v=n.times(f-1);if(v.isInteger()){v=v.toNumber();var x=s?u[v]:i(u,v);return c(x),x}var b,w,N=v.floor(),S=v.minus(N),M=N.toNumber();if(s)b=u[M],w=u[M+1];else{w=i(u,M+1),b=u[M];for(var D=0;D<M;++D)a(u[D],b)>0&&(b=u[D])}c(b),c(w);var E=new S.constructor(1);return t(r(b,E.minus(S)),r(w,S))}var c=n({"number | BigNumber | Unit":function(e){return e}});return function(e,n,t){var r,i,a;if(arguments.length<2||arguments.length>3)throw new SyntaxError("Function quantileSeq requires two or three parameters");if(m(e)){if("boolean"==typeof(t=t||!1)){if(i=e.valueOf(),o(n)){if(n<0)throw new Error("N/prob must be non-negative");if(n<=1)return u(i,n,t);if(n>1){if(!oe(n))throw new Error("N must be a positive integer");var c=n+1;r=new Array(n);for(var f=0;f<n;)r[f]=u(i,++f/c,t);return r}}if(s(n)){var l=n.constructor;if(n.isNegative())throw new Error("N/prob must be non-negative");if(a=new l(1),n.lte(a))return new l(u(i,n,t));if(n.gt(a)){if(!n.isInteger())throw new Error("N must be a positive integer");var p=n.toNumber();if(p>4294967295)throw new Error("N must be less than or equal to 2^32-1, as that is the maximum length of an Array");var d=new l(p+1);r=new Array(p);for(var h=0;h<p;)r[h]=new l(u(i,new l(++h).div(d),t));return r}}if(Array.isArray(n)){r=new Array(n.length);for(var y=0;y<r.length;++y){var g=n[y];if(o(g)){if(g<0||g>1)throw new Error("Probability must be between 0 and 1, inclusive")}else{if(!s(g))throw new TypeError("Unexpected type of argument in function quantileSeq");if(a=new g.constructor(1),g.isNegative()||g.gt(a))throw new Error("Probability must be between 0 and 1, inclusive")}r[y]=u(i,g,t)}return r}throw new TypeError("Unexpected type of argument in function quantileSeq")}throw new TypeError("Unexpected type of argument in function quantileSeq")}throw new TypeError("Unexpected type of argument in function quantileSeq")}}));function Us(e){var n;if(oe(e))return e<=0?isFinite(e)?1/0:NaN:e>171?1/0:pa(1,e-1);if(e<.5)return Math.PI/(Math.sin(Math.PI*e)*Us(1-e));if(e>=171.35)return 1/0;if(e>85){var t=e*e,r=t*e,i=r*e,a=i*e;return Math.sqrt(2*Math.PI/e)*Math.pow(e/Math.E,e)*(1+1/(12*e)+1/(288*t)-139/(51840*r)-571/(2488320*i)+163879/(209018880*a)+5246819/(75246796800*a*e))}--e,n=Hs[0];for(var o=1;o<Hs.length;++o)n+=Hs[o]/(e+o);var s=e+Ls+.5;return Math.sqrt(2*Math.PI)*Math.pow(s,e+.5)*Math.exp(-s)*n}Us.signature="number";var Ls=4.7421875,Hs=[.9999999999999971,57.15623566586292,-59.59796035547549,14.136097974741746,-.4919138160976202,3399464998481189e-20,4652362892704858e-20,-9837447530487956e-20,.0001580887032249125,-.00021026444172410488,.00021743961811521265,-.0001643181065367639,8441822398385275e-20,-26190838401581408e-21,36899182659531625e-22],Gs=en("gamma",["typed","config","multiplyScalar","pow","BigNumber","Complex"],(function(e){var n=e.typed,t=e.config,r=e.multiplyScalar,i=e.pow,a=e.BigNumber,o=e.Complex,s=n("gamma",{number:Us,Complex:function(e){if(0===e.im)return s(e.re);e=new o(e.re-1,e.im);for(var n=new o(Hs[0],0),t=1;t<Hs.length;++t){var a=e.re+t,u=a*a+e.im*e.im;0!==u?(n.re+=Hs[t]*a/u,n.im+=-Hs[t]*e.im/u):n.re=Hs[t]<0?-1/0:1/0}var c=new o(e.re+Ls+.5,e.im),f=Math.sqrt(2*Math.PI);e.re+=.5;var l=i(c,e);0===l.im?l.re*=f:(0===l.re||(l.re*=f),l.im*=f);var p=Math.exp(-c.re);return c.re=p*Math.cos(-c.im),c.im=p*Math.sin(-c.im),r(r(l,c),n)},BigNumber:function(e){if(e.isInteger())return e.isNegative()||e.isZero()?new a(1/0):function e(n){if(n<8)return new a([1,1,2,6,24,120,720,5040][n]);var r=t.precision+(0|Math.log(n.toNumber())),i=a.clone({precision:r});if(n%2==1)return n.times(e(new a(n-1)));var o=n,s=new i(n),u=n.toNumber();for(;o>2;)u+=o-=2,s=s.times(u);return new a(s.toPrecision(a.precision))}(e.minus(1));if(!e.isFinite())return new a(e.isNegative()?NaN:1/0);throw new Error("Integer BigNumber expected")},"Array | Matrix":function(e){return rr(e,s)}});return s})),$s=en("bignumber",["typed","BigNumber"],(function(e){var n=e.typed,t=e.BigNumber,r=n("bignumber",{"":function(){return new t(0)},number:function(e){return new t(e+"")},string:function(e){return new t(e)},BigNumber:function(e){return e},Fraction:function(e){return new t(e.n).div(e.d).times(e.s)},null:function(e){return new t(0)},"Array | Matrix":function(e){return rr(e,r)}});return r})),Vs=en("lcm",["typed","matrix","equalScalar"],(function(e){var n=e.typed,t=e.matrix,r=e.equalScalar,i=ro({typed:n,equalScalar:r}),a=co({typed:n,equalScalar:r}),o=oo({typed:n,equalScalar:r}),s=eo({typed:n}),u=no({typed:n}),c=n("lcm",{"number, number":kr,"BigNumber, BigNumber":function(e,n){if(!e.isInt()||!n.isInt())throw new Error("Parameters in function lcm must be integer numbers");if(e.isZero())return e;if(n.isZero())return n;var t=e.times(n);for(;!n.isZero();){var r=n;n=e.mod(r),e=r}return t.div(e).abs()},"Fraction, Fraction":function(e,n){return e.lcm(n)},"SparseMatrix, SparseMatrix":function(e,n){return a(e,n,c)},"SparseMatrix, DenseMatrix":function(e,n){return i(n,e,c,!0)},"DenseMatrix, SparseMatrix":function(e,n){return i(e,n,c,!1)},"DenseMatrix, DenseMatrix":function(e,n){return s(e,n,c)},"Array, Array":function(e,n){return c(t(e),t(n)).valueOf()},"Array, Matrix":function(e,n){return c(t(e),n)},"Matrix, Array":function(e,n){return c(e,t(n))},"SparseMatrix, number | BigNumber":function(e,n){return o(e,n,c,!1)},"DenseMatrix, number | BigNumber":function(e,n){return u(e,n,c,!1)},"number | BigNumber, SparseMatrix":function(e,n){return o(n,e,c,!0)},"number | BigNumber, DenseMatrix":function(e,n){return u(n,e,c,!0)},"Array, number | BigNumber":function(e,n){return u(t(e),n,c,!1).valueOf()},"number | BigNumber, Array":function(e,n){return u(t(n),e,c,!0).valueOf()},"Array | Matrix | number | BigNumber, Array | Matrix | number | BigNumber, ...Array | Matrix | number | BigNumber":function(e,n,t){for(var r=c(e,n),i=0;i<t.length;i++)r=c(r,t[i]);return r}});return c})),Ws=en("bitOr",["typed","matrix","equalScalar","DenseMatrix"],(function(e){var n=e.typed,t=e.matrix,r=e.equalScalar,i=e.DenseMatrix,a=Xa({typed:n}),o=Qa({typed:n,equalScalar:r}),s=Ka({typed:n,DenseMatrix:i}),u=eo({typed:n}),c=no({typed:n}),f=n("bitOr",{"number, number":fi,"BigNumber, BigNumber":ni,"SparseMatrix, SparseMatrix":function(e,n){return o(e,n,f)},"SparseMatrix, DenseMatrix":function(e,n){return a(n,e,f,!0)},"DenseMatrix, SparseMatrix":function(e,n){return a(e,n,f,!1)},"DenseMatrix, DenseMatrix":function(e,n){return u(e,n,f)},"Array, Array":function(e,n){return f(t(e),t(n)).valueOf()},"Array, Matrix":function(e,n){return f(t(e),n)},"Matrix, Array":function(e,n){return f(e,t(n))},"SparseMatrix, any":function(e,n){return s(e,n,f,!1)},"DenseMatrix, any":function(e,n){return c(e,n,f,!1)},"any, SparseMatrix":function(e,n){return s(n,e,f,!0)},"any, DenseMatrix":function(e,n){return c(n,e,f,!0)},"Array, any":function(e,n){return c(t(e),n,f,!1).valueOf()},"any, Array":function(e,n){return c(t(n),e,f,!0).valueOf()}});return f})),Zs=en("kron",["typed","matrix","multiplyScalar"],(function(e){var n=e.typed,t=e.matrix,r=e.multiplyScalar;return n("kron",{"Matrix, Matrix":function(e,n){return t(i(e.toArray(),n.toArray()))},"Matrix, Array":function(e,n){return t(i(e.toArray(),n))},"Array, Matrix":function(e,n){return t(i(e,n.toArray()))},"Array, Array":i});function i(e,n){if(1===Pe(e).length&&(e=[e]),1===Pe(n).length&&(n=[n]),Pe(e).length>2||Pe(n).length>2)throw new RangeError("Vectors with dimensions greater then 2 are not supported expected (Size x = "+JSON.stringify(e.length)+", y = "+JSON.stringify(n.length)+")");var t=[],i=[];return e.map((function(e){return n.map((function(n){return i=[],t.push(i),e.map((function(e){return n.map((function(n){return i.push(r(e,n))}))}))}))}))&&t}})),Js=en("transpose",["typed","matrix"],(function(e){var n=e.typed,t=e.matrix,r=n("transpose",{Array:function(e){return r(t(e)).valueOf()},Matrix:function(e){var n,t=e.size();switch(t.length){case 1:n=e.clone();break;case 2:var r=t[0],i=t[1];if(0===i)throw new RangeError("Cannot transpose a 2D matrix with no columns (size: "+Te(t)+")");switch(e.storage()){case"dense":n=function(e,n,t){for(var r,i=e._data,a=[],o=0;o<t;o++){r=a[o]=[];for(var s=0;s<n;s++)r[s]=V(i[s][o])}return e.createDenseMatrix({data:a,size:[t,n],datatype:e._datatype})}(e,r,i);break;case"sparse":n=function(e,n,t){for(var r,i,a,o=e._values,s=e._index,u=e._ptr,c=o?[]:void 0,f=[],l=[],p=[],d=0;d<n;d++)p[d]=0;for(r=0,i=s.length;r<i;r++)p[s[r]]++;for(var m=0,h=0;h<n;h++)l.push(m),m+=p[h],p[h]=l[h];for(l.push(m),a=0;a<t;a++)for(var y=u[a],g=u[a+1],v=y;v<g;v++){var x=p[s[v]]++;f[x]=a,o&&(c[x]=V(o[v]))}return e.createSparseMatrix({values:c,index:f,ptr:l,size:[t,n],datatype:e._datatype})}(e,r,i)}break;default:throw new RangeError("Matrix must be a vector or two dimensional (size: "+Te(this._size)+")")}return n},any:function(e){return V(e)}});return r})),Ys=en("numeric",["number","?bignumber","?fraction"],(function(e){var n=e.number,t=e.bignumber,r=e.fraction,i={string:!0,number:!0,BigNumber:!0,Fraction:!0},a={number:function(e){return n(e)},BigNumber:t?function(e){return t(e)}:So,Fraction:r?function(e){return r(e)}:Mo};return function(e,n){var t=G(e);if(!(t in i))throw new TypeError("Cannot convert "+e+' of type "'+t+'"; valid input types are '+Object.keys(i).join(", "));if(!(n in a))throw new TypeError("Cannot convert "+e+' to type "'+n+'"; valid output types are '+Object.keys(a).join(", "));return n===t?e:a[n](e)}})),Xs=en("and",["typed","matrix","equalScalar","zeros","not"],(function(e){var n=e.typed,t=e.matrix,r=e.equalScalar,i=e.zeros,a=e.not,o=ro({typed:n,equalScalar:r}),s=co({typed:n,equalScalar:r}),u=oo({typed:n,equalScalar:r}),c=eo({typed:n}),f=no({typed:n}),l=n("and",{"number, number":wi,"Complex, Complex":function(e,n){return!(0===e.re&&0===e.im||0===n.re&&0===n.im)},"BigNumber, BigNumber":function(e,n){return!(e.isZero()||n.isZero()||e.isNaN()||n.isNaN())},"Unit, Unit":function(e,n){return l(e.value||0,n.value||0)},"SparseMatrix, SparseMatrix":function(e,n){return s(e,n,l,!1)},"SparseMatrix, DenseMatrix":function(e,n){return o(n,e,l,!0)},"DenseMatrix, SparseMatrix":function(e,n){return o(e,n,l,!1)},"DenseMatrix, DenseMatrix":function(e,n){return c(e,n,l)},"Array, Array":function(e,n){return l(t(e),t(n)).valueOf()},"Array, Matrix":function(e,n){return l(t(e),n)},"Matrix, Array":function(e,n){return l(e,t(n))},"SparseMatrix, any":function(e,n){return a(n)?i(e.size(),e.storage()):u(e,n,l,!1)},"DenseMatrix, any":function(e,n){return a(n)?i(e.size(),e.storage()):f(e,n,l,!1)},"any, SparseMatrix":function(e,n){return a(e)?i(e.size(),e.storage()):u(n,e,l,!0)},"any, DenseMatrix":function(e,n){return a(e)?i(e.size(),e.storage()):f(n,e,l,!0)},"Array, any":function(e,n){return l(t(e),n).valueOf()},"any, Array":function(e,n){return l(e,t(n)).valueOf()}});return l})),Qs=en("smallerEq",["typed","config","matrix","DenseMatrix"],(function(e){var n=e.typed,t=e.config,r=e.matrix,i=e.DenseMatrix,a=io({typed:n}),o=mo({typed:n,DenseMatrix:i}),s=so({typed:n,DenseMatrix:i}),u=eo({typed:n}),c=no({typed:n}),f=n("smallerEq",{"boolean, boolean":function(e,n){return e<=n},"number, number":function(e,n){return e<=n||be(e,n,t.epsilon)},"BigNumber, BigNumber":function(e,n){return e.lte(n)||hr(e,n,t.epsilon)},"Fraction, Fraction":function(e,n){return 1!==e.compare(n)},"Complex, Complex":function(){throw new TypeError("No ordering relation is defined for complex numbers")},"Unit, Unit":function(e,n){if(!e.equalBase(n))throw new Error("Cannot compare units with different base");return f(e.value,n.value)},"SparseMatrix, SparseMatrix":function(e,n){return o(e,n,f)},"SparseMatrix, DenseMatrix":function(e,n){return a(n,e,f,!0)},"DenseMatrix, SparseMatrix":function(e,n){return a(e,n,f,!1)},"DenseMatrix, DenseMatrix":function(e,n){return u(e,n,f)},"Array, Array":function(e,n){return f(r(e),r(n)).valueOf()},"Array, Matrix":function(e,n){return f(r(e),n)},"Matrix, Array":function(e,n){return f(e,r(n))},"SparseMatrix, any":function(e,n){return s(e,n,f,!1)},"DenseMatrix, any":function(e,n){return c(e,n,f,!1)},"any, SparseMatrix":function(e,n){return s(n,e,f,!0)},"any, DenseMatrix":function(e,n){return c(n,e,f,!0)},"Array, any":function(e,n){return c(r(e),n,f,!1).valueOf()},"any, Array":function(e,n){return c(r(n),e,f,!0).valueOf()}});return f})),Ks=en("sort",["typed","matrix","compare","compareNatural"],(function(e){var n=e.typed,t=e.matrix,r=e.compare,i=e.compareNatural,a=r,o=function(e,n){return-r(e,n)};return n("sort",{Array:function(e){return u(e),e.sort(a)},Matrix:function(e){return c(e),t(e.toArray().sort(a),e.storage())},"Array, function":function(e,n){return u(e),e.sort(n)},"Matrix, function":function(e,n){return c(e),t(e.toArray().sort(n),e.storage())},"Array, string":function(e,n){return u(e),e.sort(s(n))},"Matrix, string":function(e,n){return c(e),t(e.toArray().sort(s(n)),e.storage())}});function s(e){if("asc"===e)return a;if("desc"===e)return o;if("natural"===e)return i;throw new Error('String "asc", "desc", or "natural" expected')}function u(e){if(1!==Pe(e).length)throw new Error("One dimensional array expected")}function c(e){if(1!==e.size().length)throw new Error("One dimensional matrix expected")}}));function eu(e,n,t){var r;return-1!==String(e).indexOf("Unexpected type")?(r=arguments.length>2?" (type: "+G(t)+", value: "+JSON.stringify(t)+")":" (type: "+e.data.actual+")",new TypeError("Cannot calculate "+n+", unexpected type of argument"+r)):-1!==String(e).indexOf("complex numbers")?(r=arguments.length>2?" (type: "+G(t)+", value: "+JSON.stringify(t)+")":"",new TypeError("Cannot calculate "+n+", no ordering relation is defined for complex numbers"+r)):e}var nu=en("min",["typed","config","numeric","smaller"],(function(e){var n=e.typed,t=e.config,r=e.numeric,i=e.smaller;return n("min",{"Array | Matrix":o,"Array | Matrix, number | BigNumber":function(e,n){return ir(e,n.valueOf(),a)},"...":function(e){if(nr(e))throw new TypeError("Scalar values expected in function min");return o(e)}});function a(e,n){try{return i(e,n)?e:n}catch(e){throw eu(e,"min",n)}}function o(e){var n;if(tr(e,(function(e){try{isNaN(e)&&"number"==typeof e?n=NaN:(void 0===n||i(e,n))&&(n=e)}catch(n){throw eu(n,"min",e)}})),void 0===n)throw new Error("Cannot calculate min of an empty array");return"string"==typeof n&&(n=r(n,t.number)),n}})),tu=en("cot",["typed","BigNumber"],(function(e){var n=e.typed,t=e.BigNumber,r=n("cot",{number:Wi,Complex:function(e){return e.cot()},BigNumber:function(e){return new t(1).div(e.tan())},Unit:function(e){if(!e.hasBase(e.constructor.BASE_UNITS.ANGLE))throw new TypeError("Unit in function cot is no angle");return r(e.value)},"Array | Matrix":function(e){return rr(e,r)}});return r})),ru=en("setDistinct",["typed","size","subset","compareNatural","Index","DenseMatrix"],(function(e){var n=e.typed,t=e.size,r=e.subset,i=e.compareNatural,a=e.Index,o=e.DenseMatrix;return n("setDistinct",{"Array | Matrix":function(e){var n;if(0===r(t(e),new a(0)))n=[];else{var s=Ge(Array.isArray(e)?e:e.toArray()).sort(i);(n=[]).push(s[0]);for(var u=1;u<s.length;u++)0!==i(s[u],s[u-1])&&n.push(s[u])}return Array.isArray(e)?n:new o(n)}})})),iu=en("setPowerset",["typed","size","subset","compareNatural","Index"],(function(e){var n=e.typed,t=e.size,r=e.subset,i=e.compareNatural,a=e.Index;return n("setPowerset",{"Array | Matrix":function(e){if(0===r(t(e),new a(0)))return[];for(var n=Ge(Array.isArray(e)?e:e.toArray()).sort(i),s=[],u=0;u.toString(2).length<=n.length;)s.push(o(n,u.toString(2).split("").reverse())),u++;return function(e){for(var n=[],t=e.length-1;t>0;t--)for(var r=0;r<t;r++)e[r].length>e[r+1].length&&(n=e[r],e[r]=e[r+1],e[r+1]=n);return e}(s)}});function o(e,n){for(var t=[],r=0;r<n.length;r++)"1"===n[r]&&t.push(e[r]);return t}})),au=en("trace",["typed","matrix","add"],(function(e){var n=e.typed,t=e.matrix,r=e.add;return n("trace",{Array:function(e){return i(t(e))},SparseMatrix:function(e){var n=e._values,t=e._index,i=e._ptr,a=e._size,o=a[0],s=a[1];if(o===s){var u=0;if(n.length>0)for(var c=0;c<s;c++)for(var f=i[c],l=i[c+1],p=f;p<l;p++){var d=t[p];if(d===c){u=r(u,n[p]);break}if(d>c)break}return u}throw new RangeError("Matrix must be square (size: "+Te(a)+")")},DenseMatrix:i,any:V});function i(e){var n=e._size,t=e._data;switch(n.length){case 1:if(1===n[0])return V(t[0]);throw new RangeError("Matrix must be square (size: "+Te(n)+")");case 2:var i=n[0];if(i===n[1]){for(var a=0,o=0;o<i;o++)a=r(a,t[o][o]);return a}throw new RangeError("Matrix must be square (size: "+Te(n)+")");default:throw new RangeError("Matrix must be two dimensional (size: "+Te(n)+")")}}})),ou=en("sum",["typed","config","add","numeric"],(function(e){var n=e.typed,t=e.config,r=e.add,i=e.numeric;return n("sum",{"Array | Matrix":a,"Array | Matrix, number | BigNumber":function(e,n){try{return ir(e,n,r)}catch(e){throw eu(e,"sum")}},"...":function(e){if(nr(e))throw new TypeError("Scalar values expected in function sum");return a(e)}});function a(e){var n;return tr(e,(function(e){try{n=void 0===n?e:r(n,e)}catch(n){throw eu(n,"sum",e)}})),void 0===n&&(n=i(0,t.number)),"string"==typeof n&&(n=i(n,t.number)),n}})),su=en("factorial",["typed","gamma"],(function(e){var n=e.typed,t=e.gamma,r=n("factorial",{number:function(e){if(e<0)throw new Error("Value must be non-negative");return t(e+1)},BigNumber:function(e){if(e.isNegative())throw new Error("Value must be non-negative");return t(e.plus(1))},"Array | Matrix":function(e){return rr(e,r)}});return r})),uu=en("permutations",["typed","factorial"],(function(e){return(0,e.typed)("permutations",{"number | BigNumber":e.factorial,"number, number":function(e,n){if(!oe(e)||e<0)throw new TypeError("Positive integer value expected in function permutations");if(!oe(n)||n<0)throw new TypeError("Positive integer value expected in function permutations");if(n>e)throw new TypeError("second argument k must be less than or equal to first argument n");return pa(e-n+1,e)},"BigNumber, BigNumber":function(e,n){var t,r;if(!cu(e)||!cu(n))throw new TypeError("Positive integer value expected in function permutations");if(n.gt(e))throw new TypeError("second argument k must be less than or equal to first argument n");for(t=e.mul(0).add(1),r=e.minus(n).plus(1);r.lte(e);r=r.plus(1))t=t.times(r);return t}})}));function cu(e){return e.isInteger()&&e.gte(0)}var fu=en("ceil",["typed","config","round"],(function(e){var n=e.typed,t=e.config,r=e.round,i=n("ceil",{number:function(e){return be(e,r(e),t.epsilon)?r(e):_r(e)},Complex:function(e){return e.ceil()},BigNumber:function(e){return hr(e,r(e),t.epsilon)?r(e):e.ceil()},Fraction:function(e){return e.ceil()},"Array | Matrix":function(e){return rr(e,i,!0)}});return i})),lu=en("subtract",["typed","matrix","equalScalar","addScalar","unaryMinus","DenseMatrix"],(function(e){var n=e.typed,t=e.matrix,r=e.equalScalar,i=e.addScalar,a=e.unaryMinus,o=e.DenseMatrix,s=Xa({typed:n}),u=io({typed:n}),c=ao({typed:n,equalScalar:r}),f=Ka({typed:n,DenseMatrix:o}),l=eo({typed:n}),p=no({typed:n}),d=n("subtract",{"number, number":function(e,n){return e-n},"Complex, Complex":function(e,n){return e.sub(n)},"BigNumber, BigNumber":function(e,n){return e.minus(n)},"Fraction, Fraction":function(e,n){return e.sub(n)},"Unit, Unit":function(e,n){if(null===e.value)throw new Error("Parameter x contains a unit with undefined value");if(null===n.value)throw new Error("Parameter y contains a unit with undefined value");if(!e.equalBase(n))throw new Error("Units do not match");var t=e.clone();return t.value=d(t.value,n.value),t.fixPrefix=!1,t},"SparseMatrix, SparseMatrix":function(e,n){return pu(e,n),c(e,n,d)},"SparseMatrix, DenseMatrix":function(e,n){return pu(e,n),u(n,e,d,!0)},"DenseMatrix, SparseMatrix":function(e,n){return pu(e,n),s(e,n,d,!1)},"DenseMatrix, DenseMatrix":function(e,n){return pu(e,n),l(e,n,d)},"Array, Array":function(e,n){return d(t(e),t(n)).valueOf()},"Array, Matrix":function(e,n){return d(t(e),n)},"Matrix, Array":function(e,n){return d(e,t(n))},"SparseMatrix, any":function(e,n){return f(e,a(n),i)},"DenseMatrix, any":function(e,n){return p(e,n,d)},"any, SparseMatrix":function(e,n){return f(n,e,d,!0)},"any, DenseMatrix":function(e,n){return p(n,e,d,!0)},"Array, any":function(e,n){return p(t(e),n,d,!1).valueOf()},"any, Array":function(e,n){return p(t(n),e,d,!0).valueOf()}});return d}));function pu(e,n){var t=e.size(),r=n.size();if(t.length!==r.length)throw new qe(t.length,r.length)}var du=en("cross",["typed","matrix","subtract","multiply"],(function(e){var n=e.typed,t=e.matrix,r=e.subtract,i=e.multiply;return n("cross",{"Matrix, Matrix":function(e,n){return t(a(e.toArray(),n.toArray()))},"Matrix, Array":function(e,n){return t(a(e.toArray(),n))},"Array, Matrix":function(e,n){return t(a(e,n.toArray()))},"Array, Array":a});function a(e,n){var t=Math.max(Pe(e).length,Pe(n).length);e=Le(e),n=Le(n);var a=Pe(e),o=Pe(n);if(1!==a.length||1!==o.length||3!==a[0]||3!==o[0])throw new RangeError("Vectors with length 3 expected (Size A = ["+a.join(", ")+"], B = ["+o.join(", ")+"])");var s=[r(i(e[1],n[2]),i(e[2],n[1])),r(i(e[2],n[0]),i(e[0],n[2])),r(i(e[0],n[1]),i(e[1],n[0]))];return t>1?[s]:s}})),mu=en("ctranspose",["typed","transpose","conj"],(function(e){var n=e.typed,t=e.transpose,r=e.conj;return n("ctranspose",{any:function(e){return r(t(e))}})})),hu=en("divideScalar",["typed","numeric"],(function(e){var n=e.typed,t=e.numeric,r=n("divideScalar",{"number, number":function(e,n){return e/n},"Complex, Complex":function(e,n){return e.div(n)},"BigNumber, BigNumber":function(e,n){return e.div(n)},"Fraction, Fraction":function(e,n){return e.div(n)},"Unit, number | Fraction | BigNumber":function(e,n){var i=e.clone(),a=t(1,G(n));return i.value=r(null===i.value?i._normalize(a):i.value,n),i},"number | Fraction | BigNumber, Unit":function(e,n){var i=n.clone();i=i.pow(-1);var a=t(1,G(e));return i.value=r(e,null===n.value?n._normalize(a):n.value),i},"Unit, Unit":function(e,n){return e.divide(n)}});return r})),yu=en("nthRoots",["config","typed","divideScalar","Complex"],(function(e){var n=e.typed,t=(e.config,e.divideScalar,e.Complex),r=n("nthRoots",{Complex:function(e){return a(e,2)},"Complex, number":a}),i=[function(e){return new t(e,0)},function(e){return new t(0,e)},function(e){return new t(-e,0)},function(e){return new t(0,-e)}];function a(e,n){if(n<0)throw new Error("Root must be greater than zero");if(0===n)throw new Error("Root must be non-zero");if(n%1!=0)throw new Error("Root must be an integer");if(0===e||0===e.abs())return[new t(0,0)];var r,a="number"==typeof e;(a||0===e.re||0===e.im)&&(r=a?2*+(e<0):0===e.im?2*+(e.re<0):2*+(e.im<0)+1);for(var o=e.arg(),s=e.abs(),u=[],c=Math.pow(s,1/n),f=0;f<n;f++){var l=(r+4*f)/n;l!==Math.round(l)?u.push(new t({r:c,phi:(o+2*Math.PI*f)/n})):u.push(i[l%4](c))}return u}return r}));function gu(e){var n=e.DenseMatrix;return function(e,t,r){var i=e.size();if(2!==i.length)throw new RangeError("Matrix must be two dimensional (size: "+Te(i)+")");var a,o,s,u=i[0];if(u!==i[1])throw new RangeError("Matrix must be square (size: "+Te(i)+")");if(d(t)){var c=t.size();if(1===c.length){if(c[0]!==u)throw new RangeError("Dimension mismatch. Matrix columns must match vector length.");for(a=[],s=t._data,o=0;o<u;o++)a[o]=[s[o]];return new n({data:a,size:[u,1],datatype:t._datatype})}if(2===c.length){if(c[0]!==u||1!==c[1])throw new RangeError("Dimension mismatch. Matrix columns must match vector length.");if(h(t)){if(r){for(a=[],s=t._data,o=0;o<u;o++)a[o]=[s[o][0]];return new n({data:a,size:[u,1],datatype:t._datatype})}return t}for(a=[],o=0;o<u;o++)a[o]=[0];for(var f=t._values,l=t._index,m=t._ptr,y=m[1],g=m[0];g<y;g++)a[o=l[g]][0]=f[g];return new n({data:a,size:[u,1],datatype:t._datatype})}throw new RangeError("Dimension mismatch. Matrix columns must match vector length.")}if(p(t)){var v=Pe(t);if(1===v.length){if(v[0]!==u)throw new RangeError("Dimension mismatch. Matrix columns must match vector length.");for(a=[],o=0;o<u;o++)a[o]=[t[o]];return new n({data:a,size:[u,1]})}if(2===v.length){if(v[0]!==u||1!==v[1])throw new RangeError("Dimension mismatch. Matrix columns must match vector length.");for(a=[],o=0;o<u;o++)a[o]=[t[o][0]];return new n({data:a,size:[u,1]})}throw new RangeError("Dimension mismatch. Matrix columns must match vector length.")}}}var vu=en("lsolve",["typed","matrix","divideScalar","multiplyScalar","subtract","equalScalar","DenseMatrix"],(function(e){var n=e.typed,t=e.matrix,r=e.divideScalar,i=e.multiplyScalar,a=e.subtract,o=e.equalScalar,s=e.DenseMatrix,u=gu({DenseMatrix:s});return n("lsolve",{"SparseMatrix, Array | Matrix":function(e,n){return function(e,n){for(var t,c,f=(n=u(e,n,!0))._data,l=e._size[0],p=e._size[1],d=e._values,m=e._index,h=e._ptr,y=[],g=0;g<p;g++){var v=f[g][0]||0;if(o(v,0))y[g]=[0];else{var x=0,b=[],w=[],N=h[g+1];for(c=h[g];c<N;c++)(t=m[c])===g?x=d[c]:t>g&&(b.push(d[c]),w.push(t));if(o(x,0))throw new Error("Linear system cannot be solved since matrix is singular");var S=r(v,x);for(c=0,N=w.length;c<N;c++)t=w[c],f[t]=[a(f[t][0]||0,i(S,b[c]))];y[g]=[S]}}return new s({data:y,size:[l,1]})}(e,n)},"DenseMatrix, Array | Matrix":function(e,n){return c(e,n)},"Array, Array | Matrix":function(e,n){return c(t(e),n).valueOf()}});function c(e,n){for(var t=(n=u(e,n,!0))._data,c=e._size[0],f=e._size[1],l=[],p=e._data,d=0;d<f;d++){var m=t[d][0]||0,h=void 0;if(o(m,0))h=0;else{var y=p[d][d];if(o(y,0))throw new Error("Linear system cannot be solved since matrix is singular");h=r(m,y);for(var g=d+1;g<c;g++)t[g]=[a(t[g][0]||0,i(h,p[g][d]))]}l[d]=[h]}return new s({data:l,size:[c,1]})}})),xu=en("equal",["typed","matrix","equalScalar","DenseMatrix"],(function(e){var n=e.typed,t=e.matrix,r=e.equalScalar,i=e.DenseMatrix,a=io({typed:n}),o=mo({typed:n,DenseMatrix:i}),s=so({typed:n,DenseMatrix:i}),u=eo({typed:n}),c=no({typed:n}),f=n("equal",{"any, any":function(e,n){return null===e?null===n:null===n?null===e:void 0===e?void 0===n:void 0===n?void 0===e:r(e,n)},"SparseMatrix, SparseMatrix":function(e,n){return o(e,n,r)},"SparseMatrix, DenseMatrix":function(e,n){return a(n,e,r,!0)},"DenseMatrix, SparseMatrix":function(e,n){return a(e,n,r,!1)},"DenseMatrix, DenseMatrix":function(e,n){return u(e,n,r)},"Array, Array":function(e,n){return f(t(e),t(n)).valueOf()},"Array, Matrix":function(e,n){return f(t(e),n)},"Matrix, Array":function(e,n){return f(e,t(n))},"SparseMatrix, any":function(e,n){return s(e,n,r,!1)},"DenseMatrix, any":function(e,n){return c(e,n,r,!1)},"any, SparseMatrix":function(e,n){return s(n,e,r,!0)},"any, DenseMatrix":function(e,n){return c(n,e,r,!0)},"Array, any":function(e,n){return c(t(e),n,r,!1).valueOf()},"any, Array":function(e,n){return c(t(n),e,r,!0).valueOf()}});return f})),bu=(en("equal",["typed","equalScalar"],(function(e){var n=e.typed,t=e.equalScalar;return n("equal",{"any, any":function(e,n){return null===e?null===n:null===n?null===e:void 0===e?void 0===n:void 0===n?void 0===e:t(e,n)}})})),en("max",["typed","config","numeric","larger"],(function(e){var n=e.typed,t=e.config,r=e.numeric,i=e.larger;return n("max",{"Array | Matrix":o,"Array | Matrix, number | BigNumber":function(e,n){return ir(e,n.valueOf(),a)},"...":function(e){if(nr(e))throw new TypeError("Scalar values expected in function max");return o(e)}});function a(e,n){try{return i(e,n)?e:n}catch(e){throw eu(e,"max",n)}}function o(e){var n;if(tr(e,(function(e){try{isNaN(e)&&"number"==typeof e?n=NaN:(void 0===n||i(e,n))&&(n=e)}catch(n){throw eu(n,"max",e)}})),void 0===n)throw new Error("Cannot calculate max of an empty array");return"string"==typeof n&&(n=r(n,t.number)),n}}))),wu=en("setCartesian",["typed","size","subset","compareNatural","Index","DenseMatrix"],(function(e){var n=e.typed,t=e.size,r=e.subset,i=e.compareNatural,a=e.Index,o=e.DenseMatrix;return n("setCartesian",{"Array | Matrix, Array | Matrix":function(e,n){var s=[];if(0!==r(t(e),new a(0))&&0!==r(t(n),new a(0))){var u=Ge(Array.isArray(e)?e:e.toArray()).sort(i),c=Ge(Array.isArray(n)?n:n.toArray()).sort(i);s=[];for(var f=0;f<u.length;f++)for(var l=0;l<c.length;l++)s.push([u[f],c[l]])}return Array.isArray(e)&&Array.isArray(n)?s:new o(s)}})})),Nu=en("setSymDifference",["typed","size","concat","subset","setDifference","Index"],(function(e){var n=e.typed,t=e.size,r=e.concat,i=e.subset,a=e.setDifference,o=e.Index;return n("setSymDifference",{"Array | Matrix, Array | Matrix":function(e,n){if(0===i(t(e),new o(0)))return Ge(n);if(0===i(t(n),new o(0)))return Ge(e);var s=Ge(e),u=Ge(n);return r(a(s,u),a(u,s))}})})),Su=en("hypot",["typed","abs","addScalar","divideScalar","multiplyScalar","sqrt","smaller","isPositive"],(function(e){var n=e.typed,t=e.abs,r=e.addScalar,i=e.divideScalar,a=e.multiplyScalar,o=e.sqrt,s=e.smaller,u=e.isPositive,c=n("hypot",{"... number | BigNumber":function(e){for(var n=0,c=0,f=0;f<e.length;f++){var l=t(e[f]);s(c,l)?(n=a(n,a(i(c,l),i(c,l))),n=r(n,1),c=l):n=r(n,u(l)?a(i(l,c),i(l,c)):l)}return a(c,o(n))},Array:function(e){return c.apply(c,Ge(e))},Matrix:function(e){return c.apply(c,Ge(e.toArray()))}});return c}));function Mu(){return(Mu=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}var Du=en("qr",["typed","matrix","zeros","identity","isZero","equal","sign","sqrt","conj","unaryMinus","addScalar","divideScalar","multiplyScalar","subtract","complex"],(function(e){var n=e.typed,t=e.matrix,r=e.zeros,i=e.identity,a=e.isZero,o=e.equal,s=e.sign,u=e.sqrt,c=e.conj,f=e.unaryMinus,l=e.addScalar,p=e.divideScalar,d=e.multiplyScalar,m=e.subtract,h=e.complex;return Mu(n("qr",{DenseMatrix:function(e){return g(e)},SparseMatrix:function(e){return function(e){throw new Error("qr not implemented for sparse matrices yet")}()},Array:function(e){var n=g(t(e));return{Q:n.Q.valueOf(),R:n.R.valueOf()}}}),{_denseQRimpl:y});function y(e){var n,t,h,y=e._size[0],g=e._size[1],v=i([y],"dense"),x=v._data,b=e.clone(),w=b._data,N=r([y],"");for(h=0;h<Math.min(g,y);++h){var S=w[h][h],M=f(o(S,0)?1:s(S)),D=c(M),E=0;for(n=h;n<y;n++)E=l(E,d(w[n][h],c(w[n][h])));var A=d(M,u(E));if(!a(A)){var _=m(S,A);for(N[h]=1,n=h+1;n<y;n++)N[n]=p(w[n][h],_);var O=f(c(p(_,A))),C=void 0;for(t=h;t<g;t++){for(C=0,n=h;n<y;n++)C=l(C,d(c(N[n]),w[n][t]));for(C=d(C,O),n=h;n<y;n++)w[n][t]=d(m(w[n][t],d(N[n],C)),D)}for(n=0;n<y;n++){for(C=0,t=h;t<y;t++)C=l(C,d(x[n][t],N[t]));for(C=d(C,O),t=h;t<y;++t)x[n][t]=p(m(x[n][t],d(C,c(N[t]))),D)}}}return{Q:v,R:b,toString:function(){return"Q: "+this.Q.toString()+"\nR: "+this.R.toString()}}}function g(e){var n=y(e),t=n.R._data;if(e._data.length>0)for(var r="Complex"===t[0][0].type?h(0):0,i=0;i<t.length;++i)for(var a=0;a<i&&a<(t[0]||[]).length;++a)t[i][a]=r;return n}})),Eu=en("distance",["typed","addScalar","subtract","divideScalar","multiplyScalar","unaryMinus","sqrt","abs"],(function(e){var n=e.typed,t=e.addScalar,r=e.subtract,i=e.multiplyScalar,a=e.divideScalar,o=e.unaryMinus,u=e.sqrt,c=e.abs;return n("distance",{"Array, Array, Array":function(e,n,t){if(2===e.length&&2===n.length&&2===t.length){if(!l(e))throw new TypeError("Array with 2 numbers or BigNumbers expected for first argument");if(!l(n))throw new TypeError("Array with 2 numbers or BigNumbers expected for second argument");if(!l(t))throw new TypeError("Array with 2 numbers or BigNumbers expected for third argument");var s=a(r(t[1],t[0]),r(n[1],n[0])),u=i(i(s,s),n[0]),c=o(i(s,n[0])),f=e[1];return y(e[0],e[1],u,c,f)}throw new TypeError("Invalid Arguments: Try again")},"Object, Object, Object":function(e,n,t){if(2===Object.keys(e).length&&2===Object.keys(n).length&&2===Object.keys(t).length){if(!l(e))throw new TypeError("Values of pointX and pointY should be numbers or BigNumbers");if(!l(n))throw new TypeError("Values of lineOnePtX and lineOnePtY should be numbers or BigNumbers");if(!l(t))throw new TypeError("Values of lineTwoPtX and lineTwoPtY should be numbers or BigNumbers");if("pointX"in e&&"pointY"in e&&"lineOnePtX"in n&&"lineOnePtY"in n&&"lineTwoPtX"in t&&"lineTwoPtY"in t){var s=a(r(t.lineTwoPtY,t.lineTwoPtX),r(n.lineOnePtY,n.lineOnePtX)),u=i(i(s,s),n.lineOnePtX),c=o(i(s,n.lineOnePtX)),f=e.pointX;return y(e.pointX,e.pointY,u,c,f)}throw new TypeError("Key names do not match")}throw new TypeError("Invalid Arguments: Try again")},"Array, Array":function(e,n){if(2===e.length&&3===n.length){if(!l(e))throw new TypeError("Array with 2 numbers or BigNumbers expected for first argument");if(!p(n))throw new TypeError("Array with 3 numbers or BigNumbers expected for second argument");return y(e[0],e[1],n[0],n[1],n[2])}if(3===e.length&&6===n.length){if(!p(e))throw new TypeError("Array with 3 numbers or BigNumbers expected for first argument");if(!m(n))throw new TypeError("Array with 6 numbers or BigNumbers expected for second argument");return g(e[0],e[1],e[2],n[0],n[1],n[2],n[3],n[4],n[5])}if(e.length===n.length&&e.length>0){if(!d(e))throw new TypeError("All values of an array should be numbers or BigNumbers");if(!d(n))throw new TypeError("All values of an array should be numbers or BigNumbers");return v(e,n)}throw new TypeError("Invalid Arguments: Try again")},"Object, Object":function(e,n){if(2===Object.keys(e).length&&3===Object.keys(n).length){if(!l(e))throw new TypeError("Values of pointX and pointY should be numbers or BigNumbers");if(!p(n))throw new TypeError("Values of xCoeffLine, yCoeffLine and constant should be numbers or BigNumbers");if("pointX"in e&&"pointY"in e&&"xCoeffLine"in n&&"yCoeffLine"in n&&"constant"in n)return y(e.pointX,e.pointY,n.xCoeffLine,n.yCoeffLine,n.constant);throw new TypeError("Key names do not match")}if(3===Object.keys(e).length&&6===Object.keys(n).length){if(!p(e))throw new TypeError("Values of pointX, pointY and pointZ should be numbers or BigNumbers");if(!m(n))throw new TypeError("Values of x0, y0, z0, a, b and c should be numbers or BigNumbers");if("pointX"in e&&"pointY"in e&&"x0"in n&&"y0"in n&&"z0"in n&&"a"in n&&"b"in n&&"c"in n)return g(e.pointX,e.pointY,e.pointZ,n.x0,n.y0,n.z0,n.a,n.b,n.c);throw new TypeError("Key names do not match")}if(2===Object.keys(e).length&&2===Object.keys(n).length){if(!l(e))throw new TypeError("Values of pointOneX and pointOneY should be numbers or BigNumbers");if(!l(n))throw new TypeError("Values of pointTwoX and pointTwoY should be numbers or BigNumbers");if("pointOneX"in e&&"pointOneY"in e&&"pointTwoX"in n&&"pointTwoY"in n)return v([e.pointOneX,e.pointOneY],[n.pointTwoX,n.pointTwoY]);throw new TypeError("Key names do not match")}if(3===Object.keys(e).length&&3===Object.keys(n).length){if(!p(e))throw new TypeError("Values of pointOneX, pointOneY and pointOneZ should be numbers or BigNumbers");if(!p(n))throw new TypeError("Values of pointTwoX, pointTwoY and pointTwoZ should be numbers or BigNumbers");if("pointOneX"in e&&"pointOneY"in e&&"pointOneZ"in e&&"pointTwoX"in n&&"pointTwoY"in n&&"pointTwoZ"in n)return v([e.pointOneX,e.pointOneY,e.pointOneZ],[n.pointTwoX,n.pointTwoY,n.pointTwoZ]);throw new TypeError("Key names do not match")}throw new TypeError("Invalid Arguments: Try again")},Array:function(e){if(!function(e){if(2===e[0].length&&f(e[0][0])&&f(e[0][1])){if(e.some((function(e){return 2!==e.length||!f(e[0])||!f(e[1])})))return!1}else{if(!(3===e[0].length&&f(e[0][0])&&f(e[0][1])&&f(e[0][2])))return!1;if(e.some((function(e){return 3!==e.length||!f(e[0])||!f(e[1])||!f(e[2])})))return!1}return!0}(e))throw new TypeError("Incorrect array format entered for pairwise distance calculation");return function(e){for(var n=[],t=[],r=[],i=0;i<e.length-1;i++)for(var a=i+1;a<e.length;a++)2===e[0].length?(t=[e[i][0],e[i][1]],r=[e[a][0],e[a][1]]):3===e[0].length&&(t=[e[i][0],e[i][1],e[i][2]],r=[e[a][0],e[a][1],e[a][2]]),n.push(v(t,r));return n}(e)}});function f(e){return"number"==typeof e||s(e)}function l(e){return e.constructor!==Array&&(e=h(e)),f(e[0])&&f(e[1])}function p(e){return e.constructor!==Array&&(e=h(e)),f(e[0])&&f(e[1])&&f(e[2])}function d(e){return Array.isArray(e)||(e=h(e)),e.every(f)}function m(e){return e.constructor!==Array&&(e=h(e)),f(e[0])&&f(e[1])&&f(e[2])&&f(e[3])&&f(e[4])&&f(e[5])}function h(e){for(var n=Object.keys(e),t=[],r=0;r<n.length;r++)t.push(e[n[r]]);return t}function y(e,n,r,o,s){var f=c(t(t(i(r,e),i(o,n)),s)),l=u(t(i(r,r),i(o,o)));return a(f,l)}function g(e,n,o,s,c,f,l,p,d){var m=[r(i(r(c,n),d),i(r(f,o),p)),r(i(r(f,o),l),i(r(s,e),d)),r(i(r(s,e),p),i(r(c,n),l))];m=u(t(t(i(m[0],m[0]),i(m[1],m[1])),i(m[2],m[2])));var h=u(t(t(i(l,l),i(p,p)),i(d,d)));return a(m,h)}function v(e,n){for(var a=e.length,o=0,s=0,c=0;c<a;c++)s=r(e[c],n[c]),o=t(i(s,s),o);return u(o)}})),Au=en("stirlingS2",["typed","addScalar","subtract","multiplyScalar","divideScalar","pow","factorial","combinations","isNegative","isInteger","larger"],(function(e){var n=e.typed,t=e.addScalar,r=e.subtract,i=e.multiplyScalar,a=e.divideScalar,o=e.pow,s=e.factorial,u=e.combinations,c=e.isNegative,f=e.isInteger,l=e.larger;return n("stirlingS2",{"number | BigNumber, number | BigNumber":function(e,n){if(!f(e)||c(e)||!f(n)||c(n))throw new TypeError("Non-negative integer value expected in function stirlingS2");if(l(n,e))throw new TypeError("k must be less than or equal to n in function stirlingS2");for(var p=s(n),d=0,m=0;m<=n;m++){var h=o(-1,r(n,m)),y=u(n,m),g=o(m,e);d=t(d,i(i(y,g),h))}return a(d,p)}})})),_u=en("catalan",["typed","addScalar","divideScalar","multiplyScalar","combinations","isNegative","isInteger"],(function(e){var n=e.typed,t=e.addScalar,r=e.divideScalar,i=e.multiplyScalar,a=e.combinations,o=e.isNegative,s=e.isInteger;return n("catalan",{"number | BigNumber":function(e){if(!s(e)||o(e))throw new TypeError("Non-negative integer value expected in function catalan");return r(a(i(e,2),e),t(e,1))}})})),Ou=en("fix",["typed","Complex","ceil","floor"],(function(e){var n=e.typed,t=e.Complex,r=e.ceil,i=e.floor,a=n("fix",{number:function(e){return e>0?i(e):r(e)},Complex:function(e){return new t(e.re>0?Math.floor(e.re):Math.ceil(e.re),e.im>0?Math.floor(e.im):Math.ceil(e.im))},BigNumber:function(e){return e.isNegative()?r(e):i(e)},Fraction:function(e){return e.s<0?e.ceil():e.floor()},"Array | Matrix":function(e){return rr(e,a,!0)}});return a})),Cu=en("range",["typed","config","?matrix","?bignumber","smaller","smallerEq","larger","largerEq"],(function(e){var n=e.typed,t=e.config,r=e.matrix,i=e.bignumber,a=e.smaller,o=e.smallerEq,s=e.larger,u=e.largerEq;return n("range",{string:f,"string, boolean":f,"number, number":function(e,n){return c(l(e,n,1))},"number, number, number":function(e,n,t){return c(l(e,n,t))},"number, number, boolean":function(e,n,t){return c(t?p(e,n,1):l(e,n,1))},"number, number, number, boolean":function(e,n,t,r){return c(r?p(e,n,t):l(e,n,t))},"BigNumber, BigNumber":function(e,n){return c(d(e,n,new(0,e.constructor)(1)))},"BigNumber, BigNumber, BigNumber":function(e,n,t){return c(d(e,n,t))},"BigNumber, BigNumber, boolean":function(e,n,t){var r=e.constructor;return c(t?m(e,n,new r(1)):d(e,n,new r(1)))},"BigNumber, BigNumber, BigNumber, boolean":function(e,n,t,r){return c(r?m(e,n,t):d(e,n,t))}});function c(e){return"Matrix"===t.matrix?r?r(e):Do():e}function f(e,n){var r=function(e){var n=e.split(":").map((function(e){return Number(e)}));if(n.some((function(e){return isNaN(e)})))return null;switch(n.length){case 2:return{start:n[0],end:n[1],step:1};case 3:return{start:n[0],end:n[2],step:n[1]};default:return null}}(e);if(!r)throw new SyntaxError('String "'+e+'" is no valid range');return"BigNumber"===t.number?(void 0===i&&So(),c((n?m:d)(i(r.start),i(r.end),i(r.step)))):c((n?p:l)(r.start,r.end,r.step))}function l(e,n,t){var r=[],i=e;if(t>0)for(;a(i,n);)r.push(i),i+=t;else if(t<0)for(;s(i,n);)r.push(i),i+=t;return r}function p(e,n,t){var r=[],i=e;if(t>0)for(;o(i,n);)r.push(i),i+=t;else if(t<0)for(;u(i,n);)r.push(i),i+=t;return r}function d(e,n,t){var r=i(0),o=[],u=e;if(t.gt(r))for(;a(u,n);)o.push(u),u=u.plus(t);else if(t.lt(r))for(;s(u,n);)o.push(u),u=u.plus(t);return o}function m(e,n,t){var r=i(0),a=[],s=e;if(t.gt(r))for(;o(s,n);)a.push(s),s=s.plus(t);else if(t.lt(r))for(;u(s,n);)a.push(s),s=s.plus(t);return a}})),Tu=en("prod",["typed","config","multiplyScalar","numeric"],(function(e){var n=e.typed,t=e.config,r=e.multiplyScalar,i=e.numeric;return n("prod",{"Array | Matrix":a,"Array | Matrix, number | BigNumber":function(e,n){throw new Error("prod(A, dim) is not yet supported")},"...":function(e){return a(e)}});function a(e){var n;if(tr(e,(function(e){try{n=void 0===n?e:r(n,e)}catch(n){throw eu(n,"prod",e)}})),"string"==typeof n&&(n=i(n,t.number)),void 0===n)throw new Error("Cannot calculate prod of an empty array");return n}})),Iu=en("dotDivide",["typed","matrix","equalScalar","divideScalar","DenseMatrix"],(function(e){var n=e.typed,t=e.matrix,r=e.equalScalar,i=e.divideScalar,a=e.DenseMatrix,o=ro({typed:n,equalScalar:r}),s=io({typed:n}),u=mo({typed:n,DenseMatrix:a}),c=oo({typed:n,equalScalar:r}),f=so({typed:n,DenseMatrix:a}),l=eo({typed:n}),p=no({typed:n}),d=n("dotDivide",{"any, any":i,"SparseMatrix, SparseMatrix":function(e,n){return u(e,n,i,!1)},"SparseMatrix, DenseMatrix":function(e,n){return o(n,e,i,!0)},"DenseMatrix, SparseMatrix":function(e,n){return s(e,n,i,!1)},"DenseMatrix, DenseMatrix":function(e,n){return l(e,n,i)},"Array, Array":function(e,n){return d(t(e),t(n)).valueOf()},"Array, Matrix":function(e,n){return d(t(e),n)},"Matrix, Array":function(e,n){return d(e,t(n))},"SparseMatrix, any":function(e,n){return c(e,n,i,!1)},"DenseMatrix, any":function(e,n){return p(e,n,i,!1)},"any, SparseMatrix":function(e,n){return f(n,e,i,!0)},"any, DenseMatrix":function(e,n){return p(n,e,i,!0)},"Array, any":function(e,n){return p(t(e),n,i,!1).valueOf()},"any, Array":function(e,n){return p(t(n),e,i,!0).valueOf()}});return d})),ku=en("deepEqual",["typed","equal"],(function(e){var n=e.typed,t=e.equal;return n("deepEqual",{"any, any":function(e,n){return function e(n,r){if(Array.isArray(n)){if(Array.isArray(r)){var i=n.length;if(i!==r.length)return!1;for(var a=0;a<i;a++)if(!e(n[a],r[a]))return!1;return!0}return!1}return!Array.isArray(r)&&t(n,r)}(e.valueOf(),n.valueOf())}})}));function Bu(e){return(Bu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function qu(){return(qu=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function Ru(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function Pu(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Ru(Object(t),!0).forEach((function(n){zu(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ru(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function zu(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var Fu=en("Unit",["?on","config","addScalar","subtract","multiplyScalar","divideScalar","pow","abs","fix","round","equal","isNumeric","format","number","Complex","BigNumber","Fraction"],(function(e){var n,t,r,i=e.on,a=e.config,o=e.addScalar,s=e.subtract,c=e.multiplyScalar,l=e.divideScalar,p=e.pow,d=e.abs,m=e.fix,h=e.round,y=e.equal,g=e.isNumeric,v=e.format,x=e.number,b=e.Complex,w=e.BigNumber,N=e.Fraction,S=x;function M(e,n){if(!(this instanceof M))throw new Error("Constructor must be called with the new operator");if(null!=e&&!g(e)&&!u(e))throw new TypeError("First parameter in Unit constructor must be number, BigNumber, Fraction, Complex, or undefined");if(void 0!==n&&("string"!=typeof n||""===n))throw new TypeError("Second parameter in Unit constructor must be a string");if(void 0!==n){var t=M.parse(n);this.units=t.units,this.dimensions=t.dimensions}else{this.units=[{unit:z,prefix:B.NONE,power:0}],this.dimensions=[];for(var r=0;r<q.length;r++)this.dimensions[r]=0}this.value=null!=e?this._normalize(e):null,this.fixPrefix=!1,this.skipAutomaticSimplification=!0}function D(){for(;" "===r||"\t"===r;)A()}function E(e){return e>="0"&&e<="9"}function A(){t++,r=n.charAt(t)}function _(e){t=e,r=n.charAt(t)}function O(){var e="",n=t;if("+"===r?A():"-"===r&&(e+=r,A()),!function(e){return e>="0"&&e<="9"||"."===e}(r))return _(n),null;if("."===r){if(e+=r,A(),!E(r))return _(n),null}else{for(;E(r);)e+=r,A();"."===r&&(e+=r,A())}for(;E(r);)e+=r,A();if("E"===r||"e"===r){var i="",a=t;if(i+=r,A(),"+"!==r&&"-"!==r||(i+=r,A()),!E(r))return _(a),e;for(e+=i;E(r);)e+=r,A()}return e}function C(){for(var e="",i=n.charCodeAt(t);i>=48&&i<=57||i>=65&&i<=90||i>=97&&i<=122;)e+=r,A(),i=n.charCodeAt(t);return((i=e.charCodeAt(0))>=65&&i<=90||i>=97&&i<=122)&&e||null}function T(e){return r===e?(A(),e):null}function I(e){if(Q(F,e)){var n=F[e];return{unit:n,prefix:n.prefixes[""]}}for(var t in F)if(Q(F,t)&&Ce(e,t)){var r=F[t],i=e.length-t.length,a=e.substring(0,i),o=Q(r.prefixes,a)?r.prefixes[a]:void 0;if(void 0!==o)return{unit:r,prefix:o}}return null}function k(e){return e.equalBase(R.NONE)&&null!==e.value&&!a.predictable?e.value:e}M.prototype.type="Unit",M.prototype.isUnit=!0,M.parse=function(e,i){if(i=i||{},t=-1,r="","string"!=typeof(n=e))throw new TypeError("Invalid argument in Unit.parse, string expected");var o=new M;o.units=[];var s=1,u=!1;A(),D();var c=O(),f=null;if(c){if("BigNumber"===a.number)f=new w(c);else if("Fraction"===a.number)try{f=new N(c)}catch(e){f=parseFloat(c)}else f=parseFloat(c);D(),T("*")?(s=1,u=!0):T("/")&&(s=-1,u=!0)}for(var l=[],p=1;;){for(D();"("===r;)l.push(s),p*=s,s=1,A(),D();var d=void 0;if(!r)break;var m=r;if(null===(d=C()))throw new SyntaxError('Unexpected "'+m+'" in "'+n+'" at index '+t.toString());var h=I(d);if(null===h)throw new SyntaxError('Unit "'+d+'" not found.');var y=s*p;if(D(),T("^")){D();var g=O();if(null===g)throw new SyntaxError('In "'+e+'", "^" must be followed by a floating-point number');y*=g}o.units.push({unit:h.unit,prefix:h.prefix,power:y});for(var v=0;v<q.length;v++)o.dimensions[v]+=(h.unit.dimensions[v]||0)*y;for(D();")"===r;){if(0===l.length)throw new SyntaxError('Unmatched ")" in "'+n+'" at index '+t.toString());p/=l.pop(),A(),D()}if(u=!1,T("*")?(s=1,u=!0):T("/")?(s=-1,u=!0):s=1,h.unit.base){var x=h.unit.base.key;L.auto[x]={unit:h.unit,prefix:h.prefix}}}if(D(),r)throw new SyntaxError('Could not parse: "'+e+'"');if(u)throw new SyntaxError('Trailing characters: "'+e+'"');if(0!==l.length)throw new SyntaxError('Unmatched "(" in "'+n+'"');if(0===o.units.length&&!i.allowNoUnits)throw new SyntaxError('"'+e+'" contains no units');return o.value=void 0!==f?o._normalize(f):null,o},M.prototype.clone=function(){var e=new M;e.fixPrefix=this.fixPrefix,e.skipAutomaticSimplification=this.skipAutomaticSimplification,e.value=V(this.value),e.dimensions=this.dimensions.slice(0),e.units=[];for(var n=0;n<this.units.length;n++)for(var t in e.units[n]={},this.units[n])Q(this.units[n],t)&&(e.units[n][t]=this.units[n][t]);return e},M.prototype._isDerived=function(){return 0!==this.units.length&&(this.units.length>1||Math.abs(this.units[0].power-1)>1e-15)},M.prototype._normalize=function(e){var n,t,r,i,a;if(null==e||0===this.units.length)return e;if(this._isDerived()){var s=e;a=M._getNumberConverter(G(e));for(var u=0;u<this.units.length;u++)n=a(this.units[u].unit.value),i=a(this.units[u].prefix.value),r=a(this.units[u].power),s=c(s,p(c(n,i),r));return s}return n=(a=M._getNumberConverter(G(e)))(this.units[0].unit.value),t=a(this.units[0].unit.offset),i=a(this.units[0].prefix.value),c(o(e,t),c(n,i))},M.prototype._denormalize=function(e,n){var t,r,i,a,o;if(null==e||0===this.units.length)return e;if(this._isDerived()){var u=e;o=M._getNumberConverter(G(e));for(var f=0;f<this.units.length;f++)t=o(this.units[f].unit.value),a=o(this.units[f].prefix.value),i=o(this.units[f].power),u=l(u,p(c(t,a),i));return u}return t=(o=M._getNumberConverter(G(e)))(this.units[0].unit.value),a=o(this.units[0].prefix.value),r=o(this.units[0].unit.offset),s(l(l(e,t),null==n?a:n),r)},M.isValuelessUnit=function(e){return null!==I(e)},M.prototype.hasBase=function(e){if("string"==typeof e&&(e=R[e]),!e)return!1;for(var n=0;n<q.length;n++)if(Math.abs((this.dimensions[n]||0)-(e.dimensions[n]||0))>1e-12)return!1;return!0},M.prototype.equalBase=function(e){for(var n=0;n<q.length;n++)if(Math.abs((this.dimensions[n]||0)-(e.dimensions[n]||0))>1e-12)return!1;return!0},M.prototype.equals=function(e){return this.equalBase(e)&&y(this.value,e.value)},M.prototype.multiply=function(e){for(var n=this.clone(),t=0;t<q.length;t++)n.dimensions[t]=(this.dimensions[t]||0)+(e.dimensions[t]||0);for(var r=0;r<e.units.length;r++){var i=Pu({},e.units[r]);n.units.push(i)}if(null!==this.value||null!==e.value){var a=null===this.value?this._normalize(1):this.value,o=null===e.value?e._normalize(1):e.value;n.value=c(a,o)}else n.value=null;return n.skipAutomaticSimplification=!1,k(n)},M.prototype.divide=function(e){for(var n=this.clone(),t=0;t<q.length;t++)n.dimensions[t]=(this.dimensions[t]||0)-(e.dimensions[t]||0);for(var r=0;r<e.units.length;r++){var i=Pu(Pu({},e.units[r]),{},{power:-e.units[r].power});n.units.push(i)}if(null!==this.value||null!==e.value){var a=null===this.value?this._normalize(1):this.value,o=null===e.value?e._normalize(1):e.value;n.value=l(a,o)}else n.value=null;return n.skipAutomaticSimplification=!1,k(n)},M.prototype.pow=function(e){for(var n=this.clone(),t=0;t<q.length;t++)n.dimensions[t]=(this.dimensions[t]||0)*e;for(var r=0;r<n.units.length;r++)n.units[r].power*=e;return null!==n.value?n.value=p(n.value,e):n.value=null,n.skipAutomaticSimplification=!1,k(n)},M.prototype.abs=function(){var e=this.clone();for(var n in e.value=null!==e.value?d(e.value):null,e.units)"VA"!==e.units[n].unit.name&&"VAR"!==e.units[n].unit.name||(e.units[n].unit=F.W);return e},M.prototype.to=function(e){var n,t=null===this.value?this._normalize(1):this.value;if("string"==typeof e){if(n=M.parse(e),!this.equalBase(n))throw new Error("Units do not match ('".concat(n.toString(),"' != '").concat(this.toString(),"')"));if(null!==n.value)throw new Error("Cannot convert to a unit with a value");return n.value=V(t),n.fixPrefix=!0,n.skipAutomaticSimplification=!0,n}if(f(e)){if(!this.equalBase(e))throw new Error("Units do not match ('".concat(e.toString(),"' != '").concat(this.toString(),"')"));if(null!==e.value)throw new Error("Cannot convert to a unit with a value");return(n=e.clone()).value=V(t),n.fixPrefix=!0,n.skipAutomaticSimplification=!0,n}throw new Error("String or Unit expected as parameter")},M.prototype.toNumber=function(e){return S(this.toNumeric(e))},M.prototype.toNumeric=function(e){var n;return(n=e?this.to(e):this.clone())._isDerived()||0===n.units.length?n._denormalize(n.value):n._denormalize(n.value,n.units[0].prefix.value)},M.prototype.toString=function(){return this.format()},M.prototype.toJSON=function(){return{mathjs:"Unit",value:this._denormalize(this.value),unit:this.formatUnits(),fixPrefix:this.fixPrefix}},M.fromJSON=function(e){var n=new M(e.value,e.unit);return n.fixPrefix=e.fixPrefix||!1,n},M.prototype.valueOf=M.prototype.toString,M.prototype.simplify=function(){var e,n,t=this.clone(),r=[];for(var i in H)if(Q(H,i)&&t.hasBase(R[i])){e=i;break}if("NONE"===e)t.units=[];else if(e&&Q(H,e)&&(n=H[e]),n)t.units=[{unit:n.unit,prefix:n.prefix,power:1}];else{for(var a=!1,o=0;o<q.length;o++){var s=q[o];Math.abs(t.dimensions[o]||0)>1e-12&&(Q(H,s)?r.push({unit:H[s].unit,prefix:H[s].prefix,power:t.dimensions[o]||0}):a=!0)}r.length<t.units.length&&!a&&(t.units=r)}return t},M.prototype.toSI=function(){for(var e=this.clone(),n=[],t=0;t<q.length;t++){var r=q[t];if(Math.abs(e.dimensions[t]||0)>1e-12){if(!Q(L.si,r))throw new Error("Cannot express custom unit "+r+" in SI units");n.push({unit:L.si[r].unit,prefix:L.si[r].prefix,power:e.dimensions[t]||0})}}return e.units=n,e.fixPrefix=!0,e.skipAutomaticSimplification=!0,e},M.prototype.formatUnits=function(){for(var e="",n="",t=0,r=0,i=0;i<this.units.length;i++)this.units[i].power>0?(t++,e+=" "+this.units[i].prefix.name+this.units[i].unit.name,Math.abs(this.units[i].power-1)>1e-15&&(e+="^"+this.units[i].power)):this.units[i].power<0&&r++;if(r>0)for(var a=0;a<this.units.length;a++)this.units[a].power<0&&(t>0?(n+=" "+this.units[a].prefix.name+this.units[a].unit.name,Math.abs(this.units[a].power+1)>1e-15&&(n+="^"+-this.units[a].power)):(n+=" "+this.units[a].prefix.name+this.units[a].unit.name,n+="^"+this.units[a].power));e=e.substr(1),n=n.substr(1),t>1&&r>0&&(e="("+e+")"),r>1&&t>0&&(n="("+n+")");var o=e;return t>0&&r>0&&(o+=" / "),o+=n},M.prototype.format=function(e){var n=this.skipAutomaticSimplification||null===this.value?this.clone():this.simplify(),t=!1;for(var r in void 0!==n.value&&null!==n.value&&u(n.value)&&(t=Math.abs(n.value.re)<1e-14),n.units)Q(n.units,r)&&n.units[r].unit&&("VA"===n.units[r].unit.name&&t?n.units[r].unit=F.VAR:"VAR"!==n.units[r].unit.name||t||(n.units[r].unit=F.VA));1!==n.units.length||n.fixPrefix||Math.abs(n.units[0].power-Math.round(n.units[0].power))<1e-14&&(n.units[0].prefix=n._bestPrefix());var i=n._denormalize(n.value),a=null!==n.value?v(i,e||{}):"",o=n.formatUnits();return n.value&&u(n.value)&&(a="("+a+")"),o.length>0&&a.length>0&&(a+=" "),a+=o},M.prototype._bestPrefix=function(){if(1!==this.units.length)throw new Error("Can only compute the best prefix for single units with integer powers, like kg, s^2, N^-1, and so forth!");if(Math.abs(this.units[0].power-Math.round(this.units[0].power))>=1e-14)throw new Error("Can only compute the best prefix for single units with integer powers, like kg, s^2, N^-1, and so forth!");var e=null!==this.value?d(this.value):0,n=d(this.units[0].unit.value),t=this.units[0].prefix;if(0===e)return t;var r=this.units[0].power,i=Math.log(e/Math.pow(t.value*n,r))/Math.LN10-1.2;if(i>-2.200001&&i<1.800001)return t;i=Math.abs(i);var a=this.units[0].unit.prefixes;for(var o in a)if(Q(a,o)){var s=a[o];if(s.scientific){var u=Math.abs(Math.log(e/Math.pow(s.value*n,r))/Math.LN10-1.2);(u<i||u===i&&s.name.length<t.name.length)&&(t=s,i=u)}}return t},M.prototype.splitUnit=function(e){for(var n=this.clone(),t=[],r=0;r<e.length&&(n=n.to(e[r]),r!==e.length-1);r++){var i=n.toNumeric(),a=h(i),u=new M(y(a,i)?a:m(n.toNumeric()),e[r].toString());t.push(u),n=s(n,u)}for(var c=0,f=0;f<t.length;f++)c=o(c,t[f].value);return y(c,this.value)&&(n.value=0),t.push(n),t};var B={NONE:{"":{name:"",value:1,scientific:!0}},SHORT:{"":{name:"",value:1,scientific:!0},da:{name:"da",value:10,scientific:!1},h:{name:"h",value:100,scientific:!1},k:{name:"k",value:1e3,scientific:!0},M:{name:"M",value:1e6,scientific:!0},G:{name:"G",value:1e9,scientific:!0},T:{name:"T",value:1e12,scientific:!0},P:{name:"P",value:1e15,scientific:!0},E:{name:"E",value:1e18,scientific:!0},Z:{name:"Z",value:1e21,scientific:!0},Y:{name:"Y",value:1e24,scientific:!0},d:{name:"d",value:.1,scientific:!1},c:{name:"c",value:.01,scientific:!1},m:{name:"m",value:.001,scientific:!0},u:{name:"u",value:1e-6,scientific:!0},n:{name:"n",value:1e-9,scientific:!0},p:{name:"p",value:1e-12,scientific:!0},f:{name:"f",value:1e-15,scientific:!0},a:{name:"a",value:1e-18,scientific:!0},z:{name:"z",value:1e-21,scientific:!0},y:{name:"y",value:1e-24,scientific:!0}},LONG:{"":{name:"",value:1,scientific:!0},deca:{name:"deca",value:10,scientific:!1},hecto:{name:"hecto",value:100,scientific:!1},kilo:{name:"kilo",value:1e3,scientific:!0},mega:{name:"mega",value:1e6,scientific:!0},giga:{name:"giga",value:1e9,scientific:!0},tera:{name:"tera",value:1e12,scientific:!0},peta:{name:"peta",value:1e15,scientific:!0},exa:{name:"exa",value:1e18,scientific:!0},zetta:{name:"zetta",value:1e21,scientific:!0},yotta:{name:"yotta",value:1e24,scientific:!0},deci:{name:"deci",value:.1,scientific:!1},centi:{name:"centi",value:.01,scientific:!1},milli:{name:"milli",value:.001,scientific:!0},micro:{name:"micro",value:1e-6,scientific:!0},nano:{name:"nano",value:1e-9,scientific:!0},pico:{name:"pico",value:1e-12,scientific:!0},femto:{name:"femto",value:1e-15,scientific:!0},atto:{name:"atto",value:1e-18,scientific:!0},zepto:{name:"zepto",value:1e-21,scientific:!0},yocto:{name:"yocto",value:1e-24,scientific:!0}},SQUARED:{"":{name:"",value:1,scientific:!0},da:{name:"da",value:100,scientific:!1},h:{name:"h",value:1e4,scientific:!1},k:{name:"k",value:1e6,scientific:!0},M:{name:"M",value:1e12,scientific:!0},G:{name:"G",value:1e18,scientific:!0},T:{name:"T",value:1e24,scientific:!0},P:{name:"P",value:1e30,scientific:!0},E:{name:"E",value:1e36,scientific:!0},Z:{name:"Z",value:1e42,scientific:!0},Y:{name:"Y",value:1e48,scientific:!0},d:{name:"d",value:.01,scientific:!1},c:{name:"c",value:1e-4,scientific:!1},m:{name:"m",value:1e-6,scientific:!0},u:{name:"u",value:1e-12,scientific:!0},n:{name:"n",value:1e-18,scientific:!0},p:{name:"p",value:1e-24,scientific:!0},f:{name:"f",value:1e-30,scientific:!0},a:{name:"a",value:1e-36,scientific:!0},z:{name:"z",value:1e-42,scientific:!0},y:{name:"y",value:1e-48,scientific:!0}},CUBIC:{"":{name:"",value:1,scientific:!0},da:{name:"da",value:1e3,scientific:!1},h:{name:"h",value:1e6,scientific:!1},k:{name:"k",value:1e9,scientific:!0},M:{name:"M",value:1e18,scientific:!0},G:{name:"G",value:1e27,scientific:!0},T:{name:"T",value:1e36,scientific:!0},P:{name:"P",value:1e45,scientific:!0},E:{name:"E",value:1e54,scientific:!0},Z:{name:"Z",value:1e63,scientific:!0},Y:{name:"Y",value:1e72,scientific:!0},d:{name:"d",value:.001,scientific:!1},c:{name:"c",value:1e-6,scientific:!1},m:{name:"m",value:1e-9,scientific:!0},u:{name:"u",value:1e-18,scientific:!0},n:{name:"n",value:1e-27,scientific:!0},p:{name:"p",value:1e-36,scientific:!0},f:{name:"f",value:1e-45,scientific:!0},a:{name:"a",value:1e-54,scientific:!0},z:{name:"z",value:1e-63,scientific:!0},y:{name:"y",value:1e-72,scientific:!0}},BINARY_SHORT_SI:{"":{name:"",value:1,scientific:!0},k:{name:"k",value:1e3,scientific:!0},M:{name:"M",value:1e6,scientific:!0},G:{name:"G",value:1e9,scientific:!0},T:{name:"T",value:1e12,scientific:!0},P:{name:"P",value:1e15,scientific:!0},E:{name:"E",value:1e18,scientific:!0},Z:{name:"Z",value:1e21,scientific:!0},Y:{name:"Y",value:1e24,scientific:!0}},BINARY_SHORT_IEC:{"":{name:"",value:1,scientific:!0},Ki:{name:"Ki",value:1024,scientific:!0},Mi:{name:"Mi",value:Math.pow(1024,2),scientific:!0},Gi:{name:"Gi",value:Math.pow(1024,3),scientific:!0},Ti:{name:"Ti",value:Math.pow(1024,4),scientific:!0},Pi:{name:"Pi",value:Math.pow(1024,5),scientific:!0},Ei:{name:"Ei",value:Math.pow(1024,6),scientific:!0},Zi:{name:"Zi",value:Math.pow(1024,7),scientific:!0},Yi:{name:"Yi",value:Math.pow(1024,8),scientific:!0}},BINARY_LONG_SI:{"":{name:"",value:1,scientific:!0},kilo:{name:"kilo",value:1e3,scientific:!0},mega:{name:"mega",value:1e6,scientific:!0},giga:{name:"giga",value:1e9,scientific:!0},tera:{name:"tera",value:1e12,scientific:!0},peta:{name:"peta",value:1e15,scientific:!0},exa:{name:"exa",value:1e18,scientific:!0},zetta:{name:"zetta",value:1e21,scientific:!0},yotta:{name:"yotta",value:1e24,scientific:!0}},BINARY_LONG_IEC:{"":{name:"",value:1,scientific:!0},kibi:{name:"kibi",value:1024,scientific:!0},mebi:{name:"mebi",value:Math.pow(1024,2),scientific:!0},gibi:{name:"gibi",value:Math.pow(1024,3),scientific:!0},tebi:{name:"tebi",value:Math.pow(1024,4),scientific:!0},pebi:{name:"pebi",value:Math.pow(1024,5),scientific:!0},exi:{name:"exi",value:Math.pow(1024,6),scientific:!0},zebi:{name:"zebi",value:Math.pow(1024,7),scientific:!0},yobi:{name:"yobi",value:Math.pow(1024,8),scientific:!0}},BTU:{"":{name:"",value:1,scientific:!0},MM:{name:"MM",value:1e6,scientific:!0}}};B.SHORTLONG=qu({},B.SHORT,B.LONG),B.BINARY_SHORT=qu({},B.BINARY_SHORT_SI,B.BINARY_SHORT_IEC),B.BINARY_LONG=qu({},B.BINARY_LONG_SI,B.BINARY_LONG_IEC);var q=["MASS","LENGTH","TIME","CURRENT","TEMPERATURE","LUMINOUS_INTENSITY","AMOUNT_OF_SUBSTANCE","ANGLE","BIT"],R={NONE:{dimensions:[0,0,0,0,0,0,0,0,0]},MASS:{dimensions:[1,0,0,0,0,0,0,0,0]},LENGTH:{dimensions:[0,1,0,0,0,0,0,0,0]},TIME:{dimensions:[0,0,1,0,0,0,0,0,0]},CURRENT:{dimensions:[0,0,0,1,0,0,0,0,0]},TEMPERATURE:{dimensions:[0,0,0,0,1,0,0,0,0]},LUMINOUS_INTENSITY:{dimensions:[0,0,0,0,0,1,0,0,0]},AMOUNT_OF_SUBSTANCE:{dimensions:[0,0,0,0,0,0,1,0,0]},FORCE:{dimensions:[1,1,-2,0,0,0,0,0,0]},SURFACE:{dimensions:[0,2,0,0,0,0,0,0,0]},VOLUME:{dimensions:[0,3,0,0,0,0,0,0,0]},ENERGY:{dimensions:[1,2,-2,0,0,0,0,0,0]},POWER:{dimensions:[1,2,-3,0,0,0,0,0,0]},PRESSURE:{dimensions:[1,-1,-2,0,0,0,0,0,0]},ELECTRIC_CHARGE:{dimensions:[0,0,1,1,0,0,0,0,0]},ELECTRIC_CAPACITANCE:{dimensions:[-1,-2,4,2,0,0,0,0,0]},ELECTRIC_POTENTIAL:{dimensions:[1,2,-3,-1,0,0,0,0,0]},ELECTRIC_RESISTANCE:{dimensions:[1,2,-3,-2,0,0,0,0,0]},ELECTRIC_INDUCTANCE:{dimensions:[1,2,-2,-2,0,0,0,0,0]},ELECTRIC_CONDUCTANCE:{dimensions:[-1,-2,3,2,0,0,0,0,0]},MAGNETIC_FLUX:{dimensions:[1,2,-2,-1,0,0,0,0,0]},MAGNETIC_FLUX_DENSITY:{dimensions:[1,0,-2,-1,0,0,0,0,0]},FREQUENCY:{dimensions:[0,0,-1,0,0,0,0,0,0]},ANGLE:{dimensions:[0,0,0,0,0,0,0,1,0]},BIT:{dimensions:[0,0,0,0,0,0,0,0,1]}};for(var P in R)Q(R,P)&&(R[P].key=P);var z={name:"",base:{},value:1,offset:0,dimensions:q.map((function(e){return 0}))},F={meter:{name:"meter",base:R.LENGTH,prefixes:B.LONG,value:1,offset:0},inch:{name:"inch",base:R.LENGTH,prefixes:B.NONE,value:.0254,offset:0},foot:{name:"foot",base:R.LENGTH,prefixes:B.NONE,value:.3048,offset:0},yard:{name:"yard",base:R.LENGTH,prefixes:B.NONE,value:.9144,offset:0},mile:{name:"mile",base:R.LENGTH,prefixes:B.NONE,value:1609.344,offset:0},link:{name:"link",base:R.LENGTH,prefixes:B.NONE,value:.201168,offset:0},rod:{name:"rod",base:R.LENGTH,prefixes:B.NONE,value:5.0292,offset:0},chain:{name:"chain",base:R.LENGTH,prefixes:B.NONE,value:20.1168,offset:0},angstrom:{name:"angstrom",base:R.LENGTH,prefixes:B.NONE,value:1e-10,offset:0},m:{name:"m",base:R.LENGTH,prefixes:B.SHORT,value:1,offset:0},in:{name:"in",base:R.LENGTH,prefixes:B.NONE,value:.0254,offset:0},ft:{name:"ft",base:R.LENGTH,prefixes:B.NONE,value:.3048,offset:0},yd:{name:"yd",base:R.LENGTH,prefixes:B.NONE,value:.9144,offset:0},mi:{name:"mi",base:R.LENGTH,prefixes:B.NONE,value:1609.344,offset:0},li:{name:"li",base:R.LENGTH,prefixes:B.NONE,value:.201168,offset:0},rd:{name:"rd",base:R.LENGTH,prefixes:B.NONE,value:5.02921,offset:0},ch:{name:"ch",base:R.LENGTH,prefixes:B.NONE,value:20.1168,offset:0},mil:{name:"mil",base:R.LENGTH,prefixes:B.NONE,value:254e-7,offset:0},m2:{name:"m2",base:R.SURFACE,prefixes:B.SQUARED,value:1,offset:0},sqin:{name:"sqin",base:R.SURFACE,prefixes:B.NONE,value:64516e-8,offset:0},sqft:{name:"sqft",base:R.SURFACE,prefixes:B.NONE,value:.09290304,offset:0},sqyd:{name:"sqyd",base:R.SURFACE,prefixes:B.NONE,value:.83612736,offset:0},sqmi:{name:"sqmi",base:R.SURFACE,prefixes:B.NONE,value:2589988.110336,offset:0},sqrd:{name:"sqrd",base:R.SURFACE,prefixes:B.NONE,value:25.29295,offset:0},sqch:{name:"sqch",base:R.SURFACE,prefixes:B.NONE,value:404.6873,offset:0},sqmil:{name:"sqmil",base:R.SURFACE,prefixes:B.NONE,value:6.4516e-10,offset:0},acre:{name:"acre",base:R.SURFACE,prefixes:B.NONE,value:4046.86,offset:0},hectare:{name:"hectare",base:R.SURFACE,prefixes:B.NONE,value:1e4,offset:0},m3:{name:"m3",base:R.VOLUME,prefixes:B.CUBIC,value:1,offset:0},L:{name:"L",base:R.VOLUME,prefixes:B.SHORT,value:.001,offset:0},l:{name:"l",base:R.VOLUME,prefixes:B.SHORT,value:.001,offset:0},litre:{name:"litre",base:R.VOLUME,prefixes:B.LONG,value:.001,offset:0},cuin:{name:"cuin",base:R.VOLUME,prefixes:B.NONE,value:16387064e-12,offset:0},cuft:{name:"cuft",base:R.VOLUME,prefixes:B.NONE,value:.028316846592,offset:0},cuyd:{name:"cuyd",base:R.VOLUME,prefixes:B.NONE,value:.764554857984,offset:0},teaspoon:{name:"teaspoon",base:R.VOLUME,prefixes:B.NONE,value:5e-6,offset:0},tablespoon:{name:"tablespoon",base:R.VOLUME,prefixes:B.NONE,value:15e-6,offset:0},drop:{name:"drop",base:R.VOLUME,prefixes:B.NONE,value:5e-8,offset:0},gtt:{name:"gtt",base:R.VOLUME,prefixes:B.NONE,value:5e-8,offset:0},minim:{name:"minim",base:R.VOLUME,prefixes:B.NONE,value:6.161152e-8,offset:0},fluiddram:{name:"fluiddram",base:R.VOLUME,prefixes:B.NONE,value:36966911e-13,offset:0},fluidounce:{name:"fluidounce",base:R.VOLUME,prefixes:B.NONE,value:2957353e-11,offset:0},gill:{name:"gill",base:R.VOLUME,prefixes:B.NONE,value:.0001182941,offset:0},cc:{name:"cc",base:R.VOLUME,prefixes:B.NONE,value:1e-6,offset:0},cup:{name:"cup",base:R.VOLUME,prefixes:B.NONE,value:.0002365882,offset:0},pint:{name:"pint",base:R.VOLUME,prefixes:B.NONE,value:.0004731765,offset:0},quart:{name:"quart",base:R.VOLUME,prefixes:B.NONE,value:.0009463529,offset:0},gallon:{name:"gallon",base:R.VOLUME,prefixes:B.NONE,value:.003785412,offset:0},beerbarrel:{name:"beerbarrel",base:R.VOLUME,prefixes:B.NONE,value:.1173478,offset:0},oilbarrel:{name:"oilbarrel",base:R.VOLUME,prefixes:B.NONE,value:.1589873,offset:0},hogshead:{name:"hogshead",base:R.VOLUME,prefixes:B.NONE,value:.238481,offset:0},fldr:{name:"fldr",base:R.VOLUME,prefixes:B.NONE,value:36966911e-13,offset:0},floz:{name:"floz",base:R.VOLUME,prefixes:B.NONE,value:2957353e-11,offset:0},gi:{name:"gi",base:R.VOLUME,prefixes:B.NONE,value:.0001182941,offset:0},cp:{name:"cp",base:R.VOLUME,prefixes:B.NONE,value:.0002365882,offset:0},pt:{name:"pt",base:R.VOLUME,prefixes:B.NONE,value:.0004731765,offset:0},qt:{name:"qt",base:R.VOLUME,prefixes:B.NONE,value:.0009463529,offset:0},gal:{name:"gal",base:R.VOLUME,prefixes:B.NONE,value:.003785412,offset:0},bbl:{name:"bbl",base:R.VOLUME,prefixes:B.NONE,value:.1173478,offset:0},obl:{name:"obl",base:R.VOLUME,prefixes:B.NONE,value:.1589873,offset:0},g:{name:"g",base:R.MASS,prefixes:B.SHORT,value:.001,offset:0},gram:{name:"gram",base:R.MASS,prefixes:B.LONG,value:.001,offset:0},ton:{name:"ton",base:R.MASS,prefixes:B.SHORT,value:907.18474,offset:0},t:{name:"t",base:R.MASS,prefixes:B.SHORT,value:1e3,offset:0},tonne:{name:"tonne",base:R.MASS,prefixes:B.LONG,value:1e3,offset:0},grain:{name:"grain",base:R.MASS,prefixes:B.NONE,value:6479891e-11,offset:0},dram:{name:"dram",base:R.MASS,prefixes:B.NONE,value:.0017718451953125,offset:0},ounce:{name:"ounce",base:R.MASS,prefixes:B.NONE,value:.028349523125,offset:0},poundmass:{name:"poundmass",base:R.MASS,prefixes:B.NONE,value:.45359237,offset:0},hundredweight:{name:"hundredweight",base:R.MASS,prefixes:B.NONE,value:45.359237,offset:0},stick:{name:"stick",base:R.MASS,prefixes:B.NONE,value:.115,offset:0},stone:{name:"stone",base:R.MASS,prefixes:B.NONE,value:6.35029318,offset:0},gr:{name:"gr",base:R.MASS,prefixes:B.NONE,value:6479891e-11,offset:0},dr:{name:"dr",base:R.MASS,prefixes:B.NONE,value:.0017718451953125,offset:0},oz:{name:"oz",base:R.MASS,prefixes:B.NONE,value:.028349523125,offset:0},lbm:{name:"lbm",base:R.MASS,prefixes:B.NONE,value:.45359237,offset:0},cwt:{name:"cwt",base:R.MASS,prefixes:B.NONE,value:45.359237,offset:0},s:{name:"s",base:R.TIME,prefixes:B.SHORT,value:1,offset:0},min:{name:"min",base:R.TIME,prefixes:B.NONE,value:60,offset:0},h:{name:"h",base:R.TIME,prefixes:B.NONE,value:3600,offset:0},second:{name:"second",base:R.TIME,prefixes:B.LONG,value:1,offset:0},sec:{name:"sec",base:R.TIME,prefixes:B.LONG,value:1,offset:0},minute:{name:"minute",base:R.TIME,prefixes:B.NONE,value:60,offset:0},hour:{name:"hour",base:R.TIME,prefixes:B.NONE,value:3600,offset:0},day:{name:"day",base:R.TIME,prefixes:B.NONE,value:86400,offset:0},week:{name:"week",base:R.TIME,prefixes:B.NONE,value:604800,offset:0},month:{name:"month",base:R.TIME,prefixes:B.NONE,value:2629800,offset:0},year:{name:"year",base:R.TIME,prefixes:B.NONE,value:31557600,offset:0},decade:{name:"decade",base:R.TIME,prefixes:B.NONE,value:315576e3,offset:0},century:{name:"century",base:R.TIME,prefixes:B.NONE,value:315576e4,offset:0},millennium:{name:"millennium",base:R.TIME,prefixes:B.NONE,value:315576e5,offset:0},hertz:{name:"Hertz",base:R.FREQUENCY,prefixes:B.LONG,value:1,offset:0,reciprocal:!0},Hz:{name:"Hz",base:R.FREQUENCY,prefixes:B.SHORT,value:1,offset:0,reciprocal:!0},rad:{name:"rad",base:R.ANGLE,prefixes:B.SHORT,value:1,offset:0},radian:{name:"radian",base:R.ANGLE,prefixes:B.LONG,value:1,offset:0},deg:{name:"deg",base:R.ANGLE,prefixes:B.SHORT,value:null,offset:0},degree:{name:"degree",base:R.ANGLE,prefixes:B.LONG,value:null,offset:0},grad:{name:"grad",base:R.ANGLE,prefixes:B.SHORT,value:null,offset:0},gradian:{name:"gradian",base:R.ANGLE,prefixes:B.LONG,value:null,offset:0},cycle:{name:"cycle",base:R.ANGLE,prefixes:B.NONE,value:null,offset:0},arcsec:{name:"arcsec",base:R.ANGLE,prefixes:B.NONE,value:null,offset:0},arcmin:{name:"arcmin",base:R.ANGLE,prefixes:B.NONE,value:null,offset:0},A:{name:"A",base:R.CURRENT,prefixes:B.SHORT,value:1,offset:0},ampere:{name:"ampere",base:R.CURRENT,prefixes:B.LONG,value:1,offset:0},K:{name:"K",base:R.TEMPERATURE,prefixes:B.NONE,value:1,offset:0},degC:{name:"degC",base:R.TEMPERATURE,prefixes:B.NONE,value:1,offset:273.15},degF:{name:"degF",base:R.TEMPERATURE,prefixes:B.NONE,value:1/1.8,offset:459.67},degR:{name:"degR",base:R.TEMPERATURE,prefixes:B.NONE,value:1/1.8,offset:0},kelvin:{name:"kelvin",base:R.TEMPERATURE,prefixes:B.NONE,value:1,offset:0},celsius:{name:"celsius",base:R.TEMPERATURE,prefixes:B.NONE,value:1,offset:273.15},fahrenheit:{name:"fahrenheit",base:R.TEMPERATURE,prefixes:B.NONE,value:1/1.8,offset:459.67},rankine:{name:"rankine",base:R.TEMPERATURE,prefixes:B.NONE,value:1/1.8,offset:0},mol:{name:"mol",base:R.AMOUNT_OF_SUBSTANCE,prefixes:B.SHORT,value:1,offset:0},mole:{name:"mole",base:R.AMOUNT_OF_SUBSTANCE,prefixes:B.LONG,value:1,offset:0},cd:{name:"cd",base:R.LUMINOUS_INTENSITY,prefixes:B.SHORT,value:1,offset:0},candela:{name:"candela",base:R.LUMINOUS_INTENSITY,prefixes:B.LONG,value:1,offset:0},N:{name:"N",base:R.FORCE,prefixes:B.SHORT,value:1,offset:0},newton:{name:"newton",base:R.FORCE,prefixes:B.LONG,value:1,offset:0},dyn:{name:"dyn",base:R.FORCE,prefixes:B.SHORT,value:1e-5,offset:0},dyne:{name:"dyne",base:R.FORCE,prefixes:B.LONG,value:1e-5,offset:0},lbf:{name:"lbf",base:R.FORCE,prefixes:B.NONE,value:4.4482216152605,offset:0},poundforce:{name:"poundforce",base:R.FORCE,prefixes:B.NONE,value:4.4482216152605,offset:0},kip:{name:"kip",base:R.FORCE,prefixes:B.LONG,value:4448.2216,offset:0},J:{name:"J",base:R.ENERGY,prefixes:B.SHORT,value:1,offset:0},joule:{name:"joule",base:R.ENERGY,prefixes:B.SHORT,value:1,offset:0},erg:{name:"erg",base:R.ENERGY,prefixes:B.NONE,value:1e-7,offset:0},Wh:{name:"Wh",base:R.ENERGY,prefixes:B.SHORT,value:3600,offset:0},BTU:{name:"BTU",base:R.ENERGY,prefixes:B.BTU,value:1055.05585262,offset:0},eV:{name:"eV",base:R.ENERGY,prefixes:B.SHORT,value:1602176565e-28,offset:0},electronvolt:{name:"electronvolt",base:R.ENERGY,prefixes:B.LONG,value:1602176565e-28,offset:0},W:{name:"W",base:R.POWER,prefixes:B.SHORT,value:1,offset:0},watt:{name:"watt",base:R.POWER,prefixes:B.LONG,value:1,offset:0},hp:{name:"hp",base:R.POWER,prefixes:B.NONE,value:745.6998715386,offset:0},VAR:{name:"VAR",base:R.POWER,prefixes:B.SHORT,value:b.I,offset:0},VA:{name:"VA",base:R.POWER,prefixes:B.SHORT,value:1,offset:0},Pa:{name:"Pa",base:R.PRESSURE,prefixes:B.SHORT,value:1,offset:0},psi:{name:"psi",base:R.PRESSURE,prefixes:B.NONE,value:6894.75729276459,offset:0},atm:{name:"atm",base:R.PRESSURE,prefixes:B.NONE,value:101325,offset:0},bar:{name:"bar",base:R.PRESSURE,prefixes:B.SHORTLONG,value:1e5,offset:0},torr:{name:"torr",base:R.PRESSURE,prefixes:B.NONE,value:133.322,offset:0},mmHg:{name:"mmHg",base:R.PRESSURE,prefixes:B.NONE,value:133.322,offset:0},mmH2O:{name:"mmH2O",base:R.PRESSURE,prefixes:B.NONE,value:9.80665,offset:0},cmH2O:{name:"cmH2O",base:R.PRESSURE,prefixes:B.NONE,value:98.0665,offset:0},coulomb:{name:"coulomb",base:R.ELECTRIC_CHARGE,prefixes:B.LONG,value:1,offset:0},C:{name:"C",base:R.ELECTRIC_CHARGE,prefixes:B.SHORT,value:1,offset:0},farad:{name:"farad",base:R.ELECTRIC_CAPACITANCE,prefixes:B.LONG,value:1,offset:0},F:{name:"F",base:R.ELECTRIC_CAPACITANCE,prefixes:B.SHORT,value:1,offset:0},volt:{name:"volt",base:R.ELECTRIC_POTENTIAL,prefixes:B.LONG,value:1,offset:0},V:{name:"V",base:R.ELECTRIC_POTENTIAL,prefixes:B.SHORT,value:1,offset:0},ohm:{name:"ohm",base:R.ELECTRIC_RESISTANCE,prefixes:B.SHORTLONG,value:1,offset:0},henry:{name:"henry",base:R.ELECTRIC_INDUCTANCE,prefixes:B.LONG,value:1,offset:0},H:{name:"H",base:R.ELECTRIC_INDUCTANCE,prefixes:B.SHORT,value:1,offset:0},siemens:{name:"siemens",base:R.ELECTRIC_CONDUCTANCE,prefixes:B.LONG,value:1,offset:0},S:{name:"S",base:R.ELECTRIC_CONDUCTANCE,prefixes:B.SHORT,value:1,offset:0},weber:{name:"weber",base:R.MAGNETIC_FLUX,prefixes:B.LONG,value:1,offset:0},Wb:{name:"Wb",base:R.MAGNETIC_FLUX,prefixes:B.SHORT,value:1,offset:0},tesla:{name:"tesla",base:R.MAGNETIC_FLUX_DENSITY,prefixes:B.LONG,value:1,offset:0},T:{name:"T",base:R.MAGNETIC_FLUX_DENSITY,prefixes:B.SHORT,value:1,offset:0},b:{name:"b",base:R.BIT,prefixes:B.BINARY_SHORT,value:1,offset:0},bits:{name:"bits",base:R.BIT,prefixes:B.BINARY_LONG,value:1,offset:0},B:{name:"B",base:R.BIT,prefixes:B.BINARY_SHORT,value:8,offset:0},bytes:{name:"bytes",base:R.BIT,prefixes:B.BINARY_LONG,value:8,offset:0}},j={meters:"meter",inches:"inch",feet:"foot",yards:"yard",miles:"mile",links:"link",rods:"rod",chains:"chain",angstroms:"angstrom",lt:"l",litres:"litre",liter:"litre",liters:"litre",teaspoons:"teaspoon",tablespoons:"tablespoon",minims:"minim",fluiddrams:"fluiddram",fluidounces:"fluidounce",gills:"gill",cups:"cup",pints:"pint",quarts:"quart",gallons:"gallon",beerbarrels:"beerbarrel",oilbarrels:"oilbarrel",hogsheads:"hogshead",gtts:"gtt",grams:"gram",tons:"ton",tonnes:"tonne",grains:"grain",drams:"dram",ounces:"ounce",poundmasses:"poundmass",hundredweights:"hundredweight",sticks:"stick",lb:"lbm",lbs:"lbm",kips:"kip",acres:"acre",hectares:"hectare",sqfeet:"sqft",sqyard:"sqyd",sqmile:"sqmi",sqmiles:"sqmi",mmhg:"mmHg",mmh2o:"mmH2O",cmh2o:"cmH2O",seconds:"second",secs:"second",minutes:"minute",mins:"minute",hours:"hour",hr:"hour",hrs:"hour",days:"day",weeks:"week",months:"month",years:"year",decades:"decade",centuries:"century",millennia:"millennium",hertz:"hertz",radians:"radian",degrees:"degree",gradians:"gradian",cycles:"cycle",arcsecond:"arcsec",arcseconds:"arcsec",arcminute:"arcmin",arcminutes:"arcmin",BTUs:"BTU",watts:"watt",joules:"joule",amperes:"ampere",coulombs:"coulomb",volts:"volt",ohms:"ohm",farads:"farad",webers:"weber",teslas:"tesla",electronvolts:"electronvolt",moles:"mole",bit:"bits",byte:"bytes"};function U(e){if("BigNumber"===e.number){var n=hn(w);F.rad.value=new w(1),F.deg.value=n.div(180),F.grad.value=n.div(200),F.cycle.value=n.times(2),F.arcsec.value=n.div(648e3),F.arcmin.value=n.div(10800)}else F.rad.value=1,F.deg.value=Math.PI/180,F.grad.value=Math.PI/200,F.cycle.value=2*Math.PI,F.arcsec.value=Math.PI/648e3,F.arcmin.value=Math.PI/10800;F.radian.value=F.rad.value,F.degree.value=F.deg.value,F.gradian.value=F.grad.value}U(a),i&&i("config",(function(e,n){e.number!==n.number&&U(e)}));var L={si:{NONE:{unit:z,prefix:B.NONE[""]},LENGTH:{unit:F.m,prefix:B.SHORT[""]},MASS:{unit:F.g,prefix:B.SHORT.k},TIME:{unit:F.s,prefix:B.SHORT[""]},CURRENT:{unit:F.A,prefix:B.SHORT[""]},TEMPERATURE:{unit:F.K,prefix:B.SHORT[""]},LUMINOUS_INTENSITY:{unit:F.cd,prefix:B.SHORT[""]},AMOUNT_OF_SUBSTANCE:{unit:F.mol,prefix:B.SHORT[""]},ANGLE:{unit:F.rad,prefix:B.SHORT[""]},BIT:{unit:F.bits,prefix:B.SHORT[""]},FORCE:{unit:F.N,prefix:B.SHORT[""]},ENERGY:{unit:F.J,prefix:B.SHORT[""]},POWER:{unit:F.W,prefix:B.SHORT[""]},PRESSURE:{unit:F.Pa,prefix:B.SHORT[""]},ELECTRIC_CHARGE:{unit:F.C,prefix:B.SHORT[""]},ELECTRIC_CAPACITANCE:{unit:F.F,prefix:B.SHORT[""]},ELECTRIC_POTENTIAL:{unit:F.V,prefix:B.SHORT[""]},ELECTRIC_RESISTANCE:{unit:F.ohm,prefix:B.SHORT[""]},ELECTRIC_INDUCTANCE:{unit:F.H,prefix:B.SHORT[""]},ELECTRIC_CONDUCTANCE:{unit:F.S,prefix:B.SHORT[""]},MAGNETIC_FLUX:{unit:F.Wb,prefix:B.SHORT[""]},MAGNETIC_FLUX_DENSITY:{unit:F.T,prefix:B.SHORT[""]},FREQUENCY:{unit:F.Hz,prefix:B.SHORT[""]}}};L.cgs=JSON.parse(JSON.stringify(L.si)),L.cgs.LENGTH={unit:F.m,prefix:B.SHORT.c},L.cgs.MASS={unit:F.g,prefix:B.SHORT[""]},L.cgs.FORCE={unit:F.dyn,prefix:B.SHORT[""]},L.cgs.ENERGY={unit:F.erg,prefix:B.NONE[""]},L.us=JSON.parse(JSON.stringify(L.si)),L.us.LENGTH={unit:F.ft,prefix:B.NONE[""]},L.us.MASS={unit:F.lbm,prefix:B.NONE[""]},L.us.TEMPERATURE={unit:F.degF,prefix:B.NONE[""]},L.us.FORCE={unit:F.lbf,prefix:B.NONE[""]},L.us.ENERGY={unit:F.BTU,prefix:B.BTU[""]},L.us.POWER={unit:F.hp,prefix:B.NONE[""]},L.us.PRESSURE={unit:F.psi,prefix:B.NONE[""]},L.auto=JSON.parse(JSON.stringify(L.si));var H=L.auto;for(var $ in M.setUnitSystem=function(e){if(!Q(L,e))throw new Error("Unit system "+e+" does not exist. Choices are: "+Object.keys(L).join(", "));H=L[e]},M.getUnitSystem=function(){for(var e in L)if(Q(L,e)&&L[e]===H)return e},M.typeConverters={BigNumber:function(e){return new w(e+"")},Fraction:function(e){return new N(e)},Complex:function(e){return e},number:function(e){return e}},M._getNumberConverter=function(e){if(!M.typeConverters[e])throw new TypeError('Unsupported type "'+e+'"');return M.typeConverters[e]},F)if(Q(F,$)){var W=F[$];W.dimensions=W.base.dimensions}for(var Z in j)if(Q(j,Z)){var J=F[j[Z]],Y={};for(var X in J)Q(J,X)&&(Y[X]=J[X]);Y.name=Z,F[Z]=Y}return M.createUnit=function(e,n){if("object"!==Bu(e))throw new TypeError("createUnit expects first parameter to be of type 'Object'");if(n&&n.override)for(var t in e)if(Q(e,t)&&M.deleteUnit(t),e[t].aliases)for(var r=0;r<e[t].aliases.length;r++)M.deleteUnit(e[t].aliases[r]);var i;for(var a in e)Q(e,a)&&(i=M.createUnitSingle(a,e[a]));return i},M.createUnitSingle=function(e,n,t){if(null==n&&(n={}),"string"!=typeof e)throw new TypeError("createUnitSingle expects first parameter to be of type 'string'");if(Q(F,e))throw new Error('Cannot create unit "'+e+'": a unit with that name already exists');!function(e){for(var n=0;n<e.length;n++){var t=e.charAt(n),r=function(e){return/^[a-zA-Z]$/.test(e)};if(0===n&&!r(t))throw new Error('Invalid unit name (must begin with alpha character): "'+e+'"');if(n>0&&!r(t)&&!function(e){return e>="0"&&e<="9"}(t))throw new Error('Invalid unit name (only alphanumeric characters are allowed): "'+e+'"')}}(e);var r,i,a,o=null,s=[],u=0;if(n&&"Unit"===n.type)o=n.clone();else if("string"==typeof n)""!==n&&(r=n);else{if("object"!==Bu(n))throw new TypeError('Cannot create unit "'+e+'" from "'+n.toString()+'": expecting "string" or "Unit" or "Object"');r=n.definition,i=n.prefixes,u=n.offset,a=n.baseName,n.aliases&&(s=n.aliases.valueOf())}if(s)for(var c=0;c<s.length;c++)if(Q(F,s[c]))throw new Error('Cannot create alias "'+s[c]+'": a unit with that name already exists');if(r&&"string"==typeof r&&!o)try{o=M.parse(r,{allowNoUnits:!0})}catch(n){throw n.message='Could not create unit "'+e+'" from "'+r+'": '+n.message,n}else r&&"Unit"===r.type&&(o=r.clone());s=s||[],u=u||0,i=i&&i.toUpperCase&&B[i.toUpperCase()]||B.NONE;var f={};if(o){f={name:e,value:o.value,dimensions:o.dimensions.slice(0),prefixes:i,offset:u};var l=!1;for(var p in R)if(Q(R,p)){for(var d=!0,m=0;m<q.length;m++)if(Math.abs((f.dimensions[m]||0)-(R[p].dimensions[m]||0))>1e-12){d=!1;break}if(d){l=!0,f.base=R[p];break}}if(!l){a=a||e+"_STUFF";var h={dimensions:o.dimensions.slice(0)};h.key=a,R[a]=h,H[a]={unit:f,prefix:B.NONE[""]},f.base=R[a]}}else{if(a=a||e+"_STUFF",q.indexOf(a)>=0)throw new Error('Cannot create new base unit "'+e+'": a base unit with that name already exists (and cannot be overridden)');for(var y in q.push(a),R)Q(R,y)&&(R[y].dimensions[q.length-1]=0);for(var g={dimensions:[]},v=0;v<q.length;v++)g.dimensions[v]=0;g.dimensions[q.length-1]=1,g.key=a,R[a]=g,f={name:e,value:1,dimensions:R[a].dimensions.slice(0),prefixes:i,offset:u,base:R[a]},H[a]={unit:f,prefix:B.NONE[""]}}M.UNITS[e]=f;for(var x=0;x<s.length;x++){var b=s[x],w={};for(var N in f)Q(f,N)&&(w[N]=f[N]);w.name=b,M.UNITS[b]=w}return new M(null,e)},M.deleteUnit=function(e){delete M.UNITS[e]},M.PREFIXES=B,M.BASE_DIMENSIONS=q,M.BASE_UNITS=R,M.UNIT_SYSTEMS=L,M.UNITS=F,M}),{isClass:!0}),ju=en("createUnit",["typed","Unit"],(function(e){var n=e.typed,t=e.Unit;return n("createUnit",{"Object, Object":function(e,n){return t.createUnit(e,n)},Object:function(e){return t.createUnit(e,{})},"string, Unit | string | Object, Object":function(e,n,r){var i={};return i[e]=n,t.createUnit(i,r)},"string, Unit | string | Object":function(e,n){var r={};return r[e]=n,t.createUnit(r,{})},string:function(e){var n={};return n[e]={},t.createUnit(n,{})}})})),Uu=en("setUnion",["typed","size","concat","subset","setIntersect","setSymDifference","Index"],(function(e){var n=e.typed,t=e.size,r=e.concat,i=e.subset,a=e.setIntersect,o=e.setSymDifference,s=e.Index;return n("setUnion",{"Array | Matrix, Array | Matrix":function(e,n){if(0===i(t(e),new s(0)))return Ge(n);if(0===i(t(n),new s(0)))return Ge(e);var u=Ge(e),c=Ge(n);return r(o(u,c),a(u,c))}})}));function Lu(e,n,t,r,i,a,o){var s=0;for(t[o]=e;s>=0;){var u=t[o+s],c=t[r+u];-1===c?(s--,a[n++]=u):(t[r+u]=t[i+c],t[o+ ++s]=c)}return n}function Hu(e){return-e-2}var Gu=en("csAmd",["add","multiply","transpose"],(function(e){var n=e.add,t=e.multiply,r=e.transpose;return function(e,o){if(!o||e<=0||e>3)return null;var s=o._size,u=s[0],c=s[1],f=0,l=Math.max(16,10*Math.sqrt(c)),p=function(e,i,a,o,s){var u=r(i);if(1===e&&o===a)return n(i,u);if(2===e){for(var c=u._index,f=u._ptr,l=0,p=0;p<a;p++){var d=f[p];if(f[p]=l,!(f[p+1]-d>s))for(var m=f[p+1];d<m;d++)c[l++]=c[d]}return f[a]=l,i=r(u),t(u,i)}return t(u,i)}(e,o,u,c,l=Math.min(c-2,l));!function(e,n,t){for(var r=e._values,i=e._index,a=e._ptr,o=e._size[1],s=0,u=0;u<o;u++){var c=a[u];for(a[u]=s;c<a[u+1];c++)n(i[c],u,r?r[c]:1,t)&&(i[s]=i[c],r&&(r[s]=r[c]),s++)}a[o]=s,i.splice(s,i.length-s),r&&r.splice(s,r.length-s)}(p,a,null);for(var d,m,h,y,g,v,x,b,w,N,S,M,D,E,A,_,O=p._index,C=p._ptr,T=C[c],I=[],k=[],B=c+1,q=2*(c+1),R=3*(c+1),P=4*(c+1),z=5*(c+1),F=6*(c+1),j=7*(c+1),U=I,L=function(e,n,t,r,a,o,s,u,c,f,l,p){for(var d=0;d<e;d++)t[r+d]=n[d+1]-n[d];t[r+e]=0;for(var m=0;m<=e;m++)t[a+m]=-1,o[m]=-1,t[s+m]=-1,t[u+m]=-1,t[c+m]=1,t[f+m]=1,t[l+m]=0,t[p+m]=t[r+m];var h=i(0,0,t,f,e);return t[l+e]=-2,n[e]=-1,t[f+e]=0,h}(c,C,k,0,R,U,q,j,B,F,P,z),H=function(e,n,t,r,i,a,o,s,u,c,f){for(var l=0,p=0;p<e;p++){var d=t[r+p];if(0===d)t[i+p]=-2,l++,n[p]=-1,t[a+p]=0;else if(d>o)t[s+p]=0,t[i+p]=-1,l++,n[p]=Hu(e),t[s+e]++;else{var m=t[u+d];-1!==m&&(c[m]=p),t[f+p]=t[u+d],t[u+d]=p}}return l}(c,C,k,z,P,F,l,B,R,U,q),G=0;H<c;){for(h=-1;G<c&&-1===(h=k[R+G]);G++);-1!==k[q+h]&&(U[k[q+h]]=-1),k[R+G]=k[q+h];var $=k[P+h],V=k[B+h];H+=V;var W=0;k[B+h]=-V;var Z=C[h],J=0===$?Z:T,Y=J;for(y=1;y<=$+1;y++){for(y>$?(v=h,x=Z,b=k[0+h]-$):(x=C[v=O[Z++]],b=k[0+v]),g=1;g<=b;g++)(w=k[B+(d=O[x++])])<=0||(W+=w,k[B+d]=-w,O[Y++]=d,-1!==k[q+d]&&(U[k[q+d]]=U[d]),-1!==U[d]?k[q+U[d]]=k[q+d]:k[R+k[z+d]]=k[q+d]);v!==h&&(C[v]=Hu(h),k[F+v]=0)}for(0!==$&&(T=Y),k[z+h]=W,C[h]=J,k[0+h]=Y-J,k[P+h]=-2,L=i(L,f,k,F,c),N=J;N<Y;N++)if(!((S=k[P+(d=O[N])])<=0)){var X=L-(w=-k[B+d]);for(Z=C[d],M=C[d]+S-1;Z<=M;Z++)k[F+(v=O[Z])]>=L?k[F+v]-=w:0!==k[F+v]&&(k[F+v]=k[z+v]+X)}for(N=J;N<Y;N++){for(D=(M=C[d=O[N]])+k[P+d]-1,E=M,A=0,_=0,Z=M;Z<=D;Z++)if(0!==k[F+(v=O[Z])]){var Q=k[F+v]-L;Q>0?(_+=Q,O[E++]=v,A+=v):(C[v]=Hu(h),k[F+v]=0)}k[P+d]=E-M+1;var K=E,ee=M+k[0+d];for(Z=D+1;Z<ee;Z++){var ne=k[B+(m=O[Z])];ne<=0||(_+=ne,O[E++]=m,A+=m)}0===_?(C[d]=Hu(h),W-=w=-k[B+d],V+=w,H+=w,k[B+d]=0,k[P+d]=-1):(k[z+d]=Math.min(k[z+d],_),O[E]=O[K],O[K]=O[M],O[M]=h,k[0+d]=E-M+1,A=(A<0?-A:A)%c,k[q+d]=k[j+A],k[j+A]=d,U[d]=A)}for(k[z+h]=W,L=i(L+(f=Math.max(f,W)),f,k,F,c),N=J;N<Y;N++)if(!(k[B+(d=O[N])]>=0))for(d=k[j+(A=U[d])],k[j+A]=-1;-1!==d&&-1!==k[q+d];d=k[q+d],L++){for(b=k[0+d],S=k[P+d],Z=C[d]+1;Z<=C[d]+b-1;Z++)k[F+O[Z]]=L;var te=d;for(m=k[q+d];-1!==m;){var re=k[0+m]===b&&k[P+m]===S;for(Z=C[m]+1;re&&Z<=C[m]+b-1;Z++)k[F+O[Z]]!==L&&(re=0);re?(C[m]=Hu(d),k[B+d]+=k[B+m],k[B+m]=0,k[P+m]=-1,m=k[q+m],k[q+te]=m):(te=m,m=k[q+m])}}for(Z=J,N=J;N<Y;N++)(w=-k[B+(d=O[N])])<=0||(k[B+d]=w,_=k[z+d]+W-w,-1!==k[R+(_=Math.min(_,c-H-w))]&&(U[k[R+_]]=d),k[q+d]=k[R+_],U[d]=-1,k[R+_]=d,G=Math.min(G,_),k[z+d]=_,O[Z++]=d);k[B+h]=V,0==(k[0+h]=Z-J)&&(C[h]=-1,k[F+h]=0),0!==$&&(T=Z)}for(d=0;d<c;d++)C[d]=Hu(C[d]);for(m=0;m<=c;m++)k[R+m]=-1;for(m=c;m>=0;m--)k[B+m]>0||(k[q+m]=k[R+C[m]],k[R+C[m]]=m);for(v=c;v>=0;v--)k[B+v]<=0||-1!==C[v]&&(k[q+v]=k[R+C[v]],k[R+C[v]]=v);for(h=0,d=0;d<=c;d++)-1===C[d]&&(h=Lu(d,h,k,R,q,I,F));return I.splice(I.length-1,1),I};function i(e,n,t,r,i){if(e<2||e+n<0){for(var a=0;a<i;a++)0!==t[r+a]&&(t[r+a]=1);e=2}return e}function a(e,n){return e!==n}}));function $u(e,n,t,r,i,a,o){var s,u,c,f=0;if(e<=n||t[r+n]<=t[i+e])return-1;t[i+e]=t[r+n];var l=t[a+e];if(t[a+e]=n,-1===l)f=1,c=e;else{for(f=2,c=l;c!==t[o+c];c=t[o+c]);for(s=l;s!==c;s=u)u=t[o+s],t[o+s]=c}return{jleaf:f,q:c}}var Vu=en("csCounts",["transpose"],(function(e){var n=e.transpose;return function(e,t,r,i){if(!e||!t||!r)return null;var a,o,s,u,c,f,l,p=e._size,d=p[0],m=p[1],h=4*m+(i?m+d+1:0),y=[],g=m,v=2*m,x=3*m,b=4*m,w=5*m+1;for(s=0;s<h;s++)y[s]=-1;var N=[],S=n(e),M=S._index,D=S._ptr;for(s=0;s<m;s++)for(N[o=r[s]]=-1===y[x+o]?1:0;-1!==o&&-1===y[x+o];o=t[o])y[x+o]=s;if(i){for(s=0;s<m;s++)y[r[s]]=s;for(a=0;a<d;a++){for(s=m,f=D[a],l=D[a+1],c=f;c<l;c++)s=Math.min(s,y[M[c]]);y[w+a]=y[b+s],y[b+s]=a}}for(a=0;a<m;a++)y[0+a]=a;for(s=0;s<m;s++){for(-1!==t[o=r[s]]&&N[t[o]]--,u=i?y[b+s]:o;-1!==u;u=i?y[w+u]:-1)for(c=D[u];c<D[u+1];c++){var E=$u(a=M[c],o,y,x,g,v,0);E.jleaf>=1&&N[o]++,2===E.jleaf&&N[E.q]--}-1!==t[o]&&(y[0+o]=t[o])}for(o=0;o<m;o++)-1!==t[o]&&(N[t[o]]+=N[o]);return N}})),Wu=en("csSqr",["add","multiply","transpose"],(function(e){var n=e.add,t=e.multiply,r=e.transpose,i=Gu({add:n,multiply:t,transpose:r}),a=Vu({transpose:r});return function(e,n,t){var r,o=n._ptr,s=n._size[1],u={};if(u.q=i(e,n),e&&!u.q)return null;if(t){var c=e?function(e,n,t,r){for(var i=e._values,a=e._index,o=e._ptr,s=e._size,u=e._datatype,c=s[0],f=s[1],l=r&&e._values?[]:null,p=[],d=[],m=0,h=0;h<f;h++){d[h]=m;for(var y=t?t[h]:h,g=o[y],v=o[y+1],x=g;x<v;x++){var b=n?n[a[x]]:a[x];p[m]=b,l&&(l[m]=i[x]),m++}}return d[f]=m,e.createSparseMatrix({values:l,index:p,ptr:d,size:[c,f],datatype:u})}(n,null,u.q,0):n;u.parent=function(e,n){if(!e)return null;var t,r,i=e._index,a=e._ptr,o=e._size,s=o[0],u=o[1],c=[],f=[],l=u;if(n)for(t=0;t<s;t++)f[l+t]=-1;for(var p=0;p<u;p++){c[p]=-1,f[0+p]=-1;for(var d=a[p],m=a[p+1],h=d;h<m;h++){var y=i[h];for(t=n?f[l+y]:y;-1!==t&&t<p;t=r)r=f[0+t],f[0+t]=p,-1===r&&(c[t]=p);n&&(f[l+y]=p)}}return c}(c,1);var f=function(e,n){if(!e)return null;var t,r=0,i=[],a=[],o=n,s=2*n;for(t=0;t<n;t++)a[0+t]=-1;for(t=n-1;t>=0;t--)-1!==e[t]&&(a[o+t]=a[0+e[t]],a[0+e[t]]=t);for(t=0;t<n;t++)-1===e[t]&&(r=Lu(t,r,a,0,o,i,s));return i}(u.parent,s);if(u.cp=a(c,u.parent,f,1),c&&u.parent&&u.cp&&function(e,n){var t=e._ptr,r=e._index,i=e._size,a=i[0],o=i[1];n.pinv=[],n.leftmost=[];var s,u,c,f,l,p=n.parent,d=n.pinv,m=n.leftmost,h=[],y=a,g=a+o,v=a+2*o;for(u=0;u<o;u++)h[y+u]=-1,h[g+u]=-1,h[v+u]=0;for(s=0;s<a;s++)m[s]=-1;for(u=o-1;u>=0;u--)for(f=t[u],l=t[u+1],c=f;c<l;c++)m[r[c]]=u;for(s=a-1;s>=0;s--)d[s]=-1,-1!==(u=m[s])&&(0==h[v+u]++&&(h[g+u]=s),h[0+s]=h[y+u],h[y+u]=s);for(n.lnz=0,n.m2=a,u=0;u<o;u++)if(s=h[y+u],n.lnz++,s<0&&(s=n.m2++),d[s]=u,!(--v[u]<=0)){n.lnz+=h[v+u];var x=p[u];-1!==x&&(0===h[v+x]&&(h[g+x]=h[g+u]),h[0+h[g+u]]=h[y+x],h[y+x]=h[0+s],h[v+x]+=h[v+u])}for(s=0;s<a;s++)d[s]<0&&(d[s]=u++);return!0}(c,u))for(u.unz=0,r=0;r<s;r++)u.unz+=u.cp[r]}else u.unz=4*o[s]+s,u.lnz=u.unz;return u}}));function Zu(e,n){return e[n]<0}function Ju(e,n){e[n]=Hu(e[n])}function Yu(e){return e<0?Hu(e):e}function Xu(e,n,t,r,i){var a,o,s,u=n._index,c=n._ptr,f=n._size[1],l=0;for(r[0]=e;l>=0;){e=r[l];var p=i?i[e]:e;Zu(c,e)||(Ju(c,e),r[f+l]=p<0?0:Yu(c[p]));var d=1;for(o=r[f+l],s=p<0?0:Yu(c[p+1]);o<s;o++)if(!Zu(c,a=u[o])){r[f+l]=o,r[++l]=a,d=0;break}d&&(l--,r[--t]=e)}return t}var Qu=en("csSpsolve",["divideScalar","multiply","subtract"],(function(e){var n=e.divideScalar,t=e.multiply,r=e.subtract;return function(e,i,a,o,s,u,c){var f,l,p,d,m=e._values,h=e._index,y=e._ptr,g=e._size[1],v=i._values,x=i._index,b=i._ptr,w=function(e,n,t,r,i){var a,o,s,u=e._ptr,c=e._size,f=n._index,l=n._ptr,p=c[1],d=p;for(o=l[t],s=l[t+1],a=o;a<s;a++){var m=f[a];Zu(u,m)||(d=Xu(m,e,d,r,i))}for(a=d;a<p;a++)Ju(u,r[a]);return d}(e,i,a,o,u);for(f=w;f<g;f++)s[o[f]]=0;for(l=b[a],p=b[a+1],f=l;f<p;f++)s[x[f]]=v[f];for(var N=w;N<g;N++){var S=o[N],M=u?u[S]:S;if(!(M<0))for(l=y[M],p=y[M+1],s[S]=n(s[S],m[c?l:p-1]),f=c?l+1:l,d=c?p:p-1;f<d;f++){var D=h[f];s[D]=r(s[D],t(m[f],s[S]))}}return w}})),Ku=en("csLu",["abs","divideScalar","multiply","subtract","larger","largerEq","SparseMatrix"],(function(e){var n=e.abs,t=e.divideScalar,r=e.multiply,i=e.subtract,a=e.larger,o=e.largerEq,s=e.SparseMatrix,u=Qu({divideScalar:t,multiply:r,subtract:i});return function(e,i,c){if(!e)return null;var f,l=e._size[1],p=100,d=100;i&&(f=i.q,p=i.lnz||p,d=i.unz||d);var m,h,y=[],g=[],v=[],x=new s({values:y,index:g,ptr:v,size:[l,l]}),b=[],w=[],N=[],S=new s({values:b,index:w,ptr:N,size:[l,l]}),M=[],D=[],E=[];for(m=0;m<l;m++)D[m]=0,M[m]=-1,v[m+1]=0;p=0,d=0;for(var A=0;A<l;A++){v[A]=p,N[A]=d;var _=f?f[A]:A,O=u(x,e,_,E,D,M,1),C=-1,T=-1;for(h=O;h<l;h++)if(M[m=E[h]]<0){var I=n(D[m]);a(I,T)&&(T=I,C=m)}else w[d]=M[m],b[d++]=D[m];if(-1===C||T<=0)return null;M[_]<0&&o(n(D[_]),r(T,c))&&(C=_);var k=D[C];for(w[d]=A,b[d++]=k,M[C]=A,g[p]=C,y[p++]=1,h=O;h<l;h++)M[m=E[h]]<0&&(g[p]=m,y[p++]=t(D[m],k)),D[m]=0}for(v[l]=p,N[l]=d,h=0;h<p;h++)g[h]=M[g[h]];return y.splice(p,y.length-p),g.splice(p,g.length-p),b.splice(d,b.length-d),w.splice(d,w.length-d),{L:x,U:S,pinv:M}}})),ec=en("slu",["typed","abs","add","multiply","transpose","divideScalar","subtract","larger","largerEq","SparseMatrix"],(function(e){var n=e.typed,t=e.abs,r=e.add,i=e.multiply,a=e.transpose,o=e.divideScalar,s=e.subtract,u=e.larger,c=e.largerEq,f=e.SparseMatrix,l=Wu({add:r,multiply:i,transpose:a}),p=Ku({abs:t,divideScalar:o,multiply:i,subtract:s,larger:u,largerEq:c,SparseMatrix:f});return n("slu",{"SparseMatrix, number, number":function(e,n,t){if(!oe(n)||n<0||n>3)throw new Error("Symbolic Ordering and Analysis order must be an integer number in the interval [0, 3]");if(t<0||t>1)throw new Error("Partial pivoting threshold must be a number from 0 to 1");var r=l(n,e,!1),i=p(e,r,t);return{L:i.L,U:i.U,p:i.pinv,q:r.q,toString:function(){return"L: "+this.L.toString()+"\nU: "+this.U.toString()+"\np: "+this.p.toString()+(this.q?"\nq: "+this.q.toString():"")+"\n"}}}})})),nc=en("intersect",["typed","config","abs","add","addScalar","matrix","multiply","multiplyScalar","divideScalar","subtract","smaller","equalScalar"],(function(e){var n=e.typed,t=e.config,r=e.abs,i=e.add,a=e.addScalar,o=e.matrix,u=e.multiply,c=e.multiplyScalar,f=e.divideScalar,l=e.subtract,p=e.smaller,d=e.equalScalar,m=n("intersect",{"Array, Array, Array":function(e,n,t){if(!g(e))throw new TypeError("Array with 3 numbers or BigNumbers expected for first argument");if(!g(n))throw new TypeError("Array with 3 numbers or BigNumbers expected for second argument");if(!function(e){return 4===e.length&&h(e[0])&&h(e[1])&&h(e[2])&&h(e[3])}(t))throw new TypeError("Array with 4 numbers expected as third argument");return function(e,n,t,r,i,o,s,u,p,d){var m=c(e,s),h=c(r,s),y=c(n,u),g=c(i,u),v=c(t,p),x=c(o,p),b=f(l(l(l(d,m),y),v),l(l(l(a(a(h,g),x),m),y),v)),w=a(e,c(b,l(r,e))),N=a(n,c(b,l(i,n))),S=a(t,c(b,l(o,t)));return[w,N,S]}(e[0],e[1],e[2],n[0],n[1],n[2],t[0],t[1],t[2],t[3])},"Array, Array, Array, Array":function(e,n,o,s){if(2===e.length){if(!y(e))throw new TypeError("Array with 2 numbers or BigNumbers expected for first argument");if(!y(n))throw new TypeError("Array with 2 numbers or BigNumbers expected for second argument");if(!y(o))throw new TypeError("Array with 2 numbers or BigNumbers expected for third argument");if(!y(s))throw new TypeError("Array with 2 numbers or BigNumbers expected for fourth argument");return function(e,n,o,s){var d=e,m=o,h=l(d,n),y=l(m,s),g=l(c(h[0],y[1]),c(y[0],h[1]));if(p(r(g),t.epsilon))return null;var v=c(y[0],d[1]),x=c(y[1],d[0]),b=c(y[0],m[1]),w=c(y[1],m[0]),N=f(a(l(l(v,x),b),w),g);return i(u(h,N),d)}(e,n,o,s)}if(3===e.length){if(!g(e))throw new TypeError("Array with 3 numbers or BigNumbers expected for first argument");if(!g(n))throw new TypeError("Array with 3 numbers or BigNumbers expected for second argument");if(!g(o))throw new TypeError("Array with 3 numbers or BigNumbers expected for third argument");if(!g(s))throw new TypeError("Array with 3 numbers or BigNumbers expected for fourth argument");return m=e[0],h=e[1],x=e[2],b=n[0],w=n[1],N=n[2],S=o[0],M=o[1],D=o[2],E=s[0],A=s[1],_=s[2],O=v(m,S,E,S,h,M,A,M,x,D,_,D),C=v(E,S,b,m,A,M,w,h,_,D,N,x),T=v(m,S,b,m,h,M,w,h,x,D,N,x),I=v(E,S,E,S,A,M,A,M,_,D,_,D),k=v(b,m,b,m,w,h,w,h,N,x,N,x),B=f(l(c(O,C),c(T,I)),l(c(k,I),c(C,C))),q=f(a(O,c(B,C)),I),R=a(m,c(B,l(b,m))),P=a(h,c(B,l(w,h))),z=a(x,c(B,l(N,x))),F=a(S,c(q,l(E,S))),j=a(M,c(q,l(A,M))),U=a(D,c(q,l(_,D))),d(R,F)&&d(P,j)&&d(z,U)?[R,P,z]:null}throw new TypeError("Arrays with two or thee dimensional points expected");var m,h,x,b,w,N,S,M,D,E,A,_,O,C,T,I,k,B,q,R,P,z,F,j,U},"Matrix, Matrix, Matrix":function(e,n,t){return o(m(e.valueOf(),n.valueOf(),t.valueOf()))},"Matrix, Matrix, Matrix, Matrix":function(e,n,t,r){return o(m(e.valueOf(),n.valueOf(),t.valueOf(),r.valueOf()))}});function h(e){return"number"==typeof e||s(e)}function y(e){return 2===e.length&&h(e[0])&&h(e[1])}function g(e){return 3===e.length&&h(e[0])&&h(e[1])&&h(e[2])}function v(e,n,t,r,i,o,s,u,f,p,d,m){var h=c(l(e,n),l(t,r)),y=c(l(i,o),l(s,u)),g=c(l(f,p),l(d,m));return a(a(h,y),g)}return m})),tc=en("bellNumbers",["typed","addScalar","isNegative","isInteger","stirlingS2"],(function(e){var n=e.typed,t=e.addScalar,r=e.isNegative,i=e.isInteger,a=e.stirlingS2;return n("bellNumbers",{"number | BigNumber":function(e){if(!i(e)||r(e))throw new TypeError("Non-negative integer value expected in function bellNumbers");for(var n=0,o=0;o<=e;o++)n=t(n,a(e,o));return n}})})),rc=en("xor",["typed","matrix","DenseMatrix"],(function(e){var n=e.typed,t=e.matrix,r=e.DenseMatrix,i=io({typed:n}),a=mo({typed:n,DenseMatrix:r}),o=so({typed:n,DenseMatrix:r}),s=eo({typed:n}),u=no({typed:n}),c=n("xor",{"number, number":bi,"Complex, Complex":function(e,n){return(0!==e.re||0!==e.im)!=(0!==n.re||0!==n.im)},"BigNumber, BigNumber":function(e,n){return(!e.isZero()&&!e.isNaN())!=(!n.isZero()&&!n.isNaN())},"Unit, Unit":function(e,n){return c(e.value||0,n.value||0)},"SparseMatrix, SparseMatrix":function(e,n){return a(e,n,c)},"SparseMatrix, DenseMatrix":function(e,n){return i(n,e,c,!0)},"DenseMatrix, SparseMatrix":function(e,n){return i(e,n,c,!1)},"DenseMatrix, DenseMatrix":function(e,n){return s(e,n,c)},"Array, Array":function(e,n){return c(t(e),t(n)).valueOf()},"Array, Matrix":function(e,n){return c(t(e),n)},"Matrix, Array":function(e,n){return c(e,t(n))},"SparseMatrix, any":function(e,n){return o(e,n,c,!1)},"DenseMatrix, any":function(e,n){return u(e,n,c,!1)},"any, SparseMatrix":function(e,n){return o(n,e,c,!0)},"any, DenseMatrix":function(e,n){return u(n,e,c,!0)},"Array, any":function(e,n){return u(t(e),n,c,!1).valueOf()},"any, Array":function(e,n){return u(t(n),e,c,!0).valueOf()}});return c})),ic=en("row",["typed","Index","matrix","range"],(function(e){var n=e.typed,t=e.Index,r=e.matrix,i=e.range;return n("row",{"Matrix, number":a,"Array, number":function(e,n){return a(r(V(e)),n).valueOf()}});function a(e,n){if(2!==e.size().length)throw new Error("Only two dimensional matrix is supported");Fe(n,e.size()[0]);var r=i(0,e.size()[1]),a=new t(n,r);return e.subset(a)}})),ac=en("usolve",["typed","matrix","divideScalar","multiplyScalar","subtract","equalScalar","DenseMatrix"],(function(e){var n=e.typed,t=e.matrix,r=e.divideScalar,i=e.multiplyScalar,a=e.subtract,o=e.equalScalar,s=e.DenseMatrix,u=gu({DenseMatrix:s});return n("usolve",{"SparseMatrix, Array | Matrix":function(e,n){return function(e,n){for(var t,c,f=(n=u(e,n,!0))._data,l=e._size[0],p=e._size[1],d=e._values,m=e._index,h=e._ptr,y=[],g=p-1;g>=0;g--){var v=f[g][0]||0;if(o(v,0))y[g]=[0];else{var x=0,b=[],w=[],N=h[g],S=h[g+1];for(c=S-1;c>=N;c--)(t=m[c])===g?x=d[c]:t<g&&(b.push(d[c]),w.push(t));if(o(x,0))throw new Error("Linear system cannot be solved since matrix is singular");var M=r(v,x);for(c=0,S=w.length;c<S;c++)t=w[c],f[t]=[a(f[t][0],i(M,b[c]))];y[g]=[M]}}return new s({data:y,size:[l,1]})}(e,n)},"DenseMatrix, Array | Matrix":function(e,n){return c(e,n)},"Array, Array | Matrix":function(e,n){return c(t(e),n).valueOf()}});function c(e,n){for(var t=(n=u(e,n,!0))._data,c=e._size[0],f=e._size[1],l=[],p=e._data,d=f-1;d>=0;d--){var m=t[d][0]||0,h=void 0;if(o(m,0))h=0;else{var y=p[d][d];if(o(y,0))throw new Error("Linear system cannot be solved since matrix is singular");h=r(m,y);for(var g=d-1;g>=0;g--)t[g]=[a(t[g][0]||0,i(h,p[g][d]))]}l[d]=[h]}return new s({data:l,size:[c,1]})}})),oc=en("unit",["typed","Unit"],(function(e){var n=e.typed,t=e.Unit,r=n("unit",{Unit:function(e){return e.clone()},string:function(e){return t.isValuelessUnit(e)?new t(null,e):t.parse(e,{allowNoUnits:!0})},"number | BigNumber | Fraction | Complex, string":function(e,n){return new t(e,n)},"Array | Matrix":function(e){return rr(e,r)}});return r})),sc=en("column",["typed","Index","matrix","range"],(function(e){var n=e.typed,t=e.Index,r=e.matrix,i=e.range;return n("column",{"Matrix, number":a,"Array, number":function(e,n){return a(r(V(e)),n).valueOf()}});function a(e,n){if(2!==e.size().length)throw new Error("Only two dimensional matrix is supported");Fe(n,e.size()[1]);var r=i(0,e.size()[0]),a=new t(r,n);return e.subset(a)}})),uc=en("Spa",["addScalar","equalScalar","FibonacciHeap"],(function(e){var n=e.addScalar,t=e.equalScalar,r=e.FibonacciHeap;function i(){if(!(this instanceof i))throw new SyntaxError("Constructor must be called with the new operator");this._values=[],this._heap=new r}return i.prototype.type="Spa",i.prototype.isSpa=!0,i.prototype.set=function(e,n){if(this._values[e])this._values[e].value=n;else{var t=this._heap.insert(e,n);this._values[e]=t}},i.prototype.get=function(e){var n=this._values[e];return n?n.value:0},i.prototype.accumulate=function(e,t){var r=this._values[e];r?r.value=n(r.value,t):(r=this._heap.insert(e,t),this._values[e]=r)},i.prototype.forEach=function(e,n,r){var i=this._heap,a=this._values,o=[],s=i.extractMinimum();for(s&&o.push(s);s&&s.key<=n;)s.key>=e&&(t(s.value,0)||r(s.key,s.value,this)),(s=i.extractMinimum())&&o.push(s);for(var u=0;u<o.length;u++){var c=o[u];a[(s=i.insert(c.key,c.value)).key]=s}},i.prototype.swap=function(e,n){var t=this._values[e],r=this._values[n];if(!t&&r)t=this._heap.insert(e,r.value),this._heap.remove(r),this._values[e]=t,this._values[n]=void 0;else if(t&&!r)r=this._heap.insert(n,t.value),this._heap.remove(t),this._values[n]=r,this._values[e]=void 0;else if(t&&r){var i=t.value;t.value=r.value,r.value=i}},i}),{isClass:!0}),cc=en("lup",["typed","matrix","abs","addScalar","divideScalar","multiplyScalar","subtract","larger","equalScalar","unaryMinus","DenseMatrix","SparseMatrix","Spa"],(function(e){var n=e.typed,t=e.matrix,r=e.abs,i=e.addScalar,a=e.divideScalar,o=e.multiplyScalar,s=e.subtract,u=e.larger,c=e.equalScalar,f=e.unaryMinus,l=e.DenseMatrix,p=e.SparseMatrix,d=e.Spa;return n("lup",{DenseMatrix:function(e){return m(e)},SparseMatrix:function(e){return h(e)},Array:function(e){var n=m(t(e));return{L:n.L.valueOf(),U:n.U.valueOf(),p:n.p}}});function m(e){var n,t,f,p=e._size[0],d=e._size[1],m=Math.min(p,d),h=V(e._data),y=[],g=[p,m],v=[],x=[m,d],b=[];for(n=0;n<p;n++)b[n]=n;for(t=0;t<d;t++){if(t>0)for(n=0;n<p;n++){var w=Math.min(n,t),N=0;for(f=0;f<w;f++)N=i(N,o(h[n][f],h[f][t]));h[n][t]=s(h[n][t],N)}var S=t,M=0,D=0;for(n=t;n<p;n++){var E=h[n][t],A=r(E);u(A,M)&&(S=n,M=A,D=E)}if(t!==S&&(b[t]=[b[S],b[S]=b[t]][0],l._swapRows(t,S,h)),t<p)for(n=t+1;n<p;n++){var _=h[n][t];c(_,0)||(h[n][t]=a(h[n][t],D))}}for(t=0;t<d;t++)for(n=0;n<p;n++)0===t&&(n<d&&(v[n]=[]),y[n]=[]),n<t?(n<d&&(v[n][t]=h[n][t]),t<p&&(y[n][t]=0)):n!==t?(n<d&&(v[n][t]=0),t<p&&(y[n][t]=h[n][t])):(n<d&&(v[n][t]=h[n][t]),t<p&&(y[n][t]=1));var O=new l({data:y,size:g}),C=new l({data:v,size:x}),T=[];for(n=0,m=b.length;n<m;n++)T[b[n]]=n;return{L:O,U:C,p:T,toString:function(){return"L: "+this.L.toString()+"\nU: "+this.U.toString()+"\nP: "+this.p}}}function h(e){var n,t,i,s=e._size[0],l=e._size[1],m=Math.min(s,l),h=e._values,y=e._index,g=e._ptr,v=[],x=[],b=[],w=[s,m],N=[],S=[],M=[],D=[m,l],E=[],A=[];for(n=0;n<s;n++)E[n]=n,A[n]=n;var _=function(){var e=new d;t<s&&(b.push(v.length),v.push(1),x.push(t)),M.push(N.length);var l=g[t],m=g[t+1];for(i=l;i<m;i++)n=y[i],e.set(E[n],h[i]);t>0&&e.forEach(0,t-1,(function(n,t){p._forEachRow(n,v,x,b,(function(r,i){r>n&&e.accumulate(r,f(o(i,t)))}))}));var _,O,C,T,I=t,k=e.get(t),B=r(k);e.forEach(t+1,s-1,(function(e,n){var t=r(n);u(t,B)&&(I=e,B=t,k=n)})),t!==I&&(p._swapRows(t,I,w[1],v,x,b),p._swapRows(t,I,D[1],N,S,M),e.swap(t,I),O=I,C=A[_=t],T=A[O],E[C]=O,E[T]=_,A[_]=T,A[O]=C),e.forEach(0,s-1,(function(e,n){e<=t?(N.push(n),S.push(e)):(n=a(n,k),c(n,0)||(v.push(n),x.push(e)))}))};for(t=0;t<l;t++)_();return M.push(N.length),b.push(v.length),{L:new p({values:v,index:x,ptr:b,size:w}),U:new p({values:N,index:S,ptr:M,size:D}),p:E,toString:function(){return"L: "+this.L.toString()+"\nU: "+this.U.toString()+"\nP: "+this.p}}}})),fc=en("det",["typed","matrix","subtract","multiply","unaryMinus","lup"],(function(e){var n=e.typed,t=e.matrix,r=e.subtract,i=e.multiply,a=e.unaryMinus,o=e.lup;return n("det",{any:function(e){return V(e)},"Array | Matrix":function(e){var n;switch((n=d(e)?e.size():Array.isArray(e)?(e=t(e)).size():[]).length){case 0:return V(e);case 1:if(1===n[0])return V(e.valueOf()[0]);throw new RangeError("Matrix must be square (size: "+Te(n)+")");case 2:var s=n[0],u=n[1];if(s===u)return function(e,n,t){if(1===n)return V(e[0][0]);if(2===n)return r(i(e[0][0],e[1][1]),i(e[1][0],e[0][1]));for(var s=o(e),u=s.U[0][0],c=1;c<n;c++)u=i(u,s.U[c][c]);for(var f=0,l=0,p=[];;){for(;p[l];)l++;if(l>=n)break;for(var d=l,m=0;!p[s.p[d]];)p[s.p[d]]=!0,d=s.p[d],m++;m%2==0&&f++}return f%2==0?u:a(u)}(e.clone().valueOf(),s);throw new RangeError("Matrix must be square (size: "+Te(n)+")");default:throw new RangeError("Matrix must be two dimensional (size: "+Te(n)+")")}}})})),lc=en("log",["config","typed","divideScalar","Complex"],(function(e){var n=e.typed,t=e.config,r=e.divideScalar,i=e.Complex,a=n("log",{number:function(e){return e>=0||t.predictable?Br(e):new i(e,0).log()},Complex:function(e){return e.log()},BigNumber:function(e){return!e.isNegative()||t.predictable?e.ln():new i(e.toNumber(),0).log()},"Array | Matrix":function(e){return rr(e,a)},"any, any":function(e,n){return r(a(e),a(n))}});return a})),pc=en("setIsSubset",["typed","size","subset","compareNatural","Index"],(function(e){var n=e.typed,t=e.size,r=e.subset,i=e.compareNatural,a=e.Index;return n("setIsSubset",{"Array | Matrix, Array | Matrix":function(e,n){if(0===r(t(e),new a(0)))return!0;if(0===r(t(n),new a(0)))return!1;for(var o,s=Ye(Ge(Array.isArray(e)?e:e.toArray()).sort(i)),u=Ye(Ge(Array.isArray(n)?n:n.toArray()).sort(i)),c=0;c<s.length;c++){o=!1;for(var f=0;f<u.length;f++)if(0===i(s[c].value,u[f].value)&&s[c].identifier===u[f].identifier){o=!0;break}if(!1===o)return!1}return!0}})}));function dc(e,n){var t,r=n.length,i=[];if(e)for(t=0;t<r;t++)i[e[t]]=n[t];else for(t=0;t<r;t++)i[t]=n[t];return i}var mc=["typed","matrix","lup","slu","usolve","lsolve","DenseMatrix"],hc=en("lusolve",mc,(function(e){var n=e.typed,t=e.matrix,r=e.lup,i=e.slu,a=e.usolve,o=e.lsolve,s=gu({DenseMatrix:e.DenseMatrix});return n("lusolve",{"Array, Array | Matrix":function(e,n){e=t(e);var i=r(e);return c(i.L,i.U,i.p,null,n).valueOf()},"DenseMatrix, Array | Matrix":function(e,n){var t=r(e);return c(t.L,t.U,t.p,null,n)},"SparseMatrix, Array | Matrix":function(e,n){var t=r(e);return c(t.L,t.U,t.p,null,n)},"SparseMatrix, Array | Matrix, number, number":function(e,n,t,r){var a=i(e,t,r);return c(a.L,a.U,a.p,a.q,n)},"Object, Array | Matrix":function(e,n){return c(e.L,e.U,e.p,e.q,n)}});function u(e){if(d(e))return e;if(p(e))return t(e);throw new TypeError("Invalid Matrix LU decomposition")}function c(e,n,t,r,i){e=u(e),n=u(n),i=s(e,i,!1),t&&(i._data=dc(t,i._data));var c=o(e,i),f=a(n,c);return r&&(f._data=dc(r,f._data)),f}})),yc=["typed","matrix","divideScalar","addScalar","multiply","unaryMinus","det","identity","abs"],gc=en("inv",yc,(function(e){var n=e.typed,t=e.matrix,r=e.divideScalar,i=e.addScalar,a=e.multiply,o=e.unaryMinus,s=e.det,u=e.identity,c=e.abs;return n("inv",{"Array | Matrix":function(e){var n=d(e)?e.size():Pe(e);switch(n.length){case 1:if(1===n[0])return d(e)?t([r(1,e.valueOf()[0])]):[r(1,e[0])];throw new RangeError("Matrix must be square (size: "+Te(n)+")");case 2:var i=n[0],a=n[1];if(i===a)return d(e)?t(f(e.valueOf(),i,a),e.storage()):f(e,i,a);throw new RangeError("Matrix must be square (size: "+Te(n)+")");default:throw new RangeError("Matrix must be two dimensional (size: "+Te(n)+")")}},any:function(e){return r(1,e)}});function f(e,n,t){var f,l,p,d,m;if(1===n){if(0===(d=e[0][0]))throw Error("Cannot calculate inverse, determinant is zero");return[[r(1,d)]]}if(2===n){var h=s(e);if(0===h)throw Error("Cannot calculate inverse, determinant is zero");return[[r(e[1][1],h),r(o(e[0][1]),h)],[r(o(e[1][0]),h),r(e[0][0],h)]]}var y=e.concat();for(f=0;f<n;f++)y[f]=y[f].concat();for(var g=u(n).valueOf(),v=0;v<t;v++){var x=c(y[v][v]),b=v;for(f=v+1;f<n;)c(y[f][v])>x&&(x=c(y[f][v]),b=f),f++;if(0===x)throw Error("Cannot calculate inverse, determinant is zero");(f=b)!==v&&(m=y[v],y[v]=y[f],y[f]=m,m=g[v],g[v]=g[f],g[f]=m);var w=y[v],N=g[v];for(f=0;f<n;f++){var S=y[f],M=g[f];if(f!==v){if(0!==S[v]){for(p=r(o(S[v]),w[v]),l=v;l<t;l++)S[l]=i(S[l],a(p,w[l]));for(l=0;l<t;l++)M[l]=i(M[l],a(p,N[l]))}}else{for(p=w[v],l=v;l<t;l++)S[l]=r(S[l],p);for(l=0;l<t;l++)M[l]=r(M[l],p)}}}return g}})),vc=["typed","abs","add","identity","inv","multiply"],xc=en("expm",vc,(function(e){var n=e.typed,t=e.abs,r=e.add,i=e.identity,a=e.inv,o=e.multiply;return n("expm",{Matrix:function(e){var n=e.size();if(2!==n.length||n[0]!==n[1])throw new RangeError("Matrix must be square (size: "+Te(n)+")");for(var u=n[0],c=function(e,n){for(var t=0;t<30;t++)for(var r=0;r<=t;r++){var i=t-r;if(s(e,r,i)<n)return{q:r,j:i}}throw new Error("Could not find acceptable parameters to compute the matrix exponential (try increasing maxSearchSize in expm.js)")}(function(e){for(var n=e.size()[0],r=0,i=0;i<n;i++){for(var a=0,o=0;o<n;o++)a+=t(e.get([i,o]));r=Math.max(a,r)}return r}(e),1e-15),f=c.q,l=c.j,p=o(e,Math.pow(2,-l)),d=i(u),m=i(u),h=1,g=p,v=-1,x=1;x<=f;x++)x>1&&(g=o(g,p),v=-v),d=r(d,o(h=h*(f-x+1)/((2*f-x+1)*x),g)),m=r(m,o(h*v,g));for(var b=o(a(m),d),w=0;w<l;w++)b=o(b,b);return y(e)?e.createSparseMatrix(b):b}});function s(e,n,t){for(var r=1,i=2;i<=n;i++)r*=i;for(var a=r,o=n+1;o<=2*n;o++)a*=o;var s=a*(2*n+1);return 8*Math.pow(e/Math.pow(2,t),2*n)*r*r/(a*s)}})),bc=["typed","matrix","multiply","equalScalar","divideScalar","inv"],wc=en("divide",bc,(function(e){var n=e.typed,t=e.matrix,r=e.multiply,i=e.equalScalar,a=e.divideScalar,o=e.inv,s=oo({typed:n,equalScalar:i}),u=no({typed:n});return n("divide",Z({"Array | Matrix, Array | Matrix":function(e,n){return r(e,o(n))},"DenseMatrix, any":function(e,n){return u(e,n,a,!1)},"SparseMatrix, any":function(e,n){return s(e,n,a,!1)},"Array, any":function(e,n){return u(t(e),n,a,!1).valueOf()},"any, Array | Matrix":function(e,n){return r(e,o(n))}},a.signatures))})),Nc=["typed","add","divide","compare","partitionSelect"],Sc=en("median",Nc,(function(e){var n=e.typed,t=e.add,r=e.divide,i=e.compare,a=e.partitionSelect,o=n("median",{"Array | Matrix":s,"Array | Matrix, number | BigNumber":function(e,n){throw new Error("median(A, dim) is not yet supported")},"...":function(e){if(nr(e))throw new TypeError("Scalar values expected in function median");return s(e)}});function s(e){try{var n=(e=Ge(e.valueOf())).length;if(0===n)throw new Error("Cannot calculate median of an empty array");if(n%2==0){for(var t=n/2-1,r=a(e,t+1),o=e[t],s=0;s<t;++s)i(e[s],o)>0&&(o=e[s]);return c(o,r)}var f=a(e,(n-1)/2);return u(f)}catch(e){throw eu(e,"median")}}var u=n({"number | BigNumber | Complex | Unit":function(e){return e}}),c=n({"number | BigNumber | Complex | Unit, number | BigNumber | Complex | Unit":function(e,n){return r(t(e,n),2)}});return o})),Mc=["typed","add","subtract","multiply","divide","apply","isNaN"],Dc=en("variance",Mc,(function(e){var n=e.typed,t=e.add,r=e.subtract,i=e.multiply,a=e.divide,o=e.apply,u=e.isNaN;return n("variance",{"Array | Matrix":function(e){return c(e,"unbiased")},"Array | Matrix, string":c,"Array | Matrix, number | BigNumber":function(e,n){return f(e,n,"unbiased")},"Array | Matrix, number | BigNumber, string":f,"...":function(e){return c(e,"unbiased")}});function c(e,n){var o=0,c=0;if(0===e.length)throw new SyntaxError("Function variance requires one or more parameters (0 provided)");if(tr(e,(function(e){try{o=t(o,e),c++}catch(n){throw eu(n,"variance",e)}})),0===c)throw new Error("Cannot calculate variance of an empty array");var f=a(o,c);if(o=0,tr(e,(function(e){var n=r(e,f);o=t(o,i(n,n))})),u(o))return o;switch(n){case"uncorrected":return a(o,c);case"biased":return a(o,c+1);case"unbiased":var l=s(o)?o.mul(0):0;return 1===c?l:a(o,c-1);default:throw new Error('Unknown normalization "'+n+'". Choose "unbiased" (default), "uncorrected", or "biased".')}}function f(e,n,t){try{if(0===e.length)throw new SyntaxError("Function variance requires one or more parameters (0 provided)");return o(e,n,(function(e){return c(e,t)}))}catch(e){throw eu(e,"variance")}}})),Ec=["typed","matrix","divide","sum","multiply","dotDivide","log","isNumeric"],Ac=en("kldivergence",Ec,(function(e){var n=e.typed,t=e.matrix,r=e.divide,i=e.sum,a=e.multiply,o=e.dotDivide,s=e.log,u=e.isNumeric;return n("kldivergence",{"Array, Array":function(e,n){return c(t(e),t(n))},"Matrix, Array":function(e,n){return c(e,t(n))},"Array, Matrix":function(e,n){return c(t(e),n)},"Matrix, Matrix":function(e,n){return c(e,n)}});function c(e,n){var t=n.size().length,c=e.size().length;if(t>1)throw new Error("first object must be one dimensional");if(c>1)throw new Error("second object must be one dimensional");if(t!==c)throw new Error("Length of two vectors must be equal");if(0===i(e))throw new Error("Sum of elements in first object must be non zero");if(0===i(n))throw new Error("Sum of elements in second object must be non zero");var f=r(e,i(e)),l=r(n,i(n)),p=i(a(f,s(o(f,l))));return u(p)?p:Number.NaN}})),_c=["typed","config","divideScalar","log","Complex"],Oc=en("log1p",_c,(function(e){var n=e.typed,t=e.config,r=e.divideScalar,i=e.log,a=e.Complex,o=n("log1p",{number:function(e){return e>=-1||t.predictable?fe(e):s(new a(e,0))},Complex:s,BigNumber:function(e){var n=e.plus(1);return!n.isNegative()||t.predictable?n.ln():s(new a(e.toNumber(),0))},"Array | Matrix":function(e){return rr(e,o)},"any, any":function(e,n){return r(o(e),i(n))}});function s(e){var n=e.re+1;return new a(Math.log(Math.sqrt(n*n+e.im*e.im)),Math.atan2(e.im,n))}return o})),Cc=["config","typed","matrix","addScalar","equal","subtract","abs","atan","cos","sin","multiplyScalar","inv","bignumber","multiply","add"],Tc=en("eigs",Cc,(function(e){var n=e.config,t=e.typed,r=e.matrix,i=e.addScalar,a=e.subtract,o=e.equal,s=e.abs,u=e.atan,c=e.cos,f=e.sin,l=e.multiplyScalar,p=e.inv,d=e.bignumber,m=e.multiply,h=e.add;function y(e,t){var r=e.datatype();if(void 0===r&&(r=e.getDataType()),"number"!==r&&"BigNumber"!==r&&"Fraction"!==r)throw"mixed"===r?new TypeError("Mixed matrix element type is not supported"):new TypeError("Matrix element type not supported ("+r+")");if(function(e,n){for(var t=0;t<n;t++)for(var r=t;r<n;r++)if(!o(e[t][r],e[r][t]))throw new TypeError("Input matrix is not symmetric")}(e.toArray(),t),"number"===r)return g(e.toArray());if("Fraction"===r){for(var i=e.toArray(),a=0;a<t;a++)for(var u=a;u<t;u++)i[a][u]=i[a][u].valueOf(),i[u][a]=i[a][u];return g(e.toArray())}return"BigNumber"===r?function(e){for(var t,r=e.length,i=s(n.epsilon/r),a=new Array(r),o=0;o<r;o++)a[o]=A(r,0),a[o][o]=1;var u=D(e);for(;s(u[1])>=s(i);){var c=u[0][0],f=u[0][1];t=x(e[c][c],e[f][f],e[c][f]),e=N(e,t,c,f),a=w(a,t,c,f),u=D(e)}for(var l=A(r,0),p=0;p<r;p++)l[p]=e[p][p];return E(V(l),V(a))}(e.toArray()):void 0}function g(e){for(var t,r=e.length,i=Math.abs(n.epsilon/r),a=new Array(r),o=0;o<r;o++)a[o]=A(r,0),a[o][o]=1;for(var s=M(e);Math.abs(s[1])>=Math.abs(i);){var u=s[0][0],c=s[0][1];e=S(e,t=v(e[u][u],e[c][c],e[u][c]),u,c),a=b(a,t,u,c),s=M(e)}for(var f=A(r,0),l=0;l<r;l++)f[l]=e[l][l];return E(V(f),V(a))}function v(e,t,r){var i=t-e;return Math.abs(i)<=n.epsilon?Math.PI/4:.5*Math.atan(2*r/(t-e))}function x(e,t,r){var i=a(t,e);return s(i)<=n.epsilon?d(-1).acos().div(4):l(.5,u(m(2,r,p(i))))}function b(e,n,t,r){for(var i=e.length,a=Math.cos(n),o=Math.sin(n),s=A(i,0),u=A(i,0),c=0;c<i;c++)s[c]=a*e[c][t]-o*e[c][r],u[c]=o*e[c][t]+a*e[c][r];for(var f=0;f<i;f++)e[f][t]=s[f],e[f][r]=u[f];return e}function w(e,n,t,r){for(var o=e.length,s=c(n),u=f(n),p=A(o,d(0)),m=A(o,d(0)),h=0;h<o;h++)p[h]=a(l(s,e[h][t]),l(u,e[h][r])),m[h]=i(l(u,e[h][t]),l(s,e[h][r]));for(var y=0;y<o;y++)e[y][t]=p[y],e[y][r]=m[y];return e}function N(e,n,t,r){for(var o=e.length,s=d(c(n)),u=d(f(n)),p=l(s,s),y=l(u,u),g=A(o,d(0)),v=A(o,d(0)),x=m(d(2),s,u,e[t][r]),b=i(a(l(p,e[t][t]),x),l(y,e[r][r])),w=h(l(y,e[t][t]),x,l(p,e[r][r])),N=0;N<o;N++)g[N]=a(l(s,e[t][N]),l(u,e[r][N])),v[N]=i(l(u,e[t][N]),l(s,e[r][N]));e[t][t]=b,e[r][r]=w,e[t][r]=d(0),e[r][t]=d(0);for(var S=0;S<o;S++)S!==t&&S!==r&&(e[t][S]=g[S],e[S][t]=g[S],e[r][S]=v[S],e[S][r]=v[S]);return e}function S(e,n,t,r){for(var i=e.length,a=Math.cos(n),o=Math.sin(n),s=a*a,u=o*o,c=A(i,0),f=A(i,0),l=s*e[t][t]-2*a*o*e[t][r]+u*e[r][r],p=u*e[t][t]+2*a*o*e[t][r]+s*e[r][r],d=0;d<i;d++)c[d]=a*e[t][d]-o*e[r][d],f[d]=o*e[t][d]+a*e[r][d];e[t][t]=l,e[r][r]=p,e[t][r]=0,e[r][t]=0;for(var m=0;m<i;m++)m!==t&&m!==r&&(e[t][m]=c[m],e[m][t]=c[m],e[r][m]=f[m],e[m][r]=f[m]);return e}function M(e){for(var n=e.length,t=0,r=[0,1],i=0;i<n;i++)for(var a=i+1;a<n;a++)Math.abs(t)<Math.abs(e[i][a])&&(t=Math.abs(e[i][a]),r=[i,a]);return[r,t]}function D(e){for(var n=e.length,t=0,r=[0,1],i=0;i<n;i++)for(var a=i+1;a<n;a++)s(t)<s(e[i][a])&&(t=s(e[i][a]),r=[i,a]);return[r,t]}function E(e,n){for(var t=e.length,r=Array(t),i=Array(t),a=0;a<t;a++)i[a]=Array(t);for(var o=0;o<t;o++){for(var s=0,u=e[0],c=0;c<e.length;c++)e[c]<u&&(u=e[s=c]);r[o]=e.splice(s,1)[0];for(var f=0;f<t;f++)i[f][o]=n[f][s],n[f].splice(s,1)}return[V(r),V(i)]}function A(e,n){for(var t=new Array(e),r=0;r<e;r++)t[r]=n;return t}return t("eigs",{Array:function(e){var n=r(e),t=n.size();if(2!==t.length||t[0]!==t[1])throw new RangeError("Matrix must be square (size: "+Te(t)+")");var i=y(n,t[0]);return{values:i[0],vectors:i[1]}},Matrix:function(e){var n=e.size();if(2!==n.length||n[0]!==n[1])throw new RangeError("Matrix must be square (size: "+Te(n)+")");var t=y(e,n[0]);return{values:r(t[0]),vectors:r(t[1])}}})})),Ic=["typed","add","divide"],kc=en("mean",Ic,(function(e){var n=e.typed,t=e.add,r=e.divide;return n("mean",{"Array | Matrix":i,"Array | Matrix, number | BigNumber":function(e,n){try{var i=ir(e,n,t),a=Array.isArray(e)?Pe(e):e.size();return r(i,a[n])}catch(e){throw eu(e,"mean")}},"...":function(e){if(nr(e))throw new TypeError("Scalar values expected in function mean");return i(e)}});function i(e){var n,i=0;if(tr(e,(function(e){try{n=void 0===n?e:t(n,e),i++}catch(n){throw eu(n,"mean",e)}})),0===i)throw new Error("Cannot calculate the mean of an empty array");return r(n,i)}})),Bc=["typed","sqrt","variance"],qc=en("std",Bc,(function(e){var n=e.typed,t=e.sqrt,r=e.variance;return n("std",{"Array | Matrix":i,"Array | Matrix, string":i,"Array | Matrix, number | BigNumber":i,"Array | Matrix, number | BigNumber, string":i,"...":function(e){return i(e)}});function i(e,n){if(0===e.length)throw new SyntaxError("Function std requires one or more parameters (0 provided)");try{return t(r.apply(null,arguments))}catch(e){throw e instanceof TypeError&&-1!==e.message.indexOf(" variance")?new TypeError(e.message.replace(" variance"," std")):e}}})),Rc=["typed","abs","add","multiply","sqrt","subtract","inv","size","max","identity"],Pc=en("sqrtm",Rc,(function(e){var n=e.typed,t=e.abs,r=e.add,i=e.multiply,a=e.sqrt,o=e.subtract,s=e.inv,u=e.size,c=e.max,f=e.identity,l=n("sqrtm",{"Array | Matrix":function(e){var n=d(e)?e.size():Pe(e);switch(n.length){case 1:if(1===n[0])return a(e);throw new RangeError("Matrix must be square (size: "+Te(n)+")");case 2:if(n[0]===n[1])return p(e);throw new RangeError("Matrix must be square (size: "+Te(n)+")")}}});function p(e){var n,a=0,l=e,p=f(u(e));do{var d=l;if(l=i(.5,r(d,s(p))),p=i(.5,r(p,s(d))),(n=c(t(o(l,d))))>1e-6&&++a>1e3)throw new Error("computing square root of matrix: iterative method could not converge")}while(n>1e-6);return l}return l})),zc=["typed","add","divide","multiply","factorial","isInteger","isPositive"],Fc=en("multinomial",zc,(function(e){var n=e.typed,t=e.add,r=e.divide,i=e.multiply,a=e.factorial,o=e.isInteger,s=e.isPositive;return n("multinomial",{"Array | Matrix":function(e){var n=0,u=1;return tr(e,(function(e){if(!o(e)||!s(e))throw new TypeError("Positive integer value expected in function multinomial");n=t(n,e),u=i(u,a(e))})),r(a(n),u)}})})),jc=["typed","abs","map","median","subtract"],Uc=en("mad",jc,(function(e){var n=e.typed,t=e.abs,r=e.map,i=e.median,a=e.subtract;return n("mad",{"Array | Matrix":o,"...":function(e){return o(e)}});function o(e){if(0===(e=Ge(e.valueOf())).length)throw new Error("Cannot calculate median absolute deviation (mad) of an empty array");try{var n=i(e);return i(r(e,(function(e){return t(a(e,n))})))}catch(e){throw e instanceof TypeError&&-1!==e.message.indexOf("median")?new TypeError(e.message.replace("median","mad")):eu(e,"mad")}}})),Lc=rn({}),Hc=un({}),Gc=cn({}),$c=Nn({}),Vc=Sn({}),Wc=wn({}),Zc=Hn({config:ae}),Jc=Gn({}),Yc=$n({}),Xc=Rn({Complex:Hc}),Qc=Tn({BigNumber:Zc,config:ae}),Kc=kn({BigNumber:Zc,config:ae}),ef=Dn({BigNumber:Zc,config:ae}),nf=En({BigNumber:Zc,config:ae}),tf=Bn({BigNumber:Zc,config:ae}),rf=An({BigNumber:Zc,config:ae}),af=bt({BigNumber:Zc,config:ae}),of=lt({BigNumber:Zc,config:ae}),sf=Ct({BigNumber:Zc,config:ae}),uf=xt({BigNumber:Zc,config:ae}),cf=Vt({}),ff=_n({BigNumber:Zc,config:ae}),lf=Mn({BigNumber:Zc,config:ae}),pf=In({BigNumber:Zc,config:ae}),df=Fn({}),mf=Wt({Matrix:Jc}),hf=On({BigNumber:Zc,config:ae}),yf=Xt({BigNumber:Zc,Complex:Hc,DenseMatrix:mf,Fraction:cf}),gf=sr({typed:yf}),vf=ur({typed:yf}),xf=dr({typed:yf}),bf=mr({typed:yf}),wf=yr({config:ae,typed:yf}),Nf=gr({typed:yf}),Sf=vr({typed:yf}),Mf=xr({Complex:Hc,typed:yf}),Df=br({typed:yf}),Ef=Gr({BigNumber:Zc,config:ae,typed:yf}),Af=$r({isInteger:gf,typed:yf}),_f=Wr({typed:yf}),Of=Zr({Complex:Hc,typed:yf}),Cf=Jr({Complex:Hc,config:ae,typed:yf}),Tf=Yr({typed:yf}),If=Xr({BigNumber:Zc,Fraction:cf,complex:Mf,typed:yf}),kf=Qr({typed:yf}),Bf=hi({typed:yf}),qf=yi({typed:yf}),Rf=gi({typed:yf}),Pf=Ni({typed:yf}),zf=Si({typed:yf}),Ff=Di({typed:yf}),jf=Ai({typed:yf}),Uf=Oi({typed:yf}),Lf=qi({typed:yf}),Hf=Ri({typed:yf}),Gf=Pi({Complex:Hc,config:ae,typed:yf}),$f=ea({BigNumber:Zc,typed:yf}),Vf=na({BigNumber:Zc,Complex:Hc,config:ae,typed:yf}),Wf=ta({BigNumber:Zc,Complex:Hc,config:ae,typed:yf}),Zf=ra({Complex:Hc,config:ae,typed:yf}),Jf=ia({typed:yf}),Yf=aa({Complex:Hc,config:ae,typed:yf}),Xf=oa({typed:yf}),Qf=sa({BigNumber:Zc,typed:yf}),Kf=ua({BigNumber:Zc,typed:yf}),el=ca({BigNumber:Zc,typed:yf}),nl=fa({typed:yf}),tl=la({typed:yf}),rl=ma({typed:yf}),il=ba({config:ae,typed:yf}),al=Na({config:ae,typed:yf}),ol=Cn({BigNumber:Zc,config:ae}),sl=Sa({typed:yf}),ul=Ma({isNumeric:vf,typed:yf}),cl=Da({typed:yf}),fl=Ea({typed:yf}),ll=Aa({Fraction:cf,typed:yf}),pl=_a({typed:yf}),dl=Oa({typed:yf}),ml=Ca({typed:yf}),hl=Ta({Complex:Hc,config:ae,typed:yf}),yl=Ia({Complex:Hc,config:ae,typed:yf}),gl=ka({typed:yf}),vl=Ba({typed:yf}),xl=qa({isNaN:bf,isNumeric:vf,typed:yf}),bl=Ra({typed:yf}),wl=za({Complex:Hc,config:ae,typed:yf}),Nl=Fa({BigNumber:Zc,typed:yf}),Sl=ja({typed:yf}),Ml=Ua({typed:yf}),Dl=La({BigNumber:Zc,typed:yf}),El=Ha({typed:yf}),Al=Ga({typed:yf}),_l=Va({config:ae,typed:yf}),Ol=qn({BigNumber:Zc,config:ae}),Cl=Wa({typed:yf}),Tl=Za({Matrix:Jc,equalScalar:wf,typed:yf}),Il=Ja({DenseMatrix:mf,Matrix:Jc,SparseMatrix:Tl,typed:yf}),kl=Ya({BigNumber:Zc,Complex:Hc,Fraction:cf,config:ae,isNegative:Cl,matrix:Il,typed:yf,unaryMinus:pl}),Bl=to({BigNumber:Zc,DenseMatrix:mf,equalScalar:wf,matrix:Il,typed:yf}),ql=uo({DenseMatrix:mf,equalScalar:wf,matrix:Il,typed:yf}),Rl=fo({BigNumber:Zc,equalScalar:wf,matrix:Il,typed:yf}),Pl=lo({BigNumber:Zc,config:ae,matrix:Il,typed:yf}),zl=po({equalScalar:wf,matrix:Il,typed:yf}),Fl=ho({DenseMatrix:mf,matrix:Il,typed:yf}),jl=yo({DenseMatrix:mf,equalScalar:wf,matrix:Il,typed:yf}),Ul=go({isInteger:gf,matrix:Il,typed:yf}),Ll=xo({DenseMatrix:mf,SparseMatrix:Tl,matrix:Il,typed:yf}),Hl=bo({BigNumber:Zc,DenseMatrix:mf,SparseMatrix:Tl,config:ae,matrix:Il,typed:yf}),Gl=wo({BigNumber:Zc,config:ae,matrix:Il,typed:yf}),$l=No({isInteger:gf,matrix:Il,typed:yf}),Vl=Eo({matrix:Il,config:ae,typed:yf}),Wl=qo({matrix:Il,typed:yf}),Zl=jo({BigNumber:Zc,config:ae,matrix:Il,typed:yf}),Jl=Uo({matrix:Il,typed:yf}),Yl=Vo({BigNumber:Zc,DenseMatrix:mf,equalScalar:wf,matrix:Il,typed:yf,zeros:Zl}),Xl=Jo({DenseMatrix:mf,equalScalar:wf,matrix:Il,typed:yf,zeros:Zl}),Ql=Yo({DenseMatrix:mf,equalScalar:wf,matrix:Il,typed:yf,zeros:Zl}),Kl=Xo({BigNumber:Zc,DenseMatrix:mf,Fraction:cf,config:ae,equalScalar:wf,matrix:Il,typed:yf}),ep=Qo({matrix:Il,typed:yf}),np=Ko({DenseMatrix:mf,config:ae,matrix:Il,typed:yf}),tp=es({DenseMatrix:mf,config:ae,matrix:Il,typed:yf}),rp=ns({DenseMatrix:mf,config:ae,equalScalar:wf,matrix:Il,typed:yf}),ip=ts({DenseMatrix:mf,smaller:np}),ap=rs({larger:tp,smaller:np}),op=is({SparseMatrix:Tl,typed:yf}),sp=as({BigNumber:Zc,Complex:Hc,config:ae,typed:yf}),up=ss({BigNumber:Zc,DenseMatrix:mf,equalScalar:wf,matrix:Il,typed:yf}),cp=us({BigNumber:Zc,typed:yf}),fp=cs({DenseMatrix:mf,SparseMatrix:Tl,addScalar:dl,equalScalar:wf,matrix:Il,typed:yf}),lp=fs({addScalar:dl,conj:gl,multiplyScalar:Tf,size:Vl,typed:yf}),pp=ls({addScalar:dl,combinations:rl,isInteger:gf,isNegative:Cl,isPositive:xf,larger:tp,typed:yf}),dp=ps({typed:yf}),mp=ds({typed:yf}),hp=ms({config:ae,round:Yl,typed:yf}),yp=hs({addScalar:dl,dot:lp,equalScalar:wf,matrix:Il,multiplyScalar:Tf,typed:yf}),gp=ys({equalScalar:wf,matrix:Il,multiplyScalar:Tf,typed:yf}),vp=gs({typed:yf}),xp=vs({matrix:Il,typed:yf}),bp=bs({config:ae,matrix:Il}),wp=ws({matrix:Il,typed:yf}),Np=Ns({Complex:Hc,config:ae,fraction:ll,identity:Hl,matrix:Il,multiply:yp,number:Nf,typed:yf}),Sp=Ss({DenseMatrix:mf,equalScalar:wf,matrix:Il,pow:Np,typed:yf}),Mp=Ms({DenseMatrix:mf,equalScalar:wf,matrix:Il,typed:yf,zeros:Zl}),Dp=As({compare:Kl,typed:yf}),Ep=_s({compareText:ep,isZero:dp,typed:yf}),Ap=Os({DenseMatrix:mf,config:ae,matrix:Il,typed:yf}),_p=Cs({compare:Kl,isNaN:bf,isNumeric:vf,typed:yf}),Op=Ts({ImmutableDenseMatrix:ip}),Cp=Is({BigNumber:Zc,Complex:Hc,config:ae,typed:yf}),Tp=ks({typed:yf}),Ip=Bs({DenseMatrix:mf,Index:Op,compareNatural:Dp,size:Vl,subset:Wl,typed:yf}),kp=qs({DenseMatrix:mf,Index:Op,compareNatural:Dp,size:Vl,subset:Wl,typed:yf}),Bp=Rs({Index:Op,compareNatural:Dp,size:Vl,subset:Wl,typed:yf}),qp=Ps({compareNatural:Dp,typed:yf}),Rp=zs({abs:mp,add:fp,conj:gl,equalScalar:wf,larger:tp,matrix:Il,multiply:yp,pow:Np,smaller:np,sqrt:yl,typed:yf}),Pp=Fs({Index:Op,typed:yf}),zp=js({add:fp,compare:Kl,multiply:yp,partitionSelect:_p,typed:yf}),Fp=Gs({BigNumber:Zc,Complex:Hc,config:ae,multiplyScalar:Tf,pow:Np,typed:yf}),jp=$s({BigNumber:Zc,typed:yf}),Up=Vs({equalScalar:wf,matrix:Il,typed:yf}),Lp=Ws({DenseMatrix:mf,equalScalar:wf,matrix:Il,typed:yf}),Hp=Zs({matrix:Il,multiplyScalar:Tf,typed:yf}),Gp=Js({matrix:Il,typed:yf}),$p=Ys({bignumber:jp,fraction:ll,number:Nf}),Vp=Xs({equalScalar:wf,matrix:Il,not:Pf,typed:yf,zeros:Zl}),Wp=Qs({DenseMatrix:mf,config:ae,matrix:Il,typed:yf}),Zp=Ks({compare:Kl,compareNatural:Dp,matrix:Il,typed:yf}),Jp=nu({config:ae,numeric:$p,smaller:np,typed:yf}),Yp=tu({BigNumber:Zc,typed:yf}),Xp=ru({DenseMatrix:mf,Index:Op,compareNatural:Dp,size:Vl,subset:Wl,typed:yf}),Qp=iu({Index:Op,compareNatural:Dp,size:Vl,subset:Wl,typed:yf}),Kp=au({add:fp,matrix:Il,typed:yf}),ed=ou({add:fp,config:ae,numeric:$p,typed:yf}),nd=su({gamma:Fp,typed:yf}),td=uu({factorial:nd,typed:yf}),rd=fu({config:ae,round:Yl,typed:yf}),id=lu({DenseMatrix:mf,addScalar:dl,equalScalar:wf,matrix:Il,typed:yf,unaryMinus:pl}),ad=du({matrix:Il,multiply:yp,subtract:id,typed:yf}),od=mu({conj:gl,transpose:Gp,typed:yf}),sd=hu({numeric:$p,typed:yf}),ud=yu({Complex:Hc,config:ae,divideScalar:sd,typed:yf}),cd=vu({DenseMatrix:mf,divideScalar:sd,equalScalar:wf,matrix:Il,multiplyScalar:Tf,subtract:id,typed:yf}),fd=xu({DenseMatrix:mf,equalScalar:wf,matrix:Il,typed:yf}),ld=bu({config:ae,larger:tp,numeric:$p,typed:yf}),pd=wu({DenseMatrix:mf,Index:Op,compareNatural:Dp,size:Vl,subset:Wl,typed:yf}),dd=Nu({Index:Op,concat:Ul,setDifference:Ip,size:Vl,subset:Wl,typed:yf}),md=Su({abs:mp,addScalar:dl,divideScalar:sd,isPositive:xf,multiplyScalar:Tf,smaller:np,sqrt:yl,typed:yf}),hd=Du({addScalar:dl,complex:Mf,conj:gl,divideScalar:sd,equal:fd,identity:Hl,isZero:dp,matrix:Il,multiplyScalar:Tf,sign:If,sqrt:yl,subtract:id,typed:yf,unaryMinus:pl,zeros:Zl}),yd=Eu({abs:mp,addScalar:dl,divideScalar:sd,multiplyScalar:Tf,sqrt:yl,subtract:id,typed:yf,unaryMinus:pl}),gd=Au({addScalar:dl,combinations:rl,divideScalar:sd,factorial:nd,isInteger:gf,isNegative:Cl,larger:tp,multiplyScalar:Tf,pow:Np,subtract:id,typed:yf}),vd=_u({addScalar:dl,combinations:rl,divideScalar:sd,isInteger:gf,isNegative:Cl,multiplyScalar:Tf,typed:yf}),xd=Ou({Complex:Hc,ceil:rd,floor:hp,typed:yf}),bd=Cu({bignumber:jp,matrix:Il,config:ae,larger:tp,largerEq:Ap,smaller:np,smallerEq:Wp,typed:yf}),wd=Tu({config:ae,multiplyScalar:Tf,numeric:$p,typed:yf}),Nd=Iu({DenseMatrix:mf,divideScalar:sd,equalScalar:wf,matrix:Il,typed:yf}),Sd=ku({equal:fd,typed:yf}),Md=Fu({BigNumber:Zc,Complex:Hc,Fraction:cf,abs:mp,addScalar:dl,config:ae,divideScalar:sd,equal:fd,fix:xd,format:Lf,isNumeric:vf,multiplyScalar:Tf,number:Nf,pow:Np,round:Yl,subtract:id}),Dd=ju({Unit:Md,typed:yf}),Ed=Uu({Index:Op,concat:Ul,setIntersect:kp,setSymDifference:dd,size:Vl,subset:Wl,typed:yf}),Ad=ec({SparseMatrix:Tl,abs:mp,add:fp,divideScalar:sd,larger:tp,largerEq:Ap,multiply:yp,subtract:id,transpose:Gp,typed:yf}),_d=nc({abs:mp,add:fp,addScalar:dl,config:ae,divideScalar:sd,equalScalar:wf,matrix:Il,multiply:yp,multiplyScalar:Tf,smaller:np,subtract:id,typed:yf}),Od=tc({addScalar:dl,isInteger:gf,isNegative:Cl,stirlingS2:gd,typed:yf}),Cd=wt({BigNumber:Zc,Unit:Md,config:ae}),Td=nt({BigNumber:Zc,Unit:Md,config:ae}),Id=St({BigNumber:Zc,Unit:Md,config:ae}),kd=tt({BigNumber:Zc,Unit:Md,config:ae}),Bd=mt({BigNumber:Zc,Unit:Md,config:ae}),qd=ct({BigNumber:Zc,Unit:Md,config:ae}),Rd=Mt({BigNumber:Zc,Unit:Md,config:ae}),Pd=Dt({BigNumber:Zc,Unit:Md,config:ae}),zd=Wn({BigNumber:Zc,Unit:Md,config:ae}),Fd=pt({BigNumber:Zc,Unit:Md,config:ae}),jd=ot({BigNumber:Zc,Unit:Md,config:ae}),Ud=Yn({BigNumber:Zc,Unit:Md,config:ae}),Ld=Bt({BigNumber:Zc,Unit:Md,config:ae}),Hd=_t({BigNumber:Zc,Unit:Md,config:ae}),Gd=ht({BigNumber:Zc,Unit:Md,config:ae}),$d=jt({BigNumber:Zc,Unit:Md,config:ae}),Vd=Pt({BigNumber:Zc,Unit:Md,config:ae}),Wd=Ut({BigNumber:Zc,Unit:Md,config:ae}),Zd=dt({BigNumber:Zc,Unit:Md,config:ae}),Jd=Jn({BigNumber:Zc,Unit:Md,config:ae}),Yd=Tt({BigNumber:Zc,Unit:Md,config:ae}),Xd=It({BigNumber:Zc,Unit:Md,config:ae}),Qd=Qn({BigNumber:Zc,Unit:Md,config:ae}),Kd=rc({DenseMatrix:mf,matrix:Il,typed:yf}),em=ic({Index:Op,matrix:Il,range:bd,typed:yf}),nm=ac({DenseMatrix:mf,divideScalar:sd,equalScalar:wf,matrix:Il,multiplyScalar:Tf,subtract:id,typed:yf}),tm=oc({Unit:Md,typed:yf}),rm=Nt({BigNumber:Zc,Unit:Md,config:ae}),im=ut({BigNumber:Zc,Unit:Md,config:ae}),am=Xn({BigNumber:Zc,Unit:Md,config:ae}),om=ft({BigNumber:Zc,Unit:Md,config:ae}),sm=Rt({BigNumber:Zc,Unit:Md,config:ae}),um=Et({BigNumber:Zc,Unit:Md,config:ae}),cm=qt({BigNumber:Zc,Unit:Md,config:ae}),fm=at({BigNumber:Zc,Unit:Md,config:ae}),lm=zt({BigNumber:Zc,Unit:Md,config:ae}),pm=yt({BigNumber:Zc,Unit:Md,config:ae}),dm=Vn({BigNumber:Zc,Unit:Md,config:ae}),mm=kt({BigNumber:Zc,Unit:Md,config:ae}),hm=sc({Index:Op,matrix:Il,range:bd,typed:yf}),ym=uc({FibonacciHeap:ap,addScalar:dl,equalScalar:wf}),gm=cc({DenseMatrix:mf,Spa:ym,SparseMatrix:Tl,abs:mp,addScalar:dl,divideScalar:sd,equalScalar:wf,larger:tp,matrix:Il,multiplyScalar:Tf,subtract:id,typed:yf,unaryMinus:pl}),vm=fc({lup:gm,matrix:Il,multiply:yp,subtract:id,typed:yf,unaryMinus:pl}),xm=st({BigNumber:Zc,Unit:Md,config:ae}),bm=et({BigNumber:Zc,Unit:Md,config:ae}),wm=rt({BigNumber:Zc,Unit:Md,config:ae}),Nm=Ot({BigNumber:Zc,Unit:Md,config:ae}),Sm=Ft({BigNumber:Zc,Unit:Md,config:ae}),Mm=vt({BigNumber:Zc,Unit:Md,config:ae}),Dm=lc({Complex:Hc,config:ae,divideScalar:sd,typed:yf}),Em=pc({Index:Op,compareNatural:Dp,size:Vl,subset:Wl,typed:yf}),Am=hc({DenseMatrix:mf,lsolve:cd,lup:gm,matrix:Il,slu:Ad,typed:yf,usolve:nm}),_m=gc({abs:mp,addScalar:dl,det:vm,divideScalar:sd,identity:Hl,matrix:Il,multiply:yp,typed:yf,unaryMinus:pl}),Om=xc({abs:mp,add:fp,identity:Hl,inv:_m,multiply:yp,typed:yf}),Cm=wc({divideScalar:sd,equalScalar:wf,inv:_m,matrix:Il,multiply:yp,typed:yf}),Tm=Sc({add:fp,compare:Kl,divide:Cm,partitionSelect:_p,typed:yf}),Im=Dc({add:fp,apply:Af,divide:Cm,isNaN:bf,multiply:yp,subtract:id,typed:yf}),km=Ac({divide:Cm,dotDivide:Nd,isNumeric:vf,log:Dm,matrix:Il,multiply:yp,sum:ed,typed:yf}),Bm=Kn({BigNumber:Zc,Unit:Md,config:ae}),qm=it({BigNumber:Zc,Unit:Md,config:ae}),Rm=gt({BigNumber:Zc,Unit:Md,config:ae}),Pm=Oc({Complex:Hc,config:ae,divideScalar:sd,log:Dm,typed:yf}),zm=Tc({abs:mp,add:fp,addScalar:dl,atan:Jf,bignumber:jp,config:ae,cos:Ml,equal:fd,inv:_m,matrix:Il,multiply:yp,multiplyScalar:Tf,sin:El,subtract:id,typed:yf}),Fm=kc({add:fp,divide:Cm,typed:yf}),jm=qc({sqrt:yl,typed:yf,variance:Im}),Um=At({BigNumber:Zc,Unit:Md,config:ae}),Lm=Pc({abs:mp,add:fp,identity:Hl,inv:_m,max:ld,multiply:yp,size:Vl,sqrt:yl,subtract:id,typed:yf}),Hm=Fc({add:fp,divide:Cm,factorial:nd,isInteger:gf,isPositive:xf,multiply:yp,typed:yf}),Gm=Zn({BigNumber:Zc,Unit:Md,config:ae}),$m=Uc({abs:mp,map:jf,median:Tm,subtract:id,typed:yf}),Vm={end:!0};function Wm(e){return(Wm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var Zm=en("Node",["mathWithTransform"],(function(e){var n=e.mathWithTransform;function t(){if(!(this instanceof t))throw new SyntaxError("Constructor must be called with the new operator")}return t.prototype.evaluate=function(e){return this.compile().evaluate(e)},t.prototype.type="Node",t.prototype.isNode=!0,t.prototype.comment="",t.prototype.compile=function(){var e=this._compile(n,{}),t={};return{evaluate:function(n){var r=n||{};return function(e){for(var n in e)if(Q(e,n)&&n in Vm)throw new Error('Scope contains an illegal symbol, "'+n+'" is a reserved keyword')}(r),e(r,t,null)}}},t.prototype._compile=function(e,n){throw new Error("Method _compile should be implemented by type "+this.type)},t.prototype.forEach=function(e){throw new Error("Cannot run forEach on a Node interface")},t.prototype.map=function(e){throw new Error("Cannot run map on a Node interface")},t.prototype._ifNode=function(e){if(!P(e))throw new TypeError("Callback function must return a Node");return e},t.prototype.traverse=function(e){e(this,null,null),function e(n,t){n.forEach((function(n,r,i){t(n,r,i),e(n,t)}))}(this,e)},t.prototype.transform=function(e){return function n(t,r,i){var a=e(t,r,i);return a!==t?a:t.map(n)}(this,null,null)},t.prototype.filter=function(e){var n=[];return this.traverse((function(t,r,i){e(t,r,i)&&n.push(t)})),n},t.prototype.clone=function(){throw new Error("Cannot clone a Node interface")},t.prototype.cloneDeep=function(){return this.map((function(e){return e.cloneDeep()}))},t.prototype.equals=function(e){return!!e&&J(this,e)},t.prototype.toString=function(e){var n;if(e&&"object"===Wm(e))switch(Wm(e.handler)){case"object":case"undefined":break;case"function":n=e.handler(this,e);break;default:throw new TypeError("Object or function expected as callback")}return void 0!==n?n:this._toString(e)},t.prototype.toJSON=function(){throw new Error("Cannot serialize object: toJSON not implemented by "+this.type)},t.prototype.toHTML=function(e){var n;if(e&&"object"===Wm(e))switch(Wm(e.handler)){case"object":case"undefined":break;case"function":n=e.handler(this,e);break;default:throw new TypeError("Object or function expected as callback")}return void 0!==n?n:this.toHTML(e)},t.prototype._toString=function(){throw new Error("_toString not implemented for "+this.type)},t.prototype.toTex=function(e){var n;if(e&&"object"===Wm(e))switch(Wm(e.handler)){case"object":case"undefined":break;case"function":n=e.handler(this,e);break;default:throw new TypeError("Object or function expected as callback")}return void 0!==n?n:this._toTex(e)},t.prototype._toTex=function(e){throw new Error("_toTex not implemented for "+this.type)},t.prototype.getIdentifier=function(){return this.type},t.prototype.getContent=function(){return this},t}),{isClass:!0,isNode:!0}),Jm=en("ArrayNode",["Node"],(function(e){var n=e.Node;function t(e){if(!(this instanceof t))throw new SyntaxError("Constructor must be called with the new operator");if(this.items=e||[],!Array.isArray(this.items)||!this.items.every(P))throw new TypeError("Array containing Nodes expected")}return t.prototype=new n,t.prototype.type="ArrayNode",t.prototype.isArrayNode=!0,t.prototype._compile=function(e,n){var t=$e(this.items,(function(t){return t._compile(e,n)}));if("Array"!==e.config.matrix){var r=e.matrix;return function(e,n,i){return r($e(t,(function(t){return t(e,n,i)})))}}return function(e,n,r){return $e(t,(function(t){return t(e,n,r)}))}},t.prototype.forEach=function(e){for(var n=0;n<this.items.length;n++){e(this.items[n],"items["+n+"]",this)}},t.prototype.map=function(e){for(var n=[],r=0;r<this.items.length;r++)n[r]=this._ifNode(e(this.items[r],"items["+r+"]",this));return new t(n)},t.prototype.clone=function(){return new t(this.items.slice(0))},t.prototype._toString=function(e){return"["+this.items.map((function(n){return n.toString(e)})).join(", ")+"]"},t.prototype.toJSON=function(){return{mathjs:"ArrayNode",items:this.items}},t.fromJSON=function(e){return new t(e.items)},t.prototype.toHTML=function(e){return'<span class="math-parenthesis math-square-parenthesis">[</span>'+this.items.map((function(n){return n.toHTML(e)})).join('<span class="math-separator">,</span>')+'<span class="math-parenthesis math-square-parenthesis">]</span>'},t.prototype._toTex=function(e){var n="\\begin{bmatrix}";return this.items.forEach((function(t){t.items?n+=t.items.map((function(n){return n.toTex(e)})).join("&"):n+=t.toTex(e),n+="\\\\"})),n+="\\end{bmatrix}"},t}),{isClass:!0,isNode:!0}),Ym=en("BlockNode",["ResultSet","Node"],(function(e){var n=e.ResultSet,t=e.Node;function r(e){if(!(this instanceof r))throw new SyntaxError("Constructor must be called with the new operator");if(!Array.isArray(e))throw new Error("Array expected");this.blocks=e.map((function(e){var n=e&&e.node,t=!e||void 0===e.visible||e.visible;if(!P(n))throw new TypeError('Property "node" must be a Node');if("boolean"!=typeof t)throw new TypeError('Property "visible" must be a boolean');return{node:n,visible:t}}))}return r.prototype=new t,r.prototype.type="BlockNode",r.prototype.isBlockNode=!0,r.prototype._compile=function(e,t){var r=$e(this.blocks,(function(n){return{evaluate:n.node._compile(e,t),visible:n.visible}}));return function(e,t,i){var a=[];return Ve(r,(function(n){var r=n.evaluate(e,t,i);n.visible&&a.push(r)})),new n(a)}},r.prototype.forEach=function(e){for(var n=0;n<this.blocks.length;n++)e(this.blocks[n].node,"blocks["+n+"].node",this)},r.prototype.map=function(e){for(var n=[],t=0;t<this.blocks.length;t++){var i=this.blocks[t],a=this._ifNode(e(i.node,"blocks["+t+"].node",this));n[t]={node:a,visible:i.visible}}return new r(n)},r.prototype.clone=function(){return new r(this.blocks.map((function(e){return{node:e.node,visible:e.visible}})))},r.prototype._toString=function(e){return this.blocks.map((function(n){return n.node.toString(e)+(n.visible?"":";")})).join("\n")},r.prototype.toJSON=function(){return{mathjs:"BlockNode",blocks:this.blocks}},r.fromJSON=function(e){return new r(e.blocks)},r.prototype.toHTML=function(e){return this.blocks.map((function(n){return n.node.toHTML(e)+(n.visible?"":'<span class="math-separator">;</span>')})).join('<span class="math-separator"><br /></span>')},r.prototype._toTex=function(e){return this.blocks.map((function(n){return n.node.toTex(e)+(n.visible?"":";")})).join("\\;\\;\n")},r}),{isClass:!0,isNode:!0}),Xm=t(151),Qm=t.n(Xm),Km={Alpha:"A",alpha:"\\alpha",Beta:"B",beta:"\\beta",Gamma:"\\Gamma",gamma:"\\gamma",Delta:"\\Delta",delta:"\\delta",Epsilon:"E",epsilon:"\\epsilon",varepsilon:"\\varepsilon",Zeta:"Z",zeta:"\\zeta",Eta:"H",eta:"\\eta",Theta:"\\Theta",theta:"\\theta",vartheta:"\\vartheta",Iota:"I",iota:"\\iota",Kappa:"K",kappa:"\\kappa",varkappa:"\\varkappa",Lambda:"\\Lambda",lambda:"\\lambda",Mu:"M",mu:"\\mu",Nu:"N",nu:"\\nu",Xi:"\\Xi",xi:"\\xi",Omicron:"O",omicron:"o",Pi:"\\Pi",pi:"\\pi",varpi:"\\varpi",Rho:"P",rho:"\\rho",varrho:"\\varrho",Sigma:"\\Sigma",sigma:"\\sigma",varsigma:"\\varsigma",Tau:"T",tau:"\\tau",Upsilon:"\\Upsilon",upsilon:"\\upsilon",Phi:"\\Phi",phi:"\\phi",varphi:"\\varphi",Chi:"X",chi:"\\chi",Psi:"\\Psi",psi:"\\psi",Omega:"\\Omega",omega:"\\omega",true:"\\mathrm{True}",false:"\\mathrm{False}",i:"i",inf:"\\infty",Inf:"\\infty",infinity:"\\infty",Infinity:"\\infty",oo:"\\infty",lim:"\\lim",undefined:"\\mathbf{?}"},eh={transpose:"^\\top",ctranspose:"^H",factorial:"!",pow:"^",dotPow:".^\\wedge",unaryPlus:"+",unaryMinus:"-",bitNot:"\\~",not:"\\neg",multiply:"\\cdot",divide:"\\frac",dotMultiply:".\\cdot",dotDivide:".:",mod:"\\mod",add:"+",subtract:"-",to:"\\rightarrow",leftShift:"<<",rightArithShift:">>",rightLogShift:">>>",equal:"=",unequal:"\\neq",smaller:"<",larger:">",smallerEq:"\\leq",largerEq:"\\geq",bitAnd:"\\&",bitXor:"\\underline{|}",bitOr:"|",and:"\\wedge",xor:"\\veebar",or:"\\vee"},nh={abs:{1:"\\left|${args[0]}\\right|"},add:{2:"\\left(${args[0]}".concat(eh.add,"${args[1]}\\right)")},cbrt:{1:"\\sqrt[3]{${args[0]}}"},ceil:{1:"\\left\\lceil${args[0]}\\right\\rceil"},cube:{1:"\\left(${args[0]}\\right)^3"},divide:{2:"\\frac{${args[0]}}{${args[1]}}"},dotDivide:{2:"\\left(${args[0]}".concat(eh.dotDivide,"${args[1]}\\right)")},dotMultiply:{2:"\\left(${args[0]}".concat(eh.dotMultiply,"${args[1]}\\right)")},dotPow:{2:"\\left(${args[0]}".concat(eh.dotPow,"${args[1]}\\right)")},exp:{1:"\\exp\\left(${args[0]}\\right)"},expm1:"\\left(e".concat(eh.pow,"{${args[0]}}-1\\right)"),fix:{1:"\\mathrm{${name}}\\left(${args[0]}\\right)"},floor:{1:"\\left\\lfloor${args[0]}\\right\\rfloor"},gcd:"\\gcd\\left(${args}\\right)",hypot:"\\hypot\\left(${args}\\right)",log:{1:"\\ln\\left(${args[0]}\\right)",2:"\\log_{${args[1]}}\\left(${args[0]}\\right)"},log10:{1:"\\log_{10}\\left(${args[0]}\\right)"},log1p:{1:"\\ln\\left(${args[0]}+1\\right)",2:"\\log_{${args[1]}}\\left(${args[0]}+1\\right)"},log2:"\\log_{2}\\left(${args[0]}\\right)",mod:{2:"\\left(${args[0]}".concat(eh.mod,"${args[1]}\\right)")},multiply:{2:"\\left(${args[0]}".concat(eh.multiply,"${args[1]}\\right)")},norm:{1:"\\left\\|${args[0]}\\right\\|",2:void 0},nthRoot:{2:"\\sqrt[${args[1]}]{${args[0]}}"},nthRoots:{2:"\\{y : $y^{args[1]} = {${args[0]}}\\}"},pow:{2:"\\left(${args[0]}\\right)".concat(eh.pow,"{${args[1]}}")},round:{1:"\\left\\lfloor${args[0]}\\right\\rceil",2:void 0},sign:{1:"\\mathrm{${name}}\\left(${args[0]}\\right)"},sqrt:{1:"\\sqrt{${args[0]}}"},square:{1:"\\left(${args[0]}\\right)^2"},subtract:{2:"\\left(${args[0]}".concat(eh.subtract,"${args[1]}\\right)")},unaryMinus:{1:"".concat(eh.unaryMinus,"\\left(${args[0]}\\right)")},unaryPlus:{1:"".concat(eh.unaryPlus,"\\left(${args[0]}\\right)")},bitAnd:{2:"\\left(${args[0]}".concat(eh.bitAnd,"${args[1]}\\right)")},bitNot:{1:eh.bitNot+"\\left(${args[0]}\\right)"},bitOr:{2:"\\left(${args[0]}".concat(eh.bitOr,"${args[1]}\\right)")},bitXor:{2:"\\left(${args[0]}".concat(eh.bitXor,"${args[1]}\\right)")},leftShift:{2:"\\left(${args[0]}".concat(eh.leftShift,"${args[1]}\\right)")},rightArithShift:{2:"\\left(${args[0]}".concat(eh.rightArithShift,"${args[1]}\\right)")},rightLogShift:{2:"\\left(${args[0]}".concat(eh.rightLogShift,"${args[1]}\\right)")},bellNumbers:{1:"\\mathrm{B}_{${args[0]}}"},catalan:{1:"\\mathrm{C}_{${args[0]}}"},stirlingS2:{2:"\\mathrm{S}\\left(${args}\\right)"},arg:{1:"\\arg\\left(${args[0]}\\right)"},conj:{1:"\\left(${args[0]}\\right)^*"},im:{1:"\\Im\\left\\lbrace${args[0]}\\right\\rbrace"},re:{1:"\\Re\\left\\lbrace${args[0]}\\right\\rbrace"},and:{2:"\\left(${args[0]}".concat(eh.and,"${args[1]}\\right)")},not:{1:eh.not+"\\left(${args[0]}\\right)"},or:{2:"\\left(${args[0]}".concat(eh.or,"${args[1]}\\right)")},xor:{2:"\\left(${args[0]}".concat(eh.xor,"${args[1]}\\right)")},cross:{2:"\\left(${args[0]}\\right)\\times\\left(${args[1]}\\right)"},ctranspose:{1:"\\left(${args[0]}\\right)".concat(eh.ctranspose)},det:{1:"\\det\\left(${args[0]}\\right)"},dot:{2:"\\left(${args[0]}\\cdot${args[1]}\\right)"},expm:{1:"\\exp\\left(${args[0]}\\right)"},inv:{1:"\\left(${args[0]}\\right)^{-1}"},sqrtm:{1:"{${args[0]}}".concat(eh.pow,"{\\frac{1}{2}}")},trace:{1:"\\mathrm{tr}\\left(${args[0]}\\right)"},transpose:{1:"\\left(${args[0]}\\right)".concat(eh.transpose)},combinations:{2:"\\binom{${args[0]}}{${args[1]}}"},combinationsWithRep:{2:"\\left(\\!\\!{\\binom{${args[0]}}{${args[1]}}}\\!\\!\\right)"},factorial:{1:"\\left(${args[0]}\\right)".concat(eh.factorial)},gamma:{1:"\\Gamma\\left(${args[0]}\\right)"},equal:{2:"\\left(${args[0]}".concat(eh.equal,"${args[1]}\\right)")},larger:{2:"\\left(${args[0]}".concat(eh.larger,"${args[1]}\\right)")},largerEq:{2:"\\left(${args[0]}".concat(eh.largerEq,"${args[1]}\\right)")},smaller:{2:"\\left(${args[0]}".concat(eh.smaller,"${args[1]}\\right)")},smallerEq:{2:"\\left(${args[0]}".concat(eh.smallerEq,"${args[1]}\\right)")},unequal:{2:"\\left(${args[0]}".concat(eh.unequal,"${args[1]}\\right)")},erf:{1:"erf\\left(${args[0]}\\right)"},max:"\\max\\left(${args}\\right)",min:"\\min\\left(${args}\\right)",variance:"\\mathrm{Var}\\left(${args}\\right)",acos:{1:"\\cos^{-1}\\left(${args[0]}\\right)"},acosh:{1:"\\cosh^{-1}\\left(${args[0]}\\right)"},acot:{1:"\\cot^{-1}\\left(${args[0]}\\right)"},acoth:{1:"\\coth^{-1}\\left(${args[0]}\\right)"},acsc:{1:"\\csc^{-1}\\left(${args[0]}\\right)"},acsch:{1:"\\mathrm{csch}^{-1}\\left(${args[0]}\\right)"},asec:{1:"\\sec^{-1}\\left(${args[0]}\\right)"},asech:{1:"\\mathrm{sech}^{-1}\\left(${args[0]}\\right)"},asin:{1:"\\sin^{-1}\\left(${args[0]}\\right)"},asinh:{1:"\\sinh^{-1}\\left(${args[0]}\\right)"},atan:{1:"\\tan^{-1}\\left(${args[0]}\\right)"},atan2:{2:"\\mathrm{atan2}\\left(${args}\\right)"},atanh:{1:"\\tanh^{-1}\\left(${args[0]}\\right)"},cos:{1:"\\cos\\left(${args[0]}\\right)"},cosh:{1:"\\cosh\\left(${args[0]}\\right)"},cot:{1:"\\cot\\left(${args[0]}\\right)"},coth:{1:"\\coth\\left(${args[0]}\\right)"},csc:{1:"\\csc\\left(${args[0]}\\right)"},csch:{1:"\\mathrm{csch}\\left(${args[0]}\\right)"},sec:{1:"\\sec\\left(${args[0]}\\right)"},sech:{1:"\\mathrm{sech}\\left(${args[0]}\\right)"},sin:{1:"\\sin\\left(${args[0]}\\right)"},sinh:{1:"\\sinh\\left(${args[0]}\\right)"},tan:{1:"\\tan\\left(${args[0]}\\right)"},tanh:{1:"\\tanh\\left(${args[0]}\\right)"},to:{2:"\\left(${args[0]}".concat(eh.to,"${args[1]}\\right)")},numeric:function(e,n){return e.args[0].toTex()},number:{0:"0",1:"\\left(${args[0]}\\right)",2:"\\left(\\left(${args[0]}\\right)${args[1]}\\right)"},string:{0:'\\mathtt{""}',1:"\\mathrm{string}\\left(${args[0]}\\right)"},bignumber:{0:"0",1:"\\left(${args[0]}\\right)"},complex:{0:"0",1:"\\left(${args[0]}\\right)",2:"\\left(\\left(${args[0]}\\right)+".concat(Km.i,"\\cdot\\left(${args[1]}\\right)\\right)")},matrix:{0:"\\begin{bmatrix}\\end{bmatrix}",1:"\\left(${args[0]}\\right)",2:"\\left(${args[0]}\\right)"},sparse:{0:"\\begin{bsparse}\\end{bsparse}",1:"\\left(${args[0]}\\right)"},unit:{1:"\\left(${args[0]}\\right)",2:"\\left(\\left(${args[0]}\\right)${args[1]}\\right)"}},th={deg:"^\\circ"};function rh(e){return Qm()(e,{preserveFormatting:!0})}function ih(e,n){return(n=void 0!==n&&n)?Q(th,e)?th[e]:"\\mathrm{"+rh(e)+"}":Q(Km,e)?Km[e]:rh(e)}var ah=en("ConstantNode",["Node"],(function(e){var n=e.Node;function t(e){if(!(this instanceof t))throw new SyntaxError("Constructor must be called with the new operator");this.value=e}return t.prototype=new n,t.prototype.type="ConstantNode",t.prototype.isConstantNode=!0,t.prototype._compile=function(e,n){var t=this.value;return function(){return t}},t.prototype.forEach=function(e){},t.prototype.map=function(e){return this.clone()},t.prototype.clone=function(){return new t(this.value)},t.prototype._toString=function(e){return Te(this.value,e)},t.prototype.toHTML=function(e){var n=this._toString(e);switch(G(this.value)){case"number":case"BigNumber":case"Fraction":return'<span class="math-number">'+n+"</span>";case"string":return'<span class="math-string">'+n+"</span>";case"boolean":return'<span class="math-boolean">'+n+"</span>";case"null":return'<span class="math-null-symbol">'+n+"</span>";case"undefined":return'<span class="math-undefined">'+n+"</span>";default:return'<span class="math-symbol">'+n+"</span>"}},t.prototype.toJSON=function(){return{mathjs:"ConstantNode",value:this.value}},t.fromJSON=function(e){return new t(e.value)},t.prototype._toTex=function(e){var n=this._toString(e);switch(G(this.value)){case"string":return"\\mathtt{"+rh(n)+"}";case"number":case"BigNumber":if(!isFinite(this.value))return this.value.valueOf()<0?"-\\infty":"\\infty";var t=n.toLowerCase().indexOf("e");return-1!==t?n.substring(0,t)+"\\cdot10^{"+n.substring(t+1)+"}":n;case"Fraction":return this.value.toLatex();default:return n}},t}),{isClass:!0,isNode:!0});function oh(e){return(oh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var sh=en("ObjectNode",["Node"],(function(e){var n=e.Node;function t(e){if(!(this instanceof t))throw new SyntaxError("Constructor must be called with the new operator");if(this.properties=e||{},e&&("object"!==oh(e)||!Object.keys(e).every((function(n){return P(e[n])}))))throw new TypeError("Object containing Nodes expected")}return t.prototype=new n,t.prototype.type="ObjectNode",t.prototype.isObjectNode=!0,t.prototype._compile=function(e,n){var t={};for(var r in this.properties)if(Q(this.properties,r)){var i=Ie(r),a=JSON.parse(i);if(!Co(this.properties,a))throw new Error('No access to property "'+a+'"');t[a]=this.properties[r]._compile(e,n)}return function(e,n,r){var i={};for(var a in t)Q(t,a)&&(i[a]=t[a](e,n,r));return i}},t.prototype.forEach=function(e){for(var n in this.properties)Q(this.properties,n)&&e(this.properties[n],"properties["+Ie(n)+"]",this)},t.prototype.map=function(e){var n={};for(var r in this.properties)Q(this.properties,r)&&(n[r]=this._ifNode(e(this.properties[r],"properties["+Ie(r)+"]",this)));return new t(n)},t.prototype.clone=function(){var e={};for(var n in this.properties)Q(this.properties,n)&&(e[n]=this.properties[n]);return new t(e)},t.prototype._toString=function(e){var n=[];for(var t in this.properties)Q(this.properties,t)&&n.push(Ie(t)+": "+this.properties[t].toString(e));return"{"+n.join(", ")+"}"},t.prototype.toJSON=function(){return{mathjs:"ObjectNode",properties:this.properties}},t.fromJSON=function(e){return new t(e.properties)},t.prototype.toHTML=function(e){var n=[];for(var t in this.properties)Q(this.properties,t)&&n.push('<span class="math-symbol math-property">'+ke(t)+'</span><span class="math-operator math-assignment-operator math-property-assignment-operator math-binary-operator">:</span>'+this.properties[t].toHTML(e));return'<span class="math-parenthesis math-curly-parenthesis">{</span>'+n.join('<span class="math-separator">,</span>')+'<span class="math-parenthesis math-curly-parenthesis">}</span>'},t.prototype._toTex=function(e){var n=[];for(var t in this.properties)Q(this.properties,t)&&n.push("\\mathbf{"+t+":} & "+this.properties[t].toTex(e)+"\\\\");return"\\left\\{\\begin{array}{ll}".concat(n.join("\n"),"\\end{array}\\right\\}")},t}),{isClass:!0,isNode:!0}),uh=en("ParenthesisNode",["Node"],(function(e){var n=e.Node;function t(e){if(!(this instanceof t))throw new SyntaxError("Constructor must be called with the new operator");if(!P(e))throw new TypeError('Node expected for parameter "content"');this.content=e}return t.prototype=new n,t.prototype.type="ParenthesisNode",t.prototype.isParenthesisNode=!0,t.prototype._compile=function(e,n){return this.content._compile(e,n)},t.prototype.getContent=function(){return this.content.getContent()},t.prototype.forEach=function(e){e(this.content,"content",this)},t.prototype.map=function(e){return new t(e(this.content,"content",this))},t.prototype.clone=function(){return new t(this.content)},t.prototype._toString=function(e){return!e||e&&!e.parenthesis||e&&"keep"===e.parenthesis?"("+this.content.toString(e)+")":this.content.toString(e)},t.prototype.toJSON=function(){return{mathjs:"ParenthesisNode",content:this.content}},t.fromJSON=function(e){return new t(e.content)},t.prototype.toHTML=function(e){return!e||e&&!e.parenthesis||e&&"keep"===e.parenthesis?'<span class="math-parenthesis math-round-parenthesis">(</span>'+this.content.toHTML(e)+'<span class="math-parenthesis math-round-parenthesis">)</span>':this.content.toHTML(e)},t.prototype._toTex=function(e){return!e||e&&!e.parenthesis||e&&"keep"===e.parenthesis?"\\left(".concat(this.content.toTex(e),"\\right)"):this.content.toTex(e)},t}),{isClass:!0,isNode:!0}),ch=[{AssignmentNode:{},FunctionAssignmentNode:{}},{ConditionalNode:{latexLeftParens:!1,latexRightParens:!1,latexParens:!1}},{"OperatorNode:or":{associativity:"left",associativeWith:[]}},{"OperatorNode:xor":{associativity:"left",associativeWith:[]}},{"OperatorNode:and":{associativity:"left",associativeWith:[]}},{"OperatorNode:bitOr":{associativity:"left",associativeWith:[]}},{"OperatorNode:bitXor":{associativity:"left",associativeWith:[]}},{"OperatorNode:bitAnd":{associativity:"left",associativeWith:[]}},{"OperatorNode:equal":{associativity:"left",associativeWith:[]},"OperatorNode:unequal":{associativity:"left",associativeWith:[]},"OperatorNode:smaller":{associativity:"left",associativeWith:[]},"OperatorNode:larger":{associativity:"left",associativeWith:[]},"OperatorNode:smallerEq":{associativity:"left",associativeWith:[]},"OperatorNode:largerEq":{associativity:"left",associativeWith:[]},RelationalNode:{associativity:"left",associativeWith:[]}},{"OperatorNode:leftShift":{associativity:"left",associativeWith:[]},"OperatorNode:rightArithShift":{associativity:"left",associativeWith:[]},"OperatorNode:rightLogShift":{associativity:"left",associativeWith:[]}},{"OperatorNode:to":{associativity:"left",associativeWith:[]}},{RangeNode:{}},{"OperatorNode:add":{associativity:"left",associativeWith:["OperatorNode:add","OperatorNode:subtract"]},"OperatorNode:subtract":{associativity:"left",associativeWith:[]}},{"OperatorNode:multiply":{associativity:"left",associativeWith:["OperatorNode:multiply","OperatorNode:divide","Operator:dotMultiply","Operator:dotDivide"]},"OperatorNode:divide":{associativity:"left",associativeWith:[],latexLeftParens:!1,latexRightParens:!1,latexParens:!1},"OperatorNode:dotMultiply":{associativity:"left",associativeWith:["OperatorNode:multiply","OperatorNode:divide","OperatorNode:dotMultiply","OperatorNode:doDivide"]},"OperatorNode:dotDivide":{associativity:"left",associativeWith:[]},"OperatorNode:mod":{associativity:"left",associativeWith:[]}},{"OperatorNode:unaryPlus":{associativity:"right"},"OperatorNode:unaryMinus":{associativity:"right"},"OperatorNode:bitNot":{associativity:"right"},"OperatorNode:not":{associativity:"right"}},{"OperatorNode:pow":{associativity:"right",associativeWith:[],latexRightParens:!1},"OperatorNode:dotPow":{associativity:"right",associativeWith:[]}},{"OperatorNode:factorial":{associativity:"left"}},{"OperatorNode:transpose":{associativity:"left"}}];function fh(e,n){var t=e;"keep"!==n&&(t=e.getContent());for(var r=t.getIdentifier(),i=0;i<ch.length;i++)if(r in ch[i])return i;return null}function lh(e,n){var t=e;"keep"!==n&&(t=e.getContent());var r=t.getIdentifier(),i=fh(t,n);if(null===i)return null;var a=ch[i][r];if(Q(a,"associativity")){if("left"===a.associativity)return"left";if("right"===a.associativity)return"right";throw Error("'"+r+"' has the invalid associativity '"+a.associativity+"'.")}return null}function ph(e,n,t){var r="keep"!==t?e.getContent():e,i="keep"!==t?e.getContent():n,a=r.getIdentifier(),o=i.getIdentifier(),s=fh(r,t);if(null===s)return null;var u=ch[s][a];if(Q(u,"associativeWith")&&u.associativeWith instanceof Array){for(var c=0;c<u.associativeWith.length;c++)if(u.associativeWith[c]===o)return!0;return!1}return null}var dh=en("RelationalNode",["Node"],(function(e){var n=e.Node;function t(e,n){if(!(this instanceof t))throw new SyntaxError("Constructor must be called with the new operator");if(!Array.isArray(e))throw new TypeError("Parameter conditionals must be an array");if(!Array.isArray(n))throw new TypeError("Parameter params must be an array");if(e.length!==n.length-1)throw new TypeError("Parameter params must contain exactly one more element than parameter conditionals");this.conditionals=e,this.params=n}return t.prototype=new n,t.prototype.type="RelationalNode",t.prototype.isRelationalNode=!0,t.prototype._compile=function(e,n){var t=this,r=this.params.map((function(t){return t._compile(e,n)}));return function(n,i,a){for(var o,s=r[0](n,i,a),u=0;u<t.conditionals.length;u++){if(o=s,s=r[u+1](n,i,a),!_o(e,t.conditionals[u])(o,s))return!1}return!0}},t.prototype.forEach=function(e){var n=this;this.params.forEach((function(t,r){return e(t,"params["+r+"]",n)}),this)},t.prototype.map=function(e){var n=this;return new t(this.conditionals.slice(),this.params.map((function(t,r){return n._ifNode(e(t,"params["+r+"]",n))}),this))},t.prototype.clone=function(){return new t(this.conditionals,this.params)},t.prototype._toString=function(e){for(var n=e&&e.parenthesis?e.parenthesis:"keep",t=fh(this,n),r=this.params.map((function(r,i){var a=fh(r,n);return"all"===n||null!==a&&a<=t?"("+r.toString(e)+")":r.toString(e)})),i={equal:"==",unequal:"!=",smaller:"<",larger:">",smallerEq:"<=",largerEq:">="},a=r[0],o=0;o<this.conditionals.length;o++)a+=" "+i[this.conditionals[o]]+" "+r[o+1];return a},t.prototype.toJSON=function(){return{mathjs:"RelationalNode",conditionals:this.conditionals,params:this.params}},t.fromJSON=function(e){return new t(e.conditionals,e.params)},t.prototype.toHTML=function(e){for(var n=e&&e.parenthesis?e.parenthesis:"keep",t=fh(this,n),r=this.params.map((function(r,i){var a=fh(r,n);return"all"===n||null!==a&&a<=t?'<span class="math-parenthesis math-round-parenthesis">(</span>'+r.toHTML(e)+'<span class="math-parenthesis math-round-parenthesis">)</span>':r.toHTML(e)})),i={equal:"==",unequal:"!=",smaller:"<",larger:">",smallerEq:"<=",largerEq:">="},a=r[0],o=0;o<this.conditionals.length;o++)a+='<span class="math-operator math-binary-operator math-explicit-binary-operator">'+ke(i[this.conditionals[o]])+"</span>"+r[o+1];return a},t.prototype._toTex=function(e){for(var n=e&&e.parenthesis?e.parenthesis:"keep",t=fh(this,n),r=this.params.map((function(r,i){var a=fh(r,n);return"all"===n||null!==a&&a<=t?"\\left("+r.toTex(e)+"\right)":r.toTex(e)})),i=r[0],a=0;a<this.conditionals.length;a++)i+=eh[this.conditionals[a]]+r[a+1];return i},t}),{isClass:!0,isNode:!0}),mh=en("Chain",["?on","math"],(function(e){var n=e.on,t=e.math;function r(e){if(!(this instanceof r))throw new SyntaxError("Constructor must be called with the new operator");H(e)?this.value=e.value:this.value=e}function i(e,n){X(r.prototype,e,(function(){var e=n();if("function"==typeof e)return a(e)}))}function a(e){return function(){for(var n=[this.value],t=0;t<arguments.length;t++)n[t+1]=arguments[t];return new r(e.apply(e,n))}}r.prototype.type="Chain",r.prototype.isChain=!0,r.prototype.done=function(){return this.value},r.prototype.valueOf=function(){return this.value},r.prototype.toString=function(){return Te(this.value)},r.prototype.toJSON=function(){return{mathjs:"Chain",value:this.value}},r.fromJSON=function(e){return new r(e.value)},r.createProxy=function(e,n){if("string"==typeof e)u=e,"function"==typeof(c=n)&&(r.prototype[u]=a(c));else{var t=function(n){Q(e,n)&&void 0===o[n]&&i(n,(function(){return e[n]}))};for(var s in e)t(s)}var u,c};var o={expression:!0,docs:!0,type:!0,classes:!0,json:!0,error:!0,isChain:!0};return r.createProxy(t),n&&n("import",(function(e,n,t){t||i(e,n)})),r}),{isClass:!0}),hh=en("reviver",["classes"],(function(e){var n=e.classes;return function(e,t){var r=n[t&&t.mathjs];return r&&"function"==typeof r.fromJSON?r.fromJSON(t):t}})),yh=en("ConditionalNode",["Node"],(function(e){var n=e.Node;function t(e,n,r){if(!(this instanceof t))throw new SyntaxError("Constructor must be called with the new operator");if(!P(e))throw new TypeError("Parameter condition must be a Node");if(!P(n))throw new TypeError("Parameter trueExpr must be a Node");if(!P(r))throw new TypeError("Parameter falseExpr must be a Node");this.condition=e,this.trueExpr=n,this.falseExpr=r}return t.prototype=new n,t.prototype.type="ConditionalNode",t.prototype.isConditionalNode=!0,t.prototype._compile=function(e,n){var t=this.condition._compile(e,n),r=this.trueExpr._compile(e,n),i=this.falseExpr._compile(e,n);return function(e,n,a){return function(e){if("number"==typeof e||"boolean"==typeof e||"string"==typeof e)return!!e;if(e){if(s(e))return!e.isZero();if(u(e))return!(!e.re&&!e.im);if(f(e))return!!e.value}if(null==e)return!1;throw new TypeError('Unsupported type of condition "'+G(e)+'"')}(t(e,n,a))?r(e,n,a):i(e,n,a)}},t.prototype.forEach=function(e){e(this.condition,"condition",this),e(this.trueExpr,"trueExpr",this),e(this.falseExpr,"falseExpr",this)},t.prototype.map=function(e){return new t(this._ifNode(e(this.condition,"condition",this)),this._ifNode(e(this.trueExpr,"trueExpr",this)),this._ifNode(e(this.falseExpr,"falseExpr",this)))},t.prototype.clone=function(){return new t(this.condition,this.trueExpr,this.falseExpr)},t.prototype._toString=function(e){var n=e&&e.parenthesis?e.parenthesis:"keep",t=fh(this,n),r=this.condition.toString(e),i=fh(this.condition,n);("all"===n||"OperatorNode"===this.condition.type||null!==i&&i<=t)&&(r="("+r+")");var a=this.trueExpr.toString(e),o=fh(this.trueExpr,n);("all"===n||"OperatorNode"===this.trueExpr.type||null!==o&&o<=t)&&(a="("+a+")");var s=this.falseExpr.toString(e),u=fh(this.falseExpr,n);return("all"===n||"OperatorNode"===this.falseExpr.type||null!==u&&u<=t)&&(s="("+s+")"),r+" ? "+a+" : "+s},t.prototype.toJSON=function(){return{mathjs:"ConditionalNode",condition:this.condition,trueExpr:this.trueExpr,falseExpr:this.falseExpr}},t.fromJSON=function(e){return new t(e.condition,e.trueExpr,e.falseExpr)},t.prototype.toHTML=function(e){var n=e&&e.parenthesis?e.parenthesis:"keep",t=fh(this,n),r=this.condition.toHTML(e),i=fh(this.condition,n);("all"===n||"OperatorNode"===this.condition.type||null!==i&&i<=t)&&(r='<span class="math-parenthesis math-round-parenthesis">(</span>'+r+'<span class="math-parenthesis math-round-parenthesis">)</span>');var a=this.trueExpr.toHTML(e),o=fh(this.trueExpr,n);("all"===n||"OperatorNode"===this.trueExpr.type||null!==o&&o<=t)&&(a='<span class="math-parenthesis math-round-parenthesis">(</span>'+a+'<span class="math-parenthesis math-round-parenthesis">)</span>');var s=this.falseExpr.toHTML(e),u=fh(this.falseExpr,n);return("all"===n||"OperatorNode"===this.falseExpr.type||null!==u&&u<=t)&&(s='<span class="math-parenthesis math-round-parenthesis">(</span>'+s+'<span class="math-parenthesis math-round-parenthesis">)</span>'),r+'<span class="math-operator math-conditional-operator">?</span>'+a+'<span class="math-operator math-conditional-operator">:</span>'+s},t.prototype._toTex=function(e){return"\\begin{cases} {"+this.trueExpr.toTex(e)+"}, &\\quad{\\text{if }\\;"+this.condition.toTex(e)+"}\\\\{"+this.falseExpr.toTex(e)+"}, &\\quad{\\text{otherwise}}\\end{cases}"},t}),{isClass:!0,isNode:!0}),gh=en("OperatorNode",["Node"],(function(e){var n=e.Node;function t(e,n,r,i){if(!(this instanceof t))throw new SyntaxError("Constructor must be called with the new operator");if("string"!=typeof e)throw new TypeError('string expected for parameter "op"');if("string"!=typeof n)throw new TypeError('string expected for parameter "fn"');if(!Array.isArray(r)||!r.every(P))throw new TypeError('Array containing Nodes expected for parameter "args"');this.implicit=!0===i,this.op=e,this.fn=n,this.args=r||[]}function r(e,n,t,r,i){var a,o=fh(e,n),s=lh(e,n);if("all"===n||r.length>2&&"OperatorNode:add"!==e.getIdentifier()&&"OperatorNode:multiply"!==e.getIdentifier())return r.map((function(e){switch(e.getContent().type){case"ArrayNode":case"ConstantNode":case"SymbolNode":case"ParenthesisNode":return!1;default:return!0}}));switch(r.length){case 0:a=[];break;case 1:var u=fh(r[0],n);if(i&&null!==u){var c,f;if("keep"===n?(c=r[0].getIdentifier(),f=e.getIdentifier()):(c=r[0].getContent().getIdentifier(),f=e.getContent().getIdentifier()),!1===ch[o][f].latexLeftParens){a=[!1];break}if(!1===ch[u][c].latexParens){a=[!1];break}}if(null===u){a=[!1];break}if(u<=o){a=[!0];break}a=[!1];break;case 2:var l,p,d=fh(r[0],n),m=ph(e,r[0],n);l=null!==d&&(d===o&&"right"===s&&!m||d<o);var h,y,g,v=fh(r[1],n),x=ph(e,r[1],n);if(p=null!==v&&(v===o&&"left"===s&&!x||v<o),i)"keep"===n?(h=e.getIdentifier(),y=e.args[0].getIdentifier(),g=e.args[1].getIdentifier()):(h=e.getContent().getIdentifier(),y=e.args[0].getContent().getIdentifier(),g=e.args[1].getContent().getIdentifier()),null!==d&&(!1===ch[o][h].latexLeftParens&&(l=!1),!1===ch[d][y].latexParens&&(l=!1)),null!==v&&(!1===ch[o][h].latexRightParens&&(p=!1),!1===ch[v][g].latexParens&&(p=!1));a=[l,p];break;default:"OperatorNode:add"!==e.getIdentifier()&&"OperatorNode:multiply"!==e.getIdentifier()||(a=r.map((function(t){var r=fh(t,n),i=ph(e,t,n),a=lh(t,n);return null!==r&&(o===r&&s===a&&!i||r<o)})))}return r.length>=2&&"OperatorNode:multiply"===e.getIdentifier()&&e.implicit&&"auto"===n&&"hide"===t&&(a=r.map((function(e,n){var t="ParenthesisNode"===e.getIdentifier();return!(!a[n]&&!t)}))),a}return t.prototype=new n,t.prototype.type="OperatorNode",t.prototype.isOperatorNode=!0,t.prototype._compile=function(e,n){if("string"!=typeof this.fn||!To(e,this.fn))throw e[this.fn]?new Error('No access to function "'+this.fn+'"'):new Error("Function "+this.fn+' missing in provided namespace "math"');var t=_o(e,this.fn),r=$e(this.args,(function(t){return t._compile(e,n)}));if(1===r.length){var i=r[0];return function(e,n,r){return t(i(e,n,r))}}if(2===r.length){var a=r[0],o=r[1];return function(e,n,r){return t(a(e,n,r),o(e,n,r))}}return function(e,n,i){return t.apply(null,$e(r,(function(t){return t(e,n,i)})))}},t.prototype.forEach=function(e){for(var n=0;n<this.args.length;n++)e(this.args[n],"args["+n+"]",this)},t.prototype.map=function(e){for(var n=[],r=0;r<this.args.length;r++)n[r]=this._ifNode(e(this.args[r],"args["+r+"]",this));return new t(this.op,this.fn,n,this.implicit)},t.prototype.clone=function(){return new t(this.op,this.fn,this.args.slice(0),this.implicit)},t.prototype.isUnary=function(){return 1===this.args.length},t.prototype.isBinary=function(){return 2===this.args.length},t.prototype._toString=function(e){var n=e&&e.parenthesis?e.parenthesis:"keep",t=e&&e.implicit?e.implicit:"hide",i=this.args,a=r(this,n,t,i,!1);if(1===i.length){var o=lh(this,n),s=i[0].toString(e);a[0]&&(s="("+s+")");var u=/[a-zA-Z]+/.test(this.op);return"right"===o?this.op+(u?" ":"")+s:"left"===o?s+(u?" ":"")+this.op:s+this.op}if(2===i.length){var c=i[0].toString(e),f=i[1].toString(e);return a[0]&&(c="("+c+")"),a[1]&&(f="("+f+")"),this.implicit&&"OperatorNode:multiply"===this.getIdentifier()&&"hide"===t?c+" "+f:c+" "+this.op+" "+f}if(i.length>2&&("OperatorNode:add"===this.getIdentifier()||"OperatorNode:multiply"===this.getIdentifier())){var l=i.map((function(n,t){return n=n.toString(e),a[t]&&(n="("+n+")"),n}));return this.implicit&&"OperatorNode:multiply"===this.getIdentifier()&&"hide"===t?l.join(" "):l.join(" "+this.op+" ")}return this.fn+"("+this.args.join(", ")+")"},t.prototype.toJSON=function(){return{mathjs:"OperatorNode",op:this.op,fn:this.fn,args:this.args,implicit:this.implicit}},t.fromJSON=function(e){return new t(e.op,e.fn,e.args,e.implicit)},t.prototype.toHTML=function(e){var n=e&&e.parenthesis?e.parenthesis:"keep",t=e&&e.implicit?e.implicit:"hide",i=this.args,a=r(this,n,t,i,!1);if(1===i.length){var o=lh(this,n),s=i[0].toHTML(e);return a[0]&&(s='<span class="math-parenthesis math-round-parenthesis">(</span>'+s+'<span class="math-parenthesis math-round-parenthesis">)</span>'),"right"===o?'<span class="math-operator math-unary-operator math-lefthand-unary-operator">'+ke(this.op)+"</span>"+s:s+'<span class="math-operator math-unary-operator math-righthand-unary-operator">'+ke(this.op)+"</span>"}if(2===i.length){var u=i[0].toHTML(e),c=i[1].toHTML(e);return a[0]&&(u='<span class="math-parenthesis math-round-parenthesis">(</span>'+u+'<span class="math-parenthesis math-round-parenthesis">)</span>'),a[1]&&(c='<span class="math-parenthesis math-round-parenthesis">(</span>'+c+'<span class="math-parenthesis math-round-parenthesis">)</span>'),this.implicit&&"OperatorNode:multiply"===this.getIdentifier()&&"hide"===t?u+'<span class="math-operator math-binary-operator math-implicit-binary-operator"></span>'+c:u+'<span class="math-operator math-binary-operator math-explicit-binary-operator">'+ke(this.op)+"</span>"+c}var f=i.map((function(n,t){return n=n.toHTML(e),a[t]&&(n='<span class="math-parenthesis math-round-parenthesis">(</span>'+n+'<span class="math-parenthesis math-round-parenthesis">)</span>'),n}));return i.length>2&&("OperatorNode:add"===this.getIdentifier()||"OperatorNode:multiply"===this.getIdentifier())?this.implicit&&"OperatorNode:multiply"===this.getIdentifier()&&"hide"===t?f.join('<span class="math-operator math-binary-operator math-implicit-binary-operator"></span>'):f.join('<span class="math-operator math-binary-operator math-explicit-binary-operator">'+ke(this.op)+"</span>"):'<span class="math-function">'+ke(this.fn)+'</span><span class="math-paranthesis math-round-parenthesis">(</span>'+f.join('<span class="math-separator">,</span>')+'<span class="math-paranthesis math-round-parenthesis">)</span>'},t.prototype._toTex=function(e){var n=e&&e.parenthesis?e.parenthesis:"keep",t=e&&e.implicit?e.implicit:"hide",i=this.args,a=r(this,n,t,i,!0),o=eh[this.fn];if(o=void 0===o?this.op:o,1===i.length){var s=lh(this,n),u=i[0].toTex(e);return a[0]&&(u="\\left(".concat(u,"\\right)")),"right"===s?o+u:u+o}if(2===i.length){var c=i[0],f=c.toTex(e);a[0]&&(f="\\left(".concat(f,"\\right)"));var l,p=i[1].toTex(e);switch(a[1]&&(p="\\left(".concat(p,"\\right)")),l="keep"===n?c.getIdentifier():c.getContent().getIdentifier(),this.getIdentifier()){case"OperatorNode:divide":return o+"{"+f+"}{"+p+"}";case"OperatorNode:pow":switch(f="{"+f+"}",p="{"+p+"}",l){case"ConditionalNode":case"OperatorNode:divide":f="\\left(".concat(f,"\\right)")}break;case"OperatorNode:multiply":if(this.implicit&&"hide"===t)return f+"~"+p}return f+o+p}if(i.length>2&&("OperatorNode:add"===this.getIdentifier()||"OperatorNode:multiply"===this.getIdentifier())){var d=i.map((function(n,t){return n=n.toTex(e),a[t]&&(n="\\left(".concat(n,"\\right)")),n}));return"OperatorNode:multiply"===this.getIdentifier()&&this.implicit?d.join("~"):d.join(o)}return"\\mathrm{"+this.fn+"}\\left("+i.map((function(n){return n.toTex(e)})).join(",")+"\\right)"},t.prototype.getIdentifier=function(){return this.type+":"+this.fn},t}),{isClass:!0,isNode:!0}),vh=en("RangeNode",["Node"],(function(e){var n=e.Node;function t(e,n,r){if(!(this instanceof t))throw new SyntaxError("Constructor must be called with the new operator");if(!P(e))throw new TypeError("Node expected");if(!P(n))throw new TypeError("Node expected");if(r&&!P(r))throw new TypeError("Node expected");if(arguments.length>3)throw new Error("Too many arguments");this.start=e,this.end=n,this.step=r||null}function r(e,n){var t=fh(e,n),r={},i=fh(e.start,n);if(r.start=null!==i&&i<=t||"all"===n,e.step){var a=fh(e.step,n);r.step=null!==a&&a<=t||"all"===n}var o=fh(e.end,n);return r.end=null!==o&&o<=t||"all"===n,r}return t.prototype=new n,t.prototype.type="RangeNode",t.prototype.isRangeNode=!0,t.prototype.needsEnd=function(){return this.filter((function(e){return L(e)&&"end"===e.name})).length>0},t.prototype._compile=function(e,n){var t=e.range,r=this.start._compile(e,n),i=this.end._compile(e,n);if(this.step){var a=this.step._compile(e,n);return function(e,n,o){return t(r(e,n,o),i(e,n,o),a(e,n,o))}}return function(e,n,a){return t(r(e,n,a),i(e,n,a))}},t.prototype.forEach=function(e){e(this.start,"start",this),e(this.end,"end",this),this.step&&e(this.step,"step",this)},t.prototype.map=function(e){return new t(this._ifNode(e(this.start,"start",this)),this._ifNode(e(this.end,"end",this)),this.step&&this._ifNode(e(this.step,"step",this)))},t.prototype.clone=function(){return new t(this.start,this.end,this.step&&this.step)},t.prototype._toString=function(e){var n,t=r(this,e&&e.parenthesis?e.parenthesis:"keep"),i=this.start.toString(e);if(t.start&&(i="("+i+")"),n=i,this.step){var a=this.step.toString(e);t.step&&(a="("+a+")"),n+=":"+a}var o=this.end.toString(e);return t.end&&(o="("+o+")"),n+=":"+o},t.prototype.toJSON=function(){return{mathjs:"RangeNode",start:this.start,end:this.end,step:this.step}},t.fromJSON=function(e){return new t(e.start,e.end,e.step)},t.prototype.toHTML=function(e){var n,t=r(this,e&&e.parenthesis?e.parenthesis:"keep"),i=this.start.toHTML(e);if(t.start&&(i='<span class="math-parenthesis math-round-parenthesis">(</span>'+i+'<span class="math-parenthesis math-round-parenthesis">)</span>'),n=i,this.step){var a=this.step.toHTML(e);t.step&&(a='<span class="math-parenthesis math-round-parenthesis">(</span>'+a+'<span class="math-parenthesis math-round-parenthesis">)</span>'),n+='<span class="math-operator math-range-operator">:</span>'+a}var o=this.end.toHTML(e);return t.end&&(o='<span class="math-parenthesis math-round-parenthesis">(</span>'+o+'<span class="math-parenthesis math-round-parenthesis">)</span>'),n+='<span class="math-operator math-range-operator">:</span>'+o},t.prototype._toTex=function(e){var n=r(this,e&&e.parenthesis?e.parenthesis:"keep"),t=this.start.toTex(e);if(n.start&&(t="\\left(".concat(t,"\\right)")),this.step){var i=this.step.toTex(e);n.step&&(i="\\left(".concat(i,"\\right)")),t+=":"+i}var a=this.end.toTex(e);return n.end&&(a="\\left(".concat(a,"\\right)")),t+=":"+a},t}),{isClass:!0,isNode:!0}),xh=en("FunctionAssignmentNode",["typed","Node"],(function(e){var n=e.typed,t=e.Node;function r(e,n,t){if(!(this instanceof r))throw new SyntaxError("Constructor must be called with the new operator");if("string"!=typeof e)throw new TypeError('String expected for parameter "name"');if(!Array.isArray(n))throw new TypeError('Array containing strings or objects expected for parameter "params"');if(!P(t))throw new TypeError('Node expected for parameter "expr"');if(e in Vm)throw new Error('Illegal function name, "'+e+'" is a reserved keyword');this.name=e,this.params=n.map((function(e){return e&&e.name||e})),this.types=n.map((function(e){return e&&e.type||"any"})),this.expr=t}function i(e,n){var t=fh(e,n),r=fh(e.expr,n);return"all"===n||null!==r&&r<=t}return r.prototype=new t,r.prototype.type="FunctionAssignmentNode",r.prototype.isFunctionAssignmentNode=!0,r.prototype._compile=function(e,t){var r=Object.create(t);Ve(this.params,(function(e){r[e]=!0}));var i=this.expr._compile(e,r),a=this.name,o=this.params,s=Je(this.types,","),u=a+"("+Je(this.params,", ")+")";return function(e,t,r){var c={};c[s]=function(){for(var n=Object.create(t),a=0;a<o.length;a++)n[o[a]]=arguments[a];return i(e,n,r)};var f=n(a,c);return f.syntax=u,Oo(e,a,f),f}},r.prototype.forEach=function(e){e(this.expr,"expr",this)},r.prototype.map=function(e){var n=this._ifNode(e(this.expr,"expr",this));return new r(this.name,this.params.slice(0),n)},r.prototype.clone=function(){return new r(this.name,this.params.slice(0),this.expr)},r.prototype._toString=function(e){var n=e&&e.parenthesis?e.parenthesis:"keep",t=this.expr.toString(e);return i(this,n)&&(t="("+t+")"),this.name+"("+this.params.join(", ")+") = "+t},r.prototype.toJSON=function(){var e=this.types;return{mathjs:"FunctionAssignmentNode",name:this.name,params:this.params.map((function(n,t){return{name:n,type:e[t]}})),expr:this.expr}},r.fromJSON=function(e){return new r(e.name,e.params,e.expr)},r.prototype.toHTML=function(e){for(var n=e&&e.parenthesis?e.parenthesis:"keep",t=[],r=0;r<this.params.length;r++)t.push('<span class="math-symbol math-parameter">'+ke(this.params[r])+"</span>");var a=this.expr.toHTML(e);return i(this,n)&&(a='<span class="math-parenthesis math-round-parenthesis">(</span>'+a+'<span class="math-parenthesis math-round-parenthesis">)</span>'),'<span class="math-function">'+ke(this.name)+'</span><span class="math-parenthesis math-round-parenthesis">(</span>'+t.join('<span class="math-separator">,</span>')+'<span class="math-parenthesis math-round-parenthesis">)</span><span class="math-operator math-assignment-operator math-variable-assignment-operator math-binary-operator">=</span>'+a},r.prototype._toTex=function(e){var n=e&&e.parenthesis?e.parenthesis:"keep",t=this.expr.toTex(e);return i(this,n)&&(t="\\left(".concat(t,"\\right)")),"\\mathrm{"+this.name+"}\\left("+this.params.map(ih).join(",")+"\\right):="+t},r}),{isClass:!0,isNode:!0}),bh=en("chain",["typed","Chain"],(function(e){var n=e.typed,t=e.Chain;return n("chain",{"":function(){return new t},any:function(e){return new t(e)}})}));function wh(e){return e&&e.isIndexError?new Re(e.index+1,e.min+1,void 0!==e.max?e.max+1:void 0):e}function Nh(e){return(Nh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Sh(e){var n=e.subset;return function(e,t){try{if(Array.isArray(e))return n(e,t);if(e&&"function"==typeof e.subset)return e.subset(t);if("string"==typeof e)return n(e,t);if("object"===Nh(e)){if(!t.isObjectProperty())throw new TypeError("Cannot apply a numeric index as object property");return _o(e,t.getObjectProperty())}throw new TypeError("Cannot apply index: unsupported type of object")}catch(e){throw wh(e)}}}var Mh=en("AccessorNode",["subset","Node"],(function(e){var n=e.subset,t=e.Node,r=Sh({subset:n});function i(e,n){if(!(this instanceof i))throw new SyntaxError("Constructor must be called with the new operator");if(!P(e))throw new TypeError('Node expected for parameter "object"');if(!R(n))throw new TypeError('IndexNode expected for parameter "index"');this.object=e||null,this.index=n,Object.defineProperty(this,"name",{get:function(){return this.index?this.index.isObjectProperty()?this.index.getObjectProperty():"":this.object.name||""}.bind(this),set:function(){throw new Error("Cannot assign a new name, name is read-only")}})}function a(e){return!(_(e)||O(e)||k(e)||q(e)||z(e)||j(e)||L(e))}return i.prototype=new t,i.prototype.type="AccessorNode",i.prototype.isAccessorNode=!0,i.prototype._compile=function(e,n){var t=this.object._compile(e,n),i=this.index._compile(e,n);if(this.index.isObjectProperty()){var a=this.index.getObjectProperty();return function(e,n,r){return _o(t(e,n,r),a)}}return function(e,n,a){var o=t(e,n,a),s=i(e,n,o);return r(o,s)}},i.prototype.forEach=function(e){e(this.object,"object",this),e(this.index,"index",this)},i.prototype.map=function(e){return new i(this._ifNode(e(this.object,"object",this)),this._ifNode(e(this.index,"index",this)))},i.prototype.clone=function(){return new i(this.object,this.index)},i.prototype._toString=function(e){var n=this.object.toString(e);return a(this.object)&&(n="("+n+")"),n+this.index.toString(e)},i.prototype.toHTML=function(e){var n=this.object.toHTML(e);return a(this.object)&&(n='<span class="math-parenthesis math-round-parenthesis">(</span>'+n+'<span class="math-parenthesis math-round-parenthesis">)</span>'),n+this.index.toHTML(e)},i.prototype._toTex=function(e){var n=this.object.toTex(e);return a(this.object)&&(n="\\left(' + object + '\\right)"),n+this.index.toTex(e)},i.prototype.toJSON=function(){return{mathjs:"AccessorNode",object:this.object,index:this.index}},i.fromJSON=function(e){return new i(e.object,e.index)},i}),{isClass:!0,isNode:!0});function Dh(e){return function(e){if(Array.isArray(e))return Eh(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,n){if(!e)return;if("string"==typeof e)return Eh(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Eh(e,n)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Eh(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}var Ah=en("IndexNode",["Range","Node","size"],(function(e){var n=e.Range,t=e.Node,r=e.size;function i(e,n){if(!(this instanceof i))throw new SyntaxError("Constructor must be called with the new operator");if(this.dimensions=e,this.dotNotation=n||!1,!Array.isArray(e)||!e.every(P))throw new TypeError('Array containing Nodes expected for parameter "dimensions"');if(this.dotNotation&&!this.isObjectProperty())throw new Error("dotNotation only applicable for object properties")}function a(e,t,r){return new n(s(e)?e.toNumber():e,s(t)?t.toNumber():t,s(r)?r.toNumber():r)}return i.prototype=new t,i.prototype.type="IndexNode",i.prototype.isIndexNode=!0,i.prototype._compile=function(e,n){var t=$e(this.dimensions,(function(t,i){if(U(t)){if(t.needsEnd()){var o=Object.create(n);o.end=!0;var s=t.start._compile(e,o),u=t.end._compile(e,o),c=t.step?t.step._compile(e,o):function(){return 1};return function(e,n,t){var o=r(t).valueOf(),f=Object.create(n);return f.end=o[i],a(s(e,f,t),u(e,f,t),c(e,f,t))}}var f=t.start._compile(e,n),l=t.end._compile(e,n),p=t.step?t.step._compile(e,n):function(){return 1};return function(e,n,t){return a(f(e,n,t),l(e,n,t),p(e,n,t))}}if(L(t)&&"end"===t.name){var d=Object.create(n);d.end=!0;var m=t._compile(e,d);return function(e,n,t){var a=r(t).valueOf(),o=Object.create(n);return o.end=a[i],m(e,o,t)}}var h=t._compile(e,n);return function(e,n,t){return h(e,n,t)}})),i=_o(e,"index");return function(e,n,r){var a=$e(t,(function(t){return t(e,n,r)}));return i.apply(void 0,Dh(a))}},i.prototype.forEach=function(e){for(var n=0;n<this.dimensions.length;n++)e(this.dimensions[n],"dimensions["+n+"]",this)},i.prototype.map=function(e){for(var n=[],t=0;t<this.dimensions.length;t++)n[t]=this._ifNode(e(this.dimensions[t],"dimensions["+t+"]",this));return new i(n,this.dotNotation)},i.prototype.clone=function(){return new i(this.dimensions.slice(0),this.dotNotation)},i.prototype.isObjectProperty=function(){return 1===this.dimensions.length&&k(this.dimensions[0])&&"string"==typeof this.dimensions[0].value},i.prototype.getObjectProperty=function(){return this.isObjectProperty()?this.dimensions[0].value:null},i.prototype._toString=function(e){return this.dotNotation?"."+this.getObjectProperty():"["+this.dimensions.join(", ")+"]"},i.prototype.toJSON=function(){return{mathjs:"IndexNode",dimensions:this.dimensions,dotNotation:this.dotNotation}},i.fromJSON=function(e){return new i(e.dimensions,e.dotNotation)},i.prototype.toHTML=function(e){for(var n=[],t=0;t<this.dimensions.length;t++)n[t]=this.dimensions[t].toHTML();return this.dotNotation?'<span class="math-operator math-accessor-operator">.</span><span class="math-symbol math-property">'+ke(this.getObjectProperty())+"</span>":'<span class="math-parenthesis math-square-parenthesis">[</span>'+n.join('<span class="math-separator">,</span>')+'<span class="math-parenthesis math-square-parenthesis">]</span>'},i.prototype._toTex=function(e){var n=this.dimensions.map((function(n){return n.toTex(e)}));return this.dotNotation?"."+this.getObjectProperty():"_{"+n.join(",")+"}"},i}),{isClass:!0,isNode:!0}),_h=en("SymbolNode",["math","?Unit","Node"],(function(e){var n=e.math,t=e.Unit,r=e.Node;function i(e){return!!t&&t.isValuelessUnit(e)}function a(e){if(!(this instanceof a))throw new SyntaxError("Constructor must be called with the new operator");if("string"!=typeof e)throw new TypeError('String expected for parameter "name"');this.name=e}return a.prototype=new r,a.prototype.type="SymbolNode",a.prototype.isSymbolNode=!0,a.prototype._compile=function(e,n){var r=this.name;if(!0===n[r])return function(e,n,t){return n[r]};if(r in e)return function(n,t,i){return _o(r in n?n:e,r)};var a=i(r);return function(e,n,i){return r in e?_o(e,r):a?new t(null,r):function(e){throw new Error("Undefined symbol "+e)}(r)}},a.prototype.forEach=function(e){},a.prototype.map=function(e){return this.clone()},a.prototype.clone=function(){return new a(this.name)},a.prototype._toString=function(e){return this.name},a.prototype.toHTML=function(e){var n=ke(this.name);return"true"===n||"false"===n?'<span class="math-symbol math-boolean">'+n+"</span>":"i"===n?'<span class="math-symbol math-imaginary-symbol">'+n+"</span>":"Infinity"===n?'<span class="math-symbol math-infinity-symbol">'+n+"</span>":"NaN"===n?'<span class="math-symbol math-nan-symbol">'+n+"</span>":"null"===n?'<span class="math-symbol math-null-symbol">'+n+"</span>":"undefined"===n?'<span class="math-symbol math-undefined-symbol">'+n+"</span>":'<span class="math-symbol">'+n+"</span>"},a.prototype.toJSON=function(){return{mathjs:"SymbolNode",name:this.name}},a.fromJSON=function(e){return new a(e.name)},a.prototype._toTex=function(e){var t=!1;void 0===n[this.name]&&i(this.name)&&(t=!0);var r=ih(this.name,t);return"\\"===r[0]?r:" "+r},a}),{isClass:!0,isNode:!0});function Oh(e){return(Oh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var Ch=en("AssignmentNode",["subset","?matrix","Node"],(function(e){var n=e.subset,t=e.matrix,r=e.Node,i=Sh({subset:n}),a=function(e){var n=e.subset,t=e.matrix;return function(e,r,i){try{if(Array.isArray(e))return t(e).subset(r,i).valueOf();if(e&&"function"==typeof e.subset)return e.subset(r,i);if("string"==typeof e)return n(e,r,i);if("object"===Oh(e)){if(!r.isObjectProperty())throw TypeError("Cannot apply a numeric index as object property");return Oo(e,r.getObjectProperty(),i),e}throw new TypeError("Cannot apply index: unsupported type of object")}catch(e){throw wh(e)}}}({subset:n,matrix:t});function o(e,n,t){if(!(this instanceof o))throw new SyntaxError("Constructor must be called with the new operator");if(this.object=e,this.index=t?n:null,this.value=t||n,!L(e)&&!_(e))throw new TypeError('SymbolNode or AccessorNode expected as "object"');if(L(e)&&"end"===e.name)throw new Error('Cannot assign to symbol "end"');if(this.index&&!R(this.index))throw new TypeError('IndexNode expected as "index"');if(!P(this.value))throw new TypeError('Node expected as "value"');Object.defineProperty(this,"name",{get:function(){return this.index?this.index.isObjectProperty()?this.index.getObjectProperty():"":this.object.name||""}.bind(this),set:function(){throw new Error("Cannot assign a new name, name is read-only")}})}function s(e,n){n||(n="keep");var t=fh(e,n),r=fh(e.value,n);return"all"===n||null!==r&&r<=t}return o.prototype=new r,o.prototype.type="AssignmentNode",o.prototype.isAssignmentNode=!0,o.prototype._compile=function(e,n){var t=this.object._compile(e,n),r=this.index?this.index._compile(e,n):null,o=this.value._compile(e,n),s=this.object.name;if(this.index){if(this.index.isObjectProperty()){var u=this.index.getObjectProperty();return function(e,n,r){var i=t(e,n,r),a=o(e,n,r);return Oo(i,u,a)}}if(L(this.object))return function(e,n,i){var u=t(e,n,i),c=o(e,n,i),f=r(e,n,u);return Oo(e,s,a(u,f,c)),c};var c=this.object.object._compile(e,n);if(this.object.index.isObjectProperty()){var f=this.object.index.getObjectProperty();return function(e,n,t){var i=c(e,n,t),s=_o(i,f),u=r(e,n,s),l=o(e,n,t);return Oo(i,f,a(s,u,l)),l}}var l=this.object.index._compile(e,n);return function(e,n,t){var s=c(e,n,t),u=l(e,n,s),f=i(s,u),p=r(e,n,f),d=o(e,n,t);return a(s,u,a(f,p,d)),d}}if(!L(this.object))throw new TypeError("SymbolNode expected as object");return function(e,n,t){return Oo(e,s,o(e,n,t))}},o.prototype.forEach=function(e){e(this.object,"object",this),this.index&&e(this.index,"index",this),e(this.value,"value",this)},o.prototype.map=function(e){return new o(this._ifNode(e(this.object,"object",this)),this.index?this._ifNode(e(this.index,"index",this)):null,this._ifNode(e(this.value,"value",this)))},o.prototype.clone=function(){return new o(this.object,this.index,this.value)},o.prototype._toString=function(e){var n=this.object.toString(e),t=this.index?this.index.toString(e):"",r=this.value.toString(e);return s(this,e&&e.parenthesis)&&(r="("+r+")"),n+t+" = "+r},o.prototype.toJSON=function(){return{mathjs:"AssignmentNode",object:this.object,index:this.index,value:this.value}},o.fromJSON=function(e){return new o(e.object,e.index,e.value)},o.prototype.toHTML=function(e){var n=this.object.toHTML(e),t=this.index?this.index.toHTML(e):"",r=this.value.toHTML(e);return s(this,e&&e.parenthesis)&&(r='<span class="math-paranthesis math-round-parenthesis">(</span>'+r+'<span class="math-paranthesis math-round-parenthesis">)</span>'),n+t+'<span class="math-operator math-assignment-operator math-variable-assignment-operator math-binary-operator">=</span>'+r},o.prototype._toTex=function(e){var n=this.object.toTex(e),t=this.index?this.index.toTex(e):"",r=this.value.toTex(e);return s(this,e&&e.parenthesis)&&(r="\\left(".concat(r,"\\right)")),n+t+":="+r},o}),{isClass:!0,isNode:!0});function Th(e){return(Th="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ih(){return(Ih=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}var kh=en("FunctionNode",["math","Node","SymbolNode"],(function(e){var n=e.math,t=e.Node,r=e.SymbolNode;function i(e,n){if(!(this instanceof i))throw new SyntaxError("Constructor must be called with the new operator");if("string"==typeof e&&(e=new r(e)),!P(e))throw new TypeError('Node expected as parameter "fn"');if(!Array.isArray(n)||!n.every(P))throw new TypeError('Array containing Nodes expected for parameter "args"');this.fn=e,this.args=n||[],Object.defineProperty(this,"name",{get:function(){return this.fn.name||""}.bind(this),set:function(){throw new Error("Cannot assign a new name, name is read-only")}})}i.prototype=new t,i.prototype.type="FunctionNode",i.prototype.isFunctionNode=!0,i.prototype._compile=function(e,n){if(!(this instanceof i))throw new TypeError("No valid FunctionNode");var t=$e(this.args,(function(t){return t._compile(e,n)}));if(L(this.fn)){var r=this.fn.name,a=r in e?_o(e,r):void 0;if("function"==typeof a&&!0===a.rawArgs){var o=this.args;return function(n,t,i){return(r in n?_o(n,r):a)(o,e,Ih({},n,t))}}if(1===t.length){var s=t[0];return function(e,n,t){return(r in e?_o(e,r):a)(s(e,n,t))}}if(2===t.length){var u=t[0],c=t[1];return function(e,n,t){return(r in e?_o(e,r):a)(u(e,n,t),c(e,n,t))}}return function(e,n,i){return(r in e?_o(e,r):a).apply(null,$e(t,(function(t){return t(e,n,i)})))}}if(_(this.fn)&&R(this.fn.index)&&this.fn.index.isObjectProperty()){var f=this.fn.object._compile(e,n),l=this.fn.index.getObjectProperty(),p=this.args;return function(n,r,i){var a=f(n,r,i);return function(e,n){if(!To(e,n))throw new Error('No access to method "'+n+'"')}(a,l),a[l]&&a[l].rawArgs?a[l](p,e,Ih({},n,r)):a[l].apply(a,$e(t,(function(e){return e(n,r,i)})))}}var d=this.fn._compile(e,n),m=this.args;return function(n,r,i){var a=d(n,r,i);return a&&a.rawArgs?a(m,e,Ih({},n,r)):a.apply(a,$e(t,(function(e){return e(n,r,i)})))}},i.prototype.forEach=function(e){e(this.fn,"fn",this);for(var n=0;n<this.args.length;n++)e(this.args[n],"args["+n+"]",this)},i.prototype.map=function(e){for(var n=this._ifNode(e(this.fn,"fn",this)),t=[],r=0;r<this.args.length;r++)t[r]=this._ifNode(e(this.args[r],"args["+r+"]",this));return new i(n,t)},i.prototype.clone=function(){return new i(this.fn,this.args.slice(0))};var a=i.prototype.toString;function o(e,n,t){for(var r,i="",a=new RegExp("\\$(?:\\{([a-z_][a-z_0-9]*)(?:\\[([0-9]+)\\])?\\}|\\$)","ig"),o=0;null!==(r=a.exec(e));)if(i+=e.substring(o,r.index),o=r.index,"$$"===r[0])i+="$",o++;else{o+=r[0].length;var s=n[r[1]];if(!s)throw new ReferenceError("Template: Property "+r[1]+" does not exist.");if(void 0===r[2])switch(Th(s)){case"string":i+=s;break;case"object":if(P(s))i+=s.toTex(t);else{if(!Array.isArray(s))throw new TypeError("Template: "+r[1]+" has to be a Node, String or array of Nodes");i+=s.map((function(e,n){if(P(e))return e.toTex(t);throw new TypeError("Template: "+r[1]+"["+n+"] is not a Node.")})).join(",")}break;default:throw new TypeError("Template: "+r[1]+" has to be a Node, String or array of Nodes")}else{if(!P(s[r[2]]&&s[r[2]]))throw new TypeError("Template: "+r[1]+"["+r[2]+"] is not a Node.");i+=s[r[2]].toTex(t)}}return i+=e.slice(o)}i.prototype.toString=function(e){var n,t=this.fn.toString(e);return e&&"object"===Th(e.handler)&&Q(e.handler,t)&&(n=e.handler[t](this,e)),void 0!==n?n:a.call(this,e)},i.prototype._toString=function(e){var n=this.args.map((function(n){return n.toString(e)}));return(B(this.fn)?"("+this.fn.toString(e)+")":this.fn.toString(e))+"("+n.join(", ")+")"},i.prototype.toJSON=function(){return{mathjs:"FunctionNode",fn:this.fn,args:this.args}},i.fromJSON=function(e){return new i(e.fn,e.args)},i.prototype.toHTML=function(e){var n=this.args.map((function(n){return n.toHTML(e)}));return'<span class="math-function">'+ke(this.fn)+'</span><span class="math-paranthesis math-round-parenthesis">(</span>'+n.join('<span class="math-separator">,</span>')+'<span class="math-paranthesis math-round-parenthesis">)</span>'};var s=i.prototype.toTex;return i.prototype.toTex=function(e){var n;return e&&"object"===Th(e.handler)&&Q(e.handler,this.name)&&(n=e.handler[this.name](this,e)),void 0!==n?n:s.call(this,e)},i.prototype._toTex=function(e){var t,r,i=this.args.map((function(n){return n.toTex(e)}));switch(nh[this.name]&&(t=nh[this.name]),!n[this.name]||"function"!=typeof n[this.name].toTex&&"object"!==Th(n[this.name].toTex)&&"string"!=typeof n[this.name].toTex||(t=n[this.name].toTex),Th(t)){case"function":r=t(this,e);break;case"string":r=o(t,this,e);break;case"object":switch(Th(t[i.length])){case"function":r=t[i.length](this,e);break;case"string":r=o(t[i.length],this,e)}}return void 0!==r?r:o("\\mathrm{${name}}\\left(${args}\\right)",this,e)},i.prototype.getIdentifier=function(){return this.type+":"+this.name},i}),{isClass:!0,isNode:!0});function Bh(){return(Bh=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}var qh=["typed","numeric","config","AccessorNode","ArrayNode","AssignmentNode","BlockNode","ConditionalNode","ConstantNode","FunctionAssignmentNode","FunctionNode","IndexNode","ObjectNode","OperatorNode","ParenthesisNode","RangeNode","RelationalNode","SymbolNode"],Rh=en("parse",qh,(function(e){var n=e.typed,t=e.numeric,r=e.config,i=e.AccessorNode,a=e.ArrayNode,o=e.AssignmentNode,s=e.BlockNode,u=e.ConditionalNode,c=e.ConstantNode,f=e.FunctionAssignmentNode,l=e.FunctionNode,p=e.IndexNode,d=e.ObjectNode,m=e.OperatorNode,h=e.ParenthesisNode,y=e.RangeNode,g=e.RelationalNode,v=e.SymbolNode,x=n("parse",{string:function(e){return G(e,{})},"Array | Matrix":function(e){return b(e,{})},"string, Object":function(e,n){return G(e,void 0!==n.nodes?n.nodes:{})},"Array | Matrix, Object":b});function b(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=void 0!==n.nodes?n.nodes:{};return rr(e,(function(e){if("string"!=typeof e)throw new TypeError("String expected");return G(e,t)}))}var w=0,N=1,S=2,M=3,D=4,E={",":!0,"(":!0,")":!0,"[":!0,"]":!0,"{":!0,"}":!0,'"':!0,"'":!0,";":!0,"+":!0,"-":!0,"*":!0,".*":!0,"/":!0,"./":!0,"%":!0,"^":!0,".^":!0,"~":!0,"!":!0,"&":!0,"|":!0,"^|":!0,"=":!0,":":!0,"?":!0,"==":!0,"!=":!0,"<":!0,">":!0,"<=":!0,">=":!0,"<<":!0,">>":!0,">>>":!0},A={mod:!0,to:!0,in:!0,and:!0,xor:!0,or:!0,not:!0},O={true:!0,false:!1,null:null,undefined:void 0},C=["NaN","Infinity"];function T(e,n){return e.expression.substr(e.index,n)}function I(e){return T(e,1)}function B(e){e.index++}function R(e){return e.expression.charAt(e.index-1)}function P(e){return e.expression.charAt(e.index+1)}function z(e){for(e.tokenType=w,e.token="",e.comment="";x.isWhitespace(I(e),e.nestingLevel);)B(e);if("#"===I(e))for(;"\n"!==I(e)&&""!==I(e);)e.comment+=I(e),B(e);if(""!==I(e)){if("\n"===I(e)&&!e.nestingLevel)return e.tokenType=N,e.token=I(e),void B(e);var n=I(e),t=T(e,2),r=T(e,3);if(3===r.length&&E[r])return e.tokenType=N,e.token=r,B(e),B(e),void B(e);if(2===t.length&&E[t])return e.tokenType=N,e.token=t,B(e),void B(e);if(E[n])return e.tokenType=N,e.token=n,void B(e);if(x.isDigitDot(n)){if(e.tokenType=S,"."===I(e))e.token+=I(e),B(e),x.isDigit(I(e))||(e.tokenType=N);else{for(;x.isDigit(I(e));)e.token+=I(e),B(e);x.isDecimalMark(I(e),P(e))&&(e.token+=I(e),B(e))}for(;x.isDigit(I(e));)e.token+=I(e),B(e);if("E"===I(e)||"e"===I(e))if(x.isDigit(P(e))||"-"===P(e)||"+"===P(e)){if(e.token+=I(e),B(e),"+"!==I(e)&&"-"!==I(e)||(e.token+=I(e),B(e)),!x.isDigit(I(e)))throw pe(e,'Digit expected, got "'+I(e)+'"');for(;x.isDigit(I(e));)e.token+=I(e),B(e);if(x.isDecimalMark(I(e),P(e)))throw pe(e,'Digit expected, got "'+I(e)+'"')}else if("."===P(e))throw B(e),pe(e,'Digit expected, got "'+I(e)+'"')}else{if(!x.isAlpha(I(e),R(e),P(e))){for(e.tokenType=D;""!==I(e);)e.token+=I(e),B(e);throw pe(e,'Syntax error in part "'+e.token+'"')}for(;x.isAlpha(I(e),R(e),P(e))||x.isDigit(I(e));)e.token+=I(e),B(e);Q(A,e.token)?e.tokenType=N:e.tokenType=M}}else e.tokenType=N}function j(e){do{z(e)}while("\n"===e.token)}function U(e){e.nestingLevel++}function H(e){e.nestingLevel--}function G(e,n){var t={extraNodes:{},expression:"",comment:"",index:0,token:"",tokenType:w,nestingLevel:0,conditionalLevel:null};Bh(t,{expression:e,extraNodes:n}),z(t);var r=function(e){var n,t,r=[];""!==e.token&&"\n"!==e.token&&";"!==e.token&&((n=$(e)).comment=e.comment);for(;"\n"===e.token||";"===e.token;)0===r.length&&n&&(t=";"!==e.token,r.push({node:n,visible:t})),z(e),"\n"!==e.token&&";"!==e.token&&""!==e.token&&((n=$(e)).comment=e.comment,t=";"!==e.token,r.push({node:n,visible:t}));return r.length>0?new s(r):(n||((n=new c(void 0)).comment=e.comment),n)}(t);if(""!==t.token)throw t.tokenType===N?de(t,"Unexpected operator "+t.token):pe(t,'Unexpected part "'+t.token+'"');return r}function $(e){var n,t,r,i,a=function(e){var n=function(e){var n=V(e);for(;"or"===e.token;)j(e),n=new m("or","or",[n,V(e)]);return n}(e);for(;"?"===e.token;){var t=e.conditionalLevel;e.conditionalLevel=e.nestingLevel,j(e);var r=n,i=$(e);if(":"!==e.token)throw pe(e,"False part of conditional expression expected");e.conditionalLevel=null,j(e);var a=$(e);n=new u(r,i,a),e.conditionalLevel=t}return n}(e);if("="===e.token){if(L(a))return n=a.name,j(e),r=$(e),new o(new v(n),r);if(_(a))return j(e),r=$(e),new o(a.object,a.index,r);if(q(a)&&L(a.fn)&&(i=!0,t=[],n=a.name,a.args.forEach((function(e,n){L(e)?t[n]=e.name:i=!1})),i))return j(e),r=$(e),new f(n,t,r);throw pe(e,"Invalid left hand side of assignment operator =")}return a}function V(e){for(var n=W(e);"xor"===e.token;)j(e),n=new m("xor","xor",[n,W(e)]);return n}function W(e){for(var n=Z(e);"and"===e.token;)j(e),n=new m("and","and",[n,Z(e)]);return n}function Z(e){for(var n=J(e);"|"===e.token;)j(e),n=new m("|","bitOr",[n,J(e)]);return n}function J(e){for(var n=Y(e);"^|"===e.token;)j(e),n=new m("^|","bitXor",[n,Y(e)]);return n}function Y(e){for(var n=X(e);"&"===e.token;)j(e),n=new m("&","bitAnd",[n,X(e)]);return n}function X(e){for(var n=[K(e)],t=[],r={"==":"equal","!=":"unequal","<":"smaller",">":"larger","<=":"smallerEq",">=":"largerEq"};Q(r,e.token);){var i={name:e.token,fn:r[e.token]};t.push(i),j(e),n.push(K(e))}return 1===n.length?n[0]:2===n.length?new m(t[0].name,t[0].fn,n):new g(t.map((function(e){return e.fn})),n)}function K(e){var n,t,r,i;n=ee(e);for(var a={"<<":"leftShift",">>":"rightArithShift",">>>":"rightLogShift"};Q(a,e.token);)r=a[t=e.token],j(e),i=[n,ee(e)],n=new m(t,r,i);return n}function ee(e){var n,t,r,i;n=ne(e);for(var a={to:"to",in:"to"};Q(a,e.token);)r=a[t=e.token],j(e),"in"===t&&""===e.token?n=new m("*","multiply",[n,new v("in")],!0):(i=[n,ne(e)],n=new m(t,r,i));return n}function ne(e){var n,t=[];if(n=":"===e.token?new c(1):te(e),":"===e.token&&e.conditionalLevel!==e.nestingLevel){for(t.push(n);":"===e.token&&t.length<3;)j(e),")"===e.token||"]"===e.token||","===e.token||""===e.token?t.push(new v("end")):t.push(te(e));n=3===t.length?new y(t[0],t[2],t[1]):new y(t[0],t[1])}return n}function te(e){var n,t,r,i;n=re(e);for(var a={"+":"add","-":"subtract"};Q(a,e.token);)r=a[t=e.token],j(e),i=[n,re(e)],n=new m(t,r,i);return n}function re(e){var n,t,r,i;t=n=ie(e);for(var a={"*":"multiply",".*":"dotMultiply","/":"divide","./":"dotDivide","%":"mod",mod:"mod"};Q(a,e.token);)i=a[r=e.token],j(e),t=ie(e),n=new m(r,i,[n,t]);return n}function ie(e){var n,t;for(t=n=ae(e);e.tokenType===M||"in"===e.token&&k(n)||!(e.tokenType!==S||k(t)||F(t)&&"!"!==t.op)||"("===e.token;)t=ae(e),n=new m("*","multiply",[n,t],!0);return n}function ae(e){for(var n=oe(e),t=n,r=[];"/"===e.token&&k(t);){if(r.push(Bh({},e)),j(e),e.tokenType!==S){Bh(e,r.pop());break}if(r.push(Bh({},e)),j(e),e.tokenType!==M&&"("!==e.token){r.pop(),Bh(e,r.pop());break}Bh(e,r.pop()),r.pop(),t=oe(e),n=new m("/","divide",[n,t])}return n}function oe(e){var n,i,o,s={"-":"unaryMinus","+":"unaryPlus","~":"bitNot",not:"not"};return Q(s,e.token)?(o=s[e.token],n=e.token,j(e),i=[oe(e)],new m(n,o,i)):function(e){var n,i,o,s;n=function(e){var n,i,o;n=function(e){var n=[];if(e.tokenType===M&&Q(e.extraNodes,e.token)){var i=e.extraNodes[e.token];if(z(e),"("===e.token){if(n=[],U(e),z(e),")"!==e.token)for(n.push($(e));","===e.token;)z(e),n.push($(e));if(")"!==e.token)throw pe(e,"Parenthesis ) expected");H(e),z(e)}return new i(n)}return function(e){var n,i;if(e.tokenType===M||e.tokenType===N&&e.token in A)return i=e.token,z(e),n=Q(O,i)?new c(O[i]):-1!==C.indexOf(i)?new c(t(i,"number")):new v(i),n=se(e,n);return function(e){var n,i;if('"'===e.token)return i=ue(e),n=new c(i),n=se(e,n);return function(e){var n,i;if("'"===e.token)return i=ce(e),n=new c(i),n=se(e,n);return function(e){var n,i,o,s;if("["===e.token){if(U(e),z(e),"]"!==e.token){var u=fe(e);if(";"===e.token){for(o=1,i=[u];";"===e.token;)z(e),i[o]=fe(e),o++;if("]"!==e.token)throw pe(e,"End of matrix ] expected");H(e),z(e),s=i[0].items.length;for(var f=1;f<o;f++)if(i[f].items.length!==s)throw de(e,"Column dimensions mismatch ("+i[f].items.length+" !== "+s+")");n=new a(i)}else{if("]"!==e.token)throw pe(e,"End of matrix ] expected");H(e),z(e),n=u}}else H(e),z(e),n=new a([]);return se(e,n)}return function(e){if("{"===e.token){var n;U(e);var i={};do{if(z(e),"}"!==e.token){if('"'===e.token)n=ue(e);else if("'"===e.token)n=ce(e);else{if(!(e.tokenType===M||e.tokenType===N&&e.token in A))throw pe(e,"Symbol or string expected as object key");n=e.token,z(e)}if(":"!==e.token)throw pe(e,"Colon : expected after object key");z(e),i[n]=$(e)}}while(","===e.token);if("}"!==e.token)throw pe(e,"Comma , or bracket } expected after object value");H(e),z(e);var a=new d(i);return a=se(e,a)}return function(e){var n;if(e.tokenType===S)return n=e.token,z(e),new c(t(n,r.number));return function(e){var n;if("("===e.token){if(U(e),z(e),n=$(e),")"!==e.token)throw pe(e,"Parenthesis ) expected");return H(e),z(e),n=new h(n),n=se(e,n)}return function(e){throw""===e.token?pe(e,"Unexpected end of expression"):pe(e,"Value expected")}(e)}(e)}(e)}(e)}(e)}(e)}(e)}(e)}(e);var s={"!":"factorial","'":"ctranspose"};for(;Q(s,e.token);)i=e.token,o=s[i],z(e),n=new m(i,o,[n]),n=se(e,n);return n}(e),("^"===e.token||".^"===e.token)&&(i=e.token,o="^"===i?"pow":"dotPow",j(e),s=[n,oe(e)],n=new m(i,o,s));return n}(e)}function se(e,n,t){for(var r;!("("!==e.token&&"["!==e.token&&"."!==e.token||t&&-1===t.indexOf(e.token));)if(r=[],"("===e.token){if(!L(n)&&!_(n))return n;if(U(e),z(e),")"!==e.token)for(r.push($(e));","===e.token;)z(e),r.push($(e));if(")"!==e.token)throw pe(e,"Parenthesis ) expected");H(e),z(e),n=new l(n,r)}else if("["===e.token){if(U(e),z(e),"]"!==e.token)for(r.push($(e));","===e.token;)z(e),r.push($(e));if("]"!==e.token)throw pe(e,"Parenthesis ] expected");H(e),z(e),n=new i(n,new p(r))}else{if(z(e),e.tokenType!==M)throw pe(e,"Property name expected after dot");r.push(new c(e.token)),z(e);n=new i(n,new p(r,!0))}return n}function ue(e){for(var n="";""!==I(e)&&'"'!==I(e);)"\\"===I(e)&&(n+=I(e),B(e)),n+=I(e),B(e);if(z(e),'"'!==e.token)throw pe(e,'End of string " expected');return z(e),JSON.parse('"'+n+'"')}function ce(e){for(var n="";""!==I(e)&&"'"!==I(e);)"\\"===I(e)&&(n+=I(e),B(e)),n+=I(e),B(e);if(z(e),"'"!==e.token)throw pe(e,"End of string ' expected");return z(e),JSON.parse('"'+n+'"')}function fe(e){for(var n=[$(e)],t=1;","===e.token;)z(e),n[t]=$(e),t++;return new a(n)}function le(e){return e.index-e.token.length+1}function pe(e,n){var t=le(e),r=new SyntaxError(n+" (char "+t+")");return r.char=t,r}function de(e,n){var t=le(e),r=new SyntaxError(n+" (char "+t+")");return r.char=t,r}return x.isAlpha=function(e,n,t){return x.isValidLatinOrGreek(e)||x.isValidMathSymbol(e,t)||x.isValidMathSymbol(n,e)},x.isValidLatinOrGreek=function(e){return/^[a-zA-Z_$\u00C0-\u02AF\u0370-\u03FF\u2100-\u214F]$/.test(e)},x.isValidMathSymbol=function(e,n){return/^[\uD835]$/.test(e)&&/^[\uDC00-\uDFFF]$/.test(n)&&/^[^\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDFCC\uDFCD]$/.test(n)},x.isWhitespace=function(e,n){return" "===e||"\t"===e||"\n"===e&&n>0},x.isDecimalMark=function(e,n){return"."===e&&"/"!==n&&"*"!==n&&"^"!==n},x.isDigitDot=function(e){return e>="0"&&e<="9"||"."===e},x.isDigit=function(e){return e>="0"&&e<="9"},x})),Ph=["typed","parse"],zh=en("evaluate",Ph,(function(e){var n=e.typed,t=e.parse;return n("evaluate",{string:function(e){return t(e).compile().evaluate({})},"string, Object":function(e,n){return t(e).compile().evaluate(n)},"Array | Matrix":function(e){var n={};return rr(e,(function(e){return t(e).compile().evaluate(n)}))},"Array | Matrix, Object":function(e,n){return rr(e,(function(e){return t(e).compile().evaluate(n)}))}})})),Fh=["parse"],jh=en("Help",Fh,(function(e){var n=e.parse;function t(e){if(!(this instanceof t))throw new SyntaxError("Constructor must be called with the new operator");if(!e)throw new Error('Argument "doc" missing');this.doc=e}return t.prototype.type="Help",t.prototype.isHelp=!0,t.prototype.toString=function(){var e=this.doc||{},t="\n";if(e.name&&(t+="Name: "+e.name+"\n\n"),e.category&&(t+="Category: "+e.category+"\n\n"),e.description&&(t+="Description:\n    "+e.description+"\n\n"),e.syntax&&(t+="Syntax:\n    "+e.syntax.join("\n    ")+"\n\n"),e.examples){t+="Examples:\n";for(var r={},i=0;i<e.examples.length;i++){var a=e.examples[i];t+="    "+a+"\n";var o=void 0;try{o=n(a).compile().evaluate(r)}catch(e){o=e}void 0===o||w(o)||(t+="        "+Te(o,{precision:14})+"\n")}t+="\n"}return e.seealso&&e.seealso.length&&(t+="See also: "+e.seealso.join(", ")+"\n"),t},t.prototype.toJSON=function(){var e=V(this.doc);return e.mathjs="Help",e},t.fromJSON=function(e){var n={};return Object.keys(e).filter((function(e){return"mathjs"!==e})).forEach((function(t){n[t]=e[t]})),new t(n)},t.prototype.valueOf=t.prototype.toString,t}),{isClass:!0}),Uh=["typed","parse"],Lh=en("compile",Uh,(function(e){var n=e.typed,t=e.parse;return n("compile",{string:function(e){return t(e).compile()},"Array | Matrix":function(e){return rr(e,(function(e){return t(e).compile()}))}})})),Hh={name:"pi",category:"Constants",syntax:["pi"],description:"The number pi is a mathematical constant that is the ratio of a circle's circumference to its diameter, and is approximately equal to 3.14159",examples:["pi","sin(pi/2)"],seealso:["tau"]},Gh={name:"e",category:"Constants",syntax:["e"],description:"Euler's number, the base of the natural logarithm. Approximately equal to 2.71828",examples:["e","e ^ 2","exp(2)","log(e)"],seealso:["exp"]},$h={bignumber:{name:"bignumber",category:"Construction",syntax:["bignumber(x)"],description:"Create a big number from a number or string.",examples:["0.1 + 0.2","bignumber(0.1) + bignumber(0.2)",'bignumber("7.2")','bignumber("7.2e500")',"bignumber([0.1, 0.2, 0.3])"],seealso:["boolean","complex","fraction","index","matrix","string","unit"]},boolean:{name:"boolean",category:"Construction",syntax:["x","boolean(x)"],description:"Convert a string or number into a boolean.",examples:["boolean(0)","boolean(1)","boolean(3)",'boolean("true")','boolean("false")',"boolean([1, 0, 1, 1])"],seealso:["bignumber","complex","index","matrix","number","string","unit"]},complex:{name:"complex",category:"Construction",syntax:["complex()","complex(re, im)","complex(string)"],description:"Create a complex number.",examples:["complex()","complex(2, 3)",'complex("7 - 2i")'],seealso:["bignumber","boolean","index","matrix","number","string","unit"]},createUnit:{name:"createUnit",category:"Construction",syntax:["createUnit(definitions)","createUnit(name, definition)"],description:"Create a user-defined unit and register it with the Unit type.",examples:['createUnit("foo")','createUnit("knot", {definition: "0.514444444 m/s", aliases: ["knots", "kt", "kts"]})','createUnit("mph", "1 mile/hour")'],seealso:["unit","splitUnit"]},fraction:{name:"fraction",category:"Construction",syntax:["fraction(num)","fraction(num,den)"],description:"Create a fraction from a number or from a numerator and denominator.",examples:["fraction(0.125)","fraction(1, 3) + fraction(2, 5)"],seealso:["bignumber","boolean","complex","index","matrix","string","unit"]},index:{name:"index",category:"Construction",syntax:["[start]","[start:end]","[start:step:end]","[start1, start 2, ...]","[start1:end1, start2:end2, ...]","[start1:step1:end1, start2:step2:end2, ...]"],description:"Create an index to get or replace a subset of a matrix",examples:["[]","[1, 2, 3]","A = [1, 2, 3; 4, 5, 6]","A[1, :]","A[1, 2] = 50","A[0:2, 0:2] = ones(2, 2)"],seealso:["bignumber","boolean","complex","matrix,","number","range","string","unit"]},matrix:{name:"matrix",category:"Construction",syntax:["[]","[a1, b1, ...; a2, b2, ...]","matrix()",'matrix("dense")',"matrix([...])"],description:"Create a matrix.",examples:["[]","[1, 2, 3]","[1, 2, 3; 4, 5, 6]","matrix()","matrix([3, 4])",'matrix([3, 4; 5, 6], "sparse")','matrix([3, 4; 5, 6], "sparse", "number")'],seealso:["bignumber","boolean","complex","index","number","string","unit","sparse"]},number:{name:"number",category:"Construction",syntax:["x","number(x)","number(unit, valuelessUnit)"],description:"Create a number or convert a string or boolean into a number.",examples:["2","2e3","4.05","number(2)",'number("7.2")',"number(true)","number([true, false, true, true])",'number(unit("52cm"), "m")'],seealso:["bignumber","boolean","complex","fraction","index","matrix","string","unit"]},sparse:{name:"sparse",category:"Construction",syntax:["sparse()","sparse([a1, b1, ...; a1, b2, ...])",'sparse([a1, b1, ...; a1, b2, ...], "number")'],description:"Create a sparse matrix.",examples:["sparse()","sparse([3, 4; 5, 6])",'sparse([3, 0; 5, 0], "number")'],seealso:["bignumber","boolean","complex","index","number","string","unit","matrix"]},splitUnit:{name:"splitUnit",category:"Construction",syntax:["splitUnit(unit: Unit, parts: Unit[])"],description:"Split a unit in an array of units whose sum is equal to the original unit.",examples:['splitUnit(1 m, ["feet", "inch"])'],seealso:["unit","createUnit"]},string:{name:"string",category:"Construction",syntax:['"text"',"string(x)"],description:"Create a string or convert a value to a string",examples:['"Hello World!"',"string(4.2)","string(3 + 2i)"],seealso:["bignumber","boolean","complex","index","matrix","number","unit"]},unit:{name:"unit",category:"Construction",syntax:["value unit","unit(value, unit)","unit(string)"],description:"Create a unit.",examples:["5.5 mm","3 inch",'unit(7.1, "kilogram")','unit("23 deg")'],seealso:["bignumber","boolean","complex","index","matrix","number","string"]},e:Gh,E:Gh,false:{name:"false",category:"Constants",syntax:["false"],description:"Boolean value false",examples:["false"],seealso:["true"]},i:{name:"i",category:"Constants",syntax:["i"],description:"Imaginary unit, defined as i*i=-1. A complex number is described as a + b*i, where a is the real part, and b is the imaginary part.",examples:["i","i * i","sqrt(-1)"],seealso:[]},Infinity:{name:"Infinity",category:"Constants",syntax:["Infinity"],description:"Infinity, a number which is larger than the maximum number that can be handled by a floating point number.",examples:["Infinity","1 / 0"],seealso:[]},LN2:{name:"LN2",category:"Constants",syntax:["LN2"],description:"Returns the natural logarithm of 2, approximately equal to 0.693",examples:["LN2","log(2)"],seealso:[]},LN10:{name:"LN10",category:"Constants",syntax:["LN10"],description:"Returns the natural logarithm of 10, approximately equal to 2.302",examples:["LN10","log(10)"],seealso:[]},LOG2E:{name:"LOG2E",category:"Constants",syntax:["LOG2E"],description:"Returns the base-2 logarithm of E, approximately equal to 1.442",examples:["LOG2E","log(e, 2)"],seealso:[]},LOG10E:{name:"LOG10E",category:"Constants",syntax:["LOG10E"],description:"Returns the base-10 logarithm of E, approximately equal to 0.434",examples:["LOG10E","log(e, 10)"],seealso:[]},NaN:{name:"NaN",category:"Constants",syntax:["NaN"],description:"Not a number",examples:["NaN","0 / 0"],seealso:[]},null:{name:"null",category:"Constants",syntax:["null"],description:"Value null",examples:["null"],seealso:["true","false"]},pi:Hh,PI:Hh,phi:{name:"phi",category:"Constants",syntax:["phi"],description:"Phi is the golden ratio. Two quantities are in the golden ratio if their ratio is the same as the ratio of their sum to the larger of the two quantities. Phi is defined as `(1 + sqrt(5)) / 2` and is approximately 1.618034...",examples:["phi"],seealso:[]},SQRT1_2:{name:"SQRT1_2",category:"Constants",syntax:["SQRT1_2"],description:"Returns the square root of 1/2, approximately equal to 0.707",examples:["SQRT1_2","sqrt(1/2)"],seealso:[]},SQRT2:{name:"SQRT2",category:"Constants",syntax:["SQRT2"],description:"Returns the square root of 2, approximately equal to 1.414",examples:["SQRT2","sqrt(2)"],seealso:[]},tau:{name:"tau",category:"Constants",syntax:["tau"],description:"Tau is the ratio constant of a circle's circumference to radius, equal to 2 * pi, approximately 6.2832.",examples:["tau","2 * pi"],seealso:["pi"]},true:{name:"true",category:"Constants",syntax:["true"],description:"Boolean value true",examples:["true"],seealso:["false"]},version:{name:"version",category:"Constants",syntax:["version"],description:"A string with the version number of math.js",examples:["version"],seealso:[]},speedOfLight:{description:"Speed of light in vacuum",examples:["speedOfLight"]},gravitationConstant:{description:"Newtonian constant of gravitation",examples:["gravitationConstant"]},planckConstant:{description:"Planck constant",examples:["planckConstant"]},reducedPlanckConstant:{description:"Reduced Planck constant",examples:["reducedPlanckConstant"]},magneticConstant:{description:"Magnetic constant (vacuum permeability)",examples:["magneticConstant"]},electricConstant:{description:"Electric constant (vacuum permeability)",examples:["electricConstant"]},vacuumImpedance:{description:"Characteristic impedance of vacuum",examples:["vacuumImpedance"]},coulomb:{description:"Coulomb's constant",examples:["coulomb"]},elementaryCharge:{description:"Elementary charge",examples:["elementaryCharge"]},bohrMagneton:{description:"Borh magneton",examples:["bohrMagneton"]},conductanceQuantum:{description:"Conductance quantum",examples:["conductanceQuantum"]},inverseConductanceQuantum:{description:"Inverse conductance quantum",examples:["inverseConductanceQuantum"]},magneticFluxQuantum:{description:"Magnetic flux quantum",examples:["magneticFluxQuantum"]},nuclearMagneton:{description:"Nuclear magneton",examples:["nuclearMagneton"]},klitzing:{description:"Von Klitzing constant",examples:["klitzing"]},bohrRadius:{description:"Borh radius",examples:["bohrRadius"]},classicalElectronRadius:{description:"Classical electron radius",examples:["classicalElectronRadius"]},electronMass:{description:"Electron mass",examples:["electronMass"]},fermiCoupling:{description:"Fermi coupling constant",examples:["fermiCoupling"]},fineStructure:{description:"Fine-structure constant",examples:["fineStructure"]},hartreeEnergy:{description:"Hartree energy",examples:["hartreeEnergy"]},protonMass:{description:"Proton mass",examples:["protonMass"]},deuteronMass:{description:"Deuteron Mass",examples:["deuteronMass"]},neutronMass:{description:"Neutron mass",examples:["neutronMass"]},quantumOfCirculation:{description:"Quantum of circulation",examples:["quantumOfCirculation"]},rydberg:{description:"Rydberg constant",examples:["rydberg"]},thomsonCrossSection:{description:"Thomson cross section",examples:["thomsonCrossSection"]},weakMixingAngle:{description:"Weak mixing angle",examples:["weakMixingAngle"]},efimovFactor:{description:"Efimov factor",examples:["efimovFactor"]},atomicMass:{description:"Atomic mass constant",examples:["atomicMass"]},avogadro:{description:"Avogadro's number",examples:["avogadro"]},boltzmann:{description:"Boltzmann constant",examples:["boltzmann"]},faraday:{description:"Faraday constant",examples:["faraday"]},firstRadiation:{description:"First radiation constant",examples:["firstRadiation"]},loschmidt:{description:"Loschmidt constant at T=273.15 K and p=101.325 kPa",examples:["loschmidt"]},gasConstant:{description:"Gas constant",examples:["gasConstant"]},molarPlanckConstant:{description:"Molar Planck constant",examples:["molarPlanckConstant"]},molarVolume:{description:"Molar volume of an ideal gas at T=273.15 K and p=101.325 kPa",examples:["molarVolume"]},sackurTetrode:{description:"Sackur-Tetrode constant at T=1 K and p=101.325 kPa",examples:["sackurTetrode"]},secondRadiation:{description:"Second radiation constant",examples:["secondRadiation"]},stefanBoltzmann:{description:"Stefan-Boltzmann constant",examples:["stefanBoltzmann"]},wienDisplacement:{description:"Wien displacement law constant",examples:["wienDisplacement"]},molarMass:{description:"Molar mass constant",examples:["molarMass"]},molarMassC12:{description:"Molar mass constant of carbon-12",examples:["molarMassC12"]},gravity:{description:"Standard acceleration of gravity (standard acceleration of free-fall on Earth)",examples:["gravity"]},planckLength:{description:"Planck length",examples:["planckLength"]},planckMass:{description:"Planck mass",examples:["planckMass"]},planckTime:{description:"Planck time",examples:["planckTime"]},planckCharge:{description:"Planck charge",examples:["planckCharge"]},planckTemperature:{description:"Planck temperature",examples:["planckTemperature"]},derivative:{name:"derivative",category:"Algebra",syntax:["derivative(expr, variable)","derivative(expr, variable, {simplify: boolean})"],description:"Takes the derivative of an expression expressed in parser Nodes. The derivative will be taken over the supplied variable in the second parameter. If there are multiple variables in the expression, it will return a partial derivative.",examples:['derivative("2x^3", "x")','derivative("2x^3", "x", {simplify: false})','derivative("2x^2 + 3x + 4", "x")','derivative("sin(2x)", "x")','f = parse("x^2 + x")','x = parse("x")',"df = derivative(f, x)","df.evaluate({x: 3})"],seealso:["simplify","parse","evaluate"]},lsolve:{name:"lsolve",category:"Algebra",syntax:["x=lsolve(L, b)"],description:"Solves the linear system L * x = b where L is an [n x n] lower triangular matrix and b is a [n] column vector.",examples:["a = [-2, 3; 2, 1]","b = [11, 9]","x = lsolve(a, b)"],seealso:["lup","lusolve","usolve","matrix","sparse"]},lup:{name:"lup",category:"Algebra",syntax:["lup(m)"],description:"Calculate the Matrix LU decomposition with partial pivoting. Matrix A is decomposed in three matrices (L, U, P) where P * A = L * U",examples:["lup([[2, 1], [1, 4]])","lup(matrix([[2, 1], [1, 4]]))","lup(sparse([[2, 1], [1, 4]]))"],seealso:["lusolve","lsolve","usolve","matrix","sparse","slu","qr"]},lusolve:{name:"lusolve",category:"Algebra",syntax:["x=lusolve(A, b)","x=lusolve(lu, b)"],description:"Solves the linear system A * x = b where A is an [n x n] matrix and b is a [n] column vector.",examples:["a = [-2, 3; 2, 1]","b = [11, 9]","x = lusolve(a, b)"],seealso:["lup","slu","lsolve","usolve","matrix","sparse"]},simplify:{name:"simplify",category:"Algebra",syntax:["simplify(expr)","simplify(expr, rules)"],description:"Simplify an expression tree.",examples:['simplify("3 + 2 / 4")','simplify("2x + x")','f = parse("x * (x + 2 + x)")',"simplified = simplify(f)","simplified.evaluate({x: 2})"],seealso:["derivative","parse","evaluate"]},rationalize:{name:"rationalize",category:"Algebra",syntax:["rationalize(expr)","rationalize(expr, scope)","rationalize(expr, scope, detailed)"],description:"Transform a rationalizable expression in a rational fraction. If rational fraction is one variable polynomial then converts the numerator and denominator in canonical form, with decreasing exponents, returning the coefficients of numerator.",examples:['rationalize("2x/y - y/(x+1)")','rationalize("2x/y - y/(x+1)", true)'],seealso:["simplify"]},slu:{name:"slu",category:"Algebra",syntax:["slu(A, order, threshold)"],description:"Calculate the Matrix LU decomposition with full pivoting. Matrix A is decomposed in two matrices (L, U) and two permutation vectors (pinv, q) where P * A * Q = L * U",examples:["slu(sparse([4.5, 0, 3.2, 0; 3.1, 2.9, 0, 0.9; 0, 1.7, 3, 0; 3.5, 0.4, 0, 1]), 1, 0.001)"],seealso:["lusolve","lsolve","usolve","matrix","sparse","lup","qr"]},usolve:{name:"usolve",category:"Algebra",syntax:["x=usolve(U, b)"],description:"Solves the linear system U * x = b where U is an [n x n] upper triangular matrix and b is a [n] column vector.",examples:["x=usolve(sparse([1, 1, 1, 1; 0, 1, 1, 1; 0, 0, 1, 1; 0, 0, 0, 1]), [1; 2; 3; 4])"],seealso:["lup","lusolve","lsolve","matrix","sparse"]},qr:{name:"qr",category:"Algebra",syntax:["qr(A)"],description:"Calculates the Matrix QR decomposition. Matrix `A` is decomposed in two matrices (`Q`, `R`) where `Q` is an orthogonal matrix and `R` is an upper triangular matrix.",examples:["qr([[1, -1,  4], [1,  4, -2], [1,  4,  2], [1,  -1, 0]])"],seealso:["lup","slu","matrix"]},abs:{name:"abs",category:"Arithmetic",syntax:["abs(x)"],description:"Compute the absolute value.",examples:["abs(3.5)","abs(-4.2)"],seealso:["sign"]},add:{name:"add",category:"Operators",syntax:["x + y","add(x, y)"],description:"Add two values.",examples:["a = 2.1 + 3.6","a - 3.6","3 + 2i","3 cm + 2 inch",'"2.3" + "4"'],seealso:["subtract"]},cbrt:{name:"cbrt",category:"Arithmetic",syntax:["cbrt(x)","cbrt(x, allRoots)"],description:"Compute the cubic root value. If x = y * y * y, then y is the cubic root of x. When `x` is a number or complex number, an optional second argument `allRoots` can be provided to return all three cubic roots. If not provided, the principal root is returned",examples:["cbrt(64)","cube(4)","cbrt(-8)","cbrt(2 + 3i)","cbrt(8i)","cbrt(8i, true)","cbrt(27 m^3)"],seealso:["square","sqrt","cube","multiply"]},ceil:{name:"ceil",category:"Arithmetic",syntax:["ceil(x)"],description:"Round a value towards plus infinity. If x is complex, both real and imaginary part are rounded towards plus infinity.",examples:["ceil(3.2)","ceil(3.8)","ceil(-4.2)"],seealso:["floor","fix","round"]},cube:{name:"cube",category:"Arithmetic",syntax:["cube(x)"],description:"Compute the cube of a value. The cube of x is x * x * x.",examples:["cube(2)","2^3","2 * 2 * 2"],seealso:["multiply","square","pow"]},divide:{name:"divide",category:"Operators",syntax:["x / y","divide(x, y)"],description:"Divide two values.",examples:["a = 2 / 3","a * 3","4.5 / 2","3 + 4 / 2","(3 + 4) / 2","18 km / 4.5"],seealso:["multiply"]},dotDivide:{name:"dotDivide",category:"Operators",syntax:["x ./ y","dotDivide(x, y)"],description:"Divide two values element wise.",examples:["a = [1, 2, 3; 4, 5, 6]","b = [2, 1, 1; 3, 2, 5]","a ./ b"],seealso:["multiply","dotMultiply","divide"]},dotMultiply:{name:"dotMultiply",category:"Operators",syntax:["x .* y","dotMultiply(x, y)"],description:"Multiply two values element wise.",examples:["a = [1, 2, 3; 4, 5, 6]","b = [2, 1, 1; 3, 2, 5]","a .* b"],seealso:["multiply","divide","dotDivide"]},dotPow:{name:"dotPow",category:"Operators",syntax:["x .^ y","dotPow(x, y)"],description:"Calculates the power of x to y element wise.",examples:["a = [1, 2, 3; 4, 5, 6]","a .^ 2"],seealso:["pow"]},exp:{name:"exp",category:"Arithmetic",syntax:["exp(x)"],description:"Calculate the exponent of a value.",examples:["exp(1.3)","e ^ 1.3","log(exp(1.3))","x = 2.4","(exp(i*x) == cos(x) + i*sin(x))   # Euler's formula"],seealso:["expm","expm1","pow","log"]},expm:{name:"expm",category:"Arithmetic",syntax:["exp(x)"],description:"Compute the matrix exponential, expm(A) = e^A. The matrix must be square. Not to be confused with exp(a), which performs element-wise exponentiation.",examples:["expm([[0,2],[0,0]])"],seealso:["exp"]},expm1:{name:"expm1",category:"Arithmetic",syntax:["expm1(x)"],description:"Calculate the value of subtracting 1 from the exponential value.",examples:["expm1(2)","pow(e, 2) - 1","log(expm1(2) + 1)"],seealso:["exp","pow","log"]},fix:{name:"fix",category:"Arithmetic",syntax:["fix(x)"],description:"Round a value towards zero. If x is complex, both real and imaginary part are rounded towards zero.",examples:["fix(3.2)","fix(3.8)","fix(-4.2)","fix(-4.8)"],seealso:["ceil","floor","round"]},floor:{name:"floor",category:"Arithmetic",syntax:["floor(x)"],description:"Round a value towards minus infinity.If x is complex, both real and imaginary part are rounded towards minus infinity.",examples:["floor(3.2)","floor(3.8)","floor(-4.2)"],seealso:["ceil","fix","round"]},gcd:{name:"gcd",category:"Arithmetic",syntax:["gcd(a, b)","gcd(a, b, c, ...)"],description:"Compute the greatest common divisor.",examples:["gcd(8, 12)","gcd(-4, 6)","gcd(25, 15, -10)"],seealso:["lcm","xgcd"]},hypot:{name:"hypot",category:"Arithmetic",syntax:["hypot(a, b, c, ...)","hypot([a, b, c, ...])"],description:"Calculate the hypotenusa of a list with values. ",examples:["hypot(3, 4)","sqrt(3^2 + 4^2)","hypot(-2)","hypot([3, 4, 5])"],seealso:["abs","norm"]},lcm:{name:"lcm",category:"Arithmetic",syntax:["lcm(x, y)"],description:"Compute the least common multiple.",examples:["lcm(4, 6)","lcm(6, 21)","lcm(6, 21, 5)"],seealso:["gcd"]},log:{name:"log",category:"Arithmetic",syntax:["log(x)","log(x, base)"],description:"Compute the logarithm of a value. If no base is provided, the natural logarithm of x is calculated. If base if provided, the logarithm is calculated for the specified base. log(x, base) is defined as log(x) / log(base).",examples:["log(3.5)","a = log(2.4)","exp(a)","10 ^ 4","log(10000, 10)","log(10000) / log(10)","b = log(1024, 2)","2 ^ b"],seealso:["exp","log1p","log2","log10"]},log2:{name:"log2",category:"Arithmetic",syntax:["log2(x)"],description:"Calculate the 2-base of a value. This is the same as calculating `log(x, 2)`.",examples:["log2(0.03125)","log2(16)","log2(16) / log2(2)","pow(2, 4)"],seealso:["exp","log1p","log","log10"]},log1p:{name:"log1p",category:"Arithmetic",syntax:["log1p(x)","log1p(x, base)"],description:"Calculate the logarithm of a `value+1`",examples:["log1p(2.5)","exp(log1p(1.4))","pow(10, 4)","log1p(9999, 10)","log1p(9999) / log(10)"],seealso:["exp","log","log2","log10"]},log10:{name:"log10",category:"Arithmetic",syntax:["log10(x)"],description:"Compute the 10-base logarithm of a value.",examples:["log10(0.00001)","log10(10000)","10 ^ 4","log(10000) / log(10)","log(10000, 10)"],seealso:["exp","log"]},mod:{name:"mod",category:"Operators",syntax:["x % y","x mod y","mod(x, y)"],description:"Calculates the modulus, the remainder of an integer division.",examples:["7 % 3","11 % 2","10 mod 4","isOdd(x) = x % 2","isOdd(2)","isOdd(3)"],seealso:["divide"]},multiply:{name:"multiply",category:"Operators",syntax:["x * y","multiply(x, y)"],description:"multiply two values.",examples:["a = 2.1 * 3.4","a / 3.4","2 * 3 + 4","2 * (3 + 4)","3 * 2.1 km"],seealso:["divide"]},norm:{name:"norm",category:"Arithmetic",syntax:["norm(x)","norm(x, p)"],description:"Calculate the norm of a number, vector or matrix.",examples:["abs(-3.5)","norm(-3.5)","norm(3 - 4i)","norm([1, 2, -3], Infinity)","norm([1, 2, -3], -Infinity)","norm([3, 4], 2)","norm([[1, 2], [3, 4]], 1)",'norm([[1, 2], [3, 4]], "inf")','norm([[1, 2], [3, 4]], "fro")']},nthRoot:{name:"nthRoot",category:"Arithmetic",syntax:["nthRoot(a)","nthRoot(a, root)"],description:'Calculate the nth root of a value. The principal nth root of a positive real number A, is the positive real solution of the equation "x^root = A".',examples:["4 ^ 3","nthRoot(64, 3)","nthRoot(9, 2)","sqrt(9)"],seealso:["nthRoots","pow","sqrt"]},nthRoots:{name:"nthRoots",category:"Arithmetic",syntax:["nthRoots(A)","nthRoots(A, root)"],description:'Calculate the nth roots of a value. An nth root of a positive real number A, is a positive real solution of the equation "x^root = A". This function returns an array of complex values.',examples:["nthRoots(1)","nthRoots(1, 3)"],seealso:["sqrt","pow","nthRoot"]},pow:{name:"pow",category:"Operators",syntax:["x ^ y","pow(x, y)"],description:"Calculates the power of x to y, x^y.",examples:["2^3","2*2*2","1 + e ^ (pi * i)"],seealso:["multiply","nthRoot","nthRoots","sqrt"]},round:{name:"round",category:"Arithmetic",syntax:["round(x)","round(x, n)"],description:"round a value towards the nearest integer.If x is complex, both real and imaginary part are rounded towards the nearest integer. When n is specified, the value is rounded to n decimals.",examples:["round(3.2)","round(3.8)","round(-4.2)","round(-4.8)","round(pi, 3)","round(123.45678, 2)"],seealso:["ceil","floor","fix"]},sign:{name:"sign",category:"Arithmetic",syntax:["sign(x)"],description:"Compute the sign of a value. The sign of a value x is 1 when x>1, -1 when x<0, and 0 when x=0.",examples:["sign(3.5)","sign(-4.2)","sign(0)"],seealso:["abs"]},sqrt:{name:"sqrt",category:"Arithmetic",syntax:["sqrt(x)"],description:"Compute the square root value. If x = y * y, then y is the square root of x.",examples:["sqrt(25)","5 * 5","sqrt(-1)"],seealso:["square","sqrtm","multiply","nthRoot","nthRoots","pow"]},sqrtm:{name:"sqrtm",category:"Arithmetic",syntax:["sqrtm(x)"],description:"Calculate the principal square root of a square matrix. The principal square root matrix `X` of another matrix `A` is such that `X * X = A`.",examples:["sqrtm([[1, 2], [3, 4]])"],seealso:["sqrt","abs","square","multiply"]},square:{name:"square",category:"Arithmetic",syntax:["square(x)"],description:"Compute the square of a value. The square of x is x * x.",examples:["square(3)","sqrt(9)","3^2","3 * 3"],seealso:["multiply","pow","sqrt","cube"]},subtract:{name:"subtract",category:"Operators",syntax:["x - y","subtract(x, y)"],description:"subtract two values.",examples:["a = 5.3 - 2","a + 2","2/3 - 1/6","2 * 3 - 3","2.1 km - 500m"],seealso:["add"]},unaryMinus:{name:"unaryMinus",category:"Operators",syntax:["-x","unaryMinus(x)"],description:"Inverse the sign of a value. Converts booleans and strings to numbers.",examples:["-4.5","-(-5.6)",'-"22"'],seealso:["add","subtract","unaryPlus"]},unaryPlus:{name:"unaryPlus",category:"Operators",syntax:["+x","unaryPlus(x)"],description:"Converts booleans and strings to numbers.",examples:["+true",'+"2"'],seealso:["add","subtract","unaryMinus"]},xgcd:{name:"xgcd",category:"Arithmetic",syntax:["xgcd(a, b)"],description:"Calculate the extended greatest common divisor for two values. The result is an array [d, x, y] with 3 entries, where d is the greatest common divisor, and d = x * a + y * b.",examples:["xgcd(8, 12)","gcd(8, 12)","xgcd(36163, 21199)"],seealso:["gcd","lcm"]},bitAnd:{name:"bitAnd",category:"Bitwise",syntax:["x & y","bitAnd(x, y)"],description:"Bitwise AND operation. Performs the logical AND operation on each pair of the corresponding bits of the two given values by multiplying them. If both bits in the compared position are 1, the bit in the resulting binary representation is 1, otherwise, the result is 0",examples:["5 & 3","bitAnd(53, 131)","[1, 12, 31] & 42"],seealso:["bitNot","bitOr","bitXor","leftShift","rightArithShift","rightLogShift"]},bitNot:{name:"bitNot",category:"Bitwise",syntax:["~x","bitNot(x)"],description:"Bitwise NOT operation. Performs a logical negation on each bit of the given value. Bits that are 0 become 1, and those that are 1 become 0.",examples:["~1","~2","bitNot([2, -3, 4])"],seealso:["bitAnd","bitOr","bitXor","leftShift","rightArithShift","rightLogShift"]},bitOr:{name:"bitOr",category:"Bitwise",syntax:["x | y","bitOr(x, y)"],description:"Bitwise OR operation. Performs the logical inclusive OR operation on each pair of corresponding bits of the two given values. The result in each position is 1 if the first bit is 1 or the second bit is 1 or both bits are 1, otherwise, the result is 0.",examples:["5 | 3","bitOr([1, 2, 3], 4)"],seealso:["bitAnd","bitNot","bitXor","leftShift","rightArithShift","rightLogShift"]},bitXor:{name:"bitXor",category:"Bitwise",syntax:["bitXor(x, y)"],description:"Bitwise XOR operation, exclusive OR. Performs the logical exclusive OR operation on each pair of corresponding bits of the two given values. The result in each position is 1 if only the first bit is 1 or only the second bit is 1, but will be 0 if both are 0 or both are 1.",examples:["bitOr(1, 2)","bitXor([2, 3, 4], 4)"],seealso:["bitAnd","bitNot","bitOr","leftShift","rightArithShift","rightLogShift"]},leftShift:{name:"leftShift",category:"Bitwise",syntax:["x << y","leftShift(x, y)"],description:"Bitwise left logical shift of a value x by y number of bits.",examples:["4 << 1","8 >> 1"],seealso:["bitAnd","bitNot","bitOr","bitXor","rightArithShift","rightLogShift"]},rightArithShift:{name:"rightArithShift",category:"Bitwise",syntax:["x >> y","rightArithShift(x, y)"],description:"Bitwise right arithmetic shift of a value x by y number of bits.",examples:["8 >> 1","4 << 1","-12 >> 2"],seealso:["bitAnd","bitNot","bitOr","bitXor","leftShift","rightLogShift"]},rightLogShift:{name:"rightLogShift",category:"Bitwise",syntax:["x >>> y","rightLogShift(x, y)"],description:"Bitwise right logical shift of a value x by y number of bits.",examples:["8 >>> 1","4 << 1","-12 >>> 2"],seealso:["bitAnd","bitNot","bitOr","bitXor","leftShift","rightArithShift"]},bellNumbers:{name:"bellNumbers",category:"Combinatorics",syntax:["bellNumbers(n)"],description:"The Bell Numbers count the number of partitions of a set. A partition is a pairwise disjoint subset of S whose union is S. `bellNumbers` only takes integer arguments. The following condition must be enforced: n >= 0.",examples:["bellNumbers(3)","bellNumbers(8)"],seealso:["stirlingS2"]},catalan:{name:"catalan",category:"Combinatorics",syntax:["catalan(n)"],description:"The Catalan Numbers enumerate combinatorial structures of many different types. catalan only takes integer arguments. The following condition must be enforced: n >= 0.",examples:["catalan(3)","catalan(8)"],seealso:["bellNumbers"]},composition:{name:"composition",category:"Combinatorics",syntax:["composition(n, k)"],description:"The composition counts of n into k parts. composition only takes integer arguments. The following condition must be enforced: k <= n.",examples:["composition(5, 3)"],seealso:["combinations"]},stirlingS2:{name:"stirlingS2",category:"Combinatorics",syntax:["stirlingS2(n, k)"],description:"he Stirling numbers of the second kind, counts the number of ways to partition a set of n labelled objects into k nonempty unlabelled subsets. `stirlingS2` only takes integer arguments. The following condition must be enforced: k <= n. If n = k or k = 1, then s(n,k) = 1.",examples:["stirlingS2(5, 3)"],seealso:["bellNumbers"]},config:{name:"config",category:"Core",syntax:["config()","config(options)"],description:"Get configuration or change configuration.",examples:["config()","1/3 + 1/4",'config({number: "Fraction"})',"1/3 + 1/4"],seealso:[]},import:{name:"import",category:"Core",syntax:["import(functions)","import(functions, options)"],description:"Import functions or constants from an object.",examples:["import({myFn: f(x)=x^2, myConstant: 32 })","myFn(2)","myConstant"],seealso:[]},typed:{name:"typed",category:"Core",syntax:["typed(signatures)","typed(name, signatures)"],description:"Create a typed function.",examples:['double = typed({ "number, number": f(x)=x+x })',"double(2)",'double("hello")'],seealso:[]},arg:{name:"arg",category:"Complex",syntax:["arg(x)"],description:"Compute the argument of a complex value. If x = a+bi, the argument is computed as atan2(b, a).",examples:["arg(2 + 2i)","atan2(3, 2)","arg(2 + 3i)"],seealso:["re","im","conj","abs"]},conj:{name:"conj",category:"Complex",syntax:["conj(x)"],description:"Compute the complex conjugate of a complex value. If x = a+bi, the complex conjugate is a-bi.",examples:["conj(2 + 3i)","conj(2 - 3i)","conj(-5.2i)"],seealso:["re","im","abs","arg"]},re:{name:"re",category:"Complex",syntax:["re(x)"],description:"Get the real part of a complex number.",examples:["re(2 + 3i)","im(2 + 3i)","re(-5.2i)","re(2.4)"],seealso:["im","conj","abs","arg"]},im:{name:"im",category:"Complex",syntax:["im(x)"],description:"Get the imaginary part of a complex number.",examples:["im(2 + 3i)","re(2 + 3i)","im(-5.2i)","im(2.4)"],seealso:["re","conj","abs","arg"]},evaluate:{name:"evaluate",category:"Expression",syntax:["evaluate(expression)","evaluate([expr1, expr2, expr3, ...])"],description:"Evaluate an expression or an array with expressions.",examples:['evaluate("2 + 3")','evaluate("sqrt(" + 4 + ")")'],seealso:[]},help:{name:"help",category:"Expression",syntax:["help(object)","help(string)"],description:"Display documentation on a function or data type.",examples:["help(sqrt)",'help("complex")'],seealso:[]},distance:{name:"distance",category:"Geometry",syntax:["distance([x1, y1], [x2, y2])","distance([[x1, y1], [x2, y2]])"],description:"Calculates the Euclidean distance between two points.",examples:["distance([0,0], [4,4])","distance([[0,0], [4,4]])"],seealso:[]},intersect:{name:"intersect",category:"Geometry",syntax:["intersect(expr1, expr2, expr3, expr4)","intersect(expr1, expr2, expr3)"],description:"Computes the intersection point of lines and/or planes.",examples:["intersect([0, 0], [10, 10], [10, 0], [0, 10])","intersect([1, 0, 1],  [4, -2, 2], [1, 1, 1, 6])"],seealso:[]},and:{name:"and",category:"Logical",syntax:["x and y","and(x, y)"],description:"Logical and. Test whether two values are both defined with a nonzero/nonempty value.",examples:["true and false","true and true","2 and 4"],seealso:["not","or","xor"]},not:{name:"not",category:"Logical",syntax:["not x","not(x)"],description:"Logical not. Flips the boolean value of given argument.",examples:["not true","not false","not 2","not 0"],seealso:["and","or","xor"]},or:{name:"or",category:"Logical",syntax:["x or y","or(x, y)"],description:"Logical or. Test if at least one value is defined with a nonzero/nonempty value.",examples:["true or false","false or false","0 or 4"],seealso:["not","and","xor"]},xor:{name:"xor",category:"Logical",syntax:["x xor y","xor(x, y)"],description:"Logical exclusive or, xor. Test whether one and only one value is defined with a nonzero/nonempty value.",examples:["true xor false","false xor false","true xor true","0 xor 4"],seealso:["not","and","or"]},concat:{name:"concat",category:"Matrix",syntax:["concat(A, B, C, ...)","concat(A, B, C, ..., dim)"],description:"Concatenate matrices. By default, the matrices are concatenated by the last dimension. The dimension on which to concatenate can be provided as last argument.",examples:["A = [1, 2; 5, 6]","B = [3, 4; 7, 8]","concat(A, B)","concat(A, B, 1)","concat(A, B, 2)"],seealso:["det","diag","identity","inv","ones","range","size","squeeze","subset","trace","transpose","zeros"]},cross:{name:"cross",category:"Matrix",syntax:["cross(A, B)"],description:"Calculate the cross product for two vectors in three dimensional space.",examples:["cross([1, 1, 0],  [0, 1, 1])","cross([3, -3, 1], [4, 9, 2])","cross([2, 3, 4],  [5, 6, 7])"],seealso:["multiply","dot"]},column:{name:"column",category:"Matrix",syntax:["column(x, index)"],description:"Return a column from a matrix or array.",examples:["A = [[1, 2], [3, 4]]","column(A, 1)","column(A, 2)"],seealso:["row"]},ctranspose:{name:"ctranspose",category:"Matrix",syntax:["x'","ctranspose(x)"],description:"Complex Conjugate and Transpose a matrix",examples:["a = [1, 2, 3; 4, 5, 6]","a'","ctranspose(a)"],seealso:["concat","det","diag","identity","inv","ones","range","size","squeeze","subset","trace","zeros"]},det:{name:"det",category:"Matrix",syntax:["det(x)"],description:"Calculate the determinant of a matrix",examples:["det([1, 2; 3, 4])","det([-2, 2, 3; -1, 1, 3; 2, 0, -1])"],seealso:["concat","diag","identity","inv","ones","range","size","squeeze","subset","trace","transpose","zeros"]},diag:{name:"diag",category:"Matrix",syntax:["diag(x)","diag(x, k)"],description:"Create a diagonal matrix or retrieve the diagonal of a matrix. When x is a vector, a matrix with the vector values on the diagonal will be returned. When x is a matrix, a vector with the diagonal values of the matrix is returned. When k is provided, the k-th diagonal will be filled in or retrieved, if k is positive, the values are placed on the super diagonal. When k is negative, the values are placed on the sub diagonal.",examples:["diag(1:3)","diag(1:3, 1)","a = [1, 2, 3; 4, 5, 6; 7, 8, 9]","diag(a)"],seealso:["concat","det","identity","inv","ones","range","size","squeeze","subset","trace","transpose","zeros"]},dot:{name:"dot",category:"Matrix",syntax:["dot(A, B)","A * B"],description:"Calculate the dot product of two vectors. The dot product of A = [a1, a2, a3, ..., an] and B = [b1, b2, b3, ..., bn] is defined as dot(A, B) = a1 * b1 + a2 * b2 + a3 * b3 + ... + an * bn",examples:["dot([2, 4, 1], [2, 2, 3])","[2, 4, 1] * [2, 2, 3]"],seealso:["multiply","cross"]},getMatrixDataType:{name:"getMatrixDataType",category:"Matrix",syntax:["getMatrixDataType(x)"],description:'Find the data type of all elements in a matrix or array, for example "number" if all items are a number and "Complex" if all values are complex numbers. If a matrix contains more than one data type, it will return "mixed".',examples:["getMatrixDataType([1, 2, 3])","getMatrixDataType([[5 cm], [2 inch]])",'getMatrixDataType([1, "text"])',"getMatrixDataType([1, bignumber(4)])"],seealso:["matrix","sparse","typeOf"]},identity:{name:"identity",category:"Matrix",syntax:["identity(n)","identity(m, n)","identity([m, n])"],description:"Returns the identity matrix with size m-by-n. The matrix has ones on the diagonal and zeros elsewhere.",examples:["identity(3)","identity(3, 5)","a = [1, 2, 3; 4, 5, 6]","identity(size(a))"],seealso:["concat","det","diag","inv","ones","range","size","squeeze","subset","trace","transpose","zeros"]},filter:{name:"filter",category:"Matrix",syntax:["filter(x, test)"],description:"Filter items in a matrix.",examples:["isPositive(x) = x > 0","filter([6, -2, -1, 4, 3], isPositive)","filter([6, -2, 0, 1, 0], x != 0)"],seealso:["sort","map","forEach"]},flatten:{name:"flatten",category:"Matrix",syntax:["flatten(x)"],description:"Flatten a multi dimensional matrix into a single dimensional matrix.",examples:["a = [1, 2, 3; 4, 5, 6]","size(a)","b = flatten(a)","size(b)"],seealso:["concat","resize","size","squeeze"]},forEach:{name:"forEach",category:"Matrix",syntax:["forEach(x, callback)"],description:"Iterates over all elements of a matrix/array, and executes the given callback function.",examples:["forEach([1, 2, 3], function(val) { console.log(val) })"],seealso:["map","sort","filter"]},inv:{name:"inv",category:"Matrix",syntax:["inv(x)"],description:"Calculate the inverse of a matrix",examples:["inv([1, 2; 3, 4])","inv(4)","1 / 4"],seealso:["concat","det","diag","identity","ones","range","size","squeeze","subset","trace","transpose","zeros"]},eigs:{name:"eigs",category:"Matrix",syntax:["eigs(x)"],description:"Calculate the eigenvalues and eigenvectors of a real symmetric matrix",examples:["eigs([[5, 2.3], [2.3, 1]])"],seealso:["inv"]},kron:{name:"kron",category:"Matrix",syntax:["kron(x, y)"],description:"Calculates the kronecker product of 2 matrices or vectors.",examples:["kron([[1, 0], [0, 1]], [[1, 2], [3, 4]])","kron([1,1], [2,3,4])"],seealso:["multiply","dot","cross"]},map:{name:"map",category:"Matrix",syntax:["map(x, callback)"],description:"Create a new matrix or array with the results of the callback function executed on each entry of the matrix/array.",examples:["map([1, 2, 3], square)"],seealso:["filter","forEach"]},ones:{name:"ones",category:"Matrix",syntax:["ones(m)","ones(m, n)","ones(m, n, p, ...)","ones([m])","ones([m, n])","ones([m, n, p, ...])"],description:"Create a matrix containing ones.",examples:["ones(3)","ones(3, 5)","ones([2,3]) * 4.5","a = [1, 2, 3; 4, 5, 6]","ones(size(a))"],seealso:["concat","det","diag","identity","inv","range","size","squeeze","subset","trace","transpose","zeros"]},partitionSelect:{name:"partitionSelect",category:"Matrix",syntax:["partitionSelect(x, k)","partitionSelect(x, k, compare)"],description:"Partition-based selection of an array or 1D matrix. Will find the kth smallest value, and mutates the input array. Uses Quickselect.",examples:["partitionSelect([5, 10, 1], 2)",'partitionSelect(["C", "B", "A", "D"], 1)'],seealso:["sort"]},range:{name:"range",category:"Type",syntax:["start:end","start:step:end","range(start, end)","range(start, end, step)","range(string)"],description:"Create a range. Lower bound of the range is included, upper bound is excluded.",examples:["1:5","3:-1:-3","range(3, 7)","range(0, 12, 2)",'range("4:10")',"a = [1, 2, 3, 4; 5, 6, 7, 8]","a[1:2, 1:2]"],seealso:["concat","det","diag","identity","inv","ones","size","squeeze","subset","trace","transpose","zeros"]},resize:{name:"resize",category:"Matrix",syntax:["resize(x, size)","resize(x, size, defaultValue)"],description:"Resize a matrix.",examples:["resize([1,2,3,4,5], [3])","resize([1,2,3], [5])","resize([1,2,3], [5], -1)","resize(2, [2, 3])",'resize("hello", [8], "!")'],seealso:["size","subset","squeeze","reshape"]},reshape:{name:"reshape",category:"Matrix",syntax:["reshape(x, sizes)"],description:"Reshape a multi dimensional array to fit the specified dimensions.",examples:["reshape([1, 2, 3, 4, 5, 6], [2, 3])","reshape([[1, 2], [3, 4]], [1, 4])","reshape([[1, 2], [3, 4]], [4])"],seealso:["size","squeeze","resize"]},row:{name:"row",category:"Matrix",syntax:["row(x, index)"],description:"Return a row from a matrix or array.",examples:["A = [[1, 2], [3, 4]]","row(A, 1)","row(A, 2)"],seealso:["column"]},size:{name:"size",category:"Matrix",syntax:["size(x)"],description:"Calculate the size of a matrix.",examples:["size(2.3)",'size("hello world")',"a = [1, 2; 3, 4; 5, 6]","size(a)","size(1:6)"],seealso:["concat","det","diag","identity","inv","ones","range","squeeze","subset","trace","transpose","zeros"]},sort:{name:"sort",category:"Matrix",syntax:["sort(x)","sort(x, compare)"],description:'Sort the items in a matrix. Compare can be a string "asc", "desc", "natural", or a custom sort function.',examples:["sort([5, 10, 1])",'sort(["C", "B", "A", "D"])',"sortByLength(a, b) = size(a)[1] - size(b)[1]",'sort(["Langdon", "Tom", "Sara"], sortByLength)','sort(["10", "1", "2"], "natural")'],seealso:["map","filter","forEach"]},squeeze:{name:"squeeze",category:"Matrix",syntax:["squeeze(x)"],description:"Remove inner and outer singleton dimensions from a matrix.",examples:["a = zeros(3,2,1)","size(squeeze(a))","b = zeros(1,1,3)","size(squeeze(b))"],seealso:["concat","det","diag","identity","inv","ones","range","size","subset","trace","transpose","zeros"]},subset:{name:"subset",category:"Matrix",syntax:["value(index)","value(index) = replacement","subset(value, [index])","subset(value, [index], replacement)"],description:"Get or set a subset of a matrix or string. Indexes are one-based. Both the ranges lower-bound and upper-bound are included.",examples:["d = [1, 2; 3, 4]","e = []","e[1, 1:2] = [5, 6]","e[2, :] = [7, 8]","f = d * e","f[2, 1]","f[:, 1]"],seealso:["concat","det","diag","identity","inv","ones","range","size","squeeze","trace","transpose","zeros"]},trace:{name:"trace",category:"Matrix",syntax:["trace(A)"],description:"Calculate the trace of a matrix: the sum of the elements on the main diagonal of a square matrix.",examples:["A = [1, 2, 3; -1, 2, 3; 2, 0, 3]","trace(A)"],seealso:["concat","det","diag","identity","inv","ones","range","size","squeeze","subset","transpose","zeros"]},transpose:{name:"transpose",category:"Matrix",syntax:["x'","transpose(x)"],description:"Transpose a matrix",examples:["a = [1, 2, 3; 4, 5, 6]","a'","transpose(a)"],seealso:["concat","det","diag","identity","inv","ones","range","size","squeeze","subset","trace","zeros"]},zeros:{name:"zeros",category:"Matrix",syntax:["zeros(m)","zeros(m, n)","zeros(m, n, p, ...)","zeros([m])","zeros([m, n])","zeros([m, n, p, ...])"],description:"Create a matrix containing zeros.",examples:["zeros(3)","zeros(3, 5)","a = [1, 2, 3; 4, 5, 6]","zeros(size(a))"],seealso:["concat","det","diag","identity","inv","ones","range","size","squeeze","subset","trace","transpose"]},combinations:{name:"combinations",category:"Probability",syntax:["combinations(n, k)"],description:"Compute the number of combinations of n items taken k at a time",examples:["combinations(7, 5)"],seealso:["combinationsWithRep","permutations","factorial"]},combinationsWithRep:{name:"combinationsWithRep",category:"Probability",syntax:["combinationsWithRep(n, k)"],description:"Compute the number of combinations of n items taken k at a time with replacements.",examples:["combinationsWithRep(7, 5)"],seealso:["combinations","permutations","factorial"]},factorial:{name:"factorial",category:"Probability",syntax:["n!","factorial(n)"],description:"Compute the factorial of a value",examples:["5!","5 * 4 * 3 * 2 * 1","3!"],seealso:["combinations","combinationsWithRep","permutations","gamma"]},gamma:{name:"gamma",category:"Probability",syntax:["gamma(n)"],description:"Compute the gamma function. For small values, the Lanczos approximation is used, and for large values the extended Stirling approximation.",examples:["gamma(4)","3!","gamma(1/2)","sqrt(pi)"],seealso:["factorial"]},kldivergence:{name:"kldivergence",category:"Probability",syntax:["kldivergence(x, y)"],description:"Calculate the Kullback-Leibler (KL) divergence  between two distributions.",examples:["kldivergence([0.7,0.5,0.4], [0.2,0.9,0.5])"],seealso:[]},multinomial:{name:"multinomial",category:"Probability",syntax:["multinomial(A)"],description:"Multinomial Coefficients compute the number of ways of picking a1, a2, ..., ai unordered outcomes from `n` possibilities. multinomial takes one array of integers as an argument. The following condition must be enforced: every ai > 0.",examples:["multinomial([1, 2, 1])"],seealso:["combinations","factorial"]},permutations:{name:"permutations",category:"Probability",syntax:["permutations(n)","permutations(n, k)"],description:"Compute the number of permutations of n items taken k at a time",examples:["permutations(5)","permutations(5, 3)"],seealso:["combinations","combinationsWithRep","factorial"]},pickRandom:{name:"pickRandom",category:"Probability",syntax:["pickRandom(array)","pickRandom(array, number)","pickRandom(array, weights)","pickRandom(array, number, weights)","pickRandom(array, weights, number)"],description:"Pick a random entry from a given array.",examples:["pickRandom(0:10)","pickRandom([1, 3, 1, 6])","pickRandom([1, 3, 1, 6], 2)","pickRandom([1, 3, 1, 6], [2, 3, 2, 1])","pickRandom([1, 3, 1, 6], 2, [2, 3, 2, 1])","pickRandom([1, 3, 1, 6], [2, 3, 2, 1], 2)"],seealso:["random","randomInt"]},random:{name:"random",category:"Probability",syntax:["random()","random(max)","random(min, max)","random(size)","random(size, max)","random(size, min, max)"],description:"Return a random number.",examples:["random()","random(10, 20)","random([2, 3])"],seealso:["pickRandom","randomInt"]},randomInt:{name:"randomInt",category:"Probability",syntax:["randomInt(max)","randomInt(min, max)","randomInt(size)","randomInt(size, max)","randomInt(size, min, max)"],description:"Return a random integer number",examples:["randomInt(10, 20)","randomInt([2, 3], 10)"],seealso:["pickRandom","random"]},compare:{name:"compare",category:"Relational",syntax:["compare(x, y)"],description:"Compare two values. Returns 1 when x > y, -1 when x < y, and 0 when x == y.",examples:["compare(2, 3)","compare(3, 2)","compare(2, 2)","compare(5cm, 40mm)","compare(2, [1, 2, 3])"],seealso:["equal","unequal","smaller","smallerEq","largerEq","compareNatural","compareText"]},compareNatural:{name:"compareNatural",category:"Relational",syntax:["compareNatural(x, y)"],description:"Compare two values of any type in a deterministic, natural way. Returns 1 when x > y, -1 when x < y, and 0 when x == y.",examples:["compareNatural(2, 3)","compareNatural(3, 2)","compareNatural(2, 2)","compareNatural(5cm, 40mm)",'compareNatural("2", "10")',"compareNatural(2 + 3i, 2 + 4i)","compareNatural([1, 2, 4], [1, 2, 3])","compareNatural([1, 5], [1, 2, 3])","compareNatural([1, 2], [1, 2])","compareNatural({a: 2}, {a: 4})"],seealso:["equal","unequal","smaller","smallerEq","largerEq","compare","compareText"]},compareText:{name:"compareText",category:"Relational",syntax:["compareText(x, y)"],description:"Compare two strings lexically. Comparison is case sensitive. Returns 1 when x > y, -1 when x < y, and 0 when x == y.",examples:['compareText("B", "A")','compareText("A", "B")','compareText("A", "A")','compareText("2", "10")','compare("2", "10")',"compare(2, 10)",'compareNatural("2", "10")','compareText("B", ["A", "B", "C"])'],seealso:["compare","compareNatural"]},deepEqual:{name:"deepEqual",category:"Relational",syntax:["deepEqual(x, y)"],description:"Check equality of two matrices element wise. Returns true if the size of both matrices is equal and when and each of the elements are equal.",examples:["deepEqual([1,3,4], [1,3,4])","deepEqual([1,3,4], [1,3])"],seealso:["equal","unequal","smaller","larger","smallerEq","largerEq","compare"]},equal:{name:"equal",category:"Relational",syntax:["x == y","equal(x, y)"],description:"Check equality of two values. Returns true if the values are equal, and false if not.",examples:["2+2 == 3","2+2 == 4","a = 3.2","b = 6-2.8","a == b","50cm == 0.5m"],seealso:["unequal","smaller","larger","smallerEq","largerEq","compare","deepEqual","equalText"]},equalText:{name:"equalText",category:"Relational",syntax:["equalText(x, y)"],description:"Check equality of two strings. Comparison is case sensitive. Returns true if the values are equal, and false if not.",examples:['equalText("Hello", "Hello")','equalText("a", "A")','equal("2e3", "2000")','equalText("2e3", "2000")','equalText("B", ["A", "B", "C"])'],seealso:["compare","compareNatural","compareText","equal"]},larger:{name:"larger",category:"Relational",syntax:["x > y","larger(x, y)"],description:"Check if value x is larger than y. Returns true if x is larger than y, and false if not.",examples:["2 > 3","5 > 2*2","a = 3.3","b = 6-2.8","(a > b)","(b < a)","5 cm > 2 inch"],seealso:["equal","unequal","smaller","smallerEq","largerEq","compare"]},largerEq:{name:"largerEq",category:"Relational",syntax:["x >= y","largerEq(x, y)"],description:"Check if value x is larger or equal to y. Returns true if x is larger or equal to y, and false if not.",examples:["2 >= 1+1","2 > 1+1","a = 3.2","b = 6-2.8","(a >= b)"],seealso:["equal","unequal","smallerEq","smaller","compare"]},smaller:{name:"smaller",category:"Relational",syntax:["x < y","smaller(x, y)"],description:"Check if value x is smaller than value y. Returns true if x is smaller than y, and false if not.",examples:["2 < 3","5 < 2*2","a = 3.3","b = 6-2.8","(a < b)","5 cm < 2 inch"],seealso:["equal","unequal","larger","smallerEq","largerEq","compare"]},smallerEq:{name:"smallerEq",category:"Relational",syntax:["x <= y","smallerEq(x, y)"],description:"Check if value x is smaller or equal to value y. Returns true if x is smaller than y, and false if not.",examples:["2 <= 1+1","2 < 1+1","a = 3.2","b = 6-2.8","(a <= b)"],seealso:["equal","unequal","larger","smaller","largerEq","compare"]},unequal:{name:"unequal",category:"Relational",syntax:["x != y","unequal(x, y)"],description:"Check unequality of two values. Returns true if the values are unequal, and false if they are equal.",examples:["2+2 != 3","2+2 != 4","a = 3.2","b = 6-2.8","a != b","50cm != 0.5m","5 cm != 2 inch"],seealso:["equal","smaller","larger","smallerEq","largerEq","compare","deepEqual"]},setCartesian:{name:"setCartesian",category:"Set",syntax:["setCartesian(set1, set2)"],description:"Create the cartesian product of two (multi)sets. Multi-dimension arrays will be converted to single-dimension arrays before the operation.",examples:["setCartesian([1, 2], [3, 4])"],seealso:["setUnion","setIntersect","setDifference","setPowerset"]},setDifference:{name:"setDifference",category:"Set",syntax:["setDifference(set1, set2)"],description:"Create the difference of two (multi)sets: every element of set1, that is not the element of set2. Multi-dimension arrays will be converted to single-dimension arrays before the operation.",examples:["setDifference([1, 2, 3, 4], [3, 4, 5, 6])","setDifference([[1, 2], [3, 4]], [[3, 4], [5, 6]])"],seealso:["setUnion","setIntersect","setSymDifference"]},setDistinct:{name:"setDistinct",category:"Set",syntax:["setDistinct(set)"],description:"Collect the distinct elements of a multiset. A multi-dimension array will be converted to a single-dimension array before the operation.",examples:["setDistinct([1, 1, 1, 2, 2, 3])"],seealso:["setMultiplicity"]},setIntersect:{name:"setIntersect",category:"Set",syntax:["setIntersect(set1, set2)"],description:"Create the intersection of two (multi)sets. Multi-dimension arrays will be converted to single-dimension arrays before the operation.",examples:["setIntersect([1, 2, 3, 4], [3, 4, 5, 6])","setIntersect([[1, 2], [3, 4]], [[3, 4], [5, 6]])"],seealso:["setUnion","setDifference"]},setIsSubset:{name:"setIsSubset",category:"Set",syntax:["setIsSubset(set1, set2)"],description:"Check whether a (multi)set is a subset of another (multi)set: every element of set1 is the element of set2. Multi-dimension arrays will be converted to single-dimension arrays before the operation.",examples:["setIsSubset([1, 2], [3, 4, 5, 6])","setIsSubset([3, 4], [3, 4, 5, 6])"],seealso:["setUnion","setIntersect","setDifference"]},setMultiplicity:{name:"setMultiplicity",category:"Set",syntax:["setMultiplicity(element, set)"],description:"Count the multiplicity of an element in a multiset. A multi-dimension array will be converted to a single-dimension array before the operation.",examples:["setMultiplicity(1, [1, 2, 2, 4])","setMultiplicity(2, [1, 2, 2, 4])"],seealso:["setDistinct","setSize"]},setPowerset:{name:"setPowerset",category:"Set",syntax:["setPowerset(set)"],description:"Create the powerset of a (multi)set: the powerset contains very possible subsets of a (multi)set. A multi-dimension array will be converted to a single-dimension array before the operation.",examples:["setPowerset([1, 2, 3])"],seealso:["setCartesian"]},setSize:{name:"setSize",category:"Set",syntax:["setSize(set)","setSize(set, unique)"],description:'Count the number of elements of a (multi)set. When the second parameter "unique" is true, count only the unique values. A multi-dimension array will be converted to a single-dimension array before the operation.',examples:["setSize([1, 2, 2, 4])","setSize([1, 2, 2, 4], true)"],seealso:["setUnion","setIntersect","setDifference"]},setSymDifference:{name:"setSymDifference",category:"Set",syntax:["setSymDifference(set1, set2)"],description:"Create the symmetric difference of two (multi)sets. Multi-dimension arrays will be converted to single-dimension arrays before the operation.",examples:["setSymDifference([1, 2, 3, 4], [3, 4, 5, 6])","setSymDifference([[1, 2], [3, 4]], [[3, 4], [5, 6]])"],seealso:["setUnion","setIntersect","setDifference"]},setUnion:{name:"setUnion",category:"Set",syntax:["setUnion(set1, set2)"],description:"Create the union of two (multi)sets. Multi-dimension arrays will be converted to single-dimension arrays before the operation.",examples:["setUnion([1, 2, 3, 4], [3, 4, 5, 6])","setUnion([[1, 2], [3, 4]], [[3, 4], [5, 6]])"],seealso:["setIntersect","setDifference"]},erf:{name:"erf",category:"Special",syntax:["erf(x)"],description:"Compute the erf function of a value using a rational Chebyshev approximations for different intervals of x",examples:["erf(0.2)","erf(-0.5)","erf(4)"],seealso:[]},mad:{name:"mad",category:"Statistics",syntax:["mad(a, b, c, ...)","mad(A)"],description:"Compute the median absolute deviation of a matrix or a list with values. The median absolute deviation is defined as the median of the absolute deviations from the median.",examples:["mad(10, 20, 30)","mad([1, 2, 3])"],seealso:["mean","median","std","abs"]},max:{name:"max",category:"Statistics",syntax:["max(a, b, c, ...)","max(A)","max(A, dim)"],description:"Compute the maximum value of a list of values.",examples:["max(2, 3, 4, 1)","max([2, 3, 4, 1])","max([2, 5; 4, 3])","max([2, 5; 4, 3], 1)","max([2, 5; 4, 3], 2)","max(2.7, 7.1, -4.5, 2.0, 4.1)","min(2.7, 7.1, -4.5, 2.0, 4.1)"],seealso:["mean","median","min","prod","std","sum","variance"]},mean:{name:"mean",category:"Statistics",syntax:["mean(a, b, c, ...)","mean(A)","mean(A, dim)"],description:"Compute the arithmetic mean of a list of values.",examples:["mean(2, 3, 4, 1)","mean([2, 3, 4, 1])","mean([2, 5; 4, 3])","mean([2, 5; 4, 3], 1)","mean([2, 5; 4, 3], 2)","mean([1.0, 2.7, 3.2, 4.0])"],seealso:["max","median","min","prod","std","sum","variance"]},median:{name:"median",category:"Statistics",syntax:["median(a, b, c, ...)","median(A)"],description:"Compute the median of all values. The values are sorted and the middle value is returned. In case of an even number of values, the average of the two middle values is returned.",examples:["median(5, 2, 7)","median([3, -1, 5, 7])"],seealso:["max","mean","min","prod","std","sum","variance","quantileSeq"]},min:{name:"min",category:"Statistics",syntax:["min(a, b, c, ...)","min(A)","min(A, dim)"],description:"Compute the minimum value of a list of values.",examples:["min(2, 3, 4, 1)","min([2, 3, 4, 1])","min([2, 5; 4, 3])","min([2, 5; 4, 3], 1)","min([2, 5; 4, 3], 2)","min(2.7, 7.1, -4.5, 2.0, 4.1)","max(2.7, 7.1, -4.5, 2.0, 4.1)"],seealso:["max","mean","median","prod","std","sum","variance"]},mode:{name:"mode",category:"Statistics",syntax:["mode(a, b, c, ...)","mode(A)","mode(A, a, b, B, c, ...)"],description:"Computes the mode of all values as an array. In case mode being more than one, multiple values are returned in an array.",examples:["mode(2, 1, 4, 3, 1)","mode([1, 2.7, 3.2, 4, 2.7])","mode(1, 4, 6, 1, 6)"],seealso:["max","mean","min","median","prod","std","sum","variance"]},prod:{name:"prod",category:"Statistics",syntax:["prod(a, b, c, ...)","prod(A)"],description:"Compute the product of all values.",examples:["prod(2, 3, 4)","prod([2, 3, 4])","prod([2, 5; 4, 3])"],seealso:["max","mean","min","median","min","std","sum","variance"]},quantileSeq:{name:"quantileSeq",category:"Statistics",syntax:["quantileSeq(A, prob[, sorted])","quantileSeq(A, [prob1, prob2, ...][, sorted])","quantileSeq(A, N[, sorted])"],description:"Compute the prob order quantile of a matrix or a list with values. The sequence is sorted and the middle value is returned. Supported types of sequence values are: Number, BigNumber, Unit Supported types of probablity are: Number, BigNumber. \n\nIn case of a (multi dimensional) array or matrix, the prob order quantile of all elements will be calculated.",examples:["quantileSeq([3, -1, 5, 7], 0.5)","quantileSeq([3, -1, 5, 7], [1/3, 2/3])","quantileSeq([3, -1, 5, 7], 2)","quantileSeq([-1, 3, 5, 7], 0.5, true)"],seealso:["mean","median","min","max","prod","std","sum","variance"]},std:{name:"std",category:"Statistics",syntax:["std(a, b, c, ...)","std(A)","std(A, normalization)"],description:'Compute the standard deviation of all values, defined as std(A) = sqrt(variance(A)). Optional parameter normalization can be "unbiased" (default), "uncorrected", or "biased".',examples:["std(2, 4, 6)","std([2, 4, 6, 8])",'std([2, 4, 6, 8], "uncorrected")','std([2, 4, 6, 8], "biased")',"std([1, 2, 3; 4, 5, 6])"],seealso:["max","mean","min","median","prod","sum","variance"]},sum:{name:"sum",category:"Statistics",syntax:["sum(a, b, c, ...)","sum(A)"],description:"Compute the sum of all values.",examples:["sum(2, 3, 4, 1)","sum([2, 3, 4, 1])","sum([2, 5; 4, 3])"],seealso:["max","mean","median","min","prod","std","sum","variance"]},variance:{name:"variance",category:"Statistics",syntax:["variance(a, b, c, ...)","variance(A)","variance(A, normalization)"],description:'Compute the variance of all values. Optional parameter normalization can be "unbiased" (default), "uncorrected", or "biased".',examples:["variance(2, 4, 6)","variance([2, 4, 6, 8])",'variance([2, 4, 6, 8], "uncorrected")','variance([2, 4, 6, 8], "biased")',"variance([1, 2, 3; 4, 5, 6])"],seealso:["max","mean","min","median","min","prod","std","sum"]},acos:{name:"acos",category:"Trigonometry",syntax:["acos(x)"],description:"Compute the inverse cosine of a value in radians.",examples:["acos(0.5)","acos(cos(2.3))"],seealso:["cos","atan","asin"]},acosh:{name:"acosh",category:"Trigonometry",syntax:["acosh(x)"],description:"Calculate the hyperbolic arccos of a value, defined as `acosh(x) = ln(sqrt(x^2 - 1) + x)`.",examples:["acosh(1.5)"],seealso:["cosh","asinh","atanh"]},acot:{name:"acot",category:"Trigonometry",syntax:["acot(x)"],description:"Calculate the inverse cotangent of a value.",examples:["acot(0.5)","acot(cot(0.5))","acot(2)"],seealso:["cot","atan"]},acoth:{name:"acoth",category:"Trigonometry",syntax:["acoth(x)"],description:"Calculate the hyperbolic arccotangent of a value, defined as `acoth(x) = (ln((x+1)/x) + ln(x/(x-1))) / 2`.",examples:["acoth(2)","acoth(0.5)"],seealso:["acsch","asech"]},acsc:{name:"acsc",category:"Trigonometry",syntax:["acsc(x)"],description:"Calculate the inverse cotangent of a value.",examples:["acsc(2)","acsc(csc(0.5))","acsc(0.5)"],seealso:["csc","asin","asec"]},acsch:{name:"acsch",category:"Trigonometry",syntax:["acsch(x)"],description:"Calculate the hyperbolic arccosecant of a value, defined as `acsch(x) = ln(1/x + sqrt(1/x^2 + 1))`.",examples:["acsch(0.5)"],seealso:["asech","acoth"]},asec:{name:"asec",category:"Trigonometry",syntax:["asec(x)"],description:"Calculate the inverse secant of a value.",examples:["asec(0.5)","asec(sec(0.5))","asec(2)"],seealso:["acos","acot","acsc"]},asech:{name:"asech",category:"Trigonometry",syntax:["asech(x)"],description:"Calculate the inverse secant of a value.",examples:["asech(0.5)"],seealso:["acsch","acoth"]},asin:{name:"asin",category:"Trigonometry",syntax:["asin(x)"],description:"Compute the inverse sine of a value in radians.",examples:["asin(0.5)","asin(sin(0.5))"],seealso:["sin","acos","atan"]},asinh:{name:"asinh",category:"Trigonometry",syntax:["asinh(x)"],description:"Calculate the hyperbolic arcsine of a value, defined as `asinh(x) = ln(x + sqrt(x^2 + 1))`.",examples:["asinh(0.5)"],seealso:["acosh","atanh"]},atan:{name:"atan",category:"Trigonometry",syntax:["atan(x)"],description:"Compute the inverse tangent of a value in radians.",examples:["atan(0.5)","atan(tan(0.5))"],seealso:["tan","acos","asin"]},atanh:{name:"atanh",category:"Trigonometry",syntax:["atanh(x)"],description:"Calculate the hyperbolic arctangent of a value, defined as `atanh(x) = ln((1 + x)/(1 - x)) / 2`.",examples:["atanh(0.5)"],seealso:["acosh","asinh"]},atan2:{name:"atan2",category:"Trigonometry",syntax:["atan2(y, x)"],description:"Computes the principal value of the arc tangent of y/x in radians.",examples:["atan2(2, 2) / pi","angle = 60 deg in rad","x = cos(angle)","y = sin(angle)","atan2(y, x)"],seealso:["sin","cos","tan"]},cos:{name:"cos",category:"Trigonometry",syntax:["cos(x)"],description:"Compute the cosine of x in radians.",examples:["cos(2)","cos(pi / 4) ^ 2","cos(180 deg)","cos(60 deg)","sin(0.2)^2 + cos(0.2)^2"],seealso:["acos","sin","tan"]},cosh:{name:"cosh",category:"Trigonometry",syntax:["cosh(x)"],description:"Compute the hyperbolic cosine of x in radians.",examples:["cosh(0.5)"],seealso:["sinh","tanh","coth"]},cot:{name:"cot",category:"Trigonometry",syntax:["cot(x)"],description:"Compute the cotangent of x in radians. Defined as 1/tan(x)",examples:["cot(2)","1 / tan(2)"],seealso:["sec","csc","tan"]},coth:{name:"coth",category:"Trigonometry",syntax:["coth(x)"],description:"Compute the hyperbolic cotangent of x in radians.",examples:["coth(2)","1 / tanh(2)"],seealso:["sech","csch","tanh"]},csc:{name:"csc",category:"Trigonometry",syntax:["csc(x)"],description:"Compute the cosecant of x in radians. Defined as 1/sin(x)",examples:["csc(2)","1 / sin(2)"],seealso:["sec","cot","sin"]},csch:{name:"csch",category:"Trigonometry",syntax:["csch(x)"],description:"Compute the hyperbolic cosecant of x in radians. Defined as 1/sinh(x)",examples:["csch(2)","1 / sinh(2)"],seealso:["sech","coth","sinh"]},sec:{name:"sec",category:"Trigonometry",syntax:["sec(x)"],description:"Compute the secant of x in radians. Defined as 1/cos(x)",examples:["sec(2)","1 / cos(2)"],seealso:["cot","csc","cos"]},sech:{name:"sech",category:"Trigonometry",syntax:["sech(x)"],description:"Compute the hyperbolic secant of x in radians. Defined as 1/cosh(x)",examples:["sech(2)","1 / cosh(2)"],seealso:["coth","csch","cosh"]},sin:{name:"sin",category:"Trigonometry",syntax:["sin(x)"],description:"Compute the sine of x in radians.",examples:["sin(2)","sin(pi / 4) ^ 2","sin(90 deg)","sin(30 deg)","sin(0.2)^2 + cos(0.2)^2"],seealso:["asin","cos","tan"]},sinh:{name:"sinh",category:"Trigonometry",syntax:["sinh(x)"],description:"Compute the hyperbolic sine of x in radians.",examples:["sinh(0.5)"],seealso:["cosh","tanh"]},tan:{name:"tan",category:"Trigonometry",syntax:["tan(x)"],description:"Compute the tangent of x in radians.",examples:["tan(0.5)","sin(0.5) / cos(0.5)","tan(pi / 4)","tan(45 deg)"],seealso:["atan","sin","cos"]},tanh:{name:"tanh",category:"Trigonometry",syntax:["tanh(x)"],description:"Compute the hyperbolic tangent of x in radians.",examples:["tanh(0.5)","sinh(0.5) / cosh(0.5)"],seealso:["sinh","cosh"]},to:{name:"to",category:"Units",syntax:["x to unit","to(x, unit)"],description:"Change the unit of a value.",examples:["5 inch to cm","3.2kg to g","16 bytes in bits"],seealso:[]},clone:{name:"clone",category:"Utils",syntax:["clone(x)"],description:"Clone a variable. Creates a copy of primitive variables,and a deep copy of matrices",examples:["clone(3.5)","clone(2 - 4i)","clone(45 deg)","clone([1, 2; 3, 4])",'clone("hello world")'],seealso:[]},format:{name:"format",category:"Utils",syntax:["format(value)","format(value, precision)"],description:"Format a value of any type as string.",examples:["format(2.3)","format(3 - 4i)","format([])","format(pi, 3)"],seealso:["print"]},isNaN:{name:"isNaN",category:"Utils",syntax:["isNaN(x)"],description:"Test whether a value is NaN (not a number)",examples:["isNaN(2)","isNaN(0 / 0)","isNaN(NaN)","isNaN(Infinity)"],seealso:["isNegative","isNumeric","isPositive","isZero"]},isInteger:{name:"isInteger",category:"Utils",syntax:["isInteger(x)"],description:"Test whether a value is an integer number.",examples:["isInteger(2)","isInteger(3.5)","isInteger([3, 0.5, -2])"],seealso:["isNegative","isNumeric","isPositive","isZero"]},isNegative:{name:"isNegative",category:"Utils",syntax:["isNegative(x)"],description:"Test whether a value is negative: smaller than zero.",examples:["isNegative(2)","isNegative(0)","isNegative(-4)","isNegative([3, 0.5, -2])"],seealso:["isInteger","isNumeric","isPositive","isZero"]},isNumeric:{name:"isNumeric",category:"Utils",syntax:["isNumeric(x)"],description:"Test whether a value is a numeric value. Returns true when the input is a number, BigNumber, Fraction, or boolean.",examples:["isNumeric(2)",'isNumeric("2")','hasNumericValue("2")',"isNumeric(0)","isNumeric(bignumber(500))","isNumeric(fraction(0.125))","isNumeric(2 + 3i)",'isNumeric([2.3, "foo", false])'],seealso:["isInteger","isZero","isNegative","isPositive","isNaN","hasNumericValue"]},hasNumericValue:{name:"hasNumericValue",category:"Utils",syntax:["hasNumericValue(x)"],description:"Test whether a value is an numeric value. In case of a string, true is returned if the string contains a numeric value.",examples:["hasNumericValue(2)",'hasNumericValue("2")','isNumeric("2")',"hasNumericValue(0)","hasNumericValue(bignumber(500))","hasNumericValue(fraction(0.125))","hasNumericValue(2 + 3i)",'hasNumericValue([2.3, "foo", false])'],seealso:["isInteger","isZero","isNegative","isPositive","isNaN","isNumeric"]},isPositive:{name:"isPositive",category:"Utils",syntax:["isPositive(x)"],description:"Test whether a value is positive: larger than zero.",examples:["isPositive(2)","isPositive(0)","isPositive(-4)","isPositive([3, 0.5, -2])"],seealso:["isInteger","isNumeric","isNegative","isZero"]},isPrime:{name:"isPrime",category:"Utils",syntax:["isPrime(x)"],description:"Test whether a value is prime: has no divisors other than itself and one.",examples:["isPrime(3)","isPrime(-2)","isPrime([2, 17, 100])"],seealso:["isInteger","isNumeric","isNegative","isZero"]},isZero:{name:"isZero",category:"Utils",syntax:["isZero(x)"],description:"Test whether a value is zero.",examples:["isZero(2)","isZero(0)","isZero(-4)","isZero([3, 0, -2, 0])"],seealso:["isInteger","isNumeric","isNegative","isPositive"]},typeOf:{name:"typeOf",category:"Utils",syntax:["typeOf(x)"],description:"Get the type of a variable.",examples:["typeOf(3.5)","typeOf(2 - 4i)","typeOf(45 deg)",'typeOf("hello world")'],seealso:["getMatrixDataType"]},numeric:{name:"numeric",category:"Utils",syntax:["numeric(x)"],description:"Convert a numeric input to a specific numeric type: number, BigNumber, or Fraction.",examples:['numeric("4")','numeric("4", "number")','numeric("4", "BigNumber")','numeric("4", "Fraction)','numeric(4, "Fraction")','numeric(fraction(2, 5), "number)'],seealso:["number","fraction","bignumber","string","format"]}},Vh=en("help",["typed","mathWithTransform","Help"],(function(e){var n=e.typed,t=e.mathWithTransform,r=e.Help;return n("help",{any:function(e){var n,i=e;if("string"!=typeof e)for(n in t)if(Q(t,n)&&e===t[n]){i=n;break}var a=_o($h,i);if(!a){var o="function"==typeof i?i.name:i;throw new Error('No documentation found on "'+o+'"')}return new r(a)}})})),Wh=en("simplifyUtil",["FunctionNode","OperatorNode","SymbolNode"],(function(e){var n=e.FunctionNode,t=e.OperatorNode,r=e.SymbolNode,i={add:!0,multiply:!0},a={add:!0,multiply:!0};function o(e,n){if(!F(e))return!1;var t=e.fn.toString();return n&&Q(n,t)&&Q(n[t],"associative")?n[t].associative:a[t]||!1}function s(e){var n,t=[];return o(e)?(n=e.op,function e(r){for(var i=0;i<r.args.length;i++){var a=r.args[i];F(a)&&n===a.op?e(a):t.push(a)}}(e),t):e.args}function u(e){return F(e)?function(n){try{return new t(e.op,e.fn,n,e.implicit)}catch(e){return console.error(e),[]}}:function(t){return new n(new r(e.name),t)}}return{createMakeNodeFunction:u,isCommutative:function(e,n){if(!F(e))return!0;var t=e.fn.toString();return n&&Q(n,t)&&Q(n[t],"commutative")?n[t].commutative:i[t]||!1},isAssociative:o,flatten:function e(n){if(!n.args||0===n.args.length)return n;n.args=s(n);for(var t=0;t<n.args.length;t++)e(n.args[t])},allChildren:s,unflattenr:function e(n){if(n.args&&0!==n.args.length){for(var t=u(n),r=n.args.length,i=0;i<r;i++)e(n.args[i]);if(r>2&&o(n)){for(var a=n.args.pop();n.args.length>0;)a=t([n.args.pop(),a]);n.args=a.args}}},unflattenl:function e(n){if(n.args&&0!==n.args.length){for(var t=u(n),r=n.args.length,i=0;i<r;i++)e(n.args[i]);if(r>2&&o(n)){for(var a=n.args.shift();n.args.length>0;)a=t([a,n.args.shift()]);n.args=a.args}}}}})),Zh=en("simplifyCore",["equal","isZero","add","subtract","multiply","divide","pow","ConstantNode","OperatorNode","FunctionNode","ParenthesisNode"],(function(e){var n=e.equal,t=e.isZero,r=e.add,i=e.subtract,a=e.multiply,o=e.divide,s=e.pow,u=e.ConstantNode,c=e.OperatorNode,f=e.FunctionNode,l=e.ParenthesisNode,p=new u(0),d=new u(1);return function e(m){if(F(m)&&m.isUnary()){var h=e(m.args[0]);if("+"===m.op)return h;if("-"===m.op){if(F(h)){if(h.isUnary()&&"-"===h.op)return h.args[0];if(h.isBinary()&&"subtract"===h.fn)return new c("-","subtract",[h.args[1],h.args[0]])}return new c(m.op,m.fn,[h])}}else if(F(m)&&m.isBinary()){var y=e(m.args[0]),g=e(m.args[1]);if("+"===m.op){if(k(y)){if(t(y.value))return g;if(k(g))return new u(r(y.value,g.value))}return k(g)&&t(g.value)?y:F(g)&&g.isUnary()&&"-"===g.op?new c("-","subtract",[y,g.args[0]]):new c(m.op,m.fn,g?[y,g]:[y])}if("-"===m.op){if(k(y)&&g){if(k(g))return new u(i(y.value,g.value));if(t(y.value))return new c("-","unaryMinus",[g])}if("subtract"===m.fn)return k(g)&&t(g.value)?y:F(g)&&g.isUnary()&&"-"===g.op?e(new c("+","add",[y,g.args[0]])):new c(m.op,m.fn,[y,g])}else{if("*"===m.op){if(k(y)){if(t(y.value))return p;if(n(y.value,1))return g;if(k(g))return new u(a(y.value,g.value))}if(k(g)){if(t(g.value))return p;if(n(g.value,1))return y;if(F(y)&&y.isBinary()&&y.op===m.op){var v=y.args[0];if(k(v)){var x=new u(a(v.value,g.value));return new c(m.op,m.fn,[x,y.args[1]],m.implicit)}}return new c(m.op,m.fn,[g,y],m.implicit)}return new c(m.op,m.fn,[y,g],m.implicit)}if("/"===m.op){if(k(y)){if(t(y.value))return p;if(k(g)&&(n(g.value,1)||n(g.value,2)||n(g.value,4)))return new u(o(y.value,g.value))}return new c(m.op,m.fn,[y,g])}if("^"===m.op){if(k(g)){if(t(g.value))return d;if(n(g.value,1))return y;if(k(y))return new u(s(y.value,g.value));if(F(y)&&y.isBinary()&&"^"===y.op){var b=y.args[1];if(k(b))return new c(m.op,m.fn,[y.args[0],new u(a(b.value,g.value))])}}return new c(m.op,m.fn,[y,g])}}}else{if(j(m)){var w=e(m.content);return j(w)||L(w)||k(w)?w:new l(w)}if(q(m)){var N=m.args.map(e).map((function(e){return j(e)?e.content:e}));return new f(e(m.fn),N)}}return m}})),Jh=en("simplifyConstant",["typed","config","mathWithTransform","?fraction","?bignumber","ConstantNode","OperatorNode","FunctionNode","SymbolNode"],(function(e){var n=e.typed,t=e.config,r=e.mathWithTransform,i=e.fraction,a=e.bignumber,o=e.ConstantNode,s=e.OperatorNode,u=e.FunctionNode,f=e.SymbolNode,l=Wh({FunctionNode:u,OperatorNode:s,SymbolNode:f}),p=l.isCommutative,d=l.isAssociative,m=l.allChildren,h=l.createMakeNodeFunction;function y(e,n,t){try{return x(r[e].apply(null,n),t)}catch(i){return n=n.map((function(e){return c(e)?e.valueOf():e})),x(r[e].apply(null,n),t)}}var g=n({Fraction:function(e){var n,t=e.s*e.n;n=t<0?new s("-","unaryMinus",[new o(-t)]):new o(t);if(1===e.d)return n;return new s("/","divide",[n,new o(e.d)])},number:function(e){return e<0?b(new o(-e)):new o(e)},BigNumber:function(e){return e<0?b(new o(-e)):new o(e)},Complex:function(e){throw new Error("Cannot convert Complex number to Node")}});function v(e,n){if(n&&!1!==n.exactFractions&&isFinite(e)&&i){var t=i(e);if(t.valueOf()===e)return t}return e}var x=n({"string, Object":function(e,n){return"BigNumber"===t.number?(void 0===a&&So(),a(e)):"Fraction"===t.number?(void 0===i&&Mo(),i(e)):v(parseFloat(e),n)},"Fraction, Object":function(e,n){return e},"BigNumber, Object":function(e,n){return e},"number, Object":function(e,n){return v(e,n)},"Complex, Object":function(e,n){return 0!==e.im?e:v(e.re,n)}});function b(e){return new s("-","unaryMinus",[e])}function w(e,n,t,r){return n.reduce((function(n,i){if(P(n)||P(i))P(n)?P(i)||(i=g(i)):n=g(n);else{try{return y(e,[n,i],r)}catch(e){}n=g(n),i=g(i)}return t([n,i])}))}return function(e,n){var t=function e(n,t){switch(n.type){case"SymbolNode":return n;case"ConstantNode":return"number"!=typeof n.value&&isNaN(n.value)?n:x(n.value,t);case"FunctionNode":if(r[n.name]&&r[n.name].rawArgs)return n;if(-1===["add","multiply"].indexOf(n.name)){var i=n.args.map((function(n){return e(n,t)}));if(!i.some(P))try{return y(n.name,i,t)}catch(e){}return i=i.map((function(e){return P(e)?e:g(e)})),new u(n.name,i)}case"OperatorNode":var a,o,s=n.fn.toString(),c=h(n);if(F(n)&&n.isUnary())a=[e(n.args[0],t)],o=P(a[0])?c(a):y(s,a,t);else if(d(n))if(a=(a=m(n)).map((function(n){return e(n,t)})),p(s)){for(var f=[],l=[],v=0;v<a.length;v++)P(a[v])?l.push(a[v]):f.push(a[v]);f.length>1?(o=w(s,f,c,t),l.unshift(o),o=w(s,l,c,t)):o=w(s,a,c,t)}else o=w(s,a,c,t);else a=n.args.map((function(n){return e(n,t)})),o=w(s,a,c,t);return o;case"ParenthesisNode":return e(n.content,t);case"AccessorNode":case"ArrayNode":case"AssignmentNode":case"BlockNode":case"FunctionAssignmentNode":case"IndexNode":case"ObjectNode":case"RangeNode":case"ConditionalNode":default:throw new Error("Unimplemented node type in simplifyConstant: ".concat(n.type))}}(e,n);return P(t)?t:g(t)}})),Yh=en("resolve",["parse","FunctionNode","OperatorNode","ParenthesisNode"],(function(e){var n=e.parse,t=e.FunctionNode,r=e.OperatorNode,i=e.ParenthesisNode;return function e(a,o){if(!o)return a;if(L(a)){var s=o[a.name];if(P(s))return e(s,o);if("number"==typeof s)return n(String(s))}else{if(F(a)){var u=a.args.map((function(n){return e(n,o)}));return new r(a.op,a.fn,u,a.implicit)}if(j(a))return new i(e(a.content,o));if(q(a)){var c=a.args.map((function(n){return e(n,o)}));return new t(a.name,c)}}return a}}));function Xh(e){return(Xh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var Qh=en("simplify",["config","typed","parse","add","subtract","multiply","divide","pow","isZero","equal","?fraction","?bignumber","mathWithTransform","ConstantNode","FunctionNode","OperatorNode","ParenthesisNode","SymbolNode"],(function(e){var n=e.config,t=e.typed,r=e.parse,i=e.add,a=e.subtract,o=e.multiply,s=e.divide,u=e.pow,c=e.isZero,f=e.equal,l=e.fraction,p=e.bignumber,d=e.mathWithTransform,m=e.ConstantNode,h=e.FunctionNode,y=e.OperatorNode,g=e.ParenthesisNode,v=e.SymbolNode,x=Jh({typed:t,config:n,mathWithTransform:d,fraction:l,bignumber:p,ConstantNode:m,OperatorNode:y,FunctionNode:h,SymbolNode:v}),b=Zh({equal:f,isZero:c,add:i,subtract:a,multiply:o,divide:s,pow:u,ConstantNode:m,OperatorNode:y,FunctionNode:h,ParenthesisNode:g}),w=Yh({parse:r,FunctionNode:h,OperatorNode:y,ParenthesisNode:g}),N=Wh({FunctionNode:h,OperatorNode:y,SymbolNode:v}),S=N.isCommutative,M=N.isAssociative,D=N.flatten,E=N.unflattenr,A=N.unflattenl,_=N.createMakeNodeFunction,O=t("simplify",{string:function(e){return O(r(e),O.rules,{},{})},"string, Object":function(e,n){return O(r(e),O.rules,n,{})},"string, Object, Object":function(e,n,t){return O(r(e),O.rules,n,t)},"string, Array":function(e,n){return O(r(e),n,{},{})},"string, Array, Object":function(e,n,t){return O(r(e),n,t,{})},"string, Array, Object, Object":function(e,n,t,i){return O(r(e),n,t,i)},"Node, Object":function(e,n){return O(e,O.rules,n,{})},"Node, Object, Object":function(e,n,t){return O(e,O.rules,n,t)},Node:function(e){return O(e,O.rules,{},{})},"Node, Array":function(e,n){return O(e,n,{},{})},"Node, Array, Object":function(e,n,t){return O(e,n,t,{})},"Node, Array, Object, Object":function(e,n,t,i){n=function(e){for(var n=[],t=0;t<e.length;t++){var i=e[t],a=void 0,o=Xh(i);switch(o){case"string":var s=i.split("->");if(2!==s.length)throw SyntaxError("Could not parse rule: "+i);i={l:s[0],r:s[1]};case"object":if(a={l:C(r(i.l)),r:C(r(i.r))},i.context&&(a.evaluate=i.context),i.evaluate&&(a.evaluate=r(i.evaluate)),M(a.l)){var u=_(a.l),c=new v("_p"+I++);a.expanded={},a.expanded.l=u([a.l.clone(),c]),D(a.expanded.l),E(a.expanded.l),a.expanded.r=u([a.r,c])}break;case"function":a=i;break;default:throw TypeError("Unsupported type of rule: "+o)}n.push(a)}return n}(n);for(var a=w(e,t),o={},s=(a=C(a)).toString({parenthesis:"all"});!o[s];){o[s]=!0,I=0;for(var u=0;u<n.length;u++)"function"==typeof n[u]?a=n[u](a,i):(D(a),a=B(a,n[u])),A(a);s=a.toString({parenthesis:"all"})}return a}});function C(e){return e.transform((function(e,n,t){return j(e)?C(e.content):e}))}O.simplifyCore=b,O.resolve=w;var T={true:!0,false:!0,e:!0,i:!0,Infinity:!0,LN2:!0,LN10:!0,LOG2E:!0,LOG10E:!0,NaN:!0,phi:!0,pi:!0,SQRT1_2:!0,SQRT2:!0,tau:!0};O.rules=[b,{l:"log(e)",r:"1"},{l:"n-n1",r:"n+-n1"},{l:"-(c*v)",r:"(-c) * v"},{l:"-v",r:"(-1) * v"},{l:"n/n1^n2",r:"n*n1^-n2"},{l:"n/n1",r:"n*n1^-1"},{l:"(n ^ n1) ^ n2",r:"n ^ (n1 * n2)"},{l:"n*n",r:"n^2"},{l:"n * n^n1",r:"n^(n1+1)"},{l:"n^n1 * n^n2",r:"n^(n1+n2)"},{l:"n+n",r:"2*n"},{l:"n+-n",r:"0"},{l:"n1*n2 + n2",r:"(n1+1)*n2"},{l:"n1*n3 + n2*n3",r:"(n1+n2)*n3"},{l:"n1 + -1 * (n2 + n3)",r:"n1 + -1 * n2 + -1 * n3"},x,{l:"(-n)*n1",r:"-(n*n1)"},{l:"c+v",r:"v+c",context:{add:{commutative:!1}}},{l:"v*c",r:"c*v",context:{multiply:{commutative:!1}}},{l:"n+-n1",r:"n-n1"},{l:"n*(n1^-1)",r:"n/n1"},{l:"n*n1^-n2",r:"n/n1^n2"},{l:"n1^-1",r:"1/n1"},{l:"n*(n1/n2)",r:"(n*n1)/n2"},{l:"n-(n1+n2)",r:"n-n1-n2"},{l:"1*n",r:"n"},{l:"n1/(n2/n3)",r:"(n1*n3)/n2"}];var I=0;var B=t("applyRule",{"Node, Object":function(e,n){var t=e;if(t instanceof y||t instanceof h){if(t.args)for(var r=0;r<t.args.length;r++)t.args[r]=B(t.args[r],n)}else t instanceof g&&t.content&&(t.content=B(t.content,n));var i=n.r,a=P(n.l,t)[0];if(!a&&n.expanded&&(i=n.expanded.r,a=P(n.expanded.l,t)[0]),a){var o=t.implicit;t=i.clone(),o&&"implicit"in i&&(t.implicit=!0),t=t.transform((function(e){return e.isSymbolNode&&Q(a.placeholders,e.name)?a.placeholders[e.name].clone():e}))}return t}});function q(e,n){var t={placeholders:{}};if(!e.placeholders&&!n.placeholders)return t;if(!e.placeholders)return n;if(!n.placeholders)return e;for(var r in e.placeholders)if(Q(e.placeholders,r)&&(t.placeholders[r]=e.placeholders[r],Q(n.placeholders,r)&&!z(e.placeholders[r],n.placeholders[r])))return null;for(var i in n.placeholders)Q(n.placeholders,i)&&(t.placeholders[i]=n.placeholders[i]);return t}function R(e,n){var t,r=[];if(0===e.length||0===n.length)return r;for(var i=0;i<e.length;i++)for(var a=0;a<n.length;a++)(t=q(e[i],n[a]))&&r.push(t);return r}function P(e,n,t){var r=[{placeholders:{}}];if(e instanceof y&&n instanceof y||e instanceof h&&n instanceof h){if(e instanceof y){if(e.op!==n.op||e.fn!==n.fn)return[]}else if(e instanceof h&&e.name!==n.name)return[];if((1!==n.args.length||1!==e.args.length)&&M(n)&&!t){if(n.args.length>=2&&2===e.args.length){for(var i=function(e,n){var t,r,i=[],a=_(e);if(S(e,n))for(var o=0;o<e.args.length;o++)(r=e.args.slice(0)).splice(o,1),t=1===r.length?r[0]:a(r),i.push(a([e.args[o],t]));else t=1===(r=e.args.slice(1)).length?r[0]:a(r),i.push(a([e.args[0],t]));return i}(n,e.context),a=[],o=0;o<i.length;o++){var s=P(e,i[o],!0);a=a.concat(s)}return a}if(e.args.length>2)throw Error("Unexpected non-binary associative function: "+e.toString());return[]}for(var u=[],c=0;c<e.args.length;c++){var l=P(e.args[c],n.args[c]);if(0===l.length)return[];u.push(l)}r=function(e){if(0===e.length)return e;for(var n=e.reduce(R),t=[],r={},i=0;i<n.length;i++){var a=JSON.stringify(n[i]);r[a]||(r[a]=!0,t.push(n[i]))}return t}(u)}else if(e instanceof v){if(0===e.name.length)throw new Error("Symbol in rule has 0 length...!?");if(T[e.name]){if(e.name!==n.name)return[]}else if("n"===e.name[0]||"_p"===e.name.substring(0,2))r[0].placeholders[e.name]=n;else if("v"===e.name[0]){if(k(n))return[];r[0].placeholders[e.name]=n}else{if("c"!==e.name[0])throw new Error("Invalid symbol in rule: "+e.name);if(!(n instanceof m))return[];r[0].placeholders[e.name]=n}}else{if(!(e instanceof m))return[];if(!f(e.value,n.value))return[]}return r}function z(e,n){if(e instanceof m&&n instanceof m){if(!f(e.value,n.value))return!1}else if(e instanceof v&&n instanceof v){if(e.name!==n.name)return!1}else{if(!(e instanceof y&&n instanceof y||e instanceof h&&n instanceof h))return!1;if(e instanceof y){if(e.op!==n.op||e.fn!==n.fn)return!1}else if(e instanceof h&&e.name!==n.name)return!1;if(e.args.length!==n.args.length)return!1;for(var t=0;t<e.args.length;t++)if(!z(e.args[t],n.args[t]))return!1}return!0}return O})),Kh=en("rationalize",["config","typed","equal","isZero","add","subtract","multiply","divide","pow","parse","simplify","?bignumber","?fraction","mathWithTransform","ConstantNode","OperatorNode","FunctionNode","SymbolNode","ParenthesisNode"],(function(e){var n=e.config,t=e.typed,r=e.equal,i=e.isZero,a=e.add,o=e.subtract,s=e.multiply,u=e.divide,c=e.pow,f=e.parse,l=e.simplify,p=e.fraction,d=e.bignumber,m=e.mathWithTransform,h=e.ConstantNode,y=e.OperatorNode,g=e.FunctionNode,v=e.SymbolNode,x=e.ParenthesisNode,b=Jh({typed:t,config:n,mathWithTransform:m,fraction:p,bignumber:d,ConstantNode:h,OperatorNode:y,FunctionNode:g,SymbolNode:v}),w=Zh({equal:r,isZero:i,add:a,subtract:o,multiply:s,divide:u,pow:c,ConstantNode:h,OperatorNode:y,FunctionNode:g,ParenthesisNode:x}),N=t("rationalize",{string:function(e){return N(f(e),{},!1)},"string, boolean":function(e,n){return N(f(e),{},n)},"string, Object":function(e,n){return N(f(e),n,!1)},"string, Object, boolean":function(e,n,t){return N(f(e),n,t)},Node:function(e){return N(e,{},!1)},"Node, boolean":function(e,n){return N(e,{},n)},"Node, Object":function(e,n){return N(e,n,!1)},"Node, Object, boolean":function(e,n,t){var r=function(){var e=[w,{l:"n+n",r:"2*n"},{l:"n+-n",r:"0"},b,{l:"n*(n1^-1)",r:"n/n1"},{l:"n*n1^-n2",r:"n/n1^n2"},{l:"n1^-1",r:"1/n1"},{l:"n*(n1/n2)",r:"(n*n1)/n2"},{l:"1*n",r:"n"}],n=[{l:"(-n1)/(-n2)",r:"n1/n2"},{l:"(-n1)*(-n2)",r:"n1*n2"},{l:"n1--n2",r:"n1+n2"},{l:"n1-n2",r:"n1+(-n2)"},{l:"(n1+n2)*n3",r:"(n1*n3 + n2*n3)"},{l:"n1*(n2+n3)",r:"(n1*n2+n1*n3)"},{l:"c1*n + c2*n",r:"(c1+c2)*n"},{l:"c1*n + n",r:"(c1+1)*n"},{l:"c1*n - c2*n",r:"(c1-c2)*n"},{l:"c1*n - n",r:"(c1-1)*n"},{l:"v/c",r:"(1/c)*v"},{l:"v/-c",r:"-(1/c)*v"},{l:"-v*-c",r:"c*v"},{l:"-v*c",r:"-c*v"},{l:"v*-c",r:"-c*v"},{l:"v*c",r:"c*v"},{l:"-(-n1*n2)",r:"(n1*n2)"},{l:"-(n1*n2)",r:"(-n1*n2)"},{l:"-(-n1+n2)",r:"(n1-n2)"},{l:"-(n1+n2)",r:"(-n1-n2)"},{l:"(n1^n2)^n3",r:"(n1^(n2*n3))"},{l:"-(-n1/n2)",r:"(n1/n2)"},{l:"-(n1/n2)",r:"(-n1/n2)"}],t=[{l:"(n1/(n2/n3))",r:"((n1*n3)/n2)"},{l:"(n1/n2/n3)",r:"(n1/(n2*n3))"}],r={};return r.firstRules=e.concat(n,t),r.distrDivRules=[{l:"(n1/n2 + n3/n4)",r:"((n1*n4 + n3*n2)/(n2*n4))"},{l:"(n1/n2 + n3)",r:"((n1 + n3*n2)/n2)"},{l:"(n1 + n2/n3)",r:"((n1*n3 + n2)/n3)"}],r.sucDivRules=t,r.firstRulesAgain=e.concat(n),r.finalRules=[w,{l:"n*-n",r:"-n^2"},{l:"n*n",r:"n^2"},b,{l:"n*-n^n1",r:"-n^(n1+1)"},{l:"n*n^n1",r:"n^(n1+1)"},{l:"n^n1*-n^n2",r:"-n^(n1+n2)"},{l:"n^n1*n^n2",r:"n^(n1+n2)"},{l:"n^n1*-n",r:"-n^(n1+1)"},{l:"n^n1*n",r:"n^(n1+1)"},{l:"n^n1/-n",r:"-n^(n1-1)"},{l:"n^n1/n",r:"n^(n1-1)"},{l:"n/-n^n1",r:"-n^(1-n1)"},{l:"n/n^n1",r:"n^(1-n1)"},{l:"n^n1/-n^n2",r:"n^(n1-n2)"},{l:"n^n1/n^n2",r:"n^(n1-n2)"},{l:"n1+(-n2*n3)",r:"n1-n2*n3"},{l:"v*(-c)",r:"-c*v"},{l:"n1+-n2",r:"n1-n2"},{l:"v*c",r:"c*v"},{l:"(n1^n2)^n3",r:"(n1^(n2*n3))"}],r}(),i=function(e,n,t,r){var i=[],a=l(e,r,n,{exactFractions:!1}),o="+-*"+((t=!!t)?"/":"");!function e(n){var t=n.type;if("FunctionNode"===t)throw new Error("There is an unsolved function call");if("OperatorNode"===t)if("^"===n.op){if("ConstantNode"!==n.args[1].type||!oe(parseFloat(n.args[1].value)))throw new Error("There is a non-integer exponent");e(n.args[0])}else{if(-1===o.indexOf(n.op))throw new Error("Operator "+n.op+" invalid in polynomial expression");for(var r=0;r<n.args.length;r++)e(n.args[r])}else if("SymbolNode"===t){var a=n.name;-1===i.indexOf(a)&&i.push(a)}else if("ParenthesisNode"===t)e(n.content);else if("ConstantNode"!==t)throw new Error("type "+t+" is not allowed in polynomial expression")}(a);var s={};return s.expression=a,s.variables=i,s}(e,n,!0,r.firstRules),a=i.variables.length;if(e=i.expression,a>=1){var o,s;e=function e(n,t,r){var i=n.type,a=arguments.length>1;if("OperatorNode"===i&&n.isBinary()){var o,s=!1;if("^"===n.op&&("ParenthesisNode"!==n.args[0].type&&"OperatorNode"!==n.args[0].type||"ConstantNode"!==n.args[1].type||(o=parseFloat(n.args[1].value),s=o>=2&&oe(o))),s){if(o>2){var u=n.args[0],c=new y("^","pow",[n.args[0].cloneDeep(),new h(o-1)]);n=new y("*","multiply",[u,c])}else n=new y("*","multiply",[n.args[0],n.args[0].cloneDeep()]);a&&("content"===r?t.content=n:t.args[r]=n)}}if("ParenthesisNode"===i)e(n.content,n,"content");else if("ConstantNode"!==i&&"SymbolNode"!==i)for(var f=0;f<n.args.length;f++)e(n.args[f],n,f);if(!a)return n}(e);var u,c=!0,f=!1;for(e=l(e,r.firstRules,{},{exactFractions:!1});s=c?r.distrDivRules:r.sucDivRules,c=!c,(u=(e=l(e,s)).toString())!==o;)f=!0,o=u;f&&(e=l(e,r.firstRulesAgain,{},{exactFractions:!1})),e=l(e,r.finalRules,{},{exactFractions:!1})}var p=[],d={};return"OperatorNode"===e.type&&e.isBinary()&&"/"===e.op?(1===a&&(e.args[0]=S(e.args[0],p),e.args[1]=S(e.args[1])),t&&(d.numerator=e.args[0],d.denominator=e.args[1])):(1===a&&(e=S(e,p)),t&&(d.numerator=e,d.denominator=null)),t?(d.coefficients=p,d.variables=i.variables,d.expression=e,d):e}});function S(e,n){void 0===n&&(n=[]),n[0]=0;var t={cte:1,oper:"+",fire:""},r=0,i="";!function e(t,a,o){var s=t.type;if("FunctionNode"===s)throw new Error("There is an unsolved function call");if("OperatorNode"===s){if(-1==="+-*^".indexOf(t.op))throw new Error("Operator "+t.op+" invalid");if(null!==a){if(("unaryMinus"===t.fn||"pow"===t.fn)&&"add"!==a.fn&&"subtract"!==a.fn&&"multiply"!==a.fn)throw new Error("Invalid "+t.op+" placing");if(("subtract"===t.fn||"add"===t.fn||"multiply"===t.fn)&&"add"!==a.fn&&"subtract"!==a.fn)throw new Error("Invalid "+t.op+" placing");if(("subtract"===t.fn||"add"===t.fn||"unaryMinus"===t.fn)&&0!==o.noFil)throw new Error("Invalid "+t.op+" placing")}"^"!==t.op&&"*"!==t.op||(o.fire=t.op);for(var u=0;u<t.args.length;u++)"unaryMinus"===t.fn&&(o.oper="-"),"+"!==t.op&&"subtract"!==t.fn||(o.fire="",o.cte=1,o.oper=0===u?"+":t.op),o.noFil=u,e(t.args[u],t,o)}else if("SymbolNode"===s){if(t.name!==i&&""!==i)throw new Error("There is more than one variable");if(i=t.name,null===a)return void(n[1]=1);if("^"===a.op&&0!==o.noFil)throw new Error("In power the variable should be the first parameter");if("*"===a.op&&1!==o.noFil)throw new Error("In multiply the variable should be the second parameter");""!==o.fire&&"*"!==o.fire||(r<1&&(n[1]=0),n[1]+=o.cte*("+"===o.oper?1:-1),r=Math.max(1,r))}else{if("ConstantNode"!==s)throw new Error("Type "+s+" is not allowed");var c=parseFloat(t.value);if(null===a)return void(n[0]=c);if("^"===a.op){if(1!==o.noFil)throw new Error("Constant cannot be powered");if(!oe(c)||c<=0)throw new Error("Non-integer exponent is not allowed");for(var f=r+1;f<c;f++)n[f]=0;return c>r&&(n[c]=0),n[c]+=o.cte*("+"===o.oper?1:-1),void(r=Math.max(c,r))}o.cte=c,""===o.fire&&(n[0]+=o.cte*("+"===o.oper?1:-1))}}(e,null,t);for(var a,o=!0,s=r=n.length-1;s>=0;s--)if(0!==n[s]){var u=new h(o?n[s]:Math.abs(n[s])),c=n[s]<0?"-":"+";if(s>0){var f=new v(i);if(s>1){var l=new h(s);f=new y("^","pow",[f,l])}u=-1===n[s]&&o?new y("-","unaryMinus",[f]):1===Math.abs(n[s])?f:new y("*","multiply",[u,f])}a=o?u:"+"===c?new y("+","add",[a,u]):new y("-","subtract",[a,u]),o=!1}return o?new h(0):a}return N})),ey=en("Parser",["parse"],(function(e){var n=e.parse;function t(){if(!(this instanceof t))throw new SyntaxError("Constructor must be called with the new operator");this.scope={}}return t.prototype.type="Parser",t.prototype.isParser=!0,t.prototype.evaluate=function(e){return n(e).compile().evaluate(this.scope)},t.prototype.get=function(e){return e in this.scope?_o(this.scope,e):void 0},t.prototype.getAll=function(){return Z({},this.scope)},t.prototype.set=function(e,n){return Oo(this.scope,e,n)},t.prototype.remove=function(e){delete this.scope[e]},t.prototype.clear=function(){for(var e in this.scope)Q(this.scope,e)&&delete this.scope[e]},t}),{isClass:!0}),ny=en("parser",["typed","Parser"],(function(e){var n=e.typed,t=e.Parser;return n("parser",{"":function(){return new t}})})),ty=en("derivative",["typed","config","parse","simplify","equal","isZero","numeric","ConstantNode","FunctionNode","OperatorNode","ParenthesisNode","SymbolNode"],(function(e){var n=e.typed,t=e.config,r=e.parse,i=e.simplify,a=e.equal,o=e.isZero,s=e.numeric,u=e.ConstantNode,c=e.FunctionNode,f=e.OperatorNode,l=e.ParenthesisNode,p=e.SymbolNode,d=n("derivative",{"Node, SymbolNode, Object":function(e,n,t){var r={};h(r,e,n.name);var a=y(e,r);return t.simplify?i(a):a},"Node, SymbolNode":function(e,n){return d(e,n,{simplify:!0})},"string, SymbolNode":function(e,n){return d(r(e),n)},"string, SymbolNode, Object":function(e,n,t){return d(r(e),n,t)},"string, string":function(e,n){return d(r(e),r(n))},"string, string, Object":function(e,n,t){return d(r(e),r(n),t)},"Node, string":function(e,n){return d(e,r(n))},"Node, string, Object":function(e,n,t){return d(e,r(n),t)}});d._simplify=!0,d.toTex=function(e){return m.apply(null,e.args)};var m=n("_derivTex",{"Node, SymbolNode":function(e,n){return k(e)&&"string"===G(e.value)?m(r(e.value).toString(),n.toString(),1):m(e.toString(),n.toString(),1)},"Node, ConstantNode":function(e,n){if("string"===G(n.value))return m(e,r(n.value));throw new Error("The second parameter to 'derivative' is a non-string constant")},"Node, SymbolNode, ConstantNode":function(e,n,t){return m(e.toString(),n.name,t.value)},"string, string, number":function(e,n,t){return(1===t?"{d\\over d"+n+"}":"{d^{"+t+"}\\over d"+n+"^{"+t+"}}")+"\\left[".concat(e,"\\right]")}}),h=n("constTag",{"Object, ConstantNode, string":function(e,n){return e[n]=!0,!0},"Object, SymbolNode, string":function(e,n,t){return n.name!==t&&(e[n]=!0,!0)},"Object, ParenthesisNode, string":function(e,n,t){return h(e,n.content,t)},"Object, FunctionAssignmentNode, string":function(e,n,t){return-1===n.params.indexOf(t)?(e[n]=!0,!0):h(e,n.expr,t)},"Object, FunctionNode | OperatorNode, string":function(e,n,t){if(n.args.length>0){for(var r=h(e,n.args[0],t),i=1;i<n.args.length;++i)r=h(e,n.args[i],t)&&r;if(r)return e[n]=!0,!0}return!1}}),y=n("_derivative",{"ConstantNode, Object":function(e){return g(0)},"SymbolNode, Object":function(e,n){return void 0!==n[e]?g(0):g(1)},"ParenthesisNode, Object":function(e,n){return new l(y(e.content,n))},"FunctionAssignmentNode, Object":function(e,n){return void 0!==n[e]?g(0):y(e.expr,n)},"FunctionNode, Object":function(e,n){if(1!==e.args.length&&function(e){if(("log"===e.name||"nthRoot"===e.name||"pow"===e.name)&&2===e.args.length)return;for(var n=0;n<e.args.length;++n)e.args[n]=g(0);throw e.compile().evaluate(),new Error("Expected TypeError, but none found")}(e),void 0!==n[e])return g(0);var t,r,i,a,o=e.args[0],s=!1,u=!1;switch(e.name){case"cbrt":s=!0,r=new f("*","multiply",[g(3),new f("^","pow",[o,new f("/","divide",[g(2),g(3)])])]);break;case"sqrt":case"nthRoot":if(1===e.args.length)s=!0,r=new f("*","multiply",[g(2),new c("sqrt",[o])]);else if(2===e.args.length)return n[t=new f("/","divide",[g(1),e.args[1]])]=n[e.args[1]],y(new f("^","pow",[o,t]),n);break;case"log10":t=g(10);case"log":if(t||1!==e.args.length){if(1===e.args.length&&t||2===e.args.length&&void 0!==n[e.args[1]])r=new f("*","multiply",[o.clone(),new c("log",[t||e.args[1]])]),s=!0;else if(2===e.args.length)return y(new f("/","divide",[new c("log",[o]),new c("log",[e.args[1]])]),n)}else r=o.clone(),s=!0;break;case"pow":return n[t]=n[e.args[1]],y(new f("^","pow",[o,e.args[1]]),n);case"exp":r=new c("exp",[o.clone()]);break;case"sin":r=new c("cos",[o.clone()]);break;case"cos":r=new f("-","unaryMinus",[new c("sin",[o.clone()])]);break;case"tan":r=new f("^","pow",[new c("sec",[o.clone()]),g(2)]);break;case"sec":r=new f("*","multiply",[e,new c("tan",[o.clone()])]);break;case"csc":u=!0,r=new f("*","multiply",[e,new c("cot",[o.clone()])]);break;case"cot":u=!0,r=new f("^","pow",[new c("csc",[o.clone()]),g(2)]);break;case"asin":s=!0,r=new c("sqrt",[new f("-","subtract",[g(1),new f("^","pow",[o.clone(),g(2)])])]);break;case"acos":s=!0,u=!0,r=new c("sqrt",[new f("-","subtract",[g(1),new f("^","pow",[o.clone(),g(2)])])]);break;case"atan":s=!0,r=new f("+","add",[new f("^","pow",[o.clone(),g(2)]),g(1)]);break;case"asec":s=!0,r=new f("*","multiply",[new c("abs",[o.clone()]),new c("sqrt",[new f("-","subtract",[new f("^","pow",[o.clone(),g(2)]),g(1)])])]);break;case"acsc":s=!0,u=!0,r=new f("*","multiply",[new c("abs",[o.clone()]),new c("sqrt",[new f("-","subtract",[new f("^","pow",[o.clone(),g(2)]),g(1)])])]);break;case"acot":s=!0,u=!0,r=new f("+","add",[new f("^","pow",[o.clone(),g(2)]),g(1)]);break;case"sinh":r=new c("cosh",[o.clone()]);break;case"cosh":r=new c("sinh",[o.clone()]);break;case"tanh":r=new f("^","pow",[new c("sech",[o.clone()]),g(2)]);break;case"sech":u=!0,r=new f("*","multiply",[e,new c("tanh",[o.clone()])]);break;case"csch":u=!0,r=new f("*","multiply",[e,new c("coth",[o.clone()])]);break;case"coth":u=!0,r=new f("^","pow",[new c("csch",[o.clone()]),g(2)]);break;case"asinh":s=!0,r=new c("sqrt",[new f("+","add",[new f("^","pow",[o.clone(),g(2)]),g(1)])]);break;case"acosh":s=!0,r=new c("sqrt",[new f("-","subtract",[new f("^","pow",[o.clone(),g(2)]),g(1)])]);break;case"atanh":s=!0,r=new f("-","subtract",[g(1),new f("^","pow",[o.clone(),g(2)])]);break;case"asech":s=!0,u=!0,r=new f("*","multiply",[o.clone(),new c("sqrt",[new f("-","subtract",[g(1),new f("^","pow",[o.clone(),g(2)])])])]);break;case"acsch":s=!0,u=!0,r=new f("*","multiply",[new c("abs",[o.clone()]),new c("sqrt",[new f("+","add",[new f("^","pow",[o.clone(),g(2)]),g(1)])])]);break;case"acoth":s=!0,u=!0,r=new f("-","subtract",[g(1),new f("^","pow",[o.clone(),g(2)])]);break;case"abs":r=new f("/","divide",[new c(new p("abs"),[o.clone()]),o.clone()]);break;case"gamma":default:throw new Error('Function "'+e.name+'" is not supported by derivative, or a wrong number of arguments is passed')}s?(i="/",a="divide"):(i="*",a="multiply");var l=y(o,n);return u&&(l=new f("-","unaryMinus",[l])),new f(i,a,[l,r])},"OperatorNode, Object":function(e,n){if(void 0!==n[e])return g(0);if("+"===e.op)return new f(e.op,e.fn,e.args.map((function(e){return y(e,n)})));if("-"===e.op){if(e.isUnary())return new f(e.op,e.fn,[y(e.args[0],n)]);if(e.isBinary())return new f(e.op,e.fn,[y(e.args[0],n),y(e.args[1],n)])}if("*"===e.op){var t=e.args.filter((function(e){return void 0!==n[e]}));if(t.length>0){var r=e.args.filter((function(e){return void 0===n[e]})),i=1===r.length?r[0]:new f("*","multiply",r),s=t.concat(y(i,n));return new f("*","multiply",s)}return new f("+","add",e.args.map((function(t){return new f("*","multiply",e.args.map((function(e){return e===t?y(e,n):e.clone()})))})))}if("/"===e.op&&e.isBinary()){var u=e.args[0],l=e.args[1];return void 0!==n[l]?new f("/","divide",[y(u,n),l]):void 0!==n[u]?new f("*","multiply",[new f("-","unaryMinus",[u]),new f("/","divide",[y(l,n),new f("^","pow",[l.clone(),g(2)])])]):new f("/","divide",[new f("-","subtract",[new f("*","multiply",[y(u,n),l.clone()]),new f("*","multiply",[u.clone(),y(l,n)])]),new f("^","pow",[l.clone(),g(2)])])}if("^"===e.op&&e.isBinary()){var p=e.args[0],d=e.args[1];if(void 0!==n[p])return k(p)&&(o(p.value)||a(p.value,1))?g(0):new f("*","multiply",[e,new f("*","multiply",[new c("log",[p.clone()]),y(d.clone(),n)])]);if(void 0!==n[d]){if(k(d)){if(o(d.value))return g(0);if(a(d.value,1))return y(p,n)}var m=new f("^","pow",[p.clone(),new f("-","subtract",[d,g(1)])]);return new f("*","multiply",[d.clone(),new f("*","multiply",[y(p,n),m])])}return new f("*","multiply",[new f("^","pow",[p.clone(),d.clone()]),new f("+","add",[new f("*","multiply",[y(p,n),new f("/","divide",[d.clone(),p.clone()])]),new f("*","multiply",[y(d,n),new c("log",[p.clone()])])])])}throw new Error('Operator "'+e.op+'" is not supported by derivative, or a wrong number of arguments is passed')}});function g(e,n){return new u(s(e,n||t.number))}return d})),ry=en("apply",["typed","isInteger"],(function(e){var n=e.typed,t=e.isInteger,r=$r({typed:n,isInteger:t});return n("apply",{"...any":function(e){var n=e[1];o(n)?e[1]=n-1:s(n)&&(e[1]=n.minus(1));try{return r.apply(null,e)}catch(e){throw wh(e)}}})}),{isTransformFunction:!0});function iy(e,n,t){var r=e.filter((function(e){return L(e)&&!(e.name in n)&&!(e.name in t)}))[0];if(!r)throw new Error('No undefined variable found in inline expression "'+e+'"');var i=r.name,a=Object.create(t),o=e.compile();return function(e){return a[i]=e,o.evaluate(a)}}var ay=en("filter",["typed"],(function(e){var n=e.typed;function t(e,n,t){var i,a;return e[0]&&(i=e[0].compile().evaluate(t)),e[1]&&(a=L(e[1])||B(e[1])?e[1].compile().evaluate(t):iy(e[1],n,t)),r(i,a)}t.rawArgs=!0;var r=n("filter",{"Array, function":oy,"Matrix, function":function(e,n){return e.create(oy(e.toArray(),n))},"Array, RegExp":Ze,"Matrix, RegExp":function(e,n){return e.create(Ze(e.toArray(),n))}});return t}),{isTransformFunction:!0});function oy(e,n){var t=pn(n);return We(e,(function(e,r,i){return 1===t?n(e):2===t?n(e,[r+1]):n(e,[r+1],i)}))}var sy=en("map",["typed"],(function(e){var n=e.typed;function t(e,n,t){var i,a;return e[0]&&(i=e[0].compile().evaluate(t)),e[1]&&(a=L(e[1])||B(e[1])?e[1].compile().evaluate(t):iy(e[1],n,t)),r(i,a)}t.rawArgs=!0;var r=n("map",{"Array, function":function(e,n){return uy(e,n,e)},"Matrix, function":function(e,n){return e.create(uy(e.valueOf(),n,e))}});return t}),{isTransformFunction:!0});function uy(e,n,t){var r=pn(n);return function e(i,a){return Array.isArray(i)?$e(i,(function(n,t){return e(n,a.concat(t+1))})):1===r?n(i):2===r?n(i,a):n(i,a,t)}(e,[])}var cy=en("forEach",["typed"],(function(e){var n=e.typed;function t(e,n,t){var i,a;return e[0]&&(i=e[0].compile().evaluate(t)),e[1]&&(a=L(e[1])||B(e[1])?e[1].compile().evaluate(t):iy(e[1],n,t)),r(i,a)}t.rawArgs=!0;var r=n("forEach",{"Array | Matrix, function":function(e,n){var t=pn(n);!function r(i,a){Array.isArray(i)?Ve(i,(function(e,n){r(e,a.concat(n+1))})):1===t?n(i):2===t?n(i,a):n(i,a,e)}(e.valueOf(),[])}});return t}),{isTransformFunction:!0}),fy=en("subset",["typed","matrix"],(function(e){var n=e.typed,t=e.matrix,r=qo({typed:n,matrix:t});return n("subset",{"...any":function(e){try{return r.apply(null,e)}catch(e){throw wh(e)}}})}),{isTransformFunction:!0}),ly=en("index",["Index"],(function(e){var n=e.Index;return function(){for(var e=[],t=0,r=arguments.length;t<r;t++){var i=arguments[t];if(g(i))i.start--,i.end-=i.step>0?0:2;else if(i&&!0===i.isSet)i=i.map((function(e){return e-1}));else if(p(i)||d(i))i=i.map((function(e){return e-1}));else if(o(i))i--;else if(s(i))i=i.toNumber()-1;else if("string"!=typeof i)throw new TypeError("Dimension must be an Array, Matrix, number, string, or Range");e[t]=i}var a=new n;return n.apply(a,e),a}}),{isTransformFunction:!0}),py=en("concat",["typed","matrix","isInteger"],(function(e){var n=e.typed,t=e.matrix,r=e.isInteger,i=go({typed:n,matrix:t,isInteger:r});return n("concat",{"...any":function(e){var n=e.length-1,t=e[n];o(t)?e[n]=t-1:s(t)&&(e[n]=t.minus(1));try{return i.apply(null,e)}catch(e){throw wh(e)}}})}),{isTransformFunction:!0}),dy=en("max",["typed","config","numeric","larger"],(function(e){var n=e.typed,t=e.config,r=e.numeric,i=e.larger,a=bu({typed:n,config:t,numeric:r,larger:i});return n("max",{"...any":function(e){if(2===e.length&&m(e[0])){var n=e[1];o(n)?e[1]=n-1:s(n)&&(e[1]=n.minus(1))}try{return a.apply(null,e)}catch(e){throw wh(e)}}})}),{isTransformFunction:!0}),my=en("min",["typed","config","numeric","smaller"],(function(e){var n=e.typed,t=e.config,r=e.numeric,i=e.smaller,a=nu({typed:n,config:t,numeric:r,smaller:i});return n("min",{"...any":function(e){if(2===e.length&&m(e[0])){var n=e[1];o(n)?e[1]=n-1:s(n)&&(e[1]=n.minus(1))}try{return a.apply(null,e)}catch(e){throw wh(e)}}})}),{isTransformFunction:!0}),hy=en("sum",["typed","config","add","numeric"],(function(e){var n=e.typed,t=e.config,r=e.add,i=e.numeric,a=ou({typed:n,config:t,add:r,numeric:i});return n("sum",{"...any":function(e){if(2===e.length&&m(e[0])){var n=e[1];o(n)?e[1]=n-1:s(n)&&(e[1]=n.minus(1))}try{return a.apply(null,e)}catch(e){throw wh(e)}}})}),{isTransformFunction:!0}),yy=en("range",["typed","config","?matrix","?bignumber","smaller","smallerEq","larger","largerEq"],(function(e){var n=e.typed,t=e.config,r=e.matrix,i=e.bignumber,a=e.smaller,o=e.smallerEq,s=e.larger,u=e.largerEq,c=Cu({typed:n,config:t,matrix:r,bignumber:i,smaller:a,smallerEq:o,larger:s,largerEq:u});return n("range",{"...any":function(e){return"boolean"!=typeof e[e.length-1]&&e.push(!0),c.apply(null,e)}})}),{isTransformFunction:!0}),gy=en("column",["typed","Index","matrix","range"],(function(e){var n=e.typed,t=e.Index,r=e.matrix,i=e.range,a=sc({typed:n,Index:t,matrix:r,range:i});return n("column",{"...any":function(e){var n=e.length-1,t=e[n];o(t)&&(e[n]=t-1);try{return a.apply(null,e)}catch(e){throw wh(e)}}})}),{isTransformFunction:!0}),vy=en("row",["typed","Index","matrix","range"],(function(e){var n=e.typed,t=e.Index,r=e.matrix,i=e.range,a=ic({typed:n,Index:t,matrix:r,range:i});return n("row",{"...any":function(e){var n=e.length-1,t=e[n];o(t)&&(e[n]=t-1);try{return a.apply(null,e)}catch(e){throw wh(e)}}})}),{isTransformFunction:!0}),xy=en("std",["typed","sqrt","variance"],(function(e){var n=e.typed,t=e.sqrt,r=e.variance,i=qc({typed:n,sqrt:t,variance:r});return n("std",{"...any":function(e){if(e.length>=2&&m(e[0])){var n=e[1];o(n)?e[1]=n-1:s(n)&&(e[1]=n.minus(1))}try{return i.apply(null,e)}catch(e){throw wh(e)}}})}),{isTransformFunction:!0}),by=en("mean",["typed","add","divide"],(function(e){var n=e.typed,t=e.add,r=e.divide,i=kc({typed:n,add:t,divide:r});return n("mean",{"...any":function(e){if(2===e.length&&m(e[0])){var n=e[1];o(n)?e[1]=n-1:s(n)&&(e[1]=n.minus(1))}try{return i.apply(null,e)}catch(e){throw wh(e)}}})}),{isTransformFunction:!0}),wy=en("variance",["typed","add","subtract","multiply","divide","apply","isNaN"],(function(e){var n=e.typed,t=e.add,r=e.subtract,i=e.multiply,a=e.divide,u=e.apply,c=e.isNaN,f=Dc({typed:n,add:t,subtract:r,multiply:i,divide:a,apply:u,isNaN:c});return n("variance",{"...any":function(e){if(e.length>=2&&m(e[0])){var n=e[1];o(n)?e[1]=n-1:s(n)&&(e[1]=n.minus(1))}try{return f.apply(null,e)}catch(e){throw wh(e)}}})}),{isTransformFunction:!0});function Ny(){return(Ny=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}var Sy={},My={},Dy={},Ey=Zm({mathWithTransform:My}),Ay=Jm({Node:Ey}),_y=Ym({Node:Ey,ResultSet:Lc}),Oy=ah({Node:Ey}),Cy=sh({Node:Ey}),Ty=uh({Node:Ey}),Iy=dh({Node:Ey}),ky=mh({math:Sy}),By=hh({classes:Dy}),qy=yh({Node:Ey}),Ry=gh({Node:Ey}),Py=vh({Node:Ey}),zy=xh({Node:Ey,typed:yf}),Fy=bh({Chain:ky,typed:yf}),jy=Mh({Node:Ey,subset:Wl}),Uy=Ah({Node:Ey,Range:Gc,size:Vl}),Ly=_h({Unit:Md,Node:Ey,math:Sy}),Hy=Ch({matrix:Il,Node:Ey,subset:Wl}),Gy=kh({Node:Ey,SymbolNode:Ly,math:Sy}),$y=Rh({AccessorNode:jy,ArrayNode:Ay,AssignmentNode:Hy,BlockNode:_y,ConditionalNode:qy,ConstantNode:Oy,FunctionAssignmentNode:zy,FunctionNode:Gy,IndexNode:Uy,ObjectNode:Cy,OperatorNode:Ry,ParenthesisNode:Ty,RangeNode:Py,RelationalNode:Iy,SymbolNode:Ly,config:ae,numeric:$p,typed:yf}),Vy=zh({parse:$y,typed:yf}),Wy=jh({parse:$y}),Zy=Lh({parse:$y,typed:yf}),Jy=Vh({Help:Wy,mathWithTransform:My,typed:yf}),Yy=Qh({bignumber:jp,fraction:ll,ConstantNode:Oy,FunctionNode:Gy,OperatorNode:Ry,ParenthesisNode:Ty,SymbolNode:Ly,add:fp,config:ae,divide:Cm,equal:fd,isZero:dp,mathWithTransform:My,multiply:yp,parse:$y,pow:Np,subtract:id,typed:yf}),Xy=Kh({bignumber:jp,fraction:ll,ConstantNode:Oy,FunctionNode:Gy,OperatorNode:Ry,ParenthesisNode:Ty,SymbolNode:Ly,add:fp,config:ae,divide:Cm,equal:fd,isZero:dp,mathWithTransform:My,multiply:yp,parse:$y,pow:Np,simplify:Yy,subtract:id,typed:yf}),Qy=ey({parse:$y}),Ky=ny({Parser:Qy,typed:yf}),eg=ty({ConstantNode:Oy,FunctionNode:Gy,OperatorNode:Ry,ParenthesisNode:Ty,SymbolNode:Ly,config:ae,equal:fd,isZero:dp,numeric:$p,parse:$y,simplify:Yy,typed:yf});Ny(Sy,{reviver:By,false:$c,null:Vc,true:Wc,replacer:Yc,i:Xc,LN10:Qc,LOG10E:Kc,NaN:ef,pi:nf,SQRT1_2:tf,tau:rf,efimovFactor:af,fineStructure:of,sackurTetrode:sf,weakMixingAngle:uf,e:ff,Infinity:lf,LOG2E:pf,PI:nf,version:df,E:ff,phi:hf,typed:yf,isInteger:gf,isNumeric:vf,isPositive:xf,isNaN:bf,equalScalar:wf,number:Nf,boolean:Sf,complex:Mf,splitUnit:Df,unaryPlus:Ef,apply:Af,cube:_f,expm1:Of,log10:Cf,multiplyScalar:Tf,sign:If,square:kf,bitNot:Bf,arg:qf,im:Rf,not:Pf,filter:zf,forEach:Ff,map:jf,erf:Uf,format:Lf,isPrime:Hf,acos:Gf,acot:$f,acsc:Vf,asec:Wf,asin:Zf,atan:Jf,atanh:Yf,cosh:Xf,coth:Qf,csch:Kf,sech:el,sinh:nl,tanh:tl,chain:Fy,combinations:rl,pickRandom:il,randomInt:al,LN2:ol,clone:sl,hasNumericValue:ul,typeOf:cl,string:fl,fraction:ll,unaryMinus:pl,addScalar:dl,exp:ml,log2:hl,sqrt:yl,conj:gl,getMatrixDataType:vl,mode:xl,print:bl,acosh:wl,acsch:Nl,asinh:Sl,cos:Ml,csc:Dl,sin:El,combinationsWithRep:Al,random:_l,SQRT2:Ol,isNegative:Cl,matrix:Il,cbrt:kl,gcd:Bl,mod:ql,nthRoot:Rl,xgcd:Pl,bitAnd:zl,bitXor:Fl,or:jl,concat:Ul,diag:Ll,identity:Hl,ones:Gl,reshape:$l,size:Vl,subset:Wl,zeros:Zl,to:Jl,round:Yl,leftShift:Xl,rightLogShift:Ql,compare:Kl,compareText:ep,smaller:np,larger:tp,unequal:rp,sparse:op,acoth:sp,atan2:up,sec:cp,add:fp,dot:lp,composition:pp,isZero:dp,abs:mp,floor:hp,multiply:yp,dotMultiply:gp,re:vp,flatten:xp,resize:bp,squeeze:wp,pow:Np,dotPow:Sp,rightArithShift:Mp,compareNatural:Dp,equalText:Ep,largerEq:Ap,partitionSelect:_p,asech:Cp,tan:Tp,setDifference:Ip,setIntersect:kp,setMultiplicity:Bp,setSize:qp,norm:Rp,index:Pp,quantileSeq:zp,gamma:Fp,bignumber:jp,lcm:Up,bitOr:Lp,kron:Hp,transpose:Gp,numeric:$p,and:Vp,smallerEq:Wp,sort:Zp,min:Jp,cot:Yp,setDistinct:Xp,setPowerset:Qp,trace:Kp,sum:ed,factorial:nd,permutations:td,ceil:rd,subtract:id,cross:ad,ctranspose:od,divideScalar:sd,nthRoots:ud,lsolve:cd,equal:fd,max:ld,setCartesian:pd,setSymDifference:dd,hypot:md,qr:hd,distance:yd,stirlingS2:gd,catalan:vd,fix:xd,range:bd,prod:wd,dotDivide:Nd,deepEqual:Sd,createUnit:Dd,setUnion:Ed,slu:Ad,intersect:_d,bellNumbers:Od,atomicMass:Cd,bohrMagneton:Td,boltzmann:Id,conductanceQuantum:kd,deuteronMass:Bd,electronMass:qd,faraday:Rd,firstRadiation:Pd,gravitationConstant:zd,hartreeEnergy:Fd,klitzing:jd,magneticConstant:Ud,molarMass:Ld,molarPlanckConstant:Hd,neutronMass:Gd,planckCharge:$d,planckLength:Vd,planckTemperature:Wd,protonMass:Zd,reducedPlanckConstant:Jd,secondRadiation:Yd,stefanBoltzmann:Xd,vacuumImpedance:Qd,xor:Kd,row:em,usolve:nm,unit:tm,avogadro:rm,classicalElectronRadius:im,electricConstant:am,fermiCoupling:om,gravity:sm,loschmidt:um,molarMassC12:cm,nuclearMagneton:fm,planckMass:lm,quantumOfCirculation:pm,speedOfLight:dm,wienDisplacement:mm,column:hm,lup:gm,det:vm,bohrRadius:xm,elementaryCharge:bm,inverseConductanceQuantum:wm,molarVolume:Nm,planckTime:Sm,thomsonCrossSection:Mm,log:Dm,setIsSubset:Em,lusolve:Am,inv:_m,expm:Om,divide:Cm,median:Tm,variance:Im,kldivergence:km,coulomb:Bm,magneticFluxQuantum:qm,rydberg:Rm,log1p:Pm,eigs:zm,mean:Fm,std:jm,gasConstant:Um,parse:$y,evaluate:Vy,sqrtm:Lm,multinomial:Hm,planckConstant:Gm,compile:Zy,help:Jy,simplify:Yy,rationalize:Xy,mad:$m,parser:Ky,derivative:eg,config:ae}),Ny(My,Sy,{apply:ry({isInteger:gf,typed:yf}),filter:ay({typed:yf}),map:sy({typed:yf}),forEach:cy({typed:yf}),subset:fy({matrix:Il,typed:yf}),index:ly({Index:Op}),concat:py({isInteger:gf,matrix:Il,typed:yf}),max:dy({config:ae,larger:tp,numeric:$p,typed:yf}),min:my({config:ae,numeric:$p,smaller:np,typed:yf}),sum:hy({add:fp,config:ae,numeric:$p,typed:yf}),range:yy({bignumber:jp,matrix:Il,config:ae,larger:tp,largerEq:Ap,smaller:np,smallerEq:Wp,typed:yf}),column:gy({Index:Op,matrix:Il,range:bd,typed:yf}),row:vy({Index:Op,matrix:Il,range:bd,typed:yf}),std:xy({sqrt:yl,typed:yf,variance:Im}),mean:by({add:fp,divide:Cm,typed:yf}),variance:wy({add:fp,apply:Af,divide:Cm,isNaN:bf,multiply:yp,subtract:id,typed:yf})}),Ny(Dy,{ResultSet:Lc,Complex:Hc,Range:Gc,Node:Ey,ArrayNode:Ay,BlockNode:_y,ConstantNode:Oy,ObjectNode:Cy,ParenthesisNode:Ty,RelationalNode:Iy,Chain:ky,BigNumber:Zc,Matrix:Jc,ConditionalNode:qy,OperatorNode:Ry,Fraction:cf,RangeNode:Py,DenseMatrix:mf,FunctionAssignmentNode:zy,SparseMatrix:Tl,ImmutableDenseMatrix:ip,FibonacciHeap:ap,AccessorNode:jy,IndexNode:Uy,Index:Op,Unit:Md,SymbolNode:Ly,AssignmentNode:Hy,Spa:ym,FunctionNode:Gy,Help:Wy,Parser:Qy}),ky.createProxy(Sy);var ng={createBigNumberClass:Hn},tg={createComplexClass:un},rg={createMatrixClass:Gn},ig={MatrixDependencies:rg,createDenseMatrixClass:Wt},ag={createFractionClass:Vt},og={BigNumberDependencies:ng,ComplexDependencies:tg,DenseMatrixDependencies:ig,FractionDependencies:ag,createTyped:Xt},sg={createResultSet:rn},ug={createRangeClass:cn},cg={typedDependencies:og,createClone:Sa},fg={typedDependencies:og,createIsInteger:sr},lg={typedDependencies:og,createIsNegative:Wa},pg={typedDependencies:og,createIsNumeric:ur},dg={isNumericDependencies:pg,typedDependencies:og,createHasNumericValue:Ma},mg={typedDependencies:og,createIsPositive:dr},hg={typedDependencies:og,createIsZero:ps},yg={typedDependencies:og,createIsNaN:mr},gg={typedDependencies:og,createTypeOf:Da},vg={typedDependencies:og,createEqualScalar:yr},xg={MatrixDependencies:rg,equalScalarDependencies:vg,typedDependencies:og,createSparseMatrixClass:Za},bg={typedDependencies:og,createNumber:gr},wg={typedDependencies:og,createString:Ea},Ng={typedDependencies:og,createBoolean:vr},Sg={BigNumberDependencies:ng,typedDependencies:og,createBignumber:$s},Mg={ComplexDependencies:tg,typedDependencies:og,createComplex:xr},Dg={FractionDependencies:ag,typedDependencies:og,createFraction:Aa},Eg={DenseMatrixDependencies:ig,MatrixDependencies:rg,SparseMatrixDependencies:xg,typedDependencies:og,createMatrix:Ja},Ag={typedDependencies:og,createSplitUnit:br},_g={typedDependencies:og,createUnaryMinus:_a},Og={BigNumberDependencies:ng,typedDependencies:og,createUnaryPlus:Gr},Cg={typedDependencies:og,createAbs:ds},Tg={isIntegerDependencies:fg,typedDependencies:og,createApply:$r},Ig={typedDependencies:og,createAddScalar:Oa},kg={BigNumberDependencies:ng,ComplexDependencies:tg,FractionDependencies:ag,isNegativeDependencies:lg,matrixDependencies:Eg,typedDependencies:og,unaryMinusDependencies:_g,createCbrt:Ya},Bg={BigNumberDependencies:ng,matrixDependencies:Eg,typedDependencies:og,createZeros:jo},qg={BigNumberDependencies:ng,DenseMatrixDependencies:ig,equalScalarDependencies:vg,matrixDependencies:Eg,typedDependencies:og,zerosDependencies:Bg,createRound:Vo},Rg={roundDependencies:qg,typedDependencies:og,createCeil:fu},Pg={typedDependencies:og,createCube:Wr},zg={typedDependencies:og,createExp:Ca},Fg={ComplexDependencies:tg,typedDependencies:og,createExpm1:Zr},jg={roundDependencies:qg,typedDependencies:og,createFloor:ms},Ug={ComplexDependencies:tg,ceilDependencies:Rg,floorDependencies:jg,typedDependencies:og,createFix:Ou},Lg={BigNumberDependencies:ng,DenseMatrixDependencies:ig,equalScalarDependencies:vg,matrixDependencies:Eg,typedDependencies:og,createGcd:to},Hg={equalScalarDependencies:vg,matrixDependencies:Eg,typedDependencies:og,createLcm:Vs},Gg={ComplexDependencies:tg,typedDependencies:og,createLog10:Jr},$g={ComplexDependencies:tg,typedDependencies:og,createLog2:Ta},Vg={DenseMatrixDependencies:ig,equalScalarDependencies:vg,matrixDependencies:Eg,typedDependencies:og,createMod:uo},Wg={typedDependencies:og,createMultiplyScalar:Yr},Zg={typedDependencies:og,createConj:ka},Jg={matrixDependencies:Eg,typedDependencies:og,createSize:Eo},Yg={addScalarDependencies:Ig,conjDependencies:Zg,multiplyScalarDependencies:Wg,sizeDependencies:Jg,typedDependencies:og,createDot:fs},Xg={addScalarDependencies:Ig,dotDependencies:Yg,equalScalarDependencies:vg,matrixDependencies:Eg,multiplyScalarDependencies:Wg,typedDependencies:og,createMultiply:hs},Qg={BigNumberDependencies:ng,equalScalarDependencies:vg,matrixDependencies:Eg,typedDependencies:og,createNthRoot:fo},Kg={BigNumberDependencies:ng,FractionDependencies:ag,complexDependencies:Mg,typedDependencies:og,createSign:Xr},ev={ComplexDependencies:tg,typedDependencies:og,createSqrt:Ia},nv={typedDependencies:og,createSquare:Qr},tv={DenseMatrixDependencies:ig,addScalarDependencies:Ig,equalScalarDependencies:vg,matrixDependencies:Eg,typedDependencies:og,unaryMinusDependencies:_g,createSubtract:lu},rv={BigNumberDependencies:ng,matrixDependencies:Eg,typedDependencies:og,createXgcd:lo},iv={equalScalarDependencies:vg,matrixDependencies:Eg,multiplyScalarDependencies:Wg,typedDependencies:og,createDotMultiply:ys},av={equalScalarDependencies:vg,matrixDependencies:Eg,typedDependencies:og,createBitAnd:po},ov={typedDependencies:og,createBitNot:hi},sv={DenseMatrixDependencies:ig,equalScalarDependencies:vg,matrixDependencies:Eg,typedDependencies:og,createBitOr:Ws},uv={DenseMatrixDependencies:ig,matrixDependencies:Eg,typedDependencies:og,createBitXor:ho},cv={typedDependencies:og,createArg:yi},fv={typedDependencies:og,createIm:gi},lv={typedDependencies:og,createRe:gs},pv={typedDependencies:og,createNot:Ni},dv={DenseMatrixDependencies:ig,equalScalarDependencies:vg,matrixDependencies:Eg,typedDependencies:og,createOr:yo},mv={DenseMatrixDependencies:ig,matrixDependencies:Eg,typedDependencies:og,createXor:rc},hv={isIntegerDependencies:fg,matrixDependencies:Eg,typedDependencies:og,createConcat:go},yv={DenseMatrixDependencies:ig,matrixDependencies:Eg,typedDependencies:og,createSmaller:Ko},gv={DenseMatrixDependencies:ig,smallerDependencies:yv,createImmutableDenseMatrixClass:ts},vv={ImmutableDenseMatrixDependencies:gv,createIndexClass:Ts},xv={DenseMatrixDependencies:ig,matrixDependencies:Eg,typedDependencies:og,createLarger:es},bv={DenseMatrixDependencies:ig,matrixDependencies:Eg,typedDependencies:og,createLargerEq:Os},wv={DenseMatrixDependencies:ig,matrixDependencies:Eg,typedDependencies:og,createSmallerEq:Qs},Nv={bignumberDependencies:Sg,matrixDependencies:Eg,largerDependencies:xv,largerEqDependencies:bv,smallerDependencies:yv,smallerEqDependencies:wv,typedDependencies:og,createRange:Cu},Sv={IndexDependencies:vv,matrixDependencies:Eg,rangeDependencies:Nv,typedDependencies:og,createColumn:sc},Mv={matrixDependencies:Eg,multiplyDependencies:Xg,subtractDependencies:tv,typedDependencies:og,createCross:du},Dv={DenseMatrixDependencies:ig,SparseMatrixDependencies:xg,matrixDependencies:Eg,typedDependencies:og,createDiag:xo},Ev={typedDependencies:og,createFilter:Si},Av={matrixDependencies:Eg,typedDependencies:og,createFlatten:vs},_v={typedDependencies:og,createForEach:Di},Ov={typedDependencies:og,createGetMatrixDataType:Ba},Cv={BigNumberDependencies:ng,DenseMatrixDependencies:ig,SparseMatrixDependencies:xg,matrixDependencies:Eg,typedDependencies:og,createIdentity:bo},Tv={matrixDependencies:Eg,multiplyScalarDependencies:Wg,typedDependencies:og,createKron:Zs},Iv={typedDependencies:og,createMap:Ai},kv={BigNumberDependencies:ng,matrixDependencies:Eg,typedDependencies:og,createOnes:wo},Bv={isIntegerDependencies:fg,matrixDependencies:Eg,typedDependencies:og,createReshape:No},qv={matrixDependencies:Eg,createResize:bs},Rv={IndexDependencies:vv,matrixDependencies:Eg,rangeDependencies:Nv,typedDependencies:og,createRow:ic},Pv={matrixDependencies:Eg,typedDependencies:og,createSqueeze:ws},zv={matrixDependencies:Eg,typedDependencies:og,createSubset:qo},Fv={matrixDependencies:Eg,typedDependencies:og,createTranspose:Js},jv={conjDependencies:Zg,transposeDependencies:Fv,typedDependencies:og,createCtranspose:mu},Uv={typedDependencies:og,createErf:Oi},Lv={isNaNDependencies:yg,isNumericDependencies:pg,typedDependencies:og,createMode:qa},Hv={bignumberDependencies:Sg,fractionDependencies:Dg,numberDependencies:bg,createNumeric:Ys},Gv={multiplyScalarDependencies:Wg,numericDependencies:Hv,typedDependencies:og,createProd:Tu},$v={typedDependencies:og,createFormat:qi},Vv={typedDependencies:og,createPrint:Ra},Wv={matrixDependencies:Eg,typedDependencies:og,createTo:Uo},Zv={typedDependencies:og,createIsPrime:Ri},Jv={numericDependencies:Hv,typedDependencies:og,createDivideScalar:hu},Yv={ComplexDependencies:tg,fractionDependencies:Dg,identityDependencies:Cv,matrixDependencies:Eg,multiplyDependencies:Xg,numberDependencies:bg,typedDependencies:og,createPow:Ns},Xv={ComplexDependencies:tg,divideScalarDependencies:Jv,typedDependencies:og,createLog:lc},Qv={ComplexDependencies:tg,divideScalarDependencies:Jv,logDependencies:Xv,typedDependencies:og,createLog1p:Oc},Kv={ComplexDependencies:tg,divideScalarDependencies:Jv,typedDependencies:og,createNthRoots:yu},ex={DenseMatrixDependencies:ig,equalScalarDependencies:vg,matrixDependencies:Eg,powDependencies:Yv,typedDependencies:og,createDotPow:Ss},nx={DenseMatrixDependencies:ig,divideScalarDependencies:Jv,equalScalarDependencies:vg,matrixDependencies:Eg,typedDependencies:og,createDotDivide:Iu},tx={DenseMatrixDependencies:ig,divideScalarDependencies:Jv,equalScalarDependencies:vg,matrixDependencies:Eg,multiplyScalarDependencies:Wg,subtractDependencies:tv,typedDependencies:og,createLsolve:vu},rx={DenseMatrixDependencies:ig,divideScalarDependencies:Jv,equalScalarDependencies:vg,matrixDependencies:Eg,multiplyScalarDependencies:Wg,subtractDependencies:tv,typedDependencies:og,createUsolve:ac},ix={DenseMatrixDependencies:ig,equalScalarDependencies:vg,matrixDependencies:Eg,typedDependencies:og,zerosDependencies:Bg,createLeftShift:Jo},ax={DenseMatrixDependencies:ig,equalScalarDependencies:vg,matrixDependencies:Eg,typedDependencies:og,zerosDependencies:Bg,createRightArithShift:Ms},ox={DenseMatrixDependencies:ig,equalScalarDependencies:vg,matrixDependencies:Eg,typedDependencies:og,zerosDependencies:Bg,createRightLogShift:Yo},sx={equalScalarDependencies:vg,matrixDependencies:Eg,notDependencies:pv,typedDependencies:og,zerosDependencies:Bg,createAnd:Xs},ux={BigNumberDependencies:ng,DenseMatrixDependencies:ig,FractionDependencies:ag,equalScalarDependencies:vg,matrixDependencies:Eg,typedDependencies:og,createCompare:Xo},cx={compareDependencies:ux,typedDependencies:og,createCompareNatural:As},fx={matrixDependencies:Eg,typedDependencies:og,createCompareText:Qo},lx={DenseMatrixDependencies:ig,equalScalarDependencies:vg,matrixDependencies:Eg,typedDependencies:og,createEqual:xu},px={compareTextDependencies:fx,isZeroDependencies:hg,typedDependencies:og,createEqualText:_s},dx={equalDependencies:lx,typedDependencies:og,createDeepEqual:ku},mx={DenseMatrixDependencies:ig,equalScalarDependencies:vg,matrixDependencies:Eg,typedDependencies:og,createUnequal:ns},hx={compareDependencies:ux,isNaNDependencies:yg,isNumericDependencies:pg,typedDependencies:og,createPartitionSelect:Cs},yx={compareDependencies:ux,compareNaturalDependencies:cx,matrixDependencies:Eg,typedDependencies:og,createSort:Ks},gx={largerDependencies:xv,numericDependencies:Hv,typedDependencies:og,createMax:bu},vx={numericDependencies:Hv,smallerDependencies:yv,typedDependencies:og,createMin:nu},xx={largerDependencies:xv,smallerDependencies:yv,createFibonacciHeapClass:rs},bx={FibonacciHeapDependencies:xx,addScalarDependencies:Ig,equalScalarDependencies:vg,createSpaClass:uc},wx={BigNumberDependencies:ng,ComplexDependencies:tg,FractionDependencies:ag,absDependencies:Cg,addScalarDependencies:Ig,divideScalarDependencies:Jv,equalDependencies:lx,fixDependencies:Ug,formatDependencies:$v,isNumericDependencies:pg,multiplyScalarDependencies:Wg,numberDependencies:bg,powDependencies:Yv,roundDependencies:qg,subtractDependencies:tv,createUnitClass:Fu},Nx={UnitDependencies:wx,typedDependencies:og,createUnitFunction:oc},Sx={SparseMatrixDependencies:xg,typedDependencies:og,createSparse:is},Mx={UnitDependencies:wx,typedDependencies:og,createCreateUnit:ju},Dx={ComplexDependencies:tg,typedDependencies:og,createAcos:Pi},Ex={ComplexDependencies:tg,typedDependencies:og,createAcosh:za},Ax={BigNumberDependencies:ng,typedDependencies:og,createAcot:ea},_x={BigNumberDependencies:ng,ComplexDependencies:tg,typedDependencies:og,createAcoth:as},Ox={BigNumberDependencies:ng,ComplexDependencies:tg,typedDependencies:og,createAcsc:na},Cx={BigNumberDependencies:ng,typedDependencies:og,createAcsch:Fa},Tx={BigNumberDependencies:ng,ComplexDependencies:tg,typedDependencies:og,createAsec:ta},Ix={BigNumberDependencies:ng,ComplexDependencies:tg,typedDependencies:og,createAsech:Is},kx={ComplexDependencies:tg,typedDependencies:og,createAsin:ra},Bx={typedDependencies:og,createAsinh:ja},qx={typedDependencies:og,createAtan:ia},Rx={BigNumberDependencies:ng,DenseMatrixDependencies:ig,equalScalarDependencies:vg,matrixDependencies:Eg,typedDependencies:og,createAtan2:ss},Px={ComplexDependencies:tg,typedDependencies:og,createAtanh:aa},zx={typedDependencies:og,createCos:Ua},Fx={typedDependencies:og,createCosh:oa},jx={BigNumberDependencies:ng,typedDependencies:og,createCot:tu},Ux={BigNumberDependencies:ng,typedDependencies:og,createCoth:sa},Lx={BigNumberDependencies:ng,typedDependencies:og,createCsc:La},Hx={BigNumberDependencies:ng,typedDependencies:og,createCsch:ua},Gx={BigNumberDependencies:ng,typedDependencies:og,createSec:us},$x={BigNumberDependencies:ng,typedDependencies:og,createSech:ca},Vx={typedDependencies:og,createSin:Ha},Wx={typedDependencies:og,createSinh:fa},Zx={typedDependencies:og,createTan:ks},Jx={typedDependencies:og,createTanh:la},Yx={DenseMatrixDependencies:ig,IndexDependencies:vv,compareNaturalDependencies:cx,sizeDependencies:Jg,subsetDependencies:zv,typedDependencies:og,createSetCartesian:wu},Xx={DenseMatrixDependencies:ig,IndexDependencies:vv,compareNaturalDependencies:cx,sizeDependencies:Jg,subsetDependencies:zv,typedDependencies:og,createSetDifference:Bs},Qx={DenseMatrixDependencies:ig,IndexDependencies:vv,compareNaturalDependencies:cx,sizeDependencies:Jg,subsetDependencies:zv,typedDependencies:og,createSetDistinct:ru},Kx={DenseMatrixDependencies:ig,IndexDependencies:vv,compareNaturalDependencies:cx,sizeDependencies:Jg,subsetDependencies:zv,typedDependencies:og,createSetIntersect:qs},eb={IndexDependencies:vv,compareNaturalDependencies:cx,sizeDependencies:Jg,subsetDependencies:zv,typedDependencies:og,createSetIsSubset:pc},nb={IndexDependencies:vv,compareNaturalDependencies:cx,sizeDependencies:Jg,subsetDependencies:zv,typedDependencies:og,createSetMultiplicity:Rs},tb={IndexDependencies:vv,compareNaturalDependencies:cx,sizeDependencies:Jg,subsetDependencies:zv,typedDependencies:og,createSetPowerset:iu},rb={compareNaturalDependencies:cx,typedDependencies:og,createSetSize:Ps},ib={IndexDependencies:vv,concatDependencies:hv,setDifferenceDependencies:Xx,sizeDependencies:Jg,subsetDependencies:zv,typedDependencies:og,createSetSymDifference:Nu},ab={IndexDependencies:vv,concatDependencies:hv,setIntersectDependencies:Kx,setSymDifferenceDependencies:ib,sizeDependencies:Jg,subsetDependencies:zv,typedDependencies:og,createSetUnion:Uu},ob={DenseMatrixDependencies:ig,SparseMatrixDependencies:xg,addScalarDependencies:Ig,equalScalarDependencies:vg,matrixDependencies:Eg,typedDependencies:og,createAdd:cs},sb={absDependencies:Cg,addScalarDependencies:Ig,divideScalarDependencies:Jv,isPositiveDependencies:mg,multiplyScalarDependencies:Wg,smallerDependencies:yv,sqrtDependencies:ev,typedDependencies:og,createHypot:Su},ub={absDependencies:Cg,addDependencies:ob,conjDependencies:Zg,equalScalarDependencies:vg,largerDependencies:xv,matrixDependencies:Eg,multiplyDependencies:Xg,powDependencies:Yv,smallerDependencies:yv,sqrtDependencies:ev,typedDependencies:og,createNorm:zs},cb={addDependencies:ob,matrixDependencies:Eg,typedDependencies:og,createTrace:au},fb={IndexDependencies:vv,typedDependencies:og,createIndex:Fs},lb={createNode:Zm},pb={NodeDependencies:lb,subsetDependencies:zv,createAccessorNode:Mh},db={NodeDependencies:lb,createArrayNode:Jm},mb={matrixDependencies:Eg,NodeDependencies:lb,subsetDependencies:zv,createAssignmentNode:Ch},hb={NodeDependencies:lb,ResultSetDependencies:sg,createBlockNode:Ym},yb={NodeDependencies:lb,createConditionalNode:yh},gb={NodeDependencies:lb,createConstantNode:ah},vb={NodeDependencies:lb,typedDependencies:og,createFunctionAssignmentNode:xh},xb={NodeDependencies:lb,RangeDependencies:ug,sizeDependencies:Jg,createIndexNode:Ah},bb={NodeDependencies:lb,createObjectNode:sh},wb={NodeDependencies:lb,createOperatorNode:gh},Nb={NodeDependencies:lb,createParenthesisNode:uh},Sb={NodeDependencies:lb,createRangeNode:vh},Mb={NodeDependencies:lb,createRelationalNode:dh},Db={UnitDependencies:wx,NodeDependencies:lb,createSymbolNode:_h},Eb={NodeDependencies:lb,SymbolNodeDependencies:Db,createFunctionNode:kh},Ab={AccessorNodeDependencies:pb,ArrayNodeDependencies:db,AssignmentNodeDependencies:mb,BlockNodeDependencies:hb,ConditionalNodeDependencies:yb,ConstantNodeDependencies:gb,FunctionAssignmentNodeDependencies:vb,FunctionNodeDependencies:Eb,IndexNodeDependencies:xb,ObjectNodeDependencies:bb,OperatorNodeDependencies:wb,ParenthesisNodeDependencies:Nb,RangeNodeDependencies:Sb,RelationalNodeDependencies:Mb,SymbolNodeDependencies:Db,numericDependencies:Hv,typedDependencies:og,createParse:Rh},_b={parseDependencies:Ab,typedDependencies:og,createCompile:Lh},Ob={parseDependencies:Ab,typedDependencies:og,createEvaluate:zh},Cb={parseDependencies:Ab,createParserClass:ey},Tb={ParserDependencies:Cb,typedDependencies:og,createParser:ny},Ib={DenseMatrixDependencies:ig,SpaDependencies:bx,SparseMatrixDependencies:xg,absDependencies:Cg,addScalarDependencies:Ig,divideScalarDependencies:Jv,equalScalarDependencies:vg,largerDependencies:xv,matrixDependencies:Eg,multiplyScalarDependencies:Wg,subtractDependencies:tv,typedDependencies:og,unaryMinusDependencies:_g,createLup:cc},kb={addScalarDependencies:Ig,complexDependencies:Mg,conjDependencies:Zg,divideScalarDependencies:Jv,equalDependencies:lx,identityDependencies:Cv,isZeroDependencies:hg,matrixDependencies:Eg,multiplyScalarDependencies:Wg,signDependencies:Kg,sqrtDependencies:ev,subtractDependencies:tv,typedDependencies:og,unaryMinusDependencies:_g,zerosDependencies:Bg,createQr:Du},Bb={SparseMatrixDependencies:xg,absDependencies:Cg,addDependencies:ob,divideScalarDependencies:Jv,largerDependencies:xv,largerEqDependencies:bv,multiplyDependencies:Xg,subtractDependencies:tv,transposeDependencies:Fv,typedDependencies:og,createSlu:ec},qb={DenseMatrixDependencies:ig,lsolveDependencies:tx,lupDependencies:Ib,matrixDependencies:Eg,sluDependencies:Bb,typedDependencies:og,usolveDependencies:rx,createLusolve:hc},Rb={parseDependencies:Ab,createHelpClass:jh},Pb={createChainClass:mh},zb={HelpDependencies:Rb,typedDependencies:og,createHelp:Vh},Fb={ChainDependencies:Pb,typedDependencies:og,createChain:bh},jb={lupDependencies:Ib,matrixDependencies:Eg,multiplyDependencies:Xg,subtractDependencies:tv,typedDependencies:og,unaryMinusDependencies:_g,createDet:fc},Ub={absDependencies:Cg,addScalarDependencies:Ig,detDependencies:jb,divideScalarDependencies:Jv,identityDependencies:Cv,matrixDependencies:Eg,multiplyDependencies:Xg,typedDependencies:og,unaryMinusDependencies:_g,createInv:gc},Lb={absDependencies:Cg,addDependencies:ob,addScalarDependencies:Ig,atanDependencies:qx,bignumberDependencies:Sg,cosDependencies:zx,equalDependencies:lx,invDependencies:Ub,matrixDependencies:Eg,multiplyDependencies:Xg,multiplyScalarDependencies:Wg,sinDependencies:Vx,subtractDependencies:tv,typedDependencies:og,createEigs:Tc},Hb={absDependencies:Cg,addDependencies:ob,identityDependencies:Cv,invDependencies:Ub,multiplyDependencies:Xg,typedDependencies:og,createExpm:xc},Gb={absDependencies:Cg,addDependencies:ob,identityDependencies:Cv,invDependencies:Ub,maxDependencies:gx,multiplyDependencies:Xg,sizeDependencies:Jg,sqrtDependencies:ev,subtractDependencies:tv,typedDependencies:og,createSqrtm:Pc},$b={divideScalarDependencies:Jv,equalScalarDependencies:vg,invDependencies:Ub,matrixDependencies:Eg,multiplyDependencies:Xg,typedDependencies:og,createDivide:wc},Vb={absDependencies:Cg,addScalarDependencies:Ig,divideScalarDependencies:Jv,multiplyScalarDependencies:Wg,sqrtDependencies:ev,subtractDependencies:tv,typedDependencies:og,unaryMinusDependencies:_g,createDistance:Eu},Wb={absDependencies:Cg,addDependencies:ob,addScalarDependencies:Ig,divideScalarDependencies:Jv,equalScalarDependencies:vg,matrixDependencies:Eg,multiplyDependencies:Xg,multiplyScalarDependencies:Wg,smallerDependencies:yv,subtractDependencies:tv,typedDependencies:og,createIntersect:nc},Zb={addDependencies:ob,numericDependencies:Hv,typedDependencies:og,createSum:ou},Jb={addDependencies:ob,divideDependencies:$b,typedDependencies:og,createMean:kc},Yb={addDependencies:ob,compareDependencies:ux,divideDependencies:$b,partitionSelectDependencies:hx,typedDependencies:og,createMedian:Sc},Xb={absDependencies:Cg,mapDependencies:Iv,medianDependencies:Yb,subtractDependencies:tv,typedDependencies:og,createMad:Uc},Qb={addDependencies:ob,applyDependencies:Tg,divideDependencies:$b,isNaNDependencies:yg,multiplyDependencies:Xg,subtractDependencies:tv,typedDependencies:og,createVariance:Dc},Kb={addDependencies:ob,compareDependencies:ux,multiplyDependencies:Xg,partitionSelectDependencies:hx,typedDependencies:og,createQuantileSeq:js},ew={sqrtDependencies:ev,typedDependencies:og,varianceDependencies:Qb,createStd:qc},nw={typedDependencies:og,createCombinations:ma},tw={typedDependencies:og,createCombinationsWithRep:Ga},rw={BigNumberDependencies:ng,ComplexDependencies:tg,multiplyScalarDependencies:Wg,powDependencies:Yv,typedDependencies:og,createGamma:Gs},iw={gammaDependencies:rw,typedDependencies:og,createFactorial:su},aw={divideDependencies:$b,dotDivideDependencies:nx,isNumericDependencies:pg,logDependencies:Xv,matrixDependencies:Eg,multiplyDependencies:Xg,sumDependencies:Zb,typedDependencies:og,createKldivergence:Ac},ow={addDependencies:ob,divideDependencies:$b,factorialDependencies:iw,isIntegerDependencies:fg,isPositiveDependencies:mg,multiplyDependencies:Xg,typedDependencies:og,createMultinomial:Fc},sw={factorialDependencies:iw,typedDependencies:og,createPermutations:uu},uw={typedDependencies:og,createPickRandom:ba},cw={typedDependencies:og,createRandom:Va},fw={typedDependencies:og,createRandomInt:Na},lw={addScalarDependencies:Ig,combinationsDependencies:nw,divideScalarDependencies:Jv,factorialDependencies:iw,isIntegerDependencies:fg,isNegativeDependencies:lg,largerDependencies:xv,multiplyScalarDependencies:Wg,powDependencies:Yv,subtractDependencies:tv,typedDependencies:og,createStirlingS2:Au},pw={addScalarDependencies:Ig,isIntegerDependencies:fg,isNegativeDependencies:lg,stirlingS2Dependencies:lw,typedDependencies:og,createBellNumbers:tc},dw={addScalarDependencies:Ig,combinationsDependencies:nw,divideScalarDependencies:Jv,isIntegerDependencies:fg,isNegativeDependencies:lg,multiplyScalarDependencies:Wg,typedDependencies:og,createCatalan:_u},mw={addScalarDependencies:Ig,combinationsDependencies:nw,isIntegerDependencies:fg,isNegativeDependencies:lg,isPositiveDependencies:mg,largerDependencies:xv,typedDependencies:og,createComposition:ls},hw={bignumberDependencies:Sg,fractionDependencies:Dg,ConstantNodeDependencies:gb,FunctionNodeDependencies:Eb,OperatorNodeDependencies:wb,ParenthesisNodeDependencies:Nb,SymbolNodeDependencies:Db,addDependencies:ob,divideDependencies:$b,equalDependencies:lx,isZeroDependencies:hg,multiplyDependencies:Xg,parseDependencies:Ab,powDependencies:Yv,subtractDependencies:tv,typedDependencies:og,createSimplify:Qh},yw={ConstantNodeDependencies:gb,FunctionNodeDependencies:Eb,OperatorNodeDependencies:wb,ParenthesisNodeDependencies:Nb,SymbolNodeDependencies:Db,equalDependencies:lx,isZeroDependencies:hg,numericDependencies:Hv,parseDependencies:Ab,simplifyDependencies:hw,typedDependencies:og,createDerivative:ty},gw={bignumberDependencies:Sg,fractionDependencies:Dg,ConstantNodeDependencies:gb,FunctionNodeDependencies:Eb,OperatorNodeDependencies:wb,ParenthesisNodeDependencies:Nb,SymbolNodeDependencies:Db,addDependencies:ob,divideDependencies:$b,equalDependencies:lx,isZeroDependencies:hg,multiplyDependencies:Xg,parseDependencies:Ab,powDependencies:Yv,simplifyDependencies:hw,subtractDependencies:tv,typedDependencies:og,createRationalize:Kh},vw={createReviver:hh},xw={createReplacer:$n},bw={BigNumberDependencies:ng,createE:_n},ww={eDependencies:bw,createUppercaseE:zn},Nw={createFalse:Nn},Sw={ComplexDependencies:tg,createI:Rn},Mw={BigNumberDependencies:ng,createInfinity:Mn},Dw={BigNumberDependencies:ng,createLN10:Tn},Ew={BigNumberDependencies:ng,createLN2:Cn},Aw={BigNumberDependencies:ng,createLOG10E:kn},_w={BigNumberDependencies:ng,createLOG2E:In},Ow={BigNumberDependencies:ng,createNaN:Dn},Cw={createNull:Sn},Tw={BigNumberDependencies:ng,createPhi:On},Iw={BigNumberDependencies:ng,createPi:En},kw={piDependencies:Iw,createUppercasePi:Pn},Bw={BigNumberDependencies:ng,createSQRT1_2:Bn},qw={BigNumberDependencies:ng,createSQRT2:qn},Rw={BigNumberDependencies:ng,createTau:An},Pw={createTrue:wn},zw={createVersion:Fn},Fw={BigNumberDependencies:ng,UnitDependencies:wx,createAtomicMass:wt},jw={BigNumberDependencies:ng,UnitDependencies:wx,createAvogadro:Nt},Uw={BigNumberDependencies:ng,UnitDependencies:wx,createBohrMagneton:nt},Lw={BigNumberDependencies:ng,UnitDependencies:wx,createBohrRadius:st},Hw={BigNumberDependencies:ng,UnitDependencies:wx,createBoltzmann:St},Gw={BigNumberDependencies:ng,UnitDependencies:wx,createClassicalElectronRadius:ut},$w={BigNumberDependencies:ng,UnitDependencies:wx,createConductanceQuantum:tt},Vw={BigNumberDependencies:ng,UnitDependencies:wx,createCoulomb:Kn},Ww={BigNumberDependencies:ng,UnitDependencies:wx,createDeuteronMass:mt},Zw={BigNumberDependencies:ng,createEfimovFactor:bt},Jw={BigNumberDependencies:ng,UnitDependencies:wx,createElectricConstant:Xn},Yw={BigNumberDependencies:ng,UnitDependencies:wx,createElectronMass:ct},Xw={BigNumberDependencies:ng,UnitDependencies:wx,createElementaryCharge:et},Qw={BigNumberDependencies:ng,UnitDependencies:wx,createFaraday:Mt},Kw={BigNumberDependencies:ng,UnitDependencies:wx,createFermiCoupling:ft},eN={BigNumberDependencies:ng,createFineStructure:lt},nN={BigNumberDependencies:ng,UnitDependencies:wx,createFirstRadiation:Dt},tN={BigNumberDependencies:ng,UnitDependencies:wx,createGasConstant:At},rN={BigNumberDependencies:ng,UnitDependencies:wx,createGravitationConstant:Wn},iN={BigNumberDependencies:ng,UnitDependencies:wx,createGravity:Rt},aN={BigNumberDependencies:ng,UnitDependencies:wx,createHartreeEnergy:pt},oN={BigNumberDependencies:ng,UnitDependencies:wx,createInverseConductanceQuantum:rt},sN={BigNumberDependencies:ng,UnitDependencies:wx,createKlitzing:ot},uN={BigNumberDependencies:ng,UnitDependencies:wx,createLoschmidt:Et},cN={BigNumberDependencies:ng,UnitDependencies:wx,createMagneticConstant:Yn},fN={BigNumberDependencies:ng,UnitDependencies:wx,createMagneticFluxQuantum:it},lN={BigNumberDependencies:ng,UnitDependencies:wx,createMolarMass:Bt},pN={BigNumberDependencies:ng,UnitDependencies:wx,createMolarMassC12:qt},dN={BigNumberDependencies:ng,UnitDependencies:wx,createMolarPlanckConstant:_t},mN={BigNumberDependencies:ng,UnitDependencies:wx,createMolarVolume:Ot},hN={BigNumberDependencies:ng,UnitDependencies:wx,createNeutronMass:ht},yN={BigNumberDependencies:ng,UnitDependencies:wx,createNuclearMagneton:at},gN={BigNumberDependencies:ng,UnitDependencies:wx,createPlanckCharge:jt},vN={BigNumberDependencies:ng,UnitDependencies:wx,createPlanckConstant:Zn},xN={BigNumberDependencies:ng,UnitDependencies:wx,createPlanckLength:Pt},bN={BigNumberDependencies:ng,UnitDependencies:wx,createPlanckMass:zt},wN={BigNumberDependencies:ng,UnitDependencies:wx,createPlanckTemperature:Ut},NN={BigNumberDependencies:ng,UnitDependencies:wx,createPlanckTime:Ft},SN={BigNumberDependencies:ng,UnitDependencies:wx,createProtonMass:dt},MN={BigNumberDependencies:ng,UnitDependencies:wx,createQuantumOfCirculation:yt},DN={BigNumberDependencies:ng,UnitDependencies:wx,createReducedPlanckConstant:Jn},EN={BigNumberDependencies:ng,UnitDependencies:wx,createRydberg:gt},AN={BigNumberDependencies:ng,createSackurTetrode:Ct},_N={BigNumberDependencies:ng,UnitDependencies:wx,createSecondRadiation:Tt},ON={BigNumberDependencies:ng,UnitDependencies:wx,createSpeedOfLight:Vn},CN={BigNumberDependencies:ng,UnitDependencies:wx,createStefanBoltzmann:It},TN={BigNumberDependencies:ng,UnitDependencies:wx,createThomsonCrossSection:vt},IN={BigNumberDependencies:ng,UnitDependencies:wx,createVacuumImpedance:Qn},kN={BigNumberDependencies:ng,createWeakMixingAngle:xt},BN={BigNumberDependencies:ng,UnitDependencies:wx,createWienDisplacement:kt},qN={isIntegerDependencies:fg,typedDependencies:og,createApplyTransform:ry},RN={IndexDependencies:vv,matrixDependencies:Eg,rangeDependencies:Nv,typedDependencies:og,createColumnTransform:gy},PN={typedDependencies:og,createFilterTransform:ay},zN={typedDependencies:og,createForEachTransform:cy},FN={IndexDependencies:vv,createIndexTransform:ly},jN={typedDependencies:og,createMapTransform:sy},UN={largerDependencies:xv,numericDependencies:Hv,typedDependencies:og,createMaxTransform:dy},LN={addDependencies:ob,divideDependencies:$b,typedDependencies:og,createMeanTransform:by},HN={numericDependencies:Hv,smallerDependencies:yv,typedDependencies:og,createMinTransform:my},GN={bignumberDependencies:Sg,matrixDependencies:Eg,largerDependencies:xv,largerEqDependencies:bv,smallerDependencies:yv,smallerEqDependencies:wv,typedDependencies:og,createRangeTransform:yy},$N={IndexDependencies:vv,matrixDependencies:Eg,rangeDependencies:Nv,typedDependencies:og,createRowTransform:vy},VN={matrixDependencies:Eg,typedDependencies:og,createSubsetTransform:fy},WN={isIntegerDependencies:fg,matrixDependencies:Eg,typedDependencies:og,createConcatTransform:py},ZN={sqrtDependencies:ev,typedDependencies:og,varianceDependencies:Qb,createStdTransform:xy},JN={addDependencies:ob,numericDependencies:Hv,typedDependencies:og,createSumTransform:hy},YN={addDependencies:ob,applyDependencies:Tg,divideDependencies:$b,isNaNDependencies:yg,multiplyDependencies:Xg,subtractDependencies:tv,typedDependencies:og,createVarianceTransform:wy},XN=r,QN=t(152),KN=t.n(QN);function eS(e){return(eS="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function nS(e,n,t,r){function i(n,i,o){var s;if(o.wrap&&"function"==typeof i&&(i=function(e){var n=function(){for(var n=[],r=0,i=arguments.length;r<i;r++){var a=arguments[r];n[r]=a&&a.valueOf()}return e.apply(t,n)};e.transform&&(n.transform=e.transform);return n}(i)),"function"==typeof(s=i)&&"string"==typeof s.signature&&(i=e(n,function(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}({},i.signature,i))),m(t[n])&&m(i))return i=o.override?e(n,i.signatures):e(t[n],i),t[n]=i,delete r[n],a(n,i),void t.emit("import",n,(function(){return i}));if(void 0===t[n]||o.override)return t[n]=i,delete r[n],a(n,i),void t.emit("import",n,(function(){return i}));if(!o.silent)throw new Error('Cannot import "'+n+'": already exists')}function a(e,n){n&&"function"==typeof n.transform?(t.expression.transform[e]=n.transform,h(e)&&(t.expression.mathWithTransform[e]=n.transform)):(delete t.expression.transform[e],h(e)&&(t.expression.mathWithTransform[e]=n))}function o(e){delete t.expression.transform[e],h(e)?t.expression.mathWithTransform[e]=t[e]:delete t.expression.mathWithTransform[e]}function l(n,i){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:n.fn;if(Ke(a,"."))throw new Error("Factory name should not contain a nested path. Name: "+JSON.stringify(a));var s=g(n)?t.expression.transform:t,u=a in t.expression.transform,c=Q(s,a)?s[a]:void 0,f=function(){var r={};n.dependencies.map(tn).forEach((function(e){if(Ke(e,"."))throw new Error("Factory dependency should not contain a nested path. Name: "+JSON.stringify(e));"math"===e?r.math=t:"mathWithTransform"===e?r.mathWithTransform=t.expression.mathWithTransform:"classes"===e?r.classes=t:r[e]=t[e]}));var o=n(r);if(o&&"function"==typeof o.transform)throw new Error('Transforms cannot be attached to factory functions. Please create a separate function for it with exports.path="expression.transform"');if(void 0===c||i.override)return o;if(m(c)&&m(o))return e(c,o);if(i.silent)return c;throw new Error('Cannot import "'+a+'": already exists')};n.meta&&!1===n.meta.lazy?(s[a]=f(),c&&u?o(a):(g(n)||y(n))&&X(t.expression.mathWithTransform,a,(function(){return s[a]}))):(X(s,a,f),c&&u?o(a):(g(n)||y(n))&&X(t.expression.mathWithTransform,a,(function(){return s[a]}))),r[a]=n,t.emit("import",a,f)}function p(e){return"function"==typeof e||"number"==typeof e||"string"==typeof e||"boolean"==typeof e||null===e||f(e)||u(e)||s(e)||c(e)||d(e)||Array.isArray(e)}function m(e){return"function"==typeof e&&"object"===eS(e.signatures)}function h(e){return!Q(v,e)}function y(e){return!(-1!==e.fn.indexOf(".")||Q(v,e.fn)||e.meta&&e.meta.isClass)}function g(e){return void 0!==e&&void 0!==e.meta&&!0===e.meta.isTransformFunction||!1}var v={expression:!0,type:!0,docs:!0,error:!0,json:!0,chain:!0};return function(e,n){var t=arguments.length;if(1!==t&&2!==t)throw new xs("import",t,1,2);function r(e,t,i){if(Array.isArray(t))t.forEach((function(n){return r(e,n)}));else if("object"===eS(t))for(var a in t)Q(t,a)&&r(e,t[a],a);else if(nn(t)||void 0!==i){var o=nn(t)?g(t)?t.fn+".transform":t.fn:i;if(Q(e,o)&&e[o]!==t&&!n.silent)throw new Error('Cannot import "'+o+'" twice');e[o]=t}else if(!n.silent)throw new TypeError("Factory, Object, or Array expected")}n||(n={});var a={};for(var o in r(a,e),a)if(Q(a,o)){var s=a[o];if(nn(s))l(s,n);else if(p(s))i(o,s,n);else if(!n.silent)throw new TypeError("Factory, Object, or Array expected")}}}function tS(){return(tS=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function rS(e,n){var t=tS({},i,n);if("function"!=typeof Object.create)throw new Error("ES5 not supported by this JavaScript engine. Please load the es5-shim and es5-sham library for compatibility.");var r,a,G=(r={isNumber:o,isComplex:u,isBigNumber:s,isFraction:c,isUnit:f,isString:l,isArray:p,isMatrix:d,isCollection:m,isDenseMatrix:h,isSparseMatrix:y,isRange:g,isIndex:v,isBoolean:x,isResultSet:b,isHelp:w,isFunction:N,isDate:S,isRegExp:M,isObject:D,isNull:E,isUndefined:A,isAccessorNode:_,isArrayNode:O,isAssignmentNode:C,isBlockNode:T,isConditionalNode:I,isConstantNode:k,isFunctionAssignmentNode:B,isFunctionNode:q,isIndexNode:R,isNode:P,isObjectNode:z,isOperatorNode:F,isParenthesisNode:j,isRangeNode:U,isSymbolNode:L,isChain:H},a=new KN.a,r.on=a.on.bind(a),r.off=a.off.bind(a),r.once=a.once.bind(a),r.emit=a.emit.bind(a),r);G.config=te(t,G.emit),G.expression={transform:{},mathWithTransform:{config:G.config}};var $={};var V=nS((function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];return G.typed.apply(G.typed,n)}),0,G,$);return G.import=V,G.on("config",(function(){K($).forEach((function(e){e&&e.meta&&e.meta.recreateOnConfigChange&&V(e,{override:!0})}))})),G.create=rS.bind(null,e),G.factory=en,G.import(K(Y(e))),G.ArgumentsError=xs,G.DimensionError=qe,G.IndexError=Re,G}}]);