(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-libs"],{"00b4":function(e,t,n){"use strict";n("ac1f");var r,i=n("23e7"),o=n("861d"),a=(n=(r=!1,(n=/[ac]/).exec=function(){return r=!0,/./.exec.apply(this,arguments)},!0===n.test("abc")&&r),/./.test);i({target:"RegExp",proto:!0,forced:!n},{test:function(e){if("function"!=typeof this.exec)return a.call(this,e);if(e=this.exec(e),null===e||o(e))return!!e;throw new Error("RegExp exec method returned something other than an Object or null")}})},"00ee":function(e,t,n){var r={};r[n("b622")("toStringTag")]="z",e.exports="[object z]"===String(r)},"0366":function(e,t,n){var r=n("1c0b");e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},"03d6":function(e,t,n){var r=n("9c0e"),i=n("6ca1"),o=n("39ad")(!1),a=n("5a94")("IE_PROTO");e.exports=function(e,t){var n,s=i(e),u=0,c=[];for(n in s)n!=a&&r(s,n)&&c.push(n);for(;t.length>u;)!r(s,n=t[u++])||~o(c,n)||c.push(n);return c}},"044b":function(e,t){ /*! * Determine if an object is a Buffer * * @author Feross Aboukhadijeh * @license MIT */ e.exports=function(e){return null!=e&&null!=e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}},"051b":function(e,t,n){var r=n("1a14"),i=n("10db");e.exports=n("0bad")?function(e,t,n){return r.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},"057f":function(e,t,n){var r=n("fc6a"),i=n("241c").f,o={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){if(!a||"[object Window]"!=o.call(e))return i(r(e));try{return i(e)}catch(e){return a.slice()}}},"05f5":function(e,t,n){var r=n("7a41"),i=n("ef08").document,o=r(i)&&r(i.createElement);e.exports=function(e){return o?i.createElement(e):{}}},"06cf":function(e,t,n){var r=n("83ab"),i=n("d1e7"),o=n("5c6c"),a=n("fc6a"),s=n("c04e"),u=n("5135"),c=n("0cfb"),f=Object.getOwnPropertyDescriptor;t.f=r?f:function(e,t){if(e=a(e),t=s(t,!0),c)try{return f(e,t)}catch(e){}if(u(e,t))return o(!i.f.call(e,t),e[t])}},"072d":function(e,t,n){"use strict";var r=n("0bad"),i=n("9876"),o=n("fed5"),a=n("1917"),s=n("0983"),u=n("9fbb"),c=Object.assign;e.exports=!c||n("4b8b")((function(){var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach((function(e){t[e]=e})),7!=c({},e)[n]||Object.keys(c({},t)).join("")!=r}))?function(e,t){for(var n=s(e),c=arguments.length,f=1,l=o.f,p=a.f;fc;)u.call(e,a=s[c++])&&t.push(a);return t}},"0b99":function(e,t,n){"use strict";var r=n("19fa")(!0);n("393a")(String,"String",(function(e){this._t=String(e),this._i=0}),(function(){var e=this._t,t=this._i;return t>=e.length?{value:void 0,done:!0}:(e=r(e,t),this._i+=e.length,{value:e,done:!1})}))},"0bad":function(e,t,n){e.exports=!n("4b8b")((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},"0c47":function(e,t,n){var r=n("da84");n("d44e")(r.JSON,"JSON",!0)},"0ccb":function(e,t,n){function r(e){return function(t,n,r){t=String(a(t));var u=t.length;r=void 0===r?" ":String(r),n=i(n);return n<=u||""==r?t:((u=o.call(r,s((n-=u)/r.length))).length>n&&(u=u.slice(0,n)),e?t+u:u+t)}}var i=n("50c4"),o=n("1148"),a=n("1d80"),s=Math.ceil;e.exports={start:r(!1),end:r(!0)}},"0cfb":function(e,t,n){var r=n("83ab"),i=n("d039"),o=n("cc12");e.exports=!r&&!i((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},"0df6":function(e,t,n){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},"0e15":function(e,t,n){var r=n("597f");e.exports=function(e,t,n){return void 0===n?r(e,t,!1):r(e,n,!1!==t)}},1098:function(e,t,n){"use strict";t.__esModule=!0;var r=a(n("17ed")),i=a(n("f893")),o="function"==typeof i.default&&"symbol"==typeof r.default?function(e){return typeof e}:function(e){return e&&"function"==typeof i.default&&e.constructor===i.default&&e!==i.default.prototype?"symbol":typeof e};function a(e){return e&&e.__esModule?e:{default:e}}t.default="function"==typeof i.default&&"symbol"===o(r.default)?function(e){return void 0===e?"undefined":o(e)}:function(e){return e&&"function"==typeof i.default&&e.constructor===i.default&&e!==i.default.prototype?"symbol":void 0===e?"undefined":o(e)}},"10db":function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},1148:function(e,t,n){"use strict";var r=n("a691"),i=n("1d80");e.exports="".repeat||function(e){var t=String(i(this)),n="",o=r(e);if(o<0||o==1/0)throw RangeError("Wrong number of repetitions");for(;0>>=1)&&(t+=t))1&o&&(n+=t);return n}},1212:function(e,t,n){(function(e){var r;!function(e){function i(e){var t,n=this,r=(t=4022871197,function(e){e=String(e);for(var n=0;n>>0))*t)>>>0,t+=4294967296*(r-=t)}return 2.3283064365386963e-10*(t>>>0)});n.next=function(){var e=2091639*n.s0+2.3283064365386963e-10*n.c;return n.s0=n.s1,n.s1=n.s2,n.s2=e-(n.c=0|e)},n.c=1,n.s0=r(" "),n.s1=r(" "),n.s2=r(" "),n.s0-=r(e),n.s0<0&&(n.s0+=1),n.s1-=r(e),n.s1<0&&(n.s1+=1),n.s2-=r(e),n.s2<0&&(n.s2+=1)}function o(e,t){return t.c=e.c,t.s0=e.s0,t.s1=e.s1,t.s2=e.s2,t}function a(e,t){var n=new i(e),r=(e=t&&t.state,n.next);return r.int32=function(){return 4294967296*n.next()|0},r.double=function(){return r()+11102230246251565e-32*(2097152*r()|0)},r.quick=r,e&&("object"==typeof e&&o(e,n),r.state=function(){return o(n,{})}),r}e&&e.exports?e.exports=a:n("07d6")&&n("3c35")?void 0!==(r=function(){return a}.call(t,n,t,e))&&(e.exports=r):this.alea=a}(e,n("07d6"))}).call(this,n("62e4")(e))},"131a":function(e,t,n){n("23e7")({target:"Object",stat:!0},{setPrototypeOf:n("d2bb")})},"14c3":function(e,t,n){var r=n("c6b6"),i=n("9263");e.exports=function(e,t){var n=e.exec;if("function"==typeof n){if(n=n.call(e,t),"object"!=typeof n)throw TypeError("RegExp exec method returned something other than an Object or null");return n}if("RegExp"!==r(e))throw TypeError("RegExp#exec called on incompatible receiver");return i.call(e,t)}},"159b":function(e,t,n){var r,i=n("da84"),o=n("fdbc"),a=n("17c2"),s=n("9112");for(r in o){var u=i[r];u=u&&u.prototype;if(u&&u.forEach!==a)try{s(u,"forEach",a)}catch(e){u.forEach=a}}},1609:function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},"17c2":function(e,t,n){"use strict";var r=n("b727").forEach,i=n("a640");n=n("ae40"),i=i("forEach"),n=n("forEach");e.exports=i&&n?[].forEach:function(e){return r(this,e,1>>0,1)},emit:function(t,n){(e[t]||[]).map((function(e){e(n)})),(e["*"]||[]).map((function(e){e(t,n)}))}}}var i,o=e((function(e,t){var n={svg:{name:"xmlns",uri:"http://www.w3.org/2000/svg"},xlink:{name:"xmlns:xlink",uri:"http://www.w3.org/1999/xlink"}};t.default=n,e.exports=t.default})),a=function(e){return Object.keys(e).map((function(t){var n=e[t].toString().replace(/"/g,""");return t+'="'+n+'"'})).join(" ")},s=o.svg,u=o.xlink,c={},f=(c[s.name]=s.uri,c[u.name]=u.uri,function(e,t){void 0===e&&(e="");var r=n(c,t||{}),i=a(r);return""+e+""}),l=o.svg,p=o.xlink,d={attrs:((i={style:["position: absolute","width: 0","height: 0"].join("; ")})[l.name]=l.uri,i[p.name]=p.uri,i)},h=function(e){this.config=n(d,e||{}),this.symbols=[]},m=(h.prototype.add=function(e){var t=this,n=t.symbols,r=this.find(e.id);return r?(n[n.indexOf(r)]=e,!1):(n.push(e),!0)},h.prototype.remove=function(e){var t=this,n=t.symbols,r=this.find(e);return!!r&&(n.splice(n.indexOf(r),1),r.destroy(),!0)},h.prototype.find=function(e){return this.symbols.filter((function(t){return t.id===e}))[0]||null},h.prototype.has=function(e){return null!==this.find(e)},h.prototype.stringify=function(){var e=this.config,t=e.attrs,n=this.symbols.map((function(e){return e.stringify()})).join("");return f(n,t)},h.prototype.toString=function(){return this.stringify()},h.prototype.destroy=function(){this.symbols.forEach((function(e){return e.destroy()}))},function(e){var t=e.id,n=e.viewBox,r=e.content;this.id=t,this.viewBox=n,this.content=r}),y=(m.prototype.stringify=function(){return this.content},m.prototype.toString=function(){return this.stringify()},m.prototype.destroy=function(){var e=this;["id","viewBox","content"].forEach((function(t){return delete e[t]}))},function(e){var t=!!document.importNode,n=(new DOMParser).parseFromString(e,"image/svg+xml").documentElement;return t?document.importNode(n,!0):n}),g=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={isMounted:{}};return n.isMounted.get=function(){return!!this.node},t.createFromExistingNode=function(e){return new t({id:e.getAttribute("id"),viewBox:e.getAttribute("viewBox"),content:e.outerHTML})},t.prototype.destroy=function(){this.isMounted&&this.unmount(),e.prototype.destroy.call(this)},t.prototype.mount=function(e){if(this.isMounted)return this.node;var t="string"===typeof e?document.querySelector(e):e,n=this.render();return this.node=n,t.appendChild(n),n},t.prototype.render=function(){var e=this.stringify();return y(f(e)).childNodes[0]},t.prototype.unmount=function(){this.node.parentNode.removeChild(this.node)},Object.defineProperties(t.prototype,n),t}(m),v={autoConfigure:!0,mountTo:"body",syncUrlsWithBaseTag:!1,listenLocationChangeEvent:!0,locationChangeEvent:"locationChange",locationChangeAngularEmitter:!1,usagesToUpdate:"use[*|href]",moveGradientsOutsideSymbol:!1},b=function(e){return Array.prototype.slice.call(e,0)},x=navigator.userAgent,w={isChrome:/chrome/i.test(x),isFirefox:/firefox/i.test(x),isIE:/msie/i.test(x)||/trident/i.test(x),isEdge:/edge/i.test(x)},N=function(e,t){var n=document.createEvent("CustomEvent");n.initCustomEvent(e,!1,!1,t),window.dispatchEvent(n)},S=function(e){var t=[];return b(e.querySelectorAll("style")).forEach((function(e){e.textContent+="",t.push(e)})),t},_=function(e){return(e||window.location.href).split("#")[0]},D=function(e){angular.module("ng").run(["$rootScope",function(t){t.$on("$locationChangeSuccess",(function(t,n,r){N(e,{oldUrl:r,newUrl:n})}))}])},M="linearGradient, radialGradient, pattern",E=function(e,t){return void 0===t&&(t=M),b(e.querySelectorAll("symbol")).forEach((function(e){b(e.querySelectorAll(t)).forEach((function(t){e.parentNode.insertBefore(t,e)}))})),e};function A(e,t){var n=b(e).reduce((function(e,n){if(!n.attributes)return e;var r=b(n.attributes),i=t?r.filter(t):r;return e.concat(i)}),[]);return n}var O=o.xlink.uri,C="xlink:href",T=/[{}|\\\^\[\]`"<>]/g;function k(e){return e.replace(T,(function(e){return"%"+e[0].charCodeAt(0).toString(16).toUpperCase()}))}function I(e,t,n){return b(e).forEach((function(e){var r=e.getAttribute(C);if(r&&0===r.indexOf(t)){var i=r.replace(t,n);e.setAttributeNS(O,C,i)}})),e}var R,j=["clipPath","colorProfile","src","cursor","fill","filter","marker","markerStart","markerMid","markerEnd","mask","stroke","style"],B=j.map((function(e){return"["+e+"]"})).join(","),z=function(e,t,n,r){var i=k(n),o=k(r),a=e.querySelectorAll(B),s=A(a,(function(e){var t=e.localName,n=e.value;return-1!==j.indexOf(t)&&-1!==n.indexOf("url("+i)}));s.forEach((function(e){return e.value=e.value.replace(i,o)})),I(t,i,o)},q={MOUNT:"mount",SYMBOL_MOUNT:"symbol_mount"},P=function(e){function t(t){var i=this;void 0===t&&(t={}),e.call(this,n(v,t));var o=r();this._emitter=o,this.node=null;var a=this,s=a.config;if(s.autoConfigure&&this._autoConfigure(t),s.syncUrlsWithBaseTag){var u=document.getElementsByTagName("base")[0].getAttribute("href");o.on(q.MOUNT,(function(){return i.updateUrls("#",u)}))}var c=this._handleLocationChange.bind(this);this._handleLocationChange=c,s.listenLocationChangeEvent&&window.addEventListener(s.locationChangeEvent,c),s.locationChangeAngularEmitter&&D(s.locationChangeEvent),o.on(q.MOUNT,(function(e){s.moveGradientsOutsideSymbol&&E(e)})),o.on(q.SYMBOL_MOUNT,(function(e){s.moveGradientsOutsideSymbol&&E(e.parentNode),(w.isIE||w.isEdge)&&S(e)}))}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var i={isMounted:{}};return i.isMounted.get=function(){return!!this.node},t.prototype._autoConfigure=function(e){var t=this,n=t.config;"undefined"===typeof e.syncUrlsWithBaseTag&&(n.syncUrlsWithBaseTag="undefined"!==typeof document.getElementsByTagName("base")[0]),"undefined"===typeof e.locationChangeAngularEmitter&&(n.locationChangeAngularEmitter="angular"in window),"undefined"===typeof e.moveGradientsOutsideSymbol&&(n.moveGradientsOutsideSymbol=w.isFirefox)},t.prototype._handleLocationChange=function(e){var t=e.detail,n=t.oldUrl,r=t.newUrl;this.updateUrls(n,r)},t.prototype.add=function(t){var n=this,r=e.prototype.add.call(this,t);return this.isMounted&&r&&(t.mount(n.node),this._emitter.emit(q.SYMBOL_MOUNT,t.node)),r},t.prototype.attach=function(e){var t=this,n=this;if(n.isMounted)return n.node;var r="string"===typeof e?document.querySelector(e):e;return n.node=r,this.symbols.forEach((function(e){e.mount(n.node),t._emitter.emit(q.SYMBOL_MOUNT,e.node)})),b(r.querySelectorAll("symbol")).forEach((function(e){var t=g.createFromExistingNode(e);t.node=e,n.add(t)})),this._emitter.emit(q.MOUNT,r),r},t.prototype.destroy=function(){var e=this,t=e.config,n=e.symbols,r=e._emitter;n.forEach((function(e){return e.destroy()})),r.off("*"),window.removeEventListener(t.locationChangeEvent,this._handleLocationChange),this.isMounted&&this.unmount()},t.prototype.mount=function(e,t){void 0===e&&(e=this.config.mountTo),void 0===t&&(t=!1);var n=this;if(n.isMounted)return n.node;var r="string"===typeof e?document.querySelector(e):e,i=n.render();return this.node=i,t&&r.childNodes[0]?r.insertBefore(i,r.childNodes[0]):r.appendChild(i),this._emitter.emit(q.MOUNT,i),i},t.prototype.render=function(){return y(this.stringify())},t.prototype.unmount=function(){this.node.parentNode.removeChild(this.node)},t.prototype.updateUrls=function(e,t){if(!this.isMounted)return!1;var n=document.querySelectorAll(this.config.usagesToUpdate);return z(this.node,n,_(e)+"#",_(t)+"#"),!0},Object.defineProperties(t.prototype,i),t}(h),F=e((function(e){ /*! * domready (c) Dustin Diaz 2014 - License MIT */ !function(t,n){e.exports=n()}(0,(function(){var e,t=[],n=document,r=n.documentElement.doScroll,i="DOMContentLoaded",o=(r?/^loaded|^c/:/^loaded|^i|^c/).test(n.readyState);return o||n.addEventListener(i,e=function(){n.removeEventListener(i,e),o=1;while(e=t.shift())e()}),function(e){o?setTimeout(e,0):t.push(e)}}))})),L="__SVG_SPRITE_NODE__",U="__SVG_SPRITE__";window[U]?R=window[U]:(R=new P({attrs:{id:L}}),window[U]=R);var $=function(){var e=document.getElementById(L);e?R.attach(e):R.mount(document.body,!0)};return document.body?$():F($),R}()}).call(this,n("c8ba"))},2266:function(e,t,n){function r(e,t){this.stopped=e,this.result=t}var i=n("825a"),o=n("e95a"),a=n("50c4"),s=n("0366"),u=n("35a1"),c=n("9bdd");(e.exports=function(e,t,n,f,l){var p,d,h,m,y,g,v=s(t,n,f?2:1);if(l)p=e;else{if("function"!=typeof(t=u(e)))throw TypeError("Target is not iterable");if(o(t)){for(d=0,h=a(e.length);ddocument.createEvent("Event").timeStamp&&(en=function(){return Gt.now()});var rn=0,on=(nn.prototype.get=function(){ce(this);var e,t=this.vm;try{e=this.getter.call(t,t)}catch(e){if(!this.user)throw e;ze(e,t,'getter for watcher "'+this.expression+'"')}finally{this.deep&&Xe(e),fe(),this.cleanupDeps()}return e},nn.prototype.addDep=function(e){var t=e.id;this.newDepIds.has(t)||(this.newDepIds.add(t),this.newDeps.push(e),this.depIds.has(t))||e.addSub(this)},nn.prototype.cleanupDeps=function(){for(var e=this.deps.length;e--;){var t=this.deps[e];this.newDepIds.has(t.id)||t.removeSub(this)}var n=this.depIds;this.depIds=this.newDepIds,this.newDepIds=n,this.newDepIds.clear(),n=this.deps,this.deps=this.newDeps,this.newDeps=n,this.newDeps.length=0},nn.prototype.update=function(){if(this.lazy)this.dirty=!0;else if(this.sync)this.run();else{var e=this,t=e.id;if(null==Yt[t]){if(Yt[t]=!0,Jt){for(var n=Vt.length-1;Qte.id;)n--;Vt.splice(n+1,0,e)}else Vt.push(e);Xt||(Xt=!0,Ze(tn))}}},nn.prototype.run=function(){if(this.active){var e=this.get();if(e!==this.value||s(e)||this.deep){var t=this.value;if(this.value=e,this.user)try{this.cb.call(this.vm,e,t)}catch(e){ze(e,this.vm,'callback for watcher "'+this.expression+'"')}else this.cb.call(this.vm,e,t)}}},nn.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},nn.prototype.depend=function(){for(var e=this.deps.length;e--;)this.deps[e].depend()},nn.prototype.teardown=function(){if(this.active){this.vm._isBeingDestroyed||g(this.vm._watchers,this);for(var e=this.deps.length;e--;)this.deps[e].removeSub(this);this.active=!1}},{enumerable:!0,configurable:!0,get:C,set:C});function an(e,t,n){on.get=function(){return this[t][n]},on.set=function(e){this[t][n]=e},Object.defineProperty(e,n,on)}function sn(e){e._watchers=[];var t=e.$options;if(t.props){var n,r=e,i=t.props,o=r.$options.propsData||{},a=r._props={},s=r.$options._propKeys=[];for(n in r.$parent&&be(!1),i){f=void 0;var u=n;s.push(u);var f=Ie(u,i,o,r);Ne(a,u,f),u in r||an(r,"_props",u)}be(!0)}if(t.methods){var l,p=e,d=t.methods;for(l in p.$options.props,d)p[l]="function"!=typeof d[l]?C:M(d[l],p)}if(t.data){for(var h=e,m=h.$options.data,y=(c(m=h._data="function"==typeof m?function(e,t){ce();try{return e.call(t,t)}catch(e){return ze(e,t,"data()"),{}}finally{fe()}}(m,h):m||{})||(m={}),Object.keys(m)),g=h.$options.props,v=(h.$options.methods,y.length);v--;){var x=y[v];g&&b(g,x)||!function(e){return 36===(e=(e+"").charCodeAt(0))||95===e}(x)&&an(h,"_data",x)}we(m,!0)}else we(e._data={},!0);if(t.computed){var w,N=e,S=t.computed,_=N._computedWatchers=Object.create(null),D=te();for(w in S){var E=S[w],A="function"==typeof E?E:E.get;D||(_[w]=new nn(N,A||C,C,un)),w in N||cn(N,w,E)}}if(t.watch&&t.watch!==Q){var O,T=e,k=t.watch;for(O in k){var I=k[O];if(Array.isArray(I))for(var R=0;RparseInt(this.max)&&wn(i,o[0],o,this._vnode)),t.data.keepAlive=!0}return t||e&&e[0]}}};Nn=yn,q={get:function(){return P}},Object.defineProperty(Nn,"config",q),Nn.util={warn:V,extend:A,mergeOptions:Te,defineReactive:Ne},Nn.set=Se,Nn.delete=_e,Nn.nextTick=Ze,Nn.observable=function(e){return we(e),e},Nn.options=Object.create(null),z.forEach((function(e){Nn.options[e+"s"]=Object.create(null)})),A((Nn.options._base=Nn).options.components,Dn),Nn.use=function(e){var t,n=this._installedPlugins||(this._installedPlugins=[]);return-1=i||e.timeStamp<=0||e.target.ownerDocument!==document)return o.apply(this,arguments)}),rr.addEventListener(e,t,K?{capture:n,passive:r}:n)}function fr(e,t,n,r){(r||rr).removeEventListener(e,t._wrapper||t,n)}function lr(e,t){var n,o,a;r(e.data.on)&&r(t.data.on)||(n=t.data.on||{},e=e.data.on||{},rr=t.elm,i((o=n)[or])&&(o[a=Z?"change":"input"]=[].concat(o[or],o[a]||[]),delete o[or]),i(o[ar])&&(o.change=[].concat(o[ar],o.change||[]),delete o[ar]),Ke(n,e,cr,fr,sr,t.context),rr=void 0)}var pr;ee={create:lr,update:lr};function dr(e,t){if(!r(e.data.domProps)||!r(t.data.domProps)){var n,o,a,s,u=t.elm,c=e.data.domProps||{},f=t.data.domProps||{};for(n in i(f.__ob__)&&(f=t.data.domProps=A({},f)),c)n in f||(u[n]="");for(n in f){if(o=f[n],"textContent"===n||"innerHTML"===n){if(t.children&&(t.children.length=0),o===c[n])continue;1===u.childNodes.length&&u.removeChild(u.childNodes[0])}if("value"===n&&"PROGRESS"!==u.tagName){var l=r(u._value=o)?"":String(o);s=l,(a=u).composing||"OPTION"!==a.tagName&&!function(e,t){var n=!0;try{n=document.activeElement!==e}catch(e){}return n&&e.value!==t}(a,s)&&!function(e,t){var n=e.value;e=e._vModifiers;if(i(e)){if(e.number)return h(n)!==h(t);if(e.trim)return n.trim()!==t.trim()}return n!==t}(a,s)||(u.value=l)}else if("innerHTML"===n&&Un(u.tagName)&&r(u.innerHTML)){(pr=pr||document.createElement("div")).innerHTML=""+o+"";for(var p=pr.firstChild;u.firstChild;)u.removeChild(u.firstChild);for(;p.firstChild;)u.appendChild(p.firstChild)}else if(o!==c[n])try{u[n]=o}catch(e){}}}}F={create:dr,update:dr};var hr=x((function(e){var t={},n=/:(.+)/;return e.split(/;(?![^(]*\))/g).forEach((function(e){e&&1<(e=e.split(n)).length&&(t[e[0].trim()]=e[1].trim())})),t}));function mr(e){var t=yr(e.style);return e.staticStyle?A(e.staticStyle,t):t}function yr(e){return Array.isArray(e)?O(e):"string"==typeof e?hr(e):e}function gr(e,t,n){if(br.test(t))e.style.setProperty(t,n);else if(xr.test(n))e.style.setProperty(D(t),n.replace(xr,""),"important");else{var r=Nr(t);if(Array.isArray(n))for(var i=0,o=n.length;i=o&&c()}var s=r===Tr?Rr:Br,u=0,c=function(){e.removeEventListener(s,a),n()};setTimeout((function(){u * Copyright OpenJS Foundation and other contributors * Released under MIT license * Based on Underscore.js 1.8.3 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors */(function(){var o,a="Expected a function",s="__lodash_hash_undefined__",u="__lodash_placeholder__",c=128,f=9007199254740991,l=NaN,p=4294967295,d=[["ary",c],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],h="[object Arguments]",m="[object Array]",y="[object Boolean]",g="[object Date]",v="[object Error]",b="[object Function]",x="[object GeneratorFunction]",w="[object Map]",N="[object Number]",S="[object Object]",_="[object Promise]",D="[object RegExp]",M="[object Set]",E="[object String]",A="[object Symbol]",O="[object WeakMap]",C="[object ArrayBuffer]",T="[object DataView]",k="[object Float32Array]",I="[object Float64Array]",R="[object Int8Array]",j="[object Int16Array]",B="[object Int32Array]",z="[object Uint8Array]",q="[object Uint8ClampedArray]",P="[object Uint16Array]",F="[object Uint32Array]",L=/\b__p \+= '';/g,U=/\b(__p \+=) '' \+/g,$=/(__e\(.*?\)|\b__t\)) \+\n'';/g,H=/&(?:amp|lt|gt|quot|#39);/g,W=/[&<>"']/g,G=RegExp(H.source),V=RegExp(W.source),Z=/<%-([\s\S]+?)%>/g,Y=/<%([\s\S]+?)%>/g,X=/<%=([\s\S]+?)%>/g,J=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Q=/^\w*$/,K=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ee=/[\\^$.*+?()[\]{}|]/g,te=RegExp(ee.source),ne=/^\s+/,re=/\s/,ie=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,oe=/\{\n\/\* \[wrapped with (.+)\] \*/,ae=/,? & /,se=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ue=/[()=,{}\[\]\/\s]/,ce=/\\(\\)?/g,fe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,le=/\w*$/,pe=/^[-+]0x[0-9a-f]+$/i,de=/^0b[01]+$/i,he=/^\[object .+?Constructor\]$/,me=/^0o[0-7]+$/i,ye=/^(?:0|[1-9]\d*)$/,ge=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ve=/($^)/,be=/['\n\r\u2028\u2029\\]/g,xe="\\ud800-\\udfff",we="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Ne="\\u2700-\\u27bf",Se="a-z\\xdf-\\xf6\\xf8-\\xff",_e="A-Z\\xc0-\\xd6\\xd8-\\xde",De="\\ufe0e\\ufe0f",Me="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\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",Ee="['’]",Ae="["+xe+"]",Oe="["+Me+"]",Ce="["+we+"]",Te="["+Ne+"]",ke="["+Se+"]",Ie=(Me="[^"+xe+Me+"\\d+"+Ne+Se+_e+"]",Ne="\\ud83c[\\udffb-\\udfff]",Se="[^"+xe+"]","(?:\\ud83c[\\udde6-\\uddff]){2}"),Re="[\\ud800-\\udbff][\\udc00-\\udfff]",je=(_e="["+_e+"]","\\u200d"),Be="(?:"+ke+"|"+Me+")",ze=(Me="(?:"+_e+"|"+Me+")","(?:['’](?:d|ll|m|re|s|t|ve))?"),qe="(?:['’](?:D|LL|M|RE|S|T|VE))?",Pe="(?:"+Ce+"|"+Ne+")?",Fe="["+De+"]?",Le=(Fe=Fe+Pe+"(?:"+je+"(?:"+[Se,Ie,Re].join("|")+")"+Fe+Pe+")*",Pe="(?:"+[Te,Ie,Re].join("|")+")"+Fe,Te="(?:"+[Se+Ce+"?",Ce,Ie,Re,Ae].join("|")+")",RegExp(Ee,"g")),Ue=RegExp(Ce,"g"),$e=RegExp(Ne+"(?="+Ne+")|"+Te+Fe,"g"),He=RegExp([_e+"?"+ke+"+"+ze+"(?="+[Oe,_e,"$"].join("|")+")",Me+"+"+qe+"(?="+[Oe,_e+Be,"$"].join("|")+")",_e+"?"+Be+"+"+ze,_e+"+"+qe,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])","\\d+",Pe].join("|"),"g"),We=RegExp("["+je+xe+we+De+"]"),Ge=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ve=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Ze=-1,Ye={},Xe=(Ye[k]=Ye[I]=Ye[R]=Ye[j]=Ye[B]=Ye[z]=Ye[q]=Ye[P]=Ye[F]=!0,Ye[h]=Ye[m]=Ye[C]=Ye[y]=Ye[T]=Ye[g]=Ye[v]=Ye[b]=Ye[w]=Ye[N]=Ye[S]=Ye[D]=Ye[M]=Ye[E]=Ye[O]=!1,{}),Je=(Xe[h]=Xe[m]=Xe[C]=Xe[T]=Xe[y]=Xe[g]=Xe[k]=Xe[I]=Xe[R]=Xe[j]=Xe[B]=Xe[w]=Xe[N]=Xe[S]=Xe[D]=Xe[M]=Xe[E]=Xe[A]=Xe[z]=Xe[q]=Xe[P]=Xe[F]=!0,Xe[v]=Xe[b]=Xe[O]=!1,{"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"}),Qe=parseFloat,Ke=parseInt,et=(Se="object"==typeof e&&e&&e.Object===Object&&e,Ie="object"==typeof self&&self&&self.Object===Object&&self,Se||Ie||Function("return this")()),tt=(Re=t&&!t.nodeType&&t,Re&&"object"==typeof r&&r&&!r.nodeType&&r),nt=tt&&tt.exports===Re,rt=nt&&Se.process,it=(Ae=function(){try{var e=tt&&tt.require&&tt.require("util").types;return e||rt&&rt.binding&&rt.binding("util")}catch(e){}}(),Ae&&Ae.isArrayBuffer),ot=Ae&&Ae.isDate,at=Ae&&Ae.isMap,st=Ae&&Ae.isRegExp,ut=Ae&&Ae.isSet,ct=Ae&&Ae.isTypedArray;function ft(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function lt(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i":">",'"':""","'":"'"});function $t(e){return"\\"+Je[e]}function Ht(e){return We.test(e)}function Wt(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function Gt(e,t){return function(n){return e(t(n))}}function Vt(e,t){for(var n=-1,r=e.length,i=0,o=[];++n",""":'"',"'":"'"}),Kt=function e(t){var n=(t=null==t?et:Kt.defaults(et.Object(),t,Kt.pick(et,Ve))).Array,r=t.Date,i=t.Error,re=t.Function,xe=t.Math,we=t.Object,Ne=t.RegExp,Se=t.String,_e=t.TypeError,De=n.prototype,Me=re.prototype,Ee=we.prototype,Ae=t["__core-js_shared__"],Oe=Me.toString,Ce=Ee.hasOwnProperty,Te=0,ke=(Me=/[^.]+$/.exec(Ae&&Ae.keys&&Ae.keys.IE_PROTO||""))?"Symbol(src)_1."+Me:"",Ie=Ee.toString,Re=Oe.call(we),je=et._,Be=Ne("^"+Oe.call(Ce).replace(ee,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ze=(Me=nt?t.Buffer:o,t.Symbol),qe=t.Uint8Array,Pe=Me?Me.allocUnsafe:o,Fe=Gt(we.getPrototypeOf,we),$e=we.create,We=Ee.propertyIsEnumerable,Je=De.splice,tt=ze?ze.isConcatSpreadable:o,rt=ze?ze.iterator:o,St=ze?ze.toStringTag:o,Tt=function(){try{var e=no(we,"defineProperty");return e({},"",{}),e}catch(e){}}(),en=t.clearTimeout!==et.clearTimeout&&t.clearTimeout,tn=r&&r.now!==et.Date.now&&r.now,nn=t.setTimeout!==et.setTimeout&&t.setTimeout,rn=xe.ceil,on=xe.floor,an=we.getOwnPropertySymbols,sn=(Me=Me?Me.isBuffer:o,t.isFinite),un=De.join,cn=Gt(we.keys,we),fn=xe.max,ln=xe.min,pn=r.now,dn=t.parseInt,hn=xe.random,mn=De.reverse,yn=(r=no(t,"DataView"),no(t,"Map")),gn=no(t,"Promise"),vn=no(t,"Set"),bn=(t=no(t,"WeakMap"),no(we,"create")),xn=t&&new t,wn={},Nn=Co(r),Sn=Co(yn),_n=Co(gn),Dn=Co(vn),Mn=Co(t),En=(ze=ze?ze.prototype:o,ze?ze.valueOf:o),An=ze?ze.toString:o;function On(e){if(za(e)&&!Ea(e)&&!(e instanceof Rn)){if(e instanceof In)return e;if(Ce.call(e,"__wrapped__"))return To(e)}return new In(e)}var Cn=function(e){return Ba(e)?$e?$e(e):(Tn.prototype=e,e=new Tn,Tn.prototype=o,e):{}};function Tn(){}function kn(){}function In(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=o}function Rn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=p,this.__views__=[]}function jn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t>>0,t>>>=0,n(o));++i>>1,a=e[o];null!==a&&!Ha(a)&&(n?a<=t:a>>0)?(e=es(e))&&("string"==typeof t||null!=t&&!La(t))&&!(t=Qr(t))&&Ht(e)?fi(Xt(e),0,n):e.split(t,n):[]},On.spread=function(e,t){if("function"!=typeof e)throw new _e(a);return t=null==t?0:fn(Xa(t),0),Fr((function(n){var r=n[t];n=fi(n,0,t);return r&&bt(n,r),ft(e,this,n)}))},On.tail=function(e){var t=null==e?0:e.length;return t?Gr(e,1,t):[]},On.take=function(e,t,n){return e&&e.length?Gr(e,0,(t=n||t===o?1:Xa(t))<0?0:t):[]},On.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?Gr(e,(t=r-(t=n||t===o?1:Xa(t)))<0?0:t,r):[]},On.takeRightWhile=function(e,t){return e&&e.length?ni(e,Ki(t,3),!1,!0):[]},On.takeWhile=function(e,t){return e&&e.length?ni(e,Ki(t,3)):[]},On.tap=function(e,t){return t(e),e},On.throttle=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new _e(a);return Ba(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),ya(e,t,{leading:r,maxWait:t,trailing:i})},On.thru=Qo,On.toArray=Za,On.toPairs=xs,On.toPairsIn=ws,On.toPath=function(e){return Ea(e)?vt(e,Oo):Ha(e)?[e]:vi(Ao(es(e)))},On.toPlainObject=Ka,On.transform=function(e,t,n){var r,i=Ea(e),o=i||Ta(e)||Wa(e);return t=Ki(t,4),null==n&&(r=e&&e.constructor,n=o?i?new r:[]:Ba(e)&&Ia(r)?Cn(Fe(e)):{}),(o?pt:fr)(e,(function(e,r,i){return t(n,e,r,i)})),n},On.unary=function(e){return pa(e,1)},On.union=Fo,On.unionBy=Lo,On.unionWith=Uo,On.uniq=function(e){return e&&e.length?Kr(e):[]},On.uniqBy=function(e,t){return e&&e.length?Kr(e,Ki(t,2)):[]},On.uniqWith=function(e,t){return t="function"==typeof t?t:o,e&&e.length?Kr(e,o,t):[]},On.unset=function(e,t){return null==e||ei(e,t)},On.unzip=$o,On.unzipWith=Ho,On.update=function(e,t,n){return null==e?e:ti(e,t,si(n))},On.updateWith=function(e,t,n,r){return r="function"==typeof r?r:o,null==e?e:ti(e,t,si(n),r)},On.values=Ns,On.valuesIn=function(e){return null==e?[]:zt(e,hs(e))},On.without=Wo,On.words=Is,On.wrap=function(e,t){return xa(si(t),e)},On.xor=Go,On.xorBy=Vo,On.xorWith=Zo,On.zip=Yo,On.zipObject=function(e,t){return oi(e||[],t||[],Wn)},On.zipObjectDeep=function(e,t){return oi(e||[],t||[],$r)},On.zipWith=Xo,On.entries=xs,On.entriesIn=ws,On.extend=ns,On.extendWith=rs,$s(On,On),On.add=eu,On.attempt=Rs,On.camelCase=Ss,On.capitalize=_s,On.ceil=tu,On.clamp=function(e,t,n){return n===o&&(n=t,t=o),n!==o&&(n=(n=Qa(n))==n?n:0),t!==o&&(t=(t=Qa(t))==t?t:0),Jn(Qa(e),t,n)},On.clone=function(e){return Qn(e,4)},On.cloneDeep=function(e){return Qn(e,5)},On.cloneDeepWith=function(e,t){return Qn(e,5,t="function"==typeof t?t:o)},On.cloneWith=function(e,t){return Qn(e,4,t="function"==typeof t?t:o)},On.conformsTo=function(e,t){return null==t||Kn(e,t,ds(t))},On.deburr=Ds,On.defaultTo=function(e,t){return null==e||e!=e?t:e},On.divide=nu,On.endsWith=function(e,t,n){e=es(e),t=Qr(t);var r=e.length;r=n=n===o?r:Jn(Xa(n),0,r);return 0<=(n-=t.length)&&e.slice(n,r)==t},On.eq=Sa,On.escape=function(e){return(e=es(e))&&V.test(e)?e.replace(W,Ut):e},On.escapeRegExp=function(e){return(e=es(e))&&te.test(e)?e.replace(ee,"\\$&"):e},On.every=function(e,t,n){return(Ea(e)?ht:ir)(e,Ki(t=n&&fo(e,t,n)?o:t,3))},On.find=ta,On.findIndex=ko,On.findKey=function(e,t){return _t(e,Ki(t,3),fr)},On.findLast=na,On.findLastIndex=Io,On.findLastKey=function(e,t){return _t(e,Ki(t,3),lr)},On.floor=ru,On.forEach=ra,On.forEachRight=ia,On.forIn=function(e,t){return null==e?e:ur(e,Ki(t,3),hs)},On.forInRight=function(e,t){return null==e?e:cr(e,Ki(t,3),hs)},On.forOwn=function(e,t){return e&&fr(e,Ki(t,3))},On.forOwnRight=function(e,t){return e&&lr(e,Ki(t,3))},On.get=us,On.gt=_a,On.gte=Da,On.has=function(e,t){return null!=e&&ao(e,t,gr)},On.hasIn=cs,On.head=jo,On.identity=Ps,On.includes=function(e,t,n,r){return e=Oa(e)?e:Ns(e),n=n&&!r?Xa(n):0,r=e.length,n<0&&(n=fn(r+n,0)),$a(e)?n<=r&&-1=ln(t=t,n=n)&&e=this.__values__.length;return{done:e,value:e?o:this.__values__[this.__index__++]}},On.prototype.plant=function(e){for(var t,n=this;n instanceof kn;){var r=To(n),i=(r.__index__=0,r.__values__=o,t?i.__wrapped__=r:t=r,r);n=n.__wrapped__}return i.__wrapped__=e,t},On.prototype.reverse=function(){var e=this.__wrapped__;return e instanceof Rn?(e=e,(e=(e=this.__actions__.length?new Rn(this):e).reverse()).__actions__.push({func:Qo,args:[Po],thisArg:o}),new In(e,this.__chain__)):this.thru(Po)},On.prototype.toJSON=On.prototype.valueOf=On.prototype.value=function(){return ri(this.__wrapped__,this.__actions__)},On.prototype.first=On.prototype.head,rt&&(On.prototype[rt]=function(){return this}),On}();et._=Kt,(i=function(){return Kt}.call(t,n,t,r))!==o&&(r.exports=i)}).call(this)}).call(this,n("c8ba"),n("62e4")(e))},"2f62":function(e,t,n){"use strict";n.d(t,"b",(function(){return v}));var r,i="undefined"!=typeof window&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function o(e,t){Object.keys(e).forEach((function(n){return t(e[n],n)}))}function a(e,t){this.runtime=t,this._children=Object.create(null),t=(this._rawModule=e).state,this.state=("function"==typeof t?t():t)||{}}function s(e){this.register([],e,!1)}function u(e){var t,n=this,o=(void 0===e&&(e={}),!r&&"undefined"!=typeof window&&window.Vue&&m(window.Vue),e.plugins);void 0===o&&(o=[]),void 0===(f=e.strict)&&(f=!1),this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new s(e),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._watcherVM=new r;var a=this,u=this.dispatch,c=this.commit,f=(this.dispatch=function(e,t){return u.call(a,e,t)},this.commit=function(e,t,n){return c.call(a,e,t,n)},this.strict=f,this._modules.root.state);p(this,f,[],this._modules.root),l(this,f),o.forEach((function(e){return e(n)})),(void 0!==e.devtools?e:r.config).devtools&&(t=this,i)&&((t._devtoolHook=i).emit("vuex:init",t),i.on("vuex:travel-to-state",(function(e){t.replaceState(e)})),t.subscribe((function(e,t){i.emit("vuex:mutation",e,t)})))}function c(e,t){return t.indexOf(e)<0&&t.push(e),function(){var n=t.indexOf(e);-1
'},n=(e.configure=function(e){var n,r;for(n in e)r=e[n],void 0!==r&&e.hasOwnProperty(n)&&(t[n]=r);return this},e.status=null,e.set=function(n){var r=e.isStarted();n=i(n,t.minimum,1),e.status=1===n?null:n;var o=e.render(!r),c=o.querySelector(t.barSelector),f=t.speed,l=t.easing;return o.offsetWidth,s((function(r){""===t.positionUsing&&(t.positionUsing=e.getPositioningCSS()),u(c,a(n,f,l)),1===n?(u(o,{transition:"none",opacity:1}),o.offsetWidth,setTimeout((function(){u(o,{transition:"all "+f+"ms linear",opacity:0}),setTimeout((function(){e.remove(),r()}),f)}),f)):setTimeout(r,f)})),this},e.isStarted=function(){return"number"===typeof e.status},e.start=function(){e.status||e.set(0);var n=function(){setTimeout((function(){e.status&&(e.trickle(),n())}),t.trickleSpeed)};return t.trickle&&n(),this},e.done=function(t){return t||e.status?e.inc(.3+.5*Math.random()).set(1):this},e.inc=function(t){var n=e.status;return n?("number"!==typeof t&&(t=(1-n)*i(Math.random()*n,.1,.95)),n=i(n+t,0,.994),e.set(n)):e.start()},e.trickle=function(){return e.inc(Math.random()*t.trickleRate)},0),r=0;function i(e,t,n){return en?n:e}function o(e){return 100*(-1+e)}function a(e,n,r){var i;return i="translate3d"===t.positionUsing?{transform:"translate3d("+o(e)+"%,0,0)"}:"translate"===t.positionUsing?{transform:"translate("+o(e)+"%,0)"}:{"margin-left":o(e)+"%"},i.transition="all "+n+"ms "+r,i}e.promise=function(t){return t&&"resolved"!==t.state()?(0===r&&e.start(),n++,r++,t.always((function(){r--,0===r?(n=0,e.done()):e.set((n-r)/n)})),this):this},e.render=function(n){if(e.isRendered())return document.getElementById("nprogress");f(document.documentElement,"nprogress-busy");var r=document.createElement("div");r.id="nprogress",r.innerHTML=t.template;var i,a=r.querySelector(t.barSelector),s=n?"-100":o(e.status||0),c=document.querySelector(t.parent);return u(a,{transition:"all 0 linear",transform:"translate3d("+s+"%,0,0)"}),t.showSpinner||(i=r.querySelector(t.spinnerSelector),i&&d(i)),c!=document.body&&f(c,"nprogress-custom-parent"),c.appendChild(r),r},e.remove=function(){l(document.documentElement,"nprogress-busy"),l(document.querySelector(t.parent),"nprogress-custom-parent");var e=document.getElementById("nprogress");e&&d(e)},e.isRendered=function(){return!!document.getElementById("nprogress")},e.getPositioningCSS=function(){var e=document.body.style,t="WebkitTransform"in e?"Webkit":"MozTransform"in e?"Moz":"msTransform"in e?"ms":"OTransform"in e?"O":"";return t+"Perspective"in e?"translate3d":t+"Transform"in e?"translate":"margin"};var s=function(){var e=[];function t(){var n=e.shift();n&&n(t)}return function(n){e.push(n),1==e.length&&t()}}(),u=function(){var e=["Webkit","O","Moz","ms"],t={};function n(e){return e.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,(function(e,t){return t.toUpperCase()}))}function r(t){var n=document.body.style;if(t in n)return t;var r,i=e.length,o=t.charAt(0).toUpperCase()+t.slice(1);while(i--)if(r=e[i]+o,r in n)return r;return t}function i(e){return e=n(e),t[e]||(t[e]=r(e))}function o(e,t,n){t=i(t),e.style[t]=n}return function(e,t){var n,r,i=arguments;if(2==i.length)for(n in t)r=t[n],void 0!==r&&t.hasOwnProperty(n)&&o(e,n,r);else o(e,i[1],i[2])}}();function c(e,t){var n="string"==typeof e?e:p(e);return n.indexOf(" "+t+" ")>=0}function f(e,t){var n=p(e),r=n+t;c(n,t)||(e.className=r.substring(1))}function l(e,t){var n,r=p(e);c(e,t)&&(n=r.replace(" "+t+" "," "),e.className=n.substring(1,n.length-1))}function p(e){return(" "+(e.className||"")+" ").replace(/\s+/gi," ")}function d(e){e&&e.parentNode&&e.parentNode.removeChild(e)}return e})?r.call(t,n,t,e):r)&&(e.exports=n)},3397:function(e,t,n){var r=n("7a41");e.exports=function(e,t){if(!r(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e))||"function"==typeof(n=e.valueOf)&&!r(i=n.call(e))||!t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},3410:function(e,t,n){var r=n("23e7"),i=n("d039"),o=n("7b0b"),a=n("e163");n=n("e177");r({target:"Object",stat:!0,forced:i((function(){a(1)})),sham:!n},{getPrototypeOf:function(e){return a(o(e))}})},"342f":function(e,t,n){n=n("d066"),e.exports=n("navigator","userAgent")||""},"35a1":function(e,t,n){var r=n("f5df"),i=n("3f8c"),o=n("b622")("iterator");e.exports=function(e){if(null!=e)return e[o]||e["@@iterator"]||i[r(e)]}},"37e8":function(e,t,n){var r=n("83ab"),i=n("9bf2"),o=n("825a"),a=n("df75");e.exports=r?Object.defineProperties:function(e,t){o(e);for(var n,r=a(t),s=r.length,u=0;u=t.length?{value:void 0,done:!0}:(t=r(t,n),e.index+=t.length,{value:t,done:!1})}))},"3f6b":function(e,t,n){e.exports={default:n("b9c7"),__esModule:!0}},"3f8c":function(e,t){e.exports={}},4128:function(e,t,n){var r;!function(){"use strict"; /*! * decimal.js v10.4.3 * An arbitrary-precision Decimal type for JavaScript. * https://github.com/MikeMcl/decimal.js * Copyright (c) 2022 Michael Mclaughlin * MIT Licence */var i,o,a,s=9e15,u=1e9,c="0123456789abcdef",f="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",l="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",p={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-s,maxE:s,crypto:!1},d=!0,h="[DecimalError] ",m=h+"Invalid argument: ",y=h+"Precision limit exceeded",g=h+"crypto unavailable",v="[object Decimal]",b=Math.floor,x=Math.pow,w=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,N=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,S=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,_=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,D=1e7,M=7,E=f.length-1,A=l.length-1,O={toStringTag:v};function C(e){var t,n,r,i=e.length-1,o="",a=e[0];if(0e.e^o<0?1:-1;for(t=0,n=(a=r.length)<(e=i.length)?a:e;ti[t]^o<0?1:-1;return a===e?0:ethis.d.length-2},O.isNaN=function(){return!this.s},O.isNegative=O.isNeg=function(){return this.s<0},O.isPositive=O.isPos=function(){return 0t&&(t=this.e+1)):t=NaN,t},O.round=function(){var e=this.constructor;return q(new e(this),this.e+1,e.rounding)},O.sine=O.sin=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+Math.max(n.e,n.sd())+M,r.rounding=1,n=function(e,t){var n,r=t.d.length;if(r<3)return t.isZero()?t:Q(e,2,t,t);n=16<(n=1.4*Math.sqrt(r))?16:0|n,t=t.times(1/K(5,n)),t=Q(e,2,t,t);for(var i,o=new e(5),a=new e(16),s=new e(20);n--;)i=t.times(t),t=t.times(o.plus(i.times(a.times(i).minus(s))));return t}(r,ee(r,n)),r.precision=e,r.rounding=t,q(2=e.d.length-1&&(n=c<0?-c:c)<=9007199254740991)return i=W(u,s,n,r),e.s<0?new u(1).div(i):q(i,r,o);if((a=s.s)<0){if(tu.maxE+1||t=r.toExpPos):(T(e,1,u),void 0===t?t=r.rounding:T(t,0,8),P(n=q(new r(n),e,t),e<=n.e||n.e<=r.toExpNeg,e));return n.isNeg()&&!n.isZero()?"-"+t:t},O.toSignificantDigits=O.toSD=function(e,t){var n=this.constructor;return void 0===e?(e=n.precision,t=n.rounding):(T(e,1,u),void 0===t?t=n.rounding:T(t,0,8)),q(new n(this),e,t)},O.toString=function(){var e=this.constructor;e=P(this,this.e<=e.toExpNeg||this.e>=e.toExpPos);return this.isNeg()&&!this.isZero()?"-"+e:e},O.truncated=O.trunc=function(){return q(new this.constructor(this),this.e+1,1)},O.valueOf=O.toJSON=function(){var e=this.constructor;e=P(this,this.e<=e.toExpNeg||this.e>=e.toExpPos);return this.isNeg()?"-"+e:e};var R=function(e,t,n,r,i,a){var s,u,c,f,l,p,d,h,m,y,g,v,x,w,N,S,_,E,A,O=e.constructor,C=e.s==t.s?1:-1,T=e.d,k=t.d;if(!(T&&T[0]&&k&&k[0]))return new O(e.s&&t.s&&(T?!k||T[0]!=k[0]:k)?T&&0==T[0]||!k?0*C:C/0:NaN);for(u=a?(l=1,e.e-t.e):(a=D,b(e.e/(l=M))-b(t.e/l)),E=k.length,S=T.length,m=(C=new O(C)).d=[],c=0;k[c]==(T[c]||0);c++);if(k[c]>(T[c]||0)&&u--,null==n?(x=n=O.precision,r=O.rounding):x=i?n+(e.e-t.e)+1:n,x<0)m.push(1),p=!0;else{if(x=x/l+2|0,c=0,1==E){for(k=k[f=0],x++;(c=a/2&&++_;f=0,(s=B(k,y,E,g))<0?(v=y[0],1<(f=(v=E!=g?v*a+(y[1]||0):v)/_|0)?1==(s=B(d=j(k,f=a<=f?a-1:f,a),y,h=d.length,g=y.length))&&(f--,z(d,Et[i]?1:-1;break}return o}function z(e,t,n,r){for(var i=0;n--;)e[n]-=i,i=e[n]p.maxE?(e.d=null,e.e=NaN):e.ee.constructor.maxE?(e.d=null,e.e=NaN):e.ei-1;)d[n]=0,n||(++a,d.unshift(1));for(f=d.length;!d[f-1];--f);for(s=0,p="";sf)for(a-=f;a--;)p+="0";else at&&(e.length=t,1)}function re(e){return new this(e).abs()}function ie(e){return new this(e).acos()}function oe(e){return new this(e).acosh()}function ae(e,t){return new this(e).plus(t)}function se(e){return new this(e).asin()}function ue(e){return new this(e).asinh()}function ce(e){return new this(e).atan()}function fe(e){return new this(e).atanh()}function le(e,t){e=new this(e),t=new this(t);var n,r=this.precision,i=this.rounding,o=r+4;return e.s&&t.s?e.d||t.d?!t.d||e.isZero()?(n=t.s<0?U(this,r,i):new this(0)).s=e.s:!e.d||t.isZero()?(n=U(this,o,1).times(.5)).s=e.s:n=t.s<0?(this.precision=o,this.rounding=1,n=this.atan(R(e,t,o,1)),t=U(this,o,1),this.precision=r,this.rounding=i,e.s<0?n.minus(t):n.plus(t)):this.atan(R(e,t,o,1)):(n=U(this,o,1).times(0a.maxE?(o.e=NaN,o.d=null):e.e=t.length&&s.slice(0,t.length)===t&&(u+=c[f[n]],s=s.slice(t.length,s.length),e=!0)})),e||(u+=s.slice(0,1),s=s.slice(1,s.length))}();return u}},4840:function(e,t,n){var r=n("825a"),i=n("1c0b"),o=n("b622")("species");e.exports=function(e,t){e=r(e).constructor;return void 0===e||null==(e=r(e)[o])?t:i(e)}},4930:function(e,t,n){n=n("d039"),e.exports=!!Object.getOwnPropertySymbols&&!n((function(){return!String(Symbol())}))},"498a":function(e,t,n){"use strict";var r=n("23e7"),i=n("58a8").trim;r({target:"String",proto:!0,forced:n("c8d2")("trim")},{trim:function(){return i(this)}})},"4b8b":function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},"4d20":function(e,t,n){var r=n("1917"),i=n("10db"),o=n("6ca1"),a=n("3397"),s=n("9c0e"),u=n("faf5"),c=Object.getOwnPropertyDescriptor;t.f=n("0bad")?c:function(e,t){if(e=o(e),t=a(t,!0),u)try{return c(e,t)}catch(e){}if(s(e,t))return i(!r.f.call(e,t),e[t])}},"4d63":function(e,t,n){var r=n("83ab"),i=n("da84"),o=n("94ca"),a=n("7156"),s=n("9bf2").f,u=n("241c").f,c=n("44e7"),f=n("ad6d"),l=n("9f7f"),p=n("6eeb"),d=n("d039"),h=n("69f3").set,m=n("2626"),y=n("b622")("match"),g=i.RegExp,v=g.prototype,b=/a/g,x=/a/g,w=new g(b)!==b,N=l.UNSUPPORTED_Y;if(r&&o("RegExp",!w||N||d((function(){return x[y]=!1,g(b)!=b||g(x)==x||"/a/i"!=g(b,"i")})))){for(var S=function(e,t){var n,r=this instanceof S,i=c(e),o=void 0===t;return!r&&i&&e.constructor===S&&o?e:(w?i&&!o&&(e=e.source):e instanceof S&&(o&&(t=f.call(e)),e=e.source),N&&(n=!!t&&-1D;)!function(e){e in S||s(S,e,{configurable:!0,get:function(){return g[e]},set:function(t){g[e]=t}})}(_[D++]);(v.constructor=S).prototype=v,p(i,"RegExp",S)}m("RegExp")},"4d64":function(e,t,n){function r(e){return function(t,n,r){var s,u=i(t),c=o(u.length),f=a(r,c);if(e&&n!=n){for(;f]*>)/g,m=/\$([$&'`]|\d\d?)/g;r("replace",2,(function(e,t,n,r){var y=r.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,g=r.REPLACE_KEEPS_$0,v=y?"$":"$0";return[function(n,r){var i=u(this),o=null==n?void 0:n[e];return void 0!==o?o.call(n,i,r):t.call(String(i),n,r)},function(e,r){if(!y&&g||"string"==typeof r&&-1===r.indexOf(v)){var u=n(t,e,this,r);if(u.done)return u.value}for(var b,x=i(e),w=String(this),N="function"==typeof r,S=(N||(r=String(r)),x.global),_=(S&&(b=x.unicode,x.lastIndex=0),[]);null!==(O=f(x,w))&&(_.push(O),S);)""===String(O[0])&&(x.lastIndex=c(w,a(x.lastIndex),b));for(var D,M="",E=0,A=0;A<_.length;A++){for(var O=_[A],C=String(O[0]),T=l(p(s(O.index),w.length),0),k=[],I=1;I=e.length?(this._t=void 0,i(1)):i(0,"keys"==t?n:"values"==t?e[n]:[n,e[n]])}),"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},"693d":function(e,t,n){"use strict";function r(e){var t=V[e]=C(P[U]);return t._k=e,t}function i(e,t){_(e);for(var n,r=N(t=E(t)),i=0,o=r.length;ii;)f(V,t=n[i++])||t==$||t==h||r.push(t);return r}function u(e){for(var t,n=e===Y,r=q(n?Z:E(e)),i=[],o=0;r.length>o;)!f(V,t=r[o++])||n&&!f(Y,t)||i.push(V[t]);return i}var c=n("ef08"),f=n("9c0e"),l=n("0bad"),p=n("512c"),d=n("ba01"),h=n("e34a").KEY,m=n("4b8b"),y=n("b367"),g=n("92f0"),v=n("8b1a"),b=n("cc15"),x=n("fcd4"),w=n("e198"),N=n("0ae2"),S=n("4ebc"),_=n("77e9"),D=n("7a41"),M=n("0983"),E=n("6ca1"),A=n("3397"),O=n("10db"),C=n("6f4f"),T=n("1836"),k=n("4d20"),I=n("fed5"),R=n("1a14"),j=n("9876"),B=k.f,z=R.f,q=T.f,P=c.Symbol,F=c.JSON,L=F&&F.stringify,U="prototype",$=b("_hidden"),H=b("toPrimitive"),W={}.propertyIsEnumerable,G=y("symbol-registry"),V=y("symbols"),Z=y("op-symbols"),Y=Object[U],X=(y="function"==typeof P&&!!I.f,c.QObject),J=!X||!X[U]||!X[U].findChild,Q=l&&m((function(){return 7!=C(z({},"a",{get:function(){return z(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=B(Y,t);r&&delete Y[t],z(e,t,n),r&&e!==Y&&z(Y,t,r)}:z,K=y&&"symbol"==typeof P.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof P},ee=function(e,t,n){return e===Y&&ee(Z,t,n),_(e),t=A(t,!0),_(n),(f(V,t)?(n.enumerable?(f(e,$)&&e[$][t]&&(e[$][t]=!1),n=C(n,{enumerable:O(0,!1)})):(f(e,$)||z(e,$,O(1,{})),e[$][t]=!0),Q):z)(e,t,n)};y||(d((P=function(){if(this instanceof P)throw TypeError("Symbol is not a constructor!");var e=v(0ne;)b(te[ne++]);for(var re=j(b.store),ie=0;re.length>ie;)w(re[ie++]);p(p.S+p.F*!y,"Symbol",{for:function(e){return f(G,e+="")?G[e]:G[e]=P(e)},keyFor:function(e){if(!K(e))throw TypeError(e+" is not a symbol!");for(var t in G)if(G[t]===e)return t},useSetter:function(){J=!0},useSimple:function(){J=!1}}),p(p.S+p.F*!y,"Object",{create:function(e,t){return void 0===t?C(e):i(C(e),t)},defineProperty:ee,defineProperties:i,getOwnPropertyDescriptor:a,getOwnPropertyNames:s,getOwnPropertySymbols:u}),X=m((function(){I.f(1)})),p(p.S+p.F*X,"Object",{getOwnPropertySymbols:function(e){return I.f(M(e))}}),F&&p(p.S+p.F*(!y||m((function(){var e=P();return"[null]"!=L([e])||"{}"!=L({a:e})||"{}"!=L(Object(e))}))),"JSON",{stringify:function(e){for(var t,n,r=[e],i=1;idocument.F=Object<\/script>"),e.close(),c=e.F;t--;)delete c[u][a[t]];return c()};e.exports=Object.create||function(e,t){var n;return null!==e?(r[u]=i(e),n=new r,r[u]=null,n[s]=e):n=c(),void 0===t?n:o(n,t)}},7037:function(e,t,n){function r(t){return e.exports=r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,r(t)}n("a4d3"),n("e01a"),n("d3b7"),n("d28b"),n("3ca3"),n("ddb0"),e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports},7156:function(e,t,n){var r=n("861d"),i=n("d2bb");e.exports=function(e,t,n){return i&&"function"==typeof(t=t.constructor)&&t!==n&&r(t=t.prototype)&&t!==n.prototype&&i(e,t),e}},7418:function(e,t){t.f=Object.getOwnPropertySymbols},"746f":function(e,t,n){var r=n("428f"),i=n("5135"),o=n("e538"),a=n("9bf2").f;e.exports=function(e){var t=r.Symbol||(r.Symbol={});i(t,e)||a(t,e,{value:o.f(e)})}},7634:function(e,t,n){"use strict";var r;void 0!==(t="function"==typeof(r=function(){function e(){return!0}function t(){return!1}function n(){}function r(){var i=[{name:"number",test:function(e){return"number"===typeof e}},{name:"string",test:function(e){return"string"===typeof e}},{name:"boolean",test:function(e){return"boolean"===typeof e}},{name:"Function",test:function(e){return"function"===typeof e}},{name:"Array",test:Array.isArray},{name:"Date",test:function(e){return e instanceof Date}},{name:"RegExp",test:function(e){return e instanceof RegExp}},{name:"Object",test:function(e){return"object"===typeof e&&null!==e&&e.constructor===Object}},{name:"null",test:function(e){return null===e}},{name:"undefined",test:function(e){return void 0===e}}],o={name:"any",test:e},a=[],s=[],u={types:i,conversions:s,ignore:a};function c(e){var t=Y(u.types,(function(t){return t.name===e}));if(t)return t;if("any"===e)return o;var n=Y(u.types,(function(t){return t.name.toLowerCase()===e.toLowerCase()}));throw new TypeError('Unknown type "'+e+'"'+(n?'. Did you mean "'+n.name+'"?':""))}function f(e){return e===o?999:u.types.indexOf(e)}function l(e){var t=Y(u.types,(function(t){return t.test(e)}));if(t)return t.name;throw new TypeError("Value has unknown type. Value: "+e)}function p(e,t){if(!e.signatures)throw new TypeError("Function is no typed-function");var n;if("string"===typeof t){n=t.split(",");for(var r=0;r3?e.slice(3):"any":e,i=r.split("|").map(F).filter(L).filter(P),o=T(t,i),a=i.map((function(e){var t=c(e);return{name:e,typeIndex:f(t),test:t.test,conversion:null,conversionIndex:-1}})),s=o.map((function(e){var n=c(e.from);return{name:e.from,typeIndex:f(n),test:n.test,conversion:e,conversionIndex:t.indexOf(e)}}));return{types:a.concat(s),restParam:n}}function y(e,t,n){var r=[];return""!==e.trim()&&(r=e.split(",").map(F).map((function(e,t,r){var i=m(e,n);if(i.restParam&&t!==r.length-1)throw new SyntaxError('Unexpected rest parameter "'+e+'": only allowed for the last parameter');return i}))),r.some($)?null:{params:r,fn:t}}function g(e){var t=W(e);return!!t&&t.restParam}function v(e){return e.types.some((function(e){return null!=e.conversion}))}function b(t){if(t&&0!==t.types.length){if(1===t.types.length)return c(t.types[0].name).test;if(2===t.types.length){var n=c(t.types[0].name).test,r=c(t.types[1].name).test;return function(e){return n(e)||r(e)}}var i=t.types.map((function(e){return c(e.name).test}));return function(e){for(var t=0;t=i+1}}return 0===e.length?function(e){return 0===e.length}:1===e.length?(n=b(e[0]),function(e){return n(e[0])&&1===e.length}):2===e.length?(n=b(e[0]),r=b(e[1]),function(e){return n(e[0])&&r(e[1])&&2===e.length}):(t=e.map(b),function(e){for(var n=0;n0){var c=l(t[o]);return r=new TypeError("Unexpected type of argument in function "+a+" (expected: "+i.join(" or ")+", actual: "+c+", index: "+o+")"),r.data={category:"wrongType",fn:a,index:o,actual:c,expected:i},r}}else s=u}var f=s.map((function(e){return g(e.params)?1/0:e.params.length}));if(t.lengthp?(r=new TypeError("Too many arguments in function "+a+" (expected: "+p+", actual: "+t.length+")"),r.data={category:"tooManyArgs",fn:a,index:t.length,expectedLength:p},r):(r=new TypeError('Arguments of type "'+t.join(", ")+'" do not match any of the defined signatures of function '+a+"."),r.data={category:"mismatch",actual:t.map(l)},r)}function E(e){for(var t=999,n=0;n=a:c?a>=s:a===s}function z(e,r){if(0===Object.keys(r).length)throw new SyntaxError("No signatures provided");var i=[];Object.keys(r).map((function(e){return y(e,r[e],u.conversions)})).filter(U).forEach((function(e){var t=Y(i,(function(t){return B(t,e)}));if(t)throw new TypeError('Conflicting signatures "'+h(t.params)+'" and "'+h(e.params)+'".');i.push(e)}));var o=J(i,(function(e){var t=e?j(e.params,!1):[];return t.map((function(t){return{params:t,fn:e.fn}}))})).filter(U);o.sort(C);var a=o[0]&&o[0].params.length<=2&&!g(o[0].params),s=o[1]&&o[1].params.length<=2&&!g(o[1].params),c=o[2]&&o[2].params.length<=2&&!g(o[2].params),f=o[3]&&o[3].params.length<=2&&!g(o[3].params),l=o[4]&&o[4].params.length<=2&&!g(o[4].params),p=o[5]&&o[5].params.length<=2&&!g(o[5].params),d=a&&s&&c&&f&&l&&p,m=o.map((function(e){return x(e.params)})),v=a?b(o[0].params[0]):t,w=s?b(o[1].params[0]):t,N=c?b(o[2].params[0]):t,S=f?b(o[3].params[0]):t,_=l?b(o[4].params[0]):t,D=p?b(o[5].params[0]):t,M=a?b(o[0].params[1]):t,E=s?b(o[1].params[1]):t,A=c?b(o[2].params[1]):t,O=f?b(o[3].params[1]):t,T=l?b(o[4].params[1]):t,I=p?b(o[5].params[1]):t,z=o.map((function(e){return k(e.params,e.fn)})),q=a?z[0]:n,P=s?z[1]:n,F=c?z[2]:n,L=f?z[3]:n,$=l?z[4]:n,H=p?z[5]:n,W=a?o[0].params.length:-1,G=s?o[1].params.length:-1,V=c?o[2].params.length:-1,Z=f?o[3].params.length:-1,X=l?o[4].params.length:-1,Q=p?o[5].params.length:-1,K=d?6:0,ee=o.length,te=function(){for(var t=K;t>>15^(e^=e<<17)^e>>>12,t.i=o,n+(r^r>>>16)|0};var n,r,i,o,a,s=t,u=e,c=[],f=128;for(u===(0|u)?(r=u,u=null):(u+="\0",r=0,f=Math.max(f,u.length)),i=0,o=-32;o>>15)^r<<4)^r>>>13,0<=o&&(i=0==(n=c[127&o]^=r+(a=a+1640531527|0))?i+1:0);for(128<=i&&(c[127&(u&&u.length||0)]=-1),i=127,o=512;0>>15)^(n=(n^=n<<17)^n>>>12);s.w=a,s.X=c,s.i=i}function o(e,t){return t.i=e.i,t.w=e.w,t.X=e.X.slice(),t}function a(e,t){function n(){return(r.next()>>>0)/4294967296}var r=new i(e=null==e?+new Date:e);e=t&&t.state;return n.double=function(){do{var e=((r.next()>>>11)+(r.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},n.int32=r.next,n.quick=n,e&&(e.X&&o(e,r),n.state=function(){return o(r,{})}),n}e&&e.exports?e.exports=a:n("07d6")&&n("3c35")?void 0!==(r=function(){return a}.call(t,n,t,e))&&(e.exports=r):this.xor4096=a}(e,n("07d6"))}).call(this,n("62e4")(e))},"7b0b":function(e,t,n){var r=n("1d80");e.exports=function(e){return Object(r(e))}},"7b3e":function(e,t,n){"use strict";var r,i=n("a3de");i.canUseDOM&&(r=document.implementation&&document.implementation.hasFeature&&!0!==document.implementation.hasFeature("","") /** * Checks if an event is supported in the current execution environment. * * NOTE: This will not work correctly for non-generic events such as `change`, * `reset`, `load`, `error`, and `select`. * * Borrows from Modernizr. * * @param {string} eventNameSuffix Event name, e.g. "click". * @param {?boolean} capture Check if the capture phase is supported. * @return {boolean} True if the event is supported. * @internal * @license Modernizr 3.0.0pre (Custom Build) | MIT */),e.exports=function(e,t){var n,o;return!(!i.canUseDOM||t&&!("addEventListener"in document))&&((n=(t="on"+e)in document)||((o=document.createElement("div")).setAttribute(t,"return;"),n="function"==typeof o[t]),!n&&r&&"wheel"===e?document.implementation.hasFeature("Events.wheel","3.0"):n)}},"7c73":function(e,t,n){function r(){}var i,o=n("825a"),a=n("37e8"),s=n("7839"),u=n("d012"),c=n("1be4"),f=n("cc12"),l=(n=n("f772"),"prototype"),p="script",d=n("IE_PROTO"),h=function(e){return"<"+p+">"+e+""},m=function(){try{i=document.domain&&new ActiveXObject("htmlfile")}catch(e){}m=i?((e=i).write(h("")),e.close(),t=e.parentWindow.Object,e=null,t):(e=f("iframe"),t="java"+p+":",e.style.display="none",c.appendChild(e),e.src=String(t),(t=e.contentWindow.document).open(),t.write(h("document.F=Object")),t.close(),t.F);for(var e,t,n=s.length;n--;)delete m[l][s[n]];return m()};u[d]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(r[l]=o(e),n=new r,r[l]=null,n[d]=e):n=m(),void 0===t?n:a(n,t)}},"7dd0":function(e,t,n){"use strict";function r(){return this}var i=n("23e7"),o=n("9ed3"),a=n("e163"),s=n("d2bb"),u=n("d44e"),c=n("9112"),f=n("6eeb"),l=n("b622"),p=n("c430"),d=n("3f8c"),h=(n=n("ae93"),n.IteratorPrototype),m=n.BUGGY_SAFARI_ITERATORS,y=l("iterator"),g="values";e.exports=function(e,t,n,l,v,b,x){function w(e){if(e===v&&E)return E;if(!m&&e in D)return D[e];switch(e){case"keys":case g:case"entries":return function(){return new n(this,e)}}return function(){return new n(this)}}o(n,t,l);l=t+" Iterator";var N,S,_=!1,D=e.prototype,M=D[y]||D["@@iterator"]||v&&D[v],E=!m&&M||w(v),A="Array"==t&&D.entries||M;if(A&&(A=a(A.call(new e)),h!==Object.prototype)&&A.next&&(p||a(A)===h||(s?s(A,h):"function"!=typeof A[y]&&c(A,y,r)),u(A,l,!0,!0),p)&&(d[l]=r),v==g&&M&&M.name!==g&&(_=!0,E=function(){return M.call(this)}),p&&!x||D[y]===E||c(D,y,E),d[t]=E,v)if(N={values:w(g),keys:b?E:w("keys"),entries:w("entries")},x)for(S in N)!m&&!_&&S in D||f(D,S,N[S]);else i({target:t,proto:!0,forced:m||_},N);return N}},"7f9a":function(e,t,n){var r=n("da84");n=n("8925"),r=r.WeakMap;e.exports="function"==typeof r&&/native code/.test(n(r))},8119:function(e,t,n){n("693d"),n("dfe5"),n("301c"),n("4e71"),e.exports=n("5524").Symbol},8172:function(e,t,n){n("746f")("toPrimitive")},"825a":function(e,t,n){var r=n("861d");e.exports=function(e){if(r(e))return e;throw TypeError(String(e)+" is not an object")}},"83ab":function(e,t,n){n=n("d039"),e.exports=!n((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},8418:function(e,t,n){"use strict";var r=n("c04e"),i=n("9bf2"),o=n("5c6c");e.exports=function(e,t,n){t=r(t),t in e?i.f(e,t,o(0,n)):e[t]=n}},"85e7":function(e,t,n){var r=n("1a14"),i=n("77e9"),o=n("9876");e.exports=n("0bad")?Object.defineProperties:function(e,t){i(e);for(var n,a=o(t),s=a.length,u=0;u>>7^(n=t.c),n=n-(r=t.d)|0,r=r<<24^r>>>8^(i=t.a),i=i-e|0;return t.b=e=e<<20^e>>>12^n,t.c=n=n-r|0,t.d=r<<16^n>>>16^i,t.a=i-e|0},t.a=0,t.b=0,t.c=-1640531527,t.d=1367130551,e===Math.floor(e)?(t.a=e/4294967296|0,t.b=0|e):n+=e;for(var r=0;r>>0)/4294967296}var r=new i(e);e=t&&t.state;return n.double=function(){do{var e=((r.next()>>>11)+(r.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},n.int32=r.next,n.quick=n,e&&("object"==typeof e&&o(e,r),n.state=function(){return o(r,{})}),n}e&&e.exports?e.exports=a:n("07d6")&&n("3c35")?void 0!==(r=function(){return a}.call(t,n,t,e))&&(e.exports=r):this.tychei=a}(e,n("07d6"))}).call(this,n("62e4")(e))},"8a0d":function(e,t){e.exports={}},"8aa5":function(e,t,n){"use strict";var r=n("6547").charAt;e.exports=function(e,t,n){return t+(n?r(e,t).length:1)}},"8b1a":function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},"8c4f":function(e,t,n){"use strict"; /*! * vue-router v3.0.6 * (c) 2019 Evan You * @license MIT */function r(e){return-1=e.length?n():e[i]?t(e[i],(function(){r(i+1)})):r(i+1)}r(0)}function le(e){return function(t,n,i){var o=!1,a=0,s=null;pe(e,(function(e,t,n,u){if("function"==typeof e&&void 0===e.cid){o=!0,a++;var c,f=me((function(t){var r;((r=t).__esModule||he&&"Module"===r[Symbol.toStringTag])&&(t=t.default),e.resolved="function"==typeof t?t:w.extend(t),n.components[u]=t,--a<=0&&i()})),l=me((function(e){var t="Failed to resolve async component "+u+": "+e;s||(s=r(e)?e:new Error(t),i(s))}));try{c=e(f,l)}catch(t){l(t)}c&&("function"==typeof c.then||(c=c.component)&&"function"==typeof c.then)&&c.then(f,l)}})),o||i()}}function pe(e,t){return de(e.map((function(e){return Object.keys(e.components).map((function(n){return t(e.components[n],e.instances[n],e,n)}))})))}function de(e){return Array.prototype.concat.apply([],e)}var he="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;function me(e){var t=!1;return function(){for(var n=[],r=arguments.length;r--;)n[r]=arguments[r];if(!t)return t=!0,e.apply(this,n)}}function ye(e,t){this.router=e,this.base=function(e){var t;return e=e||(E?(t=document.querySelector("base"),(e=t&&t.getAttribute("href")||"/").replace(/^https?:\/\/[^\/]+/,"")):"/"),"/"!==e.charAt(0)&&(e="/"+e),e.replace(/\/$/,"")}(t),this.current=y,this.pending=null,this.ready=!1,this.readyCbs=[],this.readyErrorCbs=[],this.errorCbs=[]}function ge(e,t,n,r){return e=pe(e,(function(e,r,i,o){if(e=function(e,t){return"function"!=typeof e&&(e=w.extend(e)),e.options[t]}(e,t),e)return Array.isArray(e)?e.map((function(e){return n(e,r,i,o)})):n(e,r,i,o)})),de(r?e.reverse():e)}function ve(e,t){if(t)return function(){return e.apply(t,arguments)}}ye.prototype.listen=function(e){this.cb=e},ye.prototype.onReady=function(e,t){this.ready?e():(this.readyCbs.push(e),t&&this.readyErrorCbs.push(t))},ye.prototype.onError=function(e){this.errorCbs.push(e)},ye.prototype.transitionTo=function(e,t,n){var r=this,i=this.router.match(e,this.current);this.confirmTransition(i,(function(){r.updateRoute(i),t&&t(i),r.ensureURL(),r.ready||(r.ready=!0,r.readyCbs.forEach((function(e){e(i)})))}),(function(e){n&&n(e),e&&!r.ready&&(r.ready=!0,r.readyErrorCbs.forEach((function(t){t(e)})))}))},ye.prototype.confirmTransition=function(e,t,n){var i=this,o=this.current,a=function(e){r(e)&&i.errorCbs.length&&i.errorCbs.forEach((function(t){t(e)})),n&&n(e)};if(v(e,o)&&e.matched.length===o.matched.length)return this.ensureURL(),a();function s(t,n){if(i.pending!==e)return a();try{t(e,o,(function(e){!1===e||r(e)?(i.ensureURL(!0),a(e)):"string"==typeof e||"object"==typeof e&&("string"==typeof e.path||"string"==typeof e.name)?(a(),"object"==typeof e&&e.replace?i.replace(e):i.push(e)):n(e)}))}catch(t){a(t)}}var u=function(e,t){var n,r=Math.max(e.length,t.length);for(n=0;n=this.stack.length||(t=this.stack[r],this.confirmTransition(t,(function(){n.index=r,n.updateRoute(t)})))},t.prototype.getCurrentLocation=function(){var e=this.stack[this.stack.length-1];return e?e.fullPath:"/"},t.prototype.ensureURL=function(){},t}(ye);S={currentRoute:{configurable:!0}};function Oe(e,t){return e.push(t),function(){var n=e.indexOf(t);-1()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,url:new RegExp("^(?!mailto:)(?:(?:http|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}(?:\\.(?:[0-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,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$","i"),hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},y={integer:function(e){return y.number(e)&&parseInt(e,10)===e},float:function(e){return y.number(e)&&!y.integer(e)},array:function(e){return Array.isArray(e)},regexp:function(e){if(e instanceof RegExp)return!0;try{return!!new RegExp(e)}catch(e){return!1}},date:function(e){return"function"==typeof e.getTime&&"function"==typeof e.getMonth&&"function"==typeof e.getYear},number:function(e){return!isNaN(e)&&"number"==typeof e},object:function(e){return"object"===(void 0===e?"undefined":o()(e))&&!y.array(e)},method:function(e){return"function"==typeof e},email:function(e){return"string"==typeof e&&!!e.match(m.email)&&e.length<255},url:function(e){return"string"==typeof e&&!!e.match(m.url)},hex:function(e){return"string"==typeof e&&!!e.match(m.hex)}},g={required:d,whitespace:h,type:function(e,t,n,r,i){e.required&&void 0===t?d(e,t,n,r,i):(n=e.type,-1<["integer","float","array","regexp","object","method","email","number","date","url","hex"].indexOf(n)?y[n](t)||r.push(s(i.messages.types[n],e.fullField,e.type)):n&&(void 0===t?"undefined":o()(t))!==e.type&&r.push(s(i.messages.types[n],e.fullField,e.type)))},range:function(e,t,n,r,i){var o="number"==typeof e.len,a="number"==typeof e.min,u="number"==typeof e.max,c=t,f=null,l="number"==typeof t,p="string"==typeof t,d=Array.isArray(t);if(l?f="number":p?f="string":d&&(f="array"),!f)return!1;d&&(c=t.length),p&&(c=t.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"_").length),o?c!==e.len&&r.push(s(i.messages[f].len,e.fullField,e.len)):a&&!u&&ce.max?r.push(s(i.messages[f].max,e.fullField,e.max)):a&&u&&(ce.max)&&r.push(s(i.messages[f].range,e.fullField,e.min,e.max))},enum:function(e,t,n,r,i){e.enum=Array.isArray(e.enum)?e.enum:[],-1===e.enum.indexOf(t)&&r.push(s(i.messages.enum,e.fullField,e.enum.join(", ")))},pattern:function(e,t,n,r,i){e.pattern&&(e.pattern instanceof RegExp?(e.pattern.lastIndex=0,e.pattern.test(t)||r.push(s(i.messages.pattern.mismatch,e.fullField,t,e.pattern))):"string"!=typeof e.pattern||new RegExp(e.pattern).test(t)||r.push(s(i.messages.pattern.mismatch,e.fullField,t,e.pattern)))}};function v(e,t,n,r,i){var o=e.type,a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(u(t,o)&&!e.required)return n();g.required(e,t,r,a,i,o),u(t,o)||g.type(e,t,r,a,i)}n(a)}var b={string:function(e,t,n,r,i){var o=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(u(t,"string")&&!e.required)return n();g.required(e,t,r,o,i,"string"),u(t,"string")||(g.type(e,t,r,o,i),g.range(e,t,r,o,i),g.pattern(e,t,r,o,i),!0===e.whitespace&&g.whitespace(e,t,r,o,i))}n(o)},method:function(e,t,n,r,i){var o=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(u(t)&&!e.required)return n();g.required(e,t,r,o,i),void 0!==t&&g.type(e,t,r,o,i)}n(o)},number:function(e,t,n,r,i){var o=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(u(t)&&!e.required)return n();g.required(e,t,r,o,i),void 0!==t&&(g.type(e,t,r,o,i),g.range(e,t,r,o,i))}n(o)},boolean:function(e,t,n,r,i){var o=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(u(t)&&!e.required)return n();g.required(e,t,r,o,i),void 0!==t&&g.type(e,t,r,o,i)}n(o)},regexp:function(e,t,n,r,i){var o=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(u(t)&&!e.required)return n();g.required(e,t,r,o,i),u(t)||g.type(e,t,r,o,i)}n(o)},integer:function(e,t,n,r,i){var o=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(u(t)&&!e.required)return n();g.required(e,t,r,o,i),void 0!==t&&(g.type(e,t,r,o,i),g.range(e,t,r,o,i))}n(o)},float:function(e,t,n,r,i){var o=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(u(t)&&!e.required)return n();g.required(e,t,r,o,i),void 0!==t&&(g.type(e,t,r,o,i),g.range(e,t,r,o,i))}n(o)},array:function(e,t,n,r,i){var o=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(u(t,"array")&&!e.required)return n();g.required(e,t,r,o,i,"array"),u(t,"array")||(g.type(e,t,r,o,i),g.range(e,t,r,o,i))}n(o)},object:function(e,t,n,r,i){var o=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(u(t)&&!e.required)return n();g.required(e,t,r,o,i),void 0!==t&&g.type(e,t,r,o,i)}n(o)},enum:function(e,t,n,r,i){var o=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(u(t)&&!e.required)return n();g.required(e,t,r,o,i),t&&g.enum(e,t,r,o,i)}n(o)},pattern:function(e,t,n,r,i){var o=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(u(t,"string")&&!e.required)return n();g.required(e,t,r,o,i),u(t,"string")||g.pattern(e,t,r,o,i)}n(o)},date:function(e,t,n,r,i){var o,a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(u(t)&&!e.required)return n();g.required(e,t,r,a,i),u(t)||(o=void 0,o="number"==typeof t?new Date(t):t,g.type(e,o,r,a,i),o&&g.range(e,o.getTime(),r,a,i))}n(a)},url:v,hex:v,email:v,required:function(e,t,n,r,i){var a=[],s=Array.isArray(t)?"array":void 0===t?"undefined":o()(t);g.required(e,t,r,a,i,s),n(a)}};function x(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var e=JSON.parse(JSON.stringify(this));return e.clone=this.clone,e}}}var w=x();function N(e){this.rules=null,this._messages=w,this.define(e)}N.prototype={messages:function(e){return e&&(this._messages=p(x(),e)),this._messages},define:function(e){if(!e)throw new Error("Cannot configure a schema with no rules");if("object"!==(void 0===e?"undefined":o()(e))||Array.isArray(e))throw new Error("Rules must be an object");this.rules={};var t,n=void 0;for(n in e)e.hasOwnProperty(n)&&(t=e[n],this.rules[n]=Array.isArray(t)?t:[t])},validate:function(e){var t,n,r,a,u=this,c=e,d=1>>=1;return(e+n)/t}var p=[],g=(e=m(function e(t,n){var r,i=[],o=typeof t;if(n&&"object"==o)for(r in t)try{i.push(e(t[r],n-1))}catch(e){}return i.length?i:"string"==o?t:t+"\0"}((t=1==t?{entropy:!0}:t||{}).entropy?[e,y(o)]:null==e?function(){try{return r&&(t=r.randomBytes)?t=t(s):(t=new Uint8Array(s),(i.crypto||i.msCrypto).getRandomValues(t)),y(t)}catch(e){var t=i.navigator;t=t&&t.plugins;return[+new Date,i,t,i.screen,y(o)]}}():e,3),p),new d(p));return l.int32=function(){return 0|g.g(4)},l.quick=function(){return g.g(4)/4294967296},l.double=l,m(y(g.S),o),(t.pass||n||function(e,t,n,r){return r&&(r.S&&h(r,g),e.state=function(){return h(g,{})}),n?(a.random=e,t):e})(l,e,"global"in t?t.global:this==a,t.state)}function d(e){var t,n=e.length,r=this,i=0,o=r.i=r.j=0,a=r.S=[];for(n||(e=[n++]);i>>2;return t.x=t.y,t.y=t.z,t.z=t.w,t.w=t.v,(t.d=t.d+362437|0)+(t.v=t.v^t.v<<4^e^e<<1)|0},t.x=0,t.y=0,t.z=0,t.w=0,e===((t.v=0)|e)?t.x=e:n+=e;for(var r=0;r>>4),t.next()}function o(e,t){return t.x=e.x,t.y=e.y,t.z=e.z,t.w=e.w,t.v=e.v,t.d=e.d,t}function a(e,t){function n(){return(r.next()>>>0)/4294967296}var r=new i(e);e=t&&t.state;return n.double=function(){do{var e=((r.next()>>>11)+(r.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},n.int32=r.next,n.quick=n,e&&("object"==typeof e&&o(e,r),n.state=function(){return o(r,{})}),n}e&&e.exports?e.exports=a:n("07d6")&&n("3c35")?void 0!==(r=function(){return a}.call(t,n,t,e))&&(e.exports=r):this.xorwow=a}(e,n("07d6"))}).call(this,n("62e4")(e))},a4d3:function(e,t,n){"use strict";function r(e,t){var n=te[e]=S(Y[W]);return G(n,{type:H,tag:e,description:t}),l||(n.description=t),n}function i(e,t){v(e);var n=x(t);t=_(n).concat(fe(n));return U(t,(function(t){l&&!ce.call(n,t)||ue(e,t,n[t])})),e}function o(e,t){var n;e=x(e),t=w(t,!0);if(e!==Z||!m(te,t)||m(ne,t))return!(n=J(e,t))||!m(te,t)||m(e,$)&&e[$][t]||(n.enumerable=!0),n}function a(e){e=K(x(e));var t=[];return U(e,(function(e){m(te,e)||m(j,e)||t.push(e)})),t}var s=n("23e7"),u=n("da84"),c=n("d066"),f=n("c430"),l=n("83ab"),p=n("4930"),d=n("fdbf"),h=n("d039"),m=n("5135"),y=n("e8b5"),g=n("861d"),v=n("825a"),b=n("7b0b"),x=n("fc6a"),w=n("c04e"),N=n("5c6c"),S=n("7c73"),_=n("df75"),D=n("241c"),M=n("057f"),E=n("7418"),A=n("06cf"),O=n("9bf2"),C=n("d1e7"),T=n("9112"),k=n("6eeb"),I=n("5692"),R=n("f772"),j=n("d012"),B=n("90e3"),z=n("b622"),q=n("e538"),P=n("746f"),F=n("d44e"),L=n("69f3"),U=n("b727").forEach,$=R("hidden"),H="Symbol",W="prototype",G=(n=z("toPrimitive"),L.set),V=L.getterFor(H),Z=Object[W],Y=u.Symbol,X=c("JSON","stringify"),J=A.f,Q=O.f,K=M.f,ee=C.f,te=I("symbols"),ne=I("op-symbols"),re=I("string-to-symbol-registry"),ie=I("symbol-to-string-registry"),oe=(R=I("wks"),L=u.QObject,!L||!L[W]||!L[W].findChild),ae=l&&h((function(){return 7!=S(Q({},"a",{get:function(){return Q(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=J(Z,t);r&&delete Z[t],Q(e,t,n),r&&e!==Z&&Q(Z,t,r)}:Q,se=d?function(e){return"symbol"==typeof e}:function(e){return Object(e)instanceof Y},ue=function(e,t,n){return e===Z&&ue(ne,t,n),v(e),t=w(t,!0),v(n),(m(te,t)?(n.enumerable?(m(e,$)&&e[$][t]&&(e[$][t]=!1),n=S(n,{enumerable:N(0,!1)})):(m(e,$)||Q(e,$,N(1,{})),e[$][t]=!0),ae):Q)(e,t,n)},ce=function(e){e=w(e,!0);var t=ee.call(this,e);return!(this===Z&&m(te,e)&&!m(ne,e))&&(!(t||!m(this,e)||!m(te,e)||m(this,$)&&this[$][e])||t)},fe=function(e){var t=e===Z,n=(e=K(t?ne:x(e)),[]);return U(e,(function(e){!m(te,e)||t&&!m(Z,e)||n.push(te[e])})),n};p||(k((Y=function(){if(this instanceof Y)throw TypeError("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?String(arguments[0]):void 0,t=B(e),n=function(e){this===Z&&n.call(ne,e),m(this,$)&&m(this[$],t)&&(this[$][t]=!1),ae(this,t,N(1,e))};return l&&oe&&ae(Z,t,{configurable:!0,set:n}),r(t,e)})[W],"toString",(function(){return V(this).tag})),k(Y,"withoutSetter",(function(e){return r(B(e),e)})),C.f=ce,O.f=ue,A.f=o,D.f=M.f=a,E.f=fe,q.f=function(e){return r(z(e),e)},l&&(Q(Y[W],"description",{configurable:!0,get:function(){return V(this).description}}),f||k(Z,"propertyIsEnumerable",ce,{unsafe:!0}))),s({global:!0,wrap:!0,forced:!p,sham:!p},{Symbol:Y}),U(_(R),(function(e){P(e)})),s({target:H,stat:!0,forced:!p},{for:function(e){var t;e=String(e);return m(re,e)?re[e]:(t=Y(e),re[e]=t,ie[t]=e,t)},keyFor:function(e){if(!se(e))throw TypeError(e+" is not a symbol");if(m(ie,e))return ie[e]},useSetter:function(){oe=!0},useSimple:function(){oe=!1}}),s({target:"Object",stat:!0,forced:!p,sham:!l},{create:function(e,t){return void 0===t?S(e):i(S(e),t)},defineProperty:ue,defineProperties:i,getOwnPropertyDescriptor:o}),s({target:"Object",stat:!0,forced:!p},{getOwnPropertyNames:a,getOwnPropertySymbols:fe}),s({target:"Object",stat:!0,forced:h((function(){E.f(1)}))},{getOwnPropertySymbols:function(e){return E.f(b(e))}}),X&&s({target:"JSON",stat:!0,forced:!p||h((function(){var e=Y();return"[null]"!=X([e])||"{}"!=X({a:e})||"{}"!=X(Object(e))}))},{stringify:function(e,t,n){for(var r,i=[e],o=1;oD;D++)u(b,N=_[D])&&!u(S,N)&&y(S,N,m(b,N));(S.prototype=x).constructor=S,s(o,v,S)}},ab13:function(e,t,n){var r=n("b622")("match");e.exports=function(t){var n=/./;try{"/./"[t](n)}catch(e){try{return n[r]=!1,"/./"[t](n)}catch(e){}}return!1}},ac1f:function(e,t,n){"use strict";var r=n("23e7");n=n("9263");r({target:"RegExp",proto:!0,forced:/./.exec!==n},{exec:n})},ad6d:function(e,t,n){"use strict";var r=n("825a");e.exports=function(){var e=r(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},ae40:function(e,t,n){function r(e){throw e}var i=n("83ab"),o=n("d039"),a=n("5135"),s=Object.defineProperty,u={};e.exports=function(e,t){var n,c,f,l;return a(u,e)?u[e]:(n=[][e],c=!!a(t=t||{},"ACCESSORS")&&t.ACCESSORS,f=a(t,0)?t[0]:r,l=a(t,1)?t[1]:void 0,u[e]=!!n&&!o((function(){if(c&&!i)return!0;var e={length:-1};c?s(e,1,{enumerable:!0,get:r}):e[1]=1,n.call(e,f,l)})))}},ae93:function(e,t,n){"use strict";var r,i,o=n("e163"),a=n("9112"),s=n("5135"),u=n("b622"),c=(n=n("c430"),u=u("iterator"),!1);[].keys&&("next"in(i=[].keys())?(o=o(o(i)))!==Object.prototype&&(r=o):c=!0),null==r&&(r={}),n||s(r,u)||a(r,u,(function(){return this})),e.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:c}},b041:function(e,t,n){"use strict";var r=n("00ee"),i=n("f5df");e.exports=r?{}.toString:function(){return"[object "+i(this)+"]"}},b0c0:function(e,t,n){var r=n("83ab"),i=(n=n("9bf2").f,Function.prototype),o=i.toString,a=/^\s*function ([^ (]*)/;!r||"name"in i||n(i,"name",{configurable:!0,get:function(){try{return o.call(this).match(a)[1]}catch(e){return""}}})},b367:function(e,t,n){var r=n("5524"),i=n("ef08"),o="__core-js_shared__",a=i[o]||(i[o]={});(e.exports=function(e,t){return a[e]||(a[e]=void 0!==t?t:{})})("versions",[]).push({version:r.version,mode:n("e444")?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},b50d:function(e,t,n){"use strict";var r=n("c532"),i=n("467f"),o=n("30b5"),a=n("c345"),s=n("3934"),u=n("2d83");e.exports=function(e){return new Promise((function(t,c){var f,l,p=e.data,d=e.headers,h=(r.isFormData(p)&&delete d["Content-Type"],new XMLHttpRequest);if(e.auth&&(f=e.auth.username||"",l=e.auth.password||"",d.Authorization="Basic "+btoa(f+":"+l)),h.open(e.method.toUpperCase(),o(e.url,e.params,e.paramsSerializer),!0),h.timeout=e.timeout,h.onreadystatechange=function(){var n;h&&4===h.readyState&&(0!==h.status||h.responseURL&&0===h.responseURL.indexOf("file:"))&&(n="getAllResponseHeaders"in h?a(h.getAllResponseHeaders()):null,n={data:e.responseType&&"text"!==e.responseType?h.response:h.responseText,status:h.status,statusText:h.statusText,headers:n,config:e,request:h},i(t,c,n),h=null)},h.onerror=function(){c(u("Network Error",e,null,h)),h=null},h.ontimeout=function(){c(u("timeout of "+e.timeout+"ms exceeded",e,"ECONNABORTED",h)),h=null},r.isStandardBrowserEnv()&&(f=n("7aac"),l=(e.withCredentials||s(e.url))&&e.xsrfCookieName?f.read(e.xsrfCookieName):void 0)&&(d[e.xsrfHeaderName]=l),"setRequestHeader"in h&&r.forEach(d,(function(e,t){void 0===p&&"content-type"===t.toLowerCase()?delete d[t]:h.setRequestHeader(t,e)})),e.withCredentials&&(h.withCredentials=!0),e.responseType)try{h.responseType=e.responseType}catch(f){if("json"!==e.responseType)throw f}"function"==typeof e.onDownloadProgress&&h.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&h.upload&&h.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){h&&(h.abort(),c(e),h=null)})),void 0===p&&(p=null),h.send(p)}))}},b575:function(e,t,n){var r,i,o,a,s,u,c,f,l=n("da84"),p=n("06cf").f,d=n("c6b6"),h=n("2cf4").set,m=(n=n("1cdc"),l.MutationObserver||l.WebKitMutationObserver),y=l.process,g=l.Promise,v="process"==d(y);d=p(l,"queueMicrotask"),p=d&&d.value;p||(r=function(){var e,t;for(v&&(e=y.domain)&&e.exit();i;){t=i.fn,i=i.next;try{t()}catch(e){throw i?a():o=void 0,e}}o=void 0,e&&e.enter()},a=v?function(){y.nextTick(r)}:m&&!n?(s=!0,u=document.createTextNode(""),new m(r).observe(u,{characterData:!0}),function(){u.data=s=!s}):g&&g.resolve?(c=g.resolve(void 0),f=c.then,function(){f.call(c,r)}):function(){h.call(l,r)}),e.exports=p||function(e){e={fn:e,next:void 0},o&&(o.next=e),i||(i=e,a()),o=e}},b622:function(e,t,n){var r=n("da84"),i=n("5692"),o=n("5135"),a=n("90e3"),s=n("4930"),u=(n=n("fdbf"),i("wks")),c=r.Symbol,f=n?c:c&&c.withoutSetter||a;e.exports=function(e){return o(u,e)||(s&&o(c,e)?u[e]=c[e]:u[e]=f("Symbol."+e)),u[e]}},b636:function(e,t,n){n("746f")("asyncIterator")},b64b:function(e,t,n){var r=n("23e7"),i=n("7b0b"),o=n("df75");r({target:"Object",stat:!0,forced:n("d039")((function(){o(1)}))},{keys:function(e){return o(i(e))}})},b727:function(e,t,n){function r(e){var t=1==e,n=2==e,r=3==e,f=4==e,l=6==e,p=5==e||l;return function(d,h,m,y){for(var g,v,b=a(d),x=o(b),w=i(h,m,3),N=s(x.length),S=0,_=(h=y||u,t?h(d,N):n?h(d,0):void 0);S>>19^e^e>>>8},e===(0|e)?t.x=e:n+=e;for(var r=0;r>>0)/4294967296}var r=new i(e);e=t&&t.state;return n.double=function(){do{var e=((r.next()>>>11)+(r.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},n.int32=r.next,n.quick=n,e&&("object"==typeof e&&o(e,r),n.state=function(){return o(r,{})}),n}e&&e.exports?e.exports=a:n("07d6")&&n("3c35")?void 0!==(r=function(){return a}.call(t,n,t,e))&&(e.exports=r):this.xor128=a}(e,n("07d6"))}).call(this,n("62e4")(e))},b9c7:function(e,t,n){n("e507"),e.exports=n("5524").Object.assign},ba01:function(e,t,n){e.exports=n("051b")},bc3a:function(e,t,n){e.exports=n("cee4")},bd11:function(e,t){e.exports=f,e.exports.parse=o,e.exports.compile=function(e,t){return a(o(e,t))},e.exports.tokensToFunction=a,e.exports.tokensToRegExp=c;var n="/",r="./",i=new RegExp(["(\\\\.)","(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?"].join("|"),"g");function o(e,t){for(var o=[],a=0,u=0,c="",f=t&&t.delimiter||n,l=t&&t.delimiters||r,p=!1;null!==(m=i.exec(e));){var d,h,m,y,g=m[0],v=m[1],b=m.index;c+=e.slice(u,b),u=b+g.length,v?(c+=v[1],p=!0):(b="",g=e[u],v=m[2],d=m[3],h=m[4],m=m[5],!p&&c.length&&(y=c.length-1,-1e[t])}var K=["Matrix","Array"],ee=["number","BigNumber","Fraction"];function te(e,t){function n(n){var r,i;return n?(r=G(e,W),ne(n,"matrix",K),ne(n,"number",ee),function e(t,n){if(Array.isArray(n))throw new TypeError("Arrays are not supported by deepExtend");for(var r in n)if(J(n,r)&&!(r in Object.prototype)&&!(r in Function.prototype))if(n[r]&&n[r].constructor===Object)void 0===t[r]&&(t[r]={}),t[r]&&t[r].constructor===Object?e(t[r],n[r]):t[r]=n[r];else{if(Array.isArray(n[r]))throw new TypeError("Arrays are not supported by deepExtend");t[r]=n[r]}}(e,n),i=G(e,W),n=G(n,W),t("config",i,r,n),i):G(e,W)}return n.MATRIX_OPTIONS=K,n.NUMBER_OPTIONS=ee,Object.keys(o).forEach(t=>{Object.defineProperty(n,t,{get:()=>e[t],enumerable:!0,configurable:!0})}),n}function ne(e,t,n){void 0!==e[t]&&(e=e[t],n.indexOf(e))}var re=function(e){if(e)throw new Error("The global config is readonly. \nPlease create a mathjs instance if you want to change the default configuration. \nExample:\n\n import { create, all } from 'mathjs';\n const mathjs = create(all);\n mathjs.config({ number: 'BigNumber' });\n");return Object.freeze(o)},ie=(r=(i()(re,o,{MATRIX_OPTIONS:K,NUMBER_OPTIONS:ee}),n("4128")),n.n(r));function oe(e){return"boolean"==typeof e||!!isFinite(e)&&e===Math.round(e)}var ae=Math.sign||function(e){return 0c.length||u-f+1>c.length;)c.push(0);else for(var l=Math.abs(u-f)-(c.length-1),p=0;p=n?ye(e,t):(r=i.coefficients,n=i.exponent,r=(r=r.lengtht&&5<=r.splice(t,r.length-t)[0]){var i=t-1;for(r[i]++;10===r[i];)r.pop(),0===i&&(r.unshift(0),n.exponent++,i++),r[--i]++}return n}function ve(e){for(var t=[],n=0;n'"'+n+'": '+Ce(e[n],t)).join(", ")+"}":String(e)}(e,t),t&&"object"==typeof t&&"truncate"in t&&e.length>t.truncate?e.substring(0,t.truncate-3)+"...":e}function Te(e){for(var t=String(e),n="",r=0;r/g,">")}function Ie(e,t){if(!l(e))throw new TypeError("Unexpected type of argument in function compareText (expected: string or Array or Matrix, actual: "+H(e)+", index: 0)");if(l(t))return e===t?0:t=this.max?this.message="Index out of range ("+this.index+" > "+(this.max-1)+")":this.message="Index out of range ("+this.index+")",this.stack=(new Error).stack}function Be(e){for(var t=[];Array.isArray(e);)t.push(e.length),e=e[0];return t}function ze(e,t){if(0===t.length){if(Array.isArray(e))throw new Re(e.length,0)}else!function e(t,n,r){var i=t.length;if(i!==n[r])throw new Re(i,n[r]);if(r")}(e,t,0)}function qe(e,t){if(!a(e)||!oe(e))throw new TypeError("Index must be an integer (value: "+e+")");if(e<0||"number"==typeof t&&t<=e)throw new je(e,t)}function Pe(e,t,n){if(!Array.isArray(e)||!Array.isArray(t))throw new TypeError("Array expected");if(0===t.length)throw new Error("Resizing to scalar is not supported");return t.forEach((function(e){if(!a(e)||!oe(e)||e<0)throw new TypeError("Invalid size, must contain positive integers (size: "+Ce(t)+")")})),function e(t,n,r,i){var o,a,s=t.length,u=n[r],c=Math.min(s,u);if(t.length=u,re*t,1)}function $e(e,t){for(var n=t||Be(e);Array.isArray(e)&&1===e.length;)e=e[0],n.shift();for(var r=n.length;1===n[r-1];)r--;return rt.test(e))}function Xe(e,t){return Array.prototype.join.call(e,t)}function Je(e){if(!Array.isArray(e))throw new TypeError("Array input expected");if(0===e.length)return e;var t=[],n=0;t[0]={value:e[0],identifier:0};for(var r=1;r!((e=e)&&"?"===e[0])).every(e=>void 0!==s[e]))return n(i);throw a=a.filter(e=>void 0===s[e]),new Error('Cannot create function "'.concat(o,'", ')+"some dependencies are missing: ".concat(a.map(e=>'"'.concat(e,'"')).join(", "),"."))}return i.isFactory=!0,i.fn=e,i.dependencies=t.slice().sort(),r&&(i.meta=r),i}function nt(e){return"function"==typeof e&&"string"==typeof e.fn&&Array.isArray(e.dependencies)}function rt(e){return e&&"?"===e[0]?e.slice(1):e}(Re.prototype=new RangeError).constructor=RangeError,Re.prototype.name="DimensionError",Re.prototype.isDimensionError=!0,(je.prototype=new RangeError).constructor=RangeError,je.prototype.name="IndexError";var it=tt("BigNumber",["?on","config"],e=>{var{on:e,config:t}=e,n=ie.a.clone({precision:t.precision,modulo:ie.a.EUCLID});return n.prototype=Object.create(n.prototype),n.prototype.type="BigNumber",n.prototype.isBigNumber=!0,n.prototype.toJSON=function(){return{mathjs:"BigNumber",value:this.toString()}},n.fromJSON=function(e){return new n(e.value)},e&&e("config",(function(e,t){e.precision!==t.precision&&n.config({precision:e.precision})})),n},{isClass:je.prototype.isIndexError=!0}),ot=(r=n("edaf"),n.n(r)),at=tt("Complex",[],()=>(ot.a.prototype.type="Complex",ot.a.prototype.isComplex=!0,ot.a.prototype.toJSON=function(){return{mathjs:"Complex",re:this.re,im:this.im}},ot.a.prototype.toPolar=function(){return{r:this.abs(),phi:this.arg()}},ot.a.prototype.format=function(e){var t=this.im,n=this.re,r=de(this.re,e),i=de(this.im,e);e=a(e)?e:e?e.precision:null;return 0===(t=null!==e&&(e=Math.pow(10,-e),Math.abs(n/t)t.re?1:e.ret.im?1:e.im!0),bt=tt("false",[],()=>!1),xt=tt("null",[],()=>null),wt=zt("Infinity",["config","?BigNumber"],e=>{var{config:e,BigNumber:t}=e;return"BigNumber"===e.number?new t(1/0):1/0}),Nt=zt("NaN",["config","?BigNumber"],e=>{var{config:e,BigNumber:t}=e;return"BigNumber"===e.number?new t(NaN):NaN}),St=zt("pi",["config","?BigNumber"],e=>{var{config:e,BigNumber:t}=e;return"BigNumber"===e.number?pt(t):mt}),_t=zt("tau",["config","?BigNumber"],e=>{var{config:e,BigNumber:t}=e;return"BigNumber"===e.number?dt(t):yt}),Dt=zt("e",["config","?BigNumber"],e=>{var{config:e,BigNumber:t}=e;return"BigNumber"===e.number?ft(t):gt}),Mt=zt("phi",["config","?BigNumber"],e=>{var{config:e,BigNumber:t}=e;return"BigNumber"===e.number?lt(t):1.618033988749895}),Et=zt("LN2",["config","?BigNumber"],e=>{var{config:e,BigNumber:t}=e;return"BigNumber"===e.number?new t(2).ln():Math.LN2}),At=zt("LN10",["config","?BigNumber"],e=>{var{config:e,BigNumber:t}=e;return"BigNumber"===e.number?new t(10).ln():Math.LN10}),Ot=zt("LOG2E",["config","?BigNumber"],e=>{var{config:e,BigNumber:t}=e;return"BigNumber"===e.number?new t(1).div(new t(2).ln()):Math.LOG2E}),Ct=zt("LOG10E",["config","?BigNumber"],e=>{var{config:e,BigNumber:t}=e;return"BigNumber"===e.number?new t(1).div(new t(10).ln()):Math.LOG10E}),Tt=zt("SQRT1_2",["config","?BigNumber"],e=>{var{config:e,BigNumber:t}=e;return"BigNumber"===e.number?new t("0.5").sqrt():Math.SQRT1_2}),kt=zt("SQRT2",["config","?BigNumber"],e=>{var{config:e,BigNumber:t}=e;return"BigNumber"===e.number?new t(2).sqrt():Math.SQRT2}),It=zt("i",["Complex"],e=>(e=e.Complex,e.I)),Rt=tt("PI",["pi"],e=>(e=e.pi,e)),jt=tt("E",["e"],e=>(e=e.e,e)),Bt=tt("version",[],()=>"10.6.4");function zt(e,t,n){return tt(e,t,n,{recreateOnConfigChange:!0})}var qt=jn("speedOfLight","299792458","m s^-1"),Pt=jn("gravitationConstant","6.67430e-11","m^3 kg^-1 s^-2"),Ft=jn("planckConstant","6.62607015e-34","J s"),Lt=jn("reducedPlanckConstant","1.0545718176461565e-34","J s"),Ut=jn("magneticConstant","1.25663706212e-6","N A^-2"),$t=jn("electricConstant","8.8541878128e-12","F m^-1"),Ht=jn("vacuumImpedance","376.730313667","ohm"),Wt=jn("coulomb","8.987551792261171e9","N m^2 C^-2"),Gt=jn("elementaryCharge","1.602176634e-19","C"),Vt=jn("bohrMagneton","9.2740100783e-24","J T^-1"),Zt=jn("conductanceQuantum","7.748091729863649e-5","S"),Yt=jn("inverseConductanceQuantum","12906.403729652257","ohm"),Xt=jn("magneticFluxQuantum","2.0678338484619295e-15","Wb"),Jt=jn("nuclearMagneton","5.0507837461e-27","J T^-1"),Qt=jn("klitzing","25812.807459304513","ohm"),Kt=jn("bohrRadius","5.29177210903e-11","m"),en=jn("classicalElectronRadius","2.8179403262e-15","m"),tn=jn("electronMass","9.1093837015e-31","kg"),nn=jn("fermiCoupling","1.1663787e-5","GeV^-2"),rn=Bn("fineStructure",.0072973525693),on=jn("hartreeEnergy","4.3597447222071e-18","J"),an=jn("protonMass","1.67262192369e-27","kg"),sn=jn("deuteronMass","3.3435830926e-27","kg"),un=jn("neutronMass","1.6749271613e-27","kg"),cn=jn("quantumOfCirculation","3.6369475516e-4","m^2 s^-1"),fn=jn("rydberg","10973731.568160","m^-1"),ln=jn("thomsonCrossSection","6.6524587321e-29","m^2"),pn=Bn("weakMixingAngle",.2229),dn=Bn("efimovFactor",22.7),hn=jn("atomicMass","1.66053906660e-27","kg"),mn=jn("avogadro","6.02214076e23","mol^-1"),yn=jn("boltzmann","1.380649e-23","J K^-1"),gn=jn("faraday","96485.33212331001","C mol^-1"),vn=jn("firstRadiation","3.7417718521927573e-16","W m^2"),bn=jn("loschmidt","2.686780111798444e25","m^-3"),xn=jn("gasConstant","8.31446261815324","J K^-1 mol^-1"),wn=jn("molarPlanckConstant","3.990312712893431e-10","J s mol^-1"),Nn=jn("molarVolume","0.022413969545014137","m^3 mol^-1"),Sn=Bn("sackurTetrode",-1.16487052358),_n=jn("secondRadiation","0.014387768775039337","m K"),Dn=jn("stefanBoltzmann","5.67037441918443e-8","W m^-2 K^-4"),Mn=jn("wienDisplacement","2.897771955e-3","m K"),En=jn("molarMass","0.99999999965e-3","kg mol^-1"),An=jn("molarMassC12","11.9999999958e-3","kg mol^-1"),On=jn("gravity","9.80665","m s^-2"),Cn=jn("planckLength","1.616255e-35","m"),Tn=jn("planckMass","2.176435e-8","kg"),kn=jn("planckTime","5.391245e-44","s"),In=jn("planckCharge","1.87554603778e-18","C"),Rn=jn("planckTemperature","1.416785e+32","K");function jn(e,t,n){return tt(e,["config","Unit","BigNumber"],e=>{var{config:e,Unit:r,BigNumber:i}=e,r=new r("BigNumber"===e.number?new i(t):parseFloat(t),n);return r.fixPrefix=!0,r})}function Bn(e,t){return tt(e,["config","BigNumber"],e=>{var{config:e,BigNumber:n}=e;return"BigNumber"===e.number?new n(t):t})}r=n("d61e");var zn=n.n(r),qn=tt("Fraction",[],()=>(zn.a.prototype.type="Fraction",zn.a.prototype.isFraction=!0,zn.a.prototype.toJSON=function(){return{mathjs:"Fraction",n:this.s*this.n,d:this.d}},zn.a.fromJSON=function(e){return new zn.a(e)},zn.a),{isClass:!0}),Pn=tt("Matrix",[],()=>{function e(){if(!(this instanceof e))throw new SyntaxError("Constructor must be called with the new operator")}return e.prototype.type="Matrix",e.prototype.isMatrix=!0,e.prototype.storage=function(){throw new Error("Cannot invoke storage on a Matrix interface")},e.prototype.datatype=function(){throw new Error("Cannot invoke datatype on a Matrix interface")},e.prototype.create=function(e,t){throw new Error("Cannot invoke create on a Matrix interface")},e.prototype.subset=function(e,t,n){throw new Error("Cannot invoke subset on a Matrix interface")},e.prototype.get=function(e){throw new Error("Cannot invoke get on a Matrix interface")},e.prototype.set=function(e,t,n){throw new Error("Cannot invoke set on a Matrix interface")},e.prototype.resize=function(e,t){throw new Error("Cannot invoke resize on a Matrix interface")},e.prototype.reshape=function(e,t){throw new Error("Cannot invoke reshape on a Matrix interface")},e.prototype.clone=function(){throw new Error("Cannot invoke clone on a Matrix interface")},e.prototype.size=function(){throw new Error("Cannot invoke size on a Matrix interface")},e.prototype.map=function(e,t){throw new Error("Cannot invoke map on a Matrix interface")},e.prototype.forEach=function(e){throw new Error("Cannot invoke forEach on a Matrix interface")},e.prototype[Symbol.iterator]=function(){throw new Error("Cannot iterate a Matrix interface")},e.prototype.toArray=function(){throw new Error("Cannot invoke toArray on a Matrix interface")},e.prototype.valueOf=function(){throw new Error("Cannot invoke valueOf on a Matrix interface")},e.prototype.format=function(e){throw new Error("Cannot invoke format on a Matrix interface")},e.prototype.toString=function(){throw new Error("Cannot invoke toString on a Matrix interface")},e},{isClass:!0}),Fn=tt("Range",[],()=>{function e(t,n,r){if(!(this instanceof e))throw new SyntaxError("Constructor must be called with the new operator");var i=null!=t,o=null!=n,a=null!=r;if(i)if(s(t))t=t.toNumber();else if("number"!=typeof t)throw new TypeError("Parameter start must be a number");if(o)if(s(n))n=n.toNumber();else if("number"!=typeof n)throw new TypeError("Parameter end must be a number");if(a)if(s(r))r=r.toNumber();else if("number"!=typeof r)throw new TypeError("Parameter step must be a number");this.start=i?parseFloat(t):0,this.end=o?parseFloat(n):0,this.step=a?parseFloat(r):1}return e.prototype.type="Range",e.prototype.isRange=!0,e.parse=function(t){if("string"!=typeof t)return null;var n=t.split(":").map((function(e){return parseFloat(e)}));if(n.some((function(e){return isNaN(e)})))return null;switch(n.length){case 2:return new e(n[0],n[1]);case 3:return new e(n[0],n[2],n[1]);default:return null}},e.prototype.clone=function(){return new e(this.start,this.end,this.step)},e.prototype.size=function(){var e=0,t=this.start,n=this.step;t=this.end-t;return ae(n)===ae(t)?e=Math.ceil(t/n):0==t&&(e=0),[e=isNaN(e)?0:e]},e.prototype.min=function(){var e=this.size()[0];if(0{function e(t){if(!(this instanceof e))throw new SyntaxError("Constructor must be called with the new operator");this.entries=t||[]}return e.prototype.type="ResultSet",e.prototype.isResultSet=!0,e.prototype.valueOf=function(){return this.entries},e.prototype.toString=function(){return"["+this.entries.join(", ")+"]"},e.prototype.toJSON=function(){return{mathjs:"ResultSet",entries:this.entries}},e.fromJSON=function(t){return new e(t.entries)},e},{isClass:!0}),Un=tt("DenseMatrix",["Matrix"],e=>{function t(e,n){if(!(this instanceof t))throw new SyntaxError("Constructor must be called with the new operator");if(n&&!l(n))throw new Error("Invalid datatype: "+n);if(d(e))"DenseMatrix"===e.type?(this._data=W(e._data),this._size=W(e._size)):(this._data=e.toArray(),this._size=e.size()),this._datatype=n||e._datatype;else if(e&&p(e.data)&&p(e.size))this._data=e.data,this._size=e.size,ze(this._data,this._size),this._datatype=n||e.datatype;else{if(p(e))this._data=function e(t){for(var n=0,r=t.length;ni[a]&&(i[a]=t[a],o=!0);o&&n(e,i,r)}return e=e.Matrix,(t.prototype=new e).createDenseMatrix=function(e,n){return new t(e,n)},t.prototype.type="DenseMatrix",t.prototype.isDenseMatrix=!0,t.prototype.getDataType=function(){return Ke(this._data,H)},t.prototype.storage=function(){return"dense"},t.prototype.datatype=function(){return this._datatype},t.prototype.create=function(e,n){return new t(e,n)},t.prototype.subset=function(e,n,i){switch(arguments.length){case 1:var o=this,a=e;if(!v(a))throw new TypeError("Invalid index");if(a.isScalar())return o.get(a.min());var s=a.size();if(s.length!==o._size.length)throw new Re(s.length,o._size.length);for(var u=a.min(),c=a.max(),f=0,l=o._size.length;f");g=s.max().map((function(e){return e+1})),r(a,g,h),g=y.length,function e(t,n,r,i,o){var a=o===i-1,s=n.dimension(o);a?s.forEach((function(e,n){qe(e),t[e]=r[n[0]]})):s.forEach((function(a,s){qe(a),e(t[a],n,r[s[0]],i,o+1)}))}(a._data,s,p,g,0)}return a;default:throw new SyntaxError("Wrong number of arguments")}},t.prototype.get=function(e){if(!p(e))throw new TypeError("Array expected");if(e.length!==this._size.length)throw new Re(e.length,this._size.length);for(var t=0;tArray.isArray(e)&&1===e.length?e[0]:e),n(r?this.clone():this,e,t);throw new TypeError("Array or Matrix expected")},t.prototype.reshape=function(e,t){t=t?this.clone():this;var n=(t._data=Fe(t._data,e),t._size.reduce((e,t)=>e*t));return t._size=Le(e,n),t},t.prototype.clone=function(){return new t({data:W(this._data),size:W(this._size),datatype:this._datatype})},t.prototype.size=function(){return this._size.slice(0)},t.prototype.map=function(e){var n=this,r=function t(r,i){return p(r)?r.map((function(e,n){return t(e,i.concat(n))})):e(r,i,n)}(this._data,[]);return new t(r,void 0!==this._datatype?Ke(r,H):void 0)},t.prototype.forEach=function(e){var t=this;(function n(r,i){p(r)?r.forEach((function(e,t){n(e,i.concat(t))})):e(r,i,t)})(this._data,[])},t.prototype[Symbol.iterator]=function*(){yield*function*e(t,n){if(p(t))for(var r=0;r[e[r]]);n.push(new t(o,e._datatype))}(o);return n},t.prototype.toArray=function(){return W(this._data)},t.prototype.valueOf=function(){return this._data},t.prototype.format=function(e){return Ce(this._data,e)},t.prototype.toString=function(){return Ce(this._data)},t.prototype.toJSON=function(){return{mathjs:"DenseMatrix",data:this._data,size:this._size,datatype:this._datatype}},t.prototype.diagonal=function(e){if(e){if(!a(e=s(e)?e.toNumber():e)||!oe(e))throw new TypeError("The parameter k must be an integer number")}else e=0;for(var n=0function(e,t){return"number"!=typeof t||isFinite(t)&&!isNaN(t)?t:{mathjs:"number",value:String(t)}}),Hn=(r=n("7634"),n.n(r));function Wn(e,t){if(Yn(e)&&Vn(e,t))return e[t];if("function"==typeof e[t]&&Zn(e,t))throw new Error('Cannot access method "'+t+'" as a property');throw new Error('No access to property "'+t+'"')}function Gn(e,t,n){if(!Yn(e)||!Vn(e,t))throw new Error('No access to property "'+t+'"');e[t]=n}function Vn(e,t){return e&&"object"==typeof e&&(J(Xn,t)||!(t in Object.prototype||t in Function.prototype))}function Zn(e,t){return null!=e&&"function"==typeof e[t]&&!(J(e,t)&&Object.getPrototypeOf&&t in Object.getPrototypeOf(e))&&(J(Jn,t)||!(t in Object.prototype||t in Function.prototype))}function Yn(e){return"object"==typeof e&&e&&e.constructor===Object}var Xn={length:!0,name:!0},Jn={toString:!0,valueOf:!0,toLocaleString:!0};class Qn{constructor(e){this.wrappedObject=e}keys(){return Object.keys(this.wrappedObject)}get(e){return Wn(this.wrappedObject,e)}set(e,t){return Gn(this.wrappedObject,e,t),this}has(e){return t=this.wrappedObject,e in t;var t}}function Kn(){return new Map}function er(e){if(!e)return Kn();if(tr(e))return e;if(D(e))return new Qn(e);throw new Error("createMap can create maps from objects or Maps")}function tr(e){return!!e&&(e instanceof Map||e instanceof Qn||"function"==typeof e.set&&"function"==typeof e.get&&"function"==typeof e.keys&&"function"==typeof e.has)}function nr(e){for(var t,n=arguments.length,r=new Array(115 significant digits to BigNumber (value: "+e+"). Use function bignumber(x) to convert to BigNumber.");return new t(e)}},{from:"number",to:"Complex",convert:function(e){return n||ar(e),new n(e,0)}},{from:"number",to:"string",convert:function(e){return e+""}},{from:"BigNumber",to:"Complex",convert:function(e){return n||ar(e),new n(e.toNumber(),0)}},{from:"Fraction",to:"BigNumber",convert:function(e){throw new TypeError("Cannot implicitly convert a Fraction to BigNumber or vice versa. Use function bignumber(x) to convert to BigNumber or fraction(x) to convert to Fraction.")}},{from:"Fraction",to:"Complex",convert:function(e){return n||ar(e),new n(e.valueOf(),0)}},{from:"number",to:"Fraction",convert:function(e){i||sr(e);var t=new i(e);if(t.valueOf()!==e)throw new TypeError("Cannot implicitly convert a number to a Fraction when there will be a loss of precision (value: "+e+"). Use function fraction(x) to convert to Fraction.");return t}},{from:"string",to:"number",convert:function(e){var t=Number(e);if(isNaN(t))throw new Error('Cannot convert "'+e+'" to a number');return t}},{from:"string",to:"BigNumber",convert:function(n){t||or(n);try{return new t(n)}catch(e){throw new Error('Cannot convert "'+n+'" to BigNumber')}}},{from:"string",to:"Fraction",convert:function(t){i||sr(t);try{return new i(t)}catch(e){throw new Error('Cannot convert "'+t+'" to Fraction')}}},{from:"string",to:"Complex",convert:function(t){n||ar(t);try{return new n(t)}catch(e){throw new Error('Cannot convert "'+t+'" to Complex')}}},{from:"boolean",to:"number",convert:function(e){return+e}},{from:"boolean",to:"BigNumber",convert:function(e){return t||or(e),new t(+e)}},{from:"boolean",to:"Fraction",convert:function(e){return i||sr(e),new i(+e)}},{from:"boolean",to:"string",convert:function(e){return String(e)}},{from:"Array",to:"Matrix",convert:function(e){if(r)return new r(e);throw new Error("Cannot convert array into a Matrix: no class 'DenseMatrix' provided")}},{from:"Matrix",to:"Array",convert:function(e){return e.valueOf()}}],e}));function or(e){throw new Error("Cannot convert value ".concat(e," into a BigNumber: no class 'BigNumber' provided"))}function ar(e){throw new Error("Cannot convert value ".concat(e," into a Complex number: no class 'Complex' provided"))}function sr(e){throw new Error("Cannot convert value ".concat(e," into a Fraction, no class 'Fraction' provided."))}function ur(e){for(var t=e.length,n=e[0].length,r=[],i=0;i=r.length)throw new je(t,r.length);return d(e)?e.create(dr(e.valueOf(),t,n)):dr(e,t,n)}function dr(e,t,n){var r,i,o,a;if(t<=0){if(Array.isArray(e[0])){for(a=ur(e),i=[],r=0;r{var{typed:e,config:t,BigNumber:n}=e;return e("unaryPlus",{number:xr,Complex:function(e){return e},BigNumber:function(e){return e},Fraction:function(e){return e},Unit:function(e){return e.clone()},"Array | Matrix":function(e){return lr(e,this,!0)},"boolean | string":function(e){return"BigNumber"===t.number?new n(+e):+e}})}),zr=tt("abs",["typed"],e=>(e=e.typed,e("abs",{number:yr,Complex:function(e){return e.abs()},BigNumber:function(e){return e.abs()},Fraction:function(e){return e.abs()},"Array | Matrix":function(e){return lr(e,this,!0)},Unit:function(e){return e.abs()}}))),qr=tt("acos",["typed","config","Complex"],e=>{var{typed:e,config:t,Complex:n}=e;return e("acos",{number:function(e){return-1<=e&&e<=1||t.predictable?Math.acos(e):new n(e,0).acos()},Complex:function(e){return e.acos()},BigNumber:function(e){return e.acos()},"Array | Matrix":function(e){return lr(e,this)}})});r="number";function Pr(e){return we(e)}function Fr(e){return Math.atan(1/e)}function Lr(e){return isFinite(e)?(Math.log((e+1)/e)+Math.log(e/(e-1)))/2:0}function Ur(e){return Math.asin(1/e)}function $r(e){return e=1/e,Math.log(e+Math.sqrt(e*e+1))}function Hr(e){return Math.acos(1/e)}function Wr(e){e=1/e;var t=Math.sqrt(e*e-1);return Math.log(t+e)}function Gr(e){return Ne(e)}function Vr(e){return Se(e)}function Zr(e){return 1/Math.tan(e)}function Yr(e){return e=Math.exp(2*e),(e+1)/(e-1)}function Xr(e){return 1/Math.sin(e)}function Jr(e){return 0===e?Number.POSITIVE_INFINITY:Math.abs(2/(Math.exp(e)-Math.exp(-e)))*ae(e)}function Qr(e){return 1/Math.cos(e)}function Kr(e){return 2/(Math.exp(e)+Math.exp(-e))}function ei(e){return De(e)}ei.signature=Kr.signature=Qr.signature=Jr.signature=Xr.signature=Yr.signature=Zr.signature=Vr.signature=Gr.signature=Wr.signature=Hr.signature=$r.signature=Ur.signature=Lr.signature=Fr.signature=Pr.signature=r;var ti=tt("acot",["typed","BigNumber"],e=>{var{typed:e,BigNumber:t}=e;return e("acot",{number:Fr,Complex:function(e){return e.acot()},BigNumber:function(e){return new t(1).div(e).atan()},"Array | Matrix":function(e){return lr(e,this)}})}),ni=tt("acsc",["typed","config","Complex","BigNumber"],e=>{var{typed:e,config:t,Complex:n,BigNumber:r}=e;return e("acsc",{number:function(e){return e<=-1||1<=e||t.predictable?Ur(e):new n(e,0).acsc()},Complex:function(e){return e.acsc()},BigNumber:function(e){return new r(1).div(e).asin()},"Array | Matrix":function(e){return lr(e,this)}})}),ri=tt("addScalar",["typed"],e=>(e=e.typed,e("addScalar",{"number, number":gr,"Complex, Complex":function(e,t){return e.add(t)},"BigNumber, BigNumber":function(e,t){return e.plus(t)},"Fraction, Fraction":function(e,t){return e.add(t)},"Unit, Unit":function(e,t){if(null===e.value||void 0===e.value)throw new Error("Parameter x contains a unit with undefined value");if(null===t.value||void 0===t.value)throw new Error("Parameter y contains a unit with undefined value");if(e.equalBase(t))return(e=e.clone()).value=this(e.value,t.value),e.fixPrefix=!1,e;throw new Error("Units do not match")}}))),ii=tt("arg",["typed"],e=>(e=e.typed,e("arg",{number:function(e){return Math.atan2(0,e)},BigNumber:function(e){return e.constructor.atan2(0,e)},Complex:function(e){return e.arg()},"Array | Matrix":function(e){return lr(e,this)}}))),oi=tt("asech",["typed","config","Complex","BigNumber"],e=>{var{typed:e,config:t,Complex:n,BigNumber:r}=e;return e("asech",{number:function(e){var r,i;return e<=1&&-1<=e||t.predictable?0<(r=1/e)||t.predictable?Wr(e):(i=Math.sqrt(r*r-1),new n(Math.log(i-r),Math.PI)):new n(e,0).asech()},Complex:function(e){return e.asech()},BigNumber:function(e){return new r(1).div(e).acosh()},"Array | Matrix":function(e){return lr(e,this)}})}),ai=tt("asinh",["typed"],e=>(e=e.typed,e("asinh",{number:Gr,Complex:function(e){return e.asinh()},BigNumber:function(e){return e.asinh()},"Array | Matrix":function(e){return lr(e,this,!0)}}))),si=tt("atan",["typed"],e=>(e=e.typed,e("atan",{number:function(e){return Math.atan(e)},Complex:function(e){return e.atan()},BigNumber:function(e){return e.atan()},"Array | Matrix":function(e){return lr(e,this,!0)}}))),ui=tt("atanh",["typed","config","Complex"],e=>{var{typed:e,config:t,Complex:n}=e;return e("atanh",{number:function(e){return e<=1&&-1<=e||t.predictable?Vr(e):new n(e,0).atanh()},Complex:function(e){return e.atanh()},BigNumber:function(e){return e.atanh()},"Array | Matrix":function(e){return lr(e,this,!0)}})}),ci=tt("bignumber",["typed","BigNumber"],e=>{var{typed:e,BigNumber:t}=e;return e("bignumber",{"":function(){return new t(0)},number:function(e){return new t(e+"")},string:function(e){var n=e.match(/(0[box][0-9a-fA-F]*)i([0-9]*)/);if(n){var r=n[2],i=(n=t(n[1]),new t(2).pow(Number(r)));if(n.gt(i.sub(1)))throw new SyntaxError('String "'.concat(e,'" is out of range'));return r=new t(2).pow(Number(r)-1),n.gte(r)?n.sub(i):n}return new t(e)},BigNumber:function(e){return e},Fraction:function(e){return new t(e.n).div(e.d).times(e.s)},null:function(e){return new t(0)},"Array | Matrix":function(e){return lr(e,this)}})});function fi(e,t){if(e.isFinite()&&!e.isInteger()||t.isFinite()&&!t.isInteger())throw new Error("Integers expected in function bitAnd");var n=e.constructor;if(e.isNaN()||t.isNaN())return new n(NaN);if(e.isZero()||t.eq(-1)||e.eq(t))return e;if(t.isZero()||e.eq(-1))return t;if(!e.isFinite()||!t.isFinite()){if(!e.isFinite()&&!t.isFinite())return e.isNegative()===t.isNegative()?e:new n(0);if(!e.isFinite())return t.isNegative()?e:e.isNegative()?new n(0):t;if(!t.isFinite())return e.isNegative()?t:t.isNegative()?new n(0):e}return di(e,t,(function(e,t){return e&t}))}function li(e){if(e.isFinite()&&!e.isInteger())throw new Error("Integer expected in function bitNot");var t=e.constructor,n=t.precision;t.config({precision:1e9}),e=e.plus(new t(1));return e.s=-e.s||null,t.config({precision:n}),e}function pi(e,t){if(e.isFinite()&&!e.isInteger()||t.isFinite()&&!t.isInteger())throw new Error("Integers expected in function bitOr");var n=e.constructor;return e.isNaN()||t.isNaN()?new n(NaN):(n=new n(-1),e.isZero()||t.eq(n)||e.eq(t)?t:t.isZero()||e.eq(n)?e:e.isFinite()&&t.isFinite()?di(e,t,(function(e,t){return e|t})):!e.isFinite()&&!e.isNegative()&&t.isNegative()||e.isNegative()&&!t.isNegative()&&!t.isFinite()?n:e.isNegative()&&t.isNegative()?e.isFinite()?e:t:e.isFinite()?t:e)}function di(e,t,n){var r,i,o=e.constructor,a=+(e.s<0),s=+(t.s<0);if(a)for(var u=hi(li(e)),c=0;ce)for(s-=e;s--;)u+="0";else s>1,c[p]&=1)}return c.reverse()}function mi(e,t){if(e.isFinite()&&!e.isInteger()||t.isFinite()&&!t.isInteger())throw new Error("Integers expected in function bitXor");var n,r=e.constructor;return e.isNaN()||t.isNaN()?new r(NaN):e.isZero()?t:t.isZero()?e:e.eq(t)?new r(0):(n=new r(-1),e.eq(n)?li(t):t.eq(n)?li(e):e.isFinite()&&t.isFinite()?di(e,t,(function(e,t){return e^t})):e.isFinite()||t.isFinite()?new r(e.isNegative()===t.isNegative()?1/0:-1/0):n)}function yi(e,t){if(e.isFinite()&&!e.isInteger()||t.isFinite()&&!t.isInteger())throw new Error("Integers expected in function leftShift");var n=e.constructor;return e.isNaN()||t.isNaN()||t.isNegative()&&!t.isZero()?new n(NaN):e.isZero()||t.isZero()?e:e.isFinite()||t.isFinite()?t.lt(55)?e.times(Math.pow(2,t.toNumber())+""):e.times(new n(2).pow(t)):new n(NaN)}function gi(e,t){if(e.isFinite()&&!e.isInteger()||t.isFinite()&&!t.isInteger())throw new Error("Integers expected in function rightArithShift");var n=e.constructor;return e.isNaN()||t.isNaN()||t.isNegative()&&!t.isZero()?new n(NaN):e.isZero()||t.isZero()?e:t.isFinite()?(t.lt(55)?e.div(Math.pow(2,t.toNumber())+""):e.div(new n(2).pow(t))).floor():e.isNegative()?new n(-1):e.isFinite()?new n(0):new n(NaN)}function vi(e,t){if(oe(e)&&oe(t))return e&t;throw new Error("Integers expected in function bitAnd")}function bi(e){if(oe(e))return~e;throw new Error("Integer expected in function bitNot")}function xi(e,t){if(oe(e)&&oe(t))return e|t;throw new Error("Integers expected in function bitOr")}function wi(e,t){if(oe(e)&&oe(t))return e^t;throw new Error("Integers expected in function bitXor")}function Ni(e,t){if(oe(e)&&oe(t))return e<>t;throw new Error("Integers expected in function rightArithShift")}function _i(e,t){if(oe(e)&&oe(t))return e>>>t;throw new Error("Integers expected in function rightLogShift")}mr="number, number",vi.signature=mr,bi.signature="number",_i.signature=Si.signature=Ni.signature=wi.signature=xi.signature=mr;var Di=tt("bitNot",["typed"],e=>(e=e.typed,e("bitNot",{number:bi,BigNumber:li,"Array | Matrix":function(e){return lr(e,this)}}))),Mi=tt("boolean",["typed"],e=>(e=e.typed,e("boolean",{"":function(){return!1},boolean:function(e){return e},number:function(e){return!!e},null:function(e){return!1},BigNumber:function(e){return!e.isZero()},string:function(e){var t=e.toLowerCase();if("true"===t)return!0;if("false"===t)return!1;if(t=Number(e),""===e||isNaN(t))throw new Error('Cannot convert "'+e+'" to a boolean');return!!t},"Array | Matrix":function(e){return lr(e,this)}}))),Ei=tt("clone",["typed"],e=>(e=e.typed,e("clone",{any:W})));function Ai(e,t){return t>1)*Ai(1+e,t)}function Oi(e,t){if(!oe(e)||e<0)throw new TypeError("Positive integer value expected in function combinations");if(!oe(t)||t<0)throw new TypeError("Positive integer value expected in function combinations");if(e(e=e.typed,e(Ci,{"number, number":Oi,"BigNumber, BigNumber":function(e,t){var n,r,i=e.constructor,o=e.minus(t),a=new i(1);if(!ki(e)||!ki(t))throw new TypeError("Positive integer value expected in function combinations");if(t.gt(e))throw new TypeError("k must be less than n in function combinations");if(n=a,t.lt(o))for(r=a;r.lte(o);r=r.plus(a))n=n.times(t.plus(r)).dividedBy(r);else for(r=a;r.lte(t);r=r.plus(a))n=n.times(o.plus(r)).dividedBy(r);return n}})));function ki(e){return e.isInteger()&&e.gte(0)}var Ii=tt("complex",["typed","Complex"],e=>{var{typed:e,Complex:t}=e;return e("complex",{"":function(){return t.ZERO},number:function(e){return new t(e,0)},"number, number":function(e,n){return new t(e,n)},"BigNumber, BigNumber":function(e,n){return new t(e.toNumber(),n.toNumber())},Fraction:function(e){return new t(e.valueOf(),0)},Complex:function(e){return e.clone()},string:function(e){return t(e)},null:function(e){return t(0)},Object:function(e){if("re"in e&&"im"in e)return new t(e.re,e.im);if("r"in e&&"phi"in e||"abs"in e&&"arg"in e)return new t(e);throw new Error("Expected object with properties (re and im) or (r and phi) or (abs and arg)")},"Array | Matrix":function(e){return lr(e,this)}})}),Ri=tt("conj",["typed"],e=>(e=e.typed,e("conj",{number:function(e){return e},BigNumber:function(e){return e},Complex:function(e){return e.conjugate()},"Array | Matrix":function(e){return lr(e,this)}}))),ji=tt("cosh",["typed"],e=>(e=e.typed,e("cosh",{number:_e,Complex:function(e){return e.cosh()},BigNumber:function(e){return e.cosh()},Unit:function(e){if(e.hasBase(e.constructor.BASE_UNITS.ANGLE))return this(e.value);throw new TypeError("Unit in function cosh is no angle")},"Array | Matrix":function(e){return lr(e,this)}}))),Bi=tt("coth",["typed","BigNumber"],e=>{var{typed:e,BigNumber:t}=e;return e("coth",{number:Yr,Complex:function(e){return e.coth()},BigNumber:function(e){return new t(1).div(e.tanh())},Unit:function(e){if(e.hasBase(e.constructor.BASE_UNITS.ANGLE))return this(e.value);throw new TypeError("Unit in function coth is no angle")},"Array | Matrix":function(e){return lr(e,this)}})}),zi=tt("csc",["typed","BigNumber"],e=>{var{typed:e,BigNumber:t}=e;return e("csc",{number:Xr,Complex:function(e){return e.csc()},BigNumber:function(e){return new t(1).div(e.sin())},Unit:function(e){if(e.hasBase(e.constructor.BASE_UNITS.ANGLE))return this(e.value);throw new TypeError("Unit in function csc is no angle")},"Array | Matrix":function(e){return lr(e,this)}})}),qi=tt("cube",["typed"],e=>(e=e.typed,e("cube",{number:Nr,Complex:function(e){return e.mul(e).mul(e)},BigNumber:function(e){return e.times(e).times(e)},Fraction:function(e){return e.pow(3)},"Array | Matrix":function(e){return lr(e,this,!0)},Unit:function(e){return e.pow(3)}})));function Pi(e,t,n){var r;return null==n?e.eq(t):!!e.eq(t)||!e.isNaN()&&!t.isNaN()&&!(!e.isFinite()||!t.isFinite())&&(!!(r=e.minus(t).abs()).isZero()||(e=e.constructor.max(e.abs(),t.abs()),r.lte(e.times(n))))}var Fi="equalScalar",Li=tt(Fi,["typed","config"],e=>{var{typed:e,config:t}=e;return e(Fi,{"boolean, boolean":function(e,t){return e===t},"number, number":function(e,n){return xe(e,n,t.epsilon)},"BigNumber, BigNumber":function(e,n){return e.eq(n)||Pi(e,n,t.epsilon)},"Fraction, Fraction":function(e,t){return e.equals(t)},"Complex, Complex":function(e,n){return e=e,n=n,r=t.epsilon,xe(e.re,n.re,r)&&xe(e.im,n.im,r);var r},"Unit, Unit":function(e,t){if(e.equalBase(t))return this(e.value,t.value);throw new Error("Cannot compare units with different base")}})}),Ui=(tt(Fi,["typed","config"],e=>{var{typed:e,config:t}=e;return e(Fi,{"number, number":function(e,n){return xe(e,n,t.epsilon)}})}),tt("erf",["typed"],e=>(e=e.typed,e("name",{number:function(e){var t=Math.abs(e);return Vi<=t?ae(e):t<=$i?ae(e)*function(e){var t,n=e*e,r=Wi[0][4]*n,i=n;for(t=0;t<3;t+=1)r=(r+Wi[0][t])*n,i=(i+Gi[0][t])*n;return e*(r+Wi[0][3])/(i+Gi[0][3])}(t):t<=4?ae(e)*(1-function(e){var t,n=Wi[1][8]*e,r=e;for(t=0;t<7;t+=1)n=(n+Wi[1][t])*e,r=(r+Gi[1][t])*e;var i=(n+Wi[1][7])/(r+Gi[1][7]),o=parseInt(16*e)/16,a=(e-o)*(e+o);return Math.exp(-o*o)*Math.exp(-a)*i}(t)):ae(e)*(1-function(e){var t,n=1/(e*e),r=Wi[2][5]*n,i=n;for(t=0;t<4;t+=1)r=(r+Wi[2][t])*n,i=(i+Gi[2][t])*n;var o=n*(r+Wi[2][4])/(i+Gi[2][4]);o=(Hi-o)/e,n=parseInt(16*e)/16,e=(e-n)*(e+n);return Math.exp(-n*n)*Math.exp(-e)*o}(t))},"Array | Matrix":function(e){return lr(e,this)}})))),$i=.46875,Hi=.5641895835477563,Wi=[[3.1611237438705655,113.86415415105016,377.485237685302,3209.3775891384694,.18577770618460315],[.5641884969886701,8.883149794388377,66.11919063714163,298.6351381974001,881.952221241769,1712.0476126340707,2051.0783778260716,1230.3393547979972,2.1531153547440383e-8],[.30532663496123236,.36034489994980445,.12578172611122926,.016083785148742275,.0006587491615298378,.016315387137302097]],Gi=[[23.601290952344122,244.02463793444417,1282.6165260773723,2844.236833439171],[15.744926110709835,117.6939508913125,537.1811018620099,1621.3895745666903,3290.7992357334597,4362.619090143247,3439.3676741437216,1230.3393548037495],[2.568520192289822,1.8729528499234604,.5279051029514285,.06051834131244132,.0023352049762686918]],Vi=Math.pow(2,53),Zi=tt("exp",["typed"],e=>(e=e.typed,e("exp",{number:Sr,Complex:function(e){return e.exp()},BigNumber:function(e){return e.exp()},"Array | Matrix":function(e){return lr(e,this)}}))),Yi=tt("expm1",["typed","Complex"],e=>{var{typed:e,Complex:t}=e;return e("expm1",{number:_r,Complex:function(e){var n=Math.exp(e.re);return new t(n*Math.cos(e.im)-1,n*Math.sin(e.im))},BigNumber:function(e){return e.exp().minus(1)},"Array | Matrix":function(e){return lr(e,this)}})}),Xi=tt("filter",["typed"],e=>(e=e.typed,e("filter",{"Array, function":Ji,"Matrix, function":function(e,t){return e.create(Ji(e.toArray(),t))},"Array, RegExp":Ye,"Matrix, RegExp":function(e,t){return e.create(Ye(e.toArray(),t))}})));function Ji(e,t){var n=ct(t);return Ze(e,(function(e,r,i){return 1===n?t(e):2===n?t(e,[r]):t(e,[r],i)}))}var Qi=tt("forEach",["typed"],e=>(e=e.typed,e("forEach",{"Array, function":Ki,"Matrix, function":function(e,t){return e.forEach(t)}})));function Ki(e,t){var n=ct(t);(function r(i,o){Array.isArray(i)?Ve(i,(function(e,t){r(e,o.concat(t))})):1===n?t(i):2===n?t(i,o):t(i,o,e)})(e,[])}var eo=tt("format",["typed"],e=>(e=e.typed,e("format",{any:Ce,"any, Object | function | number":Ce}))),to="getMatrixDataType",no=tt(to,["typed"],e=>(e=e.typed,e(to,{Array:function(e){return Ke(e,H)},Matrix:function(e){return e.getDataType()}}))),ro=tt("hex",["typed","format"],e=>{var{typed:e,format:t}=e;return e("hex",{"number | BigNumber":function(e){return t(e,{notation:"hex"})},"number | BigNumber, number":function(e,n){return t(e,{notation:"hex",wordSize:n})}})}),io=tt("im",["typed"],e=>(e=e.typed,e("im",{number:function(e){return 0},BigNumber:function(e){return e.mul(0)},Fraction:function(e){return e.mul(0)},Complex:function(e){return e.im},"Array | Matrix":function(e){return lr(e,this)}}))),oo=tt("isInteger",["typed"],e=>(e=e.typed,e("isInteger",{number:oe,BigNumber:function(e){return e.isInt()},Fraction:function(e){return 1===e.d&&isFinite(e.n)},"Array | Matrix":function(e){return lr(e,this)}})));r="number";function ao(e){return e<0}function so(e){return 0(e=e.typed,e(fo,{number:ao,BigNumber:function(e){return e.isNeg()&&!e.isZero()&&!e.isNaN()},Fraction:function(e){return e.s<0},Unit:function(e){return this(e.value)},"Array | Matrix":function(e){return lr(e,this)}}))),po="isPositive",ho=tt(po,["typed"],e=>(e=e.typed,e(po,{number:so,BigNumber:function(e){return!e.isNeg()&&!e.isZero()&&!e.isNaN()},Fraction:function(e){return 0(e=e.typed,e("isZero",{number:uo,BigNumber:function(e){return e.isZero()},Complex:function(e){return 0===e.re&&0===e.im},Fraction:function(e){return 1===e.d&&0===e.n},Unit:function(e){return this(e.value)},"Array | Matrix":function(e){return lr(e,this)}})));function yo(e){var t,n,r;if(oe(e))return e<=0?isFinite(e)?1/0:NaN:171{var{Complex:t,typed:e}=e,n=[-.029550653594771242,.00641025641025641,-.0019175269175269176,.0008417508417508417,-.0005952380952380953,.0007936507936507937,-.002777777777777778,.08333333333333333];return e("lgamma",{number:wo,Complex:function(e){var n,o,a;return e.isNaN()?new t(NaN,NaN):0===e.im?new t(wo(e.re),0):7<=e.re||7<=Math.abs(e.im)?r(e):e.re<=.1?(o=6.283185307179586,a=e.im,a=((0{var{typed:e,config:t,Complex:n}=e;return e("log10",{number:function(e){return 0<=e||t.predictable?Er(e):new n(e,0).log().div(Math.LN10)},Complex:function(e){return new n(e).log().div(Math.LN10)},BigNumber:function(e){return!e.isNegative()||t.predictable?e.log():new n(e.toNumber(),0).log().div(Math.LN10)},"Array | Matrix":function(e){return lr(e,this)}})}),_o=tt("log2",["typed","config","Complex"],e=>{var{typed:e,config:t,Complex:n}=e;return e("log2",{number:function(e){return 0<=e||t.predictable?Ar(e):r(new n(e,0))},Complex:r,BigNumber:function(e){return!e.isNegative()||t.predictable?e.log(2):r(new n(e.toNumber(),0))},"Array | Matrix":function(e){return lr(e,this)}});function r(e){var t=Math.sqrt(e.re*e.re+e.im*e.im);return new n(Math.log2?Math.log2(t):Math.log(t)/Math.LN2,Math.atan2(e.im,e.re)/Math.LN2)}}),Do=tt("map",["typed"],e=>(e=e.typed,e("map",{"Array, function":Mo,"Matrix, function":function(e,t){return e.map(t)}})));function Mo(e,t){var n=ct(t);return function r(i,o){if(Array.isArray(i))return i.map((function(e,t){return r(e,o.concat(t))}));try{return 1===n?t(i):2===n?t(i,o):t(i,o,e)}catch(t){var a;if(t instanceof TypeError&&"data"in t&&"wrongType"===t.data.category)throw i="map attempted to call '".concat(t.data.fn,"(").concat(i),a=JSON.stringify(o),2===n?i+=","+a:1!==n&&(i+=",".concat(a,",").concat(e)),i=(i=(i+=")' but argument ".concat(t.data.index+1," of type "))+"".concat(t.data.actual," does not match expected type "))+t.data.expected.join(" or "),new TypeError(i);throw t}}(e,[])}var Eo=tt("multiplyScalar",["typed"],e=>(e=e.typed,e("multiplyScalar",{"number, number":vr,"Complex, Complex":function(e,t){return e.mul(t)},"BigNumber, BigNumber":function(e,t){return e.times(t)},"Fraction, Fraction":function(e,t){return e.mul(t)},"number | Fraction | BigNumber | Complex, Unit":function(e,t){return t=t.clone(),t.value=null===t.value?t._normalize(e):this(t.value,e),t},"Unit, number | Fraction | BigNumber | Complex":function(e,t){return e=e.clone(),e.value=null===e.value?e._normalize(t):this(e.value,t),e},"Unit, Unit":function(e,t){return e.multiply(t)}})));mr="number, number";function Ao(e){return!e}function Oo(e,t){return!(!e&&!t)}function Co(e,t){return!!e!=!!t}function To(e,t){return!(!e||!t)}Ao.signature="number",To.signature=Co.signature=Oo.signature=mr;var ko=tt("not",["typed"],e=>(e=e.typed,e("not",{number:Ao,Complex:function(e){return 0===e.re&&0===e.im},BigNumber:function(e){return e.isZero()||e.isNaN()},Unit:function(e){return null===e.value||this(e.value)},"Array | Matrix":function(e){return lr(e,this)}}))),Io=tt("number",["typed"],e=>(e=e.typed,e=e("number",{"":function(){return 0},number:function(e){return e},string:function(e){if("NaN"===e)return NaN;var t=(r=(t=e).match(/(0[box])([0-9a-fA-F]*)\.([0-9a-fA-F]*)/))?{input:t,radix:{"0b":2,"0o":8,"0x":16}[r[1]],integerPart:r[2],fractionalPart:r[3]}:null;if(t){for(var n=t,r=parseInt(n.integerPart,n.radix),i=0,o=0;o{var{typed:e,format:t}=e;return e("oct",{"number | BigNumber":function(e){return t(e,{notation:"oct"})},"number | BigNumber, number":function(e,n){return t(e,{notation:"oct",wordSize:n})}})}),jo=(r=n("6125"),n.n(r)),Bo=jo()(Date.now());function zo(e){var t;return t=null===(e=e)?Bo:jo()(String(e)),function(){return t()}}var qo="pickRandom",Po=tt(qo,["typed","config","?on"],e=>{var{typed:e,config:t,on:n}=e,r=zo(t.randomSeed);return n&&n("config",(function(e,t){e.randomSeed!==t.randomSeed&&(r=zo(e.randomSeed))})),e(qo,{"Array | Matrix":function(e){return i(e,{})},"Array | Matrix, Object":i,"Array | Matrix, number":function(e,t){return i(e,{number:t})},"Array | Matrix, Array | Matrix":function(e,t){return i(e,{weights:t})},"Array | Matrix, Array | Matrix, number":function(e,t,n){return i(e,{number:n,weights:t})},"Array | Matrix, number, Array | Matrix":function(e,t,n){return i(e,{number:t,weights:n})}});function i(e,t){var{number:n,weights:i,elementWise:t=!0}=t,o=void 0===n,s=(o&&(n=1),d(e)?e.create:d(i)?i.create:null),u=(e=e.valueOf(),i=i&&i.valueOf(),!0===t&&(e=We(e),i=We(i)),0);if(void 0!==i){if(i.length!==e.length)throw new Error("Weights must have the same length as possibles");for(var c=0,f=i.length;c(e=e.typed,e("print",{"string, Object | Array":Lo,"string, Object | Array, number | Object":Lo})));function Lo(e,t,n){return e.replace(/\$([\w.]+)/g,(function(e,r){for(var i=r.split("."),o=t[i.shift()];i.length&&void 0!==o;){var a=i.shift();o=a?o[a]:o+"."}return void 0!==o?l(o)?o:Ce(o,n):e}))}function Uo(e,t){var n=[];if(1<(e=e.slice(0)).length)for(var r=0,i=e.shift();r{var{typed:e,config:t,on:n}=e,r=zo(t.randomSeed);return n&&n("config",(function(e,t){e.randomSeed!==t.randomSeed&&(r=zo(e.randomSeed))})),e($o,{"":()=>o(0,1),number:e=>o(0,e),"number, number":(e,t)=>o(e,t),"Array | Matrix":e=>i(e,0,1),"Array | Matrix, number":(e,t)=>i(e,0,t),"Array | Matrix, number, number":(e,t,n)=>i(e,t,n)});function i(e,t,n){var r=Uo(e.valueOf(),()=>o(t,n));return d(e)?e.create(r):r}function o(e,t){return e+r()*(t-e)}}),Wo=tt("re",["typed"],e=>(e=e.typed,e("re",{number:function(e){return e},BigNumber:function(e){return e},Fraction:function(e){return e},Complex:function(e){return e.re},"Array | Matrix":function(e){return lr(e,this)}}))),Go=tt("sec",["typed","BigNumber"],e=>{var{typed:e,BigNumber:t}=e;return e("sec",{number:Qr,Complex:function(e){return e.sec()},BigNumber:function(e){return new t(1).div(e.cos())},Unit:function(e){if(e.hasBase(e.constructor.BASE_UNITS.ANGLE))return this(e.value);throw new TypeError("Unit in function sec is no angle")},"Array | Matrix":function(e){return lr(e,this)}})}),Vo=tt("sign",["typed","BigNumber","Fraction","complex"],e=>{var{typed:e,BigNumber:t,complex:n,Fraction:r}=e;return e("sign",{number:Tr,Complex:function(e){return 0===e.im?n(Tr(e.re)):e.sign()},BigNumber:function(e){return new t(e.cmp(0))},Fraction:function(e){return new r(e.s,1)},"Array | Matrix":function(e){return lr(e,this,!0)},Unit:function(e){if(e._isDerived()||0===e.units[0].unit.offset)return this(e.value);throw new TypeError("sign is ambiguous for units with offset")}})}),Zo=tt("sin",["typed"],e=>(e=e.typed,e("sin",{number:Math.sin,Complex:function(e){return e.sin()},BigNumber:function(e){return e.sin()},Unit:function(e){if(e.hasBase(e.constructor.BASE_UNITS.ANGLE))return this(e.value);throw new TypeError("Unit in function sin is no angle")},"Array | Matrix":function(e){return lr(e,this,!0)}}))),Yo=tt("SparseMatrix",["typed","equalScalar","Matrix"],e=>{var{typed:t,equalScalar:n,Matrix:e}=e;function r(e,t){if(!(this instanceof r))throw new SyntaxError("Constructor must be called with the new operator");if(t&&!l(t))throw new Error("Invalid datatype: "+t);if(d(e))n=this,a=t,"SparseMatrix"===(o=e).type?(n._values=o._values?W(o._values):void 0,n._index=W(o._index),n._ptr=W(o._ptr),n._size=W(o._size),n._datatype=a||o._datatype):i(n,o.valueOf(),a||o._datatype);else if(e&&p(e.index)&&p(e.ptr)&&p(e.size))this._values=e.values,this._index=e.index,this._ptr=e.ptr,this._size=e.size,this._datatype=t||e.datatype;else if(p(e))i(this,e,t);else{if(e)throw new TypeError("Unsupported type of data ("+H(e)+")");this._values=[],this._index=[],this._ptr=[0],this._size=[0,0],this._datatype=t}var n,o,a}function i(e,r,i){e._values=[],e._index=[],e._ptr=[],e._datatype=i;var o=r.length,a=0,s=n,u=0;if(l(i)&&(s=t.find(n,[i,i])||n,u=t.convert(0,i)),0");1===O.length?g.dimension(0).forEach((function(e,t){qe(e),_.set([e,0],D[t[0]],M)})):(o=g.dimension(0),A=g.dimension(1),o.forEach((function(e,t){qe(e),A.forEach((function(n,r){qe(n),_.set([e,n],D[t[0]][r[0]],M)}))})))}return _;default:throw new SyntaxError("Wrong number of arguments")}},r.prototype.get=function(e){if(!p(e))throw new TypeError("Array expected");if(e.length!==this._size.length)throw new Re(e.length,this._size.length);var t,n;if(this._values)return t=e[0],e=e[1],qe(t,this._size[0]),qe(e,this._size[1]),(n=o(t,this._ptr[e],this._ptr[e+1],this._index))Array.isArray(e)&&1===e.length?e[0]:e);if(2!==r.length)throw new Error("Only two dimensions matrix are supported");return r.forEach((function(e){if(!a(e)||!oe(e)||e<0)throw new TypeError("Invalid size, must contain positive integers (size: "+Ce(r)+")")})),c(n?this.clone():this,r[0],r[1],t)},r.prototype.reshape=function(e,t){if(!p(e))throw new TypeError("Array expected");if(2!==e.length)throw new Error("Sparse matrices can only be reshaped in two dimensions");e.forEach((function(t){if(!a(t)||!oe(t)||t<=-2||0===t)throw new TypeError("Invalid size, must contain positive integers or -1 (size: "+Ce(e)+")")}));var n=this._size[0]*this._size[1];if(n!=(e=Le(e,n))[0]*e[1])throw new Error("Reshaping sparse matrix will result in the wrong number of elements");var r=t?this.clone():this;if(this._size[0]!==e[0]||this._size[1]!==e[1]){for(var i=[],s=0;s "+(this._values?Ce(this._values[u],e):"X");return i},r.prototype.toString=function(){return Ce(this.toArray())},r.prototype.toJSON=function(){return{mathjs:"SparseMatrix",values:this._values,index:this._index,ptr:this._ptr,size:this._size,datatype:this._datatype}},r.prototype.diagonal=function(e){if(e){if(!a(e=s(e)?e.toNumber():e)||!oe(e))throw new TypeError("The parameter k must be an integer number")}else e=0;var t=0(e=e.typed,e("splitUnit",{"Unit, Array":function(e,t){return e.splitUnit(t)}}))),Jo=tt("square",["typed"],e=>(e=e.typed,e("square",{number:kr,Complex:function(e){return e.mul(e)},BigNumber:function(e){return e.times(e)},Fraction:function(e){return e.mul(e)},"Array | Matrix":function(e){return lr(e,this,!0)},Unit:function(e){return e.pow(2)}}))),Qo=tt("string",["typed"],e=>(e=e.typed,e("string",{"":function(){return""},number:de,null:function(e){return"null"},boolean:function(e){return e+""},string:function(e){return e},"Array | Matrix":function(e){return lr(e,this)},any:function(e){return String(e)}}))),Ko=tt("tan",["typed"],e=>(e=e.typed,e("tan",{number:Math.tan,Complex:function(e){return e.tan()},BigNumber:function(e){return e.tan()},Unit:function(e){if(e.hasBase(e.constructor.BASE_UNITS.ANGLE))return this(e.value);throw new TypeError("Unit in function tan is no angle")},"Array | Matrix":function(e){return lr(e,this,!0)}}))),ea=tt("typeOf",["typed"],e=>(e=e.typed,e("typeOf",{any:H}))),ta=tt("acosh",["typed","config","Complex"],e=>{var{typed:e,config:t,Complex:n}=e;return e("acosh",{number:function(e){return 1<=e||t.predictable?Pr(e):e<=-1?new n(Math.log(Math.sqrt(e*e-1)-e),Math.PI):new n(e,0).acosh()},Complex:function(e){return e.acosh()},BigNumber:function(e){return e.acosh()},"Array | Matrix":function(e){return lr(e,this)}})}),na=tt("acsch",["typed","BigNumber"],e=>{var{typed:e,BigNumber:t}=e;return e("acsch",{number:$r,Complex:function(e){return e.acsch()},BigNumber:function(e){return new t(1).div(e).asinh()},"Array | Matrix":function(e){return lr(e,this)}})}),ra=tt("apply",["typed","isInteger"],e=>{var{typed:e,isInteger:t}=e;return e("apply",{"Array | Matrix, number | BigNumber, function":function(e,n,r){if(!t(n))throw new TypeError("Integer number expected for dimension");var i=Array.isArray(e)?Be(e):e.size();if(n<0||n>=i.length)throw new je(n,i.length);return d(e)?e.create(ia(e.valueOf(),n,r)):ia(e,n,r)}})});function ia(e,t,n){var r,i,o;if(t<=0){if(Array.isArray(e[0])){for(o=function(e){var t,n,r=e.length,i=e[0].length,o=[];for(n=0;n{var{typed:e,config:t,Complex:n,BigNumber:r}=e;return e("asec",{number:function(e){return e<=-1||1<=e||t.predictable?Hr(e):new n(e,0).asec()},Complex:function(e){return e.asec()},BigNumber:function(e){return new r(1).div(e).acos()},"Array | Matrix":function(e){return lr(e,this)}})}),aa=tt("bin",["typed","format"],e=>{var{typed:e,format:t}=e;return e("bin",{"number | BigNumber":function(e){return t(e,{notation:"bin"})},"number | BigNumber, number":function(e,n){return t(e,{notation:"bin",wordSize:n})}})}),sa="combinationsWithRep",ua=tt(sa,["typed"],e=>(e=e.typed,e(sa,{"number, number":function(e,t){if(!oe(e)||e<0)throw new TypeError("Positive integer value expected in function combinationsWithRep");if(!oe(t)||t<0)throw new TypeError("Positive integer value expected in function combinationsWithRep");if(e<1)throw new TypeError("k must be less than or equal to n + k - 1");return t(e=e.typed,e("cos",{number:Math.cos,Complex:function(e){return e.cos()},BigNumber:function(e){return e.cos()},Unit:function(e){if(e.hasBase(e.constructor.BASE_UNITS.ANGLE))return this(e.value);throw new TypeError("Unit in function cos is no angle")},"Array | Matrix":function(e){return lr(e,this)}}))),la=tt("csch",["typed","BigNumber"],e=>{var{typed:e,BigNumber:t}=e;return e("csch",{number:Jr,Complex:function(e){return e.csch()},BigNumber:function(e){return new t(1).div(e.sinh())},Unit:function(e){if(e.hasBase(e.constructor.BASE_UNITS.ANGLE))return this(e.value);throw new TypeError("Unit in function csch is no angle")},"Array | Matrix":function(e){return lr(e,this)}})}),pa=tt("isNaN",["typed"],e=>(e=e.typed,e("isNaN",{number:co,BigNumber:function(e){return e.isNaN()},Fraction:function(e){return!1},Complex:function(e){return e.isNaN()},Unit:function(e){return Number.isNaN(e.value)},"Array | Matrix":function(e){return lr(e,Number.isNaN)}}))),da=tt("isPrime",["typed"],e=>(e=e.typed,e("isPrime",{number:function(e){if(0*e!=0)return!1;if(e<=3)return 1t{var{typed:e,config:t,on:n}=e,r=zo(t.randomSeed);return n&&n("config",(function(e,t){e.randomSeed!==t.randomSeed&&(r=zo(e.randomSeed))})),e("randomInt",{"":()=>o(0,1),number:e=>o(0,e),"number, number":(e,t)=>o(e,t),"Array | Matrix":e=>i(e,0,1),"Array | Matrix, number":(e,t)=>i(e,0,t),"Array | Matrix, number, number":(e,t,n)=>i(e,t,n)});function i(e,t,n){var r=Uo(e.valueOf(),()=>o(t,n));return d(e)?e.create(r):r}function o(e,t){return Math.floor(e+r()*(t-e))}}),ma=tt("sech",["typed","BigNumber"],e=>{var{typed:e,BigNumber:t}=e;return e("sech",{number:Kr,Complex:function(e){return e.sech()},BigNumber:function(e){return new t(1).div(e.cosh())},Unit:function(e){if(e.hasBase(e.constructor.BASE_UNITS.ANGLE))return this(e.value);throw new TypeError("Unit in function sech is no angle")},"Array | Matrix":function(e){return lr(e,this)}})}),ya=tt("sinh",["typed"],e=>(e=e.typed,e("sinh",{number:ei,Complex:function(e){return e.sinh()},BigNumber:function(e){return e.sinh()},Unit:function(e){if(e.hasBase(e.constructor.BASE_UNITS.ANGLE))return this(e.value);throw new TypeError("Unit in function sinh is no angle")},"Array | Matrix":function(e){return lr(e,this,!0)}}))),ga=tt("sparse",["typed","SparseMatrix"],e=>{var{typed:e,SparseMatrix:t}=e;return e("sparse",{"":function(){return new t([])},string:function(e){return new t([],e)},"Array | Matrix":function(e){return new t(e)},"Array | Matrix, string":function(e,n){return new t(e,n)}})}),va=tt("sqrt",["config","typed","Complex"],e=>{var{config:t,typed:e,Complex:n}=e;return e("sqrt",{number:r,Complex:function(e){return e.sqrt()},BigNumber:function(e){return!e.isNegative()||t.predictable?e.sqrt():r(e.toNumber())},"Array | Matrix":function(e){return lr(e,this,!0)},Unit:function(e){return e.pow(.5)}});function r(e){return isNaN(e)?NaN:0<=e||t.predictable?Math.sqrt(e):new n(e,0).sqrt()}}),ba=tt("tanh",["typed"],e=>(e=e.typed,e("tanh",{number:Me,Complex:function(e){return e.tanh()},BigNumber:function(e){return e.tanh()},Unit:function(e){if(e.hasBase(e.constructor.BASE_UNITS.ANGLE))return this(e.value);throw new TypeError("Unit in function tanh is no angle")},"Array | Matrix":function(e){return lr(e,this,!0)}}))),xa="unaryMinus",wa=tt(xa,["typed"],e=>(e=e.typed,e(xa,{number:br,Complex:function(e){return e.neg()},BigNumber:function(e){return e.neg()},Fraction:function(e){return e.neg()},Unit:function(e){var t=e.clone();return t.value=this(e.value),t},"Array | Matrix":function(e){return lr(e,this,!0)}}))),Na=tt("acoth",["typed","config","Complex","BigNumber"],e=>{var{typed:e,config:t,Complex:n,BigNumber:r}=e;return e("acoth",{number:function(e){return 1<=e||e<=-1||t.predictable?Lr(e):new n(e,0).acoth()},Complex:function(e){return e.acoth()},BigNumber:function(e){return new r(1).div(e).atanh()},"Array | Matrix":function(e){return lr(e,this)}})}),Sa=tt("cot",["typed","BigNumber"],e=>{var{typed:e,BigNumber:t}=e;return e("cot",{number:Zr,Complex:function(e){return e.cot()},BigNumber:function(e){return new t(1).div(e.tan())},Unit:function(e){if(e.hasBase(e.constructor.BASE_UNITS.ANGLE))return this(e.value);throw new TypeError("Unit in function cot is no angle")},"Array | Matrix":function(e){return lr(e,this)}})}),_a=tt("fraction",["typed","Fraction"],e=>{var{typed:e,Fraction:t}=e;return e("fraction",{number:function(e){if(!isFinite(e)||isNaN(e))throw new Error(e+" cannot be represented as a fraction");return new t(e)},string:function(e){return new t(e)},"number, number":function(e,n){return new t(e,n)},null:function(e){return new t(0)},BigNumber:function(e){return new t(e.toString())},Fraction:function(e){return e},Object:function(e){return new t(e)},"Array | Matrix":function(e){return lr(e,this)}})}),Da=tt("isNumeric",["typed"],e=>(e=e.typed,e("isNumeric",{"number | BigNumber | Fraction | boolean":function(){return!0},"Complex | Unit | string | null | undefined | Node":function(){return!1},"Array | Matrix":function(e){return lr(e,this)}}))),Ma=tt("matrix",["typed","Matrix","DenseMatrix","SparseMatrix"],e=>{var{typed:e,DenseMatrix:t,SparseMatrix:n}=e;return e("matrix",{"":function(){return r([])},string:function(e){return r([],e)},"string, string":function(e,t){return r([],e,t)},Array:function(e){return r(e)},Matrix:function(e){return r(e,e.storage())},"Array | Matrix, string":r,"Array | Matrix, string, string":r});function r(e,r,i){if("dense"===r||"default"===r||void 0===r)return new t(e,i);if("sparse"===r)return new n(e,i);throw new TypeError("Unknown matrix type "+JSON.stringify(r)+".")}}),Ea="matrixFromFunction",Aa=tt(Ea,["typed","matrix","isZero"],e=>{var{typed:e,matrix:t,isZero:n}=e;return e(Ea,{"Array | Matrix, function, string, string":r,"Array | Matrix, function, string":function(e,t,n){return r(e,t,n)},"Matrix, function":function(e,t){return r(e,t,"dense")},"Array, function":function(e,t){return r(e,t,"dense").toArray()},"Array | Matrix, string, function":function(e,t,n){return r(e,n,t)},"Array | Matrix, string, string, function":function(e,t,n,i){return r(e,i,t,n)}});function r(e,r,i,o){var a=void 0!==o?t(i,o):t(i);return a.resize(e),a.forEach((function(e,t){var i=r(t);n(i)||a.set(t,i)})),a}}),Oa=tt("algorithm02",["typed","equalScalar"],e=>{var{typed:t,equalScalar:n}=e;return function(e,r,i,o){var a=e._data,s=e._size,u=(e=e._datatype,r._values),c=r._index,f=r._ptr,l=r._size,p=r._datatype;if(s.length!==l.length)throw new Re(s.length,l.length);if(s[0]!==l[0]||s[1]!==l[1])throw new RangeError("Dimension mismatch. Matrix A ("+s+") must match Matrix B ("+l+")");if(!u)throw new Error("Cannot perform operation on Dense Matrix and Pattern Sparse Matrix");l=s[0];for(var d,h=s[1],m=n,y=0,g=i,v=("string"==typeof e&&e===p&&(m=t.find(n,[d=e,d]),y=t.convert(0,d),g=t.find(i,[d,d])),[]),b=[],x=[],w=0;w{var t=e["typed"];return function(e,n,r,i){var o=e._data,a=e._size,s=e._datatype,u=n._values,c=n._index,f=n._ptr,l=n._size;n=n._datatype;if(a.length!==l.length)throw new Re(a.length,l.length);if(a[0]!==l[0]||a[1]!==l[1])throw new RangeError("Dimension mismatch. Matrix A ("+a+") must match Matrix B ("+l+")");if(!u)throw new Error("Cannot perform operation on Dense Matrix and Pattern Sparse Matrix");for(var p,d=a[0],h=a[1],m=0,y=r,g=("string"==typeof s&&s===n&&(m=t.convert(0,p=s),y=t.find(r,[p,p])),[]),v=0;v{var{typed:t,equalScalar:n}=e;return function(e,r,i){var o=e._values,a=e._index,s=e._ptr,u=e._size,c=e._datatype,f=r._values,l=r._index,p=r._ptr,d=r._size;r=r._datatype;if(u.length!==d.length)throw new Re(u.length,d.length);if(u[0]!==d[0]||u[1]!==d[1])throw new RangeError("Dimension mismatch. Matrix A ("+u+") must match Matrix B ("+d+")");d=u[0];for(var h,m=u[1],y=n,g=0,v=i,b=("string"==typeof c&&c===r&&(y=t.find(n,[h=c,h]),g=t.convert(0,h),v=t.find(i,[h,h])),o&&f?[]:void 0),x=[],w=[],N=b?[]:void 0,S=b?[]:void 0,_=[],D=[],M=0;M{var{typed:t,equalScalar:n}=e;return function(e,r,i,o){var a=e._values,s=e._index,u=e._ptr,c=e._size,f=e._datatype;if(!a)throw new Error("Cannot perform operation on Pattern Sparse Matrix and Scalar value");for(var l,p=c[0],d=c[1],h=n,m=0,y=i,g=("string"==typeof f&&(h=t.find(n,[l=f,l]),m=t.convert(0,l),r=t.convert(r,l),y=t.find(i,[l,l])),[]),v=[],b=[],x=0;x{var{typed:t,DenseMatrix:n}=e;return function(e,r,i,o){var a=e._values,s=e._index,u=e._ptr,c=e._size;e=e._datatype;if(!a)throw new Error("Cannot perform operation on Pattern Sparse Matrix and Scalar value");for(var f,l=c[0],p=c[1],d=i,h=("string"==typeof e&&(r=t.convert(r,f=e),d=t.find(i,[f,f])),[]),m=[],y=[],g=0;g{var t=e["typed"];return function(e,n,r){var i=e._data,o=e._size,a=e._datatype,s=n._data,u=n._size,c=(n=n._datatype,[]);if(o.length!==u.length)throw new Re(o.length,u.length);for(var f,l=0;l{var t=e["typed"];return function(e,n,r,i){var o,a=e._data,s=e._size,u=e._datatype,c=r;"string"==typeof u&&(n=t.convert(n,o=u),c=t.find(r,[o,o])),u=0{var{typed:e,matrix:t,equalScalar:n,DenseMatrix:r}=e,i=Oa({typed:e,equalScalar:n}),o=Ca({typed:e}),a=Ta({typed:e,equalScalar:n}),s=ka({typed:e,equalScalar:n}),u=Ia({typed:e,DenseMatrix:r}),c=Ra({typed:e}),f=ja({typed:e});return e("mod",{"number, number":Or,"BigNumber, BigNumber":function(e,t){if(t.isNeg())throw new Error("Cannot calculate mod for a negative divisor");return t.isZero()?e:e.mod(t)},"Fraction, Fraction":function(e,t){if(t.compare(0)<0)throw new Error("Cannot calculate mod for a negative divisor");return(0<=e.compare(0)?e:e.mod(t).add(t)).mod(t)},"SparseMatrix, SparseMatrix":function(e,t){return a(e,t,this,!1)},"SparseMatrix, DenseMatrix":function(e,t){return i(t,e,this,!0)},"DenseMatrix, SparseMatrix":function(e,t){return o(e,t,this,!1)},"DenseMatrix, DenseMatrix":function(e,t){return c(e,t,this)},"Array, Array":function(e,n){return this(t(e),t(n)).valueOf()},"Array, Matrix":function(e,n){return this(t(e),n)},"Matrix, Array":function(e,n){return this(e,t(n))},"SparseMatrix, any":function(e,t){return s(e,t,this,!1)},"DenseMatrix, any":function(e,t){return f(e,t,this,!1)},"any, SparseMatrix":function(e,t){return u(t,e,this,!0)},"any, DenseMatrix":function(e,t){return f(t,e,this,!0)},"Array, any":function(e,n){return f(t(e),n,this,!1).valueOf()},"any, Array":function(e,n){return f(t(n),e,this,!0).valueOf()}})}),za=tt("algorithm01",["typed"],e=>{var t=e["typed"];return function(e,n,r,i){var o=e._data,a=e._size,s=e._datatype,u=n._values,c=n._index,f=n._ptr,l=n._size;n=n._datatype;if(a.length!==l.length)throw new Re(a.length,l.length);if(a[0]!==l[0]||a[1]!==l[1])throw new RangeError("Dimension mismatch. Matrix A ("+a+") must match Matrix B ("+l+")");if(!u)throw new Error("Cannot perform operation on Dense Matrix and Pattern Sparse Matrix");for(var p=a[0],d=a[1],h=(l="string"==typeof s&&s===n?s:void 0,l?t.find(r,[l,l]):r),m=[],y=0;y{var{typed:t,equalScalar:n}=e;return function(e,r,i){var o=e._values,a=e._size,s=e._datatype,u=r._values,c=r._size,f=r._datatype;if(a.length!==c.length)throw new Re(a.length,c.length);if(a[0]!==c[0]||a[1]!==c[1])throw new RangeError("Dimension mismatch. Matrix A ("+a+") must match Matrix B ("+c+")");c=a[0];for(var l,p=a[1],d=n,h=0,m=i,y=("string"==typeof s&&s===f&&(d=t.find(n,[l=s,l]),h=t.convert(0,l),m=t.find(i,[l,l])),o&&u?[]:void 0),g=[],v=[],b=y?[]:void 0,x=[],w=[],N=0;N{var{typed:e,matrix:t,equalScalar:n,BigNumber:r}=e,i=za({typed:e}),o=Oa({typed:e,equalScalar:n}),a=qa({typed:e,equalScalar:n}),s=ka({typed:e,equalScalar:n}),u=Ra({typed:e}),c=ja({typed:e}),f="Complex number not supported in function nthRoot. Use nthRoots instead.";return e(Pa,{number:Cr,"number, number":Cr,BigNumber:function(e){return l(e,new r(2))},Complex:function(e){throw new Error(f)},"Complex, number":function(e,t){throw new Error(f)},"BigNumber, BigNumber":l,"Array | Matrix":function(e){return this(e,2)},"SparseMatrix, SparseMatrix":function(e,t){if(1===t.density())return a(e,t,this);throw new Error("Root must be non-zero")},"SparseMatrix, DenseMatrix":function(e,t){return o(t,e,this,!0)},"DenseMatrix, SparseMatrix":function(e,t){if(1===t.density())return i(e,t,this,!1);throw new Error("Root must be non-zero")},"DenseMatrix, DenseMatrix":function(e,t){return u(e,t,this)},"Array, Array":function(e,n){return this(t(e),t(n)).valueOf()},"Array, Matrix":function(e,n){return this(t(e),n)},"Matrix, Array":function(e,n){return this(e,t(n))},"SparseMatrix, number | BigNumber":function(e,t){return s(e,t,this,!1)},"DenseMatrix, number | BigNumber":function(e,t){return c(e,t,this,!1)},"number | BigNumber, SparseMatrix":function(e,t){if(1===t.density())return s(t,e,this,!0);throw new Error("Root must be non-zero")},"number | BigNumber, DenseMatrix":function(e,t){return c(t,e,this,!0)},"Array, number | BigNumber":function(e,n){return this(t(e),n).valueOf()},"number | BigNumber, Array":function(e,n){return this(e,t(n)).valueOf()}});function l(e,t){var n=r.precision,i=r.clone({precision:n+2}),o=new r(0),a=new i(1),s=t.isNegative();if((t=s?t.neg():t).isZero())throw new Error("Root must be non-zero");if(e.isNegative()&&!t.abs().mod(2).equals(1))throw new Error("Root must be odd when a is negative.");return e.isZero()?s?new i(1/0):0:e.isFinite()?(i=e.abs().pow(a.div(t)),i=e.isNeg()?i.neg():i,new r((s?a.div(i):i).toPrecision(n))):s?o:e}});function La(){throw new Error('No "bignumber" implementation available')}function Ua(){throw new Error('No "fraction" implementation available')}function $a(){throw new Error('No "matrix" implementation available')}var Ha=tt("numeric",["number","?bignumber","?fraction"],e=>{var{number:t,bignumber:n,fraction:r}=e,i={string:!0,number:!0,BigNumber:!0,Fraction:!0},o={number:e=>t(e),BigNumber:n?e=>n(e):La,Fraction:r?e=>r(e):Ua};return function(e,t){var n=H(e);if(!(n in i))throw new TypeError("Cannot convert "+e+' of type "'+n+'"; valid input types are '+Object.keys(i).join(", "));if(t in o)return t===n?e:o[t](e);throw new TypeError("Cannot convert "+e+' to type "'+t+'"; valid output types are '+Object.keys(o).join(", "))}}),Wa=tt("or",["typed","matrix","equalScalar","DenseMatrix"],e=>{var{typed:e,matrix:t,equalScalar:n,DenseMatrix:r}=e,i=Ca({typed:e}),o=Ta({typed:e,equalScalar:n}),a=Ia({typed:e,DenseMatrix:r}),s=Ra({typed:e}),u=ja({typed:e});return e("or",{"number, number":Oo,"Complex, Complex":function(e,t){return 0!==e.re||0!==e.im||0!==t.re||0!==t.im},"BigNumber, BigNumber":function(e,t){return!e.isZero()&&!e.isNaN()||!t.isZero()&&!t.isNaN()},"Unit, Unit":function(e,t){return this(e.value||0,t.value||0)},"SparseMatrix, SparseMatrix":function(e,t){return o(e,t,this)},"SparseMatrix, DenseMatrix":function(e,t){return i(t,e,this,!0)},"DenseMatrix, SparseMatrix":function(e,t){return i(e,t,this,!1)},"DenseMatrix, DenseMatrix":function(e,t){return s(e,t,this)},"Array, Array":function(e,n){return this(t(e),t(n)).valueOf()},"Array, Matrix":function(e,n){return this(t(e),n)},"Matrix, Array":function(e,n){return this(e,t(n))},"SparseMatrix, any":function(e,t){return a(e,t,this,!1)},"DenseMatrix, any":function(e,t){return u(e,t,this,!1)},"any, SparseMatrix":function(e,t){return a(t,e,this,!0)},"any, DenseMatrix":function(e,t){return u(t,e,this,!0)},"Array, any":function(e,n){return u(t(e),n,this,!1).valueOf()},"any, Array":function(e,n){return u(t(n),e,this,!0).valueOf()}})});function Ga(e,t,n){var r;return-1!==String(e).indexOf("Unexpected type")?(r=2{var{typed:e,config:t,multiplyScalar:n,numeric:r}=e;return e("prod",{"Array | Matrix":i,"Array | Matrix, number | BigNumber":function(e,t){throw new Error("prod(A, dim) is not yet supported")},"...":i});function i(e){var i;if(fr(e,(function(t){try{i=void 0===i?t:n(i,t)}catch(e){throw Ga(e,"prod",t)}})),void 0===(i="string"==typeof i?r(i,t.number):i))throw new Error("Cannot calculate prod of an empty array");return i}}),Za=tt("reshape",["typed","isInteger","matrix"],e=>{var{typed:e,isInteger:t}=e;return e("reshape",{"Matrix, Array":function(e,t){return e.reshape(t)},"Array, Array":function(e,n){return n.forEach((function(e){if(!t(e))throw new TypeError("Invalid size for dimension: "+e)})),Fe(e,n)}})}),Ya=tt("size",["typed","config","?matrix"],e=>{var{typed:e,config:t,matrix:n}=e;return e("size",{Matrix:function(e){return e.create(e.size())},Array:Be,string:function(e){return"Array"===t.matrix?[e.length]:n([e.length])},"number | Complex | BigNumber | Unit | boolean | null":function(e){return"Array"===t.matrix?[]:n?n([]):$a()}})}),Xa=tt("algorithm07",["typed","DenseMatrix"],e=>{var{typed:t,DenseMatrix:n}=e;return function(e,i,o){var a=e._size,s=e._datatype,u=i._size,c=i._datatype;if(a.length!==u.length)throw new Re(a.length,u.length);if(a[0]!==u[0]||a[1]!==u[1])throw new RangeError("Dimension mismatch. Matrix A ("+a+") must match Matrix B ("+u+")");for(var f,l=a[0],p=a[1],d=0,h=o,m=("string"==typeof s&&s===c&&(d=t.convert(0,f=s),h=t.find(o,[f,f])),[]),y=0;y{var{typed:e,config:t,matrix:n,DenseMatrix:r}=e,i=Ca({typed:e}),o=Xa({typed:e,DenseMatrix:r}),a=Ia({typed:e,DenseMatrix:r}),s=Ra({typed:e}),u=ja({typed:e});return e(Ja,{"boolean, boolean":function(e,t){return e{var{typed:e,matrix:t}=e;return e("squeeze",{Array:function(e){return $e(W(e))},Matrix:function(e){return e=$e(e.toArray()),Array.isArray(e)?t(e):e},any:W})}),es=tt("subset",["typed","matrix"],e=>{var{typed:e,matrix:t}=e;return e("subset",{"Array, Index":function(e,n){return e=t(e).subset(n),n.isScalar()?e:e.valueOf()},"Matrix, Index":function(e,t){return e.subset(t)},"Object, Index":rs,"string, Index":ts,"Array, Index, any":function(e,n,r){return t(W(e)).subset(n,r,void 0).valueOf()},"Array, Index, any, any":function(e,n,r,i){return t(W(e)).subset(n,r,i).valueOf()},"Matrix, Index, any":function(e,t,n){return e.clone().subset(t,n)},"Matrix, Index, any, any":function(e,t,n,r){return e.clone().subset(t,n,r)},"string, Index, string":ns,"string, Index, string, string":ns,"Object, Index, any":is})});function ts(e,t){if(!v(t))throw new TypeError("Index expected");if(1!==t.size().length)throw new Re(t.size().length,1);var n=e.length,r=(n=(qe(t.min()[0],n),qe(t.max()[0],n),t.dimension(0)),"");return n.forEach((function(t){r+=e.charAt(t)})),r}function ns(e,t,n,r){if(!t||!0!==t.isIndex)throw new TypeError("Index expected");if(1!==t.size().length)throw new Re(t.size().length,1);if(void 0!==r){if("string"!=typeof r||1!==r.length)throw new TypeError("Single character expected as defaultValue")}else r=" ";var i=t.dimension(0);if(i.size()[0]!==n.length)throw new Re(i.size()[0],n.length);for(var o=e.length,a=(qe(t.min()[0]),qe(t.max()[0]),[]),s=0;s{var{typed:t,DenseMatrix:n}=e;return function(e,r,i,o){var a=e._values,s=e._index,u=e._ptr,c=e._size;e=e._datatype;if(!a)throw new Error("Cannot perform operation on Pattern Sparse Matrix and Scalar value");for(var f,l=c[0],p=c[1],d=i,h=("string"==typeof e&&(r=t.convert(r,f=e),d=t.find(i,[f,f])),[]),m=[],y=[],g=0;g{var{typed:e,matrix:t,equalScalar:n,addScalar:r,unaryMinus:i,DenseMatrix:o}=e,a=za({typed:e}),s=Ca({typed:e}),u=Ta({typed:e,equalScalar:n}),c=os({typed:e,DenseMatrix:o}),f=Ra({typed:e}),l=ja({typed:e});return e("subtract",{"number, number":function(e,t){return e-t},"Complex, Complex":function(e,t){return e.sub(t)},"BigNumber, BigNumber":function(e,t){return e.minus(t)},"Fraction, Fraction":function(e,t){return e.sub(t)},"Unit, Unit":function(e,t){if(null===e.value)throw new Error("Parameter x contains a unit with undefined value");if(null===t.value)throw new Error("Parameter y contains a unit with undefined value");if(e.equalBase(t))return(e=e.clone()).value=this(e.value,t.value),e.fixPrefix=!1,e;throw new Error("Units do not match")},"SparseMatrix, SparseMatrix":function(e,t){return ss(e,t),u(e,t,this)},"SparseMatrix, DenseMatrix":function(e,t){return ss(e,t),s(t,e,this,!0)},"DenseMatrix, SparseMatrix":function(e,t){return ss(e,t),a(e,t,this,!1)},"DenseMatrix, DenseMatrix":function(e,t){return ss(e,t),f(e,t,this)},"Array, Array":function(e,n){return this(t(e),t(n)).valueOf()},"Array, Matrix":function(e,n){return this(t(e),n)},"Matrix, Array":function(e,n){return this(e,t(n))},"SparseMatrix, any":function(e,t){return c(e,i(t),r)},"DenseMatrix, any":function(e,t){return l(e,t,this)},"any, SparseMatrix":function(e,t){return c(t,e,this,!0)},"any, DenseMatrix":function(e,t){return l(t,e,this,!0)},"Array, any":function(e,n){return l(t(e),n,this,!1).valueOf()},"any, Array":function(e,n){return l(t(n),e,this,!0).valueOf()}})});function ss(e,t){if(e=e.size(),t=t.size(),e.length!==t.length)throw new Re(e.length,t.length)}var us=tt("to",["typed","matrix"],e=>{var{typed:e,matrix:t}=e,n=Ra({typed:e}),r=ja({typed:e});return e("to",{"Unit, Unit | string":function(e,t){return e.to(t)},"Matrix, Matrix":function(e,t){return n(e,t,this)},"Array, Array":function(e,n){return this(t(e),t(n)).valueOf()},"Array, Matrix":function(e,n){return this(t(e),n)},"Matrix, Array":function(e,n){return this(e,t(n))},"Matrix, any":function(e,t){return r(e,t,this,!1)},"any, Matrix":function(e,t){return r(t,e,this,!0)},"Array, any":function(e,n){return r(t(e),n,this,!1).valueOf()},"any, Array":function(e,n){return r(t(n),e,this,!0).valueOf()}})}),cs=tt("transpose",["typed","matrix"],e=>{var{typed:e,matrix:t}=e;return e("transpose",{Array:function(e){return this(t(e)).valueOf()},Matrix:function(e){var t,n=e.size();switch(n.length){case 1:t=e.clone();break;case 2:var r=n[0],i=n[1];if(0===i)throw new RangeError("Cannot transpose a 2D matrix with no columns (size: "+Ce(n)+")");switch(e.storage()){case"dense":t=function(e,t,n){for(var r,i=e._data,o=[],a=0;a{var{typed:e,config:t,matrix:n,BigNumber:r}=e;return e("xgcd",{"number, number":function(e,r){return e=Ir(e,r),"Array"===t.matrix?e:n(e)},"BigNumber, BigNumber":function(e,i){var o,a,s,u=new r(0),c=new r(1),f=u,l=c,p=c,d=u;if(!e.isInt()||!i.isInt())throw new Error("Parameters in function xgcd must be integer numbers");for(;!i.isZero();)a=e.div(i).floor(),s=e.mod(i),o=f,f=l.minus(a.times(f)),l=o,o=p,p=d.minus(a.times(p)),d=o,e=i,i=s;return c=e.lt(u)?[e.neg(),l.neg(),d.neg()]:[e,e.isZero()?0:l,d],"Array"===t.matrix?c:n(c)}})}),ls=tt("zeros",["typed","config","matrix","BigNumber"],e=>{var{typed:e,config:t,matrix:n,BigNumber:r}=e;return e("zeros",{"":function(){return"Array"===t.matrix?i([]):i([],"default")},"...number | BigNumber | string":function(e){var n;return"string"==typeof e[e.length-1]?(n=e.pop(),i(e,n)):"Array"===t.matrix?i(e):i(e,"default")},Array:i,Matrix:function(e){var t=e.storage();return i(e.valueOf(),t)},"Array | Matrix, string":function(e,t){return i(e.valueOf(),t)}});function i(e,t){i=!1,e.forEach((function(e,t,n){s(e)&&(i=!0,n[t]=e.toNumber())}));var i,o=i?new r(0):0;return e.forEach((function(e){if("number"!=typeof e||!oe(e)||e<0)throw new Error("Parameters in function zeros must be positive integers")})),t?(t=n(t),0{var{typed:e,matrix:t,equalScalar:n,zeros:r,not:i}=e,o=Oa({typed:e,equalScalar:n}),a=qa({typed:e,equalScalar:n}),s=ka({typed:e,equalScalar:n}),u=Ra({typed:e}),c=ja({typed:e});return e("and",{"number, number":To,"Complex, Complex":function(e,t){return!(0===e.re&&0===e.im||0===t.re&&0===t.im)},"BigNumber, BigNumber":function(e,t){return!(e.isZero()||t.isZero()||e.isNaN()||t.isNaN())},"Unit, Unit":function(e,t){return this(e.value||0,t.value||0)},"SparseMatrix, SparseMatrix":function(e,t){return a(e,t,this,!1)},"SparseMatrix, DenseMatrix":function(e,t){return o(t,e,this,!0)},"DenseMatrix, SparseMatrix":function(e,t){return o(e,t,this,!1)},"DenseMatrix, DenseMatrix":function(e,t){return u(e,t,this)},"Array, Array":function(e,n){return this(t(e),t(n)).valueOf()},"Array, Matrix":function(e,n){return this(t(e),n)},"Matrix, Array":function(e,n){return this(e,t(n))},"SparseMatrix, any":function(e,t){return i(t)?r(e.size(),e.storage()):s(e,t,this,!1)},"DenseMatrix, any":function(e,t){return i(t)?r(e.size(),e.storage()):c(e,t,this,!1)},"any, SparseMatrix":function(e,t){return i(e)?r(e.size(),e.storage()):s(t,e,this,!0)},"any, DenseMatrix":function(e,t){return i(e)?r(e.size(),e.storage()):c(t,e,this,!0)},"Array, any":function(e,n){return this(t(e),n).valueOf()},"any, Array":function(e,n){return this(e,t(n)).valueOf()}})}),ds=tt("bitAnd",["typed","matrix","equalScalar"],e=>{var{typed:e,matrix:t,equalScalar:n}=e,r=Oa({typed:e,equalScalar:n}),i=qa({typed:e,equalScalar:n}),o=ka({typed:e,equalScalar:n}),a=Ra({typed:e}),s=ja({typed:e});return e("bitAnd",{"number, number":vi,"BigNumber, BigNumber":fi,"SparseMatrix, SparseMatrix":function(e,t){return i(e,t,this,!1)},"SparseMatrix, DenseMatrix":function(e,t){return r(t,e,this,!0)},"DenseMatrix, SparseMatrix":function(e,t){return r(e,t,this,!1)},"DenseMatrix, DenseMatrix":function(e,t){return a(e,t,this)},"Array, Array":function(e,n){return this(t(e),t(n)).valueOf()},"Array, Matrix":function(e,n){return this(t(e),n)},"Matrix, Array":function(e,n){return this(e,t(n))},"SparseMatrix, any":function(e,t){return o(e,t,this,!1)},"DenseMatrix, any":function(e,t){return s(e,t,this,!1)},"any, SparseMatrix":function(e,t){return o(t,e,this,!0)},"any, DenseMatrix":function(e,t){return s(t,e,this,!0)},"Array, any":function(e,n){return s(t(e),n,this,!1).valueOf()},"any, Array":function(e,n){return s(t(n),e,this,!0).valueOf()}})}),hs=tt("bitXor",["typed","matrix","DenseMatrix"],e=>{var{typed:e,matrix:t,DenseMatrix:n}=e,r=Ca({typed:e}),i=Xa({typed:e,DenseMatrix:n}),o=Ia({typed:e,DenseMatrix:n}),a=Ra({typed:e}),s=ja({typed:e});return e("bitXor",{"number, number":wi,"BigNumber, BigNumber":mi,"SparseMatrix, SparseMatrix":function(e,t){return i(e,t,this)},"SparseMatrix, DenseMatrix":function(e,t){return r(t,e,this,!0)},"DenseMatrix, SparseMatrix":function(e,t){return r(e,t,this,!1)},"DenseMatrix, DenseMatrix":function(e,t){return a(e,t,this)},"Array, Array":function(e,n){return this(t(e),t(n)).valueOf()},"Array, Matrix":function(e,n){return this(t(e),n)},"Matrix, Array":function(e,n){return this(e,t(n))},"SparseMatrix, any":function(e,t){return o(e,t,this,!1)},"DenseMatrix, any":function(e,t){return s(e,t,this,!1)},"any, SparseMatrix":function(e,t){return o(t,e,this,!0)},"any, DenseMatrix":function(e,t){return s(t,e,this,!0)},"Array, any":function(e,n){return s(t(e),n,this,!1).valueOf()},"any, Array":function(e,n){return s(t(n),e,this,!0).valueOf()}})}),ms=tt("cbrt",["config","typed","isNegative","unaryMinus","matrix","Complex","BigNumber","Fraction"],e=>{var{config:t,typed:e,isNegative:n,unaryMinus:r,matrix:i,Complex:o,BigNumber:a,Fraction:f}=e;return e("cbrt",{number:wr,Complex:l,"Complex, boolean":l,BigNumber:function(e){return e.cbrt()},Unit:function(e){var t,i;return e.value&&u(e.value)?((t=e.clone()).value=1,(t=t.pow(1/3)).value=l(e.value),t):((t=n(e.value))&&(e.value=r(e.value)),i=s(e.value)?new a(1).div(3):c(e.value)?new f(1,3):1/3,e=e.pow(i),t&&(e.value=r(e.value)),e)},"Array | Matrix":function(e){return lr(e,this,!0)}});function l(e,n){var r=e.arg()/3,a=(e=e.abs(),new o(wr(e),0).mul(new o(0,r).exp()));return n?(n=[a,new o(wr(e),0).mul(new o(0,r+2*Math.PI/3).exp()),new o(wr(e),0).mul(new o(0,r-2*Math.PI/3).exp())],"Array"===t.matrix?n:i(n)):a}}),ys="compare",gs=tt(ys,["typed","config","matrix","equalScalar","BigNumber","Fraction","DenseMatrix"],e=>{var{typed:e,config:t,equalScalar:n,matrix:r,BigNumber:i,Fraction:o,DenseMatrix:a}=e,s=Ca({typed:e}),u=Ta({typed:e,equalScalar:n}),c=Ia({typed:e,DenseMatrix:a}),f=Ra({typed:e}),l=ja({typed:e});return e(ys,{"boolean, boolean":function(e,t){return e===t?0:t{var{typed:e,matrix:t}=e,n=Ra({typed:e}),r=ja({typed:e});return e(vs,{"any, any":Ie,"DenseMatrix, DenseMatrix":function(e,t){return n(e,t,Ie)},"Array, Array":function(e,n){return this(t(e),t(n)).valueOf()},"Array, Matrix":function(e,n){return this(t(e),n)},"Matrix, Array":function(e,n){return this(e,t(n))},"DenseMatrix, any":function(e,t){return r(e,t,Ie,!1)},"any, DenseMatrix":function(e,t){return r(t,e,Ie,!0)},"Array, any":function(e,n){return r(t(e),n,Ie,!1).valueOf()},"any, Array":function(e,n){return r(t(n),e,Ie,!0).valueOf()}})}),xs=tt("concat",["typed","matrix","isInteger"],e=>{var{typed:e,matrix:t,isInteger:n}=e;return e("concat",{"...Array | Matrix | number | BigNumber":function(e){for(var r,i=e.length,o=-1,u=!1,c=[],f=0;f{var{typed:e,size:t,prod:n}=e;return e("count",{string:function(e){return e.length},"Matrix | Array":function(e){return n(t(e))}})}),Ns="ctranspose",Ss=tt(Ns,["typed","transpose","conj"],e=>{var{typed:e,transpose:t,conj:n}=e;return e(Ns,{any:function(e){return n(t(e))}})}),_s=tt("diag",["typed","matrix","DenseMatrix","SparseMatrix"],e=>{var{typed:e,matrix:t,DenseMatrix:n,SparseMatrix:r}=e;return e("diag",{Array:function(e){return i(e,0,Be(e),null)},"Array, number":function(e,t){return i(e,t,Be(e),null)},"Array, BigNumber":function(e,t){return i(e,t.toNumber(),Be(e),null)},"Array, string":function(e,t){return i(e,0,Be(e),t)},"Array, number, string":function(e,t,n){return i(e,t,Be(e),n)},"Array, BigNumber, string":function(e,t,n){return i(e,t.toNumber(),Be(e),n)},Matrix:function(e){return i(e,0,e.size(),e.storage())},"Matrix, number":function(e,t){return i(e,t,e.size(),e.storage())},"Matrix, BigNumber":function(e,t){return i(e,t.toNumber(),e.size(),e.storage())},"Matrix, string":function(e,t){return i(e,0,e.size(),t)},"Matrix, number, string":function(e,t,n){return i(e,t,e.size(),n)},"Matrix, BigNumber, string":function(e,t,n){return i(e,t.toNumber(),e.size(),n)}});function i(e,i,o,a){if(!oe(i))throw new TypeError("Second parameter in function diag must be an integer");var s=0{var{typed:e,numeric:t}=e;return e(Ds,{"number, number":function(e,t){return e/t},"Complex, Complex":function(e,t){return e.div(t)},"BigNumber, BigNumber":function(e,t){return e.div(t)},"Fraction, Fraction":function(e,t){return e.div(t)},"Unit, number | Fraction | BigNumber":function(e,n){e=e.clone();var r=t(1,H(n));return e.value=this(null===e.value?e._normalize(r):e.value,n),e},"number | Fraction | BigNumber, Unit":function(e,n){var r=(r=n.clone()).pow(-1),i=t(1,H(e));return r.value=this(e,null===n.value?n._normalize(i):n.value),r},"Unit, Unit":function(e,t){return e.divide(t)}})}),Es=tt("dotDivide",["typed","matrix","equalScalar","divideScalar","DenseMatrix"],e=>{var{typed:e,matrix:t,equalScalar:n,divideScalar:r,DenseMatrix:i}=e,o=Oa({typed:e,equalScalar:n}),a=Ca({typed:e}),s=Xa({typed:e,DenseMatrix:i}),u=ka({typed:e,equalScalar:n}),c=Ia({typed:e,DenseMatrix:i}),f=Ra({typed:e}),l=ja({typed:e});return e("dotDivide",{"any, any":r,"SparseMatrix, SparseMatrix":function(e,t){return s(e,t,r,!1)},"SparseMatrix, DenseMatrix":function(e,t){return o(t,e,r,!0)},"DenseMatrix, SparseMatrix":function(e,t){return a(e,t,r,!1)},"DenseMatrix, DenseMatrix":function(e,t){return f(e,t,r)},"Array, Array":function(e,n){return this(t(e),t(n)).valueOf()},"Array, Matrix":function(e,n){return this(t(e),n)},"Matrix, Array":function(e,n){return this(e,t(n))},"SparseMatrix, any":function(e,t){return u(e,t,r,!1)},"DenseMatrix, any":function(e,t){return l(e,t,r,!1)},"any, SparseMatrix":function(e,t){return c(t,e,r,!0)},"any, DenseMatrix":function(e,t){return l(t,e,r,!0)},"Array, any":function(e,n){return l(t(e),n,r,!1).valueOf()},"any, Array":function(e,n){return l(t(n),e,r,!0).valueOf()}})}),As="equal",Os=tt(As,["typed","matrix","equalScalar","DenseMatrix"],e=>{var{typed:e,matrix:t,equalScalar:n,DenseMatrix:r}=e,i=Ca({typed:e}),o=Xa({typed:e,DenseMatrix:r}),a=Ia({typed:e,DenseMatrix:r}),s=Ra({typed:e}),u=ja({typed:e});return e(As,{"any, any":function(e,t){return null===e?null===t:null===t?null===e:void 0===e?void 0===t:void 0===t?void 0===e:n(e,t)},"SparseMatrix, SparseMatrix":function(e,t){return o(e,t,n)},"SparseMatrix, DenseMatrix":function(e,t){return i(t,e,n,!0)},"DenseMatrix, SparseMatrix":function(e,t){return i(e,t,n,!1)},"DenseMatrix, DenseMatrix":function(e,t){return s(e,t,n)},"Array, Array":function(e,n){return this(t(e),t(n)).valueOf()},"Array, Matrix":function(e,n){return this(t(e),n)},"Matrix, Array":function(e,n){return this(e,t(n))},"SparseMatrix, any":function(e,t){return a(e,t,n,!1)},"DenseMatrix, any":function(e,t){return u(e,t,n,!1)},"any, SparseMatrix":function(e,t){return a(t,e,n,!0)},"any, DenseMatrix":function(e,t){return u(t,e,n,!0)},"Array, any":function(e,r){return u(t(e),r,n,!1).valueOf()},"any, Array":function(e,r){return u(t(r),e,n,!0).valueOf()}})}),Cs=(tt(As,["typed","equalScalar"],e=>{var{typed:e,equalScalar:t}=e;return e(As,{"any, any":function(e,n){return null===e?null===n:null===n?null===e:void 0===e?void 0===n:void 0===n?void 0===e:t(e,n)}})}),tt("fft",["typed","matrix","addScalar","multiplyScalar","divideScalar","exp","tau","i"],e=>{var{typed:e,addScalar:t,multiplyScalar:n,divideScalar:r,exp:i,tau:o,i:a}=e;return e("fft",{Array:s,Matrix:function(e){return e.create(s(e.toArray()))}});function s(e){var t=Be(e);return 1===t.length?u(e,t[0]):function e(t,n){var r=Be(t);if(0!==n)return new Array(r[0]).fill(0).map((r,i)=>e(t[i],n-1));if(1===r.length)return u(t);function i(e){var t=Be(e);return new Array(t[1]).fill(0).map((n,r)=>new Array(t[0]).fill(0).map((t,n)=>e[n][r]))}return i(e(i(t),1))}(e.map(e=>s(e,t.slice(1))),0)}function u(e){var s=e.length;if(1===s)return[e[0]];if(s%2!=0)throw new Error("Can only calculate FFT of power-of-two size");for(var c=[...u(e.filter((e,t)=>t%2==0)),...u(e.filter((e,t)=>t%2==1))],f=0;f{var{typed:e,matrix:t}=e;return e("flatten",{Array:function(e){return We(W(e))},Matrix:function(e){return e=We(W(e.toArray())),t(e)}})}),ks=tt("algorithm04",["typed","equalScalar"],e=>{var{typed:t,equalScalar:n}=e;return function(e,r,i){var o=e._values,a=e._index,s=e._ptr,u=e._size,c=e._datatype,f=r._values,l=r._index,p=r._ptr,d=r._size;r=r._datatype;if(u.length!==d.length)throw new Re(u.length,d.length);if(u[0]!==d[0]||u[1]!==d[1])throw new RangeError("Dimension mismatch. Matrix A ("+u+") must match Matrix B ("+d+")");d=u[0];for(var h,m=u[1],y=n,g=0,v=i,b=("string"==typeof c&&c===r&&(y=t.find(n,[h=c,h]),g=t.convert(0,h),v=t.find(i,[h,h])),o&&f?[]:void 0),x=[],w=[],N=o&&f?[]:void 0,S=o&&f?[]:void 0,_=[],D=[],M=0;M{var{typed:e,matrix:t,equalScalar:n,BigNumber:r,DenseMatrix:i}=e,o=za({typed:e}),a=ks({typed:e,equalScalar:n}),s=os({typed:e,DenseMatrix:i}),u=Ra({typed:e}),c=ja({typed:e});return e("gcd",{"number, number":Dr,"BigNumber, BigNumber":function(e,t){if(!e.isInt()||!t.isInt())throw new Error("Parameters in function gcd must be integer numbers");for(var n=new r(0);!t.isZero();){var i=e.mod(t);e=t,t=i}return e.lt(n)?e.neg():e},"Fraction, Fraction":function(e,t){return e.gcd(t)},"SparseMatrix, SparseMatrix":function(e,t){return a(e,t,this)},"SparseMatrix, DenseMatrix":function(e,t){return o(t,e,this,!0)},"DenseMatrix, SparseMatrix":function(e,t){return o(e,t,this,!1)},"DenseMatrix, DenseMatrix":function(e,t){return u(e,t,this)},"Array, Array":function(e,n){return this(t(e),t(n)).valueOf()},"Array, Matrix":function(e,n){return this(t(e),n)},"Matrix, Array":function(e,n){return this(e,t(n))},"SparseMatrix, number | BigNumber":function(e,t){return s(e,t,this,!1)},"DenseMatrix, number | BigNumber":function(e,t){return c(e,t,this,!1)},"number | BigNumber, SparseMatrix":function(e,t){return s(t,e,this,!0)},"number | BigNumber, DenseMatrix":function(e,t){return c(t,e,this,!0)},"Array, number | BigNumber":function(e,n){return c(t(e),n,this,!1).valueOf()},"number | BigNumber, Array":function(e,n){return c(t(n),e,this,!0).valueOf()},"Array | Matrix | number | BigNumber, Array | Matrix | number | BigNumber, ...Array | Matrix | number | BigNumber":function(e,t,n){for(var r=this(e,t),i=0;i{var{typed:e,isNumeric:t}=e;return e(Rs,{string:function(e){return 0{var{typed:e,abs:t,addScalar:n,divideScalar:r,multiplyScalar:i,sqrt:o,smaller:a,isPositive:s}=e;return e("hypot",{"... number | BigNumber":function(e){for(var u=0,c=0,f=0;f{var{typed:e,fft:t,dotDivide:n,conj:r}=e;return e("ifft",{"Array | Matrix":function(e){var i=d(e)?e.size():Be(e);return n(r(t(r(e))),i.reduce((e,t)=>e*t,1))}})}),qs=tt("kron",["typed","matrix","multiplyScalar"],e=>{var{typed:e,matrix:t,multiplyScalar:n}=e;return e("kron",{"Matrix, Matrix":function(e,n){return t(r(e.toArray(),n.toArray()))},"Matrix, Array":function(e,n){return t(r(e.toArray(),n))},"Array, Matrix":function(e,n){return t(r(e,n.toArray()))},"Array, Array":r});function r(e,t){if(1===Be(e).length&&(e=[e]),1===Be(t).length&&(t=[t]),2{var{typed:e,config:t,matrix:n,DenseMatrix:r}=e,i=Ca({typed:e}),o=Xa({typed:e,DenseMatrix:r}),a=Ia({typed:e,DenseMatrix:r}),s=Ra({typed:e}),u=ja({typed:e});return e(Ps,{"boolean, boolean":function(e,t){return t<=e},"number, number":function(e,n){return n<=e||xe(e,n,t.epsilon)},"BigNumber, BigNumber":function(e,n){return e.gte(n)||Pi(e,n,t.epsilon)},"Fraction, Fraction":function(e,t){return-1!==e.compare(t)},"Complex, Complex":function(){throw new TypeError("No ordering relation is defined for complex numbers")},"Unit, Unit":function(e,t){if(e.equalBase(t))return this(e.value,t.value);throw new Error("Cannot compare units with different base")},"SparseMatrix, SparseMatrix":function(e,t){return o(e,t,this)},"SparseMatrix, DenseMatrix":function(e,t){return i(t,e,this,!0)},"DenseMatrix, SparseMatrix":function(e,t){return i(e,t,this,!1)},"DenseMatrix, DenseMatrix":function(e,t){return s(e,t,this)},"Array, Array":function(e,t){return this(n(e),n(t)).valueOf()},"Array, Matrix":function(e,t){return this(n(e),t)},"Matrix, Array":function(e,t){return this(e,n(t))},"SparseMatrix, any":function(e,t){return a(e,t,this,!1)},"DenseMatrix, any":function(e,t){return u(e,t,this,!1)},"any, SparseMatrix":function(e,t){return a(t,e,this,!0)},"any, DenseMatrix":function(e,t){return u(t,e,this,!0)},"Array, any":function(e,t){return u(n(e),t,this,!1).valueOf()},"any, Array":function(e,t){return u(n(t),e,this,!0).valueOf()}})}),Ls=tt("algorithm08",["typed","equalScalar"],e=>{var{typed:t,equalScalar:n}=e;return function(e,r,i){var o=e._values,a=e._index,s=e._ptr,u=e._size,c=e._datatype,f=r._values,l=r._index,p=r._ptr,d=r._size;r=r._datatype;if(u.length!==d.length)throw new Re(u.length,d.length);if(u[0]!==d[0]||u[1]!==d[1])throw new RangeError("Dimension mismatch. Matrix A ("+u+") must match Matrix B ("+d+")");if(!o||!f)throw new Error("Cannot perform operation on Pattern Sparse Matrices");d=u[0];for(var h,m=u[1],y=n,g=0,v=i,b=("string"==typeof c&&c===r&&(y=t.find(n,[h=c,h]),g=t.convert(0,h),v=t.find(i,[h,h])),[]),x=[],w=[],N=[],S=[],_=0;_{var{typed:e,matrix:t,equalScalar:n,zeros:r,DenseMatrix:i}=e,o=za({typed:e}),a=Oa({typed:e,equalScalar:n}),s=Ls({typed:e,equalScalar:n}),u=os({typed:e,DenseMatrix:i}),c=ka({typed:e,equalScalar:n}),f=Ra({typed:e}),l=ja({typed:e});return e("leftShift",{"number, number":Ni,"BigNumber, BigNumber":yi,"SparseMatrix, SparseMatrix":function(e,t){return s(e,t,this,!1)},"SparseMatrix, DenseMatrix":function(e,t){return a(t,e,this,!0)},"DenseMatrix, SparseMatrix":function(e,t){return o(e,t,this,!1)},"DenseMatrix, DenseMatrix":function(e,t){return f(e,t,this)},"Array, Array":function(e,n){return this(t(e),t(n)).valueOf()},"Array, Matrix":function(e,n){return this(t(e),n)},"Matrix, Array":function(e,n){return this(e,t(n))},"SparseMatrix, number | BigNumber":function(e,t){return n(t,0)?e.clone():c(e,t,this,!1)},"DenseMatrix, number | BigNumber":function(e,t){return n(t,0)?e.clone():l(e,t,this,!1)},"number | BigNumber, SparseMatrix":function(e,t){return n(e,0)?r(t.size(),t.storage()):u(t,e,this,!0)},"number | BigNumber, DenseMatrix":function(e,t){return n(e,0)?r(t.size(),t.storage()):l(t,e,this,!0)},"Array, number | BigNumber":function(e,n){return this(t(e),n).valueOf()},"number | BigNumber, Array":function(e,n){return this(e,t(n)).valueOf()}})});function $s(e){var t=e["DenseMatrix"];return function(e,n,r){if(e=e.size(),2!==e.length)throw new RangeError("Matrix must be two dimensional (size: "+Ce(e)+")");var i=e[0];if(i!==e[1])throw new RangeError("Matrix must be square (size: "+Ce(e)+")");var o=[];if(d(n)){e=n.size();var a=n._data;if(1===e.length){if(e[0]!==i)throw new RangeError("Dimension mismatch. Matrix columns must match vector length.");for(var s=0;s{var{typed:e,matrix:t,divideScalar:n,multiplyScalar:r,subtract:i,equalScalar:o,DenseMatrix:a}=e,s=$s({DenseMatrix:a});return e("lsolve",{"SparseMatrix, Array | Matrix":function(e,t){for(var u=(t=s(e,t=t,!0))._data,c=(t=e._size[0],e._size[1]),f=e._values,l=e._index,p=e._ptr,d=[],h=0;h{var{typed:e,matrix:t,flatten:n,size:r}=e;return e(Ws,{"...Array":i,"...Matrix":function(e){return t(i(e.map(e=>e.toArray())))}});function i(e){if(0===e.length)throw new TypeError("At least one column is needed to construct a matrix.");for(var t,r=o(e[0]),i=[],a=0;a{var{typed:e,config:t,numeric:n,smaller:r}=e;return e("min",{"Array | Matrix":o,"Array | Matrix, number | BigNumber":function(e,t){return pr(e,t.valueOf(),i)},"...":function(e){if(cr(e))throw new TypeError("Scalar values expected in function min");return o(e)}});function i(e,t){try{return r(e,t)?e:t}catch(e){throw Ga(e,"min",t)}}function o(e){var i;if(fr(e,(function(t){try{isNaN(t)&&"number"==typeof t?i=NaN:void 0!==i&&!r(t,i)||(i=t)}catch(e){throw Ga(e,"min",t)}})),void 0===i)throw new Error("Cannot calculate min of an empty array");return i="string"==typeof i?n(i,t.number):i}}),Zs=tt("mode",["typed","isNaN","isNumeric"],e=>{var{typed:e,isNaN:t,isNumeric:n}=e;return e("mode",{"Array | Matrix":r,"...":r});function r(e){if(0===(e=We(e.valueOf())).length)throw new Error("Cannot calculate mode of an empty array");for(var r={},i=[],o=0,a=0;a{var{typed:e,Complex:t}=e,n=[function(e){return new t(e,0)},function(e){return new t(0,e)},function(e){return new t(-e,0)},function(e){return new t(0,-e)}];function r(e,r){if(r<0)throw new Error("Root must be greater than zero");if(0===r)throw new Error("Root must be non-zero");if(r%1!=0)throw new Error("Root must be an integer");if(0===e||0===e.abs())return[new t(0,0)];for(var i,o="number"==typeof e,a=(!o&&0!==e.re&&0!==e.im||(i=o?2*(e<0):0===e.im?2*(e.re<0):2*(e.im<0)+1),e.arg()),s=(o=e.abs(),[]),u=Math.pow(o,1/r),c=0;c{var{typed:e,config:t,matrix:n,BigNumber:r}=e;return e("ones",{"":function(){return"Array"===t.matrix?i([]):i([],"default")},"...number | BigNumber | string":function(e){var n;return"string"==typeof e[e.length-1]?(n=e.pop(),i(e,n)):"Array"===t.matrix?i(e):i(e,"default")},Array:i,Matrix:function(e){var t=e.storage();return i(e.valueOf(),t)},"Array | Matrix, string":function(e,t){return i(e.valueOf(),t)}});function i(e,t){i=!1,e.forEach((function(e,t,n){s(e)&&(i=!0,n[t]=e.toNumber())}));var i,o=i?new r(1):1;return e.forEach((function(e){if("number"!=typeof e||!oe(e)||e<0)throw new Error("Parameters in function ones must be positive integers")})),t?(t=n(t),0{var{typed:e,isNumeric:t,isNaN:n,compare:r}=e,i=r,o=(e,t)=>-r(e,t);return e(Js,{"Array | Matrix, number":function(e,t){return a(e,t,i)},"Array | Matrix, number, string":function(e,t,n){if("asc"===n)return a(e,t,i);if("desc"===n)return a(e,t,o);throw new Error('Compare string must be "asc" or "desc"')},"Array | Matrix, number, function":a});function a(e,t,n){if(!oe(t)||t<0)throw new Error("k must be a non-negative integer");if(d(e)){if(1=e.length)throw new Error("k out of bounds");for(var o=0;o{var{config:t,matrix:n}=e;return function(e,r,i){if(2!==arguments.length&&3!==arguments.length)throw new Ks("resize",arguments.length,2,3);if(s((r=d(r)?r.valueOf():r)[0])&&(r=r.map((function(e){return s(e)?e.toNumber():e}))),d(e))return e.resize(r,i,!0);if("string"==typeof e){var o=e,a=r,u=i;if(void 0!==u){if("string"!=typeof u||1!==u.length)throw new TypeError("Single character expected as defaultValue")}else u=" ";if(1!==a.length)throw new Re(a.length,1);var c=a[0];if("number"!=typeof c||!oe(c))throw new TypeError("Invalid size, must contain positive integers (size: "+Ce(a)+")");if(o.length>c)return o.substring(0,c);if(o.length{var{typed:e,matrix:t,equalScalar:n,zeros:r,DenseMatrix:i}=e,o=za({typed:e}),a=Oa({typed:e,equalScalar:n}),s=Ls({typed:e,equalScalar:n}),u=os({typed:e,DenseMatrix:i}),c=ka({typed:e,equalScalar:n}),f=Ra({typed:e}),l=ja({typed:e});return e(tu,{"number, number":Si,"BigNumber, BigNumber":gi,"SparseMatrix, SparseMatrix":function(e,t){return s(e,t,this,!1)},"SparseMatrix, DenseMatrix":function(e,t){return a(t,e,this,!0)},"DenseMatrix, SparseMatrix":function(e,t){return o(e,t,this,!1)},"DenseMatrix, DenseMatrix":function(e,t){return f(e,t,this)},"Array, Array":function(e,n){return this(t(e),t(n)).valueOf()},"Array, Matrix":function(e,n){return this(t(e),n)},"Matrix, Array":function(e,n){return this(e,t(n))},"SparseMatrix, number | BigNumber":function(e,t){return n(t,0)?e.clone():c(e,t,this,!1)},"DenseMatrix, number | BigNumber":function(e,t){return n(t,0)?e.clone():l(e,t,this,!1)},"number | BigNumber, SparseMatrix":function(e,t){return n(e,0)?r(t.size(),t.storage()):u(t,e,this,!0)},"number | BigNumber, DenseMatrix":function(e,t){return n(e,0)?r(t.size(),t.storage()):l(t,e,this,!0)},"Array, number | BigNumber":function(e,n){return this(t(e),n).valueOf()},"number | BigNumber, Array":function(e,n){return this(e,t(n)).valueOf()}})}),ru="Number of decimals in function round must be an integer",iu=tt("round",["typed","matrix","equalScalar","zeros","BigNumber","DenseMatrix"],e=>{var{typed:e,matrix:t,equalScalar:n,zeros:r,BigNumber:i,DenseMatrix:o}=e,a=ka({typed:e,equalScalar:n}),s=Ia({typed:e,DenseMatrix:o}),u=ja({typed:e});return e("round",{number:jr,"number, number":jr,"number, BigNumber":function(e,t){if(t.isInteger())return new i(e).toDecimalPlaces(t.toNumber());throw new TypeError(ru)},Complex:function(e){return e.round()},"Complex, number":function(e,t){if(t%1)throw new TypeError(ru);return e.round(t)},"Complex, BigNumber":function(e,t){if(t.isInteger())return t=t.toNumber(),e.round(t);throw new TypeError(ru)},BigNumber:function(e){return e.toDecimalPlaces(0)},"BigNumber, BigNumber":function(e,t){if(t.isInteger())return e.toDecimalPlaces(t.toNumber());throw new TypeError(ru)},Fraction:function(e){return e.round()},"Fraction, number":function(e,t){if(t%1)throw new TypeError(ru);return e.round(t)},"Fraction, BigNumber":function(e,t){if(t.isInteger())return e.round(t.toNumber());throw new TypeError(ru)},"Array | Matrix":function(e){return lr(e,this,!0)},"SparseMatrix, number | BigNumber":function(e,t){return a(e,t,this,!1)},"DenseMatrix, number | BigNumber":function(e,t){return u(e,t,this,!1)},"Array, number | BigNumber":function(e,n){return u(t(e),n,this,!1).valueOf()},"number | Complex | BigNumber | Fraction, SparseMatrix":function(e,t){return n(e,0)?r(t.size(),t.storage()):s(t,e,this,!0)},"number | Complex | BigNumber | Fraction, DenseMatrix":function(e,t){return n(e,0)?r(t.size(),t.storage()):u(t,e,this,!0)},"number | Complex | BigNumber | Fraction, Array":function(e,n){return u(t(n),e,this,!0).valueOf()}})}),ou="smallerEq",au=tt(ou,["typed","config","matrix","DenseMatrix"],e=>{var{typed:e,config:t,matrix:n,DenseMatrix:r}=e,i=Ca({typed:e}),o=Xa({typed:e,DenseMatrix:r}),a=Ia({typed:e,DenseMatrix:r}),s=Ra({typed:e}),u=ja({typed:e});return e(ou,{"boolean, boolean":function(e,t){return e<=t},"number, number":function(e,n){return e<=n||xe(e,n,t.epsilon)},"BigNumber, BigNumber":function(e,n){return e.lte(n)||Pi(e,n,t.epsilon)},"Fraction, Fraction":function(e,t){return 1!==e.compare(t)},"Complex, Complex":function(){throw new TypeError("No ordering relation is defined for complex numbers")},"Unit, Unit":function(e,t){if(e.equalBase(t))return this(e.value,t.value);throw new Error("Cannot compare units with different base")},"SparseMatrix, SparseMatrix":function(e,t){return o(e,t,this)},"SparseMatrix, DenseMatrix":function(e,t){return i(t,e,this,!0)},"DenseMatrix, SparseMatrix":function(e,t){return i(e,t,this,!1)},"DenseMatrix, DenseMatrix":function(e,t){return s(e,t,this)},"Array, Array":function(e,t){return this(n(e),n(t)).valueOf()},"Array, Matrix":function(e,t){return this(n(e),t)},"Matrix, Array":function(e,t){return this(e,n(t))},"SparseMatrix, any":function(e,t){return a(e,t,this,!1)},"DenseMatrix, any":function(e,t){return u(e,t,this,!1)},"any, SparseMatrix":function(e,t){return a(t,e,this,!0)},"any, DenseMatrix":function(e,t){return u(t,e,this,!0)},"Array, any":function(e,t){return u(n(e),t,this,!1).valueOf()},"any, Array":function(e,t){return u(n(t),e,this,!0).valueOf()}})}),su="unequal",uu=tt(su,["typed","config","equalScalar","matrix","DenseMatrix"],e=>{var{typed:e,equalScalar:t,matrix:n,DenseMatrix:r}=e,i=Ca({typed:e}),o=Xa({typed:e,DenseMatrix:r}),a=Ia({typed:e,DenseMatrix:r}),s=Ra({typed:e}),u=ja({typed:e});return e("unequal",{"any, any":function(e,t){return null===e?null!==t:null===t?null!==e:void 0===e?void 0!==t:void 0===t?void 0!==e:c(e,t)},"SparseMatrix, SparseMatrix":function(e,t){return o(e,t,c)},"SparseMatrix, DenseMatrix":function(e,t){return i(t,e,c,!0)},"DenseMatrix, SparseMatrix":function(e,t){return i(e,t,c,!1)},"DenseMatrix, DenseMatrix":function(e,t){return s(e,t,c)},"Array, Array":function(e,t){return this(n(e),n(t)).valueOf()},"Array, Matrix":function(e,t){return this(n(e),t)},"Matrix, Array":function(e,t){return this(e,n(t))},"SparseMatrix, any":function(e,t){return a(e,t,c,!1)},"DenseMatrix, any":function(e,t){return u(e,t,c,!1)},"any, SparseMatrix":function(e,t){return a(t,e,c,!0)},"any, DenseMatrix":function(e,t){return u(t,e,c,!0)},"Array, any":function(e,t){return u(n(e),t,c,!1).valueOf()},"any, Array":function(e,t){return u(n(t),e,c,!0).valueOf()}});function c(e,n){return!t(e,n)}}),cu=(tt(su,["typed","equalScalar"],e=>{var{typed:e,equalScalar:t}=e;return e(su,{"any, any":function(e,n){return null===e?null!==n:null===n?null!==e:void 0===e?void 0!==n:void 0===n?void 0!==e:!t(e,n)}})}),tt("usolve",["typed","matrix","divideScalar","multiplyScalar","subtract","equalScalar","DenseMatrix"],e=>{var{typed:e,matrix:t,divideScalar:n,multiplyScalar:r,subtract:i,equalScalar:o,DenseMatrix:a}=e,s=$s({DenseMatrix:a});return e("usolve",{"SparseMatrix, Array | Matrix":function(e,t){for(var u=(t=s(e,t=t,!0))._data,c=(t=e._size[0],e._size[1]),f=e._values,l=e._index,p=e._ptr,d=[],h=c-1;0<=h;h--){var m=u[h][0]||0;if(o(m,0))d[h]=[0];else{for(var y=0,g=[],v=[],b=p[h],x=p[h+1]-1;b<=x;x--){var w=l[x];w===h?y=f[x]:w{var{typed:e,matrix:t,DenseMatrix:n}=e,r=Ca({typed:e}),i=Xa({typed:e,DenseMatrix:n}),o=Ia({typed:e,DenseMatrix:n}),a=Ra({typed:e}),s=ja({typed:e});return e("xor",{"number, number":Co,"Complex, Complex":function(e,t){return(0!==e.re||0!==e.im)!=(0!==t.re||0!==t.im)},"BigNumber, BigNumber":function(e,t){return(!e.isZero()&&!e.isNaN())!=(!t.isZero()&&!t.isNaN())},"Unit, Unit":function(e,t){return this(e.value||0,t.value||0)},"SparseMatrix, SparseMatrix":function(e,t){return i(e,t,this)},"SparseMatrix, DenseMatrix":function(e,t){return r(t,e,this,!0)},"DenseMatrix, SparseMatrix":function(e,t){return r(e,t,this,!1)},"DenseMatrix, DenseMatrix":function(e,t){return a(e,t,this)},"Array, Array":function(e,n){return this(t(e),t(n)).valueOf()},"Array, Matrix":function(e,n){return this(t(e),n)},"Matrix, Array":function(e,n){return this(e,t(n))},"SparseMatrix, any":function(e,t){return o(e,t,this,!1)},"DenseMatrix, any":function(e,t){return s(e,t,this,!1)},"any, SparseMatrix":function(e,t){return o(t,e,this,!0)},"any, DenseMatrix":function(e,t){return s(t,e,this,!0)},"Array, any":function(e,n){return s(t(e),n,this,!1).valueOf()},"any, Array":function(e,n){return s(t(n),e,this,!0).valueOf()}})}),lu=tt("add",["typed","matrix","addScalar","equalScalar","DenseMatrix","SparseMatrix"],e=>{var{typed:e,matrix:t,addScalar:n,equalScalar:r,DenseMatrix:i}=e,o=za({typed:e}),a=ks({typed:e,equalScalar:r}),s=os({typed:e,DenseMatrix:i}),u=Ra({typed:e}),c=ja({typed:e});return e("add",V({"DenseMatrix, DenseMatrix":function(e,t){return u(e,t,n)},"DenseMatrix, SparseMatrix":function(e,t){return o(e,t,n,!1)},"SparseMatrix, DenseMatrix":function(e,t){return o(t,e,n,!0)},"SparseMatrix, SparseMatrix":function(e,t){return a(e,t,n)},"Array, Array":function(e,n){return this(t(e),t(n)).valueOf()},"Array, Matrix":function(e,n){return this(t(e),n)},"Matrix, Array":function(e,n){return this(e,t(n))},"DenseMatrix, any":function(e,t){return c(e,t,n,!1)},"SparseMatrix, any":function(e,t){return s(e,t,n,!1)},"any, DenseMatrix":function(e,t){return c(t,e,n,!0)},"any, SparseMatrix":function(e,t){return s(t,e,n,!0)},"Array, any":function(e,r){return c(t(e),r,n,!1).valueOf()},"any, Array":function(e,r){return c(t(r),e,n,!0).valueOf()},"any, any":n,"any, any, ...any":function(e,t,n){for(var r=this(e,t),i=0;i{var{typed:t,equalScalar:n}=e;return function(e,r,i){var o=e._values,a=e._index,s=e._ptr,u=e._size,c=e._datatype,f=r._values,l=r._index,p=r._ptr,d=r._size;r=r._datatype;if(u.length!==d.length)throw new Re(u.length,d.length);if(u[0]!==d[0]||u[1]!==d[1])throw new RangeError("Dimension mismatch. Matrix A ("+u+") must match Matrix B ("+d+")");d=u[0];for(var h,m,y,g,v=u[1],b=n,x=0,w=i,N=("string"==typeof c&&c===r&&(b=t.find(n,[h=c,h]),x=t.convert(0,h),w=t.find(i,[h,h])),o&&f?[]:void 0),S=[],_=[],D=N?[]:void 0,M=[],E=0;E{var{typed:e,matrix:t,equalScalar:n,BigNumber:r,DenseMatrix:i}=e,o=Oa({typed:e,equalScalar:n}),a=Ca({typed:e}),s=pu({typed:e,equalScalar:n}),u=ka({typed:e,equalScalar:n}),c=Ia({typed:e,DenseMatrix:i}),f=Ra({typed:e}),l=ja({typed:e});return e("atan2",{"number, number":Math.atan2,"BigNumber, BigNumber":function(e,t){return r.atan2(e,t)},"SparseMatrix, SparseMatrix":function(e,t){return s(e,t,this,!1)},"SparseMatrix, DenseMatrix":function(e,t){return o(t,e,this,!0)},"DenseMatrix, SparseMatrix":function(e,t){return a(e,t,this,!1)},"DenseMatrix, DenseMatrix":function(e,t){return f(e,t,this)},"Array, Array":function(e,n){return this(t(e),t(n)).valueOf()},"Array, Matrix":function(e,n){return this(t(e),n)},"Matrix, Array":function(e,n){return this(e,t(n))},"SparseMatrix, number | BigNumber":function(e,t){return u(e,t,this,!1)},"DenseMatrix, number | BigNumber":function(e,t){return l(e,t,this,!1)},"number | BigNumber, SparseMatrix":function(e,t){return c(t,e,this,!0)},"number | BigNumber, DenseMatrix":function(e,t){return l(t,e,this,!0)},"Array, number | BigNumber":function(e,n){return l(t(e),n,this,!1).valueOf()},"number | BigNumber, Array":function(e,n){return l(t(n),e,this,!0).valueOf()}})}),hu=tt("bitOr",["typed","matrix","equalScalar","DenseMatrix"],e=>{var{typed:e,matrix:t,equalScalar:n,DenseMatrix:r}=e,i=za({typed:e}),o=ks({typed:e,equalScalar:n}),a=os({typed:e,DenseMatrix:r}),s=Ra({typed:e}),u=ja({typed:e});return e("bitOr",{"number, number":xi,"BigNumber, BigNumber":pi,"SparseMatrix, SparseMatrix":function(e,t){return o(e,t,this)},"SparseMatrix, DenseMatrix":function(e,t){return i(t,e,this,!0)},"DenseMatrix, SparseMatrix":function(e,t){return i(e,t,this,!1)},"DenseMatrix, DenseMatrix":function(e,t){return s(e,t,this)},"Array, Array":function(e,n){return this(t(e),t(n)).valueOf()},"Array, Matrix":function(e,n){return this(t(e),n)},"Matrix, Array":function(e,n){return this(e,t(n))},"SparseMatrix, any":function(e,t){return a(e,t,this,!1)},"DenseMatrix, any":function(e,t){return u(e,t,this,!1)},"any, SparseMatrix":function(e,t){return a(t,e,this,!0)},"any, DenseMatrix":function(e,t){return u(t,e,this,!0)},"Array, any":function(e,n){return u(t(e),n,this,!1).valueOf()},"any, Array":function(e,n){return u(t(n),e,this,!0).valueOf()}})}),mu=tt("catalan",["typed","addScalar","divideScalar","multiplyScalar","combinations","isNegative","isInteger"],e=>{var{typed:e,addScalar:t,divideScalar:n,multiplyScalar:r,combinations:i,isNegative:o,isInteger:a}=e;return e("catalan",{"number | BigNumber":function(e){if(!a(e)||o(e))throw new TypeError("Non-negative integer value expected in function catalan");return n(i(r(e,2),e),t(e,1))}})}),yu=(mr=n("e975"),n.n(mr)),gu="compareNatural",vu=tt(gu,["typed","compare"],e=>{var{typed:e,compare:t}=e,n=t.signatures["boolean,boolean"];return e(gu,{"any, any":function(e,i){var o,a=H(e),s=H(i);if(!("number"!==a&&"BigNumber"!==a&&"Fraction"!==a||"number"!==s&&"BigNumber"!==s&&"Fraction"!==s))return"0"!==(o=t(e,i)).toString()?0o.re?1:s.reo.im?1:s.imn.length?1:t.length{var{typed:e,add:t,unaryPlus:n}=e;return e(bu,{Array:r,Matrix:function(e){return e.create(r(e.valueOf()))},"Array, number | BigNumber":o,"Matrix, number | BigNumber":function(e,t){return e.create(o(e.valueOf(),t))},"...":function(e){if(cr(e))throw new TypeError("All values expected to be scalar in function cumsum");return r(e)}});function r(e){try{return i(e)}catch(e){throw Ga(e,bu)}}function i(e){if(0===e.length)return[];for(var r=[n(e[0])],i=1;i=n.length)throw new je(t,n.length);try{return function e(t,n){var r,o,a;if(n<=0){var s=t[0][0];if(Array.isArray(s)){for(a=ur(t),o=[],r=0;r{var{typed:e,equal:t}=e;return e("deepEqual",{"any, any":function(e,n){return function e(n,r){if(Array.isArray(n)){if(Array.isArray(r)){var i=n.length;if(i!==r.length)return!1;for(var o=0;o{var{typed:e,matrix:t,subtract:n,number:r}=e;return e("diff",{"Array | Matrix":function(e){return d(e)?t(o(e.toArray())):o(e)},"Array | Matrix, number":function(e,n){if(oe(n))return d(e)?t(i(e.toArray(),n)):i(e,n);throw new RangeError("Dimension must be a whole number")},"Array | Matrix, BigNumber":function(e,t){return this(e,r(t))}});function i(e,t){if(d(e)&&(e=e.toArray()),!Array.isArray(e))throw RangeError("Array/Matrix does not have that many dimensions");var n;if(0{n.push(i(e,t-1))}),n;if(0===t)return o(e);throw RangeError("Cannot have negative dimension")}function o(e){var t=[],n=e.length;if(n<2)return e;for(var r=1;r{var{typed:t,addScalar:n,multiplyScalar:r,conj:i,size:o}=e;return t("dot",{"Array | DenseMatrix, Array | DenseMatrix":function(e,o){var u=a(e,o),c=d(e)?e._data:e,f=d(e)?e._datatype:void 0,l=d(o)?o._data:o,p=d(o)?o._datatype:void 0,h=(e=2===s(e).length,o=2===s(o).length,n),m=r;if(f&&p&&f===p&&"string"==typeof f&&(p=f,h=t.find(n,[p,p]),m=t.find(r,[p,p])),!e&&!o){for(var y=m(i(c[0]),l[0]),g=1;g{var{typed:e,compareText:t,isZero:n}=e;return e("equalText",{"any, any":function(e,r){return n(t(e,r))}})}),Du=(r=["typed","config","round","matrix","equalScalar","zeros","DenseMatrix"],tt("floor",["typed","config","round"],e=>{var{typed:e,config:t,round:n}=e;return e("floor",{number:function(e){return xe(e,n(e),t.epsilon)?n(e):Math.floor(e)},"number, number":function(e,r){var i,o;return xe(e,n(e,r),t.epsilon)?n(e,r):([e,i]="".concat(e,"e").split("e"),o=Math.floor(Number("".concat(e,"e").concat(Number(i)+r))),[e,i]="".concat(o,"e").split("e"),Number("".concat(e,"e").concat(Number(i)-r)))}})})),Mu=tt("floor",r,e=>{var{typed:e,config:t,round:n,matrix:r,equalScalar:i,zeros:o,DenseMatrix:a}=e,s=ka({typed:e,equalScalar:i}),u=Ia({typed:e,DenseMatrix:a}),c=ja({typed:e}),a=Du({typed:e,config:t,round:n});return e("floor",{number:a.signatures.number,"number,number":a.signatures["number,number"],Complex:function(e){return e.floor()},"Complex, number":function(e,t){return e.floor(t)},"Complex, BigNumber":function(e,t){return e.floor(t.toNumber())},BigNumber:function(e){return Pi(e,n(e),t.epsilon)?n(e):e.floor()},"BigNumber, BigNumber":function(e,r){return Pi(e,n(e,r),t.epsilon)?n(e,r):e.toDecimalPlaces(r.toNumber(),ie.a.ROUND_FLOOR)},Fraction:function(e){return e.floor()},"Fraction, number":function(e,t){return e.floor(t)},"Fraction, BigNumber":function(e,t){return e.floor(t.toNumber())},"Array | Matrix":function(e){return lr(e,this,!0)},"Array, number | BigNumber":function(e,t){return lr(e,e=>this(e,t),!0)},"SparseMatrix, number | BigNumber":function(e,t){return s(e,t,this,!1)},"DenseMatrix, number | BigNumber":function(e,t){return c(e,t,this,!1)},"number | Complex | Fraction | BigNumber, Array":function(e,t){return c(r(t),e,this,!0).valueOf()},"number | Complex | Fraction | BigNumber, Matrix":function(e,t){return i(e,0)?o(t.size(),t.storage()):("dense"===t.storage()?c:u)(t,e,this,!0)}})}),Eu=tt("identity",["typed","config","matrix","BigNumber","DenseMatrix","SparseMatrix"],e=>{var{typed:e,config:t,matrix:n,BigNumber:r,DenseMatrix:i,SparseMatrix:o}=e;return e("identity",{"":function(){return"Matrix"===t.matrix?n([]):[]},string:function(e){return n(e)},"number | BigNumber":function(e){return u(e,e,"Matrix"===t.matrix?"dense":void 0)},"number | BigNumber, string":function(e,t){return u(e,e,t)},"number | BigNumber, number | BigNumber":function(e,n){return u(e,n,"Matrix"===t.matrix?"dense":void 0)},"number | BigNumber, number | BigNumber, string":u,Array:function(e){return a(e)},"Array, string":a,Matrix:function(e){return a(e.valueOf(),e.storage())},"Matrix, string":function(e,t){return a(e.valueOf(),t)}});function a(e,t){switch(e.length){case 0:return t?n(t):[];case 1:return u(e[0],e[0],t);case 2:return u(e[0],e[1],t);default:throw new Error("Vector containing two values expected")}}function u(e,t,n){var a=s(e)||s(t)?r:null;if(s(e)&&(e=e.toNumber()),s(t)&&(t=t.toNumber()),!oe(e)||e<1)throw new Error("Parameters in function identity must be positive integers");if(!oe(t)||t<1)throw new Error("Parameters in function identity must be positive integers");var u=a?new r(1):1,c=(a=a?new a(0):0,[e,t]);if(n){if("sparse"===n)return o.diagonal(c,u,0,a);if("dense"===n)return i.diagonal(c,u,0,a);throw new TypeError('Unknown matrix type "'.concat(n,'"'))}for(var f=Pe([],c,a),l=e{var{typed:e,BigNumber:t,xgcd:n,equal:r,smaller:i,mod:o,add:a,isInteger:s}=e;return e("invmod",{"number, number":u,"BigNumber, BigNumber":u});function u(e,u){if(!s(e)||!s(u))throw new Error("Parameters in function invmod must be integer numbers");if(e=o(e,u),r(u,0))throw new Error("Divisor must be non zero");var[e,c]=n(e,u).valueOf();return r(e,t(1))?(c=o(c,u),i(c,t(0))?a(c,u):c):NaN}}),Ou="larger",Cu=tt(Ou,["typed","config","matrix","DenseMatrix"],e=>{var{typed:e,config:t,matrix:n,DenseMatrix:r}=e,i=Ca({typed:e}),o=Xa({typed:e,DenseMatrix:r}),a=Ia({typed:e,DenseMatrix:r}),s=Ra({typed:e}),u=ja({typed:e});return e(Ou,{"boolean, boolean":function(e,t){return t{var{typed:e,config:t,divideScalar:n,Complex:r}=e;return e("log",{number:function(e){return 0<=e||t.predictable?(n=e,i?Math.log(n)/Math.log(i):Math.log(n)):new r(e,0).log();var n,i},Complex:function(e){return e.log()},BigNumber:function(e){return!e.isNegative()||t.predictable?e.ln():new r(e.toNumber(),0).log()},"Array | Matrix":function(e){return lr(e,this)},"any, any":function(e,t){return n(this(e),this(t))}})}),ku=tt("lsolveAll",["typed","matrix","divideScalar","multiplyScalar","subtract","equalScalar","DenseMatrix"],e=>{var{typed:e,matrix:t,divideScalar:n,multiplyScalar:r,subtract:i,equalScalar:o,DenseMatrix:a}=e,s=$s({DenseMatrix:a});return e("lsolveAll",{"SparseMatrix, Array | Matrix":function(e,t){for(var u=[s(e,t,!0)._data.map(e=>e[0])],c=e._size[0],f=e._size[1],l=e._values,p=e._index,d=e._ptr,h=0;hnew a({data:e.map(e=>[e]),size:[c,1]}))},"DenseMatrix, Array | Matrix":u,"Array, Array | Matrix":function(e,n){return u(t(e),n).map(e=>e.valueOf())}});function u(e,t){for(var u=[s(e,t,!0)._data.map(e=>e[0])],c=e._data,f=e._size[0],l=e._size[1],p=0;pnew a({data:e.map(e=>[e]),size:[f,1]}))}}),Iu="matrixFromRows",Ru=tt(Iu,["typed","matrix","flatten","size"],e=>{var{typed:e,matrix:t,flatten:n,size:r}=e;return e(Iu,{"...Array":i,"...Matrix":function(e){return t(i(e.map(e=>e.toArray())))}});function i(e){if(0===e.length)throw new TypeError("At least one row is needed to construct a matrix.");var t,r=o(e[0]),i=[];for(t of e){var a=o(t);if(a!==r)throw new TypeError("The vectors had different length: "+(0|r)+" ≠ "+(0|a));i.push(n(t))}return i}function o(e){if(e=r(e),1===e.length)return e[0];if(2!==e.length)throw new TypeError("Only one- or two-dimensional vectors are supported.");if(1===e[0])return e[1];if(1===e[1])return e[0];throw new TypeError("At least one of the arguments is not a vector.")}}),ju=tt("multiply",["typed","matrix","addScalar","multiplyScalar","equalScalar","dot"],e=>{var{typed:t,matrix:n,addScalar:r,multiplyScalar:i,equalScalar:o,dot:a}=e,s=ka({typed:t,equalScalar:o}),u=ja({typed:t});function c(e,t){switch(e.length){case 1:switch(t.length){case 1:if(e[0]!==t[0])throw new RangeError("Dimension mismatch in multiplication. Vectors must have the same length");break;case 2:if(e[0]!==t[0])throw new RangeError("Dimension mismatch in multiplication. Vector length ("+e[0]+") must match Matrix rows ("+t[0]+")");break;default:throw new Error("Can only multiply a 1 or 2 dimensional matrix (Matrix B has "+t.length+" dimensions)")}break;case 2:switch(t.length){case 1:if(e[1]!==t[0])throw new RangeError("Dimension mismatch in multiplication. Matrix columns ("+e[1]+") must match Vector length ("+t[0]+")");break;case 2:if(e[1]!==t[0])throw new RangeError("Dimension mismatch in multiplication. Matrix A columns ("+e[1]+") must match Matrix B rows ("+t[0]+")");break;default:throw new Error("Can only multiply a 1 or 2 dimensional matrix (Matrix B has "+t.length+" dimensions)")}break;default:throw new Error("Can only multiply a 1 or 2 dimensional matrix (Matrix A has "+e.length+" dimensions)")}}function f(e,n){if("dense"!==n.storage())throw new Error("Support for SparseMatrix not implemented");var o,a=e._data,s=e._size,u=e._datatype,c=n._data,f=n._size,l=(n=n._datatype,s[0]),p=f[1],d=r,h=i;u&&n&&u===n&&"string"==typeof u&&(o=u,d=t.find(r,[o,o]),h=t.find(i,[o,o]));for(var m=[],y=0;y{var{typed:e,matrix:t,zeros:n,identity:r,isZero:o,equal:a,sign:s,sqrt:u,conj:c,unaryMinus:f,addScalar:l,divideScalar:p,multiplyScalar:d,subtract:h,complex:m}=e;return i()(e("qr",{DenseMatrix:g,SparseMatrix:function(e){throw new Error("qr not implemented for sparse matrices yet")},Array:function(e){return e=g(t(e)),{Q:e.Q.valueOf(),R:e.R.valueOf()}}}),{_denseQRimpl:y});function y(e){for(var t=e._size[0],i=e._size[1],m=r([t],"dense"),y=m._data,g=(e=e.clone(),e._data),v=n([t],""),b=0;b{var{typed:e,config:t,matrix:n,bignumber:r,smaller:i,smallerEq:o,larger:a,largerEq:s}=e;return e("range",{string:c,"string, boolean":c,"number, number":function(e,t){return u(f(e,t,1))},"number, number, number":function(e,t,n){return u(f(e,t,n))},"number, number, boolean":function(e,t,n){return u((n?l:f)(e,t,1))},"number, number, number, boolean":function(e,t,n,r){return u((r?l:f)(e,t,n))},"BigNumber, BigNumber":function(e,t){return u(p(e,t,new e.constructor(1)))},"BigNumber, BigNumber, BigNumber":function(e,t,n){return u(p(e,t,n))},"BigNumber, BigNumber, boolean":function(e,t,n){var r=e.constructor;return u((n?d:p)(e,t,new r(1)))},"BigNumber, BigNumber, BigNumber, boolean":function(e,t,n,r){return u((r?d:p)(e,t,n))}});function u(e){return"Matrix"===t.matrix?n?n(e):$a():e}function c(e,n){var i=function(e){var t=e.split(":").map((function(e){return Number(e)}));if(t.some((function(e){return isNaN(e)})))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}}(e);if(i)return"BigNumber"===t.number?(void 0===r&&La(),u((n?d:p)(r(i.start),r(i.end),r(i.step)))):u((n?l:f)(i.start,i.end,i.step));throw new SyntaxError('String "'+e+'" is no valid range')}function f(e,t,n){var r=[],o=e;if(0{var{typed:e,matrix:t,equalScalar:n,zeros:r,DenseMatrix:i}=e,o=za({typed:e}),a=Oa({typed:e,equalScalar:n}),s=Ls({typed:e,equalScalar:n}),u=os({typed:e,DenseMatrix:i}),c=ka({typed:e,equalScalar:n}),f=Ra({typed:e}),l=ja({typed:e});return e(qu,{"number, number":_i,"SparseMatrix, SparseMatrix":function(e,t){return s(e,t,this,!1)},"SparseMatrix, DenseMatrix":function(e,t){return a(t,e,this,!0)},"DenseMatrix, SparseMatrix":function(e,t){return o(e,t,this,!1)},"DenseMatrix, DenseMatrix":function(e,t){return f(e,t,this)},"Array, Array":function(e,n){return this(t(e),t(n)).valueOf()},"Array, Matrix":function(e,n){return this(t(e),n)},"Matrix, Array":function(e,n){return this(e,t(n))},"SparseMatrix, number | BigNumber":function(e,t){return n(t,0)?e.clone():c(e,t,this,!1)},"DenseMatrix, number | BigNumber":function(e,t){return n(t,0)?e.clone():l(e,t,this,!1)},"number | BigNumber, SparseMatrix":function(e,t){return n(e,0)?r(t.size(),t.storage()):u(t,e,this,!0)},"number | BigNumber, DenseMatrix":function(e,t){return n(e,0)?r(t.size(),t.storage()):l(t,e,this,!0)},"Array, number | BigNumber":function(e,n){return this(t(e),n).valueOf()},"number | BigNumber, Array":function(e,n){return this(e,t(n)).valueOf()}})}),Fu=tt("setSize",["typed","compareNatural"],e=>{var{typed:e,compareNatural:t}=e;return e("setSize",{"Array | Matrix":function(e){return(Array.isArray(e)?We(e):We(e.toArray())).length},"Array | Matrix, boolean":function(e,n){if(!1===n||0===e.length)return(Array.isArray(e)?We(e):We(e.toArray())).length;for(var r=We(Array.isArray(e)?e:e.toArray()).sort(t),i=1,o=1;o{var{add:t,multiply:n,transpose:r}=e;return function(e,a){if(!a||e<=0||3s))for(var h=f[p+1];d=H?j[L+Z]-=ne:0!==j[L+Z]&&(j[L+Z]=j[F+Z]+re);for(D=K;D{var t=e["transpose"];return function(e,n,r,i){if(!e||!n||!r)return null;for(var o,a,s,u,c,f=e._size,l=f[0],p=f[1],d=4*p+(i?p+l+1:0),h=[],m=p,y=2*p,g=3*p,v=4*p,b=5*p+1,x=0;x{var{add:e,multiply:t,transpose:n}=e,r=Uu({add:e,multiply:t,transpose:n}),i=$u({transpose:n});return function(e,t,n){var o,a=t._ptr,s=t._size[1],u={};if(u.q=r(e,t),e&&!u.q)return null;if(n){if(n=e?function(e,t,n,r){for(var i=e._values,o=e._index,a=e._ptr,s=e._size,u=e._datatype,c=s[0],f=s[1],l=r&&e._values?[]:null,p=[],d=[],h=0,m=0;m{var{divideScalar:t,multiply:n,subtract:r}=e;return function(e,i,o,a,s,u,c){for(var f,l,p,d=e._values,h=e._index,m=e._ptr,y=e._size[1],g=i._values,v=i._index,b=i._ptr,x=(e=Vu(e,i,o,a,u),e);x{var{abs:t,divideScalar:n,multiply:r,subtract:e,larger:i,largerEq:o,SparseMatrix:a}=e,s=Zu({divideScalar:n,multiply:r,subtract:e});return function(e,u,c){if(!e)return null;var f,l=e._size[1],p=100,d=100,h=(u&&(f=u.q,p=u.lnz||p,d=u.unz||d),[]),m=[],y=[],g=new a({values:h,index:m,ptr:y,size:[l,l]}),v=[],b=[],x=[],w=(u=new a({values:v,index:b,ptr:x,size:[l,l]}),[]),N=[],S=[];for(M=0;M{var{typed:e,abs:t,add:n,multiply:r,transpose:i,divideScalar:o,subtract:a,larger:s,largerEq:u,SparseMatrix:c}=e,f=Hu({add:n,multiply:r,transpose:i}),l=Yu({abs:t,divideScalar:o,multiply:r,subtract:a,larger:s,largerEq:u,SparseMatrix:c});return e("slu",{"SparseMatrix, number, number":function(e,t,n){if(!oe(t)||t<0||3{var{typed:e,config:t,add:n,numeric:r}=e;return e("sum",{"Array | Matrix":i,"Array | Matrix, number | BigNumber":function(e,t){try{return pr(e,t,n)}catch(e){throw Ga(e,"sum")}},"...":function(e){if(cr(e))throw new TypeError("Scalar values expected in function sum");return i(e)}});function i(e){var i;return fr(e,(function(t){try{i=void 0===i?t:n(i,t)}catch(e){throw Ga(e,"sum",t)}})),i="string"==typeof(i=void 0===i?r(0,t.number):i)?r(i,t.number):i}}),Qu=tt("trace",["typed","matrix","add"],e=>{var{typed:e,matrix:t,add:n}=e;return e("trace",{Array:function(e){return r(t(e))},SparseMatrix:function(e){var t=e._values,r=e._index,i=e._ptr,o=(e=e._size,e[0]),a=e[1];if(o!==a)throw new RangeError("Matrix must be square (size: "+Ce(e)+")");var s=0;if(0{var{typed:e,matrix:t,divideScalar:n,multiplyScalar:r,subtract:i,equalScalar:o,DenseMatrix:a}=e,s=$s({DenseMatrix:a});return e("usolveAll",{"SparseMatrix, Array | Matrix":function(e,t){for(var u=[s(e,t=t,!0)._data.map(e=>e[0])],c=e._size[0],f=(t=e._size[1],e._values),l=e._index,p=e._ptr,d=t-1;0<=d;d--)for(var h=u.length,m=0;mnew a({data:e.map(e=>[e]),size:[c,1]}))},"DenseMatrix, Array | Matrix":u,"Array, Array | Matrix":function(e,n){return u(t(e),n).map(e=>e.valueOf())}});function u(e,t){for(var u=[s(e,t,!0)._data.map(e=>e[0])],c=e._data,f=e._size[0],l=e._size[1]-1;0<=l;l--)for(var p=u.length,d=0;dnew a({data:e.map(e=>[e]),size:[f,1]}))}}),ec=tt("asin",["typed","config","Complex"],e=>{var{typed:e,config:t,Complex:n}=e;return e("asin",{number:function(e){return-1<=e&&e<=1||t.predictable?Math.asin(e):new n(e,0).asin()},Complex:function(e){return e.asin()},BigNumber:function(e){return e.asin()},"Array | Matrix":function(e){return lr(e,this,!0)}})}),tc=(mr=["typed","config","round","matrix","equalScalar","zeros","DenseMatrix"],tt("ceil",["typed","config","round"],e=>{var{typed:e,config:t,round:n}=e;return e("ceil",{number:function(e){return xe(e,n(e),t.epsilon)?n(e):Math.ceil(e)},"number, number":function(e,r){var i,o;return xe(e,n(e,r),t.epsilon)?n(e,r):([e,i]="".concat(e,"e").split("e"),o=Math.ceil(Number("".concat(e,"e").concat(Number(i)+r))),[e,i]="".concat(o,"e").split("e"),Number("".concat(e,"e").concat(Number(i)-r)))}})})),nc=tt("ceil",mr,e=>{var{typed:e,config:t,round:n,matrix:r,equalScalar:i,zeros:o,DenseMatrix:a}=e,s=ka({typed:e,equalScalar:i}),u=Ia({typed:e,DenseMatrix:a}),c=ja({typed:e}),a=tc({typed:e,config:t,round:n});return e("ceil",{number:a.signatures.number,"number,number":a.signatures["number,number"],Complex:function(e){return e.ceil()},"Complex, number":function(e,t){return e.ceil(t)},"Complex, BigNumber":function(e,t){return e.ceil(t.toNumber())},BigNumber:function(e){return Pi(e,n(e),t.epsilon)?n(e):e.ceil()},"BigNumber, BigNumber":function(e,r){return Pi(e,n(e,r),t.epsilon)?n(e,r):e.toDecimalPlaces(r.toNumber(),ie.a.ROUND_CEIL)},Fraction:function(e){return e.ceil()},"Fraction, number":function(e,t){return e.ceil(t)},"Fraction, BigNumber":function(e,t){return e.ceil(t.toNumber())},"Array | Matrix":function(e){return lr(e,this,!0)},"Array, number | BigNumber":function(e,t){return lr(e,e=>this(e,t),!0)},"SparseMatrix, number | BigNumber":function(e,t){return s(e,t,this,!1)},"DenseMatrix, number | BigNumber":function(e,t){return c(e,t,this,!1)},"number | Complex | Fraction | BigNumber, Array":function(e,t){return c(r(t),e,this,!0).valueOf()},"number | Complex | Fraction | BigNumber, Matrix":function(e,t){return i(e,0)?o(t.size(),t.storage()):("dense"===t.storage()?c:u)(t,e,this,!0)}})}),rc="composition",ic=tt(rc,["typed","addScalar","combinations","isNegative","isPositive","isInteger","larger"],e=>{var{typed:e,addScalar:t,combinations:n,isPositive:r,isInteger:i,larger:o}=e;return e(rc,{"number | BigNumber, number | BigNumber":function(e,a){if(!(i(e)&&r(e)&&i(a)&&r(a)))throw new TypeError("Positive integer value expected in function composition");if(o(a,e))throw new TypeError("k must be less than or equal to n in function composition");return n(t(e,-1),t(a,-1))}})}),oc=tt("cross",["typed","matrix","subtract","multiply"],e=>{var{typed:e,matrix:t,subtract:n,multiply:r}=e;return e("cross",{"Matrix, Matrix":function(e,n){return t(i(e.toArray(),n.toArray()))},"Matrix, Array":function(e,n){return t(i(e.toArray(),n))},"Array, Matrix":function(e,n){return t(i(e,n.toArray()))},"Array, Array":i});function i(e,t){var i=Math.max(Be(e).length,Be(t).length),o=(e=$e(e),t=$e(t),Be(e)),a=Be(t);if(1!==o.length||1!==a.length||3!==o[0]||3!==a[0])throw new RangeError("Vectors with length 3 expected (Size A = ["+o.join(", ")+"], B = ["+a.join(", ")+"])");return o=[n(r(e[1],t[2]),r(e[2],t[1])),n(r(e[2],t[0]),r(e[0],t[2])),n(r(e[0],t[1]),r(e[1],t[0]))],1{var{typed:e,matrix:t,subtract:n,multiply:r,divideScalar:i,isZero:o,unaryMinus:a}=e;return e("det",{any:W,"Array | Matrix":function(e){var s=d(e)?e.size():Array.isArray(e)?(e=t(e)).size():[];switch(s.length){case 0:return W(e);case 1:if(1===s[0])return W(e.valueOf()[0]);throw new RangeError("Matrix must be square (size: "+Ce(s)+")");case 2:var u=s[0],c=s[1];if(u!==c)throw new RangeError("Matrix must be square (size: "+Ce(s)+")");var f=e.clone().valueOf(),l=u;if(1===l)return W(f[0][0]);if(2===l)return n(r(f[0][0],f[1][1]),r(f[1][0],f[0][1]));for(var p=!1,h=new Array(l).fill(0).map((e,t)=>t),m=0;m{var{typed:e,addScalar:t,subtract:n,multiplyScalar:r,divideScalar:i,unaryMinus:o,sqrt:a,abs:u}=e;return e("distance",{"Array, Array, Array":function(e,t,a){if(2!==e.length||2!==t.length||2!==a.length)throw new TypeError("Invalid Arguments: Try again");if(!f(e))throw new TypeError("Array with 2 numbers or BigNumbers expected for first argument");if(!f(t))throw new TypeError("Array with 2 numbers or BigNumbers expected for second argument");var s;if(f(a))return a=i(n(a[1],a[0]),n(t[1],t[0])),s=r(r(a,a),t[0]),a=o(r(a,t[0])),t=e[1],m(e[0],e[1],s,a,t);throw new TypeError("Array with 2 numbers or BigNumbers expected for third argument")},"Object, Object, Object":function(e,t,a){if(2!==Object.keys(e).length||2!==Object.keys(t).length||2!==Object.keys(a).length)throw new TypeError("Invalid Arguments: Try again");if(!f(e))throw new TypeError("Values of pointX and pointY should be numbers or BigNumbers");if(!f(t))throw new TypeError("Values of lineOnePtX and lineOnePtY should be numbers or BigNumbers");if(!f(a))throw new TypeError("Values of lineTwoPtX and lineTwoPtY should be numbers or BigNumbers");var s;if("pointX"in e&&"pointY"in e&&"lineOnePtX"in t&&"lineOnePtY"in t&&"lineTwoPtX"in a&&"lineTwoPtY"in a)return a=i(n(a.lineTwoPtY,a.lineTwoPtX),n(t.lineOnePtY,t.lineOnePtX)),s=r(r(a,a),t.lineOnePtX),a=o(r(a,t.lineOnePtX)),t=e.pointX,m(e.pointX,e.pointY,s,a,t);throw new TypeError("Key names do not match")},"Array, Array":function(e,t){if(2===e.length&&3===t.length){if(!f(e))throw new TypeError("Array with 2 numbers or BigNumbers expected for first argument");if(l(t))return m(e[0],e[1],t[0],t[1],t[2]);throw new TypeError("Array with 3 numbers or BigNumbers expected for second argument")}if(3===e.length&&6===t.length){if(!l(e))throw new TypeError("Array with 3 numbers or BigNumbers expected for first argument");if(d(t))return y(e[0],e[1],e[2],t[0],t[1],t[2],t[3],t[4],t[5]);throw new TypeError("Array with 6 numbers or BigNumbers expected for second argument")}if(e.length===t.length&&02!==e.length||!c(e[0])||!c(e[1])))return}else{if(!(3===e[0].length&&c(e[0][0])&&c(e[0][1])&&c(e[0][2])))return;if(e.some(e=>3!==e.length||!c(e[0])||!c(e[1])||!c(e[2])))return}return 1}(e)){for(var t=e,n=[],r=[],i=[],o=0;o{var{typed:e,matrix:t,equalScalar:n,multiplyScalar:r}=e,i=Oa({typed:e,equalScalar:n}),o=pu({typed:e,equalScalar:n}),a=ka({typed:e,equalScalar:n}),s=Ra({typed:e}),u=ja({typed:e});return e(uc,{"any, any":r,"SparseMatrix, SparseMatrix":function(e,t){return o(e,t,r,!1)},"SparseMatrix, DenseMatrix":function(e,t){return i(t,e,r,!0)},"DenseMatrix, SparseMatrix":function(e,t){return i(e,t,r,!1)},"DenseMatrix, DenseMatrix":function(e,t){return s(e,t,r)},"Array, Array":function(e,n){return this(t(e),t(n)).valueOf()},"Array, Matrix":function(e,n){return this(t(e),n)},"Matrix, Array":function(e,n){return this(e,t(n))},"SparseMatrix, any":function(e,t){return a(e,t,r,!1)},"DenseMatrix, any":function(e,t){return u(e,t,r,!1)},"any, SparseMatrix":function(e,t){return a(t,e,r,!0)},"any, DenseMatrix":function(e,t){return u(t,e,r,!0)},"Array, any":function(e,n){return u(t(e),n,r,!1).valueOf()},"any, Array":function(e,n){return u(t(n),e,r,!0).valueOf()}})}),fc=tt("FibonacciHeap",["smaller","larger"],e=>{var{smaller:t,larger:n}=e,r=1/Math.log((1+Math.sqrt(5))/2);function i(){if(!(this instanceof i))throw new SyntaxError("Constructor must be called with the new operator");this._minimum=null,this._size=0}function o(e,t,n){t.left.right=t.right,t.right.left=t.left,n.degree--,n.child===t&&(n.child=t.right),0===n.degree&&(n.child=null),t.left=e,t.right=e.right,((e.right=t).right.left=t).parent=null,t.mark=!1}i.prototype.type="FibonacciHeap",i.prototype.isFibonacciHeap=!0,i.prototype.insert=function(e,n){var r;n={key:e,value:n,degree:0};return this._minimum?(r=this._minimum,n.left=r,n.right=r.right,(r.right=n).right.left=n,t(e,r.key)&&(this._minimum=n)):this._minimum=(n.left=n).right=n,this._size++,n},i.prototype.size=function(){return this._size},i.prototype.clear=function(){this._minimum=null,this._size=0},i.prototype.isEmpty=function(){return 0===this._size},i.prototype.extractMinimum=function(){var e=this._minimum;if(null!==e){for(var i=this._minimum,o=e.degree,s=e.child;0{var{typed:e,ceil:t,floor:n}=e;return e("fix",{number:function(e){return(0{var{typed:e,Complex:t,matrix:n,ceil:r,floor:i,equalScalar:o,zeros:a,DenseMatrix:s}=e,u=Ia({typed:e,DenseMatrix:s}),c=ja({typed:e}),s=lc({typed:e,ceil:r,floor:i});return e("fix",{number:s.signatures.number,"number, number | BigNumber":s.signatures["number,number"],Complex:function(e){return new t(0this(e,t),!0)},"number | Complex | Fraction | BigNumber, Array":function(e,t){return c(n(t),e,this,!0).valueOf()},"number | Complex | Fraction | BigNumber, Matrix":function(e,t){return o(e,0)?a(t.size(),t.storage()):("dense"===t.storage()?c:u)(t,e,this,!0)}})}),dc=tt("ImmutableDenseMatrix",["smaller","DenseMatrix"],e=>{var{smaller:t,DenseMatrix:n}=e;function r(e,t){if(!(this instanceof r))throw new SyntaxError("Constructor must be called with the new operator");if(t&&!l(t))throw new Error("Invalid datatype: "+t);if(d(e)||p(e)){var i=new n(e,t);this._data=i._data,this._size=i._size,this._datatype=i._datatype,this._min=null,this._max=null}else if(e&&p(e.data)&&p(e.size))this._data=e.data,this._size=e.size,this._datatype=e.datatype,this._min=void 0!==e.min?e.min:null,this._max=void 0!==e.max?e.max:null;else{if(e)throw new TypeError("Unsupported type of data ("+H(e)+")");this._data=[],this._size=[0],this._datatype=t,this._min=null,this._max=null}}return(r.prototype=new n).type="ImmutableDenseMatrix",r.prototype.isImmutableDenseMatrix=!0,r.prototype.subset=function(e){switch(arguments.length){case 1:var t=n.prototype.subset.call(this,e);return d(t)?new r({data:t._data,size:t._size,datatype:t._datatype}):t;case 2:case 3:throw new Error("Cannot invoke set subset on an Immutable Matrix instance");default:throw new SyntaxError("Wrong number of arguments")}},r.prototype.set=function(){throw new Error("Cannot invoke set on an Immutable Matrix instance")},r.prototype.resize=function(){throw new Error("Cannot invoke resize on an Immutable Matrix instance")},r.prototype.reshape=function(){throw new Error("Cannot invoke reshape on an Immutable Matrix instance")},r.prototype.clone=function(){return new r({data:W(this._data),size:W(this._size),datatype:this._datatype})},r.prototype.toJSON=function(){return{mathjs:"ImmutableDenseMatrix",data:this._data,size:this._size,datatype:this._datatype}},r.fromJSON=function(e){return new r(e)},r.prototype.swapRows=function(){throw new Error("Cannot invoke swapRows on an Immutable Matrix instance")},r.prototype.min=function(){var e;return null===this._min&&(e=null,this.forEach((function(n){null!==e&&!t(n,e)||(e=n)})),this._min=null!==e?e:void 0),this._min},r.prototype.max=function(){var e;return null===this._max&&(e=null,this.forEach((function(n){null!==e&&!t(e,n)||(e=n)})),this._max=null!==e?e:void 0),this._max},r},{isClass:!0}),hc=tt("Index",["ImmutableDenseMatrix"],e=>{var t=e["ImmutableDenseMatrix"];function n(e){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");this._dimensions=[],this._isScalar=!0;for(var t=0,i=arguments.length;t{var{typed:e,config:t,abs:n,add:r,addScalar:i,matrix:o,multiply:a,multiplyScalar:s,divideScalar:u,subtract:c,smaller:f,equalScalar:l,flatten:p,isZero:d,isNumeric:h}=e;return e("intersect",{"Array, Array, Array":m,"Array, Array, Array, Array":y,"Matrix, Matrix, Matrix":function(e,t,n){return e=m(e.valueOf(),t.valueOf(),n.valueOf()),null===e?null:o(e)},"Matrix, Matrix, Matrix, Matrix":function(e,t,n,r){return e=y(e.valueOf(),t.valueOf(),n.valueOf(),r.valueOf()),null===e?null:o(e)}});function m(e,t,n){if(e=g(e),t=g(t),n=g(n),!b(e))throw new TypeError("Array with 3 numbers or BigNumbers expected for first argument");if(!b(t))throw new TypeError("Array with 3 numbers or BigNumbers expected for second argument");var r,o,a,f,l,p,d,m,y,v;if(4===(r=n).length&&h(r[0])&&h(r[1])&&h(r[2])&&h(r[3]))return r=e[0],o=e[1],e=e[2],a=t[0],f=t[1],t=t[2],l=n[0],p=n[1],d=n[2],n=n[3],m=s(r,l),l=s(a,l),y=s(o,p),p=s(f,p),v=s(e,d),d=s(t,d),n=c(c(c(n,m),y),v),l=c(c(c(i(i(l,p),d),m),y),v),p=u(n,l),d=i(r,s(p,c(a,r))),m=i(o,s(p,c(f,o))),y=i(e,s(p,c(t,e))),[d,m,y];throw new TypeError("Array with 4 numbers expected as third argument")}function y(e,o,p,h){if(e=g(e),o=g(o),p=g(p),h=g(h),2===e.length){if(!v(e))throw new TypeError("Array with 2 numbers or BigNumbers expected for first argument");if(!v(o))throw new TypeError("Array with 2 numbers or BigNumbers expected for second argument");if(!v(p))throw new TypeError("Array with 2 numbers or BigNumbers expected for third argument");if(v(h))return D=p,N=h,_=c(M=e,_=o),N=c(D,N),S=c(s(_[0],N[1]),s(N[0],_[1])),d(S)||f(n(S),t.epsilon)?null:(m=s(N[0],M[1]),y=s(N[1],M[0]),w=s(N[0],D[1]),N=s(N[1],D[0]),D=u(i(c(c(m,y),w),N),S),r(a(_,D),M));throw new TypeError("Array with 2 numbers or BigNumbers expected for fourth argument")}if(3!==e.length)throw new TypeError("Arrays with two or thee dimensional points expected");if(!b(e))throw new TypeError("Array with 3 numbers or BigNumbers expected for first argument");if(!b(o))throw new TypeError("Array with 3 numbers or BigNumbers expected for second argument");if(!b(p))throw new TypeError("Array with 3 numbers or BigNumbers expected for third argument");var m,y,w,N,S,_,D,M,E,A,O,C,T;if(b(h))return m=e[0],y=e[1],w=e[2],N=o[0],S=o[1],_=o[2],D=p[0],M=p[1],e=p[2],o=h[0],p=h[1],h=h[2],E=x(m,D,o,D,y,M,p,M,w,e,h,e),A=x(o,D,N,m,p,M,S,y,h,e,_,w),C=x(m,D,N,m,y,M,S,y,w,e,_,w),O=x(o,D,o,D,p,M,p,M,h,e,h,e),T=x(N,m,N,m,S,y,S,y,_,w,_,w),C=c(s(E,A),s(C,O)),T=c(s(T,O),s(A,A)),!d(T)&&(C=u(C,T),T=u(i(E,s(C,A)),O),E=i(m,s(C,c(N,m))),A=i(y,s(C,c(S,y))),O=i(w,s(C,c(_,w))),N=i(D,s(T,c(o,D))),m=i(M,s(T,c(p,M))),S=i(e,s(T,c(h,e))),l(E,N))&&l(A,m)&&l(O,S)?[E,A,O]:null;throw new TypeError("Array with 3 numbers or BigNumbers expected for fourth argument")}function g(e){return 1===e.length?e[0]:1Array.isArray(e)&&1===e.length)?p(e):e}function v(e){return 2===e.length&&h(e[0])&&h(e[1])}function b(e){return 3===e.length&&h(e[0])&&h(e[1])&&h(e[2])}function x(e,t,n,r,o,a,u,f,l,p,d,h){return e=s(c(e,t),c(n,r)),t=s(c(o,a),c(u,f)),n=s(c(l,p),c(d,h)),i(i(e,t),n)}}),yc=tt("lcm",["typed","matrix","equalScalar"],e=>{var{typed:e,matrix:t,equalScalar:n}=e,r=Oa({typed:e,equalScalar:n}),i=qa({typed:e,equalScalar:n}),o=ka({typed:e,equalScalar:n}),a=Ra({typed:e}),s=ja({typed:e});return e("lcm",{"number, number":Mr,"BigNumber, BigNumber":function(e,t){if(!e.isInt()||!t.isInt())throw new Error("Parameters in function lcm must be integer numbers");if(e.isZero())return e;if(t.isZero())return t;for(var n=e.times(t);!t.isZero();){var r=t;t=e.mod(r),e=r}return n.div(e).abs()},"Fraction, Fraction":function(e,t){return e.lcm(t)},"SparseMatrix, SparseMatrix":function(e,t){return i(e,t,this)},"SparseMatrix, DenseMatrix":function(e,t){return r(t,e,this,!0)},"DenseMatrix, SparseMatrix":function(e,t){return r(e,t,this,!1)},"DenseMatrix, DenseMatrix":function(e,t){return a(e,t,this)},"Array, Array":function(e,n){return this(t(e),t(n)).valueOf()},"Array, Matrix":function(e,n){return this(t(e),n)},"Matrix, Array":function(e,n){return this(e,t(n))},"SparseMatrix, number | BigNumber":function(e,t){return o(e,t,this,!1)},"DenseMatrix, number | BigNumber":function(e,t){return s(e,t,this,!1)},"number | BigNumber, SparseMatrix":function(e,t){return o(t,e,this,!0)},"number | BigNumber, DenseMatrix":function(e,t){return s(t,e,this,!0)},"Array, number | BigNumber":function(e,n){return s(t(e),n,this,!1).valueOf()},"number | BigNumber, Array":function(e,n){return s(t(n),e,this,!0).valueOf()},"Array | Matrix | number | BigNumber, Array | Matrix | number | BigNumber, ...Array | Matrix | number | BigNumber":function(e,t,n){for(var r=this(e,t),i=0;i{var{typed:e,config:t,divideScalar:n,log:r,Complex:i}=e;return e("log1p",{number:function(e){return-1<=e||t.predictable?ce(e):o(new i(e,0))},Complex:o,BigNumber:function(e){var n=e.plus(1);return!n.isNegative()||t.predictable?n.ln():o(new i(e.toNumber(),0))},"Array | Matrix":function(e){return lr(e,this)},"any, any":function(e,t){return n(this(e),r(t))}});function o(e){var t=e.re+1;return new i(Math.log(Math.sqrt(t*t+e.im*e.im)),Math.atan2(e.im,t))}}),vc=tt("max",["typed","config","numeric","larger"],e=>{var{typed:e,config:t,numeric:n,larger:r}=e;return e("max",{"Array | Matrix":o,"Array | Matrix, number | BigNumber":function(e,t){return pr(e,t.valueOf(),i)},"...":function(e){if(cr(e))throw new TypeError("Scalar values expected in function max");return o(e)}});function i(e,t){try{return r(e,t)?e:t}catch(e){throw Ga(e,"max",t)}}function o(e){var i;if(fr(e,(function(t){try{isNaN(t)&&"number"==typeof t?i=NaN:void 0!==i&&!r(t,i)||(i=t)}catch(e){throw Ga(e,"max",t)}})),void 0===i)throw new Error("Cannot calculate max of an empty array");return i="string"==typeof i?n(i,t.number):i}}),bc=tt("quantileSeq",["typed","add","multiply","partitionSelect","compare"],e=>{var{typed:e,add:t,multiply:n,partitionSelect:r,compare:i}=e;function o(e,o,s){var c=We(e);e=c.length;if(0===e)throw new Error("Cannot calculate quantile of an empty sequence");if(a(o)){var f=o*(e-1),l=f%1;if(0==l)return y=s?c[f]:r(c,f),u(y),y;var p=Math.floor(f);if(s)h=c[p],d=c[p+1];else for(var d=r(c,p+1),h=c[p],m=0;m{var{typed:e,Index:t,matrix:n,range:r}=e;return e("row",{"Matrix, number":i,"Array, number":function(e,t){return i(n(W(e)),t).valueOf()}});function i(e,n){if(2!==e.size().length)throw new Error("Only two dimensional matrix is supported");qe(n,e.size()[0]);var i=r(0,e.size()[1]);n=new t(n,i);return e.subset(n)}}),wc="setCartesian",Nc=tt(wc,["typed","size","subset","compareNatural","Index","DenseMatrix"],e=>{var{typed:e,size:t,subset:n,compareNatural:r,Index:i,DenseMatrix:o}=e;return e(wc,{"Array | Matrix, Array | Matrix":function(e,a){var s=[];if(0!==n(t(e),new i(0))&&0!==n(t(a),new i(0)))for(var u=We(Array.isArray(e)?e:e.toArray()).sort(r),c=We(Array.isArray(a)?a:a.toArray()).sort(r),f=(s=[],0);f{var{typed:e,size:t,subset:n,compareNatural:r,Index:i,DenseMatrix:o}=e;return e(Sc,{"Array | Matrix":function(e){if(0===n(t(e),new i(0)))a=[];else{var a,s=We(Array.isArray(e)?e:e.toArray()).sort(r);(a=[]).push(s[0]);for(var u=1;u{var{typed:e,size:t,subset:n,compareNatural:r,Index:i}=e;return e(Dc,{"Array | Matrix, Array | Matrix":function(e,o){if(0!==n(t(e),new i(0))){if(0===n(t(o),new i(0)))return!1;for(var a=Je(We(Array.isArray(e)?e:e.toArray()).sort(r)),s=Je(We(Array.isArray(o)?o:o.toArray()).sort(r)),u=0;u{var{typed:e,size:t,subset:n,compareNatural:r,Index:i}=e;return e(Ec,{"Array | Matrix":function(e){if(0===n(t(e),new i(0)))return[];for(var o=We(Array.isArray(e)?e:e.toArray()).sort(r),a=[],s=0;s.toString(2).length<=o.length;)a.push(function(e,t){for(var n=[],r=0;ru[l+1].length&&(c=u[l],u[l]=u[l+1],u[l+1]=c);return u}})}),Oc=tt("sort",["typed","matrix","compare","compareNatural"],e=>{var{typed:e,matrix:t,compare:n,compareNatural:r}=e,i=n,o=(e,t)=>-n(e,t);return e("sort",{Array:function(e){return s(e),e.sort(i)},Matrix:function(e){return u(e),t(e.toArray().sort(i),e.storage())},"Array, function":function(e,t){return s(e),e.sort(t)},"Matrix, function":function(e,n){return u(e),t(e.toArray().sort(n),e.storage())},"Array, string":function(e,t){return s(e),e.sort(a(t))},"Matrix, string":function(e,n){return u(e),t(e.toArray().sort(a(n)),e.storage())}});function a(e){if("asc"===e)return i;if("desc"===e)return o;if("natural"===e)return r;throw new Error('String "asc", "desc", or "natural" expected')}function s(e){if(1!==Be(e).length)throw new Error("One dimensional array expected")}function u(e){if(1!==e.size().length)throw new Error("One dimensional matrix expected")}}),Cc=tt("column",["typed","Index","matrix","range"],e=>{var{typed:e,Index:t,matrix:n,range:r}=e;return e("column",{"Matrix, number":i,"Array, number":function(e,t){return i(n(W(e)),t).valueOf()}});function i(e,n){if(2!==e.size().length)throw new Error("Only two dimensional matrix is supported");qe(n,e.size()[1]);var i=r(0,e.size()[0]);i=new t(i,n);return e.subset(i)}}),Tc=tt("index",["typed","Index"],e=>{var{typed:e,Index:t}=e;return e("index",{"...number | string | BigNumber | Range | Array | Matrix":function(e){e=e.map((function(e){return s(e)?e.toNumber():Array.isArray(e)||d(e)?e.map((function(e){return s(e)?e.toNumber():e})):e}));var n=new t;return t.apply(n,e),n}})}),kc=tt("inv",["typed","matrix","divideScalar","addScalar","multiply","unaryMinus","det","identity","abs"],e=>{var{typed:e,matrix:t,divideScalar:n,addScalar:r,multiply:i,unaryMinus:o,det:a,identity:s,abs:u}=e;return e("inv",{"Array | Matrix":function(e){var r=d(e)?e.size():Be(e);switch(r.length){case 1:if(1===r[0])return d(e)?t([n(1,e.valueOf()[0])]):[n(1,e[0])];throw new RangeError("Matrix must be square (size: "+Ce(r)+")");case 2:var i=r[0],o=r[1];if(i===o)return d(e)?t(c(e.valueOf(),i,o),e.storage()):c(e,i,o);throw new RangeError("Matrix must be square (size: "+Ce(r)+")");default:throw new RangeError("Matrix must be two dimensional (size: "+Ce(r)+")")}},any:function(e){return n(1,e)}});function c(e,t,c){var f,l,p;if(1===t){if(0===(d=e[0][0]))throw Error("Cannot calculate inverse, determinant is zero");return[[n(1,d)]]}if(2===t){var d=a(e);if(0===d)throw Error("Cannot calculate inverse, determinant is zero");return[[n(e[1][1],d),n(o(e[0][1]),d)],[n(o(e[1][0]),d),n(e[0][0],d)]]}var h=e.concat();for(b=0;bg&&(g=u(h[b][y]),v=b),b++;if(0===g)throw Error("Cannot calculate inverse, determinant is zero");(b=v)!==y&&(p=h[y],h[y]=h[b],h[b]=p,p=m[y],m[y]=m[b],m[b]=p);var x=h[y],w=m[y];for(b=0;b{var{typed:e,matrix:t,inv:n,deepEqual:r,equal:i,dotDivide:o,dot:a,ctranspose:s,divideScalar:u,multiply:c,add:f,Complex:l}=e;return e("pinv",{"Array | Matrix":function(e){var r=d(e)?e.size():Be(e);switch(r.length){case 1:return m(e)?s(e):1===r[0]?n(e):o(s(e),a(e,e));case 2:if(m(e))return s(e);var i=r[0],u=r[1];if(i===u)try{return n(e)}catch(e){if(!(e instanceof Error&&e.message.match(/Cannot calculate inverse, determinant is zero/)))throw e}return d(e)?t(p(e.valueOf(),i,u),e.storage()):p(e,i,u);default:throw new RangeError("Matrix must be two dimensional (size: "+Ce(r)+")")}},any:function(e){return i(e,0)?W(e):u(1,e)}});function p(e,t,r){u=function(e,t,n){for(var r=W(e),i=0,a=0;ae.filter((e,t)=>t!h(a(u[t],u[t])));var i,u,{C:r,F:t}={C:t,F:e};e=c(n(c(s(r),r)),s(r)),r=c(s(t),n(c(t,s(t))));return c(r,e)}function h(e){return i(f(e,l(1,1)),f(0,l(1,1)))}function m(e){return r(f(e,l(1,1)),f(c(e,0),l(1,1)))}}),Rc=tt("pow",["typed","config","identity","multiply","matrix","inv","fraction","number","Complex"],e=>{var{typed:e,config:t,identity:n,multiply:r,matrix:i,inv:o,number:a,fraction:s,Complex:u}=e;return e("pow",{"number, number":c,"Complex, Complex":function(e,t){return e.pow(t)},"BigNumber, BigNumber":function(e,n){return n.isInteger()||0<=e||t.predictable?e.pow(n):new u(e.toNumber(),0).pow(n.toNumber(),0)},"Fraction, Fraction":function(e,n){var r=e.pow(n);if(null!=r)return r;if(t.predictable)throw new Error("Result of pow is non-rational and cannot be expressed as a fraction");return c(e.valueOf(),n.valueOf())},"Array, number":f,"Array, BigNumber":function(e,t){return f(e,t.toNumber())},"Matrix, number":l,"Matrix, BigNumber":function(e,t){return l(e,t.toNumber())},"Unit, number | BigNumber":function(e,t){return e.pow(t)}});function c(e,n){if(t.predictable&&!oe(n)&&e<0)try{var r=s(n),i=a(r);if((n===i||Math.abs((n-i)/n)<1e-14)&&r.d%2==1)return(r.n%2==0?1:-1)*Math.pow(-e,n)}catch(e){}return t.predictable&&(e<-1&&n===1/0||-1>=1,s=r(s,s);return a}function l(e,t){return i(f(e.valueOf(),t))}}),jc="setDifference",Bc=tt(jc,["typed","size","subset","compareNatural","Index","DenseMatrix"],e=>{var{typed:e,size:t,subset:n,compareNatural:r,Index:i,DenseMatrix:o}=e;return e(jc,{"Array | Matrix, Array | Matrix":function(e,a){if(0===n(t(e),new i(0)))c=[];else{if(0===n(t(a),new i(0)))return We(e.toArray());for(var s=Je(We(Array.isArray(e)?e:e.toArray()).sort(r)),u=Je(We(Array.isArray(a)?a:a.toArray()).sort(r)),c=[],f=0;f{var{typed:e,size:t,subset:n,compareNatural:r,Index:i}=e;return e(zc,{"number | BigNumber | Fraction | Complex, Array | Matrix":function(e,o){if(0===n(t(o),new i(0)))return 0;for(var a=We(Array.isArray(o)?o:o.toArray()),s=0,u=0;u{var{addScalar:t,equalScalar:n,FibonacciHeap:r}=e;function i(){if(!(this instanceof i))throw new SyntaxError("Constructor must be called with the new operator");this._values=[],this._heap=new r}return i.prototype.type="Spa",i.prototype.isSpa=!0,i.prototype.set=function(e,t){this._values[e]?this._values[e].value=t:(t=this._heap.insert(e,t),this._values[e]=t)},i.prototype.get=function(e){return e=this._values[e],e?e.value:0},i.prototype.accumulate=function(e,n){var r=this._values[e];r?r.value=t(r.value,n):(r=this._heap.insert(e,n),this._values[e]=r)},i.prototype.forEach=function(e,t,r){var i=this._heap,o=this._values,a=[];for((u=i.extractMinimum())&&a.push(u);u&&u.key<=t;)u.key>=e&&(n(u.value,0)||r(u.key,u.value,this)),(u=i.extractMinimum())&&a.push(u);for(var s=0;s{var{typed:e,abs:t,add:n,multiply:r,sqrt:i,subtract:o,inv:a,size:s,max:u,identity:c}=e;return e("sqrtm",{"Array | Matrix":function(e){var f=d(e)?e.size():Be(e);switch(f.length){case 1:if(1===f[0])return i(e);throw new RangeError("Matrix must be square (size: "+Ce(f)+")");case 2:if(f[0]!==f[1])throw new RangeError("Matrix must be square (size: "+Ce(f)+")");var l=0,p=e,h=c(s(e));do{var m=p;p=r(.5,n(m,a(h))),h=r(.5,n(h,a(m)));if(1e-6<(m=u(t(o(p,m))))&&1e3<++l)throw new Error("computing square root of matrix: iterative method could not converge")}while(1e-6{var t,n,r,{on:e,config:o,addScalar:a,subtract:s,multiplyScalar:c,divideScalar:l,pow:p,abs:d,fix:h,round:m,equal:y,isNumeric:g,format:v,number:b,Complex:x,BigNumber:w,Fraction:N}=e,S=b;function _(e,t){if(!(this instanceof _))throw new Error("Constructor must be called with the new operator");if(null!=e&&!g(e)&&!u(e))throw new TypeError("First parameter in Unit constructor must be number, BigNumber, Fraction, Complex, or undefined");if(void 0!==t&&("string"!=typeof t||""===t))throw new TypeError("Second parameter in Unit constructor must be a string");if(void 0!==t)t=_.parse(t),this.units=t.units,this.dimensions=t.dimensions;else{this.units=[{unit:z,prefix:R.NONE,power:0}],this.dimensions=[];for(var n=0;n{var t,n;if(J(q,e))return{unit:t=q[e],prefix:t.prefixes[""]};for(n in q)if(J(q,n)&&(o=n,i=r=void 0,r=e.length-o.length,i=e.length,e.substring(r,i)===o)){var r=q[n],i=e.length-n.length,o=e.substring(0,i);i=J(r.prefixes,o)?r.prefixes[o]:void 0;if(void 0!==i)return{unit:r,prefix:i}}return null},{hasher:e=>e[0],limit:100});function k(e){return e.equalBase(B.NONE)&&null!==e.value&&!o.predictable?e.value:e}_.isValuelessUnit=function(e){return null!==T(e)},_.prototype.hasBase=function(e){if(!(e="string"==typeof e?B[e]:e))return!1;for(var t=0;t0)},q={meter:{name:"meter",base:B.LENGTH,prefixes:R.LONG,value:1,offset:0},inch:{name:"inch",base:B.LENGTH,prefixes:R.NONE,value:.0254,offset:0},foot:{name:"foot",base:B.LENGTH,prefixes:R.NONE,value:.3048,offset:0},yard:{name:"yard",base:B.LENGTH,prefixes:R.NONE,value:.9144,offset:0},mile:{name:"mile",base:B.LENGTH,prefixes:R.NONE,value:1609.344,offset:0},link:{name:"link",base:B.LENGTH,prefixes:R.NONE,value:.201168,offset:0},rod:{name:"rod",base:B.LENGTH,prefixes:R.NONE,value:5.0292,offset:0},chain:{name:"chain",base:B.LENGTH,prefixes:R.NONE,value:20.1168,offset:0},angstrom:{name:"angstrom",base:B.LENGTH,prefixes:R.NONE,value:1e-10,offset:0},m:{name:"m",base:B.LENGTH,prefixes:R.SHORT,value:1,offset:0},in:{name:"in",base:B.LENGTH,prefixes:R.NONE,value:.0254,offset:0},ft:{name:"ft",base:B.LENGTH,prefixes:R.NONE,value:.3048,offset:0},yd:{name:"yd",base:B.LENGTH,prefixes:R.NONE,value:.9144,offset:0},mi:{name:"mi",base:B.LENGTH,prefixes:R.NONE,value:1609.344,offset:0},li:{name:"li",base:B.LENGTH,prefixes:R.NONE,value:.201168,offset:0},rd:{name:"rd",base:B.LENGTH,prefixes:R.NONE,value:5.02921,offset:0},ch:{name:"ch",base:B.LENGTH,prefixes:R.NONE,value:20.1168,offset:0},mil:{name:"mil",base:B.LENGTH,prefixes:R.NONE,value:254e-7,offset:0},m2:{name:"m2",base:B.SURFACE,prefixes:R.SQUARED,value:1,offset:0},sqin:{name:"sqin",base:B.SURFACE,prefixes:R.NONE,value:64516e-8,offset:0},sqft:{name:"sqft",base:B.SURFACE,prefixes:R.NONE,value:.09290304,offset:0},sqyd:{name:"sqyd",base:B.SURFACE,prefixes:R.NONE,value:.83612736,offset:0},sqmi:{name:"sqmi",base:B.SURFACE,prefixes:R.NONE,value:2589988.110336,offset:0},sqrd:{name:"sqrd",base:B.SURFACE,prefixes:R.NONE,value:25.29295,offset:0},sqch:{name:"sqch",base:B.SURFACE,prefixes:R.NONE,value:404.6873,offset:0},sqmil:{name:"sqmil",base:B.SURFACE,prefixes:R.NONE,value:6.4516e-10,offset:0},acre:{name:"acre",base:B.SURFACE,prefixes:R.NONE,value:4046.86,offset:0},hectare:{name:"hectare",base:B.SURFACE,prefixes:R.NONE,value:1e4,offset:0},m3:{name:"m3",base:B.VOLUME,prefixes:R.CUBIC,value:1,offset:0},L:{name:"L",base:B.VOLUME,prefixes:R.SHORT,value:.001,offset:0},l:{name:"l",base:B.VOLUME,prefixes:R.SHORT,value:.001,offset:0},litre:{name:"litre",base:B.VOLUME,prefixes:R.LONG,value:.001,offset:0},cuin:{name:"cuin",base:B.VOLUME,prefixes:R.NONE,value:16387064e-12,offset:0},cuft:{name:"cuft",base:B.VOLUME,prefixes:R.NONE,value:.028316846592,offset:0},cuyd:{name:"cuyd",base:B.VOLUME,prefixes:R.NONE,value:.764554857984,offset:0},teaspoon:{name:"teaspoon",base:B.VOLUME,prefixes:R.NONE,value:5e-6,offset:0},tablespoon:{name:"tablespoon",base:B.VOLUME,prefixes:R.NONE,value:15e-6,offset:0},drop:{name:"drop",base:B.VOLUME,prefixes:R.NONE,value:5e-8,offset:0},gtt:{name:"gtt",base:B.VOLUME,prefixes:R.NONE,value:5e-8,offset:0},minim:{name:"minim",base:B.VOLUME,prefixes:R.NONE,value:6.161152e-8,offset:0},fluiddram:{name:"fluiddram",base:B.VOLUME,prefixes:R.NONE,value:36966911e-13,offset:0},fluidounce:{name:"fluidounce",base:B.VOLUME,prefixes:R.NONE,value:2957353e-11,offset:0},gill:{name:"gill",base:B.VOLUME,prefixes:R.NONE,value:.0001182941,offset:0},cc:{name:"cc",base:B.VOLUME,prefixes:R.NONE,value:1e-6,offset:0},cup:{name:"cup",base:B.VOLUME,prefixes:R.NONE,value:.0002365882,offset:0},pint:{name:"pint",base:B.VOLUME,prefixes:R.NONE,value:.0004731765,offset:0},quart:{name:"quart",base:B.VOLUME,prefixes:R.NONE,value:.0009463529,offset:0},gallon:{name:"gallon",base:B.VOLUME,prefixes:R.NONE,value:.003785412,offset:0},beerbarrel:{name:"beerbarrel",base:B.VOLUME,prefixes:R.NONE,value:.1173478,offset:0},oilbarrel:{name:"oilbarrel",base:B.VOLUME,prefixes:R.NONE,value:.1589873,offset:0},hogshead:{name:"hogshead",base:B.VOLUME,prefixes:R.NONE,value:.238481,offset:0},fldr:{name:"fldr",base:B.VOLUME,prefixes:R.NONE,value:36966911e-13,offset:0},floz:{name:"floz",base:B.VOLUME,prefixes:R.NONE,value:2957353e-11,offset:0},gi:{name:"gi",base:B.VOLUME,prefixes:R.NONE,value:.0001182941,offset:0},cp:{name:"cp",base:B.VOLUME,prefixes:R.NONE,value:.0002365882,offset:0},pt:{name:"pt",base:B.VOLUME,prefixes:R.NONE,value:.0004731765,offset:0},qt:{name:"qt",base:B.VOLUME,prefixes:R.NONE,value:.0009463529,offset:0},gal:{name:"gal",base:B.VOLUME,prefixes:R.NONE,value:.003785412,offset:0},bbl:{name:"bbl",base:B.VOLUME,prefixes:R.NONE,value:.1173478,offset:0},obl:{name:"obl",base:B.VOLUME,prefixes:R.NONE,value:.1589873,offset:0},g:{name:"g",base:B.MASS,prefixes:R.SHORT,value:.001,offset:0},gram:{name:"gram",base:B.MASS,prefixes:R.LONG,value:.001,offset:0},ton:{name:"ton",base:B.MASS,prefixes:R.SHORT,value:907.18474,offset:0},t:{name:"t",base:B.MASS,prefixes:R.SHORT,value:1e3,offset:0},tonne:{name:"tonne",base:B.MASS,prefixes:R.LONG,value:1e3,offset:0},grain:{name:"grain",base:B.MASS,prefixes:R.NONE,value:6479891e-11,offset:0},dram:{name:"dram",base:B.MASS,prefixes:R.NONE,value:.0017718451953125,offset:0},ounce:{name:"ounce",base:B.MASS,prefixes:R.NONE,value:.028349523125,offset:0},poundmass:{name:"poundmass",base:B.MASS,prefixes:R.NONE,value:.45359237,offset:0},hundredweight:{name:"hundredweight",base:B.MASS,prefixes:R.NONE,value:45.359237,offset:0},stick:{name:"stick",base:B.MASS,prefixes:R.NONE,value:.115,offset:0},stone:{name:"stone",base:B.MASS,prefixes:R.NONE,value:6.35029318,offset:0},gr:{name:"gr",base:B.MASS,prefixes:R.NONE,value:6479891e-11,offset:0},dr:{name:"dr",base:B.MASS,prefixes:R.NONE,value:.0017718451953125,offset:0},oz:{name:"oz",base:B.MASS,prefixes:R.NONE,value:.028349523125,offset:0},lbm:{name:"lbm",base:B.MASS,prefixes:R.NONE,value:.45359237,offset:0},cwt:{name:"cwt",base:B.MASS,prefixes:R.NONE,value:45.359237,offset:0},s:{name:"s",base:B.TIME,prefixes:R.SHORT,value:1,offset:0},min:{name:"min",base:B.TIME,prefixes:R.NONE,value:60,offset:0},h:{name:"h",base:B.TIME,prefixes:R.NONE,value:3600,offset:0},second:{name:"second",base:B.TIME,prefixes:R.LONG,value:1,offset:0},sec:{name:"sec",base:B.TIME,prefixes:R.LONG,value:1,offset:0},minute:{name:"minute",base:B.TIME,prefixes:R.NONE,value:60,offset:0},hour:{name:"hour",base:B.TIME,prefixes:R.NONE,value:3600,offset:0},day:{name:"day",base:B.TIME,prefixes:R.NONE,value:86400,offset:0},week:{name:"week",base:B.TIME,prefixes:R.NONE,value:604800,offset:0},month:{name:"month",base:B.TIME,prefixes:R.NONE,value:2629800,offset:0},year:{name:"year",base:B.TIME,prefixes:R.NONE,value:31557600,offset:0},decade:{name:"decade",base:B.TIME,prefixes:R.NONE,value:315576e3,offset:0},century:{name:"century",base:B.TIME,prefixes:R.NONE,value:315576e4,offset:0},millennium:{name:"millennium",base:B.TIME,prefixes:R.NONE,value:315576e5,offset:0},hertz:{name:"Hertz",base:B.FREQUENCY,prefixes:R.LONG,value:1,offset:0,reciprocal:!0},Hz:{name:"Hz",base:B.FREQUENCY,prefixes:R.SHORT,value:1,offset:0,reciprocal:!0},rad:{name:"rad",base:B.ANGLE,prefixes:R.SHORT,value:1,offset:0},radian:{name:"radian",base:B.ANGLE,prefixes:R.LONG,value:1,offset:0},deg:{name:"deg",base:B.ANGLE,prefixes:R.SHORT,value:null,offset:0},degree:{name:"degree",base:B.ANGLE,prefixes:R.LONG,value:null,offset:0},grad:{name:"grad",base:B.ANGLE,prefixes:R.SHORT,value:null,offset:0},gradian:{name:"gradian",base:B.ANGLE,prefixes:R.LONG,value:null,offset:0},cycle:{name:"cycle",base:B.ANGLE,prefixes:R.NONE,value:null,offset:0},arcsec:{name:"arcsec",base:B.ANGLE,prefixes:R.NONE,value:null,offset:0},arcmin:{name:"arcmin",base:B.ANGLE,prefixes:R.NONE,value:null,offset:0},A:{name:"A",base:B.CURRENT,prefixes:R.SHORT,value:1,offset:0},ampere:{name:"ampere",base:B.CURRENT,prefixes:R.LONG,value:1,offset:0},K:{name:"K",base:B.TEMPERATURE,prefixes:R.NONE,value:1,offset:0},degC:{name:"degC",base:B.TEMPERATURE,prefixes:R.NONE,value:1,offset:273.15},degF:{name:"degF",base:B.TEMPERATURE,prefixes:R.NONE,value:1/1.8,offset:459.67},degR:{name:"degR",base:B.TEMPERATURE,prefixes:R.NONE,value:1/1.8,offset:0},kelvin:{name:"kelvin",base:B.TEMPERATURE,prefixes:R.NONE,value:1,offset:0},celsius:{name:"celsius",base:B.TEMPERATURE,prefixes:R.NONE,value:1,offset:273.15},fahrenheit:{name:"fahrenheit",base:B.TEMPERATURE,prefixes:R.NONE,value:1/1.8,offset:459.67},rankine:{name:"rankine",base:B.TEMPERATURE,prefixes:R.NONE,value:1/1.8,offset:0},mol:{name:"mol",base:B.AMOUNT_OF_SUBSTANCE,prefixes:R.SHORT,value:1,offset:0},mole:{name:"mole",base:B.AMOUNT_OF_SUBSTANCE,prefixes:R.LONG,value:1,offset:0},cd:{name:"cd",base:B.LUMINOUS_INTENSITY,prefixes:R.SHORT,value:1,offset:0},candela:{name:"candela",base:B.LUMINOUS_INTENSITY,prefixes:R.LONG,value:1,offset:0},N:{name:"N",base:B.FORCE,prefixes:R.SHORT,value:1,offset:0},newton:{name:"newton",base:B.FORCE,prefixes:R.LONG,value:1,offset:0},dyn:{name:"dyn",base:B.FORCE,prefixes:R.SHORT,value:1e-5,offset:0},dyne:{name:"dyne",base:B.FORCE,prefixes:R.LONG,value:1e-5,offset:0},lbf:{name:"lbf",base:B.FORCE,prefixes:R.NONE,value:4.4482216152605,offset:0},poundforce:{name:"poundforce",base:B.FORCE,prefixes:R.NONE,value:4.4482216152605,offset:0},kip:{name:"kip",base:B.FORCE,prefixes:R.LONG,value:4448.2216,offset:0},kilogramforce:{name:"kilogramforce",base:B.FORCE,prefixes:R.NONE,value:9.80665,offset:0},J:{name:"J",base:B.ENERGY,prefixes:R.SHORT,value:1,offset:0},joule:{name:"joule",base:B.ENERGY,prefixes:R.SHORT,value:1,offset:0},erg:{name:"erg",base:B.ENERGY,prefixes:R.NONE,value:1e-7,offset:0},Wh:{name:"Wh",base:B.ENERGY,prefixes:R.SHORT,value:3600,offset:0},BTU:{name:"BTU",base:B.ENERGY,prefixes:R.BTU,value:1055.05585262,offset:0},eV:{name:"eV",base:B.ENERGY,prefixes:R.SHORT,value:1602176565e-28,offset:0},electronvolt:{name:"electronvolt",base:B.ENERGY,prefixes:R.LONG,value:1602176565e-28,offset:0},W:{name:"W",base:B.POWER,prefixes:R.SHORT,value:1,offset:0},watt:{name:"watt",base:B.POWER,prefixes:R.LONG,value:1,offset:0},hp:{name:"hp",base:B.POWER,prefixes:R.NONE,value:745.6998715386,offset:0},VAR:{name:"VAR",base:B.POWER,prefixes:R.SHORT,value:x.I,offset:0},VA:{name:"VA",base:B.POWER,prefixes:R.SHORT,value:1,offset:0},Pa:{name:"Pa",base:B.PRESSURE,prefixes:R.SHORT,value:1,offset:0},psi:{name:"psi",base:B.PRESSURE,prefixes:R.NONE,value:6894.75729276459,offset:0},atm:{name:"atm",base:B.PRESSURE,prefixes:R.NONE,value:101325,offset:0},bar:{name:"bar",base:B.PRESSURE,prefixes:R.SHORTLONG,value:1e5,offset:0},torr:{name:"torr",base:B.PRESSURE,prefixes:R.NONE,value:133.322,offset:0},mmHg:{name:"mmHg",base:B.PRESSURE,prefixes:R.NONE,value:133.322,offset:0},mmH2O:{name:"mmH2O",base:B.PRESSURE,prefixes:R.NONE,value:9.80665,offset:0},cmH2O:{name:"cmH2O",base:B.PRESSURE,prefixes:R.NONE,value:98.0665,offset:0},coulomb:{name:"coulomb",base:B.ELECTRIC_CHARGE,prefixes:R.LONG,value:1,offset:0},C:{name:"C",base:B.ELECTRIC_CHARGE,prefixes:R.SHORT,value:1,offset:0},farad:{name:"farad",base:B.ELECTRIC_CAPACITANCE,prefixes:R.LONG,value:1,offset:0},F:{name:"F",base:B.ELECTRIC_CAPACITANCE,prefixes:R.SHORT,value:1,offset:0},volt:{name:"volt",base:B.ELECTRIC_POTENTIAL,prefixes:R.LONG,value:1,offset:0},V:{name:"V",base:B.ELECTRIC_POTENTIAL,prefixes:R.SHORT,value:1,offset:0},ohm:{name:"ohm",base:B.ELECTRIC_RESISTANCE,prefixes:R.SHORTLONG,value:1,offset:0},henry:{name:"henry",base:B.ELECTRIC_INDUCTANCE,prefixes:R.LONG,value:1,offset:0},H:{name:"H",base:B.ELECTRIC_INDUCTANCE,prefixes:R.SHORT,value:1,offset:0},siemens:{name:"siemens",base:B.ELECTRIC_CONDUCTANCE,prefixes:R.LONG,value:1,offset:0},S:{name:"S",base:B.ELECTRIC_CONDUCTANCE,prefixes:R.SHORT,value:1,offset:0},weber:{name:"weber",base:B.MAGNETIC_FLUX,prefixes:R.LONG,value:1,offset:0},Wb:{name:"Wb",base:B.MAGNETIC_FLUX,prefixes:R.SHORT,value:1,offset:0},tesla:{name:"tesla",base:B.MAGNETIC_FLUX_DENSITY,prefixes:R.LONG,value:1,offset:0},T:{name:"T",base:B.MAGNETIC_FLUX_DENSITY,prefixes:R.SHORT,value:1,offset:0},b:{name:"b",base:B.BIT,prefixes:R.BINARY_SHORT,value:1,offset:0},bits:{name:"bits",base:B.BIT,prefixes:R.BINARY_LONG,value:1,offset:0},B:{name:"B",base:B.BIT,prefixes:R.BINARY_SHORT,value:8,offset:0},bytes:{name:"bytes",base:B.BIT,prefixes:R.BINARY_LONG,value:8,offset:0}},P={meters:"meter",inches:"inch",feet:"foot",yards:"yard",miles:"mile",links:"link",rods:"rod",chains:"chain",angstroms:"angstrom",lt:"l",litres:"litre",liter:"litre",liters:"litre",teaspoons:"teaspoon",tablespoons:"tablespoon",minims:"minim",fluiddrams:"fluiddram",fluidounces:"fluidounce",gills:"gill",cups:"cup",pints:"pint",quarts:"quart",gallons:"gallon",beerbarrels:"beerbarrel",oilbarrels:"oilbarrel",hogsheads:"hogshead",gtts:"gtt",grams:"gram",tons:"ton",tonnes:"tonne",grains:"grain",drams:"dram",ounces:"ounce",poundmasses:"poundmass",hundredweights:"hundredweight",sticks:"stick",lb:"lbm",lbs:"lbm",kips:"kip",kgf:"kilogramforce",acres:"acre",hectares:"hectare",sqfeet:"sqft",sqyard:"sqyd",sqmile:"sqmi",sqmiles:"sqmi",mmhg:"mmHg",mmh2o:"mmH2O",cmh2o:"cmH2O",seconds:"second",secs:"second",minutes:"minute",mins:"minute",hours:"hour",hr:"hour",hrs:"hour",days:"day",weeks:"week",months:"month",years:"year",decades:"decade",centuries:"century",millennia:"millennium",hertz:"hertz",radians:"radian",degrees:"degree",gradians:"gradian",cycles:"cycle",arcsecond:"arcsec",arcseconds:"arcsec",arcminute:"arcmin",arcminutes:"arcmin",BTUs:"BTU",watts:"watt",joules:"joule",amperes:"ampere",coulombs:"coulomb",volts:"volt",ohms:"ohm",farads:"farad",webers:"weber",teslas:"tesla",electronvolts:"electronvolt",moles:"mole",bit:"bits",byte:"bytes"};function F(e){"BigNumber"===e.number?(e=pt(w),q.rad.value=new w(1),q.deg.value=e.div(180),q.grad.value=e.div(200),q.cycle.value=e.times(2),q.arcsec.value=e.div(648e3),q.arcmin.value=e.div(10800)):(q.rad.value=1,q.deg.value=Math.PI/180,q.grad.value=Math.PI/200,q.cycle.value=2*Math.PI,q.arcsec.value=Math.PI/648e3,q.arcmin.value=Math.PI/10800),q.radian.value=q.rad.value,q.degree.value=q.deg.value,q.gradian.value=q.grad.value}F(o),e&&e("config",(function(e,t){e.number!==t.number&&F(e)}));var L,U,$,G={si:{NONE:{unit:z,prefix:R.NONE[""]},LENGTH:{unit:q.m,prefix:R.SHORT[""]},MASS:{unit:q.g,prefix:R.SHORT.k},TIME:{unit:q.s,prefix:R.SHORT[""]},CURRENT:{unit:q.A,prefix:R.SHORT[""]},TEMPERATURE:{unit:q.K,prefix:R.SHORT[""]},LUMINOUS_INTENSITY:{unit:q.cd,prefix:R.SHORT[""]},AMOUNT_OF_SUBSTANCE:{unit:q.mol,prefix:R.SHORT[""]},ANGLE:{unit:q.rad,prefix:R.SHORT[""]},BIT:{unit:q.bits,prefix:R.SHORT[""]},FORCE:{unit:q.N,prefix:R.SHORT[""]},ENERGY:{unit:q.J,prefix:R.SHORT[""]},POWER:{unit:q.W,prefix:R.SHORT[""]},PRESSURE:{unit:q.Pa,prefix:R.SHORT[""]},ELECTRIC_CHARGE:{unit:q.C,prefix:R.SHORT[""]},ELECTRIC_CAPACITANCE:{unit:q.F,prefix:R.SHORT[""]},ELECTRIC_POTENTIAL:{unit:q.V,prefix:R.SHORT[""]},ELECTRIC_RESISTANCE:{unit:q.ohm,prefix:R.SHORT[""]},ELECTRIC_INDUCTANCE:{unit:q.H,prefix:R.SHORT[""]},ELECTRIC_CONDUCTANCE:{unit:q.S,prefix:R.SHORT[""]},MAGNETIC_FLUX:{unit:q.Wb,prefix:R.SHORT[""]},MAGNETIC_FLUX_DENSITY:{unit:q.T,prefix:R.SHORT[""]},FREQUENCY:{unit:q.Hz,prefix:R.SHORT[""]}}},V=(G.cgs=JSON.parse(JSON.stringify(G.si)),G.cgs.LENGTH={unit:q.m,prefix:R.SHORT.c},G.cgs.MASS={unit:q.g,prefix:R.SHORT[""]},G.cgs.FORCE={unit:q.dyn,prefix:R.SHORT[""]},G.cgs.ENERGY={unit:q.erg,prefix:R.NONE[""]},G.us=JSON.parse(JSON.stringify(G.si)),G.us.LENGTH={unit:q.ft,prefix:R.NONE[""]},G.us.MASS={unit:q.lbm,prefix:R.NONE[""]},G.us.TEMPERATURE={unit:q.degF,prefix:R.NONE[""]},G.us.FORCE={unit:q.lbf,prefix:R.NONE[""]},G.us.ENERGY={unit:q.BTU,prefix:R.BTU[""]},G.us.POWER={unit:q.hp,prefix:R.NONE[""]},G.us.PRESSURE={unit:q.psi,prefix:R.NONE[""]},G.auto=JSON.parse(JSON.stringify(G.si)),G.auto);for(L in _.setUnitSystem=function(e){if(!J(G,e))throw new Error("Unit system "+e+" does not exist. Choices are: "+Object.keys(G).join(", "));V=G[e]},_.getUnitSystem=function(){for(var e in G)if(J(G,e)&&G[e]===V)return e},_.typeConverters={BigNumber:function(e){return new w(e+"")},Fraction:function(e){return new N(e)},Complex:function(e){return e},number:function(e){return e}},_._getNumberConverter=function(e){if(_.typeConverters[e])return _.typeConverters[e];throw new TypeError('Unsupported type "'+e+'"')},q)J(q,L)&&((U=q[L]).dimensions=U.base.dimensions);for($ in P)if(J(P,$)){var Z,Y=q[P[$]],X={};for(Z in Y)J(Y,Z)&&(X[Z]=Y[Z]);q[X.name=$]=X}return _.isValidAlpha=function(e){return/^[a-zA-Z]$/.test(e)},_.createUnit=function(e,t){if("object"!=typeof e)throw new TypeError("createUnit expects first parameter to be of type 'Object'");if(t&&t.override)for(var n in e)if(J(e,n)&&_.deleteUnit(n),e[n].aliases)for(var r=0;r{var{typed:e,Unit:t}=e;return e(Wc,{"Object, Object":function(e,n){return t.createUnit(e,n)},Object:function(e){return t.createUnit(e,{})},"string, Unit | string | Object, Object":function(e,n,r){var i={};return i[e]=n,t.createUnit(i,r)},"string, Unit | string | Object":function(e,n){var r={};return r[e]=n,t.createUnit(r,{})},string:function(e){var n={};return n[e]={},t.createUnit(n,{})}})}),Vc=tt("dotPow",["typed","equalScalar","matrix","pow","DenseMatrix"],e=>{var{typed:e,equalScalar:t,matrix:n,pow:r,DenseMatrix:i}=e,o=Ca({typed:e}),a=Xa({typed:e,DenseMatrix:i}),s=ka({typed:e,equalScalar:t}),u=Ia({typed:e,DenseMatrix:i}),c=Ra({typed:e}),f=ja({typed:e});return e("dotPow",{"any, any":r,"SparseMatrix, SparseMatrix":function(e,t){return a(e,t,r,!1)},"SparseMatrix, DenseMatrix":function(e,t){return o(t,e,r,!0)},"DenseMatrix, SparseMatrix":function(e,t){return o(e,t,r,!1)},"DenseMatrix, DenseMatrix":function(e,t){return c(e,t,r)},"Array, Array":function(e,t){return this(n(e),n(t)).valueOf()},"Array, Matrix":function(e,t){return this(n(e),t)},"Matrix, Array":function(e,t){return this(e,n(t))},"SparseMatrix, any":function(e,t){return s(e,t,this,!1)},"DenseMatrix, any":function(e,t){return f(e,t,this,!1)},"any, SparseMatrix":function(e,t){return u(t,e,this,!0)},"any, DenseMatrix":function(e,t){return f(t,e,this,!0)},"Array, any":function(e,t){return f(n(e),t,this,!1).valueOf()},"any, Array":function(e,t){return f(n(t),e,this,!0).valueOf()}})}),Zc=tt("expm",["typed","abs","add","identity","inv","multiply"],e=>{var{typed:e,abs:t,add:n,identity:r,inv:i,multiply:o}=e;return e("expm",{Matrix:function(e){var a=e.size();if(2!==a.length||a[0]!==a[1])throw new RangeError("Matrix must be square (size: "+Ce(a)+")");a=a[0];for(var s=function(e,t){for(var n=0;n<30;n++)for(var r=0;r<=n;r++){var i=n-r;if(function(e,t,n){for(var r=1,i=2;i<=t;i++)r*=i;for(var o=r,a=t+1;a<=2*t;a++)o*=a;var s=o*(2*t+1);return 8*Math.pow(e/Math.pow(2,n),2*t)*r*r/(o*s)}(e,r,i){var{typed:e,config:t,BigNumber:n,Complex:r}=e;return e("gamma",{number:yo,Complex:function(e){if(0===e.im)return this(e.re);if(e.re<.5)return a=new r(1-e.re,-e.im),o=new r(Math.PI*e.re,Math.PI*e.im),new r(Math.PI).div(o.sin()).div(this(a));e=new r(e.re-1,e.im);for(var t=new r(vo[0],0),n=1;n{var{typed:e,size:t,subset:n,compareNatural:r,Index:i,DenseMatrix:o}=e;return e(Xc,{"Array | Matrix, Array | Matrix":function(e,a){if(0===n(t(e),new i(0))||0===n(t(a),new i(0)))c=[];else for(var s=Je(We(Array.isArray(e)?e:e.toArray()).sort(r)),u=Je(We(Array.isArray(a)?a:a.toArray()).sort(r)),c=[],f=0;f{var{typed:e,matrix:t,multiply:n,equalScalar:r,divideScalar:i,inv:o}=e,a=ka({typed:e,equalScalar:r}),s=ja({typed:e});return e("divide",V({"Array | Matrix, Array | Matrix":function(e,t){return n(e,o(t))},"DenseMatrix, any":function(e,t){return s(e,t,i,!1)},"SparseMatrix, any":function(e,t){return a(e,t,i,!1)},"Array, any":function(e,n){return s(t(e),n,i,!1).valueOf()},"any, Array | Matrix":function(e,t){return n(e,o(t))}},i.signatures))}),Kc=tt("factorial",["typed","gamma"],e=>{var{typed:e,gamma:t}=e;return e("factorial",{number:function(e){if(e<0)throw new Error("Value must be non-negative");return t(e+1)},BigNumber:function(e){if(e.isNegative())throw new Error("Value must be non-negative");return t(e.plus(1))},"Array | Matrix":function(e){return lr(e,this)}})}),ef=tt("lup",["typed","matrix","abs","addScalar","divideScalar","multiplyScalar","subtract","larger","equalScalar","unaryMinus","DenseMatrix","SparseMatrix","Spa"],e=>{var{typed:e,matrix:t,abs:n,addScalar:r,divideScalar:i,multiplyScalar:o,subtract:a,larger:s,equalScalar:u,unaryMinus:c,DenseMatrix:f,SparseMatrix:l,Spa:p}=e;return e("lup",{DenseMatrix:d,SparseMatrix:function(e){var t,r,a,f=e._size[0],d=e._size[1],h=Math.min(f,d),m=e._values,y=e._index,g=e._ptr,v=[],b=[],x=[],w=[f,h],N=[],S=[],_=[],D=[h,d],M=[],E=[];for(t=0;t{var{typed:e,add:t,divide:n,multiply:r,factorial:i,isInteger:o,isPositive:a}=e;return e(tf,{"Array | Matrix":function(e){var s=0,u=1;return fr(e,(function(e){if(!o(e)||!a(e))throw new TypeError("Positive integer value expected in function multinomial");s=t(s,e),u=r(u,i(e))})),n(i(s),u)}})}),rf="permutations",of=tt(rf,["typed","factorial"],e=>{var{typed:e,factorial:t}=e;return e(rf,{"number | BigNumber":t,"number, number":function(e,t){if(!oe(e)||e<0)throw new TypeError("Positive integer value expected in function permutations");if(!oe(t)||t<0)throw new TypeError("Positive integer value expected in function permutations");if(e{var{typed:e,addScalar:t,multiplyScalar:n,isNegative:r,isInteger:i,number:o,bignumber:s,larger:u}=e,c=[],f=[];return e(sf,{"number | BigNumber, number | BigNumber":function(e,l){if(!i(e)||r(e)||!i(l)||r(l))throw new TypeError("Non-negative integer value expected in function stirlingS2");if(u(l,e))throw new TypeError("k must be less than or equal to n in function stirlingS2");var p=!(a(e)&&a(l)),d=p?f:c,h=p?s:o,m=o(e),y=o(l);if(!(d[m]&&d[m].length>y))for(var g=0;g<=m;++g)if(d[g]||(d[g]=[h(0===g?1:0)]),0!==g)for(var v=d[g],b=d[g-1],x=v.length;x<=g&&x<=y;++x)v[x]=x===g?1:t(n(h(x),b[x]),b[x-1]);return d[m][y]}})}),cf=tt("unit",["typed","Unit"],e=>{var{typed:e,Unit:t}=e;return e("unit",{Unit:function(e){return e.clone()},string:function(e){return t.isValuelessUnit(e)?new t(null,e):t.parse(e,{allowNoUnits:!0})},"number | BigNumber | Fraction | Complex, string":function(e,n){return new t(e,n)},"Array | Matrix":function(e){return lr(e,this)}})}),ff="bellNumbers",lf=tt(ff,["typed","addScalar","isNegative","isInteger","stirlingS2"],e=>{var{typed:e,addScalar:t,isNegative:n,isInteger:r,stirlingS2:i}=e;return e(ff,{"number | BigNumber":function(e){if(!r(e)||n(e))throw new TypeError("Non-negative integer value expected in function bellNumbers");for(var o=0,a=0;a<=e;a++)o=t(o,i(e,a));return o}})});function pf(e){var{addScalar:t,subtract:n,flatten:r,multiply:i,multiplyScalar:o,divideScalar:a,sqrt:s,abs:u,bignumber:c,diag:f,inv:l,qr:p,usolve:d,usolveAll:h,equal:m,complex:y,larger:g,smaller:v,matrixFromColumns:b,dot:x}=e;function w(e,t){for(var n=0;n+n(u(e),u(t))),1002*Math.random()-1);return r&&(e=e.map(e=>c(e))),i&&(e=e.map(e=>y(e))),_(e=N(e,t),n)}(t,n,i),o=d(e,o),g(S(o),a))break;if(5<=++s)return null}for(s=0;;){var u=d(e,o);if(v(S(N(o,[u])),r))break;if(10<=++s)return null;o=_(u)}return o}(f,t,x,u,p);if(null==m){I.push(s);break}x.push(m)}var b=i(l(a),o),x=x.map(e=>i(b,e));O.push(...x.map(e=>r(e)))},j=0;j=Math.abs(_);){var A=E[0][0],O=E[0][1];x=function(e,n,r){var i=n-e;return Math.abs(i)<=t.epsilon?Math.PI/4:.5*Math.atan(2*r/(n-e))}(w[A][A],w[O][O],w[A][O]),w=function(e,t,n,r){for(var i=e.length,o=Math.cos(t),a=Math.sin(t),s=(t=o*o,a*a),u=y(i,0),c=y(i,0),f=t*e[n][n]-2*o*a*e[n][r]+s*e[r][r],l=(s=s*e[n][n]+2*o*a*e[n][r]+t*e[r][r],0);l=i(j);){var P=q[0][0],F=q[0][1];k=function(e,n,a){return n=r(n,e),i(n)<=t.epsilon?f(-1).acos().div(4):u(.5,o(l(2,a,c(n))))}(I[P][P],I[F][F],I[P][F]),I=function(e,t,i,o){for(var c=e.length,d=f(a(t)),h=f(s(t)),m=(t=u(d,d),u(h,h)),g=y(c,f(0)),v=y(c,f(0)),b=l(f(2),d,h,e[i][o]),x=n(r(u(t,e[i][i]),b),u(m,e[o][o])),w=(m=p(u(m,e[i][i]),b,u(t,e[o][o])),0);w{var{config:t,typed:e,matrix:n,addScalar:r,subtract:i,equal:o,abs:f,atan:l,cos:p,sin:d,multiplyScalar:h,divideScalar:m,inv:y,bignumber:g,multiply:v,add:b,larger:x,column:w,flatten:N,number:S,complex:_,sqrt:D,diag:M,qr:E,usolve:A,usolveAll:O,im:C,re:T,smaller:k,matrixFromColumns:I,dot:R}=e,j=df({config:t,addScalar:r,subtract:i,column:w,flatten:N,equal:o,abs:f,atan:l,cos:p,sin:d,multiplyScalar:h,inv:y,bignumber:g,complex:_,multiply:v,add:b}),B=pf({config:t,addScalar:r,subtract:i,multiply:v,multiplyScalar:h,flatten:N,divideScalar:m,sqrt:D,abs:f,bignumber:g,diag:M,qr:E,inv:y,usolve:A,usolveAll:O,equal:o,complex:_,larger:x,smaller:k,matrixFromColumns:I,dot:R});return e("eigs",{Array:function(e){return z(n(e))},"Array, number|BigNumber":function(e,t){return z(n(e),t)},Matrix:function(e){var{values:e,vectors:t}=z(e);return{values:n(e),vectors:n(t)}},"Matrix, number|BigNumber":function(e,t){var{values:e,vectors:t}=z(e,t);return{values:n(e),vectors:n(t)}}});function z(e,n){void 0===n&&(n=t.epsilon);var r=e.size();if(2!==r.length||r[0]!==r[1])throw new RangeError("Matrix must be square (size: "+Ce(r)+")");var o=e.toArray();r=r[0];if(function(e,t,n){for(var r=0;r{var{typed:e,add:t,divide:n}=e;return e("mean",{"Array | Matrix":r,"Array | Matrix, number | BigNumber":function(e,r){try{var i=pr(e,r,t),o=Array.isArray(e)?Be(e):e.size();return n(i,o[r])}catch(e){throw Ga(e,"mean")}},"...":function(e){if(cr(e))throw new TypeError("Scalar values expected in function mean");return r(e)}});function r(e){var r,i=0;if(fr(e,(function(n){try{r=void 0===r?n:t(r,n),i++}catch(e){throw Ga(e,"mean",n)}})),0===i)throw new Error("Cannot calculate the mean of an empty array");return n(r,i)}}),yf="setSymDifference",gf=tt(yf,["typed","size","concat","subset","setDifference","Index"],e=>{var{typed:e,size:t,concat:n,subset:r,setDifference:i,Index:o}=e;return e(yf,{"Array | Matrix, Array | Matrix":function(e,a){return 0===r(t(e),new o(0))?We(a):0===r(t(a),new o(0))?We(e):(e=We(e),a=We(a),n(i(e,a),i(a,e)))}})});function vf(e,t){var n,r=t.length,i=[];if(e)for(n=0;n{var{typed:e,matrix:t,lup:n,slu:r,usolve:i,lsolve:o,DenseMatrix:a}=e,s=$s({DenseMatrix:a});return e("lusolve",{"Array, Array | Matrix":function(e,r){return e=t(e),e=n(e),c(e.L,e.U,e.p,null,r).valueOf()},"DenseMatrix, Array | Matrix":function(e,t){return e=n(e),c(e.L,e.U,e.p,null,t)},"SparseMatrix, Array | Matrix":function(e,t){return e=n(e),c(e.L,e.U,e.p,null,t)},"SparseMatrix, Array | Matrix, number, number":function(e,t,n,i){return e=r(e,n,i),c(e.L,e.U,e.p,e.q,t)},"Object, Array | Matrix":function(e,t){return c(e.L,e.U,e.p,e.q,t)}});function u(e){if(d(e))return e;if(p(e))return t(e);throw new TypeError("Invalid Matrix LU decomposition")}function c(e,t,n,r,a){return e=u(e),t=u(t),n&&((a=s(e,a,!0))._data=vf(n,a._data)),n=o(e,a),e=i(t,n),r&&(e._data=vf(r,e._data)),e}}),xf=tt("median",["typed","add","divide","compare","partitionSelect"],e=>{var{typed:e,add:t,divide:n,compare:r,partitionSelect:i}=e;function o(e){try{var t,n=(e=We(e.valueOf())).length;if(0===n)throw new Error("Cannot calculate median of an empty array");if(n%2!=0)return t=i(e,(n-1)/2),a(t);for(var o=n/2-1,u=i(e,1+o),c=e[o],f=0;f{var{typed:e,size:t,concat:n,subset:r,setIntersect:i,setSymDifference:o,Index:a}=e;return e("setUnion",{"Array | Matrix, Array | Matrix":function(e,s){return 0===r(t(e),new a(0))?We(s):0===r(t(s),new a(0))?We(e):(e=We(e),s=We(s),n(o(e,s),i(e,s)))}})}),Nf="unbiased",Sf=tt("variance",["typed","add","subtract","multiply","divide","apply","isNaN"],e=>{var{typed:e,add:t,subtract:n,multiply:r,divide:i,apply:o,isNaN:a}=e;return e("variance",{"Array | Matrix":function(e){return u(e,Nf)},"Array | Matrix, string":u,"Array | Matrix, number | BigNumber":function(e,t){return c(e,t,Nf)},"Array | Matrix, number | BigNumber, string":c,"...":function(e){return u(e,Nf)}});function u(e,o){var u=0;if(0===e.length)throw new SyntaxError("Function variance requires one or more parameters (0 provided)");if(fr(e,(function(n){try{f=void 0===f?n:t(f,n),u++}catch(e){throw Ga(e,"variance",n)}})),0===u)throw new Error("Cannot calculate variance of an empty array");var c=i(f,u),f=void 0;if(fr(e,(function(e){e=n(e,c),f=void 0===f?r(e,e):t(f,r(e,e))})),a(f))return f;switch(o){case"uncorrected":return i(f,u);case"biased":return i(f,u+1);case"unbiased":var l=s(f)?f.mul(0):0;return 1===u?l:i(f,u-1);default:throw new Error('Unknown normalization "'+o+'". Choose "unbiased" (default), "uncorrected", or "biased".')}}function c(e,t,n){try{if(0===e.length)throw new SyntaxError("Function variance requires one or more parameters (0 provided)");return o(e,t,e=>u(e,n))}catch(e){throw Ga(e,"variance")}}}),_f="kldivergence",Df=tt(_f,["typed","matrix","divide","sum","multiply","dotDivide","log","isNumeric"],e=>{var{typed:e,matrix:t,divide:n,sum:r,multiply:i,dotDivide:o,log:a,isNumeric:s}=e;return e(_f,{"Array, Array":function(e,n){return u(t(e),t(n))},"Matrix, Array":function(e,n){return u(e,t(n))},"Array, Matrix":function(e,n){return u(t(e),n)},"Matrix, Matrix":u});function u(e,t){var u=t.size().length,c=e.size().length;if(1{var{typed:e,abs:t,add:n,pow:r,conj:i,sqrt:o,multiply:a,equalScalar:s,larger:u,smaller:c,matrix:f,ctranspose:l,eigs:p}=e;return e("norm",{number:Math.abs,Complex:function(e){return e.abs()},BigNumber:function(e){return e.abs()},boolean:function(e){return Math.abs(e)},Array:function(e){return m(f(e),2)},Matrix:function(e){return m(e,2)},"number | Complex | BigNumber | boolean, number | BigNumber | string":function(e){return this(e)},"Array, number | BigNumber | string":function(e,t){return m(f(e),t)},"Matrix, number | BigNumber | string":m});function d(e,i){if(i===Number.POSITIVE_INFINITY||"inf"===i)return o=0,e.forEach((function(e){e=t(e),u(e,o)&&(o=e)}),!0),o;var o,a,f;if(i===Number.NEGATIVE_INFINITY||"-inf"===i)return e.forEach((function(e){e=t(e),a&&!c(e,a)||(a=e)}),!0),a||0;if("fro"===i)return m(e,2);if("number"!=typeof i||isNaN(i))throw new Error("Unsupported parameter value");return s(i,0)?Number.POSITIVE_INFINITY:(f=0,e.forEach((function(e){f=n(r(t(e),i),f)}),!0),r(f,1/i))}function h(e,r){if(1===r)return s=[],c=0,e.forEach((function(e,r){r=r[1],e=n(s[r]||0,t(e)),u(e,c)&&(c=e),s[r]=e}),!0),c;var s,c,f,d,h;if(r===Number.POSITIVE_INFINITY||"inf"===r)return f=[],d=0,e.forEach((function(e,r){r=r[0],e=n(f[r]||0,t(e)),u(e,d)&&(d=e),f[r]=e}),!0),d;if("fro"===r)return h=0,e.forEach((function(e,t){h=n(h,a(e,i(e)))})),t(o(h));if(2!==r)throw new Error("Unsupported parameter value "+r);if(r=e,e=r.size(),e[0]!==e[1])throw new RangeError("Invalid matrix dimensions");return e=l(r),e=a(e,r),r=p(e).values.toArray(),e=r[r.length-1],t(o(e))}function m(e,t){var n=e.size();if(1===n.length)return d(e,t);if(2===n.length){if(n[0]&&n[1])return h(e,t);throw new RangeError("Invalid matrix dimensions")}}}),Ef="rotationMatrix",Af=tt(Ef,["typed","config","multiplyScalar","addScalar","unaryMinus","norm","matrix","BigNumber","DenseMatrix","SparseMatrix","cos","sin"],e=>{var{typed:e,config:t,multiplyScalar:n,addScalar:r,unaryMinus:i,norm:o,BigNumber:a,matrix:u,DenseMatrix:c,SparseMatrix:f,cos:l,sin:p}=e;return e(Ef,{"":function(){return"Matrix"===t.matrix?u([]):[]},string:function(e){return u(e)},"number | BigNumber | Complex | Unit":function(e){return d(e,"Matrix"===t.matrix?"dense":void 0)},"number | BigNumber | Complex | Unit, string":d,"number | BigNumber | Complex | Unit, Array":function(e,t){return t=u(t),h(t),g(e,t,void 0)},"number | BigNumber | Complex | Unit, Matrix":function(e,n){h(n);var r=n.storage()||("Matrix"===t.matrix?"dense":void 0);return g(e,n,r)},"number | BigNumber | Complex | Unit, Array, string":function(e,t,n){return t=u(t),h(t),g(e,t,n)},"number | BigNumber | Complex | Unit, Matrix, string":function(e,t,n){return h(t),g(e,t,n)}});function d(e,t){var r=s(e)?new a(-1):-1,i=l(e);e=p(e);return y([[i,n(r,e)],[e,i]],t)}function h(e){if(e=e.size(),e.length<1||3!==e[0])throw new RangeError("Vector must be of dimensions 1x3")}function m(e){return e.reduce((e,t)=>n(e,t))}function y(e,t){if(t){if("sparse"===t)return new f(e);if("dense"===t)return new c(e);throw new TypeError('Unknown matrix type "'.concat(t,'"'))}return e}function g(e,t,n){var u=o(t);if(0===u)throw new RangeError("Rotation around zero vector");var c=s(e)?a:null,f=c?new c(1):1,d=c?new c(-1):-1,h=c?new c(t.get([0])/u):t.get([0])/u,g=c?new c(t.get([1])/u):t.get([1])/u;c=c?new c(t.get([2])/u):t.get([2])/u,t=l(e),u=r(f,i(t)),f=p(e);return y([[r(t,m([h,h,u])),r(m([h,g,u]),m([d,c,f])),r(m([h,c,u]),m([g,f]))],[r(m([h,g,u]),m([c,f])),r(t,m([g,g,u])),r(m([g,c,u]),m([d,h,f]))],[r(m([h,c,u]),m([d,g,f])),r(m([g,c,u]),m([h,f])),r(t,m([c,c,u]))]],n)}}),Of=tt("std",["typed","sqrt","variance"],e=>{var{typed:e,sqrt:t,variance:n}=e;return e("std",{"Array | Matrix":r,"Array | Matrix, string":r,"Array | Matrix, number | BigNumber":r,"Array | Matrix, number | BigNumber, string":r,"...":function(e){return r(e)}});function r(e,r){if(0===e.length)throw new SyntaxError("Function std requires one or more parameters (0 provided)");try{return t(n.apply(null,arguments))}catch(e){throw e instanceof TypeError&&-1!==e.message.indexOf(" variance")?new TypeError(e.message.replace(" variance"," std")):e}}}),Cf=tt("mad",["typed","abs","map","median","subtract"],e=>{var{typed:e,abs:t,map:n,median:r,subtract:i}=e;return e("mad",{"Array | Matrix":o,"...":o});function o(e){if(0===(e=We(e.valueOf())).length)throw new Error("Cannot calculate median absolute deviation (mad) of an empty array");try{var o=r(e);return r(n(e,(function(e){return t(i(e,o))})))}catch(e){throw e instanceof TypeError&&-1!==e.message.indexOf("median")?new TypeError(e.message.replace("median","mad")):Ga(e,"mad")}}}),Tf=tt("rotate",["typed","multiply","rotationMatrix"],e=>{var{typed:e,multiply:t,rotationMatrix:n}=e;return e("rotate",{"Array , number | BigNumber | Complex | Unit":function(e,i){return r(e,2),t(n(i),e).toArray()},"Matrix , number | BigNumber | Complex | Unit":function(e,i){return r(e,2),t(n(i),e)},"Array, number | BigNumber | Complex | Unit, Array | Matrix":function(e,i,o){return r(e,3),t(n(i,o),e)},"Matrix, number | BigNumber | Complex | Unit, Array | Matrix":function(e,i,o){return r(e,3),t(n(i,o),e)}});function r(e,t){if(e=Array.isArray(e)?Be(e):e.size(),2{var{on:e,math:t}=e;function n(e){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");$(e)?this.value=e.value:this.value=e}function r(e,t){X(n.prototype,e,(function(){var e=t();if("function"==typeof e)return i(e)}))}function i(e){return function(){for(var t=[this.value],r=0;re[t])}(a);var s})(t),e&&e("import",(function(e,t,n){n||r(e,t)})),n},{isClass:!0}),ey=new Set(["end"]),ty=tt("Node",["mathWithTransform"],e=>{var t=e["mathWithTransform"];function n(){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator")}return n.prototype.evaluate=function(e){return this.compile().evaluate(e)},n.prototype.type="Node",n.prototype.isNode=!0,n.prototype.comment="",n.prototype.compile=function(){var e=this._compile(t,{}),n={},r=null;return{evaluate:function(t){var i,o=t=er(t);for(i of[...ey])if(o.has(i))throw new Error('Scope contains an illegal symbol, "'+i+'" is a reserved keyword');return e(t,n,r)}}},n.prototype._compile=function(e,t){throw new Error("Method _compile should be implemented by type "+this.type)},n.prototype.forEach=function(e){throw new Error("Cannot run forEach on a Node interface")},n.prototype.map=function(e){throw new Error("Cannot run map on a Node interface")},n.prototype._ifNode=function(e){if(z(e))return e;throw new TypeError("Callback function must return a Node")},n.prototype.traverse=function(e){e(this,null,null),function e(t,n){t.forEach((function(t,r,i){n(t,r,i),e(t,n)}))}(this,e)},n.prototype.transform=function(e){return function t(n,r,i){return r=e(n,r,i),r!==n?r:n.map(t)}(this,null,null)},n.prototype.filter=function(e){var t=[];return this.traverse((function(n,r,i){e(n,r,i)&&t.push(n)})),t},n.prototype.clone=function(){throw new Error("Cannot clone a Node interface")},n.prototype.cloneDeep=function(){return this.map((function(e){return e.cloneDeep()}))},n.prototype.equals=function(e){return!!e&&Z(this,e)},n.prototype.toString=function(e){var t=this._getCustomString(e);return void 0!==t?t:this._toString(e)},n.prototype.toJSON=function(){throw new Error("Cannot serialize object: toJSON not implemented by "+this.type)},n.prototype.toHTML=function(e){var t=this._getCustomString(e);return void 0!==t?t:this.toHTML(e)},n.prototype._toString=function(){throw new Error("_toString not implemented for "+this.type)},n.prototype.toTex=function(e){var t=this._getCustomString(e);return void 0!==t?t:this._toTex(e)},n.prototype._toTex=function(e){throw new Error("_toTex not implemented for "+this.type)},n.prototype._getCustomString=function(e){if(e&&"object"==typeof e)switch(typeof e.handler){case"object":case"undefined":return;case"function":return e.handler(this,e);default:throw new TypeError("Object or function expected as callback")}},n.prototype.getIdentifier=function(){return this.type},n.prototype.getContent=function(){return this},n},{isClass:!0,isNode:!0}),ny=tt("ObjectNode",["Node"],e=>{function t(e){if(!(this instanceof t))throw new SyntaxError("Constructor must be called with the new operator");if(this.properties=e||{},e&&("object"!=typeof e||!Object.keys(e).every((function(t){return z(e[t])}))))throw new TypeError("Object containing Nodes expected")}return e=e.Node,(t.prototype=new e).type="ObjectNode",t.prototype.isObjectNode=!0,t.prototype._compile=function(e,t){var n,r={};for(n in this.properties)if(J(this.properties,n)){var i=Te(n);i=JSON.parse(i);if(!Vn(this.properties,i))throw new Error('No access to property "'+i+'"');r[i]=this.properties[n]._compile(e,t)}return function(e,t,n){var i,o={};for(i in r)J(r,i)&&(o[i]=r[i](e,t,n));return o}},t.prototype.forEach=function(e){for(var t in this.properties)J(this.properties,t)&&e(this.properties[t],"properties["+Te(t)+"]",this)},t.prototype.map=function(e){var n,r={};for(n in this.properties)J(this.properties,n)&&(r[n]=this._ifNode(e(this.properties[n],"properties["+Te(n)+"]",this)));return new t(r)},t.prototype.clone=function(){var e,n={};for(e in this.properties)J(this.properties,e)&&(n[e]=this.properties[e]);return new t(n)},t.prototype._toString=function(e){var t,n=[];for(t in this.properties)J(this.properties,t)&&n.push(Te(t)+": "+this.properties[t].toString(e));return"{"+n.join(", ")+"}"},t.prototype.toJSON=function(){return{mathjs:"ObjectNode",properties:this.properties}},t.fromJSON=function(e){return new t(e.properties)},t.prototype.toHTML=function(e){var t,n=[];for(t in this.properties)J(this.properties,t)&&n.push(''+ke(t)+':'+this.properties[t].toHTML(e));return'{'+n.join(',')+'}'},t.prototype._toTex=function(e){var t,n=[];for(t in this.properties)J(this.properties,t)&&n.push("\\mathbf{"+t+":} & "+this.properties[t].toTex(e)+"\\\\");return"\\left\\{\\begin{array}{ll}".concat(n.join("\n"),"\\end{array}\\right\\}")},t},{isClass:!0,isNode:!0}),ry=[{AssignmentNode:{},FunctionAssignmentNode:{}},{ConditionalNode:{latexLeftParens:!1,latexRightParens:!1,latexParens:!1}},{"OperatorNode:or":{associativity:"left",associativeWith:[]}},{"OperatorNode:xor":{associativity:"left",associativeWith:[]}},{"OperatorNode:and":{associativity:"left",associativeWith:[]}},{"OperatorNode:bitOr":{associativity:"left",associativeWith:[]}},{"OperatorNode:bitXor":{associativity:"left",associativeWith:[]}},{"OperatorNode:bitAnd":{associativity:"left",associativeWith:[]}},{"OperatorNode:equal":{associativity:"left",associativeWith:[]},"OperatorNode:unequal":{associativity:"left",associativeWith:[]},"OperatorNode:smaller":{associativity:"left",associativeWith:[]},"OperatorNode:larger":{associativity:"left",associativeWith:[]},"OperatorNode:smallerEq":{associativity:"left",associativeWith:[]},"OperatorNode:largerEq":{associativity:"left",associativeWith:[]},RelationalNode:{associativity:"left",associativeWith:[]}},{"OperatorNode:leftShift":{associativity:"left",associativeWith:[]},"OperatorNode:rightArithShift":{associativity:"left",associativeWith:[]},"OperatorNode:rightLogShift":{associativity:"left",associativeWith:[]}},{"OperatorNode:to":{associativity:"left",associativeWith:[]}},{RangeNode:{}},{"OperatorNode:add":{associativity:"left",associativeWith:["OperatorNode:add","OperatorNode:subtract"]},"OperatorNode:subtract":{associativity:"left",associativeWith:[]}},{"OperatorNode:multiply":{associativity:"left",associativeWith:["OperatorNode:multiply","OperatorNode:divide","Operator:dotMultiply","Operator:dotDivide"]},"OperatorNode:divide":{associativity:"left",associativeWith:[],latexLeftParens:!1,latexRightParens:!1,latexParens:!1},"OperatorNode:dotMultiply":{associativity:"left",associativeWith:["OperatorNode:multiply","OperatorNode:divide","OperatorNode:dotMultiply","OperatorNode:doDivide"]},"OperatorNode:dotDivide":{associativity:"left",associativeWith:[]},"OperatorNode:mod":{associativity:"left",associativeWith:[]}},{"OperatorNode:unaryPlus":{associativity:"right"},"OperatorNode:unaryMinus":{associativity:"right"},"OperatorNode:bitNot":{associativity:"right"},"OperatorNode:not":{associativity:"right"}},{"OperatorNode:pow":{associativity:"right",associativeWith:[],latexRightParens:!1},"OperatorNode:dotPow":{associativity:"right",associativeWith:[]}},{"OperatorNode:factorial":{associativity:"left"}},{"OperatorNode:transpose":{associativity:"left"}}];function iy(e,t){for(var n=e,r=(n="keep"!==t?e.getContent():n).getIdentifier(),i=0;i>",rightLogShift:">>>",equal:"=",unequal:"\\neq",smaller:"<",larger:">",smallerEq:"\\leq",largerEq:"\\geq",bitAnd:"\\&",bitXor:"\\underline{|}",bitOr:"|",and:"\\wedge",xor:"\\veebar",or:"\\vee"},fy={abs:{1:"\\left|${args[0]}\\right|"},add:{2:"\\left(${args[0]}".concat(cy.add,"${args[1]}\\right)")},cbrt:{1:"\\sqrt[3]{${args[0]}}"},ceil:{1:"\\left\\lceil${args[0]}\\right\\rceil"},cube:{1:"\\left(${args[0]}\\right)^3"},divide:{2:"\\frac{${args[0]}}{${args[1]}}"},dotDivide:{2:"\\left(${args[0]}".concat(cy.dotDivide,"${args[1]}\\right)")},dotMultiply:{2:"\\left(${args[0]}".concat(cy.dotMultiply,"${args[1]}\\right)")},dotPow:{2:"\\left(${args[0]}".concat(cy.dotPow,"${args[1]}\\right)")},exp:{1:"\\exp\\left(${args[0]}\\right)"},expm1:"\\left(e".concat(cy.pow,"{${args[0]}}-1\\right)"),fix:{1:"\\mathrm{${name}}\\left(${args[0]}\\right)"},floor:{1:"\\left\\lfloor${args[0]}\\right\\rfloor"},gcd:"\\gcd\\left(${args}\\right)",hypot:"\\hypot\\left(${args}\\right)",log:{1:"\\ln\\left(${args[0]}\\right)",2:"\\log_{${args[1]}}\\left(${args[0]}\\right)"},log10:{1:"\\log_{10}\\left(${args[0]}\\right)"},log1p:{1:"\\ln\\left(${args[0]}+1\\right)",2:"\\log_{${args[1]}}\\left(${args[0]}+1\\right)"},log2:"\\log_{2}\\left(${args[0]}\\right)",mod:{2:"\\left(${args[0]}".concat(cy.mod,"${args[1]}\\right)")},multiply:{2:"\\left(${args[0]}".concat(cy.multiply,"${args[1]}\\right)")},norm:{1:"\\left\\|${args[0]}\\right\\|",2:void 0},nthRoot:{2:"\\sqrt[${args[1]}]{${args[0]}}"},nthRoots:{2:"\\{y : $y^{args[1]} = {${args[0]}}\\}"},pow:{2:"\\left(${args[0]}\\right)".concat(cy.pow,"{${args[1]}}")},round:{1:"\\left\\lfloor${args[0]}\\right\\rceil",2:void 0},sign:{1:"\\mathrm{${name}}\\left(${args[0]}\\right)"},sqrt:{1:"\\sqrt{${args[0]}}"},square:{1:"\\left(${args[0]}\\right)^2"},subtract:{2:"\\left(${args[0]}".concat(cy.subtract,"${args[1]}\\right)")},unaryMinus:{1:"".concat(cy.unaryMinus,"\\left(${args[0]}\\right)")},unaryPlus:{1:"".concat(cy.unaryPlus,"\\left(${args[0]}\\right)")},bitAnd:{2:"\\left(${args[0]}".concat(cy.bitAnd,"${args[1]}\\right)")},bitNot:{1:cy.bitNot+"\\left(${args[0]}\\right)"},bitOr:{2:"\\left(${args[0]}".concat(cy.bitOr,"${args[1]}\\right)")},bitXor:{2:"\\left(${args[0]}".concat(cy.bitXor,"${args[1]}\\right)")},leftShift:{2:"\\left(${args[0]}".concat(cy.leftShift,"${args[1]}\\right)")},rightArithShift:{2:"\\left(${args[0]}".concat(cy.rightArithShift,"${args[1]}\\right)")},rightLogShift:{2:"\\left(${args[0]}".concat(cy.rightLogShift,"${args[1]}\\right)")},bellNumbers:{1:"\\mathrm{B}_{${args[0]}}"},catalan:{1:"\\mathrm{C}_{${args[0]}}"},stirlingS2:{2:"\\mathrm{S}\\left(${args}\\right)"},arg:{1:"\\arg\\left(${args[0]}\\right)"},conj:{1:"\\left(${args[0]}\\right)^*"},im:{1:"\\Im\\left\\lbrace${args[0]}\\right\\rbrace"},re:{1:"\\Re\\left\\lbrace${args[0]}\\right\\rbrace"},and:{2:"\\left(${args[0]}".concat(cy.and,"${args[1]}\\right)")},not:{1:cy.not+"\\left(${args[0]}\\right)"},or:{2:"\\left(${args[0]}".concat(cy.or,"${args[1]}\\right)")},xor:{2:"\\left(${args[0]}".concat(cy.xor,"${args[1]}\\right)")},cross:{2:"\\left(${args[0]}\\right)\\times\\left(${args[1]}\\right)"},ctranspose:{1:"\\left(${args[0]}\\right)".concat(cy.ctranspose)},det:{1:"\\det\\left(${args[0]}\\right)"},dot:{2:"\\left(${args[0]}\\cdot${args[1]}\\right)"},expm:{1:"\\exp\\left(${args[0]}\\right)"},inv:{1:"\\left(${args[0]}\\right)^{-1}"},pinv:{1:"\\left(${args[0]}\\right)^{+}"},sqrtm:{1:"{${args[0]}}".concat(cy.pow,"{\\frac{1}{2}}")},trace:{1:"\\mathrm{tr}\\left(${args[0]}\\right)"},transpose:{1:"\\left(${args[0]}\\right)".concat(cy.transpose)},combinations:{2:"\\binom{${args[0]}}{${args[1]}}"},combinationsWithRep:{2:"\\left(\\!\\!{\\binom{${args[0]}}{${args[1]}}}\\!\\!\\right)"},factorial:{1:"\\left(${args[0]}\\right)".concat(cy.factorial)},gamma:{1:"\\Gamma\\left(${args[0]}\\right)"},lgamma:{1:"\\ln\\Gamma\\left(${args[0]}\\right)"},equal:{2:"\\left(${args[0]}".concat(cy.equal,"${args[1]}\\right)")},larger:{2:"\\left(${args[0]}".concat(cy.larger,"${args[1]}\\right)")},largerEq:{2:"\\left(${args[0]}".concat(cy.largerEq,"${args[1]}\\right)")},smaller:{2:"\\left(${args[0]}".concat(cy.smaller,"${args[1]}\\right)")},smallerEq:{2:"\\left(${args[0]}".concat(cy.smallerEq,"${args[1]}\\right)")},unequal:{2:"\\left(${args[0]}".concat(cy.unequal,"${args[1]}\\right)")},erf:{1:"erf\\left(${args[0]}\\right)"},max:"\\max\\left(${args}\\right)",min:"\\min\\left(${args}\\right)",variance:"\\mathrm{Var}\\left(${args}\\right)",acos:{1:"\\cos^{-1}\\left(${args[0]}\\right)"},acosh:{1:"\\cosh^{-1}\\left(${args[0]}\\right)"},acot:{1:"\\cot^{-1}\\left(${args[0]}\\right)"},acoth:{1:"\\coth^{-1}\\left(${args[0]}\\right)"},acsc:{1:"\\csc^{-1}\\left(${args[0]}\\right)"},acsch:{1:"\\mathrm{csch}^{-1}\\left(${args[0]}\\right)"},asec:{1:"\\sec^{-1}\\left(${args[0]}\\right)"},asech:{1:"\\mathrm{sech}^{-1}\\left(${args[0]}\\right)"},asin:{1:"\\sin^{-1}\\left(${args[0]}\\right)"},asinh:{1:"\\sinh^{-1}\\left(${args[0]}\\right)"},atan:{1:"\\tan^{-1}\\left(${args[0]}\\right)"},atan2:{2:"\\mathrm{atan2}\\left(${args}\\right)"},atanh:{1:"\\tanh^{-1}\\left(${args[0]}\\right)"},cos:{1:"\\cos\\left(${args[0]}\\right)"},cosh:{1:"\\cosh\\left(${args[0]}\\right)"},cot:{1:"\\cot\\left(${args[0]}\\right)"},coth:{1:"\\coth\\left(${args[0]}\\right)"},csc:{1:"\\csc\\left(${args[0]}\\right)"},csch:{1:"\\mathrm{csch}\\left(${args[0]}\\right)"},sec:{1:"\\sec\\left(${args[0]}\\right)"},sech:{1:"\\mathrm{sech}\\left(${args[0]}\\right)"},sin:{1:"\\sin\\left(${args[0]}\\right)"},sinh:{1:"\\sinh\\left(${args[0]}\\right)"},tan:{1:"\\tan\\left(${args[0]}\\right)"},tanh:{1:"\\tanh\\left(${args[0]}\\right)"},to:{2:"\\left(${args[0]}".concat(cy.to,"${args[1]}\\right)")},numeric:function(e,t){return e.args[0].toTex()},number:{0:"0",1:"\\left(${args[0]}\\right)",2:"\\left(\\left(${args[0]}\\right)${args[1]}\\right)"},string:{0:'\\mathtt{""}',1:"\\mathrm{string}\\left(${args[0]}\\right)"},bignumber:{0:"0",1:"\\left(${args[0]}\\right)"},complex:{0:"0",1:"\\left(${args[0]}\\right)",2:"\\left(\\left(${args[0]}\\right)+".concat(uy.i,"\\cdot\\left(${args[1]}\\right)\\right)")},matrix:{0:"\\begin{bmatrix}\\end{bmatrix}",1:"\\left(${args[0]}\\right)",2:"\\left(${args[0]}\\right)"},sparse:{0:"\\begin{bsparse}\\end{bsparse}",1:"\\left(${args[0]}\\right)"},unit:{1:"\\left(${args[0]}\\right)",2:"\\left(\\left(${args[0]}\\right)${args[1]}\\right)"}},ly={deg:"^\\circ"};function py(e){return sy()(e,{preserveFormatting:!0})}function dy(e,t){return(t=void 0!==t&&t)?J(ly,e)?ly[e]:"\\mathrm{"+py(e)+"}":J(uy,e)?uy[e]:py(e)}var hy=tt("OperatorNode",["Node"],e=>{function t(e,n,r,i,o){if(!(this instanceof t))throw new SyntaxError("Constructor must be called with the new operator");if("string"!=typeof e)throw new TypeError('string expected for parameter "op"');if("string"!=typeof n)throw new TypeError('string expected for parameter "fn"');if(!Array.isArray(r)||!r.every(z))throw new TypeError('Array containing Nodes expected for parameter "args"');this.implicit=!0===i,this.isPercentage=!0===o,this.op=e,this.fn=n,this.args=r||[]}function n(e,t,n,r,i){var o,a=iy(e,t),s=oy(e,t);if("all"===t||2('+t+')'),"right"===r?''+ke(this.op)+""+t:t+''+ke(this.op)+""):2===o.length?(r=o[0].toHTML(e),t=o[1].toHTML(e),a[0]&&(r='('+r+')'),a[1]&&(t='('+t+')'),this.implicit&&"OperatorNode:multiply"===this.getIdentifier()&&"hide"===i?r+''+t:r+''+ke(this.op)+""+t):(r=o.map((function(t,n){return t=t.toHTML(e),a[n]?'('+t+')':t})),2'):r.join(''+ke(this.op)+""):''+ke(this.fn)+'('+r.join(',')+')')},t.prototype._toTex=function(e){var t,r=e&&e.parenthesis?e.parenthesis:"keep",i=e&&e.implicit?e.implicit:"hide",o=this.args,a=n(this,r,i,o,!0),s=void 0===(s=cy[this.fn])?this.op:s;if(1===o.length)return t=oy(this,r),u=o[0].toTex(e),a[0]&&(u="\\left(".concat(u,"\\right)")),"right"===t?s+u:u+s;if(2!==o.length)return 2{function t(e){if(!(this instanceof t))throw new SyntaxError("Constructor must be called with the new operator");if(!z(e))throw new TypeError('Node expected for parameter "content"');this.content=e}return e=e.Node,(t.prototype=new e).type="ParenthesisNode",t.prototype.isParenthesisNode=!0,t.prototype._compile=function(e,t){return this.content._compile(e,t)},t.prototype.getContent=function(){return this.content.getContent()},t.prototype.forEach=function(e){e(this.content,"content",this)},t.prototype.map=function(e){return new t(e(this.content,"content",this))},t.prototype.clone=function(){return new t(this.content)},t.prototype._toString=function(e){return!e||!e.parenthesis||e&&"keep"===e.parenthesis?"("+this.content.toString(e)+")":this.content.toString(e)},t.prototype.toJSON=function(){return{mathjs:"ParenthesisNode",content:this.content}},t.fromJSON=function(e){return new t(e.content)},t.prototype.toHTML=function(e){return!e||!e.parenthesis||e&&"keep"===e.parenthesis?'('+this.content.toHTML(e)+')':this.content.toHTML(e)},t.prototype._toTex=function(e){return!e||!e.parenthesis||e&&"keep"===e.parenthesis?"\\left(".concat(this.content.toTex(e),"\\right)"):this.content.toTex(e)},t},{isClass:!0,isNode:!0}),yy=tt("RelationalNode",["Node"],e=>{function t(e,n){if(!(this instanceof t))throw new SyntaxError("Constructor must be called with the new operator");if(!Array.isArray(e))throw new TypeError("Parameter conditionals must be an array");if(!Array.isArray(n))throw new TypeError("Parameter params must be an array");if(e.length!==n.length-1)throw new TypeError("Parameter params must contain exactly one more element than parameter conditionals");this.conditionals=e,this.params=n}return e=e.Node,(t.prototype=new e).type="RelationalNode",t.prototype.isRelationalNode=!0,t.prototype._compile=function(e,t){var n=this,r=this.params.map(n=>n._compile(e,t));return function(t,i,o){for(var a=r[0](t,i,o),s=0;se(t,"params["+n+"]",this),this)},t.prototype.map=function(e){return new t(this.conditionals.slice(),this.params.map((t,n)=>this._ifNode(e(t,"params["+n+"]",this)),this))},t.prototype.clone=function(){return new t(this.conditionals,this.params)},t.prototype._toString=function(e){for(var t=e&&e.parenthesis?e.parenthesis:"keep",n=iy(this,t),r=this.params.map((function(r,i){var o=iy(r,t);return"all"===t||null!==o&&o<=n?"("+r.toString(e)+")":r.toString(e)})),i={equal:"==",unequal:"!=",smaller:"<",larger:">",smallerEq:"<=",largerEq:">="},o=r[0],a=0;a('+r.toHTML(e)+')':r.toHTML(e)})),i={equal:"==",unequal:"!=",smaller:"<",larger:">",smallerEq:"<=",largerEq:">="},o=r[0],a=0;a'+ke(i[this.conditionals[a]])+""+r[a+1];return o},t.prototype._toTex=function(e){for(var t=e&&e.parenthesis?e.parenthesis:"keep",n=iy(this,t),r=this.params.map((function(r,i){var o=iy(r,t);return"all"===t||null!==o&&o<=n?"\\left("+r.toTex(e)+"\right)":r.toTex(e)})),i=r[0],o=0;o{function t(e){if(!(this instanceof t))throw new SyntaxError("Constructor must be called with the new operator");if(this.items=e||[],!Array.isArray(this.items)||!this.items.every(z))throw new TypeError("Array containing Nodes expected")}return e=e.Node,(t.prototype=new e).type="ArrayNode",t.prototype.isArrayNode=!0,t.prototype._compile=function(e,t){var n,r=Ge(this.items,(function(n){return n._compile(e,t)}));return"Array"!==e.config.matrix?(n=e.matrix,function(e,t,i){return n(Ge(r,(function(n){return n(e,t,i)})))}):function(e,t,n){return Ge(r,(function(r){return r(e,t,n)}))}},t.prototype.forEach=function(e){for(var t=0;t['+this.items.map((function(t){return t.toHTML(e)})).join(',')+']'},t.prototype._toTex=function(e){return function t(n,r){var i=n.some(O)&&!n.every(O),o=r||i,a=o?"&":"\\\\";n=n.map((function(n){return n.items?t(n.items,!r):n.toTex(e)})).join(a);return i||!o||o&&!r?"\\begin{bmatrix}"+n+"\\end{bmatrix}":n}(this.items,!1)},t},{isClass:!0,isNode:!0}),vy=tt("BlockNode",["ResultSet","Node"],e=>{var{ResultSet:t,Node:e}=e;function n(e){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");if(!Array.isArray(e))throw new Error("Array expected");this.blocks=e.map((function(e){var t=e&&e.node;e=!e||void 0===e.visible||e.visible;if(!z(t))throw new TypeError('Property "node" must be a Node');if("boolean"!=typeof e)throw new TypeError('Property "visible" must be a boolean');return{node:t,visible:e}}))}return(n.prototype=new e).type="BlockNode",n.prototype.isBlockNode=!0,n.prototype._compile=function(e,n){var r=Ge(this.blocks,(function(t){return{evaluate:t.node._compile(e,n),visible:t.visible}}));return function(e,n,i){var o=[];return Ve(r,(function(t){var r=t.evaluate(e,n,i);t.visible&&o.push(r)})),new t(o)}},n.prototype.forEach=function(e){for(var t=0;t;')})).join('
')},n.prototype._toTex=function(e){return this.blocks.map((function(t){return t.node.toTex(e)+(t.visible?"":";")})).join("\\;\\;\n")},n},{isClass:!0,isNode:!0}),by=tt("ConditionalNode",["Node"],e=>{function t(e,n,r){if(!(this instanceof t))throw new SyntaxError("Constructor must be called with the new operator");if(!z(e))throw new TypeError("Parameter condition must be a Node");if(!z(n))throw new TypeError("Parameter trueExpr must be a Node");if(!z(r))throw new TypeError("Parameter falseExpr must be a Node");this.condition=e,this.trueExpr=n,this.falseExpr=r}return e=e.Node,(t.prototype=new e).type="ConditionalNode",t.prototype.isConditionalNode=!0,t.prototype._compile=function(e,t){var n=this.condition._compile(e,t),r=this.trueExpr._compile(e,t),i=this.falseExpr._compile(e,t);return function(e,t,o){return(function(e){if("number"==typeof e||"boolean"==typeof e||"string"==typeof e)return e;if(e){if(s(e))return!e.isZero();if(u(e))return e.re||e.im;if(f(e))return e.value}if(null!=e)throw new TypeError('Unsupported type of condition "'+H(e)+'"')}(n(e,t,o))?r:i)(e,t,o)}},t.prototype.forEach=function(e){e(this.condition,"condition",this),e(this.trueExpr,"trueExpr",this),e(this.falseExpr,"falseExpr",this)},t.prototype.map=function(e){return new t(this._ifNode(e(this.condition,"condition",this)),this._ifNode(e(this.trueExpr,"trueExpr",this)),this._ifNode(e(this.falseExpr,"falseExpr",this)))},t.prototype.clone=function(){return new t(this.condition,this.trueExpr,this.falseExpr)},t.prototype._toString=function(e){var t=e&&e.parenthesis?e.parenthesis:"keep",n=iy(this,t),r=this.condition.toString(e),i=iy(this.condition,t),o=(i=(("all"===t||"OperatorNode"===this.condition.type||null!==i&&i<=n)&&(r="("+r+")"),this.trueExpr.toString(e)),iy(this.trueExpr,t));("all"===t||"OperatorNode"===this.trueExpr.type||null!==o&&o<=n)&&(i="("+i+")"),o=this.falseExpr.toString(e),e=iy(this.falseExpr,t);return r+" ? "+i+" : "+("all"===t||"OperatorNode"===this.falseExpr.type||null!==e&&e<=n?"("+o+")":o)},t.prototype.toJSON=function(){return{mathjs:"ConditionalNode",condition:this.condition,trueExpr:this.trueExpr,falseExpr:this.falseExpr}},t.fromJSON=function(e){return new t(e.condition,e.trueExpr,e.falseExpr)},t.prototype.toHTML=function(e){var t=e&&e.parenthesis?e.parenthesis:"keep",n=iy(this,t),r=this.condition.toHTML(e),i=iy(this.condition,t),o=(i=(("all"===t||"OperatorNode"===this.condition.type||null!==i&&i<=n)&&(r='('+r+')'),this.trueExpr.toHTML(e)),iy(this.trueExpr,t));("all"===t||"OperatorNode"===this.trueExpr.type||null!==o&&o<=n)&&(i='('+i+')'),o=this.falseExpr.toHTML(e),e=iy(this.falseExpr,t);return r+'?'+i+':'+("all"===t||"OperatorNode"===this.falseExpr.type||null!==e&&e<=n?'('+o+')':o)},t.prototype._toTex=function(e){return"\\begin{cases} {"+this.trueExpr.toTex(e)+"}, &\\quad{\\text{if }\\;"+this.condition.toTex(e)+"}\\\\{"+this.falseExpr.toTex(e)+"}, &\\quad{\\text{otherwise}}\\end{cases}"},t},{isClass:!0,isNode:!0}),xy=tt("ConstantNode",["Node"],e=>{function t(e){if(!(this instanceof t))throw new SyntaxError("Constructor must be called with the new operator");this.value=e}return e=e.Node,(t.prototype=new e).type="ConstantNode",t.prototype.isConstantNode=!0,t.prototype._compile=function(e,t){var n=this.value;return function(){return n}},t.prototype.forEach=function(e){},t.prototype.map=function(e){return this.clone()},t.prototype.clone=function(){return new t(this.value)},t.prototype._toString=function(e){return Ce(this.value,e)},t.prototype.toHTML=function(e){var t=this._toString(e);switch(H(this.value)){case"number":case"BigNumber":case"Fraction":return''+t+"";case"string":return''+t+"";case"boolean":return''+t+"";case"null":return''+t+"";case"undefined":return''+t+"";default:return''+t+""}},t.prototype.toJSON=function(){return{mathjs:"ConstantNode",value:this.value}},t.fromJSON=function(e){return new t(e.value)},t.prototype._toTex=function(e){var t,n=this._toString(e);switch(H(this.value)){case"string":return"\\mathtt{"+py(n)+"}";case"number":case"BigNumber":return isFinite(this.value)?-1!==(t=n.toLowerCase().indexOf("e"))?n.substring(0,t)+"\\cdot10^{"+n.substring(t+1)+"}":n:this.value.valueOf()<0?"-\\infty":"\\infty";case"Fraction":return this.value.toLatex();default:return n}},t},{isClass:!0,isNode:!0}),wy=tt("RangeNode",["Node"],e=>{function t(e,n,r){if(!(this instanceof t))throw new SyntaxError("Constructor must be called with the new operator");if(!z(e))throw new TypeError("Node expected");if(!z(n))throw new TypeError("Node expected");if(r&&!z(r))throw new TypeError("Node expected");if(3('+r+')':r,this.step&&(i=this.step.toHTML(e),r+=':'+(i=t.step?'('+i+')':i)),this.end.toHTML(e));return r+':'+(t.end?'('+i+')':i)},t.prototype._toTex=function(e){var t=n(this,e&&e.parenthesis?e.parenthesis:"keep"),r=this.start.toTex(e),i=(t.start&&(r="\\left(".concat(r,"\\right)")),this.step&&(i=this.step.toTex(e),r+=":"+(i=t.step?"\\left(".concat(i,"\\right)"):i)),this.end.toTex(e));return r+":"+(t.end?"\\left(".concat(i,"\\right)"):i)},t},{isClass:!0,isNode:!0}),Ny=tt("reviver",["classes"],e=>{var t=e["classes"];return function(e,n){var r=t[n&&n.mathjs];return r&&"function"==typeof r.fromJSON?r.fromJSON(n):n}}),Sy=tt("chain",["typed","Chain"],e=>{var{typed:e,Chain:t}=e;return e("chain",{"":function(){return new t},any:function(e){return new t(e)}})}),_y=tt("FunctionAssignmentNode",["typed","Node"],e=>{var{typed:t,Node:e}=e;function n(e,t,r){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");if("string"!=typeof e)throw new TypeError('String expected for parameter "name"');if(!Array.isArray(t))throw new TypeError('Array containing strings or objects expected for parameter "params"');if(!z(r))throw new TypeError('Node expected for parameter "expr"');if(ey.has(e))throw new Error('Illegal function name, "'+e+'" is a reserved keyword');this.name=e,this.params=t.map((function(e){return e&&e.name||e})),this.types=t.map((function(e){return e&&e.type||"any"})),this.expr=r}function r(e,t){var n=iy(e,t);e=iy(e.expr,t);return"all"===t||null!==e&&e<=n}return(n.prototype=new e).type="FunctionAssignmentNode",n.prototype.isFunctionAssignmentNode=!0,n.prototype._compile=function(e,n){var r=Object.create(n),i=(Ve(this.params,(function(e){r[e]=!0})),this.expr._compile(e,r)),o=this.name,a=this.params,s=Xe(this.types,","),u=o+"("+Xe(this.params,", ")+")";return function(e,n,r){var c={};c[s]=function(){for(var t=Object.create(n),o=0;o'+ke(this.params[i])+"");return e=this.expr.toHTML(e),r(this,t)&&(e='('+e+')'),''+ke(this.name)+'('+n.join(',')+')='+e},n.prototype._toTex=function(e){var t=e&&e.parenthesis?e.parenthesis:"keep";e=this.expr.toTex(e);return r(this,t)&&(e="\\left(".concat(e,"\\right)")),"\\mathrm{"+this.name+"}\\left("+this.params.map(dy).join(",")+"\\right):="+e},n},{isClass:!0,isNode:!0});function Dy(e){return e&&e.isIndexError?new je(e.index+1,e.min+1,void 0!==e.max?e.max+1:void 0):e}function My(e){var t=e["subset"];return function(e,n){try{if(Array.isArray(e))return t(e,n);if(e&&"function"==typeof e.subset)return e.subset(n);if("string"==typeof e)return t(e,n);if("object"!=typeof e)throw new TypeError("Cannot apply index: unsupported type of object");if(n.isObjectProperty())return Wn(e,n.getObjectProperty());throw new TypeError("Cannot apply a numeric index as object property")}catch(e){throw Dy(e)}}}var Ey=tt("AccessorNode",["subset","Node"],e=>{var{subset:e,Node:t}=e,n=My({subset:e});function r(e,t){if(!(this instanceof r))throw new SyntaxError("Constructor must be called with the new operator");if(!z(e))throw new TypeError('Node expected for parameter "object"');if(!B(t))throw new TypeError('IndexNode expected for parameter "index"');this.object=e||null,this.index=t,Object.defineProperty(this,"name",{get:function(){return this.index?this.index.isObjectProperty()?this.index.getObjectProperty():"":this.object.name||""}.bind(this),set:function(){throw new Error("Cannot assign a new name, name is read-only")}})}function i(e){return!(A(e)||O(e)||I(e)||j(e)||q(e)||F(e)||U(e))}return(r.prototype=new t).type="AccessorNode",r.prototype.isAccessorNode=!0,r.prototype._compile=function(e,t){var r,i=this.object._compile(e,t),o=this.index._compile(e,t);return this.index.isObjectProperty()?(r=this.index.getObjectProperty(),function(e,t,n){return Wn(i(e,t,n),r)}):function(e,t,r){return r=i(e,t,r),e=o(e,t,r),n(r,e)}},r.prototype.forEach=function(e){e(this.object,"object",this),e(this.index,"index",this)},r.prototype.map=function(e){return new r(this._ifNode(e(this.object,"object",this)),this._ifNode(e(this.index,"index",this)))},r.prototype.clone=function(){return new r(this.object,this.index)},r.prototype._toString=function(e){var t=this.object.toString(e);return(t=i(this.object)?"("+t+")":t)+this.index.toString(e)},r.prototype.toHTML=function(e){var t=this.object.toHTML(e);return(t=i(this.object)?'('+t+')':t)+this.index.toHTML(e)},r.prototype._toTex=function(e){var t=this.object.toTex(e);return(t=i(this.object)?"\\left(' + object + '\\right)":t)+this.index.toTex(e)},r.prototype.toJSON=function(){return{mathjs:"AccessorNode",object:this.object,index:this.index}},r.fromJSON=function(e){return new r(e.object,e.index)},r},{isClass:!0,isNode:!0}),Ay=tt("AssignmentNode",["subset","?matrix","Node"],e=>{var{subset:e,matrix:t,Node:n}=e,r=My({subset:e}),i=function(e){var{subset:t,matrix:n}=e;return function(e,r,i){try{if(Array.isArray(e))return n(e).subset(r,i).valueOf();if(e&&"function"==typeof e.subset)return e.subset(r,i);if("string"==typeof e)return t(e,r,i);if("object"!=typeof e)throw new TypeError("Cannot apply index: unsupported type of object");if(r.isObjectProperty())return Gn(e,r.getObjectProperty(),i),e;throw TypeError("Cannot apply a numeric index as object property")}catch(e){throw Dy(e)}}}({subset:e,matrix:t});function o(e,t,n){if(!(this instanceof o))throw new SyntaxError("Constructor must be called with the new operator");if(this.object=e,this.index=n?t:null,this.value=n||t,!U(e)&&!A(e))throw new TypeError('SymbolNode or AccessorNode expected as "object"');if(U(e)&&"end"===e.name)throw new Error('Cannot assign to symbol "end"');if(this.index&&!B(this.index))throw new TypeError('IndexNode expected as "index"');if(!z(this.value))throw new TypeError('Node expected as "value"');Object.defineProperty(this,"name",{get:function(){return this.index?this.index.isObjectProperty()?this.index.getObjectProperty():"":this.object.name||""}.bind(this),set:function(){throw new Error("Cannot assign a new name, name is read-only")}})}function a(e,t){var n=iy(e,t=t||"keep");e=iy(e.value,t);return"all"===t||null!==e&&e<=n}return(o.prototype=new n).type="AssignmentNode",o.prototype.isAssignmentNode=!0,o.prototype._compile=function(e,t){var n,o,a,s,u=this.object._compile(e,t),c=this.index?this.index._compile(e,t):null,f=this.value._compile(e,t),l=this.object.name;if(this.index)return this.index.isObjectProperty()?(n=this.index.getObjectProperty(),function(e,t,r){var i=u(e,t,r);e=f(e,t,r);return Gn(i,n,e),e}):U(this.object)?function(e,t,n){var r=u(e,t,n);n=f(e,t,n),t=c(e,t,r);return e.set(l,i(r,t,n)),n}:(o=this.object.object._compile(e,t),this.object.index.isObjectProperty()?(a=this.object.index.getObjectProperty(),function(e,t,n){var r=o(e,t,n),s=Wn(r,a),u=c(e,t,s);e=f(e,t,n);return Gn(r,a,i(s,u,e)),e}):(s=this.object.index._compile(e,t),function(e,t,n){var a=o(e,t,n),u=s(e,t,a),l=r(a,u),p=c(e,t,l);e=f(e,t,n);return i(a,u,i(l,p,e)),e}));if(U(this.object))return function(e,t,n){return t=f(e,t,n),e.set(l,t),t};throw new TypeError("SymbolNode expected as object")},o.prototype.forEach=function(e){e(this.object,"object",this),this.index&&e(this.index,"index",this),e(this.value,"value",this)},o.prototype.map=function(e){return new o(this._ifNode(e(this.object,"object",this)),this.index?this._ifNode(e(this.index,"index",this)):null,this._ifNode(e(this.value,"value",this)))},o.prototype.clone=function(){return new o(this.object,this.index,this.value)},o.prototype._toString=function(e){var t=this.object.toString(e),n=this.index?this.index.toString(e):"",r=this.value.toString(e);return t+n+" = "+(a(this,e&&e.parenthesis)?"("+r+")":r)},o.prototype.toJSON=function(){return{mathjs:"AssignmentNode",object:this.object,index:this.index,value:this.value}},o.fromJSON=function(e){return new o(e.object,e.index,e.value)},o.prototype.toHTML=function(e){var t=this.object.toHTML(e),n=this.index?this.index.toHTML(e):"",r=this.value.toHTML(e);return t+n+'='+(a(this,e&&e.parenthesis)?'('+r+')':r)},o.prototype._toTex=function(e){var t=this.object.toTex(e),n=this.index?this.index.toTex(e):"",r=this.value.toTex(e);return t+n+":="+(a(this,e&&e.parenthesis)?"\\left(".concat(r,"\\right)"):r)},o},{isClass:!0,isNode:!0}),Oy=tt("IndexNode",["Node","size"],e=>{var{Node:e,size:t}=e;function n(e,t){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");if(this.dimensions=e,this.dotNotation=t||!1,!Array.isArray(e)||!e.every(z))throw new TypeError('Array containing Nodes expected for parameter "dimensions"');if(this.dotNotation&&!this.isObjectProperty())throw new Error("dotNotation only applicable for object properties")}return(n.prototype=new e).type="IndexNode",n.prototype.isIndexNode=!0,n.prototype._compile=function(e,n){var r=Ge(this.dimensions,(function(r,i){var o,a;return 0e.isSymbolNode&&"end"===e.name).length?((o=Object.create(n)).end=!0,a=r._compile(e,o),function(e,n,r){var o;if(d(r)||p(r)||l(r))return o=t(r).valueOf(),(n=Object.create(n)).end=o[i],a(e,n,r);throw new TypeError('Cannot resolve "end": context must be a Matrix, Array, or string but is '+H(r))}):r._compile(e,n)})),i=Wn(e,"index");return function(e,t,n){var o=Ge(r,(function(r){return r(e,t,n)}));return i(...o)}},n.prototype.forEach=function(e){for(var t=0;t.'+ke(this.getObjectProperty())+"":'['+t.join(',')+']'},n.prototype._toTex=function(e){var t=this.dimensions.map((function(t){return t.toTex(e)}));return this.dotNotation?"."+this.getObjectProperty():"_{"+t.join(",")+"}"},n},{isClass:!0,isNode:!0}),Cy=tt("SymbolNode",["math","?Unit","Node"],e=>{var{math:t,Unit:n,Node:e}=e;function r(e){return!!n&&n.isValuelessUnit(e)}function i(e){if(!(this instanceof i))throw new SyntaxError("Constructor must be called with the new operator");if("string"!=typeof e)throw new TypeError('String expected for parameter "name"');this.name=e}return(i.prototype=new e).type="SymbolNode",i.prototype.isSymbolNode=!0,i.prototype._compile=function(e,t){var o,a=this.name;return!0===t[a]?function(e,t,n){return t[a]}:a in e?function(t,n,r){return t.has(a)?t.get(a):Wn(e,a)}:(o=r(a),function(e,t,r){return e.has(a)?e.get(a):o?new n(null,a):i.onUndefinedSymbol(a)})},i.prototype.forEach=function(e){},i.prototype.map=function(e){return this.clone()},i.onUndefinedSymbol=function(e){throw new Error("Undefined symbol "+e)},i.prototype.clone=function(){return new i(this.name)},i.prototype._toString=function(e){return this.name},i.prototype.toHTML=function(e){var t=ke(this.name);return"true"===t||"false"===t?''+t+"":"i"===t?''+t+"":"Infinity"===t?''+t+"":"NaN"===t?''+t+"":"null"===t?''+t+"":"undefined"===t?''+t+"":''+t+""},i.prototype.toJSON=function(){return{mathjs:"SymbolNode",name:this.name}},i.fromJSON=function(e){return new i(e.name)},i.prototype._toTex=function(e){var n=!1;void 0===t[this.name]&&r(this.name)&&(n=!0),n=dy(this.name,n);return"\\"===n[0]?n:" "+n},i},{isClass:!0,isNode:!0});function Ty(e){for(var t=arguments.length,n=new Array(1{var{math:t,Node:e,SymbolNode:n}=e;function r(e,t){if(!(this instanceof r))throw new SyntaxError("Constructor must be called with the new operator");if(!z(e="string"==typeof e?new n(e):e))throw new TypeError('Node expected as parameter "fn"');if(!Array.isArray(t)||!t.every(z))throw new TypeError('Array containing Nodes expected for parameter "args"');this.fn=e,this.args=t||[],Object.defineProperty(this,"name",{get:function(){return this.fn.name||""}.bind(this),set:function(){throw new Error("Cannot assign a new name, name is read-only")}})}(r.prototype=new e).type="FunctionNode",r.prototype.isFunctionNode=!0;var i=e=>Ce(e,{truncate:78}),o=(r.prototype._compile=function(e,t){if(!(this instanceof r))throw new TypeError("No valid FunctionNode");var n,o,a,s,u,c,f=this.args.map(n=>n._compile(e,t));if(!U(this.fn))return A(this.fn)&&B(this.fn.index)&&this.fn.index.isObjectProperty()?(n=this.fn.object._compile(e,t),o=this.fn.index.getObjectProperty(),a=this.args,function(t,r,i){var s,u=n(t,r,i),c=o;if(Zn(u,c))return u[o]&&u[o].rawArgs?u[o](a,e,Ty(t,r),t):(s=f.map(e=>e(t,r,i)),u[o].apply(u,s));throw new Error('No access to method "'+c+'"')}):(s=this.fn.toString(),u=this.fn._compile(e,t),c=this.args,function(t,n,r){var o,a=u(t,n,r);if("function"!=typeof a)throw new TypeError("Expression '".concat(s,"' did not evaluate to a function; value is:")+"\n ".concat(i(a)));return a.rawArgs?a(c,e,Ty(t,n),t):(o=f.map(e=>e(t,n,r)),a.apply(a,o))});var l,p=this.fn.name;if(t[p])return l=this.args,function(t,n,r){var o,a=n[p];if("function"!=typeof a)throw new TypeError("Argument '".concat(p,"' was not a function; received: ").concat(i(a)));return a.rawArgs?a(l,e,Ty(t,n),t):(o=f.map(e=>e(t,n,r)),a.apply(a,o))};var d,h=p in e?Wn(e,p):void 0,m=(h="function"==typeof h&&!0===h.rawArgs,t=>{var n;if(t.has(p))n=t.get(p);else{if(!(p in e))return r.onUndefinedFunction(p);n=Wn(e,p)}if("function"==typeof n)return n;throw new TypeError("'".concat(p,"' is not a function; its value is:\n ").concat(i(n)))});if(h)return d=this.args,function(t,n,r){return m(t)(d,e,Ty(t,n),t)};switch(f.length){case 0:return function(e,t,n){return m(e)()};case 1:return function(e,t,n){return m(e)((0,f[0])(e,t,n))};case 2:return function(e,t,n){var r=m(e),i=f[0],o=f[1];return r(i(e,t,n),o(e,t,n))};default:return function(e,t,n){return m(e)(...f.map(r=>r(e,t,n)))}}},r.prototype.forEach=function(e){e(this.fn,"fn",this);for(var t=0;t'+ke(this.fn)+'('+t.join(',')+')'};var s=r.prototype.toTex;return r.prototype.toTex=function(e){var t;return void 0!==(t=e&&"object"==typeof e.handler&&J(e.handler,this.name)?e.handler[this.name](this,e):t)?t:s.call(this,e)},r.prototype._toTex=function(e){var n,r,i=this.args.map((function(t){return t.toTex(e)}));switch(fy[this.name]&&(n=fy[this.name]),typeof(n=!t[this.name]||"function"!=typeof t[this.name].toTex&&"object"!=typeof t[this.name].toTex&&"string"!=typeof t[this.name].toTex?n:t[this.name].toTex)){case"function":r=n(this,e);break;case"string":r=a(n,this,e);break;case"object":switch(typeof n[i.length]){case"function":r=n[i.length](this,e);break;case"string":r=a(n[i.length],this,e)}}return void 0!==r?r:a("\\mathrm{${name}}\\left(${args}\\right)",this,e)},r.prototype.getIdentifier=function(){return this.type+":"+this.name},r},{isClass:!0,isNode:!0}),Iy=tt("parse",["typed","numeric","config","AccessorNode","ArrayNode","AssignmentNode","BlockNode","ConditionalNode","ConstantNode","FunctionAssignmentNode","FunctionNode","IndexNode","ObjectNode","OperatorNode","ParenthesisNode","RangeNode","RelationalNode","SymbolNode"],e=>{var{typed:e,numeric:t,config:n,AccessorNode:r,ArrayNode:o,AssignmentNode:a,BlockNode:s,ConditionalNode:u,ConstantNode:c,FunctionAssignmentNode:f,FunctionNode:l,IndexNode:p,ObjectNode:d,OperatorNode:h,ParenthesisNode:m,RangeNode:y,RelationalNode:g,SymbolNode:v}=e,b=e("parse",{string:function(e){return q(e,{})},"Array | Matrix":function(e){return x(e,{})},"string, Object":function(e,t){return q(e,void 0!==t.nodes?t.nodes:{})},"Array | Matrix, Object":x});function x(e){var t=1":!0,"<=":!0,">=":!0,"<<":!0,">>":!0,">>>":!0},S={mod:!0,to:!0,in:!0,and:!0,xor:!0,or:!0,not:!0},_={true:!0,false:!1,null:null,undefined:void 0},D=["NaN","Infinity"];function M(e,t){return e.expression.substr(e.index,t)}function E(e){return M(e,1)}function O(e){e.index++}function C(e){return e.expression.charAt(e.index-1)}function T(e){return e.expression.charAt(e.index+1)}function k(e){for(e.tokenType=w.NULL,e.token="",e.comment="";;){if("#"===E(e))for(;"\n"!==E(e)&&""!==E(e);)e.comment+=E(e),O(e);if(!b.isWhitespace(E(e),e.nestingLevel))break;O(e)}if(""===E(e))e.tokenType=w.DELIMITER;else if("\n"!==E(e)||e.nestingLevel){var t=E(e),n=M(e,2),r=M(e,3);if(3===r.length&&N[r])e.tokenType=w.DELIMITER,e.token=r,O(e),O(e),O(e);else if(2===n.length&&N[n])e.tokenType=w.DELIMITER,e.token=n,O(e),O(e);else if(N[t])e.tokenType=w.DELIMITER,e.token=t,O(e);else if(b.isDigitDot(t))if(e.tokenType=w.NUMBER,r=M(e,2),"0b"===r||"0o"===r||"0x"===r){for(e.token+=E(e),O(e),e.token+=E(e),O(e);b.isHexDigit(E(e));)e.token+=E(e),O(e);if("."===E(e))for(e.token+=".",O(e);b.isHexDigit(E(e));)e.token+=E(e),O(e);else if("i"===E(e))for(e.token+="i",O(e);b.isDigit(E(e));)e.token+=E(e),O(e)}else{if("."===E(e)){if(e.token+=E(e),O(e),!b.isDigit(E(e)))return void(e.tokenType=w.DELIMITER)}else{for(;b.isDigit(E(e));)e.token+=E(e),O(e);b.isDecimalMark(E(e),T(e))&&(e.token+=E(e),O(e))}for(;b.isDigit(E(e));)e.token+=E(e),O(e);if("E"===E(e)||"e"===E(e))if(b.isDigit(T(e))||"-"===T(e)||"+"===T(e)){if(e.token+=E(e),O(e),"+"!==E(e)&&"-"!==E(e)||(e.token+=E(e),O(e)),!b.isDigit(E(e)))throw ce(e,'Digit expected, got "'+E(e)+'"');for(;b.isDigit(E(e));)e.token+=E(e),O(e);if(b.isDecimalMark(E(e),T(e)))throw ce(e,'Digit expected, got "'+E(e)+'"')}else if("."===T(e))throw O(e),ce(e,'Digit expected, got "'+E(e)+'"')}else{if(!b.isAlpha(E(e),C(e),T(e))){for(e.tokenType=w.UNKNOWN;""!==E(e);)e.token+=E(e),O(e);throw ce(e,'Syntax error in part "'+e.token+'"')}for(;b.isAlpha(E(e),C(e),T(e))||b.isDigit(E(e));)e.token+=E(e),O(e);J(S,e.token)?e.tokenType=w.DELIMITER:e.tokenType=w.SYMBOL}}else e.tokenType=w.DELIMITER,e.token=E(e),O(e)}function R(e){for(;k(e),"\n"===e.token;);}function B(e){e.nestingLevel++}function z(e){e.nestingLevel--}function q(e,t){var n={extraNodes:{},expression:"",comment:"",index:0,token:"",tokenType:w.NULL,nestingLevel:0,conditionalLevel:null};i()(n,{expression:e,extraNodes:t}),k(n),e=function(e){var t,n,r=[];for(""!==e.token&&"\n"!==e.token&&";"!==e.token&&((t=F(e)).comment=e.comment);"\n"===e.token||";"===e.token;)0===r.length&&t&&(n=";"!==e.token,r.push({node:t,visible:n})),k(e),"\n"!==e.token&&";"!==e.token&&""!==e.token&&((t=F(e)).comment=e.comment,n=";"!==e.token,r.push({node:t,visible:n}));return 0":"larger","<=":"smallerEq",">=":"largerEq"};J(r,e.token);){var i={name:e.token,fn:r[e.token]};n.push(i),R(e),t.push(Z(e))}return 1===t.length?t[0]:2===t.length?new h(n[0].name,n[0].fn,t):new g(n.map(e=>e.fn),t)}function Z(e){for(var t,n,r,i=Y(e),o={"<<":"leftShift",">>":"rightArithShift",">>>":"rightLogShift"};J(o,e.token);)n=o[t=e.token],R(e),r=[i,Y(e)],i=new h(t,n,r);return i}function Y(e){for(var t,n,r,i=X(e),o={to:"to",in:"to"};J(o,e.token);)n=o[t=e.token],R(e),i="in"===t&&""===e.token?new h("*","multiply",[i,new v("in")],!0):(r=[i,X(e)],new h(t,n,r));return i}function X(e){var t=[],n=":"===e.token?new c(1):Q(e);if(":"===e.token&&e.conditionalLevel!==e.nestingLevel){for(t.push(n);":"===e.token&&t.length<3;)R(e),")"===e.token||"]"===e.token||","===e.token||""===e.token?t.push(new v("end")):t.push(Q(e));n=3===t.length?new y(t[0],t[2],t[1]):new y(t[0],t[1])}return n}function Q(e){o=K(e);for(var t,n,r={"+":"add","-":"subtract"};J(r,e.token);){n=r[t=e.token],R(e);var i=K(e),o=(i=i.isPercentage?[o,new h("*","multiply",[o,i])]:[o,i],new h(t,n,i))}return o}function K(e){for(var t,n,r,i=ee(e),o={"*":"multiply",".*":"dotMultiply","/":"divide","./":"dotDivide"};J(o,e.token);)n=o[t=e.token],R(e),r=ee(e),i=new h(t,n,[i,r]);return i}function ee(e){for(var t=te(e),n=t;e.tokenType===w.SYMBOL||"in"===e.token&&I(t)||!(e.tokenType!==w.NUMBER||I(n)||P(n)&&"!"!==n.op)||"("===e.token;)n=te(e),t=new h("*","multiply",[t,n],!0);return t}function te(e){for(var t=ne(e),n=t,r=[];"/"===e.token&&I(n);){if(r.push(i()({},e)),R(e),e.tokenType!==w.NUMBER){i()(e,r.pop());break}if(r.push(i()({},e)),R(e),e.tokenType!==w.SYMBOL&&"("!==e.token){r.pop(),i()(e,r.pop());break}i()(e,r.pop()),r.pop(),n=ne(e),t=new h("/","divide",[t,n])}return t}function ne(e){for(var t,n,r,i=re(e),o={"%":"mod",mod:"mod"};J(o,e.token);)n=o[t=e.token],R(e),i="%"===t&&e.tokenType===w.DELIMITER&&"("!==e.token?new h("/","divide",[i,new c(100)],!1,!0):(r=[i,re(e)],new h(t,n,r));return i}function re(e){var r,i,a={"-":"unaryMinus","+":"unaryPlus","~":"bitNot",not:"not"};return J(a,e.token)?(a=a[e.token],r=e.token,R(e),i=[re(e)],new h(r,a,i)):(a=function(e){r=function(e){var r=[];if(e.tokenType===w.SYMBOL&&J(e.extraNodes,e.token)){var i=e.extraNodes[e.token];if(k(e),"("===e.token){if(r=[],B(e),k(e),")"!==e.token)for(r.push(F(e));","===e.token;)k(e),r.push(F(e));if(")"!==e.token)throw ce(e,"Parenthesis ) expected");z(e),k(e)}return new i(r)}return function(e){var r;return e.tokenType===w.SYMBOL||e.tokenType===w.DELIMITER&&e.token in S?(r=e.token,k(e),r=J(_,r)?new c(_[r]):-1!==D.indexOf(r)?new c(t(r,"number")):new v(r),ie(e,r)):function(e){var r,i,a,s;if('"'===e.token)return u=oe(e),u=new c(u),ie(e,u);var u=e;if("'"===u.token)return b=ae(u),b=new c(b),ie(u,b);var f=u;if("["!==f.token){var l=f;if("{"!==l.token){var p,h=l;if(h.tokenType===w.NUMBER)return y=h.token,k(h),new c(t(y,n.number));var y=h;if("("!==y.token)throw""===(p=y).token?ce(p,"Unexpected end of expression"):ce(p,"Value expected");if(B(y),k(y),p=F(y),")"!==y.token)throw ce(y,"Parenthesis ) expected");return z(y),k(y),p=new m(p),ie(y,p)}B(l);var g,v={};do{if(k(l),"}"!==l.token){if('"'===l.token)g=oe(l);else if("'"===l.token)g=ae(l);else{if(!(l.tokenType===w.SYMBOL||l.tokenType===w.DELIMITER&&l.token in S))throw ce(l,"Symbol or string expected as object key");g=l.token,k(l)}if(":"!==l.token)throw ce(l,"Colon : expected after object key");k(l),v[g]=F(l)}}while(","===l.token);if("}"!==l.token)throw ce(l,"Comma , or bracket } expected after object value");return z(l),k(l),h=new d(v),ie(l,h)}if(B(f),k(f),"]"!==f.token){var b=se(f);if(";"===f.token){for(a=1,i=[b];";"===f.token;)k(f),i[a]=se(f),a++;if("]"!==f.token)throw ce(f,"End of matrix ] expected");z(f),k(f),s=i[0].items.length;for(var x=1;x{var{parse:t,ConstantNode:n,FunctionNode:r,OperatorNode:i,ParenthesisNode:o}=e;return function e(a,s){var u=2e(t,s,u))}});function jy(e,t){var n,r=Object.keys(e);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(e),t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)),r}function By(e){for(var t=1;t{var{FunctionNode:t,OperatorNode:n,SymbolNode:r}=e,i="defaultF",o={add:{trivial:!0,total:!0,commutative:!0,associative:!0},unaryPlus:{trivial:!0,total:!0,commutative:!0,associative:!0},subtract:{trivial:!1,total:!0,commutative:!1,associative:!1},multiply:{trivial:!0,total:!0,commutative:!0,associative:!0},divide:{trivial:!1,total:!0,commutative:!1,associative:!1},paren:{trivial:!0,total:!0,commutative:!0,associative:!1},defaultF:{trivial:!1,total:!0,commutative:!1,associative:!1}};function a(e,t){var n=2{var{equal:t,isZero:n,add:r,subtract:i,multiply:o,divide:a,pow:s,AccessorNode:u,ArrayNode:c,ConstantNode:f,FunctionNode:l,IndexNode:p,ObjectNode:d,OperatorNode:h,SymbolNode:e}=e,m=new f(0),y=new f(1),{hasProperty:g,isCommutative:v}=zy({FunctionNode:l,OperatorNode:h,SymbolNode:e});return function e(b,x){var w=x?x.context:void 0;if(g(b,"trivial",w)){if(j(b)&&1===b.args.length)return e(b.args[0],x);var N=!1,S=0;if(b.forEach(t=>{1==++S&&(N=e(t,x))}),1===S)return N}if(P(b)&&b.isUnary()){var _=e(b.args[0],x);if("-"===b.op){if(P(_)){if(_.isUnary()&&"-"===_.op)return _.args[0];if(_.isBinary()&&"subtract"===_.fn)return new h("-","subtract",[_.args[1],_.args[0]])}return new h(b.op,b.fn,[_])}}else{if(P(b)&&b.isBinary()){_=e(b.args[0],x);var D=e(b.args[1],x);if("+"===b.op){if(I(_)){if(n(_.value))return D;if(I(D))return new f(r(_.value,D.value))}return I(D)&&n(D.value)?_:P(D)&&D.isUnary()&&"-"===D.op?new h("-","subtract",[_,D.args[0]]):new h(b.op,b.fn,D?[_,D]:[_])}if("-"===b.op){if(I(_)&&D){if(I(D))return new f(i(_.value,D.value));if(n(_.value))return new h("-","unaryMinus",[D])}if("subtract"===b.fn)return I(D)&&n(D.value)?_:P(D)&&D.isUnary()&&"-"===D.op?e(new h("+","add",[_,D.args[0]]),x):new h(b.op,b.fn,[_,D])}else{if("*"===b.op){if(I(_)){if(n(_.value))return m;if(t(_.value,1))return D;if(I(D))return new f(o(_.value,D.value))}if(I(D)){if(n(D.value))return m;if(t(D.value,1))return _;if(P(_)&&_.isBinary()&&_.op===b.op&&v(b,w)){var M=_.args[0];if(I(M))return M=new f(o(M.value,D.value)),new h(b.op,b.fn,[M,_.args[1]],b.implicit)}return v(b,w)?new h(b.op,b.fn,[D,_],b.implicit):new h(b.op,b.fn,[_,D],b.implicit)}return new h(b.op,b.fn,[_,D],b.implicit)}if("/"===b.op){if(I(_)){if(n(_.value))return m;if(I(D)&&(t(D.value,1)||t(D.value,2)||t(D.value,4)))return new f(a(_.value,D.value))}return new h(b.op,b.fn,[_,D])}if("^"===b.op&&I(D)){if(n(D.value))return y;if(t(D.value,1))return _;if(I(_))return new f(s(_.value,D.value));if(P(_)&&_.isBinary()&&"^"===_.op&&I(M=_.args[1]))return new h(b.op,b.fn,[_.args[0],new f(o(M.value,D.value))])}}return new h(b.op,b.fn,[_,D])}if(j(b))return new l(e(b.fn),b.args.map(t=>e(t,x)));if(O(b))return new c(b.items.map(t=>e(t,x)));if(A(b))return new u(e(b.object,x),e(b.index,x));if(B(b))return new p(b.dimensions.map(t=>e(t,x)));if(q(b)){var E,C={};for(E in b.properties)C[E]=e(b.properties[E],x);return new d(C)}}return b}}),Py=tt("compile",["typed","parse"],e=>{var{typed:e,parse:t}=e;return e("compile",{string:function(e){return t(e).compile()},"Array | Matrix":function(e){return lr(e,(function(e){return t(e).compile()}))}})}),Fy=tt("Help",["parse"],e=>{var t=e["parse"];function n(e){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");if(!e)throw new Error('Argument "doc" missing');this.doc=e}return n.prototype.type="Help",n.prototype.isHelp=!0,n.prototype.toString=function(){var e=this.doc||{},n="\n";if(e.name&&(n+="Name: "+e.name+"\n\n"),e.category&&(n+="Category: "+e.category+"\n\n"),e.description&&(n+="Description:\n "+e.description+"\n\n"),e.syntax&&(n+="Syntax:\n "+e.syntax.join("\n ")+"\n\n"),e.examples){n+="Examples:\n";for(var r={},i=0;i"mathjs"!==e).forEach(n=>{t[n]=e[n]}),new n(t)},n.prototype.valueOf=n.prototype.toString,n},{isClass:!0}),Ly=tt("leafCount",["parse","typed"],e=>{var{parse:t,typed:e}=e;return e("leafCount",{string:function(e){return this(t(e))},Node:function e(t){var n=0;return t.forEach(t=>{n+=e(t)}),n||1}})}),Uy=tt("simplifyConstant",["typed","config","mathWithTransform","matrix","?fraction","?bignumber","AccessorNode","ArrayNode","ConstantNode","FunctionNode","IndexNode","ObjectNode","OperatorNode","SymbolNode"],e=>{var{typed:e,config:t,mathWithTransform:n,matrix:r,fraction:i,bignumber:o,AccessorNode:a,ArrayNode:s,ConstantNode:u,FunctionNode:f,IndexNode:l,ObjectNode:p,OperatorNode:h,SymbolNode:m}=e,{isCommutative:y,isAssociative:g,allChildren:v,createMakeNodeFunction:b}=zy({FunctionNode:f,OperatorNode:h,SymbolNode:m});function x(e,t){return _(function e(t,i){switch(t.type){case"SymbolNode":return t;case"ConstantNode":switch(typeof t.value){case"number":return M(t.value,i);case"string":return t.value;default:if(!isNaN(t.value))return M(t.value,i)}return t;case"FunctionNode":if(n[t.name]&&n[t.name].rawArgs)return t;var o=["add","multiply"];if(-1===o.indexOf(t.name)){if(o=t.args.map(t=>e(t,i)),!o.some(z))try{return N(t.name,o,i)}catch(t){}if("size"===t.name&&1===o.length&&O(o[0])){for(var a=[],u=o[0];O(u);)a.push(u.items.length),u=u.items[0];return r(a)}return new f(t.name,o.map(_))}case"OperatorNode":o=t.fn.toString();var c,d,h=b(t);if(P(t)&&t.isUnary())c=[e(t.args[0],i)],d=z(c[0])?h(c):N(o,c,i);else if(g(t,i.context))if(c=(c=v(t,i.context)).map(t=>e(t,i)),y(o,i.context)){for(var m=[],w=[],S=0;Se(t,i)),d=C(o,c,h,i);return d;case"ParenthesisNode":return e(t.content,i);case"AccessorNode":return A(e(t.object,i),e(t.index,i),i);case"ArrayNode":return o=t.items.map(t=>e(t,i)),o.some(z)?new s(o.map(_)):r(o);case"IndexNode":return new l(t.dimensions.map(e=>x(e,i)));case"ObjectNode":var D,E={};for(D in t.properties)E[D]=x(t.properties[D],i);return new p(E);default:throw new Error("Unimplemented node type in simplifyConstant: ".concat(t.type))}}(e,t))}function w(e){return c(e)?e.valueOf():e instanceof Array?e.map(w):d(e)?r(w(e.valueOf())):e}function N(t,r,i){try{return n[t].apply(null,r)}catch(e){return r=r.map(w),M(n[t].apply(null,r),i)}}var S=e({Fraction:function(e){var t=e.s*e.n;return t=t<0?new h("-","unaryMinus",[new u(-t)]):new u(t),1!==e.d?new h("/","divide",[t,new u(e.d)]):t},number:function(e){return e<0?E(new u(-e)):new u(e)},BigNumber:function(e){return e<0?E(new u(-e)):new u(e)},Complex:function(e){throw new Error("Cannot convert Complex number to Node")},string:function(e){return new u(e)},Matrix:function(e){return new s(e.valueOf().map(e=>S(e)))}});function _(e){return z(e)?e:S(e)}function D(e,t){if(t&&!1!==t.exactFractions&&isFinite(e)&&i){var n=i(e);t=t&&"number"==typeof t.fractionsLimit?t.fractionsLimit:1/0;if(n.valueOf()===e&&n.n{var{config:e,typed:t,parse:n,equal:r,resolve:i,simplifyCore:o,fraction:a,bignumber:s,mathWithTransform:u,matrix:c,AccessorNode:f,ArrayNode:l,ConstantNode:p,FunctionNode:d,IndexNode:h,ObjectNode:m,OperatorNode:y,ParenthesisNode:g,SymbolNode:v}=e,{hasProperty:b,isCommutative:x,isAssociative:w,mergeContext:N,flatten:S,unflattenr:_,unflattenl:D,createMakeNodeFunction:M,defaultContext:u,realContext:c,positiveContext:a}=(e=Uy({typed:t,config:e,mathWithTransform:u,matrix:c,fraction:a,bignumber:s,AccessorNode:f,ArrayNode:l,ConstantNode:p,FunctionNode:d,IndexNode:h,ObjectNode:m,OperatorNode:y,SymbolNode:v}),zy({FunctionNode:d,OperatorNode:y,SymbolNode:v})),s=t("simplify",{string:function(e){return this(n(e),this.rules,Kn(),{})},"string, Map | Object":function(e,t){return this(n(e),this.rules,t,{})},"string, Map | Object, Object":function(e,t,r){return this(n(e),this.rules,t,r)},"string, Array":function(e,t){return this(n(e),t,Kn(),{})},"string, Array, Map | Object":function(e,t,r){return this(n(e),t,r,{})},"string, Array, Map | Object, Object":function(e,t,r,i){return this(n(e),t,r,i)},"Node, Map | Object":function(e,t){return this(e,this.rules,t,{})},"Node, Map | Object, Object":function(e,t,n){return this(e,this.rules,t,n)},Node:function(e){return this(e,this.rules,Kn(),{})},"Node, Array":function(e,t){return this(e,t,Kn(),{})},"Node, Array, Map | Object":function(e,t,n){return this(e,t,n,{})},"Node, Array, Object, Object":function(e,t,n,r){return this(e,t,er(n),r)},"Node, Array, Map, Object":function(e,t,r,o){for(var a=o.consoleDebug,s=(t=function(e,t){for(var r=[],i=0;i");if(2!==a.length)throw SyntaxError("Could not parse rule: "+e.s);o.l=a[0],o.r=a[1]}else o.l=e.l,o.r=e.r;for(r of(o.l=E(n(o.l)),o.r=E(n(o.r)),["imposeContext","repeat","assuming"]))r in e&&(o[r]=e[r]);return e.evaluate&&(o.evaluate=n(e.evaluate)),w(o.l,t)&&(a=M(o.l),i=new v("_p"+O++),o.expanded={},o.expanded.l=a([o.l.clone(),i]),S(o.expanded.l,t),_(o.expanded.l,t),o.expanded.r=a([o.r,i])),o}(o,t);break;case"function":a=o;break;default:throw TypeError("Unsupported type of rule: "+s)}r.push(a)}return r}(t,o.context),i(e,r)),u={},c=(s=E(s)).toString({parenthesis:"all"});!u[c];){u[c]=!0;for(var f=c,l=O=0;l ").concat(t[l].r.toString())),a&&(p=s.toString({parenthesis:"all"}))!==f&&(f=p),D(s,o.context)}c=s.toString({parenthesis:"all"})}return s}});function E(e){return e.transform((function(e,t,n){return F(e)?E(e.content):e}))}s.defaultContext=u,s.realContext=c,s.positiveContext=a;var A={true:!0,false:!0,e:!0,i:!0,Infinity:!0,LN2:!0,LN10:!0,LOG2E:!0,LOG10E:!0,NaN:!0,phi:!0,pi:!0,SQRT1_2:!0,SQRT2:!0,tau:!0};s.rules=[o,{l:"log(e)",r:"1"},{s:"n-n1 -> n+-n1",assuming:{subtract:{total:!0}}},{s:"n-n -> 0",assuming:{subtract:{total:!1}}},{s:"-(c*v) -> v * (-c)",assuming:{multiply:{commutative:!0},subtract:{total:!0}}},{s:"-(c*v) -> (-c) * v",assuming:{multiply:{commutative:!1},subtract:{total:!0}}},{s:"-(v*c) -> v * (-c)",assuming:{multiply:{commutative:!1},subtract:{total:!0}}},{l:"-(n1/n2)",r:"-n1/n2"},{l:"-v",r:"v * (-1)"},{l:"(n1 + n2)*(-1)",r:"n1*(-1) + n2*(-1)",repeat:!0},{l:"n/n1^n2",r:"n*n1^-n2"},{l:"n/n1",r:"n*n1^-1"},{s:"(n1*n2)^n3 -> n1^n3 * n2^n3",assuming:{multiply:{commutative:!0}}},{s:"(n1*n2)^(-1) -> n2^(-1) * n1^(-1)",assuming:{multiply:{commutative:!1}}},{s:"(n ^ n1) ^ n2 -> n ^ (n1 * n2)",assuming:{divide:{total:!0}}},{l:" v * ( v * n1 + n2)",r:"v^2 * n1 + v * n2"},{s:" v * (v^n4 * n1 + n2) -> v^(1+n4) * n1 + v * n2",assuming:{divide:{total:!0}}},{s:"v^n3 * ( v * n1 + n2) -> v^(n3+1) * n1 + v^n3 * n2",assuming:{divide:{total:!0}}},{s:"v^n3 * (v^n4 * n1 + n2) -> v^(n3+n4) * n1 + v^n3 * n2",assuming:{divide:{total:!0}}},{l:"n*n",r:"n^2"},{s:"n * n^n1 -> n^(n1+1)",assuming:{divide:{total:!0}}},{s:"n^n1 * n^n2 -> n^(n1+n2)",assuming:{divide:{total:!0}}},e,{s:"n+n -> 2*n",assuming:{add:{total:!0}}},{l:"n+-n",r:"0"},{l:"v*n + v",r:"v*(n+1)"},{l:"n3*n1 + n3*n2",r:"n3*(n1+n2)"},{l:"n3^(-n4)*n1 + n3 * n2",r:"n3^(-n4)*(n1 + n3^(n4+1) *n2)"},{l:"n3^(-n4)*n1 + n3^n5 * n2",r:"n3^(-n4)*(n1 + n3^(n4+n5)*n2)"},{s:"n*v + v -> (n+1)*v",assuming:{multiply:{commutative:!1}}},{s:"n1*n3 + n2*n3 -> (n1+n2)*n3",assuming:{multiply:{commutative:!1}}},{s:"n1*n3^(-n4) + n2 * n3 -> (n1 + n2*n3^(n4 + 1))*n3^(-n4)",assuming:{multiply:{commutative:!1}}},{s:"n1*n3^(-n4) + n2 * n3^n5 -> (n1 + n2*n3^(n4 + n5))*n3^(-n4)",assuming:{multiply:{commutative:!1}}},{l:"n*c + c",r:"(n+1)*c"},{s:"c*n + c -> c*(n+1)",assuming:{multiply:{commutative:!1}}},e,{s:"(-n)*n1 -> -(n*n1)",assuming:{subtract:{total:!0}}},{s:"n1*(-n) -> -(n1*n)",assuming:{subtract:{total:!0},multiply:{commutative:!1}}},{s:"c+v -> v+c",assuming:{add:{commutative:!0}},imposeContext:{add:{commutative:!1}}},{s:"v*c -> c*v",assuming:{multiply:{commutative:!0}},imposeContext:{multiply:{commutative:!1}}},{l:"n+-n1",r:"n-n1"},{s:"n*(n1^-1) -> n/n1",assuming:{multiply:{commutative:!0}}},{s:"n*n1^-n2 -> n/n1^n2",assuming:{multiply:{commutative:!0}}},{s:"n^-1 -> 1/n",assuming:{multiply:{commutative:!0}}},{l:"n^1",r:"n"},{s:"n*(n1/n2) -> (n*n1)/n2",assuming:{multiply:{associative:!0}}},{s:"n-(n1+n2) -> n-n1-n2",assuming:{addition:{associative:!0,commutative:!0}}},{l:"1*n",r:"n",imposeContext:{multiply:{commutative:!0}}},{s:"n1/(n2/n3) -> (n1*n3)/n2",assuming:{multiply:{associative:!0}}},{l:"n1/(-n2)",r:"-n1/n2"}];var O=0;function C(e,t,n){var r=e;if(e)for(var i=0;i2 commutative non-associative rule arguments not yet implemented");if(i=j(e.args[0],t.args[1],n),0===i.length)return[];var m=j(e.args[1],t.args[0],n);if(0===m.length)return[];f=[i,m]}o=function(e){if(0===e.length)return e;for(var t=e.reduce(R),n=[],r={},i=0;i{var{parse:t,simplify:n,typed:e,OperatorNode:r}=e;return e(Hy,{"string, string":function(e,n){return this(t(e),t(n),{})},"string, string, Object":function(e,n,r){return this(t(e),t(n),r)},"Node, string":function(e,n){return this(e,t(n),{})},"Node, string, Object":function(e,n,r){return this(e,t(n),r)},"string, Node":function(e,n){return this(t(e),n,{})},"string, Node, Object":function(e,n,r){return this(t(e),n,r)},"Node, Node":function(e,t){return this(e,t,{})},"Node, Node, Object":function(e,t,i){return e=new r("-","subtract",[e,t]),t=n(e,{},i),I(t)&&!t.value}})}),Gy=tt("evaluate",["typed","parse"],e=>{var{typed:e,parse:t}=e;return e("evaluate",{string:function(e){var n=Kn();return t(e).compile().evaluate(n)},"string, Map | Object":function(e,n){return t(e).compile().evaluate(n)},"Array | Matrix":function(e){var n=Kn();return lr(e,(function(e){return t(e).compile().evaluate(n)}))},"Array | Matrix, Map | Object":function(e,n){return lr(e,(function(e){return t(e).compile().evaluate(n)}))}})}),Vy=(mr={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"]},r={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"]},{bignumber:{name:"bignumber",category:"Construction",syntax:["bignumber(x)"],description:"Create a big number from a number or string.",examples:["0.1 + 0.2","bignumber(0.1) + bignumber(0.2)",'bignumber("7.2")','bignumber("7.2e500")',"bignumber([0.1, 0.2, 0.3])"],seealso:["boolean","complex","fraction","index","matrix","string","unit"]},boolean:{name:"boolean",category:"Construction",syntax:["x","boolean(x)"],description:"Convert a string or number into a boolean.",examples:["boolean(0)","boolean(1)","boolean(3)",'boolean("true")','boolean("false")',"boolean([1, 0, 1, 1])"],seealso:["bignumber","complex","index","matrix","number","string","unit"]},complex:{name:"complex",category:"Construction",syntax:["complex()","complex(re, im)","complex(string)"],description:"Create a complex number.",examples:["complex()","complex(2, 3)",'complex("7 - 2i")'],seealso:["bignumber","boolean","index","matrix","number","string","unit"]},createUnit:{name:"createUnit",category:"Construction",syntax:["createUnit(definitions)","createUnit(name, definition)"],description:"Create a user-defined unit and register it with the Unit type.",examples:['createUnit("foo")','createUnit("knot", {definition: "0.514444444 m/s", aliases: ["knots", "kt", "kts"]})','createUnit("mph", "1 mile/hour")'],seealso:["unit","splitUnit"]},fraction:{name:"fraction",category:"Construction",syntax:["fraction(num)","fraction(matrix)","fraction(num,den)","fraction({n: num, d: den})"],description:"Create a fraction from a number or from integer numerator and denominator.",examples:["fraction(0.125)","fraction(1, 3) + fraction(2, 5)","fraction({n: 333, d: 53})","fraction([sqrt(9), sqrt(10), sqrt(11)])"],seealso:["bignumber","boolean","complex","index","matrix","string","unit"]},index:{name:"index",category:"Construction",syntax:["[start]","[start:end]","[start:step:end]","[start1, start 2, ...]","[start1:end1, start2:end2, ...]","[start1:step1:end1, start2:step2:end2, ...]"],description:"Create an index to get or replace a subset of a matrix",examples:["[]","[1, 2, 3]","A = [1, 2, 3; 4, 5, 6]","A[1, :]","A[1, 2] = 50","A[0:2, 0:2] = ones(2, 2)"],seealso:["bignumber","boolean","complex","matrix,","number","range","string","unit"]},matrix:{name:"matrix",category:"Construction",syntax:["[]","[a1, b1, ...; a2, b2, ...]","matrix()",'matrix("dense")',"matrix([...])"],description:"Create a matrix.",examples:["[]","[1, 2, 3]","[1, 2, 3; 4, 5, 6]","matrix()","matrix([3, 4])",'matrix([3, 4; 5, 6], "sparse")','matrix([3, 4; 5, 6], "sparse", "number")'],seealso:["bignumber","boolean","complex","index","number","string","unit","sparse"]},number:{name:"number",category:"Construction",syntax:["x","number(x)","number(unit, valuelessUnit)"],description:"Create a number or convert a string or boolean into a number.",examples:["2","2e3","4.05","number(2)",'number("7.2")',"number(true)","number([true, false, true, true])",'number(unit("52cm"), "m")'],seealso:["bignumber","boolean","complex","fraction","index","matrix","string","unit"]},sparse:{name:"sparse",category:"Construction",syntax:["sparse()","sparse([a1, b1, ...; a1, b2, ...])",'sparse([a1, b1, ...; a1, b2, ...], "number")'],description:"Create a sparse matrix.",examples:["sparse()","sparse([3, 4; 5, 6])",'sparse([3, 0; 5, 0], "number")'],seealso:["bignumber","boolean","complex","index","number","string","unit","matrix"]},splitUnit:{name:"splitUnit",category:"Construction",syntax:["splitUnit(unit: Unit, parts: Unit[])"],description:"Split a unit in an array of units whose sum is equal to the original unit.",examples:['splitUnit(1 m, ["feet", "inch"])'],seealso:["unit","createUnit"]},string:{name:"string",category:"Construction",syntax:['"text"',"string(x)"],description:"Create a string or convert a value to a string",examples:['"Hello World!"',"string(4.2)","string(3 + 2i)"],seealso:["bignumber","boolean","complex","index","matrix","number","unit"]},unit:{name:"unit",category:"Construction",syntax:["value unit","unit(value, unit)","unit(string)"],description:"Create a unit.",examples:["5.5 mm","3 inch",'unit(7.1, "kilogram")','unit("23 deg")'],seealso:["bignumber","boolean","complex","index","matrix","number","string"]},e:mr,E:mr,false:{name:"false",category:"Constants",syntax:["false"],description:"Boolean value false",examples:["false"],seealso:["true"]},i:{name:"i",category:"Constants",syntax:["i"],description:"Imaginary unit, defined as i*i=-1. A complex number is described as a + b*i, where a is the real part, and b is the imaginary part.",examples:["i","i * i","sqrt(-1)"],seealso:[]},Infinity:{name:"Infinity",category:"Constants",syntax:["Infinity"],description:"Infinity, a number which is larger than the maximum number that can be handled by a floating point number.",examples:["Infinity","1 / 0"],seealso:[]},LN2:{name:"LN2",category:"Constants",syntax:["LN2"],description:"Returns the natural logarithm of 2, approximately equal to 0.693",examples:["LN2","log(2)"],seealso:[]},LN10:{name:"LN10",category:"Constants",syntax:["LN10"],description:"Returns the natural logarithm of 10, approximately equal to 2.302",examples:["LN10","log(10)"],seealso:[]},LOG2E:{name:"LOG2E",category:"Constants",syntax:["LOG2E"],description:"Returns the base-2 logarithm of E, approximately equal to 1.442",examples:["LOG2E","log(e, 2)"],seealso:[]},LOG10E:{name:"LOG10E",category:"Constants",syntax:["LOG10E"],description:"Returns the base-10 logarithm of E, approximately equal to 0.434",examples:["LOG10E","log(e, 10)"],seealso:[]},NaN:{name:"NaN",category:"Constants",syntax:["NaN"],description:"Not a number",examples:["NaN","0 / 0"],seealso:[]},null:{name:"null",category:"Constants",syntax:["null"],description:"Value null",examples:["null"],seealso:["true","false"]},pi:r,PI:r,phi:{name:"phi",category:"Constants",syntax:["phi"],description:"Phi is the golden ratio. Two quantities are in the golden ratio if their ratio is the same as the ratio of their sum to the larger of the two quantities. Phi is defined as `(1 + sqrt(5)) / 2` and is approximately 1.618034...",examples:["phi"],seealso:[]},SQRT1_2:{name:"SQRT1_2",category:"Constants",syntax:["SQRT1_2"],description:"Returns the square root of 1/2, approximately equal to 0.707",examples:["SQRT1_2","sqrt(1/2)"],seealso:[]},SQRT2:{name:"SQRT2",category:"Constants",syntax:["SQRT2"],description:"Returns the square root of 2, approximately equal to 1.414",examples:["SQRT2","sqrt(2)"],seealso:[]},tau:{name:"tau",category:"Constants",syntax:["tau"],description:"Tau is the ratio constant of a circle's circumference to radius, equal to 2 * pi, approximately 6.2832.",examples:["tau","2 * pi"],seealso:["pi"]},true:{name:"true",category:"Constants",syntax:["true"],description:"Boolean value true",examples:["true"],seealso:["false"]},version:{name:"version",category:"Constants",syntax:["version"],description:"A string with the version number of math.js",examples:["version"],seealso:[]},speedOfLight:{description:"Speed of light in vacuum",examples:["speedOfLight"]},gravitationConstant:{description:"Newtonian constant of gravitation",examples:["gravitationConstant"]},planckConstant:{description:"Planck constant",examples:["planckConstant"]},reducedPlanckConstant:{description:"Reduced Planck constant",examples:["reducedPlanckConstant"]},magneticConstant:{description:"Magnetic constant (vacuum permeability)",examples:["magneticConstant"]},electricConstant:{description:"Electric constant (vacuum permeability)",examples:["electricConstant"]},vacuumImpedance:{description:"Characteristic impedance of vacuum",examples:["vacuumImpedance"]},coulomb:{description:"Coulomb's constant",examples:["coulomb"]},elementaryCharge:{description:"Elementary charge",examples:["elementaryCharge"]},bohrMagneton:{description:"Borh magneton",examples:["bohrMagneton"]},conductanceQuantum:{description:"Conductance quantum",examples:["conductanceQuantum"]},inverseConductanceQuantum:{description:"Inverse conductance quantum",examples:["inverseConductanceQuantum"]},magneticFluxQuantum:{description:"Magnetic flux quantum",examples:["magneticFluxQuantum"]},nuclearMagneton:{description:"Nuclear magneton",examples:["nuclearMagneton"]},klitzing:{description:"Von Klitzing constant",examples:["klitzing"]},bohrRadius:{description:"Borh radius",examples:["bohrRadius"]},classicalElectronRadius:{description:"Classical electron radius",examples:["classicalElectronRadius"]},electronMass:{description:"Electron mass",examples:["electronMass"]},fermiCoupling:{description:"Fermi coupling constant",examples:["fermiCoupling"]},fineStructure:{description:"Fine-structure constant",examples:["fineStructure"]},hartreeEnergy:{description:"Hartree energy",examples:["hartreeEnergy"]},protonMass:{description:"Proton mass",examples:["protonMass"]},deuteronMass:{description:"Deuteron Mass",examples:["deuteronMass"]},neutronMass:{description:"Neutron mass",examples:["neutronMass"]},quantumOfCirculation:{description:"Quantum of circulation",examples:["quantumOfCirculation"]},rydberg:{description:"Rydberg constant",examples:["rydberg"]},thomsonCrossSection:{description:"Thomson cross section",examples:["thomsonCrossSection"]},weakMixingAngle:{description:"Weak mixing angle",examples:["weakMixingAngle"]},efimovFactor:{description:"Efimov factor",examples:["efimovFactor"]},atomicMass:{description:"Atomic mass constant",examples:["atomicMass"]},avogadro:{description:"Avogadro's number",examples:["avogadro"]},boltzmann:{description:"Boltzmann constant",examples:["boltzmann"]},faraday:{description:"Faraday constant",examples:["faraday"]},firstRadiation:{description:"First radiation constant",examples:["firstRadiation"]},loschmidt:{description:"Loschmidt constant at T=273.15 K and p=101.325 kPa",examples:["loschmidt"]},gasConstant:{description:"Gas constant",examples:["gasConstant"]},molarPlanckConstant:{description:"Molar Planck constant",examples:["molarPlanckConstant"]},molarVolume:{description:"Molar volume of an ideal gas at T=273.15 K and p=101.325 kPa",examples:["molarVolume"]},sackurTetrode:{description:"Sackur-Tetrode constant at T=1 K and p=101.325 kPa",examples:["sackurTetrode"]},secondRadiation:{description:"Second radiation constant",examples:["secondRadiation"]},stefanBoltzmann:{description:"Stefan-Boltzmann constant",examples:["stefanBoltzmann"]},wienDisplacement:{description:"Wien displacement law constant",examples:["wienDisplacement"]},molarMass:{description:"Molar mass constant",examples:["molarMass"]},molarMassC12:{description:"Molar mass constant of carbon-12",examples:["molarMassC12"]},gravity:{description:"Standard acceleration of gravity (standard acceleration of free-fall on Earth)",examples:["gravity"]},planckLength:{description:"Planck length",examples:["planckLength"]},planckMass:{description:"Planck mass",examples:["planckMass"]},planckTime:{description:"Planck time",examples:["planckTime"]},planckCharge:{description:"Planck charge",examples:["planckCharge"]},planckTemperature:{description:"Planck temperature",examples:["planckTemperature"]},derivative:{name:"derivative",category:"Algebra",syntax:["derivative(expr, variable)","derivative(expr, variable, {simplify: boolean})"],description:"Takes the derivative of an expression expressed in parser Nodes. The derivative will be taken over the supplied variable in the second parameter. If there are multiple variables in the expression, it will return a partial derivative.",examples:['derivative("2x^3", "x")','derivative("2x^3", "x", {simplify: false})','derivative("2x^2 + 3x + 4", "x")','derivative("sin(2x)", "x")','f = parse("x^2 + x")','x = parse("x")',"df = derivative(f, x)","df.evaluate({x: 3})"],seealso:["simplify","parse","evaluate"]},lsolve:{name:"lsolve",category:"Algebra",syntax:["x=lsolve(L, b)"],description:"Finds one solution of the linear system L * x = b where L is an [n x n] lower triangular matrix and b is a [n] column vector.",examples:["a = [-2, 3; 2, 1]","b = [11, 9]","x = lsolve(a, b)"],seealso:["lsolveAll","lup","lusolve","usolve","matrix","sparse"]},lsolveAll:{name:"lsolveAll",category:"Algebra",syntax:["x=lsolveAll(L, b)"],description:"Finds all solutions of the linear system L * x = b where L is an [n x n] lower triangular matrix and b is a [n] column vector.",examples:["a = [-2, 3; 2, 1]","b = [11, 9]","x = lsolve(a, b)"],seealso:["lsolve","lup","lusolve","usolve","matrix","sparse"]},lup:{name:"lup",category:"Algebra",syntax:["lup(m)"],description:"Calculate the Matrix LU decomposition with partial pivoting. Matrix A is decomposed in three matrices (L, U, P) where P * A = L * U",examples:["lup([[2, 1], [1, 4]])","lup(matrix([[2, 1], [1, 4]]))","lup(sparse([[2, 1], [1, 4]]))"],seealso:["lusolve","lsolve","usolve","matrix","sparse","slu","qr"]},lusolve:{name:"lusolve",category:"Algebra",syntax:["x=lusolve(A, b)","x=lusolve(lu, b)"],description:"Solves the linear system A * x = b where A is an [n x n] matrix and b is a [n] column vector.",examples:["a = [-2, 3; 2, 1]","b = [11, 9]","x = lusolve(a, b)"],seealso:["lup","slu","lsolve","usolve","matrix","sparse"]},leafCount:{name:"leafCount",category:"Algebra",syntax:["leafCount(expr)"],description:"Computes the number of leaves in the parse tree of the given expression",examples:['leafCount("e^(i*pi)-1")','leafCount(parse("{a: 22/7, b: 10^(1/2)}"))'],seealso:["simplify"]},resolve:{name:"resolve",category:"Algebra",syntax:["resolve(node, scope)"],description:"Recursively substitute variables in an expression tree.",examples:['resolve(parse("1 + x"), { x: 7 })','resolve(parse("size(text)"), { text: "Hello World" })','resolve(parse("x + y"), { x: parse("3z") })','resolve(parse("3x"), { x: parse("y+z"), z: parse("w^y") })'],seealso:["simplify","evaluate"],mayThrow:["ReferenceError"]},simplify:{name:"simplify",category:"Algebra",syntax:["simplify(expr)","simplify(expr, rules)"],description:"Simplify an expression tree.",examples:['simplify("3 + 2 / 4")','simplify("2x + x")','f = parse("x * (x + 2 + x)")',"simplified = simplify(f)","simplified.evaluate({x: 2})"],seealso:["simplifyCore","derivative","evaluate","parse","rationalize","resolve"]},simplifyCore:{name:"simplifyCore",category:"Algebra",syntax:["simplifyCore(node)"],description:"Perform simple one-pass simplifications on an expression tree.",examples:['simplifyCore(parse("0*x"))','simplifyCore(parse("(x+0)*2"))'],seealso:["simplify","evaluate"]},symbolicEqual:{name:"symbolicEqual",category:"Algebra",syntax:["symbolicEqual(expr1, expr2)","symbolicEqual(expr1, expr2, options)"],description:"Returns true if the difference of the expressions simplifies to 0",examples:['symbolicEqual("x*y","y*x")','symbolicEqual("abs(x^2)", "x^2")','symbolicEqual("abs(x)", "x", {context: {abs: {trivial: true}}})'],seealso:["simplify","evaluate"]},rationalize:{name:"rationalize",category:"Algebra",syntax:["rationalize(expr)","rationalize(expr, scope)","rationalize(expr, scope, detailed)"],description:"Transform a rationalizable expression in a rational fraction. If rational fraction is one variable polynomial then converts the numerator and denominator in canonical form, with decreasing exponents, returning the coefficients of numerator.",examples:['rationalize("2x/y - y/(x+1)")','rationalize("2x/y - y/(x+1)", true)'],seealso:["simplify"]},slu:{name:"slu",category:"Algebra",syntax:["slu(A, order, threshold)"],description:"Calculate the Matrix LU decomposition with full pivoting. Matrix A is decomposed in two matrices (L, U) and two permutation vectors (pinv, q) where P * A * Q = L * U",examples:["slu(sparse([4.5, 0, 3.2, 0; 3.1, 2.9, 0, 0.9; 0, 1.7, 3, 0; 3.5, 0.4, 0, 1]), 1, 0.001)"],seealso:["lusolve","lsolve","usolve","matrix","sparse","lup","qr"]},usolve:{name:"usolve",category:"Algebra",syntax:["x=usolve(U, b)"],description:"Finds one solution of the linear system U * x = b where U is an [n x n] upper triangular matrix and b is a [n] column vector.",examples:["x=usolve(sparse([1, 1, 1, 1; 0, 1, 1, 1; 0, 0, 1, 1; 0, 0, 0, 1]), [1; 2; 3; 4])"],seealso:["usolveAll","lup","lusolve","lsolve","matrix","sparse"]},usolveAll:{name:"usolveAll",category:"Algebra",syntax:["x=usolve(U, b)"],description:"Finds all solutions of the linear system U * x = b where U is an [n x n] upper triangular matrix and b is a [n] column vector.",examples:["x=usolve(sparse([1, 1, 1, 1; 0, 1, 1, 1; 0, 0, 1, 1; 0, 0, 0, 1]), [1; 2; 3; 4])"],seealso:["usolve","lup","lusolve","lsolve","matrix","sparse"]},qr:{name:"qr",category:"Algebra",syntax:["qr(A)"],description:"Calculates the Matrix QR decomposition. Matrix `A` is decomposed in two matrices (`Q`, `R`) where `Q` is an orthogonal matrix and `R` is an upper triangular matrix.",examples:["qr([[1, -1, 4], [1, 4, -2], [1, 4, 2], [1, -1, 0]])"],seealso:["lup","slu","matrix"]},abs:{name:"abs",category:"Arithmetic",syntax:["abs(x)"],description:"Compute the absolute value.",examples:["abs(3.5)","abs(-4.2)"],seealso:["sign"]},add:{name:"add",category:"Operators",syntax:["x + y","add(x, y)"],description:"Add two values.",examples:["a = 2.1 + 3.6","a - 3.6","3 + 2i","3 cm + 2 inch",'"2.3" + "4"'],seealso:["subtract"]},cbrt:{name:"cbrt",category:"Arithmetic",syntax:["cbrt(x)","cbrt(x, allRoots)"],description:"Compute the cubic root value. If x = y * y * y, then y is the cubic root of x. When `x` is a number or complex number, an optional second argument `allRoots` can be provided to return all three cubic roots. If not provided, the principal root is returned",examples:["cbrt(64)","cube(4)","cbrt(-8)","cbrt(2 + 3i)","cbrt(8i)","cbrt(8i, true)","cbrt(27 m^3)"],seealso:["square","sqrt","cube","multiply"]},ceil:{name:"ceil",category:"Arithmetic",syntax:["ceil(x)"],description:"Round a value towards plus infinity. If x is complex, both real and imaginary part are rounded towards plus infinity.",examples:["ceil(3.2)","ceil(3.8)","ceil(-4.2)"],seealso:["floor","fix","round"]},cube:{name:"cube",category:"Arithmetic",syntax:["cube(x)"],description:"Compute the cube of a value. The cube of x is x * x * x.",examples:["cube(2)","2^3","2 * 2 * 2"],seealso:["multiply","square","pow"]},divide:{name:"divide",category:"Operators",syntax:["x / y","divide(x, y)"],description:"Divide two values.",examples:["a = 2 / 3","a * 3","4.5 / 2","3 + 4 / 2","(3 + 4) / 2","18 km / 4.5"],seealso:["multiply"]},dotDivide:{name:"dotDivide",category:"Operators",syntax:["x ./ y","dotDivide(x, y)"],description:"Divide two values element wise.",examples:["a = [1, 2, 3; 4, 5, 6]","b = [2, 1, 1; 3, 2, 5]","a ./ b"],seealso:["multiply","dotMultiply","divide"]},dotMultiply:{name:"dotMultiply",category:"Operators",syntax:["x .* y","dotMultiply(x, y)"],description:"Multiply two values element wise.",examples:["a = [1, 2, 3; 4, 5, 6]","b = [2, 1, 1; 3, 2, 5]","a .* b"],seealso:["multiply","divide","dotDivide"]},dotPow:{name:"dotPow",category:"Operators",syntax:["x .^ y","dotPow(x, y)"],description:"Calculates the power of x to y element wise.",examples:["a = [1, 2, 3; 4, 5, 6]","a .^ 2"],seealso:["pow"]},exp:{name:"exp",category:"Arithmetic",syntax:["exp(x)"],description:"Calculate the exponent of a value.",examples:["exp(1.3)","e ^ 1.3","log(exp(1.3))","x = 2.4","(exp(i*x) == cos(x) + i*sin(x)) # Euler's formula"],seealso:["expm","expm1","pow","log"]},expm:{name:"expm",category:"Arithmetic",syntax:["exp(x)"],description:"Compute the matrix exponential, expm(A) = e^A. The matrix must be square. Not to be confused with exp(a), which performs element-wise exponentiation.",examples:["expm([[0,2],[0,0]])"],seealso:["exp"]},expm1:{name:"expm1",category:"Arithmetic",syntax:["expm1(x)"],description:"Calculate the value of subtracting 1 from the exponential value.",examples:["expm1(2)","pow(e, 2) - 1","log(expm1(2) + 1)"],seealso:["exp","pow","log"]},fix:{name:"fix",category:"Arithmetic",syntax:["fix(x)"],description:"Round a value towards zero. If x is complex, both real and imaginary part are rounded towards zero.",examples:["fix(3.2)","fix(3.8)","fix(-4.2)","fix(-4.8)"],seealso:["ceil","floor","round"]},floor:{name:"floor",category:"Arithmetic",syntax:["floor(x)"],description:"Round a value towards minus infinity.If x is complex, both real and imaginary part are rounded towards minus infinity.",examples:["floor(3.2)","floor(3.8)","floor(-4.2)"],seealso:["ceil","fix","round"]},gcd:{name:"gcd",category:"Arithmetic",syntax:["gcd(a, b)","gcd(a, b, c, ...)"],description:"Compute the greatest common divisor.",examples:["gcd(8, 12)","gcd(-4, 6)","gcd(25, 15, -10)"],seealso:["lcm","xgcd"]},hypot:{name:"hypot",category:"Arithmetic",syntax:["hypot(a, b, c, ...)","hypot([a, b, c, ...])"],description:"Calculate the hypotenusa of a list with values. ",examples:["hypot(3, 4)","sqrt(3^2 + 4^2)","hypot(-2)","hypot([3, 4, 5])"],seealso:["abs","norm"]},lcm:{name:"lcm",category:"Arithmetic",syntax:["lcm(x, y)"],description:"Compute the least common multiple.",examples:["lcm(4, 6)","lcm(6, 21)","lcm(6, 21, 5)"],seealso:["gcd"]},log:{name:"log",category:"Arithmetic",syntax:["log(x)","log(x, base)"],description:"Compute the logarithm of a value. If no base is provided, the natural logarithm of x is calculated. If base if provided, the logarithm is calculated for the specified base. log(x, base) is defined as log(x) / log(base).",examples:["log(3.5)","a = log(2.4)","exp(a)","10 ^ 4","log(10000, 10)","log(10000) / log(10)","b = log(1024, 2)","2 ^ b"],seealso:["exp","log1p","log2","log10"]},log2:{name:"log2",category:"Arithmetic",syntax:["log2(x)"],description:"Calculate the 2-base of a value. This is the same as calculating `log(x, 2)`.",examples:["log2(0.03125)","log2(16)","log2(16) / log2(2)","pow(2, 4)"],seealso:["exp","log1p","log","log10"]},log1p:{name:"log1p",category:"Arithmetic",syntax:["log1p(x)","log1p(x, base)"],description:"Calculate the logarithm of a `value+1`",examples:["log1p(2.5)","exp(log1p(1.4))","pow(10, 4)","log1p(9999, 10)","log1p(9999) / log(10)"],seealso:["exp","log","log2","log10"]},log10:{name:"log10",category:"Arithmetic",syntax:["log10(x)"],description:"Compute the 10-base logarithm of a value.",examples:["log10(0.00001)","log10(10000)","10 ^ 4","log(10000) / log(10)","log(10000, 10)"],seealso:["exp","log"]},mod:{name:"mod",category:"Operators",syntax:["x % y","x mod y","mod(x, y)"],description:"Calculates the modulus, the remainder of an integer division.",examples:["7 % 3","11 % 2","10 mod 4","isOdd(x) = x % 2","isOdd(2)","isOdd(3)"],seealso:["divide"]},multiply:{name:"multiply",category:"Operators",syntax:["x * y","multiply(x, y)"],description:"multiply two values.",examples:["a = 2.1 * 3.4","a / 3.4","2 * 3 + 4","2 * (3 + 4)","3 * 2.1 km"],seealso:["divide"]},norm:{name:"norm",category:"Arithmetic",syntax:["norm(x)","norm(x, p)"],description:"Calculate the norm of a number, vector or matrix.",examples:["abs(-3.5)","norm(-3.5)","norm(3 - 4i)","norm([1, 2, -3], Infinity)","norm([1, 2, -3], -Infinity)","norm([3, 4], 2)","norm([[1, 2], [3, 4]], 1)",'norm([[1, 2], [3, 4]], "inf")','norm([[1, 2], [3, 4]], "fro")']},nthRoot:{name:"nthRoot",category:"Arithmetic",syntax:["nthRoot(a)","nthRoot(a, root)"],description:'Calculate the nth root of a value. The principal nth root of a positive real number A, is the positive real solution of the equation "x^root = A".',examples:["4 ^ 3","nthRoot(64, 3)","nthRoot(9, 2)","sqrt(9)"],seealso:["nthRoots","pow","sqrt"]},nthRoots:{name:"nthRoots",category:"Arithmetic",syntax:["nthRoots(A)","nthRoots(A, root)"],description:'Calculate the nth roots of a value. An nth root of a positive real number A, is a positive real solution of the equation "x^root = A". This function returns an array of complex values.',examples:["nthRoots(1)","nthRoots(1, 3)"],seealso:["sqrt","pow","nthRoot"]},pow:{name:"pow",category:"Operators",syntax:["x ^ y","pow(x, y)"],description:"Calculates the power of x to y, x^y.",examples:["2^3","2*2*2","1 + e ^ (pi * i)","math.pow([[1, 2], [4, 3]], 2)","math.pow([[1, 2], [4, 3]], -1)"],seealso:["multiply","nthRoot","nthRoots","sqrt"]},round:{name:"round",category:"Arithmetic",syntax:["round(x)","round(x, n)"],description:"round a value towards the nearest integer.If x is complex, both real and imaginary part are rounded towards the nearest integer. When n is specified, the value is rounded to n decimals.",examples:["round(3.2)","round(3.8)","round(-4.2)","round(-4.8)","round(pi, 3)","round(123.45678, 2)"],seealso:["ceil","floor","fix"]},sign:{name:"sign",category:"Arithmetic",syntax:["sign(x)"],description:"Compute the sign of a value. The sign of a value x is 1 when x>1, -1 when x<0, and 0 when x=0.",examples:["sign(3.5)","sign(-4.2)","sign(0)"],seealso:["abs"]},sqrt:{name:"sqrt",category:"Arithmetic",syntax:["sqrt(x)"],description:"Compute the square root value. If x = y * y, then y is the square root of x.",examples:["sqrt(25)","5 * 5","sqrt(-1)"],seealso:["square","sqrtm","multiply","nthRoot","nthRoots","pow"]},sqrtm:{name:"sqrtm",category:"Arithmetic",syntax:["sqrtm(x)"],description:"Calculate the principal square root of a square matrix. The principal square root matrix `X` of another matrix `A` is such that `X * X = A`.",examples:["sqrtm([[1, 2], [3, 4]])"],seealso:["sqrt","abs","square","multiply"]},square:{name:"square",category:"Arithmetic",syntax:["square(x)"],description:"Compute the square of a value. The square of x is x * x.",examples:["square(3)","sqrt(9)","3^2","3 * 3"],seealso:["multiply","pow","sqrt","cube"]},subtract:{name:"subtract",category:"Operators",syntax:["x - y","subtract(x, y)"],description:"subtract two values.",examples:["a = 5.3 - 2","a + 2","2/3 - 1/6","2 * 3 - 3","2.1 km - 500m"],seealso:["add"]},unaryMinus:{name:"unaryMinus",category:"Operators",syntax:["-x","unaryMinus(x)"],description:"Inverse the sign of a value. Converts booleans and strings to numbers.",examples:["-4.5","-(-5.6)",'-"22"'],seealso:["add","subtract","unaryPlus"]},unaryPlus:{name:"unaryPlus",category:"Operators",syntax:["+x","unaryPlus(x)"],description:"Converts booleans and strings to numbers.",examples:["+true",'+"2"'],seealso:["add","subtract","unaryMinus"]},xgcd:{name:"xgcd",category:"Arithmetic",syntax:["xgcd(a, b)"],description:"Calculate the extended greatest common divisor for two values. The result is an array [d, x, y] with 3 entries, where d is the greatest common divisor, and d = x * a + y * b.",examples:["xgcd(8, 12)","gcd(8, 12)","xgcd(36163, 21199)"],seealso:["gcd","lcm"]},invmod:{name:"invmod",category:"Arithmetic",syntax:["invmod(a, b)"],description:"Calculate the (modular) multiplicative inverse of a modulo b. Solution to the equation ax ≣ 1 (mod b)",examples:["invmod(8, 12)=NaN","invmod(7, 13)=2","math.invmod(15151, 15122)=10429"],seealso:["gcd","xgcd"]},bitAnd:{name:"bitAnd",category:"Bitwise",syntax:["x & y","bitAnd(x, y)"],description:"Bitwise AND operation. Performs the logical AND operation on each pair of the corresponding bits of the two given values by multiplying them. If both bits in the compared position are 1, the bit in the resulting binary representation is 1, otherwise, the result is 0",examples:["5 & 3","bitAnd(53, 131)","[1, 12, 31] & 42"],seealso:["bitNot","bitOr","bitXor","leftShift","rightArithShift","rightLogShift"]},bitNot:{name:"bitNot",category:"Bitwise",syntax:["~x","bitNot(x)"],description:"Bitwise NOT operation. Performs a logical negation on each bit of the given value. Bits that are 0 become 1, and those that are 1 become 0.",examples:["~1","~2","bitNot([2, -3, 4])"],seealso:["bitAnd","bitOr","bitXor","leftShift","rightArithShift","rightLogShift"]},bitOr:{name:"bitOr",category:"Bitwise",syntax:["x | y","bitOr(x, y)"],description:"Bitwise OR operation. Performs the logical inclusive OR operation on each pair of corresponding bits of the two given values. The result in each position is 1 if the first bit is 1 or the second bit is 1 or both bits are 1, otherwise, the result is 0.",examples:["5 | 3","bitOr([1, 2, 3], 4)"],seealso:["bitAnd","bitNot","bitXor","leftShift","rightArithShift","rightLogShift"]},bitXor:{name:"bitXor",category:"Bitwise",syntax:["bitXor(x, y)"],description:"Bitwise XOR operation, exclusive OR. Performs the logical exclusive OR operation on each pair of corresponding bits of the two given values. The result in each position is 1 if only the first bit is 1 or only the second bit is 1, but will be 0 if both are 0 or both are 1.",examples:["bitOr(1, 2)","bitXor([2, 3, 4], 4)"],seealso:["bitAnd","bitNot","bitOr","leftShift","rightArithShift","rightLogShift"]},leftShift:{name:"leftShift",category:"Bitwise",syntax:["x << y","leftShift(x, y)"],description:"Bitwise left logical shift of a value x by y number of bits.",examples:["4 << 1","8 >> 1"],seealso:["bitAnd","bitNot","bitOr","bitXor","rightArithShift","rightLogShift"]},rightArithShift:{name:"rightArithShift",category:"Bitwise",syntax:["x >> y","rightArithShift(x, y)"],description:"Bitwise right arithmetic shift of a value x by y number of bits.",examples:["8 >> 1","4 << 1","-12 >> 2"],seealso:["bitAnd","bitNot","bitOr","bitXor","leftShift","rightLogShift"]},rightLogShift:{name:"rightLogShift",category:"Bitwise",syntax:["x >>> y","rightLogShift(x, y)"],description:"Bitwise right logical shift of a value x by y number of bits.",examples:["8 >>> 1","4 << 1","-12 >>> 2"],seealso:["bitAnd","bitNot","bitOr","bitXor","leftShift","rightArithShift"]},bellNumbers:{name:"bellNumbers",category:"Combinatorics",syntax:["bellNumbers(n)"],description:"The Bell Numbers count the number of partitions of a set. A partition is a pairwise disjoint subset of S whose union is S. `bellNumbers` only takes integer arguments. The following condition must be enforced: n >= 0.",examples:["bellNumbers(3)","bellNumbers(8)"],seealso:["stirlingS2"]},catalan:{name:"catalan",category:"Combinatorics",syntax:["catalan(n)"],description:"The Catalan Numbers enumerate combinatorial structures of many different types. catalan only takes integer arguments. The following condition must be enforced: n >= 0.",examples:["catalan(3)","catalan(8)"],seealso:["bellNumbers"]},composition:{name:"composition",category:"Combinatorics",syntax:["composition(n, k)"],description:"The composition counts of n into k parts. composition only takes integer arguments. The following condition must be enforced: k <= n.",examples:["composition(5, 3)"],seealso:["combinations"]},stirlingS2:{name:"stirlingS2",category:"Combinatorics",syntax:["stirlingS2(n, k)"],description:"he Stirling numbers of the second kind, counts the number of ways to partition a set of n labelled objects into k nonempty unlabelled subsets. `stirlingS2` only takes integer arguments. The following condition must be enforced: k <= n. If n = k or k = 1, then s(n,k) = 1.",examples:["stirlingS2(5, 3)"],seealso:["bellNumbers"]},config:{name:"config",category:"Core",syntax:["config()","config(options)"],description:"Get configuration or change configuration.",examples:["config()","1/3 + 1/4",'config({number: "Fraction"})',"1/3 + 1/4"],seealso:[]},import:{name:"import",category:"Core",syntax:["import(functions)","import(functions, options)"],description:"Import functions or constants from an object.",examples:["import({myFn: f(x)=x^2, myConstant: 32 })","myFn(2)","myConstant"],seealso:[]},typed:{name:"typed",category:"Core",syntax:["typed(signatures)","typed(name, signatures)"],description:"Create a typed function.",examples:['double = typed({ "number": f(x)=x+x })',"double(2)",'double("hello")'],seealso:[]},arg:{name:"arg",category:"Complex",syntax:["arg(x)"],description:"Compute the argument of a complex value. If x = a+bi, the argument is computed as atan2(b, a).",examples:["arg(2 + 2i)","atan2(3, 2)","arg(2 + 3i)"],seealso:["re","im","conj","abs"]},conj:{name:"conj",category:"Complex",syntax:["conj(x)"],description:"Compute the complex conjugate of a complex value. If x = a+bi, the complex conjugate is a-bi.",examples:["conj(2 + 3i)","conj(2 - 3i)","conj(-5.2i)"],seealso:["re","im","abs","arg"]},re:{name:"re",category:"Complex",syntax:["re(x)"],description:"Get the real part of a complex number.",examples:["re(2 + 3i)","im(2 + 3i)","re(-5.2i)","re(2.4)"],seealso:["im","conj","abs","arg"]},im:{name:"im",category:"Complex",syntax:["im(x)"],description:"Get the imaginary part of a complex number.",examples:["im(2 + 3i)","re(2 + 3i)","im(-5.2i)","im(2.4)"],seealso:["re","conj","abs","arg"]},evaluate:{name:"evaluate",category:"Expression",syntax:["evaluate(expression)","evaluate([expr1, expr2, expr3, ...])"],description:"Evaluate an expression or an array with expressions.",examples:['evaluate("2 + 3")','evaluate("sqrt(" + 4 + ")")'],seealso:[]},help:{name:"help",category:"Expression",syntax:["help(object)","help(string)"],description:"Display documentation on a function or data type.",examples:["help(sqrt)",'help("complex")'],seealso:[]},distance:{name:"distance",category:"Geometry",syntax:["distance([x1, y1], [x2, y2])","distance([[x1, y1], [x2, y2]])"],description:"Calculates the Euclidean distance between two points.",examples:["distance([0,0], [4,4])","distance([[0,0], [4,4]])"],seealso:[]},intersect:{name:"intersect",category:"Geometry",syntax:["intersect(expr1, expr2, expr3, expr4)","intersect(expr1, expr2, expr3)"],description:"Computes the intersection point of lines and/or planes.",examples:["intersect([0, 0], [10, 10], [10, 0], [0, 10])","intersect([1, 0, 1], [4, -2, 2], [1, 1, 1, 6])"],seealso:[]},and:{name:"and",category:"Logical",syntax:["x and y","and(x, y)"],description:"Logical and. Test whether two values are both defined with a nonzero/nonempty value.",examples:["true and false","true and true","2 and 4"],seealso:["not","or","xor"]},not:{name:"not",category:"Logical",syntax:["not x","not(x)"],description:"Logical not. Flips the boolean value of given argument.",examples:["not true","not false","not 2","not 0"],seealso:["and","or","xor"]},or:{name:"or",category:"Logical",syntax:["x or y","or(x, y)"],description:"Logical or. Test if at least one value is defined with a nonzero/nonempty value.",examples:["true or false","false or false","0 or 4"],seealso:["not","and","xor"]},xor:{name:"xor",category:"Logical",syntax:["x xor y","xor(x, y)"],description:"Logical exclusive or, xor. Test whether one and only one value is defined with a nonzero/nonempty value.",examples:["true xor false","false xor false","true xor true","0 xor 4"],seealso:["not","and","or"]},concat:{name:"concat",category:"Matrix",syntax:["concat(A, B, C, ...)","concat(A, B, C, ..., dim)"],description:"Concatenate matrices. By default, the matrices are concatenated by the last dimension. The dimension on which to concatenate can be provided as last argument.",examples:["A = [1, 2; 5, 6]","B = [3, 4; 7, 8]","concat(A, B)","concat(A, B, 1)","concat(A, B, 2)"],seealso:["det","diag","identity","inv","ones","range","size","squeeze","subset","trace","transpose","zeros"]},count:{name:"count",category:"Matrix",syntax:["count(x)"],description:"Count the number of elements of a matrix, array or string.",examples:["a = [1, 2; 3, 4; 5, 6]","count(a)","size(a)",'count("hello world")'],seealso:["size"]},cross:{name:"cross",category:"Matrix",syntax:["cross(A, B)"],description:"Calculate the cross product for two vectors in three dimensional space.",examples:["cross([1, 1, 0], [0, 1, 1])","cross([3, -3, 1], [4, 9, 2])","cross([2, 3, 4], [5, 6, 7])"],seealso:["multiply","dot"]},column:{name:"column",category:"Matrix",syntax:["column(x, index)"],description:"Return a column from a matrix or array.",examples:["A = [[1, 2], [3, 4]]","column(A, 1)","column(A, 2)"],seealso:["row","matrixFromColumns"]},ctranspose:{name:"ctranspose",category:"Matrix",syntax:["x'","ctranspose(x)"],description:"Complex Conjugate and Transpose a matrix",examples:["a = [1, 2, 3; 4, 5, 6]","a'","ctranspose(a)"],seealso:["concat","det","diag","identity","inv","ones","range","size","squeeze","subset","trace","zeros"]},det:{name:"det",category:"Matrix",syntax:["det(x)"],description:"Calculate the determinant of a matrix",examples:["det([1, 2; 3, 4])","det([-2, 2, 3; -1, 1, 3; 2, 0, -1])"],seealso:["concat","diag","identity","inv","ones","range","size","squeeze","subset","trace","transpose","zeros"]},diag:{name:"diag",category:"Matrix",syntax:["diag(x)","diag(x, k)"],description:"Create a diagonal matrix or retrieve the diagonal of a matrix. When x is a vector, a matrix with the vector values on the diagonal will be returned. When x is a matrix, a vector with the diagonal values of the matrix is returned. When k is provided, the k-th diagonal will be filled in or retrieved, if k is positive, the values are placed on the super diagonal. When k is negative, the values are placed on the sub diagonal.",examples:["diag(1:3)","diag(1:3, 1)","a = [1, 2, 3; 4, 5, 6; 7, 8, 9]","diag(a)"],seealso:["concat","det","identity","inv","ones","range","size","squeeze","subset","trace","transpose","zeros"]},diff:{name:"diff",category:"Matrix",syntax:["diff(arr)","diff(arr, dim)"],description:["Create a new matrix or array with the difference of the passed matrix or array.","Dim parameter is optional and used to indicant the dimension of the array/matrix to apply the difference","If no dimension parameter is passed it is assumed as dimension 0","Dimension is zero-based in javascript and one-based in the parser","Arrays must be 'rectangular' meaning arrays like [1, 2]","If something is passed as a matrix it will be returned as a matrix but other than that all matrices are converted to arrays"],examples:["diff([1, 2, 4, 7, 0])","diff([1, 2, 4, 7, 0], 0)","diff(matrix([1, 2, 4, 7, 0]))","diff([[1, 2], [3, 4]])","diff([[1, 2], [3, 4]], 0)","diff([[1, 2], [3, 4]], 1)","diff([[1, 2], [3, 4]], bignumber(1))","diff(matrix([[1, 2], [3, 4]]), 1)","diff([[1, 2], matrix([3, 4])], 1)"],seealso:["subtract","partitionSelect"]},dot:{name:"dot",category:"Matrix",syntax:["dot(A, B)","A * B"],description:"Calculate the dot product of two vectors. The dot product of A = [a1, a2, a3, ..., an] and B = [b1, b2, b3, ..., bn] is defined as dot(A, B) = a1 * b1 + a2 * b2 + a3 * b3 + ... + an * bn",examples:["dot([2, 4, 1], [2, 2, 3])","[2, 4, 1] * [2, 2, 3]"],seealso:["multiply","cross"]},getMatrixDataType:{name:"getMatrixDataType",category:"Matrix",syntax:["getMatrixDataType(x)"],description:'Find the data type of all elements in a matrix or array, for example "number" if all items are a number and "Complex" if all values are complex numbers. If a matrix contains more than one data type, it will return "mixed".',examples:["getMatrixDataType([1, 2, 3])","getMatrixDataType([[5 cm], [2 inch]])",'getMatrixDataType([1, "text"])',"getMatrixDataType([1, bignumber(4)])"],seealso:["matrix","sparse","typeOf"]},identity:{name:"identity",category:"Matrix",syntax:["identity(n)","identity(m, n)","identity([m, n])"],description:"Returns the identity matrix with size m-by-n. The matrix has ones on the diagonal and zeros elsewhere.",examples:["identity(3)","identity(3, 5)","a = [1, 2, 3; 4, 5, 6]","identity(size(a))"],seealso:["concat","det","diag","inv","ones","range","size","squeeze","subset","trace","transpose","zeros"]},filter:{name:"filter",category:"Matrix",syntax:["filter(x, test)"],description:"Filter items in a matrix.",examples:["isPositive(x) = x > 0","filter([6, -2, -1, 4, 3], isPositive)","filter([6, -2, 0, 1, 0], x != 0)"],seealso:["sort","map","forEach"]},flatten:{name:"flatten",category:"Matrix",syntax:["flatten(x)"],description:"Flatten a multi dimensional matrix into a single dimensional matrix.",examples:["a = [1, 2, 3; 4, 5, 6]","size(a)","b = flatten(a)","size(b)"],seealso:["concat","resize","size","squeeze"]},forEach:{name:"forEach",category:"Matrix",syntax:["forEach(x, callback)"],description:"Iterates over all elements of a matrix/array, and executes the given callback function.",examples:["numberOfPets = {}","addPet(n) = numberOfPets[n] = (numberOfPets[n] ? numberOfPets[n]:0 ) + 1;",'forEach(["Dog","Cat","Cat"], addPet)',"numberOfPets"],seealso:["map","sort","filter"]},inv:{name:"inv",category:"Matrix",syntax:["inv(x)"],description:"Calculate the inverse of a matrix",examples:["inv([1, 2; 3, 4])","inv(4)","1 / 4"],seealso:["concat","det","diag","identity","ones","range","size","squeeze","subset","trace","transpose","zeros"]},pinv:{name:"pinv",category:"Matrix",syntax:["pinv(x)"],description:"Calculate the Moore–Penrose inverse of a matrix",examples:["pinv([1, 2; 3, 4])","pinv([[1, 0], [0, 1], [0, 1]])","pinv(4)"],seealso:["inv"]},eigs:{name:"eigs",category:"Matrix",syntax:["eigs(x)"],description:"Calculate the eigenvalues and eigenvectors of a real symmetric matrix",examples:["eigs([[5, 2.3], [2.3, 1]])"],seealso:["inv"]},kron:{name:"kron",category:"Matrix",syntax:["kron(x, y)"],description:"Calculates the kronecker product of 2 matrices or vectors.",examples:["kron([[1, 0], [0, 1]], [[1, 2], [3, 4]])","kron([1,1], [2,3,4])"],seealso:["multiply","dot","cross"]},matrixFromFunction:{name:"matrixFromFunction",category:"Matrix",syntax:["math.matrixFromFunction(size, fn)","math.matrixFromFunction(size, fn, format)","math.matrixFromFunction(size, fn, format, datatype)","math.matrixFromFunction(size, format, fn)","math.matrixFromFunction(size, format, datatype, fn)"],description:"Create a matrix by evaluating a generating function at each index.",examples:["f(I) = I[1] - I[2]","matrixFromFunction([3,3], f)","g(I) = I[1] - I[2] == 1 ? 4 : 0",'matrixFromFunction([100, 100], "sparse", g)',"matrixFromFunction([5], random)"],seealso:["matrix","matrixFromRows","matrixFromColumns","zeros"]},matrixFromRows:{name:"matrixFromRows",category:"Matrix",syntax:["math.matrixFromRows(...arr)","math.matrixFromRows(row1, row2)","math.matrixFromRows(row1, row2, row3)"],description:"Create a dense matrix from vectors as individual rows.",examples:["matrixFromRows([1, 2, 3], [[4],[5],[6]])"],seealso:["matrix","matrixFromColumns","matrixFromFunction","zeros"]},matrixFromColumns:{name:"matrixFromColumns",category:"Matrix",syntax:["math.matrixFromColumns(...arr)","math.matrixFromColumns(row1, row2)","math.matrixFromColumns(row1, row2, row3)"],description:"Create a dense matrix from vectors as individual columns.",examples:["matrixFromColumns([1, 2, 3], [[4],[5],[6]])"],seealso:["matrix","matrixFromRows","matrixFromFunction","zeros"]},map:{name:"map",category:"Matrix",syntax:["map(x, callback)"],description:"Create a new matrix or array with the results of the callback function executed on each entry of the matrix/array.",examples:["map([1, 2, 3], square)"],seealso:["filter","forEach"]},ones:{name:"ones",category:"Matrix",syntax:["ones(m)","ones(m, n)","ones(m, n, p, ...)","ones([m])","ones([m, n])","ones([m, n, p, ...])"],description:"Create a matrix containing ones.",examples:["ones(3)","ones(3, 5)","ones([2,3]) * 4.5","a = [1, 2, 3; 4, 5, 6]","ones(size(a))"],seealso:["concat","det","diag","identity","inv","range","size","squeeze","subset","trace","transpose","zeros"]},partitionSelect:{name:"partitionSelect",category:"Matrix",syntax:["partitionSelect(x, k)","partitionSelect(x, k, compare)"],description:"Partition-based selection of an array or 1D matrix. Will find the kth smallest value, and mutates the input array. Uses Quickselect.",examples:["partitionSelect([5, 10, 1], 2)",'partitionSelect(["C", "B", "A", "D"], 1)'],seealso:["sort"]},range:{name:"range",category:"Type",syntax:["start:end","start:step:end","range(start, end)","range(start, end, step)","range(string)"],description:"Create a range. Lower bound of the range is included, upper bound is excluded.",examples:["1:5","3:-1:-3","range(3, 7)","range(0, 12, 2)",'range("4:10")',"a = [1, 2, 3, 4; 5, 6, 7, 8]","a[1:2, 1:2]"],seealso:["concat","det","diag","identity","inv","ones","size","squeeze","subset","trace","transpose","zeros"]},resize:{name:"resize",category:"Matrix",syntax:["resize(x, size)","resize(x, size, defaultValue)"],description:"Resize a matrix.",examples:["resize([1,2,3,4,5], [3])","resize([1,2,3], [5])","resize([1,2,3], [5], -1)","resize(2, [2, 3])",'resize("hello", [8], "!")'],seealso:["size","subset","squeeze","reshape"]},reshape:{name:"reshape",category:"Matrix",syntax:["reshape(x, sizes)"],description:"Reshape a multi dimensional array to fit the specified dimensions.",examples:["reshape([1, 2, 3, 4, 5, 6], [2, 3])","reshape([[1, 2], [3, 4]], [1, 4])","reshape([[1, 2], [3, 4]], [4])"],seealso:["size","squeeze","resize"]},rotate:{name:"rotate",category:"Matrix",syntax:["rotate(w, theta)","rotate(w, theta, v)"],description:"Returns a 2-D rotation matrix (2x2) for a given angle (in radians). Returns a 2-D rotation matrix (3x3) of a given angle (in radians) around given axis.",examples:["rotate([1, 0], math.pi / 2)",'rotate(matrix([1, 0]), unit("35deg"))','rotate([1, 0, 0], unit("90deg"), [0, 0, 1])','rotate(matrix([1, 0, 0]), unit("90deg"), matrix([0, 0, 1]))'],seealso:["matrix","rotationMatrix"]},rotationMatrix:{name:"rotationMatrix",category:"Matrix",syntax:["rotationMatrix(theta)","rotationMatrix(theta, v)","rotationMatrix(theta, v, format)"],description:"Returns a 2-D rotation matrix (2x2) for a given angle (in radians). Returns a 2-D rotation matrix (3x3) of a given angle (in radians) around given axis.",examples:["rotationMatrix(pi / 2)",'rotationMatrix(unit("45deg"), [0, 0, 1])','rotationMatrix(1, matrix([0, 0, 1]), "sparse")'],seealso:["cos","sin"]},row:{name:"row",category:"Matrix",syntax:["row(x, index)"],description:"Return a row from a matrix or array.",examples:["A = [[1, 2], [3, 4]]","row(A, 1)","row(A, 2)"],seealso:["column","matrixFromRows"]},size:{name:"size",category:"Matrix",syntax:["size(x)"],description:"Calculate the size of a matrix.",examples:["size(2.3)",'size("hello world")',"a = [1, 2; 3, 4; 5, 6]","size(a)","size(1:6)"],seealso:["concat","count","det","diag","identity","inv","ones","range","squeeze","subset","trace","transpose","zeros"]},sort:{name:"sort",category:"Matrix",syntax:["sort(x)","sort(x, compare)"],description:'Sort the items in a matrix. Compare can be a string "asc", "desc", "natural", or a custom sort function.',examples:["sort([5, 10, 1])",'sort(["C", "B", "A", "D"])',"sortByLength(a, b) = size(a)[1] - size(b)[1]",'sort(["Langdon", "Tom", "Sara"], sortByLength)','sort(["10", "1", "2"], "natural")'],seealso:["map","filter","forEach"]},squeeze:{name:"squeeze",category:"Matrix",syntax:["squeeze(x)"],description:"Remove inner and outer singleton dimensions from a matrix.",examples:["a = zeros(3,2,1)","size(squeeze(a))","b = zeros(1,1,3)","size(squeeze(b))"],seealso:["concat","det","diag","identity","inv","ones","range","size","subset","trace","transpose","zeros"]},subset:{name:"subset",category:"Matrix",syntax:["value(index)","value(index) = replacement","subset(value, [index])","subset(value, [index], replacement)"],description:"Get or set a subset of the entries of a matrix or characters of a string. Indexes are one-based. There should be one index specification for each dimension of the target. Each specification can be a single index, a list of indices, or a range in colon notation `l:u`. In a range, both the lower bound l and upper bound u are included; and if a bound is omitted it defaults to the most extreme valid value. The cartesian product of the indices specified in each dimension determines the target of the operation.",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]","f[[1,2], [1,3]] = [9, 10; 11, 12]","f"],seealso:["concat","det","diag","identity","inv","ones","range","size","squeeze","trace","transpose","zeros"]},trace:{name:"trace",category:"Matrix",syntax:["trace(A)"],description:"Calculate the trace of a matrix: the sum of the elements on the main diagonal of a square matrix.",examples:["A = [1, 2, 3; -1, 2, 3; 2, 0, 3]","trace(A)"],seealso:["concat","det","diag","identity","inv","ones","range","size","squeeze","subset","transpose","zeros"]},transpose:{name:"transpose",category:"Matrix",syntax:["x'","transpose(x)"],description:"Transpose a matrix",examples:["a = [1, 2, 3; 4, 5, 6]","a'","transpose(a)"],seealso:["concat","det","diag","identity","inv","ones","range","size","squeeze","subset","trace","zeros"]},zeros:{name:"zeros",category:"Matrix",syntax:["zeros(m)","zeros(m, n)","zeros(m, n, p, ...)","zeros([m])","zeros([m, n])","zeros([m, n, p, ...])"],description:"Create a matrix containing zeros.",examples:["zeros(3)","zeros(3, 5)","a = [1, 2, 3; 4, 5, 6]","zeros(size(a))"],seealso:["concat","det","diag","identity","inv","ones","range","size","squeeze","subset","trace","transpose"]},fft:{name:"fft",category:"Matrix",syntax:["fft(x)"],description:"Calculate N-dimensional fourier transform",examples:["fft([[1, 0], [1, 0]])"],seealso:["ifft"]},ifft:{name:"ifft",category:"Matrix",syntax:["ifft(x)"],description:"Calculate N-dimensional inverse fourier transform",examples:["ifft([[2, 2], [0, 0]])"],seealso:["fft"]},combinations:{name:"combinations",category:"Probability",syntax:["combinations(n, k)"],description:"Compute the number of combinations of n items taken k at a time",examples:["combinations(7, 5)"],seealso:["combinationsWithRep","permutations","factorial"]},combinationsWithRep:{name:"combinationsWithRep",category:"Probability",syntax:["combinationsWithRep(n, k)"],description:"Compute the number of combinations of n items taken k at a time with replacements.",examples:["combinationsWithRep(7, 5)"],seealso:["combinations","permutations","factorial"]},factorial:{name:"factorial",category:"Probability",syntax:["n!","factorial(n)"],description:"Compute the factorial of a value",examples:["5!","5 * 4 * 3 * 2 * 1","3!"],seealso:["combinations","combinationsWithRep","permutations","gamma"]},gamma:{name:"gamma",category:"Probability",syntax:["gamma(n)"],description:"Compute the gamma function. For small values, the Lanczos approximation is used, and for large values the extended Stirling approximation.",examples:["gamma(4)","3!","gamma(1/2)","sqrt(pi)"],seealso:["factorial"]},kldivergence:{name:"kldivergence",category:"Probability",syntax:["kldivergence(x, y)"],description:"Calculate the Kullback-Leibler (KL) divergence between two distributions.",examples:["kldivergence([0.7,0.5,0.4], [0.2,0.9,0.5])"],seealso:[]},lgamma:{name:"lgamma",category:"Probability",syntax:["lgamma(n)"],description:"Logarithm of the gamma function for real, positive numbers and complex numbers, using Lanczos approximation for numbers and Stirling series for complex numbers.",examples:["lgamma(4)","lgamma(1/2)","lgamma(math.i)","lgamma(complex(1.1, 2))"],seealso:["gamma"]},multinomial:{name:"multinomial",category:"Probability",syntax:["multinomial(A)"],description:"Multinomial Coefficients compute the number of ways of picking a1, a2, ..., ai unordered outcomes from `n` possibilities. multinomial takes one array of integers as an argument. The following condition must be enforced: every ai > 0.",examples:["multinomial([1, 2, 1])"],seealso:["combinations","factorial"]},permutations:{name:"permutations",category:"Probability",syntax:["permutations(n)","permutations(n, k)"],description:"Compute the number of permutations of n items taken k at a time",examples:["permutations(5)","permutations(5, 3)"],seealso:["combinations","combinationsWithRep","factorial"]},pickRandom:{name:"pickRandom",category:"Probability",syntax:["pickRandom(array)","pickRandom(array, number)","pickRandom(array, weights)","pickRandom(array, number, weights)","pickRandom(array, weights, number)"],description:"Pick a random entry from a given array.",examples:["pickRandom(0:10)","pickRandom([1, 3, 1, 6])","pickRandom([1, 3, 1, 6], 2)","pickRandom([1, 3, 1, 6], [2, 3, 2, 1])","pickRandom([1, 3, 1, 6], 2, [2, 3, 2, 1])","pickRandom([1, 3, 1, 6], [2, 3, 2, 1], 2)"],seealso:["random","randomInt"]},random:{name:"random",category:"Probability",syntax:["random()","random(max)","random(min, max)","random(size)","random(size, max)","random(size, min, max)"],description:"Return a random number.",examples:["random()","random(10, 20)","random([2, 3])"],seealso:["pickRandom","randomInt"]},randomInt:{name:"randomInt",category:"Probability",syntax:["randomInt(max)","randomInt(min, max)","randomInt(size)","randomInt(size, max)","randomInt(size, min, max)"],description:"Return a random integer number",examples:["randomInt(10, 20)","randomInt([2, 3], 10)"],seealso:["pickRandom","random"]},compare:{name:"compare",category:"Relational",syntax:["compare(x, y)"],description:"Compare two values. Returns 1 when x > y, -1 when x < y, and 0 when x == y.",examples:["compare(2, 3)","compare(3, 2)","compare(2, 2)","compare(5cm, 40mm)","compare(2, [1, 2, 3])"],seealso:["equal","unequal","smaller","smallerEq","largerEq","compareNatural","compareText"]},compareNatural:{name:"compareNatural",category:"Relational",syntax:["compareNatural(x, y)"],description:"Compare two values of any type in a deterministic, natural way. Returns 1 when x > y, -1 when x < y, and 0 when x == y.",examples:["compareNatural(2, 3)","compareNatural(3, 2)","compareNatural(2, 2)","compareNatural(5cm, 40mm)",'compareNatural("2", "10")',"compareNatural(2 + 3i, 2 + 4i)","compareNatural([1, 2, 4], [1, 2, 3])","compareNatural([1, 5], [1, 2, 3])","compareNatural([1, 2], [1, 2])","compareNatural({a: 2}, {a: 4})"],seealso:["equal","unequal","smaller","smallerEq","largerEq","compare","compareText"]},compareText:{name:"compareText",category:"Relational",syntax:["compareText(x, y)"],description:"Compare two strings lexically. Comparison is case sensitive. Returns 1 when x > y, -1 when x < y, and 0 when x == y.",examples:['compareText("B", "A")','compareText("A", "B")','compareText("A", "A")','compareText("2", "10")','compare("2", "10")',"compare(2, 10)",'compareNatural("2", "10")','compareText("B", ["A", "B", "C"])'],seealso:["compare","compareNatural"]},deepEqual:{name:"deepEqual",category:"Relational",syntax:["deepEqual(x, y)"],description:"Check equality of two matrices element wise. Returns true if the size of both matrices is equal and when and each of the elements are equal.",examples:["deepEqual([1,3,4], [1,3,4])","deepEqual([1,3,4], [1,3])"],seealso:["equal","unequal","smaller","larger","smallerEq","largerEq","compare"]},equal:{name:"equal",category:"Relational",syntax:["x == y","equal(x, y)"],description:"Check equality of two values. Returns true if the values are equal, and false if not.",examples:["2+2 == 3","2+2 == 4","a = 3.2","b = 6-2.8","a == b","50cm == 0.5m"],seealso:["unequal","smaller","larger","smallerEq","largerEq","compare","deepEqual","equalText"]},equalText:{name:"equalText",category:"Relational",syntax:["equalText(x, y)"],description:"Check equality of two strings. Comparison is case sensitive. Returns true if the values are equal, and false if not.",examples:['equalText("Hello", "Hello")','equalText("a", "A")','equal("2e3", "2000")','equalText("2e3", "2000")','equalText("B", ["A", "B", "C"])'],seealso:["compare","compareNatural","compareText","equal"]},larger:{name:"larger",category:"Relational",syntax:["x > y","larger(x, y)"],description:"Check if value x is larger than y. Returns true if x is larger than y, and false if not.",examples:["2 > 3","5 > 2*2","a = 3.3","b = 6-2.8","(a > b)","(b < a)","5 cm > 2 inch"],seealso:["equal","unequal","smaller","smallerEq","largerEq","compare"]},largerEq:{name:"largerEq",category:"Relational",syntax:["x >= y","largerEq(x, y)"],description:"Check if value x is larger or equal to y. Returns true if x is larger or equal to y, and false if not.",examples:["2 >= 1+1","2 > 1+1","a = 3.2","b = 6-2.8","(a >= b)"],seealso:["equal","unequal","smallerEq","smaller","compare"]},smaller:{name:"smaller",category:"Relational",syntax:["x < y","smaller(x, y)"],description:"Check if value x is smaller than value y. Returns true if x is smaller than y, and false if not.",examples:["2 < 3","5 < 2*2","a = 3.3","b = 6-2.8","(a < b)","5 cm < 2 inch"],seealso:["equal","unequal","larger","smallerEq","largerEq","compare"]},smallerEq:{name:"smallerEq",category:"Relational",syntax:["x <= y","smallerEq(x, y)"],description:"Check if value x is smaller or equal to value y. Returns true if x is smaller than y, and false if not.",examples:["2 <= 1+1","2 < 1+1","a = 3.2","b = 6-2.8","(a <= b)"],seealso:["equal","unequal","larger","smaller","largerEq","compare"]},unequal:{name:"unequal",category:"Relational",syntax:["x != y","unequal(x, y)"],description:"Check unequality of two values. Returns true if the values are unequal, and false if they are equal.",examples:["2+2 != 3","2+2 != 4","a = 3.2","b = 6-2.8","a != b","50cm != 0.5m","5 cm != 2 inch"],seealso:["equal","smaller","larger","smallerEq","largerEq","compare","deepEqual"]},setCartesian:{name:"setCartesian",category:"Set",syntax:["setCartesian(set1, set2)"],description:"Create the cartesian product of two (multi)sets. Multi-dimension arrays will be converted to single-dimension arrays and the values will be sorted in ascending order before the operation.",examples:["setCartesian([1, 2], [3, 4])"],seealso:["setUnion","setIntersect","setDifference","setPowerset"]},setDifference:{name:"setDifference",category:"Set",syntax:["setDifference(set1, set2)"],description:"Create the difference of two (multi)sets: every element of set1, that is not the element of set2. Multi-dimension arrays will be converted to single-dimension arrays before the operation.",examples:["setDifference([1, 2, 3, 4], [3, 4, 5, 6])","setDifference([[1, 2], [3, 4]], [[3, 4], [5, 6]])"],seealso:["setUnion","setIntersect","setSymDifference"]},setDistinct:{name:"setDistinct",category:"Set",syntax:["setDistinct(set)"],description:"Collect the distinct elements of a multiset. A multi-dimension array will be converted to a single-dimension array before the operation.",examples:["setDistinct([1, 1, 1, 2, 2, 3])"],seealso:["setMultiplicity"]},setIntersect:{name:"setIntersect",category:"Set",syntax:["setIntersect(set1, set2)"],description:"Create the intersection of two (multi)sets. Multi-dimension arrays will be converted to single-dimension arrays before the operation.",examples:["setIntersect([1, 2, 3, 4], [3, 4, 5, 6])","setIntersect([[1, 2], [3, 4]], [[3, 4], [5, 6]])"],seealso:["setUnion","setDifference"]},setIsSubset:{name:"setIsSubset",category:"Set",syntax:["setIsSubset(set1, set2)"],description:"Check whether a (multi)set is a subset of another (multi)set: every element of set1 is the element of set2. Multi-dimension arrays will be converted to single-dimension arrays before the operation.",examples:["setIsSubset([1, 2], [3, 4, 5, 6])","setIsSubset([3, 4], [3, 4, 5, 6])"],seealso:["setUnion","setIntersect","setDifference"]},setMultiplicity:{name:"setMultiplicity",category:"Set",syntax:["setMultiplicity(element, set)"],description:"Count the multiplicity of an element in a multiset. A multi-dimension array will be converted to a single-dimension array before the operation.",examples:["setMultiplicity(1, [1, 2, 2, 4])","setMultiplicity(2, [1, 2, 2, 4])"],seealso:["setDistinct","setSize"]},setPowerset:{name:"setPowerset",category:"Set",syntax:["setPowerset(set)"],description:"Create the powerset of a (multi)set: the powerset contains very possible subsets of a (multi)set. A multi-dimension array will be converted to a single-dimension array before the operation.",examples:["setPowerset([1, 2, 3])"],seealso:["setCartesian"]},setSize:{name:"setSize",category:"Set",syntax:["setSize(set)","setSize(set, unique)"],description:'Count the number of elements of a (multi)set. When the second parameter "unique" is true, count only the unique values. A multi-dimension array will be converted to a single-dimension array before the operation.',examples:["setSize([1, 2, 2, 4])","setSize([1, 2, 2, 4], true)"],seealso:["setUnion","setIntersect","setDifference"]},setSymDifference:{name:"setSymDifference",category:"Set",syntax:["setSymDifference(set1, set2)"],description:"Create the symmetric difference of two (multi)sets. Multi-dimension arrays will be converted to single-dimension arrays before the operation.",examples:["setSymDifference([1, 2, 3, 4], [3, 4, 5, 6])","setSymDifference([[1, 2], [3, 4]], [[3, 4], [5, 6]])"],seealso:["setUnion","setIntersect","setDifference"]},setUnion:{name:"setUnion",category:"Set",syntax:["setUnion(set1, set2)"],description:"Create the union of two (multi)sets. Multi-dimension arrays will be converted to single-dimension arrays before the operation.",examples:["setUnion([1, 2, 3, 4], [3, 4, 5, 6])","setUnion([[1, 2], [3, 4]], [[3, 4], [5, 6]])"],seealso:["setIntersect","setDifference"]},erf:{name:"erf",category:"Special",syntax:["erf(x)"],description:"Compute the erf function of a value using a rational Chebyshev approximations for different intervals of x",examples:["erf(0.2)","erf(-0.5)","erf(4)"],seealso:[]},cumsum:{name:"cumsum",category:"Statistics",syntax:["cumsum(a, b, c, ...)","cumsum(A)"],description:"Compute the cumulative sum of all values.",examples:["cumsum(2, 3, 4, 1)","cumsum([2, 3, 4, 1])","cumsum([1, 2; 3, 4])","cumsum([1, 2; 3, 4], 1)","cumsum([1, 2; 3, 4], 2)"],seealso:["max","mean","median","min","prod","std","sum","variance"]},mad:{name:"mad",category:"Statistics",syntax:["mad(a, b, c, ...)","mad(A)"],description:"Compute the median absolute deviation of a matrix or a list with values. The median absolute deviation is defined as the median of the absolute deviations from the median.",examples:["mad(10, 20, 30)","mad([1, 2, 3])"],seealso:["mean","median","std","abs"]},max:{name:"max",category:"Statistics",syntax:["max(a, b, c, ...)","max(A)","max(A, dim)"],description:"Compute the maximum value of a list of values.",examples:["max(2, 3, 4, 1)","max([2, 3, 4, 1])","max([2, 5; 4, 3])","max([2, 5; 4, 3], 1)","max([2, 5; 4, 3], 2)","max(2.7, 7.1, -4.5, 2.0, 4.1)","min(2.7, 7.1, -4.5, 2.0, 4.1)"],seealso:["mean","median","min","prod","std","sum","variance"]},mean:{name:"mean",category:"Statistics",syntax:["mean(a, b, c, ...)","mean(A)","mean(A, dim)"],description:"Compute the arithmetic mean of a list of values.",examples:["mean(2, 3, 4, 1)","mean([2, 3, 4, 1])","mean([2, 5; 4, 3])","mean([2, 5; 4, 3], 1)","mean([2, 5; 4, 3], 2)","mean([1.0, 2.7, 3.2, 4.0])"],seealso:["max","median","min","prod","std","sum","variance"]},median:{name:"median",category:"Statistics",syntax:["median(a, b, c, ...)","median(A)"],description:"Compute the median of all values. The values are sorted and the middle value is returned. In case of an even number of values, the average of the two middle values is returned.",examples:["median(5, 2, 7)","median([3, -1, 5, 7])"],seealso:["max","mean","min","prod","std","sum","variance","quantileSeq"]},min:{name:"min",category:"Statistics",syntax:["min(a, b, c, ...)","min(A)","min(A, dim)"],description:"Compute the minimum value of a list of values.",examples:["min(2, 3, 4, 1)","min([2, 3, 4, 1])","min([2, 5; 4, 3])","min([2, 5; 4, 3], 1)","min([2, 5; 4, 3], 2)","min(2.7, 7.1, -4.5, 2.0, 4.1)","max(2.7, 7.1, -4.5, 2.0, 4.1)"],seealso:["max","mean","median","prod","std","sum","variance"]},mode:{name:"mode",category:"Statistics",syntax:["mode(a, b, c, ...)","mode(A)","mode(A, a, b, B, c, ...)"],description:"Computes the mode of all values as an array. In case mode being more than one, multiple values are returned in an array.",examples:["mode(2, 1, 4, 3, 1)","mode([1, 2.7, 3.2, 4, 2.7])","mode(1, 4, 6, 1, 6)"],seealso:["max","mean","min","median","prod","std","sum","variance"]},prod:{name:"prod",category:"Statistics",syntax:["prod(a, b, c, ...)","prod(A)"],description:"Compute the product of all values.",examples:["prod(2, 3, 4)","prod([2, 3, 4])","prod([2, 5; 4, 3])"],seealso:["max","mean","min","median","min","std","sum","variance"]},quantileSeq:{name:"quantileSeq",category:"Statistics",syntax:["quantileSeq(A, prob[, sorted])","quantileSeq(A, [prob1, prob2, ...][, sorted])","quantileSeq(A, N[, sorted])"],description:"Compute the prob order quantile of a matrix or a list with values. The sequence is sorted and the middle value is returned. Supported types of sequence values are: Number, BigNumber, Unit Supported types of probablity are: Number, BigNumber. \n\nIn case of a (multi dimensional) array or matrix, the prob order quantile of all elements will be calculated.",examples:["quantileSeq([3, -1, 5, 7], 0.5)","quantileSeq([3, -1, 5, 7], [1/3, 2/3])","quantileSeq([3, -1, 5, 7], 2)","quantileSeq([-1, 3, 5, 7], 0.5, true)"],seealso:["mean","median","min","max","prod","std","sum","variance"]},std:{name:"std",category:"Statistics",syntax:["std(a, b, c, ...)","std(A)","std(A, normalization)"],description:'Compute the standard deviation of all values, defined as std(A) = sqrt(variance(A)). Optional parameter normalization can be "unbiased" (default), "uncorrected", or "biased".',examples:["std(2, 4, 6)","std([2, 4, 6, 8])",'std([2, 4, 6, 8], "uncorrected")','std([2, 4, 6, 8], "biased")',"std([1, 2, 3; 4, 5, 6])"],seealso:["max","mean","min","median","prod","sum","variance"]},sum:{name:"sum",category:"Statistics",syntax:["sum(a, b, c, ...)","sum(A)"],description:"Compute the sum of all values.",examples:["sum(2, 3, 4, 1)","sum([2, 3, 4, 1])","sum([2, 5; 4, 3])"],seealso:["max","mean","median","min","prod","std","sum","variance"]},variance:{name:"variance",category:"Statistics",syntax:["variance(a, b, c, ...)","variance(A)","variance(A, normalization)"],description:'Compute the variance of all values. Optional parameter normalization can be "unbiased" (default), "uncorrected", or "biased".',examples:["variance(2, 4, 6)","variance([2, 4, 6, 8])",'variance([2, 4, 6, 8], "uncorrected")','variance([2, 4, 6, 8], "biased")',"variance([1, 2, 3; 4, 5, 6])"],seealso:["max","mean","min","median","min","prod","std","sum"]},acos:{name:"acos",category:"Trigonometry",syntax:["acos(x)"],description:"Compute the inverse cosine of a value in radians.",examples:["acos(0.5)","acos(cos(2.3))"],seealso:["cos","atan","asin"]},acosh:{name:"acosh",category:"Trigonometry",syntax:["acosh(x)"],description:"Calculate the hyperbolic arccos of a value, defined as `acosh(x) = ln(sqrt(x^2 - 1) + x)`.",examples:["acosh(1.5)"],seealso:["cosh","asinh","atanh"]},acot:{name:"acot",category:"Trigonometry",syntax:["acot(x)"],description:"Calculate the inverse cotangent of a value.",examples:["acot(0.5)","acot(cot(0.5))","acot(2)"],seealso:["cot","atan"]},acoth:{name:"acoth",category:"Trigonometry",syntax:["acoth(x)"],description:"Calculate the hyperbolic arccotangent of a value, defined as `acoth(x) = (ln((x+1)/x) + ln(x/(x-1))) / 2`.",examples:["acoth(2)","acoth(0.5)"],seealso:["acsch","asech"]},acsc:{name:"acsc",category:"Trigonometry",syntax:["acsc(x)"],description:"Calculate the inverse cotangent of a value.",examples:["acsc(2)","acsc(csc(0.5))","acsc(0.5)"],seealso:["csc","asin","asec"]},acsch:{name:"acsch",category:"Trigonometry",syntax:["acsch(x)"],description:"Calculate the hyperbolic arccosecant of a value, defined as `acsch(x) = ln(1/x + sqrt(1/x^2 + 1))`.",examples:["acsch(0.5)"],seealso:["asech","acoth"]},asec:{name:"asec",category:"Trigonometry",syntax:["asec(x)"],description:"Calculate the inverse secant of a value.",examples:["asec(0.5)","asec(sec(0.5))","asec(2)"],seealso:["acos","acot","acsc"]},asech:{name:"asech",category:"Trigonometry",syntax:["asech(x)"],description:"Calculate the inverse secant of a value.",examples:["asech(0.5)"],seealso:["acsch","acoth"]},asin:{name:"asin",category:"Trigonometry",syntax:["asin(x)"],description:"Compute the inverse sine of a value in radians.",examples:["asin(0.5)","asin(sin(0.5))"],seealso:["sin","acos","atan"]},asinh:{name:"asinh",category:"Trigonometry",syntax:["asinh(x)"],description:"Calculate the hyperbolic arcsine of a value, defined as `asinh(x) = ln(x + sqrt(x^2 + 1))`.",examples:["asinh(0.5)"],seealso:["acosh","atanh"]},atan:{name:"atan",category:"Trigonometry",syntax:["atan(x)"],description:"Compute the inverse tangent of a value in radians.",examples:["atan(0.5)","atan(tan(0.5))"],seealso:["tan","acos","asin"]},atanh:{name:"atanh",category:"Trigonometry",syntax:["atanh(x)"],description:"Calculate the hyperbolic arctangent of a value, defined as `atanh(x) = ln((1 + x)/(1 - x)) / 2`.",examples:["atanh(0.5)"],seealso:["acosh","asinh"]},atan2:{name:"atan2",category:"Trigonometry",syntax:["atan2(y, x)"],description:"Computes the principal value of the arc tangent of y/x in radians.",examples:["atan2(2, 2) / pi","angle = 60 deg in rad","x = cos(angle)","y = sin(angle)","atan2(y, x)"],seealso:["sin","cos","tan"]},cos:{name:"cos",category:"Trigonometry",syntax:["cos(x)"],description:"Compute the cosine of x in radians.",examples:["cos(2)","cos(pi / 4) ^ 2","cos(180 deg)","cos(60 deg)","sin(0.2)^2 + cos(0.2)^2"],seealso:["acos","sin","tan"]},cosh:{name:"cosh",category:"Trigonometry",syntax:["cosh(x)"],description:"Compute the hyperbolic cosine of x in radians.",examples:["cosh(0.5)"],seealso:["sinh","tanh","coth"]},cot:{name:"cot",category:"Trigonometry",syntax:["cot(x)"],description:"Compute the cotangent of x in radians. Defined as 1/tan(x)",examples:["cot(2)","1 / tan(2)"],seealso:["sec","csc","tan"]},coth:{name:"coth",category:"Trigonometry",syntax:["coth(x)"],description:"Compute the hyperbolic cotangent of x in radians.",examples:["coth(2)","1 / tanh(2)"],seealso:["sech","csch","tanh"]},csc:{name:"csc",category:"Trigonometry",syntax:["csc(x)"],description:"Compute the cosecant of x in radians. Defined as 1/sin(x)",examples:["csc(2)","1 / sin(2)"],seealso:["sec","cot","sin"]},csch:{name:"csch",category:"Trigonometry",syntax:["csch(x)"],description:"Compute the hyperbolic cosecant of x in radians. Defined as 1/sinh(x)",examples:["csch(2)","1 / sinh(2)"],seealso:["sech","coth","sinh"]},sec:{name:"sec",category:"Trigonometry",syntax:["sec(x)"],description:"Compute the secant of x in radians. Defined as 1/cos(x)",examples:["sec(2)","1 / cos(2)"],seealso:["cot","csc","cos"]},sech:{name:"sech",category:"Trigonometry",syntax:["sech(x)"],description:"Compute the hyperbolic secant of x in radians. Defined as 1/cosh(x)",examples:["sech(2)","1 / cosh(2)"],seealso:["coth","csch","cosh"]},sin:{name:"sin",category:"Trigonometry",syntax:["sin(x)"],description:"Compute the sine of x in radians.",examples:["sin(2)","sin(pi / 4) ^ 2","sin(90 deg)","sin(30 deg)","sin(0.2)^2 + cos(0.2)^2"],seealso:["asin","cos","tan"]},sinh:{name:"sinh",category:"Trigonometry",syntax:["sinh(x)"],description:"Compute the hyperbolic sine of x in radians.",examples:["sinh(0.5)"],seealso:["cosh","tanh"]},tan:{name:"tan",category:"Trigonometry",syntax:["tan(x)"],description:"Compute the tangent of x in radians.",examples:["tan(0.5)","sin(0.5) / cos(0.5)","tan(pi / 4)","tan(45 deg)"],seealso:["atan","sin","cos"]},tanh:{name:"tanh",category:"Trigonometry",syntax:["tanh(x)"],description:"Compute the hyperbolic tangent of x in radians.",examples:["tanh(0.5)","sinh(0.5) / cosh(0.5)"],seealso:["sinh","cosh"]},to:{name:"to",category:"Units",syntax:["x to unit","to(x, unit)"],description:"Change the unit of a value.",examples:["5 inch to cm","3.2kg to g","16 bytes in bits"],seealso:[]},clone:{name:"clone",category:"Utils",syntax:["clone(x)"],description:"Clone a variable. Creates a copy of primitive variables,and a deep copy of matrices",examples:["clone(3.5)","clone(2 - 4i)","clone(45 deg)","clone([1, 2; 3, 4])",'clone("hello world")'],seealso:[]},format:{name:"format",category:"Utils",syntax:["format(value)","format(value, precision)"],description:"Format a value of any type as string.",examples:["format(2.3)","format(3 - 4i)","format([])","format(pi, 3)"],seealso:["print"]},bin:{name:"bin",category:"Utils",syntax:["bin(value)"],description:"Format a number as binary",examples:["bin(2)"],seealso:["oct","hex"]},oct:{name:"oct",category:"Utils",syntax:["oct(value)"],description:"Format a number as octal",examples:["oct(56)"],seealso:["bin","hex"]},hex:{name:"hex",category:"Utils",syntax:["hex(value)"],description:"Format a number as hexadecimal",examples:["hex(240)"],seealso:["bin","oct"]},isNaN:{name:"isNaN",category:"Utils",syntax:["isNaN(x)"],description:"Test whether a value is NaN (not a number)",examples:["isNaN(2)","isNaN(0 / 0)","isNaN(NaN)","isNaN(Infinity)"],seealso:["isNegative","isNumeric","isPositive","isZero"]},isInteger:{name:"isInteger",category:"Utils",syntax:["isInteger(x)"],description:"Test whether a value is an integer number.",examples:["isInteger(2)","isInteger(3.5)","isInteger([3, 0.5, -2])"],seealso:["isNegative","isNumeric","isPositive","isZero"]},isNegative:{name:"isNegative",category:"Utils",syntax:["isNegative(x)"],description:"Test whether a value is negative: smaller than zero.",examples:["isNegative(2)","isNegative(0)","isNegative(-4)","isNegative([3, 0.5, -2])"],seealso:["isInteger","isNumeric","isPositive","isZero"]},isNumeric:{name:"isNumeric",category:"Utils",syntax:["isNumeric(x)"],description:"Test whether a value is a numeric value. Returns true when the input is a number, BigNumber, Fraction, or boolean.",examples:["isNumeric(2)",'isNumeric("2")','hasNumericValue("2")',"isNumeric(0)","isNumeric(bignumber(500))","isNumeric(fraction(0.125))","isNumeric(2 + 3i)",'isNumeric([2.3, "foo", false])'],seealso:["isInteger","isZero","isNegative","isPositive","isNaN","hasNumericValue"]},hasNumericValue:{name:"hasNumericValue",category:"Utils",syntax:["hasNumericValue(x)"],description:"Test whether a value is an numeric value. In case of a string, true is returned if the string contains a numeric value.",examples:["hasNumericValue(2)",'hasNumericValue("2")','isNumeric("2")',"hasNumericValue(0)","hasNumericValue(bignumber(500))","hasNumericValue(fraction(0.125))","hasNumericValue(2 + 3i)",'hasNumericValue([2.3, "foo", false])'],seealso:["isInteger","isZero","isNegative","isPositive","isNaN","isNumeric"]},isPositive:{name:"isPositive",category:"Utils",syntax:["isPositive(x)"],description:"Test whether a value is positive: larger than zero.",examples:["isPositive(2)","isPositive(0)","isPositive(-4)","isPositive([3, 0.5, -2])"],seealso:["isInteger","isNumeric","isNegative","isZero"]},isPrime:{name:"isPrime",category:"Utils",syntax:["isPrime(x)"],description:"Test whether a value is prime: has no divisors other than itself and one.",examples:["isPrime(3)","isPrime(-2)","isPrime([2, 17, 100])"],seealso:["isInteger","isNumeric","isNegative","isZero"]},isZero:{name:"isZero",category:"Utils",syntax:["isZero(x)"],description:"Test whether a value is zero.",examples:["isZero(2)","isZero(0)","isZero(-4)","isZero([3, 0, -2, 0])"],seealso:["isInteger","isNumeric","isNegative","isPositive"]},print:{name:"print",category:"Utils",syntax:["print(template, values)","print(template, values, precision)"],description:"Interpolate values into a string template.",examples:['print("Lucy is $age years old", {age: 5})','print("The value of pi is $pi", {pi: pi}, 3)','print("Hello, $user.name!", {user: {name: "John"}})','print("Values: $0, $1, $2", [6, 9, 4])'],seealso:["format"]},typeOf:{name:"typeOf",category:"Utils",syntax:["typeOf(x)"],description:"Get the type of a variable.",examples:["typeOf(3.5)","typeOf(2 - 4i)","typeOf(45 deg)",'typeOf("hello world")'],seealso:["getMatrixDataType"]},numeric:{name:"numeric",category:"Utils",syntax:["numeric(x)"],description:"Convert a numeric input to a specific numeric type: number, BigNumber, or Fraction.",examples:['numeric("4")','numeric("4", "number")','numeric("4", "BigNumber")','numeric("4", "Fraction)','numeric(4, "Fraction")','numeric(fraction(2, 5), "number)'],seealso:["number","fraction","bignumber","string","format"]}}),Zy=tt("help",["typed","mathWithTransform","Help"],e=>{var{typed:e,mathWithTransform:t,Help:n}=e;return e("help",{any:function(e){var r,i=e;if("string"!=typeof e)for(r in t)if(J(t,r)&&e===t[r]){i=r;break}var o=Wn(Vy,i);if(o)return new n(o);throw o="function"==typeof i?i.name:i,new Error('No documentation found on "'+o+'"')}})}),Yy=tt("Parser",["evaluate"],e=>{var t=e["evaluate"];function n(){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");Object.defineProperty(this,"scope",{value:Kn(),writable:!1})}return n.prototype.type="Parser",n.prototype.isParser=!0,n.prototype.evaluate=function(e){return t(e,this.scope)},n.prototype.get=function(e){if(this.scope.has(e))return this.scope.get(e)},n.prototype.getAll=function(){var e=this.scope;if(e instanceof Qn)return e.wrappedObject;var t,n={};for(t of e.keys())Gn(n,t,e.get(t));return n},n.prototype.getAllAsMap=function(){return this.scope},n.prototype.set=function(e,t){return this.scope.set(e,t),t},n.prototype.remove=function(e){this.scope.delete(e)},n.prototype.clear=function(){this.scope.clear()},n},{isClass:!0}),Xy="rationalize",Jy=tt(Xy,["config","typed","equal","isZero","add","subtract","multiply","divide","pow","parse","simplifyCore","simplify","?bignumber","?fraction","mathWithTransform","matrix","AccessorNode","ArrayNode","ConstantNode","FunctionNode","IndexNode","ObjectNode","OperatorNode","SymbolNode","ParenthesisNode"],e=>{var{config:e,typed:t,parse:n,simplifyCore:r,simplify:i,fraction:o,bignumber:a,mathWithTransform:s,matrix:u,AccessorNode:c,ArrayNode:f,ConstantNode:l,FunctionNode:p,IndexNode:d,ObjectNode:h,OperatorNode:m,SymbolNode:y}=e,g=Uy({typed:t,config:e,mathWithTransform:s,matrix:u,fraction:o,bignumber:a,AccessorNode:c,ArrayNode:f,ConstantNode:l,FunctionNode:p,IndexNode:d,ObjectNode:h,OperatorNode:m,SymbolNode:y});return t(Xy,{string:function(e){return this(n(e),{},!1)},"string, boolean":function(e,t){return this(n(e),{},t)},"string, Object":function(e,t){return this(n(e),t,!1)},"string, Object, boolean":function(e,t,r){return this(n(e),t,r)},Node:function(e){return this(e,{},!1)},"Node, boolean":function(e,t){return this(e,{},t)},"Node, Object":function(e,t){return this(e,t,!1)},"Node, Object, boolean":function(e,t,n){(u={}).firstRules=(b=[r,{l:"n+n",r:"2*n"},{l:"n+-n",r:"0"},g,{l:"n*(n1^-1)",r:"n/n1"},{l:"n*n1^-n2",r:"n/n1^n2"},{l:"n1^-1",r:"1/n1"},{l:"n*(n1/n2)",r:"(n*n1)/n2"},{l:"1*n",r:"n"}]).concat(x=[{l:"(-n1)/(-n2)",r:"n1/n2"},{l:"(-n1)*(-n2)",r:"n1*n2"},{l:"n1--n2",r:"n1+n2"},{l:"n1-n2",r:"n1+(-n2)"},{l:"(n1+n2)*n3",r:"(n1*n3 + n2*n3)"},{l:"n1*(n2+n3)",r:"(n1*n2+n1*n3)"},{l:"c1*n + c2*n",r:"(c1+c2)*n"},{l:"c1*n + n",r:"(c1+1)*n"},{l:"c1*n - c2*n",r:"(c1-c2)*n"},{l:"c1*n - n",r:"(c1-1)*n"},{l:"v/c",r:"(1/c)*v"},{l:"v/-c",r:"-(1/c)*v"},{l:"-v*-c",r:"c*v"},{l:"-v*c",r:"-c*v"},{l:"v*-c",r:"-c*v"},{l:"v*c",r:"c*v"},{l:"-(-n1*n2)",r:"(n1*n2)"},{l:"-(n1*n2)",r:"(-n1*n2)"},{l:"-(-n1+n2)",r:"(n1-n2)"},{l:"-(n1+n2)",r:"(-n1-n2)"},{l:"(n1^n2)^n3",r:"(n1^(n2*n3))"},{l:"-(-n1/n2)",r:"(n1/n2)"},{l:"-(n1/n2)",r:"(-n1/n2)"}],c=[{l:"(n1/(n2/n3))",r:"((n1*n3)/n2)"},{l:"(n1/n2/n3)",r:"(n1/(n2*n3))"}]),u.distrDivRules=[{l:"(n1/n2 + n3/n4)",r:"((n1*n4 + n3*n2)/(n2*n4))"},{l:"(n1/n2 + n3)",r:"((n1 + n3*n2)/n2)"},{l:"(n1 + n2/n3)",r:"((n1*n3 + n2)/n3)"}],u.sucDivRules=c,u.firstRulesAgain=b.concat(x),u.finalRules=[r,{l:"n*-n",r:"-n^2"},{l:"n*n",r:"n^2"},g,{l:"n*-n^n1",r:"-n^(n1+1)"},{l:"n*n^n1",r:"n^(n1+1)"},{l:"n^n1*-n^n2",r:"-n^(n1+n2)"},{l:"n^n1*n^n2",r:"n^(n1+n2)"},{l:"n^n1*-n",r:"-n^(n1+1)"},{l:"n^n1*n",r:"n^(n1+1)"},{l:"n^n1/-n",r:"-n^(n1-1)"},{l:"n^n1/n",r:"n^(n1-1)"},{l:"n/-n^n1",r:"-n^(1-n1)"},{l:"n/n^n1",r:"n^(1-n1)"},{l:"n^n1/-n^n2",r:"n^(n1-n2)"},{l:"n^n1/n^n2",r:"n^(n1-n2)"},{l:"n1+(-n2*n3)",r:"n1-n2*n3"},{l:"v*(-c)",r:"-c*v"},{l:"n1+-n2",r:"n1-n2"},{l:"v*c",r:"c*v"},{l:"(n1^n2)^n3",r:"(n1^(n2*n3))"}];var o,a,s=u,u=(c=!0,b=i(b=e,x=s.firstRules,t,{exactFractions:!(o=[])}),a="+-*"+((c=!!c)?"/":""),function e(t){var n=t.type;if("FunctionNode"===n)throw new Error("There is an unsolved function call");if("OperatorNode"===n)if("^"===t.op){if("ConstantNode"!==t.args[1].type||!oe(parseFloat(t.args[1].value)))throw new Error("There is a non-integer exponent");e(t.args[0])}else{if(-1===a.indexOf(t.op))throw new Error("Operator "+t.op+" invalid in polynomial expression");for(var r=0;r{var{typed:e,config:t,parse:n,simplify:r,equal:i,isZero:o,numeric:a,ConstantNode:s,FunctionNode:u,OperatorNode:c,ParenthesisNode:f,SymbolNode:l}=e,p=e("derivative",{"Node, SymbolNode, Object":function(e,t,n){var i={};h(i,e,t.name),t=m(e,i);return n.simplify?r(t):t},"Node, SymbolNode":function(e,t){return this(e,t,{simplify:!0})},"string, SymbolNode":function(e,t){return this(n(e),t)},"string, SymbolNode, Object":function(e,t,r){return this(n(e),t,r)},"string, string":function(e,t){return this(n(e),n(t))},"string, string, Object":function(e,t,r){return this(n(e),n(t),r)},"Node, string":function(e,t){return this(e,n(t))},"Node, string, Object":function(e,t,r){return this(e,n(t),r)}}),d=(p._simplify=!0,p.toTex=function(e){return d.apply(null,e.args)},e("_derivTex",{"Node, SymbolNode":function(e,t){return I(e)&&"string"===H(e.value)?d(n(e.value).toString(),t.toString(),1):d(e.toTex(),t.toString(),1)},"Node, ConstantNode":function(e,t){if("string"===H(t.value))return d(e,n(t.value));throw new Error("The second parameter to 'derivative' is a non-string constant")},"Node, SymbolNode, ConstantNode":function(e,t,n){return d(e.toString(),t.name,n.value)},"string, string, number":function(e,t,n){return t=1===n?"{d\\over d"+t+"}":"{d^{"+n+"}\\over d"+t+"^{"+n+"}}",t+"\\left[".concat(e,"\\right]")}})),h=e("constTag",{"Object, ConstantNode, string":function(e,t){return e[t]=!0},"Object, SymbolNode, string":function(e,t,n){return t.name!==n&&(e[t]=!0)},"Object, ParenthesisNode, string":function(e,t,n){return h(e,t.content,n)},"Object, FunctionAssignmentNode, string":function(e,t,n){return-1===t.params.indexOf(n)?e[t]=!0:h(e,t.expr,n)},"Object, FunctionNode | OperatorNode, string":function(e,t,n){if(0{var{typed:e,Parser:t}=e;return e("parser",{"":function(){return new t}})});function eg(e,t,n){var r,i,o,a=e.filter((function(e){return U(e)&&!(e.name in t)&&!n.has(e.name)}))[0];if(a)return r=a.name,i=Ty(n),o=e.compile(),function(e){return i.set(r,e),o.evaluate(i)};throw new Error('No undefined variable found in inline expression "'+e+'"')}var tg=tt("filter",["typed"],e=>{function t(e,t,r){var i,o;return e[0]&&(i=e[0].compile().evaluate(r)),e[1]&&(o=U(e[1])||R(e[1])?e[1].compile().evaluate(r):eg(e[1],t,r)),n(i,o)}e=e.typed,t.rawArgs=!0;var n=e("filter",{"Array, function":ng,"Matrix, function":function(e,t){return e.create(ng(e.toArray(),t))},"Array, RegExp":Ye,"Matrix, RegExp":function(e,t){return e.create(Ye(e.toArray(),t))}});return t},{isTransformFunction:!0});function ng(e,t){var n=ct(t);return Ze(e,(function(e,r,i){return 1===n?t(e):2===n?t(e,[r+1]):t(e,[r+1],i)}))}var rg=tt("forEach",["typed"],e=>{function t(e,t,r){var i,o;return e[0]&&(i=e[0].compile().evaluate(r)),e[1]&&(o=U(e[1])||R(e[1])?e[1].compile().evaluate(r):eg(e[1],t,r)),n(i,o)}e=e.typed,t.rawArgs=!0;var n=e("forEach",{"Array | Matrix, function":function(e,t){var n=ct(t);(function r(i,o){Array.isArray(i)?Ve(i,(function(e,t){r(e,o.concat(t+1))})):1===n?t(i):2===n?t(i,o):t(i,o,e)})(e.valueOf(),[])}});return t},{isTransformFunction:!0}),ig=tt("map",["typed"],e=>{function t(e,t,r){var i,o;return e[0]&&(i=e[0].compile().evaluate(r)),e[1]&&(o=U(e[1])||R(e[1])?e[1].compile().evaluate(r):eg(e[1],t,r)),n(i,o)}e=e.typed,t.rawArgs=!0;var n=e("map",{"Array, function":function(e,t){return og(e,t,e)},"Matrix, function":function(e,t){return e.create(og(e.valueOf(),t,e))}});return t},{isTransformFunction:!0});function og(e,t,n){var r=ct(t);return function e(i,o){return Array.isArray(i)?Ge(i,(function(t,n){return e(t,o.concat(n+1))})):1===r?t(i):2===r?t(i,o):t(i,o,n)}(e,[])}var ag=tt("apply",["typed","isInteger"],e=>{var{typed:e,isInteger:t}=e,n=ra({typed:e,isInteger:t});return e("apply",{"...any":function(e){var t=e[1];a(t)?e[1]=t-1:s(t)&&(e[1]=t.minus(1));try{return n.apply(null,e)}catch(e){throw Dy(e)}}})},{isTransformFunction:!0});function sg(e){var t;return 2===e.length&&h(e[0])&&(a(t=(e=e.slice())[1])?e[1]=t-1:s(t)&&(e[1]=t.minus(1))),e}var ug=tt("diff",["typed","matrix","subtract","number","bignumber"],e=>{var{typed:e,matrix:t,subtract:n,number:r,bignumber:i}=e,o=Nu({typed:e,matrix:t,subtract:n,number:r,bignumber:i});return e("diff",{"...any":function(e){e=sg(e);try{return o.apply(null,e)}catch(e){throw Dy(e)}}})},{isTransformFunction:!0}),cg=tt("subset",["typed","matrix"],e=>{var{typed:e,matrix:t}=e,n=es({typed:e,matrix:t});return e("subset",{"...any":function(e){try{return n.apply(null,e)}catch(e){throw Dy(e)}}})},{isTransformFunction:!0}),fg=tt("concat",["typed","matrix","isInteger"],e=>{var{typed:e,matrix:t,isInteger:n}=e,r=xs({typed:e,matrix:t,isInteger:n});return e("concat",{"...any":function(e){var t=e.length-1,n=e[t];a(n)?e[t]=n-1:s(n)&&(e[t]=n.minus(1));try{return r.apply(null,e)}catch(e){throw Dy(e)}}})},{isTransformFunction:!0}),lg=tt("max",["typed","config","numeric","larger"],e=>{var{typed:e,config:t,numeric:n,larger:r}=e,i=vc({typed:e,config:t,numeric:n,larger:r});return e("max",{"...any":function(e){e=sg(e);try{return i.apply(null,e)}catch(e){throw Dy(e)}}})},{isTransformFunction:!0}),pg=tt("min",["typed","config","numeric","smaller"],e=>{var{typed:e,config:t,numeric:n,smaller:r}=e,i=Vs({typed:e,config:t,numeric:n,smaller:r});return e("min",{"...any":function(e){e=sg(e);try{return i.apply(null,e)}catch(e){throw Dy(e)}}})},{isTransformFunction:!0}),dg=tt("range",["typed","config","?matrix","?bignumber","smaller","smallerEq","larger","largerEq"],e=>{var{typed:e,config:t,matrix:n,bignumber:r,smaller:i,smallerEq:o,larger:a,largerEq:s}=e,u=zu({typed:e,config:t,matrix:n,bignumber:r,smaller:i,smallerEq:o,larger:a,largerEq:s});return e("range",{"...any":function(e){return"boolean"!=typeof e[e.length-1]&&e.push(!0),u.apply(null,e)}})},{isTransformFunction:!0}),hg=tt("sum",["typed","config","add","numeric"],e=>{var{typed:e,config:t,add:n,numeric:r}=e,i=Ju({typed:e,config:t,add:n,numeric:r});return e("sum",{"...any":function(e){e=sg(e);try{return i.apply(null,e)}catch(e){throw Dy(e)}}})},{isTransformFunction:!0}),mg=tt("cumsum",["typed","add","unaryPlus"],e=>{var{typed:e,add:t,unaryPlus:n}=e,r=xu({typed:e,add:t,unaryPlus:n});return e("cumsum",{"...any":function(e){var t;2===e.length&&h(e[0])&&(a(t=e[1])?e[1]=t-1:s(t)&&(e[1]=t.minus(1)));try{return r.apply(null,e)}catch(e){throw Dy(e)}}})},{isTransformFunction:!0}),yg=tt("row",["typed","Index","matrix","range"],e=>{var{typed:e,Index:t,matrix:n,range:r}=e,i=xc({typed:e,Index:t,matrix:n,range:r});return e("row",{"...any":function(e){var t=e.length-1,n=e[t];a(n)&&(e[t]=n-1);try{return i.apply(null,e)}catch(e){throw Dy(e)}}})},{isTransformFunction:!0}),gg=tt("column",["typed","Index","matrix","range"],e=>{var{typed:e,Index:t,matrix:n,range:r}=e,i=Cc({typed:e,Index:t,matrix:n,range:r});return e("column",{"...any":function(e){var t=e.length-1,n=e[t];a(n)&&(e[t]=n-1);try{return i.apply(null,e)}catch(e){throw Dy(e)}}})},{isTransformFunction:!0}),vg=tt("index",["Index"],e=>{var t=e["Index"];return function(){for(var e=[],n=0,r=arguments.length;n{var{typed:e,add:t,divide:n}=e,r=mf({typed:e,add:t,divide:n});return e("mean",{"...any":function(e){e=sg(e);try{return r.apply(null,e)}catch(e){throw Dy(e)}}})},{isTransformFunction:!0}),xg=tt("variance",["typed","add","subtract","multiply","divide","apply","isNaN"],e=>{var{typed:e,add:t,subtract:n,multiply:r,divide:i,apply:o,isNaN:a}=e,s=Sf({typed:e,add:t,subtract:n,multiply:r,divide:i,apply:o,isNaN:a});return e("variance",{"...any":function(e){e=sg(e);try{return s.apply(null,e)}catch(e){throw Dy(e)}}})},{isTransformFunction:!0}),wg=tt("std",["typed","sqrt","variance"],e=>{var{typed:e,sqrt:t,variance:n}=e,r=Of({typed:e,sqrt:t,variance:n});return e("std",{"...any":function(e){e=sg(e);try{return r.apply(null,e)}catch(e){throw Dy(e)}}})},{isTransformFunction:!0}),Ng=(mr={},r={},{}),Sg=Km({math:mr}),_g=ty({mathWithTransform:r}),Dg=ny({Node:_g}),Mg=hy({Node:_g}),Eg=my({Node:_g}),Ag=yy({Node:_g}),Og=gy({Node:_g}),Cg=vy({Node:_g,ResultSet:Vf}),Tg=by({Node:_g}),kg=xy({Node:_g}),Ig=wy({Node:_g}),Rg=Ny({classes:Ng}),jg=Sy({Chain:Sg,typed:ol}),Bg=_y({Node:_g,typed:ol}),zg=Ey({Node:_g,subset:$p}),qg=Ay({matrix:kp,Node:_g,subset:$p}),Pg=Oy({Node:_g,size:Fp}),Fg=Cy({Unit:Rh,Node:_g,math:mr}),Lg=ky({Node:_g,SymbolNode:Fg,math:mr}),Ug=Iy({AccessorNode:zg,ArrayNode:Og,AssignmentNode:qg,BlockNode:Cg,ConditionalNode:Tg,ConstantNode:kg,FunctionAssignmentNode:Bg,FunctionNode:Lg,IndexNode:Pg,ObjectNode:Dg,OperatorNode:Mg,ParenthesisNode:Eg,RangeNode:Ig,RelationalNode:Ag,SymbolNode:Fg,config:re,numeric:Bp,typed:ol}),$g=Ry({ConstantNode:kg,FunctionNode:Lg,OperatorNode:Mg,ParenthesisNode:Eg,parse:Ug}),Hg=qy({AccessorNode:zg,ArrayNode:Og,ConstantNode:kg,FunctionNode:Lg,IndexNode:Pg,ObjectNode:Dg,OperatorNode:Mg,ParenthesisNode:Eg,SymbolNode:Fg,add:Td,divide:vm,equal:sd,isZero:Ul,multiply:Zd,pow:Oh,subtract:Hp}),Wg=Py({parse:Ug,typed:ol}),Gg=Fy({parse:Ug}),Vg=Ly({parse:Ug,typed:ol}),Zg=$y({bignumber:vl,fraction:Cp,AccessorNode:zg,ArrayNode:Og,ConstantNode:kg,FunctionNode:Lg,IndexNode:Pg,ObjectNode:Dg,OperatorNode:Mg,ParenthesisNode:Eg,SymbolNode:Fg,add:Td,config:re,divide:vm,equal:sd,isZero:Ul,mathWithTransform:r,matrix:kp,multiply:Zd,parse:Ug,pow:Oh,resolve:$g,simplifyCore:Hg,subtract:Hp,typed:ol}),Yg=Wy({OperatorNode:Mg,parse:Ug,simplify:Zg,typed:ol}),Xg=Gy({parse:Ug,typed:ol}),Jg=Zy({Help:Gg,mathWithTransform:r,typed:ol}),Qg=Yy({evaluate:Xg}),Kg=Jy({bignumber:vl,fraction:Cp,AccessorNode:zg,ArrayNode:Og,ConstantNode:kg,FunctionNode:Lg,IndexNode:Pg,ObjectNode:Dg,OperatorNode:Mg,ParenthesisNode:Eg,SymbolNode:Fg,add:Td,config:re,divide:vm,equal:sd,isZero:Ul,mathWithTransform:r,matrix:kp,multiply:Zd,parse:Ug,pow:Oh,simplify:Zg,simplifyCore:Hg,subtract:Hp,typed:ol}),ev=Qy({ConstantNode:kg,FunctionNode:Lg,OperatorNode:Mg,ParenthesisNode:Eg,SymbolNode:Fg,config:re,equal:sd,isZero:Ul,numeric:Bp,parse:Ug,simplify:Zg,typed:ol}),tv=Ky({Parser:Qg,typed:ol}),nv=(i()(mr,{e:Rf,false:jf,fineStructure:Bf,i:qf,Infinity:Pf,LN10:Ff,LOG10E:Lf,NaN:$f,null:Hf,phi:Wf,SQRT1_2:Zf,sackurTetrode:Yf,tau:Xf,true:Jf,E:Rf,version:Qf,efimovFactor:el,LN2:tl,pi:nl,replacer:rl,reviver:Rg,SQRT2:il,typed:ol,unaryPlus:al,PI:nl,weakMixingAngle:sl,abs:ul,acos:cl,acot:fl,acsc:ll,addScalar:pl,arg:dl,asech:hl,asinh:ml,atan:yl,atanh:gl,bignumber:vl,bitNot:bl,boolean:xl,chain:jg,clone:wl,combinations:Nl,complex:Sl,conj:_l,cosh:Dl,coth:Ml,csc:El,cube:Al,equalScalar:Ol,erf:Cl,exp:Tl,expm1:kl,filter:Il,forEach:Rl,format:jl,getMatrixDataType:Bl,hex:zl,im:ql,isInteger:Pl,isNegative:Fl,isPositive:Ll,isZero:Ul,LOG2E:$l,lgamma:Hl,log10:Wl,log2:Gl,map:Vl,multiplyScalar:Zl,not:Yl,number:Xl,oct:Jl,pickRandom:Ql,print:Kl,random:ep,re:tp,sec:np,sign:rp,sin:ip,splitUnit:ap,square:sp,string:up,tan:cp,typeOf:fp,acosh:lp,acsch:pp,apply:dp,asec:hp,bin:mp,combinationsWithRep:yp,cos:gp,csch:vp,isNaN:bp,isPrime:xp,randomInt:wp,sech:Np,sinh:Sp,sparse:_p,sqrt:Dp,tanh:Mp,unaryMinus:Ep,acoth:Ap,cot:Op,fraction:Cp,isNumeric:Tp,matrix:kp,matrixFromFunction:Ip,mod:Rp,nthRoot:jp,numeric:Bp,or:zp,prod:qp,reshape:Pp,size:Fp,smaller:Lp,squeeze:Up,subset:$p,subtract:Hp,to:Wp,transpose:Gp,xgcd:Vp,zeros:Zp,and:Yp,bitAnd:Xp,bitXor:Jp,cbrt:Qp,compare:Kp,compareText:ed,concat:td,count:nd,ctranspose:rd,diag:id,divideScalar:od,dotDivide:ad,equal:sd,fft:ud,flatten:cd,gcd:fd,hasNumericValue:ld,hypot:pd,ifft:dd,kron:hd,largerEq:md,leftShift:yd,lsolve:gd,matrixFromColumns:vd,min:bd,mode:xd,nthRoots:wd,ones:Nd,partitionSelect:Sd,resize:_d,rightArithShift:Dd,round:Md,smallerEq:Ed,unequal:Ad,usolve:Od,xor:Cd,add:Td,atan2:kd,bitOr:Id,catalan:Rd,compareNatural:jd,cumsum:Bd,deepEqual:zd,diff:qd,dot:Pd,equalText:Fd,floor:Ld,identity:Ud,invmod:$d,larger:Hd,log:Wd,lsolveAll:Gd,matrixFromRows:Vd,multiply:Zd,qr:Yd,range:Xd,rightLogShift:Jd,setSize:Qd,slu:Kd,sum:eh,trace:th,usolveAll:nh,asin:rh,ceil:ih,composition:oh,cross:ah,det:sh,distance:uh,dotMultiply:ch,fix:lh,intersect:hh,lcm:mh,log1p:yh,max:gh,quantileSeq:vh,row:bh,setCartesian:xh,setDistinct:wh,setIsSubset:Nh,setPowerset:Sh,sort:_h,column:Dh,index:Mh,inv:Eh,pinv:Ah,pow:Oh,setDifference:Ch,setMultiplicity:Th,sqrtm:Ih,vacuumImpedance:jh,wienDisplacement:Bh,atomicMass:zh,bohrMagneton:qh,boltzmann:Ph,conductanceQuantum:Fh,createUnit:Lh,deuteronMass:Uh,dotPow:$h,electricConstant:Hh,elementaryCharge:Wh,expm:Gh,faraday:Vh,firstRadiation:Zh,gamma:Yh,gravitationConstant:Xh,hartreeEnergy:Jh,klitzing:Qh,loschmidt:Kh,magneticConstant:em,molarMass:tm,molarPlanckConstant:nm,neutronMass:rm,nuclearMagneton:im,planckCharge:om,planckLength:am,planckTemperature:sm,protonMass:um,reducedPlanckConstant:cm,rydberg:fm,setIntersect:lm,speedOfLight:pm,stefanBoltzmann:dm,thomsonCrossSection:hm,avogadro:mm,bohrRadius:ym,coulomb:gm,divide:vm,electronMass:bm,factorial:xm,gravity:wm,inverseConductanceQuantum:Nm,lup:Sm,magneticFluxQuantum:_m,molarMassC12:Dm,multinomial:Mm,parse:Ug,permutations:Em,planckMass:Am,quantumOfCirculation:Om,resolve:$g,secondRadiation:Cm,simplifyCore:Hg,stirlingS2:Tm,unit:km,bellNumbers:Im,compile:Wg,eigs:Rm,fermiCoupling:jm,leafCount:Vg,mean:Bm,molarVolume:zm,planckConstant:qm,setSymDifference:Pm,simplify:Zg,symbolicEqual:Yg,classicalElectronRadius:Fm,evaluate:Xg,help:Jg,lusolve:Lm,median:Um,rationalize:Kg,setUnion:$m,variance:Hm,derivative:ev,kldivergence:Wm,norm:Gm,planckTime:Vm,rotationMatrix:Zm,gasConstant:Ym,parser:tv,std:Xm,mad:Jm,rotate:Qm,config:re}),i()(r,mr,{filter:tg({typed:ol}),forEach:rg({typed:ol}),map:ig({typed:ol}),apply:ag({isInteger:Pl,typed:ol}),diff:ug({bignumber:vl,matrix:kp,number:Xl,subtract:Hp,typed:ol}),subset:cg({matrix:kp,typed:ol}),concat:fg({isInteger:Pl,matrix:kp,typed:ol}),max:lg({config:re,larger:Hd,numeric:Bp,typed:ol}),min:pg({config:re,numeric:Bp,smaller:Lp,typed:ol}),range:dg({bignumber:vl,matrix:kp,config:re,larger:Hd,largerEq:md,smaller:Lp,smallerEq:Ed,typed:ol}),sum:hg({add:Td,config:re,numeric:Bp,typed:ol}),cumsum:mg({add:Td,typed:ol,unaryPlus:al}),row:yg({Index:dh,matrix:kp,range:Xd,typed:ol}),column:gg({Index:dh,matrix:kp,range:Xd,typed:ol}),index:vg({Index:dh}),mean:bg({add:Td,divide:vm,typed:ol}),variance:xg({add:Td,apply:dp,divide:vm,isNaN:bp,multiply:Zd,subtract:Hp,typed:ol}),std:wg({sqrt:Dp,typed:ol,variance:Hm})}),i()(Ng,{BigNumber:kf,Chain:Sg,Complex:If,Fraction:zf,Matrix:Uf,Node:_g,ObjectNode:Dg,OperatorNode:Mg,ParenthesisNode:Eg,Range:Gf,RelationalNode:Ag,ResultSet:Vf,ArrayNode:Og,BlockNode:Cg,ConditionalNode:Tg,ConstantNode:kg,DenseMatrix:Kf,RangeNode:Ig,FunctionAssignmentNode:Bg,SparseMatrix:op,AccessorNode:zg,AssignmentNode:qg,IndexNode:Pg,FibonacciHeap:fh,ImmutableDenseMatrix:ph,Index:dh,Spa:kh,Unit:Rh,SymbolNode:Fg,FunctionNode:Lg,Help:Gg,Parser:Qg}),Sg.createProxy(mr),{createBigNumberClass:it}),rv={createComplexClass:at},iv={createMatrixClass:Pn},ov={MatrixDependencies:iv,createDenseMatrixClass:Un},av={createFractionClass:qn},sv={BigNumberDependencies:nv,ComplexDependencies:rv,DenseMatrixDependencies:ov,FractionDependencies:av,createTyped:ir},uv={typedDependencies:sv,createAbs:zr},cv={createNode:ty},fv={typedDependencies:sv,createEqualScalar:Li},lv={MatrixDependencies:iv,equalScalarDependencies:fv,typedDependencies:sv,createSparseMatrixClass:Yo},pv={DenseMatrixDependencies:ov,MatrixDependencies:iv,SparseMatrixDependencies:lv,typedDependencies:sv,createMatrix:Ma},dv={matrixDependencies:pv,typedDependencies:sv,createSubset:es},hv={NodeDependencies:cv,subsetDependencies:dv,createAccessorNode:Ey},mv={ComplexDependencies:rv,typedDependencies:sv,createAcos:qr},yv={ComplexDependencies:rv,typedDependencies:sv,createAcosh:ta},gv={BigNumberDependencies:nv,typedDependencies:sv,createAcot:ti},vv={BigNumberDependencies:nv,ComplexDependencies:rv,typedDependencies:sv,createAcoth:Na},bv={BigNumberDependencies:nv,ComplexDependencies:rv,typedDependencies:sv,createAcsc:ni},xv={BigNumberDependencies:nv,typedDependencies:sv,createAcsch:na},wv={typedDependencies:sv,createAddScalar:ri},Nv={DenseMatrixDependencies:ov,SparseMatrixDependencies:lv,addScalarDependencies:wv,equalScalarDependencies:fv,matrixDependencies:pv,typedDependencies:sv,createAdd:lu},Sv={typedDependencies:sv,createNot:ko},_v={BigNumberDependencies:nv,matrixDependencies:pv,typedDependencies:sv,createZeros:ls},Dv={equalScalarDependencies:fv,matrixDependencies:pv,notDependencies:Sv,typedDependencies:sv,zerosDependencies:_v,createAnd:ps},Mv={typedDependencies:sv,createIsInteger:oo},Ev={isIntegerDependencies:Mv,typedDependencies:sv,createApply:ra},Av={isIntegerDependencies:Mv,typedDependencies:sv,createApplyTransform:ag},Ov={typedDependencies:sv,createArg:ii},Cv={NodeDependencies:cv,createArrayNode:gy},Tv={BigNumberDependencies:nv,ComplexDependencies:rv,typedDependencies:sv,createAsec:oa},kv={BigNumberDependencies:nv,ComplexDependencies:rv,typedDependencies:sv,createAsech:oi},Iv={ComplexDependencies:rv,typedDependencies:sv,createAsin:ec},Rv={typedDependencies:sv,createAsinh:ai},jv={matrixDependencies:pv,NodeDependencies:cv,subsetDependencies:dv,createAssignmentNode:Ay},Bv={typedDependencies:sv,createAtan:si},zv={BigNumberDependencies:nv,DenseMatrixDependencies:ov,equalScalarDependencies:fv,matrixDependencies:pv,typedDependencies:sv,createAtan2:du},qv={ComplexDependencies:rv,typedDependencies:sv,createAtanh:ui},Pv={BigNumberDependencies:nv,typedDependencies:sv,createBignumber:ci},Fv={FractionDependencies:av,typedDependencies:sv,createFraction:_a},Lv={typedDependencies:sv,createNumber:Io},Uv={bignumberDependencies:Pv,fractionDependencies:Fv,numberDependencies:Lv,createNumeric:Ha},$v={numericDependencies:Uv,typedDependencies:sv,createDivideScalar:Ms},Hv={DenseMatrixDependencies:ov,equalScalarDependencies:fv,matrixDependencies:pv,typedDependencies:sv,createEqual:Os},Wv={BigNumberDependencies:nv,DenseMatrixDependencies:ov,equalScalarDependencies:fv,matrixDependencies:pv,typedDependencies:sv,zerosDependencies:_v,createRound:iu},Gv={DenseMatrixDependencies:ov,equalScalarDependencies:fv,matrixDependencies:pv,roundDependencies:Wv,typedDependencies:sv,zerosDependencies:_v,createCeil:nc},Vv={DenseMatrixDependencies:ov,equalScalarDependencies:fv,matrixDependencies:pv,roundDependencies:Wv,typedDependencies:sv,zerosDependencies:_v,createFloor:Mu},Zv={ComplexDependencies:rv,DenseMatrixDependencies:ov,ceilDependencies:Gv,equalScalarDependencies:fv,floorDependencies:Vv,matrixDependencies:pv,typedDependencies:sv,zerosDependencies:_v,createFix:pc},Yv={typedDependencies:sv,createFormat:eo},Xv={typedDependencies:sv,createIsNumeric:Da},Jv={typedDependencies:sv,createMultiplyScalar:Eo},Qv={BigNumberDependencies:nv,DenseMatrixDependencies:ov,SparseMatrixDependencies:lv,matrixDependencies:pv,typedDependencies:sv,createIdentity:Eu},Kv={typedDependencies:sv,createIsZero:mo},eb={typedDependencies:sv,createConj:Ri},tb={matrixDependencies:pv,typedDependencies:sv,createSize:Ya},nb={addScalarDependencies:wv,conjDependencies:eb,multiplyScalarDependencies:Jv,sizeDependencies:tb,typedDependencies:sv,createDot:Su},rb={addScalarDependencies:wv,dotDependencies:nb,equalScalarDependencies:fv,matrixDependencies:pv,multiplyScalarDependencies:Jv,typedDependencies:sv,createMultiply:ju},ib={typedDependencies:sv,createUnaryMinus:wa},ob={DenseMatrixDependencies:ov,addScalarDependencies:wv,equalScalarDependencies:fv,matrixDependencies:pv,typedDependencies:sv,unaryMinusDependencies:ib,createSubtract:as},ab={divideScalarDependencies:$v,isZeroDependencies:Kv,matrixDependencies:pv,multiplyDependencies:rb,subtractDependencies:ob,typedDependencies:sv,unaryMinusDependencies:ib,createDet:ac},sb={absDependencies:uv,addScalarDependencies:wv,detDependencies:ab,divideScalarDependencies:$v,identityDependencies:Qv,matrixDependencies:pv,multiplyDependencies:rb,typedDependencies:sv,unaryMinusDependencies:ib,createInv:kc},ub={ComplexDependencies:rv,fractionDependencies:Fv,identityDependencies:Qv,invDependencies:sb,matrixDependencies:pv,multiplyDependencies:rb,numberDependencies:Lv,typedDependencies:sv,createPow:Rc},cb={BigNumberDependencies:nv,ComplexDependencies:rv,FractionDependencies:av,absDependencies:uv,addScalarDependencies:wv,divideScalarDependencies:$v,equalDependencies:Hv,fixDependencies:Zv,formatDependencies:Yv,isNumericDependencies:Xv,multiplyScalarDependencies:Jv,numberDependencies:Lv,powDependencies:ub,roundDependencies:Wv,subtractDependencies:ob,createUnitClass:Hc},fb={BigNumberDependencies:nv,UnitDependencies:cb,createAtomicMass:hn},lb={BigNumberDependencies:nv,UnitDependencies:cb,createAvogadro:mn},pb={typedDependencies:sv,createIsNegative:lo},db={typedDependencies:sv,createCombinations:Ti},hb={BigNumberDependencies:nv,ComplexDependencies:rv,multiplyScalarDependencies:Jv,powDependencies:ub,typedDependencies:sv,createGamma:Yc},mb={gammaDependencies:hb,typedDependencies:sv,createFactorial:Kc},yb={DenseMatrixDependencies:ov,matrixDependencies:pv,typedDependencies:sv,createLarger:Cu},gb={bignumberDependencies:Pv,addScalarDependencies:wv,combinationsDependencies:db,divideScalarDependencies:$v,factorialDependencies:mb,isIntegerDependencies:Mv,isNegativeDependencies:pb,largerDependencies:yb,multiplyScalarDependencies:Jv,numberDependencies:Lv,powDependencies:ub,subtractDependencies:ob,typedDependencies:sv,createStirlingS2:uf},vb={addScalarDependencies:wv,isIntegerDependencies:Mv,isNegativeDependencies:pb,stirlingS2Dependencies:gb,typedDependencies:sv,createBellNumbers:lf},bb={formatDependencies:Yv,typedDependencies:sv,createBin:aa},xb={equalScalarDependencies:fv,matrixDependencies:pv,typedDependencies:sv,createBitAnd:ds},wb={typedDependencies:sv,createBitNot:Di},Nb={DenseMatrixDependencies:ov,equalScalarDependencies:fv,matrixDependencies:pv,typedDependencies:sv,createBitOr:hu},Sb={DenseMatrixDependencies:ov,matrixDependencies:pv,typedDependencies:sv,createBitXor:hs},_b={createResultSet:Ln},Db={NodeDependencies:cv,ResultSetDependencies:_b,createBlockNode:vy},Mb={BigNumberDependencies:nv,UnitDependencies:cb,createBohrMagneton:Vt},Eb={BigNumberDependencies:nv,UnitDependencies:cb,createBohrRadius:Kt},Ab={BigNumberDependencies:nv,UnitDependencies:cb,createBoltzmann:yn},Ob={typedDependencies:sv,createBoolean:Mi},Cb={addScalarDependencies:wv,combinationsDependencies:db,divideScalarDependencies:$v,isIntegerDependencies:Mv,isNegativeDependencies:pb,multiplyScalarDependencies:Jv,typedDependencies:sv,createCatalan:mu},Tb={BigNumberDependencies:nv,ComplexDependencies:rv,FractionDependencies:av,isNegativeDependencies:pb,matrixDependencies:pv,typedDependencies:sv,unaryMinusDependencies:ib,createCbrt:ms},kb={createChainClass:Km},Ib={ChainDependencies:kb,typedDependencies:sv,createChain:Sy},Rb={BigNumberDependencies:nv,UnitDependencies:cb,createClassicalElectronRadius:en},jb={typedDependencies:sv,createClone:Ei},Bb={DenseMatrixDependencies:ov,matrixDependencies:pv,typedDependencies:sv,createSmaller:Qa},zb={DenseMatrixDependencies:ov,smallerDependencies:Bb,createImmutableDenseMatrixClass:dc},qb={ImmutableDenseMatrixDependencies:zb,createIndexClass:hc},Pb={DenseMatrixDependencies:ov,matrixDependencies:pv,typedDependencies:sv,createLargerEq:Fs},Fb={DenseMatrixDependencies:ov,matrixDependencies:pv,typedDependencies:sv,createSmallerEq:au},Lb={bignumberDependencies:Pv,matrixDependencies:pv,largerDependencies:yb,largerEqDependencies:Pb,smallerDependencies:Bb,smallerEqDependencies:Fb,typedDependencies:sv,createRange:zu},Ub={IndexDependencies:qb,matrixDependencies:pv,rangeDependencies:Lb,typedDependencies:sv,createColumn:Cc},$b={IndexDependencies:qb,matrixDependencies:pv,rangeDependencies:Lb,typedDependencies:sv,createColumnTransform:gg},Hb={typedDependencies:sv,createCombinationsWithRep:ua},Wb={BigNumberDependencies:nv,DenseMatrixDependencies:ov,FractionDependencies:av,equalScalarDependencies:fv,matrixDependencies:pv,typedDependencies:sv,createCompare:gs},Gb={compareDependencies:Wb,typedDependencies:sv,createCompareNatural:vu},Vb={matrixDependencies:pv,typedDependencies:sv,createCompareText:bs},Zb={NodeDependencies:cv,createConditionalNode:by},Yb={NodeDependencies:cv,createConstantNode:xy},Xb={NodeDependencies:cv,typedDependencies:sv,createFunctionAssignmentNode:_y},Jb={UnitDependencies:cb,NodeDependencies:cv,createSymbolNode:Cy},Qb={NodeDependencies:cv,SymbolNodeDependencies:Jb,createFunctionNode:ky},Kb={NodeDependencies:cv,sizeDependencies:tb,createIndexNode:Oy},ex={NodeDependencies:cv,createObjectNode:ny},tx={NodeDependencies:cv,createOperatorNode:hy},nx={NodeDependencies:cv,createParenthesisNode:my},rx={NodeDependencies:cv,createRangeNode:wy},ix={NodeDependencies:cv,createRelationalNode:yy},ox={AccessorNodeDependencies:hv,ArrayNodeDependencies:Cv,AssignmentNodeDependencies:jv,BlockNodeDependencies:Db,ConditionalNodeDependencies:Zb,ConstantNodeDependencies:Yb,FunctionAssignmentNodeDependencies:Xb,FunctionNodeDependencies:Qb,IndexNodeDependencies:Kb,ObjectNodeDependencies:ex,OperatorNodeDependencies:tx,ParenthesisNodeDependencies:nx,RangeNodeDependencies:rx,RelationalNodeDependencies:ix,SymbolNodeDependencies:Jb,numericDependencies:Uv,typedDependencies:sv,createParse:Iy},ax={parseDependencies:ox,typedDependencies:sv,createCompile:Py},sx={ComplexDependencies:rv,typedDependencies:sv,createComplex:Ii},ux={typedDependencies:sv,createIsPositive:ho},cx={addScalarDependencies:wv,combinationsDependencies:db,isIntegerDependencies:Mv,isNegativeDependencies:pb,isPositiveDependencies:ux,largerDependencies:yb,typedDependencies:sv,createComposition:ic},fx={isIntegerDependencies:Mv,matrixDependencies:pv,typedDependencies:sv,createConcat:xs},lx={isIntegerDependencies:Mv,matrixDependencies:pv,typedDependencies:sv,createConcatTransform:fg},px={BigNumberDependencies:nv,UnitDependencies:cb,createConductanceQuantum:Zt},dx={typedDependencies:sv,createCos:fa},hx={typedDependencies:sv,createCosh:ji},mx={BigNumberDependencies:nv,typedDependencies:sv,createCot:Sa},yx={BigNumberDependencies:nv,typedDependencies:sv,createCoth:Bi},gx={BigNumberDependencies:nv,UnitDependencies:cb,createCoulomb:Wt},vx={multiplyScalarDependencies:Jv,numericDependencies:Uv,typedDependencies:sv,createProd:Va},bx={prodDependencies:vx,sizeDependencies:tb,typedDependencies:sv,createCount:ws},xx={UnitDependencies:cb,typedDependencies:sv,createCreateUnit:Gc},wx={matrixDependencies:pv,multiplyDependencies:rb,subtractDependencies:ob,typedDependencies:sv,createCross:oc},Nx={BigNumberDependencies:nv,typedDependencies:sv,createCsc:zi},Sx={BigNumberDependencies:nv,typedDependencies:sv,createCsch:la},_x={matrixDependencies:pv,typedDependencies:sv,createTranspose:cs},Dx={conjDependencies:eb,transposeDependencies:_x,typedDependencies:sv,createCtranspose:Ss},Mx={typedDependencies:sv,createCube:qi},Ex={BigNumberDependencies:nv,typedDependencies:sv,createUnaryPlus:Br},Ax={addDependencies:Nv,typedDependencies:sv,unaryPlusDependencies:Ex,createCumSum:xu},Ox={addDependencies:Nv,typedDependencies:sv,unaryPlusDependencies:Ex,createCumSumTransform:mg},Cx={equalDependencies:Hv,typedDependencies:sv,createDeepEqual:wu},Tx={divideScalarDependencies:$v,equalScalarDependencies:fv,invDependencies:sb,matrixDependencies:pv,multiplyDependencies:rb,typedDependencies:sv,createDivide:Qc},kx={ConstantNodeDependencies:Yb,FunctionNodeDependencies:Qb,OperatorNodeDependencies:tx,ParenthesisNodeDependencies:nx,parseDependencies:ox,createResolve:Ry},Ix={AccessorNodeDependencies:hv,ArrayNodeDependencies:Cv,ConstantNodeDependencies:Yb,FunctionNodeDependencies:Qb,IndexNodeDependencies:Kb,ObjectNodeDependencies:ex,OperatorNodeDependencies:tx,ParenthesisNodeDependencies:nx,SymbolNodeDependencies:Jb,addDependencies:Nv,divideDependencies:Tx,equalDependencies:Hv,isZeroDependencies:Kv,multiplyDependencies:rb,powDependencies:ub,subtractDependencies:ob,createSimplifyCore:qy},Rx={bignumberDependencies:Pv,fractionDependencies:Fv,AccessorNodeDependencies:hv,ArrayNodeDependencies:Cv,ConstantNodeDependencies:Yb,FunctionNodeDependencies:Qb,IndexNodeDependencies:Kb,ObjectNodeDependencies:ex,OperatorNodeDependencies:tx,ParenthesisNodeDependencies:nx,SymbolNodeDependencies:Jb,addDependencies:Nv,divideDependencies:Tx,equalDependencies:Hv,isZeroDependencies:Kv,matrixDependencies:pv,multiplyDependencies:rb,parseDependencies:ox,powDependencies:ub,resolveDependencies:kx,simplifyCoreDependencies:Ix,subtractDependencies:ob,typedDependencies:sv,createSimplify:$y},jx={ConstantNodeDependencies:Yb,FunctionNodeDependencies:Qb,OperatorNodeDependencies:tx,ParenthesisNodeDependencies:nx,SymbolNodeDependencies:Jb,equalDependencies:Hv,isZeroDependencies:Kv,numericDependencies:Uv,parseDependencies:ox,simplifyDependencies:Rx,typedDependencies:sv,createDerivative:Qy},Bx={BigNumberDependencies:nv,UnitDependencies:cb,createDeuteronMass:sn},zx={DenseMatrixDependencies:ov,SparseMatrixDependencies:lv,matrixDependencies:pv,typedDependencies:sv,createDiag:_s},qx={matrixDependencies:pv,numberDependencies:Lv,subtractDependencies:ob,typedDependencies:sv,createDiff:Nu},Px={bignumberDependencies:Pv,matrixDependencies:pv,numberDependencies:Lv,subtractDependencies:ob,typedDependencies:sv,createDiffTransform:ug},Fx={ComplexDependencies:rv,typedDependencies:sv,createSqrt:va},Lx={absDependencies:uv,addScalarDependencies:wv,divideScalarDependencies:$v,multiplyScalarDependencies:Jv,sqrtDependencies:Fx,subtractDependencies:ob,typedDependencies:sv,unaryMinusDependencies:ib,createDistance:sc},Ux={DenseMatrixDependencies:ov,divideScalarDependencies:$v,equalScalarDependencies:fv,matrixDependencies:pv,typedDependencies:sv,createDotDivide:Es},$x={equalScalarDependencies:fv,matrixDependencies:pv,multiplyScalarDependencies:Jv,typedDependencies:sv,createDotMultiply:cc},Hx={DenseMatrixDependencies:ov,equalScalarDependencies:fv,matrixDependencies:pv,powDependencies:ub,typedDependencies:sv,createDotPow:Vc},Wx={BigNumberDependencies:nv,createE:Dt},Gx={BigNumberDependencies:nv,createEfimovFactor:dn},Vx={matrixDependencies:pv,typedDependencies:sv,createFlatten:Ts},Zx={typedDependencies:sv,createIm:io},Yx={flattenDependencies:Vx,matrixDependencies:pv,sizeDependencies:tb,typedDependencies:sv,createMatrixFromColumns:Gs},Xx={BigNumberDependencies:nv,FractionDependencies:av,complexDependencies:sx,typedDependencies:sv,createSign:Vo},Jx={addScalarDependencies:wv,complexDependencies:sx,conjDependencies:eb,divideScalarDependencies:$v,equalDependencies:Hv,identityDependencies:Qv,isZeroDependencies:Kv,matrixDependencies:pv,multiplyScalarDependencies:Jv,signDependencies:Xx,sqrtDependencies:Fx,subtractDependencies:ob,typedDependencies:sv,unaryMinusDependencies:ib,zerosDependencies:_v,createQr:Bu},Qx={typedDependencies:sv,createRe:Wo},Kx={typedDependencies:sv,createSin:Zo},ew={DenseMatrixDependencies:ov,divideScalarDependencies:$v,equalScalarDependencies:fv,matrixDependencies:pv,multiplyScalarDependencies:Jv,subtractDependencies:ob,typedDependencies:sv,createUsolve:cu},tw={DenseMatrixDependencies:ov,divideScalarDependencies:$v,equalScalarDependencies:fv,matrixDependencies:pv,multiplyScalarDependencies:Jv,subtractDependencies:ob,typedDependencies:sv,createUsolveAll:Ku},nw={absDependencies:uv,addDependencies:Nv,addScalarDependencies:wv,atanDependencies:Bv,bignumberDependencies:Pv,columnDependencies:Ub,complexDependencies:sx,cosDependencies:dx,diagDependencies:zx,divideScalarDependencies:$v,dotDependencies:nb,equalDependencies:Hv,flattenDependencies:Vx,imDependencies:Zx,invDependencies:sb,largerDependencies:yb,matrixDependencies:pv,matrixFromColumnsDependencies:Yx,multiplyDependencies:rb,multiplyScalarDependencies:Jv,numberDependencies:Lv,qrDependencies:Jx,reDependencies:Qx,sinDependencies:Kx,smallerDependencies:Bb,sqrtDependencies:Fx,subtractDependencies:ob,typedDependencies:sv,usolveDependencies:ew,usolveAllDependencies:tw,createEigs:hf},rw={BigNumberDependencies:nv,UnitDependencies:cb,createElectricConstant:$t},iw={BigNumberDependencies:nv,UnitDependencies:cb,createElectronMass:tn},ow={BigNumberDependencies:nv,UnitDependencies:cb,createElementaryCharge:Gt},aw={compareTextDependencies:Vb,isZeroDependencies:Kv,typedDependencies:sv,createEqualText:_u},sw={typedDependencies:sv,createErf:Ui},uw={parseDependencies:ox,typedDependencies:sv,createEvaluate:Gy},cw={typedDependencies:sv,createExp:Zi},fw={absDependencies:uv,addDependencies:Nv,identityDependencies:Qv,invDependencies:sb,multiplyDependencies:rb,typedDependencies:sv,createExpm:Zc},lw={ComplexDependencies:rv,typedDependencies:sv,createExpm1:Yi},pw={createFalse:bt},dw={BigNumberDependencies:nv,UnitDependencies:cb,createFaraday:gn},hw={BigNumberDependencies:nv,UnitDependencies:cb,createFermiCoupling:nn},mw={ComplexDependencies:rv,createI:It},yw={BigNumberDependencies:nv,createTau:_t},gw={addScalarDependencies:wv,divideScalarDependencies:$v,expDependencies:cw,iDependencies:mw,matrixDependencies:pv,multiplyScalarDependencies:Jv,tauDependencies:yw,typedDependencies:sv,createFft:Cs},vw={largerDependencies:yb,smallerDependencies:Bb,createFibonacciHeapClass:fc},bw={typedDependencies:sv,createFilter:Xi},xw={typedDependencies:sv,createFilterTransform:tg},ww={BigNumberDependencies:nv,createFineStructure:rn},Nw={BigNumberDependencies:nv,UnitDependencies:cb,createFirstRadiation:vn},Sw={typedDependencies:sv,createForEach:Qi},_w={typedDependencies:sv,createForEachTransform:rg},Dw={BigNumberDependencies:nv,UnitDependencies:cb,createGasConstant:xn},Mw={BigNumberDependencies:nv,DenseMatrixDependencies:ov,equalScalarDependencies:fv,matrixDependencies:pv,typedDependencies:sv,createGcd:Is},Ew={typedDependencies:sv,createGetMatrixDataType:no},Aw={BigNumberDependencies:nv,UnitDependencies:cb,createGravitationConstant:Pt},Ow={BigNumberDependencies:nv,UnitDependencies:cb,createGravity:On},Cw={BigNumberDependencies:nv,UnitDependencies:cb,createHartreeEnergy:on},Tw={isNumericDependencies:Xv,typedDependencies:sv,createHasNumericValue:js},kw={parseDependencies:ox,createHelpClass:Fy},Iw={HelpDependencies:kw,typedDependencies:sv,createHelp:Zy},Rw={formatDependencies:Yv,typedDependencies:sv,createHex:ro},jw={absDependencies:uv,addScalarDependencies:wv,divideScalarDependencies:$v,isPositiveDependencies:ux,multiplyScalarDependencies:Jv,smallerDependencies:Bb,sqrtDependencies:Fx,typedDependencies:sv,createHypot:Bs},Bw={conjDependencies:eb,dotDivideDependencies:Ux,fftDependencies:gw,typedDependencies:sv,createIfft:zs},zw={IndexDependencies:qb,typedDependencies:sv,createIndex:Tc},qw={IndexDependencies:qb,createIndexTransform:vg},Pw={BigNumberDependencies:nv,createInfinity:wt},Fw={absDependencies:uv,addDependencies:Nv,addScalarDependencies:wv,divideScalarDependencies:$v,equalScalarDependencies:fv,flattenDependencies:Vx,isNumericDependencies:Xv,isZeroDependencies:Kv,matrixDependencies:pv,multiplyDependencies:rb,multiplyScalarDependencies:Jv,smallerDependencies:Bb,subtractDependencies:ob,typedDependencies:sv,createIntersect:mc},Lw={BigNumberDependencies:nv,UnitDependencies:cb,createInverseConductanceQuantum:Yt},Uw={DenseMatrixDependencies:ov,equalScalarDependencies:fv,matrixDependencies:pv,typedDependencies:sv,createMod:Ba},$w={BigNumberDependencies:nv,matrixDependencies:pv,typedDependencies:sv,createXgcd:fs},Hw={BigNumberDependencies:nv,addDependencies:Nv,equalDependencies:Hv,isIntegerDependencies:Mv,modDependencies:Uw,smallerDependencies:Bb,typedDependencies:sv,xgcdDependencies:$w,createInvmod:Au},Ww={typedDependencies:sv,createIsNaN:pa},Gw={typedDependencies:sv,createIsPrime:da},Vw={ComplexDependencies:rv,divideScalarDependencies:$v,typedDependencies:sv,createLog:Tu},Zw={addDependencies:Nv,numericDependencies:Uv,typedDependencies:sv,createSum:Ju},Yw={divideDependencies:Tx,dotDivideDependencies:Ux,isNumericDependencies:Xv,logDependencies:Vw,matrixDependencies:pv,multiplyDependencies:rb,sumDependencies:Zw,typedDependencies:sv,createKldivergence:Df},Xw={BigNumberDependencies:nv,UnitDependencies:cb,createKlitzing:Qt},Jw={matrixDependencies:pv,multiplyScalarDependencies:Jv,typedDependencies:sv,createKron:qs},Qw={BigNumberDependencies:nv,createLN10:At},Kw={BigNumberDependencies:nv,createLN2:Et},eN={BigNumberDependencies:nv,createLOG10E:Ct},tN={BigNumberDependencies:nv,createLOG2E:Ot},nN={equalScalarDependencies:fv,matrixDependencies:pv,typedDependencies:sv,createLcm:yc},rN={parseDependencies:ox,typedDependencies:sv,createLeafCount:Ly},iN={DenseMatrixDependencies:ov,equalScalarDependencies:fv,matrixDependencies:pv,typedDependencies:sv,zerosDependencies:_v,createLeftShift:Us},oN={ComplexDependencies:rv,typedDependencies:sv,createLgamma:No},aN={ComplexDependencies:rv,typedDependencies:sv,createLog10:So},sN={ComplexDependencies:rv,divideScalarDependencies:$v,logDependencies:Vw,typedDependencies:sv,createLog1p:gc},uN={ComplexDependencies:rv,typedDependencies:sv,createLog2:_o},cN={BigNumberDependencies:nv,UnitDependencies:cb,createLoschmidt:bn},fN={DenseMatrixDependencies:ov,divideScalarDependencies:$v,equalScalarDependencies:fv,matrixDependencies:pv,multiplyScalarDependencies:Jv,subtractDependencies:ob,typedDependencies:sv,createLsolve:Hs},lN={DenseMatrixDependencies:ov,divideScalarDependencies:$v,equalScalarDependencies:fv,matrixDependencies:pv,multiplyScalarDependencies:Jv,subtractDependencies:ob,typedDependencies:sv,createLsolveAll:ku},pN={FibonacciHeapDependencies:vw,addScalarDependencies:wv,equalScalarDependencies:fv,createSpaClass:Pc},dN={DenseMatrixDependencies:ov,SpaDependencies:pN,SparseMatrixDependencies:lv,absDependencies:uv,addScalarDependencies:wv,divideScalarDependencies:$v,equalScalarDependencies:fv,largerDependencies:yb,matrixDependencies:pv,multiplyScalarDependencies:Jv,subtractDependencies:ob,typedDependencies:sv,unaryMinusDependencies:ib,createLup:ef},hN={SparseMatrixDependencies:lv,absDependencies:uv,addDependencies:Nv,divideScalarDependencies:$v,largerDependencies:yb,largerEqDependencies:Pb,multiplyDependencies:rb,subtractDependencies:ob,transposeDependencies:_x,typedDependencies:sv,createSlu:Xu},mN={DenseMatrixDependencies:ov,lsolveDependencies:fN,lupDependencies:dN,matrixDependencies:pv,sluDependencies:hN,typedDependencies:sv,usolveDependencies:ew,createLusolve:bf},yN={typedDependencies:sv,createMap:Do},gN={compareDependencies:Wb,isNaNDependencies:Ww,isNumericDependencies:Xv,typedDependencies:sv,createPartitionSelect:Qs},vN={addDependencies:Nv,compareDependencies:Wb,divideDependencies:Tx,partitionSelectDependencies:gN,typedDependencies:sv,createMedian:xf},bN={absDependencies:uv,mapDependencies:yN,medianDependencies:vN,subtractDependencies:ob,typedDependencies:sv,createMad:Cf},xN={BigNumberDependencies:nv,UnitDependencies:cb,createMagneticConstant:Ut},wN={BigNumberDependencies:nv,UnitDependencies:cb,createMagneticFluxQuantum:Xt},NN={typedDependencies:sv,createMapTransform:ig},SN={isZeroDependencies:Kv,matrixDependencies:pv,typedDependencies:sv,createMatrixFromFunction:Aa},_N={flattenDependencies:Vx,matrixDependencies:pv,sizeDependencies:tb,typedDependencies:sv,createMatrixFromRows:Ru},DN={largerDependencies:yb,numericDependencies:Uv,typedDependencies:sv,createMax:vc},MN={largerDependencies:yb,numericDependencies:Uv,typedDependencies:sv,createMaxTransform:lg},EN={addDependencies:Nv,divideDependencies:Tx,typedDependencies:sv,createMean:mf},AN={addDependencies:Nv,divideDependencies:Tx,typedDependencies:sv,createMeanTransform:bg},ON={numericDependencies:Uv,smallerDependencies:Bb,typedDependencies:sv,createMin:Vs},CN={numericDependencies:Uv,smallerDependencies:Bb,typedDependencies:sv,createMinTransform:pg},TN={isNaNDependencies:Ww,isNumericDependencies:Xv,typedDependencies:sv,createMode:Zs},kN={BigNumberDependencies:nv,UnitDependencies:cb,createMolarMass:En},IN={BigNumberDependencies:nv,UnitDependencies:cb,createMolarMassC12:An},RN={BigNumberDependencies:nv,UnitDependencies:cb,createMolarPlanckConstant:wn},jN={BigNumberDependencies:nv,UnitDependencies:cb,createMolarVolume:Nn},BN={addDependencies:Nv,divideDependencies:Tx,factorialDependencies:mb,isIntegerDependencies:Mv,isPositiveDependencies:ux,multiplyDependencies:rb,typedDependencies:sv,createMultinomial:nf},zN={BigNumberDependencies:nv,createNaN:Nt},qN={BigNumberDependencies:nv,UnitDependencies:cb,createNeutronMass:un},PN={absDependencies:uv,addDependencies:Nv,conjDependencies:eb,ctransposeDependencies:Dx,eigsDependencies:nw,equalScalarDependencies:fv,largerDependencies:yb,matrixDependencies:pv,multiplyDependencies:rb,powDependencies:ub,smallerDependencies:Bb,sqrtDependencies:Fx,typedDependencies:sv,createNorm:Mf},FN={BigNumberDependencies:nv,equalScalarDependencies:fv,matrixDependencies:pv,typedDependencies:sv,createNthRoot:Fa},LN={ComplexDependencies:rv,divideScalarDependencies:$v,typedDependencies:sv,createNthRoots:Ys},UN={BigNumberDependencies:nv,UnitDependencies:cb,createNuclearMagneton:Jt},$N={createNull:xt},HN={formatDependencies:Yv,typedDependencies:sv,createOct:Ro},WN={BigNumberDependencies:nv,matrixDependencies:pv,typedDependencies:sv,createOnes:Xs},GN={DenseMatrixDependencies:ov,equalScalarDependencies:fv,matrixDependencies:pv,typedDependencies:sv,createOr:Wa},VN={evaluateDependencies:uw,createParserClass:Yy},ZN={ParserDependencies:VN,typedDependencies:sv,createParser:Ky},YN={factorialDependencies:mb,typedDependencies:sv,createPermutations:of},XN={BigNumberDependencies:nv,createPhi:Mt},JN={BigNumberDependencies:nv,createPi:St},QN={typedDependencies:sv,createPickRandom:Po},KN={ComplexDependencies:rv,addDependencies:Nv,ctransposeDependencies:Dx,deepEqualDependencies:Cx,divideScalarDependencies:$v,dotDependencies:nb,dotDivideDependencies:Ux,equalDependencies:Hv,invDependencies:sb,matrixDependencies:pv,multiplyDependencies:rb,typedDependencies:sv,createPinv:Ic},eS={BigNumberDependencies:nv,UnitDependencies:cb,createPlanckCharge:In},tS={BigNumberDependencies:nv,UnitDependencies:cb,createPlanckConstant:Ft},nS={BigNumberDependencies:nv,UnitDependencies:cb,createPlanckLength:Cn},rS={BigNumberDependencies:nv,UnitDependencies:cb,createPlanckMass:Tn},iS={BigNumberDependencies:nv,UnitDependencies:cb,createPlanckTemperature:Rn},oS={BigNumberDependencies:nv,UnitDependencies:cb,createPlanckTime:kn},aS={typedDependencies:sv,createPrint:Fo},sS={BigNumberDependencies:nv,UnitDependencies:cb,createProtonMass:an},uS={addDependencies:Nv,compareDependencies:Wb,multiplyDependencies:rb,partitionSelectDependencies:gN,typedDependencies:sv,createQuantileSeq:bc},cS={BigNumberDependencies:nv,UnitDependencies:cb,createQuantumOfCirculation:cn},fS={typedDependencies:sv,createRandom:Ho},lS={typedDependencies:sv,createRandomInt:ha},pS={createRangeClass:Fn},dS={bignumberDependencies:Pv,matrixDependencies:pv,largerDependencies:yb,largerEqDependencies:Pb,smallerDependencies:Bb,smallerEqDependencies:Fb,typedDependencies:sv,createRangeTransform:dg},hS={bignumberDependencies:Pv,fractionDependencies:Fv,AccessorNodeDependencies:hv,ArrayNodeDependencies:Cv,ConstantNodeDependencies:Yb,FunctionNodeDependencies:Qb,IndexNodeDependencies:Kb,ObjectNodeDependencies:ex,OperatorNodeDependencies:tx,ParenthesisNodeDependencies:nx,SymbolNodeDependencies:Jb,addDependencies:Nv,divideDependencies:Tx,equalDependencies:Hv,isZeroDependencies:Kv,matrixDependencies:pv,multiplyDependencies:rb,parseDependencies:ox,powDependencies:ub,simplifyDependencies:Rx,simplifyCoreDependencies:Ix,subtractDependencies:ob,typedDependencies:sv,createRationalize:Jy},mS={BigNumberDependencies:nv,UnitDependencies:cb,createReducedPlanckConstant:Lt},yS={createReplacer:$n},gS={isIntegerDependencies:Mv,matrixDependencies:pv,typedDependencies:sv,createReshape:Za},vS={matrixDependencies:pv,createResize:eu},bS={createReviver:Ny},xS={DenseMatrixDependencies:ov,equalScalarDependencies:fv,matrixDependencies:pv,typedDependencies:sv,zerosDependencies:_v,createRightArithShift:nu},wS={DenseMatrixDependencies:ov,equalScalarDependencies:fv,matrixDependencies:pv,typedDependencies:sv,zerosDependencies:_v,createRightLogShift:Pu},NS={BigNumberDependencies:nv,DenseMatrixDependencies:ov,SparseMatrixDependencies:lv,addScalarDependencies:wv,cosDependencies:dx,matrixDependencies:pv,multiplyScalarDependencies:Jv,normDependencies:PN,sinDependencies:Kx,typedDependencies:sv,unaryMinusDependencies:ib,createRotationMatrix:Af},SS={multiplyDependencies:rb,rotationMatrixDependencies:NS,typedDependencies:sv,createRotate:Tf},_S={IndexDependencies:qb,matrixDependencies:pv,rangeDependencies:Lb,typedDependencies:sv,createRow:xc},DS={IndexDependencies:qb,matrixDependencies:pv,rangeDependencies:Lb,typedDependencies:sv,createRowTransform:yg},MS={BigNumberDependencies:nv,UnitDependencies:cb,createRydberg:fn},ES={BigNumberDependencies:nv,createSQRT1_2:Tt},AS={BigNumberDependencies:nv,createSQRT2:kt},OS={BigNumberDependencies:nv,createSackurTetrode:Sn},CS={BigNumberDependencies:nv,typedDependencies:sv,createSec:Go},TS={BigNumberDependencies:nv,typedDependencies:sv,createSech:ma},kS={BigNumberDependencies:nv,UnitDependencies:cb,createSecondRadiation:_n},IS={DenseMatrixDependencies:ov,IndexDependencies:qb,compareNaturalDependencies:Gb,sizeDependencies:tb,subsetDependencies:dv,typedDependencies:sv,createSetCartesian:Nc},RS={DenseMatrixDependencies:ov,IndexDependencies:qb,compareNaturalDependencies:Gb,sizeDependencies:tb,subsetDependencies:dv,typedDependencies:sv,createSetDifference:Bc},jS={DenseMatrixDependencies:ov,IndexDependencies:qb,compareNaturalDependencies:Gb,sizeDependencies:tb,subsetDependencies:dv,typedDependencies:sv,createSetDistinct:_c},BS={DenseMatrixDependencies:ov,IndexDependencies:qb,compareNaturalDependencies:Gb,sizeDependencies:tb,subsetDependencies:dv,typedDependencies:sv,createSetIntersect:Jc},zS={IndexDependencies:qb,compareNaturalDependencies:Gb,sizeDependencies:tb,subsetDependencies:dv,typedDependencies:sv,createSetIsSubset:Mc},qS={IndexDependencies:qb,compareNaturalDependencies:Gb,sizeDependencies:tb,subsetDependencies:dv,typedDependencies:sv,createSetMultiplicity:qc},PS={IndexDependencies:qb,compareNaturalDependencies:Gb,sizeDependencies:tb,subsetDependencies:dv,typedDependencies:sv,createSetPowerset:Ac},FS={compareNaturalDependencies:Gb,typedDependencies:sv,createSetSize:Fu},LS={IndexDependencies:qb,concatDependencies:fx,setDifferenceDependencies:RS,sizeDependencies:tb,subsetDependencies:dv,typedDependencies:sv,createSetSymDifference:gf},US={IndexDependencies:qb,concatDependencies:fx,setIntersectDependencies:BS,setSymDifferenceDependencies:LS,sizeDependencies:tb,subsetDependencies:dv,typedDependencies:sv,createSetUnion:wf},$S={typedDependencies:sv,createSinh:ya},HS={compareDependencies:Wb,compareNaturalDependencies:Gb,matrixDependencies:pv,typedDependencies:sv,createSort:Oc},WS={SparseMatrixDependencies:lv,typedDependencies:sv,createSparse:ga},GS={BigNumberDependencies:nv,UnitDependencies:cb,createSpeedOfLight:qt},VS={typedDependencies:sv,createSplitUnit:Xo},ZS={absDependencies:uv,addDependencies:Nv,identityDependencies:Qv,invDependencies:sb,maxDependencies:DN,multiplyDependencies:rb,sizeDependencies:tb,sqrtDependencies:Fx,subtractDependencies:ob,typedDependencies:sv,createSqrtm:Fc},YS={typedDependencies:sv,createSquare:Jo},XS={matrixDependencies:pv,typedDependencies:sv,createSqueeze:Ka},JS={addDependencies:Nv,applyDependencies:Ev,divideDependencies:Tx,isNaNDependencies:Ww,multiplyDependencies:rb,subtractDependencies:ob,typedDependencies:sv,createVariance:Sf},QS={sqrtDependencies:Fx,typedDependencies:sv,varianceDependencies:JS,createStd:Of},KS={sqrtDependencies:Fx,typedDependencies:sv,varianceDependencies:JS,createStdTransform:wg},e_={BigNumberDependencies:nv,UnitDependencies:cb,createStefanBoltzmann:Dn},t_={typedDependencies:sv,createString:Qo},n_={matrixDependencies:pv,typedDependencies:sv,createSubsetTransform:cg},r_={addDependencies:Nv,numericDependencies:Uv,typedDependencies:sv,createSumTransform:hg},i_={OperatorNodeDependencies:tx,parseDependencies:ox,simplifyDependencies:Rx,typedDependencies:sv,createSymbolicEqual:Wy},o_={typedDependencies:sv,createTan:Ko},a_={typedDependencies:sv,createTanh:ba},s_={BigNumberDependencies:nv,UnitDependencies:cb,createThomsonCrossSection:ln},u_={matrixDependencies:pv,typedDependencies:sv,createTo:us},c_={addDependencies:Nv,matrixDependencies:pv,typedDependencies:sv,createTrace:Qu},f_={createTrue:vt},l_={typedDependencies:sv,createTypeOf:ea},p_={DenseMatrixDependencies:ov,equalScalarDependencies:fv,matrixDependencies:pv,typedDependencies:sv,createUnequal:uu},d_={UnitDependencies:cb,typedDependencies:sv,createUnitFunction:cf},h_={eDependencies:Wx,createUppercaseE:jt},m_={piDependencies:JN,createUppercasePi:Rt},y_={BigNumberDependencies:nv,UnitDependencies:cb,createVacuumImpedance:Ht},g_={addDependencies:Nv,applyDependencies:Ev,divideDependencies:Tx,isNaNDependencies:Ww,multiplyDependencies:rb,subtractDependencies:ob,typedDependencies:sv,createVarianceTransform:xg},v_={createVersion:Bt},b_={BigNumberDependencies:nv,createWeakMixingAngle:pn},x_={BigNumberDependencies:nv,UnitDependencies:cb,createWienDisplacement:Mn},w_={DenseMatrixDependencies:ov,matrixDependencies:pv,typedDependencies:sv,createXor:fu},N_=t,S_=(r=n("c0e2"),n.n(r));function __(e,t,n,r){function i(e,t){t&&"function"==typeof t.transform?(n.expression.transform[e]=t.transform,l(e)&&(n.expression.mathWithTransform[e]=t.transform)):(delete n.expression.transform[e],l(e)&&(n.expression.mathWithTransform[e]=t))}function o(e){delete n.expression.transform[e],l(e)?n.expression.mathWithTransform[e]=n[e]:delete n.expression.mathWithTransform[e]}function a(e){return"function"==typeof e&&"object"==typeof e.signatures}function l(e){return!J(m,e)}function p(e){return!(-1!==e.fn.indexOf(".")||J(m,e.fn)||e.meta&&e.meta.isClass)}function h(e){return void 0!==e&&void 0!==e.meta&&!0===e.meta.isTransformFunction||!1}var m={expression:!0,type:!0,docs:!0,error:!0,json:!0,chain:!0};return function(t,l){var m=arguments.length;if(1!==m&&2!==m)throw new Ks("import",m,1,2);l=l||{};var y,g,v={};for(y in function e(t,n,r){if(Array.isArray(n))n.forEach(n=>e(t,n));else if("object"==typeof n)for(var i in n)J(n,i)&&e(t,n[i],i);else if(nt(n)||void 0!==r){if(r=nt(n)?h(n)?n.fn+".transform":n.fn:r,J(t,r)&&t[r]!==n&&!l.silent)throw new Error('Cannot import "'+r+'" twice');t[r]=n}else if(!l.silent)throw new TypeError("Factory, Object, or Array expected")}(v,t),v)if(J(v,y)){var b=v[y];if(nt(b))!function(t,i){var s=2{if(et(e,"."))throw new Error("Factory dependency should not contain a nested path. Name: "+JSON.stringify(e));"math"===e?r.math=n:"mathWithTransform"===e?r.mathWithTransform=n.expression.mathWithTransform:"classes"===e?r.classes=n:r[e]=n[e]}),t(r));if(o&&"function"==typeof o.transform)throw new Error('Transforms cannot be attached to factory functions. Please create a separate function for it with exports.path="expression.transform"');if(void 0===l||i.override)return o;if(a(l)&&a(o))return e(l,o);if(i.silent)return l;throw new Error('Cannot import "'+s+'": already exists')}var c=h(t)?n.expression.transform:n,f=s in n.expression.transform,l=J(c,s)?c[s]:void 0;t.meta&&!1===t.meta.lazy?c[s]=u():X(c,s,u),l&&f?o(s):(h(t)||p(t))&&X(n.expression.mathWithTransform,s,()=>c[s]),r[s]=t,n.emit("import",s,u)}(b,l);else if("function"==typeof(g=b)||"number"==typeof g||"string"==typeof g||"boolean"==typeof g||null===g||f(g)||u(g)||s(g)||c(g)||d(g)||Array.isArray(g))!function(t,o,s){if(s.wrap&&"function"==typeof o&&(o=function(e){function t(){for(var t=[],r=0,i=arguments.length;r{Q(W).forEach(e=>{e&&e.meta&&e.meta.recreateOnConfigChange&&G(e,{override:!0})})}),H.create=D_.bind(null,e),H.factory=tt,H.import(Q(Y(e))),H.ArgumentsError=Ks,H.DimensionError=Re,H.IndexError=je,H}},c7eb:function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n("a4d3"),n("e01a"),n("d3b7"),n("d28b"),n("3ca3"),n("ddb0"),n("b636"),n("944a"),n("0c47"),n("23dc"),n("3410"),n("159b"),n("b0c0"),n("131a"),n("fb6a");var r=n("53ca");function i(){ /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ i=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},a="function"==typeof Symbol?Symbol:{},s=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function f(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(t){f=function(e,t,n){return e[t]=n}}function l(e,t,n,r){var i,a,s,u;t=t&&t.prototype instanceof h?t:h,t=Object.create(t.prototype),r=new S(r||[]);return o(t,"_invoke",{value:(i=e,a=n,s=r,u="suspendedStart",function(e,t){if("executing"===u)throw new Error("Generator is already running");if("completed"===u){if("throw"===e)throw t;return D()}for(s.method=e,s.arg=t;;){var n=s.delegate;if(n&&(n=function e(t,n){var r=n.method,i=t.iterator[r];return void 0===i?(n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=void 0,e(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d):(r=p(i,t.iterator,n.arg),"throw"===r.type?(n.method="throw",n.arg=r.arg,n.delegate=null,d):(i=r.arg,i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=void 0),n.delegate=null,d):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,d)))}(n,s),n)){if(n===d)continue;return n}if("next"===s.method)s.sent=s._sent=s.arg;else if("throw"===s.method){if("suspendedStart"===u)throw u="completed",s.arg;s.dispatchException(s.arg)}else"return"===s.method&&s.abrupt("return",s.arg);if(u="executing",n=p(i,a,s),"normal"===n.type){if(u=s.done?"completed":"suspendedYield",n.arg===d)continue;return{value:n.arg,done:s.done}}"throw"===n.type&&(u="completed",s.method="throw",s.arg=n.arg)}})}),t}function p(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var d={};function h(){}function m(){}function y(){}a={};var g=(f(a,s,(function(){return this})),Object.getPrototypeOf),v=(g=g&&g(g(_([]))),g&&g!==t&&n.call(g,s)&&(a=g),y.prototype=h.prototype=Object.create(a));function b(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var i;o(this,"_invoke",{value:function(o,a){function s(){return new t((function(i,s){!function i(o,a,s,u){var c;o=p(e[o],e,a);if("throw"!==o.type)return(a=(c=o.arg).value)&&"object"==Object(r.a)(a)&&n.call(a,"__await")?t.resolve(a.__await).then((function(e){i("next",e,s,u)}),(function(e){i("throw",e,s,u)})):t.resolve(a).then((function(e){c.value=e,s(c)}),(function(e){return i("throw",e,s,u)}));u(o.arg)}(o,a,i,s)}))}return i=i?i.then(s,s):s()}})}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function N(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function S(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function _(e){if(e){var t,r=e[s];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return t=-1,(r=function r(){for(;++t=e.length?void 0:e)&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function a(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||0i[0]&&u[1]>>0;if(0!=r){t=0|t;for(var i,o,a=Math.max(0<=t?t:r-Math.abs(t),0);athis.length)&&-1!==this.indexOf(e,t)}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(e){if(null==this)throw new TypeError('"this" is null or not defined');var t=Object(this),n=t.length>>>0;if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var r=arguments[1],i=0;i '"+t.src+"' 不能为空或不合法"),"WEB"!==r.config.flag?(t[n]=i,t.$reject=o):((a=new Image).onload=function(){return i(a)},a.onerror=function(){return o("=> '"+t.src+"' 图片加载失败")},a.src=e)}))},nt.prototype.drawImage=function(e,t){for(var n,r=[],i=2;i>0)+"px "+f,i=String(n.text);(l?_e(o,xe(i),(function(e){return e=(r.prizeRadius-t(n,d,e.length))*Math.tan(r.prizeAng/2)*2-r.getLength(a.gutter),r.getLength(p,e)}),h):i.split("\n")).filter((function(e){return!!e})).forEach((function(r,i){o.fillText(r,e(n,r),t(n,d,i))}))})),o.rotate(je(360)-i-je(90)),o.translate(-m,-y)})),o.restore(),this.buttons.forEach((function(n,i){var a=r.getLength(n.radius,r.prizeRadius);r.maxBtnRadius=Math.max(r.maxBtnRadius,a),we(n.background)&&(o.beginPath(),o.fillStyle=n.background,o.arc(0,0,a,0,2*Math.PI,!1),o.fill()),n.pointer&&we(n.background)&&(o.beginPath(),o.fillStyle=n.background,o.moveTo(-a,0),o.lineTo(a,0),o.lineTo(0,2*-a),o.closePath(),o.fill()),n.imgs&&n.imgs.forEach((function(e,t){var n,i,s=r.ImageCache.get(e.src);s&&(n=(i=r.computedWidthAndHeight(s,e,2*a,2*a))[0],i=i[1],e=[r.getOffsetX(n)+r.getLength(e.left,a),r.getLength(e.top,a)],r.drawImage(o,s,e[0],e[1],n,i))})),n.fonts&&n.fonts.forEach((function(n){var i=n.fontColor||s.fontColor,u=n.fontWeight||s.fontWeight,c=r.getLength(n.fontSize||s.fontSize),f=n.fontStyle||s.fontStyle;o.fillStyle=i,o.font=u+" "+(c>>0)+"px "+f,String(n.text).split("\n").forEach((function(r,i){o.fillText(r,e(n,r),t(n,a,i))}))}))})),null!=(n=i.afterDraw)&&n.call(this,o)},tt.prototype.carveOnGunwaleOfAMovingBoat=function(){var e=this._defaultConfig,t=this.prizeFlag,n=this.prizeDeg,r=this.rotateDeg;this.endTime=Date.now();for(var i=this.stopDeg=r,o=e.speed,a=(Math.random()*n-n/2)*this.getLength(e.stopRange),s=0,u=0,c=0;++s;){var f=360*s-t*n-r-e.offsetDegree+a-n/2,l=qe(this.FPS,i,f,e.decelerationTime)-i;if(o>0:d)?a.background:e.background||o.background;we(u)&&(4===(s=(d?a.shadow:e.shadow||o.shadow).replace(/px/g,"").split(",")[0].split(" ").map((function(e,t){return t<3?Number(e):e}))).length&&(r.shadowColor=s[3],r.shadowOffsetX=s[0]*n.dpr,r.shadowOffsetY=s[1]*n.dpr,r.shadowBlur=s[2],0=t.prizes.length&&(i-=t.prizes.length),e.imgs&&e.imgs.forEach((function(e,n){var i,o=t.ImageCache.get(e.src),a=t.ImageCache.get(e.activeSrc);o&&(a=d&&a||o)&&(i=(o=t.computedWidthAndHeight(a,e,l,p))[0],o=o[1],e=[c+t.getOffsetX(i,l)+t.getLength(e.left,l),f+t.getLength(e.top,p)],t.drawImage(r,a,e[0],e[1],i,o))})),e.fonts&&e.fonts.forEach((function(e){var n,i=d&&a.fontStyle?a.fontStyle:e.fontStyle||o.fontStyle,s=d&&a.fontWeight?a.fontWeight:e.fontWeight||o.fontWeight,u=d&&a.fontSize?t.getLength(a.fontSize):t.getLength(e.fontSize||o.fontSize),h=d&&a.lineHeight?a.lineHeight:e.lineHeight||o.lineHeight||e.fontSize||o.fontSize,m=(be(e,"wordWrap")?e:o).wordWrap,y=e.lengthLimit||o.lengthLimit,g=e.lineClamp||o.lineClamp;r.font=s+" "+(u>>0)+"px "+i,r.fillStyle=d&&a.fontColor?a.fontColor:e.fontColor||o.fontColor,s=String(e.text);(m?(n=t.getLength(y,l),_e(r,xe(s),(function(){return n}),g)):s.split("\n")).forEach((function(n,i){r.fillText(n,c+t.getOffsetX(r.measureText(n).width,l)+t.getLength(e.left,l),f+t.getLength(e.top,p)+(i+1)*t.getLength(h))}))}))})),null!=(e=n.afterDraw)&&e.call(this,r)},et.prototype.handleBackground=function(e,t,n,r,i){var o,a,s,u,c=this.ctx;return i.includes("linear-gradient")&&(c=c,e=e,t=t,n=n,r=r,o=i,o=/linear-gradient\((.+)\)/.exec(o)[1].split(",").map((function(e){return e.trim()})),a=o.shift(),s=[0,0,0,0],a.includes("deg")?(u=function(e){return Math.tan(e/180*Math.PI)},0<=(a=a.slice(0,-3)%360)&&a<45?s=[e,t+r,e+n,t+r-n*u(+a)]:45<=a&&a<90?s=[e,t+r,e+n-r*u(a-45),t]:90<=a&&a<135?s=[e+n,t+r,e+n-r*u(a-90),t]:135<=a&&a<180?s=[e+n,t+r,e,t+n*u(a-135)]:180<=a&&a<225?s=[e+n,t,e,t+n*u(a-180)]:225<=a&&a<270?s=[e+n,t,e+r*u(a-225),t+r]:270<=a&&a<315?s=[e,t,e+r*u(a-270),t+r]:315<=a&&a<360&&(s=[e,t,e+n,t+r-n*u(a-315)])):a.includes("top")?s=[e,t+r,e,t]:a.includes("bottom")?s=[e,t,e,t+r]:a.includes("left")?s=[e+n,t,e,t]:a.includes("right")&&(s=[e,t,e+n,t]),u=c.createLinearGradient.apply(c,s.map((function(e){return e>>0}))),i=o.reduce((function(e,t,n){return t=t.split(" "),1===t.length?e.addColorStop(n,t[0]):2===t.length&&e.addColorStop.apply(e,t),e}),u)),i},et.prototype.carveOnGunwaleOfAMovingBoat=function(){var e=this._defaultConfig,t=this.prizeFlag,n=this.currIndex;this.endTime=Date.now();for(var r=this.stopIndex=n,i=e.speed,o=0,a=0,s=0;++o;){var u=this.prizes.length*o+t-r,c=qe(this.FPS,r,u,e.decelerationTime)-r;if(i>0)+"px "+i,m.fillStyle=t.fontColor||n.fontColor,o=String(t.text);(f?(r=e.getLength(l,s),_e(m,xe(o),(function(){return r}),p)):o.split("\n")).forEach((function(n,r){m.fillText(n,d+e.getOffsetX(m.measureText(n).width,s)+e.getLength(t.left,s),h+e.getLength(t.top,u)+(r+1)*e.getLength(c))}))}))}));i=e.displacement([o,0,s,l],[0,a,l,u]);for(var p=i[0],y=i[1],g=i[2],v=i[3],b=l;bs){e.endScroll[o]=d;break}}}))},Ke.prototype.play=function(){var e,t;0===this.step&&(this.startTime=Date.now(),this.prizeFlag=void 0,this.step=1,null!=(t=(e=this.config).afterStart)&&t.call(e),this.run())},Ke.prototype.stop=function(e){if(0!==this.step&&3!==this.step){if("number"==typeof e)this.prizeFlag=new Array(this.slots.length).fill(e);else{if(!ve(e,"array"))return void this.stop(-1);if(e.length!==this.slots.length)return void this.stop(-1);this.prizeFlag=e}null!=(e=this.prizeFlag)&&e.includes(-1)?(this.prizeFlag=[],this.step=0):this.step=2}},Ke.prototype.run=function(e){var t,n,r=this,i=(void 0===e&&(e=0),this.rAF),o=this.step,a=this.prizeFlag,s=this._defaultConfig,u=this.cellAndSpacing,c=this.slots,f=s.accelerationTime,l=s.decelerationTime;if(0!==this.step||(null==a?void 0:a.length)!==c.length)void 0!==a&&!a.length||(3!==this.step||this.endScroll.length||this.carveOnGunwaleOfAMovingBoat(),t=Date.now()-this.startTime,n=Date.now()-this.endTime,c.forEach((function(i,p){var d,h,m,y,g=i.order;g&&g.length&&(g=u*g.length,d=Math.abs(i.speed||s.speed),i=i.direction||s.direction,y=0,m=r.scroll[p],1===o||tu;)!r(s,n=t[u++])||~o(c,n)||c.push(n);return c}},caad:function(e,t,n){"use strict";var r=n("23e7"),i=n("4d64").includes,o=n("44d2");r({target:"Array",proto:!0,forced:!n("ae40")("indexOf",{ACCESSORS:!0,1:0})},{includes:function(e){return i(this,e,1>>7)^r<<24;return i=(i^=(r=e[n+1&7])^r>>>10)^(r=e[n+3&7])^r>>>3^(r=e[n+4&7])^r<<7,r=e[n+7&7],e[n]=i^=(r^=r<<13)^r<<9,t.i=n+1&7,i};var n,r=t,i=e,o=[];if(i===(0|i))o[0]=i;else for(i=""+i,n=0;n>>0)/4294967296}var r=new i(e=null==e?+new Date:e);e=t&&t.state;return n.double=function(){do{var e=((r.next()>>>11)+(r.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},n.int32=r.next,n.quick=n,e&&(e.x&&o(e,r),n.state=function(){return o(r,{})}),n}e&&e.exports?e.exports=a:n("07d6")&&n("3c35")?void 0!==(r=function(){return a}.call(t,n,t,e))&&(e.exports=r):this.xorshift7=a}(e,n("07d6"))}).call(this,n("62e4")(e))},cc12:function(e,t,n){var r=n("da84"),i=(n=n("861d"),r.document),o=n(i)&&n(i.createElement);e.exports=function(e){return o?i.createElement(e):{}}},cc15:function(e,t,n){var r=n("b367")("wks"),i=n("8b1a"),o=n("ef08").Symbol,a="function"==typeof o;(e.exports=function(e){return r[e]||(r[e]=a&&o[e]||(a?o:i)("Symbol."+e))}).store=r},cca6:function(e,t,n){var r=n("23e7");n=n("60da");r({target:"Object",stat:!0,forced:Object.assign!==n},{assign:n})},cdf9:function(e,t,n){var r=n("825a"),i=n("861d"),o=n("f069");e.exports=function(e,t){return r(e),i(t)&&t.constructor===e?t:((0,(e=o.f(e)).resolve)(t),e.promise)}},ce4e:function(e,t,n){var r=n("da84"),i=n("9112");e.exports=function(t,n){try{i(r,t,n)}catch(e){r[t]=n}return n}},ce7a:function(e,t,n){var r=n("9c0e"),i=n("0983"),o=n("5a94")("IE_PROTO"),a=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=i(e),r(e,o)?e[o]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?a:null}},cee4:function(e,t,n){"use strict";var r=n("c532"),i=n("1d2b"),o=n("0a06"),a=n("2444");function s(e){e=new o(e);var t=i(o.prototype.request,e);return r.extend(t,o.prototype,e),r.extend(t,e),t}var u=s(a);u.Axios=o,u.create=function(e){return s(r.merge(a,e))},u.Cancel=n("7a77"),u.CancelToken=n("8df4"),u.isCancel=n("2e67"),u.all=function(e){return Promise.all(e)},u.spread=n("0df6"),e.exports=u,e.exports.default=u},d012:function(e,t){e.exports={}},d039:function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},d066:function(e,t,n){function r(e){return"function"==typeof e?e:void 0}var i=n("428f"),o=n("da84");e.exports=function(e,t){return arguments.length<2?r(i[e])||r(o[e]):i[e]&&i[e][t]||o[e]&&o[e][t]}},d16a:function(e,t,n){var r=n("fc5e"),i=Math.min;e.exports=function(e){return 0>=1)1&t&&(r=r*e%n);return r}(10,n,t),o=0;o<300;o++){if(r===i)return o;r=10*r%t,i=10*i%t}return 0}function c(e,t){if(!e)return t;if(!t)return e;for(;;){if(!(e%=t))return t;if(!(t%=e))return e}}function f(e,t){if(s(e,t),!(this instanceof f))return o(n.s*n.n,n.d);e=c(n.d,n.n),this.s=n.s,this.n=n.n/e,this.d=n.d/e}f.DivisionByZero=new Error("Division by Zero"),f.InvalidParameter=new Error("Invalid argument"),f.NonIntegerParameter=new Error("Parameters must be integer"),f.prototype={s:1,n:0,d:1,abs:function(){return o(this.n,this.d)},neg:function(){return o(-this.s*this.n,this.d)},add:function(e,t){return s(e,t),o(this.s*this.n*n.d+n.s*this.d*n.n,this.d*n.d)},sub:function(e,t){return s(e,t),o(this.s*this.n*n.d-n.s*this.d*n.n,this.d*n.d)},mul:function(e,t){return s(e,t),o(this.s*n.s*this.n*n.n,this.d*n.d)},div:function(e,t){return s(e,t),o(this.s*n.s*this.n*n.d,this.d*n.n)},clone:function(){return o(this.s*this.n,this.d)},mod:function(e,t){if(isNaN(this.n)||isNaN(this.d))return new f(NaN);if(void 0===e)return o(this.s*this.n%this.d,1);if(s(e,t),0===n.n&&0===this.d)throw f.DivisionByZero;return o(this.s*(n.d*this.n)%(n.n*this.d),n.d*this.d)},gcd:function(e,t){return s(e,t),o(c(n.n,this.n)*c(n.d,this.d),n.d*this.d)},lcm:function(e,t){return s(e,t),0===n.n&&0===this.n?o(0,1):o(n.n*this.n,c(n.n,this.n)*c(n.d,this.d))},ceil:function(e){return e=Math.pow(10,e||0),isNaN(this.n)||isNaN(this.d)?new f(NaN):o(Math.ceil(e*this.s*this.n/this.d),e)},floor:function(e){return e=Math.pow(10,e||0),isNaN(this.n)||isNaN(this.d)?new f(NaN):o(Math.floor(e*this.s*this.n/this.d),e)},round:function(e){return e=Math.pow(10,e||0),isNaN(this.n)||isNaN(this.d)?new f(NaN):o(Math.round(e*this.s*this.n/this.d),e)},inverse:function(){return o(this.s*this.d,this.n)},pow:function(e,t){if(s(e,t),1===n.d)return n.s<0?o(Math.pow(this.s*this.d,n.n),Math.pow(this.n,n.n)):o(Math.pow(this.s*this.n,n.n),Math.pow(this.d,n.n));if(this.s<0)return null;var r,i=a(this.n),u=a(this.d),c=1,f=1;for(r in i)if("1"!==r){if("0"===r){c=0;break}if(i[r]*=n.n,i[r]%n.d!=0)return null;i[r]/=n.d,c*=Math.pow(r,i[r])}for(r in u)if("1"!==r){if(u[r]*=n.n,u[r]%n.d!=0)return null;u[r]/=n.d,f*=Math.pow(r,u[r])}return n.s<0?o(f,c):o(c,f)},equals:function(e,t){return s(e,t),this.s*this.n*n.d==n.s*n.n*this.d},compare:function(e,t){return s(e,t),e=this.s*this.n*n.d-n.s*n.n*this.d,(0")})),f="$0"==="a".replace(/./,"$0"),l=(n=o("replace"),!!/./[n]&&""===/./[n]("a","$0")),p=!i((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)},e="ab".split(e);return 2!==e.length||"a"!==e[0]||"b"!==e[1]}));e.exports=function(e,t,n,d){var h,m,y=o(e),g=!i((function(){var t={};return t[y]=function(){return 7},7!=""[e](t)})),v=g&&!i((function(){var t=!1,n=/a/;return"split"===e&&((n={constructor:{}}).constructor[u]=function(){return n},n.flags="",n[y]=/./[y]),n.exec=function(){return t=!0,null},n[y](""),!t}));g&&v&&("replace"!==e||c&&f&&!l)&&("split"!==e||p)||(h=/./[y],n=(v=n(y,""[e],(function(e,t,n,r,i){return t.exec===a?g&&!i?{done:!0,value:h.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}}),{REPLACE_KEEPS_$0:f,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:l}))[0],m=v[1],r(String.prototype,e,n),r(RegExp.prototype,y,2==t?function(e,t){return m.call(e,this,t)}:function(e){return m.call(e,this)})),d&&s(RegExp.prototype[y],"sham",!0)}},d81d:function(e,t,n){"use strict";var r=n("23e7"),i=n("b727").map,o=n("1dde");n=n("ae40"),o=o("map"),n=n("map");r({target:"Array",proto:!0,forced:!o||!n},{map:function(e){return i(this,e,1l;)void 0!==(n=i(r,t=c[l++]))&&u(f,t,n);return f}})},ddb0:function(e,t,n){var r,i=n("da84"),o=n("fdbc"),a=n("e260"),s=n("9112"),u=(n=n("b622"),n("iterator")),c=n("toStringTag"),f=a.values;for(r in o){var l=i[r],p=l&&l.prototype;if(p){if(p[u]!==f)try{s(p,u,f)}catch(e){p[u]=f}if(p[c]||s(p,c,r),o[r])for(var d in a)if(p[d]!==a[d])try{s(p,d,a[d])}catch(e){p[d]=a[d]}}}},df75:function(e,t,n){var r=n("ca84"),i=n("7839");e.exports=Object.keys||function(e){return r(e,i)}},df7c:function(e,t,n){(function(e){function n(e,t){for(var n=0,r=e.length-1;0<=r;r--){var i=e[r];"."===i?e.splice(r,1):".."===i?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;)e.unshift("..");return e}function r(e,t){if(e.filter)return e.filter(t);for(var n=[],r=0;r"+e+""}),l=e;function p(){l.apply(this,arguments)}l&&(p.__proto__=l),(p.prototype=Object.create(l&&l.prototype)).constructor=p;var d={isMounted:{}};return d.isMounted.get=function(){return!!this.node},p.createFromExistingNode=function(e){return new p({id:e.getAttribute("id"),viewBox:e.getAttribute("viewBox"),content:e.outerHTML})},p.prototype.destroy=function(){this.isMounted&&this.unmount(),l.prototype.destroy.call(this)},p.prototype.mount=function(e){if(this.isMounted)return this.node;var t="string"===typeof e?document.querySelector(e):e,n=this.render();return this.node=n,t.appendChild(n),n},p.prototype.render=function(){var e=this.stringify();return n(f(e)).childNodes[0]},p.prototype.unmount=function(){this.node.parentNode.removeChild(this.node)},Object.defineProperties(p.prototype,d),p}()}).call(this,n("c8ba"))},e01a:function(e,t,n){"use strict";var r,i,o,a,s,u=n("23e7"),c=n("83ab"),f=n("da84"),l=n("5135"),p=n("861d"),d=n("9bf2").f,h=(n=n("e893"),f.Symbol);!c||"function"!=typeof h||"description"in h.prototype&&void 0===h().description||(r={},n(i=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),t=this instanceof i?new h(e):void 0===e?h():h(e);return""===e&&(r[t]=!0),t},h),(f=i.prototype=h.prototype).constructor=i,o=f.toString,a="Symbol(test)"==String(h("test")),s=/^Symbol\((.*)\)[^)]+$/,d(f,"description",{configurable:!0,get:function(){var e=p(this)?this.valueOf():this,t=o.call(e);return l(r,e)?"":""===(e=a?t.slice(7,-1):t.replace(s,"$1"))?void 0:e}}),u({global:!0,forced:!0},{Symbol:i}))},e163:function(e,t,n){var r=n("5135"),i=n("7b0b"),o=n("f772"),a=(n=n("e177"),o("IE_PROTO")),s=Object.prototype;e.exports=n?Object.getPrototypeOf:function(e){return e=i(e),r(e,a)?e[a]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?s:null}},e177:function(e,t,n){n=n("d039"),e.exports=!n((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},e198:function(e,t,n){var r=n("ef08"),i=n("5524"),o=n("e444"),a=n("fcd4"),s=n("1a14").f;e.exports=function(e){var t=i.Symbol||(i.Symbol=!o&&r.Symbol||{});"_"==e.charAt(0)||e in t||s(t,e,{value:a.f(e)})}},e260:function(e,t,n){"use strict";var r=n("fc6a"),i=n("44d2"),o=n("3f8c"),a=n("69f3"),s=(n=n("7dd0"),"Array Iterator"),u=a.set,c=a.getterFor(s);e.exports=n(Array,"Array",(function(e,t){u(this,{type:s,target:r(e),index:0,kind:t})}),(function(){var e=c(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?{value:e.target=void 0,done:!0}:"keys"==n?{value:r,done:!1}:"values"==n?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}}),"values"),o.Arguments=o.Array,i("keys"),i("values"),i("entries")},e2cc:function(e,t,n){var r=n("6eeb");e.exports=function(e,t,n){for(var i in t)r(e,i,t[i],n);return e}},e34a:function(e,t,n){function r(e){s(e,i,{value:{i:"O"+ ++u,w:{}}})}var i=n("8b1a")("meta"),o=n("7a41"),a=n("9c0e"),s=n("1a14").f,u=0,c=Object.isExtensible||function(){return!0},f=!n("4b8b")((function(){return c(Object.preventExtensions({}))})),l=e.exports={KEY:i,NEED:!1,fastKey:function(e,t){if(!o(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!a(e,i)){if(!c(e))return"F";if(!t)return"E";r(e)}return e[i].i},getWeak:function(e,t){if(!a(e,i)){if(!c(e))return!0;if(!t)return!1;r(e)}return e[i].w},onFreeze:function(e){return f&&l.NEED&&c(e)&&!a(e,i)&&r(e),e}}},e439:function(e,t,n){var r=n("23e7"),i=n("d039"),o=n("fc6a"),a=n("06cf").f;n=n("83ab"),i=i((function(){a(1)}));r({target:"Object",stat:!0,forced:!n||i,sham:!n},{getOwnPropertyDescriptor:function(e,t){return a(o(e),t)}})},e444:function(e,t){e.exports=!0},e507:function(e,t,n){var r=n("512c");r(r.S+r.F,"Object",{assign:n("072d")})},e50d:function(e,t,n){n("8172"),n("efec"),n("a4d3"),n("e01a"),n("d3b7"),n("a9e3");var r=n("7037").default;e.exports=function(e,t){if("object"!==r(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if(n=n.call(e,t||"default"),"object"!==r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")},e.exports.__esModule=!0,e.exports.default=e.exports},e538:function(e,t,n){n=n("b622"),t.f=n},e667:function(e,t){e.exports=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}}},e683:function(e,t,n){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},e6cf:function(e,t,n){"use strict";var r,i,o,a,s=n("23e7"),u=n("c430"),c=n("da84"),f=n("d066"),l=n("fea9"),p=n("6eeb"),d=n("e2cc"),h=n("d44e"),m=n("2626"),y=n("861d"),g=n("1c0b"),v=n("19aa"),b=n("c6b6"),x=n("8925"),w=n("2266"),N=n("1c7e"),S=n("4840"),_=n("2cf4").set,D=n("b575"),M=n("cdf9"),E=n("44de"),A=n("f069"),O=n("e667"),C=n("69f3"),T=n("94ca"),k=n("b622"),I=n("2d00"),R=k("species"),j="Promise",B=C.get,z=C.set,q=C.getterFor(j),P=l,F=c.TypeError,L=c.document,U=c.process,$=f("fetch"),H=A.f,W=H,G="process"==b(U),V=!!(L&&L.createEvent&&c.dispatchEvent),Z="unhandledrejection",Y="rejectionhandled",X=1,J=2,Q=1,K=2,ee=(n=T(j,(function(){var e,t;if(x(P)===String(P)){if(66===I)return!0;if(!G&&"function"!=typeof PromiseRejectionEvent)return!0}return!(!u||P.prototype.finally)||!(51<=I&&/native code/.test(P)||(t=function(e){e((function(){}),(function(){}))},((e=P.resolve(1)).constructor={})[R]=t,e.then((function(){}))instanceof t))})),k=n||!N((function(e){P.all(e).catch((function(){}))})),function(e){var t;return!(!y(e)||"function"!=typeof(t=e.then))&&t}),te=function(e,t,n){var r;t.notified||(t.notified=!0,r=t.reactions,D((function(){for(var i,o,a=t.value,s=t.state==X,u=0;r.length>u;){var f,l,p,d=r[u++],h=s?d.ok:d.fail,m=d.resolve,y=d.reject,g=d.domain;try{h?(s||(t.rejection===K&&function(e,t){_.call(c,(function(){G?U.emit("rejectionHandled",e):ne(Y,e,t.value)}))}(e,t),t.rejection=Q),!0===h?f=a:(g&&g.enter(),f=h(a),g&&(g.exit(),p=!0)),f===d.promise?y(F("Promise-chain cycle")):(l=ee(f))?l.call(f,m,y):m(f)):y(a)}catch(a){g&&!p&&g.exit(),y(a)}}t.reactions=[],t.notified=!1,n&&!t.rejection&&(i=e,o=t,_.call(c,(function(){var e=o.value,t=re(o);if(t&&(t=O((function(){G?U.emit("unhandledRejection",e,i):ne(Z,i,e)})),o.rejection=G||re(o)?K:Q,t.error))throw t.value})))})))},ne=function(e,t,n){var r;V?((r=L.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),c.dispatchEvent(r)):r={promise:t,reason:n},(t=c["on"+e])?t(r):e===Z&&E("Unhandled promise rejection",n)},re=function(e){return e.rejection!==Q&&!e.parent},ie=function(e,t,n,r){return function(i){e(t,n,i,r)}},oe=function(e,t,n,r){t.done||(t.done=!0,(t=r||t).value=n,t.state=J,te(e,t,!0))},ae=function(e,t,n,r){if(!t.done){t.done=!0,r&&(t=r);try{if(e===n)throw F("Promise can't be resolved itself");var i=ee(n);i?D((function(){var r={done:!1};try{i.call(n,ie(ae,e,r,t),ie(oe,e,r,t))}catch(n){oe(e,r,n,t)}})):(t.value=n,t.state=X,te(e,t,!1))}catch(n){oe(e,{done:!1},n,t)}}};n&&(P=function(e){v(this,P,j),g(e),r.call(this);var t=B(this);try{e(ie(ae,this,t),ie(oe,this,t))}catch(e){oe(this,t,e)}},(r=function(e){z(this,{type:j,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=d(P.prototype,{then:function(e,t){var n=q(this),r=H(S(this,P));return r.ok="function"!=typeof e||e,r.fail="function"==typeof t&&t,r.domain=G?U.domain:void 0,n.parent=!0,n.reactions.push(r),0!=n.state&&te(this,n,!1),r.promise},catch:function(e){return this.then(void 0,e)}}),i=function(){var e=new r,t=B(e);this.promise=e,this.resolve=ie(ae,e,t),this.reject=ie(oe,e,t)},A.f=H=function(e){return e===P||e===o?new i:W(e)},u||"function"!=typeof l||(a=l.prototype.then,p(l.prototype,"then",(function(e,t){var n=this;return new P((function(e,t){a.call(n,e,t)})).then(e,t)}),{unsafe:!0}),"function"==typeof $&&s({global:!0,enumerable:!0,forced:!0},{fetch:function(e){return M(P,$.apply(c,arguments))}}))),s({global:!0,wrap:!0,forced:n},{Promise:P}),h(P,j,!1,!0),m(j),o=f(j),s({target:j,stat:!0,forced:n},{reject:function(e){var t=H(this);return t.reject.call(void 0,e),t.promise}}),s({target:j,stat:!0,forced:u||n},{resolve:function(e){return M(u&&this===o?P:this,e)}}),s({target:j,stat:!0,forced:k},{all:function(e){var t=this,n=H(t),r=n.resolve,i=n.reject,o=O((function(){var n=g(t.resolve),o=[],a=0,s=1;w(e,(function(e){var u=a++,c=!1;o.push(void 0),s++,n.call(t,e).then((function(e){c||(c=!0,o[u]=e,--s)||r(o)}),i)})),--s||r(o)}));return o.error&&i(o.value),n.promise},race:function(e){var t=this,n=H(t),r=n.reject,i=O((function(){var i=g(t.resolve);w(e,(function(e){i.call(t,e).then(n.resolve,r)}))}));return i.error&&r(i.value),n.promise}})},e893:function(e,t,n){var r=n("5135"),i=n("56ef"),o=n("06cf"),a=n("9bf2");e.exports=function(e,t){for(var n=i(t),s=a.f,u=o.f,c=0;c