/* Modernizr 2.8.2 (Custom Build) | MIT & BSD
 * Build: http://modernizr.com/download/#-canvas-history-audio-video-input-inputtypes-localstorage-sessionstorage-geolocation-touch-shiv-cssclasses-addtest-prefixed-teststyles-testprop-testallprops-hasevent-prefixes-domprefixes-forms_fileinput-load
 */
;window.Modernizr=function(a,b,c){function B(a){j.cssText=a}function C(a,b){return B(n.join(a+";")+(b||""))}function D(a,b){return typeof a===b}function E(a,b){return!!~(""+a).indexOf(b)}function F(a,b){for(var d in a){var e=a[d];if(!E(e,"-")&&j[e]!==c)return b=="pfx"?e:!0}return!1}function G(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:D(f,"function")?f.bind(d||b):f}return!1}function H(a,b,c){var d=a.charAt(0).toUpperCase()+a.slice(1),e=(a+" "+p.join(d+" ")+d).split(" ");return D(b,"string")||D(b,"undefined")?F(e,b):(e=(a+" "+q.join(d+" ")+d).split(" "),G(e,b,c))}function I(){e.input=function(c){for(var d=0,e=c.length;d<e;d++)t[c[d]]=c[d]in k;return t.list&&(t.list=!!b.createElement("datalist")&&!!a.HTMLDataListElement),t}("autocomplete autofocus list placeholder max min multiple pattern required step".split(" ")),e.inputtypes=function(a){for(var d=0,e,f,h,i=a.length;d<i;d++)k.setAttribute("type",f=a[d]),e=k.type!=="text",e&&(k.value=l,k.style.cssText="position:absolute;visibility:hidden;",/^range$/.test(f)&&k.style.WebkitAppearance!==c?(g.appendChild(k),h=b.defaultView,e=h.getComputedStyle&&h.getComputedStyle(k,null).WebkitAppearance!=="textfield"&&k.offsetHeight!==0,g.removeChild(k)):/^(search|tel)$/.test(f)||(/^(url|email)$/.test(f)?e=k.checkValidity&&k.checkValidity()===!1:e=k.value!=l)),s[a[d]]=!!e;return s}("search tel url email datetime date month week time datetime-local number range color".split(" "))}var d="2.8.2",e={},f=!0,g=b.documentElement,h="modernizr",i=b.createElement(h),j=i.style,k=b.createElement("input"),l=":)",m={}.toString,n=" -webkit- -moz- -o- -ms- ".split(" "),o="Webkit Moz O ms",p=o.split(" "),q=o.toLowerCase().split(" "),r={},s={},t={},u=[],v=u.slice,w,x=function(a,c,d,e){var f,i,j,k,l=b.createElement("div"),m=b.body,n=m||b.createElement("body");if(parseInt(d,10))while(d--)j=b.createElement("div"),j.id=e?e[d]:h+(d+1),l.appendChild(j);return f=["&#173;",'<style id="s',h,'">',a,"</style>"].join(""),l.id=h,(m?l:n).innerHTML+=f,n.appendChild(l),m||(n.style.background="",n.style.overflow="hidden",k=g.style.overflow,g.style.overflow="hidden",g.appendChild(n)),i=c(l,a),m?l.parentNode.removeChild(l):(n.parentNode.removeChild(n),g.style.overflow=k),!!i},y=function(){function d(d,e){e=e||b.createElement(a[d]||"div"),d="on"+d;var f=d in e;return f||(e.setAttribute||(e=b.createElement("div")),e.setAttribute&&e.removeAttribute&&(e.setAttribute(d,""),f=D(e[d],"function"),D(e[d],"undefined")||(e[d]=c),e.removeAttribute(d))),e=null,f}var a={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return d}(),z={}.hasOwnProperty,A;!D(z,"undefined")&&!D(z.call,"undefined")?A=function(a,b){return z.call(a,b)}:A=function(a,b){return b in a&&D(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;var d=v.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(v.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(v.call(arguments)))};return e}),r.canvas=function(){var a=b.createElement("canvas");return!!a.getContext&&!!a.getContext("2d")},r.touch=function(){var c;return"ontouchstart"in a||a.DocumentTouch&&b instanceof DocumentTouch?c=!0:x(["@media (",n.join("touch-enabled),("),h,")","{#modernizr{top:9px;position:absolute}}"].join(""),function(a){c=a.offsetTop===9}),c},r.geolocation=function(){return"geolocation"in navigator},r.history=function(){return!!a.history&&!!history.pushState},r.video=function(){var a=b.createElement("video"),c=!1;try{if(c=!!a.canPlayType)c=new Boolean(c),c.ogg=a.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,""),c.h264=a.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,""),c.webm=a.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,"")}catch(d){}return c},r.audio=function(){var a=b.createElement("audio"),c=!1;try{if(c=!!a.canPlayType)c=new Boolean(c),c.ogg=a.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),c.mp3=a.canPlayType("audio/mpeg;").replace(/^no$/,""),c.wav=a.canPlayType('audio/wav; codecs="1"').replace(/^no$/,""),c.m4a=(a.canPlayType("audio/x-m4a;")||a.canPlayType("audio/aac;")).replace(/^no$/,"")}catch(d){}return c},r.localstorage=function(){try{return localStorage.setItem(h,h),localStorage.removeItem(h),!0}catch(a){return!1}},r.sessionstorage=function(){try{return sessionStorage.setItem(h,h),sessionStorage.removeItem(h),!0}catch(a){return!1}};for(var J in r)A(r,J)&&(w=J.toLowerCase(),e[w]=r[J](),u.push((e[w]?"":"no-")+w));return e.input||I(),e.addTest=function(a,b){if(typeof a=="object")for(var d in a)A(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return e;b=typeof b=="function"?b():b,typeof f!="undefined"&&f&&(g.className+=" "+(b?"":"no-")+a),e[a]=b}return e},B(""),i=k=null,function(a,b){function l(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x<style>"+b+"</style>",d.insertBefore(c.lastChild,d.firstChild)}function m(){var a=s.elements;return typeof a=="string"?a.split(" "):a}function n(a){var b=j[a[h]];return b||(b={},i++,a[h]=i,j[i]=b),b}function o(a,c,d){c||(c=b);if(k)return c.createElement(a);d||(d=n(c));var g;return d.cache[a]?g=d.cache[a].cloneNode():f.test(a)?g=(d.cache[a]=d.createElem(a)).cloneNode():g=d.createElem(a),g.canHaveChildren&&!e.test(a)&&!g.tagUrn?d.frag.appendChild(g):g}function p(a,c){a||(a=b);if(k)return a.createDocumentFragment();c=c||n(a);var d=c.frag.cloneNode(),e=0,f=m(),g=f.length;for(;e<g;e++)d.createElement(f[e]);return d}function q(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return s.shivMethods?o(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+m().join().replace(/[\w\-]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(s,b.frag)}function r(a){a||(a=b);var c=n(a);return s.shivCSS&&!g&&!c.hasCSS&&(c.hasCSS=!!l(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),k||q(a,c),a}var c="3.7.0",d=a.html5||{},e=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,f=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,g,h="_html5shiv",i=0,j={},k;(function(){try{var a=b.createElement("a");a.innerHTML="<xyz></xyz>",g="hidden"in a,k=a.childNodes.length==1||function(){b.createElement("a");var a=b.createDocumentFragment();return typeof a.cloneNode=="undefined"||typeof a.createDocumentFragment=="undefined"||typeof a.createElement=="undefined"}()}catch(c){g=!0,k=!0}})();var s={elements:d.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",version:c,shivCSS:d.shivCSS!==!1,supportsUnknownElements:k,shivMethods:d.shivMethods!==!1,type:"default",shivDocument:r,createElement:o,createDocumentFragment:p};a.html5=s,r(b)}(this,b),e._version=d,e._prefixes=n,e._domPrefixes=q,e._cssomPrefixes=p,e.hasEvent=y,e.testProp=function(a){return F([a])},e.testAllProps=H,e.testStyles=x,e.prefixed=function(a,b,c){return b?H(a,b,c):H(a,"pfx")},g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" js "+u.join(" "):""),e}(this,this.document),function(a,b,c){function d(a){return"[object Function]"==o.call(a)}function e(a){return"string"==typeof a}function f(){}function g(a){return!a||"loaded"==a||"complete"==a||"uninitialized"==a}function h(){var a=p.shift();q=1,a?a.t?m(function(){("c"==a.t?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){"img"!=a&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l=b.createElement(a),o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};1===y[c]&&(r=1,y[c]=[]),"object"==a?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),"img"!=a&&(r||2===y[c]?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i("c"==b?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),1==p.length&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&"[object Opera]"==o.call(a.opera),l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return"[object Array]"==o.call(a)},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;f<d;f++)g=a[f].split("="),(e=z[g.shift()])&&(c=e(c,g));for(f=0;f<b;f++)c=x[f](c);return c}function g(a,e,f,g,h){var i=b(a),j=i.autoCallback;i.url.split(".").pop().split("?").shift(),i.bypass||(e&&(e=d(e)?e:e[a]||e[g]||e[a.split("/").pop().split("?")[0]]),i.instead?i.instead(a,e,f,g,h):(y[i.url]?i.noexec=!0:y[i.url]=1,f.load(i.url,i.forceCSS||!i.forceJS&&"css"==i.url.split(".").pop().split("?").shift()?"c":c,i.noexec,i.attrs,i.timeout),(d(e)||d(j))&&f.load(function(){k(),e&&e(i.origUrl,h,g),j&&j(i.origUrl,h,g),y[i.url]=2})))}function h(a,b){function c(a,c){if(a){if(e(a))c||(j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}),g(a,j,b,0,h);else if(Object(a)===a)for(n in m=function(){var b=0,c;for(c in a)a.hasOwnProperty(c)&&b++;return b}(),a)a.hasOwnProperty(n)&&(!c&&!--m&&(d(j)?j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}:j[n]=function(a){return function(){var b=[].slice.call(arguments);a&&a.apply(this,b),l()}}(k[n])),g(a[n],j,b,n,h))}else!c&&l()}var h=!!a.test,i=a.load||a.both,j=a.callback||f,k=j,l=a.complete||f,m,n;c(h?a.yep:a.nope,!!i),i&&c(i)}var i,j,l=this.yepnope.loader;if(e(a))g(a,0,l,0);else if(w(a))for(i=0;i<a.length;i++)j=a[i],e(j)?g(j,0,l,0):w(j)?B(j):Object(j)===j&&h(j,l);else Object(a)===a&&h(a,l)},B.addPrefix=function(a,b){z[a]=b},B.addFilter=function(a){x.push(a)},B.errorTimeout=1e4,null==b.readyState&&b.addEventListener&&(b.readyState="loading",b.addEventListener("DOMContentLoaded",A=function(){b.removeEventListener("DOMContentLoaded",A,0),b.readyState="complete"},0)),a.yepnope=k(),a.yepnope.executeStack=h,a.yepnope.injectJs=function(a,c,d,e,i,j){var k=b.createElement("script"),l,o,e=e||B.errorTimeout;k.src=a;for(o in d)k.setAttribute(o,d[o]);c=j?h:c||f,k.onreadystatechange=k.onload=function(){!l&&g(k.readyState)&&(l=1,c(),k.onload=k.onreadystatechange=null)},m(function(){l||(l=1,c(1))},e),i?k.onload():n.parentNode.insertBefore(k,n)},a.yepnope.injectCss=function(a,c,d,e,g,i){var e=b.createElement("link"),j,c=i?h:c||f;e.href=a,e.rel="stylesheet",e.type="text/css";for(j in d)e.setAttribute(j,d[j]);g||(n.parentNode.insertBefore(e,n),m(c,0))}}(this,document),Modernizr.load=function(){yepnope.apply(window,[].slice.call(arguments,0))},Modernizr.addTest("fileinput",function(){var a=document.createElement("input");return a.type="file",!a.disabled});
/*** This library has been modified to accommodate IE SVG rendering.
**** Changed f = i.getAttribute("xlink:href").split("#") to f = (i.getAttribute("xlink:href") || i.getAttribute("href")).split("#") at column 569.
* Added null handling 12/28/2017 - Huong
***/
(function (e, t, n, r, i) { function s(t, n) { if (n) { var r = n.getAttribute("viewBox"), i = e.createDocumentFragment(), s = n.cloneNode(true); if (r) { t.setAttribute("viewBox", r) } while (s.childNodes.length) { i.appendChild(s.childNodes[0]) } t.appendChild(i) } } function o() { var t = this, n = e.createElement("x"), r = t.s; n.innerHTML = t.responseText; t.onload = function () { r.splice(0).map(function (e) { s(e[0], n.querySelector("#" + e[1].replace(/(\W)/g, "\\$1"))) }) }; t.onload() } function u() { var i; while (i = t[0]) { var a = i.parentNode, f = (i.getAttribute("xlink:href") || i.getAttribute("href") || '').split("#"), l = f[0], c = f[1]; a.removeChild(i); if (l.length) { var h = r[l] = r[l] || new XMLHttpRequest; if (!h.s) { h.s = []; h.open("GET", l); h.onload = o; h.send() } h.s.push([a, c]); if (h.readyState === 4) { h.onload() } } else { s(a, e.getElementById(c)) } } n(u) } if (i) { u() } })(document, document.getElementsByTagName("use"), window.requestAnimationFrame || window.setTimeout, {}, /(Trident\/[567]|Edge\/12)\b/.test(navigator.userAgent));

/**
 * @license
 * lodash 4.11.1 (Custom Build) lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE
 * Build: `lodash -o ./dist/lodash.js`
 */
; (function () {
	function t(t, n) { return t.set(n[0], n[1]), t } function n(t, n) { return t.add(n), t } function r(t, n, r) { switch (r.length) { case 0: return t.call(n); case 1: return t.call(n, r[0]); case 2: return t.call(n, r[0], r[1]); case 3: return t.call(n, r[0], r[1], r[2]) } return t.apply(n, r) } function e(t, n, r, e) { for (var u = -1, o = t.length; ++u < o;) { var i = t[u]; n(e, i, r(i), t) } return e } function u(t, n) { for (var r = -1, e = t.length; ++r < e && false !== n(t[r], r, t) ;); return t } function o(t, n) {
		for (var r = -1, e = t.length; ++r < e;) if (!n(t[r], r, t)) return false;
		return true
	} function i(t, n) { for (var r = -1, e = t.length, u = 0, o = []; ++r < e;) { var i = t[r]; n(i, r, t) && (o[u++] = i) } return o } function f(t, n) { return !!t.length && -1 < d(t, n, 0) } function c(t, n, r) { for (var e = -1, u = t.length; ++e < u;) if (r(n, t[e])) return true; return false } function a(t, n) { for (var r = -1, e = t.length, u = Array(e) ; ++r < e;) u[r] = n(t[r], r, t); return u } function l(t, n) { for (var r = -1, e = n.length, u = t.length; ++r < e;) t[u + r] = n[r]; return t } function s(t, n, r, e) { var u = -1, o = t.length; for (e && o && (r = t[++u]) ; ++u < o;) r = n(r, t[u], u, t); return r } function h(t, n, r, e) {
		var u = t.length; for (e && u && (r = t[--u]) ; u--;) r = n(r, t[u], u, t); return r
	} function p(t, n) { for (var r = -1, e = t.length; ++r < e;) if (n(t[r], r, t)) return true; return false } function _(t, n, r) { for (var e = -1, u = t.length; ++e < u;) { var o = t[e], i = n(o); if (null != i && (f === q ? i === i : r(i, f))) var f = i, c = o } return c } function v(t, n, r, e) { var u; return r(t, function (t, r, o) { return n(t, r, o) ? (u = e ? r : t, false) : void 0 }), u } function g(t, n, r) { for (var e = t.length, u = r ? e : -1; r ? u-- : ++u < e;) if (n(t[u], u, t)) return u; return -1 } function d(t, n, r) {
		if (n !== n) return M(t, r); --r; for (var e = t.length; ++r < e;) if (t[r] === n) return r;
		return -1
	} function y(t, n, r, e) { --r; for (var u = t.length; ++r < u;) if (e(t[r], n)) return r; return -1 } function b(t, n) { var r = t ? t.length : 0; return r ? m(t, n) / r : K } function x(t, n, r, e, u) { return u(t, function (t, u, o) { r = e ? (e = false, t) : n(r, t, u, o) }), r } function j(t, n) { var r = t.length; for (t.sort(n) ; r--;) t[r] = t[r].c; return t } function m(t, n) { for (var r, e = -1, u = t.length; ++e < u;) { var o = n(t[e]); o !== q && (r = r === q ? o : r + o) } return r } function w(t, n) { for (var r = -1, e = Array(t) ; ++r < t;) e[r] = n(r); return e } function A(t, n) {
		return a(n, function (n) {
			return [n, t[n]];
		})
	} function O(t) { return function (n) { return t(n) } } function k(t, n) { return a(n, function (n) { return t[n] }) } function E(t, n) { for (var r = -1, e = t.length; ++r < e && -1 < d(n, t[r], 0) ;); return r } function I(t, n) { for (var r = t.length; r-- && -1 < d(n, t[r], 0) ;); return r } function S(t) { return t && t.Object === Object ? t : null } function R(t, n) { if (t !== n) { var r = null === t, e = t === q, u = t === t, o = null === n, i = n === q, f = n === n; if (t > n && !o || !u || r && !i && f || e && f) return 1; if (n > t && !r || !f || o && !e && u || i && u) return -1 } return 0 } function W(t) {
		return function (n, r) {
			var e;
			return n === q && r === q ? 0 : (n !== q && (e = n), r !== q && (e = e === q ? r : t(e, r)), e)
		}
	} function B(t) { return Ut[t] } function L(t) { return Dt[t] } function C(t) { return "\\" + Nt[t] } function M(t, n, r) { var e = t.length; for (n += r ? 0 : -1; r ? n-- : ++n < e;) { var u = t[n]; if (u !== u) return n } return -1 } function z(t) { var n = false; if (null != t && typeof t.toString != "function") try { n = !!(t + "") } catch (r) { } return n } function U(t, n) { return t = typeof t == "number" || jt.test(t) ? +t : -1, t > -1 && 0 == t % 1 && (null == n ? 9007199254740991 : n) > t } function D(t) {
		for (var n, r = []; !(n = t.next()).done;) r.push(n.value);
		return r
	} function $(t) { var n = -1, r = Array(t.size); return t.forEach(function (t, e) { r[++n] = [e, t] }), r } function F(t, n) { for (var r = -1, e = t.length, u = 0, o = []; ++r < e;) { var i = t[r]; i !== n && "__lodash_placeholder__" !== i || (t[r] = "__lodash_placeholder__", o[u++] = r) } return o } function N(t) { var n = -1, r = Array(t.size); return t.forEach(function (t) { r[++n] = t }), r } function P(t) { if (!t || !Bt.test(t)) return t.length; for (var n = Rt.lastIndex = 0; Rt.test(t) ;) n++; return n } function Z(t) { return $t[t] } function T(S) {
		function jt(t) {
			if (Le(t) && !oi(t) && !(t instanceof Et)) {
				if (t instanceof kt) return t; if (xu.call(t, "__wrapped__")) return Xr(t)
			} return new kt(t)
		} function Ot() { } function kt(t, n) { this.__wrapped__ = t, this.__actions__ = [], this.__chain__ = !!n, this.__index__ = 0, this.__values__ = q } function Et(t) { this.__wrapped__ = t, this.__actions__ = [], this.__dir__ = 1, this.__filtered__ = false, this.__iteratees__ = [], this.__takeCount__ = 4294967295, this.__views__ = [] } function Ut() { } function Dt(t) { var n = -1, r = t ? t.length : 0; for (this.clear() ; ++n < r;) { var e = t[n]; this.set(e[0], e[1]) } } function $t(t) {
			var n = -1, r = t ? t.length : 0;
			for (this.__data__ = new Dt; ++n < r;) this.push(t[n])
		} function Ft(t, n) { var r = t.__data__; return qr(n) ? (r = r.__data__, "__lodash_hash_undefined__" === (typeof n == "string" ? r.string : r.hash)[n]) : r.has(n) } function Nt(t) { var n = -1, r = t ? t.length : 0; for (this.clear() ; ++n < r;) { var e = t[n]; this.set(e[0], e[1]) } } function Tt(t, n) { var r = Kt(t, n); return 0 > r ? false : (r == t.length - 1 ? t.pop() : Uu.call(t, r, 1), true) } function qt(t, n) { var r = Kt(t, n); return 0 > r ? q : t[r][1] } function Kt(t, n) { for (var r = t.length; r--;) if (we(t[r][0], n)) return r; return -1 } function Gt(t, n, r) {
			var e = Kt(t, n); 0 > e ? t.push([n, r]) : t[e][1] = r
		} function Jt(t, n, r, e) { return t === q || we(t, du[r]) && !xu.call(e, r) ? n : t } function Qt(t, n, r) { (r === q || we(t[n], r)) && (typeof n != "number" || r !== q || n in t) || (t[n] = r) } function Xt(t, n, r) { var e = t[n]; xu.call(t, n) && we(e, r) && (r !== q || n in t) || (t[n] = r) } function tn(t, n, r, e) { return _o(t, function (t, u, o) { n(e, t, r(t), o) }), e } function nn(t, n) { return t && ir(n, He(n), t) } function rn(t, n) { for (var r = -1, e = null == t, u = n.length, o = Array(u) ; ++r < u;) o[r] = e ? q : Ge(t, n[r]); return o } function en(t, n, r) {
			return t === t && (r !== q && (t = t > r ? r : t),
			n !== q && (t = n > t ? n : t)), t
		} function un(t, n, r, e, o, i, f) {
			var c; if (e && (c = i ? e(t, o, i, f) : e(t)), c !== q) return c; if (!Be(t)) return t; if (o = oi(t)) { if (c = Ur(t), !n) return or(t, c) } else { var a = Mr(t), l = "[object Function]" == a || "[object GeneratorFunction]" == a; if (ii(t)) return nr(t, n); if ("[object Object]" == a || "[object Arguments]" == a || l && !i) { if (z(t)) return i ? t : {}; if (c = Dr(l ? {} : t), !n) return fr(t, nn(c, t)) } else { if (!zt[a]) return i ? t : {}; c = $r(t, a, un, n) } } if (f || (f = new Nt), i = f.get(t)) return i; if (f.set(t, c), !o) var s = r ? dn(t, He, Cr) : He(t); return u(s || t, function (u, o) {
				s && (o = u, u = t[o]), Xt(c, o, un(u, n, r, e, o, t, f))
			}), c
		} function on(t) { var n = He(t), r = n.length; return function (e) { if (null == e) return !r; for (var u = r; u--;) { var o = n[u], i = t[o], f = e[o]; if (f === q && !(o in Object(e)) || !i(f)) return false } return true } } function fn(t) { return Be(t) ? Cu(t) : {} } function cn(t, n, r) { if (typeof t != "function") throw new vu("Expected a function"); return zu(function () { t.apply(q, r) }, n) } function an(t, n, r, e) {
			var u = -1, o = f, i = true, l = t.length, s = [], h = n.length; if (!l) return s; r && (n = a(n, O(r))), e ? (o = c, i = false) : n.length >= 200 && (o = Ft,
			i = false, n = new $t(n)); t: for (; ++u < l;) { var p = t[u], _ = r ? r(p) : p; if (i && _ === _) { for (var v = h; v--;) if (n[v] === _) continue t; s.push(p) } else o(n, _, e) || s.push(p) } return s
		} function ln(t, n) { var r = true; return _o(t, function (t, e, u) { return r = !!n(t, e, u) }), r } function sn(t, n) { var r = []; return _o(t, function (t, e, u) { n(t, e, u) && r.push(t) }), r } function hn(t, n, r, e, u) { var o = -1, i = t.length; for (r || (r = Nr), u || (u = []) ; ++o < i;) { var f = t[o]; n > 0 && r(f) ? n > 1 ? hn(f, n - 1, r, e, u) : l(u, f) : e || (u[u.length] = f) } return u } function pn(t, n) { return t && go(t, n, He) } function _n(t, n) {
			return t && yo(t, n, He)
		} function vn(t, n) { return i(n, function (n) { return Se(t[n]) }) } function gn(t, n) { n = Tr(n, t) ? [n] : Xn(n); for (var r = 0, e = n.length; null != t && e > r;) t = t[n[r++]]; return r && r == e ? t : q } function dn(t, n, r) { return n = n(t), oi(t) ? n : l(n, r(t)) } function yn(t, n) { return xu.call(t, n) || typeof t == "object" && n in t && null === Fu(Object(t)) } function bn(t, n) { return n in Object(t) } function xn(t, n, r) {
			for (var e = r ? c : f, u = t[0].length, o = t.length, i = o, l = Array(o), s = 1 / 0, h = []; i--;) {
				var p = t[i]; i && n && (p = a(p, O(n))), s = qu(p.length, s),
				l[i] = r || !n && (120 > u || 120 > p.length) ? q : new $t(i && p)
			} var p = t[0], _ = -1, v = l[0]; t: for (; ++_ < u && s > h.length;) { var g = p[_], d = n ? n(g) : g; if (v ? !Ft(v, d) : !e(h, d, r)) { for (i = o; --i;) { var y = l[i]; if (y ? !Ft(y, d) : !e(t[i], d, r)) continue t } v && v.push(d), h.push(g) } } return h
		} function jn(t, n, r) { var e = {}; return pn(t, function (t, u, o) { n(e, r(t), u, o) }), e } function mn(t, n, e) { return Tr(n, t) || (n = Xn(n), t = Yr(t, n), n = ee(n)), n = null == t ? t : t[n], null == n ? q : r(n, t, e) } function wn(t, n, r, e, u) {
			if (t === n) n = true; else if (null == t || null == n || !Be(t) && !Le(n)) n = t !== t && n !== n; else t: {
				var o = oi(t), i = oi(n), f = "[object Array]", c = "[object Array]"; o || (f = Mr(t), f = "[object Arguments]" == f ? "[object Object]" : f), i || (c = Mr(n), c = "[object Arguments]" == c ? "[object Object]" : c); var a = "[object Object]" == f && !z(t), i = "[object Object]" == c && !z(n); if ((c = f == c) && !a) u || (u = new Nt), n = o || Fe(t) ? Er(t, n, wn, r, e, u) : Ir(t, n, f, wn, r, e, u); else {
					if (!(2 & e) && (o = a && xu.call(t, "__wrapped__"), f = i && xu.call(n, "__wrapped__"), o || f)) { t = o ? t.value() : t, n = f ? n.value() : n, u || (u = new Nt), n = wn(t, n, r, e, u); break t } if (c) n: if (u || (u = new Nt), o = 2 & e,
					f = He(t), i = f.length, c = He(n).length, i == c || o) { for (a = i; a--;) { var l = f[a]; if (!(o ? l in n : yn(n, l))) { n = false; break n } } if (c = u.get(t)) n = c == n; else { c = true, u.set(t, n); for (var s = o; ++a < i;) { var l = f[a], h = t[l], p = n[l]; if (r) var _ = o ? r(p, h, l, n, t, u) : r(h, p, l, t, n, u); if (_ === q ? h !== p && !wn(h, p, r, e, u) : !_) { c = false; break } s || (s = "constructor" == l) } c && !s && (r = t.constructor, e = n.constructor, r != e && "constructor" in t && "constructor" in n && !(typeof r == "function" && r instanceof r && typeof e == "function" && e instanceof e) && (c = false)), u["delete"](t), n = c } } else n = false; else n = false;
				}
			} return n
		} function An(t, n, r, e) { var u = r.length, o = u, i = !e; if (null == t) return !o; for (t = Object(t) ; u--;) { var f = r[u]; if (i && f[2] ? f[1] !== t[f[0]] : !(f[0] in t)) return false } for (; ++u < o;) { var f = r[u], c = f[0], a = t[c], l = f[1]; if (i && f[2]) { if (a === q && !(c in t)) return false } else { if (f = new Nt, e) var s = e(a, l, c, t, n, f); if (s === q ? !wn(l, a, e, 3, f) : !s) return false } } return true } function On(t) { return typeof t == "function" ? t : null == t ? iu : typeof t == "object" ? oi(t) ? Sn(t[0], t[1]) : In(t) : lu(t) } function kn(t) {
			t = null == t ? t : Object(t); var n, r = []; for (n in t) r.push(n);
			return r
		} function En(t, n) { var r = -1, e = ke(t) ? Array(t.length) : []; return _o(t, function (t, u, o) { e[++r] = n(t, u, o) }), e } function In(t) { var n = Wr(t); return 1 == n.length && n[0][2] ? Gr(n[0][0], n[0][1]) : function (r) { return r === t || An(r, t, n) } } function Sn(t, n) { return Tr(t) && n === n && !Be(n) ? Gr(t, n) : function (r) { var e = Ge(r, t); return e === q && e === n ? Ye(r, t) : wn(n, e, q, 3) } } function Rn(t, n, r, e, o) {
			if (t !== n) {
				if (!oi(n) && !Fe(n)) var i = Qe(n); u(i || n, function (u, f) {
					if (i && (f = u, u = n[f]), Be(u)) {
						o || (o = new Nt); var c = f, a = o, l = t[c], s = n[c], h = a.get(s);
						if (h) Qt(t, c, h); else { var h = e ? e(l, s, c + "", t, n, a) : q, p = h === q; p && (h = s, oi(s) || Fe(s) ? oi(l) ? h = l : Ee(l) ? h = or(l) : (p = false, h = un(s, true)) : ze(s) || Oe(s) ? Oe(l) ? h = Ve(l) : !Be(l) || r && Se(l) ? (p = false, h = un(s, true)) : h = l : p = false), a.set(s, h), p && Rn(h, s, r, e, a), a["delete"](s), Qt(t, c, h) }
					} else c = e ? e(t[f], u, f + "", t, n, o) : q, c === q && (c = u), Qt(t, f, c)
				})
			}
		} function Wn(t, n) { var r = t.length; return r ? (n += 0 > n ? r : 0, U(n, r) ? t[n] : q) : void 0 } function Bn(t, n, r) {
			var e = -1; return n = a(n.length ? n : [iu], O(Rr())), t = En(t, function (t) {
				return {
					a: a(n, function (n) { return n(t) }), b: ++e,
					c: t
				}
			}), j(t, function (t, n) { var e; t: { e = -1; for (var u = t.a, o = n.a, i = u.length, f = r.length; ++e < i;) { var c = R(u[e], o[e]); if (c) { e = f > e ? c * ("desc" == r[e] ? -1 : 1) : c; break t } } e = t.b - n.b } return e })
		} function Ln(t, n) { return t = Object(t), s(n, function (n, r) { return r in t && (n[r] = t[r]), n }, {}) } function Cn(t, n) { for (var r = -1, e = dn(t, Qe, wo), u = e.length, o = {}; ++r < u;) { var i = e[r], f = t[i]; n(f, i) && (o[i] = f) } return o } function Mn(t) { return function (n) { return null == n ? q : n[t] } } function zn(t) { return function (n) { return gn(n, t) } } function Un(t, n, r, e) {
			var u = e ? y : d, o = -1, i = n.length, f = t; for (r && (f = a(t, O(r))) ; ++o < i;) for (var c = 0, l = n[o], l = r ? r(l) : l; -1 < (c = u(f, l, c, e)) ;) f !== t && Uu.call(f, c, 1), Uu.call(t, c, 1); return t
		} function Dn(t, n) { for (var r = t ? n.length : 0, e = r - 1; r--;) { var u = n[r]; if (e == r || u != o) { var o = u; if (U(u)) Uu.call(t, u, 1); else if (Tr(u, t)) delete t[u]; else { var u = Xn(u), i = Yr(t, u); null != i && delete i[ee(u)] } } } } function $n(t, n) { return t + $u(Ku() * (n - t + 1)) } function Fn(t, n) {
			var r = ""; if (!t || 1 > n || n > 9007199254740991) return r; do n % 2 && (r += t), (n = $u(n / 2)) && (t += t); while (n); return r;
		} function Nn(t, n, r, e) { n = Tr(n, t) ? [n] : Xn(n); for (var u = -1, o = n.length, i = o - 1, f = t; null != f && ++u < o;) { var c = n[u]; if (Be(f)) { var a = r; if (u != i) { var l = f[c], a = e ? e(l, c, f) : q; a === q && (a = null == l ? U(n[u + 1]) ? [] : {} : l) } Xt(f, c, a) } f = f[c] } return t } function Pn(t, n, r) { var e = -1, u = t.length; for (0 > n && (n = -n > u ? 0 : u + n), r = r > u ? u : r, 0 > r && (r += u), u = n > r ? 0 : r - n >>> 0, n >>>= 0, r = Array(u) ; ++e < u;) r[e] = t[e + n]; return r } function Zn(t, n) { var r; return _o(t, function (t, e, u) { return r = n(t, e, u), !r }), !!r } function Tn(t, n, r) {
			var e = 0, u = t ? t.length : e; if (typeof n == "number" && n === n && 2147483647 >= u) {
				for (; u > e;) { var o = e + u >>> 1, i = t[o]; (r ? n >= i : n > i) && null !== i ? e = o + 1 : u = o } return u
			} return qn(t, n, iu, r)
		} function qn(t, n, r, e) { n = r(n); for (var u = 0, o = t ? t.length : 0, i = n !== n, f = null === n, c = n === q; o > u;) { var a = $u((u + o) / 2), l = r(t[a]), s = l !== q, h = l === l; (i ? h || e : f ? h && s && (e || null != l) : c ? h && (e || s) : null == l ? 0 : e ? n >= l : n > l) ? u = a + 1 : o = a } return qu(o, 4294967294) } function Vn(t, n) { for (var r = 0, e = t.length, u = t[0], o = n ? n(u) : u, i = o, f = 1, c = [u]; ++r < e;) u = t[r], o = n ? n(u) : u, we(o, i) || (i = o, c[f++] = u); return c } function Kn(t, n, r) {
			var e = -1, u = f, o = t.length, i = true, a = [], l = a;
			if (r) i = false, u = c; else if (o < 200) l = n ? [] : a; else { if (u = n ? null : xo(t)) return N(u); i = false, u = Ft, l = new $t }t: for (; ++e < o;) { var s = t[e], h = n ? n(s) : s; if (i && h === h) { for (var p = l.length; p--;) if (l[p] === h) continue t; n && l.push(h), a.push(s) } else u(l, h, r) || (l !== a && l.push(h), a.push(s)) } return a
		} function Gn(t, n, r, e) { for (var u = t.length, o = e ? u : -1; (e ? o-- : ++o < u) && n(t[o], o, t) ;); return r ? Pn(t, e ? 0 : o, e ? o + 1 : u) : Pn(t, e ? o + 1 : 0, e ? u : o) } function Jn(t, n) {
			var r = t; return r instanceof Et && (r = r.value()), s(n, function (t, n) {
				return n.func.apply(n.thisArg, l([t], n.args));
			}, r)
		} function Yn(t, n, r) { for (var e = -1, u = t.length; ++e < u;) var o = o ? l(an(o, t[e], n, r), an(t[e], o, n, r)) : t[e]; return o && o.length ? Kn(o, n, r) : [] } function Hn(t, n, r) { for (var e = -1, u = t.length, o = n.length, i = {}; ++e < u;) r(i, t[e], o > e ? n[e] : q); return i } function Qn(t) { return Ee(t) ? t : [] } function Xn(t) { return oi(t) ? t : Oo(t) } function tr(t, n, r) { var e = t.length; return r = r === q ? e : r, n || e > r ? Pn(t, n, r) : t } function nr(t, n) { if (n) return t.slice(); var r = new t.constructor(t.length); return t.copy(r), r } function rr(t) {
			var n = new t.constructor(t.byteLength);
			return new Su(n).set(new Su(t)), n
		} function er(t, n, r, e) { var u = -1, o = t.length, i = r.length, f = -1, c = n.length, a = Tu(o - i, 0), l = Array(c + a); for (e = !e; ++f < c;) l[f] = n[f]; for (; ++u < i;) (e || o > u) && (l[r[u]] = t[u]); for (; a--;) l[f++] = t[u++]; return l } function ur(t, n, r, e) { var u = -1, o = t.length, i = -1, f = r.length, c = -1, a = n.length, l = Tu(o - f, 0), s = Array(l + a); for (e = !e; ++u < l;) s[u] = t[u]; for (l = u; ++c < a;) s[l + c] = n[c]; for (; ++i < f;) (e || o > u) && (s[l + r[i]] = t[u++]); return s } function or(t, n) {
			var r = -1, e = t.length; for (n || (n = Array(e)) ; ++r < e;) n[r] = t[r]; return n;
		} function ir(t, n, r, e) { r || (r = {}); for (var u = -1, o = n.length; ++u < o;) { var i = n[u], f = e ? e(r[i], t[i], i, r, t) : t[i]; Xt(r, i, f) } return r } function fr(t, n) { return ir(t, Cr(t), n) } function cr(t, n) { return function (r, u) { var o = oi(r) ? e : tn, i = n ? n() : {}; return o(r, t, Rr(u), i) } } function ar(t) { return je(function (n, r) { var e = -1, u = r.length, o = u > 1 ? r[u - 1] : q, i = u > 2 ? r[2] : q, o = typeof o == "function" ? (u--, o) : q; for (i && Zr(r[0], r[1], i) && (o = 3 > u ? q : o, u = 1), n = Object(n) ; ++e < u;) (i = r[e]) && t(n, i, e, o); return n }) } function lr(t, n) {
			return function (r, e) {
				if (null == r) return r;
				if (!ke(r)) return t(r, e); for (var u = r.length, o = n ? u : -1, i = Object(r) ; (n ? o-- : ++o < u) && false !== e(i[o], o, i) ;); return r
			}
		} function sr(t) { return function (n, r, e) { var u = -1, o = Object(n); e = e(n); for (var i = e.length; i--;) { var f = e[t ? i : ++u]; if (false === r(o[f], f, o)) break } return n } } function hr(t, n, r) { function e() { return (this && this !== Yt && this instanceof e ? o : t).apply(u ? r : this, arguments) } var u = 1 & n, o = vr(t); return e } function pr(t) {
			return function (n) {
				n = Ke(n); var r = Bt.test(n) ? n.match(Rt) : q, e = r ? r[0] : n.charAt(0); return n = r ? tr(r, 1).join("") : n.slice(1),
				e[t]() + n
			}
		} function _r(t) { return function (n) { return s(uu(eu(n).replace(It, "")), t, "") } } function vr(t) {
			return function () {
				var n = arguments; switch (n.length) { case 0: return new t; case 1: return new t(n[0]); case 2: return new t(n[0], n[1]); case 3: return new t(n[0], n[1], n[2]); case 4: return new t(n[0], n[1], n[2], n[3]); case 5: return new t(n[0], n[1], n[2], n[3], n[4]); case 6: return new t(n[0], n[1], n[2], n[3], n[4], n[5]); case 7: return new t(n[0], n[1], n[2], n[3], n[4], n[5], n[6]) } var r = fn(t.prototype), n = t.apply(r, n); return Be(n) ? n : r;
			}
		} function gr(t, n, e) { function u() { for (var i = arguments.length, f = Array(i), c = i, a = Lr(u) ; c--;) f[c] = arguments[c]; return c = 3 > i && f[0] !== a && f[i - 1] !== a ? [] : F(f, a), i -= c.length, e > i ? Ar(t, n, yr, u.placeholder, q, f, c, q, q, e - i) : r(this && this !== Yt && this instanceof u ? o : t, this, f) } var o = vr(t); return u } function dr(t) {
			return je(function (n) {
				n = hn(n, 1); var r = n.length, e = r, u = kt.prototype.thru; for (t && n.reverse() ; e--;) {
					var o = n[e]; if (typeof o != "function") throw new vu("Expected a function"); if (u && !i && "wrapper" == Sr(o)) var i = new kt([], true);
				} for (e = i ? e : r; ++e < r;) var o = n[e], u = Sr(o), f = "wrapper" == u ? jo(o) : q, i = f && Vr(f[0]) && 424 == f[1] && !f[4].length && 1 == f[9] ? i[Sr(f[0])].apply(i, f[3]) : 1 == o.length && Vr(o) ? i[u]() : i.thru(o); return function () { var t = arguments, e = t[0]; if (i && 1 == t.length && oi(e) && e.length >= 200) return i.plant(e).value(); for (var u = 0, t = r ? n[u].apply(this, t) : e; ++u < r;) t = n[u].call(this, t); return t }
			})
		} function yr(t, n, r, e, u, o, i, f, c, a) {
			function l() {
				for (var d = arguments.length, y = d, b = Array(d) ; y--;) b[y] = arguments[y]; if (_) {
					var x, j = Lr(l), y = b.length; for (x = 0; y--;) b[y] === j && x++;
				} if (e && (b = er(b, e, u, _)), o && (b = ur(b, o, i, _)), d -= x, _ && a > d) return j = F(b, j), Ar(t, n, yr, l.placeholder, r, b, j, f, c, a - d); if (j = h ? r : this, y = p ? j[t] : t, d = b.length, f) { x = b.length; for (var m = qu(f.length, x), w = or(b) ; m--;) { var A = f[m]; b[m] = U(A, x) ? w[A] : q } } else v && d > 1 && b.reverse(); return s && d > c && (b.length = c), this && this !== Yt && this instanceof l && (y = g || vr(y)), y.apply(j, b)
			} var s = 128 & n, h = 1 & n, p = 2 & n, _ = 24 & n, v = 512 & n, g = p ? q : vr(t); return l
		} function br(t, n) { return function (r, e) { return jn(r, t, n(e)) } } function xr(t) {
			return je(function (n) {
				return n = 1 == n.length && oi(n[0]) ? a(n[0], O(Rr())) : a(hn(n, 1, Pr), O(Rr())),
				je(function (e) { var u = this; return t(n, function (t) { return r(t, u, e) }) })
			})
		} function jr(t, n) { n = n === q ? " " : n + ""; var r = n.length; return 2 > r ? r ? Fn(n, t) : n : (r = Fn(n, Du(t / P(n))), Bt.test(n) ? tr(r.match(Rt), 0, t).join("") : r.slice(0, t)) } function mr(t, n, e, u) { function o() { for (var n = -1, c = arguments.length, a = -1, l = u.length, s = Array(l + c), h = this && this !== Yt && this instanceof o ? f : t; ++a < l;) s[a] = u[a]; for (; c--;) s[a++] = arguments[++n]; return r(h, i ? e : this, s) } var i = 1 & n, f = vr(t); return o } function wr(t) {
			return function (n, r, e) {
				e && typeof e != "number" && Zr(n, r, e) && (r = e = q),
				n = qe(n), n = n === n ? n : 0, r === q ? (r = n, n = 0) : r = qe(r) || 0, e = e === q ? r > n ? 1 : -1 : qe(e) || 0; var u = -1; r = Tu(Du((r - n) / (e || 1)), 0); for (var o = Array(r) ; r--;) o[t ? r : ++u] = n, n += e; return o
			}
		} function Ar(t, n, r, e, u, o, i, f, c, a) { var l = 8 & n, s = l ? i : q; i = l ? q : i; var h = l ? o : q; return o = l ? q : o, n = (n | (l ? 32 : 64)) & ~(l ? 64 : 32), 4 & n || (n &= -4), n = [t, n, u, h, s, o, i, f, c, a], r = r.apply(q, n), Vr(t) && Ao(r, n), r.placeholder = e, r } function Or(t) {
			var n = pu[t]; return function (t, r) {
				if (t = qe(t), r = Ze(r)) {
					var e = (Ke(t) + "e").split("e"), e = n(e[0] + "e" + (+e[1] + r)), e = (Ke(e) + "e").split("e");
					return +(e[0] + "e" + (+e[1] - r))
				} return n(t)
			}
		} function kr(t, n, r, e, u, o, i, f) {
			var c = 2 & n; if (!c && typeof t != "function") throw new vu("Expected a function"); var a = e ? e.length : 0; if (a || (n &= -97, e = u = q), i = i === q ? i : Tu(Ze(i), 0), f = f === q ? f : Ze(f), a -= u ? u.length : 0, 64 & n) { var l = e, s = u; e = u = q } var h = c ? q : jo(t); return o = [t, n, r, e, u, l, s, o, i, f], h && (r = o[1], t = h[1], n = r | t, e = 128 == t && 8 == r || 128 == t && 256 == r && h[8] >= o[7].length || 384 == t && h[8] >= h[7].length && 8 == r, 131 > n || e) && (1 & t && (o[2] = h[2], n |= 1 & r ? 0 : 4), (r = h[3]) && (e = o[3], o[3] = e ? er(e, r, h[4]) : r, o[4] = e ? F(o[3], "__lodash_placeholder__") : h[4]),
			(r = h[5]) && (e = o[5], o[5] = e ? ur(e, r, h[6]) : r, o[6] = e ? F(o[5], "__lodash_placeholder__") : h[6]), (r = h[7]) && (o[7] = r), 128 & t && (o[8] = null == o[8] ? h[8] : qu(o[8], h[8])), null == o[9] && (o[9] = h[9]), o[0] = h[0], o[1] = n), t = o[0], n = o[1], r = o[2], e = o[3], u = o[4], f = o[9] = null == o[9] ? c ? 0 : t.length : Tu(o[9] - a, 0), !f && 24 & n && (n &= -25), (h ? bo : Ao)(n && 1 != n ? 8 == n || 16 == n ? gr(t, n, f) : 32 != n && 33 != n || u.length ? yr.apply(q, o) : mr(t, n, r, e) : hr(t, n, r), o)
		} function Er(t, n, r, e, u, o) {
			var i = -1, f = 2 & u, c = 1 & u, a = t.length, l = n.length; if (!(a == l || f && l > a)) return false; if (l = o.get(t)) return l == n;
			for (l = true, o.set(t, n) ; ++i < a;) { var s = t[i], h = n[i]; if (e) var _ = f ? e(h, s, i, n, t, o) : e(s, h, i, t, n, o); if (_ !== q) { if (_) continue; l = false; break } if (c) { if (!p(n, function (t) { return s === t || r(s, t, e, u, o) })) { l = false; break } } else if (s !== h && !r(s, h, e, u, o)) { l = false; break } } return o["delete"](t), l
		} function Ir(t, n, r, e, u, o, i) {
			switch (r) {
				case "[object DataView]": if (t.byteLength != n.byteLength || t.byteOffset != n.byteOffset) break; t = t.buffer, n = n.buffer; case "[object ArrayBuffer]": if (t.byteLength != n.byteLength || !e(new Su(t), new Su(n))) break; return true;
				case "[object Boolean]": case "[object Date]": return +t == +n; case "[object Error]": return t.name == n.name && t.message == n.message; case "[object Number]": return t != +t ? n != +n : t == +n; case "[object RegExp]": case "[object String]": return t == n + ""; case "[object Map]": var f = $; case "[object Set]": if (f || (f = N), t.size != n.size && !(2 & o)) break; return (r = i.get(t)) ? r == n : (o |= 1, i.set(t, n), Er(f(t), f(n), e, u, o, i)); case "[object Symbol]": if (ho) return ho.call(t) == ho.call(n)
			} return false
		} function Sr(t) {
			for (var n = t.name + "", r = oo[n], e = xu.call(oo, n) ? r.length : 0; e--;) {
				var u = r[e], o = u.func; if (null == o || o == t) return u.name
			} return n
		} function Rr() { var t = jt.iteratee || fu, t = t === fu ? On : t; return arguments.length ? t(arguments[0], arguments[1]) : t } function Wr(t) { t = Xe(t); for (var n = t.length; n--;) { var r = t[n][1]; t[n][2] = r === r && !Be(r) } return t } function Br(t, n) { var r = t[n]; return Ce(r) ? r : q } function Lr(t) { return (xu.call(jt, "placeholder") ? jt : t).placeholder } function Cr(t) { return Bu(Object(t)) } function Mr(t) { return wu.call(t) } function zr(t, n, r) {
			n = Tr(n, t) ? [n] : Xn(n); for (var e, u = -1, o = n.length; ++u < o;) {
				var i = n[u]; if (!(e = null != t && r(t, i))) break; t = t[i]
			} return e ? e : (o = t ? t.length : 0, !!o && We(o) && U(i, o) && (oi(t) || De(t) || Oe(t)))
		} function Ur(t) { var n = t.length, r = t.constructor(n); return n && "string" == typeof t[0] && xu.call(t, "index") && (r.index = t.index, r.input = t.input), r } function Dr(t) { return typeof t.constructor != "function" || Kr(t) ? {} : fn(Fu(Object(t))) } function $r(r, e, u, o) {
			var i = r.constructor; switch (e) {
				case "[object ArrayBuffer]": return rr(r); case "[object Boolean]": case "[object Date]": return new i(+r); case "[object DataView]":
					return e = o ? rr(r.buffer) : r.buffer, new r.constructor(e, r.byteOffset, r.byteLength); case "[object Float32Array]": case "[object Float64Array]": case "[object Int8Array]": case "[object Int16Array]": case "[object Int32Array]": case "[object Uint8Array]": case "[object Uint8ClampedArray]": case "[object Uint16Array]": case "[object Uint32Array]": return e = o ? rr(r.buffer) : r.buffer, new r.constructor(e, r.byteOffset, r.length); case "[object Map]": return e = o ? u($(r), true) : $(r), s(e, t, new r.constructor); case "[object Number]": case "[object String]":
						return new i(r); case "[object RegExp]": return e = new r.constructor(r.source, vt.exec(r)), e.lastIndex = r.lastIndex, e; case "[object Set]": return e = o ? u(N(r), true) : N(r), s(e, n, new r.constructor); case "[object Symbol]": return ho ? Object(ho.call(r)) : {}
			}
		} function Fr(t) { var n = t ? t.length : q; return We(n) && (oi(t) || De(t) || Oe(t)) ? w(n, String) : null } function Nr(t) { return Ee(t) && (oi(t) || Oe(t)) } function Pr(t) { return oi(t) && !(2 == t.length && !Se(t[0])) } function Zr(t, n, r) {
			if (!Be(r)) return false; var e = typeof n; return ("number" == e ? ke(r) && U(n, r.length) : "string" == e && n in r) ? we(r[n], t) : false;
		} function Tr(t, n) { var r = typeof t; return "number" == r || "symbol" == r ? true : !oi(t) && ($e(t) || ot.test(t) || !ut.test(t) || null != n && t in Object(n)) } function qr(t) { var n = typeof t; return "number" == n || "boolean" == n || "string" == n && "__proto__" != t || null == t } function Vr(t) { var n = Sr(t), r = jt[n]; return typeof r == "function" && n in Et.prototype ? t === r ? true : (n = jo(r), !!n && t === n[0]) : false } function Kr(t) { var n = t && t.constructor; return t === (typeof n == "function" && n.prototype || du) } function Gr(t, n) {
			return function (r) {
				return null == r ? false : r[t] === n && (n !== q || t in Object(r));
			}
		} function Jr(t, n, r, e, u, o) { return Be(t) && Be(n) && Rn(t, n, q, Jr, o.set(n, t)), t } function Yr(t, n) { return 1 == n.length ? t : gn(t, Pn(n, 0, -1)) } function Hr(t) { return typeof t == "string" || $e(t) ? t : t + "" } function Qr(t) { if (null != t) { try { return bu.call(t) } catch (n) { } return t + "" } return "" } function Xr(t) { if (t instanceof Et) return t.clone(); var n = new kt(t.__wrapped__, t.__chain__); return n.__actions__ = or(t.__actions__), n.__index__ = t.__index__, n.__values__ = t.__values__, n } function te(t, n, r) {
			var e = t ? t.length : 0; return e ? (n = r || n === q ? 1 : Ze(n),
			Pn(t, 0 > n ? 0 : n, e)) : []
		} function ne(t, n, r) { var e = t ? t.length : 0; return e ? (n = r || n === q ? 1 : Ze(n), n = e - n, Pn(t, 0, 0 > n ? 0 : n)) : [] } function re(t) { return t && t.length ? t[0] : q } function ee(t) { var n = t ? t.length : 0; return n ? t[n - 1] : q } function ue(t, n) { return t && t.length && n && n.length ? Un(t, n) : t } function oe(t) { return t ? Ju.call(t) : t } function ie(t) { if (!t || !t.length) return []; var n = 0; return t = i(t, function (t) { return Ee(t) ? (n = Tu(t.length, n), true) : void 0 }), w(n, function (n) { return a(t, Mn(n)) }) } function fe(t, n) {
			if (!t || !t.length) return []; var e = ie(t);
			return null == n ? e : a(e, function (t) { return r(n, q, t) })
		} function ce(t) { return t = jt(t), t.__chain__ = true, t } function ae(t, n) { return n(t) } function le() { return this } function se(t, n) { return typeof n == "function" && oi(t) ? u(t, n) : _o(t, Rr(n)) } function he(t, n) { var r; if (typeof n == "function" && oi(t)) { for (r = t.length; r-- && false !== n(t[r], r, t) ;); r = t } else r = vo(t, Rr(n)); return r } function pe(t, n) { return (oi(t) ? a : En)(t, Rr(n, 3)) } function _e(t, n, r) {
			var e = -1, u = Pe(t), o = u.length, i = o - 1; for (n = (r ? Zr(t, n, r) : n === q) ? 1 : en(Ze(n), 0, o) ; ++e < n;) t = $n(e, i),
			r = u[t], u[t] = u[e], u[e] = r; return u.length = n, u
		} function ve(t, n, r) { return n = r ? q : n, n = t && null == n ? t.length : n, kr(t, 128, q, q, q, q, n) } function ge(t, n) { var r; if (typeof n != "function") throw new vu("Expected a function"); return t = Ze(t), function () { return 0 < --t && (r = n.apply(this, arguments)), 1 >= t && (n = q), r } } function de(t, n, r) { return n = r ? q : n, t = kr(t, 8, q, q, q, q, q, n), t.placeholder = de.placeholder, t } function ye(t, n, r) { return n = r ? q : n, t = kr(t, 16, q, q, q, q, q, n), t.placeholder = ye.placeholder, t } function be(t, n, r) {
			function e(n) {
				var r = c, e = a;
				return c = a = q, _ = n, s = t.apply(e, r)
			} function u(t) { var r = t - p; return t -= _, !p || r >= n || 0 > r || g && t >= l } function o() { var t = Yo(); if (u(t)) return i(t); var r; r = t - _, t = n - (t - p), r = g ? qu(t, l - r) : t, h = zu(o, r) } function i(t) { return Ru(h), h = q, d && c ? e(t) : (c = a = q, s) } function f() { var t = Yo(), r = u(t); if (c = arguments, a = this, p = t, r) { if (h === q) return _ = t = p, h = zu(o, n), v ? e(t) : s; if (g) return Ru(h), h = zu(o, n), e(p) } return h === q && (h = zu(o, n)), s } var c, a, l, s, h, p = 0, _ = 0, v = false, g = false, d = true; if (typeof t != "function") throw new vu("Expected a function"); return n = qe(n) || 0,
			Be(r) && (v = !!r.leading, l = (g = "maxWait" in r) ? Tu(qe(r.maxWait) || 0, n) : l, d = "trailing" in r ? !!r.trailing : d), f.cancel = function () { h !== q && Ru(h), p = _ = 0, c = a = h = q }, f.flush = function () { return h === q ? s : i(Yo()) }, f
		} function xe(t, n) { function r() { var e = arguments, u = n ? n.apply(this, e) : e[0], o = r.cache; return o.has(u) ? o.get(u) : (e = t.apply(this, e), r.cache = o.set(u, e), e) } if (typeof t != "function" || n && typeof n != "function") throw new vu("Expected a function"); return r.cache = new (xe.Cache || Dt), r } function je(t, n) {
			if (typeof t != "function") throw new vu("Expected a function");
			return n = Tu(n === q ? t.length - 1 : Ze(n), 0), function () { for (var e = arguments, u = -1, o = Tu(e.length - n, 0), i = Array(o) ; ++u < o;) i[u] = e[n + u]; switch (n) { case 0: return t.call(this, i); case 1: return t.call(this, e[0], i); case 2: return t.call(this, e[0], e[1], i) } for (o = Array(n + 1), u = -1; ++u < n;) o[u] = e[u]; return o[n] = i, r(t, this, o) }
		} function me() { if (!arguments.length) return []; var t = arguments[0]; return oi(t) ? t : [t] } function we(t, n) { return t === n || t !== t && n !== n } function Ae(t, n) { return t > n } function Oe(t) {
			return Ee(t) && xu.call(t, "callee") && (!Mu.call(t, "callee") || "[object Arguments]" == wu.call(t));
		} function ke(t) { return null != t && We(mo(t)) && !Se(t) } function Ee(t) { return Le(t) && ke(t) } function Ie(t) { return Le(t) ? "[object Error]" == wu.call(t) || typeof t.message == "string" && typeof t.name == "string" : false } function Se(t) { return t = Be(t) ? wu.call(t) : "", "[object Function]" == t || "[object GeneratorFunction]" == t } function Re(t) { return typeof t == "number" && t == Ze(t) } function We(t) { return typeof t == "number" && t > -1 && 0 == t % 1 && 9007199254740991 >= t } function Be(t) { var n = typeof t; return !!t && ("object" == n || "function" == n) } function Le(t) {
			return !!t && typeof t == "object"
		} function Ce(t) { return Be(t) ? (Se(t) || z(t) ? Ou : bt).test(Qr(t)) : false } function Me(t) { return typeof t == "number" || Le(t) && "[object Number]" == wu.call(t) } function ze(t) { return !Le(t) || "[object Object]" != wu.call(t) || z(t) ? false : (t = Fu(Object(t)), null === t ? true : (t = xu.call(t, "constructor") && t.constructor, typeof t == "function" && t instanceof t && bu.call(t) == mu)) } function Ue(t) { return Be(t) && "[object RegExp]" == wu.call(t) } function De(t) {
			return typeof t == "string" || !oi(t) && Le(t) && "[object String]" == wu.call(t);
		} function $e(t) { return typeof t == "symbol" || Le(t) && "[object Symbol]" == wu.call(t) } function Fe(t) { return Le(t) && We(t.length) && !!Mt[wu.call(t)] } function Ne(t, n) { return n > t } function Pe(t) { if (!t) return []; if (ke(t)) return De(t) ? t.match(Rt) : or(t); if (Lu && t[Lu]) return D(t[Lu]()); var n = Mr(t); return ("[object Map]" == n ? $ : "[object Set]" == n ? N : nu)(t) } function Ze(t) { if (!t) return 0 === t ? t : 0; if (t = qe(t), t === V || t === -V) return 1.7976931348623157e308 * (0 > t ? -1 : 1); var n = t % 1; return t === t ? n ? t - n : t : 0 } function Te(t) {
			return t ? en(Ze(t), 0, 4294967295) : 0;
		} function qe(t) { if (typeof t == "number") return t; if ($e(t)) return K; if (Be(t) && (t = Se(t.valueOf) ? t.valueOf() : t, t = Be(t) ? t + "" : t), typeof t != "string") return 0 === t ? t : +t; t = t.replace(at, ""); var n = yt.test(t); return n || xt.test(t) ? Zt(t.slice(2), n ? 2 : 8) : dt.test(t) ? K : +t } function Ve(t) { return ir(t, Qe(t)) } function Ke(t) { if (typeof t == "string") return t; if (null == t) return ""; if ($e(t)) return po ? po.call(t) : ""; var n = t + ""; return "0" == n && 1 / t == -V ? "-0" : n } function Ge(t, n, r) { return t = null == t ? q : gn(t, n), t === q ? r : t } function Je(t, n) {
			return null != t && zr(t, n, yn);
		} function Ye(t, n) { return null != t && zr(t, n, bn) } function He(t) { var n = Kr(t); if (!n && !ke(t)) return Zu(Object(t)); var r, e = Fr(t), u = !!e, e = e || [], o = e.length; for (r in t) !yn(t, r) || u && ("length" == r || U(r, o)) || n && "constructor" == r || e.push(r); return e } function Qe(t) { for (var n = -1, r = Kr(t), e = kn(t), u = e.length, o = Fr(t), i = !!o, o = o || [], f = o.length; ++n < u;) { var c = e[n]; i && ("length" == c || U(c, f)) || "constructor" == c && (r || !xu.call(t, c)) || o.push(c) } return o } function Xe(t) { return A(t, He(t)) } function tu(t) { return A(t, Qe(t)) } function nu(t) {
			return t ? k(t, He(t)) : []
		} function ru(t) { return Ii(Ke(t).toLowerCase()) } function eu(t) { return (t = Ke(t)) && t.replace(mt, B).replace(St, "") } function uu(t, n, r) { return t = Ke(t), n = r ? q : n, n === q && (n = Lt.test(t) ? Wt : ht), t.match(n) || [] } function ou(t) { return function () { return t } } function iu(t) { return t } function fu(t) { return On(typeof t == "function" ? t : un(t, true)) } function cu(t, n, r) {
			var e = He(n), o = vn(n, e); null != r || Be(n) && (o.length || !e.length) || (r = n, n = t, t = this, o = vn(n, He(n))); var i = !(Be(r) && "chain" in r && !r.chain), f = Se(t); return u(o, function (r) {
				var e = n[r]; t[r] = e, f && (t.prototype[r] = function () { var n = this.__chain__; if (i || n) { var r = t(this.__wrapped__); return (r.__actions__ = or(this.__actions__)).push({ func: e, args: arguments, thisArg: t }), r.__chain__ = n, r } return e.apply(t, l([this.value()], arguments)) })
			}), t
		} function au() { } function lu(t) { return Tr(t) ? Mn(t) : zn(t) } S = S ? Ht.defaults({}, S, Ht.pick(Yt, Ct)) : Yt; var su = S.Date, hu = S.Error, pu = S.Math, _u = S.RegExp, vu = S.TypeError, gu = S.Array.prototype, du = S.Object.prototype, yu = S.String.prototype, bu = S.Function.prototype.toString, xu = du.hasOwnProperty, ju = 0, mu = bu.call(Object), wu = du.toString, Au = Yt._, Ou = _u("^" + bu.call(xu).replace(ft, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"), ku = Vt ? S.Buffer : q, Eu = S.Reflect, Iu = S.Symbol, Su = S.Uint8Array, Ru = S.clearTimeout, Wu = Eu ? Eu.f : q, Bu = Object.getOwnPropertySymbols, Lu = typeof (Lu = Iu && Iu.iterator) == "symbol" ? Lu : q, Cu = Object.create, Mu = du.propertyIsEnumerable, zu = S.setTimeout, Uu = gu.splice, Du = pu.ceil, $u = pu.floor, Fu = Object.getPrototypeOf, Nu = S.isFinite, Pu = gu.join, Zu = Object.keys, Tu = pu.max, qu = pu.min, Vu = S.parseInt, Ku = pu.random, Gu = yu.replace, Ju = gu.reverse, Yu = yu.split, Hu = Br(S, "DataView"), Qu = Br(S, "Map"), Xu = Br(S, "Promise"), to = Br(S, "Set"), no = Br(S, "WeakMap"), ro = Br(Object, "create"), eo = no && new no, uo = !Mu.call({
			valueOf: 1
		}, "valueOf"), oo = {}, io = Qr(Hu), fo = Qr(Qu), co = Qr(Xu), ao = Qr(to), lo = Qr(no), so = Iu ? Iu.prototype : q, ho = so ? so.valueOf : q, po = so ? so.toString : q; jt.templateSettings = { escape: nt, evaluate: rt, interpolate: et, variable: "", imports: { _: jt } }, jt.prototype = Ot.prototype, jt.prototype.constructor = jt, kt.prototype = fn(Ot.prototype), kt.prototype.constructor = kt, Et.prototype = fn(Ot.prototype), Et.prototype.constructor = Et, Ut.prototype = ro ? ro(null) : du, Dt.prototype.clear = function () {
			this.__data__ = {
				hash: new Ut, map: Qu ? new Qu : [], string: new Ut
			}
		}, Dt.prototype["delete"] = function (t) { var n = this.__data__; return qr(t) ? (n = typeof t == "string" ? n.string : n.hash, t = (ro ? n[t] !== q : xu.call(n, t)) && delete n[t]) : t = Qu ? n.map["delete"](t) : Tt(n.map, t), t }, Dt.prototype.get = function (t) { var n = this.__data__; return qr(t) ? (n = typeof t == "string" ? n.string : n.hash, ro ? (t = n[t], t = "__lodash_hash_undefined__" === t ? q : t) : t = xu.call(n, t) ? n[t] : q) : t = Qu ? n.map.get(t) : qt(n.map, t), t }, Dt.prototype.has = function (t) {
			var n = this.__data__; return qr(t) ? (n = typeof t == "string" ? n.string : n.hash, t = ro ? n[t] !== q : xu.call(n, t)) : t = Qu ? n.map.has(t) : -1 < Kt(n.map, t),
			t
		}, Dt.prototype.set = function (t, n) { var r = this.__data__; return qr(t) ? (typeof t == "string" ? r.string : r.hash)[t] = ro && n === q ? "__lodash_hash_undefined__" : n : Qu ? r.map.set(t, n) : Gt(r.map, t, n), this }, $t.prototype.push = function (t) { var n = this.__data__; qr(t) ? (n = n.__data__, (typeof t == "string" ? n.string : n.hash)[t] = "__lodash_hash_undefined__") : n.set(t, "__lodash_hash_undefined__") }, Nt.prototype.clear = function () { this.__data__ = { array: [], map: null } }, Nt.prototype["delete"] = function (t) {
			var n = this.__data__, r = n.array; return r ? Tt(r, t) : n.map["delete"](t);
		}, Nt.prototype.get = function (t) { var n = this.__data__, r = n.array; return r ? qt(r, t) : n.map.get(t) }, Nt.prototype.has = function (t) { var n = this.__data__, r = n.array; return r ? -1 < Kt(r, t) : n.map.has(t) }, Nt.prototype.set = function (t, n) { var r = this.__data__, e = r.array; return e && (199 > e.length ? Gt(e, t, n) : (r.array = null, r.map = new Dt(e))), (r = r.map) && r.set(t, n), this }; var _o = lr(pn), vo = lr(_n, true), go = sr(), yo = sr(true); Wu && !Mu.call({ valueOf: 1 }, "valueOf") && (kn = function (t) { return D(Wu(t)) }); var bo = eo ? function (t, n) { return eo.set(t, n), t } : iu, xo = to && 2 === new to([1, 2]).size ? function (t) {
			return new to(t)
		} : au, jo = eo ? function (t) { return eo.get(t) } : au, mo = Mn("length"); Bu || (Cr = function () { return [] }); var wo = Bu ? function (t) { for (var n = []; t;) l(n, Cr(t)), t = Fu(Object(t)); return n } : Cr; (Hu && "[object DataView]" != Mr(new Hu(new ArrayBuffer(1))) || Qu && "[object Map]" != Mr(new Qu) || Xu && "[object Promise]" != Mr(Xu.resolve()) || to && "[object Set]" != Mr(new to) || no && "[object WeakMap]" != Mr(new no)) && (Mr = function (t) {
			var n = wu.call(t); if (t = (t = "[object Object]" == n ? t.constructor : q) ? Qr(t) : q) switch (t) {
				case io: return "[object DataView]";
				case fo: return "[object Map]"; case co: return "[object Promise]"; case ao: return "[object Set]"; case lo: return "[object WeakMap]"
			} return n
		}); var Ao = function () { var t = 0, n = 0; return function (r, e) { var u = Yo(), o = 16 - (u - n); if (n = u, o > 0) { if (150 <= ++t) return r } else t = 0; return bo(r, e) } }(), Oo = xe(function (t) { var n = []; return Ke(t).replace(it, function (t, r, e, u) { n.push(e ? u.replace(pt, "$1") : r || t) }), n }), ko = je(function (t, n) { return Ee(t) ? an(t, hn(n, 1, Ee, true)) : [] }), Eo = je(function (t, n) {
			var r = ee(n); return Ee(r) && (r = q), Ee(t) ? an(t, hn(n, 1, Ee, true), Rr(r)) : [];
		}), Io = je(function (t, n) { var r = ee(n); return Ee(r) && (r = q), Ee(t) ? an(t, hn(n, 1, Ee, true), q, r) : [] }), So = je(function (t) { var n = a(t, Qn); return n.length && n[0] === t[0] ? xn(n) : [] }), Ro = je(function (t) { var n = ee(t), r = a(t, Qn); return n === ee(r) ? n = q : r.pop(), r.length && r[0] === t[0] ? xn(r, Rr(n)) : [] }), Wo = je(function (t) { var n = ee(t), r = a(t, Qn); return n === ee(r) ? n = q : r.pop(), r.length && r[0] === t[0] ? xn(r, q, n) : [] }), Bo = je(ue), Lo = je(function (t, n) { n = a(hn(n, 1), String); var r = rn(t, n); return Dn(t, n.sort(R)), r }), Co = je(function (t) {
			return Kn(hn(t, 1, Ee, true));
		}), Mo = je(function (t) { var n = ee(t); return Ee(n) && (n = q), Kn(hn(t, 1, Ee, true), Rr(n)) }), zo = je(function (t) { var n = ee(t); return Ee(n) && (n = q), Kn(hn(t, 1, Ee, true), q, n) }), Uo = je(function (t, n) { return Ee(t) ? an(t, n) : [] }), Do = je(function (t) { return Yn(i(t, Ee)) }), $o = je(function (t) { var n = ee(t); return Ee(n) && (n = q), Yn(i(t, Ee), Rr(n)) }), Fo = je(function (t) { var n = ee(t); return Ee(n) && (n = q), Yn(i(t, Ee), q, n) }), No = je(ie), Po = je(function (t) { var n = t.length, n = n > 1 ? t[n - 1] : q, n = typeof n == "function" ? (t.pop(), n) : q; return fe(t, n) }), Zo = je(function (t) {
			function n(n) { return rn(n, t) } t = hn(t, 1); var r = t.length, e = r ? t[0] : 0, u = this.__wrapped__; return 1 >= r && !this.__actions__.length && u instanceof Et && U(e) ? (u = u.slice(e, +e + (r ? 1 : 0)), u.__actions__.push({ func: ae, args: [n], thisArg: q }), new kt(u, this.__chain__).thru(function (t) { return r && !t.length && t.push(q), t })) : this.thru(n)
		}), To = cr(function (t, n, r) { xu.call(t, r) ? ++t[r] : t[r] = 1 }), qo = cr(function (t, n, r) { xu.call(t, r) ? t[r].push(n) : t[r] = [n] }), Vo = je(function (t, n, e) {
			var u = -1, o = typeof n == "function", i = Tr(n), f = ke(t) ? Array(t.length) : [];
			return _o(t, function (t) { var c = o ? n : i && null != t ? t[n] : q; f[++u] = c ? r(c, t, e) : mn(t, n, e) }), f
		}), Ko = cr(function (t, n, r) { t[r] = n }), Go = cr(function (t, n, r) { t[r ? 0 : 1].push(n) }, function () { return [[], []] }), Jo = je(function (t, n) { if (null == t) return []; var r = n.length; return r > 1 && Zr(t, n[0], n[1]) ? n = [] : r > 2 && Zr(n[0], n[1], n[2]) && (n = [n[0]]), n = 1 == n.length && oi(n[0]) ? n[0] : hn(n, 1, Pr), Bn(t, n, []) }), Yo = su.now, Ho = je(function (t, n, r) { var e = 1; if (r.length) var u = F(r, Lr(Ho)), e = 32 | e; return kr(t, e, n, r, u) }), Qo = je(function (t, n, r) {
			var e = 3; if (r.length) var u = F(r, Lr(Qo)), e = 32 | e;
			return kr(n, e, t, r, u)
		}), Xo = je(function (t, n) { return cn(t, 1, n) }), ti = je(function (t, n, r) { return cn(t, qe(n) || 0, r) }); xe.Cache = Dt; var ni = je(function (t, n) { n = 1 == n.length && oi(n[0]) ? a(n[0], O(Rr())) : a(hn(n, 1, Pr), O(Rr())); var e = n.length; return je(function (u) { for (var o = -1, i = qu(u.length, e) ; ++o < i;) u[o] = n[o].call(this, u[o]); return r(t, this, u) }) }), ri = je(function (t, n) { var r = F(n, Lr(ri)); return kr(t, 32, q, n, r) }), ei = je(function (t, n) { var r = F(n, Lr(ei)); return kr(t, 64, q, n, r) }), ui = je(function (t, n) {
			return kr(t, 256, q, q, q, hn(n, 1));
		}), oi = Array.isArray, ii = ku ? function (t) { return t instanceof ku } : ou(false), fi = ar(function (t, n) { if (uo || Kr(n) || ke(n)) ir(n, He(n), t); else for (var r in n) xu.call(n, r) && Xt(t, r, n[r]) }), ci = ar(function (t, n) { if (uo || Kr(n) || ke(n)) ir(n, Qe(n), t); else for (var r in n) Xt(t, r, n[r]) }), ai = ar(function (t, n, r, e) { ir(n, Qe(n), t, e) }), li = ar(function (t, n, r, e) { ir(n, He(n), t, e) }), si = je(function (t, n) { return rn(t, hn(n, 1)) }), hi = je(function (t) { return t.push(q, Jt), r(ai, q, t) }), pi = je(function (t) { return t.push(q, Jr), r(yi, q, t) }), _i = br(function (t, n, r) {
			t[n] = r
		}, ou(iu)), vi = br(function (t, n, r) { xu.call(t, n) ? t[n].push(r) : t[n] = [r] }, Rr), gi = je(mn), di = ar(function (t, n, r) { Rn(t, n, r) }), yi = ar(function (t, n, r, e) { Rn(t, n, r, e) }), bi = je(function (t, n) { return null == t ? {} : (n = a(hn(n, 1), Hr), Ln(t, an(dn(t, Qe, wo), n))) }), xi = je(function (t, n) { return null == t ? {} : Ln(t, hn(n, 1)) }), ji = _r(function (t, n, r) { return n = n.toLowerCase(), t + (r ? ru(n) : n) }), mi = _r(function (t, n, r) { return t + (r ? "-" : "") + n.toLowerCase() }), wi = _r(function (t, n, r) { return t + (r ? " " : "") + n.toLowerCase() }), Ai = pr("toLowerCase"), Oi = _r(function (t, n, r) {
			return t + (r ? "_" : "") + n.toLowerCase()
		}), ki = _r(function (t, n, r) { return t + (r ? " " : "") + Ii(n) }), Ei = _r(function (t, n, r) { return t + (r ? " " : "") + n.toUpperCase() }), Ii = pr("toUpperCase"), Si = je(function (t, n) { try { return r(t, q, n) } catch (e) { return Ie(e) ? e : new hu(e) } }), Ri = je(function (t, n) { return u(hn(n, 1), function (n) { t[n] = Ho(t[n], t) }), t }), Wi = dr(), Bi = dr(true), Li = je(function (t, n) { return function (r) { return mn(r, t, n) } }), Ci = je(function (t, n) { return function (r) { return mn(t, r, n) } }), Mi = xr(a), zi = xr(o), Ui = xr(p), Di = wr(), $i = wr(true), Fi = W(function (t, n) {
			return t + n
		}), Ni = Or("ceil"), Pi = W(function (t, n) { return t / n }), Zi = Or("floor"), Ti = W(function (t, n) { return t * n }), qi = Or("round"), Vi = W(function (t, n) { return t - n }); return jt.after = function (t, n) { if (typeof n != "function") throw new vu("Expected a function"); return t = Ze(t), function () { return 1 > --t ? n.apply(this, arguments) : void 0 } }, jt.ary = ve, jt.assign = fi, jt.assignIn = ci, jt.assignInWith = ai, jt.assignWith = li, jt.at = si, jt.before = ge, jt.bind = Ho, jt.bindAll = Ri, jt.bindKey = Qo, jt.castArray = me, jt.chain = ce, jt.chunk = function (t, n, r) {
			if (n = (r ? Zr(t, n, r) : n === q) ? 1 : Tu(Ze(n), 0), r = t ? t.length : 0, !r || 1 > n) return []; for (var e = 0, u = 0, o = Array(Du(r / n)) ; r > e;) o[u++] = Pn(t, e, e += n); return o
		}, jt.compact = function (t) { for (var n = -1, r = t ? t.length : 0, e = 0, u = []; ++n < r;) { var o = t[n]; o && (u[e++] = o) } return u }, jt.concat = function () { var t = arguments.length, n = me(arguments[0]); if (2 > t) return t ? or(n) : []; for (var r = Array(t - 1) ; t--;) r[t - 1] = arguments[t]; for (var t = hn(r, 1), r = -1, e = n.length, u = -1, o = t.length, i = Array(e + o) ; ++r < e;) i[r] = n[r]; for (; ++u < o;) i[r++] = t[u]; return i }, jt.cond = function (t) {
			var n = t ? t.length : 0, e = Rr(); return t = n ? a(t, function (t) { if ("function" != typeof t[1]) throw new vu("Expected a function"); return [e(t[0]), t[1]] }) : [], je(function (e) { for (var u = -1; ++u < n;) { var o = t[u]; if (r(o[0], this, e)) return r(o[1], this, e) } })
		}, jt.conforms = function (t) { return on(un(t, true)) }, jt.constant = ou, jt.countBy = To, jt.create = function (t, n) { var r = fn(t); return n ? nn(r, n) : r }, jt.curry = de, jt.curryRight = ye, jt.debounce = be, jt.defaults = hi, jt.defaultsDeep = pi, jt.defer = Xo, jt.delay = ti, jt.difference = ko, jt.differenceBy = Eo,
		jt.differenceWith = Io, jt.drop = te, jt.dropRight = ne, jt.dropRightWhile = function (t, n) { return t && t.length ? Gn(t, Rr(n, 3), true, true) : [] }, jt.dropWhile = function (t, n) { return t && t.length ? Gn(t, Rr(n, 3), true) : [] }, jt.fill = function (t, n, r, e) { var u = t ? t.length : 0; if (!u) return []; for (r && typeof r != "number" && Zr(t, n, r) && (r = 0, e = u), u = t.length, r = Ze(r), 0 > r && (r = -r > u ? 0 : u + r), e = e === q || e > u ? u : Ze(e), 0 > e && (e += u), e = r > e ? 0 : Te(e) ; e > r;) t[r++] = n; return t }, jt.filter = function (t, n) { return (oi(t) ? i : sn)(t, Rr(n, 3)) }, jt.flatMap = function (t, n) {
			return hn(pe(t, n), 1);
		}, jt.flatMapDeep = function (t, n) { return hn(pe(t, n), V) }, jt.flatMapDepth = function (t, n, r) { return r = r === q ? 1 : Ze(r), hn(pe(t, n), r) }, jt.flatten = function (t) { return t && t.length ? hn(t, 1) : [] }, jt.flattenDeep = function (t) { return t && t.length ? hn(t, V) : [] }, jt.flattenDepth = function (t, n) { return t && t.length ? (n = n === q ? 1 : Ze(n), hn(t, n)) : [] }, jt.flip = function (t) { return kr(t, 512) }, jt.flow = Wi, jt.flowRight = Bi, jt.fromPairs = function (t) { for (var n = -1, r = t ? t.length : 0, e = {}; ++n < r;) { var u = t[n]; e[u[0]] = u[1] } return e }, jt.functions = function (t) {
			return null == t ? [] : vn(t, He(t))
		}, jt.functionsIn = function (t) { return null == t ? [] : vn(t, Qe(t)) }, jt.groupBy = qo, jt.initial = function (t) { return ne(t, 1) }, jt.intersection = So, jt.intersectionBy = Ro, jt.intersectionWith = Wo, jt.invert = _i, jt.invertBy = vi, jt.invokeMap = Vo, jt.iteratee = fu, jt.keyBy = Ko, jt.keys = He, jt.keysIn = Qe, jt.map = pe, jt.mapKeys = function (t, n) { var r = {}; return n = Rr(n, 3), pn(t, function (t, e, u) { r[n(t, e, u)] = t }), r }, jt.mapValues = function (t, n) { var r = {}; return n = Rr(n, 3), pn(t, function (t, e, u) { r[e] = n(t, e, u) }), r }, jt.matches = function (t) {
			return In(un(t, true))
		}, jt.matchesProperty = function (t, n) { return Sn(t, un(n, true)) }, jt.memoize = xe, jt.merge = di, jt.mergeWith = yi, jt.method = Li, jt.methodOf = Ci, jt.mixin = cu, jt.negate = function (t) { if (typeof t != "function") throw new vu("Expected a function"); return function () { return !t.apply(this, arguments) } }, jt.nthArg = function (t) { return t = Ze(t), je(function (n) { return Wn(n, t) }) }, jt.omit = bi, jt.omitBy = function (t, n) { return n = Rr(n), Cn(t, function (t, r) { return !n(t, r) }) }, jt.once = function (t) { return ge(2, t) }, jt.orderBy = function (t, n, r, e) {
			return null == t ? [] : (oi(n) || (n = null == n ? [] : [n]), r = e ? q : r, oi(r) || (r = null == r ? [] : [r]), Bn(t, n, r))
		}, jt.over = Mi, jt.overArgs = ni, jt.overEvery = zi, jt.overSome = Ui, jt.partial = ri, jt.partialRight = ei, jt.partition = Go, jt.pick = xi, jt.pickBy = function (t, n) { return null == t ? {} : Cn(t, Rr(n)) }, jt.property = lu, jt.propertyOf = function (t) { return function (n) { return null == t ? q : gn(t, n) } }, jt.pull = Bo, jt.pullAll = ue, jt.pullAllBy = function (t, n, r) { return t && t.length && n && n.length ? Un(t, n, Rr(r)) : t }, jt.pullAllWith = function (t, n, r) {
			return t && t.length && n && n.length ? Un(t, n, q, r) : t;
		}, jt.pullAt = Lo, jt.range = Di, jt.rangeRight = $i, jt.rearg = ui, jt.reject = function (t, n) { var r = oi(t) ? i : sn; return n = Rr(n, 3), r(t, function (t, r, e) { return !n(t, r, e) }) }, jt.remove = function (t, n) { var r = []; if (!t || !t.length) return r; var e = -1, u = [], o = t.length; for (n = Rr(n, 3) ; ++e < o;) { var i = t[e]; n(i, e, t) && (r.push(i), u.push(e)) } return Dn(t, u), r }, jt.rest = je, jt.reverse = oe, jt.sampleSize = _e, jt.set = function (t, n, r) { return null == t ? t : Nn(t, n, r) }, jt.setWith = function (t, n, r, e) { return e = typeof e == "function" ? e : q, null == t ? t : Nn(t, n, r, e) }, jt.shuffle = function (t) {
			return _e(t, 4294967295)
		}, jt.slice = function (t, n, r) { var e = t ? t.length : 0; return e ? (r && typeof r != "number" && Zr(t, n, r) ? (n = 0, r = e) : (n = null == n ? 0 : Ze(n), r = r === q ? e : Ze(r)), Pn(t, n, r)) : [] }, jt.sortBy = Jo, jt.sortedUniq = function (t) { return t && t.length ? Vn(t) : [] }, jt.sortedUniqBy = function (t, n) { return t && t.length ? Vn(t, Rr(n)) : [] }, jt.split = function (t, n, r) {
			return r && typeof r != "number" && Zr(t, n, r) && (n = r = q), r = r === q ? 4294967295 : r >>> 0, r ? (t = Ke(t)) && (typeof n == "string" || null != n && !Ue(n)) && (n += "", "" == n && Bt.test(t)) ? tr(t.match(Rt), 0, r) : Yu.call(t, n, r) : [];
		}, jt.spread = function (t, n) { if (typeof t != "function") throw new vu("Expected a function"); return n = n === q ? 0 : Tu(Ze(n), 0), je(function (e) { var u = e[n]; return e = tr(e, 0, n), u && l(e, u), r(t, this, e) }) }, jt.tail = function (t) { return te(t, 1) }, jt.take = function (t, n, r) { return t && t.length ? (n = r || n === q ? 1 : Ze(n), Pn(t, 0, 0 > n ? 0 : n)) : [] }, jt.takeRight = function (t, n, r) { var e = t ? t.length : 0; return e ? (n = r || n === q ? 1 : Ze(n), n = e - n, Pn(t, 0 > n ? 0 : n, e)) : [] }, jt.takeRightWhile = function (t, n) { return t && t.length ? Gn(t, Rr(n, 3), false, true) : [] }, jt.takeWhile = function (t, n) {
			return t && t.length ? Gn(t, Rr(n, 3)) : []
		}, jt.tap = function (t, n) { return n(t), t }, jt.throttle = function (t, n, r) { var e = true, u = true; if (typeof t != "function") throw new vu("Expected a function"); return Be(r) && (e = "leading" in r ? !!r.leading : e, u = "trailing" in r ? !!r.trailing : u), be(t, n, { leading: e, maxWait: n, trailing: u }) }, jt.thru = ae, jt.toArray = Pe, jt.toPairs = Xe, jt.toPairsIn = tu, jt.toPath = function (t) { return oi(t) ? a(t, Hr) : $e(t) ? [t] : or(Oo(t)) }, jt.toPlainObject = Ve, jt.transform = function (t, n, r) {
			var e = oi(t) || Fe(t); if (n = Rr(n, 4), null == r) if (e || Be(t)) {
				var o = t.constructor; r = e ? oi(t) ? new o : [] : Se(o) ? fn(Fu(Object(t))) : {}
			} else r = {}; return (e ? u : pn)(t, function (t, e, u) { return n(r, t, e, u) }), r
		}, jt.unary = function (t) { return ve(t, 1) }, jt.union = Co, jt.unionBy = Mo, jt.unionWith = zo, jt.uniq = function (t) { return t && t.length ? Kn(t) : [] }, jt.uniqBy = function (t, n) { return t && t.length ? Kn(t, Rr(n)) : [] }, jt.uniqWith = function (t, n) { return t && t.length ? Kn(t, q, n) : [] }, jt.unset = function (t, n) {
			var r; if (null == t) r = true; else {
				r = t; var e = n, e = Tr(e, r) ? [e] : Xn(e); r = Yr(r, e), e = ee(e), r = null != r && Je(r, e) ? delete r[e] : true;
			} return r
		}, jt.unzip = ie, jt.unzipWith = fe, jt.update = function (t, n, r) { return null == t ? t : Nn(t, n, (typeof r == "function" ? r : iu)(gn(t, n)), void 0) }, jt.updateWith = function (t, n, r, e) { return e = typeof e == "function" ? e : q, null != t && (t = Nn(t, n, (typeof r == "function" ? r : iu)(gn(t, n)), e)), t }, jt.values = nu, jt.valuesIn = function (t) { return null == t ? [] : k(t, Qe(t)) }, jt.without = Uo, jt.words = uu, jt.wrap = function (t, n) { return n = null == n ? iu : n, ri(n, t) }, jt.xor = Do, jt.xorBy = $o, jt.xorWith = Fo, jt.zip = No, jt.zipObject = function (t, n) {
			return Hn(t || [], n || [], Xt);
		}, jt.zipObjectDeep = function (t, n) { return Hn(t || [], n || [], Nn) }, jt.zipWith = Po, jt.entries = Xe, jt.entriesIn = tu, jt.extend = ci, jt.extendWith = ai, cu(jt, jt), jt.add = Fi, jt.attempt = Si, jt.camelCase = ji, jt.capitalize = ru, jt.ceil = Ni, jt.clamp = function (t, n, r) { return r === q && (r = n, n = q), r !== q && (r = qe(r), r = r === r ? r : 0), n !== q && (n = qe(n), n = n === n ? n : 0), en(qe(t), n, r) }, jt.clone = function (t) { return un(t, false, true) }, jt.cloneDeep = function (t) { return un(t, true, true) }, jt.cloneDeepWith = function (t, n) { return un(t, true, true, n) }, jt.cloneWith = function (t, n) {
			return un(t, false, true, n);
		}, jt.deburr = eu, jt.divide = Pi, jt.endsWith = function (t, n, r) { t = Ke(t), n = typeof n == "string" ? n : n + ""; var e = t.length; return r = r === q ? e : en(Ze(r), 0, e), r -= n.length, r >= 0 && t.indexOf(n, r) == r }, jt.eq = we, jt.escape = function (t) { return (t = Ke(t)) && tt.test(t) ? t.replace(Q, L) : t }, jt.escapeRegExp = function (t) { return (t = Ke(t)) && ct.test(t) ? t.replace(ft, "\\$&") : t }, jt.every = function (t, n, r) { var e = oi(t) ? o : ln; return r && Zr(t, n, r) && (n = q), e(t, Rr(n, 3)) }, jt.find = function (t, n) {
			if (n = Rr(n, 3), oi(t)) { var r = g(t, n); return r > -1 ? t[r] : q } return v(t, n, _o);
		}, jt.findIndex = function (t, n) { return t && t.length ? g(t, Rr(n, 3)) : -1 }, jt.findKey = function (t, n) { return v(t, Rr(n, 3), pn, true) }, jt.findLast = function (t, n) { if (n = Rr(n, 3), oi(t)) { var r = g(t, n, true); return r > -1 ? t[r] : q } return v(t, n, vo) }, jt.findLastIndex = function (t, n) { return t && t.length ? g(t, Rr(n, 3), true) : -1 }, jt.findLastKey = function (t, n) { return v(t, Rr(n, 3), _n, true) }, jt.floor = Zi, jt.forEach = se, jt.forEachRight = he, jt.forIn = function (t, n) { return null == t ? t : go(t, Rr(n), Qe) }, jt.forInRight = function (t, n) {
			return null == t ? t : yo(t, Rr(n), Qe);
		}, jt.forOwn = function (t, n) { return t && pn(t, Rr(n)) }, jt.forOwnRight = function (t, n) { return t && _n(t, Rr(n)) }, jt.get = Ge, jt.gt = Ae, jt.gte = function (t, n) { return t >= n }, jt.has = Je, jt.hasIn = Ye, jt.head = re, jt.identity = iu, jt.includes = function (t, n, r, e) { return t = ke(t) ? t : nu(t), r = r && !e ? Ze(r) : 0, e = t.length, 0 > r && (r = Tu(e + r, 0)), De(t) ? e >= r && -1 < t.indexOf(n, r) : !!e && -1 < d(t, n, r) }, jt.indexOf = function (t, n, r) { var e = t ? t.length : 0; return e ? (r = Ze(r), 0 > r && (r = Tu(e + r, 0)), d(t, n, r)) : -1 }, jt.inRange = function (t, n, r) {
			return n = qe(n) || 0, r === q ? (r = n,
			n = 0) : r = qe(r) || 0, t = qe(t), t >= qu(n, r) && t < Tu(n, r)
		}, jt.invoke = gi, jt.isArguments = Oe, jt.isArray = oi, jt.isArrayBuffer = function (t) { return Le(t) && "[object ArrayBuffer]" == wu.call(t) }, jt.isArrayLike = ke, jt.isArrayLikeObject = Ee, jt.isBoolean = function (t) { return true === t || false === t || Le(t) && "[object Boolean]" == wu.call(t) }, jt.isBuffer = ii, jt.isDate = function (t) { return Le(t) && "[object Date]" == wu.call(t) }, jt.isElement = function (t) { return !!t && 1 === t.nodeType && Le(t) && !ze(t) }, jt.isEmpty = function (t) {
			if (ke(t) && (oi(t) || De(t) || Se(t.splice) || Oe(t) || ii(t))) return !t.length;
			if (Le(t)) { var n = Mr(t); if ("[object Map]" == n || "[object Set]" == n) return !t.size } for (var r in t) if (xu.call(t, r)) return false; return !(uo && He(t).length)
		}, jt.isEqual = function (t, n) { return wn(t, n) }, jt.isEqualWith = function (t, n, r) { var e = (r = typeof r == "function" ? r : q) ? r(t, n) : q; return e === q ? wn(t, n, r) : !!e }, jt.isError = Ie, jt.isFinite = function (t) { return typeof t == "number" && Nu(t) }, jt.isFunction = Se, jt.isInteger = Re, jt.isLength = We, jt.isMap = function (t) { return Le(t) && "[object Map]" == Mr(t) }, jt.isMatch = function (t, n) {
			return t === n || An(t, n, Wr(n));
		}, jt.isMatchWith = function (t, n, r) { return r = typeof r == "function" ? r : q, An(t, n, Wr(n), r) }, jt.isNaN = function (t) { return Me(t) && t != +t }, jt.isNative = Ce, jt.isNil = function (t) { return null == t }, jt.isNull = function (t) { return null === t }, jt.isNumber = Me, jt.isObject = Be, jt.isObjectLike = Le, jt.isPlainObject = ze, jt.isRegExp = Ue, jt.isSafeInteger = function (t) { return Re(t) && t >= -9007199254740991 && 9007199254740991 >= t }, jt.isSet = function (t) { return Le(t) && "[object Set]" == Mr(t) }, jt.isString = De, jt.isSymbol = $e, jt.isTypedArray = Fe, jt.isUndefined = function (t) {
			return t === q
		}, jt.isWeakMap = function (t) { return Le(t) && "[object WeakMap]" == Mr(t) }, jt.isWeakSet = function (t) { return Le(t) && "[object WeakSet]" == wu.call(t) }, jt.join = function (t, n) { return t ? Pu.call(t, n) : "" }, jt.kebabCase = mi, jt.last = ee, jt.lastIndexOf = function (t, n, r) { var e = t ? t.length : 0; if (!e) return -1; var u = e; if (r !== q && (u = Ze(r), u = (0 > u ? Tu(e + u, 0) : qu(u, e - 1)) + 1), n !== n) return M(t, u, true); for (; u--;) if (t[u] === n) return u; return -1 }, jt.lowerCase = wi, jt.lowerFirst = Ai, jt.lt = Ne, jt.lte = function (t, n) { return n >= t }, jt.max = function (t) {
			return t && t.length ? _(t, iu, Ae) : q
		}, jt.maxBy = function (t, n) { return t && t.length ? _(t, Rr(n), Ae) : q }, jt.mean = function (t) { return b(t, iu) }, jt.meanBy = function (t, n) { return b(t, Rr(n)) }, jt.min = function (t) { return t && t.length ? _(t, iu, Ne) : q }, jt.minBy = function (t, n) { return t && t.length ? _(t, Rr(n), Ne) : q }, jt.multiply = Ti, jt.nth = function (t, n) { return t && t.length ? Wn(t, Ze(n)) : q }, jt.noConflict = function () { return Yt._ === this && (Yt._ = Au), this }, jt.noop = au, jt.now = Yo, jt.pad = function (t, n, r) {
			t = Ke(t); var e = (n = Ze(n)) ? P(t) : 0; return n && n > e ? (n = (n - e) / 2,
			jr($u(n), r) + t + jr(Du(n), r)) : t
		}, jt.padEnd = function (t, n, r) { t = Ke(t); var e = (n = Ze(n)) ? P(t) : 0; return n && n > e ? t + jr(n - e, r) : t }, jt.padStart = function (t, n, r) { t = Ke(t); var e = (n = Ze(n)) ? P(t) : 0; return n && n > e ? jr(n - e, r) + t : t }, jt.parseInt = function (t, n, r) { return r || null == n ? n = 0 : n && (n = +n), t = Ke(t).replace(at, ""), Vu(t, n || (gt.test(t) ? 16 : 10)) }, jt.random = function (t, n, r) {
			if (r && typeof r != "boolean" && Zr(t, n, r) && (n = r = q), r === q && (typeof n == "boolean" ? (r = n, n = q) : typeof t == "boolean" && (r = t, t = q)), t === q && n === q ? (t = 0, n = 1) : (t = qe(t) || 0, n === q ? (n = t,
			t = 0) : n = qe(n) || 0), t > n) { var e = t; t = n, n = e } return r || t % 1 || n % 1 ? (r = Ku(), qu(t + r * (n - t + Pt("1e-" + ((r + "").length - 1))), n)) : $n(t, n)
		}, jt.reduce = function (t, n, r) { var e = oi(t) ? s : x, u = 3 > arguments.length; return e(t, Rr(n, 4), r, u, _o) }, jt.reduceRight = function (t, n, r) { var e = oi(t) ? h : x, u = 3 > arguments.length; return e(t, Rr(n, 4), r, u, vo) }, jt.repeat = function (t, n, r) { return n = (r ? Zr(t, n, r) : n === q) ? 1 : Ze(n), Fn(Ke(t), n) }, jt.replace = function () { var t = arguments, n = Ke(t[0]); return 3 > t.length ? n : Gu.call(n, t[1], t[2]) }, jt.result = function (t, n, r) {
			n = Tr(n, t) ? [n] : Xn(n);
			var e = -1, u = n.length; for (u || (t = q, u = 1) ; ++e < u;) { var o = null == t ? q : t[n[e]]; o === q && (e = u, o = r), t = Se(o) ? o.call(t) : o } return t
		}, jt.round = qi, jt.runInContext = T, jt.sample = function (t) { t = ke(t) ? t : nu(t); var n = t.length; return n > 0 ? t[$n(0, n - 1)] : q }, jt.size = function (t) { if (null == t) return 0; if (ke(t)) { var n = t.length; return n && De(t) ? P(t) : n } return Le(t) && (n = Mr(t), "[object Map]" == n || "[object Set]" == n) ? t.size : He(t).length }, jt.snakeCase = Oi, jt.some = function (t, n, r) { var e = oi(t) ? p : Zn; return r && Zr(t, n, r) && (n = q), e(t, Rr(n, 3)) }, jt.sortedIndex = function (t, n) {
			return Tn(t, n)
		}, jt.sortedIndexBy = function (t, n, r) { return qn(t, n, Rr(r)) }, jt.sortedIndexOf = function (t, n) { var r = t ? t.length : 0; if (r) { var e = Tn(t, n); if (r > e && we(t[e], n)) return e } return -1 }, jt.sortedLastIndex = function (t, n) { return Tn(t, n, true) }, jt.sortedLastIndexBy = function (t, n, r) { return qn(t, n, Rr(r), true) }, jt.sortedLastIndexOf = function (t, n) { if (t && t.length) { var r = Tn(t, n, true) - 1; if (we(t[r], n)) return r } return -1 }, jt.startCase = ki, jt.startsWith = function (t, n, r) {
			return t = Ke(t), r = en(Ze(r), 0, t.length), t.lastIndexOf(n, r) == r;
		}, jt.subtract = Vi, jt.sum = function (t) { return t && t.length ? m(t, iu) : 0 }, jt.sumBy = function (t, n) { return t && t.length ? m(t, Rr(n)) : 0 }, jt.template = function (t, n, r) {
			var e = jt.templateSettings; r && Zr(t, n, r) && (n = q), t = Ke(t), n = ai({}, n, e, Jt), r = ai({}, n.imports, e.imports, Jt); var u, o, i = He(r), f = k(r, i), c = 0; r = n.interpolate || wt; var a = "__p+='"; r = _u((n.escape || wt).source + "|" + r.source + "|" + (r === et ? _t : wt).source + "|" + (n.evaluate || wt).source + "|$", "g"); var l = "sourceURL" in n ? "//# sourceURL=" + n.sourceURL + "\n" : ""; if (t.replace(r, function (n, r, e, i, f, l) {
			return e || (e = i), a += t.slice(c, l).replace(At, C), r && (u = true, a += "'+__e(" + r + ")+'"), f && (o = true, a += "';" + f + ";\n__p+='"), e && (a += "'+((__t=(" + e + "))==null?'':__t)+'"), c = l + n.length, n
			}), a += "';", (n = n.variable) || (a = "with(obj){" + a + "}"), a = (o ? a.replace(G, "") : a).replace(J, "$1").replace(Y, "$1;"), a = "function(" + (n || "obj") + "){" + (n ? "" : "obj||(obj={});") + "var __t,__p=''" + (u ? ",__e=_.escape" : "") + (o ? ",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}" : ";") + a + "return __p}", n = Si(function () {
			return Function(i, l + "return " + a).apply(q, f);
			}), n.source = a, Ie(n)) throw n; return n
		}, jt.times = function (t, n) { if (t = Ze(t), 1 > t || t > 9007199254740991) return []; var r = 4294967295, e = qu(t, 4294967295); for (n = Rr(n), t -= 4294967295, e = w(e, n) ; ++r < t;) n(r); return e }, jt.toInteger = Ze, jt.toLength = Te, jt.toLower = function (t) { return Ke(t).toLowerCase() }, jt.toNumber = qe, jt.toSafeInteger = function (t) { return en(Ze(t), -9007199254740991, 9007199254740991) }, jt.toString = Ke, jt.toUpper = function (t) { return Ke(t).toUpperCase() }, jt.trim = function (t, n, r) {
			return (t = Ke(t)) ? r || n === q ? t.replace(at, "") : (n += "") ? (t = t.match(Rt),
			n = n.match(Rt), tr(t, E(t, n), I(t, n) + 1).join("")) : t : t
		}, jt.trimEnd = function (t, n, r) { return (t = Ke(t)) ? r || n === q ? t.replace(st, "") : (n += "") ? (t = t.match(Rt), n = I(t, n.match(Rt)) + 1, tr(t, 0, n).join("")) : t : t }, jt.trimStart = function (t, n, r) { return (t = Ke(t)) ? r || n === q ? t.replace(lt, "") : (n += "") ? (t = t.match(Rt), n = E(t, n.match(Rt)), tr(t, n).join("")) : t : t }, jt.truncate = function (t, n) {
			var r = 30, e = "..."; if (Be(n)) var u = "separator" in n ? n.separator : u, r = "length" in n ? Ze(n.length) : r, e = "omission" in n ? Ke(n.omission) : e; t = Ke(t); var o = t.length; if (Bt.test(t)) var i = t.match(Rt), o = i.length;
			if (r >= o) return t; if (o = r - P(e), 1 > o) return e; if (r = i ? tr(i, 0, o).join("") : t.slice(0, o), u === q) return r + e; if (i && (o += r.length - o), Ue(u)) { if (t.slice(o).search(u)) { var f = r; for (u.global || (u = _u(u.source, Ke(vt.exec(u)) + "g")), u.lastIndex = 0; i = u.exec(f) ;) var c = i.index; r = r.slice(0, c === q ? o : c) } } else t.indexOf(u, o) != o && (u = r.lastIndexOf(u), u > -1 && (r = r.slice(0, u))); return r + e
		}, jt.unescape = function (t) { return (t = Ke(t)) && X.test(t) ? t.replace(H, Z) : t }, jt.uniqueId = function (t) { var n = ++ju; return Ke(t) + n }, jt.upperCase = Ei, jt.upperFirst = Ii,
		jt.each = se, jt.eachRight = he, jt.first = re, cu(jt, function () { var t = {}; return pn(jt, function (n, r) { xu.call(jt.prototype, r) || (t[r] = n) }), t }(), { chain: false }), jt.VERSION = "4.11.1", u("bind bindKey curry curryRight partial partialRight".split(" "), function (t) { jt[t].placeholder = jt }), u(["drop", "take"], function (t, n) {
			Et.prototype[t] = function (r) {
				var e = this.__filtered__; if (e && !n) return new Et(this); r = r === q ? 1 : Tu(Ze(r), 0); var u = this.clone(); return e ? u.__takeCount__ = qu(r, u.__takeCount__) : u.__views__.push({
					size: qu(r, 4294967295),
					type: t + (0 > u.__dir__ ? "Right" : "")
				}), u
			}, Et.prototype[t + "Right"] = function (n) { return this.reverse()[t](n).reverse() }
		}), u(["filter", "map", "takeWhile"], function (t, n) { var r = n + 1, e = 1 == r || 3 == r; Et.prototype[t] = function (t) { var n = this.clone(); return n.__iteratees__.push({ iteratee: Rr(t, 3), type: r }), n.__filtered__ = n.__filtered__ || e, n } }), u(["head", "last"], function (t, n) { var r = "take" + (n ? "Right" : ""); Et.prototype[t] = function () { return this[r](1).value()[0] } }), u(["initial", "tail"], function (t, n) {
			var r = "drop" + (n ? "" : "Right");
			Et.prototype[t] = function () { return this.__filtered__ ? new Et(this) : this[r](1) }
		}), Et.prototype.compact = function () { return this.filter(iu) }, Et.prototype.find = function (t) { return this.filter(t).head() }, Et.prototype.findLast = function (t) { return this.reverse().find(t) }, Et.prototype.invokeMap = je(function (t, n) { return typeof t == "function" ? new Et(this) : this.map(function (r) { return mn(r, t, n) }) }), Et.prototype.reject = function (t) { return t = Rr(t, 3), this.filter(function (n) { return !t(n) }) }, Et.prototype.slice = function (t, n) {
			t = Ze(t); var r = this; return r.__filtered__ && (t > 0 || 0 > n) ? new Et(r) : (0 > t ? r = r.takeRight(-t) : t && (r = r.drop(t)), n !== q && (n = Ze(n), r = 0 > n ? r.dropRight(-n) : r.take(n - t)), r)
		}, Et.prototype.takeRightWhile = function (t) { return this.reverse().takeWhile(t).reverse() }, Et.prototype.toArray = function () { return this.take(4294967295) }, pn(Et.prototype, function (t, n) {
			var r = /^(?:filter|find|map|reject)|While$/.test(n), e = /^(?:head|last)$/.test(n), u = jt[e ? "take" + ("last" == n ? "Right" : "") : n], o = e || /^find/.test(n); u && (jt.prototype[n] = function () {
				function n(t) { return t = u.apply(jt, l([t], f)), e && h ? t[0] : t } var i = this.__wrapped__, f = e ? [1] : arguments, c = i instanceof Et, a = f[0], s = c || oi(i); s && r && typeof a == "function" && 1 != a.length && (c = s = false); var h = this.__chain__, p = !!this.__actions__.length, a = o && !h, c = c && !p; return !o && s ? (i = c ? i : new Et(this), i = t.apply(i, f), i.__actions__.push({ func: ae, args: [n], thisArg: q }), new kt(i, h)) : a && c ? t.apply(this, f) : (i = this.thru(n), a ? e ? i.value()[0] : i.value() : i)
			})
		}), u("pop push shift sort splice unshift".split(" "), function (t) {
			var n = gu[t], r = /^(?:push|sort|unshift)$/.test(t) ? "tap" : "thru", e = /^(?:pop|shift)$/.test(t);
			jt.prototype[t] = function () { var t = arguments; if (e && !this.__chain__) { var u = this.value(); return n.apply(oi(u) ? u : [], t) } return this[r](function (r) { return n.apply(oi(r) ? r : [], t) }) }
		}), pn(Et.prototype, function (t, n) { var r = jt[n]; if (r) { var e = r.name + ""; (oo[e] || (oo[e] = [])).push({ name: n, func: r }) } }), oo[yr(q, 2).name] = [{ name: "wrapper", func: q }], Et.prototype.clone = function () {
			var t = new Et(this.__wrapped__); return t.__actions__ = or(this.__actions__), t.__dir__ = this.__dir__, t.__filtered__ = this.__filtered__, t.__iteratees__ = or(this.__iteratees__),
			t.__takeCount__ = this.__takeCount__, t.__views__ = or(this.__views__), t
		}, Et.prototype.reverse = function () { if (this.__filtered__) { var t = new Et(this); t.__dir__ = -1, t.__filtered__ = true } else t = this.clone(), t.__dir__ *= -1; return t }, Et.prototype.value = function () {
			var t, n = this.__wrapped__.value(), r = this.__dir__, e = oi(n), u = 0 > r, o = e ? n.length : 0; t = o; for (var i = this.__views__, f = 0, c = -1, a = i.length; ++c < a;) {
				var l = i[c], s = l.size; switch (l.type) {
					case "drop": f += s; break; case "dropRight": t -= s; break; case "take": t = qu(t, f + s); break; case "takeRight":
						f = Tu(f, t - s)
				}
			} if (t = { start: f, end: t }, i = t.start, f = t.end, t = f - i, u = u ? f : i - 1, i = this.__iteratees__, f = i.length, c = 0, a = qu(t, this.__takeCount__), !e || 200 > o || o == t && a == t) return Jn(n, this.__actions__); e = []; t: for (; t-- && a > c;) { for (u += r, o = -1, l = n[u]; ++o < f;) { var h = i[o], s = h.type, h = (0, h.iteratee)(l); if (2 == s) l = h; else if (!h) { if (1 == s) continue t; break t } } e[c++] = l } return e
		}, jt.prototype.at = Zo, jt.prototype.chain = function () { return ce(this) }, jt.prototype.commit = function () { return new kt(this.value(), this.__chain__) }, jt.prototype.next = function () {
			this.__values__ === q && (this.__values__ = Pe(this.value())); var t = this.__index__ >= this.__values__.length, n = t ? q : this.__values__[this.__index__++]; return { done: t, value: n }
		}, jt.prototype.plant = function (t) { for (var n, r = this; r instanceof Ot;) { var e = Xr(r); e.__index__ = 0, e.__values__ = q, n ? u.__wrapped__ = e : n = e; var u = e, r = r.__wrapped__ } return u.__wrapped__ = t, n }, jt.prototype.reverse = function () {
			var t = this.__wrapped__; return t instanceof Et ? (this.__actions__.length && (t = new Et(this)), t = t.reverse(), t.__actions__.push({
				func: ae,
				args: [oe], thisArg: q
			}), new kt(t, this.__chain__)) : this.thru(oe)
		}, jt.prototype.toJSON = jt.prototype.valueOf = jt.prototype.value = function () { return Jn(this.__wrapped__, this.__actions__) }, Lu && (jt.prototype[Lu] = le), jt
	} var q, V = 1 / 0, K = NaN, G = /\b__p\+='';/g, J = /\b(__p\+=)''\+/g, Y = /(__e\(.*?\)|\b__t\))\+'';/g, H = /&(?:amp|lt|gt|quot|#39|#96);/g, Q = /[&<>"'`]/g, X = RegExp(H.source), tt = RegExp(Q.source), nt = /<%-([\s\S]+?)%>/g, rt = /<%([\s\S]+?)%>/g, et = /<%=([\s\S]+?)%>/g, ut = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, ot = /^\w*$/, it = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]/g, ft = /[\\^$.*+?()[\]{}|]/g, ct = RegExp(ft.source), at = /^\s+|\s+$/g, lt = /^\s+/, st = /\s+$/, ht = /[a-zA-Z0-9]+/g, pt = /\\(\\)?/g, _t = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g, vt = /\w*$/, gt = /^0x/i, dt = /^[-+]0x[0-9a-f]+$/i, yt = /^0b[01]+$/i, bt = /^\[object .+?Constructor\]$/, xt = /^0o[0-7]+$/i, jt = /^(?:0|[1-9]\d*)$/, mt = /[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g, wt = /($^)/, At = /['\n\r\u2028\u2029\\]/g, Ot = "[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]|\\ud83c[\\udffb-\\udfff])?(?:\\u200d(?:[^\\ud800-\\udfff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]|\\ud83c[\\udffb-\\udfff])?)*", kt = "(?:[\\u2700-\\u27bf]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])" + Ot, Et = "(?:[^\\ud800-\\udfff][\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]?|[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\ud800-\\udfff])", It = RegExp("['\u2019]", "g"), St = RegExp("[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]", "g"), Rt = RegExp("\\ud83c[\\udffb-\\udfff](?=\\ud83c[\\udffb-\\udfff])|" + Et + Ot, "g"), Wt = RegExp(["[A-Z\\xc0-\\xd6\\xd8-\\xde]?[a-z\\xdf-\\xf6\\xf8-\\xff]+(?:['\u2019](?:d|ll|m|re|s|t|ve))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2018\\u2019\\u201c\\u201d \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde]|$)|(?:[A-Z\\xc0-\\xd6\\xd8-\\xde]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2018\\u2019\\u201c\\u201d \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2018\\u2019\\u201c\\u201d \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde](?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2018\\u2019\\u201c\\u201d \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])|$)|[A-Z\\xc0-\\xd6\\xd8-\\xde]?(?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2018\\u2019\\u201c\\u201d \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['\u2019](?:d|ll|m|re|s|t|ve))?|[A-Z\\xc0-\\xd6\\xd8-\\xde]+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?|\\d+", kt].join("|"), "g"), Bt = RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0\\ufe0e\\ufe0f]"), Lt = /[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/, Ct = "Array Buffer DataView Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Map Math Object Promise Reflect RegExp Set String Symbol TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array WeakMap _ clearTimeout isFinite parseInt setTimeout".split(" "), Mt = {};
	Mt["[object Float32Array]"] = Mt["[object Float64Array]"] = Mt["[object Int8Array]"] = Mt["[object Int16Array]"] = Mt["[object Int32Array]"] = Mt["[object Uint8Array]"] = Mt["[object Uint8ClampedArray]"] = Mt["[object Uint16Array]"] = Mt["[object Uint32Array]"] = true, Mt["[object Arguments]"] = Mt["[object Array]"] = Mt["[object ArrayBuffer]"] = Mt["[object Boolean]"] = Mt["[object DataView]"] = Mt["[object Date]"] = Mt["[object Error]"] = Mt["[object Function]"] = Mt["[object Map]"] = Mt["[object Number]"] = Mt["[object Object]"] = Mt["[object RegExp]"] = Mt["[object Set]"] = Mt["[object String]"] = Mt["[object WeakMap]"] = false;
	var zt = {}; zt["[object Arguments]"] = zt["[object Array]"] = zt["[object ArrayBuffer]"] = zt["[object DataView]"] = zt["[object Boolean]"] = zt["[object Date]"] = zt["[object Float32Array]"] = zt["[object Float64Array]"] = zt["[object Int8Array]"] = zt["[object Int16Array]"] = zt["[object Int32Array]"] = zt["[object Map]"] = zt["[object Number]"] = zt["[object Object]"] = zt["[object RegExp]"] = zt["[object Set]"] = zt["[object String]"] = zt["[object Symbol]"] = zt["[object Uint8Array]"] = zt["[object Uint8ClampedArray]"] = zt["[object Uint16Array]"] = zt["[object Uint32Array]"] = true,
	zt["[object Error]"] = zt["[object Function]"] = zt["[object WeakMap]"] = false; var Ut = {
		"\xc0": "A", "\xc1": "A", "\xc2": "A", "\xc3": "A", "\xc4": "A", "\xc5": "A", "\xe0": "a", "\xe1": "a", "\xe2": "a", "\xe3": "a", "\xe4": "a", "\xe5": "a", "\xc7": "C", "\xe7": "c", "\xd0": "D", "\xf0": "d", "\xc8": "E", "\xc9": "E", "\xca": "E", "\xcb": "E", "\xe8": "e", "\xe9": "e", "\xea": "e", "\xeb": "e", "\xcc": "I", "\xcd": "I", "\xce": "I", "\xcf": "I", "\xec": "i", "\xed": "i", "\xee": "i", "\xef": "i", "\xd1": "N", "\xf1": "n", "\xd2": "O", "\xd3": "O", "\xd4": "O", "\xd5": "O", "\xd6": "O",
		"\xd8": "O", "\xf2": "o", "\xf3": "o", "\xf4": "o", "\xf5": "o", "\xf6": "o", "\xf8": "o", "\xd9": "U", "\xda": "U", "\xdb": "U", "\xdc": "U", "\xf9": "u", "\xfa": "u", "\xfb": "u", "\xfc": "u", "\xdd": "Y", "\xfd": "y", "\xff": "y", "\xc6": "Ae", "\xe6": "ae", "\xde": "Th", "\xfe": "th", "\xdf": "ss"
	}, Dt = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;", "`": "&#96;" }, $t = { "&amp;": "&", "&lt;": "<", "&gt;": ">", "&quot;": '"', "&#39;": "'", "&#96;": "`" }, Ft = { "function": true, object: true }, Nt = {
		"\\": "\\", "'": "'", "\n": "n", "\r": "r", "\u2028": "u2028", "\u2029": "u2029"
	}, Pt = parseFloat, Zt = parseInt, Tt = Ft[typeof exports] && exports && !exports.nodeType ? exports : q, qt = Ft[typeof module] && module && !module.nodeType ? module : q, Vt = qt && qt.exports === Tt ? Tt : q, Kt = S(Ft[typeof self] && self), Gt = S(Ft[typeof window] && window), Jt = S(Ft[typeof this] && this), Yt = S(Tt && qt && typeof global == "object" && global) || Gt !== (Jt && Jt.window) && Gt || Kt || Jt || Function("return this")(), Ht = T(); (Gt || Kt || {})._ = Ht, typeof define == "function" && typeof define.amd == "object" && define.amd ? define(function () { return Ht }) : Tt && qt ? (Vt && ((qt.exports = Ht)._ = Ht),
	Tt._ = Ht) : Yt._ = Ht
}).call(this);
/*!
 * jquery-timepicker v1.11.1 - A jQuery timepicker plugin inspired by Google Calendar. It supports both mouse and keyboard navigation.
 * Copyright (c) 2016 Jon Thornton - http://jonthornton.github.com/jquery-timepicker/
 * License: MIT
 */

!function(e){"object"==typeof exports&&exports&&"object"==typeof module&&module&&module.exports===exports?e(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],e):e(jQuery)}(function(e){function i(e){var i=e[0];return i.offsetWidth>0&&i.offsetHeight>0}function t(i){if(i.minTime&&(i.minTime=T(i.minTime)),i.maxTime&&(i.maxTime=T(i.maxTime)),i.durationTime&&"function"!=typeof i.durationTime&&(i.durationTime=T(i.durationTime)),"now"==i.scrollDefault)i.scrollDefault=function(){return i.roundingFunction(T(new Date),i)};else if(i.scrollDefault&&"function"!=typeof i.scrollDefault){var t=i.scrollDefault;i.scrollDefault=function(){return i.roundingFunction(T(t),i)}}else i.minTime&&(i.scrollDefault=function(){return i.roundingFunction(i.minTime,i)});if("string"===e.type(i.timeFormat)&&i.timeFormat.match(/[gh]/)&&(i._twelveHourTime=!0),i.showOnFocus===!1&&-1!=i.showOn.indexOf("focus")&&i.showOn.splice(i.showOn.indexOf("focus"),1),i.disableTimeRanges.length>0){for(var r in i.disableTimeRanges)i.disableTimeRanges[r]=[T(i.disableTimeRanges[r][0]),T(i.disableTimeRanges[r][1])];i.disableTimeRanges=i.disableTimeRanges.sort(function(e,i){return e[0]-i[0]});for(var r=i.disableTimeRanges.length-1;r>0;r--)i.disableTimeRanges[r][0]<=i.disableTimeRanges[r-1][1]&&(i.disableTimeRanges[r-1]=[Math.min(i.disableTimeRanges[r][0],i.disableTimeRanges[r-1][0]),Math.max(i.disableTimeRanges[r][1],i.disableTimeRanges[r-1][1])],i.disableTimeRanges.splice(r,1))}return i}function r(i){var t=i.data("timepicker-settings"),r=i.data("timepicker-list");if(r&&r.length&&(r.remove(),i.data("timepicker-list",!1)),t.useSelect){r=e("<select />",{"class":"ui-timepicker-select"});var s=r}else{r=e("<ul />",{"class":"ui-timepicker-list"});var s=e("<div />",{"class":"ui-timepicker-wrapper",tabindex:-1});s.css({display:"none",position:"absolute"}).append(r)}if(t.noneOption)if(t.noneOption===!0&&(t.noneOption=t.useSelect?"Time...":"None"),e.isArray(t.noneOption)){for(var c in t.noneOption)if(parseInt(c,10)==c){var u=n(t.noneOption[c],t.useSelect);r.append(u)}}else{var u=n(t.noneOption,t.useSelect);r.append(u)}if(t.className&&s.addClass(t.className),(null!==t.minTime||null!==t.durationTime)&&t.showDuration){"function"==typeof t.step?"function":t.step;s.addClass("ui-timepicker-with-duration"),s.addClass("ui-timepicker-step-"+t.step)}var p=t.minTime;"function"==typeof t.durationTime?p=T(t.durationTime()):null!==t.durationTime&&(p=t.durationTime);var d=null!==t.minTime?t.minTime:0,f=null!==t.maxTime?t.maxTime:d+w-1;d>f&&(f+=w),f===w-1&&"string"===e.type(t.timeFormat)&&t.show2400&&(f=w);var h=t.disableTimeRanges,b=0,x=h.length,H=t.step;"function"!=typeof H&&(H=function(){return t.step});for(var c=d,C=0;f>=c;C++,c+=60*H(C)){var D=c,O=v(D,t);if(t.useSelect){var S=e("<option />",{value:O});S.text(O)}else{var S=e("<li />");S.addClass(43200>D%86400?"ui-timepicker-am":"ui-timepicker-pm"),S.data("time",86400>=D?D:D%86400),S.text(O)}if((null!==t.minTime||null!==t.durationTime)&&t.showDuration){var R=k(c-p,t.step);if(t.useSelect)S.text(S.text()+" ("+R+")");else{var M=e("<span />",{"class":"ui-timepicker-duration"});M.text(" ("+R+")"),S.append(M)}}x>b&&(D>h[b][1]&&(b+=1),h[b]&&D>=h[b][0]&&D<=h[b][1]&&(t.useSelect?S.prop("disabled",!0):S="")),r.append(S)}if(e(r).find("li").length>0)if(s.data("timepicker-input",i),i.data("timepicker-list",s),t.useSelect)i.val()&&r.val(a(T(i.val()),t)),r.on("focus",function(){e(this).data("timepicker-input").trigger("showTimepicker")}),r.on("blur",function(){e(this).data("timepicker-input").trigger("hideTimepicker")}),r.on("change",function(){m(i,e(this).val(),"select")}),m(i,r.val(),"initial"),i.hide().after(r);else{var F=t.appendTo;"string"==typeof F?F=e(F):"function"==typeof F&&(F=F(i)),F.append(s),l(i,r),r.on("mousedown click","li",function(t){i.off("focus.timepicker"),i.on("focus.timepicker-ie-hack",function(){i.off("focus.timepicker-ie-hack"),i.on("focus.timepicker",y.show)}),o(i)||i[0].focus(),r.find("li").removeClass("ui-timepicker-selected"),e(this).addClass("ui-timepicker-selected"),g(i)&&(i.trigger("hideTimepicker"),r.on("mouseup.timepicker click.timepicker","li",function(e){r.off("mouseup.timepicker click.timepicker"),s.hide()}))})}}function n(i,t){var r,n,a;return"object"==typeof i?(r=i.label,n=i.className,a=i.value):"string"==typeof i?r=i:e.error("Invalid noneOption value"),t?e("<option />",{value:a,"class":n,text:r}):e("<li />",{"class":n,text:r}).data("time",String(a))}function a(e,i){return e=i.roundingFunction(e,i),null!==e?v(e,i):void 0}function s(i){if(i.target!=window){var t=e(i.target);t.closest(".ui-timepicker-input").length||t.closest(".ui-timepicker-wrapper").length||(y.hide(),e(document).unbind(".ui-timepicker"),e(window).unbind(".ui-timepicker"))}}function o(e){var i=e.data("timepicker-settings");return(window.navigator.msMaxTouchPoints||"ontouchstart"in document)&&i.disableTouchKeyboard}function c(i,t,r){if(!r&&0!==r)return!1;var n=i.data("timepicker-settings"),a=!1,r=n.roundingFunction(r,n);return t.find("li").each(function(i,t){var n=e(t);if("number"==typeof n.data("time"))return n.data("time")==r?(a=n,!1):void 0}),a}function l(e,i){i.find("li").removeClass("ui-timepicker-selected");var t=T(p(e),e.data("timepicker-settings"));if(null!==t){var r=c(e,i,t);if(r){var n=r.offset().top-i.offset().top;(n+r.outerHeight()>i.outerHeight()||0>n)&&i.scrollTop(i.scrollTop()+r.position().top-r.outerHeight()),r.addClass("ui-timepicker-selected")}}}function u(i,t){if(""!==this.value&&"timepicker"!=t){var r=e(this);if(!r.is(":focus")||i&&"change"==i.type){var n=r.data("timepicker-settings"),a=T(this.value,n);if(null===a)return void r.trigger("timeFormatError");var s=!1;null!==n.minTime&&a<n.minTime&&null!==n.maxTime&&a>n.maxTime&&(s=!0),e.each(n.disableTimeRanges,function(){return a>=this[0]&&a<this[1]?(s=!0,!1):void 0}),n.forceRoundTime&&(a=n.roundingFunction(a,n));v(a,n)}}}function p(e){return e.is("input")?e.val():e.data("ui-timepicker-value")}function m(e,i,t){if(e.is("input")){e.val(i);var r=e.data("timepicker-settings");r.useSelect&&"select"!=t&&"initial"!=t&&e.data("timepicker-list").val(a(T(i),r))}return e.data("ui-timepicker-value")!=i?(e.data("ui-timepicker-value",i),"select"==t?e.trigger("selectTime").trigger("changeTime").trigger("change","timepicker"):"error"!=t&&e.trigger("changeTime"),!0):(e.trigger("selectTime"),!1)}function d(e){switch(e.keyCode){case 13:case 9:return;default:e.preventDefault()}}function f(t){var r=e(this),n=r.data("timepicker-list");if(!n||!i(n)){if(40!=t.keyCode)return!0;y.show.call(r.get(0)),n=r.data("timepicker-list"),o(r)||r.focus()}switch(t.keyCode){case 13:return g(r)&&y.hide.apply(this),t.preventDefault(),!1;case 38:var a=n.find(".ui-timepicker-selected");return a.length?a.is(":first-child")||(a.removeClass("ui-timepicker-selected"),a.prev().addClass("ui-timepicker-selected"),a.prev().position().top<a.outerHeight()&&n.scrollTop(n.scrollTop()-a.outerHeight())):(n.find("li").each(function(i,t){return e(t).position().top>0?(a=e(t),!1):void 0}),a.addClass("ui-timepicker-selected")),!1;case 40:return a=n.find(".ui-timepicker-selected"),0===a.length?(n.find("li").each(function(i,t){return e(t).position().top>0?(a=e(t),!1):void 0}),a.addClass("ui-timepicker-selected")):a.is(":last-child")||(a.removeClass("ui-timepicker-selected"),a.next().addClass("ui-timepicker-selected"),a.next().position().top+2*a.outerHeight()>n.outerHeight()&&n.scrollTop(n.scrollTop()+a.outerHeight())),!1;case 27:n.find("li").removeClass("ui-timepicker-selected"),y.hide();break;case 9:y.hide();break;default:return!0}}function h(t){var r=e(this),n=r.data("timepicker-list"),a=r.data("timepicker-settings");if(!n||!i(n)||a.disableTextInput)return!0;switch(t.keyCode){case 96:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:case 65:case 77:case 80:case 186:case 8:case 46:a.typeaheadHighlight?l(r,n):n.hide()}}function g(e){var i=e.data("timepicker-settings"),t=e.data("timepicker-list"),r=null,n=t.find(".ui-timepicker-selected");return n.hasClass("ui-timepicker-disabled")?!1:(n.length&&(r=n.data("time")),null!==r&&("string"!=typeof r&&(r=v(r,i)),m(e,r,"select"),t.hide()),!0)}function k(e,i){e=Math.abs(e);var t,r,n=Math.round(e/60),a=[];return 60>n?a=[n,b.mins]:(t=Math.floor(n/60),r=n%60,30==i&&30==r&&(t+=b.decimal+5),a.push(t),a.push(1==t?b.hr:b.hrs),30!=i&&r&&(a.push(r),a.push(b.mins))),a.join(" ")}function v(i,t){if("number"!=typeof i)return null;var r=parseInt(i%60),n=parseInt(i/60%60),a=parseInt(i/3600%24),s=new Date(1970,0,2,a,n,r,0);if(isNaN(s.getTime()))return null;if("function"===e.type(t.timeFormat))return t.timeFormat(s);for(var o,c,l="",u=0;u<t.timeFormat.length;u++)switch(c=t.timeFormat.charAt(u)){case"a":l+=s.getHours()>11?b.pm:b.am;break;case"A":l+=s.getHours()>11?b.PM:b.AM;break;case"g":o=s.getHours()%12,l+=0===o?"12":o;break;case"G":o=s.getHours(),i===w&&(o=t.show2400?24:0),l+=o;break;case"h":o=s.getHours()%12,0!==o&&10>o&&(o="0"+o),l+=0===o?"12":o;break;case"H":o=s.getHours(),i===w&&(o=t.show2400?24:0),l+=o>9?o:"0"+o;break;case"i":var n=s.getMinutes();l+=n>9?n:"0"+n;break;case"s":r=s.getSeconds(),l+=r>9?r:"0"+r;break;case"\\":u++,l+=t.timeFormat.charAt(u);break;default:l+=c}return l}function T(e,i){if(""===e||null===e)return null;if("object"==typeof e)return 3600*e.getHours()+60*e.getMinutes()+e.getSeconds();if("string"!=typeof e)return e;e=e.toLowerCase().replace(/[\s\.]/g,""),("a"==e.slice(-1)||"p"==e.slice(-1))&&(e+="m");var t="("+b.am.replace(".","")+"|"+b.pm.replace(".","")+"|"+b.AM.replace(".","")+"|"+b.PM.replace(".","")+")?",r=new RegExp("^"+t+"([0-9]?[0-9])\\W?([0-5][0-9])?\\W?([0-5][0-9])?"+t+"$"),n=e.match(r);if(!n)return null;var a=parseInt(1*n[2],10);if(a>24){if(i&&i.wrapHours===!1)return null;a%=24}var s=n[1]||n[5],o=a;if(12>=a&&s){var c=s==b.pm||s==b.PM;o=12==a?c?12:0:a+(c?12:0)}var l=1*n[3]||0,u=1*n[4]||0,p=3600*o+60*l+u;if(12>a&&!s&&i&&i._twelveHourTime&&i.scrollDefault){var m=p-i.scrollDefault();0>m&&m>=w/-2&&(p=(p+w/2)%w)}return p}var w=86400,b={am:"am",pm:"pm",AM:"AM",PM:"PM",decimal:".",mins:"mins",hr:"hr",hrs:"hrs"},y={init:function(i){return this.each(function(){var n=e(this),a=[];for(var s in e.fn.timepicker.defaults)n.data(s)&&(a[s]=n.data(s));var o=e.extend({},e.fn.timepicker.defaults,a,i);if(o.lang&&(b=e.extend(b,o.lang)),o=t(o),n.data("timepicker-settings",o),n.addClass("ui-timepicker-input"),o.useSelect)r(n);else{if(n.prop("autocomplete","off"),o.showOn)for(var c in o.showOn)n.on(o.showOn[c]+".timepicker",y.show);n.on("change.timepicker",u),n.on("keydown.timepicker",f),n.on("keyup.timepicker",h),o.disableTextInput&&n.on("keydown.timepicker",d),u.call(n.get(0))}})},show:function(t){var n=e(this),a=n.data("timepicker-settings");if(t&&t.preventDefault(),a.useSelect)return void n.data("timepicker-list").focus();o(n)&&n.blur();var u=n.data("timepicker-list");if(!n.prop("readonly")&&(u&&0!==u.length&&"function"!=typeof a.durationTime||(r(n),u=n.data("timepicker-list")),!i(u))){n.data("ui-timepicker-value",n.val()),l(n,u),y.hide();var m={};a.orientation.match(/r/)?m.left=n.offset().left+n.outerWidth()-u.outerWidth()+parseInt(u.css("marginLeft").replace("px",""),10):m.left=n.offset().left+parseInt(u.css("marginLeft").replace("px",""),10);var d;d=a.orientation.match(/t/)?"t":a.orientation.match(/b/)?"b":n.offset().top+n.outerHeight(!0)+u.outerHeight()>e(window).height()+e(window).scrollTop()?"t":"b","t"==d?(u.addClass("ui-timepicker-positioned-top"),m.top=n.offset().top-u.outerHeight()+parseInt(u.css("marginTop").replace("px",""),10)):(u.removeClass("ui-timepicker-positioned-top"),m.top=n.offset().top+n.outerHeight()+parseInt(u.css("marginTop").replace("px",""),10)),u.show(),u.offset(m);var f=u.find(".ui-timepicker-selected");if(!f.length){var h=T(p(n));null!==h?f=c(n,u,h):a.scrollDefault&&(f=c(n,u,a.scrollDefault()))}if(f&&f.length){var g=u.scrollTop()+f.position().top-f.outerHeight();u.scrollTop(g)}else u.scrollTop(0);return a.stopScrollPropagation&&e(document).on("wheel.ui-timepicker",".ui-timepicker-wrapper",function(i){i.preventDefault();var t=e(this).scrollTop();e(this).scrollTop(t+i.originalEvent.deltaY)}),e(document).on("touchstart.ui-timepicker mousedown.ui-timepicker",s),e(window).on("resize.ui-timepicker",s),a.closeOnWindowScroll&&e(document).on("scroll.ui-timepicker",s),n.trigger("showTimepicker"),this}},hide:function(t){var r=e(this),n=r.data("timepicker-settings");return n&&n.useSelect&&r.blur(),e(".ui-timepicker-wrapper").each(function(){var t=e(this);if(i(t)){var r=t.data("timepicker-input"),n=r.data("timepicker-settings");n&&n.selectOnBlur&&g(r),t.hide(),r.trigger("hideTimepicker")}}),this},option:function(i,n){return"string"==typeof i&&"undefined"==typeof n?e(this).data("timepicker-settings")[i]:this.each(function(){var a=e(this),s=a.data("timepicker-settings"),o=a.data("timepicker-list");"object"==typeof i?s=e.extend(s,i):"string"==typeof i&&(s[i]=n),s=t(s),a.data("timepicker-settings",s),o&&(o.remove(),a.data("timepicker-list",!1)),s.useSelect&&r(a)})},getSecondsFromMidnight:function(){return T(p(this))},getTime:function(e){var i=this,t=p(i);if(!t)return null;var r=T(t);if(null===r)return null;e||(e=new Date);var n=new Date(e);return n.setHours(r/3600),n.setMinutes(r%3600/60),n.setSeconds(r%60),n.setMilliseconds(0),n},isVisible:function(){var e=this,t=e.data("timepicker-list");return!(!t||!i(t))},setTime:function(e){var i=this,t=i.data("timepicker-settings");if(t.forceRoundTime)var r=a(T(e),t);else var r=v(T(e),t);return e&&null===r&&t.noneOption&&(r=e),m(i,r),i.data("timepicker-list")&&l(i,i.data("timepicker-list")),this},remove:function(){var e=this;if(e.hasClass("ui-timepicker-input")){var i=e.data("timepicker-settings");return e.removeAttr("autocomplete","off"),e.removeClass("ui-timepicker-input"),e.removeData("timepicker-settings"),e.off(".timepicker"),e.data("timepicker-list")&&e.data("timepicker-list").remove(),i.useSelect&&e.show(),e.removeData("timepicker-list"),this}}};e.fn.timepicker=function(i){return this.length?y[i]?this.hasClass("ui-timepicker-input")?y[i].apply(this,Array.prototype.slice.call(arguments,1)):this:"object"!=typeof i&&i?void e.error("Method "+i+" does not exist on jQuery.timepicker"):y.init.apply(this,arguments):this},e.fn.timepicker.defaults={appendTo:"body",className:null,closeOnWindowScroll:!1,disableTextInput:!1,disableTimeRanges:[],disableTouchKeyboard:!1,durationTime:null,forceRoundTime:!1,maxTime:null,minTime:null,noneOption:!1,orientation:"l",roundingFunction:function(e,i){if(null===e)return null;if("number"!=typeof i.step)return e;var t=e%(60*i.step);return t>=30*i.step?e+=60*i.step-t:e-=t,e==w&&i.show2400?e:e%w},scrollDefault:null,selectOnBlur:!1,show2400:!1,showDuration:!1,showOn:["click","focus"],showOnFocus:!0,step:30,stopScrollPropagation:!1,timeFormat:"g:ia",typeaheadHighlight:!0,useSelect:!1,wrapHours:!0}});
/*!
* Parsley.js
* Version 2.4.3 - built Sat, Jun 18th 2016, 9:01 pm
* http://parsleyjs.org
* Guillaume Potier - <guillaume@wisembly.com>
* Marc-Andre Lafortune - <petroselinum@marc-andre.ca>
* MIT Licensed
*/
function _toConsumableArray(e){if(Array.isArray(e)){for(var t=0,i=Array(e.length);t<e.length;t++)i[t]=e[t];return i}return Array.from(e)}var _slice=Array.prototype.slice;!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],t):e.parsley=t(e.jQuery)}(this,function(e){"use strict";function t(e,t){return e.parsleyAdaptedCallback||(e.parsleyAdaptedCallback=function(){var i=Array.prototype.slice.call(arguments,0);i.unshift(this),e.apply(t||R,i)}),e.parsleyAdaptedCallback}function i(e){return 0===e.lastIndexOf(q,0)?e.substr(q.length):e}/**
   * inputevent - Alleviate browser bugs for input events
   * https://github.com/marcandre/inputevent
   * @version v0.0.3 - (built Thu, Apr 14th 2016, 5:58 pm)
   * @author Marc-Andre Lafortune <github@marc-andre.ca>
   * @license MIT
   */
function n(){var t=this,i=window||global;e.extend(this,{isNativeEvent:function(e){return e.originalEvent&&e.originalEvent.isTrusted!==!1},fakeInputEvent:function(i){t.isNativeEvent(i)&&e(i.target).trigger("input")},misbehaves:function(i){t.isNativeEvent(i)&&(t.behavesOk(i),e(document).on("change.inputevent",i.data.selector,t.fakeInputEvent),t.fakeInputEvent(i))},behavesOk:function(i){t.isNativeEvent(i)&&e(document).off("input.inputevent",i.data.selector,t.behavesOk).off("change.inputevent",i.data.selector,t.misbehaves)},install:function(){if(!i.inputEventPatched){i.inputEventPatched="0.0.3";for(var n=["select",'input[type="checkbox"]','input[type="radio"]','input[type="file"]'],r=0;r<n.length;r++){var s=n[r];e(document).on("input.inputevent",s,{selector:s},t.behavesOk).on("change.inputevent",s,{selector:s},t.misbehaves)}}},uninstall:function(){delete i.inputEventPatched,e(document).off(".inputevent")}})}var r=1,s={},a={attr:function(e,t,i){var n,r,s,a=new RegExp("^"+t,"i");if("undefined"==typeof i)i={};else for(n in i)i.hasOwnProperty(n)&&delete i[n];if("undefined"==typeof e||"undefined"==typeof e[0])return i;for(s=e[0].attributes,n=s.length;n--;)r=s[n],r&&r.specified&&a.test(r.name)&&(i[this.camelize(r.name.slice(t.length))]=this.deserializeValue(r.value));return i},checkAttr:function(e,t,i){return e.is("["+t+i+"]")},setAttr:function(e,t,i,n){e[0].setAttribute(this.dasherize(t+i),String(n))},generateID:function(){return""+r++},deserializeValue:function(t){var i;try{return t?"true"==t||("false"==t?!1:"null"==t?null:isNaN(i=Number(t))?/^[\[\{]/.test(t)?e.parseJSON(t):t:i):t}catch(n){return t}},camelize:function(e){return e.replace(/-+(.)?/g,function(e,t){return t?t.toUpperCase():""})},dasherize:function(e){return e.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/_/g,"-").toLowerCase()},warn:function(){var e;window.console&&"function"==typeof window.console.warn&&(e=window.console).warn.apply(e,arguments)},warnOnce:function(e){s[e]||(s[e]=!0,this.warn.apply(this,arguments))},_resetWarnings:function(){s={}},trimString:function(e){return e.replace(/^\s+|\s+$/g,"")},namespaceEvents:function(t,i){return t=this.trimString(t||"").split(/\s+/),t[0]?e.map(t,function(e){return e+"."+i}).join(" "):""},difference:function(t,i){var n=[];return e.each(t,function(e,t){-1==i.indexOf(t)&&n.push(t)}),n},all:function(t){return e.when.apply(e,_toConsumableArray(t).concat([42,42]))},objectCreate:Object.create||function(){var e=function(){};return function(t){if(arguments.length>1)throw Error("Second argument not supported");if("object"!=typeof t)throw TypeError("Argument must be an object");e.prototype=t;var i=new e;return e.prototype=null,i}}()},o=a,l={namespace:"data-parsley-",inputs:"input, textarea, select",excluded:"input[type=button], input[type=submit], input[type=reset], input[type=hidden]",priorityEnabled:!0,multiple:null,group:null,uiEnabled:!0,validationThreshold:3,focus:"first",trigger:!1,triggerAfterFailure:"input",errorClass:"parsley-error",successClass:"parsley-success",classHandler:function(e){},errorsContainer:function(e){},errorsWrapper:'<ul class="parsley-errors-list"></ul>',errorTemplate:"<li></li>"},u=function(){this.__id__=o.generateID()};u.prototype={asyncSupport:!0,_pipeAccordingToValidationResult:function(){var t=this,i=function(){var i=e.Deferred();return!0!==t.validationResult&&i.reject(),i.resolve().promise()};return[i,i]},actualizeOptions:function(){return o.attr(this.$element,this.options.namespace,this.domOptions),this.parent&&this.parent.actualizeOptions&&this.parent.actualizeOptions(),this},_resetOptions:function(e){this.domOptions=o.objectCreate(this.parent.options),this.options=o.objectCreate(this.domOptions);for(var t in e)e.hasOwnProperty(t)&&(this.options[t]=e[t]);this.actualizeOptions()},_listeners:null,on:function(e,t){this._listeners=this._listeners||{};var i=this._listeners[e]=this._listeners[e]||[];return i.push(t),this},subscribe:function(t,i){e.listenTo(this,t.toLowerCase(),i)},off:function(e,t){var i=this._listeners&&this._listeners[e];if(i)if(t)for(var n=i.length;n--;)i[n]===t&&i.splice(n,1);else delete this._listeners[e];return this},unsubscribe:function(t,i){e.unsubscribeTo(this,t.toLowerCase())},trigger:function(e,t,i){t=t||this;var n,r=this._listeners&&this._listeners[e];if(r)for(var s=r.length;s--;)if(n=r[s].call(t,t,i),n===!1)return n;return this.parent?this.parent.trigger(e,t,i):!0},reset:function(){if("ParsleyForm"!==this.__class__)return this._resetUI(),this._trigger("reset");for(var e=0;e<this.fields.length;e++)this.fields[e].reset();this._trigger("reset")},destroy:function(){if(this._destroyUI(),"ParsleyForm"!==this.__class__)return this.$element.removeData("Parsley"),this.$element.removeData("ParsleyFieldMultiple"),void this._trigger("destroy");for(var e=0;e<this.fields.length;e++)this.fields[e].destroy();this.$element.removeData("Parsley"),this._trigger("destroy")},asyncIsValid:function(e,t){return o.warnOnce("asyncIsValid is deprecated; please use whenValid instead"),this.whenValid({group:e,force:t})},_findRelated:function(){return this.options.multiple?this.parent.$element.find("["+this.options.namespace+'multiple="'+this.options.multiple+'"]'):this.$element}};var d={string:function(e){return e},integer:function(e){if(isNaN(e))throw'Requirement is not an integer: "'+e+'"';return parseInt(e,10)},number:function(e){if(isNaN(e))throw'Requirement is not a number: "'+e+'"';return parseFloat(e)},reference:function(t){var i=e(t);if(0===i.length)throw'No such reference: "'+t+'"';return i},"boolean":function(e){return"false"!==e},object:function(e){return o.deserializeValue(e)},regexp:function(e){var t="";return/^\/.*\/(?:[gimy]*)$/.test(e)?(t=e.replace(/.*\/([gimy]*)$/,"$1"),e=e.replace(new RegExp("^/(.*?)/"+t+"$"),"$1")):e="^"+e+"$",new RegExp(e,t)}},h=function(e,t){var i=e.match(/^\s*\[(.*)\]\s*$/);if(!i)throw'Requirement is not an array: "'+e+'"';var n=i[1].split(",").map(o.trimString);if(n.length!==t)throw"Requirement has "+n.length+" values when "+t+" are needed";return n},p=function(e,t){var i=d[e||"string"];if(!i)throw'Unknown requirement specification: "'+e+'"';return i(t)},c=function(e,t,i){var n=null,r={};for(var s in e)if(s){var a=i(s);"string"==typeof a&&(a=p(e[s],a)),r[s]=a}else n=p(e[s],t);return[n,r]},f=function(t){e.extend(!0,this,t)};f.prototype={validate:function(t,i){if(this.fn)return arguments.length>3&&(i=[].slice.call(arguments,1,-1)),this.fn.call(this,t,i);if(e.isArray(t)){if(!this.validateMultiple)throw"Validator `"+this.name+"` does not handle multiple values";return this.validateMultiple.apply(this,arguments)}if(this.validateNumber)return isNaN(t)?!1:(arguments[0]=parseFloat(arguments[0]),this.validateNumber.apply(this,arguments));if(this.validateString)return this.validateString.apply(this,arguments);throw"Validator `"+this.name+"` only handles multiple values"},parseRequirements:function(t,i){if("string"!=typeof t)return e.isArray(t)?t:[t];var n=this.requirementType;if(e.isArray(n)){for(var r=h(t,n.length),s=0;s<r.length;s++)r[s]=p(n[s],r[s]);return r}return e.isPlainObject(n)?c(n,t,i):[p(n,t)]},requirementType:"string",priority:2};var m=function(e,t){this.__class__="ParsleyValidatorRegistry",this.locale="en",this.init(e||{},t||{})},g={email:/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i,number:/^-?(\d*\.)?\d+(e[-+]?\d+)?$/i,integer:/^-?\d+$/,digits:/^\d+$/,alphanum:/^\w+$/i,url:new RegExp("^(?:(?:https?|ftp)://)?(?:\\S+(?::\\S*)?@)?(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))(?::\\d{2,5})?(?:/\\S*)?$","i")};g.range=g.number;var v=function(e){var t=(""+e).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return t?Math.max(0,(t[1]?t[1].length:0)-(t[2]?+t[2]:0)):0};m.prototype={init:function(t,i){this.catalog=i,this.validators=e.extend({},this.validators);for(var n in t)this.addValidator(n,t[n].fn,t[n].priority);window.Parsley.trigger("parsley:validator:init")},setLocale:function(e){if("undefined"==typeof this.catalog[e])throw new Error(e+" is not available in the catalog");return this.locale=e,this},addCatalog:function(e,t,i){return"object"==typeof t&&(this.catalog[e]=t),!0===i?this.setLocale(e):this},addMessage:function(e,t,i){return"undefined"==typeof this.catalog[e]&&(this.catalog[e]={}),this.catalog[e][t]=i,this},addMessages:function(e,t){for(var i in t)this.addMessage(e,i,t[i]);return this},addValidator:function(e,t,i){if(this.validators[e])o.warn('Validator "'+e+'" is already defined.');else if(l.hasOwnProperty(e))return void o.warn('"'+e+'" is a restricted keyword and is not a valid validator name.');return this._setValidator.apply(this,arguments)},updateValidator:function(e,t,i){return this.validators[e]?this._setValidator.apply(this,arguments):(o.warn('Validator "'+e+'" is not already defined.'),this.addValidator.apply(this,arguments))},removeValidator:function(e){return this.validators[e]||o.warn('Validator "'+e+'" is not defined.'),delete this.validators[e],this},_setValidator:function(e,t,i){"object"!=typeof t&&(t={fn:t,priority:i}),t.validate||(t=new f(t)),this.validators[e]=t;for(var n in t.messages||{})this.addMessage(n,e,t.messages[n]);return this},getErrorMessage:function(e){var t;if("type"===e.name){var i=this.catalog[this.locale][e.name]||{};t=i[e.requirements]}else t=this.formatMessage(this.catalog[this.locale][e.name],e.requirements);return t||this.catalog[this.locale].defaultMessage||this.catalog.en.defaultMessage},formatMessage:function(e,t){if("object"==typeof t){for(var i in t)e=this.formatMessage(e,t[i]);return e}return"string"==typeof e?e.replace(/%s/i,t):""},validators:{notblank:{validateString:function(e){return/\S/.test(e)},priority:2},required:{validateMultiple:function(e){return e.length>0},validateString:function(e){return/\S/.test(e)},priority:512},type:{validateString:function(e,t){var i=arguments.length<=2||void 0===arguments[2]?{}:arguments[2],n=i.step,r=void 0===n?"1":n,s=i.base,a=void 0===s?0:s,o=g[t];if(!o)throw new Error("validator type `"+t+"` is not supported");if(!o.test(e))return!1;if("number"===t&&!/^any$/i.test(r||"")){var l=Number(e),u=Math.max(v(r),v(a));if(v(l)>u)return!1;var d=function(e){return Math.round(e*Math.pow(10,u))};if((d(l)-d(a))%d(r)!=0)return!1}return!0},requirementType:{"":"string",step:"string",base:"number"},priority:256},pattern:{validateString:function(e,t){return t.test(e)},requirementType:"regexp",priority:64},minlength:{validateString:function(e,t){return e.length>=t},requirementType:"integer",priority:30},maxlength:{validateString:function(e,t){return e.length<=t},requirementType:"integer",priority:30},length:{validateString:function(e,t,i){return e.length>=t&&e.length<=i},requirementType:["integer","integer"],priority:30},mincheck:{validateMultiple:function(e,t){return e.length>=t},requirementType:"integer",priority:30},maxcheck:{validateMultiple:function(e,t){return e.length<=t},requirementType:"integer",priority:30},check:{validateMultiple:function(e,t,i){return e.length>=t&&e.length<=i},requirementType:["integer","integer"],priority:30},min:{validateNumber:function(e,t){return e>=t},requirementType:"number",priority:30},max:{validateNumber:function(e,t){return t>=e},requirementType:"number",priority:30},range:{validateNumber:function(e,t,i){return e>=t&&i>=e},requirementType:["number","number"],priority:30},equalto:{validateString:function(t,i){var n=e(i);return n.length?t===n.val():t===i},priority:256}}};var y={},_=function k(e,t,i){for(var n=[],r=[],s=0;s<e.length;s++){for(var a=!1,o=0;o<t.length;o++)if(e[s].assert.name===t[o].assert.name){a=!0;break}a?r.push(e[s]):n.push(e[s])}return{kept:r,added:n,removed:i?[]:k(t,e,!0).added}};y.Form={_actualizeTriggers:function(){var e=this;this.$element.on("submit.Parsley",function(t){e.onSubmitValidate(t)}),this.$element.on("click.Parsley",'input[type="submit"], button[type="submit"]',function(t){e.onSubmitButton(t)}),!1!==this.options.uiEnabled&&this.$element.attr("novalidate","")},focus:function(){if(this._focusedField=null,!0===this.validationResult||"none"===this.options.focus)return null;for(var e=0;e<this.fields.length;e++){var t=this.fields[e];if(!0!==t.validationResult&&t.validationResult.length>0&&"undefined"==typeof t.options.noFocus&&(this._focusedField=t.$element,"first"===this.options.focus))break}return null===this._focusedField?null:this._focusedField.focus()},_destroyUI:function(){this.$element.off(".Parsley")}},y.Field={_reflowUI:function(){if(this._buildUI(),this._ui){var e=_(this.validationResult,this._ui.lastValidationResult);this._ui.lastValidationResult=this.validationResult,this._manageStatusClass(),this._manageErrorsMessages(e),this._actualizeTriggers(),!e.kept.length&&!e.added.length||this._failedOnce||(this._failedOnce=!0,this._actualizeTriggers())}},getErrorsMessages:function(){if(!0===this.validationResult)return[];for(var e=[],t=0;t<this.validationResult.length;t++)e.push(this.validationResult[t].errorMessage||this._getErrorMessage(this.validationResult[t].assert));return e},addError:function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],i=t.message,n=t.assert,r=t.updateClass,s=void 0===r?!0:r;this._buildUI(),this._addError(e,{message:i,assert:n}),s&&this._errorClass()},updateError:function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],i=t.message,n=t.assert,r=t.updateClass,s=void 0===r?!0:r;this._buildUI(),this._updateError(e,{message:i,assert:n}),s&&this._errorClass()},removeError:function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],i=t.updateClass,n=void 0===i?!0:i;this._buildUI(),this._removeError(e),n&&this._manageStatusClass()},_manageStatusClass:function(){this.hasConstraints()&&this.needsValidation()&&!0===this.validationResult?this._successClass():this.validationResult.length>0?this._errorClass():this._resetClass()},_manageErrorsMessages:function(t){if("undefined"==typeof this.options.errorsMessagesDisabled){if("undefined"!=typeof this.options.errorMessage)return t.added.length||t.kept.length?(this._insertErrorWrapper(),0===this._ui.$errorsWrapper.find(".parsley-custom-error-message").length&&this._ui.$errorsWrapper.append(e(this.options.errorTemplate).addClass("parsley-custom-error-message")),this._ui.$errorsWrapper.addClass("filled").find(".parsley-custom-error-message").html(this.options.errorMessage)):this._ui.$errorsWrapper.removeClass("filled").find(".parsley-custom-error-message").remove();for(var i=0;i<t.removed.length;i++)this._removeError(t.removed[i].assert.name);for(i=0;i<t.added.length;i++)this._addError(t.added[i].assert.name,{message:t.added[i].errorMessage,assert:t.added[i].assert});for(i=0;i<t.kept.length;i++)this._updateError(t.kept[i].assert.name,{message:t.kept[i].errorMessage,assert:t.kept[i].assert})}},_addError:function(t,i){var n=i.message,r=i.assert;this._insertErrorWrapper(),this._ui.$errorsWrapper.addClass("filled").append(e(this.options.errorTemplate).addClass("parsley-"+t).html(n||this._getErrorMessage(r)))},_updateError:function(e,t){var i=t.message,n=t.assert;this._ui.$errorsWrapper.addClass("filled").find(".parsley-"+e).html(i||this._getErrorMessage(n))},_removeError:function(e){this._ui.$errorsWrapper.removeClass("filled").find(".parsley-"+e).remove()},_getErrorMessage:function(e){var t=e.name+"Message";return"undefined"!=typeof this.options[t]?window.Parsley.formatMessage(this.options[t],e.requirements):window.Parsley.getErrorMessage(e)},_buildUI:function(){if(!this._ui&&!1!==this.options.uiEnabled){var t={};this.$element.attr(this.options.namespace+"id",this.__id__),t.$errorClassHandler=this._manageClassHandler(),t.errorsWrapperId="parsley-id-"+(this.options.multiple?"multiple-"+this.options.multiple:this.__id__),t.$errorsWrapper=e(this.options.errorsWrapper).attr("id",t.errorsWrapperId),t.lastValidationResult=[],t.validationInformationVisible=!1,this._ui=t}},_manageClassHandler:function(){if("string"==typeof this.options.classHandler&&e(this.options.classHandler).length)return e(this.options.classHandler);var t=this.options.classHandler.call(this,this);return"undefined"!=typeof t&&t.length?t:!this.options.multiple||this.$element.is("select")?this.$element:this.$element.parent()},_insertErrorWrapper:function(){var t;if(0!==this._ui.$errorsWrapper.parent().length)return this._ui.$errorsWrapper.parent();if("string"==typeof this.options.errorsContainer){if(e(this.options.errorsContainer).length)return e(this.options.errorsContainer).append(this._ui.$errorsWrapper);o.warn("The errors container `"+this.options.errorsContainer+"` does not exist in DOM")}else"function"==typeof this.options.errorsContainer&&(t=this.options.errorsContainer.call(this,this));if("undefined"!=typeof t&&t.length)return t.append(this._ui.$errorsWrapper);var i=this.$element;return this.options.multiple&&(i=i.parent()),i.after(this._ui.$errorsWrapper)},_actualizeTriggers:function(){var e,t=this,i=this._findRelated();i.off(".Parsley"),this._failedOnce?i.on(o.namespaceEvents(this.options.triggerAfterFailure,"Parsley"),function(){t.validate()}):(e=o.namespaceEvents(this.options.trigger,"Parsley"))&&i.on(e,function(e){t._eventValidate(e)})},_eventValidate:function(e){!(!/key|input/.test(e.type)||this._ui&&this._ui.validationInformationVisible)&&this.getValue().length<=this.options.validationThreshold||this.validate()},_resetUI:function(){this._failedOnce=!1,this._actualizeTriggers(),"undefined"!=typeof this._ui&&(this._ui.$errorsWrapper.removeClass("filled").children().remove(),this._resetClass(),this._ui.lastValidationResult=[],this._ui.validationInformationVisible=!1)},_destroyUI:function(){this._resetUI(),"undefined"!=typeof this._ui&&this._ui.$errorsWrapper.remove(),delete this._ui},_successClass:function(){this._ui.validationInformationVisible=!0,this._ui.$errorClassHandler.removeClass(this.options.errorClass).addClass(this.options.successClass)},_errorClass:function(){this._ui.validationInformationVisible=!0,this._ui.$errorClassHandler.removeClass(this.options.successClass).addClass(this.options.errorClass)},_resetClass:function(){this._ui.$errorClassHandler.removeClass(this.options.successClass).removeClass(this.options.errorClass)}};var w=function(t,i,n){this.__class__="ParsleyForm",this.$element=e(t),this.domOptions=i,this.options=n,this.parent=window.Parsley,this.fields=[],this.validationResult=null},b={pending:null,resolved:!0,rejected:!1};w.prototype={onSubmitValidate:function(e){var t=this;if(!0!==e.parsley){var i=this._$submitSource||this.$element.find('input[type="submit"], button[type="submit"]').first();if(this._$submitSource=null,this.$element.find(".parsley-synthetic-submit-button").prop("disabled",!0),!i.is("[formnovalidate]")){var n=this.whenValidate({event:e});"resolved"===n.state()&&!1!==this._trigger("submit")||(e.stopImmediatePropagation(),e.preventDefault(),"pending"===n.state()&&n.done(function(){t._submit(i)}))}}},onSubmitButton:function(t){this._$submitSource=e(t.currentTarget)},_submit:function(t){if(!1!==this._trigger("submit")){if(t){var i=this.$element.find(".parsley-synthetic-submit-button").prop("disabled",!1);0===i.length&&(i=e('<input class="parsley-synthetic-submit-button" type="hidden">').appendTo(this.$element)),i.attr({name:t.attr("name"),value:t.attr("value")})}this.$element.trigger(e.extend(e.Event("submit"),{parsley:!0}))}},validate:function(t){if(arguments.length>=1&&!e.isPlainObject(t)){o.warnOnce("Calling validate on a parsley form without passing arguments as an object is deprecated.");var i=_slice.call(arguments),n=i[0],r=i[1],s=i[2];t={group:n,force:r,event:s}}return b[this.whenValidate(t).state()]},whenValidate:function(){var t,i=this,n=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],r=n.group,s=n.force,a=n.event;this.submitEvent=a,a&&(this.submitEvent=e.extend({},a,{preventDefault:function(){o.warnOnce("Using `this.submitEvent.preventDefault()` is deprecated; instead, call `this.validationResult = false`"),i.validationResult=!1}})),this.validationResult=!0,this._trigger("validate"),this._refreshFields();var l=this._withoutReactualizingFormOptions(function(){return e.map(i.fields,function(e){return e.whenValidate({force:s,group:r})})});return(t=o.all(l).done(function(){i._trigger("success")}).fail(function(){i.validationResult=!1,i.focus(),i._trigger("error")}).always(function(){i._trigger("validated")})).pipe.apply(t,_toConsumableArray(this._pipeAccordingToValidationResult()))},isValid:function(t){if(arguments.length>=1&&!e.isPlainObject(t)){o.warnOnce("Calling isValid on a parsley form without passing arguments as an object is deprecated.");var i=_slice.call(arguments),n=i[0],r=i[1];t={group:n,force:r}}return b[this.whenValid(t).state()]},whenValid:function(){var t=this,i=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],n=i.group,r=i.force;this._refreshFields();var s=this._withoutReactualizingFormOptions(function(){return e.map(t.fields,function(e){return e.whenValid({group:n,force:r})})});return o.all(s)},_refreshFields:function(){return this.actualizeOptions()._bindFields()},_bindFields:function(){var t=this,i=this.fields;return this.fields=[],this.fieldsMappedById={},this._withoutReactualizingFormOptions(function(){t.$element.find(t.options.inputs).not(t.options.excluded).each(function(e,i){var n=new window.Parsley.Factory(i,{},t);"ParsleyField"!==n.__class__&&"ParsleyFieldMultiple"!==n.__class__||!0===n.options.excluded||"undefined"==typeof t.fieldsMappedById[n.__class__+"-"+n.__id__]&&(t.fieldsMappedById[n.__class__+"-"+n.__id__]=n,t.fields.push(n))}),e.each(o.difference(i,t.fields),function(e,t){t._trigger("reset")})}),this},_withoutReactualizingFormOptions:function(e){var t=this.actualizeOptions;this.actualizeOptions=function(){return this};var i=e();return this.actualizeOptions=t,i},_trigger:function(e){return this.trigger("form:"+e)}};var F=function(t,i,n,r,s){if(!/ParsleyField/.test(t.__class__))throw new Error("ParsleyField or ParsleyFieldMultiple instance expected");var a=window.Parsley._validatorRegistry.validators[i],o=new f(a);e.extend(this,{validator:o,name:i,requirements:n,priority:r||t.options[i+"Priority"]||o.priority,isDomConstraint:!0===s}),this._parseRequirements(t.options)},C=function(e){var t=e[0].toUpperCase();return t+e.slice(1)};F.prototype={validate:function(e,t){var i;return(i=this.validator).validate.apply(i,[e].concat(_toConsumableArray(this.requirementList),[t]))},_parseRequirements:function(e){var t=this;this.requirementList=this.validator.parseRequirements(this.requirements,function(i){return e[t.name+C(i)]})}};var $=function(t,i,n,r){this.__class__="ParsleyField",this.$element=e(t),"undefined"!=typeof r&&(this.parent=r),this.options=n,this.domOptions=i,this.constraints=[],this.constraintsByName={},this.validationResult=!0,this._bindConstraints()},x={pending:null,resolved:!0,rejected:!1};$.prototype={validate:function(t){arguments.length>=1&&!e.isPlainObject(t)&&(o.warnOnce("Calling validate on a parsley field without passing arguments as an object is deprecated."),t={options:t});var i=this.whenValidate(t);if(!i)return!0;switch(i.state()){case"pending":return null;case"resolved":return!0;case"rejected":return this.validationResult}},whenValidate:function(){var e,t=this,i=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],n=i.force,r=i.group;return this.refreshConstraints(),!r||this._isInGroup(r)?(this.value=this.getValue(),this._trigger("validate"),(e=this.whenValid({force:n,value:this.value,_refreshed:!0}).always(function(){t._reflowUI()}).done(function(){t._trigger("success")}).fail(function(){t._trigger("error")}).always(function(){t._trigger("validated")})).pipe.apply(e,_toConsumableArray(this._pipeAccordingToValidationResult()))):void 0},hasConstraints:function(){return 0!==this.constraints.length},needsValidation:function(e){return"undefined"==typeof e&&(e=this.getValue()),!(!e.length&&!this._isRequired()&&"undefined"==typeof this.options.validateIfEmpty)},_isInGroup:function(t){return e.isArray(this.options.group)?-1!==e.inArray(t,this.options.group):this.options.group===t},isValid:function(t){if(arguments.length>=1&&!e.isPlainObject(t)){o.warnOnce("Calling isValid on a parsley field without passing arguments as an object is deprecated.");var i=_slice.call(arguments),n=i[0],r=i[1];t={force:n,value:r}}var s=this.whenValid(t);return s?x[s.state()]:!0},whenValid:function(){var t=this,i=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],n=i.force,r=void 0===n?!1:n,s=i.value,a=i.group,l=i._refreshed;if(l||this.refreshConstraints(),!a||this._isInGroup(a)){if(this.validationResult=!0,!this.hasConstraints())return e.when();if("undefined"!=typeof s&&null!==s||(s=this.getValue()),!this.needsValidation(s)&&!0!==r)return e.when();var u=this._getGroupedConstraints(),d=[];return e.each(u,function(i,n){var r=o.all(e.map(n,function(e){return t._validateConstraint(s,e)}));return d.push(r),"rejected"===r.state()?!1:void 0}),o.all(d)}},_validateConstraint:function(t,i){var n=this,r=i.validate(t,this);return!1===r&&(r=e.Deferred().reject()),o.all([r]).fail(function(e){n.validationResult instanceof Array||(n.validationResult=[]),n.validationResult.push({assert:i,errorMessage:"string"==typeof e&&e})})},getValue:function(){var e;return e="function"==typeof this.options.value?this.options.value(this):"undefined"!=typeof this.options.value?this.options.value:this.$element.val(),"undefined"==typeof e||null===e?"":this._handleWhitespace(e)},refreshConstraints:function(){return this.actualizeOptions()._bindConstraints()},addConstraint:function(e,t,i,n){if(window.Parsley._validatorRegistry.validators[e]){var r=new F(this,e,t,i,n);"undefined"!==this.constraintsByName[r.name]&&this.removeConstraint(r.name),this.constraints.push(r),this.constraintsByName[r.name]=r}return this},removeConstraint:function(e){for(var t=0;t<this.constraints.length;t++)if(e===this.constraints[t].name){this.constraints.splice(t,1);break}return delete this.constraintsByName[e],this},updateConstraint:function(e,t,i){return this.removeConstraint(e).addConstraint(e,t,i)},_bindConstraints:function(){for(var e=[],t={},i=0;i<this.constraints.length;i++)!1===this.constraints[i].isDomConstraint&&(e.push(this.constraints[i]),t[this.constraints[i].name]=this.constraints[i]);this.constraints=e,this.constraintsByName=t;for(var n in this.options)this.addConstraint(n,this.options[n],void 0,!0);return this._bindHtml5Constraints()},_bindHtml5Constraints:function(){(this.$element.hasClass("required")||this.$element.attr("required"))&&this.addConstraint("required",!0,void 0,!0),"string"==typeof this.$element.attr("pattern")&&this.addConstraint("pattern",this.$element.attr("pattern"),void 0,!0),"undefined"!=typeof this.$element.attr("min")&&"undefined"!=typeof this.$element.attr("max")?this.addConstraint("range",[this.$element.attr("min"),this.$element.attr("max")],void 0,!0):"undefined"!=typeof this.$element.attr("min")?this.addConstraint("min",this.$element.attr("min"),void 0,!0):"undefined"!=typeof this.$element.attr("max")&&this.addConstraint("max",this.$element.attr("max"),void 0,!0),"undefined"!=typeof this.$element.attr("minlength")&&"undefined"!=typeof this.$element.attr("maxlength")?this.addConstraint("length",[this.$element.attr("minlength"),this.$element.attr("maxlength")],void 0,!0):"undefined"!=typeof this.$element.attr("minlength")?this.addConstraint("minlength",this.$element.attr("minlength"),void 0,!0):"undefined"!=typeof this.$element.attr("maxlength")&&this.addConstraint("maxlength",this.$element.attr("maxlength"),void 0,!0);var e=this.$element.attr("type");return"undefined"==typeof e?this:"number"===e?this.addConstraint("type",["number",{step:this.$element.attr("step"),base:this.$element.attr("min")||this.$element.attr("value")}],void 0,!0):/^(email|url|range)$/i.test(e)?this.addConstraint("type",e,void 0,!0):this},_isRequired:function(){return"undefined"==typeof this.constraintsByName.required?!1:!1!==this.constraintsByName.required.requirements},_trigger:function(e){return this.trigger("field:"+e)},_handleWhitespace:function(e){return!0===this.options.trimValue&&o.warnOnce('data-parsley-trim-value="true" is deprecated, please use data-parsley-whitespace="trim"'),"squish"===this.options.whitespace&&(e=e.replace(/\s{2,}/g," ")),"trim"!==this.options.whitespace&&"squish"!==this.options.whitespace&&!0!==this.options.trimValue||(e=o.trimString(e)),e},_getGroupedConstraints:function(){if(!1===this.options.priorityEnabled)return[this.constraints];for(var e=[],t={},i=0;i<this.constraints.length;i++){var n=this.constraints[i].priority;t[n]||e.push(t[n]=[]),t[n].push(this.constraints[i])}return e.sort(function(e,t){return t[0].priority-e[0].priority}),e}};var E=$,P=function(){this.__class__="ParsleyFieldMultiple"};P.prototype={addElement:function(e){return this.$elements.push(e),this},refreshConstraints:function(){var t;if(this.constraints=[],this.$element.is("select"))return this.actualizeOptions()._bindConstraints(),this;for(var i=0;i<this.$elements.length;i++)if(e("html").has(this.$elements[i]).length){t=this.$elements[i].data("ParsleyFieldMultiple").refreshConstraints().constraints;for(var n=0;n<t.length;n++)this.addConstraint(t[n].name,t[n].requirements,t[n].priority,t[n].isDomConstraint)}else this.$elements.splice(i,1);return this},getValue:function(){if("function"==typeof this.options.value)return this.options.value(this);if("undefined"!=typeof this.options.value)return this.options.value;if(this.$element.is("input[type=radio]"))return this._findRelated().filter(":checked").val()||"";if(this.$element.is("input[type=checkbox]")){var t=[];return this._findRelated().filter(":checked").each(function(){t.push(e(this).val())}),t}return this.$element.is("select")&&null===this.$element.val()?[]:this.$element.val()},_init:function(){return this.$elements=[this.$element],this}};var V=function(t,i,n){this.$element=e(t);var r=this.$element.data("Parsley");if(r)return"undefined"!=typeof n&&r.parent===window.Parsley&&(r.parent=n,r._resetOptions(r.options)),"object"==typeof i&&e.extend(r.options,i),r;if(!this.$element.length)throw new Error("You must bind Parsley on an existing element.");if("undefined"!=typeof n&&"ParsleyForm"!==n.__class__)throw new Error("Parent instance must be a ParsleyForm instance");return this.parent=n||window.Parsley,this.init(i)};V.prototype={init:function(e){return this.__class__="Parsley",this.__version__="2.4.3",this.__id__=o.generateID(),this._resetOptions(e),this.$element.is("form")||o.checkAttr(this.$element,this.options.namespace,"validate")&&!this.$element.is(this.options.inputs)?this.bind("parsleyForm"):this.isMultiple()?this.handleMultiple():this.bind("parsleyField")},isMultiple:function(){return this.$element.is("input[type=radio], input[type=checkbox]")||this.$element.is("select")&&"undefined"!=typeof this.$element.attr("multiple")},handleMultiple:function(){var t,i,n=this;if(this.options.multiple||("undefined"!=typeof this.$element.attr("name")&&this.$element.attr("name").length?this.options.multiple=t=this.$element.attr("name"):"undefined"!=typeof this.$element.attr("id")&&this.$element.attr("id").length&&(this.options.multiple=this.$element.attr("id"))),
this.$element.is("select")&&"undefined"!=typeof this.$element.attr("multiple"))return this.options.multiple=this.options.multiple||this.__id__,this.bind("parsleyFieldMultiple");if(!this.options.multiple)return o.warn("To be bound by Parsley, a radio, a checkbox and a multiple select input must have either a name or a multiple option.",this.$element),this;this.options.multiple=this.options.multiple.replace(/(:|\.|\[|\]|\{|\}|\$)/g,""),"undefined"!=typeof t&&e('input[name="'+t+'"]').each(function(t,i){e(i).is("input[type=radio], input[type=checkbox]")&&e(i).attr(n.options.namespace+"multiple",n.options.multiple)});for(var r=this._findRelated(),s=0;s<r.length;s++)if(i=e(r.get(s)).data("Parsley"),"undefined"!=typeof i){this.$element.data("ParsleyFieldMultiple")||i.addElement(this.$element);break}return this.bind("parsleyField",!0),i||this.bind("parsleyFieldMultiple")},bind:function(t,i){var n;switch(t){case"parsleyForm":n=e.extend(new w(this.$element,this.domOptions,this.options),new u,window.ParsleyExtend)._bindFields();break;case"parsleyField":n=e.extend(new E(this.$element,this.domOptions,this.options,this.parent),new u,window.ParsleyExtend);break;case"parsleyFieldMultiple":n=e.extend(new E(this.$element,this.domOptions,this.options,this.parent),new P,new u,window.ParsleyExtend)._init();break;default:throw new Error(t+"is not a supported Parsley type")}return this.options.multiple&&o.setAttr(this.$element,this.options.namespace,"multiple",this.options.multiple),"undefined"!=typeof i?(this.$element.data("ParsleyFieldMultiple",n),n):(this.$element.data("Parsley",n),n._actualizeTriggers(),n._trigger("init"),n)}};var M=e.fn.jquery.split(".");if(parseInt(M[0])<=1&&parseInt(M[1])<8)throw"The loaded version of jQuery is too old. Please upgrade to 1.8.x or better.";M.forEach||o.warn("Parsley requires ES5 to run properly. Please include https://github.com/es-shims/es5-shim");var O=e.extend(new u,{$element:e(document),actualizeOptions:null,_resetOptions:null,Factory:V,version:"2.4.3"});e.extend(E.prototype,y.Field,u.prototype),e.extend(w.prototype,y.Form,u.prototype),e.extend(V.prototype,u.prototype),e.fn.parsley=e.fn.psly=function(t){if(this.length>1){var i=[];return this.each(function(){i.push(e(this).parsley(t))}),i}return e(this).length?new V(this,t):void o.warn("You must bind Parsley on an existing element.")},"undefined"==typeof window.ParsleyExtend&&(window.ParsleyExtend={}),O.options=e.extend(o.objectCreate(l),window.ParsleyConfig),window.ParsleyConfig=O.options,window.Parsley=window.psly=O,window.ParsleyUtils=o;var A=window.Parsley._validatorRegistry=new m(window.ParsleyConfig.validators,window.ParsleyConfig.i18n);window.ParsleyValidator={},e.each("setLocale addCatalog addMessage addMessages getErrorMessage formatMessage addValidator updateValidator removeValidator".split(" "),function(t,i){window.Parsley[i]=e.proxy(A,i),window.ParsleyValidator[i]=function(){var e;return o.warnOnce("Accessing the method '"+i+"' through ParsleyValidator is deprecated. Simply call 'window.Parsley."+i+"(...)'"),(e=window.Parsley)[i].apply(e,arguments)}}),window.Parsley.UI=y,window.ParsleyUI={removeError:function(e,t,i){var n=!0!==i;return o.warnOnce("Accessing ParsleyUI is deprecated. Call 'removeError' on the instance directly. Please comment in issue 1073 as to your need to call this method."),e.removeError(t,{updateClass:n})},getErrorsMessages:function(e){return o.warnOnce("Accessing ParsleyUI is deprecated. Call 'getErrorsMessages' on the instance directly."),e.getErrorsMessages()}},e.each("addError updateError".split(" "),function(e,t){window.ParsleyUI[t]=function(e,i,n,r,s){var a=!0!==s;return o.warnOnce("Accessing ParsleyUI is deprecated. Call '"+t+"' on the instance directly. Please comment in issue 1073 as to your need to call this method."),e[t](i,{message:n,assert:r,updateClass:a})}}),!1!==window.ParsleyConfig.autoBind&&e(function(){e("[data-parsley-validate]").length&&e("[data-parsley-validate]").parsley()});var R=e({}),T=function(){o.warnOnce("Parsley's pubsub module is deprecated; use the 'on' and 'off' methods on parsley instances or window.Parsley")},q="parsley:";e.listen=function(e,n){var r;if(T(),"object"==typeof arguments[1]&&"function"==typeof arguments[2]&&(r=arguments[1],n=arguments[2]),"function"!=typeof n)throw new Error("Wrong parameters");window.Parsley.on(i(e),t(n,r))},e.listenTo=function(e,n,r){if(T(),!(e instanceof E||e instanceof w))throw new Error("Must give Parsley instance");if("string"!=typeof n||"function"!=typeof r)throw new Error("Wrong parameters");e.on(i(n),t(r))},e.unsubscribe=function(e,t){if(T(),"string"!=typeof e||"function"!=typeof t)throw new Error("Wrong arguments");window.Parsley.off(i(e),t.parsleyAdaptedCallback)},e.unsubscribeTo=function(e,t){if(T(),!(e instanceof E||e instanceof w))throw new Error("Must give Parsley instance");e.off(i(t))},e.unsubscribeAll=function(t){T(),window.Parsley.off(i(t)),e("form,input,textarea,select").each(function(){var n=e(this).data("Parsley");n&&n.off(i(t))})},e.emit=function(e,t){var n;T();var r=t instanceof E||t instanceof w,s=Array.prototype.slice.call(arguments,r?2:1);s.unshift(i(e)),r||(t=window.Parsley),(n=t).trigger.apply(n,_toConsumableArray(s))};e.extend(!0,O,{asyncValidators:{"default":{fn:function(e){return e.status>=200&&e.status<300},url:!1},reverse:{fn:function(e){return e.status<200||e.status>=300},url:!1}},addAsyncValidator:function(e,t,i,n){return O.asyncValidators[e]={fn:t,url:i||!1,options:n||{}},this}}),O.addValidator("remote",{requirementType:{"":"string",validator:"string",reverse:"boolean",options:"object"},validateString:function(t,i,n,r){var s,a,o={},l=n.validator||(!0===n.reverse?"reverse":"default");if("undefined"==typeof O.asyncValidators[l])throw new Error("Calling an undefined async validator: `"+l+"`");i=O.asyncValidators[l].url||i,i.indexOf("{value}")>-1?i=i.replace("{value}",encodeURIComponent(t)):o[r.$element.attr("name")||r.$element.attr("id")]=t;var u=e.extend(!0,n.options||{},O.asyncValidators[l].options);s=e.extend(!0,{},{url:i,data:o,type:"GET"},u),r.trigger("field:ajaxoptions",r,s),a=e.param(s),"undefined"==typeof O._remoteCache&&(O._remoteCache={});var d=O._remoteCache[a]=O._remoteCache[a]||e.ajax(s),h=function(){var t=O.asyncValidators[l].fn.call(r,d,i,n);return t||(t=e.Deferred().reject()),e.when(t)};return d.then(h,h)},priority:-1}),O.on("form:submit",function(){O._remoteCache={}}),window.ParsleyExtend.addAsyncValidator=function(){return ParsleyUtils.warnOnce("Accessing the method `addAsyncValidator` through an instance is deprecated. Simply call `Parsley.addAsyncValidator(...)`"),O.addAsyncValidator.apply(O,arguments)},O.addMessages("en",{defaultMessage:"This value seems to be invalid.",type:{email:"This value should be a valid email.",url:"This value should be a valid url.",number:"This value should be a valid number.",integer:"This value should be a valid integer.",digits:"This value should be digits.",alphanum:"This value should be alphanumeric."},notblank:"This value should not be blank.",required:"This value is required.",pattern:"This value seems to be invalid.",min:"This value should be greater than or equal to %s.",max:"This value should be lower than or equal to %s.",range:"This value should be between %s and %s.",minlength:"This value is too short. It should have %s characters or more.",maxlength:"This value is too long. It should have %s characters or fewer.",length:"This value length is invalid. It should be between %s and %s characters long.",mincheck:"You must select at least %s choices.",maxcheck:"You must select %s choices or fewer.",check:"You must select between %s and %s choices.",equalto:"This value should be the same."}),O.setLocale("en");var D=new n;D.install();var I=O;return I});


/*!
 * Bootstrap v3.3.5 (http://getbootstrap.com)
 * Copyright 2011-2015 Twitter, Inc.
 * Licensed under the MIT license
 */
if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher")}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){return a(b.target).is(this)?b.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.3.5",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed.bs.alert").remove()}var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a(f);b&&b.preventDefault(),g.length||(g=e.closest(".alert")),g.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(g.removeClass("in"),a.support.transition&&g.hasClass("fade")?g.one("bsTransitionEnd",c).emulateTransitionEnd(d.TRANSITION_DURATION):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.3.5",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")?(c.prop("checked")&&(a=!1),b.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==c.prop("type")&&(c.prop("checked")!==this.$element.hasClass("active")&&(a=!1),this.$element.toggleClass("active")),c.prop("checked",this.$element.hasClass("active")),a&&c.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target);d.hasClass("btn")||(d=d.closest(".btn")),b.call(d,"toggle"),a(c.target).is('input[type="radio"]')||a(c.target).is('input[type="checkbox"]')||c.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",a.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.3.5",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(a){if(!/input|textarea/i.test(a.target.tagName)){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()}},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.getItemForDirection=function(a,b){var c=this.getItemIndex(b),d="prev"==a&&0===c||"next"==a&&c==this.$items.length-1;if(d&&!this.options.wrap)return b;var e="prev"==a?-1:1,f=(c+e)%this.$items.length;return this.$items.eq(f)},c.prototype.to=function(a){var b=this,c=this.getItemIndex(this.$active=this.$element.find(".item.active"));return a>this.$items.length-1||0>a?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){b.to(a)}):c==a?this.pause().cycle():this.slide(a>c?"next":"prev",this.$items.eq(a))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){return this.sliding?void 0:this.slide("next")},c.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},c.prototype.slide=function(b,d){var e=this.$element.find(".item.active"),f=d||this.getItemForDirection(b,e),g=this.interval,h="next"==b?"left":"right",i=this;if(f.hasClass("active"))return this.sliding=!1;var j=f[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:h});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,g&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(f)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:h});return a.support.transition&&this.$element.hasClass("slide")?(f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),e.one("bsTransitionEnd",function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger(m)),g&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this};var e=function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}};a(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){var c,d=b.attr("data-target")||(c=b.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"");return a(d)}function c(b){return this.each(function(){var c=a(this),e=c.data("bs.collapse"),f=a.extend({},d.DEFAULTS,c.data(),"object"==typeof b&&b);!e&&f.toggle&&/show|hide/.test(b)&&(f.toggle=!1),e||c.data("bs.collapse",e=new d(this,f)),"string"==typeof b&&e[b]()})}var d=function(b,c){this.$element=a(b),this.options=a.extend({},d.DEFAULTS,c),this.$trigger=a('[data-toggle="collapse"][href="#'+b.id+'"],[data-toggle="collapse"][data-target="#'+b.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};d.VERSION="3.3.5",d.TRANSITION_DURATION=350,d.DEFAULTS={toggle:!0},d.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},d.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(b=e.data("bs.collapse"),b&&b.transitioning))){var f=a.Event("show.bs.collapse");if(this.$element.trigger(f),!f.isDefaultPrevented()){e&&e.length&&(c.call(e,"hide"),b||e.data("bs.collapse",null));var g=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var h=function(){this.$element.removeClass("collapsing").addClass("collapse in")[g](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return h.call(this);var i=a.camelCase(["scroll",g].join("-"));this.$element.one("bsTransitionEnd",a.proxy(h,this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])}}}},d.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var e=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(e,this)).emulateTransitionEnd(d.TRANSITION_DURATION):e.call(this)}}},d.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},d.prototype.getParent=function(){return a(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(c,d){var e=a(d);this.addAriaAndCollapsedClass(b(e),e)},this)).end()},d.prototype.addAriaAndCollapsedClass=function(a,b){var c=a.hasClass("in");a.attr("aria-expanded",c),b.toggleClass("collapsed",!c).attr("aria-expanded",c)};var e=a.fn.collapse;a.fn.collapse=c,a.fn.collapse.Constructor=d,a.fn.collapse.noConflict=function(){return a.fn.collapse=e,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(d){var e=a(this);e.attr("data-target")||d.preventDefault();var f=b(e),g=f.data("bs.collapse"),h=g?"toggle":e.data();c.call(f,h)})}(jQuery),+function(a){"use strict";function b(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function c(c){c&&3===c.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=b(d),f={relatedTarget:this};e.hasClass("open")&&(c&&"click"==c.type&&/input|textarea/i.test(c.target.tagName)&&a.contains(e[0],c.target)||(e.trigger(c=a.Event("hide.bs.dropdown",f)),c.isDefaultPrevented()||(d.attr("aria-expanded","false"),e.removeClass("open").trigger("hidden.bs.dropdown",f))))}))}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.3.5",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=b(e),g=f.hasClass("open");if(c(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(a(this)).on("click",c);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),f.toggleClass("open").trigger("shown.bs.dropdown",h)}return!1}},g.prototype.keydown=function(c){if(/(38|40|27|32)/.test(c.which)&&!/input|textarea/i.test(c.target.tagName)){var d=a(this);if(c.preventDefault(),c.stopPropagation(),!d.is(".disabled, :disabled")){var e=b(d),g=e.hasClass("open");if(!g&&27!=c.which||g&&27==c.which)return 27==c.which&&e.find(f).trigger("focus"),d.trigger("click");var h=" li:not(.disabled):visible a",i=e.find(".dropdown-menu"+h);if(i.length){var j=i.index(c.target);38==c.which&&j>0&&j--,40==c.which&&j<i.length-1&&j++,~j||(j=0),i.eq(j).trigger("focus")}}}};var h=a.fn.dropdown;a.fn.dropdown=d,a.fn.dropdown.Constructor=g,a.fn.dropdown.noConflict=function(){return a.fn.dropdown=h,this},a(document).on("click.bs.dropdown.data-api",c).on("click.bs.dropdown.data-api",".dropdown form",function(a){a.stopPropagation()}).on("click.bs.dropdown.data-api",f,g.prototype.toggle).on("keydown.bs.dropdown.data-api",f,g.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",g.prototype.keydown)}(jQuery),+function(a){"use strict";function b(b,d){return this.each(function(){var e=a(this),f=e.data("bs.modal"),g=a.extend({},c.DEFAULTS,e.data(),"object"==typeof b&&b);f||e.data("bs.modal",f=new c(this,g)),"string"==typeof b?f[b](d):g.show&&f.show(d)})}var c=function(b,c){this.options=c,this.$body=a(document.body),this.$element=a(b),this.$dialog=this.$element.find(".modal-dialog"),this.$backdrop=null,this.isShown=null,this.originalBodyPad=null,this.scrollbarWidth=0,this.ignoreBackdropClick=!1,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,a.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};c.VERSION="3.3.5",c.TRANSITION_DURATION=300,c.BACKDROP_TRANSITION_DURATION=150,c.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},c.prototype.toggle=function(a){return this.isShown?this.hide():this.show(a)},c.prototype.show=function(b){var d=this,e=a.Event("show.bs.modal",{relatedTarget:b});this.$element.trigger(e),this.isShown||e.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',a.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",function(){d.$element.one("mouseup.dismiss.bs.modal",function(b){a(b.target).is(d.$element)&&(d.ignoreBackdropClick=!0)})}),this.backdrop(function(){var e=a.support.transition&&d.$element.hasClass("fade");d.$element.parent().length||d.$element.appendTo(d.$body),d.$element.show().scrollTop(0),d.adjustDialog(),e&&d.$element[0].offsetWidth,d.$element.addClass("in"),d.enforceFocus();var f=a.Event("shown.bs.modal",{relatedTarget:b});e?d.$dialog.one("bsTransitionEnd",function(){d.$element.trigger("focus").trigger(f)}).emulateTransitionEnd(c.TRANSITION_DURATION):d.$element.trigger("focus").trigger(f)}))},c.prototype.hide=function(b){b&&b.preventDefault(),b=a.Event("hide.bs.modal"),this.$element.trigger(b),this.isShown&&!b.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),a(document).off("focusin.bs.modal"),this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),a.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",a.proxy(this.hideModal,this)).emulateTransitionEnd(c.TRANSITION_DURATION):this.hideModal())},c.prototype.enforceFocus=function(){a(document).off("focusin.bs.modal").on("focusin.bs.modal",a.proxy(function(a){this.$element[0]===a.target||this.$element.has(a.target).length||this.$element.trigger("focus")},this))},c.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",a.proxy(function(a){27==a.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},c.prototype.resize=function(){this.isShown?a(window).on("resize.bs.modal",a.proxy(this.handleUpdate,this)):a(window).off("resize.bs.modal")},c.prototype.hideModal=function(){var a=this;this.$element.hide(),this.backdrop(function(){a.$body.removeClass("modal-open"),a.resetAdjustments(),a.resetScrollbar(),a.$element.trigger("hidden.bs.modal")})},c.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},c.prototype.backdrop=function(b){var d=this,e=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var f=a.support.transition&&e;if(this.$backdrop=a(document.createElement("div")).addClass("modal-backdrop "+e).appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",a.proxy(function(a){return this.ignoreBackdropClick?void(this.ignoreBackdropClick=!1):void(a.target===a.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide()))},this)),f&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!b)return;f?this.$backdrop.one("bsTransitionEnd",b).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):b()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var g=function(){d.removeBackdrop(),b&&b()};a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",g).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):g()}else b&&b()},c.prototype.handleUpdate=function(){this.adjustDialog()},c.prototype.adjustDialog=function(){var a=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&a?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!a?this.scrollbarWidth:""})},c.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},c.prototype.checkScrollbar=function(){var a=window.innerWidth;if(!a){var b=document.documentElement.getBoundingClientRect();a=b.right-Math.abs(b.left)}this.bodyIsOverflowing=document.body.clientWidth<a,this.scrollbarWidth=this.measureScrollbar()},c.prototype.setScrollbar=function(){var a=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"",this.bodyIsOverflowing&&this.$body.css("padding-right",a+this.scrollbarWidth)},c.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad)},c.prototype.measureScrollbar=function(){var a=document.createElement("div");a.className="modal-scrollbar-measure",this.$body.append(a);var b=a.offsetWidth-a.clientWidth;return this.$body[0].removeChild(a),b};var d=a.fn.modal;a.fn.modal=b,a.fn.modal.Constructor=c,a.fn.modal.noConflict=function(){return a.fn.modal=d,this},a(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(c){var d=a(this),e=d.attr("href"),f=a(d.attr("data-target")||e&&e.replace(/.*(?=#[^\s]+$)/,"")),g=f.data("bs.modal")?"toggle":a.extend({remote:!/#/.test(e)&&e},f.data(),d.data());d.is("a")&&c.preventDefault(),f.one("show.bs.modal",function(a){a.isDefaultPrevented()||f.one("hidden.bs.modal",function(){d.is(":visible")&&d.trigger("focus")})}),b.call(f,g,this)})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tooltip"),f="object"==typeof b&&b;(e||!/destroy|hide/.test(b))&&(e||d.data("bs.tooltip",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.inState=null,this.init("tooltip",a,b)};c.VERSION="3.3.5",c.TRANSITION_DURATION=150,c.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},c.prototype.init=function(b,c,d){if(this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(a.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusin"==b.type?"focus":"hover"]=!0),c.tip().hasClass("in")||"in"==c.hoverState?void(c.hoverState="in"):(clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show())},c.prototype.isInStateTrue=function(){for(var a in this.inState)if(this.inState[a])return!0;return!1},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusout"==b.type?"focus":"hover"]=!1),c.isInStateTrue()?void 0:(clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide())},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var d=a.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!d)return;var e=this,f=this.tip(),g=this.getUID(this.type);this.setContent(),f.attr("id",g),this.$element.attr("aria-describedby",g),this.options.animation&&f.addClass("fade");var h="function"==typeof this.options.placement?this.options.placement.call(this,f[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,j=i.test(h);j&&(h=h.replace(i,"")||"top"),f.detach().css({top:0,left:0,display:"block"}).addClass(h).data("bs."+this.type,this),this.options.container?f.appendTo(this.options.container):f.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var k=this.getPosition(),l=f[0].offsetWidth,m=f[0].offsetHeight;if(j){var n=h,o=this.getPosition(this.$viewport);h="bottom"==h&&k.bottom+m>o.bottom?"top":"top"==h&&k.top-m<o.top?"bottom":"right"==h&&k.right+l>o.width?"left":"left"==h&&k.left-l<o.left?"right":h,f.removeClass(n).addClass(h)}var p=this.getCalculatedOffset(h,k,l,m);this.applyPlacement(p,h);var q=function(){var a=e.hoverState;e.$element.trigger("shown.bs."+e.type),e.hoverState=null,"out"==a&&e.leave(e)};a.support.transition&&this.$tip.hasClass("fade")?f.one("bsTransitionEnd",q).emulateTransitionEnd(c.TRANSITION_DURATION):q()}},c.prototype.applyPlacement=function(b,c){var d=this.tip(),e=d[0].offsetWidth,f=d[0].offsetHeight,g=parseInt(d.css("margin-top"),10),h=parseInt(d.css("margin-left"),10);isNaN(g)&&(g=0),isNaN(h)&&(h=0),b.top+=g,b.left+=h,a.offset.setOffset(d[0],a.extend({using:function(a){d.css({top:Math.round(a.top),left:Math.round(a.left)})}},b),0),d.addClass("in");var i=d[0].offsetWidth,j=d[0].offsetHeight;"top"==c&&j!=f&&(b.top=b.top+f-j);var k=this.getViewportAdjustedDelta(c,b,i,j);k.left?b.left+=k.left:b.top+=k.top;var l=/top|bottom/.test(c),m=l?2*k.left-e+i:2*k.top-f+j,n=l?"offsetWidth":"offsetHeight";d.offset(b),this.replaceArrow(m,d[0][n],l)},c.prototype.replaceArrow=function(a,b,c){this.arrow().css(c?"left":"top",50*(1-a/b)+"%").css(c?"top":"left","")},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle();a.find(".tooltip-inner")[this.options.html?"html":"text"](b),a.removeClass("fade in top bottom left right")},c.prototype.hide=function(b){function d(){"in"!=e.hoverState&&f.detach(),e.$element.removeAttr("aria-describedby").trigger("hidden.bs."+e.type),b&&b()}var e=this,f=a(this.$tip),g=a.Event("hide.bs."+this.type);return this.$element.trigger(g),g.isDefaultPrevented()?void 0:(f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one("bsTransitionEnd",d).emulateTransitionEnd(c.TRANSITION_DURATION):d(),this.hoverState=null,this)},c.prototype.fixTitle=function(){var a=this.$element;(a.attr("title")||"string"!=typeof a.attr("data-original-title"))&&a.attr("data-original-title",a.attr("title")||"").attr("title","")},c.prototype.hasContent=function(){return this.getTitle()},c.prototype.getPosition=function(b){b=b||this.$element;var c=b[0],d="BODY"==c.tagName,e=c.getBoundingClientRect();null==e.width&&(e=a.extend({},e,{width:e.right-e.left,height:e.bottom-e.top}));var f=d?{top:0,left:0}:b.offset(),g={scroll:d?document.documentElement.scrollTop||document.body.scrollTop:b.scrollTop()},h=d?{width:a(window).width(),height:a(window).height()}:null;return a.extend({},e,g,h,f)},c.prototype.getCalculatedOffset=function(a,b,c,d){return"bottom"==a?{top:b.top+b.height,left:b.left+b.width/2-c/2}:"top"==a?{top:b.top-d,left:b.left+b.width/2-c/2}:"left"==a?{top:b.top+b.height/2-d/2,left:b.left-c}:{top:b.top+b.height/2-d/2,left:b.left+b.width}},c.prototype.getViewportAdjustedDelta=function(a,b,c,d){var e={top:0,left:0};if(!this.$viewport)return e;var f=this.options.viewport&&this.options.viewport.padding||0,g=this.getPosition(this.$viewport);if(/right|left/.test(a)){var h=b.top-f-g.scroll,i=b.top+f-g.scroll+d;h<g.top?e.top=g.top-h:i>g.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;j<g.left?e.left=g.left-j:k>g.right&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){if(!this.$tip&&(this.$tip=a(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),b?(c.inState.click=!c.inState.click,c.isInStateTrue()?c.enter(c):c.leave(c)):c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){var a=this;clearTimeout(this.timeout),this.hide(function(){a.$element.off("."+a.type).removeData("bs."+a.type),a.$tip&&a.$tip.detach(),a.$tip=null,a.$arrow=null,a.$viewport=null})};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b;(e||!/destroy|hide/.test(b))&&(e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.3.5",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict";function b(c,d){this.$body=a(document.body),this.$scrollElement=a(a(c).is(document.body)?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",a.proxy(this.process,this)),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.3.5",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b=this,c="offset",d=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),a.isWindow(this.$scrollElement[0])||(c="position",d=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var b=a(this),e=b.data("target")||b.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[c]().top+d,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){b.offsets.push(this[0]),b.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b<e[0])return this.activeTarget=null,this.clear();for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(void 0===e[a+1]||b<e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,this.clear();var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),
d.trigger("activate.bs.scrollspy")},b.prototype.clear=function(){a(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var d=a.fn.scrollspy;a.fn.scrollspy=c,a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=d,this},a(window).on("load.bs.scrollspy.data-api",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);c.call(b,b.data())})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new c(this)),"string"==typeof b&&e[b]()})}var c=function(b){this.element=a(b)};c.VERSION="3.3.5",c.TRANSITION_DURATION=150,c.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a"),f=a.Event("hide.bs.tab",{relatedTarget:b[0]}),g=a.Event("show.bs.tab",{relatedTarget:e[0]});if(e.trigger(f),b.trigger(g),!g.isDefaultPrevented()&&!f.isDefaultPrevented()){var h=a(d);this.activate(b.closest("li"),c),this.activate(h,h.parent(),function(){e.trigger({type:"hidden.bs.tab",relatedTarget:b[0]}),b.trigger({type:"shown.bs.tab",relatedTarget:e[0]})})}}},c.prototype.activate=function(b,d,e){function f(){g.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu").length&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.5",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return c>e?"top":!1;if("bottom"==this.affixed)return null!=c?e+this.unpin<=f.top?!1:"bottom":a-d>=e+g?!1:"bottom";var h=null==this.affixed,i=h?e:f.top,j=h?g:b;return null!=c&&c>=e?"top":null!=d&&i+j>=a-d?"bottom":!1},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=Math.max(a(document).height(),a(document.body).height());"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affixed=h,this.unpin="bottom"==h?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix","affixed")+".bs.affix")}"bottom"==h&&this.$element.offset({top:g-b-f})}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},null!=d.offsetBottom&&(d.offset.bottom=d.offsetBottom),null!=d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery);
/**
 * math.js
 * https://github.com/josdejong/mathjs
 *
 * Math.js is an extensive math library for JavaScript and Node.js,
 * It features real and complex numbers, units, matrices, a large set of
 * mathematical functions, and a flexible expression parser.
 *
 * @version 0.27.0
 * @date    2014-08-21
 *
 * @license
 * Copyright (C) 2013-2014 Jos de Jong <wjosdejong@gmail.com>
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy
 * of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */
!function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r():"function"==typeof define&&define.amd?define(r):"object"==typeof exports?exports.math=r():e.math=r()}(this,function(){return function(e){function r(t){if(n[t])return n[t].exports;var i=n[t]={exports:{},id:t,loaded:!1};return e[t].call(i.exports,i,i.exports,r),i.loaded=!0,i.exports}var n={};return r.m=e,r.c=n,r.p="",r(0)}([function(e,r,n){e.exports=n(1)},function(e,r,n){"use strict";function t(e){if("function"!=typeof Object.create)throw new Error("ES5 not supported by this JavaScript engine. Please load the es5-shim and es5-sham library for compatibility.");var r={},a={matrix:"matrix",number:"number",precision:64,epsilon:1e-14};r.config=function(e){if(e){if(i.deepExtend(a,e),e.precision&&r.type.BigNumber.config({precision:e.precision}),n(2)(r,a),e.number&&e.number.defaultType)throw new Error("setting `number.defaultType` is deprecated. Use `number` instead.");if(e.number&&e.number.precision)throw new Error("setting `number.precision` is deprecated. Use `precision` instead.");if(e.matrix&&e.matrix.defaultType)throw new Error("setting `matrix.defaultType` is deprecated. Use `matrix` instead.");if(e.matrix&&e.matrix["default"])throw new Error("setting `matrix.default` is deprecated. Use `matrix` instead.");if(e.decimals)throw new Error("setting `decimals` is deprecated. Use `precision` instead.")}return i.clone(a)},r.create=t;var s=n(142).constructor();if("function"!=typeof s.prototype.clone&&(s.prototype.clone=function(){return new s(this)}),"function"==typeof s.convert)throw new Error("Cannot add function convert to BigNumber: function already exists");return s.convert=function(e){return o(e)>15?e:new s(e)},r.error=n(5),r.type={},r.type.Complex=n(6),r.type.Range=n(7),r.type.Index=n(8),r.type.Matrix=n(9),r.type.Unit=n(10),r.type.Help=n(11),r.type.ResultSet=n(12),r.type.BigNumber=s,r.collection=n(13),r.expression={},r.expression.node=n(16),r.expression.parse=n(14),r.expression.Parser=n(15),r.expression.docs=n(17),n(28)(r,a),n(29)(r,a),n(30)(r,a),n(31)(r,a),n(32)(r,a),n(33)(r,a),n(34)(r,a),n(35)(r,a),n(36)(r,a),n(37)(r,a),n(38)(r,a),n(39)(r,a),n(40)(r,a),n(41)(r,a),n(42)(r,a),n(43)(r,a),n(44)(r,a),n(45)(r,a),n(46)(r,a),n(47)(r,a),n(48)(r,a),n(49)(r,a),n(50)(r,a),n(51)(r,a),n(52)(r,a),n(53)(r,a),n(54)(r,a),n(55)(r,a),n(56)(r,a),n(57)(r,a),n(58)(r,a),n(59)(r,a),n(60)(r,a),n(61)(r,a),n(62)(r,a),n(63)(r,a),n(64)(r,a),n(65)(r,a),n(66)(r,a),n(67)(r,a),n(68)(r,a),n(69)(r,a),n(70)(r,a),n(71)(r,a),n(72)(r,a),n(73)(r,a),n(74)(r,a),n(75)(r,a),n(76)(r,a),n(77)(r,a),n(78)(r,a),n(79)(r,a),n(80)(r,a),n(81)(r,a),n(82)(r,a),n(83)(r,a),n(84)(r,a),n(85)(r,a),n(86)(r,a),n(87)(r,a),n(88)(r,a),n(89)(r,a),n(90)(r,a),n(91)(r,a),n(92)(r,a),n(93)(r,a),n(94)(r,a),n(95)(r,a),n(96)(r,a),n(97)(r,a),n(98)(r,a),n(99)(r,a),n(100)(r,a),n(101)(r,a),n(102)(r,a),n(103)(r,a),n(104)(r,a),n(105)(r,a),n(106)(r,a),n(107)(r,a),n(108)(r,a),n(109)(r,a),n(110)(r,a),n(111)(r,a),n(112)(r,a),n(113)(r,a),n(114)(r,a),n(115)(r,a),n(116)(r,a),n(117)(r,a),n(118)(r,a),n(119)(r,a),n(120)(r,a),n(121)(r,a),n(122)(r,a),n(123)(r,a),n(124)(r,a),n(125)(r,a),n(126)(r,a),n(127)(r,a),n(128)(r,a),n(129)(r,a),n(130)(r,a),n(131)(r,a),n(132)(r,a),n(133)(r,a),n(134)(r,a),r.ifElse=function(){throw new Error("Function ifElse is deprecated. Use the conditional operator instead.")},n(2)(r,a),n(18)(r,a),n(19)(r,a),n(20)(r,a),n(21)(r,a),n(22)(r,a),n(23)(r,a),n(24)(r,a),n(25)(r,a),n(26)(r,a),r.chaining={},r.chaining.Selector=n(27)(r,a),r.config(a),r.config(e),r}var i=n(3),o=n(4).digits,a=t();"undefined"!=typeof window&&(window.mathjs=a),e.exports=a},function(e,r,n){"use strict";e.exports=function(e,r){function t(){return new f(1).exp()}function i(){return new f(1).plus(new f(5).sqrt()).div(2)}function o(e){for(var r=e,n=0/0,t=e.times(e),i=e,o=-1,a=3;!r.equals(n);a+=2)i=i.times(t),n=r,r=o>0?r.plus(i.div(a)):r.minus(i.div(a)),o=-o;return r}function a(){var e=f.constructor({precision:f.precision+4}),r=new e(4).times(o(new e(1).div(5))).minus(o(new e(1).div(239)));return new f(4).times(r)}function s(){f.config({precision:r.precision+2});var e=a();return f.config({precision:r.precision}),new f(2).times(e)}var u=(n(135),n(6)),f=e.type.BigNumber,c="bignumber"===r.number;e.pi=c?a():Math.PI,e.tau=c?s():2*Math.PI,e.e=c?t():Math.E,e.phi=c?i():1.618033988749895,e.i=new u(0,1),e.Infinity=1/0,e.NaN=0/0,e["true"]=!0,e["false"]=!1,e["null"]=null,e.uninitialized=n(136).UNINITIALIZED,e.E=e.e,e.LN2=c?new f(2).ln():Math.LN2,e.LN10=c?new f(10).ln():Math.LN10,e.LOG2E=c?new f(1).div(new f(2).ln()):Math.LOG2E,e.LOG10E=c?new f(1).div(new f(10).ln()):Math.LOG10E,e.PI=e.pi,e.SQRT1_2=c?new f(.5).sqrt():Math.SQRT1_2,e.SQRT2=c?new f(2).sqrt():Math.SQRT2,e.version=n(137)}},function(e,r){"use strict";r.clone=function n(e){var r=typeof e;if("number"===r||"string"===r||"boolean"===r||null===e||void 0===e)return e;if("function"==typeof e.clone)return e.clone();if(Array.isArray(e))return e.map(function(e){return n(e)});if(e instanceof Number)return new Number(e.valueOf());if(e instanceof String)return new String(e.valueOf());if(e instanceof Boolean)return new Boolean(e.valueOf());if(e instanceof Date)return new Date(e.valueOf());if(e instanceof RegExp)throw new TypeError("Cannot clone "+e);var t={};for(var i in e)e.hasOwnProperty(i)&&(t[i]=n(e[i]));return t},r.extend=function(e,r){for(var n in r)r.hasOwnProperty(n)&&(e[n]=r[n]);return e},r.deepExtend=function t(e,r){if(Array.isArray(r))throw new TypeError("Arrays are not supported by deepExtend");for(var n in r)if(r.hasOwnProperty(n))if(r[n]&&r[n].constructor===Object)void 0===e[n]&&(e[n]={}),e[n].constructor===Object?t(e[n],r[n]):e[n]=r[n];else{if(Array.isArray(r[n]))throw new TypeError("Arrays are not supported by deepExtend");e[n]=r[n]}return e},r.deepEqual=function(e,n){var t,i,o;if(Array.isArray(e)){if(!Array.isArray(n))return!1;if(e.length!=n.length)return!1;for(i=0,o=e.length;o>i;i++)if(!r.deepEqual(e[i],n[i]))return!1;return!0}if(e instanceof Object){if(Array.isArray(n)||!(n instanceof Object))return!1;for(t in e)if(!r.deepEqual(e[t],n[t]))return!1;for(t in n)if(!r.deepEqual(e[t],n[t]))return!1;return!0}return typeof e==typeof n&&e==n}},function(e,r){"use strict";r.isNumber=function(e){return e instanceof Number||"number"==typeof e},r.isInteger=function(e){return e==Math.round(e)},r.sign=function(e){return e>0?1:0>e?-1:0},r.format=function(e,n){if("function"==typeof n)return n(e);if(1/0===e)return"Infinity";if(e===-1/0)return"-Infinity";if(isNaN(e))return"NaN";var t="auto",i=void 0;switch(n&&(n.notation&&(t=n.notation),r.isNumber(n)?i=n:n.precision&&(i=n.precision)),t){case"fixed":return r.toFixed(e,i);case"exponential":return r.toExponential(e,i);case"auto":var o=.001,a=1e5;if(n&&n.exponential&&(void 0!==n.exponential.lower&&(o=n.exponential.lower),void 0!==n.exponential.upper&&(a=n.exponential.upper)),0===e)return"0";var s,u=Math.abs(e);if(u>=o&&a>u){var f=i?e.toPrecision(Math.min(i,21)):e.toPrecision();s=parseFloat(f)+""}else s=r.toExponential(e,i);return s.replace(/((\.\d*?)(0+))($|e)/,function(){var e=arguments[2],r=arguments[4];return"."!==e?e+r:r});default:throw new Error('Unknown notation "'+t+'". Choose "auto", "exponential", or "fixed".')}},r.toExponential=function(e,r){return void 0!==r?e.toExponential(Math.min(r-1,20)):e.toExponential()},r.toFixed=function(e,r){return e.toFixed(Math.min(r,20))},r.digits=function(e){return e.toExponential().replace(/e.*$/,"").replace(/^0\.?0*|\./,"").length},r.DBL_EPSILON=Number.EPSILON||2.220446049250313e-16,r.nearlyEqual=function(e,n,t){if(null==t)return e==n;if(e==n)return!0;if(isNaN(e)||isNaN(n))return!1;if(isFinite(e)&&isFinite(n)){var i=Math.abs(e-n);return i<r.DBL_EPSILON?!0:i<=Math.max(Math.abs(e),Math.abs(n))*t}return!1}},function(e,r,n){"use strict";r.ArgumentsError=n(138),r.DimensionError=n(139),r.IndexError=n(140),r.UnsupportedTypeError=n(141)},function(e,r,n){"use strict";function t(e,r){if(!(this instanceof t))throw new SyntaxError("Constructor must be called with the new operator");switch(arguments.length){case 0:this.re=0,this.im=0;break;case 1:var n=arguments[0];if("object"==typeof n){if("re"in n&&"im"in n){var i=new t(n.re,n.im);this.re=i.re,this.im=i.im;break}if("r"in n&&"phi"in n){var i=t.fromPolar(n.r,n.phi);this.re=i.re,this.im=i.im;break}}throw new SyntaxError("Object with the re and im or r and phi properties expected.");case 2:if(!h(e)||!h(r))throw new TypeError("Two numbers expected in Complex constructor");this.re=e,this.im=r;break;default:throw new SyntaxError("One, two or three arguments expected in Complex constructor")}}function i(){for(;" "==w||"	"==w;)s()}function o(e){return e>="0"&&"9">=e||"."==e}function a(e){return e>="0"&&"9">=e}function s(){y++,w=x.charAt(y)}function u(e){y=e,w=x.charAt(y)}function f(){var e,r="";if(e=y,"+"==w?s():"-"==w&&(r+=w,s()),!o(w))return u(e),null;if("."==w){if(r+=w,s(),!a(w))return u(e),null}else{for(;a(w);)r+=w,s();"."==w&&(r+=w,s())}for(;a(w);)r+=w,s();if("E"==w||"e"==w){if(r+=w,s(),("+"==w||"-"==w)&&(r+=w,s()),!a(w))return u(e),null;for(;a(w);)r+=w,s()}return r}function c(){var e=x.charAt(y+1);if("I"==w||"i"==w)return s(),"1";if(!("+"!=w&&"-"!=w||"I"!=e&&"i"!=e)){var r="+"==w?"1":"-1";return s(),s(),r}return null}var l=n(143),p=n(10),m=l.number,h=l.number.isNumber,g=p.isUnit,d=l.string.isString;t.isComplex=function(e){return e instanceof t};var x,y,w;t.parse=function(e){if(x=e,y=-1,w="",!d(x))return null;s(),i();var r=f();if(r){if("I"==w||"i"==w)return s(),i(),w?null:new t(0,Number(r));i();var n=w;if("+"!=n&&"-"!=n)return i(),w?null:new t(Number(r),0);s(),i();var o=f();if(o){if("I"!=w&&"i"!=w)return null;s()}else if(o=c(),!o)return null;return"-"==n&&(o="-"==o[0]?"+"+o.substring(1):"-"+o),s(),i(),w?null:new t(Number(r),Number(o))}return(r=c())?(i(),w?null:new t(0,Number(r))):null},t.fromPolar=function(){switch(arguments.length){case 1:var e=arguments[0];if("object"==typeof e)return t.fromPolar(e.r,e.phi);throw new TypeError("Input has to be an object with r and phi keys.");case 2:var r=arguments[0],n=arguments[1];if(h(r)){if(g(n)&&n.hasBase(p.BASE_UNITS.ANGLE)&&(n=n.toNumber("rad")),h(n))return new t(r*Math.cos(n),r*Math.sin(n));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")}},t.prototype.toPolar=function(){return{r:Math.sqrt(this.re*this.re+this.im*this.im),phi:Math.atan2(this.im,this.re)}},t.prototype.clone=function(){return new t(this.re,this.im)},t.prototype.equals=function(e){return this.re===e.re&&this.im===e.im},t.prototype.format=function(e){var r="",n=m.format(this.re,e),t=m.format(this.im,e);return r=0==this.im?n:0==this.re?1==this.im?"i":-1==this.im?"-i":t+"i":this.im>0?1==this.im?n+" + i":n+" + "+t+"i":-1==this.im?n+" - i":n+" - "+t.substring(1)+"i"},t.prototype.toString=function(){return this.format()},t.prototype.valueOf=t.prototype.toString,e.exports=t},function(e,r,n){"use strict";function t(e,r,n){if(!(this instanceof t))throw new SyntaxError("Constructor must be called with the new operator");if(null!=e&&!o.isNumber(e))throw new TypeError("Parameter start must be a number");if(null!=r&&!o.isNumber(r))throw new TypeError("Parameter end must be a number");if(null!=n&&!o.isNumber(n))throw new TypeError("Parameter step must be a number");this.start=null!=e?parseFloat(e):0,this.end=null!=r?parseFloat(r):0,this.step=null!=n?parseFloat(n):1}{var i=n(143),o=i.number,a=i.string;i.array}t.parse=function(e){if(!a.isString(e))return null;var r=e.split(":"),n=r.map(function(e){return parseFloat(e)}),i=n.some(function(e){return isNaN(e)});if(i)return null;switch(n.length){case 2:return new t(n[0],n[1]);case 3:return new t(n[0],n[2],n[1]);default:return null}},t.prototype.clone=function(){return new t(this.start,this.end,this.step)},t.isRange=function(e){return e instanceof t},t.prototype.size=function(){var e=0,r=this.start,n=this.step,t=this.end,i=t-r;return o.sign(n)==o.sign(i)?e=Math.ceil(i/n):0==i&&(e=0),isNaN(e)&&(e=0),[e]},t.prototype.min=function(){var e=this.size()[0];return e>0?this.step>0?this.start:this.start+(e-1)*this.step:void 0},t.prototype.max=function(){var e=this.size()[0];return e>0?this.step>0?this.start+(e-1)*this.step:this.start:void 0},t.prototype.forEach=function(e){var r=this.start,n=this.step,t=this.end,i=0;if(n>0)for(;t>r;)e(r,i,this),r+=n,i++;else if(0>n)for(;r>t;)e(r,i,this),r+=n,i++},t.prototype.map=function(e){var r=[];return this.forEach(function(n,t,i){r[t]=e(n,t,i)}),r},t.prototype.toArray=function(){var e=[];return this.forEach(function(r,n){e[n]=r}),e},t.prototype.valueOf=function(){return this.toArray()},t.prototype.format=function(e){var r=o.format(this.start,e);return 1!=this.step&&(r+=":"+o.format(this.step,e)),r+=":"+o.format(this.end,e)},t.prototype.toString=function(){return this.format()},e.exports=t},function(e,r,n){"use strict";function t(){if(!(this instanceof t))throw new SyntaxError("Constructor must be called with the new operator");this._ranges=[],this._isScalar=!0;for(var e=0,r=arguments.length;r>e;e++){var n=arguments[e];if(n instanceof a)this._ranges.push(n),this._isScalar=!1;else if(c(n))this._ranges.push(i(n)),this._isScalar=!1;else if(u(n))this._ranges.push(i([n,n+1]));else{var o=n.valueOf();if(!c(o))throw new TypeError("Ranges must be an Array, Number, or Range");this._ranges.push(i(o)),this._isScalar=!1}}}function i(e){for(var r=e.length,n=0;r>n;n++)if(!u(e[n])||!f(e[n]))throw new TypeError("Index parameters must be integer numbers");switch(e.length){case 2:return new a(e[0],e[1]);case 3:return new a(e[0],e[1],e[2]);default:throw new SyntaxError("Wrong number of arguments in Index (2 or 3 expected)")}}var o=n(143),a=n(7),s=o.number,u=s.isNumber,f=s.isInteger,c=Array.isArray;t.prototype.clone=function(){var e=new t;return e._ranges=o.object.clone(this._ranges),e._isScalar=this._isScalar,e},t.isIndex=function(e){return e instanceof t},t.create=function(e){var r=new t;return t.apply(r,e),r},t.prototype.size=function(){for(var e=[],r=0,n=this._ranges.length;n>r;r++){var t=this._ranges[r];e[r]=t.size()[0]}return e},t.prototype.max=function(){for(var e=[],r=0,n=this._ranges.length;n>r;r++){var t=this._ranges[r];e[r]=t.max()}return e},t.prototype.min=function(){for(var e=[],r=0,n=this._ranges.length;n>r;r++){var t=this._ranges[r];e[r]=t.min()}return e},t.prototype.forEach=function(e){for(var r=0,n=this._ranges.length;n>r;r++)e(this._ranges[r],r,this)},t.prototype.range=function(e){return this._ranges[e]||null},t.prototype.isScalar=function(){return this._isScalar},t.prototype.toArray=function(){for(var e=[],r=0,n=this._ranges.length;n>r;r++){var t=this._ranges[r],i=[],o=t.start,a=t.end,s=t.step;if(s>0)for(;a>o;)i.push(o),o+=s;else if(0>s)for(;o>a;)i.push(o),o+=s;e.push(i)}return e},t.prototype.valueOf=t.prototype.toArray,t.prototype.toString=function(){for(var e=[],r=0,n=this._ranges.length;n>r;r++){var t=this._ranges[r],i=s.format(t.start);1!=t.step&&(i+=":"+s.format(t.step)),i+=":"+s.format(t.end),e.push(i)}return"["+e.join(", ")+"]"},e.exports=t},function(e,r,n){"use strict";function t(e){if(!(this instanceof t))throw new SyntaxError("Constructor must be called with the new operator");if(e instanceof t)this._data=e.clone()._data;else if(d(e))this._data=f(e);else{if(null!=e)throw new TypeError("Unsupported type of data ("+c.types.type(e)+")");this._data=[]}this._size=h.size(this._data)}function i(e,r){if(!(r instanceof p))throw new TypeError("Invalid index");var n=r.isScalar();if(n)return e.get(r.min());var i=r.size();if(i.length!=e._size.length)throw new l(i.length,e._size.length);for(var a=r.min(),s=r.max(),u=0,f=e._size.length;f>u;u++)x(a[u],e._size[u]),x(s[u],e._size[u]);return new t(o(e._data,r,i.length,0))}function o(e,r,n,t){var i=t==n-1,a=r.range(t);return a.map(i?function(r){return e[r]}:function(i){var a=e[i];return o(a,r,n,t+1)})}function a(e,r,n,i){if(!(r instanceof p))throw new TypeError("Invalid index");var o,a=r.size(),f=r.isScalar();if(n instanceof t?(o=n.size(),n=n.valueOf()):o=h.size(n),f){if(0!=o.length)throw new TypeError("Scalar expected");e.set(r.min(),n,i)}else{if(a.length<e._size.length)throw new l(a.length,e._size.length,"<");if(o.length<a.length){for(var c=0,m=0;1===a[c]&&1===o[c];)c++;for(;1===a[c];)m++,c++;n=h.unsqueeze(n,a.length,m,o)}if(!g.deepEqual(a,o))throw new l(a,o,">");var d=r.max().map(function(e){return e+1});u(e,d,i);var x=a.length,y=0;s(e._data,r,n,x,y)}return e}function s(e,r,n,t,i){var o=i==t-1,a=r.range(i);a.forEach(o?function(r,t){x(r),e[r]=n[t]}:function(o,a){x(o),s(e[o],r,n[a],t,i+1)})}function u(e,r,n){for(var t=g.clone(e._size),i=!1;t.length<r.length;)t.push(0),i=!0;for(var o=0,a=r.length;a>o;o++)r[o]>t[o]&&(t[o]=r[o],i=!0);i&&e.resize(t,n)}function f(e){for(var r=0,n=e.length;n>r;r++){var i=e[r];d(i)?e[r]=f(i):i instanceof t&&(e[r]=f(i._data))}return e}var c=n(143),l=n(139),p=n(8),m=(c.number,c.string),h=c.array,g=c.object,d=Array.isArray,x=h.validateIndex;t.isMatrix=function(e){return e instanceof t},t.prototype.subset=function(e,r,n){switch(arguments.length){case 1:return i(this,e);case 2:case 3:return a(this,e,r,n);default:throw new SyntaxError("Wrong number of arguments")}},t.prototype.get=function(e){if(!d(e))throw new TypeError("Array expected");if(e.length!=this._size.length)throw new l(e.length,this._size.length);for(var r=this._data,n=0,t=e.length;t>n;n++){var i=e[n];x(i,r.length),r=r[i]}return g.clone(r)},t.prototype.set=function(e,r,n){var t,i;if(!d(e))throw new Error("Array expected");if(e.length<this._size.length)throw new l(e.length,this._size.length,"<");var o=e.map(function(e){return e+1});u(this,o,n);var a=this._data;for(t=0,i=e.length-1;i>t;t++){var s=e[t];x(s,a.length),a=a[s]}return s=e[e.length-1],x(s,a.length),a[s]=r,this},t.prototype.resize=function(e,r){return this._size=g.clone(e),this._data=h.resize(this._data,this._size,r),this},t.prototype.clone=function(){var e=new t;return e._data=g.clone(this._data),e._size=g.clone(this._size),e},t.prototype.size=function(){return this._size},t.prototype.map=function(e){var r=this,n=new t,i=[],o=function(n,t){return d(n)?n.map(function(e,r){return i[t]=r,o(e,t+1)}):e(n,i,r)};return n._data=o(this._data,0),n._size=g.clone(this._size),n},t.prototype.forEach=function(e){var r=this,n=[],t=function(i,o){d(i)?i.forEach(function(e,r){n[o]=r,t(e,o+1)}):e(i,n,r)};t(this._data,0)},t.prototype.toArray=function(){return g.clone(this._data)},t.prototype.valueOf=function(){return this._data},t.prototype.format=function(e){return m.format(this._data,e)},t.prototype.toString=function(){return m.format(this._data)},e.exports=t},function(e,r,n){"use strict";function t(e,r){if(!(this instanceof t))throw new Error("Constructor must be called with the new operator");if(void 0!=e&&!y(e))throw new TypeError("First parameter in Unit constructor must be a number");if(void 0!=r&&(!w(r)||""==r))throw new TypeError("Second parameter in Unit constructor must be a string");if(void 0!=r){var n=l(r);if(!n)throw new SyntaxError('Unknown unit "'+r+'"');this.unit=n.unit,this.prefix=n.prefix}else this.unit=M,this.prefix=b;this.value=void 0!=e?this._normalize(e):null,this.fixPrefix=!1}function i(){for(;" "==h||"	"==h;)s()}function o(e){return e>="0"&&"9">=e||"."==e}function a(e){return e>="0"&&"9">=e}function s(){m++,h=p.charAt(m)}function u(e){m=e,h=p.charAt(m)}function f(){var e,r="";if(e=m,"+"==h?s():"-"==h&&(r+=h,s()),!o(h))return u(e),null;if("."==h){if(r+=h,s(),!a(h))return u(e),null}else{for(;a(h);)r+=h,s();"."==h&&(r+=h,s())}for(;a(h);)r+=h,s();if("E"==h||"e"==h){if(r+=h,s(),("+"==h||"-"==h)&&(r+=h,s()),!a(h))return u(e),null;for(;a(h);)r+=h,s()}return r}function c(){var e="";for(i();h&&" "!=h&&"	"!=h;)e+=h,s();return e||null}function l(e){for(var r in A)if(A.hasOwnProperty(r)&&x.endsWith(e,r)){var n=A[r],t=e.length-r.length,i=e.substring(0,t),o=n.prefixes[i];if(void 0!==o)return{unit:n,prefix:o}}return null}var p,m,h,g=n(143),d=g.number,x=g.string,y=g.number.isNumber,w=g.string.isString;t.parse=function(e){if(p=e,m=-1,h="",!w(p))return null;s(),i();var r,n=f();if(n){if(r=c(),s(),i(),h)return null;if(n&&r)try{return new t(Number(n),r)}catch(o){}}else{if(r=c(),s(),i(),h)return null;if(r)try{return new t(null,r)}catch(o){}}return null},t.isUnit=function(e){return e instanceof t},t.prototype.clone=function(){var e=new t;for(var r in this)this.hasOwnProperty(r)&&(e[r]=this[r]);return e},t.prototype._normalize=function(e){return(e+this.unit.offset)*this.unit.value*this.prefix.value},t.prototype._unnormalize=function(e,r){return void 0==r?e/this.unit.value/this.prefix.value-this.unit.offset:e/this.unit.value/r-this.unit.offset},t.isValuelessUnit=function(e){return null!=l(e)},t.prototype.hasBase=function(e){return this.unit.base===e},t.prototype.equalBase=function(e){return this.unit.base===e.unit.base},t.prototype.equals=function(e){return this.equalBase(e)&&this.value==e.value},t.prototype.to=function(e){var r;if(w(e)){if(r=new t(null,e),!this.equalBase(r))throw new Error("Units do not match");return r.value=this.value,r.fixPrefix=!0,r}if(e instanceof t){if(!this.equalBase(e))throw new Error("Units do not match");if(null!==e.value)throw new Error("Cannot convert to a unit with a value");return r=e.clone(),r.value=this.value,r.fixPrefix=!0,r}throw new Error("String or Unit expected as parameter")},t.prototype.toNumber=function(e){var r=this.to(e);return r._unnormalize(r.value,r.prefix.value)},t.prototype.toString=function(){return this.format()},t.prototype.valueOf=t.prototype.toString,t.prototype.format=function(e){var r,n;if(null===this.value||this.fixPrefix)r=this._unnormalize(this.value),n=null!==this.value?d.format(r,e)+" ":"",n+=this.prefix.name+this.unit.name;else{var t=this._bestPrefix();r=this._unnormalize(this.value,t.value),n=d.format(r,e)+" ",n+=t.name+this.unit.name}return n},t.prototype._bestPrefix=function(){var e=Math.abs(this.value/this.unit.value),r=b,n=Math.abs(Math.log(e/r.value)/Math.LN10-1.2),t=this.unit.prefixes;for(var i in t)if(t.hasOwnProperty(i)){var o=t[i];if(o.scientific){var a=Math.abs(Math.log(e/o.value)/Math.LN10-1.2);n>a&&(r=o,n=a)}}return r};var v={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-42,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:1024,scientific:!0},M:{name:"M",value:Math.pow(1024,2),scientific:!0},G:{name:"G",value:Math.pow(1024,3),scientific:!0},T:{name:"T",value:Math.pow(1024,4),scientific:!0},P:{name:"P",value:Math.pow(1024,5),scientific:!0},E:{name:"E",value:Math.pow(1024,6),scientific:!0},Z:{name:"Z",value:Math.pow(1024,7),scientific:!0},Y:{name:"Y",value:Math.pow(1024,8),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:1024,scientific:!0},mega:{name:"mega",value:Math.pow(1024,2),scientific:!0},giga:{name:"giga",value:Math.pow(1024,3),scientific:!0},tera:{name:"tera",value:Math.pow(1024,4),scientific:!0},peta:{name:"peta",value:Math.pow(1024,5),scientific:!0},exa:{name:"exa",value:Math.pow(1024,6),scientific:!0},zetta:{name:"zetta",value:Math.pow(1024,7),scientific:!0},yotta:{name:"yotta",value:Math.pow(1024,8),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}}},b={name:"",value:1,scientific:!0},E={NONE:{},LENGTH:{},MASS:{},TIME:{},CURRENT:{},TEMPERATURE:{},LUMINOUS_INTENSITY:{},AMOUNT_OF_SUBSTANCE:{},FORCE:{},SURFACE:{},VOLUME:{},ANGLE:{},BIT:{}},N={},M={name:"",base:N,value:1,offset:0},A={meter:{name:"meter",base:E.LENGTH,prefixes:v.LONG,value:1,offset:0},inch:{name:"inch",base:E.LENGTH,prefixes:v.NONE,value:.0254,offset:0},foot:{name:"foot",base:E.LENGTH,prefixes:v.NONE,value:.3048,offset:0},yard:{name:"yard",base:E.LENGTH,prefixes:v.NONE,value:.9144,offset:0},mile:{name:"mile",base:E.LENGTH,prefixes:v.NONE,value:1609.344,offset:0},link:{name:"link",base:E.LENGTH,prefixes:v.NONE,value:.201168,offset:0},rod:{name:"rod",base:E.LENGTH,prefixes:v.NONE,value:5.02921,offset:0},chain:{name:"chain",base:E.LENGTH,prefixes:v.NONE,value:20.1168,offset:0},angstrom:{name:"angstrom",base:E.LENGTH,prefixes:v.NONE,value:1e-10,offset:0},m:{name:"m",base:E.LENGTH,prefixes:v.SHORT,value:1,offset:0},"in":{name:"in",base:E.LENGTH,prefixes:v.NONE,value:.0254,offset:0},ft:{name:"ft",base:E.LENGTH,prefixes:v.NONE,value:.3048,offset:0},yd:{name:"yd",base:E.LENGTH,prefixes:v.NONE,value:.9144,offset:0},mi:{name:"mi",base:E.LENGTH,prefixes:v.NONE,value:1609.344,offset:0},li:{name:"li",base:E.LENGTH,prefixes:v.NONE,value:.201168,offset:0},rd:{name:"rd",base:E.LENGTH,prefixes:v.NONE,value:5.02921,offset:0},ch:{name:"ch",base:E.LENGTH,prefixes:v.NONE,value:20.1168,offset:0},mil:{name:"mil",base:E.LENGTH,prefixes:v.NONE,value:254e-7,offset:0},m2:{name:"m2",base:E.SURFACE,prefixes:v.SQUARED,value:1,offset:0},sqin:{name:"sqin",base:E.SURFACE,prefixes:v.NONE,value:64516e-8,offset:0},sqft:{name:"sqft",base:E.SURFACE,prefixes:v.NONE,value:.09290304,offset:0},sqyd:{name:"sqyd",base:E.SURFACE,prefixes:v.NONE,value:.83612736,offset:0},sqmi:{name:"sqmi",base:E.SURFACE,prefixes:v.NONE,value:2589988.110336,offset:0},sqrd:{name:"sqrd",base:E.SURFACE,prefixes:v.NONE,value:25.29295,offset:0},sqch:{name:"sqch",base:E.SURFACE,prefixes:v.NONE,value:404.6873,offset:0},sqmil:{name:"sqmil",base:E.SURFACE,prefixes:v.NONE,value:6.4516e-10,offset:0},m3:{name:"m3",base:E.VOLUME,prefixes:v.CUBIC,value:1,offset:0},L:{name:"L",base:E.VOLUME,prefixes:v.SHORT,value:.001,offset:0},l:{name:"l",base:E.VOLUME,prefixes:v.SHORT,value:.001,offset:0},litre:{name:"litre",base:E.VOLUME,prefixes:v.LONG,value:.001,offset:0},cuin:{name:"cuin",base:E.VOLUME,prefixes:v.NONE,value:16387064e-12,offset:0},cuft:{name:"cuft",base:E.VOLUME,prefixes:v.NONE,value:.028316846592,offset:0},cuyd:{name:"cuyd",base:E.VOLUME,prefixes:v.NONE,value:.764554857984,offset:0},teaspoon:{name:"teaspoon",base:E.VOLUME,prefixes:v.NONE,value:5e-6,offset:0},tablespoon:{name:"tablespoon",base:E.VOLUME,prefixes:v.NONE,value:15e-6,offset:0},drop:{name:"drop",base:E.VOLUME,prefixes:v.NONE,value:5e-8,offset:0},gtt:{name:"gtt",base:E.VOLUME,prefixes:v.NONE,value:5e-8,offset:0},minim:{name:"minim",base:E.VOLUME,prefixes:v.NONE,value:6.161152e-8,offset:0},fluiddram:{name:"fluiddram",base:E.VOLUME,prefixes:v.NONE,value:36966911e-13,offset:0},fluidounce:{name:"fluidounce",base:E.VOLUME,prefixes:v.NONE,value:2957353e-11,offset:0},gill:{name:"gill",base:E.VOLUME,prefixes:v.NONE,value:.0001182941,offset:0},cc:{name:"cc",base:E.VOLUME,prefixes:v.NONE,value:1e-6,offset:0},cup:{name:"cup",base:E.VOLUME,prefixes:v.NONE,value:.0002365882,offset:0},pint:{name:"pint",base:E.VOLUME,prefixes:v.NONE,value:.0004731765,offset:0},quart:{name:"quart",base:E.VOLUME,prefixes:v.NONE,value:.0009463529,offset:0},gallon:{name:"gallon",base:E.VOLUME,prefixes:v.NONE,value:.003785412,offset:0},beerbarrel:{name:"beerbarrel",base:E.VOLUME,prefixes:v.NONE,value:.1173478,offset:0},oilbarrel:{name:"oilbarrel",base:E.VOLUME,prefixes:v.NONE,value:.1589873,offset:0},hogshead:{name:"hogshead",base:E.VOLUME,prefixes:v.NONE,value:.238481,offset:0},fldr:{name:"fldr",base:E.VOLUME,prefixes:v.NONE,value:36966911e-13,offset:0},floz:{name:"floz",base:E.VOLUME,prefixes:v.NONE,value:2957353e-11,offset:0},gi:{name:"gi",base:E.VOLUME,prefixes:v.NONE,value:.0001182941,offset:0},cp:{name:"cp",base:E.VOLUME,prefixes:v.NONE,value:.0002365882,offset:0},pt:{name:"pt",base:E.VOLUME,prefixes:v.NONE,value:.0004731765,offset:0},qt:{name:"qt",base:E.VOLUME,prefixes:v.NONE,value:.0009463529,offset:0},gal:{name:"gal",base:E.VOLUME,prefixes:v.NONE,value:.003785412,offset:0},bbl:{name:"bbl",base:E.VOLUME,prefixes:v.NONE,value:.1173478,offset:0},obl:{name:"obl",base:E.VOLUME,prefixes:v.NONE,value:.1589873,offset:0},g:{name:"g",base:E.MASS,prefixes:v.SHORT,value:.001,offset:0},gram:{name:"gram",base:E.MASS,prefixes:v.LONG,value:.001,offset:0},ton:{name:"ton",base:E.MASS,prefixes:v.SHORT,value:907.18474,offset:0},tonne:{name:"tonne",base:E.MASS,prefixes:v.SHORT,value:1e3,offset:0},grain:{name:"grain",base:E.MASS,prefixes:v.NONE,value:6479891e-11,offset:0},dram:{name:"dram",base:E.MASS,prefixes:v.NONE,value:.0017718451953125,offset:0},ounce:{name:"ounce",base:E.MASS,prefixes:v.NONE,value:.028349523125,offset:0},poundmass:{name:"poundmass",base:E.MASS,prefixes:v.NONE,value:.45359237,offset:0},hundredweight:{name:"hundredweight",base:E.MASS,prefixes:v.NONE,value:45.359237,offset:0},stick:{name:"stick",base:E.MASS,prefixes:v.NONE,value:.115,offset:0},gr:{name:"gr",base:E.MASS,prefixes:v.NONE,value:6479891e-11,offset:0},dr:{name:"dr",base:E.MASS,prefixes:v.NONE,value:.0017718451953125,offset:0},oz:{name:"oz",base:E.MASS,prefixes:v.NONE,value:.028349523125,offset:0},lbm:{name:"lbm",base:E.MASS,prefixes:v.NONE,value:.45359237,offset:0},cwt:{name:"cwt",base:E.MASS,prefixes:v.NONE,value:45.359237,offset:0},s:{name:"s",base:E.TIME,prefixes:v.SHORT,value:1,offset:0},min:{name:"min",base:E.TIME,prefixes:v.NONE,value:60,offset:0},h:{name:"h",base:E.TIME,prefixes:v.NONE,value:3600,offset:0},second:{name:"second",base:E.TIME,prefixes:v.LONG,value:1,offset:0},sec:{name:"sec",base:E.TIME,prefixes:v.LONG,value:1,offset:0},minute:{name:"minute",base:E.TIME,prefixes:v.NONE,value:60,offset:0},hour:{name:"hour",base:E.TIME,prefixes:v.NONE,value:3600,offset:0},day:{name:"day",base:E.TIME,prefixes:v.NONE,value:86400,offset:0},rad:{name:"rad",base:E.ANGLE,prefixes:v.NONE,value:1,offset:0},deg:{name:"deg",base:E.ANGLE,prefixes:v.NONE,value:.017453292519943295,offset:0},grad:{name:"grad",base:E.ANGLE,prefixes:v.NONE,value:.015707963267948967,offset:0},cycle:{name:"cycle",base:E.ANGLE,prefixes:v.NONE,value:6.283185307179586,offset:0},A:{name:"A",base:E.CURRENT,prefixes:v.SHORT,value:1,offset:0},ampere:{name:"ampere",base:E.CURRENT,prefixes:v.LONG,value:1,offset:0},K:{name:"K",base:E.TEMPERATURE,prefixes:v.NONE,value:1,offset:0},degC:{name:"degC",base:E.TEMPERATURE,prefixes:v.NONE,value:1,offset:273.15},degF:{name:"degF",base:E.TEMPERATURE,prefixes:v.NONE,value:1/1.8,offset:459.67},degR:{name:"degR",base:E.TEMPERATURE,prefixes:v.NONE,value:1/1.8,offset:0},kelvin:{name:"kelvin",base:E.TEMPERATURE,prefixes:v.NONE,value:1,offset:0},celsius:{name:"celsius",base:E.TEMPERATURE,prefixes:v.NONE,value:1,offset:273.15},fahrenheit:{name:"fahrenheit",base:E.TEMPERATURE,prefixes:v.NONE,value:1/1.8,offset:459.67},rankine:{name:"rankine",base:E.TEMPERATURE,prefixes:v.NONE,value:1/1.8,offset:0},mol:{name:"mol",base:E.AMOUNT_OF_SUBSTANCE,prefixes:v.NONE,value:1,offset:0},mole:{name:"mole",base:E.AMOUNT_OF_SUBSTANCE,prefixes:v.NONE,value:1,offset:0},cd:{name:"cd",base:E.LUMINOUS_INTENSITY,prefixes:v.NONE,value:1,offset:0},candela:{name:"candela",base:E.LUMINOUS_INTENSITY,prefixes:v.NONE,value:1,offset:0},N:{name:"N",base:E.FORCE,prefixes:v.SHORT,value:1,offset:0},newton:{name:"newton",base:E.FORCE,prefixes:v.LONG,value:1,offset:0},lbf:{name:"lbf",base:E.FORCE,prefixes:v.NONE,value:4.4482216152605,offset:0},poundforce:{name:"poundforce",base:E.FORCE,prefixes:v.NONE,value:4.4482216152605,offset:0},b:{name:"b",base:E.BIT,prefixes:v.BINARY_SHORT,value:1,offset:0},bits:{name:"bits",base:E.BIT,prefixes:v.BINARY_LONG,value:1,offset:0},B:{name:"B",base:E.BIT,prefixes:v.BINARY_SHORT,value:8,offset:0},bytes:{name:"bytes",base:E.BIT,prefixes:v.BINARY_LONG,value:8,offset:0}},T={meters:"meter",inches:"inch",feet:"foot",yards:"yard",miles:"mile",links:"link",rods:"rod",chains:"chain",angstroms:"angstrom",litres:"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",seconds:"second",minutes:"minute",hours:"hour",days:"day",radians:"rad",degrees:"deg",gradients:"grad",cycles:"cycle",amperes:"ampere",moles:"mole"};
for(var S in T)if(T.hasOwnProperty(S)){var O=A[T[S]],C=Object.create(O);C.name=S,A[S]=C}A.lt=A.l,A.liter=A.litre,A.liters=A.litres,A.lb=A.lbm,A.lbs=A.lbm,t.PREFIXES=v,t.BASE_UNITS=E,t.UNITS=A,e.exports=t},function(e,r,n){"use strict";function t(e,r){if(!(this instanceof t))throw new SyntaxError("Constructor must be called with the new operator");this.math=e,this.doc=r}var i=n(143),o=i.object,a=i.string;t.isHelp=function(e){return e instanceof t},t.prototype.toString=function(){var e=this.doc||{},r="\n";if(e.name&&(r+="Name: "+e.name+"\n\n"),e.category&&(r+="Category: "+e.category+"\n\n"),e.description&&(r+="Description:\n    "+e.description+"\n\n"),e.syntax&&(r+="Syntax:\n    "+e.syntax.join("\n    ")+"\n\n"),e.examples){var n=this.math.parser();r+="Examples:\n";for(var i=0;i<e.examples.length;i++){var o,s=e.examples[i];try{o=n.eval(s)}catch(u){o=u}r+="    "+s+"\n",!o||o instanceof t||(r+="        "+a.format(o)+"\n")}r+="\n"}return e.seealso&&(r+="See also: "+e.seealso.join(", ")+"\n"),r},t.prototype.toJSON=function(){return o.clone(this.doc)},t.prototype.valueOf=t.prototype.toString,e.exports=t},function(e){"use strict";function r(e){if(!(this instanceof r))throw new SyntaxError("Constructor must be called with the new operator");this.entries=e||[]}r.prototype.valueOf=function(){return this.entries},r.prototype.toString=function(){return"["+this.entries.join(", ")+"]"},e.exports=r},function(e,r,n){"use strict";function t(e,r,n){var o,a,s,u;if(0>=r){if(c(e[0])){for(u=i(e),a=[],o=0;o<u.length;o++)a[o]=t(u[o],r-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]=t(e[o],r-1,n);return a}function i(e){var r,n,t=e.length,i=e[0].length,o=[];for(n=0;i>n;n++){var a=[];for(r=0;t>r;r++)a.push(e[r][n]);o.push(a)}return o}{var o=n(143),a=n(140),s=n(139),u=n(9),f=o.array,c=o.array.isArray;o.string.isString}r.argsToArray=function(e){if(0==e.length)return[];if(1==e.length){var r=e[0];return r instanceof u&&(r=r.valueOf()),c(r)||(r=[r]),r}return o.array.argsToArray(e)},r.isCollection=function(e){return c(e)||e instanceof u},r.deepMap=function l(e,r){return e&&"function"==typeof e.map?e.map(function(e){return l(e,r)}):r(e)},r.deepMap2=function p(e,r,n){var t,i,o;if(c(e))if(c(r)){if(e.length!=r.length)throw new s(e.length,r.length);for(t=[],i=e.length,o=0;i>o;o++)t[o]=p(e[o],r[o],n)}else{if(r instanceof u)return t=p(e,r.valueOf(),n),new u(t);for(t=[],i=e.length,o=0;i>o;o++)t[o]=p(e[o],r,n)}else{if(e instanceof u)return r instanceof u?(t=p(e.valueOf(),r.valueOf(),n),new u(t)):(t=p(e.valueOf(),r,n),new u(t));if(c(r))for(t=[],i=r.length,o=0;i>o;o++)t[o]=p(e,r[o],n);else{if(r instanceof u)return t=p(e,r.valueOf(),n),new u(t);t=n(e,r)}}return t},r.reduce=function(e,r,n){var i=c(e)?f.size(e):e.size();if(0>r)throw new a(r);if(r>=i.length)throw new a(r,i.length);return e instanceof u?new u(t(e.valueOf(),r,n)):t(e,r,n)},r.deepForEach=function m(e,r){e instanceof u&&(e=e.valueOf());for(var n=0,t=e.length;t>n;n++){var i=e[n];c(i)?m(i,r):r(i)}}},function(e,r,n){"use strict";function t(e,r){if(1!=arguments.length&&2!=arguments.length)throw new F("parse",arguments.length,1,2);if(sr=r&&r.nodes?r.nodes:{},D(e))return ur=e,h();if(G(e)||e instanceof V)return H.deepMap(e,function(e){if(!D(e))throw new TypeError("String expected");return ur=e,h()});throw new TypeError("String or matrix expected")}function i(){fr=0,cr=ur.charAt(0),mr=0}function o(){fr++,cr=ur.charAt(fr)}function a(){return ur.charAt(fr+1)}function s(){for(pr=ir.NULL,lr="";" "==cr||"	"==cr||"\n"==cr&&mr;)o();if("#"==cr)for(;"\n"!=cr&&""!=cr;)o();if(""==cr)return void(pr=ir.DELIMITER);if("\n"==cr&&!mr)return pr=ir.DELIMITER,lr=cr,void o();var e=cr+a();if(2==e.length&&or[e])return pr=ir.DELIMITER,lr=e,o(),void o();if(or[cr])return pr=ir.DELIMITER,lr=cr,void o();if(!p(cr)){if(l(cr)){for(;l(cr)||m(cr);)lr+=cr,o();return void(pr=ar[lr]?ir.DELIMITER:ir.SYMBOL)}for(pr=ir.UNKNOWN;""!=cr;)lr+=cr,o();throw P('Syntax error in part "'+lr+'"')}if(pr=ir.NUMBER,"."==cr)lr+=cr,o(),m(cr)||(pr=ir.UNKNOWN);else{for(;m(cr);)lr+=cr,o();"."==cr&&(lr+=cr,o())}for(;m(cr);)lr+=cr,o();if("E"==cr||"e"==cr)for(lr+=cr,o(),("+"==cr||"-"==cr)&&(lr+=cr,o()),m(cr)||(pr=ir.UNKNOWN);m(cr);)lr+=cr,o()}function u(){do s();while("\n"==lr)}function f(){mr++}function c(){mr--}function l(e){return e>="a"&&"z">=e||e>="A"&&"Z">=e||"_"==e}function p(e){return e>="0"&&"9">=e||"."==e}function m(e){return e>="0"&&"9">=e}function h(){i(),s();var e=g();if(""!=lr)throw pr==ir.DELIMITER?k("Unexpected operator "+lr):P('Unexpected part "'+lr+'"');return e}function g(){var e,r,n;if(""==lr)return new K("undefined","undefined");for("\n"!=lr&&";"!=lr&&(e=d());"\n"==lr||";"==lr;)r||(r=new W,e&&(n=";"!=lr,r.add(e,n))),s(),"\n"!=lr&&";"!=lr&&""!=lr&&(e=d(),n=";"!=lr,r.add(e,n));return r?r:e}function d(){if(pr==ir.SYMBOL&&"function"==lr)throw P('Deprecated keyword "function". Functions can now be assigned without it, like "f(x) = x^2".');return x()}function x(){var e,r,n,t,i=y();if("="==lr){if(i instanceof nr)return e=i.name,u(),n=x(),new Z(e,n);if(i instanceof J)return u(),n=x(),new tr(i,n);if(i instanceof er&&(t=!0,r=[],e=i.symbol.name,i.params.forEach(function(e,n){e instanceof nr?r[n]=e.name:t=!1}),t))return u(),n=x(),new $(e,r,n);throw P("Invalid left hand side of assignment operator =")}return i}function y(){for(var e=w();"?"==lr;){u();var r=e,n=v();if(":"!=lr)throw P("False part of conditional expression expected");u();var t=y();e=new Q(r,n,t)}return e}function w(){var e,r=[];if(e=":"==lr?new K("1","number"):v(),":"==lr){for(r.push(e);":"==lr;)u(),r.push(")"==lr||"]"==lr||","==lr||""==lr?new nr("end"):v());if(3==r.length){var n=r[2];r[2]=r[1],r[1]=n}e=new rr(r)}return e}function v(){var e,r,n,t,i;for(e=b(),r={to:"to","in":"to"};lr in r;)n=lr,t=r[n],u(),i=[e,b()],e=new X(n,t,i);return e}function b(){var e,r,n,t,i;for(e=E(),r={"==":"equal","!=":"unequal","<":"smaller",">":"larger","<=":"smallerEq",">=":"largerEq"};lr in r;)n=lr,t=r[n],u(),i=[e,E()],e=new X(n,t,i);return e}function E(){var e,r,n,t,i;for(e=N(),r={"+":"add","-":"subtract"};lr in r;)n=lr,t=r[n],u(),i=[e,N()],e=new X(n,t,i);return e}function N(){var e,r,n,t,i;if(e=M(),r={"*":"multiply",".*":"dotMultiply","/":"divide","./":"dotDivide","%":"mod",mod:"mod"},lr in r)for(;lr in r;)n=lr,t=r[n],u(),i=[e,M()],e=new X(n,t,i);return(pr==ir.SYMBOL||"in"==lr&&e instanceof K||pr==ir.NUMBER&&!(e instanceof K)||"("==lr||"["==lr)&&(e=new X("*","multiply",[e,N()])),e}function M(){var e,r,n;return"-"==lr||"+"==lr?(e=lr,r="+"==e?"unaryPlus":"unaryMinus",u(),n=[M()],new X(e,r,n)):A()}function A(){var e,r,n,t;return e=T(),("^"==lr||".^"==lr)&&(r=lr,n="^"==r?"pow":"dotPow",u(),t=[e,M()],e=new X(r,n,t)),e}function T(){var e,r,n,t,i;for(e=S(),r={"!":"factorial","'":"transpose"};lr in r;)n=lr,t=r[n],s(),i=[e],e=new X(n,t,i);return e}function S(){var e,r=[];if(pr==ir.SYMBOL&&sr[lr]){if(e=sr[lr],s(),"("==lr){if(r=[],f(),s(),")"!=lr)for(r.push(y());","==lr;)s(),r.push(y());if(")"!=lr)throw P("Parenthesis ) expected");c(),s()}return new e(r)}return O()}function O(){var e,r;return pr==ir.SYMBOL||pr==ir.DELIMITER&&lr in ar?(r=lr,s(),e=new nr(r),e=C(e),e=U(e)):q()}function C(e){var r;if("("==lr){if(r=[],f(),s(),")"!=lr)for(r.push(y());","==lr;)s(),r.push(y());if(")"!=lr)throw P("Parenthesis ) expected");return c(),s(),new er(e,r)}return e}function U(e){for(var r;"["==lr;){if(r=[],f(),s(),"]"!=lr)for(r.push(y());","==lr;)s(),r.push(y());if("]"!=lr)throw P("Parenthesis ] expected");c(),s(),e=new J(e,r)}return e}function q(){var e,r,n;if('"'==lr){for(r="",n="";""!=cr&&('"'!=cr||"\\"==n);)r+=cr,n=cr,o();if(s(),'"'!=lr)throw P('End of string " expected');return s(),e=new K(r,"string"),e=U(e)}return B()}function B(){var e,r,n,t;if("["==lr){if(f(),s(),"]"!=lr){var i=z();if(";"==lr){for(n=1,r=[i];";"==lr;)s(),r[n]=z(),n++;if("]"!=lr)throw P("End of matrix ] expected");c(),s(),t=r[0].nodes.length;for(var o=1;n>o;o++)if(r[o].nodes.length!=t)throw k("Column dimensions mismatch ("+r[o].nodes.length+" != "+t+")");e=new Y(r)}else{if("]"!=lr)throw P("End of matrix ] expected");c(),s(),e=i}}else c(),s(),e=new Y([]);return e}return I()}function z(){for(var e=[x()],r=1;","==lr;)s(),e[r]=x(),r++;return new Y(e)}function I(){var e;return pr==ir.NUMBER?(e=lr,s(),new K(e,"number")):_()}function _(){var e;if("("==lr){if(f(),s(),e=x(),")"!=lr)throw P("Parenthesis ) expected");return c(),s(),e}return R()}function R(){throw P(""==lr?"Unexpected end of expression":"Value expected")}function L(){return fr-lr.length+1}function P(e){var r=L(),n=new SyntaxError(e+" (char "+r+")");return n["char"]=r,n}function k(e){var r=L(),n=new Error(e+" (char "+r+")");return n["char"]=r,n}var j=n(143),F=n(138),D=j.string.isString,G=Array.isArray,V=(j.types.type,n(6),n(9)),H=(n(10),n(13)),Y=n(144),Z=n(145),W=n(146),Q=n(147),K=n(148),$=n(150),J=n(149),X=n(153),er=n(151),rr=n(154),nr=n(155),tr=n(156),ir={NULL:0,DELIMITER:1,NUMBER:2,SYMBOL:3,UNKNOWN:4},or={",":!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},ar={mod:!0,to:!0,"in":!0},sr={},ur="",fr=0,cr="",lr="",pr=ir.NULL,mr=0;e.exports=t},function(e,r,n){"use strict";function t(e){if(!(this instanceof t))throw new SyntaxError("Constructor must be called with the new operator");if(!(e instanceof Object))throw new TypeError("Object expected as parameter math");this.math=e,this.scope={}}var i=n(14);t.prototype.parse=function(){throw new Error("Parser.parse is deprecated. Use math.parse instead.")},t.prototype.compile=function(){throw new Error("Parser.compile is deprecated. Use math.compile instead.")},t.prototype.eval=function(e){return i(e).compile(this.math).eval(this.scope)},t.prototype.get=function(e){return this.scope[e]},t.prototype.set=function(e,r){return this.scope[e]=r},t.prototype.remove=function(e){delete this.scope[e]},t.prototype.clear=function(){for(var e in this.scope)this.scope.hasOwnProperty(e)&&delete this.scope[e]},e.exports=t},function(e,r,n){"use strict";r.ArrayNode=n(144),r.AssignmentNode=n(145),r.BlockNode=n(146),r.ConditionalNode=n(147),r.ConstantNode=n(148),r.IndexNode=n(149),r.FunctionAssignmentNode=n(150),r.FunctionNode=n(151),r.Node=n(152),r.OperatorNode=n(153),r.RangeNode=n(154),r.SymbolNode=n(155),r.UpdateNode=n(156)},function(e,r,n){r.e=n(160),r.E=n(160),r["false"]=n(161),r.i=n(162),r.Infinity=n(163),r.LN2=n(164),r.LN10=n(165),r.LOG2E=n(166),r.LOG10E=n(167),r.NaN=n(168),r["null"]=n(169),r.pi=n(170),r.PI=n(170),r.phi=n(171),r.SQRT1_2=n(172),r.SQRT2=n(173),r.tau=n(174),r["true"]=n(175),r.version=n(176),r.abs=n(179),r.add=n(180),r.ceil=n(181),r.cube=n(182),r.divide=n(183),r.dotDivide=n(184),r.dotMultiply=n(185),r.dotPow=n(186),r.exp=n(187),r.fix=n(188),r.floor=n(189),r.gcd=n(190),r.lcm=n(191),r.log=n(192),r.log10=n(193),r.mod=n(194),r.multiply=n(195),r.norm=n(196),r.pow=n(197),r.round=n(198),r.sign=n(199),r.sqrt=n(200),r.square=n(201),r.subtract=n(202),r.unaryMinus=n(203),r.unaryPlus=n(204),r.xgcd=n(205),r.compare=n(206),r.deepEqual=n(207),r.equal=n(208),r.larger=n(209),r.largerEq=n(210),r.smaller=n(211),r.smallerEq=n(212),r.unequal=n(213),r.arg=n(214),r.conj=n(215),r.re=n(216),r.im=n(217),r.bignumber=n(218),r["boolean"]=n(219),r.complex=n(220),r.index=n(221),r.matrix=n(222),r.number=n(223),r.string=n(224),r.unit=n(225),r.eval=n(226),r.help=n(227),r.concat=n(228),r.det=n(229),r.diag=n(230),r.eye=n(231),r.flatten=n(232),r.inv=n(233),r.ones=n(234),r.range=n(235),r.resize=n(236),r.size=n(237),r.squeeze=n(238),r.subset=n(239),r.transpose=n(240),r.zeros=n(241),r.combinations=n(242),r.distribution=n(243),r.factorial=n(244),r.permutations=n(245),r.pickRandom=n(246),r.random=n(247),r.randomInt=n(248),r.max=n(249),r.mean=n(250),r.median=n(251),r.min=n(252),r.prod=n(253),r.std=n(254),r.sum=n(255),r["var"]=n(256),r.acos=n(257),r.asin=n(258),r.atan=n(259),r.atan2=n(260),r.cos=n(261),r.cosh=n(262),r.cot=n(263),r.coth=n(264),r.csc=n(265),r.csch=n(266),r.sec=n(267),r.sech=n(268),r.sin=n(269),r.sinh=n(270),r.tan=n(271),r.tanh=n(272),r.to=n(273),r.clone=n(274),r.map=n(275),r.forEach=n(276),r.format=n(277),r["import"]=n(278),r.sort=n(279),r["typeof"]=n(280)},function(e,r,n){"use strict";var t=n(142),i=n(157).transform,o=n(4).isNumber,a=n(136).argsToArray;e.exports=function(e){e.concat.transform=function(){var r=a(arguments),n=r.length-1,s=r[n];o(s)?r[n]=s-1:s instanceof t&&(r[n]=s.minus(1));try{return e.concat.apply(e,r)}catch(u){throw i(u)}}}},function(e,r,n){"use strict";{var t=n(9);n(142),n(7),n(8),n(4).isNumber,Array.isArray}e.exports=function(e){e.forEach.transform=function(r,n){if(2!=arguments.length)throw new e.error.ArgumentsError("forEach",arguments.length,2);var i=r instanceof t?r.valueOf():r;if(!Array.isArray(i))throw new e.error.UnsupportedTypeError("forEach",e["typeof"](r));var o=[],a=function(e,t){return Array.isArray(e)?e.map(function(e,r){return o[t]=r+1,a(e,t+1)}):void n(e,o,r)};a(i,0)}}},function(e,r,n){"use strict";var t=n(142),i=n(7),o=n(8),a=n(4).isNumber,s=Array.isArray;e.exports=function(e){e.index.transform=function(){for(var e=[],r=0,n=arguments.length;n>r;r++){var u=arguments[r];if(u instanceof i)u.start--,u.end-=u.step.valueOf()>0?0:2;else if(s(u)){for(var f=0,c=u.length;c>f;f++)u[f]=u[f]instanceof t?u[f].toNumber():u[f];var l=u.length>2?u[2]:1;u[0]--,u[1]-=l>0?0:2}else a(u)?u--:u instanceof t&&(u=u.toNumber()-1);e[r]=u}var p=new o;return o.apply(p,e),p}}},function(e,r,n){"use strict";{var t=n(9);n(142),n(7),n(8),n(4).isNumber,Array.isArray}e.exports=function(e){e.map.transform=function(r,n){if(2!=arguments.length)throw new e.error.ArgumentsError("map",arguments.length,2);var i=r instanceof t,o=i?r.valueOf():r;if(Array.isArray(o)){var a=[],s=function(e,t){return Array.isArray(e)?e.map(function(e,r){return a[t]=r+1,s(e,t+1)}):n(e,a,r)},u=s(o,0);return i?new t(u):u}throw new e.error.UnsupportedTypeError("map",e["typeof"](r))}}},function(e,r,n){"use strict";var t=n(142),i=n(157).transform,o=n(4).isNumber,a=n(13).isCollection,s=n(136).argsToArray;e.exports=function(e){e.max.transform=function(){var r=s(arguments);if(2==r.length&&a(r[0])){var n=r[1];o(n)?r[1]=n-1:n instanceof t&&(r[1]=n.minus(1))}try{return e.max.apply(e,r)}catch(u){throw i(u)}}}},function(e,r,n){"use strict";var t=n(142),i=n(157).transform,o=n(4).isNumber,a=n(13).isCollection,s=n(136).argsToArray;e.exports=function(e){e.mean.transform=function(){var r=s(arguments);if(2==r.length&&a(r[0])){var n=r[1];o(n)?r[1]=n-1:n instanceof t&&(r[1]=n.minus(1))}try{return e.mean.apply(e,r)}catch(u){throw i(u)}}}},function(e,r,n){"use strict";var t=n(142),i=n(157).transform,o=n(4).isNumber,a=n(13).isCollection,s=n(136).argsToArray;e.exports=function(e){e.min.transform=function(){var r=s(arguments);if(2==r.length&&a(r[0])){var n=r[1];o(n)?r[1]=n-1:n instanceof t&&(r[1]=n.minus(1))}try{return e.min.apply(e,r)}catch(u){throw i(u)}}}},function(e,r,n){"use strict";var t=n(158).isBoolean,i=n(136).argsToArray;e.exports=function(e){e.range.transform=function(){var r=i(arguments),n=r.length-1,o=r[n];return t(o)||r.push(!0),e.range.apply(e,r)}}},function(e,r,n){"use strict";var t=n(157).transform,i=(n(158).isBoolean,n(136).argsToArray);e.exports=function(e){e.subset.transform=function(){try{return e.subset.apply(e,i(arguments))}catch(r){throw t(r)}}}},function(e,r,n){"use strict";e.exports=function(e){function r(e){if(!(this instanceof r))throw new SyntaxError("Constructor must be called with the new operator");this.value=e instanceof r?e.value:e}function t(e,n){var t=Array.prototype.slice;r.prototype[e]="function"==typeof n?function(){var e=[this.value].concat(t.call(arguments,0));return new r(n.apply(this,e))}:new r(n)}var i=n(159);r.prototype.done=function(){return this.value},r.prototype.valueOf=function(){return this.value},r.prototype.toString=function(){return i.format(this.value)},r.createProxy=t;for(var o in e)e.hasOwnProperty(o)&&t(o,e[o]);return r}},function(e,r,n){"use strict";e.exports=function(e){var r=n(143),t=n(14),i=n(13),o=r.string.isString,a=i.isCollection;e.compile=function(r){if(1!=arguments.length)throw new e.error.ArgumentsError("compile",arguments.length,1);if(o(r))return t(r).compile(e);if(a(r))return i.deepMap(r,function(r){return t(r).compile(e)});throw new TypeError("String, array, or matrix expected")}}},function(e,r,n){"use strict";e.exports=function(e){var r=n(143),t=n(14),i=n(13),o=r.string.isString,a=i.isCollection;e.eval=function(r,n){if(1!=arguments.length&&2!=arguments.length)throw new e.error.ArgumentsError("eval",arguments.length,1,2);if(n=n||{},o(r))return t(r).compile(e).eval(n);if(a(r))return i.deepMap(r,function(r){return t(r).compile(e).eval(n)});throw new TypeError("String, array, or matrix expected")}}},function(e,r,n){"use strict";e.exports=function(e){var r=n(11);e.help=function(n){if(1!=arguments.length)throw new SyntaxError("Wrong number of arguments in function help ("+arguments.length+" provided, 1 expected)");var t=null;if(n instanceof String||"string"==typeof n)t=n;else{var i;for(i in e)if(e.hasOwnProperty(i)&&n===e[i]){t=i;break}}var o=e.expression.docs[t];if(!t||!o)throw new Error('No documentation found on "'+t+'"');return new r(e,o)}}},function(e,r,n){"use strict";e.exports=function(e){var r=n(14);e.parse=function(){return r.apply(r,arguments)}}},function(e,r,n){"use strict";e.exports=function(e){var r=n(143),t=e.type.BigNumber,i=n(6),o=(n(9),n(13)),a=r.number.isNumber,s=r["boolean"].isBoolean,u=i.isComplex,f=o.isCollection;e.abs=function c(r){if(1!=arguments.length)throw new e.error.ArgumentsError("abs",arguments.length,1);if(a(r))return Math.abs(r);if(u(r))return Math.sqrt(r.re*r.re+r.im*r.im);if(r instanceof t)return r.abs();if(f(r))return o.deepMap(r,c);if(s(r)||null===r)return Math.abs(r);throw new e.error.UnsupportedTypeError("abs",e["typeof"](r))}}},function(e,r,n){"use strict";e.exports=function(e){var r=n(143),t=e.type.BigNumber,i=n(6),o=(n(9),n(10)),a=n(13),s=r["boolean"].isBoolean,u=r.number.isNumber,f=r.string.isString,c=i.isComplex,l=o.isUnit,p=a.isCollection;e.add=function m(r,n){if(2!=arguments.length)throw new e.error.ArgumentsError("add",arguments.length,2);if(u(r)){if(u(n))return r+n;if(c(n))return new i(r+n.re,n.im)}if(c(r)){if(c(n))return new i(r.re+n.re,r.im+n.im);if(u(n))return new i(r.re+n,r.im)}if(l(r)&&l(n)){if(null==r.value)throw new Error("Parameter x contains a unit with undefined value");if(null==n.value)throw new Error("Parameter y contains a unit with undefined value");if(!r.equalBase(n))throw new Error("Units do not match");var o=r.clone();return o.value+=n.value,o.fixPrefix=!1,o}if(r instanceof t)return u(n)?n=t.convert(n):(s(n)||null===n)&&(n=new t(n?1:0)),n instanceof t?r.plus(n):m(r.toNumber(),n);if(n instanceof t)return u(r)?r=t.convert(r):(s(r)||null===r)&&(r=new t(r?1:0)),r instanceof t?r.plus(n):m(r,n.toNumber());if(p(r)||p(n))return a.deepMap2(r,n,m);if(f(r)||f(n))return r+n;if(s(r)||null===r)return m(+r,n);if(s(n)||null===n)return m(r,+n);throw new e.error.UnsupportedTypeError("add",e["typeof"](r),e["typeof"](n))}}},function(e,r,n){"use strict";e.exports=function(e){var r=n(143),t=e.type.BigNumber,i=n(6),o=n(13),a=r.number.isNumber,s=r["boolean"].isBoolean,u=o.isCollection,f=i.isComplex;e.ceil=function c(r){if(1!=arguments.length)throw new e.error.ArgumentsError("ceil",arguments.length,1);if(a(r))return Math.ceil(r);if(f(r))return new i(Math.ceil(r.re),Math.ceil(r.im));if(r instanceof t)return r.ceil();if(u(r))return o.deepMap(r,c);if(s(r)||null===r)return Math.ceil(r);throw new e.error.UnsupportedTypeError("ceil",e["typeof"](r))}}},function(e,r,n){"use strict";e.exports=function(e){var r=n(143),t=e.type.BigNumber,i=n(6),o=n(13),a=r.number.isNumber,s=r["boolean"].isBoolean,u=i.isComplex,f=o.isCollection;e.cube=function c(r){if(1!=arguments.length)throw new e.error.ArgumentsError("cube",arguments.length,1);if(a(r))return r*r*r;if(u(r))return e.multiply(e.multiply(r,r),r);if(r instanceof t)return r.times(r).times(r);if(f(r))return o.deepMap(r,c);if(s(r)||null===r)return c(+r);throw new e.error.UnsupportedTypeError("cube",e["typeof"](r))}}},function(e,r,n){"use strict";e.exports=function(e){function r(e,r){var n=r.re*r.re+r.im*r.im;return 0!=n?new o((e.re*r.re+e.im*r.im)/n,(e.im*r.re-e.re*r.im)/n):new o(0!=e.re?e.re/0:0,0!=e.im?e.im/0:0)}var t=n(143),i=e.type.BigNumber,o=n(6),a=(n(9),n(10)),s=n(13),u=t.number.isNumber,f=t["boolean"].isBoolean,c=o.isComplex,l=a.isUnit,p=s.isCollection;e.divide=function m(n,t){if(2!=arguments.length)throw new e.error.ArgumentsError("divide",arguments.length,2);if(u(n)){if(u(t))return n/t;if(c(t))return r(new o(n,0),t)}if(c(n)){if(c(t))return r(n,t);if(u(t))return r(n,new o(t,0))}if(n instanceof i)return u(t)?t=i.convert(t):(f(t)||null===t)&&(t=new i(t?1:0)),t instanceof i?n.div(t):m(n.toNumber(),t);if(t instanceof i)return u(n)?n=i.convert(n):(f(n)||null===n)&&(n=new i(n?1:0)),n instanceof i?n.div(t):m(n,t.toNumber());if(l(n)&&u(t)){var a=n.clone();return a.value/=t,a}if(p(n))return p(t)?e.multiply(n,e.inv(t)):s.deepMap2(n,t,m);if(p(t))return e.multiply(n,e.inv(t));if(f(n)||null===n)return m(+n,t);if(f(t)||null===t)return m(n,+t);throw new e.error.UnsupportedTypeError("divide",e["typeof"](n),e["typeof"](t))}}},function(e,r,n){"use strict";e.exports=function(e){var r=n(13);e.dotDivide=function(n,t){if(2!=arguments.length)throw new e.error.ArgumentsError("dotDivide",arguments.length,2);return r.deepMap2(n,t,e.divide)},e.edivide=function(){throw new Error("Function edivide is renamed to dotDivide")}}},function(e,r,n){"use strict";e.exports=function(e){var r=(n(143),n(13));e.dotMultiply=function(n,t){if(2!=arguments.length)throw new e.error.ArgumentsError("dotMultiply",arguments.length,2);return r.deepMap2(n,t,e.multiply)},e.emultiply=function(){throw new Error("Function emultiply is renamed to dotMultiply")}}},function(e,r,n){"use strict";e.exports=function(e){var r=(n(143),n(13));e.dotPow=function(n,t){if(2!=arguments.length)throw new e.error.ArgumentsError("dotPow",arguments.length,2);return r.deepMap2(n,t,e.pow)},e.epow=function(){throw new Error("Function epow is renamed to dotPow")}}},function(e,r,n){"use strict";e.exports=function(e){var r=n(143),t=e.type.BigNumber,i=n(6),o=(n(9),n(13)),a=r.number.isNumber,s=r["boolean"].isBoolean,u=i.isComplex,f=o.isCollection;e.exp=function c(r){if(1!=arguments.length)throw new e.error.ArgumentsError("exp",arguments.length,1);if(a(r))return Math.exp(r);if(u(r)){var n=Math.exp(r.re);return new i(n*Math.cos(r.im),n*Math.sin(r.im))}if(r instanceof t)return r.exp();if(f(r))return o.deepMap(r,c);if(s(r)||null===r)return Math.exp(r);throw new e.error.UnsupportedTypeError("exp",e["typeof"](r))}}},function(e,r,n){"use strict";e.exports=function(e){var r=n(143),t=e.type.BigNumber,i=n(6),o=n(13),a=r.number.isNumber,s=r["boolean"].isBoolean,u=i.isComplex,f=o.isCollection;e.fix=function c(r){if(1!=arguments.length)throw new e.error.ArgumentsError("fix",arguments.length,1);if(a(r))return r>0?Math.floor(r):Math.ceil(r);if(u(r))return new i(r.re>0?Math.floor(r.re):Math.ceil(r.re),r.im>0?Math.floor(r.im):Math.ceil(r.im));if(r instanceof t)return r.isNegative()?r.ceil():r.floor();if(f(r))return o.deepMap(r,c);if(s(r)||null===r)return c(+r);throw new e.error.UnsupportedTypeError("fix",e["typeof"](r))}}},function(e,r,n){"use strict";e.exports=function(e){var r=n(143),t=e.type.BigNumber,i=n(6),o=n(13),a=r.number.isNumber,s=r["boolean"].isBoolean,u=i.isComplex,f=o.isCollection;e.floor=function c(r){if(1!=arguments.length)throw new e.error.ArgumentsError("floor",arguments.length,1);if(a(r))return Math.floor(r);if(u(r))return new i(Math.floor(r.re),Math.floor(r.im));if(r instanceof t)return r.floor();if(f(r))return o.deepMap(r,c);if(s(r)||null===r)return c(+r);throw new e.error.UnsupportedTypeError("floor",e["typeof"](r))}}},function(e,r,n){"use strict";e.exports=function(e){function r(e,r){if(!e.isInt()||!r.isInt())throw new Error("Parameters in function gcd must be integer numbers");for(var n=new i(0);!r.isZero();){var t=e.mod(r);e=r,r=t}return e.lt(n)?e.neg():e}var t=n(143),i=e.type.BigNumber,o=n(13),a=t.number.isNumber,s=t["boolean"].isBoolean,u=t.number.isInteger,f=o.isCollection;e.gcd=function c(){var n,t=arguments[0],l=arguments[1];if(2==arguments.length){if(a(t)&&a(l)){if(!u(t)||!u(l))throw new Error("Parameters in function gcd must be integer numbers");for(;0!=l;)n=t%l,t=l,l=n;return 0>t?-t:t}if(f(t)||f(l))return o.deepMap2(t,l,c);if(t instanceof i)return a(l)?l=i.convert(l):(s(l)||null===l)&&(l=new i(l?1:0)),l instanceof i?r(t,l):c(t.toNumber(),l);if(l instanceof i)return a(t)?t=i.convert(t):(s(t)||null===t)&&(t=new i(t?1:0)),t instanceof i?r(t,l):c(t.toNumber(),l);if(s(t)||null===t)return c(+t,l);if(s(l)||null===l)return c(t,+l);throw new e.error.UnsupportedTypeError("gcd",e["typeof"](t),e["typeof"](l))}if(arguments.length>2){for(var p=1;p<arguments.length;p++)t=c(t,arguments[p]);return t}throw new SyntaxError("Function gcd expects two or more arguments")}}},function(e,r,n){"use strict";e.exports=function(e){function r(e,r){if(!e.isInt()||!r.isInt())throw new Error("Parameters in function lcm must be integer numbers");if(e.isZero()||r.isZero())return new i(0);for(var n=e.times(r);!r.isZero();){var t=r;r=e.mod(t),e=t}return n.div(e).abs()}var t=n(143),i=e.type.BigNumber,o=n(13),a=t.number.isNumber,s=t["boolean"].isBoolean,u=t.number.isInteger,f=o.isCollection;e.lcm=function c(){var n,t=arguments[0],l=arguments[1];if(2==arguments.length){if(a(t)&&a(l)){if(!u(t)||!u(l))throw new Error("Parameters in function lcm must be integer numbers");if(0==t||0==l)return 0;for(var p=t*l;0!=l;)n=l,l=t%n,t=n;return Math.abs(p/t)}if(f(t)||f(l))return o.deepMap2(t,l,c);if(t instanceof i)return a(l)?l=i.convert(l):(s(l)||null===l)&&(l=new i(l?1:0)),l instanceof i?r(t,l):c(t.toNumber(),l);if(l instanceof i)return a(t)?t=i.convert(t):(s(t)||null===t)&&(t=new i(t?1:0)),t instanceof i?r(t,l):c(t.toNumber(),l);if(s(t)||null===t)return c(+t,l);if(s(l)||null===l)return c(t,+l);throw new e.error.UnsupportedTypeError("lcm",e["typeof"](t),e["typeof"](l))}if(arguments.length>2){for(var m=1;m<arguments.length;m++)t=c(t,arguments[m]);return t}throw new SyntaxError("Function lcm expects two or more arguments")}}},function(e,r,n){"use strict";e.exports=function(e){var r=n(143),t=e.type.BigNumber,i=n(6),o=n(13),a=r.number.isNumber,s=r["boolean"].isBoolean,u=i.isComplex,f=o.isCollection;e.log=function c(r,n){if(1==arguments.length){if(a(r))return r>=0?Math.log(r):c(new i(r,0));if(u(r))return new i(Math.log(Math.sqrt(r.re*r.re+r.im*r.im)),Math.atan2(r.im,r.re));if(r instanceof t)return r.isNegative()?c(r.toNumber()):r.ln();if(f(r))return o.deepMap(r,c);if(s(r)||null===r)return c(+r);throw new e.error.UnsupportedTypeError("log",e["typeof"](r))}if(2==arguments.length)return e.divide(c(r),c(n));throw new e.error.ArgumentsError("log",arguments.length,1,2)}}},function(e,r,n){"use strict";e.exports=function(e){var r=n(143),t=e.type.BigNumber,i=n(6),o=n(13),a=r.number.isNumber,s=r["boolean"].isBoolean,u=i.isComplex,f=o.isCollection;e.log10=function c(r){if(1!=arguments.length)throw new e.error.ArgumentsError("log10",arguments.length,1);if(a(r))return r>=0?Math.log(r)/Math.LN10:c(new i(r,0));if(r instanceof t)return r.isNegative()?c(r.toNumber()):r.log();if(u(r))return new i(Math.log(Math.sqrt(r.re*r.re+r.im*r.im))/Math.LN10,Math.atan2(r.im,r.re)/Math.LN10);if(f(r))return o.deepMap(r,c);if(s(r)||null===r)return c(+r);throw new e.error.UnsupportedTypeError("log10",e["typeof"](r))}}},function(e,r,n){"use strict";e.exports=function(e){function r(e,r){if(r>0)return e-r*Math.floor(e/r);if(0==r)return e;throw new Error("Cannot calculate mod for a negative divisor")}var t=n(143),i=e.type.BigNumber,o=n(13),a=t.number.isNumber,s=t["boolean"].isBoolean,u=o.isCollection;e.mod=function f(n,t){if(2!=arguments.length)throw new e.error.ArgumentsError("mod",arguments.length,2);if(a(n)&&a(t))return r(n,t);if(n instanceof i)return a(t)?t=i.convert(t):(s(t)||null===t)&&(t=new i(t?1:0)),t instanceof i?t.isZero()?n:n.mod(t):f(n.toNumber(),t);if(t instanceof i)return a(n)?n=i.convert(n):(s(n)||null===n)&&(n=new i(n?1:0)),n instanceof i?t.isZero()?n:n.mod(t):f(n,t.toNumber());if(u(n)||u(t))return o.deepMap2(n,t,f);if(s(n)||null===n)return f(+n,t);if(s(t)||null===t)return f(n,+t);throw new e.error.UnsupportedTypeError("mod",e["typeof"](n),e["typeof"](t))}}},function(e,r,n){"use strict";e.exports=function(e){function r(r,n){for(var t=[],i=r.length,o=n[0].length,a=r[0].length,s=0;i>s;s++){t[s]=[];for(var u=0;o>u;u++){for(var f=null,c=0;a>c;c++){var l=e.multiply(r[s][c],n[c][u]);f=null===f?l:e.add(f,l)}t[s][u]=f}}var p=1===i&&1===o;return p?t[0][0]:t}function t(r,n){for(var t=[],i=n.length,o=n[0].length,a=0;o>a;a++){for(var s=null,u=0;i>u;u++){var f=e.multiply(r[u],n[u][a]);s=0===u?f:e.add(s,f)}t[a]=s}return 1===t.length?t[0]:t}function i(r,n){for(var t=[],i=r.length,o=r[0].length,a=0;i>a;a++){for(var s=null,u=0;o>u;u++){var f=e.multiply(r[a][u],n[u]);s=0===u?f:e.add(s,f)}t[a]=s}return 1===t.length?t[0]:t}function o(r,n){var t=r.length;if(!t)throw new Error("Cannot multiply two empty vectors");for(var i=0,o=0;t>o;o++)i=e.add(i,e.multiply(r[o],n[o]));return i}function a(e,r){return 0==e.im?0==r.im?new f(e.re*r.re,0):0==r.re?new f(0,e.re*r.im):new f(e.re*r.re,e.re*r.im):0==e.re?0==r.im?new f(0,e.im*r.re):0==r.re?new f(-e.im*r.im,0):new f(-e.im*r.im,e.im*r.re):0==r.im?new f(e.re*r.re,e.im*r.re):0==r.re?new f(-e.im*r.im,e.re*r.im):new f(e.re*r.re-e.im*r.im,e.re*r.im+e.im*r.re)}var s=n(143),u=e.type.BigNumber,f=n(6),c=n(9),l=n(10),p=n(13),m=s.array,h=s.number.isNumber,g=s["boolean"].isBoolean,d=f.isComplex,x=Array.isArray,y=l.isUnit;e.multiply=function w(n,s){var l;if(2!=arguments.length)throw new e.error.ArgumentsError("multiply",arguments.length,2);if(h(n)){if(h(s))return n*s;if(d(s))return a(new f(n,0),s);if(y(s))return l=s.clone(),l.value=null===l.value?l._normalize(n):l.value*n,l}if(d(n)){if(h(s))return a(n,new f(s,0));if(d(s))return a(n,s)}if(n instanceof u)return h(s)?s=u.convert(s):(g(s)||null===s)&&(s=new u(s?1:0)),s instanceof u?n.times(s):w(n.toNumber(),s);if(s instanceof u)return h(n)?n=u.convert(n):(g(n)||null===n)&&(n=new u(n?1:0)),n instanceof u?n.times(s):w(n,s.toNumber());if(y(n)&&h(s))return l=n.clone(),l.value=null===l.value?l._normalize(s):l.value*s,l;if(x(n)){if(x(s)){var v=m.size(n),b=m.size(s);if(1==v.length){if(1==b.length){if(v[0]!=b[0])throw new RangeError("Dimension mismatch in multiplication. Length of A must match length of B (A is "+v[0]+", B is "+b[0]+v[0]+" != "+b[0]+")");return o(n,s)}if(2==b.length){if(v[0]!=b[0])throw new RangeError("Dimension mismatch in multiplication. Length of A must match rows of B (A is "+v[0]+", B is "+b[0]+"x"+b[1]+", "+v[0]+" != "+b[0]+")");return t(n,s)}throw new Error("Can only multiply a 1 or 2 dimensional matrix (B has "+b.length+" dimensions)")}if(2==v.length){if(1==b.length){if(v[1]!=b[0])throw new RangeError("Dimension mismatch in multiplication. Columns of A must match length of B (A is "+v[0]+"x"+v[0]+", B is "+b[0]+", "+v[1]+" != "+b[0]+")");return i(n,s)}if(2==b.length){if(v[1]!=b[0])throw new RangeError("Dimension mismatch in multiplication. Columns of A must match rows of B (A is "+v[0]+"x"+v[1]+", B is "+b[0]+"x"+b[1]+", "+v[1]+" != "+b[0]+")");return r(n,s)}throw new Error("Can only multiply a 1 or 2 dimensional matrix (B has "+b.length+" dimensions)")}throw new Error("Can only multiply a 1 or 2 dimensional matrix (A has "+v.length+" dimensions)")}return s instanceof c?(l=w(n,s.valueOf()),x(l)?new c(l):l):p.deepMap2(n,s,w)}if(n instanceof c)return s instanceof c?(l=w(n.valueOf(),s.valueOf()),x(l)?new c(l):l):(l=w(n.valueOf(),s),x(l)?new c(l):l);if(x(s))return p.deepMap2(n,s,w);if(s instanceof c)return new c(p.deepMap2(n,s.valueOf(),w));if(g(n)||null===n)return w(+n,s);if(g(s)||null===s)return w(n,+s);throw new e.error.UnsupportedTypeError("multiply",e["typeof"](n),e["typeof"](s))}}},function(e,r,n){"use strict";e.exports=function(e){var r=n(143),t=n(136),i=e.type.BigNumber,o=n(6),a=n(9),s=(n(13),r.number.isNumber),u=r["boolean"].isBoolean,f=o.isComplex,c=Array.isArray;
e.norm=function l(r,n){if(arguments.length<1||arguments.length>2)throw new e.error.ArgumentsError("abs",arguments.length,1,2);if(s(r))return Math.abs(r);if(f(r))return Math.sqrt(r.re*r.re+r.im*r.im);if(r instanceof i)return r.abs();if(u(r)||null===r)return Math.abs(r);if(c(r)){var o=t.size(r);if(null==n&&(n=2),1==o.length){if(n===Number.POSITIVE_INFINITY||"inf"===n){var p;return e.forEach(r,function(r){var n=e.abs(r);(!p||e.larger(n,p))&&(p=n)}),p}if(n===Number.NEGATIVE_INFINITY||"-inf"===n){var p;return e.forEach(r,function(r){var n=e.abs(r);(!p||e.smaller(n,p))&&(p=n)}),p}if("fro"===n)return l(r);if(s(n)&&!isNaN(n)){if(!e.equal(n,0)){var p=0;return e.forEach(r,function(r){p=e.add(e.pow(e.abs(r),n),p)}),e.pow(p,1/n)}return Number.POSITIVE_INFINITY}throw new Error("Unsupported parameter value")}if(2==o.length){if(1==n){for(var m=[],h=0;h<r.length;h++)for(var g=r[h],d=0;d<g.length;d++)m[d]=e.add(m[d]||0,e.abs(g[d]));return e.max(m)}if(n==Number.POSITIVE_INFINITY||"inf"===n){for(var p=0,h=0;h<r.length;h++){for(var x=0,g=r[h],d=0;d<g.length;d++)x=e.add(x,e.abs(g[d]));e.larger(x,p)&&(p=x)}return p}if("fro"===n){var y=e.diag(e.multiply(e.transpose(r),r)),w=0;return e.forEach(y,function(r){w=e.add(r,w)}),e.sqrt(w)}if(2==n)throw new Error("Unsupported parameter value, missing implementation of matrix singular value decomposition");throw new Error("Unsupported parameter value")}}if(r instanceof a)return l(r.valueOf(),n);throw new e.error.UnsupportedTypeError("norm",r)}}},function(e,r,n){"use strict";e.exports=function(e){function r(r,n){var t=e.log(r),i=e.multiply(t,n);return e.exp(i)}var t=n(143),i=e.type.BigNumber,o=n(6),a=n(9),s=(n(13),t.array),u=t.number.isNumber,f=t["boolean"].isBoolean,c=Array.isArray,l=t.number.isInteger,p=o.isComplex;e.pow=function m(n,t){if(2!=arguments.length)throw new e.error.ArgumentsError("pow",arguments.length,2);if(u(n)){if(u(t))return l(t)||n>=0?Math.pow(n,t):r(new o(n,0),new o(t,0));if(p(t))return r(new o(n,0),t)}if(p(n)){if(u(t))return r(n,new o(t,0));if(p(t))return r(n,t)}if(n instanceof i)return u(t)?t=i.convert(t):(f(t)||null===t)&&(t=new i(t?1:0)),t instanceof i?t.isInteger()&&!n.isNegative()?n.pow(t):m(n.toNumber(),t.toNumber()):m(n.toNumber(),t);if(t instanceof i)return u(n)?n=i.convert(n):(f(n)||null===n)&&(n=new i(n?1:0)),n instanceof i?t.isInteger()&&!n.isNegative()?n.pow(t):m(n.toNumber(),t.toNumber()):m(n,t.toNumber());if(c(n)){if(!u(t)||!l(t)||0>t)throw new TypeError("For A^b, b must be a positive integer (value is "+t+")");var h=s.size(n);if(2!=h.length)throw new Error("For A^b, A must be 2 dimensional (A has "+h.length+" dimensions)");if(h[0]!=h[1])throw new Error("For A^b, A must be square (size is "+h[0]+"x"+h[1]+")");for(var g=e.eye(h[0]).valueOf(),d=n;t>=1;)1==(1&t)&&(g=e.multiply(d,g)),t>>=1,d=e.multiply(d,d);return g}if(n instanceof a)return new a(m(n.valueOf(),t));if(f(n)||null===n)return m(+n,t);if(f(t)||null===t)return m(n,+t);throw new e.error.UnsupportedTypeError("pow",e["typeof"](n),e["typeof"](t))}}},function(e,r,n){"use strict";e.exports=function(e){function r(e,r){var n=Math.pow(10,r);return Math.round(e*n)/n}var t=n(143),i=e.type.BigNumber,o=n(6),a=n(13),s=t.number.isNumber,u=t.number.isInteger,f=t["boolean"].isBoolean,c=o.isComplex,l=a.isCollection;e.round=function p(n,t){if(1!=arguments.length&&2!=arguments.length)throw new e.error.ArgumentsError("round",arguments.length,1,2);if(void 0==t){if(s(n))return Math.round(n);if(c(n))return new o(Math.round(n.re),Math.round(n.im));if(n instanceof i)return n.toDecimalPlaces(0);if(l(n))return a.deepMap(n,p);if(f(n)||null===n)return Math.round(n);throw new e.error.UnsupportedTypeError("round",e["typeof"](n))}if(!s(t)||!u(t)){if(!(t instanceof i)){if(f(t)||null===n)return p(n,+t);throw new TypeError("Number of decimals in function round must be an integer")}t=parseFloat(t.valueOf())}if(0>t||t>15)throw new Error("Number of decimals in function round must be in te range of 0-15");if(s(n))return r(n,t);if(c(n))return new o(r(n.re,t),r(n.im,t));if(n instanceof i)return n.toDecimalPlaces(t);if(l(n)||l(t))return a.deepMap2(n,t,p);if(f(n)||null===n)return p(+n,t);throw new e.error.UnsupportedTypeError("round",e["typeof"](n),e["typeof"](t))}}},function(e,r,n){"use strict";e.exports=function(e){var r=n(143),t=e.type.BigNumber,i=n(6),o=n(13),a=r.number,s=r.number.isNumber,u=r["boolean"].isBoolean,f=i.isComplex,c=o.isCollection;e.sign=function l(r){if(1!=arguments.length)throw new e.error.ArgumentsError("sign",arguments.length,1);if(s(r))return a.sign(r);if(f(r)){var n=Math.sqrt(r.re*r.re+r.im*r.im);return new i(r.re/n,r.im/n)}if(r instanceof t)return new t(r.cmp(0));if(c(r))return o.deepMap(r,l);if(u(r)||null===r)return a.sign(r);throw new e.error.UnsupportedTypeError("sign",e["typeof"](r))}}},function(e,r,n){"use strict";e.exports=function(e){var r=n(143),t=e.type.BigNumber,i=n(6),o=n(13),a=r.number.isNumber,s=r["boolean"].isBoolean,u=i.isComplex,f=o.isCollection;e.sqrt=function c(r){if(1!=arguments.length)throw new e.error.ArgumentsError("sqrt",arguments.length,1);if(a(r))return r>=0?Math.sqrt(r):c(new i(r,0));if(u(r)){var n,l,p=Math.sqrt(r.re*r.re+r.im*r.im);return n=r.re>=0?.5*Math.sqrt(2*(p+r.re)):Math.abs(r.im)/Math.sqrt(2*(p-r.re)),l=r.re<=0?.5*Math.sqrt(2*(p-r.re)):Math.abs(r.im)/Math.sqrt(2*(p+r.re)),r.im>=0?new i(n,l):new i(n,-l)}if(r instanceof t)return r.isNegative()?c(r.toNumber()):r.sqrt();if(f(r))return o.deepMap(r,c);if(s(r)||null===r)return c(+r);throw new e.error.UnsupportedTypeError("sqrt",e["typeof"](r))}}},function(e,r,n){"use strict";e.exports=function(e){var r=n(143),t=e.type.BigNumber,i=n(6),o=n(13),a=r.number.isNumber,s=r["boolean"].isBoolean,u=i.isComplex,f=o.isCollection;e.square=function c(r){if(1!=arguments.length)throw new e.error.ArgumentsError("square",arguments.length,1);if(a(r))return r*r;if(u(r))return e.multiply(r,r);if(r instanceof t)return r.times(r);if(f(r))return o.deepMap(r,c);if(s(r)||null===r)return r*r;throw new e.error.UnsupportedTypeError("square",e["typeof"](r))}}},function(e,r,n){"use strict";e.exports=function(e){var r=n(143),t=e.type.BigNumber,i=n(6),o=(n(9),n(10)),a=n(13),s=r["boolean"].isBoolean,u=r.number.isNumber,f=i.isComplex,c=o.isUnit,l=a.isCollection;e.subtract=function p(r,n){if(2!=arguments.length)throw new e.error.ArgumentsError("subtract",arguments.length,2);if(u(r)){if(u(n))return r-n;if(f(n))return new i(r-n.re,-n.im)}else if(f(r)){if(u(n))return new i(r.re-n,r.im);if(f(n))return new i(r.re-n.re,r.im-n.im)}if(r instanceof t)return u(n)?n=t.convert(n):(s(n)||null===n)&&(n=new t(n?1:0)),n instanceof t?r.minus(n):p(r.toNumber(),n);if(n instanceof t)return u(r)?r=t.convert(r):(s(r)||null===r)&&(r=new t(r?1:0)),r instanceof t?r.minus(n):p(r,n.toNumber());if(c(r)&&c(n)){if(null==r.value)throw new Error("Parameter x contains a unit with undefined value");if(null==n.value)throw new Error("Parameter y contains a unit with undefined value");if(!r.equalBase(n))throw new Error("Units do not match");var o=r.clone();return o.value-=n.value,o.fixPrefix=!1,o}if(l(r)||l(n))return a.deepMap2(r,n,p);if(s(r)||null===r)return p(+r,n);if(s(n)||null===n)return p(r,+n);throw new e.error.UnsupportedTypeError("subtract",e["typeof"](r),e["typeof"](n))}}},function(e,r,n){"use strict";e.exports=function(e,r){var t=n(143),i=e.type.BigNumber,o=n(6),a=n(10),s=n(13),u=t.number.isNumber,f=t["boolean"].isBoolean,c=t.string.isString,l=o.isComplex,p=a.isUnit,m=s.isCollection;e.unaryMinus=function h(n){if(1!=arguments.length)throw new e.error.ArgumentsError("unaryMinus",arguments.length,1);if(u(n))return-n;if(l(n))return new o(-n.re,-n.im);if(n instanceof i)return n.neg();if(p(n)){var t=n.clone();return t.value=-n.value,t}if(m(n))return s.deepMap(n,h);if(f(n)||c(n)||null===n)return"bignumber"==r.number?new i(-n):-n;throw new e.error.UnsupportedTypeError("unaryMinus",e["typeof"](n))},e.unary=function(){throw new Error("Function unary is deprecated. Use unaryMinus instead.")}}},function(e,r,n){"use strict";e.exports=function(e,r){var t=n(143),i=e.type.BigNumber,o=n(6),a=n(10),s=n(13),u=t.number.isNumber,f=t["boolean"].isBoolean,c=t.string.isString,l=o.isComplex,p=a.isUnit,m=s.isCollection;e.unaryPlus=function h(n){if(1!=arguments.length)throw new e.error.ArgumentsError("unaryPlus",arguments.length,1);if(u(n))return n;if(l(n))return n.clone();if(n instanceof i)return n;if(p(n))return n.clone();if(m(n))return s.deepMap(n,h);if(f(n)||c(n)||null===n)return"bignumber"==r.number?new i(+n):+n;throw new e.error.UnsupportedTypeError("unaryPlus",e["typeof"](n))}}},function(e,r,n){"use strict";e.exports=function(e,r){function t(e,n){for(var t,i,o,s=0,u=1,f=1,c=0;n;)i=Math.floor(e/n),o=e%n,t=s,s=u-i*s,u=t,t=f,f=c-i*f,c=t,e=n,n=o;var l;return l=0>e?[-e,-u,-c]:[e,e?u:0,c],"array"===r.matrix?l:new a(l)}function i(e,n){for(var t,i,o,u=new s(0),f=new s(0),c=new s(1),l=new s(1),p=new s(0);!n.isZero();)i=e.div(n).floor(),o=e.mod(n),t=f,f=c.minus(i.times(f)),c=t,t=l,l=p.minus(i.times(l)),p=t,e=n,n=o;var m;return m=e.lt(u)?[e.neg(),c.neg(),p.neg()]:[e,e.isZero()?0:c,p],"array"===r.matrix?m:new a(m)}var o=n(143),a=n(9),s=e.type.BigNumber,u=o.number.isNumber,f=o["boolean"].isBoolean,c=o.number.isInteger;e.xgcd=function l(r,n){if(2==arguments.length){if(u(r)&&u(n)){if(!c(r)||!c(n))throw new Error("Parameters in function xgcd must be integer numbers");return t(r,n)}if(r instanceof s)return u(n)?n=s.convert(n):(f(n)||null===n)&&(n=new s(n?1:0)),n instanceof s?i(r,n):l(r.toNumber(),n);if(n instanceof s)return u(r)?r=s.convert(r):(f(r)||null===r)&&(r=new s(r?1:0)),r instanceof s?i(r,n):l(r.toNumber(),n);if(f(r)||null===r)return l(+r,n);if(f(n)||null===n)return l(r,+n);throw new e.error.UnsupportedTypeError("xgcd",e["typeof"](r),e["typeof"](n))}throw new SyntaxError("Function xgcd expects two arguments")}}},function(e,r,n){"use strict";e.exports=function(e,r){var t=n(143),i=e.type.BigNumber,o=n(6),a=n(10),s=n(13),u=t.number.isNumber,f=t.number.nearlyEqual,c=t["boolean"].isBoolean,l=t.string.isString,p=o.isComplex,m=a.isUnit,h=s.isCollection;e.compare=function g(n,t){if(2!=arguments.length)throw new e.error.ArgumentsError("compare",arguments.length,2);if(u(n)&&u(t))return f(n,t,r.epsilon)?0:n>t?1:-1;if(n instanceof i)return u(t)?t=i.convert(t):(c(t)||null===t)&&(t=new i(t?1:0)),t instanceof i?new i(n.cmp(t)):g(n.toNumber(),t);if(t instanceof i)return u(n)?n=i.convert(n):(c(n)||null===n)&&(n=new i(n?1:0)),n instanceof i?new i(n.cmp(t)):g(n,t.toNumber());if(m(n)&&m(t)){if(!n.equalBase(t))throw new Error("Cannot compare units with different base");return n.value>t.value?1:n.value<t.value?-1:0}if(h(n)||h(t))return s.deepMap2(n,t,g);if(l(n)||l(t))return n>t?1:t>n?-1:0;if(c(n)||null===n)return g(+n,t);if(c(t)||null===t)return g(n,+t);if(p(n)||p(t))throw new TypeError("No ordering relation is defined for complex numbers");throw new e.error.UnsupportedTypeError("compare",e["typeof"](n),e["typeof"](t))}}},function(e,r,n){"use strict";e.exports=function(e){function r(n,t){if(o(n)){if(o(t)){var i=n.length;if(i!==t.length)return!1;for(var a=0;i>a;a++)if(!r(n[a],t[a]))return!1;return!0}return!1}return o(t)?!1:e.equal(n,t)}var t=n(13),i=t.isCollection,o=Array.isArray;e.deepEqual=function(n,t){if(2!=arguments.length)throw new e.error.ArgumentsError("deepEqual",arguments.length,2);return i(n)||i(t)?r(n.valueOf(),t.valueOf()):e.equal(n,t)}}},function(e,r,n){"use strict";e.exports=function(e,r){var t=n(143),i=e.type.BigNumber,o=n(6),a=n(10),s=n(13),u=t.number.isNumber,f=t.number.nearlyEqual,c=t["boolean"].isBoolean,l=t.string.isString,p=o.isComplex,m=a.isUnit,h=s.isCollection;e.equal=function g(n,t){if(2!=arguments.length)throw new e.error.ArgumentsError("equal",arguments.length,2);if(u(n)){if(u(t))return f(n,t,r.epsilon);if(p(t))return f(n,t.re,r.epsilon)&&f(t.im,0,r.epsilon)}if(p(n)){if(u(t))return f(n.re,t,r.epsilon)&&f(n.im,0,r.epsilon);if(p(t))return f(n.re,t.re,r.epsilon)&&f(n.im,t.im,r.epsilon)}if(n instanceof i)return u(t)?t=i.convert(t):c(t)&&(t=new i(t?1:0)),t instanceof i?n.eq(t):g(n.toNumber(),t);if(t instanceof i)return u(n)?n=i.convert(n):c(n)&&(n=new i(n?1:0)),n instanceof i?n.eq(t):g(n,t.toNumber());if(m(n)&&m(t)){if(!n.equalBase(t))throw new Error("Cannot compare units with different base");return n.value==t.value}if(h(n)||h(t))return s.deepMap2(n,t,g);if(l(n)||l(t))return n==t;if(c(n))return g(+n,t);if(c(t))return g(n,+t);if(null===n)return null===t;if(null===t)return null===n;if(void 0===n)return void 0===t;if(void 0===t)return void 0===n;throw new e.error.UnsupportedTypeError("equal",e["typeof"](n),e["typeof"](t))}}},function(e,r,n){"use strict";e.exports=function(e,r){var t=n(143),i=e.type.BigNumber,o=n(6),a=n(10),s=n(13),u=t.number.isNumber,f=t.number.nearlyEqual,c=t["boolean"].isBoolean,l=t.string.isString,p=o.isComplex,m=a.isUnit,h=s.isCollection;e.larger=function g(n,t){if(2!=arguments.length)throw new e.error.ArgumentsError("larger",arguments.length,2);if(u(n)&&u(t))return!f(n,t,r.epsilon)&&n>t;if(n instanceof i)return u(t)?t=i.convert(t):(c(t)||null===t)&&(t=new i(t?1:0)),t instanceof i?n.gt(t):g(n.toNumber(),t);if(t instanceof i)return u(n)?n=i.convert(n):(c(n)||null===n)&&(n=new i(n?1:0)),n instanceof i?n.gt(t):g(n,t.toNumber());if(m(n)&&m(t)){if(!n.equalBase(t))throw new Error("Cannot compare units with different base");return n.value>t.value}if(h(n)||h(t))return s.deepMap2(n,t,g);if(l(n)||l(t))return n>t;if(c(n)||null===n)return g(+n,t);if(c(t)||null===t)return g(n,+t);if(p(n)||p(t))throw new TypeError("No ordering relation is defined for complex numbers");throw new e.error.UnsupportedTypeError("larger",e["typeof"](n),e["typeof"](t))}}},function(e,r,n){"use strict";e.exports=function(e,r){var t=n(143),i=e.type.BigNumber,o=n(6),a=n(10),s=n(13),u=t.number.isNumber,f=t.number.nearlyEqual,c=t["boolean"].isBoolean,l=t.string.isString,p=o.isComplex,m=a.isUnit,h=s.isCollection;e.largerEq=function g(n,t){if(2!=arguments.length)throw new e.error.ArgumentsError("largerEq",arguments.length,2);if(u(n)&&u(t))return f(n,t,r.epsilon)||n>t;if(n instanceof i)return u(t)?t=i.convert(t):(c(t)||null===t)&&(t=new i(t?1:0)),t instanceof i?n.gte(t):g(n.toNumber(),t);if(t instanceof i)return u(n)?n=i.convert(n):(c(n)||null===n)&&(n=new i(n?1:0)),n instanceof i?n.gte(t):g(n,t.toNumber());if(m(n)&&m(t)){if(!n.equalBase(t))throw new Error("Cannot compare units with different base");return n.value>=t.value}if(h(n)||h(t))return s.deepMap2(n,t,g);if(l(n)||l(t))return n>=t;if(c(n)||null===n)return g(+n,t);if(c(t)||null===t)return g(n,+t);if(p(n)||p(t))throw new TypeError("No ordering relation is defined for complex numbers");throw new e.error.UnsupportedTypeError("largerEq",e["typeof"](n),e["typeof"](t))},e.largereq=function(){throw new Error("Function largereq is renamed to largerEq")}}},function(e,r,n){"use strict";e.exports=function(e,r){var t=n(143),i=e.type.BigNumber,o=n(6),a=n(10),s=n(13),u=t.number.isNumber,f=t.number.nearlyEqual,c=t["boolean"].isBoolean,l=t.string.isString,p=o.isComplex,m=a.isUnit,h=s.isCollection;e.smaller=function g(n,t){if(2!=arguments.length)throw new e.error.ArgumentsError("smaller",arguments.length,2);if(u(n)&&u(t))return!f(n,t,r.epsilon)&&t>n;if(n instanceof i)return u(t)?t=i.convert(t):(c(t)||null===t)&&(t=new i(t?1:0)),t instanceof i?n.lt(t):g(n.toNumber(),t);if(t instanceof i)return u(n)?n=i.convert(n):(c(n)||null===n)&&(n=new i(n?1:0)),n instanceof i?n.lt(t):g(n,t.toNumber());if(m(n)&&m(t)){if(!n.equalBase(t))throw new Error("Cannot compare units with different base");return n.value<t.value}if(h(n)||h(t))return s.deepMap2(n,t,g);if(l(n)||l(t))return t>n;if(c(n)||null===n)return g(+n,t);if(c(t)||null===t)return g(n,+t);if(p(n)||p(t))throw new TypeError("No ordering relation is defined for complex numbers");throw new e.error.UnsupportedTypeError("smaller",e["typeof"](n),e["typeof"](t))}}},function(e,r,n){"use strict";e.exports=function(e,r){var t=n(143),i=e.type.BigNumber,o=n(6),a=n(10),s=n(13),u=t.number.isNumber,f=t.number.nearlyEqual,c=t["boolean"].isBoolean,l=t.string.isString,p=o.isComplex,m=a.isUnit,h=s.isCollection;e.smallerEq=function g(n,t){if(2!=arguments.length)throw new e.error.ArgumentsError("smallerEq",arguments.length,2);if(u(n)&&u(t))return f(n,t,r.epsilon)||t>n;if(n instanceof i)return u(t)?t=i.convert(t):(c(t)||null===t)&&(t=new i(t?1:0)),t instanceof i?n.lte(t):g(n.toNumber(),t);if(t instanceof i)return u(n)?n=i.convert(n):(c(n)||null===n)&&(n=new i(n?1:0)),n instanceof i?n.lte(t):g(n,t.toNumber());if(m(n)&&m(t)){if(!n.equalBase(t))throw new Error("Cannot compare units with different base");return n.value<=t.value}if(h(n)||h(t))return s.deepMap2(n,t,g);if(l(n)||l(t))return t>=n;if(c(n)||null===n)return g(+n,t);if(c(t)||null===t)return g(n,+t);if(p(n)||p(t))throw new TypeError("No ordering relation is defined for complex numbers");throw new e.error.UnsupportedTypeError("smallerEq",e["typeof"](n),e["typeof"](t))},e.smallereq=function(){throw new Error("Function smallereq is renamed to smallerEq")}}},function(e,r,n){"use strict";e.exports=function(e,r){var t=n(143),i=e.type.BigNumber,o=n(6),a=n(10),s=n(13),u=t.number.isNumber,f=t.number.nearlyEqual,c=t["boolean"].isBoolean,l=t.string.isString,p=o.isComplex,m=a.isUnit,h=s.isCollection;e.unequal=function g(n,t){if(2!=arguments.length)throw new e.error.ArgumentsError("unequal",arguments.length,2);if(u(n)){if(u(t))return!f(n,t,r.epsilon);if(p(t))return!f(n,t.re,r.epsilon)||!f(t.im,0,r.epsilon)}if(p(n)){if(u(t))return!f(n.re,t,r.epsilon)||!f(n.im,0,r.epsilon);if(p(t))return!f(n.re,t.re,r.epsilon)||!f(n.im,t.im,r.epsilon)}if(n instanceof i)return u(t)?t=i.convert(t):c(t)&&(t=new i(t?1:0)),t instanceof i?!n.eq(t):g(n.toNumber(),t);if(t instanceof i)return u(n)?n=i.convert(n):c(n)&&(n=new i(n?1:0)),n instanceof i?!n.eq(t):g(n,t.toNumber());if(m(n)&&m(t)){if(!n.equalBase(t))throw new Error("Cannot compare units with different base");return n.value!=t.value}if(h(n)||h(t))return s.deepMap2(n,t,g);if(l(n)||l(t))return n!=t;if(c(n))return g(+n,t);if(c(t))return g(n,+t);if(null===n)return null!==t;if(null===t)return null!==n;if(void 0===n)return void 0!==t;if(void 0===t)return void 0!==n;throw new e.error.UnsupportedTypeError("unequal",e["typeof"](n),e["typeof"](t))}}},function(e,r,n){"use strict";e.exports=function(e){var r=n(143),t=e.type.BigNumber,i=n(6),o=n(13),a=r.number.isNumber,s=r["boolean"].isBoolean,u=o.isCollection,f=i.isComplex;e.arg=function c(r){if(1!=arguments.length)throw new e.error.ArgumentsError("arg",arguments.length,1);if(a(r))return Math.atan2(0,r);if(f(r))return Math.atan2(r.im,r.re);if(u(r))return o.deepMap(r,c);if(s(r)||null===r)return c(+r);if(r instanceof t)return c(r.toNumber());throw new e.error.UnsupportedTypeError("arg",e["typeof"](r))}}},function(e,r,n){"use strict";e.exports=function(e){var r=n(143),t=e.type.BigNumber,i=n(6),o=n(13),a=r.object,s=r.number.isNumber,u=r["boolean"].isBoolean,f=o.isCollection,c=i.isComplex;e.conj=function l(r){if(1!=arguments.length)throw new e.error.ArgumentsError("conj",arguments.length,1);return s(r)?r:r instanceof t?new t(r):c(r)?new i(r.re,-r.im):f(r)?o.deepMap(r,l):u(r)||null===r?+r:a.clone(r)}}},function(e,r,n){"use strict";e.exports=function(e){var r=n(143),t=e.type.BigNumber,i=n(6),o=n(13),a=r.object,s=r.number.isNumber,u=r["boolean"].isBoolean,f=o.isCollection,c=i.isComplex;e.re=function l(r){if(1!=arguments.length)throw new e.error.ArgumentsError("re",arguments.length,1);return s(r)?r:r instanceof t?new t(r):c(r)?r.re:f(r)?o.deepMap(r,l):u(r)||null===r?+r:a.clone(r)}}},function(e,r,n){"use strict";e.exports=function(e){var r=n(143),t=e.type.BigNumber,i=n(6),o=n(13),a=r.number.isNumber,s=r["boolean"].isBoolean,u=o.isCollection,f=i.isComplex;e.im=function c(r){if(1!=arguments.length)throw new e.error.ArgumentsError("im",arguments.length,1);return a(r)?0:r instanceof t?new t(0):f(r)?r.im:u(r)?o.deepMap(r,c):s(r)||null===r?0:0}}},function(e,r,n){"use strict";e.exports=function(e){var r=n(143),t=e.type.BigNumber,i=n(13),o=i.isCollection,a=r.number.isNumber,s=r.string.isString,u=r["boolean"].isBoolean;e.bignumber=function f(r){if(arguments.length>1)throw new e.error.ArgumentsError("bignumber",arguments.length,0,1);if(r instanceof t||a(r)||s(r))return new t(r);if(u(r)||null===r)return new t(+r);if(o(r))return i.deepMap(r,f);if(0==arguments.length)return new t(0);throw new e.error.UnsupportedTypeError("bignumber",e["typeof"](r))}}},function(e,r,n){"use strict";e.exports=function(e){var r=n(143),t=e.type.BigNumber,i=n(13),o=i.isCollection,a=r.number.isNumber,s=r.string.isString;e["boolean"]=function u(r){if(1!=arguments.length)throw new e.error.ArgumentsError("boolean",arguments.length,0,1);if("true"===r||r===!0)return!0;if("false"===r||r===!1||null===r)return!1;if(r instanceof Boolean)return 1==r;if(a(r))return 0!==r;if(r instanceof t)return!r.isZero();if(s(r)){var n=r.toLowerCase();if("true"===n)return!0;if("false"===n)return!1;var f=Number(r);if(""!=r&&!isNaN(f))return 0!==f}if(o(r))return i.deepMap(r,u);throw new SyntaxError(r.toString()+" is no valid boolean")}}},function(e,r,n){"use strict";e.exports=function(e){var r=n(143),t=e.type.BigNumber,i=n(6),o=n(13),a=o.isCollection,s=r.number.isNumber,u=r.string.isString,f=i.isComplex;e.complex=function c(){switch(arguments.length){case 0:return new i(0,0);case 1:var r=arguments[0];if(s(r))return new i(r,0);if(r instanceof t)return new i(r.toNumber(),0);if(f(r))return r.clone();if(u(r)){var n=i.parse(r);if(n)return n;throw new SyntaxError('String "'+r+'" is no valid complex number')}if(a(r))return o.deepMap(r,c);if("object"==typeof r){if("re"in r&&"im"in r)return new i(r.re,r.im);if("r"in r&&"phi"in r)return i.fromPolar(r.r,r.phi)}throw new TypeError("Two numbers, single string or an fitting object expected in function complex");case 2:var l=arguments[0],p=arguments[1];if(l instanceof t&&(l=l.toNumber()),p instanceof t&&(p=p.toNumber()),s(l)&&s(p))return new i(l,p);throw new TypeError("Two numbers or a single string expected in function complex");default:throw new e.error.ArgumentsError("complex",arguments.length,0,2)}}}},function(e,r,n){"use strict";e.exports=function(e){var r=(n(143),e.type.BigNumber),t=n(8);e.index=function(){var e=Array.prototype.slice.apply(arguments).map(function(e){return e instanceof r?e.toNumber():Array.isArray(e)?e.map(function(e){return e instanceof r?e.toNumber():e}):e}),n=new t;return t.apply(n,e),n}}},function(e,r,n){"use strict";e.exports=function(e){var r=(n(143),n(9));e.matrix=function(n){if(arguments.length>1)throw new e.error.ArgumentsError("matrix",arguments.length,0,1);return new r(n)}}},function(e,r,n){"use strict";e.exports=function(e){var r=n(143),t=e.type.BigNumber,i=n(13),o=i.isCollection,a=r.number.isNumber,s=r["boolean"].isBoolean,u=r.string.isString;e.number=function f(r){switch(arguments.length){case 0:return 0;case 1:if(o(r))return i.deepMap(r,f);if(r instanceof t)return r.toNumber();if(u(r)){var n=Number(r);if(isNaN(n)&&(n=Number(r.valueOf())),isNaN(n))throw new SyntaxError(r.toString()+" is no valid number");return n}if(s(r)||null===r)return+r;if(a(r))return r;throw new e.error.UnsupportedTypeError("number",e["typeof"](r));default:throw new e.error.ArgumentsError("number",arguments.length,0,1)}}}},function(e,r,n){"use strict";e.exports=function(e){var r=n(15);e.parser=function(){return new r(e)}}},function(e){"use strict";e.exports=function(e){e.select=function(r){return new e.chaining.Selector(r)}}},function(e,r,n){"use strict";e.exports=function(e){var r=n(143),t=n(13),i=r.number,o=r.number.isNumber,a=t.isCollection;e.string=function s(r){switch(arguments.length){case 0:return"";case 1:return o(r)?i.format(r):a(r)?t.deepMap(r,s):null===r?"null":r.toString();default:throw new e.error.ArgumentsError("string",arguments.length,0,1)}}}},function(e,r,n){"use strict";e.exports=function(e){var r=n(143),t=e.type.BigNumber,i=n(10),o=n(13),a=o.isCollection,s=r.string.isString;e.unit=function u(r){switch(arguments.length){case 1:var n=arguments[0];if(n instanceof i)return n.clone();if(s(n)){if(i.isValuelessUnit(n))return new i(null,n);var f=i.parse(n);if(f)return f;throw new SyntaxError('String "'+n+'" is no valid unit')}if(a(r))return o.deepMap(r,u);throw new TypeError("A string or a number and string expected in function unit");case 2:return arguments[0]instanceof t?new i(arguments[0].toNumber(),arguments[1]):new i(arguments[0],arguments[1]);default:throw new e.error.ArgumentsError("unit",arguments.length,1,2)}}}},function(e,r,n){"use strict";e.exports=function(e){function r(n,t,i,o){if(i>o){if(n.length!=t.length)throw new e.error.DimensionError(n.length,t.length);for(var a=[],s=0;s<n.length;s++)a[s]=r(n[s],t[s],i,o+1);return a}return n.concat(t)}var t=n(143),i=n(142),o=n(9),a=n(13),s=t.object,u=t.array,f=t.number.isNumber,c=t.number.isInteger,l=a.isCollection;e.concat=function(){var n,t,a=arguments.length,p=-1,m=!1,h=[];for(n=0;a>n;n++){var g=arguments[n];if(g instanceof o&&(m=!0),n==a-1&&(f(g)||g instanceof i)){if(t=p,p=g.valueOf(),!c(p))throw new TypeError("Integer number expected for dimension");if(0>p)throw new e.error.IndexError(p);if(n>0&&p>t)throw new e.error.IndexError(p,t+1)}else{if(!l(g))throw new e.error.UnsupportedTypeError("concat",e["typeof"](g));var d=s.clone(g).valueOf(),x=u.size(g.valueOf());if(h[n]=d,t=p,p=x.length-1,n>0&&p!=t)throw new e.error.DimensionError(t+1,p+1)}}if(0==h.length)throw new SyntaxError("At least one matrix expected");for(var y=h.shift();h.length;)y=r(y,h.shift(),p,0);return m?new o(y):y}}},function(e,r,n){"use strict";e.exports=function(e){function r(r,n){if(1==n)return o.clone(r[0][0]);if(2==n)return e.subtract(e.multiply(r[0][0],r[1][1]),e.multiply(r[1][0],r[0][1]));for(var t=function(r){var n,t,i=new Array(r.length),o=0;for(n=1;n<r.length;n++)o=e.add(o,r[n][n]);for(n=0;n<r.length;n++){for(i[n]=new Array(r.length),i[n][n]=e.unaryMinus(o),t=0;n>t;t++)i[n][t]=0;for(t=n+1;t<r.length;t++)i[n][t]=r[n][t];n+1<r.length&&(o=e.subtract(o,r[n+1][n+1]))}return i},i=r,a=0;n-1>a;a++)i=e.multiply(t(i),r);return n%2==0?e.unaryMinus(i[0][0]):i[0][0]}var t=n(143),i=n(9),o=t.object,a=t.string;e.det=function(n){if(1!=arguments.length)throw new e.error.ArgumentsError("det",arguments.length,1);var t;switch(n instanceof i?t=n.size():n instanceof Array?(n=new i(n),t=n.size()):t=[],t.length){case 0:return o.clone(n);case 1:if(1==t[0])return o.clone(n.valueOf()[0]);throw new RangeError("Matrix must be square (size: "+a.format(t)+")");case 2:var s=t[0],u=t[1];if(s==u)return r(n.clone().valueOf(),s,u);throw new RangeError("Matrix must be square (size: "+a.format(t)+")");default:throw new RangeError("Matrix must be two dimensional (size: "+a.format(t)+")")}}}},function(e,r,n){"use strict";e.exports=function(e){var r=n(143),t=e.type.BigNumber,i=n(9),o=r.object,a=r.array.isArray,s=r.number.isNumber,u=r.number.isInteger;e.diag=function(r,n){var f,c,l,p;if(1!=arguments.length&&2!=arguments.length)throw new e.error.ArgumentsError("diag",arguments.length,1,2);if(n){if(n instanceof t&&(n=n.toNumber()),!s(n)||!u(n))throw new TypeError("Second parameter in function diag must be an integer")}else n=0;var m,h=n>0?n:0,g=0>n?-n:0;if(r instanceof i)m=!1;else{if(!a(r))throw new TypeError("First parameter in function diag must be a Matrix or Array");r=new i(r),m=!0}var d=r.size();switch(d.length){case 1:c=r.valueOf();var x=new i,y=c[0]instanceof t?new t(0):0;for(x.resize([c.length+g,c.length+h],y),f=x.valueOf(),p=c.length,l=0;p>l;l++)f[l+g][l+h]=o.clone(c[l]);return m?x.valueOf():x;case 2:for(c=[],f=r.valueOf(),p=Math.min(d[0]-g,d[1]-h),l=0;p>l;l++)c[l]=o.clone(f[l+g][l+h]);return m?c:new i(c);default:throw new RangeError("Matrix for function diag must be 2 dimensional")}}}},function(e,r,n){"use strict";e.exports=function(e,r){var t=n(143),i=e.type.BigNumber,o=n(9),a=n(13),s=t.number.isNumber,u=t.number.isInteger,f=Array.isArray;e.eye=function(n){var t=a.argsToArray(arguments),c=n instanceof o?!0:f(n)?!1:"matrix"===r.matrix;if(0==t.length)return c?new o:[];if(1==t.length)t[1]=t[0];else if(t.length>2)throw new e.error.ArgumentsError("eye",t.length,0,2);var l=t[0],p=t[1];if(l instanceof i&&(l=l.toNumber()),p instanceof i&&(p=p.toNumber()),!s(l)||!u(l)||1>l)throw new Error("Parameters in function eye must be positive integers");if(!s(p)||!u(p)||1>p)throw new Error("Parameters in function eye must be positive integers");var m=!1;t=t.map(function(e){return e instanceof i?(m=!0,e.toNumber()):e});var h=new o,g=m?new i(1):1,d=m?new i(0):0;h.resize(t,d);for(var x=e.min(t),y=h.valueOf(),w=0;x>w;w++)y[w][w]=g;return c?h:h.valueOf()}}},function(e,r,n){"use strict";e.exports=function(e){var r=n(143),t=n(9),i=r.object,o=r.array,a=Array.isArray;e.flatten=function(r){if(1!==arguments.length)throw new e.error.ArgumentsError("flatten",arguments.length,1);if(r instanceof t){var n=i.clone(r.toArray()),s=o.flatten(n);return new t(s)}if(a(r))return o.flatten(i.clone(r));throw new e.error.UnsupportedTypeError("flatten",e["typeof"](r))}}},function(e,r,n){"use strict";e.exports=function(e){function r(r,n,t){var i,o,a,s,u;if(1==n){if(s=r[0][0],0==s)throw Error("Cannot calculate inverse, determinant is zero");return[[e.divide(1,s)]]}if(2==n){var f=e.det(r);if(0==f)throw Error("Cannot calculate inverse, determinant is zero");return[[e.divide(r[1][1],f),e.divide(e.unaryMinus(r[0][1]),f)],[e.divide(e.unaryMinus(r[1][0]),f),e.divide(r[0][0],f)]]}var c=r.concat();for(i=0;n>i;i++)c[i]=c[i].concat();for(var l=e.eye(n).valueOf(),p=0;t>p;p++){for(i=p;n>i&&0==c[i][p];)i++;if(i==n||0==c[i][p])throw Error("Cannot calculate inverse, determinant is zero");i!=p&&(u=c[p],c[p]=c[i],c[i]=u,u=l[p],l[p]=l[i],l[i]=u);var m=c[p],h=l[p];for(i=0;n>i;i++){var g=c[i],d=l[i];if(i!=p){if(0!=g[p]){for(a=e.divide(e.unaryMinus(g[p]),m[p]),o=p;t>o;o++)g[o]=e.add(g[o],e.multiply(a,m[o]));for(o=0;t>o;o++)d[o]=e.add(d[o],e.multiply(a,h[o]))}}else{for(a=m[p],o=p;t>o;o++)g[o]=e.divide(g[o],a);for(o=0;t>o;o++)d[o]=e.divide(d[o],a)}}}return l}var t=n(143),i=t.string,o=n(9);e.inv=function(n){if(1!=arguments.length)throw new e.error.ArgumentsError("inv",arguments.length,1);var t=e.size(n).valueOf();switch(t.length){case 0:return e.divide(1,n);case 1:if(1==t[0])return n instanceof o?new o([e.divide(1,n.valueOf()[0])]):[e.divide(1,n[0])];throw new RangeError("Matrix must be square (size: "+i.format(t)+")");case 2:var a=t[0],s=t[1];if(a==s)return n instanceof o?new o(r(n.valueOf(),a,s)):r(n,a,s);throw new RangeError("Matrix must be square (size: "+i.format(t)+")");default:throw new RangeError("Matrix must be two dimensional (size: "+i.format(t)+")")}}}},function(e,r,n){"use strict";e.exports=function(e,r){var t=n(143),i=e.type.BigNumber,o=n(9),a=n(13),s=t.array,u=Array.isArray;e.ones=function(e){var n=a.argsToArray(arguments),t=e instanceof o?!0:u(e)?!1:"matrix"===r.matrix;if(0==n.length)return t?new o:[];var f=!1;n=n.map(function(e){return e instanceof i?(f=!0,e.toNumber()):e});var c=[],l=f?new i(1):1;return c=s.resize(c,n,l),t?new o(c):c}}},function(e,r,n){"use strict";e.exports=function(e,r){function t(e,r,n){var t=[],i=e;if(n>0)for(;r>i;)t.push(i),i+=n;else if(0>n)for(;i>r;)t.push(i),i+=n;return t}function i(e,r,n){var t=[],i=e;if(n>0)for(;r>=i;)t.push(i),i+=n;else if(0>n)for(;i>=r;)t.push(i),i+=n;return t}function o(e,r,n){var t=[],i=e.clone(),o=new f(0);if(n.gt(o))for(;i.lt(r);)t.push(i),i=i.plus(n);else if(n.lt(o))for(;i.gt(r);)t.push(i),i=i.plus(n);return t}function a(e,r,n){var t=[],i=e.clone(),o=new f(0);if(n.gt(o))for(;i.lte(r);)t.push(i),i=i.plus(n);else if(n.lt(o))for(;i.gte(r);)t.push(i),i=i.plus(n);return t}function s(e){var n=e.split(":"),t=null;if("bignumber"===r.number)try{t=n.map(function(e){return new f(e)})}catch(i){return null}else{t=n.map(function(e){return Number(e)});var o=t.some(function(e){return isNaN(e)});if(o)return null}switch(t.length){case 2:return{start:t[0],end:t[1],step:1};case 3:return{start:t[0],end:t[2],step:t[1]};default:return null}}var u=n(143),f=e.type.BigNumber,c=n(9),l=(n(13),u["boolean"].isBoolean),p=u.string.isString,m=u.number.isNumber;e.range=function(){var n,u,h,g=Array.prototype.slice.call(arguments),d=!1;
switch(l(g[g.length-1])&&(d=g.pop()?!0:!1),g.length){case 1:if(!p(g[0]))throw new TypeError("Two or three numbers or a single string expected in function range");var x=s(g[0]);if(!x)throw new SyntaxError('String "'+g[0]+'" is no valid range');n=x.start,u=x.end,h=x.step;break;case 2:n=g[0],u=g[1],h=1;break;case 3:n=g[0],u=g[1],h=g[2];break;case 4:throw new TypeError("Parameter includeEnd must be a boolean");default:throw new e.error.ArgumentsError("range",arguments.length,2,4)}if(!(m(n)||n instanceof f))throw new TypeError("Parameter start must be a number");if(!(m(u)||u instanceof f))throw new TypeError("Parameter end must be a number");if(!(m(h)||h instanceof f))throw new TypeError("Parameter step must be a number");if(n instanceof f||u instanceof f||h instanceof f){var y=!0;n instanceof f||(n=f.convert(n)),u instanceof f||(u=f.convert(u)),h instanceof f||(h=f.convert(h)),n instanceof f&&u instanceof f&&h instanceof f||(y=!1,n instanceof f&&(n=n.toNumber()),u instanceof f&&(u=u.toNumber()),h instanceof f&&(h=h.toNumber()))}var w=y?d?a:o:d?i:t,v=w(n,u,h);return"array"===r.matrix?v:new c(v)}}},function(e,r,n){"use strict";e.exports=function(e,r){function t(r,n,t){if(void 0!==t){if(!c(t)||1!==t.length)throw new TypeError("Single character expected as defaultValue")}else t=" ";if(1!==n.length)throw new e.error.DimensionError(n.length,1);var i=n[0];if(!l(i)||!p(i))throw new TypeError("Invalid size, must contain positive integers (size: "+f.format(n)+")");if(r.length>i)return r.substring(0,i);if(r.length<i){for(var o=r,a=0,s=i-r.length;s>a;a++)o+=t;return o}return r}var i=n(143),o=e.type.BigNumber,a=n(9),s=i.array,u=i.object.clone,f=i.string,c=i.string.isString,l=i.number.isNumber,p=i.number.isInteger,m=s.isArray;e.resize=function(n,i,f){if(2!=arguments.length&&3!=arguments.length)throw new e.error.ArgumentsError("resize",arguments.length,2,3);var l=n instanceof a?!0:m(n)?!1:"array"!==r.matrix;if(n instanceof a&&(n=n.valueOf()),i instanceof a&&(i=i.valueOf()),i.length&&i[0]instanceof o&&(i=i.map(function(e){return e instanceof o?e.toNumber():e})),c(n))return t(n,i,f);if(0==i.length){for(;m(n);)n=n[0];return u(n)}m(n)||(n=[n]),n=u(n);var p=s.resize(n,i,f);return l?new a(p):p}}},function(e,r,n){"use strict";e.exports=function(e,r){var t=n(143),i=e.type.BigNumber,o=n(6),a=n(10),s=n(9),u=t.array,f=t.number.isNumber,c=t["boolean"].isBoolean,l=t.string.isString,p=o.isComplex,m=a.isUnit;e.size=function(n){if(1!=arguments.length)throw new e.error.ArgumentsError("size",arguments.length,1);var t="array"===r.matrix;if(f(n)||p(n)||m(n)||c(n)||null==n||n instanceof i)return t?[]:new s([]);if(l(n))return t?[n.length]:new s([n.length]);if(Array.isArray(n))return u.size(n);if(n instanceof s)return new s(n.size());throw new e.error.UnsupportedTypeError("size",e["typeof"](n))}}},function(e,r,n){"use strict";e.exports=function(e){var r=n(143),t=n(9),i=r.object,o=r.array,a=Array.isArray;e.squeeze=function(r){if(1!=arguments.length)throw new e.error.ArgumentsError("squeeze",arguments.length,1);if(a(r))return o.squeeze(i.clone(r));if(r instanceof t){var n=o.squeeze(r.toArray());return a(n)?new t(n):n}return i.clone(r)}}},function(e,r,n){"use strict";e.exports=function(e){function r(r,n){var i,o;if(l(r))return i=new s(r),o=i.subset(n),o.valueOf();if(r instanceof s)return r.subset(n);if(c(r))return t(r,n);throw new e.error.UnsupportedTypeError("subset",e["typeof"](r))}function t(r,n){if(!(n instanceof u))throw new TypeError("Index expected");if(1!=n.size().length)throw new e.error.DimensionError(n.size().length,1);var t=r.length;f.validateIndex(n.min()[0],t),f.validateIndex(n.max()[0],t);var i=n.range(0),o="";return i.forEach(function(e){o+=r.charAt(e)}),o}function i(r,n,t,i){var a;if(l(r))return a=new s(e.clone(r)),a.subset(n,t,i),a.valueOf();if(r instanceof s)return r.clone().subset(n,t,i);if(c(r))return o(r,n,t,i);throw new e.error.UnsupportedTypeError("subset",e["typeof"](r))}function o(r,n,t,i){if(!(n instanceof u))throw new TypeError("Index expected");if(1!=n.size().length)throw new e.error.DimensionError(n.size().length,1);if(void 0!==i){if(!c(i)||1!==i.length)throw new TypeError("Single character expected as defaultValue")}else i=" ";var o=n.range(0),a=o.size()[0];if(a!=t.length)throw new e.error.DimensionError(o.size()[0],t.length);var s=r.length;f.validateIndex(n.min()[0]),f.validateIndex(n.max()[0]);for(var l=[],p=0;s>p;p++)l[p]=r.charAt(p);if(o.forEach(function(e,r){l[e]=t.charAt(r)}),l.length>s)for(p=s-1,a=l.length;a>p;p++)l[p]||(l[p]=i);return l.join("")}var a=n(143),s=n(9),u=n(8),f=a.array,c=a.string.isString,l=Array.isArray;e.subset=function(){switch(arguments.length){case 2:return r(arguments[0],arguments[1]);case 3:case 4:return i(arguments[0],arguments[1],arguments[2],arguments[3]);default:throw new e.error.ArgumentsError("subset",arguments.length,2,4)}}}},function(e,r,n){"use strict";e.exports=function(e){var r=n(143),t=n(9),i=r.object,o=r.string;e.transpose=function(r){if(1!=arguments.length)throw new e.error.ArgumentsError("transpose",arguments.length,1);var n=e.size(r).valueOf();switch(n.length){case 0:return i.clone(r);case 1:return i.clone(r);case 2:var a,s=n[1],u=n[0],f=r instanceof t,c=r.valueOf(),l=[],p=i.clone;if(0===s)throw new RangeError("Cannot transpose a 2D matrix with no rows(size: "+o.format(n)+")");for(var m=0;s>m;m++){a=l[m]=[];for(var h=0;u>h;h++)a[h]=p(c[h][m])}return f?new t(l):l;default:throw new RangeError("Matrix must be two dimensional (size: "+o.format(n)+")")}}}},function(e,r,n){"use strict";e.exports=function(e,r){var t=n(143),i=e.type.BigNumber,o=n(9),a=n(13),s=t.array,u=Array.isArray;e.zeros=function(e){var n=a.argsToArray(arguments),t=e instanceof o?!0:u(e)?!1:"matrix"===r.matrix;if(0==n.length)return t?new o:[];var f=!1;n=n.map(function(e){return e instanceof i?(f=!0,e.toNumber()):e});var c=[],l=f?new i(0):0;return c=s.resize(c,n,l),t?new o(c):c}}},function(e,r,n){"use strict";e.exports=function(e){var r=n(9),t=n(136),i=n(13),o=i.isCollection;e.distribution=function(n){if(!a.hasOwnProperty(n))throw new Error("Unknown distribution "+n);var i=Array.prototype.slice.call(arguments,1),s=a[n].apply(this,i);return function(n){var i={random:function(n,t,i){var s,f,c;if(arguments.length>3)throw new e.error.ArgumentsError("random",arguments.length,0,3);if(1===arguments.length?o(n)?s=n:c=n:2===arguments.length?o(n)?(s=n,c=t):(f=n,c=t):(s=n,f=t,c=i),void 0===c&&(c=1),void 0===f&&(f=0),void 0!==s){var l=u(s.valueOf(),f,c,a);return s instanceof r?new r(l):l}return a(f,c)},randomInt:function(n,t,i){var a,f,c;if(arguments.length>3||arguments.length<1)throw new e.error.ArgumentsError("randomInt",arguments.length,1,3);if(1===arguments.length?o(n)?a=n:c=n:2===arguments.length?o(n)?(a=n,c=t):(f=n,c=t):(a=n,f=t,c=i),void 0===f&&(f=0),void 0!==a){var l=u(a.valueOf(),f,c,s);return a instanceof r?new r(l):l}return s(f,c)},pickRandom:function(n){if(1!==arguments.length)throw new e.error.ArgumentsError("pickRandom",arguments.length,1);if(n instanceof r)n=n.valueOf();else if(!Array.isArray(n))throw new e.error.UnsupportedTypeError("pickRandom",e["typeof"](n));if(t.size(n).length>1)throw new Error("Only one dimensional vectors supported");return n[Math.floor(Math.random()*n.length)]}},a=function(e,r){return e+n()*(r-e)},s=function(e,r){return Math.floor(e+n()*(r-e))},u=function(e,r,n,t){var i,o,a=[];if(e=e.slice(0),e.length>1)for(o=0,i=e.shift();i>o;o++)a.push(u(e,r,n,t));else for(o=0,i=e.shift();i>o;o++)a.push(t(r,n));return a};return i}(s)};var a={uniform:function(){return Math.random},normal:function(){return function(){for(var e,r,n=-1;0>n||n>1;)e=Math.random(),r=Math.random(),n=1/6*Math.pow(-2*Math.log(e),.5)*Math.cos(2*Math.PI*r)+.5;return n}}}}},function(e,r,n){"use strict";e.exports=function(e){var r=n(143),t=e.type.BigNumber,i=n(13),o=r.number.isNumber,a=r["boolean"].isBoolean,s=r.number.isInteger,u=i.isCollection;e.factorial=function c(r){var n,l;if(1!=arguments.length)throw new e.error.ArgumentsError("factorial",arguments.length,1);if(o(r)){if(!s(r)||0>r)throw new TypeError("Positive integer value expected in function factorial");for(n=r-1,l=r;n>1;)l*=n,n--;return 0==l&&(l=1),l}if(r instanceof t){if(!f(r))throw new TypeError("Positive integer value expected in function factorial");var p=new t(1);for(n=r.minus(p),l=r;n.gt(p);)l=l.times(n),n=n.minus(p);return l.equals(0)&&(l=p),l}if(a(r)||null===r)return 1;if(u(r))return i.deepMap(r,c);throw new e.error.UnsupportedTypeError("factorial",e["typeof"](r))};var f=function(e){return e.isInteger()&&e.gte(0)}}},function(e){"use strict";e.exports=function(e){e.random=e.distribution("uniform").random}},function(e){"use strict";e.exports=function(e){e.randomInt=e.distribution("uniform").randomInt}},function(e){"use strict";e.exports=function(e){e.distribution("uniform");e.pickRandom=e.distribution("uniform").pickRandom}},function(e,r,n){"use strict";e.exports=function(e){var r=n(143),t=e.type.BigNumber,i=r.number.isNumber,o=r.number.isInteger;e.permutations=function(r,n){var s,u,f=arguments.length;if(f>2)throw new e.error.ArgumentsError("permutations",arguments.length,2);if(i(r)){if(!o(r)||0>r)throw new TypeError("Positive integer value expected in function permutations");if(1==f)return e.factorial(r);if(2==f&&i(n)){if(!o(n)||0>n)throw new TypeError("Positive integer value expected in function permutations");if(n>r)throw new TypeError("second argument k must be less than or equal to first argument n");for(s=1,u=r-n+1;r>=u;u++)s*=u;return s}}if(r instanceof t){if(void 0===n&&a(r))return e.factorial(r);if(n=t.convert(n),!(n instanceof t&&a(r)&&a(n)))throw new TypeError("Positive integer value expected in function permutations");if(n.gt(r))throw new TypeError("second argument k must be less than or equal to first argument n");for(s=new t(1),u=r.minus(n).plus(1);u.lte(r);u=u.plus(1))s=s.times(u);return s}throw new e.error.UnsupportedTypeError("permutations",e["typeof"](r))};var a=function(e){return e.isInteger()&&e.gte(0)}}},function(e,r,n){"use strict";e.exports=function(e){var r=n(143),t=e.type.BigNumber,i=(n(13),r.number.isNumber),o=r.number.isInteger;e.combinations=function(r,n){var s,u,f,c,l=arguments.length;if(2!=l)throw new e.error.ArgumentsError("combinations",arguments.length,2);if(i(r)){if(!o(r)||0>r)throw new TypeError("Positive integer value enpected in function combinations");if(n>r)throw new TypeError("k must be less than or equal to n");for(s=Math.max(n,r-n),u=1,f=1;r-s>=f;f++)u=u*(s+f)/f;return u}if(r instanceof t){if(n=t.convert(n),!(n instanceof t&&a(r)&&a(n)))throw new TypeError("Positive integer value expected in function combinations");if(n.gt(r))throw new TypeError("k must be less than n in function combinations");for(s=r.minus(n),n.lt(s)&&(s=n),u=new t(1),f=new t(1),c=r.minus(s);f.lte(c);f=f.plus(1))u=u.times(s.plus(f)).dividedBy(f);return u}throw new e.error.UnsupportedTypeError("combinations",e["typeof"](r))};var a=function(e){return e.isInteger()&&e.gte(0)}}},function(e,r,n){"use strict";e.exports=function(e){function r(r,n){return e.smaller(r,n)?r:n}function t(r){var n=void 0;if(i.deepForEach(r,function(r){(void 0===n||e.smaller(r,n))&&(n=r)}),void 0===n)throw new Error("Cannot calculate min of an empty array");return n}var i=(n(9),n(13)),o=i.isCollection;e.min=function(e){if(0==arguments.length)throw new SyntaxError("Function min requires one or more parameters (0 provided)");if(o(e)){if(1==arguments.length)return t(e);if(2==arguments.length)return i.reduce(arguments[0],arguments[1],r);throw new SyntaxError("Wrong number of parameters")}return t(arguments)}}},function(e,r,n){"use strict";e.exports=function(e){function r(r,n){return e.larger(r,n)?r:n}function t(r){var n=void 0;if(i.deepForEach(r,function(r){(void 0===n||e.larger(r,n))&&(n=r)}),void 0===n)throw new Error("Cannot calculate max of an empty array");return n}var i=(n(9),n(13)),o=i.isCollection;e.max=function(e){if(0==arguments.length)throw new SyntaxError("Function max requires one or more parameters (0 provided)");if(o(e)){if(1==arguments.length)return t(e);if(2==arguments.length)return i.reduce(arguments[0],arguments[1],r);throw new SyntaxError("Wrong number of parameters")}return t(arguments)}}},function(e,r,n){"use strict";e.exports=function(e){function r(r,n){var t=i.reduce(r,n,e.add),o=s(r)?a(r):r.size();return e.divide(t,o[n])}function t(r){var n=0,t=0;if(i.deepForEach(r,function(r){n=e.add(n,r),t++}),0===t)throw new Error("Cannot calculate mean of an empty array");return e.divide(n,t)}var i=(n(9),n(13)),o=i.isCollection,a=n(136).size,s=Array.isArray;e.mean=function(e){if(0==arguments.length)throw new SyntaxError("Function mean requires one or more parameters (0 provided)");if(o(e)){if(1==arguments.length)return t(e);if(2==arguments.length)return r(arguments[0],arguments[1]);throw new SyntaxError("Wrong number of parameters")}return t(arguments)}}},function(e,r,n){"use strict";e.exports=function(e){function r(r){var n=u(r);n.sort(e.compare);var o=n.length;if(0==o)throw new Error("Cannot calculate median of an empty array");if(o%2==0){var s=n[o/2-1],f=n[o/2];if(!(a(s)||s instanceof i||s instanceof t))throw new e.error.UnsupportedTypeError("median",e["typeof"](s));if(!(a(f)||f instanceof i||f instanceof t))throw new e.error.UnsupportedTypeError("median",e["typeof"](f));return e.divide(e.add(s,f),2)}var c=n[(o-1)/2];if(!(a(c)||c instanceof i||c instanceof t))throw new e.error.UnsupportedTypeError("median",e["typeof"](c));return c}var t=(n(9),n(10)),i=e.type.BigNumber,o=n(13),a=n(4).isNumber,s=o.isCollection,u=n(136).flatten;e.median=function(e){if(0==arguments.length)throw new SyntaxError("Function median requires one or more parameters (0 provided)");if(s(e)){if(1==arguments.length)return r(e.valueOf());throw 2==arguments.length?new Error("median(A, dim) is not yet supported"):new SyntaxError("Wrong number of parameters")}return r(Array.prototype.slice.call(arguments))}}},function(e,r,n){"use strict";e.exports=function(e){function r(r){var n=void 0;if(t.deepForEach(r,function(r){n=void 0===n?r:e.multiply(n,r)}),void 0===n)throw new Error("Cannot calculate prod of an empty array");return n}var t=(n(9),n(13)),i=t.isCollection;e.prod=function(e){if(0==arguments.length)throw new SyntaxError("Function prod requires one or more parameters (0 provided)");if(i(e)){if(1==arguments.length)return r(e);throw 2==arguments.length?new Error("prod(A, dim) is not yet supported"):new SyntaxError("Wrong number of parameters")}return r(arguments)}}},function(e){"use strict";e.exports=function(e){e.std=function(){if(0==arguments.length)throw new SyntaxError("Function std requires one or more parameters (0 provided)");var r=e["var"].apply(null,arguments);return e.sqrt(r)}}},function(e,r,n){"use strict";e.exports=function(e){function r(r){var n=void 0;if(t.deepForEach(r,function(r){n=void 0===n?r:e.add(n,r)}),void 0===n)throw new Error("Cannot calculate sum of an empty array");return n}var t=(n(9),n(13)),i=t.isCollection;e.sum=function(e){if(0==arguments.length)throw new SyntaxError("Function sum requires one or more parameters (0 provided)");if(i(e)){if(1==arguments.length)return r(e);throw 2==arguments.length?new Error("sum(A, dim) is not yet supported"):new SyntaxError("Wrong number of parameters")}return r(arguments)}}},function(e,r,n){"use strict";e.exports=function(e){function r(r,n){var o=0,a=0;if(i.deepForEach(r,function(r){o=e.add(o,r),a++}),0===a)throw new Error("Cannot calculate var of an empty array");var s=e.divide(o,a);switch(o=0,i.deepForEach(r,function(r){var n=e.subtract(r,s);o=e.add(o,e.multiply(n,n))}),n){case"uncorrected":return e.divide(o,a);case"biased":return e.divide(o,a+1);case"unbiased":var u=o instanceof t?new t(0):0;return 1==a?u:e.divide(o,a-1);default:throw new Error('Unknown normalization "'+n+'". Choose "unbiased" (default), "uncorrected", or "biased".')}}var t=(n(9),e.type.BigNumber),i=n(13),o=i.isCollection,a=n(159).isString,s="unbiased";e["var"]=function(e,n){if(0==arguments.length)throw new SyntaxError("Function var requires one or more parameters (0 provided)");if(o(e)){if(1==arguments.length)return r(e,s);if(2==arguments.length){if(!a(n))throw new Error("String expected for parameter normalization");return r(e,n)}throw new SyntaxError("Wrong number of parameters")}return r(arguments,s)}}},function(e,r,n){"use strict";e.exports=function(e){var r=n(143),t=e.type.BigNumber,i=n(6),o=n(13),a=r.number.isNumber,s=r["boolean"].isBoolean,u=i.isComplex,f=o.isCollection;e.acos=function c(r){if(1!=arguments.length)throw new e.error.ArgumentsError("acos",arguments.length,1);if(a(r))return r>=-1&&1>=r?Math.acos(r):c(new i(r,0));if(u(r)){var n=new i(r.im*r.im-r.re*r.re+1,-2*r.re*r.im),l=e.sqrt(n),p=new i(l.re-r.im,l.im+r.re),m=e.log(p);return new i(1.5707963267948966-m.im,m.re)}if(f(r))return o.deepMap(r,c);if(s(r)||null===r)return Math.acos(r);if(r instanceof t)return c(r.toNumber());throw new e.error.UnsupportedTypeError("acos",e["typeof"](r))}}},function(e,r,n){"use strict";e.exports=function(e){var r=n(143),t=e.type.BigNumber,i=n(6),o=n(13),a=r.number.isNumber,s=r["boolean"].isBoolean,u=i.isComplex,f=o.isCollection;e.asin=function c(r){if(1!=arguments.length)throw new e.error.ArgumentsError("asin",arguments.length,1);if(a(r))return r>=-1&&1>=r?Math.asin(r):c(new i(r,0));if(u(r)){var n=r.re,l=r.im,p=new i(l*l-n*n+1,-2*n*l),m=e.sqrt(p),h=new i(m.re-l,m.im+n),g=e.log(h);return new i(g.im,-g.re)}if(f(r))return o.deepMap(r,c);if(s(r)||null===r)return Math.asin(r);if(r instanceof t)return c(r.toNumber());throw new e.error.UnsupportedTypeError("asin",e["typeof"](r))}}},function(e,r,n){"use strict";e.exports=function(e){var r=n(143),t=e.type.BigNumber,i=n(6),o=n(13),a=r.number.isNumber,s=r["boolean"].isBoolean,u=i.isComplex,f=o.isCollection;e.atan=function c(r){if(1!=arguments.length)throw new e.error.ArgumentsError("atan",arguments.length,1);if(a(r))return Math.atan(r);if(u(r)){var n=r.re,l=r.im,p=n*n+(1-l)*(1-l),m=new i((1-l*l-n*n)/p,-2*n/p),h=e.log(m);return new i(-.5*h.im,.5*h.re)}if(f(r))return o.deepMap(r,c);if(s(r)||null===r)return Math.atan(r);if(r instanceof t)return c(r.toNumber());throw new e.error.UnsupportedTypeError("atan",e["typeof"](r))}}},function(e,r,n){"use strict";e.exports=function(e){var r=n(143),t=e.type.BigNumber,i=n(6),o=n(13),a=r.number.isNumber,s=r["boolean"].isBoolean,u=(i.isComplex,o.isCollection);e.atan2=function f(r,n){if(2!=arguments.length)throw new e.error.ArgumentsError("atan2",arguments.length,2);if(a(r)&&a(n))return Math.atan2(r,n);if(u(r)||u(n))return o.deepMap2(r,n,f);if(s(r)||null===r)return f(+r,n);if(s(n)||null===n)return f(r,+n);if(r instanceof t)return f(r.toNumber(),n);if(n instanceof t)return f(r,n.toNumber());throw new e.error.UnsupportedTypeError("atan2",e["typeof"](r),e["typeof"](n))}}},function(e,r,n){"use strict";e.exports=function(e){var r=n(143),t=e.type.BigNumber,i=n(6),o=n(10),a=n(13),s=r.number.isNumber,u=r["boolean"].isBoolean,f=i.isComplex,c=o.isUnit,l=a.isCollection;e.cos=function p(r){if(1!=arguments.length)throw new e.error.ArgumentsError("cos",arguments.length,1);if(s(r))return Math.cos(r);if(f(r))return new i(.5*Math.cos(r.re)*(Math.exp(-r.im)+Math.exp(r.im)),.5*Math.sin(r.re)*(Math.exp(-r.im)-Math.exp(r.im)));if(c(r)){if(!r.hasBase(o.BASE_UNITS.ANGLE))throw new TypeError("Unit in function cos is no angle");return Math.cos(r.value)}if(l(r))return a.deepMap(r,p);if(u(r)||null===r)return Math.cos(r);if(r instanceof t)return p(r.toNumber());throw new e.error.UnsupportedTypeError("cos",e["typeof"](r))}}},function(e,r,n){"use strict";e.exports=function(e){var r=n(143),t=e.type.BigNumber,i=n(6),o=n(10),a=n(13),s=r.number.isNumber,u=r["boolean"].isBoolean,f=i.isComplex,c=o.isUnit,l=a.isCollection;e.cosh=function p(r){if(1!=arguments.length)throw new e.error.ArgumentsError("cosh",arguments.length,1);if(s(r))return(Math.exp(r)+Math.exp(-r))/2;if(f(r)){var n=Math.exp(r.re),m=Math.exp(-r.re);return new i(Math.cos(r.im)*(n+m)/2,Math.sin(r.im)*(n-m)/2)}if(c(r)){if(!r.hasBase(o.BASE_UNITS.ANGLE))throw new TypeError("Unit in function cosh is no angle");return p(r.value)}if(l(r))return a.deepMap(r,p);if(u(r)||null===r)return p(r?1:0);if(r instanceof t)return p(r.toNumber());throw new e.error.UnsupportedTypeError("cosh",e["typeof"](r))}}},function(e,r,n){"use strict";e.exports=function(e){var r=n(143),t=e.type.BigNumber,i=n(6),o=n(10),a=n(13),s=r.number.isNumber,u=r["boolean"].isBoolean,f=i.isComplex,c=o.isUnit,l=a.isCollection;e.cot=function p(r){if(1!=arguments.length)throw new e.error.ArgumentsError("cot",arguments.length,1);if(s(r))return 1/Math.tan(r);if(f(r)){var n=Math.exp(-4*r.im)-2*Math.exp(-2*r.im)*Math.cos(2*r.re)+1;return new i(2*Math.exp(-2*r.im)*Math.sin(2*r.re)/n,(Math.exp(-4*r.im)-1)/n)}if(c(r)){if(!r.hasBase(o.BASE_UNITS.ANGLE))throw new TypeError("Unit in function cot is no angle");return 1/Math.tan(r.value)}if(l(r))return a.deepMap(r,p);if(u(r)||null===r)return p(+r);if(r instanceof t)return p(r.toNumber());throw new e.error.UnsupportedTypeError("cot",e["typeof"](r))}}},function(e,r,n){"use strict";e.exports=function(e){var r=n(143),t=e.type.BigNumber,i=n(6),o=n(10),a=n(13),s=r.number.isNumber,u=r["boolean"].isBoolean,f=i.isComplex,c=o.isUnit,l=a.isCollection;e.coth=function p(r){if(1!=arguments.length)throw new e.error.ArgumentsError("coth",arguments.length,1);if(s(r)){var n=Math.exp(2*r);return(n+1)/(n-1)}if(f(r)){var m=Math.exp(2*r.re),h=m*Math.cos(2*r.im),g=m*Math.sin(2*r.im),d=(h-1)*(h-1)+g*g;return new i(((h+1)*(h-1)+g*g)/d,-2*g/d)}if(c(r)){if(!r.hasBase(o.BASE_UNITS.ANGLE))throw new TypeError("Unit in function coth is no angle");return p(r.value)}if(l(r))return a.deepMap(r,p);if(u(r)||null===r)return p(r?1:0);if(r instanceof t)return p(r.toNumber());throw new e.error.UnsupportedTypeError("coth",e["typeof"](r))}}},function(e,r,n){"use strict";e.exports=function(e){var r=n(143),t=e.type.BigNumber,i=n(6),o=n(10),a=n(13),s=r.number.isNumber,u=r["boolean"].isBoolean,f=i.isComplex,c=o.isUnit,l=a.isCollection;e.csc=function p(r){if(1!=arguments.length)throw new e.error.ArgumentsError("csc",arguments.length,1);if(s(r))return 1/Math.sin(r);if(f(r)){var n=.25*(Math.exp(-2*r.im)+Math.exp(2*r.im))-.5*Math.cos(2*r.re);return new i(.5*Math.sin(r.re)*(Math.exp(-r.im)+Math.exp(r.im))/n,.5*Math.cos(r.re)*(Math.exp(-r.im)-Math.exp(r.im))/n)}if(c(r)){if(!r.hasBase(o.BASE_UNITS.ANGLE))throw new TypeError("Unit in function csc is no angle");return 1/Math.sin(r.value)}if(l(r))return a.deepMap(r,p);if(u(r)||null===r)return p(+r);if(r instanceof t)return p(r.toNumber());throw new e.error.UnsupportedTypeError("csc",e["typeof"](r))}}},function(e,r,n){"use strict";e.exports=function(e){var r=n(143),t=e.type.BigNumber,i=n(6),o=n(10),a=n(13),s=r.number,u=r.number.isNumber,f=r["boolean"].isBoolean,c=i.isComplex,l=o.isUnit,p=a.isCollection;e.csch=function m(r){if(1!=arguments.length)throw new e.error.ArgumentsError("csch",arguments.length,1);if(u(r))return 0==r?Number.NaN:Math.abs(2/(Math.exp(r)-Math.exp(-r)))*s.sign(r);if(c(r)){var n=Math.exp(r.re),h=Math.exp(-r.re),g=Math.cos(r.im)*(n-h),d=Math.sin(r.im)*(n+h),x=g*g+d*d;return new i(2*g/x,-2*d/x)}if(l(r)){if(!r.hasBase(o.BASE_UNITS.ANGLE))throw new TypeError("Unit in function csch is no angle");return m(r.value)}if(p(r))return a.deepMap(r,m);if(f(r)||null===r)return m(r?1:0);if(r instanceof t)return m(r.toNumber());throw new e.error.UnsupportedTypeError("csch",e["typeof"](r))}}},function(e,r,n){"use strict";e.exports=function(e){var r=n(143),t=e.type.BigNumber,i=n(6),o=n(10),a=n(13),s=r.number.isNumber,u=r["boolean"].isBoolean,f=i.isComplex,c=o.isUnit,l=a.isCollection;e.sec=function p(r){if(1!=arguments.length)throw new e.error.ArgumentsError("sec",arguments.length,1);if(s(r))return 1/Math.cos(r);if(f(r)){var n=.25*(Math.exp(-2*r.im)+Math.exp(2*r.im))+.5*Math.cos(2*r.re);return new i(.5*Math.cos(r.re)*(Math.exp(-r.im)+Math.exp(r.im))/n,.5*Math.sin(r.re)*(Math.exp(r.im)-Math.exp(-r.im))/n)}if(c(r)){if(!r.hasBase(o.BASE_UNITS.ANGLE))throw new TypeError("Unit in function sec is no angle");return 1/Math.cos(r.value)}if(l(r))return a.deepMap(r,p);if(u(r)||null===r)return p(+r);if(r instanceof t)return p(r.toNumber());throw new e.error.UnsupportedTypeError("sec",e["typeof"](r))}}},function(e,r,n){"use strict";e.exports=function(e){var r=n(143),t=e.type.BigNumber,i=n(6),o=n(10),a=n(13),s=r.number.isNumber,u=r["boolean"].isBoolean,f=i.isComplex,c=o.isUnit,l=a.isCollection;e.sech=function p(r){if(1!=arguments.length)throw new e.error.ArgumentsError("sech",arguments.length,1);if(s(r))return 2/(Math.exp(r)+Math.exp(-r));if(f(r)){var n=Math.exp(r.re),m=Math.exp(-r.re),h=Math.cos(r.im)*(n+m),g=Math.sin(r.im)*(n-m),d=h*h+g*g;return new i(2*h/d,-2*g/d)}if(c(r)){if(!r.hasBase(o.BASE_UNITS.ANGLE))throw new TypeError("Unit in function sech is no angle");return p(r.value)}if(l(r))return a.deepMap(r,p);if(u(r)||null===r)return p(r?1:0);if(r instanceof t)return p(r.toNumber());throw new e.error.UnsupportedTypeError("sech",e["typeof"](r))}}},function(e,r,n){"use strict";e.exports=function(e){var r=n(143),t=e.type.BigNumber,i=n(6),o=n(10),a=n(13),s=r.number.isNumber,u=r["boolean"].isBoolean,f=i.isComplex,c=o.isUnit,l=a.isCollection;e.sin=function p(r){if(1!=arguments.length)throw new e.error.ArgumentsError("sin",arguments.length,1);if(s(r))return Math.sin(r);if(f(r))return new i(.5*Math.sin(r.re)*(Math.exp(-r.im)+Math.exp(r.im)),.5*Math.cos(r.re)*(Math.exp(r.im)-Math.exp(-r.im)));if(c(r)){if(!r.hasBase(o.BASE_UNITS.ANGLE))throw new TypeError("Unit in function sin is no angle");return Math.sin(r.value)}if(l(r))return a.deepMap(r,p);if(u(r)||null===r)return Math.sin(r);if(r instanceof t)return p(r.toNumber());throw new e.error.UnsupportedTypeError("sin",e["typeof"](r))}}},function(e,r,n){"use strict";e.exports=function(e){var r=n(143),t=e.type.BigNumber,i=n(6),o=n(10),a=n(13),s=r.number.isNumber,u=r["boolean"].isBoolean,f=i.isComplex,c=o.isUnit,l=a.isCollection;e.sinh=function p(r){if(1!=arguments.length)throw new e.error.ArgumentsError("sinh",arguments.length,1);if(s(r))return(Math.exp(r)-Math.exp(-r))/2;if(f(r)){var n=Math.cos(r.im),m=Math.sin(r.im),h=Math.exp(r.re),g=Math.exp(-r.re);return new i(n*(h-g)/2,m*(h+g)/2)}if(c(r)){if(!r.hasBase(o.BASE_UNITS.ANGLE))throw new TypeError("Unit in function sinh is no angle");return p(r.value)}if(l(r))return a.deepMap(r,p);if(u(r)||null===r)return p(r?1:0);if(r instanceof t)return p(r.toNumber());throw new e.error.UnsupportedTypeError("sinh",e["typeof"](r))}}},function(e,r,n){"use strict";e.exports=function(e){var r=n(143),t=e.type.BigNumber,i=n(6),o=n(10),a=n(13),s=r.number.isNumber,u=r["boolean"].isBoolean,f=i.isComplex,c=o.isUnit,l=a.isCollection;e.tan=function p(r){if(1!=arguments.length)throw new e.error.ArgumentsError("tan",arguments.length,1);if(s(r))return Math.tan(r);if(f(r)){var n=Math.exp(-4*r.im)+2*Math.exp(-2*r.im)*Math.cos(2*r.re)+1;return new i(2*Math.exp(-2*r.im)*Math.sin(2*r.re)/n,(1-Math.exp(-4*r.im))/n)}if(c(r)){if(!r.hasBase(o.BASE_UNITS.ANGLE))throw new TypeError("Unit in function tan is no angle");return Math.tan(r.value)}if(l(r))return a.deepMap(r,p);if(u(r)||null===r)return Math.tan(r);if(r instanceof t)return p(r.toNumber());throw new e.error.UnsupportedTypeError("tan",e["typeof"](r))}}},function(e,r,n){"use strict";e.exports=function(e){var r=n(143),t=e.type.BigNumber,i=n(6),o=n(10),a=n(13),s=r.number.isNumber,u=r["boolean"].isBoolean,f=i.isComplex,c=o.isUnit,l=a.isCollection;e.tanh=function p(r){if(1!=arguments.length)throw new e.error.ArgumentsError("tanh",arguments.length,1);if(s(r)){var n=Math.exp(2*r);return(n-1)/(n+1)}if(f(r)){var m=Math.exp(2*r.re),h=m*Math.cos(2*r.im),g=m*Math.sin(2*r.im),d=(h+1)*(h+1)+g*g;return new i(((h-1)*(h+1)+g*g)/d,2*g/d)}if(c(r)){if(!r.hasBase(o.BASE_UNITS.ANGLE))throw new TypeError("Unit in function tanh is no angle");return p(r.value)}if(l(r))return a.deepMap(r,p);if(u(r)||null===r)return p(r?1:0);if(r instanceof t)return p(r.toNumber());throw new e.error.UnsupportedTypeError("tanh",e["typeof"](r))}}},function(e,r,n){"use strict";e.exports=function(e){var r=n(143),t=n(10),i=n(13),o=r.string.isString,a=t.isUnit,s=i.isCollection;e.to=function u(r,n){if(2!=arguments.length)throw new e.error.ArgumentsError("to",arguments.length,2);if(a(r)&&(a(n)||o(n)))return r.to(n);if(s(r)||s(n))return i.deepMap2(r,n,u);throw new e.error.UnsupportedTypeError("to",e["typeof"](r),e["typeof"](n))}}},function(e,r,n){"use strict";e.exports=function(e){var r=n(143),t=r.object;e.clone=function(r){if(1!=arguments.length)throw new e.error.ArgumentsError("clone",arguments.length,1);return t.clone(r)}}},function(e,r,n){"use strict";e.exports=function(e){var r=n(143),t=r.string;e.format=function(r,n){var i=arguments.length;if(1!==i&&2!==i)throw new e.error.ArgumentsError("format",i,1,2);return t.format(r,n)}}},function(e,r,n){"use strict";e.exports=function(e){function r(r,n,t){(t.override||void 0===e[r])&&(e[r]=t.wrap&&"function"==typeof n?function(){for(var r=[],t=0,i=arguments.length;i>t;t++){var o=arguments[t];r[t]=o&&o.valueOf()}return n.apply(e,r)}:n,e.chaining.Selector.createProxy(r,n))}function t(e){return"function"==typeof e||s(e)||u(e)||f(e)||c(e)}var i=n(143),o=n(6),a=n(10),s=i.number.isNumber,u=i.string.isString,f=o.isComplex,c=a.isUnit;e["import"]=function l(i,o){var a=arguments.length;if(1!=a&&2!=a)throw new e.error.ArgumentsError("import",a,1,2);var s,f={override:o&&o.override||!1,wrap:o&&o.wrap||!1};if(u(i)){var c=n(177)(i);l(c,o)}else{if("object"!=typeof i)throw new TypeError("Object or module name expected");for(s in i)if(i.hasOwnProperty(s)){var p=i[s];t(p)?r(s,p,f):l(p,o)}}}}},function(e,r,n){"use strict";e.exports=function(e){function r(e,r){var n=[],t=function(i,o){return Array.isArray(i)?i.map(function(e,r){return n[o]=r,t(e,o+1)}):r(i,n,e)};return t(e,0)}var t=n(9).isMatrix;e.map=function(n,i){if(2!=arguments.length)throw new e.error.ArgumentsError("map",arguments.length,2);if(Array.isArray(n))return r(n,i);if(t(n))return n.map(i);throw new e.error.UnsupportedTypeError("map",e["typeof"](n))}}},function(e,r,n){"use strict";e.exports=function(e){var r=n(143),t=r.string.isString;e.print=function(r,n,i){var o=arguments.length;if(2!=o&&3!=o)throw new e.error.ArgumentsError("print",o,2,3);if(!t(r))throw new TypeError("String expected as first parameter in function format");if(!(n instanceof Object))throw new TypeError("Object expected as second parameter in function format");return r.replace(/\$([\w\.]+)/g,function(r,o){for(var a=o.split("."),s=n[a.shift()];a.length&&void 0!==s;){var u=a.shift();s=u?s[u]:s+"."}return void 0!==s?t(s)?s:e.format(s,i):r})}}},function(e,r,n){"use strict";e.exports=function(e){var r=n(9);e.sort=function(n,t){var i=null;if(1===arguments.length)i=e.compare;else{if(2!==arguments.length)throw new e.error.ArgumentsError("sort",arguments.length,1,2);if("function"==typeof t)i=t;else if("asc"===t)i=e.compare;else{if("desc"!==t)throw new e.error.UnsupportedTypeError("sort",e["typeof"](n),e["typeof"](t));i=function(r,n){return-e.compare(r,n)}}}if(n instanceof r){var o=n.size();if(o.length>1)throw new Error("Only one dimensional matrices supported");return new r(n.toArray().sort(i))}if(Array.isArray(n))return n.sort(i);throw new e.error.UnsupportedTypeError("sort",e["typeof"](n),e["typeof"](t))}}},function(e,r,n){"use strict";e.exports=function(e){var r=n(178),t=n(6),i=n(9),o=n(10),a=n(8),s=n(7),u=n(11);e["typeof"]=function(n){if(1!=arguments.length)throw new e.error.ArgumentsError("typeof",arguments.length,1);var f=r.type(n);if("object"===f){if(n instanceof t)return"complex";if(n instanceof i)return"matrix";if(n instanceof o)return"unit";if(n instanceof a)return"index";if(n instanceof s)return"range";if(n instanceof u)return"help";if(n instanceof e.type.BigNumber)return"bignumber";if(n instanceof e.chaining.Selector)return"selector"}return f}}},function(e,r,n){"use strict";e.exports=function(e){function r(e,r){var n=[],t=function(i,o){Array.isArray(i)?i.forEach(function(e,r){n[o]=r,t(e,o+1)}):r(i,n,e)};t(e,0)}var t=n(9).isMatrix;e.forEach=function(n,i){if(2!=arguments.length)throw new e.error.ArgumentsError("forEach",arguments.length,2);
if(Array.isArray(n))return r(n,i);if(t(n))return n.forEach(i);throw new e.error.UnsupportedTypeError("forEach",e["typeof"](n))}}},function(e,r,n){"use strict";{var t=n(142),i=n(4).isNumber;n(4).digits}r.isBigNumber=function(e){return e instanceof t},r.format=function(e,n){if("function"==typeof n)return n(e);if(!e.isFinite())return e.isNaN()?"NaN":e.gt(0)?"Infinity":"-Infinity";var t="auto",o=void 0;switch(void 0!==n&&(n.notation&&(t=n.notation),i(n)?o=n:n.precision&&(o=n.precision)),t){case"fixed":return r.toFixed(e,o);case"exponential":return r.toExponential(e,o);case"auto":var a=.001,s=1e5;n&&n.exponential&&(void 0!==n.exponential.lower&&(a=n.exponential.lower),void 0!==n.exponential.upper&&(s=n.exponential.upper));{({toExpNeg:e.constructor.toExpNeg,toExpPos:e.constructor.toExpPos})}if(e.constructor.config({toExpNeg:Math.round(Math.log(a)/Math.LN10),toExpPos:Math.round(Math.log(s)/Math.LN10)}),e.isZero())return"0";var u,f=e.abs();return u=f.gte(a)&&f.lt(s)?e.toSignificantDigits(o).toFixed():r.toExponential(e,o),u.replace(/((\.\d*?)(0+))($|e)/,function(){var e=arguments[2],r=arguments[4];return"."!==e?e+r:r});default:throw new Error('Unknown notation "'+t+'". Choose "auto", "exponential", or "fixed".')}},r.toExponential=function(e,r){return void 0!==r?e.toExponential(r-1):e.toExponential()},r.toFixed=function(e,r){return e.toFixed(r||0)}},function(e,r,n){"use strict";function t(e){for(var r=[];m(e);)r.push(e.length),e=e[0];return r}function i(e,r,n){var t,o=e.length;if(o!=r[n])throw new l(o,r[n]);if(n<r.length-1){var a=n+1;for(t=0;o>t;t++){var s=e[t];if(!m(s))throw new l(r.length-1,r.length,"<");i(e[t],r,a)}}else for(t=0;o>t;t++)if(m(e[t]))throw new l(r.length+1,r.length,">")}function o(e,n,t,i){var a,s,u=e.length,f=n[t],l=Math.min(u,f);if(e.length=f,t<n.length-1){var p=t+1;for(a=0;l>a;a++)s=e[a],m(s)||(s=[s],e[a]=s),o(s,n,p,i);for(a=l;f>a;a++)s=[],e[a]=s,o(s,n,p,i)}else{for(a=0;l>a;a++)for(;m(e[a]);)e[a]=e[a][0];if(i!==r.UNINITIALIZED)for(a=l;f>a;a++)e[a]=c.clone(i)}}function a(e,r,n){var t,i;if(r>n){var o=n+1;for(t=0,i=e.length;i>t;t++)e[t]=a(e[t],r,o)}else for(;m(e);)e=e[0];return e}function s(e,r,n){var t,i;if(m(e)){var o=n+1;for(t=0,i=e.length;i>t;t++)e[t]=s(e[t],r,o)}else for(var a=n;r>a;a++)e=[e];return e}var u=n(4),f=n(159),c=n(3),l=(n(178),n(139)),p=n(140),m=Array.isArray;r.size=function(e){var n=t(e);return r.validate(e,n),n},r.validate=function(e,r){var n=0==r.length;if(n){if(m(e))throw new l(e.length,0)}else i(e,r,0)},r.validateIndex=function(e,r){if(!u.isNumber(e)||!u.isInteger(e))throw new TypeError("Index must be an integer (value: "+e+")");if(0>e)throw new p(e);if(void 0!==r&&e>=r)throw new p(e,r)},r.UNINITIALIZED={},r.resize=function(e,r,n){if(!m(e)||!m(r))throw new TypeError("Array expected");if(0===r.length)throw new Error("Resizing to scalar is not supported");r.forEach(function(e){if(!u.isNumber(e)||!u.isInteger(e)||0>e)throw new TypeError("Invalid size, must contain positive integers (size: "+f.format(r)+")")});var t=void 0!==n?n:0;return o(e,r,0,t),e},r.squeeze=function(e,n){for(var t=n||r.size(e);m(e)&&1===e.length;)e=e[0],t.shift();for(var i=t.length;1===t[i-1];)i--;return i<t.length&&(e=a(e,i,0),t.length=i),e},r.unsqueeze=function(e,n,t,i){var o=i||r.size(e);if(t)for(var a=0;t>a;a++)e=[e],o.unshift(1);for(e=s(e,n,0);o.length<n;)o.push(1);return e},r.flatten=function(e){for(var r=e,n=Array.isArray;n(r[0]);){for(var t=[],i=0,o=r.length;o>i;i++)t=t.concat.apply(t,r[i]);r=t}return r},r.argsToArray=function(e){for(var r=[],n=0,t=e.length;t>n;n++)r[n]=e[n];return r},r.isArray=m},function(e){e.exports="0.27.0"},function(e){"use strict";function r(e,n,t,i){if(!(this instanceof r))throw new SyntaxError("Constructor must be called with the new operator");this.fn=e,this.count=n,this.min=t,this.max=i,this.message="Wrong number of arguments in function "+e+" ("+n+" provided, "+t+(void 0!=i?"-"+i:"")+" expected)",this.stack=(new Error).stack}r.prototype=new Error,r.prototype.constructor=Error,r.prototype.name="ArgumentsError",e.exports=r},function(e){"use strict";function r(e,n,t){if(!(this instanceof r))throw new SyntaxError("Constructor must be called with the new operator");this.actual=e,this.expected=n,this.relation=t,this.message="Dimension mismatch ("+(Array.isArray(e)?"["+e.join(", ")+"]":e)+" "+(this.relation||"!=")+" "+(Array.isArray(n)?"["+n.join(", ")+"]":n)+")",this.stack=(new Error).stack}r.prototype=new RangeError,r.prototype.constructor=RangeError,r.prototype.name="DimensionError",e.exports=r},function(e){"use strict";function r(e,n,t){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=n):(this.min=n,this.max=t),this.message=void 0!==this.min&&this.index<this.min?"Index out of range ("+this.index+" < "+this.min+")":void 0!==this.max&&this.index>=this.max?"Index out of range ("+this.index+" > "+(this.max-1)+")":"Index out of range ("+this.index+")",this.stack=(new Error).stack}r.prototype=new RangeError,r.prototype.constructor=RangeError,r.prototype.name="IndexError",e.exports=r},function(e){"use strict";function r(e){if(!(this instanceof r))throw new SyntaxError("Constructor must be called with the new operator");this.fn=e,this.types=Array.prototype.splice.call(arguments,1),this.message=e?0==this.types.length?"Unsupported type of argument in function "+e:"Function "+e+"("+this.types.join(", ")+") not supported":"Unsupported type of argument",this.stack=(new Error).stack}r.prototype=new TypeError,r.prototype.constructor=TypeError,r.prototype.name="UnsupportedTypeError",e.exports=r},function(e,r,n){var t;!function(i){"use strict";function o(e){for(var r,n,t=1,i=e.length,o=e[0]+"";i>t;t++){for(r=e[t]+"",n=T-r.length;n--;)r="0"+r;o+=r}for(i=o.length;"0"==o.charAt(--i););return o.slice(0,i+1||1)}function a(e,r,n,t){var i,o,a,s,u;for(o=1,a=e[0];a>=10;a/=10,o++);return a=r-o,0>a?(a+=T,i=0):(i=Math.ceil((a+1)/T),a%=T),o=N(10,T-a),u=e[i]%o|0,null==t?3>a?(0==a?u=u/100|0:1==a&&(u=u/10|0),s=4>n&&99999==u||n>3&&49999==u||5e4==u||0==u):s=(4>n&&u+1==o||n>3&&u+1==o/2)&&(e[i+1]/o/100|0)==N(10,a-2)-1||(u==o/2||0==u)&&0==(e[i+1]/o/100|0):4>a?(0==a?u=u/1e3|0:1==a?u=u/100|0:2==a&&(u=u/10|0),s=(t||4>n)&&9999==u||!t&&n>3&&4999==u):s=((t||4>n)&&u+1==o||!t&&n>3&&u+1==o/2)&&(e[i+1]/o/1e3|0)==N(10,a-3)-1,s}function s(e,r,n){var t=e.constructor;return null==r||((y=0>r||r>8)||0!==r&&(t.errors?parseInt:parseFloat)(r)!=r)&&!p(t,"rounding mode",r,n,0)?t.rounding:0|r}function u(e,r,n,t){var i=e.constructor;return!(y=(t||0)>r||r>=U+1)&&(0===r||(i.errors?parseInt:parseFloat)(r)==r)||p(i,"argument",r,n,0)}function f(e,r){var n,t,i,s,u,f,c,l=0,p=0,m=0,h=e.constructor,d=h.ONE,x=h.rounding,y=h.precision;if(!e.c||!e.c[0]||e.e>17)return new h(e.c?e.c[0]?e.s<0?0:1/0:d:e.s?e.s<0?0:e:0/0);for(null==r?(v=!1,u=y):u=r,c=new h(.03125);e.e>-2;)e=e.times(c),m+=5;for(t=Math.log(N(2,m))/Math.LN10*2+5|0,u+=t,n=s=f=new h(d),h.precision=u;;){if(s=g(s.times(e),u,1),n=n.times(++p),c=f.plus(z(s,n,u,1)),o(c.c).slice(0,u)===o(f.c).slice(0,u)){for(i=m;i--;)f=g(f.times(f),u,1);if(null!=r)return h.precision=y,f;if(!(3>l&&a(f.c,u-t,x,l)))return g(f,h.precision=y,x,v=!0);h.precision=u+=10,n=s=c=new h(d),p=0,l++}f=c}}function c(e,r,n,t){var i,a,s=e.constructor,u=(e=new s(e)).e;if(null==r?n=0:(g(e,++r,n),n=t?r:r+e.e-u),u=e.e,i=o(e.c),1==t||2==t&&(u>=r||u<=s.toExpNeg)){for(;i.length<n;i+="0");i.length>1&&(i=i.charAt(0)+"."+i.slice(1)),i+=(0>u?"e":"e+")+u}else{if(t=i.length,0>u){for(a=n-t;++u;i="0"+i);i="0."+i}else if(++u>t){for(a=n-u,u-=t;u--;i+="0");a>0&&(i+=".")}else a=n-t,t>u?i=i.slice(0,u)+"."+i.slice(u):a>0&&(i+=".");if(a>0)for(;a--;i+="0");}return e.s<0&&e.c[0]?"-"+i:i}function l(e){var r=e.length-1,n=r*T+1;if(r=e[r]){for(;r%10==0;r/=10,n--);for(r=e[0];r>=10;r/=10,n++);}return n}function p(e,r,n,t,i){if(e.errors){var o=new Error((t||["new Decimal","cmp","div","eq","gt","gte","lt","lte","minus","mod","plus","times","toFraction","pow","random","log","sqrt","toNearest","divToInt"][b?0>b?-b:b:0>1/b?1:0])+"() "+(["number type has more than 15 significant digits","LN10 out of digits"][r]||r+([y?" out of range":" not an integer"," not a boolean or binary digit"][i]||""))+": "+n);throw o.name="Decimal Error",y=b=0,o}}function m(e,r,n){var t=new e(e.ONE);for(v=!1;1&n&&(t=t.times(r)),n>>=1,n;)r=r.times(r);return v=!0,t}function h(e,r){var n,t,i,s,u,f,c,l,m,d,x,y=1,w=10,b=e,E=b.c,N=b.constructor,M=N.ONE,A=N.rounding,T=N.precision;if(b.s<0||!E||!E[0]||!b.e&&1==E[0]&&1==E.length)return new N(E&&!E[0]?-1/0:1!=b.s?0/0:E?0:b);if(null==r?(v=!1,c=T):c=r,N.precision=c+=w,n=o(E),t=n.charAt(0),!(Math.abs(s=b.e)<15e14))return b=new N(t+"."+n.slice(1)),c+2>B.length&&p(N,1,c+2,"ln"),b=h(b,c-w).plus(new N(B.slice(0,c+2)).times(s+"")),N.precision=T,null==r?g(b,T,A,v=!0):b;for(;7>t&&1!=t||1==t&&n.charAt(1)>3;)b=b.times(e),n=o(b.c),t=n.charAt(0),y++;for(s=b.e,t>1?(b=new N("0."+n),s++):b=new N(t+"."+n.slice(1)),d=b,l=u=b=z(b.minus(M),b.plus(M),c,1),x=g(b.times(b),c,1),i=3;;){if(u=g(u.times(x),c,1),m=l.plus(z(u,new N(i),c,1)),o(m.c).slice(0,c)===o(l.c).slice(0,c)){if(l=l.times(2),0!==s&&(c+2>B.length&&p(N,1,c+2,"ln"),l=l.plus(new N(B.slice(0,c+2)).times(s+""))),l=z(l,new N(y),c,1),null!=r)return N.precision=T,l;if(!a(l.c,c-w,A,f))return g(l,N.precision=T,A,v=!0);N.precision=c+=w,m=u=b=z(d.minus(M),d.plus(M),c,1),x=g(b.times(b),c,1),i=f=1}l=m,i+=2}}function g(e,r,n,t){var i,o,a,s,u,f,c,l,p=e.constructor;e:if(r!=o){if(!(c=e.c))return e;for(i=1,s=c[0];s>=10;s/=10,i++);if(o=r-i,0>o)o+=T,a=r,u=c[l=0],f=u/N(10,i-a-1)%10|0;else if(l=Math.ceil((o+1)/T),l>=c.length){if(!t)break e;for(;c.length<=l;c.push(0));u=f=0,i=1,o%=T,a=o-T+1}else{for(u=s=c[l],i=1;s>=10;s/=10,i++);o%=T,a=o-T+i,f=0>a?0:E(u/N(10,i-a-1)%10)}if(t=t||0>r||null!=c[l+1]||(0>a?u:u%N(10,i-a-1)),t=4>n?(f||t)&&(0==n||n==(e.s<0?3:2)):f>5||5==f&&(4==n||t||6==n&&(o>0?a>0?u/N(10,i-a):0:c[l-1])%10&1||n==(e.s<0?8:7)),1>r||!c[0])return c.length=0,t?(r-=e.e+1,c[0]=N(10,r%T),e.e=-r||0):c[0]=e.e=0,e;if(0==o?(c.length=l,s=1,l--):(c.length=l+1,s=N(10,T-o),c[l]=a>0?(u/N(10,i-a)%N(10,a)|0)*s:0),t)for(;;){if(0==l){for(o=1,a=c[0];a>=10;a/=10,o++);for(a=c[0]+=s,s=1;a>=10;a/=10,s++);o!=s&&(e.e++,c[0]==A&&(c[0]=1));break}if(c[l]+=s,c[l]!=A)break;c[l--]=0,s=1}for(o=c.length;0===c[--o];c.pop());}return v&&(e.e>p.maxE?e.c=e.e=null:e.e<p.minE&&(e.c=[e.e=0])),e}var d,x,y,w=i.crypto,v=!0,b=0,E=Math.floor,N=Math.pow,M=Object.prototype.toString,A=1e7,T=7,S="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_",O={},C=9e15,U=1e9,q=3e3,B="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058";O.absoluteValue=O.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),g(e)},O.ceil=function(){return g(new this.constructor(this),this.e+1,2)},O.comparedTo=O.cmp=function(e,r){var n,t=this,i=t.c,o=(b=-b,e=new t.constructor(e,r),e.c),a=t.s,s=e.s,u=t.e,f=e.e;if(!a||!s)return null;if(n=i&&!i[0],r=o&&!o[0],n||r)return n?r?0:-s:a;if(a!=s)return a;if(n=0>a,!i||!o)return u==f?0:!i^n?1:-1;if(u!=f)return u>f^n?1:-1;for(a=-1,s=(u=i.length)<(f=o.length)?u:f;++a<s;)if(i[a]!=o[a])return i[a]>o[a]^n?1:-1;return u==f?0:u>f^n?1:-1},O.decimalPlaces=O.dp=function(){var e,r,n=null;if(e=this.c){if(n=((r=e.length-1)-E(this.e/T))*T,r=e[r])for(;r%10==0;r/=10,n--);0>n&&(n=0)}return n},O.dividedBy=O.div=function(e,r){return b=2,z(this,new this.constructor(e,r))},O.dividedToIntegerBy=O.divToInt=function(e,r){var n=this,t=n.constructor;return b=18,g(z(n,new t(e,r),0,1,1),t.precision,t.rounding)},O.equals=O.eq=function(e,r){return b=3,0===this.cmp(e,r)},O.exponential=O.exp=function(){return f(this)},O.floor=function(){return g(new this.constructor(this),this.e+1,3)},O.greaterThan=O.gt=function(e,r){return b=4,this.cmp(e,r)>0},O.greaterThanOrEqualTo=O.gte=function(e,r){return b=5,r=this.cmp(e,r),1==r||0===r},O.isFinite=function(){return!!this.c},O.isInteger=O.isInt=function(){return!!this.c&&E(this.e/T)>this.c.length-2},O.isNaN=function(){return!this.s},O.isNegative=O.isNeg=function(){return this.s<0},O.isZero=function(){return!!this.c&&0==this.c[0]},O.lessThan=O.lt=function(e,r){return b=6,this.cmp(e,r)<0},O.lessThanOrEqualTo=O.lte=function(e,r){return b=7,r=this.cmp(e,r),-1==r||0===r},O.logarithm=O.log=function(e,r){var n,t,i,s,u,f,c,l,m,d=this,x=d.constructor,y=x.precision,w=x.rounding,E=5;if(null==e)e=new x(10),n=!0;else{if(b=15,e=new x(e,r),t=e.c,e.s<0||!t||!t[0]||!e.e&&1==t[0]&&1==t.length)return new x(0/0);n=e.eq(10)}if(t=d.c,d.s<0||!t||!t[0]||!d.e&&1==t[0]&&1==t.length)return new x(t&&!t[0]?-1/0:1!=d.s?0/0:t?0:1/0);if(u=n&&(s=t[0],t.length>1||1!=s&&10!=s&&100!=s&&1e3!=s&&1e4!=s&&1e5!=s&&1e6!=s),v=!1,c=y+E,l=c+10,f=h(d,c),n?(l>B.length&&p(x,1,l,"log"),i=new x(B.slice(0,l))):i=h(e,c),m=z(f,i,c,1),a(m.c,s=y,w))do if(c+=10,f=h(d,c),n?(l=c+10,l>B.length&&p(x,1,l,"log"),i=new x(B.slice(0,l))):i=h(e,c),m=z(f,i,c,1),!u){+o(m.c).slice(s+1,s+15)+1==1e14&&(m=g(m,y+1,0));break}while(a(m.c,s+=10,w));return v=!0,g(m,y,w)},O.minus=function(e,r){var n,t,i,o,a=this,s=a.constructor,u=a.s;if(b=8,e=new s(e,r),r=e.s,!u||!r)return new s(0/0);if(u!=r)return e.s=-r,a.plus(e);var f=a.c,c=e.c,l=E(e.e/T),p=E(a.e/T),m=s.precision,h=s.rounding;if(!p||!l){if(!f||!c)return f?(e.s=-r,e):new s(c?a:0/0);if(!f[0]||!c[0])return a=c[0]?(e.s=-r,e):new s(f[0]?a:3==h?-0:0),v?g(a,m,h):a}if(f=f.slice(),t=f.length,u=p-l){for((o=0>u)?(u=-u,n=f,t=c.length):(l=p,n=c),(p=Math.ceil(m/T))>t&&(t=p),u>(t+=2)&&(u=t,n.length=1),n.reverse(),r=u;r--;n.push(0));n.reverse()}else for((o=t<(i=c.length))&&(i=t),u=r=0;i>r;r++)if(f[r]!=c[r]){o=f[r]<c[r];break}if(o&&(n=f,f=c,c=n,e.s=-e.s),(r=-((i=f.length)-c.length))>0)for(;r--;f[i++]=0);for(p=A-1,r=c.length;r>u;){if(f[--r]<c[r]){for(t=r;t&&!f[--t];f[t]=p);--f[t],f[r]+=A}f[r]-=c[r]}for(;0==f[--i];f.pop());for(;0==f[0];f.shift(),--l);for(f[0]||(f=[l=0],e.s=3==h?-1:1),e.c=f,u=1,r=f[0];r>=10;r/=10,u++);return e.e=u+l*T-1,v?g(e,m,h):e},O.modulo=O.mod=function(e,r){var n,t,i=this,o=i.constructor,a=o.modulo;return b=9,e=new o(e,r),r=e.s,n=!i.c||!r||e.c&&!e.c[0],n||!e.c||i.c&&!i.c[0]?n?new o(0/0):g(new o(i),o.precision,o.rounding):(v=!1,9==a?(e.s=1,t=z(i,e,0,3,1),e.s=r,t.s*=r):t=z(i,e,0,a,1),t=t.times(e),v=!0,i.minus(t))},O.naturalLogarithm=O.ln=function(){return h(this)},O.negated=O.neg=function(){var e=new this.constructor(this);return e.s=-e.s||null,g(e)},O.plus=function(e,r){var n,t=this,i=t.constructor,o=t.s;if(b=10,e=new i(e,r),r=e.s,!o||!r)return new i(0/0);if(o!=r)return e.s=-r,t.minus(e);var a=t.c,s=e.c,u=E(e.e/T),f=E(t.e/T),c=i.precision,l=i.rounding;if(!f||!u){if(!a||!s)return new i(o/0);if(!a[0]||!s[0])return t=s[0]?e:new i(a[0]?t:0*o),v?g(t,c,l):t}if(a=a.slice(),o=f-u){for(0>o?(o=-o,n=a,r=s.length):(u=f,n=s,r=a.length),(f=Math.ceil(c/T))>r&&(r=f),o>++r&&(o=r,n.length=1),n.reverse();o--;n.push(0));n.reverse()}for(a.length-s.length<0&&(n=s,s=a,a=n),o=s.length,r=0,f=A;o;a[o]%=f)r=(a[--o]=a[o]+s[o]+r)/f|0;for(r&&(a.unshift(r),++u),o=a.length;0==a[--o];a.pop());for(e.c=a,o=1,r=a[0];r>=10;r/=10,o++);return e.e=o+u*T-1,v?g(e,c,l):e},O.precision=O.sd=function(e){var r=null,n=this;return e!=r&&e!==!!e&&1!==e&&0!==e&&p(n.constructor,"argument",e,"precision",1),n.c&&(r=l(n.c),e&&n.e+1>r&&(r=n.e+1)),r},O.round=function(){var e=this,r=e.constructor;return g(new r(e),e.e+1,r.rounding)},O.squareRoot=O.sqrt=function(){var e,r,n,t,i,a,s=this,u=s.c,f=s.s,c=s.e,l=s.constructor,p=new l(.5);if(1!==f||!u||!u[0])return new l(!f||0>f&&(!u||u[0])?0/0:u?s:1/0);for(v=!1,f=Math.sqrt(+s),0==f||f==1/0?(r=o(u),(r.length+c)%2==0&&(r+="0"),f=Math.sqrt(r),c=E((c+1)/2)-(0>c||c%2),f==1/0?r="1e"+c:(r=f.toExponential(),r=r.slice(0,r.indexOf("e")+1)+c),t=new l(r)):t=new l(f.toString()),n=(c=l.precision)+3;;)if(a=t,t=p.times(a.plus(z(s,a,n+2,1))),o(a.c).slice(0,n)===(r=o(t.c)).slice(0,n)){if(r=r.slice(n-3,n+1),"9999"!=r&&(i||"4999"!=r)){(!+r||!+r.slice(1)&&"5"==r.charAt(0))&&(g(t,c+1,1),e=!t.times(t).eq(s));break}if(!i&&(g(a,c+1,0),a.times(a).eq(s))){t=a;break}n+=4,i=1}return v=!0,g(t,c,l.rounding,e)},O.times=function(e,r){var n,t,i=this,o=i.constructor,a=i.c,s=(b=11,e=new o(e,r),e.c),u=E(i.e/T),f=E(e.e/T),c=i.s;if(r=e.s,e.s=c==r?1:-1,!((u||a&&a[0])&&(f||s&&s[0])))return new o(!c||!r||a&&!a[0]&&!s||s&&!s[0]&&!a?0/0:a&&s?0*e.s:e.s/0);for(t=u+f,c=a.length,r=s.length,r>c&&(n=a,a=s,s=n,f=c,c=r,r=f),f=c+r,n=[];f--;n.push(0));for(u=r-1;u>-1;u--){for(r=0,f=c+u;f>u;r=r/A|0)r=n[f]+s[u]*a[f-u-1]+r,n[f--]=r%A|0;r&&(n[f]=(n[f]+r)%A)}for(r&&++t,n[0]||n.shift(),f=n.length;!n[--f];n.pop());for(e.c=n,c=1,r=n[0];r>=10;r/=10,c++);return e.e=c+t*T-1,v?g(e,o.precision,o.rounding):e},O.toDecimalPlaces=O.toDP=function(e,r){var n=this;return n=new n.constructor(n),null!=e&&u(n,e,"toDP")?g(n,(0|e)+n.e+1,s(n,r,"toDP")):n},O.toExponential=function(e,r){var n=this;return n.c?c(n,null!=e&&u(n,e,"toExponential")?0|e:null,null!=e&&s(n,r,"toExponential"),1):n.toString()},O.toFixed=function(e,r){var n,t=this,i=t.constructor,o=i.toExpNeg,a=i.toExpPos;return null!=e&&(e=u(t,e,n="toFixed")?t.e+(0|e):null,r=s(t,r,n)),i.toExpNeg=-(i.toExpPos=1/0),null!=e&&t.c?(n=c(t,e,r),t.s<0&&t.c&&(t.c[0]?n.indexOf("-")<0&&(n="-"+n):n=n.replace("-",""))):n=t.toString(),i.toExpNeg=o,i.toExpPos=a,n},O.toFormat=function(e,r,n){var t=this.toFixed(r).split(".");return t[0].replace(/\B(?=(\d{3})+$)/g,null==e?",":e+"")+(t[1]?"."+(n?t[1].replace(/\d{5}\B/g,"$&"+n):t[1]):"")},O.toFraction=function(e){var r,n,t,i,a,s,u,f,c=this,m=c.constructor,h=r=new m(m.ONE),g=s=new m(0),d=c.c,x=new m(g);if(!d)return c.toString();for(t=x.e=l(d)-c.e-1,x.c[0]=N(10,(u=t%T)<0?T+u:u),(null==e||(!(b=12,a=new m(e)).s||(y=a.cmp(h)<0||!a.c)||m.errors&&E(a.e/T)<a.c.length-1)&&!p(m,"max denominator",e,"toFraction",0)||(e=a).cmp(x)>0)&&(e=t>0?x:h),v=!1,a=new m(o(d)),u=m.precision,m.precision=t=d.length*T*2;f=z(a,x,0,1,1),n=r.plus(f.times(g)),1!=n.cmp(e);)r=g,g=n,h=s.plus(f.times(n=h)),s=n,x=a.minus(f.times(n=x)),a=n;return n=z(e.minus(r),g,0,1,1),s=s.plus(n.times(h)),r=r.plus(n.times(g)),s.s=h.s=c.s,i=z(h,g,t,1).minus(c).abs().cmp(z(s,r,t,1).minus(c).abs())<1?[h+"",g+""]:[s+"",r+""],v=!0,m.precision=u,i},O.toNearest=function(e,r){var n=this,t=n.constructor;return n=new t(n),null==e?(e=new t(t.ONE),r=t.rounding):(b=17,e=new t(e),r=s(n,r,"toNearest")),e.c?n.c&&(e.c[0]?(v=!1,n=z(n,e,0,4>r?[4,5,7,8][r]:r,1).times(e),v=!0,g(n)):n.c=[n.e=0]):n.s&&(e.s&&(e.s=n.s),n=e),n},O.toNumber=function(){var e=this;return+e||(e.s?0*e.s:0/0)},O.toPower=O.pow=function(e,r){var n,t,i,s,u=this,c=u.constructor,l=u.s,p=(b=13,+(e=new c(e,r))),d=0>p?-p:p,x=c.precision,y=c.rounding;if(!u.c||!e.c||(i=!u.c[0])||!e.c[0])return new c(N(i?0*l:+u,p));if(u=new c(u),n=u.c.length,!u.e&&u.c[0]==u.s&&1==n)return u;if(r=e.c.length-1,e.e||e.c[0]!=e.s||r)if(t=E(e.e/T),i=t>=r,!i&&0>l)s=new c(0/0);else{if(i&&q>n*T*d){if(s=m(c,u,d),e.s<0)return c.ONE.div(s)}else{if(l=0>l&&1&e.c[Math.max(t,r)]?-1:1,r=N(+u,p),t=0!=r&&isFinite(r)?new c(r+"").e:E(p*(Math.log("0."+o(u.c))/Math.LN10+u.e+1)),t>c.maxE+1||t<c.minE-1)return new c(t>0?l/0:0);v=!1,c.rounding=u.s=1,d=Math.min(12,(t+"").length),s=f(e.times(h(u,x+d)),x),s=g(s,x+5,1),a(s.c,x,y)&&(t=x+10,s=g(f(e.times(h(u,t+d)),t),t+5,1),+o(s.c).slice(x+1,x+15)+1==1e14&&(s=g(s,x+1,0))),s.s=l,v=!0,c.rounding=y}s=g(s,x,y)}else s=g(u,x,y);return s},O.toPrecision=function(e,r){var n=this;return null!=e&&u(n,e,"toPrecision",1)&&n.c?c(n,0|--e,s(n,r,"toPrecision"),2):n.toString()},O.toSignificantDigits=O.toSD=function(e,r){var n=this,t=n.constructor;return n=new t(n),null!=e&&u(n,e,"toSD",1)?g(n,0|e,s(n,r,"toSD")):g(n,t.precision,t.rounding)},O.toString=function(e){var r,n,t,i=this,a=i.constructor,s=i.e;if(null===s)n=i.s?"Infinity":"NaN";else{if(e===r&&(s<=a.toExpNeg||s>=a.toExpPos))return c(i,null,a.rounding,1);if(n=o(i.c),0>s){for(;++s;n="0"+n);n="0."+n}else if(t=n.length,s>0)if(++s>t)for(s-=t;s--;n+="0");else t>s&&(n=n.slice(0,s)+"."+n.slice(s));else if(r=n.charAt(0),t>1)n=r+"."+n.slice(1);else if("0"==r)return r;if(null!=e)if((y=!(e>=2&&65>e))||e!=(0|e)&&a.errors)p(a,"base",e,"toString",0);else if(n=d(a,n,0|e,10,i.s),"0"==n)return n}return i.s<0?"-"+n:n},O.truncated=O.trunc=function(){return g(new this.constructor(this),this.e+1,1)},O.valueOf=O.toJSON=function(){return this.toString()},d=function(){function e(e,r,n){for(var t,i,o=[0],a=0,s=e.length;s>a;){for(i=o.length;i--;o[i]*=r);for(o[t=0]+=S.indexOf(e.charAt(a++));t<o.length;t++)o[t]>n-1&&(null==o[t+1]&&(o[t+1]=0),o[t+1]+=o[t]/n|0,o[t]%=n)}return o.reverse()}return function(r,n,t,i,o){var a,s,u,f,c,l,p=n.indexOf("."),h=r.precision,g=r.rounding;for(37>i&&(n=n.toLowerCase()),p>=0&&(n=n.replace(".",""),l=new r(i),f=m(r,l,n.length-p),l.c=e(f.toFixed(),10,t),l.e=l.c.length),c=e(n,i,t),a=s=c.length;0==c[--s];c.pop());if(!c[0])return"0";if(0>p?a--:(f.c=c,f.e=a,f.s=o,f=z(f,l,h,g,0,t),c=f.c,u=f.r,a=f.e),p=c[h],s=t/2,u=u||null!=c[h+1],4>g?(null!=p||u)&&(0==g||g==(f.s<0?3:2)):p>s||p==s&&(4==g||u||6==g&&1&c[h-1]||g==(f.s<0?8:7)))for(c.length=h,--t;++c[--h]>t;)c[h]=0,h||(++a,c.unshift(1));else c.length=h;for(s=c.length;!c[--s];);for(p=0,n="";s>=p;n+=S.charAt(c[p++]));if(0>a){for(;++a;n="0"+n);n="0."+n}else if(p=n.length,++a>p)for(a-=p;a--;n+="0");else p>a&&(n=n.slice(0,a)+"."+n.slice(a));return n}}();var z=function(){function e(e,r,n){var t,i=0,o=e.length;for(e=e.slice();o--;)t=e[o]*r+i,e[o]=t%n|0,i=t/n|0;return i&&e.unshift(i),e}function r(e,r,n,t){var i,o;if(n!=t)o=n>t?1:-1;else for(i=o=0;n>i;i++)if(e[i]!=r[i]){o=e[i]>r[i]?1:-1;break}return o}function n(e,r,n,t){for(var i=0;n--;)e[n]-=i,i=e[n]<r[n]?1:0,e[n]=i*t+e[n]-r[n];for(;!e[0]&&e.length>1;e.shift());}return function(t,i,o,a,s,u){var f,c,l,p,m,h,d,x,y,w,v,b,N,M,S,O,C,U,q,B=t.constructor,z=t.s==i.s?1:-1,I=t.c,_=i.c;if(!(I&&I[0]&&_&&_[0]))return new B(t.s&&i.s&&(I?!_||I[0]!=_[0]:_)?I&&0==I[0]||!_?0*z:z/0:0/0);for(u?(p=1,c=t.e-i.e):(u=A,p=T,c=E(t.e/p)-E(i.e/p)),U=_.length,O=I.length,y=new B(z),w=y.c=[],l=0;_[l]==(I[l]||0);l++);if(_[l]>(I[l]||0)&&c--,null==o?(z=o=B.precision,a=B.rounding):z=s?o+(t.e-i.e)+1:o,0>z)w.push(1),m=!0;else{if(z=z/p+2|0,l=0,1==U){for(h=0,_=_[0],z++;(O>l||h)&&z--;l++)M=h*u+(I[l]||0),w[l]=M/_|0,h=M%_|0;m=h||O>l}else{for(h=u/(_[0]+1)|0,h>1&&(_=e(_,h,u),I=e(I,h,u),U=_.length,O=I.length),S=U,v=I.slice(0,U),b=v.length;U>b;v[b++]=0);q=_.slice(),q.unshift(0),C=_[0],_[1]>=u/2&&C++;do h=0,f=r(_,v,U,b),0>f?(N=v[0],U!=b&&(N=N*u+(v[1]||0)),h=N/C|0,h>1?(h>=u&&(h=u-1),d=e(_,h,u),x=d.length,b=v.length,f=r(d,v,x,b),1==f&&(h--,n(d,x>U?q:_,x,u))):(0==h&&(f=h=1),d=_.slice()),x=d.length,b>x&&d.unshift(0),n(v,d,b,u),-1==f&&(b=v.length,f=r(_,v,U,b),1>f&&(h++,n(v,b>U?q:_,b,u))),b=v.length):0===f&&(h++,v=[0]),w[l++]=h,f&&v[0]?v[b++]=I[S]||0:(v=[I[S]],b=1);while((S++<O||null!=v[0])&&z--);m=null!=v[0]}w[0]||w.shift()}if(1==p)y.e=c,y.r=+m;else{for(l=1,z=w[0];z>=10;z/=10,l++);y.e=l+c*p-1,g(y,s?o+y.e+1:o,a,m)}return y}}();x=function(){function e(e){var r,n,t,i=this,o="config",a=i.errors?parseInt:parseFloat;return e==n||"object"!=typeof e&&!p(i,"object expected",e,o)?i:((t=e[r="precision"])!=n&&((y=1>t||t>U)||a(t)!=t?p(i,r,t,o,0):i[r]=0|t),(t=e[r="rounding"])!=n&&((y=0>t||t>8)||a(t)!=t?p(i,r,t,o,0):i[r]=0|t),(t=e[r="toExpNeg"])!=n&&((y=-C>t||t>0)||a(t)!=t?p(i,r,t,o,0):i[r]=E(t)),(t=e[r="toExpPos"])!=n&&((y=0>t||t>C)||a(t)!=t?p(i,r,t,o,0):i[r]=E(t)),(t=e[r="minE"])!=n&&((y=-C>t||t>0)||a(t)!=t?p(i,r,t,o,0):i[r]=E(t)),(t=e[r="maxE"])!=n&&((y=0>t||t>C)||a(t)!=t?p(i,r,t,o,0):i[r]=E(t)),(t=e[r="errors"])!=n&&(t===!!t||1===t||0===t?(y=b=0,i[r]=!!t):p(i,r,t,o,1)),(t=e[r="crypto"])!=n&&(t===!!t||1===t||0===t?i[r]=!(!t||!w||"object"!=typeof w):p(i,r,t,o,1)),(t=e[r="modulo"])!=n&&((y=0>t||t>9)||a(t)!=t?p(i,r,t,o,0):i[r]=0|t),i)}function r(e){return new this(e).exp()}function n(e){return new this(e).ln()}function t(e,r){return new this(e).log(r)}function i(e,r,n){var t,i,o=0;for("[object Array]"==M.call(r[0])&&(r=r[0]),t=new e(r[0]);++o<r.length;){if(i=new e(r[o]),!i.s){t=i;break}t[n](i)&&(t=i)}return t}function o(){return i(this,arguments,"lt")}function a(){return i(this,arguments,"gt")}function s(e,r){return new this(e).pow(r)}function f(e){var r,n,t,i=0,o=[],a=this,s=new a(a.ONE);if(null!=e&&u(s,e,"random")?e|=0:e=a.precision,n=Math.ceil(e/T),a.crypto)if(w&&w.getRandomValues)for(r=w.getRandomValues(new Uint32Array(n));n>i;)t=r[i],t>=429e7?r[i]=w.getRandomValues(new Uint32Array(1))[0]:o[i++]=t%1e7;else if(w&&w.randomBytes){for(r=w.randomBytes(n*=4);n>i;)t=r[i]+(r[i+1]<<8)+(r[i+2]<<16)+((127&r[i+3])<<24),t>=214e7?w.randomBytes(4).copy(r,i):(o.push(t%1e7),i+=4);i=n/4}else p(a,"crypto unavailable",w,"random");if(!i)for(;n>i;)o[i++]=1e7*Math.random()|0;for(n=o[--i],e%=T,n&&e&&(t=N(10,T-e),o[i]=(n/t|0)*t);0===o[i];i--)o.pop();if(0>i)o=[n=0];else{for(n=-1;0===o[0];)o.shift(),n-=T;for(i=1,t=o[0];t>=10;)t/=10,i++;T>i&&(n-=T-i)}return s.e=n,s.c=o,s}function c(e){return new this(e).sqrt()}function l(i){function u(e,r){var n=this;if(!(n instanceof u))return p(u,"Decimal called without new",e),new u(e,r);if(e instanceof u){if(null==r)return b=0,n.constructor=e.constructor,n.s=e.s,n.e=e.e,void(n.c=(e=e.c)?e.slice():e);if(10==r)return g(new u(e),u.precision,u.rounding);e+=""}return m(n.constructor=u,n,e,r)}return u.precision=20,u.rounding=4,u.modulo=1,u.toExpNeg=-7,u.toExpPos=21,u.minE=-C,u.maxE=C,u.errors=!0,u.crypto=!1,u.prototype=O,u.ONE=new u(1),u.ROUND_UP=0,u.ROUND_DOWN=1,u.ROUND_CEIL=2,u.ROUND_FLOOR=3,u.ROUND_HALF_UP=4,u.ROUND_HALF_DOWN=5,u.ROUND_HALF_EVEN=6,u.ROUND_HALF_CEIL=7,u.ROUND_HALF_FLOOR=8,u.EUCLID=9,u.config=e,u.constructor=l,u.exp=r,u.ln=n,u.log=t,u.max=o,u.min=a,u.pow=s,u.sqrt=c,u.random=f,null!=i&&u.config(i),u}var m=function(){var e=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,r=String.prototype.trim||function(){return this.replace(/^\s+|\s+$/g,"")};return function(n,t,i,o){var a,s,u,f,c,l;if("string"!=typeof i&&(i=(f="number"==typeof i||"[object Number]"==M.call(i))&&0===i&&0>1/i?"-0":i+""),c=i,o==s&&e.test(i))t.s="-"==i.charAt(0)?(i=i.slice(1),-1):1;else{if(10==o)return g(new n(i),n.precision,n.rounding);if(i=r.call(i).replace(/^\+(?!-)/,""),t.s="-"==i.charAt(0)?(i=i.replace(/^-(?!-)/,""),-1):1,o!=s?o!=(0|o)&&n.errors||(y=!(o>=2&&65>o))?(p(n,"base",o,0,0),l=e.test(i)):(a="["+S.slice(0,o=0|o)+"]+",i=i.replace(/\.$/,"").replace(/^\./,"0."),(l=new RegExp("^"+a+"(?:\\."+a+")?$",37>o?"i":"").test(i))?(f&&(i.replace(/^0\.0*|\./,"").length>15&&p(n,0,c),f=!f),i=d(n,i,10,o,t.s)):"Infinity"!=i&&"NaN"!=i&&(p(n,"not a base "+o+" number",c),i="NaN")):l=e.test(i),!l)return t.c=t.e=null,"Infinity"!=i&&("NaN"!=i&&p(n,"not a number",c),t.s=null),b=0,t}for((s=i.indexOf("."))>-1&&(i=i.replace(".","")),(u=i.search(/e/i))>0?(0>s&&(s=u),s+=+i.slice(u+1),i=i.substring(0,u)):0>s&&(s=i.length),u=0;"0"==i.charAt(u);u++);for(o=i.length;"0"==i.charAt(--o););if(i=i.slice(u,o+1)){if(o=i.length,f&&o>15&&p(n,0,c),t.e=s=s-u-1,t.c=[],u=(s+1)%T,0>s&&(u+=T),o>u){for(u&&t.c.push(+i.slice(0,u)),o-=T;o>u;)t.c.push(+i.slice(u,u+=T));i=i.slice(u),u=T-i.length}else u-=o;for(;u--;i+="0");t.c.push(+i),v&&(t.e>n.maxE?t.c=t.e=null:t.e<n.minE&&(t.c=[t.e=0]))}else t.c=[t.e=0];b=0}}();return l()}(),t=function(){return x}.call(r,n,r,e),!(void 0!==t&&(e.exports=t))}(this)},function(e,r,n){"use strict";r.array=n(136),r["boolean"]=n(158),r.number=n(4),r.bignumber=n(135),r.object=n(3),r.string=n(159),r.types=n(178)},function(e,r,n){"use strict";function t(e){if(!(this instanceof t))throw new SyntaxError("Constructor must be called with the new operator");if(this.nodes=e||[],!a(this.nodes)||!this.nodes.every(s))throw new TypeError("Array containing Nodes expected")}var i=n(152),o=(n(3),n(159)),a=(n(13),n(143),Array.isArray),s=i.isNode;t.prototype=new i,t.prototype.type="ArrayNode",t.prototype._compile=function(e){var r="array"!==e.math.config().matrix,n=this.nodes.map(function(r){return r._compile(e)});return(r?"math.matrix([":"[")+n.join(",")+(r?"])":"]")},t.prototype.find=function(e){var r=[];this.match(e)&&r.push(this);for(var n=this.nodes,t=0,i=n.length;i>t;t++)r=r.concat(n[t].find(e));return r},t.prototype.toString=function(){return o.format(this.nodes)},t.prototype.toTex=function(e){e=e||"bmatrix";var r="\\begin{"+e+"}";return this.nodes.forEach(function(e){r+=e.nodes?e.nodes.map(function(e){return e.toTex()}).join("&"):e.toTex(),r+="\\\\"}),r+="\\end{"+e+"}"},e.exports=t},function(e,r,n){"use strict";function t(e,r){if(!(this instanceof t))throw new SyntaxError("Constructor must be called with the new operator");if(!u(e))throw new TypeError('String expected for parameter "name"');if(!(r instanceof i))throw new TypeError('Node expected for parameter "expr"');if(e in a)throw new Error('Illegal symbol name, "'+e+'" is a reserved keyword');this.name=e,this.expr=r}var i=n(152),o=n(144),a=n(281),s=n(282),u=n(159).isString;t.prototype=new i,t.prototype.type="AssignmentNode",t.prototype._compile=function(e){return'scope["'+this.name+'"] = '+this.expr._compile(e)},t.prototype.find=function(e){var r=[];return this.match(e)&&r.push(this),r=r.concat(this.expr.find(e))},t.prototype.toString=function(){return this.name+" = "+this.expr.toString()},t.prototype.toTex=function(){var e;return this.expr instanceof o&&(e=["\\mathbf{","}"]),s.addBraces(s.toSymbol(this.name),e)+"="+s.addBraces(this.expr.toTex())},e.exports=t},function(e,r,n){"use strict";function t(){if(!(this instanceof t))throw new SyntaxError("Constructor must be called with the new operator");this.params=[]}var i=n(152),o=n(12),a=n(158).isBoolean;t.prototype=new i,t.prototype.type="BlockNode",t.prototype.add=function(e,r){if(void 0===r&&(r=!0),!(e instanceof i))throw new TypeError('Node expected for parameter "expr"');if(!a(r))throw new TypeError('Boolean expected for parameter "visible"');var n=this.params.length;this.params[n]={node:e,visible:r}},t.prototype._compile=function(e){e.ResultSet=o;var r=this.params.map(function(r){var n=r.node._compile(e);return r.visible?"results.push("+n+");":n+";"});return"(function () {var results = [];"+r.join("")+"return new ResultSet(results);})()"},t.prototype.find=function(e){var r=[];this.match(e)&&r.push(this);for(var n=this.params,t=0,i=n.length;i>t;t++)r=r.concat(n[t].node.find(e));return r},t.prototype.toString=function(){return this.params.map(function(e){return e.node.toString()+(e.visible?"":";")}).join("\n")},t.prototype.toTex=function(){return this.params.map(function(e){return e.node.toTex()+(e.visible?"":";")}).join("\n")},e.exports=t},function(e,r,n){"use strict";function t(e,r,n){if(!(this instanceof t))throw new SyntaxError("Constructor must be called with the new operator");if(!(e instanceof i))throw new TypeError("Parameter condition must be a Node");if(!(r instanceof i))throw new TypeError("Parameter trueExpr must be a Node");if(!(n instanceof i))throw new TypeError("Parameter falseExpr must be a Node");this.condition=e,this.trueExpr=r,this.falseExpr=n}var i=n(152),o=n(282),a=n(142),s=n(6),u=n(10),f=n(143),c=f.string.isString,l=f.number.isNumber,p=f["boolean"].isBoolean;t.prototype=new i,t.prototype.type="ConditionalNode",t.prototype._compile=function(e){return e.testCondition=function(r){if(l(r)||p(r)||c(r))return r?!0:!1;if(r instanceof a)return r.isZero()?!1:!0;if(r instanceof s)return r.re||r.im?!0:!1;if(r instanceof u)return r.value?!0:!1;if(null===r||void 0===r)return!1;throw new TypeError('Unsupported type of condition "'+e.math["typeof"](r)+'"')
},"testCondition("+this.condition._compile(e)+") ? ( "+this.trueExpr._compile(e)+") : ( "+this.falseExpr._compile(e)+")"},t.prototype.find=function(e){var r=[];return this.match(e)&&r.push(this),r=r.concat(this.condition.find(e),this.trueExpr.find(e),this.falseExpr.find(e))},t.prototype.toString=function(){return"("+this.condition.toString()+") ? ("+this.trueExpr.toString()+") : ("+this.falseExpr.toString()+")"},t.prototype.toTex=function(){var e=o.addBraces(this.trueExpr.toTex())+", &\\quad"+o.addBraces("\\text{if}\\;"+this.condition.toTex())+"\\\\"+(o.addBraces(this.falseExpr.toTex())+", &\\quad"+o.addBraces("\\text{otherwise}"));return o.addBraces(e,["\\left\\{\\begin{array}{l l}","\\end{array}\\right."])},e.exports=t},function(e,r,n){"use strict";function t(e,r){if(!(this instanceof t))throw new SyntaxError("Constructor must be called with the new operator");if(r){if(!a(r))throw new TypeError('String expected for parameter "valueType"');if(!a(e))throw new TypeError('String expected for parameter "value"');this.value=e,this.valueType=r}else this.value=e+"",this.valueType=o(e);if(!s[this.valueType])throw new TypeError('Unsupported type of value "'+this.valueType+'"')}var i=n(152),o=(n(142),n(178).type),a=n(159).isString,s={number:!0,string:!0,"boolean":!0,undefined:!0,"null":!0};t.prototype=new i,t.prototype.type="ConstantNode",t.prototype._compile=function(e){switch(this.valueType){case"number":return"bignumber"===e.math.config().number?'math.bignumber("'+this.value+'")':this.value.replace(/^(0*)[0-9]/,function(e,r){return e.substring(r.length)});case"string":return'"'+this.value+'"';case"boolean":return this.value;case"undefined":return this.value;case"null":return this.value;default:throw new TypeError('Unsupported type of constant "'+this.valueType+'"')}},t.prototype.toString=function(){switch(this.valueType){case"string":return'"'+this.value+'"';default:return this.value}},t.prototype.toTex=function(){var e,r=this.value;switch(this.valueType){case"string":return"\\text{"+r+"}";case"number":return e=r.toLowerCase().indexOf("e"),-1!==e?r.substring(0,e)+" \\cdot 10^{"+r.substring(e+1)+"}":r;default:return r}},e.exports=t},function(e,r,n){"use strict";function t(e,r){if(!(this instanceof t))throw new SyntaxError("Constructor must be called with the new operator");if(!(e instanceof i))throw new TypeError('Node expected for parameter "object"');if(!u(r)||!r.every(s))throw new TypeError('Array containing Nodes expected for parameter "ranges"');this.object=e,this.ranges=r}var i=n(152),o=n(154),a=n(155),s=i.isNode,u=Array.isArray;t.prototype=new i,t.prototype.type="IndexNode",t.prototype._compile=function(e){return this.compileSubset(e)},t.prototype.compileSubset=function(e,r){var n={type:a,properties:{name:"end"}},t=!1,i=this.ranges.map(function(e){var r=e.find(n).length>0;return t=r?r:t,r}),s=this.ranges.map(function(r,n){var t=i[n];return r instanceof o?t?'(function (scope) {  scope = Object.create(scope);   scope["end"] = size['+n+"];  return [    "+r.start._compile(e)+",     "+r.end._compile(e)+",     "+(r.step?r.step._compile(e):"1")+"  ];})(scope)":"(function () {  return [    "+r.start._compile(e)+",     "+r.end._compile(e)+",     "+(r.step?r.step._compile(e):"1")+"  ];})()":t?'(function (scope) {  scope = Object.create(scope);   scope["end"] = size['+n+"];  return "+r._compile(e)+";})(scope)":r._compile(e)});return t?"(function () {  var obj = "+this.object._compile(e)+";  var size = math.size(obj).valueOf();  return math.subset(    obj,     math.index("+s.join(", ")+")    "+(r?", "+r:"")+"  );})()":"math.subset("+this.object._compile(e)+",math.index("+s.join(", ")+")"+(r?", "+r:"")+")"},t.prototype.find=function(e){var r=[];this.match(e)&&r.push(this),r=r.concat(this.object.find(e));for(var n=this.ranges,t=0,i=n.length;i>t;t++)r=r.concat(n[t].find(e));return r},t.prototype.objectName=function(){return this.object.name},t.prototype.toString=function(){return this.object.toString()+"["+this.ranges.join(", ")+"]"},t.prototype.toTex=function(){return this.object.toTex()+"["+this.ranges.join(", ")+"]"},e.exports=t},function(e,r,n){"use strict";function t(e,r,n){if(!(this instanceof t))throw new SyntaxError("Constructor must be called with the new operator");if(!s(e))throw new TypeError('String expected for parameter "name"');if(!u(r)||!r.every(s))throw new TypeError('Array containing strings expected for parameter "args"');if(!(n instanceof i))throw new TypeError('Node expected for parameter "expr"');if(e in o)throw new Error('Illegal function name, "'+e+'" is a reserved keyword');this.name=e,this.args=r,this.expr=n}var i=n(152),o=n(281),a=n(282),s=n(159).isString,u=Array.isArray;t.prototype=new i,t.prototype.type="FunctionAssignmentNode",t.prototype._compile=function(e){return'scope["'+this.name+'"] =   (function (scope) {    scope = Object.create(scope);     var fn = function '+this.name+"("+this.args.join(",")+") {      if (arguments.length != "+this.args.length+') {        throw new SyntaxError("Wrong number of arguments in function '+this.name+' (" + arguments.length + " provided, '+this.args.length+' expected)");      }'+this.args.map(function(e,r){return'scope["'+e+'"] = arguments['+r+"];"}).join("")+"      return "+this.expr._compile(e)+'    };    fn.syntax = "'+this.name+"("+this.args.join(", ")+')";    return fn;  })(scope);'},t.prototype.find=function(e){var r=[];return this.match(e)&&r.push(this),r=r.concat(this.expr.find(e))},t.prototype.toString=function(){return"function "+this.name+"("+this.args.join(", ")+") = "+this.expr.toString()},t.prototype.toTex=function(){return this.name+a.addBraces(this.args.map(a.toSymbol).join(", "),!0)+"="+a.addBraces(this.expr.toTex())},e.exports=t},function(e,r,n){"use strict";function t(e,r){if(!(this instanceof t))throw new SyntaxError("Constructor must be called with the new operator");if(!(e instanceof i))throw new TypeError('SymbolNode expected for parameter "symbol"');if(!s(r)||!r.every(a))throw new TypeError('Array containing Nodes expected for parameter "params"');this.symbol=e,this.params=r}var i=n(152),o=n(282),a=i.isNode,s=Array.isArray;t.prototype=new i,t.prototype.type="FunctionNode",t.prototype._compile=function(e){var r=e.math[this.symbol.name],n="function"==typeof r&&1==r.rawArgs,t=this.params.map(function(r){return r._compile(e)});if(n){var i,o=this.symbol.name;do i="p"+Math.round(1e4*Math.random());while(i in e);return e[i]=this.params,'("'+o+'" in scope ? scope["'+o+'"]('+t.join(", ")+') : math["'+o+'"]('+i+", math, scope))"}return this.symbol._compile(e)+"("+t.join(", ")+")"},t.prototype.find=function(e){var r=[];this.match(e)&&r.push(this),r=r.concat(this.symbol.find(e));for(var n=this.params,t=0,i=n.length;i>t;t++)r=r.concat(n[t].find(e));return r},t.prototype.toString=function(){return this.symbol.toString()+"("+this.params.join(", ")+")"},t.prototype.toTex=function(){return o.toParams(this)},e.exports=t},function(e,r,n){"use strict";function t(){if(!(this instanceof t))throw new SyntaxError("Constructor must be called with the new operator")}function i(e){for(var r in e)if(e.hasOwnProperty(r)&&r in a)throw new Error('Scope contains an illegal symbol, "'+r+'" is a reserved keyword')}function o(e){var r=Object.create(e);for(var n in e)if(e.hasOwnProperty(n)){var t=e[n],i=t&&t.transform;i&&(r[n]=i)}return r}var a=n(281);t.prototype.eval=function(){throw new Error("Node.eval is deprecated. Use Node.compile(math).eval([scope]) instead.")},t.prototype.type="Node",t.prototype.compile=function(e){if(!(e instanceof Object))throw new TypeError("Object expected for parameter math");var r={math:o(e),_validateScope:i},n=this._compile(r),t=Object.keys(r).map(function(e){return"    var "+e+' = defs["'+e+'"];'}),a=t.join(" ")+'return {  "eval": function (scope) {    if (scope) _validateScope(scope);    scope = scope || {};    return '+n+";  }};",s=new Function("defs",a);return s(r)},t.prototype._compile=function(){throw new Error("Cannot compile a Node interface")},t.prototype.find=function(e){return this.match(e)?[this]:[]},t.prototype.match=function(e){var r=!0;if(e){!e.type||this instanceof e.type||(r=!1);var n=e.properties;if(r&&n)for(var t in n)if(n.hasOwnProperty(t)&&this[t]!==n[t]){r=!1;break}}return r},t.prototype.toString=function(){return""},t.prototype.toTex=function(){return""},t.isNode=function(e){return e instanceof t},e.exports=t},function(e,r,n){"use strict";function t(e,r,n){if(!(this instanceof t))throw new SyntaxError("Constructor must be called with the new operator");this.op=e,this.fn=r,this.params=n}var i=n(152),o=n(148),a=n(155),s=n(151),u=n(282);t.prototype=new i,t.prototype.type="OperatorNode",t.prototype._compile=function(e){if(!(this.fn in e.math))throw new Error("Function "+this.fn+' missing in provided namespace "math"');var r=this.params.map(function(r){return r._compile(e)});return"math."+this.fn+"("+r.join(", ")+")"},t.prototype.find=function(e){var r=[];this.match(e)&&r.push(this);var n=this.params;if(n)for(var t=0,i=n.length;i>t;t++)r=r.concat(n[t].find(e));return r},t.prototype.toString=function(){var e=this.params;switch(e.length){case 1:return"-"==this.op?"-"+e[0].toString():e[0].toString()+this.op;case 2:var r=e[0].toString();e[0]instanceof t&&(r="("+r+")");var n=e[1].toString();return e[1]instanceof t&&(n="("+n+")"),r+" "+this.op+" "+n;default:return this.op+"("+this.params.join(", ")+")"}},t.prototype.toTex=function(){var e=this.params,r=u.toOperator(this.op),n=e[0],i=e[1];switch(e.length){case 1:return"-"===this.op||"+"===this.op?this.op+n.toTex():n.toTex()+this.op;case 2:var f=n.toTex(),c=!1,l=i.toTex(),p=!1,m="",h="";switch(this.op){case"/":m=r,r="";break;case"*":n instanceof t&&("+"===n.op||"-"===n.op)&&(c=!0),i instanceof t&&("+"===i.op||"-"===i.op?p=!0:"*"===i.op&&(p=!0)),r=(n instanceof o||n instanceof t)&&(i instanceof o||i instanceof t)?" \\cdot ":" \\, ";break;case"^":n instanceof t||n instanceof s?c=!0:n instanceof a&&(c=null);break;case"to":l=u.toUnit(l,!0)}return f=u.addBraces(f,c),l=u.addBraces(l,p),m+f+r+l+h;default:return r+"("+this.params.map(u.toSymbol).join(", ")+")"}},e.exports=t},function(e,r,n){"use strict";function t(e){if(!(this instanceof t))throw new SyntaxError("Constructor must be called with the new operator");if(!Array.isArray(e)||2!=e.length&&3!=e.length||!e.every(o))throw new TypeError('Expected an Array containing 2 or 3 Nodes as parameter "params"');this.start=e[0],this.end=e[1],this.step=e[2]}var i=n(152),o=i.isNode;t.prototype=new i,t.prototype.type="RangeNode",t.prototype._compile=function(e){return"math.range("+this.start._compile(e)+", "+this.end._compile(e)+(this.step?", "+this.step._compile(e):"")+")"},t.prototype.find=function(e){var r=[];return this.match(e)&&r.push(this),r=r.concat(this.start.find(e)),this.step&&(r=r.concat(this.step.find(e))),r=r.concat(this.end.find(e))},t.prototype.toString=function(){var e=this.start.toString();return this.step&&(e+=":"+this.step.toString()),e+=":"+this.end.toString()},t.prototype.toTex=function(){var e=this.start.toTex();return this.step&&(e+=":"+this.step.toTex()),e+=":"+this.end.toTex()},e.exports=t},function(e,r,n){"use strict";function t(e){if(!(this instanceof t))throw new SyntaxError("Constructor must be called with the new operator");if(!u(e))throw new TypeError('String expected for parameter "name"');this.name=e}function i(e){throw new Error("Undefined symbol "+e)}var o=n(152),a=n(10),s=n(282),u=n(159).isString;t.prototype=new o,t.prototype.type="SymbolNode",t.prototype._compile=function(e){return e.undef=i,e.Unit=a,this.name in e.math?'("'+this.name+'" in scope ? scope["'+this.name+'"] : math["'+this.name+'"])':'("'+this.name+'" in scope ? scope["'+this.name+'"] : '+(a.isValuelessUnit(this.name)?'new Unit(null, "'+this.name+'")':'undef("'+this.name+'")')+")"},t.prototype.toString=function(){return this.name},t.prototype.toTex=function(){return s.toSymbol(this.name)},e.exports=t},function(e,r,n){"use strict";function t(e,r){if(!(this instanceof t))throw new SyntaxError("Constructor must be called with the new operator");if(!(e instanceof o))throw new TypeError('Expected IndexNode for parameter "index"');if(!(r instanceof i))throw new TypeError('Expected Node for parameter "expr"');this.index=e,this.expr=r}var i=n(152),o=n(149);t.prototype=new i,t.prototype.type="UpdateNode",t.prototype._compile=function(e){return'scope["'+this.index.objectName()+'"] = '+this.index.compileSubset(e,this.expr._compile(e))},t.prototype.find=function(e){var r=[];return this.match(e)&&r.push(this),r=r.concat(this.index.find(e)),r=r.concat(this.expr.find(e))},t.prototype.toString=function(){return this.index.toString()+" = "+this.expr.toString()},t.prototype.toTex=function(){return this.index.toTex()+" = "+this.expr.toTex()},e.exports=t},function(e,r,n){var t=(n(139),n(140));r.transform=function(e){return e instanceof t?new t(e.index+1,e.min+1,e.max+1):e}},function(e,r){"use strict";r.isBoolean=function(e){return e instanceof Boolean||"boolean"==typeof e}},function(e,r,n){"use strict";function t(e,n){if(Array.isArray(e)){for(var i="[",o=e.length,a=0;o>a;a++)0!=a&&(i+=", "),i+=t(e[a],n);return i+="]"}return r.format(e,n)}var i=n(4),o=n(135),a=n(142);r.isString=function(e){return e instanceof String||"string"==typeof e},r.endsWith=function(e,r){var n=e.length-r.length,t=e.length;return e.substring(n,t)===r},r.format=function(e,n){return i.isNumber(e)?i.format(e,n):e instanceof a?o.format(e,n):Array.isArray(e)?t(e,n):r.isString(e)?'"'+e+'"':"function"==typeof e?e.syntax?e.syntax+"":"function":e instanceof Object?"function"==typeof e.format?e.format(n):e.toString():String(e)}},function(e){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){e.exports={name:"false",category:"Constants",syntax:["false"],description:"Boolean value false",examples:["false"],seealso:["true"]}},function(e){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){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){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){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){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){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){e.exports={name:"NaN",category:"Constants",syntax:["NaN"],description:"Not a number",examples:["NaN","0 / 0"],seealso:[]}},function(e){e.exports={name:"null",category:"Constants",syntax:["null"],description:"Value null",examples:["null"],seealso:["true","false"]}},function(e){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){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:["tau"],seealso:[]}},function(e){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){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){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){e.exports={name:"true",category:"Constants",syntax:["true"],description:"Boolean value true",examples:["true"],seealso:["false"]}},function(e){e.exports={name:"version",category:"Constants",syntax:["version"],description:"A string with the version number of math.js",examples:["version"],seealso:[]}},function(e,r,n){function t(e){return n(i(e))}function i(e){return o[e]||function(){throw new Error("Cannot find module '"+e+"'.")}()}var o={"./clone":127,"./clone.js":127,"./forEach":134,"./forEach.js":134,"./format":128,"./format.js":128,"./import":129,"./import.js":129,"./map":130,"./map.js":130,"./print":131,"./print.js":131,"./sort":132,"./sort.js":132,"./typeof":133,"./typeof.js":133};t.keys=function(){return Object.keys(o)},t.resolve=i,e.exports=t},function(e,r){"use strict";r.type=function(e){var r=typeof e;if("object"===r){if(null===e)return"null";if(e instanceof Boolean)return"boolean";if(e instanceof Number)return"number";if(e instanceof String)return"string";if(Array.isArray(e))return"array";if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return r}},function(e){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){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",'"hello" + " world"',"3 cm + 2 inch"],seealso:["subtract"]}},function(e){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){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){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){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){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){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){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:["pow","log"]}},function(e){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){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){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){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){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","log10"]}},function(e){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){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","function isOdd(x) = x % 2","isOdd(2)","isOdd(3)"],seealso:["divide"]}},function(e){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){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){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 = 8","2*2*2","1 + e ^ (pi * i)"],seealso:["multiply"]}},function(e){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){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){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","multiply"]}},function(e){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){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){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){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){e.exports={name:"xgcd",category:"Arithmetic",syntax:["xgcd(a, b)"],description:"Calculate the extended greatest common divisor for two values",examples:["xgcd(8, 12)","gcd(8, 12)","xgcd(36163, 21199)"],seealso:["gcd","lcm"]}},function(e){e.exports={name:"compare",category:"Relational",syntax:["compare(x, y)"],description:"Compare two values. Returns 1 if x is larger than y, -1 if x is smaller than y, and 0 if x and y are equal.",examples:["compare(2, 3)","compare(3, 2)","compare(2, 2)","compare(5cm, 40mm)","compare(2, [1, 2, 3])"],seealso:["equal","unequal","smaller","smallerEq","largerEq"]}},function(e){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:["[1,3,4] == [1,3,4]","[1,3,4] == [1,3]"],seealso:["equal","unequal","smaller","larger","smallerEq","largerEq","compare"]}},function(e){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"]}},function(e){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){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","largerEq","compare"]}},function(e){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){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){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){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){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){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){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){e.exports={name:"bignumber",category:"Type",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","index","matrix","string","unit"]}},function(e){e.exports={name:"boolean",category:"Type",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){e.exports={name:"complex",category:"Type",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){e.exports={name:"index",category:"Type",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){e.exports={name:"matrix",category:"Type",syntax:["[]","[a1, b1, ...; a2, b2, ...]","matrix()","matrix([...])"],description:"Create a matrix.",examples:["[]","[1, 2, 3]","[1, 2, 3; 4, 5, 6]","matrix()","matrix([3, 4])"],seealso:["bignumber","boolean","complex","index","number","string","unit"]}},function(e){e.exports={name:"number",category:"Type",syntax:["x","number(x)"],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])"],seealso:["bignumber","boolean","complex","index","matrix","string","unit"]}},function(e){e.exports={name:"string",category:"Type",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){e.exports={name:"unit",category:"Type",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){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){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){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","eye","inv","ones","range","size","squeeze","subset","transpose","zeros"]}
},function(e){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","eye","inv","ones","range","size","squeeze","subset","transpose","zeros"]}},function(e){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","eye","inv","ones","range","size","squeeze","subset","transpose","zeros"]}},function(e){e.exports={name:"eye",category:"Matrix",syntax:["eye(n)","eye(m, n)","eye([m, n])","eye"],description:"Returns the identity matrix with size m-by-n. The matrix has ones on the diagonal and zeros elsewhere.",examples:["eye(3)","eye(3, 5)","a = [1, 2, 3; 4, 5, 6]","eye(size(a))"],seealso:["concat","det","diag","inv","ones","range","size","squeeze","subset","transpose","zeros"]}},function(e){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){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","eye","ones","range","size","squeeze","subset","transpose","zeros"]}},function(e){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, ...])","ones"],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","eye","inv","range","size","squeeze","subset","transpose","zeros"]}},function(e){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","eye","inv","ones","size","squeeze","subset","transpose","zeros"]}},function(e){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"]}},function(e){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","eye","inv","ones","range","squeeze","subset","transpose","zeros"]}},function(e){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","eye","inv","ones","range","size","subset","transpose","zeros"]}},function(e){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","eye","inv","ones","range","size","squeeze","transpose","zeros"]}},function(e){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","eye","inv","ones","range","size","squeeze","subset","zeros"]}},function(e){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, ...])","zeros"],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","eye","inv","ones","range","size","squeeze","subset","transpose"]}},function(e){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){e.exports={name:"distribution",category:"Probability",syntax:["distribution(name)","distribution(name, arg1, arg2, ...)"],description:'Create a distribution object of a specific type. A distribution object contains functions `random([size,] [min,] [max])`, `randomInt([size,] [min,] [max])`, and `pickRandom(array)`. Available types of distributions: "uniform", "normal". Note that the function distribution is currently not available via the expression parser.',examples:[],seealso:["random","randomInt"]}},function(e){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"]}},function(e){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){e.exports={name:"pickRandom",category:"Probability",syntax:["pickRandom(array)"],description:"Pick a random entry from a given array.",examples:["pickRandom(0:10)","pickRandom([1, 3, 1, 6])"],seealso:["distribution","random","randomInt"]}},function(e){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:["distribution","pickRandom","randomInt"]}},function(e){e.exports={name:"randInt",category:"Probability",syntax:["randInt()","randInt(max)","randInt(min, max)","randInt(size)","randInt(size, max)","randInt(size, min, max)"],description:"Return a random integer number",examples:["randInt()","randInt(10, 20)","randInt([2, 3], 10)"],seealso:["distribution","pickRandom","random"]}},function(e){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], 0)","max([2, 5; 4, 3], 1)","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){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], 0)","mean([2, 5; 4, 3], 1)","mean([1.0, 2.7, 3.2, 4.0])"],seealso:["max","median","min","prod","std","sum","var"]}},function(e){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"]}},function(e){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], 0)","min([2, 5; 4, 3], 1)","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){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){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){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){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){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){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(2.3))"],seealso:["sin","acos","atan"]}},function(e){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(2.3))"],seealso:["tan","acos","asin"]}},function(e){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){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){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){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){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){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){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){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){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){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){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){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){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){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){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){e.exports={name:"map",category:"Utils",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], function(val) { return value * value })"],seealso:[]}},function(e){e.exports={name:"forEach",category:"Utils",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:["unit"]}},function(e){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){e.exports={name:"import",category:"Utils",syntax:["import(string)"],description:"Import functions from a file.",examples:['import("numbers")','import("./mylib.js")'],seealso:[]}},function(e){e.exports={name:"sort",category:"Utils",syntax:["sort(x)","sort(x, compare)"],description:'Sort the items in a matrix. Compare can be a string "asc" or "desc", or a custom sort function.',examples:["sort([5, 10, 1])",'sort(["C", "B", "A", "D"])'],seealso:[]}},function(e){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){"use strict";e.exports={end:!0}},function(e,r,n){"use strict";function t(){for(var e,r=Array.prototype.slice.call(arguments),n=0,t=r.length;t>n;n++){e=r[n];for(var i in e)e.hasOwnProperty(i)&&(x[i]=e[i])}}function i(e,r){return"undefined"!=typeof e[r]}function o(e){return function(r){return i(e,r)}}function a(e){return function(n){if("boolean"==typeof e[n])n=e[n]===!0?"\\"+n:"\\mathrm{"+n+"}";else if("string"==typeof e[n])n=e[n];else if("string"==typeof n){var t=n.indexOf("_");-1!==t&&(n=r.toSymbol(n.substring(0,t))+"_{"+r.toSymbol(n.substring(t+1))+"}")}return n}}var s=n(144),u=n(153),f={Alpha:"A",alpha:!0,Beta:"B",beta:!0,Gamma:!0,gamma:!0,Delta:!0,delta:!0,Epsilon:"E",epsilon:!0,varepsilon:!0,Zeta:"Z",zeta:!0,Eta:"H",eta:!0,Theta:!0,theta:!0,vartheta:!0,Iota:"I",iota:!0,Kappa:"K",kappa:!0,varkappa:!0,Lambda:!0,lambda:!0,Mu:"M",mu:!0,Nu:"N",nu:!0,Xi:!0,xi:!0,Omicron:"O",omicron:!0,Pi:!0,pi:!0,varpi:!0,Rho:"P",rho:!0,varrho:!0,Sigma:!0,sigma:!0,varsigma:!0,Tau:"T",tau:!0,Upsilon:!0,upsilon:!0,Phi:!0,phi:!0,varphi:!0,Chi:"X",chi:!0,Psi:!0,psi:!0,Omega:!0,omega:!0},c={dots:!0,ldots:!0,cdots:!0,vdots:!0,ddots:!0,idots:!0},l={"true":"\\mathrm{True}","false":"\\mathrm{False}"},p={inf:"\\infty",Inf:"\\infty",infinity:"\\infty",Infinity:"\\infty",oo:"\\infty",lim:!0,undefined:"\\mathbf{?}"},m={acos:"\\cos^{-1}",arccos:"\\cos^{-1}",cos:!0,csc:!0,csch:!1,exp:!0,ker:!0,limsup:!0,min:!0,sinh:!0,asin:"\\sin^{-1}",arcsin:"\\sin^{-1}",cosh:!0,deg:!0,gcd:!0,lg:!0,ln:!0,Pr:!0,sup:!0,atan:"\\tan^{-1}",atan2:"\\tan2^{-1}",arctan:"\\tan^{-1}",cot:!0,det:!0,hom:!0,log:!0,log10:"\\log_{10}",sec:!0,sech:!1,tan:!0,arg:!0,coth:!0,dim:!0,inf:!0,max:!0,sin:!0,tanh:!0,fix:!1,lcm:!1,sign:!1,xgcd:!1,unaryMinus:!1,unaryPlus:!1,complex:!1,conj:!1,im:!1,re:!1,diag:!1,resize:!1,size:!1,squeeze:!1,subset:!1,index:!1,ones:!1,zeros:!1,range:!1,random:!1,mean:"\\mu",median:!1,prod:!1,std:"\\sigma","var":"\\sigma^2"},h={sqrt:!0,inv:!0,"int":"\\int",Int:"\\int",integrate:"\\int",eigenvalues:"\\lambda",liminf:!0,lim:!0,exp:"e^",sum:!0,eye:"\\mathbf{I}"},g={"<=":"\\leq",">=":"\\geq","!=":"\\neq","in":!0,"*":"\\cdot","/":"\\frac",mod:"\\bmod",to:"\\rightarrow"},d={deg:"^{\\circ}"},x={};t(m,h,f,c,l,p),r.isSymbol=o(x),r.toSymbol=a(x),r.isFunction=o(m),r.toFunction=a(m),r.isCurlyFunction=o(h),r.toCurlyFunction=a(h),r.isOperator=o(g),r.toOperator=a(g),r.isUnit=o(d),r.toUnit=function(){var e=a(d);return function(n,t){return r.isUnit(n)?e(n):(t?"":"\\,")+"\\mathrm{"+n+"}"}}(),r.addBraces=function(e,r,n){if(null===r)return e;var t=["",""];switch(n=n||"normal","undefined"==typeof r||r===!1?t=["{","}"]:r===!0?(t=["(",")"],n="lr"):t=Array.isArray(r)&&2===r.length?r:[r,r],n){case"normal":case!1:return t[0]+e+t[1];case"lr":return"\\left"+t[0]+"{"+e+"}\\right"+t[1];case"be":return"\\begin{"+t[0]+"}"+e+"\\end{"+t[1]+"}"}return t[0]+e+t[1]},r.toParams=function(e){var n=e.symbol,t=e.params,i=n.toTex(),o=null,a=null,f=!1,c=!1,l="",p="",m=null;switch(n.name){case"add":m="+";break;case"subtract":m="-";break;case"larger":m=">";break;case"largerEq":m=">=";break;case"smaller":m="<";break;case"smallerEq":m="<=";break;case"unequal":m="!=";break;case"equal":m="=";break;case"mod":m="mod";break;case"multiply":m="*";break;case"pow":m="^";break;case"concat":m="||";break;case"factorial":m="!";break;case"permutations":if(1!==t.length){var h=t[0].toTex(),g=t[1].toTex();return"\\frac{"+h+"!}{\\left("+h+" - "+g+"\\right)!}"}m="!";break;case"combinations":m="\\choose";break;case"abs":a="|",f="lr";break;case"norm":if(a="\\|",f="lr",2===t.length){var d=t[1].toTex();"\\text{inf}"===d?d="\\infty":"\\text{-inf}"===d?d="{- \\infty}":"\\text{fro}"===d&&(d="F"),p="_{"+d+"}",t=[t[0]]}break;case"ceil":a=["\\lceil","\\rceil"],f="lr";break;case"floor":a=["\\lfloor","\\rfloor"],f="lr";break;case"round":a=["\\lfloor","\\rceil"],f="lr",2===t.length&&(p="_"+r.addBraces(t[1].toTex()),t=[t[0]]);break;case"inv":p="^{-1}";break;case"transpose":p="^{T}",a=!1;break;case"log":var x="e";2===t.length&&(x=t[1].toTex(),i="\\log_{"+x+"}",t=[t[0]]),"e"===x&&(i="\\ln"),c=!0;break;case"square":p="^{2}";break;case"cube":p="^{3}";break;case"eye":c=!0,a=!1,i+="_";break;case"det":if(e.params[0]instanceof s)return e.params[0].toTex("vmatrix");a="vmatrix",f="be";break;default:c=!0}return null!==m?(a="+"===m||"-"===m,o=new u(m,n.name,t).toTex()):m=", ",null!==a||r.isCurlyFunction(n.name)||(a=!0),o=o||t.map(function(e){return"{"+e.toTex()+"}"}).join(m),l+(c?i:"")+r.addBraces(o,a,f)+p}}])});
