text: !function(e){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}var n={};t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get: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,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/",t(t.s=190)}([function(e,t,n){"use strict";e.exports=function e(t,n,r){return t&&"function"===typeof t.map?t.map(function(t){return e(t,n,r)}):n(t)}},function(e,t,n){"use strict";function r(e,t,n,r){function i(t,n,r){return new(e.Matrix.storage(n||"default"))(t,r)}var o=r("matrix",{"":function(){return i([])},string:function(e){return i([],e)},"string, string":function(e,t){return i([],e,t)},Array:function(e){return i(e)},Matrix:function(e){return i(e,e.storage())},"Array | Matrix, string":i,"Array | Matrix, string, string":i});return o.toTex={0:"\\begin{bmatrix}\\end{bmatrix}",1:"\\left(${args[0]}\\right)",2:"\\left(${args[0]}\\right)"},o}t.name="matrix",t.factory=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e){for(var t=[];Array.isArray(e);)t.push(e.length),e=e[0];return t}function o(e,t,n){var r=void 0,i=e.length;if(i!==t[n])throw new M.default(i,t[n]);if(n<t.length-1){var a=n+1;for(r=0;r<i;r++){var s=e[r];if(!Array.isArray(s))throw new M.default(t.length-1,t.length,"<");o(e[r],t,a)}}else for(r=0;r<i;r++)if(Array.isArray(e[r]))throw new M.default(t.length+1,t.length,">")}function a(e,t){if(0===t.length){if(Array.isArray(e))throw new M.default(e.length,0)}else o(e,t,0)}function s(e,t,n){if(!Array.isArray(e)||!Array.isArray(t))throw new TypeError("Array expected");if(0===t.length)throw new Error("Resizing to scalar is not supported");return t.forEach(function(e){if(!N.default.isNumber(e)||!N.default.isInteger(e)||e<0)throw new TypeError("Invalid size, must contain positive integers (size: "+C.default.format(t)+")")}),u(e,t,0,void 0!==n?n:0),e}function u(e,t,n,r){var i=void 0,o=void 0,a=e.length,s=t[n],c=Math.min(a,s);if(e.length=s,n<t.length-1){var l=n+1;for(i=0;i<c;i++)o=e[i],Array.isArray(o)||(o=[o],e[i]=o),u(o,t,l,r);for(i=c;i<s;i++)o=[],e[i]=o,u(o,t,l,r)}else{for(i=0;i<c;i++)for(;Array.isArray(e[i]);)e[i]=e[i][0];for(i=c;i<s;i++)e[i]=r}}function c(e,n){function r(e){return e.reduce(function(e,t){return e*t})}var i=t.flatten(e),o=void 0;if(!Array.isArray(e)||!Array.isArray(n))throw new TypeError("Array expected");if(0===n.length)throw new M.default(0,r(t.size(e)),"!=");try{o=l(i,n)}catch(i){if(i instanceof M.default)throw new M.default(r(n),r(t.size(e)),"!=");throw i}if(i.length>0)throw new M.default(r(n),r(t.size(e)),"!=");return o}function l(e,t){var n=[],r=void 0;if(0===t.length){if(0===e.length)throw new M.default(null,null,"!=");return e.shift()}for(r=0;r<t[0];r+=1)n.push(l(e,t.slice(1)));return n}function f(e,t,n){var r=void 0,i=void 0;if(n<t){var o=n+1;for(r=0,i=e.length;r<i;r++)e[r]=f(e[r],t,o)}else for(;Array.isArray(e);)e=e[0];return e}function p(e,n,r,i){var o=i||t.size(e);if(r)for(var a=0;a<r;a++)e=[e],o.unshift(1);for(e=h(e,n,0);o.length<n;)o.push(1);return e}function h(e,t,n){var r=void 0,i=void 0;if(Array.isArray(e)){var o=n+1;for(r=0,i=e.length;r<i;r++)e[r]=h(e[r],t,o)}else for(var a=n;a<t;a++)e=[e];return e}function d(e){if(!Array.isArray(e))return e;var t=[];return e.forEach(function e(n){Array.isArray(n)?n.forEach(e):t.push(n)}),t}function m(e,t){return Array.prototype.map.call(e,t)}function g(e,t){Array.prototype.forEach.call(e,t)}function v(e,n){if(1!==t.size(e).length)throw new Error("Only one dimensional matrices supported");return Array.prototype.filter.call(e,n)}function y(e,n){if(1!==t.size(e).length)throw new Error("Only one dimensional matrices supported");return Array.prototype.filter.call(e,function(e){return n.test(e)})}function b(e,t){return Array.prototype.join.call(e,t)}function x(e){if(!Array.isArray(e))throw new TypeError("Array input expected");if(0===e.length)return e;var t=[],n=0;t[0]={value:e[0],identifier:0};for(var r=1;r<e.length;r++)e[r]===e[r-1]?n++:n=0,t.push({value:e[r],identifier:n});return t}Object.defineProperty(t,"__esModule",{value:!0}),t.size=i,t.validate=a,t.resize=s,t.reshape=c,t.unsqueeze=p,t.flatten=d,t.map=m,t.forEach=g,t.filter=v,t.filterRegExp=y,t.join=b,t.identify=x;var w=n(3),N=r(w),E=n(9),C=r(E),S=n(12),M=r(S),T=n(63),O=r(T);t.validateIndex=function(e,t){if(!N.default.isNumber(e)||!N.default.isInteger(e))throw new TypeError("Index must be an integer (value: "+e+")");if(e<0||"number"===typeof t&&e>=t)throw new O.default(e,t)},t.squeeze=function(e,n){for(var r=n||t.size(e);Array.isArray(e)&&1===e.length;)e=e[0],r.shift();for(var i=r.length;1===r[i-1];)i--;return i<r.length&&(e=f(e,i,0),r.length=i),e},t.generalize=function(e){if(!Array.isArray(e))throw new TypeError("Array input expected");if(0===e.length)return e;for(var t=[],n=0;n<e.length;n++)t.push(e[n].value);return t},t.isArray=Array.isArray},function(e,t,n){"use strict";function r(e){for(var t=[],n=0;n<e;n++)t.push(0);return t}var i=n(5);t.isNumber=function(e){return"number"===typeof e},t.isInteger=function(e){return"boolean"===typeof e||!!isFinite(e)&&e===Math.round(e)},t.sign=Math.sign||function(e){return e>0?1:e<0?-1:0},t.format=function(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 r="auto",o=void 0;switch(n&&(n.notation&&(r=n.notation),t.isNumber(n)?o=n:n.precision&&(o=n.precision)),r){case"fixed":return t.toFixed(e,o);case"exponential":return t.toExponential(e,o);case"engineering":return t.toEngineering(e,o);case"auto":if(n&&n.exponential&&(void 0!==n.exponential.lower||void 0!==n.exponential.upper)){var a=i.map(n,function(e){return e});return a.exponential=void 0,void 0!==n.exponential.lower&&(a.lowerExp=Math.round(Math.log(n.exponential.lower)/Math.LN10)),void 0!==n.exponential.upper&&(a.upperExp=Math.round(Math.log(n.exponential.upper)/Math.LN10)),console.warn("Deprecation warning: Formatting options exponential.lower and exponential.upper (minimum and maximum value) are replaced with exponential.lowerExp and exponential.upperExp (minimum and maximum exponent) since version 4.0.0. Replace "+JSON.stringify(n)+" with "+JSON.stringify(a)),t.toPrecision(e,o,a)}return t.toPrecision(e,o,n&&n).replace(/((\.\d*?)(0+))($|e)/,function(){var e=arguments[2],t=arguments[4];return"."!==e?e+t:t});default:throw new Error('Unknown notation "'+r+'". Choose "auto", "exponential", or "fixed".')}},t.splitNumber=function(e){var t=String(e).toLowerCase().match(/^0*?(-?)(\d+\.?\d*)(e([+-]?\d+))?$/);if(!t)throw new SyntaxError("Invalid number "+e);var n=t[1],r=t[2],i=parseFloat(t[4]||"0"),o=r.indexOf(".");i+=-1!==o?o-1:r.length-1;var a=r.replace(".","").replace(/^0*/,function(e){return i-=e.length,""}).replace(/0*$/,"").split("").map(function(e){return parseInt(e)});return 0===a.length&&(a.push(0),i++),{sign:n,coefficients:a,exponent:i}},t.toEngineering=function(e,n){if(isNaN(e)||!isFinite(e))return String(e);var i=t.roundDigits(t.splitNumber(e),n),o=i.exponent,a=i.coefficients,s=o%3===0?o:o<0?o-3-o%3:o-o%3,u=o>=0?o:Math.abs(s);a.length-1<u&&(a=a.concat(r(u-(a.length-1))));for(var c=Math.abs(o-s),l=1;--c>=0;)l++;var f=a.slice(l).join(""),p=f.match(/[1-9]/)?"."+f:"",h=a.slice(0,l).join("")+p+"e"+(o>=0?"+":"")+s.toString();return i.sign+h},t.toFixed=function(e,n){if(isNaN(e)||!isFinite(e))return String(e);var i=t.splitNumber(e),o="number"===typeof n?t.roundDigits(i,i.exponent+1+n):i,a=o.coefficients,s=o.exponent+1,u=s+(n||0);return a.length<u&&(a=a.concat(r(u-a.length))),s<0&&(a=r(1-s).concat(a),s=1),s<a.length&&a.splice(s,0,0===s?"0.":"."),o.sign+a.join("")},t.toExponential=function(e,n){if(isNaN(e)||!isFinite(e))return String(e);var i=t.splitNumber(e),o=n?t.roundDigits(i,n):i,a=o.coefficients,s=o.exponent;a.length<n&&(a=a.concat(r(n-a.length)));var u=a.shift();return o.sign+u+(a.length>0?"."+a.join(""):"")+"e"+(s>=0?"+":"")+s},t.toPrecision=function(e,n,i){if(isNaN(e)||!isFinite(e))return String(e);var o=i&&void 0!==i.lowerExp?i.lowerExp:-3,a=i&&void 0!==i.upperExp?i.upperExp:5,s=t.splitNumber(e);if(s.exponent<o||s.exponent>=a)return t.toExponential(e,n);var u=n?t.roundDigits(s,n):s,c=u.coefficients,l=u.exponent;c.length<n&&(c=c.concat(r(n-c.length))),c=c.concat(r(l-c.length+1+(c.length<n?n-c.length:0))),c=r(-l).concat(c);var f=l>0?l:0;return f<c.length-1&&c.splice(f+1,0,"."),u.sign+c.join("")},t.roundDigits=function(e,t){for(var n={sign:e.sign,coefficients:e.coefficients,exponent:e.exponent},r=n.coefficients;t<=0;)r.unshift(0),n.exponent++,t++;if(r.length>t){if(r.splice(t,r.length-t)[0]>=5){var i=t-1;for(r[i]++;10===r[i];)r.pop(),0===i&&(r.unshift(0),n.exponent++,i++),i--,r[i]++}}return n},t.digits=function(e){return e.toExponential().replace(/e.*$/,"").replace(/^0\.?0*|\./,"").length},t.DBL_EPSILON=Number.EPSILON||2.220446049250313e-16,t.nearlyEqual=function(e,n,r){if(null===r||void 0===r)return e===n;if(e===n)return!0;if(isNaN(e)||isNaN(n))return!1;if(isFinite(e)&&isFinite(n)){var i=Math.abs(e-n);return i<t.DBL_EPSILON||i<=Math.max(Math.abs(e),Math.abs(n))*r}return!1}},function(e,t,n){"use strict";var r=n(278);t.symbols={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{?}"},t.operators={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"},t.defaultTemplate="\\mathrm{${name}}\\left(${args}\\right)";var i={deg:"^\\circ"};t.escape=function(e){return r(e,{preserveFormatting:!0})},t.toSymbol=function(e,n){return n="undefined"!==typeof n&&n,n?i.hasOwnProperty(e)?i[e]:"\\mathrm{"+t.escape(e)+"}":t.symbols.hasOwnProperty(e)?t.symbols[e]:t.escape(e)}},function(e,t,n){"use strict";var r="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},i=n(96);t.clone=function e(n){var o="undefined"===typeof n?"undefined":r(n);if("number"===o||"string"===o||"boolean"===o||null===n||void 0===n)return n;if("function"===typeof n.clone)return n.clone();if(Array.isArray(n))return n.map(function(t){return e(t)});if(n instanceof Date)return new Date(n.valueOf());if(i(n))return n;if(n instanceof RegExp)throw new TypeError("Cannot clone "+n);return t.map(n,e)},t.map=function(e,n){var r={};for(var i in e)t.hasOwnProperty(e,i)&&(r[i]=n(e[i]));return r},t.extend=function(e,n){for(var r in n)t.hasOwnProperty(n,r)&&(e[r]=n[r]);return e},t.deepExtend=function e(n,r){if(Array.isArray(r))throw new TypeError("Arrays are not supported by deepExtend");for(var i in r)if(t.hasOwnProperty(r,i))if(r[i]&&r[i].constructor===Object)void 0===n[i]&&(n[i]={}),n[i].constructor===Object?e(n[i],r[i]):n[i]=r[i];else{if(Array.isArray(r[i]))throw new TypeError("Arrays are not supported by deepExtend");n[i]=r[i]}return n},t.deepEqual=function(e,n){var r=void 0,i=void 0,o=void 0;if(Array.isArray(e)){if(!Array.isArray(n))return!1;if(e.length!==n.length)return!1;for(i=0,o=e.length;i<o;i++)if(!t.deepEqual(e[i],n[i]))return!1;return!0}if(e instanceof Object){if(Array.isArray(n)||!(n instanceof Object))return!1;for(r in e)if(!t.deepEqual(e[r],n[r]))return!1;for(r in n)if(!t.deepEqual(e[r],n[r]))return!1;return!0}return e===n},t.canDefineProperty=function(){try{if(Object.defineProperty)return Object.defineProperty({},"x",{get:function(){}}),!0}catch(e){}return!1},t.lazy=function(e,n,r){if(t.canDefineProperty()){var i=!0,o=void 0;Object.defineProperty(e,n,{get:function(){return i&&(o=r(),i=!1),o},set:function(e){o=e,i=!1},configurable:!0,enumerable:!0})}else e[n]=r()},t.traverse=function(e,t){var n=e;if(t)for(var r=t.split("."),i=0;i<r.length;i++){var o=r[i];o in n||(n[o]={}),n=n[o]}return n},t.hasOwnProperty=function(e,t){return e&&Object.hasOwnProperty.call(e,t)},t.isFactory=function(e){return e&&"function"===typeof e.factory}},function(e,t,n){"use strict";function r(e,t,n,r){function o(e,t,n,r,i,a,s){var u=[];if(t===n.length-1)for(var c=0;c<r;c++)u[c]=s?e(a,i[c]):e(i[c],a);else for(var l=0;l<r;l++)u[l]=o(e,t+1,n,n[t+1],i[l],a,s);return u}var a=e.DenseMatrix;return function(e,t,n,s){var u=e._data,c=e._size,l=e._datatype,f=void 0,p=n;"string"===typeof l&&(f=l,t=r.convert(t,f),p=r.find(n,[f,f]));var h=c.length>0?o(p,0,c,c[0],u,t,s):[];return new a({data:h,size:i(c),datatype:f})}}var i=n(5).clone;t.name="algorithm14",t.factory=r},function(e,t,n){"use strict";e.exports=n(197)},function(e,t,n){"use strict";function r(e,t,n,r){function o(e,t,n,r,i,a){var s=[];if(t===n.length-1)for(var u=0;u<r;u++)s[u]=e(i[u],a[u]);else for(var c=0;c<r;c++)s[c]=o(e,t+1,n,n[t+1],i[c],a[c]);return s}var a=e.DenseMatrix;return function(e,t,n){var s=e._data,u=e._size,c=e._datatype,l=t._data,f=t._size,p=t._datatype,h=[];if(u.length!==f.length)throw new i(u.length,f.length);for(var d=0;d<u.length;d++){if(u[d]!==f[d])throw new RangeError("Dimension mismatch. Matrix A ("+u+") must match Matrix B ("+f+")");h[d]=u[d]}var m=void 0,g=n;"string"===typeof c&&c===p&&(m=c,t=r.convert(t,m),g=r.find(n,[m,m]));var v=h.length>0?o(g,0,h,h[0],s,l):[];return new a({data:v,size:h,datatype:m})}}var i=n(12);t.name="algorithm13",t.factory=r},function(e,t,n){"use strict";function r(e,n){if(Array.isArray(e)){for(var i="[",o=e.length,a=0;a<o;a++)0!==a&&(i+=", "),i+=r(e[a],n);return i+="]"}return t.format(e,n)}function i(e){return e&&"object"===("undefined"===typeof e?"undefined":o(e))&&"number"===typeof e.s&&"number"===typeof e.n&&"number"===typeof e.d||!1}var o="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},a=n(3).format,s=n(273).format,u=n(96);t.isString=function(e){return"string"===typeof e},t.endsWith=function(e,t){var n=e.length-t.length,r=e.length;return e.substring(n,r)===t},t.format=function(e,n){if("number"===typeof e)return a(e,n);if(u(e))return s(e,n);if(i(e))return n&&"decimal"===n.fraction?e.toString():e.s*e.n+"/"+e.d;if(Array.isArray(e))return r(e,n);if(t.isString(e))return'"'+e+'"';if("function"===typeof e)return e.syntax?String(e.syntax):"function";if(e&&"object"===("undefined"===typeof e?"undefined":o(e))){if("function"===typeof e.format)return e.format(n);if(e&&e.toString()!=={}.toString())return e.toString();var c=[];for(var l in e)e.hasOwnProperty(l)&&c.push('"'+l+'": '+t.format(e[l],n));return"{"+c.join(", ")+"}"}return String(e)},t.stringify=function(e){for(var t=String(e),n="",r=0;r<t.length;){var i=t.charAt(r);"\\"===i?(n+=i,r++,i=t.charAt(r),""!==i&&-1!=='"\\/bfnrtu'.indexOf(i)||(n+="\\"),n+=i):n+='"'===i?'\\"':i,r++}return'"'+n+'"'},t.escape=function(e){var t=String(e);return t=t.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}},function(e,t,n){"use strict";function r(e,t,r,a){function s(e,t){switch(e.length){case 1:switch(t.length){case 1:if(e[0]!==t[0])throw new RangeError("Dimension mismatch in multiplication. Vectors must have the same length");break;case 2:if(e[0]!==t[0])throw new RangeError("Dimension mismatch in multiplication. Vector length ("+e[0]+") must match Matrix rows ("+t[0]+")");break;default:throw new Error("Can only multiply a 1 or 2 dimensional matrix (Matrix B has "+t.length+" dimensions)")}break;case 2:switch(t.length){case 1:if(e[1]!==t[0])throw new RangeError("Dimension mismatch in multiplication. Matrix columns ("+e[1]+") must match Vector length ("+t[0]+")");break;case 2:if(e[1]!==t[0])throw new RangeError("Dimension mismatch in multiplication. Matrix A columns ("+e[1]+") must match Matrix B rows ("+t[0]+")");break;default:throw new Error("Can only multiply a 1 or 2 dimensional matrix (Matrix B has "+t.length+" dimensions)")}break;default:throw new Error("Can only multiply a 1 or 2 dimensional matrix (Matrix A has "+e.length+" dimensions)")}}function u(e,t,n){if(0===n)throw new Error("Cannot multiply two empty vectors");var r=e._data,i=e._datatype,o=t._data,s=t._datatype,u=void 0,c=b,l=x;i&&s&&i===s&&"string"===typeof i&&(u=i,c=a.find(b,[u,u]),l=a.find(x,[u,u]));for(var f=l(r[0],o[0]),p=1;p<n;p++)f=c(f,l(r[p],o[p]));return f}function c(e,t){if("dense"!==t.storage())throw new Error("Support for SparseMatrix not implemented");return l(e,t)}function l(e,t){var n=e._data,r=e._size,i=e._datatype,o=t._data,s=t._size,u=t._datatype,c=r[0],l=s[1],f=void 0,p=b,h=x;i&&u&&i===u&&"string"===typeof i&&(f=i,p=a.find(b,[f,f]),h=a.find(x,[f,f]));for(var d=[],m=0;m<l;m++){for(var g=h(n[0],o[0][m]),v=1;v<c;v++)g=p(g,h(n[v],o[v][m]));d[m]=g}return new C({data:d,size:[l],datatype:f})}function f(e,t){var n=e._data,r=e._size,i=e._datatype,o=t._data,s=t._datatype,u=r[0],c=r[1],l=void 0,f=b,p=x;i&&s&&i===s&&"string"===typeof i&&(l=i,f=a.find(b,[l,l]),p=a.find(x,[l,l]));for(var h=[],d=0;d<u;d++){for(var m=n[d],g=p(m[0],o[0]),v=1;v<c;v++)g=f(g,p(m[v],o[v]));h[d]=g}return new C({data:h,size:[u],datatype:l})}function p(e,t){var n=e._data,r=e._size,i=e._datatype,o=t._data,s=t._size,u=t._datatype,c=r[0],l=r[1],f=s[1],p=void 0,h=b,d=x;i&&u&&i===u&&"string"===typeof i&&(p=i,h=a.find(b,[p,p]),d=a.find(x,[p,p]));for(var m=[],g=0;g<c;g++){var v=n[g];m[g]=[];for(var y=0;y<f;y++){for(var w=d(v[0],o[0][y]),N=1;N<l;N++)w=h(w,d(v[N],o[N][y]));m[g][y]=w}}return new C({data:m,size:[c,f],datatype:p})}function h(e,t){var n=e._data,r=e._size,i=e._datatype,o=t._values,s=t._index,u=t._ptr,c=t._size,l=t._datatype;if(!o)throw new Error("Cannot multiply Dense Matrix times Pattern only Matrix");var f=r[0],p=c[1],h=void 0,d=b,m=x,g=w,v=0;i&&l&&i===l&&"string"===typeof i&&(h=i,d=a.find(b,[h,h]),m=a.find(x,[h,h]),g=a.find(w,[h,h]),v=a.convert(0,h));for(var y=[],N=[],E=[],C=new S({values:y,index:N,ptr:E,size:[f,p],datatype:h}),M=0;M<p;M++){E[M]=N.length;var T=u[M],O=u[M+1];if(O>T)for(var k=0,A=0;A<f;A++){for(var _=A+1,P=void 0,R=T;R<O;R++){var I=s[R];k!==_?(P=m(n[A][I],o[R]),k=_):P=d(P,m(n[A][I],o[R]))}k!==_||g(P,v)||(N.push(A),y.push(P))}}return E[p]=N.length,C}function d(e,t){var n=e._values,r=e._index,i=e._ptr,o=e._datatype;if(!n)throw new Error("Cannot multiply Pattern only Matrix times Dense Matrix");var s=t._data,u=t._datatype,c=e._size[0],l=t._size[0],f=[],p=[],h=[],d=void 0,m=b,g=x,v=w,y=0;o&&u&&o===u&&"string"===typeof o&&(d=o,m=a.find(b,[d,d]),g=a.find(x,[d,d]),v=a.find(w,[d,d]),y=a.convert(0,d));var N=[],E=[];h[0]=0;for(var C=0;C<l;C++){var M=s[C];if(!v(M,y))for(var T=i[C],O=i[C+1],k=T;k<O;k++){var A=r[k];E[A]?N[A]=m(N[A],g(M,n[k])):(E[A]=!0,p.push(A),N[A]=g(M,n[k]))}}for(var _=p.length,P=0;P<_;P++){var R=p[P];f[P]=N[R]}return h[1]=p.length,new S({values:f,index:p,ptr:h,size:[c,1],datatype:d})}function m(e,t){var n=e._values,r=e._index,i=e._ptr,o=e._datatype;if(!n)throw new Error("Cannot multiply Pattern only Matrix times Dense Matrix");var s=t._data,u=t._datatype,c=e._size[0],l=t._size[0],f=t._size[1],p=void 0,h=b,d=x,m=w,g=0;o&&u&&o===u&&"string"===typeof o&&(p=o,h=a.find(b,[p,p]),d=a.find(x,[p,p]),m=a.find(w,[p,p]),g=a.convert(0,p));for(var v=[],y=[],N=[],E=new S({values:v,index:y,ptr:N,size:[c,f],datatype:p}),C=[],M=[],T=0;T<f;T++){N[T]=y.length;for(var O=T+1,k=0;k<l;k++){var A=s[k][T];if(!m(A,g))for(var _=i[k],P=i[k+1],R=_;R<P;R++){var I=r[R];M[I]!==O?(M[I]=O,y.push(I),C[I]=d(A,n[R])):C[I]=h(C[I],d(A,n[R]))}}for(var F=N[T],D=y.length,L=F;L<D;L++){var B=y[L];v[L]=C[B]}}return N[f]=y.length,E}function g(e,t){var n=e._values,r=e._index,i=e._ptr,o=e._datatype,s=t._values,u=t._index,c=t._ptr,l=t._datatype,f=e._size[0],p=t._size[1],h=n&&s,d=void 0,m=b,g=x;o&&l&&o===l&&"string"===typeof o&&(d=o,m=a.find(b,[d,d]),g=a.find(x,[d,d]));for(var v=h?[]:void 0,y=[],w=[],N=new S({values:v,index:y,ptr:w,size:[f,p],datatype:d}),E=h?[]:void 0,C=[],M=void 0,T=void 0,O=void 0,k=void 0,A=void 0,_=void 0,P=void 0,R=void 0,I=0;I<p;I++){w[I]=y.length;var F=I+1;for(A=c[I],_=c[I+1],k=A;k<_;k++)if(R=u[k],h)for(T=i[R],O=i[R+1],M=T;M<O;M++)P=r[M],C[P]!==F?(C[P]=F,y.push(P),E[P]=g(s[k],n[M])):E[P]=m(E[P],g(s[k],n[M]));else for(T=i[R],O=i[R+1],M=T;M<O;M++)P=r[M],C[P]!==F&&(C[P]=F,y.push(P));if(h)for(var D=w[I],L=y.length,B=D;B<L;B++){var z=y[B];v[B]=E[z]}}return w[p]=y.length,N}var v=n(4),y=r(n(1)),b=r(n(18)),x=r(n(23)),w=r(n(11)),N=r(n(21)),E=r(n(6)),C=e.DenseMatrix,S=e.SparseMatrix,M=a("multiply",i({"Array, Array":function(t,n){s(o.size(t),o.size(n));var r=M(y(t),y(n));return e.isMatrix(r)?r.valueOf():r},"Matrix, Matrix":function(e,t){var n=e.size(),r=t.size();return s(n,r),1===n.length?1===r.length?u(e,t,n[0]):c(e,t):1===r.length?T(e,t):O(e,t)},"Matrix, Array":function(e,t){return M(e,y(t))},"Array, Matrix":function(e,t){return M(y(e,t.storage()),t)},"SparseMatrix, any":function(e,t){return N(e,t,x,!1)},"DenseMatrix, any":function(e,t){return E(e,t,x,!1)},"any, SparseMatrix":function(e,t){return N(t,e,x,!0)},"any, DenseMatrix":function(e,t){return E(t,e,x,!0)},"Array, any":function(e,t){return E(y(e),t,x,!1).valueOf()},"any, Array":function(e,t){return E(y(t),e,x,!0).valueOf()},"any, any":x,"any, any, ...any":function(e,t,n){for(var r=M(e,t),i=0;i<n.length;i++)r=M(r,n[i]);return r}},x.signatures)),T=a("_multiplyMatrixVector",{"DenseMatrix, any":f,"SparseMatrix, any":d}),O=a("_multiplyMatrixMatrix",{"DenseMatrix, DenseMatrix":p,"DenseMatrix, SparseMatrix":h,"SparseMatrix, DenseMatrix":m,"SparseMatrix, SparseMatrix":g});return M.toTex={2:"\\left(${args[0]}"+v.operators.multiply+"${args[1]}\\right)"},M}var i=n(5).extend,o=n(2);t.name="multiply",t.factory=r},function(e,t,n){"use strict";function r(e,t,n,r){var a=r("equalScalar",{"boolean, boolean":function(e,t){return e===t},"number, number":function(e,n){return e===n||i(e,n,t.epsilon)},"BigNumber, BigNumber":function(e,n){return e.eq(n)||o(e,n,t.epsilon)},"Fraction, Fraction":function(e,t){return e.equals(t)},"Complex, Complex":function(e,t){return e.equals(t)},"Unit, Unit":function(e,t){if(!e.equalBase(t))throw new Error("Cannot compare units with different base");return a(e.value,t.value)}});return a}var i=n(3).nearlyEqual,o=n(42);t.factory=r},function(e,t,n){"use strict";function r(e,t,n){if(!(this instanceof r))throw new SyntaxError("Constructor must be called with the new operator");this.actual=e,this.expected=t,this.relation=n,this.message="Dimension mismatch ("+(Array.isArray(e)?"["+e.join(", ")+"]":e)+" "+(this.relation||"!=")+" "+(Array.isArray(t)?"["+t.join(", ")+"]":t)+")",this.stack=(new Error).stack}r.prototype=new RangeError,r.prototype.constructor=RangeError,r.prototype.name="DimensionError",r.prototype.isDimensionError=!0,e.exports=r},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"===typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";function r(e,t,r,i){var o=r(n(23)),a=i("divide",{"number, number":function(e,t){return e/t},"Complex, Complex":function(e,t){return e.div(t)},"BigNumber, BigNumber":function(e,t){return e.div(t)},"Fraction, Fraction":function(e,t){return e.div(t)},"Unit, number | Fraction | BigNumber":function(e,t){var n=e.clone();return n.value=a(null===n.value?n._normalize(1):n.value,t),n},"number | Fraction | BigNumber, Unit":function(e,t){var n=t.pow(-1);return n.value=o(null===n.value?n._normalize(1):n.value,e),n},"Unit, Unit":function(e,t){return e.divide(t)}});return a}t.factory=r},function(e,t,n){"use strict";function r(e,t,r,o){var a=r(n(1)),s=r(n(18)),u=n(4),c=r(n(35)),l=r(n(99)),f=r(n(43)),p=r(n(8)),h=r(n(6)),d=o("add",i({"DenseMatrix, DenseMatrix":function(e,t){return p(e,t,s)},"DenseMatrix, SparseMatrix":function(e,t){return c(e,t,s,!1)},"SparseMatrix, DenseMatrix":function(e,t){return c(t,e,s,!0)},"SparseMatrix, SparseMatrix":function(e,t){return l(e,t,s)},"Array, Array":function(e,t){return d(a(e),a(t)).valueOf()},"Array, Matrix":function(e,t){return d(a(e),t)},"Matrix, Array":function(e,t){return d(e,a(t))},"DenseMatrix, any":function(e,t){return h(e,t,s,!1)},"SparseMatrix, any":function(e,t){return f(e,t,s,!1)},"any, DenseMatrix":function(e,t){return h(t,e,s,!0)},"any, SparseMatrix":function(e,t){return f(t,e,s,!0)},"Array, any":function(e,t){return h(a(e),t,s,!1).valueOf()},"any, Array":function(e,t){return h(a(t),e,s,!0).valueOf()},"any, any":s,"any, any, ...any":function(e,t,n){for(var r=d(e,t),i=0;i<n.length;i++)r=d(r,n[i]);return r}},s.signatures));return d.toTex={2:"\\left(${args[0]}"+u.operators.add+"${args[1]}\\right)"},d}var i=n(5).extend;t.name="add",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,o){var a=n(4),s=r(n(1)),u=r(n(18)),c=r(n(37)),l=r(n(35)),f=r(n(19)),p=r(n(76)),h=r(n(43)),d=r(n(8)),m=r(n(6)),g=o("subtract",{"number, number":function(e,t){return e-t},"Complex, Complex":function(e,t){return e.sub(t)},"BigNumber, BigNumber":function(e,t){return e.minus(t)},"Fraction, Fraction":function(e,t){return e.sub(t)},"Unit, Unit":function(e,t){if(null===e.value)throw new Error("Parameter x contains a unit with undefined value");if(null===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 n=e.clone();return n.value=g(n.value,t.value),n.fixPrefix=!1,n},"SparseMatrix, SparseMatrix":function(e,t){return i(e,t),p(e,t,g)},"SparseMatrix, DenseMatrix":function(e,t){return i(e,t),f(t,e,g,!0)},"DenseMatrix, SparseMatrix":function(e,t){return i(e,t),l(e,t,g,!1)},"DenseMatrix, DenseMatrix":function(e,t){return i(e,t),d(e,t,g)},"Array, Array":function(e,t){return g(s(e),s(t)).valueOf()},"Array, Matrix":function(e,t){return g(s(e),t)},"Matrix, Array":function(e,t){return g(e,s(t))},"SparseMatrix, any":function(e,t){return h(e,c(t),u)},"DenseMatrix, any":function(e,t){return m(e,t,g)},"any, SparseMatrix":function(e,t){return h(t,e,g,!0)},"any, DenseMatrix":function(e,t){return m(t,e,g,!0)},"Array, any":function(e,t){return m(s(e),t,g,!1).valueOf()},"any, Array":function(e,t){return m(s(t),e,g,!0).valueOf()}});return g.toTex={2:"\\left(${args[0]}"+a.operators.subtract+"${args[1]}\\right)"},g}function i(e,t){var n=e.size(),r=t.size();if(n.length!==r.length)throw new o(n.length,r.length)}var o=n(12);t.name="subtract",t.factory=r},function(e,t,n){"use strict";function r(e,t){if(u(e)&&o(e,t))return e[t];if("function"===typeof e[t]&&s(e,t))throw new Error('Cannot access method "'+t+'" as a property');throw new Error('No access to property "'+t+'"')}function i(e,t,n){if(u(e)&&o(e,t))return e[t]=n,n;throw new Error('No access to property "'+t+'"')}function o(e,t){return!(!e||"object"!==("undefined"===typeof e?"undefined":c(e)))&&(!!l(f,t)||!(t in Object.prototype)&&!(t in Function.prototype))}function a(e,t){if(!s(e,t))throw new Error('No access to method "'+t+'"')}function s(e,t){return!(!e||"function"!==typeof e[t])&&(!(l(e,t)&&Object.getPrototypeOf&&t in Object.getPrototypeOf(e))&&(!!l(p,t)||!(t in Object.prototype)&&!(t in Function.prototype)))}function u(e){return"object"===("undefined"===typeof e?"undefined":c(e))&&e&&e.constructor===Object}var c="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},l=n(5).hasOwnProperty,f={length:!0,name:!0},p={toString:!0,valueOf:!0,toLocaleString:!0};t.getSafeProperty=r,t.setSafeProperty=i,t.isSafeProperty=o,t.validateSafeMethod=a,t.isSafeMethod=s,t.isPlainObject=u},function(e,t,n){"use strict";function r(e,t,n,r){var i=r("add",{"number, number":function(e,t){return e+t},"Complex, Complex":function(e,t){return e.add(t)},"BigNumber, BigNumber":function(e,t){return e.plus(t)},"Fraction, Fraction":function(e,t){return e.add(t)},"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 n=e.clone();return n.value=i(n.value,t.value),n.fixPrefix=!1,n}});return i}t.factory=r},function(e,t,n){"use strict";function r(e,t,n,r){var o=e.DenseMatrix;return function(e,t,n,a){var s=e._data,u=e._size,c=e._datatype,l=t._values,f=t._index,p=t._ptr,h=t._size,d=t._datatype;if(u.length!==h.length)throw new i(u.length,h.length);if(u[0]!==h[0]||u[1]!==h[1])throw new RangeError("Dimension mismatch. Matrix A ("+u+") must match Matrix B ("+h+")");if(!l)throw new Error("Cannot perform operation on Dense Matrix and Pattern Sparse Matrix");var m=u[0],g=u[1],v=void 0,y=0,b=n;"string"===typeof c&&c===d&&(v=c,y=r.convert(0,v),b=r.find(n,[v,v]));for(var x=[],w=0;w<m;w++)x[w]=[];for(var N=[],E=[],C=0;C<g;C++){for(var S=C+1,M=p[C],T=p[C+1],O=M;O<T;O++){var k=f[O];N[k]=a?b(l[O],s[k][C]):b(s[k][C],l[O]),E[k]=S}for(var A=0;A<m;A++)E[A]===S?x[A][C]=N[A]:x[A][C]=a?b(y,s[A][C]):b(s[A][C],y)}return new o({data:x,size:[m,g],datatype:v})}}var i=n(12);t.name="algorithm03",t.factory=r},function(e,t,n){"use strict";function r(e,t,n,r){var i=e.DenseMatrix;return function(e,t,n,o){var a=e._values,s=e._index,u=e._ptr,c=e._size,l=e._datatype;if(!a)throw new Error("Cannot perform operation on Pattern Sparse Matrix and Scalar value");var f=c[0],p=c[1],h=void 0,d=n;"string"===typeof l&&(h=l,t=r.convert(t,h),d=r.find(n,[h,h]));for(var m=[],g=new i({data:m,size:[f,p],datatype:h}),v=[],y=[],b=0;b<p;b++){for(var x=b+1,w=u[b],N=u[b+1],E=w;E<N;E++){var C=s[E];v[C]=a[E],y[C]=x}for(var S=0;S<f;S++)0===b&&(m[S]=[]),y[S]===x?m[S][b]=o?d(t,v[S]):d(v[S],t):m[S][b]=o?d(t,0):d(0,t)}return g}}t.name="algorithm12",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,i){var o=r(n(11)),a=e.SparseMatrix;return function(e,t,n,r){var s=e._values,u=e._index,c=e._ptr,l=e._size,f=e._datatype;if(!s)throw new Error("Cannot perform operation on Pattern Sparse Matrix and Scalar value");var p=l[0],h=l[1],d=void 0,m=o,g=0,v=n;"string"===typeof f&&(d=f,m=i.find(o,[d,d]),g=i.convert(0,d),t=i.convert(t,d),v=i.find(n,[d,d]));for(var y=[],b=[],x=[],w=new a({values:y,index:b,ptr:x,size:[p,h],datatype:d}),N=0;N<h;N++){x[N]=b.length;for(var E=c[N],C=c[N+1],S=E;S<C;S++){var M=u[S],T=r?v(t,s[S]):v(s[S],t);m(T,g)||(b.push(M),y.push(T))}}return x[h]=b.length,w}}t.name="algorithm11",t.factory=r},function(e,t,n){"use strict";function r(e,t,n,r,u){function c(){if(!(this instanceof c))throw new SyntaxError("Constructor must be called with the new operator")}function l(e){for(var t in e)if(s(e,t)&&t in o)throw new Error('Scope contains an illegal symbol, "'+t+'" is a reserved keyword')}return c.prototype.eval=function(e){return this.compile().eval(e)},c.prototype.type="Node",c.prototype.isNode=!0,c.prototype.comment="",c.prototype.compile=function(){var e=this._compile(u.expression.mathWithTransform,{}),t={};return{eval:function(n){var r=n||{};return l(r),e(r,t,null)}}},c.prototype._compile=function(e,t){throw new Error("Method _compile should be implemented by type "+this.type)},c.prototype.forEach=function(e){throw new Error("Cannot run forEach on a Node interface")},c.prototype.map=function(e){throw new Error("Cannot run map on a Node interface")},c.prototype._ifNode=function(t){if(!e.isNode(t))throw new TypeError("Callback function must return a Node");return t},c.prototype.traverse=function(e){function t(e,n){e.forEach(function(e,r,i){n(e,r,i),t(e,n)})}e(this,null,null),t(this,e)},c.prototype.transform=function(e){function t(e,n){return e.map(function(e,r,i){return t(n(e,r,i),n)})}return t(e(this,null,null),e)},c.prototype.filter=function(e){var t=[];return this.traverse(function(n,r,i){e(n,r,i)&&t.push(n)}),t},c.prototype.find=function(){throw new Error("Function Node.find is deprecated. Use Node.filter instead.")},c.prototype.match=function(){throw new Error("Function Node.match is deprecated. See functions Node.filter, Node.transform, Node.traverse.")},c.prototype.clone=function(){throw new Error("Cannot clone a Node interface")},c.prototype.cloneDeep=function(){return this.map(function(e){return e.cloneDeep()})},c.prototype.equals=function(e){return!!e&&a(this,e)},c.prototype.toString=function(e){var t=void 0;if(e&&"object"===("undefined"===typeof e?"undefined":i(e)))switch(i(e.handler)){case"object":case"undefined":break;case"function":t=e.handler(this,e);break;default:throw new TypeError("Object or function expected as callback")}return"undefined"!==typeof t?t:this._toString(e)},c.prototype.toJSON=function(){throw new Error("Cannot serialize object: toJSON not implemented by "+this.type)},c.prototype.toHTML=function(e){var t=void 0;if(e&&"object"===("undefined"===typeof e?"undefined":i(e)))switch(i(e.handler)){case"object":case"undefined":break;case"function":t=e.handler(this,e);break;default:throw new TypeError("Object or function expected as callback")}return"undefined"!==typeof t?t:this.toHTML(e)},c.prototype._toString=function(){throw new Error("_toString not implemented for "+this.type)},c.prototype.toTex=function(e){var t=void 0;if(e&&"object"===("undefined"===typeof e?"undefined":i(e)))switch(i(e.handler)){case"object":case"undefined":break;case"function":t=e.handler(this,e);break;default:throw new TypeError("Object or function expected as callback")}return"undefined"!==typeof t?t:this._toTex(e)},c.prototype._toTex=function(e){throw new Error("_toTex not implemented for "+this.type)},c.prototype.getIdentifier=function(){return this.type},c.prototype.getContent=function(){return this},c}var i="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},o=n(146),a=n(5).deepEqual,s=n(5).hasOwnProperty;t.name="Node",t.path="expression.node",t.math=!0,t.factory=r},function(e,t,n){"use strict";function r(e,t,n,r){var i=r("multiplyScalar",{"number, number":function(e,t){return e*t},"Complex, Complex":function(e,t){return e.mul(t)},"BigNumber, BigNumber":function(e,t){return e.times(t)},"Fraction, Fraction":function(e,t){return e.mul(t)},"number | Fraction | BigNumber | Complex, Unit":function(e,t){var n=t.clone();return n.value=null===n.value?n._normalize(e):i(n.value,e),n},"Unit, number | Fraction | BigNumber | Complex":function(e,t){var n=e.clone();return n.value=null===n.value?n._normalize(t):i(n.value,t),n},"Unit, Unit":function(e,t){return e.multiply(t)}});return i}t.factory=r},function(e,t,n){"use strict";function r(e,t,r,u){function c(t,n){if(!e.isIndex(n))throw new TypeError("Index expected");if(1!==n.size().length)throw new l(n.size().length,1);var r=t.length;s(n.min()[0],r),s(n.max()[0],r);var i=n.dimension(0),o="";return i.forEach(function(e){o+=t.charAt(e)}),o}function f(e,t,n,r){if(!t||!0!==t.isIndex)throw new TypeError("Index expected");if(1!==t.size().length)throw new l(t.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=t.dimension(0);if(i.size()[0]!==n.length)throw new l(i.size()[0],n.length);var o=e.length;s(t.min()[0]),s(t.max()[0]);for(var a=[],u=0;u<o;u++)a[u]=e.charAt(u);if(i.forEach(function(e,t){a[e]=n.charAt(t[0])}),a.length>o)for(var c=o-1,f=a.length;c<f;c++)a[c]||(a[c]=r);return a.join("")}var p=r(n(1)),h=u("subset",{"Array, Index":function(e,t){var n=p(e),r=n.subset(t);return t.isScalar()?r:r.valueOf()},"Matrix, Index":function(e,t){return e.subset(t)},"Object, Index":i,"string, Index":c,"Array, Index, any":function(e,t,n){return p(a(e)).subset(t,n,void 0).valueOf()},"Array, Index, any, any":function(e,t,n,r){return p(a(e)).subset(t,n,r).valueOf()},"Matrix, Index, any":function(e,t,n){return e.clone().subset(t,n)},"Matrix, Index, any, any":function(e,t,n,r){return e.clone().subset(t,n,r)},"string, Index, string":f,"string, Index, string, string":f,"Object, Index, any":o});return h.toTex=void 0,h}function i(e,t){if(1!==t.size().length)throw new l(t.size(),1);var n=t.dimension(0);if("string"!==typeof n)throw new TypeError("String expected as index to retrieve an object property");return u(e,n)}function o(e,t,n){if(1!==t.size().length)throw new l(t.size(),1);var r=t.dimension(0);if("string"!==typeof r)throw new TypeError("String expected as index to retrieve an object property");var i=a(e);return c(i,r,n),i}var a=n(5).clone,s=n(2).validateIndex,u=n(17).getSafeProperty,c=n(17).setSafeProperty,l=n(12);t.name="subset",t.factory=r},function(e,t,n){"use strict";function r(e,t,n,r){var o=r("abs",{number:Math.abs,Complex:function(e){return e.abs()},BigNumber:function(e){return e.abs()},Fraction:function(e){return e.abs()},"Array | Matrix":function(e){return i(e,o,!0)},Unit:function(e){return e.abs()}});return o.toTex={1:"\\left|${args[0]}\\right|"},o}var i=n(0);t.name="abs",t.factory=r},function(e,t){},function(e,t,n){"use strict";function r(e,t,r,o){var a=r(n(11)),s=e.SparseMatrix;return function(e,t,n,r){var u=e._data,c=e._size,l=e._datatype,f=t._values,p=t._index,h=t._ptr,d=t._size,m=t._datatype;if(c.length!==d.length)throw new i(c.length,d.length);if(c[0]!==d[0]||c[1]!==d[1])throw new RangeError("Dimension mismatch. Matrix A ("+c+") must match Matrix B ("+d+")");if(!f)throw new Error("Cannot perform operation on Dense Matrix and Pattern Sparse Matrix");var g=c[0],v=c[1],y=void 0,b=a,x=0,w=n;"string"===typeof l&&l===m&&(y=l,b=o.find(a,[y,y]),x=o.convert(0,y),w=o.find(n,[y,y]));for(var N=[],E=[],C=[],S=0;S<v;S++){C[S]=E.length;for(var M=h[S],T=h[S+1],O=M;O<T;O++){var k=p[O],A=r?w(f[O],u[k][S]):w(u[k][S],f[O]);b(A,x)||(E.push(k),N.push(A))}}return C[v]=E.length,new s({values:N,index:E,ptr:C,size:[g,v],datatype:y})}}var i=n(12);t.name="algorithm02",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,o){var a=r(n(1)),s=o("size",{Matrix:function(e){return a(e.size())},Array:i.size,string:function(e){return"Array"===t.matrix?[e.length]:a([e.length])},"number | Complex | BigNumber | Unit | boolean | null":function(e){return"Array"===t.matrix?[]:a([])}});return s.toTex=void 0,s}var i=n(2);t.name="size",t.factory=r},function(e,t,n){"use strict";function r(e,t,n,r){function o(e,t,n,r,i){for(var o=e._values,a=e._index,s=e._ptr,u=s[t],c=s[t+1];u<c;u++){var l=a[u];n[l]=i,r[l]=o[u]}}var a=e.DenseMatrix;return function(e,t,n){var s=e._size,u=e._datatype,c=t._size,l=t._datatype;if(s.length!==c.length)throw new i(s.length,c.length);if(s[0]!==c[0]||s[1]!==c[1])throw new RangeError("Dimension mismatch. Matrix A ("+s+") must match Matrix B ("+c+")");var f=s[0],p=s[1],h=void 0,d=0,m=n;"string"===typeof u&&u===l&&(h=u,d=r.convert(0,h),m=r.find(n,[h,h]));var g=void 0,v=void 0,y=[];for(g=0;g<f;g++)y[g]=[];var b=new a({data:y,size:[f,p],datatype:h}),x=[],w=[],N=[],E=[];for(v=0;v<p;v++){var C=v+1;for(o(e,v,N,x,C),o(t,v,E,w,C),g=0;g<f;g++){var S=N[g]===C?x[g]:d,M=E[g]===C?w[g]:d;y[g][v]=m(S,M)}}return b}}var i=n(12);t.name="algorithm07",t.factory=r},function(e,t,n){"use strict";function r(e){function t(r){if(!(this instanceof t))throw new SyntaxError("Constructor must be called with the new operator");this._dimensions=[],this._isScalar=!0;for(var i=0,o=arguments.length;i<o;i++){var a=arguments[i];if(e.isRange(a))this._dimensions.push(a),this._isScalar=!1;else if(Array.isArray(a)||e.isMatrix(a)){var s=n(a.valueOf());this._dimensions.push(s);var u=s.size();1===u.length&&1===u[0]||(this._isScalar=!1)}else if("number"===typeof a)this._dimensions.push(n([a]));else{if("string"!==typeof a)throw new TypeError("Dimension must be an Array, Matrix, number, string, or Range");this._dimensions.push(a)}}}function n(t){for(var n=0,r=t.length;n<r;n++)if("number"!==typeof t[n]||!o(t[n]))throw new TypeError("Index parameters must be positive integer numbers");return new e.ImmutableDenseMatrix(t)}return t.prototype.type="Index",t.prototype.isIndex=!0,t.prototype.clone=function(){var e=new t;return e._dimensions=i(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=[],t=0,n=this._dimensions.length;t<n;t++){var r=this._dimensions[t];e[t]="string"===typeof r?1:r.size()[0]}return e},t.prototype.max=function(){for(var e=[],t=0,n=this._dimensions.length;t<n;t++){var r=this._dimensions[t];e[t]="string"===typeof r?r:r.max()}return e},t.prototype.min=function(){for(var e=[],t=0,n=this._dimensions.length;t<n;t++){var r=this._dimensions[t];e[t]="string"===typeof r?r:r.min()}return e},t.prototype.forEach=function(e){for(var t=0,n=this._dimensions.length;t<n;t++)e(this._dimensions[t],t,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=[],t=0,n=this._dimensions.length;t<n;t++){var r=this._dimensions[t];e.push("string"===typeof r?r:r.toArray())}return e},t.prototype.valueOf=t.prototype.toArray,t.prototype.toString=function(){for(var e=[],t=0,n=this._dimensions.length;t<n;t++){var r=this._dimensions[t];"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}var i=n(5).clone,o=n(3).isInteger;t.name="Index",t.path="type",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,a){function s(t,n){return e.isSparseMatrix(t)&&e.isSparseMatrix(n)?u(t.toJSON().values,n.toJSON().values):e.isSparseMatrix(t)?s(t.toArray(),n):e.isSparseMatrix(n)?s(t,n.toArray()):e.isDenseMatrix(t)?s(t.toJSON().data,n):e.isDenseMatrix(n)?s(t,n.toJSON().data):Array.isArray(t)?Array.isArray(n)?u(t,n):s(t,[n]):s([t],n)}function u(e,t){for(var n=0,r=Math.min(e.length,t.length);n<r;n++){var i=h(e[n],t[n]);if(0!==i)return i}return e.length>t.length?1:e.length<t.length?-1:0}function c(e,t){var n=Object.keys(e),r=Object.keys(t);n.sort(o),r.sort(o);var i=u(n,r);if(0!==i)return i;for(var a=0;a<n.length;a++){var s=h(e[n[a]],t[r[a]]);if(0!==s)return s}return 0}var l=r(n(38)),f=r(n(62)),p=f.signatures["boolean,boolean"],h=a("compareNatural",{"any, any":function(e,t){var n=l(e),r=l(t),a=void 0;if(("number"===n||"BigNumber"===n||"Fraction"===n)&&("number"===r||"BigNumber"===r||"Fraction"===r))return a=f(e,t),"0"!==a.toString()?a>0?1:-1:o(n,r);if("Array"===n||"Matrix"===n||"Array"===r||"Matrix"===r)return a=s(e,t),0!==a?a:o(n,r);if(n!==r)return o(n,r);if("Complex"===n)return i(e,t);if("Unit"===n)return e.equalBase(t)?h(e.value,t.value):u(e.formatUnits(),t.formatUnits());if("boolean"===n)return p(e,t);if("string"===n)return o(e,t);if("Object"===n)return c(e,t);if("null"===n)return 0;if("undefined"===n)return 0;throw new TypeError('Unsupported type of value "'+n+'"')}});return h.toTex=void 0,h}function i(e,t){return e.re>t.re?1:e.re<t.re?-1:e.im>t.im?1:e.im<t.im?-1:0}var o=n(608);t.name="compareNatural",t.factory=r},function(e,t,n){"use strict";t.array=n(2),t.boolean=n(283),t.function=n(34),t.number=n(3),t.object=n(5),t.string=n(9),t.emitter=n(133)},function(e,t,n){e.exports=n(233)()},function(e,t,n){"use strict";var r="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};t.memoize=function(e,t){return function n(){"object"!==r(n.cache)&&(n.cache={});for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];var a=t?t(i):JSON.stringify(i);return a in n.cache||(n.cache[a]=e.apply(e,i)),n.cache[a]}},t.maxArgumentCount=function(e){return Object.keys(e.signatures||{}).reduce(function(e,t){var n=(t.match(/,/g)||[]).length+1;return Math.max(e,n)},-1)},t.callWithRightArgumentCount=function(e,t,n){return Object.keys(e.signatures||{}).reduce(function(e,t){var n=(t.match(/,/g)||[]).length+1;return Math.max(e,n)},-1)}},function(e,t,n){"use strict";function r(e,t,n,r){var o=e.DenseMatrix;return function(e,t,n,a){var s=e._data,u=e._size,c=e._datatype,l=t._values,f=t._index,p=t._ptr,h=t._size,d=t._datatype;if(u.length!==h.length)throw new i(u.length,h.length);if(u[0]!==h[0]||u[1]!==h[1])throw new RangeError("Dimension mismatch. Matrix A ("+u+") must match Matrix B ("+h+")");if(!l)throw new Error("Cannot perform operation on Dense Matrix and Pattern Sparse Matrix");var m=u[0],g=u[1],v="string"===typeof c&&c===d?c:void 0,y=v?r.find(n,[v,v]):n,b=void 0,x=void 0,w=[];for(b=0;b<m;b++)w[b]=[];var N=[],E=[];for(x=0;x<g;x++){for(var C=x+1,S=p[x],M=p[x+1],T=S;T<M;T++)b=f[T],N[b]=a?y(l[T],s[b][x]):y(s[b][x],l[T]),E[b]=C;for(b=0;b<m;b++)E[b]===C?w[b][x]=N[b]:w[b][x]=s[b][x]}return new o({data:w,size:[m,g],datatype:v})}}var i=n(12);t.name="algorithm01",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,a){var s=r(n(1)),u=r(n(19)),c=r(n(29)),l=r(n(20)),f=r(n(8)),p=r(n(6)),h=n(4),d=a("larger",{"boolean, boolean":function(e,t){return e>t},"number, number":function(e,n){return e>n&&!i(e,n,t.epsilon)},"BigNumber, BigNumber":function(e,n){return e.gt(n)&&!o(e,n,t.epsilon)},"Fraction, Fraction":function(e,t){return 1===e.compare(t)},"Complex, Complex":function(){throw new TypeError("No ordering relation is defined for complex numbers")},"Unit, Unit":function(e,t){if(!e.equalBase(t))throw new Error("Cannot compare units with different base");return d(e.value,t.value)},"SparseMatrix, SparseMatrix":function(e,t){return c(e,t,d)},"SparseMatrix, DenseMatrix":function(e,t){return u(t,e,d,!0)},"DenseMatrix, SparseMatrix":function(e,t){return u(e,t,d,!1)},"DenseMatrix, DenseMatrix":function(e,t){return f(e,t,d)},"Array, Array":function(e,t){return d(s(e),s(t)).valueOf()},"Array, Matrix":function(e,t){return d(s(e),t)},"Matrix, Array":function(e,t){return d(e,s(t))},"SparseMatrix, any":function(e,t){return l(e,t,d,!1)},"DenseMatrix, any":function(e,t){return p(e,t,d,!1)},"any, SparseMatrix":function(e,t){return l(t,e,d,!0)},"any, DenseMatrix":function(e,t){return p(t,e,d,!0)},"Array, any":function(e,t){return p(s(e),t,d,!1).valueOf()},"any, Array":function(e,t){return p(s(t),e,d,!0).valueOf()}});return d.toTex={2:"\\left(${args[0]}"+h.operators.larger+"${args[1]}\\right)"},d}var i=n(3).nearlyEqual,o=n(42);t.name="larger",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,o){var a=n(4),s=o("unaryMinus",{number:function(e){return-e},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=s(e.value),t},"Array | Matrix":function(e){return i(e,s,!0)}});return s.toTex={1:a.operators.unaryMinus+"\\left(${args[0]}\\right)"},s}var i=n(0);t.name="unaryMinus",t.factory=r},function(e,t,n){"use strict";function r(e,t,n,r){var o=r("_typeof",{any:function(t){var n="undefined"===typeof t?"undefined":i(t);return"object"===n?null===t?"null":Array.isArray(t)?"Array":t instanceof Date?"Date":t instanceof RegExp?"RegExp":e.isBigNumber(t)?"BigNumber":e.isComplex(t)?"Complex":e.isFraction(t)?"Fraction":e.isMatrix(t)?"Matrix":e.isUnit(t)?"Unit":e.isIndex(t)?"Index":e.isRange(t)?"Range":e.isResultSet(t)?"ResultSet":e.isNode(t)?t.type:e.isChain(t)?"Chain":e.isHelp(t)?"Help":"Object":"function"===n?"Function":n}});return o.toTex=void 0,o}var i="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};t.name="typeof",t.factory=r},function(e,t,n){"use strict";function r(e,t,n,r){var a=r("isInteger",{number:o.isInteger,BigNumber:function(e){return e.isInt()},Fraction:function(e){return 1===e.d&&isFinite(e.n)},"Array | Matrix":function(e){return i(e,a)}});return a}var i=n(0),o=n(3);t.name="isInteger",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,i){var o=r(n(38));return function(e,t,n){var r=void 0;return-1!==String(e).indexOf("Unexpected type")?(r=arguments.length>2?" (type: "+o(n)+", value: "+JSON.stringify(n)+")":" (type: "+e.data.actual+")",new TypeError("Cannot calculate "+t+", unexpected type of argument"+r)):-1!==String(e).indexOf("complex numbers")?(r=arguments.length>2?" (type: "+o(n)+", value: "+JSON.stringify(n)+")":"",new TypeError("Cannot calculate "+t+", no ordering relation is defined for complex numbers"+r)):e}}t.factory=r},function(e,t,n){"use strict";function r(){var e=document.createElement("div");e.style.position="absolute",e.style.top="-9999px",e.style.width="50px",e.style.height="50px",e.style.overflow="scroll",document.body.appendChild(e);var t=e.offsetWidth-e.clientWidth;return document.body.removeChild(e),t}function i(e){document.body.style.paddingRight=e>0?e+"px":null}function o(){return document.body.clientWidth<window.innerWidth}function a(){var e=window.getComputedStyle(document.body,null);return parseInt(e&&e.getPropertyValue("padding-right")||0,10)}function s(){var e=r(),t=document.querySelectorAll(".fixed-top, .fixed-bottom, .is-fixed, .sticky-top")[0],n=t?parseInt(t.style.paddingRight||0,10):0;o()&&i(n+e)}function u(e){j=e}function c(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:j;return t?e.split(" ").map(function(e){return t[e]||e}).join(" "):e}function l(e,t){var n={};return Object.keys(e).forEach(function(r){-1===t.indexOf(r)&&(n[r]=e[r])}),n}function f(e,t){for(var n=Array.isArray(t)?t:[t],r=n.length,i=void 0,o={};r>0;)r-=1,i=n[r],o[i]=e[i];return o}function p(e){U[e]||("undefined"!==typeof console&&console.error(e),U[e]=!0)}function h(e,t){return function(n,r,i){null!==n[r]&&"undefined"!==typeof n[r]&&p('"'+r+'" property of "'+i+'" has been deprecated.\n'+t);for(var o=arguments.length,a=Array(o>3?o-3:0),s=3;s<o;s++)a[s-3]=arguments[s];return e.apply(void 0,[n,r,i].concat(a))}}function d(e,t,n){if(!(e[t]instanceof Element))return new Error("Invalid prop `"+t+"` supplied to `"+n+"`. Expected prop to be an instance of Element. Validation failed.")}function m(e){if(_()(e))return e();if("string"===typeof e&&document){var t=document.querySelector(e);if(null===t&&(t=document.querySelector("#"+e)),null===t)throw new Error("The target '"+e+"' could not be identified in the dom, tip: check spelling");return t}return e}function g(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function v(e,t){return t={exports:{}},e(t,t.exports),t.exports}function y(e){var t=e.tag,n=e.baseClass,r=e.baseClassActive,i=e.className,o=e.cssModule,a=e.children,s=Q(e,["tag","baseClass","baseClassActive","className","cssModule","children"]),u=f(s,H),p=l(s,H);return S.a.createElement(bt,u,function(e){var s="entered"===e,u=c(k()(i,n,s&&r),o);return S.a.createElement(t,Z({className:u},p),a)})}function b(){}function x(e,t){var n=e.className,r=e.cssModule,i=e.tabId,o=e.tag,a=Q(e,["className","cssModule","tabId","tag"]),s=c(k()("tab-pane",n,{active:i===t.activeTabId}),r);return S.a.createElement(o,Z({},a,{className:s}))}function w(e){var t=e.className,n=e.closeClassName,r=e.closeAriaLabel,i=e.cssModule,o=e.tag,a=e.color,s=e.isOpen,u=e.toggle,l=e.children,f=e.transition,p=Q(e,["className","closeClassName","closeAriaLabel","cssModule","tag","color","isOpen","toggle","children","transition"]),h=c(k()(t,"alert","alert-"+a,{"alert-dismissible":u}),i),d=c(k()("close",n),i);return S.a.createElement(y,Z({},p,f,{tag:o,className:h,in:s,role:"alert"}),u?S.a.createElement("button",{type:"button",className:d,"aria-label":r,onClick:u},S.a.createElement("span",{"aria-hidden":"true"},"\xd7")):null,l)}function N(e){return li[e]||"collapse"}function E(e){return e.scrollHeight}n.d(t,"s",function(){return be}),n.d(t,"t",function(){return Ne}),n.d(t,"u",function(){return Se}),n.d(t,"r",function(){return ke}),n.d(t,"a",function(){return Ye}),n.d(t,"b",function(){return Ke}),n.d(t,"c",function(){return Qe}),n.d(t,"k",function(){return at}),n.d(t,"l",function(){return pt}),n.d(t,"m",function(){return gt}),n.d(t,"d",function(){return Tt}),n.d(t,"g",function(){return At}),n.d(t,"f",function(){return Rt}),n.d(t,"e",function(){return zt}),n.d(t,"h",function(){return fn}),n.d(t,"i",function(){return vn}),n.d(t,"n",function(){return dr}),n.d(t,"o",function(){return xr}),n.d(t,"q",function(){return Br}),n.d(t,"p",function(){return ii}),n.d(t,"j",function(){return fi});var C=n(7),S=n.n(C),M=n(33),T=n.n(M),O=n(235),k=n.n(O),A=n(236),_=n.n(A),P=n(237),R=n.n(P),I=n(53),F=n.n(I),D=n(238),L=(n.n(D),n(244)),B=n.n(L),z=n(245),j=void 0,U={},q={Fade:150,Collapse:350,Modal:300,Carousel:600},H=["in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","onEnter","onEntering","onEntered","onExit","onExiting","onExited"],W={ENTERING:"entering",ENTERED:"entered",EXITING:"exiting",EXITED:"exited"},V={esc:27,space:32,tab:9,up:38,down:40},G=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],$=(Object.freeze({getScrollbarWidth:r,setScrollbarWidth:i,isBodyOverflowing:o,getOriginalBodyPadding:a,conditionallyUpdateScrollbar:s,setGlobalCssModule:u,mapToCssModules:c,omit:l,pick:f,warnOnce:p,deprecated:h,DOMElement:d,getTarget:m,TransitionTimeouts:q,TransitionPropTypeKeys:H,TransitionStatuses:W,keyCodes:V,PopperPlacements:G}),"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}),Y=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},X=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),K=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},Z=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},J=function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},Q=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n},ee=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t},te={tag:T.a.oneOfType([T.a.func,T.a.string]),fluid:T.a.bool,className:T.a.string,cssModule:T.a.object},ne={tag:"div"},re=function(e){var t=e.className,n=e.cssModule,r=e.fluid,i=e.tag,o=Q(e,["className","cssModule","fluid","tag"]),a=c(k()(t,r?"container-fluid":"container"),n);return S.a.createElement(i,Z({},o,{className:a}))};re.propTypes=te,re.defaultProps=ne;var ie={tag:T.a.oneOfType([T.a.func,T.a.string]),noGutters:T.a.bool,className:T.a.string,cssModule:T.a.object},oe={tag:"div"},ae=function(e){var t=e.className,n=e.cssModule,r=e.noGutters,i=e.tag,o=Q(e,["className","cssModule","noGutters","tag"]),a=c(k()(t,r?"no-gutters":null,"row"),n);return S.a.createElement(i,Z({},o,{className:a}))};ae.propTypes=ie,ae.defaultProps=oe;var se=["xs","sm","md","lg","xl"],ue=T.a.oneOfType([T.a.number,T.a.string]),ce=T.a.oneOfType([T.a.bool,T.a.number,T.a.string,T.a.shape({size:T.a.oneOfType([T.a.bool,T.a.number,T.a.string]),push:h(ue,'Please use the prop "order"'),pull:h(ue,'Please use the prop "order"'),order:ue,offset:ue})]),le={tag:T.a.oneOfType([T.a.func,T.a.string]),xs:ce,sm:ce,md:ce,lg:ce,xl:ce,className:T.a.string,cssModule:T.a.object,widths:T.a.array},fe={tag:"div",widths:se},pe=function(e,t,n){return!0===n||""===n?e?"col":"col-"+t:"auto"===n?e?"col-auto":"col-"+t+"-auto":e?"col-"+n:"col-"+t+"-"+n},he=function(e){var t=e.className,n=e.cssModule,r=e.widths,i=e.tag,o=Q(e,["className","cssModule","widths","tag"]),a=[];r.forEach(function(t,r){var i=e[t];if(delete o[t],i||""===i){var s=!r;if(R()(i)){var u,l=s?"-":"-"+t+"-",f=pe(s,t,i.size);a.push(c(k()((u={},K(u,f,i.size||""===i.size),K(u,"order"+l+i.order,i.order||0===i.order),K(u,"offset"+l+i.offset,i.offset||0===i.offset),u)),n))}else{var p=pe(s,t,i);a.push(p)}}}),a.length||a.push("col");var s=c(k()(t,a),n);return S.a.createElement(i,Z({},o,{className:s}))};he.propTypes=le,he.defaultProps=fe;var de={light:T.a.bool,dark:T.a.bool,inverse:h(T.a.bool,'Please use the prop "dark"'),full:T.a.bool,fixed:T.a.string,sticky:T.a.string,color:T.a.string,role:T.a.string,tag:T.a.oneOfType([T.a.func,T.a.string]),className:T.a.string,cssModule:T.a.object,toggleable:h(T.a.oneOfType([T.a.bool,T.a.string]),'Please use the prop "expand"'),expand:T.a.oneOfType([T.a.bool,T.a.string])},me={tag:"nav",expand:!1},ge=function(e){return!1!==e&&(!0===e||"xs"===e?"navbar-expand":"navbar-expand-"+e)},ve={xs:"sm",sm:"md",md:"lg",lg:"xl"},ye=function(e){return void 0!==e&&"xl"!==e&&(!1===e?"navbar-expand":"navbar-expand-"+(!0===e?"sm":ve[e]||e))},be=function(e){var t,n=e.toggleable,r=e.expand,i=e.className,o=e.cssModule,a=e.light,s=e.dark,u=e.inverse,l=e.fixed,f=e.sticky,p=e.color,h=e.tag,d=Q(e,["toggleable","expand","className","cssModule","light","dark","inverse","fixed","sticky","color","tag"]),m=c(k()(i,"navbar",ge(r)||ye(n),(t={"navbar-light":a,"navbar-dark":u||s},K(t,"bg-"+p,p),K(t,"fixed-"+l,l),K(t,"sticky-"+f,f),t)),o);return S.a.createElement(h,Z({},d,{className:m}))};be.propTypes=de,be.defaultProps=me;var xe={tag:T.a.oneOfType([T.a.func,T.a.string]),className:T.a.string,cssModule:T.a.object},we={tag:"a"},Ne=function(e){var t=e.className,n=e.cssModule,r=e.tag,i=Q(e,["className","cssModule","tag"]),o=c(k()(t,"navbar-brand"),n);return S.a.createElement(r,Z({},i,{className:o}))};Ne.propTypes=xe,Ne.defaultProps=we;var Ee={tag:T.a.oneOfType([T.a.func,T.a.string]),type:T.a.string,className:T.a.string,cssModule:T.a.object,children:T.a.node},Ce={tag:"button",type:"button"},Se=function(e){var t=e.className,n=e.cssModule,r=e.children,i=e.tag,o=Q(e,["className","cssModule","children","tag"]),a=c(k()(t,"navbar-toggler"),n);return S.a.createElement(i,Z({},o,{className:a}),r||S.a.createElement("span",{className:c("navbar-toggler-icon",n)}))};Se.propTypes=Ee,Se.defaultProps=Ce;var Me={tabs:T.a.bool,pills:T.a.bool,vertical:T.a.oneOfType([T.a.bool,T.a.string]),horizontal:T.a.string,justified:T.a.bool,fill:T.a.bool,navbar:T.a.bool,card:T.a.bool,tag:T.a.oneOfType([T.a.func,T.a.string]),className:T.a.string,cssModule:T.a.object},Te={tag:"ul",vertical:!1},Oe=function(e){return!1!==e&&(!0===e||"xs"===e?"flex-column":"flex-"+e+"-column")},ke=function(e){var t=e.className,n=e.cssModule,r=e.tabs,i=e.pills,o=e.vertical,a=e.horizontal,s=e.justified,u=e.fill,l=e.navbar,f=e.card,p=e.tag,h=Q(e,["className","cssModule","tabs","pills","vertical","horizontal","justified","fill","navbar","card","tag"]),d=c(k()(t,l?"navbar-nav":"nav",!!a&&"justify-content-"+a,Oe(o),{"nav-tabs":r,"card-header-tabs":f&&r,"nav-pills":i,"card-header-pills":f&&i,"nav-justified":s,"nav-fill":u}),n);return S.a.createElement(p,Z({},h,{className:d}))};ke.propTypes=Me,ke.defaultProps=Te;var Ae={tag:T.a.oneOfType([T.a.func,T.a.string]),active:T.a.bool,className:T.a.string,cssModule:T.a.object},_e={tag:"li"},Pe=function(e){var t=e.className,n=e.cssModule,r=e.active,i=e.tag,o=Q(e,["className","cssModule","active","tag"]),a=c(k()(t,"nav-item",!!r&&"active"),n);return S.a.createElement(i,Z({},o,{className:a}))};Pe.propTypes=Ae,Pe.defaultProps=_e;var Re={disabled:T.a.bool,dropup:h(T.a.bool,'Please use the prop "direction" with the value "up".'),direction:T.a.oneOf(["up","down","left","right"]),group:T.a.bool,isOpen:T.a.bool,nav:T.a.bool,active:T.a.bool,addonType:T.a.oneOfType([T.a.bool,T.a.oneOf(["prepend","append"])]),size:T.a.string,tag:T.a.string,toggle:T.a.func,children:T.a.node,className:T.a.string,cssModule:T.a.object,inNavbar:T.a.bool},Ie={isOpen:!1,direction:"down",nav:!1,active:!1,addonType:!1,inNavbar:!1},Fe={toggle:T.a.func.isRequired,isOpen:T.a.bool.isRequired,direction:T.a.oneOf(["up","down","left","right"]).isRequired,inNavbar:T.a.bool.isRequired},De=function(e){function t(e){Y(this,t);var n=ee(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.addEvents=n.addEvents.bind(n),n.handleDocumentClick=n.handleDocumentClick.bind(n),n.handleKeyDown=n.handleKeyDown.bind(n),n.removeEvents=n.removeEvents.bind(n),n.toggle=n.toggle.bind(n),n}return J(t,e),X(t,[{key:"getChildContext",value:function(){return{toggle:this.props.toggle,isOpen:this.props.isOpen,direction:"down"===this.props.direction&&this.props.dropup?"up":this.props.direction,inNavbar:this.props.inNavbar}}},{key:"componentDidMount",value:function(){this.handleProps()}},{key:"componentDidUpdate",value:function(e){this.props.isOpen!==e.isOpen&&this.handleProps()}},{key:"componentWillUnmount",value:function(){this.removeEvents()}},{key:"getContainer",value:function(){return F.a.findDOMNode(this)}},{key:"addEvents",value:function(){var e=this;["click","touchstart","keyup"].forEach(function(t){return document.addEventListener(t,e.handleDocumentClick,!0)})}},{key:"removeEvents",value:function(){var e=this;["click","touchstart","keyup"].forEach(function(t){return document.removeEventListener(t,e.handleDocumentClick,!0)})}},{key:"handleDocumentClick",value:function(e){if(!e||3!==e.which&&("keyup"!==e.type||e.which===V.tab)){var t=this.getContainer();(!t.contains(e.target)||t===e.target||"keyup"===e.type&&e.which!==V.tab)&&this.toggle(e)}}},{key:"handleKeyDown",value:function(e){if(!(-1===[V.esc,V.up,V.down,V.space].indexOf(e.which)||/button/i.test(e.target.tagName)&&e.which===V.space||/input|textarea/i.test(e.target.tagName))&&(e.preventDefault(),!this.props.disabled)){var t=this.getContainer();if(e.which===V.space&&this.props.isOpen&&t!==e.target&&e.target.click(),e.which===V.esc||!this.props.isOpen)return this.toggle(e),void t.querySelector("[aria-expanded]").focus();var n=c("dropdown-menu",this.props.cssModule),r=c("dropdown-item",this.props.cssModule),i=c("disabled",this.props.cssModule),o=t.querySelectorAll("."+n+" ."+r+":not(."+i+")");if(o.length){for(var a=-1,s=0;s<o.length;s+=1)if(o[s]===e.target){a=s;break}e.which===V.up&&a>0&&(a-=1),e.which===V.down&&a<o.length-1&&(a+=1),a<0&&(a=0),o[a].focus()}}}},{key:"handleProps",value:function(){this.props.isOpen?this.addEvents():this.removeEvents()}},{key:"toggle",value:function(e){return this.props.disabled?e&&e.preventDefault():this.props.toggle(e)}},{key:"render",value:function(){var e,t=l(this.props,["toggle","disabled","inNavbar","direction"]),n=t.className,r=t.cssModule,i=t.dropup,o=t.isOpen,a=t.group,s=t.size,u=t.nav,f=t.active,p=t.addonType,h=Q(t,["className","cssModule","dropup","isOpen","group","size","nav","active","addonType"]),d="down"===this.props.direction&&i?"up":this.props.direction;h.tag=h.tag||(u?"li":"div");var m=c(k()(n,"down"!==d&&"drop"+d,!(!u||!f)&&"active",(e={},K(e,"input-group-"+p,p),K(e,"btn-group",a),K(e,"btn-group-"+s,!!s),K(e,"dropdown",!a&&!p),K(e,"show",o),K(e,"nav-item",u),e)),r);return S.a.createElement(D.Manager,Z({},h,{className:m,onKeyDown:this.handleKeyDown}))}}]),t}(S.a.Component);De.propTypes=Re,De.defaultProps=Ie,De.childContextTypes=Fe;var Le={tag:T.a.oneOfType([T.a.func,T.a.string]),innerRef:T.a.oneOfType([T.a.func,T.a.string]),disabled:T.a.bool,active:T.a.bool,className:T.a.string,cssModule:T.a.object,onClick:T.a.func,href:T.a.any},Be={tag:"a"},ze=function(e){function t(e){Y(this,t);var n=ee(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.onClick=n.onClick.bind(n),n}return J(t,e),X(t,[{key:"onClick",value:function(e){if(this.props.disabled)return void e.preventDefault();"#"===this.props.href&&e.preventDefault(),this.props.onClick&&this.props.onClick(e)}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.cssModule,r=e.active,i=e.tag,o=e.innerRef,a=Q(e,["className","cssModule","active","tag","innerRef"]),s=c(k()(t,"nav-link",{disabled:a.disabled,active:r}),n);return S.a.createElement(i,Z({},a,{ref:o,onClick:this.onClick,className:s}))}}]),t}(S.a.Component);ze.propTypes=Le,ze.defaultProps=Be;var je={tag:T.a.string,className:T.a.string,cssModule:T.a.object},Ue={tag:"ol"},qe=function(e){var t=e.className,n=e.cssModule,r=e.tag,i=Q(e,["className","cssModule","tag"]),o=c(k()(t,"breadcrumb"),n);return S.a.createElement(r,Z({},i,{className:o}))};qe.propTypes=je,qe.defaultProps=Ue;var He={tag:T.a.oneOfType([T.a.func,T.a.string]),active:T.a.bool,className:T.a.string,cssModule:T.a.object},We={tag:"li"},Ve=function(e){var t=e.className,n=e.cssModule,r=e.active,i=e.tag,o=Q(e,["className","cssModule","active","tag"]),a=c(k()(t,!!r&&"active","breadcrumb-item"),n);return S.a.createElement(i,Z({},o,{className:a}))};Ve.propTypes=He,Ve.defaultProps=We;var Ge={active:T.a.bool,block:T.a.bool,color:T.a.string,disabled:T.a.bool,outline:T.a.bool,tag:T.a.oneOfType([T.a.func,T.a.string]),innerRef:T.a.oneOfType([T.a.func,T.a.string]),onClick:T.a.func,size:T.a.string,children:T.a.node,className:T.a.string,cssModule:T.a.object},$e={color:"secondary",tag:"button"},Ye=function(e){function t(e){Y(this,t);var n=ee(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.onClick=n.onClick.bind(n),n}return J(t,e),X(t,[{key:"onClick",value:function(e){if(this.props.disabled)return void e.preventDefault();this.props.onClick&&this.props.onClick(e)}},{key:"render",value:function(){var e=this.props,t=e.active,n=e.block,r=e.className,i=e.cssModule,o=e.color,a=e.outline,s=e.size,u=e.tag,l=e.innerRef,f=Q(e,["active","block","className","cssModule","color","outline","size","tag","innerRef"]),p=c(k()(r,"btn","btn"+(a?"-outline":"")+"-"+o,!!s&&"btn-"+s,!!n&&"btn-block",{active:t,disabled:this.props.disabled}),i);return f.href&&"button"===u&&(u="a"),S.a.createElement(u,Z({type:"button"===u&&f.onClick?"button":void 0},f,{className:p,ref:l,onClick:this.onClick}))}}]),t}(S.a.Component);Ye.propTypes=Ge,Ye.defaultProps=$e;var Xe={children:T.a.node},Ke=function(e){return S.a.createElement(De,Z({group:!0},e))};Ke.propTypes=Xe;var Ze={tag:T.a.oneOfType([T.a.func,T.a.string]),"aria-label":T.a.string,className:T.a.string,cssModule:T.a.object,role:T.a.string,size:T.a.string,vertical:T.a.bool},Je={tag:"div",role:"group"},Qe=function(e){var t=e.className,n=e.cssModule,r=e.size,i=e.vertical,o=e.tag,a=Q(e,["className","cssModule","size","vertical","tag"]),s=c(k()(t,!!r&&"btn-group-"+r,i?"btn-group-vertical":"btn-group"),n);return S.a.createElement(o,Z({},a,{className:s}))};Qe.propTypes=Ze,Qe.defaultProps=Je;var et={tag:T.a.oneOfType([T.a.func,T.a.string]),"aria-label":T.a.string,className:T.a.string,cssModule:T.a.object,role:T.a.string},tt={tag:"div",role:"toolbar"},nt=function(e){var t=e.className,n=e.cssModule,r=e.tag,i=Q(e,["className","cssModule","tag"]),o=c(k()(t,"btn-toolbar"),n);return S.a.createElement(r,Z({},i,{className:o}))};nt.propTypes=et,nt.defaultProps=tt;var rt={children:T.a.node,active:T.a.bool,disabled:T.a.bool,divider:T.a.bool,tag:T.a.oneOfType([T.a.func,T.a.string]),header:T.a.bool,onClick:T.a.func,className:T.a.string,cssModule:T.a.object,toggle:T.a.bool},it={toggle:T.a.func},ot={tag:"button",toggle:!0},at=function(e){function t(e){Y(this,t);var n=ee(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.onClick=n.onClick.bind(n),n.getTabIndex=n.getTabIndex.bind(n),n}return J(t,e),X(t,[{key:"onClick",value:function(e){if(this.props.disabled||this.props.header||this.props.divider)return void e.preventDefault();this.props.onClick&&this.props.onClick(e),this.props.toggle&&this.context.toggle(e)}},{key:"getTabIndex",value:function(){return this.props.disabled||this.props.header||this.props.divider?"-1":"0"}},{key:"render",value:function(){var e=this.getTabIndex(),t=l(this.props,["toggle"]),n=t.className,r=t.cssModule,i=t.divider,o=t.tag,a=t.header,s=t.active,u=Q(t,["className","cssModule","divider","tag","header","active"]),f=c(k()(n,{disabled:u.disabled,"dropdown-item":!i&&!a,active:s,"dropdown-header":a,"dropdown-divider":i}),r);return"button"===o&&(a?o="h6":i?o="div":u.href&&(o="a")),S.a.createElement(o,Z({type:"button"===o&&(u.onClick||this.props.toggle)?"button":void 0},u,{tabIndex:e,className:f,onClick:this.onClick}))}}]),t}(S.a.Component);at.propTypes=rt,at.defaultProps=ot,at.contextTypes=it;var st={tag:T.a.string,children:T.a.node.isRequired,right:T.a.bool,flip:T.a.bool,className:T.a.string,cssModule:T.a.object},ut={tag:"div",flip:!0},ct={isOpen:T.a.bool.isRequired,direction:T.a.oneOf(["up","down","left","right"]).isRequired,inNavbar:T.a.bool.isRequired},lt={flip:{enabled:!1}},ft={up:"top",left:"left",right:"right",down:"bottom"},pt=function(e,t){var n=e.className,r=e.cssModule,i=e.right,o=e.tag,a=e.flip,s=Q(e,["className","cssModule","right","tag","flip"]),u=c(k()(n,"dropdown-menu",{"dropdown-menu-right":i,show:t.isOpen}),r),l=o;if(t.isOpen&&!t.inNavbar){l=D.Popper;var f=ft[t.direction]||"bottom",p=i?"end":"start";s.placement=f+"-"+p,s.component=o,s.modifiers=a?void 0:lt}return S.a.createElement(l,Z({tabIndex:"-1",role:"menu"},s,{"aria-hidden":!t.isOpen,className:u}))};pt.propTypes=st,pt.defaultProps=ut,pt.contextTypes=ct;var ht={caret:T.a.bool,color:T.a.string,children:T.a.node,className:T.a.string,cssModule:T.a.object,disabled:T.a.bool,onClick:T.a.func,"aria-haspopup":T.a.bool,split:T.a.bool,tag:T.a.oneOfType([T.a.func,T.a.string]),nav:T.a.bool},dt={"aria-haspopup":!0,color:"secondary"},mt={isOpen:T.a.bool.isRequired,toggle:T.a.func.isRequired,inNavbar:T.a.bool.isRequired},gt=function(e){function t(e){Y(this,t);var n=ee(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.onClick=n.onClick.bind(n),n}return J(t,e),X(t,[{key:"onClick",value:function(e){if(this.props.disabled)return void e.preventDefault();this.props.nav&&!this.props.tag&&e.preventDefault(),this.props.onClick&&this.props.onClick(e),this.context.toggle(e)}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.color,r=e.cssModule,i=e.caret,o=e.split,a=e.nav,s=e.tag,u=Q(e,["className","color","cssModule","caret","split","nav","tag"]),l=u["aria-label"]||"Toggle Dropdown",f=c(k()(t,{"dropdown-toggle":i||o,"dropdown-toggle-split":o,"nav-link":a}),r),p=u.children||S.a.createElement("span",{className:"sr-only"},l),h=void 0;return a&&!s?(h="a",u.href="#"):s?h=s:(h=Ye,u.color=n,u.cssModule=r),this.context.inNavbar?S.a.createElement(h,Z({},u,{className:f,onClick:this.onClick,"aria-expanded":this.context.isOpen,children:p})):S.a.createElement(D.Target,Z({},u,{className:f,component:h,onClick:this.onClick,"aria-expanded":this.context.isOpen,children:p}))}}]),t}(S.a.Component);gt.propTypes=ht,gt.defaultProps=dt,gt.contextTypes=mt;var vt=v(function(e,t){function n(e){var t="transition"+e+"Timeout",n="transition"+e;return function(e){if(e[n]){if(null==e[t])return new Error(t+" wasn't supplied to CSSTransitionGroup: this can cause unreliable animations and won't be supported in a future version of React. See https://fb.me/react-animation-transition-group-timeout for more information.");if("number"!==typeof e[t])return new Error(t+" must be a number (in milliseconds)")}return null}}t.__esModule=!0,t.classNamesShape=t.timeoutsShape=void 0,t.transitionTimeout=n;var r=function(e){return e&&e.__esModule?e:{default:e}}(T.a);t.timeoutsShape=r.default.oneOfType([r.default.number,r.default.shape({enter:r.default.number,exit:r.default.number}).isRequired]),t.classNamesShape=r.default.oneOfType([r.default.string,r.default.shape({enter:r.default.string,exit:r.default.string,active:r.default.string}),r.default.shape({enter:r.default.string,enterActive:r.default.string,exit:r.default.string,exitActive:r.default.string})])});g(vt);var yt=v(function(e,t){function n(e){return e&&e.__esModule?e:{default:e}}function r(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==("undefined"===typeof t?"undefined":$(t))&&"function"!==typeof t?e:t}function a(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"===typeof t?"undefined":$(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(){}t.__esModule=!0,t.EXITING=t.ENTERED=t.ENTERING=t.EXITED=t.UNMOUNTED=void 0;var u=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(T.a),c=n(S.a),l=n(F.a),f=t.UNMOUNTED="unmounted",p=t.EXITED="exited",h=t.ENTERING="entering",d=t.ENTERED="entered",m=t.EXITING="exiting",g=function(e){function t(n,r){i(this,t);var a=o(this,e.call(this,n,r)),s=r.transitionGroup,u=s&&!s.isMounting?n.enter:n.appear,c=void 0;return a.nextStatus=null,n.in?u?(c=p,a.nextStatus=h):c=d:c=n.unmountOnExit||n.mountOnEnter?f:p,a.state={status:c},a.nextCallback=null,a}return a(t,e),t.prototype.getChildContext=function(){return{transitionGroup:null}},t.prototype.componentDidMount=function(){this.updateStatus(!0)},t.prototype.componentWillReceiveProps=function(e){var t=this.pendingState||this.state,n=t.status;e.in?(n===f&&this.setState({status:p}),n!==h&&n!==d&&(this.nextStatus=h)):n!==h&&n!==d||(this.nextStatus=m)},t.prototype.componentDidUpdate=function(){this.updateStatus()},t.prototype.componentWillUnmount=function(){this.cancelNextCallback()},t.prototype.getTimeouts=function(){var e=this.props.timeout,t=void 0,n=void 0,r=void 0;return t=n=r=e,null!=e&&"number"!==typeof e&&(t=e.exit,n=e.enter,r=e.appear),{exit:t,enter:n,appear:r}},t.prototype.updateStatus=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.nextStatus;if(null!==t){this.nextStatus=null,this.cancelNextCallback();var n=l.default.findDOMNode(this);t===h?this.performEnter(n,e):this.performExit(n)}else this.props.unmountOnExit&&this.state.status===p&&this.setState({status:f})},t.prototype.performEnter=function(e,t){var n=this,r=this.props.enter,i=this.context.transitionGroup?this.context.transitionGroup.isMounting:t,o=this.getTimeouts();if(!t&&!r)return void this.safeSetState({status:d},function(){n.props.onEntered(e)});this.props.onEnter(e,i),this.safeSetState({status:h},function(){n.props.onEntering(e,i),n.onTransitionEnd(e,o.enter,function(){n.safeSetState({status:d},function(){n.props.onEntered(e,i)})})})},t.prototype.performExit=function(e){var t=this,n=this.props.exit,r=this.getTimeouts();if(!n)return void this.safeSetState({status:p},function(){t.props.onExited(e)});this.props.onExit(e),this.safeSetState({status:m},function(){t.props.onExiting(e),t.onTransitionEnd(e,r.exit,function(){t.safeSetState({status:p},function(){t.props.onExited(e)})})})},t.prototype.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},t.prototype.safeSetState=function(e,t){var n=this;this.pendingState=e,t=this.setNextCallback(t),this.setState(e,function(){n.pendingState=null,t()})},t.prototype.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},t.prototype.onTransitionEnd=function(e,t,n){this.setNextCallback(n),e?(this.props.addEndListener&&this.props.addEndListener(e,this.nextCallback),null!=t&&setTimeout(this.nextCallback,t)):setTimeout(this.nextCallback,0)},t.prototype.render=function(){var e=this.state.status;if(e===f)return null;var t=this.props,n=t.children,i=r(t,["children"]);if(delete i.in,delete i.mountOnEnter,delete i.unmountOnExit,delete i.appear,delete i.enter,delete i.exit,delete i.timeout,delete i.addEndListener,delete i.onEnter,delete i.onEntering,delete i.onEntered,delete i.onExit,delete i.onExiting,delete i.onExited,"function"===typeof n)return n(e,i);var o=c.default.Children.only(n);return c.default.cloneElement(o,i)},t}(c.default.Component);g.contextTypes={transitionGroup:u.object},g.childContextTypes={transitionGroup:function(){}},g.propTypes={},g.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:s,onEntering:s,onEntered:s,onExit:s,onExiting:s,onExited:s},g.UNMOUNTED=0,g.EXITED=1,g.ENTERING=2,g.ENTERED=3,g.EXITING=4,t.default=g}),bt=g(yt),xt=Z({},bt.propTypes,{children:T.a.oneOfType([T.a.arrayOf(T.a.node),T.a.node]),tag:T.a.oneOfType([T.a.string,T.a.func]),baseClass:T.a.string,baseClassActive:T.a.string,className:T.a.string,cssModule:T.a.object}),wt=Z({},bt.defaultProps,{tag:"div",baseClass:"fade",baseClassActive:"show",timeout:q.Fade,appear:!0,enter:!0,exit:!0,in:!0});y.propTypes=xt,y.defaultProps=wt;var Nt={color:T.a.string,pill:T.a.bool,tag:T.a.oneOfType([T.a.func,T.a.string]),children:T.a.node,className:T.a.string,cssModule:T.a.object},Et={color:"secondary",pill:!1,tag:"span"},Ct=function(e){var t=e.className,n=e.cssModule,r=e.color,i=e.pill,o=e.tag,a=Q(e,["className","cssModule","color","pill","tag"]),s=c(k()(t,"badge","badge-"+r,!!i&&"badge-pill"),n);return a.href&&"span"===o&&(o="a"),S.a.createElement(o,Z({},a,{className:s}))};Ct.propTypes=Nt,Ct.defaultProps=Et;var St={tag:T.a.oneOfType([T.a.func,T.a.string]),inverse:T.a.bool,color:T.a.string,block:h(T.a.bool,'Please use the props "body"'),body:T.a.bool,outline:T.a.bool,className:T.a.string,cssModule:T.a.object},Mt={tag:"div"},Tt=function(e){var t=e.className,n=e.cssModule,r=e.color,i=e.block,o=e.body,a=e.inverse,s=e.outline,u=e.tag,l=Q(e,["className","cssModule","color","block","body","inverse","outline","tag"]),f=c(k()(t,"card",!!a&&"text-white",!(!i&&!o)&&"card-body",!!r&&(s?"border":"bg")+"-"+r),n);return S.a.createElement(u,Z({},l,{className:f}))};Tt.propTypes=St,Tt.defaultProps=Mt;var Ot={tag:T.a.oneOfType([T.a.func,T.a.string]),className:T.a.string,cssModule:T.a.object},kt={tag:"div"},At=function(e){var t=e.className,n=e.cssModule,r=e.tag,i=Q(e,["className","cssModule","tag"]),o=c(k()(t,"card-group"),n);return S.a.createElement(r,Z({},i,{className:o}))};At.propTypes=Ot,At.defaultProps=kt;var _t={tag:T.a.oneOfType([T.a.func,T.a.string]),className:T.a.string,cssModule:T.a.object},Pt={tag:"div"},Rt=function(e){var t=e.className,n=e.cssModule,r=e.tag,i=Q(e,["className","cssModule","tag"]),o=c(k()(t,"card-deck"),n);return S.a.createElement(r,Z({},i,{className:o}))};Rt.propTypes=_t,Rt.defaultProps=Pt;var It={tag:T.a.oneOfType([T.a.func,T.a.string]),className:T.a.string,cssModule:T.a.object},Ft={tag:"div"},Dt=function(e){var t=e.className,n=e.cssModule,r=e.tag,i=Q(e,["className","cssModule","tag"]),o=c(k()(t,"card-columns"),n);return S.a.createElement(r,Z({},i,{className:o}))};Dt.propTypes=It,Dt.defaultProps=Ft;var Lt={tag:T.a.oneOfType([T.a.func,T.a.string]),className:T.a.string,cssModule:T.a.object},Bt={tag:"div"},zt=function(e){var t=e.className,n=e.cssModule,r=e.tag,i=Q(e,["className","cssModule","tag"]),o=c(k()(t,"card-body"),n);return S.a.createElement(r,Z({},i,{className:o}))};zt.propTypes=Lt,zt.defaultProps=Bt;var jt={tag:T.a.oneOfType([T.a.func,T.a.string]),innerRef:T.a.oneOfType([T.a.func,T.a.string]),className:T.a.string,cssModule:T.a.object},Ut={tag:"a"},qt=function(e){var t=e.className,n=e.cssModule,r=e.tag,i=e.innerRef,o=Q(e,["className","cssModule","tag","innerRef"]),a=c(k()(t,"card-link"),n);return S.a.createElement(r,Z({},o,{ref:i,className:a}))};qt.propTypes=jt,qt.defaultProps=Ut;var Ht={tag:T.a.oneOfType([T.a.func,T.a.string]),className:T.a.string,cssModule:T.a.object},Wt={tag:"div"},Vt=function(e){var t=e.className,n=e.cssModule,r=e.tag,i=Q(e,["className","cssModule","tag"]),o=c(k()(t,"card-footer"),n);return S.a.createElement(r,Z({},i,{className:o}))};Vt.propTypes=Ht,Vt.defaultProps=Wt;var Gt={tag:T.a.oneOfType([T.a.func,T.a.string]),className:T.a.string,cssModule:T.a.object},$t={tag:"div"},Yt=function(e){var t=e.className,n=e.cssModule,r=e.tag,i=Q(e,["className","cssModule","tag"]),o=c(k()(t,"card-header"),n);return S.a.createElement(r,Z({},i,{className:o}))};Yt.propTypes=Gt,Yt.defaultProps=$t;var Xt={tag:T.a.oneOfType([T.a.func,T.a.string]),top:T.a.bool,bottom:T.a.bool,className:T.a.string,cssModule:T.a.object},Kt={tag:"img"},Zt=function(e){var t=e.className,n=e.cssModule,r=e.top,i=e.bottom,o=e.tag,a=Q(e,["className","cssModule","top","bottom","tag"]),s="card-img";r&&(s="card-img-top"),i&&(s="card-img-bottom");var u=c(k()(t,s),n);return S.a.createElement(o,Z({},a,{className:u}))};Zt.propTypes=Xt,Zt.defaultProps=Kt;var Jt={tag:T.a.oneOfType([T.a.func,T.a.string]),className:T.a.string,cssModule:T.a.object},Qt={tag:"div"},en=function(e){var t=e.className,n=e.cssModule,r=e.tag,i=Q(e,["className","cssModule","tag"]),o=c(k()(t,"card-img-overlay"),n);return S.a.createElement(r,Z({},i,{className:o}))};en.propTypes=Jt,en.defaultProps=Qt;var tn=function(e){function t(e){Y(this,t);var n=ee(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={startAnimation:!1},n.onEnter=n.onEnter.bind(n),n.onEntering=n.onEntering.bind(n),n.onExit=n.onExit.bind(n),n.onExiting=n.onExiting.bind(n),n.onExited=n.onExited.bind(n),n}return J(t,e),X(t,[{key:"onEnter",value:function(e,t){this.setState({startAnimation:!1}),this.props.onEnter(e,t)}},{key:"onEntering",value:function(e,t){var n=e.offsetHeight;return this.setState({startAnimation:!0}),this.props.onEntering(e,t),n}},{key:"onExit",value:function(e){this.setState({startAnimation:!1}),this.props.onExit(e)}},{key:"onExiting",value:function(e){this.setState({startAnimation:!0}),e.dispatchEvent(new CustomEvent("slide.bs.carousel")),this.props.onExiting(e)}},{key:"onExited",value:function(e){e.dispatchEvent(new CustomEvent("slid.bs.carousel")),this.props.onExited(e)}},{key:"render",value:function(){var e=this,t=this.props,n=t.in,r=t.children,i=t.cssModule,o=t.slide,a=t.tag,s=t.className,u=Q(t,["in","children","cssModule","slide","tag","className"]);return S.a.createElement(bt,Z({},u,{enter:o,exit:o,in:n,onEnter:this.onEnter,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}),function(t){var n=e.context.direction,o=t===W.ENTERED||t===W.EXITING,u=(t===W.ENTERING||t===W.EXITING)&&e.state.startAnimation&&("right"===n?"carousel-item-left":"carousel-item-right"),l=t===W.ENTERING&&("right"===n?"carousel-item-next":"carousel-item-prev"),f=c(k()(s,"carousel-item",o&&"active",u,l),i);return S.a.createElement(a,{className:f},r)})}}]),t}(S.a.Component);tn.propTypes=Z({},bt.propTypes,{tag:T.a.oneOfType([T.a.func,T.a.string]),in:T.a.bool,cssModule:T.a.object,children:T.a.node,slide:T.a.bool,className:T.a.string}),tn.defaultProps=Z({},bt.defaultProps,{tag:"div",timeout:q.Carousel,slide:!0}),tn.contextTypes={direction:T.a.string};var nn=function(e){function t(e){Y(this,t);var n=ee(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.handleKeyPress=n.handleKeyPress.bind(n),n.renderItems=n.renderItems.bind(n),n.hoverStart=n.hoverStart.bind(n),n.hoverEnd=n.hoverEnd.bind(n),n.state={direction:"right"},n}return J(t,e),X(t,[{key:"getChildContext",value:function(){return{direction:this.state.direction}}},{key:"componentDidMount",value:function(){"carousel"===this.props.ride&&this.setInterval(),document.addEventListener("keyup",this.handleKeyPress)}},{key:"componentWillReceiveProps",value:function(e){this.setInterval(e),this.props.activeIndex+1===e.activeIndex?this.setState({direction:"right"}):this.props.activeIndex-1===e.activeIndex?this.setState({direction:"left"}):this.props.activeIndex>e.activeIndex?this.setState({direction:"right"}):this.props.activeIndex!==e.activeIndex&&this.setState({direction:"left"})}},{key:"componentWillUnmount",value:function(){this.clearInterval(),document.removeEventListener("keyup",this.handleKeyPress)}},{key:"setInterval",value:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props;this.clearInterval(),e.interval&&(this.cycleInterval=setInterval(function(){e.next()},parseInt(e.interval,10)))})},{key:"clearInterval",value:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(){clearInterval(this.cycleInterval)})},{key:"hoverStart",value:function(){if("hover"===this.props.pause&&this.clearInterval(),this.props.mouseEnter){var e;(e=this.props).mouseEnter.apply(e,arguments)}}},{key:"hoverEnd",value:function(){if("hover"===this.props.pause&&this.setInterval(),this.props.mouseLeave){var e;(e=this.props).mouseLeave.apply(e,arguments)}}},{key:"handleKeyPress",value:function(e){this.props.keyboard&&(37===e.keyCode?this.props.previous():39===e.keyCode&&this.props.next())}},{key:"renderItems",value:function(e,t){var n=this,r=this.props.slide;return S.a.createElement("div",{role:"listbox",className:t},e.map(function(e,t){var i=t===n.props.activeIndex;return S.a.cloneElement(e,{in:i,slide:r})}))}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.cssModule,r=e.slide,i=e.className,o=c(k()(i,"carousel",r&&"slide"),n),a=c(k()("carousel-inner"),n);if(t.every(function(e){return e.type===tn}))return S.a.createElement("div",{className:o,onMouseEnter:this.hoverStart,onMouseLeave:this.hoverEnd},this.renderItems(t,a));if(t[0]instanceof Array){var s=t[0],u=t[1],l=t[2];return S.a.createElement("div",{className:o,onMouseEnter:this.hoverStart,onMouseLeave:this.hoverEnd},this.renderItems(s,a),u,l)}var f=t[0],p=t[1],h=t[2],d=t[3];return S.a.createElement("div",{className:o,onMouseEnter:this.hoverStart,onMouseLeave:this.hoverEnd},f,this.renderItems(p,a),h,d)}}]),t}(S.a.Component);nn.propTypes={activeIndex:T.a.number,next:T.a.func.isRequired,previous:T.a.func.isRequired,keyboard:T.a.bool,pause:T.a.oneOf(["hover",!1]),ride:T.a.oneOf(["carousel"]),interval:T.a.oneOfType([T.a.number,T.a.string,T.a.bool]),children:T.a.array,mouseEnter:T.a.func,mouseLeave:T.a.func,slide:T.a.bool,cssModule:T.a.object,className:T.a.string},nn.defaultProps={interval:5e3,pause:"hover",keyboard:!0,slide:!0},nn.childContextTypes={direction:T.a.string};var rn=function(e){var t=e.direction,n=e.onClickHandler,r=e.cssModule,i=e.directionText,o=e.className,a=c(k()(o,"carousel-control-"+t),r),s=c(k()("carousel-control-"+t+"-icon"),r),u=c(k()("sr-only"),r);return S.a.createElement("a",{className:a,role:"button",tabIndex:"0",onClick:function(e){e.preventDefault(),n()}},S.a.createElement("span",{className:s,"aria-hidden":"true"}),S.a.createElement("span",{className:u},i||t))};rn.propTypes={direction:T.a.oneOf(["prev","next"]).isRequired,onClickHandler:T.a.func.isRequired,cssModule:T.a.object,directionText:T.a.string,className:T.a.string};var on=function(e){var t=e.items,n=e.activeIndex,r=e.cssModule,i=e.onClickHandler,o=e.className,a=c(k()(o,"carousel-indicators"),r),s=t.map(function(e,t){var o=c(k()({active:n===t}),r);return S.a.createElement("li",{key:""+(e.key||e.src)+e.caption+e.altText,onClick:function(e){e.preventDefault(),i(t)},className:o})});return S.a.createElement("ol",{className:a},s)};on.propTypes={items:T.a.array.isRequired,activeIndex:T.a.number.isRequired,cssModule:T.a.object,onClickHandler:T.a.func.isRequired,className:T.a.string};var an=function(e){var t=e.captionHeader,n=e.captionText,r=e.cssModule,i=e.className,o=c(k()(i,"carousel-caption","d-none","d-md-block"),r);return S.a.createElement("div",{className:o},S.a.createElement("h3",null,t),S.a.createElement("p",null,n))};an.propTypes={captionHeader:T.a.string,captionText:T.a.string.isRequired,cssModule:T.a.object,className:T.a.string};var sn={items:T.a.array.isRequired,indicators:T.a.bool,controls:T.a.bool,autoPlay:T.a.bool,activeIndex:T.a.number,next:T.a.func,previous:T.a.func,goToIndex:T.a.func},un=function(e){function t(e){Y(this,t);var n=ee(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.animating=!1,n.state={activeIndex:0},n.next=n.next.bind(n),n.previous=n.previous.bind(n),n.goToIndex=n.goToIndex.bind(n),n.onExiting=n.onExiting.bind(n),n.onExited=n.onExited.bind(n),n}return J(t,e),X(t,[{key:"onExiting",value:function(){this.animating=!0}},{key:"onExited",value:function(){this.animating=!1}},{key:"next",value:function(){if(!this.animating){var e=this.state.activeIndex===this.props.items.length-1?0:this.state.activeIndex+1;this.setState({activeIndex:e})}}},{key:"previous",value:function(){if(!this.animating){var e=0===this.state.activeIndex?this.props.items.length-1:this.state.activeIndex-1;this.setState({activeIndex:e})}}},{key:"goToIndex",value:function(e){this.animating||this.setState({activeIndex:e})}},{key:"render",value:function(){var e=this,t=this.props,n=t.autoPlay,r=t.indicators,i=t.controls,o=t.items,a=t.goToIndex,s=Q(t,["autoPlay","indicators","controls","items","goToIndex"]),u=this.state.activeIndex,c=o.map(function(t){return S.a.createElement(tn,{onExiting:e.onExiting,onExited:e.onExited,key:t.src},S.a.createElement("img",{src:t.src,alt:t.altText}),S.a.createElement(an,{captionText:t.caption,captionHeader:t.caption}))});return S.a.createElement(nn,Z({activeIndex:u,next:this.next,previous:this.previous,ride:n?"carousel":void 0},s),r&&S.a.createElement(on,{items:o,activeIndex:s.activeIndex||u,onClickHandler:a||this.goToIndex}),c,i&&S.a.createElement(rn,{direction:"prev",directionText:"Previous",onClickHandler:s.previous||this.previous}),i&&S.a.createElement(rn,{direction:"next",directionText:"Next",onClickHandler:s.next||this.next}))}}]),t}(C.Component);un.propTypes=sn,un.defaultProps={controls:!0,indicators:!0,autoPlay:!0};var cn={tag:T.a.oneOfType([T.a.func,T.a.string]),className:T.a.string,cssModule:T.a.object},ln={tag:"h6"},fn=function(e){var t=e.className,n=e.cssModule,r=e.tag,i=Q(e,["className","cssModule","tag"]),o=c(k()(t,"card-subtitle"),n);return S.a.createElement(r,Z({},i,{className:o}))};fn.propTypes=cn,fn.defaultProps=ln;var pn={tag:T.a.oneOfType([T.a.func,T.a.string]),className:T.a.string,cssModule:T.a.object},hn={tag:"p"},dn=function(e){var t=e.className,n=e.cssModule,r=e.tag,i=Q(e,["className","cssModule","tag"]),o=c(k()(t,"card-text"),n);return S.a.createElement(r,Z({},i,{className:o}))};dn.propTypes=pn,dn.defaultProps=hn;var mn={tag:T.a.oneOfType([T.a.func,T.a.string]),className:T.a.string,cssModule:T.a.object},gn={tag:"h5"},vn=function(e){var t=e.className,n=e.cssModule,r=e.tag,i=Q(e,["className","cssModule","tag"]),o=c(k()(t,"card-title"),n);return S.a.createElement(r,Z({},i,{className:o}))};vn.propTypes=mn,vn.defaultProps=gn;var yn={children:T.a.node.isRequired,className:T.a.string,placement:T.a.string,placementPrefix:T.a.string,hideArrow:T.a.bool,tag:T.a.string,isOpen:T.a.bool.isRequired,cssModule:T.a.object,offset:T.a.oneOfType([T.a.string,T.a.number]),fallbackPlacement:T.a.oneOfType([T.a.string,T.a.array]),flip:T.a.bool,container:T.a.oneOfType([T.a.string,T.a.func,d]),target:T.a.oneOfType([T.a.string,T.a.func,d]).isRequired,modifiers:T.a.object},bn={placement:"auto",hideArrow:!1,isOpen:!1,offset:0,fallbackPlacement:"flip",flip:!0,container:"body",modifiers:{}},xn={popperManager:T.a.object.isRequired},wn=function(e){function t(e){Y(this,t);var n=ee(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.handlePlacementChange=n.handlePlacementChange.bind(n),n.setTargetNode=n.setTargetNode.bind(n),n.getTargetNode=n.getTargetNode.bind(n),n.state={},n}return J(t,e),X(t,[{key:"getChildContext",value:function(){return{popperManager:{setTargetNode:this.setTargetNode,getTargetNode:this.getTargetNode}}}},{key:"componentDidMount",value:function(){this.handleProps()}},{key:"componentDidUpdate",value:function(e){this.props.isOpen!==e.isOpen?this.handleProps():this._element&&this.renderIntoSubtree()}},{key:"componentWillUnmount",value:function(){this.hide()}},{key:"setTargetNode",value:function(e){this.targetNode=e}},{key:"getTargetNode",value:function(){return this.targetNode}},{key:"getContainerNode",value:function(){return m(this.props.container)}},{key:"handlePlacementChange",value:function(e){return this.state.placement!==e.placement&&this.setState({placement:e.placement}),e}},{key:"handleProps",value:function(){"inline"!==this.props.container&&(this.props.isOpen?this.show():this.hide())}},{key:"hide",value:function(){this._element&&(this.getContainerNode().removeChild(this._element),F.a.unmountComponentAtNode(this._element),this._element=null)}},{key:"show",value:function(){this._element=document.createElement("div"),this.getContainerNode().appendChild(this._element),this.renderIntoSubtree(),this._element.childNodes&&this._element.childNodes[0]&&this._element.childNodes[0].focus&&this._element.childNodes[0].focus()}},{key:"renderIntoSubtree",value:function(){F.a.unstable_renderSubtreeIntoContainer(this,this.renderChildren(),this._element)}},{key:"renderChildren",value:function(){var e=this.props,t=e.cssModule,n=e.children,r=(e.isOpen,e.flip),i=(e.target,e.offset),o=e.fallbackPlacement,a=e.placementPrefix,s=e.hideArrow,u=e.className,l=e.tag,f=(e.container,e.modifiers),p=Q(e,["cssModule","children","isOpen","flip","target","offset","fallbackPlacement","placementPrefix","hideArrow","className","tag","container","modifiers"]),h=c("arrow",t),d=(this.state.placement||p.placement).split("-")[0],m=c(k()(u,a?a+"-"+d:d),this.props.cssModule),g=Z({offset:{offset:i},flip:{enabled:r,behavior:o},update:{enabled:!0,order:950,fn:this.handlePlacementChange}},f);return S.a.createElement(D.Popper,Z({modifiers:g},p,{component:l,className:m}),n,!s&&S.a.createElement(D.Arrow,{className:h}))}},{key:"render",value:function(){return this.setTargetNode(m(this.props.target)),"inline"===this.props.container&&this.props.isOpen?this.renderChildren():null}}]),t}(S.a.Component);wn.propTypes=yn,wn.defaultProps=bn,wn.childContextTypes=xn;var Nn=function(e,t){return t.popperManager.setTargetNode(m(e.target)),null};Nn.contextTypes={popperManager:T.a.object.isRequired},Nn.propTypes={target:T.a.oneOfType([T.a.string,T.a.func,d]).isRequired};var En={placement:T.a.oneOf(G),target:T.a.oneOfType([T.a.string,T.a.func,d]).isRequired,container:T.a.oneOfType([T.a.string,T.a.func,d]),isOpen:T.a.bool,disabled:T.a.bool,hideArrow:T.a.bool,className:T.a.string,innerClassName:T.a.string,placementPrefix:T.a.string,cssModule:T.a.object,toggle:T.a.func,delay:T.a.oneOfType([T.a.shape({show:T.a.number,hide:T.a.number}),T.a.number]),modifiers:T.a.object},Cn={show:0,hide:0},Sn={isOpen:!1,hideArrow:!1,placement:"right",placementPrefix:"bs-popover",delay:Cn,toggle:function(){}},Mn=function(e){function t(e){Y(this,t);var n=ee(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.addTargetEvents=n.addTargetEvents.bind(n),n.handleDocumentClick=n.handleDocumentClick.bind(n),n.removeTargetEvents=n.removeTargetEvents.bind(n),n.getRef=n.getRef.bind(n),n.toggle=n.toggle.bind(n),n.show=n.show.bind(n),n.hide=n.hide.bind(n),n}return J(t,e),X(t,[{key:"componentDidMount",value:function(){this._target=m(this.props.target),this.handleProps()}},{key:"componentDidUpdate",value:function(){this.handleProps()}},{key:"componentWillUnmount",value:function(){this.clearShowTimeout(),this.clearHideTimeout(),this.removeTargetEvents()}},{key:"getRef",value:function(e){this._popover=e}},{key:"getDelay",value:function(e){var t=this.props.delay;return"object"===("undefined"===typeof t?"undefined":$(t))?isNaN(t[e])?Cn[e]:t[e]:t}},{key:"handleProps",value:function(){this.props.isOpen?this.show():this.hide()}},{key:"show",value:function(){this.clearHideTimeout(),this.addTargetEvents(),this.props.isOpen||(this.clearShowTimeout(),this._showTimeout=setTimeout(this.toggle,this.getDelay("show")))}},{key:"hide",value:function(){this.clearShowTimeout(),this.removeTargetEvents(),this.props.isOpen&&(this.clearHideTimeout(),this._hideTimeout=setTimeout(this.toggle,this.getDelay("hide")))}},{key:"clearShowTimeout",value:function(){clearTimeout(this._showTimeout),this._showTimeout=void 0}},{key:"clearHideTimeout",value:function(){clearTimeout(this._hideTimeout),this._hideTimeout=void 0}},{key:"handleDocumentClick",value:function(e){e.target===this._target||this._target.contains(e.target)||e.target===this._popover||this._popover&&this._popover.contains(e.target)||(this._hideTimeout&&this.clearHideTimeout(),this.props.isOpen&&this.toggle(e))}},{key:"addTargetEvents",value:function(){var e=this;["click","touchstart"].forEach(function(t){return document.addEventListener(t,e.handleDocumentClick,!0)})}},{key:"removeTargetEvents",value:function(){var e=this;["click","touchstart"].forEach(function(t){return document.removeEventListener(t,e.handleDocumentClick,!0)})}},{key:"toggle",value:function(e){return this.props.disabled?e&&e.preventDefault():this.props.toggle(e)}},{key:"render",value:function(){if(!this.props.isOpen)return null;var e=l(this.props,Object.keys(En)),t=c(k()("popover-inner",this.props.innerClassName),this.props.cssModule),n=c(k()("popover","show",this.props.className),this.props.cssModule);return S.a.createElement(wn,{className:n,target:this.props.target,isOpen:this.props.isOpen,hideArrow:this.props.hideArrow,placement:this.props.placement,placementPrefix:this.props.placementPrefix,container:this.props.container,modifiers:this.props.modifiers},S.a.createElement("div",Z({},e,{className:t,ref:this.getRef})))}}]),t}(S.a.Component);Mn.propTypes=En,Mn.defaultProps=Sn;var Tn={tag:T.a.oneOfType([T.a.func,T.a.string]),className:T.a.string,cssModule:T.a.object},On={tag:"h3"},kn=function(e){var t=e.className,n=e.cssModule,r=e.tag,i=Q(e,["className","cssModule","tag"]),o=c(k()(t,"popover-header"),n);return S.a.createElement(r,Z({},i,{className:o}))};kn.propTypes=Tn,kn.defaultProps=On;var An={tag:T.a.oneOfType([T.a.func,T.a.string]),className:T.a.string,cssModule:T.a.object},_n={tag:"div"},Pn=function(e){var t=e.className,n=e.cssModule,r=e.tag,i=Q(e,["className","cssModule","tag"]),o=c(k()(t,"popover-body"),n);return S.a.createElement(r,Z({},i,{className:o}))};Pn.propTypes=An,Pn.defaultProps=_n;var Rn={children:T.a.node,bar:T.a.bool,multi:T.a.bool,tag:T.a.string,value:T.a.oneOfType([T.a.string,T.a.number]),max:T.a.oneOfType([T.a.string,T.a.number]),animated:T.a.bool,striped:T.a.bool,color:T.a.string,className:T.a.string,barClassName:T.a.string,cssModule:T.a.object},In={tag:"div",value:0,max:100},Fn=function(e){var t=e.children,n=e.className,r=e.barClassName,i=e.cssModule,o=e.value,a=e.max,s=e.animated,u=e.striped,l=e.color,f=e.bar,p=e.multi,h=e.tag,d=Q(e,["children","className","barClassName","cssModule","value","max","animated","striped","color","bar","multi","tag"]),m=B()(o)/B()(a)*100,g=c(k()(n,"progress"),i),v=c(k()("progress-bar",f?n||r:r,s?"progress-bar-animated":null,l?"bg-"+l:null,u||s?"progress-bar-striped":null),i),y=p?t:S.a.createElement("div",{className:v,style:{width:m+"%"},role:"progressbar","aria-valuenow":o,"aria-valuemin":"0","aria-valuemax":a,children:t});return f?y:S.a.createElement(h,Z({},d,{className:g,children:y}))};Fn.propTypes=Rn,Fn.defaultProps=In;var Dn=T.a.shape(y.propTypes),Ln={isOpen:T.a.bool,autoFocus:T.a.bool,centered:T.a.bool,size:T.a.string,toggle:T.a.func,keyboard:T.a.bool,role:T.a.string,labelledBy:T.a.string,backdrop:T.a.oneOfType([T.a.bool,T.a.oneOf(["static"])]),onEnter:T.a.func,onExit:T.a.func,onOpened:T.a.func,onClosed:T.a.func,children:T.a.node,className:T.a.string,wrapClassName:T.a.string,modalClassName:T.a.string,backdropClassName:T.a.string,contentClassName:T.a.string,external:T.a.node,fade:T.a.bool,cssModule:T.a.object,zIndex:T.a.oneOfType([T.a.number,T.a.string]),backdropTransition:Dn,modalTransition:Dn},Bn=Object.keys(Ln),zn={isOpen:!1,autoFocus:!0,centered:!1,role:"dialog",backdrop:!0,keyboard:!0,zIndex:1050,fade:!0,onOpened:b,onClosed:b,modalTransition:{timeout:q.Modal},backdropTransition:{mountOnEnter:!0,timeout:q.Fade}},jn=function(e){function t(e){Y(this,t);var n=ee(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n._element=null,n._originalBodyPadding=null,n.handleBackdropClick=n.handleBackdropClick.bind(n),n.handleEscape=n.handleEscape.bind(n),n.onOpened=n.onOpened.bind(n),n.onClosed=n.onClosed.bind(n),n.state={isOpen:e.isOpen},e.isOpen&&n.init(),n}return J(t,e),X(t,[{key:"componentDidMount",value:function(){this.props.onEnter&&this.props.onEnter(),this.state.isOpen&&this.props.autoFocus&&this.setFocus(),this._isMounted=!0}},{key:"componentWillReceiveProps",value:function(e){e.isOpen&&!this.props.isOpen&&this.setState({isOpen:e.isOpen})}},{key:"componentWillUpdate",value:function(e,t){t.isOpen&&!this.state.isOpen&&this.init()}},{key:"componentDidUpdate",value:function(e,t){this.props.autoFocus&&this.state.isOpen&&!t.isOpen&&this.setFocus()}},{key:"componentWillUnmount",value:function(){this.props.onExit&&this.props.onExit(),this.state.isOpen&&this.destroy(),this._isMounted=!1}},{key:"onOpened",value:function(e,t){this.props.onOpened(),(this.props.modalTransition.onEntered||b)(e,t)}},{key:"onClosed",value:function(e){this.props.onClosed(),(this.props.modalTransition.onExited||b)(e),this.destroy(),this._isMounted&&this.setState({isOpen:!1})}},{key:"setFocus",value:function(){this._dialog&&this._dialog.parentNode&&"function"===typeof this._dialog.parentNode.focus&&this._dialog.parentNode.focus()}},{key:"handleBackdropClick",value:function(e){if(e.stopPropagation(),this.props.isOpen&&!0===this.props.backdrop){var t=this._dialog;e.target&&!t.contains(e.target)&&this.props.toggle&&this.props.toggle(e)}}},{key:"handleEscape",value:function(e){this.props.isOpen&&this.props.keyboard&&27===e.keyCode&&this.props.toggle&&this.props.toggle(e)}},{key:"init",value:function(){this._element=document.createElement("div"),this._element.setAttribute("tabindex","-1"),this._element.style.position="relative",this._element.style.zIndex=this.props.zIndex,this._originalBodyPadding=a(),s(),document.body.appendChild(this._element),document.body.className=k()(document.body.className,c("modal-open",this.props.cssModule))}},{key:"destroy",value:function(){document.body.removeChild(this._element),this._element=null;var e=c("modal-open",this.props.cssModule),t=new RegExp("(^| )"+e+"( |$)");document.body.className=document.body.className.replace(t," ").trim(),i(this._originalBodyPadding)}},{key:"renderModalDialog",value:function(){var e,t=this,n=l(this.props,Bn);return S.a.createElement("div",Z({},n,{className:c(k()("modal-dialog",this.props.className,(e={},K(e,"modal-"+this.props.size,this.props.size),K(e,"modal-dialog-centered",this.props.centered),e)),this.props.cssModule),role:"document",ref:function(e){t._dialog=e}}),S.a.createElement("div",{className:c(k()("modal-content",this.props.contentClassName),this.props.cssModule)},this.props.children))}},{key:"render",value:function(){if(this.state.isOpen){var e=this.props,t=e.wrapClassName,n=e.modalClassName,r=e.backdropClassName,i=e.cssModule,o=e.isOpen,a=e.backdrop,s=e.role,u=e.labelledBy,l=e.external,f={onClick:this.handleBackdropClick,onKeyUp:this.handleEscape,style:{display:"block"},"aria-labelledby":u,role:s,tabIndex:"-1"},p=this.props.fade,h=Z({},y.defaultProps,this.props.modalTransition,{baseClass:p?this.props.modalTransition.baseClass:"",timeout:p?this.props.modalTransition.timeout:0}),d=Z({},y.defaultProps,this.props.backdropTransition,{baseClass:p?this.props.backdropTransition.baseClass:"",timeout:p?this.props.backdropTransition.timeout:0});return S.a.createElement(z.a,{node:this._element},S.a.createElement("div",{className:c(t)},S.a.createElement(y,Z({},f,h,{in:o,onEntered:this.onOpened,onExited:this.onClosed,cssModule:i,className:c(k()("modal",n),i)}),l,this.renderModalDialog()),S.a.createElement(y,Z({},d,{in:o&&!!a,cssModule:i,className:c(k()("modal-backdrop",r),i)}))))}return null}}]),t}(S.a.Component);jn.propTypes=Ln,jn.defaultProps=zn;var Un={tag:T.a.oneOfType([T.a.func,T.a.string]),wrapTag:T.a.oneOfType([T.a.func,T.a.string]),toggle:T.a.func,className:T.a.string,cssModule:T.a.object,children:T.a.node,closeAriaLabel:T.a.string},qn={tag:"h5",wrapTag:"div",closeAriaLabel:"Close"},Hn=function(e){var t=void 0,n=e.className,r=e.cssModule,i=e.children,o=e.toggle,a=e.tag,s=e.wrapTag,u=e.closeAriaLabel,l=Q(e,["className","cssModule","children","toggle","tag","wrapTag","closeAriaLabel"]),f=c(k()(n,"modal-header"),r);return o&&(t=S.a.createElement("button",{type:"button",onClick:o,className:c("close",r),"aria-label":u},S.a.createElement("span",{"aria-hidden":"true"},String.fromCharCode(215)))),S.a.createElement(s,Z({},l,{className:f}),S.a.createElement(a,{className:c("modal-title",r)},i),t)};Hn.propTypes=Un,Hn.defaultProps=qn;var Wn={tag:T.a.oneOfType([T.a.func,T.a.string]),className:T.a.string,cssModule:T.a.object},Vn={tag:"div"},Gn=function(e){var t=e.className,n=e.cssModule,r=e.tag,i=Q(e,["className","cssModule","tag"]),o=c(k()(t,"modal-body"),n);return S.a.createElement(r,Z({},i,{className:o}))};Gn.propTypes=Wn,Gn.defaultProps=Vn;var $n={tag:T.a.oneOfType([T.a.func,T.a.string]),className:T.a.string,cssModule:T.a.object},Yn={tag:"div"},Xn=function(e){var t=e.className,n=e.cssModule,r=e.tag,i=Q(e,["className","cssModule","tag"]),o=c(k()(t,"modal-footer"),n);return S.a.createElement(r,Z({},i,{className:o}))};Xn.propTypes=$n,Xn.defaultProps=Yn;var Kn={placement:T.a.oneOf(G),target:T.a.oneOfType([T.a.string,T.a.func,d]).isRequired,container:T.a.oneOfType([T.a.string,T.a.func,d]),isOpen:T.a.bool,disabled:T.a.bool,hideArrow:T.a.bool,className:T.a.string,innerClassName:T.a.string,cssModule:T.a.object,toggle:T.a.func,autohide:T.a.bool,placementPrefix:T.a.string,delay:T.a.oneOfType([T.a.shape({show:T.a.number,hide:T.a.number}),T.a.number]),modifiers:T.a.object},Zn={show:0,hide:250},Jn={isOpen:!1,hideArrow:!1,placement:"top",placementPrefix:"bs-tooltip",delay:Zn,autohide:!0,toggle:function(){}},Qn=function(e){function t(e){Y(this,t);var n=ee(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.addTargetEvents=n.addTargetEvents.bind(n),n.handleDocumentClick=n.handleDocumentClick.bind(n),n.removeTargetEvents=n.removeTargetEvents.bind(n),n.toggle=n.toggle.bind(n),n.onMouseOverTooltip=n.onMouseOverTooltip.bind(n),n.onMouseLeaveTooltip=n.onMouseLeaveTooltip.bind(n),n.onMouseOverTooltipContent=n.onMouseOverTooltipContent.bind(n),n.onMouseLeaveTooltipContent=n.onMouseLeaveTooltipContent.bind(n),n.show=n.show.bind(n),n.hide=n.hide.bind(n),n}return J(t,e),X(t,[{key:"componentDidMount",value:function(){this._target=m(this.props.target),this.addTargetEvents()}},{key:"componentWillUnmount",value:function(){this.removeTargetEvents()}},{key:"onMouseOverTooltip",value:function(){this._hideTimeout&&this.clearHideTimeout(),this._showTimeout=setTimeout(this.show,this.getDelay("show"))}},{key:"onMouseLeaveTooltip",value:function(){this._showTimeout&&this.clearShowTimeout(),this._hideTimeout=setTimeout(this.hide,this.getDelay("hide"))}},{key:"onMouseOverTooltipContent",value:function(){this.props.autohide||this._hideTimeout&&this.clearHideTimeout()}},{key:"onMouseLeaveTooltipContent",value:function(){this.props.autohide||(this._showTimeout&&this.clearShowTimeout(),this._hideTimeout=setTimeout(this.hide,this.getDelay("hide")))}},{key:"getDelay",value:function(e){var t=this.props.delay;return"object"===("undefined"===typeof t?"undefined":$(t))?isNaN(t[e])?Zn[e]:t[e]:t}},{key:"show",value:function(){this.props.isOpen||(this.clearShowTimeout(),this.toggle())}},{key:"hide",value:function(){this.props.isOpen&&(this.clearHideTimeout(),this.toggle())}},{key:"clearShowTimeout",value:function(){clearTimeout(this._showTimeout),this._showTimeout=void 0}},{key:"clearHideTimeout",value:function(){clearTimeout(this._hideTimeout),this._hideTimeout=void 0}},{key:"handleDocumentClick",value:function(e){(e.target===this._target||this._target.contains(e.target))&&(this._hideTimeout&&this.clearHideTimeout(),this.props.isOpen||this.toggle())}},{key:"addTargetEvents",value:function(){var e=this;this._target.addEventListener("mouseover",this.onMouseOverTooltip,!0),this._target.addEventListener("mouseout",this.onMouseLeaveTooltip,!0),["click","touchstart"].forEach(function(t){return document.addEventListener(t,e.handleDocumentClick,!0)})}},{key:"removeTargetEvents",value:function(){var e=this;this._target.removeEventListener("mouseover",this.onMouseOverTooltip,!0),this._target.removeEventListener("mouseout",this.onMouseLeaveTooltip,!0),["click","touchstart"].forEach(function(t){return document.removeEventListener(t,e.handleDocumentClick,!0)})}},{key:"toggle",value:function(e){return this.props.disabled?e&&e.preventDefault():this.props.toggle()}},{key:"render",value:function(){if(!this.props.isOpen)return null;var e=l(this.props,Object.keys(Kn)),t=c(k()("tooltip-inner",this.props.innerClassName),this.props.cssModule),n=c(k()("tooltip","show",this.props.className),this.props.cssModule);return S.a.createElement(wn,{className:n,target:this.props.target,isOpen:this.props.isOpen,hideArrow:this.props.hideArrow,placement:this.props.placement,placementPrefix:this.props.placementPrefix,container:this.props.container,modifiers:this.props.modifiers},S.a.createElement("div",Z({},e,{className:t,onMouseOver:this.onMouseOverTooltipContent,onMouseLeave:this.onMouseLeaveTooltipContent})))}}]),t}(S.a.Component);Qn.propTypes=Kn,Qn.defaultProps=Jn;var er={className:T.a.string,cssModule:T.a.object,size:T.a.string,bordered:T.a.bool,striped:T.a.bool,inverse:h(T.a.bool,'Please use the prop "dark"'),dark:T.a.bool,hover:T.a.bool,responsive:T.a.oneOfType([T.a.bool,T.a.string]),tag:T.a.oneOfType([T.a.func,T.a.string]),responsiveTag:T.a.oneOfType([T.a.func,T.a.string])},tr={tag:"table",responsiveTag:"div"},nr=function(e){var t=e.className,n=e.cssModule,r=e.size,i=e.bordered,o=e.striped,a=e.inverse,s=e.dark,u=e.hover,l=e.responsive,f=e.tag,p=e.responsiveTag,h=Q(e,["className","cssModule","size","bordered","striped","inverse","dark","hover","responsive","tag","responsiveTag"]),d=c(k()(t,"table",!!r&&"table-"+r,!!i&&"table-bordered",!!o&&"table-striped",!(!s&&!a)&&"table-dark",!!u&&"table-hover"),n),m=S.a.createElement(f,Z({},h,{className:d}));if(l){var g=!0===l?"table-responsive":"table-responsive-"+l;return S.a.createElement(p,{className:g},m)}return m};nr.propTypes=er,nr.defaultProps=tr;var rr={tag:T.a.oneOfType([T.a.func,T.a.string]),flush:T.a.bool,className:T.a.string,cssModule:T.a.object},ir={tag:"ul"},or=function(e){var t=e.className,n=e.cssModule,r=e.tag,i=e.flush,o=Q(e,["className","cssModule","tag","flush"]),a=c(k()(t,"list-group",!!i&&"list-group-flush"),n);return S.a.createElement(r,Z({},o,{className:a}))};or.propTypes=rr,or.defaultProps=ir;var ar={children:T.a.node,inline:T.a.bool,tag:T.a.oneOfType([T.a.func,T.a.string]),innerRef:T.a.oneOfType([T.a.func,T.a.string]),className:T.a.string,cssModule:T.a.object},sr={tag:"form"},ur=function(e){var t=e.className,n=e.cssModule,r=e.inline,i=e.tag,o=e.innerRef,a=Q(e,["className","cssModule","inline","tag","innerRef"]),s=c(k()(t,!!r&&"form-inline"),n);return S.a.createElement(i,Z({},a,{ref:o,className:s}))};ur.propTypes=ar,ur.defaultProps=sr;var cr={children:T.a.node,tag:T.a.string,className:T.a.string,cssModule:T.a.object,valid:T.a.bool},lr={tag:"div",valid:void 0},fr=function(e){var t=e.className,n=e.cssModule,r=e.valid,i=e.tag,o=Q(e,["className","cssModule","valid","tag"]),a=c(k()(t,r?"valid-feedback":"invalid-feedback"),n);return S.a.createElement(i,Z({},o,{className:a}))};fr.propTypes=cr,fr.defaultProps=lr;var pr={children:T.a.node,row:T.a.bool,check:T.a.bool,inline:T.a.bool,disabled:T.a.bool,tag:T.a.string,className:T.a.string,cssModule:T.a.object},hr={tag:"div"},dr=function(e){var t=e.className,n=e.cssModule,r=e.row,i=e.disabled,o=e.check,a=e.inline,s=e.tag,u=Q(e,["className","cssModule","row","disabled","check","inline","tag"]),l=c(k()(t,!!r&&"row",o?"form-check":"form-group",!(!o||!a)&&"form-check-inline",!(!o||!i)&&"disabled"),n);return S.a.createElement(s,Z({},u,{className:l}))};dr.propTypes=pr,dr.defaultProps=hr;var mr={children:T.a.node,inline:T.a.bool,tag:T.a.oneOfType([T.a.func,T.a.string]),color:T.a.string,className:T.a.string,cssModule:T.a.object},gr={tag:"small",color:"muted"},vr=function(e){var t=e.className,n=e.cssModule,r=e.inline,i=e.color,o=e.tag,a=Q(e,["className","cssModule","inline","color","tag"]),s=c(k()(t,!r&&"form-text",!!i&&"text-"+i),n);return S.a.createElement(o,Z({},a,{className:s}))};vr.propTypes=mr,vr.defaultProps=gr;var yr={children:T.a.node,type:T.a.string,size:T.a.string,bsSize:T.a.string,state:h(T.a.string,'Please use the props "valid" and "invalid" to indicate the state.'),valid:T.a.bool,invalid:T.a.bool,tag:T.a.oneOfType([T.a.func,T.a.string]),innerRef:T.a.oneOfType([T.a.func,T.a.string]),static:h(T.a.bool,'Please use the prop "plaintext"'),plaintext:T.a.bool,addon:T.a.bool,className:T.a.string,cssModule:T.a.object},br={type:"text"},xr=function(e){function t(){return Y(this,t),ee(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return J(t,e),X(t,[{key:"render",value:function(){var e=this.props,t=e.className,n=e.cssModule,r=e.type,i=e.bsSize,o=e.state,a=e.valid,s=e.invalid,u=e.tag,l=e.addon,f=e.static,h=e.plaintext,d=e.innerRef,m=Q(e,["className","cssModule","type","bsSize","state","valid","invalid","tag","addon","static","plaintext","innerRef"]),g=["radio","checkbox"].indexOf(r)>-1,v=new RegExp("\\D","g"),y="file"===r,b="textarea"===r,x="select"===r,w=u||(x||b?r:"input"),N="form-control";h||f?(N+="-plaintext",w=u||"p"):y?N+="-file":g&&(N=l?null:"form-check-input"),o&&"undefined"===typeof a&&"undefined"===typeof s&&("danger"===o?s=!0:"success"===o&&(a=!0)),m.size&&v.test(m.size)&&(p('Please use the prop "bsSize" instead of the "size" to bootstrap\'s input sizing.'),i=m.size,delete m.size);var E=c(k()(t,s&&"is-invalid",a&&"is-valid",!!i&&"form-control-"+i,N),n);return"input"!==w&&"string"===typeof u||(m.type=r),S.a.createElement(w,Z({},m,{ref:d,className:E}))}}]),t}(S.a.Component);xr.propTypes=yr,xr.defaultProps=br;var wr={tag:T.a.oneOfType([T.a.func,T.a.string]),size:T.a.string,className:T.a.string,cssModule:T.a.object},Nr={tag:"div"},Er=function(e){var t=e.className,n=e.cssModule,r=e.tag,i=e.size,o=Q(e,["className","cssModule","tag","size"]),a=c(k()(t,"input-group",i?"input-group-"+i:null),n);return S.a.createElement(r,Z({},o,{className:a}))};Er.propTypes=wr,Er.defaultProps=Nr;var Cr={tag:T.a.oneOfType([T.a.func,T.a.string]),className:T.a.string,cssModule:T.a.object},Sr={tag:"span"},Mr=function(e){var t=e.className,n=e.cssModule,r=e.tag,i=Q(e,["className","cssModule","tag"]),o=c(k()(t,"input-group-text"),n);return S.a.createElement(r,Z({},i,{className:o}))};Mr.propTypes=Cr,Mr.defaultProps=Sr;var Tr={tag:T.a.oneOfType([T.a.func,T.a.string]),addonType:T.a.oneOf(["prepend","append"]).isRequired,children:T.a.node,className:T.a.string,cssModule:T.a.object},Or={tag:"div"},kr=function(e){var t=e.className,n=e.cssModule,r=e.tag,i=e.addonType,o=e.children,a=Q(e,["className","cssModule","tag","addonType","children"]),s=c(k()(t,"input-group-"+i),n);return"string"===typeof o?S.a.createElement(r,Z({},a,{className:s}),S.a.createElement(Mr,{children:o})):S.a.createElement(r,Z({},a,{className:s,children:o}))};kr.propTypes=Tr,kr.defaultProps=Or;var Ar={tag:T.a.oneOfType([T.a.func,T.a.string]),addonType:T.a.oneOf(["prepend","append"]).isRequired,children:T.a.node,groupClassName:T.a.string,groupAttributes:T.a.object,className:T.a.string,cssModule:T.a.object};(function(e){p('The "InputGroupButton" component has been deprecated.\nPlease use component "InputGroupAddon".');var t=e.children,n=e.groupClassName,r=e.groupAttributes,i=Q(e,["children","groupClassName","groupAttributes"]);if("string"===typeof t){var o=i.cssModule,a=i.tag,s=i.addonType,u=Q(i,["cssModule","tag","addonType"]),c=Z({},r,{cssModule:o,tag:a,addonType:s});return S.a.createElement(kr,Z({},c,{className:n}),S.a.createElement(Ye,Z({},u,{children:t})))}return S.a.createElement(kr,Z({},e,{children:t}))}).propTypes=Ar;var _r={addonType:T.a.oneOf(["prepend","append"]).isRequired,children:T.a.node};(function(e){return S.a.createElement(De,e)}).propTypes=_r;var Pr=["xs","sm","md","lg","xl"],Rr=T.a.oneOfType([T.a.number,T.a.string]),Ir=T.a.oneOfType([T.a.string,T.a.number,T.a.shape({size:Rr,push:h(Rr,'Please use the prop "order"'),pull:h(Rr,'Please use the prop "order"'),order:Rr,offset:Rr})]),Fr={children:T.a.node,hidden:T.a.bool,check:T.a.bool,size:T.a.string,for:T.a.string,tag:T.a.string,className:T.a.string,cssModule:T.a.object,xs:Ir,sm:Ir,md:Ir,lg:Ir,xl:Ir,widths:T.a.array},Dr={tag:"label",widths:Pr},Lr=function(e,t,n){return!0===n||""===n?e?"col":"col-"+t:"auto"===n?e?"col-auto":"col-"+t+"-auto":e?"col-"+n:"col-"+t+"-"+n},Br=function(e){var t=e.className,n=e.cssModule,r=e.hidden,i=e.widths,o=e.tag,a=e.check,s=e.size,u=e.for,l=Q(e,["className","cssModule","hidden","widths","tag","check","size","for"]),f=[];i.forEach(function(t,r){var i=e[t];if(delete l[t],i||""===i){var o=!r,a=void 0;if(R()(i)){var s,u=o?"-":"-"+t+"-";a=Lr(o,t,i.size),f.push(c(k()((s={},K(s,a,i.size||""===i.size),K(s,"order"+u+i.order,i.order||0===i.order),K(s,"offset"+u+i.offset,i.offset||0===i.offset),s))),n)}else a=Lr(o,t,i),f.push(a)}});var p=c(k()(t,!!r&&"sr-only",!!a&&"form-check-label",!!s&&"col-form-label-"+s,f,!!f.length&&"col-form-label"),n);return S.a.createElement(o,Z({htmlFor:u},l,{className:p}))};Br.propTypes=Fr,Br.defaultProps=Dr;var zr={body:T.a.bool,bottom:T.a.bool,children:T.a.node,className:T.a.string,cssModule:T.a.object,heading:T.a.bool,left:T.a.bool,list:T.a.bool,middle:T.a.bool,object:T.a.bool,right:T.a.bool,tag:T.a.oneOfType([T.a.func,T.a.string]),top:T.a.bool};(function(e){var t=e.body,n=e.bottom,r=e.className,i=e.cssModule,o=e.heading,a=e.left,s=e.list,u=e.middle,l=e.object,f=e.right,p=e.tag,h=e.top,d=Q(e,["body","bottom","className","cssModule","heading","left","list","middle","object","right","tag","top"]),m=void 0;m=o?"h4":a||f?"a":l?"img":s?"ul":"div";var g=p||m,v=c(k()(r,{"media-body":t,"media-heading":o,"media-left":a,"media-right":f,"media-top":h,"media-bottom":n,"media-middle":u,"media-object":l,"media-list":s,media:!t&&!o&&!a&&!f&&!h&&!n&&!u&&!l&&!s}),i);return S.a.createElement(g,Z({},d,{className:v}))}).propTypes=zr;var jr={children:T.a.node,className:T.a.string,cssModule:T.a.object,size:T.a.string,tag:T.a.oneOfType([T.a.func,T.a.string])},Ur={tag:"ul"},qr=function(e){var t=e.className,n=e.cssModule,r=e.size,i=e.tag,o=Q(e,["className","cssModule","size","tag"]),a=c(k()(t,"pagination",K({},"pagination-"+r,!!r)),n);return S.a.createElement(i,Z({},o,{className:a}))};qr.propTypes=jr,qr.defaultProps=Ur;var Hr={active:T.a.bool,children:T.a.node,className:T.a.string,cssModule:T.a.object,disabled:T.a.bool,tag:T.a.oneOfType([T.a.func,T.a.string])},Wr={tag:"li"},Vr=function(e){var t=e.active,n=e.className,r=e.cssModule,i=e.disabled,o=e.tag,a=Q(e,["active","className","cssModule","disabled","tag"]),s=c(k()(n,"page-item",{active:t,disabled:i}),r);return S.a.createElement(o,Z({},a,{className:s}))};Vr.propTypes=Hr,Vr.defaultProps=Wr;var Gr={"aria-label":T.a.string,children:T.a.node,className:T.a.string,cssModule:T.a.object,next:T.a.bool,previous:T.a.bool,tag:T.a.oneOfType([T.a.func,T.a.string])},$r={tag:"a"},Yr=function(e){var t=e.className,n=e.cssModule,r=e.next,i=e.previous,o=e.tag,a=Q(e,["className","cssModule","next","previous","tag"]),s=c(k()(t,"page-link"),n),u=void 0;i?u="Previous":r&&(u="Next");var l=e["aria-label"]||u,f=void 0;i?f="\xab":r&&(f="\xbb");var p=e.children;return p&&Array.isArray(p)&&0===p.length&&(p=null),(i||r)&&(p=[S.a.createElement("span",{"aria-hidden":"true",key:"caret"},p||f),S.a.createElement("span",{className:"sr-only",key:"sr"},l)]),S.a.createElement(o,Z({},a,{className:s,"aria-label":l}),p)};Yr.propTypes=Gr,Yr.defaultProps=$r;var Xr={tag:T.a.oneOfType([T.a.func,T.a.string]),activeTab:T.a.any,className:T.a.string,cssModule:T.a.object},Kr={tag:"div"},Zr={activeTabId:T.a.any},Jr=function(e){function t(e){Y(this,t);var n=ee(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={activeTab:n.props.activeTab},n}return J(t,e),X(t,[{key:"getChildContext",value:function(){return{activeTabId:this.state.activeTab}}},{key:"componentWillReceiveProps",value:function(e){this.state.activeTab!==e.activeTab&&this.setState({activeTab:e.activeTab})}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.cssModule,r=e.tag,i=l(this.props,Object.keys(Xr)),o=c(k()("tab-content",t),n);return S.a.createElement(r,Z({},i,{className:o}))}}]),t}(C.Component);Jr.propTypes=Xr,Jr.defaultProps=Kr,Jr.childContextTypes=Zr;var Qr={tag:T.a.oneOfType([T.a.func,T.a.string]),className:T.a.string,cssModule:T.a.object,tabId:T.a.any},ei={tag:"div"},ti={activeTabId:T.a.any};x.propTypes=Qr,x.defaultProps=ei,x.contextTypes=ti;var ni={tag:T.a.oneOfType([T.a.func,T.a.string]),fluid:T.a.bool,className:T.a.string,cssModule:T.a.object},ri={tag:"div"},ii=function(e){var t=e.className,n=e.cssModule,r=e.tag,i=e.fluid,o=Q(e,["className","cssModule","tag","fluid"]),a=c(k()(t,"jumbotron",!!i&&"jumbotron-fluid"),n);return S.a.createElement(r,Z({},o,{className:a}))};ii.propTypes=ni,ii.defaultProps=ri;var oi={children:T.a.node,className:T.a.string,closeClassName:T.a.string,closeAriaLabel:T.a.string,cssModule:T.a.object,color:T.a.string,isOpen:T.a.bool,toggle:T.a.func,tag:T.a.oneOfType([T.a.func,T.a.string]),transition:T.a.shape(y.propTypes)},ai={color:"success",isOpen:!0,tag:"div",closeAriaLabel:"Close",transition:Z({},y.defaultProps,{unmountOnExit:!0})};w.propTypes=oi,w.defaultProps=ai;var si,ui=Z({},bt.propTypes,{isOpen:T.a.bool,children:T.a.oneOfType([T.a.arrayOf(T.a.node),T.a.node]),tag:T.a.oneOfType([T.a.func,T.a.string]),className:T.a.node,navbar:T.a.bool,cssModule:T.a.object}),ci=Z({},bt.defaultProps,{isOpen:!1,appear:!1,enter:!0,exit:!0,tag:"div",timeout:q.Collapse}),li=(si={},K(si,W.ENTERING,"collapsing"),K(si,W.ENTERED,"collapse show"),K(si,W.EXITING,"collapsing"),K(si,W.EXITED,"collapse"),si),fi=function(e){function t(e){Y(this,t);var n=ee(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={height:null},["onEntering","onEntered","onExit","onExiting","onExited"].forEach(function(e){n[e]=n[e].bind(n)}),n}return J(t,e),X(t,[{key:"onEntering",value:function(e,t){this.setState({height:E(e)}),this.props.onEntering(e,t)}},{key:"onEntered",value:function(e,t){this.setState({height:null}),this.props.onEntered(e,t)}},{key:"onExit",value:function(e){this.setState({height:E(e)}),this.props.onExit(e)}},{key:"onExiting",value:function(e){e.offsetHeight;this.setState({height:0}),this.props.onExiting(e)}},{key:"onExited",value:function(e){this.setState({height:null}),this.props.onExited(e)}},{key:"render",value:function(){var e=this.props,t=e.tag,n=e.isOpen,r=e.className,i=e.navbar,o=e.cssModule,a=e.children,s=Q(e,["tag","isOpen","className","navbar","cssModule","children"]),u=this.state.height,p=f(s,H),h=l(s,H);return S.a.createElement(bt,Z({},p,{in:n,onEntering:this.onEntering,onEntered:this.onEntered,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}),function(e){var n=N(e),s=c(k()(r,n,i&&"navbar-collapse"),o),l=null===u?null:{height:u};return S.a.createElement(t,Z({},h,{style:Z({},h.style,l),className:s}),a)})}}]),t}(C.Component);fi.propTypes=ui,fi.defaultProps=ci;var pi={tag:T.a.oneOfType([T.a.func,T.a.string]),active:T.a.bool,disabled:T.a.bool,color:T.a.string,action:T.a.bool,className:T.a.any,cssModule:T.a.object},hi={tag:"li"},di=function(e){e.preventDefault()},mi=function(e){var t=e.className,n=e.cssModule,r=e.tag,i=e.active,o=e.disabled,a=e.action,s=e.color,u=Q(e,["className","cssModule","tag","active","disabled","action","color"]),l=c(k()(t,!!i&&"active",!!o&&"disabled",!!a&&"list-group-item-action",!!s&&"list-group-item-"+s,"list-group-item"),n);return o&&(u.onClick=di),S.a.createElement(r,Z({},u,{className:l}))};mi.propTypes=pi,mi.defaultProps=hi;var gi={tag:T.a.oneOfType([T.a.func,T.a.string]),className:T.a.any,cssModule:T.a.object},vi={tag:"h5"},yi=function(e){var t=e.className,n=e.cssModule,r=e.tag,i=Q(e,["className","cssModule","tag"]),o=c(k()(t,"list-group-item-heading"),n);return S.a.createElement(r,Z({},i,{className:o}))};yi.propTypes=gi,yi.defaultProps=vi;var bi={tag:T.a.oneOfType([T.a.func,T.a.string]),className:T.a.any,cssModule:T.a.object},xi={tag:"p"},wi=function(e){var t=e.className,n=e.cssModule,r=e.tag,i=Q(e,["className","cssModule","tag"]),o=c(k()(t,"list-group-item-text"),n);return S.a.createElement(r,Z({},i,{className:o}))};wi.propTypes=bi,wi.defaultProps=xi;(function(e){function t(e){Y(this,t);var n=ee(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={isOpen:!0},n.toggle=n.toggle.bind(n),n}J(t,e),X(t,[{key:"toggle",value:function(){this.setState({isOpen:!this.state.isOpen})}},{key:"render",value:function(){return S.a.createElement(w,Z({isOpen:this.state.isOpen,toggle:this.toggle},this.props))}}])})(C.Component),function(e){function t(e){Y(this,t);var n=ee(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={isOpen:!1},n.toggle=n.toggle.bind(n),n}J(t,e),X(t,[{key:"toggle",value:function(){this.setState({isOpen:!this.state.isOpen})}},{key:"render",value:function(){return S.a.createElement(Ke,Z({isOpen:this.state.isOpen,toggle:this.toggle},this.props))}}])}(C.Component),function(e){function t(e){Y(this,t);var n=ee(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={isOpen:!1},n.toggle=n.toggle.bind(n),n}J(t,e),X(t,[{key:"toggle",value:function(){this.setState({isOpen:!this.state.isOpen})}},{key:"render",value:function(){return S.a.createElement(De,Z({isOpen:this.state.isOpen,toggle:this.toggle},this.props))}}])}(C.Component),function(e){function t(e){Y(this,t);var n=ee(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={isOpen:!1},n.toggle=n.toggle.bind(n),n}J(t,e),X(t,[{key:"toggle",value:function(){this.setState({isOpen:!this.state.isOpen})}},{key:"render",value:function(){return S.a.createElement(Qn,Z({isOpen:this.state.isOpen,toggle:this.toggle},this.props))}}])}(C.Component)},function(e,t,n){"use strict";e.exports=function(e,t,n){if(null===n||void 0===n)return e.eq(t);if(e.eq(t))return!0;if(e.isNaN()||t.isNaN())return!1;if(e.isFinite()&&t.isFinite()){var r=e.minus(t).abs();if(r.isZero())return!0;var i=e.constructor.max(e.abs(),t.abs());return r.lte(i.times(n))}return!1}},function(e,t,n){"use strict";function r(e,t,n,r){var i=e.DenseMatrix;return function(e,t,n,o){var a=e._values,s=e._index,u=e._ptr,c=e._size,l=e._datatype;if(!a)throw new Error("Cannot perform operation on Pattern Sparse Matrix and Scalar value");var f=c[0],p=c[1],h=void 0,d=n;"string"===typeof l&&(h=l,t=r.convert(t,h),d=r.find(n,[h,h]));for(var m=[],g=new i({data:m,size:[f,p],datatype:h}),v=[],y=[],b=0;b<p;b++){for(var x=b+1,w=u[b],N=u[b+1],E=w;E<N;E++){var C=s[E];v[C]=a[E],y[C]=x}for(var S=0;S<f;S++)0===b&&(m[S]=[]),y[S]===x?m[S][b]=o?d(t,v[S]):d(v[S],t):m[S][b]=t}return g}}t.name="algorithm10",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,a){var s=r(n(1)),u=r(n(19)),c=r(n(29)),l=r(n(20)),f=r(n(8)),p=r(n(6)),h=n(4),d=a("smaller",{"boolean, boolean":function(e,t){return e<t},"number, number":function(e,n){return e<n&&!i(e,n,t.epsilon)},"BigNumber, BigNumber":function(e,n){return e.lt(n)&&!o(e,n,t.epsilon)},"Fraction, Fraction":function(e,t){return-1===e.compare(t)},"Complex, Complex":function(e,t){throw new TypeError("No ordering relation is defined for complex numbers")},"Unit, Unit":function(e,t){if(!e.equalBase(t))throw new Error("Cannot compare units with different base");return d(e.value,t.value)},"SparseMatrix, SparseMatrix":function(e,t){return c(e,t,d)},"SparseMatrix, DenseMatrix":function(e,t){return u(t,e,d,!0)},"DenseMatrix, SparseMatrix":function(e,t){return u(e,t,d,!1)},"DenseMatrix, DenseMatrix":function(e,t){return f(e,t,d)},"Array, Array":function(e,t){return d(s(e),s(t)).valueOf()},"Array, Matrix":function(e,t){return d(s(e),t)},"Matrix, Array":function(e,t){return d(e,s(t))},"SparseMatrix, any":function(e,t){return l(e,t,d,!1)},"DenseMatrix, any":function(e,t){return p(e,t,d,!1)},"any, SparseMatrix":function(e,t){return l(t,e,d,!0)},"any, DenseMatrix":function(e,t){return p(t,e,d,!0)},"Array, any":function(e,t){return p(s(e),t,d,!1).valueOf()},"any, Array":function(e,t){return p(s(t),e,d,!0).valueOf()}});return d.toTex={2:"\\left(${args[0]}"+h.operators.smaller+"${args[1]}\\right)"},d}var i=n(3).nearlyEqual,o=n(42);t.name="smaller",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,a){function s(n,r){if(t.predictable&&!i(r)&&n<0)try{var o=d(r),a=m(o);if((r===a||Math.abs((r-a)/r)<1e-14)&&o.d%2===1)return(o.n%2===0?1:-1)*Math.pow(-n,r)}catch(e){}return n*n<1&&r===1/0||n*n>1&&r===-1/0?0:t.predictable&&(n<-1&&r===1/0||n>-1&&n<0&&r===-1/0)?NaN:i(r)||n>=0||t.predictable?Math.pow(n,r):new e.Complex(n,0).pow(r,0)}function u(e,t){if(!i(t)||t<0)throw new TypeError("For A^b, b must be a positive integer (value is "+t+")");var n=o(e);if(2!==n.length)throw new Error("For A^b, A must be 2 dimensional (A has "+n.length+" dimensions)");if(n[0]!==n[1])throw new Error("For A^b, A must be square (size is "+n[0]+"x"+n[1]+")");for(var r=f(n[0]).valueOf(),a=e;t>=1;)1===(1&t)&&(r=p(a,r)),t>>=1,a=p(a,a);return r}function c(e,t){return h(u(e.valueOf(),t))}var l=n(4),f=r(n(58)),p=r(n(10)),h=r(n(1)),d=r(n(134)),m=r(n(100)),g=a("pow",{"number, number":s,"Complex, Complex":function(e,t){return e.pow(t)},"BigNumber, BigNumber":function(n,r){return r.isInteger()||n>=0||t.predictable?n.pow(r):new e.Complex(n.toNumber(),0).pow(r.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 s(e.valueOf(),n.valueOf())}return e.pow(n)},"Array, number":u,"Array, BigNumber":function(e,t){return u(e,t.toNumber())},"Matrix, number":c,"Matrix, BigNumber":function(e,t){return c(e,t.toNumber())},"Unit, number":function(e,t){return e.pow(t)}});return g.toTex={2:"\\left(${args[0]}\\right)"+l.operators.pow+"{${args[1]}}"},g}var i=n(3).isInteger,o=n(2).size;t.name="pow",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,a){function s(t,n){var r=u(t),i=r?new e.BigNumber(0):0;if(c(t),n){var a=l(n);return t.length>0?a.resize(t,i):a}var s=[];return t.length>0?o(s,t,i):s}function u(t){var n=!1;return t.forEach(function(t,r,i){e.isBigNumber(t)&&(n=!0,i[r]=t.toNumber())}),n}function c(e){e.forEach(function(e){if("number"!==typeof e||!i(e)||e<0)throw new Error("Parameters in function zeros must be positive integers")})}var l=r(n(1)),f=a("zeros",{"":function(){return"Array"===t.matrix?s([]):s([],"default")},"...number | BigNumber | string":function(e){if("string"===typeof e[e.length-1])return s(e,e.pop());return"Array"===t.matrix?s(e):s(e,"default")},Array:s,Matrix:function(e){var t=e.storage();return s(e.valueOf(),t)},"Array | Matrix, string":function(e,t){return s(e.valueOf(),t)}});return f.toTex=void 0,f}var i=n(3).isInteger,o=n(2).resize;t.name="zeros",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,a){function s(t,n){if(1!==arguments.length&&2!==arguments.length)throw new i("parse",arguments.length,1,2);if(we=n&&n.nodes?n.nodes:{},"string"===typeof t)return Ne=t,x();if(Array.isArray(t)||t instanceof e.Matrix)return o(t,function(e){if("string"!==typeof e)throw new TypeError("String expected");return Ne=e,x()});throw new TypeError("String or matrix expected")}function u(){Ce=0,Se=Ne.charAt(0),Oe=0,ke=null}function c(){Ce++,Se=Ne.charAt(Ce)}function l(){return Ne.charAt(Ce-1)}function f(){return Ne.charAt(Ce+1)}function p(){return Ne.charAt(Ce+2)}function h(){Ae.push({tokenType:Te,token:Me,comment:Ee,index:Ce,c:Se})}function d(){var e=Ae.pop();Te=e.tokenType,Me=e.token,Ee=e.comment,Ce=e.index,Se=e.c}function m(){Ae.pop()}function g(){for(Te=ge.NULL,Me="",Ee="";s.isWhitespace(Se,Oe);)c();if("#"===Se)for(;"\n"!==Se&&""!==Se;)Ee+=Se,c();if(""===Se)return void(Te=ge.DELIMITER);if("\n"===Se&&!Oe)return Te=ge.DELIMITER,Me=Se,void c();var e=Se+f(),t=e+p();if(3===t.length&&ve[t])return Te=ge.DELIMITER,Me=t,c(),c(),void c();if(2===e.length&&ve[e])return Te=ge.DELIMITER,Me=e,c(),void c();if(ve[Se])return Te=ge.DELIMITER,Me=Se,void c();if(!s.isDigitDot(Se)){if(s.isAlpha(Se,l(),f())){for(;s.isAlpha(Se,l(),f())||s.isDigit(Se);)Me+=Se,c();return void(Te=ye.hasOwnProperty(Me)?ge.DELIMITER:ge.SYMBOL)}for(Te=ge.UNKNOWN;""!==Se;)Me+=Se,c();throw Q('Syntax error in part "'+Me+'"')}if(Te=ge.NUMBER,"."===Se)Me+=Se,c(),s.isDigit(Se)||(Te=ge.DELIMITER);else{for(;s.isDigit(Se);)Me+=Se,c();s.isDecimalMark(Se,f())&&(Me+=Se,c())}for(;s.isDigit(Se);)Me+=Se,c();if(e=f(),"E"===Se||"e"===Se)if(s.isDigit(e)||"-"===e||"+"===e){if(Me+=Se,c(),"+"!==Se&&"-"!==Se||(Me+=Se,c()),!s.isDigit(Se))throw Q('Digit expected, got "'+Se+'"');for(;s.isDigit(Se);)Me+=Se,c();if(s.isDecimalMark(Se,f()))throw Q('Digit expected, got "'+Se+'"')}else if("."===e)throw c(),Q('Digit expected, got "'+Se+'"')}function v(){do{g()}while("\n"===Me)}function y(){Oe++}function b(){Oe--}function x(){u(),g();var e=w();if(""!==Me)throw Te===ge.DELIMITER?ee("Unexpected operator "+Me):Q('Unexpected part "'+Me+'"');return e}function w(){var e=void 0,t=[],n=void 0;for(""!==Me&&"\n"!==Me&&";"!==Me&&(e=N(),e.comment=Ee);"\n"===Me||";"===Me;)0===t.length&&e&&(n=";"!==Me,t.push({node:e,visible:n})),g(),"\n"!==Me&&";"!==Me&&""!==Me&&(e=N(),e.comment=Ee,n=";"!==Me,t.push({node:e,visible:n}));return t.length>0?new oe(t):(e||(e=new se(void 0),e.comment=Ee),e)}function N(){var t=void 0,n=void 0,r=void 0,i=void 0,o=E();if("="===Me){if(e.isSymbolNode(o))return t=o.name,v(),r=N(),new ie(new me(t),r);if(e.isAccessorNode(o))return v(),r=N(),new ie(o.object,o.index,r);if(e.isFunctionNode(o)&&e.isSymbolNode(o.fn)&&(i=!0,n=[],t=o.name,o.args.forEach(function(t,r){e.isSymbolNode(t)?n[r]=t.name:i=!1}),i))return v(),r=N(),new ue(t,n,r);throw Q("Invalid left hand side of assignment operator =")}return o}function E(){for(var e=C();"?"===Me;){var t=ke;ke=Oe,v();var n=e,r=N();if(":"!==Me)throw Q("False part of conditional expression expected");ke=null,v();var i=N();e=new ae(n,r,i),ke=t}return e}function C(){for(var e=S();"or"===Me;)v(),e=new fe("or","or",[e,S()]);return e}function S(){for(var e=M();"xor"===Me;)v(),e=new fe("xor","xor",[e,M()]);return e}function M(){for(var e=T();"and"===Me;)v(),e=new fe("and","and",[e,T()]);return e}function T(){for(var e=O();"|"===Me;)v(),e=new fe("|","bitOr",[e,O()]);return e}function O(){for(var e=k();"^|"===Me;)v(),e=new fe("^|","bitXor",[e,k()]);return e}function k(){for(var e=A();"&"===Me;)v(),e=new fe("&","bitAnd",[e,A()]);return e}function A(){var e=void 0,t=void 0,n=void 0,r=void 0,i=void 0;for(e=_(),t={"==":"equal","!=":"unequal","<":"smaller",">":"larger","<=":"smallerEq",">=":"largerEq"};t.hasOwnProperty(Me);)n=Me,r=t[n],v(),i=[e,_()],e=new fe(n,r,i);return e}function _(){var e=void 0,t=void 0,n=void 0,r=void 0,i=void 0;for(e=P(),t={"<<":"leftShift",">>":"rightArithShift",">>>":"rightLogShift"};t.hasOwnProperty(Me);)n=Me,r=t[n],v(),i=[e,P()],e=new fe(n,r,i);return e}function P(){var e=void 0,t=void 0,n=void 0,r=void 0,i=void 0;for(e=R(),t={to:"to",in:"to"};t.hasOwnProperty(Me);)n=Me,r=t[n],v(),"in"===n&&""===Me?e=new fe("*","multiply",[e,new me("in")],!0):(i=[e,R()],e=new fe(n,r,i));return e}function R(){var e=void 0,t=[];if(e=":"===Me?new se(1):I(),":"===Me&&ke!==Oe){for(t.push(e);":"===Me&&t.length<3;)v(),")"===Me||"]"===Me||","===Me||""===Me?t.push(new me("end")):t.push(I());e=3===t.length?new de(t[0],t[2],t[1]):new de(t[0],t[1])}return e}function I(){var e=void 0,t=void 0,n=void 0,r=void 0,i=void 0;for(e=F(),t={"+":"add","-":"subtract"};t.hasOwnProperty(Me);)n=Me,r=t[n],v(),i=[e,F()],e=new fe(n,r,i);return e}function F(){var e=void 0,t=void 0,n=void 0,r=void 0,i=void 0;for(e=D(),t=e,n={"*":"multiply",".*":"dotMultiply","/":"divide","./":"dotDivide","%":"mod",mod:"mod"};;){if(!n.hasOwnProperty(Me))break;r=Me,i=n[r],v(),t=D(),e=new fe(r,i,[e,t])}return e}function D(){var t=void 0,n=void 0;for(t=L(),n=t;;){if(!(Te===ge.SYMBOL||"in"===Me&&e.isConstantNode(t))&&(Te!==ge.NUMBER||e.isConstantNode(n)||e.isOperatorNode(n)&&"!"!==n.op)&&"("!==Me)break;n=L(),t=new fe("*","multiply",[t,n],!0)}return t}function L(){var t=void 0,n=void 0;for(t=B(),n=t;;){if("/"!==Me||!e.isConstantNode(n))break;if(h(),v(),Te!==ge.NUMBER){d();break}if(h(),v(),Te!==ge.SYMBOL&&"("!==Me){d(),d();break}d(),m(),n=B(),t=new fe("/","divide",[t,n])}return t}function B(){var e=void 0,t=void 0,n=void 0,r={"-":"unaryMinus","+":"unaryPlus","~":"bitNot",not:"not"};return r.hasOwnProperty(Me)?(n=r[Me],e=Me,v(),t=[B()],new fe(e,n,t)):z()}function z(){var e=void 0,t=void 0,n=void 0,r=void 0;return e=j(),"^"!==Me&&".^"!==Me||(t=Me,n="^"===t?"pow":"dotPow",v(),r=[e,B()],e=new fe(t,n,r)),e}function j(){var e=void 0,t=void 0,n=void 0,r=void 0,i=void 0;for(e=U(),t={"!":"factorial","'":"ctranspose"};t.hasOwnProperty(Me);)n=Me,r=t[n],g(),i=[e],e=new fe(n,r,i),e=H(e);return e}function U(){var e=[];if(Te===ge.SYMBOL&&we.hasOwnProperty(Me)){var t=we[Me];if(g(),"("===Me){if(e=[],y(),g(),")"!==Me)for(e.push(N());","===Me;)g(),e.push(N());if(")"!==Me)throw Q("Parenthesis ) expected");b(),g()}return new t(e)}return q()}function q(){var e=void 0,t=void 0;return Te===ge.SYMBOL||Te===ge.DELIMITER&&Me in ye?(t=Me,g(),e=be.hasOwnProperty(t)?new se(be[t]):-1!==xe.indexOf(t)?new se(te(t)):new me(t),e=H(e)):W()}function H(t,n){for(var r=void 0;("("===Me||"["===Me||"."===Me)&&(!n||-1!==n.indexOf(Me));)if(r=[],"("===Me){if(!e.isSymbolNode(t)&&!e.isAccessorNode(t))return t;if(y(),g(),")"!==Me)for(r.push(N());","===Me;)g(),r.push(N());if(")"!==Me)throw Q("Parenthesis ) expected");b(),g(),t=new he(t,r)}else if("["===Me){if(y(),g(),"]"!==Me)for(r.push(N());","===Me;)g(),r.push(N());if("]"!==Me)throw Q("Parenthesis ] expected");b(),g(),t=new ne(t,new ce(r))}else{if(g(),Te!==ge.SYMBOL)throw Q("Property name expected after dot");r.push(new se(Me)),g();t=new ne(t,new ce(r,!0))}return t}function W(){var e=void 0,t=void 0;return'"'===Me?(t=V(),e=new se(t),e=H(e)):G()}function V(){for(var e="";""!==Se&&'"'!==Se;)"\\"===Se&&(e+=Se,c()),e+=Se,c();if(g(),'"'!==Me)throw Q('End of string " expected');return g(),JSON.parse('"'+e+'"')}function G(){var e=void 0,t=void 0,n=void 0,r=void 0;if("["===Me){if(y(),g(),"]"!==Me){var i=$();if(";"===Me){for(n=1,t=[i];";"===Me;)g(),t[n]=$(),n++;if("]"!==Me)throw Q("End of matrix ] expected");b(),g(),r=t[0].items.length;for(var o=1;o<n;o++)if(t[o].items.length!==r)throw ee("Column dimensions mismatch ("+t[o].items.length+" !== "+r+")");e=new re(t)}else{if("]"!==Me)throw Q("End of matrix ] expected");b(),g(),e=i}}else b(),g(),e=new re([]);return H(e)}return Y()}function $(){for(var e=[N()],t=1;","===Me;)g(),e[t]=N(),t++;return new re(e)}function Y(){if("{"===Me){var e=void 0,t={};do{if(g(),"}"!==Me){if('"'===Me)e=V();else{if(Te!==ge.SYMBOL)throw Q("Symbol or string expected as object key");e=Me,g()}if(":"!==Me)throw Q("Colon : expected after object key");g(),t[e]=N()}}while(","===Me);if("}"!==Me)throw Q("Comma , or bracket } expected after object value");g();var n=new le(t);return n=H(n)}return X()}function X(){var e=void 0;return Te===ge.NUMBER?(e=Me,g(),new se(te(e,t.number))):K()}function K(){var e=void 0;if("("===Me){if(y(),g(),e=N(),")"!==Me)throw Q("Parenthesis ) expected");return b(),g(),e=new pe(e),e=H(e)}return Z()}function Z(){throw Q(""===Me?"Unexpected end of expression":"'"===Me?"Value expected. Note: strings must be enclosed by double quotes":"Value expected")}function J(){return Ce-Me.length+1}function Q(e){var t=J(),n=new SyntaxError(e+" (char "+t+")");return n.char=t,n}function ee(e){var t=J(),n=new SyntaxError(e+" (char "+t+")");return n.char=t,n}var te=r(n(144)),ne=r(n(145)),re=r(n(148)),ie=r(n(149)),oe=r(n(150)),ae=r(n(151)),se=r(n(65)),ue=r(n(152)),ce=r(n(153)),le=r(n(154)),fe=r(n(66)),pe=r(n(77)),he=r(n(78)),de=r(n(155)),me=r(n(60)),ge={NULL:0,DELIMITER:1,NUMBER:2,SYMBOL:3,UNKNOWN:4},ve={",":!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},ye={mod:!0,to:!0,in:!0,and:!0,xor:!0,or:!0,not:!0},be={true:!0,false:!1,null:null,undefined:void 0},xe=["NaN","Infinity"],we={},Ne="",Ee="",Ce=0,Se="",Me="",Te=ge.NULL,Oe=0,ke=null,Ae=[];return s.isAlpha=function(e,t,n){return s.isValidLatinOrGreek(e)||s.isValidMathSymbol(e,n)||s.isValidMathSymbol(t,e)},s.isValidLatinOrGreek=function(e){return/^[a-zA-Z_$\u00C0-\u02AF\u0370-\u03FF\u2100-\u214F]$/.test(e)},s.isValidMathSymbol=function(e,t){return/^[\uD835]$/.test(e)&&/^[\uDC00-\uDFFF]$/.test(t)&&/^[^\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(t)},s.isWhitespace=function(e,t){return" "===e||"\t"===e||"\n"===e&&t>0},s.isDecimalMark=function(e,t){return"."===e&&"/"!==t&&"*"!==t&&"^"!==t},s.isDigitDot=function(e){return e>="0"&&e<="9"||"."===e},s.isDigit=function(e){return e>="0"&&e<="9"},s}var i=n(56),o=n(0);t.name="parse",t.path="expression",t.factory=r},function(e,t,n){"use strict";var r=n(63);t.transform=function(e){return e&&e.isIndexError?new r(e.index+1,e.min+1,void 0!==e.max?e.max+1:void 0):e}},function(e,t,n){"use strict";var r=n(75);e.exports=function e(t,n){r(t)&&(t=t.valueOf());for(var i=0,o=t.length;i<o;i++){var a=t[i];Array.isArray(a)?e(a,n):n(a)}}},function(e,t,n){"use strict";function r(e,t,r,o){var a=r(n(14)),s=r(n(10)),u=r(n(81)),c=r(n(1)),l=r(n(21)),f=r(n(6)),p=o("divide",i({"Array | Matrix, Array | Matrix":function(e,t){return s(e,u(t))},"DenseMatrix, any":function(e,t){return f(e,t,a,!1)},"SparseMatrix, any":function(e,t){return l(e,t,a,!1)},"Array, any":function(e,t){return f(c(e),t,a,!1).valueOf()},"any, Array | Matrix":function(e,t){return s(e,u(t))}},a.signatures));return p.toTex={2:"\\frac{${args[0]}}{${args[1]}}"},p}var i=n(5).extend;t.name="divide",t.factory=r},function(e,t,n){"use strict";function r(e,t,n,r){function o(n){return n>=0||t.predictable?Math.sqrt(n):new e.Complex(n,0).sqrt()}var a=r("sqrt",{number:o,Complex:function(e){return e.sqrt()},BigNumber:function(e){return!e.isNegative()||t.predictable?e.sqrt():o(e.toNumber())},"Array | Matrix":function(e){return i(e,a,!0)},Unit:function(e){return e.pow(.5)}});return a.toTex={1:"\\sqrt{${args[0]}}"},a}var i=n(0);t.name="sqrt",t.factory=r},function(e,t,n){var r=n(7),i=n(680),o=n(53);e.exports={createClass:function(e,t,u){function c(e){f[e]=function(){return this.state.chart[e].apply(this.state.chart,arguments)}}var l=["data","options","redraw"],f={displayName:e+"Chart",getInitialState:function(){return{}},render:function(){var e={ref:"canvass"};for(var t in this.props)this.props.hasOwnProperty(t)&&-1===l.indexOf(t)&&(e[t]=this.props[t]);return r.createElement("canvas",e)}},p=["clear","stop","resize","toBase64Image","generateLegend","update","addData","removeData"];f.componentDidMount=function(){this.initializeChart(this.props)},f.componentWillUnmount=function(){this.state.chart.destroy()},f.componentWillReceiveProps=function(e){var t=this.state.chart;e.redraw?(t.destroy(),this.initializeChart(e)):(u=u||a[t.name],s(e,t,u),t.scale&&(t.scale.xLabels=e.data.labels,t.scale.calculateXLabelRotation&&t.scale.calculateXLabelRotation()),t.update())},f.initializeChart=function(t){var r=n(682),i=o.findDOMNode(this),a=i.getContext("2d"),s=new r(a)[e](t.data,t.options||{});this.state.chart=s},f.getChart=function(){return this.state.chart},f.getCanvass=function(){return this.refs.canvass},f.getCanvas=f.getCanvass;var h;for(h=0;h<p.length;h++)c(p[h]);for(h=0;h<t.length;h++)c(t[h]);return i(f)}};var a={Line:"points",Radar:"points",Bar:"bars"},s=function(e,t,n){var r=t.name;if("PolarArea"===r||"Pie"===r||"Doughnut"===r)for(e.data.forEach(function(e,n){t.segments[n]?Object.keys(e).forEach(function(r){t.segments[n][r]=e[r]}):t.addData(e)});e.data.length<t.segments.length;)t.removeData();else if("Radar"===r)t.removeData(),e.data.datasets.forEach(function(r,i){r.data.forEach(function(r,o){"undefined"==typeof t.datasets[i][n][o]?u(e,t,i,o):t.datasets[i][n][o].value=r})});else{for(;t.scale.xLabels.length>e.data.labels.length;)t.removeData();e.data.datasets.forEach(function(r,i){r.data.forEach(function(r,o){"undefined"==typeof t.datasets[i][n][o]?u(e,t,i,o):t.datasets[i][n][o].value=r})})}},u=function(e,t,n,r){var i=[];e.data.datasets.forEach(function(e){i.push(e.data[r])}),t.addData(i,e.data.labels[n])}},function(e,t,n){"use strict";function r(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(e){console.error(e)}}r(),e.exports=n(198)},function(e,t,n){function r(e){if(e)return i(e)}function i(e){for(var t in r.prototype)e[t]=r.prototype[t];return e}e.exports=r,r.prototype.on=r.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},r.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var r,i=0;i<n.length;i++)if((r=n[i])===t||r.fn===t){n.splice(i,1);break}return this},r.prototype.emit=function(e){this._callbacks=this._callbacks||{};var t=[].slice.call(arguments,1),n=this._callbacks["$"+e];if(n){n=n.slice(0);for(var r=0,i=n.length;r<i;++r)n[r].apply(this,t)}return this},r.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},r.prototype.hasListeners=function(e){return!!this.listeners(e).length}},function(e,t,n){(function(e){function r(e,n){return n("b"+t.packets[e.type]+e.data.data)}function i(e,n,r){if(!n)return t.encodeBase64Packet(e,r);var i=e.data,o=new Uint8Array(i),a=new Uint8Array(1+i.byteLength);a[0]=y[e.type];for(var s=0;s<o.length;s++)a[s+1]=o[s];return r(a.buffer)}function o(e,n,r){if(!n)return t.encodeBase64Packet(e,r);var i=new FileReader;return i.onload=function(){e.data=i.result,t.encodePacket(e,n,!0,r)},i.readAsArrayBuffer(e.data)}function a(e,n,r){if(!n)return t.encodeBase64Packet(e,r);if(v)return o(e,n,r);var i=new Uint8Array(1);return i[0]=y[e.type],r(new w([i.buffer,e.data]))}function s(e){try{e=d.decode(e,{strict:!1})}catch(e){return!1}return e}function u(e,t,n){for(var r=new Array(e.length),i=h(e.length,n),o=0;o<e.length;o++)!function(e,n,i){t(n,function(t,n){r[e]=n,i(t,r)})}(o,e[o],i)}var c,l=n(218),f=n(122),p=n(220),h=n(221),d=n(222);e&&e.ArrayBuffer&&(c=n(224));var m="undefined"!==typeof navigator&&/Android/i.test(navigator.userAgent),g="undefined"!==typeof navigator&&/PhantomJS/i.test(navigator.userAgent),v=m||g;t.protocol=3;var y=t.packets={open:0,close:1,ping:2,pong:3,message:4,upgrade:5,noop:6},b=l(y),x={type:"error",data:"parser error"},w=n(225);t.encodePacket=function(t,n,o,s){"function"===typeof n&&(s=n,n=!1),"function"===typeof o&&(s=o,o=null);var u=void 0===t.data?void 0:t.data.buffer||t.data;if(e.ArrayBuffer&&u instanceof ArrayBuffer)return i(t,n,s);if(w&&u instanceof e.Blob)return a(t,n,s);if(u&&u.base64)return r(t,s);var c=y[t.type];return void 0!==t.data&&(c+=o?d.encode(String(t.data),{strict:!1}):String(t.data)),s(""+c)},t.encodeBase64Packet=function(n,r){var i="b"+t.packets[n.type];if(w&&n.data instanceof e.Blob){var o=new FileReader;return o.onload=function(){var e=o.result.split(",")[1];r(i+e)},o.readAsDataURL(n.data)}var a;try{a=String.fromCharCode.apply(null,new Uint8Array(n.data))}catch(e){for(var s=new Uint8Array(n.data),u=new Array(s.length),c=0;c<s.length;c++)u[c]=s[c];a=String.fromCharCode.apply(null,u)}return i+=e.btoa(a),r(i)},t.decodePacket=function(e,n,r){if(void 0===e)return x;if("string"===typeof e){if("b"===e.charAt(0))return t.decodeBase64Packet(e.substr(1),n);if(r&&!1===(e=s(e)))return x;var i=e.charAt(0);return Number(i)==i&&b[i]?e.length>1?{type:b[i],data:e.substring(1)}:{type:b[i]}:x}var o=new Uint8Array(e),i=o[0],a=p(e,1);return w&&"blob"===n&&(a=new w([a])),{type:b[i],data:a}},t.decodeBase64Packet=function(e,t){var n=b[e.charAt(0)];if(!c)return{type:n,data:{base64:!0,data:e.substr(1)}};var r=c.decode(e.substr(1));return"blob"===t&&w&&(r=new w([r])),{type:n,data:r}},t.encodePayload=function(e,n,r){function i(e){return e.length+":"+e}function o(e,r){t.encodePacket(e,!!a&&n,!1,function(e){r(null,i(e))})}"function"===typeof n&&(r=n,n=null);var a=f(e);return n&&a?w&&!v?t.encodePayloadAsBlob(e,r):t.encodePayloadAsArrayBuffer(e,r):e.length?void u(e,o,function(e,t){return r(t.join(""))}):r("0:")},t.decodePayload=function(e,n,r){if("string"!==typeof e)return t.decodePayloadAsBinary(e,n,r);"function"===typeof n&&(r=n,n=null);var i;if(""===e)return r(x,0,1);for(var o,a,s="",u=0,c=e.length;u<c;u++){var l=e.charAt(u);if(":"===l){if(""===s||s!=(o=Number(s)))return r(x,0,1);if(a=e.substr(u+1,o),s!=a.length)return r(x,0,1);if(a.length){if(i=t.decodePacket(a,n,!1),x.type===i.type&&x.data===i.data)return r(x,0,1);if(!1===r(i,u+o,c))return}u+=o,s=""}else s+=l}return""!==s?r(x,0,1):void 0},t.encodePayloadAsArrayBuffer=function(e,n){function r(e,n){t.encodePacket(e,!0,!0,function(e){return n(null,e)})}if(!e.length)return n(new ArrayBuffer(0));u(e,r,function(e,t){var r=t.reduce(function(e,t){var n;return n="string"===typeof t?t.length:t.byteLength,e+n.toString().length+n+2},0),i=new Uint8Array(r),o=0;return t.forEach(function(e){var t="string"===typeof e,n=e;if(t){for(var r=new Uint8Array(e.length),a=0;a<e.length;a++)r[a]=e.charCodeAt(a);n=r.buffer}i[o++]=t?0:1;for(var s=n.byteLength.toString(),a=0;a<s.length;a++)i[o++]=parseInt(s[a]);i[o++]=255;for(var r=new Uint8Array(n),a=0;a<r.length;a++)i[o++]=r[a]}),n(i.buffer)})},t.encodePayloadAsBlob=function(e,n){function r(e,n){t.encodePacket(e,!0,!0,function(e){var t=new Uint8Array(1);if(t[0]=1,"string"===typeof e){for(var r=new Uint8Array(e.length),i=0;i<e.length;i++)r[i]=e.charCodeAt(i);e=r.buffer,t[0]=0}for(var o=e instanceof ArrayBuffer?e.byteLength:e.size,a=o.toString(),s=new Uint8Array(a.length+1),i=0;i<a.length;i++)s[i]=parseInt(a[i]);if(s[a.length]=255,w){var u=new w([t.buffer,s.buffer,e]);n(null,u)}})}u(e,r,function(e,t){return n(new w(t))})},t.decodePayloadAsBinary=function(e,n,r){"function"===typeof n&&(r=n,n=null);for(var i=e,o=[];i.byteLength>0;){for(var a=new Uint8Array(i),s=0===a[0],u="",c=1;255!==a[c];c++){if(u.length>310)return r(x,0,1);u+=a[c]}i=p(i,2+u.length),u=parseInt(u);var l=p(i,0,u);if(s)try{l=String.fromCharCode.apply(null,new Uint8Array(l))}catch(e){var f=new Uint8Array(l);l="";for(var c=0;c<f.length;c++)l+=String.fromCharCode(f[c])}o.push(l),i=p(i,u)}var h=o.length;o.forEach(function(e,i){r(t.decodePacket(e,n,!0),i,h)})}}).call(t,n(13))},function(e,t,n){"use strict";function r(e,t,n,i){if(!(this instanceof r))throw new SyntaxError("Constructor must be called with the new operator");this.fn=e,this.count=t,this.min=n,this.max=i,this.message="Wrong number of arguments in function "+e+" ("+t+" provided, "+n+(void 0!==i&&null!==i?"-"+i:"")+" expected)",this.stack=(new Error).stack}r.prototype=new Error,r.prototype.constructor=Error,r.prototype.name="ArgumentsError",r.prototype.isArgumentsError=!0,e.exports=r},function(e,t,n){"use strict";function r(e,t,r,c){function m(t,n){if(!(this instanceof m))throw new SyntaxError("Constructor must be called with the new operator");if(n&&!h(n))throw new Error("Invalid datatype: "+n);if(e.isMatrix(t))"DenseMatrix"===t.type?(this._data=u.clone(t._data),this._size=u.clone(t._size),this._datatype=n||t._datatype):(this._data=t.toArray(),this._size=t.size(),this._datatype=n||t._datatype);else if(t&&l(t.data)&&l(t.size))this._data=t.data,this._size=t.size,this._datatype=n||t.datatype;else if(l(t))this._data=N(t),this._size=s.size(this._data),s.validate(this._data,this._size),this._datatype=n;else{if(t)throw new TypeError("Unsupported type of data ("+i.types.type(t)+")");this._data=[],this._size=[0],this._datatype=n}}function g(t,n){if(!e.isIndex(n))throw new TypeError("Invalid index");if(n.isScalar())return t.get(n.min());var r=n.size();if(r.length!==t._size.length)throw new o(r.length,t._size.length);for(var i=n.min(),a=n.max(),s=0,u=t._size.length;s<u;s++)d(i[s],t._size[s]),d(a[s],t._size[s]);return new m(v(t._data,n,r.length,0),t._datatype)}function v(e,t,n,r){var i=r===n-1,o=t.dimension(r);return i?o.map(function(t){return d(t,e.length),e[t]}).valueOf():o.map(function(i){return d(i,e.length),v(e[i],t,n,r+1)}).valueOf()}function y(t,n,r,i){if(!n||!0!==n.isIndex)throw new TypeError("Invalid index");var a=n.size(),c=n.isScalar(),l=void 0;if(e.isMatrix(r)?(l=r.size(),r=r.valueOf()):l=s.size(r),c){if(0!==l.length)throw new TypeError("Scalar expected");t.set(n.min(),r,i)}else{if(a.length<t._size.length)throw new o(a.length,t._size.length,"<");if(l.length<a.length){for(var f=0,p=0;1===a[f]&&1===l[f];)f++;for(;1===a[f];)p++,f++;r=s.unsqueeze(r,a.length,p,l)}if(!u.deepEqual(a,l))throw new o(a,l,">");w(t,n.max().map(function(e){return e+1}),i);var h=a.length;b(t._data,n,r,h,0)}return t}function b(e,t,n,r,i){var o=i===r-1,a=t.dimension(i);o?a.forEach(function(t,r){d(t),e[t]=n[r[0]]}):a.forEach(function(o,a){d(o),b(e[o],t,n[a[0]],r,i+1)})}function x(e,t,n){if(0===t.length){for(var r=e._data;l(r);)r=r[0];return r}return e._size=t.slice(0),e._data=s.resize(e._data,e._size,n),e}function w(e,t,n){for(var r=e._size.slice(0),i=!1;r.length<t.length;)r.push(0),i=!0;for(var o=0,a=t.length;o<a;o++)t[o]>r[o]&&(r[o]=t[o],i=!0);i&&x(e,r,n)}function N(e){for(var t=0,n=e.length;t<n;t++){var r=e[t];l(r)?e[t]=N(r):r&&!0===r.isMatrix&&(e[t]=N(r.valueOf()))}return e}var E=r(n(98));return m.prototype=new E,m.prototype.type="DenseMatrix",m.prototype.isDenseMatrix=!0,m.prototype.storage=function(){return"dense"},m.prototype.datatype=function(){return this._datatype},m.prototype.create=function(e,t){return new m(e,t)},m.prototype.subset=function(e,t,n){switch(arguments.length){case 1:return g(this,e);case 2:case 3:return y(this,e,t,n);default:throw new SyntaxError("Wrong number of arguments")}},m.prototype.get=function(e){if(!l(e))throw new TypeError("Array expected");if(e.length!==this._size.length)throw new o(e.length,this._size.length);for(var t=0;t<e.length;t++)d(e[t],this._size[t]);for(var n=this._data,r=0,i=e.length;r<i;r++){var a=e[r];d(a,n.length),n=n[a]}return n},m.prototype.set=function(e,t,n){if(!l(e))throw new TypeError("Array expected");if(e.length<this._size.length)throw new o(e.length,this._size.length,"<");var r=void 0,i=void 0,a=void 0;w(this,e.map(function(e){return e+1}),n);var s=this._data;for(r=0,i=e.length-1;r<i;r++)a=e[r],d(a,s.length),s=s[a];return a=e[e.length-1],d(a,s.length),s[a]=t,this},m.prototype.resize=function(e,t,n){if(!l(e))throw new TypeError("Array expected");return x(n?this.clone():this,e,t)},m.prototype.reshape=function(e,t){var n=t?this.clone():this;return n._data=s.reshape(n._data,e),n._size=e.slice(0),n},m.prototype.clone=function(){return new m({data:u.clone(this._data),size:u.clone(this._size),datatype:this._datatype})},m.prototype.size=function(){return this._size.slice(0)},m.prototype.map=function(e){var t=this;return new m({data:function n(r,i){return l(r)?r.map(function(e,t){return n(e,i.concat(t))}):e(r,i,t)}(this._data,[]),size:u.clone(this._size),datatype:this._datatype})},m.prototype.forEach=function(e){var t=this;!function n(r,i){l(r)?r.forEach(function(e,t){n(e,i.concat(t))}):e(r,i,t)}(this._data,[])},m.prototype.toArray=function(){return u.clone(this._data)},m.prototype.valueOf=function(){return this._data},m.prototype.format=function(e){return a.format(this._data,e)},m.prototype.toString=function(){return a.format(this._data)},m.prototype.toJSON=function(){return{mathjs:"DenseMatrix",data:this._data,size:this._size,datatype:this._datatype}},m.prototype.diagonal=function(t){if(t){if(e.isBigNumber(t)&&(t=t.toNumber()),!f(t)||!p(t))throw new TypeError("The parameter k must be an integer number")}else t=0;for(var n=t>0?t:0,r=t<0?-t:0,i=this._size[0],o=this._size[1],a=Math.min(i-r,o-n),s=[],u=0;u<a;u++)s[u]=this._data[u+r][u+n];return new m({data:s,size:[a],datatype:this._datatype})},m.diagonal=function(t,n,r,i,o){if(!l(t))throw new TypeError("Array expected, size parameter");if(2!==t.length)throw new Error("Only two dimensions matrix are supported");if(t=t.map(function(t){if(e.isBigNumber(t)&&(t=t.toNumber()),!f(t)||!p(t)||t<1)throw new Error("Size values must be positive integers");return t}),r){if(e.isBigNumber(r)&&(r=r.toNumber()),!f(r)||!p(r))throw new TypeError("The parameter k must be an integer number")}else r=0;i&&h(o)&&(i=c.convert(i,o));var a=r>0?r:0,u=r<0?-r:0,d=t[0],g=t[1],v=Math.min(d-u,g-a),y=void 0;if(l(n)){if(n.length!==v)throw new Error("Invalid value array length");y=function(e){return n[e]}}else if(e.isMatrix(n)){var b=n.size();if(1!==b.length||b[0]!==v)throw new Error("Invalid matrix length");y=function(e){return n.get([e])}}else y=function(){return n};i||(i=e.isBigNumber(y(0))?new e.BigNumber(0):0);var x=[];if(t.length>0){x=s.resize(x,t,i);for(var w=0;w<v;w++)x[w+u][w+a]=y(w)}return new m({data:x,size:[d,g]})},m.fromJSON=function(e){return new m(e)},m.prototype.swapRows=function(e,t){if(!f(e)||!p(e)||!f(t)||!p(t))throw new Error("Row index must be positive integers");if(2!==this._size.length)throw new Error("Only two dimensional matrix is supported");return d(e,this._size[0]),d(t,this._size[0]),m._swapRows(e,t,this._data),this},m._swapRows=function(e,t,n){var r=n[e];n[e]=n[t],n[t]=r},e.Matrix._storage.dense=m,e.Matrix._storage.default=m,m}var i=n(32),o=n(12),a=i.string,s=i.array,u=i.object,c=i.number,l=Array.isArray,f=c.isNumber,p=c.isInteger,h=a.isString,d=s.validateIndex;t.name="DenseMatrix",t.path="type",t.factory=r,t.lazy=!1},function(e,t,n){"use strict";function r(e,t,r,a){function s(e,t){switch(e.length){case 0:return t?c(t):[];case 1:return u(e[0],e[0],t);case 2:return u(e[0],e[1],t);default:throw new Error("Vector containing two values expected")}}function u(t,n,r){var a=e.isBigNumber(t)||e.isBigNumber(n)?e.BigNumber:null;if(e.isBigNumber(t)&&(t=t.toNumber()),e.isBigNumber(n)&&(n=n.toNumber()),!o(t)||t<1)throw new Error("Parameters in function identity must be positive integers");if(!o(n)||n<1)throw new Error("Parameters in function identity must be positive integers");var s=a?new e.BigNumber(1):1,u=a?new a(0):0,c=[t,n];if(r){return e.Matrix.storage(r).diagonal(c,s,0,u)}for(var l=i.resize([],c,u),f=t<n?t:n,p=0;p<f;p++)l[p][p]=s;return l}var c=r(n(1)),l=a("identity",{"":function(){return"Matrix"===t.matrix?c([]):[]},string:function(e){return c(e)},"number | BigNumber":function(e){return u(e,e,"Matrix"===t.matrix?"default":void 0)},"number | BigNumber, string":function(e,t){return u(e,e,t)},"number | BigNumber, number | BigNumber":function(e,n){return u(e,n,"Matrix"===t.matrix?"default":void 0)},"number | BigNumber, number | BigNumber, string":function(e,t,n){return u(e,t,n)},Array:function(e){return s(e)},"Array, string":function(e,t){return s(e,t)},Matrix:function(e){return s(e.valueOf(),e.storage())},"Matrix, string":function(e,t){return s(e.valueOf(),t)}});return l.toTex=void 0,l}var i=n(2),o=n(3).isInteger;t.name="identity",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,i){var o=r(n(1)),a=r(n(11)),s=r(n(19)),u=r(n(29)),c=r(n(20)),l=r(n(8)),f=r(n(6)),p=n(4),h=i("equal",{"any, any":function(e,t){return null===e?null===t:null===t?null===e:void 0===e?void 0===t:void 0===t?void 0===e:a(e,t)},"SparseMatrix, SparseMatrix":function(e,t){return u(e,t,a)},"SparseMatrix, DenseMatrix":function(e,t){return s(t,e,a,!0)},"DenseMatrix, SparseMatrix":function(e,t){return s(e,t,a,!1)},"DenseMatrix, DenseMatrix":function(e,t){return l(e,t,a)},"Array, Array":function(e,t){return h(o(e),o(t)).valueOf()},"Array, Matrix":function(e,t){return h(o(e),t)},"Matrix, Array":function(e,t){return h(e,o(t))},"SparseMatrix, any":function(e,t){return c(e,t,a,!1)},"DenseMatrix, any":function(e,t){return f(e,t,a,!1)},"any, SparseMatrix":function(e,t){return c(t,e,a,!0)},"any, DenseMatrix":function(e,t){return f(t,e,a,!0)},"Array, any":function(e,t){return f(o(e),t,a,!1).valueOf()},"any, Array":function(e,t){return f(o(t),e,a,!0).valueOf()}});return h.toTex={2:"\\left(${args[0]}"+p.operators.equal+"${args[1]}\\right)"},h}t.name="equal",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,u,c){function l(t){return!!e.Unit&&e.Unit.isValuelessUnit(t)}function f(e){if(!(this instanceof f))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}function p(e){throw new Error("Undefined symbol "+e)}var h=r(n(22));return f.prototype=new h,f.prototype.type="SymbolNode",f.prototype.isSymbolNode=!0,f.prototype._compile=function(t,n){var r=this.name;if(a(n,r))return function(e,t,n){return t[r]};if(r in t)return function(e,n,i){return r in e?s(e,r):s(t,r)};var i=l(r);return function(t,n,o){return r in t?s(t,r):i?new e.Unit(null,r):p(r)}},f.prototype.forEach=function(e){},f.prototype.map=function(e){return this.clone()},f.prototype.clone=function(){return new f(this.name)},f.prototype._toString=function(e){return this.name},f.prototype.toHTML=function(e){var t=o(this.name);return"true"===t||"false"===t?'<span class="math-symbol math-boolean">'+t+"</span>":"i"===t?'<span class="math-symbol math-imaginary-symbol">'+t+"</span>":"Infinity"===t?'<span class="math-symbol math-infinity-symbol">'+t+"</span>":"NaN"===t?'<span class="math-symbol math-nan-symbol">'+t+"</span>":"null"===t?'<span class="math-symbol math-null-symbol">'+t+"</span>":"undefined"===t?'<span class="math-symbol math-undefined-symbol">'+t+"</span>":'<span class="math-symbol">'+t+"</span>"},f.prototype.toJSON=function(){return{mathjs:"SymbolNode",name:this.name}},f.fromJSON=function(e){return new f(e.name)},f.prototype._toTex=function(e){var t=!1;"undefined"===typeof c[this.name]&&l(this.name)&&(t=!0);var n=i.toSymbol(this.name,t);return"\\"===n[0]?n:" "+n},f}var i=n(4),o=n(9).escape,a=n(5).hasOwnProperty,s=n(17).getSafeProperty;t.name="SymbolNode",t.path="expression.node",t.math=!0,t.factory=r},function(e,t,n){"use strict";var r=n(75);e.exports=function(e){return Array.isArray(e)||r(e)}},function(e,t,n){"use strict";function r(e,t,r,a){var s=r(n(1)),u=r(n(19)),c=r(n(76)),l=r(n(20)),f=r(n(8)),p=r(n(6)),h=a("compare",{"boolean, boolean":function(e,t){return e===t?0:e>t?1:-1},"number, number":function(e,n){return e===n||i(e,n,t.epsilon)?0:e>n?1:-1},"BigNumber, BigNumber":function(n,r){return n.eq(r)||o(n,r,t.epsilon)?new e.BigNumber(0):new e.BigNumber(n.cmp(r))},"Fraction, Fraction":function(t,n){return new e.Fraction(t.compare(n))},"Complex, Complex":function(){throw new TypeError("No ordering relation is defined for complex numbers")},"Unit, Unit":function(e,t){if(!e.equalBase(t))throw new Error("Cannot compare units with different base");return h(e.value,t.value)},"SparseMatrix, SparseMatrix":function(e,t){return c(e,t,h)},"SparseMatrix, DenseMatrix":function(e,t){return u(t,e,h,!0)},"DenseMatrix, SparseMatrix":function(e,t){return u(e,t,h,!1)},"DenseMatrix, DenseMatrix":function(e,t){return f(e,t,h)},"Array, Array":function(e,t){return h(s(e),s(t)).valueOf()},"Array, Matrix":function(e,t){return h(s(e),t)},"Matrix, Array":function(e,t){return h(e,s(t))},"SparseMatrix, any":function(e,t){return l(e,t,h,!1)},"DenseMatrix, any":function(e,t){return p(e,t,h,!1)},"any, SparseMatrix":function(e,t){return l(t,e,h,!0)},"any, DenseMatrix":function(e,t){return p(t,e,h,!0)},"Array, any":function(e,t){return p(s(e),t,h,!1).valueOf()},"any, Array":function(e,t){return p(s(t),e,h,!0).valueOf()}});return h.toTex=void 0,h}var i=n(3).nearlyEqual,o=n(42);t.name="compare",t.factory=r},function(e,t,n){"use strict";function r(e,t,n){if(!(this instanceof r))throw new SyntaxError("Constructor must be called with the new operator");this.index=e,arguments.length<3?(this.min=0,this.max=t):(this.min=t,this.max=n),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}r.prototype=new RangeError,r.prototype.constructor=RangeError,r.prototype.name="IndexError",r.prototype.isIndexError=!0,e.exports=r},function(e,t,n){"use strict";function r(e,t){var n=e;"keep"!==t&&(n=e.getContent());for(var r=n.getIdentifier(),i=0;i<a.length;i++)if(r in a[i])return i;return null}function i(e,t){var n=e;"keep"!==t&&(n=e.getContent());var i=n.getIdentifier(),o=r(n,t);if(null===o)return null;var s=a[o][i];if(s.hasOwnProperty("associativity")){if("left"===s.associativity)return"left";if("right"===s.associativity)return"right";throw Error("'"+i+"' has the invalid associativity '"+s.associativity+"'.")}return null}function o(e,t,n){var i="keep"!==n?e.getContent():e,o="keep"!==n?e.getContent():t,s=i.getIdentifier(),u=o.getIdentifier(),c=r(i,n);if(null===c)return null;var l=a[c][s];if(l.hasOwnProperty("associativeWith")&&l.associativeWith instanceof Array){for(var f=0;f<l.associativeWith.length;f++)if(l.associativeWith[f]===u)return!0;return!1}return null}var a=[{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:[]}},{"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"}}];e.exports.properties=a,e.exports.getPrecedence=r,e.exports.getAssociativity=i,e.exports.isAssociativeWith=o},function(e,t,n){"use strict";function r(e,t,r,a){function s(e){if(!(this instanceof s))throw new SyntaxError("Constructor must be called with the new operator");if(2===arguments.length)throw new SyntaxError("new ConstantNode(valueStr, valueType) is not supported anymore since math v4.0.0. Use new ConstantNode(value) instead, where value is a non-stringified value.");this.value=e}var u=r(n(22)),c=r(n(38));return s.prototype=new u,s.prototype.type="ConstantNode",s.prototype.isConstantNode=!0,s.prototype._compile=function(e,t){var n=this.value;return function(){return n}},s.prototype.forEach=function(e){},s.prototype.map=function(e){return this.clone()},s.prototype.clone=function(){return new s(this.value)},s.prototype._toString=function(e){return i(this.value,e)},s.prototype.toHTML=function(e){var t=this._toString(e);switch(c(this.value)){case"number":case"BigNumber":case"Fraction":return'<span class="math-number">'+t+"</span>";case"string":return'<span class="math-string">'+t+"</span>";case"boolean":return'<span class="math-boolean">'+t+"</span>";case"null":return'<span class="math-null-symbol">'+t+"</span>";case"undefined":return'<span class="math-undefined">'+t+"</span>";default:return'<span class="math-symbol">'+t+"</span>"}},s.prototype.toJSON=function(){return{mathjs:"ConstantNode",value:this.value}},s.fromJSON=function(e){return new s(e.value)},s.prototype._toTex=function(e){var t=this._toString(e);switch(c(this.value)){case"string":return"\\mathtt{"+o(t)+"}";case"number":case"BigNumber":var n=t.toLowerCase().indexOf("e");return-1!==n?t.substring(0,n)+"\\cdot10^{"+t.substring(n+1)+"}":t;case"Fraction":return this.value.toLatex();default:return t}},s}var i=n(9).format,o=n(4).escape;t.name="ConstantNode",t.path="expression.node",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,l){function f(t,n,r,i){if(!(this instanceof f))throw new SyntaxError("Constructor must be called with the new operator");if("string"!==typeof t)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(e.isNode))throw new TypeError('Array containing Nodes expected for parameter "args"');this.implicit=!0===i,this.op=t,this.fn=n,this.args=r||[]}function p(e,t,n,r,i){var o=c.getPrecedence(e,t),a=c.getAssociativity(e,t);if("all"===t||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}})}var s=void 0;switch(r.length){case 0:s=[];break;case 1:var u=c.getPrecedence(r[0],t);if(i&&null!==u){var l=void 0,f=void 0;if("keep"===t?(l=r[0].getIdentifier(),f=e.getIdentifier()):(l=r[0].getContent().getIdentifier(),f=e.getContent().getIdentifier()),!1===c.properties[o][f].latexLeftParens){s=[!1];break}if(!1===c.properties[u][l].latexParens){s=[!1];break}}if(null===u){s=[!1];break}if(u<=o){s=[!0];break}s=[!1];break;case 2:var p=void 0,h=c.getPrecedence(r[0],t),d=c.isAssociativeWith(e,r[0],t);p=null!==h&&(h===o&&"right"===a&&!d||h<o);var m=void 0,g=c.getPrecedence(r[1],t),v=c.isAssociativeWith(e,r[1],t);if(m=null!==g&&(g===o&&"left"===a&&!v||g<o),i){var y=void 0,b=void 0,x=void 0;"keep"===t?(y=e.getIdentifier(),b=e.args[0].getIdentifier(),x=e.args[1].getIdentifier()):(y=e.getContent().getIdentifier(),b=e.args[0].getContent().getIdentifier(),x=e.args[1].getContent().getIdentifier()),null!==h&&(!1===c.properties[o][y].latexLeftParens&&(p=!1),!1===c.properties[h][b].latexParens&&(p=!1)),null!==g&&(!1===c.properties[o][y].latexRightParens&&(m=!1),!1===c.properties[g][x].latexParens&&(m=!1))}s=[p,m];break;default:"OperatorNode:add"!==e.getIdentifier()&&"OperatorNode:multiply"!==e.getIdentifier()||(s=r.map(function(n){var r=c.getPrecedence(n,t),i=c.isAssociativeWith(e,n,t),s=c.getAssociativity(n,t);return null!==r&&(o===r&&a===s&&!i||r<o)}))}return r.length>=2&&"OperatorNode:multiply"===e.getIdentifier()&&e.implicit&&"auto"===t&&"hide"===n&&(s=r.map(function(e,t){var n="ParenthesisNode"===e.getIdentifier();return!(!s[t]&&!n)})),s}var h=r(n(22));return f.prototype=new h,f.prototype.type="OperatorNode",f.prototype.isOperatorNode=!0,f.prototype._compile=function(e,t){if("string"!==typeof this.fn||!s(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 n=u(e,this.fn),r=o(this.args,function(n){return n._compile(e,t)});if(1===r.length){var i=r[0];return function(e,t,r){return n(i(e,t,r))}}if(2===r.length){var a=r[0],c=r[1];return function(e,t,r){return n(a(e,t,r),c(e,t,r))}}return function(e,t,i){return n.apply(null,o(r,function(n){return n(e,t,i)}))}},f.prototype.forEach=function(e){for(var t=0;t<this.args.length;t++)e(this.args[t],"args["+t+"]",this)},f.prototype.map=function(e){for(var t=[],n=0;n<this.args.length;n++)t[n]=this._ifNode(e(this.args[n],"args["+n+"]",this));return new f(this.op,this.fn,t,this.implicit)},f.prototype.clone=function(){return new f(this.op,this.fn,this.args.slice(0),this.implicit)},f.prototype.isUnary=function(){return 1===this.args.length},f.prototype.isBinary=function(){return 2===this.args.length},f.prototype._toString=function(e){var t=e&&e.parenthesis?e.parenthesis:"keep",n=e&&e.implicit?e.implicit:"hide",r=this.args,i=p(this,t,n,r,!1);if(1===r.length){var o=c.getAssociativity(this,t),a=r[0].toString(e);return i[0]&&(a="("+a+")"),"right"===o?this.op+a:a+this.op}if(2===r.length){var s=r[0].toString(e),u=r[1].toString(e);return i[0]&&(s="("+s+")"),i[1]&&(u="("+u+")"),this.implicit&&"OperatorNode:multiply"===this.getIdentifier()&&"hide"===n?s+" "+u:s+" "+this.op+" "+u}if(r.length>2&&("OperatorNode:add"===this.getIdentifier()||"OperatorNode:multiply"===this.getIdentifier())){var l=r.map(function(t,n){return t=t.toString(e),i[n]&&(t="("+t+")"),t});return this.implicit&&"OperatorNode:multiply"===this.getIdentifier()&&"hide"===n?l.join(" "):l.join(" "+this.op+" ")}return this.fn+"("+this.args.join(", ")+")"},f.prototype.toJSON=function(){return{mathjs:"OperatorNode",op:this.op,fn:this.fn,args:this.args,implicit:this.implicit}},f.fromJSON=function(e){return new f(e.op,e.fn,e.args,e.implicit)},f.prototype.toHTML=function(e){var t=e&&e.parenthesis?e.parenthesis:"keep",n=e&&e.implicit?e.implicit:"hide",r=this.args,i=p(this,t,n,r,!1);if(1===r.length){var o=c.getAssociativity(this,t),s=r[0].toHTML(e);return i[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">'+a(this.op)+"</span>"+s:'<span class="math-operator math-unary-operator math-righthand-unary-operator">'+a(this.op)+"</span>"+s}if(2===r.length){var u=r[0].toHTML(e),l=r[1].toHTML(e);return i[0]&&(u='<span class="math-parenthesis math-round-parenthesis">(</span>'+u+'<span class="math-parenthesis math-round-parenthesis">)</span>'),i[1]&&(l='<span class="math-parenthesis math-round-parenthesis">(</span>'+l+'<span class="math-parenthesis math-round-parenthesis">)</span>'),this.implicit&&"OperatorNode:multiply"===this.getIdentifier()&&"hide"===n?u+'<span class="math-operator math-binary-operator math-implicit-binary-operator"></span>'+l:u+'<span class="math-operator math-binary-operator math-explicit-binary-operator">'+a(this.op)+"</span>"+l}var f=r.map(function(t,n){return t=t.toHTML(e),i[n]&&(t='<span class="math-parenthesis math-round-parenthesis">(</span>'+t+'<span class="math-parenthesis math-round-parenthesis">)</span>'),t});return r.length>2&&("OperatorNode:add"===this.getIdentifier()||"OperatorNode:multiply"===this.getIdentifier())?this.implicit&&"OperatorNode:multiply"===this.getIdentifier()&&"hide"===n?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">'+a(this.op)+"</span>"):'<span class="math-function">'+a(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>'},f.prototype._toTex=function(e){var t=e&&e.parenthesis?e.parenthesis:"keep",n=e&&e.implicit?e.implicit:"hide",r=this.args,o=p(this,t,n,r,!0),a=i.operators[this.fn];if(a="undefined"===typeof a?this.op:a,1===r.length){var s=c.getAssociativity(this,t),u=r[0].toTex(e);return o[0]&&(u="\\left("+u+"\\right)"),"right"===s?a+u:u+a}if(2===r.length){var l=r[0],f=l.toTex(e);o[0]&&(f="\\left("+f+"\\right)");var h=r[1],d=h.toTex(e);o[1]&&(d="\\left("+d+"\\right)");var m=void 0;switch(m="keep"===t?l.getIdentifier():l.getContent().getIdentifier(),this.getIdentifier()){case"OperatorNode:divide":return a+"{"+f+"}{"+d+"}";case"OperatorNode:pow":switch(f="{"+f+"}",d="{"+d+"}",m){case"ConditionalNode":case"OperatorNode:divide":f="\\left("+f+"\\right)"}break;case"OperatorNode:multiply":if(this.implicit&&"hide"===n)return f+"~"+d}return f+a+d}if(r.length>2&&("OperatorNode:add"===this.getIdentifier()||"OperatorNode:multiply"===this.getIdentifier())){var g=r.map(function(t,n){return t=t.toTex(e),o[n]&&(t="\\left("+t+"\\right)"),t});return"OperatorNode:multiply"===this.getIdentifier()&&this.implicit?g.join("~"):g.join(a)}return"\\mathrm{"+this.fn+"}\\left("+r.map(function(t){return t.toTex(e)}).join(",")+"\\right)"},f.prototype.getIdentifier=function(){return this.type+":"+this.fn},f}var i=n(4),o=n(2).map,a=n(9).escape,s=n(17).isSafeMethod,u=n(17).getSafeProperty,c=n(64);t.name="OperatorNode",t.path="expression.node",t.factory=r},function(e,t,n){"use strict";function r(e,t,n,r){var o=r("isZero",{number:function(e){return 0===e},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 o(e.value)},"Array | Matrix":function(e){return i(e,o)}});return o}var i=n(0);t.name="isZero",t.factory=r},function(e,t,n){"use strict";function r(e,t,n,r){var o=r("isNegative",{number:function(e){return e<0},BigNumber:function(e){return e.isNeg()&&!e.isZero()&&!e.isNaN()},Fraction:function(e){return e.s<0},Unit:function(e){return o(e.value)},"Array | Matrix":function(e){return i(e,o)}});return o}var i=n(0);t.name="isNegative",t.factory=r},function(e,t,n){"use strict";function r(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}var i=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,s,u=r(e),c=1;c<arguments.length;c++){n=Object(arguments[c]);for(var l in n)o.call(n,l)&&(u[l]=n[l]);if(i){s=i(n);for(var f=0;f<s.length;f++)a.call(n,s[f])&&(u[s[f]]=n[s[f]])}}return u}},function(e,t,n){"use strict";function r(e,t,n,r,o,a,s,u){if(i(t),!e){var c;if(void 0===t)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,o,a,s,u],f=0;c=new Error(t.replace(/%s/g,function(){return l[f++]})),c.name="Invariant Violation"}throw c.framesToPop=1,c}}var i=function(e){};e.exports=r},function(e,t,n){(function(r){function i(){return!("undefined"===typeof window||!window.process||"renderer"!==window.process.type)||("undefined"===typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!==typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!==typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!==typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!==typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))}function o(e){var n=this.useColors;if(e[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+e[0]+(n?"%c ":" ")+"+"+t.humanize(this.diff),n){var r="color: "+this.color;e.splice(1,0,r,"color: inherit");var i=0,o=0;e[0].replace(/%[a-zA-Z%]/g,function(e){"%%"!==e&&(i++,"%c"===e&&(o=i))}),e.splice(o,0,r)}}function a(){return"object"===typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function s(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}}function u(){var e;try{e=t.storage.debug}catch(e){}return!e&&"undefined"!==typeof r&&"env"in r&&(e=Object({NODE_ENV:"production",PUBLIC_URL:""}).DEBUG),e}t=e.exports=n(210),t.log=a,t.formatArgs=o,t.save=s,t.load=u,t.useColors=i,t.storage="undefined"!=typeof chrome&&"undefined"!=typeof chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},t.enable(u())}).call(t,n(91))},function(e,t){t.encode=function(e){var t="";for(var n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t},t.decode=function(e){for(var t={},n=e.split("&"),r=0,i=n.length;r<i;r++){var o=n[r].split("=");t[decodeURIComponent(o[0])]=decodeURIComponent(o[1])}return t}},function(e,t){e.exports=function(e,t){var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t,n){(function(r){function i(){return!("undefined"===typeof window||!window.process||"renderer"!==window.process.type)||("undefined"===typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!==typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!==typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!==typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!==typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))}function o(e){var n=this.useColors;if(e[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+e[0]+(n?"%c ":" ")+"+"+t.humanize(this.diff),n){var r="color: "+this.color;e.splice(1,0,r,"color: inherit");var i=0,o=0;e[0].replace(/%[a-zA-Z%]/g,function(e){"%%"!==e&&(i++,"%c"===e&&(o=i))}),e.splice(o,0,r)}}function a(){return"object"===typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function s(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}}function u(){var e;try{e=t.storage.debug}catch(e){}return!e&&"undefined"!==typeof r&&"env"in r&&(e=Object({NODE_ENV:"production",PUBLIC_URL:""}).DEBUG),e}t=e.exports=n(226),t.log=a,t.formatArgs=o,t.save=s,t.load=u,t.useColors=i,t.storage="undefined"!=typeof chrome&&"undefined"!=typeof chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},t.enable(u())}).call(t,n(91))},function(e,t,n){"use strict";e.exports=function(e){return e&&e.constructor.prototype.isMatrix||!1}},function(e,t,n){"use strict";function r(e,t,r,o){var a=r(n(11)),s=e.SparseMatrix;return function(e,t,n){var r=e._values,u=e._index,c=e._ptr,l=e._size,f=e._datatype,p=t._values,h=t._index,d=t._ptr,m=t._size,g=t._datatype;if(l.length!==m.length)throw new i(l.length,m.length);if(l[0]!==m[0]||l[1]!==m[1])throw new RangeError("Dimension mismatch. Matrix A ("+l+") must match Matrix B ("+m+")");var v=l[0],y=l[1],b=void 0,x=a,w=0,N=n;"string"===typeof f&&f===g&&(b=f,x=o.find(a,[b,b]),w=o.convert(0,b),N=o.find(n,[b,b]));var E=r&&p?[]:void 0,C=[],S=[],M=new s({values:E,index:C,ptr:S,size:[v,y],datatype:b}),T=E?[]:void 0,O=E?[]:void 0,k=[],A=[],_=void 0,P=void 0,R=void 0,I=void 0;for(P=0;P<y;P++){S[P]=C.length;var F=P+1;for(R=c[P],I=c[P+1];R<I;R++)_=u[R],C.push(_),k[_]=F,T&&(T[_]=r[R]);for(R=d[P],I=d[P+1];R<I;R++)_=h[R],k[_]!==F&&C.push(_),A[_]=F,O&&(O[_]=p[R]);if(E)for(R=S[P];R<C.length;){_=C[R];var D=k[_],L=A[_];if(D===F||L===F){var B=D===F?T[_]:w,z=L===F?O[_]:w,j=N(B,z);x(j,w)?C.splice(R,1):(E.push(j),R++)}}}return S[y]=C.length,M}}var i=n(12);t.name="algorithm05",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,i){function o(t){if(!(this instanceof o))throw new SyntaxError("Constructor must be called with the new operator");if(!e.isNode(t))throw new TypeError('Node expected for parameter "content"');this.content=t}var a=r(n(22));return o.prototype=new a,o.prototype.type="ParenthesisNode",o.prototype.isParenthesisNode=!0,o.prototype._compile=function(e,t){return this.content._compile(e,t)},o.prototype.getContent=function(){return this.content.getContent()},o.prototype.forEach=function(e){e(this.content,"content",this)},o.prototype.map=function(e){return new o(e(this.content,"content",this))},o.prototype.clone=function(){return new o(this.content)},o.prototype._toString=function(e){return!e||e&&!e.parenthesis||e&&"keep"===e.parenthesis?"("+this.content.toString(e)+")":this.content.toString(e)},o.prototype.toJSON=function(){return{mathjs:"ParenthesisNode",content:this.content}},o.fromJSON=function(e){return new o(e.content)},o.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)},o.prototype._toTex=function(e){return!e||e&&!e.parenthesis||e&&"keep"===e.parenthesis?"\\left("+this.content.toTex(e)+"\\right)":this.content.toTex(e)},o}t.name="ParenthesisNode",t.path="expression.node",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,f,p){function h(t,n){if(!(this instanceof h))throw new SyntaxError("Constructor must be called with the new operator");if("string"===typeof t&&(t=new g(t)),!e.isNode(t))throw new TypeError('Node expected as parameter "fn"');if(!Array.isArray(n)||!n.every(e.isNode))throw new TypeError('Array containing Nodes expected for parameter "args"');this.fn=t,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")}});var r=function(){throw new Error("Property `FunctionNode.object` is deprecated, use `FunctionNode.fn` instead")};Object.defineProperty(this,"object",{get:r,set:r})}function d(t,n,r){for(var o="",a=new RegExp("\\$(?:\\{([a-z_][a-z_0-9]*)(?:\\[([0-9]+)\\])?\\}|\\$)","ig"),s=0,u=void 0;null!==(u=a.exec(t));)if(o+=t.substring(s,u.index),s=u.index,"$$"===u[0])o+="$",s++;else{s+=u[0].length;var c=n[u[1]];if(!c)throw new ReferenceError("Template: Property "+u[1]+" does not exist.");if(void 0===u[2])switch("undefined"===typeof c?"undefined":i(c)){case"string":o+=c;break;case"object":if(e.isNode(c))o+=c.toTex(r);else{if(!Array.isArray(c))throw new TypeError("Template: "+u[1]+" has to be a Node, String or array of Nodes");o+=c.map(function(t,n){if(e.isNode(t))return t.toTex(r);throw new TypeError("Template: "+u[1]+"["+n+"] is not a Node.")}).join(",")}break;default:throw new TypeError("Template: "+u[1]+" has to be a Node, String or array of Nodes")}else{if(!e.isNode(c[u[2]]&&c[u[2]]))throw new TypeError("Template: "+u[1]+"["+u[2]+"] is not a Node.");o+=c[u[2]].toTex(r)}}return o+=t.slice(s)}var m=r(n(22)),g=r(n(60));h.prototype=new m,h.prototype.type="FunctionNode",h.prototype.isFunctionNode=!0,h.prototype._compile=function(t,n){if(!(this instanceof h))throw new TypeError("No valid FunctionNode");var r=u(this.args,function(e){return e._compile(t,n)});if(e.isSymbolNode(this.fn)){var i=this.fn.name,o=i in t?l(t,i):void 0;if("function"===typeof o&&!0===o.rawArgs){var a=this.args;return function(e,n,r){return(i in e?l(e,i):o)(a,t,e)}}if(1===r.length){var s=r[0];return function(e,t,n){return(i in e?l(e,i):o)(s(e,t,n))}}if(2===r.length){var f=r[0],p=r[1];return function(e,t,n){return(i in e?l(e,i):o)(f(e,t,n),p(e,t,n))}}return function(e,t,n){return(i in e?l(e,i):o).apply(null,u(r,function(r){return r(e,t,n)}))}}if(e.isAccessorNode(this.fn)&&e.isIndexNode(this.fn.index)&&this.fn.index.isObjectProperty()){var d=this.fn.object._compile(t,n),m=this.fn.index.getObjectProperty(),g=this.args;return function(e,n,i){var o=d(e,n,i);return c(o,m),o[m]&&o[m].rawArgs?o[m](g,t,e):o[m].apply(o,u(r,function(t){return t(e,n,i)}))}}var v=this.fn._compile(t,n),y=this.args;return function(e,n,i){var o=v(e,n,i);return o&&o.rawArgs?o(y,t,e):o.apply(o,u(r,function(t){return t(e,n,i)}))}},h.prototype.forEach=function(e){for(var t=0;t<this.args.length;t++)e(this.args[t],"args["+t+"]",this)},h.prototype.map=function(e){for(var t=this.fn.map(e),n=[],r=0;r<this.args.length;r++)n[r]=this._ifNode(e(this.args[r],"args["+r+"]",this));return new h(t,n)},h.prototype.clone=function(){return new h(this.fn,this.args.slice(0))};var v=h.prototype.toString;h.prototype.toString=function(e){var t=void 0,n=this.fn.toString(e);return e&&"object"===i(e.handler)&&s(e.handler,n)&&(t=e.handler[n](this,e)),"undefined"!==typeof t?t:v.call(this,e)},h.prototype._toString=function(t){var n=this.args.map(function(e){return e.toString(t)});return(e.isFunctionAssignmentNode(this.fn)?"("+this.fn.toString(t)+")":this.fn.toString(t))+"("+n.join(", ")+")"},h.prototype.toJSON=function(){return{mathjs:"FunctionNode",fn:this.fn,args:this.args}},h.fromJSON=function(e){return new h(e.fn,e.args)},h.prototype.toHTML=function(e){var t=this.args.map(function(t){return t.toHTML(e)});return'<span class="math-function">'+a(this.fn)+'</span><span class="math-paranthesis math-round-parenthesis">(</span>'+t.join('<span class="math-separator">,</span>')+'<span class="math-paranthesis math-round-parenthesis">)</span>'};var y=h.prototype.toTex;return h.prototype.toTex=function(e){var t=void 0;return e&&"object"===i(e.handler)&&s(e.handler,this.name)&&(t=e.handler[this.name](this,e)),"undefined"!==typeof t?t:y.call(this,e)},h.prototype._toTex=function(e){var t=this.args.map(function(t){return t.toTex(e)}),n=void 0;!p[this.name]||"function"!==typeof p[this.name].toTex&&"object"!==i(p[this.name].toTex)&&"string"!==typeof p[this.name].toTex||(n=p[this.name].toTex);var r=void 0;switch("undefined"===typeof n?"undefined":i(n)){case"function":r=n(this,e);break;case"string":r=d(n,this,e);break;case"object":switch(i(n[t.length])){case"function":r=n[t.length](this,e);break;case"string":r=d(n[t.length],this,e)}}return"undefined"!==typeof r?r:d(o.defaultTemplate,this,e)},h.prototype.getIdentifier=function(){return this.type+":"+this.name},h}var i="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},o=n(4),a=n(9).escape,s=n(5).hasOwnProperty,u=n(2).map,c=n(17).validateSafeMethod,l=n(17).getSafeProperty;t.name="FunctionNode",t.path="expression.node",t.math=!0,t.factory=r},function(e,t,n){"use strict";function r(e,t,r,c){var l=r(n(1)),f=r(n(39)),p=c("concat",{"...Array | Matrix | number | BigNumber":function(t){var n=void 0,r=t.length,c=-1,p=void 0,h=!1,d=[];for(n=0;n<r;n++){var m=t[n];if(e.isMatrix(m)&&(h=!0),e.isNumber(m)||e.isBigNumber(m)){if(n!==r-1)throw new Error("Dimension must be specified as last argument");if(p=c,c=m.valueOf(),!f(c))throw new TypeError("Integer number expected for dimension");if(c<0||n>0&&c>p)throw new s(c,p+1)}else{var g=o(m).valueOf(),v=a.size(g);if(d[n]=g,p=c,c=v.length-1,n>0&&c!==p)throw new u(p+1,c+1)}}if(0===d.length)throw new SyntaxError("At least one matrix expected");for(var y=d.shift();d.length;)y=i(y,d.shift(),c,0);return h?l(y):y},"...string":function(e){return e.join("")}});return p.toTex=void 0,p}function i(e,t,n,r){if(r<n){if(e.length!==t.length)throw new u(e.length,t.length);for(var o=[],a=0;a<e.length;a++)o[a]=i(e[a],t[a],n,r+1);return o}return e.concat(t)}var o=n(5).clone,a=n(2),s=n(63),u=n(12);t.name="concat",t.factory=r},function(e,t,n){"use strict";var r=n(61);e.exports=function(e){for(var t=0;t<e.length;t++)if(r(e[t]))return!0;return!1}},function(e,t,n){"use strict";function r(e,t,r,o){function a(e,t,n){var r=void 0,i=void 0,o=void 0,a=void 0,s=void 0;if(1===t){if(0===(a=e[0][0]))throw Error("Cannot calculate inverse, determinant is zero");return[[u(1,a)]]}if(2===t){var m=p(e);if(0===m)throw Error("Cannot calculate inverse, determinant is zero");return[[u(e[1][1],m),u(f(e[0][1]),m)],[u(f(e[1][0]),m),u(e[0][0],m)]]}var g=e.concat();for(r=0;r<t;r++)g[r]=g[r].concat();for(var v=h(t).valueOf(),y=0;y<n;y++){var b=d(g[y][y]),x=y;for(r=y+1;r<t;)d(g[r][y])>b&&(b=d(g[r][y]),x=r),r++;if(0===b)throw Error("Cannot calculate inverse, determinant is zero");r=x,r!==y&&(s=g[y],g[y]=g[r],g[r]=s,s=v[y],v[y]=v[r],v[r]=s);var w=g[y],N=v[y];for(r=0;r<t;r++){var E=g[r],C=v[r];if(r!==y){if(0!==E[y]){for(o=u(f(E[y]),w[y]),i=y;i<n;i++)E[i]=c(E[i],l(o,w[i]));for(i=0;i<n;i++)C[i]=c(C[i],l(o,N[i]))}}else{for(o=w[y],i=y;i<n;i++)E[i]=u(E[i],o);for(i=0;i<n;i++)C[i]=u(C[i],o)}}}return v}var s=r(n(1)),u=r(n(14)),c=r(n(18)),l=r(n(10)),f=r(n(37)),p=r(n(160)),h=r(n(58)),d=r(n(25)),m=o("inv",{"Array | Matrix":function(t){var n=e.isMatrix(t)?t.size():i.array.size(t);switch(n.length){case 1:if(1===n[0])return e.isMatrix(t)?s([u(1,t.valueOf()[0])]):[u(1,t[0])];throw new RangeError("Matrix must be square (size: "+i.string.format(n)+")");case 2:var r=n[0],o=n[1];if(r===o)return e.isMatrix(t)?s(a(t.valueOf(),r,o),t.storage()):a(t,r,o);throw new RangeError("Matrix must be square (size: "+i.string.format(n)+")");default:throw new RangeError("Matrix must be two dimensional (size: "+i.string.format(n)+")")}},any:function(e){return u(1,e)}});return m.toTex={1:"\\left(${args[0]}\\right)^{-1}"},m}var i=n(32);t.name="inv",t.factory=r},function(e,t,n){"use strict";function r(e,t,n,r){var o=r("conj",{number:function(e){return e},BigNumber:function(e){return e},Complex:function(e){return e.conjugate()},"Array | Matrix":function(e){return i(e,o)}});return o.toTex={1:"\\left(${args[0]}\\right)^*"},o}var i=n(0);t.name="conj",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,a){function s(e,t,n){for(var r=e._data,o=[],a=void 0,s=0;s<n;s++){a=o[s]=[];for(var u=0;u<t;u++)a[u]=i(r[u][s])}return new f({data:o,size:[n,t],datatype:e._datatype})}function u(e,t,n){for(var r=e._values,o=e._index,a=e._ptr,s=r?[]:void 0,u=[],c=[],l=[],f=0;f<t;f++)l[f]=0;var h=void 0,d=void 0,m=void 0;for(h=0,d=o.length;h<d;h++)l[o[h]]++;for(var g=0,v=0;v<t;v++)c.push(g),g+=l[v],l[v]=c[v];for(c.push(g),m=0;m<n;m++)for(var y=a[m],b=a[m+1],x=y;x<b;x++){var w=l[o[x]]++;u[w]=m,r&&(s[w]=i(r[x]))}return new p({values:s,index:u,ptr:c,size:[n,t],datatype:e._datatype})}var c=n(4),l=r(n(1)),f=e.DenseMatrix,p=e.SparseMatrix,h=a("transpose",{Array:function(e){return h(l(e)).valueOf()},Matrix:function(e){var t=e.size(),n=void 0;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: "+o(t)+")");switch(e.storage()){case"dense":n=s(e,r,i);break;case"sparse":n=u(e,r,i)}break;default:throw new RangeError("Matrix must be a vector or two dimensional (size: "+o(this._size)+")")}return n},any:function(e){return i(e)}});return h.toTex={1:"\\left(${args[0]}\\right)"+c.operators.transpose},h}var i=n(5).clone,o=n(9).format;t.name="transpose",t.factory=r},function(e,t,n){"use strict";function r(e,t,n,r){var o=r("isPositive",{number:function(e){return e>0},BigNumber:function(e){return!e.isNeg()&&!e.isZero()&&!e.isNaN()},Fraction:function(e){return e.s>0&&e.n>0},Unit:function(e){return o(e.value)},"Array | Matrix":function(e){return i(e,o)}});return o}var i=n(0);t.name="isPositive",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,a){var s=r(n(11)),u=e.SparseMatrix;return function(e,t,n){var r=e._values,c=e._size,l=e._datatype,f=t._values,p=t._size,h=t._datatype;if(c.length!==p.length)throw new o(c.length,p.length);if(c[0]!==p[0]||c[1]!==p[1])throw new RangeError("Dimension mismatch. Matrix A ("+c+") must match Matrix B ("+p+")");var d=c[0],m=c[1],g=void 0,v=s,y=0,b=n;"string"===typeof l&&l===h&&(g=l,v=a.find(s,[g,g]),y=a.convert(0,g),b=a.find(n,[g,g]));for(var x=r&&f?[]:void 0,w=[],N=[],E=new u({values:x,index:w,ptr:N,size:[d,m],datatype:g}),C=x?[]:void 0,S=[],M=[],T=0;T<m;T++){N[T]=w.length;var O=T+1;if(i(e,T,S,C,M,O,E,b),i(t,T,S,C,M,O,E,b),C)for(var k=N[T];k<w.length;){var A=w[k];if(M[A]===O){var _=C[A];v(_,y)?w.splice(k,1):(x.push(_),k++)}else w.splice(k,1)}else for(var P=N[T];P<w.length;){var R=w[P];M[R]!==O?w.splice(P,1):P++}}return N[m]=w.length,E}}var i=n(554),o=n(12);t.name="algorithm06",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,o){var a=r(n(178)),s=n(4),u=o("factorial",{number:function(e){if(e<0)throw new Error("Value must be non-negative");return a(e+1)},BigNumber:function(e){if(e.isNegative())throw new Error("Value must be non-negative");return a(e.plus(1))},"Array | Matrix":function(e){return i(e,u)}});return u.toTex={1:"\\left(${args[0]}\\right)"+s.operators.factorial},u}var i=n(0);t.name="factorial",t.factory=r},function(e,t,n){"use strict";function r(e,t,n,r){var a=r("combinations",{"number, number":function(e,t){var n=void 0,r=void 0,i=void 0;if(!o(e)||e<0)throw new TypeError("Positive integer value expected in function combinations");if(!o(t)||t<0)throw new TypeError("Positive integer value expected in function combinations");if(t>e)throw new TypeError("k must be less than or equal to n");for(n=Math.max(t,e-t),r=1,i=1;i<=e-n;i++)r=r*(n+i)/i;return r},"BigNumber, BigNumber":function(t,n){var r=void 0,o=void 0,a=void 0,s=void 0,u=new e.BigNumber(1);if(!i(t)||!i(n))throw new TypeError("Positive integer value expected in function combinations");if(n.gt(t))throw new TypeError("k must be less than n in function combinations");for(r=t.minus(n),n.lt(r)&&(r=n),o=u,a=u,s=t.minus(r);a.lte(s);a=a.plus(1))o=o.times(r.plus(a)).dividedBy(a);return o}});return a.toTex={2:"\\binom{${args[0]}}{${args[1]}}"},a}function i(e){return e.isInteger()&&e.gte(0)}var o=n(3).isInteger;t.name="combinations",t.factory=r},function(e,t,n){"use strict";var r={};e.exports=r},function(e,t,n){"use strict";function r(e){return function(){return e}}var i=function(){};i.thatReturns=r,i.thatReturnsFalse=r(!1),i.thatReturnsTrue=r(!0),i.thatReturnsNull=r(null),i.thatReturnsThis=function(){return this},i.thatReturnsArgument=function(e){return e},e.exports=i},function(e,t){},function(e,t){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function i(e){if(l===setTimeout)return setTimeout(e,0);if((l===n||!l)&&setTimeout)return l=setTimeout,setTimeout(e,0);try{return l(e,0)}catch(t){try{return l.call(null,e,0)}catch(t){return l.call(this,e,0)}}}function o(e){if(f===clearTimeout)return clearTimeout(e);if((f===r||!f)&&clearTimeout)return f=clearTimeout,clearTimeout(e);try{return f(e)}catch(t){try{return f.call(null,e)}catch(t){return f.call(this,e)}}}function a(){m&&h&&(m=!1,h.length?d=h.concat(d):g=-1,d.length&&s())}function s(){if(!m){var e=i(a);m=!0;for(var t=d.length;t;){for(h=d,d=[];++g<t;)h&&h[g].run();g=-1,t=d.length}h=null,m=!1,o(e)}}function u(e,t){this.fun=e,this.array=t}function c(){}var l,f,p=e.exports={};!function(){try{l="function"===typeof setTimeout?setTimeout:n}catch(e){l=n}try{f="function"===typeof clearTimeout?clearTimeout:r}catch(e){f=r}}();var h,d=[],m=!1,g=-1;p.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];d.push(new u(e,t)),1!==d.length||m||i(s)},u.prototype.run=function(){this.fun.apply(null,this.array)},p.title="browser",p.browser=!0,p.env={},p.argv=[],p.version="",p.versions={},p.on=c,p.addListener=c,p.once=c,p.off=c,p.removeListener=c,p.removeAllListeners=c,p.emit=c,p.prependListener=c,p.prependOnceListener=c,p.listeners=function(e){return[]},p.binding=function(e){throw new Error("process.binding is not supported")},p.cwd=function(){return"/"},p.chdir=function(e){throw new Error("process.chdir is not supported")},p.umask=function(){return 0}},function(e,t){function n(e){if(e=String(e),!(e.length>100)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var n=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return n*l;case"days":case"day":case"d":return n*c;case"hours":case"hour":case"hrs":case"hr":case"h":return n*u;case"minutes":case"minute":case"mins":case"min":case"m":return n*s;case"seconds":case"second":case"secs":case"sec":case"s":return n*a;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function r(e){return e>=c?Math.round(e/c)+"d":e>=u?Math.round(e/u)+"h":e>=s?Math.round(e/s)+"m":e>=a?Math.round(e/a)+"s":e+"ms"}function i(e){return o(e,c,"day")||o(e,u,"hour")||o(e,s,"minute")||o(e,a,"second")||e+" ms"}function o(e,t,n){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+n:Math.ceil(e/t)+" "+n+"s"}var a=1e3,s=60*a,u=60*s,c=24*u,l=365.25*c;e.exports=function(e,t){t=t||{};var o=typeof e;if("string"===o&&e.length>0)return n(e);if("number"===o&&!1===isNaN(e))return t.long?i(e):r(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},function(e,t,n){function r(){}function i(e){var n=""+e.type;if(t.BINARY_EVENT!==e.type&&t.BINARY_ACK!==e.type||(n+=e.attachments+"-"),e.nsp&&"/"!==e.nsp&&(n+=e.nsp+","),null!=e.id&&(n+=e.id),null!=e.data){var r=o(e.data);if(!1===r)return v;n+=r}return p("encoded %j as %s",e,n),n}function o(e){try{return JSON.stringify(e)}catch(e){return!1}}function a(e,t){function n(e){var n=d.deconstructPacket(e),r=i(n.packet),o=n.buffers;o.unshift(r),t(o)}d.removeBlobs(e,n)}function s(){this.reconstructor=null}function u(e){var n=0,r={type:Number(e.charAt(0))};if(null==t.types[r.type])return f("unknown packet type "+r.type);if(t.BINARY_EVENT===r.type||t.BINARY_ACK===r.type){for(var i="";"-"!==e.charAt(++n)&&(i+=e.charAt(n),n!=e.length););if(i!=Number(i)||"-"!==e.charAt(n))throw new Error("Illegal attachments");r.attachments=Number(i)}if("/"===e.charAt(n+1))for(r.nsp="";++n;){var o=e.charAt(n);if(","===o)break;if(r.nsp+=o,n===e.length)break}else r.nsp="/";var a=e.charAt(n+1);if(""!==a&&Number(a)==a){for(r.id="";++n;){var o=e.charAt(n);if(null==o||Number(o)!=o){--n;break}if(r.id+=e.charAt(n),n===e.length)break}r.id=Number(r.id)}if(e.charAt(++n)){var s=c(e.substr(n));if(!(!1!==s&&(r.type===t.ERROR||m(s))))return f("invalid payload");r.data=s}return p("decoded %s as %j",e,r),r}function c(e){try{return JSON.parse(e)}catch(e){return!1}}function l(e){this.reconPack=e,this.buffers=[]}function f(e){return{type:t.ERROR,data:"parser error: "+e}}var p=n(211)("socket.io-parser"),h=n(54),d=n(213),m=n(117),g=n(118);t.protocol=4,t.types=["CONNECT","DISCONNECT","EVENT","ACK","ERROR","BINARY_EVENT","BINARY_ACK"],t.CONNECT=0,t.DISCONNECT=1,t.EVENT=2,t.ACK=3,t.ERROR=4,t.BINARY_EVENT=5,t.BINARY_ACK=6,t.Encoder=r,t.Decoder=s;var v=t.ERROR+'"encode error"';r.prototype.encode=function(e,n){if(p("encoding packet %j",e),t.BINARY_EVENT===e.type||t.BINARY_ACK===e.type)a(e,n);else{n([i(e)])}},h(s.prototype),s.prototype.add=function(e){var n;if("string"===typeof e)n=u(e),t.BINARY_EVENT===n.type||t.BINARY_ACK===n.type?(this.reconstructor=new l(n),0===this.reconstructor.reconPack.attachments&&this.emit("decoded",n)):this.emit("decoded",n);else{if(!g(e)&&!e.base64)throw new Error("Unknown type: "+e);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");(n=this.reconstructor.takeBinaryData(e))&&(this.reconstructor=null,this.emit("decoded",n))}},s.prototype.destroy=function(){this.reconstructor&&this.reconstructor.finishedReconstruction()},l.prototype.takeBinaryData=function(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){var t=d.reconstructPacket(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null},l.prototype.finishedReconstruction=function(){this.reconPack=null,this.buffers=[]}},function(e,t,n){(function(t){var r=n(216);e.exports=function(e){var n=e.xdomain,i=e.xscheme,o=e.enablesXDR;try{if("undefined"!==typeof XMLHttpRequest&&(!n||r))return new XMLHttpRequest}catch(e){}try{if("undefined"!==typeof XDomainRequest&&!i&&o)return new XDomainRequest}catch(e){}if(!n)try{return new(t[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(e){}}}).call(t,n(13))},function(e,t,n){function r(e){this.path=e.path,this.hostname=e.hostname,this.port=e.port,this.secure=e.secure,this.query=e.query,this.timestampParam=e.timestampParam,this.timestampRequests=e.timestampRequests,this.readyState="",this.agent=e.agent||!1,this.socket=e.socket,this.enablesXDR=e.enablesXDR,this.pfx=e.pfx,this.key=e.key,this.passphrase=e.passphrase,this.cert=e.cert,this.ca=e.ca,this.ciphers=e.ciphers,this.rejectUnauthorized=e.rejectUnauthorized,this.forceNode=e.forceNode,this.extraHeaders=e.extraHeaders,this.localAddress=e.localAddress}var i=n(55),o=n(54);e.exports=r,o(r.prototype),r.prototype.onError=function(e,t){var n=new Error(e);return n.type="TransportError",n.description=t,this.emit("error",n),this},r.prototype.open=function(){return"closed"!==this.readyState&&""!==this.readyState||(this.readyState="opening",this.doOpen()),this},r.prototype.close=function(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this},r.prototype.send=function(e){if("open"!==this.readyState)throw new Error("Transport not open");this.write(e)},r.prototype.onOpen=function(){this.readyState="open",this.writable=!0,this.emit("open")},r.prototype.onData=function(e){var t=i.decodePacket(e,this.socket.binaryType);this.onPacket(t)},r.prototype.onPacket=function(e){this.emit("packet",e)},r.prototype.onClose=function(){this.readyState="closed",this.emit("close")}},function(e,t,n){"use strict";e.exports=function(e){return e&&e.constructor.prototype.isBigNumber||!1}},function(e,t,n){"use strict";function r(e,t,n,r,u){return o.prototype.type="Complex",o.prototype.isComplex=!0,o.prototype.toJSON=function(){return{mathjs:"Complex",re:this.re,im:this.im}},o.prototype.toPolar=function(){return{r:this.abs(),phi:this.arg()}},o.prototype.format=function(e){var t=this.im,n=this.re,r=a(this.re,e),i=a(this.im,e),o=s(e)?e:e?e.precision:null;if(null!==o){var u=Math.pow(10,-o);Math.abs(n/t)<u&&(n=0),Math.abs(t/n)<u&&(t=0)}return 0===t?r:0===n?1===t?"i":-1===t?"-i":i+"i":t<0?-1===t?r+" - i":r+" - "+i.substring(1)+"i":1===t?r+" + i":r+" + "+i+"i"},o.fromPolar=function(t){switch(arguments.length){case 1:var n=arguments[0];if("object"===("undefined"===typeof n?"undefined":i(n)))return o(n);throw new TypeError("Input has to be an object with r and phi keys.");case 2:var r=arguments[0],a=arguments[1];if(s(r)){if(e.isUnit(a)&&a.hasBase("ANGLE")&&(a=a.toNumber("rad")),s(a))return new o({r:r,phi:a});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")}},o.prototype.valueOf=o.prototype.toString,o.fromJSON=function(e){return new o(e)},o.EPSILON=t.epsilon,u.on("config",function(e,t){e.epsilon!==t.epsilon&&(o.EPSILON=e.epsilon)}),o.compare=function(e,t){return e.re>t.re?1:e.re<t.re?-1:e.im>t.im?1:e.im<t.im?-1:0},o}var i="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},o=n(276),a=n(3).format,s=n(3).isNumber;t.name="Complex",t.path="type",t.factory=r,t.math=!0},function(e,t,n){"use strict";function r(e,t,n,r){function i(){if(!(this instanceof i))throw new SyntaxError("Constructor must be called with the new operator")}return i.prototype.type="Matrix",i.prototype.isMatrix=!0,i.storage=function(e){if(!a(e))throw new TypeError("format must be a string value");var t=i._storage[e];if(!t)throw new SyntaxError("Unsupported matrix storage format: "+e);return t},i._storage={},i.prototype.storage=function(){throw new Error("Cannot invoke storage on a Matrix interface")},i.prototype.datatype=function(){throw new Error("Cannot invoke datatype on a Matrix interface")},i.prototype.create=function(e,t){throw new Error("Cannot invoke create on a Matrix interface")},i.prototype.subset=function(e,t,n){throw new Error("Cannot invoke subset on a Matrix interface")},i.prototype.get=function(e){throw new Error("Cannot invoke get on a Matrix interface")},i.prototype.set=function(e,t,n){throw new Error("Cannot invoke set on a Matrix interface")},i.prototype.resize=function(e,t){throw new Error("Cannot invoke resize on a Matrix interface")},i.prototype.reshape=function(e,t){throw new Error("Cannot invoke reshape on a Matrix interface")},i.prototype.clone=function(){throw new Error("Cannot invoke clone on a Matrix interface")},i.prototype.size=function(){throw new Error("Cannot invoke size on a Matrix interface")},i.prototype.map=function(e,t){throw new Error("Cannot invoke map on a Matrix interface")},i.prototype.forEach=function(e){throw new Error("Cannot invoke forEach on a Matrix interface")},i.prototype.toArray=function(){throw new Error("Cannot invoke toArray on a Matrix interface")},i.prototype.valueOf=function(){throw new Error("Cannot invoke valueOf on a Matrix interface")},i.prototype.format=function(e){throw new Error("Cannot invoke format on a Matrix interface")},i.prototype.toString=function(){throw new Error("Cannot invoke toString on a Matrix interface")},i}var i=n(32),o=i.string,a=o.isString;t.name="Matrix",t.path="type",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,o){var a=r(n(11)),s=e.SparseMatrix;return function(e,t,n){var r=e._values,u=e._index,c=e._ptr,l=e._size,f=e._datatype,p=t._values,h=t._index,d=t._ptr,m=t._size,g=t._datatype;if(l.length!==m.length)throw new i(l.length,m.length);if(l[0]!==m[0]||l[1]!==m[1])throw new RangeError("Dimension mismatch. Matrix A ("+l+") must match Matrix B ("+m+")");var v=l[0],y=l[1],b=void 0,x=a,w=0,N=n;"string"===typeof f&&f===g&&(b=f,x=o.find(a,[b,b]),w=o.convert(0,b),N=o.find(n,[b,b]));var E=r&&p?[]:void 0,C=[],S=[],M=new s({values:E,index:C,ptr:S,size:[v,y],datatype:b}),T=r&&p?[]:void 0,O=r&&p?[]:void 0,k=[],A=[],_=void 0,P=void 0,R=void 0,I=void 0,F=void 0;for(P=0;P<y;P++){S[P]=C.length;var D=P+1;for(I=c[P],F=c[P+1],R=I;R<F;R++)_=u[R],C.push(_),k[_]=D,T&&(T[_]=r[R]);for(I=d[P],F=d[P+1],R=I;R<F;R++)if(_=h[R],k[_]===D){if(T){var L=N(T[_],p[R]);x(L,w)?k[_]=null:T[_]=L}}else C.push(_),A[_]=D,O&&(O[_]=p[R]);if(T&&O)for(R=S[P];R<C.length;)_=C[R],k[_]===D?(E[R]=T[_],R++):A[_]===D?(E[R]=O[_],R++):C.splice(R,1)}return S[y]=C.length,M}}var i=n(12);t.name="algorithm04",t.factory=r},function(e,t,n){"use strict";function r(e,t,n,r){var o=r("number",{"":function(){return 0},number:function(e){return e},string:function(e){var t=Number(e);if(isNaN(t))throw new SyntaxError('String "'+e+'" is no valid number');return t},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,t){return e.toNumber(t)},"Array | Matrix":function(e){return i(e,o)}});return o.toTex={0:"0",1:"\\left(${args[0]}\\right)",2:"\\left(\\left(${args[0]}\\right)${args[1]}\\right)"},o}var i=n(0);t.name="number",t.factory=r},function(e,t,n){"use strict";function r(e,t,n,r){var o=r("isNumeric",{"number | BigNumber | Fraction | boolean":function(){return!0},"Complex | Unit | string":function(){return!1},"Array | Matrix":function(e){return i(e,o)}});return o}var i=n(0);t.name="isNumeric",t.factory=r},function(e,t,n){"use strict";function r(e,t,n,r){return function(t,n,r){var i=t.filter(function(t){return e.isSymbolNode(t)&&!(t.name in n)&&!(t.name in r)})[0];if(!i)throw new Error('No undefined variable found in inline expression "'+t+'"');var o=i.name,a=Object.create(r),s=t.compile();return function(e){return a[o]=e,s.eval(a)}}}t.factory=r},function(e,t,n){"use strict";function r(e,t,r,s){function u(e,t){try{return l(e,t)?e:t}catch(e){throw f(e,"max",t)}}function c(e){var t=void 0;if(i(e,function(e){try{(void 0===t||l(e,t))&&(t=e)}catch(t){throw f(t,"max",e)}}),void 0===t)throw new Error("Cannot calculate max of an empty array");return t}var l=r(n(36)),f=r(n(40)),p=s("max",{"Array | Matrix":c,"Array | Matrix, number | BigNumber":function(e,t){return o(e,t.valueOf(),u)},"...":function(e){if(a(e))throw new TypeError("Scalar values expected in function max");return c(e)}});return p.toTex="\\max\\left(${args}\\right)",p}var i=n(49),o=n(104),a=n(80);t.name="max",t.factory=r},function(e,t,n){"use strict";function r(e,t,n){var o=void 0,a=void 0,s=void 0,u=void 0;if(t<=0){if(Array.isArray(e[0])){for(u=i(e),a=[],o=0;o<u.length;o++)a[o]=r(u[o],t-1,n);return a}for(s=e[0],o=1;o<e.length;o++)s=n(s,e[o]);return s}for(a=[],o=0;o<e.length;o++)a[o]=r(e[o],t-1,n);return a}function i(e){var t=e.length,n=e[0].length,r=void 0,i=void 0,o=[];for(i=0;i<n;i++){var a=[];for(r=0;r<t;r++)a.push(e[r][i]);o.push(a)}return o}var o=n(2).size,a=n(75),s=n(63);e.exports=function(e,t,n){var i=Array.isArray(e)?o(e):e.size();if(t<0||t>=i.length)throw new s(t,i.length);return a(e)?e.create(r(e.valueOf(),t,n)):r(e,t,n)}},function(e,t,n){"use strict";function r(e,t,r,i){function a(e){var t=e._size[0],n=e._size[1],r=Math.min(t,n),i=o.clone(e._data),a=[],s=[t,r],u=[],g=[r,n],v=void 0,b=void 0,x=void 0,w=[];for(v=0;v<t;v++)w[v]=v;for(b=0;b<n;b++){if(b>0)for(v=0;v<t;v++){var N=Math.min(v,b),E=0;for(x=0;x<N;x++)E=l(E,p(i[v][x],i[x][b]));i[v][b]=h(i[v][b],E)}var C=b,S=0,M=0;for(v=b;v<t;v++){var T=i[v][b],O=c(T);d(O,S)&&(C=v,S=O,M=T)}if(b!==C&&(w[b]=[w[C],w[C]=w[b]][0],y._swapRows(b,C,i)),b<t)for(v=b+1;v<t;v++){var k=i[v][b];m(k,0)||(i[v][b]=f(i[v][b],M))}}for(b=0;b<n;b++)for(v=0;v<t;v++)0===b&&(v<n&&(u[v]=[]),a[v]=[]),v<b?(v<n&&(u[v][b]=i[v][b]),b<t&&(a[v][b]=0)):v!==b?(v<n&&(u[v][b]=0),b<t&&(a[v][b]=i[v][b])):(v<n&&(u[v][b]=i[v][b]),b<t&&(a[v][b]=1));var A=new y({data:a,size:s}),_=new y({data:u,size:g}),P=[];for(v=0,r=w.length;v<r;v++)P[w[v]]=v;return{L:A,U:_,p:P,toString:function(){return"L: "+this.L.toString()+"\nU: "+this.U.toString()+"\nP: "+this.p}}}function s(e){var t=e._size[0],n=e._size[1],r=Math.min(t,n),i=e._values,o=e._index,a=e._ptr,s=[],u=[],l=[],h=[t,r],y=[],x=[],w=[],N=[r,n],E=void 0,C=void 0,S=void 0,M=[],T=[];for(E=0;E<t;E++)M[E]=E,T[E]=E;var O=function(e,t){var n=T[e],r=T[t];M[n]=t,M[r]=e,T[e]=r,T[t]=n};for(C=0;C<n;C++)!function(){var e=new b;C<t&&(l.push(s.length),s.push(1),u.push(C)),w.push(y.length);var n=a[C],r=a[C+1];for(S=n;S<r;S++)E=o[S],e.set(M[E],i[S]);C>0&&e.forEach(0,C-1,function(t,n){v._forEachRow(t,s,u,l,function(r,i){r>t&&e.accumulate(r,g(p(i,n)))})});var T=C,k=e.get(C),A=c(k);e.forEach(C+1,t-1,function(e,t){var n=c(t);d(n,A)&&(T=e,A=n,k=t)}),C!==T&&(v._swapRows(C,T,h[1],s,u,l),v._swapRows(C,T,N[1],y,x,w),e.swap(C,T),O(C,T)),e.forEach(0,t-1,function(e,t){e<=C?(y.push(t),x.push(e)):(t=f(t,k),m(t,0)||(s.push(t),u.push(e)))})}();return w.push(y.length),l.push(s.length),{L:new v({values:s,index:u,ptr:l,size:h}),U:new v({values:y,index:x,ptr:w,size:N}),p:M,toString:function(){return"L: "+this.L.toString()+"\nU: "+this.U.toString()+"\nP: "+this.p}}}var u=r(n(1)),c=r(n(25)),l=r(n(18)),f=r(n(14)),p=r(n(23)),h=r(n(16)),d=r(n(36)),m=r(n(11)),g=r(n(37)),v=e.SparseMatrix,y=e.DenseMatrix,b=e.Spa;return i("lup",{DenseMatrix:function(e){return a(e)},SparseMatrix:function(e){return s(e)},Array:function(e){var t=u(e),n=a(t);return{L:n.L.valueOf(),U:n.U.valueOf(),p:n.p}}})}var i=n(32),o=i.object;t.name="lup",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,o,a){function s(t){return t.transform(function(t,n,r){return e.isParenthesisNode(t)?t.content:t})}function u(e){for(var t=[],n=0;n<e.length;n++){var r=e[n],o=void 0,a="undefined"===typeof r?"undefined":i(r);switch(a){case"string":var u=r.split("->");if(2!==u.length)throw SyntaxError("Could not parse rule: "+r);r={l:u[0],r:u[1]};case"object":if(o={l:s(g(r.l)),r:s(g(r.r))},r.context&&(o.evaluate=r.context),r.evaluate&&(o.evaluate=g(r.evaluate)),O(o.l)){var l=P(o.l),f=c();o.expanded={},o.expanded.l=l([o.l.clone(),f]),k(o.expanded.l),A(o.expanded.l),o.expanded.r=l([o.r,f])}break;case"function":o=r;break;default:throw TypeError("Unsupported type of rule: "+a)}t.push(o)}return t}function c(){return new N("_p"+F++)}function l(e,t){var n=[],r=void 0,i=void 0,o=P(e);if(T(e,t))for(var a=0;a<e.args.length;a++)i=e.args.slice(0),i.splice(a,1),r=1===i.length?i[0]:o(i),n.push(o([e.args[a],r]));else i=e.args.slice(1),r=1===i.length?i[0]:o(i),n.push(o([e.args[0],r]));return n}function f(e,t){var n={placeholders:{}};if(!e.placeholders&&!t.placeholders)return n;if(!e.placeholders)return t;if(!t.placeholders)return e;for(var r in e.placeholders)if(n.placeholders[r]=e.placeholders[r],t.placeholders.hasOwnProperty(r)&&!m(e.placeholders[r],t.placeholders[r]))return null;for(var i in t.placeholders)n.placeholders[i]=t.placeholders[i];return n}function p(e,t){var n=[];if(0===e.length||0===t.length)return n;for(var r=void 0,i=0;i<e.length;i++)for(var o=0;o<t.length;o++)(r=f(e[i],t[o]))&&n.push(r);return n}function h(e){if(0===e.length)return e;for(var t=e.reduce(p),n=[],r={},i=0;i<t.length;i++){var o=JSON.stringify(t[i]);r[o]||(r[o]=!0,n.push(t[i]))}return n}function d(t,n,r){var i=[{placeholders:{}}];if(t instanceof x&&n instanceof x||t instanceof b&&n instanceof b){if(t instanceof x){if(t.op!==n.op||t.fn!==n.fn)return[]}else if(t instanceof b&&t.name!==n.name)return[];if((1!==n.args.length||1!==t.args.length)&&O(n)&&!r){if(n.args.length>=2&&2===t.args.length){for(var o=l(n,t.context),s=[],u=0;u<o.length;u++){var c=d(t,o[u],!0);s=s.concat(c)}return s}if(t.args.length>2)throw Error("Unexpected non-binary associative function: "+t.toString());return[]}for(var f=[],p=0;p<t.args.length;p++){var m=d(t.args[p],n.args[p]);if(0===m.length)return[];f.push(m)}i=h(f)}else if(t instanceof N){if(0===t.name.length)throw new Error("Symbol in rule has 0 length...!?");if(a.hasOwnProperty(t.name)){if(!I[t.name])throw new Error("Built in constant: "+t.name+" is not supported by simplify.");if(t.name!==n.name)return[]}else if("n"===t.name[0]||"_p"===t.name.substring(0,2))i[0].placeholders[t.name]=n;else if("v"===t.name[0]){if(e.isConstantNode(n))return[];i[0].placeholders[t.name]=n}else{if("c"!==t.name[0])throw new Error("Invalid symbol in rule: "+t.name);if(!(n instanceof y))return[];i[0].placeholders[t.name]=n}}else{if(!(t instanceof y))return[];if(!v(t.value,n.value))return[]}return i}function m(e,t){if(e instanceof y&&t instanceof y){if(!v(e.value,t.value))return!1}else if(e instanceof N&&t instanceof N){if(e.name!==t.name)return!1}else{if(!(e instanceof x&&t instanceof x||e instanceof b&&t instanceof b))return!1;if(e instanceof x){if(e.op!==t.op||e.fn!==t.fn)return!1}else if(e instanceof b&&e.name!==t.name)return!1;if(e.args.length!==t.args.length)return!1;for(var n=0;n<e.args.length;n++)if(!m(e.args[n],t.args[n]))return!1}return!0}var g=r(n(47)),v=r(n(59)),y=r(n(65)),b=r(n(78)),x=r(n(66)),w=r(n(77)),N=r(n(60)),E=r(n(163)),C=r(n(165)),S=r(n(524)),M=r(n(164)),T=M.isCommutative,O=M.isAssociative,k=M.flatten,A=M.unflattenr,_=M.unflattenl,P=M.createMakeNodeFunction,R=o("simplify",{string:function(e){return R(g(e),R.rules,{})},"string, Object":function(e,t){return R(g(e),R.rules,t)},"string, Array":function(e,t){return R(g(e),t,{})},"string, Array, Object":function(e,t,n){return R(g(e),t,n)},"Node, Object":function(e,t){return R(e,R.rules,t)},Node:function(e){return R(e,R.rules,{})},"Node, Array":function(e,t){return R(e,t,{})},"Node, Array, Object":function(e,t,n){t=u(t);var r=S(e,n);r=s(r);for(var i={},o=r.toString({parenthesis:"all"});!i[o];){i[o]=!0,F=0;for(var a=0;a<t.length;a++)"function"===typeof t[a]?r=t[a](r):(k(r),r=D(r,t[a])),_(r);o=r.toString({parenthesis:"all"})}return r}});R.simplifyCore=C,R.resolve=S;var I={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};R.rules=[C,{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"},E,{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"}];var F=0,D=o("applyRule",{"Node, Object":function(e,t){var n=e;if(n instanceof x||n instanceof b){if(n.args)for(var r=0;r<n.args.length;r++)n.args[r]=D(n.args[r],t)}else n instanceof w&&n.content&&(n.content=D(n.content,t));var i=t.r,o=d(t.l,n)[0];if(!o&&t.expanded&&(i=t.expanded.r,o=d(t.expanded.l,n)[0]),o){n=i.clone();n=function e(t){return t.isSymbolNode&&o.placeholders.hasOwnProperty(t.name)?o.placeholders[t.name].clone():t.map(e)}(n)}return n}});return R}var i="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};t.math=!0,t.name="simplify",t.factory=r},function(e,t,n){"use strict";function r(){return function(e){return-e-2}}t.name="csFlip",t.path="algebra.sparse",t.factory=r},function(e,t,n){"use strict";function r(e){var t=e.DenseMatrix;return function(n,r,i){var u=n.size();if(2!==u.length)throw new RangeError("Matrix must be two dimensional (size: "+o.format(u)+")");var c=u[0];if(c!==u[1])throw new RangeError("Matrix must be square (size: "+o.format(u)+")");var l=void 0,f=void 0,p=void 0;if(e.isMatrix(r)){var h=r.size();if(1===h.length){if(h[0]!==c)throw new RangeError("Dimension mismatch. Matrix columns must match vector length.");for(l=[],p=r._data,f=0;f<c;f++)l[f]=[p[f]];return new t({data:l,size:[c,1],datatype:r._datatype})}if(2===h.length){if(h[0]!==c||1!==h[1])throw new RangeError("Dimension mismatch. Matrix columns must match vector length.");if(e.isDenseMatrix(r)){if(i){for(l=[],p=r._data,f=0;f<c;f++)l[f]=[p[f][0]];return new t({data:l,size:[c,1],datatype:r._datatype})}return r}for(l=[],f=0;f<c;f++)l[f]=[0];for(var d=r._values,m=r._index,g=r._ptr,v=g[1],y=g[0];y<v;y++)f=m[y],l[f][0]=d[y];return new t({data:l,size:[c,1],datatype:r._datatype})}throw new RangeError("Dimension mismatch. Matrix columns must match vector length.")}if(s(r)){var b=a.size(r);if(1===b.length){if(b[0]!==c)throw new RangeError("Dimension mismatch. Matrix columns must match vector length.");for(l=[],f=0;f<c;f++)l[f]=[r[f]];return new t({data:l,size:[c,1]})}if(2===b.length){if(b[0]!==c||1!==b[1])throw new RangeError("Dimension mismatch. Matrix columns must match vector length.");for(l=[],f=0;f<c;f++)l[f]=[r[f][0]];return new t({data:l,size:[c,1]})}throw new RangeError("Dimension mismatch. Matrix columns must match vector length.")}}}var i=n(32),o=i.string,a=i.array,s=Array.isArray;t.factory=r},function(e,t,n){"use strict";function r(e,t,r,o){var a=r(n(14)),s=o("log",{number:function(n){return n>=0||t.predictable?Math.log(n):new e.Complex(n,0).log()},Complex:function(e){return e.log()},BigNumber:function(n){return!n.isNegative()||t.predictable?n.ln():new e.Complex(n.toNumber(),0).log()},"Array | Matrix":function(e){return i(e,s)},"any, any":function(e,t){return a(s(e),s(t))}});return s.toTex={1:"\\ln\\left(${args[0]}\\right)",2:"\\log_{${args[1]}}\\left(${args[0]}\\right)"},s}var i=n(0);t.name="log",t.factory=r},function(e,t,n){"use strict";function r(e){for(var t=e.d,n=t[0]+"",r=1;r<t.length;++r){for(var i=t[r]+"",o=7-i.length;o--;)i="0"+i;n+=i}for(var a=n.length;"0"===n.charAt(a);)a--;var s=e.e,u=n.slice(0,a+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 l=[0],f=0;f<u.length;){for(var p=l.length;p--;)l[p]*=10;l[0]+=parseInt(u.charAt(f++));for(var h=0;h<l.length;++h)l[h]>1&&(null!==l[h+1]&&void 0!==l[h+1]||(l[h+1]=0),l[h+1]+=l[h]>>1,l[h]&=1)}return l.reverse()}var i=n(111);e.exports=function(e,t,n){var o=e.constructor,a=void 0,s=void 0,u=+(e.s<0),c=+(t.s<0);if(u){a=r(i(e));for(var l=0;l<a.length;++l)a[l]^=1}else a=r(e);if(c){s=r(i(t));for(var f=0;f<s.length;++f)s[f]^=1}else s=r(t);var p=void 0,h=void 0,d=void 0;a.length<=s.length?(p=a,h=s,d=u):(p=s,h=a,d=c);var m=p.length,g=h.length,v=1^n(u,c),y=new o(1^v),b=new o(1),x=new o(2),w=o.precision;for(o.config({precision:1e9});m>0;)n(p[--m],h[--g])===v&&(y=y.plus(b)),b=b.times(x);for(;g>0;)n(d,h[--g])===v&&(y=y.plus(b)),b=b.times(x);return o.config({precision:w}),0===v&&(y.s=-y.s),y}},function(e,t,n){"use strict";e.exports=function(e){if(e.isFinite()&&!e.isInteger())throw new Error("Integer expected in function bitNot");var t=e.constructor,n=t.precision;t.config({precision:1e9});var r=e.plus(new t(1));return r.s=-r.s||null,t.config({precision:n}),r}},function(e,t,n){"use strict";function r(e,t,r,o){var a=r(n(11)),s=e.SparseMatrix;return function(e,t,n){var r=e._values,u=e._index,c=e._ptr,l=e._size,f=e._datatype,p=t._values,h=t._index,d=t._ptr,m=t._size,g=t._datatype;if(l.length!==m.length)throw new i(l.length,m.length);if(l[0]!==m[0]||l[1]!==m[1])throw new RangeError("Dimension mismatch. Matrix A ("+l+") must match Matrix B ("+m+")");if(!r||!p)throw new Error("Cannot perform operation on Pattern Sparse Matrices");var v=l[0],y=l[1],b=void 0,x=a,w=0,N=n;"string"===typeof f&&f===g&&(b=f,x=o.find(a,[b,b]),w=o.convert(0,b),N=o.find(n,[b,b]));for(var E=[],C=[],S=[],M=new s({values:E,index:C,ptr:S,size:[v,y],datatype:b}),T=[],O=[],k=void 0,A=void 0,_=void 0,P=void 0,R=0;R<y;R++){S[R]=C.length;var I=R+1;for(A=c[R],_=c[R+1],k=A;k<_;k++)P=u[k],O[P]=I,T[P]=r[k],C.push(P);for(A=d[R],_=d[R+1],k=A;k<_;k++)P=h[k],O[P]===I&&(T[P]=N(T[P],p[k]));for(k=S[R];k<C.length;){P=C[k];var F=T[P];x(F,w)?C.splice(k,1):(E.push(F),k++)}}return S[y]=C.length,M}}var i=n(12);t.name="algorithm08",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,o){function a(e,t){return-c(e,t)}function s(t,n,r){if(!i(n)||n<0)throw new Error("k must be a non-negative integer");if(e.isMatrix(t)){if(t.size().length>1)throw new Error("Only one dimensional matrices supported");return u(t.valueOf(),n,r)}if(Array.isArray(t))return u(t,n,r)}function u(e,t,n){if(t>=e.length)throw new Error("k out of bounds");for(var r=0,i=e.length-1;r<i;){for(var o=r,a=i,s=e[Math.floor(Math.random()*(i-r+1))+r];o<a;)if(n(e[o],s)>=0){var u=e[a];e[a]=e[o],e[o]=u,--a}else++o;n(e[o],s)>0&&--o,t<=o?i=o:r=o+1}return e[t]}var c=r(n(62));return o("partitionSelect",{"Array | Matrix, number":function(e,t){return s(e,t,c)},"Array | Matrix, number, string":function(e,t,n){if("asc"===n)return s(e,t,c);if("desc"===n)return s(e,t,a);throw new Error('Compare string must be "asc" or "desc"')},"Array | Matrix, number, function":s})}var i=n(3).isInteger;t.name="partitionSelect",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,s,u){function c(t){if(!h.hasOwnProperty(t))throw new Error("Unknown distribution "+t);var n=Array.prototype.slice.call(arguments,1),r=h[t].apply(this,n);return function(t){function n(t,n,r){var i="undefined"===typeof n;if(i&&(n=1),e.isMatrix(t))t=t.valueOf();else if(!Array.isArray(t))throw new TypeError("Unsupported type of value in function pickRandom");if(f.size(t).length>1)throw new Error("Only one dimensional vectors supported");var o=0;if("undefined"!==typeof r){if(r.length!==t.length)throw new Error("Weights must have the same length as possibles");for(var s=0,u=r.length;s<u;s++){if(!a(r[s])||r[s]<0)throw new Error("Weights must be an array of positive numbers");o+=r[s]}}var c=t.length;if(0===c)return[];if(n>=c)return n>1?t:t[0];for(var l=[],h=void 0;l.length<n;){if("undefined"===typeof r)h=t[Math.floor(p()*c)];else for(var d=p()*o,m=0,g=t.length;m<g;m++)if((d-=r[m])<0){h=t[m];break}-1===l.indexOf(h)&&l.push(h)}return i?l[0]:l}function r(e,n){return e+t()*(n-e)}function u(e,n){return Math.floor(e+t()*(n-e))}function c(e,t,n,r){var i=[];if(e=e.slice(0),e.length>1)for(var o=0,a=e.shift();o<a;o++)i.push(c(e,t,n,r));else for(var s=0,u=e.shift();s<u;s++)i.push(r(t,n));return i}return{random:function(t,n,s){var u=void 0,f=void 0,p=void 0;if(arguments.length>3)throw new i("random",arguments.length,0,3);if(1===arguments.length?o(t)?u=t:p=t:2===arguments.length?o(t)?(u=t,p=n):(f=t,p=n):(u=t,f=n,p=s),void 0!==f&&!a(f)||void 0!==p&&!a(p))throw new TypeError("Invalid argument in function random");if(void 0===p&&(p=1),void 0===f&&(f=0),void 0!==u){var h=c(u.valueOf(),f,p,r);return e.isMatrix(u)?l(h):h}return r(f,p)},randomInt:s({"number | Array":function(t){if(o(t)){var n=t,r=c(n.valueOf(),0,1,u);return e.isMatrix(n)?l(r):r}return u(0,t)},"number | Array, number":function(t,n){if(o(t)){var r=t,i=n,a=c(r.valueOf(),0,i,u);return e.isMatrix(r)?l(a):a}return u(t,n)},"Array, number, number":function(e,t,n){var r=c(e.valueOf(),t,n,u);return e&&!0===e.isMatrix?l(r):r}}),pickRandom:s({Array:function(e){return n(e)},"Array, number | Array":function(e,t){var r=void 0,i=void 0;if(Array.isArray(t))i=t;else{if(!a(t))throw new TypeError("Invalid argument in function pickRandom");r=t}return n(e,r,i)},"Array, number | Array, Array | number":function(e,t,r){var i=void 0,o=void 0;if(Array.isArray(t)?(o=t,i=r):(o=r,i=t),!Array.isArray(o)||!a(i))throw new TypeError("Invalid argument in function pickRandom");return n(e,i,o)}})}}(r)}var l=r(n(1)),f=n(2),p=r(n(617)),h={uniform:function(){return p},normal:function(){return function(){for(var e=void 0,t=void 0,n=-1;n<0||n>1;)e=p(),t=p(),n=1/6*Math.pow(-2*Math.log(e),.5)*Math.cos(2*Math.PI*t)+.5;return n}}};return c.toTex=void 0,c}var i=n(56),o=n(61),a=n(3).isNumber;t.name="distribution",t.factory=r},function(e,t,n){"use strict";function r(){}function i(e){try{return e.then}catch(e){return v=e,y}}function o(e,t){try{return e(t)}catch(e){return v=e,y}}function a(e,t,n){try{e(t,n)}catch(e){return v=e,y}}function s(e){if("object"!==typeof this)throw new TypeError("Promises must be constructed via new");if("function"!==typeof e)throw new TypeError("Promise constructor's argument is not a function");this._75=0,this._83=0,this._18=null,this._38=null,e!==r&&m(e,this)}function u(e,t,n){return new e.constructor(function(i,o){var a=new s(r);a.then(i,o),c(e,new d(t,n,a))})}function c(e,t){for(;3===e._83;)e=e._18;if(s._47&&s._47(e),0===e._83)return 0===e._75?(e._75=1,void(e._38=t)):1===e._75?(e._75=2,void(e._38=[e._38,t])):void e._38.push(t);l(e,t)}function l(e,t){g(function(){var n=1===e._83?t.onFulfilled:t.onRejected;if(null===n)return void(1===e._83?f(t.promise,e._18):p(t.promise,e._18));var r=o(n,e._18);r===y?p(t.promise,v):f(t.promise,r)})}function f(e,t){if(t===e)return p(e,new TypeError("A promise cannot be resolved with itself."));if(t&&("object"===typeof t||"function"===typeof t)){var n=i(t);if(n===y)return p(e,v);if(n===e.then&&t instanceof s)return e._83=3,e._18=t,void h(e);if("function"===typeof n)return void m(n.bind(t),e)}e._83=1,e._18=t,h(e)}function p(e,t){e._83=2,e._18=t,s._71&&s._71(e,t),h(e)}function h(e){if(1===e._75&&(c(e,e._38),e._38=null),2===e._75){for(var t=0;t<e._38.length;t++)c(e,e._38[t]);e._38=null}}function d(e,t,n){this.onFulfilled="function"===typeof e?e:null,this.onRejected="function"===typeof t?t:null,this.promise=n}function m(e,t){var n=!1,r=a(e,function(e){n||(n=!0,f(t,e))},function(e){n||(n=!0,p(t,e))});n||r!==y||(n=!0,p(t,v))}var g=n(193),v=null,y={};e.exports=s,s._47=null,s._71=null,s._44=r,s.prototype.then=function(e,t){if(this.constructor!==s)return u(this,e,t);var n=new s(r);return c(this,new d(e,t,n)),n}},function(e,t){var n=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,r=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];e.exports=function(e){var t=e,i=e.indexOf("["),o=e.indexOf("]");-1!=i&&-1!=o&&(e=e.substring(0,i)+e.substring(i,o).replace(/:/g,";")+e.substring(o,e.length));for(var a=n.exec(e||""),s={},u=14;u--;)s[r[u]]=a[u]||"";return-1!=i&&-1!=o&&(s.source=t,s.host=s.host.substring(1,s.host.length-1).replace(/;/g,":"),s.authority=s.authority.replace("[","").replace("]","").replace(/;/g,":"),s.ipv6uri=!0),s}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){(function(t){function n(e){return r&&t.Buffer.isBuffer(e)||i&&(e instanceof t.ArrayBuffer||o(e))}e.exports=n;var r="function"===typeof t.Buffer&&"function"===typeof t.Buffer.isBuffer,i="function"===typeof t.ArrayBuffer,o=function(){return i&&"function"===typeof t.ArrayBuffer.isView?t.ArrayBuffer.isView:function(e){return e.buffer instanceof t.ArrayBuffer}}()}).call(t,n(13))},function(e,t,n){function r(e,t){if(!(this instanceof r))return new r(e,t);e&&"object"===typeof e&&(t=e,e=void 0),t=t||{},t.path=t.path||"/socket.io",this.nsps={},this.subs=[],this.opts=t,this.reconnection(!1!==t.reconnection),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor(t.randomizationFactor||.5),this.backoff=new p({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==t.timeout?2e4:t.timeout),this.readyState="closed",this.uri=e,this.connecting=[],this.lastPing=null,this.encoding=!1,this.packetBuffer=[];var n=t.parser||s;this.encoder=new n.Encoder,this.decoder=new n.Decoder,this.autoConnect=!1!==t.autoConnect,this.autoConnect&&this.open()}var i=n(214),o=n(125),a=n(54),s=n(93),u=n(126),c=n(127),l=n(71)("socket.io-client:manager"),f=n(124),p=n(231),h=Object.prototype.hasOwnProperty;e.exports=r,r.prototype.emitAll=function(){this.emit.apply(this,arguments);for(var e in this.nsps)h.call(this.nsps,e)&&this.nsps[e].emit.apply(this.nsps[e],arguments)},r.prototype.updateSocketIds=function(){for(var e in this.nsps)h.call(this.nsps,e)&&(this.nsps[e].id=this.generateId(e))},r.prototype.generateId=function(e){return("/"===e?"":e+"#")+this.engine.id},a(r.prototype),r.prototype.reconnection=function(e){return arguments.length?(this._reconnection=!!e,this):this._reconnection},r.prototype.reconnectionAttempts=function(e){return arguments.length?(this._reconnectionAttempts=e,this):this._reconnectionAttempts},r.prototype.reconnectionDelay=function(e){return arguments.length?(this._reconnectionDelay=e,this.backoff&&this.backoff.setMin(e),this):this._reconnectionDelay},r.prototype.randomizationFactor=function(e){return arguments.length?(this._randomizationFactor=e,this.backoff&&this.backoff.setJitter(e),this):this._randomizationFactor},r.prototype.reconnectionDelayMax=function(e){return arguments.length?(this._reconnectionDelayMax=e,this.backoff&&this.backoff.setMax(e),this):this._reconnectionDelayMax},r.prototype.timeout=function(e){return arguments.length?(this._timeout=e,this):this._timeout},r.prototype.maybeReconnectOnOpen=function(){!this.reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()},r.prototype.open=r.prototype.connect=function(e,t){if(l("readyState %s",this.readyState),~this.readyState.indexOf("open"))return this;l("opening %s",this.uri),this.engine=i(this.uri,this.opts);var n=this.engine,r=this;this.readyState="opening",this.skipReconnect=!1;var o=u(n,"open",function(){r.onopen(),e&&e()}),a=u(n,"error",function(t){if(l("connect_error"),r.cleanup(),r.readyState="closed",r.emitAll("connect_error",t),e){var n=new Error("Connection error");n.data=t,e(n)}else r.maybeReconnectOnOpen()});if(!1!==this._timeout){var s=this._timeout;l("connect attempt will timeout after %d",s);var c=setTimeout(function(){l("connect attempt timed out after %d",s),o.destroy(),n.close(),n.emit("error","timeout"),r.emitAll("connect_timeout",s)},s);this.subs.push({destroy:function(){clearTimeout(c)}})}return this.subs.push(o),this.subs.push(a),this},r.prototype.onopen=function(){l("open"),this.cleanup(),this.readyState="open",this.emit("open");var e=this.engine;this.subs.push(u(e,"data",c(this,"ondata"))),this.subs.push(u(e,"ping",c(this,"onping"))),this.subs.push(u(e,"pong",c(this,"onpong"))),this.subs.push(u(e,"error",c(this,"onerror"))),this.subs.push(u(e,"close",c(this,"onclose"))),this.subs.push(u(this.decoder,"decoded",c(this,"ondecoded")))},r.prototype.onping=function(){this.lastPing=new Date,this.emitAll("ping")},r.prototype.onpong=function(){this.emitAll("pong",new Date-this.lastPing)},r.prototype.ondata=function(e){this.decoder.add(e)},r.prototype.ondecoded=function(e){this.emit("packet",e)},r.prototype.onerror=function(e){l("error",e),this.emitAll("error",e)},r.prototype.socket=function(e,t){function n(){~f(i.connecting,r)||i.connecting.push(r)}var r=this.nsps[e];if(!r){r=new o(this,e,t),this.nsps[e]=r;var i=this;r.on("connecting",n),r.on("connect",function(){r.id=i.generateId(e)}),this.autoConnect&&n()}return r},r.prototype.destroy=function(e){var t=f(this.connecting,e);~t&&this.connecting.splice(t,1),this.connecting.length||this.close()},r.prototype.packet=function(e){l("writing packet %j",e);var t=this;e.query&&0===e.type&&(e.nsp+="?"+e.query),t.encoding?t.packetBuffer.push(e):(t.encoding=!0,this.encoder.encode(e,function(n){for(var r=0;r<n.length;r++)t.engine.write(n[r],e.options);t.encoding=!1,t.processPacketQueue()}))},r.prototype.processPacketQueue=function(){if(this.packetBuffer.length>0&&!this.encoding){var e=this.packetBuffer.shift();this.packet(e)}},r.prototype.cleanup=function(){l("cleanup");for(var e=this.subs.length,t=0;t<e;t++){this.subs.shift().destroy()}this.packetBuffer=[],this.encoding=!1,this.lastPing=null,this.decoder.destroy()},r.prototype.close=r.prototype.disconnect=function(){l("disconnect"),this.skipReconnect=!0,this.reconnecting=!1,"opening"===this.readyState&&this.cleanup(),this.backoff.reset(),this.readyState="closed",this.engine&&this.engine.close()},r.prototype.onclose=function(e){l("onclose"),this.cleanup(),this.backoff.reset(),this.readyState="closed",this.emit("close",e),this._reconnection&&!this.skipReconnect&&this.reconnect()},r.prototype.reconnect=function(){if(this.reconnecting||this.skipReconnect)return this;var e=this;if(this.backoff.attempts>=this._reconnectionAttempts)l("reconnect failed"),this.backoff.reset(),this.emitAll("reconnect_failed"),this.reconnecting=!1;else{var t=this.backoff.duration();l("will wait %dms before reconnect attempt",t),this.reconnecting=!0;var n=setTimeout(function(){e.skipReconnect||(l("attempting reconnect"),e.emitAll("reconnect_attempt",e.backoff.attempts),e.emitAll("reconnecting",e.backoff.attempts),e.skipReconnect||e.open(function(t){t?(l("reconnect attempt error"),e.reconnecting=!1,e.reconnect(),e.emitAll("reconnect_error",t.data)):(l("reconnect success"),e.onreconnect())}))},t);this.subs.push({destroy:function(){clearTimeout(n)}})}},r.prototype.onreconnect=function(){var e=this.backoff.attempts;this.reconnecting=!1,this.backoff.reset(),this.updateSocketIds(),this.emitAll("reconnect",e)}},function(e,t,n){(function(e){function r(t){var n=!1,r=!1,s=!1!==t.jsonp;if(e.location){var u="https:"===location.protocol,c=location.port;c||(c=u?443:80),n=t.hostname!==location.hostname||c!==t.port,r=t.secure!==u}if(t.xdomain=n,t.xscheme=r,"open"in new i(t)&&!t.forceJSONP)return new o(t);if(!s)throw new Error("JSONP disabled");return new a(t)}var i=n(94),o=n(217),a=n(227),s=n(228);t.polling=r,t.websocket=s}).call(t,n(13))},function(e,t,n){function r(e){var t=e&&e.forceBase64;l&&!t||(this.supportsBinary=!1),i.call(this,e)}var i=n(95),o=n(72),a=n(55),s=n(73),u=n(123),c=n(74)("engine.io-client:polling");e.exports=r;var l=function(){return null!=new(n(94))({xdomain:!1}).responseType}();s(r,i),r.prototype.name="polling",r.prototype.doOpen=function(){this.poll()},r.prototype.pause=function(e){function t(){c("paused"),n.readyState="paused",e()}var n=this;if(this.readyState="pausing",this.polling||!this.writable){var r=0;this.polling&&(c("we are currently polling - waiting to pause"),r++,this.once("pollComplete",function(){c("pre-pause polling complete"),--r||t()})),this.writable||(c("we are currently writing - waiting to pause"),r++,this.once("drain",function(){c("pre-pause writing complete"),--r||t()}))}else t()},r.prototype.poll=function(){c("polling"),this.polling=!0,this.doPoll(),this.emit("poll")},r.prototype.onData=function(e){var t=this;c("polling got data %s",e);var n=function(e,n,r){if("opening"===t.readyState&&t.onOpen(),"close"===e.type)return t.onClose(),!1;t.onPacket(e)};a.decodePayload(e,this.socket.binaryType,n),"closed"!==this.readyState&&(this.polling=!1,this.emit("pollComplete"),"open"===this.readyState?this.poll():c('ignoring poll - transport state "%s"',this.readyState))},r.prototype.doClose=function(){function e(){c("writing close packet"),t.write([{type:"close"}])}var t=this;"open"===this.readyState?(c("transport open - closing"),e()):(c("transport not open - deferring close"),this.once("open",e))},r.prototype.write=function(e){var t=this;this.writable=!1;var n=function(){t.writable=!0,t.emit("drain")};a.encodePayload(e,this.supportsBinary,function(e){t.doWrite(e,n)})},r.prototype.uri=function(){var e=this.query||{},t=this.secure?"https":"http",n="";return!1!==this.timestampRequests&&(e[this.timestampParam]=u()),this.supportsBinary||e.sid||(e.b64=1),e=o.encode(e),this.port&&("https"===t&&443!==Number(this.port)||"http"===t&&80!==Number(this.port))&&(n=":"+this.port),e.length&&(e="?"+e),t+"://"+(-1!==this.hostname.indexOf(":")?"["+this.hostname+"]":this.hostname)+n+this.path+e}},function(e,t,n){(function(t){function r(e){if(!e||"object"!==typeof e)return!1;if(i(e)){for(var n=0,o=e.length;n<o;n++)if(r(e[n]))return!0;return!1}if("function"===typeof t.Buffer&&t.Buffer.isBuffer&&t.Buffer.isBuffer(e)||"function"===typeof t.ArrayBuffer&&e instanceof ArrayBuffer||a&&e instanceof Blob||s&&e instanceof File)return!0;if(e.toJSON&&"function"===typeof e.toJSON&&1===arguments.length)return r(e.toJSON(),!0);for(var u in e)if(Object.prototype.hasOwnProperty.call(e,u)&&r(e[u]))return!0;return!1}var i=n(219),o=Object.prototype.toString,a="function"===typeof t.Blob||"[object BlobConstructor]"===o.call(t.Blob),s="function"===typeof t.File||"[object FileConstructor]"===o.call(t.File);e.exports=r}).call(t,n(13))},function(e,t,n){"use strict";function r(e){var t="";do{t=s[e%u]+t,e=Math.floor(e/u)}while(e>0);return t}function i(e){var t=0;for(f=0;f<e.length;f++)t=t*u+c[e.charAt(f)];return t}function o(){var e=r(+new Date);return e!==a?(l=0,a=e):e+"."+r(l++)}for(var a,s="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),u=64,c={},l=0,f=0;f<u;f++)c[s[f]]=f;o.encode=r,o.decode=i,e.exports=o},function(e,t){var n=[].indexOf;e.exports=function(e,t){if(n)return e.indexOf(t);for(var r=0;r<e.length;++r)if(e[r]===t)return r;return-1}},function(e,t,n){function r(e,t,n){this.io=e,this.nsp=t,this.json=this,this.ids=0,this.acks={},this.receiveBuffer=[],this.sendBuffer=[],this.connected=!1,this.disconnected=!0,this.flags={},n&&n.query&&(this.query=n.query),this.io.autoConnect&&this.open()}var i=n(93),o=n(54),a=n(230),s=n(126),u=n(127),c=n(71)("socket.io-client:socket"),l=n(72),f=n(122);e.exports=r;var p={connect:1,connect_error:1,connect_timeout:1,connecting:1,disconnect:1,error:1,reconnect:1,reconnect_attempt:1,reconnect_failed:1,reconnect_error:1,reconnecting:1,ping:1,pong:1},h=o.prototype.emit;o(r.prototype),r.prototype.subEvents=function(){if(!this.subs){var e=this.io;this.subs=[s(e,"open",u(this,"onopen")),s(e,"packet",u(this,"onpacket")),s(e,"close",u(this,"onclose"))]}},r.prototype.open=r.prototype.connect=function(){return this.connected?this:(this.subEvents(),this.io.open(),"open"===this.io.readyState&&this.onopen(),this.emit("connecting"),this)},r.prototype.send=function(){var e=a(arguments);return e.unshift("message"),this.emit.apply(this,e),this},r.prototype.emit=function(e){if(p.hasOwnProperty(e))return h.apply(this,arguments),this;var t=a(arguments),n={type:(void 0!==this.flags.binary?this.flags.binary:f(t))?i.BINARY_EVENT:i.EVENT,data:t};return n.options={},n.options.compress=!this.flags||!1!==this.flags.compress,"function"===typeof t[t.length-1]&&(c("emitting packet with ack id %d",this.ids),this.acks[this.ids]=t.pop(),n.id=this.ids++),this.connected?this.packet(n):this.sendBuffer.push(n),this.flags={},this},r.prototype.packet=function(e){e.nsp=this.nsp,this.io.packet(e)},r.prototype.onopen=function(){if(c("transport is open - connecting"),"/"!==this.nsp)if(this.query){var e="object"===typeof this.query?l.encode(this.query):this.query;c("sending connect packet with query %s",e),this.packet({type:i.CONNECT,query:e})}else this.packet({type:i.CONNECT})},r.prototype.onclose=function(e){c("close (%s)",e),this.connected=!1,this.disconnected=!0,delete this.id,this.emit("disconnect",e)},r.prototype.onpacket=function(e){if(e.nsp===this.nsp)switch(e.type){case i.CONNECT:this.onconnect();break;case i.EVENT:case i.BINARY_EVENT:this.onevent(e);break;case i.ACK:case i.BINARY_ACK:this.onack(e);break;case i.DISCONNECT:this.ondisconnect();break;case i.ERROR:this.emit("error",e.data)}},r.prototype.onevent=function(e){var t=e.data||[];c("emitting event %j",t),null!=e.id&&(c("attaching ack callback to event"),t.push(this.ack(e.id))),this.connected?h.apply(this,t):this.receiveBuffer.push(t)},r.prototype.ack=function(e){var t=this,n=!1;return function(){if(!n){n=!0;var r=a(arguments);c("sending ack %j",r),t.packet({type:f(r)?i.BINARY_ACK:i.ACK,id:e,data:r})}}},r.prototype.onack=function(e){var t=this.acks[e.id];"function"===typeof t?(c("calling ack %s with %j",e.id,e.data),t.apply(this,e.data),delete this.acks[e.id]):c("bad ack %s",e.id)},r.prototype.onconnect=function(){this.connected=!0,this.disconnected=!1,this.emit("connect"),this.emitBuffered()},r.prototype.emitBuffered=function(){var e;for(e=0;e<this.receiveBuffer.length;e++)h.apply(this,this.receiveBuffer[e]);for(this.receiveBuffer=[],e=0;e<this.sendBuffer.length;e++)this.packet(this.sendBuffer[e]);this.sendBuffer=[]},r.prototype.ondisconnect=function(){c("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")},r.prototype.destroy=function(){if(this.subs){for(var e=0;e<this.subs.length;e++)this.subs[e].destroy();this.subs=null}this.io.destroy(this)},r.prototype.close=r.prototype.disconnect=function(){return this.connected&&(c("performing disconnect (%s)",this.nsp),this.packet({type:i.DISCONNECT})),this.destroy(),this.connected&&this.onclose("io client disconnect"),this},r.prototype.compress=function(e){return this.flags.compress=e,this},r.prototype.binary=function(e){return this.flags.binary=e,this}},function(e,t){function n(e,t,n){return e.on(t,n),{destroy:function(){e.removeListener(t,n)}}}e.exports=n},function(e,t){var n=[].slice;e.exports=function(e,t){if("string"==typeof t&&(t=e[t]),"function"!=typeof t)throw new Error("bind() requires a function");var r=n.call(arguments,2);return function(){return t.apply(e,r.concat(n.call(arguments)))}}},function(e,t,n){"use strict";var r=n(53),i=n.n(r),o=n(246),a=n(248),s=void 0;s=i.a.createPortal?o.a:a.a,t.a=s},function(e,t,n){"use strict";function r(e){e.sock.on("connectionVerified",function(){e=e.getState(),e.verified=!0,e.verificationfail=!1,e.updateState(e)}),e.sock.on("connectionNotVerified",function(){e=e.getState(),e.verified=!1,e.updateState(e)}),e.sock.on("connect",function(){e=e.getState(),e.healthy=!0,e.updateState(e),e.sock.emit("verifyMe",e.passwd)}),e.sock.on("disconnect",function(){e=e.getState(),e.healthy=!1,e.updateState(e)}),e.sock.on("downstreamConfigs",function(t){e=e.getState(),e.configs=t,e.updateState(e)})}function i(e,t,n){return{updateState:e,getState:t,sock:n,passwd:"",verified:!1,verificationfail:!1,multiplier:.5,healthy:!1,healthycolor:"#0dee24",unhealthycolor:"#ee650d",activecolor:"#0d82ee",camtilt:.5,campan:.5,configs:{canbus:{healthy:!1,active:!1,multiplier:1,config:{flv:{title:"Front Left Vertical",id:0,engage:!1,status:{},reverse:!1,multiplier:1},frv:{title:"Front Right Vertical",id:0,engage:!1,status:{},reverse:!1,multiplier:1},alv:{title:"Aft Left Vertical",id:0,engage:!1,status:{},reverse:!1,multiplier:1},arv:{title:"Aft Right Vertical",id:0,engage:!1,status:{},reverse:!1,multiplier:1},flh:{title:"Front Left Horizontal",id:0,engage:!1,status:{},reverse:!1,multiplier:1},frh:{title:"Front Right Horizontal",id:0,engage:!1,status:{},reverse:!1,multiplier:1},alh:{title:"Aft Left Horizontal",id:0,engage:!1,status:{},reverse:!1,multiplier:1},arh:{title:"Aft Right Horizontal",id:0,engage:!1,status:{},reverse:!1,multiplier:1}}},powersupply:{healthy:!1,active:!1},sensors:{healthy:!1,active:!1},gpiostatus:{led1:{pin:7,state:0},led2:{pin:7,state:0},alex:{pin:7,state:0},nico:{pin:7,state:0}},sensordata:{pitch:0,roll:0,tin:0,tout:0,tw:0,d1:0,d2:0}}}}t.b=r,t.a=i,n.d(t,"d",function(){return c}),n.d(t,"c",function(){return h});var o=n(7),a=n.n(o),s=n(26),u=(n.n(s),n(41)),c=function(e){return a.a.createElement("form",{onSubmit:function(t){t.preventDefault(),e.data.updateState(e.data),e.data.sock.emit("verifyMe",e.data.passwd)}},a.a.createElement(u.n,null,a.a.createElement(u.q,{for:"pass"},"Enter password to verify access to server"),a.a.createElement(u.o,{id:"pass",type:"password",placeholder:"Password",onChange:function(t){e.data.passwd=t.target.value}})),a.a.createElement(u.n,null,a.a.createElement(u.a,{outline:!0,color:"success"},"Connect")," "))},l=function(e){var t=e.data;return a.a.createElement(u.d,{style:{borderLeft:"5px solid ".concat(t.healthy?t.verified?t.activecolor:t.healthycolor:t.unhealthycolor)}},a.a.createElement(u.e,null,a.a.createElement(u.i,null,"Main server settings"),a.a.createElement(u.h,null,"Status: ",t.healthy?t.verified?"Verified":"Healthy":"Unhealthy"),a.a.createElement("hr",{className:"my-2"}),t.verified?a.a.createElement("div",null,a.a.createElement(u.a,{outline:!0,color:"primary",onClick:function(){t=t.getState(),t.verified=!1,t.updateState(t),t.sock.emit("verifyMe","passwd")}},"Update data")):a.a.createElement(c,{data:t})))},f=function(e){var t=e.data,n=t.configs.canbus;return a.a.createElement(u.d,{style:{borderLeft:"5px solid ".concat(n.healthy?n.active?t.activecolor:t.healthycolor:t.unhealthycolor)}},a.a.createElement(u.e,null,a.a.createElement(u.i,null,"CAN-bus"),a.a.createElement(u.h,null,"Status: ",n.healthy?n.active?"Active":"Healthy":"Unhealthy"),a.a.createElement("div",{style:{maxHeight:"60vh",overflow:"scroll"}},Object.keys(n.config).map(function(e){var r=n.config[e];return a.a.createElement("div",{style:{paddingTop:"10px",marginLeft:"2px",paddingBottom:"15px"}},a.a.createElement("hr",{className:"my-2"}),a.a.createElement(u.h,null,r.title),a.a.createElement(u.r,null,a.a.createElement("form",{onSubmit:function(n){n.preventDefault();var i=t.getState();i.configs.canbus.config[e].id=r.id,t.sock.emit("upstreamConfigs",i.configs)}},a.a.createElement(u.q,null,"Controller ID: ",r.id),a.a.createElement(u.o,{placeholder:r.id,onChange:function(e){r.id=e.target.value}}),a.a.createElement(u.n,null))),a.a.createElement(u.c,null,a.a.createElement(u.a,{color:r.engage?"primary":"danger",onClick:function(n){var r=t.getState();r.configs.canbus.config[e].engage?r.configs.canbus.config[e].engage=!1:r.configs.canbus.config[e].engage=!0,t.sock.emit("upstreamConfigs",r.configs)}},r.engage?"Disengage":"Engage"),a.a.createElement(u.a,{color:r.reverse?"danger":"primary",onClick:function(n){var r=t.getState();r.configs.canbus.config[e].reverse?r.configs.canbus.config[e].reverse=!1:r.configs.canbus.config[e].reverse=!0,t.sock.emit("upstreamConfigs",r.configs)}},r.reverse?"Reversed":"Straight")),a.a.createElement(u.r,{style:{marginTop:"15px"}},a.a.createElement("form",{onSubmit:function(n){n.preventDefault();var i=t.getState();i.configs.canbus.config[e].multiplier=r.multiplier,t.sock.emit("upstreamConfigs",i.configs)}},a.a.createElement(u.q,null,"Thrust multiplier: ",r.multiplier),a.a.createElement(u.o,{placeholder:r.multiplier,onChange:function(e){r.multiplier=e.target.value}}),a.a.createElement(u.n,null))))}))))},p=function(e){console.log(e.data);var t=e.data,n=t.configs.sensors,r=t.configs.sensordata;return a.a.createElement(u.d,{style:{borderLeft:"5px solid ".concat(n.healthy?n.active?t.activecolor:t.healthycolor:t.unhealthycolor)}},a.a.createElement(u.e,null,a.a.createElement(u.i,null,"Sensors"),a.a.createElement(u.h,null,"Status: ",n.healthy?n.active?"Active":"Healthy":"Unhealthy"),a.a.createElement("hr",{className:"my-2"}),Object.keys(r).map(function(e){return a.a.createElement("p",null,e,": ",r[e])})))},h=function(e){return a.a.createElement("div",{style:{padding:"20px"}},a.a.createElement("h1",{className:"display-3"},"Server"),a.a.createElement(u.f,null,a.a.createElement(l,{data:e.data}),e.data.verified?a.a.createElement(f,{data:e.data}):null,e.data.verified?a.a.createElement(p,{data:e.data}):null))}},function(e,t,n){e.exports=function(e){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}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},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,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=7)}([function(e,t,n){e.exports=function(){function e(){}function t(e,n){return this.identifier=n.identifier,this.position=n.position,this.frontPosition=n.frontPosition,this.collection=e,this.defaults={size:100,threshold:.1,color:"white",fadeTime:250,dataOnly:!1,restJoystick:!0,restOpacity:.5,mode:"dynamic",zone:document.body},this.config(n),"dynamic"===this.options.mode&&(this.options.restOpacity=0),this.id=t.id,t.id+=1,this.buildEl().stylize(),this.instance={el:this.ui.el,on:this.on.bind(this),off:this.off.bind(this),show:this.show.bind(this),hide:this.hide.bind(this),add:this.addToDom.bind(this),remove:this.removeFromDom.bind(this),destroy:this.destroy.bind(this),resetDirection:this.resetDirection.bind(this),computeDirection:this.computeDirection.bind(this),trigger:this.trigger.bind(this),position:this.position,frontPosition:this.frontPosition,ui:this.ui,identifier:this.identifier,id:this.id,options:this.options},this.instance}function n(e,t){return this.nipples=[],this.idles=[],this.actives=[],this.ids=[],this.pressureIntervals={},this.manager=e,this.id=n.id,n.id+=1,this.defaults={zone:document.body,multitouch:!1,maxNumberOfNipples:10,mode:"dynamic",position:{top:0,left:0},catchDistance:200,size:100,threshold:.1,color:"white",fadeTime:250,dataOnly:!1,restJoystick:!0,restOpacity:.5},this.config(t),"static"!==this.options.mode&&"semi"!==this.options.mode||(this.options.multitouch=!1),this.options.multitouch||(this.options.maxNumberOfNipples=1),this.updateBox(),this.prepareNipples(),this.bindings(),this.begin(),this.nipples}function r(e){var t,n=this;return n.ids={},n.index=0,n.collections=[],n.config(e),n.prepareCollections(),l.bindEvt(window,"resize",function(e){clearTimeout(t),t=setTimeout(function(){var e,t=l.getScroll();n.collections.forEach(function(n){n.forEach(function(n){e=n.el.getBoundingClientRect(),n.position={x:t.x+e.left,y:t.y+e.top}})})},100)}),n.collections}var i,o=!!("ontouchstart"in window),a=!!window.PointerEvent,s=!!window.MSPointerEvent,u={touch:{start:"touchstart",move:"touchmove",end:"touchend, touchcancel"},mouse:{start:"mousedown",move:"mousemove",end:"mouseup"},pointer:{start:"pointerdown",move:"pointermove",end:"pointerup"},MSPointer:{start:"MSPointerDown",move:"MSPointerMove",end:"MSPointerUp"}},c={};a?i=u.pointer:s?i=u.MSPointer:o?(i=u.touch,c=u.mouse):i=u.mouse;var l={};l.distance=function(e,t){var n=t.x-e.x,r=t.y-e.y;return Math.sqrt(n*n+r*r)},l.angle=function(e,t){var n=t.x-e.x,r=t.y-e.y;return l.degrees(Math.atan2(r,n))},l.findCoord=function(e,t,n){var r={x:0,y:0};return n=l.radians(n),r.x=e.x-t*Math.cos(n),r.y=e.y-t*Math.sin(n),r},l.radians=function(e){return e*(Math.PI/180)},l.degrees=function(e){return e*(180/Math.PI)},l.bindEvt=function(e,t,n){for(var r,i=t.split(/[ ,]+/g),o=0;o<i.length;o+=1)r=i[o],e.addEventListener?e.addEventListener(r,n,!1):e.attachEvent&&e.attachEvent(r,n)},l.unbindEvt=function(e,t,n){for(var r,i=t.split(/[ ,]+/g),o=0;o<i.length;o+=1)r=i[o],e.removeEventListener?e.removeEventListener(r,n):e.detachEvent&&e.detachEvent(r,n)},l.trigger=function(e,t,n){var r=new CustomEvent(t,n);e.dispatchEvent(r)},l.prepareEvent=function(e){return e.preventDefault(),e.type.match(/^touch/)?e.changedTouches:e},l.getScroll=function(){return{x:void 0!==window.pageXOffset?window.pageXOffset:(document.documentElement||document.body.parentNode||document.body).scrollLeft,y:void 0!==window.pageYOffset?window.pageYOffset:(document.documentElement||document.body.parentNode||document.body).scrollTop}},l.applyPosition=function(e,t){t.x&&t.y?(e.style.left=t.x+"px",e.style.top=t.y+"px"):(t.top||t.right||t.bottom||t.left)&&(e.style.top=t.top,e.style.right=t.right,e.style.bottom=t.bottom,e.style.left=t.left)},l.getTransitionStyle=function(e,t,n){var r=l.configStylePropertyObject(e);for(var i in r)if(r.hasOwnProperty(i))if("string"==typeof t)r[i]=t+" "+n;else{for(var o="",a=0,s=t.length;a<s;a+=1)o+=t[a]+" "+n+", ";r[i]=o.slice(0,-2)}return r},l.getVendorStyle=function(e,t){var n=l.configStylePropertyObject(e);for(var r in n)n.hasOwnProperty(r)&&(n[r]=t);return n},l.configStylePropertyObject=function(e){var t={};return t[e]="",["webkit","Moz","o"].forEach(function(n){t[n+e.charAt(0).toUpperCase()+e.slice(1)]=""}),t},l.extend=function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e},l.safeExtend=function(e,t){var n={};for(var r in e)e.hasOwnProperty(r)&&t.hasOwnProperty(r)?n[r]=t[r]:e.hasOwnProperty(r)&&(n[r]=e[r]);return n},l.map=function(e,t){if(e.length)for(var n=0,r=e.length;n<r;n+=1)t(e[n]);else t(e)},e.prototype.on=function(e,t){var n,r=e.split(/[ ,]+/g);this._handlers_=this._handlers_||{};for(var i=0;i<r.length;i+=1)n=r[i],this._handlers_[n]=this._handlers_[n]||[],this._handlers_[n].push(t);return this},e.prototype.off=function(e,t){return this._handlers_=this._handlers_||{},void 0===e?this._handlers_={}:void 0===t?this._handlers_[e]=null:this._handlers_[e]&&this._handlers_[e].indexOf(t)>=0&&this._handlers_[e].splice(this._handlers_[e].indexOf(t),1),this},e.prototype.trigger=function(e,t){var n,r=this,i=e.split(/[ ,]+/g);r._handlers_=r._handlers_||{};for(var o=0;o<i.length;o+=1)n=i[o],r._handlers_[n]&&r._handlers_[n].length&&r._handlers_[n].forEach(function(e){e.call(r,{type:n,target:r},t)})},e.prototype.config=function(e){this.options=this.defaults||{},e&&(this.options=l.safeExtend(this.options,e))},e.prototype.bindEvt=function(e,t){var n=this;return n._domHandlers_=n._domHandlers_||{},n._domHandlers_[t]=function(){"function"==typeof n["on"+t]?n["on"+t].apply(n,arguments):console.warn('[WARNING] : Missing "on'+t+'" handler.')},l.bindEvt(e,i[t],n._domHandlers_[t]),c[t]&&l.bindEvt(e,c[t],n._domHandlers_[t]),n},e.prototype.unbindEvt=function(e,t){return this._domHandlers_=this._domHandlers_||{},l.unbindEvt(e,i[t],this._domHandlers_[t]),c[t]&&l.unbindEvt(e,c[t],this._domHandlers_[t]),delete this._domHandlers_[t],this},t.prototype=new e,t.constructor=t,t.id=0,t.prototype.buildEl=function(e){return this.ui={},this.options.dataOnly?this:(this.ui.el=document.createElement("div"),this.ui.back=document.createElement("div"),this.ui.front=document.createElement("div"),this.ui.el.className="nipple collection_"+this.collection.id,this.ui.back.className="back",this.ui.front.className="front",this.ui.el.setAttribute("id","nipple_"+this.collection.id+"_"+this.id),this.ui.el.appendChild(this.ui.back),this.ui.el.appendChild(this.ui.front),this)},t.prototype.stylize=function(){if(this.options.dataOnly)return this;var e=this.options.fadeTime+"ms",t=l.getVendorStyle("borderRadius","50%"),n=l.getTransitionStyle("transition","opacity",e),r={};return r.el={position:"absolute",opacity:this.options.restOpacity,display:"block",zIndex:999},r.back={position:"absolute",display:"block",width:this.options.size+"px",height:this.options.size+"px",marginLeft:-this.options.size/2+"px",marginTop:-this.options.size/2+"px",background:this.options.color,opacity:".5"},r.front={width:this.options.size/2+"px",height:this.options.size/2+"px",position:"absolute",display:"block",marginLeft:-this.options.size/4+"px",marginTop:-this.options.size/4+"px",background:this.options.color,opacity:".5"},l.extend(r.el,n),l.extend(r.back,t),l.extend(r.front,t),this.applyStyles(r),this},t.prototype.applyStyles=function(e){for(var t in this.ui)if(this.ui.hasOwnProperty(t))for(var n in e[t])this.ui[t].style[n]=e[t][n];return this},t.prototype.addToDom=function(){return this.options.dataOnly||document.body.contains(this.ui.el)?this:(this.options.zone.appendChild(this.ui.el),this)},t.prototype.removeFromDom=function(){return this.options.dataOnly||!document.body.contains(this.ui.el)?this:(this.options.zone.removeChild(this.ui.el),this)},t.prototype.destroy=function(){clearTimeout(this.removeTimeout),clearTimeout(this.showTimeout),clearTimeout(this.restTimeout),this.trigger("destroyed",this.instance),this.removeFromDom(),this.off()},t.prototype.show=function(e){var t=this;return t.options.dataOnly?t:(clearTimeout(t.removeTimeout),clearTimeout(t.showTimeout),clearTimeout(t.restTimeout),t.addToDom(),t.restCallback(),setTimeout(function(){t.ui.el.style.opacity=1},0),t.showTimeout=setTimeout(function(){t.trigger("shown",t.instance),"function"==typeof e&&e.call(this)},t.options.fadeTime),t)},t.prototype.hide=function(e){var t=this;return t.options.dataOnly?t:(t.ui.el.style.opacity=t.options.restOpacity,clearTimeout(t.removeTimeout),clearTimeout(t.showTimeout),clearTimeout(t.restTimeout),t.removeTimeout=setTimeout(function(){var n="dynamic"===t.options.mode?"none":"block";t.ui.el.style.display=n,"function"==typeof e&&e.call(t),t.trigger("hidden",t.instance)},t.options.fadeTime),t.options.restJoystick&&t.restPosition(),t)},t.prototype.restPosition=function(e){var t=this;t.frontPosition={x:0,y:0};var n=t.options.fadeTime+"ms",r={};r.front=l.getTransitionStyle("transition",["top","left"],n);var i={front:{}};i.front={left:t.frontPosition.x+"px",top:t.frontPosition.y+"px"},t.applyStyles(r),t.applyStyles(i),t.restTimeout=setTimeout(function(){"function"==typeof e&&e.call(t),t.restCallback()},t.options.fadeTime)},t.prototype.restCallback=function(){var e={};e.front=l.getTransitionStyle("transition","none",""),this.applyStyles(e),this.trigger("rested",this.instance)},t.prototype.resetDirection=function(){this.direction={x:!1,y:!1,angle:!1}},t.prototype.computeDirection=function(e){var t,n,r,i=e.angle.radian,o=Math.PI/4,a=Math.PI/2;if(t=i>o&&i<3*o?"up":i>-o&&i<=o?"left":i>3*-o&&i<=-o?"down":"right",n=i>-a&&i<a?"left":"right",r=i>0?"up":"down",e.force>this.options.threshold){var s={};for(var u in this.direction)this.direction.hasOwnProperty(u)&&(s[u]=this.direction[u]);var c={};for(var u in this.direction={x:n,y:r,angle:t},e.direction=this.direction,s)s[u]===this.direction[u]&&(c[u]=!0);if(c.x&&c.y&&c.angle)return e;c.x&&c.y||this.trigger("plain",e),c.x||this.trigger("plain:"+n,e),c.y||this.trigger("plain:"+r,e),c.angle||this.trigger("dir dir:"+t,e)}return e},n.prototype=new e,n.constructor=n,n.id=0,n.prototype.prepareNipples=function(){var e=this.nipples;e.on=this.on.bind(this),e.off=this.off.bind(this),e.options=this.options,e.destroy=this.destroy.bind(this),e.ids=this.ids,e.id=this.id,e.processOnMove=this.processOnMove.bind(this),e.processOnEnd=this.processOnEnd.bind(this),e.get=function(t){if(void 0===t)return e[0];for(var n=0,r=e.length;n<r;n+=1)if(e[n].identifier===t)return e[n];return!1}},n.prototype.bindings=function(){this.bindEvt(this.options.zone,"start"),this.options.zone.style.touchAction="none",this.options.zone.style.msTouchAction="none"},n.prototype.begin=function(){var e=this.options;if("static"===e.mode){var t=this.createNipple(e.position,this.manager.getIdentifier());t.add(),this.idles.push(t)}},n.prototype.createNipple=function(e,n){var r=l.getScroll(),i={},o=this.options;if(e.x&&e.y)i={x:e.x-(r.x+this.box.left),y:e.y-(r.y+this.box.top)};else if(e.top||e.right||e.bottom||e.left){var a=document.createElement("DIV");a.style.display="hidden",a.style.top=e.top,a.style.right=e.right,a.style.bottom=e.bottom,a.style.left=e.left,a.style.position="absolute",o.zone.appendChild(a);var s=a.getBoundingClientRect();o.zone.removeChild(a),i=e,e={x:s.left+r.x,y:s.top+r.y}}var u=new t(this,{color:o.color,size:o.size,threshold:o.threshold,fadeTime:o.fadeTime,dataOnly:o.dataOnly,restJoystick:o.restJoystick,restOpacity:o.restOpacity,mode:o.mode,identifier:n,position:e,zone:o.zone,frontPosition:{x:0,y:0}});return o.dataOnly||(l.applyPosition(u.ui.el,i),l.applyPosition(u.ui.front,u.frontPosition)),this.nipples.push(u),this.trigger("added "+u.identifier+":added",u),this.manager.trigger("added "+u.identifier+":added",u),this.bindNipple(u),u},n.prototype.updateBox=function(){this.box=this.options.zone.getBoundingClientRect()},n.prototype.bindNipple=function(e){var t,n=this,r=function(e,r){t=e.type+" "+r.id+":"+e.type,n.trigger(t,r)};e.on("destroyed",n.onDestroyed.bind(n)),e.on("shown hidden rested dir plain",r),e.on("dir:up dir:right dir:down dir:left",r),e.on("plain:up plain:right plain:down plain:left",r)},n.prototype.pressureFn=function(e,t,n){var r=this,i=0;clearInterval(r.pressureIntervals[n]),r.pressureIntervals[n]=setInterval(function(){var n=e.force||e.pressure||e.webkitForce||0;n!==i&&(t.trigger("pressure",n),r.trigger("pressure "+t.identifier+":pressure",n),i=n)}.bind(r),100)},n.prototype.onstart=function(e){var t=this,n=t.options;return e=l.prepareEvent(e),t.updateBox(),l.map(e,function(e){t.actives.length<n.maxNumberOfNipples&&t.processOnStart(e)}),t.manager.bindDocument(),!1},n.prototype.processOnStart=function(e){var t,n=this,r=n.options,i=n.manager.getIdentifier(e),o=e.force||e.pressure||e.webkitForce||0,a={x:e.pageX,y:e.pageY},s=n.getOrCreate(i,a);s.identifier!==i&&n.manager.removeIdentifier(s.identifier),s.identifier=i;var u=function(t){t.trigger("start",t),n.trigger("start "+t.id+":start",t),t.show(),o>0&&n.pressureFn(e,t,t.identifier),n.processOnMove(e)};if((t=n.idles.indexOf(s))>=0&&n.idles.splice(t,1),n.actives.push(s),n.ids.push(s.identifier),"semi"!==r.mode)u(s);else{if(!(l.distance(a,s.position)<=r.catchDistance))return s.destroy(),void n.processOnStart(e);u(s)}return s},n.prototype.getOrCreate=function(e,t){var n,r=this.options;return/(semi|static)/.test(r.mode)?(n=this.idles[0])?(this.idles.splice(0,1),n):"semi"===r.mode?this.createNipple(t,e):(console.warn("Coudln't find the needed nipple."),!1):n=this.createNipple(t,e)},n.prototype.processOnMove=function(e){var t=this.options,n=this.manager.getIdentifier(e),r=this.nipples.get(n);if(!r)return console.error("Found zombie joystick with ID "+n),void this.manager.removeIdentifier(n);r.identifier=n;var i=r.options.size/2,o={x:e.pageX,y:e.pageY},a=l.distance(o,r.position),s=l.angle(o,r.position),u=l.radians(s),c=a/i;a>i&&(a=i,o=l.findCoord(r.position,a,s)),r.frontPosition={x:o.x-r.position.x,y:o.y-r.position.y},t.dataOnly||l.applyPosition(r.ui.front,r.frontPosition);var f={identifier:r.identifier,position:o,force:c,pressure:e.force||e.pressure||e.webkitForce||0,distance:a,angle:{radian:u,degree:s},instance:r};(f=r.computeDirection(f)).angle={radian:l.radians(180-s),degree:180-s},r.trigger("move",f),this.trigger("move "+r.id+":move",f)},n.prototype.processOnEnd=function(e){var t=this,n=t.options,r=t.manager.getIdentifier(e),i=t.nipples.get(r),o=t.manager.removeIdentifier(i.identifier);i&&(n.dataOnly||i.hide(function(){"dynamic"===n.mode&&(i.trigger("removed",i),t.trigger("removed "+i.id+":removed",i),t.manager.trigger("removed "+i.id+":removed",i),i.destroy())}),clearInterval(t.pressureIntervals[i.identifier]),i.resetDirection(),i.trigger("end",i),t.trigger("end "+i.id+":end",i),t.ids.indexOf(i.identifier)>=0&&t.ids.splice(t.ids.indexOf(i.identifier),1),t.actives.indexOf(i)>=0&&t.actives.splice(t.actives.indexOf(i),1),/(semi|static)/.test(n.mode)?t.idles.push(i):t.nipples.indexOf(i)>=0&&t.nipples.splice(t.nipples.indexOf(i),1),t.manager.unbindDocument(),/(semi|static)/.test(n.mode)&&(t.manager.ids[o.id]=o.identifier))},n.prototype.onDestroyed=function(e,t){this.nipples.indexOf(t)>=0&&this.nipples.splice(this.nipples.indexOf(t),1),this.actives.indexOf(t)>=0&&this.actives.splice(this.actives.indexOf(t),1),this.idles.indexOf(t)>=0&&this.idles.splice(this.idles.indexOf(t),1),this.ids.indexOf(t.identifier)>=0&&this.ids.splice(this.ids.indexOf(t.identifier),1),this.manager.removeIdentifier(t.identifier),this.manager.unbindDocument()},n.prototype.destroy=function(){for(var e in this.unbindEvt(this.options.zone,"start"),this.nipples.forEach(function(e){e.destroy()}),this.pressureIntervals)this.pressureIntervals.hasOwnProperty(e)&&clearInterval(this.pressureIntervals[e]);this.trigger("destroyed",this.nipples),this.manager.unbindDocument(),this.off()},r.prototype=new e,r.constructor=r,r.prototype.prepareCollections=function(){var e=this;e.collections.create=e.create.bind(e),e.collections.on=e.on.bind(e),e.collections.off=e.off.bind(e),e.collections.destroy=e.destroy.bind(e),e.collections.get=function(t){var n;return e.collections.every(function(e){return!(n=e.get(t))}),n}},r.prototype.create=function(e){return this.createCollection(e)},r.prototype.createCollection=function(e){var t=new n(this,e);return this.bindCollection(t),this.collections.push(t),t},r.prototype.bindCollection=function(e){var t,n=this,r=function(e,r){t=e.type+" "+r.id+":"+e.type,n.trigger(t,r)};e.on("destroyed",n.onDestroyed.bind(n)),e.on("shown hidden rested dir plain",r),e.on("dir:up dir:right dir:down dir:left",r),e.on("plain:up plain:right plain:down plain:left",r)},r.prototype.bindDocument=function(){this.binded||(this.bindEvt(document,"move").bindEvt(document,"end"),this.binded=!0)},r.prototype.unbindDocument=function(e){Object.keys(this.ids).length&&!0!==e||(this.unbindEvt(document,"move").unbindEvt(document,"end"),this.binded=!1)},r.prototype.getIdentifier=function(e){var t;return e?void 0===(t=void 0===e.identifier?e.pointerId:e.identifier)&&(t=this.latest||0):t=this.index,void 0===this.ids[t]&&(this.ids[t]=this.index,this.index+=1),this.latest=t,this.ids[t]},r.prototype.removeIdentifier=function(e){var t={};for(var n in this.ids)if(this.ids[n]===e){t.id=n,t.identifier=this.ids[n],delete this.ids[n];break}return t},r.prototype.onmove=function(e){return this.onAny("move",e),!1},r.prototype.onend=function(e){return this.onAny("end",e),!1},r.prototype.onAny=function(e,t){var n,r=this,i="processOn"+e.charAt(0).toUpperCase()+e.slice(1);return t=l.prepareEvent(t),l.map(t,function(e){n=r.getIdentifier(e),l.map(r.collections,function(e,t,n){n.ids.indexOf(t)>=0&&(n[i](e),e._found_=!0)}.bind(null,e,n)),e._found_||r.removeIdentifier(n)}),!1},r.prototype.destroy=function(){this.unbindDocument(!0),this.ids={},this.index=0,this.collections.forEach(function(e){e.destroy()}),this.off()},r.prototype.onDestroyed=function(e,t){if(this.collections.indexOf(t)<0)return!1;this.collections.splice(this.collections.indexOf(t),1)};var f=new r;return{create:function(e){return f.create(e)},factory:f}}()},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";e.exports=function(e,t,n,r,i,o,a,s){if(!e){var u;if(void 0===t)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,i,o,a,s],l=0;(u=new Error(t.replace(/%s/g,function(){return c[l++]}))).name="Invariant Violation"}throw u.framesToPop=1,u}}},function(e,t,n){"use strict";function r(e){return function(){return e}}var i=function(){};i.thatReturns=r,i.thatReturnsFalse=r(!1),i.thatReturnsTrue=r(!0),i.thatReturnsNull=r(null),i.thatReturnsThis=function(){return this},i.thatReturnsArgument=function(e){return e},e.exports=i},function(e,t,n){"use strict";var r=n(3),i=n(2),o=n(1);e.exports=function(){function e(e,t,n,r,a,s){s!==o&&i(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return n.checkPropTypes=r,n.PropTypes=n,n}},function(e,t,n){e.exports=n(4)()},function(e,t){e.exports=n(7)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(6),s=r(a),u=r(n(5)),c=r(n(0)),l=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.joyRef=s.default.createRef(),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,a.Component),o(t,[{key:"componentDidMount",value:function(){this.manager=c.default.create(i({},this.props.options,{zone:this.joyRef.current})),this.props.managerListener(this.manager)}},{key:"render",value:function(){return s.default.createElement("div",{ref:this.joyRef,style:this.props.containerStyle})}}]),t}();l.defaultProps={options:{mode:"semi",catchDistance:150,color:"white"},containerStyle:{width:"100%",height:"50vh",position:"relative",background:"linear-gradient(to right, #E684AE, #79CBCA, #77A1D3)"}},l.propTypes={managerListener:u.default.func.isRequired,options:u.default.shape({mode:u.default.string,catchDistance:u.default.number,color:u.default.string}),containerStyle:u.default.shape({width:u.default.string,height:u.default.string,position:u.default.string,background:u.default.string})},t.default=l}])},function(e,t,n){"use strict";function r(e){if(0==e)return"rgba(0,100,100,1)";var t=Math.pow(Math.abs(e),.5);return"rgba("+(Math.round((e>=0)*t*230)+25)+","+(Math.round(155*(1-t))+100)+","+(Math.round((e<0)*t*230)+25)+",1)"}function i(e,t){var n={flv:0,frv:0,alv:0,arv:0,flh:0,frh:0,alh:0,arh:0};n[t]=1,e(n),setTimeout(function(){n[t]=0,e(n)},300)}var o=n(7),a=n.n(o),s=n(90),u=(n.n(s),n(253)),c=n.n(u),l=n(254),f=(n.n(l),function(e){var t=r(e.percentage);return a.a.createElement(c.a,{percentage:100*Math.abs(e.percentage),textForPercentage:function(t){return e.label&&0==t?e.label:Math.round(100*e.percentage)+"%"},counterClockwise:e.percentage<0,styles:{path:{stroke:t,transition:"0.0s"},text:{fill:t}},strokeWidth:8})}),p=function(e){return a.a.createElement("div",null,a.a.createElement("div",{style:{width:"100%",overflow:"hidden"}},a.a.createElement("div",{style:{width:"25%",float:"left"},onClick:function(t){i(e.sendThrusts,"flh")}},a.a.createElement("div",{style:{padding:"1px"}},a.a.createElement(f,{percentage:e.flh,label:"FLH"}))),a.a.createElement("div",{style:{width:"25%",float:"left"}},a.a.createElement("div",{style:{padding:"1px"}})),a.a.createElement("div",{style:{width:"25%",float:"left"}},a.a.createElement("div",{style:{padding:"1px"}})),a.a.createElement("div",{style:{width:"25%",float:"left"},onClick:function(t){i(e.sendThrusts,"frh")}},a.a.createElement("div",{style:{padding:"1px"}},a.a.createElement(f,{percentage:e.frh,label:"FRH"})))),a.a.createElement("div",{style:{width:"100%",overflow:"hidden"}},a.a.createElement("div",{style:{width:"25%",float:"left"}},a.a.createElement("div",{style:{padding:"1px"}})),a.a.createElement("div",{style:{width:"25%",float:"left"},onClick:function(t){i(e.sendThrusts,"flv")}},a.a.createElement("div",{style:{padding:"1px"}},a.a.createElement(f,{percentage:e.flv,label:"FLV"}))),a.a.createElement("div",{style:{width:"25%",float:"left"},onClick:function(t){i(e.sendThrusts,"frv")}},a.a.createElement("div",{style:{padding:"1px"}},a.a.createElement(f,{percentage:e.frv,label:"FRV"}))),a.a.createElement("div",{style:{width:"25%",float:"left"}},a.a.createElement("div",{style:{padding:"1px"}}))),a.a.createElement("div",{style:{width:"100%",overflow:"hidden"}},a.a.createElement("div",{style:{width:"25%",float:"left"}},a.a.createElement("div",{style:{padding:"1px"}})),a.a.createElement("div",{style:{width:"25%",float:"left"},onClick:function(t){i(e.sendThrusts,"alv")}},a.a.createElement("div",{style:{padding:"1px"}},a.a.createElement(f,{percentage:e.alv,label:"ALV"}))),a.a.createElement("div",{style:{width:"25%",float:"left"},onClick:function(t){i(e.sendThrusts,"arv")}},a.a.createElement("div",{style:{padding:"1px"}},a.a.createElement(f,{percentage:e.arv,label:"ARV"}))),a.a.createElement("div",{style:{width:"25%",float:"left"}},a.a.createElement("div",{style:{padding:"1px"}}))),a.a.createElement("div",{style:{width:"100%",overflow:"hidden"}},a.a.createElement("div",{style:{width:"25%",float:"left"},onClick:function(t){i(e.sendThrusts,"alh")}},a.a.createElement("div",{style:{padding:"1px"}},a.a.createElement(f,{percentage:e.alh,label:"ALH"}))),a.a.createElement("div",{style:{width:"25%",float:"left"}},a.a.createElement("div",{style:{padding:"1px"}})),a.a.createElement("div",{style:{width:"25%",float:"left"}},a.a.createElement("div",{style:{padding:"1px"}})),a.a.createElement("div",{style:{width:"25%",float:"left"},onClick:function(t){i(e.sendThrusts,"arh")}},a.a.createElement("div",{style:{padding:"1px"}},a.a.createElement(f,{percentage:e.arh,label:"ARH"})))))};t.a=p},function(e,t,n){"use strict";var r="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},i=n(260),o=n(3).digits,a=n(96),s=n(75),u=function(){return u=i.create,i};t.create=function(e){e.isNumber=function(e){return"number"===typeof e},e.isComplex=function(t){return e.Complex&&t instanceof e.Complex||!1},e.isBigNumber=a,e.isFraction=function(t){return e.Fraction&&t instanceof e.Fraction||!1},e.isUnit=function(e){return e&&e.constructor.prototype.isUnit||!1},e.isString=function(e){return"string"===typeof e},e.isArray=Array.isArray,e.isMatrix=s,e.isDenseMatrix=function(e){return e&&e.isDenseMatrix&&e.constructor.prototype.isMatrix||!1},e.isSparseMatrix=function(e){return e&&e.isSparseMatrix&&e.constructor.prototype.isMatrix||!1},e.isRange=function(e){return e&&e.constructor.prototype.isRange||!1},e.isIndex=function(e){return e&&e.constructor.prototype.isIndex||!1},e.isBoolean=function(e){return"boolean"===typeof e},e.isResultSet=function(e){return e&&e.constructor.prototype.isResultSet||!1},e.isHelp=function(e){return e&&e.constructor.prototype.isHelp||!1},e.isFunction=function(e){return"function"===typeof e},e.isDate=function(e){return e instanceof Date},e.isRegExp=function(e){return e instanceof RegExp},e.isObject=function(t){return"object"===("undefined"===typeof t?"undefined":r(t))&&t.constructor===Object&&!e.isComplex(t)&&!e.isFraction(t)},e.isNull=function(e){return null===e},e.isUndefined=function(e){return void 0===e},e.isAccessorNode=function(e){return e&&e.isAccessorNode&&e.constructor.prototype.isNode||!1},e.isArrayNode=function(e){return e&&e.isArrayNode&&e.constructor.prototype.isNode||!1},e.isAssignmentNode=function(e){return e&&e.isAssignmentNode&&e.constructor.prototype.isNode||!1},e.isBlockNode=function(e){return e&&e.isBlockNode&&e.constructor.prototype.isNode||!1},e.isConditionalNode=function(e){return e&&e.isConditionalNode&&e.constructor.prototype.isNode||!1},e.isConstantNode=function(e){return e&&e.isConstantNode&&e.constructor.prototype.isNode||!1},e.isFunctionAssignmentNode=function(e){return e&&e.isFunctionAssignmentNode&&e.constructor.prototype.isNode||!1},e.isFunctionNode=function(e){return e&&e.isFunctionNode&&e.constructor.prototype.isNode||!1},e.isIndexNode=function(e){return e&&e.isIndexNode&&e.constructor.prototype.isNode||!1},e.isNode=function(e){return e&&e.isNode&&e.constructor.prototype.isNode||!1},e.isObjectNode=function(e){return e&&e.isObjectNode&&e.constructor.prototype.isNode||!1},e.isOperatorNode=function(e){return e&&e.isOperatorNode&&e.constructor.prototype.isNode||!1},e.isParenthesisNode=function(e){return e&&e.isParenthesisNode&&e.constructor.prototype.isNode||!1},e.isRangeNode=function(e){return e&&e.isRangeNode&&e.constructor.prototype.isNode||!1},e.isSymbolNode=function(e){return e&&e.isSymbolNode&&e.constructor.prototype.isNode||!1},e.isChain=function(e){return e&&e.constructor.prototype.isChain||!1};var t=u();return t.types=[{name:"number",test:e.isNumber},{name:"Complex",test:e.isComplex},{name:"BigNumber",test:e.isBigNumber},{name:"Fraction",test:e.isFraction},{name:"Unit",test:e.isUnit},{name:"string",test:e.isString},{name:"Array",test:e.isArray},{name:"Matrix",test:e.isMatrix},{name:"DenseMatrix",test:e.isDenseMatrix},{name:"SparseMatrix",test:e.isSparseMatrix},{name:"Range",test:e.isRange},{name:"Index",test:e.isIndex},{name:"boolean",test:e.isBoolean},{name:"ResultSet",test:e.isResultSet},{name:"Help",test:e.isHelp},{name:"function",test:e.isFunction},{name:"Date",test:e.isDate},{name:"RegExp",test:e.isRegExp},{name:"null",test:e.isNull},{name:"undefined",test:e.isUndefined},{name:"OperatorNode",test:e.isOperatorNode},{name:"ConstantNode",test:e.isConstantNode},{name:"SymbolNode",test:e.isSymbolNode},{name:"ParenthesisNode",test:e.isParenthesisNode},{name:"FunctionNode",test:e.isFunctionNode},{name:"FunctionAssignmentNode",test:e.isFunctionAssignmentNode},{name:"ArrayNode",test:e.isArrayNode},{name:"AssignmentNode",test:e.isAssignmentNode},{name:"BlockNode",test:e.isBlockNode},{name:"ConditionalNode",test:e.isConditionalNode},{name:"IndexNode",test:e.isIndexNode},{name:"RangeNode",test:e.isRangeNode},{name:"Node",test:e.isNode},{name:"Object",test:e.isObject}],t.conversions=[{from:"number",to:"BigNumber",convert:function(t){if(o(t)>15)throw new TypeError("Cannot implicitly convert a number with >15 significant digits to BigNumber (value: "+t+"). Use function bignumber(x) to convert to BigNumber.");return new e.BigNumber(t)}},{from:"number",to:"Complex",convert:function(t){return new e.Complex(t,0)}},{from:"number",to:"string",convert:function(e){return e+""}},{from:"BigNumber",to:"Complex",convert:function(t){return new e.Complex(t.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(t){return new e.Complex(t.valueOf(),0)}},{from:"number",to:"Fraction",convert:function(t){if(new e.Fraction(t).valueOf()!==t)throw new TypeError("Cannot implicitly convert a number to a Fraction when there will be a loss of precision (value: "+t+"). Use function fraction(x) to convert to Fraction.");return new e.Fraction(t)}},{from:"string",to:"number",convert:function(e){var t=Number(e);if(isNaN(t))throw new Error('Cannot convert "'+e+'" to a number');return t}},{from:"string",to:"BigNumber",convert:function(t){try{return new e.BigNumber(t)}catch(e){throw new Error('Cannot convert "'+t+'" to BigNumber')}}},{from:"string",to:"Fraction",convert:function(t){try{return new e.Fraction(t)}catch(e){throw new Error('Cannot convert "'+t+'" to Fraction')}}},{from:"string",to:"Complex",convert:function(t){try{return new e.Complex(t)}catch(e){throw new Error('Cannot convert "'+t+'" to Complex')}}},{from:"boolean",to:"number",convert:function(e){return+e}},{from:"boolean",to:"BigNumber",convert:function(t){return new e.BigNumber(+t)}},{from:"boolean",to:"Fraction",convert:function(t){return new e.Fraction(+t)}},{from:"boolean",to:"string",convert:function(e){return+e}},{from:"Array",to:"Matrix",convert:function(t){return new e.DenseMatrix(t)}},{from:"Matrix",to:"Array",convert:function(e){return e.valueOf()}}],t}},function(e,t,n){"use strict";var r=n(261);t.mixin=function(e){var t=new r;return e.on=t.on.bind(t),e.off=t.off.bind(t),e.once=t.once.bind(t),e.emit=t.emit.bind(t),e}},function(e,t,n){"use strict";function r(e,t,n,r){var o=r("fraction",{number:function(t){if(!isFinite(t)||isNaN(t))throw new Error(t+" cannot be represented as a fraction");return new e.Fraction(t)},string:function(t){return new e.Fraction(t)},"number, number":function(t,n){return new e.Fraction(t,n)},null:function(t){return new e.Fraction(0)},BigNumber:function(t){return new e.Fraction(t.toString())},Fraction:function(e){return e},Object:function(t){return new e.Fraction(t)},"Array | Matrix":function(e){return i(e,o)}});return o}var i=n(0);t.name="fraction",t.factory=r},function(e,t,n){"use strict";function r(e,t,n,r){function o(t,n,r){if(!(this instanceof o))throw new SyntaxError("Constructor must be called with the new operator");var i=null!==t&&void 0!==t,a=null!==n&&void 0!==n,s=null!==r&&void 0!==r;if(i)if(e.isBigNumber(t))t=t.toNumber();else if("number"!==typeof t)throw new TypeError("Parameter start must be a number");if(a)if(e.isBigNumber(n))n=n.toNumber();else if("number"!==typeof n)throw new TypeError("Parameter end must be a number");if(s)if(e.isBigNumber(r))r=r.toNumber();else if("number"!==typeof r)throw new TypeError("Parameter step must be a number");this.start=i?parseFloat(t):0,this.end=a?parseFloat(n):0,this.step=s?parseFloat(r):1}return o.prototype.type="Range",o.prototype.isRange=!0,o.parse=function(e){if("string"!==typeof e)return null;var t=e.split(":"),n=t.map(function(e){return parseFloat(e)});if(n.some(function(e){return isNaN(e)}))return null;switch(n.length){case 2:return new o(n[0],n[1]);case 3:return new o(n[0],n[2],n[1]);default:return null}},o.prototype.clone=function(){return new o(this.start,this.end,this.step)},o.prototype.size=function(){var e=0,t=this.start,n=this.step,r=this.end,o=r-t;return i.sign(n)===i.sign(o)?e=Math.ceil(o/n):0===o&&(e=0),isNaN(e)&&(e=0),[e]},o.prototype.min=function(){var e=this.size()[0];return e>0?this.step>0?this.start:this.start+(e-1)*this.step:void 0},o.prototype.max=function(){var e=this.size()[0];return e>0?this.step>0?this.start+(e-1)*this.step:this.start:void 0},o.prototype.forEach=function(e){var t=this.start,n=this.step,r=this.end,i=0;if(n>0)for(;t<r;)e(t,[i],this),t+=n,i++;else if(n<0)for(;t>r;)e(t,[i],this),t+=n,i++},o.prototype.map=function(e){var t=[];return this.forEach(function(n,r,i){t[r[0]]=e(n,r,i)}),t},o.prototype.toArray=function(){var e=[];return this.forEach(function(t,n){e[n[0]]=t}),e},o.prototype.valueOf=function(){return this.toArray()},o.prototype.format=function(e){var t=i.format(this.start,e);return 1!==this.step&&(t+=":"+i.format(this.step,e)),t+=":"+i.format(this.end,e)},o.prototype.toString=function(){return this.format()},o.prototype.toJSON=function(){return{mathjs:"Range",start:this.start,end:this.end,step:this.step}},o.fromJSON=function(e){return new o(e.start,e.end,e.step)},o}var i=n(3);t.name="Range",t.path="type",t.factory=r},function(e,t,n){"use strict";function r(e,t,n,r){function i(e){if(!(this instanceof i))throw new SyntaxError("Constructor must be called with the new operator");this.entries=e||[]}return i.prototype.type="ResultSet",i.prototype.isResultSet=!0,i.prototype.valueOf=function(){return this.entries},i.prototype.toString=function(){return"["+this.entries.join(", ")+"]"},i.prototype.toJSON=function(){return{mathjs:"ResultSet",entries:this.entries}},i.fromJSON=function(e){return new i(e.entries)},i}t.name="ResultSet",t.path="type",t.factory=r},function(e,t,n){"use strict";function r(e){return e[0].precision}var i=n(34).memoize;t.e=i(function(e){return new e(1).exp()},r),t.phi=i(function(e){return new e(1).plus(new e(5).sqrt()).div(2)},r),t.pi=i(function(e){return e.acos(-1)},r),t.tau=i(function(e){return t.pi(e).times(2)},r)},function(e,t,n){"use strict";function r(e,t,n,r){var o=r("fix",{number:function(e){return e>0?Math.floor(e):Math.ceil(e)},Complex:function(t){return new e.Complex(t.re>0?Math.floor(t.re):Math.ceil(t.re),t.im>0?Math.floor(t.im):Math.ceil(t.im))},BigNumber:function(e){return e.isNegative()?e.ceil():e.floor()},Fraction:function(e){return e.s<0?e.ceil():e.floor()},"Array | Matrix":function(e){return i(e,o,!0)}});return o.toTex={1:"\\mathrm{${name}}\\left(${args[0]}\\right)"},o}var i=n(0);t.name="fix",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,a){var c=r(n(1)),l=r(n(11)),f=r(n(46)),p=r(n(21)),h=r(n(20)),d=r(n(6)),m=a("round",{number:Math.round,"number, number":function(e,t){if(!o(t))throw new TypeError(u);if(t<0||t>15)throw new Error("Number of decimals in function round must be in te range of 0-15");return i(e,t)},Complex:function(e){return e.round()},"Complex, number":function(e,t){if(t%1)throw new TypeError(u);return e.round(t)},"Complex, BigNumber":function(e,t){if(!t.isInteger())throw new TypeError(u);var n=t.toNumber();return e.round(n)},"number, BigNumber":function(t,n){if(!n.isInteger())throw new TypeError(u);return new e.BigNumber(t).toDecimalPlaces(n.toNumber())},BigNumber:function(e){return e.toDecimalPlaces(0)},"BigNumber, BigNumber":function(e,t){if(!t.isInteger())throw new TypeError(u);return e.toDecimalPlaces(t.toNumber())},Fraction:function(e){return e.round()},"Fraction, number":function(e,t){if(t%1)throw new TypeError(u);return e.round(t)},"Array | Matrix":function(e){return s(e,m,!0)},"SparseMatrix, number | BigNumber":function(e,t){return p(e,t,m,!1)},"DenseMatrix, number | BigNumber":function(e,t){return d(e,t,m,!1)},"number | Complex | BigNumber, SparseMatrix":function(e,t){return l(e,0)?f(t.size(),t.storage()):h(t,e,m,!0)},"number | Complex | BigNumber, DenseMatrix":function(e,t){return l(e,0)?f(t.size(),t.storage()):d(t,e,m,!0)},"Array, number | BigNumber":function(e,t){return d(c(e),t,m,!1).valueOf()},"number | Complex | BigNumber, Array":function(e,t){return d(c(t),e,m,!0).valueOf()}});return m.toTex={1:"\\left\\lfloor${args[0]}\\right\\rceil",2:void 0},m}function i(e,t){return parseFloat(a(e,t))}var o=n(3).isInteger,a=n(3).toFixed,s=n(0),u="Number of decimals in function round must be an integer";t.name="round",t.factory=r},function(e,t,n){"use strict";function r(e,t,n,r){var o=r("format",{any:i.format,"any, Object | function | number":i.format});return o.toTex=void 0,o}var i=n(9);t.name="format",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,i){var o={};return o.bignumber=n(301),o.boolean=n(302),o.complex=n(303),o.createUnit=n(304),o.fraction=n(305),o.index=n(306),o.matrix=n(307),o.number=n(308),o.sparse=n(309),o.splitUnit=n(310),o.string=n(311),o.unit=n(312),o.e=n(142),o.E=n(142),o.false=n(313),o.i=n(314),o.Infinity=n(315),o.LN2=n(316),o.LN10=n(317),o.LOG2E=n(318),o.LOG10E=n(319),o.NaN=n(320),o.null=n(321),o.pi=n(143),o.PI=n(143),o.phi=n(322),o.SQRT1_2=n(323),o.SQRT2=n(324),o.tau=n(325),o.true=n(326),o.version=n(327),o.speedOfLight={description:"Speed of light in vacuum",examples:["speedOfLight"]},o.gravitationConstant={description:"Newtonian constant of gravitation",examples:["gravitationConstant"]},o.planckConstant={description:"Planck constant",examples:["planckConstant"]},o.reducedPlanckConstant={description:"Reduced Planck constant",examples:["reducedPlanckConstant"]},o.magneticConstant={description:"Magnetic constant (vacuum permeability)",examples:["magneticConstant"]},o.electricConstant={description:"Electric constant (vacuum permeability)",examples:["electricConstant"]},o.vacuumImpedance={description:"Characteristic impedance of vacuum",examples:["vacuumImpedance"]},o.coulomb={description:"Coulomb's constant",examples:["coulomb"]},o.elementaryCharge={description:"Elementary charge",examples:["elementaryCharge"]},o.bohrMagneton={description:"Borh magneton",examples:["bohrMagneton"]},o.conductanceQuantum={description:"Conductance quantum",examples:["conductanceQuantum"]},o.inverseConductanceQuantum={description:"Inverse conductance quantum",examples:["inverseConductanceQuantum"]},o.magneticFluxQuantum={description:"Magnetic flux quantum",examples:["magneticFluxQuantum"]},o.nuclearMagneton={description:"Nuclear magneton",examples:["nuclearMagneton"]},o.klitzing={description:"Von Klitzing constant",examples:["klitzing"]},o.bohrRadius={description:"Borh radius",examples:["bohrRadius"]},o.classicalElectronRadius={description:"Classical electron radius",examples:["classicalElectronRadius"]},o.electronMass={description:"Electron mass",examples:["electronMass"]},o.fermiCoupling={description:"Fermi coupling constant",examples:["fermiCoupling"]},o.fineStructure={description:"Fine-structure constant",examples:["fineStructure"]},o.hartreeEnergy={description:"Hartree energy",examples:["hartreeEnergy"]},o.protonMass={description:"Proton mass",examples:["protonMass"]},o.deuteronMass={description:"Deuteron Mass",examples:["deuteronMass"]},o.neutronMass={description:"Neutron mass",examples:["neutronMass"]},o.quantumOfCirculation={description:"Quantum of circulation",examples:["quantumOfCirculation"]},o.rydberg={description:"Rydberg constant",examples:["rydberg"]},o.thomsonCrossSection={description:"Thomson cross section",examples:["thomsonCrossSection"]},o.weakMixingAngle={description:"Weak mixing angle",examples:["weakMixingAngle"]},o.efimovFactor={description:"Efimov factor",examples:["efimovFactor"]},o.atomicMass={description:"Atomic mass constant",examples:["atomicMass"]},o.avogadro={description:"Avogadro's number",examples:["avogadro"]},o.boltzmann={description:"Boltzmann constant",examples:["boltzmann"]},o.faraday={description:"Faraday constant",examples:["faraday"]},o.firstRadiation={description:"First radiation constant",examples:["firstRadiation"]},o.loschmidt={description:"Loschmidt constant at T=273.15 K and p=101.325 kPa",examples:["loschmidt"]},o.gasConstant={description:"Gas constant",examples:["gasConstant"]},o.molarPlanckConstant={description:"Molar Planck constant",examples:["molarPlanckConstant"]},o.molarVolume={description:"Molar volume of an ideal gas at T=273.15 K and p=101.325 kPa",examples:["molarVolume"]},o.sackurTetrode={description:"Sackur-Tetrode constant at T=1 K and p=101.325 kPa",examples:["sackurTetrode"]},o.secondRadiation={description:"Second radiation constant",examples:["secondRadiation"]},o.stefanBoltzmann={description:"Stefan-Boltzmann constant",examples:["stefanBoltzmann"]},o.wienDisplacement={description:"Wien displacement law constant",examples:["wienDisplacement"]},o.molarMass={description:"Molar mass constant",examples:["molarMass"]},o.molarMassC12={description:"Molar mass constant of carbon-12",examples:["molarMassC12"]},o.gravity={description:"Standard acceleration of gravity (standard acceleration of free-fall on Earth)",examples:["gravity"]},o.planckLength={description:"Planck length",examples:["planckLength"]},o.planckMass={description:"Planck mass",examples:["planckMass"]},o.planckTime={description:"Planck time",examples:["planckTime"]},o.planckCharge={description:"Planck charge",examples:["planckCharge"]},o.planckTemperature={description:"Planck temperature",examples:["planckTemperature"]},o.derivative=n(328),o.lsolve=n(329),o.lup=n(330),o.lusolve=n(331),o.simplify=n(332),o.rationalize=n(333),o.slu=n(334),o.usolve=n(335),o.qr=n(336),o.abs=n(337),o.add=n(338),o.cbrt=n(339),o.ceil=n(340),o.cube=n(341),o.divide=n(342),o.dotDivide=n(343),o.dotMultiply=n(344),o.dotPow=n(345),o.exp=n(346),o.expm=n(347),o.expm1=n(348),o.fix=n(349),o.floor=n(350),o.gcd=n(351),o.hypot=n(352),o.lcm=n(353),o.log=n(354),o.log2=n(355),o.log1p=n(356),o.log10=n(357),o.mod=n(358),o.multiply=n(359),o.norm=n(360),o.nthRoot=n(361),o.nthRoots=n(362),o.pow=n(363),o.round=n(364),o.sign=n(365),o.sqrt=n(366),o.sqrtm=n(367),o.square=n(368),o.subtract=n(369),o.unaryMinus=n(370),o.unaryPlus=n(371),o.xgcd=n(372),o.bitAnd=n(373),o.bitNot=n(374),o.bitOr=n(375),o.bitXor=n(376),o.leftShift=n(377),o.rightArithShift=n(378),o.rightLogShift=n(379),o.bellNumbers=n(380),o.catalan=n(381),o.composition=n(382),o.stirlingS2=n(383),o.config=n(384),o.import=n(385),o.typed=n(386),o.arg=n(387),o.conj=n(388),o.re=n(389),o.im=n(390),o.eval=n(391),o.help=n(392),o.distance=n(393),o.intersect=n(394),o.and=n(395),o.not=n(396),o.or=n(397),o.xor=n(398),o.concat=n(399),o.cross=n(400),o.ctranspose=n(401),o.det=n(402),o.diag=n(403),o.dot=n(404),o.identity=n(405),o.filter=n(406),o.flatten=n(407),o.forEach=n(408),o.inv=n(409),o.kron=n(410),o.map=n(411),o.ones=n(412),o.partitionSelect=n(413),o.range=n(414),o.resize=n(415),o.reshape=n(416),o.size=n(417),o.sort=n(418),o.squeeze=n(419),o.subset=n(420),o.trace=n(421),o.transpose=n(422),o.zeros=n(423),o.combinations=n(424),o.factorial=n(425),o.gamma=n(426),o.kldivergence=n(427),o.multinomial=n(428),o.permutations=n(429),o.pickRandom=n(430),o.random=n(431),o.randomInt=n(432),o.compare=n(433),o.compareNatural=n(434),o.compareText=n(435),o.deepEqual=n(436),o.equal=n(437),o.equalText=n(438),o.larger=n(439),o.largerEq=n(440),o.smaller=n(441),o.smallerEq=n(442),o.unequal=n(443),o.setCartesian=n(444),o.setDifference=n(445),o.setDistinct=n(446),o.setIntersect=n(447),o.setIsSubset=n(448),o.setMultiplicity=n(449),o.setPowerset=n(450),o.setSize=n(451),o.setSymDifference=n(452),o.setUnion=n(453),o.erf=n(454),o.mad=n(455),o.max=n(456),o.mean=n(457),o.median=n(458),o.min=n(459),o.mode=n(460),o.prod=n(461),o.quantileSeq=n(462),o.std=n(463),o.sum=n(464),o.var=n(465),o.acos=n(466),o.acosh=n(467),o.acot=n(468),o.acoth=n(469),o.acsc=n(470),o.acsch=n(471),o.asec=n(472),o.asech=n(473),o.asin=n(474),o.asinh=n(475),o.atan=n(476),o.atanh=n(477),o.atan2=n(478),o.cos=n(479),o.cosh=n(480),o.cot=n(481),o.coth=n(482),o.csc=n(483),o.csch=n(484),o.sec=n(485),o.sech=n(486),o.sin=n(487),o.sinh=n(488),o.tan=n(489),o.tanh=n(490),o.to=n(491),o.clone=n(492),o.format=n(493),o.isNaN=n(494),o.isInteger=n(495),o.isNegative=n(496),o.isNumeric=n(497),o.isPositive=n(498),o.isPrime=n(499),o.isZero=n(500),o.typeof=n(501),o}t.name="docs",t.path="expression",t.factory=r},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";function r(e,t,n,r){return function(t,n){if("BigNumber"===n)return new e.BigNumber(t);if("Fraction"===n)return new e.Fraction(t);if("number"===typeof t)return t;if("Infinity"===t)return 1/0;if("NaN"===t)return NaN;if(!/^[-+]?((\d+\.?\d*)|(\d*\.?\d+))([eE][+-]?\d+)?$/.test(t))throw new Error('Invalid numeric value "'+t+'"');return parseFloat(t.replace(/^(0*)[0-9]/,function(e,t){return e.substring(t.length)}))}}t.factory=r},function(e,t,n){"use strict";function r(e,t,r,o){function a(t,n){if(!(this instanceof a))throw new SyntaxError("Constructor must be called with the new operator");if(!e.isNode(t))throw new TypeError('Node expected for parameter "object"');if(!e.isIndexNode(n))throw new TypeError('IndexNode expected for parameter "index"');this.object=t||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 s(t){return!(e.isAccessorNode(t)||e.isArrayNode(t)||e.isConstantNode(t)||e.isFunctionNode(t)||e.isObjectNode(t)||e.isParenthesisNode(t)||e.isSymbolNode(t))}var u=r(n(22)),c=r(n(147));return a.prototype=new u,a.prototype.type="AccessorNode",a.prototype.isAccessorNode=!0,a.prototype._compile=function(e,t){var n=this.object._compile(e,t),r=this.index._compile(e,t);if(this.index.isObjectProperty()){var o=this.index.getObjectProperty();return function(e,t,r){return i(n(e,t,r),o)}}return function(e,t,i){var o=n(e,t,i),a=r(e,t,o);return c(o,a)}},a.prototype.forEach=function(e){e(this.object,"object",this),e(this.index,"index",this)},a.prototype.map=function(e){return new a(this._ifNode(e(this.object,"object",this)),this._ifNode(e(this.index,"index",this)))},a.prototype.clone=function(){return new a(this.object,this.index)},a.prototype._toString=function(e){var t=this.object.toString(e);return s(this.object)&&(t="("+t+")"),t+this.index.toString(e)},a.prototype.toHTML=function(e){var t=this.object.toHTML(e);return s(this.object)&&(t='<span class="math-parenthesis math-round-parenthesis">(</span>'+t+'<span class="math-parenthesis math-round-parenthesis">)</span>'),t+this.index.toHTML(e)},a.prototype._toTex=function(e){var t=this.object.toTex(e);return s(this.object)&&(t="\\left(' + object + '\\right)"),t+this.index.toTex(e)},a.prototype.toJSON=function(){return{mathjs:"AccessorNode",object:this.object,index:this.index}},a.fromJSON=function(e){return new a(e.object,e.index)},a}var i=n(17).getSafeProperty;t.name="AccessorNode",t.path="expression.node",t.factory=r},function(e,t,n){"use strict";e.exports={end:!0}},function(e,t,n){"use strict";function r(e,t,r,s){var u=r(n(24));return function(e,t){try{if(Array.isArray(e))return u(e,t);if(e&&"function"===typeof e.subset)return e.subset(t);if("string"===typeof e)return u(e,t);if("object"===("undefined"===typeof e?"undefined":i(e))){if(!t.isObjectProperty())throw new TypeError("Cannot apply a numeric index as object property");return a(e,t.getObjectProperty())}throw new TypeError("Cannot apply index: unsupported type of object")}catch(e){throw o(e)}}}var i="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},o=n(48).transform,a=n(17).getSafeProperty;t.factory=r},function(e,t,n){"use strict";function r(e,t,r,o){function a(t){if(!(this instanceof a))throw new SyntaxError("Constructor must be called with the new operator");if(this.items=t||[],!Array.isArray(this.items)||!this.items.every(e.isNode))throw new TypeError("Array containing Nodes expected");var n=function(){throw new Error("Property `ArrayNode.nodes` is deprecated, use `ArrayNode.items` instead")};Object.defineProperty(this,"nodes",{get:n,set:n})}var s=r(n(22));return a.prototype=new s,a.prototype.type="ArrayNode",a.prototype.isArrayNode=!0,a.prototype._compile=function(e,t){var n=i(this.items,function(n){return n._compile(e,t)});if("Array"!==e.config().matrix){var r=e.matrix;return function(e,t,o){return r(i(n,function(n){return n(e,t,o)}))}}return function(e,t,r){return i(n,function(n){return n(e,t,r)})}},a.prototype.forEach=function(e){for(var t=0;t<this.items.length;t++){e(this.items[t],"items["+t+"]",this)}},a.prototype.map=function(e){for(var t=[],n=0;n<this.items.length;n++)t[n]=this._ifNode(e(this.items[n],"items["+n+"]",this));return new a(t)},a.prototype.clone=function(){return new a(this.items.slice(0))},a.prototype._toString=function(e){return"["+this.items.map(function(t){return t.toString(e)}).join(", ")+"]"},a.prototype.toJSON=function(){return{mathjs:"ArrayNode",items:this.items}},a.fromJSON=function(e){return new a(e.items)},a.prototype.toHTML=function(e){return'<span class="math-parenthesis math-square-parenthesis">[</span>'+this.items.map(function(t){return t.toHTML(e)}).join('<span class="math-separator">,</span>')+'<span class="math-parenthesis math-square-parenthesis">]</span>'},a.prototype._toTex=function(e){var t="\\begin{bmatrix}";return this.items.forEach(function(n){n.items?t+=n.items.map(function(t){return t.toTex(e)}).join("&"):t+=n.toTex(e),t+="\\\\"}),t+="\\end{bmatrix}"},a}var i=n(2).map;t.name="ArrayNode",t.path="expression.node",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,a){function s(t,n,r){if(!(this instanceof s))throw new SyntaxError("Constructor must be called with the new operator");if(this.object=t,this.index=r?n:null,this.value=r||n,!e.isSymbolNode(t)&&!e.isAccessorNode(t))throw new TypeError('SymbolNode or AccessorNode expected as "object"');if(e.isSymbolNode(t)&&"end"===t.name)throw new Error('Cannot assign to symbol "end"');if(this.index&&!e.isIndexNode(this.index))throw new TypeError('IndexNode expected as "index"');if(!e.isNode(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 u(e,t){t||(t="keep");var n=p.getPrecedence(e,t),r=p.getPrecedence(e.value,t);return"all"===t||null!==r&&r<=n}var c=r(n(22)),l=r(n(504)),f=r(n(147)),p=n(64);return s.prototype=new c,s.prototype.type="AssignmentNode",s.prototype.isAssignmentNode=!0,s.prototype._compile=function(t,n){var r=this.object._compile(t,n),a=this.index?this.index._compile(t,n):null,s=this.value._compile(t,n),u=this.object.name;if(this.index){if(this.index.isObjectProperty()){var c=this.index.getObjectProperty();return function(e,t,n){var i=r(e,t,n),a=s(e,t,n);return o(i,c,a)}}if(e.isSymbolNode(this.object))return function(e,t,n){var i=r(e,t,n),c=s(e,t,n),f=a(e,t,i);return o(e,u,l(i,f,c)),c};var p=this.object.object._compile(t,n);if(this.object.index.isObjectProperty()){var h=this.object.index.getObjectProperty();return function(e,t,n){var r=p(e,t,n),u=i(r,h),c=a(e,t,u),f=s(e,t,n);return o(r,h,l(u,c,f)),f}}var d=this.object.index._compile(t,n);return function(e,t,n){var r=p(e,t,n),i=d(e,t,r),o=f(r,i),u=a(e,t,o),c=s(e,t,n);return l(r,i,l(o,u,c)),c}}if(!e.isSymbolNode(this.object))throw new TypeError("SymbolNode expected as object");return function(e,t,n){return o(e,u,s(e,t,n))}},s.prototype.forEach=function(e){e(this.object,"object",this),this.index&&e(this.index,"index",this),e(this.value,"value",this)},s.prototype.map=function(e){return new s(this._ifNode(e(this.object,"object",this)),this.index?this._ifNode(e(this.index,"index",this)):null,this._ifNode(e(this.value,"value",this)))},s.prototype.clone=function(){return new s(this.object,this.index,this.value)},s.prototype._toString=function(e){var t=this.object.toString(e),n=this.index?this.index.toString(e):"",r=this.value.toString(e);return u(this,e&&e.parenthesis)&&(r="("+r+")"),t+n+" = "+r},s.prototype.toJSON=function(){return{mathjs:"AssignmentNode",object:this.object,index:this.index,value:this.value}},s.fromJSON=function(e){return new s(e.object,e.index,e.value)},s.prototype.toHTML=function(e){var t=this.object.toHTML(e),n=this.index?this.index.toHTML(e):"",r=this.value.toHTML(e);return u(this,e&&e.parenthesis)&&(r='<span class="math-paranthesis math-round-parenthesis">(</span>'+r+'<span class="math-paranthesis math-round-parenthesis">)</span>'),t+n+'<span class="math-operator math-assignment-operator math-variable-assignment-operator math-binary-operator">=</span>'+r},s.prototype._toTex=function(e){var t=this.object.toTex(e),n=this.index?this.index.toTex(e):"",r=this.value.toTex(e);return u(this,e&&e.parenthesis)&&(r="\\left("+r+"\\right)"),t+n+":="+r},s}var i=n(17).getSafeProperty,o=n(17).setSafeProperty;t.name="AssignmentNode",t.path="expression.node",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,a){function s(t){if(!(this instanceof s))throw new SyntaxError("Constructor must be called with the new operator");if(!Array.isArray(t))throw new Error("Array expected");this.blocks=t.map(function(t){var n=t&&t.node,r=!t||void 0===t.visible||t.visible;if(!e.isNode(n))throw new TypeError('Property "node" must be a Node');if("boolean"!==typeof r)throw new TypeError('Property "visible" must be a boolean');return{node:n,visible:r}})}var u=r(n(22)),c=r(n(136));return s.prototype=new u,s.prototype.type="BlockNode",s.prototype.isBlockNode=!0,s.prototype._compile=function(e,t){var n=o(this.blocks,function(n){return{eval:n.node._compile(e,t),visible:n.visible}});return function(e,t,r){var o=[];return i(n,function(n){var i=n.eval(e,t,r);n.visible&&o.push(i)}),new c(o)}},s.prototype.forEach=function(e){for(var t=0;t<this.blocks.length;t++)e(this.blocks[t].node,"blocks["+t+"].node",this)},s.prototype.map=function(e){for(var t=[],n=0;n<this.blocks.length;n++){var r=this.blocks[n],i=this._ifNode(e(r.node,"blocks["+n+"].node",this));t[n]={node:i,visible:r.visible}}return new s(t)},s.prototype.clone=function(){return new s(this.blocks.map(function(e){return{node:e.node,visible:e.visible}}))},s.prototype._toString=function(e){return this.blocks.map(function(t){return t.node.toString(e)+(t.visible?"":";")}).join("\n")},s.prototype.toJSON=function(){return{mathjs:"BlockNode",blocks:this.blocks}},s.fromJSON=function(e){return new s(e.blocks)},s.prototype.toHTML=function(e){return this.blocks.map(function(t){return t.node.toHTML(e)+(t.visible?"":'<span class="math-separator">;</span>')}).join('<span class="math-separator"><br /></span>')},s.prototype._toTex=function(e){return this.blocks.map(function(t){return t.node.toTex(e)+(t.visible?"":";")}).join("\\;\\;\n")},s}var i=n(2).forEach,o=n(2).map;t.name="BlockNode",t.path="expression.node",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,o){function a(t,n,r){if(!(this instanceof a))throw new SyntaxError("Constructor must be called with the new operator");if(!e.isNode(t))throw new TypeError("Parameter condition must be a Node");if(!e.isNode(n))throw new TypeError("Parameter trueExpr must be a Node");if(!e.isNode(r))throw new TypeError("Parameter falseExpr must be a Node");this.condition=t,this.trueExpr=n,this.falseExpr=r}function s(t){if("number"===typeof t||"boolean"===typeof t||"string"===typeof t)return!!t;if(t){if(e.isBigNumber(t))return!t.isZero();if(e.isComplex(t))return!(!t.re&&!t.im);if(e.isUnit(t))return!!t.value}if(null===t||void 0===t)return!1;throw new TypeError('Unsupported type of condition "'+c(t)+'"')}var u=r(n(22)),c=r(n(38));return a.prototype=new u,a.prototype.type="ConditionalNode",a.prototype.isConditionalNode=!0,a.prototype._compile=function(e,t){var n=this.condition._compile(e,t),r=this.trueExpr._compile(e,t),i=this.falseExpr._compile(e,t);return function(e,t,o){return s(n(e,t,o))?r(e,t,o):i(e,t,o)}},a.prototype.forEach=function(e){e(this.condition,"condition",this),e(this.trueExpr,"trueExpr",this),e(this.falseExpr,"falseExpr",this)},a.prototype.map=function(e){return new a(this._ifNode(e(this.condition,"condition",this)),this._ifNode(e(this.trueExpr,"trueExpr",this)),this._ifNode(e(this.falseExpr,"falseExpr",this)))},a.prototype.clone=function(){return new a(this.condition,this.trueExpr,this.falseExpr)},a.prototype._toString=function(e){var t=e&&e.parenthesis?e.parenthesis:"keep",n=i.getPrecedence(this,t),r=this.condition.toString(e),o=i.getPrecedence(this.condition,t);("all"===t||"OperatorNode"===this.condition.type||null!==o&&o<=n)&&(r="("+r+")");var a=this.trueExpr.toString(e),s=i.getPrecedence(this.trueExpr,t);("all"===t||"OperatorNode"===this.trueExpr.type||null!==s&&s<=n)&&(a="("+a+")");var u=this.falseExpr.toString(e),c=i.getPrecedence(this.falseExpr,t);return("all"===t||"OperatorNode"===this.falseExpr.type||null!==c&&c<=n)&&(u="("+u+")"),r+" ? "+a+" : "+u},a.prototype.toJSON=function(){return{mathjs:"ConditionalNode",condition:this.condition,trueExpr:this.trueExpr,falseExpr:this.falseExpr}},a.fromJSON=function(e){return new a(e.condition,e.trueExpr,e.falseExpr)},a.prototype.toHTML=function(e){var t=e&&e.parenthesis?e.parenthesis:"keep",n=i.getPrecedence(this,t),r=this.condition.toHTML(e),o=i.getPrecedence(this.condition,t);("all"===t||"OperatorNode"===this.condition.type||null!==o&&o<=n)&&(r='<span class="math-parenthesis math-round-parenthesis">(</span>'+r+'<span class="math-parenthesis math-round-parenthesis">)</span>');var a=this.trueExpr.toHTML(e),s=i.getPrecedence(this.trueExpr,t);("all"===t||"OperatorNode"===this.trueExpr.type||null!==s&&s<=n)&&(a='<span class="math-parenthesis math-round-parenthesis">(</span>'+a+'<span class="math-parenthesis math-round-parenthesis">)</span>');var u=this.falseExpr.toHTML(e),c=i.getPrecedence(this.falseExpr,t);return("all"===t||"OperatorNode"===this.falseExpr.type||null!==c&&c<=n)&&(u='<span class="math-parenthesis math-round-parenthesis">(</span>'+u+'<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>'+u},a.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}"},a}var i=n(64);t.name="ConditionalNode",t.path="expression.node",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,f){function p(t,n,r){if(!(this instanceof p))throw new SyntaxError("Constructor must be called with the new operator");if("string"!==typeof t)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(!e.isNode(r))throw new TypeError('Node expected for parameter "expr"');if(t in i)throw new Error('Illegal function name, "'+t+'" is a reserved keyword');this.name=t,this.params=n.map(function(e){return e&&e.name||e}),this.types=n.map(function(e){return e&&e.type||"any"}),this.expr=r}function h(e,t){var n=c.getPrecedence(e,t),r=c.getPrecedence(e.expr,t);return"all"===t||null!==r&&r<=n}var d=r(n(22));return p.prototype=new d,p.prototype.type="FunctionAssignmentNode",p.prototype.isFunctionAssignmentNode=!0,p.prototype._compile=function(e,t){var n=Object.create(t);a(this.params,function(e){n[e]=!0});var r=this.expr._compile(e,n),i=this.name,o=this.params,u=s(this.types,","),c=i+"("+s(this.params,", ")+")";return function(e,t,n){var a={};a[u]=function(){for(var i=Object.create(t),a=0;a<o.length;a++)i[o[a]]=arguments[a];return r(e,i,n)};var s=f(i,a);return s.syntax=c,l(e,i,s),s}},p.prototype.forEach=function(e){e(this.expr,"expr",this)},p.prototype.map=function(e){var t=this._ifNode(e(this.expr,"expr",this));return new p(this.name,this.params.slice(0),t)},p.prototype.clone=function(){return new p(this.name,this.params.slice(0),this.expr)},p.prototype._toString=function(e){var t=e&&e.parenthesis?e.parenthesis:"keep",n=this.expr.toString(e);return h(this,t)&&(n="("+n+")"),this.name+"("+this.params.join(", ")+") = "+n},p.prototype.toJSON=function(){var e=this.types;return{mathjs:"FunctionAssignmentNode",name:this.name,params:this.params.map(function(t,n){return{name:t,type:e[n]}}),expr:this.expr}},p.fromJSON=function(e){return new p(e.name,e.params,e.expr)},p.prototype.toHTML=function(e){for(var t=e&&e.parenthesis?e.parenthesis:"keep",n=[],r=0;r<this.params.length;r++)n.push('<span class="math-symbol math-parameter">'+o(this.params[r])+"</span>");var i=this.expr.toHTML(e);return h(this,t)&&(i='<span class="math-parenthesis math-round-parenthesis">(</span>'+i+'<span class="math-parenthesis math-round-parenthesis">)</span>'),'<span class="math-function">'+o(this.name)+'</span><span class="math-parenthesis math-round-parenthesis">(</span>'+n.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>'+i},p.prototype._toTex=function(e){var t=e&&e.parenthesis?e.parenthesis:"keep",n=this.expr.toTex(e);return h(this,t)&&(n="\\left("+n+"\\right)"),"\\mathrm{"+this.name+"}\\left("+this.params.map(u.toSymbol).join(",")+"\\right):="+n},p}var i=n(146),o=n(9).escape,a=n(2).forEach,s=n(2).join,u=n(4),c=n(64),l=n(17).setSafeProperty;t.name="FunctionAssignmentNode",t.path="expression.node",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,a){function s(t,n){if(!(this instanceof s))throw new SyntaxError("Constructor must be called with the new operator");if(this.dimensions=t,this.dotNotation=n||!1,!f(t)||!t.every(e.isNode))throw new TypeError('Array containing Nodes expected for parameter "dimensions"');if(this.dotNotation&&!this.isObjectProperty())throw new Error("dotNotation only applicable for object properties");var r=function(){throw new Error("Property `IndexNode.object` is deprecated, use `IndexNode.fn` instead")};Object.defineProperty(this,"object",{get:r,set:r})}function u(t,n,r){return new l(e.isBigNumber(t)?t.toNumber():t,e.isBigNumber(n)?n.toNumber():n,e.isBigNumber(r)?r.toNumber():r)}var c=r(n(22)),l=r(n(135)),f=Array.isArray;return s.prototype=new c,s.prototype.type="IndexNode",s.prototype.isIndexNode=!0,s.prototype._compile=function(t,n){var r=i(this.dimensions,function(r,i){if(e.isRangeNode(r)){if(r.needsEnd()){var o=Object.create(n);o.end=!0;var a=r.start._compile(t,o),s=r.end._compile(t,o),c=r.step?r.step._compile(t,o):function(){return 1};return function(e,n,r){var o=t.size(r).valueOf(),l=Object.create(n);return l.end=o[i],u(a(e,l,r),s(e,l,r),c(e,l,r))}}var l=r.start._compile(t,n),f=r.end._compile(t,n),p=r.step?r.step._compile(t,n):function(){return 1};return function(e,t,n){return u(l(e,t,n),f(e,t,n),p(e,t,n))}}if(e.isSymbolNode(r)&&"end"===r.name){var h=Object.create(n);h.end=!0;var d=r._compile(t,h);return function(e,n,r){var o=t.size(r).valueOf(),a=Object.create(n);return a.end=o[i],d(e,a,r)}}var m=r._compile(t,n);return function(e,t,n){return m(e,t,n)}});return function(e,n,o){var a=i(r,function(t){return t(e,n,o)});return t.index.apply(t,a)}},s.prototype.forEach=function(e){for(var t=0;t<this.dimensions.length;t++)e(this.dimensions[t],"dimensions["+t+"]",this)},s.prototype.map=function(e){for(var t=[],n=0;n<this.dimensions.length;n++)t[n]=this._ifNode(e(this.dimensions[n],"dimensions["+n+"]",this));return new s(t)},s.prototype.clone=function(){return new s(this.dimensions.slice(0))},s.prototype.isObjectProperty=function(){return 1===this.dimensions.length&&e.isConstantNode(this.dimensions[0])&&"string"===typeof this.dimensions[0].value},s.prototype.getObjectProperty=function(){return this.isObjectProperty()?this.dimensions[0].value:null},s.prototype._toString=function(e){return this.dotNotation?"."+this.getObjectProperty():"["+this.dimensions.join(", ")+"]"},s.prototype.toJSON=function(){return{mathjs:"IndexNode",dimensions:this.dimensions,dotNotation:this.dotNotation}},s.fromJSON=function(e){return new s(e.dimensions,e.dotNotation)},s.prototype.toHTML=function(e){for(var t=[],n=0;n<this.dimensions.length;n++)t[n]=this.dimensions[n].toHTML();return this.dotNotation?'<span class="math-operator math-accessor-operator">.</span><span class="math-symbol math-property">'+o(this.getObjectProperty())+"</span>":'<span class="math-parenthesis math-square-parenthesis">[</span>'+t.join('<span class="math-separator">,</span>')+'<span class="math-parenthesis math-square-parenthesis">]</span>'},s.prototype._toTex=function(e){var t=this.dimensions.map(function(t){return t.toTex(e)});return this.dotNotation?"."+this.getObjectProperty():"_{"+t.join(",")+"}"},s}var i=n(2).map,o=n(9).escape;t.name="IndexNode",t.path="expression.node",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,c){function l(t){if(!(this instanceof l))throw new SyntaxError("Constructor must be called with the new operator");if(this.properties=t||{},t&&("object"!==("undefined"===typeof t?"undefined":i(t))||!Object.keys(t).every(function(n){return e.isNode(t[n])})))throw new TypeError("Object containing Nodes expected")}var f=r(n(22));return l.prototype=new f,l.prototype.type="ObjectNode",l.prototype.isObjectNode=!0,l.prototype._compile=function(e,t){var n={};for(var r in this.properties)if(u(this.properties,r)){var i=o(r),a=JSON.parse(i);if(!s(this.properties,a))throw new Error('No access to property "'+a+'"');n[a]=this.properties[r]._compile(e,t)}return function(e,t,r){var i={};for(var o in n)u(n,o)&&(i[o]=n[o](e,t,r));return i}},l.prototype.forEach=function(e){for(var t in this.properties)this.properties.hasOwnProperty(t)&&e(this.properties[t],"properties["+o(t)+"]",this)},l.prototype.map=function(e){var t={};for(var n in this.properties)this.properties.hasOwnProperty(n)&&(t[n]=this._ifNode(e(this.properties[n],"properties["+o(n)+"]",this)));return new l(t)},l.prototype.clone=function(){var e={};for(var t in this.properties)this.properties.hasOwnProperty(t)&&(e[t]=this.properties[t]);return new l(e)},l.prototype._toString=function(e){var t=[];for(var n in this.properties)this.properties.hasOwnProperty(n)&&t.push(o(n)+": "+this.properties[n].toString(e));return"{"+t.join(", ")+"}"},l.prototype.toJSON=function(){return{mathjs:"ObjectNode",properties:this.properties}},l.fromJSON=function(e){return new l(e.properties)},l.prototype.toHTML=function(e){var t=[];for(var n in this.properties)this.properties.hasOwnProperty(n)&&t.push('<span class="math-symbol math-property">'+a(n)+'</span><span class="math-operator math-assignment-operator math-property-assignment-operator math-binary-operator">:</span>'+this.properties[n].toHTML(e));return'<span class="math-parenthesis math-curly-parenthesis">{</span>'+t.join('<span class="math-separator">,</span>')+'<span class="math-parenthesis math-curly-parenthesis">}</span>'},l.prototype._toTex=function(e){var t=[];for(var n in this.properties)this.properties.hasOwnProperty(n)&&t.push("\\mathbf{"+n+":} & "+this.properties[n].toTex(e)+"\\\\");return"\\left\\{\\begin{array}{ll}"+t.join("\n")+"\\end{array}\\right\\}"},l}var i="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},o=n(9).stringify,a=n(9).escape,s=n(17).isSafeProperty,u=n(5).hasOwnProperty;t.name="ObjectNode",t.path="expression.node",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,o){function a(t,n,r){if(!(this instanceof a))throw new SyntaxError("Constructor must be called with the new operator");if(!e.isNode(t))throw new TypeError("Node expected");if(!e.isNode(n))throw new TypeError("Node expected");if(r&&!e.isNode(r))throw new TypeError("Node expected");if(arguments.length>3)throw new Error("Too many arguments");this.start=t,this.end=n,this.step=r||null}function s(e,t){var n=i.getPrecedence(e,t),r={},o=i.getPrecedence(e.start,t);if(r.start=null!==o&&o<=n||"all"===t,e.step){var a=i.getPrecedence(e.step,t);r.step=null!==a&&a<=n||"all"===t}var s=i.getPrecedence(e.end,t);return r.end=null!==s&&s<=n||"all"===t,r}var u=r(n(22));return a.prototype=new u,a.prototype.type="RangeNode",a.prototype.isRangeNode=!0,a.prototype.needsEnd=function(){return this.filter(function(t){return e.isSymbolNode(t)&&"end"===t.name}).length>0},a.prototype._compile=function(e,t){var n=e.range,r=this.start._compile(e,t),i=this.end._compile(e,t);if(this.step){var o=this.step._compile(e,t);return function(e,t,a){return n(r(e,t,a),i(e,t,a),o(e,t,a))}}return function(e,t,o){return n(r(e,t,o),i(e,t,o))}},a.prototype.forEach=function(e){e(this.start,"start",this),e(this.end,"end",this),this.step&&e(this.step,"step",this)},a.prototype.map=function(e){return new a(this._ifNode(e(this.start,"start",this)),this._ifNode(e(this.end,"end",this)),this.step&&this._ifNode(e(this.step,"step",this)))},a.prototype.clone=function(){return new a(this.start,this.end,this.step&&this.step)},a.prototype._toString=function(e){var t=e&&e.parenthesis?e.parenthesis:"keep",n=s(this,t),r=void 0,i=this.start.toString(e);if(n.start&&(i="("+i+")"),r=i,this.step){var o=this.step.toString(e);n.step&&(o="("+o+")"),r+=":"+o}var a=this.end.toString(e);return n.end&&(a="("+a+")"),r+=":"+a},a.prototype.toJSON=function(){return{mathjs:"RangeNode",start:this.start,end:this.end,step:this.step}},a.fromJSON=function(e){return new a(e.start,e.end,e.step)},a.prototype.toHTML=function(e){var t=e&&e.parenthesis?e.parenthesis:"keep",n=s(this,t),r=void 0,i=this.start.toHTML(e);if(n.start&&(i='<span class="math-parenthesis math-round-parenthesis">(</span>'+i+'<span class="math-parenthesis math-round-parenthesis">)</span>'),r=i,this.step){var o=this.step.toHTML(e);n.step&&(o='<span class="math-parenthesis math-round-parenthesis">(</span>'+o+'<span class="math-parenthesis math-round-parenthesis">)</span>'),r+='<span class="math-operator math-range-operator">:</span>'+o}var a=this.end.toHTML(e);return n.end&&(a='<span class="math-parenthesis math-round-parenthesis">(</span>'+a+'<span class="math-parenthesis math-round-parenthesis">)</span>'),r+='<span class="math-operator math-range-operator">:</span>'+a},a.prototype._toTex=function(e){var t=e&&e.parenthesis?e.parenthesis:"keep",n=s(this,t),r=this.start.toTex(e);if(n.start&&(r="\\left("+r+"\\right)"),this.step){var i=this.step.toTex(e);n.step&&(i="\\left("+i+"\\right)"),r+=":"+i}var o=this.end.toTex(e);return n.end&&(o="\\left("+o+"\\right)"),r+=":"+o},a}var i=n(64);t.name="RangeNode",t.path="expression.node",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,i){var o=r(n(47));return i("parse",{"string | Array | Matrix":o,"string | Array | Matrix, Object":o})}t.name="parse",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,i,o){var a=r(n(158));return i("parser",{"":function(){return new a(o)}})}t.name="parser",t.factory=r,t.math=!0},function(e,t,n){"use strict";function r(e,t,r,a,s){function u(){if(!(this instanceof u))throw new SyntaxError("Constructor must be called with the new operator");this.scope={}}var c=r(n(47));return u.prototype.type="Parser",u.prototype.isParser=!0,u.prototype.parse=function(e){throw new Error("Parser.parse is deprecated. Use math.parse instead.")},u.prototype.compile=function(e){throw new Error("Parser.compile is deprecated. Use math.compile instead.")},u.prototype.eval=function(e){return c(e).compile().eval(this.scope)},u.prototype.get=function(e){return e in this.scope?o.getSafeProperty(this.scope,e):void 0},u.prototype.getAll=function(){return i({},this.scope)},u.prototype.set=function(e,t){return o.setSafeProperty(this.scope,e,t)},u.prototype.remove=function(e){delete this.scope[e]},u.prototype.clear=function(){for(var e in this.scope)this.scope.hasOwnProperty(e)&&delete this.scope[e]},u}var i=n(5).extend,o=n(17);t.name="Parser",t.path="expression",t.factory=r,t.math=!0},function(e,t,n){"use strict";function r(e,t,r,u){function c(e,t){try{var n=a(e,t,f),r=Array.isArray(e)?i(e):e.size();return p(n,r[t])}catch(e){throw h(e,"mean")}}function l(e){var t=0,n=0;if(o(e,function(e){try{t=f(t,e),n++}catch(t){throw h(t,"mean",e)}}),0===n)throw new Error("Cannot calculate mean of an empty array");return p(t,n)}var f=r(n(15)),p=r(n(50)),h=r(n(40)),d=u("mean",{"Array | Matrix":l,"Array | Matrix, number | BigNumber":c,"...":function(e){if(s(e))throw new TypeError("Scalar values expected in function mean");return l(e)}});return d.toTex=void 0,d}var i=n(2).size,o=n(49),a=n(104),s=n(80);t.name="mean",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,i){function s(e,t,n){if(1===t)return o.clone(e[0][0]);if(2===t)return c(l(e[0][0],e[1][1]),l(e[1][0],e[0][1]));for(var r=p(e),i=r.U[0][0],a=1;a<t;a++)i=l(i,r.U[a][a]);for(var s=0,u=0,h=[];;){for(;h[u];)u++;if(u>=t)break;for(var d=u,m=0;!h[r.p[d]];)h[r.p[d]]=!0,d=r.p[d],m++;m%2===0&&s++}return s%2===0?i:f(i)}var u=r(n(1)),c=r(n(16)),l=r(n(10)),f=r(n(37)),p=r(n(105)),h=i("det",{any:function(e){return o.clone(e)},"Array | Matrix":function(t){var n=void 0;switch(e.isMatrix(t)?n=t.size():Array.isArray(t)?(t=u(t),n=t.size()):n=[],n.length){case 0:return o.clone(t);case 1:if(1===n[0])return o.clone(t.valueOf()[0]);throw new RangeError("Matrix must be square (size: "+a.format(n)+")");case 2:var r=n[0],i=n[1];if(r===i)return s(t.clone().valueOf(),r,i);throw new RangeError("Matrix must be square (size: "+a.format(n)+")");default:throw new RangeError("Matrix must be two dimensional (size: "+a.format(n)+")")}}});return h.toTex={1:"\\det\\left(${args[0]}\\right)"},h}var i=n(32),o=i.object,a=i.string;t.name="det",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,s){function u(e,t){try{return l(e,t)?e:t}catch(e){throw f(e,"min",t)}}function c(e){var t=void 0;if(i(e,function(e){try{(void 0===t||l(e,t))&&(t=e)}catch(t){throw f(t,"min",e)}}),void 0===t)throw new Error("Cannot calculate min of an empty array");return t}var l=r(n(44)),f=r(n(40)),p=s("min",{"Array | Matrix":c,"Array | Matrix, number | BigNumber":function(e,t){return o(e,t.valueOf(),u)},"...":function(e){if(a(e))throw new TypeError("Scalar values expected in function min");return c(e)}});return p.toTex="\\min\\left(${args}\\right)",p}var i=n(49),o=n(104),a=n(80);t.name="min",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,i){function o(e){return"Array"===t.matrix?e:p(e)}function a(n,r){var i=f(n);if(!i)throw new SyntaxError('String "'+n+'" is no valid range');var a=void 0;return"BigNumber"===t.number?(a=r?l:c,o(a(new e.BigNumber(i.start),new e.BigNumber(i.end),new e.BigNumber(i.step)))):(a=r?u:s,o(a(i.start,i.end,i.step)))}function s(e,t,n){var r=[],i=e;if(n>0)for(;i<t;)r.push(i),i+=n;else if(n<0)for(;i>t;)r.push(i),i+=n;return r}function u(e,t,n){var r=[],i=e;if(n>0)for(;i<=t;)r.push(i),i+=n;else if(n<0)for(;i>=t;)r.push(i),i+=n;return r}function c(e,t,n){var r=[],i=e;if(n.gt(h))for(;i.lt(t);)r.push(i),i=i.plus(n);else if(n.lt(h))for(;i.gt(t);)r.push(i),i=i.plus(n);return r}function l(e,t,n){var r=[],i=e;if(n.gt(h))for(;i.lte(t);)r.push(i),i=i.plus(n);else if(n.lt(h))for(;i.gte(t);)r.push(i),i=i.plus(n);return r}function f(e){var t=e.split(":"),n=t.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}}var p=r(n(1)),h=new e.BigNumber(0),d=new e.BigNumber(1),m=i("range",{string:a,"string, boolean":a,"number, number":function(e,t){return o(s(e,t,1))},"number, number, number":function(e,t,n){return o(s(e,t,n))},"number, number, boolean":function(e,t,n){return o(n?u(e,t,1):s(e,t,1))},"number, number, number, boolean":function(e,t,n,r){return o(r?u(e,t,n):s(e,t,n))},"BigNumber, BigNumber":function(e,t){return o(c(e,t,d))},"BigNumber, BigNumber, BigNumber":function(e,t,n){return o(c(e,t,n))},"BigNumber, BigNumber, boolean":function(e,t,n){return o(n?l(e,t,d):c(e,t,d))},"BigNumber, BigNumber, BigNumber, boolean":function(e,t,n,r){return o(r?l(e,t,n):c(e,t,n))}});return m.toTex=void 0,m}t.name="range",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,i,o){function a(t){var n=p(t);return e.isNode(n)?n:w(n)}function s(t,n){try{return N(o[t].apply(null,n))}catch(r){return n=n.map(function(t){return e.isFraction(t)?t.valueOf():t}),N(o[t].apply(null,n))}}function u(e){if(isFinite(e)){var t=o.fraction(e);if(t.valueOf()===e)return t}return e}function c(e){return new b("-","unaryMinus",[e])}function l(e){var t=void 0,n=e.s*e.n;return t=n<0?new b("-","unaryMinus",[new y(-n)]):new y(n),1===e.d?t:new b("/","divide",[t,new y(e.d)])}function f(t,n,r){return n.reduce(function(n,i){if(e.isNode(n)||e.isNode(i))e.isNode(n)?e.isNode(i)||(i=w(i)):n=w(n);else{try{return s(t,[n,i])}catch(e){}n=w(n),i=w(i)}return r([n,i])})}function p(t){switch(t.type){case"SymbolNode":return t;case"ConstantNode":return"number"===typeof t.value?N(t.value):t;case"FunctionNode":if(o[t.name]&&o[t.name].rawArgs)return t;if(-1===["add","multiply"].indexOf(t.name)){var n=t.args.map(p);if(!n.some(e.isNode))try{return s(t.name,n)}catch(e){}return n=n.map(function(t){return e.isNode(t)?t:w(t)}),new x(t.name,n)}case"OperatorNode":var r=t.fn.toString(),i=void 0,a=void 0,u=v(t);if(t.isUnary())i=[p(t.args[0])],a=e.isNode(i[0])?u(i):s(r,i);else if(m(t))if(i=g(t),i=i.map(p),d(r)){for(var c=[],l=[],h=0;h<i.length;h++)e.isNode(i[h])?l.push(i[h]):c.push(i[h]);c.length>1?(a=f(r,c,u),l.unshift(a),a=f(r,l,u)):a=f(r,i,u)}else a=f(r,i,u);else i=t.args.map(p),a=f(r,i,u);return a;case"ParenthesisNode":return p(t.content);case"AccessorNode":case"ArrayNode":case"AssignmentNode":case"BlockNode":case"FunctionAssignmentNode":case"IndexNode":case"ObjectNode":case"RangeNode":case"UpdateNode":case"ConditionalNode":default:throw new Error("Unimplemented node type in simplifyConstant: "+t.type)}}var h=r(n(164)),d=h.isCommutative,m=h.isAssociative,g=h.allChildren,v=h.createMakeNodeFunction,y=o.expression.node.ConstantNode,b=o.expression.node.OperatorNode,x=o.expression.node.FunctionNode,w=i({Fraction:l,number:function(e){return e<0?c(new y(-e)):new y(e)},BigNumber:function(e){return e<0?c(new y(e.negated().toString(),"number")):new y(e.toString(),"number")},Complex:function(e){throw new Error("Cannot convert Complex number to Node")}}),N=i({string:function(e){return"BigNumber"===t.number?o.bignumber(e):"Fraction"===t.number?o.fraction(e):u(parseFloat(e))},Fraction:function(e){return e},BigNumber:function(e){return e},number:function(e){return u(e)},Complex:function(e){return 0!==e.im?e:u(e.re)}});return a}t.math=!0,t.name="simplifyConstant",t.path="algebra.simplify",t.factory=r},function(e,t,n){"use strict";function r(e,t,n,r,i){function o(t,n){if(!e.isOperatorNode(t))return!0;var r=t.fn.toString();return n&&n.hasOwnProperty(r)&&n[r].hasOwnProperty("commutative")?n[r].commutative:m[r]||!1}function a(t,n){if(!e.isOperatorNode(t))return!1;var r=t.fn.toString();return n&&n.hasOwnProperty(r)&&n[r].hasOwnProperty("associative")?n[r].associative:g[r]||!1}function s(e){if(!e.args||0===e.args.length)return e;e.args=u(e);for(var t=0;t<e.args.length;t++)s(e.args[t])}function u(t){var n=void 0,r=[];return a(t)?(n=t.op,function t(i){for(var o=0;o<i.args.length;o++){var a=i.args[o];e.isOperatorNode(a)&&n===a.op?t(a):r.push(a)}}(t),r):t.args}function c(e){if(e.args&&0!==e.args.length){for(var t=f(e),n=e.args.length,r=0;r<n;r++)c(e.args[r]);if(n>2&&a(e)){for(var i=e.args.pop();e.args.length>0;)i=t([e.args.pop(),i]);e.args=i.args}}}function l(e){if(e.args&&0!==e.args.length){for(var t=f(e),n=e.args.length,r=0;r<n;r++)l(e.args[r]);if(n>2&&a(e)){for(var i=e.args.shift();e.args.length>0;)i=t([i,e.args.shift()]);e.args=i.args}}}function f(t){return e.isOperatorNode(t)?function(e){try{return new h(t.op,t.fn,e)}catch(e){return console.error(e),[]}}:function(e){return new p(new d(t.name),e)}}var p=i.expression.node.FunctionNode,h=i.expression.node.OperatorNode,d=i.expression.node.SymbolNode,m={add:!0,multiply:!0},g={add:!0,multiply:!0};return{createMakeNodeFunction:f,isCommutative:o,isAssociative:a,flatten:s,allChildren:u,unflattenr:c,unflattenl:l}}t.factory=r,t.math=!0},function(e,t,n){"use strict";function r(e,t,r,i,o){function a(t){if(e.isOperatorNode(t)&&t.isUnary()){var n=a(t.args[0]);if("+"===t.op)return n;if("-"===t.op){if(e.isOperatorNode(n)){if(n.isUnary()&&"-"===n.op)return n.args[0];if(n.isBinary()&&"subtract"===n.fn)return new m("-","subtract",[n.args[1],n.args[0]])}return new m(t.op,t.fn,[n])}}else if(e.isOperatorNode(t)&&t.isBinary()){var r=a(t.args[0]),i=a(t.args[1]);if("+"===t.op){if(e.isConstantNode(r)){if(u(r.value))return i;if(e.isConstantNode(i))return new d(c(r.value,i.value))}return e.isConstantNode(i)&&u(i.value)?r:e.isOperatorNode(i)&&i.isUnary()&&"-"===i.op?new m("-","subtract",[r,i.args[0]]):new m(t.op,t.fn,i?[r,i]:[r])}if("-"===t.op){if(e.isConstantNode(r)&&i){if(e.isConstantNode(i))return new d(l(r.value,i.value));if(u(r.value))return new m("-","unaryMinus",[i])}if("subtract"===t.fn)return e.isConstantNode(i)&&u(i.value)?r:e.isOperatorNode(i)&&i.isUnary()&&"-"===i.op?a(new m("+","add",[r,i.args[0]])):new m(t.op,t.fn,[r,i])}else{if("*"===t.op){if(e.isConstantNode(r)){if(u(r.value))return y;if(s(r.value,1))return i;if(e.isConstantNode(i))return new d(f(r.value,i.value))}if(e.isConstantNode(i)){if(u(i.value))return y;if(s(i.value,1))return r;if(e.isOperatorNode(r)&&r.isBinary()&&r.op===t.op){var o=r.args[0];if(e.isConstantNode(o)){var x=new d(f(o.value,i.value));return new m(t.op,t.fn,[x,r.args[1]])}}return new m(t.op,t.fn,[i,r])}return new m(t.op,t.fn,[r,i])}if("/"===t.op){if(e.isConstantNode(r)){if(u(r.value))return y;if(e.isConstantNode(i)&&(s(i.value,1)||s(i.value,2)||s(i.value,4)))return new d(p(r.value,i.value))}return new m(t.op,t.fn,[r,i])}if("^"===t.op){if(e.isConstantNode(i)){if(u(i.value))return b;if(s(i.value,1))return r;if(e.isConstantNode(r))return new d(h(r.value,i.value));if(e.isOperatorNode(r)&&r.isBinary()&&"^"===r.op){var w=r.args[1];if(e.isConstantNode(w))return new m(t.op,t.fn,[r.args[0],new d(f(w.value,i.value))])}}return new m(t.op,t.fn,[r,i])}}}else{if(e.isParenthesisNode(t)){var N=a(t.content);return e.isParenthesisNode(N)||e.isSymbolNode(N)||e.isConstantNode(N)?N:new v(N)}if(e.isFunctionNode(t)){var E=t.args.map(a).map(function(t){return e.isParenthesisNode(t)?t.content:t});return new g(a(t.fn),E)}}return t}var s=r(n(59)),u=r(n(67)),c=r(n(15)),l=r(n(16)),f=r(n(10)),p=r(n(50)),h=r(n(45)),d=o.expression.node.ConstantNode,m=o.expression.node.OperatorNode,g=o.expression.node.FunctionNode,v=o.expression.node.ParenthesisNode,y=new d(0),b=new d(1);return a}t.math=!0,t.name="simplifyCore",t.path="algebra.simplify",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,a){var s=r(n(1)),u=r(n(19)),c=r(n(29)),l=r(n(20)),f=r(n(8)),p=r(n(6)),h=n(4),d=a("unequal",{"any, any":function(e,t){return null===e?null!==t:null===t?null!==e:void 0===e?void 0!==t:void 0===t?void 0!==e:m(e,t)},"SparseMatrix, SparseMatrix":function(e,t){return c(e,t,m)},"SparseMatrix, DenseMatrix":function(e,t){return u(t,e,m,!0)},"DenseMatrix, SparseMatrix":function(e,t){return u(e,t,m,!1)},"DenseMatrix, DenseMatrix":function(e,t){return f(e,t,m)},"Array, Array":function(e,t){return d(s(e),s(t)).valueOf()},"Array, Matrix":function(e,t){return d(s(e),t)},"Matrix, Array":function(e,t){return d(e,s(t))},"SparseMatrix, any":function(e,t){return l(e,t,m,!1)},"DenseMatrix, any":function(e,t){return p(e,t,m,!1)},"any, SparseMatrix":function(e,t){return l(t,e,m,!0)},"any, DenseMatrix":function(e,t){return p(t,e,m,!0)},"Array, any":function(e,t){return p(s(e),t,m,!1).valueOf()},"any, Array":function(e,t){return p(s(t),e,m,!0).valueOf()}}),m=a("_unequal",{"boolean, boolean":function(e,t){return e!==t},"number, number":function(e,n){return!i(e,n,t.epsilon)},"BigNumber, BigNumber":function(e,n){return!o(e,n,t.epsilon)},"Fraction, Fraction":function(e,t){return!e.equals(t)},"Complex, Complex":function(e,t){return!e.equals(t)},"Unit, Unit":function(e,t){if(!e.equalBase(t))throw new Error("Cannot compare units with different base");return d(e.value,t.value)}});return d.toTex={2:"\\left(${args[0]}"+h.operators.unequal+"${args[1]}\\right)"},d}var i=n(3).nearlyEqual,o=n(42);t.name="unequal",t.factory=r},function(e,t,n){"use strict";function r(e,t,n,r){var a=r("sign",{number:i.sign,Complex:function(e){return e.sign()},BigNumber:function(t){return new e.BigNumber(t.cmp(0))},Fraction:function(t){return new e.Fraction(t.s,1)},"Array | Matrix":function(e){return o(e,a,!0)},Unit:function(e){return a(e.value)}});return a.toTex={1:"\\mathrm{${name}}\\left(${args[0]}\\right)"},a}var i=n(3),o=n(0);t.name="sign",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,i){var o=r(n(527)),s=r(n(535));return i("slu",{"SparseMatrix, number, number":function(e,t,n){if(!a(t)||t<0||t>3)throw new Error("Symbolic Ordering and Analysis order must be an integer number in the interval [0, 3]");if(n<0||n>1)throw new Error("Partial pivoting threshold must be a number from 0 to 1");var r=o(t,e,!1),i=s(e,r,n);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"}}}})}var i=n(32),o=i.number,a=o.isInteger;t.name="slu",t.factory=r},function(e,t,n){"use strict";function r(){return function(e,t,n,r,i,o,a){var s=0;for(n[a]=e;s>=0;){var u=n[a+s],c=n[r+u];-1===c?(s--,o[t++]=u):(n[r+u]=n[i+c],++s,n[a+s]=c)}return t}}t.name="csTdfs",t.path="algebra.sparse",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,a){var s=r(n(1)),u=r(n(19)),c=r(n(29)),l=r(n(20)),f=r(n(8)),p=r(n(6)),h=n(4),d=a("largerEq",{"boolean, boolean":function(e,t){return e>=t},"number, number":function(e,n){return e>=n||i(e,n,t.epsilon)},"BigNumber, BigNumber":function(e,n){return e.gte(n)||o(e,n,t.epsilon)},"Fraction, Fraction":function(e,t){return-1!==e.compare(t)},"Complex, Complex":function(){throw new TypeError("No ordering relation is defined for complex numbers")},"Unit, Unit":function(e,t){if(!e.equalBase(t))throw new Error("Cannot compare units with different base");return d(e.value,t.value)},"SparseMatrix, SparseMatrix":function(e,t){return c(e,t,d)},"SparseMatrix, DenseMatrix":function(e,t){return u(t,e,d,!0)},"DenseMatrix, SparseMatrix":function(e,t){return u(e,t,d,!1)},"DenseMatrix, DenseMatrix":function(e,t){return f(e,t,d)},"Array, Array":function(e,t){return d(s(e),s(t)).valueOf()},"Array, Matrix":function(e,t){return d(s(e),t)},"Matrix, Array":function(e,t){return d(e,s(t))},"SparseMatrix, any":function(e,t){return l(e,t,d,!1)},"DenseMatrix, any":function(e,t){return p(e,t,d,!1)},"any, SparseMatrix":function(e,t){return l(t,e,d,!0)},"any, DenseMatrix":function(e,t){return p(t,e,d,!0)},"Array, any":function(e,t){return p(s(e),t,d,!1).valueOf()},"any, Array":function(e,t){return p(s(t),e,d,!0).valueOf()}});return d.toTex={2:"\\left(${args[0]}"+h.operators.largerEq+"${args[1]}\\right)"},d}var i=n(3).nearlyEqual,o=n(42);t.name="largerEq",t.factory=r},function(e,t,n){"use strict";function r(){return function(e,t){return e[t]<0}}t.name="csMarked",t.path="algebra.sparse",t.factory=r},function(e,t,n){"use strict";function r(e,t,r){var i=r(n(107));return function(e,t){e[t]=i(e[t])}}t.name="csMark",t.path="algebra.sparse",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,i){function o(e,t){t=p(e,t,!0);for(var n=t._data,r=e._size[0],i=e._size[1],o=[],a=e._data,s=0;s<i;s++){var d=n[s][0]||0,m=void 0;if(f(d,0))m=0;else{var g=a[s][s];if(f(g,0))throw new Error("Linear system cannot be solved since matrix is singular");m=u(d,g);for(var v=s+1;v<r;v++)n[v]=[l(n[v][0]||0,c(m,a[v][s]))]}o[s]=[m]}return new h({data:o,size:[r,1]})}function a(e,t){t=p(e,t,!0);for(var n=t._data,r=e._size[0],i=e._size[1],o=e._values,a=e._index,s=e._ptr,d=void 0,m=void 0,g=[],v=0;v<i;v++){var y=n[v][0]||0;if(f(y,0))g[v]=[0];else{var b=0,x=[],w=[],N=s[v+1];for(m=s[v];m<N;m++)d=a[m],d===v?b=o[m]:d>v&&(x.push(o[m]),w.push(d));if(f(b,0))throw new Error("Linear system cannot be solved since matrix is singular");var E=u(y,b);for(m=0,N=w.length;m<N;m++)d=w[m],n[d]=[l(n[d][0]||0,c(E,x[m]))];g[v]=[E]}}return new h({data:g,size:[r,1]})}var s=r(n(1)),u=r(n(14)),c=r(n(23)),l=r(n(16)),f=r(n(11)),p=r(n(108)),h=e.DenseMatrix;return i("lsolve",{"SparseMatrix, Array | Matrix":function(e,t){return a(e,t)},"DenseMatrix, Array | Matrix":function(e,t){return o(e,t)},"Array, Array | Matrix":function(e,t){return o(s(e),t).valueOf()}})}t.name="lsolve",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,i){function o(e,t){t=p(e,t,!0);for(var n=t._data,r=e._size[0],i=e._size[1],o=[],a=e._data,s=i-1;s>=0;s--){var d=n[s][0]||0,m=void 0;if(f(d,0))m=0;else{var g=a[s][s];if(f(g,0))throw new Error("Linear system cannot be solved since matrix is singular");m=u(d,g);for(var v=s-1;v>=0;v--)n[v]=[l(n[v][0]||0,c(m,a[v][s]))]}o[s]=[m]}return new h({data:o,size:[r,1]})}function a(e,t){t=p(e,t,!0);for(var n=t._data,r=e._size[0],i=e._size[1],o=e._values,a=e._index,s=e._ptr,d=void 0,m=void 0,g=[],v=i-1;v>=0;v--){var y=n[v][0]||0;if(f(y,0))g[v]=[0];else{var b=0,x=[],w=[],N=s[v],E=s[v+1];for(m=E-1;m>=N;m--)d=a[m],d===v?b=o[m]:d<v&&(x.push(o[m]),w.push(d));if(f(b,0))throw new Error("Linear system cannot be solved since matrix is singular");var C=u(y,b);for(m=0,E=w.length;m<E;m++)d=w[m],n[d]=[l(n[d][0],c(C,x[m]))];g[v]=[C]}}return new h({data:g,size:[r,1]})}var s=r(n(1)),u=r(n(14)),c=r(n(23)),l=r(n(16)),f=r(n(11)),p=r(n(108)),h=e.DenseMatrix;return i("usolve",{"SparseMatrix, Array | Matrix":function(e,t){return a(e,t)},"DenseMatrix, Array | Matrix":function(e,t){return o(e,t)},"Array, Array | Matrix":function(e,t){return o(s(e),t).valueOf()}})}t.name="usolve",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,i){var o=r(n(1)),a=r(n(14)),s=n(4),u=r(n(27)),c=r(n(19)),l=r(n(29)),f=r(n(21)),p=r(n(20)),h=r(n(8)),d=r(n(6)),m=i("dotDivide",{"any, any":a,"SparseMatrix, SparseMatrix":function(e,t){return l(e,t,a,!1)},"SparseMatrix, DenseMatrix":function(e,t){return u(t,e,a,!0)},"DenseMatrix, SparseMatrix":function(e,t){return c(e,t,a,!1)},"DenseMatrix, DenseMatrix":function(e,t){return h(e,t,a)},"Array, Array":function(e,t){return m(o(e),o(t)).valueOf()},"Array, Matrix":function(e,t){return m(o(e),t)},"Matrix, Array":function(e,t){return m(e,o(t))},"SparseMatrix, any":function(e,t){return f(e,t,a,!1)},"DenseMatrix, any":function(e,t){return d(e,t,a,!1)},"any, SparseMatrix":function(e,t){return p(t,e,a,!0)},"any, DenseMatrix":function(e,t){return d(t,e,a,!0)},"Array, any":function(e,t){return d(o(e),t,a,!1).valueOf()},"any, Array":function(e,t){return d(o(t),e,a,!0).valueOf()}});return m.toTex={2:"\\left(${args[0]}"+s.operators.dotDivide+"${args[1]}\\right)"},m}t.name="dotDivide",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,o){var a=r(n(11)),s=e.SparseMatrix;return function(e,t,n){var r=e._values,u=e._index,c=e._ptr,l=e._size,f=e._datatype,p=t._values,h=t._index,d=t._ptr,m=t._size,g=t._datatype;if(l.length!==m.length)throw new i(l.length,m.length);if(l[0]!==m[0]||l[1]!==m[1])throw new RangeError("Dimension mismatch. Matrix A ("+l+") must match Matrix B ("+m+")");var v=l[0],y=l[1],b=void 0,x=a,w=0,N=n;"string"===typeof f&&f===g&&(b=f,x=o.find(a,[b,b]),w=o.convert(0,b),N=o.find(n,[b,b]));var E=r&&p?[]:void 0,C=[],S=[],M=new s({values:E,index:C,ptr:S,size:[v,y],datatype:b}),T=E?[]:void 0,O=[],k=void 0,A=void 0,_=void 0,P=void 0,R=void 0;for(A=0;A<y;A++){S[A]=C.length;var I=A+1;if(T)for(P=d[A],R=d[A+1],_=P;_<R;_++)k=h[_],O[k]=I,T[k]=p[_];for(P=c[A],R=c[A+1],_=P;_<R;_++)if(k=u[_],T){var F=O[k]===I?T[k]:w,D=N(r[_],F);x(D,w)||(C.push(k),E.push(D))}else C.push(k)}return S[y]=C.length,M}}var i=n(12);t.name="algorithm09",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,i){var o=r(n(15)),a=r(n(16)),s=r(n(10)),u=r(n(50)),c=r(n(45)),l=r(n(86)),f=r(n(87)),p=r(n(68)),h=r(n(39)),d=r(n(36)),m=i("stirlingS2",{"number | BigNumber, number | BigNumber":function(e,t){if(!h(e)||p(e)||!h(t)||p(t))throw new TypeError("Non-negative integer value expected in function stirlingS2");if(d(t,e))throw new TypeError("k must be less than or equal to n in function stirlingS2");for(var n=l(t),r=0,i=0;i<=t;i++){var m=c(-1,a(t,i)),g=f(t,i),v=c(i,e);r=o(r,s(s(g,v),m))}return u(r,n)}});return m.toTex={2:"\\mathrm{S}\\left(${args}\\right)"},m}t.name="stirlingS2",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,u){function c(n){if(n.isZero())return new e.BigNumber(1);for(var r=t.precision+(0|Math.log(n.toNumber())),i=e.BigNumber.clone({precision:r}),o=new i(n),a=n.toNumber()-1;a>1;)o=o.times(a),a--;return new e.BigNumber(o.toPrecision(e.BigNumber.precision))}var l=r(n(10)),f=r(n(45)),p=u("gamma",{number:function(e){var t=void 0,n=void 0;if(o(e)){if(e<=0)return isFinite(e)?1/0:NaN;if(e>171)return 1/0;for(var r=e-2,i=e-1;r>1;)i*=r,r--;return 0===i&&(i=1),i}if(e<.5)return Math.PI/(Math.sin(Math.PI*e)*p(1-e));if(e>=171.35)return 1/0;if(e>85){var u=e*e,c=u*e,l=c*e,f=l*e;return Math.sqrt(2*Math.PI/e)*Math.pow(e/Math.E,e)*(1+1/(12*e)+1/(288*u)-139/(51840*c)-571/(2488320*l)+163879/(209018880*f)+5246819/(75246796800*f*e))}--e,n=s[0];for(var h=1;h<s.length;++h)n+=s[h]/(e+h);return t=e+a+.5,Math.sqrt(2*Math.PI)*Math.pow(t,e+.5)*Math.exp(-t)*n},Complex:function(t){var n=void 0,r=void 0;if(0===t.im)return p(t.re);t=new e.Complex(t.re-1,t.im),r=new e.Complex(s[0],0);for(var i=1;i<s.length;++i){var o=t.re+i,u=o*o+t.im*t.im;0!==u?(r.re+=s[i]*o/u,r.im+=-s[i]*t.im/u):r.re=s[i]<0?-1/0:1/0}n=new e.Complex(t.re+a+.5,t.im);var c=Math.sqrt(2*Math.PI);t.re+=.5;var h=f(n,t);0===h.im?h.re*=c:0===h.re?h.im*=c:(h.re*=c,h.im*=c);var d=Math.exp(-n.re);return n.re=d*Math.cos(-n.im),n.im=d*Math.sin(-n.im),l(l(h,n),r)},BigNumber:function(t){if(t.isInteger())return t.isNegative()||t.isZero()?new e.BigNumber(1/0):c(t.minus(1));if(!t.isFinite())return new e.BigNumber(t.isNegative()?NaN:1/0);throw new Error("Integer BigNumber expected")},"Array | Matrix":function(e){return i(e,p)}});return p.toTex={1:"\\Gamma\\left(${args[0]}\\right)"},p}var i=n(0),o=n(3).isInteger,a=4.7421875,s=[.9999999999999971,57.15623566586292,-59.59796035547549,14.136097974741746,-.4919138160976202,3399464998481189e-20,4652362892704858e-20,-9837447530487956e-20,.0001580887032249125,-.00021026444172410488,.00021743961811521265,-.0001643181065367639,8441822398385275e-20,-26190838401581408e-21,36899182659531625e-22];t.name="gamma",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,o){var a=n(4),s=o("not",{number:function(e){return!e},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||s(e.value)},"Array | Matrix":function(e){return i(e,s)}});return s.toTex={1:a.operators.not+"\\left(${args[0]}\\right)"},s}var i=n(0);t.name="not",t.factory=r},function(e,t,n){"use strict";function r(e,t,n,r){var o=r("map",{"Array, function":i,"Matrix, function":function(e,t){return e.map(t)}});return o.toTex=void 0,o}function i(e,t){var n=o(t);return function r(i,o){return Array.isArray(i)?i.map(function(e,t){return r(e,o.concat(t))}):1===n?t(i):2===n?t(i,o):t(i,o,e)}(e,[])}var o=n(34).maxArgumentCount;t.name="map",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,o){function a(n){var r=void 0;if(i(n,function(e){try{r=void 0===r?e:s(r,e)}catch(t){throw u(t,"sum",e)}}),void 0===r)switch(t.number){case"number":return 0;case"BigNumber":return new e.BigNumber(0);case"Fraction":return new e.Fraction(0);default:return 0}return r}var s=r(n(18)),u=r(n(40)),c=o("sum",{"Array | Matrix":function(e){return a(e)},"Array | Matrix, number | BigNumber":function(){throw new Error("sum(A, dim) is not yet supported")},"...":function(e){return a(e)}});return c.toTex=void 0,c}var i=n(49);t.name="sum",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,i){function o(t,n){if(!e.isString(t))throw new TypeError("Unexpected type of argument in function compareText (expected: string or Array or Matrix, actual: "+s(t)+", index: 0)");if(!e.isString(n))throw new TypeError("Unexpected type of argument in function compareText (expected: string or Array or Matrix, actual: "+s(n)+", index: 1)");return t===n?0:t>n?1:-1}var a=r(n(1)),s=r(n(38)),u=r(n(8)),c=r(n(6)),l=i("compareText",{"any, any":o,"DenseMatrix, DenseMatrix":function(e,t){return u(e,t,o)},"Array, Array":function(e,t){return l(a(e),a(t)).valueOf()},"Array, Matrix":function(e,t){return l(a(e),t)},"Matrix, Array":function(e,t){return l(e,a(t))},"DenseMatrix, any":function(e,t){return c(e,t,o,!1)},"any, DenseMatrix":function(e,t){return c(t,e,o,!0)},"Array, any":function(e,t){return c(a(e),t,o,!1).valueOf()},"any, Array":function(e,t){return c(a(t),e,o,!0).valueOf()}});return l.toTex=void 0,l}t.name="compareText",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,s){var u=r(n(30)),c=r(n(57)),l=r(n(28)),f=r(n(24)),p=r(n(31));return s("setDifference",{"Array | Matrix, Array | Matrix":function(e,t){var n=void 0;if(0===f(l(e),new u(0)))n=[];else{if(0===f(l(t),new u(0)))return i(e.toArray());var r=o(i(Array.isArray(e)?e:e.toArray()).sort(p)),s=o(i(Array.isArray(t)?t:t.toArray()).sort(p));n=[];for(var h=void 0,d=0;d<r.length;d++){h=!1;for(var m=0;m<s.length;m++)if(0===p(r[d].value,s[m].value)&&r[d].identifier===s[m].identifier){h=!0;break}h||n.push(r[d])}}return Array.isArray(e)&&Array.isArray(t)?a(n):new c(a(n))}})}var i=n(2).flatten,o=n(2).identify,a=n(2).generalize;t.name="setDifference",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,s){var u=r(n(30)),c=r(n(57)),l=r(n(28)),f=r(n(24)),p=r(n(31));return s("setIntersect",{"Array | Matrix, Array | Matrix":function(e,t){var n=void 0;if(0===f(l(e),new u(0))||0===f(l(t),new u(0)))n=[];else{var r=o(i(Array.isArray(e)?e:e.toArray()).sort(p)),s=o(i(Array.isArray(t)?t:t.toArray()).sort(p));n=[];for(var h=0;h<r.length;h++)for(var d=0;d<s.length;d++)if(0===p(r[h].value,s[d].value)&&r[h].identifier===s[d].identifier){n.push(r[h]);break}}return Array.isArray(e)&&Array.isArray(t)?a(n):new c(a(n))}})}var i=n(2).flatten,o=n(2).identify,a=n(2).generalize;t.name="setIntersect",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,o){var a=r(n(30)),s=r(n(79)),u=r(n(28)),c=r(n(24)),l=r(n(183));return o("setSymDifference",{"Array | Matrix, Array | Matrix":function(e,t){if(0===c(u(e),new a(0)))return i(t);if(0===c(u(t),new a(0)))return i(e);var n=i(e),r=i(t);return s(l(n,r),l(r,n))}})}var i=n(2).flatten;t.name="setSymDifference",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,a){function s(e){try{e=i(e.valueOf());var t=e.length;if(0===t)throw new Error("Cannot calculate median of an empty array");if(t%2===0){for(var n=t/2-1,r=f(e,n+1),o=e[n],a=0;a<n;++a)l(e[a],o)>0&&(o=e[a]);return m(o,r)}var s=f(e,(t-1)/2);return d(s)}catch(e){throw p(e,"median")}}var u=r(n(18)),c=r(n(14)),l=r(n(62)),f=r(n(113)),p=r(n(40)),h=a("median",{"Array | Matrix":s,"Array | Matrix, number | BigNumber":function(e,t){throw new Error("median(A, dim) is not yet supported")},"...":function(e){if(o(e))throw new TypeError("Scalar values expected in function median");return s(e)}}),d=a({"number | BigNumber | Complex | Unit":function(e){return e}}),m=a({"number | BigNumber | Complex | Unit, number | BigNumber | Complex | Unit":function(e,t){return c(u(e,t),2)}});return h.toTex=void 0,h}var i=n(2).flatten,o=n(80);t.name="median",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,a){function s(t,n){var r=0,i=0;if(0===t.length)throw new SyntaxError("Function var requires one or more parameters (0 provided)");if(o(t,function(e){try{r=u(r,e),i++}catch(t){throw p(t,"var",e)}}),0===i)throw new Error("Cannot calculate var of an empty array");var a=f(r,i);switch(r=0,o(t,function(e){var t=c(e,a);r=u(r,l(t,t))}),n){case"uncorrected":return f(r,i);case"biased":return f(r,i+1);case"unbiased":var s=e.isBigNumber(r)?new e.BigNumber(0):0;return 1===i?s:f(r,i-1);default:throw new Error('Unknown normalization "'+n+'". Choose "unbiased" (default), "uncorrected", or "biased".')}}var u=r(n(18)),c=r(n(16)),l=r(n(23)),f=r(n(14)),p=r(n(40)),h=a("variance",{"Array | Matrix":function(e){return s(e,i)},"Array | Matrix, string":s,"...":function(e){return s(e,i)}});return h.toTex="\\mathrm{Var}\\left(${args}\\right)",h}var i="unbiased",o=n(49);t.name="var",t.factory=r},function(e,t,n){"use strict";function r(e){var t=Math.sin(e*Math.PI/2)*Math.abs(Math.sin(e*Math.PI/2));return Math.abs(t)<.025?0:t}function i(e){return a[e]}function o(e,t){var n={LLR:r(e.detail.gamepad.axes[0]),LUD:r(e.detail.gamepad.axes[1]),RLR:r(e.detail.gamepad.axes[2]),RUD:r(e.detail.gamepad.axes[3]),LT:r(e.detail.gamepad.buttons[6].value),RT:r(e.detail.gamepad.buttons[7].value)},i={A:e.detail.gamepad.buttons[0].value,B:e.detail.gamepad.buttons[1].value,X:e.detail.gamepad.buttons[2].value,Y:e.detail.gamepad.buttons[3].value,LS:e.detail.gamepad.buttons[10].value,RS:e.detail.gamepad.buttons[11].value,UP:e.detail.gamepad.buttons[12].value,DOWN:e.detail.gamepad.buttons[13].value,LEFT:e.detail.gamepad.buttons[14].value,RIGHT:e.detail.gamepad.buttons[15].value,LB:e.detail.gamepad.buttons[4].value,RB:e.detail.gamepad.buttons[5].value,SELECT:e.detail.gamepad.buttons[8].value,MENU:e.detail.gamepad.buttons[9].value},o={Roll:0,Pitch:0,Lateral:0,Longitudinal:0,Vertical:0,Yaw:0,"Go up":0,"Go down":0,"Go left":0,"Go right":0,"Rotate left":0,"Rotate right":0},a=null;return Object.keys(t.axes.designators).map(function(e){a=t.axes.designators[e],a.current in o&&(o[a.current]+=n[e]*(1-2*a.reverse)*a.engage)}),Object.keys(t.buttons.designators).map(function(e){a=t.buttons.designators[e],a.current in o&&(o[a.current]+=i[e]*a.engage)}),{ROLL:o.Roll,PITCH:o.Pitch,LAT:o.Lateral+o["Go right"]-o["Go left"],LONG:o.Longitudinal,VERT:o.Vertical+o["Go up"]-o["Go down"],YAW:o.Yaw+o["Rotate right"]-o["Rotate left"]}}t.c=i,t.a=o;var a={0:"A",1:"B",2:"X",3:"Y",4:"LB",5:"RB",8:"SELECT",9:"MENU",10:"LS",11:"RS",12:"UP",13:"DOWN",14:"LEFT",15:"RIGHT"};t.b=o},function(e,t,n){"use strict";function r(e,t){var n=e.VERT+e.ROLL-e.PITCH,r=e.VERT-e.ROLL-e.PITCH,i=e.VERT+e.ROLL+e.PITCH,o=e.VERT-e.ROLL+e.PITCH,a=e.LONG+e.LAT+e.YAW,s=e.LONG-e.LAT-e.YAW,u=e.LONG-e.LAT+e.YAW,c=e.LONG+e.LAT-e.YAW,l=Math.max(Math.abs(n),Math.abs(r),Math.abs(i),Math.abs(o),1),f=Math.max(Math.abs(a),Math.abs(s),Math.abs(u),Math.abs(c),1);return null==t&&(t=1),{flv:Math.max(-t,Math.min(n/l,t)),frv:Math.max(-t,Math.min(r/l,t)),alv:Math.max(-t,Math.min(i/l,t)),arv:Math.max(-t,Math.min(o/l,t)),flh:Math.max(-t,Math.min(a/f,t)),frh:Math.max(-t,Math.min(s/f,t)),alh:Math.max(-t,Math.min(u/f,t)),arh:Math.max(-t,Math.min(c/f,t))}}t.a=r},function(e,t,n){n(191),e.exports=n(196)},function(e,t,n){"use strict";"undefined"===typeof Promise&&(n(192).enable(),window.Promise=n(194)),n(195),Object.assign=n(69)},function(e,t,n){"use strict";function r(){c=!1,s._47=null,s._71=null}function i(e){function t(t){(e.allRejections||a(f[t].error,e.whitelist||u))&&(f[t].displayId=l++,e.onUnhandled?(f[t].logged=!0,e.onUnhandled(f[t].displayId,f[t].error)):(f[t].logged=!0,o(f[t].displayId,f[t].error)))}function n(t){f[t].logged&&(e.onHandled?e.onHandled(f[t].displayId,f[t].error):f[t].onUnhandled||(console.warn("Promise Rejection Handled (id: "+f[t].displayId+"):"),console.warn('  This means you can ignore any previous messages of the form "Possible Unhandled Promise Rejection" with id '+f[t].displayId+".")))}e=e||{},c&&r(),c=!0;var i=0,l=0,f={};s._47=function(e){2===e._83&&f[e._56]&&(f[e._56].logged?n(e._56):clearTimeout(f[e._56].timeout),delete f[e._56])},s._71=function(e,n){0===e._75&&(e._56=i++,f[e._56]={displayId:null,error:n,timeout:setTimeout(t.bind(null,e._56),a(n,u)?100:2e3),logged:!1})}}function o(e,t){console.warn("Possible Unhandled Promise Rejection (id: "+e+"):"),((t&&(t.stack||t))+"").split("\n").forEach(function(e){console.warn("  "+e)})}function a(e,t){return t.some(function(t){return e instanceof t})}var s=n(115),u=[ReferenceError,TypeError,RangeError],c=!1;t.disable=r,t.enable=i},function(e,t,n){"use strict";(function(t){function n(e){a.length||(o(),s=!0),a[a.length]=e}function r(){for(;u<a.length;){var e=u;if(u+=1,a[e].call(),u>c){for(var t=0,n=a.length-u;t<n;t++)a[t]=a[t+u];a.length-=u,u=0}}a.length=0,u=0,s=!1}function i(e){return function(){function t(){clearTimeout(n),clearInterval(r),e()}var n=setTimeout(t,0),r=setInterval(t,50)}}e.exports=n;var o,a=[],s=!1,u=0,c=1024,l="undefined"!==typeof t?t:self,f=l.MutationObserver||l.WebKitMutationObserver;o="function"===typeof f?function(e){var t=1,n=new f(e),r=document.createTextNode("");return n.observe(r,{characterData:!0}),function(){t=-t,r.data=t}}(r):i(r),n.requestFlush=o,n.makeRequestCallFromTimer=i}).call(t,n(13))},function(e,t,n){"use strict";function r(e){var t=new i(i._44);return t._83=1,t._18=e,t}var i=n(115);e.exports=i;var o=r(!0),a=r(!1),s=r(null),u=r(void 0),c=r(0),l=r("");i.resolve=function(e){if(e instanceof i)return e;if(null===e)return s;if(void 0===e)return u;if(!0===e)return o;if(!1===e)return a;if(0===e)return c;if(""===e)return l;if("object"===typeof e||"function"===typeof e)try{var t=e.then;if("function"===typeof t)return new i(t.bind(e))}catch(e){return new i(function(t,n){n(e)})}return r(e)},i.all=function(e){var t=Array.prototype.slice.call(e);return new i(function(e,n){function r(a,s){if(s&&("object"===typeof s||"function"===typeof s)){if(s instanceof i&&s.then===i.prototype.then){for(;3===s._83;)s=s._18;return 1===s._83?r(a,s._18):(2===s._83&&n(s._18),void s.then(function(e){r(a,e)},n))}var u=s.then;if("function"===typeof u){return void new i(u.bind(s)).then(function(e){r(a,e)},n)}}t[a]=s,0===--o&&e(t)}if(0===t.length)return e([]);for(var o=t.length,a=0;a<t.length;a++)r(a,t[a])})},i.reject=function(e){return new i(function(t,n){n(e)})},i.race=function(e){return new i(function(t,n){e.forEach(function(e){i.resolve(e).then(t,n)})})},i.prototype.catch=function(e){return this.then(null,e)}},function(e,t){!function(e){"use strict";function t(e){if("string"!==typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function n(e){return"string"!==typeof e&&(e=String(e)),e}function r(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return v.iterable&&(t[Symbol.iterator]=function(){return t}),t}function i(e){this.map={},e instanceof i?e.forEach(function(e,t){this.append(t,e)},this):Array.isArray(e)?e.forEach(function(e){this.append(e[0],e[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function o(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function a(e){return new Promise(function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}})}function s(e){var t=new FileReader,n=a(t);return t.readAsArrayBuffer(e),n}function u(e){var t=new FileReader,n=a(t);return t.readAsText(e),n}function c(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r<t.length;r++)n[r]=String.fromCharCode(t[r]);return n.join("")}function l(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function f(){return this.bodyUsed=!1,this._initBody=function(e){if(this._bodyInit=e,e)if("string"===typeof e)this._bodyText=e;else if(v.blob&&Blob.prototype.isPrototypeOf(e))this._bodyBlob=e;else if(v.formData&&FormData.prototype.isPrototypeOf(e))this._bodyFormData=e;else if(v.searchParams&&URLSearchParams.prototype.isPrototypeOf(e))this._bodyText=e.toString();else if(v.arrayBuffer&&v.blob&&b(e))this._bodyArrayBuffer=l(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer]);else{if(!v.arrayBuffer||!ArrayBuffer.prototype.isPrototypeOf(e)&&!x(e))throw new Error("unsupported BodyInit type");this._bodyArrayBuffer=l(e)}else this._bodyText="";this.headers.get("content-type")||("string"===typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):v.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},v.blob&&(this.blob=function(){var e=o(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?o(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(s)}),this.text=function(){var e=o(this);if(e)return e;if(this._bodyBlob)return u(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(c(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},v.formData&&(this.formData=function(){return this.text().then(d)}),this.json=function(){return this.text().then(JSON.parse)},this}function p(e){var t=e.toUpperCase();return w.indexOf(t)>-1?t:e}function h(e,t){t=t||{};var n=t.body;if(e instanceof h){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new i(e.headers)),this.method=e.method,this.mode=e.mode,n||null==e._bodyInit||(n=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"omit",!t.headers&&this.headers||(this.headers=new i(t.headers)),this.method=p(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n)}function d(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(i))}}),t}function m(e){var t=new i;return e.split(/\r?\n/).forEach(function(e){var n=e.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();t.append(r,i)}}),t}function g(e,t){t||(t={}),this.type="default",this.status="status"in t?t.status:200,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new i(t.headers),this.url=t.url||"",this._initBody(e)}if(!e.fetch){var v={searchParams:"URLSearchParams"in e,iterable:"Symbol"in e&&"iterator"in Symbol,blob:"FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in e,arrayBuffer:"ArrayBuffer"in e};if(v.arrayBuffer)var y=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],b=function(e){return e&&DataView.prototype.isPrototypeOf(e)},x=ArrayBuffer.isView||function(e){return e&&y.indexOf(Object.prototype.toString.call(e))>-1};i.prototype.append=function(e,r){e=t(e),r=n(r);var i=this.map[e];this.map[e]=i?i+","+r:r},i.prototype.delete=function(e){delete this.map[t(e)]},i.prototype.get=function(e){return e=t(e),this.has(e)?this.map[e]:null},i.prototype.has=function(e){return this.map.hasOwnProperty(t(e))},i.prototype.set=function(e,r){this.map[t(e)]=n(r)},i.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},i.prototype.keys=function(){var e=[];return this.forEach(function(t,n){e.push(n)}),r(e)},i.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),r(e)},i.prototype.entries=function(){var e=[];return this.forEach(function(t,n){e.push([n,t])}),r(e)},v.iterable&&(i.prototype[Symbol.iterator]=i.prototype.entries);var w=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];h.prototype.clone=function(){return new h(this,{body:this._bodyInit})},f.call(h.prototype),f.call(g.prototype),g.prototype.clone=function(){return new g(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new i(this.headers),url:this.url})},g.error=function(){var e=new g(null,{status:0,statusText:""});return e.type="error",e};var N=[301,302,303,307,308];g.redirect=function(e,t){if(-1===N.indexOf(t))throw new RangeError("Invalid status code");return new g(null,{status:t,headers:{location:e}})},e.Headers=i,e.Request=h,e.Response=g,e.fetch=function(e,t){return new Promise(function(n,r){var i=new h(e,t),o=new XMLHttpRequest;o.onload=function(){var e={status:o.status,statusText:o.statusText,headers:m(o.getAllResponseHeaders()||"")};e.url="responseURL"in o?o.responseURL:e.headers.get("X-Request-URL");var t="response"in o?o.response:o.responseText;n(new g(t,e))},o.onerror=function(){r(new TypeError("Network request failed"))},o.ontimeout=function(){r(new TypeError("Network request failed"))},o.open(i.method,i.url,!0),"include"===i.credentials&&(o.withCredentials=!0),"responseType"in o&&v.blob&&(o.responseType="blob"),i.headers.forEach(function(e,t){o.setRequestHeader(t,e)}),o.send("undefined"===typeof i._bodyInit?null:i._bodyInit)})},e.fetch.polyfill=!0}}("undefined"!==typeof self?self:this)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7),i=n.n(r),o=n(53),a=n.n(o),s=n(205),u=(n.n(s),n(206)),c=n(696);a.a.render(i.a.createElement(u.a,null),document.getElementById("root")),Object(c.a)()},function(e,t,n){"use strict";function r(e){for(var t=arguments.length-1,n="http://reactjs.org/docs/error-decoder.html?invariant="+e,r=0;r<t;r++)n+="&args[]="+encodeURIComponent(arguments[r+1]);y(!1,"Minified React error #"+e+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",n)}function i(e,t,n){this.props=e,this.context=t,this.refs=b,this.updater=n||_}function o(){}function a(e,t,n){this.props=e,this.context=t,this.refs=b,this.updater=n||_}function s(e,t,n){var r=void 0,i={},o=null,a=null;if(null!=t)for(r in void 0!==t.ref&&(a=t.ref),void 0!==t.key&&(o=""+t.key),t)I.call(t,r)&&!F.hasOwnProperty(r)&&(i[r]=t[r]);var s=arguments.length-2;if(1===s)i.children=n;else if(1<s){for(var u=Array(s),c=0;c<s;c++)u[c]=arguments[c+2];i.children=u}if(e&&e.defaultProps)for(r in s=e.defaultProps)void 0===i[r]&&(i[r]=s[r]);return{$$typeof:N,type:e,key:o,ref:a,props:i,_owner:R.current}}function u(e){return"object"===typeof e&&null!==e&&e.$$typeof===N}function c(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,function(e){return t[e]})}function l(e,t,n,r){if(L.length){var i=L.pop();return i.result=e,i.keyPrefix=t,i.func=n,i.context=r,i.count=0,i}return{result:e,keyPrefix:t,func:n,context:r,count:0}}function f(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,10>L.length&&L.push(e)}function p(e,t,n,i){var o=typeof e;"undefined"!==o&&"boolean"!==o||(e=null);var a=!1;if(null===e)a=!0;else switch(o){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case N:case E:a=!0}}if(a)return n(i,e,""===t?"."+h(e,0):t),1;if(a=0,t=""===t?".":t+":",Array.isArray(e))for(var s=0;s<e.length;s++){o=e[s];var u=t+h(o,s);a+=p(o,u,n,i)}else if(null===e||"undefined"===typeof e?u=null:(u=A&&e[A]||e["@@iterator"],u="function"===typeof u?u:null),"function"===typeof u)for(e=u.call(e),s=0;!(o=e.next()).done;)o=o.value,u=t+h(o,s++),a+=p(o,u,n,i);else"object"===o&&(n=""+e,r("31","[object Object]"===n?"object with keys {"+Object.keys(e).join(", ")+"}":n,""));return a}function h(e,t){return"object"===typeof e&&null!==e&&null!=e.key?c(e.key):t.toString(36)}function d(e,t){e.func.call(e.context,t,e.count++)}function m(e,t,n){var r=e.result,i=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?g(e,r,n,x.thatReturnsArgument):null!=e&&(u(e)&&(t=i+(!e.key||t&&t.key===e.key?"":(""+e.key).replace(D,"$&/")+"/")+n,e={$$typeof:N,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}),r.push(e))}function g(e,t,n,r,i){var o="";null!=n&&(o=(""+n).replace(D,"$&/")+"/"),t=l(t,o,r,i),null==e||p(e,"",m,t),f(t)}var v=n(69),y=n(70),b=n(88),x=n(89),w="function"===typeof Symbol&&Symbol.for,N=w?Symbol.for("react.element"):60103,E=w?Symbol.for("react.portal"):60106,C=w?Symbol.for("react.fragment"):60107,S=w?Symbol.for("react.strict_mode"):60108,M=w?Symbol.for("react.provider"):60109,T=w?Symbol.for("react.context"):60110,O=w?Symbol.for("react.async_mode"):60111,k=w?Symbol.for("react.forward_ref"):60112,A="function"===typeof Symbol&&Symbol.iterator,_={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}};i.prototype.isReactComponent={},i.prototype.setState=function(e,t){"object"!==typeof e&&"function"!==typeof e&&null!=e&&r("85"),this.updater.enqueueSetState(this,e,t,"setState")},i.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},o.prototype=i.prototype;var P=a.prototype=new o;P.constructor=a,v(P,i.prototype),P.isPureReactComponent=!0;var R={current:null},I=Object.prototype.hasOwnProperty,F={key:!0,ref:!0,__self:!0,__source:!0},D=/\/+/g,L=[],B={Children:{map:function(e,t,n){if(null==e)return e;var r=[];return g(e,r,null,t,n),r},forEach:function(e,t,n){if(null==e)return e;t=l(null,null,t,n),null==e||p(e,"",d,t),f(t)},count:function(e){return null==e?0:p(e,"",x.thatReturnsNull,null)},toArray:function(e){var t=[];return g(e,t,null,x.thatReturnsArgument),t},only:function(e){return u(e)||r("143"),e}},createRef:function(){return{current:null}},Component:i,PureComponent:a,createContext:function(e,t){return void 0===t&&(t=null),e={$$typeof:T,_calculateChangedBits:t,_defaultValue:e,_currentValue:e,_changedBits:0,Provider:null,Consumer:null},e.Provider={$$typeof:M,_context:e},e.Consumer=e},forwardRef:function(e){return{$$typeof:k,render:e}},Fragment:C,StrictMode:S,unstable_AsyncMode:O,createElement:s,cloneElement:function(e,t,n){(null===e||void 0===e)&&r("267",e);var i=void 0,o=v({},e.props),a=e.key,s=e.ref,u=e._owner;if(null!=t){void 0!==t.ref&&(s=t.ref,u=R.current),void 0!==t.key&&(a=""+t.key);var c=void 0;e.type&&e.type.defaultProps&&(c=e.type.defaultProps);for(i in t)I.call(t,i)&&!F.hasOwnProperty(i)&&(o[i]=void 0===t[i]&&void 0!==c?c[i]:t[i])}if(1===(i=arguments.length-2))o.children=n;else if(1<i){c=Array(i);for(var l=0;l<i;l++)c[l]=arguments[l+2];o.children=c}return{$$typeof:N,type:e.type,key:a,ref:s,props:o,_owner:u}},createFactory:function(e){var t=s.bind(null,e);return t.type=e,t},isValidElement:u,version:"16.3.2",__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentOwner:R,assign:v}},z=Object.freeze({default:B}),j=z&&B||z;e.exports=j.default?j.default:j},function(e,t,n){"use strict";function r(e){for(var t=arguments.length-1,n="http://reactjs.org/docs/error-decoder.html?invariant="+e,r=0;r<t;r++)n+="&args[]="+encodeURIComponent(arguments[r+1]);cn(!1,"Minified React error #"+e+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",n)}function i(e,t,n,r,i,o,a,s,u){this._hasCaughtError=!1,this._caughtError=null;var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(e){this._caughtError=e,this._hasCaughtError=!0}}function o(){if(yn._hasRethrowError){var e=yn._rethrowError;throw yn._rethrowError=null,yn._hasRethrowError=!1,e}}function a(){if(bn)for(var e in xn){var t=xn[e],n=bn.indexOf(e);if(-1<n||r("96",e),!wn[n]){t.extractEvents||r("97",e),wn[n]=t,n=t.eventTypes;for(var i in n){var o=void 0,a=n[i],u=t,c=i;Nn.hasOwnProperty(c)&&r("99",c),Nn[c]=a;var l=a.phasedRegistrationNames;if(l){for(o in l)l.hasOwnProperty(o)&&s(l[o],u,c);o=!0}else a.registrationName?(s(a.registrationName,u,c),o=!0):o=!1;o||r("98",i,e)}}}}function s(e,t,n){En[e]&&r("100",e),En[e]=t,Cn[e]=t.eventTypes[n].dependencies}function u(e){bn&&r("101"),bn=Array.prototype.slice.call(e),a()}function c(e){var t,n=!1;for(t in e)if(e.hasOwnProperty(t)){var i=e[t];xn.hasOwnProperty(t)&&xn[t]===i||(xn[t]&&r("102",t),xn[t]=i,n=!0)}n&&a()}function l(e,t,n,r){t=e.type||"unknown-event",e.currentTarget=On(r),yn.invokeGuardedCallbackAndCatchFirstError(t,n,void 0,e),e.currentTarget=null}function f(e,t){return null==t&&r("30"),null==e?t:Array.isArray(e)?Array.isArray(t)?(e.push.apply(e,t),e):(e.push(t),e):Array.isArray(t)?[e].concat(t):[e,t]}function p(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)}function h(e,t){if(e){var n=e._dispatchListeners,r=e._dispatchInstances;if(Array.isArray(n))for(var i=0;i<n.length&&!e.isPropagationStopped();i++)l(e,t,n[i],r[i]);else n&&l(e,t,n,r);e._dispatchListeners=null,e._dispatchInstances=null,e.isPersistent()||e.constructor.release(e)}}function d(e){return h(e,!0)}function m(e){return h(e,!1)}function g(e,t){var n=e.stateNode;if(!n)return null;var i=Mn(n);if(!i)return null;n=i[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":(i=!i.disabled)||(e=e.type,i=!("button"===e||"input"===e||"select"===e||"textarea"===e)),e=!i;break e;default:e=!1}return e?null:(n&&"function"!==typeof n&&r("231",t,typeof n),n)}function v(e,t){null!==e&&(kn=f(kn,e)),e=kn,kn=null,e&&(t?p(e,d):p(e,m),kn&&r("95"),yn.rethrowCaughtError())}function y(e,t,n,r){for(var i=null,o=0;o<wn.length;o++){var a=wn[o];a&&(a=a.extractEvents(e,t,n,r))&&(i=f(i,a))}v(i,!1)}function b(e){if(e[Rn])return e[Rn];for(;!e[Rn];){if(!e.parentNode)return null;e=e.parentNode}return e=e[Rn],5===e.tag||6===e.tag?e:null}function x(e){if(5===e.tag||6===e.tag)return e.stateNode;r("33")}function w(e){return e[In]||null}function N(e){do{e=e.return}while(e&&5!==e.tag);return e||null}function E(e,t,n){for(var r=[];e;)r.push(e),e=N(e);for(e=r.length;0<e--;)t(r[e],"captured",n);for(e=0;e<r.length;e++)t(r[e],"bubbled",n)}function C(e,t,n){(t=g(e,n.dispatchConfig.phasedRegistrationNames[t]))&&(n._dispatchListeners=f(n._dispatchListeners,t),n._dispatchInstances=f(n._dispatchInstances,e))}function S(e){e&&e.dispatchConfig.phasedRegistrationNames&&E(e._targetInst,C,e)}function M(e){if(e&&e.dispatchConfig.phasedRegistrationNames){var t=e._targetInst;t=t?N(t):null,E(t,C,e)}}function T(e,t,n){e&&n&&n.dispatchConfig.registrationName&&(t=g(e,n.dispatchConfig.registrationName))&&(n._dispatchListeners=f(n._dispatchListeners,t),n._dispatchInstances=f(n._dispatchInstances,e))}function O(e){e&&e.dispatchConfig.registrationName&&T(e._targetInst,null,e)}function k(e){p(e,S)}function A(e,t,n,r){if(n&&r)e:{for(var i=n,o=r,a=0,s=i;s;s=N(s))a++;s=0;for(var u=o;u;u=N(u))s++;for(;0<a-s;)i=N(i),a--;for(;0<s-a;)o=N(o),s--;for(;a--;){if(i===o||i===o.alternate)break e;i=N(i),o=N(o)}i=null}else i=null;for(o=i,i=[];n&&n!==o&&(null===(a=n.alternate)||a!==o);)i.push(n),n=N(n);for(n=[];r&&r!==o&&(null===(a=r.alternate)||a!==o);)n.push(r),r=N(r);for(r=0;r<i.length;r++)T(i[r],"bubbled",e);for(e=n.length;0<e--;)T(n[e],"captured",t)}function _(){return!Ln&&fn.canUseDOM&&(Ln="textContent"in document.documentElement?"textContent":"innerText"),Ln}function P(){if(Bn._fallbackText)return Bn._fallbackText;var e,t,n=Bn._startText,r=n.length,i=R(),o=i.length;for(e=0;e<r&&n[e]===i[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===i[o-t];t++);return Bn._fallbackText=i.slice(e,1<t?1-t:void 0),Bn._fallbackText}function R(){return"value"in Bn._root?Bn._root.value:Bn._root[_()]}function I(e,t,n,r){this.dispatchConfig=e,this._targetInst=t,this.nativeEvent=n,e=this.constructor.Interface;for(var i in e)e.hasOwnProperty(i)&&((t=e[i])?this[i]=t(n):"target"===i?this.target=r:this[i]=n[i]);return this.isDefaultPrevented=(null!=n.defaultPrevented?n.defaultPrevented:!1===n.returnValue)?hn.thatReturnsTrue:hn.thatReturnsFalse,this.isPropagationStopped=hn.thatReturnsFalse,this}function F(e,t,n,r){if(this.eventPool.length){var i=this.eventPool.pop();return this.call(i,e,t,n,r),i}return new this(e,t,n,r)}function D(e){e instanceof this||r("223"),e.destructor(),10>this.eventPool.length&&this.eventPool.push(e)}function L(e){e.eventPool=[],e.getPooled=F,e.release=D}function B(e,t){switch(e){case"topKeyUp":return-1!==Hn.indexOf(t.keyCode);case"topKeyDown":return 229!==t.keyCode;case"topKeyPress":case"topMouseDown":case"topBlur":return!0;default:return!1}}function z(e){return e=e.detail,"object"===typeof e&&"data"in e?e.data:null}function j(e,t){switch(e){case"topCompositionEnd":return z(t);case"topKeyPress":return 32!==t.which?null:(Kn=!0,Yn);case"topTextInput":return e=t.data,e===Yn&&Kn?null:e;default:return null}}function U(e,t){if(Zn)return"topCompositionEnd"===e||!Wn&&B(e,t)?(e=P(),Bn._root=null,Bn._startText=null,Bn._fallbackText=null,Zn=!1,e):null;switch(e){case"topPaste":return null;case"topKeyPress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"topCompositionEnd":return $n?null:t.data;default:return null}}function q(e){if(e=Tn(e)){Qn&&"function"===typeof Qn.restoreControlledState||r("194");var t=Mn(e.stateNode);Qn.restoreControlledState(e.stateNode,e.type,t)}}function H(e){tr?nr?nr.push(e):nr=[e]:tr=e}function W(){return null!==tr||null!==nr}function V(){if(tr){var e=tr,t=nr;if(nr=tr=null,q(e),t)for(e=0;e<t.length;e++)q(t[e])}}function G(e,t){return e(t)}function $(e,t,n){return e(t,n)}function Y(){}function X(e,t){if(ir)return e(t);ir=!0;try{return G(e,t)}finally{ir=!1,W()&&(Y(),V())}}function K(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!or[e.type]:"textarea"===t}function Z(e){return e=e.target||window,e.correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}function J(e,t){return!(!fn.canUseDOM||t&&!("addEventListener"in document))&&(e="on"+e,t=e in document,t||(t=document.createElement("div"),t.setAttribute(e,"return;"),t="function"===typeof t[e]),t)}function Q(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function ee(e){var t=Q(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&"function"===typeof n.get&&"function"===typeof n.set)return Object.defineProperty(e,t,{configurable:!0,get:function(){return n.get.call(this)},set:function(e){r=""+e,n.set.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}function te(e){e._valueTracker||(e._valueTracker=ee(e))}function ne(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Q(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function re(e){return null===e||"undefined"===typeof e?null:(e=yr&&e[yr]||e["@@iterator"],"function"===typeof e?e:null)}function ie(e){if("function"===typeof(e=e.type))return e.displayName||e.name;if("string"===typeof e)return e;switch(e){case pr:return"ReactFragment";case fr:return"ReactPortal";case cr:return"ReactCall";case lr:return"ReactReturn"}if("object"===typeof e&&null!==e)switch(e.$$typeof){case vr:return e=e.render.displayName||e.render.name||"",""!==e?"ForwardRef("+e+")":"ForwardRef"}return null}function oe(e){var t="";do{e:switch(e.tag){case 0:case 1:case 2:case 5:var n=e._debugOwner,r=e._debugSource,i=ie(e),o=null;n&&(o=ie(n)),n=r,i="\n    in "+(i||"Unknown")+(n?" (at "+n.fileName.replace(/^.*[\\\/]/,"")+":"+n.lineNumber+")":o?" (created by "+o+")":"");break e;default:i=""}t+=i,e=e.return}while(e);return t}function ae(e){return!!wr.hasOwnProperty(e)||!xr.hasOwnProperty(e)&&(br.test(e)?wr[e]=!0:(xr[e]=!0,!1))}function se(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}function ue(e,t,n,r){if(null===t||"undefined"===typeof t||se(e,t,n,r))return!0;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function ce(e,t,n,r,i){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t}function le(e){return e[1].toUpperCase()}function fe(e,t,n,r){var i=Nr.hasOwnProperty(t)?Nr[t]:null;(null!==i?0===i.type:!r&&(2<t.length&&("o"===t[0]||"O"===t[0])&&("n"===t[1]||"N"===t[1])))||(ue(t,n,i,r)&&(n=null),r||null===i?ae(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=null===n?3!==i.type&&"":n:(t=i.attributeName,r=i.attributeNamespace,null===n?e.removeAttribute(t):(i=i.type,n=3===i||4===i&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}function pe(e,t){var n=t.checked;return pn({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function he(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=ye(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function de(e,t){null!=(t=t.checked)&&fe(e,"checked",t,!1)}function me(e,t){de(e,t);var n=ye(t.value);null!=n&&("number"===t.type?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n)),t.hasOwnProperty("value")?ve(e,t.type,n):t.hasOwnProperty("defaultValue")&&ve(e,t.type,ye(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function ge(e,t){(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue"))&&(""===e.value&&(e.value=""+e._wrapperState.initialValue),e.defaultValue=""+e._wrapperState.initialValue),t=e.name,""!==t&&(e.name=""),e.defaultChecked=!e.defaultChecked,e.defaultChecked=!e.defaultChecked,""!==t&&(e.name=t)}function ve(e,t,n){"number"===t&&e.ownerDocument.activeElement===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function ye(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function be(e,t,n){return e=I.getPooled(Cr.change,e,t,n),e.type="change",H(n),k(e),e}function xe(e){v(e,!1)}function we(e){if(ne(x(e)))return e}function Ne(e,t){if("topChange"===e)return t}function Ee(){Sr&&(Sr.detachEvent("onpropertychange",Ce),Mr=Sr=null)}function Ce(e){"value"===e.propertyName&&we(Mr)&&(e=be(Mr,e,Z(e)),X(xe,e))}function Se(e,t,n){"topFocus"===e?(Ee(),Sr=t,Mr=n,Sr.attachEvent("onpropertychange",Ce)):"topBlur"===e&&Ee()}function Me(e){if("topSelectionChange"===e||"topKeyUp"===e||"topKeyDown"===e)return we(Mr)}function Te(e,t){if("topClick"===e)return we(t)}function Oe(e,t){if("topInput"===e||"topChange"===e)return we(t)}function ke(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=Ar[e])&&!!t[e]}function Ae(){return ke}function _e(e){var t=e;if(e.alternate)for(;t.return;)t=t.return;else{if(0!==(2&t.effectTag))return 1;for(;t.return;)if(t=t.return,0!==(2&t.effectTag))return 1}return 3===t.tag?2:3}function Pe(e){return!!(e=e._reactInternalFiber)&&2===_e(e)}function Re(e){2!==_e(e)&&r("188")}function Ie(e){var t=e.alternate;if(!t)return t=_e(e),3===t&&r("188"),1===t?null:e;for(var n=e,i=t;;){var o=n.return,a=o?o.alternate:null;if(!o||!a)break;if(o.child===a.child){for(var s=o.child;s;){if(s===n)return Re(o),e;if(s===i)return Re(o),t;s=s.sibling}r("188")}if(n.return!==i.return)n=o,i=a;else{s=!1;for(var u=o.child;u;){if(u===n){s=!0,n=o,i=a;break}if(u===i){s=!0,i=o,n=a;break}u=u.sibling}if(!s){for(u=a.child;u;){if(u===n){s=!0,n=a,i=o;break}if(u===i){s=!0,i=a,n=o;break}u=u.sibling}s||r("189")}}n.alternate!==i&&r("190")}return 3!==n.tag&&r("188"),n.stateNode.current===n?e:t}function Fe(e){if(!(e=Ie(e)))return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}function De(e){if(!(e=Ie(e)))return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child&&4!==t.tag)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}function Le(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function Be(e,t){var n=e[0].toUpperCase()+e.slice(1),r="on"+n;n="top"+n,t={phasedRegistrationNames:{bubbled:r,captured:r+"Capture"},dependencies:[n],isInteractive:t},Wr[e]=t,Vr[n]=t}function ze(e){var t=e.targetInst;do{if(!t){e.ancestors.push(t);break}var n;for(n=t;n.return;)n=n.return;if(!(n=3!==n.tag?null:n.stateNode.containerInfo))break;e.ancestors.push(t),t=b(n)}while(t);for(n=0;n<e.ancestors.length;n++)t=e.ancestors[n],y(e.topLevelType,t,e.nativeEvent,Z(e.nativeEvent))}function je(e){Xr=!!e}function Ue(e,t,n){if(!n)return null;e=($r(e)?He:We).bind(null,e),n.addEventListener(t,e,!1)}function qe(e,t,n){if(!n)return null;e=($r(e)?He:We).bind(null,e),n.addEventListener(t,e,!0)}function He(e,t){$(We,e,t)}function We(e,t){if(Xr){var n=Z(t);if(n=b(n),null!==n&&"number"===typeof n.tag&&2!==_e(n)&&(n=null),Yr.length){var r=Yr.pop();r.topLevelType=e,r.nativeEvent=t,r.targetInst=n,e=r}else e={topLevelType:e,nativeEvent:t,targetInst:n,ancestors:[]};try{X(ze,e)}finally{e.topLevelType=null,e.nativeEvent=null,e.targetInst=null,e.ancestors.length=0,10>Yr.length&&Yr.push(e)}}}function Ve(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n["ms"+e]="MS"+t,n["O"+e]="o"+t.toLowerCase(),n}function Ge(e){if(Jr[e])return Jr[e];if(!Zr[e])return e;var t,n=Zr[e];for(t in n)if(n.hasOwnProperty(t)&&t in Qr)return Jr[e]=n[t];return e}function $e(e){return Object.prototype.hasOwnProperty.call(e,ii)||(e[ii]=ri++,ni[e[ii]]={}),ni[e[ii]]}function Ye(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Xe(e,t){var n=Ye(e);e=0;for(var r;n;){if(3===n.nodeType){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Ye(n)}}function Ke(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&"text"===e.type||"textarea"===t||"true"===e.contentEditable)}function Ze(e,t){if(li||null==si||si!==dn())return null;var n=si;return"selectionStart"in n&&Ke(n)?n={start:n.selectionStart,end:n.selectionEnd}:window.getSelection?(n=window.getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}):n=void 0,ci&&mn(ci,n)?null:(ci=n,e=I.getPooled(ai.select,ui,e,t),e.type="select",e.target=si,k(e),e)}function Je(e,t,n,r){this.tag=e,this.key=n,this.stateNode=this.type=null,this.sibling=this.child=this.return=null,this.index=0,this.ref=null,this.pendingProps=t,this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.effectTag=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.expirationTime=0,this.alternate=null}function Qe(e,t,n){var r=e.alternate;return null===r?(r=new Je(e.tag,t,e.key,e.mode),r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.effectTag=0,r.nextEffect=null,r.firstEffect=null,r.lastEffect=null),r.expirationTime=n,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function et(e,t,n){var i=e.type,o=e.key;e=e.props;var a=void 0;if("function"===typeof i)a=i.prototype&&i.prototype.isReactComponent?2:0;else if("string"===typeof i)a=5;else switch(i){case pr:return tt(e.children,t,n,o);case gr:a=11,t|=3;break;case hr:a=11,t|=2;break;case cr:a=7;break;case lr:a=9;break;default:if("object"===typeof i&&null!==i)switch(i.$$typeof){case dr:a=13;break;case mr:a=12;break;case vr:a=14;break;default:if("number"===typeof i.tag)return t=i,t.pendingProps=e,t.expirationTime=n,t;r("130",null==i?i:typeof i,"")}else r("130",null==i?i:typeof i,"")}return t=new Je(a,e,o,t),t.type=i,t.expirationTime=n,t}function tt(e,t,n,r){return e=new Je(10,e,r,t),e.expirationTime=n,e}function nt(e,t,n){return e=new Je(6,e,null,t),e.expirationTime=n,e}function rt(e,t,n){return t=new Je(4,null!==e.children?e.children:[],e.key,t),t.expirationTime=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function it(e){return function(t){try{return e(t)}catch(e){}}}function ot(e){if("undefined"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled||!t.supportsFiber)return!0;try{var n=t.inject(e);pi=it(function(e){return t.onCommitFiberRoot(n,e)}),hi=it(function(e){return t.onCommitFiberUnmount(n,e)})}catch(e){}return!0}function at(e){"function"===typeof pi&&pi(e)}function st(e){"function"===typeof hi&&hi(e)}function ut(e){return{baseState:e,expirationTime:0,first:null,last:null,callbackList:null,hasForceUpdate:!1,isInitialized:!1,capturedValues:null}}function ct(e,t){null===e.last?e.first=e.last=t:(e.last.next=t,e.last=t),(0===e.expirationTime||e.expirationTime>t.expirationTime)&&(e.expirationTime=t.expirationTime)}function lt(e){di=mi=null;var t=e.alternate,n=e.updateQueue;null===n&&(n=e.updateQueue=ut(null)),null!==t?null===(e=t.updateQueue)&&(e=t.updateQueue=ut(null)):e=null,di=n,mi=e!==n?e:null}function ft(e,t){lt(e),e=di;var n=mi;null===n?ct(e,t):null===e.last||null===n.last?(ct(e,t),ct(n,t)):(ct(e,t),n.last=t)}function pt(e,t,n,r){return e=e.partialState,"function"===typeof e?e.call(t,n,r):e}function ht(e,t,n,r,i,o){null!==e&&e.updateQueue===n&&(n=t.updateQueue={baseState:n.baseState,expirationTime:n.expirationTime,first:n.first,last:n.last,isInitialized:n.isInitialized,capturedValues:n.capturedValues,callbackList:null,hasForceUpdate:!1}),n.expirationTime=0,n.isInitialized?e=n.baseState:(e=n.baseState=t.memoizedState,n.isInitialized=!0);for(var a=!0,s=n.first,u=!1;null!==s;){var c=s.expirationTime;if(c>o){var l=n.expirationTime;(0===l||l>c)&&(n.expirationTime=c),u||(u=!0,n.baseState=e)}else u||(n.first=s.next,null===n.first&&(n.last=null)),s.isReplace?(e=pt(s,r,e,i),a=!0):(c=pt(s,r,e,i))&&(e=a?pn({},e,c):pn(e,c),a=!1),s.isForced&&(n.hasForceUpdate=!0),null!==s.callback&&(c=n.callbackList,null===c&&(c=n.callbackList=[]),c.push(s)),null!==s.capturedValue&&(c=n.capturedValues,null===c?n.capturedValues=[s.capturedValue]:c.push(s.capturedValue));s=s.next}return null!==n.callbackList?t.effectTag|=32:null!==n.first||n.hasForceUpdate||null!==n.capturedValues||(t.updateQueue=null),u||(n.baseState=e),e}function dt(e,t){var n=e.callbackList;if(null!==n)for(e.callbackList=null,e=0;e<n.length;e++){var i=n[e],o=i.callback;i.callback=null,"function"!==typeof o&&r("191",o),o.call(t)}}function mt(e,t,n,r,i){function o(e,t,n,r,i,o){if(null===t||null!==e.updateQueue&&e.updateQueue.hasForceUpdate)return!0;var a=e.stateNode;return e=e.type,"function"===typeof a.shouldComponentUpdate?a.shouldComponentUpdate(n,i,o):!e.prototype||!e.prototype.isPureReactComponent||(!mn(t,n)||!mn(r,i))}function a(e,t){t.updater=d,e.stateNode=t,t._reactInternalFiber=e}function s(e,t,n,r){e=t.state,"function"===typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"===typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&d.enqueueReplaceState(t,t.state,null)}function u(e,t,n,r){if(e=e.type,"function"===typeof e.getDerivedStateFromProps)return e.getDerivedStateFromProps.call(null,n,r)}var c=e.cacheContext,l=e.getMaskedContext,f=e.getUnmaskedContext,p=e.isContextConsumer,h=e.hasContextChanged,d={isMounted:Pe,enqueueSetState:function(e,r,i){e=e._reactInternalFiber,i=void 0===i?null:i;var o=n(e);ft(e,{expirationTime:o,partialState:r,callback:i,isReplace:!1,isForced:!1,capturedValue:null,next:null}),t(e,o)},enqueueReplaceState:function(e,r,i){e=e._reactInternalFiber,i=void 0===i?null:i;var o=n(e);ft(e,{expirationTime:o,partialState:r,callback:i,isReplace:!0,isForced:!1,capturedValue:null,next:null}),t(e,o)},enqueueForceUpdate:function(e,r){e=e._reactInternalFiber,r=void 0===r?null:r;var i=n(e);ft(e,{expirationTime:i,partialState:null,callback:r,isReplace:!1,isForced:!0,capturedValue:null,next:null}),t(e,i)}};return{adoptClassInstance:a,callGetDerivedStateFromProps:u,constructClassInstance:function(e,t){var n=e.type,r=f(e),i=p(e),o=i?l(e,r):vn;n=new n(t,o);var s=null!==n.state&&void 0!==n.state?n.state:null;return a(e,n),e.memoizedState=s,t=u(e,n,t,s),null!==t&&void 0!==t&&(e.memoizedState=pn({},e.memoizedState,t)),i&&c(e,r,o),n},mountClassInstance:function(e,t){var n=e.type,r=e.alternate,i=e.stateNode,o=e.pendingProps,a=f(e);i.props=o,i.state=e.memoizedState,i.refs=vn,i.context=l(e,a),"function"===typeof n.getDerivedStateFromProps||"function"===typeof i.getSnapshotBeforeUpdate||"function"!==typeof i.UNSAFE_componentWillMount&&"function"!==typeof i.componentWillMount||(n=i.state,"function"===typeof i.componentWillMount&&i.componentWillMount(),"function"===typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),n!==i.state&&d.enqueueReplaceState(i,i.state,null),null!==(n=e.updateQueue)&&(i.state=ht(r,e,n,i,o,t))),"function"===typeof i.componentDidMount&&(e.effectTag|=4)},resumeMountClassInstance:function(e,t){var n=e.type,a=e.stateNode;a.props=e.memoizedProps,a.state=e.memoizedState;var c=e.memoizedProps,p=e.pendingProps,d=a.context,m=f(e);m=l(e,m),(n="function"===typeof n.getDerivedStateFromProps||"function"===typeof a.getSnapshotBeforeUpdate)||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(c!==p||d!==m)&&s(e,a,p,m),d=e.memoizedState,t=null!==e.updateQueue?ht(null,e,e.updateQueue,a,p,t):d;var g=void 0;if(c!==p&&(g=u(e,a,p,t)),null!==g&&void 0!==g){t=null===t||void 0===t?g:pn({},t,g);var v=e.updateQueue;null!==v&&(v.baseState=pn({},v.baseState,g))}return c!==p||d!==t||h()||null!==e.updateQueue&&e.updateQueue.hasForceUpdate?((c=o(e,c,p,d,t,m))?(n||"function"!==typeof a.UNSAFE_componentWillMount&&"function"!==typeof a.componentWillMount||("function"===typeof a.componentWillMount&&a.componentWillMount(),"function"===typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"===typeof a.componentDidMount&&(e.effectTag|=4)):("function"===typeof a.componentDidMount&&(e.effectTag|=4),r(e,p),i(e,t)),a.props=p,a.state=t,a.context=m,c):("function"===typeof a.componentDidMount&&(e.effectTag|=4),!1)},updateClassInstance:function(e,t,n){var a=t.type,c=t.stateNode;c.props=t.memoizedProps,c.state=t.memoizedState;var p=t.memoizedProps,d=t.pendingProps,m=c.context,g=f(t);g=l(t,g),(a="function"===typeof a.getDerivedStateFromProps||"function"===typeof c.getSnapshotBeforeUpdate)||"function"!==typeof c.UNSAFE_componentWillReceiveProps&&"function"!==typeof c.componentWillReceiveProps||(p!==d||m!==g)&&s(t,c,d,g),m=t.memoizedState,n=null!==t.updateQueue?ht(e,t,t.updateQueue,c,d,n):m;var v=void 0;if(p!==d&&(v=u(t,c,d,n)),null!==v&&void 0!==v){n=null===n||void 0===n?v:pn({},n,v);var y=t.updateQueue;null!==y&&(y.baseState=pn({},y.baseState,v))}return p!==d||m!==n||h()||null!==t.updateQueue&&t.updateQueue.hasForceUpdate?((v=o(t,p,d,m,n,g))?(a||"function"!==typeof c.UNSAFE_componentWillUpdate&&"function"!==typeof c.componentWillUpdate||("function"===typeof c.componentWillUpdate&&c.componentWillUpdate(d,n,g),"function"===typeof c.UNSAFE_componentWillUpdate&&c.UNSAFE_componentWillUpdate(d,n,g)),"function"===typeof c.componentDidUpdate&&(t.effectTag|=4),"function"===typeof c.getSnapshotBeforeUpdate&&(t.effectTag|=2048)):("function"!==typeof c.componentDidUpdate||p===e.memoizedProps&&m===e.memoizedState||(t.effectTag|=4),"function"!==typeof c.getSnapshotBeforeUpdate||p===e.memoizedProps&&m===e.memoizedState||(t.effectTag|=2048),r(t,d),i(t,n)),c.props=d,c.state=n,c.context=g,v):("function"!==typeof c.componentDidUpdate||p===e.memoizedProps&&m===e.memoizedState||(t.effectTag|=4),"function"!==typeof c.getSnapshotBeforeUpdate||p===e.memoizedProps&&m===e.memoizedState||(t.effectTag|=2048),!1)}}}function gt(e,t,n){if(null!==(e=n.ref)&&"function"!==typeof e&&"object"!==typeof e){if(n._owner){n=n._owner;var i=void 0;n&&(2!==n.tag&&r("110"),i=n.stateNode),i||r("147",e);var o=""+e;return null!==t&&null!==t.ref&&t.ref._stringRef===o?t.ref:(t=function(e){var t=i.refs===vn?i.refs={}:i.refs;null===e?delete t[o]:t[o]=e},t._stringRef=o,t)}"string"!==typeof e&&r("148"),n._owner||r("254",e)}return e}function vt(e,t){"textarea"!==e.type&&r("31","[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t,"")}function yt(e){function t(t,n){if(e){var r=t.lastEffect;null!==r?(r.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n,n.nextEffect=null,n.effectTag=8}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function i(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function o(e,t,n){return e=Qe(e,t,n),e.index=0,e.sibling=null,e}function a(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index,r<n?(t.effectTag=2,n):r):(t.effectTag=2,n):n}function s(t){return e&&null===t.alternate&&(t.effectTag=2),t}function u(e,t,n,r){return null===t||6!==t.tag?(t=nt(n,e.mode,r),t.return=e,t):(t=o(t,n,r),t.return=e,t)}function c(e,t,n,r){return null!==t&&t.type===n.type?(r=o(t,n.props,r),r.ref=gt(e,t,n),r.return=e,r):(r=et(n,e.mode,r),r.ref=gt(e,t,n),r.return=e,r)}function l(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=rt(n,e.mode,r),t.return=e,t):(t=o(t,n.children||[],r),t.return=e,t)}function f(e,t,n,r,i){return null===t||10!==t.tag?(t=tt(n,e.mode,r,i),t.return=e,t):(t=o(t,n,r),t.return=e,t)}function p(e,t,n){if("string"===typeof t||"number"===typeof t)return t=nt(""+t,e.mode,n),t.return=e,t;if("object"===typeof t&&null!==t){switch(t.$$typeof){case ur:return n=et(t,e.mode,n),n.ref=gt(e,null,t),n.return=e,n;case fr:return t=rt(t,e.mode,n),t.return=e,t}if(gi(t)||re(t))return t=tt(t,e.mode,n,null),t.return=e,t;vt(e,t)}return null}function h(e,t,n,r){var i=null!==t?t.key:null;if("string"===typeof n||"number"===typeof n)return null!==i?null:u(e,t,""+n,r);if("object"===typeof n&&null!==n){switch(n.$$typeof){case ur:return n.key===i?n.type===pr?f(e,t,n.props.children,r,i):c(e,t,n,r):null;case fr:return n.key===i?l(e,t,n,r):null}if(gi(n)||re(n))return null!==i?null:f(e,t,n,r,null);vt(e,n)}return null}function d(e,t,n,r,i){if("string"===typeof r||"number"===typeof r)return e=e.get(n)||null,u(t,e,""+r,i);if("object"===typeof r&&null!==r){switch(r.$$typeof){case ur:return e=e.get(null===r.key?n:r.key)||null,r.type===pr?f(t,e,r.props.children,i,r.key):c(t,e,r,i);case fr:return e=e.get(null===r.key?n:r.key)||null,l(t,e,r,i)}if(gi(r)||re(r))return e=e.get(n)||null,f(t,e,r,i,null);vt(t,r)}return null}function m(r,o,s,u){for(var c=null,l=null,f=o,m=o=0,g=null;null!==f&&m<s.length;m++){f.index>m?(g=f,f=null):g=f.sibling;var v=h(r,f,s[m],u);if(null===v){null===f&&(f=g);break}e&&f&&null===v.alternate&&t(r,f),o=a(v,o,m),null===l?c=v:l.sibling=v,l=v,f=g}if(m===s.length)return n(r,f),c;if(null===f){for(;m<s.length;m++)(f=p(r,s[m],u))&&(o=a(f,o,m),null===l?c=f:l.sibling=f,l=f);return c}for(f=i(r,f);m<s.length;m++)(g=d(f,r,m,s[m],u))&&(e&&null!==g.alternate&&f.delete(null===g.key?m:g.key),o=a(g,o,m),null===l?c=g:l.sibling=g,l=g);return e&&f.forEach(function(e){return t(r,e)}),c}function g(o,s,u,c){var l=re(u);"function"!==typeof l&&r("150"),null==(u=l.call(u))&&r("151");for(var f=l=null,m=s,g=s=0,v=null,y=u.next();null!==m&&!y.done;g++,y=u.next()){m.index>g?(v=m,m=null):v=m.sibling;var b=h(o,m,y.value,c);if(null===b){m||(m=v);break}e&&m&&null===b.alternate&&t(o,m),s=a(b,s,g),null===f?l=b:f.sibling=b,f=b,m=v}if(y.done)return n(o,m),l;if(null===m){for(;!y.done;g++,y=u.next())null!==(y=p(o,y.value,c))&&(s=a(y,s,g),null===f?l=y:f.sibling=y,f=y);return l}for(m=i(o,m);!y.done;g++,y=u.next())null!==(y=d(m,o,g,y.value,c))&&(e&&null!==y.alternate&&m.delete(null===y.key?g:y.key),s=a(y,s,g),null===f?l=y:f.sibling=y,f=y);return e&&m.forEach(function(e){return t(o,e)}),l}return function(e,i,a,u){"object"===typeof a&&null!==a&&a.type===pr&&null===a.key&&(a=a.props.children);var c="object"===typeof a&&null!==a;if(c)switch(a.$$typeof){case ur:e:{var l=a.key;for(c=i;null!==c;){if(c.key===l){if(10===c.tag?a.type===pr:c.type===a.type){n(e,c.sibling),i=o(c,a.type===pr?a.props.children:a.props,u),i.ref=gt(e,c,a),i.return=e,e=i;break e}n(e,c);break}t(e,c),c=c.sibling}a.type===pr?(i=tt(a.props.children,e.mode,u,a.key),i.return=e,e=i):(u=et(a,e.mode,u),u.ref=gt(e,i,a),u.return=e,e=u)}return s(e);case fr:e:{for(c=a.key;null!==i;){if(i.key===c){if(4===i.tag&&i.stateNode.containerInfo===a.containerInfo&&i.stateNode.implementation===a.implementation){n(e,i.sibling),i=o(i,a.children||[],u),i.return=e,e=i;break e}n(e,i);break}t(e,i),i=i.sibling}i=rt(a,e.mode,u),i.return=e,e=i}return s(e)}if("string"===typeof a||"number"===typeof a)return a=""+a,null!==i&&6===i.tag?(n(e,i.sibling),i=o(i,a,u),i.return=e,e=i):(n(e,i),i=nt(a,e.mode,u),i.return=e,e=i),s(e);if(gi(a))return m(e,i,a,u);if(re(a))return g(e,i,a,u);if(c&&vt(e,a),"undefined"===typeof a)switch(e.tag){case 2:case 1:u=e.type,r("152",u.displayName||u.name||"Component")}return n(e,i)}}function bt(e,t,n,i,o,a,s){function u(e,t,n){c(e,t,n,t.expirationTime)}function c(e,t,n,r){t.child=null===e?yi(t,null,n,r):vi(t,e.child,n,r)}function l(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.effectTag|=128)}function f(e,t,n,r,i,o){if(l(e,t),!n&&!i)return r&&M(t,!1),m(e,t);n=t.stateNode,ar.current=t;var a=i?null:n.render();return t.effectTag|=1,i&&(c(e,t,null,o),t.child=null),c(e,t,a,o),t.memoizedState=n.state,t.memoizedProps=n.props,r&&M(t,!0),t.child}function p(e){var t=e.stateNode;t.pendingContext?S(e,t.pendingContext,t.pendingContext!==t.context):t.context&&S(e,t.context,!1),b(e,t.containerInfo)}function h(e,t,n,r){var i=e.child;for(null!==i&&(i.return=e);null!==i;){switch(i.tag){case 12:var o=0|i.stateNode;if(i.type===t&&0!==(o&n)){for(o=i;null!==o;){var a=o.alternate;if(0===o.expirationTime||o.expirationTime>r)o.expirationTime=r,null!==a&&(0===a.expirationTime||a.expirationTime>r)&&(a.expirationTime=r);else{if(null===a||!(0===a.expirationTime||a.expirationTime>r))break;a.expirationTime=r}o=o.return}o=null}else o=i.child;break;case 13:o=i.type===e.type?null:i.child;break;default:o=i.child}if(null!==o)o.return=i;else for(o=i;null!==o;){if(o===e){o=null;break}if(null!==(i=o.sibling)){o=i;break}o=o.return}i=o}}function d(e,t,n){var r=t.type._context,i=t.pendingProps,o=t.memoizedProps;if(!E()&&o===i)return t.stateNode=0,x(t),m(e,t);var a=i.value;if(t.memoizedProps=i,null===o)a=1073741823;else if(o.value===i.value){if(o.children===i.children)return t.stateNode=0,x(t),m(e,t);a=0}else{var s=o.value;if(s===a&&(0!==s||1/s===1/a)||s!==s&&a!==a){if(o.children===i.children)return t.stateNode=0,x(t),m(e,t);a=0}else if(a="function"===typeof r._calculateChangedBits?r._calculateChangedBits(s,a):1073741823,0===(a|=0)){if(o.children===i.children)return t.stateNode=0,x(t),m(e,t)}else h(t,r,a,n)}return t.stateNode=a,x(t),u(e,t,i.children),t.child}function m(e,t){if(null!==e&&t.child!==e.child&&r("153"),null!==t.child){e=t.child;var n=Qe(e,e.pendingProps,e.expirationTime);for(t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,n=n.sibling=Qe(e,e.pendingProps,e.expirationTime),n.return=t;n.sibling=null}return t.child}var g=e.shouldSetTextContent,v=e.shouldDeprioritizeSubtree,y=t.pushHostContext,b=t.pushHostContainer,x=i.pushProvider,w=n.getMaskedContext,N=n.getUnmaskedContext,E=n.hasContextChanged,C=n.pushContextProvider,S=n.pushTopLevelContextObject,M=n.invalidateContextProvider,T=o.enterHydrationState,O=o.resetHydrationState,k=o.tryToClaimNextHydratableInstance;e=mt(n,a,s,function(e,t){e.memoizedProps=t},function(e,t){e.memoizedState=t});var A=e.adoptClassInstance,_=e.callGetDerivedStateFromProps,P=e.constructClassInstance,R=e.mountClassInstance,I=e.resumeMountClassInstance,F=e.updateClassInstance;return{beginWork:function(e,t,n){if(0===t.expirationTime||t.expirationTime>n){switch(t.tag){case 3:p(t);break;case 2:C(t);break;case 4:b(t,t.stateNode.containerInfo);break;case 13:x(t)}return null}switch(t.tag){case 0:null!==e&&r("155");var i=t.type,o=t.pendingProps,a=N(t);return a=w(t,a),i=i(o,a),t.effectTag|=1,"object"===typeof i&&null!==i&&"function"===typeof i.render&&void 0===i.$$typeof?(a=t.type,t.tag=2,t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,"function"===typeof a.getDerivedStateFromProps&&null!==(o=_(t,i,o,t.memoizedState))&&void 0!==o&&(t.memoizedState=pn({},t.memoizedState,o)),o=C(t),A(t,i),R(t,n),e=f(e,t,!0,o,!1,n)):(t.tag=1,u(e,t,i),t.memoizedProps=o,e=t.child),e;case 1:return o=t.type,n=t.pendingProps,E()||t.memoizedProps!==n?(i=N(t),i=w(t,i),o=o(n,i),t.effectTag|=1,u(e,t,o),t.memoizedProps=n,e=t.child):e=m(e,t),e;case 2:o=C(t),null===e?null===t.stateNode?(P(t,t.pendingProps),R(t,n),i=!0):i=I(t,n):i=F(e,t,n),a=!1;var s=t.updateQueue;return null!==s&&null!==s.capturedValues&&(a=i=!0),f(e,t,i,o,a,n);case 3:e:if(p(t),null!==(i=t.updateQueue)){if(a=t.memoizedState,o=ht(e,t,i,null,null,n),t.memoizedState=o,null!==(i=t.updateQueue)&&null!==i.capturedValues)i=null;else{if(a===o){O(),e=m(e,t);break e}i=o.element}a=t.stateNode,(null===e||null===e.child)&&a.hydrate&&T(t)?(t.effectTag|=2,t.child=yi(t,null,i,n)):(O(),u(e,t,i)),t.memoizedState=o,e=t.child}else O(),e=m(e,t);return e;case 5:return y(t),null===e&&k(t),o=t.type,s=t.memoizedProps,i=t.pendingProps,a=null!==e?e.memoizedProps:null,E()||s!==i||((s=1&t.mode&&v(o,i))&&(t.expirationTime=1073741823),s&&1073741823===n)?(s=i.children,g(o,i)?s=null:a&&g(o,a)&&(t.effectTag|=16),l(e,t),1073741823!==n&&1&t.mode&&v(o,i)?(t.expirationTime=1073741823,t.memoizedProps=i,e=null):(u(e,t,s),t.memoizedProps=i,e=t.child)):e=m(e,t),e;case 6:return null===e&&k(t),t.memoizedProps=t.pendingProps,null;case 8:t.tag=7;case 7:return o=t.pendingProps,E()||t.memoizedProps!==o||(o=t.memoizedProps),i=o.children,t.stateNode=null===e?yi(t,t.stateNode,i,n):vi(t,e.stateNode,i,n),t.memoizedProps=o,t.stateNode;case 9:return null;case 4:return b(t,t.stateNode.containerInfo),o=t.pendingProps,E()||t.memoizedProps!==o?(null===e?t.child=vi(t,null,o,n):u(e,t,o),t.memoizedProps=o,e=t.child):e=m(e,t),e;case 14:return n=t.type.render,n=n(t.pendingProps,t.ref),u(e,t,n),t.memoizedProps=n,t.child;case 10:return n=t.pendingProps,E()||t.memoizedProps!==n?(u(e,t,n),t.memoizedProps=n,e=t.child):e=m(e,t),e;case 11:return n=t.pendingProps.children,E()||null!==n&&t.memoizedProps!==n?(u(e,t,n),t.memoizedProps=n,e=t.child):e=m(e,t),e;case 13:return d(e,t,n);case 12:e:{i=t.type,a=t.pendingProps,s=t.memoizedProps,o=i._currentValue;var c=i._changedBits;if(E()||0!==c||s!==a){t.memoizedProps=a;var S=a.unstable_observedBits;if(void 0!==S&&null!==S||(S=1073741823),t.stateNode=S,0!==(c&S))h(t,i,c,n);else if(s===a){e=m(e,t);break e}n=a.children,n=n(o),u(e,t,n),e=t.child}else e=m(e,t)}return e;default:r("156")}}}}function xt(e,t,n,i,o){function a(e){e.effectTag|=4}var s=e.createInstance,u=e.createTextInstance,c=e.appendInitialChild,l=e.finalizeInitialChildren,f=e.prepareUpdate,p=e.persistence,h=t.getRootHostContainer,d=t.popHostContext,m=t.getHostContext,g=t.popHostContainer,v=n.popContextProvider,y=n.popTopLevelContextObject,b=i.popProvider,x=o.prepareToHydrateHostInstance,w=o.prepareToHydrateHostTextInstance,N=o.popHydrationState,E=void 0,C=void 0,S=void 0;return e.mutation?(E=function(){},C=function(e,t,n){(t.updateQueue=n)&&a(t)},S=function(e,t,n,r){n!==r&&a(t)}):r(p?"235":"236"),{completeWork:function(e,t,n){var i=t.pendingProps;switch(t.tag){case 1:return null;case 2:return v(t),e=t.stateNode,i=t.updateQueue,null!==i&&null!==i.capturedValues&&(t.effectTag&=-65,"function"===typeof e.componentDidCatch?t.effectTag|=256:i.capturedValues=null),null;case 3:return g(t),y(t),i=t.stateNode,i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),null!==e&&null!==e.child||(N(t),t.effectTag&=-3),E(t),e=t.updateQueue,null!==e&&null!==e.capturedValues&&(t.effectTag|=256),null;case 5:d(t),n=h();var o=t.type;if(null!==e&&null!=t.stateNode){var p=e.memoizedProps,M=t.stateNode,T=m();M=f(M,o,p,i,n,T),C(e,t,M,o,p,i,n,T),e.ref!==t.ref&&(t.effectTag|=128)}else{if(!i)return null===t.stateNode&&r("166"),null;if(e=m(),N(t))x(t,n,e)&&a(t);else{p=s(o,i,n,e,t);e:for(T=t.child;null!==T;){if(5===T.tag||6===T.tag)c(p,T.stateNode);else if(4!==T.tag&&null!==T.child){T.child.return=T,T=T.child;continue}if(T===t)break;for(;null===T.sibling;){if(null===T.return||T.return===t)break e;T=T.return}T.sibling.return=T.return,T=T.sibling}l(p,o,i,n,e)&&a(t),t.stateNode=p}null!==t.ref&&(t.effectTag|=128)}return null;case 6:if(e&&null!=t.stateNode)S(e,t,e.memoizedProps,i);else{if("string"!==typeof i)return null===t.stateNode&&r("166"),null;e=h(),n=m(),N(t)?w(t)&&a(t):t.stateNode=u(i,e,n,t)}return null;case 7:(i=t.memoizedProps)||r("165"),t.tag=8,o=[];e:for((p=t.stateNode)&&(p.return=t);null!==p;){if(5===p.tag||6===p.tag||4===p.tag)r("247");else if(9===p.tag)o.push(p.pendingProps.value);else if(null!==p.child){p.child.return=p,p=p.child;continue}for(;null===p.sibling;){if(null===p.return||p.return===t)break e;p=p.return}p.sibling.return=p.return,p=p.sibling}return p=i.handler,i=p(i.props,o),t.child=vi(t,null!==e?e.child:null,i,n),t.child;case 8:return t.tag=7,null;case 9:case 14:case 10:case 11:return null;case 4:return g(t),E(t),null;case 13:return b(t),null;case 12:return null;case 0:r("167");default:r("156")}}}}function wt(e,t,n,r,i){var o=e.popHostContainer,a=e.popHostContext,s=t.popContextProvider,u=t.popTopLevelContextObject,c=n.popProvider;return{throwException:function(e,t,n){t.effectTag|=512,t.firstEffect=t.lastEffect=null,t={value:n,source:t,stack:oe(t)};do{switch(e.tag){case 3:return lt(e),e.updateQueue.capturedValues=[t],void(e.effectTag|=1024);case 2:if(n=e.stateNode,0===(64&e.effectTag)&&null!==n&&"function"===typeof n.componentDidCatch&&!i(n)){lt(e),n=e.updateQueue;var r=n.capturedValues;return null===r?n.capturedValues=[t]:r.push(t),void(e.effectTag|=1024)}}e=e.return}while(null!==e)},unwindWork:function(e){switch(e.tag){case 2:s(e);var t=e.effectTag;return 1024&t?(e.effectTag=-1025&t|64,e):null;case 3:return o(e),u(e),t=e.effectTag,1024&t?(e.effectTag=-1025&t|64,e):null;case 5:return a(e),null;case 4:return o(e),null;case 13:return c(e),null;default:return null}},unwindInterruptedWork:function(e){switch(e.tag){case 2:s(e);break;case 3:o(e),u(e);break;case 5:a(e);break;case 4:o(e);break;case 13:c(e)}}}}function Nt(e,t){var n=t.source;null===t.stack&&oe(n),null!==n&&ie(n),t=t.value,null!==e&&2===e.tag&&ie(e);try{t&&t.suppressReactErrorLogging||console.error(t)}catch(e){e&&e.suppressReactErrorLogging||console.error(e)}}function Et(e,t,n,i,o){function a(e){var n=e.ref;if(null!==n)if("function"===typeof n)try{n(null)}catch(n){t(e,n)}else n.current=null}function s(e){switch("function"===typeof st&&st(e),e.tag){case 2:a(e);var n=e.stateNode;if("function"===typeof n.componentWillUnmount)try{n.props=e.memoizedProps,n.state=e.memoizedState,n.componentWillUnmount()}catch(n){t(e,n)}break;case 5:a(e);break;case 7:u(e.stateNode);break;case 4:p&&l(e)}}function u(e){for(var t=e;;)if(s(t),null===t.child||p&&4===t.tag){if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return;t=t.return}t.sibling.return=t.return,t=t.sibling}else t.child.return=t,t=t.child}function c(e){return 5===e.tag||3===e.tag||4===e.tag}function l(e){for(var t=e,n=!1,i=void 0,o=void 0;;){if(!n){n=t.return;e:for(;;){switch(null===n&&r("160"),n.tag){case 5:i=n.stateNode,o=!1;break e;case 3:case 4:i=n.stateNode.containerInfo,o=!0;break e}n=n.return}n=!0}if(5===t.tag||6===t.tag)u(t),o?N(i,t.stateNode):w(i,t.stateNode);else if(4===t.tag?i=t.stateNode.containerInfo:s(t),null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return;t=t.return,4===t.tag&&(n=!1)}t.sibling.return=t.return,t=t.sibling}}var f=e.getPublicInstance,p=e.mutation;e=e.persistence,p||r(e?"235":"236");var h=p.commitMount,d=p.commitUpdate,m=p.resetTextContent,g=p.commitTextUpdate,v=p.appendChild,y=p.appendChildToContainer,b=p.insertBefore,x=p.insertInContainerBefore,w=p.removeChild,N=p.removeChildFromContainer;return{commitBeforeMutationLifeCycles:function(e,t){switch(t.tag){case 2:if(2048&t.effectTag&&null!==e){var n=e.memoizedProps,i=e.memoizedState;e=t.stateNode,e.props=t.memoizedProps,e.state=t.memoizedState,t=e.getSnapshotBeforeUpdate(n,i),e.__reactInternalSnapshotBeforeUpdate=t}break;case 3:case 5:case 6:case 4:break;default:r("163")}},commitResetTextContent:function(e){m(e.stateNode)},commitPlacement:function(e){e:{for(var t=e.return;null!==t;){if(c(t)){var n=t;break e}t=t.return}r("160"),n=void 0}var i=t=void 0;switch(n.tag){case 5:t=n.stateNode,i=!1;break;case 3:case 4:t=n.stateNode.containerInfo,i=!0;break;default:r("161")}16&n.effectTag&&(m(t),n.effectTag&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||c(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag;){if(2&n.effectTag)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.effectTag)){n=n.stateNode;break e}}for(var o=e;;){if(5===o.tag||6===o.tag)n?i?x(t,o.stateNode,n):b(t,o.stateNode,n):i?y(t,o.stateNode):v(t,o.stateNode);else if(4!==o.tag&&null!==o.child){o.child.return=o,o=o.child;continue}if(o===e)break;for(;null===o.sibling;){if(null===o.return||o.return===e)return;o=o.return}o.sibling.return=o.return,o=o.sibling}},commitDeletion:function(e){l(e),e.return=null,e.child=null,e.alternate&&(e.alternate.child=null,e.alternate.return=null)},commitWork:function(e,t){switch(t.tag){case 2:break;case 5:var n=t.stateNode;if(null!=n){var i=t.memoizedProps;e=null!==e?e.memoizedProps:i;var o=t.type,a=t.updateQueue;t.updateQueue=null,null!==a&&d(n,a,o,e,i,t)}break;case 6:null===t.stateNode&&r("162"),n=t.memoizedProps,g(t.stateNode,null!==e?e.memoizedProps:n,n);break;case 3:break;default:r("163")}},commitLifeCycles:function(e,t,n){switch(n.tag){case 2:if(e=n.stateNode,4&n.effectTag)if(null===t)e.props=n.memoizedProps,e.state=n.memoizedState,e.componentDidMount();else{var i=t.memoizedProps;t=t.memoizedState,e.props=n.memoizedProps,e.state=n.memoizedState,e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}n=n.updateQueue,null!==n&&dt(n,e);break;case 3:if(null!==(t=n.updateQueue)){if(e=null,null!==n.child)switch(n.child.tag){case 5:e=f(n.child.stateNode);break;case 2:e=n.child.stateNode}dt(t,e)}break;case 5:e=n.stateNode,null===t&&4&n.effectTag&&h(e,n.type,n.memoizedProps,n);break;case 6:case 4:break;default:r("163")}},commitErrorLogging:function(e,t){switch(e.tag){case 2:var n=e.type;t=e.stateNode;var i=e.updateQueue;(null===i||null===i.capturedValues)&&r("264");var a=i.capturedValues;for(i.capturedValues=null,"function"!==typeof n.getDerivedStateFromCatch&&o(t),t.props=e.memoizedProps,t.state=e.memoizedState,n=0;n<a.length;n++){i=a[n];var s=i.value,u=i.stack;Nt(e,i),t.componentDidCatch(s,{componentStack:null!==u?u:""})}break;case 3:for(n=e.updateQueue,(null===n||null===n.capturedValues)&&r("264"),a=n.capturedValues,n.capturedValues=null,n=0;n<a.length;n++)i=a[n],Nt(e,i),t(i.value);break;default:r("265")}},commitAttachRef:function(e){var t=e.ref;if(null!==t){var n=e.stateNode;switch(e.tag){case 5:e=f(n);break;default:e=n}"function"===typeof t?t(e):t.current=e}},commitDetachRef:function(e){null!==(e=e.ref)&&("function"===typeof e?e(null):e.current=null)}}}function Ct(e,t){function n(e){return e===bi&&r("174"),e}var i=e.getChildHostContext,o=e.getRootHostContext;e=t.createCursor;var a=t.push,s=t.pop,u=e(bi),c=e(bi),l=e(bi);return{getHostContext:function(){return n(u.current)},getRootHostContainer:function(){return n(l.current)},popHostContainer:function(e){s(u,e),s(c,e),s(l,e)},popHostContext:function(e){c.current===e&&(s(u,e),s(c,e))},pushHostContainer:function(e,t){a(l,t,e),a(c,e,e),a(u,bi,e),t=o(t),s(u,e),a(u,t,e)},pushHostContext:function(e){var t=n(l.current),r=n(u.current);t=i(r,e.type,t),r!==t&&(a(c,e,e),a(u,t,e))}}}function St(e){function t(e,t){var n=new Je(5,null,null,0);n.type="DELETED",n.stateNode=t,n.return=e,n.effectTag=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function n(e,t){switch(e.tag){case 5:return null!==(t=a(t,e.type,e.pendingProps))&&(e.stateNode=t,!0);case 6:return null!==(t=s(t,e.pendingProps))&&(e.stateNode=t,!0);default:return!1}}function i(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag;)e=e.return;p=e}var o=e.shouldSetTextContent;if(!(e=e.hydration))return{enterHydrationState:function(){return!1},resetHydrationState:function(){},tryToClaimNextHydratableInstance:function(){},prepareToHydrateHostInstance:function(){r("175")},prepareToHydrateHostTextInstance:function(){r("176")},popHydrationState:function(){return!1}};var a=e.canHydrateInstance,s=e.canHydrateTextInstance,u=e.getNextHydratableSibling,c=e.getFirstHydratableChild,l=e.hydrateInstance,f=e.hydrateTextInstance,p=null,h=null,d=!1;return{enterHydrationState:function(e){return h=c(e.stateNode.containerInfo),p=e,d=!0},resetHydrationState:function(){h=p=null,d=!1},tryToClaimNextHydratableInstance:function(e){if(d){var r=h;if(r){if(!n(e,r)){if(!(r=u(r))||!n(e,r))return e.effectTag|=2,d=!1,void(p=e);t(p,h)}p=e,h=c(r)}else e.effectTag|=2,d=!1,p=e}},prepareToHydrateHostInstance:function(e,t,n){return t=l(e.stateNode,e.type,e.memoizedProps,t,n,e),e.updateQueue=t,null!==t},prepareToHydrateHostTextInstance:function(e){return f(e.stateNode,e.memoizedProps,e)},popHydrationState:function(e){if(e!==p)return!1;if(!d)return i(e),d=!0,!1;var n=e.type;if(5!==e.tag||"head"!==n&&"body"!==n&&!o(n,e.memoizedProps))for(n=h;n;)t(e,n),n=u(n);return i(e),h=p?u(e.stateNode):null,!0}}}function Mt(e){function t(e,t,n){e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=n}function n(e){return 2===e.tag&&null!=e.type.childContextTypes}function i(e,t){var n=e.stateNode,i=e.type.childContextTypes;if("function"!==typeof n.getChildContext)return t;n=n.getChildContext();for(var o in n)o in i||r("108",ie(e)||"Unknown",o);return pn({},t,n)}var o=e.createCursor,a=e.push,s=e.pop,u=o(vn),c=o(!1),l=vn;return{getUnmaskedContext:function(e){return n(e)?l:u.current},cacheContext:t,getMaskedContext:function(e,n){var r=e.type.contextTypes;if(!r)return vn;var i=e.stateNode;if(i&&i.__reactInternalMemoizedUnmaskedChildContext===n)return i.__reactInternalMemoizedMaskedChildContext;var o,a={};for(o in r)a[o]=n[o];return i&&t(e,n,a),a},hasContextChanged:function(){return c.current},isContextConsumer:function(e){return 2===e.tag&&null!=e.type.contextTypes},isContextProvider:n,popContextProvider:function(e){n(e)&&(s(c,e),s(u,e))},popTopLevelContextObject:function(e){s(c,e),s(u,e)},pushTopLevelContextObject:function(e,t,n){null!=u.cursor&&r("168"),a(u,t,e),a(c,n,e)},processChildContext:i,pushContextProvider:function(e){if(!n(e))return!1;var t=e.stateNode;return t=t&&t.__reactInternalMemoizedMergedChildContext||vn,l=u.current,a(u,t,e),a(c,c.current,e),!0},invalidateContextProvider:function(e,t){var n=e.stateNode;if(n||r("169"),t){var o=i(e,l);n.__reactInternalMemoizedMergedChildContext=o,s(c,e),s(u,e),a(u,o,e)}else s(c,e);a(c,t,e)},findCurrentUnmaskedContext:function(e){for(2!==_e(e)||2!==e.tag?r("170"):void 0;3!==e.tag;){if(n(e))return e.stateNode.__reactInternalMemoizedMergedChildContext;(e=e.return)||r("171")}return e.stateNode.context}}}function Tt(e){var t=e.createCursor,n=e.push,r=e.pop,i=t(null),o=t(null),a=t(0);return{pushProvider:function(e){var t=e.type._context;n(a,t._changedBits,e),n(o,t._currentValue,e),n(i,e,e),t._currentValue=e.pendingProps.value,t._changedBits=e.stateNode},popProvider:function(e){var t=a.current,n=o.current;r(i,e),r(o,e),r(a,e),e=e.type._context,e._currentValue=n,e._changedBits=t}}}function Ot(){var e=[],t=-1;return{createCursor:function(e){return{current:e}},isEmpty:function(){return-1===t},pop:function(n){0>t||(n.current=e[t],e[t]=null,t--)},push:function(n,r){t++,e[t]=n.current,n.current=r},checkThatStackIsEmpty:function(){},resetStackAfterFatalErrorInDev:function(){}}}function kt(e){function t(){if(null!==Q)for(var e=Q.return;null!==e;)P(e),e=e.return;ee=null,te=0,Q=null,ie=!1}function n(e){return null!==ae&&ae.has(e)}function i(e){for(;;){var t=e.alternate,n=e.return,r=e.sibling;if(0===(512&e.effectTag)){t=k(t,e,te);var i=e;if(1073741823===te||1073741823!==i.expirationTime){e:switch(i.tag){case 3:case 2:var o=i.updateQueue;o=null===o?0:o.expirationTime;break e;default:o=0}for(var a=i.child;null!==a;)0!==a.expirationTime&&(0===o||o>a.expirationTime)&&(o=a.expirationTime),a=a.sibling;i.expirationTime=o}if(null!==t)return t;if(null!==n&&0===(512&n.effectTag)&&(null===n.firstEffect&&(n.firstEffect=e.firstEffect),null!==e.lastEffect&&(null!==n.lastEffect&&(n.lastEffect.nextEffect=e.firstEffect),n.lastEffect=e.lastEffect),1<e.effectTag&&(null!==n.lastEffect?n.lastEffect.nextEffect=e:n.firstEffect=e,n.lastEffect=e)),null!==r)return r;if(null===n){ie=!0;break}e=n}else{if(null!==(e=_(e)))return e.effectTag&=2559,e;if(null!==n&&(n.firstEffect=n.lastEffect=null,n.effectTag|=512),null!==r)return r;if(null===n)break;e=n}}return null}function o(e){var t=O(e.alternate,e,te);return null===t&&(t=i(e)),ar.current=null,t}function a(e,n,a){J&&r("243"),J=!0,n===te&&e===ee&&null!==Q||(t(),ee=e,te=n,Q=Qe(ee.current,null,te),e.pendingCommitExpirationTime=0);for(var s=!1;;){try{if(a)for(;null!==Q&&!N();)Q=o(Q);else for(;null!==Q;)Q=o(Q)}catch(e){if(null===Q){s=!0,E(e);break}a=Q;var u=a.return;if(null===u){s=!0,E(e);break}A(u,a,e),Q=i(a)}break}return J=!1,s||null!==Q?null:ie?(e.pendingCommitExpirationTime=n,e.current.alternate):void r("262")}function s(e,t,n,r){e={value:n,source:e,stack:oe(e)},ft(t,{expirationTime:r,partialState:null,callback:null,isReplace:!1,isForced:!1,capturedValue:e,next:null}),l(t,r)}function u(e,t){e:{J&&!re&&r("263");for(var i=e.return;null!==i;){switch(i.tag){case 2:var o=i.stateNode;if("function"===typeof i.type.getDerivedStateFromCatch||"function"===typeof o.componentDidCatch&&!n(o)){s(e,i,t,1),e=void 0;break e}break;case 3:s(e,i,t,1),e=void 0;break e}i=i.return}3===e.tag&&s(e,e,t,1),e=void 0}return e}function c(e){return e=0!==Z?Z:J?re?1:te:1&e.mode?we?10*(1+((f()+15)/10|0)):25*(1+((f()+500)/25|0)):1,we&&(0===de||e>de)&&(de=e),e}function l(e,n){e:{for(;null!==e;){if((0===e.expirationTime||e.expirationTime>n)&&(e.expirationTime=n),null!==e.alternate&&(0===e.alternate.expirationTime||e.alternate.expirationTime>n)&&(e.alternate.expirationTime=n),null===e.return){if(3!==e.tag){n=void 0;break e}var i=e.stateNode;!J&&0!==te&&n<te&&t(),J&&!re&&ee===i||d(i,n),Ce>Ee&&r("185")}e=e.return}n=void 0}return n}function f(){return X=q()-$,Y=2+(X/10|0)}function p(e,t,n,r,i){var o=Z;Z=1;try{return e(t,n,r,i)}finally{Z=o}}function h(e){if(0!==ce){if(e>ce)return;W(le)}var t=q()-$;ce=e,le=H(g,{timeout:10*(e-2)-t})}function d(e,t){if(null===e.nextScheduledRoot)e.remainingExpirationTime=t,null===ue?(se=ue=e,e.nextScheduledRoot=e):(ue=ue.nextScheduledRoot=e,ue.nextScheduledRoot=se);else{var n=e.remainingExpirationTime;(0===n||t<n)&&(e.remainingExpirationTime=t)}fe||(be?xe&&(pe=e,he=1,x(e,1,!1)):1===t?v():h(t))}function m(){var e=0,t=null;if(null!==ue)for(var n=ue,i=se;null!==i;){var o=i.remainingExpirationTime;if(0===o){if((null===n||null===ue)&&r("244"),i===i.nextScheduledRoot){se=ue=i.nextScheduledRoot=null;break}if(i===se)se=o=i.nextScheduledRoot,ue.nextScheduledRoot=o,i.nextScheduledRoot=null;else{if(i===ue){ue=n,ue.nextScheduledRoot=se,i.nextScheduledRoot=null;break}n.nextScheduledRoot=i.nextScheduledRoot,i.nextScheduledRoot=null}i=n.nextScheduledRoot}else{if((0===e||o<e)&&(e=o,t=i),i===ue)break;n=i,i=i.nextScheduledRoot}}n=pe,null!==n&&n===t&&1===e?Ce++:Ce=0,pe=t,he=e}function g(e){y(0,!0,e)}function v(){y(1,!1,null)}function y(e,t,n){if(ye=n,m(),t)for(;null!==pe&&0!==he&&(0===e||e>=he)&&(!me||f()>=he);)x(pe,he,!me),m();else for(;null!==pe&&0!==he&&(0===e||e>=he);)x(pe,he,!1),m();null!==ye&&(ce=0,le=-1),0!==he&&h(he),ye=null,me=!1,b()}function b(){if(Ce=0,null!==Ne){var e=Ne;Ne=null;for(var t=0;t<e.length;t++){var n=e[t];try{n._onComplete()}catch(e){ge||(ge=!0,ve=e)}}}if(ge)throw e=ve,ve=null,ge=!1,e}function x(e,t,n){fe&&r("245"),fe=!0,n?(n=e.finishedWork,null!==n?w(e,n,t):(e.finishedWork=null,null!==(n=a(e,t,!0))&&(N()?e.finishedWork=n:w(e,n,t)))):(n=e.finishedWork,null!==n?w(e,n,t):(e.finishedWork=null,null!==(n=a(e,t,!1))&&w(e,n,t))),fe=!1}function w(e,t,n){var i=e.firstBatch;if(null!==i&&i._expirationTime<=n&&(null===Ne?Ne=[i]:Ne.push(i),i._defer))return e.finishedWork=t,void(e.remainingExpirationTime=0);e.finishedWork=null,re=J=!0,n=t.stateNode,n.current===t&&r("177"),i=n.pendingCommitExpirationTime,0===i&&r("261"),n.pendingCommitExpirationTime=0;var o=f();if(ar.current=null,1<t.effectTag)if(null!==t.lastEffect){t.lastEffect.nextEffect=t;var a=t.firstEffect}else a=t;else a=t.firstEffect;for(V(n.containerInfo),ne=a;null!==ne;){var s=!1,c=void 0;try{for(;null!==ne;)2048&ne.effectTag&&R(ne.alternate,ne),ne=ne.nextEffect}catch(e){s=!0,c=e}s&&(null===ne&&r("178"),u(ne,c),null!==ne&&(ne=ne.nextEffect))}for(ne=a;null!==ne;){s=!1,c=void 0;try{for(;null!==ne;){var l=ne.effectTag;if(16&l&&I(ne),128&l){var p=ne.alternate;null!==p&&U(p)}switch(14&l){case 2:F(ne),ne.effectTag&=-3;break;case 6:F(ne),ne.effectTag&=-3,L(ne.alternate,ne);break;case 4:L(ne.alternate,ne);break;case 8:D(ne)}ne=ne.nextEffect}}catch(e){s=!0,c=e}s&&(null===ne&&r("178"),u(ne,c),null!==ne&&(ne=ne.nextEffect))}for(G(n.containerInfo),n.current=t,ne=a;null!==ne;){l=!1,p=void 0;try{for(a=n,s=o,c=i;null!==ne;){var h=ne.effectTag;36&h&&B(a,ne.alternate,ne,s,c),256&h&&z(ne,E),128&h&&j(ne);var d=ne.nextEffect;ne.nextEffect=null,ne=d}}catch(e){l=!0,p=e}l&&(null===ne&&r("178"),u(ne,p),null!==ne&&(ne=ne.nextEffect))}J=re=!1,"function"===typeof at&&at(t.stateNode),t=n.current.expirationTime,0===t&&(ae=null),e.remainingExpirationTime=t}function N(){return!(null===ye||ye.timeRemaining()>Se)&&(me=!0)}function E(e){null===pe&&r("246"),pe.remainingExpirationTime=0,ge||(ge=!0,ve=e)}var C=Ot(),S=Ct(e,C),M=Mt(C);C=Tt(C);var T=St(e),O=bt(e,S,M,C,T,l,c).beginWork,k=xt(e,S,M,C,T).completeWork;S=wt(S,M,C,l,n);var A=S.throwException,_=S.unwindWork,P=S.unwindInterruptedWork;S=Et(e,u,l,c,function(e){null===ae?ae=new Set([e]):ae.add(e)},f);var R=S.commitBeforeMutationLifeCycles,I=S.commitResetTextContent,F=S.commitPlacement,D=S.commitDeletion,L=S.commitWork,B=S.commitLifeCycles,z=S.commitErrorLogging,j=S.commitAttachRef,U=S.commitDetachRef,q=e.now,H=e.scheduleDeferredCallback,W=e.cancelDeferredCallback,V=e.prepareForCommit,G=e.resetAfterCommit,$=q(),Y=2,X=$,K=0,Z=0,J=!1,Q=null,ee=null,te=0,ne=null,re=!1,ie=!1,ae=null,se=null,ue=null,ce=0,le=-1,fe=!1,pe=null,he=0,de=0,me=!1,ge=!1,ve=null,ye=null,be=!1,xe=!1,we=!1,Ne=null,Ee=1e3,Ce=0,Se=1;return{recalculateCurrentTime:f,computeExpirationForFiber:c,scheduleWork:l,requestWork:d,flushRoot:function(e,t){fe&&r("253"),pe=e,he=t,x(e,t,!1),v(),b()},batchedUpdates:function(e,t){var n=be;be=!0;try{return e(t)}finally{(be=n)||fe||v()}},unbatchedUpdates:function(e,t){if(be&&!xe){xe=!0;try{return e(t)}finally{xe=!1}}return e(t)},flushSync:function(e,t){fe&&r("187");var n=be;be=!0;try{return p(e,t)}finally{be=n,v()}},flushControlled:function(e){var t=be;be=!0;try{p(e)}finally{(be=t)||fe||y(1,!1,null)}},deferredUpdates:function(e){var t=Z;Z=25*(1+((f()+500)/25|0));try{return e()}finally{Z=t}},syncUpdates:p,interactiveUpdates:function(e,t,n){if(we)return e(t,n);be||fe||0===de||(y(de,!1,null),de=0);var r=we,i=be;be=we=!0;try{return e(t,n)}finally{we=r,(be=i)||fe||v()}},flushInteractiveUpdates:function(){fe||0===de||(y(de,!1,null),de=0)},computeUniqueAsyncExpiration:function(){var e=25*(1+((f()+500)/25|0));return e<=K&&(e=K+1),K=e},legacyContext:M}}function At(e){function t(e,t,n,r,i,o){if(r=t.current,n){n=n._reactInternalFiber;var s=u(n);n=c(n)?l(n,s):s}else n=vn;return null===t.context?t.context=n:t.pendingContext=n,t=o,ft(r,{expirationTime:i,partialState:{element:e},callback:void 0===t?null:t,isReplace:!1,isForced:!1,capturedValue:null,next:null}),a(r,i),i}var n=e.getPublicInstance;e=kt(e);var i=e.recalculateCurrentTime,o=e.computeExpirationForFiber,a=e.scheduleWork,s=e.legacyContext,u=s.findCurrentUnmaskedContext,c=s.isContextProvider,l=s.processChildContext;return{createContainer:function(e,t,n){return t=new Je(3,null,null,t?3:0),e={current:t,containerInfo:e,pendingChildren:null,pendingCommitExpirationTime:0,finishedWork:null,context:null,pendingContext:null,hydrate:n,remainingExpirationTime:0,firstBatch:null,nextScheduledRoot:null},t.stateNode=e},updateContainer:function(e,n,r,a){var s=n.current,u=i();return s=o(s),t(e,n,r,u,s,a)},updateContainerAtExpirationTime:function(e,n,r,o,a){return t(e,n,r,i(),o,a)},flushRoot:e.flushRoot,requestWork:e.requestWork,computeUniqueAsyncExpiration:e.computeUniqueAsyncExpiration,batchedUpdates:e.batchedUpdates,unbatchedUpdates:e.unbatchedUpdates,deferredUpdates:e.deferredUpdates,syncUpdates:e.syncUpdates,interactiveUpdates:e.interactiveUpdates,flushInteractiveUpdates:e.flushInteractiveUpdates,flushControlled:e.flushControlled,flushSync:e.flushSync,getPublicRootInstance:function(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return n(e.child.stateNode);default:return e.child.stateNode}},findHostInstance:function(e){var t=e._reactInternalFiber;return void 0===t&&("function"===typeof e.render?r("188"):r("268",Object.keys(e))),e=Fe(t),null===e?null:e.stateNode},findHostInstanceWithNoPortals:function(e){return e=De(e),null===e?null:e.stateNode},injectIntoDevTools:function(e){var t=e.findFiberByHostInstance;return ot(pn({},e,{findHostInstanceByFiber:function(e){return e=Fe(e),null===e?null:e.stateNode},findFiberByHostInstance:function(e){return t?t(e):null}}))}}}function _t(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:fr,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}function Pt(e){var t="";return ln.Children.forEach(e,function(e){null==e||"string"!==typeof e&&"number"!==typeof e||(t+=e)}),t}function Rt(e,t){return e=pn({children:void 0},t),(t=Pt(t.children))&&(e.children=t),e}function It(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+n,t=null,i=0;i<e.length;i++){if(e[i].value===n)return e[i].selected=!0,void(r&&(e[i].defaultSelected=!0));null!==t||e[i].disabled||(t=e[i])}null!==t&&(t.selected=!0)}}function Ft(e,t){var n=t.value;e._wrapperState={initialValue:null!=n?n:t.defaultValue,wasMultiple:!!t.multiple}}function Dt(e,t){return null!=t.dangerouslySetInnerHTML&&r("91"),pn({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Lt(e,t){var n=t.value;null==n&&(n=t.defaultValue,t=t.children,null!=t&&(null!=n&&r("92"),Array.isArray(t)&&(1>=t.length||r("93"),t=t[0]),n=""+t),null==n&&(n="")),e._wrapperState={initialValue:""+n}}function Bt(e,t){var n=t.value;null!=n&&(n=""+n,n!==e.value&&(e.value=n),null==t.defaultValue&&(e.defaultValue=n)),null!=t.defaultValue&&(e.defaultValue=t.defaultValue)}function zt(e){var t=e.textContent;t===e._wrapperState.initialValue&&(e.value=t)}function jt(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Ut(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?jt(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}function qt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}function Ht(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=n,o=t[n];i=null==o||"boolean"===typeof o||""===o?"":r||"number"!==typeof o||0===o||ji.hasOwnProperty(i)&&ji[i]?(""+o).trim():o+"px","float"===n&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}function Wt(e,t,n){t&&(qi[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML)&&r("137",e,n()),null!=t.dangerouslySetInnerHTML&&(null!=t.children&&r("60"),"object"===typeof t.dangerouslySetInnerHTML&&"__html"in t.dangerouslySetInnerHTML||r("61")),null!=t.style&&"object"!==typeof t.style&&r("62",n()))}function Vt(e,t){if(-1===e.indexOf("-"))return"string"===typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function Gt(e,t){e=9===e.nodeType||11===e.nodeType?e:e.ownerDocument;var n=$e(e);t=Cn[t];for(var r=0;r<t.length;r++){var i=t[r];n.hasOwnProperty(i)&&n[i]||("topScroll"===i?qe("topScroll","scroll",e):"topFocus"===i||"topBlur"===i?(qe("topFocus","focus",e),qe("topBlur","blur",e),n.topBlur=!0,n.topFocus=!0):"topCancel"===i?(J("cancel",!0)&&qe("topCancel","cancel",e),n.topCancel=!0):"topClose"===i?(J("close",!0)&&qe("topClose","close",e),n.topClose=!0):ei.hasOwnProperty(i)&&Ue(i,ei[i],e),n[i]=!0)}}function $t(e,t,n,r){return n=9===n.nodeType?n:n.ownerDocument,r===Li.html&&(r=jt(e)),r===Li.html?"script"===e?(e=n.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):e="string"===typeof t.is?n.createElement(e,{is:t.is}):n.createElement(e):e=n.createElementNS(r,e),e}function Yt(e,t){return(9===t.nodeType?t:t.ownerDocument).createTextNode(e)}function Xt(e,t,n,r){var i=Vt(t,n);switch(t){case"iframe":case"object":Ue("topLoad","load",e);var o=n;break;case"video":case"audio":for(o in ti)ti.hasOwnProperty(o)&&Ue(o,ti[o],e);o=n;break;case"source":Ue("topError","error",e),o=n;break;case"img":case"image":case"link":Ue("topError","error",e),Ue("topLoad","load",e),o=n;break;case"form":Ue("topReset","reset",e),Ue("topSubmit","submit",e),o=n;break;case"details":Ue("topToggle","toggle",e),o=n;break;case"input":he(e,n),o=pe(e,n),Ue("topInvalid","invalid",e),Gt(r,"onChange");break;case"option":o=Rt(e,n);break;case"select":Ft(e,n),o=pn({},n,{value:void 0}),Ue("topInvalid","invalid",e),Gt(r,"onChange");break;case"textarea":Lt(e,n),o=Dt(e,n),Ue("topInvalid","invalid",e),Gt(r,"onChange");break;default:o=n}Wt(t,o,Hi);var a,s=o;for(a in s)if(s.hasOwnProperty(a)){var u=s[a];"style"===a?Ht(e,u,Hi):"dangerouslySetInnerHTML"===a?null!=(u=u?u.__html:void 0)&&zi(e,u):"children"===a?"string"===typeof u?("textarea"!==t||""!==u)&&qt(e,u):"number"===typeof u&&qt(e,""+u):"suppressContentEditableWarning"!==a&&"suppressHydrationWarning"!==a&&"autoFocus"!==a&&(En.hasOwnProperty(a)?null!=u&&Gt(r,a):null!=u&&fe(e,a,u,i))}switch(t){case"input":te(e),ge(e,n);break;case"textarea":te(e),zt(e,n);break;case"option":null!=n.value&&e.setAttribute("value",n.value);break;case"select":e.multiple=!!n.multiple,t=n.value,null!=t?It(e,!!n.multiple,t,!1):null!=n.defaultValue&&It(e,!!n.multiple,n.defaultValue,!0);break;default:"function"===typeof o.onClick&&(e.onclick=hn)}}function Kt(e,t,n,r,i){var o=null;switch(t){case"input":n=pe(e,n),r=pe(e,r),o=[];break;case"option":n=Rt(e,n),r=Rt(e,r),o=[];break;case"select":n=pn({},n,{value:void 0}),r=pn({},r,{value:void 0}),o=[];break;case"textarea":n=Dt(e,n),r=Dt(e,r),o=[];break;default:"function"!==typeof n.onClick&&"function"===typeof r.onClick&&(e.onclick=hn)}Wt(t,r,Hi),t=e=void 0;var a=null;for(e in n)if(!r.hasOwnProperty(e)&&n.hasOwnProperty(e)&&null!=n[e])if("style"===e){var s=n[e];for(t in s)s.hasOwnProperty(t)&&(a||(a={}),a[t]="")}else"dangerouslySetInnerHTML"!==e&&"children"!==e&&"suppressContentEditableWarning"!==e&&"suppressHydrationWarning"!==e&&"autoFocus"!==e&&(En.hasOwnProperty(e)?o||(o=[]):(o=o||[]).push(e,null));for(e in r){var u=r[e];if(s=null!=n?n[e]:void 0,r.hasOwnProperty(e)&&u!==s&&(null!=u||null!=s))if("style"===e)if(s){for(t in s)!s.hasOwnProperty(t)||u&&u.hasOwnProperty(t)||(a||(a={}),a[t]="");for(t in u)u.hasOwnProperty(t)&&s[t]!==u[t]&&(a||(a={}),a[t]=u[t])}else a||(o||(o=[]),o.push(e,a)),a=u;else"dangerouslySetInnerHTML"===e?(u=u?u.__html:void 0,s=s?s.__html:void 0,null!=u&&s!==u&&(o=o||[]).push(e,""+u)):"children"===e?s===u||"string"!==typeof u&&"number"!==typeof u||(o=o||[]).push(e,""+u):"suppressContentEditableWarning"!==e&&"suppressHydrationWarning"!==e&&(En.hasOwnProperty(e)?(null!=u&&Gt(i,e),o||s===u||(o=[])):(o=o||[]).push(e,u))}return a&&(o=o||[]).push("style",a),o}function Zt(e,t,n,r,i){"input"===n&&"radio"===i.type&&null!=i.name&&de(e,i),Vt(n,r),r=Vt(n,i);for(var o=0;o<t.length;o+=2){var a=t[o],s=t[o+1];"style"===a?Ht(e,s,Hi):"dangerouslySetInnerHTML"===a?zi(e,s):"children"===a?qt(e,s):fe(e,a,s,r)}switch(n){case"input":me(e,i);break;case"textarea":Bt(e,i);break;case"select":e._wrapperState.initialValue=void 0,t=e._wrapperState.wasMultiple,e._wrapperState.wasMultiple=!!i.multiple,n=i.value,null!=n?It(e,!!i.multiple,n,!1):t!==!!i.multiple&&(null!=i.defaultValue?It(e,!!i.multiple,i.defaultValue,!0):It(e,!!i.multiple,i.multiple?[]:"",!1))}}function Jt(e,t,n,r,i){switch(t){case"iframe":case"object":Ue("topLoad","load",e);break;case"video":case"audio":for(var o in ti)ti.hasOwnProperty(o)&&Ue(o,ti[o],e);break;case"source":Ue("topError","error",e);break;case"img":case"image":case"link":Ue("topError","error",e),Ue("topLoad","load",e);break;case"form":Ue("topReset","reset",e),Ue("topSubmit","submit",e);break;case"details":Ue("topToggle","toggle",e);break;case"input":he(e,n),Ue("topInvalid","invalid",e),Gt(i,"onChange");break;case"select":Ft(e,n),Ue("topInvalid","invalid",e),Gt(i,"onChange");break;case"textarea":Lt(e,n),Ue("topInvalid","invalid",e),Gt(i,"onChange")}Wt(t,n,Hi),r=null;for(var a in n)n.hasOwnProperty(a)&&(o=n[a],"children"===a?"string"===typeof o?e.textContent!==o&&(r=["children",o]):"number"===typeof o&&e.textContent!==""+o&&(r=["children",""+o]):En.hasOwnProperty(a)&&null!=o&&Gt(i,a));switch(t){case"input":te(e),ge(e,n);break;case"textarea":te(e),zt(e,n);break;case"select":case"option":break;default:"function"===typeof n.onClick&&(e.onclick=hn)}return r}function Qt(e,t){return e.nodeValue!==t}function en(e){this._expirationTime=$i.computeUniqueAsyncExpiration(),this._root=e,this._callbacks=this._next=null,this._hasChildren=this._didComplete=!1,this._children=null,this._defer=!0}function tn(){this._callbacks=null,this._didCommit=!1,this._onCommit=this._onCommit.bind(this)}function nn(e,t,n){this._internalRoot=$i.createContainer(e,t,n)}function rn(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function on(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function an(e,t){if(t||(t=e?9===e.nodeType?e.documentElement:e.firstChild:null,t=!(!t||1!==t.nodeType||!t.hasAttribute("data-reactroot"))),!t)for(var n;n=e.lastChild;)e.removeChild(n);return new nn(e,!1,t)}function sn(e,t,n,i,o){rn(n)||r("200");var a=n._reactRootContainer;if(a){if("function"===typeof o){var s=o;o=function(){var e=$i.getPublicRootInstance(a._internalRoot);s.call(e)}}null!=e?a.legacy_renderSubtreeIntoContainer(e,t,o):a.render(t,o)}else{if(a=n._reactRootContainer=an(n,i),"function"===typeof o){var u=o;o=function(){var e=$i.getPublicRootInstance(a._internalRoot);u.call(e)}}$i.unbatchedUpdates(function(){null!=e?a.legacy_renderSubtreeIntoContainer(e,t,o):a.render(t,o)})}return $i.getPublicRootInstance(a._internalRoot)}function un(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;return rn(t)||r("200"),_t(e,t,null,n)}var cn=n(70),ln=n(7),fn=n(199),pn=n(69),hn=n(89),dn=n(200),mn=n(201),gn=n(202),vn=n(88);ln||r("227");var yn={_caughtError:null,_hasCaughtError:!1,_rethrowError:null,_hasRethrowError:!1,invokeGuardedCallback:function(e,t,n,r,o,a,s,u,c){i.apply(yn,arguments)},invokeGuardedCallbackAndCatchFirstError:function(e,t,n,r,i,o,a,s,u){if(yn.invokeGuardedCallback.apply(this,arguments),yn.hasCaughtError()){var c=yn.clearCaughtError();yn._hasRethrowError||(yn._hasRethrowError=!0,yn._rethrowError=c)}},rethrowCaughtError:function(){return o.apply(yn,arguments)},hasCaughtError:function(){return yn._hasCaughtError},clearCaughtError:function(){if(yn._hasCaughtError){var e=yn._caughtError;return yn._caughtError=null,yn._hasCaughtError=!1,e}r("198")}},bn=null,xn={},wn=[],Nn={},En={},Cn={},Sn=Object.freeze({plugins:wn,eventNameDispatchConfigs:Nn,registrationNameModules:En,registrationNameDependencies:Cn,possibleRegistrationNames:null,injectEventPluginOrder:u,injectEventPluginsByName:c}),Mn=null,Tn=null,On=null,kn=null,An={injectEventPluginOrder:u,injectEventPluginsByName:c},_n=Object.freeze({injection:An,getListener:g,runEventsInBatch:v,runExtractedEventsInBatch:y}),Pn=Math.random().toString(36).slice(2),Rn="__reactInternalInstance$"+Pn,In="__reactEventHandlers$"+Pn,Fn=Object.freeze({precacheFiberNode:function(e,t){t[Rn]=e},getClosestInstanceFromNode:b,getInstanceFromNode:function(e){return e=e[Rn],!e||5!==e.tag&&6!==e.tag?null:e},getNodeFromInstance:x,getFiberCurrentPropsFromNode:w,updateFiberProps:function(e,t){e[In]=t}}),Dn=Object.freeze({accumulateTwoPhaseDispatches:k,accumulateTwoPhaseDispatchesSkipTarget:function(e){p(e,M)},accumulateEnterLeaveDispatches:A,accumulateDirectDispatches:function(e){p(e,O)}}),Ln=null,Bn={_root:null,_startText:null,_fallbackText:null},zn="dispatchConfig _targetInst nativeEvent isDefaultPrevented isPropagationStopped _dispatchListeners _dispatchInstances".split(" "),jn={type:null,target:null,currentTarget:hn.thatReturnsNull,eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null};pn(I.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!==typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=hn.thatReturnsTrue)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!==typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=hn.thatReturnsTrue)},persist:function(){this.isPersistent=hn.thatReturnsTrue},isPersistent:hn.thatReturnsFalse,destructor:function(){var e,t=this.constructor.Interface;for(e in t)this[e]=null;for(t=0;t<zn.length;t++)this[zn[t]]=null}}),I.Interface=jn,I.extend=function(e){function t(){}function n(){return r.apply(this,arguments)}var r=this;t.prototype=r.prototype;var i=new t;return pn(i,n.prototype),n.prototype=i,n.prototype.constructor=n,n.Interface=pn({},r.Interface,e),n.extend=r.extend,L(n),n},L(I);var Un=I.extend({data:null}),qn=I.extend({data:null}),Hn=[9,13,27,32],Wn=fn.canUseDOM&&"CompositionEvent"in window,Vn=null;fn.canUseDOM&&"documentMode"in document&&(Vn=document.documentMode);var Gn=fn.canUseDOM&&"TextEvent"in window&&!Vn,$n=fn.canUseDOM&&(!Wn||Vn&&8<Vn&&11>=Vn),Yn=String.fromCharCode(32),Xn={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["topCompositionEnd","topKeyPress","topTextInput","topPaste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"topBlur topCompositionEnd topKeyDown topKeyPress topKeyUp topMouseDown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"topBlur topCompositionStart topKeyDown topKeyPress topKeyUp topMouseDown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"topBlur topCompositionUpdate topKeyDown topKeyPress topKeyUp topMouseDown".split(" ")}},Kn=!1,Zn=!1,Jn={eventTypes:Xn,extractEvents:function(e,t,n,r){var i=void 0,o=void 0;if(Wn)e:{switch(e){case"topCompositionStart":i=Xn.compositionStart;break e;case"topCompositionEnd":i=Xn.compositionEnd;break e;case"topCompositionUpdate":i=Xn.compositionUpdate;break e}i=void 0}else Zn?B(e,n)&&(i=Xn.compositionEnd):"topKeyDown"===e&&229===n.keyCode&&(i=Xn.compositionStart);return i?($n&&(Zn||i!==Xn.compositionStart?i===Xn.compositionEnd&&Zn&&(o=P()):(Bn._root=r,Bn._startText=R(),Zn=!0)),i=Un.getPooled(i,t,n,r),o?i.data=o:null!==(o=z(n))&&(i.data=o),k(i),o=i):o=null,(e=Gn?j(e,n):U(e,n))?(t=qn.getPooled(Xn.beforeInput,t,n,r),t.data=e,k(t)):t=null,null===o?t:null===t?o:[o,t]}},Qn=null,er={injectFiberControlledHostComponent:function(e){Qn=e}},tr=null,nr=null,rr=Object.freeze({injection:er,enqueueStateRestore:H,needsStateRestore:W,restoreStateIfNeeded:V}),ir=!1,or={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0},ar=ln.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,sr="function"===typeof Symbol&&Symbol.for,ur=sr?Symbol.for("react.element"):60103,cr=sr?Symbol.for("react.call"):60104,lr=sr?Symbol.for("react.return"):60105,fr=sr?Symbol.for("react.portal"):60106,pr=sr?Symbol.for("react.fragment"):60107,hr=sr?Symbol.for("react.strict_mode"):60108,dr=sr?Symbol.for("react.provider"):60109,mr=sr?Symbol.for("react.context"):60110,gr=sr?Symbol.for("react.async_mode"):60111,vr=sr?Symbol.for("react.forward_ref"):60112,yr="function"===typeof Symbol&&Symbol.iterator,br=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,xr={},wr={},Nr={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Nr[e]=new ce(e,0,!1,e,null)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Nr[t]=new ce(t,1,!1,e[1],null)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){Nr[e]=new ce(e,2,!1,e.toLowerCase(),null)}),["autoReverse","externalResourcesRequired","preserveAlpha"].forEach(function(e){Nr[e]=new ce(e,2,!1,e,null)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Nr[e]=new ce(e,3,!1,e.toLowerCase(),null)}),["checked","multiple","muted","selected"].forEach(function(e){Nr[e]=new ce(e,3,!0,e.toLowerCase(),null)}),["capture","download"].forEach(function(e){Nr[e]=new ce(e,4,!1,e.toLowerCase(),null)}),["cols","rows","size","span"].forEach(function(e){Nr[e]=new ce(e,6,!1,e.toLowerCase(),null)}),["rowSpan","start"].forEach(function(e){Nr[e]=new ce(e,5,!1,e.toLowerCase(),null)});var Er=/[\-:]([a-z])/g;"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Er,le);Nr[t]=new ce(t,1,!1,e,null)}),"xlink:actuate xlink:arcrole xlink:href xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Er,le);Nr[t]=new ce(t,1,!1,e,"http://www.w3.org/1999/xlink")}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Er,le);Nr[t]=new ce(t,1,!1,e,"http://www.w3.org/XML/1998/namespace")}),Nr.tabIndex=new ce("tabIndex",1,!1,"tabindex",null);var Cr={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:"topBlur topChange topClick topFocus topInput topKeyDown topKeyUp topSelectionChange".split(" ")}},Sr=null,Mr=null,Tr=!1;fn.canUseDOM&&(Tr=J("input")&&(!document.documentMode||9<document.documentMode));var Or={eventTypes:Cr,_isInputEventSupported:Tr,extractEvents:function(e,t,n,r){var i=t?x(t):window,o=void 0,a=void 0,s=i.nodeName&&i.nodeName.toLowerCase();if("select"===s||"input"===s&&"file"===i.type?o=Ne:K(i)?Tr?o=Oe:(o=Me,a=Se):(s=i.nodeName)&&"input"===s.toLowerCase()&&("checkbox"===i.type||"radio"===i.type)&&(o=Te),o&&(o=o(e,t)))return be(o,n,r);a&&a(e,i,t),"topBlur"===e&&null!=t&&(e=t._wrapperState||i._wrapperState)&&e.controlled&&"number"===i.type&&ve(i,"number",i.value)}},kr=I.extend({view:null,detail:null}),Ar={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"},_r=kr.extend({screenX:null,screenY:null,clientX:null,clientY:null,pageX:null,pageY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:Ae,button:null,buttons:null,relatedTarget:function(e){return e.relatedTarget||(e.fromElement===e.srcElement?e.toElement:e.fromElement)}}),Pr={mouseEnter:{registrationName:"onMouseEnter",dependencies:["topMouseOut","topMouseOver"]},mouseLeave:{registrationName:"onMouseLeave",dependencies:["topMouseOut","topMouseOver"]}},Rr={eventTypes:Pr,extractEvents:function(e,t,n,r){if("topMouseOver"===e&&(n.relatedTarget||n.fromElement)||"topMouseOut"!==e&&"topMouseOver"!==e)return null;var i=r.window===r?r:(i=r.ownerDocument)?i.defaultView||i.parentWindow:window;if("topMouseOut"===e?(e=t,t=(t=n.relatedTarget||n.toElement)?b(t):null):e=null,e===t)return null;var o=null==e?i:x(e);i=null==t?i:x(t);var a=_r.getPooled(Pr.mouseLeave,e,n,r);return a.type="mouseleave",a.target=o,a.relatedTarget=i,n=_r.getPooled(Pr.mouseEnter,t,n,r),n.type="mouseenter",n.target=i,n.relatedTarget=o,A(a,n,e,t),[a,n]}},Ir=I.extend({animationName:null,elapsedTime:null,pseudoElement:null}),Fr=I.extend({clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Dr=kr.extend({relatedTarget:null}),Lr={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Br={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},zr=kr.extend({key:function(e){if(e.key){var t=Lr[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?(e=Le(e),13===e?"Enter":String.fromCharCode(e)):"keydown"===e.type||"keyup"===e.type?Br[e.keyCode]||"Unidentified":""},location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:Ae,charCode:function(e){return"keypress"===e.type?Le(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?Le(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),jr=_r.extend({dataTransfer:null}),Ur=kr.extend({touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:Ae}),qr=I.extend({propertyName:null,elapsedTime:null,pseudoElement:null}),Hr=_r.extend({deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:null,deltaMode:null}),Wr={},Vr={};"blur cancel click close contextMenu copy cut doubleClick dragEnd dragStart drop focus input invalid keyDown keyPress keyUp mouseDown mouseUp paste pause play rateChange reset seeked submit touchCancel touchEnd touchStart volumeChange".split(" ").forEach(function(e){Be(e,!0)}),"abort animationEnd animationIteration animationStart canPlay canPlayThrough drag dragEnter dragExit dragLeave dragOver durationChange emptied encrypted ended error load loadedData loadedMetadata loadStart mouseMove mouseOut mouseOver playing progress scroll seeking stalled suspend timeUpdate toggle touchMove transitionEnd waiting wheel".split(" ").forEach(function(e){Be(e,!1)});var Gr={eventTypes:Wr,isInteractiveTopLevelEventType:function(e){return void 0!==(e=Vr[e])&&!0===e.isInteractive},extractEvents:function(e,t,n,r){var i=Vr[e];if(!i)return null;switch(e){case"topKeyPress":if(0===Le(n))return null;case"topKeyDown":case"topKeyUp":e=zr;break;case"topBlur":case"topFocus":e=Dr;break;case"topClick":if(2===n.button)return null;case"topDoubleClick":case"topMouseDown":case"topMouseMove":case"topMouseUp":case"topMouseOut":case"topMouseOver":case"topContextMenu":e=_r;break;case"topDrag":case"topDragEnd":case"topDragEnter":case"topDragExit":case"topDragLeave":case"topDragOver":case"topDragStart":case"topDrop":e=jr;break;case"topTouchCancel":case"topTouchEnd":case"topTouchMove":case"topTouchStart":e=Ur;break;case"topAnimationEnd":case"topAnimationIteration":case"topAnimationStart":e=Ir;break;case"topTransitionEnd":e=qr;break;case"topScroll":e=kr;break;case"topWheel":e=Hr;break;case"topCopy":case"topCut":case"topPaste":e=Fr;break;default:e=I}return t=e.getPooled(i,t,n,r),k(t),t}},$r=Gr.isInteractiveTopLevelEventType,Yr=[],Xr=!0,Kr=Object.freeze({get _enabled(){return Xr},setEnabled:je,isEnabled:function(){return Xr},trapBubbledEvent:Ue,trapCapturedEvent:qe,dispatchEvent:We}),Zr={animationend:Ve("Animation","AnimationEnd"),animationiteration:Ve("Animation","AnimationIteration"),animationstart:Ve("Animation","AnimationStart"),transitionend:Ve("Transition","TransitionEnd")},Jr={},Qr={};fn.canUseDOM&&(Qr=document.createElement("div").style,"AnimationEvent"in window||(delete Zr.animationend.animation,delete Zr.animationiteration.animation,delete Zr.animationstart.animation),"TransitionEvent"in window||delete Zr.transitionend.transition);var ei={topAnimationEnd:Ge("animationend"),topAnimationIteration:Ge("animationiteration"),topAnimationStart:Ge("animationstart"),topBlur:"blur",topCancel:"cancel",topChange:"change",topClick:"click",topClose:"close",topCompositionEnd:"compositionend",topCompositionStart:"compositionstart",topCompositionUpdate:"compositionupdate",topContextMenu:"contextmenu",topCopy:"copy",topCut:"cut",topDoubleClick:"dblclick",topDrag:"drag",topDragEnd:"dragend",topDragEnter:"dragenter",topDragExit:"dragexit",topDragLeave:"dragleave",topDragOver:"dragover",topDragStart:"dragstart",topDrop:"drop",topFocus:"focus",topInput:"input",topKeyDown:"keydown",topKeyPress:"keypress",topKeyUp:"keyup",topLoad:"load",topLoadStart:"loadstart",topMouseDown:"mousedown",topMouseMove:"mousemove",topMouseOut:"mouseout",topMouseOver:"mouseover",topMouseUp:"mouseup",topPaste:"paste",topScroll:"scroll",topSelectionChange:"selectionchange",topTextInput:"textInput",topToggle:"toggle",topTouchCancel:"touchcancel",topTouchEnd:"touchend",topTouchMove:"touchmove",topTouchStart:"touchstart",topTransitionEnd:Ge("transitionend"),topWheel:"wheel"},ti={topAbort:"abort",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topSeeked:"seeked",topSeeking:"seeking",topStalled:"stalled",topSuspend:"suspend",topTimeUpdate:"timeupdate",topVolumeChange:"volumechange",topWaiting:"waiting"},ni={},ri=0,ii="_reactListenersID"+(""+Math.random()).slice(2),oi=fn.canUseDOM&&"documentMode"in document&&11>=document.documentMode,ai={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"topBlur topContextMenu topFocus topKeyDown topKeyUp topMouseDown topMouseUp topSelectionChange".split(" ")}},si=null,ui=null,ci=null,li=!1,fi={eventTypes:ai,extractEvents:function(e,t,n,r){var i,o=r.window===r?r.document:9===r.nodeType?r:r.ownerDocument;if(!(i=!o)){e:{o=$e(o),i=Cn.onSelect;for(var a=0;a<i.length;a++){var s=i[a];if(!o.hasOwnProperty(s)||!o[s]){o=!1;break e}}o=!0}i=!o}if(i)return null;switch(o=t?x(t):window,e){case"topFocus":(K(o)||"true"===o.contentEditable)&&(si=o,ui=t,ci=null);break;case"topBlur":ci=ui=si=null;break;case"topMouseDown":li=!0;break;case"topContextMenu":case"topMouseUp":return li=!1,Ze(n,r);case"topSelectionChange":if(oi)break;case"topKeyDown":case"topKeyUp":return Ze(n,r)}return null}};An.injectEventPluginOrder("ResponderEventPlugin SimpleEventPlugin TapEventPlugin EnterLeaveEventPlugin ChangeEventPlugin SelectEventPlugin BeforeInputEventPlugin".split(" ")),Mn=Fn.getFiberCurrentPropsFromNode,Tn=Fn.getInstanceFromNode,On=Fn.getNodeFromInstance,An.injectEventPluginsByName({SimpleEventPlugin:Gr,EnterLeaveEventPlugin:Rr,ChangeEventPlugin:Or,SelectEventPlugin:fi,BeforeInputEventPlugin:Jn});var pi=null,hi=null;new Set;var di=void 0,mi=void 0,gi=Array.isArray,vi=yt(!0),yi=yt(!1),bi={},xi=Object.freeze({default:At}),wi=xi&&At||xi,Ni=wi.default?wi.default:wi,Ei="object"===typeof performance&&"function"===typeof performance.now,Ci=void 0;Ci=Ei?function(){return performance.now()}:function(){return Date.now()};var Si=void 0,Mi=void 0;if(fn.canUseDOM)if("function"!==typeof requestIdleCallback||"function"!==typeof cancelIdleCallback){var Ti=null,Oi=!1,ki=-1,Ai=!1,_i=0,Pi=33,Ri=33,Ii=void 0;Ii=Ei?{didTimeout:!1,timeRemaining:function(){var e=_i-performance.now();return 0<e?e:0}}:{didTimeout:!1,timeRemaining:function(){var e=_i-Date.now();return 0<e?e:0}};var Fi="__reactIdleCallback$"+Math.random().toString(36).slice(2);window.addEventListener("message",function(e){if(e.source===window&&e.data===Fi){if(Oi=!1,e=Ci(),0>=_i-e){if(!(-1!==ki&&ki<=e))return void(Ai||(Ai=!0,requestAnimationFrame(Di)));Ii.didTimeout=!0}else Ii.didTimeout=!1;ki=-1,e=Ti,Ti=null,null!==e&&e(Ii)}},!1);var Di=function(e){Ai=!1;var t=e-_i+Ri;t<Ri&&Pi<Ri?(8>t&&(t=8),Ri=t<Pi?Pi:t):Pi=t,_i=e+Ri,Oi||(Oi=!0,window.postMessage(Fi,"*"))};Si=function(e,t){return Ti=e,null!=t&&"number"===typeof t.timeout&&(ki=Ci()+t.timeout),Ai||(Ai=!0,requestAnimationFrame(Di)),0},Mi=function(){Ti=null,Oi=!1,ki=-1}}else Si=window.requestIdleCallback,Mi=window.cancelIdleCallback;else Si=function(e){return setTimeout(function(){e({timeRemaining:function(){return 1/0},didTimeout:!1})})},Mi=function(e){clearTimeout(e)};var Li={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"},Bi=void 0,zi=function(e){return"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n)})}:e}(function(e,t){if(e.namespaceURI!==Li.svg||"innerHTML"in e)e.innerHTML=t;else{for(Bi=Bi||document.createElement("div"),Bi.innerHTML="<svg>"+t+"</svg>",t=Bi.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}}),ji={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Ui=["Webkit","ms","Moz","O"];Object.keys(ji).forEach(function(e){Ui.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ji[t]=ji[e]})});var qi=pn({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}),Hi=hn.thatReturns(""),Wi=Object.freeze({createElement:$t,createTextNode:Yt,setInitialProperties:Xt,diffProperties:Kt,updateProperties:Zt,diffHydratedProperties:Jt,diffHydratedText:Qt,warnForUnmatchedText:function(){},warnForDeletedHydratableElement:function(){},warnForDeletedHydratableText:function(){},warnForInsertedHydratedElement:function(){},warnForInsertedHydratedText:function(){},restoreControlledState:function(e,t,n){switch(t){case"input":if(me(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var i=n[t];if(i!==e&&i.form===e.form){var o=w(i);o||r("90"),ne(i),me(i,o)}}}break;case"textarea":Bt(e,n);break;case"select":null!=(t=n.value)&&It(e,!!n.multiple,t,!1)}}});er.injectFiberControlledHostComponent(Wi);var Vi=null,Gi=null;en.prototype.render=function(e){this._defer||r("250"),this._hasChildren=!0,this._children=e;var t=this._root._internalRoot,n=this._expirationTime,i=new tn;return $i.updateContainerAtExpirationTime(e,t,null,n,i._onCommit),i},en.prototype.then=function(e){if(this._didComplete)e();else{var t=this._callbacks;null===t&&(t=this._callbacks=[]),t.push(e)}},en.prototype.commit=function(){var e=this._root._internalRoot,t=e.firstBatch;if(this._defer&&null!==t||r("251"),this._hasChildren){var n=this._expirationTime;if(t!==this){this._hasChildren&&(n=this._expirationTime=t._expirationTime,this.render(this._children));for(var i=null,o=t;o!==this;)i=o,o=o._next;null===i&&r("251"),i._next=o._next,this._next=t,e.firstBatch=this}this._defer=!1,$i.flushRoot(e,n),t=this._next,this._next=null,t=e.firstBatch=t,null!==t&&t._hasChildren&&t.render(t._children)}else this._next=null,this._defer=!1},en.prototype._onComplete=function(){if(!this._didComplete){this._didComplete=!0;var e=this._callbacks;if(null!==e)for(var t=0;t<e.length;t++)(0,e[t])()}},tn.prototype.then=function(e){if(this._didCommit)e();else{var t=this._callbacks;null===t&&(t=this._callbacks=[]),t.push(e)}},tn.prototype._onCommit=function(){if(!this._didCommit){this._didCommit=!0;var e=this._callbacks;if(null!==e)for(var t=0;t<e.length;t++){var n=e[t];"function"!==typeof n&&r("191",n),n()}}},nn.prototype.render=function(e,t){var n=this._internalRoot,r=new tn;return t=void 0===t?null:t,null!==t&&r.then(t),$i.updateContainer(e,n,null,r._onCommit),r},nn.prototype.unmount=function(e){var t=this._internalRoot,n=new tn;return e=void 0===e?null:e,null!==e&&n.then(e),$i.updateContainer(null,t,null,n._onCommit),n},nn.prototype.legacy_renderSubtreeIntoContainer=function(e,t,n){var r=this._internalRoot,i=new tn;return n=void 0===n?null:n,null!==n&&i.then(n),$i.updateContainer(t,r,e,i._onCommit),i},nn.prototype.createBatch=function(){var e=new en(this),t=e._expirationTime,n=this._internalRoot,r=n.firstBatch;if(null===r)n.firstBatch=e,e._next=null;else{for(n=null;null!==r&&r._expirationTime<=t;)n=r,r=r._next;e._next=r,null!==n&&(n._next=e)}return e};var $i=Ni({getRootHostContext:function(e){var t=e.nodeType;switch(t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:Ut(null,"");break;default:t=8===t?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=Ut(e,t)}return e},getChildHostContext:function(e,t){return Ut(e,t)},getPublicInstance:function(e){return e},prepareForCommit:function(){Vi=Xr;var e=dn();if(Ke(e)){if("selectionStart"in e)var t={start:e.selectionStart,end:e.selectionEnd};else e:{var n=window.getSelection&&window.getSelection();if(n&&0!==n.rangeCount){t=n.anchorNode;var r=n.anchorOffset,i=n.focusNode;n=n.focusOffset;try{t.nodeType,i.nodeType}catch(e){t=null;break e}var o=0,a=-1,s=-1,u=0,c=0,l=e,f=null;t:for(;;){for(var p;l!==t||0!==r&&3!==l.nodeType||(a=o+r),l!==i||0!==n&&3!==l.nodeType||(s=o+n),3===l.nodeType&&(o+=l.nodeValue.length),null!==(p=l.firstChild);)f=l,l=p;for(;;){if(l===e)break t;if(f===t&&++u===r&&(a=o),f===i&&++c===n&&(s=o),null!==(p=l.nextSibling))break;l=f,f=l.parentNode}l=p}t=-1===a||-1===s?null:{start:a,end:s}}else t=null}t=t||{start:0,end:0}}else t=null;Gi={focusedElem:e,selectionRange:t},je(!1)},resetAfterCommit:function(){var e=Gi,t=dn(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&gn(document.documentElement,n)){if(Ke(n))if(t=r.start,e=r.end,void 0===e&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(window.getSelection){t=window.getSelection();var i=n[_()].length;e=Math.min(r.start,i),r=void 0===r.end?e:Math.min(r.end,i),!t.extend&&e>r&&(i=r,r=e,e=i),i=Xe(n,e);var o=Xe(n,r);if(i&&o&&(1!==t.rangeCount||t.anchorNode!==i.node||t.anchorOffset!==i.offset||t.focusNode!==o.node||t.focusOffset!==o.offset)){var a=document.createRange();a.setStart(i.node,i.offset),t.removeAllRanges(),e>r?(t.addRange(a),t.extend(o.node,o.offset)):(a.setEnd(o.node,o.offset),t.addRange(a))}}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}Gi=null,je(Vi),Vi=null},createInstance:function(e,t,n,r,i){return e=$t(e,t,n,r),e[Rn]=i,e[In]=t,e},appendInitialChild:function(e,t){e.appendChild(t)},finalizeInitialChildren:function(e,t,n,r){return Xt(e,t,n,r),on(t,n)},prepareUpdate:function(e,t,n,r,i){return Kt(e,t,n,r,i)},shouldSetTextContent:function(e,t){return"textarea"===e||"string"===typeof t.children||"number"===typeof t.children||"object"===typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&"string"===typeof t.dangerouslySetInnerHTML.__html},shouldDeprioritizeSubtree:function(e,t){return!!t.hidden},createTextInstance:function(e,t,n,r){return e=Yt(e,t),e[Rn]=r,e},now:Ci,mutation:{commitMount:function(e,t,n){on(t,n)&&e.focus()},commitUpdate:function(e,t,n,r,i){e[In]=i,Zt(e,t,n,r,i)},resetTextContent:function(e){qt(e,"")},commitTextUpdate:function(e,t,n){e.nodeValue=n},appendChild:function(e,t){e.appendChild(t)},appendChildToContainer:function(e,t){8===e.nodeType?e.parentNode.insertBefore(t,e):e.appendChild(t)},insertBefore:function(e,t,n){e.insertBefore(t,n)},insertInContainerBefore:function(e,t,n){8===e.nodeType?e.parentNode.insertBefore(t,n):e.insertBefore(t,n)},removeChild:function(e,t){e.removeChild(t)},removeChildFromContainer:function(e,t){8===e.nodeType?e.parentNode.removeChild(t):e.removeChild(t)}},hydration:{canHydrateInstance:function(e,t){return 1!==e.nodeType||t.toLowerCase()!==e.nodeName.toLowerCase()?null:e},canHydrateTextInstance:function(e,t){return""===t||3!==e.nodeType?null:e},getNextHydratableSibling:function(e){for(e=e.nextSibling;e&&1!==e.nodeType&&3!==e.nodeType;)e=e.nextSibling;return e},getFirstHydratableChild:function(e){for(e=e.firstChild;e&&1!==e.nodeType&&3!==e.nodeType;)e=e.nextSibling;return e},hydrateInstance:function(e,t,n,r,i,o){return e[Rn]=o,e[In]=n,Jt(e,t,n,i,r)},hydrateTextInstance:function(e,t,n){return e[Rn]=n,Qt(e,t)},didNotMatchHydratedContainerTextInstance:function(){},didNotMatchHydratedTextInstance:function(){},didNotHydrateContainerInstance:function(){},didNotHydrateInstance:function(){},didNotFindHydratableContainerInstance:function(){},didNotFindHydratableContainerTextInstance:function(){},didNotFindHydratableInstance:function(){},didNotFindHydratableTextInstance:function(){}},scheduleDeferredCallback:Si,cancelDeferredCallback:Mi}),Yi=$i;G=Yi.batchedUpdates,$=Yi.interactiveUpdates,Y=Yi.flushInteractiveUpdates;var Xi={createPortal:un,findDOMNode:function(e){return null==e?null:1===e.nodeType?e:$i.findHostInstance(e)},hydrate:function(e,t,n){return sn(null,e,t,!0,n)},render:function(e,t,n){return sn(null,e,t,!1,n)},unstable_renderSubtreeIntoContainer:function(e,t,n,i){return(null==e||void 0===e._reactInternalFiber)&&r("38"),sn(e,t,n,!1,i)},unmountComponentAtNode:function(e){return rn(e)||r("40"),!!e._reactRootContainer&&($i.unbatchedUpdates(function(){sn(null,null,e,!1,function(){e._reactRootContainer=null})}),!0)},unstable_createPortal:function(){return un.apply(void 0,arguments)},unstable_batchedUpdates:$i.batchedUpdates,unstable_deferredUpdates:$i.deferredUpdates,flushSync:$i.flushSync,unstable_flushControlled:$i.flushControlled,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{EventPluginHub:_n,EventPluginRegistry:Sn,EventPropagators:Dn,ReactControlledComponent:rr,ReactDOMComponentTree:Fn,ReactDOMEventListener:Kr},unstable_createRoot:function(e,t){return new nn(e,!0,null!=t&&!0===t.hydrate)}};$i.injectIntoDevTools({findFiberByHostInstance:b,bundleType:0,version:"16.3.2",rendererPackageName:"react-dom"});var Ki=Object.freeze({default:Xi}),Zi=Ki&&Xi||Ki;e.exports=Zi.default?Zi.default:Zi},function(e,t,n){"use strict";var r=!("undefined"===typeof window||!window.document||!window.document.createElement),i={canUseDOM:r,canUseWorkers:"undefined"!==typeof Worker,canUseEventListeners:r&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:r&&!!window.screen,isInWorker:!r};e.exports=i},function(e,t,n){"use strict";function r(e){if("undefined"===typeof(e=e||("undefined"!==typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}e.exports=r},function(e,t,n){"use strict";function r(e,t){return e===t?0!==e||0!==t||1/e===1/t:e!==e&&t!==t}function i(e,t){if(r(e,t))return!0;if("object"!==typeof e||null===e||"object"!==typeof t||null===t)return!1;var n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(var a=0;a<n.length;a++)if(!o.call(t,n[a])||!r(e[n[a]],t[n[a]]))return!1;return!0}var o=Object.prototype.hasOwnProperty;e.exports=i},function(e,t,n){"use strict";function r(e,t){return!(!e||!t)&&(e===t||!i(e)&&(i(t)?r(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}var i=n(203);e.exports=r},function(e,t,n){"use strict";function r(e){return i(e)&&3==e.nodeType}var i=n(204);e.exports=r},function(e,t,n){"use strict";function r(e){var t=e?e.ownerDocument||e:document,n=t.defaultView||window;return!(!e||!("function"===typeof n.Node?e instanceof n.Node:"object"===typeof e&&"number"===typeof e.nodeType&&"string"===typeof e.nodeName))}e.exports=r},function(e,t){},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function o(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(7),s=n.n(a),u=n(90),c=(n.n(u),n(207)),l=n(208),f=n.n(l),p=n(232),h=n(250),d=n(251),m=n(689),g=n(129),v=n(690),y=n(691),b=n(692),x=n(693),w=n(694),N=n(188),E=n(189),C=(n(695),function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}()),S=function(e){function t(e){r(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.useDummy=!0,n.lastSend=new Date,n.setNavState=n.setNavState.bind(n),n.setContState=n.setContState.bind(n),n.setServerState=n.setServerState.bind(n),n.setWelcomeState=n.setWelcomeState.bind(n),n.setDashState=n.setDashState.bind(n),n.getNavState=n.getNavState.bind(n),n.getContState=n.getContState.bind(n),n.getServerState=n.getServerState.bind(n),n.getWelcomeState=n.getWelcomeState.bind(n),n.getDashState=n.getDashState.bind(n),n.lookForControllers=n.lookForControllers.bind(n),n.handleControllerAxis=n.handleControllerAxis.bind(n),n.handleControllerButton=n.handleControllerButton.bind(n),n.sendThrustData=n.sendThrustData.bind(n),n.paintThrustData=n.paintThrustData.bind(n),n.camPosListener=n.camPosListener.bind(n),n.leftStickListener=n.leftStickListener.bind(n),n.rightStickListener=n.rightStickListener.bind(n),n.centerStickListener=n.centerStickListener.bind(n),n.calcVirtualThrust=n.calcVirtualThrust.bind(n),n.leftX=0,n.leftY=0,n.rightX=0,n.rightY=0,n.sock=f()("http://192.168.1.254:8000"),n.listener=new c.a({analog:!0,precision:6}),n.state={navState:Object(p.b)(n.setNavState,n.getNavState),welcomeState:Object(h.a)(n.setWelcomeState,n.getWelcomeState),dashState:Object(d.b)(n.setDashState,n.getDashState,n.sendThrustData,n.camPosListener,n.leftStickListener,n.rightStickListener,n.centerStickListener),contState:Object(m.d)(n.setContState,n.getContState,n.sock),serverState:Object(g.a)(n.setServerState,n.getServerState,n.sock),frontcenterState:Object(y.a)(),frontleftState:Object(b.a)(),frontrightState:Object(x.a)(),aftState:Object(w.b)()},n.sock.on("paintThrusts",function(e){n.paintThrustData(e)}),Object(g.b)(n.state.serverState),Object(m.a)(n.state.contState),n.listener.on("gamepad:connected",function(e){return n.lookForControllers(e)}),n.listener.on("gamepad:disconnected",function(e){return n.lookForControllers(e)}),n.listener.on("gamepad:axis",function(e){return n.handleControllerAxis(e)}),n.listener.on("gamepad:button",function(e){return n.handleControllerButton(e)}),n.listener.start(),n.lookForControllers(),window.addEventListener("load",n.lookForControllers),n}return o(t,e),C(t,[{key:"sendThrustData",value:function(e){this.paintThrustData(e),this.sock.emit("pushThrusts",e)}},{key:"paintThrustData",value:function(e){var t=this.state.dashState;t.loads=e,this.setState({dashState:t})}},{key:"lookForControllers",value:function(){for(var e=this,t=this.listener.getGamepads(),n={},r=0;r<t.length;r++)t[r]&&(n[t[r].index]=null,t[r].index in this.state.contState.controllers||(this.state.contState.controllers[t[r].index]=Object(m.c)(t[r].index)));Object.keys(this.state.contState.controllers).map(function(t){t in n||delete e.state.contState.controllers[t]}),this.setContState(this.state.contState)}},{key:"handleControllerAxis",value:function(e){var t=this.state.contState.controllers[e.detail.gamepad.index];if(t&&t.engage){var n=Object(N.a)(e,t),r=Object(E.a)(n,1);this.sendThrustData(r)}}},{key:"handleControllerButton",value:function(e){var t=this.state.contState.controllers[e.detail.gamepad.index];if(t&&t.engage)if(6==e.detail.index||7==e.detail.index)this.handleControllerAxis(e);else{var n=t.buttons.designators[Object(N.c)(e.detail.index)];n.engage&&("Go up"==n.current||"Go down"==n.current||"Go left"==n.current||"Go right"==n.current?this.handleControllerAxis(e):this.sock.emit(n.current,e.detail.pressed))}}},{key:"camPosListener",value:function(e){var t=this;e.on("move",function(e,n){t.state.serverState.campan=.5+Math.max(-1,Math.min(1,.25*Math.cos(n.angle.radian)*n.force))/2,t.state.serverState.camtilt=1-(.5+Math.max(-1,Math.min(1,.25*Math.sin(n.angle.radian)*n.force))/2),t.setServerState(t.state.serverState),t.sock.emit("gpio",{cmd:"pan",data:t.state.serverState.campan}),t.sock.emit("gpio",{cmd:"tilt",data:t.state.serverState.camtilt})})}},{key:"leftStickListener",value:function(e){var t=this;e.on("move",function(e,n){t.leftX=Math.max(-1,Math.min(1,.5*Math.cos(n.angle.radian)*n.force)),t.leftY=Math.max(-1,Math.min(1,.5*Math.sin(n.angle.radian)*n.force));var r=Object(E.a)(t.calcVirtualThrust());t.sendThrustData(r)}),e.on("end",function(e,n){t.leftX=0,t.leftY=0;var r=Object(E.a)(t.calcVirtualThrust(),1);t.sendThrustData(r)})}},{key:"rightStickListener",value:function(e){var t=this;e.on("move",function(e,n){t.rightX=Math.max(-1,Math.min(1,.5*Math.cos(n.angle.radian)*n.force)),t.rightY=Math.max(-1,Math.min(1,.5*Math.sin(n.angle.radian)*n.force));var r=Object(E.a)(t.calcVirtualThrust(),1);t.sendThrustData(r)}),e.on("end",function(e,n){t.rightX=0,t.rightY=0;var r=Object(E.a)(t.calcVirtualThrust());t.sendThrustData(r)})}},{key:"centerStickListener",value:function(e){var t=this;e.on("move",function(e,n){t.centerX=Math.max(-1,Math.min(1,.25*Math.cos(n.angle.radian)*n.force)),t.centerY=Math.max(-1,Math.min(1,.25*Math.sin(n.angle.radian)*n.force));var r=Object(E.a)(t.calcVirtualThrust(),1);t.sendThrustData(r)}),e.on("end",function(e,n){t.centerX=0,t.centerY=0;var r=Object(E.a)(t.calcVirtualThrust());t.sendThrustData(r)})}},{key:"calcVirtualThrust",value:function(){return{ROLL:0,PITCH:this.rightY,LAT:this.leftX,LONG:this.leftY,VERT:0,YAW:this.rightX}}},{key:"setContState",value:function(e){this.setState({contState:e})}},{key:"setNavState",value:function(e){this.setState({navState:e})}},{key:"setServerState",value:function(e){this.setState({serverState:e})}},{key:"setWelcomeState",value:function(e){this.setState({welcomeState:e})}},{key:"setDashState",value:function(e){this.setState({dashState:e})}},{key:"getContState",value:function(){return this.state.contState}},{key:"getNavState",value:function(){return this.state.navState}},{key:"getServerState",value:function(){return this.state.serverState}},{key:"getWelcomeState",value:function(){return this.state.welcomeState}},{key:"getDashState",value:function(){return this.state.dashState}},{key:"render",value:function(){switch(this.state.navState.selected){case"welcome":return s.a.createElement(T,{navState:this.state.navState,serverdata:this.state.serverState,viewhandler:h.b,data:this.state.welcomeState});case"dashboard":return s.a.createElement(T,{navState:this.state.navState,serverdata:this.state.serverState,viewhandler:d.a,data:this.state.dashState});case"controllers":return s.a.createElement(T,{navState:this.state.navState,serverdata:this.state.serverState,viewhandler:m.b,data:this.state.contState});case"server":return s.a.createElement(T,{navState:this.state.navState,serverdata:this.state.serverState,viewhandler:g.c,data:this.state.serverState});case"frontcenter":return s.a.createElement(T,{navState:this.state.navState,serverdata:this.state.serverState,viewhandler:y.b,data:this.state.frontcenterState});case"frontleft":return s.a.createElement(T,{navState:this.state.navState,serverdata:this.state.serverState,viewhandler:b.b,data:this.state.frontleftState});case"frontright":return s.a.createElement(T,{navState:this.state.navState,serverdata:this.state.serverState,viewhandler:x.b,data:this.state.frontrightState});case"aft":return s.a.createElement(T,{navState:this.state.navState,serverdata:this.state.serverState,viewhandler:w.a,data:this.state.aftState});case"touchstick":return s.a.createElement(T,{navState:this.state.navState,serverdata:this.state.serverState,viewhandler:v.a,data:this.state.dashState});default:return s.a.createElement(T,{navState:this.state.navState,viewhandler:M})}}}]),t}(a.Component),M=function(e){return s.a.createElement("p",null,"Default view")},T=function(e){return s.a.createElement("div",null,s.a.createElement(p.a,{data:e.navState,serverdata:e.serverdata}),s.a.createElement("div",{className:"mainFrame"},s.a.createElement(e.viewhandler,{data:e.data,serverdata:e.serverdata?e.serverdata:null,navdata:e.navState})))};t.a=S},function(e,t,n){"use strict";function r(){this._events={}}function i(e){this.allowExtra="undefined"!=typeof e&&e,this.defaults={},this.types={},this.optional=[],this.required=[]}function o(e,t){r.call(this),this.gamepad=e,this.options=this.resolveOptions("object"===("undefined"===typeof t?"undefined":s(t))?t:{}),this.sticks=new Array(this.gamepad.axes.length),this.buttons=new Array(this.gamepad.buttons.length);for(var n=this.sticks.length-1;n>=0;n--)this.sticks[n]=[0,0];for(var i=this.buttons.length-1;i>=0;i--)this.buttons[i]=0;this.gamepad.handler=this}function a(e){r.call(this),this.options="object"===("undefined"===typeof e?"undefined":s(e))?e:{},this.frame=null,this.update=this.update.bind(this),this.onAxis=this.onAxis.bind(this),this.onButton=this.onButton.bind(this),this.stop=this.stop.bind(this),this.handlers=new Array(4),window.addEventListener("error",this.stop)}var s="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};r.prototype.emit=function(e,t){if("undefined"!=typeof this._events[e])for(var n=this._events[e],r=n.length,i={type:e,detail:t},o=0;r>o;o++)n[o](i)},r.prototype.addEventListener=function(e,t){"undefined"==typeof this._events[e]&&(this._events[e]=[]),this._events[e].indexOf(t)<0&&this._events[e].push(t)},r.prototype.removeEventListener=function(e,t){if("undefined"!=typeof this._events[e]){var n=this._events[e],r=n.indexOf(t);r>=0&&n.splice(r,1),n.length||delete this._events[e]}},r.prototype.on=r.prototype.addEventListener,r.prototype.off=r.prototype.removeEventListener,i.prototype.setDefaults=function(e){for(var t in e)e.hasOwnProperty(t)&&(this.defaults[t]=e[t]);return this},i.prototype.setTypes=function(e){for(var t in e)e.hasOwnProperty(t)&&(this.types[t]=e[t]);return this},i.prototype.setOptional=function(e){return this.allowExtra?void 0:(this.addToArray(this.optionals,e),this)},i.prototype.setRequired=function(e){return this.addToArray(this.required,e),this},i.prototype.resolve=function(e){var t={};for(var n in this.defaults)this.defaults.hasOwnProperty(n)&&(t[n]=this.getValue(e,n));for(var r=this.required.length-1;r>=0;r--)if(n=this.required[r],"undefined"==typeof t[n])throw'Option "'+n+'" is required.';return t},i.prototype.getValue=function(e,t){var n=null;if(!this.optionExists(t))throw'Unkown option "'+t+'".';return"undefined"!=typeof e[t]?n=e[t]:"undefined"!=typeof this.defaults[t]&&(n=this.defaults[t]),this.checkType(t,n),n},i.prototype.checkType=function(e,t){var n="undefined"!=typeof this.types[e]&&this.types[e],r="undefined"===typeof t?"undefined":s(t);if(n&&r!==n&&("string"===n&&(t=String(t)),"boolean"===n&&(t=Boolean(t)),"number"===n&&(t=Number(t)),r="undefined"===typeof t?"undefined":s(t),n!==r))throw'Wrong type for option "'+e+'". Expected '+this.types[e]+" but got "+("undefined"===typeof t?"undefined":s(t))},i.prototype.optionExists=function(e){return!!this.allowExtra||("undefined"!=typeof this.defaults[e]||this.optional.indexOf(e)>=0||this.required.indexOf(e)>=0)},i.prototype.addToArray=function(e,t){for(var n,r=t.length-1;r>=0;r--)n=t[r],e.indexOf(n)>=0&&e.push(n)},o.prototype=Object.create(r.prototype),o.prototype.optionResolver=new i(!1),o.prototype.optionResolver.setDefaults({analog:!0,deadZone:0,precision:0}),o.prototype.optionResolver.setTypes({analog:"boolean",deadZone:"number",precision:"number"}),o.prototype.resolveOptions=function(e){var t="undefined"!==typeof e.stick,n="undefined"!==typeof e.button,r={stick:this.optionResolver.resolve(t?e.stick:n?{}:e),button:this.optionResolver.resolve(n?e.button:t?{}:e)};return r.stick.deadZone=Math.max(Math.min(r.stick.deadZone,1),0),r.button.deadZone=Math.max(Math.min(r.button.deadZone,1),0),r.stick.precision=r.stick.precision?Math.pow(10,r.stick.precision):0,r.button.precision=r.button.precision?Math.pow(10,r.button.precision):0,r},o.prototype.update=function(){var e=0,t=0,n=0;for(t=0;t<2;t++)for(n=0;n<2;n++)this.setStick(t,n,this.gamepad.axes[e],this.options.stick),e++;for(e=this.gamepad.buttons.length-1;e>=0;e--)this.setButton(e,this.gamepad.buttons[e],this.options.button)},o.prototype.setStick=function(e,t,n,r){r.deadZone&&n<r.deadZone&&n>-r.deadZone&&(n=0),r.analog?r.precision&&(n=Math.round(n*r.precision)/r.precision):n=n>0?1:n<0?-1:0,this.sticks[e][t]!==n&&(this.sticks[e][t]=n,this.emit("axis",{gamepad:this.gamepad,axis:t,value:this.sticks[e][t]}))},o.prototype.setButton=function(e,t,n){var r=t.value;n.deadZone&&t.value<n.deadZone&&t.value>-n.deadZone&&(r=0),n.analog?n.precision&&(r=Math.round(r*n.precision)/n.precision):r=t.pressed?1:0,this.buttons[e]!==r&&(this.buttons[e]=r,this.emit("button",{gamepad:this.gamepad,button:t,index:e,pressed:t.pressed,value:r}))},a.prototype=Object.create(r.prototype),a.prototype.start=function(){this.frame||this.update()},a.prototype.stop=function(){this.frame&&(window.cancelAnimationFrame(this.frame),this.frame=null)},a.prototype.update=function(){this.frame=window.requestAnimationFrame(this.update);for(var e=this.getGamepads(),t=e.length-1;t>=0;t--)e[t]?("undefined"===typeof e[t].handler&&this.addGamepad(e[t]),e[t].handler.update()):this.handlers[t]&&this.removeGamepad(t)},a.prototype.addGamepad=function(e){var t=new o(e,this.options);t.on("axis",this.onAxis),t.on("button",this.onButton),this.emit("gamepad:connected",{gamepad:e,index:e.index}),this.emit("gamepad:"+e.index+":connected",{gamepad:e,index:e.index}),this.handlers[e.index]=t},a.prototype.removeGamepad=function(e){var t=this.handlers[e];t.off("axis",this.onAxis),t.off("button",this.onButton),this.emit("gamepad:disconnected",{index:e}),this.emit("gamepad:"+e+":disconnected",{index:e}),this.handlers[e]=null},a.prototype.onAxis=function(e){this.emit("gamepad:axis",e.detail),this.emit("gamepad:"+e.detail.gamepad.index+":axis",e.detail),this.emit("gamepad:"+e.detail.gamepad.index+":axis:"+e.detail.axis,e.detail)},a.prototype.onButton=function(e){this.emit("gamepad:button",e.detail),this.emit("gamepad:"+e.detail.gamepad.index+":button",e.detail),this.emit("gamepad:"+e.detail.gamepad.index+":button:"+e.detail.index,e.detail)},a.prototype.getGamepads=function(){var e="undefined"!==typeof navigator.getGamepads?navigator.getGamepads():null;return e&&"object"===("undefined"===typeof e?"undefined":s(e))?e:[]},t.a=a},function(e,t,n){function r(e,t){"object"===typeof e&&(t=e,e=void 0),t=t||{};var n,r=i(e),o=r.source,c=r.id,l=r.path,f=u[c]&&l in u[c].nsps,p=t.forceNew||t["force new connection"]||!1===t.multiplex||f;return p?(s("ignoring socket cache for %s",o),n=a(o,t)):(u[c]||(s("new io instance for %s",o),u[c]=a(o,t)),n=u[c]),r.query&&!t.query&&(t.query=r.query),n.socket(r.path,t)}var i=n(209),o=n(93),a=n(119),s=n(71)("socket.io-client");e.exports=t=r;var u=t.managers={};t.protocol=o.protocol,t.connect=r,t.Manager=n(119),t.Socket=n(125)},function(e,t,n){(function(t){function r(e,n){var r=e;n=n||t.location,null==e&&(e=n.protocol+"//"+n.host),"string"===typeof e&&("/"===e.charAt(0)&&(e="/"===e.charAt(1)?n.protocol+e:n.host+e),/^(https?|wss?):\/\//.test(e)||(o("protocol-less url %s",e),e="undefined"!==typeof n?n.protocol+"//"+e:"https://"+e),o("parse %s",e),r=i(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";var a=-1!==r.host.indexOf(":"),s=a?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+s+":"+r.port,r.href=r.protocol+"://"+s+(n&&n.port===r.port?"":":"+r.port),r}var i=n(116),o=n(71)("socket.io-client:url");e.exports=r}).call(t,n(13))},function(e,t,n){function r(e){var n,r=0;for(n in e)r=(r<<5)-r+e.charCodeAt(n),r|=0;return t.colors[Math.abs(r)%t.colors.length]}function i(e){function n(){if(n.enabled){var e=n,r=+new Date,o=r-(i||r);e.diff=o,e.prev=i,e.curr=r,i=r;for(var a=new Array(arguments.length),s=0;s<a.length;s++)a[s]=arguments[s];a[0]=t.coerce(a[0]),"string"!==typeof a[0]&&a.unshift("%O");var u=0;a[0]=a[0].replace(/%([a-zA-Z%])/g,function(n,r){if("%%"===n)return n;u++;var i=t.formatters[r];if("function"===typeof i){var o=a[u];n=i.call(e,o),a.splice(u,1),u--}return n}),t.formatArgs.call(e,a);(n.log||t.log||console.log.bind(console)).apply(e,a)}}var i;return n.namespace=e,n.enabled=t.enabled(e),n.useColors=t.useColors(),n.color=r(e),n.destroy=o,"function"===typeof t.init&&t.init(n),t.instances.push(n),n}function o(){var e=t.instances.indexOf(this);return-1!==e&&(t.instances.splice(e,1),!0)}function a(e){t.save(e),t.names=[],t.skips=[];var n,r=("string"===typeof e?e:"").split(/[\s,]+/),i=r.length;for(n=0;n<i;n++)r[n]&&(e=r[n].replace(/\*/g,".*?"),"-"===e[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")));for(n=0;n<t.instances.length;n++){var o=t.instances[n];o.enabled=t.enabled(o.namespace)}}function s(){t.enable("")}function u(e){if("*"===e[e.length-1])return!0;var n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1}function c(e){return e instanceof Error?e.stack||e.message:e}t=e.exports=i.debug=i.default=i,t.coerce=c,t.disable=s,t.enable=a,t.enabled=u,t.humanize=n(92),t.instances=[],t.names=[],t.skips=[],t.formatters={}},function(e,t,n){(function(r){function i(){return!("undefined"===typeof window||!window.process||"renderer"!==window.process.type)||("undefined"===typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!==typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!==typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!==typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!==typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))}function o(e){var n=this.useColors;if(e[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+e[0]+(n?"%c ":" ")+"+"+t.humanize(this.diff),n){var r="color: "+this.color;e.splice(1,0,r,"color: inherit");var i=0,o=0;e[0].replace(/%[a-zA-Z%]/g,function(e){"%%"!==e&&(i++,"%c"===e&&(o=i))}),e.splice(o,0,r)}}function a(){return"object"===typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function s(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}}function u(){var e;try{e=t.storage.debug}catch(e){}return!e&&"undefined"!==typeof r&&"env"in r&&(e=Object({NODE_ENV:"production",PUBLIC_URL:""}).DEBUG),e}t=e.exports=n(212),t.log=a,t.formatArgs=o,t.save=s,t.load=u,t.useColors=i,t.storage="undefined"!=typeof chrome&&"undefined"!=typeof chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},t.enable(u())}).call(t,n(91))},function(e,t,n){function r(e){var n,r=0;for(n in e)r=(r<<5)-r+e.charCodeAt(n),r|=0;return t.colors[Math.abs(r)%t.colors.length]}function i(e){function n(){if(n.enabled){var e=n,r=+new Date,o=r-(i||r);e.diff=o,e.prev=i,e.curr=r,i=r;for(var a=new Array(arguments.length),s=0;s<a.length;s++)a[s]=arguments[s];a[0]=t.coerce(a[0]),"string"!==typeof a[0]&&a.unshift("%O");var u=0;a[0]=a[0].replace(/%([a-zA-Z%])/g,function(n,r){if("%%"===n)return n;u++;var i=t.formatters[r];if("function"===typeof i){var o=a[u];n=i.call(e,o),a.splice(u,1),u--}return n}),t.formatArgs.call(e,a);(n.log||t.log||console.log.bind(console)).apply(e,a)}}var i;return n.namespace=e,n.enabled=t.enabled(e),n.useColors=t.useColors(),n.color=r(e),n.destroy=o,"function"===typeof t.init&&t.init(n),t.instances.push(n),n}function o(){var e=t.instances.indexOf(this);return-1!==e&&(t.instances.splice(e,1),!0)}function a(e){t.save(e),t.names=[],t.skips=[];var n,r=("string"===typeof e?e:"").split(/[\s,]+/),i=r.length;for(n=0;n<i;n++)r[n]&&(e=r[n].replace(/\*/g,".*?"),"-"===e[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")));for(n=0;n<t.instances.length;n++){var o=t.instances[n];o.enabled=t.enabled(o.namespace)}}function s(){t.enable("")}function u(e){if("*"===e[e.length-1])return!0;var n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1}function c(e){return e instanceof Error?e.stack||e.message:e}t=e.exports=i.debug=i.default=i,t.coerce=c,t.disable=s,t.enable=a,t.enabled=u,t.humanize=n(92),t.instances=[],t.names=[],t.skips=[],t.formatters={}},function(e,t,n){(function(e){function r(e,t){if(!e)return e;if(a(e)){var n={_placeholder:!0,num:t.length};return t.push(e),n}if(o(e)){for(var i=new Array(e.length),s=0;s<e.length;s++)i[s]=r(e[s],t);return i}if("object"===typeof e&&!(e instanceof Date)){var i={};for(var u in e)i[u]=r(e[u],t);return i}return e}function i(e,t){if(!e)return e;if(e&&e._placeholder)return t[e.num];if(o(e))for(var n=0;n<e.length;n++)e[n]=i(e[n],t);else if("object"===typeof e)for(var r in e)e[r]=i(e[r],t);return e}var o=n(117),a=n(118),s=Object.prototype.toString,u="function"===typeof e.Blob||"[object BlobConstructor]"===s.call(e.Blob),c="function"===typeof e.File||"[object FileConstructor]"===s.call(e.File);t.deconstructPacket=function(e){var t=[],n=e.data,i=e;return i.data=r(n,t),i.attachments=t.length,{packet:i,buffers:t}},t.reconstructPacket=function(e,t){return e.data=i(e.data,t),e.attachments=void 0,e},t.removeBlobs=function(e,t){function n(e,s,l){if(!e)return e;if(u&&e instanceof Blob||c&&e instanceof File){r++;var f=new FileReader;f.onload=function(){l?l[s]=this.result:i=this.result,--r||t(i)},f.readAsArrayBuffer(e)}else if(o(e))for(var p=0;p<e.length;p++)n(e[p],p,e);else if("object"===typeof e&&!a(e))for(var h in e)n(e[h],h,e)}var r=0,i=e;n(i),r||t(i)}}).call(t,n(13))},function(e,t,n){e.exports=n(215),e.exports.parser=n(55)},function(e,t,n){(function(t){function r(e,n){if(!(this instanceof r))return new r(e,n);n=n||{},e&&"object"===typeof e&&(n=e,e=null),e?(e=l(e),n.hostname=e.host,n.secure="https"===e.protocol||"wss"===e.protocol,n.port=e.port,e.query&&(n.query=e.query)):n.host&&(n.hostname=l(n.host).host),this.secure=null!=n.secure?n.secure:t.location&&"https:"===location.protocol,n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.agent=n.agent||!1,this.hostname=n.hostname||(t.location?location.hostname:"localhost"),this.port=n.port||(t.location&&location.port?location.port:this.secure?443:80),this.query=n.query||{},"string"===typeof this.query&&(this.query=f.decode(this.query)),this.upgrade=!1!==n.upgrade,this.path=(n.path||"/engine.io").replace(/\/$/,"")+"/",this.forceJSONP=!!n.forceJSONP,this.jsonp=!1!==n.jsonp,this.forceBase64=!!n.forceBase64,this.enablesXDR=!!n.enablesXDR,this.timestampParam=n.timestampParam||"t",this.timestampRequests=n.timestampRequests,this.transports=n.transports||["polling","websocket"],this.transportOptions=n.transportOptions||{},this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.policyPort=n.policyPort||843,this.rememberUpgrade=n.rememberUpgrade||!1,this.binaryType=null,this.onlyBinaryUpgrades=n.onlyBinaryUpgrades,this.perMessageDeflate=!1!==n.perMessageDeflate&&(n.perMessageDeflate||{}),!0===this.perMessageDeflate&&(this.perMessageDeflate={}),this.perMessageDeflate&&null==this.perMessageDeflate.threshold&&(this.perMessageDeflate.threshold=1024),this.pfx=n.pfx||null,this.key=n.key||null,this.passphrase=n.passphrase||null,this.cert=n.cert||null,this.ca=n.ca||null,this.ciphers=n.ciphers||null,this.rejectUnauthorized=void 0===n.rejectUnauthorized||n.rejectUnauthorized,this.forceNode=!!n.forceNode;var i="object"===typeof t&&t;i.global===i&&(n.extraHeaders&&Object.keys(n.extraHeaders).length>0&&(this.extraHeaders=n.extraHeaders),n.localAddress&&(this.localAddress=n.localAddress)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingIntervalTimer=null,this.pingTimeoutTimer=null,this.open()}function i(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}var o=n(120),a=n(54),s=n(74)("engine.io-client:socket"),u=n(124),c=n(55),l=n(116),f=n(72);e.exports=r,r.priorWebsocketSuccess=!1,a(r.prototype),r.protocol=c.protocol,r.Socket=r,r.Transport=n(95),r.transports=n(120),r.parser=n(55),r.prototype.createTransport=function(e){s('creating transport "%s"',e);var t=i(this.query);t.EIO=c.protocol,t.transport=e;var n=this.transportOptions[e]||{};return this.id&&(t.sid=this.id),new o[e]({query:t,socket:this,agent:n.agent||this.agent,hostname:n.hostname||this.hostname,port:n.port||this.port,secure:n.secure||this.secure,path:n.path||this.path,forceJSONP:n.forceJSONP||this.forceJSONP,jsonp:n.jsonp||this.jsonp,forceBase64:n.forceBase64||this.forceBase64,enablesXDR:n.enablesXDR||this.enablesXDR,timestampRequests:n.timestampRequests||this.timestampRequests,timestampParam:n.timestampParam||this.timestampParam,policyPort:n.policyPort||this.policyPort,pfx:n.pfx||this.pfx,key:n.key||this.key,passphrase:n.passphrase||this.passphrase,cert:n.cert||this.cert,ca:n.ca||this.ca,ciphers:n.ciphers||this.ciphers,rejectUnauthorized:n.rejectUnauthorized||this.rejectUnauthorized,perMessageDeflate:n.perMessageDeflate||this.perMessageDeflate,extraHeaders:n.extraHeaders||this.extraHeaders,forceNode:n.forceNode||this.forceNode,localAddress:n.localAddress||this.localAddress,requestTimeout:n.requestTimeout||this.requestTimeout,protocols:n.protocols||void 0})},r.prototype.open=function(){var e;if(this.rememberUpgrade&&r.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket"))e="websocket";else{if(0===this.transports.length){var t=this;return void setTimeout(function(){t.emit("error","No transports available")},0)}e=this.transports[0]}this.readyState="opening";try{e=this.createTransport(e)}catch(e){return this.transports.shift(),void this.open()}e.open(),this.setTransport(e)},r.prototype.setTransport=function(e){s("setting transport %s",e.name);var t=this;this.transport&&(s("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=e,e.on("drain",function(){t.onDrain()}).on("packet",function(e){t.onPacket(e)}).on("error",function(e){t.onError(e)}).on("close",function(){t.onClose("transport close")})},r.prototype.probe=function(e){function t(){if(p.onlyBinaryUpgrades){var t=!this.supportsBinary&&p.transport.supportsBinary;f=f||t}f||(s('probe transport "%s" opened',e),l.send([{type:"ping",data:"probe"}]),l.once("packet",function(t){if(!f)if("pong"===t.type&&"probe"===t.data){if(s('probe transport "%s" pong',e),p.upgrading=!0,p.emit("upgrading",l),!l)return;r.priorWebsocketSuccess="websocket"===l.name,s('pausing current transport "%s"',p.transport.name),p.transport.pause(function(){f||"closed"!==p.readyState&&(s("changing transport and sending upgrade packet"),c(),p.setTransport(l),l.send([{type:"upgrade"}]),p.emit("upgrade",l),l=null,p.upgrading=!1,p.flush())})}else{s('probe transport "%s" failed',e);var n=new Error("probe error");n.transport=l.name,p.emit("upgradeError",n)}}))}function n(){f||(f=!0,c(),l.close(),l=null)}function i(t){var r=new Error("probe error: "+t);r.transport=l.name,n(),s('probe transport "%s" failed because of error: %s',e,t),p.emit("upgradeError",r)}function o(){i("transport closed")}function a(){i("socket closed")}function u(e){l&&e.name!==l.name&&(s('"%s" works - aborting "%s"',e.name,l.name),n())}function c(){l.removeListener("open",t),l.removeListener("error",i),l.removeListener("close",o),p.removeListener("close",a),p.removeListener("upgrading",u)}s('probing transport "%s"',e);var l=this.createTransport(e,{probe:1}),f=!1,p=this;r.priorWebsocketSuccess=!1,l.once("open",t),l.once("error",i),l.once("close",o),this.once("close",a),this.once("upgrading",u),l.open()},r.prototype.onOpen=function(){if(s("socket open"),this.readyState="open",r.priorWebsocketSuccess="websocket"===this.transport.name,this.emit("open"),this.flush(),"open"===this.readyState&&this.upgrade&&this.transport.pause){s("starting upgrade probes");for(var e=0,t=this.upgrades.length;e<t;e++)this.probe(this.upgrades[e])}},r.prototype.onPacket=function(e){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(s('socket receive: type "%s", data "%s"',e.type,e.data),this.emit("packet",e),this.emit("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"pong":this.setPing(),this.emit("pong");break;case"error":var t=new Error("server error");t.code=e.data,this.onError(t);break;case"message":this.emit("data",e.data),this.emit("message",e.data)}else s('packet received with socket readyState "%s"',this.readyState)},r.prototype.onHandshake=function(e){this.emit("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this.upgrades=this.filterUpgrades(e.upgrades),this.pingInterval=e.pingInterval,this.pingTimeout=e.pingTimeout,this.onOpen(),"closed"!==this.readyState&&(this.setPing(),this.removeListener("heartbeat",this.onHeartbeat),this.on("heartbeat",this.onHeartbeat))},r.prototype.onHeartbeat=function(e){clearTimeout(this.pingTimeoutTimer);var t=this;t.pingTimeoutTimer=setTimeout(function(){"closed"!==t.readyState&&t.onClose("ping timeout")},e||t.pingInterval+t.pingTimeout)},r.prototype.setPing=function(){var e=this;clearTimeout(e.pingIntervalTimer),e.pingIntervalTimer=setTimeout(function(){s("writing ping packet - expecting pong within %sms",e.pingTimeout),e.ping(),e.onHeartbeat(e.pingTimeout)},e.pingInterval)},r.prototype.ping=function(){var e=this;this.sendPacket("ping",function(){e.emit("ping")})},r.prototype.onDrain=function(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,0===this.writeBuffer.length?this.emit("drain"):this.flush()},r.prototype.flush=function(){"closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length&&(s("flushing %d packets in socket",this.writeBuffer.length),this.transport.send(this.writeBuffer),this.prevBufferLen=this.writeBuffer.length,this.emit("flush"))},r.prototype.write=r.prototype.send=function(e,t,n){return this.sendPacket("message",e,t,n),this},r.prototype.sendPacket=function(e,t,n,r){if("function"===typeof t&&(r=t,t=void 0),"function"===typeof n&&(r=n,n=null),"closing"!==this.readyState&&"closed"!==this.readyState){n=n||{},n.compress=!1!==n.compress;var i={type:e,data:t,options:n};this.emit("packetCreate",i),this.writeBuffer.push(i),r&&this.once("flush",r),this.flush()}},r.prototype.close=function(){function e(){r.onClose("forced close"),s("socket closing - telling transport to close"),r.transport.close()}function t(){r.removeListener("upgrade",t),r.removeListener("upgradeError",t),e()}function n(){r.once("upgrade",t),r.once("upgradeError",t)}if("opening"===this.readyState||"open"===this.readyState){this.readyState="closing";var r=this;this.writeBuffer.length?this.once("drain",function(){this.upgrading?n():e()}):this.upgrading?n():e()}return this},r.prototype.onError=function(e){s("socket error %j",e),r.priorWebsocketSuccess=!1,this.emit("error",e),this.onClose("transport error",e)},r.prototype.onClose=function(e,t){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState){s('socket close with reason: "%s"',e);var n=this;clearTimeout(this.pingIntervalTimer),clearTimeout(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),this.readyState="closed",this.id=null,this.emit("close",e,t),n.writeBuffer=[],n.prevBufferLen=0}},r.prototype.filterUpgrades=function(e){for(var t=[],n=0,r=e.length;n<r;n++)~u(this.transports,e[n])&&t.push(e[n]);return t}}).call(t,n(13))},function(e,t){try{e.exports="undefined"!==typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(t){e.exports=!1}},function(e,t,n){(function(t){function r(){}function i(e){if(u.call(this,e),this.requestTimeout=e.requestTimeout,this.extraHeaders=e.extraHeaders,t.location){var n="https:"===location.protocol,r=location.port;r||(r=n?443:80),this.xd=e.hostname!==t.location.hostname||r!==e.port,this.xs=e.secure!==n}}function o(e){this.method=e.method||"GET",this.uri=e.uri,this.xd=!!e.xd,this.xs=!!e.xs,this.async=!1!==e.async,this.data=void 0!==e.data?e.data:null,this.agent=e.agent,this.isBinary=e.isBinary,this.supportsBinary=e.supportsBinary,this.enablesXDR=e.enablesXDR,this.requestTimeout=e.requestTimeout,this.pfx=e.pfx,this.key=e.key,this.passphrase=e.passphrase,this.cert=e.cert,this.ca=e.ca,this.ciphers=e.ciphers,this.rejectUnauthorized=e.rejectUnauthorized,this.extraHeaders=e.extraHeaders,this.create()}function a(){for(var e in o.requests)o.requests.hasOwnProperty(e)&&o.requests[e].abort()}var s=n(94),u=n(121),c=n(54),l=n(73),f=n(74)("engine.io-client:polling-xhr");e.exports=i,e.exports.Request=o,l(i,u),i.prototype.supportsBinary=!0,i.prototype.request=function(e){return e=e||{},e.uri=this.uri(),e.xd=this.xd,e.xs=this.xs,e.agent=this.agent||!1,e.supportsBinary=this.supportsBinary,e.enablesXDR=this.enablesXDR,e.pfx=this.pfx,e.key=this.key,e.passphrase=this.passphrase,e.cert=this.cert,e.ca=this.ca,e.ciphers=this.ciphers,e.rejectUnauthorized=this.rejectUnauthorized,e.requestTimeout=this.requestTimeout,e.extraHeaders=this.extraHeaders,new o(e)},i.prototype.doWrite=function(e,t){var n="string"!==typeof e&&void 0!==e,r=this.request({method:"POST",data:e,isBinary:n}),i=this;r.on("success",t),r.on("error",function(e){i.onError("xhr post error",e)}),this.sendXhr=r},i.prototype.doPoll=function(){f("xhr poll");var e=this.request(),t=this;e.on("data",function(e){t.onData(e)}),e.on("error",function(e){t.onError("xhr poll error",e)}),this.pollXhr=e},c(o.prototype),o.prototype.create=function(){var e={agent:this.agent,xdomain:this.xd,xscheme:this.xs,enablesXDR:this.enablesXDR};e.pfx=this.pfx,e.key=this.key,e.passphrase=this.passphrase,e.cert=this.cert,e.ca=this.ca,e.ciphers=this.ciphers,e.rejectUnauthorized=this.rejectUnauthorized;var n=this.xhr=new s(e),r=this;try{f("xhr open %s: %s",this.method,this.uri),n.open(this.method,this.uri,this.async);try{if(this.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(var i in this.extraHeaders)this.extraHeaders.hasOwnProperty(i)&&n.setRequestHeader(i,this.extraHeaders[i])}}catch(e){}if("POST"===this.method)try{this.isBinary?n.setRequestHeader("Content-type","application/octet-stream"):n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(e){}try{n.setRequestHeader("Accept","*/*")}catch(e){}"withCredentials"in n&&(n.withCredentials=!0),this.requestTimeout&&(n.timeout=this.requestTimeout),this.hasXDR()?(n.onload=function(){r.onLoad()},n.onerror=function(){r.onError(n.responseText)}):n.onreadystatechange=function(){if(2===n.readyState)try{var e=n.getResponseHeader("Content-Type");r.supportsBinary&&"application/octet-stream"===e&&(n.responseType="arraybuffer")}catch(e){}4===n.readyState&&(200===n.status||1223===n.status?r.onLoad():setTimeout(function(){r.onError(n.status)},0))},f("xhr data %s",this.data),n.send(this.data)}catch(e){return void setTimeout(function(){r.onError(e)},0)}t.document&&(this.index=o.requestsCount++,o.requests[this.index]=this)},o.prototype.onSuccess=function(){this.emit("success"),this.cleanup()},o.prototype.onData=function(e){this.emit("data",e),this.onSuccess()},o.prototype.onError=function(e){this.emit("error",e),this.cleanup(!0)},o.prototype.cleanup=function(e){if("undefined"!==typeof this.xhr&&null!==this.xhr){if(this.hasXDR()?this.xhr.onload=this.xhr.onerror=r:this.xhr.onreadystatechange=r,e)try{this.xhr.abort()}catch(e){}t.document&&delete o.requests[this.index],this.xhr=null}},o.prototype.onLoad=function(){var e;try{var t;try{t=this.xhr.getResponseHeader("Content-Type")}catch(e){}e="application/octet-stream"===t?this.xhr.response||this.xhr.responseText:this.xhr.responseText}catch(e){this.onError(e)}null!=e&&this.onData(e)},o.prototype.hasXDR=function(){return"undefined"!==typeof t.XDomainRequest&&!this.xs&&this.enablesXDR},o.prototype.abort=function(){this.cleanup()},o.requestsCount=0,o.requests={},t.document&&(t.attachEvent?t.attachEvent("onunload",a):t.addEventListener&&t.addEventListener("beforeunload",a,!1))}).call(t,n(13))},function(e,t){e.exports=Object.keys||function(e){var t=[],n=Object.prototype.hasOwnProperty;for(var r in e)n.call(e,r)&&t.push(r);return t}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t){e.exports=function(e,t,n){var r=e.byteLength;if(t=t||0,n=n||r,e.slice)return e.slice(t,n);if(t<0&&(t+=r),n<0&&(n+=r),n>r&&(n=r),t>=r||t>=n||0===r)return new ArrayBuffer(0);for(var i=new Uint8Array(e),o=new Uint8Array(n-t),a=t,s=0;a<n;a++,s++)o[s]=i[a];return o.buffer}},function(e,t){function n(e,t,n){function i(e,r){if(i.count<=0)throw new Error("after called too many times");--i.count,e?(o=!0,t(e),t=n):0!==i.count||o||t(null,r)}var o=!1;return n=n||r,i.count=e,0===e?t():i}function r(){}e.exports=n},function(e,t,n){(function(e,r){var i;!function(o){function a(e){for(var t,n,r=[],i=0,o=e.length;i<o;)t=e.charCodeAt(i++),t>=55296&&t<=56319&&i<o?(n=e.charCodeAt(i++),56320==(64512&n)?r.push(((1023&t)<<10)+(1023&n)+65536):(r.push(t),i--)):r.push(t);return r}function s(e){for(var t,n=e.length,r=-1,i="";++r<n;)t=e[r],t>65535&&(t-=65536,i+=x(t>>>10&1023|55296),t=56320|1023&t),i+=x(t);return i}function u(e,t){if(e>=55296&&e<=57343){if(t)throw Error("Lone surrogate U+"+e.toString(16).toUpperCase()+" is not a scalar value");return!1}return!0}function c(e,t){return x(e>>t&63|128)}function l(e,t){if(0==(4294967168&e))return x(e);var n="";return 0==(4294965248&e)?n=x(e>>6&31|192):0==(4294901760&e)?(u(e,t)||(e=65533),n=x(e>>12&15|224),n+=c(e,6)):0==(4292870144&e)&&(n=x(e>>18&7|240),n+=c(e,12),n+=c(e,6)),n+=x(63&e|128)}function f(e,t){t=t||{};for(var n,r=!1!==t.strict,i=a(e),o=i.length,s=-1,u="";++s<o;)n=i[s],u+=l(n,r);return u}function p(){if(b>=y)throw Error("Invalid byte index");var e=255&v[b];if(b++,128==(192&e))return 63&e;throw Error("Invalid continuation byte")}function h(e){var t,n,r,i,o;if(b>y)throw Error("Invalid byte index");if(b==y)return!1;if(t=255&v[b],b++,0==(128&t))return t;if(192==(224&t)){if(n=p(),(o=(31&t)<<6|n)>=128)return o;throw Error("Invalid continuation byte")}if(224==(240&t)){if(n=p(),r=p(),(o=(15&t)<<12|n<<6|r)>=2048)return u(o,e)?o:65533;throw Error("Invalid continuation byte")}if(240==(248&t)&&(n=p(),r=p(),i=p(),(o=(7&t)<<18|n<<12|r<<6|i)>=65536&&o<=1114111))return o;throw Error("Invalid UTF-8 detected")}function d(e,t){t=t||{};var n=!1!==t.strict;v=a(e),y=v.length,b=0;for(var r,i=[];!1!==(r=h(n));)i.push(r);return s(i)}var m="object"==typeof t&&t,g=("object"==typeof e&&e&&e.exports,"object"==typeof r&&r);var v,y,b,x=String.fromCharCode,w={version:"2.1.2",encode:f,decode:d};void 0!==(i=function(){return w}.call(t,n,t,e))&&(e.exports=i)}()}).call(t,n(223)(e),n(13))},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t){!function(){"use strict";for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n=new Uint8Array(256),r=0;r<e.length;r++)n[e.charCodeAt(r)]=r;t.encode=function(t){var n,r=new Uint8Array(t),i=r.length,o="";for(n=0;n<i;n+=3)o+=e[r[n]>>2],o+=e[(3&r[n])<<4|r[n+1]>>4],o+=e[(15&r[n+1])<<2|r[n+2]>>6],o+=e[63&r[n+2]];return i%3===2?o=o.substring(0,o.length-1)+"=":i%3===1&&(o=o.substring(0,o.length-2)+"=="),o},t.decode=function(e){var t,r,i,o,a,s=.75*e.length,u=e.length,c=0;"="===e[e.length-1]&&(s--,"="===e[e.length-2]&&s--);var l=new ArrayBuffer(s),f=new Uint8Array(l);for(t=0;t<u;t+=4)r=n[e.charCodeAt(t)],i=n[e.charCodeAt(t+1)],o=n[e.charCodeAt(t+2)],a=n[e.charCodeAt(t+3)],f[c++]=r<<2|i>>4,f[c++]=(15&i)<<4|o>>2,f[c++]=(3&o)<<6|63&a;return l}}()},function(e,t,n){(function(t){function n(e){for(var t=0;t<e.length;t++){var n=e[t];if(n.buffer instanceof ArrayBuffer){var r=n.buffer;if(n.byteLength!==r.byteLength){var i=new Uint8Array(n.byteLength);i.set(new Uint8Array(r,n.byteOffset,n.byteLength)),r=i.buffer}e[t]=r}}}function r(e,t){t=t||{};var r=new o;n(e);for(var i=0;i<e.length;i++)r.append(e[i]);return t.type?r.getBlob(t.type):r.getBlob()}function i(e,t){return n(e),new Blob(e,t||{})}var o=t.BlobBuilder||t.WebKitBlobBuilder||t.MSBlobBuilder||t.MozBlobBuilder,a=function(){try{return 2===new Blob(["hi"]).size}catch(e){return!1}}(),s=a&&function(){try{return 2===new Blob([new Uint8Array([1,2])]).size}catch(e){return!1}}(),u=o&&o.prototype.append&&o.prototype.getBlob;e.exports=function(){return a?s?t.Blob:i:u?r:void 0}()}).call(t,n(13))},function(e,t,n){function r(e){var n,r=0;for(n in e)r=(r<<5)-r+e.charCodeAt(n),r|=0;return t.colors[Math.abs(r)%t.colors.length]}function i(e){function n(){if(n.enabled){var e=n,r=+new Date,o=r-(i||r);e.diff=o,e.prev=i,e.curr=r,i=r;for(var a=new Array(arguments.length),s=0;s<a.length;s++)a[s]=arguments[s];a[0]=t.coerce(a[0]),"string"!==typeof a[0]&&a.unshift("%O");var u=0;a[0]=a[0].replace(/%([a-zA-Z%])/g,function(n,r){if("%%"===n)return n;u++;var i=t.formatters[r];if("function"===typeof i){var o=a[u];n=i.call(e,o),a.splice(u,1),u--}return n}),t.formatArgs.call(e,a);(n.log||t.log||console.log.bind(console)).apply(e,a)}}var i;return n.namespace=e,n.enabled=t.enabled(e),n.useColors=t.useColors(),n.color=r(e),n.destroy=o,"function"===typeof t.init&&t.init(n),t.instances.push(n),n}function o(){var e=t.instances.indexOf(this);return-1!==e&&(t.instances.splice(e,1),!0)}function a(e){t.save(e),t.names=[],t.skips=[];var n,r=("string"===typeof e?e:"").split(/[\s,]+/),i=r.length;for(n=0;n<i;n++)r[n]&&(e=r[n].replace(/\*/g,".*?"),"-"===e[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")));for(n=0;n<t.instances.length;n++){var o=t.instances[n];o.enabled=t.enabled(o.namespace)}}function s(){t.enable("")}function u(e){if("*"===e[e.length-1])return!0;var n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1}function c(e){return e instanceof Error?e.stack||e.message:e}t=e.exports=i.debug=i.default=i,t.coerce=c,t.disable=s,t.enable=a,t.enabled=u,t.humanize=n(92),t.instances=[],t.names=[],t.skips=[],t.formatters={}},function(e,t,n){(function(t){function r(){}function i(e){o.call(this,e),this.query=this.query||{},s||(t.___eio||(t.___eio=[]),s=t.___eio),this.index=s.length;var n=this;s.push(function(e){n.onData(e)}),this.query.j=this.index,t.document&&t.addEventListener&&t.addEventListener("beforeunload",function(){n.script&&(n.script.onerror=r)},!1)}var o=n(121),a=n(73);e.exports=i;var s,u=/\n/g,c=/\\n/g;a(i,o),i.prototype.supportsBinary=!1,i.prototype.doClose=function(){this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),this.form&&(this.form.parentNode.removeChild(this.form),this.form=null,this.iframe=null),o.prototype.doClose.call(this)},i.prototype.doPoll=function(){var e=this,t=document.createElement("script");this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),t.async=!0,t.src=this.uri(),t.onerror=function(t){e.onError("jsonp poll error",t)};var n=document.getElementsByTagName("script")[0];n?n.parentNode.insertBefore(t,n):(document.head||document.body).appendChild(t),this.script=t,"undefined"!==typeof navigator&&/gecko/i.test(navigator.userAgent)&&setTimeout(function(){var e=document.createElement("iframe");document.body.appendChild(e),document.body.removeChild(e)},100)},i.prototype.doWrite=function(e,t){function n(){r(),t()}function r(){if(i.iframe)try{i.form.removeChild(i.iframe)}catch(e){i.onError("jsonp polling iframe removal error",e)}try{var e='<iframe src="javascript:0" name="'+i.iframeId+'">';o=document.createElement(e)}catch(e){o=document.createElement("iframe"),o.name=i.iframeId,o.src="javascript:0"}o.id=i.iframeId,i.form.appendChild(o),i.iframe=o}var i=this;if(!this.form){var o,a=document.createElement("form"),s=document.createElement("textarea"),l=this.iframeId="eio_iframe_"+this.index;a.className="socketio",a.style.position="absolute",a.style.top="-1000px",a.style.left="-1000px",a.target=l,a.method="POST",a.setAttribute("accept-charset","utf-8"),s.name="d",a.appendChild(s),document.body.appendChild(a),this.form=a,this.area=s}this.form.action=this.uri(),r(),e=e.replace(c,"\\\n"),this.area.value=e.replace(u,"\\n");try{this.form.submit()}catch(e){}this.iframe.attachEvent?this.iframe.onreadystatechange=function(){"complete"===i.iframe.readyState&&n()}:this.iframe.onload=n}}).call(t,n(13))},function(e,t,n){(function(t){function r(e){e&&e.forceBase64&&(this.supportsBinary=!1),this.perMessageDeflate=e.perMessageDeflate,this.usingBrowserWebSocket=f&&!e.forceNode,this.protocols=e.protocols,this.usingBrowserWebSocket||(p=i),o.call(this,e)}var i,o=n(95),a=n(55),s=n(72),u=n(73),c=n(123),l=n(74)("engine.io-client:websocket"),f=t.WebSocket||t.MozWebSocket;if("undefined"===typeof window)try{i=n(229)}catch(e){}var p=f;p||"undefined"!==typeof window||(p=i),e.exports=r,u(r,o),r.prototype.name="websocket",r.prototype.supportsBinary=!0,r.prototype.doOpen=function(){if(this.check()){var e=this.uri(),t=this.protocols,n={agent:this.agent,perMessageDeflate:this.perMessageDeflate};n.pfx=this.pfx,n.key=this.key,n.passphrase=this.passphrase,n.cert=this.cert,n.ca=this.ca,n.ciphers=this.ciphers,n.rejectUnauthorized=this.rejectUnauthorized,this.extraHeaders&&(n.headers=this.extraHeaders),this.localAddress&&(n.localAddress=this.localAddress);try{this.ws=this.usingBrowserWebSocket?t?new p(e,t):new p(e):new p(e,t,n)}catch(e){return this.emit("error",e)}void 0===this.ws.binaryType&&(this.supportsBinary=!1),this.ws.supports&&this.ws.supports.binary?(this.supportsBinary=!0,this.ws.binaryType="nodebuffer"):this.ws.binaryType="arraybuffer",this.addEventListeners()}},r.prototype.addEventListeners=function(){var e=this;this.ws.onopen=function(){e.onOpen()},this.ws.onclose=function(){e.onClose()},this.ws.onmessage=function(t){e.onData(t.data)},this.ws.onerror=function(t){e.onError("websocket error",t)}},r.prototype.write=function(e){function n(){r.emit("flush"),setTimeout(function(){r.writable=!0,r.emit("drain")},0)}var r=this;this.writable=!1;for(var i=e.length,o=0,s=i;o<s;o++)!function(e){a.encodePacket(e,r.supportsBinary,function(o){if(!r.usingBrowserWebSocket){var a={};if(e.options&&(a.compress=e.options.compress),r.perMessageDeflate){("string"===typeof o?t.Buffer.byteLength(o):o.length)<r.perMessageDeflate.threshold&&(a.compress=!1)}}try{r.usingBrowserWebSocket?r.ws.send(o):r.ws.send(o,a)}catch(e){l("websocket closed before onclose event")}--i||n()})}(e[o])},r.prototype.onClose=function(){o.prototype.onClose.call(this)},r.prototype.doClose=function(){"undefined"!==typeof this.ws&&this.ws.close()},r.prototype.uri=function(){var e=this.query||{},t=this.secure?"wss":"ws",n="";return this.port&&("wss"===t&&443!==Number(this.port)||"ws"===t&&80!==Number(this.port))&&(n=":"+this.port),this.timestampRequests&&(e[this.timestampParam]=c()),this.supportsBinary||(e.b64=1),e=s.encode(e),e.length&&(e="?"+e),t+"://"+(-1!==this.hostname.indexOf(":")?"["+this.hostname+"]":this.hostname)+n+this.path+e},r.prototype.check=function(){return!!p&&!("__initialize"in p&&this.name===r.prototype.name)}}).call(t,n(13))},function(e,t){},function(e,t){function n(e,t){var n=[];t=t||0;for(var r=t||0;r<e.length;r++)n[r-t]=e[r];return n}e.exports=n},function(e,t){function n(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}e.exports=n,n.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=0==(1&Math.floor(10*t))?e-n:e+n}return 0|Math.min(e,this.max)},n.prototype.reset=function(){this.attempts=0},n.prototype.setMin=function(e){this.ms=e},n.prototype.setMax=function(e){this.max=e},n.prototype.setJitter=function(e){this.jitter=e}},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function o(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function a(e){return{title:"UiS Subsea 2018",selected:"welcome",isOpen:!1,updateState:e,items:{website:{value:"Website",ref:"https://sites.google.com/view/uissubsea/"},github:{value:"GitHub",ref:"https://github.com/mariusbrataas/uissubsea2018"},linkedin:{value:"LinkedIn",ref:"https://www.linkedin.com/company/uis-subsea/"},facebook:{value:"Facebook",ref:"https://www.facebook.com/uissubsea/"}},views:{dashboard:{value:"Dashboard"}},settingsOpen:!1,tinyviewsItems:{frontcenter:{value:"Front center cam"},frontleft:{value:"Left cam"},frontright:{value:"Right cam"},aft:{value:"Aft cam"},touchstick:{value:"Touch controller"}},tinyviewsOpen:!1,stopWatch:{intervalRef:null,seconds:null,current:"00:00",isActive:!1}}}t.b=a,n.d(t,"a",function(){return p});var s=n(7),u=n.n(s),c=n(26),l=(n.n(c),n(41)),f=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),p=function(e){function t(e){r(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.toggle=n.toggle.bind(n),n.camerasToggle=n.camerasToggle.bind(n),n.handleStartStopwatch=n.handleStartStopwatch.bind(n),n.state=e.data,n.serverdata=e.serverdata,n}return o(t,e),f(t,[{key:"toggle",value:function(){this.setState({isOpen:!this.state.isOpen})}},{key:"camerasToggle",value:function(){this.setState({tinyviewsOpen:!this.state.tinyviewsOpen})}},{key:"handleStartStopwatch",value:function(){var e=this;if(!this.state.stopWatch.isActive){var t="",n="";this.state.stopWatch.isActive=!0,this.state.updateState(this.state),this.state.stopWatch.seconds||(this.state.stopWatch.seconds=0),this.state.stopWatch.intervalRef=setInterval(function(){e.state.stopWatch.seconds++,t="".concat(Math.floor(e.state.stopWatch.seconds/60)),1==t.length&&(t="0".concat(t)),n="".concat(e.state.stopWatch.seconds%60),1==n.length&&(n="0".concat(n)),e.state.stopWatch.current="".concat(t).concat(":").concat(n),e.state.updateState(e.state)},1e3)}}},{key:"render",value:function(){var e=this;return u.a.createElement("div",null,u.a.createElement(l.s,{color:"light",light:!0,expand:"md",fixed:"top"},u.a.createElement(l.u,{onClick:this.toggle}),u.a.createElement(l.j,{isOpen:this.state.isOpen,navbar:!0},u.a.createElement(l.r,{className:"mr-auto",navbar:!0},u.a.createElement("div",{style:{padding:"2px 0px"}},u.a.createElement(l.a,{color:"primary",onClick:function(){e.state.selected="dashboard",e.state.updateState(e.state)}},"Dashboard")),u.a.createElement("div",{style:{padding:"2px 0px"}},u.a.createElement(l.b,{isOpen:this.state.tinyviewsOpen,toggle:this.camerasToggle,style:{padding:"0px 2px"}},u.a.createElement(l.m,{outline:!0,caret:!0,color:"primary"},"Displays"),u.a.createElement(l.l,{right:!0},Object.keys(this.state.tinyviewsItems).map(function(t){return u.a.createElement(l.k,{onClick:function(){e.state.selected=t,e.state.isOpen=!1,e.state.updateState(e.state)}},e.state.tinyviewsItems[t].value)})))),u.a.createElement("div",{style:{padding:"2px 0px"}},u.a.createElement(l.a,{outline:!0,color:"primary",onClick:function(){e.state.selected="controllers",e.state.updateState(e.state)}},"Controller settings"))),u.a.createElement(l.r,{className:"mc-auto",navbar:!0},u.a.createElement("div",{style:{padding:"2px 0px"}},u.a.createElement(l.a,{outline:!0,color:this.serverdata.healthy?this.serverdata.verified?"primary":"success":"danger",onClick:function(){e.state.selected="server",e.state.updateState(e.state)}},"Server settings")),this.serverdata.verified?u.a.createElement("div",{style:{padding:"2px 2px"}},u.a.createElement(l.a,{outline:!0,color:"danger",onClick:function(){console.log("Emergency stop")}},"Emergency stop")):null),this.state.stopWatch.isActive?u.a.createElement(l.r,{className:"ml-auto",navbar:!0},u.a.createElement("div",{style:{padding:"2px 2px"}},u.a.createElement(l.a,{color:"danger",onClick:function(){clearInterval(e.state.stopWatch.intervalRef),e.state.stopWatch.isActive=!1,e.state.stopWatch.seconds=null,e.state.stopWatch.current="00:00",e.state.updateState(e.state)}},"Stop")),u.a.createElement("div",{style:{padding:"2px 2px"}},u.a.createElement(l.a,{color:"secondary",onClick:function(){clearInterval(e.state.stopWatch.intervalRef),e.state.stopWatch.isActive=!1,e.state.updateState(e.state)}},"Pause"))):u.a.createElement(l.r,{className:"ml-auto",navbar:!0},u.a.createElement("div",null,u.a.createElement(l.a,{color:"success",onClick:function(){e.handleStartStopwatch()}},"Start"))),u.a.createElement("div",{style:{marginLeft:"5px",width:"100px"}},u.a.createElement(l.t,null,this.state.stopWatch.current)))))}}]),t}(s.Component)},function(e,t,n){"use strict";var r=n(89),i=n(70),o=n(234);e.exports=function(){function e(e,t,n,r,a,s){s!==o&&i(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return n.checkPropTypes=r,n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){var r,i;!function(){"use strict";function n(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var i=typeof r;if("string"===i||"number"===i)e.push(r);else if(Array.isArray(r))e.push(n.apply(null,r));else if("object"===i)for(var a in r)o.call(r,a)&&r[a]&&e.push(a)}}return e.join(" ")}var o={}.hasOwnProperty;"undefined"!==typeof e&&e.exports?e.exports=n:(r=[],void 0!==(i=function(){return n}.apply(t,r))&&(e.exports=i))}()},function(e,t,n){(function(t){function n(e){return null==e?void 0===e?p:l:x&&x in Object(e)?r(e):i(e)}function r(e){var t=v.call(e,x),n=e[x];try{e[x]=void 0;var r=!0}catch(e){}var i=y.call(e);return r&&(t?e[x]=n:delete e[x]),i}function i(e){return y.call(e)}function o(e){if(!a(e))return!1;var t=n(e);return t==u||t==c||t==s||t==f}function a(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}var s="[object AsyncFunction]",u="[object Function]",c="[object GeneratorFunction]",l="[object Null]",f="[object Proxy]",p="[object Undefined]",h="object"==typeof t&&t&&t.Object===Object&&t,d="object"==typeof self&&self&&self.Object===Object&&self,m=h||d||Function("return this")(),g=Object.prototype,v=g.hasOwnProperty,y=g.toString,b=m.Symbol,x=b?b.toStringTag:void 0;e.exports=o}).call(t,n(13))},function(e,t){function n(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}e.exports=n},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Arrow=t.Popper=t.Target=t.Manager=void 0;var i=n(239),o=r(i),a=n(240),s=r(a),u=n(241),c=r(u),l=n(243),f=r(l);t.Manager=o.default,t.Target=s.default,t.Popper=c.default,t.Arrow=f.default},function(e,t,n){"use strict";function r(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function a(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(7),c=n(33),l=function(e){return e&&e.__esModule?e:{default:e}}(c),f=function(e){function t(){var e,n,r,a;i(this,t);for(var s=arguments.length,u=Array(s),c=0;c<s;c++)u[c]=arguments[c];return n=r=o(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),r._setTargetNode=function(e){r._targetNode=e},r._getTargetNode=function(){return r._targetNode},a=n,o(r,a)}return a(t,e),s(t,[{key:"getChildContext",value:function(){return{popperManager:{setTargetNode:this._setTargetNode,getTargetNode:this._getTargetNode}}}},{key:"render",value:function(){var e=this.props,t=e.tag,n=e.children,i=r(e,["tag","children"]);return!1!==t?(0,u.createElement)(t,i,n):n}}]),t}(u.Component);f.childContextTypes={popperManager:l.default.object.isRequired},f.propTypes={tag:l.default.oneOfType([l.default.string,l.default.bool]),children:l.default.oneOfType([l.default.node,l.default.func])},f.defaultProps={tag:"div"},t.default=f},function(e,t,n){"use strict";function r(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=n(7),a=n(33),s=function(e){return e&&e.__esModule?e:{default:e}}(a),u=function(e,t){var n=e.component,a=void 0===n?"div":n,s=e.innerRef,u=e.children,c=r(e,["component","innerRef","children"]),l=t.popperManager,f=function(e){l.setTargetNode(e),"function"===typeof s&&s(e)};if("function"===typeof u){return u({targetProps:{ref:f},restProps:c})}var p=i({},c);return"string"===typeof a?p.ref=f:p.innerRef=f,(0,o.createElement)(a,p,u)};u.contextTypes={popperManager:s.default.object.isRequired},u.propTypes={component:s.default.oneOfType([s.default.node,s.default.func]),innerRef:s.default.func,children:s.default.oneOfType([s.default.node,s.default.func])},t.default=u},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function s(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(7),f=n(33),p=r(f),h=n(242),d=r(h),m=function(e){function t(){var e,n,r,i;o(this,t);for(var s=arguments.length,c=Array(s),l=0;l<s;l++)c[l]=arguments[l];return n=r=a(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(c))),r.state={},r._setArrowNode=function(e){r._arrowNode=e},r._getTargetNode=function(){return r.context.popperManager.getTargetNode()},r._getOffsets=function(e){return Object.keys(e.offsets).map(function(t){return e.offsets[t]})},r._isDataDirty=function(e){return!r.state.data||JSON.stringify(r._getOffsets(r.state.data))!==JSON.stringify(r._getOffsets(e))},r._updateStateModifier={enabled:!0,order:900,fn:function(e){return r._isDataDirty(e)&&r.setState({data:e}),e}},r._getPopperStyle=function(){var e=r.state.data;return r._popper&&e?u({position:e.offsets.popper.position},e.styles):{position:"absolute",pointerEvents:"none",opacity:0}},r._getPopperPlacement=function(){return r.state.data?r.state.data.placement:void 0},r._getPopperHide=function(){return r.state.data&&r.state.data.hide?"":void 0},r._getArrowStyle=function(){if(r.state.data&&r.state.data.offsets.arrow){var e=r.state.data.offsets.arrow;return{top:e.top,left:e.left}}return{}},r._handlePopperRef=function(e){r._popperNode=e,e?r._createPopper():r._destroyPopper(),r.props.innerRef&&r.props.innerRef(e)},r._scheduleUpdate=function(){r._popper&&r._popper.scheduleUpdate()},i=n,a(r,i)}return s(t,e),c(t,[{key:"getChildContext",value:function(){return{popper:{setArrowNode:this._setArrowNode,getArrowStyle:this._getArrowStyle}}}},{key:"componentDidUpdate",value:function(e){e.placement===this.props.placement&&e.eventsEnabled===this.props.eventsEnabled||(this._destroyPopper(),this._createPopper()),e.children!==this.props.children&&this._scheduleUpdate()}},{key:"componentWillUnmount",value:function(){this._destroyPopper()}},{key:"_createPopper",value:function(){var e=this,t=this.props,n=t.placement,r=t.eventsEnabled,i=u({},this.props.modifiers,{applyStyle:{enabled:!1},updateState:this._updateStateModifier});this._arrowNode&&(i.arrow={element:this._arrowNode}),this._popper=new d.default(this._getTargetNode(),this._popperNode,{placement:n,eventsEnabled:r,modifiers:i}),setTimeout(function(){return e._scheduleUpdate()})}},{key:"_destroyPopper",value:function(){this._popper&&this._popper.destroy()}},{key:"render",value:function(){var e=this.props,t=e.component,n=(e.innerRef,e.placement,e.eventsEnabled,e.modifiers,e.children),r=i(e,["component","innerRef","placement","eventsEnabled","modifiers","children"]),o=this._getPopperStyle(),a=this._getPopperPlacement(),s=this._getPopperHide();if("function"===typeof n){return n({popperProps:{ref:this._handlePopperRef,style:o,"data-placement":a,"data-x-out-of-boundaries":s},restProps:r,scheduleUpdate:this._scheduleUpdate})}var c=u({},r,{style:u({},r.style,o),"data-placement":a,"data-x-out-of-boundaries":s});return"string"===typeof t?c.ref=this._handlePopperRef:c.innerRef=this._handlePopperRef,(0,l.createElement)(t,c,n)}}]),t}(l.Component);m.contextTypes={popperManager:p.default.object.isRequired},m.childContextTypes={popper:p.default.object.isRequired},m.propTypes={component:p.default.oneOfType([p.default.node,p.default.func]),innerRef:p.default.func,placement:p.default.oneOf(d.default.placements),eventsEnabled:p.default.bool,modifiers:p.default.object,children:p.default.oneOfType([p.default.node,p.default.func])},m.defaultProps={component:"div",placement:"bottom",eventsEnabled:!0,modifiers:{}},t.default=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){function n(e){var t=!1;return function(){t||(t=!0,window.Promise.resolve().then(function(){t=!1,e()}))}}function r(e){var t=!1;return function(){t||(t=!0,setTimeout(function(){t=!1,e()},fe))}}function i(e){var t={};return e&&"[object Function]"===t.toString.call(e)}function o(e,t){if(1!==e.nodeType)return[];var n=getComputedStyle(e,null);return t?n[t]:n}function a(e){return"HTML"===e.nodeName?e:e.parentNode||e.host}function s(e){if(!e)return document.body;switch(e.nodeName){case"HTML":case"BODY":return e.ownerDocument.body;case"#document":return e.body}var t=o(e),n=t.overflow,r=t.overflowX;return/(auto|scroll|overlay)/.test(n+t.overflowY+r)?e:s(a(e))}function u(e){return 11===e?me:10===e?ge:me||ge}function c(e){if(!e)return document.documentElement;for(var t=u(10)?document.body:null,n=e.offsetParent;n===t&&e.nextElementSibling;)n=(e=e.nextElementSibling).offsetParent;var r=n&&n.nodeName;return r&&"BODY"!==r&&"HTML"!==r?-1!==["TD","TABLE"].indexOf(n.nodeName)&&"static"===o(n,"position")?c(n):n:e?e.ownerDocument.documentElement:document.documentElement}function l(e){var t=e.nodeName;return"BODY"!==t&&("HTML"===t||c(e.firstElementChild)===e)}function f(e){return null!==e.parentNode?f(e.parentNode):e}function p(e,t){if(!e||!e.nodeType||!t||!t.nodeType)return document.documentElement;var n=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,r=n?e:t,i=n?t:e,o=document.createRange();o.setStart(r,0),o.setEnd(i,0);var a=o.commonAncestorContainer;if(e!==a&&t!==a||r.contains(i))return l(a)?a:c(a);var s=f(e);return s.host?p(s.host,t):p(e,f(t).host)}function h(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top",n="top"===t?"scrollTop":"scrollLeft",r=e.nodeName;if("BODY"===r||"HTML"===r){var i=e.ownerDocument.documentElement;return(e.ownerDocument.scrollingElement||i)[n]}return e[n]}function d(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=h(t,"top"),i=h(t,"left"),o=n?-1:1;return e.top+=r*o,e.bottom+=r*o,e.left+=i*o,e.right+=i*o,e}function m(e,t){var n="x"===t?"Left":"Top",r="Left"===n?"Right":"Bottom";return parseFloat(e["border"+n+"Width"],10)+parseFloat(e["border"+r+"Width"],10)}function g(e,t,n,r){return Math.max(t["offset"+e],t["scroll"+e],n["client"+e],n["offset"+e],n["scroll"+e],u(10)?n["offset"+e]+r["margin"+("Height"===e?"Top":"Left")]+r["margin"+("Height"===e?"Bottom":"Right")]:0)}function v(){var e=document.body,t=document.documentElement,n=u(10)&&getComputedStyle(t);return{height:g("Height",e,t,n),width:g("Width",e,t,n)}}function y(e){return xe({},e,{right:e.left+e.width,bottom:e.top+e.height})}function b(e){var t={};try{if(u(10)){t=e.getBoundingClientRect();var n=h(e,"top"),r=h(e,"left");t.top+=n,t.left+=r,t.bottom+=n,t.right+=r}else t=e.getBoundingClientRect()}catch(e){}var i={left:t.left,top:t.top,width:t.right-t.left,height:t.bottom-t.top},a="HTML"===e.nodeName?v():{},s=a.width||e.clientWidth||i.right-i.left,c=a.height||e.clientHeight||i.bottom-i.top,l=e.offsetWidth-s,f=e.offsetHeight-c;if(l||f){var p=o(e);l-=m(p,"x"),f-=m(p,"y"),i.width-=l,i.height-=f}return y(i)}function x(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=u(10),i="HTML"===t.nodeName,a=b(e),c=b(t),l=s(e),f=o(t),p=parseFloat(f.borderTopWidth,10),h=parseFloat(f.borderLeftWidth,10);n&&"HTML"===t.nodeName&&(c.top=Math.max(c.top,0),c.left=Math.max(c.left,0));var m=y({top:a.top-c.top-p,left:a.left-c.left-h,width:a.width,height:a.height});if(m.marginTop=0,m.marginLeft=0,!r&&i){var g=parseFloat(f.marginTop,10),v=parseFloat(f.marginLeft,10);m.top-=p-g,m.bottom-=p-g,m.left-=h-v,m.right-=h-v,m.marginTop=g,m.marginLeft=v}return(r&&!n?t.contains(l):t===l&&"BODY"!==l.nodeName)&&(m=d(m,t)),m}function w(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.ownerDocument.documentElement,r=x(e,n),i=Math.max(n.clientWidth,window.innerWidth||0),o=Math.max(n.clientHeight,window.innerHeight||0),a=t?0:h(n),s=t?0:h(n,"left");return y({top:a-r.top+r.marginTop,left:s-r.left+r.marginLeft,width:i,height:o})}function N(e){var t=e.nodeName;return"BODY"!==t&&"HTML"!==t&&("fixed"===o(e,"position")||N(a(e)))}function E(e){if(!e||!e.parentElement||u())return document.documentElement;for(var t=e.parentElement;t&&"none"===o(t,"transform");)t=t.parentElement;return t||document.documentElement}function C(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o={top:0,left:0},u=i?E(e):p(e,t);if("viewport"===r)o=w(u,i);else{var c=void 0;"scrollParent"===r?(c=s(a(t)),"BODY"===c.nodeName&&(c=e.ownerDocument.documentElement)):c="window"===r?e.ownerDocument.documentElement:r;var l=x(c,u,i);if("HTML"!==c.nodeName||N(u))o=l;else{var f=v(),h=f.height,d=f.width;o.top+=l.top-l.marginTop,o.bottom=h+l.top,o.left+=l.left-l.marginLeft,o.right=d+l.left}}return o.left+=n,o.top+=n,o.right-=n,o.bottom-=n,o}function S(e){return e.width*e.height}function M(e,t,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===e.indexOf("auto"))return e;var a=C(n,r,o,i),s={top:{width:a.width,height:t.top-a.top},right:{width:a.right-t.right,height:a.height},bottom:{width:a.width,height:a.bottom-t.bottom},left:{width:t.left-a.left,height:a.height}},u=Object.keys(s).map(function(e){return xe({key:e},s[e],{area:S(s[e])})}).sort(function(e,t){return t.area-e.area}),c=u.filter(function(e){var t=e.width,r=e.height;return t>=n.clientWidth&&r>=n.clientHeight}),l=c.length>0?c[0].key:u[0].key,f=e.split("-")[1];return l+(f?"-"+f:"")}function T(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return x(n,r?E(t):p(t,n),r)}function O(e){var t=getComputedStyle(e),n=parseFloat(t.marginTop)+parseFloat(t.marginBottom),r=parseFloat(t.marginLeft)+parseFloat(t.marginRight);return{width:e.offsetWidth+r,height:e.offsetHeight+n}}function k(e){var t={left:"right",right:"left",bottom:"top",top:"bottom"};return e.replace(/left|right|bottom|top/g,function(e){return t[e]})}function A(e,t,n){n=n.split("-")[0];var r=O(e),i={width:r.width,height:r.height},o=-1!==["right","left"].indexOf(n),a=o?"top":"left",s=o?"left":"top",u=o?"height":"width",c=o?"width":"height";return i[a]=t[a]+t[u]/2-r[u]/2,i[s]=n===s?t[s]-r[c]:t[k(s)],i}function _(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function P(e,t,n){if(Array.prototype.findIndex)return e.findIndex(function(e){return e[t]===n});var r=_(e,function(e){return e[t]===n});return e.indexOf(r)}function R(e,t,n){return(void 0===n?e:e.slice(0,P(e,"name",n))).forEach(function(e){e.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var n=e.function||e.fn;e.enabled&&i(n)&&(t.offsets.popper=y(t.offsets.popper),t.offsets.reference=y(t.offsets.reference),t=n(t,e))}),t}function I(){if(!this.state.isDestroyed){var e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=T(this.state,this.popper,this.reference,this.options.positionFixed),e.placement=M(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),e.originalPlacement=e.placement,e.positionFixed=this.options.positionFixed,e.offsets.popper=A(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",e=R(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}function F(e,t){return e.some(function(e){var n=e.name;return e.enabled&&n===t})}function D(e){for(var t=[!1,"ms","Webkit","Moz","O"],n=e.charAt(0).toUpperCase()+e.slice(1),r=0;r<t.length;r++){var i=t[r],o=i?""+i+n:e;if("undefined"!==typeof document.body.style[o])return o}return null}function L(){return this.state.isDestroyed=!0,F(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.position="",this.popper.style.top="",this.popper.style.left="",this.popper.style.right="",this.popper.style.bottom="",this.popper.style.willChange="",this.popper.style[D("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function B(e){var t=e.ownerDocument;return t?t.defaultView:window}function z(e,t,n,r){var i="BODY"===e.nodeName,o=i?e.ownerDocument.defaultView:e;o.addEventListener(t,n,{passive:!0}),i||z(s(o.parentNode),t,n,r),r.push(o)}function j(e,t,n,r){n.updateBound=r,B(e).addEventListener("resize",n.updateBound,{passive:!0});var i=s(e);return z(i,"scroll",n.updateBound,n.scrollParents),n.scrollElement=i,n.eventsEnabled=!0,n}function U(){this.state.eventsEnabled||(this.state=j(this.reference,this.options,this.state,this.scheduleUpdate))}function q(e,t){return B(e).removeEventListener("resize",t.updateBound),t.scrollParents.forEach(function(e){e.removeEventListener("scroll",t.updateBound)}),t.updateBound=null,t.scrollParents=[],t.scrollElement=null,t.eventsEnabled=!1,t}function H(){this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=q(this.reference,this.state))}function W(e){return""!==e&&!isNaN(parseFloat(e))&&isFinite(e)}function V(e,t){Object.keys(t).forEach(function(n){var r="";-1!==["width","height","top","right","bottom","left"].indexOf(n)&&W(t[n])&&(r="px"),e.style[n]=t[n]+r})}function G(e,t){Object.keys(t).forEach(function(n){!1!==t[n]?e.setAttribute(n,t[n]):e.removeAttribute(n)})}function $(e){return V(e.instance.popper,e.styles),G(e.instance.popper,e.attributes),e.arrowElement&&Object.keys(e.arrowStyles).length&&V(e.arrowElement,e.arrowStyles),e}function Y(e,t,n,r,i){var o=T(i,t,e,n.positionFixed),a=M(n.placement,o,t,e,n.modifiers.flip.boundariesElement,n.modifiers.flip.padding);return t.setAttribute("x-placement",a),V(t,{position:n.positionFixed?"fixed":"absolute"}),n}function X(e,t){var n=t.x,r=t.y,i=e.offsets.popper,o=_(e.instance.modifiers,function(e){return"applyStyle"===e.name}).gpuAcceleration;void 0!==o&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var a=void 0!==o?o:t.gpuAcceleration,s=c(e.instance.popper),u=b(s),l={position:i.position},f={left:Math.floor(i.left),top:Math.round(i.top),bottom:Math.round(i.bottom),right:Math.floor(i.right)},p="bottom"===n?"top":"bottom",h="right"===r?"left":"right",d=D("transform"),m=void 0,g=void 0;if(g="bottom"===p?-u.height+f.bottom:f.top,m="right"===h?-u.width+f.right:f.left,a&&d)l[d]="translate3d("+m+"px, "+g+"px, 0)",l[p]=0,l[h]=0,l.willChange="transform";else{var v="bottom"===p?-1:1,y="right"===h?-1:1;l[p]=g*v,l[h]=m*y,l.willChange=p+", "+h}var x={"x-placement":e.placement};return e.attributes=xe({},x,e.attributes),e.styles=xe({},l,e.styles),e.arrowStyles=xe({},e.offsets.arrow,e.arrowStyles),e}function K(e,t,n){var r=_(e,function(e){return e.name===t}),i=!!r&&e.some(function(e){return e.name===n&&e.enabled&&e.order<r.order});if(!i){var o="`"+t+"`",a="`"+n+"`";console.warn(a+" modifier is required by "+o+" modifier in order to work, be sure to include it before "+o+"!")}return i}function Z(e,t){var n;if(!K(e.instance.modifiers,"arrow","keepTogether"))return e;var r=t.element;if("string"===typeof r){if(!(r=e.instance.popper.querySelector(r)))return e}else if(!e.instance.popper.contains(r))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),e;var i=e.placement.split("-")[0],a=e.offsets,s=a.popper,u=a.reference,c=-1!==["left","right"].indexOf(i),l=c?"height":"width",f=c?"Top":"Left",p=f.toLowerCase(),h=c?"left":"top",d=c?"bottom":"right",m=O(r)[l];u[d]-m<s[p]&&(e.offsets.popper[p]-=s[p]-(u[d]-m)),u[p]+m>s[d]&&(e.offsets.popper[p]+=u[p]+m-s[d]),e.offsets.popper=y(e.offsets.popper);var g=u[p]+u[l]/2-m/2,v=o(e.instance.popper),b=parseFloat(v["margin"+f],10),x=parseFloat(v["border"+f+"Width"],10),w=g-e.offsets.popper[p]-b-x;return w=Math.max(Math.min(s[l]-m,w),0),e.arrowElement=r,e.offsets.arrow=(n={},be(n,p,Math.round(w)),be(n,h,""),n),e}function J(e){return"end"===e?"start":"start"===e?"end":e}function Q(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=Ne.indexOf(e),r=Ne.slice(n+1).concat(Ne.slice(0,n));return t?r.reverse():r}function ee(e,t){if(F(e.instance.modifiers,"inner"))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var n=C(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement,e.positionFixed),r=e.placement.split("-")[0],i=k(r),o=e.placement.split("-")[1]||"",a=[];switch(t.behavior){case Ee.FLIP:a=[r,i];break;case Ee.CLOCKWISE:a=Q(r);break;case Ee.COUNTERCLOCKWISE:a=Q(r,!0);break;default:a=t.behavior}return a.forEach(function(s,u){if(r!==s||a.length===u+1)return e;r=e.placement.split("-")[0],i=k(r);var c=e.offsets.popper,l=e.offsets.reference,f=Math.floor,p="left"===r&&f(c.right)>f(l.left)||"right"===r&&f(c.left)<f(l.right)||"top"===r&&f(c.bottom)>f(l.top)||"bottom"===r&&f(c.top)<f(l.bottom),h=f(c.left)<f(n.left),d=f(c.right)>f(n.right),m=f(c.top)<f(n.top),g=f(c.bottom)>f(n.bottom),v="left"===r&&h||"right"===r&&d||"top"===r&&m||"bottom"===r&&g,y=-1!==["top","bottom"].indexOf(r),b=!!t.flipVariations&&(y&&"start"===o&&h||y&&"end"===o&&d||!y&&"start"===o&&m||!y&&"end"===o&&g);(p||v||b)&&(e.flipped=!0,(p||v)&&(r=a[u+1]),b&&(o=J(o)),e.placement=r+(o?"-"+o:""),e.offsets.popper=xe({},e.offsets.popper,A(e.instance.popper,e.offsets.reference,e.placement)),e=R(e.instance.modifiers,e,"flip"))}),e}function te(e){var t=e.offsets,n=t.popper,r=t.reference,i=e.placement.split("-")[0],o=Math.floor,a=-1!==["top","bottom"].indexOf(i),s=a?"right":"bottom",u=a?"left":"top",c=a?"width":"height";return n[s]<o(r[u])&&(e.offsets.popper[u]=o(r[u])-n[c]),n[u]>o(r[s])&&(e.offsets.popper[u]=o(r[s])),e}function ne(e,t,n,r){var i=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),o=+i[1],a=i[2];if(!o)return e;if(0===a.indexOf("%")){var s=void 0;switch(a){case"%p":s=n;break;case"%":case"%r":default:s=r}return y(s)[t]/100*o}if("vh"===a||"vw"===a){return("vh"===a?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*o}return o}function re(e,t,n,r){var i=[0,0],o=-1!==["right","left"].indexOf(r),a=e.split(/(\+|\-)/).map(function(e){return e.trim()}),s=a.indexOf(_(a,function(e){return-1!==e.search(/,|\s/)}));a[s]&&-1===a[s].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var u=/\s*,\s*|\s+/,c=-1!==s?[a.slice(0,s).concat([a[s].split(u)[0]]),[a[s].split(u)[1]].concat(a.slice(s+1))]:[a];return c=c.map(function(e,r){var i=(1===r?!o:o)?"height":"width",a=!1;return e.reduce(function(e,t){return""===e[e.length-1]&&-1!==["+","-"].indexOf(t)?(e[e.length-1]=t,a=!0,e):a?(e[e.length-1]+=t,a=!1,e):e.concat(t)},[]).map(function(e){return ne(e,i,t,n)})}),c.forEach(function(e,t){e.forEach(function(n,r){W(n)&&(i[t]+=n*("-"===e[r-1]?-1:1))})}),i}function ie(e,t){var n=t.offset,r=e.placement,i=e.offsets,o=i.popper,a=i.reference,s=r.split("-")[0],u=void 0;return u=W(+n)?[+n,0]:re(n,o,a,s),"left"===s?(o.top+=u[0],o.left-=u[1]):"right"===s?(o.top+=u[0],o.left+=u[1]):"top"===s?(o.left+=u[0],o.top-=u[1]):"bottom"===s&&(o.left+=u[0],o.top+=u[1]),e.popper=o,e}function oe(e,t){var n=t.boundariesElement||c(e.instance.popper);e.instance.reference===n&&(n=c(n));var r=D("transform"),i=e.instance.popper.style,o=i.top,a=i.left,s=i[r];i.top="",i.left="",i[r]="";var u=C(e.instance.popper,e.instance.reference,t.padding,n,e.positionFixed);i.top=o,i.left=a,i[r]=s,t.boundaries=u;var l=t.priority,f=e.offsets.popper,p={primary:function(e){var n=f[e];return f[e]<u[e]&&!t.escapeWithReference&&(n=Math.max(f[e],u[e])),be({},e,n)},secondary:function(e){var n="right"===e?"left":"top",r=f[n];return f[e]>u[e]&&!t.escapeWithReference&&(r=Math.min(f[n],u[e]-("right"===e?f.width:f.height))),be({},n,r)}};return l.forEach(function(e){var t=-1!==["left","top"].indexOf(e)?"primary":"secondary";f=xe({},f,p[t](e))}),e.offsets.popper=f,e}function ae(e){var t=e.placement,n=t.split("-")[0],r=t.split("-")[1];if(r){var i=e.offsets,o=i.reference,a=i.popper,s=-1!==["bottom","top"].indexOf(n),u=s?"left":"top",c=s?"width":"height",l={start:be({},u,o[u]),end:be({},u,o[u]+o[c]-a[c])};e.offsets.popper=xe({},a,l[r])}return e}function se(e){if(!K(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,n=_(e.instance.modifiers,function(e){return"preventOverflow"===e.name}).boundaries;if(t.bottom<n.top||t.left>n.right||t.top>n.bottom||t.right<n.left){if(!0===e.hide)return e;e.hide=!0,e.attributes["x-out-of-boundaries"]=""}else{if(!1===e.hide)return e;e.hide=!1,e.attributes["x-out-of-boundaries"]=!1}return e}function ue(e){var t=e.placement,n=t.split("-")[0],r=e.offsets,i=r.popper,o=r.reference,a=-1!==["left","right"].indexOf(n),s=-1===["top","left"].indexOf(n);return i[a?"left":"top"]=o[n]-(s?i[a?"width":"height"]:0),e.placement=k(t),e.offsets.popper=y(i),e}for(var ce="undefined"!==typeof window&&"undefined"!==typeof document,le=["Edge","Trident","Firefox"],fe=0,pe=0;pe<le.length;pe+=1)if(ce&&navigator.userAgent.indexOf(le[pe])>=0){fe=1;break}var he=ce&&window.Promise,de=he?n:r,me=ce&&!(!window.MSInputMethodContext||!document.documentMode),ge=ce&&/MSIE 10/.test(navigator.userAgent),ve=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},ye=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),be=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},xe=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},we=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],Ne=we.slice(3),Ee={FLIP:"flip",CLOCKWISE:"clockwise",COUNTERCLOCKWISE:"counterclockwise"},Ce={shift:{order:100,enabled:!0,fn:ae},offset:{order:200,enabled:!0,fn:ie,offset:0},preventOverflow:{order:300,enabled:!0,fn:oe,priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:te},arrow:{order:500,enabled:!0,fn:Z,element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:ee,behavior:"flip",padding:5,boundariesElement:"viewport"},inner:{order:700,enabled:!1,fn:ue},hide:{order:800,enabled:!0,fn:se},computeStyle:{order:850,enabled:!0,fn:X,gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:$,onLoad:Y,gpuAcceleration:void 0}},Se={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:Ce},Me=function(){function e(t,n){var r=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};ve(this,e),this.scheduleUpdate=function(){return requestAnimationFrame(r.update)},this.update=de(this.update.bind(this)),this.options=xe({},e.Defaults,o),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=t&&t.jquery?t[0]:t,this.popper=n&&n.jquery?n[0]:n,this.options.modifiers={},Object.keys(xe({},e.Defaults.modifiers,o.modifiers)).forEach(function(t){r.options.modifiers[t]=xe({},e.Defaults.modifiers[t]||{},o.modifiers?o.modifiers[t]:{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(e){return xe({name:e},r.options.modifiers[e])}).sort(function(e,t){return e.order-t.order}),this.modifiers.forEach(function(e){e.enabled&&i(e.onLoad)&&e.onLoad(r.reference,r.popper,r.options,e,r.state)}),this.update();var a=this.options.eventsEnabled;a&&this.enableEventListeners(),this.state.eventsEnabled=a}return ye(e,[{key:"update",value:function(){return I.call(this)}},{key:"destroy",value:function(){return L.call(this)}},{key:"enableEventListeners",value:function(){return U.call(this)}},{key:"disableEventListeners",value:function(){return H.call(this)}}]),e}();Me.Utils=("undefined"!==typeof window?window:e).PopperUtils,Me.placements=we,Me.Defaults=Se,t.default=Me}.call(t,n(13))},function(e,t,n){"use strict";function r(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=n(7),a=n(33),s=function(e){return e&&e.__esModule?e:{default:e}}(a),u=function(e,t){var n=e.component,a=void 0===n?"span":n,s=e.innerRef,u=e.children,c=r(e,["component","innerRef","children"]),l=t.popper,f=function(e){l.setArrowNode(e),"function"===typeof s&&s(e)},p=l.getArrowStyle();if("function"===typeof u){return u({arrowProps:{ref:f,style:p},restProps:c})}var h=i({},c,{style:i({},p,c.style)});return"string"===typeof a?h.ref=f:h.innerRef=f,(0,o.createElement)(a,h,u)};u.contextTypes={popper:s.default.object.isRequired},u.propTypes={component:s.default.oneOfType([s.default.node,s.default.func]),innerRef:s.default.func,children:s.default.oneOfType([s.default.node,s.default.func])},t.default=u},function(e,t){function n(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function r(e){return!!e&&"object"==typeof e}function i(e){return"symbol"==typeof e||r(e)&&d.call(e)==s}function o(e){if("number"==typeof e)return e;if(i(e))return a;if(n(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=n(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(u,"");var r=l.test(e);return r||f.test(e)?p(e.slice(2),r?2:8):c.test(e)?a:+e}var a=NaN,s="[object Symbol]",u=/^\s+|\s+$/g,c=/^[-+]0x[0-9a-f]+$/i,l=/^0b[01]+$/i,f=/^0o[0-7]+$/i,p=parseInt,h=Object.prototype,d=h.toString;e.exports=o},function(e,t,n){"use strict";var r=n(128);n(249);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function o(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(7),s=n.n(a),u=n(33),c=n.n(u),l=n(53),f=n.n(l),p=n(247),h=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),d=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,e),h(t,[{key:"componentWillUnmount",value:function(){this.defaultNode&&document.body.removeChild(this.defaultNode),this.defaultNode=null}},{key:"render",value:function(){return p.a?(this.props.node||this.defaultNode||(this.defaultNode=document.createElement("div"),document.body.appendChild(this.defaultNode)),f.a.createPortal(this.props.children,this.props.node||this.defaultNode)):null}}]),t}(s.a.Component);d.propTypes={children:c.a.node.isRequired,node:c.a.any},t.a=d},function(e,t,n){"use strict";n.d(t,"a",function(){return r});var r=!("undefined"===typeof window||!window.document||!window.document.createElement)},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function o(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(7),s=n.n(a),u=n(53),c=n.n(u),l=n(33),f=n.n(l),p=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),h=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,e),p(t,[{key:"componentDidMount",value:function(){this.renderPortal()}},{key:"componentDidUpdate",value:function(e){this.renderPortal()}},{key:"componentWillUnmount",value:function(){c.a.unmountComponentAtNode(this.defaultNode||this.props.node),this.defaultNode&&document.body.removeChild(this.defaultNode),this.defaultNode=null,this.portal=null}},{key:"renderPortal",value:function(e){this.props.node||this.defaultNode||(this.defaultNode=document.createElement("div"),document.body.appendChild(this.defaultNode));var t=this.props.children;"function"===typeof this.props.children.type&&(t=s.a.cloneElement(this.props.children)),this.portal=c.a.unstable_renderSubtreeIntoContainer(this,t,this.props.node||this.defaultNode)}},{key:"render",value:function(){return null}}]),t}(s.a.Component);t.a=h,h.propTypes={children:f.a.node.isRequired,node:f.a.any}},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function o(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(7),s=n.n(a),u=n(33),c=n.n(u),l=n(128),f=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),p={ESCAPE:27},h=function(e){function t(e){r(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.portalNode=null,n.state={active:!!e.defaultOpen},n.openPortal=n.openPortal.bind(n),n.closePortal=n.closePortal.bind(n),n.wrapWithPortal=n.wrapWithPortal.bind(n),n.handleOutsideMouseClick=n.handleOutsideMouseClick.bind(n),n.handleKeydown=n.handleKeydown.bind(n),n}return o(t,e),f(t,[{key:"componentDidMount",value:function(){this.props.closeOnEsc&&document.addEventListener("keydown",this.handleKeydown),this.props.closeOnOutsideClick&&document.addEventListener("click",this.handleOutsideMouseClick)}},{key:"componentWillUnmount",value:function(){this.props.closeOnEsc&&document.removeEventListener("keydown",this.handleKeydown),this.props.closeOnOutsideClick&&document.removeEventListener("click",this.handleOutsideMouseClick)}},{key:"openPortal",value:function(e){this.state.active||(e&&e.nativeEvent&&e.nativeEvent.stopImmediatePropagation(),this.setState({active:!0},this.props.onOpen))}},{key:"closePortal",value:function(){this.state.active&&this.setState({active:!1},this.props.onClose)}},{key:"wrapWithPortal",value:function(e){var t=this;return this.state.active?s.a.createElement(l.a,{node:this.props.node,key:"react-portal",ref:function(e){return t.portalNode=e}},e):null}},{key:"handleOutsideMouseClick",value:function(e){if(this.state.active){var t=this.portalNode.props.node||this.portalNode.defaultNode;!t||t.contains(e.target)||e.button&&0!==e.button||this.closePortal()}}},{key:"handleKeydown",value:function(e){e.keyCode===p.ESCAPE&&this.state.active&&this.closePortal()}},{key:"render",value:function(){return this.props.children({openPortal:this.openPortal,closePortal:this.closePortal,portal:this.wrapWithPortal,isOpen:this.state.active})}}]),t}(s.a.Component);h.propTypes={children:c.a.func.isRequired,defaultOpen:c.a.bool,node:c.a.any,openByClickOn:c.a.element,closeOnEsc:c.a.bool,closeOnOutsideClick:c.a.bool,onOpen:c.a.func,onClose:c.a.func},h.defaultProps={onOpen:function(){},onClose:function(){}}},function(e,t,n){"use strict";function r(e,t){return{updateState:e,getState:t,title:"UiS Subsea 2018",subtitle:"University of Stavanger",contents:{1:"UiS Subsea is an innovative student organization at the University of Stavanger. As the first norwegian team we competed in the MATE ROV Competition in Alpena, MI, USA, in June 2014 and again in 2015 when the competition was hosted at the Memorial University in St. Johns, Canada.",2:"October 13th 2015, the first Subsea Day was hosted at the University of Stavanger by UiS Subsea, with hopes of raising the awareness of the subsea industry among our fellow students.",3:"In 2016 we are aiming to compete in two separate student competitions, the MATE Competition and the SAUC-E for autonomous underwater vehicles, as well as hosting the Subsea Day. The 15th annual MATE international competition will take place at the NASA Johnson Space Centers Neutral Buoyancy Lab June 23-25 2016. More information about the competition can be found at www.marinetech.org.",4:"The team currently consists of 30 students from several engineering and business disciplines. The product development process will be the baseline for a wide range of bachelors and masters theses within engineering.",5:"For more information visit www.uissubsea.no"},load:60}}t.a=r,n.d(t,"b",function(){return l});var i=n(7),o=n.n(i),a=n(90),s=(n.n(a),n(26)),u=(n.n(s),n(41)),c=n(129),l=function(e){var t=e.data;return o.a.createElement("div",{style:{padding:"30px"}},o.a.createElement(u.p,{style:{borderLeft:"5px solid #0d75ee"}},o.a.createElement("h1",{className:"display-3"},t.title),o.a.createElement("p",{className:"lead"},t.subtitle),o.a.createElement("hr",{className:"my-2"}),Object.keys(t.contents).map(function(e){return o.a.createElement("p",null,t.contents[e])}),o.a.createElement("hr",{className:"my-2"}),e.serverdata.verified?o.a.createElement("div",null,o.a.createElement(u.a,{outline:!0,color:"primary",onClick:function(){e.navdata.selected="server",e.navdata.updateState(e.navdata)}},"Server settings")):o.a.createElement("div",{style:{maxWidth:"300px"}},o.a.createElement(c.d,{data:e.serverdata}))))}},function(e,t,n){"use strict";function r(e,t,n,r,i,o,a){return{title:"Dashboard",subtitle:"Not finished.",updateState:e,getState:t,camPosListener:r,leftStickListener:i,rightStickListener:o,centerStickListener:a,loads:{flv:0,frv:0,alv:0,arv:0,flh:0,frh:0,alh:0,arh:0},sendThrusts:n,flighttrack:new p.a,currentflightdata:{}}}t.b=r,n.d(t,"a",function(){return h});var i=n(7),o=n.n(i),a=n(26),s=(n.n(a),n(41)),u=n(252),c=(n.n(u),n(130)),l=n.n(c),f=n(131),p=n(255),h=(n(678).Line,function(e){var t=e.data,n=e.data.loads;return o.a.createElement("div",{style:{padding:"20px"}},o.a.createElement("h1",{className:"display-3"},"Dashboard"),o.a.createElement(s.f,null,o.a.createElement(s.d,null,o.a.createElement(f.a,{sendThrusts:t.sendThrusts,flv:n.flv,frv:n.frv,alv:n.alv,arv:n.arv,flh:n.flh,frh:n.frh,alh:n.alh,arh:n.arh})),o.a.createElement(s.d,{style:{minHeight:"60vh"}},o.a.createElement(l.a,{options:{mode:"static",catchDistance:1e3,color:"gray",position:{left:"50%",top:"50%"},lockX:!0},containerStyle:{position:"absolute",height:"100%",width:"100%"},managerListener:t.camPosListener})),o.a.createElement(s.d,null,o.a.createElement(s.e,null,o.a.createElement(s.i,null,"Quick access"),o.a.createElement("div",{style:{padding:"2px 2px"}},o.a.createElement(s.c,null,o.a.createElement(s.a,{color:"danger",onClick:function(){e.serverdata.sock.emit("Lights off",!0)}},"Lights off"),o.a.createElement(s.a,{color:"primary",onClick:function(){e.serverdata.sock.emit("Lights on",!0)}},"Lights on"))),o.a.createElement("div",{style:{padding:"2px 2px"}},o.a.createElement(s.c,null,o.a.createElement(s.a,{color:"danger",onClick:function(){e.serverdata.sock.emit("Toggle motorcontrollers",!0)}},"Thrusters off"),o.a.createElement(s.a,{color:"primary",onClick:function(){e.serverdata.sock.emit("Toggle motorcontrollers",!1)}},"Thrusters on"))),o.a.createElement("div",{style:{padding:"2px 2px"}},o.a.createElement(s.c,null,o.a.createElement(s.a,{color:"danger",onClick:function(){e.serverdata.sock.emit("Soundbox off")}},"Nicolai off"),o.a.createElement(s.a,{color:"primary",onClick:function(){e.serverdata.sock.emit("Soundbox on")}},"Nicolai on"))),o.a.createElement("div",{style:{padding:"2px 2px"}},o.a.createElement(s.c,null,o.a.createElement(s.a,{color:"danger",onClick:function(){e.serverdata.sock.emit("Precision off")}},"Precision off"),o.a.createElement(s.a,{color:"primary",onClick:function(){e.serverdata.sock.emit("Precision on")}},"Precision on"))),o.a.createElement("div",{style:{padding:"2px 2px",marginTop:"30px"}},o.a.createElement("p",null,"Precision: ",e.serverdata.configs.canbus.multiplier),o.a.createElement(s.c,null,[.1,.2,.3,.4,.5,.6].map(function(t){return o.a.createElement(s.a,{color:"primary",onClick:function(){var n=e.serverdata.getState();n.configs.canbus.normalMult=t,n.sock.emit("upstreamConfigs",n.configs)}},t)})))))),o.a.createElement(s.f,{style:{marginTop:"10px"}},o.a.createElement(s.d,{style:{maxWidth:"50vw"}},o.a.createElement(s.e,null,o.a.createElement("div",{style:{height:"65vh",overflow:"scroll"}},o.a.createElement(s.i,null,"Flight finder"),o.a.createElement(s.h,null,"Search at:"),t.flighttrack.renderDirections(),o.a.createElement("hr",{className:"my-2"}),o.a.createElement("div",{style:{marginTop:"0px",marginBottom:"15px"}},o.a.createElement(s.q,null,"Heading"),o.a.createElement(s.o,{placeholder:"Heading",onChange:function(e){t.currentflightdata.heading=e.target.value;var n=t.getState();n.currentflightdata=t.currentflightdata,t.updateState(n)}})),o.a.createElement("div",{style:{marginTop:"0px",marginBottom:"15px"}},o.a.createElement(s.q,null,"Air speed"),o.a.createElement(s.o,{placeholder:"Air speed",onChange:function(e){t.currentflightdata.airspeed=e.target.value;var n=t.getState();n.currentflightdata=t.currentflightdata,t.updateState(n)}})),o.a.createElement("div",{style:{marginTop:"0px",marginBottom:"15px"}},o.a.createElement(s.q,null,"Ascent rate"),o.a.createElement(s.o,{placeholder:"Ascent rate",onChange:function(e){t.currentflightdata.ascentrate=e.target.value;var n=t.getState();n.currentflightdata=t.currentflightdata,t.updateState(n)}})),o.a.createElement("div",{style:{marginTop:"0px",marginBottom:"15px"}},o.a.createElement(s.q,null,"Timestep"),o.a.createElement(s.o,{placeholder:"Timestep",onChange:function(e){t.currentflightdata.timestep=e.target.value;var n=t.getState();n.currentflightdata=t.currentflightdata,t.updateState(n)}})),o.a.createElement("div",{style:{marginTop:"0px",marginBottom:"15px"}},o.a.createElement(s.q,null,"Wind from"),o.a.createElement(s.o,{placeholder:"Wind from direction",onChange:function(e){t.currentflightdata.windfrom=e.target.value;var n=t.getState();n.currentflightdata=t.currentflightdata,t.updateState(n)}})),o.a.createElement("div",{style:{marginTop:"0px",marginBottom:"15px"}},o.a.createElement(s.q,null,"Wind speed"),o.a.createElement(s.o,{placeholder:"Wind speed",onChange:function(e){t.currentflightdata.windspeed=e.target.value;var n=t.getState();n.currentflightdata=t.currentflightdata,t.updateState(n)}})),o.a.createElement(s.a,{color:"primary",onClick:function(){var e=t.getState();e.currentflightdata=t.currentflightdata,e.flighttrack.step(t.currentflightdata.heading,t.currentflightdata.airspeed,t.currentflightdata.ascentrate,t.currentflightdata.timestep,t.currentflightdata.windfrom,t.currentflightdata.windspeed),t.updateState(e)}},"Calculate"),o.a.createElement(s.a,{color:"danger",onClick:function(){var e=t.getState();e.currentflightdata={},e.flighttrack=new p.a,t.updateState(e)}},"Clear data"))))))})},function(e,t,n){!function(t,r){e.exports=r(n(7))}(0,function(e){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="/",t(0)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),i=function(e){return e&&e.__esModule?e:{default:e}}(r);t.default=i.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function a(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(){}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(2),l=r(c),f=n(3),p=r(f),h=n(12),d=r(h),m=n(13),g=r(m),v=n(14),y=r(v),b=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={drag:!1},n.onInteractionStart=n.onInteractionStart.bind(n),n.onMouseOrTouchMove=n.onMouseOrTouchMove.bind(n),n.onInteractionEnd=n.onInteractionEnd.bind(n),n}return a(t,e),u(t,[{key:"componentWillMount",value:function(){this.updateStateFromProps(this.props)}},{key:"componentDidMount",value:function(){"noOp"===this.props.onChange.name&&console.warn("A react-simple-range component was not provided an onChange prop.\n        \nRecommend passing down a function as onChange else this component is purely cosmetic")}},{key:"componentWillReceiveProps",value:function(e){this.updateStateFromProps(e)}},{key:"onInteractionStart",value:function(e){var t=void 0!==e.touches?"touch":"mouse";"mouse"===t&&0!==e.button||(this.updateSliderValue(e,t),this.setState({drag:!0,displayLabel:!0}),this.addEvents(t),e.preventDefault())}},{key:"onInteractionEnd",value:function(){this.setState({drag:!1,displayLabel:!1}),this.props.onChangeComplete(this.state),this.removeEvents()}},{key:"onMouseOrTouchMove",value:function(e){var t=void 0!==e.touches?"touch":"mouse";this.state.drag&&(this.updateSliderValue(e,t),e.stopPropagation())}},{key:"getSliderInfo",value:function(){var e=this.refs.slider;return{bounds:e.getBoundingClientRect(),length:e.clientWidth,height:e.clientHeight}}},{key:"addEvents",value:function(e){switch(e){case"mouse":document.addEventListener("mousemove",this.onMouseOrTouchMove),document.addEventListener("mouseup",this.onInteractionEnd);break;case"touch":document.addEventListener("touchmove",this.onMouseOrTouchMove),document.addEventListener("touchend",this.onInteractionEnd)}}},{key:"removeEvents",value:function(){document.removeEventListener("mousemove",this.onMouseOrTouchMove),document.removeEventListener("mouseup",this.onInteractionEnd),document.removeEventListener("touchmove",this.onMouseOrTouchMove),document.removeEventListener("touchend",this.onInteractionEnd)}},{key:"updateSliderValue",value:function(e,t){var n=this.state,r=n.max,i=n.min,o=this.props.vertical,a=this.state.value,s=("touch"!==t?e.pageX:e.touches[0].pageX)-window.pageXOffset,u=("touch"!==t?e.pageY:e.touches[0].pageY)-window.pageYOffset,c=void 0,l=void 0;o?(l=this.getSliderInfo().height,c=l-(u-this.getSliderInfo().bounds.top)):(c=s-this.getSliderInfo().bounds.left,l=this.getSliderInfo().length);var f=this.clampValue(+(c/l).toFixed(2),0,1),p=this.valueFromPercent(f);if((a=this.calculateMatchingNotch(p))!==this.state.value){var h=100*(a-i)/(r-i);this.setState({percent:f,value:a,ratio:h},this.handleChange)}}},{key:"handleChange",value:function(){this.props.onChange(this.state)}},{key:"valueFromPercent",value:function(e){var t=this.state;return t.range*e+t.min}},{key:"calculateMatchingNotch",value:function(e){for(var t=this.state,n=t.step,r=t.max,i=t.min,o=[],a=i;a<=r;a++)o.push(a);var s=[],u=!0,c=!1,l=void 0;try{for(var f,p=o[Symbol.iterator]();!(u=(f=p.next()).done);u=!0){var h=f.value;h!==i&&h!==r&&h%n!==0||s.push(h)}}catch(e){c=!0,l=e}finally{try{!u&&p.return&&p.return()}finally{if(c)throw l}}return s.reduce(function(t,n){return Math.abs(n-e)<Math.abs(t-e)?n:t})}},{key:"clampValue",value:function(e,t,n){return Math.max(t,Math.min(e,n))}},{key:"updateStateFromProps",value:function(e){var t=e.value,n=e.thumbSize;void 0===t&&(t=void 0!==e.defaultValue?e.defaultValue:0),void 0===e.thumbSize&&(n=this.props.disableThumb?0:2*e.sliderSize);var r=e.min,i=e.max,o=e.step,a=e.id,s=i-r,u=100*Math.max(t-r,0)/(i-r);this.setState({value:t,min:r,max:i,range:s,step:o,ratio:u,thumbSize:n,id:a})}},{key:"render",value:function(){var e=this.props,t=e.vertical,n=e.sliderSize,r=e.disableThumb,i=e.disableTrack,o=e.children,a=e.label,s=e.trackColor,u=e.thumbColor,c=e.verticalSliderHeight,f=e.eventWrapperPadding,p={height:"100%",position:"relative",cursor:"pointer",margin:"0 auto",get padding(){return t?"0 "+f+"px":f+"px 0"},get width(){return t?n+"px":"auto"}},h={backgroundColor:this.props.sliderColor,position:"relative",overflow:"visible",get height(){return t?c:n+"px"},get width(){return t?n+"px":"100%"}};return l.default.createElement("div",{style:p,onMouseDown:this.onInteractionStart,onTouchStart:this.onInteractionStart},l.default.createElement("div",{ref:"slider",style:h},i?null:l.default.createElement(y.default,{trackLength:this.state.ratio,color:s,vertical:t}),a&&this.state.displayLabel?l.default.createElement(g.default,{position:this.state.ratio,vertical:t,color:s,value:this.state.value,sliderSize:n,thumbSize:this.state.thumbSize}):null,l.default.createElement(d.default,{position:this.state.ratio,vertical:t,customThumb:o,thumbSize:this.state.thumbSize,sliderSize:n,color:u,disableThumb:r,value:this.state.value})))}}]),t}(c.Component);b.propTypes={children:p.default.element,min:p.default.number,max:p.default.number,step:p.default.number,value:p.default.number,defaultValue:p.default.number,onChange:p.default.func,onChangeComplete:p.default.func,vertical:p.default.bool,verticalSliderHeight:p.default.string,eventWrapperPadding:p.default.number,label:p.default.bool,disableTrack:p.default.bool,disableThumb:p.default.bool,sliderColor:p.default.string,trackColor:p.default.string,thumbColor:p.default.string,sliderSize:p.default.number,thumbSize:p.default.number,id:p.default.string},b.defaultProps={min:0,max:100,step:1,onChange:s,onChangeComplete:s,vertical:!1,verticalSliderHeight:"100px",eventWrapperPadding:8,label:!1,disableTrack:!1,disableThumb:!1,sliderColor:"#B9B9B9",trackColor:"#009688",thumbColor:"#009688",sliderSize:4,id:null},t.default=b},function(t,n){t.exports=e},function(e,t,n){var r="function"===typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,i=function(e){return"object"===typeof e&&null!==e&&e.$$typeof===r};e.exports=n(4)(i,!0)},function(e,t,n){"use strict";var r=n(5),i=n(6),o=n(7),a=n(8),s=n(9),u=n(10);e.exports=function(e,t){function n(e){var t=e&&(M&&e[M]||e[T]);if("function"===typeof t)return t}function c(e,t){return e===t?0!==e||1/e===1/t:e!==e&&t!==t}function l(e){this.message=e,this.stack=""}function f(e){function n(n,u,c,f,p,h,d){if(f=f||O,h=h||c,d!==s)if(t)i(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");else if("undefined"!==typeof console){var m=f+":"+c;!r[m]&&a<3&&(o(!1,"You are manually calling a React.PropTypes validation function for the `%s` prop on `%s`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details.",h,f),r[m]=!0,a++)}return null==u[c]?n?new l(null===u[c]?"The "+p+" `"+h+"` is marked as required in `"+f+"`, but its value is `null`.":"The "+p+" `"+h+"` is marked as required in `"+f+"`, but its value is `undefined`."):null:e(u,c,f,p,h)}var r={},a=0,u=n.bind(null,!1);return u.isRequired=n.bind(null,!0),u}function p(e){function t(t,n,r,i,o,a){var s=t[n];if(N(s)!==e)return new l("Invalid "+i+" `"+o+"` of type `"+E(s)+"` supplied to `"+r+"`, expected `"+e+"`.");return null}return f(t)}function h(e){function t(t,n,r,i,o){if("function"!==typeof e)return new l("Property `"+o+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var a=t[n];if(!Array.isArray(a)){return new l("Invalid "+i+" `"+o+"` of type `"+N(a)+"` supplied to `"+r+"`, expected an array.")}for(var u=0;u<a.length;u++){var c=e(a,u,r,i,o+"["+u+"]",s);if(c instanceof Error)return c}return null}return f(t)}function d(e){function t(t,n,r,i,o){if(!(t[n]instanceof e)){var a=e.name||O;return new l("Invalid "+i+" `"+o+"` of type `"+S(t[n])+"` supplied to `"+r+"`, expected instance of `"+a+"`.")}return null}return f(t)}function m(e){function t(t,n,r,i,o){for(var a=t[n],s=0;s<e.length;s++)if(c(a,e[s]))return null;return new l("Invalid "+i+" `"+o+"` of value `"+a+"` supplied to `"+r+"`, expected one of "+JSON.stringify(e)+".")}return Array.isArray(e)?f(t):(o(!1,"Invalid argument supplied to oneOf, expected an instance of array."),r.thatReturnsNull)}function g(e){function t(t,n,r,i,o){if("function"!==typeof e)return new l("Property `"+o+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var a=t[n],u=N(a);if("object"!==u)return new l("Invalid "+i+" `"+o+"` of type `"+u+"` supplied to `"+r+"`, expected an object.");for(var c in a)if(a.hasOwnProperty(c)){var f=e(a,c,r,i,o+"."+c,s);if(f instanceof Error)return f}return null}return f(t)}function v(e){function t(t,n,r,i,o){for(var a=0;a<e.length;a++){if(null==(0,e[a])(t,n,r,i,o,s))return null}return new l("Invalid "+i+" `"+o+"` supplied to `"+r+"`.")}if(!Array.isArray(e))return o(!1,"Invalid argument supplied to oneOfType, expected an instance of array."),r.thatReturnsNull;for(var n=0;n<e.length;n++){var i=e[n];if("function"!==typeof i)return o(!1,"Invalid argument supplied to oneOfType. Expected an array of check functions, but received %s at index %s.",C(i),n),r.thatReturnsNull}return f(t)}function y(e){function t(t,n,r,i,o){var a=t[n],u=N(a);if("object"!==u)return new l("Invalid "+i+" `"+o+"` of type `"+u+"` supplied to `"+r+"`, expected `object`.");for(var c in e){var f=e[c];if(f){var p=f(a,c,r,i,o+"."+c,s);if(p)return p}}return null}return f(t)}function b(e){function t(t,n,r,i,o){var u=t[n],c=N(u);if("object"!==c)return new l("Invalid "+i+" `"+o+"` of type `"+c+"` supplied to `"+r+"`, expected `object`.");var f=a({},t[n],e);for(var p in f){var h=e[p];if(!h)return new l("Invalid "+i+" `"+o+"` key `"+p+"` supplied to `"+r+"`.\nBad object: "+JSON.stringify(t[n],null,"  ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null,"  "));var d=h(u,p,r,i,o+"."+p,s);if(d)return d}return null}return f(t)}function x(t){switch(typeof t){case"number":case"string":case"undefined":return!0;case"boolean":return!t;case"object":if(Array.isArray(t))return t.every(x);if(null===t||e(t))return!0;var r=n(t);if(!r)return!1;var i,o=r.call(t);if(r!==t.entries){for(;!(i=o.next()).done;)if(!x(i.value))return!1}else for(;!(i=o.next()).done;){var a=i.value;if(a&&!x(a[1]))return!1}return!0;default:return!1}}function w(e,t){return"symbol"===e||("Symbol"===t["@@toStringTag"]||"function"===typeof Symbol&&t instanceof Symbol)}function N(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":w(t,e)?"symbol":t}function E(e){if("undefined"===typeof e||null===e)return""+e;var t=N(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function C(e){var t=E(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}function S(e){return e.constructor&&e.constructor.name?e.constructor.name:O}var M="function"===typeof Symbol&&Symbol.iterator,T="@@iterator",O="<<anonymous>>",k={array:p("array"),bool:p("boolean"),func:p("function"),number:p("number"),object:p("object"),string:p("string"),symbol:p("symbol"),any:function(){return f(r.thatReturnsNull)}(),arrayOf:h,element:function(){function t(t,n,r,i,o){var a=t[n];if(!e(a)){return new l("Invalid "+i+" `"+o+"` of type `"+N(a)+"` supplied to `"+r+"`, expected a single ReactElement.")}return null}return f(t)}(),instanceOf:d,node:function(){function e(e,t,n,r,i){return x(e[t])?null:new l("Invalid "+r+" `"+i+"` supplied to `"+n+"`, expected a ReactNode.")}return f(e)}(),objectOf:g,oneOf:m,oneOfType:v,shape:y,exact:b};return l.prototype=Error.prototype,k.checkPropTypes=u,k.PropTypes=k,k}},function(e,t){"use strict";function n(e){return function(){return e}}var r=function(){};r.thatReturns=n,r.thatReturnsFalse=n(!1),r.thatReturnsTrue=n(!0),r.thatReturnsNull=n(null),r.thatReturnsThis=function(){return this},r.thatReturnsArgument=function(e){return e},e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r,o,a,s,u){if(i(t),!e){var c;if(void 0===t)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,o,a,s,u],f=0;c=new Error(t.replace(/%s/g,function(){return l[f++]})),c.name="Invariant Violation"}throw c.framesToPop=1,c}}var i=function(e){};i=function(e){if(void 0===e)throw new Error("invariant requires an error message argument")},e.exports=r},function(e,t,n){"use strict";var r=n(5),i=r,o=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=0,o="Warning: "+e.replace(/%s/g,function(){return n[i++]});"undefined"!==typeof console&&console.error(o);try{throw new Error(o)}catch(e){}};i=function(e,t){if(void 0===t)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");if(0!==t.indexOf("Failed Composite propType: ")&&!e){for(var n=arguments.length,r=Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];o.apply(void 0,[t].concat(r))}},e.exports=i},function(e,t){"use strict";function n(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var a,s,u=n(e),c=1;c<arguments.length;c++){a=Object(arguments[c]);for(var l in a)i.call(a,l)&&(u[l]=a[l]);if(r){s=r(a);for(var f=0;f<s.length;f++)o.call(a,s[f])&&(u[s[f]]=a[s[f]])}}return u}},function(e,t){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";function r(e,t,n,r,u){for(var c in e)if(e.hasOwnProperty(c)){var l;try{i("function"===typeof e[c],"%s: %s type `%s` is invalid; it must be a function, usually from the `prop-types` package, but received `%s`.",r||"React class",n,c,typeof e[c]),l=e[c](t,c,r,n,null,a)}catch(e){l=e}if(o(!l||l instanceof Error,"%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",r||"React class",n,c,typeof l),l instanceof Error&&!(l.message in s)){s[l.message]=!0;var f=u?u():"";o(!1,"Failed %s type: %s%s",n,l.message,null!=f?f:"")}}}var i=n(6),o=n(7),a=n(9),s={};e.exports=r},function(e,t,n){"use strict";var r=n(5),i=n(6),o=n(9);e.exports=function(){function e(e,t,n,r,a,s){s!==o&&i(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return n.checkPropTypes=r,n.PropTypes=n,n}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),o=r(i),a=n(3),s=r(a),u=function(e){var t=e.customThumb,n=e.disableThumb,r=e.position,i=e.thumbSize,a=e.sliderSize,s=e.color,u=e.vertical,c=void 0,l=.5*(a-i),f={position:"absolute",get left(){return u?void 0:r+"%"},get top(){return u?void 0:"0px"},get bottom(){return u?r+"%":void 0},get marginTop(){return u?void 0:l+"px"},get marginLeft(){return u?l+"px":"-"+.5*i+"px"},get marginBottom(){return u?"-"+.5*i+"px":void 0}};if(!t){var p={backgroundColor:""+s,opacity:n?"0":"1",borderRadius:"100%",height:i+"px",width:i+"px"};c=o.default.createElement("div",{style:p})}return o.default.createElement("div",{style:f},t,c&&c)};u.propTypes={position:s.default.number,offsetTop:s.default.number,offsetLeft:s.default.number,sliderSize:s.default.number,thumbSize:s.default.number,color:s.default.string,vertical:s.default.bool,disableThumb:s.default.bool,customThumb:s.default.node},t.default=u},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),o=r(i),a=n(3),s=r(a),u=function(e){var t=e.position,n=e.color,r=e.vertical,i=e.value,a=e.thumbSize,s=e.sliderSize,u=.5*s-10,c=6+.6*a,l={position:"absolute",backgroundColor:n,color:"#fff",fontSize:"12px",textAlign:"center",margin:"0",zIndex:"5",width:"20px",height:"20px",borderRadius:"2px",get bottom(){return r?t+"%":void 0},get left(){return r?void 0:t+"%"},get top(){return r?void 0:"-35px"},get marginLeft(){return r?u+"px":"-10px"},get marginBottom(){return r?c+"px":void 0}},f={position:"absolute",left:"50%",marginLeft:"-4px",bottom:"-4px",borderColor:"transparent",borderStyle:"solid",width:"0",height:"0",borderWidth:"4px 4px 0 4px",borderTopColor:n,zIndex:"4"};return o.default.createElement("div",{style:l},o.default.createElement("span",null,i),o.default.createElement("div",{style:f}))};u.propTypes={position:s.default.number,color:s.default.string,vertical:s.default.bool,value:s.default.number,thumbSize:s.default.number,sliderSize:s.default.number},t.default=u},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),o=r(i),a=n(3),s=r(a),u=function(e){var t=e.trackLength,n=e.color,r=e.vertical,i={backgroundColor:n,get width(){return r?"100%":t+"%"},get height(){return r?t+"%":"100%"},get position(){return r?"absolute":void 0},get bottom(){return r?"0":void 0}};return o.default.createElement("div",{style:i})};u.propTypes={trackLength:s.default.number,color:s.default.string,vertical:s.default.bool},t.default=u}])})},function(e,t,n){!function(t,r){e.exports=r(n(7))}(0,function(e){return function(e){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}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get: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,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=7)}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(6),c=r(u),l=n(4),f=r(l),p=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={percentage:e.initialAnimation?0:e.percentage},n}return a(t,e),s(t,[{key:"componentDidMount",value:function(){var e=this;this.props.initialAnimation&&(this.initialTimeout=setTimeout(function(){e.requestAnimationFrame=window.requestAnimationFrame(function(){e.setState({percentage:e.props.percentage})})},0))}},{key:"componentWillReceiveProps",value:function(e){this.setState({percentage:e.percentage})}},{key:"componentWillUnmount",value:function(){clearTimeout(this.initialTimeout),window.cancelAnimationFrame(this.requestAnimationFrame)}},{key:"getBackgroundPadding",value:function(){return this.props.background?null==this.props.backgroundPadding?this.props.strokeWidth:this.props.backgroundPadding:0}},{key:"getPathDescription",value:function(){var e=this.getPathRadius(),t=this.props.counterClockwise?1:0;return"\n      M 50,50\n      m 0,-"+e+"\n      a "+e+","+e+" "+t+" 1 1 0,"+2*e+"\n      a "+e+","+e+" "+t+" 1 1 0,-"+2*e+"\n    "}},{key:"getPathStyles",value:function(){var e=2*Math.PI*this.getPathRadius(),t=Math.min(Math.max(this.state.percentage,0),100),n=(100-t)/100*e;return{strokeDasharray:e+"px "+e+"px",strokeDashoffset:(this.props.counterClockwise?-n:n)+"px"}}},{key:"getPathRadius",value:function(){return 50-this.props.strokeWidth/2-this.getBackgroundPadding()}},{key:"render",value:function(){var e=this.props,t=e.percentage,n=e.textForPercentage,r=e.className,i=e.classes,o=e.styles,a=e.strokeWidth,s=this.props.classForPercentage?this.props.classForPercentage(t):"",u=this.getPathDescription(),l=n?n(t):null;return c.default.createElement("svg",{className:i.root+" "+r+" "+s,viewBox:"0 0 100 100"},this.props.background?c.default.createElement("circle",{className:i.background,style:o.background,cx:50,cy:50,r:50}):null,c.default.createElement("path",{className:i.trail,style:o.trail,d:u,strokeWidth:a,fillOpacity:0}),c.default.createElement("path",{className:i.path,d:u,strokeWidth:a,fillOpacity:0,style:Object.assign({},o.path,this.getPathStyles())}),l?c.default.createElement("text",{className:i.text,style:o.text,x:50,y:50},l):null)}}]),t}(c.default.Component);p.propTypes={percentage:f.default.number.isRequired,className:f.default.string,classes:f.default.objectOf(f.default.string),styles:f.default.objectOf(f.default.object),strokeWidth:f.default.number,background:f.default.bool,backgroundPadding:f.default.number,initialAnimation:f.default.bool,counterClockwise:f.default.bool,classForPercentage:f.default.func,textForPercentage:f.default.func},p.defaultProps={strokeWidth:8,className:"",classes:{root:"CircularProgressbar",trail:"CircularProgressbar-trail",path:"CircularProgressbar-path",text:"CircularProgressbar-text",background:"CircularProgressbar-background"},styles:{root:{},trail:{},path:{},text:{},background:{}},background:!1,backgroundPadding:null,initialAnimation:!1,counterClockwise:!1,classForPercentage:null,textForPercentage:function(e){return e+"%"}},t.default=p},function(e,t,n){"use strict";function r(e){return function(){return e}}var i=function(){};i.thatReturns=r,i.thatReturnsFalse=r(!1),i.thatReturnsTrue=r(!0),i.thatReturnsNull=r(null),i.thatReturnsThis=function(){return this},i.thatReturnsArgument=function(e){return e},e.exports=i},function(e,t,n){"use strict";function r(e,t,n,r,o,a,s,u){if(i(t),!e){var c;if(void 0===t)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,o,a,s,u],f=0;c=new Error(t.replace(/%s/g,function(){return l[f++]})),c.name="Invariant Violation"}throw c.framesToPop=1,c}}var i=function(e){};e.exports=r},function(e,t,n){"use strict";var r=n(1),i=n(2),o=n(5);e.exports=function(){function e(e,t,n,r,a,s){s!==o&&i(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return n.checkPropTypes=r,n.PropTypes=n,n}},function(e,t,n){e.exports=n(3)()},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(t,n){t.exports=e},function(e,t,n){e.exports=n(0)}])})},function(e,t){},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){var n=e.map(function(e,n){return[e,t[n]]}),r=n.map(function(e,t){return Math.pow(e[0]-e[1],2)});return Math.sqrt(r.reduce(function(e,t){return e+t},0))}function o(e,t){return f.eval(String(e).replace("x",t))}var a=n(7),s=n.n(a),u=n(26),c=(n.n(u),n(41)),l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),f=n(256),p=function(){function e(){r(this,e),this.log=[],this.t=0,this.pos=[0,0,0],this.dir=0,this.step=this.step.bind(this),this.step2ground=this.step2ground.bind(this),this.getDirection=this.getDirection.bind(this),this.renderDirections=this.renderDirections.bind(this)}return l(e,[{key:"step",value:function(e,t,n,r,i,a){var s=e,u=t,c=n,l=i,f=a;r=Math.round(Math.abs(o(r,this.t)));for(var p=0;p<r;p++){var h=90-o(s,this.t),d=h*Math.PI/180;t=o(u,this.t),n=o(c,this.t);var m=Math.sqrt(Math.pow(t,2)-Math.pow(n,2)),g=Math.cos(d)*m,v=Math.sin(d)*m;i=o(l,this.t);var y=(i<180?360:0)+i-180,b=(90-y)*Math.PI/180;a=o(f,this.t);var x=Math.cos(b)*a,w=Math.sin(b)*a;this.pos[0]+=g+x,this.pos[1]+=v+w,this.pos[2]+=n,this.log.push([this.pos[0],this.pos[1],this.pos[2]]),this.t+=1}this.dir=(this.pos[0]<0?180:0)+(Math.PI/2-Math.atan(this.pos[1]/this.pos[0]))*(180/Math.PI)}},{key:"step2ground",value:function(e,t,n,r,i,o){this.step(e,t,n,Math.abs(this.pos[2]/n),i,o)}},{key:"getDirection",value:function(){return{direction:this.dir,distance:i([0,0],[this.pos[0],this.pos[1]])}}},{key:"renderDirections",value:function(){var e=Math.round(this.pos[0])/1e3,t=Math.round(this.pos[1])/1e3,n=Math.round(this.getDirection().direction),r=Math.round(this.getDirection().distance)/1e3;return s.a.createElement("div",null,s.a.createElement("div",null,s.a.createElement(c.q,null,"Relative lateral position: ",e," km (",Math.round(1e3*e*.539956803)/1e3," NM)")),s.a.createElement("div",null,s.a.createElement(c.q,null,"Relative longitudinal position: ",t," km (",Math.round(1e3*t*.539956803)/1e3," NM)")),s.a.createElement("div",null,s.a.createElement(c.q,null,"Direction: ",n," degrees")),s.a.createElement("div",null,s.a.createElement(c.q,null,"Distance: ",r," km (",Math.round(1e3*r*.539956803)/1e3," NM)")))}}]),e}();t.a=p},function(e,t,n){e.exports=n(257)},function(e,t,n){"use strict";function r(e){var t=o.default.create(e);return t.create=r,t.import(n(264)),t}var i=n(258),o=function(e){return e&&e.__esModule?e:{default:e}}(i);e.exports=r()},function(e,t,n){"use strict";n(259);var r=n(5).isFactory,i=n(132),o=n(133),a=n(262),s=n(263);t.create=function(e){function t(e){if(!r(e))throw new Error("Factory object with properties `type`, `name`, and `factory` expected");var i=n.indexOf(e),o=void 0;return-1===i?(o=!0===e.math?e.factory(c.type,l,t,c.typed,c):e.factory(c.type,l,t,c.typed),n.push(e),u.push(o)):o=u[i],o}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 n=[],u=[],c=o.mixin({});c.type={},c.expression={transform:{},mathWithTransform:{}},c.typed=i.create(c.type);var l={epsilon:1e-12,matrix:"Matrix",number:"number",precision:64,predictable:!1,randomSeed:null};return c.import=t(a),c.config=t(s),c.expression.mathWithTransform.config=c.config,e&&c.config(e),c}},function(e,t,n){"use strict";Number.isFinite=Number.isFinite||function(e){return"number"===typeof e&&isFinite(e)},Number.isNaN=Number.isNaN||function(e){return e!==e}},function(e,t,n){"use strict";var r,i,o;!function(n,a){i=[],r=a,void 0!==(o="function"===typeof r?r.apply(t,i):r)&&(e.exports=o)}(0,function(){function e(){return!0}function t(){return!1}function n(){}function r(){function i(e){var t=H(Z.types,function(t){return t.name===e});if(t)return t;if("any"===e)return Y;var n=H(Z.types,function(t){return t.name.toLowerCase()===e.toLowerCase()});throw new TypeError('Unknown type "'+e+'"'+(n?'. Did you mean "'+n.name+'"?':""))}function o(e){return e===Y?999:Z.types.indexOf(e)}function a(e){var t=H(Z.types,function(t){return t.test(e)});if(t)return t.name;throw new TypeError("Value has unknown type. Value: "+e)}function s(e,t){if(!e.signatures)throw new TypeError("Function is no typed-function");var n;if("string"===typeof t){n=t.split(",");for(var r=0;r<n.length;r++)n[r]=n[r].trim()}else{if(!Array.isArray(t))throw new TypeError("String array or a comma separated string expected");n=t}var i=n.join(","),o=e.signatures[i];if(o)return o;throw new TypeError("Signature not found (signature: "+(e.name||"unnamed")+"("+n.join(", ")+"))")}function u(e,t){var n=a(e);if(t===n)return e;for(var r=0;r<Z.conversions.length;r++){var i=Z.conversions[r];if(i.from===n&&i.to===t)return i.convert(e)}throw new Error("Cannot convert from "+n+" to "+t)}function c(e){return e.map(function(e){var t=e.types.map(y);return(e.restParam?"...":"")+t.join("|")}).join(",")}function l(e,t){var n=0===e.indexOf("..."),r=n?e.length>3?e.slice(3):"any":e,a=r.split("|").map(I).filter(F).filter(R),s=M(t,a),u=a.map(function(e){var t=i(e);return{name:e,typeIndex:o(t),test:t.test,conversion:null,conversionIndex:-1}}),c=s.map(function(e){var n=i(e.from);return{name:e.from,typeIndex:o(n),test:n.test,conversion:e,conversionIndex:t.indexOf(e)}});return{types:u.concat(c),restParam:n}}function f(e,t,n){var r=[];return""!==e.trim()&&(r=e.split(",").map(I).map(function(e,t,r){var i=l(e,n);if(i.restParam&&t!==r.length-1)throw new SyntaxError('Unexpected rest parameter "'+e+'": only allowed for the last parameter');return i})),r.some(L)?null:{params:r,fn:t}}function p(e){var t=z(e);return!!t&&t.restParam}function h(e){return e.types.some(function(e){return null!=e.conversion})}function d(t){if(t&&0!==t.types.length){if(1===t.types.length)return i(t.types[0].name).test;if(2===t.types.length){var n=i(t.types[0].name).test,r=i(t.types[1].name).test;return function(e){return n(e)||r(e)}}var o=t.types.map(function(e){return i(e.name).test});return function(e){for(var t=0;t<o.length;t++)if(o[t](e))return!0;return!1}}return e}function m(e){var t,n,r;if(p(e)){t=B(e).map(d);var i=t.length,o=d(z(e)),a=function(e){for(var t=i;t<e.length;t++)if(!o(e[t]))return!1;return!0};return function(e){for(var n=0;n<t.length;n++)if(!t[n](e[n]))return!1;return a(e)&&e.length>=i+1}}return 0===e.length?function(e){return 0===e.length}:1===e.length?(n=d(e[0]),function(e){return n(e[0])&&1===e.length}):2===e.length?(n=d(e[0]),r=d(e[1]),function(e){return n(e[0])&&r(e[1])&&2===e.length}):(t=e.map(d),function(e){for(var n=0;n<t.length;n++)if(!t[n](e[n]))return!1;return e.length===t.length})}function g(e,t){return t<e.params.length?e.params[t]:p(e.params)?z(e.params):null}function v(e,t,n){var r=g(e,t);return(r?n?r.types.filter(b):r.types:[]).map(y)}function y(e){return e.name}function b(e){return null===e.conversion||void 0===e.conversion}function x(e,t){var n=W(V(e,function(e){return v(e,t,!1)}));return-1!==n.indexOf("any")?["any"]:n}function w(e,t,n){var r,i,o,s=e||"unnamed",u=n;for(o=0;o<t.length;o++){var c=u.filter(function(e){var n=d(g(e,o));return(o<e.params.length||p(e.params))&&n(t[o])});if(0===c.length){if(i=x(u,o),i.length>0){var l=a(t[o]);return r=new TypeError("Unexpected type of argument in function "+s+" (expected: "+i.join(" or ")+", actual: "+l+", index: "+o+")"),r.data={category:"wrongType",fn:s,index:o,actual:l,expected:i},r}}else u=c}var f=u.map(function(e){return p(e.params)?1/0:e.params.length});if(t.length<Math.min.apply(null,f))return i=x(u,o),r=new TypeError("Too few arguments in function "+s+" (expected: "+i.join(" or ")+", index: "+t.length+")"),r.data={category:"tooFewArgs",fn:s,index:t.length,expected:i},r;var h=Math.max.apply(null,f);return t.length>h?(r=new TypeError("Too many arguments in function "+s+" (expected: "+h+", actual: "+t.length+")"),r.data={category:"tooManyArgs",fn:s,index:t.length,expectedLength:h},r):(r=new TypeError('Arguments of type "'+t.join(", ")+'" do not match any of the defined signatures of function '+s+"."),r.data={category:"mismatch",actual:t.map(a)},r)}function N(e){for(var t=999,n=0;n<e.types.length;n++)b(e.types[n])&&(t=Math.min(t,e.types[n].typeIndex));return t}function E(e){for(var t=999,n=0;n<e.types.length;n++)b(e.types[n])||(t=Math.min(t,e.types[n].conversionIndex));return t}function C(e,t){var n;return 0!==(n=e.restParam-t.restParam)?n:0!==(n=h(e)-h(t))?n:(n=N(e)-N(t),0!==n?n:E(e)-E(t))}function S(e,t){var n,r,i=Math.min(e.params.length,t.params.length);if(0!==(r=e.params.some(h)-t.params.some(h)))return r;for(n=0;n<i;n++)if(0!==(r=h(e.params[n])-h(t.params[n])))return r;for(n=0;n<i;n++)if(0!==(r=C(e.params[n],t.params[n])))return r;return e.params.length-t.params.length}function M(e,t){var n={};return e.forEach(function(e){-1!==t.indexOf(e.from)||-1===t.indexOf(e.to)||n[e.from]||(n[e.from]=e)}),Object.keys(n).map(function(e){return n[e]})}function T(e,t){var n=t;if(e.some(h)){var r=p(e),i=e.map(O);n=function(){for(var e=[],n=r?arguments.length-1:arguments.length,o=0;o<n;o++)e[o]=i[o](arguments[o]);return r&&(e[n]=arguments[n].map(i[n])),t.apply(null,e)}}var o=n;if(p(e)){var a=e.length-1;o=function(){return n.apply(null,j(arguments,0,a).concat([j(arguments,a)]))}}return o}function O(e){var t,n,r,o,a=[],s=[];switch(e.types.forEach(function(e){e.conversion&&(a.push(i(e.conversion.from).test),s.push(e.conversion.convert))}),s.length){case 0:return function(e){return e};case 1:return t=a[0],r=s[0],function(e){return t(e)?r(e):e};case 2:return t=a[0],n=a[1],r=s[0],o=s[1],function(e){return t(e)?r(e):n(e)?o(e):e};default:return function(e){for(var t=0;t<s.length;t++)if(a[t](e))return s[t](e);return e}}}function k(e){var t={};return e.forEach(function(e){e.params.some(h)||A(e.params,!0).forEach(function(n){t[c(n)]=e.fn})}),t}function A(e,t){function n(e,r,i){if(r<e.length){var o,a=e[r],s=t?a.types.filter(b):a.types;if(a.restParam){var u=s.filter(b);o=u.length<s.length?[u,s]:[s]}else o=s.map(function(e){return[e]});return V(o,function(t){return n(e,r+1,i.concat([t]))})}return[i.map(function(t,n){return{types:t,restParam:n===e.length-1&&p(e)}})]}return n(e,0,[])}function _(e,t){for(var n=Math.max(e.params.length,t.params.length),r=0;r<n;r++){if(!q(v(e,r,!0),v(t,r,!0)))return!1}var i=e.params.length,o=t.params.length,a=p(e.params),s=p(t.params);return a?s?i===o:o>=i:s?i>=o:i===o}function P(e,r){if(0===Object.keys(r).length)throw new SyntaxError("No signatures provided");var i=[];Object.keys(r).map(function(e){return f(e,r[e],Z.conversions)}).filter(D).forEach(function(e){var t=H(i,function(t){return _(t,e)});if(t)throw new TypeError('Conflicting signatures "'+c(t.params)+'" and "'+c(e.params)+'".');i.push(e)});var o=V(i,function(e){return(e?A(e.params,!1):[]).map(function(t){return{params:t,fn:e.fn}})}).filter(D);o.sort(S);var a=o[0]&&o[0].params.length<=2&&!p(o[0].params),s=o[1]&&o[1].params.length<=2&&!p(o[1].params),u=o[2]&&o[2].params.length<=2&&!p(o[2].params),l=o[3]&&o[3].params.length<=2&&!p(o[3].params),h=o[4]&&o[4].params.length<=2&&!p(o[4].params),g=o[5]&&o[5].params.length<=2&&!p(o[5].params),v=a&&s&&u&&l&&h&&g,y=o.map(function(e){return m(e.params)}),b=a?d(o[0].params[0]):t,x=s?d(o[1].params[0]):t,N=u?d(o[2].params[0]):t,E=l?d(o[3].params[0]):t,C=h?d(o[4].params[0]):t,M=g?d(o[5].params[0]):t,O=a?d(o[0].params[1]):t,P=s?d(o[1].params[1]):t,R=u?d(o[2].params[1]):t,I=l?d(o[3].params[1]):t,F=h?d(o[4].params[1]):t,L=g?d(o[5].params[1]):t,B=o.map(function(e){return T(e.params,e.fn)}),z=a?B[0]:n,j=s?B[1]:n,U=u?B[2]:n,q=l?B[3]:n,W=h?B[4]:n,G=g?B[5]:n,$=a?o[0].params.length:-1,Y=s?o[1].params.length:-1,X=u?o[2].params.length:-1,K=l?o[3].params.length:-1,J=h?o[4].params.length:-1,Q=g?o[5].params.length:-1,ee=v?6:0,te=o.length,ne=function(){for(var t=ee;t<te;t++)if(y[t](arguments))return B[t].apply(null,arguments);throw w(e,arguments,o)},re=function(e,t){return arguments.length===$&&b(e)&&O(t)?z.apply(null,arguments):arguments.length===Y&&x(e)&&P(t)?j.apply(null,arguments):arguments.length===X&&N(e)&&R(t)?U.apply(null,arguments):arguments.length===K&&E(e)&&I(t)?q.apply(null,arguments):arguments.length===J&&C(e)&&F(t)?W.apply(null,arguments):arguments.length===Q&&M(e)&&L(t)?G.apply(null,arguments):ne.apply(null,arguments)};try{Object.defineProperty(re,"name",{value:e})}catch(e){}return re.signatures=k(o),re}function R(e){return-1===Z.ignore.indexOf(e)}function I(e){return e.trim()}function F(e){return!!e}function D(e){return null!==e}function L(e){return 0===e.types.length}function B(e){return e.slice(0,e.length-1)}function z(e){return e[e.length-1]}function j(e,t,n){return Array.prototype.slice.call(e,t,n)}function U(e,t){return-1!==e.indexOf(t)}function q(e,t){for(var n=0;n<e.length;n++)if(U(t,e[n]))return!0;return!1}function H(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return e[n]}function W(e){for(var t={},n=0;n<e.length;n++)t[e[n]]=!0;return Object.keys(t)}function V(e,t){return Array.prototype.concat.apply([],e.map(t))}function G(e){for(var t="",n=0;n<e.length;n++){var r=e[n];if(r.signatures&&""!==r.name)if(""===t)t=r.name;else if(t!==r.name){var i=new Error("Function names do not match (expected: "+t+", actual: "+r.name+")");throw i.data={actual:r.name,expected:t},i}}return t}var $=[{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&&e.constructor===Object}},{name:"null",test:function(e){return null===e}},{name:"undefined",test:function(e){return void 0===e}}],Y={name:"any",test:e},X=[],K=[],Z={types:$,conversions:K,ignore:X};return Z=P("typed",{"string, Object":P,Object:function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(e[n]);return P(G(t),e)},"...Function":function(e){for(var t,n=G(e),r={},i=0;i<e.length;i++){var o=e[i];if("object"!==typeof o.signatures)throw t=new TypeError("Function is no typed-function (index: "+i+")"),t.data={index:i},t;for(var a in o.signatures)if(o.signatures.hasOwnProperty(a))if(r.hasOwnProperty(a)){if(o.signatures[a]!==r[a])throw t=new Error('Signature "'+a+'" is defined twice'),t.data={signature:a},t}else r[a]=o.signatures[a]}return P(n,r)}}),Z.create=r,Z.types=$,Z.conversions=K,Z.ignore=X,Z.convert=u,Z.find=s,Z.addType=function(e){if(!e||"string"!==typeof e.name||"function"!==typeof e.test)throw new TypeError("Object with properties {name: string, test: function} expected");Z.types.push(e)},Z.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");Z.conversions.push(e)},Z}return r()})},function(e,t){function n(){}n.prototype={on:function(e,t,n){var r=this.e||(this.e={});return(r[e]||(r[e]=[])).push({fn:t,ctx:n}),this},once:function(e,t,n){function r(){i.off(e,r),t.apply(n,arguments)}var i=this;return r._=t,this.on(e,r,n)},emit:function(e){var t=[].slice.call(arguments,1),n=((this.e||(this.e={}))[e]||[]).slice(),r=0,i=n.length;for(r;r<i;r++)n[r].fn.apply(n[r].ctx,t);return this},off:function(e,t){var n=this.e||(this.e={}),r=n[e],i=[];if(r&&t)for(var o=0,a=r.length;o<a;o++)r[o].fn!==t&&r[o].fn._!==t&&i.push(r[o]);return i.length?n[e]=i:delete n[e],this}},e.exports=n},function(e,t,n){"use strict";function r(e,t,n,r,c){function l(e,t){var n=arguments.length;if(1!==n&&2!==n)throw new u("import",n,1,2);if(t||(t={}),a(e))d(e,t);else if(Array.isArray(e))e.forEach(function(e){l(e,t)});else if("object"===("undefined"===typeof e?"undefined":i(e))){for(var r in e)if(e.hasOwnProperty(r)){var o=e[r];m(o)?f(r,o,t):a(e)?d(e,t):l(o,t)}}else if(!t.silent)throw new TypeError("Factory, Object, or Array expected")}function f(e,t,n){if(n.wrap&&"function"===typeof t&&(t=h(t)),g(c[e])&&g(t))return t=n.override?r(e,t.signatures):r(c[e],t),c[e]=t,p(e,t),void c.emit("import",e,function(){return t});if(void 0===c[e]||n.override)return c[e]=t,p(e,t),void c.emit("import",e,function(){return t});if(!n.silent)throw new Error('Cannot import "'+e+'": already exists')}function p(e,t){t&&"function"===typeof t.transform?(c.expression.transform[e]=t.transform,v(e)&&(c.expression.mathWithTransform[e]=t.transform)):(delete c.expression.transform[e],v(e)&&(c.expression.mathWithTransform[e]=t))}function h(e){var t=function(){for(var t=[],n=0,r=arguments.length;n<r;n++){var i=arguments[n];t[n]=i&&i.valueOf()}return e.apply(c,t)};return e.transform&&(t.transform=e.transform),t}function d(e,t){if("string"===typeof e.name){var i=e.name,a=i in c.expression.transform,u=e.path?s(c,e.path):c,l=u.hasOwnProperty(i)?u[i]:void 0,f=function(){var o=n(e);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(g(l)&&g(o))return t.override||(o=r(l,o)),o;if(void 0===l||t.override)return o;if(!t.silent)throw new Error('Cannot import "'+i+'": already exists')};!1!==e.lazy?(o(u,i,f),a||("expression.transform"===e.path||y(e))&&o(c.expression.mathWithTransform,i,f)):(u[i]=f(),a||("expression.transform"===e.path||y(e))&&(c.expression.mathWithTransform[i]=f())),c.emit("import",i,f,e.path)}else n(e)}function m(t){return"function"===typeof t||"number"===typeof t||"string"===typeof t||"boolean"===typeof t||null===t||t&&e.isUnit(t)||t&&e.isComplex(t)||t&&e.isBigNumber(t)||t&&e.isFraction(t)||t&&e.isMatrix(t)||t&&Array.isArray(t)}function g(e){return"function"===typeof e&&"object"===i(e.signatures)}function v(e){return!b.hasOwnProperty(e)}function y(e){return void 0===e.path&&!b.hasOwnProperty(e.name)}var b={expression:!0,type:!0,docs:!0,error:!0,json:!0,chain:!0};return l}var i="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},o=n(5).lazy,a=n(5).isFactory,s=n(5).traverse,u=n(56);t.math=!0,t.name="import",t.factory=r,t.lazy=!0},function(e,t,n){"use strict";function r(e,t,n,r,i){function o(e){if(e){var n=s.map(t,s.clone);a(e,"matrix",u),a(e,"number",c),s.deepExtend(t,e);var r=s.map(t,s.clone),o=s.map(e,s.clone);return i.emit("config",r,n,o),r}return s.map(t,s.clone)}var u=["Matrix","Array"],c=["number","BigNumber","Fraction"];return o.MATRIX=u,o.NUMBER=c,o}function i(e,t){return-1!==e.indexOf(t)}function o(e,t){return e.map(function(e){return e.toLowerCase()}).indexOf(t.toLowerCase())}function a(e,t,n){if(void 0!==e[t]&&!i(n,e[t])){var r=o(n,e[t]);-1!==r?(console.warn('Warning: Wrong casing for configuration option "'+t+'", should be "'+n[r]+'" instead of "'+e[t]+'".'),e[t]=n[r]):console.warn('Warning: Unknown value "'+e[t]+'" for configuration option "'+t+'". Available options: '+n.map(JSON.stringify).join(", ")+".")}}var s=n(5);t.name="config",t.math=!0,t.factory=r},function(e,t,n){"use strict";e.exports=[n(265),n(298),n(300),n(521),n(675),n(677)]},function(e,t,n){"use strict";e.exports=[n(266),n(270),n(271),n(275),n(279),n(282),n(100),n(290),n(291),n(292)]},function(e,t,n){"use strict";e.exports=[n(267),n(269)]},function(e,t,n){"use strict";function r(e,t,n,r,o){var a=i.clone({precision:t.precision});return a.prototype.type="BigNumber",a.prototype.isBigNumber=!0,a.prototype.toJSON=function(){return{mathjs:"BigNumber",value:this.toString()}},a.fromJSON=function(e){return new a(e.value)},o.on("config",function(e,t){e.precision!==t.precision&&a.config({precision:e.precision})}),a}var i=n(268);t.name="BigNumber",t.path="type",t.factory=r,t.math=!0},function(e,t,n){var r;!function(i){"use strict";function o(e){var t,n,r,i=e.length-1,o="",a=e[0];if(i>0){for(o+=a,t=1;t<i;t++)r=e[t]+"",n=De-r.length,n&&(o+=g(n)),o+=r;a=e[t],r=a+"",n=De-r.length,n&&(o+=g(n))}else if(0===a)return"0";for(;a%10===0;)a/=10;return o+a}function a(e,t,n){if(e!==~~e||e<t||e>n)throw Error(Me+e)}function s(e,t,n,r){var i,o,a,s;for(o=e[0];o>=10;o/=10)--t;return--t<0?(t+=De,i=0):(i=Math.ceil((t+1)/De),t%=De),o=Ae(10,De-t),s=e[i]%o|0,null==r?t<3?(0==t?s=s/100|0:1==t&&(s=s/10|0),a=n<4&&99999==s||n>3&&49999==s||5e4==s||0==s):a=(n<4&&s+1==o||n>3&&s+1==o/2)&&(e[i+1]/o/100|0)==Ae(10,t-2)-1||(s==o/2||0==s)&&0==(e[i+1]/o/100|0):t<4?(0==t?s=s/1e3|0:1==t?s=s/100|0:2==t&&(s=s/10|0),a=(r||n<4)&&9999==s||!r&&n>3&&4999==s):a=((r||n<4)&&s+1==o||!r&&n>3&&s+1==o/2)&&(e[i+1]/o/1e3|0)==Ae(10,t-3)-1,a}function u(e,t,n){for(var r,i,o=[0],a=0,s=e.length;a<s;){for(i=o.length;i--;)o[i]*=t;for(o[0]+=xe.indexOf(e.charAt(a++)),r=0;r<o.length;r++)o[r]>n-1&&(void 0===o[r+1]&&(o[r+1]=0),o[r+1]+=o[r]/n|0,o[r]%=n)}return o.reverse()}function c(e,t){var n,r,i=t.d.length;i<32?(n=Math.ceil(i/3),r=Math.pow(4,-n).toString()):(n=16,r="2.3283064365386962890625e-10"),e.precision+=n,t=M(e,1,t.times(r),new e(1));for(var o=n;o--;){var a=t.times(t);t=a.times(a).minus(a).times(8).plus(1)}return e.precision-=n,t}function l(e,t,n,r){var i,o,a,s,u,c,l,f,p,h=e.constructor;e:if(null!=t){if(!(f=e.d))return e;for(i=1,s=f[0];s>=10;s/=10)i++;if((o=t-i)<0)o+=De,a=t,l=f[p=0],u=l/Ae(10,i-a-1)%10|0;else if(p=Math.ceil((o+1)/De),s=f.length,p>=s){if(!r)break e;for(;s++<=p;)f.push(0);l=u=0,i=1,o%=De,a=o-De+1}else{for(l=s=f[p],i=1;s>=10;s/=10)i++;o%=De,a=o-De+i,u=a<0?0:l/Ae(10,i-a-1)%10|0}if(r=r||t<0||void 0!==f[p+1]||(a<0?l:l%Ae(10,i-a-1)),c=n<4?(u||r)&&(0==n||n==(e.s<0?3:2)):u>5||5==u&&(4==n||r||6==n&&(o>0?a>0?l/Ae(10,i-a):0:f[p-1])%10&1||n==(e.s<0?8:7)),t<1||!f[0])return f.length=0,c?(t-=e.e+1,f[0]=Ae(10,(De-t%De)%De),e.e=-t||0):f[0]=e.e=0,e;if(0==o?(f.length=p,s=1,p--):(f.length=p+1,s=Ae(10,De-o),f[p]=a>0?(l/Ae(10,i-a)%Ae(10,a)|0)*s:0),c)for(;;){if(0==p){for(o=1,a=f[0];a>=10;a/=10)o++;for(a=f[0]+=s,s=1;a>=10;a/=10)s++;o!=s&&(e.e++,f[0]==Fe&&(f[0]=1));break}if(f[p]+=s,f[p]!=Fe)break;f[p--]=0,s=1}for(o=f.length;0===f[--o];)f.pop()}return Ce&&(e.e>h.maxE?(e.d=null,e.e=NaN):e.e<h.minE&&(e.e=0,e.d=[0])),e}function f(e,t,n){if(!e.isFinite())return N(e);var r,i=e.e,a=o(e.d),s=a.length;return t?(n&&(r=n-s)>0?a=a.charAt(0)+"."+a.slice(1)+g(r):s>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(e.e<0?"e":"e+")+e.e):i<0?(a="0."+g(-i-1)+a,n&&(r=n-s)>0&&(a+=g(r))):i>=s?(a+=g(i+1-s),n&&(r=n-i-1)>0&&(a=a+"."+g(r))):((r=i+1)<s&&(a=a.slice(0,r)+"."+a.slice(r)),n&&(r=n-s)>0&&(i+1===s&&(a+="."),a+=g(r))),a}function p(e,t){var n=e[0];for(t*=De;n>=10;n/=10)t++;return t}function h(e,t,n){if(t>Le)throw Ce=!0,n&&(e.precision=n),Error(Te);return l(new e(we),t,1,!0)}function d(e,t,n){if(t>Be)throw Error(Te);return l(new e(Ne),t,n,!0)}function m(e){var t=e.length-1,n=t*De+1;if(t=e[t]){for(;t%10==0;t/=10)n--;for(t=e[0];t>=10;t/=10)n++}return n}function g(e){for(var t="";e--;)t+="0";return t}function v(e,t,n,r){var i,o=new e(1),a=Math.ceil(r/De+4);for(Ce=!1;;){if(n%2&&(o=o.times(t),k(o.d,a)&&(i=!0)),0===(n=ke(n/2))){n=o.d.length-1,i&&0===o.d[n]&&++o.d[n];break}t=t.times(t),k(t.d,a)}return Ce=!0,o}function y(e){return 1&e.d[e.d.length-1]}function b(e,t,n){for(var r,i=new e(t[0]),o=0;++o<t.length;){if(r=new e(t[o]),!r.s){i=r;break}i[n](r)&&(i=r)}return i}function x(e,t){var n,r,i,a,u,c,f,p=0,h=0,d=0,m=e.constructor,g=m.rounding,v=m.precision;if(!e.d||!e.d[0]||e.e>17)return new m(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(null==t?(Ce=!1,f=v):f=t,c=new m(.03125);e.e>-2;)e=e.times(c),d+=5;for(r=Math.log(Ae(2,d))/Math.LN10*2+5|0,f+=r,n=a=u=new m(1),m.precision=f;;){if(a=l(a.times(e),f,1),n=n.times(++h),c=u.plus(je(a,n,f,1)),o(c.d).slice(0,f)===o(u.d).slice(0,f)){for(i=d;i--;)u=l(u.times(u),f,1);if(null!=t)return m.precision=v,u;if(!(p<3&&s(u.d,f-r,g,p)))return l(u,m.precision=v,g,Ce=!0);m.precision=f+=10,n=a=c=new m(1),h=0,p++}u=c}}function w(e,t){var n,r,i,a,u,c,f,p,d,m,g,v=1,y=e,b=y.d,x=y.constructor,N=x.rounding,E=x.precision;if(y.s<0||!b||!b[0]||!y.e&&1==b[0]&&1==b.length)return new x(b&&!b[0]?-1/0:1!=y.s?NaN:b?0:y);if(null==t?(Ce=!1,d=E):d=t,x.precision=d+=10,n=o(b),r=n.charAt(0),!(Math.abs(a=y.e)<15e14))return p=h(x,d+2,E).times(a+""),y=w(new x(r+"."+n.slice(1)),d-10).plus(p),x.precision=E,null==t?l(y,E,N,Ce=!0):y;for(;r<7&&1!=r||1==r&&n.charAt(1)>3;)y=y.times(e),n=o(y.d),r=n.charAt(0),v++;for(a=y.e,r>1?(y=new x("0."+n),a++):y=new x(r+"."+n.slice(1)),m=y,f=u=y=je(y.minus(1),y.plus(1),d,1),g=l(y.times(y),d,1),i=3;;){if(u=l(u.times(g),d,1),p=f.plus(je(u,new x(i),d,1)),o(p.d).slice(0,d)===o(f.d).slice(0,d)){if(f=f.times(2),0!==a&&(f=f.plus(h(x,d+2,E).times(a+""))),f=je(f,new x(v),d,1),null!=t)return x.precision=E,f;if(!s(f.d,d-10,N,c))return l(f,x.precision=E,N,Ce=!0);x.precision=d+=10,p=u=y=je(m.minus(1),m.plus(1),d,1),g=l(y.times(y),d,1),i=c=1}f=p,i+=2}}function N(e){return String(e.s*e.s/0)}function E(e,t){var n,r,i;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;48===t.charCodeAt(r);r++);for(i=t.length;48===t.charCodeAt(i-1);--i);if(t=t.slice(r,i)){if(i-=r,e.e=n=n-r-1,e.d=[],r=(n+1)%De,n<0&&(r+=De),r<i){for(r&&e.d.push(+t.slice(0,r)),i-=De;r<i;)e.d.push(+t.slice(r,r+=De));t=t.slice(r),r=De-t.length}else r-=i;for(;r--;)t+="0";e.d.push(+t),Ce&&(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 C(e,t){var n,r,i,o,a,s,c,l,f;if("Infinity"===t||"NaN"===t)return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(Pe.test(t))n=16,t=t.toLowerCase();else if(_e.test(t))n=2;else{if(!Re.test(t))throw Error(Me+t);n=8}for(o=t.search(/p/i),o>0?(c=+t.slice(o+1),t=t.substring(2,o)):t=t.slice(2),o=t.indexOf("."),a=o>=0,r=e.constructor,a&&(t=t.replace(".",""),s=t.length,o=s-o,i=v(r,new r(n),o,2*o)),l=u(t,n,Fe),f=l.length-1,o=f;0===l[o];--o)l.pop();return o<0?new r(0*e.s):(e.e=p(l,f),e.d=l,Ce=!1,a&&(e=je(e,i,4*s)),c&&(e=e.times(Math.abs(c)<54?Math.pow(2,c):me.pow(2,c))),Ce=!0,e)}function S(e,t){var n,r=t.d.length;if(r<3)return M(e,2,t,t);n=1.4*Math.sqrt(r),n=n>16?16:0|n,t=t.times(Math.pow(5,-n)),t=M(e,2,t,t);for(var i,o=new e(5),a=new e(16),s=new e(20);n--;)i=t.times(t),t=t.times(o.plus(i.times(a.times(i).minus(s))));return t}function M(e,t,n,r,i){var o,a,s,u,c=1,l=e.precision,f=Math.ceil(l/De);for(Ce=!1,u=n.times(n),s=new e(r);;){if(a=je(s.times(u),new e(t++*t++),l,1),s=i?r.plus(a):r.minus(a),r=je(a.times(u),new e(t++*t++),l,1),a=s.plus(r),void 0!==a.d[f]){for(o=f;a.d[o]===s.d[o]&&o--;);if(-1==o)break}o=s,s=r,r=a,a=o,c++}return Ce=!0,a.d.length=f+1,a}function T(e,t){var n,r=t.s<0,i=d(e,e.precision,1),o=i.times(.5);if(t=t.abs(),t.lte(o))return ve=r?4:1,t;if(n=t.divToInt(i),n.isZero())ve=r?3:2;else{if(t=t.minus(n.times(i)),t.lte(o))return ve=y(n)?r?2:3:r?4:1,t;ve=y(n)?r?1:4:r?3:2}return t.minus(i).abs()}function O(e,t,n,r){var i,o,s,c,l,p,h,d,m,g=e.constructor,v=void 0!==n;if(v?(a(n,1,be),void 0===r?r=g.rounding:a(r,0,8)):(n=g.precision,r=g.rounding),e.isFinite()){for(h=f(e),s=h.indexOf("."),v?(i=2,16==t?n=4*n-3:8==t&&(n=3*n-2)):i=t,s>=0&&(h=h.replace(".",""),m=new g(1),m.e=h.length-s,m.d=u(f(m),10,i),m.e=m.d.length),d=u(h,10,i),o=l=d.length;0==d[--l];)d.pop();if(d[0]){if(s<0?o--:(e=new g(e),e.d=d,e.e=o,e=je(e,m,n,r,0,i),d=e.d,o=e.e,p=ge),s=d[n],c=i/2,p=p||void 0!==d[n+1],p=r<4?(void 0!==s||p)&&(0===r||r===(e.s<0?3:2)):s>c||s===c&&(4===r||p||6===r&&1&d[n-1]||r===(e.s<0?8:7)),d.length=n,p)for(;++d[--n]>i-1;)d[n]=0,n||(++o,d.unshift(1));for(l=d.length;!d[l-1];--l);for(s=0,h="";s<l;s++)h+=xe.charAt(d[s]);if(v){if(l>1)if(16==t||8==t){for(s=16==t?4:3,--l;l%s;l++)h+="0";for(d=u(h,i,t),l=d.length;!d[l-1];--l);for(s=1,h="1.";s<l;s++)h+=xe.charAt(d[s])}else h=h.charAt(0)+"."+h.slice(1);h=h+(o<0?"p":"p+")+o}else if(o<0){for(;++o;)h="0"+h;h="0."+h}else if(++o>l)for(o-=l;o--;)h+="0";else o<l&&(h=h.slice(0,o)+"."+h.slice(o))}else h=v?"0p+0":"0";h=(16==t?"0x":2==t?"0b":8==t?"0o":"")+h}else h=N(e);return e.s<0?"-"+h:h}function k(e,t){if(e.length>t)return e.length=t,!0}function A(e){return new this(e).abs()}function _(e){return new this(e).acos()}function P(e){return new this(e).acosh()}function R(e,t){return new this(e).plus(t)}function I(e){return new this(e).asin()}function F(e){return new this(e).asinh()}function D(e){return new this(e).atan()}function L(e){return new this(e).atanh()}function B(e,t){e=new this(e),t=new this(t);var n,r=this.precision,i=this.rounding,o=r+4;return e.s&&t.s?e.d||t.d?!t.d||e.isZero()?(n=t.s<0?d(this,r,i):new this(0),n.s=e.s):!e.d||t.isZero()?(n=d(this,o,1).times(.5),n.s=e.s):t.s<0?(this.precision=o,this.rounding=1,n=this.atan(je(e,t,o,1)),t=d(this,o,1),this.precision=r,this.rounding=i,n=e.s<0?n.minus(t):n.plus(t)):n=this.atan(je(e,t,o,1)):(n=d(this,o,1).times(t.s>0?.25:.75),n.s=e.s):n=new this(NaN),n}function z(e){return new this(e).cbrt()}function j(e){return l(e=new this(e),e.e+1,2)}function U(e){if(!e||"object"!==typeof e)throw Error(Se+"Object expected");var t,n,r,i=!0===e.defaults,o=["precision",1,be,"rounding",0,8,"toExpNeg",-ye,0,"toExpPos",0,ye,"maxE",0,ye,"minE",-ye,0,"modulo",0,9];for(t=0;t<o.length;t+=3)if(n=o[t],i&&(this[n]=Ee[n]),void 0!==(r=e[n])){if(!(ke(r)===r&&r>=o[t+1]&&r<=o[t+2]))throw Error(Me+n+": "+r);this[n]=r}if(n="crypto",i&&(this[n]=Ee[n]),void 0!==(r=e[n])){if(!0!==r&&!1!==r&&0!==r&&1!==r)throw Error(Me+n+": "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw Error(Oe);this[n]=!0}else this[n]=!1}return this}function q(e){return new this(e).cos()}function H(e){return new this(e).cosh()}function W(e){function t(e){var n,r,i,o=this;if(!(o instanceof t))return new t(e);if(o.constructor=t,e instanceof t)return o.s=e.s,o.e=e.e,void(o.d=(e=e.d)?e.slice():e);if("number"===(i=typeof e)){if(0===e)return o.s=1/e<0?-1:1,o.e=0,void(o.d=[0]);if(e<0?(e=-e,o.s=-1):o.s=1,e===~~e&&e<1e7){for(n=0,r=e;r>=10;r/=10)n++;return o.e=n,void(o.d=[e])}return 0*e!==0?(e||(o.s=NaN),o.e=NaN,void(o.d=null)):E(o,e.toString())}if("string"!==i)throw Error(Me+e);return 45===e.charCodeAt(0)?(e=e.slice(1),o.s=-1):o.s=1,Ie.test(e)?E(o,e):C(o,e)}var n,r,i;if(t.prototype=ze,t.ROUND_UP=0,t.ROUND_DOWN=1,t.ROUND_CEIL=2,t.ROUND_FLOOR=3,t.ROUND_HALF_UP=4,t.ROUND_HALF_DOWN=5,t.ROUND_HALF_EVEN=6,t.ROUND_HALF_CEIL=7,t.ROUND_HALF_FLOOR=8,t.EUCLID=9,t.config=t.set=U,t.clone=W,t.isDecimal=X,t.abs=A,t.acos=_,t.acosh=P,t.add=R,t.asin=I,t.asinh=F,t.atan=D,t.atanh=L,t.atan2=B,t.cbrt=z,t.ceil=j,t.cos=q,t.cosh=H,t.div=V,t.exp=G,t.floor=$,t.hypot=Y,t.ln=K,t.log=Z,t.log10=Q,t.log2=J,t.max=ee,t.min=te,t.mod=ne,t.mul=re,t.pow=ie,t.random=oe,t.round=ae,t.sign=se,t.sin=ue,t.sinh=ce,t.sqrt=le,t.sub=fe,t.tan=pe,t.tanh=he,t.trunc=de,void 0===e&&(e={}),e&&!0!==e.defaults)for(i=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],n=0;n<i.length;)e.hasOwnProperty(r=i[n++])||(e[r]=this[r]);return t.config(e),t}function V(e,t){return new this(e).div(t)}function G(e){return new this(e).exp()}function $(e){return l(e=new this(e),e.e+1,3)}function Y(){var e,t,n=new this(0);for(Ce=!1,e=0;e<arguments.length;)if(t=new this(arguments[e++]),t.d)n.d&&(n=n.plus(t.times(t)));else{if(t.s)return Ce=!0,new this(1/0);n=t}return Ce=!0,n.sqrt()}function X(e){return e instanceof me||e&&"[object Decimal]"===e.name||!1}function K(e){return new this(e).ln()}function Z(e,t){return new this(e).log(t)}function J(e){return new this(e).log(2)}function Q(e){return new this(e).log(10)}function ee(){return b(this,arguments,"lt")}function te(){return b(this,arguments,"gt")}function ne(e,t){return new this(e).mod(t)}function re(e,t){return new this(e).mul(t)}function ie(e,t){return new this(e).pow(t)}function oe(e){var t,n,r,i,o=0,s=new this(1),u=[];if(void 0===e?e=this.precision:a(e,1,be),r=Math.ceil(e/De),this.crypto)if(crypto.getRandomValues)for(t=crypto.getRandomValues(new Uint32Array(r));o<r;)i=t[o],i>=429e7?t[o]=crypto.getRandomValues(new Uint32Array(1))[0]:u[o++]=i%1e7;else{if(!crypto.randomBytes)throw Error(Oe);for(t=crypto.randomBytes(r*=4);o<r;)i=t[o]+(t[o+1]<<8)+(t[o+2]<<16)+((127&t[o+3])<<24),i>=214e7?crypto.randomBytes(4).copy(t,o):(u.push(i%1e7),o+=4);o=r/4}else for(;o<r;)u[o++]=1e7*Math.random()|0;for(r=u[--o],e%=De,r&&e&&(i=Ae(10,De-e),u[o]=(r/i|0)*i);0===u[o];o--)u.pop();if(o<0)n=0,u=[0];else{for(n=-1;0===u[0];n-=De)u.shift();for(r=1,i=u[0];i>=10;i/=10)r++;r<De&&(n-=De-r)}return s.e=n,s.d=u,s}function ae(e){return l(e=new this(e),e.e+1,this.rounding)}function se(e){return e=new this(e),e.d?e.d[0]?e.s:0*e.s:e.s||NaN}function ue(e){return new this(e).sin()}function ce(e){return new this(e).sinh()}function le(e){return new this(e).sqrt()}function fe(e,t){return new this(e).sub(t)}function pe(e){return new this(e).tan()}function he(e){return new this(e).tanh()}function de(e){return l(e=new this(e),e.e+1,1)}var me,ge,ve,ye=9e15,be=1e9,xe="0123456789abcdef",we="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",Ne="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",Ee={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-ye,maxE:ye,crypto:!1},Ce=!0,Se="[DecimalError] ",Me=Se+"Invalid argument: ",Te=Se+"Precision limit exceeded",Oe=Se+"crypto unavailable",ke=Math.floor,Ae=Math.pow,_e=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,Pe=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,Re=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,Ie=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Fe=1e7,De=7,Le=we.length-1,Be=Ne.length-1,ze={name:"[object Decimal]"};ze.absoluteValue=ze.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),l(e)},ze.ceil=function(){return l(new this.constructor(this),this.e+1,2)},ze.comparedTo=ze.cmp=function(e){var t,n,r,i,o=this,a=o.d,s=(e=new o.constructor(e)).d,u=o.s,c=e.s;if(!a||!s)return u&&c?u!==c?u:a===s?0:!a^u<0?1:-1:NaN;if(!a[0]||!s[0])return a[0]?u:s[0]?-c:0;if(u!==c)return u;if(o.e!==e.e)return o.e>e.e^u<0?1:-1;for(r=a.length,i=s.length,t=0,n=r<i?r:i;t<n;++t)if(a[t]!==s[t])return a[t]>s[t]^u<0?1:-1;return r===i?0:r>i^u<0?1:-1},ze.cosine=ze.cos=function(){var e,t,n=this,r=n.constructor;return n.d?n.d[0]?(e=r.precision,t=r.rounding,r.precision=e+Math.max(n.e,n.sd())+De,r.rounding=1,n=c(r,T(r,n)),r.precision=e,r.rounding=t,l(2==ve||3==ve?n.neg():n,e,t,!0)):new r(1):new r(NaN)},ze.cubeRoot=ze.cbrt=function(){var e,t,n,r,i,a,s,u,c,f,p=this,h=p.constructor;if(!p.isFinite()||p.isZero())return new h(p);for(Ce=!1,a=p.s*Math.pow(p.s*p,1/3),a&&Math.abs(a)!=1/0?r=new h(a.toString()):(n=o(p.d),e=p.e,(a=(e-n.length+1)%3)&&(n+=1==a||-2==a?"0":"00"),a=Math.pow(n,1/3),e=ke((e+1)/3)-(e%3==(e<0?-1:2)),a==1/0?n="5e"+e:(n=a.toExponential(),n=n.slice(0,n.indexOf("e")+1)+e),r=new h(n),r.s=p.s),s=(e=h.precision)+3;;)if(u=r,c=u.times(u).times(u),f=c.plus(p),r=je(f.plus(p).times(u),f.plus(c),s+2,1),o(u.d).slice(0,s)===(n=o(r.d)).slice(0,s)){if("9999"!=(n=n.slice(s-3,s+1))&&(i||"4999"!=n)){+n&&(+n.slice(1)||"5"!=n.charAt(0))||(l(r,e+1,1),t=!r.times(r).times(r).eq(p));break}if(!i&&(l(u,e+1,0),u.times(u).times(u).eq(p))){r=u;break}s+=4,i=1}return Ce=!0,l(r,e,h.rounding,t)},ze.decimalPlaces=ze.dp=function(){var e,t=this.d,n=NaN;if(t){if(e=t.length-1,n=(e-ke(this.e/De))*De,e=t[e])for(;e%10==0;e/=10)n--;n<0&&(n=0)}return n},ze.dividedBy=ze.div=function(e){return je(this,new this.constructor(e))},ze.dividedToIntegerBy=ze.divToInt=function(e){var t=this,n=t.constructor;return l(je(t,new n(e),0,1,1),n.precision,n.rounding)},ze.equals=ze.eq=function(e){return 0===this.cmp(e)},ze.floor=function(){return l(new this.constructor(this),this.e+1,3)},ze.greaterThan=ze.gt=function(e){return this.cmp(e)>0},ze.greaterThanOrEqualTo=ze.gte=function(e){var t=this.cmp(e);return 1==t||0===t},ze.hyperbolicCosine=ze.cosh=function(){var e,t,n,r,i,o=this,a=o.constructor,s=new a(1);if(!o.isFinite())return new a(o.s?1/0:NaN);if(o.isZero())return s;n=a.precision,r=a.rounding,a.precision=n+Math.max(o.e,o.sd())+4,a.rounding=1,i=o.d.length,i<32?(e=Math.ceil(i/3),t=Math.pow(4,-e).toString()):(e=16,t="2.3283064365386962890625e-10"),o=M(a,1,o.times(t),new a(1),!0);for(var u,c=e,f=new a(8);c--;)u=o.times(o),o=s.minus(u.times(f.minus(u.times(f))));return l(o,a.precision=n,a.rounding=r,!0)},ze.hyperbolicSine=ze.sinh=function(){var e,t,n,r,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(t=o.precision,n=o.rounding,o.precision=t+Math.max(i.e,i.sd())+4,o.rounding=1,(r=i.d.length)<3)i=M(o,2,i,i,!0);else{e=1.4*Math.sqrt(r),e=e>16?16:0|e,i=i.times(Math.pow(5,-e)),i=M(o,2,i,i,!0);for(var a,s=new o(5),u=new o(16),c=new o(20);e--;)a=i.times(i),i=i.times(s.plus(a.times(u.times(a).plus(c))))}return o.precision=t,o.rounding=n,l(i,t,n,!0)},ze.hyperbolicTangent=ze.tanh=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+7,r.rounding=1,je(n.sinh(),n.cosh(),r.precision=e,r.rounding=t)):new r(n.s)},ze.inverseCosine=ze.acos=function(){var e,t=this,n=t.constructor,r=t.abs().cmp(1),i=n.precision,o=n.rounding;return-1!==r?0===r?t.isNeg()?d(n,i,o):new n(0):new n(NaN):t.isZero()?d(n,i+4,o).times(.5):(n.precision=i+6,n.rounding=1,t=t.asin(),e=d(n,i+4,o).times(.5),n.precision=i,n.rounding=o,e.minus(t))},ze.inverseHyperbolicCosine=ze.acosh=function(){var e,t,n=this,r=n.constructor;return n.lte(1)?new r(n.eq(1)?0:NaN):n.isFinite()?(e=r.precision,t=r.rounding,r.precision=e+Math.max(Math.abs(n.e),n.sd())+4,r.rounding=1,Ce=!1,n=n.times(n).minus(1).sqrt().plus(n),Ce=!0,r.precision=e,r.rounding=t,n.ln()):new r(n)},ze.inverseHyperbolicSine=ze.asinh=function(){var e,t,n=this,r=n.constructor;return!n.isFinite()||n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+2*Math.max(Math.abs(n.e),n.sd())+6,r.rounding=1,Ce=!1,n=n.times(n).plus(1).sqrt().plus(n),Ce=!0,r.precision=e,r.rounding=t,n.ln())},ze.inverseHyperbolicTangent=ze.atanh=function(){var e,t,n,r,i=this,o=i.constructor;return i.isFinite()?i.e>=0?new o(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(e=o.precision,t=o.rounding,r=i.sd(),Math.max(r,e)<2*-i.e-1?l(new o(i),e,t,!0):(o.precision=n=r-i.e,i=je(i.plus(1),new o(1).minus(i),n+e,1),o.precision=e+4,o.rounding=1,i=i.ln(),o.precision=e,o.rounding=t,i.times(.5))):new o(NaN)},ze.inverseSine=ze.asin=function(){var e,t,n,r,i=this,o=i.constructor;return i.isZero()?new o(i):(t=i.abs().cmp(1),n=o.precision,r=o.rounding,-1!==t?0===t?(e=d(o,n+4,r).times(.5),e.s=i.s,e):new o(NaN):(o.precision=n+6,o.rounding=1,i=i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan(),o.precision=n,o.rounding=r,i.times(2)))},ze.inverseTangent=ze.atan=function(){var e,t,n,r,i,o,a,s,u,c=this,f=c.constructor,p=f.precision,h=f.rounding;if(c.isFinite()){if(c.isZero())return new f(c);if(c.abs().eq(1)&&p+4<=Be)return a=d(f,p+4,h).times(.25),a.s=c.s,a}else{if(!c.s)return new f(NaN);if(p+4<=Be)return a=d(f,p+4,h).times(.5),a.s=c.s,a}for(f.precision=s=p+10,f.rounding=1,n=Math.min(28,s/De+2|0),e=n;e;--e)c=c.div(c.times(c).plus(1).sqrt().plus(1));for(Ce=!1,t=Math.ceil(s/De),r=1,u=c.times(c),a=new f(c),i=c;-1!==e;)if(i=i.times(u),o=a.minus(i.div(r+=2)),i=i.times(u),a=o.plus(i.div(r+=2)),void 0!==a.d[t])for(e=t;a.d[e]===o.d[e]&&e--;);return n&&(a=a.times(2<<n-1)),Ce=!0,l(a,f.precision=p,f.rounding=h,!0)},ze.isFinite=function(){return!!this.d},ze.isInteger=ze.isInt=function(){return!!this.d&&ke(this.e/De)>this.d.length-2},ze.isNaN=function(){return!this.s},ze.isNegative=ze.isNeg=function(){return this.s<0},ze.isPositive=ze.isPos=function(){return this.s>0},ze.isZero=function(){return!!this.d&&0===this.d[0]},ze.lessThan=ze.lt=function(e){return this.cmp(e)<0},ze.lessThanOrEqualTo=ze.lte=function(e){return this.cmp(e)<1},ze.logarithm=ze.log=function(e){var t,n,r,i,a,u,c,f,p=this,d=p.constructor,m=d.precision,g=d.rounding;if(null==e)e=new d(10),t=!0;else{if(e=new d(e),n=e.d,e.s<0||!n||!n[0]||e.eq(1))return new d(NaN);t=e.eq(10)}if(n=p.d,p.s<0||!n||!n[0]||p.eq(1))return new d(n&&!n[0]?-1/0:1!=p.s?NaN:n?0:1/0);if(t)if(n.length>1)a=!0;else{for(i=n[0];i%10===0;)i/=10;a=1!==i}if(Ce=!1,c=m+5,u=w(p,c),r=t?h(d,c+10):w(e,c),f=je(u,r,c,1),s(f.d,i=m,g))do{if(c+=10,u=w(p,c),r=t?h(d,c+10):w(e,c),f=je(u,r,c,1),!a){+o(f.d).slice(i+1,i+15)+1==1e14&&(f=l(f,m+1,0));break}}while(s(f.d,i+=10,g));return Ce=!0,l(f,m,g)},ze.minus=ze.sub=function(e){var t,n,r,i,o,a,s,u,c,f,h,d,m=this,g=m.constructor;if(e=new g(e),!m.d||!e.d)return m.s&&e.s?m.d?e.s=-e.s:e=new g(e.d||m.s!==e.s?m:NaN):e=new g(NaN),e;if(m.s!=e.s)return e.s=-e.s,m.plus(e);if(c=m.d,d=e.d,s=g.precision,u=g.rounding,!c[0]||!d[0]){if(d[0])e.s=-e.s;else{if(!c[0])return new g(3===u?-0:0);e=new g(m)}return Ce?l(e,s,u):e}if(n=ke(e.e/De),f=ke(m.e/De),c=c.slice(),o=f-n){for(h=o<0,h?(t=c,o=-o,a=d.length):(t=d,n=f,a=c.length),r=Math.max(Math.ceil(s/De),a)+2,o>r&&(o=r,t.length=1),t.reverse(),r=o;r--;)t.push(0);t.reverse()}else{for(r=c.length,a=d.length,h=r<a,h&&(a=r),r=0;r<a;r++)if(c[r]!=d[r]){h=c[r]<d[r];break}o=0}for(h&&(t=c,c=d,d=t,e.s=-e.s),a=c.length,r=d.length-a;r>0;--r)c[a++]=0;for(r=d.length;r>o;){if(c[--r]<d[r]){for(i=r;i&&0===c[--i];)c[i]=Fe-1;--c[i],c[r]+=Fe}c[r]-=d[r]}for(;0===c[--a];)c.pop();for(;0===c[0];c.shift())--n;return c[0]?(e.d=c,e.e=p(c,n),Ce?l(e,s,u):e):new g(3===u?-0:0)},ze.modulo=ze.mod=function(e){var t,n=this,r=n.constructor;return e=new r(e),!n.d||!e.s||e.d&&!e.d[0]?new r(NaN):!e.d||n.d&&!n.d[0]?l(new r(n),r.precision,r.rounding):(Ce=!1,9==r.modulo?(t=je(n,e.abs(),0,3,1),t.s*=e.s):t=je(n,e,0,r.modulo,1),t=t.times(e),Ce=!0,n.minus(t))},ze.naturalExponential=ze.exp=function(){return x(this)},ze.naturalLogarithm=ze.ln=function(){return w(this)},ze.negated=ze.neg=function(){var e=new this.constructor(this);return e.s=-e.s,l(e)},ze.plus=ze.add=function(e){var t,n,r,i,o,a,s,u,c,f,h=this,d=h.constructor;if(e=new d(e),!h.d||!e.d)return h.s&&e.s?h.d||(e=new d(e.d||h.s===e.s?h:NaN)):e=new d(NaN),e;if(h.s!=e.s)return e.s=-e.s,h.minus(e);if(c=h.d,f=e.d,s=d.precision,u=d.rounding,!c[0]||!f[0])return f[0]||(e=new d(h)),Ce?l(e,s,u):e;if(o=ke(h.e/De),r=ke(e.e/De),c=c.slice(),i=o-r){for(i<0?(n=c,i=-i,a=f.length):(n=f,r=o,a=c.length),o=Math.ceil(s/De),a=o>a?o+1:a+1,i>a&&(i=a,n.length=1),n.reverse();i--;)n.push(0);n.reverse()}for(a=c.length,i=f.length,a-i<0&&(i=a,n=f,f=c,c=n),t=0;i;)t=(c[--i]=c[i]+f[i]+t)/Fe|0,c[i]%=Fe;for(t&&(c.unshift(t),++r),a=c.length;0==c[--a];)c.pop();return e.d=c,e.e=p(c,r),Ce?l(e,s,u):e},ze.precision=ze.sd=function(e){var t,n=this;if(void 0!==e&&e!==!!e&&1!==e&&0!==e)throw Error(Me+e);return n.d?(t=m(n.d),e&&n.e+1>t&&(t=n.e+1)):t=NaN,t},ze.round=function(){var e=this,t=e.constructor;return l(new t(e),e.e+1,t.rounding)},ze.sine=ze.sin=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+Math.max(n.e,n.sd())+De,r.rounding=1,n=S(r,T(r,n)),r.precision=e,r.rounding=t,l(ve>2?n.neg():n,e,t,!0)):new r(NaN)},ze.squareRoot=ze.sqrt=function(){var e,t,n,r,i,a,s=this,u=s.d,c=s.e,f=s.s,p=s.constructor;if(1!==f||!u||!u[0])return new p(!f||f<0&&(!u||u[0])?NaN:u?s:1/0);for(Ce=!1,f=Math.sqrt(+s),0==f||f==1/0?(t=o(u),(t.length+c)%2==0&&(t+="0"),f=Math.sqrt(t),c=ke((c+1)/2)-(c<0||c%2),f==1/0?t="1e"+c:(t=f.toExponential(),t=t.slice(0,t.indexOf("e")+1)+c),r=new p(t)):r=new p(f.toString()),n=(c=p.precision)+3;;)if(a=r,r=a.plus(je(s,a,n+2,1)).times(.5),o(a.d).slice(0,n)===(t=o(r.d)).slice(0,n)){if("9999"!=(t=t.slice(n-3,n+1))&&(i||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(l(r,c+1,1),e=!r.times(r).eq(s));break}if(!i&&(l(a,c+1,0),a.times(a).eq(s))){r=a;break}n+=4,i=1}return Ce=!0,l(r,c,p.rounding,e)},ze.tangent=ze.tan=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+10,r.rounding=1,n=n.sin(),n.s=1,n=je(n,new r(1).minus(n.times(n)).sqrt(),e+10,0),r.precision=e,r.rounding=t,l(2==ve||4==ve?n.neg():n,e,t,!0)):new r(NaN)},ze.times=ze.mul=function(e){var t,n,r,i,o,a,s,u,c,f=this,h=f.constructor,d=f.d,m=(e=new h(e)).d;if(e.s*=f.s,!d||!d[0]||!m||!m[0])return new h(!e.s||d&&!d[0]&&!m||m&&!m[0]&&!d?NaN:d&&m?0*e.s:e.s/0);for(n=ke(f.e/De)+ke(e.e/De),u=d.length,c=m.length,u<c&&(o=d,d=m,m=o,a=u,u=c,c=a),o=[],a=u+c,r=a;r--;)o.push(0);for(r=c;--r>=0;){for(t=0,i=u+r;i>r;)s=o[i]+m[r]*d[i-r-1]+t,o[i--]=s%Fe|0,t=s/Fe|0;o[i]=(o[i]+t)%Fe|0}for(;!o[--a];)o.pop();return t?++n:o.shift(),e.d=o,e.e=p(o,n),Ce?l(e,h.precision,h.rounding):e},ze.toBinary=function(e,t){return O(this,2,e,t)},ze.toDecimalPlaces=ze.toDP=function(e,t){var n=this,r=n.constructor;return n=new r(n),void 0===e?n:(a(e,0,be),void 0===t?t=r.rounding:a(t,0,8),l(n,e+n.e+1,t))},ze.toExponential=function(e,t){var n,r=this,i=r.constructor;return void 0===e?n=f(r,!0):(a(e,0,be),void 0===t?t=i.rounding:a(t,0,8),r=l(new i(r),e+1,t),n=f(r,!0,e+1)),r.isNeg()&&!r.isZero()?"-"+n:n},ze.toFixed=function(e,t){var n,r,i=this,o=i.constructor;return void 0===e?n=f(i):(a(e,0,be),void 0===t?t=o.rounding:a(t,0,8),r=l(new o(i),e+i.e+1,t),n=f(r,!1,e+r.e+1)),i.isNeg()&&!i.isZero()?"-"+n:n},ze.toFraction=function(e){var t,n,r,i,a,s,u,c,l,f,p,h,d=this,g=d.d,v=d.constructor;if(!g)return new v(d);if(l=n=new v(1),r=c=new v(0),t=new v(r),a=t.e=m(g)-d.e-1,s=a%De,t.d[0]=Ae(10,s<0?De+s:s),null==e)e=a>0?t:l;else{if(u=new v(e),!u.isInt()||u.lt(l))throw Error(Me+u);e=u.gt(t)?a>0?t:l:u}for(Ce=!1,u=new v(o(g)),f=v.precision,v.precision=a=g.length*De*2;p=je(u,t,0,1,1),i=n.plus(p.times(r)),1!=i.cmp(e);)n=r,r=i,i=l,l=c.plus(p.times(i)),c=i,i=t,t=u.minus(p.times(i)),u=i;return i=je(e.minus(n),r,0,1,1),c=c.plus(i.times(l)),n=n.plus(i.times(r)),c.s=l.s=d.s,h=je(l,r,a,1).minus(d).abs().cmp(je(c,n,a,1).minus(d).abs())<1?[l,r]:[c,n],v.precision=f,Ce=!0,h},ze.toHexadecimal=ze.toHex=function(e,t){return O(this,16,e,t)},ze.toNearest=function(e,t){var n=this,r=n.constructor;if(n=new r(n),null==e){if(!n.d)return n;e=new r(1),t=r.rounding}else{if(e=new r(e),void 0===t?t=r.rounding:a(t,0,8),!n.d)return e.s?n:e;if(!e.d)return e.s&&(e.s=n.s),e}return e.d[0]?(Ce=!1,n=je(n,e,0,t,1).times(e),Ce=!0,l(n)):(e.s=n.s,n=e),n},ze.toNumber=function(){return+this},ze.toOctal=function(e,t){return O(this,8,e,t)},ze.toPower=ze.pow=function(e){var t,n,r,i,a,u,c=this,f=c.constructor,p=+(e=new f(e));if(!c.d||!e.d||!c.d[0]||!e.d[0])return new f(Ae(+c,p));if(c=new f(c),c.eq(1))return c;if(r=f.precision,a=f.rounding,e.eq(1))return l(c,r,a);if((t=ke(e.e/De))>=e.d.length-1&&(n=p<0?-p:p)<=9007199254740991)return i=v(f,c,n,r),e.s<0?new f(1).div(i):l(i,r,a);if((u=c.s)<0){if(t<e.d.length-1)return new f(NaN);if(0==(1&e.d[t])&&(u=1),0==c.e&&1==c.d[0]&&1==c.d.length)return c.s=u,c}return n=Ae(+c,p),(t=0!=n&&isFinite(n)?new f(n+"").e:ke(p*(Math.log("0."+o(c.d))/Math.LN10+c.e+1)))>f.maxE+1||t<f.minE-1?new f(t>0?u/0:0):(Ce=!1,f.rounding=c.s=1,n=Math.min(12,(t+"").length),i=x(e.times(w(c,r+n)),r),i.d&&(i=l(i,r+5,1),s(i.d,r,a)&&(t=r+10,i=l(x(e.times(w(c,t+n)),t),t+5,1),+o(i.d).slice(r+1,r+15)+1==1e14&&(i=l(i,r+1,0)))),i.s=u,Ce=!0,f.rounding=a,l(i,r,a))},ze.toPrecision=function(e,t){var n,r=this,i=r.constructor;return void 0===e?n=f(r,r.e<=i.toExpNeg||r.e>=i.toExpPos):(a(e,1,be),void 0===t?t=i.rounding:a(t,0,8),r=l(new i(r),e,t),n=f(r,e<=r.e||r.e<=i.toExpNeg,e)),r.isNeg()&&!r.isZero()?"-"+n:n},ze.toSignificantDigits=ze.toSD=function(e,t){var n=this,r=n.constructor;return void 0===e?(e=r.precision,t=r.rounding):(a(e,1,be),void 0===t?t=r.rounding:a(t,0,8)),l(new r(n),e,t)},ze.toString=function(){var e=this,t=e.constructor,n=f(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+n:n},ze.truncated=ze.trunc=function(){return l(new this.constructor(this),this.e+1,1)},ze.valueOf=ze.toJSON=function(){var e=this,t=e.constructor,n=f(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+n:n};var je=function(){function e(e,t,n){var r,i=0,o=e.length;for(e=e.slice();o--;)r=e[o]*t+i,e[o]=r%n|0,i=r/n|0;return i&&e.unshift(i),e}function t(e,t,n,r){var i,o;if(n!=r)o=n>r?1:-1;else for(i=o=0;i<n;i++)if(e[i]!=t[i]){o=e[i]>t[i]?1:-1;break}return o}function n(e,t,n,r){for(var i=0;n--;)e[n]-=i,i=e[n]<t[n]?1:0,e[n]=i*r+e[n]-t[n];for(;!e[0]&&e.length>1;)e.shift()}return function(r,i,o,a,s,u){var c,f,p,h,d,m,g,v,y,b,x,w,N,E,C,S,M,T,O,k,A=r.constructor,_=r.s==i.s?1:-1,P=r.d,R=i.d;if(!P||!P[0]||!R||!R[0])return new A(r.s&&i.s&&(P?!R||P[0]!=R[0]:R)?P&&0==P[0]||!R?0*_:_/0:NaN);for(u?(d=1,f=r.e-i.e):(u=Fe,d=De,f=ke(r.e/d)-ke(i.e/d)),O=R.length,M=P.length,y=new A(_),b=y.d=[],p=0;R[p]==(P[p]||0);p++);if(R[p]>(P[p]||0)&&f--,null==o?(E=o=A.precision,a=A.rounding):E=s?o+(r.e-i.e)+1:o,E<0)b.push(1),m=!0;else{if(E=E/d+2|0,p=0,1==O){for(h=0,R=R[0],E++;(p<M||h)&&E--;p++)C=h*u+(P[p]||0),b[p]=C/R|0,h=C%R|0;m=h||p<M}else{for(h=u/(R[0]+1)|0,h>1&&(R=e(R,h,u),P=e(P,h,u),O=R.length,M=P.length),S=O,x=P.slice(0,O),w=x.length;w<O;)x[w++]=0;k=R.slice(),k.unshift(0),T=R[0],R[1]>=u/2&&++T;do{h=0,c=t(R,x,O,w),c<0?(N=x[0],O!=w&&(N=N*u+(x[1]||0)),h=N/T|0,h>1?(h>=u&&(h=u-1),g=e(R,h,u),v=g.length,w=x.length,1==(c=t(g,x,v,w))&&(h--,n(g,O<v?k:R,v,u))):(0==h&&(c=h=1),g=R.slice()),v=g.length,v<w&&g.unshift(0),n(x,g,w,u),-1==c&&(w=x.length,(c=t(R,x,O,w))<1&&(h++,n(x,O<w?k:R,w,u))),w=x.length):0===c&&(h++,x=[0]),b[p++]=h,c&&x[0]?x[w++]=P[S]||0:(x=[P[S]],w=1)}while((S++<M||void 0!==x[0])&&E--);m=void 0!==x[0]}b[0]||b.shift()}if(1==d)y.e=f,ge=m;else{for(p=1,h=b[0];h>=10;h/=10)p++;y.e=p+f*d-1,l(y,s?o+y.e+1:o,a,m)}return y}}();me=W(Ee),me.default=me.Decimal=me,we=new me(we),Ne=new me(Ne),void 0!==(r=function(){return me}.call(t,n,t,e))&&(e.exports=r)}()},function(e,t,n){"use strict";function r(e,t,n,r){var o=r("bignumber",{"":function(){return new e.BigNumber(0)},number:function(t){return new e.BigNumber(t+"")},string:function(t){return new e.BigNumber(t)},BigNumber:function(e){return e},Fraction:function(t){return new e.BigNumber(t.n).div(t.d)},null:function(t){return new e.BigNumber(0)},"Array | Matrix":function(e){return i(e,o)}});return o.toTex={0:"0",1:"\\left(${args[0]}\\right)"},o}var i=n(0);t.name="bignumber",t.factory=r},function(e,t,n){"use strict";function r(e,t,n,r){var o=r("bool",{"":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 t=e.toLowerCase();if("true"===t)return!0;if("false"===t)return!1;var n=Number(e);if(""!==e&&!isNaN(n))return!!n;throw new Error('Cannot convert "'+e+'" to a boolean')},"Array | Matrix":function(e){return i(e,o)}});return o}var i=n(0);t.name="boolean",t.factory=r},function(e,t,n){"use strict";e.exports=[n(272),n(274)]},function(e,t,n){"use strict";function r(e,t,n,r,a){function s(t){if(!(this instanceof s))throw new SyntaxError("Constructor must be called with the new operator");e.isChain(t)?this.value=t.value:this.value=t}function u(e,t){"function"===typeof t&&(s.prototype[e]=l(t))}function c(e,t){o(s.prototype,e,function(){var e=t();if("function"===typeof e)return l(e)})}function l(e){return function(){for(var t=[this.value],n=0;n<arguments.length;n++)t[n+1]=arguments[n];return new s(e.apply(e,t))}}return s.prototype.type="Chain",s.prototype.isChain=!0,s.prototype.done=function(){return this.value},s.prototype.valueOf=function(){return this.value},s.prototype.toString=function(){return i(this.value)},s.prototype.toJSON=function(){return{mathjs:"Chain",value:this.value}},s.fromJSON=function(e){return new s(e.value)},s.createProxy=function(e,t){if("string"===typeof e)u(e,t);else for(var n in e)e.hasOwnProperty(n)&&u(n,e[n])},s.createProxy(a),a.on("import",function(e,t,n){void 0===n&&c(e,t)}),s}var i=n(9).format,o=n(5).lazy;t.name="Chain",t.path="type",t.factory=r,t.math=!0,t.lazy=!1},function(e,t,n){"use strict";var r=n(5);t.format=function(e,n){if("function"===typeof n)return n(e);if(!e.isFinite())return e.isNaN()?"NaN":e.gt(0)?"Infinity":"-Infinity";var i="auto",o=void 0;switch(void 0!==n&&(n.notation&&(i=n.notation),"number"===typeof n?o=n:n.precision&&(o=n.precision)),i){case"fixed":return t.toFixed(e,o);case"exponential":return t.toExponential(e,o);case"auto":if(n&&n.exponential&&(void 0!==n.exponential.lower||void 0!==n.exponential.upper)){var a=r.map(n,function(e){return e});return a.exponential=void 0,void 0!==n.exponential.lower&&(a.lowerExp=Math.round(Math.log(n.exponential.lower)/Math.LN10)),void 0!==n.exponential.upper&&(a.upperExp=Math.round(Math.log(n.exponential.upper)/Math.LN10)),console.warn("Deprecation warning: Formatting options exponential.lower and exponential.upper (minimum and maximum value) are replaced with exponential.lowerExp and exponential.upperExp (minimum and maximum exponent) since version 4.0.0. Replace "+JSON.stringify(n)+" with "+JSON.stringify(a)),t.format(e,a)}var s=n&&void 0!==n.lowerExp?n.lowerExp:-3,u=n&&void 0!==n.upperExp?n.upperExp:5;if(e.isZero())return"0";var c=void 0,l=e.logarithm();return c=l.gte(s)&&l.lt(u)?e.toSignificantDigits(o).toFixed():t.toExponential(e,o),c.replace(/((\.\d*?)(0+))($|e)/,function(){var e=arguments[2],t=arguments[4];return"."!==e?e+t:t});default:throw new Error('Unknown notation "'+i+'". Choose "auto", "exponential", or "fixed".')}},t.toExponential=function(e,t){return void 0!==t?e.toExponential(t-1):e.toExponential()},t.toFixed=function(e,t){return e.toFixed(t)}},function(e,t,n){"use strict";function r(e,t,n,r){return r("chain",{"":function(){return new e.Chain},any:function(t){return new e.Chain(t)}})}t.name="chain",t.factory=r},function(e,t,n){"use strict";e.exports=[n(97),n(277)]},function(e,t,n){var r,i;!function(n){"use strict";function o(e,t){var n=Math.abs(e),r=Math.abs(t);return 0===e?Math.log(r):0===t?Math.log(n):n<3e3&&r<3e3?.5*Math.log(e*e+t*t):Math.log(e/Math.cos(Math.atan2(t,e)))}function a(e,t){if(!(this instanceof a))return new a(e,t);var n=p(e,t);this.re=n.re,this.im=n.im}var s=function(e){return.5*(Math.exp(e)+Math.exp(-e))},u=function(e){return.5*(Math.exp(e)-Math.exp(-e))},c=function(e){var t=Math.PI/4;if(e<-t||e>t)return Math.cos(e)-1;var n=e*e;return n*(n*(1/24+n*(-1/720+n*(1/40320+n*(-1/3628800+n*(1/4790014600+n*(-1/87178291200+n*(1/20922789888e3)))))))-.5)},l=function(e,t){var n=Math.abs(e),r=Math.abs(t);return n<3e3&&r<3e3?Math.sqrt(n*n+r*r):(n<r?(n=r,r=e/t):r=t/e,n*Math.sqrt(1+r*r))},f=function(){throw SyntaxError("Invalid Param")},p=function(e,t){var n={re:0,im:0};if(void 0===e||null===e)n.re=n.im=0;else if(void 0!==t)n.re=e,n.im=t;else switch(typeof e){case"object":if("im"in e&&"re"in e)n.re=e.re,n.im=e.im;else if("abs"in e&&"arg"in e){if(!Number.isFinite(e.abs)&&Number.isFinite(e.arg))return a.INFINITY;n.re=e.abs*Math.cos(e.arg),n.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 a.INFINITY;n.re=e.r*Math.cos(e.phi),n.im=e.r*Math.sin(e.phi)}else 2===e.length?(n.re=e[0],n.im=e[1]):f();break;case"string":n.im=n.re=0;var r=e.match(/\d+\.?\d*e[+-]?\d+|\d+\.?\d*|\.\d+|./g),i=1,o=0;null===r&&f();for(var s=0;s<r.length;s++){var u=r[s];" "===u||"\t"===u||"\n"===u||("+"===u?i++:"-"===u?o++:"i"===u||"I"===u?(i+o===0&&f()," "===r[s+1]||isNaN(r[s+1])?n.im+=parseFloat((o%2?"-":"")+"1"):(n.im+=parseFloat((o%2?"-":"")+r[s+1]),s++),i=o=0):((i+o===0||isNaN(u))&&f(),"i"===r[s+1]||"I"===r[s+1]?(n.im+=parseFloat((o%2?"-":"")+u),s++):n.re+=parseFloat((o%2?"-":"")+u),i=o=0))}i+o>0&&f();break;case"number":n.im=0,n.re=e;break;default:f()}return isNaN(n.re)||isNaN(n.im),n};a.prototype={re:0,im:0,sign:function(){var e=this.abs();return new a(this.re/e,this.im/e)},add:function(e,t){var n=new a(e,t);return this.isInfinite()&&n.isInfinite()?a.NAN:this.isInfinite()||n.isInfinite()?a.INFINITY:new a(this.re+n.re,this.im+n.im)},sub:function(e,t){var n=new a(e,t);return this.isInfinite()&&n.isInfinite()?a.NAN:this.isInfinite()||n.isInfinite()?a.INFINITY:new a(this.re-n.re,this.im-n.im)},mul:function(e,t){var n=new a(e,t);return this.isInfinite()&&n.isZero()||this.isZero()&&n.isInfinite()?a.NAN:this.isInfinite()||n.isInfinite()?a.INFINITY:0===n.im&&0===this.im?new a(this.re*n.re,0):new a(this.re*n.re-this.im*n.im,this.re*n.im+this.im*n.re)},div:function(e,t){var n=new a(e,t);if(this.isZero()&&n.isZero()||this.isInfinite()&&n.isInfinite())return a.NAN;if(this.isInfinite()||n.isZero())return a.INFINITY;if(this.isZero()||n.isInfinite())return a.ZERO;e=this.re,t=this.im;var r,i,o=n.re,s=n.im;return 0===s?new a(e/o,t/o):Math.abs(o)<Math.abs(s)?(i=o/s,r=o*i+s,new a((e*i+t)/r,(t*i-e)/r)):(i=s/o,r=s*i+o,new a((e+t*i)/r,(t-e*i)/r))},pow:function(e,t){var n=new a(e,t);if(e=this.re,t=this.im,n.isZero())return a.ONE;if(0===n.im){if(0===t&&e>=0)return new a(Math.pow(e,n.re),0);if(0===e)switch((n.re%4+4)%4){case 0:return new a(Math.pow(t,n.re),0);case 1:return new a(0,Math.pow(t,n.re));case 2:return new a(-Math.pow(t,n.re),0);case 3:return new a(0,-Math.pow(t,n.re))}}if(0===e&&0===t&&n.re>0&&n.im>=0)return a.ZERO;var r=Math.atan2(t,e),i=o(e,t);return e=Math.exp(n.re*i-n.im*r),t=n.im*i+n.re*r,new a(e*Math.cos(t),e*Math.sin(t))},sqrt:function(){var e,t,n=this.re,r=this.im,i=this.abs();if(n>=0){if(0===r)return new a(Math.sqrt(n),0);e=.5*Math.sqrt(2*(i+n))}else e=Math.abs(r)/Math.sqrt(2*(i-n));return t=n<=0?.5*Math.sqrt(2*(i-n)):Math.abs(r)/Math.sqrt(2*(i+n)),new a(e,r<0?-t:t)},exp:function(){var e=Math.exp(this.re);return this.im,new a(e*Math.cos(this.im),e*Math.sin(this.im))},expm1:function(){var e=this.re,t=this.im;return new a(Math.expm1(e)*Math.cos(t)+c(t),Math.exp(e)*Math.sin(t))},log:function(){var e=this.re,t=this.im;return new a(o(e,t),Math.atan2(t,e))},abs:function(){return l(this.re,this.im)},arg:function(){return Math.atan2(this.im,this.re)},sin:function(){var e=this.re,t=this.im;return new a(Math.sin(e)*s(t),Math.cos(e)*u(t))},cos:function(){var e=this.re,t=this.im;return new a(Math.cos(e)*s(t),-Math.sin(e)*u(t))},tan:function(){var e=2*this.re,t=2*this.im,n=Math.cos(e)+s(t);return new a(Math.sin(e)/n,u(t)/n)},cot:function(){var e=2*this.re,t=2*this.im,n=Math.cos(e)-s(t);return new a(-Math.sin(e)/n,u(t)/n)},sec:function(){var e=this.re,t=this.im,n=.5*s(2*t)+.5*Math.cos(2*e);return new a(Math.cos(e)*s(t)/n,Math.sin(e)*u(t)/n)},csc:function(){var e=this.re,t=this.im,n=.5*s(2*t)-.5*Math.cos(2*e);return new a(Math.sin(e)*s(t)/n,-Math.cos(e)*u(t)/n)},asin:function(){var e=this.re,t=this.im,n=new a(t*t-e*e+1,-2*e*t).sqrt(),r=new a(n.re-t,n.im+e).log();return new a(r.im,-r.re)},acos:function(){var e=this.re,t=this.im,n=new a(t*t-e*e+1,-2*e*t).sqrt(),r=new a(n.re-t,n.im+e).log();return new a(Math.PI/2-r.im,r.re)},atan:function(){var e=this.re,t=this.im;if(0===e){if(1===t)return new a(0,1/0);if(-1===t)return new a(0,-1/0)}var n=e*e+(1-t)*(1-t),r=new a((1-t*t-e*e)/n,-2*e/n).log();return new a(-.5*r.im,.5*r.re)},acot:function(){var e=this.re,t=this.im;if(0===t)return new a(Math.atan2(1,e),0);var n=e*e+t*t;return 0!==n?new a(e/n,-t/n).atan():new a(0!==e?e/0:0,0!==t?-t/0:0).atan()},asec:function(){var e=this.re,t=this.im;if(0===e&&0===t)return new a(0,1/0);var n=e*e+t*t;return 0!==n?new a(e/n,-t/n).acos():new a(0!==e?e/0:0,0!==t?-t/0:0).acos()},acsc:function(){var e=this.re,t=this.im;if(0===e&&0===t)return new a(Math.PI/2,1/0);var n=e*e+t*t;return 0!==n?new a(e/n,-t/n).asin():new a(0!==e?e/0:0,0!==t?-t/0:0).asin()},sinh:function(){var e=this.re,t=this.im;return new a(u(e)*Math.cos(t),s(e)*Math.sin(t))},cosh:function(){var e=this.re,t=this.im;return new a(s(e)*Math.cos(t),u(e)*Math.sin(t))},tanh:function(){var e=2*this.re,t=2*this.im,n=s(e)+Math.cos(t);return new a(u(e)/n,Math.sin(t)/n)},coth:function(){var e=2*this.re,t=2*this.im,n=s(e)-Math.cos(t);return new a(u(e)/n,-Math.sin(t)/n)},csch:function(){var e=this.re,t=this.im,n=Math.cos(2*t)-s(2*e);return new a(-2*u(e)*Math.cos(t)/n,2*s(e)*Math.sin(t)/n)},sech:function(){var e=this.re,t=this.im,n=Math.cos(2*t)+s(2*e);return new a(2*s(e)*Math.cos(t)/n,-2*u(e)*Math.sin(t)/n)},asinh:function(){var e=this.im;this.im=-this.re,this.re=e;var t=this.asin();return this.re=-this.im,this.im=e,e=t.re,t.re=-t.im,t.im=e,t},acosh:function(){var e=this.acos();if(e.im<=0){var t=e.re;e.re=-e.im,e.im=t}else{var t=e.im;e.im=-e.re,e.re=t}return e},atanh:function(){var e=this.re,t=this.im,n=e>1&&0===t,r=1-e,i=1+e,s=r*r+t*t,u=0!==s?new a((i*r-t*t)/s,(t*r+i*t)/s):new a(-1!==e?e/0:0,0!==t?t/0:0),c=u.re;return u.re=o(u.re,u.im)/2,u.im=Math.atan2(u.im,c)/2,n&&(u.im=-u.im),u},acoth:function(){var e=this.re,t=this.im;if(0===e&&0===t)return new a(0,Math.PI/2);var n=e*e+t*t;return 0!==n?new a(e/n,-t/n).atanh():new a(0!==e?e/0:0,0!==t?-t/0:0).atanh()},acsch:function(){var e=this.re,t=this.im;if(0===t)return new a(0!==e?Math.log(e+Math.sqrt(e*e+1)):1/0,0);var n=e*e+t*t;return 0!==n?new a(e/n,-t/n).asinh():new a(0!==e?e/0:0,0!==t?-t/0:0).asinh()},asech:function(){var e=this.re,t=this.im;if(this.isZero())return a.INFINITY;var n=e*e+t*t;return 0!==n?new a(e/n,-t/n).acosh():new a(0!==e?e/0:0,0!==t?-t/0:0).acosh()},inverse:function(){if(this.isZero())return a.INFINITY;if(this.isInfinite())return a.ZERO;var e=this.re,t=this.im,n=e*e+t*t;return new a(e/n,-t/n)},conjugate:function(){return new a(this.re,-this.im)},neg:function(){return new a(-this.re,-this.im)},ceil:function(e){return e=Math.pow(10,e||0),new a(Math.ceil(this.re*e)/e,Math.ceil(this.im*e)/e)},floor:function(e){return e=Math.pow(10,e||0),new a(Math.floor(this.re*e)/e,Math.floor(this.im*e)/e)},round:function(e){return e=Math.pow(10,e||0),new a(Math.round(this.re*e)/e,Math.round(this.im*e)/e)},equals:function(e,t){var n=new a(e,t);return Math.abs(n.re-this.re)<=a.EPSILON&&Math.abs(n.im-this.im)<=a.EPSILON},clone:function(){return new a(this.re,this.im)},toString:function(){var e=this.re,t=this.im,n="";return this.isNaN()?"NaN":this.isZero()?"0":this.isInfinite()?"Infinity":(0!==e&&(n+=e),0!==t&&(0!==e?n+=t<0?" - ":" + ":t<0&&(n+="-"),t=Math.abs(t),1!==t&&(n+=t),n+="i"),n||"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())}},a.ZERO=new a(0,0),a.ONE=new a(1,0),a.I=new a(0,1),a.PI=new a(Math.PI,0),a.E=new a(Math.E,0),a.INFINITY=new a(1/0,1/0),a.NAN=new a(NaN,NaN),a.EPSILON=1e-16,r=[],void 0!==(i=function(){return a}.apply(t,r))&&(e.exports=i)}()},function(e,t,n){"use strict";function r(e,t,r,o){var a=n(4),s=o("complex",{"":function(){return e.Complex.ZERO},number:function(t){return new e.Complex(t,0)},"number, number":function(t,n){return new e.Complex(t,n)},"BigNumber, BigNumber":function(t,n){return new e.Complex(t.toNumber(),n.toNumber())},Complex:function(e){return e.clone()},string:function(t){return e.Complex(t)},null:function(t){return e.Complex(0)},Object:function(t){if("re"in t&&"im"in t)return new e.Complex(t.re,t.im);if("r"in t&&"phi"in t||"abs"in t&&"arg"in t)return new e.Complex(t);throw new Error("Expected object with properties (re and im) or (r and phi) or (abs and arg)")},"Array | Matrix":function(e){return i(e,s)}});return s.toTex={0:"0",1:"\\left(${args[0]}\\right)",2:"\\left(\\left(${args[0]}\\right)+"+a.symbols.i+"\\cdot\\left(${args[1]}\\right)\\right)"},s}var i=n(0);t.name="complex",t.factory=r},function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i={"{":"\\{","}":"\\}","\\":"\\textbackslash{}","#":"\\#",$:"\\$","%":"\\%","&":"\\&","^":"\\textasciicircum{}",_:"\\_","~":"\\textasciitilde{}"},o={"\u2013":"\\--","\u2014":"\\---"," ":"~","\t":"\\qquad{}","\r\n":"\\\\newline{}","\n":"\\\\newline{}"},a=function(e,t){return r({},e,t)};e.exports=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.preserveFormatting,s=void 0!==n&&n,u=t.escapeMapFn,c=void 0===u?a:u,l=String(e),f="",p=c(r({},i),s?r({},o):{}),h=Object.keys(p);l;)!function(){var e=!1;h.forEach(function(t,n){e||l.length>=t.length&&l.slice(0,t.length)===t&&(f+=p[h[n]],l=l.slice(t.length,l.length),e=!0)}),e||(f+=l.slice(0,1),l=l.slice(1,l.length))}();return f}},function(e,t,n){"use strict";e.exports=[n(280),n(134)]},function(e,t,n){"use strict";function r(e,t,n,r){return i}var i=n(281);i.prototype.type="Fraction",i.prototype.isFraction=!0,i.prototype.toJSON=function(){return{mathjs:"Fraction",n:this.s*this.n,d:this.d}},i.fromJSON=function(e){return new i(e)},t.name="Fraction",t.path="type",t.factory=r},function(e,t,n){var r,i;!function(n){"use strict";function o(e){function t(){var t=Error.apply(this,arguments);t.name=this.name=e,this.stack=t.stack,this.message=t.message}function n(){}return n.prototype=Error.prototype,t.prototype=new n,t}function a(e,t){return isNaN(e=parseInt(e,10))&&s(),e*t}function s(){throw new g}function u(e,t,n){for(var r=1;t>0;e=e*e%n,t>>=1)1&t&&(r=r*e%n);return r}function c(e,t){for(;t%2===0;t/=2);for(;t%5===0;t/=5);if(1===t)return 0;for(var n=10%t,r=1;1!==n;r++)if(n=10*n%t,r>h)return 0;return r}function l(e,t,n){for(var r=1,i=u(10,n,t),o=0;o<300;o++){if(r===i)return o;r=10*r%t,i=10*i%t}return 0}function f(e,t){if(!e)return t;if(!t)return e;for(;;){if(!(e%=t))return t;if(!(t%=e))return e}}function p(e,t){if(!(this instanceof p))return new p(e,t);v(e,t),e=p.REDUCE?f(d.d,d.n):1,this.s=d.s,this.n=d.n/e,this.d=d.d/e}var h=2e3,d={s:1,n:0,d:1},m=p.DivisionByZero=o("DivisionByZero"),g=p.InvalidParameter=o("InvalidParameter"),v=function(e,t){var n,r=0,i=1,o=1,u=0,c=0,l=0,f=1,p=1,h=0,g=1,v=1,y=1,b=1e7;if(void 0===e||null===e);else if(void 0!==t)r=e,i=t,o=r*i;else switch(typeof e){case"object":"d"in e&&"n"in e?(r=e.n,i=e.d,"s"in e&&(r*=e.s)):0 in e?(r=e[0],1 in e&&(i=e[1])):s(),o=r*i;break;case"number":if(e<0&&(o=e,e=-e),e%1===0)r=e;else if(e>0){for(e>=1&&(p=Math.pow(10,Math.floor(1+Math.log(e)/Math.LN10)),e/=p);g<=b&&y<=b;){if(n=(h+v)/(g+y),e===n){g+y<=b?(r=h+v,i=g+y):y>g?(r=v,i=y):(r=h,i=g);break}e>n?(h+=v,g+=y):(v+=h,y+=g),g>b?(r=v,i=y):(r=h,i=g)}r*=p}else(isNaN(e)||isNaN(t))&&(i=r=NaN);break;case"string":if(g=e.match(/\d+|./g),null===g&&s(),"-"===g[h]?(o=-1,h++):"+"===g[h]&&h++,g.length===h+1?c=a(g[h++],o):"."===g[h+1]||"."===g[h]?("."!==g[h]&&(u=a(g[h++],o)),h++,(h+1===g.length||"("===g[h+1]&&")"===g[h+3]||"'"===g[h+1]&&"'"===g[h+3])&&(c=a(g[h],o),f=Math.pow(10,g[h].length),h++),("("===g[h]&&")"===g[h+2]||"'"===g[h]&&"'"===g[h+2])&&(l=a(g[h+1],o),p=Math.pow(10,g[h+1].length)-1,h+=3)):"/"===g[h+1]||":"===g[h+1]?(c=a(g[h],o),f=a(g[h+2],1),h+=3):"/"===g[h+3]&&" "===g[h+1]&&(u=a(g[h],o),c=a(g[h+2],o),f=a(g[h+4],1),h+=5),g.length<=h){i=f*p,o=r=l+i*u+p*c;break}default:s()}if(0===i)throw new m;d.s=o<0?-1:1,d.n=Math.abs(r),d.d=Math.abs(i)};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,t){return v(e,t),new p(this.s*this.n*d.d+d.s*this.d*d.n,this.d*d.d)},sub:function(e,t){return v(e,t),new p(this.s*this.n*d.d-d.s*this.d*d.n,this.d*d.d)},mul:function(e,t){return v(e,t),new p(this.s*d.s*this.n*d.n,this.d*d.d)},div:function(e,t){return v(e,t),new p(this.s*d.s*this.n*d.d,this.d*d.n)},clone:function(){return new p(this)},mod:function(e,t){return isNaN(this.n)||isNaN(this.d)?new p(NaN):void 0===e?new p(this.s*this.n%this.d,1):(v(e,t),0===d.n&&0===this.d&&p(0,0),new p(this.s*(d.d*this.n)%(d.n*this.d),d.d*this.d))},gcd:function(e,t){return v(e,t),new p(f(d.n,this.n)*f(d.d,this.d),d.d*this.d)},lcm:function(e,t){return v(e,t),0===d.n&&0===this.n?new p:new p(d.n*this.n,f(d.n,this.n)*f(d.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,t){return v(e,t),this.s*this.n*d.d===d.s*d.n*this.d},compare:function(e,t){v(e,t);var n=this.s*this.n*d.d-d.s*d.n*this.d;return(0<n)-(n<0)},simplify:function(e){function t(e){return 1===e.length?new p(e[0]):t(e.slice(1)).inverse().add(e[0])}if(isNaN(this.n)||isNaN(this.d))return this;var n=this.abs().toContinued();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,t){return v(e,t),!(!(d.n*this.d)||this.n*d.d%(d.n*this.d))},valueOf:function(){return this.s*this.n/this.d},toFraction:function(e){var t,n="",r=this.n,i=this.d;return this.s<0&&(n+="-"),1===i?n+=r:(e&&(t=Math.floor(r/i))>0&&(n+=t,n+=" ",r%=i),n+=r,n+="/",n+=i),n},toLatex:function(e){var t,n="",r=this.n,i=this.d;return this.s<0&&(n+="-"),1===i?n+=r:(e&&(t=Math.floor(r/i))>0&&(n+=t,r%=i),n+="\\frac{",n+=r,n+="}{",n+=i,n+="}"),n},toContinued:function(){var e,t=this.n,n=this.d,r=[];if(isNaN(this.n)||isNaN(this.d))return r;do{r.push(Math.floor(t/n)),e=t%n,t=n,n=e}while(1!==t);return r},toString:function(){var e,t=this.n,n=this.d;if(isNaN(t)||isNaN(n))return"NaN";p.REDUCE||(e=f(t,n),t/=e,n/=e);var r=c(t,n),i=l(t,n,r),o=-1===this.s?"-":"";if(o+=t/n|0,t%=n,t*=10,t&&(o+="."),r){for(var a=i;a--;)o+=t/n|0,t%=n,t*=10;o+="(";for(var a=r;a--;)o+=t/n|0,t%=n,t*=10;o+=")"}else for(var a=15;t&&a--;)o+=t/n|0,t%=n,t*=10;return o}},r=[],void 0!==(i=function(){return p}.apply(t,r))&&(e.exports=i)}()},function(e,t,n){"use strict";e.exports=[n(98),n(57),n(284),n(285),n(286),n(287),n(30),n(135),n(288),n(1),n(289)]},function(e,t,n){"use strict";t.isBoolean=function(e){return"boolean"===typeof e}},function(e,t,n){"use strict";function r(e,t,r,m){function g(t,n){if(!(this instanceof g))throw new SyntaxError("Constructor must be called with the new operator");if(n&&!h(n))throw new Error("Invalid datatype: "+n);if(e.isMatrix(t))v(this,t,n);else if(t&&l(t.index)&&l(t.ptr)&&l(t.size))this._values=t.values,this._index=t.index,this._ptr=t.ptr,this._size=t.size,this._datatype=n||t.datatype;else if(l(t))y(this,t,n);else{if(t)throw new TypeError("Unsupported type of data ("+i.types.type(t)+")");this._values=[],this._index=[],this._ptr=[0],this._size=[0,0],this._datatype=n}}function v(e,t,n){"SparseMatrix"===t.type?(e._values=t._values?s.clone(t._values):void 0,e._index=s.clone(t._index),e._ptr=s.clone(t._ptr),e._size=s.clone(t._size),e._datatype=n||t._datatype):y(e,t.valueOf(),n||t._datatype)}function y(e,t,n){e._values=[],e._index=[],e._ptr=[],e._datatype=n;var r=t.length,i=0,o=O,a=0;if(h(n)&&(o=m.find(O,[n,n])||O,a=m.convert(0,n)),r>0){var s=0;do{e._ptr.push(e._index.length);for(var u=0;u<r;u++){var c=t[u];if(l(c)){if(0===s&&i<c.length&&(i=c.length),s<c.length){var f=c[s];o(f,a)||(e._values.push(f),e._index.push(u))}}else 0===s&&i<1&&(i=1),o(c,a)||(e._values.push(c),e._index.push(u))}s++}while(s<i)}e._ptr.push(e._index.length),e._size=[r,i]}function b(t,n){if(!e.isIndex(n))throw new TypeError("Invalid index");if(n.isScalar())return t.get(n.min());var r=n.size();if(r.length!==t._size.length)throw new o(r.length,t._size.length);var i=void 0,a=void 0,s=void 0,u=void 0,c=n.min(),l=n.max();for(i=0,a=t._size.length;i<a;i++)d(c[i],t._size[i]),d(l[i],t._size[i]);var f=t._values,p=t._index,h=t._ptr,m=n.dimension(0),v=n.dimension(1),y=[],b=[];m.forEach(function(e,t){b[e]=t[0],y[e]=!0});var x=f?[]:void 0,w=[],N=[];return v.forEach(function(e){for(N.push(w.length),s=h[e],u=h[e+1];s<u;s++)i=p[s],!0===y[i]&&(w.push(b[i]),x&&x.push(f[s]))}),N.push(w.length),new g({values:x,index:w,ptr:N,size:r,datatype:t._datatype})}function x(t,n,r,i){if(!n||!0!==n.isIndex)throw new TypeError("Invalid index");var u=n.size(),c=n.isScalar(),l=void 0;if(e.isMatrix(r)?(l=r.size(),r=r.toArray()):l=a.size(r),c){if(0!==l.length)throw new TypeError("Scalar expected");t.set(n.min(),r,i)}else{if(1!==u.length&&2!==u.length)throw new o(u.length,t._size.length,"<");if(l.length<u.length){for(var f=0,p=0;1===u[f]&&1===l[f];)f++;for(;1===u[f];)p++,f++;r=a.unsqueeze(r,u.length,p,l)}if(!s.deepEqual(u,l))throw new o(u,l,">");for(var h=n.min()[0],d=n.min()[1],m=l[0],g=l[1],v=0;v<m;v++)for(var y=0;y<g;y++){var b=r[v][y];t.set([v+h,y+d],b,i)}}return t}function w(e,t,n,r){if(n-t===0)return n;for(var i=t;i<n;i++)if(r[i]===e)return i;return t}function N(e,t,n,r,i){n.splice(e,1),r.splice(e,1);for(var o=t+1;o<i.length;o++)i[o]--}function E(e,t,n,r,i,o,a){i.splice(e,0,r),o.splice(e,0,t);for(var s=n+1;s<a.length;s++)a[s]++}function C(e,t,n,r){var i=r||0,o=O,a=0;h(e._datatype)&&(o=m.find(O,[e._datatype,e._datatype])||O,a=m.convert(0,e._datatype),i=m.convert(i,e._datatype));var s=!o(i,a),u=e._size[0],c=e._size[1],l=void 0,f=void 0,p=void 0;if(n>c){for(f=c;f<n;f++)if(e._ptr[f]=e._values.length,s)for(l=0;l<u;l++)e._values.push(i),e._index.push(l);e._ptr[n]=e._values.length}else n<c&&(e._ptr.splice(n+1,c-n),e._values.splice(e._ptr[n],e._values.length),e._index.splice(e._ptr[n],e._index.length));if(c=n,t>u){if(s){var d=0;for(f=0;f<c;f++){e._ptr[f]=e._ptr[f]+d,p=e._ptr[f+1]+d;var g=0;for(l=u;l<t;l++,g++)e._values.splice(p+g,0,i),e._index.splice(p+g,0,l),d++}e._ptr[c]=e._values.length}}else if(t<u){var v=0;for(f=0;f<c;f++){e._ptr[f]=e._ptr[f]-v;var y=e._ptr[f],b=e._ptr[f+1]-v;for(p=y;p<b;p++)(l=e._index[p])>t-1&&(e._values.splice(p,1),e._index.splice(p,1),v++)}e._ptr[f]=e._values.length}return e._size[0]=t,e._size[1]=n,e}function S(e,t,n,r,i,o,a){var s=[],u=[],c=[],l=O,f=0;h(e._datatype)&&(l=m.find(O,[e._datatype,e._datatype])||O,f=m.convert(0,e._datatype));for(var p=function(e,t,n){e=o(e,t,n),l(e,f)||(s.push(e),u.push(t))},d=r;d<=i;d++){c.push(s.length);for(var v=e._ptr[d],y=e._ptr[d+1],b=t,x=v;x<y;x++){var w=e._index[x];if(w>=t&&w<=n){if(!a)for(var N=b;N<w;N++)p(0,N-t,d-r);p(e._values[x],w-t,d-r)}b=w+1}if(!a)for(var E=b;E<=n;E++)p(0,E-t,d-r)}return c.push(s.length),new g({values:s,index:u,ptr:c,size:[n-t+1,i-r+1]})}function M(e,t,n,r,i){var o=r[0],a=r[1],u=[],c=void 0,l=void 0;for(c=0;c<o;c++)for(u[c]=[],l=0;l<a;l++)u[c][l]=0;for(l=0;l<a;l++)for(var f=n[l],p=n[l+1],h=f;h<p;h++)c=t[h],u[c][l]=e?i?s.clone(e[h]):e[h]:1;return u}var T=r(n(98)),O=r(n(11));return g.prototype=new T,g.prototype.type="SparseMatrix",g.prototype.isSparseMatrix=!0,g.prototype.storage=function(){return"sparse"},g.prototype.datatype=function(){return this._datatype},g.prototype.create=function(e,t){return new g(e,t)},g.prototype.density=function(){var e=this._size[0],t=this._size[1];return 0!==e&&0!==t?this._index.length/(e*t):0},g.prototype.subset=function(e,t,n){if(!this._values)throw new Error("Cannot invoke subset on a Pattern only matrix");switch(arguments.length){case 1:return b(this,e);case 2:case 3:return x(this,e,t,n);default:throw new SyntaxError("Wrong number of arguments")}},g.prototype.get=function(e){if(!l(e))throw new TypeError("Array expected");if(e.length!==this._size.length)throw new o(e.length,this._size.length);if(!this._values)throw new Error("Cannot invoke get on a Pattern only matrix");var t=e[0],n=e[1];d(t,this._size[0]),d(n,this._size[1]);var r=w(t,this._ptr[n],this._ptr[n+1],this._index);return r<this._ptr[n+1]&&this._index[r]===t?this._values[r]:0},g.prototype.set=function(e,t,n){if(!l(e))throw new TypeError("Array expected");if(e.length!==this._size.length)throw new o(e.length,this._size.length);if(!this._values)throw new Error("Cannot invoke set on a Pattern only matrix");var r=e[0],i=e[1],a=this._size[0],s=this._size[1],u=O,c=0;h(this._datatype)&&(u=m.find(O,[this._datatype,this._datatype])||O,c=m.convert(0,this._datatype)),(r>a-1||i>s-1)&&(C(this,Math.max(r+1,a),Math.max(i+1,s),n),a=this._size[0],s=this._size[1]),d(r,a),d(i,s);var f=w(r,this._ptr[i],this._ptr[i+1],this._index);return f<this._ptr[i+1]&&this._index[f]===r?u(t,c)?N(f,i,this._values,this._index,this._ptr):this._values[f]=t:E(f,r,i,t,this._values,this._index,this._ptr),this},g.prototype.resize=function(e,t,n){if(!l(e))throw new TypeError("Array expected");if(2!==e.length)throw new Error("Only two dimensions matrix are supported");return e.forEach(function(t){if(!c.isNumber(t)||!c.isInteger(t)||t<0)throw new TypeError("Invalid size, must contain positive integers (size: "+u.format(e)+")")}),C(n?this.clone():this,e[0],e[1],t)},g.prototype.reshape=function(e,t){if(!l(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(t){if(!c.isNumber(t)||!c.isInteger(t)||t<0)throw new TypeError("Invalid size, must contain positive integers (size: "+u.format(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 n=t?this.clone():this;if(this._size[0]===e[0]&&this._size[1]===e[1])return n;for(var r=[],i=0;i<n._ptr.length;i++)for(var o=0;o<n._ptr[i+1]-n._ptr[i];o++)r.push(i);for(var a=n._values.slice(),s=n._index.slice(),f=0;f<n._index.length;f++){var p=s[f],h=r[f],d=p*n._size[1]+h;r[f]=d%e[1],s[f]=Math.floor(d/e[1])}n._values.length=0,n._index.length=0,n._ptr.length=e[1]+1,n._size=e.slice();for(var m=0;m<n._ptr.length;m++)n._ptr[m]=0;for(var g=0;g<a.length;g++){var v=s[g],y=r[g],b=a[g];E(w(v,n._ptr[y],n._ptr[y+1],n._index),v,y,b,n._values,n._index,n._ptr)}return n},g.prototype.clone=function(){return new g({values:this._values?s.clone(this._values):void 0,index:s.clone(this._index),ptr:s.clone(this._ptr),size:s.clone(this._size),datatype:this._datatype})},g.prototype.size=function(){return this._size.slice(0)},g.prototype.map=function(e,t){if(!this._values)throw new Error("Cannot invoke map on a Pattern only matrix");var n=this;return S(this,0,this._size[0]-1,0,this._size[1]-1,function(t,r,i){return e(t,[r,i],n)},t)},g.prototype.forEach=function(e,t){if(!this._values)throw new Error("Cannot invoke forEach on a Pattern only matrix");for(var n=this,r=this._size[0],i=this._size[1],o=0;o<i;o++){for(var a=this._ptr[o],s=this._ptr[o+1],u=0,c=a;c<s;c++){var l=this._index[c];if(!t)for(var f=u;f<l;f++)e(0,[f,o],n);e(this._values[c],[l,o],n),u=l+1}if(!t)for(var p=u;p<r;p++)e(0,[p,o],n)}},g.prototype.toArray=function(){return M(this._values,this._index,this._ptr,this._size,!0)},g.prototype.valueOf=function(){return M(this._values,this._index,this._ptr,this._size,!1)},g.prototype.format=function(e){for(var t=this._size[0],n=this._size[1],r=this.density(),i="Sparse Matrix ["+u.format(t,e)+" x "+u.format(n,e)+"] density: "+u.format(r,e)+"\n",o=0;o<n;o++)for(var a=this._ptr[o],s=this._ptr[o+1],c=a;c<s;c++){var l=this._index[c];i+="\n    ("+u.format(l,e)+", "+u.format(o,e)+") ==> "+(this._values?u.format(this._values[c],e):"X")}return i},g.prototype.toString=function(){return u.format(this.toArray())},g.prototype.toJSON=function(){return{mathjs:"SparseMatrix",values:this._values,index:this._index,ptr:this._ptr,size:this._size,datatype:this._datatype}},g.prototype.diagonal=function(t){if(t){if(e.isBigNumber(t)&&(t=t.toNumber()),!f(t)||!p(t))throw new TypeError("The parameter k must be an integer number")}else t=0;var n=t>0?t:0,r=t<0?-t:0,i=this._size[0],o=this._size[1],a=Math.min(i-r,o-n),s=[],u=[],c=[];c[0]=0;for(var l=n;l<o&&s.length<a;l++)for(var h=this._ptr[l],d=this._ptr[l+1],m=h;m<d;m++){var v=this._index[m];if(v===l-n+r){s.push(this._values[m]),u[s.length-1]=v-r;break}}return c.push(s.length),new g({values:s,index:u,ptr:c,size:[a,1]})},g.fromJSON=function(e){return new g(e)},g.diagonal=function(t,n,r,i,o){if(!l(t))throw new TypeError("Array expected, size parameter");if(2!==t.length)throw new Error("Only two dimensions matrix are supported");if(t=t.map(function(t){if(e.isBigNumber(t)&&(t=t.toNumber()),!f(t)||!p(t)||t<1)throw new Error("Size values must be positive integers");return t}),r){if(e.isBigNumber(r)&&(r=r.toNumber()),!f(r)||!p(r))throw new TypeError("The parameter k must be an integer number")}else r=0;var a=O,s=0;h(o)&&(a=m.find(O,[o,o])||O,s=m.convert(0,o));var u=r>0?r:0,c=r<0?-r:0,d=t[0],v=t[1],y=Math.min(d-c,v-u),b=void 0;if(l(n)){if(n.length!==y)throw new Error("Invalid value array length");b=function(e){return n[e]}}else if(e.isMatrix(n)){var x=n.size();if(1!==x.length||x[0]!==y)throw new Error("Invalid matrix length");b=function(e){return n.get([e])}}else b=function(){return n};for(var w=[],N=[],E=[],C=0;C<v;C++){E.push(w.length);var S=C-u;if(S>=0&&S<y){var M=b(S);a(M,s)||(N.push(S+c),w.push(M))}}return E.push(w.length),new g({values:w,index:N,ptr:E,size:[d,v]})},g.prototype.swapRows=function(e,t){if(!f(e)||!p(e)||!f(t)||!p(t))throw new Error("Row index must be positive integers");if(2!==this._size.length)throw new Error("Only two dimensional matrix is supported");return d(e,this._size[0]),d(t,this._size[0]),g._swapRows(e,t,this._size[1],this._values,this._index,this._ptr),this},g._forEachRow=function(e,t,n,r,i){for(var o=r[e],a=r[e+1],s=o;s<a;s++)i(n[s],t[s])},g._swapRows=function(e,t,n,r,i,o){for(var a=0;a<n;a++){var s=o[a],u=o[a+1],c=w(e,s,u,i),l=w(t,s,u,i);if(c<u&&l<u&&i[c]===e&&i[l]===t){if(r){var f=r[c];r[c]=r[l],r[l]=f}}else if(c<u&&i[c]===e&&(l>=u||i[l]!==t)){var p=r?r[c]:void 0;i.splice(l,0,t),r&&r.splice(l,0,p),i.splice(l<=c?c+1:c,1),r&&r.splice(l<=c?c+1:c,1)}else if(l<u&&i[l]===t&&(c>=u||i[c]!==e)){var h=r?r[l]:void 0;i.splice(c,0,e),r&&r.splice(c,0,h),i.splice(c<=l?l+1:l,1),r&&r.splice(c<=l?l+1:l,1)}}},e.Matrix._storage.sparse=g,g}var i=n(32),o=n(12),a=i.array,s=i.object,u=i.string,c=i.number,l=Array.isArray,f=c.isNumber,p=c.isInteger,h=u.isString,d=a.validateIndex;t.name="SparseMatrix",t.path="type",t.factory=r,t.lazy=!1},function(e,t,n){"use strict";function r(e,t,r){function i(){if(!(this instanceof i))throw new SyntaxError("Constructor must be called with the new operator");this._values=[],this._heap=new e.FibonacciHeap}var o=r(n(15)),a=r(n(11));return i.prototype.type="Spa",i.prototype.isSpa=!0,i.prototype.set=function(e,t){if(this._values[e])this._values[e].value=t;else{var n=this._heap.insert(e,t);this._values[e]=n}},i.prototype.get=function(e){var t=this._values[e];return t?t.value:0},i.prototype.accumulate=function(e,t){var n=this._values[e];n?n.value=o(n.value,t):(n=this._heap.insert(e,t),this._values[e]=n)},i.prototype.forEach=function(e,t,n){var r=this._heap,i=this._values,o=[],s=r.extractMinimum();for(s&&o.push(s);s&&s.key<=t;)s.key>=e&&(a(s.value,0)||n(s.key,s.value,this)),(s=r.extractMinimum())&&o.push(s);for(var u=0;u<o.length;u++){var c=o[u];s=r.insert(c.key,c.value),i[s.key]=s}},i.prototype.swap=function(e,t){var n=this._values[e],r=this._values[t];if(!n&&r)n=this._heap.insert(e,r.value),this._heap.remove(r),this._values[e]=n,this._values[t]=void 0;else if(n&&!r)r=this._heap.insert(t,n.value),this._heap.remove(n),this._values[t]=r,this._values[e]=void 0;else if(n&&r){var i=n.value;n.value=r.value,r.value=i}},i}t.name="Spa",t.path="type",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,i){function o(){if(!(this instanceof o))throw new SyntaxError("Constructor must be called with the new operator");this._minimum=null,this._size=0}function a(e,t,n){t.key=n;var r=t.parent;return r&&l(t.key,r.key)&&(s(e,t,r),u(e,r)),l(t.key,e.key)&&(e=t),e}function s(e,t,n){t.left.right=t.right,t.right.left=t.left,n.degree--,n.child===t&&(n.child=t.right),0===n.degree&&(n.child=null),t.left=e,t.right=e.right,e.right=t,t.right.left=t,t.parent=null,t.mark=!1}function u(e,t){var n=t.parent;n&&(t.mark?(s(e,t,n),u(n)):t.mark=!0)}function c(e,t){var n=Math.floor(Math.log(t)*p)+1,r=new Array(n),i=0,o=e;if(o)for(i++,o=o.right;o!==e;)i++,o=o.right;for(var a=void 0;i>0;){for(var s=o.degree,u=o.right;;){if(!(a=r[s]))break;if(f(o.key,a.key)){var c=a;a=o,o=c}h(a,o),r[s]=null,s++}r[s]=o,o=u,i--}e=null;for(var d=0;d<n;d++)(a=r[d])&&(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,l(a.key,e.key)&&(e=a)):e=a);return e}var l=r(n(44)),f=r(n(36)),p=1/Math.log((1+Math.sqrt(5))/2);o.prototype.type="FibonacciHeap",o.prototype.isFibonacciHeap=!0,o.prototype.insert=function(e,t){var n={key:e,value:t,degree:0};if(this._minimum){var r=this._minimum;n.left=r,n.right=r.right,r.right=n,n.right.left=n,l(e,r.key)&&(this._minimum=n)}else n.left=n,n.right=n,this._minimum=n;return this._size++,n},o.prototype.size=function(){return this._size},o.prototype.clear=function(){this._minimum=null,this._size=0},o.prototype.isEmpty=function(){return 0===this._size},o.prototype.extractMinimum=function(){var e=this._minimum;if(null===e)return e;for(var t=this._minimum,n=e.degree,r=e.child;n>0;){var i=r.right;r.left.right=r.right,r.right.left=r.left,r.left=t,r.right=t.right,t.right=r,r.right.left=r,r.parent=null,r=i,n--}return e.left.right=e.right,e.right.left=e.left,e===e.right?t=null:(t=e.right,t=c(t,this._size)),this._size--,this._minimum=t,e},o.prototype.remove=function(e){this._minimum=a(this._minimum,e,-1),this.extractMinimum()};var h=function(e,t){e.left.right=e.right,e.right.left=e.left,e.parent=t,t.child?(e.left=t.child,e.right=t.child.right,t.child.right=e,e.right.left=e):(t.child=e,e.right=e,e.left=e),t.degree++,e.mark=!1};return o}t.name="FibonacciHeap",t.path="type",t.factory=r},function(e,t,n){"use strict";function r(e,t,r){function o(t,n){if(!(this instanceof o))throw new SyntaxError("Constructor must be called with the new operator");if(n&&!u(n))throw new Error("Invalid datatype: "+n);if(e.isMatrix(t)||s(t)){var r=new c(t,n);this._data=r._data,this._size=r._size,this._datatype=r._datatype,this._min=null,this._max=null}else if(t&&s(t.data)&&s(t.size))this._data=t.data,this._size=t.size,this._datatype=t.datatype,this._min="undefined"!==typeof t.min?t.min:null,this._max="undefined"!==typeof t.max?t.max:null;else{if(t)throw new TypeError("Unsupported type of data ("+i.types.type(t)+")");this._data=[],this._size=[0],this._datatype=n,this._min=null,this._max=null}}var c=r(n(57)),l=r(n(44));return o.prototype=new c,o.prototype.type="ImmutableDenseMatrix",o.prototype.isImmutableDenseMatrix=!0,o.prototype.subset=function(t){switch(arguments.length){case 1:var n=c.prototype.subset.call(this,t);return e.isMatrix(n)?new o({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")}},o.prototype.set=function(){throw new Error("Cannot invoke set on an Immutable Matrix instance")},o.prototype.resize=function(){throw new Error("Cannot invoke resize on an Immutable Matrix instance")},o.prototype.reshape=function(){throw new Error("Cannot invoke reshape on an Immutable Matrix instance")},o.prototype.clone=function(){return new o({data:a.clone(this._data),size:a.clone(this._size),datatype:this._datatype})},o.prototype.toJSON=function(){return{mathjs:"ImmutableDenseMatrix",data:this._data,size:this._size,datatype:this._datatype}},o.fromJSON=function(e){return new o(e)},o.prototype.swapRows=function(){throw new Error("Cannot invoke swapRows on an Immutable Matrix instance")},o.prototype.min=function(){if(null===this._min){var e=null;this.forEach(function(t){(null===e||l(t,e))&&(e=t)}),this._min=null!==e?e:void 0}return this._min},o.prototype.max=function(){if(null===this._max){var e=null;this.forEach(function(t){(null===e||l(e,t))&&(e=t)}),this._max=null!==e?e:void 0}return this._max},o}var i=n(32),o=i.string,a=i.object,s=Array.isArray,u=o.isString;t.name="ImmutableDenseMatrix",t.path="type",t.factory=r},function(e,t,n){"use strict";function r(e,t,n,r){return r("index",{"...number | string | BigNumber | Range | Array | Matrix":function(t){var n=t.map(function(t){return e.isBigNumber(t)?t.toNumber():Array.isArray(t)||e.isMatrix(t)?t.map(function(t){return e.isBigNumber(t)?t.toNumber():t}):t}),r=new e.Index;return e.Index.apply(r,n),r}})}t.name="index",t.factory=r},function(e,t,n){"use strict";function r(e,t,n,r){var i=e.SparseMatrix,o=r("sparse",{"":function(){return new i([])},string:function(e){return new i([],e)},"Array | Matrix":function(e){return new i(e)},"Array | Matrix, string":function(e,t){return new i(e,t)}});return o.toTex={0:"\\begin{bsparse}\\end{bsparse}",1:"\\left(${args[0]}\\right)"},o}t.name="sparse",t.factory=r},function(e,t,n){"use strict";e.exports=[n(136)]},function(e,t,n){"use strict";function r(e,t,n,r){var a=r("string",{"":function(){return""},number:o.format,null:function(e){return"null"},boolean:function(e){return e+""},string:function(e){return e},"Array | Matrix":function(e){return i(e,a)},any:function(e){return String(e)}});return a.toTex={0:'\\mathtt{""}',1:"\\mathrm{string}\\left(${args[0]}\\right)"},a}var i=n(0),o=n(3);t.name="string",t.factory=r},function(e,t,n){"use strict";e.exports=[n(293),n(294),n(295),n(296),n(297)]},function(e,t,n){"use strict";function r(e,t,r,u,c){function l(t,n){if(!(this instanceof l))throw new Error("Constructor must be called with the new operator");if(null!==t&&void 0!==t&&!P(t)&&!e.isComplex(t))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 r=l.parse(n);this.units=r.units,this.dimensions=r.dimensions}else{this.units=[{unit:$,prefix:j.NONE,power:0}],this.dimensions=[];for(var i=0;i<H.length;i++)this.dimensions[i]=0}this.value=void 0!==t&&null!==t?this._normalize(t):null,this.fixPrefix=!1,this.isUnitListSimplified=!0}function f(){for(;" "===z||"\t"===z;)d()}function p(e){return e>="0"&&e<="9"||"."===e}function h(e){return e>="0"&&e<="9"}function d(){B++,z=L.charAt(B)}function m(e){B=e,z=L.charAt(B)}function g(){var e="",t=void 0;if(t=B,"+"===z?d():"-"===z&&(e+=z,d()),!p(z))return m(t),null;if("."===z){if(e+=z,d(),!h(z))return m(t),null}else{for(;h(z);)e+=z,d();"."===z&&(e+=z,d())}for(;h(z);)e+=z,d();if("E"===z||"e"===z){var n="",r=B;if(n+=z,d(),"+"!==z&&"-"!==z||(n+=z,d()),!h(z))return m(r),e;for(e+=n;h(z);)e+=z,d()}return e}function v(){for(var e="",t=L.charCodeAt(B);t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122;)e+=z,d(),t=L.charCodeAt(B);return t=e.charCodeAt(0),t>=65&&t<=90||t>=97&&t<=122?e||null:null}function y(e){return z===e?(d(),e):null}function b(e){if(Y.hasOwnProperty(e)){var t=Y[e];return{unit:t,prefix:t.prefixes[""]}}for(var n in Y)if(Y.hasOwnProperty(n)&&o(e,n)){var r=Y[n],i=e.length-n.length,a=e.substring(0,i),s=r.prefixes.hasOwnProperty(a)?r.prefixes[a]:void 0;if(void 0!==s)return{unit:r,prefix:s}}return null}function x(e){return e.equalBase(W.NONE)&&null!==e.value&&!t.predictable?e.value:e}function w(t){if("BigNumber"===t.number){var n=s.pi(e.BigNumber);Y.rad.value=new e.BigNumber(1),Y.deg.value=n.div(180),Y.grad.value=n.div(200),Y.cycle.value=n.times(2),Y.arcsec.value=n.div(648e3),Y.arcmin.value=n.div(10800)}else Y.rad.value=1,Y.deg.value=Math.PI/180,Y.grad.value=Math.PI/200,Y.cycle.value=2*Math.PI,Y.arcsec.value=Math.PI/648e3,Y.arcmin.value=Math.PI/10800;Y.radian.value=Y.rad.value,Y.degree.value=Y.deg.value,Y.gradian.value=Y.grad.value}function N(e){for(var t=0;t<e.length;t++){var n=e.charAt(t),r=function(e){return/^[a-zA-Z]$/.test(e)};if(0===t&&!r(n))throw new Error('Invalid unit name (must begin with alpha character): "'+e+'"');if(t>0&&!r(n)&&!function(e){return e>="0"&&e<="9"}(n))throw new Error('Invalid unit name (only alphanumeric characters are allowed): "'+e+'"')}}var E=r(n(18)),C=r(n(16)),S=r(n(23)),M=r(n(14)),T=r(n(45)),O=r(n(25)),k=r(n(138)),A=r(n(139)),_=r(n(59)),P=r(n(101)),R=r(n(140)),I=r(n(38)),F=r(n(100)),D=r(n(97));l.prototype.type="Unit",l.prototype.isUnit=!0;var L=void 0,B=void 0,z=void 0;l.parse=function(n,r){if(r=r||{},L=n,B=-1,z="","string"!==typeof L)throw new TypeError("Invalid argument in Unit.parse, string expected");var i=new l;i.units=[];var o=1,a=!1;d(),f();var s=g(),u=null;s&&(u="BigNumber"===t.number?new e.BigNumber(s):"Fraction"===t.number?new e.Fraction(s):parseFloat(s),f(),y("*")?(o=1,a=!0):y("/")&&(o=-1,a=!0));for(var c=[],p=1;;){for(f();"("===z;)c.push(o),p*=o,o=1,d(),f();var h=void 0;if(!z)break;var m=z;if(null===(h=v()))throw new SyntaxError('Unexpected "'+m+'" in "'+L+'" at index '+B.toString());var x=b(h);if(null===x)throw new SyntaxError('Unit "'+h+'" not found.');var w=o*p;if(f(),y("^")){f();var N=g();if(null===N)throw new SyntaxError('In "'+n+'", "^" must be followed by a floating-point number');w*=N}i.units.push({unit:x.unit,prefix:x.prefix,power:w});for(var E=0;E<H.length;E++)i.dimensions[E]+=(x.unit.dimensions[E]||0)*w;for(f();")"===z;){if(0===c.length)throw new SyntaxError('Unmatched ")" in "'+L+'" at index '+B.toString());p/=c.pop(),d(),f()}if(a=!1,y("*")?(o=1,a=!0):y("/")?(o=-1,a=!0):o=1,x.unit.base){var C=x.unit.base.key;K.auto[C]={unit:x.unit,prefix:x.prefix}}}if(f(),z)throw new SyntaxError('Could not parse: "'+n+'"');if(a)throw new SyntaxError('Trailing characters: "'+n+'"');if(0!==c.length)throw new SyntaxError('Unmatched "(" in "'+L+'"');if(0===i.units.length&&!r.allowNoUnits)throw new SyntaxError('"'+n+'" contains no units');return i.value=void 0!==u?i._normalize(u):null,i},l.prototype.clone=function(){var e=new l;e.fixPrefix=this.fixPrefix,e.isUnitListSimplified=this.isUnitListSimplified,e.value=a(this.value),e.dimensions=this.dimensions.slice(0),e.units=[];for(var t=0;t<this.units.length;t++){e.units[t]={};for(var n in this.units[t])this.units[t].hasOwnProperty(n)&&(e.units[t][n]=this.units[t][n])}return e},l.prototype._isDerived=function(){return 0!==this.units.length&&(this.units.length>1||Math.abs(this.units[0].power-1)>1e-15)},l.prototype._normalize=function(e){var t=void 0,n=void 0,r=void 0,i=void 0,o=void 0;if(null===e||void 0===e||0===this.units.length)return e;if(this._isDerived()){var a=e;o=l._getNumberConverter(I(e));for(var s=0;s<this.units.length;s++)t=o(this.units[s].unit.value),i=o(this.units[s].prefix.value),r=o(this.units[s].power),a=S(a,T(S(t,i),r));return a}return o=l._getNumberConverter(I(e)),t=o(this.units[0].unit.value),n=o(this.units[0].unit.offset),i=o(this.units[0].prefix.value),S(E(e,n),S(t,i))},l.prototype._denormalize=function(e,t){var n=void 0,r=void 0,i=void 0,o=void 0,a=void 0;if(null===e||void 0===e||0===this.units.length)return e;if(this._isDerived()){var s=e;a=l._getNumberConverter(I(e));for(var u=0;u<this.units.length;u++)n=a(this.units[u].unit.value),o=a(this.units[u].prefix.value),i=a(this.units[u].power),s=M(s,T(S(n,o),i));return s}return a=l._getNumberConverter(I(e)),n=a(this.units[0].unit.value),o=a(this.units[0].prefix.value),r=a(this.units[0].unit.offset),void 0===t||null===t?C(M(M(e,n),o),r):C(M(M(e,n),t),r)},l.isValuelessUnit=function(e){return null!==b(e)},l.prototype.hasBase=function(e){if("string"===typeof e&&(e=W[e]),!e)return!1;for(var t=0;t<H.length;t++)if(Math.abs((this.dimensions[t]||0)-(e.dimensions[t]||0))>1e-12)return!1;return!0},l.prototype.equalBase=function(e){for(var t=0;t<H.length;t++)if(Math.abs((this.dimensions[t]||0)-(e.dimensions[t]||0))>1e-12)return!1;return!0},l.prototype.equals=function(e){return this.equalBase(e)&&_(this.value,e.value)},l.prototype.multiply=function(e){for(var t=this.clone(),n=0;n<H.length;n++)t.dimensions[n]=(this.dimensions[n]||0)+(e.dimensions[n]||0);for(var r=0;r<e.units.length;r++){var i={};for(var o in e.units[r])i[o]=e.units[r][o];t.units.push(i)}if(null!==this.value||null!==e.value){var a=null===this.value?this._normalize(1):this.value,s=null===e.value?e._normalize(1):e.value;t.value=S(a,s)}else t.value=null;return t.isUnitListSimplified=!1,x(t)},l.prototype.divide=function(e){for(var t=this.clone(),n=0;n<H.length;n++)t.dimensions[n]=(this.dimensions[n]||0)-(e.dimensions[n]||0);for(var r=0;r<e.units.length;r++){var i={};for(var o in e.units[r])i[o]=e.units[r][o];i.power=-i.power,t.units.push(i)}if(null!==this.value||null!==e.value){var a=null===this.value?this._normalize(1):this.value,s=null===e.value?e._normalize(1):e.value;t.value=M(a,s)}else t.value=null;return t.isUnitListSimplified=!1,x(t)},l.prototype.pow=function(e){for(var t=this.clone(),n=0;n<H.length;n++)t.dimensions[n]=(this.dimensions[n]||0)*e;for(var r=0;r<t.units.length;r++)t.units[r].power*=e;return null!==t.value?t.value=T(t.value,e):t.value=null,t.isUnitListSimplified=!1,x(t)},l.prototype.abs=function(){var e=this.clone();e.value=null!==e.value?O(e.value):null;for(var t in e.units)"VA"!==e.units[t].unit.name&&"VAR"!==e.units[t].unit.name||(e.units[t].unit=Y.W);return e},l.prototype.to=function(t){var n=void 0,r=null===this.value?this._normalize(1):this.value;if("string"===typeof t){if(n=l.parse(t),!this.equalBase(n))throw new Error("Units do not match");if(null!==n.value)throw new Error("Cannot convert to a unit with a value");return n.value=a(r),n.fixPrefix=!0,n.isUnitListSimplified=!0,n}if(e.isUnit(t)){if(!this.equalBase(t))throw new Error("Units do not match");if(null!==t.value)throw new Error("Cannot convert to a unit with a value");return n=t.clone(),n.value=a(r),n.fixPrefix=!0,n.isUnitListSimplified=!0,n}throw new Error("String or Unit expected as parameter")},l.prototype.toNumber=function(e){return F(this.toNumeric(e))},l.prototype.toNumeric=function(e){var t=this;return e&&(t=this.to(e)),t.simplifyUnitListLazy(),t._isDerived()?t._denormalize(t.value):t._denormalize(t.value,t.units[0].prefix.value)},l.prototype.toString=function(){return this.format()},l.prototype.toJSON=function(){return{mathjs:"Unit",value:this._denormalize(this.value),unit:this.formatUnits(),fixPrefix:this.fixPrefix}},l.fromJSON=function(e){var t=new l(e.value,e.unit);return t.fixPrefix=e.fixPrefix||!1,t},l.prototype.valueOf=l.prototype.toString,l.prototype.simplifyUnitListLazy=function(){if(!this.isUnitListSimplified&&null!==this.value){var e=[],t=void 0;for(var n in Z)if(this.hasBase(W[n])){t=n;break}if("NONE"===t)this.units=[];else{var r=void 0;if(t&&Z.hasOwnProperty(t)&&(r=Z[t]),r)this.units=[{unit:r.unit,prefix:r.prefix,power:1}];else{for(var i=!1,o=0;o<H.length;o++){var a=H[o];Math.abs(this.dimensions[o]||0)>1e-12&&(Z.hasOwnProperty(a)?e.push({unit:Z[a].unit,prefix:Z[a].prefix,power:this.dimensions[o]||0}):i=!0)}e.length<this.units.length&&!i&&(this.units=e)}}this.isUnitListSimplified=!0}},l.prototype.toSI=function(){for(var e=this.clone(),t=[],n=0;n<H.length;n++){var r=H[n];if(Math.abs(e.dimensions[n]||0)>1e-12){if(!K.si.hasOwnProperty(r))throw new Error("Cannot express custom unit "+r+" in SI units");t.push({unit:K.si[r].unit,prefix:K.si[r].prefix,power:e.dimensions[n]||0})}}return e.units=t,e.isUnitListSimplified=!0,e},l.prototype.formatUnits=function(){this.simplifyUnitListLazy();for(var e="",t="",n=0,r=0,i=0;i<this.units.length;i++)this.units[i].power>0?(n++,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 o=0;o<this.units.length;o++)this.units[o].power<0&&(n>0?(t+=" "+this.units[o].prefix.name+this.units[o].unit.name,Math.abs(this.units[o].power+1)>1e-15&&(t+="^"+-this.units[o].power)):(t+=" "+this.units[o].prefix.name+this.units[o].unit.name,t+="^"+this.units[o].power));e=e.substr(1),t=t.substr(1),n>1&&r>0&&(e="("+e+")"),r>1&&n>0&&(t="("+t+")");var a=e;return n>0&&r>0&&(a+=" / "),a+=t},l.prototype.format=function(t){this.simplifyUnitListLazy();var n=!1;"undefined"!==typeof this.value&&null!==this.value&&e.isComplex(this.value)&&(n=Math.abs(this.value.re)<1e-14);for(var r in this.units)this.units[r].unit&&("VA"===this.units[r].unit.name&&n?this.units[r].unit=Y.VAR:"VAR"!==this.units[r].unit.name||n||(this.units[r].unit=Y.VA));1!==this.units.length||this.fixPrefix||Math.abs(this.units[0].power-Math.round(this.units[0].power))<1e-14&&(this.units[0].prefix=this._bestPrefix());var i=this._denormalize(this.value),o=null!==this.value?R(i,t||{}):"",a=this.formatUnits();return this.value&&e.isComplex(this.value)&&(o="("+o+")"),a.length>0&&o.length>0&&(o+=" "),o+=a},l.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?O(this.value):0,t=O(this.units[0].unit.value),n=this.units[0].prefix;if(0===e)return n;var r=this.units[0].power,i=Math.log(e/Math.pow(n.value*t,r))/Math.LN10-1.2;if(i>-2.200001&&i<1.800001)return n;i=Math.abs(i);var o=this.units[0].unit.prefixes;for(var a in o)if(o.hasOwnProperty(a)){var s=o[a];if(s.scientific){var u=Math.abs(Math.log(e/Math.pow(s.value*t,r))/Math.LN10-1.2);(u<i||u===i&&s.name.length<n.name.length)&&(n=s,i=u)}}return n},l.prototype.splitUnit=function(e){for(var t=this.clone(),n=[],r=0;r<e.length&&(t=t.to(e[r]),r!==e.length-1);r++){var i=t.toNumeric(),o=A(i),a=void 0;a=_(o,i)?o:k(t.toNumeric());var s=new l(a,e[r].toString());n.push(s),t=C(t,s)}for(var u=0,c=0;c<n.length;c++)u=E(u,n[c].value);return _(u,this.value)&&(t.value=0),n.push(t),n};var j={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:{"":{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},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:{"":{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},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}}};j.SHORTLONG={};for(var U in j.SHORT)j.SHORT.hasOwnProperty(U)&&(j.SHORTLONG[U]=j.SHORT[U]);for(var q in j.LONG)j.LONG.hasOwnProperty(q)&&(j.SHORTLONG[q]=j.LONG[q]);var H=["MASS","LENGTH","TIME","CURRENT","TEMPERATURE","LUMINOUS_INTENSITY","AMOUNT_OF_SUBSTANCE","ANGLE","BIT"],W={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 V in W)W[V].key=V;var G={},$={name:"",base:G,value:1,offset:0,dimensions:[0,0,0,0,0,0,0,0,0]},Y={meter:{name:"meter",base:W.LENGTH,prefixes:j.LONG,value:1,offset:0},inch:{name:"inch",base:W.LENGTH,prefixes:j.NONE,value:.0254,offset:0},foot:{name:"foot",base:W.LENGTH,prefixes:j.NONE,value:.3048,offset:0},yard:{name:"yard",base:W.LENGTH,prefixes:j.NONE,value:.9144,offset:0},mile:{name:"mile",base:W.LENGTH,prefixes:j.NONE,value:1609.344,offset:0},link:{name:"link",base:W.LENGTH,prefixes:j.NONE,value:.201168,offset:0},rod:{name:"rod",base:W.LENGTH,prefixes:j.NONE,value:5.02921,offset:0},chain:{name:"chain",base:W.LENGTH,prefixes:j.NONE,value:20.1168,offset:0},angstrom:{name:"angstrom",base:W.LENGTH,prefixes:j.NONE,value:1e-10,offset:0},m:{name:"m",base:W.LENGTH,prefixes:j.SHORT,value:1,offset:0},in:{name:"in",base:W.LENGTH,prefixes:j.NONE,value:.0254,offset:0},ft:{name:"ft",base:W.LENGTH,prefixes:j.NONE,value:.3048,offset:0},yd:{name:"yd",base:W.LENGTH,prefixes:j.NONE,value:.9144,offset:0},mi:{name:"mi",base:W.LENGTH,prefixes:j.NONE,value:1609.344,offset:0},li:{name:"li",base:W.LENGTH,prefixes:j.NONE,value:.201168,offset:0},rd:{name:"rd",base:W.LENGTH,prefixes:j.NONE,value:5.02921,offset:0},ch:{name:"ch",base:W.LENGTH,prefixes:j.NONE,value:20.1168,offset:0},mil:{name:"mil",base:W.LENGTH,prefixes:j.NONE,value:254e-7,offset:0},m2:{name:"m2",base:W.SURFACE,prefixes:j.SQUARED,value:1,offset:0},sqin:{name:"sqin",base:W.SURFACE,prefixes:j.NONE,value:64516e-8,offset:0},sqft:{name:"sqft",base:W.SURFACE,prefixes:j.NONE,value:.09290304,offset:0},sqyd:{name:"sqyd",base:W.SURFACE,prefixes:j.NONE,value:.83612736,offset:0},sqmi:{name:"sqmi",base:W.SURFACE,prefixes:j.NONE,value:2589988.110336,offset:0},sqrd:{name:"sqrd",base:W.SURFACE,prefixes:j.NONE,value:25.29295,offset:0},sqch:{name:"sqch",base:W.SURFACE,prefixes:j.NONE,value:404.6873,offset:0},sqmil:{name:"sqmil",base:W.SURFACE,prefixes:j.NONE,value:6.4516e-10,offset:0},acre:{name:"acre",base:W.SURFACE,prefixes:j.NONE,value:4046.86,offset:0},hectare:{name:"hectare",base:W.SURFACE,prefixes:j.NONE,value:1e4,offset:0},m3:{name:"m3",base:W.VOLUME,prefixes:j.CUBIC,value:1,offset:0},L:{name:"L",base:W.VOLUME,prefixes:j.SHORT,value:.001,offset:0},l:{name:"l",base:W.VOLUME,prefixes:j.SHORT,value:.001,offset:0},litre:{name:"litre",base:W.VOLUME,prefixes:j.LONG,value:.001,offset:0},cuin:{name:"cuin",base:W.VOLUME,prefixes:j.NONE,value:16387064e-12,offset:0},cuft:{name:"cuft",base:W.VOLUME,prefixes:j.NONE,value:.028316846592,offset:0},cuyd:{name:"cuyd",base:W.VOLUME,prefixes:j.NONE,value:.764554857984,offset:0},teaspoon:{name:"teaspoon",base:W.VOLUME,prefixes:j.NONE,value:5e-6,offset:0},tablespoon:{name:"tablespoon",base:W.VOLUME,prefixes:j.NONE,value:15e-6,offset:0},drop:{name:"drop",base:W.VOLUME,prefixes:j.NONE,value:5e-8,offset:0},gtt:{name:"gtt",base:W.VOLUME,prefixes:j.NONE,value:5e-8,offset:0},minim:{name:"minim",base:W.VOLUME,prefixes:j.NONE,value:6.161152e-8,offset:0},fluiddram:{name:"fluiddram",base:W.VOLUME,prefixes:j.NONE,value:36966911e-13,offset:0},fluidounce:{name:"fluidounce",base:W.VOLUME,prefixes:j.NONE,value:2957353e-11,offset:0},gill:{name:"gill",base:W.VOLUME,prefixes:j.NONE,value:.0001182941,offset:0},cc:{name:"cc",base:W.VOLUME,prefixes:j.NONE,value:1e-6,offset:0},cup:{name:"cup",base:W.VOLUME,prefixes:j.NONE,value:.0002365882,offset:0},pint:{name:"pint",base:W.VOLUME,prefixes:j.NONE,value:.0004731765,offset:0},quart:{name:"quart",base:W.VOLUME,prefixes:j.NONE,value:.0009463529,offset:0},gallon:{name:"gallon",base:W.VOLUME,prefixes:j.NONE,value:.003785412,offset:0},beerbarrel:{name:"beerbarrel",base:W.VOLUME,prefixes:j.NONE,value:.1173478,offset:0},oilbarrel:{name:"oilbarrel",base:W.VOLUME,prefixes:j.NONE,value:.1589873,offset:0},hogshead:{name:"hogshead",base:W.VOLUME,prefixes:j.NONE,value:.238481,offset:0},fldr:{name:"fldr",base:W.VOLUME,prefixes:j.NONE,value:36966911e-13,offset:0},floz:{name:"floz",base:W.VOLUME,prefixes:j.NONE,value:2957353e-11,offset:0},gi:{name:"gi",base:W.VOLUME,prefixes:j.NONE,value:.0001182941,offset:0},cp:{name:"cp",base:W.VOLUME,prefixes:j.NONE,value:.0002365882,offset:0},pt:{name:"pt",base:W.VOLUME,prefixes:j.NONE,value:.0004731765,offset:0},qt:{name:"qt",base:W.VOLUME,prefixes:j.NONE,value:.0009463529,offset:0},gal:{name:"gal",base:W.VOLUME,prefixes:j.NONE,value:.003785412,offset:0},bbl:{name:"bbl",base:W.VOLUME,prefixes:j.NONE,value:.1173478,offset:0},obl:{name:"obl",base:W.VOLUME,prefixes:j.NONE,value:.1589873,offset:0},g:{name:"g",base:W.MASS,prefixes:j.SHORT,value:.001,offset:0},gram:{name:"gram",base:W.MASS,prefixes:j.LONG,value:.001,offset:0},ton:{name:"ton",base:W.MASS,prefixes:j.SHORT,value:907.18474,offset:0},tonne:{name:"tonne",base:W.MASS,prefixes:j.SHORT,value:1e3,offset:0},grain:{name:"grain",base:W.MASS,prefixes:j.NONE,value:6479891e-11,offset:0},dram:{name:"dram",base:W.MASS,prefixes:j.NONE,value:.0017718451953125,offset:0},ounce:{name:"ounce",base:W.MASS,prefixes:j.NONE,value:.028349523125,offset:0},poundmass:{name:"poundmass",base:W.MASS,prefixes:j.NONE,value:.45359237,offset:0},hundredweight:{name:"hundredweight",base:W.MASS,prefixes:j.NONE,value:45.359237,offset:0},stick:{name:"stick",base:W.MASS,prefixes:j.NONE,value:.115,offset:0},stone:{name:"stone",base:W.MASS,prefixes:j.NONE,value:6.35029318,offset:0},gr:{name:"gr",base:W.MASS,prefixes:j.NONE,value:6479891e-11,offset:0},dr:{name:"dr",base:W.MASS,prefixes:j.NONE,value:.0017718451953125,offset:0},oz:{name:"oz",base:W.MASS,prefixes:j.NONE,value:.028349523125,offset:0},lbm:{name:"lbm",base:W.MASS,prefixes:j.NONE,value:.45359237,offset:0},cwt:{name:"cwt",base:W.MASS,prefixes:j.NONE,value:45.359237,offset:0},s:{name:"s",base:W.TIME,prefixes:j.SHORT,value:1,offset:0},min:{name:"min",base:W.TIME,prefixes:j.NONE,value:60,offset:0},h:{name:"h",base:W.TIME,prefixes:j.NONE,value:3600,offset:0},second:{name:"second",base:W.TIME,prefixes:j.LONG,value:1,offset:0},sec:{name:"sec",base:W.TIME,prefixes:j.LONG,value:1,offset:0},minute:{name:"minute",base:W.TIME,prefixes:j.NONE,value:60,offset:0},hour:{name:"hour",base:W.TIME,prefixes:j.NONE,value:3600,offset:0},day:{name:"day",base:W.TIME,prefixes:j.NONE,value:86400,offset:0},week:{name:"week",base:W.TIME,prefixes:j.NONE,value:604800,offset:0},month:{name:"month",base:W.TIME,prefixes:j.NONE,value:2629800,offset:0},year:{name:"year",base:W.TIME,prefixes:j.NONE,value:31557600,offset:0},decade:{name:"decade",base:W.TIME,prefixes:j.NONE,value:315576e3,offset:0},century:{name:"century",base:W.TIME,prefixes:j.NONE,value:315576e4,offset:0},millennium:{name:"millennium",base:W.TIME,prefixes:j.NONE,value:315576e5,offset:0},hertz:{name:"Hertz",base:W.FREQUENCY,prefixes:j.LONG,value:1,offset:0,reciprocal:!0},Hz:{name:"Hz",base:W.FREQUENCY,prefixes:j.SHORT,value:1,offset:0,reciprocal:!0},rad:{name:"rad",base:W.ANGLE,prefixes:j.SHORT,value:1,offset:0},radian:{name:"radian",base:W.ANGLE,prefixes:j.LONG,value:1,offset:0},deg:{name:"deg",base:W.ANGLE,prefixes:j.SHORT,value:null,offset:0},degree:{name:"degree",base:W.ANGLE,prefixes:j.LONG,value:null,offset:0},grad:{name:"grad",base:W.ANGLE,prefixes:j.SHORT,value:null,offset:0},gradian:{name:"gradian",base:W.ANGLE,prefixes:j.LONG,value:null,offset:0},cycle:{name:"cycle",base:W.ANGLE,prefixes:j.NONE,value:null,offset:0},arcsec:{name:"arcsec",base:W.ANGLE,prefixes:j.NONE,value:null,offset:0},arcmin:{name:"arcmin",base:W.ANGLE,prefixes:j.NONE,value:null,offset:0},A:{name:"A",base:W.CURRENT,prefixes:j.SHORT,value:1,offset:0},ampere:{name:"ampere",base:W.CURRENT,prefixes:j.LONG,value:1,offset:0},K:{name:"K",base:W.TEMPERATURE,prefixes:j.NONE,value:1,offset:0},degC:{name:"degC",base:W.TEMPERATURE,prefixes:j.NONE,value:1,offset:273.15},degF:{name:"degF",base:W.TEMPERATURE,prefixes:j.NONE,value:1/1.8,offset:459.67},degR:{name:"degR",base:W.TEMPERATURE,prefixes:j.NONE,value:1/1.8,offset:0},kelvin:{name:"kelvin",base:W.TEMPERATURE,prefixes:j.NONE,value:1,offset:0},celsius:{name:"celsius",base:W.TEMPERATURE,prefixes:j.NONE,value:1,offset:273.15},fahrenheit:{name:"fahrenheit",base:W.TEMPERATURE,prefixes:j.NONE,value:1/1.8,offset:459.67},rankine:{name:"rankine",base:W.TEMPERATURE,prefixes:j.NONE,value:1/1.8,offset:0},mol:{name:"mol",base:W.AMOUNT_OF_SUBSTANCE,prefixes:j.SHORT,value:1,offset:0},mole:{name:"mole",base:W.AMOUNT_OF_SUBSTANCE,prefixes:j.LONG,value:1,offset:0},cd:{name:"cd",base:W.LUMINOUS_INTENSITY,prefixes:j.NONE,value:1,offset:0},candela:{name:"candela",base:W.LUMINOUS_INTENSITY,prefixes:j.NONE,value:1,offset:0},N:{name:"N",base:W.FORCE,prefixes:j.SHORT,value:1,offset:0},newton:{name:"newton",base:W.FORCE,prefixes:j.LONG,value:1,offset:0},dyn:{name:"dyn",base:W.FORCE,prefixes:j.SHORT,value:1e-5,offset:0},dyne:{name:"dyne",base:W.FORCE,prefixes:j.LONG,value:1e-5,offset:0},lbf:{name:"lbf",base:W.FORCE,prefixes:j.NONE,value:4.4482216152605,offset:0},poundforce:{name:"poundforce",base:W.FORCE,prefixes:j.NONE,value:4.4482216152605,offset:0},kip:{name:"kip",base:W.FORCE,prefixes:j.LONG,value:4448.2216,offset:0},J:{name:"J",base:W.ENERGY,prefixes:j.SHORT,value:1,offset:0},joule:{name:"joule",base:W.ENERGY,prefixes:j.SHORT,value:1,offset:0},erg:{name:"erg",base:W.ENERGY,prefixes:j.NONE,value:1e-7,offset:0},Wh:{name:"Wh",base:W.ENERGY,prefixes:j.SHORT,value:3600,offset:0},BTU:{name:"BTU",base:W.ENERGY,prefixes:j.BTU,value:1055.05585262,offset:0},eV:{name:"eV",base:W.ENERGY,prefixes:j.SHORT,value:1.602176565e-19,offset:0},electronvolt:{name:"electronvolt",base:W.ENERGY,prefixes:j.LONG,value:1.602176565e-19,offset:0},W:{name:"W",base:W.POWER,prefixes:j.SHORT,value:1,offset:0},watt:{name:"watt",base:W.POWER,prefixes:j.LONG,value:1,offset:0},hp:{name:"hp",base:W.POWER,prefixes:j.NONE,value:745.6998715386,offset:0},VAR:{name:"VAR",base:W.POWER,prefixes:j.SHORT,value:D.I,offset:0},VA:{name:"VA",base:W.POWER,prefixes:j.SHORT,value:1,offset:0},Pa:{name:"Pa",base:W.PRESSURE,prefixes:j.SHORT,value:1,offset:0},psi:{name:"psi",base:W.PRESSURE,prefixes:j.NONE,value:6894.75729276459,offset:0},atm:{name:"atm",base:W.PRESSURE,prefixes:j.NONE,value:101325,offset:0},bar:{name:"bar",base:W.PRESSURE,prefixes:j.SHORTLONG,value:1e5,offset:0},torr:{name:"torr",base:W.PRESSURE,prefixes:j.NONE,value:133.322,offset:0},mmHg:{name:"mmHg",base:W.PRESSURE,prefixes:j.NONE,value:133.322,offset:0},mmH2O:{name:"mmH2O",base:W.PRESSURE,prefixes:j.NONE,value:9.80665,offset:0},cmH2O:{name:"cmH2O",base:W.PRESSURE,prefixes:j.NONE,value:98.0665,offset:0},coulomb:{name:"coulomb",base:W.ELECTRIC_CHARGE,prefixes:j.LONG,value:1,offset:0},C:{name:"C",base:W.ELECTRIC_CHARGE,prefixes:j.SHORT,value:1,offset:0},farad:{name:"farad",base:W.ELECTRIC_CAPACITANCE,prefixes:j.LONG,value:1,offset:0},F:{name:"F",base:W.ELECTRIC_CAPACITANCE,prefixes:j.SHORT,value:1,offset:0},volt:{name:"volt",base:W.ELECTRIC_POTENTIAL,prefixes:j.LONG,value:1,offset:0},V:{name:"V",base:W.ELECTRIC_POTENTIAL,prefixes:j.SHORT,value:1,offset:0},ohm:{name:"ohm",base:W.ELECTRIC_RESISTANCE,prefixes:j.SHORTLONG,value:1,offset:0},henry:{name:"henry",base:W.ELECTRIC_INDUCTANCE,prefixes:j.LONG,value:1,offset:0},H:{name:"H",base:W.ELECTRIC_INDUCTANCE,prefixes:j.SHORT,value:1,offset:0},siemens:{name:"siemens",base:W.ELECTRIC_CONDUCTANCE,prefixes:j.LONG,value:1,offset:0},S:{name:"S",base:W.ELECTRIC_CONDUCTANCE,prefixes:j.SHORT,value:1,offset:0},weber:{name:"weber",base:W.MAGNETIC_FLUX,prefixes:j.LONG,value:1,offset:0},Wb:{name:"Wb",base:W.MAGNETIC_FLUX,prefixes:j.SHORT,value:1,offset:0},tesla:{name:"tesla",base:W.MAGNETIC_FLUX_DENSITY,prefixes:j.LONG,value:1,offset:0},T:{name:"T",base:W.MAGNETIC_FLUX_DENSITY,prefixes:j.SHORT,value:1,offset:0},b:{name:"b",base:W.BIT,prefixes:j.BINARY_SHORT,value:1,offset:0},bits:{name:"bits",base:W.BIT,prefixes:j.BINARY_LONG,value:1,offset:0},B:{name:"B",base:W.BIT,prefixes:j.BINARY_SHORT,value:8,offset:0},bytes:{name:"bytes",base:W.BIT,prefixes:j.BINARY_LONG,value:8,offset:0}},X={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"};w(t),c.on("config",function(e,t){e.number!==t.number&&w(e)});var K={si:{NONE:{unit:$,prefix:j.NONE[""]},LENGTH:{unit:Y.m,prefix:j.SHORT[""]},MASS:{unit:Y.g,prefix:j.SHORT.k},TIME:{unit:Y.s,prefix:j.SHORT[""]},CURRENT:{unit:Y.A,prefix:j.SHORT[""]},TEMPERATURE:{unit:Y.K,prefix:j.SHORT[""]},LUMINOUS_INTENSITY:{unit:Y.cd,prefix:j.SHORT[""]},AMOUNT_OF_SUBSTANCE:{unit:Y.mol,prefix:j.SHORT[""]},ANGLE:{unit:Y.rad,prefix:j.SHORT[""]},BIT:{unit:Y.bit,prefix:j.SHORT[""]},FORCE:{unit:Y.N,prefix:j.SHORT[""]},ENERGY:{unit:Y.J,prefix:j.SHORT[""]},POWER:{unit:Y.W,prefix:j.SHORT[""]},PRESSURE:{unit:Y.Pa,prefix:j.SHORT[""]},ELECTRIC_CHARGE:{unit:Y.C,prefix:j.SHORT[""]},ELECTRIC_CAPACITANCE:{unit:Y.F,prefix:j.SHORT[""]},ELECTRIC_POTENTIAL:{unit:Y.V,prefix:j.SHORT[""]},ELECTRIC_RESISTANCE:{unit:Y.ohm,prefix:j.SHORT[""]},ELECTRIC_INDUCTANCE:{unit:Y.H,prefix:j.SHORT[""]},ELECTRIC_CONDUCTANCE:{unit:Y.S,prefix:j.SHORT[""]},MAGNETIC_FLUX:{unit:Y.Wb,prefix:j.SHORT[""]},MAGNETIC_FLUX_DENSITY:{unit:Y.T,prefix:j.SHORT[""]},FREQUENCY:{unit:Y.Hz,prefix:j.SHORT[""]}}};K.cgs=JSON.parse(JSON.stringify(K.si)),K.cgs.LENGTH={unit:Y.m,prefix:j.SHORT.c},K.cgs.MASS={unit:Y.g,prefix:j.SHORT[""]},K.cgs.FORCE={unit:Y.dyn,prefix:j.SHORT[""]},K.cgs.ENERGY={unit:Y.erg,prefix:j.NONE[""]},K.us=JSON.parse(JSON.stringify(K.si)),K.us.LENGTH={unit:Y.ft,prefix:j.NONE[""]},K.us.MASS={unit:Y.lbm,prefix:j.NONE[""]},K.us.TEMPERATURE={unit:Y.degF,prefix:j.NONE[""]},K.us.FORCE={unit:Y.lbf,prefix:j.NONE[""]},K.us.ENERGY={unit:Y.BTU,prefix:j.BTU[""]},K.us.POWER={unit:Y.hp,prefix:j.NONE[""]},K.us.PRESSURE={unit:Y.psi,prefix:j.NONE[""]},K.auto=JSON.parse(JSON.stringify(K.si));var Z=K.auto;l.setUnitSystem=function(e){if(!K.hasOwnProperty(e))throw new Error("Unit system "+e+" does not exist. Choices are: "+Object.keys(K).join(", "));Z=K[e]},l.getUnitSystem=function(){for(var e in K)if(K[e]===Z)return e},l.typeConverters={BigNumber:function(t){return new e.BigNumber(t+"")},Fraction:function(t){return new e.Fraction(t)},Complex:function(e){return e},number:function(e){return e}},l._getNumberConverter=function(e){if(!l.typeConverters[e])throw new TypeError('Unsupported type "'+e+'"');return l.typeConverters[e]};for(var J in Y){var Q=Y[J];Q.dimensions=Q.base.dimensions}for(var ee in X)if(X.hasOwnProperty(ee)){var te=Y[X[ee]],ne={};for(var re in te)te.hasOwnProperty(re)&&(ne[re]=te[re]);ne.name=ee,Y[ee]=ne}return l.createUnit=function(e,t){if("object"!==("undefined"===typeof e?"undefined":i(e)))throw new TypeError("createUnit expects first parameter to be of type 'Object'");if(t&&t.override)for(var n in e)if(e.hasOwnProperty(n)&&l.deleteUnit(n),e[n].aliases)for(var r=0;r<e[n].aliases.length;r++)l.deleteUnit(e[n].aliases[r]);var o=void 0;for(var a in e)e.hasOwnProperty(a)&&(o=l.createUnitSingle(a,e[a]));return o},l.createUnitSingle=function(e,t,n){if("undefined"!==typeof t&&null!==t||(t={}),"string"!==typeof e)throw new TypeError("createUnitSingle expects first parameter to be of type 'string'");if(Y.hasOwnProperty(e))throw new Error('Cannot create unit "'+e+'": a unit with that name already exists');N(e);var r=null,o=[],a=0,s=void 0,u=void 0;if(t&&"Unit"===t.type)r=t.clone();else if("string"===typeof t)""!==t&&(s=t);else{if("object"!==("undefined"===typeof t?"undefined":i(t)))throw new TypeError('Cannot create unit "'+e+'" from "'+t.toString()+'": expecting "string" or "Unit" or "Object"');s=t.definition,u=t.prefixes,a=t.offset,t.aliases&&(o=t.aliases.valueOf())}if(o)for(var c=0;c<o.length;c++)if(Y.hasOwnProperty(o[c]))throw new Error('Cannot create alias "'+o[c]+'": a unit with that name already exists');if(s&&"string"===typeof s&&!r)try{r=l.parse(s,{allowNoUnits:!0})}catch(t){throw t.message='Could not create unit "'+e+'" from "'+s+'": '+t.message,t}else s&&"Unit"===s.type&&(r=s.clone());o=o||[],a=a||0,u=u&&u.toUpperCase?j[u.toUpperCase()]||j.NONE:j.NONE;var f={};if(r){f={name:e,value:r.value,dimensions:r.dimensions.slice(0),prefixes:u,offset:a};var p=!1;for(var h in W)if(W.hasOwnProperty(h)){for(var d=!0,m=0;m<H.length;m++)if(Math.abs((f.dimensions[m]||0)-(W[h].dimensions[m]||0))>1e-12){d=!1;break}if(d){p=!0;break}}if(!p){var g=e+"_STUFF",v={dimensions:r.dimensions.slice(0)};v.key=g,W[g]=v,Z[g]={unit:f,prefix:j.NONE[""]},f.base=g}}else{var y=e+"_STUFF";if(H.indexOf(y)>=0)throw new Error('Cannot create new base unit "'+e+'": a base unit with that name already exists (and cannot be overridden)');H.push(y);for(var b in W)W.hasOwnProperty(b)&&(W[b].dimensions[H.length-1]=0);for(var x={dimensions:[]},w=0;w<H.length;w++)x.dimensions[w]=0;x.dimensions[H.length-1]=1,x.key=y,W[y]=x,f={name:e,value:1,dimensions:W[y].dimensions.slice(0),prefixes:u,offset:a,base:y},Z[y]={unit:f,prefix:j.NONE[""]}}l.UNITS[e]=f;for(var E=0;E<o.length;E++){var C=o[E],S={};for(var M in f)f.hasOwnProperty(M)&&(S[M]=f[M]);S.name=C,l.UNITS[C]=S}return new l(null,e)},l.deleteUnit=function(e){delete l.UNITS[e]},l.PREFIXES=j,l.BASE_DIMENSIONS=H,l.BASE_UNITS=W,l.UNIT_SYSTEMS=K,l.UNITS=Y,l}var i="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},o=n(9).endsWith,a=n(5).clone,s=n(137);t.name="Unit",t.path="type",t.factory=r,t.math=!0},function(e,t,n){"use strict";function r(e,t,n,r){var o=r("unit",{Unit:function(e){return e.clone()},string:function(t){return e.Unit.isValuelessUnit(t)?new e.Unit(null,t):e.Unit.parse(t)},"number | BigNumber | Fraction | Complex, string":function(t,n){return new e.Unit(t,n)},"Array | Matrix":function(e){return i(e,o)}});return o.toTex={1:"\\left(${args[0]}\\right)",2:"\\left(\\left(${args[0]}\\right)${args[1]}\\right)"},o}var i=n(0);t.name="unit",t.factory=r},function(e,t,n){"use strict";function r(e,t,n,r){return r("createUnit",{"Object, Object":function(t,n){return e.Unit.createUnit(t,n)},Object:function(t){return e.Unit.createUnit(t,{})},"string, Unit | string | Object, Object":function(t,n,r){var i={};return i[t]=n,e.Unit.createUnit(i,r)},"string, Unit | string | Object":function(t,n){var r={};return r[t]=n,e.Unit.createUnit(r,{})},string:function(t){var n={};return n[t]={},e.Unit.createUnit(n,{})}})}t.name="createUnit",t.factory=r},function(e,t,n){"use strict";function r(e,t,n,r){return r("splitUnit",{"Unit, Array":function(e,t){return e.splitUnit(t)}})}t.name="splitUnit",t.factory=r},function(e,t,n){"use strict";function r(e,t,n,r,o){function a(t){var n=e.Unit.parse(t);return n.fixPrefix=!0,n}i(o,"speedOfLight",function(){return a("299792458 m s^-1")}),i(o,"gravitationConstant",function(){return a("6.6738480e-11 m^3 kg^-1 s^-2")}),i(o,"planckConstant",function(){return a("6.626069311e-34 J s")}),i(o,"reducedPlanckConstant",function(){return a("1.05457172647e-34 J s")}),i(o,"magneticConstant",function(){return a("1.2566370614e-6 N A^-2")}),i(o,"electricConstant",function(){return a("8.854187817e-12 F m^-1")}),i(o,"vacuumImpedance",function(){return a("376.730313461 ohm")}),i(o,"coulomb",function(){return a("8.9875517873681764e9 N m^2 C^-2")}),i(o,"elementaryCharge",function(){return a("1.60217656535e-19 C")}),i(o,"bohrMagneton",function(){return a("9.2740096820e-24 J T^-1")}),i(o,"conductanceQuantum",function(){return a("7.748091734625e-5 S")}),i(o,"inverseConductanceQuantum",function(){return a("12906.403721742 ohm")}),i(o,"magneticFluxQuantum",function(){return a("2.06783375846e-15 Wb")}),i(o,"nuclearMagneton",function(){return a("5.0507835311e-27 J T^-1")}),i(o,"klitzing",function(){return a("25812.807443484 ohm")}),i(o,"bohrRadius",function(){return a("5.291772109217e-11 m")}),i(o,"classicalElectronRadius",function(){return a("2.817940326727e-15 m")}),i(o,"electronMass",function(){return a("9.1093829140e-31 kg")}),i(o,"fermiCoupling",function(){return a("1.1663645e-5 GeV^-2")}),i(o,"fineStructure",function(){return.007297352569824}),i(o,"hartreeEnergy",function(){return a("4.3597443419e-18 J")}),i(o,"protonMass",function(){return a("1.67262177774e-27 kg")}),i(o,"deuteronMass",function(){return a("3.3435830926e-27 kg")}),i(o,"neutronMass",function(){return a("1.6749271613e-27 kg")}),i(o,"quantumOfCirculation",function(){return a("3.636947552024e-4 m^2 s^-1")}),i(o,"rydberg",function(){return a("10973731.56853955 m^-1")}),i(o,"thomsonCrossSection",function(){return a("6.65245873413e-29 m^2")}),i(o,"weakMixingAngle",function(){return.222321}),i(o,"efimovFactor",function(){return 22.7}),i(o,"atomicMass",function(){return a("1.66053892173e-27 kg")}),i(o,"avogadro",function(){return a("6.0221412927e23 mol^-1")}),i(o,"boltzmann",function(){return a("1.380648813e-23 J K^-1")}),i(o,"faraday",function(){return a("96485.336521 C mol^-1")}),i(o,"firstRadiation",function(){return a("3.7417715317e-16 W m^2")}),i(o,"loschmidt",function(){return a("2.686780524e25 m^-3")}),i(o,"gasConstant",function(){return a("8.314462175 J K^-1 mol^-1")}),i(o,"molarPlanckConstant",function(){return a("3.990312717628e-10 J s mol^-1")}),i(o,"molarVolume",function(){return a("2.241396820e-10 m^3 mol^-1")}),i(o,"sackurTetrode",function(){return-1.164870823}),i(o,"secondRadiation",function(){return a("1.438777013e-2 m K")}),i(o,"stefanBoltzmann",function(){return a("5.67037321e-8 W m^-2 K^-4")}),i(o,"wienDisplacement",function(){return a("2.897772126e-3 m K")}),i(o,"molarMass",function(){return a("1e-3 kg mol^-1")}),i(o,"molarMassC12",function(){return a("1.2e-2 kg mol^-1")}),i(o,"gravity",function(){return a("9.80665 m s^-2")}),i(o,"planckLength",function(){return a("1.61619997e-35 m")}),i(o,"planckMass",function(){return a("2.1765113e-8 kg")}),i(o,"planckTime",function(){return a("5.3910632e-44 s")}),i(o,"planckCharge",function(){return a("1.87554595641e-18 C")}),i(o,"planckTemperature",function(){return a("1.41683385e+32 K")})}function i(e,t,n){o(e,t,n),o(e.expression.mathWithTransform,t,n)}var o=n(5).lazy;t.factory=r,t.lazy=!1,t.math=!0},function(e,t,n){"use strict";function r(e,t,a,u,c){c.on("config",function(n,i){n.number!==i.number&&r(e,t,a,u,c)}),i(c,"true",!0),i(c,"false",!1),i(c,"null",null),i(c,"uninitialized","Error: Constant uninitialized is removed since v4.0.0. Use null instead"),"BigNumber"===t.number?(i(c,"Infinity",new e.BigNumber(1/0)),i(c,"NaN",new e.BigNumber(NaN)),o(c,"pi",function(){return s.pi(e.BigNumber)}),o(c,"tau",function(){return s.tau(e.BigNumber)}),o(c,"e",function(){return s.e(e.BigNumber)}),o(c,"phi",function(){return s.phi(e.BigNumber)}),o(c,"E",function(){return c.e}),o(c,"LN2",function(){return new e.BigNumber(2).ln()}),o(c,"LN10",function(){return new e.BigNumber(10).ln()}),o(c,"LOG2E",function(){return new e.BigNumber(1).div(new e.BigNumber(2).ln())}),o(c,"LOG10E",function(){return new e.BigNumber(1).div(new e.BigNumber(10).ln())}),o(c,"PI",function(){return c.pi}),o(c,"SQRT1_2",function(){return new e.BigNumber("0.5").sqrt()}),o(c,"SQRT2",function(){return new e.BigNumber(2).sqrt()})):(i(c,"Infinity",1/0),i(c,"NaN",NaN),i(c,"pi",Math.PI),i(c,"tau",2*Math.PI),i(c,"e",Math.E),i(c,"phi",1.618033988749895),i(c,"E",c.e),i(c,"LN2",Math.LN2),i(c,"LN10",Math.LN10),i(c,"LOG2E",Math.LOG2E),i(c,"LOG10E",Math.LOG10E),i(c,"PI",c.pi),i(c,"SQRT1_2",Math.SQRT1_2),i(c,"SQRT2",Math.SQRT2)),i(c,"i",e.Complex.I),i(c,"version",n(299))}function i(e,t,n){e[t]=n,e.expression.mathWithTransform[t]=n}function o(e,t,n){a.lazy(e,t,n),a.lazy(e.expression.mathWithTransform,t,n)}var a=n(5),s=n(137);t.factory=r,t.lazy=!1,t.math=!0},function(e,t,n){"use strict";e.exports="5.0.0"},function(e,t,n){"use strict";e.exports=[n(141),n(502),n(507),n(509),n(520),n(47),n(158)]},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={name:"false",category:"Constants",syntax:["false"],description:"Boolean value false",examples:["false"],seealso:["true"]}},function(e,t,n){"use strict";e.exports={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:[]}},function(e,t,n){"use strict";e.exports={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:[]}},function(e,t,n){"use strict";e.exports={name:"LN2",category:"Constants",syntax:["LN2"],description:"Returns the natural logarithm of 2, approximately equal to 0.693",examples:["LN2","log(2)"],seealso:[]}},function(e,t,n){"use strict";e.exports={name:"LN10",category:"Constants",syntax:["LN10"],description:"Returns the natural logarithm of 10, approximately equal to 2.302",examples:["LN10","log(10)"],seealso:[]}},function(e,t,n){"use strict";e.exports={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:[]}},function(e,t,n){"use strict";e.exports={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:[]}},function(e,t,n){"use strict";e.exports={name:"NaN",category:"Constants",syntax:["NaN"],description:"Not a number",examples:["NaN","0 / 0"],seealso:[]}},function(e,t,n){"use strict";e.exports={name:"null",category:"Constants",syntax:["null"],description:"Value null",examples:["null"],seealso:["true","false"]}},function(e,t,n){"use strict";e.exports={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:[]}},function(e,t,n){"use strict";e.exports={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:[]}},function(e,t,n){"use strict";e.exports={name:"SQRT2",category:"Constants",syntax:["SQRT2"],description:"Returns the square root of 2, approximately equal to 1.414",examples:["SQRT2","sqrt(2)"],seealso:[]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={name:"true",category:"Constants",syntax:["true"],description:"Boolean value true",examples:["true"],seealso:["false"]}},function(e,t,n){"use strict";e.exports={name:"version",category:"Constants",syntax:["version"],description:"A string with the version number of math.js",examples:["version"],seealso:[]}},function(e,t,n){"use strict";e.exports={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.eval({x: 3})"],seealso:["simplify","parse","eval"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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.eval({x: 2})"],seealso:["derivative","parse","eval"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={name:"abs",category:"Arithmetic",syntax:["abs(x)"],description:"Compute the absolute value.",examples:["abs(3.5)","abs(-4.2)"],seealso:["sign"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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")']}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={name:"unaryPlus",category:"Operators",syntax:["+x","unaryPlus(x)"],description:"Converts booleans and strings to numbers.",examples:["+true",'+"2"'],seealso:["add","subtract","unaryMinus"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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:[]}},function(e,t,n){"use strict";e.exports={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:[]}},function(e,t,n){"use strict";e.exports={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:[]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={name:"eval",category:"Expression",syntax:["eval(expression)","eval([expr1, expr2, expr3, ...])"],description:"Evaluate an expression or an array with expressions.",examples:['eval("2 + 3")','eval("sqrt(" + 4 + ")")'],seealso:[]}},function(e,t,n){"use strict";e.exports={name:"help",category:"Expression",syntax:["help(object)","help(string)"],description:"Display documentation on a function or data type.",examples:["help(sqrt)",'help("complex")'],seealso:[]}},function(e,t,n){"use strict";e.exports={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:[]}},function(e,t,n){"use strict";e.exports={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:[]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={name:"transpose",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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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:["permutations","factorial"]}},function(e,t,n){"use strict";e.exports={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","permutations","gamma"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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:[]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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","factorial"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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:[]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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","var"]}},function(e,t,n){"use strict";e.exports={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","var"]}},function(e,t,n){"use strict";e.exports={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","var","quantileSeq"]}},function(e,t,n){"use strict";e.exports={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","var"]}},function(e,t,n){"use strict";e.exports={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","var"]}},function(e,t,n){"use strict";e.exports={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","var"]}},function(e,t,n){"use strict";e.exports={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","var"]}},function(e,t,n){"use strict";e.exports={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(var(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","min","prod","sum","var"]}},function(e,t,n){"use strict";e.exports={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","var"]}},function(e,t,n){"use strict";e.exports={name:"var",category:"Statistics",syntax:["var(a, b, c, ...)","var(A)","var(A, normalization)"],description:'Compute the variance of all values. Optional parameter normalization can be "unbiased" (default), "uncorrected", or "biased".',examples:["var(2, 4, 6)","var([2, 4, 6, 8])",'var([2, 4, 6, 8], "uncorrected")','var([2, 4, 6, 8], "biased")',"var([1, 2, 3; 4, 5, 6])"],seealso:["max","mean","min","median","min","prod","std","sum"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={name:"asech",category:"Trigonometry",syntax:["asech(x)"],description:"Calculate the inverse secant of a value.",examples:["asech(0.5)"],seealso:["acsch","acoth"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={name:"cosh",category:"Trigonometry",syntax:["cosh(x)"],description:"Compute the hyperbolic cosine of x in radians.",examples:["cosh(0.5)"],seealso:["sinh","tanh","coth"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={name:"sinh",category:"Trigonometry",syntax:["sinh(x)"],description:"Compute the hyperbolic sine of x in radians.",examples:["sinh(0.5)"],seealso:["cosh","tanh"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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:[]}},function(e,t,n){"use strict";e.exports={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:[]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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(0)","isNumeric(bignumber(500))","isNumeric(fraction(0.125))",'isNumeric("3")',"isNumeric(2 + 3i)",'isNumeric([2.3, "foo", false])'],seealso:["isInteger","isZero","isNegative","isPositive","isNaN"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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"]}},function(e,t,n){"use strict";e.exports={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:[]}},function(e,t,n){"use strict";e.exports=[n(503),n(505),n(506),n(156),n(157)]},function(e,t,n){"use strict";function r(e,t,r,o){var a=r(n(47));return o("compile",{string:function(e){return a(e).compile()},"Array | Matrix":function(e){return i(e,function(e){return a(e).compile()})}})}var i=n(0);t.name="compile",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,s){var u=r(n(24)),c=r(n(1));return function(e,t,n){try{if(Array.isArray(e))return c(e).subset(t,n).valueOf();if(e&&"function"===typeof e.subset)return e.subset(t,n);if("string"===typeof e)return u(e,t,n);if("object"===("undefined"===typeof e?"undefined":i(e))){if(!t.isObjectProperty())throw TypeError("Cannot apply a numeric index as object property");return a(e,t.getObjectProperty(),n),e}throw new TypeError("Cannot apply index: unsupported type of object")}catch(e){throw o(e)}}}var i="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},o=n(48).transform,a=n(17).setSafeProperty;t.factory=r},function(e,t,n){"use strict";function r(e,t,r,o){var a=r(n(47));return o("compile",{string:function(e){var t={};return a(e).compile().eval(t)},"string, Object":function(e,t){return a(e).compile().eval(t)},"Array | Matrix":function(e){var t={};return i(e,function(e){return a(e).compile().eval(t)})},"Array | Matrix, Object":function(e,t){return i(e,function(e){return a(e).compile().eval(t)})}})}var i=n(0);t.name="eval",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,o,a){var s=r(n(141));return o("help",{any:function(t){var n=void 0,r=t;if("string"!==typeof t)for(n in a)if(a.hasOwnProperty(n)&&t===a[n]){r=n;break}var o=i(s,r);if(!o)throw new Error('No documentation found on "'+r+'"');return new e.Help(o)}})}var i=n(17).getSafeProperty;t.math=!0,t.name="help",t.factory=r},function(e,t,n){"use strict";e.exports=[n(145),n(148),n(149),n(150),n(151),n(65),n(153),n(152),n(78),n(22),n(154),n(66),n(77),n(155),n(60),n(508)]},function(e,t,n){"use strict";function r(e,t,n,r){function i(){throw new Error("UpdateNode is deprecated. Use AssignmentNode instead.")}return i}t.name="UpdateNode",t.path="expression.node",t.factory=r},function(e,t,n){"use strict";e.exports=[n(510),n(511),n(512),n(513),n(514),n(515),n(516),n(517),n(518),n(519)]},function(e,t,n){"use strict";function r(e,t,r,o){var a=r(n(79));return o("concat",{"...any":function(t){var n=t.length-1,r=t[n];e.isNumber(r)?t[n]=r-1:e.isBigNumber(r)&&(t[n]=r.minus(1));try{return a.apply(null,t)}catch(e){throw i(e)}}})}var i=n(48).transform;t.name="concat",t.path="expression.transform",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,o){function s(t,n,r){var i=void 0,o=void 0;return t[0]&&(i=t[0].compile().eval(r)),t[1]&&(o=e.isSymbolNode(t[1])||e.isFunctionAssignmentNode(t[1])?t[1].compile().eval(r):u(t[1],n,r)),l(i,o)}var u=r(n(102)),c=r(n(1));s.rawArgs=!0;var l=o("filter",{"Array, function":i,"Matrix, function":function(e,t){return c(i(e.toArray(),t))},"Array, RegExp":a,"Matrix, RegExp":function(e,t){return c(a(e.toArray(),t))}});return l.toTex=void 0,s}function i(e,t){var n=s(t);return o(e,function(e,r,i){return 1===n?t(e):2===n?t(e,[r+1]):t(e,[r+1],i)})}var o=n(2).filter,a=n(2).filterRegExp,s=n(34).maxArgumentCount;t.name="filter",t.path="expression.transform",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,a){function s(t,n,r){var i=void 0,o=void 0;return t[0]&&(i=t[0].compile().eval(r)),t[1]&&(o=e.isSymbolNode(t[1])||e.isFunctionAssignmentNode(t[1])?t[1].compile().eval(r):u(t[1],n,r)),c(i,o)}var u=r(n(102));s.rawArgs=!0;var c=a("forEach",{"Array | Matrix, function":function(e,t){var n=i(t);!function r(i,a){Array.isArray(i)?o(i,function(e,t){r(e,a.concat(t+1))}):1===n?t(i):2===n?t(i,a):t(i,a,e)}(e.valueOf(),[])}});return s}var i=n(34).maxArgumentCount,o=n(2).forEach;t.name="forEach",t.path="expression.transform",t.factory=r},function(e,t,n){"use strict";function r(e,t,n){return function(){for(var t=[],n=0,r=arguments.length;n<r;n++){var i=arguments[n];if(e.isRange(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(e.isArray(i)||e.isMatrix(i))i=i.map(function(e){return e-1});else if(e.isNumber(i))i--;else if(e.isBigNumber(i))i=i.toNumber()-1;else if("string"!==typeof i)throw new TypeError("Dimension must be an Array, Matrix, number, string, or Range");t[n]=i}var o=new e.Index;return e.Index.apply(o,t),o}}t.name="index",t.path="expression.transform",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,o){function a(t,n,r){var i=void 0,o=void 0;return t[0]&&(i=t[0].compile().eval(r)),t[1]&&(o=e.isSymbolNode(t[1])||e.isFunctionAssignmentNode(t[1])?t[1].compile().eval(r):s(t[1],n,r)),c(i,o)}var s=r(n(102)),u=r(n(1));a.rawArgs=!0;var c=o("map",{"Array, function":function(e,t){return i(e,t,e)},"Matrix, function":function(e,t){return u(i(e.valueOf(),t,e))}});return a}function i(e,t,n){function r(e,o){return Array.isArray(e)?a(e,function(e,t){return r(e,o.concat(t+1))}):1===i?t(e):2===i?t(e,o):t(e,o,n)}var i=o(t);return r(e,[])}var o=n(34).maxArgumentCount,a=n(2).map;t.name="map",t.path="expression.transform",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,a){var s=r(n(103));return a("max",{"...any":function(t){if(2===t.length&&o(t[0])){var n=t[1];e.isNumber(n)?t[1]=n-1:e.isBigNumber(n)&&(t[1]=n.minus(1))}try{return s.apply(null,t)}catch(e){throw i(e)}}})}var i=n(48).transform,o=n(61);t.name="max",t.path="expression.transform",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,a){var s=r(n(159));return a("mean",{"...any":function(t){if(2===t.length&&o(t[0])){var n=t[1];e.isNumber(n)?t[1]=n-1:e.isBigNumber(n)&&(t[1]=n.minus(1))}try{return s.apply(null,t)}catch(e){throw i(e)}}})}var i=n(48).transform,o=n(61);t.name="mean",t.path="expression.transform",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,a){var s=r(n(161));return a("min",{"...any":function(t){if(2===t.length&&o(t[0])){var n=t[1];e.isNumber(n)?t[1]=n-1:e.isBigNumber(n)&&(t[1]=n.minus(1))}try{return s.apply(null,t)}catch(e){throw i(e)}}})}var i=n(48).transform,o=n(61);t.name="min",t.path="expression.transform",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,i){var o=r(n(162));return i("range",{"...any":function(e){return"boolean"!==typeof e[e.length-1]&&e.push(!0),o.apply(null,e)}})}t.name="range",t.path="expression.transform",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,o){var a=r(n(24));return o("subset",{"...any":function(e){try{return a.apply(null,e)}catch(e){throw i(e)}}})}var i=n(48).transform;t.name="subset",t.path="expression.transform",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,a){function s(e){if(!(this instanceof s))throw new SyntaxError("Constructor must be called with the new operator");if(!e)throw new Error('Argument "doc" missing');this.doc=e}var u=r(n(157))();return s.prototype.type="Help",s.prototype.isHelp=!0,s.prototype.toString=function(){var t=this.doc||{},n="\n";if(t.name&&(n+="Name: "+t.name+"\n\n"),t.category&&(n+="Category: "+t.category+"\n\n"),t.description&&(n+="Description:\n    "+t.description+"\n\n"),t.syntax&&(n+="Syntax:\n    "+t.syntax.join("\n    ")+"\n\n"),t.examples){n+="Examples:\n";for(var r=0;r<t.examples.length;r++){var i=t.examples[r];n+="    "+i+"\n";var a=void 0;try{a=u.eval(i)}catch(e){a=e}void 0===a||e.isHelp(a)||(n+="        "+o.format(a,{precision:14})+"\n")}n+="\n"}return t.seealso&&t.seealso.length&&(n+="See also: "+t.seealso.join(", ")+"\n"),n},s.prototype.toJSON=function(){var e=i.clone(this.doc);return e.mathjs="Help",e},s.fromJSON=function(e){var t={};for(var n in e)"mathjs"!==n&&(t[n]=e[n]);return new s(t)},s.prototype.valueOf=s.prototype.toString,s}var i=n(5),o=n(9);t.name="Help",t.path="type",t.factory=r},function(e,t,n){"use strict";e.exports=[n(522),n(542),n(565),n(578),n(582),n(586),n(589),n(593),n(612),n(621),n(625),n(633),n(635),n(641),n(643),n(669),n(671)]},function(e,t,n){"use strict";e.exports=[n(523),n(106),n(525),n(526),n(105),n(168),n(173),n(540),n(174)]},function(e,t,n){"use strict";function r(e,t,r,i){function o(e){if("log"!==e.name&&"nthRoot"!==e.name||2!==e.args.length){for(var t=0;t<e.args.length;++t)e.args[t]=a(0);throw e.compile().eval(),new Error("Expected TypeError, but none found")}}function a(e,n){return new h(p(e,n||t.number))}var s=r(n(47)),u=r(n(106)),c=r(n(59)),l=r(n(67)),f=r(n(38)),p=r(n(144)),h=r(n(65)),d=r(n(78)),m=r(n(66)),g=r(n(77)),v=r(n(60)),y=i("derivative",{"Node, SymbolNode, Object":function(e,t,n){var r={};x(r,e,t.name);var i=w(e,r);return n.simplify?u(i):i},"Node, SymbolNode":function(e,t){return y(e,t,{simplify:!0})},"string, SymbolNode":function(e,t){return y(s(e),t)},"string, SymbolNode, Object":function(e,t,n){return y(s(e),t,n)},"string, string":function(e,t){return y(s(e),s(t))},"string, string, Object":function(e,t,n){return y(s(e),s(t),n)},"Node, string":function(e,t){return y(e,s(t))},"Node, string, Object":function(e,t,n){return y(e,s(t),n)}});y._simplify=!0,y.toTex=function(e){return b.apply(null,e.args)};var b=i("_derivTex",{"Node, SymbolNode":function(t,n){return e.isConstantNode(t)&&"string"===f(t.value)?b(s(t.value).toString(),n.toString(),1):b(t.toString(),n.toString(),1)},"Node, ConstantNode":function(e,t){if("string"===f(t.value))return b(e,s(t.value));throw new Error("The second parameter to 'derivative' is a non-string constant")},"Node, SymbolNode, ConstantNode":function(e,t,n){return b(e.toString(),t.name,n.value)},"string, string, number":function(e,t,n){return(1===n?"{d\\over d"+t+"}":"{d^{"+n+"}\\over d"+t+"^{"+n+"}}")+"\\left["+e+"\\right]"}}),x=i("constTag",{"Object, ConstantNode, string":function(e,t){return e[t]=!0,!0},"Object, SymbolNode, string":function(e,t,n){return t.name!==n&&(e[t]=!0,!0)},"Object, ParenthesisNode, string":function(e,t,n){return x(e,t.content,n)},"Object, FunctionAssignmentNode, string":function(e,t,n){return-1===t.params.indexOf(n)?(e[t]=!0,!0):x(e,t.expr,n)},"Object, FunctionNode | OperatorNode, string":function(e,t,n){if(t.args.length>0){for(var r=x(e,t.args[0],n),i=1;i<t.args.length;++i)r=x(e,t.args[i],n)&&r;if(r)return e[t]=!0,!0}return!1}}),w=i("_derivative",{"ConstantNode, Object":function(e){return a(0)},"SymbolNode, Object":function(e,t){return a(void 0!==t[e]?0:1)},"ParenthesisNode, Object":function(e,t){return new g(w(e.content,t))},"FunctionAssignmentNode, Object":function(e,t){return void 0!==t[e]?a(0):w(e.expr,t)},"FunctionNode, Object":function(e,t){if(1!==e.args.length&&o(e),void 0!==t[e])return a(0);var n=e.args[0],r=void 0,i=!1,s=!1,u=void 0;switch(e.name){case"cbrt":i=!0,u=new m("*","multiply",[a(3),new m("^","pow",[n,new m("/","divide",[a(2),a(3)])])]);break;case"sqrt":case"nthRoot":if(1===e.args.length)i=!0,u=new m("*","multiply",[a(2),new d("sqrt",[n])]);else if(2===e.args.length)return r=new m("/","divide",[a(1),e.args[1]]),t[r]=t[e.args[1]],w(new m("^","pow",[n,r]),t);break;case"log10":r=a(10);case"log":if(r||1!==e.args.length){if(1===e.args.length&&r||2===e.args.length&&void 0!==t[e.args[1]])u=new m("*","multiply",[n.clone(),new d("log",[r||e.args[1]])]),i=!0;else if(2===e.args.length)return w(new m("/","divide",[new d("log",[n]),new d("log",[e.args[1]])]),t)}else u=n.clone(),i=!0;break;case"exp":u=new d("exp",[n.clone()]);break;case"sin":u=new d("cos",[n.clone()]);break;case"cos":u=new m("-","unaryMinus",[new d("sin",[n.clone()])]);break;case"tan":u=new m("^","pow",[new d("sec",[n.clone()]),a(2)]);break;case"sec":u=new m("*","multiply",[e,new d("tan",[n.clone()])]);break;case"csc":s=!0,u=new m("*","multiply",[e,new d("cot",[n.clone()])]);break;case"cot":s=!0,u=new m("^","pow",[new d("csc",[n.clone()]),a(2)]);break;case"asin":i=!0,u=new d("sqrt",[new m("-","subtract",[a(1),new m("^","pow",[n.clone(),a(2)])])]);break;case"acos":i=!0,s=!0,u=new d("sqrt",[new m("-","subtract",[a(1),new m("^","pow",[n.clone(),a(2)])])]);break;case"atan":i=!0,u=new m("+","add",[new m("^","pow",[n.clone(),a(2)]),a(1)]);break;case"asec":i=!0,u=new m("*","multiply",[new d("abs",[n.clone()]),new d("sqrt",[new m("-","subtract",[new m("^","pow",[n.clone(),a(2)]),a(1)])])]);break;case"acsc":i=!0,s=!0,u=new m("*","multiply",[new d("abs",[n.clone()]),new d("sqrt",[new m("-","subtract",[new m("^","pow",[n.clone(),a(2)]),a(1)])])]);break;case"acot":i=!0,s=!0,u=new m("+","add",[new m("^","pow",[n.clone(),a(2)]),a(1)]);break;case"sinh":u=new d("cosh",[n.clone()]);break;case"cosh":u=new d("sinh",[n.clone()]);break;case"tanh":u=new m("^","pow",[new d("sech",[n.clone()]),a(2)]);break;case"sech":s=!0,u=new m("*","multiply",[e,new d("tanh",[n.clone()])]);break;case"csch":s=!0,u=new m("*","multiply",[e,new d("coth",[n.clone()])]);break;case"coth":s=!0,u=new m("^","pow",[new d("csch",[n.clone()]),a(2)]);break;case"asinh":i=!0,u=new d("sqrt",[new m("+","add",[new m("^","pow",[n.clone(),a(2)]),a(1)])]);break;case"acosh":i=!0,u=new d("sqrt",[new m("-","subtract",[new m("^","pow",[n.clone(),a(2)]),a(1)])]);break;case"atanh":i=!0,u=new m("-","subtract",[a(1),new m("^","pow",[n.clone(),a(2)])]);break;case"asech":i=!0,s=!0,u=new m("*","multiply",[n.clone(),new d("sqrt",[new m("-","subtract",[a(1),new m("^","pow",[n.clone(),a(2)])])])]);break;case"acsch":i=!0,s=!0,u=new m("*","multiply",[new d("abs",[n.clone()]),new d("sqrt",[new m("+","add",[new m("^","pow",[n.clone(),a(2)]),a(1)])])]);break;case"acoth":i=!0,s=!0,u=new m("-","subtract",[a(1),new m("^","pow",[n.clone(),a(2)])]);break;case"abs":u=new m("/","divide",[new d(new v("abs"),[n.clone()]),n.clone()]);break;case"gamma":default:throw new Error('Function "'+e.name+'" is not supported by derivative, or a wrong number of arguments is passed')}var c=void 0,l=void 0;i?(c="/",l="divide"):(c="*",l="multiply");var f=w(n,t);return s&&(f=new m("-","unaryMinus",[f])),new m(c,l,[f,u])},"OperatorNode, Object":function(t,n){if(void 0!==n[t])return a(0);if("+"===t.op)return new m(t.op,t.fn,t.args.map(function(e){return w(e,n)}));if("-"===t.op){if(t.isUnary())return new m(t.op,t.fn,[w(t.args[0],n)]);if(t.isBinary())return new m(t.op,t.fn,[w(t.args[0],n),w(t.args[1],n)])}if("*"===t.op){var r=t.args.filter(function(e){return void 0!==n[e]});if(r.length>0){var i=t.args.filter(function(e){return void 0===n[e]}),o=1===i.length?i[0]:new m("*","multiply",i),s=r.concat(w(o,n));return new m("*","multiply",s)}return new m("+","add",t.args.map(function(e){return new m("*","multiply",t.args.map(function(t){return t===e?w(t,n):t.clone()}))}))}if("/"===t.op&&t.isBinary()){var u=t.args[0],f=t.args[1];return void 0!==n[f]?new m("/","divide",[w(u,n),f]):void 0!==n[u]?new m("*","multiply",[new m("-","unaryMinus",[u]),new m("/","divide",[w(f,n),new m("^","pow",[f.clone(),a(2)])])]):new m("/","divide",[new m("-","subtract",[new m("*","multiply",[w(u,n),f.clone()]),new m("*","multiply",[u.clone(),w(f,n)])]),new m("^","pow",[f.clone(),a(2)])])}if("^"===t.op&&t.isBinary()){var p=t.args[0],h=t.args[1];if(void 0!==n[p])return e.isConstantNode(p)&&(l(p.value)||c(p.value,1))?a(0):new m("*","multiply",[t,new m("*","multiply",[new d("log",[p.clone()]),w(h.clone(),n)])]);if(void 0!==n[h]){if(e.isConstantNode(h)){if(l(h.value))return a(0);if(c(h.value,1))return w(p,n)}var g=new m("^","pow",[p.clone(),new m("-","subtract",[h,a(1)])]);return new m("*","multiply",[h.clone(),new m("*","multiply",[w(p,n),g])])}return new m("*","multiply",[new m("^","pow",[p.clone(),h.clone()]),new m("+","add",[new m("*","multiply",[w(p,n),new m("/","divide",[h.clone(),p.clone()])]),new m("*","multiply",[w(h,n),new d("log",[p.clone()])])])])}throw new Error('Operator "'+t.op+'" is not supported by derivative, or a wrong number of arguments is passed')}});return y}t.name="derivative",t.factory=r},function(e,t,n){"use strict";function r(e,t,n,r,i){function o(t,n){if(!n)return t;if(e.isSymbolNode(t)){var r=n[t.name];if(r instanceof a)return o(r,n);if("number"===typeof r)return i.parse(String(r))}else{if(e.isOperatorNode(t)){var l=t.args.map(function(e){return o(e,n)});return new s(t.op,t.fn,l)}if(e.isParenthesisNode(t))return new c(o(t.content,n));if(e.isFunctionNode(t)){var f=t.args.map(function(e){return o(e,n)});return new u(t.name,f)}}return t}var a=i.expression.node.Node,s=i.expression.node.OperatorNode,u=i.expression.node.FunctionNode,c=i.expression.node.ParenthesisNode;return o}t.math=!0,t.name="resolve",t.path="algebra.simplify",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,i){function o(e,t,n){function r(e){var t=e.type;if("FunctionNode"===t)throw new p("There is an unsolved function call");if("OperatorNode"===t)if("^"===e.op&&e.isBinary()){if("ConstantNode"!==e.args[1].type||!d.isInteger(parseFloat(e.args[1].value)))throw new p("There is a non-integer exponent");r(e.args[0])}else{if(-1===a.indexOf(e.op))throw new p("Operator "+e.op+" invalid in polynomial expression");for(var n=0;n<e.args.length;n++)r(e.args[n])}else if("SymbolNode"===t){var o=e.name,s=i.indexOf(o);-1===s&&i.push(o)}else if("ParenthesisNode"===t)r(e.content);else if("ConstantNode"!==t)throw new p("type "+t+" is not allowed in polynomial expression")}var i=[],o=c(e,t);n=!!n;var a="+-*"+(n?"/":"");r(o);var s={};return s.expression=o,s.variables=i,s}function a(){var e=[l,{l:"n+n",r:"2*n"},{l:"n+-n",r:"0"},f,{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"}],t=[{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:"-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)"}],n=[{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=[{l:"(n1/(n2/n3))",r:"((n1*n3)/n2)"},{l:"(n1/n2/n3)",r:"(n1/(n2*n3))"}],i={};return i.firstRules=e.concat(t,r),i.distrDivRules=n,i.sucDivRules=r,i.firstRulesAgain=e.concat(t),i.finalRules=[l,{l:"n*-n",r:"-n^2"},{l:"n*n",r:"n^2"},f,{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))"}],i}function s(e,t,n){var r=e.type,i=arguments.length>1;if("OperatorNode"===r&&e.isBinary()){var o=!1,a=void 0;if("^"===e.op&&("ParenthesisNode"!==e.args[0].type&&"OperatorNode"!==e.args[0].type||"ConstantNode"!==e.args[1].type||(a=parseFloat(e.args[1].value),o=a>=2&&d.isInteger(a))),o){if(a>2){var u=e.args[0],c=new g("^","pow",[e.args[0].cloneDeep(),new m(a-1)]);e=new g("*","multiply",[u,c])}else e=new g("*","multiply",[e.args[0],e.args[0].cloneDeep()]);i&&("content"===n?t.content=e:t.args[n]=e)}}if("ParenthesisNode"===r)s(e.content,e,"content");else if("ConstantNode"!==r&&"SymbolNode"!==r)for(var l=0;l<e.args.length;l++)s(e.args[l],e,l);if(!i)return e}function u(e,t){function n(e,r,a){var s=e.type;if("FunctionNode"===s)throw new p("There is an unsolved function call");if("OperatorNode"===s){if(-1==="+-*^".indexOf(e.op))throw new p("Operator "+e.op+" invalid");if(null!==r){if(("unaryMinus"===e.fn||"pow"===e.fn)&&"add"!==r.fn&&"subtract"!==r.fn&&"multiply"!==r.fn)throw new p("Invalid "+e.op+" placing");if(("subtract"===e.fn||"add"===e.fn||"multiply"===e.fn)&&"add"!==r.fn&&"subtract"!==r.fn)throw new p("Invalid "+e.op+" placing");if(("subtract"===e.fn||"add"===e.fn||"unaryMinus"===e.fn)&&0!==a.noFil)throw new p("Invalid "+e.op+" placing")}"^"!==e.op&&"*"!==e.op||(a.fire=e.op);for(var u=0;u<e.args.length;u++)"unaryMinus"===e.fn&&(a.oper="-"),"+"!==e.op&&"subtract"!==e.fn||(a.fire="",a.cte=1,a.oper=0===u?"+":e.op),a.noFil=u,n(e.args[u],e,a)}else if("SymbolNode"===s){if(e.name!==o&&""!==o)throw new p("There is more than one variable");if(o=e.name,null===r)return void(t[1]=1);if("^"===r.op&&0!==a.noFil)throw new p("In power the variable should be the first parameter");if("*"===r.op&&1!==a.noFil)throw new p("In multiply the variable should be the second parameter");""!==a.fire&&"*"!==a.fire||(i<1&&(t[1]=0),t[1]+=a.cte*("+"===a.oper?1:-1),i=Math.max(1,i))}else{if("ConstantNode"!==s)throw new p("Type "+s+" is not allowed");var c=parseFloat(e.value);if(null===r)return void(t[0]=c);if("^"===r.op){if(1!==a.noFil)throw new p("Constant cannot be powered");if(!d.isInteger(c)||c<=0)throw new p("Non-integer exponent is not allowed");for(var l=i+1;l<c;l++)t[l]=0;return c>i&&(t[c]=0),t[c]+=a.cte*("+"===a.oper?1:-1),void(i=Math.max(c,i))}a.cte=c,""===a.fire&&(t[0]+=a.cte*("+"===a.oper?1:-1))}}void 0===t&&(t=[]),t[0]=0;var r={};r.cte=1,r.oper="+",r.fire="";var i=0,o="";n(e,null,r),i=t.length-1;for(var a=!0,s=void 0,u=i;u>=0;u--)if(0!==t[u]){var c=new m(a?t[u]:Math.abs(t[u])),l=t[u]<0?"-":"+";if(u>0){var f=new v(o);if(u>1){var h=new m(u);f=new g("^","pow",[f,h])}c=-1===t[u]&&a?new g("-","unaryMinus",[f]):1===Math.abs(t[u])?f:new g("*","multiply",[c,f])}s=a?c:"+"===l?new g("+","add",[s,c]):new g("-","subtract",[s,c]),a=!1}return a?new m(0):s}var c=r(n(106)),l=r(n(165)),f=r(n(163)),p=n(56),h=r(n(156)),d=n(3),m=r(n(65)),g=r(n(66)),v=r(n(60)),y=i("rationalize",{string:function(e){return y(h(e),{},!1)},"string, boolean":function(e,t){return y(h(e),{},t)},"string, Object":function(e,t){return y(h(e),t,!1)},"string, Object, boolean":function(e,t,n){return y(h(e),t,n)},Node:function(e){return y(e,{},!1)},"Node, boolean":function(e,t){return y(e,{},t)},"Node, Object":function(e,t){return y(e,t,!1)},"Node, Object, boolean":function(e,t,n){var r=o(e,t,!0),i=r.variables.length;if(e=r.expression,i>=1){var l=a();e=s(e);var f=!0,p="",h=void 0,d=void 0,m=!0;for(e=c(e,l.firstRules),p=e.toString();;){if(d=m?l.distrDivRules:l.sucDivRules,e=c(e,d),m=!m,(p=e.toString())===h)break;f=!0,h=p}f&&(e=c(e,l.firstRulesAgain)),e=c(e,l.finalRules)}var g=[],v={};return"OperatorNode"===e.type&&e.isBinary()&&"/"===e.op?(1===i&&(e.args[0]=u(e.args[0],g),e.args[1]=u(e.args[1])),n&&(v.numerator=e.args[0],v.denominator=e.args[1])):(1===i&&(e=u(e,g)),n&&(v.numerator=e,v.denominator=null)),n?(v.coefficients=g,v.variables=r.variables,v.expression=e,v):e}});return y}t.name="rationalize",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,i){function o(e){var t=e._size[0],n=e._size[1],r=c([t],"dense"),i=r._data,o=e.clone(),a=o._data,s=void 0,x=void 0,w=void 0,N=u([t],"");for(w=0;w<Math.min(n,t);++w){var E=a[w][w],C=m(p(E)),S=d(C),M=0;for(s=w;s<t;s++)M=g(M,y(a[s][w],d(a[s][w])));var T=y(C,h(M));if(!l(T)){var O=b(E,T);for(N[w]=1,s=w+1;s<t;s++)N[s]=v(a[s][w],O);var k=m(d(v(O,T))),A=void 0;for(x=w;x<n;x++){for(A=0,s=w;s<t;s++)A=g(A,y(d(N[s]),a[s][x]));for(A=y(A,k),s=w;s<t;s++)a[s][x]=y(b(a[s][x],y(N[s],A)),S)}for(s=0;s<t;s++){for(A=0,x=w;x<t;x++)A=g(A,y(i[s][x],N[x]));for(A=y(A,k),x=w;x<t;++x)i[s][x]=v(b(i[s][x],y(A,d(N[x]))),S)}}}for(s=0;s<t;++s)for(x=0;x<s&&x<n;++x){if(f(0,v(a[s][x],1e5)))throw new Error("math.qr(): unknown error - R is not lower triangular (element ("+s+", "+x+")  = "+a[s][x]+")");a[s][x]=y(a[s][x],0)}return{Q:r,R:o,toString:function(){return"Q: "+this.Q.toString()+"\nR: "+this.R.toString()}}}function a(e){throw new Error("qr not implemented for sparse matrices yet")}var s=r(n(1)),u=r(n(46)),c=r(n(58)),l=r(n(67)),f=r(n(166)),p=r(n(167)),h=r(n(51)),d=r(n(82)),m=r(n(37)),g=r(n(18)),v=r(n(14)),y=r(n(23)),b=r(n(16));return i("qr",{DenseMatrix:function(e){return o(e)},SparseMatrix:function(e){return a(e)},Array:function(e){var t=s(e),n=o(t);return{Q:n.Q.valueOf(),R:n.R.valueOf()}}})}t.name="qr",t.factory=r},function(e,t,n){"use strict";function r(e,t,r){function i(e,t){var n=e._ptr,r=e._index,i=e._size,o=i[0],a=i[1];t.pinv=[],t.leftmost=[];var s=t.parent,u=t.pinv,c=t.leftmost,l=[],f=o,p=o+a,h=o+2*a,d=void 0,m=void 0,g=void 0,v=void 0,y=void 0;for(m=0;m<a;m++)l[f+m]=-1,l[p+m]=-1,l[h+m]=0;for(d=0;d<o;d++)c[d]=-1;for(m=a-1;m>=0;m--)for(v=n[m],y=n[m+1],g=v;g<y;g++)c[r[g]]=m;for(d=o-1;d>=0;d--)u[d]=-1,-1!==(m=c[d])&&(0===l[h+m]++&&(l[p+m]=d),l[0+d]=l[f+m],l[f+m]=d);for(t.lnz=0,t.m2=o,m=0;m<a;m++)if(d=l[f+m],t.lnz++,d<0&&(d=t.m2++),u[d]=m,!(--h[m]<=0)){t.lnz+=l[h+m];var b=s[m];-1!==b&&(0===l[h+b]&&(l[p+b]=l[p+m]),l[0+l[p+m]]=l[f+b],l[f+b]=l[0+d],l[h+b]+=l[h+m])}for(d=0;d<o;d++)u[d]<0&&(u[d]=m++);return!0}var o=r(n(528)),a=r(n(530)),s=r(n(531)),u=r(n(532)),c=r(n(533));return function(e,t,n){var r=t._ptr,l=t._size,f=l[1],p=void 0,h={};if(h.q=o(e,t),e&&!h.q)return null;if(n){var d=e?a(t,null,h.q,0):t;h.parent=s(d,1);var m=u(h.parent,f);if(h.cp=c(d,h.parent,m,1),d&&h.parent&&h.cp&&i(d,h))for(h.unz=0,p=0;p<f;p++)h.unz+=h.cp[p]}else h.unz=4*r[f]+f,h.lnz=h.unz;return h}}t.name="csSqr",t.path="algebra.sparse",t.factory=r},function(e,t,n){"use strict";function r(e,t,r){function i(e,t,n,r,i){var o=d(t);if(1===e&&r===n)return p(t,o);if(2===e){for(var a=o._index,s=o._ptr,u=0,c=0;c<n;c++){var l=s[c];if(s[c]=u,!(s[c+1]-l>i))for(var f=s[c+1];l<f;l++)a[u++]=a[l]}return s[n]=u,t=d(o),h(o,t)}return h(o,t)}function o(e,t,n,r,i,o,a,u,c,l,f,p){for(var h=0;h<e;h++)n[r+h]=t[h+1]-t[h];n[r+e]=0;for(var d=0;d<=e;d++)n[i+d]=-1,o[d]=-1,n[a+d]=-1,n[u+d]=-1,n[c+d]=1,n[l+d]=1,n[f+d]=0,n[p+d]=n[r+d];var m=s(0,0,n,l,e);return n[f+e]=-2,t[e]=-1,n[l+e]=0,m}function a(e,t,n,r,i,o,a,s,u,l,f){for(var p=0,h=0;h<e;h++){var d=n[r+h];if(0===d)n[i+h]=-2,p++,t[h]=-1,n[o+h]=0;else if(d>a)n[s+h]=0,n[i+h]=-1,p++,t[h]=c(e),n[s+e]++;else{var m=n[u+d];-1!==m&&(l[m]=h),n[f+h]=n[u+d],n[u+d]=h}}return p}function s(e,t,n,r,i){if(e<2||e+t<0){for(var o=0;o<i;o++)0!==n[r+o]&&(n[r+o]=1);e=2}return e}function u(e,t){return e!==t}var c=r(n(107)),l=r(n(529)),f=r(n(169)),p=r(n(15)),h=r(n(10)),d=r(n(83));return function(e,t){if(!t||e<=0||e>3)return null;var n=t._size,r=n[0],p=n[1],h=0,d=Math.max(16,10*Math.sqrt(p));d=Math.min(p-2,d);var m=i(e,t,r,p,d);l(m,u,null);for(var g=m._index,v=m._ptr,y=v[p],b=[],x=[],w=p+1,N=2*(p+1),E=3*(p+1),C=4*(p+1),S=5*(p+1),M=6*(p+1),T=7*(p+1),O=b,k=o(p,v,x,0,E,O,N,T,w,M,C,S),A=a(p,v,x,S,C,M,d,w,E,O,N),_=0,P=void 0,R=void 0,I=void 0,F=void 0,D=void 0,L=void 0,B=void 0,z=void 0,j=void 0,U=void 0,q=void 0,H=void 0,W=void 0,V=void 0,G=void 0,$=void 0;A<p;){for(I=-1;_<p&&-1===(I=x[E+_]);_++);-1!==x[N+I]&&(O[x[N+I]]=-1),x[E+_]=x[N+I];var Y=x[C+I],X=x[w+I];A+=X;var K=0;x[w+I]=-X;var Z=v[I],J=0===Y?Z:y,Q=J;for(F=1;F<=Y+1;F++){for(F>Y?(L=I,B=Z,z=x[0+I]-Y):(L=g[Z++],B=v[L],z=x[0+L]),D=1;D<=z;D++)P=g[B++],(j=x[w+P])<=0||(K+=j,x[w+P]=-j,g[Q++]=P,-1!==x[N+P]&&(O[x[N+P]]=O[P]),-1!==O[P]?x[N+O[P]]=x[N+P]:x[E+x[S+P]]=x[N+P]);L!==I&&(v[L]=c(I),x[M+L]=0)}for(0!==Y&&(y=Q),x[S+I]=K,v[I]=J,x[0+I]=Q-J,x[C+I]=-2,k=s(k,h,x,M,p),U=J;U<Q;U++)if(P=g[U],!((q=x[C+P])<=0)){j=-x[w+P];var ee=k-j;for(Z=v[P],H=v[P]+q-1;Z<=H;Z++)L=g[Z],x[M+L]>=k?x[M+L]-=j:0!==x[M+L]&&(x[M+L]=x[S+L]+ee)}for(U=J;U<Q;U++){for(P=g[U],H=v[P],W=H+x[C+P]-1,V=H,G=0,$=0,Z=H;Z<=W;Z++)if(L=g[Z],0!==x[M+L]){var te=x[M+L]-k;te>0?($+=te,g[V++]=L,G+=L):(v[L]=c(I),x[M+L]=0)}x[C+P]=V-H+1;var ne=V,re=H+x[0+P];for(Z=W+1;Z<re;Z++){R=g[Z];var ie=x[w+R];ie<=0||($+=ie,g[V++]=R,G+=R)}0===$?(v[P]=c(I),j=-x[w+P],K-=j,X+=j,A+=j,x[w+P]=0,x[C+P]=-1):(x[S+P]=Math.min(x[S+P],$),g[V]=g[ne],g[ne]=g[H],g[H]=I,x[0+P]=V-H+1,G=(G<0?-G:G)%p,x[N+P]=x[T+G],x[T+G]=P,O[P]=G)}for(x[S+I]=K,h=Math.max(h,K),k=s(k+h,h,x,M,p),U=J;U<Q;U++)if(P=g[U],!(x[w+P]>=0))for(G=O[P],P=x[T+G],x[T+G]=-1;-1!==P&&-1!==x[N+P];P=x[N+P],k++){for(z=x[0+P],q=x[C+P],Z=v[P]+1;Z<=v[P]+z-1;Z++)x[M+g[Z]]=k;var oe=P;for(R=x[N+P];-1!==R;){var ae=x[0+R]===z&&x[C+R]===q;for(Z=v[R]+1;ae&&Z<=v[R]+z-1;Z++)x[M+g[Z]]!==k&&(ae=0);ae?(v[R]=c(P),x[w+P]+=x[w+R],x[w+R]=0,x[C+R]=-1,R=x[N+R],x[N+oe]=R):(oe=R,R=x[N+R])}}for(Z=J,U=J;U<Q;U++)P=g[U],(j=-x[w+P])<=0||(x[w+P]=j,$=x[S+P]+K-j,$=Math.min($,p-A-j),-1!==x[E+$]&&(O[x[E+$]]=P),x[N+P]=x[E+$],O[P]=-1,x[E+$]=P,_=Math.min(_,$),x[S+P]=$,g[Z++]=P);x[w+I]=X,0===(x[0+I]=Z-J)&&(v[I]=-1,x[M+I]=0),0!==Y&&(y=Z)}for(P=0;P<p;P++)v[P]=c(v[P]);for(R=0;R<=p;R++)x[E+R]=-1;for(R=p;R>=0;R--)x[w+R]>0||(x[N+R]=x[E+v[R]],x[E+v[R]]=R);for(L=p;L>=0;L--)x[w+L]<=0||-1!==v[L]&&(x[N+L]=x[E+v[L]],x[E+v[L]]=L);for(I=0,P=0;P<=p;P++)-1===v[P]&&(I=f(P,I,x,E,N,b,M));return b.splice(b.length-1,1),b}}t.name="csAmd",t.path="algebra.sparse",t.factory=r},function(e,t,n){"use strict";function r(){return function(e,t,n){for(var r=e._values,i=e._index,o=e._ptr,a=e._size,s=a[1],u=0,c=0;c<s;c++){var l=o[c];for(o[c]=u;l<o[c+1];l++)t(i[l],c,r?r[l]:1,n)&&(i[u]=i[l],r&&(r[u]=r[l]),u++)}return o[s]=u,i.splice(u,i.length-u),r&&r.splice(u,r.length-u),u}}t.name="csFkeep",t.path="algebra.sparse",t.factory=r},function(e,t,n){"use strict";function r(e){var t=e.SparseMatrix;return function(e,n,r,i){for(var o=e._values,a=e._index,s=e._ptr,u=e._size,c=e._datatype,l=u[0],f=u[1],p=i&&e._values?[]:null,h=[],d=[],m=0,g=0;g<f;g++){d[g]=m;for(var v=r?r[g]:g,y=s[v],b=s[v+1],x=y;x<b;x++){var w=n?n[a[x]]:a[x];h[m]=w,p&&(p[m]=o[x]),m++}}return d[f]=m,new t({values:p,index:h,ptr:d,size:[l,f],datatype:c})}}t.name="csPermute",t.path="algebra.sparse",t.factory=r},function(e,t,n){"use strict";function r(){return function(e,t){if(!e)return null;var n=e._index,r=e._ptr,i=e._size,o=i[0],a=i[1],s=[],u=[],c=a,l=void 0,f=void 0;if(t)for(l=0;l<o;l++)u[c+l]=-1;for(var p=0;p<a;p++){s[p]=-1,u[0+p]=-1;for(var h=r[p],d=r[p+1],m=h;m<d;m++){var g=n[m];for(l=t?u[c+g]:g;-1!==l&&l<p;l=f)f=u[0+l],u[0+l]=p,-1===f&&(s[l]=p);t&&(u[c+g]=p)}}return s}}t.name="csEtree",t.path="algebra.sparse",t.factory=r},function(e,t,n){"use strict";function r(e,t,r){var i=r(n(169));return function(e,t){if(!e)return null;var n=0,r=void 0,o=[],a=[],s=t,u=2*t;for(r=0;r<t;r++)a[0+r]=-1;for(r=t-1;r>=0;r--)-1!==e[r]&&(a[s+r]=a[0+e[r]],a[0+e[r]]=r);for(r=0;r<t;r++)-1===e[r]&&(n=i(r,n,a,0,s,o,u));return o}}t.name="csPost",t.path="algebra.sparse",t.factory=r},function(e,t,n){"use strict";function r(e,t,r){var i=r(n(83)),o=r(n(534));return function(e,t,n,r){if(!e||!t||!n)return null;var a=e._size,s=a[0],u=a[1],c=void 0,l=void 0,f=void 0,p=void 0,h=void 0,d=void 0,m=void 0,g=4*u+(r?u+s+1:0),v=[],y=u,b=2*u,x=3*u,w=4*u,N=5*u+1;for(f=0;f<g;f++)v[f]=-1;var E=[],C=i(e),S=C._index,M=C._ptr;for(f=0;f<u;f++)for(l=n[f],E[l]=-1===v[x+l]?1:0;-1!==l&&-1===v[x+l];l=t[l])v[x+l]=f;if(r){for(f=0;f<u;f++)v[n[f]]=f;for(c=0;c<s;c++){for(f=u,d=M[c],m=M[c+1],h=d;h<m;h++)f=Math.min(f,v[S[h]]);v[N+c]=v[w+f],v[w+f]=c}}for(c=0;c<u;c++)v[0+c]=c;for(f=0;f<u;f++){for(l=n[f],-1!==t[l]&&E[t[l]]--,p=r?v[w+f]:l;-1!==p;p=r?v[N+p]:-1)for(h=M[p];h<M[p+1];h++){c=S[h];var T=o(c,l,v,x,y,b,0);T.jleaf>=1&&E[l]++,2===T.jleaf&&E[T.q]--}-1!==t[l]&&(v[0+l]=t[l])}for(l=0;l<u;l++)-1!==t[l]&&(E[t[l]]+=E[l]);return E}}t.name="csCounts",t.path="algebra.sparse",t.factory=r},function(e,t,n){"use strict";function r(){return function(e,t,n,r,i,o,a){var s=void 0,u=void 0,c=void 0,l=0,f=void 0;if(e<=t||n[r+t]<=n[i+e])return-1;if(n[i+e]=n[r+t],c=n[o+e],n[o+e]=t,-1===c)l=1,f=e;else{for(l=2,f=c;f!==n[a+f];f=n[a+f]);for(s=c;s!==f;s=u)u=n[a+s],n[a+s]=f}return{jleaf:l,q:f}}}t.name="csLeaf",t.path="algebra.sparse",t.factory=r},function(e,t,n){"use strict";function r(e,t,r){var i=r(n(25)),o=r(n(14)),a=r(n(10)),s=r(n(36)),u=r(n(170)),c=r(n(536)),l=e.SparseMatrix;return function(e,t,n){if(!e)return null;var r=e._size,f=r[1],p=void 0,h=100,d=100;t&&(p=t.q,h=t.lnz||h,d=t.unz||d);var m=[],g=[],v=[],y=new l({values:m,index:g,ptr:v,size:[f,f]}),b=[],x=[],w=[],N=new l({values:b,index:x,ptr:w,size:[f,f]}),E=[],C=void 0,S=void 0,M=[],T=[];for(C=0;C<f;C++)M[C]=0,E[C]=-1,v[C+1]=0;h=0,d=0;for(var O=0;O<f;O++){v[O]=h,w[O]=d;var k=p?p[O]:O,A=c(y,e,k,T,M,E,1),_=-1,P=-1;for(S=A;S<f;S++)if(C=T[S],E[C]<0){var R=i(M[C]);s(R,P)&&(P=R,_=C)}else x[d]=E[C],b[d++]=M[C];if(-1===_||P<=0)return null;E[k]<0&&u(i(M[k]),a(P,n))&&(_=k);var I=M[_];for(x[d]=O,b[d++]=I,E[_]=O,g[h]=_,m[h++]=1,S=A;S<f;S++)C=T[S],E[C]<0&&(g[h]=C,m[h++]=o(M[C],I)),M[C]=0}for(v[f]=h,w[f]=d,S=0;S<h;S++)g[S]=E[g[S]];return m.splice(h,m.length-h),g.splice(h,g.length-h),b.splice(d,b.length-d),x.splice(d,x.length-d),{L:y,U:N,pinv:E}}}t.name="csLu",t.path="algebra.sparse",t.factory=r},function(e,t,n){"use strict";function r(e,t,r){var i=r(n(14)),o=r(n(10)),a=r(n(16)),s=r(n(537));return function(e,t,n,r,u,c,l){var f=e._values,p=e._index,h=e._ptr,d=e._size,m=d[1],g=t._values,v=t._index,y=t._ptr,b=void 0,x=void 0,w=void 0,N=void 0,E=s(e,t,n,r,c);for(b=E;b<m;b++)u[r[b]]=0;for(x=y[n],w=y[n+1],b=x;b<w;b++)u[v[b]]=g[b];for(var C=E;C<m;C++){var S=r[C],M=c?c[S]:S;if(!(M<0))for(x=h[M],w=h[M+1],u[S]=i(u[S],f[l?x:w-1]),b=l?x+1:x,N=l?w:w-1;b<N;b++){var T=p[b];u[T]=a(u[T],o(f[b],u[S]))}}return E}}t.name="csSpsolve",t.path="algebra.sparse",t.factory=r},function(e,t,n){"use strict";function r(e,t,r){var i=r(n(538)),o=r(n(171)),a=r(n(172));return function(e,t,n,r,s){var u=e._ptr,c=e._size,l=t._index,f=t._ptr,p=c[1],h=void 0,d=void 0,m=void 0,g=p;for(d=f[n],m=f[n+1],h=d;h<m;h++){var v=l[h];o(u,v)||(g=i(v,e,g,r,s))}for(h=g;h<p;h++)a(u,r[h]);return g}}t.name="csReach",t.path="algebra.sparse",t.factory=r},function(e,t,n){"use strict";function r(e,t,r){var i=r(n(171)),o=r(n(172)),a=r(n(539));return function(e,t,n,r,s){var u=t._index,c=t._ptr,l=t._size,f=l[1],p=void 0,h=void 0,d=void 0,m=0;for(r[0]=e;m>=0;){e=r[m];var g=s?s[e]:e;i(c,e)||(o(c,e),r[f+m]=g<0?0:a(c[g]));var v=1;for(h=r[f+m],d=g<0?0:a(c[g+1]);h<d;h++)if(p=u[h],!i(c,p)){r[f+m]=h,r[++m]=p,v=0;break}v&&(m--,r[--n]=e)}return n}}t.name="csDfs",t.path="algebra.sparse",t.factory=r},function(e,t,n){"use strict";function r(e,t,r){var i=r(n(107));return function(e){return e<0?i(e):e}}t.name="csUnflip",t.path="algebra.sparse",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,o){function a(e,t,n,r,i){e=m(e),t=m(t),i=f(e,i,!1),n&&(i._data=l(n,i._data));var o=h(e,i),a=p(t,o);return r&&(a._data=l(r,a._data)),a}var s=r(n(1)),u=r(n(105)),c=r(n(168)),l=r(n(541)),f=r(n(108)),p=r(n(174)),h=r(n(173)),d=o("lusolve",{"Array, Array | Matrix":function(e,t){e=s(e);var n=u(e);return a(n.L,n.U,n.p,null,t).valueOf()},"DenseMatrix, Array | Matrix":function(e,t){var n=u(e);return a(n.L,n.U,n.p,null,t)},"SparseMatrix, Array | Matrix":function(e,t){var n=u(e);return a(n.L,n.U,n.p,null,t)},"SparseMatrix, Array | Matrix, number, number":function(e,t,n,r){var i=c(e,n,r);return a(i.L,i.U,i.p,i.q,t)},"Object, Array | Matrix":function(e,t){return a(e.L,e.U,e.p,e.q,t)}}),m=function(t){if(e.isMatrix(t))return t;if(i(t))return s(t);throw new TypeError("Invalid Matrix LU decomposition")};return d}var i=Array.isArray;t.name="lusolve",t.factory=r},function(e,t,n){"use strict";function r(){function e(e,t){var n=void 0,r=t.length,i=[];if(e)for(n=0;n<r;n++)i[e[n]]=t[n];else for(n=0;n<r;n++)i[n]=t[n];return i}return e}t.name="csIpvec",t.path="algebra.sparse",t.factory=r},function(e,t,n){"use strict";e.exports=[n(25),n(15),n(18),n(543),n(544),n(545),n(50),n(175),n(546),n(547),n(548),n(549),n(138),n(550),n(551),n(552),n(553),n(109),n(555),n(556),n(557),n(558),n(10),n(559),n(560),n(561),n(45),n(139),n(167),n(51),n(562),n(16),n(37),n(563),n(564)]},function(e,t,n){"use strict";function r(e,t,r,a){function s(n,r){var i=n.arg()/3,a=n.abs(),s=new e.Complex(o(a),0).mul(new e.Complex(0,i).exp());if(r){var u=[s,new e.Complex(o(a),0).mul(new e.Complex(0,i+2*Math.PI/3).exp()),new e.Complex(o(a),0).mul(new e.Complex(0,i-2*Math.PI/3).exp())];return"Array"===t.matrix?u:f(u)}return s}function u(t){if(t.value&&e.isComplex(t.value)){var n=t.clone();return n.value=1,n=n.pow(1/3),n.value=s(t.value),n}var r=l(t.value);r&&(t.value=c(t.value));var i=void 0;i=e.isBigNumber(t.value)?new e.BigNumber(1).div(3):e.isFraction(t.value)?new e.Fraction(1,3):1/3;var o=t.pow(i);return r&&(o.value=c(o.value)),o}var c=r(n(37)),l=r(n(68)),f=r(n(1)),p=a("cbrt",{number:o,Complex:s,"Complex, boolean":s,BigNumber:function(e){return e.cbrt()},Unit:u,"Array | Matrix":function(e){return i(e,p,!0)}});return p.toTex={1:"\\sqrt[3]{${args[0]}}"},p}var i=n(0),o=Math.cbrt||function(e){if(0===e)return e;var t=e<0,n=void 0;return t&&(e=-e),isFinite(e)?(n=Math.exp(Math.log(e)/3),n=(e/(n*n)+2*n)/3):n=e,t?-n:n};t.name="cbrt",t.factory=r},function(e,t,n){"use strict";function r(e,t,n,r){var o=r("ceil",{number:Math.ceil,Complex:function(e){return e.ceil()},BigNumber:function(e){return e.ceil()},Fraction:function(e){return e.ceil()},"Array | Matrix":function(e){return i(e,o,!0)}});return o.toTex={1:"\\left\\lceil${args[0]}\\right\\rceil"},o}var i=n(0);t.name="ceil",t.factory=r},function(e,t,n){"use strict";function r(e,t,n,r){var o=r("cube",{number:function(e){return e*e*e},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 i(e,o,!0)},Unit:function(e){return e.pow(3)}});return o.toTex={1:"\\left(${args[0]}\\right)^3"},o}var i=n(0);t.name="cube",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,i){var o=r(n(1)),a=r(n(23)),s=n(4),u=r(n(27)),c=r(n(176)),l=r(n(21)),f=r(n(8)),p=r(n(6)),h=i("dotMultiply",{"any, any":a,"SparseMatrix, SparseMatrix":function(e,t){return c(e,t,a,!1)},"SparseMatrix, DenseMatrix":function(e,t){return u(t,e,a,!0)},"DenseMatrix, SparseMatrix":function(e,t){return u(e,t,a,!1)},"DenseMatrix, DenseMatrix":function(e,t){return f(e,t,a)},"Array, Array":function(e,t){return h(o(e),o(t)).valueOf()},"Array, Matrix":function(e,t){return h(o(e),t)},"Matrix, Array":function(e,t){return h(e,o(t))},"SparseMatrix, any":function(e,t){return l(e,t,a,!1)},"DenseMatrix, any":function(e,t){return p(e,t,a,!1)},"any, SparseMatrix":function(e,t){return l(t,e,a,!0)},"any, DenseMatrix":function(e,t){return p(t,e,a,!0)},"Array, any":function(e,t){return p(o(e),t,a,!1).valueOf()},"any, Array":function(e,t){return p(o(t),e,a,!0).valueOf()}});return h.toTex={2:"\\left(${args[0]}"+s.operators.dotMultiply+"${args[1]}\\right)"},h}t.name="dotMultiply",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,i){var o=r(n(1)),a=r(n(45)),s=n(4),u=r(n(19)),c=r(n(29)),l=r(n(21)),f=r(n(20)),p=r(n(8)),h=r(n(6)),d=i("dotPow",{"any, any":a,"SparseMatrix, SparseMatrix":function(e,t){return c(e,t,a,!1)},"SparseMatrix, DenseMatrix":function(e,t){return u(t,e,a,!0)},"DenseMatrix, SparseMatrix":function(e,t){return u(e,t,a,!1)},"DenseMatrix, DenseMatrix":function(e,t){return p(e,t,a)},"Array, Array":function(e,t){return d(o(e),o(t)).valueOf()},"Array, Matrix":function(e,t){return d(o(e),t)},"Matrix, Array":function(e,t){return d(e,o(t))},"SparseMatrix, any":function(e,t){return l(e,t,d,!1)},"DenseMatrix, any":function(e,t){return h(e,t,d,!1)},"any, SparseMatrix":function(e,t){return f(t,e,d,!0)},"any, DenseMatrix":function(e,t){return h(t,e,d,!0)},"Array, any":function(e,t){return h(o(e),t,d,!1).valueOf()},"any, Array":function(e,t){return h(o(t),e,d,!0).valueOf()}});return d.toTex={2:"\\left(${args[0]}"+s.operators.dotPow+"${args[1]}\\right)"},d}t.name="dotPow",t.factory=r},function(e,t,n){"use strict";function r(e,t,n,r){var o=r("exp",{number:Math.exp,Complex:function(e){return e.exp()},BigNumber:function(e){return e.exp()},"Array | Matrix":function(e){return i(e,o)}});return o.toTex={1:"\\exp\\left(${args[0]}\\right)"},o}var i=n(0);t.name="exp",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,o){function a(e){return e>=2e-4||e<=-2e-4?Math.exp(e)-1:e+e*e/2+e*e*e/6}var s=n(4),u=o("expm1",{number:Math.expm1||a,Complex:function(t){var n=Math.exp(t.re);return new e.Complex(n*Math.cos(t.im)-1,n*Math.sin(t.im))},BigNumber:function(e){return e.exp().minus(1)},"Array | Matrix":function(e){return i(e,u)}});return u.toTex="\\left(e"+s.operators.pow+"{${args[0]}}-1\\right)",u}var i=n(0);t.name="expm1",t.factory=r},function(e,t,n){"use strict";function r(e,t,n,r){var o=r("floor",{number:Math.floor,Complex:function(e){return e.floor()},BigNumber:function(e){return e.floor()},Fraction:function(e){return e.floor()},"Array | Matrix":function(e){return i(e,o,!0)}});return o.toTex={1:"\\left\\lfloor${args[0]}\\right\\rfloor"},o}var i=n(0);t.name="floor",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,o){function a(t,n){if(!t.isInt()||!n.isInt())throw new Error("Parameters in function gcd must be integer numbers");for(var r=new e.BigNumber(0);!n.isZero();){var i=t.mod(n);t=n,n=i}return t.lt(r)?t.neg():t}var s=r(n(1)),u=r(n(35)),c=r(n(99)),l=r(n(43)),f=r(n(8)),p=r(n(6)),h=o("gcd",{"number, number":i,"BigNumber, BigNumber":a,"Fraction, Fraction":function(e,t){return e.gcd(t)},"SparseMatrix, SparseMatrix":function(e,t){return c(e,t,h)},"SparseMatrix, DenseMatrix":function(e,t){return u(t,e,h,!0)},"DenseMatrix, SparseMatrix":function(e,t){return u(e,t,h,!1)},"DenseMatrix, DenseMatrix":function(e,t){return f(e,t,h)},"Array, Array":function(e,t){return h(s(e),s(t)).valueOf()},"Array, Matrix":function(e,t){return h(s(e),t)},"Matrix, Array":function(e,t){return h(e,s(t))},"SparseMatrix, number | BigNumber":function(e,t){return l(e,t,h,!1)},"DenseMatrix, number | BigNumber":function(e,t){return p(e,t,h,!1)},"number | BigNumber, SparseMatrix":function(e,t){return l(t,e,h,!0)},"number | BigNumber, DenseMatrix":function(e,t){return p(t,e,h,!0)},"Array, number | BigNumber":function(e,t){return p(s(e),t,h,!1).valueOf()},"number | BigNumber, Array":function(e,t){return p(s(t),e,h,!0).valueOf()},"Array | Matrix | number | BigNumber, Array | Matrix | number | BigNumber, ...Array | Matrix | number | BigNumber":function(e,t,n){for(var r=h(e,t),i=0;i<n.length;i++)r=h(r,n[i]);return r}});return h.toTex="\\gcd\\left(${args}\\right)",h}function i(e,t){if(!o(e)||!o(t))throw new Error("Parameters in function gcd must be integer numbers");for(var n=void 0;0!==t;)n=e%t,e=t,t=n;return e<0?-e:e}var o=n(3).isInteger;t.name="gcd",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,o){function a(e){for(var t=0,n=0,r=0;r<e.length;r++){var i=s(e[r]);p(n,i)?(t=l(t,l(c(n,i),c(n,i))),t=u(t,1),n=i):t=u(t,h(i)?l(c(i,n),c(i,n)):i)}return l(n,f(t))}var s=r(n(25)),u=r(n(18)),c=r(n(14)),l=r(n(23)),f=r(n(51)),p=r(n(44)),h=r(n(84)),d=o("hypot",{"... number | BigNumber":a,Array:function(e){return d.apply(d,i(e))},Matrix:function(e){return d.apply(d,i(e.toArray()))}});return d.toTex="\\hypot\\left(${args}\\right)",d}var i=n(2).flatten;t.name="hypot",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,o){function a(t,n){if(!t.isInt()||!n.isInt())throw new Error("Parameters in function lcm must be integer numbers");if(t.isZero()||n.isZero())return new e.BigNumber(0);for(var r=t.times(n);!n.isZero();){var i=n;n=t.mod(i),t=i}return r.div(t).abs()}var s=r(n(1)),u=r(n(27)),c=r(n(85)),l=r(n(21)),f=r(n(8)),p=r(n(6)),h=o("lcm",{"number, number":i,"BigNumber, BigNumber":a,"Fraction, Fraction":function(e,t){return e.lcm(t)},"SparseMatrix, SparseMatrix":function(e,t){return c(e,t,h)},"SparseMatrix, DenseMatrix":function(e,t){return u(t,e,h,!0)},"DenseMatrix, SparseMatrix":function(e,t){return u(e,t,h,!1)},"DenseMatrix, DenseMatrix":function(e,t){return f(e,t,h)},"Array, Array":function(e,t){return h(s(e),s(t)).valueOf()},"Array, Matrix":function(e,t){return h(s(e),t)},"Matrix, Array":function(e,t){return h(e,s(t))},"SparseMatrix, number | BigNumber":function(e,t){return l(e,t,h,!1)},"DenseMatrix, number | BigNumber":function(e,t){return p(e,t,h,!1)},"number | BigNumber, SparseMatrix":function(e,t){return l(t,e,h,!0)},"number | BigNumber, DenseMatrix":function(e,t){return p(t,e,h,!0)},"Array, number | BigNumber":function(e,t){return p(s(e),t,h,!1).valueOf()},"number | BigNumber, Array":function(e,t){return p(s(t),e,h,!0).valueOf()},"Array | Matrix | number | BigNumber, Array | Matrix | number | BigNumber, ...Array | Matrix | number | BigNumber":function(e,t,n){for(var r=h(e,t),i=0;i<n.length;i++)r=h(r,n[i]);return r}});return h.toTex=void 0,h}function i(e,t){if(!o(e)||!o(t))throw new Error("Parameters in function lcm must be integer numbers");if(0===e||0===t)return 0;for(var n=void 0,r=e*t;0!==t;)n=t,t=e%n,e=n;return Math.abs(r/e)}var o=n(3).isInteger;t.name="lcm",t.factory=r},function(e,t,n){"use strict";e.exports=function(e,t,n,r,i,o,a,s,u,c,l){var f=e._values,p=e._index,h=e._ptr,d=a._index,m=void 0,g=void 0,v=void 0,y=void 0;if(r)for(g=h[t],v=h[t+1],m=g;m<v;m++)y=p[m],n[y]!==o?(n[y]=o,d.push(y),c?(r[y]=u?s(f[m],l):s(l,f[m]),i[y]=o):r[y]=f[m]):(r[y]=u?s(f[m],r[y]):s(r[y],f[m]),i[y]=o);else for(g=h[t],v=h[t+1],m=g;m<v;m++)y=p[m],n[y]!==o?(n[y]=o,d.push(y)):i[y]=o}},function(e,t,n){"use strict";function r(e,t,n,r){var a=r("log10",{number:function(n){return n>=0||t.predictable?o(n):new e.Complex(n,0).log().div(Math.LN10)},Complex:function(t){return new e.Complex(t).log().div(Math.LN10)},BigNumber:function(n){return!n.isNegative()||t.predictable?n.log():new e.Complex(n.toNumber(),0).log().div(Math.LN10)},"Array | Matrix":function(e){return i(e,a)}});return a.toTex={1:"\\log_{10}\\left(${args[0]}\\right)"},a}var i=n(0),o=Math.log10||function(e){return Math.log(e)/Math.LN10};t.name="log10",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,o){function a(n){return n>=-1||t.predictable?Math.log1p?Math.log1p(n):Math.log(n+1):s(new e.Complex(n,0))}function s(t){var n=t.re+1;return new e.Complex(Math.log(Math.sqrt(n*n+t.im*t.im)),Math.atan2(t.im,n))}var u=r(n(14)),c=r(n(109)),l=o("log1p",{number:a,Complex:s,BigNumber:function(n){var r=n.plus(1);return!r.isNegative()||t.predictable?r.ln():s(new e.Complex(n.toNumber(),0))},"Array | Matrix":function(e){return i(e,l)},"any, any":function(e,t){return u(l(e),c(t))}});return l.toTex={1:"\\ln\\left(${args[0]}+1\\right)",2:"\\log_{${args[1]}}\\left(${args[0]}+1\\right)"},l}var i=n(0);t.name="log1p",t.factory=r},function(e,t,n){"use strict";function r(e,t,n,r){function o(t){var n=Math.sqrt(t.re*t.re+t.im*t.im);return new e.Complex(Math.log2?Math.log2(n):Math.log(n)/Math.LN2,Math.atan2(t.im,t.re)/Math.LN2)}var a=r("log2",{number:function(n){return n>=0||t.predictable?Math.log2?Math.log2(n):Math.log(n)/Math.LN2:o(new e.Complex(n,0))},Complex:o,BigNumber:function(n){return!n.isNegative()||t.predictable?n.log(2):o(new e.Complex(n.toNumber(),0))},"Array | Matrix":function(e){return i(e,a)}});return a.toTex="\\log_{2}\\left(${args[0]}\\right)",a}var i=n(0);t.name="log2",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,i){function o(e,t){if(t>0)return e-t*Math.floor(e/t);if(0===t)return e;throw new Error("Cannot calculate mod for a negative divisor")}var a=r(n(1)),s=n(4),u=r(n(27)),c=r(n(19)),l=r(n(76)),f=r(n(21)),p=r(n(20)),h=r(n(8)),d=r(n(6)),m=i("mod",{"number, number":o,"BigNumber, BigNumber":function(e,t){return t.isZero()?e:e.mod(t)},"Fraction, Fraction":function(e,t){return e.mod(t)},"SparseMatrix, SparseMatrix":function(e,t){return l(e,t,m,!1)},"SparseMatrix, DenseMatrix":function(e,t){return u(t,e,m,!0)},"DenseMatrix, SparseMatrix":function(e,t){return c(e,t,m,!1)},"DenseMatrix, DenseMatrix":function(e,t){return h(e,t,m)},"Array, Array":function(e,t){return m(a(e),a(t)).valueOf()},"Array, Matrix":function(e,t){return m(a(e),t)},"Matrix, Array":function(e,t){return m(e,a(t))},"SparseMatrix, any":function(e,t){return f(e,t,m,!1)},"DenseMatrix, any":function(e,t){return d(e,t,m,!1)},"any, SparseMatrix":function(e,t){return p(t,e,m,!0)},"any, DenseMatrix":function(e,t){return d(t,e,m,!0)},"Array, any":function(e,t){return d(a(e),t,m,!1).valueOf()},"any, Array":function(e,t){return d(a(t),e,m,!0).valueOf()}});return m.toTex={2:"\\left(${args[0]}"+s.operators.mod+"${args[1]}\\right)"},m}t.name="mod",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,i){function o(e,t){var n=e.size();if(1===n.length){if(t===Number.POSITIVE_INFINITY||"inf"===t){var r=0;return e.forEach(function(e){var t=a(e);h(t,r)&&(r=t)},!0),r}if(t===Number.NEGATIVE_INFINITY||"-inf"===t){var i=void 0;return e.forEach(function(e){var t=a(e);i&&!d(t,i)||(i=t)},!0),i||0}if("fro"===t)return o(e,2);if("number"===typeof t&&!isNaN(t)){if(!p(t,0)){var m=0;return e.forEach(function(e){m=s(u(a(e),t),m)},!0),u(m,1/t)}return Number.POSITIVE_INFINITY}throw new Error("Unsupported parameter value")}if(2===n.length){if(1===t){var g=[],v=0;return e.forEach(function(e,t){var n=t[1],r=s(g[n]||0,a(e));h(r,v)&&(v=r),g[n]=r},!0),v}if(t===Number.POSITIVE_INFINITY||"inf"===t){var y=[],b=0;return e.forEach(function(e,t){var n=t[0],r=s(y[n]||0,a(e));h(r,b)&&(b=r),y[n]=r},!0),b}if("fro"===t){var x=0;return e.forEach(function(e,t){x=s(x,f(e,c(e)))}),l(x)}if(2===t)throw new Error("Unsupported parameter value, missing implementation of matrix singular value decomposition");throw new Error("Unsupported parameter value")}}var a=r(n(25)),s=r(n(15)),u=r(n(45)),c=r(n(82)),l=r(n(51)),f=r(n(10)),p=r(n(11)),h=r(n(36)),d=r(n(44)),m=r(n(1)),g=i("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 o(m(e),2)},Matrix:function(e){return o(e,2)},"number | Complex | BigNumber | boolean, number | BigNumber | string":function(e){return g(e)},"Array, number | BigNumber | string":function(e,t){return o(m(e),t)},"Matrix, number | BigNumber | string":function(e,t){return o(e,t)}});return g.toTex={1:"\\left\\|${args[0]}\\right\\|",2:void 0},g}t.name="norm",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,o){function a(t,n){var r=e.BigNumber.precision,i=e.BigNumber.clone({precision:r+2}),o=new e.BigNumber(0),a=new i(1),s=n.isNegative();if(s&&(n=n.neg()),n.isZero())throw new Error("Root must be non-zero");if(t.isNegative()&&!n.abs().mod(2).equals(1))throw new Error("Root must be odd when a is negative.");if(t.isZero())return s?new i(1/0):0;if(!t.isFinite())return s?o:t;var u=t.abs().pow(a.div(n));return u=t.isNeg()?u.neg():u,new e.BigNumber((s?a.div(u):u).toPrecision(r))}var s=r(n(1)),u=r(n(35)),c=r(n(27)),l=r(n(85)),f=r(n(21)),p=r(n(8)),h=r(n(6)),d="Complex number not supported in function nthRoot. Use nthRoots instead.",m=o("nthRoot",{number:function(e){return i(e,2)},"number, number":i,BigNumber:function(t){return a(t,new e.BigNumber(2))},Complex:function(e){throw new Error(d)},"Complex, number":function(e,t){throw new Error(d)},"BigNumber, BigNumber":a,"Array | Matrix":function(e){return m(e,2)},"SparseMatrix, SparseMatrix":function(e,t){if(1===t.density())return l(e,t,m);throw new Error("Root must be non-zero")},"SparseMatrix, DenseMatrix":function(e,t){return c(t,e,m,!0)},"DenseMatrix, SparseMatrix":function(e,t){if(1===t.density())return u(e,t,m,!1);throw new Error("Root must be non-zero")},"DenseMatrix, DenseMatrix":function(e,t){return p(e,t,m)},"Array, Array":function(e,t){return m(s(e),s(t)).valueOf()},"Array, Matrix":function(e,t){return m(s(e),t)},"Matrix, Array":function(e,t){return m(e,s(t))},"SparseMatrix, number | BigNumber":function(e,t){return f(e,t,m,!1)},"DenseMatrix, number | BigNumber":function(e,t){return h(e,t,m,!1)},"number | BigNumber, SparseMatrix":function(e,t){if(1===t.density())return f(t,e,m,!0);throw new Error("Root must be non-zero")},"number | BigNumber, DenseMatrix":function(e,t){return h(t,e,m,!0)},"Array, number | BigNumber":function(e,t){return m(s(e),t).valueOf()},"number | BigNumber, Array":function(e,t){return m(e,s(t)).valueOf()}});return m.toTex={2:"\\sqrt[${args[1]}]{${args[0]}}"},m}function i(e,t){var n=t<0;if(n&&(t=-t),0===t)throw new Error("Root must be non-zero");if(e<0&&Math.abs(t)%2!==1)throw new Error("Root must be odd when a is negative.");if(0===e)return n?1/0:0;if(!isFinite(e))return n?0:e;var r=Math.pow(Math.abs(e),1/t);return r=e<0?-r:r,n?1/r:r}t.name="nthRoot",t.factory=r},function(e,t,n){"use strict";function r(e,t,n,r){var o=r("nthRoots",{Complex:function(e){return i(e,2)},"Complex, number":i});return o.toTex={2:"\\{y : $y^{args[1]} = {${args[0]}}\\}"},o}function i(e,t){if(t<0)throw new Error("Root must be greater than zero");if(0===t)throw new Error("Root must be non-zero");if(t%1!==0)throw new Error("Root must be an integer");if(0===e||0===e.abs())return[s(0)];var n="number"===typeof e,r=void 0;(n||0===e.re||0===e.im)&&(r=n?2*+(e<0):0===e.im?2*+(e.re<0):2*+(e.im<0)+1);for(var i=e.arg(),o=e.abs(),a=[],c=Math.pow(o,1/t),l=0;l<t;l++){var f=(r+4*l)/t;f!==Math.round(f)?a.push(s({r:c,phi:(i+2*Math.PI*l)/t})):a.push(u[f%4](c))}return a}var o=n(97),a=n(132),s=o.factory("Complex",{},"",a,{on:function(e,t){}}),u=[function(e){return s(e)},function(e){return s(0,e)},function(e){return s(-e)},function(e){return s(0,-e)}];t.name="nthRoots",t.factory=r},function(e,t,n){"use strict";function r(e,t,n,r){var o=r("square",{number:function(e){return e*e},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 i(e,o,!0)},Unit:function(e){return e.pow(2)}});return o.toTex={1:"\\left(${args[0]}\\right)^2"},o}var i=n(0);t.name="square",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,o){var a=n(4),s=o("unaryPlus",{number:function(e){return e},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 i(e,s,!0)},"boolean | string":function(n){return"BigNumber"===t.number?new e.BigNumber(+n):+n}});return s.toTex={1:a.operators.unaryPlus+"\\left(${args[0]}\\right)"},s}var i=n(0);t.name="unaryPlus",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,o){function a(e,n){var r=void 0,o=void 0,a=void 0,s=0,c=1,l=1,f=0;if(!i(e)||!i(n))throw new Error("Parameters in function xgcd must be integer numbers");for(;n;)o=Math.floor(e/n),a=e-o*n,r=s,s=c-o*s,c=r,r=l,l=f-o*l,f=r,e=n,n=a;var p=void 0;return p=e<0?[-e,-c,-f]:[e,e?c:0,f],"Array"===t.matrix?p:u(p)}function s(n,r){var i=void 0,o=void 0,a=void 0,s=new e.BigNumber(0),c=new e.BigNumber(1),l=s,f=c,p=c,h=s;if(!n.isInt()||!r.isInt())throw new Error("Parameters in function xgcd must be integer numbers");for(;!r.isZero();)o=n.div(r).floor(),a=n.mod(r),i=l,l=f.minus(o.times(l)),f=i,i=p,p=h.minus(o.times(p)),h=i,n=r,r=a;var d=void 0;return d=n.lt(s)?[n.neg(),f.neg(),h.neg()]:[n,n.isZero()?0:f,h],"Array"===t.matrix?d:u(d)}var u=r(n(1)),c=o("xgcd",{"number, number":a,"BigNumber, BigNumber":s});return c.toTex=void 0,c}var i=n(3).isInteger;t.name="xgcd",t.factory=r},function(e,t,n){"use strict";e.exports=[n(566),n(568),n(569),n(571),n(573),n(575),n(577)]},function(e,t,n){"use strict";function r(e,t,r,a){var s=n(4),u=r(n(1)),c=r(n(27)),l=r(n(85)),f=r(n(21)),p=r(n(8)),h=r(n(6)),d=a("bitAnd",{"number, number":function(e,t){if(!i(e)||!i(t))throw new Error("Integers expected in function bitAnd");return e&t},"BigNumber, BigNumber":o,"SparseMatrix, SparseMatrix":function(e,t){return l(e,t,d,!1)},"SparseMatrix, DenseMatrix":function(e,t){return c(t,e,d,!0)},"DenseMatrix, SparseMatrix":function(e,t){return c(e,t,d,!1)},"DenseMatrix, DenseMatrix":function(e,t){return p(e,t,d)},"Array, Array":function(e,t){return d(u(e),u(t)).valueOf()},"Array, Matrix":function(e,t){return d(u(e),t)},"Matrix, Array":function(e,t){return d(e,u(t))},"SparseMatrix, any":function(e,t){return f(e,t,d,!1)},"DenseMatrix, any":function(e,t){return h(e,t,d,!1)},"any, SparseMatrix":function(e,t){return f(t,e,d,!0)},"any, DenseMatrix":function(e,t){return h(t,e,d,!0)},"Array, any":function(e,t){return h(u(e),t,d,!1).valueOf()},"any, Array":function(e,t){return h(u(t),e,d,!0).valueOf()}});return d.toTex={2:"\\left(${args[0]}"+s.operators.bitAnd+"${args[1]}\\right)"},d}var i=n(3).isInteger,o=n(567);t.name="bitAnd",t.factory=r},function(e,t,n){"use strict";var r=n(110);e.exports=function(e,t){if(e.isFinite()&&!e.isInteger()||t.isFinite()&&!t.isInteger())throw new Error("Integers expected in function bitAnd");var n=e.constructor;if(e.isNaN()||t.isNaN())return new n(NaN);if(e.isZero()||t.eq(-1)||e.eq(t))return e;if(t.isZero()||e.eq(-1))return t;if(!e.isFinite()||!t.isFinite()){if(!e.isFinite()&&!t.isFinite())return e.isNegative()===t.isNegative()?e:new n(0);if(!e.isFinite())return t.isNegative()?e:e.isNegative()?new n(0):t;if(!t.isFinite())return e.isNegative()?t:t.isNegative()?new n(0):e}return r(e,t,function(e,t){return e&t})}},function(e,t,n){"use strict";function r(e,t,r,s){var u=n(4),c=s("bitNot",{number:function(e){if(!a(e))throw new Error("Integer expected in function bitNot");return~e},BigNumber:o,"Array | Matrix":function(e){return i(e,c)}});return c.toTex={1:u.operators.bitNot+"\\left(${args[0]}\\right)"},c}var i=n(0),o=n(111),a=n(3).isInteger;t.name="bitNot",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,a){var s=n(4),u=r(n(1)),c=r(n(35)),l=r(n(99)),f=r(n(43)),p=r(n(8)),h=r(n(6)),d=a("bitOr",{"number, number":function(e,t){if(!i(e)||!i(t))throw new Error("Integers expected in function bitOr");return e|t},"BigNumber, BigNumber":o,"SparseMatrix, SparseMatrix":function(e,t){return l(e,t,d)},"SparseMatrix, DenseMatrix":function(e,t){return c(t,e,d,!0)},"DenseMatrix, SparseMatrix":function(e,t){return c(e,t,d,!1)},"DenseMatrix, DenseMatrix":function(e,t){return p(e,t,d)},"Array, Array":function(e,t){return d(u(e),u(t)).valueOf()},"Array, Matrix":function(e,t){return d(u(e),t)},"Matrix, Array":function(e,t){return d(e,u(t))},"SparseMatrix, any":function(e,t){return f(e,t,d,!1)},"DenseMatrix, any":function(e,t){return h(e,t,d,!1)},"any, SparseMatrix":function(e,t){return f(t,e,d,!0)},"any, DenseMatrix":function(e,t){return h(t,e,d,!0)},"Array, any":function(e,t){return h(u(e),t,d,!1).valueOf()},"any, Array":function(e,t){return h(u(t),e,d,!0).valueOf()}});return d.toTex={2:"\\left(${args[0]}"+s.operators.bitOr+"${args[1]}\\right)"},d}var i=n(3).isInteger,o=n(570);t.name="bitOr",t.factory=r},function(e,t,n){"use strict";var r=n(110);e.exports=function(e,t){if(e.isFinite()&&!e.isInteger()||t.isFinite()&&!t.isInteger())throw new Error("Integers expected in function bitOr");var n=e.constructor;if(e.isNaN()||t.isNaN())return new n(NaN);var i=new n(-1);return e.isZero()||t.eq(i)||e.eq(t)?t:t.isZero()||e.eq(i)?e:e.isFinite()&&t.isFinite()?r(e,t,function(e,t){return e|t}):!e.isFinite()&&!e.isNegative()&&t.isNegative()||e.isNegative()&&!t.isNegative()&&!t.isFinite()?i:e.isNegative()&&t.isNegative()?e.isFinite()?e:t:e.isFinite()?t:e}},function(e,t,n){"use strict";function r(e,t,r,a){var s=n(4),u=r(n(1)),c=r(n(19)),l=r(n(29)),f=r(n(20)),p=r(n(8)),h=r(n(6)),d=a("bitXor",{"number, number":function(e,t){if(!i(e)||!i(t))throw new Error("Integers expected in function bitXor");return e^t},"BigNumber, BigNumber":o,"SparseMatrix, SparseMatrix":function(e,t){return l(e,t,d)},"SparseMatrix, DenseMatrix":function(e,t){return c(t,e,d,!0)},"DenseMatrix, SparseMatrix":function(e,t){return c(e,t,d,!1)},"DenseMatrix, DenseMatrix":function(e,t){return p(e,t,d)},"Array, Array":function(e,t){return d(u(e),u(t)).valueOf()},"Array, Matrix":function(e,t){return d(u(e),t)},"Matrix, Array":function(e,t){return d(e,u(t))},"SparseMatrix, any":function(e,t){return f(e,t,d,!1)},"DenseMatrix, any":function(e,t){return h(e,t,d,!1)},"any, SparseMatrix":function(e,t){return f(t,e,d,!0)},"any, DenseMatrix":function(e,t){return h(t,e,d,!0)},"Array, any":function(e,t){return h(u(e),t,d,!1).valueOf()},"any, Array":function(e,t){return h(u(t),e,d,!0).valueOf()}});return d.toTex={2:"\\left(${args[0]}"+s.operators.bitXor+"${args[1]}\\right)"},d}var i=n(3).isInteger,o=n(572);t.name="bitXor",t.factory=r},function(e,t,n){"use strict";var r=n(110),i=n(111);e.exports=function(e,t){if(e.isFinite()&&!e.isInteger()||t.isFinite()&&!t.isInteger())throw new Error("Integers expected in function bitXor");var n=e.constructor;if(e.isNaN()||t.isNaN())return new n(NaN);if(e.isZero())return t;if(t.isZero())return e;if(e.eq(t))return new n(0);var o=new n(-1);return e.eq(o)?i(t):t.eq(o)?i(e):e.isFinite()&&t.isFinite()?r(e,t,function(e,t){return e^t}):e.isFinite()||t.isFinite()?new n(e.isNegative()===t.isNegative()?1/0:-1/0):o}},function(e,t,n){"use strict";function r(e,t,r,a){var s=n(4),u=r(n(1)),c=r(n(11)),l=r(n(46)),f=r(n(35)),p=r(n(27)),h=r(n(112)),d=r(n(43)),m=r(n(21)),g=r(n(8)),v=r(n(6)),y=a("leftShift",{"number, number":function(e,t){if(!i(e)||!i(t))throw new Error("Integers expected in function leftShift");return e<<t},"BigNumber, BigNumber":o,"SparseMatrix, SparseMatrix":function(e,t){return h(e,t,y,!1)},"SparseMatrix, DenseMatrix":function(e,t){return p(t,e,y,!0)},"DenseMatrix, SparseMatrix":function(e,t){return f(e,t,y,!1)},"DenseMatrix, DenseMatrix":function(e,t){return g(e,t,y)},"Array, Array":function(e,t){return y(u(e),u(t)).valueOf()},"Array, Matrix":function(e,t){return y(u(e),t)},"Matrix, Array":function(e,t){return y(e,u(t))},"SparseMatrix, number | BigNumber":function(e,t){return c(t,0)?e.clone():m(e,t,y,!1)},"DenseMatrix, number | BigNumber":function(e,t){return c(t,0)?e.clone():v(e,t,y,!1)},"number | BigNumber, SparseMatrix":function(e,t){return c(e,0)?l(t.size(),t.storage()):d(t,e,y,!0)},"number | BigNumber, DenseMatrix":function(e,t){return c(e,0)?l(t.size(),t.storage()):v(t,e,y,!0)},"Array, number | BigNumber":function(e,t){return y(u(e),t).valueOf()},"number | BigNumber, Array":function(e,t){return y(e,u(t)).valueOf()}});return y.toTex={2:"\\left(${args[0]}"+s.operators.leftShift+"${args[1]}\\right)"},y}var i=n(3).isInteger,o=n(574);t.name="leftShift",t.factory=r},function(e,t,n){"use strict";e.exports=function(e,t){if(e.isFinite()&&!e.isInteger()||t.isFinite()&&!t.isInteger())throw new Error("Integers expected in function leftShift");var n=e.constructor;return e.isNaN()||t.isNaN()||t.isNegative()&&!t.isZero()?new n(NaN):e.isZero()||t.isZero()?e:e.isFinite()||t.isFinite()?t.lt(55)?e.times(Math.pow(2,t.toNumber())+""):e.times(new n(2).pow(t)):new n(NaN)}},function(e,t,n){"use strict";function r(e,t,r,a){var s=n(4),u=r(n(1)),c=r(n(11)),l=r(n(46)),f=r(n(35)),p=r(n(27)),h=r(n(112)),d=r(n(43)),m=r(n(21)),g=r(n(8)),v=r(n(6)),y=a("rightArithShift",{"number, number":function(e,t){if(!i(e)||!i(t))throw new Error("Integers expected in function rightArithShift");return e>>t},"BigNumber, BigNumber":o,"SparseMatrix, SparseMatrix":function(e,t){return h(e,t,y,!1)},"SparseMatrix, DenseMatrix":function(e,t){return p(t,e,y,!0)},"DenseMatrix, SparseMatrix":function(e,t){return f(e,t,y,!1)},"DenseMatrix, DenseMatrix":function(e,t){return g(e,t,y)},"Array, Array":function(e,t){return y(u(e),u(t)).valueOf()},"Array, Matrix":function(e,t){return y(u(e),t)},"Matrix, Array":function(e,t){return y(e,u(t))},"SparseMatrix, number | BigNumber":function(e,t){return c(t,0)?e.clone():m(e,t,y,!1)},"DenseMatrix, number | BigNumber":function(e,t){return c(t,0)?e.clone():v(e,t,y,!1)},"number | BigNumber, SparseMatrix":function(e,t){return c(e,0)?l(t.size(),t.storage()):d(t,e,y,!0)},"number | BigNumber, DenseMatrix":function(e,t){return c(e,0)?l(t.size(),t.storage()):v(t,e,y,!0)},"Array, number | BigNumber":function(e,t){return y(u(e),t).valueOf()},"number | BigNumber, Array":function(e,t){return y(e,u(t)).valueOf()}});return y.toTex={2:"\\left(${args[0]}"+s.operators.rightArithShift+"${args[1]}\\right)"},y}var i=n(3).isInteger,o=n(576);t.name="rightArithShift",t.factory=r},function(e,t,n){"use strict";e.exports=function(e,t){if(e.isFinite()&&!e.isInteger()||t.isFinite()&&!t.isInteger())throw new Error("Integers expected in function rightArithShift");var n=e.constructor;return e.isNaN()||t.isNaN()||t.isNegative()&&!t.isZero()?new n(NaN):e.isZero()||t.isZero()?e:t.isFinite()?t.lt(55)?e.div(Math.pow(2,t.toNumber())+"").floor():e.div(new n(2).pow(t)).floor():new n(e.isNegative()?-1:e.isFinite()?0:NaN)}},function(e,t,n){"use strict";function r(e,t,r,o){var a=n(4),s=r(n(1)),u=r(n(11)),c=r(n(46)),l=r(n(35)),f=r(n(27)),p=r(n(112)),h=r(n(43)),d=r(n(21)),m=r(n(8)),g=r(n(6)),v=o("rightLogShift",{"number, number":function(e,t){if(!i(e)||!i(t))throw new Error("Integers expected in function rightLogShift");return e>>>t},"SparseMatrix, SparseMatrix":function(e,t){return p(e,t,v,!1)},"SparseMatrix, DenseMatrix":function(e,t){return f(t,e,v,!0)},"DenseMatrix, SparseMatrix":function(e,t){return l(e,t,v,!1)},"DenseMatrix, DenseMatrix":function(e,t){return m(e,t,v)},"Array, Array":function(e,t){return v(s(e),s(t)).valueOf()},"Array, Matrix":function(e,t){return v(s(e),t)},"Matrix, Array":function(e,t){return v(e,s(t))},"SparseMatrix, number | BigNumber":function(e,t){return u(t,0)?e.clone():d(e,t,v,!1)},"DenseMatrix, number | BigNumber":function(e,t){return u(t,0)?e.clone():g(e,t,v,!1)},"number | BigNumber, SparseMatrix":function(e,t){return u(e,0)?c(t.size(),t.storage()):h(t,e,v,!0)},"number | BigNumber, DenseMatrix":function(e,t){return u(e,0)?c(t.size(),t.storage()):g(t,e,v,!0)},"Array, number | BigNumber":function(e,t){return v(s(e),t).valueOf()},"number | BigNumber, Array":function(e,t){return v(e,s(t)).valueOf()}});return v.toTex={2:"\\left(${args[0]}"+a.operators.rightLogShift+"${args[1]}\\right)"},v}var i=n(3).isInteger;t.name="rightLogShift",t.factory=r},function(e,t,n){"use strict";e.exports=[n(579),n(580),n(177),n(581)]},function(e,t,n){"use strict";function r(e,t,r,i){var o=r(n(15)),a=r(n(177)),s=r(n(68)),u=r(n(39)),c=i("bellNumbers",{"number | BigNumber":function(e){if(!u(e)||s(e))throw new TypeError("Non-negative integer value expected in function bellNumbers");for(var t=0,n=0;n<=e;n++)t=o(t,a(e,n));return t}});return c.toTex={1:"\\mathrm{B}_{${args[0]}}"},c}t.name="bellNumbers",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,i){var o=r(n(87)),a=r(n(18)),s=r(n(84)),u=r(n(39)),c=r(n(36)),l=i("composition",{"number | BigNumber, number | BigNumber":function(e,t){if(!(u(e)&&s(e)&&u(t)&&s(t)))throw new TypeError("Positive integer value expected in function composition");if(c(t,e))throw new TypeError("k must be less than or equal to n in function composition");return o(a(e,-1),a(t,-1))}});return l.toTex=void 0,l}t.name="composition",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,i){var o=r(n(15)),a=r(n(50)),s=r(n(10)),u=r(n(87)),c=r(n(68)),l=r(n(39)),f=i("catalan",{"number | BigNumber":function(e){if(!l(e)||c(e))throw new TypeError("Non-negative integer value expected in function catalan");return a(u(s(e,2),e),o(e,1))}});return f.toTex={1:"\\mathrm{C}_{${args[0]}}"},f}t.name="catalan",t.factory=r},function(e,t,n){"use strict";e.exports=[n(583),n(82),n(584),n(585)]},function(e,t,n){"use strict";function r(e,t,n,r){var o=r("arg",{number:function(e){return Math.atan2(0,e)},BigNumber:function(t){return e.BigNumber.atan2(0,t)},Complex:function(e){return e.arg()},"Array | Matrix":function(e){return i(e,o)}});return o.toTex={1:"\\arg\\left(${args[0]}\\right)"},o}var i=n(0);t.name="arg",t.factory=r},function(e,t,n){"use strict";function r(e,t,n,r){var o=r("im",{number:function(e){return 0},BigNumber:function(t){return new e.BigNumber(0)},Complex:function(e){return e.im},"Array | Matrix":function(e){return i(e,o)}});return o.toTex={1:"\\Im\\left\\lbrace${args[0]}\\right\\rbrace"},o}var i=n(0);t.name="im",t.factory=r},function(e,t,n){"use strict";function r(e,t,n,r){var o=r("re",{number:function(e){return e},BigNumber:function(e){return e},Complex:function(e){return e.re},"Array | Matrix":function(e){return i(e,o)}});return o.toTex={1:"\\Re\\left\\lbrace${args[0]}\\right\\rbrace"},o}var i=n(0);t.name="re",t.factory=r},function(e,t,n){"use strict";e.exports=[n(587),n(588)]},function(e,t,n){"use strict";function r(e,t,r,i){function o(t){return"number"===typeof t||e.isBigNumber(t)}function a(e){return 2===e.length&&o(e[0])&&o(e[1])}function s(e){return 3===e.length&&o(e[0])&&o(e[1])&&o(e[2])}function u(e){return 4===e.length&&o(e[0])&&o(e[1])&&o(e[2])&&o(e[3])}function c(e,n,r,i){var o=e,a=r,s=x(o,n),u=x(a,i),c=x(y(s[0],u[1]),y(u[0],s[1]));if(w(h(c),t.epsilon))return null;var l=y(u[0],o[1]),f=y(u[1],o[0]),p=y(u[0],a[1]),g=y(u[1],a[0]),N=b(m(x(x(l,f),p),g),c);return d(v(s,N),o)}function l(e,t,n,r,i,o,a,s,u,c,l,f){var p=y(x(e,t),x(n,r)),h=y(x(i,o),x(a,s)),d=y(x(u,c),x(l,f));return m(m(p,h),d)}function f(e,t,n,r,i,o,a,s,u,c,f,p){var h=l(e,a,c,a,t,s,f,s,n,u,p,u),d=l(c,a,r,e,f,s,i,t,p,u,o,n),g=l(e,a,r,e,t,s,i,t,n,u,o,n),v=l(c,a,c,a,f,s,f,s,p,u,p,u),w=l(r,e,r,e,i,t,i,t,o,n,o,n),E=b(x(y(h,d),y(g,v)),x(y(w,v),y(d,d))),C=b(m(h,y(E,d)),v),S=m(e,y(E,x(r,e))),M=m(t,y(E,x(i,t))),T=m(n,y(E,x(o,n))),O=m(a,y(C,x(c,a))),k=m(s,y(C,x(f,s))),A=m(u,y(C,x(p,u)));return N(S,O)&&N(M,k)&&N(T,A)?[S,M,T]:null}function p(e,t,n,r,i,o,a,s,u,c){var l=y(e,a),f=y(r,a),p=y(t,s),h=y(i,s),d=y(n,u),g=y(o,u),v=b(x(x(x(c,l),p),d),x(x(x(m(m(f,h),g),l),p),d));return[m(e,y(v,x(r,e))),m(t,y(v,x(i,t))),m(n,y(v,x(o,n)))]}var h=r(n(25)),d=r(n(15)),m=r(n(18)),g=r(n(1)),v=r(n(10)),y=r(n(23)),b=r(n(14)),x=r(n(16)),w=r(n(44)),N=r(n(11)),E=i("intersect",{"Array, Array, Array":function(e,t,n){if(!s(e))throw new TypeError("Array with 3 numbers or BigNumbers expected for first argument");if(!s(t))throw new TypeError("Array with 3 numbers or BigNumbers expected for second argument");if(!u(n))throw new TypeError("Array with 4 numbers expected as third argument");return p(e[0],e[1],e[2],t[0],t[1],t[2],n[0],n[1],n[2],n[3])},"Array, Array, Array, Array":function(e,t,n,r){if(2===e.length){if(!a(e))throw new TypeError("Array with 2 numbers or BigNumbers expected for first argument");if(!a(t))throw new TypeError("Array with 2 numbers or BigNumbers expected for second argument");if(!a(n))throw new TypeError("Array with 2 numbers or BigNumbers expected for third argument");if(!a(r))throw new TypeError("Array with 2 numbers or BigNumbers expected for fourth argument");return c(e,t,n,r)}if(3===e.length){if(!s(e))throw new TypeError("Array with 3 numbers or BigNumbers expected for first argument");if(!s(t))throw new TypeError("Array with 3 numbers or BigNumbers expected for second argument");if(!s(n))throw new TypeError("Array with 3 numbers or BigNumbers expected for third argument");if(!s(r))throw new TypeError("Array with 3 numbers or BigNumbers expected for fourth argument");return f(e[0],e[1],e[2],t[0],t[1],t[2],n[0],n[1],n[2],r[0],r[1],r[2])}throw new TypeError("Arrays with two or thee dimensional points expected")},"Matrix, Matrix, Matrix":function(e,t,n){return g(E(e.valueOf(),t.valueOf(),n.valueOf()))},"Matrix, Matrix, Matrix, Matrix":function(e,t,n,r){return g(E(e.valueOf(),t.valueOf(),n.valueOf(),r.valueOf()))}});return E}t.name="intersect",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,i){function o(t){return"number"===typeof t||e.isBigNumber(t)}function a(e){return e.constructor!==Array&&(e=c(e)),o(e[0])&&o(e[1])}function s(e){return e.constructor!==Array&&(e=c(e)),o(e[0])&&o(e[1])&&o(e[2])}function u(e){return e.constructor!==Array&&(e=c(e)),o(e[0])&&o(e[1])&&o(e[2])&&o(e[3])&&o(e[4])&&o(e[5])}function c(e){for(var t=Object.keys(e),n=[],r=0;r<t.length;r++)n.push(e[t[r]]);return n}function l(e){if(2===e[0].length&&o(e[0][0])&&o(e[0][1])){for(var t in e)if(2!==e[t].length||!o(e[t][0])||!o(e[t][1]))return!1}else{if(!(3===e[0].length&&o(e[0][0])&&o(e[0][1])&&o(e[0][2])))return!1;for(var n in e)if(3!==e[n].length||!o(e[n][0])||!o(e[n][1])||!o(e[n][2]))return!1}return!0}function f(e,t,n,r,i){var o=N(g(g(y(n,e),y(r,t)),i)),a=w(g(y(n,n),y(r,r)));return b(o,a)}function p(e,t,n,r,i,o,a,s,u){var c=[v(y(v(i,t),u),y(v(o,n),s)),v(y(v(o,n),a),y(v(r,e),u)),v(y(v(r,e),s),y(v(i,t),a))];c=w(g(g(y(c[0],c[0]),y(c[1],c[1])),y(c[2],c[2])));var l=w(g(g(y(a,a),y(s,s)),y(u,u)));return b(c,l)}function h(e,t,n,r){var i=v(r,t),o=v(n,e),a=g(y(i,i),y(o,o));return w(a)}function d(e,t,n,r,i,o){var a=v(o,n),s=v(i,t),u=v(r,e),c=g(g(y(a,a),y(s,s)),y(u,u));return w(c)}function m(e){for(var t=[],n=0;n<e.length-1;n++)for(var r=n+1;r<e.length;r++)2===e[0].length?t.push(h(e[n][0],e[n][1],e[r][0],e[r][1])):3===e[0].length&&t.push(d(e[n][0],e[n][1],e[n][2],e[r][0],e[r][1],e[r][2]));return t}var g=r(n(18)),v=r(n(16)),y=r(n(23)),b=r(n(14)),x=r(n(37)),w=r(n(51)),N=r(n(25));return i("distance",{"Array, Array, Array":function(e,t,n){if(2===e.length&&2===t.length&&2===n.length){if(!a(e))throw new TypeError("Array with 2 numbers or BigNumbers expected for first argument");if(!a(t))throw new TypeError("Array with 2 numbers or BigNumbers expected for second argument");if(!a(n))throw new TypeError("Array with 2 numbers or BigNumbers expected for third argument");var r=b(v(n[1],n[0]),v(t[1],t[0])),i=y(y(r,r),t[0]),o=x(y(r,t[0])),s=e[1];return f(e[0],e[1],i,o,s)}throw new TypeError("Invalid Arguments: Try again")},"Object, Object, Object":function(e,t,n){if(2===Object.keys(e).length&&2===Object.keys(t).length&&2===Object.keys(n).length){if(!a(e))throw new TypeError("Values of pointX and pointY should be numbers or BigNumbers");if(!a(t))throw new TypeError("Values of lineOnePtX and lineOnePtY should be numbers or BigNumbers");if(!a(n))throw new TypeError("Values of lineTwoPtX and lineTwoPtY should be numbers or BigNumbers");if(e.hasOwnProperty("pointX")&&e.hasOwnProperty("pointY")&&t.hasOwnProperty("lineOnePtX")&&t.hasOwnProperty("lineOnePtY")&&n.hasOwnProperty("lineTwoPtX")&&n.hasOwnProperty("lineTwoPtY")){var r=b(v(n.lineTwoPtY,n.lineTwoPtX),v(t.lineOnePtY,t.lineOnePtX)),i=y(y(r,r),t.lineOnePtX),o=x(y(r,t.lineOnePtX)),s=e.pointX;return f(e.pointX,e.pointY,i,o,s)}throw new TypeError("Key names do not match")}throw new TypeError("Invalid Arguments: Try again")},"Array, Array":function(e,t){if(2===e.length&&3===t.length){if(!a(e))throw new TypeError("Array with 2 numbers or BigNumbers expected for first argument");if(!s(t))throw new TypeError("Array with 3 numbers or BigNumbers expected for second argument");return f(e[0],e[1],t[0],t[1],t[2])}if(3===e.length&&6===t.length){if(!s(e))throw new TypeError("Array with 3 numbers or BigNumbers expected for first argument");if(!u(t))throw new TypeError("Array with 6 numbers or BigNumbers expected for second argument");return p(e[0],e[1],e[2],t[0],t[1],t[2],t[3],t[4],t[5])}if(2===e.length&&2===t.length){if(!a(e))throw new TypeError("Array with 2 numbers or BigNumbers expected for first argument");if(!a(t))throw new TypeError("Array with 2 numbers or BigNumbers expected for second argument");return h(e[0],e[1],t[0],t[1])}if(3===e.length&&3===t.length){if(!s(e))throw new TypeError("Array with 3 numbers or BigNumbers expected for first argument");if(!s(t))throw new TypeError("Array with 3 numbers or BigNumbers expected for second argument");return d(e[0],e[1],e[2],t[0],t[1],t[2])}throw new TypeError("Invalid Arguments: Try again")},"Object, Object":function(e,t){if(2===Object.keys(e).length&&3===Object.keys(t).length){if(!a(e))throw new TypeError("Values of pointX and pointY should be numbers or BigNumbers");if(!s(t))throw new TypeError("Values of xCoeffLine, yCoeffLine and constant should be numbers or BigNumbers");if(e.hasOwnProperty("pointX")&&e.hasOwnProperty("pointY")&&t.hasOwnProperty("xCoeffLine")&&t.hasOwnProperty("yCoeffLine")&&t.hasOwnProperty("constant"))return f(e.pointX,e.pointY,t.xCoeffLine,t.yCoeffLine,t.constant);throw new TypeError("Key names do not match")}if(3===Object.keys(e).length&&6===Object.keys(t).length){if(!s(e))throw new TypeError("Values of pointX, pointY and pointZ should be numbers or BigNumbers");if(!u(t))throw new TypeError("Values of x0, y0, z0, a, b and c should be numbers or BigNumbers");if(e.hasOwnProperty("pointX")&&e.hasOwnProperty("pointY")&&t.hasOwnProperty("x0")&&t.hasOwnProperty("y0")&&t.hasOwnProperty("z0")&&t.hasOwnProperty("a")&&t.hasOwnProperty("b")&&t.hasOwnProperty("c"))return p(e.pointX,e.pointY,e.pointZ,t.x0,t.y0,t.z0,t.a,t.b,t.c);throw new TypeError("Key names do not match")}if(2===Object.keys(e).length&&2===Object.keys(t).length){if(!a(e))throw new TypeError("Values of pointOneX and pointOneY should be numbers or BigNumbers");if(!a(t))throw new TypeError("Values of pointTwoX and pointTwoY should be numbers or BigNumbers");if(e.hasOwnProperty("pointOneX")&&e.hasOwnProperty("pointOneY")&&t.hasOwnProperty("pointTwoX")&&t.hasOwnProperty("pointTwoY"))return h(e.pointOneX,e.pointOneY,t.pointTwoX,t.pointTwoY);throw new TypeError("Key names do not match")}if(3===Object.keys(e).length&&3===Object.keys(t).length){if(!s(e))throw new TypeError("Values of pointOneX, pointOneY and pointOneZ should be numbers or BigNumbers");if(!s(t))throw new TypeError("Values of pointTwoX, pointTwoY and pointTwoZ should be numbers or BigNumbers");if(e.hasOwnProperty("pointOneX")&&e.hasOwnProperty("pointOneY")&&e.hasOwnProperty("pointOneZ")&&t.hasOwnProperty("pointTwoX")&&t.hasOwnProperty("pointTwoY")&&t.hasOwnProperty("pointTwoZ"))return d(e.pointOneX,e.pointOneY,e.pointOneZ,t.pointTwoX,t.pointTwoY,t.pointTwoZ);throw new TypeError("Key names do not match")}throw new TypeError("Invalid Arguments: Try again")},Array:function(e){if(!l(e))throw new TypeError("Incorrect array format entered for pairwise distance calculation");return m(e)}})}t.name="distance",t.factory=r},function(e,t,n){"use strict";e.exports=[n(590),n(179),n(591),n(592)]},function(e,t,n){"use strict";function r(e,t,r,i){var o=n(4),a=r(n(1)),s=r(n(46)),u=r(n(179)),c=r(n(27)),l=r(n(85)),f=r(n(21)),p=r(n(8)),h=r(n(6)),d=i("and",{"number, number":function(e,t){return!(!e||!t)},"Complex, Complex":function(e,t){return(0!==e.re||0!==e.im)&&(0!==t.re||0!==t.im)},"BigNumber, BigNumber":function(e,t){return!e.isZero()&&!t.isZero()&&!e.isNaN()&&!t.isNaN()},"Unit, Unit":function(e,t){return d(e.value||0,t.value||0)},"SparseMatrix, SparseMatrix":function(e,t){return l(e,t,d,!1)},"SparseMatrix, DenseMatrix":function(e,t){return c(t,e,d,!0)},"DenseMatrix, SparseMatrix":function(e,t){return c(e,t,d,!1)},"DenseMatrix, DenseMatrix":function(e,t){return p(e,t,d)},"Array, Array":function(e,t){return d(a(e),a(t)).valueOf()},"Array, Matrix":function(e,t){return d(a(e),t)},"Matrix, Array":function(e,t){return d(e,a(t))},"SparseMatrix, any":function(e,t){return u(t)?s(e.size(),e.storage()):f(e,t,d,!1)},"DenseMatrix, any":function(e,t){return u(t)?s(e.size(),e.storage()):h(e,t,d,!1)},"any, SparseMatrix":function(e,t){return u(e)?s(e.size(),e.storage()):f(t,e,d,!0)},"any, DenseMatrix":function(e,t){return u(e)?s(e.size(),e.storage()):h(t,e,d,!0)},"Array, any":function(e,t){return d(a(e),t).valueOf()},"any, Array":function(e,t){return d(e,a(t)).valueOf()}});return d.toTex={2:"\\left(${args[0]}"+o.operators.and+"${args[1]}\\right)"},d}t.name="and",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,i){var o=n(4),a=r(n(1)),s=r(n(19)),u=r(n(76)),c=r(n(20)),l=r(n(8)),f=r(n(6)),p=i("or",{"number, number":function(e,t){return!(!e&&!t)},"Complex, Complex":function(e,t){return 0!==e.re||0!==e.im||0!==t.re||0!==t.im},"BigNumber, BigNumber":function(e,t){return!e.isZero()&&!e.isNaN()||!t.isZero()&&!t.isNaN()},"Unit, Unit":function(e,t){return p(e.value||0,t.value||0)},"SparseMatrix, SparseMatrix":function(e,t){return u(e,t,p)},"SparseMatrix, DenseMatrix":function(e,t){return s(t,e,p,!0)},"DenseMatrix, SparseMatrix":function(e,t){return s(e,t,p,!1)},"DenseMatrix, DenseMatrix":function(e,t){return l(e,t,p)},"Array, Array":function(e,t){return p(a(e),a(t)).valueOf()},"Array, Matrix":function(e,t){return p(a(e),t)},"Matrix, Array":function(e,t){return p(e,a(t))},"SparseMatrix, any":function(e,t){return c(e,t,p,!1)},"DenseMatrix, any":function(e,t){return f(e,t,p,!1)},"any, SparseMatrix":function(e,t){return c(t,e,p,!0)},"any, DenseMatrix":function(e,t){return f(t,e,p,!0)},"Array, any":function(e,t){return f(a(e),t,p,!1).valueOf()},"any, Array":function(e,t){return f(a(t),e,p,!0).valueOf()}});return p.toTex={2:"\\left(${args[0]}"+o.operators.or+"${args[1]}\\right)"},p}t.name="or",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,i){var o=n(4),a=r(n(1)),s=r(n(19)),u=r(n(29)),c=r(n(20)),l=r(n(8)),f=r(n(6)),p=i("xor",{"number, number":function(e,t){return!!e!==!!t},"Complex, Complex":function(e,t){return(0!==e.re||0!==e.im)!==(0!==t.re||0!==t.im)},"BigNumber, BigNumber":function(e,t){return(!e.isZero()&&!e.isNaN())!==(!t.isZero()&&!t.isNaN())},"Unit, Unit":function(e,t){return p(e.value||0,t.value||0)},"SparseMatrix, SparseMatrix":function(e,t){return u(e,t,p)},"SparseMatrix, DenseMatrix":function(e,t){return s(t,e,p,!0)},"DenseMatrix, SparseMatrix":function(e,t){return s(e,t,p,!1)},"DenseMatrix, DenseMatrix":function(e,t){return l(e,t,p)},"Array, Array":function(e,t){return p(a(e),a(t)).valueOf()},"Array, Matrix":function(e,t){return p(a(e),t)},"Matrix, Array":function(e,t){return p(e,a(t))},"SparseMatrix, any":function(e,t){return c(e,t,p,!1)},"DenseMatrix, any":function(e,t){return f(e,t,p,!1)},"any, SparseMatrix":function(e,t){return c(t,e,p,!0)},"any, DenseMatrix":function(e,t){return f(t,e,p,!0)},"Array, any":function(e,t){return f(a(e),t,p,!1).valueOf()},"any, Array":function(e,t){return f(a(t),e,p,!0).valueOf()}});return p.toTex={2:"\\left(${args[0]}"+o.operators.xor+"${args[1]}\\right)"},p}t.name="xor",t.factory=r},function(e,t,n){"use strict";e.exports=[n(79),n(594),n(595),n(160),n(596),n(597),n(598),n(599),n(600),n(601),n(602),n(58),n(81),n(603),n(180),n(604),n(113),n(162),n(605),n(606),n(28),n(607),n(609),n(610),n(24),n(611),n(83),n(46)]},function(e,t,n){"use strict";function r(e,t,r,o){function a(e,t){var n=Math.max(i.size(e).length,i.size(t).length);e=i.squeeze(e),t=i.squeeze(t);var r=i.size(e),o=i.size(t);if(1!==r.length||1!==o.length||3!==r[0]||3!==o[0])throw new RangeError("Vectors with length 3 expected (Size A = ["+r.join(", ")+"], B = ["+o.join(", ")+"])");var a=[u(c(e[1],t[2]),c(e[2],t[1])),u(c(e[2],t[0]),c(e[0],t[2])),u(c(e[0],t[1]),c(e[1],t[0]))];return n>1?[a]:a}var s=r(n(1)),u=r(n(16)),c=r(n(10)),l=o("cross",{"Matrix, Matrix":function(e,t){return s(a(e.toArray(),t.toArray()))},"Matrix, Array":function(e,t){return s(a(e.toArray(),t))},"Array, Matrix":function(e,t){return s(a(e,t.toArray()))},"Array, Array":a});return l.toTex={2:"\\left(${args[0]}\\right)\\times\\left(${args[1]}\\right)"},l}var i=n(2);t.name="cross",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,i){var o=r(n(83)),a=r(n(82)),s=n(4),u=i("ctranspose",{any:function(e){return a(o(e))}});return u.toTex={1:"\\left(${args[0]}\\right)"+s.operators.ctranspose},u}t.name="ctranspose",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,a){function s(e,t,n,r){if(!o(t))throw new TypeError("Second parameter in function diag must be an integer");var i=t>0?t:0,a=t<0?-t:0;switch(n.length){case 1:return u(e,t,r,n[0],a,i);case 2:return c(e,t,r,n,a,i)}throw new RangeError("Matrix for function diag must be 2 dimensional")}function u(t,n,r,i,o,a){var s=[i+o,i+a],u=e.Matrix.storage(r||"dense"),c=u.diagonal(s,t,n);return null!==r?c:c.valueOf()}function c(t,n,r,i,o,a){if(e.isMatrix(t)){var s=t.diagonal(n);return null!==r?r!==s.storage()?l(s,r):s:s.valueOf()}for(var u=Math.min(i[0]-o,i[1]-a),c=[],f=0;f<u;f++)c[f]=t[f+o][f+a];return null!==r?l(c):c}var l=r(n(1)),f=a("diag",{Array:function(e){return s(e,0,i.size(e),null)},"Array, number":function(e,t){return s(e,t,i.size(e),null)},"Array, BigNumber":function(e,t){return s(e,t.toNumber(),i.size(e),null)},"Array, string":function(e,t){return s(e,0,i.size(e),t)},"Array, number, string":function(e,t,n){return s(e,t,i.size(e),n)},"Array, BigNumber, string":function(e,t,n){return s(e,t.toNumber(),i.size(e),n)},Matrix:function(e){return s(e,0,e.size(),e.storage())},"Matrix, number":function(e,t){return s(e,t,e.size(),e.storage())},"Matrix, BigNumber":function(e,t){return s(e,t.toNumber(),e.size(),e.storage())},"Matrix, string":function(e,t){return s(e,0,e.size(),t)},"Matrix, number, string":function(e,t,n){return s(e,t,e.size(),n)},"Matrix, BigNumber, string":function(e,t,n){return s(e,t.toNumber(),e.size(),n)}});return f.toTex=void 0,f}var i=n(2),o=n(3).isInteger;t.name="diag",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,o){function a(e,t){var n=i(e),r=i(t),o=n[0];if(1!==n.length||1!==r.length)throw new RangeError("Vector expected");if(n[0]!==r[0])throw new RangeError("Vectors must have equal length ("+n[0]+" != "+r[0]+")");if(0===o)throw new RangeError("Cannot calculate the dot product of empty vectors");for(var a=0,c=0;c<o;c++)a=s(a,u(e[c],t[c]));return a}var s=r(n(15)),u=r(n(10)),c=o("dot",{"Matrix, Matrix":function(e,t){return a(e.toArray(),t.toArray())},"Matrix, Array":function(e,t){return a(e.toArray(),t)},"Array, Matrix":function(e,t){return a(e,t.toArray())},"Array, Array":a});return c.toTex={2:"\\left(${args[0]}\\cdot${args[1]}\\right)"},c}var i=n(2).size;t.name="dot",t.factory=r},function(e,t,n){"use strict";function r(e,t,n,r){return function(){throw new Error('Function "eye" is renamed to "identity" since mathjs version 5.0.0. To keep eye working, create an alias for it using "math.import({eye: math.identity}, {override: true})"')}}t.name="eye",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,o){function a(e){for(var t=e.size()[0],n=0,r=0;r<t;r++){for(var i=0,o=0;o<t;o++)i+=c(e.get([r,o]));n=Math.max(i,n)}return n}function s(e,t){for(var n=0;n<30;n++)for(var r=0;r<=n;r++){var i=n-r;if(u(e,r,i)<t)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 u(e,t,n){for(var r=1,i=2;i<=t;i++)r*=i;for(var o=r,a=t+1;a<=2*t;a++)o*=a;var s=o*(2*t+1);return 8*Math.pow(e/Math.pow(2,n),2*t)*r*r/(o*s)}var c=r(n(25)),l=r(n(15)),f=r(n(58)),p=r(n(81)),h=r(n(10)),d=e.SparseMatrix,m=o("expm",{Matrix:function(t){var n=t.size();if(2!==n.length||n[0]!==n[1])throw new RangeError("Matrix must be square (size: "+i(n)+")");for(var r=n[0],o=a(t),u=s(o,1e-15),c=u.q,m=u.j,g=h(t,Math.pow(2,-m)),v=f(r),y=f(r),b=1,x=g,w=-1,N=1;N<=c;N++)N>1&&(x=h(x,g),w=-w),b=b*(c-N+1)/((2*c-N+1)*N),v=l(v,h(b,x)),y=l(y,h(b*w,x));for(var E=h(p(y),v),C=0;C<m;C++)E=h(E,E);return e.isSparseMatrix(t)?new d(E):E}});return m.toTex={1:"\\exp\\left(${args[0]}\\right)"},m}var i=n(9).format;t.name="expm",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,o){var s=r(n(1)),u=o("filter",{"Array, function":i,"Matrix, function":function(e,t){return s(i(e.toArray(),t))},"Array, RegExp":a,"Matrix, RegExp":function(e,t){return s(a(e.toArray(),t))}});return u.toTex=void 0,u}function i(e,t){var n=s(t);return o(e,function(e,r,i){return 1===n?t(e):2===n?t(e,[r]):t(e,[r],i)})}var o=n(2).filter,a=n(2).filterRegExp,s=n(34).maxArgumentCount;t.name="filter",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,a){var s=r(n(1)),u=a("flatten",{Array:function(e){return o(i(e))},Matrix:function(e){var t=o(i(e.toArray()));return s(t)}});return u.toTex=void 0,u}var i=n(5).clone,o=n(2).flatten;t.name="flatten",t.factory=r},function(e,t,n){"use strict";function r(e,t,n,r){var o=r("forEach",{"Array, function":i,"Matrix, function":function(e,t){return e.forEach(t)}});return o.toTex=void 0,o}function i(e,t){var n=o(t);!function r(i,o){Array.isArray(i)?a(i,function(e,t){r(e,o.concat(t))}):1===n?t(i):2===n?t(i,o):t(i,o,e)}(e,[])}var o=n(34).maxArgumentCount,a=n(2).forEach;t.name="forEach",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,o){function a(e,t){if(1===i(e).length&&(e=[e]),1===i(t).length&&(t=[t]),i(e).length>2||i(t).length>2)throw new RangeError("Vectors with dimensions greater then 2 are not supported expected (Size x = "+JSON.stringify(e.length)+", y = "+JSON.stringify(t.length)+")");var n=[],r=[];return e.map(function(e){return t.map(function(t){return r=[],n.push(r),e.map(function(e){return t.map(function(t){return r.push(u(e,t))})})})})&&n}var s=r(n(1)),u=r(n(23));return o("kron",{"Matrix, Matrix":function(e,t){return s(a(e.toArray(),t.toArray()))},"Matrix, Array":function(e,t){return s(a(e.toArray(),t))},"Array, Matrix":function(e,t){return s(a(e,t.toArray()))},"Array, Array":a})}var i=n(2).size;t.name="kron",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,a){function s(t,n){var r=u(t),i=r?new e.BigNumber(1):1;if(c(t),n){var a=l(n);return t.length>0?a.resize(t,i):a}var s=[];return t.length>0?o(s,t,i):s}function u(t){var n=!1;return t.forEach(function(t,r,i){e.isBigNumber(t)&&(n=!0,i[r]=t.toNumber())}),n}function c(e){e.forEach(function(e){if("number"!==typeof e||!i(e)||e<0)throw new Error("Parameters in function ones must be positive integers")})}var l=r(n(1)),f=a("ones",{"":function(){return"Array"===t.matrix?s([]):s([],"default")},"...number | BigNumber | string":function(e){if("string"===typeof e[e.length-1])return s(e,e.pop());return"Array"===t.matrix?s(e):s(e,"default")},Array:s,Matrix:function(e){var t=e.storage();return s(e.valueOf(),t)},"Array | Matrix, string":function(e,t){return s(e.valueOf(),t)}});return f.toTex=void 0,f}var i=n(3).isInteger,o=n(2).resize;t.name="ones",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,o){var a=r(n(1)),s=r(n(39)),u=o("reshape",{"Matrix, Array":function(e,t){return e.reshape?e.reshape(t):a(i.reshape(e.valueOf(),t))},"Array, Array":function(e,t){return t.forEach(function(e){if(!s(e))throw new TypeError("Invalid size for dimension: "+e)}),i.reshape(e,t)}});return u.toTex=void 0,u}var i=n(2);t.name="reshape",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,l){function f(e,t,n){if(void 0!==n){if("string"!==typeof n||1!==n.length)throw new TypeError("Single character expected as defaultValue")}else n=" ";if(1!==t.length)throw new i(t.length,1);var r=t[0];if("number"!==typeof r||!a(r))throw new TypeError("Invalid size, must contain positive integers (size: "+s(t)+")");if(e.length>r)return e.substring(0,r);if(e.length<r){for(var o=e,u=0,c=r-e.length;u<c;u++)o+=n;return o}return e}var p=r(n(1)),h=function(n,r,i){if(2!==arguments.length&&3!==arguments.length)throw new o("resize",arguments.length,2,3);if(e.isMatrix(r)&&(r=r.valueOf()),e.isBigNumber(r[0])&&(r=r.map(function(t){return e.isBigNumber(t)?t.toNumber():t})),e.isMatrix(n))return n.resize(r,i,!0);if("string"===typeof n)return f(n,r,i);var a=!Array.isArray(n)&&"Array"!==t.matrix;if(0===r.length){for(;Array.isArray(n);)n=n[0];return u(n)}Array.isArray(n)||(n=[n]),n=u(n);var s=c.resize(n,r,i);return a?p(s):s};return h.toTex=void 0,h}var i=n(12),o=n(56),a=n(3).isInteger,s=n(9).format,u=n(5).clone,c=n(2);t.name="resize",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,o){function a(e){if("asc"===e)return l;if("desc"===e)return f;if("natural"===e)return p;throw new Error('String "asc", "desc", or "natural" expected')}function s(e){if(1!==i(e).length)throw new Error("One dimensional array expected")}function u(e){if(1!==e.size().length)throw new Error("One dimensional matrix expected")}var c=r(n(1)),l=r(n(62)),f=function(e,t){return-l(e,t)},p=r(n(31)),h=o("sort",{Array:function(e){return s(e),e.sort(l)},Matrix:function(e){return u(e),c(e.toArray().sort(l),e.storage())},"Array, function":function(e,t){return s(e),e.sort(t)},"Matrix, function":function(e,t){return u(e),c(e.toArray().sort(t),e.storage())},"Array, string":function(e,t){return s(e),e.sort(a(t))},"Matrix, string":function(e,t){return u(e),c(e.toArray().sort(a(t)),e.storage())}});return h.toTex=void 0,h}var i=n(2).size;t.name="sort",t.factory=r},function(e,t){e.exports=function e(t,n){"use strict";var r,i,o=/(^([+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?)?$|^0x[0-9a-f]+$|\d+)/gi,a=/(^[ ]*|[ ]*$)/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/,l=function(t){return e.insensitive&&(""+t).toLowerCase()||""+t},f=l(t).replace(a,"")||"",p=l(n).replace(a,"")||"",h=f.replace(o,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0"),d=p.replace(o,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0"),m=parseInt(f.match(u),16)||1!==h.length&&f.match(s)&&Date.parse(f),g=parseInt(p.match(u),16)||m&&p.match(s)&&Date.parse(p)||null;if(g){if(m<g)return-1;if(m>g)return 1}for(var v=0,y=Math.max(h.length,d.length);v<y;v++){if(r=!(h[v]||"").match(c)&&parseFloat(h[v])||h[v]||0,i=!(d[v]||"").match(c)&&parseFloat(d[v])||d[v]||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,t,n){"use strict";function r(e,t,r,s){function u(e){var t=void 0,n=0,r=e,i=v(m(e));do{var o=r;if(r=f(.5,l(o,d(i))),i=f(.5,l(i,d(o))),(t=g(c(h(r,o))))>x&&++n>b)throw new Error("computing square root of matrix: iterative method could not converge")}while(t>x);return r}var c=r(n(25)),l=r(n(15)),f=r(n(10)),p=r(n(51)),h=r(n(16)),d=r(n(81)),m=r(n(28)),g=r(n(103)),v=r(n(58)),y=s("sqrtm",{"Array | Matrix":function(t){var n=e.isMatrix(t)?t.size():i.size(t);switch(n.length){case 1:if(1===n[0])return p(t);throw new RangeError("Matrix must be square (size: "+a.format(n)+")");case 2:if(n[0]===n[1])return u(t);throw new RangeError("Matrix must be square (size: "+a.format(n)+")")}}}),b=1e3,x=1e-6;return y.toTex={1:"{${args[0]}}"+o.operators.pow+"{\\frac{1}{2}}"},y}var i=n(2),o=n(4),a=n(9);t.name="sqrtm",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,a){var s=r(n(1)),u=a("squeeze",{Array:function(e){return o.squeeze(i.clone(e))},Matrix:function(e){var t=o.squeeze(e.toArray());return Array.isArray(t)?s(t):t},any:function(e){return i.clone(e)}});return u.toTex=void 0,u}var i=n(5),o=n(2);t.name="squeeze",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,a){function s(e){var t=e._size,n=e._data;switch(t.length){case 1:if(1===t[0])return i(n[0]);throw new RangeError("Matrix must be square (size: "+o(t)+")");case 2:var r=t[0];if(r===t[1]){for(var a=0,s=0;s<r;s++)a=l(a,n[s][s]);return a}throw new RangeError("Matrix must be square (size: "+o(t)+")");default:throw new RangeError("Matrix must be two dimensional (size: "+o(t)+")")}}function u(e){var t=e._values,n=e._index,r=e._ptr,i=e._size,a=i[0],s=i[1];if(a===s){var u=0;if(t.length>0)for(var c=0;c<s;c++)for(var f=r[c],p=r[c+1],h=f;h<p;h++){var d=n[h];if(d===c){u=l(u,t[h]);break}if(d>c)break}return u}throw new RangeError("Matrix must be square (size: "+o(i)+")")}var c=r(n(1)),l=r(n(15)),f=a("trace",{Array:function(e){return s(c(e))},SparseMatrix:u,DenseMatrix:s,any:i});return f.toTex={1:"\\mathrm{tr}\\left(${args[0]}\\right)"},f}var i=n(5).clone,o=n(9).format;t.name="trace",t.factory=r},function(e,t,n){"use strict";e.exports=[n(87),n(86),n(178),n(613),n(614),n(615),n(616),n(619),n(620)]},function(e,t,n){"use strict";function r(e,t,r,i){function o(e,t){var n=t.size().length,r=e.size().length;if(n>1)throw new Error("first object must be one dimensional");if(r>1)throw new Error("second object must be one dimensional");if(n!==r)throw new Error("Length of two vectors must be equal");if(0===u(e))throw new Error("Sum of elements in first object must be non zero");if(0===u(t))throw new Error("Sum of elements in second object must be non zero");var i=s(e,u(e)),o=s(t,u(t)),a=u(c(i,f(l(i,o))));return p(a)?a:Number.NaN}var a=r(n(1)),s=r(n(50)),u=r(n(181)),c=r(n(10)),l=r(n(175)),f=r(n(109)),p=r(n(101));return i("kldivergence",{"Array, Array":function(e,t){return o(a(e),a(t))},"Matrix, Array":function(e,t){return o(e,a(t))},"Array, Matrix":function(e,t){return o(a(e),t)},"Matrix, Matrix":function(e,t){return o(e,t)}})}t.name="kldivergence",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,o){var a=r(n(15)),s=r(n(10)),u=r(n(50)),c=r(n(86)),l=r(n(39)),f=r(n(84));return o("multinomial",{"Array | Matrix":function(e){var t=0,n=1;return i(e,function(e){if(!l(e)||!f(e))throw new TypeError("Positive integer value expected in function multinomial");t=a(t,e),n=s(n,c(e))}),u(c(t),n)}})}var i=n(49);t.name="multinomial",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,a){var s=r(n(86)),u=a("permutations",{"number | BigNumber":s,"number, number":function(e,t){var n=void 0,r=void 0;if(!o(e)||e<0)throw new TypeError("Positive integer value expected in function permutations");if(!o(t)||t<0)throw new TypeError("Positive integer value expected in function permutations");if(t>e)throw new TypeError("second argument k must be less than or equal to first argument n");for(n=1,r=e-t+1;r<=e;r++)n*=r;return n},"BigNumber, BigNumber":function(t,n){var r=void 0,o=void 0;if(!i(t)||!i(n))throw new TypeError("Positive integer value expected in function permutations");if(n.gt(t))throw new TypeError("second argument k must be less than or equal to first argument n");for(r=new e.BigNumber(1),o=t.minus(n).plus(1);o.lte(t);o=o.plus(1))r=r.times(o);return r}});return u.toTex=void 0,u}function i(e){return e.isInteger()&&e.gte(0)}var o=n(3).isInteger;t.name="permutations",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,i){var o=r(n(114)),a=o("uniform").pickRandom;return a.toTex=void 0,a}t.name="pickRandom",t.factory=r},function(e,t,n){"use strict";function r(e,t,n,r,a){function s(e){c=null===e?o:i(String(e))}function u(){return c()}var c=void 0;return s(t.randomSeed),a.on("config",function(e,t,n){void 0!==n.randomSeed&&s(e.randomSeed)}),u}var i=n(618),o=i();t.factory=r,t.math=!0},function(e,t,n){"use strict";(function(t){function n(e){var t,n=e.length,r=this,i=0,o=r.i=r.j=0,a=r.S=[];for(n||(e=[n++]);i<s;)a[i]=i++;for(i=0;i<s;i++)a[i]=a[o=h&o+e[i%n]+(t=a[i])],a[o]=t;(r.g=function(e){for(var t,n=0,i=r.i,o=r.j,a=r.S;e--;)t=a[i=h&i+1],n=n*s+a[h&(a[i]=a[o=h&o+t])+(a[o]=t)];return r.i=i,r.j=o,n})(s)}function r(e,t){var n,i=[],o=(typeof e)[0];if(t&&"o"==o)for(n in e)try{i.push(r(e[n],t-1))}catch(e){}return i.length?i:"s"==o?e:e+"\0"}function i(e,t){for(var n,r=e+"",i=0;i<r.length;)t[h&i]=h&(n^=19*t[h&i])+r.charCodeAt(i++);return a(t)}function o(e){try{return c.crypto.getRandomValues(e=new Uint8Array(s)),a(e)}catch(e){return[+new Date,c,c.navigator&&c.navigator.plugins,c.screen,a(u)]}}function a(e){return String.fromCharCode.apply(0,e)}var s=256,u=[],c="undefined"===typeof t?window:t,l=Math.pow(s,6),f=Math.pow(2,52),p=2*f,h=s-1,d=Math.random;e.exports=function(t,c){if(c&&!0===c.global)return c.global=!1,Math.random=e.exports(t,c),c.global=!0,Math.random;var h=c&&c.entropy||!1,d=[],m=(i(r(h?[t,a(u)]:0 in arguments?t:o(),3),d),new n(d));return i(a(m.S),u),function(){for(var e=m.g(6),t=l,n=0;e<f;)e=(e+n)*s,t*=s,n=m.g(1);for(;e>=p;)e/=2,t/=2,n>>>=1;return(e+n)/t}},e.exports.resetGlobal=function(){Math.random=d},i(Math.random(),u)}).call(t,n(13))},function(e,t,n){"use strict";function r(e,t,r,i){var o=r(n(114)),a=o("uniform").random;return a.toTex=void 0,a}t.name="random",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,i){var o=r(n(114)),a=o("uniform").randomInt;return a.toTex=void 0,a}t.name="randomInt",t.factory=r},function(e,t,n){"use strict";e.exports=[n(62),n(31),n(182),n(622),n(59),n(623),n(36),n(170),n(44),n(624),n(166)]},function(e,t,n){"use strict";function r(e,t,r,i){function o(e,t){if(Array.isArray(e)){if(Array.isArray(t)){var n=e.length;if(n!==t.length)return!1;for(var r=0;r<n;r++)if(!o(e[r],t[r]))return!1;return!0}return!1}return!Array.isArray(t)&&a(e,t)}var a=r(n(59)),s=i("deepEqual",{"any, any":function(e,t){return o(e.valueOf(),t.valueOf())}});return s.toTex=void 0,s}t.name="deepEqual",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,i){var o=r(n(182)),a=r(n(67)),s=i("equalText",{"any, any":function(e,t){return a(o(e,t))}});return s.toTex=void 0,s}t.name="equalText",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,a){var s=r(n(1)),u=r(n(19)),c=r(n(29)),l=r(n(20)),f=r(n(8)),p=r(n(6)),h=n(4),d=a("smallerEq",{"boolean, boolean":function(e,t){return e<=t},"number, number":function(e,n){return e<=n||i(e,n,t.epsilon)},"BigNumber, BigNumber":function(e,n){return e.lte(n)||o(e,n,t.epsilon)},"Fraction, Fraction":function(e,t){return 1!==e.compare(t)},"Complex, Complex":function(){throw new TypeError("No ordering relation is defined for complex numbers")},"Unit, Unit":function(e,t){if(!e.equalBase(t))throw new Error("Cannot compare units with different base");return d(e.value,t.value)},"SparseMatrix, SparseMatrix":function(e,t){return c(e,t,d)},"SparseMatrix, DenseMatrix":function(e,t){return u(t,e,d,!0)},"DenseMatrix, SparseMatrix":function(e,t){return u(e,t,d,!1)},"DenseMatrix, DenseMatrix":function(e,t){return f(e,t,d)},"Array, Array":function(e,t){return d(s(e),s(t)).valueOf()},"Array, Matrix":function(e,t){return d(s(e),t)},"Matrix, Array":function(e,t){return d(e,s(t))},"SparseMatrix, any":function(e,t){return l(e,t,d,!1)},"DenseMatrix, any":function(e,t){return p(e,t,d,!1)},"any, SparseMatrix":function(e,t){return l(t,e,d,!0)},"any, DenseMatrix":function(e,t){return p(t,e,d,!0)},"Array, any":function(e,t){return p(s(e),t,d,!1).valueOf()},"any, Array":function(e,t){return p(s(t),e,d,!0).valueOf()}});return d.toTex={2:"\\left(${args[0]}"+h.operators.smallerEq+"${args[1]}\\right)"},d}var i=n(3).nearlyEqual,o=n(42);t.name="smallerEq",t.factory=r},function(e,t,n){"use strict";e.exports=[n(626),n(183),n(627),n(184),n(628),n(629),n(630),n(631),n(185),n(632)]},function(e,t,n){"use strict";function r(e,t,r,o){var a=r(n(30)),s=r(n(57)),u=r(n(28)),c=r(n(24)),l=r(n(31));return o("setCartesian",{"Array | Matrix, Array | Matrix":function(e,t){var n=[];if(0!==c(u(e),new a(0))&&0!==c(u(t),new a(0))){var r=i(Array.isArray(e)?e:e.toArray()).sort(l),o=i(Array.isArray(t)?t:t.toArray()).sort(l);n=[];for(var f=0;f<r.length;f++)for(var p=0;p<o.length;p++)n.push([r[f],o[p]])}return Array.isArray(e)&&Array.isArray(t)?n:new s(n)}})}var i=n(2).flatten;t.name="setCartesian",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,o){var a=r(n(30)),s=r(n(57)),u=r(n(28)),c=r(n(24)),l=r(n(31));return o("setDistinct",{"Array | Matrix":function(e){var t=void 0;if(0===c(u(e),new a(0)))t=[];else{var n=i(Array.isArray(e)?e:e.toArray()).sort(l);t=[],t.push(n[0]);for(var r=1;r<n.length;r++)0!==l(n[r],n[r-1])&&t.push(n[r])}return Array.isArray(e)?t:new s(t)}})}var i=n(2).flatten;t.name="setDistinct",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,a){var s=r(n(30)),u=r(n(28)),c=r(n(24)),l=r(n(31));return a("setIsSubset",{"Array | Matrix, Array | Matrix":function(e,t){if(0===c(u(e),new s(0)))return!0;if(0===c(u(t),new s(0)))return!1;for(var n=o(i(Array.isArray(e)?e:e.toArray()).sort(l)),r=o(i(Array.isArray(t)?t:t.toArray()).sort(l)),a=void 0,f=0;f<n.length;f++){a=!1;for(var p=0;p<r.length;p++)if(0===l(n[f].value,r[p].value)&&n[f].identifier===r[p].identifier){a=!0;break}if(!1===a)return!1}return!0}})}var i=n(2).flatten,o=n(2).identify;t.name="setIsSubset",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,o){var a=r(n(31)),s=r(n(30)),u=r(n(28)),c=r(n(24));return o("setMultiplicity",{"number | BigNumber | Fraction | Complex, Array | Matrix":function(e,t){if(0===c(u(t),new s(0)))return 0;for(var n=i(Array.isArray(t)?t:t.toArray()),r=0,o=0;o<n.length;o++)0===a(n[o],e)&&r++;return r}})}var i=n(2).flatten;t.name="setMultiplicity",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,o){function a(e,t){for(var n=[],r=0;r<t.length;r++)"1"===t[r]&&n.push(e[r]);return n}function s(e){for(var t=[],n=e.length-1;n>0;n--)for(var r=0;r<n;r++)e[r].length>e[r+1].length&&(t=e[r],e[r]=e[r+1],e[r+1]=t);return e}var u=r(n(30)),c=r(n(28)),l=r(n(24)),f=r(n(31));return o("setPowerset",{"Array | Matrix":function(e){if(0===l(c(e),new u(0)))return[];for(var t=i(Array.isArray(e)?e:e.toArray()).sort(f),n=[],r=0;r.toString(2).length<=t.length;)n.push(a(t,r.toString(2).split("").reverse())),r++;return s(n)}})}var i=n(2).flatten;t.name="setPowerset",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,o){var a=r(n(31));return o("setSize",{"Array | Matrix":function(e){return Array.isArray(e)?i(e).length:i(e.toArray()).length},"Array | Matrix, boolean":function(e,t){if(!1===t||0===e.length)return Array.isArray(e)?i(e).length:i(e.toArray()).length;for(var n=i(Array.isArray(e)?e:e.toArray()).sort(a),r=1,o=1;o<n.length;o++)0!==a(n[o],n[o-1])&&r++;return r}})}var i=n(2).flatten;t.name="setSize",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,o){var a=r(n(30)),s=r(n(79)),u=r(n(28)),c=r(n(24)),l=r(n(184)),f=r(n(185));return o("setUnion",{"Array | Matrix, Array | Matrix":function(e,t){if(0===c(u(e),new a(0)))return i(t);if(0===c(u(t),new a(0)))return i(e);var n=i(e),r=i(t);return s(f(n,r),l(n,r))}})}var i=n(2).flatten;t.name="setUnion",t.factory=r},function(e,t,n){"use strict";e.exports=[n(634)]},function(e,t,n){"use strict";function r(e,t,n,r){function f(e){var t=e*e,n=u[0][4]*t,r=t,i=void 0;for(i=0;i<3;i+=1)n=(n+u[0][i])*t,r=(r+c[0][i])*t;return e*(n+u[0][3])/(r+c[0][3])}function p(e){var t=u[1][8]*e,n=e,r=void 0;for(r=0;r<7;r+=1)t=(t+u[1][r])*e,n=(n+c[1][r])*e;var i=(t+u[1][7])/(n+c[1][7]),o=parseInt(16*e)/16,a=(e-o)*(e+o);return Math.exp(-o*o)*Math.exp(-a)*i}function h(e){var t=1/(e*e),n=u[2][5]*t,r=t,i=void 0;for(i=0;i<4;i+=1)n=(n+u[2][i])*t,r=(r+c[2][i])*t;var o=t*(n+u[2][4])/(r+c[2][4]);o=(s-o)/e,t=parseInt(16*e)/16;var a=(e-t)*(e+t);return Math.exp(-t*t)*Math.exp(-a)*o}var d=r("erf",{number:function(e){var t=Math.abs(e);return t>=l?o(e):t<=a?o(e)*f(t):t<=4?o(e)*(1-p(t)):o(e)*(1-h(t))},BigNumber:function(t){return new e.BigNumber(d(t.toNumber()))},"Array | Matrix":function(e){return i(e,d)}});return d.toTex={1:"erf\\left(${args[0]}\\right)"},d}var i=n(0),o=n(3).sign,a=.46875,s=.5641895835477563,u=[[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]],c=[[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]],l=Math.pow(2,53);t.name="erf",t.factory=r},function(e,t,n){"use strict";e.exports=[n(636),n(103),n(159),n(186),n(161),n(637),n(638),n(639),n(640),n(181),n(187)]},function(e,t,n){"use strict";function r(e,t,r,o){function a(e){if(e=i(e.valueOf()),0===e.length)throw new Error("Cannot calculate median absolute deviation (mad) of an empty array");try{var t=c(e);return c(u(e,function(e){return s(l(e,t))}))}catch(e){throw e instanceof TypeError&&-1!==e.message.indexOf("median")?new TypeError(e.message.replace("median","mad")):f(e,"mad")}}var s=r(n(25)),u=r(n(180)),c=r(n(186)),l=r(n(16)),f=r(n(40)),p=o("mad",{"Array | Matrix":a,"...":function(e){return a(e)}});return p.toTex=void 0,p}var i=n(2).flatten;t.name="mad",t.factory=r},function(e,t,n){"use strict";function r(e,t,n,r){function o(e){if(e=i(e.valueOf()),0===e.length)throw new Error("Cannot calculate mode of an empty array");var t={},n=[],r=0;for(var o in e)e[o]in t||(t[e[o]]=0),t[e[o]]++,t[e[o]]===r?n.push(e[o]):t[e[o]]>r&&(r=t[e[o]],n=[e[o]]);return n}return r("mode",{"Array | Matrix":o,"...":function(e){return o(e)}})}var i=n(2).flatten;t.name="mode",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,o){function a(e){var t=void 0;if(i(e,function(e){try{t=void 0===t?e:s(t,e)}catch(t){throw u(t,"prod",e)}}),void 0===t)throw new Error("Cannot calculate prod of an empty array");return t}var s=r(n(23)),u=r(n(40)),c=o("prod",{"Array | Matrix":a,"Array | Matrix, number | BigNumber":function(e,t){throw new Error("prod(A, dim) is not yet supported")},"...":function(e){return a(e)}});return c.toTex=void 0,c}var i=n(49);t.name="prod",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,u){function c(t,n,r){var a=void 0,u=void 0,c=void 0;if(arguments.length<2||arguments.length>3)throw new SyntaxError("Function quantileSeq requires two or three parameters");if(s(t)){if("boolean"===typeof(r=r||!1)){if(u=t.valueOf(),o(n)){if(n<0)throw new Error("N/prob must be non-negative");if(n<=1)return l(u,n,r);if(n>1){if(!i(n))throw new Error("N must be a positive integer");var f=n+1;a=new Array(n);for(var p=0;p<n;)a[p]=l(u,++p/f,r);return a}}if(e.isBigNumber(n)){if(n.isNegative())throw new Error("N/prob must be non-negative");if(c=new n.constructor(1),n.lte(c))return l(u,n,r);if(n.gt(c)){if(!n.isInteger())throw new Error("N must be a positive integer");var h=n.toNumber();if(h>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 e.BigNumber(h+1);a=new Array(h);for(var m=0;m<h;)a[m]=l(u,new e.BigNumber(++m).div(d),r);return a}}if(Array.isArray(n)){a=new Array(n.length);for(var g=0;g<a.length;++g){var v=n[g];if(o(v)){if(v<0||v>1)throw new Error("Probability must be between 0 and 1, inclusive")}else{if(!e.isBigNumber(v))throw new TypeError("Unexpected type of argument in function quantileSeq");if(c=new v.constructor(1),v.isNegative()||v.gt(c))throw new Error("Probability must be between 0 and 1, inclusive")}a[g]=l(u,v,r)}return a}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 l(e,t,n){var r=a(e),i=r.length;if(0===i)throw new Error("Cannot calculate quantile of an empty sequence");if(o(t)){var s=t*(i-1),u=s%1;if(0===u){var c=n?r[s]:h(r,s);return m(c),c}var l=Math.floor(s),g=void 0,v=void 0;if(n)g=r[l],v=r[l+1];else{v=h(r,l+1),g=r[l];for(var y=0;y<l;++y)d(r[y],g)>0&&(g=r[y])}return m(g),m(v),f(p(g,1-u),p(v,u))}var b=t.times(i-1);if(b.isInteger()){b=b.toNumber();var x=n?r[b]:h(r,b);return m(x),x}var w=b.floor(),N=b.minus(w),E=w.toNumber(),C=void 0,S=void 0;if(n)C=r[E],S=r[E+1];else{S=h(r,E+1),C=r[E];for(var M=0;M<E;++M)d(r[M],C)>0&&(C=r[M])}m(C),m(S);var T=new N.constructor(1);return f(p(C,T.minus(N)),p(S,N))}var f=r(n(15)),p=r(n(10)),h=r(n(113)),d=r(n(62)),m=u({"number | BigNumber | Unit":function(e){return e}});return c}var i=n(3).isInteger,o=n(3).isNumber,a=n(2).flatten,s=n(61);t.name="quantileSeq",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,i){function o(e,t){if(0===e.length)throw new SyntaxError("Function std requires one or more parameters (0 provided)");try{return a(s.apply(null,arguments))}catch(e){throw e instanceof TypeError&&-1!==e.message.indexOf(" var")?new TypeError(e.message.replace(" var"," std")):e}}var a=r(n(51)),s=r(n(187)),u=i("std",{"Array | Matrix":o,"Array | Matrix, string":o,"...":function(e){return o(e)}});return u.toTex=void 0,u}t.name="std",t.factory=r},function(e,t,n){"use strict";e.exports=[n(140),n(642)]},function(e,t,n){"use strict";function r(e,t,n,r){var o=r("print",{"string, Object | Array":i,"string, Object |\xa0Array, number | Object":i});return o.toTex=void 0,o}function i(e,t,n){return e.replace(/\$([\w.]+)/g,function(e,r){for(var i=r.split("."),s=t[i.shift()];i.length&&void 0!==s;){var u=i.shift();s=u?s[u]:s+"."}return void 0!==s?o(s)?s:a(s,n):e})}var o=n(9).isString,a=n(9).format;t.name="print",t.factory=r},function(e,t,n){"use strict";e.exports=[n(644),n(645),n(646),n(647),n(648),n(649),n(650),n(651),n(652),n(653),n(654),n(655),n(656),n(657),n(658),n(659),n(660),n(661),n(662),n(663),n(664),n(665),n(666),n(667),n(668)]},function(e,t,n){"use strict";function r(e,t,n,r){var o=r("acos",{number:function(n){return n>=-1&&n<=1||t.predictable?Math.acos(n):new e.Complex(n,0).acos()},Complex:function(e){return e.acos()},BigNumber:function(e){return e.acos()},"Array | Matrix":function(e){return i(e,o)}});return o.toTex={1:"\\cos^{-1}\\left(${args[0]}\\right)"},o}var i=n(0);t.name="acos",t.factory=r},function(e,t,n){"use strict";function r(e,t,n,r){var a=r("acosh",{number:function(n){return n>=1||t.predictable?o(n):n<=-1?new e.Complex(Math.log(Math.sqrt(n*n-1)-n),Math.PI):new e.Complex(n,0).acosh()},Complex:function(e){return e.acosh()},BigNumber:function(e){return e.acosh()},"Array | Matrix":function(e){return i(e,a)}});return a.toTex={1:"\\cosh^{-1}\\left(${args[0]}\\right)"},a}var i=n(0),o=Math.acosh||function(e){return Math.log(Math.sqrt(e*e-1)+e)};t.name="acosh",t.factory=r},function(e,t,n){"use strict";function r(e,t,n,r){var o=r("acot",{number:function(e){return Math.atan(1/e)},Complex:function(e){return e.acot()},BigNumber:function(t){return new e.BigNumber(1).div(t).atan()},"Array | Matrix":function(e){return i(e,o)}});return o.toTex={1:"\\cot^{-1}\\left(${args[0]}\\right)"},o}var i=n(0);t.name="acot",t.factory=r},function(e,t,n){"use strict";function r(e,t,n,r){var o=r("acoth",{number:function(n){return n>=1||n<=-1||t.predictable?isFinite(n)?(Math.log((n+1)/n)+Math.log(n/(n-1)))/2:0:new e.Complex(n,0).acoth()},Complex:function(e){return e.acoth()},BigNumber:function(t){return new e.BigNumber(1).div(t).atanh()},"Array | Matrix":function(e){return i(e,o)}});return o.toTex={1:"\\coth^{-1}\\left(${args[0]}\\right)"},o}var i=n(0);t.name="acoth",t.factory=r},function(e,t,n){"use strict";function r(e,t,n,r){var o=r("acsc",{number:function(n){return n<=-1||n>=1||t.predictable?Math.asin(1/n):new e.Complex(n,0).acsc()},Complex:function(e){return e.acsc()},BigNumber:function(t){return new e.BigNumber(1).div(t).asin()},"Array | Matrix":function(e){return i(e,o)}});return o.toTex={1:"\\csc^{-1}\\left(${args[0]}\\right)"},o}var i=n(0);t.name="acsc",t.factory=r},function(e,t,n){"use strict";function r(e,t,n,r){var o=r("acsch",{number:function(e){return e=1/e,Math.log(e+Math.sqrt(e*e+1))},Complex:function(e){return e.acsch()},BigNumber:function(t){return new e.BigNumber(1).div(t).asinh()},"Array | Matrix":function(e){return i(e,o)}});return o.toTex={1:"\\mathrm{csch}^{-1}\\left(${args[0]}\\right)"},o}var i=n(0);t.name="acsch",t.factory=r},function(e,t,n){"use strict";function r(e,t,n,r){var o=r("asec",{number:function(n){return n<=-1||n>=1||t.predictable?Math.acos(1/n):new e.Complex(n,0).asec()},Complex:function(e){return e.asec()},BigNumber:function(t){return new e.BigNumber(1).div(t).acos()},"Array | Matrix":function(e){return i(e,o)}});return o.toTex={1:"\\sec^{-1}\\left(${args[0]}\\right)"},o}var i=n(0);t.name="asec",t.factory=r},function(e,t,n){"use strict";function r(e,t,n,r){var o=r("asech",{number:function(n){if(n<=1&&n>=-1||t.predictable){n=1/n;var r=Math.sqrt(n*n-1);return n>0||t.predictable?Math.log(r+n):new e.Complex(Math.log(r-n),Math.PI)}return new e.Complex(n,0).asech()},Complex:function(e){return e.asech()},BigNumber:function(t){return new e.BigNumber(1).div(t).acosh()},"Array | Matrix":function(e){return i(e,o)}});return o.toTex={1:"\\mathrm{sech}^{-1}\\left(${args[0]}\\right)"},o}var i=n(0);t.name="asech",t.factory=r},function(e,t,n){"use strict";function r(e,t,n,r){var o=r("asin",{number:function(n){return n>=-1&&n<=1||t.predictable?Math.asin(n):new e.Complex(n,0).asin()},Complex:function(e){return e.asin()},BigNumber:function(e){return e.asin()},"Array | Matrix":function(e){return i(e,o,!0)}});return o.toTex={1:"\\sin^{-1}\\left(${args[0]}\\right)"},o}var i=n(0);t.name="asin",t.factory=r},function(e,t,n){"use strict";function r(e,t,n,r){var o=r("asinh",{number:Math.asinh||function(e){return Math.log(Math.sqrt(e*e+1)+e)},Complex:function(e){return e.asinh()},BigNumber:function(e){return e.asinh()},"Array | Matrix":function(e){return i(e,o,!0)}});return o.toTex={1:"\\sinh^{-1}\\left(${args[0]}\\right)"},o}var i=n(0);t.name="asinh",t.factory=r},function(e,t,n){"use strict";function r(e,t,n,r){var o=r("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 i(e,o,!0)}});return o.toTex={1:"\\tan^{-1}\\left(${args[0]}\\right)"},o}var i=n(0);t.name="atan",t.factory=r},function(e,t,n){"use strict";function r(e,t,r,i){var o=r(n(1)),a=r(n(27)),s=r(n(19)),u=r(n(176)),c=r(n(21)),l=r(n(20)),f=r(n(8)),p=r(n(6)),h=i("atan2",{"number, number":Math.atan2,"BigNumber, BigNumber":function(t,n){return e.BigNumber.atan2(t,n)},"SparseMatrix, SparseMatrix":function(e,t){return u(e,t,h,!1)},"SparseMatrix, DenseMatrix":function(e,t){return a(t,e,h,!0)},"DenseMatrix, SparseMatrix":function(e,t){return s(e,t,h,!1)},"DenseMatrix, DenseMatrix":function(e,t){return f(e,t,h)},"Array, Array":function(e,t){return h(o(e),o(t)).valueOf()},"Array, Matrix":function(e,t){return h(o(e),t)},"Matrix, Array":function(e,t){return h(e,o(t))},"SparseMatrix, number | BigNumber":function(e,t){return c(e,t,h,!1)},"DenseMatrix, number | BigNumber":function(e,t){return p(e,t,h,!1)},"number | BigNumber, SparseMatrix":function(e,t){return l(t,e,h,!0)},"number | BigNumber, DenseMatrix":function(e,t){return p(t,e,h,!0)},"Array, number | BigNumber":function(e,t){return p(o(e),t,h,!1).valueOf()},"number | BigNumber, Array":function(e,t){return p(o(t),e,h,!0).valueOf()}});return h.toTex={2:"\\mathrm{atan2}\\left(${args}\\right)"},h}t.name="atan2",t.factory=r},function(e,t,n){"use strict";function r(e,t,n,r){var a=r("atanh",{number:function(n){return n<=1&&n>=-1||t.predictable?o(n):new e.Complex(n,0).atanh()},Complex:function(e){return e.atanh()},BigNumber:function(e){return e.atanh()},"Array | Matrix":function(e){return i(e,a,!0)}});return a.toTex={1:"\\tanh^{-1}\\left(${args[0]}\\right)"},a}var i=n(0),o=Math.atanh||function(e){return Math.log((1+e)/(1-e))/2};t.name="atanh",t.factory=r},function(e,t,n){"use strict";function r(e,t,n,r){var o=r("cos",{number:Math.cos,Complex:function(e){return e.cos()},BigNumber:function(e){return e.cos()},Unit:function(t){if(!t.hasBase(e.Unit.BASE_UNITS.ANGLE))throw new TypeError("Unit in function cos is no angle");return o(t.value)},"Array | Matrix":function(e){return i(e,o)}});return o.toTex={1:"\\cos\\left(${args[0]}\\right)"},o}var i=n(0);t.name="cos",t.factory=r},function(e,t,n){"use strict";function r(e,t,n,r){var a=r("cosh",{number:o,Complex:function(e){return e.cosh()},BigNumber:function(e){return e.cosh()},Unit:function(t){if(!t.hasBase(e.Unit.BASE_UNITS.ANGLE))throw new TypeError("Unit in function cosh is no angle");return a(t.value)},"Array | Matrix":function(e){return i(e,a)}});return a.toTex={1:"\\cosh\\left(${args[0]}\\right)"},a}var i=n(0),o=Math.cosh||function(e){return(Math.exp(e)+Math.exp(-e))/2};t.name="cosh",t.factory=r},function(e,t,n){"use strict";function r(e,t,n,r){var o=r("cot",{number:function(e){return 1/Math.tan(e)},Complex:function(e){return e.cot()},BigNumber:function(t){return new e.BigNumber(1).div(t.tan())},Unit:function(t){if(!t.hasBase(e.Unit.BASE_UNITS.ANGLE))throw new TypeError("Unit in function cot is no angle");return o(t.value)},"Array | Matrix":function(e){return i(e,o)}});return o.toTex={1:"\\cot\\left(${args[0]}\\right)"},o}var i=n(0);t.name="cot",t.factory=r},function(e,t,n){"use strict";function r(e,t,n,r){var a=r("coth",{number:i,Complex:function(e){return e.coth()},BigNumber:function(t){return new e.BigNumber(1).div(t.tanh())},Unit:function(t){if(!t.hasBase(e.Unit.BASE_UNITS.ANGLE))throw new TypeError("Unit in function coth is no angle");return a(t.value)},"Array | Matrix":function(e){return o(e,a)}});return a.toTex={1:"\\coth\\left(${args[0]}\\right)"},a}function i(e){var t=Math.exp(2*e);return(t+1)/(t-1)}var o=n(0);t.name="coth",t.factory=r},function(e,t,n){"use strict";function r(e,t,n,r){var o=r("csc",{number:function(e){return 1/Math.sin(e)},Complex:function(e){return e.csc()},BigNumber:function(t){return new e.BigNumber(1).div(t.sin())},Unit:function(t){if(!t.hasBase(e.Unit.BASE_UNITS.ANGLE))throw new TypeError("Unit in function csc is no angle");return o(t.value)},"Array | Matrix":function(e){return i(e,o)}});return o.toTex={1:"\\csc\\left(${args[0]}\\right)"},o}var i=n(0);t.name="csc",t.factory=r},function(e,t,n){"use strict";function r(e,t,n,r){var a=r("csch",{number:i,Complex:function(e){return e.csch()},BigNumber:function(t){return new e.BigNumber(1).div(t.sinh())},Unit:function(t){if(!t.hasBase(e.Unit.BASE_UNITS.ANGLE))throw new TypeError("Unit in function csch is no angle");return a(t.value)},"Array | Matrix":function(e){return o(e,a)}});return a.toTex={1:"\\mathrm{csch}\\left(${args[0]}\\right)"},a}function i(e){return 0===e?Number.POSITIVE_INFINITY:Math.abs(2/(Math.exp(e)-Math.exp(-e)))*a(e)}var o=n(0),a=n(3).sign;t.name="csch",t.factory=r},function(e,t,n){"use strict";function r(e,t,n,r){var o=r("sec",{number:function(e){return 1/Math.cos(e)},Complex:function(e){return e.sec()},BigNumber:function(t){return new e.BigNumber(1).div(t.cos())},Unit:function(t){if(!t.hasBase(e.Unit.BASE_UNITS.ANGLE))throw new TypeError("Unit in function sec is no angle");return o(t.value)},"Array | Matrix":function(e){return i(e,o)}});return o.toTex={1:"\\sec\\left(${args[0]}\\right)"},o}var i=n(0);t.name="sec",t.factory=r},function(e,t,n){"use strict";function r(e,t,n,r){var a=r("sech",{number:i,Complex:function(e){return e.sech()},BigNumber:function(t){return new e.BigNumber(1).div(t.cosh())},Unit:function(t){if(!t.hasBase(e.Unit.BASE_UNITS.ANGLE))throw new TypeError("Unit in function sech is no angle");return a(t.value)},"Array | Matrix":function(e){return o(e,a)}});return a.toTex={1:"\\mathrm{sech}\\left(${args[0]}\\right)"},a}function i(e){return 2/(Math.exp(e)+Math.exp(-e))}var o=n(0);t.name="sech",t.factory=r},function(e,t,n){"use strict";function r(e,t,n,r){var o=r("sin",{number:Math.sin,Complex:function(e){return e.sin()},BigNumber:function(e){return e.sin()},Unit:function(t){if(!t.hasBase(e.Unit.BASE_UNITS.ANGLE))throw new TypeError("Unit in function sin is no angle");return o(t.value)},"Array | Matrix":function(e){return i(e,o,!0)}});return o.toTex={1:"\\sin\\left(${args[0]}\\right)"},o}var i=n(0);t.name="sin",t.factory=r},function(e,t,n){"use strict";function r(e,t,n,r){var a=r("sinh",{number:o,Complex:function(e){return e.sinh()},BigNumber:function(e){return e.sinh()},Unit:function(t){if(!t.hasBase(e.Unit.BASE_UNITS.ANGLE))throw new TypeError("Unit in function sinh is no angle");return a(t.value)},"Array | Matrix":function(e){return i(e,a,!0)}});return a.toTex={1:"\\sinh\\left(${args[0]}\\right)"},a}var i=n(0),o=Math.sinh||function(e){return(Math.exp(e)-Math.exp(-e))/2};t.name="sinh",t.factory=r},function(e,t,n){"use strict";function r(e,t,n,r){var o=r("tan",{number:Math.tan,Complex:function(e){return e.tan()},BigNumber:function(e){return e.tan()},Unit:function(t){if(!t.hasBase(e.Unit.BASE_UNITS.ANGLE))throw new TypeError("Unit in function tan is no angle");return o(t.value)},"Array | Matrix":function(e){return i(e,o,!0)}});return o.toTex={1:"\\tan\\left(${args[0]}\\right)"},o}var i=n(0);t.name="tan",t.factory=r},function(e,t,n){"use strict";function r(e,t,n,r){var a=r("tanh",{number:o,Complex:function(e){return e.tanh()},BigNumber:function(e){return e.tanh()},Unit:function(t){if(!t.hasBase(e.Unit.BASE_UNITS.ANGLE))throw new TypeError("Unit in function tanh is no angle");return a(t.value)},"Array | Matrix":function(e){return i(e,a,!0)}});return a.toTex={1:"\\tanh\\left(${args[0]}\\right)"},a}var i=n(0),o=Math.tanh||function(e){var t=Math.exp(2*e);return(t-1)/(t+1)};t.name="tanh",t.factory=r},function(e,t,n){"use strict";e.exports=[n(670)]},function(e,t,n){"use strict";function r(e,t,r,i){var o=n(4),a=r(n(1)),s=r(n(8)),u=r(n(6)),c=i("to",{"Unit, Unit | string":function(e,t){return e.to(t)},"Matrix, Matrix":function(e,t){return s(e,t,c)},"Array, Array":function(e,t){return c(a(e),a(t)).valueOf()},"Array, Matrix":function(e,t){return c(a(e),t)},"Matrix, Array":function(e,t){return c(e,a(t))},"Matrix, any":function(e,t){return u(e,t,c,!1)},"any, Matrix":function(e,t){return u(t,e,c,!0)},"Array, any":function(e,t){return u(a(e),t,c,!1).valueOf()},"any, Array":function(e,t){return u(a(t),e,c,!0).valueOf()}});return c.toTex={2:"\\left(${args[0]}"+o.operators.to+"${args[1]}\\right)"},c}t.name="to",t.factory=r},function(e,t,n){"use strict";e.exports=[n(672),n(39),n(68),n(101),n(84),n(673),n(67),n(674),n(38)]},function(e,t,n){"use strict";function r(e,t,n,r){var o=r("clone",{any:i.clone});return o.toTex=void 0,o}var i=n(5);t.name="clone",t.factory=r},function(e,t,n){"use strict";function r(e,t,n,r){var o=r("isPrime",{number:function(e){if(e<2)return!1;if(2===e)return!0;if(e%2===0)return!1;for(var t=3;t*t<=e;t+=2)if(e%t===0)return!1;return!0},BigNumber:function(t){if(t.lt(2))return!1;if(t.equals(2))return!0;if(t.mod(2).isZero())return!1;for(var n=e.BigNumber(3);n.times(n).lte(t);n=n.plus(1))if(t.mod(n).isZero())return!1;return!0},"Array | Matrix":function(e){return i(e,o)}});return o}var i=n(0);t.name="isPrime",t.factory=r},function(e,t,n){"use strict";function r(e,t,n,r){return r("isNaN",{number:function(e){return Number.isNaN(e)},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 i(e,Number.isNaN)}})}var i=n(0);t.name="isNaN",t.factory=r},function(e,t,n){"use strict";e.exports=[n(676)]},function(e,t,n){"use strict";function r(e,t,n,r,i){return function(t,n){var r=e[n&&n.mathjs]||i.expression&&i.expression.node[n&&n.mathjs];return r&&"function"===typeof r.fromJSON?r.fromJSON(n):n}}t.name="reviver",t.path="json",t.factory=r,t.math=!0},function(e,t,n){"use strict";var r=n(56),i=n(12),o=n(63);e.exports=[{name:"ArgumentsError",path:"error",factory:function(){return r}},{name:"DimensionError",path:"error",factory:function(){return i}},{name:"IndexError",path:"error",factory:function(){return o}}]},function(e,t,n){e.exports={Bar:n(679),Doughnut:n(684),Line:n(685),Pie:n(686),PolarArea:n(687),Radar:n(688),createClass:n(52).createClass}},function(e,t,n){var r=n(52);e.exports=r.createClass("Bar",["getBarsAtEvent"])},function(e,t,n){"use strict";var r=n(7),i=n(681);if("undefined"===typeof r)throw Error("create-react-class could not find the React object. If you are using script tags, make sure that React is being loaded before create-react-class.");var o=(new r.Component).updater;e.exports=i(r.Component,r.isValidElement,o)},function(e,t,n){"use strict";function r(e){return e}function i(e,t,n){function i(e,t){var n=y.hasOwnProperty(t)?y[t]:null;E.hasOwnProperty(t)&&s("OVERRIDE_BASE"===n,"ReactClassInterface: You are attempting to override `%s` from your class specification. Ensure that your method names do not overlap with React methods.",t),e&&s("DEFINE_MANY"===n||"DEFINE_MANY_MERGED"===n,"ReactClassInterface: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",t)}function c(e,n){if(n){s("function"!==typeof n,"ReactClass: You're attempting to use a component class or function as a mixin. Instead, just use a regular object."),s(!t(n),"ReactClass: You're attempting to use a component as a mixin. Instead, just use a regular object.");var r=e.prototype,o=r.__reactAutoBindPairs;n.hasOwnProperty(u)&&x.mixins(e,n.mixins);for(var a in n)if(n.hasOwnProperty(a)&&a!==u){var c=n[a],l=r.hasOwnProperty(a);if(i(l,a),x.hasOwnProperty(a))x[a](e,c);else{var f=y.hasOwnProperty(a),d="function"===typeof c,m=d&&!f&&!l&&!1!==n.autobind;if(m)o.push(a,c),r[a]=c;else if(l){var g=y[a];s(f&&("DEFINE_MANY_MERGED"===g||"DEFINE_MANY"===g),"ReactClass: Unexpected spec policy %s for key %s when mixing in component specs.",g,a),"DEFINE_MANY_MERGED"===g?r[a]=p(r[a],c):"DEFINE_MANY"===g&&(r[a]=h(r[a],c))}else r[a]=c}}}else;}function l(e,t){if(t)for(var n in t){var r=t[n];if(t.hasOwnProperty(n)){var i=n in x;s(!i,'ReactClass: You are attempting to define a reserved property, `%s`, that shouldn\'t be on the "statics" key. Define it as an instance property instead; it will still be accessible on the constructor.',n);var o=n in e;if(o){var a=b.hasOwnProperty(n)?b[n]:null;return s("DEFINE_MANY_MERGED"===a,"ReactClass: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",n),void(e[n]=p(e[n],r))}e[n]=r}}}function f(e,t){s(e&&t&&"object"===typeof e&&"object"===typeof t,"mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.");for(var n in t)t.hasOwnProperty(n)&&(s(void 0===e[n],"mergeIntoWithNoDuplicateKeys(): Tried to merge two objects with the same key: `%s`. This conflict may be due to a mixin; in particular, this may be caused by two getInitialState() or getDefaultProps() methods returning objects with clashing keys.",n),e[n]=t[n]);return e}function p(e,t){return function(){var n=e.apply(this,arguments),r=t.apply(this,arguments);if(null==n)return r;if(null==r)return n;var i={};return f(i,n),f(i,r),i}}function h(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function d(e,t){var n=t.bind(e);return n}function m(e){for(var t=e.__reactAutoBindPairs,n=0;n<t.length;n+=2){var r=t[n],i=t[n+1];e[r]=d(e,i)}}function g(e){var t=r(function(e,r,i){this.__reactAutoBindPairs.length&&m(this),this.props=e,this.context=r,this.refs=a,this.updater=i||n,this.state=null;var o=this.getInitialState?this.getInitialState():null;s("object"===typeof o&&!Array.isArray(o),"%s.getInitialState(): must return an object or null",t.displayName||"ReactCompositeComponent"),this.state=o});t.prototype=new C,t.prototype.constructor=t,t.prototype.__reactAutoBindPairs=[],v.forEach(c.bind(null,t)),c(t,w),c(t,e),c(t,N),t.getDefaultProps&&(t.defaultProps=t.getDefaultProps()),s(t.prototype.render,"createClass(...): Class specification must implement a `render` method.");for(var i in y)t.prototype[i]||(t.prototype[i]=null);return t}var v=[],y={mixins:"DEFINE_MANY",statics:"DEFINE_MANY",propTypes:"DEFINE_MANY",contextTypes:"DEFINE_MANY",childContextTypes:"DEFINE_MANY",getDefaultProps:"DEFINE_MANY_MERGED",getInitialState:"DEFINE_MANY_MERGED",getChildContext:"DEFINE_MANY_MERGED",render:"DEFINE_ONCE",componentWillMount:"DEFINE_MANY",componentDidMount:"DEFINE_MANY",componentWillReceiveProps:"DEFINE_MANY",shouldComponentUpdate:"DEFINE_ONCE",componentWillUpdate:"DEFINE_MANY",componentDidUpdate:"DEFINE_MANY",componentWillUnmount:"DEFINE_MANY",UNSAFE_componentWillMount:"DEFINE_MANY",UNSAFE_componentWillReceiveProps:"DEFINE_MANY",UNSAFE_componentWillUpdate:"DEFINE_MANY",updateComponent:"OVERRIDE_BASE"},b={getDerivedStateFromProps:"DEFINE_MANY_MERGED"},x={displayName:function(e,t){e.displayName=t},mixins:function(e,t){if(t)for(var n=0;n<t.length;n++)c(e,t[n])},childContextTypes:function(e,t){e.childContextTypes=o({},e.childContextTypes,t)},contextTypes:function(e,t){e.contextTypes=o({},e.contextTypes,t)},getDefaultProps:function(e,t){e.getDefaultProps?e.getDefaultProps=p(e.getDefaultProps,t):e.getDefaultProps=t},propTypes:function(e,t){e.propTypes=o({},e.propTypes,t)},statics:function(e,t){l(e,t)},autobind:function(){}},w={componentDidMount:function(){this.__isMounted=!0}},N={componentWillUnmount:function(){this.__isMounted=!1}},E={replaceState:function(e,t){this.updater.enqueueReplaceState(this,e,t)},isMounted:function(){return!!this.__isMounted}},C=function(){};return o(C.prototype,e.prototype,E),g}var o=n(69),a=n(88),s=n(70),u="mixins";e.exports=i},function(e,t,n){var r,i;(function(){"use strict";var o=this,a=o.Chart,s=function(e){this.canvas=e.canvas,this.ctx=e;var t=function(e,t){return e["offset"+t]?e["offset"+t]:document.defaultView.getComputedStyle(e).getPropertyValue(t)};this.width=t(e.canvas,"Width")||e.canvas.width,this.height=t(e.canvas,"Height")||e.canvas.height;return this.aspectRatio=this.width/this.height,u.retinaScale(this),this};s.defaults={global:{animation:!0,animationSteps:60,animationEasing:"easeOutQuart",showScale:!0,scaleOverride:!1,scaleSteps:null,scaleStepWidth:null,scaleStartValue:null,scaleLineColor:"rgba(0,0,0,.1)",scaleLineWidth:1,scaleShowLabels:!0,scaleLabel:"<%=value%>",scaleIntegersOnly:!0,scaleBeginAtZero:!1,scaleFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",scaleFontSize:12,scaleFontStyle:"normal",scaleFontColor:"#666",responsive:!1,maintainAspectRatio:!0,showTooltips:!0,customTooltips:!1,tooltipEvents:["mousemove","touchstart","touchmove","mouseout"],tooltipFillColor:"rgba(0,0,0,0.8)",tooltipFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",tooltipFontSize:14,tooltipFontStyle:"normal",tooltipFontColor:"#fff",tooltipTitleFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",tooltipTitleFontSize:14,tooltipTitleFontStyle:"bold",tooltipTitleFontColor:"#fff",tooltipTitleTemplate:"<%= label%>",tooltipYPadding:6,tooltipXPadding:6,tooltipCaretSize:8,tooltipCornerRadius:6,tooltipXOffset:10,tooltipTemplate:"<%if (label){%><%=label%>: <%}%><%= value %>",multiTooltipTemplate:"<%= datasetLabel %>: <%= value %>",multiTooltipKeyBackground:"#fff",segmentColorDefault:["#A6CEE3","#1F78B4","#B2DF8A","#33A02C","#FB9A99","#E31A1C","#FDBF6F","#FF7F00","#CAB2D6","#6A3D9A","#B4B482","#B15928"],segmentHighlightColorDefaults:["#CEF6FF","#47A0DC","#DAFFB2","#5BC854","#FFC2C1","#FF4244","#FFE797","#FFA728","#F2DAFE","#9265C2","#DCDCAA","#D98150"],onAnimationProgress:function(){},onAnimationComplete:function(){}}},s.types={};var u=s.helpers={},c=u.each=function(e,t,n){var r=Array.prototype.slice.call(arguments,3);if(e)if(e.length===+e.length){var i;for(i=0;i<e.length;i++)t.apply(n,[e[i],i].concat(r))}else for(var o in e)t.apply(n,[e[o],o].concat(r))},l=u.clone=function(e){var t={};return c(e,function(n,r){e.hasOwnProperty(r)&&(t[r]=n)}),t},f=u.extend=function(e){return c(Array.prototype.slice.call(arguments,1),function(t){c(t,function(n,r){t.hasOwnProperty(r)&&(e[r]=n)})}),e},p=u.merge=function(e,t){var n=Array.prototype.slice.call(arguments,0);return n.unshift({}),f.apply(null,n)},h=u.indexOf=function(e,t){if(Array.prototype.indexOf)return e.indexOf(t);for(var n=0;n<e.length;n++)if(e[n]===t)return n;return-1},d=(u.where=function(e,t){var n=[];return u.each(e,function(e){t(e)&&n.push(e)}),n},u.findNextWhere=function(e,t,n){n||(n=-1);for(var r=n+1;r<e.length;r++){var i=e[r];if(t(i))return i}},u.findPreviousWhere=function(e,t,n){n||(n=e.length);for(var r=n-1;r>=0;r--){var i=e[r];if(t(i))return i}},u.inherits=function(e){var t=this,n=e&&e.hasOwnProperty("constructor")?e.constructor:function(){return t.apply(this,arguments)},r=function(){this.constructor=n};return r.prototype=t.prototype,n.prototype=new r,n.extend=d,e&&f(n.prototype,e),n.__super__=t.prototype,n}),m=u.noop=function(){},g=u.uid=function(){var e=0;return function(){return"chart-"+e++}}(),v=u.warn=function(e){window.console&&"function"===typeof window.console.warn&&console.warn(e)},y=u.amd=n(683),b=u.isNumber=function(e){return!isNaN(parseFloat(e))&&isFinite(e)},x=u.max=function(e){return Math.max.apply(Math,e)},w=u.min=function(e){return Math.min.apply(Math,e)},N=(u.cap=function(e,t,n){if(b(t)){if(e>t)return t}else if(b(n)&&e<n)return n;return e},u.getDecimalPlaces=function(e){if(e%1!==0&&b(e)){var t=e.toString();if(t.indexOf("e-")<0)return t.split(".")[1].length;if(t.indexOf(".")<0)return parseInt(t.split("e-")[1]);var n=t.split(".")[1].split("e-");return n[0].length+parseInt(n[1])}return 0}),E=u.radians=function(e){return e*(Math.PI/180)},C=(u.getAngleFromPoint=function(e,t){var n=t.x-e.x,r=t.y-e.y,i=Math.sqrt(n*n+r*r),o=2*Math.PI+Math.atan2(r,n);return n<0&&r<0&&(o+=2*Math.PI),{angle:o,distance:i}},u.aliasPixel=function(e){return e%2===0?0:.5}),S=(u.splineCurve=function(e,t,n,r){var i=Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)),o=Math.sqrt(Math.pow(n.x-t.x,2)+Math.pow(n.y-t.y,2)),a=r*i/(i+o),s=r*o/(i+o);return{inner:{x:t.x-a*(n.x-e.x),y:t.y-a*(n.y-e.y)},outer:{x:t.x+s*(n.x-e.x),y:t.y+s*(n.y-e.y)}}},u.calculateOrderOfMagnitude=function(e){return Math.floor(Math.log(e)/Math.LN10)}),M=(u.calculateScaleRange=function(e,t,n,r,i){var o=Math.floor(t/(1.5*n)),a=2>=o,s=[];c(e,function(e){null==e||s.push(e)});var u=w(s),l=x(s);l===u&&(l+=.5,u>=.5&&!r?u-=.5:l+=.5);for(var f=Math.abs(l-u),p=S(f),h=Math.ceil(l/(1*Math.pow(10,p)))*Math.pow(10,p),d=r?0:Math.floor(u/(1*Math.pow(10,p)))*Math.pow(10,p),m=h-d,g=Math.pow(10,p),v=Math.round(m/g);(v>o||2*v<o)&&!a;)if(v>o)g*=2,(v=Math.round(m/g))%1!==0&&(a=!0);else if(i&&p>=0){if(g/2%1!==0)break;g/=2,v=Math.round(m/g)}else g/=2,v=Math.round(m/g);return a&&(v=2,g=m/v),{steps:v,stepValue:g,min:d,max:d+v*g}},u.template=function(e,t){if(e instanceof Function)return e(t);var n={};return function(e,t){var r=/\W/.test(e)?new Function("obj","var p=[],print=function(){p.push.apply(p,arguments);};with(obj){p.push('"+e.replace(/[\r\t\n]/g," ").split("<%").join("\t").replace(/((^|%>)[^\t]*)'/g,"$1\r").replace(/\t=(.*?)%>/g,"',$1,'").split("\t").join("');").split("%>").join("p.push('").split("\r").join("\\'")+"');}return p.join('');"):n[e]=n[e];return t?r(t):r}(e,t)}),T=(u.generateLabels=function(e,t,n,r){var i=new Array(t);return e&&c(i,function(t,o){i[o]=M(e,{value:n+r*(o+1)})}),i},u.easingEffects={linear:function(e){return e},easeInQuad:function(e){return e*e},easeOutQuad:function(e){return-1*e*(e-2)},easeInOutQuad:function(e){return(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1)},easeInCubic:function(e){return e*e*e},easeOutCubic:function(e){return 1*((e=e/1-1)*e*e+1)},easeInOutCubic:function(e){return(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},easeInQuart:function(e){return e*e*e*e},easeOutQuart:function(e){return-1*((e=e/1-1)*e*e*e-1)},easeInOutQuart:function(e){return(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},easeInQuint:function(e){return 1*(e/=1)*e*e*e*e},easeOutQuint:function(e){return 1*((e=e/1-1)*e*e*e*e+1)},easeInOutQuint:function(e){return(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},easeInSine:function(e){return-1*Math.cos(e/1*(Math.PI/2))+1},easeOutSine:function(e){return 1*Math.sin(e/1*(Math.PI/2))},easeInOutSine:function(e){return-.5*(Math.cos(Math.PI*e/1)-1)},easeInExpo:function(e){return 0===e?1:1*Math.pow(2,10*(e/1-1))},easeOutExpo:function(e){return 1===e?1:1*(1-Math.pow(2,-10*e/1))},easeInOutExpo:function(e){return 0===e?0:1===e?1:(e/=.5)<1?.5*Math.pow(2,10*(e-1)):.5*(2-Math.pow(2,-10*--e))},easeInCirc:function(e){return e>=1?e:-1*(Math.sqrt(1-(e/=1)*e)-1)},easeOutCirc:function(e){return 1*Math.sqrt(1-(e=e/1-1)*e)},easeInOutCirc:function(e){return(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},easeInElastic:function(e){var t=1.70158,n=0,r=1;return 0===e?0:1==(e/=1)?1:(n||(n=.3),r<Math.abs(1)?(r=1,t=n/4):t=n/(2*Math.PI)*Math.asin(1/r),-r*Math.pow(2,10*(e-=1))*Math.sin((1*e-t)*(2*Math.PI)/n))},easeOutElastic:function(e){var t=1.70158,n=0,r=1;return 0===e?0:1==(e/=1)?1:(n||(n=.3),r<Math.abs(1)?(r=1,t=n/4):t=n/(2*Math.PI)*Math.asin(1/r),r*Math.pow(2,-10*e)*Math.sin((1*e-t)*(2*Math.PI)/n)+1)},easeInOutElastic:function(e){var t=1.70158,n=0,r=1;return 0===e?0:2==(e/=.5)?1:(n||(n=.3*1.5*1),r<Math.abs(1)?(r=1,t=n/4):t=n/(2*Math.PI)*Math.asin(1/r),e<1?r*Math.pow(2,10*(e-=1))*Math.sin((1*e-t)*(2*Math.PI)/n)*-.5:r*Math.pow(2,-10*(e-=1))*Math.sin((1*e-t)*(2*Math.PI)/n)*.5+1)},easeInBack:function(e){var t=1.70158;return 1*(e/=1)*e*((t+1)*e-t)},easeOutBack:function(e){var t=1.70158;return 1*((e=e/1-1)*e*((t+1)*e+t)+1)},easeInOutBack:function(e){var t=1.70158;return(e/=.5)<1?e*e*((1+(t*=1.525))*e-t)*.5:.5*((e-=2)*e*((1+(t*=1.525))*e+t)+2)},easeInBounce:function(e){return 1-T.easeOutBounce(1-e)},easeOutBounce:function(e){return(e/=1)<1/2.75?7.5625*e*e*1:e<2/2.75?1*(7.5625*(e-=1.5/2.75)*e+.75):e<2.5/2.75?1*(7.5625*(e-=2.25/2.75)*e+.9375):1*(7.5625*(e-=2.625/2.75)*e+.984375)},easeInOutBounce:function(e){return e<.5?.5*T.easeInBounce(2*e):.5*T.easeOutBounce(2*e-1)+.5}}),O=u.requestAnimFrame=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(e){return window.setTimeout(e,1e3/60)}}(),k=(u.cancelAnimFrame=function(){return window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.oCancelAnimationFrame||window.msCancelAnimationFrame||function(e){return window.clearTimeout(e,1e3/60)}}(),u.animationLoop=function(e,t,n,r,i,o){var a=0,s=T[n]||T.linear,u=function(){a++;var n=a/t,c=s(n);e.call(o,c,n,a),r.call(o,c,n),a<t?o.animationFrame=O(u):i.apply(o)};O(u)},u.getRelativePosition=function(e){var t,n,r=e.originalEvent||e,i=e.currentTarget||e.srcElement,o=i.getBoundingClientRect();return r.touches?(t=r.touches[0].clientX-o.left,n=r.touches[0].clientY-o.top):(t=r.clientX-o.left,n=r.clientY-o.top),{x:t,y:n}},u.addEvent=function(e,t,n){e.addEventListener?e.addEventListener(t,n):e.attachEvent?e.attachEvent("on"+t,n):e["on"+t]=n}),A=u.removeEvent=function(e,t,n){e.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent?e.detachEvent("on"+t,n):e["on"+t]=m},_=(u.bindEvents=function(e,t,n){e.events||(e.events={}),c(t,function(t){e.events[t]=function(){n.apply(e,arguments)},k(e.chart.canvas,t,e.events[t])})},u.unbindEvents=function(e,t){c(t,function(t,n){A(e.chart.canvas,n,t)})}),P=u.getMaximumWidth=function(e){var t=e.parentNode,n=parseInt(I(t,"padding-left"))+parseInt(I(t,"padding-right"));return t?t.clientWidth-n:0},R=u.getMaximumHeight=function(e){var t=e.parentNode,n=parseInt(I(t,"padding-bottom"))+parseInt(I(t,"padding-top"));return t?t.clientHeight-n:0},I=u.getStyle=function(e,t){return e.currentStyle?e.currentStyle[t]:document.defaultView.getComputedStyle(e,null).getPropertyValue(t)},F=(u.getMaximumSize=u.getMaximumWidth,u.retinaScale=function(e){var t=e.ctx,n=e.canvas.width,r=e.canvas.height;window.devicePixelRatio&&(t.canvas.style.width=n+"px",t.canvas.style.height=r+"px",t.canvas.height=r*window.devicePixelRatio,t.canvas.width=n*window.devicePixelRatio,t.scale(window.devicePixelRatio,window.devicePixelRatio))}),D=u.clear=function(e){e.ctx.clearRect(0,0,e.width,e.height)},L=u.fontString=function(e,t,n){return t+" "+e+"px "+n},B=u.longestText=function(e,t,n){e.font=t;var r=0;return c(n,function(t){var n=e.measureText(t).width;r=n>r?n:r}),r},z=u.drawRoundedRectangle=function(e,t,n,r,i,o){e.beginPath(),e.moveTo(t+o,n),e.lineTo(t+r-o,n),e.quadraticCurveTo(t+r,n,t+r,n+o),e.lineTo(t+r,n+i-o),e.quadraticCurveTo(t+r,n+i,t+r-o,n+i),e.lineTo(t+o,n+i),e.quadraticCurveTo(t,n+i,t,n+i-o),e.lineTo(t,n+o),e.quadraticCurveTo(t,n,t+o,n),e.closePath()};s.instances={},s.Type=function(e,t,n){this.options=t,this.chart=n,this.id=g(),s.instances[this.id]=this,t.responsive&&this.resize(),this.initialize.call(this,e)},f(s.Type.prototype,{initialize:function(){return this},clear:function(){return D(this.chart),this},stop:function(){return s.animationService.cancelAnimation(this),this},resize:function(e){this.stop();var t=this.chart.canvas,n=P(this.chart.canvas),r=this.options.maintainAspectRatio?n/this.chart.aspectRatio:R(this.chart.canvas);return t.width=this.chart.width=n,t.height=this.chart.height=r,F(this.chart),"function"===typeof e&&e.apply(this,Array.prototype.slice.call(arguments,1)),this},reflow:m,render:function(e){if(e&&this.reflow(),this.options.animation&&!e){var t=new s.Animation;t.numSteps=this.options.animationSteps,t.easing=this.options.animationEasing,t.render=function(e,t){var n=u.easingEffects[t.easing],r=t.currentStep/t.numSteps,i=n(r);e.draw(i,r,t.currentStep)},t.onAnimationProgress=this.options.onAnimationProgress,t.onAnimationComplete=this.options.onAnimationComplete,s.animationService.addAnimation(this,t)}else this.draw(),this.options.onAnimationComplete.call(this);return this},generateLegend:function(){return u.template(this.options.legendTemplate,this)},destroy:function(){this.stop(),this.clear(),_(this,this.events);var e=this.chart.canvas;e.width=this.chart.width,e.height=this.chart.height,e.style.removeProperty?(e.style.removeProperty("width"),e.style.removeProperty("height")):(e.style.removeAttribute("width"),e.style.removeAttribute("height")),delete s.instances[this.id]},showTooltip:function(e,t){if("undefined"===typeof this.activeElements&&(this.activeElements=[]),function(e){var t=!1;return e.length!==this.activeElements.length?t=!0:(c(e,function(e,n){e!==this.activeElements[n]&&(t=!0)},this),t)}.call(this,e)||t){if(this.activeElements=e,this.draw(),this.options.customTooltips&&this.options.customTooltips(!1),e.length>0)if(this.datasets&&this.datasets.length>1){for(var n,r,i=this.datasets.length-1;i>=0&&(n=this.datasets[i].points||this.datasets[i].bars||this.datasets[i].segments,-1===(r=h(n,e[0])));i--);var o=[],a=[],l=function(e){var t,n,i,s,c,l=[],f=[],p=[];return u.each(this.datasets,function(e){t=e.points||e.bars||e.segments,t[r]&&t[r].hasValue()&&l.push(t[r])}),u.each(l,function(e){f.push(e.x),p.push(e.y),o.push(u.template(this.options.multiTooltipTemplate,e)),a.push({fill:e._saved.fillColor||e.fillColor,stroke:e._saved.strokeColor||e.strokeColor})},this),c=w(p),i=x(p),s=w(f),n=x(f),{x:s>this.chart.width/2?s:n,y:(c+i)/2}}.call(this,r);new s.MultiTooltip({x:l.x,y:l.y,xPadding:this.options.tooltipXPadding,yPadding:this.options.tooltipYPadding,xOffset:this.options.tooltipXOffset,fillColor:this.options.tooltipFillColor,textColor:this.options.tooltipFontColor,fontFamily:this.options.tooltipFontFamily,fontStyle:this.options.tooltipFontStyle,fontSize:this.options.tooltipFontSize,titleTextColor:this.options.tooltipTitleFontColor,titleFontFamily:this.options.tooltipTitleFontFamily,titleFontStyle:this.options.tooltipTitleFontStyle,titleFontSize:this.options.tooltipTitleFontSize,cornerRadius:this.options.tooltipCornerRadius,labels:o,legendColors:a,legendColorBackground:this.options.multiTooltipKeyBackground,title:M(this.options.tooltipTitleTemplate,e[0]),chart:this.chart,ctx:this.chart.ctx,custom:this.options.customTooltips}).draw()}else c(e,function(e){var t=e.tooltipPosition();new s.Tooltip({x:Math.round(t.x),y:Math.round(t.y),xPadding:this.options.tooltipXPadding,yPadding:this.options.tooltipYPadding,fillColor:this.options.tooltipFillColor,textColor:this.options.tooltipFontColor,fontFamily:this.options.tooltipFontFamily,fontStyle:this.options.tooltipFontStyle,fontSize:this.options.tooltipFontSize,caretHeight:this.options.tooltipCaretSize,cornerRadius:this.options.tooltipCornerRadius,text:M(this.options.tooltipTemplate,e),chart:this.chart,custom:this.options.customTooltips}).draw()},this);return this}},toBase64Image:function(){return this.chart.canvas.toDataURL.apply(this.chart.canvas,arguments)}}),s.Type.extend=function(e){var t=this,n=function(){return t.apply(this,arguments)};if(n.prototype=l(t.prototype),f(n.prototype,e),n.extend=s.Type.extend,e.name||t.prototype.name){var r=e.name||t.prototype.name,i=s.defaults[t.prototype.name]?l(s.defaults[t.prototype.name]):{};s.defaults[r]=f(i,e.defaults),s.types[r]=n,s.prototype[r]=function(e,t){var i=p(s.defaults.global,s.defaults[r],t||{});return new n(e,i,this)}}else v("Name not provided for this chart, so it hasn't been registered");return t},s.Element=function(e){f(this,e),this.initialize.apply(this,arguments),this.save()},f(s.Element.prototype,{initialize:function(){},restore:function(e){return e?c(e,function(e){this[e]=this._saved[e]},this):f(this,this._saved),this},save:function(){return this._saved=l(this),delete this._saved._saved,this},update:function(e){return c(e,function(e,t){this._saved[t]=this[t],this[t]=e},this),this},transition:function(e,t){return c(e,function(e,n){this[n]=(e-this._saved[n])*t+this._saved[n]},this),this},tooltipPosition:function(){return{x:this.x,y:this.y}},hasValue:function(){return b(this.value)}}),s.Element.extend=d,s.Point=s.Element.extend({display:!0,inRange:function(e,t){var n=this.hitDetectionRadius+this.radius;return Math.pow(e-this.x,2)+Math.pow(t-this.y,2)<Math.pow(n,2)},draw:function(){if(this.display){var e=this.ctx;e.beginPath(),e.arc(this.x,this.y,this.radius,0,2*Math.PI),e.closePath(),e.strokeStyle=this.strokeColor,e.lineWidth=this.strokeWidth,e.fillStyle=this.fillColor,e.fill(),e.stroke()}}}),s.Arc=s.Element.extend({inRange:function(e,t){var n=u.getAngleFromPoint(this,{x:e,y:t}),r=n.angle%(2*Math.PI),i=(2*Math.PI+this.startAngle)%(2*Math.PI),o=(2*Math.PI+this.endAngle)%(2*Math.PI)||360,a=o<i?r<=o||r>=i:r>=i&&r<=o,s=n.distance>=this.innerRadius&&n.distance<=this.outerRadius;return a&&s},tooltipPosition:function(){var e=this.startAngle+(this.endAngle-this.startAngle)/2,t=(this.outerRadius-this.innerRadius)/2+this.innerRadius;return{x:this.x+Math.cos(e)*t,y:this.y+Math.sin(e)*t}},draw:function(e){var t=this.ctx;t.beginPath(),t.arc(this.x,this.y,this.outerRadius<0?0:this.outerRadius,this.startAngle,this.endAngle),t.arc(this.x,this.y,this.innerRadius<0?0:this.innerRadius,this.endAngle,this.startAngle,!0),t.closePath(),t.strokeStyle=this.strokeColor,t.lineWidth=this.strokeWidth,t.fillStyle=this.fillColor,t.fill(),t.lineJoin="bevel",this.showStroke&&t.stroke()}}),s.Rectangle=s.Element.extend({draw:function(){var e=this.ctx,t=this.width/2,n=this.x-t,r=this.x+t,i=this.base-(this.base-this.y),o=this.strokeWidth/2;this.showStroke&&(n+=o,r-=o,i+=o),e.beginPath(),e.fillStyle=this.fillColor,e.strokeStyle=this.strokeColor,e.lineWidth=this.strokeWidth,e.moveTo(n,this.base),e.lineTo(n,i),e.lineTo(r,i),e.lineTo(r,this.base),e.fill(),this.showStroke&&e.stroke()},height:function(){return this.base-this.y},inRange:function(e,t){return e>=this.x-this.width/2&&e<=this.x+this.width/2&&t>=this.y&&t<=this.base}}),s.Animation=s.Element.extend({currentStep:null,numSteps:60,easing:"",render:null,onAnimationProgress:null,onAnimationComplete:null}),s.Tooltip=s.Element.extend({draw:function(){var e=this.chart.ctx;e.font=L(this.fontSize,this.fontStyle,this.fontFamily),this.xAlign="center",this.yAlign="above";var t=this.caretPadding=2,n=e.measureText(this.text).width+2*this.xPadding,r=this.fontSize+2*this.yPadding,i=r+this.caretHeight+t;this.x+n/2>this.chart.width?this.xAlign="left":this.x-n/2<0&&(this.xAlign="right"),this.y-i<0&&(this.yAlign="below");var o=this.x-n/2,a=this.y-i;if(e.fillStyle=this.fillColor,this.custom)this.custom(this);else{switch(this.yAlign){case"above":e.beginPath(),e.moveTo(this.x,this.y-t),e.lineTo(this.x+this.caretHeight,this.y-(t+this.caretHeight)),e.lineTo(this.x-this.caretHeight,this.y-(t+this.caretHeight)),e.closePath(),e.fill();break;case"below":a=this.y+t+this.caretHeight,e.beginPath(),e.moveTo(this.x,this.y+t),e.lineTo(this.x+this.caretHeight,this.y+t+this.caretHeight),e.lineTo(this.x-this.caretHeight,this.y+t+this.caretHeight),e.closePath(),e.fill()}switch(this.xAlign){case"left":o=this.x-n+(this.cornerRadius+this.caretHeight);break;case"right":o=this.x-(this.cornerRadius+this.caretHeight)}z(e,o,a,n,r,this.cornerRadius),e.fill(),e.fillStyle=this.textColor,e.textAlign="center",e.textBaseline="middle",e.fillText(this.text,o+n/2,a+r/2)}}}),s.MultiTooltip=s.Element.extend({initialize:function(){this.font=L(this.fontSize,this.fontStyle,this.fontFamily),this.titleFont=L(this.titleFontSize,this.titleFontStyle,this.titleFontFamily),this.titleHeight=this.title?1.5*this.titleFontSize:0,this.height=this.labels.length*this.fontSize+(this.labels.length-1)*(this.fontSize/2)+2*this.yPadding+this.titleHeight,this.ctx.font=this.titleFont;var e=this.ctx.measureText(this.title).width,t=B(this.ctx,this.font,this.labels)+this.fontSize+3,n=x([t,e]);this.width=n+2*this.xPadding;var r=this.height/2;this.y-r<0?this.y=r:this.y+r>this.chart.height&&(this.y=this.chart.height-r),this.x>this.chart.width/2?this.x-=this.xOffset+this.width:this.x+=this.xOffset},getLineHeight:function(e){var t=this.y-this.height/2+this.yPadding,n=e-1;return 0===e?t+this.titleHeight/3:t+(1.5*this.fontSize*n+this.fontSize/2)+this.titleHeight},draw:function(){if(this.custom)this.custom(this);else{z(this.ctx,this.x,this.y-this.height/2,this.width,this.height,this.cornerRadius);var e=this.ctx;e.fillStyle=this.fillColor,e.fill(),e.closePath(),e.textAlign="left",e.textBaseline="middle",e.fillStyle=this.titleTextColor,e.font=this.titleFont,e.fillText(this.title,this.x+this.xPadding,this.getLineHeight(0)),e.font=this.font,u.each(this.labels,function(t,n){e.fillStyle=this.textColor,e.fillText(t,this.x+this.xPadding+this.fontSize+3,this.getLineHeight(n+1)),e.fillStyle=this.legendColorBackground,e.fillRect(this.x+this.xPadding,this.getLineHeight(n+1)-this.fontSize/2,this.fontSize,this.fontSize),e.fillStyle=this.legendColors[n].fill,e.fillRect(this.x+this.xPadding,this.getLineHeight(n+1)-this.fontSize/2,this.fontSize,this.fontSize)},this)}}}),s.Scale=s.Element.extend({initialize:function(){this.fit()},buildYLabels:function(){this.yLabels=[];for(var e=N(this.stepValue),t=0;t<=this.steps;t++)this.yLabels.push(M(this.templateString,{value:(this.min+t*this.stepValue).toFixed(e)}));this.yLabelWidth=this.display&&this.showLabels?B(this.ctx,this.font,this.yLabels)+10:0},addXLabel:function(e){this.xLabels.push(e),this.valuesCount++,this.fit()},removeXLabel:function(){this.xLabels.shift(),this.valuesCount--,this.fit()},fit:function(){this.startPoint=this.display?this.fontSize:0,this.endPoint=this.display?this.height-1.5*this.fontSize-5:this.height,this.startPoint+=this.padding,this.endPoint-=this.padding;var e,t=this.endPoint,n=this.endPoint-this.startPoint;for(this.calculateYRange(n),this.buildYLabels(),this.calculateXLabelRotation();n>this.endPoint-this.startPoint;)n=this.endPoint-this.startPoint,e=this.yLabelWidth,this.calculateYRange(n),this.buildYLabels(),e<this.yLabelWidth&&(this.endPoint=t,this.calculateXLabelRotation())},calculateXLabelRotation:function(){this.ctx.font=this.font;var e,t=this.ctx.measureText(this.xLabels[0]).width,n=this.ctx.measureText(this.xLabels[this.xLabels.length-1]).width;if(this.xScalePaddingRight=n/2+3,this.xScalePaddingLeft=t/2>this.yLabelWidth?t/2:this.yLabelWidth,this.xLabelRotation=0,this.display){var r,i=B(this.ctx,this.font,this.xLabels);this.xLabelWidth=i;for(var o=Math.floor(this.calculateX(1)-this.calculateX(0))-6;this.xLabelWidth>o&&0===this.xLabelRotation||this.xLabelWidth>o&&this.xLabelRotation<=90&&this.xLabelRotation>0;)r=Math.cos(E(this.xLabelRotation)),e=r*t,r*n,e+this.fontSize/2>this.yLabelWidth&&(this.xScalePaddingLeft=e+this.fontSize/2),this.xScalePaddingRight=this.fontSize/2,this.xLabelRotation++,this.xLabelWidth=r*i;this.xLabelRotation>0&&(this.endPoint-=Math.sin(E(this.xLabelRotation))*i+3)}else this.xLabelWidth=0,this.xScalePaddingRight=this.padding,this.xScalePaddingLeft=this.padding},calculateYRange:m,drawingArea:function(){return this.startPoint-this.endPoint},calculateY:function(e){var t=this.drawingArea()/(this.min-this.max);return this.endPoint-t*(e-this.min)},calculateX:function(e){var t=(this.xLabelRotation,this.width-(this.xScalePaddingLeft+this.xScalePaddingRight)),n=t/Math.max(this.valuesCount-(this.offsetGridLines?0:1),1),r=n*e+this.xScalePaddingLeft;return this.offsetGridLines&&(r+=n/2),Math.round(r)},update:function(e){u.extend(this,e),this.fit()},draw:function(){var e=this.ctx,t=(this.endPoint-this.startPoint)/this.steps,n=Math.round(this.xScalePaddingLeft);this.display&&(e.fillStyle=this.textColor,e.font=this.font,c(this.yLabels,function(r,i){var o=this.endPoint-t*i,a=Math.round(o),s=this.showHorizontalLines;e.textAlign="right",e.textBaseline="middle",this.showLabels&&e.fillText(r,n-10,o),0!==i||s||(s=!0),s&&e.beginPath(),i>0?(e.lineWidth=this.gridLineWidth,e.strokeStyle=this.gridLineColor):(e.lineWidth=this.lineWidth,e.strokeStyle=this.lineColor),a+=u.aliasPixel(e.lineWidth),s&&(e.moveTo(n,a),e.lineTo(this.width,a),e.stroke(),e.closePath()),e.lineWidth=this.lineWidth,e.strokeStyle=this.lineColor,e.beginPath(),e.moveTo(n-5,a),e.lineTo(n,a),e.stroke(),e.closePath()},this),c(this.xLabels,function(t,n){var r=this.calculateX(n)+C(this.lineWidth),i=this.calculateX(n-(this.offsetGridLines?.5:0))+C(this.lineWidth),o=this.xLabelRotation>0,a=this.showVerticalLines;0!==n||a||(a=!0),a&&e.beginPath(),n>0?(e.lineWidth=this.gridLineWidth,e.strokeStyle=this.gridLineColor):(e.lineWidth=this.lineWidth,e.strokeStyle=this.lineColor),a&&(e.moveTo(i,this.endPoint),e.lineTo(i,this.startPoint-3),e.stroke(),e.closePath()),e.lineWidth=this.lineWidth,e.strokeStyle=this.lineColor,e.beginPath(),e.moveTo(i,this.endPoint),e.lineTo(i,this.endPoint+5),e.stroke(),e.closePath(),e.save(),e.translate(r,o?this.endPoint+12:this.endPoint+8),e.rotate(-1*E(this.xLabelRotation)),e.font=this.font,e.textAlign=o?"right":"center",e.textBaseline=o?"middle":"top",e.fillText(t,0,0),e.restore()},this))}}),s.RadialScale=s.Element.extend({initialize:function(){this.size=w([this.height,this.width]),this.drawingArea=this.display?this.size/2-(this.fontSize/2+this.backdropPaddingY):this.size/2},calculateCenterOffset:function(e){var t=this.drawingArea/(this.max-this.min);return(e-this.min)*t},update:function(){this.lineArc?this.drawingArea=this.display?this.size/2-(this.fontSize/2+this.backdropPaddingY):this.size/2:this.setScaleSize(),this.buildYLabels()},buildYLabels:function(){this.yLabels=[];for(var e=N(this.stepValue),t=0;t<=this.steps;t++)this.yLabels.push(M(this.templateString,{value:(this.min+t*this.stepValue).toFixed(e)}))},getCircumference:function(){return 2*Math.PI/this.valuesCount},setScaleSize:function(){var e,t,n,r,i,o,a,s,u,c,l,f,p=w([this.height/2-this.pointLabelFontSize-5,this.width/2]),h=this.width,d=0;for(this.ctx.font=L(this.pointLabelFontSize,this.pointLabelFontStyle,this.pointLabelFontFamily),t=0;t<this.valuesCount;t++)e=this.getPointPosition(t,p),n=this.ctx.measureText(M(this.templateString,{value:this.labels[t]})).width+5,0===t||t===this.valuesCount/2?(r=n/2,e.x+r>h&&(h=e.x+r,i=t),e.x-r<d&&(d=e.x-r,a=t)):t<this.valuesCount/2?e.x+n>h&&(h=e.x+n,i=t):t>this.valuesCount/2&&e.x-n<d&&(d=e.x-n,a=t);u=d,c=Math.ceil(h-this.width),o=this.getIndexAngle(i),s=this.getIndexAngle(a),l=c/Math.sin(o+Math.PI/2),f=u/Math.sin(s+Math.PI/2),l=b(l)?l:0,f=b(f)?f:0,this.drawingArea=p-(f+l)/2,this.setCenterPoint(f,l)},setCenterPoint:function(e,t){var n=this.width-t-this.drawingArea,r=e+this.drawingArea;this.xCenter=(r+n)/2,this.yCenter=this.height/2},getIndexAngle:function(e){return e*(2*Math.PI/this.valuesCount)-Math.PI/2},getPointPosition:function(e,t){var n=this.getIndexAngle(e);return{x:Math.cos(n)*t+this.xCenter,y:Math.sin(n)*t+this.yCenter}},draw:function(){if(this.display){var e=this.ctx;if(c(this.yLabels,function(t,n){if(n>0){var r,i=n*(this.drawingArea/this.steps),o=this.yCenter-i;if(this.lineWidth>0)if(e.strokeStyle=this.lineColor,e.lineWidth=this.lineWidth,this.lineArc)e.beginPath(),e.arc(this.xCenter,this.yCenter,i,0,2*Math.PI),e.closePath(),e.stroke();else{e.beginPath();for(var a=0;a<this.valuesCount;a++)r=this.getPointPosition(a,this.calculateCenterOffset(this.min+n*this.stepValue)),0===a?e.moveTo(r.x,r.y):e.lineTo(r.x,r.y);e.closePath(),e.stroke()}if(this.showLabels){if(e.font=L(this.fontSize,this.fontStyle,this.fontFamily),this.showLabelBackdrop){var s=e.measureText(t).width;e.fillStyle=this.backdropColor,e.fillRect(this.xCenter-s/2-this.backdropPaddingX,o-this.fontSize/2-this.backdropPaddingY,s+2*this.backdropPaddingX,this.fontSize+2*this.backdropPaddingY)}e.textAlign="center",e.textBaseline="middle",e.fillStyle=this.fontColor,e.fillText(t,this.xCenter,o)}}},this),!this.lineArc){e.lineWidth=this.angleLineWidth,e.strokeStyle=this.angleLineColor;for(var t=this.valuesCount-1;t>=0;t--){var n=null,r=null;if(this.angleLineWidth>0&&t%this.angleLineInterval===0&&(n=this.calculateCenterOffset(this.max),r=this.getPointPosition(t,n),e.beginPath(),e.moveTo(this.xCenter,this.yCenter),e.lineTo(r.x,r.y),e.stroke(),e.closePath()),this.backgroundColors&&this.backgroundColors.length==this.valuesCount){null==n&&(n=this.calculateCenterOffset(this.max)),null==r&&(r=this.getPointPosition(t,n));var i=this.getPointPosition(0===t?this.valuesCount-1:t-1,n),o=this.getPointPosition(t===this.valuesCount-1?0:t+1,n),a={x:(i.x+r.x)/2,y:(i.y+r.y)/2},s={x:(r.x+o.x)/2,y:(r.y+o.y)/2};e.beginPath(),e.moveTo(this.xCenter,this.yCenter),e.lineTo(a.x,a.y),e.lineTo(r.x,r.y),e.lineTo(s.x,s.y),e.fillStyle=this.backgroundColors[t],e.fill(),e.closePath()}var u=this.getPointPosition(t,this.calculateCenterOffset(this.max)+5);e.font=L(this.pointLabelFontSize,this.pointLabelFontStyle,this.pointLabelFontFamily),e.fillStyle=this.pointLabelFontColor;var l=this.labels.length,f=this.labels.length/2,p=f/2,h=t<p||t>l-p,d=t===p||t===l-p;e.textAlign=0===t?"center":t===f?"center":t<f?"left":"right",e.textBaseline=d?"middle":h?"bottom":"top",e.fillText(this.labels[t],u.x,u.y)}}}}}),s.animationService={frameDuration:17,animations:[],dropFrames:0,addAnimation:function(e,t){for(var n=0;n<this.animations.length;++n)if(this.animations[n].chartInstance===e)return void(this.animations[n].animationObject=t);this.animations.push({chartInstance:e,animationObject:t}),1==this.animations.length&&u.requestAnimFrame.call(window,this.digestWrapper)},cancelAnimation:function(e){var t=u.findNextWhere(this.animations,function(t){return t.chartInstance===e});t&&this.animations.splice(t,1)},digestWrapper:function(){s.animationService.startDigest.call(s.animationService)},startDigest:function(){var e=Date.now(),t=0;this.dropFrames>1&&(t=Math.floor(this.dropFrames),this.dropFrames-=t);for(var n=0;n<this.animations.length;n++)null===this.animations[n].animationObject.currentStep&&(this.animations[n].animationObject.currentStep=0),this.animations[n].animationObject.currentStep+=1+t,this.animations[n].animationObject.currentStep>this.animations[n].animationObject.numSteps&&(this.animations[n].animationObject.currentStep=this.animations[n].animationObject.numSteps),this.animations[n].animationObject.render(this.animations[n].chartInstance,this.animations[n].animationObject),this.animations[n].animationObject.currentStep==this.animations[n].animationObject.numSteps&&(this.animations[n].animationObject.onAnimationComplete.call(this.animations[n].chartInstance),this.animations.splice(n,1),n--);var r=Date.now(),i=r-e-this.frameDuration,o=i/this.frameDuration;o>1&&(this.dropFrames+=o),this.animations.length>0&&u.requestAnimFrame.call(window,this.digestWrapper)}},u.addEvent(window,"resize",function(){var e;return function(){clearTimeout(e),e=setTimeout(function(){c(s.instances,function(e){e.options.responsive&&e.resize(e.render,!0)})},50)}}()),y?(r=[],void 0!==(i=function(){return s}.apply(t,r))&&(e.exports=i)):"object"===typeof e&&e.exports&&(e.exports=s),o.Chart=s,s.noConflict=function(){return o.Chart=a,s}}).call(this),function(){"use strict";var e=this,t=e.Chart,n=t.helpers,r={scaleBeginAtZero:!0,scaleShowGridLines:!0,scaleGridLineColor:"rgba(0,0,0,.05)",scaleGridLineWidth:1,scaleShowHorizontalLines:!0,scaleShowVerticalLines:!0,barShowStroke:!0,barStrokeWidth:2,barValueSpacing:5,barDatasetSpacing:1,legendTemplate:'<ul class="<%=name.toLowerCase()%>-legend"><% for (var i=0; i<datasets.length; i++){%><li><span class="<%=name.toLowerCase()%>-legend-icon" style="background-color:<%=datasets[i].fillColor%>"></span><span class="<%=name.toLowerCase()%>-legend-text"><%if(datasets[i].label){%><%=datasets[i].label%><%}%></span></li><%}%></ul>'};t.Type.extend({name:"Bar",defaults:r,initialize:function(e){var r=this.options;this.ScaleClass=t.Scale.extend({offsetGridLines:!0,calculateBarX:function(e,t,n){var i=this.calculateBaseWidth(),o=this.calculateX(n)-i/2,a=this.calculateBarWidth(e);return o+a*t+t*r.barDatasetSpacing+a/2},calculateBaseWidth:function(){return this.calculateX(1)-this.calculateX(0)-2*r.barValueSpacing},calculateBarWidth:function(e){return(this.calculateBaseWidth()-(e-1)*r.barDatasetSpacing)/e}}),this.datasets=[],this.options.showTooltips&&n.bindEvents(this,this.options.tooltipEvents,function(e){var t="mouseout"!==e.type?this.getBarsAtEvent(e):[];this.eachBars(function(e){e.restore(["fillColor","strokeColor"])}),n.each(t,function(e){e&&(e.fillColor=e.highlightFill,e.strokeColor=e.highlightStroke)}),this.showTooltip(t)}),this.BarClass=t.Rectangle.extend({strokeWidth:this.options.barStrokeWidth,showStroke:this.options.barShowStroke,ctx:this.chart.ctx}),n.each(e.datasets,function(t,r){var i={label:t.label||null,fillColor:t.fillColor,strokeColor:t.strokeColor,bars:[]};this.datasets.push(i),n.each(t.data,function(n,r){i.bars.push(new this.BarClass({value:n,label:e.labels[r],datasetLabel:t.label,strokeColor:"object"==typeof t.strokeColor?t.strokeColor[r]:t.strokeColor,fillColor:"object"==typeof t.fillColor?t.fillColor[r]:t.fillColor,highlightFill:t.highlightFill?"object"==typeof t.highlightFill?t.highlightFill[r]:t.highlightFill:"object"==typeof t.fillColor?t.fillColor[r]:t.fillColor,highlightStroke:t.highlightStroke?"object"==typeof t.highlightStroke?t.highlightStroke[r]:t.highlightStroke:"object"==typeof t.strokeColor?t.strokeColor[r]:t.strokeColor}))},this)},this),this.buildScale(e.labels),this.BarClass.prototype.base=this.scale.endPoint,this.eachBars(function(e,t,r){n.extend(e,{width:this.scale.calculateBarWidth(this.datasets.length),x:this.scale.calculateBarX(this.datasets.length,r,t),y:this.scale.endPoint}),e.save()},this),this.render()},update:function(){this.scale.update(),n.each(this.activeElements,function(e){e.restore(["fillColor","strokeColor"])}),this.eachBars(function(e){e.save()}),this.render()},eachBars:function(e){n.each(this.datasets,function(t,r){n.each(t.bars,e,this,r)},this)},getBarsAtEvent:function(e){for(var t,r=[],i=n.getRelativePosition(e),o=function(e){r.push(e.bars[t])},a=0;a<this.datasets.length;a++)for(t=0;t<this.datasets[a].bars.length;t++)if(this.datasets[a].bars[t].inRange(i.x,i.y))return n.each(this.datasets,o),r;return r},buildScale:function(e){var t=this,r=function(){var e=[];return t.eachBars(function(t){e.push(t.value)}),e},i={templateString:this.options.scaleLabel,height:this.chart.height,width:this.chart.width,ctx:this.chart.ctx,textColor:this.options.scaleFontColor,fontSize:this.options.scaleFontSize,fontStyle:this.options.scaleFontStyle,fontFamily:this.options.scaleFontFamily,valuesCount:e.length,beginAtZero:this.options.scaleBeginAtZero,integersOnly:this.options.scaleIntegersOnly,calculateYRange:function(e){var t=n.calculateScaleRange(r(),e,this.fontSize,this.beginAtZero,this.integersOnly);n.extend(this,t)},xLabels:e,font:n.fontString(this.options.scaleFontSize,this.options.scaleFontStyle,this.options.scaleFontFamily),lineWidth:this.options.scaleLineWidth,lineColor:this.options.scaleLineColor,showHorizontalLines:this.options.scaleShowHorizontalLines,showVerticalLines:this.options.scaleShowVerticalLines,gridLineWidth:this.options.scaleShowGridLines?this.options.scaleGridLineWidth:0,gridLineColor:this.options.scaleShowGridLines?this.options.scaleGridLineColor:"rgba(0,0,0,0)",padding:this.options.showScale?0:this.options.barShowStroke?this.options.barStrokeWidth:0,showLabels:this.options.scaleShowLabels,display:this.options.showScale};this.options.scaleOverride&&n.extend(i,{calculateYRange:n.noop,steps:this.options.scaleSteps,stepValue:this.options.scaleStepWidth,min:this.options.scaleStartValue,max:this.options.scaleStartValue+this.options.scaleSteps*this.options.scaleStepWidth}),this.scale=new this.ScaleClass(i)},addData:function(e,t){n.each(e,function(e,n){this.datasets[n].bars.push(new this.BarClass({value:e,label:t,datasetLabel:this.datasets[n].label,x:this.scale.calculateBarX(this.datasets.length,n,this.scale.valuesCount+1),y:this.scale.endPoint,width:this.scale.calculateBarWidth(this.datasets.length),base:this.scale.endPoint,strokeColor:this.datasets[n].strokeColor,fillColor:this.datasets[n].fillColor}))},this),this.scale.addXLabel(t),this.update()},removeData:function(){this.scale.removeXLabel(),n.each(this.datasets,function(e){e.bars.shift()},this),this.update()},reflow:function(){n.extend(this.BarClass.prototype,{y:this.scale.endPoint,base:this.scale.endPoint});var e=n.extend({height:this.chart.height,width:this.chart.width});this.scale.update(e)},draw:function(e){var t=e||1;this.clear();this.chart.ctx;this.scale.draw(t),n.each(this.datasets,function(e,r){n.each(e.bars,function(e,n){e.hasValue()&&(e.base=this.scale.endPoint,e.transition({x:this.scale.calculateBarX(this.datasets.length,r,n),y:this.scale.calculateY(e.value),width:this.scale.calculateBarWidth(this.datasets.length)},t).draw())},this)},this)}})}.call(this),function(){"use strict";var e=this,t=e.Chart,n=t.helpers,r={segmentShowStroke:!0,segmentStrokeColor:"#fff",segmentStrokeWidth:2,percentageInnerCutout:50,animationSteps:100,animationEasing:"easeOutBounce",animateRotate:!0,animateScale:!1,legendTemplate:'<ul class="<%=name.toLowerCase()%>-legend"><% for (var i=0; i<segments.length; i++){%><li><span class="<%=name.toLowerCase()%>-legend-icon" style="background-color:<%=segments[i].fillColor%>"></span><span class="<%=name.toLowerCase()%>-legend-text"><%if(segments[i].label){%><%=segments[i].label%><%}%></span></li><%}%></ul>'};t.Type.extend({name:"Doughnut",defaults:r,initialize:function(e){this.segments=[],this.outerRadius=(n.min([this.chart.width,this.chart.height])-this.options.segmentStrokeWidth/2)/2,this.SegmentArc=t.Arc.extend({ctx:this.chart.ctx,x:this.chart.width/2,y:this.chart.height/2}),this.options.showTooltips&&n.bindEvents(this,this.options.tooltipEvents,function(e){var t="mouseout"!==e.type?this.getSegmentsAtEvent(e):[];n.each(this.segments,function(e){e.restore(["fillColor"])}),n.each(t,function(e){e.fillColor=e.highlightColor}),this.showTooltip(t)}),this.calculateTotal(e),n.each(e,function(t,n){t.color||(t.color="hsl("+360*n/e.length+", 100%, 50%)"),this.addData(t,n,!0)},this),this.render()},getSegmentsAtEvent:function(e){var t=[],r=n.getRelativePosition(e);return n.each(this.segments,function(e){e.inRange(r.x,r.y)&&t.push(e)},this),t},addData:function(e,n,r){var i=void 0!==n?n:this.segments.length;"undefined"===typeof e.color&&(e.color=t.defaults.global.segmentColorDefault[i%t.defaults.global.segmentColorDefault.length],e.highlight=t.defaults.global.segmentHighlightColorDefaults[i%t.defaults.global.segmentHighlightColorDefaults.length]),this.segments.splice(i,0,new this.SegmentArc({value:e.value,outerRadius:this.options.animateScale?0:this.outerRadius,innerRadius:this.options.animateScale?0:this.outerRadius/100*this.options.percentageInnerCutout,fillColor:e.color,highlightColor:e.highlight||e.color,showStroke:this.options.segmentShowStroke,strokeWidth:this.options.segmentStrokeWidth,strokeColor:this.options.segmentStrokeColor,startAngle:1.5*Math.PI,circumference:this.options.animateRotate?0:this.calculateCircumference(e.value),label:e.label})),r||(this.reflow(),this.update())},calculateCircumference:function(e){return this.total>0?2*Math.PI*(e/this.total):0},calculateTotal:function(e){this.total=0,n.each(e,function(e){this.total+=Math.abs(e.value)},this)},update:function(){this.calculateTotal(this.segments),n.each(this.activeElements,function(e){e.restore(["fillColor"])}),n.each(this.segments,function(e){e.save()}),this.render()},removeData:function(e){var t=n.isNumber(e)?e:this.segments.length-1;this.segments.splice(t,1),this.reflow(),this.update()},reflow:function(){n.extend(this.SegmentArc.prototype,{x:this.chart.width/2,y:this.chart.height/2}),this.outerRadius=(n.min([this.chart.width,this.chart.height])-this.options.segmentStrokeWidth/2)/2,n.each(this.segments,function(e){e.update({outerRadius:this.outerRadius,innerRadius:this.outerRadius/100*this.options.percentageInnerCutout})},this)},draw:function(e){var t=e||1;this.clear(),n.each(this.segments,function(e,n){e.transition({circumference:this.calculateCircumference(e.value),outerRadius:this.outerRadius,innerRadius:this.outerRadius/100*this.options.percentageInnerCutout},t),e.endAngle=e.startAngle+e.circumference,e.draw(),0===n&&(e.startAngle=1.5*Math.PI),n<this.segments.length-1&&(this.segments[n+1].startAngle=e.endAngle)},this)}}),t.types.Doughnut.extend({name:"Pie",defaults:n.merge(r,{percentageInnerCutout:0})})}.call(this),function(){"use strict";var e=this,t=e.Chart,n=t.helpers,r={scaleShowGridLines:!0,scaleGridLineColor:"rgba(0,0,0,.05)",scaleGridLineWidth:1,scaleShowHorizontalLines:!0,scaleShowVerticalLines:!0,bezierCurve:!0,bezierCurveTension:.4,pointDot:!0,pointDotRadius:4,pointDotStrokeWidth:1,pointHitDetectionRadius:20,datasetStroke:!0,datasetStrokeWidth:2,datasetFill:!0,legendTemplate:'<ul class="<%=name.toLowerCase()%>-legend"><% for (var i=0; i<datasets.length; i++){%><li><span class="<%=name.toLowerCase()%>-legend-icon" style="background-color:<%=datasets[i].strokeColor%>"></span><span class="<%=name.toLowerCase()%>-legend-text"><%if(datasets[i].label){%><%=datasets[i].label%><%}%></span></li><%}%></ul>',offsetGridLines:!1};t.Type.extend({name:"Line",defaults:r,initialize:function(e){this.PointClass=t.Point.extend({offsetGridLines:this.options.offsetGridLines,strokeWidth:this.options.pointDotStrokeWidth,radius:this.options.pointDotRadius,display:this.options.pointDot,hitDetectionRadius:this.options.pointHitDetectionRadius,ctx:this.chart.ctx,inRange:function(e){return Math.pow(e-this.x,2)<Math.pow(this.radius+this.hitDetectionRadius,2)}}),this.datasets=[],this.options.showTooltips&&n.bindEvents(this,this.options.tooltipEvents,function(e){var t="mouseout"!==e.type?this.getPointsAtEvent(e):[];this.eachPoints(function(e){e.restore(["fillColor","strokeColor"])}),n.each(t,function(e){e.fillColor=e.highlightFill,e.strokeColor=e.highlightStroke}),this.showTooltip(t)}),n.each(e.datasets,function(t){var r={label:t.label||null,fillColor:t.fillColor,strokeColor:t.strokeColor,pointColor:t.pointColor,pointStrokeColor:t.pointStrokeColor,points:[]};this.datasets.push(r),n.each(t.data,function(n,i){r.points.push(new this.PointClass({value:n,label:e.labels[i],datasetLabel:t.label,strokeColor:t.pointStrokeColor,fillColor:t.pointColor,highlightFill:t.pointHighlightFill||t.pointColor,highlightStroke:t.pointHighlightStroke||t.pointStrokeColor}))},this),this.buildScale(e.labels),this.eachPoints(function(e,t){n.extend(e,{x:this.scale.calculateX(t),y:this.scale.endPoint}),e.save()},this)},this),this.render()},update:function(){this.scale.update(),n.each(this.activeElements,function(e){e.restore(["fillColor","strokeColor"])}),this.eachPoints(function(e){e.save()}),this.render()},eachPoints:function(e){n.each(this.datasets,function(t){n.each(t.points,e,this)},this)},getPointsAtEvent:function(e){var t=[],r=n.getRelativePosition(e);return n.each(this.datasets,function(e){n.each(e.points,function(e){e.inRange(r.x,r.y)&&t.push(e)})},this),t},buildScale:function(e){var r=this,i=function(){var e=[];return r.eachPoints(function(t){e.push(t.value)}),e},o={templateString:this.options.scaleLabel,height:this.chart.height,width:this.chart.width,ctx:this.chart.ctx,textColor:this.options.scaleFontColor,offsetGridLines:this.options.offsetGridLines,fontSize:this.options.scaleFontSize,fontStyle:this.options.scaleFontStyle,fontFamily:this.options.scaleFontFamily,valuesCount:e.length,beginAtZero:this.options.scaleBeginAtZero,integersOnly:this.options.scaleIntegersOnly,calculateYRange:function(e){var t=n.calculateScaleRange(i(),e,this.fontSize,this.beginAtZero,this.integersOnly);n.extend(this,t)},xLabels:e,font:n.fontString(this.options.scaleFontSize,this.options.scaleFontStyle,this.options.scaleFontFamily),lineWidth:this.options.scaleLineWidth,lineColor:this.options.scaleLineColor,showHorizontalLines:this.options.scaleShowHorizontalLines,showVerticalLines:this.options.scaleShowVerticalLines,gridLineWidth:this.options.scaleShowGridLines?this.options.scaleGridLineWidth:0,gridLineColor:this.options.scaleShowGridLines?this.options.scaleGridLineColor:"rgba(0,0,0,0)",padding:this.options.showScale?0:this.options.pointDotRadius+this.options.pointDotStrokeWidth,showLabels:this.options.scaleShowLabels,display:this.options.showScale};this.options.scaleOverride&&n.extend(o,{calculateYRange:n.noop,steps:this.options.scaleSteps,stepValue:this.options.scaleStepWidth,min:this.options.scaleStartValue,max:this.options.scaleStartValue+this.options.scaleSteps*this.options.scaleStepWidth}),this.scale=new t.Scale(o)},addData:function(e,t){n.each(e,function(e,n){this.datasets[n].points.push(new this.PointClass({value:e,label:t,datasetLabel:this.datasets[n].label,x:this.scale.calculateX(this.scale.valuesCount+1),y:this.scale.endPoint,strokeColor:this.datasets[n].pointStrokeColor,fillColor:this.datasets[n].pointColor}))},this),this.scale.addXLabel(t),this.update()},removeData:function(){this.scale.removeXLabel(),n.each(this.datasets,function(e){e.points.shift()},this),this.update()},reflow:function(){var e=n.extend({height:this.chart.height,width:this.chart.width});this.scale.update(e)},draw:function(e){var t=e||1;this.clear();var r=this.chart.ctx,i=function(e){return null!==e.value},o=function(e,t,r){return n.findNextWhere(t,i,r)||e},a=function(e,t,r){return n.findPreviousWhere(t,i,r)||e};this.scale&&(this.scale.draw(t),n.each(this.datasets,function(e){var s=n.where(e.points,i);n.each(e.points,function(e,n){e.hasValue()&&e.transition({y:this.scale.calculateY(e.value),x:this.scale.calculateX(n)},t)},this),this.options.bezierCurve&&n.each(s,function(e,t){var r=t>0&&t<s.length-1?this.options.bezierCurveTension:0;e.controlPoints=n.splineCurve(a(e,s,t),e,o(e,s,t),r),e.controlPoints.outer.y>this.scale.endPoint?e.controlPoints.outer.y=this.scale.endPoint:e.controlPoints.outer.y<this.scale.startPoint&&(e.controlPoints.outer.y=this.scale.startPoint),e.controlPoints.inner.y>this.scale.endPoint?e.controlPoints.inner.y=this.scale.endPoint:e.controlPoints.inner.y<this.scale.startPoint&&(e.controlPoints.inner.y=this.scale.startPoint)},this),r.lineWidth=this.options.datasetStrokeWidth,r.strokeStyle=e.strokeColor,r.beginPath(),n.each(s,function(e,t){if(0===t)r.moveTo(e.x,e.y);else if(this.options.bezierCurve){var n=a(e,s,t);r.bezierCurveTo(n.controlPoints.outer.x,n.controlPoints.outer.y,e.controlPoints.inner.x,e.controlPoints.inner.y,e.x,e.y)}else r.lineTo(e.x,e.y)},this),this.options.datasetStroke&&r.stroke(),this.options.datasetFill&&s.length>0&&(r.lineTo(s[s.length-1].x,this.scale.endPoint),r.lineTo(s[0].x,this.scale.endPoint),r.fillStyle=e.fillColor,r.closePath(),r.fill()),n.each(s,function(e){e.draw()})},this))}})}.call(this),function(){"use strict";var e=this,t=e.Chart,n=t.helpers,r={scaleShowLabelBackdrop:!0,scaleBackdropColor:"rgba(255,255,255,0.75)",scaleBeginAtZero:!0,scaleBackdropPaddingY:2,scaleBackdropPaddingX:2,scaleShowLine:!0,segmentShowStroke:!0,segmentStrokeColor:"#fff",segmentStrokeWidth:2,animationSteps:100,animationEasing:"easeOutBounce",animateRotate:!0,animateScale:!1,legendTemplate:'<ul class="<%=name.toLowerCase()%>-legend"><% for (var i=0; i<segments.length; i++){%><li><span class="<%=name.toLowerCase()%>-legend-icon" style="background-color:<%=segments[i].fillColor%>"></span><span class="<%=name.toLowerCase()%>-legend-text"><%if(segments[i].label){%><%=segments[i].label%><%}%></span></li><%}%></ul>'};t.Type.extend({name:"PolarArea",defaults:r,initialize:function(e){this.segments=[],this.SegmentArc=t.Arc.extend({showStroke:this.options.segmentShowStroke,strokeWidth:this.options.segmentStrokeWidth,strokeColor:this.options.segmentStrokeColor,ctx:this.chart.ctx,innerRadius:0,x:this.chart.width/2,y:this.chart.height/2}),this.scale=new t.RadialScale({display:this.options.showScale,fontStyle:this.options.scaleFontStyle,fontSize:this.options.scaleFontSize,fontFamily:this.options.scaleFontFamily,fontColor:this.options.scaleFontColor,showLabels:this.options.scaleShowLabels,showLabelBackdrop:this.options.scaleShowLabelBackdrop,backdropColor:this.options.scaleBackdropColor,backdropPaddingY:this.options.scaleBackdropPaddingY,backdropPaddingX:this.options.scaleBackdropPaddingX,lineWidth:this.options.scaleShowLine?this.options.scaleLineWidth:0,lineColor:this.options.scaleLineColor,lineArc:!0,width:this.chart.width,height:this.chart.height,xCenter:this.chart.width/2,yCenter:this.chart.height/2,ctx:this.chart.ctx,templateString:this.options.scaleLabel,valuesCount:e.length}),this.updateScaleRange(e),this.scale.update(),n.each(e,function(e,t){this.addData(e,t,!0)},this),this.options.showTooltips&&n.bindEvents(this,this.options.tooltipEvents,function(e){var t="mouseout"!==e.type?this.getSegmentsAtEvent(e):[];n.each(this.segments,function(e){e.restore(["fillColor"])}),n.each(t,function(e){e.fillColor=e.highlightColor}),this.showTooltip(t)}),this.render()},getSegmentsAtEvent:function(e){var t=[],r=n.getRelativePosition(e);return n.each(this.segments,function(e){e.inRange(r.x,r.y)&&t.push(e)},this),t},addData:function(e,t,n){var r=t||this.segments.length;this.segments.splice(r,0,new this.SegmentArc({fillColor:e.color,highlightColor:e.highlight||e.color,label:e.label,value:e.value,outerRadius:this.options.animateScale?0:this.scale.calculateCenterOffset(e.value),circumference:this.options.animateRotate?0:this.scale.getCircumference(),startAngle:1.5*Math.PI})),n||(this.reflow(),this.update())},removeData:function(e){var t=n.isNumber(e)?e:this.segments.length-1;this.segments.splice(t,1),this.reflow(),this.update()},calculateTotal:function(e){this.total=0,n.each(e,function(e){this.total+=e.value},this),this.scale.valuesCount=this.segments.length},updateScaleRange:function(e){var t=[];n.each(e,function(e){t.push(e.value)});var r=this.options.scaleOverride?{steps:this.options.scaleSteps,stepValue:this.options.scaleStepWidth,min:this.options.scaleStartValue,max:this.options.scaleStartValue+this.options.scaleSteps*this.options.scaleStepWidth}:n.calculateScaleRange(t,n.min([this.chart.width,this.chart.height])/2,this.options.scaleFontSize,this.options.scaleBeginAtZero,this.options.scaleIntegersOnly);n.extend(this.scale,r,{size:n.min([this.chart.width,this.chart.height]),xCenter:this.chart.width/2,yCenter:this.chart.height/2})},update:function(){this.calculateTotal(this.segments),n.each(this.segments,function(e){e.save()}),this.reflow(),this.render()},reflow:function(){n.extend(this.SegmentArc.prototype,{x:this.chart.width/2,y:this.chart.height/2}),this.updateScaleRange(this.segments),this.scale.update(),n.extend(this.scale,{xCenter:this.chart.width/2,yCenter:this.chart.height/2}),n.each(this.segments,function(e){e.update({outerRadius:this.scale.calculateCenterOffset(e.value)})},this)},draw:function(e){var t=e||1;this.clear(),n.each(this.segments,function(e,n){e.transition({circumference:this.scale.getCircumference(),outerRadius:this.scale.calculateCenterOffset(e.value)},t),e.endAngle=e.startAngle+e.circumference,0===n&&(e.startAngle=1.5*Math.PI),n<this.segments.length-1&&(this.segments[n+1].startAngle=e.endAngle),e.draw()},this),this.scale.draw()}})}.call(this),function(){"use strict";var e=this,t=e.Chart,n=t.helpers;t.Type.extend({name:"Radar",defaults:{scaleShowLine:!0,angleShowLineOut:!0,scaleShowLabels:!1,scaleBeginAtZero:!0,angleLineColor:"rgba(0,0,0,.1)",angleLineWidth:1,angleLineInterval:1,pointLabelFontFamily:"'Arial'",pointLabelFontStyle:"normal",pointLabelFontSize:10,pointLabelFontColor:"#666",pointDot:!0,pointDotRadius:3,pointDotStrokeWidth:1,pointHitDetectionRadius:20,datasetStroke:!0,datasetStrokeWidth:2,datasetFill:!0,legendTemplate:'<ul class="<%=name.toLowerCase()%>-legend"><% for (var i=0; i<datasets.length; i++){%><li><span class="<%=name.toLowerCase()%>-legend-icon" style="background-color:<%=datasets[i].strokeColor%>"></span><span class="<%=name.toLowerCase()%>-legend-text"><%if(datasets[i].label){%><%=datasets[i].label%><%}%></span></li><%}%></ul>'},initialize:function(e){this.PointClass=t.Point.extend({strokeWidth:this.options.pointDotStrokeWidth,radius:this.options.pointDotRadius,display:this.options.pointDot,hitDetectionRadius:this.options.pointHitDetectionRadius,ctx:this.chart.ctx}),this.datasets=[],this.buildScale(e),this.options.showTooltips&&n.bindEvents(this,this.options.tooltipEvents,function(e){var t="mouseout"!==e.type?this.getPointsAtEvent(e):[];this.eachPoints(function(e){e.restore(["fillColor","strokeColor"])}),n.each(t,function(e){e.fillColor=e.highlightFill,e.strokeColor=e.highlightStroke}),this.showTooltip(t)}),n.each(e.datasets,function(t){var r={label:t.label||null,fillColor:t.fillColor,strokeColor:t.strokeColor,pointColor:t.pointColor,pointStrokeColor:t.pointStrokeColor,points:[]};this.datasets.push(r),n.each(t.data,function(n,i){var o;this.scale.animation||(o=this.scale.getPointPosition(i,this.scale.calculateCenterOffset(n))),r.points.push(new this.PointClass({value:n,label:e.labels[i],datasetLabel:t.label,x:this.options.animation?this.scale.xCenter:o.x,y:this.options.animation?this.scale.yCenter:o.y,strokeColor:t.pointStrokeColor,fillColor:t.pointColor,highlightFill:t.pointHighlightFill||t.pointColor,highlightStroke:t.pointHighlightStroke||t.pointStrokeColor}))},this)},this),this.render()},eachPoints:function(e){n.each(this.datasets,function(t){n.each(t.points,e,this)},this)},getPointsAtEvent:function(e){var t=n.getRelativePosition(e),r=n.getAngleFromPoint({x:this.scale.xCenter,y:this.scale.yCenter},t),i=2*Math.PI/this.scale.valuesCount,o=Math.round((r.angle-1.5*Math.PI)/i),a=[];return(o>=this.scale.valuesCount||o<0)&&(o=0),r.distance<=this.scale.drawingArea&&n.each(this.datasets,function(e){a.push(e.points[o])}),a},buildScale:function(e){this.scale=new t.RadialScale({display:this.options.showScale,fontStyle:this.options.scaleFontStyle,fontSize:this.options.scaleFontSize,fontFamily:this.options.scaleFontFamily,fontColor:this.options.scaleFontColor,showLabels:this.options.scaleShowLabels,showLabelBackdrop:this.options.scaleShowLabelBackdrop,backdropColor:this.options.scaleBackdropColor,backgroundColors:this.options.scaleBackgroundColors,backdropPaddingY:this.options.scaleBackdropPaddingY,backdropPaddingX:this.options.scaleBackdropPaddingX,lineWidth:this.options.scaleShowLine?this.options.scaleLineWidth:0,lineColor:this.options.scaleLineColor,angleLineColor:this.options.angleLineColor,angleLineWidth:this.options.angleShowLineOut?this.options.angleLineWidth:0,angleLineInterval:this.options.angleLineInterval?this.options.angleLineInterval:1,pointLabelFontColor:this.options.pointLabelFontColor,pointLabelFontSize:this.options.pointLabelFontSize,pointLabelFontFamily:this.options.pointLabelFontFamily,pointLabelFontStyle:this.options.pointLabelFontStyle,height:this.chart.height,width:this.chart.width,xCenter:this.chart.width/2,yCenter:this.chart.height/2,ctx:this.chart.ctx,templateString:this.options.scaleLabel,labels:e.labels,valuesCount:e.datasets[0].data.length}),this.scale.setScaleSize(),this.updateScaleRange(e.datasets),this.scale.buildYLabels()},updateScaleRange:function(e){var t=function(){var t=[];return n.each(e,function(e){e.data?t=t.concat(e.data):n.each(e.points,function(e){t.push(e.value)})}),t}(),r=this.options.scaleOverride?{steps:this.options.scaleSteps,stepValue:this.options.scaleStepWidth,min:this.options.scaleStartValue,max:this.options.scaleStartValue+this.options.scaleSteps*this.options.scaleStepWidth}:n.calculateScaleRange(t,n.min([this.chart.width,this.chart.height])/2,this.options.scaleFontSize,this.options.scaleBeginAtZero,this.options.scaleIntegersOnly);n.extend(this.scale,r)},addData:function(e,t){this.scale.valuesCount++,n.each(e,function(e,n){var r=this.scale.getPointPosition(this.scale.valuesCount,this.scale.calculateCenterOffset(e));this.datasets[n].points.push(new this.PointClass({value:e,label:t,datasetLabel:this.datasets[n].label,x:r.x,y:r.y,strokeColor:this.datasets[n].pointStrokeColor,fillColor:this.datasets[n].pointColor}))},this),this.scale.labels.push(t),this.reflow(),this.update()},removeData:function(){this.scale.valuesCount--,this.scale.labels.shift(),n.each(this.datasets,function(e){e.points.shift()},this),this.reflow(),this.update()},update:function(){this.eachPoints(function(e){e.save()}),this.reflow(),this.render()},reflow:function(){n.extend(this.scale,{width:this.chart.width,height:this.chart.height,size:n.min([this.chart.width,this.chart.height]),xCenter:this.chart.width/2,yCenter:this.chart.height/2}),this.updateScaleRange(this.datasets),this.scale.setScaleSize(),this.scale.buildYLabels()},draw:function(e){var t=e||1,r=this.chart.ctx;this.clear(),this.scale.draw(),n.each(this.datasets,function(e){n.each(e.points,function(e,n){e.hasValue()&&e.transition(this.scale.getPointPosition(n,this.scale.calculateCenterOffset(e.value)),t)},this),r.lineWidth=this.options.datasetStrokeWidth,r.strokeStyle=e.strokeColor,r.beginPath(),n.each(e.points,function(e,t){0===t?r.moveTo(e.x,e.y):r.lineTo(e.x,e.y)},this),r.closePath(),r.stroke(),r.fillStyle=e.fillColor,this.options.datasetFill&&r.fill(),n.each(e.points,function(e){e.hasValue()&&e.draw()})},this)}})}.call(this)},function(e,t){(function(t){e.exports=t}).call(t,{})},function(e,t,n){var r=n(52);e.exports=r.createClass("Doughnut",["getSegmentsAtEvent"])},function(e,t,n){var r=n(52);e.exports=r.createClass("Line",["getPointsAtEvent"])},function(e,t,n){var r=n(52);e.exports=r.createClass("Pie",["getSegmentsAtEvent"])},function(e,t,n){var r=n(52);e.exports=r.createClass("PolarArea",["getSegmentsAtEvent"])},function(e,t,n){var r=n(52);e.exports=r.createClass("Radar",["getPointsAtEvent"])},function(e,t,n){"use strict";function r(e){e.sock.on("loadControllerConfigs",function(t){e=e.getState(),e.configoptions=t,e.updateState(e)})}function i(e,t){return{axes:{designators:{LLR:{current:"Yaw",reverse:!1,engage:!0,isOpen:!1},LUD:{current:"Pitch",reverse:!0,engage:!0,isOpen:!1},RLR:{current:"Lateral",reverse:!1,engage:!0,isOpen:!1},RUD:{current:"Longitudinal",reverse:!0,engage:!0,isOpen:!1},LT:{current:"Vertical",reverse:!1,engage:!0,isOpen:!1},RT:{current:"Vertical",reverse:!0,engage:!0,isOpen:!1}},options:["Pitch","Roll","Yaw","Longitudinal","Lateral","Vertical"],title:"Axis designations"},buttons:{designators:{A:{current:"Grab",engage:!0,isOpen:!1},B:{current:"Release",engage:!0,isOpen:!1},X:{current:"Rotate manip right",engage:!0,isOpen:!1},Y:{current:"Rotate manip left",engage:!0,isOpen:!1},LS:{current:"Lights on",engage:!0,isOpen:!1},RS:{current:"Lights off",engage:!0,isOpen:!1},UP:{current:"Go up",engage:!0,isOpen:!1},DOWN:{current:"Go down",engage:!0,isOpen:!1},LEFT:{current:"Engage auto depth",engage:!0,isOpen:!1},RIGHT:{current:"Disengage auto depth",engage:!0,isOpen:!1},LB:{current:"Go left",engage:!0,isOpen:!1},RB:{current:"Go right",engage:!0,isOpen:!1},SELECT:{current:"Precision off",engage:!0,isOpen:!1},MENU:{current:"Precision on",engage:!0,isOpen:!1}},options:["Nothing","Precision on","Precision off","Grab","Release","Rotate manip right","Rotate manip left","Toggle lights","Lights on","Lights off","Engage auto depth","Disengage auto depth","Engage auto level","Disengage auto level","Go up","Go down","Go left","Go right","Camera up","Camera down","Camera left","Camera right"],title:"Button designations"},engage:!1,index:e,designation:null,id:t||"XBOX Controller",translator:l.b,transfer:f.a,optionsOpen:!1,currentConfig:"default",newconfig:null}}function o(e,t,n){return{controllers:{0:i(0)},configoptions:{default:{axes:i(0).axes,buttons:i(0).buttons}},updateState:e,getState:t,sock:n}}t.a=r,t.c=i,t.d=o,n.d(t,"b",function(){return h});var a=n(7),s=n.n(a),u=n(26),c=(n.n(u),n(41)),l=n(188),f=n(189),p=function(e){var t=e.data.controllers[e.contKey];return s.a.createElement(c.g,null,s.a.createElement(c.d,{body:!0,outline:!0,color:t.engage?"primary":"secondary"},s.a.createElement(c.i,null,t.id),s.a.createElement(c.h,null,"Controller index: ",t.index),s.a.createElement("div",{style:{padding:"20px 0px"}},s.a.createElement(c.a,{color:t.engage?"primary":"secondary",onClick:function(t){e.data.controllers[e.contKey].engage?e.data.controllers[e.contKey].engage=!1:e.data.controllers[e.contKey].engage=!0,e.data.updateState(e.data)}},t.engage?"Disengage":"Engage"),s.a.createElement("hr",{className:"my-2"}),s.a.createElement("div",{style:{marginTop:"20px"}},s.a.createElement(c.h,null,"Load controller configuration")),s.a.createElement("div",{style:{padding:"10px 0px"}},s.a.createElement(c.b,{isOpen:t.optionsOpen,toggle:function(){e.data.controllers[e.contKey].optionsOpen?e.data.controllers[e.contKey].optionsOpen=!1:e.data.controllers[e.contKey].optionsOpen=!0,e.data.updateState(e.data)}},s.a.createElement(c.m,{caret:!0},e.data.controllers[e.contKey].currentConfig),s.a.createElement(c.l,{right:!0,style:{overflowY:"hidden"}},Object.keys(e.data.configoptions).map(function(t){return s.a.createElement(c.k,{onClick:function(){e.data.controllers[e.contKey].currentConfig="".concat(t),e.data.controllers[e.contKey].axes=JSON.parse(JSON.stringify(e.data.configoptions[t].axes)),e.data.controllers[e.contKey].buttons=JSON.parse(JSON.stringify(e.data.configoptions[t].buttons)),e.data.updateState(e.data)}},t)})))),s.a.createElement("div",{style:{marginTop:"20px"}},s.a.createElement("form",{onSubmit:function(t){t.preventDefault();var n=e.data.getState(),r=n.controllers[e.contKey].axes,i=n.controllers[e.contKey].buttons;e.data.sock.emit("saveControllerConfig",{title:e.data.controllers[e.contKey].newconfig,config:{axes:r,buttons:i}}),e.data.controllers[e.contKey].currentConfig="".concat(e.data.controllers[e.contKey].newconfig),e.data.controllers[e.contKey].newconfig=null,e.data.updateState(e.data)}},s.a.createElement(c.q,null,"Save current controller configuration"),s.a.createElement(c.o,{placeholder:e.data.controllers[e.contKey].newconfig?null:"Configuraion name",onChange:function(t){e.data.controllers[e.contKey].newconfig=t.target.value}}),s.a.createElement(c.n,null))))),s.a.createElement(c.d,{body:!0,outline:!0,color:t.engage?"primary":"secondary"},s.a.createElement(c.h,null,"Axis designations"),Object.keys(t.axes.designators).map(function(n){return s.a.createElement("div",{style:{padding:"7px 0px",margin:"0px"}},s.a.createElement("h6",null,n),s.a.createElement(c.c,{size:"sm"},s.a.createElement(c.b,{size:"sm",isOpen:t.axes.designators[n].isOpen,toggle:function(){e.data.controllers[e.contKey].axes.designators[n].isOpen?e.data.controllers[e.contKey].axes.designators[n].isOpen=!1:e.data.controllers[e.contKey].axes.designators[n].isOpen=!0,e.data.updateState(e.data)}},s.a.createElement(c.m,{caret:!0,size:"sm"},e.data.controllers[e.contKey].axes.designators[n].current),s.a.createElement(c.l,{right:!0,size:"sm",style:{overflowY:"hidden"}},t.axes.options.map(function(t){return s.a.createElement(c.k,{onClick:function(){e.data.controllers[e.contKey].axes.designators[n].current=t,e.data.updateState(e.data)}},t)}))),s.a.createElement(c.a,{size:"sm",color:t.axes.designators[n].engage?"primary":"danger",onClick:function(t){e.data.controllers[e.contKey].axes.designators[n].engage?e.data.controllers[e.contKey].axes.designators[n].engage=!1:e.data.controllers[e.contKey].axes.designators[n].engage=!0,e.data.updateState(e.data)}},t.axes.designators[n].engage?"Disengage":"Engage"),s.a.createElement(c.a,{size:"sm",color:t.axes.designators[n].reverse?"danger":"primary",onClick:function(t){e.data.controllers[e.contKey].axes.designators[n].reverse?e.data.controllers[e.contKey].axes.designators[n].reverse=!1:e.data.controllers[e.contKey].axes.designators[n].reverse=!0,e.data.updateState(e.data)}},t.axes.designators[n].reverse?"Reversed":"Straight")))})),s.a.createElement(c.d,{body:!0,outline:!0,color:t.engage?"primary":"secondary",style:{height:"65vh",overflow:"scroll"}},s.a.createElement(c.h,null,"Button designations"),Object.keys(t.buttons.designators).map(function(n){return s.a.createElement("div",{style:{padding:"7px 0px",margin:"0px",fontSize:"1.0em"}},s.a.createElement("h6",null,n),s.a.createElement(c.c,{size:"sm"},s.a.createElement(c.b,{size:"sm",isOpen:t.buttons.designators[n].isOpen,toggle:function(){e.data.controllers[e.contKey].buttons.designators[n].isOpen?e.data.controllers[e.contKey].buttons.designators[n].isOpen=!1:e.data.controllers[e.contKey].buttons.designators[n].isOpen=!0,e.data.updateState(e.data)}},s.a.createElement(c.m,{caret:!0,size:"sm"},e.data.controllers[e.contKey].buttons.designators[n].current),s.a.createElement(c.l,{right:!0,style:{height:"300px",overflowY:"scroll"}},t.buttons.options.map(function(t){return s.a.createElement(c.k,{onClick:function(){e.data.controllers[e.contKey].buttons.designators[n].current=t,e.data.updateState(e.data)}},t)}))),s.a.createElement(c.a,{size:"sm",color:t.buttons.designators[n].engage?"primary":"danger",onClick:function(t){e.data.controllers[e.contKey].buttons.designators[n].engage?e.data.controllers[e.contKey].buttons.designators[n].engage=!1:e.data.controllers[e.contKey].buttons.designators[n].engage=!0,e.data.updateState(e.data)}},t.buttons.designators[n].engage?"Disengage":"Engage")))})))},h=function(e){return s.a.createElement("div",{style:{padding:"20px",width:"auto"}},s.a.createElement("h1",{className:"display-3"},"Controllers"),Object.keys(e.data.controllers).map(function(t){return s.a.createElement("div",{style:{padding:"10px"}},s.a.createElement(p,{contKey:t,data:e.data}))}))}},function(e,t,n){"use strict";n.d(t,"a",function(){return l});var r=n(7),i=n.n(r),o=n(26),a=(n.n(o),n(41)),s=n(130),u=n.n(s),c=n(131),l=function(e){var t=e.data,n=e.data.loads;return i.a.createElement("div",{style:{padding:"20px",marginTop:"60px"}},i.a.createElement(a.f,{style:{maxHeight:"60vh"}},i.a.createElement(a.d,{style:{minHeight:"60vh"}},i.a.createElement(u.a,{options:{mode:"static",catchDistance:1e3,color:"blue",position:{left:"50%",top:"50%"}},containerStyle:{position:"absolute",height:"100%",width:"100%"},managerListener:t.leftStickListener})),i.a.createElement(a.d,{style:{minHeight:"60vh",maxWidth:"200px"}},i.a.createElement(c.a,{sendThrusts:t.sendThrusts,flv:n.flv,frv:n.frv,alv:n.alv,arv:n.arv,flh:n.flh,frh:n.frh,alh:n.alh,arh:n.arh})),i.a.createElement(a.d,{style:{minHeight:"60vh"}},i.a.createElement(u.a,{options:{mode:"static",catchDistance:1e3,color:"red",position:{left:"50%",top:"50%"}},containerStyle:{position:"absolute",height:"100%",width:"100%"},managerListener:t.rightStickListener}))))}},function(e,t,n){"use strict";function r(e){return{updateState:e}}t.a=r,n.d(t,"b",function(){return s});var i=n(7),o=n.n(i),a=n(26),s=(n.n(a),function(e){e.data;return o.a.createElement("div",{style:{padding:"20px"}},o.a.createElement("h1",{className:"display-3"},"Front center view"))})},function(e,t,n){"use strict";function r(e){return{updateState:e}}t.a=r,n.d(t,"b",function(){return s});var i=n(7),o=n.n(i),a=n(26),s=(n.n(a),function(e){e.data;return o.a.createElement("div",{style:{padding:"20px"}},o.a.createElement("h1",{className:"display-3"},"Front left view"))})},function(e,t,n){"use strict";function r(e){return{updateState:e}}t.a=r,n.d(t,"b",function(){return s});var i=n(7),o=n.n(i),a=n(26),s=(n.n(a),function(e){e.data;return o.a.createElement("div",{style:{padding:"20px"}},o.a.createElement("h1",{className:"display-3"},"Front right view"))})},function(e,t,n){"use strict";function r(e){return{updateState:e}}t.b=r,n.d(t,"a",function(){return s});var i=n(7),o=n.n(i),a=n(26),s=(n.n(a),function(e){e.data;return o.a.createElement("div",{style:{padding:"20px"}},o.a.createElement("h1",{className:"display-3"},"Aft view"))})},function(e,t,n){"use strict"},function(e,t,n){"use strict";function r(){if("serviceWorker"in navigator){if(new URL("",window.location).origin!==window.location.origin)return;window.addEventListener("load",function(){var e="/service-worker.js";a?(o(e),navigator.serviceWorker.ready.then(function(){console.log("This web app is being served cache-first by a service worker. To learn more, visit https://goo.gl/SC7cgQ")})):i(e)})}}function i(e){navigator.serviceWorker.register(e).then(function(e){e.onupdatefound=function(){var t=e.installing;t.onstatechange=function(){"installed"===t.state&&(navigator.serviceWorker.controller?console.log("New content is available; please refresh."):console.log("Content is cached for offline use."))}}}).catch(function(e){console.error("Error during service worker registration:",e)})}function o(e){fetch(e).then(function(t){404===t.status||-1===t.headers.get("content-type").indexOf("javascript")?navigator.serviceWorker.ready.then(function(e){e.unregister().then(function(){window.location.reload()})}):i(e)}).catch(function(){console.log("No internet connection found. App is running in offline mode.")})}t.a=r;var a=Boolean("localhost"===window.location.hostname||"[::1]"===window.location.hostname||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/))}]);
  //# sourceMappingURL=main.efc67e8c.js.map