@synnaxlabs/pluto 0.23.0 → 0.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Animated-DjcnDVGC.cjs → Animated-Cbt7tqBk.cjs} +1 -1
- package/dist/{Animated-DPIV1IH6.js → Animated-DGp8qHGT.js} +2 -2
- package/dist/{Keyboard-CJLEUbYu.cjs → Keyboard-BjnOIJ5V.cjs} +1 -1
- package/dist/{Keyboard-BLHHROrq.js → Keyboard-HZ6Llqo5.js} +2 -2
- package/dist/{LinePlot-C9MVJErC.js → LinePlot-Dw8vQLJw.js} +154 -148
- package/dist/LinePlot-tnVASicV.cjs +66 -0
- package/dist/{Link-C3NUk5cp.cjs → Link-CmzvCQDi.cjs} +1 -1
- package/dist/{Link-BsqVxj6V.js → Link-j-xpQ9HD.js} +1 -1
- package/dist/List-BX3MLMNz.cjs +1 -0
- package/dist/List-BlgM15Pf.js +22 -0
- package/dist/{Pack-mkZBsSIU.js → Pack-B5JX1aqf.js} +5 -5
- package/dist/{Pack-CBNcamuh.cjs → Pack-D93gFUU9.cjs} +1 -1
- package/dist/Toggle-BvWOTk9-.cjs +188 -0
- package/dist/{Toggle-W4K3cLf7.js → Toggle-Cq3FTFfq.js} +8169 -8032
- package/dist/{Video-Kb-c-N69.cjs → Video-D382cbrn.cjs} +1 -1
- package/dist/{Video-C2EYBKLN.js → Video-DIIo17du.js} +1 -1
- package/dist/{aggregator-BZJAV5yZ.js → aggregator-BIhLPgXc.js} +4811 -4482
- package/dist/aggregator-CaPKb9Zv.cjs +51 -0
- package/dist/align.cjs +1 -1
- package/dist/align.js +1 -1
- package/dist/button.cjs +1 -1
- package/dist/button.js +1 -1
- package/dist/color.cjs +1 -1
- package/dist/color.js +1 -1
- package/dist/css-BNL3vU5o.cjs +1 -0
- package/dist/{css-TXuXKs3A.js → css-CDB-JY4S.js} +358 -352
- package/dist/css.cjs +1 -1
- package/dist/css.js +2 -2
- package/dist/dropdown.cjs +1 -1
- package/dist/dropdown.js +1 -1
- package/dist/ether.cjs +1 -1
- package/dist/ether.js +5 -5
- package/dist/{external-BB2SaR1o.js → external-B4-opRnY.js} +1 -1
- package/dist/{external-BKWizK6o.cjs → external-B5j7Ee09.cjs} +1 -1
- package/dist/{external-DsNtnR-y.cjs → external-BCyTR9bj.cjs} +1 -1
- package/dist/{external-TNsi3_BK.js → external-BJI4w1QU.js} +26 -26
- package/dist/external-BK0QWtit.cjs +1 -0
- package/dist/{external-WGyRiKbb.js → external-C3TJ5wKl.js} +24 -24
- package/dist/{external-DlCoToEB.cjs → external-CD2dFTTj.cjs} +1 -1
- package/dist/{external-XoJlPNFB.js → external-CDZA7f7F.js} +2 -2
- package/dist/{external-mlV4Onnq.cjs → external-CFqe6ymi.cjs} +1 -1
- package/dist/{external-BphNoXuB.js → external-CRbJq-i4.js} +8 -8
- package/dist/{external-CduvGaPN.js → external-CZiW7AR4.js} +18 -18
- package/dist/{external-D1NnASGa.cjs → external-CjjdhnS5.cjs} +1 -1
- package/dist/external-D6mqXF0b.js +272 -0
- package/dist/external-D9eq1UnF.cjs +1 -0
- package/dist/external-DKxxR-uc.cjs +1 -0
- package/dist/{external-DjjMU4Z6.cjs → external-DUeGQ4si.cjs} +1 -1
- package/dist/external-DVg6hQ24.js +98 -0
- package/dist/external-DvFgLm4v.js +222 -0
- package/dist/external-IpylADnr.cjs +1 -0
- package/dist/external-RIKGjo5R.js +74 -0
- package/dist/external-jSb_axxw.js +346 -0
- package/dist/{external-0w2SHXg_.js → external-lDVnD7Yi.js} +2 -2
- package/dist/{external-CztU6wom.cjs → external-v3jmKHoB.cjs} +1 -1
- package/dist/external-zDAAJJHM.cjs +1 -0
- package/dist/header.cjs +1 -1
- package/dist/header.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +3311 -3123
- package/dist/input.cjs +1 -1
- package/dist/input.js +1 -1
- package/dist/list.cjs +1 -1
- package/dist/list.js +1 -1
- package/dist/menu.cjs +1 -1
- package/dist/menu.js +1 -1
- package/dist/src/button/Button.d.ts +3 -1
- package/dist/src/button/Button.d.ts.map +1 -1
- package/dist/src/channel/LinePlot.d.ts +4 -1
- package/dist/src/channel/LinePlot.d.ts.map +1 -1
- package/dist/src/dialog/index.d.ts +2 -0
- package/dist/src/dialog/index.d.ts.map +1 -0
- package/dist/src/dialog/use.d.ts +28 -0
- package/dist/src/dialog/use.d.ts.map +1 -0
- package/dist/src/divider/Divider.d.ts +2 -2
- package/dist/src/divider/Divider.d.ts.map +1 -1
- package/dist/src/dropdown/Dropdown.d.ts +5 -27
- package/dist/src/dropdown/Dropdown.d.ts.map +1 -1
- package/dist/src/form/Field.d.ts +35 -0
- package/dist/src/form/Field.d.ts.map +1 -0
- package/dist/src/form/Form.d.ts +15 -45
- package/dist/src/form/Form.d.ts.map +1 -1
- package/dist/src/form/external.d.ts +1 -0
- package/dist/src/form/external.d.ts.map +1 -1
- package/dist/src/haul/Haul.d.ts +79 -2
- package/dist/src/haul/Haul.d.ts.map +1 -1
- package/dist/src/index.d.ts +4 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/input/Text.d.ts +2 -0
- package/dist/src/input/Text.d.ts.map +1 -1
- package/dist/src/list/Column.d.ts +1 -0
- package/dist/src/list/Column.d.ts.map +1 -1
- package/dist/src/list/Core.d.ts.map +1 -1
- package/dist/src/list/Hover.d.ts.map +1 -1
- package/dist/src/list/Selector.d.ts +1 -7
- package/dist/src/list/Selector.d.ts.map +1 -1
- package/dist/src/list/useSelect.d.ts +5 -1
- package/dist/src/list/useSelect.d.ts.map +1 -1
- package/dist/src/menu/Menu.d.ts +5 -3
- package/dist/src/menu/Menu.d.ts.map +1 -1
- package/dist/src/modal/Modal.d.ts +8 -0
- package/dist/src/modal/Modal.d.ts.map +1 -0
- package/dist/src/modal/index.d.ts +2 -0
- package/dist/src/modal/index.d.ts.map +1 -0
- package/dist/src/mosaic/Mosaic.d.ts +1 -1
- package/dist/src/mosaic/Mosaic.d.ts.map +1 -1
- package/dist/src/mosaic/tree.d.ts +1 -0
- package/dist/src/mosaic/tree.d.ts.map +1 -1
- package/dist/src/mosaic/types.d.ts +62 -0
- package/dist/src/mosaic/types.d.ts.map +1 -1
- package/dist/src/note/Note.d.ts.map +1 -1
- package/dist/src/observe/index.d.ts +2 -0
- package/dist/src/observe/index.d.ts.map +1 -0
- package/dist/src/observe/use.d.ts +19 -0
- package/dist/src/observe/use.d.ts.map +1 -0
- package/dist/src/os/Controls/Windows.d.ts +1 -1
- package/dist/src/os/Controls/Windows.d.ts.map +1 -1
- package/dist/src/ranger/TimeRangeChip.d.ts +3 -2
- package/dist/src/ranger/TimeRangeChip.d.ts.map +1 -1
- package/dist/src/select/List.d.ts +3 -2
- package/dist/src/select/List.d.ts.map +1 -1
- package/dist/src/select/Multiple.d.ts +3 -2
- package/dist/src/select/Multiple.d.ts.map +1 -1
- package/dist/src/select/Select.spec.d.ts.map +1 -1
- package/dist/src/select/Single.d.ts +5 -3
- package/dist/src/select/Single.d.ts.map +1 -1
- package/dist/src/state/state.d.ts +1 -0
- package/dist/src/state/state.d.ts.map +1 -1
- package/dist/src/status/Notification.d.ts +1 -1
- package/dist/src/status/Notification.d.ts.map +1 -1
- package/dist/src/tabs/Selector.d.ts +4 -10
- package/dist/src/tabs/Selector.d.ts.map +1 -1
- package/dist/src/tabs/Tabs.d.ts +6 -11
- package/dist/src/tabs/Tabs.d.ts.map +1 -1
- package/dist/src/tabs/external.d.ts +1 -0
- package/dist/src/tabs/external.d.ts.map +1 -1
- package/dist/src/tabs/types.d.ts +54 -0
- package/dist/src/tabs/types.d.ts.map +1 -0
- package/dist/src/text/Editable.d.ts +5 -1
- package/dist/src/text/Editable.d.ts.map +1 -1
- package/dist/src/text/WithIcon.d.ts.map +1 -1
- package/dist/src/tree/Tree.d.ts +7 -2
- package/dist/src/tree/Tree.d.ts.map +1 -1
- package/dist/src/tree/core.d.ts +1 -0
- package/dist/src/tree/core.d.ts.map +1 -1
- package/dist/src/triggers/Text.d.ts +1 -1
- package/dist/src/triggers/Text.d.ts.map +1 -1
- package/dist/src/triggers/hooks.d.ts +1 -1
- package/dist/src/triggers/hooks.d.ts.map +1 -1
- package/dist/src/triggers/triggers.d.ts +2 -1
- package/dist/src/triggers/triggers.d.ts.map +1 -1
- package/dist/src/util/rootElement.d.ts +2 -0
- package/dist/src/util/rootElement.d.ts.map +1 -0
- package/dist/src/viewport/use.d.ts +2 -0
- package/dist/src/viewport/use.d.ts.map +1 -1
- package/dist/src/vis/legend/Container.d.ts +99 -5
- package/dist/src/vis/legend/Container.d.ts.map +1 -1
- package/dist/src/vis/line/aether/line.d.ts +2 -2
- package/dist/src/vis/line/aether/line.d.ts.map +1 -1
- package/dist/src/vis/render/context.d.ts.map +1 -1
- package/dist/src/vis/schematic/Forms.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.js +1 -1
- package/dist/text.cjs +1 -1
- package/dist/text.js +2 -2
- package/dist/theming.cjs +1 -1
- package/dist/theming.js +2 -2
- package/dist/tree.cjs +1 -1
- package/dist/tree.js +1 -1
- package/dist/triggers.cjs +1 -1
- package/dist/triggers.js +1 -1
- package/dist/{units-DechjShe.js → units-DeLVJ01P.js} +1 -1
- package/dist/{units-BsHX82D_.cjs → units-MTRY0KtD.cjs} +1 -1
- package/dist/video.cjs +1 -1
- package/dist/video.js +1 -1
- package/package.json +4 -4
- package/dist/LinePlot-DkAUE5Nq.cjs +0 -68
- package/dist/List-BbB1S5Vo.cjs +0 -1
- package/dist/List-DPugi06W.js +0 -22
- package/dist/Toggle-BBGPiXIA.cjs +0 -188
- package/dist/aggregator-DueF6Q-Z.cjs +0 -45
- package/dist/css-DZx3bWkH.cjs +0 -1
- package/dist/external-B-CtJFCn.js +0 -96
- package/dist/external-B39SmpRo.js +0 -201
- package/dist/external-BbnWD0Pc.js +0 -66
- package/dist/external-CsPOXIEm.cjs +0 -1
- package/dist/external-CyiLaYmg.js +0 -322
- package/dist/external-DrS33VU5.cjs +0 -1
- package/dist/external-WzX6JA2j.cjs +0 -1
- package/dist/external-fg-pJfZR.js +0 -260
- package/dist/external-vZfda3xX.cjs +0 -1
- package/dist/external-vgqH7hLg.cjs +0 -1
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
"use strict";const Oe=require("./jsx-runtime-fmb_vB8K.cjs"),$=require("react"),ye=require("./aggregator-CaPKb9Zv.cjs"),G=require("./css-BNL3vU5o.cjs"),as=require("react-dom"),kt=require("./Pack-D93gFUU9.cjs"),wt=require("zod"),yr=require("./units-MTRY0KtD.cjs");function Kw(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const Gi=Kw($);var Nl={exports:{}},Bi={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.min.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var bp;function Jw(){if(bp)return Bi;bp=1;var e=$,r=Symbol.for("react.element"),t=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,a=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function o(u,s,l){var c,f={},p=null,v=null;l!==void 0&&(p=""+l),s.key!==void 0&&(p=""+s.key),s.ref!==void 0&&(v=s.ref);for(c in s)n.call(s,c)&&!i.hasOwnProperty(c)&&(f[c]=s[c]);if(u&&u.defaultProps)for(c in s=u.defaultProps,s)f[c]===void 0&&(f[c]=s[c]);return{$$typeof:r,type:u,key:p,ref:v,props:f,_owner:a.current}}return Bi.Fragment=t,Bi.jsx=o,Bi.jsxs=o,Bi}var _o={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react-jsx-runtime.development.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var xp;function Qw(){return xp||(xp=1,process.env.NODE_ENV!=="production"&&function(){var e=$,r=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),u=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),v=Symbol.for("react.offscreen"),m=Symbol.iterator,d="@@iterator";function y(ee){if(ee===null||typeof ee!="object")return null;var Te=m&&ee[m]||ee[d];return typeof Te=="function"?Te:null}var h=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function E(ee){{for(var Te=arguments.length,Be=new Array(Te>1?Te-1:0),je=1;je<Te;je++)Be[je-1]=arguments[je];g("error",ee,Be)}}function g(ee,Te,Be){{var je=h.ReactDebugCurrentFrame,hr=je.getStackAddendum();hr!==""&&(Te+="%s",Be=Be.concat([hr]));var Er=Be.map(function(fr){return String(fr)});Er.unshift("Warning: "+Te),Function.prototype.apply.call(console[ee],console,Er)}}var w=!1,x=!1,b=!1,A=!1,D=!1,S;S=Symbol.for("react.module.reference");function N(ee){return!!(typeof ee=="string"||typeof ee=="function"||ee===n||ee===i||D||ee===a||ee===l||ee===c||A||ee===v||w||x||b||typeof ee=="object"&&ee!==null&&(ee.$$typeof===p||ee.$$typeof===f||ee.$$typeof===o||ee.$$typeof===u||ee.$$typeof===s||ee.$$typeof===S||ee.getModuleId!==void 0))}function C(ee,Te,Be){var je=ee.displayName;if(je)return je;var hr=Te.displayName||Te.name||"";return hr!==""?Be+"("+hr+")":Be}function M(ee){return ee.displayName||"Context"}function B(ee){if(ee==null)return null;if(typeof ee.tag=="number"&&E("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof ee=="function")return ee.displayName||ee.name||null;if(typeof ee=="string")return ee;switch(ee){case n:return"Fragment";case t:return"Portal";case i:return"Profiler";case a:return"StrictMode";case l:return"Suspense";case c:return"SuspenseList"}if(typeof ee=="object")switch(ee.$$typeof){case u:var Te=ee;return M(Te)+".Consumer";case o:var Be=ee;return M(Be._context)+".Provider";case s:return C(ee,ee.render,"ForwardRef");case f:var je=ee.displayName||null;return je!==null?je:B(ee.type)||"Memo";case p:{var hr=ee,Er=hr._payload,fr=hr._init;try{return B(fr(Er))}catch{return null}}}return null}var P=Object.assign,R=0,_,O,U,F,q,Y,V;function z(){}z.__reactDisabledLog=!0;function J(){{if(R===0){_=console.log,O=console.info,U=console.warn,F=console.error,q=console.group,Y=console.groupCollapsed,V=console.groupEnd;var ee={configurable:!0,enumerable:!0,value:z,writable:!0};Object.defineProperties(console,{info:ee,log:ee,warn:ee,error:ee,group:ee,groupCollapsed:ee,groupEnd:ee})}R++}}function le(){{if(R--,R===0){var ee={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:P({},ee,{value:_}),info:P({},ee,{value:O}),warn:P({},ee,{value:U}),error:P({},ee,{value:F}),group:P({},ee,{value:q}),groupCollapsed:P({},ee,{value:Y}),groupEnd:P({},ee,{value:V})})}R<0&&E("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Q=h.ReactCurrentDispatcher,re;function se(ee,Te,Be){{if(re===void 0)try{throw Error()}catch(hr){var je=hr.stack.trim().match(/\n( *(at )?)/);re=je&&je[1]||""}return`
|
|
18
|
+
`+re+ee}}var te=!1,ae;{var fe=typeof WeakMap=="function"?WeakMap:Map;ae=new fe}function ne(ee,Te){if(!ee||te)return"";{var Be=ae.get(ee);if(Be!==void 0)return Be}var je;te=!0;var hr=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Er;Er=Q.current,Q.current=null,J();try{if(Te){var fr=function(){throw Error()};if(Object.defineProperty(fr.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(fr,[])}catch(or){je=or}Reflect.construct(ee,[],fr)}else{try{fr.call()}catch(or){je=or}ee.call(fr.prototype)}}else{try{throw Error()}catch(or){je=or}ee()}}catch(or){if(or&&je&&typeof or.stack=="string"){for(var ur=or.stack.split(`
|
|
19
|
+
`),Zr=je.stack.split(`
|
|
20
|
+
`),Rr=ur.length-1,Pr=Zr.length-1;Rr>=1&&Pr>=0&&ur[Rr]!==Zr[Pr];)Pr--;for(;Rr>=1&&Pr>=0;Rr--,Pr--)if(ur[Rr]!==Zr[Pr]){if(Rr!==1||Pr!==1)do if(Rr--,Pr--,Pr<0||ur[Rr]!==Zr[Pr]){var vt=`
|
|
21
|
+
`+ur[Rr].replace(" at new "," at ");return ee.displayName&&vt.includes("<anonymous>")&&(vt=vt.replace("<anonymous>",ee.displayName)),typeof ee=="function"&&ae.set(ee,vt),vt}while(Rr>=1&&Pr>=0);break}}}finally{te=!1,Q.current=Er,le(),Error.prepareStackTrace=hr}var Dn=ee?ee.displayName||ee.name:"",Nn=Dn?se(Dn):"";return typeof ee=="function"&&ae.set(ee,Nn),Nn}function be(ee,Te,Be){return ne(ee,!1)}function $e(ee){var Te=ee.prototype;return!!(Te&&Te.isReactComponent)}function k(ee,Te,Be){if(ee==null)return"";if(typeof ee=="function")return ne(ee,$e(ee));if(typeof ee=="string")return se(ee);switch(ee){case l:return se("Suspense");case c:return se("SuspenseList")}if(typeof ee=="object")switch(ee.$$typeof){case s:return be(ee.render);case f:return k(ee.type,Te,Be);case p:{var je=ee,hr=je._payload,Er=je._init;try{return k(Er(hr),Te,Be)}catch{}}}return""}var W=Object.prototype.hasOwnProperty,ue={},j=h.ReactDebugCurrentFrame;function K(ee){if(ee){var Te=ee._owner,Be=k(ee.type,ee._source,Te?Te.type:null);j.setExtraStackFrame(Be)}else j.setExtraStackFrame(null)}function oe(ee,Te,Be,je,hr){{var Er=Function.call.bind(W);for(var fr in ee)if(Er(ee,fr)){var ur=void 0;try{if(typeof ee[fr]!="function"){var Zr=Error((je||"React class")+": "+Be+" type `"+fr+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof ee[fr]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Zr.name="Invariant Violation",Zr}ur=ee[fr](Te,fr,je,Be,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Rr){ur=Rr}ur&&!(ur instanceof Error)&&(K(hr),E("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",je||"React class",Be,fr,typeof ur),K(null)),ur instanceof Error&&!(ur.message in ue)&&(ue[ur.message]=!0,K(hr),E("Failed %s type: %s",Be,ur.message),K(null))}}}var he=Array.isArray;function me(ee){return he(ee)}function I(ee){{var Te=typeof Symbol=="function"&&Symbol.toStringTag,Be=Te&&ee[Symbol.toStringTag]||ee.constructor.name||"Object";return Be}}function H(ee){try{return ie(ee),!1}catch{return!0}}function ie(ee){return""+ee}function ce(ee){if(H(ee))return E("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",I(ee)),ie(ee)}var ve=h.ReactCurrentOwner,de={key:!0,ref:!0,__self:!0,__source:!0},Se,xe,Me;Me={};function Ae(ee){if(W.call(ee,"ref")){var Te=Object.getOwnPropertyDescriptor(ee,"ref").get;if(Te&&Te.isReactWarning)return!1}return ee.ref!==void 0}function nr(ee){if(W.call(ee,"key")){var Te=Object.getOwnPropertyDescriptor(ee,"key").get;if(Te&&Te.isReactWarning)return!1}return ee.key!==void 0}function ir(ee,Te){if(typeof ee.ref=="string"&&ve.current&&Te&&ve.current.stateNode!==Te){var Be=B(ve.current.type);Me[Be]||(E('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',B(ve.current.type),ee.ref),Me[Be]=!0)}}function Ie(ee,Te){{var Be=function(){Se||(Se=!0,E("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",Te))};Be.isReactWarning=!0,Object.defineProperty(ee,"key",{get:Be,configurable:!0})}}function Or(ee,Te){{var Be=function(){xe||(xe=!0,E("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",Te))};Be.isReactWarning=!0,Object.defineProperty(ee,"ref",{get:Be,configurable:!0})}}var T=function(ee,Te,Be,je,hr,Er,fr){var ur={$$typeof:r,type:ee,key:Te,ref:Be,props:fr,_owner:Er};return ur._store={},Object.defineProperty(ur._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(ur,"_self",{configurable:!1,enumerable:!1,writable:!1,value:je}),Object.defineProperty(ur,"_source",{configurable:!1,enumerable:!1,writable:!1,value:hr}),Object.freeze&&(Object.freeze(ur.props),Object.freeze(ur)),ur};function X(ee,Te,Be,je,hr){{var Er,fr={},ur=null,Zr=null;Be!==void 0&&(ce(Be),ur=""+Be),nr(Te)&&(ce(Te.key),ur=""+Te.key),Ae(Te)&&(Zr=Te.ref,ir(Te,hr));for(Er in Te)W.call(Te,Er)&&!de.hasOwnProperty(Er)&&(fr[Er]=Te[Er]);if(ee&&ee.defaultProps){var Rr=ee.defaultProps;for(Er in Rr)fr[Er]===void 0&&(fr[Er]=Rr[Er])}if(ur||Zr){var Pr=typeof ee=="function"?ee.displayName||ee.name||"Unknown":ee;ur&&Ie(fr,Pr),Zr&&Or(fr,Pr)}return T(ee,ur,Zr,hr,je,ve.current,fr)}}var pe=h.ReactCurrentOwner,De=h.ReactDebugCurrentFrame;function Le(ee){if(ee){var Te=ee._owner,Be=k(ee.type,ee._source,Te?Te.type:null);De.setExtraStackFrame(Be)}else De.setExtraStackFrame(null)}var Ve;Ve=!1;function Wr(ee){return typeof ee=="object"&&ee!==null&&ee.$$typeof===r}function xa(){{if(pe.current){var ee=B(pe.current.type);if(ee)return`
|
|
22
|
+
|
|
23
|
+
Check the render method of \``+ee+"`."}return""}}function qu(ee){return""}var No={};function ku(ee){{var Te=xa();if(!Te){var Be=typeof ee=="string"?ee:ee.displayName||ee.name;Be&&(Te=`
|
|
24
|
+
|
|
25
|
+
Check the top-level render call using <`+Be+">.")}return Te}}function Co(ee,Te){{if(!ee._store||ee._store.validated||ee.key!=null)return;ee._store.validated=!0;var Be=ku(Te);if(No[Be])return;No[Be]=!0;var je="";ee&&ee._owner&&ee._owner!==pe.current&&(je=" It was passed a child from "+B(ee._owner.type)+"."),Le(ee),E('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',Be,je),Le(null)}}function Mo(ee,Te){{if(typeof ee!="object")return;if(me(ee))for(var Be=0;Be<ee.length;Be++){var je=ee[Be];Wr(je)&&Co(je,Te)}else if(Wr(ee))ee._store&&(ee._store.validated=!0);else if(ee){var hr=y(ee);if(typeof hr=="function"&&hr!==ee.entries)for(var Er=hr.call(ee),fr;!(fr=Er.next()).done;)Wr(fr.value)&&Co(fr.value,Te)}}}function Uu(ee){{var Te=ee.type;if(Te==null||typeof Te=="string")return;var Be;if(typeof Te=="function")Be=Te.propTypes;else if(typeof Te=="object"&&(Te.$$typeof===s||Te.$$typeof===f))Be=Te.propTypes;else return;if(Be){var je=B(Te);oe(Be,ee.props,"prop",je,ee)}else if(Te.PropTypes!==void 0&&!Ve){Ve=!0;var hr=B(Te);E("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",hr||"Unknown")}typeof Te.getDefaultProps=="function"&&!Te.getDefaultProps.isReactClassApproved&&E("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Hu(ee){{for(var Te=Object.keys(ee.props),Be=0;Be<Te.length;Be++){var je=Te[Be];if(je!=="children"&&je!=="key"){Le(ee),E("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",je),Le(null);break}}ee.ref!==null&&(Le(ee),E("Invalid attribute `ref` supplied to `React.Fragment`."),Le(null))}}function To(ee,Te,Be,je,hr,Er){{var fr=N(ee);if(!fr){var ur="";(ee===void 0||typeof ee=="object"&&ee!==null&&Object.keys(ee).length===0)&&(ur+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var Zr=qu();Zr?ur+=Zr:ur+=xa();var Rr;ee===null?Rr="null":me(ee)?Rr="array":ee!==void 0&&ee.$$typeof===r?(Rr="<"+(B(ee.type)||"Unknown")+" />",ur=" Did you accidentally export a JSX literal instead of a component?"):Rr=typeof ee,E("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Rr,ur)}var Pr=X(ee,Te,Be,hr,Er);if(Pr==null)return Pr;if(fr){var vt=Te.children;if(vt!==void 0)if(je)if(me(vt)){for(var Dn=0;Dn<vt.length;Dn++)Mo(vt[Dn],ee);Object.freeze&&Object.freeze(vt)}else E("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Mo(vt,ee)}return ee===n?Hu(Pr):Uu(Pr),Pr}}function ju(ee,Te,Be){return To(ee,Te,Be,!0)}function Vu(ee,Te,Be){return To(ee,Te,Be,!1)}var Gu=Vu,Wu=ju;_o.Fragment=n,_o.jsx=Gu,_o.jsxs=Wu}()),_o}process.env.NODE_ENV==="production"?Nl.exports=Jw():Nl.exports=Qw();var Et=Nl.exports;function Z1(e){var r,t,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(r=0;r<a;r++)e[r]&&(t=Z1(e[r]))&&(n&&(n+=" "),n+=t)}else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function pc(){for(var e,r,t=0,n="",a=arguments.length;t<a;t++)(e=arguments[t])&&(r=Z1(e))&&(n&&(n+=" "),n+=r);return n}var Y1={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},wp=$.createContext&&$.createContext(Y1),e3=["attr","size","title"];function r3(e,r){if(e==null)return{};var t=t3(e,r),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(r.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(t[n]=e[n])}return t}function t3(e,r){if(e==null)return{};var t={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(r.indexOf(n)>=0)continue;t[n]=e[n]}return t}function is(){return is=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},is.apply(this,arguments)}function Ep(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),t.push.apply(t,n)}return t}function os(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?Ep(Object(t),!0).forEach(function(n){n3(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ep(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function n3(e,r,t){return r=a3(r),r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function a3(e){var r=i3(e,"string");return typeof r=="symbol"?r:r+""}function i3(e,r){if(typeof e!="object"||!e)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var n=t.call(e,r||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function X1(e){return e&&e.map((r,t)=>$.createElement(r.tag,os({key:t},r.attr),X1(r.child)))}function Ce(e){return r=>$.createElement(o3,is({attr:os({},e.attr)},r),X1(e.child))}function o3(e){var r=t=>{var{attr:n,size:a,title:i}=e,o=r3(e,e3),u=a||t.size||"1em",s;return t.className&&(s=t.className),e.className&&(s=(s?s+" ":"")+e.className),$.createElement("svg",is({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},t.attr,n,o,{className:s,style:os(os({color:e.color||t.color},t.style),e.style),height:u,width:u,xmlns:"http://www.w3.org/2000/svg"}),i&&$.createElement("title",null,i),e.children)};return wp!==void 0?$.createElement(wp.Consumer,null,t=>r(t)):r(Y1)}function s3(e){return Ce({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M864 256H736v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zm-200 0H360v-72h304v72z"},child:[]}]})(e)}function Sp(e){return Ce({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M880 298.4H521L403.7 186.2a8.15 8.15 0 0 0-5.5-2.2H144c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V330.4c0-17.7-14.3-32-32-32z"},child:[]}]})(e)}function u3(e){return Ce({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M511.6 76.3C264.3 76.2 64 276.4 64 523.5 64 718.9 189.3 885 363.8 946c23.5 5.9 19.9-10.8 19.9-22.2v-77.5c-135.7 15.9-141.2-73.9-150.3-88.9C215 726 171.5 718 184.5 703c30.9-15.9 62.4 4 98.9 57.9 26.4 39.1 77.9 32.5 104 26 5.7-23.5 17.9-44.5 34.7-60.8-140.6-25.2-199.2-111-199.2-213 0-49.5 16.3-95 48.3-131.7-20.4-60.5 1.9-112.3 4.9-120 58.1-5.2 118.5 41.6 123.2 45.3 33-8.9 70.7-13.6 112.9-13.6 42.4 0 80.2 4.9 113.5 13.9 11.3-8.6 67.3-48.8 121.3-43.9 2.9 7.7 24.7 58.3 5.5 118 32.4 36.8 48.9 82.7 48.9 132.3 0 102.2-59 188.1-200 212.9a127.5 127.5 0 0 1 38.1 91v112.5c.8 9 0 17.9 15 17.9 177.1-59.7 304.6-227 304.6-424.1 0-247.2-200.4-447.3-447.5-447.3z"},child:[]}]})(e)}function l3(e){return Ce({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 0 1 0-96 48.01 48.01 0 0 1 0 96z"},child:[]}]})(e)}function c3(e){return Ce({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zM349.3 793.7H230.6V411.9h118.7v381.8zm-59.3-434a68.8 68.8 0 1 1 68.8-68.8c-.1 38-30.9 68.8-68.8 68.8zm503.7 434H675.1V608c0-44.3-.8-101.2-61.7-101.2-61.7 0-71.2 48.2-71.2 98v188.9H423.7V411.9h113.8v52.2h1.6c15.8-30 54.5-61.7 112.3-61.7 120.2 0 142.3 79.1 142.3 181.9v209.4z"},child:[]}]})(e)}function f3(e){return Ce({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M955.7 856l-416-720c-6.2-10.7-16.9-16-27.7-16s-21.6 5.3-27.7 16l-416 720C56 877.4 71.4 904 96 904h832c24.6 0 40-26.6 27.7-48zM480 416c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v184c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V416zm32 352a48.01 48.01 0 0 1 0-96 48.01 48.01 0 0 1 0 96z"},child:[]}]})(e)}function p3(e){return Ce({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"},child:[]}]})(e)}function v3(e){return Ce({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 0 0-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"},child:[]}]})(e)}function d3(e){return Ce({tag:"svg",attr:{viewBox:"0 0 1024 1024",fill:"currentColor",fillRule:"evenodd"},child:[{tag:"path",attr:{d:"M799.855 166.312c.023.007.043.018.084.059l57.69 57.69c.041.041.052.06.059.084a.118.118 0 0 1 0 .069c-.007.023-.018.042-.059.083L569.926 512l287.703 287.703c.041.04.052.06.059.083a.118.118 0 0 1 0 .07c-.007.022-.018.042-.059.083l-57.69 57.69c-.041.041-.06.052-.084.059a.118.118 0 0 1-.069 0c-.023-.007-.042-.018-.083-.059L512 569.926 224.297 857.629c-.04.041-.06.052-.083.059a.118.118 0 0 1-.07 0c-.022-.007-.042-.018-.083-.059l-57.69-57.69c-.041-.041-.052-.06-.059-.084a.118.118 0 0 1 0-.069c.007-.023.018-.042.059-.083L454.073 512 166.371 224.297c-.041-.04-.052-.06-.059-.083a.118.118 0 0 1 0-.07c.007-.022.018-.042.059-.083l57.69-57.69c.041-.041.06-.052.084-.059a.118.118 0 0 1 .069 0c.023.007.042.018.083.059L512 454.073l287.703-287.702c.04-.041.06-.052.083-.059a.118.118 0 0 1 .07 0Z"},child:[]}]})(e)}function m3(e){return Ce({tag:"svg",attr:{t:"1569683683230",viewBox:"0 0 1024 1024",version:"1.1"},child:[{tag:"defs",attr:{},child:[]},{tag:"path",attr:{d:"M342 88H120c-17.7 0-32 14.3-32 32v224c0 8.8 7.2 16 16 16h48c8.8 0 16-7.2 16-16V168h174c8.8 0 16-7.2 16-16v-48c0-8.8-7.2-16-16-16zM920 664h-48c-8.8 0-16 7.2-16 16v176H682c-8.8 0-16 7.2-16 16v48c0 8.8 7.2 16 16 16h222c17.7 0 32-14.3 32-32V680c0-8.8-7.2-16-16-16zM342 856H168V680c0-8.8-7.2-16-16-16h-48c-8.8 0-16 7.2-16 16v224c0 17.7 14.3 32 32 32h222c8.8 0 16-7.2 16-16v-48c0-8.8-7.2-16-16-16zM904 88H682c-8.8 0-16 7.2-16 16v48c0 8.8 7.2 16 16 16h174v176c0 8.8 7.2 16 16 16h48c8.8 0 16-7.2 16-16V120c0-17.7-14.3-32-32-32z"},child:[]}]})(e)}function h3(e){return Ce({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 0 0-94.3-139.9 437.71 437.71 0 0 0-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"},child:[]}]})(e)}function g3(e){return Ce({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M872 474H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h720c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"},child:[]}]})(e)}function y3(e){return Ce({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M168 504.2c1-43.7 10-86.1 26.9-126 17.3-41 42.1-77.7 73.7-109.4S337 212.3 378 195c42.4-17.9 87.4-27 133.9-27s91.5 9.1 133.8 27A341.5 341.5 0 0 1 755 268.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 0 0 3 14.1l175.7 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c0-6.7-7.7-10.5-12.9-6.3l-56.4 44.1C765.8 155.1 646.2 92 511.8 92 282.7 92 96.3 275.6 92 503.8a8 8 0 0 0 8 8.2h60c4.4 0 7.9-3.5 8-7.8zm756 7.8h-60c-4.4 0-7.9 3.5-8 7.8-1 43.7-10 86.1-26.9 126-17.3 41-42.1 77.8-73.7 109.4A342.45 342.45 0 0 1 512.1 856a342.24 342.24 0 0 1-243.2-100.8c-9.9-9.9-19.2-20.4-27.8-31.4l60.2-47a8 8 0 0 0-3-14.1l-175.7-43c-5-1.2-9.9 2.6-9.9 7.7l-.7 181c0 6.7 7.7 10.5 12.9 6.3l56.4-44.1C258.2 868.9 377.8 932 512.2 932c229.2 0 415.5-183.7 419.8-411.8a8 8 0 0 0-8-8.2z"},child:[]}]})(e)}function b3(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M20.005 5.995h-1v2h1v8h-1v2h1c1.103 0 2-.897 2-2v-8c0-1.102-.898-2-2-2zm-14 4H15v4H6.005z"},child:[]},{tag:"path",attr:{d:"M17.005 17.995V4H20V2h-8v2h3.005v1.995h-11c-1.103 0-2 .897-2 2v8c0 1.103.897 2 2 2h11V20H12v2h8v-2h-2.995v-2.005zm-13-2v-8h11v8h-11z"},child:[]}]})(e)}function x3(e){return Ce({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M2 6a6 6 0 1 1 10.174 4.31c-.203.196-.359.4-.453.619l-.762 1.769A.5.5 0 0 1 10.5 13h-5a.5.5 0 0 1-.46-.302l-.761-1.77a2 2 0 0 0-.453-.618A5.98 5.98 0 0 1 2 6m3 8.5a.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 0 1l-.224.447a1 1 0 0 1-.894.553H6.618a1 1 0 0 1-.894-.553L5.5 15a.5.5 0 0 1-.5-.5"},child:[]}]})(e)}function w3(e){return Ce({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M7.27 2.047a1 1 0 0 1 1.46 0l6.345 6.77c.6.638.146 1.683-.73 1.683H11.5v3a1 1 0 0 1-1 1h-5a1 1 0 0 1-1-1v-3H1.654C.78 10.5.326 9.455.924 8.816z"},child:[]}]})(e)}function E3(e){return Ce({tag:"svg",attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M318.7 268.7c-.2-36.7 16.4-64.4 50-84.8-18.8-26.9-47.2-41.7-84.7-44.6-35.5-2.8-74.3 20.7-88.5 20.7-15 0-49.4-19.7-76.4-19.7C63.3 141.2 4 184.8 4 273.5q0 39.3 14.4 81.2c12.8 36.7 59 126.7 107.2 125.2 25.2-.6 43-17.9 75.8-17.9 31.8 0 48.3 17.9 76.4 17.9 48.6-.7 90.4-82.5 102.6-119.3-65.2-30.7-61.7-90-61.7-91.9zm-56.6-164.2c27.3-32.4 24.8-61.9 24-72.5-24.1 1.4-52 16.4-67.9 34.9-17.5 19.8-27.8 44.3-25.6 71.9 26.1 2 49.9-11.4 69.5-34.3z"},child:[]}]})(e)}function S3(e){return Ce({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M349.9 236.3h-66.1v-59.4h66.1v59.4zm0-204.3h-66.1v60.7h66.1V32zm78.2 144.8H362v59.4h66.1v-59.4zm-156.3-72.1h-66.1v60.1h66.1v-60.1zm78.1 0h-66.1v60.1h66.1v-60.1zm276.8 100c-14.4-9.7-47.6-13.2-73.1-8.4-3.3-24-16.7-44.9-41.1-63.7l-14-9.3-9.3 14c-18.4 27.8-23.4 73.6-3.7 103.8-8.7 4.7-25.8 11.1-48.4 10.7H2.4c-8.7 50.8 5.8 116.8 44 162.1 37.1 43.9 92.7 66.2 165.4 66.2 157.4 0 273.9-72.5 328.4-204.2 21.4.4 67.6.1 91.3-45.2 1.5-2.5 6.6-13.2 8.5-17.1l-13.3-8.9zm-511.1-27.9h-66v59.4h66.1v-59.4zm78.1 0h-66.1v59.4h66.1v-59.4zm78.1 0h-66.1v59.4h66.1v-59.4zm-78.1-72.1h-66.1v60.1h66.1v-60.1z"},child:[]}]})(e)}function A3(e){return Ce({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M220.8 123.3c1 .5 1.8 1.7 3 1.7 1.1 0 2.8-.4 2.9-1.5.2-1.4-1.9-2.3-3.2-2.9-1.7-.7-3.9-1-5.5-.1-.4.2-.8.7-.6 1.1.3 1.3 2.3 1.1 3.4 1.7zm-21.9 1.7c1.2 0 2-1.2 3-1.7 1.1-.6 3.1-.4 3.5-1.6.2-.4-.2-.9-.6-1.1-1.6-.9-3.8-.6-5.5.1-1.3.6-3.4 1.5-3.2 2.9.1 1 1.8 1.5 2.8 1.4zM420 403.8c-3.6-4-5.3-11.6-7.2-19.7-1.8-8.1-3.9-16.8-10.5-22.4-1.3-1.1-2.6-2.1-4-2.9-1.3-.8-2.7-1.5-4.1-2 9.2-27.3 5.6-54.5-3.7-79.1-11.4-30.1-31.3-56.4-46.5-74.4-17.1-21.5-33.7-41.9-33.4-72C311.1 85.4 315.7.1 234.8 0 132.4-.2 158 103.4 156.9 135.2c-1.7 23.4-6.4 41.8-22.5 64.7-18.9 22.5-45.5 58.8-58.1 96.7-6 17.9-8.8 36.1-6.2 53.3-6.5 5.8-11.4 14.7-16.6 20.2-4.2 4.3-10.3 5.9-17 8.3s-14 6-18.5 14.5c-2.1 3.9-2.8 8.1-2.8 12.4 0 3.9.6 7.9 1.2 11.8 1.2 8.1 2.5 15.7.8 20.8-5.2 14.4-5.9 24.4-2.2 31.7 3.8 7.3 11.4 10.5 20.1 12.3 17.3 3.6 40.8 2.7 59.3 12.5 19.8 10.4 39.9 14.1 55.9 10.4 11.6-2.6 21.1-9.6 25.9-20.2 12.5-.1 26.3-5.4 48.3-6.6 14.9-1.2 33.6 5.3 55.1 4.1.6 2.3 1.4 4.6 2.5 6.7v.1c8.3 16.7 23.8 24.3 40.3 23 16.6-1.3 34.1-11 48.3-27.9 13.6-16.4 36-23.2 50.9-32.2 7.4-4.5 13.4-10.1 13.9-18.3.4-8.2-4.4-17.3-15.5-29.7zM223.7 87.3c9.8-22.2 34.2-21.8 44-.4 6.5 14.2 3.6 30.9-4.3 40.4-1.6-.8-5.9-2.6-12.6-4.9 1.1-1.2 3.1-2.7 3.9-4.6 4.8-11.8-.2-27-9.1-27.3-7.3-.5-13.9 10.8-11.8 23-4.1-2-9.4-3.5-13-4.4-1-6.9-.3-14.6 2.9-21.8zM183 75.8c10.1 0 20.8 14.2 19.1 33.5-3.5 1-7.1 2.5-10.2 4.6 1.2-8.9-3.3-20.1-9.6-19.6-8.4.7-9.8 21.2-1.8 28.1 1 .8 1.9-.2-5.9 5.5-15.6-14.6-10.5-52.1 8.4-52.1zm-13.6 60.7c6.2-4.6 13.6-10 14.1-10.5 4.7-4.4 13.5-14.2 27.9-14.2 7.1 0 15.6 2.3 25.9 8.9 6.3 4.1 11.3 4.4 22.6 9.3 8.4 3.5 13.7 9.7 10.5 18.2-2.6 7.1-11 14.4-22.7 18.1-11.1 3.6-19.8 16-38.2 14.9-3.9-.2-7-1-9.6-2.1-8-3.5-12.2-10.4-20-15-8.6-4.8-13.2-10.4-14.7-15.3-1.4-4.9 0-9 4.2-12.3zm3.3 334c-2.7 35.1-43.9 34.4-75.3 18-29.9-15.8-68.6-6.5-76.5-21.9-2.4-4.7-2.4-12.7 2.6-26.4v-.2c2.4-7.6.6-16-.6-23.9-1.2-7.8-1.8-15 .9-20 3.5-6.7 8.5-9.1 14.8-11.3 10.3-3.7 11.8-3.4 19.6-9.9 5.5-5.7 9.5-12.9 14.3-18 5.1-5.5 10-8.1 17.7-6.9 8.1 1.2 15.1 6.8 21.9 16l19.6 35.6c9.5 19.9 43.1 48.4 41 68.9zm-1.4-25.9c-4.1-6.6-9.6-13.6-14.4-19.6 7.1 0 14.2-2.2 16.7-8.9 2.3-6.2 0-14.9-7.4-24.9-13.5-18.2-38.3-32.5-38.3-32.5-13.5-8.4-21.1-18.7-24.6-29.9s-3-23.3-.3-35.2c5.2-22.9 18.6-45.2 27.2-59.2 2.3-1.7.8 3.2-8.7 20.8-8.5 16.1-24.4 53.3-2.6 82.4.6-20.7 5.5-41.8 13.8-61.5 12-27.4 37.3-74.9 39.3-112.7 1.1.8 4.6 3.2 6.2 4.1 4.6 2.7 8.1 6.7 12.6 10.3 12.4 10 28.5 9.2 42.4 1.2 6.2-3.5 11.2-7.5 15.9-9 9.9-3.1 17.8-8.6 22.3-15 7.7 30.4 25.7 74.3 37.2 95.7 6.1 11.4 18.3 35.5 23.6 64.6 3.3-.1 7 .4 10.9 1.4 13.8-35.7-11.7-74.2-23.3-84.9-4.7-4.6-4.9-6.6-2.6-6.5 12.6 11.2 29.2 33.7 35.2 59 2.8 11.6 3.3 23.7.4 35.7 16.4 6.8 35.9 17.9 30.7 34.8-2.2-.1-3.2 0-4.2 0 3.2-10.1-3.9-17.6-22.8-26.1-19.6-8.6-36-8.6-38.3 12.5-12.1 4.2-18.3 14.7-21.4 27.3-2.8 11.2-3.6 24.7-4.4 39.9-.5 7.7-3.6 18-6.8 29-32.1 22.9-76.7 32.9-114.3 7.2zm257.4-11.5c-.9 16.8-41.2 19.9-63.2 46.5-13.2 15.7-29.4 24.4-43.6 25.5s-26.5-4.8-33.7-19.3c-4.7-11.1-2.4-23.1 1.1-36.3 3.7-14.2 9.2-28.8 9.9-40.6.8-15.2 1.7-28.5 4.2-38.7 2.6-10.3 6.6-17.2 13.7-21.1.3-.2.7-.3 1-.5.8 13.2 7.3 26.6 18.8 29.5 12.6 3.3 30.7-7.5 38.4-16.3 9-.3 15.7-.9 22.6 5.1 9.9 8.5 7.1 30.3 17.1 41.6 10.6 11.6 14 19.5 13.7 24.6zM173.3 148.7c2 1.9 4.7 4.5 8 7.1 6.6 5.2 15.8 10.6 27.3 10.6 11.6 0 22.5-5.9 31.8-10.8 4.9-2.6 10.9-7 14.8-10.4s5.9-6.3 3.1-6.6-2.6 2.6-6 5.1c-4.4 3.2-9.7 7.4-13.9 9.8-7.4 4.2-19.5 10.2-29.9 10.2s-18.7-4.8-24.9-9.7c-3.1-2.5-5.7-5-7.7-6.9-1.5-1.4-1.9-4.6-4.3-4.9-1.4-.1-1.8 3.7 1.7 6.5z"},child:[]}]})(e)}function K1(e){return Ce({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M0 93.7l183.6-25.3v177.4H0V93.7zm0 324.6l183.6 25.3V268.4H0v149.9zm203.8 28L448 480V268.4H203.8v177.9zm0-380.6v180.1H448V32L203.8 65.7z"},child:[]}]})(e)}function D3(e){return Ce({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M368 32h-96c-17.67 0-32 14.33-32 32v96c0 17.67 14.33 32 32 32h96c17.67 0 32-14.33 32-32V64c0-17.67-14.33-32-32-32zM208 88h-84.75C113.75 64.56 90.84 48 64 48 28.66 48 0 76.65 0 112s28.66 64 64 64c26.84 0 49.75-16.56 59.25-40h79.73c-55.37 32.52-95.86 87.32-109.54 152h49.4c11.3-41.61 36.77-77.21 71.04-101.56-3.7-8.08-5.88-16.99-5.88-26.44V88zm-48 232H64c-17.67 0-32 14.33-32 32v96c0 17.67 14.33 32 32 32h96c17.67 0 32-14.33 32-32v-96c0-17.67-14.33-32-32-32zM576 48c-26.84 0-49.75 16.56-59.25 40H432v72c0 9.45-2.19 18.36-5.88 26.44 34.27 24.35 59.74 59.95 71.04 101.56h49.4c-13.68-64.68-54.17-119.48-109.54-152h79.73c9.5 23.44 32.41 40 59.25 40 35.34 0 64-28.65 64-64s-28.66-64-64-64zm0 272h-96c-17.67 0-32 14.33-32 32v96c0 17.67 14.33 32 32 32h96c17.67 0 32-14.33 32-32v-96c0-17.67-14.33-32-32-32z"},child:[]}]})(e)}function Ap(e){return Ce({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M16 128h416c8.84 0 16-7.16 16-16V48c0-8.84-7.16-16-16-16H16C7.16 32 0 39.16 0 48v64c0 8.84 7.16 16 16 16zm480 80H80c-8.84 0-16 7.16-16 16v64c0 8.84 7.16 16 16 16h416c8.84 0 16-7.16 16-16v-64c0-8.84-7.16-16-16-16zm-64 176H16c-8.84 0-16 7.16-16 16v64c0 8.84 7.16 16 16 16h416c8.84 0 16-7.16 16-16v-64c0-8.84-7.16-16-16-16z"},child:[]}]})(e)}function N3(e){return Ce({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M32 96v64h448V96H32zm0 128v64h448v-64H32zm0 128v64h448v-64H32z"},child:[]}]})(e)}function C3(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",strokeWidth:"2",d:"M22,12 C22,12 19.0000009,15.0000004 13.0000004,21.0000004 C6.99999996,27.0000004 -2.00000007,18.0000004 3.99999994,12.0000004 C9.99999996,6.00000037 9,7.00000011 13,3.00000008 C17,-0.999999955 23,4.99999994 19,9.00000005 C15,13.0000002 12.0000004,16.0000007 9.99999995,18.0000004 C7.99999952,20 5,17 6.99999995,15.0000004 C8.99999991,13.0000007 16,6 16,6"},child:[]}]})(e)}function M3(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",strokeWidth:"2",d:"M15,5 L17,5 L17,3 L15,3 L15,5 Z M7,5 L9,5 L9,3 L7,3 L7,5 Z M15,13 L17,13 L17,11 L15,11 L15,13 Z M7,13 L9,13 L9,11 L7,11 L7,13 Z M15,21 L17,21 L17,19 L15,19 L15,21 Z M7,21 L9,21 L9,19 L7,19 L7,21 Z"},child:[]}]})(e)}function T3(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",strokeWidth:"2",d:"M8.5,5.5 L12,2 L15.5,5.5 M22,12 L2,12 M5.5,8.5 L2,12 L5.5,15.5 M18.5,15.5 L22,12 L18.5,8.5 M12,22 L12,2 M8.5,18.5 L12,22 L15.5,18.5"},child:[]}]})(e)}function O3(e){return Ce({tag:"svg",attr:{viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M3 17a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zm3.293-7.707a1 1 0 011.414 0L9 10.586V3a1 1 0 112 0v7.586l1.293-1.293a1 1 0 111.414 1.414l-3 3a1 1 0 01-1.414 0l-3-3a1 1 0 010-1.414z",clipRule:"evenodd"},child:[]}]})(e)}function _3(e){return Ce({tag:"svg",attr:{viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M11.3 1.046A1 1 0 0112 2v5h4a1 1 0 01.82 1.573l-7 10A1 1 0 018 18v-5H4a1 1 0 01-.82-1.573l7-10a1 1 0 011.12-.38z",clipRule:"evenodd"},child:[]}]})(e)}function $3(e){return Ce({tag:"svg",attr:{fill:"none",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4v16m8-8H4"},child:[]}]})(e)}function F3(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{d:"M11.644 1.59a.75.75 0 0 1 .712 0l9.75 5.25a.75.75 0 0 1 0 1.32l-9.75 5.25a.75.75 0 0 1-.712 0l-9.75-5.25a.75.75 0 0 1 0-1.32l9.75-5.25Z"},child:[]},{tag:"path",attr:{d:"m3.265 10.602 7.668 4.129a2.25 2.25 0 0 0 2.134 0l7.668-4.13 1.37.739a.75.75 0 0 1 0 1.32l-9.75 5.25a.75.75 0 0 1-.71 0l-9.75-5.25a.75.75 0 0 1 0-1.32l1.37-.738Z"},child:[]},{tag:"path",attr:{d:"m10.933 19.231-7.668-4.13-1.37.739a.75.75 0 0 0 0 1.32l9.75 5.25c.221.12.489.12.71 0l9.75-5.25a.75.75 0 0 0 0-1.32l-1.37-.738-7.668 4.13a2.25 2.25 0 0 1-2.134-.001Z"},child:[]}]})(e)}function B3(e){return Ce({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 388c-72.597 0-132-59.405-132-132 0-72.601 59.403-132 132-132 36.3 0 69.299 15.4 92.406 39.601L278 234h154V80l-51.698 51.702C348.406 99.798 304.406 80 256 80c-96.797 0-176 79.203-176 176s78.094 176 176 176c81.045 0 148.287-54.134 169.401-128H378.85c-18.745 49.561-67.138 84-122.85 84z"},child:[]}]})(e)}function R3(e){return Ce({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 48c-67.61.29-117.87 9.6-154.24 25.69-27.14 12-37.76 21.08-37.76 51.84V448c41.57-37.5 78.46-48 224-48V48zM48 48c67.61.29 117.87 9.6 154.24 25.69 27.14 12 37.76 21.08 37.76 51.84V448c-41.57-37.5-78.46-48-224-48V48z"},child:[]}]})(e)}function P3(e){return Ce({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M456 480H136a24 24 0 0 1-24-24V128a16 16 0 0 1 16-16h328a24 24 0 0 1 24 24v320a24 24 0 0 1-24 24z"},child:[]},{tag:"path",attr:{d:"M112 80h288V56a24 24 0 0 0-24-24H60a28 28 0 0 0-28 28v316a24 24 0 0 0 24 24h24V112a32 32 0 0 1 32-32z"},child:[]}]})(e)}function z3(e){return Ce({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 48C141.13 48 48 141.13 48 256s93.13 208 208 208 208-93.13 208-208S370.87 48 256 48zm96 240h-96a16 16 0 0 1-16-16V128a16 16 0 0 1 32 0v128h80a16 16 0 0 1 0 32z"},child:[]}]})(e)}function I3(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0zm0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m12.126 8.125 1.937-1.937 3.747 3.747-1.937 1.938zM20.71 5.63l-2.34-2.34a1 1 0 0 0-1.41 0l-1.83 1.83 3.75 3.75L20.71 7a1 1 0 0 0 0-1.37zM2 5l6.63 6.63L3 17.25V21h3.75l5.63-5.62L18 21l2-2L4 3 2 5z"},child:[]}]})(e)}function L3(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M17.63 5.84C17.27 5.33 16.67 5 16 5L5 5.01C3.9 5.01 3 5.9 3 7v10c0 1.1.9 1.99 2 1.99L16 19c.67 0 1.27-.33 1.63-.84L22 12l-4.37-6.16z"},child:[]}]})(e)}function q3(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M19 7h-8v6h8V7zm2-4H3c-1.1 0-2 .9-2 2v14c0 1.1.9 1.98 2 1.98h18c1.1 0 2-.88 2-1.98V5c0-1.1-.9-2-2-2zm0 16.01H3V4.98h18v14.03z"},child:[]}]})(e)}function k3(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M11.07 12.85c.77-1.39 2.25-2.21 3.11-3.44.91-1.29.4-3.7-2.18-3.7-1.69 0-2.52 1.28-2.87 2.34L6.54 6.96C7.25 4.83 9.18 3 11.99 3c2.35 0 3.96 1.07 4.78 2.41.7 1.15 1.11 3.3.03 4.9-1.2 1.77-2.35 2.31-2.97 3.45-.25.46-.35.76-.35 2.24h-2.89c-.01-.78-.13-2.05.48-3.15zM14 20c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2z"},child:[]}]})(e)}function U3(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M7.76 16.24C6.67 15.16 6 13.66 6 12s.67-3.16 1.76-4.24l1.42 1.42C8.45 9.9 8 10.9 8 12c0 1.1.45 2.1 1.17 2.83l-1.41 1.41zm8.48 0C17.33 15.16 18 13.66 18 12s-.67-3.16-1.76-4.24l-1.42 1.42C15.55 9.9 16 10.9 16 12c0 1.1-.45 2.1-1.17 2.83l1.41 1.41zM12 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm8 2c0 2.21-.9 4.21-2.35 5.65l1.42 1.42C20.88 17.26 22 14.76 22 12s-1.12-5.26-2.93-7.07l-1.42 1.42A7.94 7.94 0 0 1 20 12zM6.35 6.35 4.93 4.93C3.12 6.74 2 9.24 2 12s1.12 5.26 2.93 7.07l1.42-1.42C4.9 16.21 4 14.21 4 12s.9-4.21 2.35-5.65z"},child:[]}]})(e)}function H3(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M24 24H0V0h24v24z"},child:[]},{tag:"circle",attr:{cx:"12",cy:"12",r:"8"},child:[]}]})(e)}function j3(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M6 19h4V5H6v14zm8-14v14h4V5h-4z"},child:[]}]})(e)}function V3(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M8 5v14l11-7z"},child:[]}]})(e)}function G3(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M21 8c-1.45 0-2.26 1.44-1.93 2.51l-3.55 3.56c-.3-.09-.74-.09-1.04 0l-2.55-2.55C12.27 10.45 11.46 9 10 9c-1.45 0-2.27 1.44-1.93 2.52l-4.56 4.55C2.44 15.74 1 16.55 1 18c0 1.1.9 2 2 2 1.45 0 2.26-1.44 1.93-2.51l4.55-4.56c.3.09.74.09 1.04 0l2.55 2.55C12.73 16.55 13.54 18 15 18c1.45 0 2.27-1.44 1.93-2.52l3.56-3.55c1.07.33 2.51-.48 2.51-1.93 0-1.1-.9-2-2-2z"},child:[]},{tag:"path",attr:{d:"m15 9 .94-2.07L18 6l-2.06-.93L15 3l-.92 2.07L12 6l2.08.93zM3.5 11 4 9l2-.5L4 8l-.5-2L3 8l-2 .5L3 9z"},child:[]}]})(e)}function W3(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"},child:[]}]})(e)}function Z3(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M19 12v7H5v-7H3v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7h-2zm-6 .67 2.59-2.58L17 11.5l-5 5-5-5 1.41-1.41L11 12.67V3h2z"},child:[]}]})(e)}function Y3(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m17.66 17.66-1.06 1.06-.71-.71 1.06-1.06-1.94-1.94-1.06 1.06-.71-.71 1.06-1.06-1.94-1.94-1.06 1.06-.71-.71 1.06-1.06L9.7 9.7l-1.06 1.06-.71-.71 1.06-1.06-1.94-1.94-1.06 1.06-.71-.71 1.06-1.06L4 4v14c0 1.1.9 2 2 2h14l-2.34-2.34zM7 17v-5.76L12.76 17H7z"},child:[]}]})(e)}function X3(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M11 2h2v5h8v3h-8v4h5v3h-5v5h-2v-5H6v-3h5v-4H3V7h8z"},child:[]}]})(e)}function K3(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M4 22H2V2h2v20zM22 7H6v3h16V7zm-6 7H6v3h10v-3z"},child:[]}]})(e)}function J3(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M20 2h2v20h-2V2zM2 10h16V7H2v3zm6 7h10v-3H8v3z"},child:[]}]})(e)}function Q3(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M22 22H2v-2h20v2zM10 2H7v16h3V2zm7 6h-3v10h3V8z"},child:[]}]})(e)}function e4(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M22 11h-5V6h-3v5h-4V3H7v8H1.84v2H7v8h3v-8h4v5h3v-5h5z"},child:[]}]})(e)}function r4(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M22 2v2H2V2h20zM7 22h3V6H7v16zm7-6h3V6h-3v10z"},child:[]}]})(e)}function t4(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M3 13v7h18v-1.5l-9-7L8 17l-5-4zm0-6 4 3 5-7 5 4h4v8.97l-9.4-7.31-3.98 5.48L3 10.44V7z"},child:[]}]})(e)}function n4(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M6 13c-2.2 0-4 1.8-4 4s1.8 4 4 4 4-1.8 4-4-1.8-4-4-4zm6-10C9.8 3 8 4.8 8 7s1.8 4 4 4 4-1.8 4-4-1.8-4-4-4zm6 10c-2.2 0-4 1.8-4 4s1.8 4 4 4 4-1.8 4-4-1.8-4-4-4z"},child:[]}]})(e)}function a4(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M21 4H3c-1.1 0-2 .9-2 2v13c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zM7 12v2H5v-2h2zm-2-2V8h2v2H5zm6 2v2H9v-2h2zm-2-2V8h2v2H9zm7 6v1H8v-1h8zm-1-4v2h-2v-2h2zm-2-2V8h2v2h-2zm4 4v-2h2v2h-2zm2-4h-2V8h2v2z"},child:[]}]})(e)}function i4(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"},child:[]}]})(e)}function o4(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M15.41 16.59 10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"},child:[]}]})(e)}function s4(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"},child:[]}]})(e)}function u4(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M7.41 15.41 12 10.83l4.59 4.58L18 14l-6-6-6 6z"},child:[]}]})(e)}function l4(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M21 11H6.83l3.58-3.59L9 6l-6 6 6 6 1.41-1.41L6.83 13H21z"},child:[]}]})(e)}function c4(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 8.41 16.59 13 18 11.59l-6-6-6 6L7.41 13 12 8.41zM6 18h12v-2H6v2z"},child:[]}]})(e)}function f4(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M17.5 3C15.57 3 14 4.57 14 6.5V8h-4V6.5C10 4.57 8.43 3 6.5 3S3 4.57 3 6.5 4.57 10 6.5 10H8v4H6.5C4.57 14 3 15.57 3 17.5S4.57 21 6.5 21s3.5-1.57 3.5-3.5V16h4v1.5c0 1.93 1.57 3.5 3.5 3.5s3.5-1.57 3.5-3.5-1.57-3.5-3.5-3.5H16v-4h1.5c1.93 0 3.5-1.57 3.5-3.5S19.43 3 17.5 3zM16 8V6.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5S18.33 8 17.5 8H16zM6.5 8C5.67 8 5 7.33 5 6.5S5.67 5 6.5 5 8 5.67 8 6.5V8H6.5zm3.5 6v-4h4v4h-4zm7.5 5c-.83 0-1.5-.67-1.5-1.5V16h1.5c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5zm-11 0c-.83 0-1.5-.67-1.5-1.5S5.67 16 6.5 16H8v1.5c0 .83-.67 1.5-1.5 1.5z"},child:[]}]})(e)}function p4(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m5 12 1.41 1.41L12 7.83l5.59 5.58L19 12l-7-7z"},child:[]}]})(e)}function v4(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M20 3H4c-1.1 0-1.99.9-1.99 2L2 15c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-9 3h2v2h-2V6zm0 3h2v2h-2V9zM8 6h2v2H8V6zm0 3h2v2H8V9zm-1 2H5V9h2v2zm0-3H5V6h2v2zm9 7H8v-2h8v2zm0-4h-2V9h2v2zm0-3h-2V6h2v2zm3 3h-2V9h2v2zm0-3h-2V6h2v2zm-7 15 4-4H8l4 4z"},child:[]}]})(e)}function d4(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M15 5h6v2h-6zM9 5H3v2h4.85l6.92 12H21v-2h-5.07z"},child:[]}]})(e)}function m4(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M19 7v4H5.83l3.58-3.59L8 6l-6 6 6 6 1.41-1.41L5.83 13H21V7z"},child:[]}]})(e)}function h4(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M11.59 7.41 15.17 11H1v2h14.17l-3.59 3.59L13 18l6-6-6-6-1.41 1.41zM20 6v12h2V6h-2z"},child:[]}]})(e)}function g4(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m19 9 1.25-2.75L23 5l-2.75-1.25L19 1l-1.25 2.75L15 5l2.75 1.25L19 9zm-7.5.5L9 4 6.5 9.5 1 12l5.5 2.5L9 20l2.5-5.5L17 12l-5.5-2.5zM19 15l-1.25 2.75L15 19l2.75 1.25L19 23l1.25-2.75L23 19l-2.75-1.25L19 15z"},child:[]}]})(e)}function y4(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04a.996.996 0 0 0 0-1.41l-2.34-2.34a.996.996 0 0 0-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"},child:[]}]})(e)}function b4(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m18 3-3 3V3H9C6.24 3 4 5.24 4 8h5v3h6V8l3 3h2V3h-2zM9 13v7c0 .55.45 1 1 1h4c.55 0 1-.45 1-1v-7H9z"},child:[]}]})(e)}function x4(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"},child:[]}]})(e)}function w4(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zm3.3 14.71L11 12.41V7h2v4.59l3.71 3.71-1.42 1.41z"},child:[]}]})(e)}function E4(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 2v3H5V5h14zm0 5v4H5v-4h14zM5 19v-3h14v3H5z"},child:[]}]})(e)}function S4(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0zm0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"m17 16-4-4V8.82C14.16 8.4 15 7.3 15 6c0-1.66-1.34-3-3-3S9 4.34 9 6c0 1.3.84 2.4 2 2.82V12l-4 4H3v5h5v-3.05l4-4.2 4 4.2V21h5v-5h-4z"},child:[]}]})(e)}function A4(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M2.81 2.81 1.39 4.22l2.27 2.27A9.91 9.91 0 0 0 2 12c0 5.52 4.48 10 10 10 2.04 0 3.93-.61 5.51-1.66l2.27 2.27 1.41-1.42L2.81 2.81zM12 20c-4.41 0-8-3.59-8-8 0-1.48.41-2.86 1.12-4.06l10.93 10.94A7.869 7.869 0 0 1 12 20zM12 4c4.41 0 8 3.59 8 8 0 1.48-.41 2.86-1.12 4.05l1.45 1.45A9.782 9.782 0 0 0 22 12c0-5.52-4.48-10-10-10-2.04 0-3.93.61-5.51 1.66l1.45 1.45C9.14 4.41 10.52 4 12 4z"},child:[]}]})(e)}function D4(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m2.88 7.88 1.54 1.54C4.15 10.23 4 11.1 4 12c0 4.41 3.59 8 8 8s8-3.59 8-8-3.59-8-8-8c-.9 0-1.77.15-2.58.42L7.89 2.89C9.15 2.32 10.54 2 12 2c5.52 0 10 4.48 10 10s-4.48 10-10 10S2 17.52 2 12c0-1.47.32-2.86.88-4.12zM7 5.5C7 6.33 6.33 7 5.5 7S4 6.33 4 5.5 4.67 4 5.5 4 7 4.67 7 5.5z"},child:[]}]})(e)}function N4(e){return Ce({tag:"svg",attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M216.49,168.49a12,12,0,0,1-17,0L128,97,56.49,168.49a12,12,0,0,1-17-17l80-80a12,12,0,0,1,17,0l80,80A12,12,0,0,1,216.49,168.49Z"},child:[]}]})(e)}function Dp(e){return Ce({tag:"svg",attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M232.49,215.51,185,168a92.12,92.12,0,1,0-17,17l47.53,47.54a12,12,0,0,0,17-17ZM44,112a68,68,0,1,1,68,68A68.07,68.07,0,0,1,44,112Z"},child:[]}]})(e)}function C4(e){return Ce({tag:"svg",attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M156,40a12,12,0,0,1-12,12H112a12,12,0,0,1,0-24h32A12,12,0,0,1,156,40ZM144,204H112a12,12,0,0,0,0,24h32a12,12,0,0,0,0-24ZM204,52V72a12,12,0,0,0,24,0V48a20,20,0,0,0-20-20H184a12,12,0,0,0,0,24Zm12,48a12,12,0,0,0-12,12v32a12,12,0,0,0,24,0V112A12,12,0,0,0,216,100ZM40,156a12,12,0,0,0,12-12V112a12,12,0,0,0-24,0v32A12,12,0,0,0,40,156Zm32,48H52V184a12,12,0,0,0-24,0v24a20,20,0,0,0,20,20H72a12,12,0,0,0,0-24ZM72,28H48A20,20,0,0,0,28,48V72a12,12,0,0,0,24,0V52H72a12,12,0,0,0,0-24ZM240,204H228V192a12,12,0,0,0-24,0v12H192a12,12,0,0,0,0,24h12v12a12,12,0,0,0,24,0V228h12a12,12,0,0,0,0-24Z"},child:[]}]})(e)}function M4(e){return Ce({tag:"svg",attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z"},child:[]}]})(e)}function T4(e){return Ce({tag:"svg",attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M165.66,202.34a8,8,0,0,1-11.32,11.32l-80-80a8,8,0,0,1,0-11.32l80-80a8,8,0,0,1,11.32,11.32L91.31,128Z"},child:[]}]})(e)}function O4(e){return Ce({tag:"svg",attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M181.66,133.66l-80,80a8,8,0,0,1-11.32-11.32L164.69,128,90.34,53.66a8,8,0,0,1,11.32-11.32l80,80A8,8,0,0,1,181.66,133.66Z"},child:[]}]})(e)}function _4(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M9.95401 2.2106C11.2876 1.93144 12.6807 1.92263 14.0449 2.20785C14.2219 3.3674 14.9048 4.43892 15.9997 5.07103C17.0945 5.70313 18.364 5.75884 19.4566 5.3323C20.3858 6.37118 21.0747 7.58203 21.4997 8.87652C20.5852 9.60958 19.9997 10.736 19.9997 11.9992C19.9997 13.2632 20.5859 14.3902 21.5013 15.1232C21.29 15.7636 21.0104 16.3922 20.6599 16.9992C20.3094 17.6063 19.9049 18.1627 19.4559 18.6659C18.3634 18.2396 17.0943 18.2955 15.9997 18.9274C14.9057 19.559 14.223 20.6294 14.0453 21.7879C12.7118 22.067 11.3187 22.0758 9.95443 21.7906C9.77748 20.6311 9.09451 19.5595 7.99967 18.9274C6.90484 18.2953 5.63539 18.2396 4.54272 18.6662C3.61357 17.6273 2.92466 16.4164 2.49964 15.1219C3.41412 14.3889 3.99968 13.2624 3.99968 11.9992C3.99968 10.7353 3.41344 9.60827 2.49805 8.87524C2.70933 8.23482 2.98894 7.60629 3.33942 6.99923C3.68991 6.39217 4.09443 5.83576 4.54341 5.33257C5.63593 5.75881 6.90507 5.703 7.99967 5.07103C9.09364 4.43942 9.7764 3.3691 9.95401 2.2106ZM11.9997 14.9992C13.6565 14.9992 14.9997 13.6561 14.9997 11.9992C14.9997 10.3424 13.6565 8.99923 11.9997 8.99923C10.3428 8.99923 8.99967 10.3424 8.99967 11.9992C8.99967 13.6561 10.3428 14.9992 11.9997 14.9992Z"},child:[]}]})(e)}function $4(e){return Ce({tag:"svg",attr:{role:"img",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M6.5459 12.0003L12.001 6.545l5.4541 5.4552-5.4541 5.454zm16.9763-1.154L13.158.48a1.635 1.635 0 00-2.314 0L.4778 10.8462a1.629 1.629 0 000 2.305L10.848 23.5226a1.629 1.629 0 002.304 0l10.3702-10.3712a1.629 1.629 0 000-2.305zM12 20.7263l-8.7272-8.7281L12 3.27l8.7272 8.7282z"},child:[]}]})(e)}function F4(e){return Ce({tag:"svg",attr:{role:"img",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M1.763 0C.786 0 0 .786 0 1.763v20.474C0 23.214.786 24 1.763 24h20.474c.977 0 1.763-.786 1.763-1.763V1.763C24 .786 23.214 0 22.237 0zM5.13 5.323l13.837.019-.009 13.836h-3.464l.01-10.382h-3.456L12.04 19.17H5.113z"},child:[]}]})(e)}function B4(e){return Ce({tag:"svg",attr:{role:"img",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M0 0v7.5h7.5V0zm8.25 0v7.5h7.498V0zm8.25 0v7.5H24V0zM8.25 8.25v7.5h7.498v-7.5zm8.25 0v7.5H24v-7.5zM0 16.5V24h7.5v-7.5zm8.25 0V24h7.498v-7.5zm8.25 0V24H24v-7.5z"},child:[]}]})(e)}function R4(e){return Ce({tag:"svg",attr:{role:"img",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M14.25.18l.9.2.73.26.59.3.45.32.34.34.25.34.16.33.1.3.04.26.02.2-.01.13V8.5l-.05.63-.13.55-.21.46-.26.38-.3.31-.33.25-.35.19-.35.14-.33.1-.3.07-.26.04-.21.02H8.77l-.69.05-.59.14-.5.22-.41.27-.33.32-.27.35-.2.36-.15.37-.1.35-.07.32-.04.27-.02.21v3.06H3.17l-.21-.03-.28-.07-.32-.12-.35-.18-.36-.26-.36-.36-.35-.46-.32-.59-.28-.73-.21-.88-.14-1.05-.05-1.23.06-1.22.16-1.04.24-.87.32-.71.36-.57.4-.44.42-.33.42-.24.4-.16.36-.1.32-.05.24-.01h.16l.06.01h8.16v-.83H6.18l-.01-2.75-.02-.37.05-.34.11-.31.17-.28.25-.26.31-.23.38-.2.44-.18.51-.15.58-.12.64-.1.71-.06.77-.04.84-.02 1.27.05zm-6.3 1.98l-.23.33-.08.41.08.41.23.34.33.22.41.09.41-.09.33-.22.23-.34.08-.41-.08-.41-.23-.33-.33-.22-.41-.09-.41.09zm13.09 3.95l.28.06.32.12.35.18.36.27.36.35.35.47.32.59.28.73.21.88.14 1.04.05 1.23-.06 1.23-.16 1.04-.24.86-.32.71-.36.57-.4.45-.42.33-.42.24-.4.16-.36.09-.32.05-.24.02-.16-.01h-8.22v.82h5.84l.01 2.76.02.36-.05.34-.11.31-.17.29-.25.25-.31.24-.38.2-.44.17-.51.15-.58.13-.64.09-.71.07-.77.04-.84.01-1.27-.04-1.07-.14-.9-.2-.73-.25-.59-.3-.45-.33-.34-.34-.25-.34-.16-.33-.1-.3-.04-.25-.02-.2.01-.13v-5.34l.05-.64.13-.54.21-.46.26-.38.3-.32.33-.24.35-.2.35-.14.33-.1.3-.06.26-.04.21-.02.13-.01h5.84l.69-.05.59-.14.5-.21.41-.28.33-.32.27-.35.2-.36.15-.36.1-.35.07-.32.04-.28.02-.21V6.07h2.09l.14.01zm-6.47 14.25l-.23.33-.08.41.08.41.23.33.33.23.41.08.41-.08.33-.23.23-.33.08-.41-.08-.41-.23-.33-.33-.23-.41-.08-.41.08z"},child:[]}]})(e)}function P4(e){return Ce({tag:"svg",attr:{role:"img",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M1.125 0C.502 0 0 .502 0 1.125v21.75C0 23.498.502 24 1.125 24h21.75c.623 0 1.125-.502 1.125-1.125V1.125C24 .502 23.498 0 22.875 0zm17.363 9.75c.612 0 1.154.037 1.627.111a6.38 6.38 0 0 1 1.306.34v2.458a3.95 3.95 0 0 0-.643-.361 5.093 5.093 0 0 0-.717-.26 5.453 5.453 0 0 0-1.426-.2c-.3 0-.573.028-.819.086a2.1 2.1 0 0 0-.623.242c-.17.104-.3.229-.393.374a.888.888 0 0 0-.14.49c0 .196.053.373.156.529.104.156.252.304.443.444s.423.276.696.41c.273.135.582.274.926.416.47.197.892.407 1.266.628.374.222.695.473.963.753.268.279.472.598.614.957.142.359.214.776.214 1.253 0 .657-.125 1.21-.373 1.656a3.033 3.033 0 0 1-1.012 1.085 4.38 4.38 0 0 1-1.487.596c-.566.12-1.163.18-1.79.18a9.916 9.916 0 0 1-1.84-.164 5.544 5.544 0 0 1-1.512-.493v-2.63a5.033 5.033 0 0 0 3.237 1.2c.333 0 .624-.03.872-.09.249-.06.456-.144.623-.25.166-.108.29-.234.373-.38a1.023 1.023 0 0 0-.074-1.089 2.12 2.12 0 0 0-.537-.5 5.597 5.597 0 0 0-.807-.444 27.72 27.72 0 0 0-1.007-.436c-.918-.383-1.602-.852-2.053-1.405-.45-.553-.676-1.222-.676-2.005 0-.614.123-1.141.369-1.582.246-.441.58-.804 1.004-1.089a4.494 4.494 0 0 1 1.47-.629 7.536 7.536 0 0 1 1.77-.201zm-15.113.188h9.563v2.166H9.506v9.646H6.789v-9.646H3.375z"},child:[]}]})(e)}function z4(e){return Ce({tag:"svg",attr:{role:"img",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M12 0C5.375 0 0 5.375 0 12s5.375 12 12 12 12-5.375 12-12S18.625 0 12 0zm.768 4.105c.183 0 .363.053.525.157.125.083.287.185.755 1.154.31-.088.468-.042.551-.019.204.056.366.19.463.375.477.917.542 2.553.334 3.605-.241 1.232-.755 2.029-1.131 2.576.324.329.778.899 1.117 1.825.278.774.31 1.478.273 2.015a5.51 5.51 0 0 0 .602-.329c.593-.366 1.487-.917 2.553-.931.714-.009 1.269.445 1.353 1.103a1.23 1.23 0 0 1-.945 1.362c-.649.158-.95.278-1.821.843-1.232.797-2.539 1.242-3.012 1.39a1.686 1.686 0 0 1-.704.343c-.737.181-3.266.315-3.466.315h-.046c-.783 0-1.214-.241-1.45-.491-.658.329-1.51.19-2.122-.134a1.078 1.078 0 0 1-.58-1.153 1.243 1.243 0 0 1-.153-.195c-.162-.25-.528-.936-.454-1.946.056-.723.556-1.367.88-1.71a5.522 5.522 0 0 1 .408-2.256c.306-.727.885-1.348 1.32-1.737-.32-.537-.644-1.367-.329-2.21.227-.602.412-.936.82-1.08h-.005c.199-.074.389-.153.486-.259a3.418 3.418 0 0 1 2.298-1.103c.037-.093.079-.185.125-.283.31-.658.639-1.029 1.024-1.168a.94.94 0 0 1 .328-.06zm.006.7c-.507.016-1.001 1.519-1.001 1.519s-1.27-.204-2.266.871c-.199.218-.468.334-.746.44-.079.028-.176.023-.417.672-.371.991.625 2.094.625 2.094s-1.186.839-1.626 1.881c-.486 1.144-.338 2.261-.338 2.261s-.843.732-.899 1.487c-.051.663.139 1.2.343 1.515.227.343.51.176.51.176s-.561.653-.037.931c.477.25 1.283.394 1.71-.037.31-.31.371-1.001.486-1.283.028-.065.12.111.209.199.097.093.264.195.264.195s-.755.324-.445 1.066c.102.246.468.403 1.066.398.222-.005 2.664-.139 3.313-.296.375-.088.505-.283.505-.283s1.566-.431 2.998-1.357c.917-.598 1.293-.76 2.034-.936.612-.148.57-1.098-.241-1.084-.839.009-1.575.44-2.196.825-1.163.718-1.742.672-1.742.672l-.018-.032c-.079-.13.371-1.293-.134-2.678-.547-1.515-1.413-1.881-1.344-1.997.297-.5 1.038-1.297 1.334-2.78.176-.899.13-2.377-.269-3.151-.074-.144-.732.241-.732.241s-.616-1.371-.788-1.483a.271.271 0 0 0-.157-.046z"},child:[]}]})(e)}function I4(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M12 10a2 2 0 0 1 1.678 .911l.053 .089h7.269l.117 .007a1 1 0 0 1 .883 .993c0 5.523 -4.477 10 -10 10a1 1 0 0 1 -1 -1v-7.269l-.089 -.053a2 2 0 0 1 -.906 -1.529l-.005 -.149a2 2 0 0 1 2 -2m9.428 -1.334a1 1 0 0 1 -1.884 .668a8 8 0 1 0 -10.207 10.218a1 1 0 0 1 -.666 1.886a10 10 0 1 1 12.757 -12.772m-4.628 -.266a1 1 0 0 1 -1.6 1.2a4 4 0 1 0 -5.6 5.6a1 1 0 0 1 -1.2 1.6a6 6 0 1 1 8.4 -8.4"},child:[]}]})(e)}function L4(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M12 5l0 14"},child:[]},{tag:"path",attr:{d:"M18 13l-6 6"},child:[]},{tag:"path",attr:{d:"M6 13l6 6"},child:[]}]})(e)}function q4(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M5 12l14 0"},child:[]},{tag:"path",attr:{d:"M5 12l6 6"},child:[]},{tag:"path",attr:{d:"M5 12l6 -6"},child:[]}]})(e)}function k4(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M5 12l14 0"},child:[]},{tag:"path",attr:{d:"M13 18l6 -6"},child:[]},{tag:"path",attr:{d:"M13 6l6 6"},child:[]}]})(e)}function U4(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M12 5l0 14"},child:[]},{tag:"path",attr:{d:"M18 11l-6 -6"},child:[]},{tag:"path",attr:{d:"M6 11l6 -6"},child:[]}]})(e)}function H4(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},child:[]},{tag:"path",attr:{d:"M12 12m-5 0a5 5 0 1 0 10 0a5 5 0 1 0 -10 0"},child:[]},{tag:"path",attr:{d:"M15.9 20.11l0 .01"},child:[]},{tag:"path",attr:{d:"M19.04 17.61l0 .01"},child:[]},{tag:"path",attr:{d:"M20.77 14l0 .01"},child:[]},{tag:"path",attr:{d:"M20.77 10l0 .01"},child:[]},{tag:"path",attr:{d:"M19.04 6.39l0 .01"},child:[]},{tag:"path",attr:{d:"M15.9 3.89l0 .01"},child:[]},{tag:"path",attr:{d:"M12 3l0 .01"},child:[]},{tag:"path",attr:{d:"M8.1 3.89l0 .01"},child:[]},{tag:"path",attr:{d:"M4.96 6.39l0 .01"},child:[]},{tag:"path",attr:{d:"M3.23 10l0 .01"},child:[]},{tag:"path",attr:{d:"M3.23 14l0 .01"},child:[]},{tag:"path",attr:{d:"M4.96 17.61l0 .01"},child:[]},{tag:"path",attr:{d:"M8.1 20.11l0 .01"},child:[]},{tag:"path",attr:{d:"M12 21l0 .01"},child:[]}]})(e)}function j4(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M20 16l-4 4"},child:[]},{tag:"path",attr:{d:"M7 12l5 5l-1.5 1.5a3.536 3.536 0 1 1 -5 -5l1.5 -1.5z"},child:[]},{tag:"path",attr:{d:"M17 12l-5 -5l1.5 -1.5a3.536 3.536 0 1 1 5 5l-1.5 1.5z"},child:[]},{tag:"path",attr:{d:"M3 21l2.5 -2.5"},child:[]},{tag:"path",attr:{d:"M18.5 5.5l2.5 -2.5"},child:[]},{tag:"path",attr:{d:"M10 11l-2 2"},child:[]},{tag:"path",attr:{d:"M13 14l-2 2"},child:[]},{tag:"path",attr:{d:"M16 16l4 4"},child:[]}]})(e)}function V4(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M7 12l5 5l-1.5 1.5a3.536 3.536 0 1 1 -5 -5l1.5 -1.5z"},child:[]},{tag:"path",attr:{d:"M17 12l-5 -5l1.5 -1.5a3.536 3.536 0 1 1 5 5l-1.5 1.5z"},child:[]},{tag:"path",attr:{d:"M3 21l2.5 -2.5"},child:[]},{tag:"path",attr:{d:"M18.5 5.5l2.5 -2.5"},child:[]},{tag:"path",attr:{d:"M10 11l-2 2"},child:[]},{tag:"path",attr:{d:"M13 14l-2 2"},child:[]}]})(e)}const G4=e=>Et.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 78 51",...e,className:pc(e.className,"logo"),stroke:"currentColor",fill:"currentColor",children:[Et.jsx("g",{clipPath:"url(#clip0_327_656)",children:Et.jsx("path",{d:"M17.3026 17.0048V51.0427H0V17.0048H17.3026ZM34.6051 -0.0140575C36.8587 -0.0327593 39.0939 0.392621 41.1831 1.23779C43.2723 2.08297 45.1746 3.33138 46.7813 4.91175C48.388 6.49211 49.6677 8.37348 50.5473 10.4484C51.4269 12.5234 51.8891 14.7512 51.9077 17.0048V51.0427H34.6051V17.0048H17.3026V-0.0140575H34.6051ZM77.8615 -0.0140575V51.0427C75.6074 51.0632 73.3714 50.6391 71.2813 49.7946C69.1913 48.9501 67.2883 47.7018 65.6812 46.1211C64.0741 44.5403 62.7945 42.6582 61.9156 40.5824C61.0366 38.5066 60.5756 36.2779 60.559 34.0238V-0.0140575H77.8615Z",fill:"#03B584"})}),Et.jsx("defs",{children:Et.jsx("clipPath",{id:"clip0_327_656",children:Et.jsx("rect",{width:"77.8615",height:"51",fill:"white"})})})]}),W4=({className:e,style:r,...t})=>Et.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",className:pc(e,"logo"),...t,stroke:"currentColor",fill:"currentColor",viewBox:"0 0 512 325.74567",style:{transform:"scale(1.25)",...r},children:Et.jsx("g",{transform:"translate(-151.28831,-121.30134)",id:"layer1",children:Et.jsxs("g",{transform:"matrix(2.7387317,0,0,2.7387317,-938.60269,-766.86241)",id:"g3606",children:[Et.jsx("path",{d:"m 405.36669,375.73826 c 4.0225,-3.7175 9.16125,-7.18625 15.20125,-10.32375 -0.74875,-2.4425 -1.085,-5.12 -1.085,-7.64375 0,-7.5075 2.73,-16.49375 11.71625,-16.49375 8.5125,0 11.5125,8.06125 11.80625,15.2925 10.53625,-3.17125 22.36875,-5.64 35.15375,-7.165 2.115,-6.09125 6.77375,-8.1275 10.68125,-8.1275 4.88875,0 7.94625,2.72625 9.6675,6.4675 3.5775,-0.1425 7.2475,-0.15875 10.915,-0.15875 9.17001,0 18.09501,0.40125 26.64001,1.25875 1.5525,-4.33625 4.76,-7.5675 11.15875,-7.5675 4.89125,0 9.32875,3.52625 9.4425,8.53125 l 18.76875,0 c -1.36625,-15.585 -14.4475,-23.32 -29.12125,-23.32 -14.0825,0 -24.29,7.3775 -28.6275,18.84125 -3.36625,-10.705 -11.15626,-18.84125 -24.40876,-18.84125 -6.825,0 -12.51125,2.95875 -16.265,8.5325 l -0.2275,0 0,-6.82625 -18.4275,0 0,13.57625 c -5.16625,-9.26625 -14.9475,-15.2825 -27.15625,-15.2825 -18.3125,0 -31.05375,13.5375 -31.05375,31.2825 0,6.79375 1.89,12.95125 5.22125,17.9675",id:"path3299",fillRule:"nonzero",fillOpacity:1}),Et.jsx("path",{d:"m 426.05169,372.92451 c 1.42625,0.78 3.13,1.2275 5.1475,1.2275 6.175,0 9.45875,-4.1875 10.9025,-9.24375 10.05,-4.0125 21.88125,-7.235 34.94875,-9.4375 -0.0275,0.5225 -0.04,1.06125 -0.04,1.6175 0,10.3525 2.9575,17.06375 11.71625,17.06375 8.645,0 11.6025,-8.98625 11.6025,-17.06375 0,-1.42875 -0.0937,-2.88625 -0.32,-4.31 5.86,-0.40625 11.865,-0.61625 18.00001,-0.61625 5.82375,0 11.54375,0.19125 17.1225,0.5575 -0.30875,1.95125 -0.4225,3.98625 -0.4225,5.9625 0,7.62125 3.3,15.47 11.48875,15.47 6.7125,0 10.125,-3.8675 11.03375,-10.12375 l 18.76875,0 c -1.705,15.81125 -13.99125,24.9125 -29.68875,24.9125 -13.22625,0 -23.925,-6.76375 -28.51625,-17.6975 -3.2875,10.0525 -10.92501,17.6975 -23.04001,17.6975 -7.28,0 -12.85375,-2.73125 -16.83625,-8.0775 l -0.2275,0 0,28.92 -19.33625,0 0,-36.04 c -5.16625,9.2325 -14.9475,15.1975 -27.15625,15.1975 -6.8475,0 -12.8975,-1.8775 -17.8125,-5.155 3.10875,-3.875 7.38125,-7.51875 12.665,-10.86125",id:"path3301",fillOpacity:1,fillRule:"nonzero"}),Et.jsx("path",{d:"m 582.7117,362.38451 c -19.015,-7.0775 -43.9375,-11.36875 -71.22126,-11.36875 -59.675,0 -108.05,20.525 -108.05,45.84375 0,21.07875 33.53,38.83125 79.19375,44.1875 -41.985,-6.12625 -72.15125,-22.9375 -72.15125,-42.7175 0,-24.96 48.005,-45.19375 107.22251,-45.19375 24.4475,0 46.97,3.4425 65.00625,9.24875",id:"path3303",fillOpacity:1,fillRule:"nonzero"})]})})}),Ee=(e,{className:r}={})=>{const t=n=>Et.jsx(e,{...n,className:pc(n.className,r,"synnax-icon")});return t.displayName=e.displayName||e.name,t},$o={Linux:A3,MacOS:E3,Windows:K1,Docker:S3},$t={Pause:Ee(j3),Play:Ee(V3),Circle:Ee(Ee(H3)),Edit:Ee(Ee(y4)),EditOff:Ee(I3),Add:Ee($3),Subtract:Ee(g3),Copy:Ee(P3),Close:Ee(d3),Info:Ee(l3),Warning:Ee(f3),Check:Ee(v3),Refresh:Ee(B3),Delete:Ee(s3),Time:Ee(z3),Acquire:Ee(Ap),Analyze:Ee(D3),Concepts:Ee(x3),Visualize:Ee(t4),Expand:Ee(m3),Cluster:Ee(F3),Loading:Ee(h3,{className:"media--spin"}),Schematic:Ee(Ap),Caret:{Right:Ee(O4),Left:Ee(T4),Up:Ee(N4),Down:Ee(M4)},Settings:Ee(_4),Reference:Ee(R3),Bolt:Ee(_3),Download:Ee(O3),Range:Ee(w4),Node:Ee(S4),Channel:Ee(U3),Resources:Ee(Sp),Group:Ee(Sp),Workspace:Ee(n4),OS:{Linux:Ee($o.Linux),MacOS:Ee($o.MacOS),Windows:Ee($o.Windows),Docker:Ee($o.Docker)},Box:Ee(p3),Python:Ee(R4),TypeScript:Ee(P4),NPM:Ee(F4),PNPM:Ee(B4),Yarn:Ee(z4),QuestionMark:Ee(k3),Menu:Ee(N3),Logo:{Github:Ee(u3),LinkedIn:Ee(c3),NI:Ee(G4),OPC:Ee(W4)},Arrow:{Right:Ee(k4),Down:Ee(L4),Up:Ee(U4),Left:Ee(q4)},Keyboard:{Command:Ee(f4),Windows:Ee(K1),Tab:Ee(h4),Return:Ee(m4),Backspace:Ee(l4),Capslock:Ee(c4),Hide:Ee(v4),Control:Ee(p4),Arrow:{Up:Ee(u4),Down:Ee(i4),Left:Ee(o4),Right:Ee(s4)},Alt:Ee(a4),Option:Ee(d4),Shift:Ee(w3)},Tooltip:Ee(G3),Annotate:Ee(L3),Zoom:Ee(Dp),Selection:Ee(C4),Pan:Ee(T3),Rule:Ee(Y3),User:Ee(x4),Rename:Ee(b3),Snapshot:Ee(q3),Sync:Ee(y3),Search:Ee(Dp),Auto:Ee(g4),Table:Ee(E4),Align:{Right:Ee(J3),Left:Ee(K3),XCenter:Ee(X3),YCenter:Ee(e4),Top:Ee(r4),Bottom:Ee(Q3)},Connect:Ee(V4),Disconnect:Ee(j4),Hardware:Ee(b4),Save:Ee(Z3),Task:Ee(I4),Device:Ee($4),Link:Ee(W3),Attachment:Ee(C3),Drag:Ee(M3),Dynamic:Ee(H4),Enable:Ee(D4),Disable:Ee(A4)},Cl=e=>{if(e==null)return{x:void 0,y:void 0};const r=G.k$1.safeParse(e);if(r.success)return r.data;const t=G.c.safeParse(e);return t.success?G.t(t.data)==="x"?{x:t.data,y:void 0}:{x:void 0,y:t.data}:e},Z4=({container:e,target:r,dialog:t,initial:n,prefer:a,alignments:i=["start"],disable:o=[]})=>{const u=Cl(n);let s=G.M;if(a!=null){const d=a.map(y=>Cl(y));s=s.slice().sort((y,h)=>{const E=d.findIndex(w=>G.B(y,w)),g=d.findIndex(w=>G.B(h,w));return E>-1&&g>-1?E-g:E>-1?-1:g>-1?1:0})}const l=s.filter(d=>!G.$(d,G.y)&&(u.x==null||d.x===u.x)&&(u.y==null||d.y===u.y)&&!o.some(y=>G.B(d,y))).map(d=>i==null?void 0:i.map(y=>[d,y])).flat(),c=G.c$1(e),f=G.c$1(r),p=G.c$1(t);let v=-1/0;const m={location:G.y,adjustedDialog:p};return l.forEach(([d,y])=>{const[h,E]=Y4({option:d,alignment:y,container:c,target:f,dialog:p});E>v&&(v=E,m.location=d,m.adjustedDialog=h)}),m},Y4=({option:e,alignment:r,container:t,target:n,dialog:a})=>{const i=J1(e,r),o=G.g$1(n,e),u=G.po(o.x,o.y,G.u$1(a),G.l(a),i,G.T),s=G.fo(G.wo(u,t));return[u,s]},X4={start:"left",center:"center",end:"right"},K4={start:"bottom",center:"center",end:"top"},J1=(e,r)=>{const t={x:"center",y:"center"};if(e.y!=="center"){t.y=G.A(e.y);const n=e.x==="left"?G.A:a=>a;t.x=n(X4[r])}else t.x=G.A(e.x),t.y=K4[r];return t},vc=Object.freeze(Object.defineProperty({__proto__:null,dialog:Z4,getRoot:J1,parseLocationOptions:Cl},Symbol.toStringTag,{value:"Module"}));var Ot={},to={},J4=typeof ye.commonjsGlobal=="object"&&ye.commonjsGlobal&&ye.commonjsGlobal.Object===Object&&ye.commonjsGlobal,Q1=J4,Q4=Q1,e5=typeof self=="object"&&self&&self.Object===Object&&self,r5=Q4||e5||Function("return this")(),nn=r5,t5=nn,n5=t5.Symbol,no=n5,Np=no,eg=Object.prototype,a5=eg.hasOwnProperty,i5=eg.toString,Ri=Np?Np.toStringTag:void 0;function o5(e){var r=a5.call(e,Ri),t=e[Ri];try{e[Ri]=void 0;var n=!0}catch{}var a=i5.call(e);return n&&(r?e[Ri]=t:delete e[Ri]),a}var s5=o5,u5=Object.prototype,l5=u5.toString;function c5(e){return l5.call(e)}var f5=c5,Cp=no,p5=s5,v5=f5,d5="[object Null]",m5="[object Undefined]",Mp=Cp?Cp.toStringTag:void 0;function h5(e){return e==null?e===void 0?m5:d5:Mp&&Mp in Object(e)?p5(e):v5(e)}var ea=h5,g5=Array.isArray,Wt=g5;function y5(e){return e!=null&&typeof e=="object"}var bn=y5,b5=ea,x5=Wt,w5=bn,E5="[object String]";function S5(e){return typeof e=="string"||!x5(e)&&w5(e)&&b5(e)==E5}var A5=S5;function D5(e){return function(r,t,n){for(var a=-1,i=Object(r),o=n(r),u=o.length;u--;){var s=o[e?u:++a];if(t(i[s],s,i)===!1)break}return r}}var N5=D5,C5=N5,M5=C5(),T5=M5;function O5(e,r){for(var t=-1,n=Array(e);++t<e;)n[t]=r(t);return n}var _5=O5,$5=ea,F5=bn,B5="[object Arguments]";function R5(e){return F5(e)&&$5(e)==B5}var P5=R5,Tp=P5,z5=bn,rg=Object.prototype,I5=rg.hasOwnProperty,L5=rg.propertyIsEnumerable,q5=Tp(function(){return arguments}())?Tp:function(e){return z5(e)&&I5.call(e,"callee")&&!L5.call(e,"callee")},tg=q5,ss={exports:{}};function k5(){return!1}var U5=k5;ss.exports;(function(e,r){var t=nn,n=U5,a=r&&!r.nodeType&&r,i=a&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===a,u=o?t.Buffer:void 0,s=u?u.isBuffer:void 0,l=s||n;e.exports=l})(ss,ss.exports);var dc=ss.exports,H5=9007199254740991,j5=/^(?:0|[1-9]\d*)$/;function V5(e,r){var t=typeof e;return r=r??H5,!!r&&(t=="number"||t!="symbol"&&j5.test(e))&&e>-1&&e%1==0&&e<r}var ng=V5,G5=9007199254740991;function W5(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=G5}var mc=W5,Z5=ea,Y5=mc,X5=bn,K5="[object Arguments]",J5="[object Array]",Q5="[object Boolean]",eE="[object Date]",rE="[object Error]",tE="[object Function]",nE="[object Map]",aE="[object Number]",iE="[object Object]",oE="[object RegExp]",sE="[object Set]",uE="[object String]",lE="[object WeakMap]",cE="[object ArrayBuffer]",fE="[object DataView]",pE="[object Float32Array]",vE="[object Float64Array]",dE="[object Int8Array]",mE="[object Int16Array]",hE="[object Int32Array]",gE="[object Uint8Array]",yE="[object Uint8ClampedArray]",bE="[object Uint16Array]",xE="[object Uint32Array]",_r={};_r[pE]=_r[vE]=_r[dE]=_r[mE]=_r[hE]=_r[gE]=_r[yE]=_r[bE]=_r[xE]=!0;_r[K5]=_r[J5]=_r[cE]=_r[Q5]=_r[fE]=_r[eE]=_r[rE]=_r[tE]=_r[nE]=_r[aE]=_r[iE]=_r[oE]=_r[sE]=_r[uE]=_r[lE]=!1;function wE(e){return X5(e)&&Y5(e.length)&&!!_r[Z5(e)]}var EE=wE;function SE(e){return function(r){return e(r)}}var hc=SE,us={exports:{}};us.exports;(function(e,r){var t=Q1,n=r&&!r.nodeType&&r,a=n&&!0&&e&&!e.nodeType&&e,i=a&&a.exports===n,o=i&&t.process,u=function(){try{var s=a&&a.require&&a.require("util").types;return s||o&&o.binding&&o.binding("util")}catch{}}();e.exports=u})(us,us.exports);var gc=us.exports,AE=EE,DE=hc,Op=gc,_p=Op&&Op.isTypedArray,NE=_p?DE(_p):AE,ag=NE,CE=_5,ME=tg,TE=Wt,OE=dc,_E=ng,$E=ag,FE=Object.prototype,BE=FE.hasOwnProperty;function RE(e,r){var t=TE(e),n=!t&&ME(e),a=!t&&!n&&OE(e),i=!t&&!n&&!a&&$E(e),o=t||n||a||i,u=o?CE(e.length,String):[],s=u.length;for(var l in e)(r||BE.call(e,l))&&!(o&&(l=="length"||a&&(l=="offset"||l=="parent")||i&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||_E(l,s)))&&u.push(l);return u}var ig=RE,PE=Object.prototype;function zE(e){var r=e&&e.constructor,t=typeof r=="function"&&r.prototype||PE;return e===t}var yc=zE;function IE(e,r){return function(t){return e(r(t))}}var og=IE,LE=og,qE=LE(Object.keys,Object),kE=qE,UE=yc,HE=kE,jE=Object.prototype,VE=jE.hasOwnProperty;function GE(e){if(!UE(e))return HE(e);var r=[];for(var t in Object(e))VE.call(e,t)&&t!="constructor"&&r.push(t);return r}var WE=GE;function ZE(e){var r=typeof e;return e!=null&&(r=="object"||r=="function")}var ai=ZE,YE=ea,XE=ai,KE="[object AsyncFunction]",JE="[object Function]",QE="[object GeneratorFunction]",eS="[object Proxy]";function rS(e){if(!XE(e))return!1;var r=YE(e);return r==JE||r==QE||r==KE||r==eS}var sg=rS,tS=sg,nS=mc;function aS(e){return e!=null&&nS(e.length)&&!tS(e)}var Vs=aS,iS=ig,oS=WE,sS=Vs;function uS(e){return sS(e)?iS(e):oS(e)}var ao=uS,lS=T5,cS=ao;function fS(e,r){return e&&lS(e,r,cS)}var ug=fS;function pS(e){return e}var lg=pS,vS=lg;function dS(e){return typeof e=="function"?e:vS}var mS=dS,hS=ug,gS=mS;function yS(e,r){return e&&hS(e,gS(r))}var bc=yS,bS=og,xS=bS(Object.getPrototypeOf,Object),xc=xS,wS=ea,ES=xc,SS=bn,AS="[object Object]",DS=Function.prototype,NS=Object.prototype,cg=DS.toString,CS=NS.hasOwnProperty,MS=cg.call(Object);function TS(e){if(!SS(e)||wS(e)!=AS)return!1;var r=ES(e);if(r===null)return!0;var t=CS.call(r,"constructor")&&r.constructor;return typeof t=="function"&&t instanceof t&&cg.call(t)==MS}var OS=TS;function _S(e,r){for(var t=-1,n=e==null?0:e.length,a=Array(n);++t<n;)a[t]=r(e[t],t,e);return a}var fg=_S;function $S(){this.__data__=[],this.size=0}var FS=$S;function BS(e,r){return e===r||e!==e&&r!==r}var wc=BS,RS=wc;function PS(e,r){for(var t=e.length;t--;)if(RS(e[t][0],r))return t;return-1}var Gs=PS,zS=Gs,IS=Array.prototype,LS=IS.splice;function qS(e){var r=this.__data__,t=zS(r,e);if(t<0)return!1;var n=r.length-1;return t==n?r.pop():LS.call(r,t,1),--this.size,!0}var kS=qS,US=Gs;function HS(e){var r=this.__data__,t=US(r,e);return t<0?void 0:r[t][1]}var jS=HS,VS=Gs;function GS(e){return VS(this.__data__,e)>-1}var WS=GS,ZS=Gs;function YS(e,r){var t=this.__data__,n=ZS(t,e);return n<0?(++this.size,t.push([e,r])):t[n][1]=r,this}var XS=YS,KS=FS,JS=kS,QS=jS,eA=WS,rA=XS;function ii(e){var r=-1,t=e==null?0:e.length;for(this.clear();++r<t;){var n=e[r];this.set(n[0],n[1])}}ii.prototype.clear=KS;ii.prototype.delete=JS;ii.prototype.get=QS;ii.prototype.has=eA;ii.prototype.set=rA;var Ws=ii,tA=Ws;function nA(){this.__data__=new tA,this.size=0}var aA=nA;function iA(e){var r=this.__data__,t=r.delete(e);return this.size=r.size,t}var oA=iA;function sA(e){return this.__data__.get(e)}var uA=sA;function lA(e){return this.__data__.has(e)}var cA=lA,fA=nn,pA=fA["__core-js_shared__"],vA=pA,Zu=vA,$p=function(){var e=/[^.]+$/.exec(Zu&&Zu.keys&&Zu.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function dA(e){return!!$p&&$p in e}var mA=dA,hA=Function.prototype,gA=hA.toString;function yA(e){if(e!=null){try{return gA.call(e)}catch{}try{return e+""}catch{}}return""}var pg=yA,bA=sg,xA=mA,wA=ai,EA=pg,SA=/[\\^$.*+?()[\]{}|]/g,AA=/^\[object .+?Constructor\]$/,DA=Function.prototype,NA=Object.prototype,CA=DA.toString,MA=NA.hasOwnProperty,TA=RegExp("^"+CA.call(MA).replace(SA,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function OA(e){if(!wA(e)||xA(e))return!1;var r=bA(e)?TA:AA;return r.test(EA(e))}var _A=OA;function $A(e,r){return e==null?void 0:e[r]}var FA=$A,BA=_A,RA=FA;function PA(e,r){var t=RA(e,r);return BA(t)?t:void 0}var ra=PA,zA=ra,IA=nn,LA=zA(IA,"Map"),Ec=LA,qA=ra,kA=qA(Object,"create"),Zs=kA,Fp=Zs;function UA(){this.__data__=Fp?Fp(null):{},this.size=0}var HA=UA;function jA(e){var r=this.has(e)&&delete this.__data__[e];return this.size-=r?1:0,r}var VA=jA,GA=Zs,WA="__lodash_hash_undefined__",ZA=Object.prototype,YA=ZA.hasOwnProperty;function XA(e){var r=this.__data__;if(GA){var t=r[e];return t===WA?void 0:t}return YA.call(r,e)?r[e]:void 0}var KA=XA,JA=Zs,QA=Object.prototype,eD=QA.hasOwnProperty;function rD(e){var r=this.__data__;return JA?r[e]!==void 0:eD.call(r,e)}var tD=rD,nD=Zs,aD="__lodash_hash_undefined__";function iD(e,r){var t=this.__data__;return this.size+=this.has(e)?0:1,t[e]=nD&&r===void 0?aD:r,this}var oD=iD,sD=HA,uD=VA,lD=KA,cD=tD,fD=oD;function oi(e){var r=-1,t=e==null?0:e.length;for(this.clear();++r<t;){var n=e[r];this.set(n[0],n[1])}}oi.prototype.clear=sD;oi.prototype.delete=uD;oi.prototype.get=lD;oi.prototype.has=cD;oi.prototype.set=fD;var pD=oi,Bp=pD,vD=Ws,dD=Ec;function mD(){this.size=0,this.__data__={hash:new Bp,map:new(dD||vD),string:new Bp}}var hD=mD;function gD(e){var r=typeof e;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?e!=="__proto__":e===null}var yD=gD,bD=yD;function xD(e,r){var t=e.__data__;return bD(r)?t[typeof r=="string"?"string":"hash"]:t.map}var Ys=xD,wD=Ys;function ED(e){var r=wD(this,e).delete(e);return this.size-=r?1:0,r}var SD=ED,AD=Ys;function DD(e){return AD(this,e).get(e)}var ND=DD,CD=Ys;function MD(e){return CD(this,e).has(e)}var TD=MD,OD=Ys;function _D(e,r){var t=OD(this,e),n=t.size;return t.set(e,r),this.size+=t.size==n?0:1,this}var $D=_D,FD=hD,BD=SD,RD=ND,PD=TD,zD=$D;function si(e){var r=-1,t=e==null?0:e.length;for(this.clear();++r<t;){var n=e[r];this.set(n[0],n[1])}}si.prototype.clear=FD;si.prototype.delete=BD;si.prototype.get=RD;si.prototype.has=PD;si.prototype.set=zD;var Sc=si,ID=Ws,LD=Ec,qD=Sc,kD=200;function UD(e,r){var t=this.__data__;if(t instanceof ID){var n=t.__data__;if(!LD||n.length<kD-1)return n.push([e,r]),this.size=++t.size,this;t=this.__data__=new qD(n)}return t.set(e,r),this.size=t.size,this}var HD=UD,jD=Ws,VD=aA,GD=oA,WD=uA,ZD=cA,YD=HD;function ui(e){var r=this.__data__=new jD(e);this.size=r.size}ui.prototype.clear=VD;ui.prototype.delete=GD;ui.prototype.get=WD;ui.prototype.has=ZD;ui.prototype.set=YD;var Ac=ui,XD="__lodash_hash_undefined__";function KD(e){return this.__data__.set(e,XD),this}var JD=KD;function QD(e){return this.__data__.has(e)}var eN=QD,rN=Sc,tN=JD,nN=eN;function ls(e){var r=-1,t=e==null?0:e.length;for(this.__data__=new rN;++r<t;)this.add(e[r])}ls.prototype.add=ls.prototype.push=tN;ls.prototype.has=nN;var aN=ls;function iN(e,r){for(var t=-1,n=e==null?0:e.length;++t<n;)if(r(e[t],t,e))return!0;return!1}var oN=iN;function sN(e,r){return e.has(r)}var uN=sN,lN=aN,cN=oN,fN=uN,pN=1,vN=2;function dN(e,r,t,n,a,i){var o=t&pN,u=e.length,s=r.length;if(u!=s&&!(o&&s>u))return!1;var l=i.get(e),c=i.get(r);if(l&&c)return l==r&&c==e;var f=-1,p=!0,v=t&vN?new lN:void 0;for(i.set(e,r),i.set(r,e);++f<u;){var m=e[f],d=r[f];if(n)var y=o?n(d,m,f,r,e,i):n(m,d,f,e,r,i);if(y!==void 0){if(y)continue;p=!1;break}if(v){if(!cN(r,function(h,E){if(!fN(v,E)&&(m===h||a(m,h,t,n,i)))return v.push(E)})){p=!1;break}}else if(!(m===d||a(m,d,t,n,i))){p=!1;break}}return i.delete(e),i.delete(r),p}var vg=dN,mN=nn,hN=mN.Uint8Array,dg=hN;function gN(e){var r=-1,t=Array(e.size);return e.forEach(function(n,a){t[++r]=[a,n]}),t}var yN=gN;function bN(e){var r=-1,t=Array(e.size);return e.forEach(function(n){t[++r]=n}),t}var xN=bN,Rp=no,Pp=dg,wN=wc,EN=vg,SN=yN,AN=xN,DN=1,NN=2,CN="[object Boolean]",MN="[object Date]",TN="[object Error]",ON="[object Map]",_N="[object Number]",$N="[object RegExp]",FN="[object Set]",BN="[object String]",RN="[object Symbol]",PN="[object ArrayBuffer]",zN="[object DataView]",zp=Rp?Rp.prototype:void 0,Yu=zp?zp.valueOf:void 0;function IN(e,r,t,n,a,i,o){switch(t){case zN:if(e.byteLength!=r.byteLength||e.byteOffset!=r.byteOffset)return!1;e=e.buffer,r=r.buffer;case PN:return!(e.byteLength!=r.byteLength||!i(new Pp(e),new Pp(r)));case CN:case MN:case _N:return wN(+e,+r);case TN:return e.name==r.name&&e.message==r.message;case $N:case BN:return e==r+"";case ON:var u=SN;case FN:var s=n&DN;if(u||(u=AN),e.size!=r.size&&!s)return!1;var l=o.get(e);if(l)return l==r;n|=NN,o.set(e,r);var c=EN(u(e),u(r),n,a,i,o);return o.delete(e),c;case RN:if(Yu)return Yu.call(e)==Yu.call(r)}return!1}var LN=IN;function qN(e,r){for(var t=-1,n=r.length,a=e.length;++t<n;)e[a+t]=r[t];return e}var mg=qN,kN=mg,UN=Wt;function HN(e,r,t){var n=r(e);return UN(e)?n:kN(n,t(e))}var hg=HN;function jN(e,r){for(var t=-1,n=e==null?0:e.length,a=0,i=[];++t<n;){var o=e[t];r(o,t,e)&&(i[a++]=o)}return i}var VN=jN;function GN(){return[]}var gg=GN,WN=VN,ZN=gg,YN=Object.prototype,XN=YN.propertyIsEnumerable,Ip=Object.getOwnPropertySymbols,KN=Ip?function(e){return e==null?[]:(e=Object(e),WN(Ip(e),function(r){return XN.call(e,r)}))}:ZN,Dc=KN,JN=hg,QN=Dc,eC=ao;function rC(e){return JN(e,eC,QN)}var yg=rC,Lp=yg,tC=1,nC=Object.prototype,aC=nC.hasOwnProperty;function iC(e,r,t,n,a,i){var o=t&tC,u=Lp(e),s=u.length,l=Lp(r),c=l.length;if(s!=c&&!o)return!1;for(var f=s;f--;){var p=u[f];if(!(o?p in r:aC.call(r,p)))return!1}var v=i.get(e),m=i.get(r);if(v&&m)return v==r&&m==e;var d=!0;i.set(e,r),i.set(r,e);for(var y=o;++f<s;){p=u[f];var h=e[p],E=r[p];if(n)var g=o?n(E,h,p,r,e,i):n(h,E,p,e,r,i);if(!(g===void 0?h===E||a(h,E,t,n,i):g)){d=!1;break}y||(y=p=="constructor")}if(d&&!y){var w=e.constructor,x=r.constructor;w!=x&&"constructor"in e&&"constructor"in r&&!(typeof w=="function"&&w instanceof w&&typeof x=="function"&&x instanceof x)&&(d=!1)}return i.delete(e),i.delete(r),d}var oC=iC,sC=ra,uC=nn,lC=sC(uC,"DataView"),cC=lC,fC=ra,pC=nn,vC=fC(pC,"Promise"),dC=vC,mC=ra,hC=nn,gC=mC(hC,"Set"),yC=gC,bC=ra,xC=nn,wC=bC(xC,"WeakMap"),EC=wC,Ml=cC,Tl=Ec,Ol=dC,_l=yC,$l=EC,bg=ea,li=pg,qp="[object Map]",SC="[object Object]",kp="[object Promise]",Up="[object Set]",Hp="[object WeakMap]",jp="[object DataView]",AC=li(Ml),DC=li(Tl),NC=li(Ol),CC=li(_l),MC=li($l),Gn=bg;(Ml&&Gn(new Ml(new ArrayBuffer(1)))!=jp||Tl&&Gn(new Tl)!=qp||Ol&&Gn(Ol.resolve())!=kp||_l&&Gn(new _l)!=Up||$l&&Gn(new $l)!=Hp)&&(Gn=function(e){var r=bg(e),t=r==SC?e.constructor:void 0,n=t?li(t):"";if(n)switch(n){case AC:return jp;case DC:return qp;case NC:return kp;case CC:return Up;case MC:return Hp}return r});var Xs=Gn,Xu=Ac,TC=vg,OC=LN,_C=oC,Vp=Xs,Gp=Wt,Wp=dc,$C=ag,FC=1,Zp="[object Arguments]",Yp="[object Array]",Fo="[object Object]",BC=Object.prototype,Xp=BC.hasOwnProperty;function RC(e,r,t,n,a,i){var o=Gp(e),u=Gp(r),s=o?Yp:Vp(e),l=u?Yp:Vp(r);s=s==Zp?Fo:s,l=l==Zp?Fo:l;var c=s==Fo,f=l==Fo,p=s==l;if(p&&Wp(e)){if(!Wp(r))return!1;o=!0,c=!1}if(p&&!c)return i||(i=new Xu),o||$C(e)?TC(e,r,t,n,a,i):OC(e,r,s,t,n,a,i);if(!(t&FC)){var v=c&&Xp.call(e,"__wrapped__"),m=f&&Xp.call(r,"__wrapped__");if(v||m){var d=v?e.value():e,y=m?r.value():r;return i||(i=new Xu),a(d,y,t,n,i)}}return p?(i||(i=new Xu),_C(e,r,t,n,a,i)):!1}var PC=RC,zC=PC,Kp=bn;function xg(e,r,t,n,a){return e===r?!0:e==null||r==null||!Kp(e)&&!Kp(r)?e!==e&&r!==r:zC(e,r,t,n,xg,a)}var wg=xg,IC=Ac,LC=wg,qC=1,kC=2;function UC(e,r,t,n){var a=t.length,i=a,o=!n;if(e==null)return!i;for(e=Object(e);a--;){var u=t[a];if(o&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++a<i;){u=t[a];var s=u[0],l=e[s],c=u[1];if(o&&u[2]){if(l===void 0&&!(s in e))return!1}else{var f=new IC;if(n)var p=n(l,c,s,e,r,f);if(!(p===void 0?LC(c,l,qC|kC,n,f):p))return!1}}return!0}var HC=UC,jC=ai;function VC(e){return e===e&&!jC(e)}var Eg=VC,GC=Eg,WC=ao;function ZC(e){for(var r=WC(e),t=r.length;t--;){var n=r[t],a=e[n];r[t]=[n,a,GC(a)]}return r}var YC=ZC;function XC(e,r){return function(t){return t==null?!1:t[e]===r&&(r!==void 0||e in Object(t))}}var Sg=XC,KC=HC,JC=YC,QC=Sg;function e6(e){var r=JC(e);return r.length==1&&r[0][2]?QC(r[0][0],r[0][1]):function(t){return t===e||KC(t,e,r)}}var r6=e6,t6=ea,n6=bn,a6="[object Symbol]";function i6(e){return typeof e=="symbol"||n6(e)&&t6(e)==a6}var Nc=i6,o6=Wt,s6=Nc,u6=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,l6=/^\w*$/;function c6(e,r){if(o6(e))return!1;var t=typeof e;return t=="number"||t=="symbol"||t=="boolean"||e==null||s6(e)?!0:l6.test(e)||!u6.test(e)||r!=null&&e in Object(r)}var Cc=c6,Ag=Sc,f6="Expected a function";function Mc(e,r){if(typeof e!="function"||r!=null&&typeof r!="function")throw new TypeError(f6);var t=function(){var n=arguments,a=r?r.apply(this,n):n[0],i=t.cache;if(i.has(a))return i.get(a);var o=e.apply(this,n);return t.cache=i.set(a,o)||i,o};return t.cache=new(Mc.Cache||Ag),t}Mc.Cache=Ag;var p6=Mc,v6=p6,d6=500;function m6(e){var r=v6(e,function(n){return t.size===d6&&t.clear(),n}),t=r.cache;return r}var h6=m6,g6=h6,y6=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,b6=/\\(\\)?/g,x6=g6(function(e){var r=[];return e.charCodeAt(0)===46&&r.push(""),e.replace(y6,function(t,n,a,i){r.push(a?i.replace(b6,"$1"):n||t)}),r}),w6=x6,Jp=no,E6=fg,S6=Wt,A6=Nc,D6=1/0,Qp=Jp?Jp.prototype:void 0,ev=Qp?Qp.toString:void 0;function Dg(e){if(typeof e=="string")return e;if(S6(e))return E6(e,Dg)+"";if(A6(e))return ev?ev.call(e):"";var r=e+"";return r=="0"&&1/e==-D6?"-0":r}var N6=Dg,C6=N6;function M6(e){return e==null?"":C6(e)}var T6=M6,O6=Wt,_6=Cc,$6=w6,F6=T6;function B6(e,r){return O6(e)?e:_6(e,r)?[e]:$6(F6(e))}var Ng=B6,R6=Nc,P6=1/0;function z6(e){if(typeof e=="string"||R6(e))return e;var r=e+"";return r=="0"&&1/e==-P6?"-0":r}var Ks=z6,I6=Ng,L6=Ks;function q6(e,r){r=I6(r,e);for(var t=0,n=r.length;e!=null&&t<n;)e=e[L6(r[t++])];return t&&t==n?e:void 0}var Cg=q6,k6=Cg;function U6(e,r,t){var n=e==null?void 0:k6(e,r);return n===void 0?t:n}var H6=U6;function j6(e,r){return e!=null&&r in Object(e)}var V6=j6,G6=Ng,W6=tg,Z6=Wt,Y6=ng,X6=mc,K6=Ks;function J6(e,r,t){r=G6(r,e);for(var n=-1,a=r.length,i=!1;++n<a;){var o=K6(r[n]);if(!(i=e!=null&&t(e,o)))break;e=e[o]}return i||++n!=a?i:(a=e==null?0:e.length,!!a&&X6(a)&&Y6(o,a)&&(Z6(e)||W6(e)))}var Q6=J6,e8=V6,r8=Q6;function t8(e,r){return e!=null&&r8(e,r,e8)}var n8=t8,a8=wg,i8=H6,o8=n8,s8=Cc,u8=Eg,l8=Sg,c8=Ks,f8=1,p8=2;function v8(e,r){return s8(e)&&u8(r)?l8(c8(e),r):function(t){var n=i8(t,e);return n===void 0&&n===r?o8(t,e):a8(r,n,f8|p8)}}var d8=v8;function m8(e){return function(r){return r==null?void 0:r[e]}}var h8=m8,g8=Cg;function y8(e){return function(r){return g8(r,e)}}var b8=y8,x8=h8,w8=b8,E8=Cc,S8=Ks;function A8(e){return E8(e)?x8(S8(e)):w8(e)}var D8=A8,N8=r6,C8=d8,M8=lg,T8=Wt,O8=D8;function _8(e){return typeof e=="function"?e:e==null?M8:typeof e=="object"?T8(e)?C8(e[0],e[1]):N8(e):O8(e)}var $8=_8,F8=Vs;function B8(e,r){return function(t,n){if(t==null)return t;if(!F8(t))return e(t,n);for(var a=t.length,i=r?a:-1,o=Object(t);(r?i--:++i<a)&&n(o[i],i,o)!==!1;);return t}}var R8=B8,P8=ug,z8=R8,I8=z8(P8),L8=I8,q8=L8,k8=Vs;function U8(e,r){var t=-1,n=k8(e)?Array(e.length):[];return q8(e,function(a,i,o){n[++t]=r(a,i,o)}),n}var H8=U8,j8=fg,V8=$8,G8=H8,W8=Wt;function Z8(e,r){var t=W8(e)?j8:G8;return t(e,V8(r))}var Y8=Z8;Object.defineProperty(to,"__esModule",{value:!0});to.flattenNames=void 0;var X8=A5,K8=Js(X8),J8=bc,Q8=Js(J8),eM=OS,rM=Js(eM),tM=Y8,nM=Js(tM);function Js(e){return e&&e.__esModule?e:{default:e}}var aM=to.flattenNames=function e(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=[];return(0,nM.default)(r,function(n){Array.isArray(n)?e(n).map(function(a){return t.push(a)}):(0,rM.default)(n)?(0,Q8.default)(n,function(a,i){a===!0&&t.push(i),t.push(i+"-"+a)}):(0,K8.default)(n)&&t.push(n)}),t};to.default=aM;var io={};function iM(e,r){for(var t=-1,n=e==null?0:e.length;++t<n&&r(e[t],t,e)!==!1;);return e}var oM=iM,sM=ra,uM=function(){try{var e=sM(Object,"defineProperty");return e({},"",{}),e}catch{}}(),lM=uM,rv=lM;function cM(e,r,t){r=="__proto__"&&rv?rv(e,r,{configurable:!0,enumerable:!0,value:t,writable:!0}):e[r]=t}var Mg=cM,fM=Mg,pM=wc,vM=Object.prototype,dM=vM.hasOwnProperty;function mM(e,r,t){var n=e[r];(!(dM.call(e,r)&&pM(n,t))||t===void 0&&!(r in e))&&fM(e,r,t)}var Tg=mM,hM=Tg,gM=Mg;function yM(e,r,t,n){var a=!t;t||(t={});for(var i=-1,o=r.length;++i<o;){var u=r[i],s=n?n(t[u],e[u],u,t,e):void 0;s===void 0&&(s=e[u]),a?gM(t,u,s):hM(t,u,s)}return t}var Qs=yM,bM=Qs,xM=ao;function wM(e,r){return e&&bM(r,xM(r),e)}var EM=wM;function SM(e){var r=[];if(e!=null)for(var t in Object(e))r.push(t);return r}var AM=SM,DM=ai,NM=yc,CM=AM,MM=Object.prototype,TM=MM.hasOwnProperty;function OM(e){if(!DM(e))return CM(e);var r=NM(e),t=[];for(var n in e)n=="constructor"&&(r||!TM.call(e,n))||t.push(n);return t}var _M=OM,$M=ig,FM=_M,BM=Vs;function RM(e){return BM(e)?$M(e,!0):FM(e)}var Tc=RM,PM=Qs,zM=Tc;function IM(e,r){return e&&PM(r,zM(r),e)}var LM=IM,cs={exports:{}};cs.exports;(function(e,r){var t=nn,n=r&&!r.nodeType&&r,a=n&&!0&&e&&!e.nodeType&&e,i=a&&a.exports===n,o=i?t.Buffer:void 0,u=o?o.allocUnsafe:void 0;function s(l,c){if(c)return l.slice();var f=l.length,p=u?u(f):new l.constructor(f);return l.copy(p),p}e.exports=s})(cs,cs.exports);var qM=cs.exports;function kM(e,r){var t=-1,n=e.length;for(r||(r=Array(n));++t<n;)r[t]=e[t];return r}var UM=kM,HM=Qs,jM=Dc;function VM(e,r){return HM(e,jM(e),r)}var GM=VM,WM=mg,ZM=xc,YM=Dc,XM=gg,KM=Object.getOwnPropertySymbols,JM=KM?function(e){for(var r=[];e;)WM(r,YM(e)),e=ZM(e);return r}:XM,Og=JM,QM=Qs,e7=Og;function r7(e,r){return QM(e,e7(e),r)}var t7=r7,n7=hg,a7=Og,i7=Tc;function o7(e){return n7(e,i7,a7)}var s7=o7,u7=Object.prototype,l7=u7.hasOwnProperty;function c7(e){var r=e.length,t=new e.constructor(r);return r&&typeof e[0]=="string"&&l7.call(e,"index")&&(t.index=e.index,t.input=e.input),t}var f7=c7,tv=dg;function p7(e){var r=new e.constructor(e.byteLength);return new tv(r).set(new tv(e)),r}var Oc=p7,v7=Oc;function d7(e,r){var t=r?v7(e.buffer):e.buffer;return new e.constructor(t,e.byteOffset,e.byteLength)}var m7=d7,h7=/\w*$/;function g7(e){var r=new e.constructor(e.source,h7.exec(e));return r.lastIndex=e.lastIndex,r}var y7=g7,nv=no,av=nv?nv.prototype:void 0,iv=av?av.valueOf:void 0;function b7(e){return iv?Object(iv.call(e)):{}}var x7=b7,w7=Oc;function E7(e,r){var t=r?w7(e.buffer):e.buffer;return new e.constructor(t,e.byteOffset,e.length)}var S7=E7,A7=Oc,D7=m7,N7=y7,C7=x7,M7=S7,T7="[object Boolean]",O7="[object Date]",_7="[object Map]",$7="[object Number]",F7="[object RegExp]",B7="[object Set]",R7="[object String]",P7="[object Symbol]",z7="[object ArrayBuffer]",I7="[object DataView]",L7="[object Float32Array]",q7="[object Float64Array]",k7="[object Int8Array]",U7="[object Int16Array]",H7="[object Int32Array]",j7="[object Uint8Array]",V7="[object Uint8ClampedArray]",G7="[object Uint16Array]",W7="[object Uint32Array]";function Z7(e,r,t){var n=e.constructor;switch(r){case z7:return A7(e);case T7:case O7:return new n(+e);case I7:return D7(e,t);case L7:case q7:case k7:case U7:case H7:case j7:case V7:case G7:case W7:return M7(e,t);case _7:return new n;case $7:case R7:return new n(e);case F7:return N7(e);case B7:return new n;case P7:return C7(e)}}var Y7=Z7,X7=ai,ov=Object.create,K7=function(){function e(){}return function(r){if(!X7(r))return{};if(ov)return ov(r);e.prototype=r;var t=new e;return e.prototype=void 0,t}}(),J7=K7,Q7=J7,e9=xc,r9=yc;function t9(e){return typeof e.constructor=="function"&&!r9(e)?Q7(e9(e)):{}}var n9=t9,a9=Xs,i9=bn,o9="[object Map]";function s9(e){return i9(e)&&a9(e)==o9}var u9=s9,l9=u9,c9=hc,sv=gc,uv=sv&&sv.isMap,f9=uv?c9(uv):l9,p9=f9,v9=Xs,d9=bn,m9="[object Set]";function h9(e){return d9(e)&&v9(e)==m9}var g9=h9,y9=g9,b9=hc,lv=gc,cv=lv&&lv.isSet,x9=cv?b9(cv):y9,w9=x9,E9=Ac,S9=oM,A9=Tg,D9=EM,N9=LM,C9=qM,M9=UM,T9=GM,O9=t7,_9=yg,$9=s7,F9=Xs,B9=f7,R9=Y7,P9=n9,z9=Wt,I9=dc,L9=p9,q9=ai,k9=w9,U9=ao,H9=Tc,j9=1,V9=2,G9=4,_g="[object Arguments]",W9="[object Array]",Z9="[object Boolean]",Y9="[object Date]",X9="[object Error]",$g="[object Function]",K9="[object GeneratorFunction]",J9="[object Map]",Q9="[object Number]",Fg="[object Object]",eT="[object RegExp]",rT="[object Set]",tT="[object String]",nT="[object Symbol]",aT="[object WeakMap]",iT="[object ArrayBuffer]",oT="[object DataView]",sT="[object Float32Array]",uT="[object Float64Array]",lT="[object Int8Array]",cT="[object Int16Array]",fT="[object Int32Array]",pT="[object Uint8Array]",vT="[object Uint8ClampedArray]",dT="[object Uint16Array]",mT="[object Uint32Array]",Tr={};Tr[_g]=Tr[W9]=Tr[iT]=Tr[oT]=Tr[Z9]=Tr[Y9]=Tr[sT]=Tr[uT]=Tr[lT]=Tr[cT]=Tr[fT]=Tr[J9]=Tr[Q9]=Tr[Fg]=Tr[eT]=Tr[rT]=Tr[tT]=Tr[nT]=Tr[pT]=Tr[vT]=Tr[dT]=Tr[mT]=!0;Tr[X9]=Tr[$g]=Tr[aT]=!1;function ts(e,r,t,n,a,i){var o,u=r&j9,s=r&V9,l=r&G9;if(t&&(o=a?t(e,n,a,i):t(e)),o!==void 0)return o;if(!q9(e))return e;var c=z9(e);if(c){if(o=B9(e),!u)return M9(e,o)}else{var f=F9(e),p=f==$g||f==K9;if(I9(e))return C9(e,u);if(f==Fg||f==_g||p&&!a){if(o=s||p?{}:P9(e),!u)return s?O9(e,N9(o,e)):T9(e,D9(o,e))}else{if(!Tr[f])return a?e:{};o=R9(e,f,u)}}i||(i=new E9);var v=i.get(e);if(v)return v;i.set(e,o),k9(e)?e.forEach(function(y){o.add(ts(y,r,t,y,e,i))}):L9(e)&&e.forEach(function(y,h){o.set(h,ts(y,r,t,h,e,i))});var m=l?s?$9:_9:s?H9:U9,d=c?void 0:m(e);return S9(d||e,function(y,h){d&&(h=y,y=e[h]),A9(o,h,ts(y,r,t,h,e,i))}),o}var hT=ts,gT=hT,yT=1,bT=4;function xT(e){return gT(e,yT|bT)}var wT=xT;Object.defineProperty(io,"__esModule",{value:!0});io.mergeClasses=void 0;var ET=bc,ST=Bg(ET),AT=wT,DT=Bg(AT),NT=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e};function Bg(e){return e&&e.__esModule?e:{default:e}}var CT=io.mergeClasses=function(r){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=r.default&&(0,DT.default)(r.default)||{};return t.map(function(a){var i=r[a];return i&&(0,ST.default)(i,function(o,u){n[u]||(n[u]={}),n[u]=NT({},n[u],i[u])}),a}),n};io.default=CT;var oo={};Object.defineProperty(oo,"__esModule",{value:!0});oo.autoprefix=void 0;var MT=bc,fv=OT(MT),TT=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e};function OT(e){return e&&e.__esModule?e:{default:e}}var _T={borderRadius:function(r){return{msBorderRadius:r,MozBorderRadius:r,OBorderRadius:r,WebkitBorderRadius:r,borderRadius:r}},boxShadow:function(r){return{msBoxShadow:r,MozBoxShadow:r,OBoxShadow:r,WebkitBoxShadow:r,boxShadow:r}},userSelect:function(r){return{WebkitTouchCallout:r,KhtmlUserSelect:r,MozUserSelect:r,msUserSelect:r,WebkitUserSelect:r,userSelect:r}},flex:function(r){return{WebkitBoxFlex:r,MozBoxFlex:r,WebkitFlex:r,msFlex:r,flex:r}},flexBasis:function(r){return{WebkitFlexBasis:r,flexBasis:r}},justifyContent:function(r){return{WebkitJustifyContent:r,justifyContent:r}},transition:function(r){return{msTransition:r,MozTransition:r,OTransition:r,WebkitTransition:r,transition:r}},transform:function(r){return{msTransform:r,MozTransform:r,OTransform:r,WebkitTransform:r,transform:r}},absolute:function(r){var t=r&&r.split(" ");return{position:"absolute",top:t&&t[0],right:t&&t[1],bottom:t&&t[2],left:t&&t[3]}},extend:function(r,t){var n=t[r];return n||{extend:r}}},$T=oo.autoprefix=function(r){var t={};return(0,fv.default)(r,function(n,a){var i={};(0,fv.default)(n,function(o,u){var s=_T[u];s?i=TT({},i,s(o)):i[u]=o}),t[a]=i}),t};oo.default=$T;var so={};Object.defineProperty(so,"__esModule",{value:!0});so.hover=void 0;var FT=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},BT=$,Ku=RT(BT);function RT(e){return e&&e.__esModule?e:{default:e}}function PT(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function pv(e,r){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r&&(typeof r=="object"||typeof r=="function")?r:e}function zT(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof r);e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),r&&(Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r)}var IT=so.hover=function(r){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return function(n){zT(a,n);function a(){var i,o,u,s;PT(this,a);for(var l=arguments.length,c=Array(l),f=0;f<l;f++)c[f]=arguments[f];return s=(o=(u=pv(this,(i=a.__proto__||Object.getPrototypeOf(a)).call.apply(i,[this].concat(c))),u),u.state={hover:!1},u.handleMouseOver=function(){return u.setState({hover:!0})},u.handleMouseOut=function(){return u.setState({hover:!1})},u.render=function(){return Ku.default.createElement(t,{onMouseOver:u.handleMouseOver,onMouseOut:u.handleMouseOut},Ku.default.createElement(r,FT({},u.props,u.state)))},o),pv(u,s)}return a}(Ku.default.Component)};so.default=IT;var uo={};Object.defineProperty(uo,"__esModule",{value:!0});uo.active=void 0;var LT=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},qT=$,Ju=kT(qT);function kT(e){return e&&e.__esModule?e:{default:e}}function UT(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function vv(e,r){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r&&(typeof r=="object"||typeof r=="function")?r:e}function HT(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof r);e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),r&&(Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r)}var jT=uo.active=function(r){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return function(n){HT(a,n);function a(){var i,o,u,s;UT(this,a);for(var l=arguments.length,c=Array(l),f=0;f<l;f++)c[f]=arguments[f];return s=(o=(u=vv(this,(i=a.__proto__||Object.getPrototypeOf(a)).call.apply(i,[this].concat(c))),u),u.state={active:!1},u.handleMouseDown=function(){return u.setState({active:!0})},u.handleMouseUp=function(){return u.setState({active:!1})},u.render=function(){return Ju.default.createElement(t,{onMouseDown:u.handleMouseDown,onMouseUp:u.handleMouseUp},Ju.default.createElement(r,LT({},u.props,u.state)))},o),vv(u,s)}return a}(Ju.default.Component)};uo.default=jT;var _c={};Object.defineProperty(_c,"__esModule",{value:!0});var VT=function(r,t){var n={},a=function(o){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;n[o]=u};return r===0&&a("first-child"),r===t-1&&a("last-child"),(r===0||r%2===0)&&a("even"),Math.abs(r%2)===1&&a("odd"),a("nth-child",r),n};_c.default=VT;Object.defineProperty(Ot,"__esModule",{value:!0});Ot.ReactCSS=Ot.loop=Ot.handleActive=$c=Ot.handleHover=Ot.hover=void 0;var GT=to,WT=ci(GT),ZT=io,YT=ci(ZT),XT=oo,KT=ci(XT),JT=so,Rg=ci(JT),QT=uo,eO=ci(QT),rO=_c,tO=ci(rO);function ci(e){return e&&e.__esModule?e:{default:e}}Ot.hover=Rg.default;var $c=Ot.handleHover=Rg.default;Ot.handleActive=eO.default;Ot.loop=tO.default;var nO=Ot.ReactCSS=function(r){for(var t=arguments.length,n=Array(t>1?t-1:0),a=1;a<t;a++)n[a-1]=arguments[a];var i=(0,WT.default)(n),o=(0,YT.default)(r,i);return(0,KT.default)(o)},Ze=Ot.default=nO,aO=function(r,t,n,a,i){var o=i.clientWidth,u=i.clientHeight,s=typeof r.pageX=="number"?r.pageX:r.touches[0].pageX,l=typeof r.pageY=="number"?r.pageY:r.touches[0].pageY,c=s-(i.getBoundingClientRect().left+window.pageXOffset),f=l-(i.getBoundingClientRect().top+window.pageYOffset);if(n==="vertical"){var p=void 0;if(f<0?p=0:f>u?p=1:p=Math.round(f*100/u)/100,t.a!==p)return{h:t.h,s:t.s,l:t.l,a:p,source:"rgb"}}else{var v=void 0;if(c<0?v=0:c>o?v=1:v=Math.round(c*100/o)/100,a!==v)return{h:t.h,s:t.s,l:t.l,a:v,source:"rgb"}}return null},Qu={},iO=function(r,t,n,a){if(typeof document>"u"&&!a)return null;var i=a?new a:document.createElement("canvas");i.width=n*2,i.height=n*2;var o=i.getContext("2d");return o?(o.fillStyle=r,o.fillRect(0,0,i.width,i.height),o.fillStyle=t,o.fillRect(0,0,n,n),o.translate(n,n),o.fillRect(0,0,n,n),i.toDataURL()):null},oO=function(r,t,n,a){var i=r+"-"+t+"-"+n+(a?"-server":"");if(Qu[i])return Qu[i];var o=iO(r,t,n,a);return Qu[i]=o,o},dv=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},fi=function(r){var t=r.white,n=r.grey,a=r.size,i=r.renderers,o=r.borderRadius,u=r.boxShadow,s=r.children,l=Ze({default:{grid:{borderRadius:o,boxShadow:u,absolute:"0px 0px 0px 0px",background:"url("+oO(t,n,a,i.canvas)+") center left"}}});return $.isValidElement(s)?$.cloneElement(s,dv({},s.props,{style:dv({},s.props.style,l.grid)})):$.createElement("div",{style:l.grid})};fi.defaultProps={size:8,white:"transparent",grey:"rgba(0,0,0,.08)",renderers:{}};var sO=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},uO=function(){function e(r,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(r,a.key,a)}}return function(r,t,n){return t&&e(r.prototype,t),n&&e(r,n),r}}();function lO(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function mv(e,r){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r&&(typeof r=="object"||typeof r=="function")?r:e}function cO(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof r);e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),r&&(Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r)}var Fc=function(e){cO(r,e);function r(){var t,n,a,i;lO(this,r);for(var o=arguments.length,u=Array(o),s=0;s<o;s++)u[s]=arguments[s];return i=(n=(a=mv(this,(t=r.__proto__||Object.getPrototypeOf(r)).call.apply(t,[this].concat(u))),a),a.handleChange=function(l){var c=aO(l,a.props.hsl,a.props.direction,a.props.a,a.container);c&&typeof a.props.onChange=="function"&&a.props.onChange(c,l)},a.handleMouseDown=function(l){a.handleChange(l),window.addEventListener("mousemove",a.handleChange),window.addEventListener("mouseup",a.handleMouseUp)},a.handleMouseUp=function(){a.unbindEventListeners()},a.unbindEventListeners=function(){window.removeEventListener("mousemove",a.handleChange),window.removeEventListener("mouseup",a.handleMouseUp)},n),mv(a,i)}return uO(r,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"render",value:function(){var n=this,a=this.props.rgb,i=Ze({default:{alpha:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},checkboard:{absolute:"0px 0px 0px 0px",overflow:"hidden",borderRadius:this.props.radius},gradient:{absolute:"0px 0px 0px 0px",background:"linear-gradient(to right, rgba("+a.r+","+a.g+","+a.b+`, 0) 0%,
|
|
26
|
+
rgba(`+a.r+","+a.g+","+a.b+", 1) 100%)",boxShadow:this.props.shadow,borderRadius:this.props.radius},container:{position:"relative",height:"100%",margin:"0 3px"},pointer:{position:"absolute",left:a.a*100+"%"},slider:{width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",marginTop:"1px",transform:"translateX(-2px)"}},vertical:{gradient:{background:"linear-gradient(to bottom, rgba("+a.r+","+a.g+","+a.b+`, 0) 0%,
|
|
27
|
+
rgba(`+a.r+","+a.g+","+a.b+", 1) 100%)"},pointer:{left:0,top:a.a*100+"%"}},overwrite:sO({},this.props.style)},{vertical:this.props.direction==="vertical",overwrite:!0});return $.createElement("div",{style:i.alpha},$.createElement("div",{style:i.checkboard},$.createElement(fi,{renderers:this.props.renderers})),$.createElement("div",{style:i.gradient}),$.createElement("div",{style:i.container,ref:function(u){return n.container=u},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},$.createElement("div",{style:i.pointer},this.props.pointer?$.createElement(this.props.pointer,this.props):$.createElement("div",{style:i.slider}))))}}]),r}($.PureComponent||$.Component),fO=function(){function e(r,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(r,a.key,a)}}return function(r,t,n){return t&&e(r.prototype,t),n&&e(r,n),r}}();function pO(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function vO(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function dO(e,r){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r&&(typeof r=="object"||typeof r=="function")?r:e}function mO(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof r);e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),r&&(Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r)}var hO=1,Pg=38,gO=40,yO=[Pg,gO],bO=function(r){return yO.indexOf(r)>-1},xO=function(r){return Number(String(r).replace(/%/g,""))},wO=1,vr=function(e){mO(r,e);function r(t){vO(this,r);var n=dO(this,(r.__proto__||Object.getPrototypeOf(r)).call(this));return n.handleBlur=function(){n.state.blurValue&&n.setState({value:n.state.blurValue,blurValue:null})},n.handleChange=function(a){n.setUpdatedValue(a.target.value,a)},n.handleKeyDown=function(a){var i=xO(a.target.value);if(!isNaN(i)&&bO(a.keyCode)){var o=n.getArrowOffset(),u=a.keyCode===Pg?i+o:i-o;n.setUpdatedValue(u,a)}},n.handleDrag=function(a){if(n.props.dragLabel){var i=Math.round(n.props.value+a.movementX);i>=0&&i<=n.props.dragMax&&n.props.onChange&&n.props.onChange(n.getValueObjectWithLabel(i),a)}},n.handleMouseDown=function(a){n.props.dragLabel&&(a.preventDefault(),n.handleDrag(a),window.addEventListener("mousemove",n.handleDrag),window.addEventListener("mouseup",n.handleMouseUp))},n.handleMouseUp=function(){n.unbindEventListeners()},n.unbindEventListeners=function(){window.removeEventListener("mousemove",n.handleDrag),window.removeEventListener("mouseup",n.handleMouseUp)},n.state={value:String(t.value).toUpperCase(),blurValue:String(t.value).toUpperCase()},n.inputId="rc-editable-input-"+wO++,n}return fO(r,[{key:"componentDidUpdate",value:function(n,a){this.props.value!==this.state.value&&(n.value!==this.props.value||a.value!==this.state.value)&&(this.input===document.activeElement?this.setState({blurValue:String(this.props.value).toUpperCase()}):this.setState({value:String(this.props.value).toUpperCase(),blurValue:!this.state.blurValue&&String(this.props.value).toUpperCase()}))}},{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"getValueObjectWithLabel",value:function(n){return pO({},this.props.label,n)}},{key:"getArrowOffset",value:function(){return this.props.arrowOffset||hO}},{key:"setUpdatedValue",value:function(n,a){var i=this.props.label?this.getValueObjectWithLabel(n):n;this.props.onChange&&this.props.onChange(i,a),this.setState({value:n})}},{key:"render",value:function(){var n=this,a=Ze({default:{wrap:{position:"relative"}},"user-override":{wrap:this.props.style&&this.props.style.wrap?this.props.style.wrap:{},input:this.props.style&&this.props.style.input?this.props.style.input:{},label:this.props.style&&this.props.style.label?this.props.style.label:{}},"dragLabel-true":{label:{cursor:"ew-resize"}}},{"user-override":!0},this.props);return $.createElement("div",{style:a.wrap},$.createElement("input",{id:this.inputId,style:a.input,ref:function(o){return n.input=o},value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,onBlur:this.handleBlur,placeholder:this.props.placeholder,spellCheck:"false"}),this.props.label&&!this.props.hideLabel?$.createElement("label",{htmlFor:this.inputId,style:a.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),r}($.PureComponent||$.Component),EO=function(r,t,n,a){var i=a.clientWidth,o=a.clientHeight,u=typeof r.pageX=="number"?r.pageX:r.touches[0].pageX,s=typeof r.pageY=="number"?r.pageY:r.touches[0].pageY,l=u-(a.getBoundingClientRect().left+window.pageXOffset),c=s-(a.getBoundingClientRect().top+window.pageYOffset);if(t==="vertical"){var f=void 0;if(c<0)f=359;else if(c>o)f=0;else{var p=-(c*100/o)+100;f=360*p/100}if(n.h!==f)return{h:f,s:n.s,l:n.l,a:n.a,source:"hsl"}}else{var v=void 0;if(l<0)v=0;else if(l>i)v=359;else{var m=l*100/i;v=360*m/100}if(n.h!==v)return{h:v,s:n.s,l:n.l,a:n.a,source:"hsl"}}return null},SO=function(){function e(r,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(r,a.key,a)}}return function(r,t,n){return t&&e(r.prototype,t),n&&e(r,n),r}}();function AO(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function hv(e,r){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r&&(typeof r=="object"||typeof r=="function")?r:e}function DO(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof r);e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),r&&(Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r)}var pi=function(e){DO(r,e);function r(){var t,n,a,i;AO(this,r);for(var o=arguments.length,u=Array(o),s=0;s<o;s++)u[s]=arguments[s];return i=(n=(a=hv(this,(t=r.__proto__||Object.getPrototypeOf(r)).call.apply(t,[this].concat(u))),a),a.handleChange=function(l){var c=EO(l,a.props.direction,a.props.hsl,a.container);c&&typeof a.props.onChange=="function"&&a.props.onChange(c,l)},a.handleMouseDown=function(l){a.handleChange(l),window.addEventListener("mousemove",a.handleChange),window.addEventListener("mouseup",a.handleMouseUp)},a.handleMouseUp=function(){a.unbindEventListeners()},n),hv(a,i)}return SO(r,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"unbindEventListeners",value:function(){window.removeEventListener("mousemove",this.handleChange),window.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var n=this,a=this.props.direction,i=a===void 0?"horizontal":a,o=Ze({default:{hue:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius,boxShadow:this.props.shadow},container:{padding:"0 2px",position:"relative",height:"100%",borderRadius:this.props.radius},pointer:{position:"absolute",left:this.props.hsl.h*100/360+"%"},slider:{marginTop:"1px",width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",transform:"translateX(-2px)"}},vertical:{pointer:{left:"0px",top:-(this.props.hsl.h*100/360)+100+"%"}}},{vertical:i==="vertical"});return $.createElement("div",{style:o.hue},$.createElement("div",{className:"hue-"+i,style:o.container,ref:function(s){return n.container=s},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},$.createElement("style",null,`
|
|
28
|
+
.hue-horizontal {
|
|
29
|
+
background: linear-gradient(to right, #f00 0%, #ff0 17%, #0f0
|
|
30
|
+
33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
|
|
31
|
+
background: -webkit-linear-gradient(to right, #f00 0%, #ff0
|
|
32
|
+
17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.hue-vertical {
|
|
36
|
+
background: linear-gradient(to top, #f00 0%, #ff0 17%, #0f0 33%,
|
|
37
|
+
#0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
|
|
38
|
+
background: -webkit-linear-gradient(to top, #f00 0%, #ff0 17%,
|
|
39
|
+
#0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
|
|
40
|
+
}
|
|
41
|
+
`),$.createElement("div",{style:o.pointer},this.props.pointer?$.createElement(this.props.pointer,this.props):$.createElement("div",{style:o.slider}))))}}]),r}($.PureComponent||$.Component),Fl={exports:{}},Bo={exports:{}},br={};/** @license React v16.13.1
|
|
42
|
+
* react-is.production.min.js
|
|
43
|
+
*
|
|
44
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
45
|
+
*
|
|
46
|
+
* This source code is licensed under the MIT license found in the
|
|
47
|
+
* LICENSE file in the root directory of this source tree.
|
|
48
|
+
*/var gv;function NO(){if(gv)return br;gv=1;var e=typeof Symbol=="function"&&Symbol.for,r=e?Symbol.for("react.element"):60103,t=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,a=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,u=e?Symbol.for("react.context"):60110,s=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,v=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,d=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,h=e?Symbol.for("react.responder"):60118,E=e?Symbol.for("react.scope"):60119;function g(x){if(typeof x=="object"&&x!==null){var b=x.$$typeof;switch(b){case r:switch(x=x.type,x){case s:case l:case n:case i:case a:case f:return x;default:switch(x=x&&x.$$typeof,x){case u:case c:case m:case v:case o:return x;default:return b}}case t:return b}}}function w(x){return g(x)===l}return br.AsyncMode=s,br.ConcurrentMode=l,br.ContextConsumer=u,br.ContextProvider=o,br.Element=r,br.ForwardRef=c,br.Fragment=n,br.Lazy=m,br.Memo=v,br.Portal=t,br.Profiler=i,br.StrictMode=a,br.Suspense=f,br.isAsyncMode=function(x){return w(x)||g(x)===s},br.isConcurrentMode=w,br.isContextConsumer=function(x){return g(x)===u},br.isContextProvider=function(x){return g(x)===o},br.isElement=function(x){return typeof x=="object"&&x!==null&&x.$$typeof===r},br.isForwardRef=function(x){return g(x)===c},br.isFragment=function(x){return g(x)===n},br.isLazy=function(x){return g(x)===m},br.isMemo=function(x){return g(x)===v},br.isPortal=function(x){return g(x)===t},br.isProfiler=function(x){return g(x)===i},br.isStrictMode=function(x){return g(x)===a},br.isSuspense=function(x){return g(x)===f},br.isValidElementType=function(x){return typeof x=="string"||typeof x=="function"||x===n||x===l||x===i||x===a||x===f||x===p||typeof x=="object"&&x!==null&&(x.$$typeof===m||x.$$typeof===v||x.$$typeof===o||x.$$typeof===u||x.$$typeof===c||x.$$typeof===y||x.$$typeof===h||x.$$typeof===E||x.$$typeof===d)},br.typeOf=g,br}var xr={};/** @license React v16.13.1
|
|
49
|
+
* react-is.development.js
|
|
50
|
+
*
|
|
51
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
52
|
+
*
|
|
53
|
+
* This source code is licensed under the MIT license found in the
|
|
54
|
+
* LICENSE file in the root directory of this source tree.
|
|
55
|
+
*/var yv;function CO(){return yv||(yv=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,r=e?Symbol.for("react.element"):60103,t=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,a=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,u=e?Symbol.for("react.context"):60110,s=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,v=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,d=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,h=e?Symbol.for("react.responder"):60118,E=e?Symbol.for("react.scope"):60119;function g(ne){return typeof ne=="string"||typeof ne=="function"||ne===n||ne===l||ne===i||ne===a||ne===f||ne===p||typeof ne=="object"&&ne!==null&&(ne.$$typeof===m||ne.$$typeof===v||ne.$$typeof===o||ne.$$typeof===u||ne.$$typeof===c||ne.$$typeof===y||ne.$$typeof===h||ne.$$typeof===E||ne.$$typeof===d)}function w(ne){if(typeof ne=="object"&&ne!==null){var be=ne.$$typeof;switch(be){case r:var $e=ne.type;switch($e){case s:case l:case n:case i:case a:case f:return $e;default:var k=$e&&$e.$$typeof;switch(k){case u:case c:case m:case v:case o:return k;default:return be}}case t:return be}}}var x=s,b=l,A=u,D=o,S=r,N=c,C=n,M=m,B=v,P=t,R=i,_=a,O=f,U=!1;function F(ne){return U||(U=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),q(ne)||w(ne)===s}function q(ne){return w(ne)===l}function Y(ne){return w(ne)===u}function V(ne){return w(ne)===o}function z(ne){return typeof ne=="object"&&ne!==null&&ne.$$typeof===r}function J(ne){return w(ne)===c}function le(ne){return w(ne)===n}function Q(ne){return w(ne)===m}function re(ne){return w(ne)===v}function se(ne){return w(ne)===t}function te(ne){return w(ne)===i}function ae(ne){return w(ne)===a}function fe(ne){return w(ne)===f}xr.AsyncMode=x,xr.ConcurrentMode=b,xr.ContextConsumer=A,xr.ContextProvider=D,xr.Element=S,xr.ForwardRef=N,xr.Fragment=C,xr.Lazy=M,xr.Memo=B,xr.Portal=P,xr.Profiler=R,xr.StrictMode=_,xr.Suspense=O,xr.isAsyncMode=F,xr.isConcurrentMode=q,xr.isContextConsumer=Y,xr.isContextProvider=V,xr.isElement=z,xr.isForwardRef=J,xr.isFragment=le,xr.isLazy=Q,xr.isMemo=re,xr.isPortal=se,xr.isProfiler=te,xr.isStrictMode=ae,xr.isSuspense=fe,xr.isValidElementType=g,xr.typeOf=w}()),xr}var bv;function zg(){return bv||(bv=1,process.env.NODE_ENV==="production"?Bo.exports=NO():Bo.exports=CO()),Bo.exports}/*
|
|
56
|
+
object-assign
|
|
57
|
+
(c) Sindre Sorhus
|
|
58
|
+
@license MIT
|
|
59
|
+
*/var el,xv;function MO(){if(xv)return el;xv=1;var e=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,t=Object.prototype.propertyIsEnumerable;function n(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function a(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var o={},u=0;u<10;u++)o["_"+String.fromCharCode(u)]=u;var s=Object.getOwnPropertyNames(o).map(function(c){return o[c]});if(s.join("")!=="0123456789")return!1;var l={};return"abcdefghijklmnopqrst".split("").forEach(function(c){l[c]=c}),Object.keys(Object.assign({},l)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return el=a()?Object.assign:function(i,o){for(var u,s=n(i),l,c=1;c<arguments.length;c++){u=Object(arguments[c]);for(var f in u)r.call(u,f)&&(s[f]=u[f]);if(e){l=e(u);for(var p=0;p<l.length;p++)t.call(u,l[p])&&(s[l[p]]=u[l[p]])}}return s},el}var rl,wv;function Bc(){if(wv)return rl;wv=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return rl=e,rl}var tl,Ev;function Ig(){return Ev||(Ev=1,tl=Function.call.bind(Object.prototype.hasOwnProperty)),tl}var nl,Sv;function TO(){if(Sv)return nl;Sv=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var r=Bc(),t={},n=Ig();e=function(i){var o="Warning: "+i;typeof console<"u"&&console.error(o);try{throw new Error(o)}catch{}}}function a(i,o,u,s,l){if(process.env.NODE_ENV!=="production"){for(var c in i)if(n(i,c)){var f;try{if(typeof i[c]!="function"){var p=Error((s||"React class")+": "+u+" type `"+c+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[c]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw p.name="Invariant Violation",p}f=i[c](o,c,s,u,null,r)}catch(m){f=m}if(f&&!(f instanceof Error)&&e((s||"React class")+": type specification of "+u+" `"+c+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in t)){t[f.message]=!0;var v=l?l():"";e("Failed "+u+" type: "+f.message+(v??""))}}}}return a.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(t={})},nl=a,nl}var al,Av;function OO(){if(Av)return al;Av=1;var e=zg(),r=MO(),t=Bc(),n=Ig(),a=TO(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(u){var s="Warning: "+u;typeof console<"u"&&console.error(s);try{throw new Error(s)}catch{}});function o(){return null}return al=function(u,s){var l=typeof Symbol=="function"&&Symbol.iterator,c="@@iterator";function f(q){var Y=q&&(l&&q[l]||q[c]);if(typeof Y=="function")return Y}var p="<<anonymous>>",v={array:h("array"),bigint:h("bigint"),bool:h("boolean"),func:h("function"),number:h("number"),object:h("object"),string:h("string"),symbol:h("symbol"),any:E(),arrayOf:g,element:w(),elementType:x(),instanceOf:b,node:N(),objectOf:D,oneOf:A,oneOfType:S,shape:M,exact:B};function m(q,Y){return q===Y?q!==0||1/q===1/Y:q!==q&&Y!==Y}function d(q,Y){this.message=q,this.data=Y&&typeof Y=="object"?Y:{},this.stack=""}d.prototype=Error.prototype;function y(q){if(process.env.NODE_ENV!=="production")var Y={},V=0;function z(le,Q,re,se,te,ae,fe){if(se=se||p,ae=ae||re,fe!==t){if(s){var ne=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw ne.name="Invariant Violation",ne}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var be=se+":"+re;!Y[be]&&V<3&&(i("You are manually calling a React.PropTypes validation function for the `"+ae+"` prop on `"+se+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),Y[be]=!0,V++)}}return Q[re]==null?le?Q[re]===null?new d("The "+te+" `"+ae+"` is marked as required "+("in `"+se+"`, but its value is `null`.")):new d("The "+te+" `"+ae+"` is marked as required in "+("`"+se+"`, but its value is `undefined`.")):null:q(Q,re,se,te,ae)}var J=z.bind(null,!1);return J.isRequired=z.bind(null,!0),J}function h(q){function Y(V,z,J,le,Q,re){var se=V[z],te=_(se);if(te!==q){var ae=O(se);return new d("Invalid "+le+" `"+Q+"` of type "+("`"+ae+"` supplied to `"+J+"`, expected ")+("`"+q+"`."),{expectedType:q})}return null}return y(Y)}function E(){return y(o)}function g(q){function Y(V,z,J,le,Q){if(typeof q!="function")return new d("Property `"+Q+"` of component `"+J+"` has invalid PropType notation inside arrayOf.");var re=V[z];if(!Array.isArray(re)){var se=_(re);return new d("Invalid "+le+" `"+Q+"` of type "+("`"+se+"` supplied to `"+J+"`, expected an array."))}for(var te=0;te<re.length;te++){var ae=q(re,te,J,le,Q+"["+te+"]",t);if(ae instanceof Error)return ae}return null}return y(Y)}function w(){function q(Y,V,z,J,le){var Q=Y[V];if(!u(Q)){var re=_(Q);return new d("Invalid "+J+" `"+le+"` of type "+("`"+re+"` supplied to `"+z+"`, expected a single ReactElement."))}return null}return y(q)}function x(){function q(Y,V,z,J,le){var Q=Y[V];if(!e.isValidElementType(Q)){var re=_(Q);return new d("Invalid "+J+" `"+le+"` of type "+("`"+re+"` supplied to `"+z+"`, expected a single ReactElement type."))}return null}return y(q)}function b(q){function Y(V,z,J,le,Q){if(!(V[z]instanceof q)){var re=q.name||p,se=F(V[z]);return new d("Invalid "+le+" `"+Q+"` of type "+("`"+se+"` supplied to `"+J+"`, expected ")+("instance of `"+re+"`."))}return null}return y(Y)}function A(q){if(!Array.isArray(q))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),o;function Y(V,z,J,le,Q){for(var re=V[z],se=0;se<q.length;se++)if(m(re,q[se]))return null;var te=JSON.stringify(q,function(fe,ne){var be=O(ne);return be==="symbol"?String(ne):ne});return new d("Invalid "+le+" `"+Q+"` of value `"+String(re)+"` "+("supplied to `"+J+"`, expected one of "+te+"."))}return y(Y)}function D(q){function Y(V,z,J,le,Q){if(typeof q!="function")return new d("Property `"+Q+"` of component `"+J+"` has invalid PropType notation inside objectOf.");var re=V[z],se=_(re);if(se!=="object")return new d("Invalid "+le+" `"+Q+"` of type "+("`"+se+"` supplied to `"+J+"`, expected an object."));for(var te in re)if(n(re,te)){var ae=q(re,te,J,le,Q+"."+te,t);if(ae instanceof Error)return ae}return null}return y(Y)}function S(q){if(!Array.isArray(q))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),o;for(var Y=0;Y<q.length;Y++){var V=q[Y];if(typeof V!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+U(V)+" at index "+Y+"."),o}function z(J,le,Q,re,se){for(var te=[],ae=0;ae<q.length;ae++){var fe=q[ae],ne=fe(J,le,Q,re,se,t);if(ne==null)return null;ne.data&&n(ne.data,"expectedType")&&te.push(ne.data.expectedType)}var be=te.length>0?", expected one of type ["+te.join(", ")+"]":"";return new d("Invalid "+re+" `"+se+"` supplied to "+("`"+Q+"`"+be+"."))}return y(z)}function N(){function q(Y,V,z,J,le){return P(Y[V])?null:new d("Invalid "+J+" `"+le+"` supplied to "+("`"+z+"`, expected a ReactNode."))}return y(q)}function C(q,Y,V,z,J){return new d((q||"React class")+": "+Y+" type `"+V+"."+z+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+J+"`.")}function M(q){function Y(V,z,J,le,Q){var re=V[z],se=_(re);if(se!=="object")return new d("Invalid "+le+" `"+Q+"` of type `"+se+"` "+("supplied to `"+J+"`, expected `object`."));for(var te in q){var ae=q[te];if(typeof ae!="function")return C(J,le,Q,te,O(ae));var fe=ae(re,te,J,le,Q+"."+te,t);if(fe)return fe}return null}return y(Y)}function B(q){function Y(V,z,J,le,Q){var re=V[z],se=_(re);if(se!=="object")return new d("Invalid "+le+" `"+Q+"` of type `"+se+"` "+("supplied to `"+J+"`, expected `object`."));var te=r({},V[z],q);for(var ae in te){var fe=q[ae];if(n(q,ae)&&typeof fe!="function")return C(J,le,Q,ae,O(fe));if(!fe)return new d("Invalid "+le+" `"+Q+"` key `"+ae+"` supplied to `"+J+"`.\nBad object: "+JSON.stringify(V[z],null," ")+`
|
|
60
|
+
Valid keys: `+JSON.stringify(Object.keys(q),null," "));var ne=fe(re,ae,J,le,Q+"."+ae,t);if(ne)return ne}return null}return y(Y)}function P(q){switch(typeof q){case"number":case"string":case"undefined":return!0;case"boolean":return!q;case"object":if(Array.isArray(q))return q.every(P);if(q===null||u(q))return!0;var Y=f(q);if(Y){var V=Y.call(q),z;if(Y!==q.entries){for(;!(z=V.next()).done;)if(!P(z.value))return!1}else for(;!(z=V.next()).done;){var J=z.value;if(J&&!P(J[1]))return!1}}else return!1;return!0;default:return!1}}function R(q,Y){return q==="symbol"?!0:Y?Y["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&Y instanceof Symbol:!1}function _(q){var Y=typeof q;return Array.isArray(q)?"array":q instanceof RegExp?"object":R(Y,q)?"symbol":Y}function O(q){if(typeof q>"u"||q===null)return""+q;var Y=_(q);if(Y==="object"){if(q instanceof Date)return"date";if(q instanceof RegExp)return"regexp"}return Y}function U(q){var Y=O(q);switch(Y){case"array":case"object":return"an "+Y;case"boolean":case"date":case"regexp":return"a "+Y;default:return Y}}function F(q){return!q.constructor||!q.constructor.name?p:q.constructor.name}return v.checkPropTypes=a,v.resetWarningCache=a.resetWarningCache,v.PropTypes=v,v},al}var il,Dv;function _O(){if(Dv)return il;Dv=1;var e=Bc();function r(){}function t(){}return t.resetWarningCache=r,il=function(){function n(o,u,s,l,c,f){if(f!==e){var p=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw p.name="Invariant Violation",p}}n.isRequired=n;function a(){return n}var i={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:a,element:n,elementType:n,instanceOf:a,node:n,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:t,resetWarningCache:r};return i.PropTypes=i,i},il}if(process.env.NODE_ENV!=="production"){var $O=zg(),FO=!0;Fl.exports=OO()($O.isElement,FO)}else Fl.exports=_O()();var BO=Fl.exports;const Fe=ye.getDefaultExportFromCjs(BO);function RO(){this.__data__=[],this.size=0}function lo(e,r){return e===r||e!==e&&r!==r}function eu(e,r){for(var t=e.length;t--;)if(lo(e[t][0],r))return t;return-1}var PO=Array.prototype,zO=PO.splice;function IO(e){var r=this.__data__,t=eu(r,e);if(t<0)return!1;var n=r.length-1;return t==n?r.pop():zO.call(r,t,1),--this.size,!0}function LO(e){var r=this.__data__,t=eu(r,e);return t<0?void 0:r[t][1]}function qO(e){return eu(this.__data__,e)>-1}function kO(e,r){var t=this.__data__,n=eu(t,e);return n<0?(++this.size,t.push([e,r])):t[n][1]=r,this}function xn(e){var r=-1,t=e==null?0:e.length;for(this.clear();++r<t;){var n=e[r];this.set(n[0],n[1])}}xn.prototype.clear=RO;xn.prototype.delete=IO;xn.prototype.get=LO;xn.prototype.has=qO;xn.prototype.set=kO;function UO(){this.__data__=new xn,this.size=0}function HO(e){var r=this.__data__,t=r.delete(e);return this.size=r.size,t}function jO(e){return this.__data__.get(e)}function VO(e){return this.__data__.has(e)}var Lg=typeof global=="object"&&global&&global.Object===Object&&global,GO=typeof self=="object"&&self&&self.Object===Object&&self,Zt=Lg||GO||Function("return this")(),$n=Zt.Symbol,qg=Object.prototype,WO=qg.hasOwnProperty,ZO=qg.toString,Pi=$n?$n.toStringTag:void 0;function YO(e){var r=WO.call(e,Pi),t=e[Pi];try{e[Pi]=void 0;var n=!0}catch{}var a=ZO.call(e);return n&&(r?e[Pi]=t:delete e[Pi]),a}var XO=Object.prototype,KO=XO.toString;function JO(e){return KO.call(e)}var QO="[object Null]",e_="[object Undefined]",Nv=$n?$n.toStringTag:void 0;function ta(e){return e==null?e===void 0?e_:QO:Nv&&Nv in Object(e)?YO(e):JO(e)}function Ft(e){var r=typeof e;return e!=null&&(r=="object"||r=="function")}var r_="[object AsyncFunction]",t_="[object Function]",n_="[object GeneratorFunction]",a_="[object Proxy]";function Rc(e){if(!Ft(e))return!1;var r=ta(e);return r==t_||r==n_||r==r_||r==a_}var ol=Zt["__core-js_shared__"],Cv=function(){var e=/[^.]+$/.exec(ol&&ol.keys&&ol.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function i_(e){return!!Cv&&Cv in e}var o_=Function.prototype,s_=o_.toString;function na(e){if(e!=null){try{return s_.call(e)}catch{}try{return e+""}catch{}}return""}var u_=/[\\^$.*+?()[\]{}|]/g,l_=/^\[object .+?Constructor\]$/,c_=Function.prototype,f_=Object.prototype,p_=c_.toString,v_=f_.hasOwnProperty,d_=RegExp("^"+p_.call(v_).replace(u_,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function m_(e){if(!Ft(e)||i_(e))return!1;var r=Rc(e)?d_:l_;return r.test(na(e))}function h_(e,r){return e==null?void 0:e[r]}function aa(e,r){var t=h_(e,r);return m_(t)?t:void 0}var Zi=aa(Zt,"Map"),Yi=aa(Object,"create");function g_(){this.__data__=Yi?Yi(null):{},this.size=0}function y_(e){var r=this.has(e)&&delete this.__data__[e];return this.size-=r?1:0,r}var b_="__lodash_hash_undefined__",x_=Object.prototype,w_=x_.hasOwnProperty;function E_(e){var r=this.__data__;if(Yi){var t=r[e];return t===b_?void 0:t}return w_.call(r,e)?r[e]:void 0}var S_=Object.prototype,A_=S_.hasOwnProperty;function D_(e){var r=this.__data__;return Yi?r[e]!==void 0:A_.call(r,e)}var N_="__lodash_hash_undefined__";function C_(e,r){var t=this.__data__;return this.size+=this.has(e)?0:1,t[e]=Yi&&r===void 0?N_:r,this}function Kn(e){var r=-1,t=e==null?0:e.length;for(this.clear();++r<t;){var n=e[r];this.set(n[0],n[1])}}Kn.prototype.clear=g_;Kn.prototype.delete=y_;Kn.prototype.get=E_;Kn.prototype.has=D_;Kn.prototype.set=C_;function M_(){this.size=0,this.__data__={hash:new Kn,map:new(Zi||xn),string:new Kn}}function T_(e){var r=typeof e;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?e!=="__proto__":e===null}function ru(e,r){var t=e.__data__;return T_(r)?t[typeof r=="string"?"string":"hash"]:t.map}function O_(e){var r=ru(this,e).delete(e);return this.size-=r?1:0,r}function __(e){return ru(this,e).get(e)}function $_(e){return ru(this,e).has(e)}function F_(e,r){var t=ru(this,e),n=t.size;return t.set(e,r),this.size+=t.size==n?0:1,this}function wn(e){var r=-1,t=e==null?0:e.length;for(this.clear();++r<t;){var n=e[r];this.set(n[0],n[1])}}wn.prototype.clear=M_;wn.prototype.delete=O_;wn.prototype.get=__;wn.prototype.has=$_;wn.prototype.set=F_;var B_=200;function R_(e,r){var t=this.__data__;if(t instanceof xn){var n=t.__data__;if(!Zi||n.length<B_-1)return n.push([e,r]),this.size=++t.size,this;t=this.__data__=new wn(n)}return t.set(e,r),this.size=t.size,this}function rn(e){var r=this.__data__=new xn(e);this.size=r.size}rn.prototype.clear=UO;rn.prototype.delete=HO;rn.prototype.get=jO;rn.prototype.has=VO;rn.prototype.set=R_;var fs=function(){try{var e=aa(Object,"defineProperty");return e({},"",{}),e}catch{}}();function Pc(e,r,t){r=="__proto__"&&fs?fs(e,r,{configurable:!0,enumerable:!0,value:t,writable:!0}):e[r]=t}function Bl(e,r,t){(t!==void 0&&!lo(e[r],t)||t===void 0&&!(r in e))&&Pc(e,r,t)}function P_(e){return function(r,t,n){for(var a=-1,i=Object(r),o=n(r),u=o.length;u--;){var s=o[++a];if(t(i[s],s,i)===!1)break}return r}}var kg=P_(),Ug=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Mv=Ug&&typeof module=="object"&&module&&!module.nodeType&&module,z_=Mv&&Mv.exports===Ug,Tv=z_?Zt.Buffer:void 0;Tv&&Tv.allocUnsafe;function I_(e,r){return e.slice()}var ps=Zt.Uint8Array;function L_(e){var r=new e.constructor(e.byteLength);return new ps(r).set(new ps(e)),r}function q_(e,r){var t=L_(e.buffer);return new e.constructor(t,e.byteOffset,e.length)}function k_(e,r){var t=-1,n=e.length;for(r||(r=Array(n));++t<n;)r[t]=e[t];return r}var Ov=Object.create,U_=function(){function e(){}return function(r){if(!Ft(r))return{};if(Ov)return Ov(r);e.prototype=r;var t=new e;return e.prototype=void 0,t}}();function Hg(e,r){return function(t){return e(r(t))}}var jg=Hg(Object.getPrototypeOf,Object),H_=Object.prototype;function zc(e){var r=e&&e.constructor,t=typeof r=="function"&&r.prototype||H_;return e===t}function j_(e){return typeof e.constructor=="function"&&!zc(e)?U_(jg(e)):{}}function Fn(e){return e!=null&&typeof e=="object"}var V_="[object Arguments]";function _v(e){return Fn(e)&&ta(e)==V_}var Vg=Object.prototype,G_=Vg.hasOwnProperty,W_=Vg.propertyIsEnumerable,vs=_v(function(){return arguments}())?_v:function(e){return Fn(e)&&G_.call(e,"callee")&&!W_.call(e,"callee")},At=Array.isArray,Z_=9007199254740991;function Ic(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Z_}function vi(e){return e!=null&&Ic(e.length)&&!Rc(e)}function Y_(e){return Fn(e)&&vi(e)}function X_(){return!1}var Gg=typeof exports=="object"&&exports&&!exports.nodeType&&exports,$v=Gg&&typeof module=="object"&&module&&!module.nodeType&&module,K_=$v&&$v.exports===Gg,Fv=K_?Zt.Buffer:void 0,J_=Fv?Fv.isBuffer:void 0,ds=J_||X_,Q_="[object Object]",e$=Function.prototype,r$=Object.prototype,Wg=e$.toString,t$=r$.hasOwnProperty,n$=Wg.call(Object);function a$(e){if(!Fn(e)||ta(e)!=Q_)return!1;var r=jg(e);if(r===null)return!0;var t=t$.call(r,"constructor")&&r.constructor;return typeof t=="function"&&t instanceof t&&Wg.call(t)==n$}var i$="[object Arguments]",o$="[object Array]",s$="[object Boolean]",u$="[object Date]",l$="[object Error]",c$="[object Function]",f$="[object Map]",p$="[object Number]",v$="[object Object]",d$="[object RegExp]",m$="[object Set]",h$="[object String]",g$="[object WeakMap]",y$="[object ArrayBuffer]",b$="[object DataView]",x$="[object Float32Array]",w$="[object Float64Array]",E$="[object Int8Array]",S$="[object Int16Array]",A$="[object Int32Array]",D$="[object Uint8Array]",N$="[object Uint8ClampedArray]",C$="[object Uint16Array]",M$="[object Uint32Array]",$r={};$r[x$]=$r[w$]=$r[E$]=$r[S$]=$r[A$]=$r[D$]=$r[N$]=$r[C$]=$r[M$]=!0;$r[i$]=$r[o$]=$r[y$]=$r[s$]=$r[b$]=$r[u$]=$r[l$]=$r[c$]=$r[f$]=$r[p$]=$r[v$]=$r[d$]=$r[m$]=$r[h$]=$r[g$]=!1;function T$(e){return Fn(e)&&Ic(e.length)&&!!$r[ta(e)]}function O$(e){return function(r){return e(r)}}var Zg=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Wi=Zg&&typeof module=="object"&&module&&!module.nodeType&&module,_$=Wi&&Wi.exports===Zg,sl=_$&&Lg.process,Bv=function(){try{var e=Wi&&Wi.require&&Wi.require("util").types;return e||sl&&sl.binding&&sl.binding("util")}catch{}}(),Rv=Bv&&Bv.isTypedArray,Lc=Rv?O$(Rv):T$;function Rl(e,r){if(!(r==="constructor"&&typeof e[r]=="function")&&r!="__proto__")return e[r]}var $$=Object.prototype,F$=$$.hasOwnProperty;function B$(e,r,t){var n=e[r];(!(F$.call(e,r)&&lo(n,t))||t===void 0&&!(r in e))&&Pc(e,r,t)}function R$(e,r,t,n){var a=!t;t||(t={});for(var i=-1,o=r.length;++i<o;){var u=r[i],s=void 0;s===void 0&&(s=e[u]),a?Pc(t,u,s):B$(t,u,s)}return t}function P$(e,r){for(var t=-1,n=Array(e);++t<e;)n[t]=r(t);return n}var z$=9007199254740991,I$=/^(?:0|[1-9]\d*)$/;function qc(e,r){var t=typeof e;return r=r??z$,!!r&&(t=="number"||t!="symbol"&&I$.test(e))&&e>-1&&e%1==0&&e<r}var L$=Object.prototype,q$=L$.hasOwnProperty;function Yg(e,r){var t=At(e),n=!t&&vs(e),a=!t&&!n&&ds(e),i=!t&&!n&&!a&&Lc(e),o=t||n||a||i,u=o?P$(e.length,String):[],s=u.length;for(var l in e)(r||q$.call(e,l))&&!(o&&(l=="length"||a&&(l=="offset"||l=="parent")||i&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||qc(l,s)))&&u.push(l);return u}function k$(e){var r=[];if(e!=null)for(var t in Object(e))r.push(t);return r}var U$=Object.prototype,H$=U$.hasOwnProperty;function j$(e){if(!Ft(e))return k$(e);var r=zc(e),t=[];for(var n in e)n=="constructor"&&(r||!H$.call(e,n))||t.push(n);return t}function Xg(e){return vi(e)?Yg(e,!0):j$(e)}function V$(e){return R$(e,Xg(e))}function G$(e,r,t,n,a,i,o){var u=Rl(e,t),s=Rl(r,t),l=o.get(s);if(l){Bl(e,t,l);return}var c=i?i(u,s,t+"",e,r,o):void 0,f=c===void 0;if(f){var p=At(s),v=!p&&ds(s),m=!p&&!v&&Lc(s);c=s,p||v||m?At(u)?c=u:Y_(u)?c=k_(u):v?(f=!1,c=I_(s)):m?(f=!1,c=q_(s)):c=[]:a$(s)||vs(s)?(c=u,vs(u)?c=V$(u):(!Ft(u)||Rc(u))&&(c=j_(s))):f=!1}f&&(o.set(s,c),a(c,s,n,i,o),o.delete(s)),Bl(e,t,c)}function Kg(e,r,t,n,a){e!==r&&kg(r,function(i,o){if(a||(a=new rn),Ft(i))G$(e,r,o,t,Kg,n,a);else{var u=n?n(Rl(e,o),i,o+"",e,r,a):void 0;u===void 0&&(u=i),Bl(e,o,u)}},Xg)}function tu(e){return e}function W$(e,r,t){switch(t.length){case 0:return e.call(r);case 1:return e.call(r,t[0]);case 2:return e.call(r,t[0],t[1]);case 3:return e.call(r,t[0],t[1],t[2])}return e.apply(r,t)}var Pv=Math.max;function Z$(e,r,t){return r=Pv(r===void 0?e.length-1:r,0),function(){for(var n=arguments,a=-1,i=Pv(n.length-r,0),o=Array(i);++a<i;)o[a]=n[r+a];a=-1;for(var u=Array(r+1);++a<r;)u[a]=n[a];return u[r]=t(o),W$(e,this,u)}}function Y$(e){return function(){return e}}var X$=fs?function(e,r){return fs(e,"toString",{configurable:!0,enumerable:!1,value:Y$(r),writable:!0})}:tu,K$=800,J$=16,Q$=Date.now;function eF(e){var r=0,t=0;return function(){var n=Q$(),a=J$-(n-t);if(t=n,a>0){if(++r>=K$)return arguments[0]}else r=0;return e.apply(void 0,arguments)}}var rF=eF(X$);function tF(e,r){return rF(Z$(e,r,tu),e+"")}function nF(e,r,t){if(!Ft(t))return!1;var n=typeof r;return(n=="number"?vi(t)&&qc(r,t.length):n=="string"&&r in t)?lo(t[r],e):!1}function aF(e){return tF(function(r,t){var n=-1,a=t.length,i=a>1?t[a-1]:void 0,o=a>2?t[2]:void 0;for(i=e.length>3&&typeof i=="function"?(a--,i):void 0,o&&nF(t[0],t[1],o)&&(i=a<3?void 0:i,a=1),r=Object(r);++n<a;){var u=t[n];u&&e(r,u,n,i)}return r})}var gt=aF(function(e,r,t){Kg(e,r,t)}),co=function(r){var t=r.zDepth,n=r.radius,a=r.background,i=r.children,o=r.styles,u=o===void 0?{}:o,s=Ze(gt({default:{wrap:{position:"relative",display:"inline-block"},content:{position:"relative"},bg:{absolute:"0px 0px 0px 0px",boxShadow:"0 "+t+"px "+t*4+"px rgba(0,0,0,.24)",borderRadius:n,background:a}},"zDepth-0":{bg:{boxShadow:"none"}},"zDepth-1":{bg:{boxShadow:"0 2px 10px rgba(0,0,0,.12), 0 2px 5px rgba(0,0,0,.16)"}},"zDepth-2":{bg:{boxShadow:"0 6px 20px rgba(0,0,0,.19), 0 8px 17px rgba(0,0,0,.2)"}},"zDepth-3":{bg:{boxShadow:"0 17px 50px rgba(0,0,0,.19), 0 12px 15px rgba(0,0,0,.24)"}},"zDepth-4":{bg:{boxShadow:"0 25px 55px rgba(0,0,0,.21), 0 16px 28px rgba(0,0,0,.22)"}},"zDepth-5":{bg:{boxShadow:"0 40px 77px rgba(0,0,0,.22), 0 27px 24px rgba(0,0,0,.2)"}},square:{bg:{borderRadius:"0"}},circle:{bg:{borderRadius:"50%"}}},u),{"zDepth-1":t===1});return $.createElement("div",{style:s.wrap},$.createElement("div",{style:s.bg}),$.createElement("div",{style:s.content},i))};co.propTypes={background:Fe.string,zDepth:Fe.oneOf([0,1,2,3,4,5]),radius:Fe.number,styles:Fe.object};co.defaultProps={background:"#fff",zDepth:1,radius:2,styles:{}};var ul=function(){return Zt.Date.now()},iF=/\s/;function oF(e){for(var r=e.length;r--&&iF.test(e.charAt(r)););return r}var sF=/^\s+/;function uF(e){return e&&e.slice(0,oF(e)+1).replace(sF,"")}var lF="[object Symbol]";function nu(e){return typeof e=="symbol"||Fn(e)&&ta(e)==lF}var zv=NaN,cF=/^[-+]0x[0-9a-f]+$/i,fF=/^0b[01]+$/i,pF=/^0o[0-7]+$/i,vF=parseInt;function Iv(e){if(typeof e=="number")return e;if(nu(e))return zv;if(Ft(e)){var r=typeof e.valueOf=="function"?e.valueOf():e;e=Ft(r)?r+"":r}if(typeof e!="string")return e===0?e:+e;e=uF(e);var t=fF.test(e);return t||pF.test(e)?vF(e.slice(2),t?2:8):cF.test(e)?zv:+e}var dF="Expected a function",mF=Math.max,hF=Math.min;function Jg(e,r,t){var n,a,i,o,u,s,l=0,c=!1,f=!1,p=!0;if(typeof e!="function")throw new TypeError(dF);r=Iv(r)||0,Ft(t)&&(c=!!t.leading,f="maxWait"in t,i=f?mF(Iv(t.maxWait)||0,r):i,p="trailing"in t?!!t.trailing:p);function v(b){var A=n,D=a;return n=a=void 0,l=b,o=e.apply(D,A),o}function m(b){return l=b,u=setTimeout(h,r),c?v(b):o}function d(b){var A=b-s,D=b-l,S=r-A;return f?hF(S,i-D):S}function y(b){var A=b-s,D=b-l;return s===void 0||A>=r||A<0||f&&D>=i}function h(){var b=ul();if(y(b))return E(b);u=setTimeout(h,d(b))}function E(b){return u=void 0,p&&n?v(b):(n=a=void 0,o)}function g(){u!==void 0&&clearTimeout(u),l=0,n=s=a=u=void 0}function w(){return u===void 0?o:E(ul())}function x(){var b=ul(),A=y(b);if(n=arguments,a=this,s=b,A){if(u===void 0)return m(s);if(f)return clearTimeout(u),u=setTimeout(h,r),v(s)}return u===void 0&&(u=setTimeout(h,r)),o}return x.cancel=g,x.flush=w,x}var gF="Expected a function";function yF(e,r,t){var n=!0,a=!0;if(typeof e!="function")throw new TypeError(gF);return Ft(t)&&(n="leading"in t?!!t.leading:n,a="trailing"in t?!!t.trailing:a),Jg(e,r,{leading:n,maxWait:r,trailing:a})}var bF=function(r,t,n){var a=n.getBoundingClientRect(),i=a.width,o=a.height,u=typeof r.pageX=="number"?r.pageX:r.touches[0].pageX,s=typeof r.pageY=="number"?r.pageY:r.touches[0].pageY,l=u-(n.getBoundingClientRect().left+window.pageXOffset),c=s-(n.getBoundingClientRect().top+window.pageYOffset);l<0?l=0:l>i&&(l=i),c<0?c=0:c>o&&(c=o);var f=l/i,p=1-c/o;return{h:t.h,s:f,v:p,a:t.a,source:"hsv"}},xF=function(){function e(r,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(r,a.key,a)}}return function(r,t,n){return t&&e(r.prototype,t),n&&e(r,n),r}}();function wF(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function EF(e,r){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r&&(typeof r=="object"||typeof r=="function")?r:e}function SF(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof r);e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),r&&(Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r)}var au=function(e){SF(r,e);function r(t){wF(this,r);var n=EF(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,t));return n.handleChange=function(a){typeof n.props.onChange=="function"&&n.throttle(n.props.onChange,bF(a,n.props.hsl,n.container),a)},n.handleMouseDown=function(a){n.handleChange(a);var i=n.getContainerRenderWindow();i.addEventListener("mousemove",n.handleChange),i.addEventListener("mouseup",n.handleMouseUp)},n.handleMouseUp=function(){n.unbindEventListeners()},n.throttle=yF(function(a,i,o){a(i,o)},50),n}return xF(r,[{key:"componentWillUnmount",value:function(){this.throttle.cancel(),this.unbindEventListeners()}},{key:"getContainerRenderWindow",value:function(){for(var n=this.container,a=window;!a.document.contains(n)&&a.parent!==a;)a=a.parent;return a}},{key:"unbindEventListeners",value:function(){var n=this.getContainerRenderWindow();n.removeEventListener("mousemove",this.handleChange),n.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var n=this,a=this.props.style||{},i=a.color,o=a.white,u=a.black,s=a.pointer,l=a.circle,c=Ze({default:{color:{absolute:"0px 0px 0px 0px",background:"hsl("+this.props.hsl.h+",100%, 50%)",borderRadius:this.props.radius},white:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},black:{absolute:"0px 0px 0px 0px",boxShadow:this.props.shadow,borderRadius:this.props.radius},pointer:{position:"absolute",top:-(this.props.hsv.v*100)+100+"%",left:this.props.hsv.s*100+"%",cursor:"default"},circle:{width:"4px",height:"4px",boxShadow:`0 0 0 1.5px #fff, inset 0 0 1px 1px rgba(0,0,0,.3),
|
|
61
|
+
0 0 1px 2px rgba(0,0,0,.4)`,borderRadius:"50%",cursor:"hand",transform:"translate(-2px, -2px)"}},custom:{color:i,white:o,black:u,pointer:s,circle:l}},{custom:!!this.props.style});return $.createElement("div",{style:c.color,ref:function(p){return n.container=p},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},$.createElement("style",null,`
|
|
62
|
+
.saturation-white {
|
|
63
|
+
background: -webkit-linear-gradient(to right, #fff, rgba(255,255,255,0));
|
|
64
|
+
background: linear-gradient(to right, #fff, rgba(255,255,255,0));
|
|
65
|
+
}
|
|
66
|
+
.saturation-black {
|
|
67
|
+
background: -webkit-linear-gradient(to top, #000, rgba(0,0,0,0));
|
|
68
|
+
background: linear-gradient(to top, #000, rgba(0,0,0,0));
|
|
69
|
+
}
|
|
70
|
+
`),$.createElement("div",{style:c.white,className:"saturation-white"},$.createElement("div",{style:c.black,className:"saturation-black"}),$.createElement("div",{style:c.pointer},this.props.pointer?$.createElement(this.props.pointer,this.props):$.createElement("div",{style:c.circle}))))}}]),r}($.PureComponent||$.Component);function AF(e,r){for(var t=-1,n=e==null?0:e.length;++t<n&&r(e[t],t,e)!==!1;);return e}var DF=Hg(Object.keys,Object),NF=Object.prototype,CF=NF.hasOwnProperty;function MF(e){if(!zc(e))return DF(e);var r=[];for(var t in Object(e))CF.call(e,t)&&t!="constructor"&&r.push(t);return r}function kc(e){return vi(e)?Yg(e):MF(e)}function TF(e,r){return e&&kg(e,r,kc)}function OF(e,r){return function(t,n){if(t==null)return t;if(!vi(t))return e(t,n);for(var a=t.length,i=-1,o=Object(t);++i<a&&n(o[i],i,o)!==!1;);return t}}var Qg=OF(TF);function _F(e){return typeof e=="function"?e:tu}function $F(e,r){var t=At(e)?AF:Qg;return t(e,_F(r))}function ms(e){"@babel/helpers - typeof";return ms=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},ms(e)}var FF=/^\s+/,BF=/\s+$/;function ze(e,r){if(e=e||"",r=r||{},e instanceof ze)return e;if(!(this instanceof ze))return new ze(e,r);var t=RF(e);this._originalInput=e,this._r=t.r,this._g=t.g,this._b=t.b,this._a=t.a,this._roundA=Math.round(100*this._a)/100,this._format=r.format||t.format,this._gradientType=r.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=t.ok}ze.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var r=this.toRgb();return(r.r*299+r.g*587+r.b*114)/1e3},getLuminance:function(){var r=this.toRgb(),t,n,a,i,o,u;return t=r.r/255,n=r.g/255,a=r.b/255,t<=.03928?i=t/12.92:i=Math.pow((t+.055)/1.055,2.4),n<=.03928?o=n/12.92:o=Math.pow((n+.055)/1.055,2.4),a<=.03928?u=a/12.92:u=Math.pow((a+.055)/1.055,2.4),.2126*i+.7152*o+.0722*u},setAlpha:function(r){return this._a=ey(r),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var r=qv(this._r,this._g,this._b);return{h:r.h*360,s:r.s,v:r.v,a:this._a}},toHsvString:function(){var r=qv(this._r,this._g,this._b),t=Math.round(r.h*360),n=Math.round(r.s*100),a=Math.round(r.v*100);return this._a==1?"hsv("+t+", "+n+"%, "+a+"%)":"hsva("+t+", "+n+"%, "+a+"%, "+this._roundA+")"},toHsl:function(){var r=Lv(this._r,this._g,this._b);return{h:r.h*360,s:r.s,l:r.l,a:this._a}},toHslString:function(){var r=Lv(this._r,this._g,this._b),t=Math.round(r.h*360),n=Math.round(r.s*100),a=Math.round(r.l*100);return this._a==1?"hsl("+t+", "+n+"%, "+a+"%)":"hsla("+t+", "+n+"%, "+a+"%, "+this._roundA+")"},toHex:function(r){return kv(this._r,this._g,this._b,r)},toHexString:function(r){return"#"+this.toHex(r)},toHex8:function(r){return LF(this._r,this._g,this._b,this._a,r)},toHex8String:function(r){return"#"+this.toHex8(r)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(Fr(this._r,255)*100)+"%",g:Math.round(Fr(this._g,255)*100)+"%",b:Math.round(Fr(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(Fr(this._r,255)*100)+"%, "+Math.round(Fr(this._g,255)*100)+"%, "+Math.round(Fr(this._b,255)*100)+"%)":"rgba("+Math.round(Fr(this._r,255)*100)+"%, "+Math.round(Fr(this._g,255)*100)+"%, "+Math.round(Fr(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:KF[kv(this._r,this._g,this._b,!0)]||!1},toFilter:function(r){var t="#"+Uv(this._r,this._g,this._b,this._a),n=t,a=this._gradientType?"GradientType = 1, ":"";if(r){var i=ze(r);n="#"+Uv(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+a+"startColorstr="+t+",endColorstr="+n+")"},toString:function(r){var t=!!r;r=r||this._format;var n=!1,a=this._a<1&&this._a>=0,i=!t&&a&&(r==="hex"||r==="hex6"||r==="hex3"||r==="hex4"||r==="hex8"||r==="name");return i?r==="name"&&this._a===0?this.toName():this.toRgbString():(r==="rgb"&&(n=this.toRgbString()),r==="prgb"&&(n=this.toPercentageRgbString()),(r==="hex"||r==="hex6")&&(n=this.toHexString()),r==="hex3"&&(n=this.toHexString(!0)),r==="hex4"&&(n=this.toHex8String(!0)),r==="hex8"&&(n=this.toHex8String()),r==="name"&&(n=this.toName()),r==="hsl"&&(n=this.toHslString()),r==="hsv"&&(n=this.toHsvString()),n||this.toHexString())},clone:function(){return ze(this.toString())},_applyModification:function(r,t){var n=r.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(HF,arguments)},brighten:function(){return this._applyModification(jF,arguments)},darken:function(){return this._applyModification(VF,arguments)},desaturate:function(){return this._applyModification(qF,arguments)},saturate:function(){return this._applyModification(kF,arguments)},greyscale:function(){return this._applyModification(UF,arguments)},spin:function(){return this._applyModification(GF,arguments)},_applyCombination:function(r,t){return r.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(YF,arguments)},complement:function(){return this._applyCombination(WF,arguments)},monochromatic:function(){return this._applyCombination(XF,arguments)},splitcomplement:function(){return this._applyCombination(ZF,arguments)},triad:function(){return this._applyCombination(Hv,[3])},tetrad:function(){return this._applyCombination(Hv,[4])}};ze.fromRatio=function(e,r){if(ms(e)=="object"){var t={};for(var n in e)e.hasOwnProperty(n)&&(n==="a"?t[n]=e[n]:t[n]=ki(e[n]));e=t}return ze(e,r)};function RF(e){var r={r:0,g:0,b:0},t=1,n=null,a=null,i=null,o=!1,u=!1;return typeof e=="string"&&(e=rB(e)),ms(e)=="object"&&(ln(e.r)&&ln(e.g)&&ln(e.b)?(r=PF(e.r,e.g,e.b),o=!0,u=String(e.r).substr(-1)==="%"?"prgb":"rgb"):ln(e.h)&&ln(e.s)&&ln(e.v)?(n=ki(e.s),a=ki(e.v),r=IF(e.h,n,a),o=!0,u="hsv"):ln(e.h)&&ln(e.s)&&ln(e.l)&&(n=ki(e.s),i=ki(e.l),r=zF(e.h,n,i),o=!0,u="hsl"),e.hasOwnProperty("a")&&(t=e.a)),t=ey(t),{ok:o,format:e.format||u,r:Math.min(255,Math.max(r.r,0)),g:Math.min(255,Math.max(r.g,0)),b:Math.min(255,Math.max(r.b,0)),a:t}}function PF(e,r,t){return{r:Fr(e,255)*255,g:Fr(r,255)*255,b:Fr(t,255)*255}}function Lv(e,r,t){e=Fr(e,255),r=Fr(r,255),t=Fr(t,255);var n=Math.max(e,r,t),a=Math.min(e,r,t),i,o,u=(n+a)/2;if(n==a)i=o=0;else{var s=n-a;switch(o=u>.5?s/(2-n-a):s/(n+a),n){case e:i=(r-t)/s+(r<t?6:0);break;case r:i=(t-e)/s+2;break;case t:i=(e-r)/s+4;break}i/=6}return{h:i,s:o,l:u}}function zF(e,r,t){var n,a,i;e=Fr(e,360),r=Fr(r,100),t=Fr(t,100);function o(l,c,f){return f<0&&(f+=1),f>1&&(f-=1),f<1/6?l+(c-l)*6*f:f<1/2?c:f<2/3?l+(c-l)*(2/3-f)*6:l}if(r===0)n=a=i=t;else{var u=t<.5?t*(1+r):t+r-t*r,s=2*t-u;n=o(s,u,e+1/3),a=o(s,u,e),i=o(s,u,e-1/3)}return{r:n*255,g:a*255,b:i*255}}function qv(e,r,t){e=Fr(e,255),r=Fr(r,255),t=Fr(t,255);var n=Math.max(e,r,t),a=Math.min(e,r,t),i,o,u=n,s=n-a;if(o=n===0?0:s/n,n==a)i=0;else{switch(n){case e:i=(r-t)/s+(r<t?6:0);break;case r:i=(t-e)/s+2;break;case t:i=(e-r)/s+4;break}i/=6}return{h:i,s:o,v:u}}function IF(e,r,t){e=Fr(e,360)*6,r=Fr(r,100),t=Fr(t,100);var n=Math.floor(e),a=e-n,i=t*(1-r),o=t*(1-a*r),u=t*(1-(1-a)*r),s=n%6,l=[t,o,i,i,u,t][s],c=[u,t,t,o,i,i][s],f=[i,i,u,t,t,o][s];return{r:l*255,g:c*255,b:f*255}}function kv(e,r,t,n){var a=[Ut(Math.round(e).toString(16)),Ut(Math.round(r).toString(16)),Ut(Math.round(t).toString(16))];return n&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0):a.join("")}function LF(e,r,t,n,a){var i=[Ut(Math.round(e).toString(16)),Ut(Math.round(r).toString(16)),Ut(Math.round(t).toString(16)),Ut(ry(n))];return a&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)&&i[3].charAt(0)==i[3].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0):i.join("")}function Uv(e,r,t,n){var a=[Ut(ry(n)),Ut(Math.round(e).toString(16)),Ut(Math.round(r).toString(16)),Ut(Math.round(t).toString(16))];return a.join("")}ze.equals=function(e,r){return!e||!r?!1:ze(e).toRgbString()==ze(r).toRgbString()};ze.random=function(){return ze.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function qF(e,r){r=r===0?0:r||10;var t=ze(e).toHsl();return t.s-=r/100,t.s=iu(t.s),ze(t)}function kF(e,r){r=r===0?0:r||10;var t=ze(e).toHsl();return t.s+=r/100,t.s=iu(t.s),ze(t)}function UF(e){return ze(e).desaturate(100)}function HF(e,r){r=r===0?0:r||10;var t=ze(e).toHsl();return t.l+=r/100,t.l=iu(t.l),ze(t)}function jF(e,r){r=r===0?0:r||10;var t=ze(e).toRgb();return t.r=Math.max(0,Math.min(255,t.r-Math.round(255*-(r/100)))),t.g=Math.max(0,Math.min(255,t.g-Math.round(255*-(r/100)))),t.b=Math.max(0,Math.min(255,t.b-Math.round(255*-(r/100)))),ze(t)}function VF(e,r){r=r===0?0:r||10;var t=ze(e).toHsl();return t.l-=r/100,t.l=iu(t.l),ze(t)}function GF(e,r){var t=ze(e).toHsl(),n=(t.h+r)%360;return t.h=n<0?360+n:n,ze(t)}function WF(e){var r=ze(e).toHsl();return r.h=(r.h+180)%360,ze(r)}function Hv(e,r){if(isNaN(r)||r<=0)throw new Error("Argument to polyad must be a positive number");for(var t=ze(e).toHsl(),n=[ze(e)],a=360/r,i=1;i<r;i++)n.push(ze({h:(t.h+i*a)%360,s:t.s,l:t.l}));return n}function ZF(e){var r=ze(e).toHsl(),t=r.h;return[ze(e),ze({h:(t+72)%360,s:r.s,l:r.l}),ze({h:(t+216)%360,s:r.s,l:r.l})]}function YF(e,r,t){r=r||6,t=t||30;var n=ze(e).toHsl(),a=360/t,i=[ze(e)];for(n.h=(n.h-(a*r>>1)+720)%360;--r;)n.h=(n.h+a)%360,i.push(ze(n));return i}function XF(e,r){r=r||6;for(var t=ze(e).toHsv(),n=t.h,a=t.s,i=t.v,o=[],u=1/r;r--;)o.push(ze({h:n,s:a,v:i})),i=(i+u)%1;return o}ze.mix=function(e,r,t){t=t===0?0:t||50;var n=ze(e).toRgb(),a=ze(r).toRgb(),i=t/100,o={r:(a.r-n.r)*i+n.r,g:(a.g-n.g)*i+n.g,b:(a.b-n.b)*i+n.b,a:(a.a-n.a)*i+n.a};return ze(o)};ze.readability=function(e,r){var t=ze(e),n=ze(r);return(Math.max(t.getLuminance(),n.getLuminance())+.05)/(Math.min(t.getLuminance(),n.getLuminance())+.05)};ze.isReadable=function(e,r,t){var n=ze.readability(e,r),a,i;switch(i=!1,a=tB(t),a.level+a.size){case"AAsmall":case"AAAlarge":i=n>=4.5;break;case"AAlarge":i=n>=3;break;case"AAAsmall":i=n>=7;break}return i};ze.mostReadable=function(e,r,t){var n=null,a=0,i,o,u,s;t=t||{},o=t.includeFallbackColors,u=t.level,s=t.size;for(var l=0;l<r.length;l++)i=ze.readability(e,r[l]),i>a&&(a=i,n=ze(r[l]));return ze.isReadable(e,n,{level:u,size:s})||!o?n:(t.includeFallbackColors=!1,ze.mostReadable(e,["#fff","#000"],t))};var Pl=ze.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},KF=ze.hexNames=JF(Pl);function JF(e){var r={};for(var t in e)e.hasOwnProperty(t)&&(r[e[t]]=t);return r}function ey(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Fr(e,r){QF(e)&&(e="100%");var t=eB(e);return e=Math.min(r,Math.max(0,parseFloat(e))),t&&(e=parseInt(e*r,10)/100),Math.abs(e-r)<1e-6?1:e%r/parseFloat(r)}function iu(e){return Math.min(1,Math.max(0,e))}function xt(e){return parseInt(e,16)}function QF(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function eB(e){return typeof e=="string"&&e.indexOf("%")!=-1}function Ut(e){return e.length==1?"0"+e:""+e}function ki(e){return e<=1&&(e=e*100+"%"),e}function ry(e){return Math.round(parseFloat(e)*255).toString(16)}function jv(e){return xt(e)/255}var Lt=function(){var e="[-\\+]?\\d+%?",r="[-\\+]?\\d*\\.\\d+%?",t="(?:"+r+")|(?:"+e+")",n="[\\s|\\(]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")\\s*\\)?",a="[\\s|\\(]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")\\s*\\)?";return{CSS_UNIT:new RegExp(t),rgb:new RegExp("rgb"+n),rgba:new RegExp("rgba"+a),hsl:new RegExp("hsl"+n),hsla:new RegExp("hsla"+a),hsv:new RegExp("hsv"+n),hsva:new RegExp("hsva"+a),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function ln(e){return!!Lt.CSS_UNIT.exec(e)}function rB(e){e=e.replace(FF,"").replace(BF,"").toLowerCase();var r=!1;if(Pl[e])e=Pl[e],r=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var t;return(t=Lt.rgb.exec(e))?{r:t[1],g:t[2],b:t[3]}:(t=Lt.rgba.exec(e))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=Lt.hsl.exec(e))?{h:t[1],s:t[2],l:t[3]}:(t=Lt.hsla.exec(e))?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=Lt.hsv.exec(e))?{h:t[1],s:t[2],v:t[3]}:(t=Lt.hsva.exec(e))?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=Lt.hex8.exec(e))?{r:xt(t[1]),g:xt(t[2]),b:xt(t[3]),a:jv(t[4]),format:r?"name":"hex8"}:(t=Lt.hex6.exec(e))?{r:xt(t[1]),g:xt(t[2]),b:xt(t[3]),format:r?"name":"hex"}:(t=Lt.hex4.exec(e))?{r:xt(t[1]+""+t[1]),g:xt(t[2]+""+t[2]),b:xt(t[3]+""+t[3]),a:jv(t[4]+""+t[4]),format:r?"name":"hex8"}:(t=Lt.hex3.exec(e))?{r:xt(t[1]+""+t[1]),g:xt(t[2]+""+t[2]),b:xt(t[3]+""+t[3]),format:r?"name":"hex"}:!1}function tB(e){var r,t;return e=e||{level:"AA",size:"small"},r=(e.level||"AA").toUpperCase(),t=(e.size||"small").toLowerCase(),r!=="AA"&&r!=="AAA"&&(r="AA"),t!=="small"&&t!=="large"&&(t="small"),{level:r,size:t}}var Vv=function(r){var t=["r","g","b","a","h","s","l","v"],n=0,a=0;return $F(t,function(i){if(r[i]&&(n+=1,isNaN(r[i])||(a+=1),i==="s"||i==="l")){var o=/^\d+%$/;o.test(r[i])&&(a+=1)}}),n===a?r:!1},Ui=function(r,t){var n=r.hex?ze(r.hex):ze(r),a=n.toHsl(),i=n.toHsv(),o=n.toRgb(),u=n.toHex();a.s===0&&(a.h=t||0,i.h=t||0);var s=u==="000000"&&o.a===0;return{hsl:a,hex:s?"transparent":"#"+u,rgb:o,hsv:i,oldHue:r.h||t||a.h,source:r.source}},zn=function(r){if(r==="transparent")return!0;var t=String(r).charAt(0)==="#"?1:0;return r.length!==4+t&&r.length<7+t&&ze(r).isValid()},Uc=function(r){if(!r)return"#fff";var t=Ui(r);if(t.hex==="transparent")return"rgba(0,0,0,0.4)";var n=(t.rgb.r*299+t.rgb.g*587+t.rgb.b*114)/1e3;return n>=128?"#000":"#fff"},ll=function(r,t){var n=r.replace("°","");return ze(t+" ("+n+")")._ok},zi=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},nB=function(){function e(r,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(r,a.key,a)}}return function(r,t,n){return t&&e(r.prototype,t),n&&e(r,n),r}}();function aB(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function iB(e,r){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r&&(typeof r=="object"||typeof r=="function")?r:e}function oB(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof r);e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),r&&(Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r)}var yt=function(r){var t=function(n){oB(a,n);function a(i){aB(this,a);var o=iB(this,(a.__proto__||Object.getPrototypeOf(a)).call(this));return o.handleChange=function(u,s){var l=Vv(u);if(l){var c=Ui(u,u.h||o.state.oldHue);o.setState(c),o.props.onChangeComplete&&o.debounce(o.props.onChangeComplete,c,s),o.props.onChange&&o.props.onChange(c,s)}},o.handleSwatchHover=function(u,s){var l=Vv(u);if(l){var c=Ui(u,u.h||o.state.oldHue);o.props.onSwatchHover&&o.props.onSwatchHover(c,s)}},o.state=zi({},Ui(i.color,0)),o.debounce=Jg(function(u,s,l){u(s,l)},100),o}return nB(a,[{key:"render",value:function(){var o={};return this.props.onSwatchHover&&(o.onSwatchHover=this.handleSwatchHover),$.createElement(r,zi({},this.props,this.state,{onChange:this.handleChange},o))}}],[{key:"getDerivedStateFromProps",value:function(o,u){return zi({},Ui(o.color,u.oldHue))}}]),a}($.PureComponent||$.Component);return t.propTypes=zi({},r.propTypes),t.defaultProps=zi({},r.defaultProps,{color:{h:250,s:.5,l:.2,a:1}}),t},sB=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},uB=function(){function e(r,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(r,a.key,a)}}return function(r,t,n){return t&&e(r.prototype,t),n&&e(r,n),r}}();function lB(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function Gv(e,r){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r&&(typeof r=="object"||typeof r=="function")?r:e}function cB(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof r);e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),r&&(Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r)}var fB=function(r){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return function(n){cB(a,n);function a(){var i,o,u,s;lB(this,a);for(var l=arguments.length,c=Array(l),f=0;f<l;f++)c[f]=arguments[f];return s=(o=(u=Gv(this,(i=a.__proto__||Object.getPrototypeOf(a)).call.apply(i,[this].concat(c))),u),u.state={focus:!1},u.handleFocus=function(){return u.setState({focus:!0})},u.handleBlur=function(){return u.setState({focus:!1})},o),Gv(u,s)}return uB(a,[{key:"render",value:function(){return $.createElement(t,{onFocus:this.handleFocus,onBlur:this.handleBlur},$.createElement(r,sB({},this.props,this.state)))}}]),a}($.Component)},Wv=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},pB=13,vB=function(r){var t=r.color,n=r.style,a=r.onClick,i=a===void 0?function(){}:a,o=r.onHover,u=r.title,s=u===void 0?t:u,l=r.children,c=r.focus,f=r.focusStyle,p=f===void 0?{}:f,v=t==="transparent",m=Ze({default:{swatch:Wv({background:t,height:"100%",width:"100%",cursor:"pointer",position:"relative",outline:"none"},n,c?p:{})}}),d=function(w){return i(t,w)},y=function(w){return w.keyCode===pB&&i(t,w)},h=function(w){return o(t,w)},E={};return o&&(E.onMouseOver=h),$.createElement("div",Wv({style:m.swatch,onClick:d,title:s,tabIndex:0,onKeyDown:y},E),l,v&&$.createElement(fi,{borderRadius:m.swatch.borderRadius,boxShadow:"inset 0 0 0 1px rgba(0,0,0,0.1)"}))};const ia=fB(vB);var dB=function(r){var t=r.direction,n=Ze({default:{picker:{width:"18px",height:"18px",borderRadius:"50%",transform:"translate(-9px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}},vertical:{picker:{transform:"translate(-3px, -9px)"}}},{vertical:t==="vertical"});return $.createElement("div",{style:n.picker})},mB=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},ty=function(r){var t=r.rgb,n=r.hsl,a=r.width,i=r.height,o=r.onChange,u=r.direction,s=r.style,l=r.renderers,c=r.pointer,f=r.className,p=f===void 0?"":f,v=Ze({default:{picker:{position:"relative",width:a,height:i},alpha:{radius:"2px",style:s}}});return $.createElement("div",{style:v.picker,className:"alpha-picker "+p},$.createElement(Fc,mB({},v.alpha,{rgb:t,hsl:n,pointer:c,renderers:l,onChange:o,direction:u})))};ty.defaultProps={width:"316px",height:"16px",direction:"horizontal",pointer:dB};yt(ty);function ny(e,r){for(var t=-1,n=e==null?0:e.length,a=Array(n);++t<n;)a[t]=r(e[t],t,e);return a}var hB="__lodash_hash_undefined__";function gB(e){return this.__data__.set(e,hB),this}function yB(e){return this.__data__.has(e)}function hs(e){var r=-1,t=e==null?0:e.length;for(this.__data__=new wn;++r<t;)this.add(e[r])}hs.prototype.add=hs.prototype.push=gB;hs.prototype.has=yB;function bB(e,r){for(var t=-1,n=e==null?0:e.length;++t<n;)if(r(e[t],t,e))return!0;return!1}function xB(e,r){return e.has(r)}var wB=1,EB=2;function ay(e,r,t,n,a,i){var o=t&wB,u=e.length,s=r.length;if(u!=s&&!(o&&s>u))return!1;var l=i.get(e),c=i.get(r);if(l&&c)return l==r&&c==e;var f=-1,p=!0,v=t&EB?new hs:void 0;for(i.set(e,r),i.set(r,e);++f<u;){var m=e[f],d=r[f];if(n)var y=o?n(d,m,f,r,e,i):n(m,d,f,e,r,i);if(y!==void 0){if(y)continue;p=!1;break}if(v){if(!bB(r,function(h,E){if(!xB(v,E)&&(m===h||a(m,h,t,n,i)))return v.push(E)})){p=!1;break}}else if(!(m===d||a(m,d,t,n,i))){p=!1;break}}return i.delete(e),i.delete(r),p}function SB(e){var r=-1,t=Array(e.size);return e.forEach(function(n,a){t[++r]=[a,n]}),t}function AB(e){var r=-1,t=Array(e.size);return e.forEach(function(n){t[++r]=n}),t}var DB=1,NB=2,CB="[object Boolean]",MB="[object Date]",TB="[object Error]",OB="[object Map]",_B="[object Number]",$B="[object RegExp]",FB="[object Set]",BB="[object String]",RB="[object Symbol]",PB="[object ArrayBuffer]",zB="[object DataView]",Zv=$n?$n.prototype:void 0,cl=Zv?Zv.valueOf:void 0;function IB(e,r,t,n,a,i,o){switch(t){case zB:if(e.byteLength!=r.byteLength||e.byteOffset!=r.byteOffset)return!1;e=e.buffer,r=r.buffer;case PB:return!(e.byteLength!=r.byteLength||!i(new ps(e),new ps(r)));case CB:case MB:case _B:return lo(+e,+r);case TB:return e.name==r.name&&e.message==r.message;case $B:case BB:return e==r+"";case OB:var u=SB;case FB:var s=n&DB;if(u||(u=AB),e.size!=r.size&&!s)return!1;var l=o.get(e);if(l)return l==r;n|=NB,o.set(e,r);var c=ay(u(e),u(r),n,a,i,o);return o.delete(e),c;case RB:if(cl)return cl.call(e)==cl.call(r)}return!1}function LB(e,r){for(var t=-1,n=r.length,a=e.length;++t<n;)e[a+t]=r[t];return e}function qB(e,r,t){var n=r(e);return At(e)?n:LB(n,t(e))}function kB(e,r){for(var t=-1,n=e==null?0:e.length,a=0,i=[];++t<n;){var o=e[t];r(o,t,e)&&(i[a++]=o)}return i}function UB(){return[]}var HB=Object.prototype,jB=HB.propertyIsEnumerable,Yv=Object.getOwnPropertySymbols,VB=Yv?function(e){return e==null?[]:(e=Object(e),kB(Yv(e),function(r){return jB.call(e,r)}))}:UB;function Xv(e){return qB(e,kc,VB)}var GB=1,WB=Object.prototype,ZB=WB.hasOwnProperty;function YB(e,r,t,n,a,i){var o=t&GB,u=Xv(e),s=u.length,l=Xv(r),c=l.length;if(s!=c&&!o)return!1;for(var f=s;f--;){var p=u[f];if(!(o?p in r:ZB.call(r,p)))return!1}var v=i.get(e),m=i.get(r);if(v&&m)return v==r&&m==e;var d=!0;i.set(e,r),i.set(r,e);for(var y=o;++f<s;){p=u[f];var h=e[p],E=r[p];if(n)var g=o?n(E,h,p,r,e,i):n(h,E,p,e,r,i);if(!(g===void 0?h===E||a(h,E,t,n,i):g)){d=!1;break}y||(y=p=="constructor")}if(d&&!y){var w=e.constructor,x=r.constructor;w!=x&&"constructor"in e&&"constructor"in r&&!(typeof w=="function"&&w instanceof w&&typeof x=="function"&&x instanceof x)&&(d=!1)}return i.delete(e),i.delete(r),d}var zl=aa(Zt,"DataView"),Il=aa(Zt,"Promise"),Ll=aa(Zt,"Set"),ql=aa(Zt,"WeakMap"),Kv="[object Map]",XB="[object Object]",Jv="[object Promise]",Qv="[object Set]",ed="[object WeakMap]",rd="[object DataView]",KB=na(zl),JB=na(Zi),QB=na(Il),eR=na(Ll),rR=na(ql),Cn=ta;(zl&&Cn(new zl(new ArrayBuffer(1)))!=rd||Zi&&Cn(new Zi)!=Kv||Il&&Cn(Il.resolve())!=Jv||Ll&&Cn(new Ll)!=Qv||ql&&Cn(new ql)!=ed)&&(Cn=function(e){var r=ta(e),t=r==XB?e.constructor:void 0,n=t?na(t):"";if(n)switch(n){case KB:return rd;case JB:return Kv;case QB:return Jv;case eR:return Qv;case rR:return ed}return r});var tR=1,td="[object Arguments]",nd="[object Array]",Ro="[object Object]",nR=Object.prototype,ad=nR.hasOwnProperty;function aR(e,r,t,n,a,i){var o=At(e),u=At(r),s=o?nd:Cn(e),l=u?nd:Cn(r);s=s==td?Ro:s,l=l==td?Ro:l;var c=s==Ro,f=l==Ro,p=s==l;if(p&&ds(e)){if(!ds(r))return!1;o=!0,c=!1}if(p&&!c)return i||(i=new rn),o||Lc(e)?ay(e,r,t,n,a,i):IB(e,r,s,t,n,a,i);if(!(t&tR)){var v=c&&ad.call(e,"__wrapped__"),m=f&&ad.call(r,"__wrapped__");if(v||m){var d=v?e.value():e,y=m?r.value():r;return i||(i=new rn),a(d,y,t,n,i)}}return p?(i||(i=new rn),YB(e,r,t,n,a,i)):!1}function Hc(e,r,t,n,a){return e===r?!0:e==null||r==null||!Fn(e)&&!Fn(r)?e!==e&&r!==r:aR(e,r,t,n,Hc,a)}var iR=1,oR=2;function sR(e,r,t,n){var a=t.length,i=a;if(e==null)return!i;for(e=Object(e);a--;){var o=t[a];if(o[2]?o[1]!==e[o[0]]:!(o[0]in e))return!1}for(;++a<i;){o=t[a];var u=o[0],s=e[u],l=o[1];if(o[2]){if(s===void 0&&!(u in e))return!1}else{var c=new rn,f;if(!(f===void 0?Hc(l,s,iR|oR,n,c):f))return!1}}return!0}function iy(e){return e===e&&!Ft(e)}function uR(e){for(var r=kc(e),t=r.length;t--;){var n=r[t],a=e[n];r[t]=[n,a,iy(a)]}return r}function oy(e,r){return function(t){return t==null?!1:t[e]===r&&(r!==void 0||e in Object(t))}}function lR(e){var r=uR(e);return r.length==1&&r[0][2]?oy(r[0][0],r[0][1]):function(t){return t===e||sR(t,e,r)}}var cR=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,fR=/^\w*$/;function jc(e,r){if(At(e))return!1;var t=typeof e;return t=="number"||t=="symbol"||t=="boolean"||e==null||nu(e)?!0:fR.test(e)||!cR.test(e)||r!=null&&e in Object(r)}var pR="Expected a function";function Vc(e,r){if(typeof e!="function"||r!=null&&typeof r!="function")throw new TypeError(pR);var t=function(){var n=arguments,a=r?r.apply(this,n):n[0],i=t.cache;if(i.has(a))return i.get(a);var o=e.apply(this,n);return t.cache=i.set(a,o)||i,o};return t.cache=new(Vc.Cache||wn),t}Vc.Cache=wn;var vR=500;function dR(e){var r=Vc(e,function(n){return t.size===vR&&t.clear(),n}),t=r.cache;return r}var mR=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,hR=/\\(\\)?/g,gR=dR(function(e){var r=[];return e.charCodeAt(0)===46&&r.push(""),e.replace(mR,function(t,n,a,i){r.push(a?i.replace(hR,"$1"):n||t)}),r}),yR=1/0,id=$n?$n.prototype:void 0,od=id?id.toString:void 0;function sy(e){if(typeof e=="string")return e;if(At(e))return ny(e,sy)+"";if(nu(e))return od?od.call(e):"";var r=e+"";return r=="0"&&1/e==-yR?"-0":r}function bR(e){return e==null?"":sy(e)}function uy(e,r){return At(e)?e:jc(e,r)?[e]:gR(bR(e))}var xR=1/0;function ou(e){if(typeof e=="string"||nu(e))return e;var r=e+"";return r=="0"&&1/e==-xR?"-0":r}function ly(e,r){r=uy(r,e);for(var t=0,n=r.length;e!=null&&t<n;)e=e[ou(r[t++])];return t&&t==n?e:void 0}function wR(e,r,t){var n=e==null?void 0:ly(e,r);return n===void 0?t:n}function ER(e,r){return e!=null&&r in Object(e)}function SR(e,r,t){r=uy(r,e);for(var n=-1,a=r.length,i=!1;++n<a;){var o=ou(r[n]);if(!(i=e!=null&&t(e,o)))break;e=e[o]}return i||++n!=a?i:(a=e==null?0:e.length,!!a&&Ic(a)&&qc(o,a)&&(At(e)||vs(e)))}function AR(e,r){return e!=null&&SR(e,r,ER)}var DR=1,NR=2;function CR(e,r){return jc(e)&&iy(r)?oy(ou(e),r):function(t){var n=wR(t,e);return n===void 0&&n===r?AR(t,e):Hc(r,n,DR|NR)}}function MR(e){return function(r){return r==null?void 0:r[e]}}function TR(e){return function(r){return ly(r,e)}}function OR(e){return jc(e)?MR(ou(e)):TR(e)}function _R(e){return typeof e=="function"?e:e==null?tu:typeof e=="object"?At(e)?CR(e[0],e[1]):lR(e):OR(e)}function $R(e,r){var t=-1,n=vi(e)?Array(e.length):[];return Qg(e,function(a,i,o){n[++t]=r(a,i,o)}),n}function oa(e,r){var t=At(e)?ny:$R;return t(e,_R(r))}var FR=function(r){var t=r.colors,n=r.onClick,a=r.onSwatchHover,i=Ze({default:{swatches:{marginRight:"-10px"},swatch:{width:"22px",height:"22px",float:"left",marginRight:"10px",marginBottom:"10px",borderRadius:"4px"},clear:{clear:"both"}}});return $.createElement("div",{style:i.swatches},oa(t,function(o){return $.createElement(ia,{key:o,color:o,style:i.swatch,onClick:n,onHover:a,focusStyle:{boxShadow:"0 0 4px "+o}})}),$.createElement("div",{style:i.clear}))},Gc=function(r){var t=r.onChange,n=r.onSwatchHover,a=r.hex,i=r.colors,o=r.width,u=r.triangle,s=r.styles,l=s===void 0?{}:s,c=r.className,f=c===void 0?"":c,p=a==="transparent",v=function(y,h){zn(y)&&t({hex:y,source:"hex"},h)},m=Ze(gt({default:{card:{width:o,background:"#fff",boxShadow:"0 1px rgba(0,0,0,.1)",borderRadius:"6px",position:"relative"},head:{height:"110px",background:a,borderRadius:"6px 6px 0 0",display:"flex",alignItems:"center",justifyContent:"center",position:"relative"},body:{padding:"10px"},label:{fontSize:"18px",color:Uc(a),position:"relative"},triangle:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 10px 10px 10px",borderColor:"transparent transparent "+a+" transparent",position:"absolute",top:"-10px",left:"50%",marginLeft:"-10px"},input:{width:"100%",fontSize:"12px",color:"#666",border:"0px",outline:"none",height:"22px",boxShadow:"inset 0 0 0 1px #ddd",borderRadius:"4px",padding:"0 7px",boxSizing:"border-box"}},"hide-triangle":{triangle:{display:"none"}}},l),{"hide-triangle":u==="hide"});return $.createElement("div",{style:m.card,className:"block-picker "+f},$.createElement("div",{style:m.triangle}),$.createElement("div",{style:m.head},p&&$.createElement(fi,{borderRadius:"6px 6px 0 0"}),$.createElement("div",{style:m.label},a)),$.createElement("div",{style:m.body},$.createElement(FR,{colors:i,onClick:v,onSwatchHover:n}),$.createElement(vr,{style:{input:m.input},value:a,onChange:v})))};Gc.propTypes={width:Fe.oneOfType([Fe.string,Fe.number]),colors:Fe.arrayOf(Fe.string),triangle:Fe.oneOf(["top","hide"]),styles:Fe.object};Gc.defaultProps={width:170,colors:["#D9E3F0","#F47373","#697689","#37D67A","#2CCCE4","#555555","#dce775","#ff8a65","#ba68c8"],triangle:"top",styles:{}};yt(Gc);var Na={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",a100:"#ff8a80",a200:"#ff5252",a400:"#ff1744",a700:"#d50000"},Ca={50:"#fce4ec",100:"#f8bbd0",200:"#f48fb1",300:"#f06292",400:"#ec407a",500:"#e91e63",600:"#d81b60",700:"#c2185b",800:"#ad1457",900:"#880e4f",a100:"#ff80ab",a200:"#ff4081",a400:"#f50057",a700:"#c51162"},Ma={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",a100:"#ea80fc",a200:"#e040fb",a400:"#d500f9",a700:"#aa00ff"},Ta={50:"#ede7f6",100:"#d1c4e9",200:"#b39ddb",300:"#9575cd",400:"#7e57c2",500:"#673ab7",600:"#5e35b1",700:"#512da8",800:"#4527a0",900:"#311b92",a100:"#b388ff",a200:"#7c4dff",a400:"#651fff",a700:"#6200ea"},Oa={50:"#e8eaf6",100:"#c5cae9",200:"#9fa8da",300:"#7986cb",400:"#5c6bc0",500:"#3f51b5",600:"#3949ab",700:"#303f9f",800:"#283593",900:"#1a237e",a100:"#8c9eff",a200:"#536dfe",a400:"#3d5afe",a700:"#304ffe"},_a={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",a100:"#82b1ff",a200:"#448aff",a400:"#2979ff",a700:"#2962ff"},$a={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",a100:"#80d8ff",a200:"#40c4ff",a400:"#00b0ff",a700:"#0091ea"},Fa={50:"#e0f7fa",100:"#b2ebf2",200:"#80deea",300:"#4dd0e1",400:"#26c6da",500:"#00bcd4",600:"#00acc1",700:"#0097a7",800:"#00838f",900:"#006064",a100:"#84ffff",a200:"#18ffff",a400:"#00e5ff",a700:"#00b8d4"},Ba={50:"#e0f2f1",100:"#b2dfdb",200:"#80cbc4",300:"#4db6ac",400:"#26a69a",500:"#009688",600:"#00897b",700:"#00796b",800:"#00695c",900:"#004d40",a100:"#a7ffeb",a200:"#64ffda",a400:"#1de9b6",a700:"#00bfa5"},Hi={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",a100:"#b9f6ca",a200:"#69f0ae",a400:"#00e676",a700:"#00c853"},Ra={50:"#f1f8e9",100:"#dcedc8",200:"#c5e1a5",300:"#aed581",400:"#9ccc65",500:"#8bc34a",600:"#7cb342",700:"#689f38",800:"#558b2f",900:"#33691e",a100:"#ccff90",a200:"#b2ff59",a400:"#76ff03",a700:"#64dd17"},Pa={50:"#f9fbe7",100:"#f0f4c3",200:"#e6ee9c",300:"#dce775",400:"#d4e157",500:"#cddc39",600:"#c0ca33",700:"#afb42b",800:"#9e9d24",900:"#827717",a100:"#f4ff81",a200:"#eeff41",a400:"#c6ff00",a700:"#aeea00"},za={50:"#fffde7",100:"#fff9c4",200:"#fff59d",300:"#fff176",400:"#ffee58",500:"#ffeb3b",600:"#fdd835",700:"#fbc02d",800:"#f9a825",900:"#f57f17",a100:"#ffff8d",a200:"#ffff00",a400:"#ffea00",a700:"#ffd600"},Ia={50:"#fff8e1",100:"#ffecb3",200:"#ffe082",300:"#ffd54f",400:"#ffca28",500:"#ffc107",600:"#ffb300",700:"#ffa000",800:"#ff8f00",900:"#ff6f00",a100:"#ffe57f",a200:"#ffd740",a400:"#ffc400",a700:"#ffab00"},La={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",a100:"#ffd180",a200:"#ffab40",a400:"#ff9100",a700:"#ff6d00"},qa={50:"#fbe9e7",100:"#ffccbc",200:"#ffab91",300:"#ff8a65",400:"#ff7043",500:"#ff5722",600:"#f4511e",700:"#e64a19",800:"#d84315",900:"#bf360c",a100:"#ff9e80",a200:"#ff6e40",a400:"#ff3d00",a700:"#dd2c00"},ka={50:"#efebe9",100:"#d7ccc8",200:"#bcaaa4",300:"#a1887f",400:"#8d6e63",500:"#795548",600:"#6d4c41",700:"#5d4037",800:"#4e342e",900:"#3e2723"},Ua={50:"#eceff1",100:"#cfd8dc",200:"#b0bec5",300:"#90a4ae",400:"#78909c",500:"#607d8b",600:"#546e7a",700:"#455a64",800:"#37474f",900:"#263238"},cy=function(r){var t=r.color,n=r.onClick,a=r.onSwatchHover,i=r.hover,o=r.active,u=r.circleSize,s=r.circleSpacing,l=Ze({default:{swatch:{width:u,height:u,marginRight:s,marginBottom:s,transform:"scale(1)",transition:"100ms transform ease"},Swatch:{borderRadius:"50%",background:"transparent",boxShadow:"inset 0 0 0 "+(u/2+1)+"px "+t,transition:"100ms box-shadow ease"}},hover:{swatch:{transform:"scale(1.2)"}},active:{Swatch:{boxShadow:"inset 0 0 0 3px "+t}}},{hover:i,active:o});return $.createElement("div",{style:l.swatch},$.createElement(ia,{style:l.Swatch,color:t,onClick:n,onHover:a,focusStyle:{boxShadow:l.Swatch.boxShadow+", 0 0 5px "+t}}))};cy.defaultProps={circleSize:28,circleSpacing:14};const BR=$c(cy);var Wc=function(r){var t=r.width,n=r.onChange,a=r.onSwatchHover,i=r.colors,o=r.hex,u=r.circleSize,s=r.styles,l=s===void 0?{}:s,c=r.circleSpacing,f=r.className,p=f===void 0?"":f,v=Ze(gt({default:{card:{width:t,display:"flex",flexWrap:"wrap",marginRight:-c,marginBottom:-c}}},l)),m=function(y,h){return n({hex:y,source:"hex"},h)};return $.createElement("div",{style:v.card,className:"circle-picker "+p},oa(i,function(d){return $.createElement(BR,{key:d,color:d,onClick:m,onSwatchHover:a,active:o===d.toLowerCase(),circleSize:u,circleSpacing:c})}))};Wc.propTypes={width:Fe.oneOfType([Fe.string,Fe.number]),circleSize:Fe.number,circleSpacing:Fe.number,styles:Fe.object};Wc.defaultProps={width:252,circleSize:28,circleSpacing:14,colors:[Na[500],Ca[500],Ma[500],Ta[500],Oa[500],_a[500],$a[500],Fa[500],Ba[500],Hi[500],Ra[500],Pa[500],za[500],Ia[500],La[500],qa[500],ka[500],Ua[500]],styles:{}};yt(Wc);function sd(e){return e===void 0}var fy={};Object.defineProperty(fy,"__esModule",{value:!0});var ud=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},RR=$,ld=PR(RR);function PR(e){return e&&e.__esModule?e:{default:e}}function zR(e,r){var t={};for(var n in e)r.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}var Po=24,IR=fy.default=function(e){var r=e.fill,t=r===void 0?"currentColor":r,n=e.width,a=n===void 0?Po:n,i=e.height,o=i===void 0?Po:i,u=e.style,s=u===void 0?{}:u,l=zR(e,["fill","width","height","style"]);return ld.default.createElement("svg",ud({viewBox:"0 0 "+Po+" "+Po,style:ud({fill:t,width:a,height:o},s)},l),ld.default.createElement("path",{d:"M12,18.17L8.83,15L7.42,16.41L12,21L16.59,16.41L15.17,15M12,5.83L15.17,9L16.58,7.59L12,3L7.41,7.59L8.83,9L12,5.83Z"}))},LR=function(){function e(r,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(r,a.key,a)}}return function(r,t,n){return t&&e(r.prototype,t),n&&e(r,n),r}}();function qR(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function kR(e,r){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r&&(typeof r=="object"||typeof r=="function")?r:e}function UR(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof r);e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),r&&(Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r)}var py=function(e){UR(r,e);function r(t){qR(this,r);var n=kR(this,(r.__proto__||Object.getPrototypeOf(r)).call(this));return n.toggleViews=function(){n.state.view==="hex"?n.setState({view:"rgb"}):n.state.view==="rgb"?n.setState({view:"hsl"}):n.state.view==="hsl"&&(n.props.hsl.a===1?n.setState({view:"hex"}):n.setState({view:"rgb"}))},n.handleChange=function(a,i){a.hex?zn(a.hex)&&n.props.onChange({hex:a.hex,source:"hex"},i):a.r||a.g||a.b?n.props.onChange({r:a.r||n.props.rgb.r,g:a.g||n.props.rgb.g,b:a.b||n.props.rgb.b,source:"rgb"},i):a.a?(a.a<0?a.a=0:a.a>1&&(a.a=1),n.props.onChange({h:n.props.hsl.h,s:n.props.hsl.s,l:n.props.hsl.l,a:Math.round(a.a*100)/100,source:"rgb"},i)):(a.h||a.s||a.l)&&(typeof a.s=="string"&&a.s.includes("%")&&(a.s=a.s.replace("%","")),typeof a.l=="string"&&a.l.includes("%")&&(a.l=a.l.replace("%","")),a.s==1?a.s=.01:a.l==1&&(a.l=.01),n.props.onChange({h:a.h||n.props.hsl.h,s:Number(sd(a.s)?n.props.hsl.s:a.s),l:Number(sd(a.l)?n.props.hsl.l:a.l),source:"hsl"},i))},n.showHighlight=function(a){a.currentTarget.style.background="#eee"},n.hideHighlight=function(a){a.currentTarget.style.background="transparent"},t.hsl.a!==1&&t.view==="hex"?n.state={view:"rgb"}:n.state={view:t.view},n}return LR(r,[{key:"render",value:function(){var n=this,a=Ze({default:{wrap:{paddingTop:"16px",display:"flex"},fields:{flex:"1",display:"flex",marginLeft:"-6px"},field:{paddingLeft:"6px",width:"100%"},alpha:{paddingLeft:"6px",width:"100%"},toggle:{width:"32px",textAlign:"right",position:"relative"},icon:{marginRight:"-4px",marginTop:"12px",cursor:"pointer",position:"relative"},iconHighlight:{position:"absolute",width:"24px",height:"28px",background:"#eee",borderRadius:"4px",top:"10px",left:"12px",display:"none"},input:{fontSize:"11px",color:"#333",width:"100%",borderRadius:"2px",border:"none",boxShadow:"inset 0 0 0 1px #dadada",height:"21px",textAlign:"center"},label:{textTransform:"uppercase",fontSize:"11px",lineHeight:"11px",color:"#969696",textAlign:"center",display:"block",marginTop:"12px"},svg:{fill:"#333",width:"24px",height:"24px",border:"1px transparent solid",borderRadius:"5px"}},disableAlpha:{alpha:{display:"none"}}},this.props,this.state),i=void 0;return this.state.view==="hex"?i=$.createElement("div",{style:a.fields,className:"flexbox-fix"},$.createElement("div",{style:a.field},$.createElement(vr,{style:{input:a.input,label:a.label},label:"hex",value:this.props.hex,onChange:this.handleChange}))):this.state.view==="rgb"?i=$.createElement("div",{style:a.fields,className:"flexbox-fix"},$.createElement("div",{style:a.field},$.createElement(vr,{style:{input:a.input,label:a.label},label:"r",value:this.props.rgb.r,onChange:this.handleChange})),$.createElement("div",{style:a.field},$.createElement(vr,{style:{input:a.input,label:a.label},label:"g",value:this.props.rgb.g,onChange:this.handleChange})),$.createElement("div",{style:a.field},$.createElement(vr,{style:{input:a.input,label:a.label},label:"b",value:this.props.rgb.b,onChange:this.handleChange})),$.createElement("div",{style:a.alpha},$.createElement(vr,{style:{input:a.input,label:a.label},label:"a",value:this.props.rgb.a,arrowOffset:.01,onChange:this.handleChange}))):this.state.view==="hsl"&&(i=$.createElement("div",{style:a.fields,className:"flexbox-fix"},$.createElement("div",{style:a.field},$.createElement(vr,{style:{input:a.input,label:a.label},label:"h",value:Math.round(this.props.hsl.h),onChange:this.handleChange})),$.createElement("div",{style:a.field},$.createElement(vr,{style:{input:a.input,label:a.label},label:"s",value:Math.round(this.props.hsl.s*100)+"%",onChange:this.handleChange})),$.createElement("div",{style:a.field},$.createElement(vr,{style:{input:a.input,label:a.label},label:"l",value:Math.round(this.props.hsl.l*100)+"%",onChange:this.handleChange})),$.createElement("div",{style:a.alpha},$.createElement(vr,{style:{input:a.input,label:a.label},label:"a",value:this.props.hsl.a,arrowOffset:.01,onChange:this.handleChange})))),$.createElement("div",{style:a.wrap,className:"flexbox-fix"},i,$.createElement("div",{style:a.toggle},$.createElement("div",{style:a.icon,onClick:this.toggleViews,ref:function(u){return n.icon=u}},$.createElement(IR,{style:a.svg,onMouseOver:this.showHighlight,onMouseEnter:this.showHighlight,onMouseOut:this.hideHighlight}))))}}],[{key:"getDerivedStateFromProps",value:function(n,a){return n.hsl.a!==1&&a.view==="hex"?{view:"rgb"}:null}}]),r}($.Component);py.defaultProps={view:"hex"};var cd=function(){var r=Ze({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",transform:"translate(-6px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}}});return $.createElement("div",{style:r.picker})},HR=function(){var r=Ze({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}}});return $.createElement("div",{style:r.picker})},Zc=function(r){var t=r.width,n=r.onChange,a=r.disableAlpha,i=r.rgb,o=r.hsl,u=r.hsv,s=r.hex,l=r.renderers,c=r.styles,f=c===void 0?{}:c,p=r.className,v=p===void 0?"":p,m=r.defaultView,d=Ze(gt({default:{picker:{width:t,background:"#fff",borderRadius:"2px",boxShadow:"0 0 2px rgba(0,0,0,.3), 0 4px 8px rgba(0,0,0,.3)",boxSizing:"initial",fontFamily:"Menlo"},saturation:{width:"100%",paddingBottom:"55%",position:"relative",borderRadius:"2px 2px 0 0",overflow:"hidden"},Saturation:{radius:"2px 2px 0 0"},body:{padding:"16px 16px 12px"},controls:{display:"flex"},color:{width:"32px"},swatch:{marginTop:"6px",width:"16px",height:"16px",borderRadius:"8px",position:"relative",overflow:"hidden"},active:{absolute:"0px 0px 0px 0px",borderRadius:"8px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.1)",background:"rgba("+i.r+", "+i.g+", "+i.b+", "+i.a+")",zIndex:"2"},toggles:{flex:"1"},hue:{height:"10px",position:"relative",marginBottom:"8px"},Hue:{radius:"2px"},alpha:{height:"10px",position:"relative"},Alpha:{radius:"2px"}},disableAlpha:{color:{width:"22px"},alpha:{display:"none"},hue:{marginBottom:"0px"},swatch:{width:"10px",height:"10px",marginTop:"0px"}}},f),{disableAlpha:a});return $.createElement("div",{style:d.picker,className:"chrome-picker "+v},$.createElement("div",{style:d.saturation},$.createElement(au,{style:d.Saturation,hsl:o,hsv:u,pointer:HR,onChange:n})),$.createElement("div",{style:d.body},$.createElement("div",{style:d.controls,className:"flexbox-fix"},$.createElement("div",{style:d.color},$.createElement("div",{style:d.swatch},$.createElement("div",{style:d.active}),$.createElement(fi,{renderers:l}))),$.createElement("div",{style:d.toggles},$.createElement("div",{style:d.hue},$.createElement(pi,{style:d.Hue,hsl:o,pointer:cd,onChange:n})),$.createElement("div",{style:d.alpha},$.createElement(Fc,{style:d.Alpha,rgb:i,hsl:o,pointer:cd,renderers:l,onChange:n})))),$.createElement(py,{rgb:i,hsl:o,hex:s,view:m,onChange:n,disableAlpha:a})))};Zc.propTypes={width:Fe.oneOfType([Fe.string,Fe.number]),disableAlpha:Fe.bool,styles:Fe.object,defaultView:Fe.oneOf(["hex","rgb","hsl"])};Zc.defaultProps={width:225,disableAlpha:!1,styles:{}};yt(Zc);var jR=function(r){var t=r.color,n=r.onClick,a=n===void 0?function(){}:n,i=r.onSwatchHover,o=r.active,u=Ze({default:{color:{background:t,width:"15px",height:"15px",float:"left",marginRight:"5px",marginBottom:"5px",position:"relative",cursor:"pointer"},dot:{absolute:"5px 5px 5px 5px",background:Uc(t),borderRadius:"50%",opacity:"0"}},active:{dot:{opacity:"1"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},dot:{background:"#000"}},transparent:{dot:{background:"#000"}}},{active:o,"color-#FFFFFF":t==="#FFFFFF",transparent:t==="transparent"});return $.createElement(ia,{style:u.color,color:t,onClick:a,onHover:i,focusStyle:{boxShadow:"0 0 4px "+t}},$.createElement("div",{style:u.dot}))},VR=function(r){var t=r.hex,n=r.rgb,a=r.onChange,i=Ze({default:{fields:{display:"flex",paddingBottom:"6px",paddingRight:"5px",position:"relative"},active:{position:"absolute",top:"6px",left:"5px",height:"9px",width:"9px",background:t},HEXwrap:{flex:"6",position:"relative"},HEXinput:{width:"80%",padding:"0px",paddingLeft:"20%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},HEXlabel:{display:"none"},RGBwrap:{flex:"3",position:"relative"},RGBinput:{width:"70%",padding:"0px",paddingLeft:"30%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},RGBlabel:{position:"absolute",top:"3px",left:"0px",lineHeight:"16px",textTransform:"uppercase",fontSize:"12px",color:"#999"}}}),o=function(s,l){s.r||s.g||s.b?a({r:s.r||n.r,g:s.g||n.g,b:s.b||n.b,source:"rgb"},l):a({hex:s.hex,source:"hex"},l)};return $.createElement("div",{style:i.fields,className:"flexbox-fix"},$.createElement("div",{style:i.active}),$.createElement(vr,{style:{wrap:i.HEXwrap,input:i.HEXinput,label:i.HEXlabel},label:"hex",value:t,onChange:o}),$.createElement(vr,{style:{wrap:i.RGBwrap,input:i.RGBinput,label:i.RGBlabel},label:"r",value:n.r,onChange:o}),$.createElement(vr,{style:{wrap:i.RGBwrap,input:i.RGBinput,label:i.RGBlabel},label:"g",value:n.g,onChange:o}),$.createElement(vr,{style:{wrap:i.RGBwrap,input:i.RGBinput,label:i.RGBlabel},label:"b",value:n.b,onChange:o}))},Yc=function(r){var t=r.onChange,n=r.onSwatchHover,a=r.colors,i=r.hex,o=r.rgb,u=r.styles,s=u===void 0?{}:u,l=r.className,c=l===void 0?"":l,f=Ze(gt({default:{Compact:{background:"#f6f6f6",radius:"4px"},compact:{paddingTop:"5px",paddingLeft:"5px",boxSizing:"initial",width:"240px"},clear:{clear:"both"}}},s)),p=function(m,d){m.hex?zn(m.hex)&&t({hex:m.hex,source:"hex"},d):t(m,d)};return $.createElement(co,{style:f.Compact,styles:s},$.createElement("div",{style:f.compact,className:"compact-picker "+c},$.createElement("div",null,oa(a,function(v){return $.createElement(jR,{key:v,color:v,active:v.toLowerCase()===i,onClick:p,onSwatchHover:n})}),$.createElement("div",{style:f.clear})),$.createElement(VR,{hex:i,rgb:o,onChange:p})))};Yc.propTypes={colors:Fe.arrayOf(Fe.string),styles:Fe.object};Yc.defaultProps={colors:["#4D4D4D","#999999","#FFFFFF","#F44E3B","#FE9200","#FCDC00","#DBDF00","#A4DD00","#68CCCA","#73D8FF","#AEA1FF","#FDA1FF","#333333","#808080","#cccccc","#D33115","#E27300","#FCC400","#B0BC00","#68BC00","#16A5A5","#009CE0","#7B64FF","#FA28FF","#000000","#666666","#B3B3B3","#9F0500","#C45100","#FB9E00","#808900","#194D33","#0C797D","#0062B1","#653294","#AB149E"],styles:{}};yt(Yc);var GR=function(r){var t=r.hover,n=r.color,a=r.onClick,i=r.onSwatchHover,o={position:"relative",zIndex:"2",outline:"2px solid #fff",boxShadow:"0 0 5px 2px rgba(0,0,0,0.25)"},u=Ze({default:{swatch:{width:"25px",height:"25px",fontSize:"0"}},hover:{swatch:o}},{hover:t});return $.createElement("div",{style:u.swatch},$.createElement(ia,{color:n,onClick:a,onHover:i,focusStyle:o}))};const WR=$c(GR);var Xc=function(r){var t=r.width,n=r.colors,a=r.onChange,i=r.onSwatchHover,o=r.triangle,u=r.styles,s=u===void 0?{}:u,l=r.className,c=l===void 0?"":l,f=Ze(gt({default:{card:{width:t,background:"#fff",border:"1px solid rgba(0,0,0,0.2)",boxShadow:"0 3px 12px rgba(0,0,0,0.15)",borderRadius:"4px",position:"relative",padding:"5px",display:"flex",flexWrap:"wrap"},triangle:{position:"absolute",border:"7px solid transparent",borderBottomColor:"#fff"},triangleShadow:{position:"absolute",border:"8px solid transparent",borderBottomColor:"rgba(0,0,0,0.15)"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-14px",left:"10px"},triangleShadow:{top:"-16px",left:"9px"}},"top-right-triangle":{triangle:{top:"-14px",right:"10px"},triangleShadow:{top:"-16px",right:"9px"}},"bottom-left-triangle":{triangle:{top:"35px",left:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",left:"9px",transform:"rotate(180deg)"}},"bottom-right-triangle":{triangle:{top:"35px",right:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",right:"9px",transform:"rotate(180deg)"}}},s),{"hide-triangle":o==="hide","top-left-triangle":o==="top-left","top-right-triangle":o==="top-right","bottom-left-triangle":o==="bottom-left","bottom-right-triangle":o==="bottom-right"}),p=function(m,d){return a({hex:m,source:"hex"},d)};return $.createElement("div",{style:f.card,className:"github-picker "+c},$.createElement("div",{style:f.triangleShadow}),$.createElement("div",{style:f.triangle}),oa(n,function(v){return $.createElement(WR,{color:v,key:v,onClick:p,onSwatchHover:i})}))};Xc.propTypes={width:Fe.oneOfType([Fe.string,Fe.number]),colors:Fe.arrayOf(Fe.string),triangle:Fe.oneOf(["hide","top-left","top-right","bottom-left","bottom-right"]),styles:Fe.object};Xc.defaultProps={width:200,colors:["#B80000","#DB3E00","#FCCB00","#008B02","#006B76","#1273DE","#004DCF","#5300EB","#EB9694","#FAD0C3","#FEF3BD","#C1E1C5","#BEDADC","#C4DEF6","#BED3F3","#D4C4FB"],triangle:"top-left",styles:{}};yt(Xc);var ZR=function(r){var t=r.direction,n=Ze({default:{picker:{width:"18px",height:"18px",borderRadius:"50%",transform:"translate(-9px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}},vertical:{picker:{transform:"translate(-3px, -9px)"}}},{vertical:t==="vertical"});return $.createElement("div",{style:n.picker})},YR=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},Kc=function(r){var t=r.width,n=r.height,a=r.onChange,i=r.hsl,o=r.direction,u=r.pointer,s=r.styles,l=s===void 0?{}:s,c=r.className,f=c===void 0?"":c,p=Ze(gt({default:{picker:{position:"relative",width:t,height:n},hue:{radius:"2px"}}},l)),v=function(d){return a({a:1,h:d.h,l:.5,s:1})};return $.createElement("div",{style:p.picker,className:"hue-picker "+f},$.createElement(pi,YR({},p.hue,{hsl:i,pointer:u,onChange:v,direction:o})))};Kc.propTypes={styles:Fe.object};Kc.defaultProps={width:"316px",height:"16px",direction:"horizontal",pointer:ZR,styles:{}};yt(Kc);var XR=function(r){var t=r.onChange,n=r.hex,a=r.rgb,i=r.styles,o=i===void 0?{}:i,u=r.className,s=u===void 0?"":u,l=Ze(gt({default:{material:{width:"98px",height:"98px",padding:"16px",fontFamily:"Roboto"},HEXwrap:{position:"relative"},HEXinput:{width:"100%",marginTop:"12px",fontSize:"15px",color:"#333",padding:"0px",border:"0px",borderBottom:"2px solid "+n,outline:"none",height:"30px"},HEXlabel:{position:"absolute",top:"0px",left:"0px",fontSize:"11px",color:"#999999",textTransform:"capitalize"},Hex:{style:{}},RGBwrap:{position:"relative"},RGBinput:{width:"100%",marginTop:"12px",fontSize:"15px",color:"#333",padding:"0px",border:"0px",borderBottom:"1px solid #eee",outline:"none",height:"30px"},RGBlabel:{position:"absolute",top:"0px",left:"0px",fontSize:"11px",color:"#999999",textTransform:"capitalize"},split:{display:"flex",marginRight:"-10px",paddingTop:"11px"},third:{flex:"1",paddingRight:"10px"}}},o)),c=function(p,v){p.hex?zn(p.hex)&&t({hex:p.hex,source:"hex"},v):(p.r||p.g||p.b)&&t({r:p.r||a.r,g:p.g||a.g,b:p.b||a.b,source:"rgb"},v)};return $.createElement(co,{styles:o},$.createElement("div",{style:l.material,className:"material-picker "+s},$.createElement(vr,{style:{wrap:l.HEXwrap,input:l.HEXinput,label:l.HEXlabel},label:"hex",value:n,onChange:c}),$.createElement("div",{style:l.split,className:"flexbox-fix"},$.createElement("div",{style:l.third},$.createElement(vr,{style:{wrap:l.RGBwrap,input:l.RGBinput,label:l.RGBlabel},label:"r",value:a.r,onChange:c})),$.createElement("div",{style:l.third},$.createElement(vr,{style:{wrap:l.RGBwrap,input:l.RGBinput,label:l.RGBlabel},label:"g",value:a.g,onChange:c})),$.createElement("div",{style:l.third},$.createElement(vr,{style:{wrap:l.RGBwrap,input:l.RGBinput,label:l.RGBlabel},label:"b",value:a.b,onChange:c})))))};yt(XR);var KR=function(r){var t=r.onChange,n=r.rgb,a=r.hsv,i=r.hex,o=Ze({default:{fields:{paddingTop:"5px",paddingBottom:"9px",width:"80px",position:"relative"},divider:{height:"5px"},RGBwrap:{position:"relative"},RGBinput:{marginLeft:"40%",width:"40%",height:"18px",border:"1px solid #888888",boxShadow:"inset 0 1px 1px rgba(0,0,0,.1), 0 1px 0 0 #ECECEC",marginBottom:"5px",fontSize:"13px",paddingLeft:"3px",marginRight:"10px"},RGBlabel:{left:"0px",top:"0px",width:"34px",textTransform:"uppercase",fontSize:"13px",height:"18px",lineHeight:"22px",position:"absolute"},HEXwrap:{position:"relative"},HEXinput:{marginLeft:"20%",width:"80%",height:"18px",border:"1px solid #888888",boxShadow:"inset 0 1px 1px rgba(0,0,0,.1), 0 1px 0 0 #ECECEC",marginBottom:"6px",fontSize:"13px",paddingLeft:"3px"},HEXlabel:{position:"absolute",top:"0px",left:"0px",width:"14px",textTransform:"uppercase",fontSize:"13px",height:"18px",lineHeight:"22px"},fieldSymbols:{position:"absolute",top:"5px",right:"-7px",fontSize:"13px"},symbol:{height:"20px",lineHeight:"22px",paddingBottom:"7px"}}}),u=function(l,c){l["#"]?zn(l["#"])&&t({hex:l["#"],source:"hex"},c):l.r||l.g||l.b?t({r:l.r||n.r,g:l.g||n.g,b:l.b||n.b,source:"rgb"},c):(l.h||l.s||l.v)&&t({h:l.h||a.h,s:l.s||a.s,v:l.v||a.v,source:"hsv"},c)};return $.createElement("div",{style:o.fields},$.createElement(vr,{style:{wrap:o.RGBwrap,input:o.RGBinput,label:o.RGBlabel},label:"h",value:Math.round(a.h),onChange:u}),$.createElement(vr,{style:{wrap:o.RGBwrap,input:o.RGBinput,label:o.RGBlabel},label:"s",value:Math.round(a.s*100),onChange:u}),$.createElement(vr,{style:{wrap:o.RGBwrap,input:o.RGBinput,label:o.RGBlabel},label:"v",value:Math.round(a.v*100),onChange:u}),$.createElement("div",{style:o.divider}),$.createElement(vr,{style:{wrap:o.RGBwrap,input:o.RGBinput,label:o.RGBlabel},label:"r",value:n.r,onChange:u}),$.createElement(vr,{style:{wrap:o.RGBwrap,input:o.RGBinput,label:o.RGBlabel},label:"g",value:n.g,onChange:u}),$.createElement(vr,{style:{wrap:o.RGBwrap,input:o.RGBinput,label:o.RGBlabel},label:"b",value:n.b,onChange:u}),$.createElement("div",{style:o.divider}),$.createElement(vr,{style:{wrap:o.HEXwrap,input:o.HEXinput,label:o.HEXlabel},label:"#",value:i.replace("#",""),onChange:u}),$.createElement("div",{style:o.fieldSymbols},$.createElement("div",{style:o.symbol},"°"),$.createElement("div",{style:o.symbol},"%"),$.createElement("div",{style:o.symbol},"%")))},JR=function(r){var t=r.hsl,n=Ze({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}},"black-outline":{picker:{boxShadow:"inset 0 0 0 1px #000"}}},{"black-outline":t.l>.5});return $.createElement("div",{style:n.picker})},QR=function(){var r=Ze({default:{triangle:{width:0,height:0,borderStyle:"solid",borderWidth:"4px 0 4px 6px",borderColor:"transparent transparent transparent #fff",position:"absolute",top:"1px",left:"1px"},triangleBorder:{width:0,height:0,borderStyle:"solid",borderWidth:"5px 0 5px 8px",borderColor:"transparent transparent transparent #555"},left:{Extend:"triangleBorder",transform:"translate(-13px, -4px)"},leftInside:{Extend:"triangle",transform:"translate(-8px, -5px)"},right:{Extend:"triangleBorder",transform:"translate(20px, -14px) rotate(180deg)"},rightInside:{Extend:"triangle",transform:"translate(-8px, -5px)"}}});return $.createElement("div",{style:r.pointer},$.createElement("div",{style:r.left},$.createElement("div",{style:r.leftInside})),$.createElement("div",{style:r.right},$.createElement("div",{style:r.rightInside})))},fd=function(r){var t=r.onClick,n=r.label,a=r.children,i=r.active,o=Ze({default:{button:{backgroundImage:"linear-gradient(-180deg, #FFFFFF 0%, #E6E6E6 100%)",border:"1px solid #878787",borderRadius:"2px",height:"20px",boxShadow:"0 1px 0 0 #EAEAEA",fontSize:"14px",color:"#000",lineHeight:"20px",textAlign:"center",marginBottom:"10px",cursor:"pointer"}},active:{button:{boxShadow:"0 0 0 1px #878787"}}},{active:i});return $.createElement("div",{style:o.button,onClick:t},n||a)},eP=function(r){var t=r.rgb,n=r.currentColor,a=Ze({default:{swatches:{border:"1px solid #B3B3B3",borderBottom:"1px solid #F0F0F0",marginBottom:"2px",marginTop:"1px"},new:{height:"34px",background:"rgb("+t.r+","+t.g+", "+t.b+")",boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 1px 0 #000"},current:{height:"34px",background:n,boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 -1px 0 #000"},label:{fontSize:"14px",color:"#000",textAlign:"center"}}});return $.createElement("div",null,$.createElement("div",{style:a.label},"new"),$.createElement("div",{style:a.swatches},$.createElement("div",{style:a.new}),$.createElement("div",{style:a.current})),$.createElement("div",{style:a.label},"current"))},rP=function(){function e(r,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(r,a.key,a)}}return function(r,t,n){return t&&e(r.prototype,t),n&&e(r,n),r}}();function tP(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function nP(e,r){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r&&(typeof r=="object"||typeof r=="function")?r:e}function aP(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof r);e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),r&&(Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r)}var Jc=function(e){aP(r,e);function r(t){tP(this,r);var n=nP(this,(r.__proto__||Object.getPrototypeOf(r)).call(this));return n.state={currentColor:t.hex},n}return rP(r,[{key:"render",value:function(){var n=this.props,a=n.styles,i=a===void 0?{}:a,o=n.className,u=o===void 0?"":o,s=Ze(gt({default:{picker:{background:"#DCDCDC",borderRadius:"4px",boxShadow:"0 0 0 1px rgba(0,0,0,.25), 0 8px 16px rgba(0,0,0,.15)",boxSizing:"initial",width:"513px"},head:{backgroundImage:"linear-gradient(-180deg, #F0F0F0 0%, #D4D4D4 100%)",borderBottom:"1px solid #B1B1B1",boxShadow:"inset 0 1px 0 0 rgba(255,255,255,.2), inset 0 -1px 0 0 rgba(0,0,0,.02)",height:"23px",lineHeight:"24px",borderRadius:"4px 4px 0 0",fontSize:"13px",color:"#4D4D4D",textAlign:"center"},body:{padding:"15px 15px 0",display:"flex"},saturation:{width:"256px",height:"256px",position:"relative",border:"2px solid #B3B3B3",borderBottom:"2px solid #F0F0F0",overflow:"hidden"},hue:{position:"relative",height:"256px",width:"19px",marginLeft:"10px",border:"2px solid #B3B3B3",borderBottom:"2px solid #F0F0F0"},controls:{width:"180px",marginLeft:"10px"},top:{display:"flex"},previews:{width:"60px"},actions:{flex:"1",marginLeft:"20px"}}},i));return $.createElement("div",{style:s.picker,className:"photoshop-picker "+u},$.createElement("div",{style:s.head},this.props.header),$.createElement("div",{style:s.body,className:"flexbox-fix"},$.createElement("div",{style:s.saturation},$.createElement(au,{hsl:this.props.hsl,hsv:this.props.hsv,pointer:JR,onChange:this.props.onChange})),$.createElement("div",{style:s.hue},$.createElement(pi,{direction:"vertical",hsl:this.props.hsl,pointer:QR,onChange:this.props.onChange})),$.createElement("div",{style:s.controls},$.createElement("div",{style:s.top,className:"flexbox-fix"},$.createElement("div",{style:s.previews},$.createElement(eP,{rgb:this.props.rgb,currentColor:this.state.currentColor})),$.createElement("div",{style:s.actions},$.createElement(fd,{label:"OK",onClick:this.props.onAccept,active:!0}),$.createElement(fd,{label:"Cancel",onClick:this.props.onCancel}),$.createElement(KR,{onChange:this.props.onChange,rgb:this.props.rgb,hsv:this.props.hsv,hex:this.props.hex}))))))}}]),r}($.Component);Jc.propTypes={header:Fe.string,styles:Fe.object};Jc.defaultProps={header:"Color Picker",styles:{}};yt(Jc);var iP=function(r){var t=r.onChange,n=r.rgb,a=r.hsl,i=r.hex,o=r.disableAlpha,u=Ze({default:{fields:{display:"flex",paddingTop:"4px"},single:{flex:"1",paddingLeft:"6px"},alpha:{flex:"1",paddingLeft:"6px"},double:{flex:"2"},input:{width:"80%",padding:"4px 10% 3px",border:"none",boxShadow:"inset 0 0 0 1px #ccc",fontSize:"11px"},label:{display:"block",textAlign:"center",fontSize:"11px",color:"#222",paddingTop:"3px",paddingBottom:"4px",textTransform:"capitalize"}},disableAlpha:{alpha:{display:"none"}}},{disableAlpha:o}),s=function(c,f){c.hex?zn(c.hex)&&t({hex:c.hex,source:"hex"},f):c.r||c.g||c.b?t({r:c.r||n.r,g:c.g||n.g,b:c.b||n.b,a:n.a,source:"rgb"},f):c.a&&(c.a<0?c.a=0:c.a>100&&(c.a=100),c.a/=100,t({h:a.h,s:a.s,l:a.l,a:c.a,source:"rgb"},f))};return $.createElement("div",{style:u.fields,className:"flexbox-fix"},$.createElement("div",{style:u.double},$.createElement(vr,{style:{input:u.input,label:u.label},label:"hex",value:i.replace("#",""),onChange:s})),$.createElement("div",{style:u.single},$.createElement(vr,{style:{input:u.input,label:u.label},label:"r",value:n.r,onChange:s,dragLabel:"true",dragMax:"255"})),$.createElement("div",{style:u.single},$.createElement(vr,{style:{input:u.input,label:u.label},label:"g",value:n.g,onChange:s,dragLabel:"true",dragMax:"255"})),$.createElement("div",{style:u.single},$.createElement(vr,{style:{input:u.input,label:u.label},label:"b",value:n.b,onChange:s,dragLabel:"true",dragMax:"255"})),$.createElement("div",{style:u.alpha},$.createElement(vr,{style:{input:u.input,label:u.label},label:"a",value:Math.round(n.a*100),onChange:s,dragLabel:"true",dragMax:"100"})))},oP=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},vy=function(r){var t=r.colors,n=r.onClick,a=n===void 0?function(){}:n,i=r.onSwatchHover,o=Ze({default:{colors:{margin:"0 -10px",padding:"10px 0 0 10px",borderTop:"1px solid #eee",display:"flex",flexWrap:"wrap",position:"relative"},swatchWrap:{width:"16px",height:"16px",margin:"0 10px 10px 0"},swatch:{borderRadius:"3px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15)"}},"no-presets":{colors:{display:"none"}}},{"no-presets":!t||!t.length}),u=function(l,c){a({hex:l,source:"hex"},c)};return $.createElement("div",{style:o.colors,className:"flexbox-fix"},t.map(function(s){var l=typeof s=="string"?{color:s}:s,c=""+l.color+(l.title||"");return $.createElement("div",{key:c,style:o.swatchWrap},$.createElement(ia,oP({},l,{style:o.swatch,onClick:u,onHover:i,focusStyle:{boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), 0 0 4px "+l.color}})))}))};vy.propTypes={colors:Fe.arrayOf(Fe.oneOfType([Fe.string,Fe.shape({color:Fe.string,title:Fe.string})])).isRequired};var sP=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},Qc=function(r){var t=r.width,n=r.rgb,a=r.hex,i=r.hsv,o=r.hsl,u=r.onChange,s=r.onSwatchHover,l=r.disableAlpha,c=r.presetColors,f=r.renderers,p=r.styles,v=p===void 0?{}:p,m=r.className,d=m===void 0?"":m,y=Ze(gt({default:sP({picker:{width:t,padding:"10px 10px 0",boxSizing:"initial",background:"#fff",borderRadius:"4px",boxShadow:"0 0 0 1px rgba(0,0,0,.15), 0 8px 16px rgba(0,0,0,.15)"},saturation:{width:"100%",paddingBottom:"75%",position:"relative",overflow:"hidden"},Saturation:{radius:"3px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},controls:{display:"flex"},sliders:{padding:"4px 0",flex:"1"},color:{width:"24px",height:"24px",position:"relative",marginTop:"4px",marginLeft:"4px",borderRadius:"3px"},activeColor:{absolute:"0px 0px 0px 0px",borderRadius:"2px",background:"rgba("+n.r+","+n.g+","+n.b+","+n.a+")",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},hue:{position:"relative",height:"10px",overflow:"hidden"},Hue:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},alpha:{position:"relative",height:"10px",marginTop:"4px",overflow:"hidden"},Alpha:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"}},v),disableAlpha:{color:{height:"10px"},hue:{height:"10px"},alpha:{display:"none"}}},v),{disableAlpha:l});return $.createElement("div",{style:y.picker,className:"sketch-picker "+d},$.createElement("div",{style:y.saturation},$.createElement(au,{style:y.Saturation,hsl:o,hsv:i,onChange:u})),$.createElement("div",{style:y.controls,className:"flexbox-fix"},$.createElement("div",{style:y.sliders},$.createElement("div",{style:y.hue},$.createElement(pi,{style:y.Hue,hsl:o,onChange:u})),$.createElement("div",{style:y.alpha},$.createElement(Fc,{style:y.Alpha,rgb:n,hsl:o,renderers:f,onChange:u}))),$.createElement("div",{style:y.color},$.createElement(fi,null),$.createElement("div",{style:y.activeColor}))),$.createElement(iP,{rgb:n,hsl:o,hex:a,onChange:u,disableAlpha:l}),$.createElement(vy,{colors:c,onClick:u,onSwatchHover:s}))};Qc.propTypes={disableAlpha:Fe.bool,width:Fe.oneOfType([Fe.string,Fe.number]),styles:Fe.object};Qc.defaultProps={disableAlpha:!1,width:200,styles:{},presetColors:["#D0021B","#F5A623","#F8E71C","#8B572A","#7ED321","#417505","#BD10E0","#9013FE","#4A90E2","#50E3C2","#B8E986","#000000","#4A4A4A","#9B9B9B","#FFFFFF"]};const uP=yt(Qc);var Ii=function(r){var t=r.hsl,n=r.offset,a=r.onClick,i=a===void 0?function(){}:a,o=r.active,u=r.first,s=r.last,l=Ze({default:{swatch:{height:"12px",background:"hsl("+t.h+", 50%, "+n*100+"%)",cursor:"pointer"}},first:{swatch:{borderRadius:"2px 0 0 2px"}},last:{swatch:{borderRadius:"0 2px 2px 0"}},active:{swatch:{transform:"scaleY(1.8)",borderRadius:"3.6px/2px"}}},{active:o,first:u,last:s}),c=function(p){return i({h:t.h,s:.5,l:n,source:"hsl"},p)};return $.createElement("div",{style:l.swatch,onClick:c})},lP=function(r){var t=r.onClick,n=r.hsl,a=Ze({default:{swatches:{marginTop:"20px"},swatch:{boxSizing:"border-box",width:"20%",paddingRight:"1px",float:"left"},clear:{clear:"both"}}}),i=.1;return $.createElement("div",{style:a.swatches},$.createElement("div",{style:a.swatch},$.createElement(Ii,{hsl:n,offset:".80",active:Math.abs(n.l-.8)<i&&Math.abs(n.s-.5)<i,onClick:t,first:!0})),$.createElement("div",{style:a.swatch},$.createElement(Ii,{hsl:n,offset:".65",active:Math.abs(n.l-.65)<i&&Math.abs(n.s-.5)<i,onClick:t})),$.createElement("div",{style:a.swatch},$.createElement(Ii,{hsl:n,offset:".50",active:Math.abs(n.l-.5)<i&&Math.abs(n.s-.5)<i,onClick:t})),$.createElement("div",{style:a.swatch},$.createElement(Ii,{hsl:n,offset:".35",active:Math.abs(n.l-.35)<i&&Math.abs(n.s-.5)<i,onClick:t})),$.createElement("div",{style:a.swatch},$.createElement(Ii,{hsl:n,offset:".20",active:Math.abs(n.l-.2)<i&&Math.abs(n.s-.5)<i,onClick:t,last:!0})),$.createElement("div",{style:a.clear}))},cP=function(){var r=Ze({default:{picker:{width:"14px",height:"14px",borderRadius:"6px",transform:"translate(-7px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}}});return $.createElement("div",{style:r.picker})},ef=function(r){var t=r.hsl,n=r.onChange,a=r.pointer,i=r.styles,o=i===void 0?{}:i,u=r.className,s=u===void 0?"":u,l=Ze(gt({default:{hue:{height:"12px",position:"relative"},Hue:{radius:"2px"}}},o));return $.createElement("div",{style:l.wrap||{},className:"slider-picker "+s},$.createElement("div",{style:l.hue},$.createElement(pi,{style:l.Hue,hsl:t,pointer:a,onChange:n})),$.createElement("div",{style:l.swatches},$.createElement(lP,{hsl:t,onClick:n})))};ef.propTypes={styles:Fe.object};ef.defaultProps={pointer:cP,styles:{}};yt(ef);var dy={};Object.defineProperty(dy,"__esModule",{value:!0});var pd=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},fP=$,vd=pP(fP);function pP(e){return e&&e.__esModule?e:{default:e}}function vP(e,r){var t={};for(var n in e)r.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}var zo=24,dP=dy.default=function(e){var r=e.fill,t=r===void 0?"currentColor":r,n=e.width,a=n===void 0?zo:n,i=e.height,o=i===void 0?zo:i,u=e.style,s=u===void 0?{}:u,l=vP(e,["fill","width","height","style"]);return vd.default.createElement("svg",pd({viewBox:"0 0 "+zo+" "+zo,style:pd({fill:t,width:a,height:o},s)},l),vd.default.createElement("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"}))},mP=function(r){var t=r.color,n=r.onClick,a=n===void 0?function(){}:n,i=r.onSwatchHover,o=r.first,u=r.last,s=r.active,l=Ze({default:{color:{width:"40px",height:"24px",cursor:"pointer",background:t,marginBottom:"1px"},check:{color:Uc(t),marginLeft:"8px",display:"none"}},first:{color:{overflow:"hidden",borderRadius:"2px 2px 0 0"}},last:{color:{overflow:"hidden",borderRadius:"0 0 2px 2px"}},active:{check:{display:"block"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},check:{color:"#333"}},transparent:{check:{color:"#333"}}},{first:o,last:u,active:s,"color-#FFFFFF":t==="#FFFFFF",transparent:t==="transparent"});return $.createElement(ia,{color:t,style:l.color,onClick:a,onHover:i,focusStyle:{boxShadow:"0 0 4px "+t}},$.createElement("div",{style:l.check},$.createElement(dP,null)))},hP=function(r){var t=r.onClick,n=r.onSwatchHover,a=r.group,i=r.active,o=Ze({default:{group:{paddingBottom:"10px",width:"40px",float:"left",marginRight:"10px"}}});return $.createElement("div",{style:o.group},oa(a,function(u,s){return $.createElement(mP,{key:u,color:u,active:u.toLowerCase()===i,first:s===0,last:s===a.length-1,onClick:t,onSwatchHover:n})}))},rf=function(r){var t=r.width,n=r.height,a=r.onChange,i=r.onSwatchHover,o=r.colors,u=r.hex,s=r.styles,l=s===void 0?{}:s,c=r.className,f=c===void 0?"":c,p=Ze(gt({default:{picker:{width:t,height:n},overflow:{height:n,overflowY:"scroll"},body:{padding:"16px 0 6px 16px"},clear:{clear:"both"}}},l)),v=function(d,y){return a({hex:d,source:"hex"},y)};return $.createElement("div",{style:p.picker,className:"swatches-picker "+f},$.createElement(co,null,$.createElement("div",{style:p.overflow},$.createElement("div",{style:p.body},oa(o,function(m){return $.createElement(hP,{key:m.toString(),group:m,active:u,onClick:v,onSwatchHover:i})}),$.createElement("div",{style:p.clear})))))};rf.propTypes={width:Fe.oneOfType([Fe.string,Fe.number]),height:Fe.oneOfType([Fe.string,Fe.number]),colors:Fe.arrayOf(Fe.arrayOf(Fe.string)),styles:Fe.object};rf.defaultProps={width:320,height:240,colors:[[Na[900],Na[700],Na[500],Na[300],Na[100]],[Ca[900],Ca[700],Ca[500],Ca[300],Ca[100]],[Ma[900],Ma[700],Ma[500],Ma[300],Ma[100]],[Ta[900],Ta[700],Ta[500],Ta[300],Ta[100]],[Oa[900],Oa[700],Oa[500],Oa[300],Oa[100]],[_a[900],_a[700],_a[500],_a[300],_a[100]],[$a[900],$a[700],$a[500],$a[300],$a[100]],[Fa[900],Fa[700],Fa[500],Fa[300],Fa[100]],[Ba[900],Ba[700],Ba[500],Ba[300],Ba[100]],["#194D33",Hi[700],Hi[500],Hi[300],Hi[100]],[Ra[900],Ra[700],Ra[500],Ra[300],Ra[100]],[Pa[900],Pa[700],Pa[500],Pa[300],Pa[100]],[za[900],za[700],za[500],za[300],za[100]],[Ia[900],Ia[700],Ia[500],Ia[300],Ia[100]],[La[900],La[700],La[500],La[300],La[100]],[qa[900],qa[700],qa[500],qa[300],qa[100]],[ka[900],ka[700],ka[500],ka[300],ka[100]],[Ua[900],Ua[700],Ua[500],Ua[300],Ua[100]],["#000000","#525252","#969696","#D9D9D9","#FFFFFF"]],styles:{}};yt(rf);var tf=function(r){var t=r.onChange,n=r.onSwatchHover,a=r.hex,i=r.colors,o=r.width,u=r.triangle,s=r.styles,l=s===void 0?{}:s,c=r.className,f=c===void 0?"":c,p=Ze(gt({default:{card:{width:o,background:"#fff",border:"0 solid rgba(0,0,0,0.25)",boxShadow:"0 1px 4px rgba(0,0,0,0.25)",borderRadius:"4px",position:"relative"},body:{padding:"15px 9px 9px 15px"},label:{fontSize:"18px",color:"#fff"},triangle:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 9px 10px 9px",borderColor:"transparent transparent #fff transparent",position:"absolute"},triangleShadow:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 9px 10px 9px",borderColor:"transparent transparent rgba(0,0,0,.1) transparent",position:"absolute"},hash:{background:"#F0F0F0",height:"30px",width:"30px",borderRadius:"4px 0 0 4px",float:"left",color:"#98A1A4",display:"flex",alignItems:"center",justifyContent:"center"},input:{width:"100px",fontSize:"14px",color:"#666",border:"0px",outline:"none",height:"28px",boxShadow:"inset 0 0 0 1px #F0F0F0",boxSizing:"content-box",borderRadius:"0 4px 4px 0",float:"left",paddingLeft:"8px"},swatch:{width:"30px",height:"30px",float:"left",borderRadius:"4px",margin:"0 6px 6px 0"},clear:{clear:"both"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-10px",left:"12px"},triangleShadow:{top:"-11px",left:"12px"}},"top-right-triangle":{triangle:{top:"-10px",right:"12px"},triangleShadow:{top:"-11px",right:"12px"}}},l),{"hide-triangle":u==="hide","top-left-triangle":u==="top-left","top-right-triangle":u==="top-right"}),v=function(d,y){zn(d)&&t({hex:d,source:"hex"},y)};return $.createElement("div",{style:p.card,className:"twitter-picker "+f},$.createElement("div",{style:p.triangleShadow}),$.createElement("div",{style:p.triangle}),$.createElement("div",{style:p.body},oa(i,function(m,d){return $.createElement(ia,{key:d,color:m,hex:m,style:p.swatch,onClick:v,onHover:n,focusStyle:{boxShadow:"0 0 4px "+m}})}),$.createElement("div",{style:p.hash},"#"),$.createElement(vr,{label:null,style:{input:p.input},value:a.replace("#",""),onChange:v}),$.createElement("div",{style:p.clear})))};tf.propTypes={width:Fe.oneOfType([Fe.string,Fe.number]),triangle:Fe.oneOf(["hide","top-left","top-right"]),colors:Fe.arrayOf(Fe.string),styles:Fe.object};tf.defaultProps={width:276,colors:["#FF6900","#FCB900","#7BDCB5","#00D084","#8ED1FC","#0693E3","#ABB8C3","#EB144C","#F78DA7","#9900EF"],triangle:"top-left",styles:{}};yt(tf);var nf=function(r){var t=Ze({default:{picker:{width:"20px",height:"20px",borderRadius:"22px",border:"2px #fff solid",transform:"translate(-12px, -13px)",background:"hsl("+Math.round(r.hsl.h)+", "+Math.round(r.hsl.s*100)+"%, "+Math.round(r.hsl.l*100)+"%)"}}});return $.createElement("div",{style:t.picker})};nf.propTypes={hsl:Fe.shape({h:Fe.number,s:Fe.number,l:Fe.number,a:Fe.number})};nf.defaultProps={hsl:{a:1,h:249.94,l:.2,s:.5}};var af=function(r){var t=Ze({default:{picker:{width:"20px",height:"20px",borderRadius:"22px",transform:"translate(-10px, -7px)",background:"hsl("+Math.round(r.hsl.h)+", 100%, 50%)",border:"2px white solid"}}});return $.createElement("div",{style:t.picker})};af.propTypes={hsl:Fe.shape({h:Fe.number,s:Fe.number,l:Fe.number,a:Fe.number})};af.defaultProps={hsl:{a:1,h:249.94,l:.2,s:.5}};var gP=function(r){var t=r.onChange,n=r.rgb,a=r.hsl,i=r.hex,o=r.hsv,u=function(v,m){if(v.hex)zn(v.hex)&&t({hex:v.hex,source:"hex"},m);else if(v.rgb){var d=v.rgb.split(",");ll(v.rgb,"rgb")&&t({r:d[0],g:d[1],b:d[2],a:1,source:"rgb"},m)}else if(v.hsv){var y=v.hsv.split(",");ll(v.hsv,"hsv")&&(y[2]=y[2].replace("%",""),y[1]=y[1].replace("%",""),y[0]=y[0].replace("°",""),y[1]==1?y[1]=.01:y[2]==1&&(y[2]=.01),t({h:Number(y[0]),s:Number(y[1]),v:Number(y[2]),source:"hsv"},m))}else if(v.hsl){var h=v.hsl.split(",");ll(v.hsl,"hsl")&&(h[2]=h[2].replace("%",""),h[1]=h[1].replace("%",""),h[0]=h[0].replace("°",""),f[1]==1?f[1]=.01:f[2]==1&&(f[2]=.01),t({h:Number(h[0]),s:Number(h[1]),v:Number(h[2]),source:"hsl"},m))}},s=Ze({default:{wrap:{display:"flex",height:"100px",marginTop:"4px"},fields:{width:"100%"},column:{paddingTop:"10px",display:"flex",justifyContent:"space-between"},double:{padding:"0px 4.4px",boxSizing:"border-box"},input:{width:"100%",height:"38px",boxSizing:"border-box",padding:"4px 10% 3px",textAlign:"center",border:"1px solid #dadce0",fontSize:"11px",textTransform:"lowercase",borderRadius:"5px",outline:"none",fontFamily:"Roboto,Arial,sans-serif"},input2:{height:"38px",width:"100%",border:"1px solid #dadce0",boxSizing:"border-box",fontSize:"11px",textTransform:"lowercase",borderRadius:"5px",outline:"none",paddingLeft:"10px",fontFamily:"Roboto,Arial,sans-serif"},label:{textAlign:"center",fontSize:"12px",background:"#fff",position:"absolute",textTransform:"uppercase",color:"#3c4043",width:"35px",top:"-6px",left:"0",right:"0",marginLeft:"auto",marginRight:"auto",fontFamily:"Roboto,Arial,sans-serif"},label2:{left:"10px",textAlign:"center",fontSize:"12px",background:"#fff",position:"absolute",textTransform:"uppercase",color:"#3c4043",width:"32px",top:"-6px",fontFamily:"Roboto,Arial,sans-serif"},single:{flexGrow:"1",margin:"0px 4.4px"}}}),l=n.r+", "+n.g+", "+n.b,c=Math.round(a.h)+"°, "+Math.round(a.s*100)+"%, "+Math.round(a.l*100)+"%",f=Math.round(o.h)+"°, "+Math.round(o.s*100)+"%, "+Math.round(o.v*100)+"%";return $.createElement("div",{style:s.wrap,className:"flexbox-fix"},$.createElement("div",{style:s.fields},$.createElement("div",{style:s.double},$.createElement(vr,{style:{input:s.input,label:s.label},label:"hex",value:i,onChange:u})),$.createElement("div",{style:s.column},$.createElement("div",{style:s.single},$.createElement(vr,{style:{input:s.input2,label:s.label2},label:"rgb",value:l,onChange:u})),$.createElement("div",{style:s.single},$.createElement(vr,{style:{input:s.input2,label:s.label2},label:"hsv",value:f,onChange:u})),$.createElement("div",{style:s.single},$.createElement(vr,{style:{input:s.input2,label:s.label2},label:"hsl",value:c,onChange:u})))))},of=function(r){var t=r.width,n=r.onChange,a=r.rgb,i=r.hsl,o=r.hsv,u=r.hex,s=r.header,l=r.styles,c=l===void 0?{}:l,f=r.className,p=f===void 0?"":f,v=Ze(gt({default:{picker:{width:t,background:"#fff",border:"1px solid #dfe1e5",boxSizing:"initial",display:"flex",flexWrap:"wrap",borderRadius:"8px 8px 0px 0px"},head:{height:"57px",width:"100%",paddingTop:"16px",paddingBottom:"16px",paddingLeft:"16px",fontSize:"20px",boxSizing:"border-box",fontFamily:"Roboto-Regular,HelveticaNeue,Arial,sans-serif"},saturation:{width:"70%",padding:"0px",position:"relative",overflow:"hidden"},swatch:{width:"30%",height:"228px",padding:"0px",background:"rgba("+a.r+", "+a.g+", "+a.b+", 1)",position:"relative",overflow:"hidden"},body:{margin:"auto",width:"95%"},controls:{display:"flex",boxSizing:"border-box",height:"52px",paddingTop:"22px"},color:{width:"32px"},hue:{height:"8px",position:"relative",margin:"0px 16px 0px 16px",width:"100%"},Hue:{radius:"2px"}}},c));return $.createElement("div",{style:v.picker,className:"google-picker "+p},$.createElement("div",{style:v.head},s),$.createElement("div",{style:v.swatch}),$.createElement("div",{style:v.saturation},$.createElement(au,{hsl:i,hsv:o,pointer:nf,onChange:n})),$.createElement("div",{style:v.body},$.createElement("div",{style:v.controls,className:"flexbox-fix"},$.createElement("div",{style:v.hue},$.createElement(pi,{style:v.Hue,hsl:i,radius:"4px",pointer:af,onChange:n}))),$.createElement(gP,{rgb:a,hsl:i,hex:u,hsv:o,onChange:n})))};of.propTypes={width:Fe.oneOfType([Fe.string,Fe.number]),styles:Fe.object,header:Fe.string};of.defaultProps={width:652,styles:{},header:"Color picker"};yt(of);const yP=e=>{const{initialVisible:r=!1,onVisibleChange:t}=e??{},[n,a]=$.useState(r);$.useEffect(()=>t==null?void 0:t(n),[n,t]);const i=$.useCallback(s=>a(l=>typeof s=="boolean"?s:!l),[a,t]),o=$.useCallback(()=>i(!0),[i]),u=$.useCallback(()=>i(!1),[i]);return{visible:n,open:o,close:u,toggle:i}},sa=(e,r,t)=>{const n=$.useRef();return n.current==null?n.current={deps:t,value:e()}:r(n.current.deps,t)||(n.current={deps:t,value:e()}),n.current.value},my=([e],[r])=>ye.E.primitiveArrays(e,r)===0,bP=e=>{const r=$.useRef();return r.current==null?r.current=e:ye.m$1.equal(r.current,e)||(r.current=e),r.current},xP=(e,r)=>{$.useEffect(()=>{const t=e();return()=>{t.then(n=>n==null?void 0:n()).catch(n=>console.error(n))}},r)},hy=(e,r,t)=>{const n=sa(()=>t,r,t);$.useEffect(e,[n])},fo=e=>{const r=$.useRef(ye.executeInitialSetter(e)),t=$.useCallback(n=>{r.current=ye.executeSetter(n,r.current)},[]);return[r,t]},Gt=e=>{const r=$.useRef(e);return r.current=e,r},kl=(...e)=>$.useCallback(r=>e.forEach(t=>{t!=null&&(typeof t=="function"?t(r):t.current=r)},r),[]),Xi=e=>{const r=$.useRef(null),[t,n]=$.useState(()=>{const i=ye.executeInitialSetter(e);return r.current=i,i}),a=$.useCallback(i=>{n(o=>(r.current=ye.executeSetter(i,o),r.current))},[n]);return[t,a,r]},sf=e=>{const r=$.useRef(),t=r.current;return r.current=e,t},uf=({ref:e,onClickOutside:r,exclude:t})=>{const n=Gt(t),a=$.useCallback(i=>{const o=e.current,u=G.To.construct(window.document.documentElement),s=G.q.construct(i);o==null||o.contains(i.target)||G.To.contains(o,s)||!G.To.contains(u,s)||n.current!=null&&n.current.some(l=>{var c;return(c=l.current)==null?void 0:c.contains(i.target)})||r()},[r]);$.useEffect(()=>(document.addEventListener("mousedown",a),()=>document.removeEventListener("mousedown",a)),[a])},gy=(e,r,t)=>$.useCallback(ye.o$1(e,r),[r,...t]),Ul=(e,r={})=>{const{triggers:t=[],debounce:n=0,enabled:a=!0}=r,i=$.useRef(G.To.ZERO),o=$.useRef(null),u=$.useRef(null),s=sa(()=>t,my,[t]),l=$.useCallback(c=>{u.current!=null&&u.current.disconnect(),i.current==null&&(i.current=G.To.ZERO);const f=ye.o$1(()=>{const p=G.To.construct(c);wP(s,i.current,p)&&(i.current=p,e(p,o.current))},n);u.current=new ResizeObserver(f),u.current.observe(c)},[s,e,n]);return $.useEffect(()=>(o.current!=null&&a&&l(o.current),()=>{var c;return(c=u.current)==null?void 0:c.disconnect()}),[l,a]),$.useCallback(c=>{o.current=c,c!=null&&a&&l(c)},[l])},wP=(e,r,t)=>e.length===0?!G.To.equals(t,r):!!(e.includes("x")&&G.To.width(r)!==G.To.width(t)||e.includes("y")&&G.To.height(r)!==G.To.height(t)),yy=({transforms:e=[]})=>{const[r,t]=$.useState(e),n=$.useCallback((o,u,s=0)=>t(l=>{const c=l.filter(f=>f.key!==o);return c.push({key:o,transform:u,priority:s}),c.sort((f,p)=>p.priority-f.priority),c}),[t]),a=$.useCallback(o=>t(u=>u.filter(s=>s.key!==o)),[n]);return{transform:$.useCallback(o=>r.reduce((u,s)=>s.transform(u),{...o,transformed:!1}),[r]),setTransform:n,deleteTransform:a}},su=["MouseLeft","MouseMiddle","MouseRight"],EP=wt.z.enum(su),lf=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],by=new Set(lf),xy=[...su,...lf,"Backspace","Tab","Enter","Shift","Control","Alt","CapsLock","Escape","Space","PageUp","PageDown","End","Home","ArrowLeft","ArrowUp","ArrowRight","ArrowDown","Insert","Delete","ContextMenu","F1","F2","F3","F4","F5","F6","F7","F8","F9","F10","F11","F12","F13","F14","F15","F16","F17","F18","F19","F20","F21","F22","F23","F24","NumLock","ScrollLock","AudioVolumeMute","AudioVolumeDown","AudioVolumeUp","AudioTrackNext","AudioTrackPrevious","AudioStop","AudioPlay","AudioPause","AudioRewind","AudioForward","AudioRepeat","AudioRandomPlay","AudioSelect","LaunchMail","LaunchApp2","LaunchApp1","SelectTask","LaunchScreenSaver","BrowserSearch","BrowserHome","BrowserBack","BrowserForward","BrowserStop","BrowserRefresh","BrowserFavorites","ZoomToggle","Clear","Power","Eject"],wy=wt.z.enum(xy),SP=wt.z.array(wy),Ya=e=>e.type.includes("key")?Ey(e):Sy(e.button),AP=["Control","Alt","Shift"],Ey=e=>{if(["Digit","Key"].some(t=>e.code.startsWith(t)))return e.code.slice(-1);if(e.code.includes("Meta"))return"Control";const r=AP.find(t=>e.code.includes(t));return r??e.code},DP={0:"MouseLeft",1:"MouseMiddle",2:"MouseRight"},Sy=e=>DP[e]??"MouseLeft",Zn=(e,r,t=!1)=>gs(e,r,t).length>0,NP=(e,r)=>t=>{if(Zn(e,[[Ya(t)]]))return r(t)},gs=(e,r,t=!1)=>{const n=Dy(t);return e.filter(a=>r.some(i=>n(a,i)===ye.E.EQUAL))},cf=(e,r)=>e.filter(t=>!r.some(n=>ye.E.unorderedPrimitiveArrays(t,n)===ye.E.EQUAL)),Ay=(e,r)=>{const t=Dy(!1),n=e.filter(i=>!r.some(o=>t(i,o)===ye.E.EQUAL)),a=r.filter(i=>!e.some(o=>t(i,o)===ye.E.EQUAL));return[n,a]},Dy=e=>e?CP:ye.E.unorderedPrimitiveArrays,CP=(e,r)=>e.every(t=>r.includes(t))?ye.E.EQUAL:ye.E.LESS_THAN,MP=(e,r,t=!1)=>{const o=Object.entries(e).filter(([u])=>u!=="defaultMode").map(([u,s])=>s.map(l=>[u,l])).flat().sort(([,u],[,s])=>s.length-u.length).find(([,u])=>Zn([u],r,t));return o!=null?o[0]:e.defaultMode},Ny=([e],[r])=>{if(e==null&&r==null)return!0;if(e==null||r==null||e.defaultMode!==r.defaultMode)return!1;const t=Object.keys(e),n=Object.keys(r);return t.length!==n.length||e.defaultMode!==r.defaultMode?!1:t.every(a=>ye.E.unorderedPrimitiveArrays(e[a],r[a])===0)},Cy=e=>Object.entries(e).filter(([t])=>t!=="defaultMode").map(([,t])=>t).flat(),TP=e=>sa(()=>Cy(e),Ny,[e]),OP=e=>e.map(r=>r.filter(t=>!t.startsWith("Mouse"))).filter(r=>r.length>0),_P={listen:()=>()=>{}},My=$.createContext(_P),Ty=()=>$.useContext(My),$P={next:[],prev:[],last:new ye.m(0)},Oy=["CapsLock"],FP=(e,r)=>!!(Oy.includes(e)||r.target instanceof HTMLInputElement&&by.has(e)||r.target instanceof HTMLElement&&r.target.matches("[contenteditable]")),BP=({children:e,preventDefaultOn:r})=>{const t=$.useRef(G.q.ZERO),n=$.useCallback(f=>{t.current=G.q.construct(f)},[]),a=$.useRef(new Map),[,i]=fo({...$P}),o=$.useCallback((f,p)=>{const v=f.next.length>0?[f.next]:[],m=f.prev.length>0?[f.prev]:[],d={target:p,next:v,prev:m,cursor:t.current};a.current.forEach((y,h)=>h(d))},[]),u=$.useCallback(f=>{const p=Ya(f);["ArrowUp","ArrowDown"].includes(p)&&f.preventDefault(),!FP(p,f)&&i(v=>{const m=[...v.next,p];if(v.next.includes(p))return v;v.prev.includes(p)&&ye.m.since(v.last).valueOf()<ye.w.milliseconds(300).valueOf()&&m.push(p);const d={next:m,prev:v.next,last:new ye.m};return dd(m,r)&&f.preventDefault(),o(d,f.target),d})},[]),s=$.useCallback(f=>{const p=Ya(f);["ArrowUp","ArrowDown"].includes(p)&&f.preventDefault(),!Oy.includes(p)&&i(v=>{const m=v.next.filter(h=>h!==p&&!su.includes(h)),d=v.next,y={...v,next:m,prev:d};return dd(m,r)&&f.preventDefault(),o(y,f.target),y})},[]),l=$.useCallback(f=>{i(p=>{const v=p.next,m={...p,next:[],prev:v};return o(m,f.target),m})},[]);$.useEffect(()=>(window.addEventListener("keydown",u),window.addEventListener("keyup",s),window.addEventListener("mousemove",n),window.addEventListener("mousedown",u),window.addEventListener("mouseup",s),window.addEventListener("dragend",s),window.addEventListener("drop",s),window.addEventListener("blur",l),()=>{window.removeEventListener("keydown",u),window.removeEventListener("keyup",s),window.removeEventListener("mousemove",n),window.removeEventListener("mousedown",u),window.removeEventListener("mouseup",s),window.removeEventListener("dragend",s),window.removeEventListener("drop",s),window.removeEventListener("blur",l)}),[u,s,n]);const c=$.useCallback(f=>(a.current.set(f,null),()=>a.current.delete(f)),[]);return Oe.jsxRuntimeExports.jsx(My.Provider,{value:{listen:c},children:e})},dd=(e,r)=>r!=null&&Zn([e],r),di=({triggers:e,callback:r,region:t,loose:n})=>{const{listen:a}=Ty(),i=sa(()=>e,([o],[u])=>o==null&&u==null?!0:o==null||u==null?!1:ye.E.primitiveArrays(o.flat(),u.flat())===ye.E.EQUAL,[e]);$.useEffect(()=>{if(!(i==null||i.length===0))return a(o=>{const u=gs(i,o.prev,n),s=gs(i,o.next,n),l=Ay(s,u);let c=l[0];const f=l[1];if(c.length===0&&f.length===0)return;c=RP(o.target,o.cursor,c,t);const p={target:o.target,cursor:o.cursor};c.length>0&&(r==null||r({...p,stage:"start",triggers:c})),f.length>0&&(r==null||r({...p,stage:"end",triggers:f}))})},[r,i,a,n,t])},RP=(e,r,t,n)=>{if(n==null)return t;if(n.current==null)return[];const a=G.To.construct(n.current);return t.filter(i=>i.some(o=>o.includes("Mouse"))?G.To.contains(a,r)&&e===n.current:G.To.contains(a,r))},Hl=({triggers:e,loose:r})=>{const[t,n]=fo({triggers:[],held:!1});return di({triggers:e,callback:$.useCallback(a=>{n(i=>{let o=[];return a.stage==="start"?o=ye.n([...i.triggers,...a.triggers]):o=cf(i.triggers,a.triggers),{triggers:o,held:o.length>0}})},[]),loose:r}),t},PP=({triggers:e,loose:r})=>{const[t,n]=$.useState({triggers:[],held:!1});return di({triggers:e,callback:$.useCallback(a=>{n(i=>{let o=[];return a.stage==="start"?o=ye.n([...i.triggers,...a.triggers]):o=cf(i.triggers,a.triggers),{triggers:o,held:o.length>0}})},[]),loose:r}),t},zP=({level:e="p",color:r,className:t,style:n,children:a,noWrap:i=!1,shade:o,weight:u,...s},l)=>Oe.jsxRuntimeExports.jsx(kt.Element,{el:e,ref:l,style:{color:ff(r,o),fontWeight:u,...n},className:G.CSS(G.CSS.B("text"),G.CSS.BM("text",e),G.CSS.noWrap(i),t),...s,children:a}),hn=$.forwardRef(zP),ff=(e,r)=>{if(e!=null)return typeof e=="boolean"?void 0:G.cssString(e);if(r!=null)return`var(--pluto-gray-l${r})`},_y=({format:e="dateTime",suppliedTZ:r="UTC",displayTZ:t="local",children:n,...a},i)=>Oe.jsxRuntimeExports.jsx(hn,{ref:i,...a,children:new ye.m(n,r).fString(e,t)}),IP=$.forwardRef(_y),LP=["Escape","Enter"],qP=G.CSS.BM("text","editable"),kP=10,$y="renamed",Fy="escaped",By=(e,r)=>{let t=0;const n=()=>{t++;const a=document.getElementById(e);if(a==null||!a.classList.contains(qP)){if(t<kP)setTimeout(()=>n(),100);else throw new Error(`Could not find element with id ${e}`);return}a.setAttribute("contenteditable","true"),r!=null&&(a.addEventListener($y,i=>r(jl(i.target),!0)),a.addEventListener(Fy,i=>r(jl(i.target),!1)))};n()},UP=e=>new Promise(r=>{By(e,(n,a)=>r([n,a]))}),jl=e=>e.innerText.trim(),Ry=({onChange:e,value:r,useEditableState:t=$.useState,allowDoubleClick:n=!0,onDoubleClick:a,...i})=>{const[o,u]=t(!1),s=$.useRef(null),l=p=>{n&&u(!0),a==null||a(p)},c=(p,v=!1)=>{const m=jl(p);v||m.length===0?(p.innerText=r,p.dispatchEvent(new Event(Fy))):(e==null||e(m),p.dispatchEvent(new Event($y)))},f=p=>{if(!o||!LP.includes(p.key)||s.current==null)return;p.stopPropagation(),p.preventDefault();const v=s.current;s.current!=null&&(u(!1),c(v,p.key==="Escape"),v.blur())};return $.useLayoutEffect(()=>{if(s.current==null||!o)return;const{current:p}=s;p.focus();const v=document.createRange();v.selectNodeContents(p);const m=window.getSelection();m==null||m.removeAllRanges(),m==null||m.addRange(v)},[o]),s.current!==null&&!o&&(s.current.innerHTML=r),$.useEffect(()=>{new MutationObserver(v=>{v.forEach(m=>{if(m.attributeName!=="contenteditable")return;m.target.contentEditable==="true"&&u(!0)})}).observe(s.current,{attributes:!0})},[]),Oe.jsxRuntimeExports.jsx(hn,{ref:s,className:G.CSS.BM("text","editable"),onBlur:()=>{u(!1);const p=s.current;p!=null&&c(p)},onKeyDown:f,onKeyUp:p=>{p.stopPropagation(),p.preventDefault()},onDoubleClick:l,contentEditable:o,suppressContentEditableWarning:!0,...i,children:r})},HP=({onChange:e,disabled:r=!1,value:t,allowDoubleClick:n,...a})=>r||e==null||typeof e=="boolean"?Oe.jsxRuntimeExports.jsx(hn,{...a,children:t}):Oe.jsxRuntimeExports.jsx(Oe.jsxRuntimeExports.Fragment,{children:Oe.jsxRuntimeExports.jsx(Ry,{allowDoubleClick:n,onChange:e,value:t,...a})}),jP=({href:e,download:r,target:t,rel:n,...a},i)=>Oe.jsxRuntimeExports.jsx("a",{className:G.CSS.B("text-link"),ref:i,href:e,download:r,target:t,rel:n,children:Oe.jsxRuntimeExports.jsx(hn,{className:G.CSS.BE("text-link","text"),...a})}),VP=$.forwardRef(jP),Py=e=>e==null?!0:Array.isArray(e)||typeof e=="string"?e.length===0:!1,GP=[],WP=[],zy=({data:e=GP,value:r=WP,allowMultiple:t,allowNone:n,replaceOnSingle:a=!1,autoSelectOnNone:i=!1,onChange:o})=>{const u=$.useRef(null),s=Hl({triggers:[["Shift"]],loose:!0}),l=Hl({triggers:[["Control"]],loose:!0}),c=Gt(r),f=Gt(e),p=$.useCallback((d,y)=>{if(c.current=d,d.length===0&&n!==!1)return o(t!==!1?[]:null,y);if(t!==!1)return o(d,y);if(d.length>0)return o(d[0],y)},[o,n,t]);$.useEffect(()=>{let d=f.current;if(Array.isArray(d)||(d=d()),Py(r)&&n===!1&&d.length>0&&i){const y=d[0];u.current=y.key,p([y.key],{entries:[y],clicked:y.key,clickedIndex:0})}},[p,f,r,n]);const v=$.useCallback(d=>{const y=u.current;let h=f.current;Array.isArray(h)||(h=h());let E=[];const g=ye.A(c.current).filter(x=>x!=null);if(t===!1)E=g.includes(d)?[]:[d];else if(l.current.held&&a)g.includes(d)?E=g.filter(x=>x!==d):E=[...g,d];else if(s.current.held&&y!==null){const[x,b]=[h.findIndex(D=>D.key===d),h.findIndex(D=>D.key===y)].sort((D,S)=>D-S),A=h.slice(x,b+1).map(({key:D})=>D);A.slice(1,A.length-1).every(D=>g.includes(D))&&g.includes(d)?E=g.filter(D=>!A.includes(D)):E=[...g,...A],u.current=null}else u.current=d,a?E=g.includes(d)&&g.length===1?[]:[d]:g.includes(d)?E=g.filter(x=>x!==d):E=[...g,d];const w=ye.n(E);if(n===!1&&w.length===0)return p(g,{entries:h.filter(({key:x})=>g.includes(x)),clicked:d,clickedIndex:h.findIndex(({key:x})=>x===d)});w.length===0&&(u.current=null),p(w,{entries:h.filter(({key:x})=>E.includes(x)),clicked:d,clickedIndex:h.findIndex(({key:x})=>x===d)})},[c,f,p,t,n]),m=$.useCallback(()=>p([],{entries:[],clicked:null,clickedIndex:0}),[p]);return{onSelect:v,clear:m}},pf=e=>{const r=$.useContext(e);if(r===null)throw new Error("useRequiredContext: context value is null");return r},Iy=$.createContext({transformedData:[],sourceData:[],transformed:!1}),Ly=$.createContext({setSourceData:()=>{},getSourceData:()=>[],getTransformedData:()=>[],deleteTransform:()=>{},setTransform:()=>{},setEmptyContent:()=>{},getTransformed:()=>!1}),mi=()=>pf(Iy),po=()=>pf(Ly),ZP=()=>mi().transformedData,qy=()=>mi().sourceData,vf=()=>po().getTransformedData,YP=()=>po().setSourceData,XP=({data:e,emptyContent:r,children:t})=>{const{transform:n,setTransform:a,deleteTransform:i}=yy({}),[o,u,s]=Xi(()=>e??[]);$.useEffect(()=>{e!=null&&u(e)},[e]);const l=$.useMemo(()=>n({data:[...o],transformed:!1}),[o,n]),c=Gt(l),[f,p]=$.useState(void 0);$.useEffect(()=>{r!=null&&p(r)},[r]);const v=$.useMemo(()=>({setSourceData:u,getSourceData:()=>s.current,getTransformedData:()=>c.current.data,getTransformed:()=>c.current.transformed,deleteTransform:i,setTransform:a,setEmptyContent:p}),[u,s,c,i,a]),m=$.useMemo(()=>({transformed:l.transformed,transformedData:l.data,sourceData:o,emptyContent:f}),[l,o,f]);return Oe.jsxRuntimeExports.jsx(Ly.Provider,{value:v,children:Oe.jsxRuntimeExports.jsx(Iy.Provider,{value:m,children:t})})},md={visible:!1,position:G.q.ZERO,cursor:G.q.ZERO,keys:[]},df=G.CSS.BM("context","selected"),ys=G.CSS.BE("context","target"),ky=G.CSS.BE("menu-context","container"),KP=e=>{let r=e;for(;!r.classList.contains(ys);){if(r.classList.contains(ky)||r.parentElement==null)return e;r=r.parentElement}return r.classList.contains(ys)?r:e},JP=e=>{var n;const r=KP(e);if(r==null)return[];const t=Array.from(((n=r.parentElement)==null?void 0:n.querySelectorAll(`.${df}`))??[]);return t.includes(r)?t:[r]},QP=()=>{const e=$.useRef(null),[r,t]=$.useState(md),n=(o,u)=>{const s=G.q.construct(o);if(typeof o=="object"&&"preventDefault"in o){o.preventDefault(),o.stopPropagation();const l=JP(o.target);u=u??ye.n(l.map(c=>c.id).filter(c=>c.length>0))}else u=[];t({visible:!0,keys:u,position:s,cursor:s})},a=o=>{e.current=o,o!=null&&t(u=>{if(!u.visible)return u;const{adjustedDialog:s}=vc.dialog({container:G.To.construct(0,0,window.innerWidth,window.innerHeight),dialog:G.To.construct(o),target:G.To.construct(u.cursor,0,0),prefer:[{y:"bottom"}]}),l=G.To.topLeft(s);return G.q.equals(u.position,l)?u:{...u,position:l}})},i=()=>t(md);return uf({ref:e,onClickOutside:i}),{...r,close:i,open:n,ref:a}},ez=({children:e,menu:r,visible:t,open:n,close:a,position:i,keys:o,className:u,cursor:s,...l},c)=>{const f=t?r==null?void 0:r({keys:o}):null;return Oe.jsxRuntimeExports.jsxs("div",{className:G.CSS(ky,u,G.CSS.inheritDims()),onContextMenu:n,...l,children:[e,f!=null&&as.createPortal(Oe.jsxRuntimeExports.jsx("div",{className:G.CSS(G.CSS.B("menu-context"),G.CSS.bordered()),ref:c,style:{left:i.x,top:i.y},onClick:a,children:f}),document.body)]})},Uy=$.forwardRef(ez);Uy.displayName="ContextMenu";const Hy=({entry:e,selected:r,hovered:t,onSelect:n,className:a,draggingOver:i,rightAligned:o=!1,highlightHovered:u=!1,translate:s,style:l,sourceIndex:c,...f})=>Oe.jsxRuntimeExports.jsx(kt.Space,{id:e.key.toString(),direction:"x",onClick:()=>n==null?void 0:n(e.key),tabIndex:0,className:G.CSS(a,ys,r&&df,t&&G.CSS.M("hovered"),o&&G.CSS.M("right-aligned"),u&&G.CSS.M("highlight-hover"),G.CSS.BE("list","item"),G.CSS.selected(r)),style:{position:s!=null?"absolute":"relative",transform:`translateY(${s}px)`,...l},...f}),bt=[95,90,85,80,75,70,65,60,55,50,45,40,35,30,25,20,15,10,5],jy=e=>Object.entries({"theme-name":e.name,"theme-key":e.key,"primary-m1":e.colors.primary.m1.hex,"primary-z":e.colors.primary.z.hex,"primary-p1":e.colors.primary.p1.hex,...yr.createHexOpacityVariants("primary-z",e.colors.primary.z,bt),"secondary-m1":e.colors.secondary.m1.hex,"secondary-z":e.colors.secondary.z.hex,"secondary-p1":e.colors.secondary.p1.hex,...yr.createHexOpacityVariants("secondary-z",e.colors.secondary.z,bt),"gray-l0":e.colors.gray.l0.hex,"gray-l0-rgb":e.colors.gray.l0.rgbString,...yr.createHexOpacityVariants("gray-l0",e.colors.gray.l0,bt),"gray-l1":e.colors.gray.l1.hex,...yr.createHexOpacityVariants("gray-l1",e.colors.gray.l1,bt),"gray-l2":e.colors.gray.l2.hex,...yr.createHexOpacityVariants("gray-l2",e.colors.gray.l2,bt),"gray-l3":e.colors.gray.l3.hex,...yr.createHexOpacityVariants("gray-l3",e.colors.gray.l3,bt),"gray-l4":e.colors.gray.l4.hex,"gray-l5":e.colors.gray.l5.hex,...yr.createHexOpacityVariants("gray-l5",e.colors.gray.l5,bt),"gray-l6":e.colors.gray.l6.hex,...yr.createHexOpacityVariants("gray-l6",e.colors.gray.l6,bt),"gray-l7":e.colors.gray.l7.hex,...yr.createHexOpacityVariants("gray-l7",e.colors.gray.l7,bt),"gray-l8":e.colors.gray.l8.hex,"gray-l9":e.colors.gray.l9.hex,...yr.createHexOpacityVariants("gray-l9",e.colors.gray.l9,bt),"gray-l10":e.colors.gray.l10.hex,"logo-color":e.colors.logo,"error-m1":e.colors.error.m1.hex,"error-z":e.colors.error.z.hex,...yr.createHexOpacityVariants("error-z",e.colors.error.z,bt),"error-p1":e.colors.error.p1.hex,"warning-m1":e.colors.warning.m1.hex,"warning-z":e.colors.warning.z.hex,...yr.createHexOpacityVariants("warning-z",e.colors.warning.z,bt),"warning-p1":e.colors.warning.p1.hex,"success-m1":e.colors.secondary.m1.hex,"success-z":e.colors.secondary.z.hex,...yr.createHexOpacityVariants("success-z",e.colors.secondary.z,bt),"success-p1":e.colors.secondary.p1.hex,white:e.colors.white.hex,"white-rgb":e.colors.white.rgbString,black:e.colors.black.hex,"black-rgb":e.colors.black.rgbString,"text-color":e.colors.text.hex,"text-color-rgb":e.colors.text.rgbString,"text-on-primary":e.colors.textOnPrimary.hex,"border-color":e.colors.border.hex,"base-size":yr.unitProperty(e.sizes.base,"px"),"border-radius":yr.unitProperty(e.sizes.border.radius,"px"),"border-width":yr.unitProperty(e.sizes.border.width,"px"),"schematic-element-stroke-width":yr.unitProperty(e.sizes.schematic.elementStrokeWidth,"px"),"font-family":e.typography.family,"h1-size":yr.unitProperty(e.typography.h1.size,"rem"),"h1-weight":e.typography.h1.weight,"h1-line-height":yr.unitProperty(e.typography.h1.lineHeight,"rem"),"h2-size":yr.unitProperty(e.typography.h2.size,"rem"),"h2-weight":e.typography.h2.weight,"h2-line-height":yr.unitProperty(e.typography.h2.lineHeight,"rem"),"h3-size":yr.unitProperty(e.typography.h3.size,"rem"),"h3-weight":e.typography.h3.weight,"h3-line-height":yr.unitProperty(e.typography.h3.lineHeight,"rem"),"h4-size":yr.unitProperty(e.typography.h4.size,"rem"),"h4-weight":e.typography.h4.weight,"h4-line-height":yr.unitProperty(e.typography.h4.lineHeight,"rem"),"h5-size":yr.unitProperty(e.typography.h5.size,"rem"),"h5-weight":e.typography.h5.weight,"h5-line-height":yr.unitProperty(e.typography.h5.lineHeight,"rem"),"h5-text-transform":e.typography.h5.textTransform,"p-size":yr.unitProperty(e.typography.p.size,"rem"),"p-weight":e.typography.p.weight,"p-line-height":yr.unitProperty(e.typography.p.lineHeight,"rem"),"small-size":yr.unitProperty(e.typography.small.size,"rem"),"small-weight":e.typography.small.weight,"small-line-height":yr.unitProperty(e.typography.small.lineHeight,"rem")}).reduce((r,[t,n])=>({...r,[G.CSS.var(t)]:n}),{}),rz={},tz=Object.freeze(Object.defineProperty({__proto__:null,default:rz},Symbol.toStringTag,{value:"Module"})),nz=ye.customAlphabet("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz-",9),Vy=e=>{const r=$.useRef(null);return r.current===null&&(r.current=e??nz()),r.current},Gy=$.createContext({enabled:!1,route:null}),mf=$.memo(({children:e,url:r,enabled:t=!0})=>{const[n,a]=$.useState({route:null,enabled:!1});return hy(()=>{if(!t)return;const i=new Worker(r,{type:"module"});i.onmessageerror=u=>{console.error(u),console.error(u),console.error(JSON.stringify(u))},i.onerror=u=>{console.error(u),console.error(u.message),console.error(JSON.stringify(u))};const o=new ye.l((u,s=[])=>i.postMessage(u,s));return i.onmessage=u=>o.handle(u),a({route:u=>{if(n==null)throw new Error("Worker is not initialized");return o.route(u)},enabled:!0}),()=>i.terminate()},([i],[o])=>i.toString()===o.toString(),[r]),t&&n.route==null?null:Oe.jsxRuntimeExports.jsx(Gy.Provider,{value:n,children:e})});mf.displayName="worker.Provider";const Wy=e=>{const r=$.useContext(Gy);return r.enabled?sa(()=>r.route(e),([t],[n])=>t===n,[r.route]):null},az=Object.freeze(Object.defineProperty({__proto__:null,Provider:mf,use:Wy},Symbol.toStringTag,{value:"Module"})),iz={path:[],create:()=>({setState:()=>{},delete:()=>{}})},uu=$.createContext(iz),Zy=({workerKey:e,worker:r,children:t})=>{const n=Wy(e),a=$.useRef(new Map),[i,o]=$.useState(!1),u=$.useMemo(()=>r??n,[r,n]),s=$.useCallback((c,f,p)=>{const v=f.at(-1);if(v==null)throw new ye.D$1(`[Aether.Provider] - received zero length path when registering component of type ${c}`);return c.length===0&&console.warn(`[Aether.Provider] - received zero length type when registering component at ${f.join(".")} This is probably a bad idea.`),a.current.set(v,{path:f,handler:p}),{setState:(m,d=[])=>{u==null&&console.warn("aether - no worker"),u==null||u.send({variant:"update",path:f,state:m,type:c},d)},delete:()=>{u==null&&console.warn("aether - no worker"),u==null||u.send({variant:"delete",path:f,type:c})}}},[u,a]);$.useEffect(()=>{u==null||u.handle(c=>{const{key:f,state:p}=c,v=a.current.get(f);if(v==null)throw new ye.Ze(`[Aether.Provider] - received worker update message for unregistered component with key ${f}`);if(v.handler==null)throw new ye.Ze(`[Aether.Provider] - received worker update message for component with key ${f} that has no handler`);v.handler(p)}),o(!0)},[u]);const l=$.useMemo(()=>({create:s,path:["root"]}),[s]);return Oe.jsxRuntimeExports.jsx(uu.Provider,{value:l,children:i&&t})},hf=()=>$.useContext(uu),oz=({type:e,aetherKey:r,initialState:t,schema:n,initialTransfer:a=[],onReceive:i})=>{const o=$.useRef(),u=hf(),s=sa(()=>[...u.path,r],([f],[p])=>ye.E.primitiveArrays(f,p)===0,[u.path,r]),l=$.useCallback((f,p=[])=>{var v;return(v=o.current)==null?void 0:v.setState(ye.prettyParse(n,f),p)},[]);o.current==null&&(o.current=u.create(e,s,i),o.current.setState(t,a));const c=$.useRef(!0);return $.useEffect(()=>{if(c.current){c.current=!1;return}return o.current=u.create(e,s,i),l(t,a),()=>{var f;(f=o.current)==null||f.delete(),o.current=null}},[e,s,i,l]),$.useLayoutEffect(()=>()=>{var f;(f=o.current)==null||f.delete(),o.current=null},[]),$.useMemo(()=>({setState:l,path:s}),[l,r,s])},lu=e=>{const{type:r,schema:t,initialState:n}=e,[a,i]=$.useState(()=>ye.prettyParse(t,n)),o=$.useCallback(c=>i(ye.prettyParse(t,c)),[t]),{path:u,setState:s}=oz({...e,onReceive:o}),l=$.useCallback((c,f=[])=>{ye.isSetter(c)?i(p=>{const v=c(p);return s(v,f),v}):(i(c),s(c,f))},[u,r]);return[{path:u},a,l]},vo=$.memo(({children:e,path:r})=>{const t=hf(),n=$.useMemo(()=>({...t,path:r}),[t,r]);return Oe.jsxRuntimeExports.jsx(uu.Provider,{value:n,children:e})});vo.displayName="AetherComposite";const cu=(e,r)=>{r.displayName=`Aether.wrap(${e})`;const t=$.memo(({aetherKey:n,...a})=>{const i=Vy(n);return Oe.jsxRuntimeExports.jsx(r,{...a,aetherKey:i})});return t.displayName=e,t},sz=Object.freeze(Object.defineProperty({__proto__:null,Composite:vo,Context:uu,Provider:Zy,use:lu,useAetherContext:hf,wrap:cu},Symbol.toStringTag,{value:"Module"})),Yy="cursor-style",hd=(e,r=document.head)=>{Xy();const t=document.createElement("style");t.innerHTML=`*{cursor: ${e} !important;}`,t.id=Yy,r.appendChild(t)},Xy=()=>{const e=document.getElementById(Yy);e!=null&&e.remove()},uz={start:G.q.ZERO,mouseKey:"MouseLeft"},lz=({ref:e,onMove:r,onStart:t,onEnd:n})=>{const[a,i]=fo(uz);$.useEffect(()=>{if(e.current==null)return;const{current:o}=e,u=c=>{const f=G.q.construct(c),{mouseKey:p,start:v}=a.current;r==null||r(G.To.construct(v,f),p,c)},s=c=>{o.setPointerCapture(c.pointerId),o.onpointermove=u;const f=G.q.construct(c),p=Ya(c);i({start:f,mouseKey:p}),t==null||t(f,p,c),o.addEventListener("pointerup",l,{once:!0})};o.addEventListener("pointerdown",s);const l=c=>{o.onpointermove=null,o.releasePointerCapture(c.pointerId);const{start:f,mouseKey:p}=a.current;n==null||n(G.To.construct(f,G.q.construct(c)),p,c)};return()=>o.removeEventListener("pointerdown",s)},[r,t,n])},gd=(e,r,t,n,a)=>{const{x:i,y:o}=n??G.q.construct(G.To.dims(a));if(G.To.width(r)>i&&G.To.width(r)>G.To.height(r)){const u=G.To.signedWidth(r)<0?i:-i;e+=(G.To.signedWidth(r)+u)*t.x,hd("ew-resize")}if(G.To.height(r)>o&&G.To.height(r)>G.To.width(r)){const u=G.To.signedHeight(r)<0?o:-o;e+=(G.To.signedHeight(r)+u)*t.y,hd("ns-resize")}return e},fu=({direction:e,className:r,dragScale:t={x:10,y:1},dragThreshold:n=15,dragDirection:a,onChange:i,value:o,size:u,resetValue:s,onDragEnd:l,...c})=>{const f=$.useRef({dragging:!1,curr:o,prev:o}),p=$.useRef(null);f.current.dragging||(f.current.prev=o);const v=$.useMemo(()=>{const y=G.q.construct(t);return a==="x"?G.q.construct(y.x,0):a==="y"?G.q.construct(0,y.y):y},[t,a]),m=$.useMemo(()=>n!=null?G.q.construct(n):null,[n]);lz({ref:p,onMove:$.useCallback(y=>{if(p.current==null)return;let h=f.current.prev;f.current.dragging=!0,h=gd(h,y,v,m,G.To.construct(p.current)),f.current.curr=h,i(h)},[i,v,m]),onEnd:$.useCallback((y,h)=>{var g;if(p.current==null)return;let E=f.current.prev;E=gd(E,y,v,m,G.To.construct(p.current)),f.current.prev=E,f.current.dragging=!1,Xy(),l==null||l(E),(g=c.onBlur)==null||g.call(c)},[c.onBlur,l,v,m])});const d=$.useCallback(()=>{i(s??f.current.prev)},[i,s]);return Oe.jsxRuntimeExports.jsx(yp,{tabIndex:-1,ref:p,variant:"outlined",className:G.CSS(G.CSS.BE("input","drag-btn"),G.CSS.dir(e),r),onDoubleClick:d,onClick:y=>y.preventDefault(),...c,children:Oe.jsxRuntimeExports.jsx($t.Drag,{})})},hi=$.forwardRef(({size:e="medium",value:r,style:t,onChange:n,className:a,onFocus:i,selectOnFocus:o=!1,centerPlaceholder:u=!1,placeholder:s,variant:l="outlined",sharp:c=!1,children:f,level:p,onBlur:v,disabled:m,resetOnBlurIfEmpty:d=!1,status:y,...h},E)=>{const g=$.useRef(""),w=x=>{d&&x.target.value===""&&(n==null||n(g.current)),v==null||v(x)};return Oe.jsxRuntimeExports.jsxs(kt.Pack,{style:t,className:G.CSS(G.CSS.B("input"),m&&G.CSS.BM("input","disabled"),p==null&&G.CSS.size(e),G.CSS.BM("input",l),G.CSS.sharp(c),y!=null&&G.CSS.M(y),a),align:"center",size:e,children:[Oe.jsxRuntimeExports.jsxs("div",{className:G.CSS.BE("input","internal"),children:[(r==null||r.length===0)&&Oe.jsxRuntimeExports.jsx("div",{className:G.CSS(G.CSS.BE("input","placeholder"),u&&G.CSS.M("centered")),children:pp(p??ye.ComponentSizeLevels[e],s)}),Oe.jsxRuntimeExports.jsx("input",{ref:E,value:r,onChange:x=>{n==null||n(x.target.value)},role:"textbox",autoCapitalize:"off",autoComplete:"off",autoCorrect:"off",onFocus:x=>{i==null||i(x),g.current=x.target.value,o&&setTimeout(()=>x.target.select(),2)},onBlur:w,className:G.CSS(G.CSS.visible(!1),p!=null&&G.CSS.BM("text",p)),disabled:m,placeholder:typeof s=="string"?s:void 0,...h})]}),f]})});hi.displayName="Input";const cz={x:Number(ye.m.HOUR.valueOf()),y:Number(ye.m.days(.75).valueOf())},Ky=({value:e,onChange:r})=>{const t=new ye.m(e,"UTC");$.useLayoutEffect(()=>{const i=t.sub(ye.m.utcOffset);if(i.remainder(ye.m.DAY).isZero)return;const o=i.sub(i.remainder(ye.m.DAY));r(Number(new ye.m(o,"local").valueOf()))},[e]);const n=i=>{let o;if(typeof i=="number")o=new ye.m(i,"UTC");else{if(i.length===0)return;o=new ye.m(i,"local")}r(Number(o.valueOf()))};return{value:t.fString("ISODate","local"),onChange:n}},Jy=$.forwardRef(({onChange:e,value:r,className:t,showDragHandle:n=!0,children:a,...i},o)=>{const{value:u,onChange:s}=Ky({value:r,onChange:e});return Oe.jsxRuntimeExports.jsxs(hi,{ref:o,value:u,className:G.CSS(G.CSS.B("input-date"),t),onChange:s,type:"date",...i,children:[n&&Oe.jsxRuntimeExports.jsx(fu,{value:r,onChange:s,dragScale:cz}),a]})});Jy.displayName="InputDate";function kr(){return kr=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)({}).hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},kr.apply(null,arguments)}var Qy={epsilon:1e-12,matrix:"Matrix",number:"number",precision:64,predictable:!1,randomSeed:null};function Ke(e){return typeof e=="number"}function Je(e){return!e||typeof e!="object"||typeof e.constructor!="function"?!1:e.isBigNumber===!0&&typeof e.constructor.prototype=="object"&&e.constructor.prototype.isBigNumber===!0||typeof e.constructor.isDecimal=="function"&&e.constructor.isDecimal(e)===!0}function dn(e){return e&&typeof e=="object"&&Object.getPrototypeOf(e).isComplex===!0||!1}function mo(e){return e&&typeof e=="object"&&Object.getPrototypeOf(e).isFraction===!0||!1}function Tt(e){return e&&e.constructor.prototype.isUnit===!0||!1}function et(e){return typeof e=="string"}var mr=Array.isArray;function ke(e){return e&&e.constructor.prototype.isMatrix===!0||!1}function Bt(e){return Array.isArray(e)||ke(e)}function bs(e){return e&&e.isDenseMatrix&&e.constructor.prototype.isMatrix===!0||!1}function Wn(e){return e&&e.isSparseMatrix&&e.constructor.prototype.isMatrix===!0||!1}function gf(e){return e&&e.constructor.prototype.isRange===!0||!1}function pu(e){return e&&e.constructor.prototype.isIndex===!0||!1}function fz(e){return typeof e=="boolean"}function pz(e){return e&&e.constructor.prototype.isResultSet===!0||!1}function e2(e){return e&&e.constructor.prototype.isHelp===!0||!1}function vz(e){return typeof e=="function"}function dz(e){return e instanceof Date}function mz(e){return e instanceof RegExp}function vu(e){return!!(e&&typeof e=="object"&&e.constructor===Object&&!dn(e)&&!mo(e))}function hz(e){return e===null}function gz(e){return e===void 0}function Jn(e){return e&&e.isAccessorNode===!0&&e.constructor.prototype.isNode===!0||!1}function Mt(e){return e&&e.isArrayNode===!0&&e.constructor.prototype.isNode===!0||!1}function yz(e){return e&&e.isAssignmentNode===!0&&e.constructor.prototype.isNode===!0||!1}function bz(e){return e&&e.isBlockNode===!0&&e.constructor.prototype.isNode===!0||!1}function xz(e){return e&&e.isConditionalNode===!0&&e.constructor.prototype.isNode===!0||!1}function lr(e){return e&&e.isConstantNode===!0&&e.constructor.prototype.isNode===!0||!1}function Vl(e){return lr(e)||Lr(e)&&e.args.length===1&&lr(e.args[0])&&"-+~".includes(e.op)}function ho(e){return e&&e.isFunctionAssignmentNode===!0&&e.constructor.prototype.isNode===!0||!1}function Bn(e){return e&&e.isFunctionNode===!0&&e.constructor.prototype.isNode===!0||!1}function gi(e){return e&&e.isIndexNode===!0&&e.constructor.prototype.isNode===!0||!1}function wr(e){return e&&e.isNode===!0&&e.constructor.prototype.isNode===!0||!1}function du(e){return e&&e.isObjectNode===!0&&e.constructor.prototype.isNode===!0||!1}function Lr(e){return e&&e.isOperatorNode===!0&&e.constructor.prototype.isNode===!0||!1}function gn(e){return e&&e.isParenthesisNode===!0&&e.constructor.prototype.isNode===!0||!1}function wz(e){return e&&e.isRangeNode===!0&&e.constructor.prototype.isNode===!0||!1}function Ez(e){return e&&e.isRelationalNode===!0&&e.constructor.prototype.isNode===!0||!1}function Vr(e){return e&&e.isSymbolNode===!0&&e.constructor.prototype.isNode===!0||!1}function r2(e){return e&&e.constructor.prototype.isChain===!0||!1}function Dr(e){var r=typeof e;return r==="object"?e===null?"null":Je(e)?"BigNumber":e.constructor&&e.constructor.name?e.constructor.name:"Object":r}function Ge(e){var r=typeof e;if(r==="number"||r==="string"||r==="boolean"||e===null||e===void 0)return e;if(typeof e.clone=="function")return e.clone();if(Array.isArray(e))return e.map(function(t){return Ge(t)});if(e instanceof Date)return new Date(e.valueOf());if(Je(e))return e;if(vu(e))return Sz(e,Ge);throw new TypeError("Cannot clone: unknown type of value (value: ".concat(e,")"))}function Sz(e,r){var t={};for(var n in e)Re(e,n)&&(t[n]=r(e[n]));return t}function t2(e,r){for(var t in r)Re(r,t)&&(e[t]=r[t]);return e}function Qn(e,r){var t,n,a;if(Array.isArray(e)){if(!Array.isArray(r)||e.length!==r.length)return!1;for(n=0,a=e.length;n<a;n++)if(!Qn(e[n],r[n]))return!1;return!0}else{if(typeof e=="function")return e===r;if(e instanceof Object){if(Array.isArray(r)||!(r instanceof Object))return!1;for(t in e)if(!(t in r)||!Qn(e[t],r[t]))return!1;for(t in r)if(!(t in e))return!1;return!0}else return e===r}}function Az(e,r,t){var n=!0,a;Object.defineProperty(e,r,{get:function(){return n&&(a=t(),n=!1),a},set:function(o){a=o,n=!1},configurable:!0,enumerable:!0})}function Re(e,r){return e&&Object.hasOwnProperty.call(e,r)}function Dz(e,r){for(var t={},n=0;n<r.length;n++){var a=r[n],i=e[a];i!==void 0&&(t[a]=i)}return t}var Nz=["Matrix","Array"],Cz=["number","BigNumber","Fraction"],ge=function(r){if(r)throw new Error(`The global config is readonly.
|
|
71
|
+
Please create a mathjs instance if you want to change the default configuration.
|
|
72
|
+
Example:
|
|
73
|
+
|
|
74
|
+
import { create, all } from 'mathjs';
|
|
75
|
+
const mathjs = create(all);
|
|
76
|
+
mathjs.config({ number: 'BigNumber' });
|
|
77
|
+
`);return Object.freeze(Qy)};kr(ge,Qy,{MATRIX_OPTIONS:Nz,NUMBER_OPTIONS:Cz});function yd(){return!0}function Ct(){return!1}function wa(){}const bd="Argument is not a typed-function.";function n2(){function e(I){return typeof I=="object"&&I!==null&&I.constructor===Object}const r=[{name:"number",test:function(I){return typeof I=="number"}},{name:"string",test:function(I){return typeof I=="string"}},{name:"boolean",test:function(I){return typeof I=="boolean"}},{name:"Function",test:function(I){return typeof I=="function"}},{name:"Array",test:Array.isArray},{name:"Date",test:function(I){return I instanceof Date}},{name:"RegExp",test:function(I){return I instanceof RegExp}},{name:"Object",test:e},{name:"null",test:function(I){return I===null}},{name:"undefined",test:function(I){return I===void 0}}],t={name:"any",test:yd,isAny:!0};let n,a,i=0,o={createCount:0};function u(I){const H=n.get(I);if(H)return H;let ie='Unknown type "'+I+'"';const ce=I.toLowerCase();let ve;for(ve of a)if(ve.toLowerCase()===ce){ie+='. Did you mean "'+ve+'" ?';break}throw new TypeError(ie)}function s(I){let H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"any";const ie=H?u(H).index:a.length,ce=[];for(let de=0;de<I.length;++de){if(!I[de]||typeof I[de].name!="string"||typeof I[de].test!="function")throw new TypeError("Object with properties {name: string, test: function} expected");const Se=I[de].name;if(n.has(Se))throw new TypeError('Duplicate type name "'+Se+'"');ce.push(Se),n.set(Se,{name:Se,test:I[de].test,isAny:I[de].isAny,index:ie+de,conversionsTo:[]})}const ve=a.slice(ie);a=a.slice(0,ie).concat(ce).concat(ve);for(let de=ie+ce.length;de<a.length;++de)n.get(a[de]).index=de}function l(){n=new Map,a=[],i=0,s([t],!1)}l(),s(r);function c(){let I;for(I of a)n.get(I).conversionsTo=[];i=0}function f(I){const H=a.filter(ie=>{const ce=n.get(ie);return!ce.isAny&&ce.test(I)});return H.length?H:["any"]}function p(I){return I&&typeof I=="function"&&"_typedFunctionData"in I}function v(I,H,ie){if(!p(I))throw new TypeError(bd);const ce=ie&&ie.exact,ve=Array.isArray(H)?H.join(","):H,de=w(ve),Se=y(de);if(!ce||Se in I.signatures){const nr=I._typedFunctionData.signatureMap.get(Se);if(nr)return nr}const xe=de.length;let Me;if(ce){Me=[];let nr;for(nr in I.signatures)Me.push(I._typedFunctionData.signatureMap.get(nr))}else Me=I._typedFunctionData.signatures;for(let nr=0;nr<xe;++nr){const ir=de[nr],Ie=[];let Or;for(Or of Me){const T=D(Or.params,nr);if(!(!T||ir.restParam&&!T.restParam)){if(!T.hasAny){const X=g(T);if(ir.types.some(pe=>!X.has(pe.name)))continue}Ie.push(Or)}}if(Me=Ie,Me.length===0)break}let Ae;for(Ae of Me)if(Ae.params.length<=xe)return Ae;throw new TypeError("Signature not found (signature: "+(I.name||"unnamed")+"("+y(de,", ")+"))")}function m(I,H,ie){return v(I,H,ie).implementation}function d(I,H){const ie=u(H);if(ie.test(I))return I;const ce=ie.conversionsTo;if(ce.length===0)throw new Error("There are no conversions to "+H+" defined.");for(let ve=0;ve<ce.length;ve++)if(u(ce[ve].from).test(I))return ce[ve].convert(I);throw new Error("Cannot convert "+I+" to "+H)}function y(I){let H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:",";return I.map(ie=>ie.name).join(H)}function h(I){const H=I.indexOf("...")===0,ce=(H?I.length>3?I.slice(3):"any":I).split("|").map(xe=>u(xe.trim()));let ve=!1,de=H?"...":"";return{types:ce.map(function(xe){return ve=xe.isAny||ve,de+=xe.name+"|",{name:xe.name,typeIndex:xe.index,test:xe.test,isAny:xe.isAny,conversion:null,conversionIndex:-1}}),name:de.slice(0,-1),hasAny:ve,hasConversion:!1,restParam:H}}function E(I){const H=I.types.map(Se=>Se.name),ie=O(H);let ce=I.hasAny,ve=I.name;const de=ie.map(function(Se){const xe=u(Se.from);return ce=xe.isAny||ce,ve+="|"+Se.from,{name:Se.from,typeIndex:xe.index,test:xe.test,isAny:xe.isAny,conversion:Se,conversionIndex:Se.index}});return{types:I.types.concat(de),name:ve,hasAny:ce,hasConversion:de.length>0,restParam:I.restParam}}function g(I){return I.typeSet||(I.typeSet=new Set,I.types.forEach(H=>I.typeSet.add(H.name))),I.typeSet}function w(I){const H=[];if(typeof I!="string")throw new TypeError("Signatures must be strings");const ie=I.trim();if(ie==="")return H;const ce=ie.split(",");for(let ve=0;ve<ce.length;++ve){const de=h(ce[ve].trim());if(de.restParam&&ve!==ce.length-1)throw new SyntaxError('Unexpected rest parameter "'+ce[ve]+'": only allowed for the last parameter');if(de.types.length===0)return null;H.push(de)}return H}function x(I){const H=te(I);return H?H.restParam:!1}function b(I){if(!I||I.types.length===0)return yd;if(I.types.length===1)return u(I.types[0].name).test;if(I.types.length===2){const H=u(I.types[0].name).test,ie=u(I.types[1].name).test;return function(ve){return H(ve)||ie(ve)}}else{const H=I.types.map(function(ie){return u(ie.name).test});return function(ce){for(let ve=0;ve<H.length;ve++)if(H[ve](ce))return!0;return!1}}}function A(I){let H,ie,ce;if(x(I)){H=se(I).map(b);const ve=H.length,de=b(te(I)),Se=function(xe){for(let Me=ve;Me<xe.length;Me++)if(!de(xe[Me]))return!1;return!0};return function(Me){for(let Ae=0;Ae<H.length;Ae++)if(!H[Ae](Me[Ae]))return!1;return Se(Me)&&Me.length>=ve+1}}else return I.length===0?function(de){return de.length===0}:I.length===1?(ie=b(I[0]),function(de){return ie(de[0])&&de.length===1}):I.length===2?(ie=b(I[0]),ce=b(I[1]),function(de){return ie(de[0])&&ce(de[1])&&de.length===2}):(H=I.map(b),function(de){for(let Se=0;Se<H.length;Se++)if(!H[Se](de[Se]))return!1;return de.length===H.length})}function D(I,H){return H<I.length?I[H]:x(I)?te(I):null}function S(I,H){const ie=D(I,H);return ie?g(ie):new Set}function N(I){return I.conversion===null||I.conversion===void 0}function C(I,H){const ie=new Set;return I.forEach(ce=>{const ve=S(ce.params,H);let de;for(de of ve)ie.add(de)}),ie.has("any")?["any"]:Array.from(ie)}function M(I,H,ie){let ce,ve;const de=I||"unnamed";let Se=ie,xe;for(xe=0;xe<H.length;xe++){const ir=[];if(Se.forEach(Ie=>{const Or=D(Ie.params,xe),T=b(Or);(xe<Ie.params.length||x(Ie.params))&&T(H[xe])&&ir.push(Ie)}),ir.length===0){if(ve=C(Se,xe),ve.length>0){const Ie=f(H[xe]);return ce=new TypeError("Unexpected type of argument in function "+de+" (expected: "+ve.join(" or ")+", actual: "+Ie.join(" | ")+", index: "+xe+")"),ce.data={category:"wrongType",fn:de,index:xe,actual:Ie,expected:ve},ce}}else Se=ir}const Me=Se.map(function(ir){return x(ir.params)?1/0:ir.params.length});if(H.length<Math.min.apply(null,Me))return ve=C(Se,xe),ce=new TypeError("Too few arguments in function "+de+" (expected: "+ve.join(" or ")+", index: "+H.length+")"),ce.data={category:"tooFewArgs",fn:de,index:H.length,expected:ve},ce;const Ae=Math.max.apply(null,Me);if(H.length>Ae)return ce=new TypeError("Too many arguments in function "+de+" (expected: "+Ae+", actual: "+H.length+")"),ce.data={category:"tooManyArgs",fn:de,index:H.length,expectedLength:Ae},ce;const nr=[];for(let ir=0;ir<H.length;++ir)nr.push(f(H[ir]).join("|"));return ce=new TypeError('Arguments of type "'+nr.join(", ")+'" do not match any of the defined signatures of function '+de+"."),ce.data={category:"mismatch",actual:nr},ce}function B(I){let H=a.length+1;for(let ie=0;ie<I.types.length;ie++)N(I.types[ie])&&(H=Math.min(H,I.types[ie].typeIndex));return H}function P(I){let H=i+1;for(let ie=0;ie<I.types.length;ie++)N(I.types[ie])||(H=Math.min(H,I.types[ie].conversionIndex));return H}function R(I,H){if(I.hasAny){if(!H.hasAny)return 1}else if(H.hasAny)return-1;if(I.restParam){if(!H.restParam)return 1}else if(H.restParam)return-1;if(I.hasConversion){if(!H.hasConversion)return 1}else if(H.hasConversion)return-1;const ie=B(I)-B(H);if(ie<0)return-1;if(ie>0)return 1;const ce=P(I)-P(H);return ce<0?-1:ce>0?1:0}function _(I,H){const ie=I.params,ce=H.params,ve=te(ie),de=te(ce),Se=x(ie),xe=x(ce);if(Se&&ve.hasAny){if(!xe||!de.hasAny)return 1}else if(xe&&de.hasAny)return-1;let Me=0,Ae=0,nr;for(nr of ie)nr.hasAny&&++Me,nr.hasConversion&&++Ae;let ir=0,Ie=0;for(nr of ce)nr.hasAny&&++ir,nr.hasConversion&&++Ie;if(Me!==ir)return Me-ir;if(Se&&ve.hasConversion){if(!xe||!de.hasConversion)return 1}else if(xe&&de.hasConversion)return-1;if(Ae!==Ie)return Ae-Ie;if(Se){if(!xe)return 1}else if(xe)return-1;const Or=(ie.length-ce.length)*(Se?-1:1);if(Or!==0)return Or;const T=[];let X=0;for(let De=0;De<ie.length;++De){const Le=R(ie[De],ce[De]);T.push(Le),X+=Le}if(X!==0)return X;let pe;for(pe of T)if(pe!==0)return pe;return 0}function O(I){if(I.length===0)return[];const H=I.map(u);I.length>1&&H.sort((ve,de)=>ve.index-de.index);let ie=H[0].conversionsTo;if(I.length===1)return ie;ie=ie.concat([]);const ce=new Set(I);for(let ve=1;ve<H.length;++ve){let de;for(de of H[ve].conversionsTo)ce.has(de.from)||(ie.push(de),ce.add(de.from))}return ie}function U(I,H){let ie=H;if(I.some(ve=>ve.hasConversion)){const ve=x(I),de=I.map(F);ie=function(){const xe=[],Me=ve?arguments.length-1:arguments.length;for(let Ae=0;Ae<Me;Ae++)xe[Ae]=de[Ae](arguments[Ae]);return ve&&(xe[Me]=arguments[Me].map(de[Me])),H.apply(this,xe)}}let ce=ie;if(x(I)){const ve=I.length-1;ce=function(){return ie.apply(this,ae(arguments,0,ve).concat([ae(arguments,ve)]))}}return ce}function F(I){let H,ie,ce,ve;const de=[],Se=[];switch(I.types.forEach(function(xe){xe.conversion&&(de.push(u(xe.conversion.from).test),Se.push(xe.conversion.convert))}),Se.length){case 0:return function(Me){return Me};case 1:return H=de[0],ce=Se[0],function(Me){return H(Me)?ce(Me):Me};case 2:return H=de[0],ie=de[1],ce=Se[0],ve=Se[1],function(Me){return H(Me)?ce(Me):ie(Me)?ve(Me):Me};default:return function(Me){for(let Ae=0;Ae<Se.length;Ae++)if(de[Ae](Me))return Se[Ae](Me);return Me}}}function q(I){function H(ie,ce,ve){if(ce<ie.length){const de=ie[ce];let Se=[];if(de.restParam){const xe=de.types.filter(N);xe.length<de.types.length&&Se.push({types:xe,name:"..."+xe.map(Me=>Me.name).join("|"),hasAny:xe.some(Me=>Me.isAny),hasConversion:!1,restParam:!0}),Se.push(de)}else Se=de.types.map(function(xe){return{types:[xe],name:xe.name,hasAny:xe.isAny,hasConversion:xe.conversion,restParam:!1}});return ne(Se,function(xe){return H(ie,ce+1,ve.concat([xe]))})}else return[ve]}return H(I,0,[])}function Y(I,H){const ie=Math.max(I.length,H.length);for(let xe=0;xe<ie;xe++){const Me=S(I,xe),Ae=S(H,xe);let nr=!1,ir;for(ir of Ae)if(Me.has(ir)){nr=!0;break}if(!nr)return!1}const ce=I.length,ve=H.length,de=x(I),Se=x(H);return de?Se?ce===ve:ve>=ce:Se?ce>=ve:ce===ve}function V(I){return I.map(H=>ue(H)?k(H.referToSelf.callback):W(H)?$e(H.referTo.references,H.referTo.callback):H)}function z(I,H,ie){const ce=[];let ve;for(ve of I){let de=ie[ve];if(typeof de!="number")throw new TypeError('No definition for referenced signature "'+ve+'"');if(de=H[de],typeof de!="function")return!1;ce.push(de)}return ce}function J(I,H,ie){const ce=V(I),ve=new Array(ce.length).fill(!1);let de=!0;for(;de;){de=!1;let Se=!0;for(let xe=0;xe<ce.length;++xe){if(ve[xe])continue;const Me=ce[xe];if(ue(Me))ce[xe]=Me.referToSelf.callback(ie),ce[xe].referToSelf=Me.referToSelf,ve[xe]=!0,Se=!1;else if(W(Me)){const Ae=z(Me.referTo.references,ce,H);Ae?(ce[xe]=Me.referTo.callback.apply(this,Ae),ce[xe].referTo=Me.referTo,ve[xe]=!0,Se=!1):de=!0}}if(Se&&de)throw new SyntaxError("Circular reference detected in resolving typed.referTo")}return ce}function le(I){const H=/\bthis(\(|\.signatures\b)/;Object.keys(I).forEach(ie=>{const ce=I[ie];if(H.test(ce.toString()))throw new SyntaxError("Using `this` to self-reference a function is deprecated since typed-function@3. Use typed.referTo and typed.referToSelf instead.")})}function Q(I,H){if(o.createCount++,Object.keys(H).length===0)throw new SyntaxError("No signatures provided");o.warnAgainstDeprecatedThis&&le(H);const ie=[],ce=[],ve={},de=[];let Se;for(Se in H){if(!Object.prototype.hasOwnProperty.call(H,Se))continue;const or=w(Se);if(!or)continue;ie.forEach(function(Fi){if(Y(Fi,or))throw new TypeError('Conflicting signatures "'+y(Fi)+'" and "'+y(or)+'".')}),ie.push(or);const dt=ce.length;ce.push(H[Se]);const Yw=or.map(E);let Oo;for(Oo of q(Yw)){const Fi=y(Oo);de.push({params:Oo,name:Fi,fn:dt}),Oo.every(Xw=>!Xw.hasConversion)&&(ve[Fi]=dt)}}de.sort(_);const xe=J(ce,ve,Nn);let Me;for(Me in ve)Object.prototype.hasOwnProperty.call(ve,Me)&&(ve[Me]=xe[ve[Me]]);const Ae=[],nr=new Map;for(Me of de)nr.has(Me.name)||(Me.fn=xe[Me.fn],Ae.push(Me),nr.set(Me.name,Me));const ir=Ae[0]&&Ae[0].params.length<=2&&!x(Ae[0].params),Ie=Ae[1]&&Ae[1].params.length<=2&&!x(Ae[1].params),Or=Ae[2]&&Ae[2].params.length<=2&&!x(Ae[2].params),T=Ae[3]&&Ae[3].params.length<=2&&!x(Ae[3].params),X=Ae[4]&&Ae[4].params.length<=2&&!x(Ae[4].params),pe=Ae[5]&&Ae[5].params.length<=2&&!x(Ae[5].params),De=ir&&Ie&&Or&&T&&X&&pe;for(let or=0;or<Ae.length;++or)Ae[or].test=A(Ae[or].params);const Le=ir?b(Ae[0].params[0]):Ct,Ve=Ie?b(Ae[1].params[0]):Ct,Wr=Or?b(Ae[2].params[0]):Ct,xa=T?b(Ae[3].params[0]):Ct,qu=X?b(Ae[4].params[0]):Ct,No=pe?b(Ae[5].params[0]):Ct,ku=ir?b(Ae[0].params[1]):Ct,Co=Ie?b(Ae[1].params[1]):Ct,Mo=Or?b(Ae[2].params[1]):Ct,Uu=T?b(Ae[3].params[1]):Ct,Hu=X?b(Ae[4].params[1]):Ct,To=pe?b(Ae[5].params[1]):Ct;for(let or=0;or<Ae.length;++or)Ae[or].implementation=U(Ae[or].params,Ae[or].fn);const ju=ir?Ae[0].implementation:wa,Vu=Ie?Ae[1].implementation:wa,Gu=Or?Ae[2].implementation:wa,Wu=T?Ae[3].implementation:wa,ee=X?Ae[4].implementation:wa,Te=pe?Ae[5].implementation:wa,Be=ir?Ae[0].params.length:-1,je=Ie?Ae[1].params.length:-1,hr=Or?Ae[2].params.length:-1,Er=T?Ae[3].params.length:-1,fr=X?Ae[4].params.length:-1,ur=pe?Ae[5].params.length:-1,Zr=De?6:0,Rr=Ae.length,Pr=Ae.map(or=>or.test),vt=Ae.map(or=>or.implementation),Dn=function(){for(let dt=Zr;dt<Rr;dt++)if(Pr[dt](arguments))return vt[dt].apply(this,arguments);return o.onMismatch(I,arguments,Ae)};function Nn(or,dt){return arguments.length===Be&&Le(or)&&ku(dt)?ju.apply(this,arguments):arguments.length===je&&Ve(or)&&Co(dt)?Vu.apply(this,arguments):arguments.length===hr&&Wr(or)&&Mo(dt)?Gu.apply(this,arguments):arguments.length===Er&&xa(or)&&Uu(dt)?Wu.apply(this,arguments):arguments.length===fr&&qu(or)&&Hu(dt)?ee.apply(this,arguments):arguments.length===ur&&No(or)&&To(dt)?Te.apply(this,arguments):Dn.apply(this,arguments)}try{Object.defineProperty(Nn,"name",{value:I})}catch{}return Nn.signatures=ve,Nn._typedFunctionData={signatures:Ae,signatureMap:nr},Nn}function re(I,H,ie){throw M(I,H,ie)}function se(I){return ae(I,0,I.length-1)}function te(I){return I[I.length-1]}function ae(I,H,ie){return Array.prototype.slice.call(I,H,ie)}function fe(I,H){for(let ie=0;ie<I.length;ie++)if(H(I[ie]))return I[ie]}function ne(I,H){return Array.prototype.concat.apply([],I.map(H))}function be(){const I=se(arguments).map(ie=>y(w(ie))),H=te(arguments);if(typeof H!="function")throw new TypeError("Callback function expected as last argument");return $e(I,H)}function $e(I,H){return{referTo:{references:I,callback:H}}}function k(I){if(typeof I!="function")throw new TypeError("Callback function expected as first argument");return{referToSelf:{callback:I}}}function W(I){return I&&typeof I.referTo=="object"&&Array.isArray(I.referTo.references)&&typeof I.referTo.callback=="function"}function ue(I){return I&&typeof I.referToSelf=="object"&&typeof I.referToSelf.callback=="function"}function j(I,H){if(!I)return H;if(H&&H!==I){const ie=new Error("Function names do not match (expected: "+I+", actual: "+H+")");throw ie.data={actual:H,expected:I},ie}return I}function K(I){let H;for(const ie in I)Object.prototype.hasOwnProperty.call(I,ie)&&(p(I[ie])||typeof I[ie].signature=="string")&&(H=j(H,I[ie].name));return H}function oe(I,H){let ie;for(ie in H)if(Object.prototype.hasOwnProperty.call(H,ie)){if(ie in I&&H[ie]!==I[ie]){const ce=new Error('Signature "'+ie+'" is defined twice');throw ce.data={signature:ie,sourceFunction:H[ie],destFunction:I[ie]},ce}I[ie]=H[ie]}}const he=o;o=function(I){const H=typeof I=="string",ie=H?1:0;let ce=H?I:"";const ve={};for(let de=ie;de<arguments.length;++de){const Se=arguments[de];let xe={},Me;if(typeof Se=="function"?(Me=Se.name,typeof Se.signature=="string"?xe[Se.signature]=Se:p(Se)&&(xe=Se.signatures)):e(Se)&&(xe=Se,H||(Me=K(Se))),Object.keys(xe).length===0){const Ae=new TypeError("Argument to 'typed' at index "+de+" is not a (typed) function, nor an object with signatures as keys and functions as values.");throw Ae.data={index:de,argument:Se},Ae}H||(ce=j(ce,Me)),oe(ve,xe)}return Q(ce||"",ve)},o.create=n2,o.createCount=he.createCount,o.onMismatch=re,o.throwMismatchError=re,o.createError=M,o.clear=l,o.clearConversions=c,o.addTypes=s,o._findType=u,o.referTo=be,o.referToSelf=k,o.convert=d,o.findSignature=v,o.find=m,o.isTypedFunction=p,o.warnAgainstDeprecatedThis=!0,o.addType=function(I,H){let ie="any";H!==!1&&n.has("Object")&&(ie="Object"),o.addTypes([I],ie)};function me(I){if(!I||typeof I.from!="string"||typeof I.to!="string"||typeof I.convert!="function")throw new TypeError("Object with properties {from: string, to: string, convert: function} expected");if(I.to===I.from)throw new SyntaxError('Illegal to define conversion from "'+I.from+'" to itself.')}return o.addConversion=function(I){let H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{override:!1};me(I);const ie=u(I.to),ce=ie.conversionsTo.find(ve=>ve.from===I.from);if(ce)if(H&&H.override)o.removeConversion({from:ce.from,to:I.to,convert:ce.convert});else throw new Error('There is already a conversion from "'+I.from+'" to "'+ie.name+'"');ie.conversionsTo.push({from:I.from,convert:I.convert,index:i++})},o.addConversions=function(I,H){I.forEach(ie=>o.addConversion(ie,H))},o.removeConversion=function(I){me(I);const H=u(I.to),ie=fe(H.conversionsTo,ve=>ve.from===I.from);if(!ie)throw new Error("Attempt to remove nonexistent conversion from "+I.from+" to "+I.to);if(ie.convert!==I.convert)throw new Error("Conversion to remove does not match existing conversion");const ce=H.conversionsTo.indexOf(ie);H.conversionsTo.splice(ce,1)},o.resolve=function(I,H){if(!p(I))throw new TypeError(bd);const ie=I._typedFunctionData.signatures;for(let ce=0;ce<ie.length;++ce)if(ie[ce].test(H))return ie[ce];return null},o}const Ha=n2();function Pe(e){return typeof e=="boolean"?!0:isFinite(e)?e===Math.round(e):!1}var On=Math.sign||function(e){return e>0?1:e<0?-1:0},Mz=Math.log2||function(r){return Math.log(r)/Math.LN2},Tz=Math.log10||function(r){return Math.log(r)/Math.LN10},Oz=Math.log1p||function(e){return Math.log(e+1)},_z=Math.cbrt||function(r){if(r===0)return r;var t=r<0,n;return t&&(r=-r),isFinite(r)?(n=Math.exp(Math.log(r)/3),n=(r/(n*n)+2*n)/3):n=r,t?-n:n},$z=Math.expm1||function(r){return r>=2e-4||r<=-2e-4?Math.exp(r)-1:r+r*r/2+r*r*r/6};function fl(e,r,t){var n={2:"0b",8:"0o",16:"0x"},a=n[r],i="";if(t){if(t<1)throw new Error("size must be in greater than 0");if(!Pe(t))throw new Error("size must be an integer");if(e>2**(t-1)-1||e<-(2**(t-1)))throw new Error("Value must be in range [-2^".concat(t-1,", 2^").concat(t-1,"-1]"));if(!Pe(e))throw new Error("Value must be an integer");e<0&&(e=e+2**t),i="i".concat(t)}var o="";return e<0&&(e=-e,o="-"),"".concat(o).concat(a).concat(e.toString(r)).concat(i)}function Yn(e,r){if(typeof r=="function")return r(e);if(e===1/0)return"Infinity";if(e===-1/0)return"-Infinity";if(isNaN(e))return"NaN";var{notation:t,precision:n,wordSize:a}=a2(r);switch(t){case"fixed":return i2(e,n);case"exponential":return o2(e,n);case"engineering":return Fz(e,n);case"bin":return fl(e,2,a);case"oct":return fl(e,8,a);case"hex":return fl(e,16,a);case"auto":return Bz(e,n,r).replace(/((\.\d*?)(0+))($|e)/,function(){var i=arguments[2],o=arguments[4];return i!=="."?i+o:o});default:throw new Error('Unknown notation "'+t+'". Choose "auto", "exponential", "fixed", "bin", "oct", or "hex.')}}function a2(e){var r="auto",t,n;if(e!==void 0)if(Ke(e))t=e;else if(Je(e))t=e.toNumber();else if(vu(e))e.precision!==void 0&&(t=xd(e.precision,()=>{throw new Error('Option "precision" must be a number or BigNumber')})),e.wordSize!==void 0&&(n=xd(e.wordSize,()=>{throw new Error('Option "wordSize" must be a number or BigNumber')})),e.notation&&(r=e.notation);else throw new Error("Unsupported type of options, number, BigNumber, or object expected");return{notation:r,precision:t,wordSize:n}}function go(e){var r=String(e).toLowerCase().match(/^(-?)(\d+\.?\d*)(e([+-]?\d+))?$/);if(!r)throw new SyntaxError("Invalid number "+e);var t=r[1],n=r[2],a=parseFloat(r[4]||"0"),i=n.indexOf(".");a+=i!==-1?i-1:n.length-1;var o=n.replace(".","").replace(/^0*/,function(u){return a-=u.length,""}).replace(/0*$/,"").split("").map(function(u){return parseInt(u)});return o.length===0&&(o.push(0),a++),{sign:t,coefficients:o,exponent:a}}function Fz(e,r){if(isNaN(e)||!isFinite(e))return String(e);var t=go(e),n=mu(t,r),a=n.exponent,i=n.coefficients,o=a%3===0?a:a<0?a-3-a%3:a-a%3;if(Ke(r))for(;r>i.length||a-o+1>i.length;)i.push(0);else for(var u=Math.abs(a-o)-(i.length-1),s=0;s<u;s++)i.push(0);for(var l=Math.abs(a-o),c=1;l>0;)c++,l--;var f=i.slice(c).join(""),p=Ke(r)&&f.length||f.match(/[1-9]/)?"."+f:"",v=i.slice(0,c).join("")+p+"e"+(a>=0?"+":"")+o.toString();return n.sign+v}function i2(e,r){if(isNaN(e)||!isFinite(e))return String(e);var t=go(e),n=typeof r=="number"?mu(t,t.exponent+1+r):t,a=n.coefficients,i=n.exponent+1,o=i+(r||0);return a.length<o&&(a=a.concat(Ga(o-a.length))),i<0&&(a=Ga(-i+1).concat(a),i=1),i<a.length&&a.splice(i,0,i===0?"0.":"."),n.sign+a.join("")}function o2(e,r){if(isNaN(e)||!isFinite(e))return String(e);var t=go(e),n=r?mu(t,r):t,a=n.coefficients,i=n.exponent;a.length<r&&(a=a.concat(Ga(r-a.length)));var o=a.shift();return n.sign+o+(a.length>0?"."+a.join(""):"")+"e"+(i>=0?"+":"")+i}function Bz(e,r,t){if(isNaN(e)||!isFinite(e))return String(e);var n=wd(t==null?void 0:t.lowerExp,-3),a=wd(t==null?void 0:t.upperExp,5),i=go(e),o=r?mu(i,r):i;if(o.exponent<n||o.exponent>=a)return o2(e,r);var u=o.coefficients,s=o.exponent;u.length<r&&(u=u.concat(Ga(r-u.length))),u=u.concat(Ga(s-u.length+1+(u.length<r?r-u.length:0))),u=Ga(-s).concat(u);var l=s>0?s:0;return l<u.length-1&&u.splice(l+1,0,"."),o.sign+u.join("")}function mu(e,r){for(var t={sign:e.sign,coefficients:e.coefficients,exponent:e.exponent},n=t.coefficients;r<=0;)n.unshift(0),t.exponent++,r++;if(n.length>r){var a=n.splice(r,n.length-r);if(a[0]>=5){var i=r-1;for(n[i]++;n[i]===10;)n.pop(),i===0&&(n.unshift(0),t.exponent++,i++),i--,n[i]++}}return t}function Ga(e){for(var r=[],t=0;t<e;t++)r.push(0);return r}function Rz(e){return e.toExponential().replace(/e.*$/,"").replace(/^0\.?0*|\./,"").length}var Pz=Number.EPSILON||2220446049250313e-31;function ut(e,r,t){if(t==null)return e===r;if(e===r)return!0;if(isNaN(e)||isNaN(r))return!1;if(isFinite(e)&&isFinite(r)){var n=Math.abs(e-r);return n<=Pz?!0:n<=Math.max(Math.abs(e),Math.abs(r))*t}return!1}var zz=Math.acosh||function(e){return Math.log(Math.sqrt(e*e-1)+e)},Iz=Math.asinh||function(e){return Math.log(Math.sqrt(e*e+1)+e)},Lz=Math.atanh||function(e){return Math.log((1+e)/(1-e))/2},qz=Math.cosh||function(e){return(Math.exp(e)+Math.exp(-e))/2},kz=Math.sinh||function(e){return(Math.exp(e)-Math.exp(-e))/2},Uz=Math.tanh||function(e){var r=Math.exp(2*e);return(r-1)/(r+1)};function Hz(e,r){var t=!0,n=r>0?!0:r<0?!1:1/r===1/0;return t^n?-e:e}function xd(e,r){if(Ke(e))return e;if(Je(e))return e.toNumber();r()}function wd(e,r){return Ke(e)?e:Je(e)?e.toNumber():r}function pl(e,r,t){var n=e.constructor,a=new n(2),i="";if(t){if(t<1)throw new Error("size must be in greater than 0");if(!Pe(t))throw new Error("size must be an integer");if(e.greaterThan(a.pow(t-1).sub(1))||e.lessThan(a.pow(t-1).mul(-1)))throw new Error("Value must be in range [-2^".concat(t-1,", 2^").concat(t-1,"-1]"));if(!e.isInteger())throw new Error("Value must be an integer");e.lessThan(0)&&(e=e.add(a.pow(t))),i="i".concat(t)}switch(r){case 2:return"".concat(e.toBinary()).concat(i);case 8:return"".concat(e.toOctal()).concat(i);case 16:return"".concat(e.toHexadecimal()).concat(i);default:throw new Error("Base ".concat(r," not supported "))}}function jz(e,r){if(typeof r=="function")return r(e);if(!e.isFinite())return e.isNaN()?"NaN":e.gt(0)?"Infinity":"-Infinity";var{notation:t,precision:n,wordSize:a}=a2(r);switch(t){case"fixed":return Gz(e,n);case"exponential":return Ed(e,n);case"engineering":return Vz(e,n);case"bin":return pl(e,2,a);case"oct":return pl(e,8,a);case"hex":return pl(e,16,a);case"auto":{var i=Sd(r==null?void 0:r.lowerExp,-3),o=Sd(r==null?void 0:r.upperExp,5);if(e.isZero())return"0";var u,s=e.toSignificantDigits(n),l=s.e;return l>=i&&l<o?u=s.toFixed():u=Ed(e,n),u.replace(/((\.\d*?)(0+))($|e)/,function(){var c=arguments[2],f=arguments[4];return c!=="."?c+f:f})}default:throw new Error('Unknown notation "'+t+'". Choose "auto", "exponential", "fixed", "bin", "oct", or "hex.')}}function Vz(e,r){var t=e.e,n=t%3===0?t:t<0?t-3-t%3:t-t%3,a=e.mul(Math.pow(10,-n)),i=a.toPrecision(r);if(i.indexOf("e")!==-1){var o=e.constructor;i=new o(i).toFixed()}return i+"e"+(t>=0?"+":"")+n.toString()}function Ed(e,r){return r!==void 0?e.toExponential(r-1):e.toExponential()}function Gz(e,r){return e.toFixed(r)}function Sd(e,r){return Ke(e)?e:Je(e)?e.toNumber():r}function Wz(e,r){var t=e.length-r.length,n=e.length;return e.substring(t,n)===r}function er(e,r){var t=Zz(e,r);return r&&typeof r=="object"&&"truncate"in r&&t.length>r.truncate?t.substring(0,r.truncate-3)+"...":t}function Zz(e,r){if(typeof e=="number")return Yn(e,r);if(Je(e))return jz(e,r);if(Yz(e))return!r||r.fraction!=="decimal"?e.s*e.n+"/"+e.d:e.toString();if(Array.isArray(e))return s2(e,r);if(et(e))return ja(e);if(typeof e=="function")return e.syntax?String(e.syntax):"function";if(e&&typeof e=="object"){if(typeof e.format=="function")return e.format(r);if(e&&e.toString(r)!=={}.toString())return e.toString(r);var t=Object.keys(e).map(n=>ja(n)+": "+er(e[n],r));return"{"+t.join(", ")+"}"}return String(e)}function ja(e){for(var r=String(e),t="",n=0;n<r.length;){var a=r.charAt(n);t+=a in Ad?Ad[a]:a,n++}return'"'+t+'"'}var Ad={'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t"};function _t(e){var r=String(e);return r=r.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">"),r}function s2(e,r){if(Array.isArray(e)){for(var t="[",n=e.length,a=0;a<n;a++)a!==0&&(t+=", "),t+=s2(e[a],r);return t+="]",t}else return er(e,r)}function Yz(e){return e&&typeof e=="object"&&typeof e.s=="number"&&typeof e.n=="number"&&typeof e.d=="number"||!1}function Gl(e,r){if(!et(e))throw new TypeError("Unexpected type of argument in function compareText (expected: string or Array or Matrix, actual: "+Dr(e)+", index: 0)");if(!et(r))throw new TypeError("Unexpected type of argument in function compareText (expected: string or Array or Matrix, actual: "+Dr(r)+", index: 1)");return e===r?0:e>r?1:-1}function rr(e,r,t){if(!(this instanceof rr))throw new SyntaxError("Constructor must be called with the new operator");this.actual=e,this.expected=r,this.relation=t,this.message="Dimension mismatch ("+(Array.isArray(e)?"["+e.join(", ")+"]":e)+" "+(this.relation||"!=")+" "+(Array.isArray(r)?"["+r.join(", ")+"]":r)+")",this.stack=new Error().stack}rr.prototype=new RangeError;rr.prototype.constructor=RangeError;rr.prototype.name="DimensionError";rr.prototype.isDimensionError=!0;function Yt(e,r,t){if(!(this instanceof Yt))throw new SyntaxError("Constructor must be called with the new operator");this.index=e,arguments.length<3?(this.min=0,this.max=r):(this.min=r,this.max=t),this.min!==void 0&&this.index<this.min?this.message="Index out of range ("+this.index+" < "+this.min+")":this.max!==void 0&&this.index>=this.max?this.message="Index out of range ("+this.index+" > "+(this.max-1)+")":this.message="Index out of range ("+this.index+")",this.stack=new Error().stack}Yt.prototype=new RangeError;Yt.prototype.constructor=RangeError;Yt.prototype.name="IndexError";Yt.prototype.isIndexError=!0;function Xe(e){for(var r=[];Array.isArray(e);)r.push(e.length),e=e[0];return r}function u2(e,r,t){var n,a=e.length;if(a!==r[t])throw new rr(a,r[t]);if(t<r.length-1){var i=t+1;for(n=0;n<a;n++){var o=e[n];if(!Array.isArray(o))throw new rr(r.length-1,r.length,"<");u2(e[n],r,i)}}else for(n=0;n<a;n++)if(Array.isArray(e[n]))throw new rr(r.length+1,r.length,">")}function Dd(e,r){var t=r.length===0;if(t){if(Array.isArray(e))throw new rr(e.length,0)}else u2(e,r,0)}function xs(e,r){var t=e.isMatrix?e._size:Xe(e),n=r._sourceSize;n.forEach((a,i)=>{if(a!==null&&a!==t[i])throw new rr(a,t[i])})}function Sr(e,r){if(e!==void 0){if(!Ke(e)||!Pe(e))throw new TypeError("Index must be an integer (value: "+e+")");if(e<0||typeof r=="number"&&e>=r)throw new Yt(e,r)}}function Xa(e){for(var r=0;r<e._dimensions.length;++r){var t=e._dimensions[r];if(t._data&&mr(t._data)){if(t._size[0]===0)return!0}else if(t.isRange){if(t.start===t.end)return!0}else if(et(t)&&t.length===0)return!0}return!1}function Ka(e,r,t){if(!Array.isArray(r))throw new TypeError("Array expected");if(r.length===0)throw new Error("Resizing to scalar is not supported");r.forEach(function(a){if(!Ke(a)||!Pe(a)||a<0)throw new TypeError("Invalid size, must contain positive integers (size: "+er(r)+")")}),(Ke(e)||Je(e))&&(e=[e]);var n=t!==void 0?t:0;return Wl(e,r,0,n),e}function Wl(e,r,t,n){var a,i,o=e.length,u=r[t],s=Math.min(o,u);if(e.length=u,t<r.length-1){var l=t+1;for(a=0;a<s;a++)i=e[a],Array.isArray(i)||(i=[i],e[a]=i),Wl(i,r,l,n);for(a=s;a<u;a++)i=[],e[a]=i,Wl(i,r,l,n)}else{for(a=0;a<s;a++)for(;Array.isArray(e[a]);)e[a]=e[a][0];for(a=s;a<u;a++)e[a]=n}}function yf(e,r){var t=dr(e),n=t.length;if(!Array.isArray(e)||!Array.isArray(r))throw new TypeError("Array expected");if(r.length===0)throw new rr(0,n,"!=");r=bf(r,n);var a=l2(r);if(n!==a)throw new rr(a,n,"!=");try{return Xz(t,r)}catch(i){throw i instanceof rr?new rr(a,n,"!="):i}}function bf(e,r){var t=l2(e),n=e.slice(),a=-1,i=e.indexOf(a),o=e.indexOf(a,i+1)>=0;if(o)throw new Error("More than one wildcard in sizes");var u=i>=0,s=r%t===0;if(u)if(s)n[i]=-r/t;else throw new Error("Could not replace wildcard, since "+r+" is no multiple of "+-t);return n}function l2(e){return e.reduce((r,t)=>r*t,1)}function Xz(e,r){for(var t=e,n,a=r.length-1;a>0;a--){var i=r[a];n=[];for(var o=t.length/i,u=0;u<o;u++)n.push(t.slice(u*i,(u+1)*i));t=n}return t}function ws(e,r){for(var t=Xe(e);Array.isArray(e)&&e.length===1;)e=e[0],t.shift();for(var n=t.length;t[n-1]===1;)n--;return n<t.length&&(e=c2(e,n,0),t.length=n),e}function c2(e,r,t){var n,a;if(t<r){var i=t+1;for(n=0,a=e.length;n<a;n++)e[n]=c2(e[n],r,i)}else for(;Array.isArray(e);)e=e[0];return e}function f2(e,r,t,n){var a=n||Xe(e);if(t)for(var i=0;i<t;i++)e=[e],a.unshift(1);for(e=p2(e,r,0);a.length<r;)a.push(1);return e}function p2(e,r,t){var n,a;if(Array.isArray(e)){var i=t+1;for(n=0,a=e.length;n<a;n++)e[n]=p2(e[n],r,i)}else for(var o=t;o<r;o++)e=[e];return e}function dr(e){if(!Array.isArray(e))return e;var r=[];return e.forEach(function t(n){Array.isArray(n)?n.forEach(t):r.push(n)}),r}function mn(e,r){return Array.prototype.map.call(e,r)}function hu(e,r){Array.prototype.forEach.call(e,r)}function v2(e,r){if(Xe(e).length!==1)throw new Error("Only one dimensional matrices supported");return Array.prototype.filter.call(e,r)}function Es(e,r){if(Xe(e).length!==1)throw new Error("Only one dimensional matrices supported");return Array.prototype.filter.call(e,t=>r.test(t))}function Nd(e,r){return Array.prototype.join.call(e,r)}function Ja(e){if(!Array.isArray(e))throw new TypeError("Array input expected");if(e.length===0)return e;var r=[],t=0;r[0]={value:e[0],identifier:0};for(var n=1;n<e.length;n++)e[n]===e[n-1]?t++:t=0,r.push({value:e[n],identifier:t});return r}function Ss(e){if(!Array.isArray(e))throw new TypeError("Array input expected");if(e.length===0)return e;for(var r=[],t=0;t<e.length;t++)r.push(e[t].value);return r}function Ki(e,r){for(var t,n=0,a=0;a<e.length;a++){var i=e[a],o=Array.isArray(i);if(a===0&&o&&(n=i.length),o&&i.length!==n)return;var u=o?Ki(i,r):r(i);if(t===void 0)t=u;else if(t!==u)return"mixed"}return t}function d2(e,r,t,n){if(n<t){if(e.length!==r.length)throw new rr(e.length,r.length);for(var a=[],i=0;i<e.length;i++)a[i]=d2(e[i],r[i],t,n+1);return a}else return e.concat(r)}function m2(){var e=Array.prototype.slice.call(arguments,0,-1),r=Array.prototype.slice.call(arguments,-1);if(e.length===1)return e[0];if(e.length>1)return e.slice(1).reduce(function(t,n){return d2(t,n,r,0)},e[0]);throw new Error("Wrong number of arguments in function concat")}function Kz(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];for(var n=r.map(p=>p.length),a=Math.max(...n),i=new Array(a).fill(null),o=0;o<r.length;o++)for(var u=r[o],s=n[o],l=0;l<s;l++){var c=a-s+l;u[l]>i[c]&&(i[c]=u[l])}for(var f=0;f<r.length;f++)As(r[f],i);return i}function As(e,r){for(var t=r.length,n=e.length,a=0;a<n;a++){var i=t-n+a;if(e[a]<r[i]&&e[a]>1||e[a]>r[i])throw new Error("shape missmatch: missmatch is found in arg with shape (".concat(e,") not possible to broadcast dimension ").concat(n," with size ").concat(e[a]," to size ").concat(r[i]))}}function Cd(e,r){var t=Xe(e);if(Qn(t,r))return e;As(t,r);var n=Kz(t,r),a=n.length,i=[...Array(a-t.length).fill(1),...t],o=Qz(e);t.length<a&&(o=yf(o,i),t=Xe(o));for(var u=0;u<a;u++)t[u]<n[u]&&(o=Jz(o,n[u],u),t=Xe(o));return o}function Jz(e,r,t){return m2(...Array(r).fill(e),t)}function Qz(e){return kr([],e)}function L(e,r,t,n){function a(i){var o=Dz(i,r.map(tI));return eI(e,r,i),t(o)}return a.isFactory=!0,a.fn=e,a.dependencies=r.slice().sort(),n&&(a.meta=n),a}function eI(e,r,t){var n=r.filter(i=>!rI(i)).every(i=>t[i]!==void 0);if(!n){var a=r.filter(i=>t[i]===void 0);throw new Error('Cannot create function "'.concat(e,'", ')+"some dependencies are missing: ".concat(a.map(i=>'"'.concat(i,'"')).join(", "),"."))}}function rI(e){return e&&e[0]==="?"}function tI(e){return e&&e[0]==="?"?e.slice(1):e}function it(e,r){if(g2(e)&&h2(e,r))return e[r];throw typeof e[r]=="function"&&xf(e,r)?new Error('Cannot access method "'+r+'" as a property'):new Error('No access to property "'+r+'"')}function Qa(e,r,t){if(g2(e)&&h2(e,r))return e[r]=t,t;throw new Error('No access to property "'+r+'"')}function nI(e,r){return r in e}function h2(e,r){return!e||typeof e!="object"?!1:Re(iI,r)?!0:!(r in Object.prototype||r in Function.prototype)}function aI(e,r){if(!xf(e,r))throw new Error('No access to method "'+r+'"');return e[r]}function xf(e,r){return e==null||typeof e[r]!="function"||Re(e,r)&&Object.getPrototypeOf&&r in Object.getPrototypeOf(e)?!1:Re(oI,r)?!0:!(r in Object.prototype||r in Function.prototype)}function g2(e){return typeof e=="object"&&e&&e.constructor===Object}var iI={length:!0,name:!0},oI={toString:!0,valueOf:!0,toLocaleString:!0};class gu{constructor(r){this.wrappedObject=r,this[Symbol.iterator]=this.entries}keys(){return Object.keys(this.wrappedObject).values()}get(r){return it(this.wrappedObject,r)}set(r,t){return Qa(this.wrappedObject,r,t),this}has(r){return nI(this.wrappedObject,r)}entries(){return b2(this.keys(),r=>[r,this.get(r)])}forEach(r){for(var t of this.keys())r(this.get(t),t,this)}delete(r){delete this.wrappedObject[r]}clear(){for(var r of this.keys())this.delete(r)}get size(){return Object.keys(this.wrappedObject).length}}class y2{constructor(r,t,n){this.a=r,this.b=t,this.bKeys=n,this[Symbol.iterator]=this.entries}get(r){return this.bKeys.has(r)?this.b.get(r):this.a.get(r)}set(r,t){return this.bKeys.has(r)?this.b.set(r,t):this.a.set(r,t),this}has(r){return this.b.has(r)||this.a.has(r)}keys(){return new Set([...this.a.keys(),...this.b.keys()])[Symbol.iterator]()}entries(){return b2(this.keys(),r=>[r,this.get(r)])}forEach(r){for(var t of this.keys())r(this.get(t),t,this)}delete(r){return this.bKeys.has(r)?this.b.delete(r):this.a.delete(r)}clear(){this.a.clear(),this.b.clear()}get size(){return[...this.keys()].length}}function b2(e,r){return{next:()=>{var t=e.next();return t.done?t:{value:r(t.value),done:!1}}}}function Ji(){return new Map}function Wa(e){if(!e)return Ji();if(x2(e))return e;if(vu(e))return new gu(e);throw new Error("createMap can create maps from objects or Maps")}function sI(e){if(e instanceof gu)return e.wrappedObject;var r={};for(var t of e.keys()){var n=e.get(t);Qa(r,t,n)}return r}function x2(e){return e?e instanceof Map||e instanceof gu||typeof e.set=="function"&&typeof e.get=="function"&&typeof e.keys=="function"&&typeof e.has=="function":!1}var w2=function(){return w2=Ha.create,Ha},uI=["?BigNumber","?Complex","?DenseMatrix","?Fraction"],lI=L("typed",uI,function(r){var{BigNumber:t,Complex:n,DenseMatrix:a,Fraction:i}=r,o=w2();return o.clear(),o.addTypes([{name:"number",test:Ke},{name:"Complex",test:dn},{name:"BigNumber",test:Je},{name:"Fraction",test:mo},{name:"Unit",test:Tt},{name:"identifier",test:u=>et&&/^(?:[A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE3F\uDE40\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDF02\uDF04-\uDF10\uDF12-\uDF33\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC41-\uDC46]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]|\uD838[\uDC30-\uDC6D\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDCD0-\uDCEB\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF])(?:[0-9A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE3F\uDE40\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDF02\uDF04-\uDF10\uDF12-\uDF33\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC41-\uDC46]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]|\uD838[\uDC30-\uDC6D\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDCD0-\uDCEB\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF])*$/.test(u)},{name:"string",test:et},{name:"Chain",test:r2},{name:"Array",test:mr},{name:"Matrix",test:ke},{name:"DenseMatrix",test:bs},{name:"SparseMatrix",test:Wn},{name:"Range",test:gf},{name:"Index",test:pu},{name:"boolean",test:fz},{name:"ResultSet",test:pz},{name:"Help",test:e2},{name:"function",test:vz},{name:"Date",test:dz},{name:"RegExp",test:mz},{name:"null",test:hz},{name:"undefined",test:gz},{name:"AccessorNode",test:Jn},{name:"ArrayNode",test:Mt},{name:"AssignmentNode",test:yz},{name:"BlockNode",test:bz},{name:"ConditionalNode",test:xz},{name:"ConstantNode",test:lr},{name:"FunctionNode",test:Bn},{name:"FunctionAssignmentNode",test:ho},{name:"IndexNode",test:gi},{name:"Node",test:wr},{name:"ObjectNode",test:du},{name:"OperatorNode",test:Lr},{name:"ParenthesisNode",test:gn},{name:"RangeNode",test:wz},{name:"RelationalNode",test:Ez},{name:"SymbolNode",test:Vr},{name:"Map",test:x2},{name:"Object",test:vu}]),o.addConversions([{from:"number",to:"BigNumber",convert:function(s){if(t||vl(s),Rz(s)>15)throw new TypeError("Cannot implicitly convert a number with >15 significant digits to BigNumber (value: "+s+"). Use function bignumber(x) to convert to BigNumber.");return new t(s)}},{from:"number",to:"Complex",convert:function(s){return n||Io(s),new n(s,0)}},{from:"BigNumber",to:"Complex",convert:function(s){return n||Io(s),new n(s.toNumber(),0)}},{from:"Fraction",to:"BigNumber",convert:function(s){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(s){return n||Io(s),new n(s.valueOf(),0)}},{from:"number",to:"Fraction",convert:function(s){i||dl(s);var l=new i(s);if(l.valueOf()!==s)throw new TypeError("Cannot implicitly convert a number to a Fraction when there will be a loss of precision (value: "+s+"). Use function fraction(x) to convert to Fraction.");return l}},{from:"string",to:"number",convert:function(s){var l=Number(s);if(isNaN(l))throw new Error('Cannot convert "'+s+'" to a number');return l}},{from:"string",to:"BigNumber",convert:function(s){t||vl(s);try{return new t(s)}catch{throw new Error('Cannot convert "'+s+'" to BigNumber')}}},{from:"string",to:"Fraction",convert:function(s){i||dl(s);try{return new i(s)}catch{throw new Error('Cannot convert "'+s+'" to Fraction')}}},{from:"string",to:"Complex",convert:function(s){n||Io(s);try{return new n(s)}catch{throw new Error('Cannot convert "'+s+'" to Complex')}}},{from:"boolean",to:"number",convert:function(s){return+s}},{from:"boolean",to:"BigNumber",convert:function(s){return t||vl(s),new t(+s)}},{from:"boolean",to:"Fraction",convert:function(s){return i||dl(s),new i(+s)}},{from:"boolean",to:"string",convert:function(s){return String(s)}},{from:"Array",to:"Matrix",convert:function(s){return a||cI(),new a(s)}},{from:"Matrix",to:"Array",convert:function(s){return s.valueOf()}}]),o.onMismatch=(u,s,l)=>{var c=o.createError(u,s,l);if(["wrongType","mismatch"].includes(c.data.category)&&s.length===1&&Bt(s[0])&&l.some(p=>!p.params.includes(","))){var f=new TypeError("Function '".concat(u,"' doesn't apply to matrices. To call it ")+"elementwise on a matrix 'M', try 'map(M, ".concat(u,")'."));throw f.data=c.data,f}throw c},o.onMismatch=(u,s,l)=>{var c=o.createError(u,s,l);if(["wrongType","mismatch"].includes(c.data.category)&&s.length===1&&Bt(s[0])&&l.some(p=>!p.params.includes(","))){var f=new TypeError("Function '".concat(u,"' doesn't apply to matrices. To call it ")+"elementwise on a matrix 'M', try 'map(M, ".concat(u,")'."));throw f.data=c.data,f}throw c},o});function vl(e){throw new Error("Cannot convert value ".concat(e," into a BigNumber: no class 'BigNumber' provided"))}function Io(e){throw new Error("Cannot convert value ".concat(e," into a Complex number: no class 'Complex' provided"))}function cI(){throw new Error("Cannot convert array into a Matrix: no class 'DenseMatrix' provided")}function dl(e){throw new Error("Cannot convert value ".concat(e," into a Fraction, no class 'Fraction' provided."))}var fI="ResultSet",pI=[],vI=L(fI,pI,()=>{function e(r){if(!(this instanceof e))throw new SyntaxError("Constructor must be called with the new operator");this.entries=r||[]}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(r){return new e(r.entries)},e},{isClass:!0});/*!
|
|
78
|
+
* decimal.js v10.4.3
|
|
79
|
+
* An arbitrary-precision Decimal type for JavaScript.
|
|
80
|
+
* https://github.com/MikeMcl/decimal.js
|
|
81
|
+
* Copyright (c) 2022 Michael Mclaughlin <M8ch88l@gmail.com>
|
|
82
|
+
* MIT Licence
|
|
83
|
+
*/var Va=9e15,In=1e9,Zl="0123456789abcdef",Ds="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",Ns="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",Yl={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-Va,maxE:Va,crypto:!1},E2,pn,We=!0,yu="[DecimalError] ",Rn=yu+"Invalid argument: ",S2=yu+"Precision limit exceeded",A2=yu+"crypto unavailable",D2="[object Decimal]",tt=Math.floor,qr=Math.pow,dI=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,mI=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,hI=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,N2=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,jt=1e7,Ue=7,gI=9007199254740991,yI=Ds.length-1,Xl=Ns.length-1,we={toStringTag:D2};we.absoluteValue=we.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),qe(e)};we.ceil=function(){return qe(new this.constructor(this),this.e+1,2)};we.clampedTo=we.clamp=function(e,r){var t,n=this,a=n.constructor;if(e=new a(e),r=new a(r),!e.s||!r.s)return new a(NaN);if(e.gt(r))throw Error(Rn+r);return t=n.cmp(e),t<0?e:n.cmp(r)>0?r:new a(n)};we.comparedTo=we.cmp=function(e){var r,t,n,a,i=this,o=i.d,u=(e=new i.constructor(e)).d,s=i.s,l=e.s;if(!o||!u)return!s||!l?NaN:s!==l?s:o===u?0:!o^s<0?1:-1;if(!o[0]||!u[0])return o[0]?s:u[0]?-l:0;if(s!==l)return s;if(i.e!==e.e)return i.e>e.e^s<0?1:-1;for(n=o.length,a=u.length,r=0,t=n<a?n:a;r<t;++r)if(o[r]!==u[r])return o[r]>u[r]^s<0?1:-1;return n===a?0:n>a^s<0?1:-1};we.cosine=we.cos=function(){var e,r,t=this,n=t.constructor;return t.d?t.d[0]?(e=n.precision,r=n.rounding,n.precision=e+Math.max(t.e,t.sd())+Ue,n.rounding=1,t=bI(n,_2(n,t)),n.precision=e,n.rounding=r,qe(pn==2||pn==3?t.neg():t,e,r,!0)):new n(1):new n(NaN)};we.cubeRoot=we.cbrt=function(){var e,r,t,n,a,i,o,u,s,l,c=this,f=c.constructor;if(!c.isFinite()||c.isZero())return new f(c);for(We=!1,i=c.s*qr(c.s*c,1/3),!i||Math.abs(i)==1/0?(t=Xr(c.d),e=c.e,(i=(e-t.length+1)%3)&&(t+=i==1||i==-2?"0":"00"),i=qr(t,1/3),e=tt((e+1)/3)-(e%3==(e<0?-1:2)),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new f(t),n.s=c.s):n=new f(i.toString()),o=(e=f.precision)+3;;)if(u=n,s=u.times(u).times(u),l=s.plus(c),n=Mr(l.plus(c).times(u),l.plus(s),o+2,1),Xr(u.d).slice(0,o)===(t=Xr(n.d)).slice(0,o))if(t=t.slice(o-3,o+1),t=="9999"||!a&&t=="4999"){if(!a&&(qe(u,e+1,0),u.times(u).times(u).eq(c))){n=u;break}o+=4,a=1}else{(!+t||!+t.slice(1)&&t.charAt(0)=="5")&&(qe(n,e+1,1),r=!n.times(n).times(n).eq(c));break}return We=!0,qe(n,e,f.rounding,r)};we.decimalPlaces=we.dp=function(){var e,r=this.d,t=NaN;if(r){if(e=r.length-1,t=(e-tt(this.e/Ue))*Ue,e=r[e],e)for(;e%10==0;e/=10)t--;t<0&&(t=0)}return t};we.dividedBy=we.div=function(e){return Mr(this,new this.constructor(e))};we.dividedToIntegerBy=we.divToInt=function(e){var r=this,t=r.constructor;return qe(Mr(r,new t(e),0,1,1),t.precision,t.rounding)};we.equals=we.eq=function(e){return this.cmp(e)===0};we.floor=function(){return qe(new this.constructor(this),this.e+1,3)};we.greaterThan=we.gt=function(e){return this.cmp(e)>0};we.greaterThanOrEqualTo=we.gte=function(e){var r=this.cmp(e);return r==1||r===0};we.hyperbolicCosine=we.cosh=function(){var e,r,t,n,a,i=this,o=i.constructor,u=new o(1);if(!i.isFinite())return new o(i.s?1/0:NaN);if(i.isZero())return u;t=o.precision,n=o.rounding,o.precision=t+Math.max(i.e,i.sd())+4,o.rounding=1,a=i.d.length,a<32?(e=Math.ceil(a/3),r=(1/xu(4,e)).toString()):(e=16,r="2.3283064365386962890625e-10"),i=ei(o,1,i.times(r),new o(1),!0);for(var s,l=e,c=new o(8);l--;)s=i.times(i),i=u.minus(s.times(c.minus(s.times(c))));return qe(i,o.precision=t,o.rounding=n,!0)};we.hyperbolicSine=we.sinh=function(){var e,r,t,n,a=this,i=a.constructor;if(!a.isFinite()||a.isZero())return new i(a);if(r=i.precision,t=i.rounding,i.precision=r+Math.max(a.e,a.sd())+4,i.rounding=1,n=a.d.length,n<3)a=ei(i,2,a,a,!0);else{e=1.4*Math.sqrt(n),e=e>16?16:e|0,a=a.times(1/xu(5,e)),a=ei(i,2,a,a,!0);for(var o,u=new i(5),s=new i(16),l=new i(20);e--;)o=a.times(a),a=a.times(u.plus(o.times(s.times(o).plus(l))))}return i.precision=r,i.rounding=t,qe(a,r,t,!0)};we.hyperbolicTangent=we.tanh=function(){var e,r,t=this,n=t.constructor;return t.isFinite()?t.isZero()?new n(t):(e=n.precision,r=n.rounding,n.precision=e+7,n.rounding=1,Mr(t.sinh(),t.cosh(),n.precision=e,n.rounding=r)):new n(t.s)};we.inverseCosine=we.acos=function(){var e,r=this,t=r.constructor,n=r.abs().cmp(1),a=t.precision,i=t.rounding;return n!==-1?n===0?r.isNeg()?Ht(t,a,i):new t(0):new t(NaN):r.isZero()?Ht(t,a+4,i).times(.5):(t.precision=a+6,t.rounding=1,r=r.asin(),e=Ht(t,a+4,i).times(.5),t.precision=a,t.rounding=i,e.minus(r))};we.inverseHyperbolicCosine=we.acosh=function(){var e,r,t=this,n=t.constructor;return t.lte(1)?new n(t.eq(1)?0:NaN):t.isFinite()?(e=n.precision,r=n.rounding,n.precision=e+Math.max(Math.abs(t.e),t.sd())+4,n.rounding=1,We=!1,t=t.times(t).minus(1).sqrt().plus(t),We=!0,n.precision=e,n.rounding=r,t.ln()):new n(t)};we.inverseHyperbolicSine=we.asinh=function(){var e,r,t=this,n=t.constructor;return!t.isFinite()||t.isZero()?new n(t):(e=n.precision,r=n.rounding,n.precision=e+2*Math.max(Math.abs(t.e),t.sd())+6,n.rounding=1,We=!1,t=t.times(t).plus(1).sqrt().plus(t),We=!0,n.precision=e,n.rounding=r,t.ln())};we.inverseHyperbolicTangent=we.atanh=function(){var e,r,t,n,a=this,i=a.constructor;return a.isFinite()?a.e>=0?new i(a.abs().eq(1)?a.s/0:a.isZero()?a:NaN):(e=i.precision,r=i.rounding,n=a.sd(),Math.max(n,e)<2*-a.e-1?qe(new i(a),e,r,!0):(i.precision=t=n-a.e,a=Mr(a.plus(1),new i(1).minus(a),t+e,1),i.precision=e+4,i.rounding=1,a=a.ln(),i.precision=e,i.rounding=r,a.times(.5))):new i(NaN)};we.inverseSine=we.asin=function(){var e,r,t,n,a=this,i=a.constructor;return a.isZero()?new i(a):(r=a.abs().cmp(1),t=i.precision,n=i.rounding,r!==-1?r===0?(e=Ht(i,t+4,n).times(.5),e.s=a.s,e):new i(NaN):(i.precision=t+6,i.rounding=1,a=a.div(new i(1).minus(a.times(a)).sqrt().plus(1)).atan(),i.precision=t,i.rounding=n,a.times(2)))};we.inverseTangent=we.atan=function(){var e,r,t,n,a,i,o,u,s,l=this,c=l.constructor,f=c.precision,p=c.rounding;if(l.isFinite()){if(l.isZero())return new c(l);if(l.abs().eq(1)&&f+4<=Xl)return o=Ht(c,f+4,p).times(.25),o.s=l.s,o}else{if(!l.s)return new c(NaN);if(f+4<=Xl)return o=Ht(c,f+4,p).times(.5),o.s=l.s,o}for(c.precision=u=f+10,c.rounding=1,t=Math.min(28,u/Ue+2|0),e=t;e;--e)l=l.div(l.times(l).plus(1).sqrt().plus(1));for(We=!1,r=Math.ceil(u/Ue),n=1,s=l.times(l),o=new c(l),a=l;e!==-1;)if(a=a.times(s),i=o.minus(a.div(n+=2)),a=a.times(s),o=i.plus(a.div(n+=2)),o.d[r]!==void 0)for(e=r;o.d[e]===i.d[e]&&e--;);return t&&(o=o.times(2<<t-1)),We=!0,qe(o,c.precision=f,c.rounding=p,!0)};we.isFinite=function(){return!!this.d};we.isInteger=we.isInt=function(){return!!this.d&&tt(this.e/Ue)>this.d.length-2};we.isNaN=function(){return!this.s};we.isNegative=we.isNeg=function(){return this.s<0};we.isPositive=we.isPos=function(){return this.s>0};we.isZero=function(){return!!this.d&&this.d[0]===0};we.lessThan=we.lt=function(e){return this.cmp(e)<0};we.lessThanOrEqualTo=we.lte=function(e){return this.cmp(e)<1};we.logarithm=we.log=function(e){var r,t,n,a,i,o,u,s,l=this,c=l.constructor,f=c.precision,p=c.rounding,v=5;if(e==null)e=new c(10),r=!0;else{if(e=new c(e),t=e.d,e.s<0||!t||!t[0]||e.eq(1))return new c(NaN);r=e.eq(10)}if(t=l.d,l.s<0||!t||!t[0]||l.eq(1))return new c(t&&!t[0]?-1/0:l.s!=1?NaN:t?0:1/0);if(r)if(t.length>1)i=!0;else{for(a=t[0];a%10===0;)a/=10;i=a!==1}if(We=!1,u=f+v,o=_n(l,u),n=r?Cs(c,u+10):_n(e,u),s=Mr(o,n,u,1),Qi(s.d,a=f,p))do if(u+=10,o=_n(l,u),n=r?Cs(c,u+10):_n(e,u),s=Mr(o,n,u,1),!i){+Xr(s.d).slice(a+1,a+15)+1==1e14&&(s=qe(s,f+1,0));break}while(Qi(s.d,a+=10,p));return We=!0,qe(s,f,p)};we.minus=we.sub=function(e){var r,t,n,a,i,o,u,s,l,c,f,p,v=this,m=v.constructor;if(e=new m(e),!v.d||!e.d)return!v.s||!e.s?e=new m(NaN):v.d?e.s=-e.s:e=new m(e.d||v.s!==e.s?v:NaN),e;if(v.s!=e.s)return e.s=-e.s,v.plus(e);if(l=v.d,p=e.d,u=m.precision,s=m.rounding,!l[0]||!p[0]){if(p[0])e.s=-e.s;else if(l[0])e=new m(v);else return new m(s===3?-0:0);return We?qe(e,u,s):e}if(t=tt(e.e/Ue),c=tt(v.e/Ue),l=l.slice(),i=c-t,i){for(f=i<0,f?(r=l,i=-i,o=p.length):(r=p,t=c,o=l.length),n=Math.max(Math.ceil(u/Ue),o)+2,i>n&&(i=n,r.length=1),r.reverse(),n=i;n--;)r.push(0);r.reverse()}else{for(n=l.length,o=p.length,f=n<o,f&&(o=n),n=0;n<o;n++)if(l[n]!=p[n]){f=l[n]<p[n];break}i=0}for(f&&(r=l,l=p,p=r,e.s=-e.s),o=l.length,n=p.length-o;n>0;--n)l[o++]=0;for(n=p.length;n>i;){if(l[--n]<p[n]){for(a=n;a&&l[--a]===0;)l[a]=jt-1;--l[a],l[n]+=jt}l[n]-=p[n]}for(;l[--o]===0;)l.pop();for(;l[0]===0;l.shift())--t;return l[0]?(e.d=l,e.e=bu(l,t),We?qe(e,u,s):e):new m(s===3?-0:0)};we.modulo=we.mod=function(e){var r,t=this,n=t.constructor;return e=new n(e),!t.d||!e.s||e.d&&!e.d[0]?new n(NaN):!e.d||t.d&&!t.d[0]?qe(new n(t),n.precision,n.rounding):(We=!1,n.modulo==9?(r=Mr(t,e.abs(),0,3,1),r.s*=e.s):r=Mr(t,e,0,n.modulo,1),r=r.times(e),We=!0,t.minus(r))};we.naturalExponential=we.exp=function(){return Kl(this)};we.naturalLogarithm=we.ln=function(){return _n(this)};we.negated=we.neg=function(){var e=new this.constructor(this);return e.s=-e.s,qe(e)};we.plus=we.add=function(e){var r,t,n,a,i,o,u,s,l,c,f=this,p=f.constructor;if(e=new p(e),!f.d||!e.d)return!f.s||!e.s?e=new p(NaN):f.d||(e=new p(e.d||f.s===e.s?f:NaN)),e;if(f.s!=e.s)return e.s=-e.s,f.minus(e);if(l=f.d,c=e.d,u=p.precision,s=p.rounding,!l[0]||!c[0])return c[0]||(e=new p(f)),We?qe(e,u,s):e;if(i=tt(f.e/Ue),n=tt(e.e/Ue),l=l.slice(),a=i-n,a){for(a<0?(t=l,a=-a,o=c.length):(t=c,n=i,o=l.length),i=Math.ceil(u/Ue),o=i>o?i+1:o+1,a>o&&(a=o,t.length=1),t.reverse();a--;)t.push(0);t.reverse()}for(o=l.length,a=c.length,o-a<0&&(a=o,t=c,c=l,l=t),r=0;a;)r=(l[--a]=l[a]+c[a]+r)/jt|0,l[a]%=jt;for(r&&(l.unshift(r),++n),o=l.length;l[--o]==0;)l.pop();return e.d=l,e.e=bu(l,n),We?qe(e,u,s):e};we.precision=we.sd=function(e){var r,t=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Rn+e);return t.d?(r=C2(t.d),e&&t.e+1>r&&(r=t.e+1)):r=NaN,r};we.round=function(){var e=this,r=e.constructor;return qe(new r(e),e.e+1,r.rounding)};we.sine=we.sin=function(){var e,r,t=this,n=t.constructor;return t.isFinite()?t.isZero()?new n(t):(e=n.precision,r=n.rounding,n.precision=e+Math.max(t.e,t.sd())+Ue,n.rounding=1,t=wI(n,_2(n,t)),n.precision=e,n.rounding=r,qe(pn>2?t.neg():t,e,r,!0)):new n(NaN)};we.squareRoot=we.sqrt=function(){var e,r,t,n,a,i,o=this,u=o.d,s=o.e,l=o.s,c=o.constructor;if(l!==1||!u||!u[0])return new c(!l||l<0&&(!u||u[0])?NaN:u?o:1/0);for(We=!1,l=Math.sqrt(+o),l==0||l==1/0?(r=Xr(u),(r.length+s)%2==0&&(r+="0"),l=Math.sqrt(r),s=tt((s+1)/2)-(s<0||s%2),l==1/0?r="5e"+s:(r=l.toExponential(),r=r.slice(0,r.indexOf("e")+1)+s),n=new c(r)):n=new c(l.toString()),t=(s=c.precision)+3;;)if(i=n,n=i.plus(Mr(o,i,t+2,1)).times(.5),Xr(i.d).slice(0,t)===(r=Xr(n.d)).slice(0,t))if(r=r.slice(t-3,t+1),r=="9999"||!a&&r=="4999"){if(!a&&(qe(i,s+1,0),i.times(i).eq(o))){n=i;break}t+=4,a=1}else{(!+r||!+r.slice(1)&&r.charAt(0)=="5")&&(qe(n,s+1,1),e=!n.times(n).eq(o));break}return We=!0,qe(n,s,c.rounding,e)};we.tangent=we.tan=function(){var e,r,t=this,n=t.constructor;return t.isFinite()?t.isZero()?new n(t):(e=n.precision,r=n.rounding,n.precision=e+10,n.rounding=1,t=t.sin(),t.s=1,t=Mr(t,new n(1).minus(t.times(t)).sqrt(),e+10,0),n.precision=e,n.rounding=r,qe(pn==2||pn==4?t.neg():t,e,r,!0)):new n(NaN)};we.times=we.mul=function(e){var r,t,n,a,i,o,u,s,l,c=this,f=c.constructor,p=c.d,v=(e=new f(e)).d;if(e.s*=c.s,!p||!p[0]||!v||!v[0])return new f(!e.s||p&&!p[0]&&!v||v&&!v[0]&&!p?NaN:!p||!v?e.s/0:e.s*0);for(t=tt(c.e/Ue)+tt(e.e/Ue),s=p.length,l=v.length,s<l&&(i=p,p=v,v=i,o=s,s=l,l=o),i=[],o=s+l,n=o;n--;)i.push(0);for(n=l;--n>=0;){for(r=0,a=s+n;a>n;)u=i[a]+v[n]*p[a-n-1]+r,i[a--]=u%jt|0,r=u/jt|0;i[a]=(i[a]+r)%jt|0}for(;!i[--o];)i.pop();return r?++t:i.shift(),e.d=i,e.e=bu(i,t),We?qe(e,f.precision,f.rounding):e};we.toBinary=function(e,r){return wf(this,2,e,r)};we.toDecimalPlaces=we.toDP=function(e,r){var t=this,n=t.constructor;return t=new n(t),e===void 0?t:(ht(e,0,In),r===void 0?r=n.rounding:ht(r,0,8),qe(t,e+t.e+1,r))};we.toExponential=function(e,r){var t,n=this,a=n.constructor;return e===void 0?t=tn(n,!0):(ht(e,0,In),r===void 0?r=a.rounding:ht(r,0,8),n=qe(new a(n),e+1,r),t=tn(n,!0,e+1)),n.isNeg()&&!n.isZero()?"-"+t:t};we.toFixed=function(e,r){var t,n,a=this,i=a.constructor;return e===void 0?t=tn(a):(ht(e,0,In),r===void 0?r=i.rounding:ht(r,0,8),n=qe(new i(a),e+a.e+1,r),t=tn(n,!1,e+n.e+1)),a.isNeg()&&!a.isZero()?"-"+t:t};we.toFraction=function(e){var r,t,n,a,i,o,u,s,l,c,f,p,v=this,m=v.d,d=v.constructor;if(!m)return new d(v);if(l=t=new d(1),n=s=new d(0),r=new d(n),i=r.e=C2(m)-v.e-1,o=i%Ue,r.d[0]=qr(10,o<0?Ue+o:o),e==null)e=i>0?r:l;else{if(u=new d(e),!u.isInt()||u.lt(l))throw Error(Rn+u);e=u.gt(r)?i>0?r:l:u}for(We=!1,u=new d(Xr(m)),c=d.precision,d.precision=i=m.length*Ue*2;f=Mr(u,r,0,1,1),a=t.plus(f.times(n)),a.cmp(e)!=1;)t=n,n=a,a=l,l=s.plus(f.times(a)),s=a,a=r,r=u.minus(f.times(a)),u=a;return a=Mr(e.minus(t),n,0,1,1),s=s.plus(a.times(l)),t=t.plus(a.times(n)),s.s=l.s=v.s,p=Mr(l,n,i,1).minus(v).abs().cmp(Mr(s,t,i,1).minus(v).abs())<1?[l,n]:[s,t],d.precision=c,We=!0,p};we.toHexadecimal=we.toHex=function(e,r){return wf(this,16,e,r)};we.toNearest=function(e,r){var t=this,n=t.constructor;if(t=new n(t),e==null){if(!t.d)return t;e=new n(1),r=n.rounding}else{if(e=new n(e),r===void 0?r=n.rounding:ht(r,0,8),!t.d)return e.s?t:e;if(!e.d)return e.s&&(e.s=t.s),e}return e.d[0]?(We=!1,t=Mr(t,e,0,r,1).times(e),We=!0,qe(t)):(e.s=t.s,t=e),t};we.toNumber=function(){return+this};we.toOctal=function(e,r){return wf(this,8,e,r)};we.toPower=we.pow=function(e){var r,t,n,a,i,o,u=this,s=u.constructor,l=+(e=new s(e));if(!u.d||!e.d||!u.d[0]||!e.d[0])return new s(qr(+u,l));if(u=new s(u),u.eq(1))return u;if(n=s.precision,i=s.rounding,e.eq(1))return qe(u,n,i);if(r=tt(e.e/Ue),r>=e.d.length-1&&(t=l<0?-l:l)<=gI)return a=M2(s,u,t,n),e.s<0?new s(1).div(a):qe(a,n,i);if(o=u.s,o<0){if(r<e.d.length-1)return new s(NaN);if(e.d[r]&1||(o=1),u.e==0&&u.d[0]==1&&u.d.length==1)return u.s=o,u}return t=qr(+u,l),r=t==0||!isFinite(t)?tt(l*(Math.log("0."+Xr(u.d))/Math.LN10+u.e+1)):new s(t+"").e,r>s.maxE+1||r<s.minE-1?new s(r>0?o/0:0):(We=!1,s.rounding=u.s=1,t=Math.min(12,(r+"").length),a=Kl(e.times(_n(u,n+t)),n),a.d&&(a=qe(a,n+5,1),Qi(a.d,n,i)&&(r=n+10,a=qe(Kl(e.times(_n(u,r+t)),r),r+5,1),+Xr(a.d).slice(n+1,n+15)+1==1e14&&(a=qe(a,n+1,0)))),a.s=o,We=!0,s.rounding=i,qe(a,n,i))};we.toPrecision=function(e,r){var t,n=this,a=n.constructor;return e===void 0?t=tn(n,n.e<=a.toExpNeg||n.e>=a.toExpPos):(ht(e,1,In),r===void 0?r=a.rounding:ht(r,0,8),n=qe(new a(n),e,r),t=tn(n,e<=n.e||n.e<=a.toExpNeg,e)),n.isNeg()&&!n.isZero()?"-"+t:t};we.toSignificantDigits=we.toSD=function(e,r){var t=this,n=t.constructor;return e===void 0?(e=n.precision,r=n.rounding):(ht(e,1,In),r===void 0?r=n.rounding:ht(r,0,8)),qe(new n(t),e,r)};we.toString=function(){var e=this,r=e.constructor,t=tn(e,e.e<=r.toExpNeg||e.e>=r.toExpPos);return e.isNeg()&&!e.isZero()?"-"+t:t};we.truncated=we.trunc=function(){return qe(new this.constructor(this),this.e+1,1)};we.valueOf=we.toJSON=function(){var e=this,r=e.constructor,t=tn(e,e.e<=r.toExpNeg||e.e>=r.toExpPos);return e.isNeg()?"-"+t:t};function Xr(e){var r,t,n,a=e.length-1,i="",o=e[0];if(a>0){for(i+=o,r=1;r<a;r++)n=e[r]+"",t=Ue-n.length,t&&(i+=Mn(t)),i+=n;o=e[r],n=o+"",t=Ue-n.length,t&&(i+=Mn(t))}else if(o===0)return"0";for(;o%10===0;)o/=10;return i+o}function ht(e,r,t){if(e!==~~e||e<r||e>t)throw Error(Rn+e)}function Qi(e,r,t,n){var a,i,o,u;for(i=e[0];i>=10;i/=10)--r;return--r<0?(r+=Ue,a=0):(a=Math.ceil((r+1)/Ue),r%=Ue),i=qr(10,Ue-r),u=e[a]%i|0,n==null?r<3?(r==0?u=u/100|0:r==1&&(u=u/10|0),o=t<4&&u==99999||t>3&&u==49999||u==5e4||u==0):o=(t<4&&u+1==i||t>3&&u+1==i/2)&&(e[a+1]/i/100|0)==qr(10,r-2)-1||(u==i/2||u==0)&&(e[a+1]/i/100|0)==0:r<4?(r==0?u=u/1e3|0:r==1?u=u/100|0:r==2&&(u=u/10|0),o=(n||t<4)&&u==9999||!n&&t>3&&u==4999):o=((n||t<4)&&u+1==i||!n&&t>3&&u+1==i/2)&&(e[a+1]/i/1e3|0)==qr(10,r-3)-1,o}function ns(e,r,t){for(var n,a=[0],i,o=0,u=e.length;o<u;){for(i=a.length;i--;)a[i]*=r;for(a[0]+=Zl.indexOf(e.charAt(o++)),n=0;n<a.length;n++)a[n]>t-1&&(a[n+1]===void 0&&(a[n+1]=0),a[n+1]+=a[n]/t|0,a[n]%=t)}return a.reverse()}function bI(e,r){var t,n,a;if(r.isZero())return r;n=r.d.length,n<32?(t=Math.ceil(n/3),a=(1/xu(4,t)).toString()):(t=16,a="2.3283064365386962890625e-10"),e.precision+=t,r=ei(e,1,r.times(a),new e(1));for(var i=t;i--;){var o=r.times(r);r=o.times(o).minus(o).times(8).plus(1)}return e.precision-=t,r}var Mr=function(){function e(n,a,i){var o,u=0,s=n.length;for(n=n.slice();s--;)o=n[s]*a+u,n[s]=o%i|0,u=o/i|0;return u&&n.unshift(u),n}function r(n,a,i,o){var u,s;if(i!=o)s=i>o?1:-1;else for(u=s=0;u<i;u++)if(n[u]!=a[u]){s=n[u]>a[u]?1:-1;break}return s}function t(n,a,i,o){for(var u=0;i--;)n[i]-=u,u=n[i]<a[i]?1:0,n[i]=u*o+n[i]-a[i];for(;!n[0]&&n.length>1;)n.shift()}return function(n,a,i,o,u,s){var l,c,f,p,v,m,d,y,h,E,g,w,x,b,A,D,S,N,C,M,B=n.constructor,P=n.s==a.s?1:-1,R=n.d,_=a.d;if(!R||!R[0]||!_||!_[0])return new B(!n.s||!a.s||(R?_&&R[0]==_[0]:!_)?NaN:R&&R[0]==0||!_?P*0:P/0);for(s?(v=1,c=n.e-a.e):(s=jt,v=Ue,c=tt(n.e/v)-tt(a.e/v)),C=_.length,S=R.length,h=new B(P),E=h.d=[],f=0;_[f]==(R[f]||0);f++);if(_[f]>(R[f]||0)&&c--,i==null?(b=i=B.precision,o=B.rounding):u?b=i+(n.e-a.e)+1:b=i,b<0)E.push(1),m=!0;else{if(b=b/v+2|0,f=0,C==1){for(p=0,_=_[0],b++;(f<S||p)&&b--;f++)A=p*s+(R[f]||0),E[f]=A/_|0,p=A%_|0;m=p||f<S}else{for(p=s/(_[0]+1)|0,p>1&&(_=e(_,p,s),R=e(R,p,s),C=_.length,S=R.length),D=C,g=R.slice(0,C),w=g.length;w<C;)g[w++]=0;M=_.slice(),M.unshift(0),N=_[0],_[1]>=s/2&&++N;do p=0,l=r(_,g,C,w),l<0?(x=g[0],C!=w&&(x=x*s+(g[1]||0)),p=x/N|0,p>1?(p>=s&&(p=s-1),d=e(_,p,s),y=d.length,w=g.length,l=r(d,g,y,w),l==1&&(p--,t(d,C<y?M:_,y,s))):(p==0&&(l=p=1),d=_.slice()),y=d.length,y<w&&d.unshift(0),t(g,d,w,s),l==-1&&(w=g.length,l=r(_,g,C,w),l<1&&(p++,t(g,C<w?M:_,w,s))),w=g.length):l===0&&(p++,g=[0]),E[f++]=p,l&&g[0]?g[w++]=R[D]||0:(g=[R[D]],w=1);while((D++<S||g[0]!==void 0)&&b--);m=g[0]!==void 0}E[0]||E.shift()}if(v==1)h.e=c,E2=m;else{for(f=1,p=E[0];p>=10;p/=10)f++;h.e=f+c*v-1,qe(h,u?i+h.e+1:i,o,m)}return h}}();function qe(e,r,t,n){var a,i,o,u,s,l,c,f,p,v=e.constructor;e:if(r!=null){if(f=e.d,!f)return e;for(a=1,u=f[0];u>=10;u/=10)a++;if(i=r-a,i<0)i+=Ue,o=r,c=f[p=0],s=c/qr(10,a-o-1)%10|0;else if(p=Math.ceil((i+1)/Ue),u=f.length,p>=u)if(n){for(;u++<=p;)f.push(0);c=s=0,a=1,i%=Ue,o=i-Ue+1}else break e;else{for(c=u=f[p],a=1;u>=10;u/=10)a++;i%=Ue,o=i-Ue+a,s=o<0?0:c/qr(10,a-o-1)%10|0}if(n=n||r<0||f[p+1]!==void 0||(o<0?c:c%qr(10,a-o-1)),l=t<4?(s||n)&&(t==0||t==(e.s<0?3:2)):s>5||s==5&&(t==4||n||t==6&&(i>0?o>0?c/qr(10,a-o):0:f[p-1])%10&1||t==(e.s<0?8:7)),r<1||!f[0])return f.length=0,l?(r-=e.e+1,f[0]=qr(10,(Ue-r%Ue)%Ue),e.e=-r||0):f[0]=e.e=0,e;if(i==0?(f.length=p,u=1,p--):(f.length=p+1,u=qr(10,Ue-i),f[p]=o>0?(c/qr(10,a-o)%qr(10,o)|0)*u:0),l)for(;;)if(p==0){for(i=1,o=f[0];o>=10;o/=10)i++;for(o=f[0]+=u,u=1;o>=10;o/=10)u++;i!=u&&(e.e++,f[0]==jt&&(f[0]=1));break}else{if(f[p]+=u,f[p]!=jt)break;f[p--]=0,u=1}for(i=f.length;f[--i]===0;)f.pop()}return We&&(e.e>v.maxE?(e.d=null,e.e=NaN):e.e<v.minE&&(e.e=0,e.d=[0])),e}function tn(e,r,t){if(!e.isFinite())return O2(e);var n,a=e.e,i=Xr(e.d),o=i.length;return r?(t&&(n=t-o)>0?i=i.charAt(0)+"."+i.slice(1)+Mn(n):o>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(e.e<0?"e":"e+")+e.e):a<0?(i="0."+Mn(-a-1)+i,t&&(n=t-o)>0&&(i+=Mn(n))):a>=o?(i+=Mn(a+1-o),t&&(n=t-a-1)>0&&(i=i+"."+Mn(n))):((n=a+1)<o&&(i=i.slice(0,n)+"."+i.slice(n)),t&&(n=t-o)>0&&(a+1===o&&(i+="."),i+=Mn(n))),i}function bu(e,r){var t=e[0];for(r*=Ue;t>=10;t/=10)r++;return r}function Cs(e,r,t){if(r>yI)throw We=!0,t&&(e.precision=t),Error(S2);return qe(new e(Ds),r,1,!0)}function Ht(e,r,t){if(r>Xl)throw Error(S2);return qe(new e(Ns),r,t,!0)}function C2(e){var r=e.length-1,t=r*Ue+1;if(r=e[r],r){for(;r%10==0;r/=10)t--;for(r=e[0];r>=10;r/=10)t++}return t}function Mn(e){for(var r="";e--;)r+="0";return r}function M2(e,r,t,n){var a,i=new e(1),o=Math.ceil(n/Ue+4);for(We=!1;;){if(t%2&&(i=i.times(r),Td(i.d,o)&&(a=!0)),t=tt(t/2),t===0){t=i.d.length-1,a&&i.d[t]===0&&++i.d[t];break}r=r.times(r),Td(r.d,o)}return We=!0,i}function Md(e){return e.d[e.d.length-1]&1}function T2(e,r,t){for(var n,a=new e(r[0]),i=0;++i<r.length;)if(n=new e(r[i]),n.s)a[t](n)&&(a=n);else{a=n;break}return a}function Kl(e,r){var t,n,a,i,o,u,s,l=0,c=0,f=0,p=e.constructor,v=p.rounding,m=p.precision;if(!e.d||!e.d[0]||e.e>17)return new p(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(r==null?(We=!1,s=m):s=r,u=new p(.03125);e.e>-2;)e=e.times(u),f+=5;for(n=Math.log(qr(2,f))/Math.LN10*2+5|0,s+=n,t=i=o=new p(1),p.precision=s;;){if(i=qe(i.times(e),s,1),t=t.times(++c),u=o.plus(Mr(i,t,s,1)),Xr(u.d).slice(0,s)===Xr(o.d).slice(0,s)){for(a=f;a--;)o=qe(o.times(o),s,1);if(r==null)if(l<3&&Qi(o.d,s-n,v,l))p.precision=s+=10,t=i=u=new p(1),c=0,l++;else return qe(o,p.precision=m,v,We=!0);else return p.precision=m,o}o=u}}function _n(e,r){var t,n,a,i,o,u,s,l,c,f,p,v=1,m=10,d=e,y=d.d,h=d.constructor,E=h.rounding,g=h.precision;if(d.s<0||!y||!y[0]||!d.e&&y[0]==1&&y.length==1)return new h(y&&!y[0]?-1/0:d.s!=1?NaN:y?0:d);if(r==null?(We=!1,c=g):c=r,h.precision=c+=m,t=Xr(y),n=t.charAt(0),Math.abs(i=d.e)<15e14){for(;n<7&&n!=1||n==1&&t.charAt(1)>3;)d=d.times(e),t=Xr(d.d),n=t.charAt(0),v++;i=d.e,n>1?(d=new h("0."+t),i++):d=new h(n+"."+t.slice(1))}else return l=Cs(h,c+2,g).times(i+""),d=_n(new h(n+"."+t.slice(1)),c-m).plus(l),h.precision=g,r==null?qe(d,g,E,We=!0):d;for(f=d,s=o=d=Mr(d.minus(1),d.plus(1),c,1),p=qe(d.times(d),c,1),a=3;;){if(o=qe(o.times(p),c,1),l=s.plus(Mr(o,new h(a),c,1)),Xr(l.d).slice(0,c)===Xr(s.d).slice(0,c))if(s=s.times(2),i!==0&&(s=s.plus(Cs(h,c+2,g).times(i+""))),s=Mr(s,new h(v),c,1),r==null)if(Qi(s.d,c-m,E,u))h.precision=c+=m,l=o=d=Mr(f.minus(1),f.plus(1),c,1),p=qe(d.times(d),c,1),a=u=1;else return qe(s,h.precision=g,E,We=!0);else return h.precision=g,s;s=l,a+=2}}function O2(e){return String(e.s*e.s/0)}function Jl(e,r){var t,n,a;for((t=r.indexOf("."))>-1&&(r=r.replace(".","")),(n=r.search(/e/i))>0?(t<0&&(t=n),t+=+r.slice(n+1),r=r.substring(0,n)):t<0&&(t=r.length),n=0;r.charCodeAt(n)===48;n++);for(a=r.length;r.charCodeAt(a-1)===48;--a);if(r=r.slice(n,a),r){if(a-=n,e.e=t=t-n-1,e.d=[],n=(t+1)%Ue,t<0&&(n+=Ue),n<a){for(n&&e.d.push(+r.slice(0,n)),a-=Ue;n<a;)e.d.push(+r.slice(n,n+=Ue));r=r.slice(n),n=Ue-r.length}else n-=a;for(;n--;)r+="0";e.d.push(+r),We&&(e.e>e.constructor.maxE?(e.d=null,e.e=NaN):e.e<e.constructor.minE&&(e.e=0,e.d=[0]))}else e.e=0,e.d=[0];return e}function xI(e,r){var t,n,a,i,o,u,s,l,c;if(r.indexOf("_")>-1){if(r=r.replace(/(\d)_(?=\d)/g,"$1"),N2.test(r))return Jl(e,r)}else if(r==="Infinity"||r==="NaN")return+r||(e.s=NaN),e.e=NaN,e.d=null,e;if(mI.test(r))t=16,r=r.toLowerCase();else if(dI.test(r))t=2;else if(hI.test(r))t=8;else throw Error(Rn+r);for(i=r.search(/p/i),i>0?(s=+r.slice(i+1),r=r.substring(2,i)):r=r.slice(2),i=r.indexOf("."),o=i>=0,n=e.constructor,o&&(r=r.replace(".",""),u=r.length,i=u-i,a=M2(n,new n(t),i,i*2)),l=ns(r,t,jt),c=l.length-1,i=c;l[i]===0;--i)l.pop();return i<0?new n(e.s*0):(e.e=bu(l,c),e.d=l,We=!1,o&&(e=Mr(e,a,u*4)),s&&(e=e.times(Math.abs(s)<54?qr(2,s):Pn.pow(2,s))),We=!0,e)}function wI(e,r){var t,n=r.d.length;if(n<3)return r.isZero()?r:ei(e,2,r,r);t=1.4*Math.sqrt(n),t=t>16?16:t|0,r=r.times(1/xu(5,t)),r=ei(e,2,r,r);for(var a,i=new e(5),o=new e(16),u=new e(20);t--;)a=r.times(r),r=r.times(i.plus(a.times(o.times(a).minus(u))));return r}function ei(e,r,t,n,a){var i,o,u,s,l=e.precision,c=Math.ceil(l/Ue);for(We=!1,s=t.times(t),u=new e(n);;){if(o=Mr(u.times(s),new e(r++*r++),l,1),u=a?n.plus(o):n.minus(o),n=Mr(o.times(s),new e(r++*r++),l,1),o=u.plus(n),o.d[c]!==void 0){for(i=c;o.d[i]===u.d[i]&&i--;);if(i==-1)break}i=u,u=n,n=o,o=i}return We=!0,o.d.length=c+1,o}function xu(e,r){for(var t=e;--r;)t*=e;return t}function _2(e,r){var t,n=r.s<0,a=Ht(e,e.precision,1),i=a.times(.5);if(r=r.abs(),r.lte(i))return pn=n?4:1,r;if(t=r.divToInt(a),t.isZero())pn=n?3:2;else{if(r=r.minus(t.times(a)),r.lte(i))return pn=Md(t)?n?2:3:n?4:1,r;pn=Md(t)?n?1:4:n?3:2}return r.minus(a).abs()}function wf(e,r,t,n){var a,i,o,u,s,l,c,f,p,v=e.constructor,m=t!==void 0;if(m?(ht(t,1,In),n===void 0?n=v.rounding:ht(n,0,8)):(t=v.precision,n=v.rounding),!e.isFinite())c=O2(e);else{for(c=tn(e),o=c.indexOf("."),m?(a=2,r==16?t=t*4-3:r==8&&(t=t*3-2)):a=r,o>=0&&(c=c.replace(".",""),p=new v(1),p.e=c.length-o,p.d=ns(tn(p),10,a),p.e=p.d.length),f=ns(c,10,a),i=s=f.length;f[--s]==0;)f.pop();if(!f[0])c=m?"0p+0":"0";else{if(o<0?i--:(e=new v(e),e.d=f,e.e=i,e=Mr(e,p,t,n,0,a),f=e.d,i=e.e,l=E2),o=f[t],u=a/2,l=l||f[t+1]!==void 0,l=n<4?(o!==void 0||l)&&(n===0||n===(e.s<0?3:2)):o>u||o===u&&(n===4||l||n===6&&f[t-1]&1||n===(e.s<0?8:7)),f.length=t,l)for(;++f[--t]>a-1;)f[t]=0,t||(++i,f.unshift(1));for(s=f.length;!f[s-1];--s);for(o=0,c="";o<s;o++)c+=Zl.charAt(f[o]);if(m){if(s>1)if(r==16||r==8){for(o=r==16?4:3,--s;s%o;s++)c+="0";for(f=ns(c,a,r),s=f.length;!f[s-1];--s);for(o=1,c="1.";o<s;o++)c+=Zl.charAt(f[o])}else c=c.charAt(0)+"."+c.slice(1);c=c+(i<0?"p":"p+")+i}else if(i<0){for(;++i;)c="0"+c;c="0."+c}else if(++i>s)for(i-=s;i--;)c+="0";else i<s&&(c=c.slice(0,i)+"."+c.slice(i))}c=(r==16?"0x":r==2?"0b":r==8?"0o":"")+c}return e.s<0?"-"+c:c}function Td(e,r){if(e.length>r)return e.length=r,!0}function EI(e){return new this(e).abs()}function SI(e){return new this(e).acos()}function AI(e){return new this(e).acosh()}function DI(e,r){return new this(e).plus(r)}function NI(e){return new this(e).asin()}function CI(e){return new this(e).asinh()}function MI(e){return new this(e).atan()}function TI(e){return new this(e).atanh()}function OI(e,r){e=new this(e),r=new this(r);var t,n=this.precision,a=this.rounding,i=n+4;return!e.s||!r.s?t=new this(NaN):!e.d&&!r.d?(t=Ht(this,i,1).times(r.s>0?.25:.75),t.s=e.s):!r.d||e.isZero()?(t=r.s<0?Ht(this,n,a):new this(0),t.s=e.s):!e.d||r.isZero()?(t=Ht(this,i,1).times(.5),t.s=e.s):r.s<0?(this.precision=i,this.rounding=1,t=this.atan(Mr(e,r,i,1)),r=Ht(this,i,1),this.precision=n,this.rounding=a,t=e.s<0?t.minus(r):t.plus(r)):t=this.atan(Mr(e,r,i,1)),t}function _I(e){return new this(e).cbrt()}function $I(e){return qe(e=new this(e),e.e+1,2)}function FI(e,r,t){return new this(e).clamp(r,t)}function BI(e){if(!e||typeof e!="object")throw Error(yu+"Object expected");var r,t,n,a=e.defaults===!0,i=["precision",1,In,"rounding",0,8,"toExpNeg",-Va,0,"toExpPos",0,Va,"maxE",0,Va,"minE",-Va,0,"modulo",0,9];for(r=0;r<i.length;r+=3)if(t=i[r],a&&(this[t]=Yl[t]),(n=e[t])!==void 0)if(tt(n)===n&&n>=i[r+1]&&n<=i[r+2])this[t]=n;else throw Error(Rn+t+": "+n);if(t="crypto",a&&(this[t]=Yl[t]),(n=e[t])!==void 0)if(n===!0||n===!1||n===0||n===1)if(n)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[t]=!0;else throw Error(A2);else this[t]=!1;else throw Error(Rn+t+": "+n);return this}function RI(e){return new this(e).cos()}function PI(e){return new this(e).cosh()}function $2(e){var r,t,n;function a(i){var o,u,s,l=this;if(!(l instanceof a))return new a(i);if(l.constructor=a,Od(i)){l.s=i.s,We?!i.d||i.e>a.maxE?(l.e=NaN,l.d=null):i.e<a.minE?(l.e=0,l.d=[0]):(l.e=i.e,l.d=i.d.slice()):(l.e=i.e,l.d=i.d?i.d.slice():i.d);return}if(s=typeof i,s==="number"){if(i===0){l.s=1/i<0?-1:1,l.e=0,l.d=[0];return}if(i<0?(i=-i,l.s=-1):l.s=1,i===~~i&&i<1e7){for(o=0,u=i;u>=10;u/=10)o++;We?o>a.maxE?(l.e=NaN,l.d=null):o<a.minE?(l.e=0,l.d=[0]):(l.e=o,l.d=[i]):(l.e=o,l.d=[i]);return}else if(i*0!==0){i||(l.s=NaN),l.e=NaN,l.d=null;return}return Jl(l,i.toString())}else if(s!=="string")throw Error(Rn+i);return(u=i.charCodeAt(0))===45?(i=i.slice(1),l.s=-1):(u===43&&(i=i.slice(1)),l.s=1),N2.test(i)?Jl(l,i):xI(l,i)}if(a.prototype=we,a.ROUND_UP=0,a.ROUND_DOWN=1,a.ROUND_CEIL=2,a.ROUND_FLOOR=3,a.ROUND_HALF_UP=4,a.ROUND_HALF_DOWN=5,a.ROUND_HALF_EVEN=6,a.ROUND_HALF_CEIL=7,a.ROUND_HALF_FLOOR=8,a.EUCLID=9,a.config=a.set=BI,a.clone=$2,a.isDecimal=Od,a.abs=EI,a.acos=SI,a.acosh=AI,a.add=DI,a.asin=NI,a.asinh=CI,a.atan=MI,a.atanh=TI,a.atan2=OI,a.cbrt=_I,a.ceil=$I,a.clamp=FI,a.cos=RI,a.cosh=PI,a.div=zI,a.exp=II,a.floor=LI,a.hypot=qI,a.ln=kI,a.log=UI,a.log10=jI,a.log2=HI,a.max=VI,a.min=GI,a.mod=WI,a.mul=ZI,a.pow=YI,a.random=XI,a.round=KI,a.sign=JI,a.sin=QI,a.sinh=eL,a.sqrt=rL,a.sub=tL,a.sum=nL,a.tan=aL,a.tanh=iL,a.trunc=oL,e===void 0&&(e={}),e&&e.defaults!==!0)for(n=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],r=0;r<n.length;)e.hasOwnProperty(t=n[r++])||(e[t]=this[t]);return a.config(e),a}function zI(e,r){return new this(e).div(r)}function II(e){return new this(e).exp()}function LI(e){return qe(e=new this(e),e.e+1,3)}function qI(){var e,r,t=new this(0);for(We=!1,e=0;e<arguments.length;)if(r=new this(arguments[e++]),r.d)t.d&&(t=t.plus(r.times(r)));else{if(r.s)return We=!0,new this(1/0);t=r}return We=!0,t.sqrt()}function Od(e){return e instanceof Pn||e&&e.toStringTag===D2||!1}function kI(e){return new this(e).ln()}function UI(e,r){return new this(e).log(r)}function HI(e){return new this(e).log(2)}function jI(e){return new this(e).log(10)}function VI(){return T2(this,arguments,"lt")}function GI(){return T2(this,arguments,"gt")}function WI(e,r){return new this(e).mod(r)}function ZI(e,r){return new this(e).mul(r)}function YI(e,r){return new this(e).pow(r)}function XI(e){var r,t,n,a,i=0,o=new this(1),u=[];if(e===void 0?e=this.precision:ht(e,1,In),n=Math.ceil(e/Ue),this.crypto)if(crypto.getRandomValues)for(r=crypto.getRandomValues(new Uint32Array(n));i<n;)a=r[i],a>=429e7?r[i]=crypto.getRandomValues(new Uint32Array(1))[0]:u[i++]=a%1e7;else if(crypto.randomBytes){for(r=crypto.randomBytes(n*=4);i<n;)a=r[i]+(r[i+1]<<8)+(r[i+2]<<16)+((r[i+3]&127)<<24),a>=214e7?crypto.randomBytes(4).copy(r,i):(u.push(a%1e7),i+=4);i=n/4}else throw Error(A2);else for(;i<n;)u[i++]=Math.random()*1e7|0;for(n=u[--i],e%=Ue,n&&e&&(a=qr(10,Ue-e),u[i]=(n/a|0)*a);u[i]===0;i--)u.pop();if(i<0)t=0,u=[0];else{for(t=-1;u[0]===0;t-=Ue)u.shift();for(n=1,a=u[0];a>=10;a/=10)n++;n<Ue&&(t-=Ue-n)}return o.e=t,o.d=u,o}function KI(e){return qe(e=new this(e),e.e+1,this.rounding)}function JI(e){return e=new this(e),e.d?e.d[0]?e.s:0*e.s:e.s||NaN}function QI(e){return new this(e).sin()}function eL(e){return new this(e).sinh()}function rL(e){return new this(e).sqrt()}function tL(e,r){return new this(e).sub(r)}function nL(){var e=0,r=arguments,t=new this(r[e]);for(We=!1;t.s&&++e<r.length;)t=t.plus(r[e]);return We=!0,qe(t,this.precision,this.rounding)}function aL(e){return new this(e).tan()}function iL(e){return new this(e).tanh()}function oL(e){return qe(e=new this(e),e.e+1,1)}we[Symbol.for("nodejs.util.inspect.custom")]=we.toString;we[Symbol.toStringTag]="Decimal";var Pn=we.constructor=$2(Yl);Ds=new Pn(Ds);Ns=new Pn(Ns);var sL="BigNumber",uL=["?on","config"],lL=L(sL,uL,e=>{var{on:r,config:t}=e,n=Pn.clone({precision:t.precision,modulo:Pn.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(a){return new n(a.value)},r&&r("config",function(a,i){a.precision!==i.precision&&n.config({precision:a.precision})}),n},{isClass:!0}),F2={exports:{}};/**
|
|
84
|
+
* @license Complex.js v2.1.1 12/05/2020
|
|
85
|
+
*
|
|
86
|
+
* Copyright (c) 2020, Robert Eisele (robert@xarg.org)
|
|
87
|
+
* Dual licensed under the MIT or GPL Version 2 licenses.
|
|
88
|
+
**/(function(e,r){(function(t){var n=Math.cosh||function(f){return Math.abs(f)<1e-9?1-f:(Math.exp(f)+Math.exp(-f))*.5},a=Math.sinh||function(f){return Math.abs(f)<1e-9?f:(Math.exp(f)-Math.exp(-f))*.5},i=function(f){var p=Math.PI/4;if(-p>f||f>p)return Math.cos(f)-1;var v=f*f;return v*(v*(v*(v*(v*(v*(v*(v/20922789888e3-1/87178291200)+1/479001600)-1/3628800)+1/40320)-1/720)+1/24)-1/2)},o=function(f,p){var v=Math.abs(f),m=Math.abs(p);return v<3e3&&m<3e3?Math.sqrt(v*v+m*m):(v<m?(v=m,m=f/p):m=p/f,v*Math.sqrt(1+m*m))},u=function(){throw SyntaxError("Invalid Param")};function s(f,p){var v=Math.abs(f),m=Math.abs(p);return f===0?Math.log(m):p===0?Math.log(v):v<3e3&&m<3e3?Math.log(f*f+p*p)*.5:(f=f/2,p=p/2,.5*Math.log(f*f+p*p)+Math.LN2)}var l=function(f,p){var v={re:0,im:0};if(f==null)v.re=v.im=0;else if(p!==void 0)v.re=f,v.im=p;else switch(typeof f){case"object":if("im"in f&&"re"in f)v.re=f.re,v.im=f.im;else if("abs"in f&&"arg"in f){if(!Number.isFinite(f.abs)&&Number.isFinite(f.arg))return c.INFINITY;v.re=f.abs*Math.cos(f.arg),v.im=f.abs*Math.sin(f.arg)}else if("r"in f&&"phi"in f){if(!Number.isFinite(f.r)&&Number.isFinite(f.phi))return c.INFINITY;v.re=f.r*Math.cos(f.phi),v.im=f.r*Math.sin(f.phi)}else f.length===2?(v.re=f[0],v.im=f[1]):u();break;case"string":v.im=v.re=0;var m=f.match(/\d+\.?\d*e[+-]?\d+|\d+\.?\d*|\.\d+|./g),d=1,y=0;m===null&&u();for(var h=0;h<m.length;h++){var E=m[h];E===" "||E===" "||E===`
|
|
89
|
+
`||(E==="+"?d++:E==="-"?y++:E==="i"||E==="I"?(d+y===0&&u(),m[h+1]!==" "&&!isNaN(m[h+1])?(v.im+=parseFloat((y%2?"-":"")+m[h+1]),h++):v.im+=parseFloat((y%2?"-":"")+"1"),d=y=0):((d+y===0||isNaN(E))&&u(),m[h+1]==="i"||m[h+1]==="I"?(v.im+=parseFloat((y%2?"-":"")+E),h++):v.re+=parseFloat((y%2?"-":"")+E),d=y=0))}d+y>0&&u();break;case"number":v.im=0,v.re=f;break;default:u()}return isNaN(v.re)||isNaN(v.im),v};function c(f,p){if(!(this instanceof c))return new c(f,p);var v=l(f,p);this.re=v.re,this.im=v.im}c.prototype={re:0,im:0,sign:function(){var f=this.abs();return new c(this.re/f,this.im/f)},add:function(f,p){var v=new c(f,p);return this.isInfinite()&&v.isInfinite()?c.NAN:this.isInfinite()||v.isInfinite()?c.INFINITY:new c(this.re+v.re,this.im+v.im)},sub:function(f,p){var v=new c(f,p);return this.isInfinite()&&v.isInfinite()?c.NAN:this.isInfinite()||v.isInfinite()?c.INFINITY:new c(this.re-v.re,this.im-v.im)},mul:function(f,p){var v=new c(f,p);return this.isInfinite()&&v.isZero()||this.isZero()&&v.isInfinite()?c.NAN:this.isInfinite()||v.isInfinite()?c.INFINITY:v.im===0&&this.im===0?new c(this.re*v.re,0):new c(this.re*v.re-this.im*v.im,this.re*v.im+this.im*v.re)},div:function(f,p){var v=new c(f,p);if(this.isZero()&&v.isZero()||this.isInfinite()&&v.isInfinite())return c.NAN;if(this.isInfinite()||v.isZero())return c.INFINITY;if(this.isZero()||v.isInfinite())return c.ZERO;f=this.re,p=this.im;var m=v.re,d=v.im,y,h;return d===0?new c(f/m,p/m):Math.abs(m)<Math.abs(d)?(h=m/d,y=m*h+d,new c((f*h+p)/y,(p*h-f)/y)):(h=d/m,y=d*h+m,new c((f+p*h)/y,(p-f*h)/y))},pow:function(f,p){var v=new c(f,p);if(f=this.re,p=this.im,v.isZero())return c.ONE;if(v.im===0){if(p===0&&f>0)return new c(Math.pow(f,v.re),0);if(f===0)switch((v.re%4+4)%4){case 0:return new c(Math.pow(p,v.re),0);case 1:return new c(0,Math.pow(p,v.re));case 2:return new c(-Math.pow(p,v.re),0);case 3:return new c(0,-Math.pow(p,v.re))}}if(f===0&&p===0&&v.re>0&&v.im>=0)return c.ZERO;var m=Math.atan2(p,f),d=s(f,p);return f=Math.exp(v.re*d-v.im*m),p=v.im*d+v.re*m,new c(f*Math.cos(p),f*Math.sin(p))},sqrt:function(){var f=this.re,p=this.im,v=this.abs(),m,d;if(f>=0){if(p===0)return new c(Math.sqrt(f),0);m=.5*Math.sqrt(2*(v+f))}else m=Math.abs(p)/Math.sqrt(2*(v-f));return f<=0?d=.5*Math.sqrt(2*(v-f)):d=Math.abs(p)/Math.sqrt(2*(v+f)),new c(m,p<0?-d:d)},exp:function(){var f=Math.exp(this.re);return this.im,new c(f*Math.cos(this.im),f*Math.sin(this.im))},expm1:function(){var f=this.re,p=this.im;return new c(Math.expm1(f)*Math.cos(p)+i(p),Math.exp(f)*Math.sin(p))},log:function(){var f=this.re,p=this.im;return new c(s(f,p),Math.atan2(p,f))},abs:function(){return o(this.re,this.im)},arg:function(){return Math.atan2(this.im,this.re)},sin:function(){var f=this.re,p=this.im;return new c(Math.sin(f)*n(p),Math.cos(f)*a(p))},cos:function(){var f=this.re,p=this.im;return new c(Math.cos(f)*n(p),-Math.sin(f)*a(p))},tan:function(){var f=2*this.re,p=2*this.im,v=Math.cos(f)+n(p);return new c(Math.sin(f)/v,a(p)/v)},cot:function(){var f=2*this.re,p=2*this.im,v=Math.cos(f)-n(p);return new c(-Math.sin(f)/v,a(p)/v)},sec:function(){var f=this.re,p=this.im,v=.5*n(2*p)+.5*Math.cos(2*f);return new c(Math.cos(f)*n(p)/v,Math.sin(f)*a(p)/v)},csc:function(){var f=this.re,p=this.im,v=.5*n(2*p)-.5*Math.cos(2*f);return new c(Math.sin(f)*n(p)/v,-Math.cos(f)*a(p)/v)},asin:function(){var f=this.re,p=this.im,v=new c(p*p-f*f+1,-2*f*p).sqrt(),m=new c(v.re-p,v.im+f).log();return new c(m.im,-m.re)},acos:function(){var f=this.re,p=this.im,v=new c(p*p-f*f+1,-2*f*p).sqrt(),m=new c(v.re-p,v.im+f).log();return new c(Math.PI/2-m.im,m.re)},atan:function(){var f=this.re,p=this.im;if(f===0){if(p===1)return new c(0,1/0);if(p===-1)return new c(0,-1/0)}var v=f*f+(1-p)*(1-p),m=new c((1-p*p-f*f)/v,-2*f/v).log();return new c(-.5*m.im,.5*m.re)},acot:function(){var f=this.re,p=this.im;if(p===0)return new c(Math.atan2(1,f),0);var v=f*f+p*p;return v!==0?new c(f/v,-p/v).atan():new c(f!==0?f/0:0,p!==0?-p/0:0).atan()},asec:function(){var f=this.re,p=this.im;if(f===0&&p===0)return new c(0,1/0);var v=f*f+p*p;return v!==0?new c(f/v,-p/v).acos():new c(f!==0?f/0:0,p!==0?-p/0:0).acos()},acsc:function(){var f=this.re,p=this.im;if(f===0&&p===0)return new c(Math.PI/2,1/0);var v=f*f+p*p;return v!==0?new c(f/v,-p/v).asin():new c(f!==0?f/0:0,p!==0?-p/0:0).asin()},sinh:function(){var f=this.re,p=this.im;return new c(a(f)*Math.cos(p),n(f)*Math.sin(p))},cosh:function(){var f=this.re,p=this.im;return new c(n(f)*Math.cos(p),a(f)*Math.sin(p))},tanh:function(){var f=2*this.re,p=2*this.im,v=n(f)+Math.cos(p);return new c(a(f)/v,Math.sin(p)/v)},coth:function(){var f=2*this.re,p=2*this.im,v=n(f)-Math.cos(p);return new c(a(f)/v,-Math.sin(p)/v)},csch:function(){var f=this.re,p=this.im,v=Math.cos(2*p)-n(2*f);return new c(-2*a(f)*Math.cos(p)/v,2*n(f)*Math.sin(p)/v)},sech:function(){var f=this.re,p=this.im,v=Math.cos(2*p)+n(2*f);return new c(2*n(f)*Math.cos(p)/v,-2*a(f)*Math.sin(p)/v)},asinh:function(){var f=this.im;this.im=-this.re,this.re=f;var p=this.asin();return this.re=-this.im,this.im=f,f=p.re,p.re=-p.im,p.im=f,p},acosh:function(){var f=this.acos();if(f.im<=0){var p=f.re;f.re=-f.im,f.im=p}else{var p=f.im;f.im=-f.re,f.re=p}return f},atanh:function(){var f=this.re,p=this.im,v=f>1&&p===0,m=1-f,d=1+f,y=m*m+p*p,h=y!==0?new c((d*m-p*p)/y,(p*m+d*p)/y):new c(f!==-1?f/0:0,p!==0?p/0:0),E=h.re;return h.re=s(h.re,h.im)/2,h.im=Math.atan2(h.im,E)/2,v&&(h.im=-h.im),h},acoth:function(){var f=this.re,p=this.im;if(f===0&&p===0)return new c(0,Math.PI/2);var v=f*f+p*p;return v!==0?new c(f/v,-p/v).atanh():new c(f!==0?f/0:0,p!==0?-p/0:0).atanh()},acsch:function(){var f=this.re,p=this.im;if(p===0)return new c(f!==0?Math.log(f+Math.sqrt(f*f+1)):1/0,0);var v=f*f+p*p;return v!==0?new c(f/v,-p/v).asinh():new c(f!==0?f/0:0,p!==0?-p/0:0).asinh()},asech:function(){var f=this.re,p=this.im;if(this.isZero())return c.INFINITY;var v=f*f+p*p;return v!==0?new c(f/v,-p/v).acosh():new c(f!==0?f/0:0,p!==0?-p/0:0).acosh()},inverse:function(){if(this.isZero())return c.INFINITY;if(this.isInfinite())return c.ZERO;var f=this.re,p=this.im,v=f*f+p*p;return new c(f/v,-p/v)},conjugate:function(){return new c(this.re,-this.im)},neg:function(){return new c(-this.re,-this.im)},ceil:function(f){return f=Math.pow(10,f||0),new c(Math.ceil(this.re*f)/f,Math.ceil(this.im*f)/f)},floor:function(f){return f=Math.pow(10,f||0),new c(Math.floor(this.re*f)/f,Math.floor(this.im*f)/f)},round:function(f){return f=Math.pow(10,f||0),new c(Math.round(this.re*f)/f,Math.round(this.im*f)/f)},equals:function(f,p){var v=new c(f,p);return Math.abs(v.re-this.re)<=c.EPSILON&&Math.abs(v.im-this.im)<=c.EPSILON},clone:function(){return new c(this.re,this.im)},toString:function(){var f=this.re,p=this.im,v="";return this.isNaN()?"NaN":this.isInfinite()?"Infinity":(Math.abs(f)<c.EPSILON&&(f=0),Math.abs(p)<c.EPSILON&&(p=0),p===0?v+f:(f!==0?(v+=f,v+=" ",p<0?(p=-p,v+="-"):v+="+",v+=" "):p<0&&(p=-p,v+="-"),p!==1&&(v+=p),v+"i"))},toVector:function(){return[this.re,this.im]},valueOf:function(){return this.im===0?this.re:null},isNaN:function(){return isNaN(this.re)||isNaN(this.im)},isZero:function(){return this.im===0&&this.re===0},isFinite:function(){return isFinite(this.re)&&isFinite(this.im)},isInfinite:function(){return!(this.isNaN()||this.isFinite())}},c.ZERO=new c(0,0),c.ONE=new c(1,0),c.I=new c(0,1),c.PI=new c(Math.PI,0),c.E=new c(Math.E,0),c.INFINITY=new c(1/0,1/0),c.NAN=new c(NaN,NaN),c.EPSILON=1e-15,Object.defineProperty(c,"__esModule",{value:!0}),c.default=c,c.Complex=c,e.exports=c})()})(F2);var cL=F2.exports;const Yr=ye.getDefaultExportFromCjs(cL);var fL="Complex",pL=[],vL=L(fL,pL,()=>(Object.defineProperty(Yr,"name",{value:"Complex"}),Yr.prototype.constructor=Yr,Yr.prototype.type="Complex",Yr.prototype.isComplex=!0,Yr.prototype.toJSON=function(){return{mathjs:"Complex",re:this.re,im:this.im}},Yr.prototype.toPolar=function(){return{r:this.abs(),phi:this.arg()}},Yr.prototype.format=function(e){var r="",t=this.im,n=this.re,a=Yn(this.re,e),i=Yn(this.im,e),o=Ke(e)?e:e?e.precision:null;if(o!==null){var u=Math.pow(10,-o);Math.abs(n/t)<u&&(n=0),Math.abs(t/n)<u&&(t=0)}return t===0?r=a:n===0?t===1?r="i":t===-1?r="-i":r=i+"i":t<0?t===-1?r=a+" - i":r=a+" - "+i.substring(1)+"i":t===1?r=a+" + i":r=a+" + "+i+"i",r},Yr.fromPolar=function(e){switch(arguments.length){case 1:{var r=arguments[0];if(typeof r=="object")return Yr(r);throw new TypeError("Input has to be an object with r and phi keys.")}case 2:{var t=arguments[0],n=arguments[1];if(Ke(t)){if(Tt(n)&&n.hasBase("ANGLE")&&(n=n.toNumber("rad")),Ke(n))return new Yr({r:t,phi:n});throw new TypeError("Phi is not a number nor an angle unit.")}else throw new TypeError("Radius r is not a number.")}default:throw new SyntaxError("Wrong number of arguments in function fromPolar")}},Yr.prototype.valueOf=Yr.prototype.toString,Yr.fromJSON=function(e){return new Yr(e)},Yr.compare=function(e,r){return e.re>r.re?1:e.re<r.re?-1:e.im>r.im?1:e.im<r.im?-1:0},Yr),{isClass:!0}),B2={exports:{}};/**
|
|
90
|
+
* @license Fraction.js v4.3.0 20/08/2023
|
|
91
|
+
* https://www.xarg.org/2014/03/rational-numbers-in-javascript/
|
|
92
|
+
*
|
|
93
|
+
* Copyright (c) 2023, Robert Eisele (robert@raw.org)
|
|
94
|
+
* Dual licensed under the MIT or GPL Version 2 licenses.
|
|
95
|
+
**/(function(e,r){(function(t){var n=2e3,a={s:1,n:0,d:1};function i(h,E){if(isNaN(h=parseInt(h,10)))throw d();return h*E}function o(h,E){if(E===0)throw m();var g=Object.create(v.prototype);g.s=h<0?-1:1,h=h<0?-h:h;var w=p(h,E);return g.n=h/w,g.d=E/w,g}function u(h){for(var E={},g=h,w=2,x=4;x<=g;){for(;g%w===0;)g/=w,E[w]=(E[w]||0)+1;x+=1+2*w++}return g!==h?g>1&&(E[g]=(E[g]||0)+1):E[h]=(E[h]||0)+1,E}var s=function(h,E){var g=0,w=1,x=1,b=0,A=0,D=0,S=1,N=1,C=0,M=1,B=1,P=1,R=1e7,_;if(h!=null)if(E!==void 0){if(g=h,w=E,x=g*w,g%1!==0||w%1!==0)throw y()}else switch(typeof h){case"object":{if("d"in h&&"n"in h)g=h.n,w=h.d,"s"in h&&(g*=h.s);else if(0 in h)g=h[0],1 in h&&(w=h[1]);else throw d();x=g*w;break}case"number":{if(h<0&&(x=h,h=-h),h%1===0)g=h;else if(h>0){for(h>=1&&(N=Math.pow(10,Math.floor(1+Math.log(h)/Math.LN10)),h/=N);M<=R&&P<=R;)if(_=(C+B)/(M+P),h===_){M+P<=R?(g=C+B,w=M+P):P>M?(g=B,w=P):(g=C,w=M);break}else h>_?(C+=B,M+=P):(B+=C,P+=M),M>R?(g=B,w=P):(g=C,w=M);g*=N}else(isNaN(h)||isNaN(E))&&(w=g=NaN);break}case"string":{if(M=h.match(/\d+|./g),M===null)throw d();if(M[C]==="-"?(x=-1,C++):M[C]==="+"&&C++,M.length===C+1?A=i(M[C++],x):M[C+1]==="."||M[C]==="."?(M[C]!=="."&&(b=i(M[C++],x)),C++,(C+1===M.length||M[C+1]==="("&&M[C+3]===")"||M[C+1]==="'"&&M[C+3]==="'")&&(A=i(M[C],x),S=Math.pow(10,M[C].length),C++),(M[C]==="("&&M[C+2]===")"||M[C]==="'"&&M[C+2]==="'")&&(D=i(M[C+1],x),N=Math.pow(10,M[C+1].length)-1,C+=3)):M[C+1]==="/"||M[C+1]===":"?(A=i(M[C],x),S=i(M[C+2],1),C+=3):M[C+3]==="/"&&M[C+1]===" "&&(b=i(M[C],x),A=i(M[C+2],x),S=i(M[C+4],1),C+=5),M.length<=C){w=S*N,x=g=D+w*b+N*A;break}}default:throw d()}if(w===0)throw m();a.s=x<0?-1:1,a.n=Math.abs(g),a.d=Math.abs(w)};function l(h,E,g){for(var w=1;E>0;h=h*h%g,E>>=1)E&1&&(w=w*h%g);return w}function c(h,E){for(;E%2===0;E/=2);for(;E%5===0;E/=5);if(E===1)return 0;for(var g=10%E,w=1;g!==1;w++)if(g=g*10%E,w>n)return 0;return w}function f(h,E,g){for(var w=1,x=l(10,g,E),b=0;b<300;b++){if(w===x)return b;w=w*10%E,x=x*10%E}return 0}function p(h,E){if(!h)return E;if(!E)return h;for(;;){if(h%=E,!h)return E;if(E%=h,!E)return h}}function v(h,E){if(s(h,E),this instanceof v)h=p(a.d,a.n),this.s=a.s,this.n=a.n/h,this.d=a.d/h;else return o(a.s*a.n,a.d)}var m=function(){return new Error("Division by Zero")},d=function(){return new Error("Invalid argument")},y=function(){return new Error("Parameters must be integer")};v.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(h,E){return s(h,E),o(this.s*this.n*a.d+a.s*this.d*a.n,this.d*a.d)},sub:function(h,E){return s(h,E),o(this.s*this.n*a.d-a.s*this.d*a.n,this.d*a.d)},mul:function(h,E){return s(h,E),o(this.s*a.s*this.n*a.n,this.d*a.d)},div:function(h,E){return s(h,E),o(this.s*a.s*this.n*a.d,this.d*a.n)},clone:function(){return o(this.s*this.n,this.d)},mod:function(h,E){if(isNaN(this.n)||isNaN(this.d))return new v(NaN);if(h===void 0)return o(this.s*this.n%this.d,1);if(s(h,E),a.n===0&&this.d===0)throw m();return o(this.s*(a.d*this.n)%(a.n*this.d),a.d*this.d)},gcd:function(h,E){return s(h,E),o(p(a.n,this.n)*p(a.d,this.d),a.d*this.d)},lcm:function(h,E){return s(h,E),a.n===0&&this.n===0?o(0,1):o(a.n*this.n,p(a.n,this.n)*p(a.d,this.d))},ceil:function(h){return h=Math.pow(10,h||0),isNaN(this.n)||isNaN(this.d)?new v(NaN):o(Math.ceil(h*this.s*this.n/this.d),h)},floor:function(h){return h=Math.pow(10,h||0),isNaN(this.n)||isNaN(this.d)?new v(NaN):o(Math.floor(h*this.s*this.n/this.d),h)},round:function(h){return h=Math.pow(10,h||0),isNaN(this.n)||isNaN(this.d)?new v(NaN):o(Math.round(h*this.s*this.n/this.d),h)},inverse:function(){return o(this.s*this.d,this.n)},pow:function(h,E){if(s(h,E),a.d===1)return a.s<0?o(Math.pow(this.s*this.d,a.n),Math.pow(this.n,a.n)):o(Math.pow(this.s*this.n,a.n),Math.pow(this.d,a.n));if(this.s<0)return null;var g=u(this.n),w=u(this.d),x=1,b=1;for(var A in g)if(A!=="1"){if(A==="0"){x=0;break}if(g[A]*=a.n,g[A]%a.d===0)g[A]/=a.d;else return null;x*=Math.pow(A,g[A])}for(var A in w)if(A!=="1"){if(w[A]*=a.n,w[A]%a.d===0)w[A]/=a.d;else return null;b*=Math.pow(A,w[A])}return a.s<0?o(b,x):o(x,b)},equals:function(h,E){return s(h,E),this.s*this.n*a.d===a.s*a.n*this.d},compare:function(h,E){s(h,E);var g=this.s*this.n*a.d-a.s*a.n*this.d;return(0<g)-(g<0)},simplify:function(h){if(isNaN(this.n)||isNaN(this.d))return this;h=h||.001;for(var E=this.abs(),g=E.toContinued(),w=1;w<g.length;w++){for(var x=o(g[w-1],1),b=w-2;b>=0;b--)x=x.inverse().add(g[b]);if(Math.abs(x.sub(E).valueOf())<h)return x.mul(this.s)}return this},divisible:function(h,E){return s(h,E),!(!(a.n*this.d)||this.n*a.d%(a.n*this.d))},valueOf:function(){return this.s*this.n/this.d},toFraction:function(h){var E,g="",w=this.n,x=this.d;return this.s<0&&(g+="-"),x===1?g+=w:(h&&(E=Math.floor(w/x))>0&&(g+=E,g+=" ",w%=x),g+=w,g+="/",g+=x),g},toLatex:function(h){var E,g="",w=this.n,x=this.d;return this.s<0&&(g+="-"),x===1?g+=w:(h&&(E=Math.floor(w/x))>0&&(g+=E,w%=x),g+="\\frac{",g+=w,g+="}{",g+=x,g+="}"),g},toContinued:function(){var h,E=this.n,g=this.d,w=[];if(isNaN(E)||isNaN(g))return w;do w.push(Math.floor(E/g)),h=E%g,E=g,g=h;while(E!==1);return w},toString:function(h){var E=this.n,g=this.d;if(isNaN(E)||isNaN(g))return"NaN";h=h||15;var w=c(E,g),x=f(E,g,w),b=this.s<0?"-":"";if(b+=E/g|0,E%=g,E*=10,E&&(b+="."),w){for(var A=x;A--;)b+=E/g|0,E%=g,E*=10;b+="(";for(var A=w;A--;)b+=E/g|0,E%=g,E*=10;b+=")"}else for(var A=h;E&&A--;)b+=E/g|0,E%=g,E*=10;return b}},Object.defineProperty(v,"__esModule",{value:!0}),v.default=v,v.Fraction=v,e.exports=v})()})(B2);var dL=B2.exports;const cn=ye.getDefaultExportFromCjs(dL);var mL="Fraction",hL=[],gL=L(mL,hL,()=>(Object.defineProperty(cn,"name",{value:"Fraction"}),cn.prototype.constructor=cn,cn.prototype.type="Fraction",cn.prototype.isFraction=!0,cn.prototype.toJSON=function(){return{mathjs:"Fraction",n:this.s*this.n,d:this.d}},cn.fromJSON=function(e){return new cn(e)},cn),{isClass:!0}),yL="Range",bL=[],xL=L(yL,bL,()=>{function e(r,t,n){if(!(this instanceof e))throw new SyntaxError("Constructor must be called with the new operator");var a=r!=null,i=t!=null,o=n!=null;if(a){if(Je(r))r=r.toNumber();else if(typeof r!="number")throw new TypeError("Parameter start must be a number")}if(i){if(Je(t))t=t.toNumber();else if(typeof t!="number")throw new TypeError("Parameter end must be a number")}if(o){if(Je(n))n=n.toNumber();else if(typeof n!="number")throw new TypeError("Parameter step must be a number")}this.start=a?parseFloat(r):0,this.end=i?parseFloat(t):0,this.step=o?parseFloat(n):1}return e.prototype.type="Range",e.prototype.isRange=!0,e.parse=function(r){if(typeof r!="string")return null;var t=r.split(":"),n=t.map(function(i){return parseFloat(i)}),a=n.some(function(i){return isNaN(i)});if(a)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 r=0,t=this.start,n=this.step,a=this.end,i=a-t;return On(n)===On(i)?r=Math.ceil(i/n):i===0&&(r=0),isNaN(r)&&(r=0),[r]},e.prototype.min=function(){var r=this.size()[0];if(r>0)return this.step>0?this.start:this.start+(r-1)*this.step},e.prototype.max=function(){var r=this.size()[0];if(r>0)return this.step>0?this.start+(r-1)*this.step:this.start},e.prototype.forEach=function(r){var t=this.start,n=this.step,a=this.end,i=0;if(n>0)for(;t<a;)r(t,[i],this),t+=n,i++;else if(n<0)for(;t>a;)r(t,[i],this),t+=n,i++},e.prototype.map=function(r){var t=[];return this.forEach(function(n,a,i){t[a[0]]=r(n,a,i)}),t},e.prototype.toArray=function(){var r=[];return this.forEach(function(t,n){r[n[0]]=t}),r},e.prototype.valueOf=function(){return this.toArray()},e.prototype.format=function(r){var t=Yn(this.start,r);return this.step!==1&&(t+=":"+Yn(this.step,r)),t+=":"+Yn(this.end,r),t},e.prototype.toString=function(){return this.format()},e.prototype.toJSON=function(){return{mathjs:"Range",start:this.start,end:this.end,step:this.step}},e.fromJSON=function(r){return new e(r.start,r.end,r.step)},e},{isClass:!0}),wL="Matrix",EL=[],SL=L(wL,EL,()=>{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(r,t){throw new Error("Cannot invoke create on a Matrix interface")},e.prototype.subset=function(r,t,n){throw new Error("Cannot invoke subset on a Matrix interface")},e.prototype.get=function(r){throw new Error("Cannot invoke get on a Matrix interface")},e.prototype.set=function(r,t,n){throw new Error("Cannot invoke set on a Matrix interface")},e.prototype.resize=function(r,t){throw new Error("Cannot invoke resize on a Matrix interface")},e.prototype.reshape=function(r,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(r,t){throw new Error("Cannot invoke map on a Matrix interface")},e.prototype.forEach=function(r){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(r){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});function AL(e){var r=0,t=1,n=Object.create(null),a=Object.create(null),i=0,o=function(s){var l=a[s];if(l&&(delete n[l],delete a[s],--r,t===l)){if(!r){i=0,t=1;return}for(;!Object.prototype.hasOwnProperty.call(n,++t););}};return e=Math.abs(e),{hit:function(s){var l=a[s],c=++i;if(n[c]=s,a[s]=c,!l)return++r,r<=e?void 0:(s=n[t],o(s),s);if(delete n[l],t===l)for(;!Object.prototype.hasOwnProperty.call(n,++t););},delete:o,clear:function(){r=i=0,t=1,n=Object.create(null),a=Object.create(null)}}}function yo(e){var{hasher:r,limit:t}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t=t??Number.POSITIVE_INFINITY,r=r??JSON.stringify,function n(){typeof n.cache!="object"&&(n.cache={values:new Map,lru:AL(t||Number.POSITIVE_INFINITY)});for(var a=[],i=0;i<arguments.length;i++)a[i]=arguments[i];var o=r(a);if(n.cache.values.has(o))return n.cache.lru.hit(o),n.cache.values.get(o);var u=e.apply(e,a);return n.cache.values.set(o,u),n.cache.values.delete(n.cache.lru.hit(o)),u}}function R2(e){return Object.keys(e.signatures||{}).reduce(function(r,t){var n=(t.match(/,/g)||[]).length+1;return Math.max(r,n)},-1)}var DL="DenseMatrix",NL=["Matrix"],CL=L(DL,NL,e=>{var{Matrix:r}=e;function t(c,f){if(!(this instanceof t))throw new SyntaxError("Constructor must be called with the new operator");if(f&&!et(f))throw new Error("Invalid datatype: "+f);if(ke(c))c.type==="DenseMatrix"?(this._data=Ge(c._data),this._size=Ge(c._size),this._datatype=f||c._datatype):(this._data=c.toArray(),this._size=c.size(),this._datatype=f||c._datatype);else if(c&&mr(c.data)&&mr(c.size))this._data=c.data,this._size=c.size,Dd(this._data,this._size),this._datatype=f||c.datatype;else if(mr(c))this._data=l(c),this._size=Xe(this._data),Dd(this._data,this._size),this._datatype=f;else{if(c)throw new TypeError("Unsupported type of data ("+Dr(c)+")");this._data=[],this._size=[0],this._datatype=f}}t.prototype=new r,t.prototype.createDenseMatrix=function(c,f){return new t(c,f)},Object.defineProperty(t,"name",{value:"DenseMatrix"}),t.prototype.constructor=t,t.prototype.type="DenseMatrix",t.prototype.isDenseMatrix=!0,t.prototype.getDataType=function(){return Ki(this._data,Dr)},t.prototype.storage=function(){return"dense"},t.prototype.datatype=function(){return this._datatype},t.prototype.create=function(c,f){return new t(c,f)},t.prototype.subset=function(c,f,p){switch(arguments.length){case 1:return n(this,c);case 2:case 3:return i(this,c,f,p);default:throw new SyntaxError("Wrong number of arguments")}},t.prototype.get=function(c){if(!mr(c))throw new TypeError("Array expected");if(c.length!==this._size.length)throw new rr(c.length,this._size.length);for(var f=0;f<c.length;f++)Sr(c[f],this._size[f]);for(var p=this._data,v=0,m=c.length;v<m;v++){var d=c[v];Sr(d,p.length),p=p[d]}return p},t.prototype.set=function(c,f,p){if(!mr(c))throw new TypeError("Array expected");if(c.length<this._size.length)throw new rr(c.length,this._size.length,"<");var v,m,d,y=c.map(function(E){return E+1});s(this,y,p);var h=this._data;for(v=0,m=c.length-1;v<m;v++)d=c[v],Sr(d,h.length),h=h[d];return d=c[c.length-1],Sr(d,h.length),h[d]=f,this};function n(c,f){if(!pu(f))throw new TypeError("Invalid index");var p=f.isScalar();if(p)return c.get(f.min());var v=f.size();if(v.length!==c._size.length)throw new rr(v.length,c._size.length);for(var m=f.min(),d=f.max(),y=0,h=c._size.length;y<h;y++)Sr(m[y],c._size[y]),Sr(d[y],c._size[y]);return new t(a(c._data,f,v.length,0),c._datatype)}function a(c,f,p,v){var m=v===p-1,d=f.dimension(v);return m?d.map(function(y){return Sr(y,c.length),c[y]}).valueOf():d.map(function(y){Sr(y,c.length);var h=c[y];return a(h,f,p,v+1)}).valueOf()}function i(c,f,p,v){if(!f||f.isIndex!==!0)throw new TypeError("Invalid index");var m=f.size(),d=f.isScalar(),y;if(ke(p)?(y=p.size(),p=p.valueOf()):y=Xe(p),d){if(y.length!==0)throw new TypeError("Scalar expected");c.set(f.min(),p,v)}else{if(!Qn(y,m))try{y.length===0?p=Cd([p],m):p=Cd(p,m),y=Xe(p)}catch{}if(m.length<c._size.length)throw new rr(m.length,c._size.length,"<");if(y.length<m.length){for(var h=0,E=0;m[h]===1&&y[h]===1;)h++;for(;m[h]===1;)E++,h++;p=f2(p,m.length,E,y)}if(!Qn(m,y))throw new rr(m,y,">");var g=f.max().map(function(b){return b+1});s(c,g,v);var w=m.length,x=0;o(c._data,f,p,w,x)}return c}function o(c,f,p,v,m){var d=m===v-1,y=f.dimension(m);d?y.forEach(function(h,E){Sr(h),c[h]=p[E[0]]}):y.forEach(function(h,E){Sr(h),o(c[h],f,p[E[0]],v,m+1)})}t.prototype.resize=function(c,f,p){if(!Bt(c))throw new TypeError("Array or Matrix expected");var v=c.valueOf().map(d=>Array.isArray(d)&&d.length===1?d[0]:d),m=p?this.clone():this;return u(m,v,f)};function u(c,f,p){if(f.length===0){for(var v=c._data;mr(v);)v=v[0];return v}return c._size=f.slice(0),c._data=Ka(c._data,c._size,p),c}t.prototype.reshape=function(c,f){var p=f?this.clone():this;p._data=yf(p._data,c);var v=p._size.reduce((m,d)=>m*d);return p._size=bf(c,v),p};function s(c,f,p){for(var v=c._size.slice(0),m=!1;v.length<f.length;)v.push(0),m=!0;for(var d=0,y=f.length;d<y;d++)f[d]>v[d]&&(v[d]=f[d],m=!0);m&&u(c,v,p)}t.prototype.clone=function(){var c=new t({data:Ge(this._data),size:Ge(this._size),datatype:this._datatype});return c},t.prototype.size=function(){return this._size.slice(0)},t.prototype.map=function(c){var f=this,p=R2(c),v=function y(h,E){return mr(h)?h.map(function(g,w){return y(g,E.concat(w))}):p===1?c(h):p===2?c(h,E):c(h,E,f)},m=v(this._data,[]),d=this._datatype!==void 0?Ki(m,Dr):void 0;return new t(m,d)},t.prototype.forEach=function(c){var f=this,p=function v(m,d){mr(m)?m.forEach(function(y,h){v(y,d.concat(h))}):c(m,d,f)};p(this._data,[])},t.prototype[Symbol.iterator]=function*(){var c=function*f(p,v){if(mr(p))for(var m=0;m<p.length;m++)yield*f(p[m],v.concat(m));else yield{value:p,index:v}};yield*c(this._data,[])},t.prototype.rows=function(){var c=[],f=this.size();if(f.length!==2)throw new TypeError("Rows can only be returned for a 2D matrix.");var p=this._data;for(var v of p)c.push(new t([v],this._datatype));return c},t.prototype.columns=function(){var c=this,f=[],p=this.size();if(p.length!==2)throw new TypeError("Rows can only be returned for a 2D matrix.");for(var v=this._data,m=function(h){var E=v.map(g=>[g[h]]);f.push(new t(E,c._datatype))},d=0;d<p[1];d++)m(d);return f},t.prototype.toArray=function(){return Ge(this._data)},t.prototype.valueOf=function(){return this._data},t.prototype.format=function(c){return er(this._data,c)},t.prototype.toString=function(){return er(this._data)},t.prototype.toJSON=function(){return{mathjs:"DenseMatrix",data:this._data,size:this._size,datatype:this._datatype}},t.prototype.diagonal=function(c){if(c){if(Je(c)&&(c=c.toNumber()),!Ke(c)||!Pe(c))throw new TypeError("The parameter k must be an integer number")}else c=0;for(var f=c>0?c:0,p=c<0?-c:0,v=this._size[0],m=this._size[1],d=Math.min(v-p,m-f),y=[],h=0;h<d;h++)y[h]=this._data[h+p][h+f];return new t({data:y,size:[d],datatype:this._datatype})},t.diagonal=function(c,f,p,v){if(!mr(c))throw new TypeError("Array expected, size parameter");if(c.length!==2)throw new Error("Only two dimensions matrix are supported");if(c=c.map(function(A){if(Je(A)&&(A=A.toNumber()),!Ke(A)||!Pe(A)||A<1)throw new Error("Size values must be positive integers");return A}),p){if(Je(p)&&(p=p.toNumber()),!Ke(p)||!Pe(p))throw new TypeError("The parameter k must be an integer number")}else p=0;var m=p>0?p:0,d=p<0?-p:0,y=c[0],h=c[1],E=Math.min(y-d,h-m),g;if(mr(f)){if(f.length!==E)throw new Error("Invalid value array length");g=function(D){return f[D]}}else if(ke(f)){var w=f.size();if(w.length!==1||w[0]!==E)throw new Error("Invalid matrix length");g=function(D){return f.get([D])}}else g=function(){return f};v||(v=Je(g(0))?g(0).mul(0):0);var x=[];if(c.length>0){x=Ka(x,c,v);for(var b=0;b<E;b++)x[b+d][b+m]=g(b)}return new t({data:x,size:[y,h]})},t.fromJSON=function(c){return new t(c)},t.prototype.swapRows=function(c,f){if(!Ke(c)||!Pe(c)||!Ke(f)||!Pe(f))throw new Error("Row index must be positive integers");if(this._size.length!==2)throw new Error("Only two dimensional matrix is supported");return Sr(c,this._size[0]),Sr(f,this._size[0]),t._swapRows(c,f,this._data),this},t._swapRows=function(c,f,p){var v=p[c];p[c]=p[f],p[f]=v};function l(c){return ke(c)?l(c.valueOf()):mr(c)?c.map(l):c}return t},{isClass:!0}),_d="clone",ML=["typed"],TL=L(_d,ML,e=>{var{typed:r}=e;return r(_d,{any:Ge})});function P2(e){var r=e.length,t=e[0].length,n,a,i=[];for(a=0;a<t;a++){var o=[];for(n=0;n<r;n++)o.push(e[n][a]);i.push(o)}return i}function yi(e){for(var r=0;r<e.length;r++)if(Bt(e[r]))return!0;return!1}function yn(e,r){ke(e)&&(e=e.valueOf());for(var t=0,n=e.length;t<n;t++){var a=e[t];Array.isArray(a)?yn(a,r):r(a)}}function tr(e,r,t){return e&&typeof e.map=="function"?e.map(function(n){return tr(n,r)}):r(e)}function wu(e,r,t){var n=Array.isArray(e)?Xe(e):e.size();if(r<0||r>=n.length)throw new Yt(r,n.length);return ke(e)?e.create(Ms(e.valueOf(),r,t)):Ms(e,r,t)}function Ms(e,r,t){var n,a,i,o;if(r<=0)if(Array.isArray(e[0])){for(o=P2(e),a=[],n=0;n<o.length;n++)a[n]=Ms(o[n],r-1,t);return a}else{for(i=e[0],n=1;n<e.length;n++)i=t(i,e[n]);return i}else{for(a=[],n=0;n<e.length;n++)a[n]=Ms(e[n],r-1,t);return a}}function $d(e,r,t,n,a,i,o,u,s,l,c){var f=e._values,p=e._index,v=e._ptr,m,d,y,h;if(n)for(d=v[r],y=v[r+1],m=d;m<y;m++)h=p[m],t[h]!==i?(t[h]=i,o.push(h),n[h]=f[m]):(n[h]=u(n[h],f[m]),a[h]=i);else for(d=v[r],y=v[r+1],m=d;m<y;m++)h=p[m],t[h]!==i?(t[h]=i,o.push(h)):a[h]=i}var Fd="isInteger",OL=["typed"],_L=L(Fd,OL,e=>{var{typed:r}=e;return r(Fd,{number:Pe,BigNumber:function(n){return n.isInt()},Fraction:function(n){return n.d===1&&isFinite(n.n)},"Array | Matrix":r.referToSelf(t=>n=>tr(n,t))})}),Xt="number",bi="number, number";function z2(e){return Math.abs(e)}z2.signature=Xt;function I2(e,r){return e+r}I2.signature=bi;function L2(e,r){return e-r}L2.signature=bi;function q2(e,r){return e*r}q2.signature=bi;function k2(e){return-e}k2.signature=Xt;function U2(e){return e}U2.signature=Xt;function ji(e){return _z(e)}ji.signature=Xt;function H2(e){return e*e*e}H2.signature=Xt;function j2(e){return Math.exp(e)}j2.signature=Xt;function V2(e){return $z(e)}V2.signature=Xt;function G2(e,r){if(!Pe(e)||!Pe(r))throw new Error("Parameters in function lcm must be integer numbers");if(e===0||r===0)return 0;for(var t,n=e*r;r!==0;)t=r,r=e%t,e=t;return Math.abs(n/e)}G2.signature=bi;function $L(e,r){return Math.log(e)}function W2(e){return Tz(e)}W2.signature=Xt;function Z2(e){return Mz(e)}Z2.signature=Xt;function Bd(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2,t=r<0;if(t&&(r=-r),r===0)throw new Error("Root must be non-zero");if(e<0&&Math.abs(r)%2!==1)throw new Error("Root must be odd when a is negative.");if(e===0)return t?1/0:0;if(!isFinite(e))return t?0:e;var n=Math.pow(Math.abs(e),1/r);return n=e<0?-n:n,t?1/n:n}function Ql(e){return On(e)}Ql.signature=Xt;function Y2(e){return e*e}Y2.signature=Xt;function X2(e,r){var t,n,a,i=0,o=1,u=1,s=0;if(!Pe(e)||!Pe(r))throw new Error("Parameters in function xgcd must be integer numbers");for(;r;)n=Math.floor(e/r),a=e-n*r,t=i,i=o-n*i,o=t,t=u,u=s-n*u,s=t,e=r,r=a;var l;return e<0?l=[-e,-o,-s]:l=[e,e?o:0,s],l}X2.signature=bi;function K2(e,r){return e*e<1&&r===1/0||e*e>1&&r===-1/0?0:Math.pow(e,r)}K2.signature=bi;function Li(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;if(!Pe(r)||r<0||r>15)throw new Error("Number of decimals in function round must be an integer from 0 to 15 inclusive");return parseFloat(i2(e,r))}var FL="number",xi="number, number";function J2(e,r){if(!Pe(e)||!Pe(r))throw new Error("Integers expected in function bitAnd");return e&r}J2.signature=xi;function Q2(e){if(!Pe(e))throw new Error("Integer expected in function bitNot");return~e}Q2.signature=FL;function eb(e,r){if(!Pe(e)||!Pe(r))throw new Error("Integers expected in function bitOr");return e|r}eb.signature=xi;function rb(e,r){if(!Pe(e)||!Pe(r))throw new Error("Integers expected in function bitXor");return e^r}rb.signature=xi;function tb(e,r){if(!Pe(e)||!Pe(r))throw new Error("Integers expected in function leftShift");return e<<r}tb.signature=xi;function nb(e,r){if(!Pe(e)||!Pe(r))throw new Error("Integers expected in function rightArithShift");return e>>r}nb.signature=xi;function ab(e,r){if(!Pe(e)||!Pe(r))throw new Error("Integers expected in function rightLogShift");return e>>>r}ab.signature=xi;function vn(e,r){if(r<e)return 1;if(r===e)return r;var t=r+e>>1;return vn(e,t)*vn(t+1,r)}function ib(e,r){if(!Pe(e)||e<0)throw new TypeError("Positive integer value expected in function combinations");if(!Pe(r)||r<0)throw new TypeError("Positive integer value expected in function combinations");if(r>e)throw new TypeError("k must be less than or equal to n");for(var t=e-r,n=1,a=r<t?t+1:r+1,i=2,o=r<t?r:t,u=a;u<=e;++u)for(n*=u;i<=o&&n%i===0;)n/=i,++i;return i<=o&&(n/=vn(i,o)),n}ib.signature="number, number";var BL=Math.PI,RL=2*Math.PI,PL=Math.E,zL=1.618033988749895,IL="number",Ef="number, number";function ob(e){return!e}ob.signature=IL;function sb(e,r){return!!(e||r)}sb.signature=Ef;function ub(e,r){return!!e!=!!r}ub.signature=Ef;function lb(e,r){return!!(e&&r)}lb.signature=Ef;function Ts(e){var r;if(Pe(e))return e<=0?isFinite(e)?1/0:NaN:e>171?1/0:vn(1,e-1);if(e<.5)return Math.PI/(Math.sin(Math.PI*e)*Ts(1-e));if(e>=171.35)return 1/0;if(e>85){var t=e*e,n=t*e,a=n*e,i=a*e;return Math.sqrt(2*Math.PI/e)*Math.pow(e/Math.E,e)*(1+1/(12*e)+1/(288*t)-139/(51840*n)-571/(2488320*a)+163879/(209018880*i)+5246819/(75246796800*i*e))}--e,r=Za[0];for(var o=1;o<Za.length;++o)r+=Za[o]/(e+o);var u=e+cb+.5;return Math.sqrt(2*Math.PI)*Math.pow(u,e+.5)*Math.exp(-u)*r}Ts.signature="number";var cb=4.7421875,Za=[.9999999999999971,57.15623566586292,-59.59796035547549,14.136097974741746,-.4919138160976202,3399464998481189e-20,4652362892704858e-20,-9837447530487956e-20,.0001580887032249125,-.00021026444172410488,.00021743961811521265,-.0001643181065367639,8441822398385275e-20,-26190838401581408e-21,36899182659531625e-22],fb=.9189385332046728,LL=5,qL=7,Rd=[1.000000000190015,76.18009172947146,-86.50532032941678,24.01409824083091,-1.231739572450155,.001208650973866179,-5395239384953e-18];function Os(e){if(e<0)return NaN;if(e===0)return 1/0;if(!isFinite(e))return e;if(e<.5)return Math.log(Math.PI/Math.sin(Math.PI*e))-Os(1-e);e=e-1;for(var r=e+LL+.5,t=Rd[0],n=qL-1;n>=1;n--)t+=Rd[n]/(e+n);return fb+(e+.5)*Math.log(r)-r+Math.log(t)}Os.signature="number";var nt="number";function pb(e){return zz(e)}pb.signature=nt;function vb(e){return Math.atan(1/e)}vb.signature=nt;function db(e){return isFinite(e)?(Math.log((e+1)/e)+Math.log(e/(e-1)))/2:0}db.signature=nt;function mb(e){return Math.asin(1/e)}mb.signature=nt;function hb(e){var r=1/e;return Math.log(r+Math.sqrt(r*r+1))}hb.signature=nt;function gb(e){return Math.acos(1/e)}gb.signature=nt;function yb(e){var r=1/e,t=Math.sqrt(r*r-1);return Math.log(t+r)}yb.signature=nt;function bb(e){return Iz(e)}bb.signature=nt;function xb(e){return Lz(e)}xb.signature=nt;function wb(e){return 1/Math.tan(e)}wb.signature=nt;function Eb(e){var r=Math.exp(2*e);return(r+1)/(r-1)}Eb.signature=nt;function Sb(e){return 1/Math.sin(e)}Sb.signature=nt;function Ab(e){return e===0?Number.POSITIVE_INFINITY:Math.abs(2/(Math.exp(e)-Math.exp(-e)))*On(e)}Ab.signature=nt;function Db(e){return 1/Math.cos(e)}Db.signature=nt;function Nb(e){return 2/(Math.exp(e)+Math.exp(-e))}Nb.signature=nt;function Cb(e){return kz(e)}Cb.signature=nt;var Eu="number";function Mb(e){return e<0}Mb.signature=Eu;function Tb(e){return e>0}Tb.signature=Eu;function Ob(e){return e===0}Ob.signature=Eu;function _b(e){return Number.isNaN(e)}_b.signature=Eu;var Pd="isNegative",kL=["typed"],UL=L(Pd,kL,e=>{var{typed:r}=e;return r(Pd,{number:Mb,BigNumber:function(n){return n.isNeg()&&!n.isZero()&&!n.isNaN()},Fraction:function(n){return n.s<0},Unit:r.referToSelf(t=>n=>r.find(t,n.valueType())(n.value)),"Array | Matrix":r.referToSelf(t=>n=>tr(n,t))})}),zd="isNumeric",HL=["typed"],jL=L(zd,HL,e=>{var{typed:r}=e;return r(zd,{"number | BigNumber | Fraction | boolean":()=>!0,"Complex | Unit | string | null | undefined | Node":()=>!1,"Array | Matrix":r.referToSelf(t=>n=>tr(n,t))})}),Id="hasNumericValue",VL=["typed","isNumeric"],GL=L(Id,VL,e=>{var{typed:r,isNumeric:t}=e;return r(Id,{boolean:()=>!0,string:function(a){return a.trim().length>0&&!isNaN(Number(a))},any:function(a){return t(a)}})}),Ld="isPositive",WL=["typed"],ZL=L(Ld,WL,e=>{var{typed:r}=e;return r(Ld,{number:Tb,BigNumber:function(n){return!n.isNeg()&&!n.isZero()&&!n.isNaN()},Fraction:function(n){return n.s>0&&n.n>0},Unit:r.referToSelf(t=>n=>r.find(t,n.valueType())(n.value)),"Array | Matrix":r.referToSelf(t=>n=>tr(n,t))})}),qd="isZero",YL=["typed"],XL=L(qd,YL,e=>{var{typed:r}=e;return r(qd,{number:Ob,BigNumber:function(n){return n.isZero()},Complex:function(n){return n.re===0&&n.im===0},Fraction:function(n){return n.d===1&&n.n===0},Unit:r.referToSelf(t=>n=>r.find(t,n.valueType())(n.value)),"Array | Matrix":r.referToSelf(t=>n=>tr(n,t))})}),kd="isNaN",KL=["typed"],JL=L(kd,KL,e=>{var{typed:r}=e;return r(kd,{number:_b,BigNumber:function(n){return n.isNaN()},Fraction:function(n){return!1},Complex:function(n){return n.isNaN()},Unit:function(n){return Number.isNaN(n.value)},"Array | Matrix":function(n){return tr(n,Number.isNaN)}})}),Ud="typeOf",QL=["typed"],eq=L(Ud,QL,e=>{var{typed:r}=e;return r(Ud,{any:Dr})});function Rt(e,r,t){if(t==null)return e.eq(r);if(e.eq(r))return!0;if(e.isNaN()||r.isNaN())return!1;if(e.isFinite()&&r.isFinite()){var n=e.minus(r).abs();if(n.isZero())return!0;var a=e.constructor.max(e.abs(),r.abs());return n.lte(a.times(t))}return!1}function rq(e,r,t){return ut(e.re,r.re,t)&&ut(e.im,r.im,t)}var wi=L("compareUnits",["typed"],e=>{var{typed:r}=e;return{"Unit, Unit":r.referToSelf(t=>(n,a)=>{if(!n.equalBase(a))throw new Error("Cannot compare units with different base");return r.find(t,[n.valueType(),a.valueType()])(n.value,a.value)})}}),_s="equalScalar",tq=["typed","config"],nq=L(_s,tq,e=>{var{typed:r,config:t}=e,n=wi({typed:r});return r(_s,{"boolean, boolean":function(i,o){return i===o},"number, number":function(i,o){return ut(i,o,t.epsilon)},"BigNumber, BigNumber":function(i,o){return i.eq(o)||Rt(i,o,t.epsilon)},"Fraction, Fraction":function(i,o){return i.equals(o)},"Complex, Complex":function(i,o){return rq(i,o,t.epsilon)}},n)});L(_s,["typed","config"],e=>{var{typed:r,config:t}=e;return r(_s,{"number, number":function(a,i){return ut(a,i,t.epsilon)}})});var aq="SparseMatrix",iq=["typed","equalScalar","Matrix"],oq=L(aq,iq,e=>{var{typed:r,equalScalar:t,Matrix:n}=e;function a(d,y){if(!(this instanceof a))throw new SyntaxError("Constructor must be called with the new operator");if(y&&!et(y))throw new Error("Invalid datatype: "+y);if(ke(d))i(this,d,y);else if(d&&mr(d.index)&&mr(d.ptr)&&mr(d.size))this._values=d.values,this._index=d.index,this._ptr=d.ptr,this._size=d.size,this._datatype=y||d.datatype;else if(mr(d))o(this,d,y);else{if(d)throw new TypeError("Unsupported type of data ("+Dr(d)+")");this._values=[],this._index=[],this._ptr=[0],this._size=[0,0],this._datatype=y}}function i(d,y,h){y.type==="SparseMatrix"?(d._values=y._values?Ge(y._values):void 0,d._index=Ge(y._index),d._ptr=Ge(y._ptr),d._size=Ge(y._size),d._datatype=h||y._datatype):o(d,y.valueOf(),h||y._datatype)}function o(d,y,h){d._values=[],d._index=[],d._ptr=[],d._datatype=h;var E=y.length,g=0,w=t,x=0;if(et(h)&&(w=r.find(t,[h,h])||t,x=r.convert(0,h)),E>0){var b=0;do{d._ptr.push(d._index.length);for(var A=0;A<E;A++){var D=y[A];if(mr(D)){if(b===0&&g<D.length&&(g=D.length),b<D.length){var S=D[b];w(S,x)||(d._values.push(S),d._index.push(A))}}else b===0&&g<1&&(g=1),w(D,x)||(d._values.push(D),d._index.push(A))}b++}while(b<g)}d._ptr.push(d._index.length),d._size=[E,g]}a.prototype=new n,a.prototype.createSparseMatrix=function(d,y){return new a(d,y)},Object.defineProperty(a,"name",{value:"SparseMatrix"}),a.prototype.constructor=a,a.prototype.type="SparseMatrix",a.prototype.isSparseMatrix=!0,a.prototype.getDataType=function(){return Ki(this._values,Dr)},a.prototype.storage=function(){return"sparse"},a.prototype.datatype=function(){return this._datatype},a.prototype.create=function(d,y){return new a(d,y)},a.prototype.density=function(){var d=this._size[0],y=this._size[1];return d!==0&&y!==0?this._index.length/(d*y):0},a.prototype.subset=function(d,y,h){if(!this._values)throw new Error("Cannot invoke subset on a Pattern only matrix");switch(arguments.length){case 1:return u(this,d);case 2:case 3:return s(this,d,y,h);default:throw new SyntaxError("Wrong number of arguments")}};function u(d,y){if(!pu(y))throw new TypeError("Invalid index");var h=y.isScalar();if(h)return d.get(y.min());var E=y.size();if(E.length!==d._size.length)throw new rr(E.length,d._size.length);var g,w,x,b,A=y.min(),D=y.max();for(g=0,w=d._size.length;g<w;g++)Sr(A[g],d._size[g]),Sr(D[g],d._size[g]);var S=d._values,N=d._index,C=d._ptr,M=y.dimension(0),B=y.dimension(1),P=[],R=[];M.forEach(function(F,q){R[F]=q[0],P[F]=!0});var _=S?[]:void 0,O=[],U=[];return B.forEach(function(F){for(U.push(O.length),x=C[F],b=C[F+1];x<b;x++)g=N[x],P[g]===!0&&(O.push(R[g]),_&&_.push(S[x]))}),U.push(O.length),new a({values:_,index:O,ptr:U,size:E,datatype:d._datatype})}function s(d,y,h,E){if(!y||y.isIndex!==!0)throw new TypeError("Invalid index");var g=y.size(),w=y.isScalar(),x;if(ke(h)?(x=h.size(),h=h.toArray()):x=Xe(h),w){if(x.length!==0)throw new TypeError("Scalar expected");d.set(y.min(),h,E)}else{if(g.length!==1&&g.length!==2)throw new rr(g.length,d._size.length,"<");if(x.length<g.length){for(var b=0,A=0;g[b]===1&&x[b]===1;)b++;for(;g[b]===1;)A++,b++;h=f2(h,g.length,A,x)}if(!Qn(g,x))throw new rr(g,x,">");if(g.length===1){var D=y.dimension(0);D.forEach(function(C,M){Sr(C),d.set([C,0],h[M[0]],E)})}else{var S=y.dimension(0),N=y.dimension(1);S.forEach(function(C,M){Sr(C),N.forEach(function(B,P){Sr(B),d.set([C,B],h[M[0]][P[0]],E)})})}}return d}a.prototype.get=function(d){if(!mr(d))throw new TypeError("Array expected");if(d.length!==this._size.length)throw new rr(d.length,this._size.length);if(!this._values)throw new Error("Cannot invoke get on a Pattern only matrix");var y=d[0],h=d[1];Sr(y,this._size[0]),Sr(h,this._size[1]);var E=l(y,this._ptr[h],this._ptr[h+1],this._index);return E<this._ptr[h+1]&&this._index[E]===y?this._values[E]:0},a.prototype.set=function(d,y,h){if(!mr(d))throw new TypeError("Array expected");if(d.length!==this._size.length)throw new rr(d.length,this._size.length);if(!this._values)throw new Error("Cannot invoke set on a Pattern only matrix");var E=d[0],g=d[1],w=this._size[0],x=this._size[1],b=t,A=0;et(this._datatype)&&(b=r.find(t,[this._datatype,this._datatype])||t,A=r.convert(0,this._datatype)),(E>w-1||g>x-1)&&(p(this,Math.max(E+1,w),Math.max(g+1,x),h),w=this._size[0],x=this._size[1]),Sr(E,w),Sr(g,x);var D=l(E,this._ptr[g],this._ptr[g+1],this._index);return D<this._ptr[g+1]&&this._index[D]===E?b(y,A)?c(D,g,this._values,this._index,this._ptr):this._values[D]=y:b(y,A)||f(D,E,g,y,this._values,this._index,this._ptr),this};function l(d,y,h,E){if(h-y===0)return h;for(var g=y;g<h;g++)if(E[g]===d)return g;return y}function c(d,y,h,E,g){h.splice(d,1),E.splice(d,1);for(var w=y+1;w<g.length;w++)g[w]--}function f(d,y,h,E,g,w,x){g.splice(d,0,E),w.splice(d,0,y);for(var b=h+1;b<x.length;b++)x[b]++}a.prototype.resize=function(d,y,h){if(!Bt(d))throw new TypeError("Array or Matrix expected");var E=d.valueOf().map(w=>Array.isArray(w)&&w.length===1?w[0]:w);if(E.length!==2)throw new Error("Only two dimensions matrix are supported");E.forEach(function(w){if(!Ke(w)||!Pe(w)||w<0)throw new TypeError("Invalid size, must contain positive integers (size: "+er(E)+")")});var g=h?this.clone():this;return p(g,E[0],E[1],y)};function p(d,y,h,E){var g=E||0,w=t,x=0;et(d._datatype)&&(w=r.find(t,[d._datatype,d._datatype])||t,x=r.convert(0,d._datatype),g=r.convert(g,d._datatype));var b=!w(g,x),A=d._size[0],D=d._size[1],S,N,C;if(h>D){for(N=D;N<h;N++)if(d._ptr[N]=d._values.length,b)for(S=0;S<A;S++)d._values.push(g),d._index.push(S);d._ptr[h]=d._values.length}else h<D&&(d._ptr.splice(h+1,D-h),d._values.splice(d._ptr[h],d._values.length),d._index.splice(d._ptr[h],d._index.length));if(D=h,y>A){if(b){var M=0;for(N=0;N<D;N++){d._ptr[N]=d._ptr[N]+M,C=d._ptr[N+1]+M;var B=0;for(S=A;S<y;S++,B++)d._values.splice(C+B,0,g),d._index.splice(C+B,0,S),M++}d._ptr[D]=d._values.length}}else if(y<A){var P=0;for(N=0;N<D;N++){d._ptr[N]=d._ptr[N]-P;var R=d._ptr[N],_=d._ptr[N+1]-P;for(C=R;C<_;C++)S=d._index[C],S>y-1&&(d._values.splice(C,1),d._index.splice(C,1),P++)}d._ptr[N]=d._values.length}return d._size[0]=y,d._size[1]=h,d}a.prototype.reshape=function(d,y){if(!mr(d))throw new TypeError("Array expected");if(d.length!==2)throw new Error("Sparse matrices can only be reshaped in two dimensions");d.forEach(function(F){if(!Ke(F)||!Pe(F)||F<=-2||F===0)throw new TypeError("Invalid size, must contain positive integers or -1 (size: "+er(d)+")")});var h=this._size[0]*this._size[1];d=bf(d,h);var E=d[0]*d[1];if(h!==E)throw new Error("Reshaping sparse matrix will result in the wrong number of elements");var g=y?this.clone():this;if(this._size[0]===d[0]&&this._size[1]===d[1])return g;for(var w=[],x=0;x<g._ptr.length;x++)for(var b=0;b<g._ptr[x+1]-g._ptr[x];b++)w.push(x);for(var A=g._values.slice(),D=g._index.slice(),S=0;S<g._index.length;S++){var N=D[S],C=w[S],M=N*g._size[1]+C;w[S]=M%d[1],D[S]=Math.floor(M/d[1])}g._values.length=0,g._index.length=0,g._ptr.length=d[1]+1,g._size=d.slice();for(var B=0;B<g._ptr.length;B++)g._ptr[B]=0;for(var P=0;P<A.length;P++){var R=D[P],_=w[P],O=A[P],U=l(R,g._ptr[_],g._ptr[_+1],g._index);f(U,R,_,O,g._values,g._index,g._ptr)}return g},a.prototype.clone=function(){var d=new a({values:this._values?Ge(this._values):void 0,index:Ge(this._index),ptr:Ge(this._ptr),size:Ge(this._size),datatype:this._datatype});return d},a.prototype.size=function(){return this._size.slice(0)},a.prototype.map=function(d,y){if(!this._values)throw new Error("Cannot invoke map on a Pattern only matrix");var h=this,E=this._size[0],g=this._size[1],w=R2(d),x=function(A,D,S){return w===1?d(A):w===2?d(A,[D,S]):d(A,[D,S],h)};return v(this,0,E-1,0,g-1,x,y)};function v(d,y,h,E,g,w,x){var b=[],A=[],D=[],S=t,N=0;et(d._datatype)&&(S=r.find(t,[d._datatype,d._datatype])||t,N=r.convert(0,d._datatype));for(var C=function(z,J,le){z=w(z,J,le),S(z,N)||(b.push(z),A.push(J))},M=E;M<=g;M++){D.push(b.length);var B=d._ptr[M],P=d._ptr[M+1];if(x)for(var R=B;R<P;R++){var _=d._index[R];_>=y&&_<=h&&C(d._values[R],_-y,M-E)}else{for(var O={},U=B;U<P;U++){var F=d._index[U];O[F]=d._values[U]}for(var q=y;q<=h;q++){var Y=q in O?O[q]:0;C(Y,q-y,M-E)}}}return D.push(b.length),new a({values:b,index:A,ptr:D,size:[h-y+1,g-E+1]})}a.prototype.forEach=function(d,y){if(!this._values)throw new Error("Cannot invoke forEach on a Pattern only matrix");for(var h=this,E=this._size[0],g=this._size[1],w=0;w<g;w++){var x=this._ptr[w],b=this._ptr[w+1];if(y)for(var A=x;A<b;A++){var D=this._index[A];d(this._values[A],[D,w],h)}else{for(var S={},N=x;N<b;N++){var C=this._index[N];S[C]=this._values[N]}for(var M=0;M<E;M++){var B=M in S?S[M]:0;d(B,[M,w],h)}}}},a.prototype[Symbol.iterator]=function*(){if(!this._values)throw new Error("Cannot iterate a Pattern only matrix");for(var d=this._size[1],y=0;y<d;y++)for(var h=this._ptr[y],E=this._ptr[y+1],g=h;g<E;g++){var w=this._index[g];yield{value:this._values[g],index:[w,y]}}},a.prototype.toArray=function(){return m(this._values,this._index,this._ptr,this._size,!0)},a.prototype.valueOf=function(){return m(this._values,this._index,this._ptr,this._size,!1)};function m(d,y,h,E,g){var w=E[0],x=E[1],b=[],A,D;for(A=0;A<w;A++)for(b[A]=[],D=0;D<x;D++)b[A][D]=0;for(D=0;D<x;D++)for(var S=h[D],N=h[D+1],C=S;C<N;C++)A=y[C],b[A][D]=d?g?Ge(d[C]):d[C]:1;return b}return a.prototype.format=function(d){for(var y=this._size[0],h=this._size[1],E=this.density(),g="Sparse Matrix ["+er(y,d)+" x "+er(h,d)+"] density: "+er(E,d)+`
|
|
96
|
+
`,w=0;w<h;w++)for(var x=this._ptr[w],b=this._ptr[w+1],A=x;A<b;A++){var D=this._index[A];g+=`
|
|
97
|
+
(`+er(D,d)+", "+er(w,d)+") ==> "+(this._values?er(this._values[A],d):"X")}return g},a.prototype.toString=function(){return er(this.toArray())},a.prototype.toJSON=function(){return{mathjs:"SparseMatrix",values:this._values,index:this._index,ptr:this._ptr,size:this._size,datatype:this._datatype}},a.prototype.diagonal=function(d){if(d){if(Je(d)&&(d=d.toNumber()),!Ke(d)||!Pe(d))throw new TypeError("The parameter k must be an integer number")}else d=0;var y=d>0?d:0,h=d<0?-d:0,E=this._size[0],g=this._size[1],w=Math.min(E-h,g-y),x=[],b=[],A=[];A[0]=0;for(var D=y;D<g&&x.length<w;D++)for(var S=this._ptr[D],N=this._ptr[D+1],C=S;C<N;C++){var M=this._index[C];if(M===D-y+h){x.push(this._values[C]),b[x.length-1]=M-h;break}}return A.push(x.length),new a({values:x,index:b,ptr:A,size:[w,1]})},a.fromJSON=function(d){return new a(d)},a.diagonal=function(d,y,h,E,g){if(!mr(d))throw new TypeError("Array expected, size parameter");if(d.length!==2)throw new Error("Only two dimensions matrix are supported");if(d=d.map(function(F){if(Je(F)&&(F=F.toNumber()),!Ke(F)||!Pe(F)||F<1)throw new Error("Size values must be positive integers");return F}),h){if(Je(h)&&(h=h.toNumber()),!Ke(h)||!Pe(h))throw new TypeError("The parameter k must be an integer number")}else h=0;var w=t,x=0;et(g)&&(w=r.find(t,[g,g])||t,x=r.convert(0,g));var b=h>0?h:0,A=h<0?-h:0,D=d[0],S=d[1],N=Math.min(D-A,S-b),C;if(mr(y)){if(y.length!==N)throw new Error("Invalid value array length");C=function(q){return y[q]}}else if(ke(y)){var M=y.size();if(M.length!==1||M[0]!==N)throw new Error("Invalid matrix length");C=function(q){return y.get([q])}}else C=function(){return y};for(var B=[],P=[],R=[],_=0;_<S;_++){R.push(B.length);var O=_-b;if(O>=0&&O<N){var U=C(O);w(U,x)||(P.push(O+A),B.push(U))}}return R.push(B.length),new a({values:B,index:P,ptr:R,size:[D,S]})},a.prototype.swapRows=function(d,y){if(!Ke(d)||!Pe(d)||!Ke(y)||!Pe(y))throw new Error("Row index must be positive integers");if(this._size.length!==2)throw new Error("Only two dimensional matrix is supported");return Sr(d,this._size[0]),Sr(y,this._size[0]),a._swapRows(d,y,this._size[1],this._values,this._index,this._ptr),this},a._forEachRow=function(d,y,h,E,g){for(var w=E[d],x=E[d+1],b=w;b<x;b++)g(h[b],y[b])},a._swapRows=function(d,y,h,E,g,w){for(var x=0;x<h;x++){var b=w[x],A=w[x+1],D=l(d,b,A,g),S=l(y,b,A,g);if(D<A&&S<A&&g[D]===d&&g[S]===y){if(E){var N=E[D];E[D]=E[S],E[S]=N}continue}if(D<A&&g[D]===d&&(S>=A||g[S]!==y)){var C=E?E[D]:void 0;g.splice(S,0,y),E&&E.splice(S,0,C),g.splice(S<=D?D+1:D,1),E&&E.splice(S<=D?D+1:D,1);continue}if(S<A&&g[S]===y&&(D>=A||g[D]!==d)){var M=E?E[S]:void 0;g.splice(D,0,d),E&&E.splice(D,0,M),g.splice(D<=S?S+1:S,1),E&&E.splice(D<=S?S+1:S,1)}}},a},{isClass:!0}),sq="number",uq=["typed"];function lq(e){var r=e.match(/(0[box])([0-9a-fA-F]*)\.([0-9a-fA-F]*)/);if(r){var t={"0b":2,"0o":8,"0x":16}[r[1]],n=r[2],a=r[3];return{input:e,radix:t,integerPart:n,fractionalPart:a}}else return null}function cq(e){for(var r=parseInt(e.integerPart,e.radix),t=0,n=0;n<e.fractionalPart.length;n++){var a=parseInt(e.fractionalPart[n],e.radix);t+=a/Math.pow(e.radix,n+1)}var i=r+t;if(isNaN(i))throw new SyntaxError('String "'+e.input+'" is not a valid number');return i}var fq=L(sq,uq,e=>{var{typed:r}=e,t=r("number",{"":function(){return 0},number:function(a){return a},string:function(a){if(a==="NaN")return NaN;var i=lq(a);if(i)return cq(i);var o=0,u=a.match(/(0[box][0-9a-fA-F]*)i([0-9]*)/);u&&(o=Number(u[2]),a=u[1]);var s=Number(a);if(isNaN(s))throw new SyntaxError('String "'+a+'" is not a valid number');if(u){if(s>2**o-1)throw new SyntaxError('String "'.concat(a,'" is out of range'));s>=2**(o-1)&&(s=s-2**o)}return s},BigNumber:function(a){return a.toNumber()},Fraction:function(a){return a.valueOf()},Unit:r.referToSelf(n=>a=>{var i=a.clone();return i.value=n(a.value),i}),null:function(a){return 0},"Unit, string | Unit":function(a,i){return a.toNumber(i)},"Array | Matrix":r.referToSelf(n=>a=>tr(a,n))});return t.fromJSON=function(n){return parseFloat(n.value)},t}),Hd="string",pq=["typed"],vq=L(Hd,pq,e=>{var{typed:r}=e;return r(Hd,{"":function(){return""},number:Yn,null:function(n){return"null"},boolean:function(n){return n+""},string:function(n){return n},"Array | Matrix":r.referToSelf(t=>n=>tr(n,t)),any:function(n){return String(n)}})}),jd="boolean",dq=["typed"],mq=L(jd,dq,e=>{var{typed:r}=e;return r(jd,{"":function(){return!1},boolean:function(n){return n},number:function(n){return!!n},null:function(n){return!1},BigNumber:function(n){return!n.isZero()},string:function(n){var a=n.toLowerCase();if(a==="true")return!0;if(a==="false")return!1;var i=Number(n);if(n!==""&&!isNaN(i))return!!i;throw new Error('Cannot convert "'+n+'" to a boolean')},"Array | Matrix":r.referToSelf(t=>n=>tr(n,t))})}),hq="bignumber",gq=["typed","BigNumber"],yq=L(hq,gq,e=>{var{typed:r,BigNumber:t}=e;return r("bignumber",{"":function(){return new t(0)},number:function(a){return new t(a+"")},string:function(a){var i=a.match(/(0[box][0-9a-fA-F]*)i([0-9]*)/);if(i){var o=i[2],u=t(i[1]),s=new t(2).pow(Number(o));if(u.gt(s.sub(1)))throw new SyntaxError('String "'.concat(a,'" is out of range'));var l=new t(2).pow(Number(o)-1);return u.gte(l)?u.sub(s):u}return new t(a)},BigNumber:function(a){return a},Unit:r.referToSelf(n=>a=>{var i=a.clone();return i.value=n(a.value),i}),Fraction:function(a){return new t(a.n).div(a.d).times(a.s)},null:function(a){return new t(0)},"Array | Matrix":r.referToSelf(n=>a=>tr(a,n))})}),bq="complex",xq=["typed","Complex"],wq=L(bq,xq,e=>{var{typed:r,Complex:t}=e;return r("complex",{"":function(){return t.ZERO},number:function(a){return new t(a,0)},"number, number":function(a,i){return new t(a,i)},"BigNumber, BigNumber":function(a,i){return new t(a.toNumber(),i.toNumber())},Fraction:function(a){return new t(a.valueOf(),0)},Complex:function(a){return a.clone()},string:function(a){return t(a)},null:function(a){return t(0)},Object:function(a){if("re"in a&&"im"in a)return new t(a.re,a.im);if("r"in a&&"phi"in a||"abs"in a&&"arg"in a)return new t(a);throw new Error("Expected object with properties (re and im) or (r and phi) or (abs and arg)")},"Array | Matrix":r.referToSelf(n=>a=>tr(a,n))})}),Eq="fraction",Sq=["typed","Fraction"],Aq=L(Eq,Sq,e=>{var{typed:r,Fraction:t}=e;return r("fraction",{number:function(a){if(!isFinite(a)||isNaN(a))throw new Error(a+" cannot be represented as a fraction");return new t(a)},string:function(a){return new t(a)},"number, number":function(a,i){return new t(a,i)},null:function(a){return new t(0)},BigNumber:function(a){return new t(a.toString())},Fraction:function(a){return a},Unit:r.referToSelf(n=>a=>{var i=a.clone();return i.value=n(a.value),i}),Object:function(a){return new t(a)},"Array | Matrix":r.referToSelf(n=>a=>tr(a,n))})}),Vd="matrix",Dq=["typed","Matrix","DenseMatrix","SparseMatrix"],Nq=L(Vd,Dq,e=>{var{typed:r,Matrix:t,DenseMatrix:n,SparseMatrix:a}=e;return r(Vd,{"":function(){return i([])},string:function(u){return i([],u)},"string, string":function(u,s){return i([],u,s)},Array:function(u){return i(u)},Matrix:function(u){return i(u,u.storage())},"Array | Matrix, string":i,"Array | Matrix, string, string":i});function i(o,u,s){if(u==="dense"||u==="default"||u===void 0)return new n(o,s);if(u==="sparse")return new a(o,s);throw new TypeError("Unknown matrix type "+JSON.stringify(u)+".")}}),Gd="matrixFromFunction",Cq=["typed","matrix","isZero"],Mq=L(Gd,Cq,e=>{var{typed:r,matrix:t,isZero:n}=e;return r(Gd,{"Array | Matrix, function, string, string":function(o,u,s,l){return a(o,u,s,l)},"Array | Matrix, function, string":function(o,u,s){return a(o,u,s)},"Matrix, function":function(o,u){return a(o,u,"dense")},"Array, function":function(o,u){return a(o,u,"dense").toArray()},"Array | Matrix, string, function":function(o,u,s){return a(o,s,u)},"Array | Matrix, string, string, function":function(o,u,s,l){return a(o,l,u,s)}});function a(i,o,u,s){var l;return s!==void 0?l=t(u,s):l=t(u),l.resize(i),l.forEach(function(c,f){var p=o(f);n(p)||l.set(f,p)}),l}}),Wd="matrixFromRows",Tq=["typed","matrix","flatten","size"],Oq=L(Wd,Tq,e=>{var{typed:r,matrix:t,flatten:n,size:a}=e;return r(Wd,{"...Array":function(s){return i(s)},"...Matrix":function(s){return t(i(s.map(l=>l.toArray())))}});function i(u){if(u.length===0)throw new TypeError("At least one row is needed to construct a matrix.");var s=o(u[0]),l=[];for(var c of u){var f=o(c);if(f!==s)throw new TypeError("The vectors had different length: "+(s|0)+" ≠ "+(f|0));l.push(n(c))}return l}function o(u){var s=a(u);if(s.length===1)return s[0];if(s.length===2){if(s[0]===1)return s[1];if(s[1]===1)return s[0];throw new TypeError("At least one of the arguments is not a vector.")}else throw new TypeError("Only one- or two-dimensional vectors are supported.")}}),Zd="matrixFromColumns",_q=["typed","matrix","flatten","size"],$q=L(Zd,_q,e=>{var{typed:r,matrix:t,flatten:n,size:a}=e;return r(Zd,{"...Array":function(s){return i(s)},"...Matrix":function(s){return t(i(s.map(l=>l.toArray())))}});function i(u){if(u.length===0)throw new TypeError("At least one column is needed to construct a matrix.");for(var s=o(u[0]),l=[],c=0;c<s;c++)l[c]=[];for(var f of u){var p=o(f);if(p!==s)throw new TypeError("The vectors had different length: "+(s|0)+" ≠ "+(p|0));for(var v=n(f),m=0;m<s;m++)l[m].push(v[m])}return l}function o(u){var s=a(u);if(s.length===1)return s[0];if(s.length===2){if(s[0]===1)return s[1];if(s[1]===1)return s[0];throw new TypeError("At least one of the arguments is not a vector.")}else throw new TypeError("Only one- or two-dimensional vectors are supported.")}}),Yd="splitUnit",Fq=["typed"],Bq=L(Yd,Fq,e=>{var{typed:r}=e;return r(Yd,{"Unit, Array":function(n,a){return n.splitUnit(a)}})}),Xd="unaryMinus",Rq=["typed"],Pq=L(Xd,Rq,e=>{var{typed:r}=e;return r(Xd,{number:k2,"Complex | BigNumber | Fraction":t=>t.neg(),Unit:r.referToSelf(t=>n=>{var a=n.clone();return a.value=r.find(t,a.valueType())(n.value),a}),"Array | Matrix":r.referToSelf(t=>n=>tr(n,t))})}),Kd="unaryPlus",zq=["typed","config","BigNumber"],Iq=L(Kd,zq,e=>{var{typed:r,config:t,BigNumber:n}=e;return r(Kd,{number:U2,Complex:function(i){return i},BigNumber:function(i){return i},Fraction:function(i){return i},Unit:function(i){return i.clone()},"Array | Matrix":r.referToSelf(a=>i=>tr(i,a)),"boolean | string":function(i){return t.number==="BigNumber"?new n(+i):+i}})}),Jd="abs",Lq=["typed"],qq=L(Jd,Lq,e=>{var{typed:r}=e;return r(Jd,{number:z2,"Complex | BigNumber | Fraction | Unit":t=>t.abs(),"Array | Matrix":r.referToSelf(t=>n=>tr(n,t))})}),Qd="apply",kq=["typed","isInteger"],Sf=L(Qd,kq,e=>{var{typed:r,isInteger:t}=e;return r(Qd,{"Array | Matrix, number | BigNumber, function":function(a,i,o){if(!t(i))throw new TypeError("Integer number expected for dimension");var u=Array.isArray(a)?Xe(a):a.size();if(i<0||i>=u.length)throw new Yt(i,u.length);return ke(a)?a.create($s(a.valueOf(),i,o)):$s(a,i,o)}})});function $s(e,r,t){var n,a,i;if(r<=0)if(Array.isArray(e[0])){for(i=Uq(e),a=[],n=0;n<i.length;n++)a[n]=$s(i[n],r-1,t);return a}else return t(e);else{for(a=[],n=0;n<e.length;n++)a[n]=$s(e[n],r-1,t);return a}}function Uq(e){var r=e.length,t=e[0].length,n,a,i=[];for(a=0;a<t;a++){var o=[];for(n=0;n<r;n++)o.push(e[n][a]);i.push(o)}return i}var em="addScalar",Hq=["typed"],jq=L(em,Hq,e=>{var{typed:r}=e;return r(em,{"number, number":I2,"Complex, Complex":function(n,a){return n.add(a)},"BigNumber, BigNumber":function(n,a){return n.plus(a)},"Fraction, Fraction":function(n,a){return n.add(a)},"Unit, Unit":r.referToSelf(t=>(n,a)=>{if(n.value===null||n.value===void 0)throw new Error("Parameter x contains a unit with undefined value");if(a.value===null||a.value===void 0)throw new Error("Parameter y contains a unit with undefined value");if(!n.equalBase(a))throw new Error("Units do not match");var i=n.clone();return i.value=r.find(t,[i.valueType(),a.valueType()])(i.value,a.value),i.fixPrefix=!1,i})})}),rm="subtractScalar",Vq=["typed"],Gq=L(rm,Vq,e=>{var{typed:r}=e;return r(rm,{"number, number":L2,"Complex, Complex":function(n,a){return n.sub(a)},"BigNumber, BigNumber":function(n,a){return n.minus(a)},"Fraction, Fraction":function(n,a){return n.sub(a)},"Unit, Unit":r.referToSelf(t=>(n,a)=>{if(n.value===null||n.value===void 0)throw new Error("Parameter x contains a unit with undefined value");if(a.value===null||a.value===void 0)throw new Error("Parameter y contains a unit with undefined value");if(!n.equalBase(a))throw new Error("Units do not match");var i=n.clone();return i.value=r.find(t,[i.valueType(),a.valueType()])(i.value,a.value),i.fixPrefix=!1,i})})}),tm="cbrt",Wq=["config","typed","isNegative","unaryMinus","matrix","Complex","BigNumber","Fraction"],Zq=L(tm,Wq,e=>{var{config:r,typed:t,isNegative:n,unaryMinus:a,matrix:i,Complex:o,BigNumber:u,Fraction:s}=e;return t(tm,{number:ji,Complex:l,"Complex, boolean":l,BigNumber:function(p){return p.cbrt()},Unit:c});function l(f,p){var v=f.arg()/3,m=f.abs(),d=new o(ji(m),0).mul(new o(0,v).exp());if(p){var y=[d,new o(ji(m),0).mul(new o(0,v+Math.PI*2/3).exp()),new o(ji(m),0).mul(new o(0,v-Math.PI*2/3).exp())];return r.matrix==="Array"?y:i(y)}else return d}function c(f){if(f.value&&dn(f.value)){var p=f.clone();return p.value=1,p=p.pow(1/3),p.value=l(f.value),p}else{var v=n(f.value);v&&(f.value=a(f.value));var m;Je(f.value)?m=new u(1).div(3):mo(f.value)?m=new s(1,3):m=1/3;var d=f.pow(m);return v&&(d.value=a(d.value)),d}}}),Yq="matAlgo11xS0s",Xq=["typed","equalScalar"],Jr=L(Yq,Xq,e=>{var{typed:r,equalScalar:t}=e;return function(a,i,o,u){var s=a._values,l=a._index,c=a._ptr,f=a._size,p=a._datatype;if(!s)throw new Error("Cannot perform operation on Pattern Sparse Matrix and Scalar value");var v=f[0],m=f[1],d,y=t,h=0,E=o;typeof p=="string"&&(d=p,y=r.find(t,[d,d]),h=r.convert(0,d),i=r.convert(i,d),E=r.find(o,[d,d]));for(var g=[],w=[],x=[],b=0;b<m;b++){x[b]=w.length;for(var A=c[b],D=c[b+1],S=A;S<D;S++){var N=l[S],C=u?E(i,s[S]):E(s[S],i);y(C,h)||(w.push(N),g.push(C))}}return x[m]=w.length,a.createSparseMatrix({values:g,index:w,ptr:x,size:[v,m],datatype:d})}}),Kq="matAlgo12xSfs",Jq=["typed","DenseMatrix"],Hr=L(Kq,Jq,e=>{var{typed:r,DenseMatrix:t}=e;return function(a,i,o,u){var s=a._values,l=a._index,c=a._ptr,f=a._size,p=a._datatype;if(!s)throw new Error("Cannot perform operation on Pattern Sparse Matrix and Scalar value");var v=f[0],m=f[1],d,y=o;typeof p=="string"&&(d=p,i=r.convert(i,d),y=r.find(o,[d,d]));for(var h=[],E=[],g=[],w=0;w<m;w++){for(var x=w+1,b=c[w],A=c[w+1],D=b;D<A;D++){var S=l[D];E[S]=s[D],g[S]=x}for(var N=0;N<v;N++)w===0&&(h[N]=[]),g[N]===x?h[N][w]=u?y(i,E[N]):y(E[N],i):h[N][w]=u?y(i,0):y(0,i)}return new t({data:h,size:[v,m],datatype:d})}}),Qq="matAlgo14xDs",ek=["typed"],Kt=L(Qq,ek,e=>{var{typed:r}=e;return function(a,i,o,u){var s=a._data,l=a._size,c=a._datatype,f,p=o;typeof c=="string"&&(f=c,i=r.convert(i,f),p=r.find(o,[f,f]));var v=l.length>0?t(p,0,l,l[0],s,i,u):[];return a.createDenseMatrix({data:v,size:Ge(l),datatype:f})};function t(n,a,i,o,u,s,l){var c=[];if(a===i.length-1)for(var f=0;f<o;f++)c[f]=l?n(s,u[f]):n(u[f],s);else for(var p=0;p<o;p++)c[p]=t(n,a+1,i,i[a+1],u[p],s,l);return c}}),ec="ceil",rk=["typed","config","round","matrix","equalScalar","zeros","DenseMatrix"],tk=L(ec,["typed","config","round"],e=>{var{typed:r,config:t,round:n}=e;return r(ec,{number:function(i){return ut(i,n(i),t.epsilon)?n(i):Math.ceil(i)},"number, number":function(i,o){if(ut(i,n(i,o),t.epsilon))return n(i,o);var[u,s]="".concat(i,"e").split("e"),l=Math.ceil(Number("".concat(u,"e").concat(Number(s)+o)));return[u,s]="".concat(l,"e").split("e"),Number("".concat(u,"e").concat(Number(s)-o))}})}),nk=L(ec,rk,e=>{var{typed:r,config:t,round:n,matrix:a,equalScalar:i,zeros:o,DenseMatrix:u}=e,s=Jr({typed:r,equalScalar:i}),l=Hr({typed:r,DenseMatrix:u}),c=Kt({typed:r}),f=tk({typed:r,config:t,round:n});return r("ceil",{number:f.signatures.number,"number,number":f.signatures["number,number"],Complex:function(v){return v.ceil()},"Complex, number":function(v,m){return v.ceil(m)},"Complex, BigNumber":function(v,m){return v.ceil(m.toNumber())},BigNumber:function(v){return Rt(v,n(v),t.epsilon)?n(v):v.ceil()},"BigNumber, BigNumber":function(v,m){return Rt(v,n(v,m),t.epsilon)?n(v,m):v.toDecimalPlaces(m.toNumber(),Pn.ROUND_CEIL)},Fraction:function(v){return v.ceil()},"Fraction, number":function(v,m){return v.ceil(m)},"Fraction, BigNumber":function(v,m){return v.ceil(m.toNumber())},"Array | Matrix":r.referToSelf(p=>v=>tr(v,p)),"Array, number | BigNumber":r.referToSelf(p=>(v,m)=>tr(v,d=>p(d,m))),"SparseMatrix, number | BigNumber":r.referToSelf(p=>(v,m)=>s(v,m,p,!1)),"DenseMatrix, number | BigNumber":r.referToSelf(p=>(v,m)=>c(v,m,p,!1)),"number | Complex | Fraction | BigNumber, Array":r.referToSelf(p=>(v,m)=>c(a(m),v,p,!0).valueOf()),"number | Complex | Fraction | BigNumber, Matrix":r.referToSelf(p=>(v,m)=>i(v,0)?o(m.size(),m.storage()):m.storage()==="dense"?c(m,v,p,!0):l(m,v,p,!0))})}),nm="cube",ak=["typed"],ik=L(nm,ak,e=>{var{typed:r}=e;return r(nm,{number:H2,Complex:function(n){return n.mul(n).mul(n)},BigNumber:function(n){return n.times(n).times(n)},Fraction:function(n){return n.pow(3)},Unit:function(n){return n.pow(3)}})}),am="exp",ok=["typed"],sk=L(am,ok,e=>{var{typed:r}=e;return r(am,{number:j2,Complex:function(n){return n.exp()},BigNumber:function(n){return n.exp()}})}),im="expm1",uk=["typed","Complex"],lk=L(im,uk,e=>{var{typed:r,Complex:t}=e;return r(im,{number:V2,Complex:function(a){var i=Math.exp(a.re);return new t(i*Math.cos(a.im)-1,i*Math.sin(a.im))},BigNumber:function(a){return a.exp().minus(1)}})}),rc="fix",ck=["typed","Complex","matrix","ceil","floor","equalScalar","zeros","DenseMatrix"],fk=L(rc,["typed","ceil","floor"],e=>{var{typed:r,ceil:t,floor:n}=e;return r(rc,{number:function(i){return i>0?n(i):t(i)},"number, number":function(i,o){return i>0?n(i,o):t(i,o)}})}),pk=L(rc,ck,e=>{var{typed:r,Complex:t,matrix:n,ceil:a,floor:i,equalScalar:o,zeros:u,DenseMatrix:s}=e,l=Hr({typed:r,DenseMatrix:s}),c=Kt({typed:r}),f=fk({typed:r,ceil:a,floor:i});return r("fix",{number:f.signatures.number,"number, number | BigNumber":f.signatures["number,number"],Complex:function(v){return new t(v.re>0?Math.floor(v.re):Math.ceil(v.re),v.im>0?Math.floor(v.im):Math.ceil(v.im))},"Complex, number":function(v,m){return new t(v.re>0?i(v.re,m):a(v.re,m),v.im>0?i(v.im,m):a(v.im,m))},"Complex, BigNumber":function(v,m){var d=m.toNumber();return new t(v.re>0?i(v.re,d):a(v.re,d),v.im>0?i(v.im,d):a(v.im,d))},BigNumber:function(v){return v.isNegative()?a(v):i(v)},"BigNumber, number | BigNumber":function(v,m){return v.isNegative()?a(v,m):i(v,m)},Fraction:function(v){return v.s<0?v.ceil():v.floor()},"Fraction, number | BigNumber":function(v,m){return v.s<0?a(v,m):i(v,m)},"Array | Matrix":r.referToSelf(p=>v=>tr(v,p)),"Array | Matrix, number | BigNumber":r.referToSelf(p=>(v,m)=>tr(v,d=>p(d,m))),"number | Complex | Fraction | BigNumber, Array":r.referToSelf(p=>(v,m)=>c(n(m),v,p,!0).valueOf()),"number | Complex | Fraction | BigNumber, Matrix":r.referToSelf(p=>(v,m)=>o(v,0)?u(m.size(),m.storage()):m.storage()==="dense"?c(m,v,p,!0):l(m,v,p,!0))})}),tc="floor",vk=["typed","config","round","matrix","equalScalar","zeros","DenseMatrix"],dk=L(tc,["typed","config","round"],e=>{var{typed:r,config:t,round:n}=e;return r(tc,{number:function(i){return ut(i,n(i),t.epsilon)?n(i):Math.floor(i)},"number, number":function(i,o){if(ut(i,n(i,o),t.epsilon))return n(i,o);var[u,s]="".concat(i,"e").split("e"),l=Math.floor(Number("".concat(u,"e").concat(Number(s)+o)));return[u,s]="".concat(l,"e").split("e"),Number("".concat(u,"e").concat(Number(s)-o))}})}),$b=L(tc,vk,e=>{var{typed:r,config:t,round:n,matrix:a,equalScalar:i,zeros:o,DenseMatrix:u}=e,s=Jr({typed:r,equalScalar:i}),l=Hr({typed:r,DenseMatrix:u}),c=Kt({typed:r}),f=dk({typed:r,config:t,round:n});return r("floor",{number:f.signatures.number,"number,number":f.signatures["number,number"],Complex:function(v){return v.floor()},"Complex, number":function(v,m){return v.floor(m)},"Complex, BigNumber":function(v,m){return v.floor(m.toNumber())},BigNumber:function(v){return Rt(v,n(v),t.epsilon)?n(v):v.floor()},"BigNumber, BigNumber":function(v,m){return Rt(v,n(v,m),t.epsilon)?n(v,m):v.toDecimalPlaces(m.toNumber(),Pn.ROUND_FLOOR)},Fraction:function(v){return v.floor()},"Fraction, number":function(v,m){return v.floor(m)},"Fraction, BigNumber":function(v,m){return v.floor(m.toNumber())},"Array | Matrix":r.referToSelf(p=>v=>tr(v,p)),"Array, number | BigNumber":r.referToSelf(p=>(v,m)=>tr(v,d=>p(d,m))),"SparseMatrix, number | BigNumber":r.referToSelf(p=>(v,m)=>s(v,m,p,!1)),"DenseMatrix, number | BigNumber":r.referToSelf(p=>(v,m)=>c(v,m,p,!1)),"number | Complex | Fraction | BigNumber, Array":r.referToSelf(p=>(v,m)=>c(a(m),v,p,!0).valueOf()),"number | Complex | Fraction | BigNumber, Matrix":r.referToSelf(p=>(v,m)=>i(v,0)?o(m.size(),m.storage()):m.storage()==="dense"?c(m,v,p,!0):l(m,v,p,!0))})}),mk="matAlgo02xDS0",hk=["typed","equalScalar"],Jt=L(mk,hk,e=>{var{typed:r,equalScalar:t}=e;return function(a,i,o,u){var s=a._data,l=a._size,c=a._datatype||a.getDataType(),f=i._values,p=i._index,v=i._ptr,m=i._size,d=i._datatype||i._data===void 0?i._datatype:i.getDataType();if(l.length!==m.length)throw new rr(l.length,m.length);if(l[0]!==m[0]||l[1]!==m[1])throw new RangeError("Dimension mismatch. Matrix A ("+l+") must match Matrix B ("+m+")");if(!f)throw new Error("Cannot perform operation on Dense Matrix and Pattern Sparse Matrix");var y=l[0],h=l[1],E,g=t,w=0,x=o;typeof c=="string"&&c===d&&c!=="mixed"&&(E=c,g=r.find(t,[E,E]),w=r.convert(0,E),x=r.find(o,[E,E]));for(var b=[],A=[],D=[],S=0;S<h;S++){D[S]=A.length;for(var N=v[S],C=v[S+1],M=N;M<C;M++){var B=p[M],P=u?x(f[M],s[B][S]):x(s[B][S],f[M]);g(P,w)||(A.push(B),b.push(P))}}return D[h]=A.length,i.createSparseMatrix({values:b,index:A,ptr:D,size:[y,h],datatype:c===a._datatype&&d===i._datatype?E:void 0})}}),gk="matAlgo03xDSf",yk=["typed"],ct=L(gk,yk,e=>{var{typed:r}=e;return function(n,a,i,o){var u=n._data,s=n._size,l=n._datatype||n.getDataType(),c=a._values,f=a._index,p=a._ptr,v=a._size,m=a._datatype||a._data===void 0?a._datatype:a.getDataType();if(s.length!==v.length)throw new rr(s.length,v.length);if(s[0]!==v[0]||s[1]!==v[1])throw new RangeError("Dimension mismatch. Matrix A ("+s+") must match Matrix B ("+v+")");if(!c)throw new Error("Cannot perform operation on Dense Matrix and Pattern Sparse Matrix");var d=s[0],y=s[1],h,E=0,g=i;typeof l=="string"&&l===m&&l!=="mixed"&&(h=l,E=r.convert(0,h),g=r.find(i,[h,h]));for(var w=[],x=0;x<d;x++)w[x]=[];for(var b=[],A=[],D=0;D<y;D++){for(var S=D+1,N=p[D],C=p[D+1],M=N;M<C;M++){var B=f[M];b[B]=o?g(c[M],u[B][D]):g(u[B][D],c[M]),A[B]=S}for(var P=0;P<d;P++)A[P]===S?w[P][D]=b[P]:w[P][D]=o?g(E,u[P][D]):g(u[P][D],E)}return n.createDenseMatrix({data:w,size:[d,y],datatype:l===n._datatype&&m===a._datatype?h:void 0})}}),bk="matAlgo05xSfSf",xk=["typed","equalScalar"],Su=L(bk,xk,e=>{var{typed:r,equalScalar:t}=e;return function(a,i,o){var u=a._values,s=a._index,l=a._ptr,c=a._size,f=a._datatype||a._data===void 0?a._datatype:a.getDataType(),p=i._values,v=i._index,m=i._ptr,d=i._size,y=i._datatype||i._data===void 0?i._datatype:i.getDataType();if(c.length!==d.length)throw new rr(c.length,d.length);if(c[0]!==d[0]||c[1]!==d[1])throw new RangeError("Dimension mismatch. Matrix A ("+c+") must match Matrix B ("+d+")");var h=c[0],E=c[1],g,w=t,x=0,b=o;typeof f=="string"&&f===y&&f!=="mixed"&&(g=f,w=r.find(t,[g,g]),x=r.convert(0,g),b=r.find(o,[g,g]));var A=u&&p?[]:void 0,D=[],S=[],N=A?[]:void 0,C=A?[]:void 0,M=[],B=[],P,R,_,O;for(R=0;R<E;R++){S[R]=D.length;var U=R+1;for(_=l[R],O=l[R+1];_<O;_++)P=s[_],D.push(P),M[P]=U,N&&(N[P]=u[_]);for(_=m[R],O=m[R+1];_<O;_++)P=v[_],M[P]!==U&&D.push(P),B[P]=U,C&&(C[P]=p[_]);if(A)for(_=S[R];_<D.length;){P=D[_];var F=M[P],q=B[P];if(F===U||q===U){var Y=F===U?N[P]:x,V=q===U?C[P]:x,z=b(Y,V);w(z,x)?D.splice(_,1):(A.push(z),_++)}}}return S[E]=D.length,a.createSparseMatrix({values:A,index:D,ptr:S,size:[h,E],datatype:f===a._datatype&&y===i._datatype?g:void 0})}}),wk="matAlgo13xDD",Ek=["typed"],Sk=L(wk,Ek,e=>{var{typed:r}=e;return function(a,i,o){var u=a._data,s=a._size,l=a._datatype,c=i._data,f=i._size,p=i._datatype,v=[];if(s.length!==f.length)throw new rr(s.length,f.length);for(var m=0;m<s.length;m++){if(s[m]!==f[m])throw new RangeError("Dimension mismatch. Matrix A ("+s+") must match Matrix B ("+f+")");v[m]=s[m]}var d,y=o;typeof l=="string"&&l===p&&(d=l,y=r.find(o,[d,d]));var h=v.length>0?t(y,0,v,v[0],u,c):[];return a.createDenseMatrix({data:h,size:v,datatype:d})};function t(n,a,i,o,u,s){var l=[];if(a===i.length-1)for(var c=0;c<o;c++)l[c]=n(u[c],s[c]);else for(var f=0;f<o;f++)l[f]=t(n,a+1,i,i[a+1],u[f],s[f]);return l}}),Ak="broadcast",Dk=["concat"],Nk=L(Ak,Dk,e=>{var{concat:r}=e;return function(a,i){var o=Math.max(a._size.length,i._size.length);if(a._size.length===i._size.length&&a._size.every((m,d)=>m===i._size[d]))return[a,i];for(var u=t(a._size,o,0),s=t(i._size,o,0),l=[],c=0;c<o;c++)l[c]=Math.max(u[c],s[c]);As(u,l),As(s,l);var f=a.clone(),p=i.clone();f._size.length<o?f.reshape(t(f._size,o,1)):p._size.length<o&&p.reshape(t(p._size,o,1));for(var v=0;v<o;v++)f._size[v]<l[v]&&(f=n(f,l[v],v)),p._size[v]<l[v]&&(p=n(p,l[v],v));return[f,p]};function t(a,i,o){return[...Array(i-a.length).fill(o),...a]}function n(a,i,o){return r(...Array(i).fill(a),o)}}),Ck="matrixAlgorithmSuite",Mk=["typed","matrix","concat"],Cr=L(Ck,Mk,e=>{var{typed:r,matrix:t,concat:n}=e,a=Sk({typed:r}),i=Kt({typed:r}),o=Nk({concat:n});return function(s){var l=s.elop,c=s.SD||s.DS,f;l?(f={"DenseMatrix, DenseMatrix":(d,y)=>a(...o(d,y),l),"Array, Array":(d,y)=>a(...o(t(d),t(y)),l).valueOf(),"Array, DenseMatrix":(d,y)=>a(...o(t(d),y),l),"DenseMatrix, Array":(d,y)=>a(...o(d,t(y)),l)},s.SS&&(f["SparseMatrix, SparseMatrix"]=(d,y)=>s.SS(...o(d,y),l,!1)),s.DS&&(f["DenseMatrix, SparseMatrix"]=(d,y)=>s.DS(...o(d,y),l,!1),f["Array, SparseMatrix"]=(d,y)=>s.DS(...o(t(d),y),l,!1)),c&&(f["SparseMatrix, DenseMatrix"]=(d,y)=>c(...o(y,d),l,!0),f["SparseMatrix, Array"]=(d,y)=>c(...o(t(y),d),l,!0))):(f={"DenseMatrix, DenseMatrix":r.referToSelf(d=>(y,h)=>a(...o(y,h),d)),"Array, Array":r.referToSelf(d=>(y,h)=>a(...o(t(y),t(h)),d).valueOf()),"Array, DenseMatrix":r.referToSelf(d=>(y,h)=>a(...o(t(y),h),d)),"DenseMatrix, Array":r.referToSelf(d=>(y,h)=>a(...o(y,t(h)),d))},s.SS&&(f["SparseMatrix, SparseMatrix"]=r.referToSelf(d=>(y,h)=>s.SS(...o(y,h),d,!1))),s.DS&&(f["DenseMatrix, SparseMatrix"]=r.referToSelf(d=>(y,h)=>s.DS(...o(y,h),d,!1)),f["Array, SparseMatrix"]=r.referToSelf(d=>(y,h)=>s.DS(...o(t(y),h),d,!1))),c&&(f["SparseMatrix, DenseMatrix"]=r.referToSelf(d=>(y,h)=>c(...o(h,y),d,!0)),f["SparseMatrix, Array"]=r.referToSelf(d=>(y,h)=>c(...o(t(h),y),d,!0))));var p=s.scalar||"any",v=s.Ds||s.Ss;v&&(l?(f["DenseMatrix,"+p]=(d,y)=>i(d,y,l,!1),f[p+", DenseMatrix"]=(d,y)=>i(y,d,l,!0),f["Array,"+p]=(d,y)=>i(t(d),y,l,!1).valueOf(),f[p+", Array"]=(d,y)=>i(t(y),d,l,!0).valueOf()):(f["DenseMatrix,"+p]=r.referToSelf(d=>(y,h)=>i(y,h,d,!1)),f[p+", DenseMatrix"]=r.referToSelf(d=>(y,h)=>i(h,y,d,!0)),f["Array,"+p]=r.referToSelf(d=>(y,h)=>i(t(y),h,d,!1).valueOf()),f[p+", Array"]=r.referToSelf(d=>(y,h)=>i(t(h),y,d,!0).valueOf())));var m=s.sS!==void 0?s.sS:s.Ss;return l?(s.Ss&&(f["SparseMatrix,"+p]=(d,y)=>s.Ss(d,y,l,!1)),m&&(f[p+", SparseMatrix"]=(d,y)=>m(y,d,l,!0))):(s.Ss&&(f["SparseMatrix,"+p]=r.referToSelf(d=>(y,h)=>s.Ss(y,h,d,!1))),m&&(f[p+", SparseMatrix"]=r.referToSelf(d=>(y,h)=>m(h,y,d,!0)))),l&&l.signatures&&t2(f,l.signatures),f}}),om="mod",Tk=["typed","config","round","matrix","equalScalar","zeros","DenseMatrix","concat"],Fb=L(om,Tk,e=>{var{typed:r,config:t,round:n,matrix:a,equalScalar:i,zeros:o,DenseMatrix:u,concat:s}=e,l=$b({typed:r,config:t,round:n,matrix:a,equalScalar:i,zeros:o,DenseMatrix:u}),c=Jt({typed:r,equalScalar:i}),f=ct({typed:r}),p=Su({typed:r,equalScalar:i}),v=Jr({typed:r,equalScalar:i}),m=Hr({typed:r,DenseMatrix:u}),d=Cr({typed:r,matrix:a,concat:s});return r(om,{"number, number":y,"BigNumber, BigNumber":function(E,g){return g.isZero()?E:E.sub(g.mul(l(E.div(g))))},"Fraction, Fraction":function(E,g){return g.equals(0)?E:E.sub(g.mul(l(E.div(g))))}},d({SS:p,DS:f,SD:c,Ss:v,sS:m}));function y(h,E){return E===0?h:h-E*l(h/E)}}),Ok="matAlgo01xDSid",_k=["typed"],Ln=L(Ok,_k,e=>{var{typed:r}=e;return function(n,a,i,o){var u=n._data,s=n._size,l=n._datatype||n.getDataType(),c=a._values,f=a._index,p=a._ptr,v=a._size,m=a._datatype||a._data===void 0?a._datatype:a.getDataType();if(s.length!==v.length)throw new rr(s.length,v.length);if(s[0]!==v[0]||s[1]!==v[1])throw new RangeError("Dimension mismatch. Matrix A ("+s+") must match Matrix B ("+v+")");if(!c)throw new Error("Cannot perform operation on Dense Matrix and Pattern Sparse Matrix");var d=s[0],y=s[1],h=typeof l=="string"&&l!=="mixed"&&l===m?l:void 0,E=h?r.find(i,[h,h]):i,g,w,x=[];for(g=0;g<d;g++)x[g]=[];var b=[],A=[];for(w=0;w<y;w++){for(var D=w+1,S=p[w],N=p[w+1],C=S;C<N;C++)g=f[C],b[g]=o?E(c[C],u[g][w]):E(u[g][w],c[C]),A[g]=D;for(g=0;g<d;g++)A[g]===D?x[g][w]=b[g]:x[g][w]=u[g][w]}return n.createDenseMatrix({data:x,size:[d,y],datatype:l===n._datatype&&m===a._datatype?h:void 0})}}),$k="matAlgo04xSidSid",Fk=["typed","equalScalar"],Af=L($k,Fk,e=>{var{typed:r,equalScalar:t}=e;return function(a,i,o){var u=a._values,s=a._index,l=a._ptr,c=a._size,f=a._datatype||a._data===void 0?a._datatype:a.getDataType(),p=i._values,v=i._index,m=i._ptr,d=i._size,y=i._datatype||i._data===void 0?i._datatype:i.getDataType();if(c.length!==d.length)throw new rr(c.length,d.length);if(c[0]!==d[0]||c[1]!==d[1])throw new RangeError("Dimension mismatch. Matrix A ("+c+") must match Matrix B ("+d+")");var h=c[0],E=c[1],g,w=t,x=0,b=o;typeof f=="string"&&f===y&&f!=="mixed"&&(g=f,w=r.find(t,[g,g]),x=r.convert(0,g),b=r.find(o,[g,g]));var A=u&&p?[]:void 0,D=[],S=[],N=u&&p?[]:void 0,C=u&&p?[]:void 0,M=[],B=[],P,R,_,O,U;for(R=0;R<E;R++){S[R]=D.length;var F=R+1;for(O=l[R],U=l[R+1],_=O;_<U;_++)P=s[_],D.push(P),M[P]=F,N&&(N[P]=u[_]);for(O=m[R],U=m[R+1],_=O;_<U;_++)if(P=v[_],M[P]===F){if(N){var q=b(N[P],p[_]);w(q,x)?M[P]=null:N[P]=q}}else D.push(P),B[P]=F,C&&(C[P]=p[_]);if(N&&C)for(_=S[R];_<D.length;)P=D[_],M[P]===F?(A[_]=N[P],_++):B[P]===F?(A[_]=C[P],_++):D.splice(_,1)}return S[E]=D.length,a.createSparseMatrix({values:A,index:D,ptr:S,size:[h,E],datatype:f===a._datatype&&y===i._datatype?g:void 0})}}),Bk="matAlgo10xSids",Rk=["typed","DenseMatrix"],ua=L(Bk,Rk,e=>{var{typed:r,DenseMatrix:t}=e;return function(a,i,o,u){var s=a._values,l=a._index,c=a._ptr,f=a._size,p=a._datatype;if(!s)throw new Error("Cannot perform operation on Pattern Sparse Matrix and Scalar value");var v=f[0],m=f[1],d,y=o;typeof p=="string"&&(d=p,i=r.convert(i,d),y=r.find(o,[d,d]));for(var h=[],E=[],g=[],w=0;w<m;w++){for(var x=w+1,b=c[w],A=c[w+1],D=b;D<A;D++){var S=l[D];E[S]=s[D],g[S]=x}for(var N=0;N<v;N++)w===0&&(h[N]=[]),g[N]===x?h[N][w]=u?y(i,E[N]):y(E[N],i):h[N][w]=i}return new t({data:h,size:[v,m],datatype:d})}});function la(e,r,t,n){if(!(this instanceof la))throw new SyntaxError("Constructor must be called with the new operator");this.fn=e,this.count=r,this.min=t,this.max=n,this.message="Wrong number of arguments in function "+e+" ("+r+" provided, "+t+(n!=null?"-"+n:"")+" expected)",this.stack=new Error().stack}la.prototype=new Error;la.prototype.constructor=Error;la.prototype.name="ArgumentsError";la.prototype.isArgumentsError=!0;var sm="gcd",Pk=["typed","config","round","matrix","equalScalar","zeros","BigNumber","DenseMatrix","concat"],ml="number | BigNumber | Fraction | Matrix | Array",zk="".concat(ml,", ").concat(ml,", ...").concat(ml);function um(e){return!e.some(r=>Array.isArray(r))}var Ik=L(sm,Pk,e=>{var{typed:r,matrix:t,config:n,round:a,equalScalar:i,zeros:o,BigNumber:u,DenseMatrix:s,concat:l}=e,c=Fb({typed:r,config:n,round:a,matrix:t,equalScalar:i,zeros:o,DenseMatrix:s,concat:l}),f=Ln({typed:r}),p=Af({typed:r,equalScalar:i}),v=ua({typed:r,DenseMatrix:s}),m=Cr({typed:r,matrix:t,concat:l});return r(sm,{"number, number":d,"BigNumber, BigNumber":y,"Fraction, Fraction":(h,E)=>h.gcd(E)},m({SS:p,DS:f,Ss:v}),{[zk]:r.referToSelf(h=>(E,g,w)=>{for(var x=h(E,g),b=0;b<w.length;b++)x=h(x,w[b]);return x}),Array:r.referToSelf(h=>E=>{if(E.length===1&&Array.isArray(E[0])&&um(E[0]))return h(...E[0]);if(um(E))return h(...E);throw new la("gcd() supports only 1d matrices!")}),Matrix:r.referToSelf(h=>E=>h(E.toArray()))});function d(h,E){if(!Pe(h)||!Pe(E))throw new Error("Parameters in function gcd must be integer numbers");for(var g;E!==0;)g=c(h,E),h=E,E=g;return h<0?-h:h}function y(h,E){if(!h.isInt()||!E.isInt())throw new Error("Parameters in function gcd must be integer numbers");for(var g=new u(0);!E.isZero();){var w=c(h,E);h=E,E=w}return h.lt(g)?h.neg():h}}),Lk="matAlgo06xS0S0",qk=["typed","equalScalar"],Au=L(Lk,qk,e=>{var{typed:r,equalScalar:t}=e;return function(a,i,o){var u=a._values,s=a._size,l=a._datatype||a._data===void 0?a._datatype:a.getDataType(),c=i._values,f=i._size,p=i._datatype||i._data===void 0?i._datatype:i.getDataType();if(s.length!==f.length)throw new rr(s.length,f.length);if(s[0]!==f[0]||s[1]!==f[1])throw new RangeError("Dimension mismatch. Matrix A ("+s+") must match Matrix B ("+f+")");var v=s[0],m=s[1],d,y=t,h=0,E=o;typeof l=="string"&&l===p&&l!=="mixed"&&(d=l,y=r.find(t,[d,d]),h=r.convert(0,d),E=r.find(o,[d,d]));for(var g=u&&c?[]:void 0,w=[],x=[],b=g?[]:void 0,A=[],D=[],S=0;S<m;S++){x[S]=w.length;var N=S+1;if($d(a,S,A,b,D,N,w,E),$d(i,S,A,b,D,N,w,E),b)for(var C=x[S];C<w.length;){var M=w[C];if(D[M]===N){var B=b[M];y(B,h)?w.splice(C,1):(g.push(B),C++)}else w.splice(C,1)}else for(var P=x[S];P<w.length;){var R=w[P];D[R]!==N?w.splice(P,1):P++}}return x[m]=w.length,a.createSparseMatrix({values:g,index:w,ptr:x,size:[v,m],datatype:l===a._datatype&&p===i._datatype?d:void 0})}}),lm="lcm",kk=["typed","matrix","equalScalar","concat"],Uk=L(lm,kk,e=>{var{typed:r,matrix:t,equalScalar:n,concat:a}=e,i=Jt({typed:r,equalScalar:n}),o=Au({typed:r,equalScalar:n}),u=Jr({typed:r,equalScalar:n}),s=Cr({typed:r,matrix:t,concat:a}),l="number | BigNumber | Fraction | Matrix | Array",c={};return c["".concat(l,", ").concat(l,", ...").concat(l)]=r.referToSelf(p=>(v,m,d)=>{for(var y=p(v,m),h=0;h<d.length;h++)y=p(y,d[h]);return y}),r(lm,{"number, number":G2,"BigNumber, BigNumber":f,"Fraction, Fraction":(p,v)=>p.lcm(v)},s({SS:o,DS:i,Ss:u}),c);function f(p,v){if(!p.isInt()||!v.isInt())throw new Error("Parameters in function lcm must be integer numbers");if(p.isZero())return p;if(v.isZero())return v;for(var m=p.times(v);!v.isZero();){var d=v;v=p.mod(d),p=d}return m.div(p).abs()}}),cm="log10",Hk=["typed","config","Complex"],jk=L(cm,Hk,e=>{var{typed:r,config:t,Complex:n}=e;return r(cm,{number:function(i){return i>=0||t.predictable?W2(i):new n(i,0).log().div(Math.LN10)},Complex:function(i){return new n(i).log().div(Math.LN10)},BigNumber:function(i){return!i.isNegative()||t.predictable?i.log():new n(i.toNumber(),0).log().div(Math.LN10)},"Array | Matrix":r.referToSelf(a=>i=>tr(i,a))})}),fm="log2",Vk=["typed","config","Complex"],Gk=L(fm,Vk,e=>{var{typed:r,config:t,Complex:n}=e;return r(fm,{number:function(o){return o>=0||t.predictable?Z2(o):a(new n(o,0))},Complex:a,BigNumber:function(o){return!o.isNegative()||t.predictable?o.log(2):a(new n(o.toNumber(),0))},"Array | Matrix":r.referToSelf(i=>o=>tr(o,i))});function a(i){var o=Math.sqrt(i.re*i.re+i.im*i.im);return new n(Math.log2?Math.log2(o):Math.log(o)/Math.LN2,Math.atan2(i.im,i.re)/Math.LN2)}}),Wk="multiplyScalar",Zk=["typed"],Yk=L(Wk,Zk,e=>{var{typed:r}=e;return r("multiplyScalar",{"number, number":q2,"Complex, Complex":function(n,a){return n.mul(a)},"BigNumber, BigNumber":function(n,a){return n.times(a)},"Fraction, Fraction":function(n,a){return n.mul(a)},"number | Fraction | BigNumber | Complex, Unit":(t,n)=>n.multiply(t),"Unit, number | Fraction | BigNumber | Complex | Unit":(t,n)=>t.multiply(n)})}),pm="multiply",Xk=["typed","matrix","addScalar","multiplyScalar","equalScalar","dot"],Kk=L(pm,Xk,e=>{var{typed:r,matrix:t,addScalar:n,multiplyScalar:a,equalScalar:i,dot:o}=e,u=Jr({typed:r,equalScalar:i}),s=Kt({typed:r});function l(x,b){switch(x.length){case 1:switch(b.length){case 1:if(x[0]!==b[0])throw new RangeError("Dimension mismatch in multiplication. Vectors must have the same length");break;case 2:if(x[0]!==b[0])throw new RangeError("Dimension mismatch in multiplication. Vector length ("+x[0]+") must match Matrix rows ("+b[0]+")");break;default:throw new Error("Can only multiply a 1 or 2 dimensional matrix (Matrix B has "+b.length+" dimensions)")}break;case 2:switch(b.length){case 1:if(x[1]!==b[0])throw new RangeError("Dimension mismatch in multiplication. Matrix columns ("+x[1]+") must match Vector length ("+b[0]+")");break;case 2:if(x[1]!==b[0])throw new RangeError("Dimension mismatch in multiplication. Matrix A columns ("+x[1]+") must match Matrix B rows ("+b[0]+")");break;default:throw new Error("Can only multiply a 1 or 2 dimensional matrix (Matrix B has "+b.length+" dimensions)")}break;default:throw new Error("Can only multiply a 1 or 2 dimensional matrix (Matrix A has "+x.length+" dimensions)")}}function c(x,b,A){if(A===0)throw new Error("Cannot multiply two empty vectors");return o(x,b)}function f(x,b){if(b.storage()!=="dense")throw new Error("Support for SparseMatrix not implemented");return p(x,b)}function p(x,b){var A=x._data,D=x._size,S=x._datatype||x.getDataType(),N=b._data,C=b._size,M=b._datatype||b.getDataType(),B=D[0],P=C[1],R,_=n,O=a;S&&M&&S===M&&typeof S=="string"&&S!=="mixed"&&(R=S,_=r.find(n,[R,R]),O=r.find(a,[R,R]));for(var U=[],F=0;F<P;F++){for(var q=O(A[0],N[0][F]),Y=1;Y<B;Y++)q=_(q,O(A[Y],N[Y][F]));U[F]=q}return x.createDenseMatrix({data:U,size:[P],datatype:S===x._datatype&&M===b._datatype?R:void 0})}var v=r("_multiplyMatrixVector",{"DenseMatrix, any":d,"SparseMatrix, any":E}),m=r("_multiplyMatrixMatrix",{"DenseMatrix, DenseMatrix":y,"DenseMatrix, SparseMatrix":h,"SparseMatrix, DenseMatrix":g,"SparseMatrix, SparseMatrix":w});function d(x,b){var A=x._data,D=x._size,S=x._datatype||x.getDataType(),N=b._data,C=b._datatype||b.getDataType(),M=D[0],B=D[1],P,R=n,_=a;S&&C&&S===C&&typeof S=="string"&&S!=="mixed"&&(P=S,R=r.find(n,[P,P]),_=r.find(a,[P,P]));for(var O=[],U=0;U<M;U++){for(var F=A[U],q=_(F[0],N[0]),Y=1;Y<B;Y++)q=R(q,_(F[Y],N[Y]));O[U]=q}return x.createDenseMatrix({data:O,size:[M],datatype:S===x._datatype&&C===b._datatype?P:void 0})}function y(x,b){var A=x._data,D=x._size,S=x._datatype||x.getDataType(),N=b._data,C=b._size,M=b._datatype||b.getDataType(),B=D[0],P=D[1],R=C[1],_,O=n,U=a;S&&M&&S===M&&typeof S=="string"&&S!=="mixed"&&S!=="mixed"&&(_=S,O=r.find(n,[_,_]),U=r.find(a,[_,_]));for(var F=[],q=0;q<B;q++){var Y=A[q];F[q]=[];for(var V=0;V<R;V++){for(var z=U(Y[0],N[0][V]),J=1;J<P;J++)z=O(z,U(Y[J],N[J][V]));F[q][V]=z}}return x.createDenseMatrix({data:F,size:[B,R],datatype:S===x._datatype&&M===b._datatype?_:void 0})}function h(x,b){var A=x._data,D=x._size,S=x._datatype||x.getDataType(),N=b._values,C=b._index,M=b._ptr,B=b._size,P=b._datatype||b._data===void 0?b._datatype:b.getDataType();if(!N)throw new Error("Cannot multiply Dense Matrix times Pattern only Matrix");var R=D[0],_=B[1],O,U=n,F=a,q=i,Y=0;S&&P&&S===P&&typeof S=="string"&&S!=="mixed"&&(O=S,U=r.find(n,[O,O]),F=r.find(a,[O,O]),q=r.find(i,[O,O]),Y=r.convert(0,O));for(var V=[],z=[],J=[],le=b.createSparseMatrix({values:V,index:z,ptr:J,size:[R,_],datatype:S===x._datatype&&P===b._datatype?O:void 0}),Q=0;Q<_;Q++){J[Q]=z.length;var re=M[Q],se=M[Q+1];if(se>re)for(var te=0,ae=0;ae<R;ae++){for(var fe=ae+1,ne=void 0,be=re;be<se;be++){var $e=C[be];te!==fe?(ne=F(A[ae][$e],N[be]),te=fe):ne=U(ne,F(A[ae][$e],N[be]))}te===fe&&!q(ne,Y)&&(z.push(ae),V.push(ne))}}return J[_]=z.length,le}function E(x,b){var A=x._values,D=x._index,S=x._ptr,N=x._datatype||x._data===void 0?x._datatype:x.getDataType();if(!A)throw new Error("Cannot multiply Pattern only Matrix times Dense Matrix");var C=b._data,M=b._datatype||b.getDataType(),B=x._size[0],P=b._size[0],R=[],_=[],O=[],U,F=n,q=a,Y=i,V=0;N&&M&&N===M&&typeof N=="string"&&N!=="mixed"&&(U=N,F=r.find(n,[U,U]),q=r.find(a,[U,U]),Y=r.find(i,[U,U]),V=r.convert(0,U));var z=[],J=[];O[0]=0;for(var le=0;le<P;le++){var Q=C[le];if(!Y(Q,V))for(var re=S[le],se=S[le+1],te=re;te<se;te++){var ae=D[te];J[ae]?z[ae]=F(z[ae],q(Q,A[te])):(J[ae]=!0,_.push(ae),z[ae]=q(Q,A[te]))}}for(var fe=_.length,ne=0;ne<fe;ne++){var be=_[ne];R[ne]=z[be]}return O[1]=_.length,x.createSparseMatrix({values:R,index:_,ptr:O,size:[B,1],datatype:N===x._datatype&&M===b._datatype?U:void 0})}function g(x,b){var A=x._values,D=x._index,S=x._ptr,N=x._datatype||x._data===void 0?x._datatype:x.getDataType();if(!A)throw new Error("Cannot multiply Pattern only Matrix times Dense Matrix");var C=b._data,M=b._datatype||b.getDataType(),B=x._size[0],P=b._size[0],R=b._size[1],_,O=n,U=a,F=i,q=0;N&&M&&N===M&&typeof N=="string"&&N!=="mixed"&&(_=N,O=r.find(n,[_,_]),U=r.find(a,[_,_]),F=r.find(i,[_,_]),q=r.convert(0,_));for(var Y=[],V=[],z=[],J=x.createSparseMatrix({values:Y,index:V,ptr:z,size:[B,R],datatype:N===x._datatype&&M===b._datatype?_:void 0}),le=[],Q=[],re=0;re<R;re++){z[re]=V.length;for(var se=re+1,te=0;te<P;te++){var ae=C[te][re];if(!F(ae,q))for(var fe=S[te],ne=S[te+1],be=fe;be<ne;be++){var $e=D[be];Q[$e]!==se?(Q[$e]=se,V.push($e),le[$e]=U(ae,A[be])):le[$e]=O(le[$e],U(ae,A[be]))}}for(var k=z[re],W=V.length,ue=k;ue<W;ue++){var j=V[ue];Y[ue]=le[j]}}return z[R]=V.length,J}function w(x,b){var A=x._values,D=x._index,S=x._ptr,N=x._datatype||x._data===void 0?x._datatype:x.getDataType(),C=b._values,M=b._index,B=b._ptr,P=b._datatype||b._data===void 0?b._datatype:b.getDataType(),R=x._size[0],_=b._size[1],O=A&&C,U,F=n,q=a;N&&P&&N===P&&typeof N=="string"&&N!=="mixed"&&(U=N,F=r.find(n,[U,U]),q=r.find(a,[U,U]));for(var Y=O?[]:void 0,V=[],z=[],J=x.createSparseMatrix({values:Y,index:V,ptr:z,size:[R,_],datatype:N===x._datatype&&P===b._datatype?U:void 0}),le=O?[]:void 0,Q=[],re,se,te,ae,fe,ne,be,$e,k=0;k<_;k++){z[k]=V.length;var W=k+1;for(fe=B[k],ne=B[k+1],ae=fe;ae<ne;ae++)if($e=M[ae],O)for(se=S[$e],te=S[$e+1],re=se;re<te;re++)be=D[re],Q[be]!==W?(Q[be]=W,V.push(be),le[be]=q(C[ae],A[re])):le[be]=F(le[be],q(C[ae],A[re]));else for(se=S[$e],te=S[$e+1],re=se;re<te;re++)be=D[re],Q[be]!==W&&(Q[be]=W,V.push(be));if(O)for(var ue=z[k],j=V.length,K=ue;K<j;K++){var oe=V[K];Y[K]=le[oe]}}return z[_]=V.length,J}return r(pm,a,{"Array, Array":r.referTo("Matrix, Matrix",x=>(b,A)=>{l(Xe(b),Xe(A));var D=x(t(b),t(A));return ke(D)?D.valueOf():D}),"Matrix, Matrix":function(b,A){var D=b.size(),S=A.size();return l(D,S),D.length===1?S.length===1?c(b,A,D[0]):f(b,A):S.length===1?v(b,A):m(b,A)},"Matrix, Array":r.referTo("Matrix,Matrix",x=>(b,A)=>x(b,t(A))),"Array, Matrix":r.referToSelf(x=>(b,A)=>x(t(b,A.storage()),A)),"SparseMatrix, any":function(b,A){return u(b,A,a,!1)},"DenseMatrix, any":function(b,A){return s(b,A,a,!1)},"any, SparseMatrix":function(b,A){return u(A,b,a,!0)},"any, DenseMatrix":function(b,A){return s(A,b,a,!0)},"Array, any":function(b,A){return s(t(b),A,a,!1).valueOf()},"any, Array":function(b,A){return s(t(A),b,a,!0).valueOf()},"any, any":a,"any, any, ...any":r.referToSelf(x=>(b,A,D)=>{for(var S=x(b,A),N=0;N<D.length;N++)S=x(S,D[N]);return S})})}),vm="nthRoot",Jk=["typed","matrix","equalScalar","BigNumber","concat"],Qk=L(vm,Jk,e=>{var{typed:r,matrix:t,equalScalar:n,BigNumber:a,concat:i}=e,o=Ln({typed:r}),u=Jt({typed:r,equalScalar:n}),s=Au({typed:r,equalScalar:n}),l=Jr({typed:r,equalScalar:n}),c=Cr({typed:r,matrix:t,concat:i});function f(){throw new Error("Complex number not supported in function nthRoot. Use nthRoots instead.")}return r(vm,{number:Bd,"number, number":Bd,BigNumber:v=>p(v,new a(2)),"BigNumber, BigNumber":p,Complex:f,"Complex, number":f,Array:r.referTo("DenseMatrix,number",v=>m=>v(t(m),2).valueOf()),DenseMatrix:r.referTo("DenseMatrix,number",v=>m=>v(m,2)),SparseMatrix:r.referTo("SparseMatrix,number",v=>m=>v(m,2)),"SparseMatrix, SparseMatrix":r.referToSelf(v=>(m,d)=>{if(d.density()===1)return s(m,d,v);throw new Error("Root must be non-zero")}),"DenseMatrix, SparseMatrix":r.referToSelf(v=>(m,d)=>{if(d.density()===1)return o(m,d,v,!1);throw new Error("Root must be non-zero")}),"Array, SparseMatrix":r.referTo("DenseMatrix,SparseMatrix",v=>(m,d)=>v(t(m),d)),"number | BigNumber, SparseMatrix":r.referToSelf(v=>(m,d)=>{if(d.density()===1)return l(d,m,v,!0);throw new Error("Root must be non-zero")})},c({scalar:"number | BigNumber",SD:u,Ss:l,sS:!1}));function p(v,m){var d=a.precision,y=a.clone({precision:d+2}),h=new a(0),E=new y(1),g=m.isNegative();if(g&&(m=m.neg()),m.isZero())throw new Error("Root must be non-zero");if(v.isNegative()&&!m.abs().mod(2).equals(1))throw new Error("Root must be odd when a is negative.");if(v.isZero())return g?new y(1/0):0;if(!v.isFinite())return g?h:v;var w=v.abs().pow(E.div(m));return w=v.isNeg()?w.neg():w,new a((g?E.div(w):w).toPrecision(d))}}),dm="sign",eU=["typed","BigNumber","Fraction","complex"],rU=L(dm,eU,e=>{var{typed:r,BigNumber:t,complex:n,Fraction:a}=e;return r(dm,{number:Ql,Complex:function(o){return o.im===0?n(Ql(o.re)):o.sign()},BigNumber:function(o){return new t(o.cmp(0))},Fraction:function(o){return new a(o.s,1)},"Array | Matrix":r.referToSelf(i=>o=>tr(o,i)),Unit:r.referToSelf(i=>o=>{if(!o._isDerived()&&o.units[0].unit.offset!==0)throw new TypeError("sign is ambiguous for units with offset");return r.find(i,o.valueType())(o.value)})})}),tU="sqrt",nU=["config","typed","Complex"],aU=L(tU,nU,e=>{var{config:r,typed:t,Complex:n}=e;return t("sqrt",{number:a,Complex:function(o){return o.sqrt()},BigNumber:function(o){return!o.isNegative()||r.predictable?o.sqrt():a(o.toNumber())},Unit:function(o){return o.pow(.5)}});function a(i){return isNaN(i)?NaN:i>=0||r.predictable?Math.sqrt(i):new n(i,0).sqrt()}}),mm="square",iU=["typed"],oU=L(mm,iU,e=>{var{typed:r}=e;return r(mm,{number:Y2,Complex:function(n){return n.mul(n)},BigNumber:function(n){return n.times(n)},Fraction:function(n){return n.mul(n)},Unit:function(n){return n.pow(2)}})}),hm="subtract",sU=["typed","matrix","equalScalar","subtractScalar","unaryMinus","DenseMatrix","concat"],uU=L(hm,sU,e=>{var{typed:r,matrix:t,equalScalar:n,subtractScalar:a,unaryMinus:i,DenseMatrix:o,concat:u}=e,s=Ln({typed:r}),l=ct({typed:r}),c=Su({typed:r,equalScalar:n}),f=ua({typed:r,DenseMatrix:o}),p=Hr({typed:r,DenseMatrix:o}),v=Cr({typed:r,matrix:t,concat:u});return r(hm,{"any, any":a},v({elop:a,SS:c,DS:s,SD:l,Ss:p,sS:f}))}),gm="xgcd",lU=["typed","config","matrix","BigNumber"],cU=L(gm,lU,e=>{var{typed:r,config:t,matrix:n,BigNumber:a}=e;return r(gm,{"number, number":function(u,s){var l=X2(u,s);return t.matrix==="Array"?l:n(l)},"BigNumber, BigNumber":i});function i(o,u){var s,l,c,f=new a(0),p=new a(1),v=f,m=p,d=p,y=f;if(!o.isInt()||!u.isInt())throw new Error("Parameters in function xgcd must be integer numbers");for(;!u.isZero();)l=o.div(u).floor(),c=o.mod(u),s=v,v=m.minus(l.times(v)),m=s,s=d,d=y.minus(l.times(d)),y=s,o=u,u=c;var h;return o.lt(f)?h=[o.neg(),m.neg(),y.neg()]:h=[o,o.isZero()?0:m,y],t.matrix==="Array"?h:n(h)}}),ym="invmod",fU=["typed","config","BigNumber","xgcd","equal","smaller","mod","add","isInteger"],pU=L(ym,fU,e=>{var{typed:r,config:t,BigNumber:n,xgcd:a,equal:i,smaller:o,mod:u,add:s,isInteger:l}=e;return r(ym,{"number, number":c,"BigNumber, BigNumber":c});function c(f,p){if(!l(f)||!l(p))throw new Error("Parameters in function invmod must be integer numbers");if(f=u(f,p),i(p,0))throw new Error("Divisor must be non zero");var v=a(f,p);v=v.valueOf();var[m,d]=v;return i(m,n(1))?(d=u(d,p),o(d,n(0))&&(d=s(d,p)),d):NaN}}),vU="matAlgo09xS0Sf",dU=["typed","equalScalar"],Bb=L(vU,dU,e=>{var{typed:r,equalScalar:t}=e;return function(a,i,o){var u=a._values,s=a._index,l=a._ptr,c=a._size,f=a._datatype||a._data===void 0?a._datatype:a.getDataType(),p=i._values,v=i._index,m=i._ptr,d=i._size,y=i._datatype||i._data===void 0?i._datatype:i.getDataType();if(c.length!==d.length)throw new rr(c.length,d.length);if(c[0]!==d[0]||c[1]!==d[1])throw new RangeError("Dimension mismatch. Matrix A ("+c+") must match Matrix B ("+d+")");var h=c[0],E=c[1],g,w=t,x=0,b=o;typeof f=="string"&&f===y&&f!=="mixed"&&(g=f,w=r.find(t,[g,g]),x=r.convert(0,g),b=r.find(o,[g,g]));var A=u&&p?[]:void 0,D=[],S=[],N=A?[]:void 0,C=[],M,B,P,R,_;for(B=0;B<E;B++){S[B]=D.length;var O=B+1;if(N)for(R=m[B],_=m[B+1],P=R;P<_;P++)M=v[P],C[M]=O,N[M]=p[P];for(R=l[B],_=l[B+1],P=R;P<_;P++)if(M=s[P],N){var U=C[M]===O?N[M]:x,F=b(u[P],U);w(F,x)||(D.push(M),A.push(F))}else D.push(M)}return S[E]=D.length,a.createSparseMatrix({values:A,index:D,ptr:S,size:[h,E],datatype:f===a._datatype&&y===i._datatype?g:void 0})}}),bm="dotMultiply",mU=["typed","matrix","equalScalar","multiplyScalar","concat"],hU=L(bm,mU,e=>{var{typed:r,matrix:t,equalScalar:n,multiplyScalar:a,concat:i}=e,o=Jt({typed:r,equalScalar:n}),u=Bb({typed:r,equalScalar:n}),s=Jr({typed:r,equalScalar:n}),l=Cr({typed:r,matrix:t,concat:i});return r(bm,l({elop:a,SS:u,DS:o,Ss:s}))});function gU(e,r){if(e.isFinite()&&!e.isInteger()||r.isFinite()&&!r.isInteger())throw new Error("Integers expected in function bitAnd");var t=e.constructor;if(e.isNaN()||r.isNaN())return new t(NaN);if(e.isZero()||r.eq(-1)||e.eq(r))return e;if(r.isZero()||e.eq(-1))return r;if(!e.isFinite()||!r.isFinite()){if(!e.isFinite()&&!r.isFinite())return e.isNegative()===r.isNegative()?e:new t(0);if(!e.isFinite())return r.isNegative()?e:e.isNegative()?new t(0):r;if(!r.isFinite())return e.isNegative()?r:r.isNegative()?new t(0):e}return Df(e,r,function(n,a){return n&a})}function eo(e){if(e.isFinite()&&!e.isInteger())throw new Error("Integer expected in function bitNot");var r=e.constructor,t=r.precision;r.config({precision:1e9});var n=e.plus(new r(1));return n.s=-n.s||null,r.config({precision:t}),n}function yU(e,r){if(e.isFinite()&&!e.isInteger()||r.isFinite()&&!r.isInteger())throw new Error("Integers expected in function bitOr");var t=e.constructor;if(e.isNaN()||r.isNaN())return new t(NaN);var n=new t(-1);return e.isZero()||r.eq(n)||e.eq(r)?r:r.isZero()||e.eq(n)?e:!e.isFinite()||!r.isFinite()?!e.isFinite()&&!e.isNegative()&&r.isNegative()||e.isNegative()&&!r.isNegative()&&!r.isFinite()?n:e.isNegative()&&r.isNegative()?e.isFinite()?e:r:e.isFinite()?r:e:Df(e,r,function(a,i){return a|i})}function Df(e,r,t){var n=e.constructor,a,i,o=+(e.s<0),u=+(r.s<0);if(o){a=Lo(eo(e));for(var s=0;s<a.length;++s)a[s]^=1}else a=Lo(e);if(u){i=Lo(eo(r));for(var l=0;l<i.length;++l)i[l]^=1}else i=Lo(r);var c,f,p;a.length<=i.length?(c=a,f=i,p=o):(c=i,f=a,p=u);var v=c.length,m=f.length,d=t(o,u)^1,y=new n(d^1),h=new n(1),E=new n(2),g=n.precision;for(n.config({precision:1e9});v>0;)t(c[--v],f[--m])===d&&(y=y.plus(h)),h=h.times(E);for(;m>0;)t(p,f[--m])===d&&(y=y.plus(h)),h=h.times(E);return n.config({precision:g}),d===0&&(y.s=-y.s),y}function Lo(e){for(var r=e.d,t=r[0]+"",n=1;n<r.length;++n){for(var a=r[n]+"",i=7-a.length;i--;)a="0"+a;t+=a}for(var o=t.length;t.charAt(o)==="0";)o--;var u=e.e,s=t.slice(0,o+1||1),l=s.length;if(u>0)if(++u>l)for(u-=l;u--;)s+="0";else u<l&&(s=s.slice(0,u)+"."+s.slice(u));for(var c=[0],f=0;f<s.length;){for(var p=c.length;p--;)c[p]*=10;c[0]+=parseInt(s.charAt(f++));for(var v=0;v<c.length;++v)c[v]>1&&((c[v+1]===null||c[v+1]===void 0)&&(c[v+1]=0),c[v+1]+=c[v]>>1,c[v]&=1)}return c.reverse()}function bU(e,r){if(e.isFinite()&&!e.isInteger()||r.isFinite()&&!r.isInteger())throw new Error("Integers expected in function bitXor");var t=e.constructor;if(e.isNaN()||r.isNaN())return new t(NaN);if(e.isZero())return r;if(r.isZero())return e;if(e.eq(r))return new t(0);var n=new t(-1);return e.eq(n)?eo(r):r.eq(n)?eo(e):!e.isFinite()||!r.isFinite()?!e.isFinite()&&!r.isFinite()?n:new t(e.isNegative()===r.isNegative()?1/0:-1/0):Df(e,r,function(a,i){return a^i})}function xU(e,r){if(e.isFinite()&&!e.isInteger()||r.isFinite()&&!r.isInteger())throw new Error("Integers expected in function leftShift");var t=e.constructor;return e.isNaN()||r.isNaN()||r.isNegative()&&!r.isZero()?new t(NaN):e.isZero()||r.isZero()?e:!e.isFinite()&&!r.isFinite()?new t(NaN):r.lt(55)?e.times(Math.pow(2,r.toNumber())+""):e.times(new t(2).pow(r))}function wU(e,r){if(e.isFinite()&&!e.isInteger()||r.isFinite()&&!r.isInteger())throw new Error("Integers expected in function rightArithShift");var t=e.constructor;return e.isNaN()||r.isNaN()||r.isNegative()&&!r.isZero()?new t(NaN):e.isZero()||r.isZero()?e:r.isFinite()?r.lt(55)?e.div(Math.pow(2,r.toNumber())+"").floor():e.div(new t(2).pow(r)).floor():e.isNegative()?new t(-1):e.isFinite()?new t(0):new t(NaN)}var xm="bitAnd",EU=["typed","matrix","equalScalar","concat"],Rb=L(xm,EU,e=>{var{typed:r,matrix:t,equalScalar:n,concat:a}=e,i=Jt({typed:r,equalScalar:n}),o=Au({typed:r,equalScalar:n}),u=Jr({typed:r,equalScalar:n}),s=Cr({typed:r,matrix:t,concat:a});return r(xm,{"number, number":J2,"BigNumber, BigNumber":gU},s({SS:o,DS:i,Ss:u}))}),wm="bitNot",SU=["typed"],AU=L(wm,SU,e=>{var{typed:r}=e;return r(wm,{number:Q2,BigNumber:eo,"Array | Matrix":r.referToSelf(t=>n=>tr(n,t))})}),Em="bitOr",DU=["typed","matrix","equalScalar","DenseMatrix","concat"],Pb=L(Em,DU,e=>{var{typed:r,matrix:t,equalScalar:n,DenseMatrix:a,concat:i}=e,o=Ln({typed:r}),u=Af({typed:r,equalScalar:n}),s=ua({typed:r,DenseMatrix:a}),l=Cr({typed:r,matrix:t,concat:i});return r(Em,{"number, number":eb,"BigNumber, BigNumber":yU},l({SS:u,DS:o,Ss:s}))}),NU="matAlgo07xSSf",CU=["typed","DenseMatrix"],an=L(NU,CU,e=>{var{typed:r,DenseMatrix:t}=e;return function(i,o,u){var s=i._size,l=i._datatype||i._data===void 0?i._datatype:i.getDataType(),c=o._size,f=o._datatype||o._data===void 0?o._datatype:o.getDataType();if(s.length!==c.length)throw new rr(s.length,c.length);if(s[0]!==c[0]||s[1]!==c[1])throw new RangeError("Dimension mismatch. Matrix A ("+s+") must match Matrix B ("+c+")");var p=s[0],v=s[1],m,d=0,y=u;typeof l=="string"&&l===f&&l!=="mixed"&&(m=l,d=r.convert(0,m),y=r.find(u,[m,m]));var h,E,g=[];for(h=0;h<p;h++)g[h]=[];var w=[],x=[],b=[],A=[];for(E=0;E<v;E++){var D=E+1;for(n(i,E,b,w,D),n(o,E,A,x,D),h=0;h<p;h++){var S=b[h]===D?w[h]:d,N=A[h]===D?x[h]:d;g[h][E]=y(S,N)}}return new t({data:g,size:[p,v],datatype:l===i._datatype&&f===o._datatype?m:void 0})};function n(a,i,o,u,s){for(var l=a._values,c=a._index,f=a._ptr,p=f[i],v=f[i+1];p<v;p++){var m=c[p];o[m]=s,u[m]=l[p]}}}),Sm="bitXor",MU=["typed","matrix","DenseMatrix","concat"],TU=L(Sm,MU,e=>{var{typed:r,matrix:t,DenseMatrix:n,concat:a}=e,i=ct({typed:r}),o=an({typed:r,DenseMatrix:n}),u=Hr({typed:r,DenseMatrix:n}),s=Cr({typed:r,matrix:t,concat:a});return r(Sm,{"number, number":rb,"BigNumber, BigNumber":bU},s({SS:o,DS:i,Ss:u}))}),Am="arg",OU=["typed"],_U=L(Am,OU,e=>{var{typed:r}=e;return r(Am,{number:function(n){return Math.atan2(0,n)},BigNumber:function(n){return n.constructor.atan2(0,n)},Complex:function(n){return n.arg()},"Array | Matrix":r.referToSelf(t=>n=>tr(n,t))})}),Dm="conj",$U=["typed"],FU=L(Dm,$U,e=>{var{typed:r}=e;return r(Dm,{"number | BigNumber | Fraction":t=>t,Complex:t=>t.conjugate(),"Array | Matrix":r.referToSelf(t=>n=>tr(n,t))})}),Nm="im",BU=["typed"],RU=L(Nm,BU,e=>{var{typed:r}=e;return r(Nm,{number:()=>0,"BigNumber | Fraction":t=>t.mul(0),Complex:t=>t.im,"Array | Matrix":r.referToSelf(t=>n=>tr(n,t))})}),Cm="re",PU=["typed"],zU=L(Cm,PU,e=>{var{typed:r}=e;return r(Cm,{"number | BigNumber | Fraction":t=>t,Complex:t=>t.re,"Array | Matrix":r.referToSelf(t=>n=>tr(n,t))})}),Mm="not",IU=["typed"],LU=L(Mm,IU,e=>{var{typed:r}=e;return r(Mm,{"null | undefined":()=>!0,number:ob,Complex:function(n){return n.re===0&&n.im===0},BigNumber:function(n){return n.isZero()||n.isNaN()},Unit:r.referToSelf(t=>n=>r.find(t,n.valueType())(n.value)),"Array | Matrix":r.referToSelf(t=>n=>tr(n,t))})}),Tm="or",qU=["typed","matrix","equalScalar","DenseMatrix","concat"],zb=L(Tm,qU,e=>{var{typed:r,matrix:t,equalScalar:n,DenseMatrix:a,concat:i}=e,o=ct({typed:r}),u=Su({typed:r,equalScalar:n}),s=Hr({typed:r,DenseMatrix:a}),l=Cr({typed:r,matrix:t,concat:i});return r(Tm,{"number, number":sb,"Complex, Complex":function(f,p){return f.re!==0||f.im!==0||p.re!==0||p.im!==0},"BigNumber, BigNumber":function(f,p){return!f.isZero()&&!f.isNaN()||!p.isZero()&&!p.isNaN()},"Unit, Unit":r.referToSelf(c=>(f,p)=>c(f.value||0,p.value||0))},l({SS:u,DS:o,Ss:s}))}),Om="xor",kU=["typed","matrix","DenseMatrix","concat"],UU=L(Om,kU,e=>{var{typed:r,matrix:t,DenseMatrix:n,concat:a}=e,i=ct({typed:r}),o=an({typed:r,DenseMatrix:n}),u=Hr({typed:r,DenseMatrix:n}),s=Cr({typed:r,matrix:t,concat:a});return r(Om,{"number, number":ub,"Complex, Complex":function(c,f){return(c.re!==0||c.im!==0)!=(f.re!==0||f.im!==0)},"BigNumber, BigNumber":function(c,f){return(!c.isZero()&&!c.isNaN())!=(!f.isZero()&&!f.isNaN())},"Unit, Unit":r.referToSelf(l=>(c,f)=>l(c.value||0,f.value||0))},s({SS:o,DS:i,Ss:u}))}),_m="concat",HU=["typed","matrix","isInteger"],Ib=L(_m,HU,e=>{var{typed:r,matrix:t,isInteger:n}=e;return r(_m,{"...Array | Matrix | number | BigNumber":function(i){var o,u=i.length,s=-1,l,c=!1,f=[];for(o=0;o<u;o++){var p=i[o];if(ke(p)&&(c=!0),Ke(p)||Je(p)){if(o!==u-1)throw new Error("Dimension must be specified as last argument");if(l=s,s=p.valueOf(),!n(s))throw new TypeError("Integer number expected for dimension");if(s<0||o>0&&s>l)throw new Yt(s,l+1)}else{var v=Ge(p).valueOf(),m=Xe(v);if(f[o]=v,l=s,s=m.length-1,o>0&&s!==l)throw new rr(l+1,s+1)}}if(f.length===0)throw new SyntaxError("At least one matrix expected");for(var d=f.shift();f.length;)d=m2(d,f.shift(),s);return c?t(d):d},"...string":function(i){return i.join("")}})}),$m="column",jU=["typed","Index","matrix","range"],Lb=L($m,jU,e=>{var{typed:r,Index:t,matrix:n,range:a}=e;return r($m,{"Matrix, number":i,"Array, number":function(u,s){return i(n(Ge(u)),s).valueOf()}});function i(o,u){if(o.size().length!==2)throw new Error("Only two dimensional matrix is supported");Sr(u,o.size()[1]);var s=a(0,o.size()[0]),l=new t(s,u),c=o.subset(l);return ke(c)?c:n([[c]])}}),Fm="count",VU=["typed","size","prod"],GU=L(Fm,VU,e=>{var{typed:r,size:t,prod:n}=e;return r(Fm,{string:function(i){return i.length},"Matrix | Array":function(i){return n(t(i))}})}),Bm="cross",WU=["typed","matrix","subtract","multiply"],ZU=L(Bm,WU,e=>{var{typed:r,matrix:t,subtract:n,multiply:a}=e;return r(Bm,{"Matrix, Matrix":function(u,s){return t(i(u.toArray(),s.toArray()))},"Matrix, Array":function(u,s){return t(i(u.toArray(),s))},"Array, Matrix":function(u,s){return t(i(u,s.toArray()))},"Array, Array":i});function i(o,u){var s=Math.max(Xe(o).length,Xe(u).length);o=ws(o),u=ws(u);var l=Xe(o),c=Xe(u);if(l.length!==1||c.length!==1||l[0]!==3||c[0]!==3)throw new RangeError("Vectors with length 3 expected (Size A = ["+l.join(", ")+"], B = ["+c.join(", ")+"])");var f=[n(a(o[1],u[2]),a(o[2],u[1])),n(a(o[2],u[0]),a(o[0],u[2])),n(a(o[0],u[1]),a(o[1],u[0]))];return s>1?[f]:f}}),Rm="diag",YU=["typed","matrix","DenseMatrix","SparseMatrix"],XU=L(Rm,YU,e=>{var{typed:r,matrix:t,DenseMatrix:n,SparseMatrix:a}=e;return r(Rm,{Array:function(l){return i(l,0,Xe(l),null)},"Array, number":function(l,c){return i(l,c,Xe(l),null)},"Array, BigNumber":function(l,c){return i(l,c.toNumber(),Xe(l),null)},"Array, string":function(l,c){return i(l,0,Xe(l),c)},"Array, number, string":function(l,c,f){return i(l,c,Xe(l),f)},"Array, BigNumber, string":function(l,c,f){return i(l,c.toNumber(),Xe(l),f)},Matrix:function(l){return i(l,0,l.size(),l.storage())},"Matrix, number":function(l,c){return i(l,c,l.size(),l.storage())},"Matrix, BigNumber":function(l,c){return i(l,c.toNumber(),l.size(),l.storage())},"Matrix, string":function(l,c){return i(l,0,l.size(),c)},"Matrix, number, string":function(l,c,f){return i(l,c,l.size(),f)},"Matrix, BigNumber, string":function(l,c,f){return i(l,c.toNumber(),l.size(),f)}});function i(s,l,c,f){if(!Pe(l))throw new TypeError("Second parameter in function diag must be an integer");var p=l>0?l:0,v=l<0?-l:0;switch(c.length){case 1:return o(s,l,f,c[0],v,p);case 2:return u(s,l,f,c,v,p)}throw new RangeError("Matrix for function diag must be 2 dimensional")}function o(s,l,c,f,p,v){var m=[f+p,f+v];if(c&&c!=="sparse"&&c!=="dense")throw new TypeError("Unknown matrix type ".concat(c,'"'));var d=c==="sparse"?a.diagonal(m,s,l):n.diagonal(m,s,l);return c!==null?d:d.valueOf()}function u(s,l,c,f,p,v){if(ke(s)){var m=s.diagonal(l);return c!==null?c!==m.storage()?t(m,c):m:m.valueOf()}for(var d=Math.min(f[0]-p,f[1]-v),y=[],h=0;h<d;h++)y[h]=s[h+p][h+v];return c!==null?t(y):y}});function Ei(e,r,t,n,a){if(Ha.isTypedFunction(e)){var i=[r,t,n],o=Ha.resolve(e,i);if(o)return f(o.implementation,i);var u=[r,t],s=Ha.resolve(e,u);if(s)return f(s.implementation,u);var l=[r],c=Ha.resolve(e,l);return c?f(c.implementation,l):f(e,i)}else return e(r,t,n);function f(p,v){try{return p.apply(p,v)}catch(y){var m;if(y instanceof TypeError&&((m=y.data)===null||m===void 0?void 0:m.category)==="wrongType"){var d=[];throw d.push("value: ".concat(Dr(r))),v.length>=2&&d.push("index: ".concat(Dr(t))),v.length>=3&&d.push("array: ".concat(Dr(n))),new TypeError("Function ".concat(a," cannot apply callback arguments ")+"".concat(e.name,"(").concat(d.join(", "),") at index ").concat(JSON.stringify(t)))}else throw new TypeError("Function ".concat(a," cannot apply callback arguments ")+"to function ".concat(e.name,": ").concat(y.message))}}}var KU="filter",JU=["typed"],QU=L(KU,JU,e=>{var{typed:r}=e;return r("filter",{"Array, function":Pm,"Matrix, function":function(n,a){return n.create(Pm(n.toArray(),a))},"Array, RegExp":Es,"Matrix, RegExp":function(n,a){return n.create(Es(n.toArray(),a))}})});function Pm(e,r){return v2(e,function(t,n,a){return Ei(r,t,[n],a,"filter")})}var zm="flatten",eH=["typed","matrix"],rH=L(zm,eH,e=>{var{typed:r,matrix:t}=e;return r(zm,{Array:function(a){return dr(a)},Matrix:function(a){var i=dr(a.toArray());return t(i)}})}),Im="forEach",tH=["typed"],nH=L(Im,tH,e=>{var{typed:r}=e;return r(Im,{"Array, function":aH,"Matrix, function":function(n,a){n.forEach(a)}})});function aH(e,r){var t=function n(a,i){if(Array.isArray(a))hu(a,function(o,u){n(o,i.concat(u))});else return Ei(r,a,i,e,"forEach")};t(e,[])}var Lm="getMatrixDataType",iH=["typed"],oH=L(Lm,iH,e=>{var{typed:r}=e;return r(Lm,{Array:function(n){return Ki(n,Dr)},Matrix:function(n){return n.getDataType()}})}),qm="identity",sH=["typed","config","matrix","BigNumber","DenseMatrix","SparseMatrix"],uH=L(qm,sH,e=>{var{typed:r,config:t,matrix:n,BigNumber:a,DenseMatrix:i,SparseMatrix:o}=e;return r(qm,{"":function(){return t.matrix==="Matrix"?n([]):[]},string:function(c){return n(c)},"number | BigNumber":function(c){return s(c,c,t.matrix==="Matrix"?"dense":void 0)},"number | BigNumber, string":function(c,f){return s(c,c,f)},"number | BigNumber, number | BigNumber":function(c,f){return s(c,f,t.matrix==="Matrix"?"dense":void 0)},"number | BigNumber, number | BigNumber, string":function(c,f,p){return s(c,f,p)},Array:function(c){return u(c)},"Array, string":function(c,f){return u(c,f)},Matrix:function(c){return u(c.valueOf(),c.storage())},"Matrix, string":function(c,f){return u(c.valueOf(),f)}});function u(l,c){switch(l.length){case 0:return c?n(c):[];case 1:return s(l[0],l[0],c);case 2:return s(l[0],l[1],c);default:throw new Error("Vector containing two values expected")}}function s(l,c,f){var p=Je(l)||Je(c)?a:null;if(Je(l)&&(l=l.toNumber()),Je(c)&&(c=c.toNumber()),!Pe(l)||l<1)throw new Error("Parameters in function identity must be positive integers");if(!Pe(c)||c<1)throw new Error("Parameters in function identity must be positive integers");var v=p?new a(1):1,m=p?new p(0):0,d=[l,c];if(f){if(f==="sparse")return o.diagonal(d,v,0,m);if(f==="dense")return i.diagonal(d,v,0,m);throw new TypeError('Unknown matrix type "'.concat(f,'"'))}for(var y=Ka([],d,m),h=l<c?l:c,E=0;E<h;E++)y[E][E]=v;return y}}),km="kron",lH=["typed","matrix","multiplyScalar"],cH=L(km,lH,e=>{var{typed:r,matrix:t,multiplyScalar:n}=e;return r(km,{"Matrix, Matrix":function(o,u){return t(a(o.toArray(),u.toArray()))},"Matrix, Array":function(o,u){return t(a(o.toArray(),u))},"Array, Matrix":function(o,u){return t(a(o,u.toArray()))},"Array, Array":a});function a(i,o){if(Xe(i).length===1&&(i=[i]),Xe(o).length===1&&(o=[o]),Xe(i).length>2||Xe(o).length>2)throw new RangeError("Vectors with dimensions greater then 2 are not supported expected (Size x = "+JSON.stringify(i.length)+", y = "+JSON.stringify(o.length)+")");var u=[],s=[];return i.map(function(l){return o.map(function(c){return s=[],u.push(s),l.map(function(f){return c.map(function(p){return s.push(n(f,p))})})})})&&u}}),Um="map",fH=["typed"],pH=L(Um,fH,e=>{var{typed:r}=e;return r(Um,{"Array, function":vH,"Matrix, function":function(n,a){return n.map(a)}})});function vH(e,r){var t=function n(a,i){return Array.isArray(a)?a.map(function(o,u){return n(o,i.concat(u))}):Ei(r,a,i,e,"map")};return t(e,[])}var Hm="diff",dH=["typed","matrix","subtract","number"],qb=L(Hm,dH,e=>{var{typed:r,matrix:t,subtract:n,number:a}=e;return r(Hm,{"Array | Matrix":function(c){return ke(c)?t(o(c.toArray())):o(c)},"Array | Matrix, number":function(c,f){if(!Pe(f))throw new RangeError("Dimension must be a whole number");return ke(c)?t(i(c.toArray(),f)):i(c,f)},"Array, BigNumber":r.referTo("Array,number",l=>(c,f)=>l(c,a(f))),"Matrix, BigNumber":r.referTo("Matrix,number",l=>(c,f)=>l(c,a(f)))});function i(l,c){if(ke(l)&&(l=l.toArray()),!Array.isArray(l))throw RangeError("Array/Matrix does not have that many dimensions");if(c>0){var f=[];return l.forEach(p=>{f.push(i(p,c-1))}),f}else{if(c===0)return o(l);throw RangeError("Cannot have negative dimension")}}function o(l){for(var c=[],f=l.length,p=1;p<f;p++)c.push(u(l[p-1],l[p]));return c}function u(l,c){ke(l)&&(l=l.toArray()),ke(c)&&(c=c.toArray());var f=Array.isArray(l),p=Array.isArray(c);if(f&&p)return s(l,c);if(!f&&!p)return n(c,l);throw TypeError("Cannot calculate difference between 1 array and 1 non-array")}function s(l,c){if(l.length!==c.length)throw RangeError("Not all sub-arrays have the same length");for(var f=[],p=l.length,v=0;v<p;v++)f.push(u(l[v],c[v]));return f}}),mH="ones",hH=["typed","config","matrix","BigNumber"],gH=L(mH,hH,e=>{var{typed:r,config:t,matrix:n,BigNumber:a}=e;return r("ones",{"":function(){return t.matrix==="Array"?i([]):i([],"default")},"...number | BigNumber | string":function(l){var c=l[l.length-1];if(typeof c=="string"){var f=l.pop();return i(l,f)}else return t.matrix==="Array"?i(l):i(l,"default")},Array:i,Matrix:function(l){var c=l.storage();return i(l.valueOf(),c)},"Array | Matrix, string":function(l,c){return i(l.valueOf(),c)}});function i(s,l){var c=o(s),f=c?new a(1):1;if(u(s),l){var p=n(l);return s.length>0?p.resize(s,f):p}else{var v=[];return s.length>0?Ka(v,s,f):v}}function o(s){var l=!1;return s.forEach(function(c,f,p){Je(c)&&(l=!0,p[f]=c.toNumber())}),l}function u(s){s.forEach(function(l){if(typeof l!="number"||!Pe(l)||l<0)throw new Error("Parameters in function ones must be positive integers")})}});function Nf(){throw new Error('No "bignumber" implementation available')}function kb(){throw new Error('No "fraction" implementation available')}function Ub(){throw new Error('No "matrix" implementation available')}var jm="range",yH=["typed","config","?matrix","?bignumber","smaller","smallerEq","larger","largerEq","add","isPositive"],Hb=L(jm,yH,e=>{var{typed:r,config:t,matrix:n,bignumber:a,smaller:i,smallerEq:o,larger:u,largerEq:s,add:l,isPositive:c}=e;return r(jm,{string:p,"string, boolean":p,"number, number":function(y,h){return f(v(y,h,1,!1))},"number, number, number":function(y,h,E){return f(v(y,h,E,!1))},"number, number, boolean":function(y,h,E){return f(v(y,h,1,E))},"number, number, number, boolean":function(y,h,E,g){return f(v(y,h,E,g))},"BigNumber, BigNumber":function(y,h){var E=y.constructor;return f(v(y,h,new E(1),!1))},"BigNumber, BigNumber, BigNumber":function(y,h,E){return f(v(y,h,E,!1))},"BigNumber, BigNumber, boolean":function(y,h,E){var g=y.constructor;return f(v(y,h,new g(1),E))},"BigNumber, BigNumber, BigNumber, boolean":function(y,h,E,g){return f(v(y,h,E,g))},"Unit, Unit, Unit":function(y,h,E){return f(v(y,h,E,!1))},"Unit, Unit, Unit, boolean":function(y,h,E,g){return f(v(y,h,E,g))}});function f(d){return t.matrix==="Matrix"?n?n(d):Ub():d}function p(d,y){var h=m(d);if(!h)throw new SyntaxError('String "'+d+'" is no valid range');return t.number==="BigNumber"?(a===void 0&&Nf(),f(v(a(h.start),a(h.end),a(h.step)))):f(v(h.start,h.end,h.step,y))}function v(d,y,h,E){for(var g=[],w=c(h)?E?o:i:E?s:u,x=d;w(x,y);)g.push(x),x=l(x,h);return g}function m(d){var y=d.split(":"),h=y.map(function(g){return Number(g)}),E=h.some(function(g){return isNaN(g)});if(E)return null;switch(h.length){case 2:return{start:h[0],end:h[1],step:1};case 3:return{start:h[0],end:h[2],step:h[1]};default:return null}}}),Vm="reshape",bH=["typed","isInteger","matrix"],xH=L(Vm,bH,e=>{var{typed:r,isInteger:t}=e;return r(Vm,{"Matrix, Array":function(a,i){return a.reshape(i,!0)},"Array, Array":function(a,i){return i.forEach(function(o){if(!t(o))throw new TypeError("Invalid size for dimension: "+o)}),yf(a,i)}})}),wH="resize",EH=["config","matrix"],SH=L(wH,EH,e=>{var{config:r,matrix:t}=e;return function(i,o,u){if(arguments.length!==2&&arguments.length!==3)throw new la("resize",arguments.length,2,3);if(ke(o)&&(o=o.valueOf()),Je(o[0])&&(o=o.map(function(c){return Je(c)?c.toNumber():c})),ke(i))return i.resize(o,u,!0);if(typeof i=="string")return n(i,o,u);var s=Array.isArray(i)?!1:r.matrix!=="Array";if(o.length===0){for(;Array.isArray(i);)i=i[0];return Ge(i)}else{Array.isArray(i)||(i=[i]),i=Ge(i);var l=Ka(i,o,u);return s?t(l):l}};function n(a,i,o){if(o!==void 0){if(typeof o!="string"||o.length!==1)throw new TypeError("Single character expected as defaultValue")}else o=" ";if(i.length!==1)throw new rr(i.length,1);var u=i[0];if(typeof u!="number"||!Pe(u))throw new TypeError("Invalid size, must contain positive integers (size: "+er(i)+")");if(a.length>u)return a.substring(0,u);if(a.length<u){for(var s=a,l=0,c=u-a.length;l<c;l++)s+=o;return s}else return a}}),Gm="rotate",AH=["typed","multiply","rotationMatrix"],DH=L(Gm,AH,e=>{var{typed:r,multiply:t,rotationMatrix:n}=e;return r(Gm,{"Array , number | BigNumber | Complex | Unit":function(o,u){a(o,2);var s=t(n(u),o);return s.toArray()},"Matrix , number | BigNumber | Complex | Unit":function(o,u){return a(o,2),t(n(u),o)},"Array, number | BigNumber | Complex | Unit, Array | Matrix":function(o,u,s){a(o,3);var l=t(n(u,s),o);return l},"Matrix, number | BigNumber | Complex | Unit, Array | Matrix":function(o,u,s){return a(o,3),t(n(u,s),o)}});function a(i,o){var u=Array.isArray(i)?Xe(i):i.size();if(u.length>2)throw new RangeError("Vector must be of dimensions 1x".concat(o));if(u.length===2&&u[1]!==1)throw new RangeError("Vector must be of dimensions 1x".concat(o));if(u[0]!==o)throw new RangeError("Vector must be of dimensions 1x".concat(o))}}),Wm="rotationMatrix",NH=["typed","config","multiplyScalar","addScalar","unaryMinus","norm","matrix","BigNumber","DenseMatrix","SparseMatrix","cos","sin"],CH=L(Wm,NH,e=>{var{typed:r,config:t,multiplyScalar:n,addScalar:a,unaryMinus:i,norm:o,BigNumber:u,matrix:s,DenseMatrix:l,SparseMatrix:c,cos:f,sin:p}=e;return r(Wm,{"":function(){return t.matrix==="Matrix"?s([]):[]},string:function(g){return s(g)},"number | BigNumber | Complex | Unit":function(g){return v(g,t.matrix==="Matrix"?"dense":void 0)},"number | BigNumber | Complex | Unit, string":function(g,w){return v(g,w)},"number | BigNumber | Complex | Unit, Array":function(g,w){var x=s(w);return m(x),h(g,x,void 0)},"number | BigNumber | Complex | Unit, Matrix":function(g,w){m(w);var x=w.storage()||(t.matrix==="Matrix"?"dense":void 0);return h(g,w,x)},"number | BigNumber | Complex | Unit, Array, string":function(g,w,x){var b=s(w);return m(b),h(g,b,x)},"number | BigNumber | Complex | Unit, Matrix, string":function(g,w,x){return m(w),h(g,w,x)}});function v(E,g){var w=Je(E),x=w?new u(-1):-1,b=f(E),A=p(E),D=[[b,n(x,A)],[A,b]];return y(D,g)}function m(E){var g=E.size();if(g.length<1||g[0]!==3)throw new RangeError("Vector must be of dimensions 1x3")}function d(E){return E.reduce((g,w)=>n(g,w))}function y(E,g){if(g){if(g==="sparse")return new c(E);if(g==="dense")return new l(E);throw new TypeError('Unknown matrix type "'.concat(g,'"'))}return E}function h(E,g,w){var x=o(g);if(x===0)throw new RangeError("Rotation around zero vector");var b=Je(E)?u:null,A=b?new b(1):1,D=b?new b(-1):-1,S=b?new b(g.get([0])/x):g.get([0])/x,N=b?new b(g.get([1])/x):g.get([1])/x,C=b?new b(g.get([2])/x):g.get([2])/x,M=f(E),B=a(A,i(M)),P=p(E),R=a(M,d([S,S,B])),_=a(d([S,N,B]),d([D,C,P])),O=a(d([S,C,B]),d([N,P])),U=a(d([S,N,B]),d([C,P])),F=a(M,d([N,N,B])),q=a(d([N,C,B]),d([D,S,P])),Y=a(d([S,C,B]),d([D,N,P])),V=a(d([N,C,B]),d([S,P])),z=a(M,d([C,C,B])),J=[[R,_,O],[U,F,q],[Y,V,z]];return y(J,w)}}),Zm="row",MH=["typed","Index","matrix","range"],jb=L(Zm,MH,e=>{var{typed:r,Index:t,matrix:n,range:a}=e;return r(Zm,{"Matrix, number":i,"Array, number":function(u,s){return i(n(Ge(u)),s).valueOf()}});function i(o,u){if(o.size().length!==2)throw new Error("Only two dimensional matrix is supported");Sr(u,o.size()[0]);var s=a(0,o.size()[1]),l=new t(u,s),c=o.subset(l);return ke(c)?c:n([[c]])}}),Ym="size",TH=["typed","config","?matrix"],OH=L(Ym,TH,e=>{var{typed:r,config:t,matrix:n}=e;return r(Ym,{Matrix:function(i){return i.create(i.size())},Array:Xe,string:function(i){return t.matrix==="Array"?[i.length]:n([i.length])},"number | Complex | BigNumber | Unit | boolean | null":function(i){return t.matrix==="Array"?[]:n?n([]):Ub()}})}),Xm="squeeze",_H=["typed","matrix"],$H=L(Xm,_H,e=>{var{typed:r,matrix:t}=e;return r(Xm,{Array:function(a){return ws(Ge(a))},Matrix:function(a){var i=ws(a.toArray());return Array.isArray(i)?t(i):i},any:function(a){return Ge(a)}})}),Km="subset",FH=["typed","matrix","zeros","add"],Vb=L(Km,FH,e=>{var{typed:r,matrix:t,zeros:n,add:a}=e;return r(Km,{"Matrix, Index":function(u,s){return Xa(s)?t():(xs(u,s),u.subset(s))},"Array, Index":r.referTo("Matrix, Index",function(o){return function(u,s){var l=o(t(u),s);return s.isScalar()?l:l.valueOf()}}),"Object, Index":RH,"string, Index":BH,"Matrix, Index, any, any":function(u,s,l,c){return Xa(s)?u:(xs(u,s),u.clone().subset(s,i(l,s),c))},"Array, Index, any, any":r.referTo("Matrix, Index, any, any",function(o){return function(u,s,l,c){var f=o(t(u),s,l,c);return f.isMatrix?f.valueOf():f}}),"Array, Index, any":r.referTo("Matrix, Index, any, any",function(o){return function(u,s,l){return o(t(u),s,l,void 0).valueOf()}}),"Matrix, Index, any":r.referTo("Matrix, Index, any, any",function(o){return function(u,s,l){return o(u,s,l,void 0)}}),"string, Index, string":Jm,"string, Index, string, string":Jm,"Object, Index, any":PH});function i(o,u){if(typeof o=="string")throw new Error("can't boradcast a string");if(u._isScalar)return o;var s=u.size();if(s.every(l=>l>0))try{return a(o,n(s))}catch{return o}else return o}});function BH(e,r){if(!pu(r))throw new TypeError("Index expected");if(Xa(r))return"";if(xs(Array.from(e),r),r.size().length!==1)throw new rr(r.size().length,1);var t=e.length;Sr(r.min()[0],t),Sr(r.max()[0],t);var n=r.dimension(0),a="";return n.forEach(function(i){a+=e.charAt(i)}),a}function Jm(e,r,t,n){if(!r||r.isIndex!==!0)throw new TypeError("Index expected");if(Xa(r))return e;if(xs(Array.from(e),r),r.size().length!==1)throw new rr(r.size().length,1);if(n!==void 0){if(typeof n!="string"||n.length!==1)throw new TypeError("Single character expected as defaultValue")}else n=" ";var a=r.dimension(0),i=a.size()[0];if(i!==t.length)throw new rr(a.size()[0],t.length);var o=e.length;Sr(r.min()[0]),Sr(r.max()[0]);for(var u=[],s=0;s<o;s++)u[s]=e.charAt(s);if(a.forEach(function(f,p){u[f]=t.charAt(p[0])}),u.length>o)for(var l=o-1,c=u.length;l<c;l++)u[l]||(u[l]=n);return u.join("")}function RH(e,r){if(!Xa(r)){if(r.size().length!==1)throw new rr(r.size(),1);var t=r.dimension(0);if(typeof t!="string")throw new TypeError("String expected as index to retrieve an object property");return it(e,t)}}function PH(e,r,t){if(Xa(r))return e;if(r.size().length!==1)throw new rr(r.size(),1);var n=r.dimension(0);if(typeof n!="string")throw new TypeError("String expected as index to retrieve an object property");var a=Ge(e);return Qa(a,n,t),a}var Qm="transpose",zH=["typed","matrix"],IH=L(Qm,zH,e=>{var{typed:r,matrix:t}=e;return r(Qm,{Array:o=>n(t(o)).valueOf(),Matrix:n,any:Ge});function n(o){var u=o.size(),s;switch(u.length){case 1:s=o.clone();break;case 2:{var l=u[0],c=u[1];if(c===0)throw new RangeError("Cannot transpose a 2D matrix with no columns (size: "+er(u)+")");switch(o.storage()){case"dense":s=a(o,l,c);break;case"sparse":s=i(o,l,c);break}}break;default:throw new RangeError("Matrix must be a vector or two dimensional (size: "+er(u)+")")}return s}function a(o,u,s){for(var l=o._data,c=[],f,p=0;p<s;p++){f=c[p]=[];for(var v=0;v<u;v++)f[v]=Ge(l[v][p])}return o.createDenseMatrix({data:c,size:[s,u],datatype:o._datatype})}function i(o,u,s){for(var l=o._values,c=o._index,f=o._ptr,p=l?[]:void 0,v=[],m=[],d=[],y=0;y<u;y++)d[y]=0;var h,E,g;for(h=0,E=c.length;h<E;h++)d[c[h]]++;for(var w=0,x=0;x<u;x++)m.push(w),w+=d[x],d[x]=m[x];for(m.push(w),g=0;g<s;g++)for(var b=f[g],A=f[g+1],D=b;D<A;D++){var S=d[c[D]]++;v[S]=g,l&&(p[S]=Ge(l[D]))}return o.createSparseMatrix({values:p,index:v,ptr:m,size:[s,u],datatype:o._datatype})}}),e0="ctranspose",LH=["typed","transpose","conj"],qH=L(e0,LH,e=>{var{typed:r,transpose:t,conj:n}=e;return r(e0,{any:function(i){return n(t(i))}})}),r0="zeros",kH=["typed","config","matrix","BigNumber"],UH=L(r0,kH,e=>{var{typed:r,config:t,matrix:n,BigNumber:a}=e;return r(r0,{"":function(){return t.matrix==="Array"?i([]):i([],"default")},"...number | BigNumber | string":function(l){var c=l[l.length-1];if(typeof c=="string"){var f=l.pop();return i(l,f)}else return t.matrix==="Array"?i(l):i(l,"default")},Array:i,Matrix:function(l){var c=l.storage();return i(l.valueOf(),c)},"Array | Matrix, string":function(l,c){return i(l.valueOf(),c)}});function i(s,l){var c=o(s),f=c?new a(0):0;if(u(s),l){var p=n(l);return s.length>0?p.resize(s,f):p}else{var v=[];return s.length>0?Ka(v,s,f):v}}function o(s){var l=!1;return s.forEach(function(c,f,p){Je(c)&&(l=!0,p[f]=c.toNumber())}),l}function u(s){s.forEach(function(l){if(typeof l!="number"||!Pe(l)||l<0)throw new Error("Parameters in function zeros must be positive integers")})}}),t0="fft",HH=["typed","matrix","addScalar","multiplyScalar","divideScalar","exp","tau","i","dotDivide","conj","pow","ceil","log2"],jH=L(t0,HH,e=>{var{typed:r,matrix:t,addScalar:n,multiplyScalar:a,divideScalar:i,exp:o,tau:u,i:s,dotDivide:l,conj:c,pow:f,ceil:p,log2:v}=e;return r(t0,{Array:m,Matrix:function(g){return g.create(m(g.toArray()))}});function m(E){var g=Xe(E);return g.length===1?h(E,g[0]):d(E.map(w=>m(w,g.slice(1))),0)}function d(E,g){var w=Xe(E);if(g!==0)return new Array(w[0]).fill(0).map((b,A)=>d(E[A],g-1));if(w.length===1)return h(E);function x(b){var A=Xe(b);return new Array(A[1]).fill(0).map((D,S)=>new Array(A[0]).fill(0).map((N,C)=>b[C][S]))}return x(d(x(E),1))}function y(E){for(var g=E.length,w=o(i(a(-1,a(s,u)),g)),x=[],b=1-g;b<g;b++)x.push(f(w,i(f(b,2),2)));for(var A=f(2,p(v(g+g-1))),D=[...new Array(g).fill(0).map((_,O)=>a(E[O],x[g-1+O])),...new Array(A-g).fill(0)],S=[...new Array(g+g-1).fill(0).map((_,O)=>i(1,x[O])),...new Array(A-(g+g-1)).fill(0)],N=h(D),C=h(S),M=new Array(A).fill(0).map((_,O)=>a(N[O],C[O])),B=l(c(m(c(M))),A),P=[],R=g-1;R<g+g-1;R++)P.push(a(B[R],x[R]));return P}function h(E){var g=E.length;if(g===1)return[E[0]];if(g%2===0){for(var w=[...h(E.filter((D,S)=>S%2===0)),...h(E.filter((D,S)=>S%2===1))],x=0;x<g/2;x++){var b=w[x],A=a(w[x+g/2],o(a(a(u,s),i(-x,g))));w[x]=n(b,A),w[x+g/2]=n(b,a(-1,A))}return w}else return y(E)}}),n0="ifft",VH=["typed","fft","dotDivide","conj"],GH=L(n0,VH,e=>{var{typed:r,fft:t,dotDivide:n,conj:a}=e;return r(n0,{"Array | Matrix":function(o){var u=ke(o)?o.size():Xe(o);return n(a(t(a(o))),u.reduce((s,l)=>s*l,1))}})});function ro(e){"@babel/helpers - typeof";return ro=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},ro(e)}function WH(e,r){if(ro(e)!="object"||!e)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var n=t.call(e,r||"default");if(ro(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function ZH(e){var r=WH(e,"string");return ro(r)=="symbol"?r:r+""}function Ur(e,r,t){return(r=ZH(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function a0(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),t.push.apply(t,n)}return t}function YH(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?a0(Object(t),!0).forEach(function(n){Ur(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):a0(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var XH="solveODE",KH=["typed","add","subtract","multiply","divide","max","map","abs","isPositive","isNegative","larger","smaller","matrix","bignumber","unaryMinus"],JH=L(XH,KH,e=>{var{typed:r,add:t,subtract:n,multiply:a,divide:i,max:o,map:u,abs:s,isPositive:l,isNegative:c,larger:f,smaller:p,matrix:v,bignumber:m,unaryMinus:d}=e;function y(D){return function(S,N,C,M){var B=!(N.length===2&&(N.every(b)||N.every(Tt)));if(B)throw new Error('"tspan" must be an Array of two numeric values or two units [tStart, tEnd]');var P=N[0],R=N[1],_=f(R,P),O=M.firstStep;if(O!==void 0&&!l(O))throw new Error('"firstStep" must be positive');var U=M.maxStep;if(U!==void 0&&!l(U))throw new Error('"maxStep" must be positive');var F=M.minStep;if(F&&c(F))throw new Error('"minStep" must be positive or zero');var q=[P,R,O,F,U].filter(I=>I!==void 0);if(!(q.every(b)||q.every(Tt)))throw new Error('Inconsistent type of "t" dependant variables');for(var Y=1,V=M.tol?M.tol:1e-4,z=M.minDelta?M.minDelta:.2,J=M.maxDelta?M.maxDelta:5,le=M.maxIter?M.maxIter:1e4,Q=[P,R,...C,U,F].some(Je),[re,se,te,ae]=Q?[m(D.a),m(D.c),m(D.b),m(D.bp)]:[D.a,D.c,D.b,D.bp],fe=O?_?O:d(O):i(n(R,P),Y),ne=[P],be=[C],$e=n(te,ae),k=0,W=0,ue=w(_),j=x(_);ue(ne[k],R);){var K=[];fe=j(ne[k],R,fe),K.push(S(ne[k],be[k]));for(var oe=1;oe<se.length;++oe)K.push(S(t(ne[k],a(se[oe],fe)),t(be[k],a(fe,re[oe],K))));var he=o(s(u(a($e,K),I=>Tt(I)?I.value:I)));he<V&&V/he>1/4&&(ne.push(t(ne[k],fe)),be.push(t(be[k],a(fe,te,K))),k++);var me=.84*(V/he)**(1/5);if(p(me,z)?me=z:f(me,J)&&(me=J),me=Q?m(me):me,fe=a(fe,me),U&&f(s(fe),U)?fe=_?U:d(U):F&&p(s(fe),F)&&(fe=_?F:d(F)),W++,W>le)throw new Error("Maximum number of iterations reached, try changing options")}return{t:ne,y:be}}}function h(D,S,N,C){var M=[[],[.5],[0,.75],[.2222222222222222,.3333333333333333,.4444444444444444]],B=[null,1/2,3/4,1],P=[2/9,1/3,4/9,0],R=[7/24,1/4,1/3,1/8],_={a:M,c:B,b:P,bp:R};return y(_)(D,S,N,C)}function E(D,S,N,C){var M=[[],[.2],[.075,.225],[.9777777777777777,-3.7333333333333334,3.5555555555555554],[2.9525986892242035,-11.595793324188385,9.822892851699436,-.2908093278463649],[2.8462752525252526,-10.757575757575758,8.906422717743473,.2784090909090909,-.2735313036020583],[.09114583333333333,0,.44923629829290207,.6510416666666666,-.322376179245283,.13095238095238096]],B=[null,1/5,3/10,4/5,8/9,1,1],P=[35/384,0,500/1113,125/192,-2187/6784,11/84,0],R=[5179/57600,0,7571/16695,393/640,-92097/339200,187/2100,1/40],_={a:M,c:B,b:P,bp:R};return y(_)(D,S,N,C)}function g(D,S,N,C){var M=C.method?C.method:"RK45",B={RK23:h,RK45:E};if(M.toUpperCase()in B){var P=YH({},C);return delete P.method,B[M.toUpperCase()](D,S,N,P)}else{var R=Object.keys(B).map(O=>'"'.concat(O,'"')),_="".concat(R.slice(0,-1).join(", ")," and ").concat(R.slice(-1));throw new Error('Unavailable method "'.concat(M,'". Available methods are ').concat(_))}}function w(D){return D?p:f}function x(D){var S=D?f:p;return function(N,C,M){var B=t(N,M);return S(B,C)?n(C,N):M}}function b(D){return Je(D)||Ke(D)}function A(D,S,N,C){var M=g(D,S.toArray(),N.toArray(),C);return{t:v(M.t),y:v(M.y)}}return r("solveODE",{"function, Array, Array, Object":g,"function, Matrix, Matrix, Object":A,"function, Array, Array":(D,S,N)=>g(D,S,N,{}),"function, Matrix, Matrix":(D,S,N)=>A(D,S,N,{}),"function, Array, number | BigNumber | Unit":(D,S,N)=>{var C=g(D,S,[N],{});return{t:C.t,y:C.y.map(M=>M[0])}},"function, Matrix, number | BigNumber | Unit":(D,S,N)=>{var C=g(D,S.toArray(),[N],{});return{t:v(C.t),y:v(C.y.map(M=>M[0]))}},"function, Array, number | BigNumber | Unit, Object":(D,S,N,C)=>{var M=g(D,S,[N],C);return{t:M.t,y:M.y.map(B=>B[0])}},"function, Matrix, number | BigNumber | Unit, Object":(D,S,N,C)=>{var M=g(D,S.toArray(),[N],C);return{t:v(M.t),y:v(M.y.map(B=>B[0]))}}})}),QH="erf",ej=["typed"],rj=L(QH,ej,e=>{var{typed:r}=e;return r("name",{number:function(o){var u=Math.abs(o);return u>=aj?On(o):u<=tj?On(o)*t(u):u<=4?On(o)*(1-n(u)):On(o)*(1-a(u))},"Array | Matrix":r.referToSelf(i=>o=>tr(o,i))});function t(i){var o=i*i,u=fn[0][4]*o,s=o,l;for(l=0;l<3;l+=1)u=(u+fn[0][l])*o,s=(s+Ea[0][l])*o;return i*(u+fn[0][3])/(s+Ea[0][3])}function n(i){var o=fn[1][8]*i,u=i,s;for(s=0;s<7;s+=1)o=(o+fn[1][s])*i,u=(u+Ea[1][s])*i;var l=(o+fn[1][7])/(u+Ea[1][7]),c=parseInt(i*16)/16,f=(i-c)*(i+c);return Math.exp(-c*c)*Math.exp(-f)*l}function a(i){var o=1/(i*i),u=fn[2][5]*o,s=o,l;for(l=0;l<4;l+=1)u=(u+fn[2][l])*o,s=(s+Ea[2][l])*o;var c=o*(u+fn[2][4])/(s+Ea[2][4]);c=(nj-c)/i,o=parseInt(i*16)/16;var f=(i-o)*(i+o);return Math.exp(-o*o)*Math.exp(-f)*c}}),tj=.46875,nj=.5641895835477563,fn=[[3.1611237438705655,113.86415415105016,377.485237685302,3209.3775891384694,.18577770618460315],[.5641884969886701,8.883149794388377,66.11919063714163,298.6351381974001,881.952221241769,1712.0476126340707,2051.0783778260716,1230.3393547979972,21531153547440383e-24],[.30532663496123236,.36034489994980445,.12578172611122926,.016083785148742275,.0006587491615298378,.016315387137302097]],Ea=[[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]],aj=Math.pow(2,53),i0="zeta",ij=["typed","config","multiply","pow","divide","factorial","equal","smallerEq","isNegative","gamma","sin","subtract","add","?Complex","?BigNumber","pi"],oj=L(i0,ij,e=>{var{typed:r,config:t,multiply:n,pow:a,divide:i,factorial:o,equal:u,smallerEq:s,isNegative:l,gamma:c,sin:f,subtract:p,add:v,Complex:m,BigNumber:d,pi:y}=e;return r(i0,{number:b=>h(b,A=>A,()=>20),BigNumber:b=>h(b,A=>new d(A),()=>Math.abs(Math.log10(t.epsilon))),Complex:E});function h(b,A,D){return u(b,0)?A(-.5):u(b,1)?A(NaN):isFinite(b)?g(b,A,D,S=>S):l(b)?A(NaN):A(1)}function E(b){return b.re===0&&b.im===0?new m(-.5):b.re===1?new m(NaN,NaN):b.re===1/0&&b.im===0?new m(1):b.im===1/0||b.re===-1/0?new m(NaN,NaN):g(b,A=>A,A=>Math.round(1.3*15+.9*Math.abs(A.im)),A=>A.re)}function g(b,A,D,S){var N=D(b);if(S(b)>-(N-1)/2)return x(b,A(N),A);var C=n(a(2,b),a(A(y),p(b,1)));return C=n(C,f(n(i(A(y),2),b))),C=n(C,c(p(1,b))),n(C,g(p(1,b),A,D,S))}function w(b,A){for(var D=b,S=b;s(S,A);S=v(S,1)){var N=i(n(o(v(A,p(S,1))),a(4,S)),n(o(p(A,S)),o(n(2,S))));D=v(D,N)}return n(A,D)}function x(b,A,D){for(var S=i(1,n(w(D(0),A),p(1,a(2,p(1,b))))),N=D(0),C=D(1);s(C,A);C=v(C,1))N=v(N,i(n((-1)**(C-1),w(C,A)),a(C,b)));return n(S,N)}}),o0="mode",sj=["typed","isNaN","isNumeric"],uj=L(o0,sj,e=>{var{typed:r,isNaN:t,isNumeric:n}=e;return r(o0,{"Array | Matrix":a,"...":function(o){return a(o)}});function a(i){i=dr(i.valueOf());var o=i.length;if(o===0)throw new Error("Cannot calculate mode of an empty array");for(var u={},s=[],l=0,c=0;c<i.length;c++){var f=i[c];if(n(f)&&t(f))throw new Error("Cannot calculate mode of an array containing NaN values");f in u||(u[f]=0),u[f]++,u[f]===l?s.push(f):u[f]>l&&(l=u[f],s=[f])}return s}});function lt(e,r,t){var n;return String(e).indexOf("Unexpected type")!==-1?(n=arguments.length>2?" (type: "+Dr(t)+", value: "+JSON.stringify(t)+")":" (type: "+e.data.actual+")",new TypeError("Cannot calculate "+r+", unexpected type of argument"+n)):String(e).indexOf("complex numbers")!==-1?(n=arguments.length>2?" (type: "+Dr(t)+", value: "+JSON.stringify(t)+")":"",new TypeError("Cannot calculate "+r+", no ordering relation is defined for complex numbers"+n)):e}var s0="prod",lj=["typed","config","multiplyScalar","numeric"],cj=L(s0,lj,e=>{var{typed:r,config:t,multiplyScalar:n,numeric:a}=e;return r(s0,{"Array | Matrix":i,"Array | Matrix, number | BigNumber":function(u,s){throw new Error("prod(A, dim) is not yet supported")},"...":function(u){return i(u)}});function i(o){var u;if(yn(o,function(s){try{u=u===void 0?s:n(u,s)}catch(l){throw lt(l,"prod",s)}}),typeof u=="string"&&(u=a(u,t.number)),u===void 0)throw new Error("Cannot calculate prod of an empty array");return u}}),u0="format",fj=["typed"],pj=L(u0,fj,e=>{var{typed:r}=e;return r(u0,{any:er,"any, Object | function | number | BigNumber":er})}),l0="bin",vj=["typed","format"],dj=L(l0,vj,e=>{var{typed:r,format:t}=e;return r(l0,{"number | BigNumber":function(a){return t(a,{notation:"bin"})},"number | BigNumber, number | BigNumber":function(a,i){return t(a,{notation:"bin",wordSize:i})}})}),c0="oct",mj=["typed","format"],hj=L(c0,mj,e=>{var{typed:r,format:t}=e;return r(c0,{"number | BigNumber":function(a){return t(a,{notation:"oct"})},"number | BigNumber, number | BigNumber":function(a,i){return t(a,{notation:"oct",wordSize:i})}})}),f0="hex",gj=["typed","format"],yj=L(f0,gj,e=>{var{typed:r,format:t}=e;return r(f0,{"number | BigNumber":function(a){return t(a,{notation:"hex"})},"number | BigNumber, number | BigNumber":function(a,i){return t(a,{notation:"hex",wordSize:i})}})}),Gb=/\$([\w.]+)/g,p0="print",bj=["typed"],Wb=L(p0,bj,e=>{var{typed:r}=e;return r(p0,{"string, Object | Array":v0,"string, Object | Array, number | Object":v0})});function v0(e,r,t){return e.replace(Gb,function(n,a){var i=a.split("."),o=r[i.shift()];for(o!==void 0&&o.isMatrix&&(o=o.toArray());i.length&&o!==void 0;){var u=i.shift();o=u?o[u]:o+"."}return o!==void 0?et(o)?o:er(o,t):n})}var d0="to",xj=["typed","matrix","concat"],wj=L(d0,xj,e=>{var{typed:r,matrix:t,concat:n}=e,a=Cr({typed:r,matrix:t,concat:n});return r(d0,{"Unit, Unit | string":(i,o)=>i.to(o)},a({Ds:!0}))}),m0="isPrime",Ej=["typed"],Sj=L(m0,Ej,e=>{var{typed:r}=e;return r(m0,{number:function(n){if(n*0!==0)return!1;if(n<=3)return n>1;if(n%2===0||n%3===0)return!1;for(var a=5;a*a<=n;a+=6)if(n%a===0||n%(a+2)===0)return!1;return!0},BigNumber:function(n){if(n.toNumber()*0!==0)return!1;if(n.lte(3))return n.gt(1);if(n.mod(2).eq(0)||n.mod(3).eq(0))return!1;if(n.lt(Math.pow(2,32))){for(var a=n.toNumber(),i=5;i*i<=a;i+=6)if(a%i===0||a%(i+2)===0)return!1;return!0}function o(E,g,w){for(var x=1;!g.eq(0);)g.mod(2).eq(0)?(g=g.div(2),E=E.mul(E).mod(w)):(g=g.sub(1),x=E.mul(x).mod(w));return x}var u=n.constructor.clone({precision:n.toFixed(0).length*2});n=new u(n);for(var s=0,l=n.sub(1);l.mod(2).eq(0);)l=l.div(2),s+=1;var c=null;if(n.lt("3317044064679887385961981"))c=[2,3,5,7,11,13,17,19,23,29,31,37,41].filter(E=>E<n);else{var f=Math.min(n.toNumber()-2,Math.floor(2*Math.pow(n.toFixed(0).length*Math.log(10),2)));c=[];for(var p=2;p<=f;p+=1)c.push(f)}for(var v=0;v<c.length;v+=1){var m=c[v],d=o(n.sub(n).add(m),l,n);if(!d.eq(1)){for(var y=0,h=d;!h.eq(n.sub(1));y+=1,h=h.mul(h).mod(n))if(y===s-1)return!1}}return!0},"Array | Matrix":r.referToSelf(t=>n=>tr(n,t))})}),Aj="numeric",Dj=["number","?bignumber","?fraction"],Nj=L(Aj,Dj,e=>{var{number:r,bignumber:t,fraction:n}=e,a={string:!0,number:!0,BigNumber:!0,Fraction:!0},i={number:o=>r(o),BigNumber:t?o=>t(o):Nf,Fraction:n?o=>n(o):kb};return function(u){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"number",l=arguments.length>2?arguments[2]:void 0;if(l!==void 0)throw new SyntaxError("numeric() takes one or two arguments");var c=Dr(u);if(!(c in a))throw new TypeError("Cannot convert "+u+' of type "'+c+'"; valid input types are '+Object.keys(a).join(", "));if(!(s in i))throw new TypeError("Cannot convert "+u+' to type "'+s+'"; valid output types are '+Object.keys(i).join(", "));return s===c?u:i[s](u)}}),h0="divideScalar",Cj=["typed","numeric"],Mj=L(h0,Cj,e=>{var{typed:r,numeric:t}=e;return r(h0,{"number, number":function(a,i){return a/i},"Complex, Complex":function(a,i){return a.div(i)},"BigNumber, BigNumber":function(a,i){return a.div(i)},"Fraction, Fraction":function(a,i){return a.div(i)},"Unit, number | Complex | Fraction | BigNumber | Unit":(n,a)=>n.divide(a),"number | Fraction | Complex | BigNumber, Unit":(n,a)=>a.divideInto(n)})}),g0="pow",Tj=["typed","config","identity","multiply","matrix","inv","fraction","number","Complex"],Oj=L(g0,Tj,e=>{var{typed:r,config:t,identity:n,multiply:a,matrix:i,inv:o,number:u,fraction:s,Complex:l}=e;return r(g0,{"number, number":c,"Complex, Complex":function(m,d){return m.pow(d)},"BigNumber, BigNumber":function(m,d){return d.isInteger()||m>=0||t.predictable?m.pow(d):new l(m.toNumber(),0).pow(d.toNumber(),0)},"Fraction, Fraction":function(m,d){var y=m.pow(d);if(y!=null)return y;if(t.predictable)throw new Error("Result of pow is non-rational and cannot be expressed as a fraction");return c(m.valueOf(),d.valueOf())},"Array, number":f,"Array, BigNumber":function(m,d){return f(m,d.toNumber())},"Matrix, number":p,"Matrix, BigNumber":function(m,d){return p(m,d.toNumber())},"Unit, number | BigNumber":function(m,d){return m.pow(d)}});function c(v,m){if(t.predictable&&!Pe(m)&&v<0)try{var d=s(m),y=u(d);if((m===y||Math.abs((m-y)/m)<1e-14)&&d.d%2===1)return(d.n%2===0?1:-1)*Math.pow(-v,m)}catch{}return t.predictable&&(v<-1&&m===1/0||v>-1&&v<0&&m===-1/0)?NaN:Pe(m)||v>=0||t.predictable?K2(v,m):v*v<1&&m===1/0||v*v>1&&m===-1/0?0:new l(v,0).pow(m,0)}function f(v,m){if(!Pe(m))throw new TypeError("For A^b, b must be an integer (value is "+m+")");var d=Xe(v);if(d.length!==2)throw new Error("For A^b, A must be 2 dimensional (A has "+d.length+" dimensions)");if(d[0]!==d[1])throw new Error("For A^b, A must be square (size is "+d[0]+"x"+d[1]+")");if(m<0)try{return f(o(v),-m)}catch(E){throw E.message==="Cannot calculate inverse, determinant is zero"?new TypeError("For A^b, when A is not invertible, b must be a positive integer (value is "+m+")"):E}for(var y=n(d[0]).valueOf(),h=v;m>=1;)(m&1)===1&&(y=a(h,y)),m>>=1,h=a(h,h);return y}function p(v,m){return i(f(v.valueOf(),m))}}),Sa="Number of decimals in function round must be an integer",y0="round",_j=["typed","config","matrix","equalScalar","zeros","BigNumber","DenseMatrix"],$j=L(y0,_j,e=>{var{typed:r,config:t,matrix:n,equalScalar:a,zeros:i,BigNumber:o,DenseMatrix:u}=e,s=Jr({typed:r,equalScalar:a}),l=Hr({typed:r,DenseMatrix:u}),c=Kt({typed:r});function f(p){return Math.abs(go(p).exponent)}return r(y0,{number:function(v){var m=Li(v,f(t.epsilon)),d=ut(v,m,t.epsilon)?m:v;return Li(d)},"number, number":function(v,m){var d=f(t.epsilon);if(m>=d)return Li(v,m);var y=Li(v,d),h=ut(v,y,t.epsilon)?y:v;return Li(h,m)},"number, BigNumber":function(v,m){if(!m.isInteger())throw new TypeError(Sa);return new o(v).toDecimalPlaces(m.toNumber())},Complex:function(v){return v.round()},"Complex, number":function(v,m){if(m%1)throw new TypeError(Sa);return v.round(m)},"Complex, BigNumber":function(v,m){if(!m.isInteger())throw new TypeError(Sa);var d=m.toNumber();return v.round(d)},BigNumber:function(v){var m=new o(v).toDecimalPlaces(f(t.epsilon)),d=Rt(v,m,t.epsilon)?m:v;return d.toDecimalPlaces(0)},"BigNumber, BigNumber":function(v,m){if(!m.isInteger())throw new TypeError(Sa);var d=f(t.epsilon);if(m>=d)return v.toDecimalPlaces(m.toNumber());var y=v.toDecimalPlaces(d),h=Rt(v,y,t.epsilon)?y:v;return h.toDecimalPlaces(m.toNumber())},Fraction:function(v){return v.round()},"Fraction, number":function(v,m){if(m%1)throw new TypeError(Sa);return v.round(m)},"Fraction, BigNumber":function(v,m){if(!m.isInteger())throw new TypeError(Sa);return v.round(m.toNumber())},"Unit, number, Unit":r.referToSelf(p=>function(v,m,d){var y=v.toNumeric(d);return d.multiply(p(y,m))}),"Unit, BigNumber, Unit":r.referToSelf(p=>(v,m,d)=>p(v,m.toNumber(),d)),"Unit, Unit":r.referToSelf(p=>(v,m)=>p(v,0,m)),"Array | Matrix, number, Unit":r.referToSelf(p=>(v,m,d)=>tr(v,y=>p(y,m,d))),"Array | Matrix, BigNumber, Unit":r.referToSelf(p=>(v,m,d)=>p(v,m.toNumber(),d)),"Array | Matrix, Unit":r.referToSelf(p=>(v,m)=>p(v,0,m)),"Array | Matrix":r.referToSelf(p=>v=>tr(v,p)),"SparseMatrix, number | BigNumber":r.referToSelf(p=>(v,m)=>s(v,m,p,!1)),"DenseMatrix, number | BigNumber":r.referToSelf(p=>(v,m)=>c(v,m,p,!1)),"Array, number | BigNumber":r.referToSelf(p=>(v,m)=>c(n(v),m,p,!1).valueOf()),"number | Complex | BigNumber | Fraction, SparseMatrix":r.referToSelf(p=>(v,m)=>a(v,0)?i(m.size(),m.storage()):l(m,v,p,!0)),"number | Complex | BigNumber | Fraction, DenseMatrix":r.referToSelf(p=>(v,m)=>a(v,0)?i(m.size(),m.storage()):c(m,v,p,!0)),"number | Complex | BigNumber | Fraction, Array":r.referToSelf(p=>(v,m)=>c(n(m),v,p,!0).valueOf())})}),b0="log",Fj=["config","typed","divideScalar","Complex"],Bj=L(b0,Fj,e=>{var{typed:r,config:t,divideScalar:n,Complex:a}=e;return r(b0,{number:function(o){return o>=0||t.predictable?$L(o):new a(o,0).log()},Complex:function(o){return o.log()},BigNumber:function(o){return!o.isNegative()||t.predictable?o.ln():new a(o.toNumber(),0).log()},"any, any":r.referToSelf(i=>(o,u)=>n(i(o),i(u)))})}),x0="log1p",Rj=["typed","config","divideScalar","log","Complex"],Pj=L(x0,Rj,e=>{var{typed:r,config:t,divideScalar:n,log:a,Complex:i}=e;return r(x0,{number:function(s){return s>=-1||t.predictable?Oz(s):o(new i(s,0))},Complex:o,BigNumber:function(s){var l=s.plus(1);return!l.isNegative()||t.predictable?l.ln():o(new i(s.toNumber(),0))},"Array | Matrix":r.referToSelf(u=>s=>tr(s,u)),"any, any":r.referToSelf(u=>(s,l)=>n(u(s),a(l)))});function o(u){var s=u.re+1;return new i(Math.log(Math.sqrt(s*s+u.im*u.im)),Math.atan2(u.im,s))}}),w0="nthRoots",zj=["config","typed","divideScalar","Complex"],Ij=L(w0,zj,e=>{var{typed:r,config:t,divideScalar:n,Complex:a}=e,i=[function(s){return new a(s,0)},function(s){return new a(0,s)},function(s){return new a(-s,0)},function(s){return new a(0,-s)}];function o(u,s){if(s<0)throw new Error("Root must be greater than zero");if(s===0)throw new Error("Root must be non-zero");if(s%1!==0)throw new Error("Root must be an integer");if(u===0||u.abs()===0)return[new a(0,0)];var l=typeof u=="number",c;(l||u.re===0||u.im===0)&&(l?c=2*+(u<0):u.im===0?c=2*+(u.re<0):c=2*+(u.im<0)+1);for(var f=u.arg(),p=u.abs(),v=[],m=Math.pow(p,1/s),d=0;d<s;d++){var y=(c+4*d)/s;if(y===Math.round(y)){v.push(i[y%4](m));continue}v.push(new a({r:m,phi:(f+2*Math.PI*d)/s}))}return v}return r(w0,{Complex:function(s){return o(s,2)},"Complex, number":o})}),E0="dotPow",Lj=["typed","equalScalar","matrix","pow","DenseMatrix","concat"],qj=L(E0,Lj,e=>{var{typed:r,equalScalar:t,matrix:n,pow:a,DenseMatrix:i,concat:o}=e,u=ct({typed:r}),s=an({typed:r,DenseMatrix:i}),l=Jr({typed:r,equalScalar:t}),c=Hr({typed:r,DenseMatrix:i}),f=Cr({typed:r,matrix:n,concat:o}),p={};for(var v in a.signatures)Object.prototype.hasOwnProperty.call(a.signatures,v)&&!v.includes("Matrix")&&!v.includes("Array")&&(p[v]=a.signatures[v]);var m=r(p);return r(E0,f({elop:m,SS:s,DS:u,Ss:l,sS:c}))}),S0="dotDivide",kj=["typed","matrix","equalScalar","divideScalar","DenseMatrix","concat"],Uj=L(S0,kj,e=>{var{typed:r,matrix:t,equalScalar:n,divideScalar:a,DenseMatrix:i,concat:o}=e,u=Jt({typed:r,equalScalar:n}),s=ct({typed:r}),l=an({typed:r,DenseMatrix:i}),c=Jr({typed:r,equalScalar:n}),f=Hr({typed:r,DenseMatrix:i}),p=Cr({typed:r,matrix:t,concat:o});return r(S0,p({elop:a,SS:l,DS:s,SD:u,Ss:c,sS:f}))});function bo(e){var{DenseMatrix:r}=e;return function(n,a,i){var o=n.size();if(o.length!==2)throw new RangeError("Matrix must be two dimensional (size: "+er(o)+")");var u=o[0],s=o[1];if(u!==s)throw new RangeError("Matrix must be square (size: "+er(o)+")");var l=[];if(ke(a)){var c=a.size(),f=a._data;if(c.length===1){if(c[0]!==u)throw new RangeError("Dimension mismatch. Matrix columns must match vector length.");for(var p=0;p<u;p++)l[p]=[f[p]];return new r({data:l,size:[u,1],datatype:a._datatype})}if(c.length===2){if(c[0]!==u||c[1]!==1)throw new RangeError("Dimension mismatch. Matrix columns must match vector length.");if(bs(a)){if(i){l=[];for(var v=0;v<u;v++)l[v]=[f[v][0]];return new r({data:l,size:[u,1],datatype:a._datatype})}return a}if(Wn(a)){for(var m=0;m<u;m++)l[m]=[0];for(var d=a._values,y=a._index,h=a._ptr,E=h[1],g=h[0];g<E;g++){var w=y[g];l[w][0]=d[g]}return new r({data:l,size:[u,1],datatype:a._datatype})}}throw new RangeError("Dimension mismatch. The right side has to be either 1- or 2-dimensional vector.")}if(mr(a)){var x=Xe(a);if(x.length===1){if(x[0]!==u)throw new RangeError("Dimension mismatch. Matrix columns must match vector length.");for(var b=0;b<u;b++)l[b]=[a[b]];return new r({data:l,size:[u,1]})}if(x.length===2){if(x[0]!==u||x[1]!==1)throw new RangeError("Dimension mismatch. Matrix columns must match vector length.");for(var A=0;A<u;A++)l[A]=[a[A][0]];return new r({data:l,size:[u,1]})}throw new RangeError("Dimension mismatch. The right side has to be either 1- or 2-dimensional vector.")}}}var A0="lsolve",Hj=["typed","matrix","divideScalar","multiplyScalar","subtractScalar","equalScalar","DenseMatrix"],jj=L(A0,Hj,e=>{var{typed:r,matrix:t,divideScalar:n,multiplyScalar:a,subtractScalar:i,equalScalar:o,DenseMatrix:u}=e,s=bo({DenseMatrix:u});return r(A0,{"SparseMatrix, Array | Matrix":function(p,v){return c(p,v)},"DenseMatrix, Array | Matrix":function(p,v){return l(p,v)},"Array, Array | Matrix":function(p,v){var m=t(p),d=l(m,v);return d.valueOf()}});function l(f,p){p=s(f,p,!0);for(var v=p._data,m=f._size[0],d=f._size[1],y=[],h=f._data,E=0;E<d;E++){var g=v[E][0]||0,w=void 0;if(o(g,0))w=0;else{var x=h[E][E];if(o(x,0))throw new Error("Linear system cannot be solved since matrix is singular");w=n(g,x);for(var b=E+1;b<m;b++)v[b]=[i(v[b][0]||0,a(w,h[b][E]))]}y[E]=[w]}return new u({data:y,size:[m,1]})}function c(f,p){p=s(f,p,!0);for(var v=p._data,m=f._size[0],d=f._size[1],y=f._values,h=f._index,E=f._ptr,g=[],w=0;w<d;w++){var x=v[w][0]||0;if(o(x,0))g[w]=[0];else{for(var b=0,A=[],D=[],S=E[w],N=E[w+1],C=S;C<N;C++){var M=h[C];M===w?b=y[C]:M>w&&(A.push(y[C]),D.push(M))}if(o(b,0))throw new Error("Linear system cannot be solved since matrix is singular");for(var B=n(x,b),P=0,R=D.length;P<R;P++){var _=D[P];v[_]=[i(v[_][0]||0,a(B,A[P]))]}g[w]=[B]}}return new u({data:g,size:[m,1]})}}),D0="usolve",Vj=["typed","matrix","divideScalar","multiplyScalar","subtractScalar","equalScalar","DenseMatrix"],Gj=L(D0,Vj,e=>{var{typed:r,matrix:t,divideScalar:n,multiplyScalar:a,subtractScalar:i,equalScalar:o,DenseMatrix:u}=e,s=bo({DenseMatrix:u});return r(D0,{"SparseMatrix, Array | Matrix":function(p,v){return c(p,v)},"DenseMatrix, Array | Matrix":function(p,v){return l(p,v)},"Array, Array | Matrix":function(p,v){var m=t(p),d=l(m,v);return d.valueOf()}});function l(f,p){p=s(f,p,!0);for(var v=p._data,m=f._size[0],d=f._size[1],y=[],h=f._data,E=d-1;E>=0;E--){var g=v[E][0]||0,w=void 0;if(o(g,0))w=0;else{var x=h[E][E];if(o(x,0))throw new Error("Linear system cannot be solved since matrix is singular");w=n(g,x);for(var b=E-1;b>=0;b--)v[b]=[i(v[b][0]||0,a(w,h[b][E]))]}y[E]=[w]}return new u({data:y,size:[m,1]})}function c(f,p){p=s(f,p,!0);for(var v=p._data,m=f._size[0],d=f._size[1],y=f._values,h=f._index,E=f._ptr,g=[],w=d-1;w>=0;w--){var x=v[w][0]||0;if(o(x,0))g[w]=[0];else{for(var b=0,A=[],D=[],S=E[w],N=E[w+1],C=N-1;C>=S;C--){var M=h[C];M===w?b=y[C]:M<w&&(A.push(y[C]),D.push(M))}if(o(b,0))throw new Error("Linear system cannot be solved since matrix is singular");for(var B=n(x,b),P=0,R=D.length;P<R;P++){var _=D[P];v[_]=[i(v[_][0],a(B,A[P]))]}g[w]=[B]}}return new u({data:g,size:[m,1]})}}),N0="lsolveAll",Wj=["typed","matrix","divideScalar","multiplyScalar","subtractScalar","equalScalar","DenseMatrix"],Zj=L(N0,Wj,e=>{var{typed:r,matrix:t,divideScalar:n,multiplyScalar:a,subtractScalar:i,equalScalar:o,DenseMatrix:u}=e,s=bo({DenseMatrix:u});return r(N0,{"SparseMatrix, Array | Matrix":function(p,v){return c(p,v)},"DenseMatrix, Array | Matrix":function(p,v){return l(p,v)},"Array, Array | Matrix":function(p,v){var m=t(p),d=l(m,v);return d.map(y=>y.valueOf())}});function l(f,p){for(var v=[s(f,p,!0)._data.map(D=>D[0])],m=f._data,d=f._size[0],y=f._size[1],h=0;h<y;h++)for(var E=v.length,g=0;g<E;g++){var w=v[g];if(o(m[h][h],0))if(o(w[h],0)){if(g===0){var b=[...w];b[h]=1;for(var A=h+1;A<y;A++)b[A]=i(b[A],m[A][h]);v.push(b)}}else{if(g===0)return[];v.splice(g,1),g-=1,E-=1}else{w[h]=n(w[h],m[h][h]);for(var x=h+1;x<y;x++)w[x]=i(w[x],a(w[h],m[x][h]))}}return v.map(D=>new u({data:D.map(S=>[S]),size:[d,1]}))}function c(f,p){for(var v=[s(f,p,!0)._data.map(Y=>Y[0])],m=f._size[0],d=f._size[1],y=f._values,h=f._index,E=f._ptr,g=0;g<d;g++)for(var w=v.length,x=0;x<w;x++){for(var b=v[x],A=[],D=[],S=E[g],N=E[g+1],C=0,M=S;M<N;M++){var B=h[M];B===g?C=y[M]:B>g&&(A.push(y[M]),D.push(B))}if(o(C,0))if(o(b[g],0)){if(x===0){var O=[...b];O[g]=1;for(var U=0,F=D.length;U<F;U++){var q=D[U];O[q]=i(O[q],A[U])}v.push(O)}}else{if(x===0)return[];v.splice(x,1),x-=1,w-=1}else{b[g]=n(b[g],C);for(var P=0,R=D.length;P<R;P++){var _=D[P];b[_]=i(b[_],a(b[g],A[P]))}}}return v.map(Y=>new u({data:Y.map(V=>[V]),size:[m,1]}))}}),C0="usolveAll",Yj=["typed","matrix","divideScalar","multiplyScalar","subtractScalar","equalScalar","DenseMatrix"],Xj=L(C0,Yj,e=>{var{typed:r,matrix:t,divideScalar:n,multiplyScalar:a,subtractScalar:i,equalScalar:o,DenseMatrix:u}=e,s=bo({DenseMatrix:u});return r(C0,{"SparseMatrix, Array | Matrix":function(p,v){return c(p,v)},"DenseMatrix, Array | Matrix":function(p,v){return l(p,v)},"Array, Array | Matrix":function(p,v){var m=t(p),d=l(m,v);return d.map(y=>y.valueOf())}});function l(f,p){for(var v=[s(f,p,!0)._data.map(D=>D[0])],m=f._data,d=f._size[0],y=f._size[1],h=y-1;h>=0;h--)for(var E=v.length,g=0;g<E;g++){var w=v[g];if(o(m[h][h],0))if(o(w[h],0)){if(g===0){var b=[...w];b[h]=1;for(var A=h-1;A>=0;A--)b[A]=i(b[A],m[A][h]);v.push(b)}}else{if(g===0)return[];v.splice(g,1),g-=1,E-=1}else{w[h]=n(w[h],m[h][h]);for(var x=h-1;x>=0;x--)w[x]=i(w[x],a(w[h],m[x][h]))}}return v.map(D=>new u({data:D.map(S=>[S]),size:[d,1]}))}function c(f,p){for(var v=[s(f,p,!0)._data.map(Y=>Y[0])],m=f._size[0],d=f._size[1],y=f._values,h=f._index,E=f._ptr,g=d-1;g>=0;g--)for(var w=v.length,x=0;x<w;x++){for(var b=v[x],A=[],D=[],S=E[g],N=E[g+1],C=0,M=N-1;M>=S;M--){var B=h[M];B===g?C=y[M]:B<g&&(A.push(y[M]),D.push(B))}if(o(C,0))if(o(b[g],0)){if(x===0){var O=[...b];O[g]=1;for(var U=0,F=D.length;U<F;U++){var q=D[U];O[q]=i(O[q],A[U])}v.push(O)}}else{if(x===0)return[];v.splice(x,1),x-=1,w-=1}else{b[g]=n(b[g],C);for(var P=0,R=D.length;P<R;P++){var _=D[P];b[_]=i(b[_],a(b[g],A[P]))}}}return v.map(Y=>new u({data:Y.map(V=>[V]),size:[m,1]}))}}),Kj="matAlgo08xS0Sid",Jj=["typed","equalScalar"],Cf=L(Kj,Jj,e=>{var{typed:r,equalScalar:t}=e;return function(a,i,o){var u=a._values,s=a._index,l=a._ptr,c=a._size,f=a._datatype||a._data===void 0?a._datatype:a.getDataType(),p=i._values,v=i._index,m=i._ptr,d=i._size,y=i._datatype||i._data===void 0?i._datatype:i.getDataType();if(c.length!==d.length)throw new rr(c.length,d.length);if(c[0]!==d[0]||c[1]!==d[1])throw new RangeError("Dimension mismatch. Matrix A ("+c+") must match Matrix B ("+d+")");if(!u||!p)throw new Error("Cannot perform operation on Pattern Sparse Matrices");var h=c[0],E=c[1],g,w=t,x=0,b=o;typeof f=="string"&&f===y&&f!=="mixed"&&(g=f,w=r.find(t,[g,g]),x=r.convert(0,g),b=r.find(o,[g,g]));for(var A=[],D=[],S=[],N=[],C=[],M,B,P,R,_=0;_<E;_++){S[_]=D.length;var O=_+1;for(B=l[_],P=l[_+1],M=B;M<P;M++)R=s[M],C[R]=O,N[R]=u[M],D.push(R);for(B=m[_],P=m[_+1],M=B;M<P;M++)R=v[M],C[R]===O&&(N[R]=b(N[R],p[M]));for(M=S[_];M<D.length;){R=D[M];var U=N[R];w(U,x)?D.splice(M,1):(A.push(U),M++)}}return S[E]=D.length,a.createSparseMatrix({values:A,index:D,ptr:S,size:[h,E],datatype:f===a._datatype&&y===i._datatype?g:void 0})}}),Mf=L("useMatrixForArrayScalar",["typed","matrix"],e=>{var{typed:r,matrix:t}=e;return{"Array, number":r.referTo("DenseMatrix, number",n=>(a,i)=>n(t(a),i).valueOf()),"Array, BigNumber":r.referTo("DenseMatrix, BigNumber",n=>(a,i)=>n(t(a),i).valueOf()),"number, Array":r.referTo("number, DenseMatrix",n=>(a,i)=>n(a,t(i)).valueOf()),"BigNumber, Array":r.referTo("BigNumber, DenseMatrix",n=>(a,i)=>n(a,t(i)).valueOf())}}),M0="leftShift",Qj=["typed","matrix","equalScalar","zeros","DenseMatrix","concat"],eV=L(M0,Qj,e=>{var{typed:r,matrix:t,equalScalar:n,zeros:a,DenseMatrix:i,concat:o}=e,u=Ln({typed:r}),s=Jt({typed:r,equalScalar:n}),l=Cf({typed:r,equalScalar:n}),c=ua({typed:r,DenseMatrix:i}),f=Jr({typed:r,equalScalar:n}),p=Kt({typed:r}),v=Cr({typed:r,matrix:t,concat:o}),m=Mf({typed:r,matrix:t});return r(M0,{"number, number":tb,"BigNumber, BigNumber":xU,"SparseMatrix, number | BigNumber":r.referToSelf(d=>(y,h)=>n(h,0)?y.clone():f(y,h,d,!1)),"DenseMatrix, number | BigNumber":r.referToSelf(d=>(y,h)=>n(h,0)?y.clone():p(y,h,d,!1)),"number | BigNumber, SparseMatrix":r.referToSelf(d=>(y,h)=>n(y,0)?a(h.size(),h.storage()):c(h,y,d,!0)),"number | BigNumber, DenseMatrix":r.referToSelf(d=>(y,h)=>n(y,0)?a(h.size(),h.storage()):p(h,y,d,!0))},m,v({SS:l,DS:u,SD:s}))}),T0="rightArithShift",rV=["typed","matrix","equalScalar","zeros","DenseMatrix","concat"],tV=L(T0,rV,e=>{var{typed:r,matrix:t,equalScalar:n,zeros:a,DenseMatrix:i,concat:o}=e,u=Ln({typed:r}),s=Jt({typed:r,equalScalar:n}),l=Cf({typed:r,equalScalar:n}),c=ua({typed:r,DenseMatrix:i}),f=Jr({typed:r,equalScalar:n}),p=Kt({typed:r}),v=Cr({typed:r,matrix:t,concat:o}),m=Mf({typed:r,matrix:t});return r(T0,{"number, number":nb,"BigNumber, BigNumber":wU,"SparseMatrix, number | BigNumber":r.referToSelf(d=>(y,h)=>n(h,0)?y.clone():f(y,h,d,!1)),"DenseMatrix, number | BigNumber":r.referToSelf(d=>(y,h)=>n(h,0)?y.clone():p(y,h,d,!1)),"number | BigNumber, SparseMatrix":r.referToSelf(d=>(y,h)=>n(y,0)?a(h.size(),h.storage()):c(h,y,d,!0)),"number | BigNumber, DenseMatrix":r.referToSelf(d=>(y,h)=>n(y,0)?a(h.size(),h.storage()):p(h,y,d,!0))},m,v({SS:l,DS:u,SD:s}))}),O0="rightLogShift",nV=["typed","matrix","equalScalar","zeros","DenseMatrix","concat"],aV=L(O0,nV,e=>{var{typed:r,matrix:t,equalScalar:n,zeros:a,DenseMatrix:i,concat:o}=e,u=Ln({typed:r}),s=Jt({typed:r,equalScalar:n}),l=Cf({typed:r,equalScalar:n}),c=ua({typed:r,DenseMatrix:i}),f=Jr({typed:r,equalScalar:n}),p=Kt({typed:r}),v=Cr({typed:r,matrix:t,concat:o}),m=Mf({typed:r,matrix:t});return r(O0,{"number, number":ab,"SparseMatrix, number | BigNumber":r.referToSelf(d=>(y,h)=>n(h,0)?y.clone():f(y,h,d,!1)),"DenseMatrix, number | BigNumber":r.referToSelf(d=>(y,h)=>n(h,0)?y.clone():p(y,h,d,!1)),"number | BigNumber, SparseMatrix":r.referToSelf(d=>(y,h)=>n(y,0)?a(h.size(),h.storage()):c(h,y,d,!0)),"number | BigNumber, DenseMatrix":r.referToSelf(d=>(y,h)=>n(y,0)?a(h.size(),h.storage()):p(h,y,d,!0))},m,v({SS:l,DS:u,SD:s}))}),_0="and",iV=["typed","matrix","equalScalar","zeros","not","concat"],Zb=L(_0,iV,e=>{var{typed:r,matrix:t,equalScalar:n,zeros:a,not:i,concat:o}=e,u=Jt({typed:r,equalScalar:n}),s=Au({typed:r,equalScalar:n}),l=Jr({typed:r,equalScalar:n}),c=Kt({typed:r}),f=Cr({typed:r,matrix:t,concat:o});return r(_0,{"number, number":lb,"Complex, Complex":function(v,m){return(v.re!==0||v.im!==0)&&(m.re!==0||m.im!==0)},"BigNumber, BigNumber":function(v,m){return!v.isZero()&&!m.isZero()&&!v.isNaN()&&!m.isNaN()},"Unit, Unit":r.referToSelf(p=>(v,m)=>p(v.value||0,m.value||0)),"SparseMatrix, any":r.referToSelf(p=>(v,m)=>i(m)?a(v.size(),v.storage()):l(v,m,p,!1)),"DenseMatrix, any":r.referToSelf(p=>(v,m)=>i(m)?a(v.size(),v.storage()):c(v,m,p,!1)),"any, SparseMatrix":r.referToSelf(p=>(v,m)=>i(v)?a(v.size(),v.storage()):l(m,v,p,!0)),"any, DenseMatrix":r.referToSelf(p=>(v,m)=>i(v)?a(v.size(),v.storage()):c(m,v,p,!0)),"Array, any":r.referToSelf(p=>(v,m)=>p(t(v),m).valueOf()),"any, Array":r.referToSelf(p=>(v,m)=>p(v,t(m)).valueOf())},f({SS:s,DS:u}))}),Fs="compare",oV=["typed","config","matrix","equalScalar","BigNumber","Fraction","DenseMatrix","concat"],sV=L(Fs,oV,e=>{var{typed:r,config:t,equalScalar:n,matrix:a,BigNumber:i,Fraction:o,DenseMatrix:u,concat:s}=e,l=ct({typed:r}),c=Su({typed:r,equalScalar:n}),f=Hr({typed:r,DenseMatrix:u}),p=Cr({typed:r,matrix:a,concat:s}),v=wi({typed:r});return r(Fs,uV({typed:r,config:t}),{"boolean, boolean":function(d,y){return d===y?0:d>y?1:-1},"BigNumber, BigNumber":function(d,y){return Rt(d,y,t.epsilon)?new i(0):new i(d.cmp(y))},"Fraction, Fraction":function(d,y){return new o(d.compare(y))},"Complex, Complex":function(){throw new TypeError("No ordering relation is defined for complex numbers")}},v,p({SS:c,DS:l,Ss:f}))}),uV=L(Fs,["typed","config"],e=>{var{typed:r,config:t}=e;return r(Fs,{"number, number":function(a,i){return ut(a,i,t.epsilon)?0:a>i?1:-1}})}),lV=function e(r,t){var n=/(^([+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?)?$|^0x[0-9a-f]+$|\d+)/gi,a=/(^[ ]*|[ ]*$)/g,i=/(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[\/\-]\d{1,4}[\/\-]\d{1,4}|^\w+, \w+ \d+, \d{4})/,o=/^0x[0-9a-f]+$/i,u=/^0/,s=function(g){return e.insensitive&&(""+g).toLowerCase()||""+g},l=s(r).replace(a,"")||"",c=s(t).replace(a,"")||"",f=l.replace(n,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0"),p=c.replace(n,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0"),v=parseInt(l.match(o),16)||f.length!==1&&l.match(i)&&Date.parse(l),m=parseInt(c.match(o),16)||v&&c.match(i)&&Date.parse(c)||null,d,y;if(m){if(v<m)return-1;if(v>m)return 1}for(var h=0,E=Math.max(f.length,p.length);h<E;h++){if(d=!(f[h]||"").match(u)&&parseFloat(f[h])||f[h]||0,y=!(p[h]||"").match(u)&&parseFloat(p[h])||p[h]||0,isNaN(d)!==isNaN(y))return isNaN(d)?1:-1;if(typeof d!=typeof y&&(d+="",y+=""),d<y)return-1;if(d>y)return 1}return 0};const Aa=ye.getDefaultExportFromCjs(lV);var $0="compareNatural",cV=["typed","compare"],fV=L($0,cV,e=>{var{typed:r,compare:t}=e,n=t.signatures["boolean,boolean"];return r($0,{"any, any":a});function a(s,l){var c=Dr(s),f=Dr(l),p;if((c==="number"||c==="BigNumber"||c==="Fraction")&&(f==="number"||f==="BigNumber"||f==="Fraction"))return p=t(s,l),p.toString()!=="0"?p>0?1:-1:Aa(c,f);var v=["Array","DenseMatrix","SparseMatrix"];if(v.includes(c)||v.includes(f))return p=i(a,s,l),p!==0?p:Aa(c,f);if(c!==f)return Aa(c,f);if(c==="Complex")return pV(s,l);if(c==="Unit")return s.equalBase(l)?a(s.value,l.value):o(a,s.formatUnits(),l.formatUnits());if(c==="boolean")return n(s,l);if(c==="string")return Aa(s,l);if(c==="Object")return u(a,s,l);if(c==="null"||c==="undefined")return 0;throw new TypeError('Unsupported type of value "'+c+'"')}function i(s,l,c){return Wn(l)&&Wn(c)?o(s,l.toJSON().values,c.toJSON().values):Wn(l)?i(s,l.toArray(),c):Wn(c)?i(s,l,c.toArray()):bs(l)?i(s,l.toJSON().data,c):bs(c)?i(s,l,c.toJSON().data):Array.isArray(l)?Array.isArray(c)?o(s,l,c):i(s,l,[c]):i(s,[l],c)}function o(s,l,c){for(var f=0,p=Math.min(l.length,c.length);f<p;f++){var v=s(l[f],c[f]);if(v!==0)return v}return l.length>c.length?1:l.length<c.length?-1:0}function u(s,l,c){var f=Object.keys(l),p=Object.keys(c);f.sort(Aa),p.sort(Aa);var v=o(s,f,p);if(v!==0)return v;for(var m=0;m<f.length;m++){var d=s(l[f[m]],c[p[m]]);if(d!==0)return d}return 0}});function pV(e,r){return e.re>r.re?1:e.re<r.re?-1:e.im>r.im?1:e.im<r.im?-1:0}var F0="compareText",vV=["typed","matrix","concat"];Gl.signature="any, any";var dV=L(F0,vV,e=>{var{typed:r,matrix:t,concat:n}=e,a=Cr({typed:r,matrix:t,concat:n});return r(F0,Gl,a({elop:Gl,Ds:!0}))}),Bs="equal",mV=["typed","matrix","equalScalar","DenseMatrix","concat"],hV=L(Bs,mV,e=>{var{typed:r,matrix:t,equalScalar:n,DenseMatrix:a,concat:i}=e,o=ct({typed:r}),u=an({typed:r,DenseMatrix:a}),s=Hr({typed:r,DenseMatrix:a}),l=Cr({typed:r,matrix:t,concat:i});return r(Bs,gV({typed:r,equalScalar:n}),l({elop:n,SS:u,DS:o,Ss:s}))}),gV=L(Bs,["typed","equalScalar"],e=>{var{typed:r,equalScalar:t}=e;return r(Bs,{"any, any":function(a,i){return a===null?i===null:i===null?a===null:a===void 0?i===void 0:i===void 0?a===void 0:t(a,i)}})}),B0="equalText",yV=["typed","compareText","isZero"],bV=L(B0,yV,e=>{var{typed:r,compareText:t,isZero:n}=e;return r(B0,{"any, any":function(i,o){return n(t(i,o))}})}),Rs="smaller",xV=["typed","config","matrix","DenseMatrix","concat"],wV=L(Rs,xV,e=>{var{typed:r,config:t,matrix:n,DenseMatrix:a,concat:i}=e,o=ct({typed:r}),u=an({typed:r,DenseMatrix:a}),s=Hr({typed:r,DenseMatrix:a}),l=Cr({typed:r,matrix:n,concat:i}),c=wi({typed:r});return r(Rs,EV({typed:r,config:t}),{"boolean, boolean":(f,p)=>f<p,"BigNumber, BigNumber":function(p,v){return p.lt(v)&&!Rt(p,v,t.epsilon)},"Fraction, Fraction":(f,p)=>f.compare(p)===-1,"Complex, Complex":function(p,v){throw new TypeError("No ordering relation is defined for complex numbers")}},c,l({SS:u,DS:o,Ss:s}))}),EV=L(Rs,["typed","config"],e=>{var{typed:r,config:t}=e;return r(Rs,{"number, number":function(a,i){return a<i&&!ut(a,i,t.epsilon)}})}),Ps="smallerEq",SV=["typed","config","matrix","DenseMatrix","concat"],AV=L(Ps,SV,e=>{var{typed:r,config:t,matrix:n,DenseMatrix:a,concat:i}=e,o=ct({typed:r}),u=an({typed:r,DenseMatrix:a}),s=Hr({typed:r,DenseMatrix:a}),l=Cr({typed:r,matrix:n,concat:i}),c=wi({typed:r});return r(Ps,DV({typed:r,config:t}),{"boolean, boolean":(f,p)=>f<=p,"BigNumber, BigNumber":function(p,v){return p.lte(v)||Rt(p,v,t.epsilon)},"Fraction, Fraction":(f,p)=>f.compare(p)!==1,"Complex, Complex":function(){throw new TypeError("No ordering relation is defined for complex numbers")}},c,l({SS:u,DS:o,Ss:s}))}),DV=L(Ps,["typed","config"],e=>{var{typed:r,config:t}=e;return r(Ps,{"number, number":function(a,i){return a<=i||ut(a,i,t.epsilon)}})}),zs="larger",NV=["typed","config","matrix","DenseMatrix","concat"],CV=L(zs,NV,e=>{var{typed:r,config:t,matrix:n,DenseMatrix:a,concat:i}=e,o=ct({typed:r}),u=an({typed:r,DenseMatrix:a}),s=Hr({typed:r,DenseMatrix:a}),l=Cr({typed:r,matrix:n,concat:i}),c=wi({typed:r});return r(zs,MV({typed:r,config:t}),{"boolean, boolean":(f,p)=>f>p,"BigNumber, BigNumber":function(p,v){return p.gt(v)&&!Rt(p,v,t.epsilon)},"Fraction, Fraction":(f,p)=>f.compare(p)===1,"Complex, Complex":function(){throw new TypeError("No ordering relation is defined for complex numbers")}},c,l({SS:u,DS:o,Ss:s}))}),MV=L(zs,["typed","config"],e=>{var{typed:r,config:t}=e;return r(zs,{"number, number":function(a,i){return a>i&&!ut(a,i,t.epsilon)}})}),Is="largerEq",TV=["typed","config","matrix","DenseMatrix","concat"],OV=L(Is,TV,e=>{var{typed:r,config:t,matrix:n,DenseMatrix:a,concat:i}=e,o=ct({typed:r}),u=an({typed:r,DenseMatrix:a}),s=Hr({typed:r,DenseMatrix:a}),l=Cr({typed:r,matrix:n,concat:i}),c=wi({typed:r});return r(Is,_V({typed:r,config:t}),{"boolean, boolean":(f,p)=>f>=p,"BigNumber, BigNumber":function(p,v){return p.gte(v)||Rt(p,v,t.epsilon)},"Fraction, Fraction":(f,p)=>f.compare(p)!==-1,"Complex, Complex":function(){throw new TypeError("No ordering relation is defined for complex numbers")}},c,l({SS:u,DS:o,Ss:s}))}),_V=L(Is,["typed","config"],e=>{var{typed:r,config:t}=e;return r(Is,{"number, number":function(a,i){return a>=i||ut(a,i,t.epsilon)}})}),R0="deepEqual",$V=["typed","equal"],FV=L(R0,$V,e=>{var{typed:r,equal:t}=e;return r(R0,{"any, any":function(i,o){return n(i.valueOf(),o.valueOf())}});function n(a,i){if(Array.isArray(a))if(Array.isArray(i)){var o=a.length;if(o!==i.length)return!1;for(var u=0;u<o;u++)if(!n(a[u],i[u]))return!1;return!0}else return!1;else return Array.isArray(i)?!1:t(a,i)}}),Ls="unequal",BV=["typed","config","equalScalar","matrix","DenseMatrix","concat"],RV=L(Ls,BV,e=>{var{typed:r,config:t,equalScalar:n,matrix:a,DenseMatrix:i,concat:o}=e,u=ct({typed:r}),s=an({typed:r,DenseMatrix:i}),l=Hr({typed:r,DenseMatrix:i}),c=Cr({typed:r,matrix:a,concat:o});return r(Ls,PV({typed:r,equalScalar:n}),c({elop:f,SS:s,DS:u,Ss:l}));function f(p,v){return!n(p,v)}}),PV=L(Ls,["typed","equalScalar"],e=>{var{typed:r,equalScalar:t}=e;return r(Ls,{"any, any":function(a,i){return a===null?i!==null:i===null?a!==null:a===void 0?i!==void 0:i===void 0?a!==void 0:!t(a,i)}})}),P0="partitionSelect",zV=["typed","isNumeric","isNaN","compare"],IV=L(P0,zV,e=>{var{typed:r,isNumeric:t,isNaN:n,compare:a}=e,i=a,o=(l,c)=>-a(l,c);return r(P0,{"Array | Matrix, number":function(c,f){return u(c,f,i)},"Array | Matrix, number, string":function(c,f,p){if(p==="asc")return u(c,f,i);if(p==="desc")return u(c,f,o);throw new Error('Compare string must be "asc" or "desc"')},"Array | Matrix, number, function":u});function u(l,c,f){if(!Pe(c)||c<0)throw new Error("k must be a non-negative integer");if(ke(l)){var p=l.size();if(p.length>1)throw new Error("Only one dimensional matrices supported");return s(l.valueOf(),c,f)}if(Array.isArray(l))return s(l,c,f)}function s(l,c,f){if(c>=l.length)throw new Error("k out of bounds");for(var p=0;p<l.length;p++)if(t(l[p])&&n(l[p]))return l[p];for(var v=0,m=l.length-1;v<m;){for(var d=v,y=m,h=l[Math.floor(Math.random()*(m-v+1))+v];d<y;)if(f(l[d],h)>=0){var E=l[y];l[y]=l[d],l[d]=E,--y}else++d;f(l[d],h)>0&&--d,c<=d?m=d:v=d+1}return l[c]}}),z0="sort",LV=["typed","matrix","compare","compareNatural"],qV=L(z0,LV,e=>{var{typed:r,matrix:t,compare:n,compareNatural:a}=e,i=n,o=(c,f)=>-n(c,f);return r(z0,{Array:function(f){return s(f),f.sort(i)},Matrix:function(f){return l(f),t(f.toArray().sort(i),f.storage())},"Array, function":function(f,p){return s(f),f.sort(p)},"Matrix, function":function(f,p){return l(f),t(f.toArray().sort(p),f.storage())},"Array, string":function(f,p){return s(f),f.sort(u(p))},"Matrix, string":function(f,p){return l(f),t(f.toArray().sort(u(p)),f.storage())}});function u(c){if(c==="asc")return i;if(c==="desc")return o;if(c==="natural")return a;throw new Error('String "asc", "desc", or "natural" expected')}function s(c){if(Xe(c).length!==1)throw new Error("One dimensional array expected")}function l(c){if(c.size().length!==1)throw new Error("One dimensional matrix expected")}}),I0="max",kV=["typed","config","numeric","larger"],Yb=L(I0,kV,e=>{var{typed:r,config:t,numeric:n,larger:a}=e;return r(I0,{"Array | Matrix":o,"Array | Matrix, number | BigNumber":function(s,l){return wu(s,l.valueOf(),i)},"...":function(s){if(yi(s))throw new TypeError("Scalar values expected in function max");return o(s)}});function i(u,s){try{return a(u,s)?u:s}catch(l){throw lt(l,"max",s)}}function o(u){var s;if(yn(u,function(l){try{isNaN(l)&&typeof l=="number"?s=NaN:(s===void 0||a(l,s))&&(s=l)}catch(c){throw lt(c,"max",l)}}),s===void 0)throw new Error("Cannot calculate max of an empty array");return typeof s=="string"&&(s=n(s,t.number)),s}}),L0="min",UV=["typed","config","numeric","smaller"],Xb=L(L0,UV,e=>{var{typed:r,config:t,numeric:n,smaller:a}=e;return r(L0,{"Array | Matrix":o,"Array | Matrix, number | BigNumber":function(s,l){return wu(s,l.valueOf(),i)},"...":function(s){if(yi(s))throw new TypeError("Scalar values expected in function min");return o(s)}});function i(u,s){try{return a(u,s)?u:s}catch(l){throw lt(l,"min",s)}}function o(u){var s;if(yn(u,function(l){try{isNaN(l)&&typeof l=="number"?s=NaN:(s===void 0||a(l,s))&&(s=l)}catch(c){throw lt(c,"min",l)}}),s===void 0)throw new Error("Cannot calculate min of an empty array");return typeof s=="string"&&(s=n(s,t.number)),s}}),HV="ImmutableDenseMatrix",jV=["smaller","DenseMatrix"],VV=L(HV,jV,e=>{var{smaller:r,DenseMatrix:t}=e;function n(a,i){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");if(i&&!et(i))throw new Error("Invalid datatype: "+i);if(ke(a)||mr(a)){var o=new t(a,i);this._data=o._data,this._size=o._size,this._datatype=o._datatype,this._min=null,this._max=null}else if(a&&mr(a.data)&&mr(a.size))this._data=a.data,this._size=a.size,this._datatype=a.datatype,this._min=typeof a.min<"u"?a.min:null,this._max=typeof a.max<"u"?a.max:null;else{if(a)throw new TypeError("Unsupported type of data ("+Dr(a)+")");this._data=[],this._size=[0],this._datatype=i,this._min=null,this._max=null}}return n.prototype=new t,n.prototype.type="ImmutableDenseMatrix",n.prototype.isImmutableDenseMatrix=!0,n.prototype.subset=function(a){switch(arguments.length){case 1:{var i=t.prototype.subset.call(this,a);return ke(i)?new n({data:i._data,size:i._size,datatype:i._datatype}):i}case 2:case 3:throw new Error("Cannot invoke set subset on an Immutable Matrix instance");default:throw new SyntaxError("Wrong number of arguments")}},n.prototype.set=function(){throw new Error("Cannot invoke set on an Immutable Matrix instance")},n.prototype.resize=function(){throw new Error("Cannot invoke resize on an Immutable Matrix instance")},n.prototype.reshape=function(){throw new Error("Cannot invoke reshape on an Immutable Matrix instance")},n.prototype.clone=function(){return new n({data:Ge(this._data),size:Ge(this._size),datatype:this._datatype})},n.prototype.toJSON=function(){return{mathjs:"ImmutableDenseMatrix",data:this._data,size:this._size,datatype:this._datatype}},n.fromJSON=function(a){return new n(a)},n.prototype.swapRows=function(){throw new Error("Cannot invoke swapRows on an Immutable Matrix instance")},n.prototype.min=function(){if(this._min===null){var a=null;this.forEach(function(i){(a===null||r(i,a))&&(a=i)}),this._min=a!==null?a:void 0}return this._min},n.prototype.max=function(){if(this._max===null){var a=null;this.forEach(function(i){(a===null||r(a,i))&&(a=i)}),this._max=a!==null?a:void 0}return this._max},n},{isClass:!0}),GV="Index",WV=["ImmutableDenseMatrix","getMatrixDataType"],ZV=L(GV,WV,e=>{var{ImmutableDenseMatrix:r,getMatrixDataType:t}=e;function n(i){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");this._dimensions=[],this._sourceSize=[],this._isScalar=!0;for(var o=0,u=arguments.length;o<u;o++){var s=arguments[o],l=mr(s),c=ke(s),f=null;if(gf(s))this._dimensions.push(s),this._isScalar=!1;else if(l||c){var p=void 0;t(s)==="boolean"?(l&&(p=a(q0(s).valueOf())),c&&(p=a(q0(s._data).valueOf())),f=s.valueOf().length):p=a(s.valueOf()),this._dimensions.push(p);var v=p.size();(v.length!==1||v[0]!==1||f!==null)&&(this._isScalar=!1)}else if(typeof s=="number")this._dimensions.push(a([s]));else if(typeof s=="string")this._dimensions.push(s);else throw new TypeError("Dimension must be an Array, Matrix, number, string, or Range");this._sourceSize.push(f)}}n.prototype.type="Index",n.prototype.isIndex=!0;function a(i){for(var o=0,u=i.length;o<u;o++)if(typeof i[o]!="number"||!Pe(i[o]))throw new TypeError("Index parameters must be positive integer numbers");return new r(i)}return n.prototype.clone=function(){var i=new n;return i._dimensions=Ge(this._dimensions),i._isScalar=this._isScalar,i._sourceSize=this._sourceSize,i},n.create=function(i){var o=new n;return n.apply(o,i),o},n.prototype.size=function(){for(var i=[],o=0,u=this._dimensions.length;o<u;o++){var s=this._dimensions[o];i[o]=typeof s=="string"?1:s.size()[0]}return i},n.prototype.max=function(){for(var i=[],o=0,u=this._dimensions.length;o<u;o++){var s=this._dimensions[o];i[o]=typeof s=="string"?s:s.max()}return i},n.prototype.min=function(){for(var i=[],o=0,u=this._dimensions.length;o<u;o++){var s=this._dimensions[o];i[o]=typeof s=="string"?s:s.min()}return i},n.prototype.forEach=function(i){for(var o=0,u=this._dimensions.length;o<u;o++)i(this._dimensions[o],o,this)},n.prototype.dimension=function(i){return this._dimensions[i]||null},n.prototype.isObjectProperty=function(){return this._dimensions.length===1&&typeof this._dimensions[0]=="string"},n.prototype.getObjectProperty=function(){return this.isObjectProperty()?this._dimensions[0]:null},n.prototype.isScalar=function(){return this._isScalar},n.prototype.toArray=function(){for(var i=[],o=0,u=this._dimensions.length;o<u;o++){var s=this._dimensions[o];i.push(typeof s=="string"?s:s.toArray())}return i},n.prototype.valueOf=n.prototype.toArray,n.prototype.toString=function(){for(var i=[],o=0,u=this._dimensions.length;o<u;o++){var s=this._dimensions[o];typeof s=="string"?i.push(JSON.stringify(s)):i.push(s.toString())}return"["+i.join(", ")+"]"},n.prototype.toJSON=function(){return{mathjs:"Index",dimensions:this._dimensions}},n.fromJSON=function(i){return n.create(i.dimensions)},n},{isClass:!0});function q0(e){var r=[];return e.forEach((t,n)=>{t&&r.push(n)}),r}var YV="FibonacciHeap",XV=["smaller","larger"],KV=L(YV,XV,e=>{var{smaller:r,larger:t}=e,n=1/Math.log((1+Math.sqrt(5))/2);function a(){if(!(this instanceof a))throw new SyntaxError("Constructor must be called with the new operator");this._minimum=null,this._size=0}a.prototype.type="FibonacciHeap",a.prototype.isFibonacciHeap=!0,a.prototype.insert=function(c,f){var p={key:c,value:f,degree:0};if(this._minimum){var v=this._minimum;p.left=v,p.right=v.right,v.right=p,p.right.left=p,r(c,v.key)&&(this._minimum=p)}else p.left=p,p.right=p,this._minimum=p;return this._size++,p},a.prototype.size=function(){return this._size},a.prototype.clear=function(){this._minimum=null,this._size=0},a.prototype.isEmpty=function(){return this._size===0},a.prototype.extractMinimum=function(){var c=this._minimum;if(c===null)return c;for(var f=this._minimum,p=c.degree,v=c.child;p>0;){var m=v.right;v.left.right=v.right,v.right.left=v.left,v.left=f,v.right=f.right,f.right=v,v.right.left=v,v.parent=null,v=m,p--}return c.left.right=c.right,c.right.left=c.left,c===c.right?f=null:(f=c.right,f=l(f,this._size)),this._size--,this._minimum=f,c},a.prototype.remove=function(c){this._minimum=i(this._minimum,c,-1),this.extractMinimum()};function i(c,f,p){f.key=p;var v=f.parent;return v&&r(f.key,v.key)&&(o(c,f,v),u(c,v)),r(f.key,c.key)&&(c=f),c}function o(c,f,p){f.left.right=f.right,f.right.left=f.left,p.degree--,p.child===f&&(p.child=f.right),p.degree===0&&(p.child=null),f.left=c,f.right=c.right,c.right=f,f.right.left=f,f.parent=null,f.mark=!1}function u(c,f){var p=f.parent;p&&(f.mark?(o(c,f,p),u(p)):f.mark=!0)}var s=function(f,p){f.left.right=f.right,f.right.left=f.left,f.parent=p,p.child?(f.left=p.child,f.right=p.child.right,p.child.right=f,f.right.left=f):(p.child=f,f.right=f,f.left=f),p.degree++,f.mark=!1};function l(c,f){var p=Math.floor(Math.log(f)*n)+1,v=new Array(p),m=0,d=c;if(d)for(m++,d=d.right;d!==c;)m++,d=d.right;for(var y;m>0;){for(var h=d.degree,E=d.right;y=v[h],!!y;){if(t(d.key,y.key)){var g=y;y=d,d=g}s(y,d),v[h]=null,h++}v[h]=d,d=E,m--}c=null;for(var w=0;w<p;w++)y=v[w],y&&(c?(y.left.right=y.right,y.right.left=y.left,y.left=c,y.right=c.right,c.right=y,y.right.left=y,r(y.key,c.key)&&(c=y)):c=y);return c}return a},{isClass:!0}),JV="Spa",QV=["addScalar","equalScalar","FibonacciHeap"],eG=L(JV,QV,e=>{var{addScalar:r,equalScalar:t,FibonacciHeap:n}=e;function a(){if(!(this instanceof a))throw new SyntaxError("Constructor must be called with the new operator");this._values=[],this._heap=new n}return a.prototype.type="Spa",a.prototype.isSpa=!0,a.prototype.set=function(i,o){if(this._values[i])this._values[i].value=o;else{var u=this._heap.insert(i,o);this._values[i]=u}},a.prototype.get=function(i){var o=this._values[i];return o?o.value:0},a.prototype.accumulate=function(i,o){var u=this._values[i];u?u.value=r(u.value,o):(u=this._heap.insert(i,o),this._values[i]=u)},a.prototype.forEach=function(i,o,u){var s=this._heap,l=this._values,c=[],f=s.extractMinimum();for(f&&c.push(f);f&&f.key<=o;)f.key>=i&&(t(f.value,0)||u(f.key,f.value,this)),f=s.extractMinimum(),f&&c.push(f);for(var p=0;p<c.length;p++){var v=c[p];f=s.insert(v.key,v.value),l[f.key]=f}},a.prototype.swap=function(i,o){var u=this._values[i],s=this._values[o];if(!u&&s)u=this._heap.insert(i,s.value),this._heap.remove(s),this._values[i]=u,this._values[o]=void 0;else if(u&&!s)s=this._heap.insert(o,u.value),this._heap.remove(u),this._values[o]=s,this._values[i]=void 0;else if(u&&s){var l=u.value;u.value=s.value,s.value=l}},a},{isClass:!0}),rG=yo(function(e){return new e(1).exp()},{hasher:Du}),tG=yo(function(e){return new e(1).plus(new e(5).sqrt()).div(2)},{hasher:Du}),Tf=yo(function(e){return e.acos(-1)},{hasher:Du}),nG=yo(function(e){return Tf(e).times(2)},{hasher:Du});function Du(e){return e[0].precision}function k0(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),t.push.apply(t,n)}return t}function hl(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?k0(Object(t),!0).forEach(function(n){Ur(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):k0(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var aG="Unit",iG=["?on","config","addScalar","subtractScalar","multiplyScalar","divideScalar","pow","abs","fix","round","equal","isNumeric","format","number","Complex","BigNumber","Fraction"],oG=L(aG,iG,e=>{var{on:r,config:t,addScalar:n,subtractScalar:a,multiplyScalar:i,divideScalar:o,pow:u,abs:s,fix:l,round:c,equal:f,isNumeric:p,format:v,number:m,Complex:d,BigNumber:y,Fraction:h}=e,E=m;function g(k,W){if(!(this instanceof g))throw new Error("Constructor must be called with the new operator");if(!(k==null||p(k)||dn(k)))throw new TypeError("First parameter in Unit constructor must be number, BigNumber, Fraction, Complex, or undefined");if(this.fixPrefix=!1,this.skipAutomaticSimplification=!0,W===void 0)this.units=[],this.dimensions=U.map(j=>0);else if(typeof W=="string"){var ue=g.parse(W);this.units=ue.units,this.dimensions=ue.dimensions}else if(Tt(W)&&W.value===null)this.fixPrefix=W.fixPrefix,this.skipAutomaticSimplification=W.skipAutomaticSimplification,this.dimensions=W.dimensions.slice(0),this.units=W.units.map(j=>kr({},j));else throw new TypeError("Second parameter in Unit constructor must be a string or valueless Unit");this.value=this._normalize(k)}Object.defineProperty(g,"name",{value:"Unit"}),g.prototype.constructor=g,g.prototype.type="Unit",g.prototype.isUnit=!0;var w,x,b;function A(){for(;b===" "||b===" ";)N()}function D(k){return k>="0"&&k<="9"||k==="."}function S(k){return k>="0"&&k<="9"}function N(){x++,b=w.charAt(x)}function C(k){x=k,b=w.charAt(x)}function M(){var k="",W=x;if(b==="+"?N():b==="-"&&(k+=b,N()),!D(b))return C(W),null;if(b==="."){if(k+=b,N(),!S(b))return C(W),null}else{for(;S(b);)k+=b,N();b==="."&&(k+=b,N())}for(;S(b);)k+=b,N();if(b==="E"||b==="e"){var ue="",j=x;if(ue+=b,N(),(b==="+"||b==="-")&&(ue+=b,N()),!S(b))return C(j),k;for(k=k+ue;S(b);)k+=b,N()}return k}function B(){for(var k="";S(b)||g.isValidAlpha(b);)k+=b,N();var W=k.charAt(0);return g.isValidAlpha(W)?k:null}function P(k){return b===k?(N(),k):null}g.parse=function(k,W){if(W=W||{},w=k,x=-1,b="",typeof w!="string")throw new TypeError("Invalid argument in Unit.parse, string expected");var ue=new g;ue.units=[];var j=1,K=!1;N(),A();var oe=M(),he=null;if(oe){if(t.number==="BigNumber")he=new y(oe);else if(t.number==="Fraction")try{he=new h(oe)}catch{he=parseFloat(oe)}else he=parseFloat(oe);A(),P("*")?(j=1,K=!0):P("/")&&(j=-1,K=!0)}for(var me=[],I=1;;){for(A();b==="(";)me.push(j),I*=j,j=1,N(),A();var H=void 0;if(b){var ie=b;if(H=B(),H===null)throw new SyntaxError('Unexpected "'+ie+'" in "'+w+'" at index '+x.toString())}else break;var ce=R(H);if(ce===null)throw new SyntaxError('Unit "'+H+'" not found.');var ve=j*I;if(A(),P("^")){A();var de=M();if(de===null)throw new SyntaxError('In "'+k+'", "^" must be followed by a floating-point number');ve*=de}ue.units.push({unit:ce.unit,prefix:ce.prefix,power:ve});for(var Se=0;Se<U.length;Se++)ue.dimensions[Se]+=(ce.unit.dimensions[Se]||0)*ve;for(A();b===")";){if(me.length===0)throw new SyntaxError('Unmatched ")" in "'+w+'" at index '+x.toString());I/=me.pop(),N(),A()}if(K=!1,P("*")?(j=1,K=!0):P("/")?(j=-1,K=!0):j=1,ce.unit.base){var xe=ce.unit.base.key;Q.auto[xe]={unit:ce.unit,prefix:ce.prefix}}}if(A(),b)throw new SyntaxError('Could not parse: "'+k+'"');if(K)throw new SyntaxError('Trailing characters: "'+k+'"');if(me.length!==0)throw new SyntaxError('Unmatched "(" in "'+w+'"');if(ue.units.length===0&&!W.allowNoUnits)throw new SyntaxError('"'+k+'" contains no units');return ue.value=he!==void 0?ue._normalize(he):null,ue},g.prototype.clone=function(){var k=new g;k.fixPrefix=this.fixPrefix,k.skipAutomaticSimplification=this.skipAutomaticSimplification,k.value=Ge(this.value),k.dimensions=this.dimensions.slice(0),k.units=[];for(var W=0;W<this.units.length;W++){k.units[W]={};for(var ue in this.units[W])Re(this.units[W],ue)&&(k.units[W][ue]=this.units[W][ue])}return k},g.prototype.valueType=function(){return Dr(this.value)},g.prototype._isDerived=function(){return this.units.length===0?!1:this.units.length>1||Math.abs(this.units[0].power-1)>1e-15},g.prototype._normalize=function(k){if(k==null||this.units.length===0)return k;for(var W=k,ue=g._getNumberConverter(Dr(k)),j=0;j<this.units.length;j++){var K=ue(this.units[j].unit.value),oe=ue(this.units[j].prefix.value),he=ue(this.units[j].power);W=i(W,u(i(K,oe),he))}return W},g.prototype._denormalize=function(k,W){if(k==null||this.units.length===0)return k;for(var ue=k,j=g._getNumberConverter(Dr(k)),K=0;K<this.units.length;K++){var oe=j(this.units[K].unit.value),he=j(this.units[K].prefix.value),me=j(this.units[K].power);ue=o(ue,u(i(oe,he),me))}return ue};var R=yo(k=>{if(Re(z,k)){var W=z[k],ue=W.prefixes[""];return{unit:W,prefix:ue}}for(var j in z)if(Re(z,j)&&Wz(k,j)){var K=z[j],oe=k.length-j.length,he=k.substring(0,oe),me=Re(K.prefixes,he)?K.prefixes[he]:void 0;if(me!==void 0)return{unit:K,prefix:me}}return null},{hasher:k=>k[0],limit:100});g.isValuelessUnit=function(k){return R(k)!==null},g.prototype.hasBase=function(k){if(typeof k=="string"&&(k=F[k]),!k)return!1;for(var W=0;W<U.length;W++)if(Math.abs((this.dimensions[W]||0)-(k.dimensions[W]||0))>1e-12)return!1;return!0},g.prototype.equalBase=function(k){for(var W=0;W<U.length;W++)if(Math.abs((this.dimensions[W]||0)-(k.dimensions[W]||0))>1e-12)return!1;return!0},g.prototype.equals=function(k){return this.equalBase(k)&&f(this.value,k.value)},g.prototype.multiply=function(k){for(var W=this.clone(),ue=Tt(k)?k:new g(k),j=0;j<U.length;j++)W.dimensions[j]=(this.dimensions[j]||0)+(ue.dimensions[j]||0);for(var K=0;K<ue.units.length;K++){var oe=hl({},ue.units[K]);W.units.push(oe)}if(this.value!==null||ue.value!==null){var he=this.value===null?this._normalize(1):this.value,me=ue.value===null?ue._normalize(1):ue.value;W.value=i(he,me)}else W.value=null;return Tt(k)&&(W.skipAutomaticSimplification=!1),_(W)},g.prototype.divideInto=function(k){return new g(k).divide(this)},g.prototype.divide=function(k){for(var W=this.clone(),ue=Tt(k)?k:new g(k),j=0;j<U.length;j++)W.dimensions[j]=(this.dimensions[j]||0)-(ue.dimensions[j]||0);for(var K=0;K<ue.units.length;K++){var oe=hl(hl({},ue.units[K]),{},{power:-ue.units[K].power});W.units.push(oe)}if(this.value!==null||ue.value!==null){var he=this.value===null?this._normalize(1):this.value,me=ue.value===null?ue._normalize(1):ue.value;W.value=o(he,me)}else W.value=null;return Tt(k)&&(W.skipAutomaticSimplification=!1),_(W)},g.prototype.pow=function(k){for(var W=this.clone(),ue=0;ue<U.length;ue++)W.dimensions[ue]=(this.dimensions[ue]||0)*k;for(var j=0;j<W.units.length;j++)W.units[j].power*=k;return W.value!==null?W.value=u(W.value,k):W.value=null,W.skipAutomaticSimplification=!1,_(W)};function _(k){return k.equalBase(F.NONE)&&k.value!==null&&!t.predictable?k.value:k}g.prototype.abs=function(){var k=this.clone();if(k.value!==null)if(k._isDerived()||k.units.length===0||k.units[0].unit.offset===0)k.value=s(k.value);else{var W=k._numberConverter(),ue=W(k.units[0].unit.value),j=W(k.units[0].unit.offset),K=i(ue,j);k.value=a(s(n(k.value,K)),K)}for(var oe in k.units)(k.units[oe].unit.name==="VA"||k.units[oe].unit.name==="VAR")&&(k.units[oe].unit=z.W);return k},g.prototype.to=function(k){var W=this.value===null?this._normalize(1):this.value,ue;if(typeof k=="string")ue=g.parse(k);else if(Tt(k))ue=k.clone();else throw new Error("String or Unit expected as parameter");if(!this.equalBase(ue))throw new Error("Units do not match ('".concat(ue.toString(),"' != '").concat(this.toString(),"')"));if(ue.value!==null)throw new Error("Cannot convert to a unit with a value");if(this.value===null||this._isDerived()||this.units.length===0||ue.units.length===0||this.units[0].unit.offset===ue.units[0].unit.offset)ue.value=Ge(W);else{var j=g._getNumberConverter(Dr(W)),K=this.units[0].unit.value,oe=this.units[0].unit.offset,he=i(K,oe),me=ue.units[0].unit.value,I=ue.units[0].unit.offset,H=i(me,I);ue.value=n(W,j(a(he,H)))}return ue.fixPrefix=!0,ue.skipAutomaticSimplification=!0,ue},g.prototype.toNumber=function(k){return E(this.toNumeric(k))},g.prototype.toNumeric=function(k){var W;return k?W=this.to(k):W=this.clone(),W._isDerived()||W.units.length===0?W._denormalize(W.value):W._denormalize(W.value,W.units[0].prefix.value)},g.prototype.toString=function(){return this.format()},g.prototype.toJSON=function(){return{mathjs:"Unit",value:this._denormalize(this.value),unit:this.formatUnits(),fixPrefix:this.fixPrefix}},g.fromJSON=function(k){var W=new g(k.value,k.unit);return W.fixPrefix=k.fixPrefix||!1,W},g.prototype.valueOf=g.prototype.toString,g.prototype.simplify=function(){var k=this.clone(),W=[],ue;for(var j in re)if(Re(re,j)&&k.hasBase(F[j])){ue=j;break}if(ue==="NONE")k.units=[];else{var K;if(ue&&Re(re,ue)&&(K=re[ue]),K)k.units=[{unit:K.unit,prefix:K.prefix,power:1}];else{for(var oe=!1,he=0;he<U.length;he++){var me=U[he];Math.abs(k.dimensions[he]||0)>1e-12&&(Re(re,me)?W.push({unit:re[me].unit,prefix:re[me].prefix,power:k.dimensions[he]||0}):oe=!0)}W.length<k.units.length&&!oe&&(k.units=W)}}return k},g.prototype.toSI=function(){for(var k=this.clone(),W=[],ue=0;ue<U.length;ue++){var j=U[ue];if(Math.abs(k.dimensions[ue]||0)>1e-12)if(Re(Q.si,j))W.push({unit:Q.si[j].unit,prefix:Q.si[j].prefix,power:k.dimensions[ue]||0});else throw new Error("Cannot express custom unit "+j+" in SI units")}return k.units=W,k.fixPrefix=!0,k.skipAutomaticSimplification=!0,this.value!==null?(k.value=null,this.to(k)):k},g.prototype.formatUnits=function(){for(var k="",W="",ue=0,j=0,K=0;K<this.units.length;K++)this.units[K].power>0?(ue++,k+=" "+this.units[K].prefix.name+this.units[K].unit.name,Math.abs(this.units[K].power-1)>1e-15&&(k+="^"+this.units[K].power)):this.units[K].power<0&&j++;if(j>0)for(var oe=0;oe<this.units.length;oe++)this.units[oe].power<0&&(ue>0?(W+=" "+this.units[oe].prefix.name+this.units[oe].unit.name,Math.abs(this.units[oe].power+1)>1e-15&&(W+="^"+-this.units[oe].power)):(W+=" "+this.units[oe].prefix.name+this.units[oe].unit.name,W+="^"+this.units[oe].power));k=k.substr(1),W=W.substr(1),ue>1&&j>0&&(k="("+k+")"),j>1&&ue>0&&(W="("+W+")");var he=k;return ue>0&&j>0&&(he+=" / "),he+=W,he},g.prototype.format=function(k){var W=this.skipAutomaticSimplification||this.value===null?this.clone():this.simplify(),ue=!1;typeof W.value<"u"&&W.value!==null&&dn(W.value)&&(ue=Math.abs(W.value.re)<1e-14);for(var j in W.units)Re(W.units,j)&&W.units[j].unit&&(W.units[j].unit.name==="VA"&&ue?W.units[j].unit=z.VAR:W.units[j].unit.name==="VAR"&&!ue&&(W.units[j].unit=z.VA));W.units.length===1&&!W.fixPrefix&&Math.abs(W.units[0].power-Math.round(W.units[0].power))<1e-14&&(W.units[0].prefix=W._bestPrefix());var K=W._denormalize(W.value),oe=W.value!==null?v(K,k||{}):"",he=W.formatUnits();return W.value&&dn(W.value)&&(oe="("+oe+")"),he.length>0&&oe.length>0&&(oe+=" "),oe+=he,oe},g.prototype._bestPrefix=function(){if(this.units.length!==1)throw new Error("Can only compute the best prefix for single units with integer powers, like kg, s^2, N^-1, and so forth!");if(Math.abs(this.units[0].power-Math.round(this.units[0].power))>=1e-14)throw new Error("Can only compute the best prefix for single units with integer powers, like kg, s^2, N^-1, and so forth!");var k=this.value!==null?s(this.value):0,W=s(this.units[0].unit.value),ue=this.units[0].prefix;if(k===0)return ue;var j=this.units[0].power,K=Math.log(k/Math.pow(ue.value*W,j))/Math.LN10-1.2;if(K>-2.200001&&K<1.800001)return ue;K=Math.abs(K);var oe=this.units[0].unit.prefixes;for(var he in oe)if(Re(oe,he)){var me=oe[he];if(me.scientific){var I=Math.abs(Math.log(k/Math.pow(me.value*W,j))/Math.LN10-1.2);(I<K||I===K&&me.name.length<ue.name.length)&&(ue=me,K=I)}}return ue},g.prototype.splitUnit=function(k){for(var W=this.clone(),ue=[],j=0;j<k.length&&(W=W.to(k[j]),j!==k.length-1);j++){var K=W.toNumeric(),oe=c(K),he=void 0,me=f(oe,K);me?he=oe:he=l(W.toNumeric());var I=new g(he,k[j].toString());ue.push(I),W=a(W,I)}for(var H=0,ie=0;ie<ue.length;ie++)H=n(H,ue[ie].value);return f(H,this.value)&&(W.value=0),ue.push(W),ue};var O={NONE:{"":{name:"",value:1,scientific:!0}},SHORT:{"":{name:"",value:1,scientific:!0},da:{name:"da",value:10,scientific:!1},h:{name:"h",value:100,scientific:!1},k:{name:"k",value:1e3,scientific:!0},M:{name:"M",value:1e6,scientific:!0},G:{name:"G",value:1e9,scientific:!0},T:{name:"T",value:1e12,scientific:!0},P:{name:"P",value:1e15,scientific:!0},E:{name:"E",value:1e18,scientific:!0},Z:{name:"Z",value:1e21,scientific:!0},Y:{name:"Y",value:1e24,scientific:!0},R:{name:"R",value:1e27,scientific:!0},Q:{name:"Q",value:1e30,scientific:!0},d:{name:"d",value:.1,scientific:!1},c:{name:"c",value:.01,scientific:!1},m:{name:"m",value:.001,scientific:!0},u:{name:"u",value:1e-6,scientific:!0},n:{name:"n",value:1e-9,scientific:!0},p:{name:"p",value:1e-12,scientific:!0},f:{name:"f",value:1e-15,scientific:!0},a:{name:"a",value:1e-18,scientific:!0},z:{name:"z",value:1e-21,scientific:!0},y:{name:"y",value:1e-24,scientific:!0},r:{name:"r",value:1e-27,scientific:!0},q:{name:"q",value:1e-30,scientific:!0}},LONG:{"":{name:"",value:1,scientific:!0},deca:{name:"deca",value:10,scientific:!1},hecto:{name:"hecto",value:100,scientific:!1},kilo:{name:"kilo",value:1e3,scientific:!0},mega:{name:"mega",value:1e6,scientific:!0},giga:{name:"giga",value:1e9,scientific:!0},tera:{name:"tera",value:1e12,scientific:!0},peta:{name:"peta",value:1e15,scientific:!0},exa:{name:"exa",value:1e18,scientific:!0},zetta:{name:"zetta",value:1e21,scientific:!0},yotta:{name:"yotta",value:1e24,scientific:!0},ronna:{name:"ronna",value:1e27,scientific:!0},quetta:{name:"quetta",value:1e30,scientific:!0},deci:{name:"deci",value:.1,scientific:!1},centi:{name:"centi",value:.01,scientific:!1},milli:{name:"milli",value:.001,scientific:!0},micro:{name:"micro",value:1e-6,scientific:!0},nano:{name:"nano",value:1e-9,scientific:!0},pico:{name:"pico",value:1e-12,scientific:!0},femto:{name:"femto",value:1e-15,scientific:!0},atto:{name:"atto",value:1e-18,scientific:!0},zepto:{name:"zepto",value:1e-21,scientific:!0},yocto:{name:"yocto",value:1e-24,scientific:!0},ronto:{name:"ronto",value:1e-27,scientific:!0},quecto:{name:"quecto",value:1e-30,scientific:!0}},SQUARED:{"":{name:"",value:1,scientific:!0},da:{name:"da",value:100,scientific:!1},h:{name:"h",value:1e4,scientific:!1},k:{name:"k",value:1e6,scientific:!0},M:{name:"M",value:1e12,scientific:!0},G:{name:"G",value:1e18,scientific:!0},T:{name:"T",value:1e24,scientific:!0},P:{name:"P",value:1e30,scientific:!0},E:{name:"E",value:1e36,scientific:!0},Z:{name:"Z",value:1e42,scientific:!0},Y:{name:"Y",value:1e48,scientific:!0},R:{name:"R",value:1e54,scientific:!0},Q:{name:"Q",value:1e60,scientific:!0},d:{name:"d",value:.01,scientific:!1},c:{name:"c",value:1e-4,scientific:!1},m:{name:"m",value:1e-6,scientific:!0},u:{name:"u",value:1e-12,scientific:!0},n:{name:"n",value:1e-18,scientific:!0},p:{name:"p",value:1e-24,scientific:!0},f:{name:"f",value:1e-30,scientific:!0},a:{name:"a",value:1e-36,scientific:!0},z:{name:"z",value:1e-42,scientific:!0},y:{name:"y",value:1e-48,scientific:!0},r:{name:"r",value:1e-54,scientific:!0},q:{name:"q",value:1e-60,scientific:!0}},CUBIC:{"":{name:"",value:1,scientific:!0},da:{name:"da",value:1e3,scientific:!1},h:{name:"h",value:1e6,scientific:!1},k:{name:"k",value:1e9,scientific:!0},M:{name:"M",value:1e18,scientific:!0},G:{name:"G",value:1e27,scientific:!0},T:{name:"T",value:1e36,scientific:!0},P:{name:"P",value:1e45,scientific:!0},E:{name:"E",value:1e54,scientific:!0},Z:{name:"Z",value:1e63,scientific:!0},Y:{name:"Y",value:1e72,scientific:!0},R:{name:"R",value:1e81,scientific:!0},Q:{name:"Q",value:1e90,scientific:!0},d:{name:"d",value:.001,scientific:!1},c:{name:"c",value:1e-6,scientific:!1},m:{name:"m",value:1e-9,scientific:!0},u:{name:"u",value:1e-18,scientific:!0},n:{name:"n",value:1e-27,scientific:!0},p:{name:"p",value:1e-36,scientific:!0},f:{name:"f",value:1e-45,scientific:!0},a:{name:"a",value:1e-54,scientific:!0},z:{name:"z",value:1e-63,scientific:!0},y:{name:"y",value:1e-72,scientific:!0},r:{name:"r",value:1e-81,scientific:!0},q:{name:"q",value:1e-90,scientific:!0}},BINARY_SHORT_SI:{"":{name:"",value:1,scientific:!0},k:{name:"k",value:1e3,scientific:!0},M:{name:"M",value:1e6,scientific:!0},G:{name:"G",value:1e9,scientific:!0},T:{name:"T",value:1e12,scientific:!0},P:{name:"P",value:1e15,scientific:!0},E:{name:"E",value:1e18,scientific:!0},Z:{name:"Z",value:1e21,scientific:!0},Y:{name:"Y",value:1e24,scientific:!0}},BINARY_SHORT_IEC:{"":{name:"",value:1,scientific:!0},Ki:{name:"Ki",value:1024,scientific:!0},Mi:{name:"Mi",value:Math.pow(1024,2),scientific:!0},Gi:{name:"Gi",value:Math.pow(1024,3),scientific:!0},Ti:{name:"Ti",value:Math.pow(1024,4),scientific:!0},Pi:{name:"Pi",value:Math.pow(1024,5),scientific:!0},Ei:{name:"Ei",value:Math.pow(1024,6),scientific:!0},Zi:{name:"Zi",value:Math.pow(1024,7),scientific:!0},Yi:{name:"Yi",value:Math.pow(1024,8),scientific:!0}},BINARY_LONG_SI:{"":{name:"",value:1,scientific:!0},kilo:{name:"kilo",value:1e3,scientific:!0},mega:{name:"mega",value:1e6,scientific:!0},giga:{name:"giga",value:1e9,scientific:!0},tera:{name:"tera",value:1e12,scientific:!0},peta:{name:"peta",value:1e15,scientific:!0},exa:{name:"exa",value:1e18,scientific:!0},zetta:{name:"zetta",value:1e21,scientific:!0},yotta:{name:"yotta",value:1e24,scientific:!0}},BINARY_LONG_IEC:{"":{name:"",value:1,scientific:!0},kibi:{name:"kibi",value:1024,scientific:!0},mebi:{name:"mebi",value:Math.pow(1024,2),scientific:!0},gibi:{name:"gibi",value:Math.pow(1024,3),scientific:!0},tebi:{name:"tebi",value:Math.pow(1024,4),scientific:!0},pebi:{name:"pebi",value:Math.pow(1024,5),scientific:!0},exi:{name:"exi",value:Math.pow(1024,6),scientific:!0},zebi:{name:"zebi",value:Math.pow(1024,7),scientific:!0},yobi:{name:"yobi",value:Math.pow(1024,8),scientific:!0}},BTU:{"":{name:"",value:1,scientific:!0},MM:{name:"MM",value:1e6,scientific:!0}}};O.SHORTLONG=kr({},O.SHORT,O.LONG),O.BINARY_SHORT=kr({},O.BINARY_SHORT_SI,O.BINARY_SHORT_IEC),O.BINARY_LONG=kr({},O.BINARY_LONG_SI,O.BINARY_LONG_IEC);var U=["MASS","LENGTH","TIME","CURRENT","TEMPERATURE","LUMINOUS_INTENSITY","AMOUNT_OF_SUBSTANCE","ANGLE","BIT"],F={NONE:{dimensions:[0,0,0,0,0,0,0,0,0]},MASS:{dimensions:[1,0,0,0,0,0,0,0,0]},LENGTH:{dimensions:[0,1,0,0,0,0,0,0,0]},TIME:{dimensions:[0,0,1,0,0,0,0,0,0]},CURRENT:{dimensions:[0,0,0,1,0,0,0,0,0]},TEMPERATURE:{dimensions:[0,0,0,0,1,0,0,0,0]},LUMINOUS_INTENSITY:{dimensions:[0,0,0,0,0,1,0,0,0]},AMOUNT_OF_SUBSTANCE:{dimensions:[0,0,0,0,0,0,1,0,0]},FORCE:{dimensions:[1,1,-2,0,0,0,0,0,0]},SURFACE:{dimensions:[0,2,0,0,0,0,0,0,0]},VOLUME:{dimensions:[0,3,0,0,0,0,0,0,0]},ENERGY:{dimensions:[1,2,-2,0,0,0,0,0,0]},POWER:{dimensions:[1,2,-3,0,0,0,0,0,0]},PRESSURE:{dimensions:[1,-1,-2,0,0,0,0,0,0]},ELECTRIC_CHARGE:{dimensions:[0,0,1,1,0,0,0,0,0]},ELECTRIC_CAPACITANCE:{dimensions:[-1,-2,4,2,0,0,0,0,0]},ELECTRIC_POTENTIAL:{dimensions:[1,2,-3,-1,0,0,0,0,0]},ELECTRIC_RESISTANCE:{dimensions:[1,2,-3,-2,0,0,0,0,0]},ELECTRIC_INDUCTANCE:{dimensions:[1,2,-2,-2,0,0,0,0,0]},ELECTRIC_CONDUCTANCE:{dimensions:[-1,-2,3,2,0,0,0,0,0]},MAGNETIC_FLUX:{dimensions:[1,2,-2,-1,0,0,0,0,0]},MAGNETIC_FLUX_DENSITY:{dimensions:[1,0,-2,-1,0,0,0,0,0]},FREQUENCY:{dimensions:[0,0,-1,0,0,0,0,0,0]},ANGLE:{dimensions:[0,0,0,0,0,0,0,1,0]},BIT:{dimensions:[0,0,0,0,0,0,0,0,1]}};for(var q in F)Re(F,q)&&(F[q].key=q);var Y={},V={name:"",base:Y,value:1,offset:0,dimensions:U.map(k=>0)},z={meter:{name:"meter",base:F.LENGTH,prefixes:O.LONG,value:1,offset:0},inch:{name:"inch",base:F.LENGTH,prefixes:O.NONE,value:.0254,offset:0},foot:{name:"foot",base:F.LENGTH,prefixes:O.NONE,value:.3048,offset:0},yard:{name:"yard",base:F.LENGTH,prefixes:O.NONE,value:.9144,offset:0},mile:{name:"mile",base:F.LENGTH,prefixes:O.NONE,value:1609.344,offset:0},link:{name:"link",base:F.LENGTH,prefixes:O.NONE,value:.201168,offset:0},rod:{name:"rod",base:F.LENGTH,prefixes:O.NONE,value:5.0292,offset:0},chain:{name:"chain",base:F.LENGTH,prefixes:O.NONE,value:20.1168,offset:0},angstrom:{name:"angstrom",base:F.LENGTH,prefixes:O.NONE,value:1e-10,offset:0},m:{name:"m",base:F.LENGTH,prefixes:O.SHORT,value:1,offset:0},in:{name:"in",base:F.LENGTH,prefixes:O.NONE,value:.0254,offset:0},ft:{name:"ft",base:F.LENGTH,prefixes:O.NONE,value:.3048,offset:0},yd:{name:"yd",base:F.LENGTH,prefixes:O.NONE,value:.9144,offset:0},mi:{name:"mi",base:F.LENGTH,prefixes:O.NONE,value:1609.344,offset:0},li:{name:"li",base:F.LENGTH,prefixes:O.NONE,value:.201168,offset:0},rd:{name:"rd",base:F.LENGTH,prefixes:O.NONE,value:5.02921,offset:0},ch:{name:"ch",base:F.LENGTH,prefixes:O.NONE,value:20.1168,offset:0},mil:{name:"mil",base:F.LENGTH,prefixes:O.NONE,value:254e-7,offset:0},m2:{name:"m2",base:F.SURFACE,prefixes:O.SQUARED,value:1,offset:0},sqin:{name:"sqin",base:F.SURFACE,prefixes:O.NONE,value:64516e-8,offset:0},sqft:{name:"sqft",base:F.SURFACE,prefixes:O.NONE,value:.09290304,offset:0},sqyd:{name:"sqyd",base:F.SURFACE,prefixes:O.NONE,value:.83612736,offset:0},sqmi:{name:"sqmi",base:F.SURFACE,prefixes:O.NONE,value:2589988110336e-6,offset:0},sqrd:{name:"sqrd",base:F.SURFACE,prefixes:O.NONE,value:25.29295,offset:0},sqch:{name:"sqch",base:F.SURFACE,prefixes:O.NONE,value:404.6873,offset:0},sqmil:{name:"sqmil",base:F.SURFACE,prefixes:O.NONE,value:64516e-14,offset:0},acre:{name:"acre",base:F.SURFACE,prefixes:O.NONE,value:4046.86,offset:0},hectare:{name:"hectare",base:F.SURFACE,prefixes:O.NONE,value:1e4,offset:0},m3:{name:"m3",base:F.VOLUME,prefixes:O.CUBIC,value:1,offset:0},L:{name:"L",base:F.VOLUME,prefixes:O.SHORT,value:.001,offset:0},l:{name:"l",base:F.VOLUME,prefixes:O.SHORT,value:.001,offset:0},litre:{name:"litre",base:F.VOLUME,prefixes:O.LONG,value:.001,offset:0},cuin:{name:"cuin",base:F.VOLUME,prefixes:O.NONE,value:16387064e-12,offset:0},cuft:{name:"cuft",base:F.VOLUME,prefixes:O.NONE,value:.028316846592,offset:0},cuyd:{name:"cuyd",base:F.VOLUME,prefixes:O.NONE,value:.764554857984,offset:0},teaspoon:{name:"teaspoon",base:F.VOLUME,prefixes:O.NONE,value:5e-6,offset:0},tablespoon:{name:"tablespoon",base:F.VOLUME,prefixes:O.NONE,value:15e-6,offset:0},drop:{name:"drop",base:F.VOLUME,prefixes:O.NONE,value:5e-8,offset:0},gtt:{name:"gtt",base:F.VOLUME,prefixes:O.NONE,value:5e-8,offset:0},minim:{name:"minim",base:F.VOLUME,prefixes:O.NONE,value:6161152e-14,offset:0},fluiddram:{name:"fluiddram",base:F.VOLUME,prefixes:O.NONE,value:36966911e-13,offset:0},fluidounce:{name:"fluidounce",base:F.VOLUME,prefixes:O.NONE,value:2957353e-11,offset:0},gill:{name:"gill",base:F.VOLUME,prefixes:O.NONE,value:.0001182941,offset:0},cc:{name:"cc",base:F.VOLUME,prefixes:O.NONE,value:1e-6,offset:0},cup:{name:"cup",base:F.VOLUME,prefixes:O.NONE,value:.0002365882,offset:0},pint:{name:"pint",base:F.VOLUME,prefixes:O.NONE,value:.0004731765,offset:0},quart:{name:"quart",base:F.VOLUME,prefixes:O.NONE,value:.0009463529,offset:0},gallon:{name:"gallon",base:F.VOLUME,prefixes:O.NONE,value:.003785412,offset:0},beerbarrel:{name:"beerbarrel",base:F.VOLUME,prefixes:O.NONE,value:.1173478,offset:0},oilbarrel:{name:"oilbarrel",base:F.VOLUME,prefixes:O.NONE,value:.1589873,offset:0},hogshead:{name:"hogshead",base:F.VOLUME,prefixes:O.NONE,value:.238481,offset:0},fldr:{name:"fldr",base:F.VOLUME,prefixes:O.NONE,value:36966911e-13,offset:0},floz:{name:"floz",base:F.VOLUME,prefixes:O.NONE,value:2957353e-11,offset:0},gi:{name:"gi",base:F.VOLUME,prefixes:O.NONE,value:.0001182941,offset:0},cp:{name:"cp",base:F.VOLUME,prefixes:O.NONE,value:.0002365882,offset:0},pt:{name:"pt",base:F.VOLUME,prefixes:O.NONE,value:.0004731765,offset:0},qt:{name:"qt",base:F.VOLUME,prefixes:O.NONE,value:.0009463529,offset:0},gal:{name:"gal",base:F.VOLUME,prefixes:O.NONE,value:.003785412,offset:0},bbl:{name:"bbl",base:F.VOLUME,prefixes:O.NONE,value:.1173478,offset:0},obl:{name:"obl",base:F.VOLUME,prefixes:O.NONE,value:.1589873,offset:0},g:{name:"g",base:F.MASS,prefixes:O.SHORT,value:.001,offset:0},gram:{name:"gram",base:F.MASS,prefixes:O.LONG,value:.001,offset:0},ton:{name:"ton",base:F.MASS,prefixes:O.SHORT,value:907.18474,offset:0},t:{name:"t",base:F.MASS,prefixes:O.SHORT,value:1e3,offset:0},tonne:{name:"tonne",base:F.MASS,prefixes:O.LONG,value:1e3,offset:0},grain:{name:"grain",base:F.MASS,prefixes:O.NONE,value:6479891e-11,offset:0},dram:{name:"dram",base:F.MASS,prefixes:O.NONE,value:.0017718451953125,offset:0},ounce:{name:"ounce",base:F.MASS,prefixes:O.NONE,value:.028349523125,offset:0},poundmass:{name:"poundmass",base:F.MASS,prefixes:O.NONE,value:.45359237,offset:0},hundredweight:{name:"hundredweight",base:F.MASS,prefixes:O.NONE,value:45.359237,offset:0},stick:{name:"stick",base:F.MASS,prefixes:O.NONE,value:.115,offset:0},stone:{name:"stone",base:F.MASS,prefixes:O.NONE,value:6.35029318,offset:0},gr:{name:"gr",base:F.MASS,prefixes:O.NONE,value:6479891e-11,offset:0},dr:{name:"dr",base:F.MASS,prefixes:O.NONE,value:.0017718451953125,offset:0},oz:{name:"oz",base:F.MASS,prefixes:O.NONE,value:.028349523125,offset:0},lbm:{name:"lbm",base:F.MASS,prefixes:O.NONE,value:.45359237,offset:0},cwt:{name:"cwt",base:F.MASS,prefixes:O.NONE,value:45.359237,offset:0},s:{name:"s",base:F.TIME,prefixes:O.SHORT,value:1,offset:0},min:{name:"min",base:F.TIME,prefixes:O.NONE,value:60,offset:0},h:{name:"h",base:F.TIME,prefixes:O.NONE,value:3600,offset:0},second:{name:"second",base:F.TIME,prefixes:O.LONG,value:1,offset:0},sec:{name:"sec",base:F.TIME,prefixes:O.LONG,value:1,offset:0},minute:{name:"minute",base:F.TIME,prefixes:O.NONE,value:60,offset:0},hour:{name:"hour",base:F.TIME,prefixes:O.NONE,value:3600,offset:0},day:{name:"day",base:F.TIME,prefixes:O.NONE,value:86400,offset:0},week:{name:"week",base:F.TIME,prefixes:O.NONE,value:7*86400,offset:0},month:{name:"month",base:F.TIME,prefixes:O.NONE,value:2629800,offset:0},year:{name:"year",base:F.TIME,prefixes:O.NONE,value:31557600,offset:0},decade:{name:"decade",base:F.TIME,prefixes:O.NONE,value:315576e3,offset:0},century:{name:"century",base:F.TIME,prefixes:O.NONE,value:315576e4,offset:0},millennium:{name:"millennium",base:F.TIME,prefixes:O.NONE,value:315576e5,offset:0},hertz:{name:"Hertz",base:F.FREQUENCY,prefixes:O.LONG,value:1,offset:0,reciprocal:!0},Hz:{name:"Hz",base:F.FREQUENCY,prefixes:O.SHORT,value:1,offset:0,reciprocal:!0},rad:{name:"rad",base:F.ANGLE,prefixes:O.SHORT,value:1,offset:0},radian:{name:"radian",base:F.ANGLE,prefixes:O.LONG,value:1,offset:0},deg:{name:"deg",base:F.ANGLE,prefixes:O.SHORT,value:null,offset:0},degree:{name:"degree",base:F.ANGLE,prefixes:O.LONG,value:null,offset:0},grad:{name:"grad",base:F.ANGLE,prefixes:O.SHORT,value:null,offset:0},gradian:{name:"gradian",base:F.ANGLE,prefixes:O.LONG,value:null,offset:0},cycle:{name:"cycle",base:F.ANGLE,prefixes:O.NONE,value:null,offset:0},arcsec:{name:"arcsec",base:F.ANGLE,prefixes:O.NONE,value:null,offset:0},arcmin:{name:"arcmin",base:F.ANGLE,prefixes:O.NONE,value:null,offset:0},A:{name:"A",base:F.CURRENT,prefixes:O.SHORT,value:1,offset:0},ampere:{name:"ampere",base:F.CURRENT,prefixes:O.LONG,value:1,offset:0},K:{name:"K",base:F.TEMPERATURE,prefixes:O.SHORT,value:1,offset:0},degC:{name:"degC",base:F.TEMPERATURE,prefixes:O.SHORT,value:1,offset:273.15},degF:{name:"degF",base:F.TEMPERATURE,prefixes:O.SHORT,value:new h(5,9),offset:459.67},degR:{name:"degR",base:F.TEMPERATURE,prefixes:O.SHORT,value:new h(5,9),offset:0},kelvin:{name:"kelvin",base:F.TEMPERATURE,prefixes:O.LONG,value:1,offset:0},celsius:{name:"celsius",base:F.TEMPERATURE,prefixes:O.LONG,value:1,offset:273.15},fahrenheit:{name:"fahrenheit",base:F.TEMPERATURE,prefixes:O.LONG,value:new h(5,9),offset:459.67},rankine:{name:"rankine",base:F.TEMPERATURE,prefixes:O.LONG,value:new h(5,9),offset:0},mol:{name:"mol",base:F.AMOUNT_OF_SUBSTANCE,prefixes:O.SHORT,value:1,offset:0},mole:{name:"mole",base:F.AMOUNT_OF_SUBSTANCE,prefixes:O.LONG,value:1,offset:0},cd:{name:"cd",base:F.LUMINOUS_INTENSITY,prefixes:O.SHORT,value:1,offset:0},candela:{name:"candela",base:F.LUMINOUS_INTENSITY,prefixes:O.LONG,value:1,offset:0},N:{name:"N",base:F.FORCE,prefixes:O.SHORT,value:1,offset:0},newton:{name:"newton",base:F.FORCE,prefixes:O.LONG,value:1,offset:0},dyn:{name:"dyn",base:F.FORCE,prefixes:O.SHORT,value:1e-5,offset:0},dyne:{name:"dyne",base:F.FORCE,prefixes:O.LONG,value:1e-5,offset:0},lbf:{name:"lbf",base:F.FORCE,prefixes:O.NONE,value:4.4482216152605,offset:0},poundforce:{name:"poundforce",base:F.FORCE,prefixes:O.NONE,value:4.4482216152605,offset:0},kip:{name:"kip",base:F.FORCE,prefixes:O.LONG,value:4448.2216,offset:0},kilogramforce:{name:"kilogramforce",base:F.FORCE,prefixes:O.NONE,value:9.80665,offset:0},J:{name:"J",base:F.ENERGY,prefixes:O.SHORT,value:1,offset:0},joule:{name:"joule",base:F.ENERGY,prefixes:O.LONG,value:1,offset:0},erg:{name:"erg",base:F.ENERGY,prefixes:O.SHORTLONG,value:1e-7,offset:0},Wh:{name:"Wh",base:F.ENERGY,prefixes:O.SHORT,value:3600,offset:0},BTU:{name:"BTU",base:F.ENERGY,prefixes:O.BTU,value:1055.05585262,offset:0},eV:{name:"eV",base:F.ENERGY,prefixes:O.SHORT,value:1602176565e-28,offset:0},electronvolt:{name:"electronvolt",base:F.ENERGY,prefixes:O.LONG,value:1602176565e-28,offset:0},W:{name:"W",base:F.POWER,prefixes:O.SHORT,value:1,offset:0},watt:{name:"watt",base:F.POWER,prefixes:O.LONG,value:1,offset:0},hp:{name:"hp",base:F.POWER,prefixes:O.NONE,value:745.6998715386,offset:0},VAR:{name:"VAR",base:F.POWER,prefixes:O.SHORT,value:d.I,offset:0},VA:{name:"VA",base:F.POWER,prefixes:O.SHORT,value:1,offset:0},Pa:{name:"Pa",base:F.PRESSURE,prefixes:O.SHORT,value:1,offset:0},psi:{name:"psi",base:F.PRESSURE,prefixes:O.NONE,value:6894.75729276459,offset:0},atm:{name:"atm",base:F.PRESSURE,prefixes:O.NONE,value:101325,offset:0},bar:{name:"bar",base:F.PRESSURE,prefixes:O.SHORTLONG,value:1e5,offset:0},torr:{name:"torr",base:F.PRESSURE,prefixes:O.NONE,value:133.322,offset:0},mmHg:{name:"mmHg",base:F.PRESSURE,prefixes:O.NONE,value:133.322,offset:0},mmH2O:{name:"mmH2O",base:F.PRESSURE,prefixes:O.NONE,value:9.80665,offset:0},cmH2O:{name:"cmH2O",base:F.PRESSURE,prefixes:O.NONE,value:98.0665,offset:0},coulomb:{name:"coulomb",base:F.ELECTRIC_CHARGE,prefixes:O.LONG,value:1,offset:0},C:{name:"C",base:F.ELECTRIC_CHARGE,prefixes:O.SHORT,value:1,offset:0},farad:{name:"farad",base:F.ELECTRIC_CAPACITANCE,prefixes:O.LONG,value:1,offset:0},F:{name:"F",base:F.ELECTRIC_CAPACITANCE,prefixes:O.SHORT,value:1,offset:0},volt:{name:"volt",base:F.ELECTRIC_POTENTIAL,prefixes:O.LONG,value:1,offset:0},V:{name:"V",base:F.ELECTRIC_POTENTIAL,prefixes:O.SHORT,value:1,offset:0},ohm:{name:"ohm",base:F.ELECTRIC_RESISTANCE,prefixes:O.SHORTLONG,value:1,offset:0},henry:{name:"henry",base:F.ELECTRIC_INDUCTANCE,prefixes:O.LONG,value:1,offset:0},H:{name:"H",base:F.ELECTRIC_INDUCTANCE,prefixes:O.SHORT,value:1,offset:0},siemens:{name:"siemens",base:F.ELECTRIC_CONDUCTANCE,prefixes:O.LONG,value:1,offset:0},S:{name:"S",base:F.ELECTRIC_CONDUCTANCE,prefixes:O.SHORT,value:1,offset:0},weber:{name:"weber",base:F.MAGNETIC_FLUX,prefixes:O.LONG,value:1,offset:0},Wb:{name:"Wb",base:F.MAGNETIC_FLUX,prefixes:O.SHORT,value:1,offset:0},tesla:{name:"tesla",base:F.MAGNETIC_FLUX_DENSITY,prefixes:O.LONG,value:1,offset:0},T:{name:"T",base:F.MAGNETIC_FLUX_DENSITY,prefixes:O.SHORT,value:1,offset:0},b:{name:"b",base:F.BIT,prefixes:O.BINARY_SHORT,value:1,offset:0},bits:{name:"bits",base:F.BIT,prefixes:O.BINARY_LONG,value:1,offset:0},B:{name:"B",base:F.BIT,prefixes:O.BINARY_SHORT,value:8,offset:0},bytes:{name:"bytes",base:F.BIT,prefixes:O.BINARY_LONG,value:8,offset:0}},J={meters:"meter",inches:"inch",feet:"foot",yards:"yard",miles:"mile",links:"link",rods:"rod",chains:"chain",angstroms:"angstrom",lt:"l",litres:"litre",liter:"litre",liters:"litre",teaspoons:"teaspoon",tablespoons:"tablespoon",minims:"minim",fluiddrams:"fluiddram",fluidounces:"fluidounce",gills:"gill",cups:"cup",pints:"pint",quarts:"quart",gallons:"gallon",beerbarrels:"beerbarrel",oilbarrels:"oilbarrel",hogsheads:"hogshead",gtts:"gtt",grams:"gram",tons:"ton",tonnes:"tonne",grains:"grain",drams:"dram",ounces:"ounce",poundmasses:"poundmass",hundredweights:"hundredweight",sticks:"stick",lb:"lbm",lbs:"lbm",kips:"kip",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",amps:"ampere",amp:"ampere",coulombs:"coulomb",volts:"volt",ohms:"ohm",farads:"farad",webers:"weber",teslas:"tesla",electronvolts:"electronvolt",moles:"mole",bit:"bits",byte:"bytes"};function le(k){if(k.number==="BigNumber"){var W=Tf(y);z.rad.value=new y(1),z.deg.value=W.div(180),z.grad.value=W.div(200),z.cycle.value=W.times(2),z.arcsec.value=W.div(648e3),z.arcmin.value=W.div(10800)}else z.rad.value=1,z.deg.value=Math.PI/180,z.grad.value=Math.PI/200,z.cycle.value=Math.PI*2,z.arcsec.value=Math.PI/648e3,z.arcmin.value=Math.PI/10800;z.radian.value=z.rad.value,z.degree.value=z.deg.value,z.gradian.value=z.grad.value}le(t),r&&r("config",function(k,W){k.number!==W.number&&le(k)});var Q={si:{NONE:{unit:V,prefix:O.NONE[""]},LENGTH:{unit:z.m,prefix:O.SHORT[""]},MASS:{unit:z.g,prefix:O.SHORT.k},TIME:{unit:z.s,prefix:O.SHORT[""]},CURRENT:{unit:z.A,prefix:O.SHORT[""]},TEMPERATURE:{unit:z.K,prefix:O.SHORT[""]},LUMINOUS_INTENSITY:{unit:z.cd,prefix:O.SHORT[""]},AMOUNT_OF_SUBSTANCE:{unit:z.mol,prefix:O.SHORT[""]},ANGLE:{unit:z.rad,prefix:O.SHORT[""]},BIT:{unit:z.bits,prefix:O.SHORT[""]},FORCE:{unit:z.N,prefix:O.SHORT[""]},ENERGY:{unit:z.J,prefix:O.SHORT[""]},POWER:{unit:z.W,prefix:O.SHORT[""]},PRESSURE:{unit:z.Pa,prefix:O.SHORT[""]},ELECTRIC_CHARGE:{unit:z.C,prefix:O.SHORT[""]},ELECTRIC_CAPACITANCE:{unit:z.F,prefix:O.SHORT[""]},ELECTRIC_POTENTIAL:{unit:z.V,prefix:O.SHORT[""]},ELECTRIC_RESISTANCE:{unit:z.ohm,prefix:O.SHORT[""]},ELECTRIC_INDUCTANCE:{unit:z.H,prefix:O.SHORT[""]},ELECTRIC_CONDUCTANCE:{unit:z.S,prefix:O.SHORT[""]},MAGNETIC_FLUX:{unit:z.Wb,prefix:O.SHORT[""]},MAGNETIC_FLUX_DENSITY:{unit:z.T,prefix:O.SHORT[""]},FREQUENCY:{unit:z.Hz,prefix:O.SHORT[""]}}};Q.cgs=JSON.parse(JSON.stringify(Q.si)),Q.cgs.LENGTH={unit:z.m,prefix:O.SHORT.c},Q.cgs.MASS={unit:z.g,prefix:O.SHORT[""]},Q.cgs.FORCE={unit:z.dyn,prefix:O.SHORT[""]},Q.cgs.ENERGY={unit:z.erg,prefix:O.NONE[""]},Q.us=JSON.parse(JSON.stringify(Q.si)),Q.us.LENGTH={unit:z.ft,prefix:O.NONE[""]},Q.us.MASS={unit:z.lbm,prefix:O.NONE[""]},Q.us.TEMPERATURE={unit:z.degF,prefix:O.NONE[""]},Q.us.FORCE={unit:z.lbf,prefix:O.NONE[""]},Q.us.ENERGY={unit:z.BTU,prefix:O.BTU[""]},Q.us.POWER={unit:z.hp,prefix:O.NONE[""]},Q.us.PRESSURE={unit:z.psi,prefix:O.NONE[""]},Q.auto=JSON.parse(JSON.stringify(Q.si));var re=Q.auto;g.setUnitSystem=function(k){if(Re(Q,k))re=Q[k];else throw new Error("Unit system "+k+" does not exist. Choices are: "+Object.keys(Q).join(", "))},g.getUnitSystem=function(){for(var k in Q)if(Re(Q,k)&&Q[k]===re)return k},g.typeConverters={BigNumber:function(W){return W!=null&&W.isFraction?new y(W.n).div(W.d).times(W.s):new y(W+"")},Fraction:function(W){return new h(W)},Complex:function(W){return W},number:function(W){return W!=null&&W.isFraction?m(W):W}},g.prototype._numberConverter=function(){var k=g.typeConverters[this.valueType()];if(k)return k;throw new TypeError('Unsupported Unit value type "'+this.valueType()+'"')},g._getNumberConverter=function(k){if(!g.typeConverters[k])throw new TypeError('Unsupported type "'+k+'"');return g.typeConverters[k]};for(var se in z)if(Re(z,se)){var te=z[se];te.dimensions=te.base.dimensions}for(var ae in J)if(Re(J,ae)){var fe=z[J[ae]],ne={};for(var be in fe)Re(fe,be)&&(ne[be]=fe[be]);ne.name=ae,z[ae]=ne}g.isValidAlpha=function(W){return/^[a-zA-Z]$/.test(W)};function $e(k){for(var W=0;W<k.length;W++){if(b=k.charAt(W),W===0&&!g.isValidAlpha(b))throw new Error('Invalid unit name (must begin with alpha character): "'+k+'"');if(W>0&&!(g.isValidAlpha(b)||S(b)))throw new Error('Invalid unit name (only alphanumeric characters are allowed): "'+k+'"')}}return g.createUnit=function(k,W){if(typeof k!="object")throw new TypeError("createUnit expects first parameter to be of type 'Object'");if(W&&W.override){for(var ue in k)if(Re(k,ue)&&g.deleteUnit(ue),k[ue].aliases)for(var j=0;j<k[ue].aliases.length;j++)g.deleteUnit(k[ue].aliases[j])}var K;for(var oe in k)Re(k,oe)&&(K=g.createUnitSingle(oe,k[oe]));return K},g.createUnitSingle=function(k,W){if((typeof W>"u"||W===null)&&(W={}),typeof k!="string")throw new TypeError("createUnitSingle expects first parameter to be of type 'string'");if(Re(z,k))throw new Error('Cannot create unit "'+k+'": a unit with that name already exists');$e(k);var ue=null,j=[],K=0,oe,he,me;if(W&&W.type==="Unit")ue=W.clone();else if(typeof W=="string")W!==""&&(oe=W);else if(typeof W=="object")oe=W.definition,he=W.prefixes,K=W.offset,me=W.baseName,W.aliases&&(j=W.aliases.valueOf());else throw new TypeError('Cannot create unit "'+k+'" from "'+W.toString()+'": expecting "string" or "Unit" or "Object"');if(j){for(var I=0;I<j.length;I++)if(Re(z,j[I]))throw new Error('Cannot create alias "'+j[I]+'": a unit with that name already exists')}if(oe&&typeof oe=="string"&&!ue)try{ue=g.parse(oe,{allowNoUnits:!0})}catch(T){throw T.message='Could not create unit "'+k+'" from "'+oe+'": '+T.message,T}else oe&&oe.type==="Unit"&&(ue=oe.clone());j=j||[],K=K||0,he&&he.toUpperCase?he=O[he.toUpperCase()]||O.NONE:he=O.NONE;var H={};if(ue){H={name:k,value:ue.value,dimensions:ue.dimensions.slice(0),prefixes:he,offset:K};var de=!1;for(var Se in F)if(Re(F,Se)){for(var xe=!0,Me=0;Me<U.length;Me++)if(Math.abs((H.dimensions[Me]||0)-(F[Se].dimensions[Me]||0))>1e-12){xe=!1;break}if(xe){de=!0,H.base=F[Se];break}}if(!de){me=me||k+"_STUFF";var Ae={dimensions:ue.dimensions.slice(0)};Ae.key=me,F[me]=Ae,re[me]={unit:H,prefix:O.NONE[""]},H.base=F[me]}}else{if(me=me||k+"_STUFF",U.indexOf(me)>=0)throw new Error('Cannot create new base unit "'+k+'": a base unit with that name already exists (and cannot be overridden)');U.push(me);for(var ie in F)Re(F,ie)&&(F[ie].dimensions[U.length-1]=0);for(var ce={dimensions:[]},ve=0;ve<U.length;ve++)ce.dimensions[ve]=0;ce.dimensions[U.length-1]=1,ce.key=me,F[me]=ce,H={name:k,value:1,dimensions:F[me].dimensions.slice(0),prefixes:he,offset:K,base:F[me]},re[me]={unit:H,prefix:O.NONE[""]}}g.UNITS[k]=H;for(var nr=0;nr<j.length;nr++){var ir=j[nr],Ie={};for(var Or in H)Re(H,Or)&&(Ie[Or]=H[Or]);Ie.name=ir,g.UNITS[ir]=Ie}return delete R.cache,new g(null,k)},g.deleteUnit=function(k){delete g.UNITS[k],delete R.cache},g.PREFIXES=O,g.BASE_DIMENSIONS=U,g.BASE_UNITS=F,g.UNIT_SYSTEMS=Q,g.UNITS=z,g},{isClass:!0}),U0="unit",sG=["typed","Unit"],uG=L(U0,sG,e=>{var{typed:r,Unit:t}=e;return r(U0,{Unit:function(a){return a.clone()},string:function(a){return t.isValuelessUnit(a)?new t(null,a):t.parse(a,{allowNoUnits:!0})},"number | BigNumber | Fraction | Complex, string | Unit":function(a,i){return new t(a,i)},"number | BigNumber | Fraction":function(a){return new t(a)},"Array | Matrix":r.referToSelf(n=>a=>tr(a,n))})}),H0="sparse",lG=["typed","SparseMatrix"],cG=L(H0,lG,e=>{var{typed:r,SparseMatrix:t}=e;return r(H0,{"":function(){return new t([])},string:function(a){return new t([],a)},"Array | Matrix":function(a){return new t(a)},"Array | Matrix, string":function(a,i){return new t(a,i)}})}),j0="createUnit",fG=["typed","Unit"],pG=L(j0,fG,e=>{var{typed:r,Unit:t}=e;return r(j0,{"Object, Object":function(a,i){return t.createUnit(a,i)},Object:function(a){return t.createUnit(a,{})},"string, Unit | string | Object, Object":function(a,i,o){var u={};return u[a]=i,t.createUnit(u,o)},"string, Unit | string | Object":function(a,i){var o={};return o[a]=i,t.createUnit(o,{})},string:function(a){var i={};return i[a]={},t.createUnit(i,{})}})}),V0="acos",vG=["typed","config","Complex"],dG=L(V0,vG,e=>{var{typed:r,config:t,Complex:n}=e;return r(V0,{number:function(i){return i>=-1&&i<=1||t.predictable?Math.acos(i):new n(i,0).acos()},Complex:function(i){return i.acos()},BigNumber:function(i){return i.acos()}})}),G0="acosh",mG=["typed","config","Complex"],hG=L(G0,mG,e=>{var{typed:r,config:t,Complex:n}=e;return r(G0,{number:function(i){return i>=1||t.predictable?pb(i):i<=-1?new n(Math.log(Math.sqrt(i*i-1)-i),Math.PI):new n(i,0).acosh()},Complex:function(i){return i.acosh()},BigNumber:function(i){return i.acosh()}})}),W0="acot",gG=["typed","BigNumber"],yG=L(W0,gG,e=>{var{typed:r,BigNumber:t}=e;return r(W0,{number:vb,Complex:function(a){return a.acot()},BigNumber:function(a){return new t(1).div(a).atan()}})}),Z0="acoth",bG=["typed","config","Complex","BigNumber"],xG=L(Z0,bG,e=>{var{typed:r,config:t,Complex:n,BigNumber:a}=e;return r(Z0,{number:function(o){return o>=1||o<=-1||t.predictable?db(o):new n(o,0).acoth()},Complex:function(o){return o.acoth()},BigNumber:function(o){return new a(1).div(o).atanh()}})}),Y0="acsc",wG=["typed","config","Complex","BigNumber"],EG=L(Y0,wG,e=>{var{typed:r,config:t,Complex:n,BigNumber:a}=e;return r(Y0,{number:function(o){return o<=-1||o>=1||t.predictable?mb(o):new n(o,0).acsc()},Complex:function(o){return o.acsc()},BigNumber:function(o){return new a(1).div(o).asin()}})}),X0="acsch",SG=["typed","BigNumber"],AG=L(X0,SG,e=>{var{typed:r,BigNumber:t}=e;return r(X0,{number:hb,Complex:function(a){return a.acsch()},BigNumber:function(a){return new t(1).div(a).asinh()}})}),K0="asec",DG=["typed","config","Complex","BigNumber"],NG=L(K0,DG,e=>{var{typed:r,config:t,Complex:n,BigNumber:a}=e;return r(K0,{number:function(o){return o<=-1||o>=1||t.predictable?gb(o):new n(o,0).asec()},Complex:function(o){return o.asec()},BigNumber:function(o){return new a(1).div(o).acos()}})}),J0="asech",CG=["typed","config","Complex","BigNumber"],MG=L(J0,CG,e=>{var{typed:r,config:t,Complex:n,BigNumber:a}=e;return r(J0,{number:function(o){if(o<=1&&o>=-1||t.predictable){var u=1/o;if(u>0||t.predictable)return yb(o);var s=Math.sqrt(u*u-1);return new n(Math.log(s-u),Math.PI)}return new n(o,0).asech()},Complex:function(o){return o.asech()},BigNumber:function(o){return new a(1).div(o).acosh()}})}),Q0="asin",TG=["typed","config","Complex"],OG=L(Q0,TG,e=>{var{typed:r,config:t,Complex:n}=e;return r(Q0,{number:function(i){return i>=-1&&i<=1||t.predictable?Math.asin(i):new n(i,0).asin()},Complex:function(i){return i.asin()},BigNumber:function(i){return i.asin()}})}),_G="asinh",$G=["typed"],FG=L(_G,$G,e=>{var{typed:r}=e;return r("asinh",{number:bb,Complex:function(n){return n.asinh()},BigNumber:function(n){return n.asinh()}})}),BG="atan",RG=["typed"],PG=L(BG,RG,e=>{var{typed:r}=e;return r("atan",{number:function(n){return Math.atan(n)},Complex:function(n){return n.atan()},BigNumber:function(n){return n.atan()}})}),eh="atan2",zG=["typed","matrix","equalScalar","BigNumber","DenseMatrix","concat"],IG=L(eh,zG,e=>{var{typed:r,matrix:t,equalScalar:n,BigNumber:a,DenseMatrix:i,concat:o}=e,u=Jt({typed:r,equalScalar:n}),s=ct({typed:r}),l=Bb({typed:r,equalScalar:n}),c=Jr({typed:r,equalScalar:n}),f=Hr({typed:r,DenseMatrix:i}),p=Cr({typed:r,matrix:t,concat:o});return r(eh,{"number, number":Math.atan2,"BigNumber, BigNumber":(v,m)=>a.atan2(v,m)},p({scalar:"number | BigNumber",SS:l,DS:s,SD:u,Ss:c,sS:f}))}),rh="atanh",LG=["typed","config","Complex"],qG=L(rh,LG,e=>{var{typed:r,config:t,Complex:n}=e;return r(rh,{number:function(i){return i<=1&&i>=-1||t.predictable?xb(i):new n(i,0).atanh()},Complex:function(i){return i.atanh()},BigNumber:function(i){return i.atanh()}})}),Si=L("trigUnit",["typed"],e=>{var{typed:r}=e;return{Unit:r.referToSelf(t=>n=>{if(!n.hasBase(n.constructor.BASE_UNITS.ANGLE))throw new TypeError("Unit in function cot is no angle");return r.find(t,n.valueType())(n.value)})}}),th="cos",kG=["typed"],UG=L(th,kG,e=>{var{typed:r}=e,t=Si({typed:r});return r(th,{number:Math.cos,"Complex | BigNumber":n=>n.cos()},t)}),nh="cosh",HG=["typed"],jG=L(nh,HG,e=>{var{typed:r}=e;return r(nh,{number:qz,"Complex | BigNumber":t=>t.cosh()})}),ah="cot",VG=["typed","BigNumber"],GG=L(ah,VG,e=>{var{typed:r,BigNumber:t}=e,n=Si({typed:r});return r(ah,{number:wb,Complex:a=>a.cot(),BigNumber:a=>new t(1).div(a.tan())},n)}),ih="coth",WG=["typed","BigNumber"],ZG=L(ih,WG,e=>{var{typed:r,BigNumber:t}=e;return r(ih,{number:Eb,Complex:n=>n.coth(),BigNumber:n=>new t(1).div(n.tanh())})}),oh="csc",YG=["typed","BigNumber"],XG=L(oh,YG,e=>{var{typed:r,BigNumber:t}=e,n=Si({typed:r});return r(oh,{number:Sb,Complex:a=>a.csc(),BigNumber:a=>new t(1).div(a.sin())},n)}),sh="csch",KG=["typed","BigNumber"],JG=L(sh,KG,e=>{var{typed:r,BigNumber:t}=e;return r(sh,{number:Ab,Complex:n=>n.csch(),BigNumber:n=>new t(1).div(n.sinh())})}),uh="sec",QG=["typed","BigNumber"],eW=L(uh,QG,e=>{var{typed:r,BigNumber:t}=e,n=Si({typed:r});return r(uh,{number:Db,Complex:a=>a.sec(),BigNumber:a=>new t(1).div(a.cos())},n)}),lh="sech",rW=["typed","BigNumber"],tW=L(lh,rW,e=>{var{typed:r,BigNumber:t}=e;return r(lh,{number:Nb,Complex:n=>n.sech(),BigNumber:n=>new t(1).div(n.cosh())})}),ch="sin",nW=["typed"],aW=L(ch,nW,e=>{var{typed:r}=e,t=Si({typed:r});return r(ch,{number:Math.sin,"Complex | BigNumber":n=>n.sin()},t)}),fh="sinh",iW=["typed"],oW=L(fh,iW,e=>{var{typed:r}=e;return r(fh,{number:Cb,"Complex | BigNumber":t=>t.sinh()})}),ph="tan",sW=["typed"],uW=L(ph,sW,e=>{var{typed:r}=e,t=Si({typed:r});return r(ph,{number:Math.tan,"Complex | BigNumber":n=>n.tan()},t)}),lW="tanh",cW=["typed"],fW=L(lW,cW,e=>{var{typed:r}=e;return r("tanh",{number:Uz,"Complex | BigNumber":t=>t.tanh()})}),vh="setCartesian",pW=["typed","size","subset","compareNatural","Index","DenseMatrix"],vW=L(vh,pW,e=>{var{typed:r,size:t,subset:n,compareNatural:a,Index:i,DenseMatrix:o}=e;return r(vh,{"Array | Matrix, Array | Matrix":function(s,l){var c=[];if(n(t(s),new i(0))!==0&&n(t(l),new i(0))!==0){var f=dr(Array.isArray(s)?s:s.toArray()).sort(a),p=dr(Array.isArray(l)?l:l.toArray()).sort(a);c=[];for(var v=0;v<f.length;v++)for(var m=0;m<p.length;m++)c.push([f[v],p[m]])}return Array.isArray(s)&&Array.isArray(l)?c:new o(c)}})}),dh="setDifference",dW=["typed","size","subset","compareNatural","Index","DenseMatrix"],mW=L(dh,dW,e=>{var{typed:r,size:t,subset:n,compareNatural:a,Index:i,DenseMatrix:o}=e;return r(dh,{"Array | Matrix, Array | Matrix":function(s,l){var c;if(n(t(s),new i(0))===0)c=[];else{if(n(t(l),new i(0))===0)return dr(s.toArray());var f=Ja(dr(Array.isArray(s)?s:s.toArray()).sort(a)),p=Ja(dr(Array.isArray(l)?l:l.toArray()).sort(a));c=[];for(var v,m=0;m<f.length;m++){v=!1;for(var d=0;d<p.length;d++)if(a(f[m].value,p[d].value)===0&&f[m].identifier===p[d].identifier){v=!0;break}v||c.push(f[m])}}return Array.isArray(s)&&Array.isArray(l)?Ss(c):new o(Ss(c))}})}),mh="setDistinct",hW=["typed","size","subset","compareNatural","Index","DenseMatrix"],gW=L(mh,hW,e=>{var{typed:r,size:t,subset:n,compareNatural:a,Index:i,DenseMatrix:o}=e;return r(mh,{"Array | Matrix":function(s){var l;if(n(t(s),new i(0))===0)l=[];else{var c=dr(Array.isArray(s)?s:s.toArray()).sort(a);l=[],l.push(c[0]);for(var f=1;f<c.length;f++)a(c[f],c[f-1])!==0&&l.push(c[f])}return Array.isArray(s)?l:new o(l)}})}),hh="setIntersect",yW=["typed","size","subset","compareNatural","Index","DenseMatrix"],bW=L(hh,yW,e=>{var{typed:r,size:t,subset:n,compareNatural:a,Index:i,DenseMatrix:o}=e;return r(hh,{"Array | Matrix, Array | Matrix":function(s,l){var c;if(n(t(s),new i(0))===0||n(t(l),new i(0))===0)c=[];else{var f=Ja(dr(Array.isArray(s)?s:s.toArray()).sort(a)),p=Ja(dr(Array.isArray(l)?l:l.toArray()).sort(a));c=[];for(var v=0;v<f.length;v++)for(var m=0;m<p.length;m++)if(a(f[v].value,p[m].value)===0&&f[v].identifier===p[m].identifier){c.push(f[v]);break}}return Array.isArray(s)&&Array.isArray(l)?Ss(c):new o(Ss(c))}})}),gh="setIsSubset",xW=["typed","size","subset","compareNatural","Index"],wW=L(gh,xW,e=>{var{typed:r,size:t,subset:n,compareNatural:a,Index:i}=e;return r(gh,{"Array | Matrix, Array | Matrix":function(u,s){if(n(t(u),new i(0))===0)return!0;if(n(t(s),new i(0))===0)return!1;for(var l=Ja(dr(Array.isArray(u)?u:u.toArray()).sort(a)),c=Ja(dr(Array.isArray(s)?s:s.toArray()).sort(a)),f,p=0;p<l.length;p++){f=!1;for(var v=0;v<c.length;v++)if(a(l[p].value,c[v].value)===0&&l[p].identifier===c[v].identifier){f=!0;break}if(f===!1)return!1}return!0}})}),yh="setMultiplicity",EW=["typed","size","subset","compareNatural","Index"],SW=L(yh,EW,e=>{var{typed:r,size:t,subset:n,compareNatural:a,Index:i}=e;return r(yh,{"number | BigNumber | Fraction | Complex, Array | Matrix":function(u,s){if(n(t(s),new i(0))===0)return 0;for(var l=dr(Array.isArray(s)?s:s.toArray()),c=0,f=0;f<l.length;f++)a(l[f],u)===0&&c++;return c}})}),bh="setPowerset",AW=["typed","size","subset","compareNatural","Index"],DW=L(bh,AW,e=>{var{typed:r,size:t,subset:n,compareNatural:a,Index:i}=e;return r(bh,{"Array | Matrix":function(l){if(n(t(l),new i(0))===0)return[];for(var c=dr(Array.isArray(l)?l:l.toArray()).sort(a),f=[],p=0;p.toString(2).length<=c.length;)f.push(o(c,p.toString(2).split("").reverse())),p++;return u(f)}});function o(s,l){for(var c=[],f=0;f<l.length;f++)l[f]==="1"&&c.push(s[f]);return c}function u(s){for(var l=[],c=s.length-1;c>0;c--)for(var f=0;f<c;f++)s[f].length>s[f+1].length&&(l=s[f],s[f]=s[f+1],s[f+1]=l);return s}}),xh="setSize",NW=["typed","compareNatural"],CW=L(xh,NW,e=>{var{typed:r,compareNatural:t}=e;return r(xh,{"Array | Matrix":function(a){return Array.isArray(a)?dr(a).length:dr(a.toArray()).length},"Array | Matrix, boolean":function(a,i){if(i===!1||a.length===0)return Array.isArray(a)?dr(a).length:dr(a.toArray()).length;for(var o=dr(Array.isArray(a)?a:a.toArray()).sort(t),u=1,s=1;s<o.length;s++)t(o[s],o[s-1])!==0&&u++;return u}})}),wh="setSymDifference",MW=["typed","size","concat","subset","setDifference","Index"],TW=L(wh,MW,e=>{var{typed:r,size:t,concat:n,subset:a,setDifference:i,Index:o}=e;return r(wh,{"Array | Matrix, Array | Matrix":function(s,l){if(a(t(s),new o(0))===0)return dr(l);if(a(t(l),new o(0))===0)return dr(s);var c=dr(s),f=dr(l);return n(i(c,f),i(f,c))}})}),Eh="setUnion",OW=["typed","size","concat","subset","setIntersect","setSymDifference","Index"],_W=L(Eh,OW,e=>{var{typed:r,size:t,concat:n,subset:a,setIntersect:i,setSymDifference:o,Index:u}=e;return r(Eh,{"Array | Matrix, Array | Matrix":function(l,c){if(a(t(l),new u(0))===0)return dr(c);if(a(t(c),new u(0))===0)return dr(l);var f=dr(l),p=dr(c);return n(o(f,p),i(f,p))}})}),Sh="add",$W=["typed","matrix","addScalar","equalScalar","DenseMatrix","SparseMatrix","concat"],FW=L(Sh,$W,e=>{var{typed:r,matrix:t,addScalar:n,equalScalar:a,DenseMatrix:i,SparseMatrix:o,concat:u}=e,s=Ln({typed:r}),l=Af({typed:r,equalScalar:a}),c=ua({typed:r,DenseMatrix:i}),f=Cr({typed:r,matrix:t,concat:u});return r(Sh,{"any, any":n,"any, any, ...any":r.referToSelf(p=>(v,m,d)=>{for(var y=p(v,m),h=0;h<d.length;h++)y=p(y,d[h]);return y})},f({elop:n,DS:s,SS:l,Ss:c}))}),Ah="hypot",BW=["typed","abs","addScalar","divideScalar","multiplyScalar","sqrt","smaller","isPositive"],RW=L(Ah,BW,e=>{var{typed:r,abs:t,addScalar:n,divideScalar:a,multiplyScalar:i,sqrt:o,smaller:u,isPositive:s}=e;return r(Ah,{"... number | BigNumber":l,Array:l,Matrix:c=>l(dr(c.toArray()))});function l(c){for(var f=0,p=0,v=0;v<c.length;v++){if(dn(c[v]))throw new TypeError("Unexpected type of argument to hypot");var m=t(c[v]);u(p,m)?(f=i(f,i(a(p,m),a(p,m))),f=n(f,1),p=m):f=n(f,s(m)?i(a(m,p),a(m,p)):m)}return i(p,o(f))}}),Dh="norm",PW=["typed","abs","add","pow","conj","sqrt","multiply","equalScalar","larger","smaller","matrix","ctranspose","eigs"],zW=L(Dh,PW,e=>{var{typed:r,abs:t,add:n,pow:a,conj:i,sqrt:o,multiply:u,equalScalar:s,larger:l,smaller:c,matrix:f,ctranspose:p,eigs:v}=e;return r(Dh,{number:Math.abs,Complex:function(D){return D.abs()},BigNumber:function(D){return D.abs()},boolean:function(D){return Math.abs(D)},Array:function(D){return b(f(D),2)},Matrix:function(D){return b(D,2)},"Array, number | BigNumber | string":function(D,S){return b(f(D),S)},"Matrix, number | BigNumber | string":function(D,S){return b(D,S)}});function m(A){var D=0;return A.forEach(function(S){var N=t(S);l(N,D)&&(D=N)},!0),D}function d(A){var D;return A.forEach(function(S){var N=t(S);(!D||c(N,D))&&(D=N)},!0),D||0}function y(A,D){if(D===Number.POSITIVE_INFINITY||D==="inf")return m(A);if(D===Number.NEGATIVE_INFINITY||D==="-inf")return d(A);if(D==="fro")return b(A,2);if(typeof D=="number"&&!isNaN(D)){if(!s(D,0)){var S=0;return A.forEach(function(N){S=n(a(t(N),D),S)},!0),a(S,1/D)}return Number.POSITIVE_INFINITY}throw new Error("Unsupported parameter value")}function h(A){var D=0;return A.forEach(function(S,N){D=n(D,u(S,i(S)))}),t(o(D))}function E(A){var D=[],S=0;return A.forEach(function(N,C){var M=C[1],B=n(D[M]||0,t(N));l(B,S)&&(S=B),D[M]=B},!0),S}function g(A){var D=A.size();if(D[0]!==D[1])throw new RangeError("Invalid matrix dimensions");var S=p(A),N=u(S,A),C=v(N).values.toArray(),M=C[C.length-1];return t(o(M))}function w(A){var D=[],S=0;return A.forEach(function(N,C){var M=C[0],B=n(D[M]||0,t(N));l(B,S)&&(S=B),D[M]=B},!0),S}function x(A,D){if(D===1)return E(A);if(D===Number.POSITIVE_INFINITY||D==="inf")return w(A);if(D==="fro")return h(A);if(D===2)return g(A);throw new Error("Unsupported parameter value "+D)}function b(A,D){var S=A.size();if(S.length===1)return y(A,D);if(S.length===2){if(S[0]&&S[1])return x(A,D);throw new RangeError("Invalid matrix dimensions")}}}),Nh="dot",IW=["typed","addScalar","multiplyScalar","conj","size"],LW=L(Nh,IW,e=>{var{typed:r,addScalar:t,multiplyScalar:n,conj:a,size:i}=e;return r(Nh,{"Array | DenseMatrix, Array | DenseMatrix":u,"SparseMatrix, SparseMatrix":s});function o(c,f){var p=l(c),v=l(f),m,d;if(p.length===1)m=p[0];else if(p.length===2&&p[1]===1)m=p[0];else throw new RangeError("Expected a column vector, instead got a matrix of size ("+p.join(", ")+")");if(v.length===1)d=v[0];else if(v.length===2&&v[1]===1)d=v[0];else throw new RangeError("Expected a column vector, instead got a matrix of size ("+v.join(", ")+")");if(m!==d)throw new RangeError("Vectors must have equal length ("+m+" != "+d+")");if(m===0)throw new RangeError("Cannot calculate the dot product of empty vectors");return m}function u(c,f){var p=o(c,f),v=ke(c)?c._data:c,m=ke(c)?c._datatype||c.getDataType():void 0,d=ke(f)?f._data:f,y=ke(f)?f._datatype||f.getDataType():void 0,h=l(c).length===2,E=l(f).length===2,g=t,w=n;if(m&&y&&m===y&&typeof m=="string"&&m!=="mixed"){var x=m;g=r.find(t,[x,x]),w=r.find(n,[x,x])}if(!h&&!E){for(var b=w(a(v[0]),d[0]),A=1;A<p;A++)b=g(b,w(a(v[A]),d[A]));return b}if(!h&&E){for(var D=w(a(v[0]),d[0][0]),S=1;S<p;S++)D=g(D,w(a(v[S]),d[S][0]));return D}if(h&&!E){for(var N=w(a(v[0][0]),d[0]),C=1;C<p;C++)N=g(N,w(a(v[C][0]),d[C]));return N}if(h&&E){for(var M=w(a(v[0][0]),d[0][0]),B=1;B<p;B++)M=g(M,w(a(v[B][0]),d[B][0]));return M}}function s(c,f){o(c,f);for(var p=c._index,v=c._values,m=f._index,d=f._values,y=0,h=t,E=n,g=0,w=0;g<p.length&&w<m.length;){var x=p[g],b=m[w];if(x<b){g++;continue}if(x>b){w++;continue}x===b&&(y=h(y,E(v[g],d[w])),g++,w++)}return y}function l(c){return ke(c)?c.size():i(c)}}),qW="trace",kW=["typed","matrix","add"],UW=L(qW,kW,e=>{var{typed:r,matrix:t,add:n}=e;return r("trace",{Array:function(u){return a(t(u))},SparseMatrix:i,DenseMatrix:a,any:Ge});function a(o){var u=o._size,s=o._data;switch(u.length){case 1:if(u[0]===1)return Ge(s[0]);throw new RangeError("Matrix must be square (size: "+er(u)+")");case 2:{var l=u[0],c=u[1];if(l===c){for(var f=0,p=0;p<l;p++)f=n(f,s[p][p]);return f}else throw new RangeError("Matrix must be square (size: "+er(u)+")")}default:throw new RangeError("Matrix must be two dimensional (size: "+er(u)+")")}}function i(o){var u=o._values,s=o._index,l=o._ptr,c=o._size,f=c[0],p=c[1];if(f===p){var v=0;if(u.length>0)for(var m=0;m<p;m++)for(var d=l[m],y=l[m+1],h=d;h<y;h++){var E=s[h];if(E===m){v=n(v,u[h]);break}if(E>m)break}return v}throw new RangeError("Matrix must be square (size: "+er(c)+")")}}),Ch="index",HW=["typed","Index"],jW=L(Ch,HW,e=>{var{typed:r,Index:t}=e;return r(Ch,{"...number | string | BigNumber | Range | Array | Matrix":function(a){var i=a.map(function(u){return Je(u)?u.toNumber():mr(u)||ke(u)?u.map(function(s){return Je(s)?s.toNumber():s}):u}),o=new t;return t.apply(o,i),o}})}),Kb=new Set(["end"]),VW="Node",GW=["mathWithTransform"],WW=L(VW,GW,e=>{var{mathWithTransform:r}=e;function t(a){for(var i of[...Kb])if(a.has(i))throw new Error('Scope contains an illegal symbol, "'+i+'" is a reserved keyword')}class n{get type(){return"Node"}get isNode(){return!0}evaluate(i){return this.compile().evaluate(i)}compile(){var i=this._compile(r,{}),o={},u=null;function s(l){var c=Wa(l);return t(c),i(c,o,u)}return{evaluate:s}}_compile(i,o){throw new Error("Method _compile must be implemented by type "+this.type)}forEach(i){throw new Error("Cannot run forEach on a Node interface")}map(i){throw new Error("Cannot run map on a Node interface")}_ifNode(i){if(!wr(i))throw new TypeError("Callback function must return a Node");return i}traverse(i){i(this,null,null);function o(u,s){u.forEach(function(l,c,f){s(l,c,f),o(l,s)})}o(this,i)}transform(i){function o(u,s,l){var c=i(u,s,l);return c!==u?c:u.map(o)}return o(this,null,null)}filter(i){var o=[];return this.traverse(function(u,s,l){i(u,s,l)&&o.push(u)}),o}clone(){throw new Error("Cannot clone a Node interface")}cloneDeep(){return this.map(function(i){return i.cloneDeep()})}equals(i){return i?this.type===i.type&&Qn(this,i):!1}toString(i){var o=this._getCustomString(i);return typeof o<"u"?o:this._toString(i)}_toString(){throw new Error("_toString not implemented for "+this.type)}toJSON(){throw new Error("Cannot serialize object: toJSON not implemented by "+this.type)}toHTML(i){var o=this._getCustomString(i);return typeof o<"u"?o:this._toHTML(i)}_toHTML(){throw new Error("_toHTML not implemented for "+this.type)}toTex(i){var o=this._getCustomString(i);return typeof o<"u"?o:this._toTex(i)}_toTex(i){throw new Error("_toTex not implemented for "+this.type)}_getCustomString(i){if(i&&typeof i=="object")switch(typeof i.handler){case"object":case"undefined":return;case"function":return i.handler(this,i);default:throw new TypeError("Object or function expected as callback")}}getIdentifier(){return this.type}getContent(){return this}}return n},{isClass:!0,isNode:!0});function ft(e){return e&&e.isIndexError?new Yt(e.index+1,e.min+1,e.max!==void 0?e.max+1:void 0):e}function Jb(e){var{subset:r}=e;return function(n,a){try{if(Array.isArray(n))return r(n,a);if(n&&typeof n.subset=="function")return n.subset(a);if(typeof n=="string")return r(n,a);if(typeof n=="object"){if(!a.isObjectProperty())throw new TypeError("Cannot apply a numeric index as object property");return it(n,a.getObjectProperty())}else throw new TypeError("Cannot apply index: unsupported type of object")}catch(i){throw ft(i)}}}var qo="AccessorNode",ZW=["subset","Node"],YW=L(qo,ZW,e=>{var{subset:r,Node:t}=e,n=Jb({subset:r});function a(o){return!(Jn(o)||Mt(o)||lr(o)||Bn(o)||du(o)||gn(o)||Vr(o))}class i extends t{constructor(u,s){if(super(),!wr(u))throw new TypeError('Node expected for parameter "object"');if(!gi(s))throw new TypeError('IndexNode expected for parameter "index"');this.object=u,this.index=s}get name(){return this.index?this.index.isObjectProperty()?this.index.getObjectProperty():"":this.object.name||""}get type(){return qo}get isAccessorNode(){return!0}_compile(u,s){var l=this.object._compile(u,s),c=this.index._compile(u,s);if(this.index.isObjectProperty()){var f=this.index.getObjectProperty();return function(v,m,d){return it(l(v,m,d),f)}}else return function(v,m,d){var y=l(v,m,d),h=c(v,m,y);return n(y,h)}}forEach(u){u(this.object,"object",this),u(this.index,"index",this)}map(u){return new i(this._ifNode(u(this.object,"object",this)),this._ifNode(u(this.index,"index",this)))}clone(){return new i(this.object,this.index)}_toString(u){var s=this.object.toString(u);return a(this.object)&&(s="("+s+")"),s+this.index.toString(u)}_toHTML(u){var s=this.object.toHTML(u);return a(this.object)&&(s='<span class="math-parenthesis math-round-parenthesis">(</span>'+s+'<span class="math-parenthesis math-round-parenthesis">)</span>'),s+this.index.toHTML(u)}_toTex(u){var s=this.object.toTex(u);return a(this.object)&&(s="\\left(' + object + '\\right)"),s+this.index.toTex(u)}toJSON(){return{mathjs:qo,object:this.object,index:this.index}}static fromJSON(u){return new i(u.object,u.index)}}return Ur(i,"name",qo),i},{isClass:!0,isNode:!0}),ko="ArrayNode",XW=["Node"],KW=L(ko,XW,e=>{var{Node:r}=e;class t extends r{constructor(a){if(super(),this.items=a||[],!Array.isArray(this.items)||!this.items.every(wr))throw new TypeError("Array containing Nodes expected")}get type(){return ko}get isArrayNode(){return!0}_compile(a,i){var o=mn(this.items,function(l){return l._compile(a,i)}),u=a.config.matrix!=="Array";if(u){var s=a.matrix;return function(c,f,p){return s(mn(o,function(v){return v(c,f,p)}))}}else return function(c,f,p){return mn(o,function(v){return v(c,f,p)})}}forEach(a){for(var i=0;i<this.items.length;i++){var o=this.items[i];a(o,"items["+i+"]",this)}}map(a){for(var i=[],o=0;o<this.items.length;o++)i[o]=this._ifNode(a(this.items[o],"items["+o+"]",this));return new t(i)}clone(){return new t(this.items.slice(0))}_toString(a){var i=this.items.map(function(o){return o.toString(a)});return"["+i.join(", ")+"]"}toJSON(){return{mathjs:ko,items:this.items}}static fromJSON(a){return new t(a.items)}_toHTML(a){var i=this.items.map(function(o){return o.toHTML(a)});return'<span class="math-parenthesis math-square-parenthesis">[</span>'+i.join('<span class="math-separator">,</span>')+'<span class="math-parenthesis math-square-parenthesis">]</span>'}_toTex(a){function i(o,u){var s=o.some(Mt)&&!o.every(Mt),l=u||s,c=l?"&":"\\\\",f=o.map(function(p){return p.items?i(p.items,!u):p.toTex(a)}).join(c);return s||!l||l&&!u?"\\begin{bmatrix}"+f+"\\end{bmatrix}":f}return i(this.items,!1)}}return Ur(t,"name",ko),t},{isClass:!0,isNode:!0});function JW(e){var{subset:r,matrix:t}=e;return function(a,i,o){try{if(Array.isArray(a)){var u=t(a).subset(i,o).valueOf();return u.forEach((s,l)=>{a[l]=s}),a}else{if(a&&typeof a.subset=="function")return a.subset(i,o);if(typeof a=="string")return r(a,i,o);if(typeof a=="object"){if(!i.isObjectProperty())throw TypeError("Cannot apply a numeric index as object property");return Qa(a,i.getObjectProperty(),o),a}else throw new TypeError("Cannot apply index: unsupported type of object")}}catch(s){throw ft(s)}}}var qt=[{AssignmentNode:{},FunctionAssignmentNode:{}},{ConditionalNode:{latexLeftParens:!1,latexRightParens:!1,latexParens:!1}},{"OperatorNode:or":{op:"or",associativity:"left",associativeWith:[]}},{"OperatorNode:xor":{op:"xor",associativity:"left",associativeWith:[]}},{"OperatorNode:and":{op:"and",associativity:"left",associativeWith:[]}},{"OperatorNode:bitOr":{op:"|",associativity:"left",associativeWith:[]}},{"OperatorNode:bitXor":{op:"^|",associativity:"left",associativeWith:[]}},{"OperatorNode:bitAnd":{op:"&",associativity:"left",associativeWith:[]}},{"OperatorNode:equal":{op:"==",associativity:"left",associativeWith:[]},"OperatorNode:unequal":{op:"!=",associativity:"left",associativeWith:[]},"OperatorNode:smaller":{op:"<",associativity:"left",associativeWith:[]},"OperatorNode:larger":{op:">",associativity:"left",associativeWith:[]},"OperatorNode:smallerEq":{op:"<=",associativity:"left",associativeWith:[]},"OperatorNode:largerEq":{op:">=",associativity:"left",associativeWith:[]},RelationalNode:{associativity:"left",associativeWith:[]}},{"OperatorNode:leftShift":{op:"<<",associativity:"left",associativeWith:[]},"OperatorNode:rightArithShift":{op:">>",associativity:"left",associativeWith:[]},"OperatorNode:rightLogShift":{op:">>>",associativity:"left",associativeWith:[]}},{"OperatorNode:to":{op:"to",associativity:"left",associativeWith:[]}},{RangeNode:{}},{"OperatorNode:add":{op:"+",associativity:"left",associativeWith:["OperatorNode:add","OperatorNode:subtract"]},"OperatorNode:subtract":{op:"-",associativity:"left",associativeWith:[]}},{"OperatorNode:multiply":{op:"*",associativity:"left",associativeWith:["OperatorNode:multiply","OperatorNode:divide","Operator:dotMultiply","Operator:dotDivide"]},"OperatorNode:divide":{op:"/",associativity:"left",associativeWith:[],latexLeftParens:!1,latexRightParens:!1,latexParens:!1},"OperatorNode:dotMultiply":{op:".*",associativity:"left",associativeWith:["OperatorNode:multiply","OperatorNode:divide","OperatorNode:dotMultiply","OperatorNode:doDivide"]},"OperatorNode:dotDivide":{op:"./",associativity:"left",associativeWith:[]},"OperatorNode:mod":{op:"mod",associativity:"left",associativeWith:[]}},{"OperatorNode:multiply":{associativity:"left",associativeWith:["OperatorNode:multiply","OperatorNode:divide","Operator:dotMultiply","Operator:dotDivide"]}},{"OperatorNode:unaryPlus":{op:"+",associativity:"right"},"OperatorNode:unaryMinus":{op:"-",associativity:"right"},"OperatorNode:bitNot":{op:"~",associativity:"right"},"OperatorNode:not":{op:"not",associativity:"right"}},{"OperatorNode:pow":{op:"^",associativity:"right",associativeWith:[],latexRightParens:!1},"OperatorNode:dotPow":{op:".^",associativity:"right",associativeWith:[]}},{"OperatorNode:factorial":{op:"!",associativity:"left"}},{"OperatorNode:ctranspose":{op:"'",associativity:"left"}}];function Uo(e,r){if(!r||r!=="auto")return e;for(var t=e;gn(t);)t=t.content;return t}function Ar(e,r,t,n){var a=e;r!=="keep"&&(a=e.getContent());for(var i=a.getIdentifier(),o=null,u=0;u<qt.length;u++)if(i in qt[u]){o=u;break}if(i==="OperatorNode:multiply"&&a.implicit&&t!=="show"){var s=Uo(a.args[0],r);!(lr(s)&&n&&n.getIdentifier()==="OperatorNode:divide"&&Vl(Uo(n.args[0],r)))&&!(s.getIdentifier()==="OperatorNode:divide"&&Vl(Uo(s.args[0],r))&&lr(Uo(s.args[1])))&&(o+=1)}return o}function qi(e,r){var t=e;r!=="keep"&&(t=e.getContent());var n=t.getIdentifier(),a=Ar(t,r);if(a===null)return null;var i=qt[a][n];if(Re(i,"associativity")){if(i.associativity==="left")return"left";if(i.associativity==="right")return"right";throw Error("'"+n+"' has the invalid associativity '"+i.associativity+"'.")}return null}function gl(e,r,t){var n=t!=="keep"?e.getContent():e,a=t!=="keep"?e.getContent():r,i=n.getIdentifier(),o=a.getIdentifier(),u=Ar(n,t);if(u===null)return null;var s=qt[u][i];if(Re(s,"associativeWith")&&s.associativeWith instanceof Array){for(var l=0;l<s.associativeWith.length;l++)if(s.associativeWith[l]===o)return!0;return!1}return null}function QW(e){var r="OperatorNode:"+e;for(var t of qt)if(r in t)return t[r].op;return null}var Ho="AssignmentNode",eZ=["subset","?matrix","Node"],rZ=L(Ho,eZ,e=>{var{subset:r,matrix:t,Node:n}=e,a=Jb({subset:r}),i=JW({subset:r,matrix:t});function o(s,l,c){l||(l="keep");var f=Ar(s,l,c),p=Ar(s.value,l,c);return l==="all"||p!==null&&p<=f}class u extends n{constructor(l,c,f){if(super(),this.object=l,this.index=f?c:null,this.value=f||c,!Vr(l)&&!Jn(l))throw new TypeError('SymbolNode or AccessorNode expected as "object"');if(Vr(l)&&l.name==="end")throw new Error('Cannot assign to symbol "end"');if(this.index&&!gi(this.index))throw new TypeError('IndexNode expected as "index"');if(!wr(this.value))throw new TypeError('Node expected as "value"')}get name(){return this.index?this.index.isObjectProperty()?this.index.getObjectProperty():"":this.object.name||""}get type(){return Ho}get isAssignmentNode(){return!0}_compile(l,c){var f=this.object._compile(l,c),p=this.index?this.index._compile(l,c):null,v=this.value._compile(l,c),m=this.object.name;if(this.index)if(this.index.isObjectProperty()){var d=this.index.getObjectProperty();return function(w,x,b){var A=f(w,x,b),D=v(w,x,b);return Qa(A,d,D),D}}else{if(Vr(this.object))return function(w,x,b){var A=f(w,x,b),D=v(w,x,b),S=p(w,x,A);return w.set(m,i(A,S,D)),D};var y=this.object.object._compile(l,c);if(this.object.index.isObjectProperty()){var h=this.object.index.getObjectProperty();return function(w,x,b){var A=y(w,x,b),D=it(A,h),S=p(w,x,D),N=v(w,x,b);return Qa(A,h,i(D,S,N)),N}}else{var E=this.object.index._compile(l,c);return function(w,x,b){var A=y(w,x,b),D=E(w,x,A),S=a(A,D),N=p(w,x,S),C=v(w,x,b);return i(A,D,i(S,N,C)),C}}}else{if(!Vr(this.object))throw new TypeError("SymbolNode expected as object");return function(w,x,b){var A=v(w,x,b);return w.set(m,A),A}}}forEach(l){l(this.object,"object",this),this.index&&l(this.index,"index",this),l(this.value,"value",this)}map(l){var c=this._ifNode(l(this.object,"object",this)),f=this.index?this._ifNode(l(this.index,"index",this)):null,p=this._ifNode(l(this.value,"value",this));return new u(c,f,p)}clone(){return new u(this.object,this.index,this.value)}_toString(l){var c=this.object.toString(l),f=this.index?this.index.toString(l):"",p=this.value.toString(l);return o(this,l&&l.parenthesis,l&&l.implicit)&&(p="("+p+")"),c+f+" = "+p}toJSON(){return{mathjs:Ho,object:this.object,index:this.index,value:this.value}}static fromJSON(l){return new u(l.object,l.index,l.value)}_toHTML(l){var c=this.object.toHTML(l),f=this.index?this.index.toHTML(l):"",p=this.value.toHTML(l);return o(this,l&&l.parenthesis,l&&l.implicit)&&(p='<span class="math-paranthesis math-round-parenthesis">(</span>'+p+'<span class="math-paranthesis math-round-parenthesis">)</span>'),c+f+'<span class="math-operator math-assignment-operator math-variable-assignment-operator math-binary-operator">=</span>'+p}_toTex(l){var c=this.object.toTex(l),f=this.index?this.index.toTex(l):"",p=this.value.toTex(l);return o(this,l&&l.parenthesis,l&&l.implicit)&&(p="\\left(".concat(p,"\\right)")),c+f+"="+p}}return Ur(u,"name",Ho),u},{isClass:!0,isNode:!0}),jo="BlockNode",tZ=["ResultSet","Node"],nZ=L(jo,tZ,e=>{var{ResultSet:r,Node:t}=e;class n extends t{constructor(i){if(super(),!Array.isArray(i))throw new Error("Array expected");this.blocks=i.map(function(o){var u=o&&o.node,s=o&&o.visible!==void 0?o.visible:!0;if(!wr(u))throw new TypeError('Property "node" must be a Node');if(typeof s!="boolean")throw new TypeError('Property "visible" must be a boolean');return{node:u,visible:s}})}get type(){return jo}get isBlockNode(){return!0}_compile(i,o){var u=mn(this.blocks,function(s){return{evaluate:s.node._compile(i,o),visible:s.visible}});return function(l,c,f){var p=[];return hu(u,function(m){var d=m.evaluate(l,c,f);m.visible&&p.push(d)}),new r(p)}}forEach(i){for(var o=0;o<this.blocks.length;o++)i(this.blocks[o].node,"blocks["+o+"].node",this)}map(i){for(var o=[],u=0;u<this.blocks.length;u++){var s=this.blocks[u],l=this._ifNode(i(s.node,"blocks["+u+"].node",this));o[u]={node:l,visible:s.visible}}return new n(o)}clone(){var i=this.blocks.map(function(o){return{node:o.node,visible:o.visible}});return new n(i)}_toString(i){return this.blocks.map(function(o){return o.node.toString(i)+(o.visible?"":";")}).join(`
|
|
98
|
+
`)}toJSON(){return{mathjs:jo,blocks:this.blocks}}static fromJSON(i){return new n(i.blocks)}_toHTML(i){return this.blocks.map(function(o){return o.node.toHTML(i)+(o.visible?"":'<span class="math-separator">;</span>')}).join('<span class="math-separator"><br /></span>')}_toTex(i){return this.blocks.map(function(o){return o.node.toTex(i)+(o.visible?"":";")}).join(`\\;\\;
|
|
99
|
+
`)}}return Ur(n,"name",jo),n},{isClass:!0,isNode:!0}),Vo="ConditionalNode",aZ=["Node"],iZ=L(Vo,aZ,e=>{var{Node:r}=e;function t(a){if(typeof a=="number"||typeof a=="boolean"||typeof a=="string")return!!a;if(a){if(Je(a))return!a.isZero();if(dn(a))return!!(a.re||a.im);if(Tt(a))return!!a.value}if(a==null)return!1;throw new TypeError('Unsupported type of condition "'+Dr(a)+'"')}class n extends r{constructor(i,o,u){if(super(),!wr(i))throw new TypeError("Parameter condition must be a Node");if(!wr(o))throw new TypeError("Parameter trueExpr must be a Node");if(!wr(u))throw new TypeError("Parameter falseExpr must be a Node");this.condition=i,this.trueExpr=o,this.falseExpr=u}get type(){return Vo}get isConditionalNode(){return!0}_compile(i,o){var u=this.condition._compile(i,o),s=this.trueExpr._compile(i,o),l=this.falseExpr._compile(i,o);return function(f,p,v){return t(u(f,p,v))?s(f,p,v):l(f,p,v)}}forEach(i){i(this.condition,"condition",this),i(this.trueExpr,"trueExpr",this),i(this.falseExpr,"falseExpr",this)}map(i){return new n(this._ifNode(i(this.condition,"condition",this)),this._ifNode(i(this.trueExpr,"trueExpr",this)),this._ifNode(i(this.falseExpr,"falseExpr",this)))}clone(){return new n(this.condition,this.trueExpr,this.falseExpr)}_toString(i){var o=i&&i.parenthesis?i.parenthesis:"keep",u=Ar(this,o,i&&i.implicit),s=this.condition.toString(i),l=Ar(this.condition,o,i&&i.implicit);(o==="all"||this.condition.type==="OperatorNode"||l!==null&&l<=u)&&(s="("+s+")");var c=this.trueExpr.toString(i),f=Ar(this.trueExpr,o,i&&i.implicit);(o==="all"||this.trueExpr.type==="OperatorNode"||f!==null&&f<=u)&&(c="("+c+")");var p=this.falseExpr.toString(i),v=Ar(this.falseExpr,o,i&&i.implicit);return(o==="all"||this.falseExpr.type==="OperatorNode"||v!==null&&v<=u)&&(p="("+p+")"),s+" ? "+c+" : "+p}toJSON(){return{mathjs:Vo,condition:this.condition,trueExpr:this.trueExpr,falseExpr:this.falseExpr}}static fromJSON(i){return new n(i.condition,i.trueExpr,i.falseExpr)}_toHTML(i){var o=i&&i.parenthesis?i.parenthesis:"keep",u=Ar(this,o,i&&i.implicit),s=this.condition.toHTML(i),l=Ar(this.condition,o,i&&i.implicit);(o==="all"||this.condition.type==="OperatorNode"||l!==null&&l<=u)&&(s='<span class="math-parenthesis math-round-parenthesis">(</span>'+s+'<span class="math-parenthesis math-round-parenthesis">)</span>');var c=this.trueExpr.toHTML(i),f=Ar(this.trueExpr,o,i&&i.implicit);(o==="all"||this.trueExpr.type==="OperatorNode"||f!==null&&f<=u)&&(c='<span class="math-parenthesis math-round-parenthesis">(</span>'+c+'<span class="math-parenthesis math-round-parenthesis">)</span>');var p=this.falseExpr.toHTML(i),v=Ar(this.falseExpr,o,i&&i.implicit);return(o==="all"||this.falseExpr.type==="OperatorNode"||v!==null&&v<=u)&&(p='<span class="math-parenthesis math-round-parenthesis">(</span>'+p+'<span class="math-parenthesis math-round-parenthesis">)</span>'),s+'<span class="math-operator math-conditional-operator">?</span>'+c+'<span class="math-operator math-conditional-operator">:</span>'+p}_toTex(i){return"\\begin{cases} {"+this.trueExpr.toTex(i)+"}, &\\quad{\\text{if }\\;"+this.condition.toTex(i)+"}\\\\{"+this.falseExpr.toTex(i)+"}, &\\quad{\\text{otherwise}}\\end{cases}"}}return Ur(n,"name",Vo),n},{isClass:!0,isNode:!0}),nc=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},oZ={"{":"\\{","}":"\\}","\\":"\\textbackslash{}","#":"\\#",$:"\\$","%":"\\%","&":"\\&","^":"\\textasciicircum{}",_:"\\_","~":"\\textasciitilde{}"},sZ={"–":"\\--","—":"\\---"," ":"~"," ":"\\qquad{}","\r\n":"\\newline{}","\n":"\\newline{}"},uZ=function(r,t){return nc({},r,t)},lZ=function(e){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=r.preserveFormatting,n=t===void 0?!1:t,a=r.escapeMapFn,i=a===void 0?uZ:a,o=String(e),u="",s=i(nc({},oZ),n?nc({},sZ):{}),l=Object.keys(s),c=function(){var p=!1;l.forEach(function(v,m){p||o.length>=v.length&&o.slice(0,v.length)===v&&(u+=s[l[m]],o=o.slice(v.length,o.length),p=!0)}),p||(u+=o.slice(0,1),o=o.slice(1,o.length))};o;)c();return u};const cZ=ye.getDefaultExportFromCjs(lZ);var ac={Alpha:"A",alpha:"\\alpha",Beta:"B",beta:"\\beta",Gamma:"\\Gamma",gamma:"\\gamma",Delta:"\\Delta",delta:"\\delta",Epsilon:"E",epsilon:"\\epsilon",varepsilon:"\\varepsilon",Zeta:"Z",zeta:"\\zeta",Eta:"H",eta:"\\eta",Theta:"\\Theta",theta:"\\theta",vartheta:"\\vartheta",Iota:"I",iota:"\\iota",Kappa:"K",kappa:"\\kappa",varkappa:"\\varkappa",Lambda:"\\Lambda",lambda:"\\lambda",Mu:"M",mu:"\\mu",Nu:"N",nu:"\\nu",Xi:"\\Xi",xi:"\\xi",Omicron:"O",omicron:"o",Pi:"\\Pi",pi:"\\pi",varpi:"\\varpi",Rho:"P",rho:"\\rho",varrho:"\\varrho",Sigma:"\\Sigma",sigma:"\\sigma",varsigma:"\\varsigma",Tau:"T",tau:"\\tau",Upsilon:"\\Upsilon",upsilon:"\\upsilon",Phi:"\\Phi",phi:"\\phi",varphi:"\\varphi",Chi:"X",chi:"\\chi",Psi:"\\Psi",psi:"\\psi",Omega:"\\Omega",omega:"\\omega",true:"\\mathrm{True}",false:"\\mathrm{False}",i:"i",inf:"\\infty",Inf:"\\infty",infinity:"\\infty",Infinity:"\\infty",oo:"\\infty",lim:"\\lim",undefined:"\\mathbf{?}"},pr={transpose:"^\\top",ctranspose:"^H",factorial:"!",pow:"^",dotPow:".^\\wedge",unaryPlus:"+",unaryMinus:"-",bitNot:"\\~",not:"\\neg",multiply:"\\cdot",divide:"\\frac",dotMultiply:".\\cdot",dotDivide:".:",mod:"\\mod",add:"+",subtract:"-",to:"\\rightarrow",leftShift:"<<",rightArithShift:">>",rightLogShift:">>>",equal:"=",unequal:"\\neq",smaller:"<",larger:">",smallerEq:"\\leq",largerEq:"\\geq",bitAnd:"\\&",bitXor:"\\underline{|}",bitOr:"|",and:"\\wedge",xor:"\\veebar",or:"\\vee"},Mh={abs:{1:"\\left|${args[0]}\\right|"},add:{2:"\\left(${args[0]}".concat(pr.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(pr.dotDivide,"${args[1]}\\right)")},dotMultiply:{2:"\\left(${args[0]}".concat(pr.dotMultiply,"${args[1]}\\right)")},dotPow:{2:"\\left(${args[0]}".concat(pr.dotPow,"${args[1]}\\right)")},exp:{1:"\\exp\\left(${args[0]}\\right)"},expm1:"\\left(e".concat(pr.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(pr.mod,"${args[1]}\\right)")},multiply:{2:"\\left(${args[0]}".concat(pr.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(pr.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(pr.subtract,"${args[1]}\\right)")},unaryMinus:{1:"".concat(pr.unaryMinus,"\\left(${args[0]}\\right)")},unaryPlus:{1:"".concat(pr.unaryPlus,"\\left(${args[0]}\\right)")},bitAnd:{2:"\\left(${args[0]}".concat(pr.bitAnd,"${args[1]}\\right)")},bitNot:{1:pr.bitNot+"\\left(${args[0]}\\right)"},bitOr:{2:"\\left(${args[0]}".concat(pr.bitOr,"${args[1]}\\right)")},bitXor:{2:"\\left(${args[0]}".concat(pr.bitXor,"${args[1]}\\right)")},leftShift:{2:"\\left(${args[0]}".concat(pr.leftShift,"${args[1]}\\right)")},rightArithShift:{2:"\\left(${args[0]}".concat(pr.rightArithShift,"${args[1]}\\right)")},rightLogShift:{2:"\\left(${args[0]}".concat(pr.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(pr.and,"${args[1]}\\right)")},not:{1:pr.not+"\\left(${args[0]}\\right)"},or:{2:"\\left(${args[0]}".concat(pr.or,"${args[1]}\\right)")},xor:{2:"\\left(${args[0]}".concat(pr.xor,"${args[1]}\\right)")},cross:{2:"\\left(${args[0]}\\right)\\times\\left(${args[1]}\\right)"},ctranspose:{1:"\\left(${args[0]}\\right)".concat(pr.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(pr.pow,"{\\frac{1}{2}}")},trace:{1:"\\mathrm{tr}\\left(${args[0]}\\right)"},transpose:{1:"\\left(${args[0]}\\right)".concat(pr.transpose)},combinations:{2:"\\binom{${args[0]}}{${args[1]}}"},combinationsWithRep:{2:"\\left(\\!\\!{\\binom{${args[0]}}{${args[1]}}}\\!\\!\\right)"},factorial:{1:"\\left(${args[0]}\\right)".concat(pr.factorial)},gamma:{1:"\\Gamma\\left(${args[0]}\\right)"},lgamma:{1:"\\ln\\Gamma\\left(${args[0]}\\right)"},equal:{2:"\\left(${args[0]}".concat(pr.equal,"${args[1]}\\right)")},larger:{2:"\\left(${args[0]}".concat(pr.larger,"${args[1]}\\right)")},largerEq:{2:"\\left(${args[0]}".concat(pr.largerEq,"${args[1]}\\right)")},smaller:{2:"\\left(${args[0]}".concat(pr.smaller,"${args[1]}\\right)")},smallerEq:{2:"\\left(${args[0]}".concat(pr.smallerEq,"${args[1]}\\right)")},unequal:{2:"\\left(${args[0]}".concat(pr.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(pr.to,"${args[1]}\\right)")},numeric:function(r,t){return r.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(ac.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)"}},fZ="\\mathrm{${name}}\\left(${args}\\right)",Th={deg:"^\\circ"};function ic(e){return cZ(e,{preserveFormatting:!0})}function Qb(e,r){return r=typeof r>"u"?!1:r,r?Re(Th,e)?Th[e]:"\\mathrm{"+ic(e)+"}":Re(ac,e)?ac[e]:ic(e)}var Go="ConstantNode",pZ=["Node"],vZ=L(Go,pZ,e=>{var{Node:r}=e;class t extends r{constructor(a){super(),this.value=a}get type(){return Go}get isConstantNode(){return!0}_compile(a,i){var o=this.value;return function(){return o}}forEach(a){}map(a){return this.clone()}clone(){return new t(this.value)}_toString(a){return er(this.value,a)}_toHTML(a){var i=this._toString(a);switch(Dr(this.value)){case"number":case"BigNumber":case"Fraction":return'<span class="math-number">'+i+"</span>";case"string":return'<span class="math-string">'+i+"</span>";case"boolean":return'<span class="math-boolean">'+i+"</span>";case"null":return'<span class="math-null-symbol">'+i+"</span>";case"undefined":return'<span class="math-undefined">'+i+"</span>";default:return'<span class="math-symbol">'+i+"</span>"}}toJSON(){return{mathjs:Go,value:this.value}}static fromJSON(a){return new t(a.value)}_toTex(a){var i=this._toString(a),o=Dr(this.value);switch(o){case"string":return"\\mathtt{"+ic(i)+"}";case"number":case"BigNumber":{var u=o==="BigNumber"?this.value.isFinite():isFinite(this.value);if(!u)return this.value.valueOf()<0?"-\\infty":"\\infty";var s=i.toLowerCase().indexOf("e");return s!==-1?i.substring(0,s)+"\\cdot10^{"+i.substring(s+1)+"}":i}case"Fraction":return this.value.toLatex();default:return i}}}return Ur(t,"name",Go),t},{isClass:!0,isNode:!0}),Wo="FunctionAssignmentNode",dZ=["typed","Node"],mZ=L(Wo,dZ,e=>{var{typed:r,Node:t}=e;function n(i,o,u){var s=Ar(i,o,u),l=Ar(i.expr,o,u);return o==="all"||l!==null&&l<=s}class a extends t{constructor(o,u,s){if(super(),typeof o!="string")throw new TypeError('String expected for parameter "name"');if(!Array.isArray(u))throw new TypeError('Array containing strings or objects expected for parameter "params"');if(!wr(s))throw new TypeError('Node expected for parameter "expr"');if(Kb.has(o))throw new Error('Illegal function name, "'+o+'" is a reserved keyword');var l=new Set;for(var c of u){var f=typeof c=="string"?c:c.name;if(l.has(f))throw new Error('Duplicate parameter name "'.concat(f,'"'));l.add(f)}this.name=o,this.params=u.map(function(p){return p&&p.name||p}),this.types=u.map(function(p){return p&&p.type||"any"}),this.expr=s}get type(){return Wo}get isFunctionAssignmentNode(){return!0}_compile(o,u){var s=Object.create(u);hu(this.params,function(m){s[m]=!0});var l=this.expr._compile(o,s),c=this.name,f=this.params,p=Nd(this.types,","),v=c+"("+Nd(this.params,", ")+")";return function(d,y,h){var E={};E[p]=function(){for(var w=Object.create(y),x=0;x<f.length;x++)w[f[x]]=arguments[x];return l(d,w,h)};var g=r(c,E);return g.syntax=v,d.set(c,g),g}}forEach(o){o(this.expr,"expr",this)}map(o){var u=this._ifNode(o(this.expr,"expr",this));return new a(this.name,this.params.slice(0),u)}clone(){return new a(this.name,this.params.slice(0),this.expr)}_toString(o){var u=o&&o.parenthesis?o.parenthesis:"keep",s=this.expr.toString(o);return n(this,u,o&&o.implicit)&&(s="("+s+")"),this.name+"("+this.params.join(", ")+") = "+s}toJSON(){var o=this.types;return{mathjs:Wo,name:this.name,params:this.params.map(function(u,s){return{name:u,type:o[s]}}),expr:this.expr}}static fromJSON(o){return new a(o.name,o.params,o.expr)}_toHTML(o){for(var u=o&&o.parenthesis?o.parenthesis:"keep",s=[],l=0;l<this.params.length;l++)s.push('<span class="math-symbol math-parameter">'+_t(this.params[l])+"</span>");var c=this.expr.toHTML(o);return n(this,u,o&&o.implicit)&&(c='<span class="math-parenthesis math-round-parenthesis">(</span>'+c+'<span class="math-parenthesis math-round-parenthesis">)</span>'),'<span class="math-function">'+_t(this.name)+'</span><span class="math-parenthesis math-round-parenthesis">(</span>'+s.join('<span class="math-separator">,</span>')+'<span class="math-parenthesis math-round-parenthesis">)</span><span class="math-operator math-assignment-operator math-variable-assignment-operator math-binary-operator">=</span>'+c}_toTex(o){var u=o&&o.parenthesis?o.parenthesis:"keep",s=this.expr.toTex(o);return n(this,u,o&&o.implicit)&&(s="\\left(".concat(s,"\\right)")),"\\mathrm{"+this.name+"}\\left("+this.params.map(Qb).join(",")+"\\right)="+s}}return Ur(a,"name",Wo),a},{isClass:!0,isNode:!0}),Zo="IndexNode",hZ=["Node","size"],gZ=L(Zo,hZ,e=>{var{Node:r,size:t}=e;class n extends r{constructor(i,o){if(super(),this.dimensions=i,this.dotNotation=o||!1,!Array.isArray(i)||!i.every(wr))throw new TypeError('Array containing Nodes expected for parameter "dimensions"');if(this.dotNotation&&!this.isObjectProperty())throw new Error("dotNotation only applicable for object properties")}get type(){return Zo}get isIndexNode(){return!0}_compile(i,o){var u=mn(this.dimensions,function(l,c){var f=l.filter(m=>m.isSymbolNode&&m.name==="end").length>0;if(f){var p=Object.create(o);p.end=!0;var v=l._compile(i,p);return function(d,y,h){if(!ke(h)&&!mr(h)&&!et(h))throw new TypeError('Cannot resolve "end": context must be a Matrix, Array, or string but is '+Dr(h));var E=t(h).valueOf(),g=Object.create(y);return g.end=E[c],v(d,g,h)}}else return l._compile(i,o)}),s=it(i,"index");return function(c,f,p){var v=mn(u,function(m){return m(c,f,p)});return s(...v)}}forEach(i){for(var o=0;o<this.dimensions.length;o++)i(this.dimensions[o],"dimensions["+o+"]",this)}map(i){for(var o=[],u=0;u<this.dimensions.length;u++)o[u]=this._ifNode(i(this.dimensions[u],"dimensions["+u+"]",this));return new n(o,this.dotNotation)}clone(){return new n(this.dimensions.slice(0),this.dotNotation)}isObjectProperty(){return this.dimensions.length===1&&lr(this.dimensions[0])&&typeof this.dimensions[0].value=="string"}getObjectProperty(){return this.isObjectProperty()?this.dimensions[0].value:null}_toString(i){return this.dotNotation?"."+this.getObjectProperty():"["+this.dimensions.join(", ")+"]"}toJSON(){return{mathjs:Zo,dimensions:this.dimensions,dotNotation:this.dotNotation}}static fromJSON(i){return new n(i.dimensions,i.dotNotation)}_toHTML(i){for(var o=[],u=0;u<this.dimensions.length;u++)o[u]=this.dimensions[u].toHTML();return this.dotNotation?'<span class="math-operator math-accessor-operator">.</span><span class="math-symbol math-property">'+_t(this.getObjectProperty())+"</span>":'<span class="math-parenthesis math-square-parenthesis">[</span>'+o.join('<span class="math-separator">,</span>')+'<span class="math-parenthesis math-square-parenthesis">]</span>'}_toTex(i){var o=this.dimensions.map(function(u){return u.toTex(i)});return this.dotNotation?"."+this.getObjectProperty():"_{"+o.join(",")+"}"}}return Ur(n,"name",Zo),n},{isClass:!0,isNode:!0}),Yo="ObjectNode",yZ=["Node"],bZ=L(Yo,yZ,e=>{var{Node:r}=e;class t extends r{constructor(a){if(super(),this.properties=a||{},a&&(typeof a!="object"||!Object.keys(a).every(function(i){return wr(a[i])})))throw new TypeError("Object containing Nodes expected")}get type(){return Yo}get isObjectNode(){return!0}_compile(a,i){var o={};for(var u in this.properties)if(Re(this.properties,u)){var s=ja(u),l=JSON.parse(s),c=it(this.properties,u);o[l]=c._compile(a,i)}return function(p,v,m){var d={};for(var y in o)Re(o,y)&&(d[y]=o[y](p,v,m));return d}}forEach(a){for(var i in this.properties)Re(this.properties,i)&&a(this.properties[i],"properties["+ja(i)+"]",this)}map(a){var i={};for(var o in this.properties)Re(this.properties,o)&&(i[o]=this._ifNode(a(this.properties[o],"properties["+ja(o)+"]",this)));return new t(i)}clone(){var a={};for(var i in this.properties)Re(this.properties,i)&&(a[i]=this.properties[i]);return new t(a)}_toString(a){var i=[];for(var o in this.properties)Re(this.properties,o)&&i.push(ja(o)+": "+this.properties[o].toString(a));return"{"+i.join(", ")+"}"}toJSON(){return{mathjs:Yo,properties:this.properties}}static fromJSON(a){return new t(a.properties)}_toHTML(a){var i=[];for(var o in this.properties)Re(this.properties,o)&&i.push('<span class="math-symbol math-property">'+_t(o)+'</span><span class="math-operator math-assignment-operator math-property-assignment-operator math-binary-operator">:</span>'+this.properties[o].toHTML(a));return'<span class="math-parenthesis math-curly-parenthesis">{</span>'+i.join('<span class="math-separator">,</span>')+'<span class="math-parenthesis math-curly-parenthesis">}</span>'}_toTex(a){var i=[];for(var o in this.properties)Re(this.properties,o)&&i.push("\\mathbf{"+o+":} & "+this.properties[o].toTex(a)+"\\\\");var u="\\left\\{\\begin{array}{ll}"+i.join(`
|
|
100
|
+
`)+"\\end{array}\\right\\}";return u}}return Ur(t,"name",Yo),t},{isClass:!0,isNode:!0});function Vi(e,r){return new y2(e,new gu(r),new Set(Object.keys(r)))}var Xo="OperatorNode",xZ=["Node"],wZ=L(Xo,xZ,e=>{var{Node:r}=e;function t(i,o){var u=i;if(o==="auto")for(;gn(u);)u=u.content;return lr(u)?!0:Lr(u)?t(u.args[0],o):!1}function n(i,o,u,s,l){var c=Ar(i,o,u),f=qi(i,o);if(o==="all"||s.length>2&&i.getIdentifier()!=="OperatorNode:add"&&i.getIdentifier()!=="OperatorNode:multiply")return s.map(function(N){switch(N.getContent().type){case"ArrayNode":case"ConstantNode":case"SymbolNode":case"ParenthesisNode":return!1;default:return!0}});var p;switch(s.length){case 0:p=[];break;case 1:{var v=Ar(s[0],o,u,i);if(l&&v!==null){var m,d;if(o==="keep"?(m=s[0].getIdentifier(),d=i.getIdentifier()):(m=s[0].getContent().getIdentifier(),d=i.getContent().getIdentifier()),qt[c][d].latexLeftParens===!1){p=[!1];break}if(qt[v][m].latexParens===!1){p=[!1];break}}if(v===null){p=[!1];break}if(v<=c){p=[!0];break}p=[!1]}break;case 2:{var y,h=Ar(s[0],o,u,i),E=gl(i,s[0],o);h===null?y=!1:h===c&&f==="right"&&!E||h<c?y=!0:y=!1;var g,w=Ar(s[1],o,u,i),x=gl(i,s[1],o);if(w===null?g=!1:w===c&&f==="left"&&!x||w<c?g=!0:g=!1,l){var b,A,D;o==="keep"?(b=i.getIdentifier(),A=i.args[0].getIdentifier(),D=i.args[1].getIdentifier()):(b=i.getContent().getIdentifier(),A=i.args[0].getContent().getIdentifier(),D=i.args[1].getContent().getIdentifier()),h!==null&&(qt[c][b].latexLeftParens===!1&&(y=!1),qt[h][A].latexParens===!1&&(y=!1)),w!==null&&(qt[c][b].latexRightParens===!1&&(g=!1),qt[w][D].latexParens===!1&&(g=!1))}p=[y,g]}break;default:(i.getIdentifier()==="OperatorNode:add"||i.getIdentifier()==="OperatorNode:multiply")&&(p=s.map(function(N){var C=Ar(N,o,u,i),M=gl(i,N,o),B=qi(N,o);return C===null?!1:c===C&&f===B&&!M?!0:C<c}));break}if(s.length>=2&&i.getIdentifier()==="OperatorNode:multiply"&&i.implicit&&o!=="all"&&u==="hide")for(var S=1;S<p.length;++S)t(s[S],o)&&!p[S-1]&&(o!=="keep"||!gn(s[S-1]))&&(p[S]=!0);return p}class a extends r{constructor(o,u,s,l,c){if(super(),typeof o!="string")throw new TypeError('string expected for parameter "op"');if(typeof u!="string")throw new TypeError('string expected for parameter "fn"');if(!Array.isArray(s)||!s.every(wr))throw new TypeError('Array containing Nodes expected for parameter "args"');this.implicit=l===!0,this.isPercentage=c===!0,this.op=o,this.fn=u,this.args=s||[]}get type(){return Xo}get isOperatorNode(){return!0}_compile(o,u){if(typeof this.fn!="string"||!xf(o,this.fn))throw o[this.fn]?new Error('No access to function "'+this.fn+'"'):new Error("Function "+this.fn+' missing in provided namespace "math"');var s=it(o,this.fn),l=mn(this.args,function(m){return m._compile(o,u)});if(typeof s=="function"&&s.rawArgs===!0){var c=this.args;return function(d,y,h){return s(c,o,Vi(d,y))}}else if(l.length===1){var f=l[0];return function(d,y,h){return s(f(d,y,h))}}else if(l.length===2){var p=l[0],v=l[1];return function(d,y,h){return s(p(d,y,h),v(d,y,h))}}else return function(d,y,h){return s.apply(null,mn(l,function(E){return E(d,y,h)}))}}forEach(o){for(var u=0;u<this.args.length;u++)o(this.args[u],"args["+u+"]",this)}map(o){for(var u=[],s=0;s<this.args.length;s++)u[s]=this._ifNode(o(this.args[s],"args["+s+"]",this));return new a(this.op,this.fn,u,this.implicit,this.isPercentage)}clone(){return new a(this.op,this.fn,this.args.slice(0),this.implicit,this.isPercentage)}isUnary(){return this.args.length===1}isBinary(){return this.args.length===2}_toString(o){var u=o&&o.parenthesis?o.parenthesis:"keep",s=o&&o.implicit?o.implicit:"hide",l=this.args,c=n(this,u,s,l,!1);if(l.length===1){var f=qi(this,u),p=l[0].toString(o);c[0]&&(p="("+p+")");var v=/[a-zA-Z]+/.test(this.op);return f==="right"?this.op+(v?" ":"")+p:f==="left"?p+(v?" ":"")+this.op:p+this.op}else if(l.length===2){var m=l[0].toString(o),d=l[1].toString(o);return c[0]&&(m="("+m+")"),c[1]&&(d="("+d+")"),this.implicit&&this.getIdentifier()==="OperatorNode:multiply"&&s==="hide"?m+" "+d:m+" "+this.op+" "+d}else if(l.length>2&&(this.getIdentifier()==="OperatorNode:add"||this.getIdentifier()==="OperatorNode:multiply")){var y=l.map(function(h,E){return h=h.toString(o),c[E]&&(h="("+h+")"),h});return this.implicit&&this.getIdentifier()==="OperatorNode:multiply"&&s==="hide"?y.join(" "):y.join(" "+this.op+" ")}else return this.fn+"("+this.args.join(", ")+")"}toJSON(){return{mathjs:Xo,op:this.op,fn:this.fn,args:this.args,implicit:this.implicit,isPercentage:this.isPercentage}}static fromJSON(o){return new a(o.op,o.fn,o.args,o.implicit,o.isPercentage)}_toHTML(o){var u=o&&o.parenthesis?o.parenthesis:"keep",s=o&&o.implicit?o.implicit:"hide",l=this.args,c=n(this,u,s,l,!1);if(l.length===1){var f=qi(this,u),p=l[0].toHTML(o);return c[0]&&(p='<span class="math-parenthesis math-round-parenthesis">(</span>'+p+'<span class="math-parenthesis math-round-parenthesis">)</span>'),f==="right"?'<span class="math-operator math-unary-operator math-lefthand-unary-operator">'+_t(this.op)+"</span>"+p:p+'<span class="math-operator math-unary-operator math-righthand-unary-operator">'+_t(this.op)+"</span>"}else if(l.length===2){var v=l[0].toHTML(o),m=l[1].toHTML(o);return c[0]&&(v='<span class="math-parenthesis math-round-parenthesis">(</span>'+v+'<span class="math-parenthesis math-round-parenthesis">)</span>'),c[1]&&(m='<span class="math-parenthesis math-round-parenthesis">(</span>'+m+'<span class="math-parenthesis math-round-parenthesis">)</span>'),this.implicit&&this.getIdentifier()==="OperatorNode:multiply"&&s==="hide"?v+'<span class="math-operator math-binary-operator math-implicit-binary-operator"></span>'+m:v+'<span class="math-operator math-binary-operator math-explicit-binary-operator">'+_t(this.op)+"</span>"+m}else{var d=l.map(function(y,h){return y=y.toHTML(o),c[h]&&(y='<span class="math-parenthesis math-round-parenthesis">(</span>'+y+'<span class="math-parenthesis math-round-parenthesis">)</span>'),y});return l.length>2&&(this.getIdentifier()==="OperatorNode:add"||this.getIdentifier()==="OperatorNode:multiply")?this.implicit&&this.getIdentifier()==="OperatorNode:multiply"&&s==="hide"?d.join('<span class="math-operator math-binary-operator math-implicit-binary-operator"></span>'):d.join('<span class="math-operator math-binary-operator math-explicit-binary-operator">'+_t(this.op)+"</span>"):'<span class="math-function">'+_t(this.fn)+'</span><span class="math-paranthesis math-round-parenthesis">(</span>'+d.join('<span class="math-separator">,</span>')+'<span class="math-paranthesis math-round-parenthesis">)</span>'}}_toTex(o){var u=o&&o.parenthesis?o.parenthesis:"keep",s=o&&o.implicit?o.implicit:"hide",l=this.args,c=n(this,u,s,l,!0),f=pr[this.fn];if(f=typeof f>"u"?this.op:f,l.length===1){var p=qi(this,u),v=l[0].toTex(o);return c[0]&&(v="\\left(".concat(v,"\\right)")),p==="right"?f+v:v+f}else if(l.length===2){var m=l[0],d=m.toTex(o);c[0]&&(d="\\left(".concat(d,"\\right)"));var y=l[1],h=y.toTex(o);c[1]&&(h="\\left(".concat(h,"\\right)"));var E;switch(u==="keep"?E=m.getIdentifier():E=m.getContent().getIdentifier(),this.getIdentifier()){case"OperatorNode:divide":return f+"{"+d+"}{"+h+"}";case"OperatorNode:pow":switch(d="{"+d+"}",h="{"+h+"}",E){case"ConditionalNode":case"OperatorNode:divide":d="\\left(".concat(d,"\\right)")}break;case"OperatorNode:multiply":if(this.implicit&&s==="hide")return d+"~"+h}return d+f+h}else if(l.length>2&&(this.getIdentifier()==="OperatorNode:add"||this.getIdentifier()==="OperatorNode:multiply")){var g=l.map(function(w,x){return w=w.toTex(o),c[x]&&(w="\\left(".concat(w,"\\right)")),w});return this.getIdentifier()==="OperatorNode:multiply"&&this.implicit&&s==="hide"?g.join("~"):g.join(f)}else return"\\mathrm{"+this.fn+"}\\left("+l.map(function(w){return w.toTex(o)}).join(",")+"\\right)"}getIdentifier(){return this.type+":"+this.fn}}return Ur(a,"name",Xo),a},{isClass:!0,isNode:!0}),Ko="ParenthesisNode",EZ=["Node"],SZ=L(Ko,EZ,e=>{var{Node:r}=e;class t extends r{constructor(a){if(super(),!wr(a))throw new TypeError('Node expected for parameter "content"');this.content=a}get type(){return Ko}get isParenthesisNode(){return!0}_compile(a,i){return this.content._compile(a,i)}getContent(){return this.content.getContent()}forEach(a){a(this.content,"content",this)}map(a){var i=a(this.content,"content",this);return new t(i)}clone(){return new t(this.content)}_toString(a){return!a||a&&!a.parenthesis||a&&a.parenthesis==="keep"?"("+this.content.toString(a)+")":this.content.toString(a)}toJSON(){return{mathjs:Ko,content:this.content}}static fromJSON(a){return new t(a.content)}_toHTML(a){return!a||a&&!a.parenthesis||a&&a.parenthesis==="keep"?'<span class="math-parenthesis math-round-parenthesis">(</span>'+this.content.toHTML(a)+'<span class="math-parenthesis math-round-parenthesis">)</span>':this.content.toHTML(a)}_toTex(a){return!a||a&&!a.parenthesis||a&&a.parenthesis==="keep"?"\\left(".concat(this.content.toTex(a),"\\right)"):this.content.toTex(a)}}return Ur(t,"name",Ko),t},{isClass:!0,isNode:!0}),Jo="RangeNode",AZ=["Node"],DZ=L(Jo,AZ,e=>{var{Node:r}=e;function t(a,i,o){var u=Ar(a,i,o),s={},l=Ar(a.start,i,o);if(s.start=l!==null&&l<=u||i==="all",a.step){var c=Ar(a.step,i,o);s.step=c!==null&&c<=u||i==="all"}var f=Ar(a.end,i,o);return s.end=f!==null&&f<=u||i==="all",s}class n extends r{constructor(i,o,u){if(super(),!wr(i))throw new TypeError("Node expected");if(!wr(o))throw new TypeError("Node expected");if(u&&!wr(u))throw new TypeError("Node expected");if(arguments.length>3)throw new Error("Too many arguments");this.start=i,this.end=o,this.step=u||null}get type(){return Jo}get isRangeNode(){return!0}needsEnd(){var i=this.filter(function(o){return Vr(o)&&o.name==="end"});return i.length>0}_compile(i,o){var u=i.range,s=this.start._compile(i,o),l=this.end._compile(i,o);if(this.step){var c=this.step._compile(i,o);return function(p,v,m){return u(s(p,v,m),l(p,v,m),c(p,v,m))}}else return function(p,v,m){return u(s(p,v,m),l(p,v,m))}}forEach(i){i(this.start,"start",this),i(this.end,"end",this),this.step&&i(this.step,"step",this)}map(i){return new n(this._ifNode(i(this.start,"start",this)),this._ifNode(i(this.end,"end",this)),this.step&&this._ifNode(i(this.step,"step",this)))}clone(){return new n(this.start,this.end,this.step&&this.step)}_toString(i){var o=i&&i.parenthesis?i.parenthesis:"keep",u=t(this,o,i&&i.implicit),s,l=this.start.toString(i);if(u.start&&(l="("+l+")"),s=l,this.step){var c=this.step.toString(i);u.step&&(c="("+c+")"),s+=":"+c}var f=this.end.toString(i);return u.end&&(f="("+f+")"),s+=":"+f,s}toJSON(){return{mathjs:Jo,start:this.start,end:this.end,step:this.step}}static fromJSON(i){return new n(i.start,i.end,i.step)}_toHTML(i){var o=i&&i.parenthesis?i.parenthesis:"keep",u=t(this,o,i&&i.implicit),s,l=this.start.toHTML(i);if(u.start&&(l='<span class="math-parenthesis math-round-parenthesis">(</span>'+l+'<span class="math-parenthesis math-round-parenthesis">)</span>'),s=l,this.step){var c=this.step.toHTML(i);u.step&&(c='<span class="math-parenthesis math-round-parenthesis">(</span>'+c+'<span class="math-parenthesis math-round-parenthesis">)</span>'),s+='<span class="math-operator math-range-operator">:</span>'+c}var f=this.end.toHTML(i);return u.end&&(f='<span class="math-parenthesis math-round-parenthesis">(</span>'+f+'<span class="math-parenthesis math-round-parenthesis">)</span>'),s+='<span class="math-operator math-range-operator">:</span>'+f,s}_toTex(i){var o=i&&i.parenthesis?i.parenthesis:"keep",u=t(this,o,i&&i.implicit),s=this.start.toTex(i);if(u.start&&(s="\\left(".concat(s,"\\right)")),this.step){var l=this.step.toTex(i);u.step&&(l="\\left(".concat(l,"\\right)")),s+=":"+l}var c=this.end.toTex(i);return u.end&&(c="\\left(".concat(c,"\\right)")),s+=":"+c,s}}return Ur(n,"name",Jo),n},{isClass:!0,isNode:!0}),Qo="RelationalNode",NZ=["Node"],CZ=L(Qo,NZ,e=>{var{Node:r}=e,t={equal:"==",unequal:"!=",smaller:"<",larger:">",smallerEq:"<=",largerEq:">="};class n extends r{constructor(i,o){if(super(),!Array.isArray(i))throw new TypeError("Parameter conditionals must be an array");if(!Array.isArray(o))throw new TypeError("Parameter params must be an array");if(i.length!==o.length-1)throw new TypeError("Parameter params must contain exactly one more element than parameter conditionals");this.conditionals=i,this.params=o}get type(){return Qo}get isRelationalNode(){return!0}_compile(i,o){var u=this,s=this.params.map(l=>l._compile(i,o));return function(c,f,p){for(var v,m=s[0](c,f,p),d=0;d<u.conditionals.length;d++){v=m,m=s[d+1](c,f,p);var y=it(i,u.conditionals[d]);if(!y(v,m))return!1}return!0}}forEach(i){this.params.forEach((o,u)=>i(o,"params["+u+"]",this),this)}map(i){return new n(this.conditionals.slice(),this.params.map((o,u)=>this._ifNode(i(o,"params["+u+"]",this)),this))}clone(){return new n(this.conditionals,this.params)}_toString(i){for(var o=i&&i.parenthesis?i.parenthesis:"keep",u=Ar(this,o,i&&i.implicit),s=this.params.map(function(f,p){var v=Ar(f,o,i&&i.implicit);return o==="all"||v!==null&&v<=u?"("+f.toString(i)+")":f.toString(i)}),l=s[0],c=0;c<this.conditionals.length;c++)l+=" "+t[this.conditionals[c]],l+=" "+s[c+1];return l}toJSON(){return{mathjs:Qo,conditionals:this.conditionals,params:this.params}}static fromJSON(i){return new n(i.conditionals,i.params)}_toHTML(i){for(var o=i&&i.parenthesis?i.parenthesis:"keep",u=Ar(this,o,i&&i.implicit),s=this.params.map(function(f,p){var v=Ar(f,o,i&&i.implicit);return o==="all"||v!==null&&v<=u?'<span class="math-parenthesis math-round-parenthesis">(</span>'+f.toHTML(i)+'<span class="math-parenthesis math-round-parenthesis">)</span>':f.toHTML(i)}),l=s[0],c=0;c<this.conditionals.length;c++)l+='<span class="math-operator math-binary-operator math-explicit-binary-operator">'+_t(t[this.conditionals[c]])+"</span>"+s[c+1];return l}_toTex(i){for(var o=i&&i.parenthesis?i.parenthesis:"keep",u=Ar(this,o,i&&i.implicit),s=this.params.map(function(f,p){var v=Ar(f,o,i&&i.implicit);return o==="all"||v!==null&&v<=u?"\\left("+f.toTex(i)+"\right)":f.toTex(i)}),l=s[0],c=0;c<this.conditionals.length;c++)l+=pr[this.conditionals[c]]+s[c+1];return l}}return Ur(n,"name",Qo),n},{isClass:!0,isNode:!0}),MZ="SymbolNode",TZ=["math","?Unit","Node"],OZ=L(MZ,TZ,e=>{var{math:r,Unit:t,Node:n}=e;function a(o){return t?t.isValuelessUnit(o):!1}class i extends n{constructor(u){if(super(),typeof u!="string")throw new TypeError('String expected for parameter "name"');this.name=u}get type(){return"SymbolNode"}get isSymbolNode(){return!0}_compile(u,s){var l=this.name;if(s[l]===!0)return function(f,p,v){return it(p,l)};if(l in u)return function(f,p,v){return f.has(l)?f.get(l):it(u,l)};var c=a(l);return function(f,p,v){return f.has(l)?f.get(l):c?new t(null,l):i.onUndefinedSymbol(l)}}forEach(u){}map(u){return this.clone()}static onUndefinedSymbol(u){throw new Error("Undefined symbol "+u)}clone(){return new i(this.name)}_toString(u){return this.name}_toHTML(u){var s=_t(this.name);return s==="true"||s==="false"?'<span class="math-symbol math-boolean">'+s+"</span>":s==="i"?'<span class="math-symbol math-imaginary-symbol">'+s+"</span>":s==="Infinity"?'<span class="math-symbol math-infinity-symbol">'+s+"</span>":s==="NaN"?'<span class="math-symbol math-nan-symbol">'+s+"</span>":s==="null"?'<span class="math-symbol math-null-symbol">'+s+"</span>":s==="undefined"?'<span class="math-symbol math-undefined-symbol">'+s+"</span>":'<span class="math-symbol">'+s+"</span>"}toJSON(){return{mathjs:"SymbolNode",name:this.name}}static fromJSON(u){return new i(u.name)}_toTex(u){var s=!1;typeof r[this.name]>"u"&&a(this.name)&&(s=!0);var l=Qb(this.name,s);return l[0]==="\\"?l:" "+l}}return i},{isClass:!0,isNode:!0}),es="FunctionNode",_Z=["math","Node","SymbolNode"],$Z=L(es,_Z,e=>{var r,{math:t,Node:n,SymbolNode:a}=e,i=s=>er(s,{truncate:78});function o(s,l,c){for(var f="",p=/\$(?:\{([a-z_][a-z_0-9]*)(?:\[([0-9]+)\])?\}|\$)/gi,v=0,m;(m=p.exec(s))!==null;)if(f+=s.substring(v,m.index),v=m.index,m[0]==="$$")f+="$",v++;else{v+=m[0].length;var d=l[m[1]];if(!d)throw new ReferenceError("Template: Property "+m[1]+" does not exist.");if(m[2]===void 0)switch(typeof d){case"string":f+=d;break;case"object":if(wr(d))f+=d.toTex(c);else if(Array.isArray(d))f+=d.map(function(y,h){if(wr(y))return y.toTex(c);throw new TypeError("Template: "+m[1]+"["+h+"] is not a Node.")}).join(",");else throw new TypeError("Template: "+m[1]+" has to be a Node, String or array of Nodes");break;default:throw new TypeError("Template: "+m[1]+" has to be a Node, String or array of Nodes")}else if(wr(d[m[2]]&&d[m[2]]))f+=d[m[2]].toTex(c);else throw new TypeError("Template: "+m[1]+"["+m[2]+"] is not a Node.")}return f+=s.slice(v),f}class u extends n{constructor(l,c){if(super(),typeof l=="string"&&(l=new a(l)),!wr(l))throw new TypeError('Node expected as parameter "fn"');if(!Array.isArray(c)||!c.every(wr))throw new TypeError('Array containing Nodes expected for parameter "args"');this.fn=l,this.args=c||[]}get name(){return this.fn.name||""}get type(){return es}get isFunctionNode(){return!0}_compile(l,c){var f=this.args.map(D=>D._compile(l,c));if(Vr(this.fn)){var p=this.fn.name;if(c[p]){var h=this.args;return function(S,N,C){var M=it(N,p);if(typeof M!="function")throw new TypeError("Argument '".concat(p,"' was not a function; received: ").concat(i(M)));if(M.rawArgs)return M(h,l,Vi(S,N));var B=f.map(P=>P(S,N,C));return M.apply(M,B)}}else{var v=p in l?it(l,p):void 0,m=typeof v=="function"&&v.rawArgs===!0,d=D=>{var S;if(D.has(p))S=D.get(p);else if(p in l)S=it(l,p);else return u.onUndefinedFunction(p);if(typeof S=="function")return S;throw new TypeError("'".concat(p,`' is not a function; its value is:
|
|
101
|
+
`).concat(i(S)))};if(m){var y=this.args;return function(S,N,C){var M=d(S);return M(y,l,Vi(S,N))}}else switch(f.length){case 0:return function(S,N,C){var M=d(S);return M()};case 1:return function(S,N,C){var M=d(S),B=f[0];return M(B(S,N,C))};case 2:return function(S,N,C){var M=d(S),B=f[0],P=f[1];return M(B(S,N,C),P(S,N,C))};default:return function(S,N,C){var M=d(S),B=f.map(P=>P(S,N,C));return M(...B)}}}}else if(Jn(this.fn)&&gi(this.fn.index)&&this.fn.index.isObjectProperty()){var E=this.fn.object._compile(l,c),g=this.fn.index.getObjectProperty(),w=this.args;return function(S,N,C){var M=E(S,N,C),B=aI(M,g);if(B!=null&&B.rawArgs)return B(w,l,Vi(S,N));var P=f.map(R=>R(S,N,C));return B.apply(M,P)}}else{var x=this.fn.toString(),b=this.fn._compile(l,c),A=this.args;return function(S,N,C){var M=b(S,N,C);if(typeof M!="function")throw new TypeError("Expression '".concat(x,"' did not evaluate to a function; value is:")+`
|
|
102
|
+
`.concat(i(M)));if(M.rawArgs)return M(A,l,Vi(S,N));var B=f.map(P=>P(S,N,C));return M.apply(M,B)}}}forEach(l){l(this.fn,"fn",this);for(var c=0;c<this.args.length;c++)l(this.args[c],"args["+c+"]",this)}map(l){for(var c=this._ifNode(l(this.fn,"fn",this)),f=[],p=0;p<this.args.length;p++)f[p]=this._ifNode(l(this.args[p],"args["+p+"]",this));return new u(c,f)}clone(){return new u(this.fn,this.args.slice(0))}toString(l){var c,f=this.fn.toString(l);return l&&typeof l.handler=="object"&&Re(l.handler,f)&&(c=l.handler[f](this,l)),typeof c<"u"?c:super.toString(l)}_toString(l){var c=this.args.map(function(p){return p.toString(l)}),f=ho(this.fn)?"("+this.fn.toString(l)+")":this.fn.toString(l);return f+"("+c.join(", ")+")"}toJSON(){return{mathjs:es,fn:this.fn,args:this.args}}_toHTML(l){var c=this.args.map(function(f){return f.toHTML(l)});return'<span class="math-function">'+_t(this.fn)+'</span><span class="math-paranthesis math-round-parenthesis">(</span>'+c.join('<span class="math-separator">,</span>')+'<span class="math-paranthesis math-round-parenthesis">)</span>'}toTex(l){var c;return l&&typeof l.handler=="object"&&Re(l.handler,this.name)&&(c=l.handler[this.name](this,l)),typeof c<"u"?c:super.toTex(l)}_toTex(l){var c=this.args.map(function(v){return v.toTex(l)}),f;Mh[this.name]&&(f=Mh[this.name]),t[this.name]&&(typeof t[this.name].toTex=="function"||typeof t[this.name].toTex=="object"||typeof t[this.name].toTex=="string")&&(f=t[this.name].toTex);var p;switch(typeof f){case"function":p=f(this,l);break;case"string":p=o(f,this,l);break;case"object":switch(typeof f[c.length]){case"function":p=f[c.length](this,l);break;case"string":p=o(f[c.length],this,l);break}}return typeof p<"u"?p:o(fZ,this,l)}getIdentifier(){return this.type+":"+this.name}}return r=u,Ur(u,"name",es),Ur(u,"onUndefinedFunction",function(s){throw new Error("Undefined function "+s)}),Ur(u,"fromJSON",function(s){return new r(s.fn,s.args)}),u},{isClass:!0,isNode:!0}),Oh="parse",FZ=["typed","numeric","config","AccessorNode","ArrayNode","AssignmentNode","BlockNode","ConditionalNode","ConstantNode","FunctionAssignmentNode","FunctionNode","IndexNode","ObjectNode","OperatorNode","ParenthesisNode","RangeNode","RelationalNode","SymbolNode"],BZ=L(Oh,FZ,e=>{var{typed:r,numeric:t,config:n,AccessorNode:a,ArrayNode:i,AssignmentNode:o,BlockNode:u,ConditionalNode:s,ConstantNode:l,FunctionAssignmentNode:c,FunctionNode:f,IndexNode:p,ObjectNode:v,OperatorNode:m,ParenthesisNode:d,RangeNode:y,RelationalNode:h,SymbolNode:E}=e,g=r(Oh,{string:function(X){return Y(X,{})},"Array | Matrix":function(X){return w(X,{})},"string, Object":function(X,pe){var De=pe.nodes!==void 0?pe.nodes:{};return Y(X,De)},"Array | Matrix, Object":w});function w(T){var X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},pe=X.nodes!==void 0?X.nodes:{};return tr(T,function(De){if(typeof De!="string")throw new TypeError("String expected");return Y(De,pe)})}var x={NULL:0,DELIMITER:1,NUMBER:2,SYMBOL:3,UNKNOWN:4},b={",":!0,"(":!0,")":!0,"[":!0,"]":!0,"{":!0,"}":!0,'"':!0,"'":!0,";":!0,"+":!0,"-":!0,"*":!0,".*":!0,"/":!0,"./":!0,"%":!0,"^":!0,".^":!0,"~":!0,"!":!0,"&":!0,"|":!0,"^|":!0,"=":!0,":":!0,"?":!0,"==":!0,"!=":!0,"<":!0,">":!0,"<=":!0,">=":!0,"<<":!0,">>":!0,">>>":!0},A={mod:!0,to:!0,in:!0,and:!0,xor:!0,or:!0,not:!0},D={true:!0,false:!1,null:null,undefined:void 0},S=["NaN","Infinity"],N={'"':'"',"'":"'","\\":"\\","/":"/",b:"\b",f:"\f",n:`
|
|
103
|
+
`,r:"\r",t:" "};function C(){return{extraNodes:{},expression:"",comment:"",index:0,token:"",tokenType:x.NULL,nestingLevel:0,conditionalLevel:null}}function M(T,X){return T.expression.substr(T.index,X)}function B(T){return M(T,1)}function P(T){T.index++}function R(T){return T.expression.charAt(T.index-1)}function _(T){return T.expression.charAt(T.index+1)}function O(T){for(T.tokenType=x.NULL,T.token="",T.comment="";;){if(B(T)==="#")for(;B(T)!==`
|
|
104
|
+
`&&B(T)!=="";)T.comment+=B(T),P(T);if(g.isWhitespace(B(T),T.nestingLevel))P(T);else break}if(B(T)===""){T.tokenType=x.DELIMITER;return}if(B(T)===`
|
|
105
|
+
`&&!T.nestingLevel){T.tokenType=x.DELIMITER,T.token=B(T),P(T);return}var X=B(T),pe=M(T,2),De=M(T,3);if(De.length===3&&b[De]){T.tokenType=x.DELIMITER,T.token=De,P(T),P(T),P(T);return}if(pe.length===2&&b[pe]){T.tokenType=x.DELIMITER,T.token=pe,P(T),P(T);return}if(b[X]){T.tokenType=x.DELIMITER,T.token=X,P(T);return}if(g.isDigitDot(X)){T.tokenType=x.NUMBER;var Le=M(T,2);if(Le==="0b"||Le==="0o"||Le==="0x"){for(T.token+=B(T),P(T),T.token+=B(T),P(T);g.isHexDigit(B(T));)T.token+=B(T),P(T);if(B(T)===".")for(T.token+=".",P(T);g.isHexDigit(B(T));)T.token+=B(T),P(T);else if(B(T)==="i")for(T.token+="i",P(T);g.isDigit(B(T));)T.token+=B(T),P(T);return}if(B(T)==="."){if(T.token+=B(T),P(T),!g.isDigit(B(T))){T.tokenType=x.DELIMITER;return}}else{for(;g.isDigit(B(T));)T.token+=B(T),P(T);g.isDecimalMark(B(T),_(T))&&(T.token+=B(T),P(T))}for(;g.isDigit(B(T));)T.token+=B(T),P(T);if(B(T)==="E"||B(T)==="e"){if(g.isDigit(_(T))||_(T)==="-"||_(T)==="+"){if(T.token+=B(T),P(T),(B(T)==="+"||B(T)==="-")&&(T.token+=B(T),P(T)),!g.isDigit(B(T)))throw Ie(T,'Digit expected, got "'+B(T)+'"');for(;g.isDigit(B(T));)T.token+=B(T),P(T);if(g.isDecimalMark(B(T),_(T)))throw Ie(T,'Digit expected, got "'+B(T)+'"')}else if(_(T)===".")throw P(T),Ie(T,'Digit expected, got "'+B(T)+'"')}return}if(g.isAlpha(B(T),R(T),_(T))){for(;g.isAlpha(B(T),R(T),_(T))||g.isDigit(B(T));)T.token+=B(T),P(T);Re(A,T.token)?T.tokenType=x.DELIMITER:T.tokenType=x.SYMBOL;return}for(T.tokenType=x.UNKNOWN;B(T)!=="";)T.token+=B(T),P(T);throw Ie(T,'Syntax error in part "'+T.token+'"')}function U(T){do O(T);while(T.token===`
|
|
106
|
+
`)}function F(T){T.nestingLevel++}function q(T){T.nestingLevel--}g.isAlpha=function(X,pe,De){return g.isValidLatinOrGreek(X)||g.isValidMathSymbol(X,De)||g.isValidMathSymbol(pe,X)},g.isValidLatinOrGreek=function(X){return/^[a-zA-Z_$\u00C0-\u02AF\u0370-\u03FF\u2100-\u214F]$/.test(X)},g.isValidMathSymbol=function(X,pe){return/^[\uD835]$/.test(X)&&/^[\uDC00-\uDFFF]$/.test(pe)&&/^[^\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDFCC\uDFCD]$/.test(pe)},g.isWhitespace=function(X,pe){return X===" "||X===" "||X===`
|
|
107
|
+
`&&pe>0},g.isDecimalMark=function(X,pe){return X==="."&&pe!=="/"&&pe!=="*"&&pe!=="^"},g.isDigitDot=function(X){return X>="0"&&X<="9"||X==="."},g.isDigit=function(X){return X>="0"&&X<="9"},g.isHexDigit=function(X){return X>="0"&&X<="9"||X>="a"&&X<="f"||X>="A"&&X<="F"};function Y(T,X){var pe=C();kr(pe,{expression:T,extraNodes:X}),O(pe);var De=V(pe);if(pe.token!=="")throw pe.tokenType===x.DELIMITER?Or(pe,"Unexpected operator "+pe.token):Ie(pe,'Unexpected part "'+pe.token+'"');return De}function V(T){var X,pe=[],De;for(T.token!==""&&T.token!==`
|
|
108
|
+
`&&T.token!==";"&&(X=z(T),T.comment&&(X.comment=T.comment));T.token===`
|
|
109
|
+
`||T.token===";";)pe.length===0&&X&&(De=T.token!==";",pe.push({node:X,visible:De})),O(T),T.token!==`
|
|
110
|
+
`&&T.token!==";"&&T.token!==""&&(X=z(T),T.comment&&(X.comment=T.comment),De=T.token!==";",pe.push({node:X,visible:De}));return pe.length>0?new u(pe):(X||(X=new l(void 0),T.comment&&(X.comment=T.comment)),X)}function z(T){var X,pe,De,Le,Ve=J(T);if(T.token==="="){if(Vr(Ve))return X=Ve.name,U(T),De=z(T),new o(new E(X),De);if(Jn(Ve))return U(T),De=z(T),new o(Ve.object,Ve.index,De);if(Bn(Ve)&&Vr(Ve.fn)&&(Le=!0,pe=[],X=Ve.name,Ve.args.forEach(function(Wr,xa){Vr(Wr)?pe[xa]=Wr.name:Le=!1}),Le))return U(T),De=z(T),new c(X,pe,De);throw Ie(T,"Invalid left hand side of assignment operator =")}return Ve}function J(T){for(var X=le(T);T.token==="?";){var pe=T.conditionalLevel;T.conditionalLevel=T.nestingLevel,U(T);var De=X,Le=z(T);if(T.token!==":")throw Ie(T,"False part of conditional expression expected");T.conditionalLevel=null,U(T);var Ve=z(T);X=new s(De,Le,Ve),T.conditionalLevel=pe}return X}function le(T){for(var X=Q(T);T.token==="or";)U(T),X=new m("or","or",[X,Q(T)]);return X}function Q(T){for(var X=re(T);T.token==="xor";)U(T),X=new m("xor","xor",[X,re(T)]);return X}function re(T){for(var X=se(T);T.token==="and";)U(T),X=new m("and","and",[X,se(T)]);return X}function se(T){for(var X=te(T);T.token==="|";)U(T),X=new m("|","bitOr",[X,te(T)]);return X}function te(T){for(var X=ae(T);T.token==="^|";)U(T),X=new m("^|","bitXor",[X,ae(T)]);return X}function ae(T){for(var X=fe(T);T.token==="&";)U(T),X=new m("&","bitAnd",[X,fe(T)]);return X}function fe(T){for(var X=[ne(T)],pe=[],De={"==":"equal","!=":"unequal","<":"smaller",">":"larger","<=":"smallerEq",">=":"largerEq"};Re(De,T.token);){var Le={name:T.token,fn:De[T.token]};pe.push(Le),U(T),X.push(ne(T))}return X.length===1?X[0]:X.length===2?new m(pe[0].name,pe[0].fn,X):new h(pe.map(Ve=>Ve.fn),X)}function ne(T){var X,pe,De,Le;X=be(T);for(var Ve={"<<":"leftShift",">>":"rightArithShift",">>>":"rightLogShift"};Re(Ve,T.token);)pe=T.token,De=Ve[pe],U(T),Le=[X,be(T)],X=new m(pe,De,Le);return X}function be(T){var X,pe,De,Le;X=$e(T);for(var Ve={to:"to",in:"to"};Re(Ve,T.token);)pe=T.token,De=Ve[pe],U(T),pe==="in"&&T.token===""?X=new m("*","multiply",[X,new E("in")],!0):(Le=[X,$e(T)],X=new m(pe,De,Le));return X}function $e(T){var X,pe=[];if(T.token===":"?X=new l(1):X=k(T),T.token===":"&&T.conditionalLevel!==T.nestingLevel){for(pe.push(X);T.token===":"&&pe.length<3;)U(T),T.token===")"||T.token==="]"||T.token===","||T.token===""?pe.push(new E("end")):pe.push(k(T));pe.length===3?X=new y(pe[0],pe[2],pe[1]):X=new y(pe[0],pe[1])}return X}function k(T){var X,pe,De,Le;X=W(T);for(var Ve={"+":"add","-":"subtract"};Re(Ve,T.token);){pe=T.token,De=Ve[pe],U(T);var Wr=W(T);Wr.isPercentage?Le=[X,new m("*","multiply",[X,Wr])]:Le=[X,Wr],X=new m(pe,De,Le)}return X}function W(T){var X,pe,De,Le;X=ue(T),pe=X;for(var Ve={"*":"multiply",".*":"dotMultiply","/":"divide","./":"dotDivide"};Re(Ve,T.token);)De=T.token,Le=Ve[De],U(T),pe=ue(T),X=new m(De,Le,[X,pe]);return X}function ue(T){var X,pe;for(X=j(T),pe=X;T.tokenType===x.SYMBOL||T.token==="in"&&lr(X)||T.tokenType===x.NUMBER&&!lr(pe)&&(!Lr(pe)||pe.op==="!")||T.token==="(";)pe=j(T),X=new m("*","multiply",[X,pe],!0);return X}function j(T){for(var X=K(T),pe=X,De=[];T.token==="/"&&Vl(pe);)if(De.push(kr({},T)),U(T),T.tokenType===x.NUMBER)if(De.push(kr({},T)),U(T),T.tokenType===x.SYMBOL||T.token==="(")kr(T,De.pop()),De.pop(),pe=K(T),X=new m("/","divide",[X,pe]);else{De.pop(),kr(T,De.pop());break}else{kr(T,De.pop());break}return X}function K(T){var X,pe,De,Le;X=oe(T);for(var Ve={"%":"mod",mod:"mod"};Re(Ve,T.token);)pe=T.token,De=Ve[pe],U(T),pe==="%"&&T.tokenType===x.DELIMITER&&T.token!=="("?X=new m("/","divide",[X,new l(100)],!1,!0):(Le=[X,oe(T)],X=new m(pe,De,Le));return X}function oe(T){var X,pe,De,Le={"-":"unaryMinus","+":"unaryPlus","~":"bitNot",not:"not"};return Re(Le,T.token)?(De=Le[T.token],X=T.token,U(T),pe=[oe(T)],new m(X,De,pe)):he(T)}function he(T){var X,pe,De,Le;return X=me(T),(T.token==="^"||T.token===".^")&&(pe=T.token,De=pe==="^"?"pow":"dotPow",U(T),Le=[X,oe(T)],X=new m(pe,De,Le)),X}function me(T){var X,pe,De,Le;X=I(T);for(var Ve={"!":"factorial","'":"ctranspose"};Re(Ve,T.token);)pe=T.token,De=Ve[pe],O(T),Le=[X],X=new m(pe,De,Le),X=ie(T,X);return X}function I(T){var X=[];if(T.tokenType===x.SYMBOL&&Re(T.extraNodes,T.token)){var pe=T.extraNodes[T.token];if(O(T),T.token==="("){if(X=[],F(T),O(T),T.token!==")")for(X.push(z(T));T.token===",";)O(T),X.push(z(T));if(T.token!==")")throw Ie(T,"Parenthesis ) expected");q(T),O(T)}return new pe(X)}return H(T)}function H(T){var X,pe;return T.tokenType===x.SYMBOL||T.tokenType===x.DELIMITER&&T.token in A?(pe=T.token,O(T),Re(D,pe)?X=new l(D[pe]):S.indexOf(pe)!==-1?X=new l(t(pe,"number")):X=new E(pe),X=ie(T,X),X):ce(T)}function ie(T,X,pe){for(var De;(T.token==="("||T.token==="["||T.token===".")&&!pe;)if(De=[],T.token==="(")if(Vr(X)||Jn(X)){if(F(T),O(T),T.token!==")")for(De.push(z(T));T.token===",";)O(T),De.push(z(T));if(T.token!==")")throw Ie(T,"Parenthesis ) expected");q(T),O(T),X=new f(X,De)}else return X;else if(T.token==="["){if(F(T),O(T),T.token!=="]")for(De.push(z(T));T.token===",";)O(T),De.push(z(T));if(T.token!=="]")throw Ie(T,"Parenthesis ] expected");q(T),O(T),X=new a(X,new p(De))}else{O(T);var Le=T.tokenType===x.SYMBOL||T.tokenType===x.DELIMITER&&T.token in A;if(!Le)throw Ie(T,"Property name expected after dot");De.push(new l(T.token)),O(T);var Ve=!0;X=new a(X,new p(De,Ve))}return X}function ce(T){var X,pe;return T.token==='"'||T.token==="'"?(pe=ve(T,T.token),X=new l(pe),X=ie(T,X),X):de(T)}function ve(T,X){for(var pe="";B(T)!==""&&B(T)!==X;)if(B(T)==="\\"){P(T);var De=B(T),Le=N[De];if(Le!==void 0)pe+=Le,T.index+=1;else if(De==="u"){var Ve=T.expression.slice(T.index+1,T.index+5);if(/^[0-9A-Fa-f]{4}$/.test(Ve))pe+=String.fromCharCode(parseInt(Ve,16)),T.index+=5;else throw Ie(T,"Invalid unicode character \\u".concat(Ve))}else throw Ie(T,"Bad escape character \\".concat(De))}else pe+=B(T),P(T);if(O(T),T.token!==X)throw Ie(T,"End of string ".concat(X," expected"));return O(T),pe}function de(T){var X,pe,De,Le;if(T.token==="["){if(F(T),O(T),T.token!=="]"){var Ve=Se(T);if(T.token===";"){for(De=1,pe=[Ve];T.token===";";)O(T),T.token!=="]"&&(pe[De]=Se(T),De++);if(T.token!=="]")throw Ie(T,"End of matrix ] expected");q(T),O(T),Le=pe[0].items.length;for(var Wr=1;Wr<De;Wr++)if(pe[Wr].items.length!==Le)throw Or(T,"Column dimensions mismatch ("+pe[Wr].items.length+" !== "+Le+")");X=new i(pe)}else{if(T.token!=="]")throw Ie(T,"End of matrix ] expected");q(T),O(T),X=Ve}}else q(T),O(T),X=new i([]);return ie(T,X)}return xe(T)}function Se(T){for(var X=[z(T)],pe=1;T.token===",";)O(T),T.token!=="]"&&T.token!==";"&&(X[pe]=z(T),pe++);return new i(X)}function xe(T){if(T.token==="{"){F(T);var X,pe={};do if(O(T),T.token!=="}"){if(T.token==='"'||T.token==="'")X=ve(T,T.token);else if(T.tokenType===x.SYMBOL||T.tokenType===x.DELIMITER&&T.token in A)X=T.token,O(T);else throw Ie(T,"Symbol or string expected as object key");if(T.token!==":")throw Ie(T,"Colon : expected after object key");O(T),pe[X]=z(T)}while(T.token===",");if(T.token!=="}")throw Ie(T,"Comma , or bracket } expected after object value");q(T),O(T);var De=new v(pe);return De=ie(T,De),De}return Me(T)}function Me(T){var X;return T.tokenType===x.NUMBER?(X=T.token,O(T),new l(t(X,n.number))):Ae(T)}function Ae(T){var X;if(T.token==="("){if(F(T),O(T),X=z(T),T.token!==")")throw Ie(T,"Parenthesis ) expected");return q(T),O(T),X=new d(X),X=ie(T,X),X}return nr(T)}function nr(T){throw T.token===""?Ie(T,"Unexpected end of expression"):Ie(T,"Value expected")}function ir(T){return T.index-T.token.length+1}function Ie(T,X){var pe=ir(T),De=new SyntaxError(X+" (char "+pe+")");return De.char=pe,De}function Or(T,X){var pe=ir(T),De=new SyntaxError(X+" (char "+pe+")");return De.char=pe,De}return r.addConversion({from:"string",to:"Node",convert:g}),g}),_h="compile",RZ=["typed","parse"],PZ=L(_h,RZ,e=>{var{typed:r,parse:t}=e;return r(_h,{string:function(a){return t(a).compile()},"Array | Matrix":function(a){return tr(a,function(i){return t(i).compile()})}})}),$h="evaluate",zZ=["typed","parse"],IZ=L($h,zZ,e=>{var{typed:r,parse:t}=e;return r($h,{string:function(a){var i=Ji();return t(a).compile().evaluate(i)},"string, Map | Object":function(a,i){return t(a).compile().evaluate(i)},"Array | Matrix":function(a){var i=Ji();return tr(a,function(o){return t(o).compile().evaluate(i)})},"Array | Matrix, Map | Object":function(a,i){return tr(a,function(o){return t(o).compile().evaluate(i)})}})}),LZ="Parser",qZ=["evaluate"],kZ=L(LZ,qZ,e=>{var{evaluate:r}=e;function t(){if(!(this instanceof t))throw new SyntaxError("Constructor must be called with the new operator");Object.defineProperty(this,"scope",{value:Ji(),writable:!1})}return t.prototype.type="Parser",t.prototype.isParser=!0,t.prototype.evaluate=function(n){return r(n,this.scope)},t.prototype.get=function(n){if(this.scope.has(n))return this.scope.get(n)},t.prototype.getAll=function(){return sI(this.scope)},t.prototype.getAllAsMap=function(){return this.scope},t.prototype.set=function(n,a){return this.scope.set(n,a),a},t.prototype.remove=function(n){this.scope.delete(n)},t.prototype.clear=function(){this.scope.clear()},t},{isClass:!0}),Fh="parser",UZ=["typed","Parser"],HZ=L(Fh,UZ,e=>{var{typed:r,Parser:t}=e;return r(Fh,{"":function(){return new t}})}),Bh="lup",jZ=["typed","matrix","abs","addScalar","divideScalar","multiplyScalar","subtractScalar","larger","equalScalar","unaryMinus","DenseMatrix","SparseMatrix","Spa"],VZ=L(Bh,jZ,e=>{var{typed:r,matrix:t,abs:n,addScalar:a,divideScalar:i,multiplyScalar:o,subtractScalar:u,larger:s,equalScalar:l,unaryMinus:c,DenseMatrix:f,SparseMatrix:p,Spa:v}=e;return r(Bh,{DenseMatrix:function(h){return m(h)},SparseMatrix:function(h){return d(h)},Array:function(h){var E=t(h),g=m(E);return{L:g.L.valueOf(),U:g.U.valueOf(),p:g.p}}});function m(y){var h=y._size[0],E=y._size[1],g=Math.min(h,E),w=Ge(y._data),x=[],b=[h,g],A=[],D=[g,E],S,N,C,M=[];for(S=0;S<h;S++)M[S]=S;for(N=0;N<E;N++){if(N>0)for(S=0;S<h;S++){var B=Math.min(S,N),P=0;for(C=0;C<B;C++)P=a(P,o(w[S][C],w[C][N]));w[S][N]=u(w[S][N],P)}var R=N,_=0,O=0;for(S=N;S<h;S++){var U=w[S][N],F=n(U);s(F,_)&&(R=S,_=F,O=U)}if(N!==R&&(M[N]=[M[R],M[R]=M[N]][0],f._swapRows(N,R,w)),N<h)for(S=N+1;S<h;S++){var q=w[S][N];l(q,0)||(w[S][N]=i(w[S][N],O))}}for(N=0;N<E;N++)for(S=0;S<h;S++){if(N===0&&(S<E&&(A[S]=[]),x[S]=[]),S<N){S<E&&(A[S][N]=w[S][N]),N<h&&(x[S][N]=0);continue}if(S===N){S<E&&(A[S][N]=w[S][N]),N<h&&(x[S][N]=1);continue}S<E&&(A[S][N]=0),N<h&&(x[S][N]=w[S][N])}var Y=new f({data:x,size:b}),V=new f({data:A,size:D}),z=[];for(S=0,g=M.length;S<g;S++)z[M[S]]=S;return{L:Y,U:V,p:z,toString:function(){return"L: "+this.L.toString()+`
|
|
111
|
+
U: `+this.U.toString()+`
|
|
112
|
+
P: `+this.p}}}function d(y){var h=y._size[0],E=y._size[1],g=Math.min(h,E),w=y._values,x=y._index,b=y._ptr,A=[],D=[],S=[],N=[h,g],C=[],M=[],B=[],P=[g,E],R,_,O,U=[],F=[];for(R=0;R<h;R++)U[R]=R,F[R]=R;var q=function(z,J){var le=F[z],Q=F[J];U[le]=J,U[Q]=z,F[z]=Q,F[J]=le},Y=function(){var z=new v;_<h&&(S.push(A.length),A.push(1),D.push(_)),B.push(C.length);var J=b[_],le=b[_+1];for(O=J;O<le;O++)R=x[O],z.set(U[R],w[O]);_>0&&z.forEach(0,_-1,function(te,ae){p._forEachRow(te,A,D,S,function(fe,ne){fe>te&&z.accumulate(fe,c(o(ne,ae)))})});var Q=_,re=z.get(_),se=n(re);z.forEach(_+1,h-1,function(te,ae){var fe=n(ae);s(fe,se)&&(Q=te,se=fe,re=ae)}),_!==Q&&(p._swapRows(_,Q,N[1],A,D,S),p._swapRows(_,Q,P[1],C,M,B),z.swap(_,Q),q(_,Q)),z.forEach(0,h-1,function(te,ae){te<=_?(C.push(ae),M.push(te)):(ae=i(ae,re),l(ae,0)||(A.push(ae),D.push(te)))})};for(_=0;_<E;_++)Y();return B.push(C.length),S.push(A.length),{L:new p({values:A,index:D,ptr:S,size:N}),U:new p({values:C,index:M,ptr:B,size:P}),p:U,toString:function(){return"L: "+this.L.toString()+`
|
|
113
|
+
U: `+this.U.toString()+`
|
|
114
|
+
P: `+this.p}}}}),Rh="qr",GZ=["typed","matrix","zeros","identity","isZero","equal","sign","sqrt","conj","unaryMinus","addScalar","divideScalar","multiplyScalar","subtractScalar","complex"],WZ=L(Rh,GZ,e=>{var{typed:r,matrix:t,zeros:n,identity:a,isZero:i,equal:o,sign:u,sqrt:s,conj:l,unaryMinus:c,addScalar:f,divideScalar:p,multiplyScalar:v,subtractScalar:m,complex:d}=e;return kr(r(Rh,{DenseMatrix:function(w){return h(w)},SparseMatrix:function(w){return E()},Array:function(w){var x=t(w),b=h(x);return{Q:b.Q.valueOf(),R:b.R.valueOf()}}}),{_denseQRimpl:y});function y(g){var w=g._size[0],x=g._size[1],b=a([w],"dense"),A=b._data,D=g.clone(),S=D._data,N,C,M,B=n([w],"");for(M=0;M<Math.min(x,w);++M){var P=S[M][M],R=c(o(P,0)?1:u(P)),_=l(R),O=0;for(N=M;N<w;N++)O=f(O,v(S[N][M],l(S[N][M])));var U=v(R,s(O));if(!i(U)){var F=m(P,U);for(B[M]=1,N=M+1;N<w;N++)B[N]=p(S[N][M],F);var q=c(l(p(F,U))),Y=void 0;for(C=M;C<x;C++){for(Y=0,N=M;N<w;N++)Y=f(Y,v(l(B[N]),S[N][C]));for(Y=v(Y,q),N=M;N<w;N++)S[N][C]=v(m(S[N][C],v(B[N],Y)),_)}for(N=0;N<w;N++){for(Y=0,C=M;C<w;C++)Y=f(Y,v(A[N][C],B[C]));for(Y=v(Y,q),C=M;C<w;++C)A[N][C]=p(m(A[N][C],v(Y,l(B[C]))),_)}}}return{Q:b,R:D,toString:function(){return"Q: "+this.Q.toString()+`
|
|
115
|
+
R: `+this.R.toString()}}}function h(g){var w=y(g),x=w.R._data;if(g._data.length>0)for(var b=x[0][0].type==="Complex"?d(0):0,A=0;A<x.length;++A)for(var D=0;D<A&&D<(x[0]||[]).length;++D)x[A][D]=b;return w}function E(g){throw new Error("qr not implemented for sparse matrices yet")}});function ZZ(e,r,t,n){e._values;for(var a=e._index,i=e._ptr,o=e._size,u=e._datatype,s=o[0],l=o[1],c=null,f=[],p=[],v=0,m=0;m<l;m++){p[m]=v;for(var d=t?t[m]:m,y=i[d],h=i[d+1],E=y;E<h;E++){var g=a[E];f[v]=g,v++}}return p[l]=v,e.createSparseMatrix({values:c,index:f,ptr:p,size:[s,l],datatype:u})}function ex(e,r,t,n,a,i,o){var u=0;for(t[o]=e;u>=0;){var s=t[o+u],l=t[n+s];l===-1?(u--,i[r++]=s):(t[n+s]=t[a+l],++u,t[o+u]=l)}return r}function YZ(e,r){if(!e)return null;var t=0,n,a=[],i=[],o=0,u=r,s=2*r;for(n=0;n<r;n++)i[o+n]=-1;for(n=r-1;n>=0;n--)e[n]!==-1&&(i[u+n]=i[o+e[n]],i[o+e[n]]=n);for(n=0;n<r;n++)e[n]===-1&&(t=ex(n,t,i,o,u,a,s));return a}function XZ(e,r){if(!e)return null;var t=e._index,n=e._ptr,a=e._size,i=a[0],o=a[1],u=[],s=[],l=0,c=o,f,p;for(f=0;f<i;f++)s[c+f]=-1;for(var v=0;v<o;v++){u[v]=-1,s[l+v]=-1;for(var m=n[v],d=n[v+1],y=m;y<d;y++){var h=t[y];for(f=s[c+h];f!==-1&&f<v;f=p)p=s[l+f],s[l+f]=v,p===-1&&(u[f]=v);s[c+h]=v}}return u}function KZ(e,r,t){for(var n=e._values,a=e._index,i=e._ptr,o=e._size,u=o[1],s=0,l=0;l<u;l++){var c=i[l];for(i[l]=s;c<i[l+1];c++)r(a[c],l,n?n[c]:1,t)&&(a[s]=a[c],n&&(n[s]=n[c]),s++)}return i[u]=s,a.splice(s,a.length-s),n&&n.splice(s,n.length-s),s}function Tn(e){return-e-2}var JZ="csAmd",QZ=["add","multiply","transpose"],eY=L(JZ,QZ,e=>{var{add:r,multiply:t,transpose:n}=e;return function(c,f){if(!f||c<=0||c>3)return null;var p=f._size,v=p[0],m=p[1],d=0,y=Math.max(16,10*Math.sqrt(m));y=Math.min(m-2,y);var h=a(c,f,v,m,y);KZ(h,s,null);for(var E=h._index,g=h._ptr,w=g[m],x=[],b=[],A=0,D=m+1,S=2*(m+1),N=3*(m+1),C=4*(m+1),M=5*(m+1),B=6*(m+1),P=7*(m+1),R=x,_=i(m,g,b,A,N,R,S,P,D,B,C,M),O=o(m,g,b,M,C,B,y,D,N,R,S),U=0,F,q,Y,V,z,J,le,Q,re,se,te,ae,fe,ne,be,$e;O<m;){for(Y=-1;U<m&&(Y=b[N+U])===-1;U++);b[S+Y]!==-1&&(R[b[S+Y]]=-1),b[N+U]=b[S+Y];var k=b[C+Y],W=b[D+Y];O+=W;var ue=0;b[D+Y]=-W;var j=g[Y],K=k===0?j:w,oe=K;for(V=1;V<=k+1;V++){for(V>k?(J=Y,le=j,Q=b[A+Y]-k):(J=E[j++],le=g[J],Q=b[A+J]),z=1;z<=Q;z++)F=E[le++],!((re=b[D+F])<=0)&&(ue+=re,b[D+F]=-re,E[oe++]=F,b[S+F]!==-1&&(R[b[S+F]]=R[F]),R[F]!==-1?b[S+R[F]]=b[S+F]:b[N+b[M+F]]=b[S+F]);J!==Y&&(g[J]=Tn(Y),b[B+J]=0)}for(k!==0&&(w=oe),b[M+Y]=ue,g[Y]=K,b[A+Y]=oe-K,b[C+Y]=-2,_=u(_,d,b,B,m),se=K;se<oe;se++)if(F=E[se],!((te=b[C+F])<=0)){re=-b[D+F];var he=_-re;for(j=g[F],ae=g[F]+te-1;j<=ae;j++)J=E[j],b[B+J]>=_?b[B+J]-=re:b[B+J]!==0&&(b[B+J]=b[M+J]+he)}for(se=K;se<oe;se++){for(F=E[se],ae=g[F],fe=ae+b[C+F]-1,ne=ae,be=0,$e=0,j=ae;j<=fe;j++)if(J=E[j],b[B+J]!==0){var me=b[B+J]-_;me>0?($e+=me,E[ne++]=J,be+=J):(g[J]=Tn(Y),b[B+J]=0)}b[C+F]=ne-ae+1;var I=ne,H=ae+b[A+F];for(j=fe+1;j<H;j++){q=E[j];var ie=b[D+q];ie<=0||($e+=ie,E[ne++]=q,be+=q)}$e===0?(g[F]=Tn(Y),re=-b[D+F],ue-=re,W+=re,O+=re,b[D+F]=0,b[C+F]=-1):(b[M+F]=Math.min(b[M+F],$e),E[ne]=E[I],E[I]=E[ae],E[ae]=Y,b[A+F]=ne-ae+1,be=(be<0?-be:be)%m,b[S+F]=b[P+be],b[P+be]=F,R[F]=be)}for(b[M+Y]=ue,d=Math.max(d,ue),_=u(_+d,d,b,B,m),se=K;se<oe;se++)if(F=E[se],!(b[D+F]>=0))for(be=R[F],F=b[P+be],b[P+be]=-1;F!==-1&&b[S+F]!==-1;F=b[S+F],_++){for(Q=b[A+F],te=b[C+F],j=g[F]+1;j<=g[F]+Q-1;j++)b[B+E[j]]=_;var ce=F;for(q=b[S+F];q!==-1;){var ve=b[A+q]===Q&&b[C+q]===te;for(j=g[q]+1;ve&&j<=g[q]+Q-1;j++)b[B+E[j]]!==_&&(ve=0);ve?(g[q]=Tn(F),b[D+F]+=b[D+q],b[D+q]=0,b[C+q]=-1,q=b[S+q],b[S+ce]=q):(ce=q,q=b[S+q])}}for(j=K,se=K;se<oe;se++)F=E[se],!((re=-b[D+F])<=0)&&(b[D+F]=re,$e=b[M+F]+ue-re,$e=Math.min($e,m-O-re),b[N+$e]!==-1&&(R[b[N+$e]]=F),b[S+F]=b[N+$e],R[F]=-1,b[N+$e]=F,U=Math.min(U,$e),b[M+F]=$e,E[j++]=F);b[D+Y]=W,(b[A+Y]=j-K)===0&&(g[Y]=-1,b[B+Y]=0),k!==0&&(w=j)}for(F=0;F<m;F++)g[F]=Tn(g[F]);for(q=0;q<=m;q++)b[N+q]=-1;for(q=m;q>=0;q--)b[D+q]>0||(b[S+q]=b[N+g[q]],b[N+g[q]]=q);for(J=m;J>=0;J--)b[D+J]<=0||g[J]!==-1&&(b[S+J]=b[N+g[J]],b[N+g[J]]=J);for(Y=0,F=0;F<=m;F++)g[F]===-1&&(Y=ex(F,Y,b,N,S,x,B));return x.splice(x.length-1,1),x};function a(l,c,f,p,v){var m=n(c);if(l===1&&p===f)return r(c,m);if(l===2){for(var d=m._index,y=m._ptr,h=0,E=0;E<f;E++){var g=y[E];if(y[E]=h,!(y[E+1]-g>v))for(var w=y[E+1];g<w;g++)d[h++]=d[g]}return y[f]=h,c=n(m),t(m,c)}return t(m,c)}function i(l,c,f,p,v,m,d,y,h,E,g,w){for(var x=0;x<l;x++)f[p+x]=c[x+1]-c[x];f[p+l]=0;for(var b=0;b<=l;b++)f[v+b]=-1,m[b]=-1,f[d+b]=-1,f[y+b]=-1,f[h+b]=1,f[E+b]=1,f[g+b]=0,f[w+b]=f[p+b];var A=u(0,0,f,E,l);return f[g+l]=-2,c[l]=-1,f[E+l]=0,A}function o(l,c,f,p,v,m,d,y,h,E,g){for(var w=0,x=0;x<l;x++){var b=f[p+x];if(b===0)f[v+x]=-2,w++,c[x]=-1,f[m+x]=0;else if(b>d)f[y+x]=0,f[v+x]=-1,w++,c[x]=Tn(l),f[y+l]++;else{var A=f[h+b];A!==-1&&(E[A]=x),f[g+x]=f[h+b],f[h+b]=x}}return w}function u(l,c,f,p,v){if(l<2||l+c<0){for(var m=0;m<v;m++)f[p+m]!==0&&(f[p+m]=1);l=2}return l}function s(l,c){return l!==c}});function rY(e,r,t,n,a,i,o){var u,s,l=0,c;if(e<=r||t[n+r]<=t[a+e])return-1;t[a+e]=t[n+r];var f=t[i+e];if(t[i+e]=r,f===-1)l=1,c=e;else{for(l=2,c=f;c!==t[o+c];c=t[o+c]);for(u=f;u!==c;u=s)s=t[o+u],t[o+u]=c}return{jleaf:l,q:c}}var tY="csCounts",nY=["transpose"],aY=L(tY,nY,e=>{var{transpose:r}=e;return function(t,n,a,i){if(!t||!n||!a)return null;var o=t._size,u=o[0],s=o[1],l,c,f,p,v,m,d,y=4*s+(i?s+u+1:0),h=[],E=0,g=s,w=2*s,x=3*s,b=4*s,A=5*s+1;for(f=0;f<y;f++)h[f]=-1;var D=[],S=r(t),N=S._index,C=S._ptr;for(f=0;f<s;f++)for(c=a[f],D[c]=h[x+c]===-1?1:0;c!==-1&&h[x+c]===-1;c=n[c])h[x+c]=f;if(i){for(f=0;f<s;f++)h[a[f]]=f;for(l=0;l<u;l++){for(f=s,m=C[l],d=C[l+1],v=m;v<d;v++)f=Math.min(f,h[N[v]]);h[A+l]=h[b+f],h[b+f]=l}}for(l=0;l<s;l++)h[E+l]=l;for(f=0;f<s;f++){for(c=a[f],n[c]!==-1&&D[n[c]]--,p=i?h[b+f]:c;p!==-1;p=i?h[A+p]:-1)for(v=C[p];v<C[p+1];v++){l=N[v];var M=rY(l,c,h,x,g,w,E);M.jleaf>=1&&D[c]++,M.jleaf===2&&D[M.q]--}n[c]!==-1&&(h[E+c]=n[c])}for(c=0;c<s;c++)n[c]!==-1&&(D[n[c]]+=D[c]);return D}}),iY="csSqr",oY=["add","multiply","transpose"],sY=L(iY,oY,e=>{var{add:r,multiply:t,transpose:n}=e,a=eY({add:r,multiply:t,transpose:n}),i=aY({transpose:n});return function(s,l,c){var f=l._ptr,p=l._size,v=p[1],m,d={};if(d.q=a(s,l),s&&!d.q)return null;if(c){var y=s?ZZ(l,null,d.q):l;d.parent=XZ(y);var h=YZ(d.parent,v);if(d.cp=i(y,d.parent,h,1),y&&d.parent&&d.cp&&o(y,d))for(d.unz=0,m=0;m<v;m++)d.unz+=d.cp[m]}else d.unz=4*f[v]+v,d.lnz=d.unz;return d};function o(u,s){var l=u._ptr,c=u._index,f=u._size,p=f[0],v=f[1];s.pinv=[],s.leftmost=[];var m=s.parent,d=s.pinv,y=s.leftmost,h=[],E=0,g=p,w=p+v,x=p+2*v,b,A,D,S,N;for(A=0;A<v;A++)h[g+A]=-1,h[w+A]=-1,h[x+A]=0;for(b=0;b<p;b++)y[b]=-1;for(A=v-1;A>=0;A--)for(S=l[A],N=l[A+1],D=S;D<N;D++)y[c[D]]=A;for(b=p-1;b>=0;b--)d[b]=-1,A=y[b],A!==-1&&(h[x+A]++===0&&(h[w+A]=b),h[E+b]=h[g+A],h[g+A]=b);for(s.lnz=0,s.m2=p,A=0;A<v;A++)if(b=h[g+A],s.lnz++,b<0&&(b=s.m2++),d[b]=A,!(--x[A]<=0)){s.lnz+=h[x+A];var C=m[A];C!==-1&&(h[x+C]===0&&(h[w+C]=h[w+A]),h[E+h[w+A]]=h[g+C],h[g+C]=h[E+b],h[x+C]+=h[x+A])}for(b=0;b<p;b++)d[b]<0&&(d[b]=A++);return!0}});function oc(e,r){return e[r]<0}function rx(e,r){e[r]=Tn(e[r])}function Ph(e){return e<0?Tn(e):e}function uY(e,r,t,n,a){var i=r._index,o=r._ptr,u=r._size,s=u[1],l,c,f,p=0;for(n[0]=e;p>=0;){e=n[p];var v=a?a[e]:e;oc(o,e)||(rx(o,e),n[s+p]=v<0?0:Ph(o[v]));var m=1;for(c=n[s+p],f=v<0?0:Ph(o[v+1]);c<f;c++)if(l=i[c],!oc(o,l)){n[s+p]=c,n[++p]=l,m=0;break}m&&(p--,n[--t]=e)}return t}function lY(e,r,t,n,a){var i=e._ptr,o=e._size,u=r._index,s=r._ptr,l=o[1],c,f,p,v=l;for(f=s[t],p=s[t+1],c=f;c<p;c++){var m=u[c];oc(i,m)||(v=uY(m,e,v,n,a))}for(c=v;c<l;c++)rx(i,n[c]);return v}var cY="csSpsolve",fY=["divideScalar","multiply","subtract"],pY=L(cY,fY,e=>{var{divideScalar:r,multiply:t,subtract:n}=e;return function(i,o,u,s,l,c,f){var p=i._values,v=i._index,m=i._ptr,d=i._size,y=d[1],h=o._values,E=o._index,g=o._ptr,w,x,b,A,D=lY(i,o,u,s,c);for(w=D;w<y;w++)l[s[w]]=0;for(x=g[u],b=g[u+1],w=x;w<b;w++)l[E[w]]=h[w];for(var S=D;S<y;S++){var N=s[S],C=c?c[N]:N;if(!(C<0))for(x=m[C],b=m[C+1],l[N]=r(l[N],p[f?x:b-1]),w=f?x+1:x,A=f?b:b-1;w<A;w++){var M=v[w];l[M]=n(l[M],t(p[w],l[N]))}}return D}}),vY="csLu",dY=["abs","divideScalar","multiply","subtract","larger","largerEq","SparseMatrix"],mY=L(vY,dY,e=>{var{abs:r,divideScalar:t,multiply:n,subtract:a,larger:i,largerEq:o,SparseMatrix:u}=e,s=pY({divideScalar:t,multiply:n,subtract:a});return function(c,f,p){if(!c)return null;var v=c._size,m=v[1],d,y=100,h=100;f&&(d=f.q,y=f.lnz||y,h=f.unz||h);var E=[],g=[],w=[],x=new u({values:E,index:g,ptr:w,size:[m,m]}),b=[],A=[],D=[],S=new u({values:b,index:A,ptr:D,size:[m,m]}),N=[],C,M,B=[],P=[];for(C=0;C<m;C++)B[C]=0,N[C]=-1,w[C+1]=0;y=0,h=0;for(var R=0;R<m;R++){w[R]=y,D[R]=h;var _=d?d[R]:R,O=s(x,c,_,P,B,N,1),U=-1,F=-1;for(M=O;M<m;M++)if(C=P[M],N[C]<0){var q=r(B[C]);i(q,F)&&(F=q,U=C)}else A[h]=N[C],b[h++]=B[C];if(U===-1||F<=0)return null;N[_]<0&&o(r(B[_]),n(F,p))&&(U=_);var Y=B[U];for(A[h]=R,b[h++]=Y,N[U]=R,g[y]=U,E[y++]=1,M=O;M<m;M++)C=P[M],N[C]<0&&(g[y]=C,E[y++]=t(B[C],Y)),B[C]=0}for(w[m]=y,D[m]=h,M=0;M<y;M++)g[M]=N[g[M]];return E.splice(y,E.length-y),g.splice(y,g.length-y),b.splice(h,b.length-h),A.splice(h,A.length-h),{L:x,U:S,pinv:N}}}),zh="slu",hY=["typed","abs","add","multiply","transpose","divideScalar","subtract","larger","largerEq","SparseMatrix"],gY=L(zh,hY,e=>{var{typed:r,abs:t,add:n,multiply:a,transpose:i,divideScalar:o,subtract:u,larger:s,largerEq:l,SparseMatrix:c}=e,f=sY({add:n,multiply:a,transpose:i}),p=mY({abs:t,divideScalar:o,multiply:a,subtract:u,larger:s,largerEq:l,SparseMatrix:c});return r(zh,{"SparseMatrix, number, number":function(m,d,y){if(!Pe(d)||d<0||d>3)throw new Error("Symbolic Ordering and Analysis order must be an integer number in the interval [0, 3]");if(y<0||y>1)throw new Error("Partial pivoting threshold must be a number from 0 to 1");var h=f(d,m,!1),E=p(m,h,y);return{L:E.L,U:E.U,p:E.pinv,q:h.q,toString:function(){return"L: "+this.L.toString()+`
|
|
116
|
+
U: `+this.U.toString()+`
|
|
117
|
+
p: `+this.p.toString()+(this.q?`
|
|
118
|
+
q: `+this.q.toString():"")+`
|
|
119
|
+
`}}}})});function Ih(e,r){var t,n=r.length,a=[];if(e)for(t=0;t<n;t++)a[e[t]]=r[t];else for(t=0;t<n;t++)a[t]=r[t];return a}var Lh="lusolve",yY=["typed","matrix","lup","slu","usolve","lsolve","DenseMatrix"],bY=L(Lh,yY,e=>{var{typed:r,matrix:t,lup:n,slu:a,usolve:i,lsolve:o,DenseMatrix:u}=e,s=bo({DenseMatrix:u});return r(Lh,{"Array, Array | Matrix":function(p,v){p=t(p);var m=n(p),d=c(m.L,m.U,m.p,null,v);return d.valueOf()},"DenseMatrix, Array | Matrix":function(p,v){var m=n(p);return c(m.L,m.U,m.p,null,v)},"SparseMatrix, Array | Matrix":function(p,v){var m=n(p);return c(m.L,m.U,m.p,null,v)},"SparseMatrix, Array | Matrix, number, number":function(p,v,m,d){var y=a(p,m,d);return c(y.L,y.U,y.p,y.q,v)},"Object, Array | Matrix":function(p,v){return c(p.L,p.U,p.p,p.q,v)}});function l(f){if(ke(f))return f;if(mr(f))return t(f);throw new TypeError("Invalid Matrix LU decomposition")}function c(f,p,v,m,d){f=l(f),p=l(p),v&&(d=s(f,d,!0),d._data=Ih(v,d._data));var y=o(f,d),h=i(p,y);return m&&(h._data=Ih(m,h._data)),h}}),qh="polynomialRoot",xY=["typed","isZero","equalScalar","add","subtract","multiply","divide","sqrt","unaryMinus","cbrt","typeOf","im","re"],wY=L(qh,xY,e=>{var{typed:r,isZero:t,equalScalar:n,add:a,subtract:i,multiply:o,divide:u,sqrt:s,unaryMinus:l,cbrt:c,typeOf:f,im:p,re:v}=e;return r(qh,{"number|Complex, ...number|Complex":(m,d)=>{for(var y=[m,...d];y.length>0&&t(y[y.length-1]);)y.pop();if(y.length<2)throw new RangeError("Polynomial [".concat(m,", ").concat(d,"] must have a non-zero non-constant coefficient"));switch(y.length){case 2:return[l(u(y[0],y[1]))];case 3:{var[h,E,g]=y,w=o(2,g),x=o(E,E),b=o(4,g,h);if(n(x,b))return[u(l(E),w)];var A=s(i(x,b));return[u(i(A,E),w),u(i(l(A),E),w)]}case 4:{var[D,S,N,C]=y,M=l(o(3,C)),B=o(N,N),P=o(3,C,S),R=a(o(2,N,N,N),o(27,C,C,D)),_=o(9,C,N,S);if(n(B,P)&&n(R,_))return[u(N,M)];var O=i(B,P),U=i(R,_),F=a(o(18,C,N,S,D),o(N,N,S,S)),q=a(o(4,N,N,N,D),o(4,C,S,S,S),o(27,C,C,D,D));if(n(F,q))return[u(i(o(4,C,N,S),a(o(9,C,C,D),o(N,N,N))),o(C,O)),u(i(o(9,C,D),o(N,S)),o(2,O))];var Y;n(B,P)?Y=U:Y=u(a(U,s(i(o(U,U),o(4,O,O,O)))),2);var V=!0,z=c(Y,V).toArray().map(J=>u(a(N,J,u(O,J)),M));return z.map(J=>f(J)==="Complex"&&n(v(J),v(J)+p(J))?v(J):J)}default:throw new RangeError("only implemented for cubic or lower-order polynomials, not ".concat(y))}}})}),EY="Help",SY=["evaluate"],AY=L(EY,SY,e=>{var{evaluate:r}=e;function t(n){if(!(this instanceof t))throw new SyntaxError("Constructor must be called with the new operator");if(!n)throw new Error('Argument "doc" missing');this.doc=n}return t.prototype.type="Help",t.prototype.isHelp=!0,t.prototype.toString=function(){var n=this.doc||{},a=`
|
|
120
|
+
`;if(n.name&&(a+="Name: "+n.name+`
|
|
121
|
+
|
|
122
|
+
`),n.category&&(a+="Category: "+n.category+`
|
|
123
|
+
|
|
124
|
+
`),n.description&&(a+=`Description:
|
|
125
|
+
`+n.description+`
|
|
126
|
+
|
|
127
|
+
`),n.syntax&&(a+=`Syntax:
|
|
128
|
+
`+n.syntax.join(`
|
|
129
|
+
`)+`
|
|
130
|
+
|
|
131
|
+
`),n.examples){a+=`Examples:
|
|
132
|
+
`;for(var i=!1,o=r("config()"),u={config:f=>(i=!0,r("config(newConfig)",{newConfig:f}))},s=0;s<n.examples.length;s++){var l=n.examples[s];a+=" "+l+`
|
|
133
|
+
`;var c=void 0;try{c=r(l,u)}catch(f){c=f}c!==void 0&&!e2(c)&&(a+=" "+er(c,{precision:14})+`
|
|
134
|
+
`)}a+=`
|
|
135
|
+
`,i&&r("config(originalConfig)",{originalConfig:o})}return n.mayThrow&&n.mayThrow.length&&(a+="Throws: "+n.mayThrow.join(", ")+`
|
|
136
|
+
|
|
137
|
+
`),n.seealso&&n.seealso.length&&(a+="See also: "+n.seealso.join(", ")+`
|
|
138
|
+
`),a},t.prototype.toJSON=function(){var n=Ge(this.doc);return n.mathjs="Help",n},t.fromJSON=function(n){var a={};return Object.keys(n).filter(i=>i!=="mathjs").forEach(i=>{a[i]=n[i]}),new t(a)},t.prototype.valueOf=t.prototype.toString,t},{isClass:!0}),DY="Chain",NY=["?on","math","typed"],CY=L(DY,NY,e=>{var{on:r,math:t,typed:n}=e;function a(l){if(!(this instanceof a))throw new SyntaxError("Constructor must be called with the new operator");r2(l)?this.value=l.value:this.value=l}a.prototype.type="Chain",a.prototype.isChain=!0,a.prototype.done=function(){return this.value},a.prototype.valueOf=function(){return this.value},a.prototype.toString=function(){return er(this.value)},a.prototype.toJSON=function(){return{mathjs:"Chain",value:this.value}},a.fromJSON=function(l){return new a(l.value)};function i(l,c){typeof c=="function"&&(a.prototype[l]=u(c))}function o(l,c){Az(a.prototype,l,function(){var p=c();if(typeof p=="function")return u(p)})}function u(l){return function(){if(arguments.length===0)return new a(l(this.value));for(var c=[this.value],f=0;f<arguments.length;f++)c[f+1]=arguments[f];if(n.isTypedFunction(l)){var p=n.resolve(l,c);if(p.params.length===1)throw new Error("chain function "+l.name+" cannot match rest parameter between chain value and additional arguments.");return new a(p.implementation.apply(l,c))}return new a(l.apply(l,c))}}a.createProxy=function(l,c){if(typeof l=="string")i(l,c);else{var f=function(m){Re(l,m)&&s[m]===void 0&&o(m,()=>l[m])};for(var p in l)f(p)}};var s={expression:!0,docs:!0,type:!0,classes:!0,json:!0,error:!0,isChain:!0};return a.createProxy(t),r&&r("import",function(l,c,f){f||o(l,c)}),a},{isClass:!0}),kh={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"]},MY={name:"false",category:"Constants",syntax:["false"],description:"Boolean value false",examples:["false"],seealso:["true"]},TY={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:[]},OY={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:[]},_Y={name:"LN10",category:"Constants",syntax:["LN10"],description:"Returns the natural logarithm of 10, approximately equal to 2.302",examples:["LN10","log(10)"],seealso:[]},$Y={name:"LN2",category:"Constants",syntax:["LN2"],description:"Returns the natural logarithm of 2, approximately equal to 0.693",examples:["LN2","log(2)"],seealso:[]},FY={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:[]},BY={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:[]},RY={name:"NaN",category:"Constants",syntax:["NaN"],description:"Not a number",examples:["NaN","0 / 0"],seealso:[]},PY={name:"null",category:"Constants",syntax:["null"],description:"Value null",examples:["null"],seealso:["true","false"]},zY={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:[]},Uh={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"]},IY={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:[]},LY={name:"SQRT2",category:"Constants",syntax:["SQRT2"],description:"Returns the square root of 2, approximately equal to 1.414",examples:["SQRT2","sqrt(2)"],seealso:[]},qY={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"]},kY={name:"true",category:"Constants",syntax:["true"],description:"Boolean value true",examples:["true"],seealso:["false"]},UY={name:"version",category:"Constants",syntax:["version"],description:"A string with the version number of math.js",examples:["version"],seealso:[]},HY={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"]},jY={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"]},VY={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"]},GY={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"]},WY={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"]},ZY={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:["A = [1, 2, 3; 4, 5, 6]","A[1, :]","A[1, 2] = 50","A[1:2, 1:2] = 1","B = [1, 2, 3]","B[B>1 and B<3]"],seealso:["bignumber","boolean","complex","matrix,","number","range","string","unit"]},YY={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"]},XY={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"]},KY={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"]},JY={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"]},QY={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"]},eX={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"]},rX={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:[]},tX={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:[]},nX={name:"typed",category:"Core",syntax:["typed(signatures)","typed(name, signatures)"],description:"Create a typed function.",examples:['double = typed({ "number": f(x)=x+x, "string": f(x)=concat(x,x) })',"double(2)",'double("hello")'],seealso:[]},aX={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"]},iX={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"]},oX={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"]},sX={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"]},uX={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"]},lX={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"]},cX={name:"polynomialRoot",category:"Algebra",syntax:["x=polynomialRoot(-6, 3)","x=polynomialRoot(4, -4, 1)","x=polynomialRoot(-8, 12, -6, 1)"],description:"Finds the roots of a univariate polynomial given by its coefficients starting from constant, linear, and so on, increasing in degree.",examples:["a = polynomialRoot(-6, 11, -6, 1)"],seealso:["cbrt","sqrt"]},fX={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"]},pX={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"]},vX={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"]},dX={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"]},mX={name:"simplifyConstant",category:"Algebra",syntax:["simplifyConstant(expr)","simplifyConstant(expr, options)"],description:"Replace constant subexpressions of node with their values.",examples:['simplifyConstant("(3-3)*x")','simplifyConstant(parse("z-cos(tau/8)"))'],seealso:["simplify","simplifyCore","evaluate"]},hX={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","simplifyConstant","evaluate"]},gX={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"]},yX={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"]},bX={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"]},xX={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"]},wX={name:"abs",category:"Arithmetic",syntax:["abs(x)"],description:"Compute the absolute value.",examples:["abs(3.5)","abs(-4.2)"],seealso:["sign"]},EX={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"]},SX={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"]},AX={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"]},DX={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"]},NX={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"]},CX={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"]},MX={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"]},TX={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"]},OX={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"]},_X={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"]},$X={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"]},FX={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"]},BX={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"]},RX={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"]},PX={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"]},zX={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)","invmod(7, 13)","invmod(15151, 15122)"],seealso:["gcd","xgcd"]},IX={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"]},LX={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"]},qX={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"]},kX={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"]},UX={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"]},HX={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"]},jX={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"]},VX={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")']},GX={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"]},WX={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"]},ZX={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)","pow([[1, 2], [4, 3]], 2)","pow([[1, 2], [4, 3]], -1)"],seealso:["multiply","nthRoot","nthRoots","sqrt"]},YX={name:"round",category:"Arithmetic",syntax:["round(x)","round(x, n)","round(unit, valuelessUnit)","round(unit, n, valuelessUnit)"],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)","round(3.241cm, 2, cm)","round([3.2, 3.8, -4.7])"],seealso:["ceil","floor","fix"]},XX={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"]},KX={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"]},JX={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([[33, 24], [48, 57]])"],seealso:["sqrt","abs","square","multiply"]},QX={name:"sylvester",category:"Algebra",syntax:["sylvester(A,B,C)"],description:"Solves the real-valued Sylvester equation AX+XB=C for X",examples:["sylvester([[-1, -2], [1, 1]], [[-2, 1], [-1, 2]], [[-3, 2], [3, 0]])","A = [[-1, -2], [1, 1]]; B = [[2, -1], [1, -2]]; C = [[-3, 2], [3, 0]]","sylvester(A, B, C)"],seealso:["schur","lyap"]},eK={name:"schur",category:"Algebra",syntax:["schur(A)"],description:"Performs a real Schur decomposition of the real matrix A = UTU'",examples:["schur([[1, 0], [-4, 3]])","A = [[1, 0], [-4, 3]]","schur(A)"],seealso:["lyap","sylvester"]},rK={name:"lyap",category:"Algebra",syntax:["lyap(A,Q)"],description:"Solves the Continuous-time Lyapunov equation AP+PA'+Q=0 for P",examples:["lyap([[-2, 0], [1, -4]], [[3, 1], [1, 3]])","A = [[-2, 0], [1, -4]]","Q = [[3, 1], [1, 3]]","lyap(A,Q)"],seealso:["schur","sylvester"]},tK={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"]},nK={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"]},aK={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"]},iK={name:"unaryPlus",category:"Operators",syntax:["+x","unaryPlus(x)"],description:"Converts booleans and strings to numbers.",examples:["+true",'+"2"'],seealso:["add","subtract","unaryMinus"]},oK={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"]},sK={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"]},uK={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"]},lK={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"]},cK={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"]},fK={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"]},pK={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"]},vK={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"]},dK={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"]},mK={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"]},hK={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"]},gK={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"]},yK={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"]},bK={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"]},xK={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"]},wK={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"]},EK={name:"evaluate",category:"Expression",syntax:["evaluate(expression)","evaluate(expression, scope)","evaluate([expr1, expr2, expr3, ...])","evaluate([expr1, expr2, expr3, ...], scope)"],description:"Evaluate an expression or an array with expressions.",examples:['evaluate("2 + 3")','evaluate("sqrt(16)")','evaluate("2 inch to cm")','evaluate("sin(x * pi)", { "x": 1/2 })','evaluate(["width=2", "height=4","width*height"])'],seealso:[]},SK={name:"help",category:"Expression",syntax:["help(object)","help(string)"],description:"Display documentation on a function or data type.",examples:["help(sqrt)",'help("complex")'],seealso:[]},AK={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:[]},DK={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:[]},NK={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"]},CK={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"]},MK={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"]},TK={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"]},OK={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"]},_K={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"]},$K={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"]},FK={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"]},BK={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"]},RK={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"]},PK={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"]},zK={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:["A = [1, 2, 4, 7, 0]","diff(A)","diff(A, 1)","B = [[1, 2], [3, 4]]","diff(B)","diff(B, 1)","diff(B, 2)","diff(B, bignumber(2))","diff([[1, 2], matrix([3, 4])], 2)"],seealso:["subtract","partitionSelect"]},IK={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"]},LK={name:"eigs",category:"Matrix",syntax:["eigs(x)"],description:"Calculate the eigenvalues and optionally eigenvectors of a square matrix",examples:["eigs([[5, 2.3], [2.3, 1]])","eigs([[1, 2, 3], [4, 5, 6], [7, 8, 9]], { precision: 1e-6, eigenvectors: false })"],seealso:["inv"]},qK={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"]},kK={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"]},UK={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"]},HK={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"]},jK={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"]},VK={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"]},GK={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"]},WK={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"]},ZK={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"]},YK={name:"matrixFromColumns",category:"Matrix",syntax:["matrixFromColumns(...arr)","matrixFromColumns(row1, row2)","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"]},XK={name:"matrixFromFunction",category:"Matrix",syntax:["matrixFromFunction(size, fn)","matrixFromFunction(size, fn, format)","matrixFromFunction(size, fn, format, datatype)","matrixFromFunction(size, format, fn)","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"]},KK={name:"matrixFromRows",category:"Matrix",syntax:["matrixFromRows(...arr)","matrixFromRows(row1, row2)","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"]},JK={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"]},QK={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, compareText)',"arr = [5, 2, 1]","partitionSelect(arr, 0) # returns 1, arr is now: [1, 2, 5]","arr","partitionSelect(arr, 1, 'desc') # returns 2, arr is now: [5, 2, 1]","arr"],seealso:["sort"]},eJ={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")',"range(1m, 1m, 3m)","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"]},rJ={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])","reshape([1, 2, 3, 4], [-1, 2])"],seealso:["size","squeeze","resize"]},tJ={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"]},nJ={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], 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"]},aJ={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"]},iJ={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"]},oJ={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"]},sJ={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"], "natural")',"sortByLength(a, b) = size(a)[1] - size(b)[1]",'sort(["Langdon", "Tom", "Sara"], sortByLength)','sort(["10", "1", "2"], "natural")'],seealso:["map","filter","forEach"]},uJ={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"]},lJ={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"]},cJ={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"]},fJ={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"]},pJ={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"]},vJ={name:"fft",category:"Matrix",syntax:["fft(x)"],description:"Calculate N-dimensional fourier transform",examples:["fft([[1, 0], [1, 0]])"],seealso:["ifft"]},dJ={name:"ifft",category:"Matrix",syntax:["ifft(x)"],description:"Calculate N-dimensional inverse fourier transform",examples:["ifft([[2, 2], [0, 0]])"],seealso:["fft"]},mJ={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"]},hJ={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"]},gJ={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"]},yJ={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"]},bJ={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(i)","lgamma(complex(1.1, 2))"],seealso:["gamma"]},xJ={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:[]},wJ={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"]},EJ={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"]},SJ={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"]},AJ={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"]},DJ={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"]},NJ={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"]},CJ={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"]},MJ={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"]},TJ={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"]},OJ={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"]},_J={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"]},$J={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"]},FJ={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"]},BJ={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"]},RJ={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"]},PJ={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"]},zJ={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"]},IJ={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"]},LJ={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"]},qJ={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"]},kJ={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"]},UJ={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"]},HJ={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"]},jJ={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"]},VJ={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"]},GJ={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"]},WJ={name:"zpk2tf",category:"Signal",syntax:["zpk2tf(z, p, k)"],description:"Compute the transfer function of a zero-pole-gain model.",examples:["zpk2tf([1, 2], [-1, -2], 1)","zpk2tf([1, 2], [-1, -2])","zpk2tf([1 - 3i, 2 + 2i], [-1, -2])"],seealso:[]},ZJ={name:"freqz",category:"Signal",syntax:["freqz(b, a)","freqz(b, a, w)"],description:"Calculates the frequency response of a filter given its numerator and denominator coefficients.",examples:["freqz([1, 2], [1, 2, 3])","freqz([1, 2], [1, 2, 3], [0, 1])","freqz([1, 2], [1, 2, 3], 512)"],seealso:[]},YJ={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:[]},XJ={name:"zeta",category:"Special",syntax:["zeta(s)"],description:"Compute the Riemann Zeta Function using an infinite series and Riemanns Functional Equation for the entire complex plane",examples:["zeta(0.2)","zeta(-0.5)","zeta(4)"],seealso:[]},KJ={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"]},JJ={name:"max",category:"Statistics",syntax:["max(a, b, c, ...)","max(A)","max(A, dimension)"],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"]},QJ={name:"mean",category:"Statistics",syntax:["mean(a, b, c, ...)","mean(A)","mean(A, dimension)"],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"]},eQ={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"]},rQ={name:"min",category:"Statistics",syntax:["min(a, b, c, ...)","min(A)","min(A, dimension)"],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"]},tQ={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"]},nQ={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"]},aQ={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.
|
|
139
|
+
|
|
140
|
+
In 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"]},iQ={name:"std",category:"Statistics",syntax:["std(a, b, c, ...)","std(A)","std(A, dimension)","std(A, normalization)","std(A, dimension, 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"]},oQ={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"]},sQ={name:"sum",category:"Statistics",syntax:["sum(a, b, c, ...)","sum(A)","sum(A, dimension)"],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"]},uQ={name:"variance",category:"Statistics",syntax:["variance(a, b, c, ...)","variance(A)","variance(A, dimension)","variance(A, normalization)","variance(A, dimension, 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"]},lQ={name:"corr",category:"Statistics",syntax:["corr(A,B)"],description:"Compute the correlation coefficient of a two list with values, For matrices, the matrix correlation coefficient is calculated.",examples:["corr([2, 4, 6, 8],[1, 2, 3, 6])","corr(matrix([[1, 2.2, 3, 4.8, 5], [1, 2, 3, 4, 5]]), matrix([[4, 5.3, 6.6, 7, 8], [1, 2, 3, 4, 5]]))"],seealso:["max","mean","min","median","min","prod","std","sum"]},cQ={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"]},fQ={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"]},pQ={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"]},vQ={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"]},dQ={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"]},mQ={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"]},hQ={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"]},gQ={name:"asech",category:"Trigonometry",syntax:["asech(x)"],description:"Calculate the inverse secant of a value.",examples:["asech(0.5)"],seealso:["acsch","acoth"]},yQ={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"]},bQ={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"]},xQ={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"]},wQ={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"]},EQ={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"]},SQ={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"]},AQ={name:"cosh",category:"Trigonometry",syntax:["cosh(x)"],description:"Compute the hyperbolic cosine of x in radians.",examples:["cosh(0.5)"],seealso:["sinh","tanh","coth"]},DQ={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"]},NQ={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"]},CQ={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"]},MQ={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"]},TQ={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"]},OQ={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"]},_Q={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"]},$Q={name:"sinh",category:"Trigonometry",syntax:["sinh(x)"],description:"Compute the hyperbolic sine of x in radians.",examples:["sinh(0.5)"],seealso:["cosh","tanh"]},FQ={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"]},BQ={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"]},RQ={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:[]},PQ={name:"bin",category:"Utils",syntax:["bin(value)"],description:"Format a number as binary",examples:["bin(2)"],seealso:["oct","hex"]},zQ={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:[]},IQ={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"]},LQ={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"]},qQ={name:"hex",category:"Utils",syntax:["hex(value)"],description:"Format a number as hexadecimal",examples:["hex(240)"],seealso:["bin","oct"]},kQ={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"]},UQ={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"]},HQ={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"]},jQ={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"]},VQ={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"]},GQ={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"]},WQ={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"]},ZQ={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"]},YQ={name:"oct",category:"Utils",syntax:["oct(value)"],description:"Format a number as octal",examples:["oct(56)"],seealso:["bin","hex"]},XQ={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: $1, $2, $3", [6, 9, 4])'],seealso:["format"]},KQ={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"]},JQ={name:"solveODE",category:"Numeric",syntax:["solveODE(func, tspan, y0)","solveODE(func, tspan, y0, options)"],description:"Numerical Integration of Ordinary Differential Equations.",examples:["f(t,y) = y","tspan = [0, 4]","solveODE(f, tspan, 1)","solveODE(f, tspan, [1, 2])",'solveODE(f, tspan, 1, { method:"RK23", maxStep:0.1 })'],seealso:["derivative","simplifyCore"]},QQ={bignumber:HY,boolean:jY,complex:VY,createUnit:GY,fraction:WY,index:ZY,matrix:YY,number:XY,sparse:KY,splitUnit:JY,string:QY,unit:eX,e:kh,E:kh,false:MY,i:TY,Infinity:OY,LN2:$Y,LN10:_Y,LOG2E:BY,LOG10E:FY,NaN:RY,null:PY,pi:Uh,PI:Uh,phi:zY,SQRT1_2:IY,SQRT2:LY,tau:qY,true:kY,version:UY,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:aX,lsolve:oX,lsolveAll:sX,lup:uX,lusolve:lX,leafCount:iX,polynomialRoot:cX,resolve:vX,simplify:dX,simplifyConstant:mX,simplifyCore:hX,symbolicEqual:yX,rationalize:pX,slu:gX,usolve:bX,usolveAll:xX,qr:fX,abs:wX,add:EX,cbrt:SX,ceil:AX,cube:DX,divide:NX,dotDivide:CX,dotMultiply:MX,dotPow:TX,exp:OX,expm:_X,expm1:$X,fix:FX,floor:BX,gcd:RX,hypot:PX,lcm:IX,log:LX,log2:UX,log1p:kX,log10:qX,mod:HX,multiply:jX,norm:VX,nthRoot:GX,nthRoots:WX,pow:ZX,round:YX,sign:XX,sqrt:KX,sqrtm:JX,square:tK,subtract:nK,unaryMinus:aK,unaryPlus:iK,xgcd:oK,invmod:zX,bitAnd:sK,bitNot:uK,bitOr:lK,bitXor:cK,leftShift:fK,rightArithShift:pK,rightLogShift:vK,bellNumbers:dK,catalan:mK,composition:hK,stirlingS2:gK,config:rX,import:tX,typed:nX,arg:yK,conj:bK,re:wK,im:xK,evaluate:EK,help:SK,distance:AK,intersect:DK,and:NK,not:CK,or:MK,xor:TK,concat:_K,count:$K,cross:FK,column:OK,ctranspose:BK,det:RK,diag:PK,diff:zK,dot:IK,getMatrixDataType:HK,identity:jK,filter:qK,flatten:kK,forEach:UK,inv:VK,pinv:GK,eigs:LK,kron:WK,matrixFromFunction:XK,matrixFromRows:KK,matrixFromColumns:YK,map:ZK,ones:JK,partitionSelect:QK,range:eJ,resize:tJ,reshape:rJ,rotate:nJ,rotationMatrix:aJ,row:iJ,size:oJ,sort:sJ,squeeze:uJ,subset:lJ,trace:cJ,transpose:fJ,zeros:pJ,fft:vJ,ifft:dJ,sylvester:QX,schur:eK,lyap:rK,solveODE:JQ,combinations:mJ,combinationsWithRep:hJ,factorial:gJ,gamma:yJ,kldivergence:xJ,lgamma:bJ,multinomial:wJ,permutations:EJ,pickRandom:SJ,random:AJ,randomInt:DJ,compare:NJ,compareNatural:CJ,compareText:MJ,deepEqual:TJ,equal:OJ,equalText:_J,larger:$J,largerEq:FJ,smaller:BJ,smallerEq:RJ,unequal:PJ,setCartesian:zJ,setDifference:IJ,setDistinct:LJ,setIntersect:qJ,setIsSubset:kJ,setMultiplicity:UJ,setPowerset:HJ,setSize:jJ,setSymDifference:VJ,setUnion:GJ,zpk2tf:WJ,freqz:ZJ,erf:YJ,zeta:XJ,cumsum:oQ,mad:KJ,max:JJ,mean:QJ,median:eQ,min:rQ,mode:tQ,prod:nQ,quantileSeq:aQ,std:iQ,sum:sQ,variance:uQ,corr:lQ,acos:cQ,acosh:fQ,acot:pQ,acoth:vQ,acsc:dQ,acsch:mQ,asec:hQ,asech:gQ,asin:yQ,asinh:bQ,atan:xQ,atanh:EQ,atan2:wQ,cos:SQ,cosh:AQ,cot:DQ,coth:NQ,csc:CQ,csch:MQ,sec:TQ,sech:OQ,sin:_Q,sinh:$Q,tan:FQ,tanh:BQ,to:RQ,clone:zQ,format:IQ,bin:PQ,oct:YQ,hex:qQ,isNaN:UQ,isInteger:kQ,isNegative:HQ,isNumeric:jQ,hasNumericValue:LQ,isPositive:VQ,isPrime:GQ,isZero:WQ,print:XQ,typeOf:KQ,numeric:ZQ},Hh="help",eee=["typed","mathWithTransform","Help"],ree=L(Hh,eee,e=>{var{typed:r,mathWithTransform:t,Help:n}=e;return r(Hh,{any:function(i){var o,u=i;if(typeof i!="string"){for(o in t)if(Re(t,o)&&i===t[o]){u=o;break}}var s=it(QQ,u);if(!s){var l=typeof u=="function"?u.name:u;throw new Error('No documentation found on "'+l+'"')}return new n(s)}})}),jh="chain",tee=["typed","Chain"],nee=L(jh,tee,e=>{var{typed:r,Chain:t}=e;return r(jh,{"":function(){return new t},any:function(a){return new t(a)}})}),Vh="det",aee=["typed","matrix","subtractScalar","multiply","divideScalar","isZero","unaryMinus"],iee=L(Vh,aee,e=>{var{typed:r,matrix:t,subtractScalar:n,multiply:a,divideScalar:i,isZero:o,unaryMinus:u}=e;return r(Vh,{any:function(c){return Ge(c)},"Array | Matrix":function(c){var f;switch(ke(c)?f=c.size():Array.isArray(c)?(c=t(c),f=c.size()):f=[],f.length){case 0:return Ge(c);case 1:if(f[0]===1)return Ge(c.valueOf()[0]);if(f[0]===0)return 1;throw new RangeError("Matrix must be square (size: "+er(f)+")");case 2:{var p=f[0],v=f[1];if(p===v)return s(c.clone().valueOf(),p);if(v===0)return 1;throw new RangeError("Matrix must be square (size: "+er(f)+")")}default:throw new RangeError("Matrix must be two dimensional (size: "+er(f)+")")}}});function s(l,c,f){if(c===1)return Ge(l[0][0]);if(c===2)return n(a(l[0][0],l[1][1]),a(l[1][0],l[0][1]));for(var p=!1,v=new Array(c).fill(0).map((A,D)=>D),m=0;m<c;m++){var d=v[m];if(o(l[d][m])){var y=void 0;for(y=m+1;y<c;y++)if(!o(l[v[y]][m])){d=v[y],v[y]=v[m],v[m]=d,p=!p;break}if(y===c)return l[d][m]}for(var h=l[d][m],E=m===0?1:l[v[m-1]][m-1],g=m+1;g<c;g++)for(var w=v[g],x=m+1;x<c;x++)l[w][x]=i(n(a(l[w][x],h),a(l[w][m],l[d][x])),E)}var b=l[v[c-1]][c-1];return p?u(b):b}}),Gh="inv",oee=["typed","matrix","divideScalar","addScalar","multiply","unaryMinus","det","identity","abs"],see=L(Gh,oee,e=>{var{typed:r,matrix:t,divideScalar:n,addScalar:a,multiply:i,unaryMinus:o,det:u,identity:s,abs:l}=e;return r(Gh,{"Array | Matrix":function(p){var v=ke(p)?p.size():Xe(p);switch(v.length){case 1:if(v[0]===1)return ke(p)?t([n(1,p.valueOf()[0])]):[n(1,p[0])];throw new RangeError("Matrix must be square (size: "+er(v)+")");case 2:{var m=v[0],d=v[1];if(m===d)return ke(p)?t(c(p.valueOf(),m,d),p.storage()):c(p,m,d);throw new RangeError("Matrix must be square (size: "+er(v)+")")}default:throw new RangeError("Matrix must be two dimensional (size: "+er(v)+")")}},any:function(p){return n(1,p)}});function c(f,p,v){var m,d,y,h,E;if(p===1){if(h=f[0][0],h===0)throw Error("Cannot calculate inverse, determinant is zero");return[[n(1,h)]]}else if(p===2){var g=u(f);if(g===0)throw Error("Cannot calculate inverse, determinant is zero");return[[n(f[1][1],g),n(o(f[0][1]),g)],[n(o(f[1][0]),g),n(f[0][0],g)]]}else{var w=f.concat();for(m=0;m<p;m++)w[m]=w[m].concat();for(var x=s(p).valueOf(),b=0;b<v;b++){var A=l(w[b][b]),D=b;for(m=b+1;m<p;)l(w[m][b])>A&&(A=l(w[m][b]),D=m),m++;if(A===0)throw Error("Cannot calculate inverse, determinant is zero");m=D,m!==b&&(E=w[b],w[b]=w[m],w[m]=E,E=x[b],x[b]=x[m],x[m]=E);var S=w[b],N=x[b];for(m=0;m<p;m++){var C=w[m],M=x[m];if(m!==b){if(C[b]!==0){for(y=n(o(C[b]),S[b]),d=b;d<v;d++)C[d]=a(C[d],i(y,S[d]));for(d=0;d<v;d++)M[d]=a(M[d],i(y,N[d]))}}else{for(y=S[b],d=b;d<v;d++)C[d]=n(C[d],y);for(d=0;d<v;d++)M[d]=n(M[d],y)}}}return x}}}),Wh="pinv",uee=["typed","matrix","inv","deepEqual","equal","dotDivide","dot","ctranspose","divideScalar","multiply","add","Complex"],lee=L(Wh,uee,e=>{var{typed:r,matrix:t,inv:n,deepEqual:a,equal:i,dotDivide:o,dot:u,ctranspose:s,divideScalar:l,multiply:c,add:f,Complex:p}=e;return r(Wh,{"Array | Matrix":function(g){var w=ke(g)?g.size():Xe(g);switch(w.length){case 1:return h(g)?s(g):w[0]===1?n(g):o(s(g),u(g,g));case 2:{if(h(g))return s(g);var x=w[0],b=w[1];if(x===b)try{return n(g)}catch(A){if(!(A instanceof Error&&A.message.match(/Cannot calculate inverse, determinant is zero/)))throw A}return ke(g)?t(v(g.valueOf(),x,b),g.storage()):v(g,x,b)}default:throw new RangeError("Matrix must be two dimensional (size: "+er(w)+")")}},any:function(g){return i(g,0)?Ge(g):l(1,g)}});function v(E,g,w){var{C:x,F:b}=d(E,g,w),A=c(n(c(s(x),x)),s(x)),D=c(s(b),n(c(b,s(b))));return c(D,A)}function m(E,g,w){for(var x=Ge(E),b=0,A=0;A<g;A++){if(w<=b)return x;for(var D=A;y(x[D][b]);)if(D++,g===D&&(D=A,b++,w===b))return x;[x[D],x[A]]=[x[A],x[D]];for(var S=x[A][b],N=0;N<w;N++)x[A][N]=o(x[A][N],S);for(var C=0;C<g;C++)if(C!==A){S=x[C][b];for(var M=0;M<w;M++)x[C][M]=f(x[C][M],c(-1,c(S,x[A][M])))}b++}return x}function d(E,g,w){var x=m(E,g,w),b=E.map((D,S)=>D.filter((N,C)=>C<g&&!y(u(x[C],x[C])))),A=x.filter((D,S)=>!y(u(x[S],x[S])));return{C:b,F:A}}function y(E){return i(f(E,p(1,1)),f(0,p(1,1)))}function h(E){return a(f(E,p(1,1)),f(c(E,0),p(1,1)))}});function cee(e){var{addScalar:r,subtract:t,flatten:n,multiply:a,multiplyScalar:i,divideScalar:o,sqrt:u,abs:s,bignumber:l,diag:c,size:f,reshape:p,inv:v,qr:m,usolve:d,usolveAll:y,equal:h,complex:E,larger:g,smaller:w,matrixFromColumns:x,dot:b}=e;function A(V,z,J,le){var Q=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,re=D(V,z,J,le,Q);S(V,z,J,le,Q,re);var{values:se,C:te}=N(V,z,J,le,Q);if(Q){var ae=C(V,z,te,re,se,J,le);return{values:se,eigenvectors:ae}}return{values:se}}function D(V,z,J,le,Q){var re=le==="BigNumber",se=le==="Complex",te=re?l(0):0,ae=re?l(1):se?E(1):1,fe=re?l(1):1,ne=re?l(10):2,be=i(ne,ne),$e;Q&&($e=Array(z).fill(ae));for(var k=!1;!k;){k=!0;for(var W=0;W<z;W++){for(var ue=te,j=te,K=0;K<z;K++)W!==K&&(ue=r(ue,s(V[K][W])),j=r(j,s(V[W][K])));if(!h(ue,0)&&!h(j,0)){for(var oe=fe,he=ue,me=o(j,ne),I=i(j,ne);w(he,me);)he=i(he,be),oe=i(oe,ne);for(;g(he,I);)he=o(he,be),oe=o(oe,ne);var H=w(o(r(he,j),oe),i(r(ue,j),.95));if(H){k=!1;for(var ie=o(1,oe),ce=0;ce<z;ce++)W!==ce&&(V[W][ce]=i(V[W][ce],ie),V[ce][W]=i(V[ce][W],oe));Q&&($e[W]=i($e[W],ie))}}}}return Q?c($e):null}function S(V,z,J,le,Q,re){var se=le==="BigNumber",te=le==="Complex",ae=se?l(0):te?E(0):0;se&&(J=l(J));for(var fe=0;fe<z-2;fe++){for(var ne=0,be=ae,$e=fe+1;$e<z;$e++){var k=V[$e][fe];w(s(be),s(k))&&(be=k,ne=$e)}if(!w(s(be),J)){if(ne!==fe+1){var W=V[ne];V[ne]=V[fe+1],V[fe+1]=W;for(var ue=0;ue<z;ue++){var j=V[ue][ne];V[ue][ne]=V[ue][fe+1],V[ue][fe+1]=j}if(Q){var K=re[ne];re[ne]=re[fe+1],re[fe+1]=K}}for(var oe=fe+2;oe<z;oe++){var he=o(V[oe][fe],be);if(he!==0){for(var me=0;me<z;me++)V[oe][me]=t(V[oe][me],i(he,V[fe+1][me]));for(var I=0;I<z;I++)V[I][fe+1]=r(V[I][fe+1],i(he,V[I][oe]));if(Q)for(var H=0;H<z;H++)re[oe][H]=t(re[oe][H],i(he,re[fe+1][H]))}}}}return re}function N(V,z,J,le,Q){var re=le==="BigNumber",se=le==="Complex",te=re?l(1):se?E(1):1;re&&(J=l(J));for(var ae=Ge(V),fe=[],ne=z,be=[],$e=Q?c(Array(z).fill(te)):void 0,k=Q?c(Array(ne).fill(te)):void 0,W=0;W<=100;){W+=1;for(var ue=ae[ne-1][ne-1],j=0;j<ne;j++)ae[j][j]=t(ae[j][j],ue);var{Q:K,R:oe}=m(ae);ae=a(oe,K);for(var he=0;he<ne;he++)ae[he][he]=r(ae[he][he],ue);if(Q&&(k=a(k,K)),ne===1||w(s(ae[ne-1][ne-2]),J)){W=0,fe.push(ae[ne-1][ne-1]),Q&&(be.unshift([[1]]),P(k,z),$e=a($e,k),ne>1&&(k=c(Array(ne-1).fill(te)))),ne-=1,ae.pop();for(var me=0;me<ne;me++)ae[me].pop()}else if(ne===2||w(s(ae[ne-2][ne-3]),J)){W=0;var I=M(ae[ne-2][ne-2],ae[ne-2][ne-1],ae[ne-1][ne-2],ae[ne-1][ne-1]);fe.push(...I),Q&&(be.unshift(B(ae[ne-2][ne-2],ae[ne-2][ne-1],ae[ne-1][ne-2],ae[ne-1][ne-1],I[0],I[1],J,le)),P(k,z),$e=a($e,k),ne>2&&(k=c(Array(ne-2).fill(te)))),ne-=2,ae.pop(),ae.pop();for(var H=0;H<ne;H++)ae[H].pop(),ae[H].pop()}if(ne===0)break}if(fe.sort((ve,de)=>+t(s(ve),s(de))),W>100){var ie=Error("The eigenvalues failed to converge. Only found these eigenvalues: "+fe.join(", "));throw ie.values=fe,ie.vectors=[],ie}var ce=Q?a($e,R(be,z)):void 0;return{values:fe,C:ce}}function C(V,z,J,le,Q,re,se){var te=v(J),ae=a(te,V,J),fe=se==="BigNumber",ne=se==="Complex",be=fe?l(0):ne?E(0):0,$e=fe?l(1):ne?E(1):1,k=[],W=[];for(var ue of Q){var j=_(k,ue,h);j===-1?(k.push(ue),W.push(1)):W[j]+=1}for(var K=[],oe=k.length,he=Array(z).fill(be),me=c(Array(z).fill($e)),I=function(){var ce=k[H],ve=t(ae,a(ce,me)),de=y(ve,he);for(de.shift();de.length<W[H];){var Se=O(ve,z,de,re,se);if(Se===null)break;de.push(Se)}var xe=a(v(le),J);de=de.map(Me=>a(xe,Me)),K.push(...de.map(Me=>({value:ce,vector:n(Me)})))},H=0;H<oe;H++)I();return K}function M(V,z,J,le){var Q=r(V,le),re=t(i(V,le),i(z,J)),se=i(Q,.5),te=i(u(t(i(Q,Q),i(4,re))),.5);return[r(se,te),t(se,te)]}function B(V,z,J,le,Q,re,se,te){var ae=te==="BigNumber",fe=te==="Complex",ne=ae?l(0):fe?E(0):0,be=ae?l(1):fe?E(1):1;if(w(s(J),se))return[[be,ne],[ne,be]];if(g(s(t(Q,re)),se))return[[t(Q,le),t(re,le)],[J,J]];var $e=t(V,Q),k=t(le,Q);return w(s(z),se)&&w(s(k),se)?[[$e,be],[J,ne]]:[[z,ne],[k,be]]}function P(V,z){for(var J=0;J<V.length;J++)V[J].push(...Array(z-V[J].length).fill(0));for(var le=V.length;le<z;le++)V.push(Array(z).fill(0)),V[le][le]=1;return V}function R(V,z){for(var J=[],le=0;le<z;le++)J[le]=Array(z).fill(0);var Q=0;for(var re of V){for(var se=re.length,te=0;te<se;te++)for(var ae=0;ae<se;ae++)J[Q+te][Q+ae]=re[te][ae];Q+=se}return J}function _(V,z,J){for(var le=0;le<V.length;le++)if(J(V[le],z))return le;return-1}function O(V,z,J,le,Q){for(var re=Q==="BigNumber"?l(1e3):1e3,se,te=0;te<5;++te){se=U(z,J,Q);try{se=d(V,se)}catch{continue}if(g(q(se),re))break}if(te>=5)return null;for(te=0;;){var ae=d(V,se);if(w(q(F(se,[ae])),le))break;if(++te>=10)return null;se=Y(ae)}return se}function U(V,z,J){var le=J==="BigNumber",Q=J==="Complex",re=Array(V).fill(0).map(se=>2*Math.random()-1);return le&&(re=re.map(se=>l(se))),Q&&(re=re.map(se=>E(se))),re=F(re,z),Y(re,J)}function F(V,z){var J=f(V);for(var le of z)le=p(le,J),V=t(V,a(o(b(le,V),b(le,le)),le));return V}function q(V){return s(u(b(V,V)))}function Y(V,z){var J=z==="BigNumber",le=z==="Complex",Q=J?l(1):le?E(1):1;return a(o(Q,q(V)),V)}return A}function fee(e){var{config:r,addScalar:t,subtract:n,abs:a,atan:i,cos:o,sin:u,multiplyScalar:s,inv:l,bignumber:c,multiply:f,add:p}=e;function v(S,N){var C=arguments.length>2&&arguments[2]!==void 0?arguments[2]:r.epsilon,M=arguments.length>3?arguments[3]:void 0,B=arguments.length>4?arguments[4]:void 0;if(M==="number")return m(S,C,B);if(M==="BigNumber")return d(S,C,B);throw TypeError("Unsupported data type: "+M)}function m(S,N,C){var M=S.length,B=Math.abs(N/M),P,R;if(C){R=new Array(M);for(var _=0;_<M;_++)R[_]=Array(M).fill(0),R[_][_]=1}for(var O=b(S);Math.abs(O[1])>=Math.abs(B);){var U=O[0][0],F=O[0][1];P=y(S[U][U],S[F][F],S[U][F]),S=x(S,P,U,F),C&&(R=E(R,P,U,F)),O=b(S)}for(var q=Array(M).fill(0),Y=0;Y<M;Y++)q[Y]=S[Y][Y];return D(Ge(q),R,C)}function d(S,N,C){var M=S.length,B=a(N/M),P,R;if(C){R=new Array(M);for(var _=0;_<M;_++)R[_]=Array(M).fill(0),R[_][_]=1}for(var O=A(S);a(O[1])>=a(B);){var U=O[0][0],F=O[0][1];P=h(S[U][U],S[F][F],S[U][F]),S=w(S,P,U,F),C&&(R=g(R,P,U,F)),O=A(S)}for(var q=Array(M).fill(0),Y=0;Y<M;Y++)q[Y]=S[Y][Y];return D(Ge(q),R,C)}function y(S,N,C){var M=N-S;return Math.abs(M)<=r.epsilon?Math.PI/4:.5*Math.atan(2*C/(N-S))}function h(S,N,C){var M=n(N,S);return a(M)<=r.epsilon?c(-1).acos().div(4):s(.5,i(f(2,C,l(M))))}function E(S,N,C,M){for(var B=S.length,P=Math.cos(N),R=Math.sin(N),_=Array(B).fill(0),O=Array(B).fill(0),U=0;U<B;U++)_[U]=P*S[U][C]-R*S[U][M],O[U]=R*S[U][C]+P*S[U][M];for(var F=0;F<B;F++)S[F][C]=_[F],S[F][M]=O[F];return S}function g(S,N,C,M){for(var B=S.length,P=o(N),R=u(N),_=Array(B).fill(c(0)),O=Array(B).fill(c(0)),U=0;U<B;U++)_[U]=n(s(P,S[U][C]),s(R,S[U][M])),O[U]=t(s(R,S[U][C]),s(P,S[U][M]));for(var F=0;F<B;F++)S[F][C]=_[F],S[F][M]=O[F];return S}function w(S,N,C,M){for(var B=S.length,P=c(o(N)),R=c(u(N)),_=s(P,P),O=s(R,R),U=Array(B).fill(c(0)),F=Array(B).fill(c(0)),q=f(c(2),P,R,S[C][M]),Y=t(n(s(_,S[C][C]),q),s(O,S[M][M])),V=p(s(O,S[C][C]),q,s(_,S[M][M])),z=0;z<B;z++)U[z]=n(s(P,S[C][z]),s(R,S[M][z])),F[z]=t(s(R,S[C][z]),s(P,S[M][z]));S[C][C]=Y,S[M][M]=V,S[C][M]=c(0),S[M][C]=c(0);for(var J=0;J<B;J++)J!==C&&J!==M&&(S[C][J]=U[J],S[J][C]=U[J],S[M][J]=F[J],S[J][M]=F[J]);return S}function x(S,N,C,M){for(var B=S.length,P=Math.cos(N),R=Math.sin(N),_=P*P,O=R*R,U=Array(B).fill(0),F=Array(B).fill(0),q=_*S[C][C]-2*P*R*S[C][M]+O*S[M][M],Y=O*S[C][C]+2*P*R*S[C][M]+_*S[M][M],V=0;V<B;V++)U[V]=P*S[C][V]-R*S[M][V],F[V]=R*S[C][V]+P*S[M][V];S[C][C]=q,S[M][M]=Y,S[C][M]=0,S[M][C]=0;for(var z=0;z<B;z++)z!==C&&z!==M&&(S[C][z]=U[z],S[z][C]=U[z],S[M][z]=F[z],S[z][M]=F[z]);return S}function b(S){for(var N=S.length,C=0,M=[0,1],B=0;B<N;B++)for(var P=B+1;P<N;P++)Math.abs(C)<Math.abs(S[B][P])&&(C=Math.abs(S[B][P]),M=[B,P]);return[M,C]}function A(S){for(var N=S.length,C=0,M=[0,1],B=0;B<N;B++)for(var P=B+1;P<N;P++)a(C)<a(S[B][P])&&(C=a(S[B][P]),M=[B,P]);return[M,C]}function D(S,N,C){var M=S.length,B=Array(M),P;if(C){P=Array(M);for(var R=0;R<M;R++)P[R]=Array(M)}for(var _=0;_<M;_++){for(var O=0,U=S[0],F=0;F<S.length;F++)a(S[F])<a(U)&&(O=F,U=S[O]);if(B[_]=S.splice(O,1)[0],C)for(var q=0;q<M;q++)P[_][q]=N[q][O],N[q].splice(O,1)}if(!C)return{values:B};var Y=P.map((V,z)=>({value:B[z],vector:V}));return{values:B,eigenvectors:Y}}return v}var pee="eigs",vee=["config","typed","matrix","addScalar","equal","subtract","abs","atan","cos","sin","multiplyScalar","divideScalar","inv","bignumber","multiply","add","larger","column","flatten","number","complex","sqrt","diag","size","reshape","qr","usolve","usolveAll","im","re","smaller","matrixFromColumns","dot"],dee=L(pee,vee,e=>{var{config:r,typed:t,matrix:n,addScalar:a,subtract:i,equal:o,abs:u,atan:s,cos:l,sin:c,multiplyScalar:f,divideScalar:p,inv:v,bignumber:m,multiply:d,add:y,larger:h,column:E,flatten:g,number:w,complex:x,sqrt:b,diag:A,size:D,reshape:S,qr:N,usolve:C,usolveAll:M,im:B,re:P,smaller:R,matrixFromColumns:_,dot:O}=e,U=fee({config:r,addScalar:a,subtract:i,column:E,flatten:g,equal:o,abs:u,atan:s,cos:l,sin:c,multiplyScalar:f,inv:v,bignumber:m,complex:x,multiply:d,add:y}),F=cee({config:r,addScalar:a,subtract:i,multiply:d,multiplyScalar:f,flatten:g,divideScalar:p,sqrt:b,abs:u,bignumber:m,diag:A,size:D,reshape:S,qr:N,inv:v,usolve:C,usolveAll:M,equal:o,complex:x,larger:h,smaller:R,matrixFromColumns:_,dot:O});return t("eigs",{Array:function(re){return q(n(re))},"Array, number|BigNumber":function(re,se){return q(n(re),{precision:se})},"Array, Object"(Q,re){return q(n(Q),re)},Matrix:function(re){return q(re,{matricize:!0})},"Matrix, number|BigNumber":function(re,se){return q(re,{precision:se,matricize:!0})},"Matrix, Object":function(re,se){var te={matricize:!0};return kr(te,se),q(re,te)}});function q(Q){var re,se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},te="eigenvectors"in se?se.eigenvectors:!0,ae=(re=se.precision)!==null&&re!==void 0?re:r.epsilon,fe=Y(Q,ae,te);return se.matricize&&(fe.values=n(fe.values),te&&(fe.eigenvectors=fe.eigenvectors.map(ne=>{var{value:be,vector:$e}=ne;return{value:be,vector:n($e)}}))),te&&Object.defineProperty(fe,"vectors",{enumerable:!1,get:()=>{throw new Error("eigs(M).vectors replaced with eigs(M).eigenvectors")}}),fe}function Y(Q,re,se){var te=Q.toArray(),ae=Q.size();if(ae.length!==2||ae[0]!==ae[1])throw new RangeError("Matrix must be square (size: ".concat(er(ae),")"));var fe=ae[0];if(z(te,fe,re)&&(J(te,fe),V(te,fe,re))){var ne=le(Q,te,fe);return U(te,fe,re,ne,se)}var be=le(Q,te,fe);return F(te,fe,re,be,se)}function V(Q,re,se){for(var te=0;te<re;te++)for(var ae=te;ae<re;ae++)if(h(m(u(i(Q[te][ae],Q[ae][te]))),se))return!1;return!0}function z(Q,re,se){for(var te=0;te<re;te++)for(var ae=0;ae<re;ae++)if(h(m(u(B(Q[te][ae]))),se))return!1;return!0}function J(Q,re){for(var se=0;se<re;se++)for(var te=0;te<re;te++)Q[se][te]=P(Q[se][te])}function le(Q,re,se){var te=Q.datatype();if(te==="number"||te==="BigNumber"||te==="Complex")return te;for(var ae=!1,fe=!1,ne=!1,be=0;be<se;be++)for(var $e=0;$e<se;$e++){var k=re[be][$e];if(Ke(k)||mo(k))ae=!0;else if(Je(k))fe=!0;else if(dn(k))ne=!0;else throw TypeError("Unsupported type in Matrix: "+Dr(k))}if(fe&&ne&&console.warn("Complex BigNumbers not supported, this operation will lose precission."),ne){for(var W=0;W<se;W++)for(var ue=0;ue<se;ue++)re[W][ue]=x(re[W][ue]);return"Complex"}if(fe){for(var j=0;j<se;j++)for(var K=0;K<se;K++)re[j][K]=m(re[j][K]);return"BigNumber"}if(ae){for(var oe=0;oe<se;oe++)for(var he=0;he<se;he++)re[oe][he]=w(re[oe][he]);return"number"}else throw TypeError("Matrix contains unsupported types only.")}}),Zh="expm",mee=["typed","abs","add","identity","inv","multiply"],hee=L(Zh,mee,e=>{var{typed:r,abs:t,add:n,identity:a,inv:i,multiply:o}=e;return r(Zh,{Matrix:function(f){var p=f.size();if(p.length!==2||p[0]!==p[1])throw new RangeError("Matrix must be square (size: "+er(p)+")");for(var v=p[0],m=1e-15,d=u(f),y=s(d,m),h=y.q,E=y.j,g=o(f,Math.pow(2,-E)),w=a(v),x=a(v),b=1,A=g,D=-1,S=1;S<=h;S++)S>1&&(A=o(A,g),D=-D),b=b*(h-S+1)/((2*h-S+1)*S),w=n(w,o(b,A)),x=n(x,o(b*D,A));for(var N=o(i(x),w),C=0;C<E;C++)N=o(N,N);return Wn(f)?f.createSparseMatrix(N):N}});function u(c){for(var f=c.size()[0],p=0,v=0;v<f;v++){for(var m=0,d=0;d<f;d++)m+=t(c.get([v,d]));p=Math.max(m,p)}return p}function s(c,f){for(var p=30,v=0;v<p;v++)for(var m=0;m<=v;m++){var d=v-m;if(l(c,m,d)<f)return{q:m,j:d}}throw new Error("Could not find acceptable parameters to compute the matrix exponential (try increasing maxSearchSize in expm.js)")}function l(c,f,p){for(var v=1,m=2;m<=f;m++)v*=m;for(var d=v,y=f+1;y<=2*f;y++)d*=y;var h=d*(2*f+1);return 8*Math.pow(c/Math.pow(2,p),2*f)*v*v/(d*h)}}),Yh="sqrtm",gee=["typed","abs","add","multiply","map","sqrt","subtract","inv","size","max","identity"],yee=L(Yh,gee,e=>{var{typed:r,abs:t,add:n,multiply:a,map:i,sqrt:o,subtract:u,inv:s,size:l,max:c,identity:f}=e,p=1e3,v=1e-6;function m(d){var y,h=0,E=d,g=f(l(d));do{var w=E;if(E=a(.5,n(w,s(g))),g=a(.5,n(g,s(w))),y=c(t(u(E,w))),y>v&&++h>p)throw new Error("computing square root of matrix: iterative method could not converge")}while(y>v);return E}return r(Yh,{"Array | Matrix":function(y){var h=ke(y)?y.size():Xe(y);switch(h.length){case 1:if(h[0]===1)return i(y,o);throw new RangeError("Matrix must be square (size: "+er(h)+")");case 2:{var E=h[0],g=h[1];if(E===g)return m(y);throw new RangeError("Matrix must be square (size: "+er(h)+")")}default:throw new RangeError("Matrix must be at most two dimensional (size: "+er(h)+")")}}})}),Xh="sylvester",bee=["typed","schur","matrixFromColumns","matrix","multiply","range","concat","transpose","index","subset","add","subtract","identity","lusolve","abs"],xee=L(Xh,bee,e=>{var{typed:r,schur:t,matrixFromColumns:n,matrix:a,multiply:i,range:o,concat:u,transpose:s,index:l,subset:c,add:f,subtract:p,identity:v,lusolve:m,abs:d}=e;return r(Xh,{"Matrix, Matrix, Matrix":y,"Array, Matrix, Matrix":function(E,g,w){return y(a(E),g,w)},"Array, Array, Matrix":function(E,g,w){return y(a(E),a(g),w)},"Array, Matrix, Array":function(E,g,w){return y(a(E),g,a(w))},"Matrix, Array, Matrix":function(E,g,w){return y(E,a(g),w)},"Matrix, Array, Array":function(E,g,w){return y(E,a(g),a(w))},"Matrix, Matrix, Array":function(E,g,w){return y(E,g,a(w))},"Array, Array, Array":function(E,g,w){return y(a(E),a(g),a(w)).toArray()}});function y(h,E,g){for(var w=E.size()[0],x=h.size()[0],b=t(h),A=b.T,D=b.U,S=t(i(-1,E)),N=S.T,C=S.U,M=i(i(s(D),g),C),B=o(0,x),P=[],R=(ne,be)=>u(ne,be,1),_=(ne,be)=>u(ne,be,0),O=0;O<w;O++)if(O<w-1&&d(c(N,l(O+1,O)))>1e-5){for(var U=_(c(M,l(B,O)),c(M,l(B,O+1))),F=0;F<O;F++)U=f(U,_(i(P[F],c(N,l(F,O))),i(P[F],c(N,l(F,O+1)))));var q=i(v(x),i(-1,c(N,l(O,O)))),Y=i(v(x),i(-1,c(N,l(O+1,O)))),V=i(v(x),i(-1,c(N,l(O,O+1)))),z=i(v(x),i(-1,c(N,l(O+1,O+1)))),J=_(R(f(A,q),Y),R(V,f(A,z))),le=m(J,U);P[O]=le.subset(l(o(0,x),0)),P[O+1]=le.subset(l(o(x,2*x),0)),O++}else{for(var Q=c(M,l(B,O)),re=0;re<O;re++)Q=f(Q,i(P[re],c(N,l(re,O))));var se=c(N,l(O,O)),te=p(A,i(se,v(x)));P[O]=m(te,Q)}var ae=a(n(...P)),fe=i(D,i(ae,s(C)));return fe}}),Kh="schur",wee=["typed","matrix","identity","multiply","qr","norm","subtract"],Eee=L(Kh,wee,e=>{var{typed:r,matrix:t,identity:n,multiply:a,qr:i,norm:o,subtract:u}=e;return r(Kh,{Array:function(c){var f=s(t(c));return{U:f.U.valueOf(),T:f.T.valueOf()}},Matrix:function(c){return s(c)}});function s(l){var c=l.size()[0],f=l,p=n(c),v=0,m;do{m=f;var d=i(f),y=d.Q,h=d.R;if(f=a(h,y),p=a(p,y),v++>100)break}while(o(u(f,m))>1e-4);return{U:p,T:f}}}),Jh="lyap",See=["typed","matrix","sylvester","multiply","transpose"],Aee=L(Jh,See,e=>{var{typed:r,matrix:t,sylvester:n,multiply:a,transpose:i}=e;return r(Jh,{"Matrix, Matrix":function(u,s){return n(u,i(u),a(-1,s))},"Array, Matrix":function(u,s){return n(t(u),i(t(u)),a(-1,s))},"Matrix, Array":function(u,s){return n(u,i(t(u)),t(a(-1,s)))},"Array, Array":function(u,s){return n(t(u),i(t(u)),t(a(-1,s))).toArray()}})}),Dee="divide",Nee=["typed","matrix","multiply","equalScalar","divideScalar","inv"],Cee=L(Dee,Nee,e=>{var{typed:r,matrix:t,multiply:n,equalScalar:a,divideScalar:i,inv:o}=e,u=Jr({typed:r,equalScalar:a}),s=Kt({typed:r});return r("divide",t2({"Array | Matrix, Array | Matrix":function(c,f){return n(c,o(f))},"DenseMatrix, any":function(c,f){return s(c,f,i,!1)},"SparseMatrix, any":function(c,f){return u(c,f,i,!1)},"Array, any":function(c,f){return s(t(c),f,i,!1).valueOf()},"any, Array | Matrix":function(c,f){return n(c,o(f))}},i.signatures))}),Qh="distance",Mee=["typed","addScalar","subtractScalar","divideScalar","multiplyScalar","deepEqual","sqrt","abs"],Tee=L(Qh,Mee,e=>{var{typed:r,addScalar:t,subtractScalar:n,multiplyScalar:a,divideScalar:i,deepEqual:o,sqrt:u,abs:s}=e;return r(Qh,{"Array, Array, Array":function(x,b,A){if(x.length===2&&b.length===2&&A.length===2){if(!c(x))throw new TypeError("Array with 2 numbers or BigNumbers expected for first argument");if(!c(b))throw new TypeError("Array with 2 numbers or BigNumbers expected for second argument");if(!c(A))throw new TypeError("Array with 2 numbers or BigNumbers expected for third argument");if(o(b,A))throw new TypeError("LinePoint1 should not be same with LinePoint2");var D=n(A[1],b[1]),S=n(b[0],A[0]),N=n(a(A[0],b[1]),a(b[0],A[1]));return y(x[0],x[1],D,S,N)}else throw new TypeError("Invalid Arguments: Try again")},"Object, Object, Object":function(x,b,A){if(Object.keys(x).length===2&&Object.keys(b).length===2&&Object.keys(A).length===2){if(!c(x))throw new TypeError("Values of pointX and pointY should be numbers or BigNumbers");if(!c(b))throw new TypeError("Values of lineOnePtX and lineOnePtY should be numbers or BigNumbers");if(!c(A))throw new TypeError("Values of lineTwoPtX and lineTwoPtY should be numbers or BigNumbers");if(o(m(b),m(A)))throw new TypeError("LinePoint1 should not be same with LinePoint2");if("pointX"in x&&"pointY"in x&&"lineOnePtX"in b&&"lineOnePtY"in b&&"lineTwoPtX"in A&&"lineTwoPtY"in A){var D=n(A.lineTwoPtY,b.lineOnePtY),S=n(b.lineOnePtX,A.lineTwoPtX),N=n(a(A.lineTwoPtX,b.lineOnePtY),a(b.lineOnePtX,A.lineTwoPtY));return y(x.pointX,x.pointY,D,S,N)}else throw new TypeError("Key names do not match")}else throw new TypeError("Invalid Arguments: Try again")},"Array, Array":function(x,b){if(x.length===2&&b.length===3){if(!c(x))throw new TypeError("Array with 2 numbers or BigNumbers expected for first argument");if(!f(b))throw new TypeError("Array with 3 numbers or BigNumbers expected for second argument");return y(x[0],x[1],b[0],b[1],b[2])}else if(x.length===3&&b.length===6){if(!f(x))throw new TypeError("Array with 3 numbers or BigNumbers expected for first argument");if(!v(b))throw new TypeError("Array with 6 numbers or BigNumbers expected for second argument");return h(x[0],x[1],x[2],b[0],b[1],b[2],b[3],b[4],b[5])}else if(x.length===b.length&&x.length>0){if(!p(x))throw new TypeError("All values of an array should be numbers or BigNumbers");if(!p(b))throw new TypeError("All values of an array should be numbers or BigNumbers");return E(x,b)}else throw new TypeError("Invalid Arguments: Try again")},"Object, Object":function(x,b){if(Object.keys(x).length===2&&Object.keys(b).length===3){if(!c(x))throw new TypeError("Values of pointX and pointY should be numbers or BigNumbers");if(!f(b))throw new TypeError("Values of xCoeffLine, yCoeffLine and constant should be numbers or BigNumbers");if("pointX"in x&&"pointY"in x&&"xCoeffLine"in b&&"yCoeffLine"in b&&"constant"in b)return y(x.pointX,x.pointY,b.xCoeffLine,b.yCoeffLine,b.constant);throw new TypeError("Key names do not match")}else if(Object.keys(x).length===3&&Object.keys(b).length===6){if(!f(x))throw new TypeError("Values of pointX, pointY and pointZ should be numbers or BigNumbers");if(!v(b))throw new TypeError("Values of x0, y0, z0, a, b and c should be numbers or BigNumbers");if("pointX"in x&&"pointY"in x&&"x0"in b&&"y0"in b&&"z0"in b&&"a"in b&&"b"in b&&"c"in b)return h(x.pointX,x.pointY,x.pointZ,b.x0,b.y0,b.z0,b.a,b.b,b.c);throw new TypeError("Key names do not match")}else if(Object.keys(x).length===2&&Object.keys(b).length===2){if(!c(x))throw new TypeError("Values of pointOneX and pointOneY should be numbers or BigNumbers");if(!c(b))throw new TypeError("Values of pointTwoX and pointTwoY should be numbers or BigNumbers");if("pointOneX"in x&&"pointOneY"in x&&"pointTwoX"in b&&"pointTwoY"in b)return E([x.pointOneX,x.pointOneY],[b.pointTwoX,b.pointTwoY]);throw new TypeError("Key names do not match")}else if(Object.keys(x).length===3&&Object.keys(b).length===3){if(!f(x))throw new TypeError("Values of pointOneX, pointOneY and pointOneZ should be numbers or BigNumbers");if(!f(b))throw new TypeError("Values of pointTwoX, pointTwoY and pointTwoZ should be numbers or BigNumbers");if("pointOneX"in x&&"pointOneY"in x&&"pointOneZ"in x&&"pointTwoX"in b&&"pointTwoY"in b&&"pointTwoZ"in b)return E([x.pointOneX,x.pointOneY,x.pointOneZ],[b.pointTwoX,b.pointTwoY,b.pointTwoZ]);throw new TypeError("Key names do not match")}else throw new TypeError("Invalid Arguments: Try again")},Array:function(x){if(!d(x))throw new TypeError("Incorrect array format entered for pairwise distance calculation");return g(x)}});function l(w){return typeof w=="number"||Je(w)}function c(w){return w.constructor!==Array&&(w=m(w)),l(w[0])&&l(w[1])}function f(w){return w.constructor!==Array&&(w=m(w)),l(w[0])&&l(w[1])&&l(w[2])}function p(w){return Array.isArray(w)||(w=m(w)),w.every(l)}function v(w){return w.constructor!==Array&&(w=m(w)),l(w[0])&&l(w[1])&&l(w[2])&&l(w[3])&&l(w[4])&&l(w[5])}function m(w){for(var x=Object.keys(w),b=[],A=0;A<x.length;A++)b.push(w[x[A]]);return b}function d(w){if(w[0].length===2&&l(w[0][0])&&l(w[0][1])){if(w.some(x=>x.length!==2||!l(x[0])||!l(x[1])))return!1}else if(w[0].length===3&&l(w[0][0])&&l(w[0][1])&&l(w[0][2])){if(w.some(x=>x.length!==3||!l(x[0])||!l(x[1])||!l(x[2])))return!1}else return!1;return!0}function y(w,x,b,A,D){var S=s(t(t(a(b,w),a(A,x)),D)),N=u(t(a(b,b),a(A,A)));return i(S,N)}function h(w,x,b,A,D,S,N,C,M){var B=[n(a(n(D,x),M),a(n(S,b),C)),n(a(n(S,b),N),a(n(A,w),M)),n(a(n(A,w),C),a(n(D,x),N))];B=u(t(t(a(B[0],B[0]),a(B[1],B[1])),a(B[2],B[2])));var P=u(t(t(a(N,N),a(C,C)),a(M,M)));return i(B,P)}function E(w,x){for(var b=w.length,A=0,D=0,S=0;S<b;S++)D=n(w[S],x[S]),A=t(a(D,D),A);return u(A)}function g(w){for(var x=[],b=[],A=[],D=0;D<w.length-1;D++)for(var S=D+1;S<w.length;S++)w[0].length===2?(b=[w[D][0],w[D][1]],A=[w[S][0],w[S][1]]):w[0].length===3&&(b=[w[D][0],w[D][1],w[D][2]],A=[w[S][0],w[S][1],w[S][2]]),x.push(E(b,A));return x}}),Oee="intersect",_ee=["typed","config","abs","add","addScalar","matrix","multiply","multiplyScalar","divideScalar","subtract","smaller","equalScalar","flatten","isZero","isNumeric"],$ee=L(Oee,_ee,e=>{var{typed:r,config:t,abs:n,add:a,addScalar:i,matrix:o,multiply:u,multiplyScalar:s,divideScalar:l,subtract:c,smaller:f,equalScalar:p,flatten:v,isZero:m,isNumeric:d}=e;return r("intersect",{"Array, Array, Array":y,"Array, Array, Array, Array":h,"Matrix, Matrix, Matrix":function(C,M,B){var P=y(C.valueOf(),M.valueOf(),B.valueOf());return P===null?null:o(P)},"Matrix, Matrix, Matrix, Matrix":function(C,M,B,P){var R=h(C.valueOf(),M.valueOf(),B.valueOf(),P.valueOf());return R===null?null:o(R)}});function y(N,C,M){if(N=E(N),C=E(C),M=E(M),!w(N))throw new TypeError("Array with 3 numbers or BigNumbers expected for first argument");if(!w(C))throw new TypeError("Array with 3 numbers or BigNumbers expected for second argument");if(!x(M))throw new TypeError("Array with 4 numbers expected as third argument");return S(N[0],N[1],N[2],C[0],C[1],C[2],M[0],M[1],M[2],M[3])}function h(N,C,M,B){if(N=E(N),C=E(C),M=E(M),B=E(B),N.length===2){if(!g(N))throw new TypeError("Array with 2 numbers or BigNumbers expected for first argument");if(!g(C))throw new TypeError("Array with 2 numbers or BigNumbers expected for second argument");if(!g(M))throw new TypeError("Array with 2 numbers or BigNumbers expected for third argument");if(!g(B))throw new TypeError("Array with 2 numbers or BigNumbers expected for fourth argument");return b(N,C,M,B)}else if(N.length===3){if(!w(N))throw new TypeError("Array with 3 numbers or BigNumbers expected for first argument");if(!w(C))throw new TypeError("Array with 3 numbers or BigNumbers expected for second argument");if(!w(M))throw new TypeError("Array with 3 numbers or BigNumbers expected for third argument");if(!w(B))throw new TypeError("Array with 3 numbers or BigNumbers expected for fourth argument");return D(N[0],N[1],N[2],C[0],C[1],C[2],M[0],M[1],M[2],B[0],B[1],B[2])}else throw new TypeError("Arrays with two or thee dimensional points expected")}function E(N){return N.length===1?N[0]:N.length>1&&Array.isArray(N[0])&&N.every(C=>Array.isArray(C)&&C.length===1)?v(N):N}function g(N){return N.length===2&&d(N[0])&&d(N[1])}function w(N){return N.length===3&&d(N[0])&&d(N[1])&&d(N[2])}function x(N){return N.length===4&&d(N[0])&&d(N[1])&&d(N[2])&&d(N[3])}function b(N,C,M,B){var P=N,R=M,_=c(P,C),O=c(R,B),U=c(s(_[0],O[1]),s(O[0],_[1]));if(m(U)||f(n(U),t.epsilon))return null;var F=s(O[0],P[1]),q=s(O[1],P[0]),Y=s(O[0],R[1]),V=s(O[1],R[0]),z=l(i(c(c(F,q),Y),V),U);return a(u(_,z),P)}function A(N,C,M,B,P,R,_,O,U,F,q,Y){var V=s(c(N,C),c(M,B)),z=s(c(P,R),c(_,O)),J=s(c(U,F),c(q,Y));return i(i(V,z),J)}function D(N,C,M,B,P,R,_,O,U,F,q,Y){var V=A(N,_,F,_,C,O,q,O,M,U,Y,U),z=A(F,_,B,N,q,O,P,C,Y,U,R,M),J=A(N,_,B,N,C,O,P,C,M,U,R,M),le=A(F,_,F,_,q,O,q,O,Y,U,Y,U),Q=A(B,N,B,N,P,C,P,C,R,M,R,M),re=c(s(V,z),s(J,le)),se=c(s(Q,le),s(z,z));if(m(se))return null;var te=l(re,se),ae=l(i(V,s(te,z)),le),fe=i(N,s(te,c(B,N))),ne=i(C,s(te,c(P,C))),be=i(M,s(te,c(R,M))),$e=i(_,s(ae,c(F,_))),k=i(O,s(ae,c(q,O))),W=i(U,s(ae,c(Y,U)));return p(fe,$e)&&p(ne,k)&&p(be,W)?[fe,ne,be]:null}function S(N,C,M,B,P,R,_,O,U,F){var q=s(N,_),Y=s(B,_),V=s(C,O),z=s(P,O),J=s(M,U),le=s(R,U),Q=c(c(c(F,q),V),J),re=c(c(c(i(i(Y,z),le),q),V),J),se=l(Q,re),te=i(N,s(se,c(B,N))),ae=i(C,s(se,c(P,C))),fe=i(M,s(se,c(R,M)));return[te,ae,fe]}}),e1="sum",Fee=["typed","config","add","numeric"],tx=L(e1,Fee,e=>{var{typed:r,config:t,add:n,numeric:a}=e;return r(e1,{"Array | Matrix":i,"Array | Matrix, number | BigNumber":o,"...":function(s){if(yi(s))throw new TypeError("Scalar values expected in function sum");return i(s)}});function i(u){var s;return yn(u,function(l){try{s=s===void 0?l:n(s,l)}catch(c){throw lt(c,"sum",l)}}),s===void 0&&(s=a(0,t.number)),typeof s=="string"&&(s=a(s,t.number)),s}function o(u,s){try{var l=wu(u,s,n);return l}catch(c){throw lt(c,"sum")}}}),rs="cumsum",Bee=["typed","add","unaryPlus"],nx=L(rs,Bee,e=>{var{typed:r,add:t,unaryPlus:n}=e;return r(rs,{Array:a,Matrix:function(l){return l.create(a(l.valueOf()))},"Array, number | BigNumber":o,"Matrix, number | BigNumber":function(l,c){return l.create(o(l.valueOf(),c))},"...":function(l){if(yi(l))throw new TypeError("All values expected to be scalar in function cumsum");return a(l)}});function a(s){try{return i(s)}catch(l){throw lt(l,rs)}}function i(s){if(s.length===0)return[];for(var l=[n(s[0])],c=1;c<s.length;++c)l.push(t(l[c-1],s[c]));return l}function o(s,l){var c=Xe(s);if(l<0||l>=c.length)throw new Yt(l,c.length);try{return u(s,l)}catch(f){throw lt(f,rs)}}function u(s,l){var c,f,p;if(l<=0){var v=s[0][0];if(Array.isArray(v)){for(p=P2(s),f=[],c=0;c<p.length;c++)f[c]=u(p[c],l-1);return f}else return i(s)}else{for(f=[],c=0;c<s.length;c++)f[c]=u(s[c],l-1);return f}}}),r1="mean",Ree=["typed","add","divide"],ax=L(r1,Ree,e=>{var{typed:r,add:t,divide:n}=e;return r(r1,{"Array | Matrix":i,"Array | Matrix, number | BigNumber":a,"...":function(u){if(yi(u))throw new TypeError("Scalar values expected in function mean");return i(u)}});function a(o,u){try{var s=wu(o,u,t),l=Array.isArray(o)?Xe(o):o.size();return n(s,l[u])}catch(c){throw lt(c,"mean")}}function i(o){var u,s=0;if(yn(o,function(l){try{u=u===void 0?l:t(u,l),s++}catch(c){throw lt(c,"mean",l)}}),s===0)throw new Error("Cannot calculate the mean of an empty array");return n(u,s)}}),t1="median",Pee=["typed","add","divide","compare","partitionSelect"],zee=L(t1,Pee,e=>{var{typed:r,add:t,divide:n,compare:a,partitionSelect:i}=e;function o(l){try{l=dr(l.valueOf());var c=l.length;if(c===0)throw new Error("Cannot calculate median of an empty array");if(c%2===0){for(var f=c/2-1,p=i(l,f+1),v=l[f],m=0;m<f;++m)a(l[m],v)>0&&(v=l[m]);return s(v,p)}else{var d=i(l,(c-1)/2);return u(d)}}catch(y){throw lt(y,"median")}}var u=r({"number | BigNumber | Complex | Unit":function(c){return c}}),s=r({"number | BigNumber | Complex | Unit, number | BigNumber | Complex | Unit":function(c,f){return n(t(c,f),2)}});return r(t1,{"Array | Matrix":o,"Array | Matrix, number | BigNumber":function(c,f){throw new Error("median(A, dim) is not yet supported")},"...":function(c){if(yi(c))throw new TypeError("Scalar values expected in function median");return o(c)}})}),n1="mad",Iee=["typed","abs","map","median","subtract"],Lee=L(n1,Iee,e=>{var{typed:r,abs:t,map:n,median:a,subtract:i}=e;return r(n1,{"Array | Matrix":o,"...":function(s){return o(s)}});function o(u){if(u=dr(u.valueOf()),u.length===0)throw new Error("Cannot calculate median absolute deviation (mad) of an empty array");try{var s=a(u);return a(n(u,function(l){return t(i(l,s))}))}catch(l){throw l instanceof TypeError&&l.message.indexOf("median")!==-1?new TypeError(l.message.replace("median","mad")):lt(l,"mad")}}}),yl="unbiased",a1="variance",qee=["typed","add","subtract","multiply","divide","apply","isNaN"],ix=L(a1,qee,e=>{var{typed:r,add:t,subtract:n,multiply:a,divide:i,apply:o,isNaN:u}=e;return r(a1,{"Array | Matrix":function(f){return s(f,yl)},"Array | Matrix, string":s,"Array | Matrix, number | BigNumber":function(f,p){return l(f,p,yl)},"Array | Matrix, number | BigNumber, string":l,"...":function(f){return s(f,yl)}});function s(c,f){var p,v=0;if(c.length===0)throw new SyntaxError("Function variance requires one or more parameters (0 provided)");if(yn(c,function(y){try{p=p===void 0?y:t(p,y),v++}catch(h){throw lt(h,"variance",y)}}),v===0)throw new Error("Cannot calculate variance of an empty array");var m=i(p,v);if(p=void 0,yn(c,function(y){var h=n(y,m);p=p===void 0?a(h,h):t(p,a(h,h))}),u(p))return p;switch(f){case"uncorrected":return i(p,v);case"biased":return i(p,v+1);case"unbiased":{var d=Je(p)?p.mul(0):0;return v===1?d:i(p,v-1)}default:throw new Error('Unknown normalization "'+f+'". Choose "unbiased" (default), "uncorrected", or "biased".')}}function l(c,f,p){try{if(c.length===0)throw new SyntaxError("Function variance requires one or more parameters (0 provided)");return o(c,f,v=>s(v,p))}catch(v){throw lt(v,"variance")}}}),i1="quantileSeq",kee=["typed","?bignumber","add","subtract","divide","multiply","partitionSelect","compare","isInteger","smaller","smallerEq","larger"],ox=L(i1,kee,e=>{var{typed:r,bignumber:t,add:n,subtract:a,divide:i,multiply:o,partitionSelect:u,compare:s,isInteger:l,smaller:c,smallerEq:f,larger:p}=e,v=Sf({typed:r,isInteger:l});return r(i1,{"Array | Matrix, number | BigNumber":(E,g)=>d(E,g,!1),"Array | Matrix, number | BigNumber, number":(E,g,w)=>m(E,g,!1,w,d),"Array | Matrix, number | BigNumber, boolean":d,"Array | Matrix, number | BigNumber, boolean, number":(E,g,w,x)=>m(E,g,w,x,d),"Array | Matrix, Array | Matrix":(E,g)=>y(E,g,!1),"Array | Matrix, Array | Matrix, number":(E,g,w)=>m(E,g,!1,w,y),"Array | Matrix, Array | Matrix, boolean":y,"Array | Matrix, Array | Matrix, boolean, number":(E,g,w,x)=>m(E,g,w,x,y)});function m(E,g,w,x,b){return v(E,x,A=>b(A,g,w))}function d(E,g,w){var x,b=E.valueOf();if(c(g,0))throw new Error("N/prob must be non-negative");if(f(g,1))return Ke(g)?h(b,g,w):t(h(b,g,w));if(p(g,1)){if(!l(g))throw new Error("N must be a positive integer");if(p(g,4294967295))throw new Error("N must be less than or equal to 2^32-1, as that is the maximum length of an Array");var A=n(g,1);x=[];for(var D=0;c(D,g);D++){var S=i(D+1,A);x.push(h(b,S,w))}return Ke(g)?x:t(x)}}function y(E,g,w){for(var x=E.valueOf(),b=g.valueOf(),A=[],D=0;D<b.length;++D)A.push(h(x,b[D],w));return A}function h(E,g,w){var x=dr(E),b=x.length;if(b===0)throw new Error("Cannot calculate quantile of an empty sequence");var A=Ke(g)?g*(b-1):g.times(b-1),D=Ke(g)?Math.floor(A):A.floor().toNumber(),S=Ke(g)?A%1:A.minus(D);if(l(A))return w?x[A]:u(x,Ke(g)?A:A.valueOf());var N,C;if(w)N=x[D],C=x[D+1];else{C=u(x,D+1),N=x[D];for(var M=0;M<D;++M)s(x[M],N)>0&&(N=x[M])}return n(o(N,a(1,S)),o(C,S))}}),o1="std",Uee=["typed","map","sqrt","variance"],sx=L(o1,Uee,e=>{var{typed:r,map:t,sqrt:n,variance:a}=e;return r(o1,{"Array | Matrix":i,"Array | Matrix, string":i,"Array | Matrix, number | BigNumber":i,"Array | Matrix, number | BigNumber, string":i,"...":function(u){return i(u)}});function i(o,u){if(o.length===0)throw new SyntaxError("Function std requires one or more parameters (0 provided)");try{var s=a.apply(null,arguments);return Bt(s)?t(s,n):n(s)}catch(l){throw l instanceof TypeError&&l.message.indexOf(" variance")!==-1?new TypeError(l.message.replace(" variance"," std")):l}}}),s1="corr",Hee=["typed","matrix","mean","sqrt","sum","add","subtract","multiply","pow","divide"],jee=L(s1,Hee,e=>{var{typed:r,matrix:t,sqrt:n,sum:a,add:i,subtract:o,multiply:u,pow:s,divide:l}=e;return r(s1,{"Array, Array":function(v,m){return c(v,m)},"Matrix, Matrix":function(v,m){var d=c(v.toArray(),m.toArray());return Array.isArray(d)?t(d):d}});function c(p,v){var m=[];if(Array.isArray(p[0])&&Array.isArray(v[0])){if(p.length!==v.length)throw new SyntaxError("Dimension mismatch. Array A and B must have the same length.");for(var d=0;d<p.length;d++){if(p[d].length!==v[d].length)throw new SyntaxError("Dimension mismatch. Array A and B must have the same number of elements.");m.push(f(p[d],v[d]))}return m}else{if(p.length!==v.length)throw new SyntaxError("Dimension mismatch. Array A and B must have the same number of elements.");return f(p,v)}}function f(p,v){var m=p.length,d=a(p),y=a(v),h=p.reduce((b,A,D)=>i(b,u(A,v[D])),0),E=a(p.map(b=>s(b,2))),g=a(v.map(b=>s(b,2))),w=o(u(m,h),u(d,y)),x=n(u(o(u(m,E),s(d,2)),o(u(m,g),s(y,2))));return l(w,x)}}),u1="combinations",Vee=["typed"],Gee=L(u1,Vee,e=>{var{typed:r}=e;return r(u1,{"number, number":ib,"BigNumber, BigNumber":function(n,a){var i=n.constructor,o,u,s=n.minus(a),l=new i(1);if(!l1(n)||!l1(a))throw new TypeError("Positive integer value expected in function combinations");if(a.gt(n))throw new TypeError("k must be less than n in function combinations");if(o=l,a.lt(s))for(u=l;u.lte(s);u=u.plus(l))o=o.times(a.plus(u)).dividedBy(u);else for(u=l;u.lte(a);u=u.plus(l))o=o.times(s.plus(u)).dividedBy(u);return o}})});function l1(e){return e.isInteger()&&e.gte(0)}var c1="combinationsWithRep",Wee=["typed"],Zee=L(c1,Wee,e=>{var{typed:r}=e;return r(c1,{"number, number":function(n,a){if(!Pe(n)||n<0)throw new TypeError("Positive integer value expected in function combinationsWithRep");if(!Pe(a)||a<0)throw new TypeError("Positive integer value expected in function combinationsWithRep");if(n<1)throw new TypeError("k must be less than or equal to n + k - 1");if(a<n-1){var i=vn(n,n+a-1);return i/vn(1,a)}var o=vn(a+1,n+a-1);return o/vn(1,n-1)},"BigNumber, BigNumber":function(n,a){var i=n.constructor,o,u,s=new i(1),l=n.minus(s);if(!f1(n)||!f1(a))throw new TypeError("Positive integer value expected in function combinationsWithRep");if(n.lt(s))throw new TypeError("k must be less than or equal to n + k - 1 in function combinationsWithRep");if(o=s,a.lt(l))for(u=s;u.lte(l);u=u.plus(s))o=o.times(a.plus(u)).dividedBy(u);else for(u=s;u.lte(a);u=u.plus(s))o=o.times(l.plus(u)).dividedBy(u);return o}})});function f1(e){return e.isInteger()&&e.gte(0)}var p1="gamma",Yee=["typed","config","multiplyScalar","pow","BigNumber","Complex"],Xee=L(p1,Yee,e=>{var{typed:r,config:t,multiplyScalar:n,pow:a,BigNumber:i,Complex:o}=e;function u(l){if(l.im===0)return Ts(l.re);if(l.re<.5){var c=new o(1-l.re,-l.im),f=new o(Math.PI*l.re,Math.PI*l.im);return new o(Math.PI).div(f.sin()).div(u(c))}l=new o(l.re-1,l.im);for(var p=new o(Za[0],0),v=1;v<Za.length;++v){var m=new o(Za[v],0);p=p.add(m.div(l.add(v)))}var d=new o(l.re+cb+.5,l.im),y=Math.sqrt(2*Math.PI),h=d.pow(l.add(.5)),E=d.neg().exp();return p.mul(y).mul(h).mul(E)}return r(p1,{number:Ts,Complex:u,BigNumber:function(c){if(c.isInteger())return c.isNegative()||c.isZero()?new i(1/0):s(c.minus(1));if(!c.isFinite())return new i(c.isNegative()?NaN:1/0);throw new Error("Integer BigNumber expected")}});function s(l){if(l<8)return new i([1,1,2,6,24,120,720,5040][l]);var c=t.precision+(Math.log(l.toNumber())|0),f=i.clone({precision:c});if(l%2===1)return l.times(s(new i(l-1)));for(var p=l,v=new f(l),m=l.toNumber();p>2;)p-=2,m+=p,v=v.times(m);return new i(v.toPrecision(i.precision))}}),v1="lgamma",Kee=["Complex","typed"],Jee=L(v1,Kee,e=>{var{Complex:r,typed:t}=e,n=7,a=7,i=[-.029550653594771242,.00641025641025641,-.0019175269175269176,.0008417508417508417,-.0005952380952380953,.0007936507936507937,-.002777777777777778,.08333333333333333];return t(v1,{number:Os,Complex:o,BigNumber:function(){throw new Error("mathjs doesn't yet provide an implementation of the algorithm lgamma for BigNumber")}});function o(l){var c=6.283185307179586,f=1.1447298858494002,p=.1;if(l.isNaN())return new r(NaN,NaN);if(l.im===0)return new r(Os(l.re),0);if(l.re>=n||Math.abs(l.im)>=a)return u(l);if(l.re<=p){var v=Hz(c,l.im)*Math.floor(.5*l.re+.25),m=l.mul(Math.PI).sin().log(),d=o(new r(1-l.re,-l.im));return new r(f,v).sub(m).sub(d)}else return l.im>=0?s(l):s(l.conjugate()).conjugate()}function u(l){for(var c=l.sub(.5).mul(l.log()).sub(l).add(fb),f=new r(1,0).div(l),p=f.div(l),v=i[0],m=i[1],d=2*p.re,y=p.re*p.re+p.im*p.im,h=2;h<8;h++){var E=m;m=-y*v+i[h],v=d*v+E}var g=f.mul(p.mul(v).add(m));return c.add(g)}function s(l){var c=0,f=0,p=l;for(l=l.add(1);l.re<=n;){p=p.mul(l);var v=p.im<0?1:0;v!==0&&f===0&&c++,f=v,l=l.add(1)}return u(l).sub(p.log()).sub(new r(0,c*2*Math.PI*1))}}),d1="factorial",Qee=["typed","gamma"],ere=L(d1,Qee,e=>{var{typed:r,gamma:t}=e;return r(d1,{number:function(a){if(a<0)throw new Error("Value must be non-negative");return t(a+1)},BigNumber:function(a){if(a.isNegative())throw new Error("Value must be non-negative");return t(a.plus(1))},"Array | Matrix":r.referToSelf(n=>a=>tr(a,n))})}),m1="kldivergence",rre=["typed","matrix","divide","sum","multiply","map","dotDivide","log","isNumeric"],tre=L(m1,rre,e=>{var{typed:r,matrix:t,divide:n,sum:a,multiply:i,map:o,dotDivide:u,log:s,isNumeric:l}=e;return r(m1,{"Array, Array":function(p,v){return c(t(p),t(v))},"Matrix, Array":function(p,v){return c(p,t(v))},"Array, Matrix":function(p,v){return c(t(p),v)},"Matrix, Matrix":function(p,v){return c(p,v)}});function c(f,p){var v=p.size().length,m=f.size().length;if(v>1)throw new Error("first object must be one dimensional");if(m>1)throw new Error("second object must be one dimensional");if(v!==m)throw new Error("Length of two vectors must be equal");var d=a(f);if(d===0)throw new Error("Sum of elements in first object must be non zero");var y=a(p);if(y===0)throw new Error("Sum of elements in second object must be non zero");var h=n(f,a(f)),E=n(p,a(p)),g=a(i(h,o(u(h,E),w=>s(w))));return l(g)?g:Number.NaN}}),h1="multinomial",nre=["typed","add","divide","multiply","factorial","isInteger","isPositive"],are=L(h1,nre,e=>{var{typed:r,add:t,divide:n,multiply:a,factorial:i,isInteger:o,isPositive:u}=e;return r(h1,{"Array | Matrix":function(l){var c=0,f=1;return yn(l,function(p){if(!o(p)||!u(p))throw new TypeError("Positive integer value expected in function multinomial");c=t(c,p),f=a(f,i(p))}),n(i(c),f)}})}),g1="permutations",ire=["typed","factorial"],ore=L(g1,ire,e=>{var{typed:r,factorial:t}=e;return r(g1,{"number | BigNumber":t,"number, number":function(a,i){if(!Pe(a)||a<0)throw new TypeError("Positive integer value expected in function permutations");if(!Pe(i)||i<0)throw new TypeError("Positive integer value expected in function permutations");if(i>a)throw new TypeError("second argument k must be less than or equal to first argument n");return vn(a-i+1,a)},"BigNumber, BigNumber":function(a,i){var o,u;if(!y1(a)||!y1(i))throw new TypeError("Positive integer value expected in function permutations");if(i.gt(a))throw new TypeError("second argument k must be less than or equal to first argument n");var s=a.mul(0).add(1);for(o=s,u=a.minus(i).plus(1);u.lte(a);u=u.plus(1))o=o.times(u);return o}})});function y1(e){return e.isInteger()&&e.gte(0)}var Of={exports:{}};Of.exports;(function(e){(function(r,t,n){function a(s){var l=this,c=u();l.next=function(){var f=2091639*l.s0+l.c*23283064365386963e-26;return l.s0=l.s1,l.s1=l.s2,l.s2=f-(l.c=f|0)},l.c=1,l.s0=c(" "),l.s1=c(" "),l.s2=c(" "),l.s0-=c(s),l.s0<0&&(l.s0+=1),l.s1-=c(s),l.s1<0&&(l.s1+=1),l.s2-=c(s),l.s2<0&&(l.s2+=1),c=null}function i(s,l){return l.c=s.c,l.s0=s.s0,l.s1=s.s1,l.s2=s.s2,l}function o(s,l){var c=new a(s),f=l&&l.state,p=c.next;return p.int32=function(){return c.next()*4294967296|0},p.double=function(){return p()+(p()*2097152|0)*11102230246251565e-32},p.quick=p,f&&(typeof f=="object"&&i(f,c),p.state=function(){return i(c,{})}),p}function u(){var s=4022871197,l=function(c){c=String(c);for(var f=0;f<c.length;f++){s+=c.charCodeAt(f);var p=.02519603282416938*s;s=p>>>0,p-=s,p*=s,s=p>>>0,p-=s,s+=p*4294967296}return(s>>>0)*23283064365386963e-26};return l}t&&t.exports?t.exports=o:this.alea=o})(ye.commonjsGlobal,e)})(Of);var sre=Of.exports,_f={exports:{}};_f.exports;(function(e){(function(r,t,n){function a(u){var s=this,l="";s.x=0,s.y=0,s.z=0,s.w=0,s.next=function(){var f=s.x^s.x<<11;return s.x=s.y,s.y=s.z,s.z=s.w,s.w^=s.w>>>19^f^f>>>8},u===(u|0)?s.x=u:l+=u;for(var c=0;c<l.length+64;c++)s.x^=l.charCodeAt(c)|0,s.next()}function i(u,s){return s.x=u.x,s.y=u.y,s.z=u.z,s.w=u.w,s}function o(u,s){var l=new a(u),c=s&&s.state,f=function(){return(l.next()>>>0)/4294967296};return f.double=function(){do var p=l.next()>>>11,v=(l.next()>>>0)/4294967296,m=(p+v)/(1<<21);while(m===0);return m},f.int32=l.next,f.quick=f,c&&(typeof c=="object"&&i(c,l),f.state=function(){return i(l,{})}),f}t&&t.exports?t.exports=o:this.xor128=o})(ye.commonjsGlobal,e)})(_f);var ure=_f.exports,$f={exports:{}};$f.exports;(function(e){(function(r,t,n){function a(u){var s=this,l="";s.next=function(){var f=s.x^s.x>>>2;return s.x=s.y,s.y=s.z,s.z=s.w,s.w=s.v,(s.d=s.d+362437|0)+(s.v=s.v^s.v<<4^(f^f<<1))|0},s.x=0,s.y=0,s.z=0,s.w=0,s.v=0,u===(u|0)?s.x=u:l+=u;for(var c=0;c<l.length+64;c++)s.x^=l.charCodeAt(c)|0,c==l.length&&(s.d=s.x<<10^s.x>>>4),s.next()}function i(u,s){return s.x=u.x,s.y=u.y,s.z=u.z,s.w=u.w,s.v=u.v,s.d=u.d,s}function o(u,s){var l=new a(u),c=s&&s.state,f=function(){return(l.next()>>>0)/4294967296};return f.double=function(){do var p=l.next()>>>11,v=(l.next()>>>0)/4294967296,m=(p+v)/(1<<21);while(m===0);return m},f.int32=l.next,f.quick=f,c&&(typeof c=="object"&&i(c,l),f.state=function(){return i(l,{})}),f}t&&t.exports?t.exports=o:this.xorwow=o})(ye.commonjsGlobal,e)})($f);var lre=$f.exports,Ff={exports:{}};Ff.exports;(function(e){(function(r,t,n){function a(u){var s=this;s.next=function(){var c=s.x,f=s.i,p,v;return p=c[f],p^=p>>>7,v=p^p<<24,p=c[f+1&7],v^=p^p>>>10,p=c[f+3&7],v^=p^p>>>3,p=c[f+4&7],v^=p^p<<7,p=c[f+7&7],p=p^p<<13,v^=p^p<<9,c[f]=v,s.i=f+1&7,v};function l(c,f){var p,v=[];if(f===(f|0))v[0]=f;else for(f=""+f,p=0;p<f.length;++p)v[p&7]=v[p&7]<<15^f.charCodeAt(p)+v[p+1&7]<<13;for(;v.length<8;)v.push(0);for(p=0;p<8&&v[p]===0;++p);for(p==8?v[7]=-1:v[p],c.x=v,c.i=0,p=256;p>0;--p)c.next()}l(s,u)}function i(u,s){return s.x=u.x.slice(),s.i=u.i,s}function o(u,s){u==null&&(u=+new Date);var l=new a(u),c=s&&s.state,f=function(){return(l.next()>>>0)/4294967296};return f.double=function(){do var p=l.next()>>>11,v=(l.next()>>>0)/4294967296,m=(p+v)/(1<<21);while(m===0);return m},f.int32=l.next,f.quick=f,c&&(c.x&&i(c,l),f.state=function(){return i(l,{})}),f}t&&t.exports?t.exports=o:this.xorshift7=o})(ye.commonjsGlobal,e)})(Ff);var cre=Ff.exports,Bf={exports:{}};Bf.exports;(function(e){(function(r,t,n){function a(u){var s=this;s.next=function(){var c=s.w,f=s.X,p=s.i,v,m;return s.w=c=c+1640531527|0,m=f[p+34&127],v=f[p=p+1&127],m^=m<<13,v^=v<<17,m^=m>>>15,v^=v>>>12,m=f[p]=m^v,s.i=p,m+(c^c>>>16)|0};function l(c,f){var p,v,m,d,y,h=[],E=128;for(f===(f|0)?(v=f,f=null):(f=f+"\0",v=0,E=Math.max(E,f.length)),m=0,d=-32;d<E;++d)f&&(v^=f.charCodeAt((d+32)%f.length)),d===0&&(y=v),v^=v<<10,v^=v>>>15,v^=v<<4,v^=v>>>13,d>=0&&(y=y+1640531527|0,p=h[d&127]^=v+y,m=p==0?m+1:0);for(m>=128&&(h[(f&&f.length||0)&127]=-1),m=127,d=4*128;d>0;--d)v=h[m+34&127],p=h[m=m+1&127],v^=v<<13,p^=p<<17,v^=v>>>15,p^=p>>>12,h[m]=v^p;c.w=y,c.X=h,c.i=m}l(s,u)}function i(u,s){return s.i=u.i,s.w=u.w,s.X=u.X.slice(),s}function o(u,s){u==null&&(u=+new Date);var l=new a(u),c=s&&s.state,f=function(){return(l.next()>>>0)/4294967296};return f.double=function(){do var p=l.next()>>>11,v=(l.next()>>>0)/4294967296,m=(p+v)/(1<<21);while(m===0);return m},f.int32=l.next,f.quick=f,c&&(c.X&&i(c,l),f.state=function(){return i(l,{})}),f}t&&t.exports?t.exports=o:this.xor4096=o})(ye.commonjsGlobal,e)})(Bf);var fre=Bf.exports,Rf={exports:{}};Rf.exports;(function(e){(function(r,t,n){function a(u){var s=this,l="";s.next=function(){var f=s.b,p=s.c,v=s.d,m=s.a;return f=f<<25^f>>>7^p,p=p-v|0,v=v<<24^v>>>8^m,m=m-f|0,s.b=f=f<<20^f>>>12^p,s.c=p=p-v|0,s.d=v<<16^p>>>16^m,s.a=m-f|0},s.a=0,s.b=0,s.c=-1640531527,s.d=1367130551,u===Math.floor(u)?(s.a=u/4294967296|0,s.b=u|0):l+=u;for(var c=0;c<l.length+20;c++)s.b^=l.charCodeAt(c)|0,s.next()}function i(u,s){return s.a=u.a,s.b=u.b,s.c=u.c,s.d=u.d,s}function o(u,s){var l=new a(u),c=s&&s.state,f=function(){return(l.next()>>>0)/4294967296};return f.double=function(){do var p=l.next()>>>11,v=(l.next()>>>0)/4294967296,m=(p+v)/(1<<21);while(m===0);return m},f.int32=l.next,f.quick=f,c&&(typeof c=="object"&&i(c,l),f.state=function(){return i(l,{})}),f}t&&t.exports?t.exports=o:this.tychei=o})(ye.commonjsGlobal,e)})(Rf);var pre=Rf.exports,ux={exports:{}};const vre=ye.getAugmentedNamespace(tz);(function(e){(function(r,t,n){var a=256,i=6,o=52,u="random",s=n.pow(a,i),l=n.pow(2,o),c=l*2,f=a-1,p;function v(w,x,b){var A=[];x=x==!0?{entropy:!0}:x||{};var D=h(y(x.entropy?[w,g(t)]:w??E(),3),A),S=new m(A),N=function(){for(var C=S.g(i),M=s,B=0;C<l;)C=(C+B)*a,M*=a,B=S.g(1);for(;C>=c;)C/=2,M/=2,B>>>=1;return(C+B)/M};return N.int32=function(){return S.g(4)|0},N.quick=function(){return S.g(4)/4294967296},N.double=N,h(g(S.S),t),(x.pass||b||function(C,M,B,P){return P&&(P.S&&d(P,S),C.state=function(){return d(S,{})}),B?(n[u]=C,M):C})(N,D,"global"in x?x.global:this==n,x.state)}function m(w){var x,b=w.length,A=this,D=0,S=A.i=A.j=0,N=A.S=[];for(b||(w=[b++]);D<a;)N[D]=D++;for(D=0;D<a;D++)N[D]=N[S=f&S+w[D%b]+(x=N[D])],N[S]=x;(A.g=function(C){for(var M,B=0,P=A.i,R=A.j,_=A.S;C--;)M=_[P=f&P+1],B=B*a+_[f&(_[P]=_[R=f&R+M])+(_[R]=M)];return A.i=P,A.j=R,B})(a)}function d(w,x){return x.i=w.i,x.j=w.j,x.S=w.S.slice(),x}function y(w,x){var b=[],A=typeof w,D;if(x&&A=="object")for(D in w)try{b.push(y(w[D],x-1))}catch{}return b.length?b:A=="string"?w:w+"\0"}function h(w,x){for(var b=w+"",A,D=0;D<b.length;)x[f&D]=f&(A^=x[f&D]*19)+b.charCodeAt(D++);return g(x)}function E(){try{var w;return p&&(w=p.randomBytes)?w=w(a):(w=new Uint8Array(a),(r.crypto||r.msCrypto).getRandomValues(w)),g(w)}catch{var x=r.navigator,b=x&&x.plugins;return[+new Date,r,b,r.screen,g(t)]}}function g(w){return String.fromCharCode.apply(0,w)}if(h(n.random(),t),e.exports){e.exports=v;try{p=vre}catch{}}else n["seed"+u]=v})(typeof self<"u"?self:ye.commonjsGlobal,[],Math)})(ux);var dre=ux.exports,mre=sre,hre=ure,gre=lre,yre=cre,bre=fre,xre=pre,ca=dre;ca.alea=mre;ca.xor128=hre;ca.xorwow=gre;ca.xorshift7=yre;ca.xor4096=bre;ca.tychei=xre;var wre=ca;const lx=ye.getDefaultExportFromCjs(wre);var Ere=lx(Date.now());function ri(e){var r;function t(a){r=a===null?Ere:lx(String(a))}t(e);function n(){return r()}return n}var b1="pickRandom",Sre=["typed","config","?on"],Are=L(b1,Sre,e=>{var{typed:r,config:t,on:n}=e,a=ri(t.randomSeed);return n&&n("config",function(o,u){o.randomSeed!==u.randomSeed&&(a=ri(o.randomSeed))}),r(b1,{"Array | Matrix":function(u){return i(u,{})},"Array | Matrix, Object":function(u,s){return i(u,s)},"Array | Matrix, number":function(u,s){return i(u,{number:s})},"Array | Matrix, Array | Matrix":function(u,s){return i(u,{weights:s})},"Array | Matrix, Array | Matrix, number":function(u,s,l){return i(u,{number:l,weights:s})},"Array | Matrix, number, Array | Matrix":function(u,s,l){return i(u,{number:s,weights:l})}});function i(o,u){var{number:s,weights:l,elementWise:c=!0}=u,f=typeof s>"u";f&&(s=1);var p=ke(o)?o.create:ke(l)?l.create:null;o=o.valueOf(),l&&(l=l.valueOf()),c===!0&&(o=dr(o),l=dr(l));var v=0;if(typeof l<"u"){if(l.length!==o.length)throw new Error("Weights must have the same length as possibles");for(var m=0,d=l.length;m<d;m++){if(!Ke(l[m])||l[m]<0)throw new Error("Weights must be an array of positive numbers");v+=l[m]}}for(var y=o.length,h=[],E;h.length<s;){if(typeof l>"u")E=o[Math.floor(a()*y)];else for(var g=a()*v,w=0,x=o.length;w<x;w++)if(g-=l[w],g<0){E=o[w];break}h.push(E)}return f?h[0]:p?p(h):h}});function Pf(e,r){var t=[];if(e=e.slice(0),e.length>1)for(var n=0,a=e.shift();n<a;n++)t.push(Pf(e,r));else for(var i=0,o=e.shift();i<o;i++)t.push(r());return t}var x1="random",Dre=["typed","config","?on"],Nre=L(x1,Dre,e=>{var{typed:r,config:t,on:n}=e,a=ri(t.randomSeed);return n&&n("config",function(u,s){u.randomSeed!==s.randomSeed&&(a=ri(u.randomSeed))}),r(x1,{"":()=>o(0,1),number:u=>o(0,u),"number, number":(u,s)=>o(u,s),"Array | Matrix":u=>i(u,0,1),"Array | Matrix, number":(u,s)=>i(u,0,s),"Array | Matrix, number, number":(u,s,l)=>i(u,s,l)});function i(u,s,l){var c=Pf(u.valueOf(),()=>o(s,l));return ke(u)?u.create(c):c}function o(u,s){return u+a()*(s-u)}}),w1="randomInt",Cre=["typed","config","?on"],Mre=L(w1,Cre,e=>{var{typed:r,config:t,on:n}=e,a=ri(t.randomSeed);return n&&n("config",function(u,s){u.randomSeed!==s.randomSeed&&(a=ri(u.randomSeed))}),r(w1,{"":()=>o(0,1),number:u=>o(0,u),"number, number":(u,s)=>o(u,s),"Array | Matrix":u=>i(u,0,1),"Array | Matrix, number":(u,s)=>i(u,0,s),"Array | Matrix, number, number":(u,s,l)=>i(u,s,l)});function i(u,s,l){var c=Pf(u.valueOf(),()=>o(s,l));return ke(u)?u.create(c):c}function o(u,s){return Math.floor(u+a()*(s-u))}}),E1="stirlingS2",Tre=["typed","addScalar","subtractScalar","multiplyScalar","divideScalar","pow","factorial","combinations","isNegative","isInteger","number","?bignumber","larger"],Ore=L(E1,Tre,e=>{var{typed:r,addScalar:t,subtractScalar:n,multiplyScalar:a,divideScalar:i,pow:o,factorial:u,combinations:s,isNegative:l,isInteger:c,number:f,bignumber:p,larger:v}=e,m=[],d=[];return r(E1,{"number | BigNumber, number | BigNumber":function(h,E){if(!c(h)||l(h)||!c(E)||l(E))throw new TypeError("Non-negative integer value expected in function stirlingS2");if(v(E,h))throw new TypeError("k must be less than or equal to n in function stirlingS2");var g=!(Ke(h)&&Ke(E)),w=g?d:m,x=g?p:f,b=f(h),A=f(E);if(w[b]&&w[b].length>A)return w[b][A];for(var D=0;D<=b;++D)if(w[D]||(w[D]=[x(D===0?1:0)]),D!==0)for(var S=w[D],N=w[D-1],C=S.length;C<=D&&C<=A;++C)C===D?S[C]=1:S[C]=t(a(x(C),N[C]),N[C-1]);return w[b][A]}})}),S1="bellNumbers",_re=["typed","addScalar","isNegative","isInteger","stirlingS2"],$re=L(S1,_re,e=>{var{typed:r,addScalar:t,isNegative:n,isInteger:a,stirlingS2:i}=e;return r(S1,{"number | BigNumber":function(u){if(!a(u)||n(u))throw new TypeError("Non-negative integer value expected in function bellNumbers");for(var s=0,l=0;l<=u;l++)s=t(s,i(u,l));return s}})}),A1="catalan",Fre=["typed","addScalar","divideScalar","multiplyScalar","combinations","isNegative","isInteger"],Bre=L(A1,Fre,e=>{var{typed:r,addScalar:t,divideScalar:n,multiplyScalar:a,combinations:i,isNegative:o,isInteger:u}=e;return r(A1,{"number | BigNumber":function(l){if(!u(l)||o(l))throw new TypeError("Non-negative integer value expected in function catalan");return n(i(a(l,2),l),t(l,1))}})}),D1="composition",Rre=["typed","addScalar","combinations","isNegative","isPositive","isInteger","larger"],Pre=L(D1,Rre,e=>{var{typed:r,addScalar:t,combinations:n,isPositive:a,isNegative:i,isInteger:o,larger:u}=e;return r(D1,{"number | BigNumber, number | BigNumber":function(l,c){if(!o(l)||!a(l)||!o(c)||!a(c))throw new TypeError("Positive integer value expected in function composition");if(u(c,l))throw new TypeError("k must be less than or equal to n in function composition");return n(t(l,-1),t(c,-1))}})}),N1="leafCount",zre=["parse","typed"],Ire=L(N1,zre,e=>{var{parse:r,typed:t}=e;function n(a){var i=0;return a.forEach(o=>{i+=n(o)}),i||1}return t(N1,{Node:function(i){return n(i)}})});function C1(e){return lr(e)||Lr(e)&&e.isUnary()&&lr(e.args[0])}function qs(e){return!!(lr(e)||(Bn(e)||Lr(e))&&e.args.every(qs)||gn(e)&&qs(e.content))}function M1(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),t.push.apply(t,n)}return t}function bl(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?M1(Object(t),!0).forEach(function(n){Ur(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):M1(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var Lre="simplifyUtil",qre=["FunctionNode","OperatorNode","SymbolNode"],zf=L(Lre,qre,e=>{var{FunctionNode:r,OperatorNode:t,SymbolNode:n}=e,a=!0,i=!1,o="defaultF",u={add:{trivial:a,total:a,commutative:a,associative:a},unaryPlus:{trivial:a,total:a,commutative:a,associative:a},subtract:{trivial:i,total:a,commutative:i,associative:i},multiply:{trivial:a,total:a,commutative:a,associative:a},divide:{trivial:i,total:a,commutative:i,associative:i},paren:{trivial:a,total:a,commutative:a,associative:i},defaultF:{trivial:i,total:a,commutative:i,associative:i}},s={divide:{total:i},log:{total:i}},l={subtract:{total:i},abs:{trivial:a},log:{total:a}};function c(g,w){var x=arguments.length>2&&arguments[2]!==void 0?arguments[2]:u,b=o;if(typeof g=="string"?b=g:Lr(g)?b=g.fn.toString():Bn(g)?b=g.name:gn(g)&&(b="paren"),Re(x,b)){var A=x[b];if(Re(A,w))return A[w];if(Re(u,b))return u[b][w]}if(Re(x,o)){var D=x[o];return Re(D,w)?D[w]:u[o][w]}if(Re(u,b)){var S=u[b];if(Re(S,w))return S[w]}return u[o][w]}function f(g){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:u;return c(g,"commutative",w)}function p(g){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:u;return c(g,"associative",w)}function v(g,w){var x=bl({},g);for(var b in w)Re(g,b)?x[b]=bl(bl({},w[b]),g[b]):x[b]=w[b];return x}function m(g,w){if(!g.args||g.args.length===0)return g;g.args=d(g,w);for(var x=0;x<g.args.length;x++)m(g.args[x],w)}function d(g,w){var x,b=[],A=function D(S){for(var N=0;N<S.args.length;N++){var C=S.args[N];Lr(C)&&x===C.op?D(C):b.push(C)}};return p(g,w)?(x=g.op,A(g),b):g.args}function y(g,w){if(!(!g.args||g.args.length===0)){for(var x=E(g),b=g.args.length,A=0;A<b;A++)y(g.args[A],w);if(b>2&&p(g,w)){for(var D=g.args.pop();g.args.length>0;)D=x([g.args.pop(),D]);g.args=D.args}}}function h(g,w){if(!(!g.args||g.args.length===0)){for(var x=E(g),b=g.args.length,A=0;A<b;A++)h(g.args[A],w);if(b>2&&p(g,w)){for(var D=g.args.shift();g.args.length>0;)D=x([D,g.args.shift()]);g.args=D.args}}}function E(g){return Lr(g)?function(w){try{return new t(g.op,g.fn,w,g.implicit)}catch(x){return console.error(x),[]}}:function(w){return new r(new n(g.name),w)}}return{createMakeNodeFunction:E,hasProperty:c,isCommutative:f,isAssociative:p,mergeContext:v,flatten:m,allChildren:d,unflattenr:y,unflattenl:h,defaultContext:u,realContext:s,positiveContext:l}}),kre="simplify",Ure=["config","typed","parse","add","subtract","multiply","divide","pow","isZero","equal","resolve","simplifyConstant","simplifyCore","?fraction","?bignumber","mathWithTransform","matrix","AccessorNode","ArrayNode","ConstantNode","FunctionNode","IndexNode","ObjectNode","OperatorNode","ParenthesisNode","SymbolNode"],Hre=L(kre,Ure,e=>{var{config:r,typed:t,parse:n,add:a,subtract:i,multiply:o,divide:u,pow:s,isZero:l,equal:c,resolve:f,simplifyConstant:p,simplifyCore:v,fraction:m,bignumber:d,mathWithTransform:y,matrix:h,AccessorNode:E,ArrayNode:g,ConstantNode:w,FunctionNode:x,IndexNode:b,ObjectNode:A,OperatorNode:D,ParenthesisNode:S,SymbolNode:N}=e,{hasProperty:C,isCommutative:M,isAssociative:B,mergeContext:P,flatten:R,unflattenr:_,unflattenl:O,createMakeNodeFunction:U,defaultContext:F,realContext:q,positiveContext:Y}=zf({FunctionNode:x,OperatorNode:D,SymbolNode:N});t.addConversion({from:"Object",to:"Map",convert:Wa});var V=t("simplify",{Node:te,"Node, Map":(j,K)=>te(j,!1,K),"Node, Map, Object":(j,K,oe)=>te(j,!1,K,oe),"Node, Array":te,"Node, Array, Map":te,"Node, Array, Map, Object":te});t.removeConversion({from:"Object",to:"Map",convert:Wa}),V.defaultContext=F,V.realContext=q,V.positiveContext=Y;function z(j){return j.transform(function(K,oe,he){return gn(K)?z(K.content):K})}var J={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};V.rules=[v,{l:"log(e)",r:"1"},{s:"n-n1 -> n+-n1",assuming:{subtract:{total:!0}}},{s:"n-n -> 0",assuming:{subtract:{total:!1}}},{s:"-(cl*v) -> v * (-cl)",assuming:{multiply:{commutative:!0},subtract:{total:!0}}},{s:"-(cl*v) -> (-cl) * v",assuming:{multiply:{commutative:!1},subtract:{total:!0}}},{s:"-(v*cl) -> v * (-cl)",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:" vd * ( vd * n1 + n2)",r:"vd^2 * n1 + vd * n2"},{s:" vd * (vd^n4 * n1 + n2) -> vd^(1+n4) * n1 + vd * n2",assuming:{divide:{total:!0}}},{s:"vd^n3 * ( vd * n1 + n2) -> vd^(n3+1) * n1 + vd^n3 * n2",assuming:{divide:{total:!0}}},{s:"vd^n3 * (vd^n4 * n1 + n2) -> vd^(n3+n4) * n1 + vd^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}}},p,{s:"n+n -> 2*n",assuming:{add:{total:!0}}},{l:"n+-n",r:"0"},{l:"vd*n + vd",r:"vd*(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*vd + vd -> (n+1)*vd",assuming:{multiply:{commutative:!1}}},{s:"vd + n*vd -> (1+n)*vd",assuming:{multiply:{commutative:!1}}},{s:"n1*n3 + n2*n3 -> (n1+n2)*n3",assuming:{multiply:{commutative:!1}}},{s:"n^n1 * n -> n^(n1+1)",assuming:{divide:{total:!0},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*cd + cd",r:"(n+1)*cd"},{s:"cd*n + cd -> cd*(n+1)",assuming:{multiply:{commutative:!1}}},{s:"cd + cd*n -> cd*(1+n)",assuming:{multiply:{commutative:!1}}},p,{s:"(-n)*n1 -> -(n*n1)",assuming:{subtract:{total:!0}}},{s:"n1*(-n) -> -(n1*n)",assuming:{subtract:{total:!0},multiply:{commutative:!1}}},{s:"ce+ve -> ve+ce",assuming:{add:{commutative:!0}},imposeContext:{add:{commutative:!1}}},{s:"vd*cd -> cd*vd",assuming:{multiply:{commutative:!0}},imposeContext:{multiply:{commutative:!1}}},{l:"n+-n1",r:"n-n1"},{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"}];function le(j,K){var oe={};if(j.s){var he=j.s.split("->");if(he.length===2)oe.l=he[0],oe.r=he[1];else throw SyntaxError("Could not parse rule: "+j.s)}else oe.l=j.l,oe.r=j.r;oe.l=z(n(oe.l)),oe.r=z(n(oe.r));for(var me of["imposeContext","repeat","assuming"])me in j&&(oe[me]=j[me]);if(j.evaluate&&(oe.evaluate=n(j.evaluate)),B(oe.l,K)){var I=!M(oe.l,K),H;I&&(H=se());var ie=U(oe.l),ce=se();oe.expanded={},oe.expanded.l=ie([oe.l,ce]),R(oe.expanded.l,K),_(oe.expanded.l,K),oe.expanded.r=ie([oe.r,ce]),I&&(oe.expandedNC1={},oe.expandedNC1.l=ie([H,oe.l]),oe.expandedNC1.r=ie([H,oe.r]),oe.expandedNC2={},oe.expandedNC2.l=ie([H,oe.expanded.l]),oe.expandedNC2.r=ie([H,oe.expanded.r]))}return oe}function Q(j,K){for(var oe=[],he=0;he<j.length;he++){var me=j[he],I=void 0,H=typeof me;switch(H){case"string":me={s:me};case"object":I=le(me,K);break;case"function":I=me;break;default:throw TypeError("Unsupported type of rule: "+H)}oe.push(I)}return oe}var re=0;function se(){return new N("_p"+re++)}function te(j,K){var oe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ji(),he=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},me=he.consoleDebug;K=Q(K||V.rules,he.context);var I=f(j,oe);I=z(I);for(var H={},ie=I.toString({parenthesis:"all"});!H[ie];){H[ie]=!0,re=0;var ce=ie;me&&console.log("Working on: ",ie);for(var ve=0;ve<K.length;ve++){var de="";if(typeof K[ve]=="function"?(I=K[ve](I,he),me&&(de=K[ve].name)):(R(I,he.context),I=fe(I,K[ve],he.context),me&&(de="".concat(K[ve].l.toString()," -> ").concat(K[ve].r.toString()))),me){var Se=I.toString({parenthesis:"all"});Se!==ce&&(console.log("Applying",de,"produced",Se),ce=Se)}O(I,he.context)}ie=I.toString({parenthesis:"all"})}return I}function ae(j,K,oe){var he=j;if(j)for(var me=0;me<j.length;++me){var I=fe(j[me],K,oe);I!==j[me]&&(he===j&&(he=j.slice()),he[me]=I)}return he}function fe(j,K,oe){if(K.assuming){for(var he in K.assuming)for(var me in K.assuming[he])if(C(he,me,oe)!==K.assuming[he][me])return j}var I=P(K.imposeContext,oe),H=j;if(H instanceof D||H instanceof x){var ie=ae(H.args,K,oe);ie!==H.args&&(H=H.clone(),H.args=ie)}else if(H instanceof S){if(H.content){var ce=fe(H.content,K,oe);ce!==H.content&&(H=new S(ce))}}else if(H instanceof g){var ve=ae(H.items,K,oe);ve!==H.items&&(H=new g(ve))}else if(H instanceof E){var de=H.object;H.object&&(de=fe(H.object,K,oe));var Se=H.index;H.index&&(Se=fe(H.index,K,oe)),(de!==H.object||Se!==H.index)&&(H=new E(de,Se))}else if(H instanceof b){var xe=ae(H.dimensions,K,oe);xe!==H.dimensions&&(H=new b(xe))}else if(H instanceof A){var Me=!1,Ae={};for(var nr in H.properties)Ae[nr]=fe(H.properties[nr],K,oe),Ae[nr]!==H.properties[nr]&&(Me=!0);Me&&(H=new A(Ae))}var ir=K.r,Ie=W(K.l,H,I)[0];if(!Ie&&K.expanded&&(ir=K.expanded.r,Ie=W(K.expanded.l,H,I)[0]),!Ie&&K.expandedNC1&&(ir=K.expandedNC1.r,Ie=W(K.expandedNC1.l,H,I)[0],Ie||(ir=K.expandedNC2.r,Ie=W(K.expandedNC2.l,H,I)[0])),Ie){var Or=H.implicit;H=ir.clone(),Or&&"implicit"in ir&&(H.implicit=!0),H=H.transform(function(T){return T.isSymbolNode&&Re(Ie.placeholders,T.name)?Ie.placeholders[T.name].clone():T})}return K.repeat&&H!==j&&(H=fe(H,K,oe)),H}function ne(j,K){var oe=[],he,me,I=U(j);if(M(j,K))for(var H=0;H<j.args.length;H++)me=j.args.slice(0),me.splice(H,1),he=me.length===1?me[0]:I(me),oe.push(I([j.args[H],he]));else for(var ie=1;ie<j.args.length;ie++){var ce=j.args[0];ie>1&&(ce=I(j.args.slice(0,ie))),me=j.args.slice(ie),he=me.length===1?me[0]:I(me),oe.push(I([ce,he]))}return oe}function be(j,K){var oe={placeholders:{}};if(!j.placeholders&&!K.placeholders)return oe;if(j.placeholders){if(!K.placeholders)return j}else return K;for(var he in j.placeholders)if(Re(j.placeholders,he)&&(oe.placeholders[he]=j.placeholders[he],Re(K.placeholders,he)&&!ue(j.placeholders[he],K.placeholders[he])))return null;for(var me in K.placeholders)Re(K.placeholders,me)&&(oe.placeholders[me]=K.placeholders[me]);return oe}function $e(j,K){var oe=[];if(j.length===0||K.length===0)return oe;for(var he,me=0;me<j.length;me++)for(var I=0;I<K.length;I++)he=be(j[me],K[I]),he&&oe.push(he);return oe}function k(j){if(j.length===0)return j;for(var K=j.reduce($e),oe=[],he={},me=0;me<K.length;me++){var I=JSON.stringify(K[me]);he[I]||(he[I]=!0,oe.push(K[me]))}return oe}function W(j,K,oe,he){var me=[{placeholders:{}}];if(j instanceof D&&K instanceof D||j instanceof x&&K instanceof x){if(j instanceof D){if(j.op!==K.op||j.fn!==K.fn)return[]}else if(j instanceof x&&j.name!==K.name)return[];if(K.args.length===1&&j.args.length===1||!B(K,oe)&&K.args.length===j.args.length||he){for(var I=[],H=0;H<j.args.length;H++){var ie=W(j.args[H],K.args[H],oe);if(ie.length===0)break;I.push(ie)}if(I.length!==j.args.length){if(!M(K,oe)||j.args.length===1)return[];if(j.args.length>2)throw new Error("permuting >2 commutative non-associative rule arguments not yet implemented");var ce=W(j.args[0],K.args[1],oe);if(ce.length===0)return[];var ve=W(j.args[1],K.args[0],oe);if(ve.length===0)return[];I=[ce,ve]}me=k(I)}else if(K.args.length>=2&&j.args.length===2){for(var de=ne(K,oe),Se=[],xe=0;xe<de.length;xe++){var Me=W(j,de[xe],oe,!0);Se=Se.concat(Me)}return Se}else{if(j.args.length>2)throw Error("Unexpected non-binary associative function: "+j.toString());return[]}}else if(j instanceof N){if(j.name.length===0)throw new Error("Symbol in rule has 0 length...!?");if(J[j.name]){if(j.name!==K.name)return[]}else switch(j.name[1]>="a"&&j.name[1]<="z"?j.name.substring(0,2):j.name[0]){case"n":case"_p":me[0].placeholders[j.name]=K;break;case"c":case"cl":if(lr(K))me[0].placeholders[j.name]=K;else return[];break;case"v":if(!lr(K))me[0].placeholders[j.name]=K;else return[];break;case"vl":if(Vr(K))me[0].placeholders[j.name]=K;else return[];break;case"cd":if(C1(K))me[0].placeholders[j.name]=K;else return[];break;case"vd":if(!C1(K))me[0].placeholders[j.name]=K;else return[];break;case"ce":if(qs(K))me[0].placeholders[j.name]=K;else return[];break;case"ve":if(!qs(K))me[0].placeholders[j.name]=K;else return[];break;default:throw new Error("Invalid symbol in rule: "+j.name)}}else if(j instanceof w){if(!c(j.value,K.value))return[]}else return[];return me}function ue(j,K){if(j instanceof w&&K instanceof w){if(!c(j.value,K.value))return!1}else if(j instanceof N&&K instanceof N){if(j.name!==K.name)return!1}else if(j instanceof D&&K instanceof D||j instanceof x&&K instanceof x){if(j instanceof D){if(j.op!==K.op||j.fn!==K.fn)return!1}else if(j instanceof x&&j.name!==K.name)return!1;if(j.args.length!==K.args.length)return!1;for(var oe=0;oe<j.args.length;oe++)if(!ue(j.args[oe],K.args[oe]))return!1}else return!1;return!0}return V}),jre="simplifyConstant",Vre=["typed","config","mathWithTransform","matrix","?fraction","?bignumber","AccessorNode","ArrayNode","ConstantNode","FunctionNode","IndexNode","ObjectNode","OperatorNode","SymbolNode"],Gre=L(jre,Vre,e=>{var{typed:r,config:t,mathWithTransform:n,matrix:a,fraction:i,bignumber:o,AccessorNode:u,ArrayNode:s,ConstantNode:l,FunctionNode:c,IndexNode:f,ObjectNode:p,OperatorNode:v,SymbolNode:m}=e,{isCommutative:d,isAssociative:y,allChildren:h,createMakeNodeFunction:E}=zf({FunctionNode:c,OperatorNode:v,SymbolNode:m}),g=r("simplifyConstant",{Node:R=>A(P(R,{})),"Node, Object":function(_,O){return A(P(_,O))}});function w(R){return mo(R)?R.valueOf():R instanceof Array?R.map(w):ke(R)?a(w(R.valueOf())):R}function x(R,_,O){try{return n[R].apply(null,_)}catch{return _=_.map(w),S(n[R].apply(null,_),O)}}var b=r({Fraction:C,number:function(_){return _<0?N(new l(-_)):new l(_)},BigNumber:function(_){return _<0?N(new l(-_)):new l(_)},Complex:function(_){throw new Error("Cannot convert Complex number to Node")},string:function(_){return new l(_)},Matrix:function(_){return new s(_.valueOf().map(O=>b(O)))}});function A(R){return wr(R)?R:b(R)}function D(R,_){var O=_&&_.exactFractions!==!1;if(O&&isFinite(R)&&i){var U=i(R),F=_&&typeof _.fractionsLimit=="number"?_.fractionsLimit:1/0;if(U.valueOf()===R&&U.n<F&&U.d<F)return U}return R}var S=r({"string, Object":function(_,O){if(t.number==="BigNumber")return o===void 0&&Nf(),o(_);if(t.number==="Fraction")return i===void 0&&kb(),i(_);var U=parseFloat(_);return D(U,O)},"Fraction, Object":function(_,O){return _},"BigNumber, Object":function(_,O){return _},"number, Object":function(_,O){return D(_,O)},"Complex, Object":function(_,O){return _.im!==0?_:D(_.re,O)},"Matrix, Object":function(_,O){return a(D(_.valueOf()))},"Array, Object":function(_,O){return _.map(D)}});function N(R){return new v("-","unaryMinus",[R])}function C(R){var _,O=R.s*R.n;return O<0?_=new v("-","unaryMinus",[new l(-O)]):_=new l(O),R.d===1?_:new v("/","divide",[_,new l(R.d)])}function M(R,_,O){if(!gi(_))return new u(A(R),A(_));if(Mt(R)||ke(R)){for(var U=Array.from(_.dimensions);U.length>0;)if(lr(U[0])&&typeof U[0].value!="string"){var F=S(U.shift().value,O);Mt(R)?R=R.items[F-1]:(R=R.valueOf()[F-1],R instanceof Array&&(R=a(R)))}else if(U.length>1&&lr(U[1])&&typeof U[1].value!="string"){var q=S(U[1].value,O),Y=[],V=Mt(R)?R.items:R.valueOf();for(var z of V)if(Mt(z))Y.push(z.items[q-1]);else if(ke(R))Y.push(z[q-1]);else break;if(Y.length===V.length)Mt(R)?R=new s(Y):R=a(Y),U.splice(1,1);else break}else break;return U.length===_.dimensions.length?new u(A(R),_):U.length>0?(_=new f(U),new u(A(R),_)):R}if(du(R)&&_.dimensions.length===1&&lr(_.dimensions[0])){var J=_.dimensions[0].value;return J in R.properties?R.properties[J]:new l}return new u(A(R),_)}function B(R,_,O,U){var F=_.shift(),q=_.reduce((Y,V)=>{if(!wr(V)){var z=Y.pop();if(wr(z))return[z,V];try{return Y.push(x(R,[z,V],U)),Y}catch{Y.push(z)}}Y.push(A(Y.pop()));var J=Y.length===1?Y[0]:O(Y);return[O([J,A(V)])]},[F]);return q.length===1?q[0]:O([q[0],b(q[1])])}function P(R,_){switch(R.type){case"SymbolNode":return R;case"ConstantNode":switch(typeof R.value){case"number":return S(R.value,_);case"string":return R.value;default:if(!isNaN(R.value))return S(R.value,_)}return R;case"FunctionNode":if(n[R.name]&&n[R.name].rawArgs)return R;{var O=["add","multiply"];if(O.indexOf(R.name)===-1){var U=R.args.map(fe=>P(fe,_));if(!U.some(wr))try{return x(R.name,U,_)}catch{}if(R.name==="size"&&U.length===1&&Mt(U[0])){for(var F=[],q=U[0];Mt(q);)F.push(q.items.length),q=q.items[0];return a(F)}return new c(R.name,U.map(A))}}case"OperatorNode":{var Y=R.fn.toString(),V,z,J=E(R);if(Lr(R)&&R.isUnary())V=[P(R.args[0],_)],wr(V[0])?z=J(V):z=x(Y,V,_);else if(y(R,_.context))if(V=h(R,_.context),V=V.map(fe=>P(fe,_)),d(Y,_.context)){for(var le=[],Q=[],re=0;re<V.length;re++)wr(V[re])?Q.push(V[re]):le.push(V[re]);le.length>1?(z=B(Y,le,J,_),Q.unshift(z),z=B(Y,Q,J,_)):z=B(Y,V,J,_)}else z=B(Y,V,J,_);else V=R.args.map(fe=>P(fe,_)),z=B(Y,V,J,_);return z}case"ParenthesisNode":return P(R.content,_);case"AccessorNode":return M(P(R.object,_),P(R.index,_),_);case"ArrayNode":{var se=R.items.map(fe=>P(fe,_));return se.some(wr)?new s(se.map(A)):a(se)}case"IndexNode":return new f(R.dimensions.map(fe=>g(fe,_)));case"ObjectNode":{var te={};for(var ae in R.properties)te[ae]=g(R.properties[ae],_);return new p(te)}case"AssignmentNode":case"BlockNode":case"FunctionAssignmentNode":case"RangeNode":case"ConditionalNode":default:throw new Error("Unimplemented node type in simplifyConstant: ".concat(R.type))}}return g}),T1="simplifyCore",Wre=["typed","parse","equal","isZero","add","subtract","multiply","divide","pow","AccessorNode","ArrayNode","ConstantNode","FunctionNode","IndexNode","ObjectNode","OperatorNode","ParenthesisNode","SymbolNode"],Zre=L(T1,Wre,e=>{var{typed:r,parse:t,equal:n,isZero:a,add:i,subtract:o,multiply:u,divide:s,pow:l,AccessorNode:c,ArrayNode:f,ConstantNode:p,FunctionNode:v,IndexNode:m,ObjectNode:d,OperatorNode:y,ParenthesisNode:h,SymbolNode:E}=e,g=new p(0),w=new p(1),x=new p(!0),b=new p(!1);function A(C){return Lr(C)&&["and","not","or"].includes(C.op)}var{hasProperty:D,isCommutative:S}=zf({FunctionNode:v,OperatorNode:y,SymbolNode:E});function N(C){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},B=M?M.context:void 0;if(D(C,"trivial",B)){if(Bn(C)&&C.args.length===1)return N(C.args[0],M);var P=!1,R=0;if(C.forEach(Q=>{++R,R===1&&(P=N(Q,M))}),R===1)return P}var _=C;if(Bn(_)){var O=QW(_.name);if(O){if(_.args.length>2&&D(_,"associative",B))for(;_.args.length>2;){var U=_.args.pop(),F=_.args.pop();_.args.push(new y(O,_.name,[U,F]))}_=new y(O,_.name,_.args)}else return new v(N(_.fn),_.args.map(Q=>N(Q,M)))}if(Lr(_)&&_.isUnary()){var q=N(_.args[0],M);if(_.op==="~"&&Lr(q)&&q.isUnary()&&q.op==="~"||_.op==="not"&&Lr(q)&&q.isUnary()&&q.op==="not"&&A(q.args[0]))return q.args[0];var Y=!0;if(_.op==="-"&&Lr(q)&&(q.isBinary()&&q.fn==="subtract"&&(_=new y("-","subtract",[q.args[1],q.args[0]]),Y=!1),q.isUnary()&&q.op==="-"))return q.args[0];if(Y)return new y(_.op,_.fn,[q])}if(Lr(_)&&_.isBinary()){var V=N(_.args[0],M),z=N(_.args[1],M);if(_.op==="+"){if(lr(V)&&a(V.value))return z;if(lr(z)&&a(z.value))return V;Lr(z)&&z.isUnary()&&z.op==="-"&&(z=z.args[0],_=new y("-","subtract",[V,z]))}if(_.op==="-")return Lr(z)&&z.isUnary()&&z.op==="-"?N(new y("+","add",[V,z.args[0]]),M):lr(V)&&a(V.value)?N(new y("-","unaryMinus",[z])):lr(z)&&a(z.value)?V:new y(_.op,_.fn,[V,z]);if(_.op==="*"){if(lr(V)){if(a(V.value))return g;if(n(V.value,1))return z}if(lr(z)){if(a(z.value))return g;if(n(z.value,1))return V;if(S(_,B))return new y(_.op,_.fn,[z,V],_.implicit)}return new y(_.op,_.fn,[V,z],_.implicit)}if(_.op==="/")return lr(V)&&a(V.value)?g:lr(z)&&n(z.value,1)?V:new y(_.op,_.fn,[V,z]);if(_.op==="^"&&lr(z)){if(a(z.value))return w;if(n(z.value,1))return V}if(_.op==="and"){if(lr(V))if(V.value){if(A(z))return z;if(lr(z))return z.value?x:b}else return b;if(lr(z))if(z.value){if(A(V))return V}else return b}if(_.op==="or"){if(lr(V)){if(V.value)return x;if(A(z))return z}if(lr(z)){if(z.value)return x;if(A(V))return V}}return new y(_.op,_.fn,[V,z])}if(Lr(_))return new y(_.op,_.fn,_.args.map(Q=>N(Q,M)));if(Mt(_))return new f(_.items.map(Q=>N(Q,M)));if(Jn(_))return new c(N(_.object,M),N(_.index,M));if(gi(_))return new m(_.dimensions.map(Q=>N(Q,M)));if(du(_)){var J={};for(var le in _.properties)J[le]=N(_.properties[le],M);return new d(J)}return _}return r(T1,{Node:N,"Node,Object":N})}),Yre="resolve",Xre=["typed","parse","ConstantNode","FunctionNode","OperatorNode","ParenthesisNode"],Kre=L(Yre,Xre,e=>{var{typed:r,parse:t,ConstantNode:n,FunctionNode:a,OperatorNode:i,ParenthesisNode:o}=e;function u(s,l){var c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:new Set;if(!l)return s;if(Vr(s)){if(c.has(s.name)){var f=Array.from(c).join(", ");throw new ReferenceError("recursive loop of variable definitions among {".concat(f,"}"))}var p=l.get(s.name);if(wr(p)){var v=new Set(c);return v.add(s.name),u(p,l,v)}else return typeof p=="number"?t(String(p)):p!==void 0?new n(p):s}else if(Lr(s)){var m=s.args.map(function(y){return u(y,l,c)});return new i(s.op,s.fn,m,s.implicit)}else{if(gn(s))return new o(u(s.content,l,c));if(Bn(s)){var d=s.args.map(function(y){return u(y,l,c)});return new a(s.name,d)}}return s.map(y=>u(y,l,c))}return r("resolve",{Node:u,"Node, Map | null | undefined":u,"Node, Object":(s,l)=>u(s,Wa(l)),"Array | Matrix":r.referToSelf(s=>l=>l.map(c=>s(c))),"Array | Matrix, null | undefined":r.referToSelf(s=>l=>l.map(c=>s(c))),"Array, Object":r.referTo("Array,Map",s=>(l,c)=>s(l,Wa(c))),"Matrix, Object":r.referTo("Matrix,Map",s=>(l,c)=>s(l,Wa(c))),"Array | Matrix, Map":r.referToSelf(s=>(l,c)=>l.map(f=>s(f,c)))})}),O1="symbolicEqual",Jre=["parse","simplify","typed","OperatorNode"],Qre=L(O1,Jre,e=>{var{parse:r,simplify:t,typed:n,OperatorNode:a}=e;function i(o,u){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},l=new a("-","subtract",[o,u]),c=t(l,{},s);return lr(c)&&!c.value}return n(O1,{"Node, Node":i,"Node, Node, Object":i})}),_1="derivative",ete=["typed","config","parse","simplify","equal","isZero","numeric","ConstantNode","FunctionNode","OperatorNode","ParenthesisNode","SymbolNode"],rte=L(_1,ete,e=>{var{typed:r,config:t,parse:n,simplify:a,equal:i,isZero:o,numeric:u,ConstantNode:s,FunctionNode:l,OperatorNode:c,ParenthesisNode:f,SymbolNode:p}=e;function v(g,w){var x=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{simplify:!0},b={};y(b,g,w.name);var A=h(g,b);return x.simplify?a(A):A}r.addConversion({from:"identifier",to:"SymbolNode",convert:n});var m=r(_1,{"Node, SymbolNode":v,"Node, SymbolNode, Object":v});r.removeConversion({from:"identifier",to:"SymbolNode",convert:n}),m._simplify=!0,m.toTex=function(g){return d.apply(null,g.args)};var d=r("_derivTex",{"Node, SymbolNode":function(w,x){return lr(w)&&Dr(w.value)==="string"?d(n(w.value).toString(),x.toString(),1):d(w.toTex(),x.toString(),1)},"Node, ConstantNode":function(w,x){if(Dr(x.value)==="string")return d(w,n(x.value));throw new Error("The second parameter to 'derivative' is a non-string constant")},"Node, SymbolNode, ConstantNode":function(w,x,b){return d(w.toString(),x.name,b.value)},"string, string, number":function(w,x,b){var A;return b===1?A="{d\\over d"+x+"}":A="{d^{"+b+"}\\over d"+x+"^{"+b+"}}",A+"\\left[".concat(w,"\\right]")}}),y=r("constTag",{"Object, ConstantNode, string":function(w,x){return w[x]=!0,!0},"Object, SymbolNode, string":function(w,x,b){return x.name!==b?(w[x]=!0,!0):!1},"Object, ParenthesisNode, string":function(w,x,b){return y(w,x.content,b)},"Object, FunctionAssignmentNode, string":function(w,x,b){return x.params.indexOf(b)===-1?(w[x]=!0,!0):y(w,x.expr,b)},"Object, FunctionNode | OperatorNode, string":function(w,x,b){if(x.args.length>0){for(var A=y(w,x.args[0],b),D=1;D<x.args.length;++D)A=y(w,x.args[D],b)&&A;if(A)return w[x]=!0,!0}return!1}}),h=r("_derivative",{"ConstantNode, Object":function(w){return E(0)},"SymbolNode, Object":function(w,x){return x[w]!==void 0?E(0):E(1)},"ParenthesisNode, Object":function(w,x){return new f(h(w.content,x))},"FunctionAssignmentNode, Object":function(w,x){return x[w]!==void 0?E(0):h(w.expr,x)},"FunctionNode, Object":function(w,x){if(x[w]!==void 0)return E(0);var b=w.args[0],A,D=!1,S=!1,N;switch(w.name){case"cbrt":D=!0,N=new c("*","multiply",[E(3),new c("^","pow",[b,new c("/","divide",[E(2),E(3)])])]);break;case"sqrt":case"nthRoot":if(w.args.length===1)D=!0,N=new c("*","multiply",[E(2),new l("sqrt",[b])]);else if(w.args.length===2)return A=new c("/","divide",[E(1),w.args[1]]),x[A]=x[w.args[1]],h(new c("^","pow",[b,A]),x);break;case"log10":A=E(10);case"log":if(!A&&w.args.length===1)N=b.clone(),D=!0;else if(w.args.length===1&&A||w.args.length===2&&x[w.args[1]]!==void 0)N=new c("*","multiply",[b.clone(),new l("log",[A||w.args[1]])]),D=!0;else if(w.args.length===2)return h(new c("/","divide",[new l("log",[b]),new l("log",[w.args[1]])]),x);break;case"pow":if(w.args.length===2)return x[A]=x[w.args[1]],h(new c("^","pow",[b,w.args[1]]),x);break;case"exp":N=new l("exp",[b.clone()]);break;case"sin":N=new l("cos",[b.clone()]);break;case"cos":N=new c("-","unaryMinus",[new l("sin",[b.clone()])]);break;case"tan":N=new c("^","pow",[new l("sec",[b.clone()]),E(2)]);break;case"sec":N=new c("*","multiply",[w,new l("tan",[b.clone()])]);break;case"csc":S=!0,N=new c("*","multiply",[w,new l("cot",[b.clone()])]);break;case"cot":S=!0,N=new c("^","pow",[new l("csc",[b.clone()]),E(2)]);break;case"asin":D=!0,N=new l("sqrt",[new c("-","subtract",[E(1),new c("^","pow",[b.clone(),E(2)])])]);break;case"acos":D=!0,S=!0,N=new l("sqrt",[new c("-","subtract",[E(1),new c("^","pow",[b.clone(),E(2)])])]);break;case"atan":D=!0,N=new c("+","add",[new c("^","pow",[b.clone(),E(2)]),E(1)]);break;case"asec":D=!0,N=new c("*","multiply",[new l("abs",[b.clone()]),new l("sqrt",[new c("-","subtract",[new c("^","pow",[b.clone(),E(2)]),E(1)])])]);break;case"acsc":D=!0,S=!0,N=new c("*","multiply",[new l("abs",[b.clone()]),new l("sqrt",[new c("-","subtract",[new c("^","pow",[b.clone(),E(2)]),E(1)])])]);break;case"acot":D=!0,S=!0,N=new c("+","add",[new c("^","pow",[b.clone(),E(2)]),E(1)]);break;case"sinh":N=new l("cosh",[b.clone()]);break;case"cosh":N=new l("sinh",[b.clone()]);break;case"tanh":N=new c("^","pow",[new l("sech",[b.clone()]),E(2)]);break;case"sech":S=!0,N=new c("*","multiply",[w,new l("tanh",[b.clone()])]);break;case"csch":S=!0,N=new c("*","multiply",[w,new l("coth",[b.clone()])]);break;case"coth":S=!0,N=new c("^","pow",[new l("csch",[b.clone()]),E(2)]);break;case"asinh":D=!0,N=new l("sqrt",[new c("+","add",[new c("^","pow",[b.clone(),E(2)]),E(1)])]);break;case"acosh":D=!0,N=new l("sqrt",[new c("-","subtract",[new c("^","pow",[b.clone(),E(2)]),E(1)])]);break;case"atanh":D=!0,N=new c("-","subtract",[E(1),new c("^","pow",[b.clone(),E(2)])]);break;case"asech":D=!0,S=!0,N=new c("*","multiply",[b.clone(),new l("sqrt",[new c("-","subtract",[E(1),new c("^","pow",[b.clone(),E(2)])])])]);break;case"acsch":D=!0,S=!0,N=new c("*","multiply",[new l("abs",[b.clone()]),new l("sqrt",[new c("+","add",[new c("^","pow",[b.clone(),E(2)]),E(1)])])]);break;case"acoth":D=!0,S=!0,N=new c("-","subtract",[E(1),new c("^","pow",[b.clone(),E(2)])]);break;case"abs":N=new c("/","divide",[new l(new p("abs"),[b.clone()]),b.clone()]);break;case"gamma":default:throw new Error('Cannot process function "'+w.name+'" in derivative: the function is not supported, undefined, or the number of arguments passed to it are not supported')}var C,M;D?(C="/",M="divide"):(C="*",M="multiply");var B=h(b,x);return S&&(B=new c("-","unaryMinus",[B])),new c(C,M,[B,N])},"OperatorNode, Object":function(w,x){if(x[w]!==void 0)return E(0);if(w.op==="+")return new c(w.op,w.fn,w.args.map(function(R){return h(R,x)}));if(w.op==="-"){if(w.isUnary())return new c(w.op,w.fn,[h(w.args[0],x)]);if(w.isBinary())return new c(w.op,w.fn,[h(w.args[0],x),h(w.args[1],x)])}if(w.op==="*"){var b=w.args.filter(function(R){return x[R]!==void 0});if(b.length>0){var A=w.args.filter(function(R){return x[R]===void 0}),D=A.length===1?A[0]:new c("*","multiply",A),S=b.concat(h(D,x));return new c("*","multiply",S)}return new c("+","add",w.args.map(function(R){return new c("*","multiply",w.args.map(function(_){return _===R?h(_,x):_.clone()}))}))}if(w.op==="/"&&w.isBinary()){var N=w.args[0],C=w.args[1];return x[C]!==void 0?new c("/","divide",[h(N,x),C]):x[N]!==void 0?new c("*","multiply",[new c("-","unaryMinus",[N]),new c("/","divide",[h(C,x),new c("^","pow",[C.clone(),E(2)])])]):new c("/","divide",[new c("-","subtract",[new c("*","multiply",[h(N,x),C.clone()]),new c("*","multiply",[N.clone(),h(C,x)])]),new c("^","pow",[C.clone(),E(2)])])}if(w.op==="^"&&w.isBinary()){var M=w.args[0],B=w.args[1];if(x[M]!==void 0)return lr(M)&&(o(M.value)||i(M.value,1))?E(0):new c("*","multiply",[w,new c("*","multiply",[new l("log",[M.clone()]),h(B.clone(),x)])]);if(x[B]!==void 0){if(lr(B)){if(o(B.value))return E(0);if(i(B.value,1))return h(M,x)}var P=new c("^","pow",[M.clone(),new c("-","subtract",[B,E(1)])]);return new c("*","multiply",[B.clone(),new c("*","multiply",[h(M,x),P])])}return new c("*","multiply",[new c("^","pow",[M.clone(),B.clone()]),new c("+","add",[new c("*","multiply",[h(M,x),new c("/","divide",[B.clone(),M.clone()])]),new c("*","multiply",[h(B,x),new l("log",[M.clone()])])])])}throw new Error('Cannot process operator "'+w.op+'" in derivative: the operator is not supported, undefined, or the number of arguments passed to it are not supported')}});function E(g,w){return new s(u(g,t.number))}return m}),$1="rationalize",tte=["config","typed","equal","isZero","add","subtract","multiply","divide","pow","parse","simplifyConstant","simplifyCore","simplify","?bignumber","?fraction","mathWithTransform","matrix","AccessorNode","ArrayNode","ConstantNode","FunctionNode","IndexNode","ObjectNode","OperatorNode","SymbolNode","ParenthesisNode"],nte=L($1,tte,e=>{var{config:r,typed:t,equal:n,isZero:a,add:i,subtract:o,multiply:u,divide:s,pow:l,parse:c,simplifyConstant:f,simplifyCore:p,simplify:v,fraction:m,bignumber:d,mathWithTransform:y,matrix:h,AccessorNode:E,ArrayNode:g,ConstantNode:w,FunctionNode:x,IndexNode:b,ObjectNode:A,OperatorNode:D,SymbolNode:S,ParenthesisNode:N}=e;function C(_){var O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},U=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,F=B(),q=M(_,O,!0,F.firstRules),Y=q.variables.length,V={exactFractions:!1},z={exactFractions:!0};if(_=q.expression,Y>=1){_=P(_);var J,le,Q=!0,re=!1;_=v(_,F.firstRules,{},V);for(var se;le=Q?F.distrDivRules:F.sucDivRules,_=v(_,le,{},z),Q=!Q,se=_.toString(),se!==J;)re=!0,J=se;re&&(_=v(_,F.firstRulesAgain,{},V)),_=v(_,F.finalRules,{},V)}var te=[],ae={};return _.type==="OperatorNode"&&_.isBinary()&&_.op==="/"?(Y===1&&(_.args[0]=R(_.args[0],te),_.args[1]=R(_.args[1])),U&&(ae.numerator=_.args[0],ae.denominator=_.args[1])):(Y===1&&(_=R(_,te)),U&&(ae.numerator=_,ae.denominator=null)),U?(ae.coefficients=te,ae.variables=q.variables,ae.expression=_,ae):_}return t($1,{Node:C,"Node, boolean":(_,O)=>C(_,{},O),"Node, Object":C,"Node, Object, boolean":C});function M(_,O,U,F){var q=[],Y=v(_,F,O,{exactFractions:!1});U=!!U;var V="+-*"+(U?"/":"");J(Y);var z={};return z.expression=Y,z.variables=q,z;function J(le){var Q=le.type;if(Q==="FunctionNode")throw new Error("There is an unsolved function call");if(Q==="OperatorNode")if(le.op==="^"){if(le.args[1].type!=="ConstantNode"||!Pe(parseFloat(le.args[1].value)))throw new Error("There is a non-integer exponent");J(le.args[0])}else{if(V.indexOf(le.op)===-1)throw new Error("Operator "+le.op+" invalid in polynomial expression");for(var re=0;re<le.args.length;re++)J(le.args[re])}else if(Q==="SymbolNode"){var se=le.name,te=q.indexOf(se);te===-1&&q.push(se)}else if(Q==="ParenthesisNode")J(le.content);else if(Q!=="ConstantNode")throw new Error("type "+Q+" is not allowed in polynomial expression")}}function B(){var _=[p,{l:"n+n",r:"2*n"},{l:"n+-n",r:"0"},f,{l:"n*(n1^-1)",r:"n/n1"},{l:"n*n1^-n2",r:"n/n1^n2"},{l:"n1^-1",r:"1/n1"},{l:"n*(n1/n2)",r:"(n*n1)/n2"},{l:"1*n",r:"n"}],O=[{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)"}],U=[{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)"}],F=[{l:"(n1/(n2/n3))",r:"((n1*n3)/n2)"},{l:"(n1/n2/n3)",r:"(n1/(n2*n3))"}],q={};return q.firstRules=_.concat(O,F),q.distrDivRules=U,q.sucDivRules=F,q.firstRulesAgain=_.concat(O),q.finalRules=[p,{l:"n*-n",r:"-n^2"},{l:"n*n",r:"n^2"},f,{l:"n*-n^n1",r:"-n^(n1+1)"},{l:"n*n^n1",r:"n^(n1+1)"},{l:"n^n1*-n^n2",r:"-n^(n1+n2)"},{l:"n^n1*n^n2",r:"n^(n1+n2)"},{l:"n^n1*-n",r:"-n^(n1+1)"},{l:"n^n1*n",r:"n^(n1+1)"},{l:"n^n1/-n",r:"-n^(n1-1)"},{l:"n^n1/n",r:"n^(n1-1)"},{l:"n/-n^n1",r:"-n^(1-n1)"},{l:"n/n^n1",r:"n^(1-n1)"},{l:"n^n1/-n^n2",r:"n^(n1-n2)"},{l:"n^n1/n^n2",r:"n^(n1-n2)"},{l:"n1+(-n2*n3)",r:"n1-n2*n3"},{l:"v*(-c)",r:"-c*v"},{l:"n1+-n2",r:"n1-n2"},{l:"v*c",r:"c*v"},{l:"(n1^n2)^n3",r:"(n1^(n2*n3))"}],q}function P(_,O,U){var F=_.type,q=arguments.length>1;if(F==="OperatorNode"&&_.isBinary()){var Y=!1,V;if(_.op==="^"&&(_.args[0].type==="ParenthesisNode"||_.args[0].type==="OperatorNode")&&_.args[1].type==="ConstantNode"&&(V=parseFloat(_.args[1].value),Y=V>=2&&Pe(V)),Y){if(V>2){var z=_.args[0],J=new D("^","pow",[_.args[0].cloneDeep(),new w(V-1)]);_=new D("*","multiply",[z,J])}else _=new D("*","multiply",[_.args[0],_.args[0].cloneDeep()]);q&&(U==="content"?O.content=_:O.args[U]=_)}}if(F==="ParenthesisNode")P(_.content,_,"content");else if(F!=="ConstantNode"&&F!=="SymbolNode")for(var le=0;le<_.args.length;le++)P(_.args[le],_,le);if(!q)return _}function R(_,O){O===void 0&&(O=[]),O[0]=0;var U={};U.cte=1,U.oper="+",U.fire="";var F=0,q="";se(_,null,U),F=O.length-1;for(var Y=!0,V,z=F;z>=0;z--)if(O[z]!==0){var J=new w(Y?O[z]:Math.abs(O[z])),le=O[z]<0?"-":"+";if(z>0){var Q=new S(q);if(z>1){var re=new w(z);Q=new D("^","pow",[Q,re])}O[z]===-1&&Y?J=new D("-","unaryMinus",[Q]):Math.abs(O[z])===1?J=Q:J=new D("*","multiply",[J,Q])}Y?V=J:le==="+"?V=new D("+","add",[V,J]):V=new D("-","subtract",[V,J]),Y=!1}if(Y)return new w(0);return V;function se(te,ae,fe){var ne=te.type;if(ne==="FunctionNode")throw new Error("There is an unsolved function call");if(ne==="OperatorNode"){if("+-*^".indexOf(te.op)===-1)throw new Error("Operator "+te.op+" invalid");if(ae!==null){if((te.fn==="unaryMinus"||te.fn==="pow")&&ae.fn!=="add"&&ae.fn!=="subtract"&&ae.fn!=="multiply")throw new Error("Invalid "+te.op+" placing");if((te.fn==="subtract"||te.fn==="add"||te.fn==="multiply")&&ae.fn!=="add"&&ae.fn!=="subtract")throw new Error("Invalid "+te.op+" placing");if((te.fn==="subtract"||te.fn==="add"||te.fn==="unaryMinus")&&fe.noFil!==0)throw new Error("Invalid "+te.op+" placing")}(te.op==="^"||te.op==="*")&&(fe.fire=te.op);for(var be=0;be<te.args.length;be++)te.fn==="unaryMinus"&&(fe.oper="-"),(te.op==="+"||te.fn==="subtract")&&(fe.fire="",fe.cte=1,fe.oper=be===0?"+":te.op),fe.noFil=be,se(te.args[be],te,fe)}else if(ne==="SymbolNode"){if(te.name!==q&&q!=="")throw new Error("There is more than one variable");if(q=te.name,ae===null){O[1]=1;return}if(ae.op==="^"&&fe.noFil!==0)throw new Error("In power the variable should be the first parameter");if(ae.op==="*"&&fe.noFil!==1)throw new Error("In multiply the variable should be the second parameter");(fe.fire===""||fe.fire==="*")&&(F<1&&(O[1]=0),O[1]+=fe.cte*(fe.oper==="+"?1:-1),F=Math.max(1,F))}else if(ne==="ConstantNode"){var $e=parseFloat(te.value);if(ae===null){O[0]=$e;return}if(ae.op==="^"){if(fe.noFil!==1)throw new Error("Constant cannot be powered");if(!Pe($e)||$e<=0)throw new Error("Non-integer exponent is not allowed");for(var k=F+1;k<$e;k++)O[k]=0;$e>F&&(O[$e]=0),O[$e]+=fe.cte*(fe.oper==="+"?1:-1),F=Math.max($e,F);return}fe.cte=$e,fe.fire===""&&(O[0]+=fe.cte*(fe.oper==="+"?1:-1))}else throw new Error("Type "+ne+" is not allowed")}}}),F1="zpk2tf",ate=["typed","add","multiply","Complex","number"],ite=L(F1,ate,e=>{var{typed:r,add:t,multiply:n,Complex:a,number:i}=e;return r(F1,{"Array,Array,number":function(l,c,f){return o(l,c,f)},"Array,Array":function(l,c){return o(l,c,1)},"Matrix,Matrix,number":function(l,c,f){return o(l.valueOf(),c.valueOf(),f)},"Matrix,Matrix":function(l,c){return o(l.valueOf(),c.valueOf(),1)}});function o(s,l,c){s.some(E=>E.type==="BigNumber")&&(s=s.map(E=>i(E))),l.some(E=>E.type==="BigNumber")&&(l=l.map(E=>i(E)));for(var f=[a(1,0)],p=[a(1,0)],v=0;v<s.length;v++){var m=s[v];typeof m=="number"&&(m=a(m,0)),f=u(f,[a(1,0),a(-m.re,-m.im)])}for(var d=0;d<l.length;d++){var y=l[d];typeof y=="number"&&(y=a(y,0)),p=u(p,[a(1,0),a(-y.re,-y.im)])}for(var h=0;h<f.length;h++)f[h]=n(f[h],c);return[f,p]}function u(s,l){for(var c=[],f=0;f<s.length+l.length-1;f++){c[f]=a(0,0);for(var p=0;p<s.length;p++)f-p>=0&&f-p<l.length&&(c[f]=t(c[f],n(s[p],l[f-p])))}return c}}),B1="freqz",ote=["typed","add","multiply","Complex","divide","matrix"],ste=L(B1,ote,e=>{var{typed:r,add:t,multiply:n,Complex:a,divide:i,matrix:o}=e;return r(B1,{"Array, Array":function(c,f){var p=s(512);return u(c,f,p)},"Array, Array, Array":function(c,f,p){return u(c,f,p)},"Array, Array, number":function(c,f,p){if(p<0)throw new Error("w must be a positive number");var v=s(p);return u(c,f,v)},"Matrix, Matrix":function(c,f){var p=s(512),{w:v,h:m}=u(c.valueOf(),f.valueOf(),p);return{w:o(v),h:o(m)}},"Matrix, Matrix, Matrix":function(c,f,p){var{h:v}=u(c.valueOf(),f.valueOf(),p.valueOf());return{h:o(v),w:o(p)}},"Matrix, Matrix, number":function(c,f,p){if(p<0)throw new Error("w must be a positive number");var v=s(p),{h:m}=u(c.valueOf(),f.valueOf(),v);return{h:o(m),w:o(v)}}});function u(l,c,f){for(var p=[],v=[],m=0;m<f.length;m++){for(var d=a(0,0),y=a(0,0),h=0;h<l.length;h++)d=t(d,n(l[h],a(Math.cos(-h*f[m]),Math.sin(-h*f[m]))));for(var E=0;E<c.length;E++)y=t(y,n(c[E],a(Math.cos(-E*f[m]),Math.sin(-E*f[m]))));p.push(d),v.push(y)}for(var g=[],w=0;w<p.length;w++)g.push(i(p[w],v[w]));return{h:g,w:f}}function s(l){for(var c=[],f=0;f<l;f++)c.push(f/l*Math.PI);return c}}),ute="reviver",lte=["classes"],cte=L(ute,lte,e=>{var{classes:r}=e;return function(n,a){var i=r[a&&a.mathjs];return i&&typeof i.fromJSON=="function"?i.fromJSON(a):a}}),fte="replacer",pte=[],vte=L(fte,pte,()=>function(r,t){return typeof t=="number"&&(!isFinite(t)||isNaN(t))?{mathjs:"number",value:String(t)}:t}),dte="12.4.1",mte=L("true",[],()=>!0),hte=L("false",[],()=>!1),gte=L("null",[],()=>null),yte=Dt("Infinity",["config","?BigNumber"],e=>{var{config:r,BigNumber:t}=e;return r.number==="BigNumber"?new t(1/0):1/0}),bte=Dt("NaN",["config","?BigNumber"],e=>{var{config:r,BigNumber:t}=e;return r.number==="BigNumber"?new t(NaN):NaN}),xte=Dt("pi",["config","?BigNumber"],e=>{var{config:r,BigNumber:t}=e;return r.number==="BigNumber"?Tf(t):BL}),wte=Dt("tau",["config","?BigNumber"],e=>{var{config:r,BigNumber:t}=e;return r.number==="BigNumber"?nG(t):RL}),Ete=Dt("e",["config","?BigNumber"],e=>{var{config:r,BigNumber:t}=e;return r.number==="BigNumber"?rG(t):PL}),Ste=Dt("phi",["config","?BigNumber"],e=>{var{config:r,BigNumber:t}=e;return r.number==="BigNumber"?tG(t):zL}),Ate=Dt("LN2",["config","?BigNumber"],e=>{var{config:r,BigNumber:t}=e;return r.number==="BigNumber"?new t(2).ln():Math.LN2}),Dte=Dt("LN10",["config","?BigNumber"],e=>{var{config:r,BigNumber:t}=e;return r.number==="BigNumber"?new t(10).ln():Math.LN10}),Nte=Dt("LOG2E",["config","?BigNumber"],e=>{var{config:r,BigNumber:t}=e;return r.number==="BigNumber"?new t(1).div(new t(2).ln()):Math.LOG2E}),Cte=Dt("LOG10E",["config","?BigNumber"],e=>{var{config:r,BigNumber:t}=e;return r.number==="BigNumber"?new t(1).div(new t(10).ln()):Math.LOG10E}),Mte=Dt("SQRT1_2",["config","?BigNumber"],e=>{var{config:r,BigNumber:t}=e;return r.number==="BigNumber"?new t("0.5").sqrt():Math.SQRT1_2}),Tte=Dt("SQRT2",["config","?BigNumber"],e=>{var{config:r,BigNumber:t}=e;return r.number==="BigNumber"?new t(2).sqrt():Math.SQRT2}),Ote=Dt("i",["Complex"],e=>{var{Complex:r}=e;return r.I}),_te=L("version",[],()=>dte);function Dt(e,r,t){return L(e,r,t,{recreateOnConfigChange:!0})}var $te=Ye("speedOfLight","299792458","m s^-1"),Fte=Ye("gravitationConstant","6.67430e-11","m^3 kg^-1 s^-2"),Bte=Ye("planckConstant","6.62607015e-34","J s"),Rte=Ye("reducedPlanckConstant","1.0545718176461565e-34","J s"),Pte=Ye("magneticConstant","1.25663706212e-6","N A^-2"),zte=Ye("electricConstant","8.8541878128e-12","F m^-1"),Ite=Ye("vacuumImpedance","376.730313667","ohm"),Lte=Ye("coulomb","8.987551792261171e9","N m^2 C^-2"),qte=Ye("elementaryCharge","1.602176634e-19","C"),kte=Ye("bohrMagneton","9.2740100783e-24","J T^-1"),Ute=Ye("conductanceQuantum","7.748091729863649e-5","S"),Hte=Ye("inverseConductanceQuantum","12906.403729652257","ohm"),jte=Ye("magneticFluxQuantum","2.0678338484619295e-15","Wb"),Vte=Ye("nuclearMagneton","5.0507837461e-27","J T^-1"),Gte=Ye("klitzing","25812.807459304513","ohm"),Wte=Ye("bohrRadius","5.29177210903e-11","m"),Zte=Ye("classicalElectronRadius","2.8179403262e-15","m"),Yte=Ye("electronMass","9.1093837015e-31","kg"),Xte=Ye("fermiCoupling","1.1663787e-5","GeV^-2"),Kte=Nu("fineStructure",.0072973525693),Jte=Ye("hartreeEnergy","4.3597447222071e-18","J"),Qte=Ye("protonMass","1.67262192369e-27","kg"),ene=Ye("deuteronMass","3.3435830926e-27","kg"),rne=Ye("neutronMass","1.6749271613e-27","kg"),tne=Ye("quantumOfCirculation","3.6369475516e-4","m^2 s^-1"),nne=Ye("rydberg","10973731.568160","m^-1"),ane=Ye("thomsonCrossSection","6.6524587321e-29","m^2"),ine=Nu("weakMixingAngle",.2229),one=Nu("efimovFactor",22.7),sne=Ye("atomicMass","1.66053906660e-27","kg"),une=Ye("avogadro","6.02214076e23","mol^-1"),lne=Ye("boltzmann","1.380649e-23","J K^-1"),cne=Ye("faraday","96485.33212331001","C mol^-1"),fne=Ye("firstRadiation","3.7417718521927573e-16","W m^2"),pne=Ye("loschmidt","2.686780111798444e25","m^-3"),vne=Ye("gasConstant","8.31446261815324","J K^-1 mol^-1"),dne=Ye("molarPlanckConstant","3.990312712893431e-10","J s mol^-1"),mne=Ye("molarVolume","0.022413969545014137","m^3 mol^-1"),hne=Nu("sackurTetrode",-1.16487052358),gne=Ye("secondRadiation","0.014387768775039337","m K"),yne=Ye("stefanBoltzmann","5.67037441918443e-8","W m^-2 K^-4"),bne=Ye("wienDisplacement","2.897771955e-3","m K"),xne=Ye("molarMass","0.99999999965e-3","kg mol^-1"),wne=Ye("molarMassC12","11.9999999958e-3","kg mol^-1"),Ene=Ye("gravity","9.80665","m s^-2"),Sne=Ye("planckLength","1.616255e-35","m"),Ane=Ye("planckMass","2.176435e-8","kg"),Dne=Ye("planckTime","5.391245e-44","s"),Nne=Ye("planckCharge","1.87554603778e-18","C"),Cne=Ye("planckTemperature","1.416785e+32","K");function Ye(e,r,t){var n=["config","Unit","BigNumber"];return L(e,n,a=>{var{config:i,Unit:o,BigNumber:u}=a,s=i.number==="BigNumber"?new u(r):parseFloat(r),l=new o(s,t);return l.fixPrefix=!0,l})}function Nu(e,r){var t=["config","BigNumber"];return L(e,t,n=>{var{config:a,BigNumber:i}=n;return a.number==="BigNumber"?new i(r):r})}var Mne="apply",Tne=["typed","isInteger"],One=L(Mne,Tne,e=>{var{typed:r,isInteger:t}=e,n=Sf({typed:r,isInteger:t});return r("apply",{"...any":function(i){var o=i[1];Ke(o)?i[1]=o-1:Je(o)&&(i[1]=o.minus(1));try{return n.apply(null,i)}catch(u){throw ft(u)}}})},{isTransformFunction:!0}),_ne="column",$ne=["typed","Index","matrix","range"],Fne=L(_ne,$ne,e=>{var{typed:r,Index:t,matrix:n,range:a}=e,i=Lb({typed:r,Index:t,matrix:n,range:a});return r("column",{"...any":function(u){var s=u.length-1,l=u[s];Ke(l)&&(u[s]=l-1);try{return i.apply(null,u)}catch(c){throw ft(c)}}})},{isTransformFunction:!0});function If(e,r,t){var n=e.filter(function(s){return Vr(s)&&!(s.name in r)&&!t.has(s.name)})[0];if(!n)throw new Error('No undefined variable found in inline expression "'+e+'"');var a=n.name,i=new Map,o=new y2(t,i,new Set([a])),u=e.compile();return function(l){return i.set(a,l),u.evaluate(o)}}var Bne="filter",Rne=["typed"],Pne=L(Bne,Rne,e=>{var{typed:r}=e;function t(a,i,o){var u,s;return a[0]&&(u=a[0].compile().evaluate(o)),a[1]&&(Vr(a[1])||ho(a[1])?s=a[1].compile().evaluate(o):s=If(a[1],i,o)),n(u,s)}t.rawArgs=!0;var n=r("filter",{"Array, function":R1,"Matrix, function":function(i,o){return i.create(R1(i.toArray(),o))},"Array, RegExp":Es,"Matrix, RegExp":function(i,o){return i.create(Es(i.toArray(),o))}});return t},{isTransformFunction:!0});function R1(e,r){return v2(e,function(t,n,a){return Ei(r,t,[n+1],a,"filter")})}var zne="forEach",Ine=["typed"],Lne=L(zne,Ine,e=>{var{typed:r}=e;function t(a,i,o){var u,s;return a[0]&&(u=a[0].compile().evaluate(o)),a[1]&&(Vr(a[1])||ho(a[1])?s=a[1].compile().evaluate(o):s=If(a[1],i,o)),n(u,s)}t.rawArgs=!0;var n=r("forEach",{"Array | Matrix, function":function(i,o){var u=function s(l,c){if(Array.isArray(l))hu(l,function(f,p){s(f,c.concat(p+1))});else return Ei(o,l,c,i,"forEach")};u(i.valueOf(),[])}});return t},{isTransformFunction:!0}),qne="index",kne=["Index","getMatrixDataType"],Une=L(qne,kne,e=>{var{Index:r,getMatrixDataType:t}=e;return function(){for(var a=[],i=0,o=arguments.length;i<o;i++){var u=arguments[i];if(gf(u))u.start--,u.end-=u.step>0?0:2;else if(u&&u.isSet===!0)u=u.map(function(l){return l-1});else if(mr(u)||ke(u))t(u)!=="boolean"&&(u=u.map(function(l){return l-1}));else if(Ke(u))u--;else if(Je(u))u=u.toNumber()-1;else if(typeof u!="string")throw new TypeError("Dimension must be an Array, Matrix, number, string, or Range");a[i]=u}var s=new r;return r.apply(s,a),s}},{isTransformFunction:!0}),Hne="map",jne=["typed"],Vne=L(Hne,jne,e=>{var{typed:r}=e;function t(a,i,o){var u,s;return a[0]&&(u=a[0].compile().evaluate(o)),a[1]&&(Vr(a[1])||ho(a[1])?s=a[1].compile().evaluate(o):s=If(a[1],i,o)),n(u,s)}t.rawArgs=!0;var n=r("map",{"Array, function":function(i,o){return P1(i,o,i)},"Matrix, function":function(i,o){return i.create(P1(i.valueOf(),o,i))}});return t},{isTransformFunction:!0});function P1(e,r,t){function n(a,i){return Array.isArray(a)?mn(a,function(o,u){return n(o,i.concat(u+1))}):Ei(r,a,i,t,"map")}return n(e,[])}function qn(e){if(e.length===2&&Bt(e[0])){e=e.slice();var r=e[1];Ke(r)?e[1]=r-1:Je(r)&&(e[1]=r.minus(1))}return e}var Gne="max",Wne=["typed","config","numeric","larger"],Zne=L(Gne,Wne,e=>{var{typed:r,config:t,numeric:n,larger:a}=e,i=Yb({typed:r,config:t,numeric:n,larger:a});return r("max",{"...any":function(u){u=qn(u);try{return i.apply(null,u)}catch(s){throw ft(s)}}})},{isTransformFunction:!0}),Yne="mean",Xne=["typed","add","divide"],Kne=L(Yne,Xne,e=>{var{typed:r,add:t,divide:n}=e,a=ax({typed:r,add:t,divide:n});return r("mean",{"...any":function(o){o=qn(o);try{return a.apply(null,o)}catch(u){throw ft(u)}}})},{isTransformFunction:!0}),Jne="min",Qne=["typed","config","numeric","smaller"],eae=L(Jne,Qne,e=>{var{typed:r,config:t,numeric:n,smaller:a}=e,i=Xb({typed:r,config:t,numeric:n,smaller:a});return r("min",{"...any":function(u){u=qn(u);try{return i.apply(null,u)}catch(s){throw ft(s)}}})},{isTransformFunction:!0}),rae="range",tae=["typed","config","?matrix","?bignumber","smaller","smallerEq","larger","largerEq","add","isPositive"],nae=L(rae,tae,e=>{var{typed:r,config:t,matrix:n,bignumber:a,smaller:i,smallerEq:o,larger:u,largerEq:s,add:l,isPositive:c}=e,f=Hb({typed:r,config:t,matrix:n,bignumber:a,smaller:i,smallerEq:o,larger:u,largerEq:s,add:l,isPositive:c});return r("range",{"...any":function(v){var m=v.length-1,d=v[m];return typeof d!="boolean"&&v.push(!0),f.apply(null,v)}})},{isTransformFunction:!0}),aae="row",iae=["typed","Index","matrix","range"],oae=L(aae,iae,e=>{var{typed:r,Index:t,matrix:n,range:a}=e,i=jb({typed:r,Index:t,matrix:n,range:a});return r("row",{"...any":function(u){var s=u.length-1,l=u[s];Ke(l)&&(u[s]=l-1);try{return i.apply(null,u)}catch(c){throw ft(c)}}})},{isTransformFunction:!0}),sae="subset",uae=["typed","matrix","zeros","add"],lae=L(sae,uae,e=>{var{typed:r,matrix:t,zeros:n,add:a}=e,i=Vb({typed:r,matrix:t,zeros:n,add:a});return r("subset",{"...any":function(u){try{return i.apply(null,u)}catch(s){throw ft(s)}}})},{isTransformFunction:!0}),cae="concat",fae=["typed","matrix","isInteger"],pae=L(cae,fae,e=>{var{typed:r,matrix:t,isInteger:n}=e,a=Ib({typed:r,matrix:t,isInteger:n});return r("concat",{"...any":function(o){var u=o.length-1,s=o[u];Ke(s)?o[u]=s-1:Je(s)&&(o[u]=s.minus(1));try{return a.apply(null,o)}catch(l){throw ft(l)}}})},{isTransformFunction:!0}),z1="diff",vae=["typed","matrix","subtract","number","bignumber"],dae=L(z1,vae,e=>{var{typed:r,matrix:t,subtract:n,number:a,bignumber:i}=e,o=qb({typed:r,matrix:t,subtract:n,number:a,bignumber:i});return r(z1,{"...any":function(s){s=qn(s);try{return o.apply(null,s)}catch(l){throw ft(l)}}})},{isTransformFunction:!0}),mae="std",hae=["typed","map","sqrt","variance"],gae=L(mae,hae,e=>{var{typed:r,map:t,sqrt:n,variance:a}=e,i=sx({typed:r,map:t,sqrt:n,variance:a});return r("std",{"...any":function(u){u=qn(u);try{return i.apply(null,u)}catch(s){throw ft(s)}}})},{isTransformFunction:!0}),I1="sum",yae=["typed","config","add","numeric"],bae=L(I1,yae,e=>{var{typed:r,config:t,add:n,numeric:a}=e,i=tx({typed:r,config:t,add:n,numeric:a});return r(I1,{"...any":function(u){u=qn(u);try{return i.apply(null,u)}catch(s){throw ft(s)}}})},{isTransformFunction:!0}),xae="quantileSeq",wae=["typed","bignumber","add","subtract","divide","multiply","partitionSelect","compare","isInteger","smaller","smallerEq","larger"],Eae=L(xae,wae,e=>{var{typed:r,bignumber:t,add:n,subtract:a,divide:i,multiply:o,partitionSelect:u,compare:s,isInteger:l,smaller:c,smallerEq:f,larger:p}=e,v=ox({typed:r,bignumber:t,add:n,subtract:a,divide:i,multiply:o,partitionSelect:u,compare:s,isInteger:l,smaller:c,smallerEq:f,larger:p});return r("quantileSeq",{"Array | Matrix, number | BigNumber":v,"Array | Matrix, number | BigNumber, number":(d,y,h)=>v(d,y,m(h)),"Array | Matrix, number | BigNumber, boolean":v,"Array | Matrix, number | BigNumber, boolean, number":(d,y,h,E)=>v(d,y,h,m(E)),"Array | Matrix, Array | Matrix":v,"Array | Matrix, Array | Matrix, number":(d,y,h)=>v(d,y,m(h)),"Array | Matrix, Array | Matrix, boolean":v,"Array | Matrix, Array | Matrix, boolean, number":(d,y,h,E)=>v(d,y,h,m(E))});function m(d){return qn([[],d])[1]}},{isTransformFunction:!0}),L1="cumsum",Sae=["typed","add","unaryPlus"],Aae=L(L1,Sae,e=>{var{typed:r,add:t,unaryPlus:n}=e,a=nx({typed:r,add:t,unaryPlus:n});return r(L1,{"...any":function(o){if(o.length===2&&Bt(o[0])){var u=o[1];Ke(u)?o[1]=u-1:Je(u)&&(o[1]=u.minus(1))}try{return a.apply(null,o)}catch(s){throw ft(s)}}})},{isTransformFunction:!0}),q1="variance",Dae=["typed","add","subtract","multiply","divide","apply","isNaN"],Nae=L(q1,Dae,e=>{var{typed:r,add:t,subtract:n,multiply:a,divide:i,apply:o,isNaN:u}=e,s=ix({typed:r,add:t,subtract:n,multiply:a,divide:i,apply:o,isNaN:u});return r(q1,{"...any":function(c){c=qn(c);try{return s.apply(null,c)}catch(f){throw ft(f)}}})},{isTransformFunction:!0}),k1="print",Cae=["typed","matrix","zeros","add"],Mae=L(k1,Cae,e=>{var{typed:r,matrix:t,zeros:n,add:a}=e,i=Wb({typed:r,matrix:t,zeros:n,add:a});return r(k1,{"string, Object | Array":function(s,l){return i(o(s),l)},"string, Object | Array, number | Object":function(s,l,c){return i(o(s),l,c)}});function o(u){return u.replace(Gb,s=>{var l=s.slice(1).split("."),c=l.map(function(f){return!isNaN(f)&&f.length>0?parseInt(f)-1:f});return"$"+c.join(".")})}},{isTransformFunction:!0}),Tae="and",Oae=["typed","matrix","zeros","add","equalScalar","not","concat"],_ae=L(Tae,Oae,e=>{var{typed:r,matrix:t,equalScalar:n,zeros:a,not:i,concat:o}=e,u=Zb({typed:r,matrix:t,equalScalar:n,zeros:a,not:i,concat:o});function s(l,c,f){var p=l[0].compile().evaluate(f);if(!Bt(p)&&!u(p,!0))return!1;var v=l[1].compile().evaluate(f);return u(p,v)}return s.rawArgs=!0,s},{isTransformFunction:!0}),$ae="or",Fae=["typed","matrix","equalScalar","DenseMatrix","concat"],Bae=L($ae,Fae,e=>{var{typed:r,matrix:t,equalScalar:n,DenseMatrix:a,concat:i}=e,o=zb({typed:r,matrix:t,equalScalar:n,DenseMatrix:a,concat:i});function u(s,l,c){var f=s[0].compile().evaluate(c);if(!Bt(f)&&o(f,!1))return!0;var p=s[1].compile().evaluate(c);return o(f,p)}return u.rawArgs=!0,u},{isTransformFunction:!0}),Rae="bitAnd",Pae=["typed","matrix","zeros","add","equalScalar","not","concat"],zae=L(Rae,Pae,e=>{var{typed:r,matrix:t,equalScalar:n,zeros:a,not:i,concat:o}=e,u=Rb({typed:r,matrix:t,equalScalar:n,zeros:a,not:i,concat:o});function s(l,c,f){var p=l[0].compile().evaluate(f);if(!Bt(p)){if(isNaN(p))return NaN;if(p===0||p===!1)return 0}var v=l[1].compile().evaluate(f);return u(p,v)}return s.rawArgs=!0,s},{isTransformFunction:!0}),Iae="bitOr",Lae=["typed","matrix","equalScalar","DenseMatrix","concat"],qae=L(Iae,Lae,e=>{var{typed:r,matrix:t,equalScalar:n,DenseMatrix:a,concat:i}=e,o=Pb({typed:r,matrix:t,equalScalar:n,DenseMatrix:a,concat:i});function u(s,l,c){var f=s[0].compile().evaluate(c);if(!Bt(f)){if(isNaN(f))return NaN;if(f===-1)return-1;if(f===!0)return 1}var p=s[1].compile().evaluate(c);return o(f,p)}return u.rawArgs=!0,u},{isTransformFunction:!0}),_e=lL({config:ge}),Nr=vL({}),U1=Ete({BigNumber:_e,config:ge}),kae=hte({}),Uae=Kte({BigNumber:_e,config:ge}),fa=gL({}),cx=Ote({Complex:Nr}),Hae=yte({BigNumber:_e,config:ge}),jae=Dte({BigNumber:_e,config:ge}),Vae=Cte({BigNumber:_e,config:ge}),Cu=SL({}),Gae=bte({BigNumber:_e,config:ge}),Wae=gte({}),Zae=Ste({BigNumber:_e,config:ge}),Yae=xL({}),fx=vI({}),Xae=Mte({BigNumber:_e,config:ge}),Kae=hne({BigNumber:_e,config:ge}),px=wte({BigNumber:_e,config:ge}),Jae=mte({}),Qae=_te({}),Qe=CL({Matrix:Cu}),eie=one({BigNumber:_e,config:ge}),rie=Ate({BigNumber:_e,config:ge}),sc=xte({BigNumber:_e,config:ge}),tie=vte({}),nie=Tte({BigNumber:_e,config:ge}),Z=lI({BigNumber:_e,Complex:Nr,DenseMatrix:Qe,Fraction:fa}),Lf=Iq({BigNumber:_e,config:ge,typed:Z}),aie=ine({BigNumber:_e,config:ge}),pt=qq({typed:Z}),iie=dG({Complex:Nr,config:ge,typed:Z}),oie=yG({BigNumber:_e,typed:Z}),sie=EG({BigNumber:_e,Complex:Nr,config:ge,typed:Z}),jr=jq({typed:Z}),uie=_U({typed:Z}),lie=MG({BigNumber:_e,Complex:Nr,config:ge,typed:Z}),cie=FG({typed:Z}),vx=PG({typed:Z}),fie=qG({Complex:Nr,config:ge,typed:Z}),St=yq({BigNumber:_e,typed:Z}),pie=AU({typed:Z}),vie=mq({typed:Z}),die=TL({typed:Z}),Mu=Gee({typed:Z}),Tu=wq({Complex:Nr,typed:Z}),pa=FU({typed:Z}),qf=UG({typed:Z}),mie=GG({BigNumber:_e,typed:Z}),hie=XG({BigNumber:_e,typed:Z}),gie=ik({typed:Z}),ar=nq({config:ge,typed:Z}),yie=rj({typed:Z}),dx=sk({typed:Z}),bie=lk({Complex:Nr,typed:Z}),xie=QU({typed:Z}),wie=nH({typed:Z}),xo=pj({typed:Z}),kf=oH({typed:Z}),Eie=yj({format:xo,typed:Z}),Uf=RU({typed:Z}),mt=_L({typed:Z}),kn=UL({typed:Z}),va=ZL({typed:Z}),Qt=XL({typed:Z}),Sie=Nte({BigNumber:_e,config:ge}),Aie=Jee({Complex:Nr,typed:Z}),Die=jk({Complex:Nr,config:ge,typed:Z}),mx=Gk({Complex:Nr,config:ge,typed:Z}),da=pH({typed:Z}),Ir=Yk({typed:Z}),ks=LU({typed:Z}),En=fq({typed:Z}),Nie=hj({format:xo,typed:Z}),Cie=Are({config:ge,typed:Z}),Mie=Wb({typed:Z}),Tie=Nre({config:ge,typed:Z}),Hf=zU({typed:Z}),Oie=eW({BigNumber:_e,typed:Z}),hx=rU({BigNumber:_e,Fraction:fa,complex:Tu,typed:Z}),Ou=aW({typed:Z}),Sn=oq({Matrix:Cu,equalScalar:ar,typed:Z}),_ie=Bq({typed:Z}),$ie=oU({typed:Z}),Fie=vq({typed:Z}),Pt=Gq({typed:Z}),Bie=uW({typed:Z}),gx=eq({typed:Z}),Rie=hG({Complex:Nr,config:ge,typed:Z}),Pie=AG({BigNumber:_e,typed:Z}),jf=Sf({isInteger:mt,typed:Z}),zie=NG({BigNumber:_e,Complex:Nr,config:ge,typed:Z}),Iie=dj({format:xo,typed:Z}),Lie=Zee({typed:Z}),qie=jG({typed:Z}),kie=JG({BigNumber:_e,typed:Z}),wo=JL({typed:Z}),Uie=Sj({typed:Z}),Hie=Mre({config:ge,typed:Z}),jie=tW({BigNumber:_e,typed:Z}),Vie=oW({typed:Z}),Gie=cG({SparseMatrix:Sn,typed:Z}),en=aU({Complex:Nr,config:ge,typed:Z}),Wie=fW({typed:Z}),on=Pq({typed:Z}),Zie=xG({BigNumber:_e,Complex:Nr,config:ge,typed:Z}),Yie=ZG({BigNumber:_e,typed:Z}),Ai=Aq({Fraction:fa,typed:Z}),ma=jL({typed:Z}),Ne=Nq({DenseMatrix:Qe,Matrix:Cu,SparseMatrix:Sn,typed:Z}),Xie=Mq({isZero:Qt,matrix:Ne,typed:Z}),Kie=uj({isNaN:wo,isNumeric:ma,typed:Z}),Vt=Nj({bignumber:St,fraction:Ai,number:En}),yx=cj({config:ge,multiplyScalar:Ir,numeric:Vt,typed:Z}),bx=xH({isInteger:mt,matrix:Ne,typed:Z}),Qr=OH({matrix:Ne,config:ge,typed:Z}),Jie=$H({matrix:Ne,typed:Z}),Eo=IH({matrix:Ne,typed:Z}),xx=cU({BigNumber:_e,config:ge,matrix:Ne,typed:Z}),Kr=UH({BigNumber:_e,config:ge,matrix:Ne,typed:Z}),Qie=OG({Complex:Nr,config:ge,typed:Z}),wx=Zq({BigNumber:_e,Complex:Nr,Fraction:fa,config:ge,isNegative:kn,matrix:Ne,typed:Z,unaryMinus:on}),cr=Ib({isInteger:mt,matrix:Ne,typed:Z}),eoe=GU({prod:yx,size:Qr,typed:Z}),Vf=qH({conj:pa,transpose:Eo,typed:Z}),Ex=XU({DenseMatrix:Qe,SparseMatrix:Sn,matrix:Ne,typed:Z}),Br=Mj({numeric:Vt,typed:Z}),So=Uj({DenseMatrix:Qe,concat:cr,divideScalar:Br,equalScalar:ar,matrix:Ne,typed:Z}),zt=hV({DenseMatrix:Qe,concat:cr,equalScalar:ar,matrix:Ne,typed:Z}),Ao=rH({matrix:Ne,typed:Z}),roe=GL({isNumeric:ma,typed:Z}),Un=uH({BigNumber:_e,DenseMatrix:Qe,SparseMatrix:Sn,config:ge,matrix:Ne,typed:Z}),toe=cH({matrix:Ne,multiplyScalar:Ir,typed:Z}),_u=OV({DenseMatrix:Qe,concat:cr,config:ge,matrix:Ne,typed:Z}),noe=eV({DenseMatrix:Qe,concat:cr,equalScalar:ar,matrix:Ne,typed:Z,zeros:Kr}),Sx=jj({DenseMatrix:Qe,divideScalar:Br,equalScalar:ar,matrix:Ne,multiplyScalar:Ir,subtractScalar:Pt,typed:Z}),Gf=$q({flatten:Ao,matrix:Ne,size:Qr,typed:Z}),aoe=Qk({BigNumber:_e,concat:cr,equalScalar:ar,matrix:Ne,typed:Z}),ioe=gH({BigNumber:_e,config:ge,matrix:Ne,typed:Z}),Wf=WZ({addScalar:jr,complex:Tu,conj:pa,divideScalar:Br,equal:zt,identity:Un,isZero:Qt,matrix:Ne,multiplyScalar:Ir,sign:hx,sqrt:en,subtractScalar:Pt,typed:Z,unaryMinus:on,zeros:Kr}),ooe=SH({config:ge,matrix:Ne}),soe=tV({DenseMatrix:Qe,concat:cr,equalScalar:ar,matrix:Ne,typed:Z,zeros:Kr}),Di=$j({BigNumber:_e,DenseMatrix:Qe,config:ge,equalScalar:ar,matrix:Ne,typed:Z,zeros:Kr}),ot=wV({DenseMatrix:Qe,concat:cr,config:ge,matrix:Ne,typed:Z}),zr=uU({DenseMatrix:Qe,concat:cr,equalScalar:ar,matrix:Ne,subtractScalar:Pt,typed:Z,unaryMinus:on}),uoe=wj({concat:cr,matrix:Ne,typed:Z}),loe=RV({DenseMatrix:Qe,concat:cr,config:ge,equalScalar:ar,matrix:Ne,typed:Z}),Zf=Gj({DenseMatrix:Qe,divideScalar:Br,equalScalar:ar,matrix:Ne,multiplyScalar:Ir,subtractScalar:Pt,typed:Z}),coe=UU({DenseMatrix:Qe,concat:cr,matrix:Ne,typed:Z}),sr=FW({DenseMatrix:Qe,SparseMatrix:Sn,addScalar:jr,concat:cr,equalScalar:ar,matrix:Ne,typed:Z}),foe=IG({BigNumber:_e,DenseMatrix:Qe,concat:cr,equalScalar:ar,matrix:Ne,typed:Z}),poe=Rb({concat:cr,equalScalar:ar,matrix:Ne,typed:Z}),voe=Pb({DenseMatrix:Qe,concat:cr,equalScalar:ar,matrix:Ne,typed:Z}),doe=TU({DenseMatrix:Qe,concat:cr,matrix:Ne,typed:Z}),moe=Bre({addScalar:jr,combinations:Mu,divideScalar:Br,isInteger:mt,isNegative:kn,multiplyScalar:Ir,typed:Z}),ha=sV({BigNumber:_e,DenseMatrix:Qe,Fraction:fa,concat:cr,config:ge,equalScalar:ar,matrix:Ne,typed:Z}),Ax=dV({concat:cr,matrix:Ne,typed:Z}),hoe=nx({add:sr,typed:Z,unaryPlus:Lf}),Yf=FV({equal:zt,typed:Z}),goe=qb({matrix:Ne,number:En,subtract:zr,typed:Z}),yoe=Tee({abs:pt,addScalar:jr,deepEqual:Yf,divideScalar:Br,multiplyScalar:Ir,sqrt:en,subtractScalar:Pt,typed:Z}),$u=LW({addScalar:jr,conj:pa,multiplyScalar:Ir,size:Qr,typed:Z}),boe=bV({compareText:Ax,isZero:Qt,typed:Z}),Dx=$b({DenseMatrix:Qe,config:ge,equalScalar:ar,matrix:Ne,round:Di,typed:Z,zeros:Kr}),xoe=Ik({BigNumber:_e,DenseMatrix:Qe,concat:cr,config:ge,equalScalar:ar,matrix:Ne,round:Di,typed:Z,zeros:Kr}),woe=RW({abs:pt,addScalar:jr,divideScalar:Br,isPositive:va,multiplyScalar:Ir,smaller:ot,sqrt:en,typed:Z}),Nx=VV({DenseMatrix:Qe,smaller:ot}),rt=ZV({ImmutableDenseMatrix:Nx,getMatrixDataType:kf}),st=CV({DenseMatrix:Qe,concat:cr,config:ge,matrix:Ne,typed:Z}),Xf=Bj({Complex:Nr,config:ge,divideScalar:Br,typed:Z}),Eoe=Zj({DenseMatrix:Qe,divideScalar:Br,equalScalar:ar,matrix:Ne,multiplyScalar:Ir,subtractScalar:Pt,typed:Z}),Soe=Oq({flatten:Ao,matrix:Ne,size:Qr,typed:Z}),Aoe=Xb({config:ge,numeric:Vt,smaller:ot,typed:Z}),Cx=Fb({DenseMatrix:Qe,concat:cr,config:ge,equalScalar:ar,matrix:Ne,round:Di,typed:Z,zeros:Kr}),gr=Kk({addScalar:jr,dot:$u,equalScalar:ar,matrix:Ne,multiplyScalar:Ir,typed:Z}),Doe=Ij({Complex:Nr,config:ge,divideScalar:Br,typed:Z}),Noe=zb({DenseMatrix:Qe,concat:cr,equalScalar:ar,matrix:Ne,typed:Z}),Fu=IV({compare:ha,isNaN:wo,isNumeric:ma,typed:Z}),Coe=aV({DenseMatrix:Qe,concat:cr,equalScalar:ar,matrix:Ne,typed:Z,zeros:Kr}),Mx=gY({SparseMatrix:Sn,abs:pt,add:sr,divideScalar:Br,larger:st,largerEq:_u,multiply:gr,subtract:zr,transpose:Eo,typed:Z}),Nt=Vb({add:sr,matrix:Ne,typed:Z,zeros:Kr}),Kf=tx({add:sr,config:ge,numeric:Vt,typed:Z}),Moe=UW({add:sr,matrix:Ne,typed:Z}),Tx=Xj({DenseMatrix:Qe,divideScalar:Br,equalScalar:ar,matrix:Ne,multiplyScalar:Ir,subtractScalar:Pt,typed:Z}),Toe=ite({Complex:Nr,add:sr,multiply:gr,number:En,typed:Z}),Jf=nk({DenseMatrix:Qe,config:ge,equalScalar:ar,matrix:Ne,round:Di,typed:Z,zeros:Kr}),sn=fV({compare:ha,typed:Z}),Ooe=Pre({addScalar:jr,combinations:Mu,isInteger:mt,isNegative:kn,isPositive:va,larger:st,typed:Z}),_oe=ZU({matrix:Ne,multiply:gr,subtract:zr,typed:Z}),Ox=iee({divideScalar:Br,isZero:Qt,matrix:Ne,multiply:gr,subtractScalar:Pt,typed:Z,unaryMinus:on}),$oe=hU({concat:cr,equalScalar:ar,matrix:Ne,multiplyScalar:Ir,typed:Z}),_x=KV({larger:st,smaller:ot}),$x=pk({Complex:Nr,DenseMatrix:Qe,ceil:Jf,equalScalar:ar,floor:Dx,matrix:Ne,typed:Z,zeros:Kr}),Fx=jW({Index:rt,typed:Z}),Foe=$ee({abs:pt,add:sr,addScalar:jr,config:ge,divideScalar:Br,equalScalar:ar,flatten:Ao,isNumeric:ma,isZero:Qt,matrix:Ne,multiply:gr,multiplyScalar:Ir,smaller:ot,subtract:zr,typed:Z}),Boe=pU({BigNumber:_e,add:sr,config:ge,equal:zt,isInteger:mt,mod:Cx,smaller:ot,typed:Z,xgcd:xx}),Roe=Uk({concat:cr,equalScalar:ar,matrix:Ne,typed:Z}),Poe=Pj({Complex:Nr,config:ge,divideScalar:Br,log:Xf,typed:Z}),Qf=Yb({config:ge,larger:st,numeric:Vt,typed:Z}),zoe=vW({DenseMatrix:Qe,Index:rt,compareNatural:sn,size:Qr,subset:Nt,typed:Z}),Ioe=gW({DenseMatrix:Qe,Index:rt,compareNatural:sn,size:Qr,subset:Nt,typed:Z}),Loe=wW({Index:rt,compareNatural:sn,size:Qr,subset:Nt,typed:Z}),qoe=DW({Index:rt,compareNatural:sn,size:Qr,subset:Nt,typed:Z}),ti=AV({DenseMatrix:Qe,concat:cr,config:ge,matrix:Ne,typed:Z}),koe=qV({compare:ha,compareNatural:sn,matrix:Ne,typed:Z}),Uoe=Zb({concat:cr,equalScalar:ar,matrix:Ne,not:ks,typed:Z,zeros:Kr}),ni=Hb({bignumber:St,matrix:Ne,add:sr,config:ge,isPositive:va,larger:st,largerEq:_u,smaller:ot,smallerEq:ti,typed:Z}),Hoe=jb({Index:rt,matrix:Ne,range:ni,typed:Z}),Bx=mW({DenseMatrix:Qe,Index:rt,compareNatural:sn,size:Qr,subset:Nt,typed:Z}),joe=SW({Index:rt,compareNatural:sn,size:Qr,subset:Nt,typed:Z}),Rx=TW({Index:rt,concat:cr,setDifference:Bx,size:Qr,subset:Nt,typed:Z}),Px=eG({FibonacciHeap:_x,addScalar:jr,equalScalar:ar}),zx=Lb({Index:rt,matrix:Ne,range:ni,typed:Z}),ga=see({abs:pt,addScalar:jr,det:Ox,divideScalar:Br,identity:Un,matrix:Ne,multiply:gr,typed:Z,unaryMinus:on}),Ix=VZ({DenseMatrix:Qe,Spa:Px,SparseMatrix:Sn,abs:pt,addScalar:jr,divideScalar:Br,equalScalar:ar,larger:st,matrix:Ne,multiplyScalar:Ir,subtractScalar:Pt,typed:Z,unaryMinus:on}),Voe=lee({Complex:Nr,add:sr,ctranspose:Vf,deepEqual:Yf,divideScalar:Br,dot:$u,dotDivide:So,equal:zt,inv:ga,matrix:Ne,multiply:gr,typed:Z}),It=Oj({Complex:Nr,config:ge,fraction:Ai,identity:Un,inv:ga,matrix:Ne,multiply:gr,number:En,typed:Z}),Lx=bW({DenseMatrix:Qe,Index:rt,compareNatural:sn,size:Qr,subset:Nt,typed:Z}),Goe=_W({Index:rt,concat:cr,setIntersect:Lx,setSymDifference:Rx,size:Qr,subset:Nt,typed:Z}),Woe=yee({abs:pt,add:sr,identity:Un,inv:ga,map:da,max:Qf,multiply:gr,size:Qr,sqrt:en,subtract:zr,typed:Z}),He=oG({BigNumber:_e,Complex:Nr,Fraction:fa,abs:pt,addScalar:jr,config:ge,divideScalar:Br,equal:zt,fix:$x,format:xo,isNumeric:ma,multiplyScalar:Ir,number:En,pow:It,round:Di,subtractScalar:Pt}),Zoe=Ite({BigNumber:_e,Unit:He,config:ge}),Yoe=bne({BigNumber:_e,Unit:He,config:ge}),Xoe=sne({BigNumber:_e,Unit:He,config:ge}),Koe=kte({BigNumber:_e,Unit:He,config:ge}),Joe=lne({BigNumber:_e,Unit:He,config:ge}),Qoe=Ute({BigNumber:_e,Unit:He,config:ge}),ese=Lte({BigNumber:_e,Unit:He,config:ge}),rse=ene({BigNumber:_e,Unit:He,config:ge}),tse=qj({DenseMatrix:Qe,concat:cr,equalScalar:ar,matrix:Ne,pow:It,typed:Z}),nse=zte({BigNumber:_e,Unit:He,config:ge}),ase=qte({BigNumber:_e,Unit:He,config:ge}),ise=hee({abs:pt,add:sr,identity:Un,inv:ga,multiply:gr,typed:Z}),ose=cne({BigNumber:_e,Unit:He,config:ge}),qx=jH({addScalar:jr,ceil:Jf,conj:pa,divideScalar:Br,dotDivide:So,exp:dx,i:cx,log2:mx,matrix:Ne,multiplyScalar:Ir,pow:It,tau:px,typed:Z}),ep=Xee({BigNumber:_e,Complex:Nr,config:ge,multiplyScalar:Ir,pow:It,typed:Z}),sse=Fte({BigNumber:_e,Unit:He,config:ge}),use=Jte({BigNumber:_e,Unit:He,config:ge}),lse=GH({conj:pa,dotDivide:So,fft:qx,typed:Z}),cse=Gte({BigNumber:_e,Unit:He,config:ge}),fse=pne({BigNumber:_e,Unit:He,config:ge}),pse=Pte({BigNumber:_e,Unit:He,config:ge}),vse=xne({BigNumber:_e,Unit:He,config:ge}),dse=dne({BigNumber:_e,Unit:He,config:ge}),mse=rne({BigNumber:_e,Unit:He,config:ge}),hse=Vte({BigNumber:_e,Unit:He,config:ge}),gse=Nne({BigNumber:_e,Unit:He,config:ge}),yse=Sne({BigNumber:_e,Unit:He,config:ge}),bse=Cne({BigNumber:_e,Unit:He,config:ge}),xse=Qte({BigNumber:_e,Unit:He,config:ge}),wse=tne({BigNumber:_e,Unit:He,config:ge}),Ese=Rte({BigNumber:_e,Unit:He,config:ge}),Sse=nne({BigNumber:_e,Unit:He,config:ge}),Ase=gne({BigNumber:_e,Unit:He,config:ge}),Dse=$te({BigNumber:_e,Unit:He,config:ge}),Nse=yne({BigNumber:_e,Unit:He,config:ge}),Cse=ane({BigNumber:_e,Unit:He,config:ge}),Mse=une({BigNumber:_e,Unit:He,config:ge}),Tse=Wte({BigNumber:_e,Unit:He,config:ge}),Ose=pG({Unit:He,typed:Z}),Gr=Cee({divideScalar:Br,equalScalar:ar,inv:ga,matrix:Ne,multiply:gr,typed:Z}),_se=Yte({BigNumber:_e,Unit:He,config:ge}),Do=ere({gamma:ep,typed:Z}),$se=fne({BigNumber:_e,Unit:He,config:ge}),Fse=Ene({BigNumber:_e,Unit:He,config:ge}),Bse=Hte({BigNumber:_e,Unit:He,config:ge}),kx=bY({DenseMatrix:Qe,lsolve:Sx,lup:Ix,matrix:Ne,slu:Mx,typed:Z,usolve:Zf}),Rse=jte({BigNumber:_e,Unit:He,config:ge}),Pse=wne({BigNumber:_e,Unit:He,config:ge}),zse=are({add:sr,divide:Gr,factorial:Do,isInteger:mt,isPositive:va,multiply:gr,typed:Z}),Ise=ore({factorial:Do,typed:Z}),Lse=Ane({BigNumber:_e,Unit:He,config:ge}),qse=wY({add:sr,cbrt:wx,divide:Gr,equalScalar:ar,im:Uf,isZero:Qt,multiply:gr,re:Hf,sqrt:en,subtract:zr,typeOf:gx,typed:Z,unaryMinus:on}),kse=CW({compareNatural:sn,typed:Z}),Use=JH({abs:pt,add:sr,bignumber:St,divide:Gr,isNegative:kn,isPositive:va,larger:st,map:da,matrix:Ne,max:Qf,multiply:gr,smaller:ot,subtract:zr,typed:Z,unaryMinus:on}),Ux=Ore({bignumber:St,addScalar:jr,combinations:Mu,divideScalar:Br,factorial:Do,isInteger:mt,isNegative:kn,larger:st,multiplyScalar:Ir,number:En,pow:It,subtractScalar:Pt,typed:Z}),Hse=uG({Unit:He,typed:Z}),jse=$re({addScalar:jr,isInteger:mt,isNegative:kn,stirlingS2:Ux,typed:Z}),Hx=dee({abs:pt,add:sr,addScalar:jr,atan:vx,bignumber:St,column:zx,complex:Tu,config:ge,cos:qf,diag:Ex,divideScalar:Br,dot:$u,equal:zt,flatten:Ao,im:Uf,inv:ga,larger:st,matrix:Ne,matrixFromColumns:Gf,multiply:gr,multiplyScalar:Ir,number:En,qr:Wf,re:Hf,reshape:bx,sin:Ou,size:Qr,smaller:ot,sqrt:en,subtract:zr,typed:Z,usolve:Zf,usolveAll:Tx}),Vse=Xte({BigNumber:_e,Unit:He,config:ge}),Gse=vne({BigNumber:_e,Unit:He,config:ge}),Wse=tre({divide:Gr,dotDivide:So,isNumeric:ma,log:Xf,map:da,matrix:Ne,multiply:gr,sum:Kf,typed:Z}),jx=ax({add:sr,divide:Gr,typed:Z}),Zse=mne({BigNumber:_e,Unit:He,config:ge}),Yse=Bte({BigNumber:_e,Unit:He,config:ge}),Xse=ox({bignumber:St,add:sr,compare:ha,divide:Gr,isInteger:mt,larger:st,multiply:gr,partitionSelect:Fu,smaller:ot,smallerEq:ti,subtract:zr,typed:Z}),rp=ix({add:sr,apply:jf,divide:Gr,isNaN:wo,multiply:gr,subtract:zr,typed:Z}),Kse=Zte({BigNumber:_e,Unit:He,config:ge}),Vx=zee({add:sr,compare:ha,divide:Gr,partitionSelect:Fu,typed:Z}),Jse=jee({add:sr,divide:Gr,matrix:Ne,mean:jx,multiply:gr,pow:It,sqrt:en,subtract:zr,sum:Kf,typed:Z}),Qse=ste({Complex:Nr,add:sr,divide:Gr,matrix:Ne,multiply:gr,typed:Z}),eue=Lee({abs:pt,map:da,median:Vx,subtract:zr,typed:Z}),rue=sx({map:da,sqrt:en,typed:Z,variance:rp}),tue=oj({BigNumber:_e,Complex:Nr,add:sr,config:ge,divide:Gr,equal:zt,factorial:Do,gamma:ep,isNegative:kn,multiply:gr,pi:sc,pow:It,sin:Ou,smallerEq:ti,subtract:zr,typed:Z}),tp=zW({abs:pt,add:sr,conj:pa,ctranspose:Vf,eigs:Hx,equalScalar:ar,larger:st,matrix:Ne,multiply:gr,pow:It,smaller:ot,sqrt:en,typed:Z}),Gx=CH({BigNumber:_e,DenseMatrix:Qe,SparseMatrix:Sn,addScalar:jr,config:ge,cos:qf,matrix:Ne,multiplyScalar:Ir,norm:tp,sin:Ou,typed:Z,unaryMinus:on}),nue=Dne({BigNumber:_e,Unit:He,config:ge}),Wx=Eee({identity:Un,matrix:Ne,multiply:gr,norm:tp,qr:Wf,subtract:zr,typed:Z}),aue=DH({multiply:gr,rotationMatrix:Gx,typed:Z}),Zx=xee({abs:pt,add:sr,concat:cr,identity:Un,index:Fx,lusolve:kx,matrix:Ne,matrixFromColumns:Gf,multiply:gr,range:ni,schur:Wx,subset:Nt,subtract:zr,transpose:Eo,typed:Z}),iue=Aee({matrix:Ne,multiply:gr,sylvester:Zx,transpose:Eo,typed:Z}),Ni={},Ci={},Yx={},at=WW({mathWithTransform:Ci}),Mi=bZ({Node:at}),An=wZ({Node:at}),ya=SZ({Node:at}),Xx=CZ({Node:at}),Ti=KW({Node:at}),Kx=nZ({Node:at,ResultSet:fx}),Jx=iZ({Node:at}),Hn=vZ({Node:at}),Qx=DZ({Node:at}),oue=cte({classes:Yx}),np=CY({math:Ni,typed:Z}),ew=mZ({Node:at,typed:Z}),sue=nee({Chain:np,typed:Z}),Oi=gZ({Node:at,size:Qr}),_i=YW({Node:at,subset:Nt}),rw=rZ({matrix:Ne,Node:at,subset:Nt}),jn=OZ({Unit:He,Node:at,math:Ni}),Vn=$Z({Node:at,SymbolNode:jn,math:Ni}),un=BZ({AccessorNode:_i,ArrayNode:Ti,AssignmentNode:rw,BlockNode:Kx,ConditionalNode:Jx,ConstantNode:Hn,FunctionAssignmentNode:ew,FunctionNode:Vn,IndexNode:Oi,ObjectNode:Mi,OperatorNode:An,ParenthesisNode:ya,RangeNode:Qx,RelationalNode:Xx,SymbolNode:jn,config:ge,numeric:Vt,typed:Z}),tw=Kre({ConstantNode:Hn,FunctionNode:Vn,OperatorNode:An,ParenthesisNode:ya,parse:un,typed:Z}),ap=Gre({bignumber:St,fraction:Ai,AccessorNode:_i,ArrayNode:Ti,ConstantNode:Hn,FunctionNode:Vn,IndexNode:Oi,ObjectNode:Mi,OperatorNode:An,SymbolNode:jn,config:ge,mathWithTransform:Ci,matrix:Ne,typed:Z}),uue=PZ({parse:un,typed:Z}),ip=Zre({AccessorNode:_i,ArrayNode:Ti,ConstantNode:Hn,FunctionNode:Vn,IndexNode:Oi,ObjectNode:Mi,OperatorNode:An,ParenthesisNode:ya,SymbolNode:jn,add:sr,divide:Gr,equal:zt,isZero:Qt,multiply:gr,parse:un,pow:It,subtract:zr,typed:Z}),Bu=IZ({parse:un,typed:Z}),nw=AY({evaluate:Bu}),aw=kZ({evaluate:Bu}),Ru=Hre({bignumber:St,fraction:Ai,AccessorNode:_i,ArrayNode:Ti,ConstantNode:Hn,FunctionNode:Vn,IndexNode:Oi,ObjectNode:Mi,OperatorNode:An,ParenthesisNode:ya,SymbolNode:jn,add:sr,config:ge,divide:Gr,equal:zt,isZero:Qt,mathWithTransform:Ci,matrix:Ne,multiply:gr,parse:un,pow:It,resolve:tw,simplifyConstant:ap,simplifyCore:ip,subtract:zr,typed:Z}),lue=Qre({OperatorNode:An,parse:un,simplify:Ru,typed:Z}),cue=Ire({parse:un,typed:Z}),fue=HZ({Parser:aw,typed:Z}),pue=nte({bignumber:St,fraction:Ai,AccessorNode:_i,ArrayNode:Ti,ConstantNode:Hn,FunctionNode:Vn,IndexNode:Oi,ObjectNode:Mi,OperatorNode:An,ParenthesisNode:ya,SymbolNode:jn,add:sr,config:ge,divide:Gr,equal:zt,isZero:Qt,mathWithTransform:Ci,matrix:Ne,multiply:gr,parse:un,pow:It,simplify:Ru,simplifyConstant:ap,simplifyCore:ip,subtract:zr,typed:Z}),vue=rte({ConstantNode:Hn,FunctionNode:Vn,OperatorNode:An,ParenthesisNode:ya,SymbolNode:jn,config:ge,equal:zt,isZero:Qt,numeric:Vt,parse:un,simplify:Ru,typed:Z}),due=ree({Help:nw,mathWithTransform:Ci,typed:Z});kr(Ni,{e:U1,false:kae,fineStructure:Uae,i:cx,Infinity:Hae,LN10:jae,LOG10E:Vae,NaN:Gae,null:Wae,phi:Zae,SQRT1_2:Xae,sackurTetrode:Kae,tau:px,true:Jae,E:U1,version:Qae,efimovFactor:eie,LN2:rie,pi:sc,replacer:tie,reviver:oue,SQRT2:nie,typed:Z,unaryPlus:Lf,PI:sc,weakMixingAngle:aie,abs:pt,acos:iie,acot:oie,acsc:sie,addScalar:jr,arg:uie,asech:lie,asinh:cie,atan:vx,atanh:fie,bignumber:St,bitNot:pie,boolean:vie,clone:die,combinations:Mu,complex:Tu,conj:pa,cos:qf,cot:mie,csc:hie,cube:gie,equalScalar:ar,erf:yie,exp:dx,expm1:bie,filter:xie,forEach:wie,format:xo,getMatrixDataType:kf,hex:Eie,im:Uf,isInteger:mt,isNegative:kn,isPositive:va,isZero:Qt,LOG2E:Sie,lgamma:Aie,log10:Die,log2:mx,map:da,multiplyScalar:Ir,not:ks,number:En,oct:Nie,pickRandom:Cie,print:Mie,random:Tie,re:Hf,sec:Oie,sign:hx,sin:Ou,splitUnit:_ie,square:$ie,string:Fie,subtractScalar:Pt,tan:Bie,typeOf:gx,acosh:Rie,acsch:Pie,apply:jf,asec:zie,bin:Iie,chain:sue,combinationsWithRep:Lie,cosh:qie,csch:kie,isNaN:wo,isPrime:Uie,randomInt:Hie,sech:jie,sinh:Vie,sparse:Gie,sqrt:en,tanh:Wie,unaryMinus:on,acoth:Zie,coth:Yie,fraction:Ai,isNumeric:ma,matrix:Ne,matrixFromFunction:Xie,mode:Kie,numeric:Vt,prod:yx,reshape:bx,size:Qr,squeeze:Jie,transpose:Eo,xgcd:xx,zeros:Kr,asin:Qie,cbrt:wx,concat:cr,count:eoe,ctranspose:Vf,diag:Ex,divideScalar:Br,dotDivide:So,equal:zt,flatten:Ao,hasNumericValue:roe,identity:Un,kron:toe,largerEq:_u,leftShift:noe,lsolve:Sx,matrixFromColumns:Gf,nthRoot:aoe,ones:ioe,qr:Wf,resize:ooe,rightArithShift:soe,round:Di,smaller:ot,subtract:zr,to:uoe,unequal:loe,usolve:Zf,xor:coe,add:sr,atan2:foe,bitAnd:poe,bitOr:voe,bitXor:doe,catalan:moe,compare:ha,compareText:Ax,cumsum:hoe,deepEqual:Yf,diff:goe,distance:yoe,dot:$u,equalText:boe,floor:Dx,gcd:xoe,hypot:woe,larger:st,log:Xf,lsolveAll:Eoe,matrixFromRows:Soe,min:Aoe,mod:Cx,multiply:gr,nthRoots:Doe,or:Noe,partitionSelect:Fu,rightLogShift:Coe,slu:Mx,subset:Nt,sum:Kf,trace:Moe,usolveAll:Tx,zpk2tf:Toe,ceil:Jf,compareNatural:sn,composition:Ooe,cross:_oe,det:Ox,dotMultiply:$oe,fix:$x,index:Fx,intersect:Foe,invmod:Boe,lcm:Roe,log1p:Poe,max:Qf,setCartesian:zoe,setDistinct:Ioe,setIsSubset:Loe,setPowerset:qoe,smallerEq:ti,sort:koe,and:Uoe,range:ni,row:Hoe,setDifference:Bx,setMultiplicity:joe,setSymDifference:Rx,column:zx,inv:ga,lup:Ix,pinv:Voe,pow:It,setIntersect:Lx,setUnion:Goe,sqrtm:Woe,vacuumImpedance:Zoe,wienDisplacement:Yoe,atomicMass:Xoe,bohrMagneton:Koe,boltzmann:Joe,conductanceQuantum:Qoe,coulomb:ese,deuteronMass:rse,dotPow:tse,electricConstant:nse,elementaryCharge:ase,expm:ise,faraday:ose,fft:qx,gamma:ep,gravitationConstant:sse,hartreeEnergy:use,ifft:lse,klitzing:cse,loschmidt:fse,magneticConstant:pse,molarMass:vse,molarPlanckConstant:dse,neutronMass:mse,nuclearMagneton:hse,planckCharge:gse,planckLength:yse,planckTemperature:bse,protonMass:xse,quantumOfCirculation:wse,reducedPlanckConstant:Ese,rydberg:Sse,secondRadiation:Ase,speedOfLight:Dse,stefanBoltzmann:Nse,thomsonCrossSection:Cse,avogadro:Mse,bohrRadius:Tse,createUnit:Ose,divide:Gr,electronMass:_se,factorial:Do,firstRadiation:$se,gravity:Fse,inverseConductanceQuantum:Bse,lusolve:kx,magneticFluxQuantum:Rse,molarMassC12:Pse,multinomial:zse,parse:un,permutations:Ise,planckMass:Lse,polynomialRoot:qse,resolve:tw,setSize:kse,simplifyConstant:ap,solveODE:Use,stirlingS2:Ux,unit:Hse,bellNumbers:jse,compile:uue,eigs:Hx,fermiCoupling:Vse,gasConstant:Gse,kldivergence:Wse,mean:jx,molarVolume:Zse,planckConstant:Yse,quantileSeq:Xse,simplifyCore:ip,variance:rp,classicalElectronRadius:Kse,evaluate:Bu,median:Vx,simplify:Ru,symbolicEqual:lue,corr:Jse,freqz:Qse,leafCount:cue,mad:eue,parser:fue,rationalize:pue,std:rue,zeta:tue,derivative:vue,norm:tp,rotationMatrix:Gx,help:due,planckTime:nue,schur:Wx,rotate:aue,sylvester:Zx,lyap:iue,config:ge});kr(Ci,Ni,{filter:Pne({typed:Z}),forEach:Lne({typed:Z}),map:Vne({typed:Z}),apply:One({isInteger:mt,typed:Z}),or:Bae({DenseMatrix:Qe,concat:cr,equalScalar:ar,matrix:Ne,typed:Z}),and:_ae({add:sr,concat:cr,equalScalar:ar,matrix:Ne,not:ks,typed:Z,zeros:Kr}),concat:pae({isInteger:mt,matrix:Ne,typed:Z}),max:Zne({config:ge,larger:st,numeric:Vt,typed:Z}),print:Mae({add:sr,matrix:Ne,typed:Z,zeros:Kr}),bitAnd:zae({add:sr,concat:cr,equalScalar:ar,matrix:Ne,not:ks,typed:Z,zeros:Kr}),diff:dae({bignumber:St,matrix:Ne,number:En,subtract:zr,typed:Z}),min:eae({config:ge,numeric:Vt,smaller:ot,typed:Z}),subset:lae({add:sr,matrix:Ne,typed:Z,zeros:Kr}),bitOr:qae({DenseMatrix:Qe,concat:cr,equalScalar:ar,matrix:Ne,typed:Z}),cumsum:Aae({add:sr,typed:Z,unaryPlus:Lf}),index:Une({Index:rt,getMatrixDataType:kf}),sum:bae({add:sr,config:ge,numeric:Vt,typed:Z}),range:nae({bignumber:St,matrix:Ne,add:sr,config:ge,isPositive:va,larger:st,largerEq:_u,smaller:ot,smallerEq:ti,typed:Z}),row:oae({Index:rt,matrix:Ne,range:ni,typed:Z}),column:Fne({Index:rt,matrix:Ne,range:ni,typed:Z}),mean:Kne({add:sr,divide:Gr,typed:Z}),quantileSeq:Eae({add:sr,bignumber:St,compare:ha,divide:Gr,isInteger:mt,larger:st,multiply:gr,partitionSelect:Fu,smaller:ot,smallerEq:ti,subtract:zr,typed:Z}),variance:Nae({add:sr,apply:jf,divide:Gr,isNaN:wo,multiply:gr,subtract:zr,typed:Z}),std:gae({map:da,sqrt:en,typed:Z,variance:rp})});kr(Yx,{BigNumber:_e,Complex:Nr,Fraction:fa,Matrix:Cu,Node:at,ObjectNode:Mi,OperatorNode:An,ParenthesisNode:ya,Range:Yae,RelationalNode:Xx,ResultSet:fx,ArrayNode:Ti,BlockNode:Kx,ConditionalNode:Jx,ConstantNode:Hn,DenseMatrix:Qe,RangeNode:Qx,Chain:np,FunctionAssignmentNode:ew,SparseMatrix:Sn,IndexNode:Oi,ImmutableDenseMatrix:Nx,Index:rt,AccessorNode:_i,AssignmentNode:rw,FibonacciHeap:_x,Spa:Px,Unit:He,SymbolNode:jn,FunctionNode:Vn,Help:nw,Parser:aw});np.createProxy(Ni);const iw=$.forwardRef(({onChange:e,value:r,dragDirection:t,showDragHandle:n=!0,dragScale:a,selectOnFocus:i=!0,bounds:o=G.C.INFINITE,resetValue:u,style:s,variant:l="outlined",className:c,children:f,onBlur:p,...v},m)=>{const[d,y,h]=Xi(r.toString()),[E,g,w]=Xi(!0),x=Gt(r),b=$.useCallback(()=>{if(w.current)return;g(!0);let B=!1,P=0;try{P=Bu(h.current),B=P!=null}catch{B=!1}B?e==null||e(G.C.clamp(o,P)):y(x.current.toString())},[e,y]),A=Gt(b),D=$.useCallback(()=>{p==null||p(),b()},[p,b]);$.useEffect(()=>()=>{var B;return(B=A.current)==null?void 0:B.call(A)},[]);const S=$.useCallback(B=>{g(!1),y(B)},[y,g]),N=E?r:d,C=$.useCallback(B=>{g(!1),y(Math.round(G.C.clamp(o,B)).toString())},[y,g]),M=$.useCallback(B=>{g(!0),e==null||e(G.C.clamp(o,Math.round(B)))},[e,g]);return a==null&&G.C.isFinite(o)&&(a={x:G.C.span(o)*.01,y:G.C.span(o)*.02}),Oe.jsxRuntimeExports.jsxs(hi,{ref:m,type:"text",variant:l,value:N.toString(),onChange:S,style:s,selectOnFocus:i,onKeyDown:B=>{Ya(B)==="Enter"&&(b(),p==null||p())},onBlur:D,...v,children:[n&&Oe.jsxRuntimeExports.jsx(fu,{direction:t,value:r,onChange:C,dragScale:a,resetValue:u,onDragEnd:M,onBlur:D}),f]})});iw.displayName="InputNumber";const xl="input-switch",op=$.forwardRef(({className:e,value:r,onChange:t,size:n="medium",...a},i)=>Oe.jsxRuntimeExports.jsx("div",{className:G.CSS(G.CSS.BE(xl,"container"),G.CSS.size(n)),children:Oe.jsxRuntimeExports.jsxs("label",{className:G.CSS(G.CSS.BE(xl,"track"),e),children:[Oe.jsxRuntimeExports.jsx("input",{className:G.CSS.BE(xl,"input"),type:"checkbox",ref:i,checked:r,onChange:o=>t(o.target.checked),value:"",...a}),Oe.jsxRuntimeExports.jsx("span",{className:"pluto-input-switch__slider"})]})}));op.displayName="InputSwitch";const ow=$.forwardRef(({value:e,style:r,onChange:t,className:n,onFocus:a,selectOnFocus:i=!1,placeholder:o,variant:u="outlined",sharp:s=!1,children:l,...c},f)=>Oe.jsxRuntimeExports.jsx("textarea",{style:r,className:G.CSS(G.CSS.B("textarea"),G.CSS.BM("textarea",u),G.CSS.sharp(s),n),ref:f,value:e,onChange:p=>t(p.target.value.replace(/\n/g,"")),onFocus:p=>{i&&p.target.select(),a==null||a(p)},placeholder:o,...c}));ow.displayName="InputTextArea";const mue=(e,r)=>new ye.m(e).add(r).sub(ye.m.utcOffset),hue={x:Number(ye.w.SECOND.valueOf())*.5,y:Number(ye.w.MINUTE.valueOf())},sw=({value:e,onChange:r,tzInfo:t})=>{const n=new ye.m(e,"UTC"),a=n.sub(ye.m.utcOffset);if(a.after(ye.m.DAY)){const u=a.remainder(ye.m.DAY);r(Number(new ye.m(u,"local").valueOf()))}const i=$.useCallback(u=>{let s;if(typeof u=="number")s=new ye.m(u,"UTC");else{if(u.length===0)return;s=new ye.m(u,"local")}r(Number(s.valueOf()))},[r,t]);return{inputValue:n.fString("time",t),ts:n,handleChange:i}},uw=$.forwardRef(({size:e,value:r,tzInfo:t="local",onChange:n,dragDirection:a,showDragHandle:i=!0,className:o,children:u,...s},l)=>{const{inputValue:c,ts:f,handleChange:p}=sw({value:r,onChange:n,tzInfo:t});return Oe.jsxRuntimeExports.jsxs(hi,{ref:l,value:c,className:G.CSS(G.CSS.B("input-time"),o),type:"time",step:"1",onChange:p,...s,children:[i&&Oe.jsxRuntimeExports.jsx(fu,{direction:a,value:Number(f.valueOf()),onChange:p,dragScale:hue}),u]})});uw.displayName="InputTime";const lw=$.createContext({theme:ye.themeZ.parse(ye.SYNNAX_THEMES.synnaxLight),toggleTheme:()=>{},setTheme:()=>{}}),uc=()=>typeof(window==null?void 0:window.matchMedia)>"u"?null:window.matchMedia("(prefers-color-scheme: dark)"),H1=()=>{var e;return((e=uc())==null?void 0:e.matches)??!0},cw=({theme:e,themes:r=ye.SYNNAX_THEMES,setTheme:t,toggleTheme:n,lightTheme:a="synnaxLight",darkTheme:i="synnaxDark"})=>{const[o,u]=$.useState(H1()?i:a),s=$.useMemo(()=>{if(e!=null){const f=ye.themeZ.parse(ye.m$1.override(ye.m$1.copy(ye.SYNNAX_LIGHT),e)),p=ye.themeZ.parse(ye.m$1.override(ye.m$1.copy(ye.SYNNAX_DARK),e));return e.key!=null&&e.key.length>0&&u(e.key),{synnaxLight:f,synnaxDark:p}}return Object.entries(r).reduce((f,[p,v])=>({...f,[p]:ye.themeZ.parse(v)}),{})},[e,r]),l=$.useCallback(()=>{const f=Object.keys(r),v=(f.indexOf(o)+1)%f.length;u(f[v])},[n,o,r]),c=$.useMemo(()=>s[o],[s,o]);return $.useEffect(()=>{var p;const f=()=>u(H1()?i:a);return(p=uc())==null||p.addEventListener("change",f),()=>{var v;return(v=uc())==null?void 0:v.removeEventListener("change",f)}},[]),{theme:c,toggleTheme:n??l,setTheme:t??u}},Pu=()=>$.useContext(lw),gue=()=>Pu().theme,yue=cu(ye.Provider.TYPE,({children:e,aetherKey:r,applyCSSVars:t=!0,...n})=>{const a=cw(n),[{path:i},,o]=lu({aetherKey:r,type:ye.Provider.TYPE,schema:ye.Provider.z,initialState:{theme:a.theme}});return $.useEffect(()=>o({theme:a.theme}),[a.theme]),$.useLayoutEffect(()=>{t?G.CSS.applyVars(document.documentElement,jy(a.theme)):G.CSS.removeVars(document.documentElement,"--pluto")},[a.theme]),Oe.jsxRuntimeExports.jsx(lw.Provider,{value:a,children:Oe.jsxRuntimeExports.jsx(vo,{path:i,children:e})})}),bue=({...e})=>{const{toggleTheme:r}=Pu(),[t,n]=$.useState(!1);return Oe.jsxRuntimeExports.jsx(op,{value:t,onChange:a=>{r(),n(a)},...e})},fw=e=>{const{theme:r}=Pu(),t=r.typography[e];return{...t,toString:()=>ye.fontString(r,e),baseSize:r.sizes.base,lineHeightPx:t.lineHeight*r.sizes.base,sizePx:t.size*r.sizes.base}},sp=$.createContext(null),xue=()=>pf(sp),wl="sort",wue=({hide:e=!1,columns:r,children:t})=>{const n=qy(),{setTransform:a,deleteTransform:i}=po(),o=fw("p").toString(),[u,s]=$.useState([null,!1]),[l,c]=$.useState({columns:r}),f=p=>{const[v,m]=u;v===p?m?(s([p,!m]),a(wl,j1(p,!m))):(s([null,!1]),i(wl)):(s([p,!0]),a(wl,j1(p,!0)))};return $.useEffect(()=>{c(p=>({columns:Aue(p.columns.length===0?r:p.columns,n,o)}))},[o,n,r]),Oe.jsxRuntimeExports.jsxs(sp.Provider,{value:l,children:[Oe.jsxRuntimeExports.jsx(kt.Space,{direction:"x",size:"medium",className:G.CSS(G.CSS.BE("list-col-header","container"),G.CSS.visible(!e)),children:l.columns.filter(({visible:p=!0})=>p).map(({key:p,cWidth:v,name:m})=>{const[d,y]=u;let h;const E=n[0];return p===d&&(h=y?Oe.jsxRuntimeExports.jsx($t.Caret.Up,{}):Oe.jsxRuntimeExports.jsx($t.Caret.Down,{})),Oe.jsxRuntimeExports.jsx(Lu,{className:G.CSS.BE("list-col-header","item"),justify:"spaceBetween",level:"p",endIcon:h,style:{width:v},shrink:!1,onClick:()=>E!=null&&p in E&&f(p),children:m},p.toString())})}),t]})},Eue=({entry:e,onSelect:r,className:t,...n})=>{const{columns:a}=xue();return Oe.jsxRuntimeExports.jsx(Hy,{entry:e,onSelect:r,className:G.CSS(t,G.CSS.BE("list-col-item","container"),r!=null&&G.CSS.BEM("list-col-item","container","selectable")),align:"center",size:"medium",...n,children:a.filter(({visible:i=!0})=>i).map(i=>Oe.jsxRuntimeExports.jsx(Sue,{entry:e,col:i},i.key.toString()))},e.key.toString())},Sue=({entry:e,col:{width:r,...t}})=>{const n={width:t.cWidth,userSelect:"none",padding:"1rem",flexShrink:0};if(t.render!=null)return t.render({key:t.key,entry:e,style:n});let a;return t.stringer!=null?a=t.stringer(e):a=e[t.key],Oe.jsxRuntimeExports.jsx(hn,{className:G.CSS.BE("list-col-item-value",t.key.toString()),level:"p",style:n,shade:t.shade,weight:t.weight,children:ye.D(a)},t.key.toString())},Aue=(e,r,t,n=30)=>{const a=Due(r,e);return e.map(i=>{if(i.width!=null)i.cWidth=i.width;else{const{width:o}=ye.dimensions(i.name,t),{width:u}=ye.dimensions(a[i.key],t);i.cWidth=Math.max(o,u)+n}return i})},Due=(e,r)=>{const t={};return e.forEach(n=>r.forEach(({key:a,stringer:i})=>{const o=n[a];if(o==null)return;const u=i!=null?i(n):o.toString();(!(a in t)||u.length>t[a].length)&&(t[a]=u)})),t},j1=(e,r)=>({data:t})=>t.length===0?{data:t,transformed:!1}:{data:[...t].sort(ye.E.newFieldF(e,t[0],!r)),transformed:!0},Nue={Header:wue,Item:Eue,itemHeight:5.5*6};/**
|
|
141
|
+
* react-virtual
|
|
142
|
+
*
|
|
143
|
+
* Copyright (c) TanStack
|
|
144
|
+
*
|
|
145
|
+
* This source code is licensed under the MIT license found in the
|
|
146
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
147
|
+
*
|
|
148
|
+
* @license MIT
|
|
149
|
+
*/function Us(){return Us=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},Us.apply(this,arguments)}/**
|
|
150
|
+
* virtual-core
|
|
151
|
+
*
|
|
152
|
+
* Copyright (c) TanStack
|
|
153
|
+
*
|
|
154
|
+
* This source code is licensed under the MIT license found in the
|
|
155
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
156
|
+
*
|
|
157
|
+
* @license MIT
|
|
158
|
+
*/function Hs(){return Hs=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},Hs.apply(this,arguments)}/**
|
|
159
|
+
* virtual-core
|
|
160
|
+
*
|
|
161
|
+
* Copyright (c) TanStack
|
|
162
|
+
*
|
|
163
|
+
* This source code is licensed under the MIT license found in the
|
|
164
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
165
|
+
*
|
|
166
|
+
* @license MIT
|
|
167
|
+
*/function Da(e,r,t){var n,a=(n=t.initialDeps)!=null?n:[],i;return function(){var o;t.key&&t.debug!=null&&t.debug()&&(o=Date.now());var u=e(),s=u.length!==a.length||u.some(function(m,d){return a[d]!==m});if(!s)return i;a=u;var l;if(t.key&&t.debug!=null&&t.debug()&&(l=Date.now()),i=r.apply(void 0,u),t.key&&t.debug!=null&&t.debug()){var c=Math.round((Date.now()-o)*100)/100,f=Math.round((Date.now()-l)*100)/100,p=f/16,v=function(d,y){for(d=String(d);d.length<y;)d=" "+d;return d};console.info("%c⏱ "+v(f,5)+" /"+v(c,5)+" ms",`
|
|
168
|
+
font-size: .6rem;
|
|
169
|
+
font-weight: bold;
|
|
170
|
+
color: hsl(`+Math.max(0,Math.min(120-120*p,120))+"deg 100% 31%);",t==null?void 0:t.key)}return t==null||t.onChange==null||t.onChange(i),i}}function El(e,r){if(e===void 0)throw new Error("Unexpected undefined");return e}var Cue=function(r,t){return Math.abs(r-t)<1};/**
|
|
171
|
+
* virtual-core
|
|
172
|
+
*
|
|
173
|
+
* Copyright (c) TanStack
|
|
174
|
+
*
|
|
175
|
+
* This source code is licensed under the MIT license found in the
|
|
176
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
177
|
+
*
|
|
178
|
+
* @license MIT
|
|
179
|
+
*/var Mue=function(r){return r},Tue=function(r){for(var t=Math.max(r.startIndex-r.overscan,0),n=Math.min(r.endIndex+r.overscan,r.count-1),a=[],i=t;i<=n;i++)a.push(i);return a},Oue=function(r,t){var n=r.scrollElement;if(n){var a=function(u){var s=u.width,l=u.height;t({width:Math.round(s),height:Math.round(l)})};a(n.getBoundingClientRect());var i=new ResizeObserver(function(o){var u=o[0];if(u!=null&&u.borderBoxSize){var s=u.borderBoxSize[0];if(s){a({width:s.inlineSize,height:s.blockSize});return}}a(n.getBoundingClientRect())});return i.observe(n,{box:"border-box"}),function(){i.unobserve(n)}}},_ue=function(r,t){var n=r.scrollElement;if(n){var a=function(){t(n[r.options.horizontal?"scrollLeft":"scrollTop"])};return a(),n.addEventListener("scroll",a,{passive:!0}),function(){n.removeEventListener("scroll",a)}}},$ue=function(r,t,n){if(t!=null&&t.borderBoxSize){var a=t.borderBoxSize[0];if(a){var i=Math.round(a[n.options.horizontal?"inlineSize":"blockSize"]);return i}}return Math.round(r.getBoundingClientRect()[n.options.horizontal?"width":"height"])},Fue=function(r,t,n){var a,i,o=t.adjustments,u=o===void 0?0:o,s=t.behavior,l=r+u;(a=n.scrollElement)==null||a.scrollTo==null||a.scrollTo((i={},i[n.options.horizontal?"left":"top"]=l,i.behavior=s,i))},Bue=function(r){var t=this;this.unsubs=[],this.scrollElement=null,this.isScrolling=!1,this.isScrollingTimeoutId=null,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollDirection=null,this.scrollAdjustments=0,this.measureElementCache=new Map,this.observer=function(){var n=null,a=function(){return n||(typeof ResizeObserver<"u"?n=new ResizeObserver(function(o){o.forEach(function(u){t._measureElement(u.target,u)})}):null)};return{disconnect:function(){var o;return(o=a())==null?void 0:o.disconnect()},observe:function(o){var u;return(u=a())==null?void 0:u.observe(o,{box:"border-box"})},unobserve:function(o){var u;return(u=a())==null?void 0:u.unobserve(o)}}}(),this.range={startIndex:0,endIndex:0},this.setOptions=function(n){Object.entries(n).forEach(function(a){var i=a[0],o=a[1];typeof o>"u"&&delete n[i]}),t.options=Hs({debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Mue,rangeExtractor:Tue,onChange:function(){},measureElement:$ue,initialRect:{width:0,height:0},scrollMargin:0,scrollingDelay:150,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1},n)},this.notify=function(){t.options.onChange==null||t.options.onChange(t)},this.cleanup=function(){t.unsubs.filter(Boolean).forEach(function(n){return n()}),t.unsubs=[],t.scrollElement=null},this._didMount=function(){return t.measureElementCache.forEach(t.observer.observe),function(){t.observer.disconnect(),t.cleanup()}},this._willUpdate=function(){var n=t.options.getScrollElement();t.scrollElement!==n&&(t.cleanup(),t.scrollElement=n,t._scrollToOffset(t.scrollOffset,{adjustments:void 0,behavior:void 0}),t.unsubs.push(t.options.observeElementRect(t,function(a){var i=t.scrollRect;t.scrollRect=a,(t.options.horizontal?a.width!==i.width:a.height!==i.height)&&t.maybeNotify()})),t.unsubs.push(t.options.observeElementOffset(t,function(a){t.scrollAdjustments=0,t.scrollOffset!==a&&(t.isScrollingTimeoutId!==null&&(clearTimeout(t.isScrollingTimeoutId),t.isScrollingTimeoutId=null),t.isScrolling=!0,t.scrollDirection=t.scrollOffset<a?"forward":"backward",t.scrollOffset=a,t.maybeNotify(),t.isScrollingTimeoutId=setTimeout(function(){t.isScrollingTimeoutId=null,t.isScrolling=!1,t.scrollDirection=null,t.maybeNotify()},t.options.scrollingDelay))})))},this.getSize=function(){return t.scrollRect[t.options.horizontal?"width":"height"]},this.memoOptions=Da(function(){return[t.options.count,t.options.paddingStart,t.options.scrollMargin,t.options.getItemKey]},function(n,a,i,o){return t.pendingMeasuredCacheIndexes=[],{count:n,paddingStart:a,scrollMargin:i,getItemKey:o}},{key:!1}),this.getFurthestMeasurement=function(n,a){for(var i=new Map,o=new Map,u=a-1;u>=0;u--){var s=n[u];if(!i.has(s.lane)){var l=o.get(s.lane);if(l==null||s.end>l.end?o.set(s.lane,s):s.end<l.end&&i.set(s.lane,!0),i.size===t.options.lanes)break}}return o.size===t.options.lanes?Array.from(o.values()).sort(function(c,f){return c.end-f.end})[0]:void 0},this.getMeasurements=Da(function(){return[t.memoOptions(),t.itemSizeCache]},function(n,a){var i=n.count,o=n.paddingStart,u=n.scrollMargin,s=n.getItemKey,l=t.pendingMeasuredCacheIndexes.length>0?Math.min.apply(Math,t.pendingMeasuredCacheIndexes):0;t.pendingMeasuredCacheIndexes=[];for(var c=t.measurementsCache.slice(0,l),f=l;f<i;f++){var p=s(f),v=t.options.lanes===1?c[f-1]:t.getFurthestMeasurement(c,f),m=v?v.end:o+u,d=a.get(p),y=typeof d=="number"?d:t.options.estimateSize(f),h=m+y,E=v?v.lane:f%t.options.lanes;c[f]={index:f,start:m,size:y,end:h,key:p,lane:E}}return t.measurementsCache=c,c},{key:process.env.NODE_ENV!=="production"&&"getMeasurements",debug:function(){return t.options.debug}}),this.calculateRange=Da(function(){return[t.getMeasurements(),t.getSize(),t.scrollOffset]},function(n,a,i){return t.range=Rue({measurements:n,outerSize:a,scrollOffset:i})},{key:process.env.NODE_ENV!=="production"&&"calculateRange",debug:function(){return t.options.debug}}),this.maybeNotify=Da(function(){var n=t.calculateRange();return[n.startIndex,n.endIndex,t.isScrolling]},function(){t.notify()},{key:process.env.NODE_ENV!=="production"&&"maybeNotify",debug:function(){return t.options.debug},initialDeps:[this.range.startIndex,this.range.endIndex,this.isScrolling]}),this.getIndexes=Da(function(){return[t.options.rangeExtractor,t.calculateRange(),t.options.overscan,t.options.count]},function(n,a,i,o){return n(Hs({},a,{overscan:i,count:o}))},{key:process.env.NODE_ENV!=="production"&&"getIndexes",debug:function(){return t.options.debug}}),this.indexFromElement=function(n){var a=t.options.indexAttribute,i=n.getAttribute(a);return i?parseInt(i,10):(console.warn("Missing attribute name '"+a+"={index}' on measured element."),-1)},this._measureElement=function(n,a){var i,o=t.indexFromElement(n),u=t.measurementsCache[o];if(u){var s=t.measureElementCache.get(u.key);if(!n.isConnected){t.observer.unobserve(n),n===s&&t.measureElementCache.delete(u.key);return}s!==n&&(s&&t.observer.unobserve(s),t.observer.observe(n),t.measureElementCache.set(u.key,n));var l=t.options.measureElement(n,a,t),c=(i=t.itemSizeCache.get(u.key))!=null?i:u.size,f=l-c;f!==0&&(u.start<t.scrollOffset&&(process.env.NODE_ENV!=="production"&&t.options.debug&&console.info("correction",f),t._scrollToOffset(t.scrollOffset,{adjustments:t.scrollAdjustments+=f,behavior:void 0})),t.pendingMeasuredCacheIndexes.push(o),t.itemSizeCache=new Map(t.itemSizeCache.set(u.key,l)),t.notify())}},this.measureElement=function(n){n&&t._measureElement(n,void 0)},this.getVirtualItems=Da(function(){return[t.getIndexes(),t.getMeasurements()]},function(n,a){for(var i=[],o=0,u=n.length;o<u;o++){var s=n[o],l=a[s];i.push(l)}return i},{key:process.env.NODE_ENV!=="production"&&"getIndexes",debug:function(){return t.options.debug}}),this.getVirtualItemForOffset=function(n){var a=t.getMeasurements();return El(a[pw(0,a.length-1,function(i){return El(a[i]).start},n)])},this.getOffsetForAlignment=function(n,a){var i=t.getSize();a==="auto"&&(n<=t.scrollOffset?a="start":n>=t.scrollOffset+i?a="end":a="start"),a==="start"?n=n:a==="end"?n=n-i:a==="center"&&(n=n-i/2);var o=t.options.horizontal?"scrollWidth":"scrollHeight",u=t.scrollElement?"document"in t.scrollElement?t.scrollElement.document.documentElement[o]:t.scrollElement[o]:0,s=u-t.getSize();return Math.max(Math.min(s,n),0)},this.getOffsetForIndex=function(n,a){a===void 0&&(a="auto"),n=Math.max(0,Math.min(n,t.options.count-1));var i=El(t.getMeasurements()[n]);if(a==="auto")if(i.end>=t.scrollOffset+t.getSize()-t.options.scrollPaddingEnd)a="end";else if(i.start<=t.scrollOffset+t.options.scrollPaddingStart)a="start";else return[t.scrollOffset,a];var o=a==="end"?i.end+t.options.scrollPaddingEnd:i.start-t.options.scrollPaddingStart;return[t.getOffsetForAlignment(o,a),a]},this.isDynamicMode=function(){return t.measureElementCache.size>0},this.cancelScrollToIndex=function(){t.scrollToIndexTimeoutId!==null&&(clearTimeout(t.scrollToIndexTimeoutId),t.scrollToIndexTimeoutId=null)},this.scrollToOffset=function(n,a){var i=a===void 0?{}:a,o=i.align,u=o===void 0?"start":o,s=i.behavior;t.cancelScrollToIndex(),s==="smooth"&&t.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),t._scrollToOffset(t.getOffsetForAlignment(n,u),{adjustments:void 0,behavior:s})},this.scrollToIndex=function(n,a){var i=a===void 0?{}:a,o=i.align,u=o===void 0?"auto":o,s=i.behavior;n=Math.max(0,Math.min(n,t.options.count-1)),t.cancelScrollToIndex(),s==="smooth"&&t.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");var l=t.getOffsetForIndex(n,u),c=l[0],f=l[1];t._scrollToOffset(c,{adjustments:void 0,behavior:s}),s!=="smooth"&&t.isDynamicMode()&&(t.scrollToIndexTimeoutId=setTimeout(function(){t.scrollToIndexTimeoutId=null;var p=t.measureElementCache.has(t.options.getItemKey(n));if(p){var v=t.getOffsetForIndex(n,f),m=v[0];Cue(m,t.scrollOffset)||t.scrollToIndex(n,{align:f,behavior:s})}else t.scrollToIndex(n,{align:f,behavior:s})}))},this.scrollBy=function(n,a){var i=a===void 0?{}:a,o=i.behavior;t.cancelScrollToIndex(),o==="smooth"&&t.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),t._scrollToOffset(t.scrollOffset+n,{adjustments:void 0,behavior:o})},this.getTotalSize=function(){var n;return(((n=t.getMeasurements()[t.options.count-1])==null?void 0:n.end)||t.options.paddingStart)-t.options.scrollMargin+t.options.paddingEnd},this._scrollToOffset=function(n,a){var i=a.adjustments,o=a.behavior;t.options.scrollToFn(n,{behavior:o,adjustments:i},t)},this.measure=function(){t.itemSizeCache=new Map,t.notify()},this.setOptions(r),this.scrollRect=this.options.initialRect,this.scrollOffset=this.options.initialOffset,this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(function(n){t.itemSizeCache.set(n.key,n.size)}),this.maybeNotify()},pw=function(r,t,n,a){for(;r<=t;){var i=(r+t)/2|0,o=n(i);if(o<a)r=i+1;else if(o>a)t=i-1;else return i}return r>0?r-1:0};function Rue(e){for(var r=e.measurements,t=e.outerSize,n=e.scrollOffset,a=r.length-1,i=function(l){return r[l].start},o=pw(0,a,i,n),u=o;u<a&&r[u].end<n+t;)u++;return{startIndex:o,endIndex:u}}/**
|
|
180
|
+
* react-virtual
|
|
181
|
+
*
|
|
182
|
+
* Copyright (c) TanStack
|
|
183
|
+
*
|
|
184
|
+
* This source code is licensed under the MIT license found in the
|
|
185
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
186
|
+
*
|
|
187
|
+
* @license MIT
|
|
188
|
+
*/var Pue=typeof document<"u"?Gi.useLayoutEffect:Gi.useEffect;function zue(e){var r=Gi.useReducer(function(){return{}},{})[1],t=Us({},e,{onChange:function(o){r(),e.onChange==null||e.onChange(o)}}),n=Gi.useState(function(){return new Bue(t)}),a=n[0];return a.setOptions(t),Gi.useEffect(function(){return a._didMount()},[]),Pue(function(){return a._willUpdate()}),a}function Iue(e){return zue(Us({observeElementRect:Oue,observeElementOffset:_ue,scrollToFn:Fue},e))}const vw=$.createContext({selected:[]}),dw=$.createContext({onSelect:()=>{},clear:()=>{},getSelected:()=>[]}),up=()=>$.useContext(vw),mw=()=>up().selected,zu=()=>$.useContext(dw),hw=$.memo(({value:e,children:r,...t})=>{const n=vf(),{onSelect:a,clear:i}=zy({...t,value:e,data:n}),o=Gt(e),u=$.useMemo(()=>({selected:ye.o(e)}),[e]),s=$.useMemo(()=>({onSelect:a,clear:i,getSelected:()=>ye.o(o.current)}),[a,i]);return Oe.jsxRuntimeExports.jsx(dw.Provider,{value:s,children:Oe.jsxRuntimeExports.jsx(vw.Provider,{value:u,children:r})})});hw.displayName="List.Selector";const Lue=hw,gw=["ArrowUp"],yw=["ArrowDown"],bw=["Enter"],que=[gw,yw,bw],xw=$.createContext({hover:-1,setHover:()=>{}}),lp=()=>$.useContext(xw),kue=({children:e,initialHover:r=-1,disabled:t=!1})=>{const n=vf(),{transformedData:a}=mi(),{onSelect:i}=zu(),[o,u,s]=Xi(r),l=$.useRef(r);$.useEffect(()=>{t&&(l.current=o),u(t?-1:l.current)},[t]),$.useEffect(()=>{o>=a.length&&u(0)},[a.length]);const c=$.useRef(null),f=$.useCallback(({triggers:v,stage:m})=>{if(c.current!=null&&(clearInterval(c.current),c.current=null),m!=="start"||t)return;const d=n();if(Zn(v,[bw])){if(s.current===-1)return;i==null||i(d[s.current].key);return}const y=()=>{const h=n();Zn(v,[gw],!0)?u(E=>E<=0?h.length-1:E-1):Zn(v,[yw],!0)&&u(E=>E>=h.length-1?0:E+1)};y(),c.current=setTimeout(()=>{c.current=setInterval(y,100)},200)},[i,t]);di({triggers:que,callback:f,loose:!0});const p=$.useMemo(()=>({hover:o,setHover:u}),[o,u]);return Oe.jsxRuntimeExports.jsx(xw.Provider,{value:p,children:e})},ww=$.createContext({hasMore:!1,onFetchMore:()=>{}}),Ew=$.createContext({setHasMore:()=>{},setOnFetchMore:()=>{}}),Uue=()=>$.useContext(ww),Hue=()=>$.useContext(Ew),jue=({children:e})=>{const[r,t]=$.useState(!1),[n,a]=fo(()=>{}),i=$.useCallback(()=>{var s;(s=n.current)==null||s.call(n)},[n]),o=$.useMemo(()=>({hasMore:r,onFetchMore:i}),[r,i]),u=$.useMemo(()=>({setHasMore:t,setOnFetchMore:s=>{a(()=>s)}}),[t,a]);return Oe.jsxRuntimeExports.jsx(ww.Provider,{value:o,children:Oe.jsxRuntimeExports.jsx(Ew.Provider,{value:u,children:e})})},Vue=(e,r,t)=>{var o;const n=e>r?1:-1;let a=e;const i=e+n*2;G.C.contains({lower:0,upper:t.children.length},i)?a=e+n*2:a=e,(o=t.children[a])==null||o.scrollIntoView({block:"nearest",inline:"nearest",behavior:"smooth"})},Gue=({itemHeight:e,children:r,overscan:t=5,className:n,...a})=>{var b;const{hasMore:i,onFetchMore:o}=Uue(),{hover:u,setHover:s}=lp(),{transformedData:l,emptyContent:c,transformed:f,sourceData:p}=mi(),v=mw(),{onSelect:m}=zu(),d=$.useRef(null),y=Iue({count:l.length,getScrollElement:()=>d.current,estimateSize:()=>e,overscan:t}),h=sf(l);$.useLayoutEffect(()=>{h==null||h.length===0||l.length>0&&l[0].key!==h[0].key&&(y==null||y.scrollToIndex(0),s(0))},[l]),$.useEffect(()=>{if(d.current==null)return;const A=y.calculateRange(),D=G.C.construct(A.startIndex+2,A.endIndex-2);G.C.contains(D,u)||y.scrollToIndex(u)},[u,e]);const E=y.getVirtualItems(),g=(b=E.at(-1))==null?void 0:b.index,w=l.length;if($.useEffect(()=>{g===w-1&&i&&(o==null||o())},[g,w,i]),e<=0)throw new Error("itemHeight must be greater than 0");const x=l.length===0;return Oe.jsxRuntimeExports.jsx("div",{ref:d,className:G.CSS(n,G.CSS.BE("list","container"),x&&G.CSS.BM("list","empty")),...a,children:x?c:Oe.jsxRuntimeExports.jsx("div",{className:G.CSS.BE("list","virtualizer"),style:{height:y.getTotalSize()},children:E.map(({index:A,start:D})=>{const S=l[A];let N=A;return f&&(N=p.findIndex(C=>C.key===S.key)),r({key:S.key,sourceIndex:N,index:A,onSelect:m,entry:S,selected:v.includes(S.key),hovered:A===u,translate:D})})})})},Sw=({itemHeight:e=50,...r})=>{const{transformedData:t,transformed:n,emptyContent:a,sourceData:i}=mi(),{hover:o}=lp(),{selected:u}=up(),{onSelect:s}=zu(),l=$.useRef(null),c=sf(o)??0;return $.useLayoutEffect(()=>{l.current!=null&&Vue(o,c,l.current)},[o,e]),Oe.jsxRuntimeExports.jsx(kt.Space,{className:G.CSS.BE("list","container"),ref:l,size:0,...r,children:t.length===0?a:Oe.jsxRuntimeExports.jsx(Oe.jsxRuntimeExports.Fragment,{children:t.map((f,p)=>{let v=p;return n&&(v=i.findIndex(m=>m.key===f.key)),r.children({key:f.key,index:p,sourceIndex:v,onSelect:s,entry:f,selected:u.includes(f.key),hovered:p===o})})})})};Sw.Virtual=Gue;const Wue={statuses:[],add:()=>{}},cp=$.createContext(Wue),fp=$.useContext,Zue=cu(ye.Aggregator.TYPE,({aetherKey:e,children:r,maxHistory:t=500})=>{const[{path:n},{statuses:a},i]=lu({aetherKey:e,type:ye.Aggregator.TYPE,schema:ye.aggregatorStateZ,initialState:{statuses:[]}});if(t!=null&&a.length>t){const s=Math.floor(t*.9);i(l=>({...l,statuses:a.slice(0,s)}))}const o=$.useCallback(s=>{const l=ye.m.now(),c={time:l,key:l.toString(),...s};i(f=>({...f,statuses:[c,...f.statuses]}))},[i]),u=$.useMemo(()=>({statuses:a,add:o}),[a,o]);return Oe.jsxRuntimeExports.jsx(cp.Provider,{value:u,children:Oe.jsxRuntimeExports.jsx(vo,{path:n,children:r})})}),Yue=()=>fp(cp).add,Xue=ye.w.seconds(5),Kue=(e={})=>{const{statuses:r}=fp(cp),{expiration:t=Xue}=e,n=Gt(r),[a,i]=$.useState(()=>ye.m.now()),[o,u]=$.useState([]),s=r.filter(c=>{const f=c.time.after(a);return f&&setTimeout(()=>i(p=>c.time.after(p)?c.time:p),t.milliseconds),f&&!o.includes(c.key)}),l=$.useCallback(c=>{const f=n.current.find(v=>v.key===c);if(f==null)return;const p=Que(f,n.current);u(v=>[...v,...p.map(m=>m.key)])},[u]);return{statuses:Jue(s),silence:l}},Jue=e=>e.reduce((r,t)=>{const{message:n,variant:a}=t,i=r.find(o=>o.message===n&&o.variant===a);return i!=null?(i.count+=1,i.time.before(t.time)&&(i.time=t.time)):r.push({...t,count:1}),r},[]),Que=(e,r)=>r.filter(t=>{const{message:n,variant:a}=t;return n===e.message&&a===e.variant}),Aw={info:"var(--pluto-text-color)",error:"var(--pluto-error-z)",warning:"var(--pluto-warning-z)",success:"var(--pluto-primary-z)",loading:"var(--pluto-text-color)",disabled:"var(--pluto-gray-l6)",secondary:"var(--pluto-secondary-z)"},Dw=({variant:e="info",level:r="p",hideIcon:t=!1,className:n,...a})=>{const i=e==="loading"?Oe.jsxRuntimeExports.jsx($t.Loading,{}):Oe.jsxRuntimeExports.jsx($t.Circle,{});return Oe.jsxRuntimeExports.jsx(Lu,{color:Aw[e],className:G.CSS(n,G.CSS.B("status-text")),level:r,startIcon:!t&&i,...a})},ele=({style:e,...r})=>Oe.jsxRuntimeExports.jsx(kt.Center,{style:e,grow:!0,children:Oe.jsxRuntimeExports.jsx(Dw,{...r})}),ba=Dw;ba.Centered=ele;const Nw=e=>({key:r,...t})=>Oe.jsxRuntimeExports.jsx(e,{...t},r),Cw=e=>typeof e=="function",Iu={height:150},Sl=Oe.jsxRuntimeExports.jsx(ba.Centered,{level:"h4",variant:"disabled",hideIcon:!0,style:Iu,children:"No Results"}),rle=Oe.jsxRuntimeExports.jsx(ba.Centered,{level:"h4",variant:"disabled",hideIcon:!0,style:Iu,children:"Type to search"}),tle=Oe.jsxRuntimeExports.jsx(ba.Centered,{level:"h2",variant:"disabled",hideIcon:!0,style:Iu,children:Oe.jsxRuntimeExports.jsx($t.Loading,{})}),nle=({error:e})=>Oe.jsxRuntimeExports.jsx(ba.Centered,{level:"h4",variant:"error",style:Iu,children:e.message}),Mw=({debounce:e=250,searcher:r,value:t,onChange:n,pageSize:a=10})=>{const[i,o]=ye.usePurePassthrough({value:t,onChange:n,initial:""}),u=Gt(i),s=$.useRef(!1),l=$.useRef(!0),c=$.useRef(0),{setSourceData:f,setEmptyContent:p}=po(),{setHasMore:v,setOnFetchMore:m}=Hue();$.useEffect(()=>p(rle),[p]);const d=$.useCallback((E=!1)=>{if(u.current.length>0||s.current||r==null)return;E&&(c.current=0,l.current=!0,v(!0)),s.current=!0,p(tle),(async()=>{try{const w=await r.page(c.current,a);w.length===0&&p(Sl),w.length<a&&(l.current=!1,v(!1)),c.current+=a,f(E?w:x=>[...x,...w])}catch(w){s.current=!1,p(Oe.jsxRuntimeExports.jsx(nle,{error:w}))}finally{s.current=!1}})()},[r,f,a]);$.useEffect(()=>{d(!0),m(d)},[d]);const y=gy(E=>{if(E.length===0){d(!0);return}if(r==null)return p(Sl);r.search(E).then(g=>{g.length===0&&p(Sl),f(g)}).catch(g=>{p(Oe.jsxRuntimeExports.jsx(ba.Centered,{level:"h4",variant:"error",children:g.message}))})},e,[r,f,p]),h=$.useCallback(E=>{o(E),y(E)},[o,y]);return{value:i,onChange:h}},ale=({children:e=Nw(hi),...r})=>e(Mw(r)),V1=ye.w$1.getOS()==="Windows",ile={Meta:V1?$t.Keyboard.Control:$t.Keyboard.Command,Alt:V1?()=>"Alt":$t.Keyboard.Option},js=({direction:e="y",className:r,padded:t=!1,...n})=>(t===!0&&(t="center"),Oe.jsxRuntimeExports.jsx("div",{className:G.CSS(G.CSS.B("divider"),G.CSS.dir(e),t!==!1&&G.CSS.BM("divider","padded"),typeof t=="string"&&G.CSS.loc(t),r),...n})),ole=Object.freeze(Object.defineProperty({__proto__:null,Divider:js},Symbol.toStringTag,{value:"Module"})),sle=e=>$.isValidElement(e)&&!("hydrate"in e.props),Lu=({level:e="h1",divided:r=!1,startIcon:t,endIcon:n,children:a,color:i,className:o,noWrap:u=!1,shade:s,weight:l,...c})=>{const f=ff(i,s),p=$.Children.toArray(t),v=$.Children.toArray(n),m=pp(e,a,f,s,l);return Oe.jsxRuntimeExports.jsxs(kt.Space,{className:G.CSS(G.CSS.B("text-icon"),G.CSS.BM("text-icon",e),G.CSS.noWrap(u),o),direction:"x",size:"small",align:"center",...c,style:{...c.style,color:f},children:[p,r&&t!=null&&Oe.jsxRuntimeExports.jsx(js,{direction:"y"}),m,r&&n!=null&&Oe.jsxRuntimeExports.jsx(js,{direction:"y"}),v]})},pp=(e,r=[],t,n,a)=>{const i=ye.A(r),o=[];let u=[];const s={color:t,level:e,shade:n,weight:a};return i.forEach(l=>{l!=null&&(typeof l=="string"||typeof l=="number"||!sle(l)?u.push(l):(u.length>0&&(o.push(Oe.jsxRuntimeExports.jsx(hn,{...s,children:u},u[0])),u=[]),o.push(l)))}),u.length>0&&o.push(Oe.jsxRuntimeExports.jsx(hn,{...s,children:u},u[0])),o.length===1?o[0]:o},lc=()=>document.getElementById("root")??document.body,Tw=yP,ule={dialogBox:G.To.ZERO,dialogLoc:G.J.BOTTOM_LEFT},vp=({visible:e,children:r,location:t,keepMounted:n=!0,className:a,variant:i="connected",close:o,maxHeight:u,open:s,toggle:l,...c})=>{const f=$.useRef(null),p=Gt(e),v=$.useRef(null),[{dialogBox:m,dialogLoc:d},y]=$.useState({...ule}),h=$.useCallback(()=>{if(f.current==null||v.current==null||!p.current)return;const S=i==="floating"?fle:vle,{adjustedDialog:N,location:C}=S({target:f.current,dialog:v.current,initial:t});y({dialogLoc:C,dialogBox:N})},[t,i]);$.useLayoutEffect(()=>{h()},[e,h]),di({triggers:[["Escape"]],callback:o,loose:!0});const E=Ul(h,{enabled:e}),g=kl(f,E),w=Ul(h,{enabled:e}),x=kl(v,w);let b={};i!=="modal"&&(b={...G.q.css(G.To.topLeft(m))},i==="connected"&&(b.width=G.To.width(m))),typeof u=="number"&&(b.maxHeight=u);const A=i==="connected"?kt.Pack:kt.Space;uf({ref:v,exclude:[f],onClickOutside:o});let D=Oe.jsxRuntimeExports.jsx(kt.Space,{ref:x,className:G.CSS(G.CSS.BE("dropdown","dialog"),G.CSS.loc(d.x),G.CSS.loc(d.y),G.CSS.visible(e),G.CSS.M(i),typeof u=="string"&&G.CSS.B(`height-${u}`)),role:"dialog",empty:!0,style:b,children:(n||e)&&r[1]});return i==="floating"?D=as.createPortal(D,lc()):i==="modal"&&(D=as.createPortal(Oe.jsxRuntimeExports.jsx(kt.Space,{className:G.CSS(G.CSS.BE("dropdown","bg"),G.CSS.visible(e)),role:"dialog",empty:!0,align:"center",children:D}),lc())),Oe.jsxRuntimeExports.jsxs(A,{...c,ref:g,className:G.CSS(a,G.CSS.B("dropdown"),G.CSS.visible(e),G.CSS.M(i),G.CSS.loc(d.x),G.CSS.loc(d.y)),direction:"y",reverse:d.y==="top",children:[r[0],D]})};vp.displayName="Dropdown";const lle={alignments:["end"],disable:["center"],prefer:[{y:"bottom"}]},cle=6,fle=({target:e,dialog:r,initial:t})=>{const n=vc.dialog({container:G.To.construct(0,0,window.innerWidth,window.innerHeight),target:G.To.construct(e),dialog:G.To.construct(r),...lle,initial:t}),{location:a}=n;return{adjustedDialog:G.To.translate(n.adjustedDialog,"y",ye.V(a.y==="top")*cle),location:a}},G1={alignments:["center"],disable:[{y:"center"}],initial:{x:"center"},prefer:[{y:"bottom"}]},ple=1,vle=({target:e,dialog:r,initial:t})=>{let n=G.To.construct(e),a=G.To.construct(0,0,window.innerWidth,window.innerHeight),i=e.parentElement;for(;i!=null;){if(window.getComputedStyle(i).getPropertyValue("container-type")!=="normal"){a=G.To.construct(i),n=G.To.translate(n,G.q.scale(G.To.topLeft(a),-1));break}i=i.parentElement}const o={target:n,dialog:G.To.resize(G.To.construct(r),"x",G.To.width(n)),container:a,...G1,initial:t??G1.initial},u=vc.dialog(o),{location:s}=u;return{adjustedDialog:G.To.translate(u.adjustedDialog,"y",ye.V(s.y==="bottom")*ple),location:s}},dle=Object.freeze(Object.defineProperty({__proto__:null,Dialog:vp,use:Tw},Symbol.toStringTag,{value:"Module"})),cc=wt.z.object({key:wt.z.string().or(wt.z.number()).or(wt.z.symbol()),type:wt.z.string(),elementID:wt.z.string().optional(),data:wt.z.record(wt.z.unknown()).optional()}),mle=wt.z.object({source:cc,items:wt.z.array(cc)}),hle={key:"",type:""},Xn={source:hle,items:[]},fc=$.createContext(null),Al={...Xn,onSuccessfulDrop:()=>{}},$i=()=>$.useContext(fc),Ow=({children:e,useState:r=$.useState,onDropOutside:t})=>{const n=$.useContext(fc),[a,i]=r(Xn),o=$.useRef(Al),u=$.useRef(new Set),s=$.useCallback((v,m,d)=>{o.current={source:v,items:m,onSuccessfulDrop:d},i({source:v,items:m})},[i,t]),l=$.useCallback(({target:v,dropped:m})=>{var y,h;const d=o.current.items;(h=(y=o.current).onSuccessfulDrop)==null||h.call(y,{target:v,dropped:m,hauled:d}),o.current=Al,i(Xn)},[i]),c=$.useCallback(v=>{let m=null;u.current.forEach(d=>{m==null&&(m=d(o.current,v))}),m!=null&&l(m),o.current=Al,i(Xn)},[i]),f=$.useCallback(v=>(u.current.add(v),()=>u.current.delete(v)),[]),p=$.useMemo(()=>n??{state:a,start:s,end:c,drop:l,bind:f},[a,s,c,l,n]);return Oe.jsxRuntimeExports.jsx(fc.Provider,{value:p,children:e})},dp=()=>{const e=$.useRef(Xn),r=$i();return r==null||(e.current=r.state),e},_w=()=>{const e=$i();return e==null?Xn:e.state},$w=({type:e,key:r})=>{const t=r??$.useId(),n=$.useMemo(()=>({key:t,type:e}),[t,e]),a=$i();if(a==null)return{startDrag:()=>{},onDragEnd:()=>{}};const{start:i,end:o}=a;return{startDrag:$.useCallback((u,s)=>i(n,u,s),[i,n]),onDragEnd:u=>o(G.q.construct({x:u.screenX,y:u.screenY}))}},mp=({type:e,key:r,canDrop:t,onDrop:n,onDragOver:a})=>{const i=dp(),o=$i();if(o==null)return{onDragOver:()=>{},onDrop:()=>{}};const{drop:u}=o,s=r??$.useId(),l=$.useMemo(()=>({key:s,type:e}),[s,e]),c=$.useCallback(p=>{t(i.current)&&(p.preventDefault(),a==null||a({event:p,...i.current}))},[i,t]),f=$.useCallback(p=>{t(i.current)&&(p.preventDefault(),u({target:l,dropped:n({...i.current,event:p})}))},[i,n,t,u,l]);return{onDragOver:c,onDrop:f}},Fw=({type:e,key:r,...t})=>{const n=r??$.useId(),a=$.useMemo(()=>({key:n,type:e}),[n,e]),i=$w(a),o=mp({...t,...a});return{...i,...o}},Bw=e=>({items:r})=>r.some(t=>t.type===e),Rw=(e,r)=>r.filter(t=>t.type===e),gle=({type:e,key:r,...t})=>{const n=$i();if(n==null)return;const a=dp(),{bind:i}=n,o=$.useRef(!1),u=r??$.useId(),s=$.useMemo(()=>({key:u,type:e}),[u,e]),l=$.useRef({...t,type:e,key:u});$.useEffect(()=>{const c=i((v,m)=>{const{canDrop:d,onDrop:y}=l.current;if(!d(v)||!o.current)return null;const h=y({...v},m);return{target:s,dropped:h}}),f=()=>{const{canDrop:v}=l.current;o.current=!1,v(a.current)},p=v=>{const{onDragOver:m,canDrop:d}=l.current,y=G.To.construct(window.document.documentElement);G.To.contains(y,G.q.construct(v.clientX,v.clientY)),o.current=!0,d(a.current)&&(m==null||m(a.current))};return document.body.addEventListener("dragleave",p),document.body.addEventListener("mouseenter",f),()=>{c(),document.body.removeEventListener("dragleave",p),document.body.removeEventListener("mouseenter",f)}},[])},yle=Object.freeze(Object.defineProperty({__proto__:null,Provider:Ow,ZERO_DRAGGING_STATE:Xn,canDropOfType:Bw,draggingStateZ:mle,filterByType:Rw,itemZ:cc,useContext:$i,useDrag:$w,useDragAndDrop:Fw,useDraggingRef:dp,useDraggingState:_w,useDrop:mp,useDropOutside:gle},Symbol.toStringTag,{value:"Module"})),Pw=(e,r,t,n)=>{if(r===!0)return"var(--pluto-gray-l5)";if(t!=null)return G.cssString(t);if(e==="filled")return"var(--pluto-text-on-primary)";if(n==null)return"var(--pluto-text-color)"},ble={delay:ye.w.milliseconds(750),startAccelerating:()=>{}},hp=$.createContext(ble),zw=()=>$.useContext(hp),xle=({delay:e=ye.w.milliseconds(700),accelerate:r=!0,acceleratedDelay:t=ye.w.minutes(60),accelerationDelay:n=ye.w.seconds(0),children:a})=>{const[i,o]=$.useState(!1),u=$.useRef(null),s=$.useCallback(()=>{i||!r||(o(!0),u.current=setTimeout(()=>{o(!1)},new ye.w(n).milliseconds))},[i,n]);return Oe.jsxRuntimeExports.jsx(hp.Provider,{value:{delay:i?t:e,startAccelerating:s},children:a})},wle=150,Iw=["top","bottom"],Lw=["left","right"],qw=[...Lw,...Iw],W1=[...qw,"center"],Ele={[G.J.xyToString(G.J.TOP_RIGHT)]:(e,r)=>G.q.translate(e,"x",-G.To.width(r)),[G.J.xyToString(G.J.TOP_LEFT)]:(e,r)=>G.q.translate(e,"x",G.To.width(r)),[G.J.xyToString(G.J.BOTTOM_RIGHT)]:(e,r)=>G.q.translate(e,"x",-G.To.width(r)),[G.J.xyToString(G.J.BOTTOM_LEFT)]:(e,r)=>G.q.translate(e,"x",G.To.width(r))},Dl=(e,r,t)=>{for(const n of t)if(Math.abs(G.To.loc(r,n)-G.To.loc(e,n))>wle)return n;return t[0]},kw=(e,r,t)=>{const n=G.J.location.safeParse(e),a=o=>{let u;return o==="center"?u=qw:G.J.isX(o)?u=["center",...Iw]:u=["center",...Lw],G.J.construct(Dl(r,t,u))};if(n.success)return G.J.constructXY(n.data,a(n.data));if(e!=null){const o={...e};return o.x==null&&o.y!=null?o.x=a(G.J.construct(o.y)):o.y==null&&o.x!=null?o.y=a(G.J.construct(o.x)):o.x==null&&o.y==null&&(o.x=Dl(r,t,W1),o.y=a(G.J.construct(o.x))),G.J.constructXY(o)}const i=Dl(r,t,W1);return G.J.constructXY(i,a(i))},Sle=(e,r)=>{let t=e;for(;t!=null;){if(t.id===r)return t;t=t.parentElement}return e},Uw=({delay:e,children:r,location:t,hide:n=!1})=>{const{startAccelerating:a,delay:i}=zw(),o=new ye.w(e??i),[u,s]=$.useState(null),l=$.useRef(null),c=$.useId(),f=$.useRef(null),p=$.useCallback((E,g)=>{var C,M,B;if(!g||n)return(C=f.current)==null||C.call(f),s(null);a();const w=G.To.construct(Sle(E.target,c));if(!G.To.contains(w,G.q.construct(E)))return(M=f.current)==null||M.call(f),s(null);const x=G.To.construct(document.documentElement),b=kw(t,w,x);let A=G.To.xyLoc(w,b);const D=Ele[G.J.xyToString(b)];D!=null&&(A=D(A,w));const S=G.To.construct(document.body);s({location:b,position:G.q.translate(A,G.q.scale(G.To.topLeft(S),-1)),triggerDims:G.To.dims(w)}),(B=f.current)==null||B.call(f);const N=P=>{const R=G.q.construct(P);G.To.contains(w,R)||(s(null),document.removeEventListener("mousemove",N),f.current=null,l.current!=null&&clearTimeout(l.current))};document.addEventListener("mousemove",N),f.current=()=>document.removeEventListener("mousemove",N),document.addEventListener("mousedown",()=>{var P;s(null),(P=f.current)==null||P.call(f)},{once:!0})},[a,t,n,c,o.milliseconds]);n&&u!=null&&s(null);const v=$.useCallback(E=>{l.current=setTimeout(()=>p(E,!0),o.milliseconds)},[p,o.milliseconds]),m=$.useCallback(E=>{l.current!=null&&clearTimeout(l.current),p(E,!1)},[p]),[d,y]=r,h=document.body;return Oe.jsxRuntimeExports.jsxs(Oe.jsxRuntimeExports.Fragment,{children:[u!=null&&as.createPortal(Oe.jsxRuntimeExports.jsx("div",{className:G.CSS(G.CSS.B("tooltip"),G.CSS.loc(u.location.x),G.CSS.loc(u.location.y)),style:{"--pos-x":G.CSS.px(u.position.x),"--pos-y":G.CSS.px(u.position.y),"--el-width":G.CSS.px(u.triggerDims.width)},children:Cw(d)?d(u):Hw(d)}),h),$.cloneElement(y,{id:c,onMouseEnter:v,onMouseLeave:m,onMouseDown:$.useCallback(E=>{var g,w;m(E),(w=(g=y.props).onMouseDown)==null||w.call(g,E)},[p])})]})},Hw=e=>typeof e=="string"||typeof e=="number"||!$.isValidElement(e)?Oe.jsxRuntimeExports.jsx(hn,{level:"small",children:e}):e,gp=e=>{const r=$.forwardRef(({tooltipDelay:t,tooltip:n,tooltipLocation:a,...i},o)=>{const u=Oe.jsxRuntimeExports.jsx(e,{ref:o,...i});return n==null?u:Oe.jsxRuntimeExports.jsxs(Uw,{delay:t,location:a,children:[n,u]})});return r.displayName=`Tooltip.Wrap(${e.displayName??e.name})`,r},jw=gp(({size:e="medium",variant:r="filled",type:t="button",className:n,children:a,iconSpacing:i,sharp:o=!1,disabled:u=!1,loading:s=!1,level:l,triggers:c,startIcon:f=[],delay:p=0,onClick:v,...m})=>{s&&(f=[...ye.A(f),Oe.jsxRuntimeExports.jsx($t.Loading,{},"loader")]),i==null&&(i=e==="small"?"small":"medium");const d=y=>{if(u)return;if((p instanceof ye.w?p:ye.w.milliseconds(p)).isZero)return v==null?void 0:v(y)};return di({triggers:c,callback:({stage:y})=>y==="end"&&d(new MouseEvent("click"))}),Oe.jsxRuntimeExports.jsx(Lu,{el:"button",className:G.CSS(G.CSS.B("btn"),G.CSS.size(e),G.CSS.sharp(o),G.CSS.disabled(u),G.CSS.BM("btn",r),n),type:t,level:l??ye.ComponentSizeLevels[e],size:i,onClick:d,noWrap:!0,color:Pw(r,u,m.color,m.shade),startIcon:f,...m,children:a})}),Vw=$.forwardRef(({children:e,className:r,variant:t="text",size:n="medium",sharp:a=!1,disabled:i=!1,loading:o=!1,onClick:u,...s},l)=>(o&&(e=Oe.jsxRuntimeExports.jsx($t.Loading,{})),Oe.jsxRuntimeExports.jsx("button",{ref:l,className:G.clsx(r,G.CSS.B("btn"),G.CSS.B("btn-icon"),G.CSS.size(n),G.CSS.sharp(a),G.CSS.BM("btn",t),G.CSS.disabled(i)),onClick:i?void 0:u,...s,children:typeof e=="string"?e:$.cloneElement(e,{color:Pw(t,i,s.color),fill:"currentColor",...e.props})})));Vw.displayName="ButtonIcon";const yp=gp(Vw),Gw=e=>({value:r,onClick:t,onChange:n,checkedVariant:a="filled",uncheckedVariant:i="outlined",rightClickToggle:o=!1,...u})=>Oe.jsxRuntimeExports.jsx(e,{...u,checked:r,onClick:s=>{t==null||t(s),!o&&n(!r)},onContextMenu:s=>{s.preventDefault(),s.stopPropagation(),o&&n(!r)},className:G.CSS(G.CSS.B("btn-toggle"),u.className),variant:r?a:i}),Ww=Gw(jw);Ww.displayName="ButtonToggle";const Zw=Gw(yp);Zw.displayName="ButtonToggleIcon";exports.ALPHANUMERIC_KEYS=lf;exports.ALPHANUMERIC_KEYS_SET=by;exports.Aggregator=Zue;exports.Button=jw;exports.CONTEXT_SELECTED=df;exports.CONTEXT_TARGET=ys;exports.Column=Nue;exports.ColumnContext=sp;exports.Composite=vo;exports.Config=xle;exports.Context=hp;exports.Context$1=az;exports.ContextMenu=Uy;exports.Core=Sw;exports.CoreDateTime=_y;exports.DataProvider=XP;exports.Date=Jy;exports.DateTime=IP;exports.Dialog=vp;exports.Dialog$1=Uw;exports.Divider=js;exports.Divider$1=ole;exports.DragButton=fu;exports.Dropdown=dle;exports.Editable=Ry;exports.Haul=yle;exports.Hover=kue;exports.Icon=yp;exports.InfiniteProvider=jue;exports.ItemFrame=Hy;exports.KEYS=xy;exports.Link=VP;exports.MOUSE_KEYS=su;exports.MaybeEditable=HP;exports.Numeric=iw;exports.Provider=yue;exports.Provider$1=BP;exports.Provider$2=Ow;exports.Provider$3=Zy;exports.Provider$4=mf;exports.Search=ale;exports.Selector=Lue;exports.SketchPicker=uP;exports.Switch=bue;exports.Switch$1=op;exports.Symbols=ile;exports.Text=hn;exports.Text$1=hi;exports.Text$2=ba;exports.TextArea=ow;exports.Time=uw;exports.Toggle=Ww;exports.ToggleIcon=Zw;exports.WithIcon=Lu;exports.asyncEdit=UP;exports.bt=$t;exports.canDropOfType=Bw;exports.chooseLocation=kw;exports.combineDateAndTimeValue=mue;exports.compareArrayDeps=my;exports.compareModeConfigs=Ny;exports.componentRenderProp=Nw;exports.determineMode=MP;exports.diff=Ay;exports.edit=By;exports.evalColor=ff;exports.eventKey=Ya;exports.filter=gs;exports.filterByType=Rw;exports.flattenConfig=Cy;exports.formatChildren=pp;exports.formatTip=Hw;exports.getRootElement=lc;exports.isRenderProp=Cw;exports.keyZ=wy;exports.keyboardKey=Ey;exports.main=sz;exports.match=Zn;exports.matchCallback=NP;exports.mouseKey=Sy;exports.mouseKeyZ=EP;exports.purge=cf;exports.purgeMouse=OP;exports.selectValueIsZero=Py;exports.toCSSVars=jy;exports.triggerZ=SP;exports.use=gue;exports.use$1=Tw;exports.use$2=di;exports.use$3=lu;exports.useAggregator=Yue;exports.useAsyncEffect=xP;exports.useClickOutside=uf;exports.useCombinedRefs=kl;exports.useCombinedStateAndRef=Xi;exports.useConfig=zw;exports.useContext=Pu;exports.useContext$1=Ty;exports.useContext$2=fp;exports.useContextMenu=QP;exports.useDataContext=mi;exports.useDataUtilContext=po;exports.useDate=Ky;exports.useDebouncedCallback=gy;exports.useDragAndDrop=Fw;exports.useDraggingState=_w;exports.useDrop=mp;exports.useEffectCompare=hy;exports.useFlattenedMemoConfig=TP;exports.useGetTransformedData=vf;exports.useHeld=PP;exports.useHeldRef=Hl;exports.useHoverContext=lp;exports.useMemoCompare=sa;exports.useMemoDeepEqualProps=bP;exports.useNotifications=Kue;exports.usePrevious=sf;exports.useProvider=cw;exports.useResize=Ul;exports.useSearch=Mw;exports.useSelect=zy;exports.useSelection=mw;exports.useSelectionContext=up;exports.useSelectionUtils=zu;exports.useSetSourceData=YP;exports.useSourceData=qy;exports.useStateRef=fo;exports.useSyncedRef=Gt;exports.useTime=sw;exports.useTransformedData=ZP;exports.useTransforms=yy;exports.useTypography=fw;exports.useUniqueKey=Vy;exports.variantColors=Aw;exports.wrap=gp;exports.wrap$1=cu;
|