@perses-dev/timeseries-chart-plugin 0.8.0 → 0.9.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/__mf/js/{983.94371668.js → 983.b0368f8f.js} +2 -2
- package/__mf/js/{TimeSeriesChart.74367dd5.js → TimeSeriesChart.33363c77.js} +3 -3
- package/__mf/js/async/171.598de6a9.js +7 -0
- package/__mf/js/async/223.def4d0a9.js +1 -0
- package/__mf/js/async/281.a2a87c37.js +2 -0
- package/__mf/js/async/359.18a264e7.js +2 -0
- package/__mf/js/async/359.18a264e7.js.LICENSE.txt +15 -0
- package/__mf/js/async/{409.0647f389.js → 409.b4cabab7.js} +1 -1
- package/__mf/js/async/845.6d99c354.js +73 -0
- package/__mf/js/async/879.24def15a.js +2 -0
- package/__mf/js/async/{225.8c13dfe9.js.LICENSE.txt → 879.24def15a.js.LICENSE.txt} +1 -17
- package/__mf/js/async/{110.e82fda83.js → 964.6dfbf211.js} +2 -2
- package/__mf/js/async/{__federation_expose_TimeSeriesChart.3cb3d239.js → __federation_expose_TimeSeriesChart.1e16af77.js} +1 -1
- package/__mf/js/main.beef92ec.js +1 -0
- package/mf-manifest.json +34 -32
- package/mf-stats.json +34 -32
- package/package.json +4 -4
- package/__mf/js/async/225.8c13dfe9.js +0 -2
- package/__mf/js/async/570.87723a1e.js +0 -29
- package/__mf/js/async/65.86f223c0.js +0 -73
- package/__mf/js/async/797.f4545195.js +0 -2
- package/__mf/js/async/964.8be59ce0.js +0 -1
- package/__mf/js/main.b97521b5.js +0 -1
- /package/__mf/js/async/{570.87723a1e.js.LICENSE.txt → 171.598de6a9.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{797.f4545195.js.LICENSE.txt → 281.a2a87c37.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{65.86f223c0.js.LICENSE.txt → 845.6d99c354.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{110.e82fda83.js.LICENSE.txt → 964.6dfbf211.js.LICENSE.txt} +0 -0
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 225.8c13dfe9.js.LICENSE.txt */
|
|
2
|
-
(self.webpackChunkTimeSeriesChart=self.webpackChunkTimeSeriesChart||[]).push([["225"],{98346:function(t,e,r){"use strict";r.d(e,{Z:()=>b});var n=r(54538),i=r(90496),o=r(16819),s=r(82267),a=r(46954),u=r(14544),c=r(51640),f=r(12709),l=r(82319),h=r(90433),p=r(51751),d=r(87462),m=r(94996),g=r(19984),v=r(24246);let y=t=>{let{classes:e,fullWidth:r,selected:n,disabled:i,size:o,color:a}=t,u={root:["root",n&&"selected",i&&"disabled",r&&"fullWidth",`size${(0,c.Z)(o)}`,a]};return(0,s.Z)(u,d.a,e)},w=(0,f.ZP)(u.Z,{name:"MuiToggleButton",slot:"Root",overridesResolver:(t,e)=>{let{ownerState:r}=t;return[e.root,e[`size${(0,c.Z)(r.size)}`]]}})((0,l.Z)(({theme:t})=>({...t.typography.button,borderRadius:(t.vars||t).shape.borderRadius,padding:11,border:`1px solid ${(t.vars||t).palette.divider}`,color:(t.vars||t).palette.action.active,[`&.${d.Z.disabled}`]:{color:(t.vars||t).palette.action.disabled,border:`1px solid ${(t.vars||t).palette.action.disabledBackground}`},"&:hover":{textDecoration:"none",backgroundColor:t.vars?`rgba(${t.vars.palette.text.primaryChannel} / ${t.vars.palette.action.hoverOpacity})`:(0,a.Fq)(t.palette.text.primary,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[{props:{color:"standard"},style:{[`&.${d.Z.selected}`]:{color:(t.vars||t).palette.text.primary,backgroundColor:t.vars?`rgba(${t.vars.palette.text.primaryChannel} / ${t.vars.palette.action.selectedOpacity})`:(0,a.Fq)(t.palette.text.primary,t.palette.action.selectedOpacity),"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.text.primaryChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:(0,a.Fq)(t.palette.text.primary,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?`rgba(${t.vars.palette.text.primaryChannel} / ${t.vars.palette.action.selectedOpacity})`:(0,a.Fq)(t.palette.text.primary,t.palette.action.selectedOpacity)}}}}},...Object.entries(t.palette).filter((0,h.Z)()).map(([e])=>({props:{color:e},style:{[`&.${d.Z.selected}`]:{color:(t.vars||t).palette[e].main,backgroundColor:t.vars?`rgba(${t.vars.palette[e].mainChannel} / ${t.vars.palette.action.selectedOpacity})`:(0,a.Fq)(t.palette[e].main,t.palette.action.selectedOpacity),"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette[e].mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:(0,a.Fq)(t.palette[e].main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?`rgba(${t.vars.palette[e].mainChannel} / ${t.vars.palette.action.selectedOpacity})`:(0,a.Fq)(t.palette[e].main,t.palette.action.selectedOpacity)}}}}})),{props:{fullWidth:!0},style:{width:"100%"}},{props:{size:"small"},style:{padding:7,fontSize:t.typography.pxToRem(13)}},{props:{size:"large"},style:{padding:15,fontSize:t.typography.pxToRem(15)}}]}))),b=n.forwardRef(function(t,e){var r;let{value:s,...a}=n.useContext(m.Z),u=n.useContext(g.Z),c=(0,o.Z)({...a,selected:(r=t.value,void 0!==s&&void 0!==r&&(Array.isArray(s)?s.includes(r):r===s))},t),f=(0,p.i)({props:c,name:"MuiToggleButton"}),{children:l,className:h,color:d="standard",disabled:b=!1,disableFocusRipple:x=!1,fullWidth:_=!1,onChange:N,onClick:M,selected:E,size:O="medium",value:S,...A}=f,j={...f,color:d,disabled:b,disableFocusRipple:x,fullWidth:_,size:O},F=y(j);return(0,v.jsx)(w,{className:(0,i.Z)(a.className,F.root,h,u||""),disabled:b,focusRipple:!x,ref:e,onClick:t=>{(!M||(M(t,S),!t.defaultPrevented))&&N&&N(t,S)},onChange:N,value:S,ownerState:j,"aria-pressed":E,...A,children:l})})},87462:function(t,e,r){"use strict";r.d(e,{Z:()=>s,a:()=>o});var n=r(44124),i=r(6749);function o(t){return(0,i.ZP)("MuiToggleButton",t)}let s=(0,n.Z)("MuiToggleButton",["root","disabled","selected","standard","primary","secondary","sizeSmall","sizeMedium","sizeLarge","fullWidth"])},5404:function(t,e,r){"use strict";r.d(e,{Z:()=>x});var n=r(54538),i=r(90496),o=r(82267),s=r(65124),a=r(12709),u=r(82319),c=r(51751),f=r(51640),l=r(44124),h=r(6749);function p(t){return(0,h.ZP)("MuiToggleButtonGroup",t)}let d=(0,l.Z)("MuiToggleButtonGroup",["root","selected","horizontal","vertical","disabled","grouped","groupedHorizontal","groupedVertical","fullWidth","firstButton","lastButton","middleButton"]);var m=r(94996),g=r(19984),v=r(87462),y=r(24246);let w=t=>{let{classes:e,orientation:r,fullWidth:n,disabled:i}=t,s={root:["root",r,n&&"fullWidth"],grouped:["grouped",`grouped${(0,f.Z)(r)}`,i&&"disabled"],firstButton:["firstButton"],lastButton:["lastButton"],middleButton:["middleButton"]};return(0,o.Z)(s,p,e)},b=(0,a.ZP)("div",{name:"MuiToggleButtonGroup",slot:"Root",overridesResolver:(t,e)=>{let{ownerState:r}=t;return[{[`& .${d.grouped}`]:e.grouped},{[`& .${d.grouped}`]:e[`grouped${(0,f.Z)(r.orientation)}`]},{[`& .${d.firstButton}`]:e.firstButton},{[`& .${d.lastButton}`]:e.lastButton},{[`& .${d.middleButton}`]:e.middleButton},e.root,"vertical"===r.orientation&&e.vertical,r.fullWidth&&e.fullWidth]}})((0,u.Z)(({theme:t})=>({display:"inline-flex",borderRadius:(t.vars||t).shape.borderRadius,variants:[{props:{orientation:"vertical"},style:{flexDirection:"column",[`& .${d.grouped}`]:{[`&.${d.selected} + .${d.grouped}.${d.selected}`]:{borderTop:0,marginTop:0}},[`& .${d.firstButton},& .${d.middleButton}`]:{borderBottomLeftRadius:0,borderBottomRightRadius:0},[`& .${d.lastButton},& .${d.middleButton}`]:{marginTop:-1,borderTop:"1px solid transparent",borderTopLeftRadius:0,borderTopRightRadius:0},[`& .${d.lastButton}.${v.Z.disabled},& .${d.middleButton}.${v.Z.disabled}`]:{borderTop:"1px solid transparent"}}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{orientation:"horizontal"},style:{[`& .${d.grouped}`]:{[`&.${d.selected} + .${d.grouped}.${d.selected}`]:{borderLeft:0,marginLeft:0}},[`& .${d.firstButton},& .${d.middleButton}`]:{borderTopRightRadius:0,borderBottomRightRadius:0},[`& .${d.lastButton},& .${d.middleButton}`]:{marginLeft:-1,borderLeft:"1px solid transparent",borderTopLeftRadius:0,borderBottomLeftRadius:0},[`& .${d.lastButton}.${v.Z.disabled},& .${d.middleButton}.${v.Z.disabled}`]:{borderLeft:"1px solid transparent"}}}]}))),x=n.forwardRef(function(t,e){let r=(0,c.i)({props:t,name:"MuiToggleButtonGroup"}),{children:o,className:a,color:u="standard",disabled:f=!1,exclusive:l=!1,fullWidth:h=!1,onChange:p,orientation:d="horizontal",size:v="medium",value:x,..._}=r,N={...r,disabled:f,fullWidth:h,orientation:d,size:v},M=w(N),E=n.useCallback((t,e)=>{let r;if(!p)return;let n=x&&x.indexOf(e);x&&n>=0?(r=x.slice()).splice(n,1):r=x?x.concat(e):[e],p(t,r)},[p,x]),O=n.useCallback((t,e)=>{p&&p(t,x===e?null:e)},[p,x]),S=n.useMemo(()=>({className:M.grouped,onChange:l?O:E,value:x,size:v,fullWidth:h,color:u,disabled:f}),[M.grouped,l,O,E,x,v,h,u,f]),A=(0,s.Z)(o),j=A.length,F=t=>{let e=0===t,r=t===j-1;return e&&r?"":e?M.firstButton:r?M.lastButton:M.middleButton};return(0,y.jsx)(b,{role:"group",className:(0,i.Z)(M.root,a),ref:e,ownerState:N,..._,children:(0,y.jsx)(m.Z.Provider,{value:S,children:A.map((t,e)=>(0,y.jsx)(g.Z.Provider,{value:F(e),children:t},e))})})})},19984:function(t,e,r){"use strict";r.d(e,{Z:()=>n});let n=r(54538).createContext(void 0)},94996:function(t,e,r){"use strict";r.d(e,{Z:()=>n});let n=r(54538).createContext({})},65124:function(t,e,r){"use strict";r.d(e,{Z:()=>i});var n=r(54538);function i(t){return n.Children.toArray(t).filter(t=>n.isValidElement(t))}},69134:function(t,e,r){"use strict";r.d(e,{Z:()=>n});let n={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"}},74664:function(t,e,r){"use strict";r.d(e,{Fp:()=>th,Bl:()=>ta,Bw:()=>tu,__:()=>tl});var n,i,o,s,a,u,c,f,l,h="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==r.g?r.g:"undefined"!=typeof self?self:{};function p(){if(a)return s;a=1;let t=[{key:"ZiB",factor:11805916207174113e5},{key:"ZB",factor:1e21},{key:"YiB",factor:12089258196146292e8},{key:"YB",factor:1e24},{key:"TiB",factor:0x10000000000},{key:"TB",factor:1e12},{key:"PiB",factor:0x4000000000000},{key:"PB",factor:1e15},{key:"MiB",factor:1048576},{key:"MB",factor:1e6},{key:"KiB",factor:1024},{key:"KB",factor:1e3},{key:"GiB",factor:0x40000000},{key:"GB",factor:1e9},{key:"EiB",factor:0x1000000000000000},{key:"EB",factor:1e18},{key:"B",factor:1}];function e(t){return t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}return s={unformat:function(r,n){let i;let o=g(),s=o.currentDelimiters(),a=o.currentCurrency().symbol,u=o.currentOrdinal(),c=o.getZeroFormat(),f=o.currentAbbreviations();if("string"==typeof r){if(function(t,e){if(!(t.indexOf(":")&&":"!==e.thousands))return!1;let r=t.split(":");if(3!==r.length)return!1;let n=+r[0],i=+r[1],o=+r[2];return!isNaN(n)&&!isNaN(i)&&!isNaN(o)}(r,s)){let t,e,n;e=+(t=r.split(":"))[0],n=+t[1],i=+t[2]+60*n+3600*e}else i=function(r,n,i="",o,s,a,u){let c;if(""!==r)return r===s?0:function r(n,i,o,s,a,u,c){if(!isNaN(+n))return+n;let f="",l=n.replace(/(^[^(]*)\((.*)\)([^)]*$)/,"$1$2$3");if(l!==n)return -1*r(l,i,o,s,a,u);for(let e=0;e<t.length;e++){let c=t[e];if((f=n.replace(RegExp(`([0-9 ])(${c.key})$`),"$1"))!==n)return r(f,i,o,s,a,u)*c.factor}if((f=n.replace("%",""))!==n)return r(f,i,o,s,a,u)/100;let h=parseFloat(n);if(isNaN(h))return;let p=s(h);if(p&&"."!==p&&(f=n.replace(RegExp(`${e(p)}$`),""))!==n)return r(f,i,o,s,a,u);let d={};Object.keys(u).forEach(t=>{d[u[t]]=t});let m=Object.keys(d).sort().reverse(),g=m.length;for(let t=0;t<g;t++){let e=m[t],c=d[e];if((f=n.replace(e,""))!==n){let t;switch(c){case"thousand":t=1e3;break;case"million":t=1e6;break;case"billion":t=1e9;break;case"trillion":t=1e12}return r(f,i,o,s,a,u)*t}}}(r.replace(i,"").replace(RegExp(`([0-9])${e(n.thousands)}([0-9])`,"g"),"$1$2").replace(n.decimal,"."),n,i,o,s,a)}(r,s,a,u,c,f)}else{if("number"!=typeof r)return;i=r}if(void 0!==i)return i}}}function d(){if(c)return u;c=1;let t=p(),e=/^[a-z]{2,3}(-[a-zA-Z]{4})?(-([A-Z]{2}|[0-9]{3}))?$/,r={output:{type:"string",validValues:["currency","percent","byte","time","ordinal","number"]},base:{type:"string",validValues:["decimal","binary","general"],restriction:(t,e)=>"byte"===e.output,message:"`base` must be provided only when the output is `byte`",mandatory:t=>"byte"===t.output},characteristic:{type:"number",restriction:t=>t>=0,message:"value must be positive"},prefix:"string",postfix:"string",forceAverage:{type:"string",validValues:["trillion","billion","million","thousand"]},average:"boolean",lowPrecision:{type:"boolean",restriction:(t,e)=>!0===e.average,message:"`lowPrecision` must be provided only when the option `average` is set"},currencyPosition:{type:"string",validValues:["prefix","infix","postfix"]},currencySymbol:"string",totalLength:{type:"number",restrictions:[{restriction:t=>t>=0,message:"value must be positive"},{restriction:(t,e)=>!e.exponential,message:"`totalLength` is incompatible with `exponential`"}]},mantissa:{type:"number",restriction:t=>t>=0,message:"value must be positive"},optionalMantissa:"boolean",trimMantissa:"boolean",roundingFunction:"function",optionalCharacteristic:"boolean",thousandSeparated:"boolean",spaceSeparated:"boolean",spaceSeparatedCurrency:"boolean",spaceSeparatedAbbreviation:"boolean",abbreviations:{type:"object",children:{thousand:"string",million:"string",billion:"string",trillion:"string"}},negative:{type:"string",validValues:["sign","parenthesis"]},forceSign:"boolean",exponential:{type:"boolean"},prefixSymbol:{type:"boolean",restriction:(t,e)=>"percent"===e.output,message:"`prefixSymbol` can be provided only when the output is `percent`"}},n={languageTag:{type:"string",mandatory:!0,restriction:t=>t.match(e),message:"the language tag must follow the BCP 47 specification (see https://tools.ieft.org/html/bcp47)"},delimiters:{type:"object",children:{thousands:"string",decimal:"string",thousandsSize:"number"},mandatory:!0},abbreviations:{type:"object",children:{thousand:{type:"string",mandatory:!0},million:{type:"string",mandatory:!0},billion:{type:"string",mandatory:!0},trillion:{type:"string",mandatory:!0}},mandatory:!0},spaceSeparated:"boolean",spaceSeparatedCurrency:"boolean",ordinal:{type:"function",mandatory:!0},bytes:{type:"object",children:{binarySuffixes:"object",decimalSuffixes:"object"}},currency:{type:"object",children:{symbol:"string",position:"string",code:"string"},mandatory:!0},defaults:"format",ordinalFormat:"format",byteFormat:"format",percentageFormat:"format",currencyFormat:"format",timeDefaults:"format",formats:{type:"object",children:{fourDigits:{type:"format",mandatory:!0},fullWithTwoDecimals:{type:"format",mandatory:!0},fullWithTwoDecimalsNoCurrency:{type:"format",mandatory:!0},fullWithNoDecimals:{type:"format",mandatory:!0}}}};function i(e){return void 0!==t.unformat(e)}function o(t,e,n,i=!1){let s=Object.keys(t).map(i=>{if(!e[i])return console.error(`${n} Invalid key: ${i}`),!1;let s=t[i],a=e[i];if("string"==typeof a&&(a={type:a}),"format"===a.type){if(!o(s,r,`[Validate ${i}]`,!0))return!1}else if(typeof s!==a.type)return console.error(`${n} ${i} type mismatched: "${a.type}" expected, "${typeof s}" provided`),!1;if(a.restrictions&&a.restrictions.length){let e=a.restrictions.length;for(let r=0;r<e;r++){let{restriction:e,message:o}=a.restrictions[r];if(!e(s,t))return console.error(`${n} ${i} invalid value: ${o}`),!1}}return a.restriction&&!a.restriction(s,t)?(console.error(`${n} ${i} invalid value: ${a.message}`),!1):a.validValues&&-1===a.validValues.indexOf(s)?(console.error(`${n} ${i} invalid value: must be among ${JSON.stringify(a.validValues)}, "${s}" provided`),!1):!a.children||!!o(s,a.children,`[Validate ${i}]`)});return i||s.push(...Object.keys(e).map(r=>{let i=e[r];if("string"==typeof i&&(i={type:i}),i.mandatory){let e=i.mandatory;if("function"==typeof e&&(e=e(t)),e&&void 0===t[r])return console.error(`${n} Missing mandatory key "${r}"`),!1}return!0})),s.reduce((t,e)=>t&&e,!0)}function s(t){return o(t,r,"[Validate format]")}return u={validate:function(t,e){let r=i(t),n=s(e);return r&&n},validateFormat:s,validateInput:i,validateLanguage:function(t){return o(t,n,"[Validate language]")}}}var m={parseFormat:function(t,e={}){var r,n,i,o,s;let a,u,c,f;return"string"!=typeof t?t:(!function(t,e){if(-1!==t.indexOf("$")){e.output="currency";return}if(-1!==t.indexOf("%")){e.output="percent";return}if(-1!==t.indexOf("bd")){e.output="byte",e.base="general";return}if(-1!==t.indexOf("b")){e.output="byte",e.base="binary";return}if(-1!==t.indexOf("d")){e.output="byte",e.base="decimal";return}if(-1!==t.indexOf(":")){e.output="time";return}-1!==t.indexOf("o")&&(e.output="ordinal")}(t=(u=(n=t=(a=(r=t).match(/^{([^}]*)}/))?(e.prefix=a[1],r.slice(a[0].length)):r).match(/{([^}]*)}$/))?(e.postfix=u[1],n.slice(0,-u[0].length)):n,e),(c=t.match(/[1-9]+[0-9]*/))&&(e.totalLength=+c[0]),(f=t.split(".")[0].match(/0+/))&&(e.characteristic=f[0].length),!function(t,e){if(-1!==t.indexOf(".")){let r=t.split(".")[0];e.optionalCharacteristic=-1===r.indexOf("0")}}(t,e),-1!==t.indexOf("a")&&(e.average=!0),-1!==(i=t).indexOf("K")?e.forceAverage="thousand":-1!==i.indexOf("M")?e.forceAverage="million":-1!==i.indexOf("B")?e.forceAverage="billion":-1!==i.indexOf("T")&&(e.forceAverage="trillion"),!function(t,e){let r=t.split(".")[1];if(r){let t=r.match(/0+/);t&&(e.mantissa=t[0].length)}}(t,e),(o=t).match(/\[\.]/)?e.optionalMantissa=!0:o.match(/\./)&&(e.optionalMantissa=!1),!function(t,e){let r=t.split(".")[1];r&&(e.trimMantissa=-1!==r.indexOf("["))}(t,e),-1!==t.indexOf(",")&&(e.thousandSeparated=!0),-1!==t.indexOf(" ")&&(e.spaceSeparated=!0,e.spaceSeparatedCurrency=!0,(e.average||e.forceAverage)&&(e.spaceSeparatedAbbreviation=!0)),(s=t).match(/^\+?\([^)]*\)$/)&&(e.negative="parenthesis"),s.match(/^\+?-/)&&(e.negative="sign"),t.match(/^\+/)&&(e.forceSign=!0),e)}};function g(){let t;if(l)return f;l=1;let e=o?i:(o=1,i={languageTag:"en-US",delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},spaceSeparated:!1,ordinal:function(t){let e=t%10;return 1==~~(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th"},bytes:{binarySuffixes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],decimalSuffixes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]},currency:{symbol:"$",position:"prefix",code:"USD"},currencyFormat:{thousandSeparated:!0,totalLength:4,spaceSeparated:!0,spaceSeparatedCurrency:!0},formats:{fourDigits:{totalLength:4,spaceSeparated:!0},fullWithTwoDecimals:{output:"currency",thousandSeparated:!0,mantissa:2},fullWithTwoDecimalsNoCurrency:{thousandSeparated:!0,mantissa:2},fullWithNoDecimals:{output:"currency",thousandSeparated:!0,mantissa:0}}}),r=d(),n={},s={},a=null,u={};function c(){return s[t]}return n.languages=()=>Object.assign({},s),n.currentLanguage=()=>t,n.currentBytes=()=>c().bytes||{},n.currentCurrency=()=>c().currency,n.currentAbbreviations=()=>c().abbreviations,n.currentDelimiters=()=>c().delimiters,n.currentOrdinal=()=>c().ordinal,n.currentDefaults=()=>Object.assign({},c().defaults,u),n.currentOrdinalDefaultFormat=()=>Object.assign({},n.currentDefaults(),c().ordinalFormat),n.currentByteDefaultFormat=()=>Object.assign({},n.currentDefaults(),c().byteFormat),n.currentPercentageDefaultFormat=()=>Object.assign({},n.currentDefaults(),c().percentageFormat),n.currentCurrencyDefaultFormat=()=>Object.assign({},n.currentDefaults(),c().currencyFormat),n.currentTimeDefaultFormat=()=>Object.assign({},n.currentDefaults(),c().timeFormat),n.setDefaults=t=>{t=m.parseFormat(t),r.validateFormat(t)&&(u=t)},n.getZeroFormat=()=>a,n.setZeroFormat=t=>a="string"==typeof t?t:null,n.hasZeroFormat=()=>null!==a,n.languageData=t=>{if(t){if(s[t])return s[t];throw Error(`Unknown tag "${t}"`)}return c()},n.registerLanguage=(e,n=!1)=>{if(!r.validateLanguage(e))throw Error("Invalid language data");s[e.languageTag]=e,n&&(t=e.languageTag)},n.setLanguage=(r,n=e.languageTag)=>{if(!s[r]){let e=r.split("-")[0],i=Object.keys(s).find(t=>t.split("-")[0]===e);if(!s[i]){t=n;return}t=i;return}t=r},n.registerLanguage(e),t=e.languageTag,f=n}var v={exports:{}};!function(t){var e,r=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,n=Math.ceil,i=Math.floor,o="[BigNumber Error] ",s=o+"Number primitive has more than 15 significant digits: ",a=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13];function u(t){var e=0|t;return t>0||t===e?e:e-1}function c(t){for(var e,r,n=1,i=t.length,o=t[0]+"";n<i;){for(r=14-(e=t[n++]+"").length;r--;e="0"+e);o+=e}for(i=o.length;48===o.charCodeAt(--i););return o.slice(0,i+1||1)}function f(t,e){var r,n,i=t.c,o=e.c,s=t.s,a=e.s,u=t.e,c=e.e;if(!s||!a)return null;if(r=i&&!i[0],n=o&&!o[0],r||n)return r?n?0:-a:s;if(s!=a)return s;if(r=s<0,n=u==c,!i||!o)return n?0:!i^r?1:-1;if(!n)return u>c^r?1:-1;for(s=0,a=(u=i.length)<(c=o.length)?u:c;s<a;s++)if(i[s]!=o[s])return i[s]>o[s]^r?1:-1;return u==c?0:u>c^r?1:-1}function l(t,e,r,n){if(t<e||t>r||t!==i(t))throw Error(o+(n||"Argument")+("number"==typeof t?t<e||t>r?" out of range: ":" not an integer: ":" not a primitive number: ")+String(t))}function h(t){var e=t.c.length-1;return u(t.e/14)==e&&t.c[e]%2!=0}function p(t,e){return(t.length>1?t.charAt(0)+"."+t.slice(1):t)+(e<0?"e":"e+")+e}function d(t,e,r){var n,i;if(e<0){for(i=r+".";++e;i+=r);t=i+t}else if(n=t.length,++e>n){for(i=r,e-=n;--e;i+=r);t+=i}else e<n&&(t=t.slice(0,e)+"."+t.slice(e));return t}(e=function t(e){var m,g,v,y,w,b,x,_,N,M=P.prototype={constructor:P,toString:null,valueOf:null},E=new P(1),O=20,S=4,A=-7,j=21,F=-1e7,z=1e7,D=!1,C=1,B=0,T={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:"\xa0",suffix:""},k="0123456789abcdefghijklmnopqrstuvwxyz",$=!0;function P(t,e){var n,o,a,u,c,f,h,p,d=this;if(!(d instanceof P))return new P(t,e);if(null==e){if(t&&!0===t._isBigNumber){d.s=t.s,!t.c||t.e>z?d.c=d.e=null:t.e<F?d.c=[d.e=0]:(d.e=t.e,d.c=t.c.slice());return}if((f="number"==typeof t)&&0*t==0){if(d.s=1/t<0?(t=-t,-1):1,t===~~t){for(u=0,c=t;c>=10;c/=10,u++);u>z?d.c=d.e=null:(d.e=u,d.c=[t]);return}p=String(t)}else{if(!r.test(p=String(t)))return N(d,p,f);d.s=45==p.charCodeAt(0)?(p=p.slice(1),-1):1}(u=p.indexOf("."))>-1&&(p=p.replace(".","")),(c=p.search(/e/i))>0?(u<0&&(u=c),u+=+p.slice(c+1),p=p.substring(0,c)):u<0&&(u=p.length)}else{if(l(e,2,k.length,"Base"),10==e&&$)return Z(d=new P(t),O+d.e+1,S);if(p=String(t),f="number"==typeof t){if(0*t!=0)return N(d,p,f,e);if(d.s=1/t<0?(p=p.slice(1),-1):1,P.DEBUG&&p.replace(/^0\.0*|\./,"").length>15)throw Error(s+t)}else d.s=45===p.charCodeAt(0)?(p=p.slice(1),-1):1;for(n=k.slice(0,e),u=c=0,h=p.length;c<h;c++)if(0>n.indexOf(o=p.charAt(c))){if("."==o){if(c>u){u=h;continue}}else if(!a&&(p==p.toUpperCase()&&(p=p.toLowerCase())||p==p.toLowerCase()&&(p=p.toUpperCase()))){a=!0,c=-1,u=0;continue}return N(d,String(t),f,e)}f=!1,(u=(p=_(p,e,10,d.s)).indexOf("."))>-1?p=p.replace(".",""):u=p.length}for(c=0;48===p.charCodeAt(c);c++);for(h=p.length;48===p.charCodeAt(--h););if(p=p.slice(c,++h)){if(h-=c,f&&P.DEBUG&&h>15&&(t>0x1fffffffffffff||t!==i(t)))throw Error(s+d.s*t);if((u=u-c-1)>z)d.c=d.e=null;else if(u<F)d.c=[d.e=0];else{if(d.e=u,d.c=[],c=(u+1)%14,u<0&&(c+=14),c<h){for(c&&d.c.push(+p.slice(0,c)),h-=14;c<h;)d.c.push(+p.slice(c,c+=14));c=14-(p=p.slice(c)).length}else c-=h;for(;c--;p+="0");d.c.push(+p)}}else d.c=[d.e=0]}function I(t,e,r,n){var i,o,s,a,u;if(null==r?r=S:l(r,0,8),!t.c)return t.toString();if(i=t.c[0],s=t.e,null==e)u=c(t.c),u=1==n||2==n&&(s<=A||s>=j)?p(u,s):d(u,s,"0");else if(o=(t=Z(new P(t),e,r)).e,a=(u=c(t.c)).length,1==n||2==n&&(e<=o||o<=A)){for(;a<e;u+="0",a++);u=p(u,o)}else if(e-=s,u=d(u,o,"0"),o+1>a){if(--e>0)for(u+=".";e--;u+="0");}else if((e+=o-a)>0)for(o+1==a&&(u+=".");e--;u+="0");return t.s<0&&i?"-"+u:u}function R(t,e){for(var r,n,i=1,o=new P(t[0]);i<t.length;i++)(n=new P(t[i])).s&&(r=f(o,n))!==e&&(0!==r||o.s!==e)||(o=n);return o}function L(t,e,r){for(var n=1,i=e.length;!e[--i];e.pop());for(i=e[0];i>=10;i/=10,n++);return(r=n+14*r-1)>z?t.c=t.e=null:r<F?t.c=[t.e=0]:(t.e=r,t.c=e),t}function Z(t,e,r,o){var s,u,c,f,l,h,p,d=t.c;if(d){t:{for(s=1,f=d[0];f>=10;f/=10,s++);if((u=e-s)<0)u+=14,c=e,p=i((l=d[h=0])/a[s-c-1]%10);else if((h=n((u+1)/14))>=d.length){if(o){for(;d.length<=h;d.push(0));l=p=0,s=1,u%=14,c=u-14+1}else break t}else{for(s=1,l=f=d[h];f>=10;f/=10,s++);u%=14,p=(c=u-14+s)<0?0:i(l/a[s-c-1]%10)}if(o=o||e<0||null!=d[h+1]||(c<0?l:l%a[s-c-1]),o=r<4?(p||o)&&(0==r||r==(t.s<0?3:2)):p>5||5==p&&(4==r||o||6==r&&(u>0?c>0?l/a[s-c]:0:d[h-1])%10&1||r==(t.s<0?8:7)),e<1||!d[0])return d.length=0,o?(e-=t.e+1,d[0]=a[(14-e%14)%14],t.e=-e||0):d[0]=t.e=0,t;if(0==u?(d.length=h,f=1,h--):(d.length=h+1,f=a[14-u],d[h]=c>0?i(l/a[s-c]%a[c])*f:0),o)for(;;){if(0==h){for(u=1,c=d[0];c>=10;c/=10,u++);for(c=d[0]+=f,f=1;c>=10;c/=10,f++);u!=f&&(t.e++,1e14==d[0]&&(d[0]=1));break}if(d[h]+=f,1e14!=d[h])break;d[h--]=0,f=1}for(u=d.length;0===d[--u];d.pop());}t.e>z?t.c=t.e=null:t.e<F&&(t.c=[t.e=0])}return t}function q(t){var e,r=t.e;return null===r?t.toString():(e=c(t.c),e=r<=A||r>=j?p(e,r):d(e,r,"0"),t.s<0?"-"+e:e)}return P.clone=t,P.ROUND_UP=0,P.ROUND_DOWN=1,P.ROUND_CEIL=2,P.ROUND_FLOOR=3,P.ROUND_HALF_UP=4,P.ROUND_HALF_DOWN=5,P.ROUND_HALF_EVEN=6,P.ROUND_HALF_CEIL=7,P.ROUND_HALF_FLOOR=8,P.EUCLID=9,P.config=P.set=function(t){var e,r;if(null!=t){if("object"==typeof t){if(t.hasOwnProperty(e="DECIMAL_PLACES")&&(l(r=t[e],0,1e9,e),O=r),t.hasOwnProperty(e="ROUNDING_MODE")&&(l(r=t[e],0,8,e),S=r),t.hasOwnProperty(e="EXPONENTIAL_AT")&&((r=t[e])&&r.pop?(l(r[0],-1e9,0,e),l(r[1],0,1e9,e),A=r[0],j=r[1]):(l(r,-1e9,1e9,e),A=-(j=r<0?-r:r))),t.hasOwnProperty(e="RANGE")){if((r=t[e])&&r.pop)l(r[0],-1e9,-1,e),l(r[1],1,1e9,e),F=r[0],z=r[1];else if(l(r,-1e9,1e9,e),r)F=-(z=r<0?-r:r);else throw Error(o+e+" cannot be zero: "+r)}if(t.hasOwnProperty(e="CRYPTO")){if(!!(r=t[e])===r){if(r){if("undefined"!=typeof crypto&&crypto&&(crypto.getRandomValues||crypto.randomBytes))D=r;else throw D=!r,Error(o+"crypto unavailable")}else D=r}else throw Error(o+e+" not true or false: "+r)}if(t.hasOwnProperty(e="MODULO_MODE")&&(l(r=t[e],0,9,e),C=r),t.hasOwnProperty(e="POW_PRECISION")&&(l(r=t[e],0,1e9,e),B=r),t.hasOwnProperty(e="FORMAT")){if("object"==typeof(r=t[e]))T=r;else throw Error(o+e+" not an object: "+r)}if(t.hasOwnProperty(e="ALPHABET")){if("string"!=typeof(r=t[e])||/^.?$|[+\-.\s]|(.).*\1/.test(r))throw Error(o+e+" invalid: "+r);$="0123456789"==r.slice(0,10),k=r}}else throw Error(o+"Object expected: "+t)}return{DECIMAL_PLACES:O,ROUNDING_MODE:S,EXPONENTIAL_AT:[A,j],RANGE:[F,z],CRYPTO:D,MODULO_MODE:C,POW_PRECISION:B,FORMAT:T,ALPHABET:k}},P.isBigNumber=function(t){if(!t||!0!==t._isBigNumber)return!1;if(!P.DEBUG)return!0;var e,r,n=t.c,s=t.e,a=t.s;t:if("[object Array]"==({}).toString.call(n)){if((1===a||-1===a)&&s>=-1e9&&s<=1e9&&s===i(s)){if(0===n[0]){if(0===s&&1===n.length)return!0;break t}if((e=(s+1)%14)<1&&(e+=14),String(n[0]).length==e){for(e=0;e<n.length;e++)if((r=n[e])<0||r>=1e14||r!==i(r))break t;if(0!==r)return!0}}}else if(null===n&&null===s&&(null===a||1===a||-1===a))return!0;throw Error(o+"Invalid BigNumber: "+t)},P.maximum=P.max=function(){return R(arguments,-1)},P.minimum=P.min=function(){return R(arguments,1)},P.random=(m=0x20000000000000*Math.random()&2097151?function(){return i(0x20000000000000*Math.random())}:function(){return(0x40000000*Math.random()|0)*8388608+(8388608*Math.random()|0)},function(t){var e,r,s,u,c,f=0,h=[],p=new P(E);if(null==t?t=O:l(t,0,1e9),u=n(t/14),D){if(crypto.getRandomValues){for(e=crypto.getRandomValues(new Uint32Array(u*=2));f<u;)(c=131072*e[f]+(e[f+1]>>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),e[f]=r[0],e[f+1]=r[1]):(h.push(c%1e14),f+=2);f=u/2}else if(crypto.randomBytes){for(e=crypto.randomBytes(u*=7);f<u;)(c=(31&e[f])*0x1000000000000+0x10000000000*e[f+1]+0x100000000*e[f+2]+0x1000000*e[f+3]+(e[f+4]<<16)+(e[f+5]<<8)+e[f+6])>=9e15?crypto.randomBytes(7).copy(e,f):(h.push(c%1e14),f+=7);f=u/7}else throw D=!1,Error(o+"crypto unavailable")}if(!D)for(;f<u;)(c=m())<9e15&&(h[f++]=c%1e14);for(u=h[--f],t%=14,u&&t&&(c=a[14-t],h[f]=i(u/c)*c);0===h[f];h.pop(),f--);if(f<0)h=[s=0];else{for(s=-1;0===h[0];h.splice(0,1),s-=14);for(f=1,c=h[0];c>=10;c/=10,f++);f<14&&(s-=14-f)}return p.e=s,p.c=h,p}),P.sum=function(){for(var t=1,e=arguments,r=new P(e[0]);t<e.length;)r=r.plus(e[t++]);return r},_=function(){var t="0123456789";function e(t,e,r,n){for(var i,o,s=[0],a=0,u=t.length;a<u;){for(o=s.length;o--;s[o]*=e);for(s[0]+=n.indexOf(t.charAt(a++)),i=0;i<s.length;i++)s[i]>r-1&&(null==s[i+1]&&(s[i+1]=0),s[i+1]+=s[i]/r|0,s[i]%=r)}return s.reverse()}return function(r,n,i,o,s){var a,u,f,l,h,p,m,g,v=r.indexOf("."),y=O,w=S;for(v>=0&&(l=B,B=0,r=r.replace(".",""),p=(g=new P(n)).pow(r.length-v),B=l,g.c=e(d(c(p.c),p.e,"0"),10,i,t),g.e=g.c.length),f=l=(m=e(r,n,i,s?(a=k,t):(a=t,k))).length;0==m[--l];m.pop());if(!m[0])return a.charAt(0);if(v<0?--f:(p.c=m,p.e=f,p.s=o,m=(p=x(p,g,y,w,i)).c,h=p.r,f=p.e),v=m[u=f+y+1],l=i/2,h=h||u<0||null!=m[u+1],h=w<4?(null!=v||h)&&(0==w||w==(p.s<0?3:2)):v>l||v==l&&(4==w||h||6==w&&1&m[u-1]||w==(p.s<0?8:7)),u<1||!m[0])r=h?d(a.charAt(1),-y,a.charAt(0)):a.charAt(0);else{if(m.length=u,h)for(--i;++m[--u]>i;)m[u]=0,u||(++f,m=[1].concat(m));for(l=m.length;!m[--l];);for(v=0,r="";v<=l;r+=a.charAt(m[v++]));r=d(r,f,a.charAt(0))}return r}}(),x=function(){function t(t,e,r){var n,i,o,s,a=0,u=t.length,c=e%1e7,f=e/1e7|0;for(t=t.slice();u--;)n=f*(o=t[u]%1e7)+(s=t[u]/1e7|0)*c,a=((i=c*o+n%1e7*1e7+a)/r|0)+(n/1e7|0)+f*s,t[u]=i%r;return a&&(t=[a].concat(t)),t}function e(t,e,r,n){var i,o;if(r!=n)o=r>n?1:-1;else for(i=o=0;i<r;i++)if(t[i]!=e[i]){o=t[i]>e[i]?1:-1;break}return o}function r(t,e,r,n){for(var i=0;r--;)t[r]-=i,i=+(t[r]<e[r]),t[r]=i*n+t[r]-e[r];for(;!t[0]&&t.length>1;t.splice(0,1));}return function(n,o,s,a,c){var f,l,h,p,d,m,g,v,y,w,b,x,_,N,M,E,O,S=n.s==o.s?1:-1,A=n.c,j=o.c;if(!A||!A[0]||!j||!j[0])return new P(n.s&&o.s&&(A?!j||A[0]!=j[0]:j)?A&&0==A[0]||!j?0*S:S/0:NaN);for(y=(v=new P(S)).c=[],S=s+(l=n.e-o.e)+1,c||(c=1e14,l=u(n.e/14)-u(o.e/14),S=S/14|0),h=0;j[h]==(A[h]||0);h++);if(j[h]>(A[h]||0)&&l--,S<0)y.push(1),p=!0;else{for(N=A.length,E=j.length,h=0,S+=2,(d=i(c/(j[0]+1)))>1&&(j=t(j,d,c),A=t(A,d,c),E=j.length,N=A.length),_=E,b=(w=A.slice(0,E)).length;b<E;w[b++]=0);O=[0].concat(O=j.slice()),M=j[0],j[1]>=c/2&&M++;do{if(d=0,(f=e(j,w,E,b))<0){if(x=w[0],E!=b&&(x=x*c+(w[1]||0)),(d=i(x/M))>1)for(d>=c&&(d=c-1),g=(m=t(j,d,c)).length,b=w.length;1==e(m,w,g,b);)d--,r(m,E<g?O:j,g,c),g=m.length,f=1;else 0==d&&(f=d=1),g=(m=j.slice()).length;if(g<b&&(m=[0].concat(m)),r(w,m,b,c),b=w.length,-1==f)for(;1>e(j,w,E,b);)d++,r(w,E<b?O:j,b,c),b=w.length}else 0===f&&(d++,w=[0]);y[h++]=d,w[0]?w[b++]=A[_]||0:(w=[A[_]],b=1)}while((_++<N||null!=w[0])&&S--);p=null!=w[0],y[0]||y.splice(0,1)}if(1e14==c){for(h=1,S=y[0];S>=10;S/=10,h++);Z(v,s+(v.e=h+14*l-1)+1,a,p)}else v.e=l,v.r=+p;return v}}(),g=/^(-?)0([xbo])(?=\w[\w.]*$)/i,v=/^([^.]+)\.$/,y=/^\.([^.]+)$/,w=/^-?(Infinity|NaN)$/,b=/^\s*\+(?=[\w.])|^\s+|\s+$/g,N=function(t,e,r,n){var i,s=r?e:e.replace(b,"");if(w.test(s))t.s=isNaN(s)?null:s<0?-1:1;else{if(!r&&(s=s.replace(g,function(t,e,r){return i="x"==(r=r.toLowerCase())?16:"b"==r?2:8,n&&n!=i?t:e}),n&&(i=n,s=s.replace(v,"$1").replace(y,"0.$1")),e!=s))return new P(s,i);if(P.DEBUG)throw Error(o+"Not a"+(n?" base "+n:"")+" number: "+e);t.s=null}t.c=t.e=null},M.absoluteValue=M.abs=function(){var t=new P(this);return t.s<0&&(t.s=1),t},M.comparedTo=function(t,e){return f(this,new P(t,e))},M.decimalPlaces=M.dp=function(t,e){var r,n,i;if(null!=t)return l(t,0,1e9),null==e?e=S:l(e,0,8),Z(new P(this),t+this.e+1,e);if(!(r=this.c))return null;if(n=((i=r.length-1)-u(this.e/14))*14,i=r[i])for(;i%10==0;i/=10,n--);return n<0&&(n=0),n},M.dividedBy=M.div=function(t,e){return x(this,new P(t,e),O,S)},M.dividedToIntegerBy=M.idiv=function(t,e){return x(this,new P(t,e),0,1)},M.exponentiatedBy=M.pow=function(t,e){var r,s,a,u,c,f,l,p,d,m=this;if((t=new P(t)).c&&!t.isInteger())throw Error(o+"Exponent not an integer: "+q(t));if(null!=e&&(e=new P(e)),f=t.e>14,!m.c||!m.c[0]||1==m.c[0]&&!m.e&&1==m.c.length||!t.c||!t.c[0])return d=new P(Math.pow(+q(m),f?t.s*(2-h(t)):+q(t))),e?d.mod(e):d;if(l=t.s<0,e){if(e.c?!e.c[0]:!e.s)return new P(NaN);(s=!l&&m.isInteger()&&e.isInteger())&&(m=m.mod(e))}else{if(t.e>9&&(m.e>0||m.e<-1||(0==m.e?m.c[0]>1||f&&m.c[1]>=24e7:m.c[0]<8e13||f&&m.c[0]<=9999975e7)))return u=m.s<0&&h(t)?-0:0,m.e>-1&&(u=1/u),new P(l?1/u:u);B&&(u=n(B/14+2))}for(f?(r=new P(.5),l&&(t.s=1),p=h(t)):p=(a=Math.abs(+q(t)))%2,d=new P(E);;){if(p){if(!(d=d.times(m)).c)break;u?d.c.length>u&&(d.c.length=u):s&&(d=d.mod(e))}if(a){if(0===(a=i(a/2)))break;p=a%2}else if(Z(t=t.times(r),t.e+1,1),t.e>14)p=h(t);else{if(0==(a=+q(t)))break;p=a%2}m=m.times(m),u?m.c&&m.c.length>u&&(m.c.length=u):s&&(m=m.mod(e))}return s?d:(l&&(d=E.div(d)),e?d.mod(e):u?Z(d,B,S,c):d)},M.integerValue=function(t){var e=new P(this);return null==t?t=S:l(t,0,8),Z(e,e.e+1,t)},M.isEqualTo=M.eq=function(t,e){return 0===f(this,new P(t,e))},M.isFinite=function(){return!!this.c},M.isGreaterThan=M.gt=function(t,e){return f(this,new P(t,e))>0},M.isGreaterThanOrEqualTo=M.gte=function(t,e){return 1===(e=f(this,new P(t,e)))||0===e},M.isInteger=function(){return!!this.c&&u(this.e/14)>this.c.length-2},M.isLessThan=M.lt=function(t,e){return 0>f(this,new P(t,e))},M.isLessThanOrEqualTo=M.lte=function(t,e){return -1===(e=f(this,new P(t,e)))||0===e},M.isNaN=function(){return!this.s},M.isNegative=function(){return this.s<0},M.isPositive=function(){return this.s>0},M.isZero=function(){return!!this.c&&0==this.c[0]},M.minus=function(t,e){var r,n,i,o,s=this.s;if(e=(t=new P(t,e)).s,!s||!e)return new P(NaN);if(s!=e)return t.s=-e,this.plus(t);var a=this.e/14,c=t.e/14,f=this.c,l=t.c;if(!a||!c){if(!f||!l)return f?(t.s=-e,t):new P(l?this:NaN);if(!f[0]||!l[0])return l[0]?(t.s=-e,t):new P(f[0]?this:3==S?-0:0)}if(a=u(a),c=u(c),f=f.slice(),s=a-c){for((o=s<0)?(s=-s,i=f):(c=a,i=l),i.reverse(),e=s;e--;i.push(0));i.reverse()}else for(n=(o=(s=f.length)<(e=l.length))?s:e,s=e=0;e<n;e++)if(f[e]!=l[e]){o=f[e]<l[e];break}if(o&&(i=f,f=l,l=i,t.s=-t.s),(e=(n=l.length)-(r=f.length))>0)for(;e--;f[r++]=0);for(e=1e14-1;n>s;){if(f[--n]<l[n]){for(r=n;r&&!f[--r];f[r]=e);--f[r],f[n]+=1e14}f[n]-=l[n]}for(;0==f[0];f.splice(0,1),--c);return f[0]?L(t,f,c):(t.s=3==S?-1:1,t.c=[t.e=0],t)},M.modulo=M.mod=function(t,e){var r,n;return(t=new P(t,e),this.c&&t.s&&(!t.c||t.c[0]))?t.c&&(!this.c||this.c[0])?(9==C?(n=t.s,t.s=1,r=x(this,t,0,3),t.s=n,r.s*=n):r=x(this,t,0,C),(t=this.minus(r.times(t))).c[0]||1!=C||(t.s=this.s),t):new P(this):new P(NaN)},M.multipliedBy=M.times=function(t,e){var r,n,i,o,s,a,c,f,l,h,p,d,m,g=this.c,v=(t=new P(t,e)).c;if(!g||!v||!g[0]||!v[0])return this.s&&t.s&&(!g||g[0]||v)&&(!v||v[0]||g)?(t.s*=this.s,g&&v?(t.c=[0],t.e=0):t.c=t.e=null):t.c=t.e=t.s=null,t;for(n=u(this.e/14)+u(t.e/14),t.s*=this.s,(c=g.length)<(h=v.length)&&(m=g,g=v,v=m,i=c,c=h,h=i),i=c+h,m=[];i--;m.push(0));for(i=h;--i>=0;){for(r=0,p=v[i]%1e7,d=v[i]/1e7|0,o=i+(s=c);o>i;)a=d*(f=g[--s]%1e7)+(l=g[s]/1e7|0)*p,r=((f=p*f+a%1e7*1e7+m[o]+r)/1e14|0)+(a/1e7|0)+d*l,m[o--]=f%1e14;m[o]=r}return r?++n:m.splice(0,1),L(t,m,n)},M.negated=function(){var t=new P(this);return t.s=-t.s||null,t},M.plus=function(t,e){var r,n=this.s;if(e=(t=new P(t,e)).s,!n||!e)return new P(NaN);if(n!=e)return t.s=-e,this.minus(t);var i=this.e/14,o=t.e/14,s=this.c,a=t.c;if(!i||!o){if(!s||!a)return new P(n/0);if(!s[0]||!a[0])return a[0]?t:new P(s[0]?this:0*n)}if(i=u(i),o=u(o),s=s.slice(),n=i-o){for(n>0?(o=i,r=a):(n=-n,r=s),r.reverse();n--;r.push(0));r.reverse()}for((n=s.length)-(e=a.length)<0&&(r=a,a=s,s=r,e=n),n=0;e;)n=(s[--e]=s[e]+a[e]+n)/1e14|0,s[e]=1e14===s[e]?0:s[e]%1e14;return n&&(s=[n].concat(s),++o),L(t,s,o)},M.precision=M.sd=function(t,e){var r,n,i;if(null!=t&&!!t!==t)return l(t,1,1e9),null==e?e=S:l(e,0,8),Z(new P(this),t,e);if(!(r=this.c))return null;if(n=14*(i=r.length-1)+1,i=r[i]){for(;i%10==0;i/=10,n--);for(i=r[0];i>=10;i/=10,n++);}return t&&this.e+1>n&&(n=this.e+1),n},M.shiftedBy=function(t){return l(t,-0x1fffffffffffff,0x1fffffffffffff),this.times("1e"+t)},M.squareRoot=M.sqrt=function(){var t,e,r,n,i,o=this.c,s=this.s,a=this.e,f=O+4,l=new P("0.5");if(1!==s||!o||!o[0])return new P(!s||s<0&&(!o||o[0])?NaN:o?this:1/0);if(0==(s=Math.sqrt(+q(this)))||s==1/0?(((e=c(o)).length+a)%2==0&&(e+="0"),s=Math.sqrt(+e),a=u((a+1)/2)-(a<0||a%2),r=new P(e=s==1/0?"5e"+a:(e=s.toExponential()).slice(0,e.indexOf("e")+1)+a)):r=new P(s+""),r.c[0]){for((s=(a=r.e)+f)<3&&(s=0);;)if(i=r,r=l.times(i.plus(x(this,i,f,1))),c(i.c).slice(0,s)===(e=c(r.c)).slice(0,s)){if(r.e<a&&--s,"9999"!=(e=e.slice(s-3,s+1))&&(n||"4999"!=e)){+e&&(+e.slice(1)||"5"!=e.charAt(0))||(Z(r,r.e+O+2,1),t=!r.times(r).eq(this));break}if(!n&&(Z(i,i.e+O+2,0),i.times(i).eq(this))){r=i;break}f+=4,s+=4,n=1}}return Z(r,r.e+O+1,S,t)},M.toExponential=function(t,e){return null!=t&&(l(t,0,1e9),t++),I(this,t,e,1)},M.toFixed=function(t,e){return null!=t&&(l(t,0,1e9),t=t+this.e+1),I(this,t,e)},M.toFormat=function(t,e,r){var n;if(null==r)null!=t&&e&&"object"==typeof e?(r=e,e=null):t&&"object"==typeof t?(r=t,t=e=null):r=T;else if("object"!=typeof r)throw Error(o+"Argument not an object: "+r);if(n=this.toFixed(t,e),this.c){var i,s=n.split("."),a=+r.groupSize,u=+r.secondaryGroupSize,c=r.groupSeparator||"",f=s[0],l=s[1],h=this.s<0,p=h?f.slice(1):f,d=p.length;if(u&&(i=a,a=u,u=i,d-=i),a>0&&d>0){for(i=d%a||a,f=p.substr(0,i);i<d;i+=a)f+=c+p.substr(i,a);u>0&&(f+=c+p.slice(i)),h&&(f="-"+f)}n=l?f+(r.decimalSeparator||"")+((u=+r.fractionGroupSize)?l.replace(RegExp("\\d{"+u+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):l):f}return(r.prefix||"")+n+(r.suffix||"")},M.toFraction=function(t){var e,r,n,i,s,u,f,l,h,p,d,m,g=this.c;if(null!=t&&(!(f=new P(t)).isInteger()&&(f.c||1!==f.s)||f.lt(E)))throw Error(o+"Argument "+(f.isInteger()?"out of range: ":"not an integer: ")+q(f));if(!g)return new P(this);for(e=new P(E),h=r=new P(E),n=l=new P(E),m=c(g),s=e.e=m.length-this.e-1,e.c[0]=a[(u=s%14)<0?14+u:u],t=!t||f.comparedTo(e)>0?s>0?e:h:f,u=z,z=1/0,f=new P(m),l.c[0]=0;p=x(f,e,0,1),1!=(i=r.plus(p.times(n))).comparedTo(t);)r=n,n=i,h=l.plus(p.times(i=h)),l=i,e=f.minus(p.times(i=e)),f=i;return i=x(t.minus(r),n,0,1),l=l.plus(i.times(h)),r=r.plus(i.times(n)),l.s=h.s=this.s,s*=2,d=1>x(h,n,s,S).minus(this).abs().comparedTo(x(l,r,s,S).minus(this).abs())?[h,n]:[l,r],z=u,d},M.toNumber=function(){return+q(this)},M.toPrecision=function(t,e){return null!=t&&l(t,1,1e9),I(this,t,e,2)},M.toString=function(t){var e,r=this,n=r.s,i=r.e;return null===i?n?(e="Infinity",n<0&&(e="-"+e)):e="NaN":(null==t?e=i<=A||i>=j?p(c(r.c),i):d(c(r.c),i,"0"):10===t&&$?e=d(c((r=Z(new P(r),O+i+1,S)).c),r.e,"0"):(l(t,2,k.length,"Base"),e=_(d(c(r.c),i,"0"),10,t,n,!0)),n<0&&r.c[0]&&(e="-"+e)),e},M.valueOf=M.toJSON=function(){return q(this)},M._isBigNumber=!0,null!=e&&P.set(e),P}()).default=e.BigNumber=e,v.exports?v.exports=e:(t||(t="undefined"!=typeof self&&self?self:window),t.BigNumber=e)}(h);var y=v.exports;let w=g(),b=d(),x={trillion:1e12,billion:1e9,million:1e6,thousand:1e3},_={totalLength:0,characteristic:0,forceAverage:!1,average:!1,mantissa:-1,optionalMantissa:!0,thousandSeparated:!1,spaceSeparated:!1,negative:"sign",forceSign:!1,roundingFunction:Math.round,spaceSeparatedAbbreviation:!1},{binarySuffixes:N,decimalSuffixes:M}=w.currentBytes(),E={scale:1024,suffixes:M,marker:"bd"},O={scale:1024,suffixes:N,marker:"b"},S={scale:1e3,suffixes:M,marker:"d"};function A(t,e,r){let n=e[0],i=Math.abs(t);if(i>=r){for(let o=1;o<e.length;++o){let s=Math.pow(r,o),a=Math.pow(r,o+1);if(i>=s&&i<a){n=e[o],t/=s;break}}n===e[0]&&(t/=Math.pow(r,e.length-1),n=e[e.length-1])}return{value:t,suffix:n}}function j(t){let e="";for(let r=0;r<t;r++)e+="0";return e}function F({instance:t,providedFormat:e,state:r=w,decimalSeparator:n,defaults:i=r.currentDefaults()}){let o=t._value;if(0===o&&r.hasZeroFormat())return r.getZeroFormat();if(!isFinite(o))return o.toString();let s=Object.assign({},_,i,e),a=s.totalLength,u=a?0:s.characteristic,c=s.optionalCharacteristic,f=s.forceAverage,l=s.lowPrecision,h=!!a||!!f||s.average,p=a?-1:h&&void 0===e.mantissa?0:s.mantissa,d=!a&&(void 0===e.optionalMantissa?-1===p:s.optionalMantissa),m=s.trimMantissa,g=s.thousandSeparated,v=s.spaceSeparated,b=s.negative,N=s.forceSign,M=s.exponential,E=s.roundingFunction,O="";if(h){let t=function({value:t,forceAverage:e,lowPrecision:r=!0,abbreviations:n,spaceSeparated:i=!1,totalLength:o=0,roundingFunction:s=Math.round}){let a="",u=Math.abs(t),c=-1;if(e&&n[e]&&x[e]?(a=n[e],t/=x[e]):u>=x.trillion||r&&1===s(u/x.trillion)?(a=n.trillion,t/=x.trillion):u<x.trillion&&u>=x.billion||r&&1===s(u/x.billion)?(a=n.billion,t/=x.billion):u<x.billion&&u>=x.million||r&&1===s(u/x.million)?(a=n.million,t/=x.million):(u<x.million&&u>=x.thousand||r&&1===s(u/x.thousand))&&(a=n.thousand,t/=x.thousand),a&&(a=(i?" ":"")+a),o){let e=t<0,r=t.toString().split(".")[0];c=Math.max(o-(e?r.length-1:r.length),0)}return{value:t,abbreviation:a,mantissaPrecision:c}}({value:o,forceAverage:f,lowPrecision:l,abbreviations:r.currentAbbreviations(),spaceSeparated:v,roundingFunction:E,totalLength:a});o=t.value,O+=t.abbreviation,a&&(p=t.mantissaPrecision)}if(M){let t=function({value:t,characteristicPrecision:e}){let[r,n]=t.toExponential().split("e"),i=+r;return e&&1<e&&(i*=Math.pow(10,e-1),n=(n=+n-(e-1))>=0?`+${n}`:n),{value:i,abbreviation:`e${n}`}}({value:o,characteristicPrecision:u});o=t.value,O=t.abbreviation+O}let S=function(t,e,r,n,i,o){if(-1===n)return t;let s=function(t,e,r=Math.round){return -1!==t.toString().indexOf("e")?function(t,e){let r=t.toString(),[n,i]=r.split("e"),[o,s=""]=n.split(".");if(+i>0)r=o+s+j(i-s.length);else{let t=".";t=0>+o?`-0${t}`:`0${t}`;let n=(j(-i-1)+Math.abs(o)+s).substr(0,e);n.length<e&&(n+=j(e-n.length)),r=t+n}return+i>0&&e>0&&(r+=`.${j(e)}`),r}(t,e):new y(r(+`${t}e+${e}`)/Math.pow(10,e)).toFixed(e)}(e,n,o),[a,u=""]=s.toString().split(".");if(u.match(/^0+$/)&&(r||i))return a;let c=u.match(/0+$/);return i&&c?`${a}.${u.toString().slice(0,c.index)}`:s.toString()}(o.toString(),o,d,p,m,E);if(S=function(t,e,r,n,i){let o=n.currentDelimiters(),s=o.thousands;i=i||o.decimal;let a=o.thousandsSize||3,u=t.toString(),c=u.split(".")[0],f=u.split(".")[1],l=e<0&&0===c.indexOf("-");return r&&(l&&(c=c.slice(1)),(function(t,e){let r=[],n=0;for(let i=t;i>0;i--)n===e&&(r.unshift(i),n=0),n++;return r})(c.length,a).forEach((t,e)=>{c=c.slice(0,t+e)+s+c.slice(t+e)}),l&&(c=`-${c}`)),u=f?c+i+f:c}(S=function(t,e,r,n){let i=t,[o,s]=i.toString().split(".");if(o.match(/^-?0$/)&&r)return s?`${o.replace("0","")}.${s}`:o.replace("0","");let a=e<0&&0===o.indexOf("-");if(a&&(o=o.slice(1),i=i.slice(1)),o.length<n){let t=n-o.length;for(let e=0;e<t;e++)i=`0${i}`}return a&&(i=`-${i}`),i.toString()}(S,o,c,u),o,g,r,n),(h||M)&&(S+=O),N||o<0){var A,F;A=S,S=0===(F=o)?A:0==+A?A.replace("-",""):F>0?`+${A}`:"sign"===b?A:`(${A.replace("-","")})`}return S}function z(t,e){if(!t)return e;let r=Object.keys(t);return 1===r.length&&"output"===r[0]?e:t}function D(t,e,r){let n=new y(t._value),i=e;return r.isNumbro(e)&&(i=e._value),i=new y(i),t._value=n.minus(i).toNumber(),t}let C=g(),B=d(),T=p(),k=(...t)=>(function(t,e={},r){if("string"==typeof e&&(e=m.parseFormat(e)),!b.validateFormat(e))return"ERROR: invalid format";let n=e.prefix||"",i=e.postfix||"",o=function(t,e,r){var n,i;switch(e.output){case"currency":return function(t,e,r){let n;let i=r.currentCurrency(),o=Object.assign({},e),s=Object.assign({},_,o),a="",u=!!s.totalLength||!!s.forceAverage||s.average,c=o.currencyPosition||i.position,f=o.currencySymbol||i.symbol,l=void 0!==s.spaceSeparatedCurrency?s.spaceSeparatedCurrency:s.spaceSeparated;void 0===o.lowPrecision&&(o.lowPrecision=!1),l&&(a=" "),"infix"===c&&(n=a+f+a);let h=F({instance:t,providedFormat:o,state:r,decimalSeparator:n});return"prefix"===c&&(h=t._value<0&&"sign"===s.negative?`-${a}${f}${h.slice(1)}`:t._value>0&&s.forceSign?`+${a}${f}${h.slice(1)}`:f+a+h),c&&"postfix"!==c||(h=h+(a=!s.spaceSeparatedAbbreviation&&u?"":a)+f),h}(t,e=z(e,w.currentCurrencyDefaultFormat()),w);case"percent":let o,s,a;return o=(n=e=z(e,w.currentPercentageDefaultFormat())).prefixSymbol,s=F({instance:r(100*t._value),providedFormat:n,state:w}),a=Object.assign({},_,n),o?`%${a.spaceSeparated?" ":""}${s}`:`${s}${a.spaceSeparated?" ":""}%`;case"byte":return function(t,e,r,n){let i=e.base||"binary",o=Object.assign({},_,e),{binarySuffixes:s,decimalSuffixes:a}=r.currentBytes(),u={general:{scale:1024,suffixes:a||M,marker:"bd"},binary:{scale:1024,suffixes:s||N,marker:"b"},decimal:{scale:1e3,suffixes:a||M,marker:"d"}}[i],{value:c,suffix:f}=A(t._value,u.suffixes,u.scale),l=F({instance:n(c),providedFormat:e,state:r,defaults:r.currentByteDefaultFormat()});return`${l}${o.spaceSeparated?" ":""}${f}`}(t,e=z(e,w.currentByteDefaultFormat()),w,r);case"time":let u,c,f;return e=z(e,w.currentTimeDefaultFormat()),u=Math.floor(t._value/60/60),c=Math.floor((t._value-3600*u)/60),f=Math.round(t._value-3600*u-60*c),`${u}:${c<10?"0":""}${c}:${f<10?"0":""}${f}`;case"ordinal":let l,h,p,d;return i=e=z(e,w.currentOrdinalDefaultFormat()),l=w.currentOrdinal(),h=Object.assign({},_,i),p=F({instance:t,providedFormat:i,state:w}),d=l(t._value),`${p}${h.spaceSeparated?" ":""}${d}`;default:return F({instance:t,providedFormat:e,numbro:r})}}(t,e,r);return(o=n+o)+i})(...t,Y),$=(...t)=>(function(t){return A(t._value,E.suffixes,E.scale).suffix})(...t,Y),P=(...t)=>(function(t){return A(t._value,O.suffixes,O.scale).suffix})(...t,Y),I=(...t)=>(function(t){return A(t._value,S.suffixes,S.scale).suffix})(...t,Y),R=z,L=(t,e)=>{let r,n;return r=new y(t._value),n=e,Y.isNumbro(e)&&(n=e._value),n=new y(n),t._value=r.plus(n).toNumber(),t},Z=(t,e)=>D(t,e,Y),q=(t,e)=>{let r,n;return r=new y(t._value),n=e,Y.isNumbro(e)&&(n=e._value),n=new y(n),t._value=r.times(n).toNumber(),t},U=(t,e)=>{let r,n;return r=new y(t._value),n=e,Y.isNumbro(e)&&(n=e._value),n=new y(n),t._value=r.dividedBy(n).toNumber(),t},G=(t,e)=>{let r;return r=e,Y.isNumbro(e)&&(r=e._value),t._value=r,t},V=(t,e)=>{let r;return D(r=Y(t._value),e,Y),Math.abs(r._value)},W=y;class H{constructor(t){this._value=t}clone(){return Y(this._value)}format(t={}){return k(this,t)}formatCurrency(t){return"string"==typeof t&&(t=m.parseFormat(t)),(t=R(t,C.currentCurrencyDefaultFormat())).output="currency",k(this,t)}formatTime(t={}){return t.output="time",k(this,t)}binaryByteUnits(){return P(this)}decimalByteUnits(){return I(this)}byteUnits(){return $(this)}difference(t){return V(this,t)}add(t){return L(this,t)}subtract(t){return Z(this,t)}multiply(t){return q(this,t)}divide(t){return U(this,t)}set(t){return G(this,J(t))}value(){return this._value}valueOf(){return this._value}}function J(t){let e=t;return Y.isNumbro(t)?e=t._value:"string"==typeof t?e=Y.unformat(t):isNaN(t)&&(e=NaN),e}function Y(t){return new H(J(t))}Y.version="2.5.0",Y.isNumbro=function(t){return t instanceof H},Y.language=C.currentLanguage,Y.registerLanguage=C.registerLanguage,Y.setLanguage=C.setLanguage,Y.languages=C.languages,Y.languageData=C.languageData,Y.zeroFormat=C.setZeroFormat,Y.defaultFormat=C.currentDefaults,Y.setDefaults=C.setDefaults,Y.defaultCurrencyFormat=C.currentCurrencyDefaultFormat,Y.validate=B.validate,Y.loadLanguagesInNode=t=>(function(t,e){t.forEach(t=>{let r;try{r=function(t){throw Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}(`../languages/${t}`)}catch(e){console.error(`Unable to load "${t}". No matching language file found.`)}r&&e.registerLanguage(r)})})(t,Y),Y.unformat=T.unformat,Y.BigNumber=W;var K=Y&&Y.__esModule&&Object.prototype.hasOwnProperty.call(Y,"default")?Y.default:Y,X=r(15418);function Q(t,{shortValues:e,decimalPlaces:r}){if(!(0,X.lk)(e)||1e3>Math.abs(t)){let n={style:"unit",unit:"byte",unitDisplay:"long",useGrouping:!0};return(0,X.ej)(r)?(n.minimumFractionDigits=(0,X.Gs)(r),n.maximumFractionDigits=(0,X.Gs)(r)):(0,X.lk)(e)&&(n.maximumSignificantDigits=3),Intl.NumberFormat("en-US",n).format(t)}return K(t).format({output:"byte",base:"decimal",spaceSeparated:!0,mantissa:(0,X.ej)(r)?r:2,trimMantissa:!(0,X.ej)(r),optionalMantissa:!(0,X.ej)(r)})}let tt="Percent",te="Time";var tr=((n={}).milliseconds="millisecond",n.seconds="second",n.minutes="minute",n.hours="hour",n.days="day",n.weeks="week",n.months="month",n.years="year",n);let tn={years:31536e3,months:2592e3,weeks:604800,days:86400,hours:3600,minutes:60,seconds:1,milliseconds:.001},ti=["years","months","weeks","days","hours","minutes","seconds","milliseconds"],to="Throughput",ts={Time:{label:"Time",decimalPlaces:!0},Percent:{label:"percent",decimalPlaces:!0},Decimal:{label:"Decimal",decimalPlaces:!0,shortValues:!0},Bytes:{label:"Bytes",decimalPlaces:!0,shortValues:!0},Throughput:{label:"Throughput",decimalPlaces:!0}},ta={milliseconds:{group:te,label:"Milliseconds"},seconds:{group:te,label:"Seconds"},minutes:{group:te,label:"Minutes"},hours:{group:te,label:"Hours"},days:{group:te,label:"Days"},weeks:{group:te,label:"Weeks"},months:{group:te,label:"Months"},years:{group:te,label:"Years"},percent:{group:tt,label:"Percent (0-100)"},"percent-decimal":{group:tt,label:"Percent (0.0-1.0)"},"%":{disableSelectorOption:!0,group:tt,label:"%"},decimal:{group:"Decimal",label:"Decimal"},bytes:{group:"Bytes",label:"Bytes"},"bits/sec":{group:to,label:"Bits/sec"},"bytes/sec":{group:to,label:"Bytes/sec"},"counts/sec":{group:to,label:"Counts/sec"},"events/sec":{group:to,label:"Events/sec"},"messages/sec":{group:to,label:"Messages/sec"},"ops/sec":{group:to,label:"Ops/sec"},"packets/sec":{group:to,label:"Packets/sec"},"reads/sec":{group:to,label:"Reads/sec"},"requests/sec":{group:to,label:"Requests/sec"},"records/sec":{group:to,label:"Records/sec"},"rows/sec":{group:to,label:"Rows/sec"},"writes/sec":{group:to,label:"Writes/sec"}};function tu(t,e){if(void 0===e)return t.toString();if("Bytes"===tc(e))return Q(t,e);if("Decimal"===tc(e))return function(t,{shortValues:e,decimalPlaces:r}){let n={style:"decimal",useGrouping:!0};return(0,X.lk)(e)&&(n.notation="compact"),(0,X.ej)(r)?(n.minimumFractionDigits=(0,X.Gs)(r),n.maximumFractionDigits=(0,X.Gs)(r)):(0,X.lk)(e)&&(n.maximumSignificantDigits=3),Intl.NumberFormat("en-US",n).format(t)}(t,e);if("Percent"===tc(e))return function(t,{unit:e,decimalPlaces:r}){let n={style:"percent",useGrouping:!0};return(0,X.ej)(r)?(n.minimumFractionDigits=(0,X.Gs)(r),n.maximumFractionDigits=(0,X.Gs)(r)):n.maximumSignificantDigits=3,"percent"===e&&(t/=100),Intl.NumberFormat("en-US",n).format(t)}(t,e);if("Time"===tc(e))return function(t,{unit:e,decimalPlaces:r}){var n;if(0===t)return"0s";let i=function(t,e){let r=t*tn[e],n=ti[0]||"years",i=n,o=r/tn[n];for(i of ti)if((o=r/tn[i])>=1)break;return{value:o,unit:i}}(t,e),o={style:"unit",unit:tr[i.unit],unitDisplay:"months"===(n=i.unit)||"years"===n?"long":"narrow"};return(0,X.ej)(r)?(o.minimumFractionDigits=(0,X.Gs)(r),o.maximumFractionDigits=(0,X.Gs)(r)):o.maximumSignificantDigits=3,Intl.NumberFormat("en-US",o).format(i.value)}(t,e);if("Throughput"===tc(e))return function(t,{unit:e,shortValues:r,decimalPlaces:n}){if("bytes/sec"===e){let e=1e3>Math.abs(t)?"sec":"s";return Q(t,{unit:"bytes",shortValues:r,decimalPlaces:n})+"/"+e}let i={style:"decimal",useGrouping:!0};return(0,X.lk)(r)&&(i.notation="compact"),(0,X.ej)(n)?(i.minimumFractionDigits=(0,X.Gs)(n),i.maximumFractionDigits=(0,X.Gs)(n)):(0,X.lk)(r)&&(i.maximumSignificantDigits=3),Intl.NumberFormat("en-US",i).format(t)+" "+e}(t,e);throw Error(`Unknown unit options ${e}`)}function tc(t){return ta[t.unit].group}function tf(t){return ts[ta[t.unit].group]}function tl(t){return!!tf(t).decimalPlaces}function th(t){return!!tf(t).shortValues}},15418:function(t,e,r){"use strict";function n(t){return!1!==t}function i(t){return"number"==typeof t}function o(t){return t&&(t<0?t=0:t>20&&(t=20)),t}r.d(e,{Gs:()=>o,ej:()=>i,lk:()=>n})},69481:function(t,e,r){"use strict";r.d(e,{m6:()=>rB,C5:()=>rT});var n=r(70252);function i(t){return"number"==typeof t}function o(t){return!!t&&"object"==typeof t&&"function"==typeof t.constructor&&(!0===t.isBigNumber&&"object"==typeof t.constructor.prototype&&!0===t.constructor.prototype.isBigNumber||"function"==typeof t.constructor.isDecimal&&!0===t.constructor.isDecimal(t))}function s(t){return t&&"object"==typeof t&&!0===Object.getPrototypeOf(t).isComplex||!1}function a(t){return t&&"object"==typeof t&&!0===Object.getPrototypeOf(t).isFraction||!1}function u(t){return t&&!0===t.constructor.prototype.isUnit||!1}function c(t){return"string"==typeof t}var f=Array.isArray;function l(t){return t&&!0===t.constructor.prototype.isMatrix||!1}function h(t){return Array.isArray(t)||l(t)}function p(t){return t&&t.isDenseMatrix&&!0===t.constructor.prototype.isMatrix||!1}function d(t){return t&&t.isSparseMatrix&&!0===t.constructor.prototype.isMatrix||!1}function m(t){return t&&!0===t.constructor.prototype.isRange||!1}function g(t){return t&&!0===t.constructor.prototype.isIndex||!1}function v(t){return"boolean"==typeof t}function y(t){return t&&!0===t.constructor.prototype.isResultSet||!1}function w(t){return t&&!0===t.constructor.prototype.isHelp||!1}function b(t){return"function"==typeof t}function x(t){return t instanceof Date}function _(t){return t instanceof RegExp}function N(t){return!!(t&&"object"==typeof t&&t.constructor===Object&&!s(t)&&!a(t))}function M(t){return null===t}function E(t){return void 0===t}function O(t){return t&&!0===t.isAccessorNode&&!0===t.constructor.prototype.isNode||!1}function S(t){return t&&!0===t.isArrayNode&&!0===t.constructor.prototype.isNode||!1}function A(t){return t&&!0===t.isAssignmentNode&&!0===t.constructor.prototype.isNode||!1}function j(t){return t&&!0===t.isBlockNode&&!0===t.constructor.prototype.isNode||!1}function F(t){return t&&!0===t.isConditionalNode&&!0===t.constructor.prototype.isNode||!1}function z(t){return t&&!0===t.isConstantNode&&!0===t.constructor.prototype.isNode||!1}function D(t){return t&&!0===t.isFunctionAssignmentNode&&!0===t.constructor.prototype.isNode||!1}function C(t){return t&&!0===t.isFunctionNode&&!0===t.constructor.prototype.isNode||!1}function B(t){return t&&!0===t.isIndexNode&&!0===t.constructor.prototype.isNode||!1}function T(t){return t&&!0===t.isNode&&!0===t.constructor.prototype.isNode||!1}function k(t){return t&&!0===t.isObjectNode&&!0===t.constructor.prototype.isNode||!1}function $(t){return t&&!0===t.isOperatorNode&&!0===t.constructor.prototype.isNode||!1}function P(t){return t&&!0===t.isParenthesisNode&&!0===t.constructor.prototype.isNode||!1}function I(t){return t&&!0===t.isRangeNode&&!0===t.constructor.prototype.isNode||!1}function R(t){return t&&!0===t.isSymbolNode&&!0===t.constructor.prototype.isNode||!1}function L(t){return t&&!0===t.constructor.prototype.isChain||!1}function Z(t){var e=typeof t;return"object"===e?null===t?"null":Array.isArray(t)?"Array":t instanceof Date?"Date":t instanceof RegExp?"RegExp":o(t)?"BigNumber":s(t)?"Complex":a(t)?"Fraction":l(t)?"Matrix":u(t)?"Unit":g(t)?"Index":m(t)?"Range":y(t)?"ResultSet":T(t)?t.type:L(t)?"Chain":w(t)?"Help":"Object":"function"===e?"Function":e}function q(t){var e=typeof t;if("number"===e||"string"===e||"boolean"===e||null==t)return t;if("function"==typeof t.clone)return t.clone();if(Array.isArray(t))return t.map(function(t){return q(t)});if(t instanceof Date)return new Date(t.valueOf());if(o(t))return t;if(t instanceof RegExp)throw TypeError("Cannot clone "+t);return U(t,q)}function U(t,e){var r={};for(var n in t)W(t,n)&&(r[n]=e(t[n]));return r}function G(t,e){var r,n,i;if(Array.isArray(t)){if(!Array.isArray(e)||t.length!==e.length)return!1;for(n=0,i=t.length;n<i;n++)if(!G(t[n],e[n]))return!1;return!0}if("function"==typeof t)return t===e;if(!(t instanceof Object))return t===e;if(Array.isArray(e)||!(e instanceof Object))return!1;for(r in t)if(!(r in e)||!G(t[r],e[r]))return!1;for(r in e)if(!(r in t))return!1;return!0}function V(t,e,r){var n,i=!0;Object.defineProperty(t,e,{get:function(){return i&&(n=r(),i=!1),n},set:function(t){n=t,i=!1},configurable:!0,enumerable:!0})}function W(t,e){return t&&Object.hasOwnProperty.call(t,e)}function H(t){return Object.keys(t).map(e=>t[e])}var J=r(8317);function Y(t,e,r,n){function i(n){var i=function(t,e){for(var r={},n=0;n<e.length;n++){var i=e[n],o=t[i];void 0!==o&&(r[i]=o)}return r}(n,e.map(X));return function(t,e,r){if(!e.filter(t=>{var e;return!((e=t)&&"?"===e[0])}).every(t=>void 0!==r[t])){var n=e.filter(t=>void 0===r[t]);throw Error('Cannot create function "'.concat(t,'", ')+"some dependencies are missing: ".concat(n.map(t=>'"'.concat(t,'"')).join(", "),"."))}}(t,e,n),r(i)}return i.isFactory=!0,i.fn=t,i.dependencies=e.slice().sort(),n&&(i.meta=n),i}function K(t){return"function"==typeof t&&"string"==typeof t.fn&&Array.isArray(t.dependencies)}function X(t){return t&&"?"===t[0]?t.slice(1):t}function Q(t){return"boolean"==typeof t||!!isFinite(t)&&t===Math.round(t)}function tt(t,e,r){var n="";if(r){if(r<1)throw Error("size must be in greater than 0");if(!Q(r))throw Error("size must be an integer");if(t>2**(r-1)-1||t<-(2**(r-1)))throw Error("Value must be in range [-2^".concat(r-1,", 2^").concat(r-1,"-1]"));if(!Q(t))throw Error("Value must be an integer");t<0&&(t+=2**r),n="i".concat(r)}var i="";return t<0&&(t=-t,i="-"),"".concat(i).concat({2:"0b",8:"0o",16:"0x"}[e]).concat(t.toString(e)).concat(n)}function te(t,e){if("function"==typeof e)return e(t);if(t===1/0)return"Infinity";if(t===-1/0)return"-Infinity";if(isNaN(t))return"NaN";var r,n,o="auto";if(e&&(e.notation&&(o=e.notation),i(e)?r=e:i(e.precision)&&(r=e.precision),e.wordSize&&"number"!=typeof(n=e.wordSize)))throw Error('Option "wordSize" must be a number');switch(o){case"fixed":return function(t,e){if(isNaN(t)||!isFinite(t))return String(t);var r=tr(t),n="number"==typeof e?ti(r,r.exponent+1+e):r,i=n.coefficients,o=n.exponent+1,s=o+(e||0);return i.length<s&&(i=i.concat(to(s-i.length))),o<0&&(i=to(-o+1).concat(i),o=1),o<i.length&&i.splice(o,0,0===o?"0.":"."),n.sign+i.join("")}(t,r);case"exponential":return tn(t,r);case"engineering":return function(t,e){if(isNaN(t)||!isFinite(t))return String(t);var r=ti(tr(t),e),n=r.exponent,o=r.coefficients,s=n%3==0?n:n<0?n-3-n%3:n-n%3;if(i(e))for(;e>o.length||n-s+1>o.length;)o.push(0);else for(var a=Math.abs(n-s)-(o.length-1),u=0;u<a;u++)o.push(0);for(var c=Math.abs(n-s),f=1;c>0;)f++,c--;var l=o.slice(f).join(""),h=i(e)&&l.length||l.match(/[1-9]/)?"."+l:"",p=o.slice(0,f).join("")+h+"e"+(n>=0?"+":"")+s.toString();return r.sign+p}(t,r);case"bin":return tt(t,2,n);case"oct":return tt(t,8,n);case"hex":return tt(t,16,n);case"auto":return(function(t,e,r){if(isNaN(t)||!isFinite(t))return String(t);var n=r&&void 0!==r.lowerExp?r.lowerExp:-3,i=r&&void 0!==r.upperExp?r.upperExp:5,o=tr(t),s=e?ti(o,e):o;if(s.exponent<n||s.exponent>=i)return tn(t,e);var a=s.coefficients,u=s.exponent;a.length<e&&(a=a.concat(to(e-a.length))),a=a.concat(to(u-a.length+1+(a.length<e?e-a.length:0))),a=to(-u).concat(a);var c=u>0?u:0;return c<a.length-1&&a.splice(c+1,0,"."),s.sign+a.join("")})(t,r,e&&e).replace(/((\.\d*?)(0+))($|e)/,function(){var t=arguments[2],e=arguments[4];return"."!==t?t+e:e});default:throw Error('Unknown notation "'+o+'". Choose "auto", "exponential", "fixed", "bin", "oct", or "hex.')}}function tr(t){var e=String(t).toLowerCase().match(/^(-?)(\d+\.?\d*)(e([+-]?\d+))?$/);if(!e)throw SyntaxError("Invalid number "+t);var r=e[1],n=e[2],i=parseFloat(e[4]||"0"),o=n.indexOf(".");i+=-1!==o?o-1:n.length-1;var s=n.replace(".","").replace(/^0*/,function(t){return i-=t.length,""}).replace(/0*$/,"").split("").map(function(t){return parseInt(t)});return 0===s.length&&(s.push(0),i++),{sign:r,coefficients:s,exponent:i}}function tn(t,e){if(isNaN(t)||!isFinite(t))return String(t);var r=tr(t),n=e?ti(r,e):r,i=n.coefficients,o=n.exponent;i.length<e&&(i=i.concat(to(e-i.length)));var s=i.shift();return n.sign+s+(i.length>0?"."+i.join(""):"")+"e"+(o>=0?"+":"")+o}function ti(t,e){for(var r={sign:t.sign,coefficients:t.coefficients,exponent:t.exponent},n=r.coefficients;e<=0;)n.unshift(0),r.exponent++,e++;if(n.length>e&&n.splice(e,n.length-e)[0]>=5){var i=e-1;for(n[i]++;10===n[i];)n.pop(),0===i&&(n.unshift(0),r.exponent++,i++),i--,n[i]++}return r}function to(t){for(var e=[],r=0;r<t;r++)e.push(0);return e}var ts=Number.EPSILON||2220446049250313e-31;function ta(t,e,r){if(null==r)return t===e;if(t===e)return!0;if(isNaN(t)||isNaN(e))return!1;if(isFinite(t)&&isFinite(e)){var n=Math.abs(t-e);return n<ts||n<=Math.max(Math.abs(t),Math.abs(e))*r}return!1}function tu(t,e,r){var n=new t.constructor(2),i="";if(r){if(r<1)throw Error("size must be in greater than 0");if(!Q(r))throw Error("size must be an integer");if(t.greaterThan(n.pow(r-1).sub(1))||t.lessThan(n.pow(r-1).mul(-1)))throw Error("Value must be in range [-2^".concat(r-1,", 2^").concat(r-1,"-1]"));if(!t.isInteger())throw Error("Value must be an integer");t.lessThan(0)&&(t=t.add(n.pow(r))),i="i".concat(r)}switch(e){case 2:return"".concat(t.toBinary()).concat(i);case 8:return"".concat(t.toOctal()).concat(i);case 16:return"".concat(t.toHexadecimal()).concat(i);default:throw Error("Base ".concat(e," not supported "))}}function tc(t,e){return void 0!==e?t.toExponential(e-1):t.toExponential()}function tf(t,e){var r=function(t,e){var r;if("number"==typeof t)return te(t,e);if(o(t))return function(t,e){if("function"==typeof e)return e(t);if(!t.isFinite())return t.isNaN()?"NaN":t.gt(0)?"Infinity":"-Infinity";var r="auto";if(void 0!==e&&(e.notation&&(r=e.notation),"number"==typeof e?l=e:e.precision&&(l=e.precision),e.wordSize&&"number"!=typeof(h=e.wordSize)))throw Error('Option "wordSize" must be a number');switch(r){case"fixed":return n=t,i=l,n.toFixed(i);case"exponential":return tc(t,l);case"engineering":return o=t,s=l,u=(a=o.e)%3==0?a:a<0?a-3-a%3:a-a%3,-1!==(f=(c=o.mul(Math.pow(10,-u))).toPrecision(s)).indexOf("e")&&(f=c.toString()),f+"e"+(a>=0?"+":"")+u.toString();case"bin":return tu(t,2,h);case"oct":return tu(t,8,h);case"hex":return tu(t,16,h);case"auto":var n,i,o,s,a,u,c,f,l,h,p,d=e&&void 0!==e.lowerExp?e.lowerExp:-3,m=e&&void 0!==e.upperExp?e.upperExp:5;if(t.isZero())return"0";var g=t.toSignificantDigits(l),v=g.e;return(v>=d&&v<m?g.toFixed():tc(t,l)).replace(/((\.\d*?)(0+))($|e)/,function(){var t=arguments[2],e=arguments[4];return"."!==t?t+e:e});default:throw Error('Unknown notation "'+r+'". Choose "auto", "exponential", "fixed", "bin", "oct", or "hex.')}}(t,e);return(r=t)&&"object"==typeof r&&"number"==typeof r.s&&"number"==typeof r.n&&"number"==typeof r.d?e&&"decimal"===e.fraction?t.toString():t.s*t.n+"/"+t.d:Array.isArray(t)?function t(e,r){if(!Array.isArray(e))return tf(e,r);for(var n="[",i=e.length,o=0;o<i;o++)0!==o&&(n+=", "),n+=t(e[o],r);return n+"]"}(t,e):c(t)?'"'+t+'"':"function"==typeof t?t.syntax?String(t.syntax):"function":t&&"object"==typeof t?"function"==typeof t.format?t.format(e):t&&t.toString(e)!==({}).toString()?t.toString(e):"{"+Object.keys(t).map(r=>'"'+r+'": '+tf(t[r],e)).join(", ")+"}":String(t)}(t,e);return e&&"object"==typeof e&&"truncate"in e&&r.length>e.truncate?r.substring(0,e.truncate-3)+"...":r}function tl(t,e,r){if(!(this instanceof tl))throw SyntaxError("Constructor must be called with the new operator");this.actual=t,this.expected=e,this.relation=r,this.message="Dimension mismatch ("+(Array.isArray(t)?"["+t.join(", ")+"]":t)+" "+(this.relation||"!=")+" "+(Array.isArray(e)?"["+e.join(", ")+"]":e)+")",this.stack=Error().stack}function th(t,e,r){if(!(this instanceof th))throw SyntaxError("Constructor must be called with the new operator");this.index=t,arguments.length<3?(this.min=0,this.max=e):(this.min=e,this.max=r),void 0!==this.min&&this.index<this.min?this.message="Index out of range ("+this.index+" < "+this.min+")":void 0!==this.max&&this.index>=this.max?this.message="Index out of range ("+this.index+" > "+(this.max-1)+")":this.message="Index out of range ("+this.index+")",this.stack=Error().stack}function tp(t){for(var e=[];Array.isArray(t);)e.push(t.length),t=t[0];return e}function td(t,e){if(0===e.length){if(Array.isArray(t))throw new tl(t.length,0)}else!function t(e,r,n){var i,o=e.length;if(o!==r[n])throw new tl(o,r[n]);if(n<r.length-1){var s=n+1;for(i=0;i<o;i++){if(!Array.isArray(e[i]))throw new tl(r.length-1,r.length,"<");t(e[i],r,s)}}else for(i=0;i<o;i++)if(Array.isArray(e[i]))throw new tl(r.length+1,r.length,">")}(t,e,0)}function tm(t,e){if(!i(t)||!Q(t))throw TypeError("Index must be an integer (value: "+t+")");if(t<0||"number"==typeof e&&t>=e)throw new th(t,e)}function tg(t,e,r){if(!Array.isArray(t)||!Array.isArray(e))throw TypeError("Array expected");if(0===e.length)throw Error("Resizing to scalar is not supported");return e.forEach(function(t){if(!i(t)||!Q(t)||t<0)throw TypeError("Invalid size, must contain positive integers (size: "+tf(e)+")")}),function t(e,r,n,i){var o,s,a=e.length,u=r[n],c=Math.min(a,u);if(e.length=u,n<r.length-1){var f=n+1;for(o=0;o<c;o++)Array.isArray(s=e[o])||(s=[s],e[o]=s),t(s,r,f,i);for(o=c;o<u;o++)s=[],e[o]=s,t(s,r,f,i)}else{for(o=0;o<c;o++)for(;Array.isArray(e[o]);)e[o]=e[o][0];for(o=c;o<u;o++)e[o]=i}}(t,e,0,void 0!==r?r:0),t}function tv(t,e){var r=ty(t),n=t.slice(),i=t.indexOf(-1);if(t.indexOf(-1,i+1)>=0)throw Error("More than one wildcard in sizes");if(i>=0){if(e%r==0)n[i]=-e/r;else throw Error("Could not replace wildcard, since "+e+" is no multiple of "+-r)}return n}function ty(t){return t.reduce((t,e)=>t*e,1)}function tw(t,e,r,n){var i=n||tp(t);if(r)for(var o=0;o<r;o++)t=[t],i.unshift(1);for(t=function t(e,r,n){var i,o;if(Array.isArray(e)){var s=n+1;for(i=0,o=e.length;i<o;i++)e[i]=t(e[i],r,s)}else for(var a=n;a<r;a++)e=[e];return e}(t,e,0);i.length<e;)i.push(1);return t}function tb(t,e){for(var r,n=0,i=0;i<t.length;i++){var o=t[i],s=Array.isArray(o);if(0===i&&s&&(n=o.length),s&&o.length!==n)return;var a=s?tb(o,e):e(o);if(void 0===r)r=a;else if(r!==a)return"mixed"}return r}function tx(t,e){return -1!==t.indexOf(e)}function t_(t,e,r,n){if(!(this instanceof t_))throw SyntaxError("Constructor must be called with the new operator");this.fn=t,this.count=e,this.min=r,this.max=n,this.message="Wrong number of arguments in function "+t+" ("+e+" provided, "+r+(null!=n?"-"+n:"")+" expected)",this.stack=Error().stack}tl.prototype=RangeError(),tl.prototype.constructor=RangeError,tl.prototype.name="DimensionError",tl.prototype.isDimensionError=!0,th.prototype=RangeError(),th.prototype.constructor=RangeError,th.prototype.name="IndexError",th.prototype.isIndexError=!0,t_.prototype=Error(),t_.prototype.constructor=Error,t_.prototype.name="ArgumentsError",t_.prototype.isArgumentsError=!0;var tN={epsilon:1e-12,matrix:"Matrix",number:"number",precision:64,predictable:!1,randomSeed:null},tM=["Matrix","Array"],tE=["number","BigNumber","Fraction"];function tO(t,e,r){var n;void 0!==t[e]&&(n=t[e],-1===r.indexOf(n))&&console.warn('Warning: Unknown value "'+t[e]+'" for configuration option "'+e+'". Available options: '+r.map(t=>JSON.stringify(t)).join(", ")+".")}var tS,tA,tj="0123456789abcdef",tF="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",tz="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",tD={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-9e15,maxE:9e15,crypto:!1},tC=!0,tB="[DecimalError] ",tT=tB+"Invalid argument: ",tk=tB+"Precision limit exceeded",t$=tB+"crypto unavailable",tP="[object Decimal]",tI=Math.floor,tR=Math.pow,tL=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,tZ=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,tq=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,tU=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,tG=tF.length-1,tV=tz.length-1,tW={toStringTag:tP};function tH(t){var e,r,n,i=t.length-1,o="",s=t[0];if(i>0){for(o+=s,e=1;e<i;e++)(r=7-(n=t[e]+"").length)&&(o+=t9(r)),o+=n;(r=7-(n=(s=t[e])+"").length)&&(o+=t9(r))}else if(0===s)return"0";for(;s%10==0;)s/=10;return o+s}function tJ(t,e,r){if(t!==~~t||t<e||t>r)throw Error(tT+t)}function tY(t,e,r,n){var i,o,s,a;for(o=t[0];o>=10;o/=10)--e;return--e<0?(e+=7,i=0):(i=Math.ceil((e+1)/7),e%=7),o=tR(10,7-e),a=t[i]%o|0,null==n?e<3?(0==e?a=a/100|0:1==e&&(a=a/10|0),s=r<4&&99999==a||r>3&&49999==a||5e4==a||0==a):s=(r<4&&a+1==o||r>3&&a+1==o/2)&&(t[i+1]/o/100|0)==tR(10,e-2)-1||(a==o/2||0==a)&&(t[i+1]/o/100|0)==0:e<4?(0==e?a=a/1e3|0:1==e?a=a/100|0:2==e&&(a=a/10|0),s=(n||r<4)&&9999==a||!n&&r>3&&4999==a):s=((n||r<4)&&a+1==o||!n&&r>3&&a+1==o/2)&&(t[i+1]/o/1e3|0)==tR(10,e-3)-1,s}function tK(t,e,r){for(var n,i,o=[0],s=0,a=t.length;s<a;){for(i=o.length;i--;)o[i]*=e;for(o[0]+=tj.indexOf(t.charAt(s++)),n=0;n<o.length;n++)o[n]>r-1&&(void 0===o[n+1]&&(o[n+1]=0),o[n+1]+=o[n]/r|0,o[n]%=r)}return o.reverse()}tW.absoluteValue=tW.abs=function(){var t=new this.constructor(this);return t.s<0&&(t.s=1),tQ(t)},tW.ceil=function(){return tQ(new this.constructor(this),this.e+1,2)},tW.clampedTo=tW.clamp=function(t,e){var r=this.constructor;if(t=new r(t),e=new r(e),!t.s||!e.s)return new r(NaN);if(t.gt(e))throw Error(tT+e);return 0>this.cmp(t)?t:this.cmp(e)>0?e:new r(this)},tW.comparedTo=tW.cmp=function(t){var e,r,n,i,o=this.d,s=(t=new this.constructor(t)).d,a=this.s,u=t.s;if(!o||!s)return a&&u?a!==u?a:o===s?0:!o^a<0?1:-1:NaN;if(!o[0]||!s[0])return o[0]?a:s[0]?-u:0;if(a!==u)return a;if(this.e!==t.e)return this.e>t.e^a<0?1:-1;for(e=0,r=(n=o.length)<(i=s.length)?n:i;e<r;++e)if(o[e]!==s[e])return o[e]>s[e]^a<0?1:-1;return n===i?0:n>i^a<0?1:-1},tW.cosine=tW.cos=function(){var t,e,r=this,n=r.constructor;return r.d?r.d[0]?(t=n.precision,e=n.rounding,n.precision=t+Math.max(r.e,r.sd())+7,n.rounding=1,r=function(t,e){var r,n,i;if(e.isZero())return e;(n=e.d.length)<32?i=(1/ei(4,r=Math.ceil(n/3))).toString():(r=16,i="2.3283064365386962890625e-10"),t.precision+=r,e=en(t,1,e.times(i),new t(1));for(var o=r;o--;){var s=e.times(e);e=s.times(s).minus(s).times(8).plus(1)}return t.precision-=r,e}(n,eo(n,r)),n.precision=t,n.rounding=e,tQ(2==tA||3==tA?r.neg():r,t,e,!0)):new n(1):new n(NaN)},tW.cubeRoot=tW.cbrt=function(){var t,e,r,n,i,o,s,a,u,c,f=this.constructor;if(!this.isFinite()||this.isZero())return new f(this);for(tC=!1,(o=this.s*tR(this.s*this,1/3))&&Math.abs(o)!=1/0?n=new f(o.toString()):(r=tH(this.d),(o=((t=this.e)-r.length+1)%3)&&(r+=1==o||-2==o?"0":"00"),o=tR(r,1/3),t=tI((t+1)/3)-(t%3==(t<0?-1:2)),(n=new f(r=o==1/0?"5e"+t:(r=o.toExponential()).slice(0,r.indexOf("e")+1)+t)).s=this.s),s=(t=f.precision)+3;;)if(n=tX((c=(u=(a=n).times(a).times(a)).plus(this)).plus(this).times(a),c.plus(u),s+2,1),tH(a.d).slice(0,s)===(r=tH(n.d)).slice(0,s)){if("9999"!=(r=r.slice(s-3,s+1))&&(i||"4999"!=r)){+r&&(+r.slice(1)||"5"!=r.charAt(0))||(tQ(n,t+1,1),e=!n.times(n).times(n).eq(this));break}if(!i&&(tQ(a,t+1,0),a.times(a).times(a).eq(this))){n=a;break}s+=4,i=1}return tC=!0,tQ(n,t,f.rounding,e)},tW.decimalPlaces=tW.dp=function(){var t,e=this.d,r=NaN;if(e){if(r=((t=e.length-1)-tI(this.e/7))*7,t=e[t])for(;t%10==0;t/=10)r--;r<0&&(r=0)}return r},tW.dividedBy=tW.div=function(t){return tX(this,new this.constructor(t))},tW.dividedToIntegerBy=tW.divToInt=function(t){var e=this.constructor;return tQ(tX(this,new e(t),0,1,1),e.precision,e.rounding)},tW.equals=tW.eq=function(t){return 0===this.cmp(t)},tW.floor=function(){return tQ(new this.constructor(this),this.e+1,3)},tW.greaterThan=tW.gt=function(t){return this.cmp(t)>0},tW.greaterThanOrEqualTo=tW.gte=function(t){var e=this.cmp(t);return 1==e||0===e},tW.hyperbolicCosine=tW.cosh=function(){var t,e,r,n,i,o=this,s=o.constructor,a=new s(1);if(!o.isFinite())return new s(o.s?1/0:NaN);if(o.isZero())return a;r=s.precision,n=s.rounding,s.precision=r+Math.max(o.e,o.sd())+4,s.rounding=1,(i=o.d.length)<32?e=(1/ei(4,t=Math.ceil(i/3))).toString():(t=16,e="2.3283064365386962890625e-10"),o=en(s,1,o.times(e),new s(1),!0);for(var u,c=t,f=new s(8);c--;)u=o.times(o),o=a.minus(u.times(f.minus(u.times(f))));return tQ(o,s.precision=r,s.rounding=n,!0)},tW.hyperbolicSine=tW.sinh=function(){var t,e,r,n,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(e=o.precision,r=o.rounding,o.precision=e+Math.max(i.e,i.sd())+4,o.rounding=1,(n=i.d.length)<3)i=en(o,2,i,i,!0);else{t=(t=1.4*Math.sqrt(n))>16?16:0|t,i=en(o,2,i=i.times(1/ei(5,t)),i,!0);for(var s,a=new o(5),u=new o(16),c=new o(20);t--;)s=i.times(i),i=i.times(a.plus(s.times(u.times(s).plus(c))))}return o.precision=e,o.rounding=r,tQ(i,e,r,!0)},tW.hyperbolicTangent=tW.tanh=function(){var t,e,r=this.constructor;return this.isFinite()?this.isZero()?new r(this):(t=r.precision,e=r.rounding,r.precision=t+7,r.rounding=1,tX(this.sinh(),this.cosh(),r.precision=t,r.rounding=e)):new r(this.s)},tW.inverseCosine=tW.acos=function(){var t=this,e=t.constructor,r=t.abs().cmp(1),n=e.precision,i=e.rounding;return -1!==r?0===r?t.isNeg()?t4(e,n,i):new e(0):new e(NaN):t.isZero()?t4(e,n+4,i).times(.5):(e.precision=n+6,e.rounding=1,t=new e(1).minus(t).div(t.plus(1)).sqrt().atan(),e.precision=n,e.rounding=i,t.times(2))},tW.inverseHyperbolicCosine=tW.acosh=function(){var t,e,r=this,n=r.constructor;return r.lte(1)?new n(r.eq(1)?0:NaN):r.isFinite()?(t=n.precision,e=n.rounding,n.precision=t+Math.max(Math.abs(r.e),r.sd())+4,n.rounding=1,tC=!1,r=r.times(r).minus(1).sqrt().plus(r),tC=!0,n.precision=t,n.rounding=e,r.ln()):new n(r)},tW.inverseHyperbolicSine=tW.asinh=function(){var t,e,r=this,n=r.constructor;return!r.isFinite()||r.isZero()?new n(r):(t=n.precision,e=n.rounding,n.precision=t+2*Math.max(Math.abs(r.e),r.sd())+6,n.rounding=1,tC=!1,r=r.times(r).plus(1).sqrt().plus(r),tC=!0,n.precision=t,n.rounding=e,r.ln())},tW.inverseHyperbolicTangent=tW.atanh=function(){var t,e,r,n,i=this,o=i.constructor;return i.isFinite()?i.e>=0?new o(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(t=o.precision,e=o.rounding,Math.max(n=i.sd(),t)<-(2*i.e)-1)?tQ(new o(i),t,e,!0):(o.precision=r=n-i.e,i=tX(i.plus(1),new o(1).minus(i),r+t,1),o.precision=t+4,o.rounding=1,i=i.ln(),o.precision=t,o.rounding=e,i.times(.5)):new o(NaN)},tW.inverseSine=tW.asin=function(){var t,e,r,n,i=this,o=i.constructor;return i.isZero()?new o(i):(e=i.abs().cmp(1),r=o.precision,n=o.rounding,-1!==e)?0===e?((t=t4(o,r+4,n).times(.5)).s=i.s,t):new o(NaN):(o.precision=r+6,o.rounding=1,i=i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan(),o.precision=r,o.rounding=n,i.times(2))},tW.inverseTangent=tW.atan=function(){var t,e,r,n,i,o,s,a,u,c=this,f=c.constructor,l=f.precision,h=f.rounding;if(c.isFinite()){if(c.isZero())return new f(c);if(c.abs().eq(1)&&l+4<=tV)return(s=t4(f,l+4,h).times(.25)).s=c.s,s}else{if(!c.s)return new f(NaN);if(l+4<=tV)return(s=t4(f,l+4,h).times(.5)).s=c.s,s}for(f.precision=a=l+10,f.rounding=1,t=r=Math.min(28,a/7+2|0);t;--t)c=c.div(c.times(c).plus(1).sqrt().plus(1));for(tC=!1,e=Math.ceil(a/7),n=1,u=c.times(c),s=new f(c),i=c;-1!==t;)if(i=i.times(u),o=s.minus(i.div(n+=2)),i=i.times(u),void 0!==(s=o.plus(i.div(n+=2))).d[e])for(t=e;s.d[t]===o.d[t]&&t--;);return r&&(s=s.times(2<<r-1)),tC=!0,tQ(s,f.precision=l,f.rounding=h,!0)},tW.isFinite=function(){return!!this.d},tW.isInteger=tW.isInt=function(){return!!this.d&&tI(this.e/7)>this.d.length-2},tW.isNaN=function(){return!this.s},tW.isNegative=tW.isNeg=function(){return this.s<0},tW.isPositive=tW.isPos=function(){return this.s>0},tW.isZero=function(){return!!this.d&&0===this.d[0]},tW.lessThan=tW.lt=function(t){return 0>this.cmp(t)},tW.lessThanOrEqualTo=tW.lte=function(t){return 1>this.cmp(t)},tW.logarithm=tW.log=function(t){var e,r,n,i,o,s,a,u,c=this.constructor,f=c.precision,l=c.rounding;if(null==t)t=new c(10),e=!0;else{if(r=(t=new c(t)).d,t.s<0||!r||!r[0]||t.eq(1))return new c(NaN);e=t.eq(10)}if(r=this.d,this.s<0||!r||!r[0]||this.eq(1))return new c(r&&!r[0]?-1/0:1!=this.s?NaN:r?0:1/0);if(e){if(r.length>1)o=!0;else{for(i=r[0];i%10==0;)i/=10;o=1!==i}}if(tC=!1,tY((u=tX(s=et(this,a=f+5),e?t2(c,a+10):et(t,a),a,1)).d,i=f,l))do if(a+=10,u=tX(s=et(this,a),e?t2(c,a+10):et(t,a),a,1),!o){+tH(u.d).slice(i+1,i+15)+1==1e14&&(u=tQ(u,f+1,0));break}while(tY(u.d,i+=10,l));return tC=!0,tQ(u,f,l)},tW.minus=tW.sub=function(t){var e,r,n,i,o,s,a,u,c,f,l,h,p=this.constructor;if(t=new p(t),!this.d||!t.d)return this.s&&t.s?this.d?t.s=-t.s:t=new p(t.d||this.s!==t.s?this:NaN):t=new p(NaN),t;if(this.s!=t.s)return t.s=-t.s,this.plus(t);if(c=this.d,h=t.d,a=p.precision,u=p.rounding,!c[0]||!h[0]){if(h[0])t.s=-t.s;else{if(!c[0])return new p(3===u?-0:0);t=new p(this)}return tC?tQ(t,a,u):t}if(r=tI(t.e/7),f=tI(this.e/7),c=c.slice(),o=f-r){for((l=o<0)?(e=c,o=-o,s=h.length):(e=h,r=f,s=c.length),o>(n=Math.max(Math.ceil(a/7),s)+2)&&(o=n,e.length=1),e.reverse(),n=o;n--;)e.push(0);e.reverse()}else{for((l=(n=c.length)<(s=h.length))&&(s=n),n=0;n<s;n++)if(c[n]!=h[n]){l=c[n]<h[n];break}o=0}for(l&&(e=c,c=h,h=e,t.s=-t.s),s=c.length,n=h.length-s;n>0;--n)c[s++]=0;for(n=h.length;n>o;){if(c[--n]<h[n]){for(i=n;i&&0===c[--i];)c[i]=1e7-1;--c[i],c[n]+=1e7}c[n]-=h[n]}for(;0===c[--s];)c.pop();for(;0===c[0];c.shift())--r;return c[0]?(t.d=c,t.e=t1(c,r),tC?tQ(t,a,u):t):new p(3===u?-0:0)},tW.modulo=tW.mod=function(t){var e,r=this.constructor;return(t=new r(t),this.d&&t.s&&(!t.d||t.d[0]))?t.d&&(!this.d||this.d[0])?(tC=!1,9==r.modulo?(e=tX(this,t.abs(),0,3,1),e.s*=t.s):e=tX(this,t,0,r.modulo,1),e=e.times(t),tC=!0,this.minus(e)):tQ(new r(this),r.precision,r.rounding):new r(NaN)},tW.naturalExponential=tW.exp=function(){return t6(this)},tW.naturalLogarithm=tW.ln=function(){return et(this)},tW.negated=tW.neg=function(){var t=new this.constructor(this);return t.s=-t.s,tQ(t)},tW.plus=tW.add=function(t){var e,r,n,i,o,s,a,u,c,f,l=this.constructor;if(t=new l(t),!this.d||!t.d)return this.s&&t.s?this.d||(t=new l(t.d||this.s===t.s?this:NaN)):t=new l(NaN),t;if(this.s!=t.s)return t.s=-t.s,this.minus(t);if(c=this.d,f=t.d,a=l.precision,u=l.rounding,!c[0]||!f[0])return f[0]||(t=new l(this)),tC?tQ(t,a,u):t;if(o=tI(this.e/7),n=tI(t.e/7),c=c.slice(),i=o-n){for(i<0?(r=c,i=-i,s=f.length):(r=f,n=o,s=c.length),i>(s=(o=Math.ceil(a/7))>s?o+1:s+1)&&(i=s,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for((s=c.length)-(i=f.length)<0&&(i=s,r=f,f=c,c=r),e=0;i;)e=(c[--i]=c[i]+f[i]+e)/1e7|0,c[i]%=1e7;for(e&&(c.unshift(e),++n),s=c.length;0==c[--s];)c.pop();return t.d=c,t.e=t1(c,n),tC?tQ(t,a,u):t},tW.precision=tW.sd=function(t){var e;if(void 0!==t&&!!t!==t&&1!==t&&0!==t)throw Error(tT+t);return this.d?(e=t3(this.d),t&&this.e+1>e&&(e=this.e+1)):e=NaN,e},tW.round=function(){var t=this.constructor;return tQ(new t(this),this.e+1,t.rounding)},tW.sine=tW.sin=function(){var t,e,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(t=n.precision,e=n.rounding,n.precision=t+Math.max(r.e,r.sd())+7,n.rounding=1,r=function(t,e){var r,n=e.d.length;if(n<3)return e.isZero()?e:en(t,2,e,e);r=(r=1.4*Math.sqrt(n))>16?16:0|r,e=en(t,2,e=e.times(1/ei(5,r)),e);for(var i,o=new t(5),s=new t(16),a=new t(20);r--;)i=e.times(e),e=e.times(o.plus(i.times(s.times(i).minus(a))));return e}(n,eo(n,r)),n.precision=t,n.rounding=e,tQ(tA>2?r.neg():r,t,e,!0)):new n(NaN)},tW.squareRoot=tW.sqrt=function(){var t,e,r,n,i,o,s=this.d,a=this.e,u=this.s,c=this.constructor;if(1!==u||!s||!s[0])return new c(!u||u<0&&(!s||s[0])?NaN:s?this:1/0);for(tC=!1,0==(u=Math.sqrt(+this))||u==1/0?(((e=tH(s)).length+a)%2==0&&(e+="0"),u=Math.sqrt(e),a=tI((a+1)/2)-(a<0||a%2),n=new c(e=u==1/0?"5e"+a:(e=u.toExponential()).slice(0,e.indexOf("e")+1)+a)):n=new c(u.toString()),r=(a=c.precision)+3;;)if(n=(o=n).plus(tX(this,o,r+2,1)).times(.5),tH(o.d).slice(0,r)===(e=tH(n.d)).slice(0,r)){if("9999"!=(e=e.slice(r-3,r+1))&&(i||"4999"!=e)){+e&&(+e.slice(1)||"5"!=e.charAt(0))||(tQ(n,a+1,1),t=!n.times(n).eq(this));break}if(!i&&(tQ(o,a+1,0),o.times(o).eq(this))){n=o;break}r+=4,i=1}return tC=!0,tQ(n,a,c.rounding,t)},tW.tangent=tW.tan=function(){var t,e,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(t=n.precision,e=n.rounding,n.precision=t+10,n.rounding=1,(r=r.sin()).s=1,r=tX(r,new n(1).minus(r.times(r)).sqrt(),t+10,0),n.precision=t,n.rounding=e,tQ(2==tA||4==tA?r.neg():r,t,e,!0)):new n(NaN)},tW.times=tW.mul=function(t){var e,r,n,i,o,s,a,u,c,f=this.constructor,l=this.d,h=(t=new f(t)).d;if(t.s*=this.s,!l||!l[0]||!h||!h[0])return new f(t.s&&(!l||l[0]||h)&&(!h||h[0]||l)?l&&h?0*t.s:t.s/0:NaN);for(r=tI(this.e/7)+tI(t.e/7),(u=l.length)<(c=h.length)&&(o=l,l=h,h=o,s=u,u=c,c=s),o=[],n=s=u+c;n--;)o.push(0);for(n=c;--n>=0;){for(e=0,i=u+n;i>n;)a=o[i]+h[n]*l[i-n-1]+e,o[i--]=a%1e7|0,e=a/1e7|0;o[i]=(o[i]+e)%1e7|0}for(;!o[--s];)o.pop();return e?++r:o.shift(),t.d=o,t.e=t1(o,r),tC?tQ(t,f.precision,f.rounding):t},tW.toBinary=function(t,e){return es(this,2,t,e)},tW.toDecimalPlaces=tW.toDP=function(t,e){var r=this,n=r.constructor;return(r=new n(r),void 0===t)?r:(tJ(t,0,1e9),void 0===e?e=n.rounding:tJ(e,0,8),tQ(r,t+r.e+1,e))},tW.toExponential=function(t,e){var r,n=this,i=n.constructor;return void 0===t?r=t0(n,!0):(tJ(t,0,1e9),void 0===e?e=i.rounding:tJ(e,0,8),r=t0(n=tQ(new i(n),t+1,e),!0,t+1)),n.isNeg()&&!n.isZero()?"-"+r:r},tW.toFixed=function(t,e){var r,n,i=this.constructor;return void 0===t?r=t0(this):(tJ(t,0,1e9),void 0===e?e=i.rounding:tJ(e,0,8),r=t0(n=tQ(new i(this),t+this.e+1,e),!1,t+n.e+1)),this.isNeg()&&!this.isZero()?"-"+r:r},tW.toFraction=function(t){var e,r,n,i,o,s,a,u,c,f,l,h,p=this.d,d=this.constructor;if(!p)return new d(this);if(c=r=new d(1),n=u=new d(0),s=(o=(e=new d(n)).e=t3(p)-this.e-1)%7,e.d[0]=tR(10,s<0?7+s:s),null==t)t=o>0?e:c;else{if(!(a=new d(t)).isInt()||a.lt(c))throw Error(tT+a);t=a.gt(e)?o>0?e:c:a}for(tC=!1,a=new d(tH(p)),f=d.precision,d.precision=o=14*p.length;l=tX(a,e,0,1,1),1!=(i=r.plus(l.times(n))).cmp(t);)r=n,n=i,i=c,c=u.plus(l.times(i)),u=i,i=e,e=a.minus(l.times(i)),a=i;return i=tX(t.minus(r),n,0,1,1),u=u.plus(i.times(c)),r=r.plus(i.times(n)),u.s=c.s=this.s,h=1>tX(c,n,o,1).minus(this).abs().cmp(tX(u,r,o,1).minus(this).abs())?[c,n]:[u,r],d.precision=f,tC=!0,h},tW.toHexadecimal=tW.toHex=function(t,e){return es(this,16,t,e)},tW.toNearest=function(t,e){var r=this,n=r.constructor;if(r=new n(r),null==t){if(!r.d)return r;t=new n(1),e=n.rounding}else{if(t=new n(t),void 0===e?e=n.rounding:tJ(e,0,8),!r.d)return t.s?r:t;if(!t.d)return t.s&&(t.s=r.s),t}return t.d[0]?(tC=!1,r=tX(r,t,0,e,1).times(t),tC=!0,tQ(r)):(t.s=r.s,r=t),r},tW.toNumber=function(){return+this},tW.toOctal=function(t,e){return es(this,8,t,e)},tW.toPower=tW.pow=function(t){var e,r,n,i,o,s,a=this,u=a.constructor,c=+(t=new u(t));if(!a.d||!t.d||!a.d[0]||!t.d[0])return new u(tR(+a,c));if((a=new u(a)).eq(1))return a;if(n=u.precision,o=u.rounding,t.eq(1))return tQ(a,n,o);if((e=tI(t.e/7))>=t.d.length-1&&(r=c<0?-c:c)<=0x1fffffffffffff)return i=t5(u,a,r,n),t.s<0?new u(1).div(i):tQ(i,n,o);if((s=a.s)<0){if(e<t.d.length-1)return new u(NaN);if((1&t.d[e])==0&&(s=1),0==a.e&&1==a.d[0]&&1==a.d.length)return a.s=s,a}return(e=0!=(r=tR(+a,c))&&isFinite(r)?new u(r+"").e:tI(c*(Math.log("0."+tH(a.d))/Math.LN10+a.e+1)))>u.maxE+1||e<u.minE-1?new u(e>0?s/0:0):(tC=!1,u.rounding=a.s=1,r=Math.min(12,(e+"").length),(i=t6(t.times(et(a,n+r)),n)).d&&tY((i=tQ(i,n+5,1)).d,n,o)&&(e=n+10,+tH((i=tQ(t6(t.times(et(a,e+r)),e),e+5,1)).d).slice(n+1,n+15)+1==1e14&&(i=tQ(i,n+1,0))),i.s=s,tC=!0,u.rounding=o,tQ(i,n,o))},tW.toPrecision=function(t,e){var r,n=this,i=n.constructor;return void 0===t?r=t0(n,n.e<=i.toExpNeg||n.e>=i.toExpPos):(tJ(t,1,1e9),void 0===e?e=i.rounding:tJ(e,0,8),r=t0(n=tQ(new i(n),t,e),t<=n.e||n.e<=i.toExpNeg,t)),n.isNeg()&&!n.isZero()?"-"+r:r},tW.toSignificantDigits=tW.toSD=function(t,e){var r=this.constructor;return void 0===t?(t=r.precision,e=r.rounding):(tJ(t,1,1e9),void 0===e?e=r.rounding:tJ(e,0,8)),tQ(new r(this),t,e)},tW.toString=function(){var t=this.constructor,e=t0(this,this.e<=t.toExpNeg||this.e>=t.toExpPos);return this.isNeg()&&!this.isZero()?"-"+e:e},tW.truncated=tW.trunc=function(){return tQ(new this.constructor(this),this.e+1,1)},tW.valueOf=tW.toJSON=function(){var t=this.constructor,e=t0(this,this.e<=t.toExpNeg||this.e>=t.toExpPos);return this.isNeg()?"-"+e:e};var tX=function(){function t(t,e,r){var n,i=0,o=t.length;for(t=t.slice();o--;)n=t[o]*e+i,t[o]=n%r|0,i=n/r|0;return i&&t.unshift(i),t}function e(t,e,r,n){var i,o;if(r!=n)o=r>n?1:-1;else for(i=o=0;i<r;i++)if(t[i]!=e[i]){o=t[i]>e[i]?1:-1;break}return o}function r(t,e,r,n){for(var i=0;r--;)t[r]-=i,i=+(t[r]<e[r]),t[r]=i*n+t[r]-e[r];for(;!t[0]&&t.length>1;)t.shift()}return function(n,i,o,s,a,u){var c,f,l,h,p,d,m,g,v,y,w,b,x,_,N,M,E,O,S,A,j=n.constructor,F=n.s==i.s?1:-1,z=n.d,D=i.d;if(!z||!z[0]||!D||!D[0])return new j(n.s&&i.s&&(z?!D||z[0]!=D[0]:D)?z&&0==z[0]||!D?0*F:F/0:NaN);for(u?(p=1,f=n.e-i.e):(u=1e7,p=7,f=tI(n.e/p)-tI(i.e/p)),S=D.length,E=z.length,y=(v=new j(F)).d=[],l=0;D[l]==(z[l]||0);l++);if(D[l]>(z[l]||0)&&f--,null==o?(_=o=j.precision,s=j.rounding):_=a?o+(n.e-i.e)+1:o,_<0)y.push(1),d=!0;else{if(_=_/p+2|0,l=0,1==S){for(h=0,D=D[0],_++;(l<E||h)&&_--;l++)N=h*u+(z[l]||0),y[l]=N/D|0,h=N%D|0;d=h||l<E}else{for((h=u/(D[0]+1)|0)>1&&(D=t(D,h,u),z=t(z,h,u),S=D.length,E=z.length),M=S,b=(w=z.slice(0,S)).length;b<S;)w[b++]=0;(A=D.slice()).unshift(0),O=D[0],D[1]>=u/2&&++O;do h=0,(c=e(D,w,S,b))<0?(x=w[0],S!=b&&(x=x*u+(w[1]||0)),(h=x/O|0)>1?(h>=u&&(h=u-1),g=(m=t(D,h,u)).length,b=w.length,1==(c=e(m,w,g,b))&&(h--,r(m,S<g?A:D,g,u))):(0==h&&(c=h=1),m=D.slice()),(g=m.length)<b&&m.unshift(0),r(w,m,b,u),-1==c&&(b=w.length,(c=e(D,w,S,b))<1&&(h++,r(w,S<b?A:D,b,u))),b=w.length):0===c&&(h++,w=[0]),y[l++]=h,c&&w[0]?w[b++]=z[M]||0:(w=[z[M]],b=1);while((M++<E||void 0!==w[0])&&_--);d=void 0!==w[0]}y[0]||y.shift()}if(1==p)v.e=f,tS=d;else{for(l=1,h=y[0];h>=10;h/=10)l++;v.e=l+f*p-1,tQ(v,a?o+v.e+1:o,s,d)}return v}}();function tQ(t,e,r,n){var i,o,s,a,u,c,f,l,h,p=t.constructor;t:if(null!=e){if(!(l=t.d))return t;for(i=1,a=l[0];a>=10;a/=10)i++;if((o=e-i)<0)o+=7,s=e,u=(f=l[h=0])/tR(10,i-s-1)%10|0;else if((h=Math.ceil((o+1)/7))>=(a=l.length)){if(n){for(;a++<=h;)l.push(0);f=u=0,i=1,o%=7,s=o-7+1}else break t}else{for(i=1,f=a=l[h];a>=10;a/=10)i++;o%=7,u=(s=o-7+i)<0?0:f/tR(10,i-s-1)%10|0}if(n=n||e<0||void 0!==l[h+1]||(s<0?f:f%tR(10,i-s-1)),c=r<4?(u||n)&&(0==r||r==(t.s<0?3:2)):u>5||5==u&&(4==r||n||6==r&&(o>0?s>0?f/tR(10,i-s):0:l[h-1])%10&1||r==(t.s<0?8:7)),e<1||!l[0])return l.length=0,c?(e-=t.e+1,l[0]=tR(10,(7-e%7)%7),t.e=-e||0):l[0]=t.e=0,t;if(0==o?(l.length=h,a=1,h--):(l.length=h+1,a=tR(10,7-o),l[h]=s>0?(f/tR(10,i-s)%tR(10,s)|0)*a:0),c)for(;;){if(0==h){for(o=1,s=l[0];s>=10;s/=10)o++;for(s=l[0]+=a,a=1;s>=10;s/=10)a++;o!=a&&(t.e++,1e7==l[0]&&(l[0]=1));break}if(l[h]+=a,1e7!=l[h])break;l[h--]=0,a=1}for(o=l.length;0===l[--o];)l.pop()}return tC&&(t.e>p.maxE?(t.d=null,t.e=NaN):t.e<p.minE&&(t.e=0,t.d=[0])),t}function t0(t,e,r){if(!t.isFinite())return ee(t);var n,i=t.e,o=tH(t.d),s=o.length;return e?(r&&(n=r-s)>0?o=o.charAt(0)+"."+o.slice(1)+t9(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(t.e<0?"e":"e+")+t.e):i<0?(o="0."+t9(-i-1)+o,r&&(n=r-s)>0&&(o+=t9(n))):i>=s?(o+=t9(i+1-s),r&&(n=r-i-1)>0&&(o=o+"."+t9(n))):((n=i+1)<s&&(o=o.slice(0,n)+"."+o.slice(n)),r&&(n=r-s)>0&&(i+1===s&&(o+="."),o+=t9(n))),o}function t1(t,e){var r=t[0];for(e*=7;r>=10;r/=10)e++;return e}function t2(t,e,r){if(e>tG)throw tC=!0,r&&(t.precision=r),Error(tk);return tQ(new t(tF),e,1,!0)}function t4(t,e,r){if(e>tV)throw Error(tk);return tQ(new t(tz),e,r,!0)}function t3(t){var e=t.length-1,r=7*e+1;if(e=t[e]){for(;e%10==0;e/=10)r--;for(e=t[0];e>=10;e/=10)r++}return r}function t9(t){for(var e="";t--;)e+="0";return e}function t5(t,e,r,n){var i,o=new t(1),s=Math.ceil(n/7+4);for(tC=!1;;){if(r%2&&ea((o=o.times(e)).d,s)&&(i=!0),0===(r=tI(r/2))){r=o.d.length-1,i&&0===o.d[r]&&++o.d[r];break}ea((e=e.times(e)).d,s)}return tC=!0,o}function t8(t){return 1&t.d[t.d.length-1]}function t7(t,e,r){for(var n,i,o=new t(e[0]),s=0;++s<e.length;){if(!(i=new t(e[s])).s){o=i;break}((n=o.cmp(i))===r||0===n&&o.s===r)&&(o=i)}return o}function t6(t,e){var r,n,i,o,s,a,u,c=0,f=0,l=0,h=t.constructor,p=h.rounding,d=h.precision;if(!t.d||!t.d[0]||t.e>17)return new h(t.d?t.d[0]?t.s<0?0:1/0:1:t.s?t.s<0?0:t:0/0);for(null==e?(tC=!1,u=d):u=e,a=new h(.03125);t.e>-2;)t=t.times(a),l+=5;for(u+=n=Math.log(tR(2,l))/Math.LN10*2+5|0,r=o=s=new h(1),h.precision=u;;){if(o=tQ(o.times(t),u,1),r=r.times(++f),tH((a=s.plus(tX(o,r,u,1))).d).slice(0,u)===tH(s.d).slice(0,u)){for(i=l;i--;)s=tQ(s.times(s),u,1);if(null!=e)return h.precision=d,s;if(!(c<3&&tY(s.d,u-n,p,c)))return tQ(s,h.precision=d,p,tC=!0);h.precision=u+=10,r=o=a=new h(1),f=0,c++}s=a}}function et(t,e){var r,n,i,o,s,a,u,c,f,l,h,p=1,d=t,m=d.d,g=d.constructor,v=g.rounding,y=g.precision;if(d.s<0||!m||!m[0]||!d.e&&1==m[0]&&1==m.length)return new g(m&&!m[0]?-1/0:1!=d.s?NaN:m?0:d);if(null==e?(tC=!1,f=y):f=e,g.precision=f+=10,n=(r=tH(m)).charAt(0),!(15e14>Math.abs(o=d.e)))return c=t2(g,f+2,y).times(o+""),d=et(new g(n+"."+r.slice(1)),f-10).plus(c),g.precision=y,null==e?tQ(d,y,v,tC=!0):d;for(;n<7&&1!=n||1==n&&r.charAt(1)>3;)n=(r=tH((d=d.times(t)).d)).charAt(0),p++;for(o=d.e,n>1?(d=new g("0."+r),o++):d=new g(n+"."+r.slice(1)),l=d,u=s=d=tX(d.minus(1),d.plus(1),f,1),h=tQ(d.times(d),f,1),i=3;;){if(s=tQ(s.times(h),f,1),tH((c=u.plus(tX(s,new g(i),f,1))).d).slice(0,f)===tH(u.d).slice(0,f)){if(u=u.times(2),0!==o&&(u=u.plus(t2(g,f+2,y).times(o+""))),u=tX(u,new g(p),f,1),null!=e)return g.precision=y,u;if(!tY(u.d,f-10,v,a))return tQ(u,g.precision=y,v,tC=!0);g.precision=f+=10,c=s=d=tX(l.minus(1),l.plus(1),f,1),h=tQ(d.times(d),f,1),i=a=1}u=c,i+=2}}function ee(t){return String(t.s*t.s/0)}function er(t,e){var r,n,i;for((r=e.indexOf("."))>-1&&(e=e.replace(".","")),(n=e.search(/e/i))>0?(r<0&&(r=n),r+=+e.slice(n+1),e=e.substring(0,n)):r<0&&(r=e.length),n=0;48===e.charCodeAt(n);n++);for(i=e.length;48===e.charCodeAt(i-1);--i);if(e=e.slice(n,i)){if(i-=n,t.e=r=r-n-1,t.d=[],n=(r+1)%7,r<0&&(n+=7),n<i){for(n&&t.d.push(+e.slice(0,n)),i-=7;n<i;)t.d.push(+e.slice(n,n+=7));n=7-(e=e.slice(n)).length}else n-=i;for(;n--;)e+="0";t.d.push(+e),tC&&(t.e>t.constructor.maxE?(t.d=null,t.e=NaN):t.e<t.constructor.minE&&(t.e=0,t.d=[0]))}else t.e=0,t.d=[0];return t}function en(t,e,r,n,i){var o,s,a,u,c=t.precision,f=Math.ceil(c/7);for(tC=!1,u=r.times(r),a=new t(n);;){if(s=tX(a.times(u),new t(e++*e++),c,1),a=i?n.plus(s):n.minus(s),n=tX(s.times(u),new t(e++*e++),c,1),void 0!==(s=a.plus(n)).d[f]){for(o=f;s.d[o]===a.d[o]&&o--;);if(-1==o)break}o=a,a=n,n=s,s=o}return tC=!0,s.d.length=f+1,s}function ei(t,e){for(var r=t;--e;)r*=t;return r}function eo(t,e){var r,n=e.s<0,i=t4(t,t.precision,1),o=i.times(.5);if((e=e.abs()).lte(o))return tA=n?4:1,e;if((r=e.divToInt(i)).isZero())tA=n?3:2;else{if((e=e.minus(r.times(i))).lte(o))return tA=t8(r)?n?2:3:n?4:1,e;tA=t8(r)?n?1:4:n?3:2}return e.minus(i).abs()}function es(t,e,r,n){var i,o,s,a,u,c,f,l,h,p=t.constructor,d=void 0!==r;if(d?(tJ(r,1,1e9),void 0===n?n=p.rounding:tJ(n,0,8)):(r=p.precision,n=p.rounding),t.isFinite()){for(s=(f=t0(t)).indexOf("."),d?(i=2,16==e?r=4*r-3:8==e&&(r=3*r-2)):i=e,s>=0&&(f=f.replace(".",""),(h=new p(1)).e=f.length-s,h.d=tK(t0(h),10,i),h.e=h.d.length),o=u=(l=tK(f,10,i)).length;0==l[--u];)l.pop();if(l[0]){if(s<0?o--:((t=new p(t)).d=l,t.e=o,l=(t=tX(t,h,r,n,0,i)).d,o=t.e,c=tS),s=l[r],a=i/2,c=c||void 0!==l[r+1],c=n<4?(void 0!==s||c)&&(0===n||n===(t.s<0?3:2)):s>a||s===a&&(4===n||c||6===n&&1&l[r-1]||n===(t.s<0?8:7)),l.length=r,c)for(;++l[--r]>i-1;)l[r]=0,r||(++o,l.unshift(1));for(u=l.length;!l[u-1];--u);for(s=0,f="";s<u;s++)f+=tj.charAt(l[s]);if(d){if(u>1){if(16==e||8==e){for(s=16==e?4:3,--u;u%s;u++)f+="0";for(u=(l=tK(f,i,e)).length;!l[u-1];--u);for(s=1,f="1.";s<u;s++)f+=tj.charAt(l[s])}else f=f.charAt(0)+"."+f.slice(1)}f=f+(o<0?"p":"p+")+o}else if(o<0){for(;++o;)f="0"+f;f="0."+f}else if(++o>u)for(o-=u;o--;)f+="0";else o<u&&(f=f.slice(0,o)+"."+f.slice(o))}else f=d?"0p+0":"0";f=(16==e?"0x":2==e?"0b":8==e?"0o":"")+f}else f=ee(t);return t.s<0?"-"+f:f}function ea(t,e){if(t.length>e)return t.length=e,!0}function eu(t){return new this(t).abs()}function ec(t){return new this(t).acos()}function ef(t){return new this(t).acosh()}function el(t,e){return new this(t).plus(e)}function eh(t){return new this(t).asin()}function ep(t){return new this(t).asinh()}function ed(t){return new this(t).atan()}function em(t){return new this(t).atanh()}function eg(t,e){t=new this(t),e=new this(e);var r,n=this.precision,i=this.rounding,o=n+4;return t.s&&e.s?t.d||e.d?!e.d||t.isZero()?(r=e.s<0?t4(this,n,i):new this(0)).s=t.s:!t.d||e.isZero()?(r=t4(this,o,1).times(.5)).s=t.s:e.s<0?(this.precision=o,this.rounding=1,r=this.atan(tX(t,e,o,1)),e=t4(this,o,1),this.precision=n,this.rounding=i,r=t.s<0?r.minus(e):r.plus(e)):r=this.atan(tX(t,e,o,1)):(r=t4(this,o,1).times(e.s>0?.25:.75)).s=t.s:r=new this(NaN),r}function ev(t){return new this(t).cbrt()}function ey(t){return tQ(t=new this(t),t.e+1,2)}function ew(t,e,r){return new this(t).clamp(e,r)}function eb(t){if(!t||"object"!=typeof t)throw Error(tB+"Object expected");var e,r,n,i=!0===t.defaults,o=["precision",1,1e9,"rounding",0,8,"toExpNeg",-9e15,0,"toExpPos",0,9e15,"maxE",0,9e15,"minE",-9e15,0,"modulo",0,9];for(e=0;e<o.length;e+=3)if(r=o[e],i&&(this[r]=tD[r]),void 0!==(n=t[r])){if(tI(n)===n&&n>=o[e+1]&&n<=o[e+2])this[r]=n;else throw Error(tT+r+": "+n)}if(r="crypto",i&&(this[r]=tD[r]),void 0!==(n=t[r])){if(!0===n||!1===n||0===n||1===n){if(n){if("undefined"!=typeof crypto&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[r]=!0;else throw Error(t$)}else this[r]=!1}else throw Error(tT+r+": "+n)}return this}function ex(t){return new this(t).cos()}function e_(t){return new this(t).cosh()}function eN(t,e){return new this(t).div(e)}function eM(t){return new this(t).exp()}function eE(t){return tQ(t=new this(t),t.e+1,3)}function eO(){var t,e,r=new this(0);for(t=0,tC=!1;t<arguments.length;)if(e=new this(arguments[t++]),e.d)r.d&&(r=r.plus(e.times(e)));else{if(e.s)return tC=!0,new this(1/0);r=e}return tC=!0,r.sqrt()}function eS(t){return t instanceof eH||t&&t.toStringTag===tP||!1}function eA(t){return new this(t).ln()}function ej(t,e){return new this(t).log(e)}function eF(t){return new this(t).log(2)}function ez(t){return new this(t).log(10)}function eD(){return t7(this,arguments,-1)}function eC(){return t7(this,arguments,1)}function eB(t,e){return new this(t).mod(e)}function eT(t,e){return new this(t).mul(e)}function ek(t,e){return new this(t).pow(e)}function e$(t){var e,r,n,i,o=0,s=new this(1),a=[];if(void 0===t?t=this.precision:tJ(t,1,1e9),n=Math.ceil(t/7),this.crypto){if(crypto.getRandomValues)for(e=crypto.getRandomValues(new Uint32Array(n));o<n;)(i=e[o])>=429e7?e[o]=crypto.getRandomValues(new Uint32Array(1))[0]:a[o++]=i%1e7;else if(crypto.randomBytes){for(e=crypto.randomBytes(n*=4);o<n;)(i=e[o]+(e[o+1]<<8)+(e[o+2]<<16)+((127&e[o+3])<<24))>=214e7?crypto.randomBytes(4).copy(e,o):(a.push(i%1e7),o+=4);o=n/4}else throw Error(t$)}else for(;o<n;)a[o++]=1e7*Math.random()|0;for(n=a[--o],t%=7,n&&t&&(i=tR(10,7-t),a[o]=(n/i|0)*i);0===a[o];o--)a.pop();if(o<0)r=0,a=[0];else{for(r=-1;0===a[0];r-=7)a.shift();for(n=1,i=a[0];i>=10;i/=10)n++;n<7&&(r-=7-n)}return s.e=r,s.d=a,s}function eP(t){return tQ(t=new this(t),t.e+1,this.rounding)}function eI(t){return(t=new this(t)).d?t.d[0]?t.s:0*t.s:t.s||NaN}function eR(t){return new this(t).sin()}function eL(t){return new this(t).sinh()}function eZ(t){return new this(t).sqrt()}function eq(t,e){return new this(t).sub(e)}function eU(){var t=0,e=arguments,r=new this(e[0]);for(tC=!1;r.s&&++t<e.length;)r=r.plus(e[t]);return tC=!0,tQ(r,this.precision,this.rounding)}function eG(t){return new this(t).tan()}function eV(t){return new this(t).tanh()}function eW(t){return tQ(t=new this(t),t.e+1,1)}tW[Symbol.for("nodejs.util.inspect.custom")]=tW.toString,tW[Symbol.toStringTag]="Decimal";var eH=tW.constructor=function t(e){var r,n,i;function o(t){var e,r,n;if(!(this instanceof o))return new o(t);if(this.constructor=o,eS(t)){this.s=t.s,tC?!t.d||t.e>o.maxE?(this.e=NaN,this.d=null):t.e<o.minE?(this.e=0,this.d=[0]):(this.e=t.e,this.d=t.d.slice()):(this.e=t.e,this.d=t.d?t.d.slice():t.d);return}if("number"==(n=typeof t)){if(0===t){this.s=1/t<0?-1:1,this.e=0,this.d=[0];return}if(t<0?(t=-t,this.s=-1):this.s=1,t===~~t&&t<1e7){for(e=0,r=t;r>=10;r/=10)e++;tC?e>o.maxE?(this.e=NaN,this.d=null):e<o.minE?(this.e=0,this.d=[0]):(this.e=e,this.d=[t]):(this.e=e,this.d=[t]);return}if(0*t!=0){t||(this.s=NaN),this.e=NaN,this.d=null;return}return er(this,t.toString())}if("string"===n)return 45===(r=t.charCodeAt(0))?(t=t.slice(1),this.s=-1):(43===r&&(t=t.slice(1)),this.s=1),tU.test(t)?er(this,t):function(t,e){var r,n,i,o,s,a,u,c,f;if(e.indexOf("_")>-1){if(e=e.replace(/(\d)_(?=\d)/g,"$1"),tU.test(e))return er(t,e)}else if("Infinity"===e||"NaN"===e)return+e||(t.s=NaN),t.e=NaN,t.d=null,t;if(tZ.test(e))r=16,e=e.toLowerCase();else if(tL.test(e))r=2;else if(tq.test(e))r=8;else throw Error(tT+e);for((o=e.search(/p/i))>0?(u=+e.slice(o+1),e=e.substring(2,o)):e=e.slice(2),s=(o=e.indexOf("."))>=0,n=t.constructor,s&&(o=(a=(e=e.replace(".","")).length)-o,i=t5(n,new n(r),o,2*o)),o=f=(c=tK(e,r,1e7)).length-1;0===c[o];--o)c.pop();return o<0?new n(0*t.s):(t.e=t1(c,f),t.d=c,tC=!1,s&&(t=tX(t,i,4*a)),u&&(t=t.times(54>Math.abs(u)?tR(2,u):eH.pow(2,u))),tC=!0,t)}(this,t);if("bigint"===n)return t<0?(t=-t,this.s=-1):this.s=1,er(this,t.toString());throw Error(tT+t)}if(o.prototype=tW,o.ROUND_UP=0,o.ROUND_DOWN=1,o.ROUND_CEIL=2,o.ROUND_FLOOR=3,o.ROUND_HALF_UP=4,o.ROUND_HALF_DOWN=5,o.ROUND_HALF_EVEN=6,o.ROUND_HALF_CEIL=7,o.ROUND_HALF_FLOOR=8,o.EUCLID=9,o.config=o.set=eb,o.clone=t,o.isDecimal=eS,o.abs=eu,o.acos=ec,o.acosh=ef,o.add=el,o.asin=eh,o.asinh=ep,o.atan=ed,o.atanh=em,o.atan2=eg,o.cbrt=ev,o.ceil=ey,o.clamp=ew,o.cos=ex,o.cosh=e_,o.div=eN,o.exp=eM,o.floor=eE,o.hypot=eO,o.ln=eA,o.log=ej,o.log10=ez,o.log2=eF,o.max=eD,o.min=eC,o.mod=eB,o.mul=eT,o.pow=ek,o.random=e$,o.round=eP,o.sign=eI,o.sin=eR,o.sinh=eL,o.sqrt=eZ,o.sub=eq,o.sum=eU,o.tan=eG,o.tanh=eV,o.trunc=eW,void 0===e&&(e={}),e&&!0!==e.defaults)for(r=0,i=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"];r<i.length;)e.hasOwnProperty(n=i[r++])||(e[n]=this[n]);return o.config(e),o}(tD);tF=new eH(tF),tz=new eH(tz);var eJ={createBigNumberClass:Y("BigNumber",["?on","config"],t=>{var{on:e,config:r}=t,n=eH.clone({precision:r.precision,modulo:eH.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(t){return new n(t.value)},e&&e("config",function(t,e){t.precision!==e.precision&&n.config({precision:t.precision})}),n},{isClass:!0})},eY={createMatrixClass:Y("Matrix",[],()=>{function t(){if(!(this instanceof t))throw SyntaxError("Constructor must be called with the new operator")}return t.prototype.type="Matrix",t.prototype.isMatrix=!0,t.prototype.storage=function(){throw Error("Cannot invoke storage on a Matrix interface")},t.prototype.datatype=function(){throw Error("Cannot invoke datatype on a Matrix interface")},t.prototype.create=function(t,e){throw Error("Cannot invoke create on a Matrix interface")},t.prototype.subset=function(t,e,r){throw Error("Cannot invoke subset on a Matrix interface")},t.prototype.get=function(t){throw Error("Cannot invoke get on a Matrix interface")},t.prototype.set=function(t,e,r){throw Error("Cannot invoke set on a Matrix interface")},t.prototype.resize=function(t,e){throw Error("Cannot invoke resize on a Matrix interface")},t.prototype.reshape=function(t,e){throw Error("Cannot invoke reshape on a Matrix interface")},t.prototype.clone=function(){throw Error("Cannot invoke clone on a Matrix interface")},t.prototype.size=function(){throw Error("Cannot invoke size on a Matrix interface")},t.prototype.map=function(t,e){throw Error("Cannot invoke map on a Matrix interface")},t.prototype.forEach=function(t){throw Error("Cannot invoke forEach on a Matrix interface")},t.prototype[Symbol.iterator]=function(){throw Error("Cannot iterate a Matrix interface")},t.prototype.toArray=function(){throw Error("Cannot invoke toArray on a Matrix interface")},t.prototype.valueOf=function(){throw Error("Cannot invoke valueOf on a Matrix interface")},t.prototype.format=function(t){throw Error("Cannot invoke format on a Matrix interface")},t.prototype.toString=function(){throw Error("Cannot invoke toString on a Matrix interface")},t},{isClass:!0})},eK={MatrixDependencies:eY,createDenseMatrixClass:Y("DenseMatrix",["Matrix"],t=>{var{Matrix:e}=t;function r(t,e){if(!(this instanceof r))throw SyntaxError("Constructor must be called with the new operator");if(e&&!c(e))throw Error("Invalid datatype: "+e);if(l(t))"DenseMatrix"===t.type?(this._data=q(t._data),this._size=q(t._size)):(this._data=t.toArray(),this._size=t.size()),this._datatype=e||t._datatype;else if(t&&f(t.data)&&f(t.size))this._data=t.data,this._size=t.size,td(this._data,this._size),this._datatype=e||t.datatype;else if(f(t))this._data=function t(e){for(var r=0,n=e.length;r<n;r++){var i=e[r];f(i)?e[r]=t(i):i&&!0===i.isMatrix&&(e[r]=t(i.valueOf()))}return e}(t),this._size=tp(this._data),td(this._data,this._size),this._datatype=e;else if(t)throw TypeError("Unsupported type of data ("+Z(t)+")");else this._data=[],this._size=[0],this._datatype=e}function n(t,e,r){if(0===e.length){for(var n=t._data;f(n);)n=n[0];return n}return t._size=e.slice(0),t._data=tg(t._data,t._size,r),t}function s(t,e,r){for(var i=t._size.slice(0),o=!1;i.length<e.length;)i.push(0),o=!0;for(var s=0,a=e.length;s<a;s++)e[s]>i[s]&&(i[s]=e[s],o=!0);o&&n(t,i,r)}return r.prototype=new e,r.prototype.createDenseMatrix=function(t,e){return new r(t,e)},r.prototype.type="DenseMatrix",r.prototype.isDenseMatrix=!0,r.prototype.getDataType=function(){return tb(this._data,Z)},r.prototype.storage=function(){return"dense"},r.prototype.datatype=function(){return this._datatype},r.prototype.create=function(t,e){return new r(t,e)},r.prototype.subset=function(t,e,n){switch(arguments.length){case 1:return function(t,e){if(!g(e))throw TypeError("Invalid index");if(e.isScalar())return t.get(e.min());var n=e.size();if(n.length!==t._size.length)throw new tl(n.length,t._size.length);for(var i=e.min(),o=e.max(),s=0,a=t._size.length;s<a;s++)tm(i[s],t._size[s]),tm(o[s],t._size[s]);return new r(function t(e,r,n,i){var o=i===n-1,s=r.dimension(i);return o?s.map(function(t){return tm(t,e.length),e[t]}).valueOf():s.map(function(o){return tm(o,e.length),t(e[o],r,n,i+1)}).valueOf()}(t._data,e,n.length,0),t._datatype)}(this,t);case 2:case 3:return function(t,e,r,n){if(!e||!0!==e.isIndex)throw TypeError("Invalid index");var i,o=e.size(),a=e.isScalar();if(l(r)?(i=r.size(),r=r.valueOf()):i=tp(r),a){if(0!==i.length)throw TypeError("Scalar expected");t.set(e.min(),r,n)}else{if(o.length<t._size.length)throw new tl(o.length,t._size.length,"<");if(i.length<o.length){for(var u=0,c=0;1===o[u]&&1===i[u];)u++;for(;1===o[u];)c++,u++;r=tw(r,o.length,c,i)}if(!G(o,i))throw new tl(o,i,">");s(t,e.max().map(function(t){return t+1}),n);var f=o.length;(function t(e,r,n,i,o){var s=o===i-1,a=r.dimension(o);s?a.forEach(function(t,r){tm(t),e[t]=n[r[0]]}):a.forEach(function(s,a){tm(s),t(e[s],r,n[a[0]],i,o+1)})})(t._data,e,r,f,0)}return t}(this,t,e,n);default:throw SyntaxError("Wrong number of arguments")}},r.prototype.get=function(t){if(!f(t))throw TypeError("Array expected");if(t.length!==this._size.length)throw new tl(t.length,this._size.length);for(var e=0;e<t.length;e++)tm(t[e],this._size[e]);for(var r=this._data,n=0,i=t.length;n<i;n++){var o=t[n];tm(o,r.length),r=r[o]}return r},r.prototype.set=function(t,e,r){if(!f(t))throw TypeError("Array expected");if(t.length<this._size.length)throw new tl(t.length,this._size.length,"<");s(this,t.map(function(t){return t+1}),r);var n,i,o,a=this._data;for(n=0,i=t.length-1;n<i;n++)tm(o=t[n],a.length),a=a[o];return tm(o=t[t.length-1],a.length),a[o]=e,this},r.prototype.resize=function(t,e,r){if(!h(t))throw TypeError("Array or Matrix expected");var i=t.valueOf().map(t=>Array.isArray(t)&&1===t.length?t[0]:t);return n(r?this.clone():this,i,e)},r.prototype.reshape=function(t,e){var r=e?this.clone():this;r._data=function(t,e){var r=function(t){if(!Array.isArray(t))return t;var e=[];return t.forEach(function t(r){Array.isArray(r)?r.forEach(t):e.push(r)}),e}(t),n=r.length;if(!Array.isArray(t)||!Array.isArray(e))throw TypeError("Array expected");if(0===e.length)throw new tl(0,n,"!=");var i=ty(e=tv(e,n));if(n!==i)throw new tl(i,n,"!=");try{return function(t,e){for(var r,n=t,i=e.length-1;i>0;i--){var o=e[i];r=[];for(var s=n.length/o,a=0;a<s;a++)r.push(n.slice(a*o,(a+1)*o));n=r}return n}(r,e)}catch(t){if(t instanceof tl)throw new tl(i,n,"!=");throw t}}(r._data,t);var n=r._size.reduce((t,e)=>t*e);return r._size=tv(t,n),r},r.prototype.clone=function(){return new r({data:q(this._data),size:q(this._size),datatype:this._datatype})},r.prototype.size=function(){return this._size.slice(0)},r.prototype.map=function(t){var e=this,n=function r(n,i){return f(n)?n.map(function(t,e){return r(t,i.concat(e))}):t(n,i,e)}(this._data,[]),i=void 0!==this._datatype?tb(n,Z):void 0;return new r(n,i)},r.prototype.forEach=function(t){var e=this;!function r(n,i){f(n)?n.forEach(function(t,e){r(t,i.concat(e))}):t(n,i,e)}(this._data,[])},r.prototype[Symbol.iterator]=function*(){var t=function* t(e,r){if(f(e))for(var n=0;n<e.length;n++)yield*t(e[n],r.concat(n));else yield{value:e,index:r}};yield*t(this._data,[])},r.prototype.rows=function(){var t=[];if(2!==this.size().length)throw TypeError("Rows can only be returned for a 2D matrix.");for(var e of this._data)t.push(new r([e],this._datatype));return t},r.prototype.columns=function(){var t=this,e=[],n=this.size();if(2!==n.length)throw TypeError("Rows can only be returned for a 2D matrix.");for(var i=this._data,o=function(n){var o=i.map(t=>[t[n]]);e.push(new r(o,t._datatype))},s=0;s<n[1];s++)o(s);return e},r.prototype.toArray=function(){return q(this._data)},r.prototype.valueOf=function(){return this._data},r.prototype.format=function(t){return tf(this._data,t)},r.prototype.toString=function(){return tf(this._data)},r.prototype.toJSON=function(){return{mathjs:"DenseMatrix",data:this._data,size:this._size,datatype:this._datatype}},r.prototype.diagonal=function(t){if(t){if(o(t)&&(t=t.toNumber()),!i(t)||!Q(t))throw TypeError("The parameter k must be an integer number")}else t=0;for(var e=t>0?t:0,n=t<0?-t:0,s=Math.min(this._size[0]-n,this._size[1]-e),a=[],u=0;u<s;u++)a[u]=this._data[u+n][u+e];return new r({data:a,size:[s],datatype:this._datatype})},r.diagonal=function(t,e,n,s){if(!f(t))throw TypeError("Array expected, size parameter");if(2!==t.length)throw Error("Only two dimensions matrix are supported");if(t=t.map(function(t){if(o(t)&&(t=t.toNumber()),!i(t)||!Q(t)||t<1)throw Error("Size values must be positive integers");return t}),n){if(o(n)&&(n=n.toNumber()),!i(n)||!Q(n))throw TypeError("The parameter k must be an integer number")}else n=0;var a,u=n>0?n:0,c=n<0?-n:0,h=t[0],p=t[1],d=Math.min(h-c,p-u);if(f(e)){if(e.length!==d)throw Error("Invalid value array length");a=function(t){return e[t]}}else if(l(e)){var m=e.size();if(1!==m.length||m[0]!==d)throw Error("Invalid matrix length");a=function(t){return e.get([t])}}else a=function(){return e};s||(s=o(a(0))?a(0).mul(0):0);var g=[];if(t.length>0){g=tg(g,t,s);for(var v=0;v<d;v++)g[v+c][v+u]=a(v)}return new r({data:g,size:[h,p]})},r.fromJSON=function(t){return new r(t)},r.prototype.swapRows=function(t,e){if(!i(t)||!Q(t)||!i(e)||!Q(e))throw Error("Row index must be positive integers");if(2!==this._size.length)throw Error("Only two dimensional matrix is supported");return tm(t,this._size[0]),tm(e,this._size[0]),r._swapRows(t,e,this._data),this},r._swapRows=function(t,e,r){var n=r[t];r[t]=r[e],r[e]=n},r},{isClass:!0})};let eX=Math.cosh||function(t){return 1e-9>Math.abs(t)?1-t:(Math.exp(t)+Math.exp(-t))*.5},eQ=Math.sinh||function(t){return 1e-9>Math.abs(t)?t:(Math.exp(t)-Math.exp(-t))*.5},e0=function(t){let e=Math.PI/4;if(-e>t||t>e)return Math.cos(t)-1;let r=t*t;return r*(r*(r*(r*(r*(r*(r*(r/20922789888e3-1/0x144c3b2800)+1/0x1c8cfc00)-1/3628800)+1/40320)-1/720)+1/24)-.5)},e1=function(t,e){return((t=Math.abs(t))<(e=Math.abs(e))&&([t,e]=[e,t]),t<1e8)?Math.sqrt(t*t+e*e):(e/=t,t*Math.sqrt(1+e*e))},e2=function(){throw SyntaxError("Invalid Param")};function e4(t,e){let r=Math.abs(t),n=Math.abs(e);return 0===t?Math.log(n):0===e?Math.log(r):r<3e3&&n<3e3?.5*Math.log(t*t+e*e):.5*Math.log((t*=.5)*t+(e*=.5)*e)+Math.LN2}let e3={re:0,im:0},e9=function(t,e){if(null==t)e3.re=e3.im=0;else if(void 0!==e)e3.re=t,e3.im=e;else switch(typeof t){case"object":if("im"in t&&"re"in t)e3.re=t.re,e3.im=t.im;else if("abs"in t&&"arg"in t){if(!isFinite(t.abs)&&isFinite(t.arg))return e5.INFINITY;e3.re=t.abs*Math.cos(t.arg),e3.im=t.abs*Math.sin(t.arg)}else if("r"in t&&"phi"in t){if(!isFinite(t.r)&&isFinite(t.phi))return e5.INFINITY;e3.re=t.r*Math.cos(t.phi),e3.im=t.r*Math.sin(t.phi)}else 2===t.length?(e3.re=t[0],e3.im=t[1]):e2();break;case"string":e3.im=e3.re=0;let r=t.replace(/_/g,"").match(/\d+\.?\d*e[+-]?\d+|\d+\.?\d*|\.\d+|./g),n=1,i=0;null===r&&e2();for(let t=0;t<r.length;t++){let e=r[t];" "===e||" "===e||"\n"===e||("+"===e?n++:"-"===e?i++:("i"===e||"I"===e?(n+i===0&&e2()," "===r[t+1]||isNaN(r[t+1])?e3.im+=parseFloat((i%2?"-":"")+"1"):(e3.im+=parseFloat((i%2?"-":"")+r[t+1]),t++)):((n+i===0||isNaN(e))&&e2(),"i"===r[t+1]||"I"===r[t+1]?(e3.im+=parseFloat((i%2?"-":"")+e),t++):e3.re+=parseFloat((i%2?"-":"")+e)),n=i=0))}n+i>0&&e2();break;case"number":e3.im=0,e3.re=t;break;default:e2()}return isNaN(e3.re)||isNaN(e3.im),e3};function e5(t,e){if(!(this instanceof e5))return new e5(t,e);let r=e9(t,e);this.re=r.re,this.im=r.im}e5.prototype={re:0,im:0,sign:function(){let t=e1(this.re,this.im);return new e5(this.re/t,this.im/t)},add:function(t,e){let r=e9(t,e),n=this.isInfinite(),i=!(isFinite(r.re)&&isFinite(r.im));return n||i?n&&i?e5.NAN:e5.INFINITY:new e5(this.re+r.re,this.im+r.im)},sub:function(t,e){let r=e9(t,e),n=this.isInfinite(),i=!(isFinite(r.re)&&isFinite(r.im));return n||i?n&&i?e5.NAN:e5.INFINITY:new e5(this.re-r.re,this.im-r.im)},mul:function(t,e){let r=e9(t,e),n=this.isInfinite(),i=!(isFinite(r.re)&&isFinite(r.im)),o=0===this.re&&0===this.im,s=0===r.re&&0===r.im;return n&&s||i&&o?e5.NAN:n||i?e5.INFINITY:0===r.im&&0===this.im?new e5(this.re*r.re,0):new e5(this.re*r.re-this.im*r.im,this.re*r.im+this.im*r.re)},div:function(t,e){let r=e9(t,e),n=this.isInfinite(),i=!(isFinite(r.re)&&isFinite(r.im)),o=0===this.re&&0===this.im,s=0===r.re&&0===r.im;if(o&&s||n&&i)return e5.NAN;if(s||n)return e5.INFINITY;if(o||i)return e5.ZERO;if(0===r.im)return new e5(this.re/r.re,this.im/r.re);if(Math.abs(r.re)<Math.abs(r.im)){let t=r.re/r.im,e=r.re*t+r.im;return new e5((this.re*t+this.im)/e,(this.im*t-this.re)/e)}{let t=r.im/r.re,e=r.im*t+r.re;return new e5((this.re+this.im*t)/e,(this.im-this.re*t)/e)}},pow:function(t,e){let r=e9(t,e),n=0===this.re&&0===this.im;if(0===r.re&&0===r.im)return e5.ONE;if(0===r.im){if(0===this.im&&this.re>0)return new e5(Math.pow(this.re,r.re),0);if(0===this.re)switch((r.re%4+4)%4){case 0:return new e5(Math.pow(this.im,r.re),0);case 1:return new e5(0,Math.pow(this.im,r.re));case 2:return new e5(-Math.pow(this.im,r.re),0);case 3:return new e5(0,-Math.pow(this.im,r.re))}}if(n&&r.re>0)return e5.ZERO;let i=Math.atan2(this.im,this.re),o=e4(this.re,this.im),s=Math.exp(r.re*o-r.im*i),a=r.im*o+r.re*i;return new e5(s*Math.cos(a),s*Math.sin(a))},sqrt:function(){let t=this.re,e=this.im;if(0===e)return t>=0?new e5(Math.sqrt(t),0):new e5(0,Math.sqrt(-t));let r=Math.sqrt(.5*(e1(t,e)+Math.abs(t))),n=Math.abs(e)/(2*r);return t>=0?new e5(r,e<0?-n:n):new e5(n,e<0?-r:r)},exp:function(){let t=Math.exp(this.re);return 0===this.im?new e5(t,0):new e5(t*Math.cos(this.im),t*Math.sin(this.im))},expm1:function(){let t=this.re,e=this.im;return new e5(Math.expm1(t)*Math.cos(e)+e0(e),Math.exp(t)*Math.sin(e))},log:function(){let t=this.re,e=this.im;return 0===e&&t>0?new e5(Math.log(t),0):new e5(e4(t,e),Math.atan2(e,t))},abs:function(){return e1(this.re,this.im)},arg:function(){return Math.atan2(this.im,this.re)},sin:function(){let t=this.re,e=this.im;return new e5(Math.sin(t)*eX(e),Math.cos(t)*eQ(e))},cos:function(){let t=this.re,e=this.im;return new e5(Math.cos(t)*eX(e),-Math.sin(t)*eQ(e))},tan:function(){let t=2*this.re,e=2*this.im,r=Math.cos(t)+eX(e);return new e5(Math.sin(t)/r,eQ(e)/r)},cot:function(){let t=2*this.re,e=2*this.im,r=Math.cos(t)-eX(e);return new e5(-Math.sin(t)/r,eQ(e)/r)},sec:function(){let t=this.re,e=this.im,r=.5*eX(2*e)+.5*Math.cos(2*t);return new e5(Math.cos(t)*eX(e)/r,Math.sin(t)*eQ(e)/r)},csc:function(){let t=this.re,e=this.im,r=.5*eX(2*e)-.5*Math.cos(2*t);return new e5(Math.sin(t)*eX(e)/r,-Math.cos(t)*eQ(e)/r)},asin:function(){let t=this.re,e=this.im,r=new e5(e*e-t*t+1,-2*t*e).sqrt(),n=new e5(r.re-e,r.im+t).log();return new e5(n.im,-n.re)},acos:function(){let t=this.re,e=this.im,r=new e5(e*e-t*t+1,-2*t*e).sqrt(),n=new e5(r.re-e,r.im+t).log();return new e5(Math.PI/2-n.im,n.re)},atan:function(){let t=this.re,e=this.im;if(0===t){if(1===e)return new e5(0,1/0);if(-1===e)return new e5(0,-1/0)}let r=t*t+(1-e)*(1-e),n=new e5((1-e*e-t*t)/r,-2*t/r).log();return new e5(-.5*n.im,.5*n.re)},acot:function(){let t=this.re,e=this.im;if(0===e)return new e5(Math.atan2(1,t),0);let r=t*t+e*e;return 0!==r?new e5(t/r,-e/r).atan():new e5(0!==t?t/0:0,0!==e?-e/0:0).atan()},asec:function(){let t=this.re,e=this.im;if(0===t&&0===e)return new e5(0,1/0);let r=t*t+e*e;return 0!==r?new e5(t/r,-e/r).acos():new e5(0!==t?t/0:0,0!==e?-e/0:0).acos()},acsc:function(){let t=this.re,e=this.im;if(0===t&&0===e)return new e5(Math.PI/2,1/0);let r=t*t+e*e;return 0!==r?new e5(t/r,-e/r).asin():new e5(0!==t?t/0:0,0!==e?-e/0:0).asin()},sinh:function(){let t=this.re,e=this.im;return new e5(eQ(t)*Math.cos(e),eX(t)*Math.sin(e))},cosh:function(){let t=this.re,e=this.im;return new e5(eX(t)*Math.cos(e),eQ(t)*Math.sin(e))},tanh:function(){let t=2*this.re,e=2*this.im,r=eX(t)+Math.cos(e);return new e5(eQ(t)/r,Math.sin(e)/r)},coth:function(){let t=2*this.re,e=2*this.im,r=eX(t)-Math.cos(e);return new e5(eQ(t)/r,-Math.sin(e)/r)},csch:function(){let t=this.re,e=this.im,r=Math.cos(2*e)-eX(2*t);return new e5(-2*eQ(t)*Math.cos(e)/r,2*eX(t)*Math.sin(e)/r)},sech:function(){let t=this.re,e=this.im,r=Math.cos(2*e)+eX(2*t);return new e5(2*eX(t)*Math.cos(e)/r,-2*eQ(t)*Math.sin(e)/r)},asinh:function(){let t=this.im;this.im=-this.re,this.re=t;let e=this.asin();return this.re=-this.im,this.im=t,t=e.re,e.re=-e.im,e.im=t,e},acosh:function(){let t=this.acos();if(t.im<=0){let e=t.re;t.re=-t.im,t.im=e}else{let e=t.im;t.im=-t.re,t.re=e}return t},atanh:function(){let t=this.re,e=this.im,r=1-t,n=1+t,i=r*r+e*e,o=0!==i?new e5((n*r-e*e)/i,(e*r+n*e)/i):new e5(-1!==t?t/0:0,0!==e?e/0:0),s=o.re;return o.re=e4(o.re,o.im)/2,o.im=Math.atan2(o.im,s)/2,t>1&&0===e&&(o.im=-o.im),o},acoth:function(){let t=this.re,e=this.im;if(0===t&&0===e)return new e5(0,Math.PI/2);let r=t*t+e*e;return 0!==r?new e5(t/r,-e/r).atanh():new e5(0!==t?t/0:0,0!==e?-e/0:0).atanh()},acsch:function(){let t=this.re,e=this.im;if(0===e)return new e5(0!==t?Math.log(t+Math.sqrt(t*t+1)):1/0,0);let r=t*t+e*e;return 0!==r?new e5(t/r,-e/r).asinh():new e5(0!==t?t/0:0,0!==e?-e/0:0).asinh()},asech:function(){let t=this.re,e=this.im;if(this.isZero())return e5.INFINITY;let r=t*t+e*e;return 0!==r?new e5(t/r,-e/r).acosh():new e5(0!==t?t/0:0,0!==e?-e/0:0).acosh()},inverse:function(){if(this.isZero())return e5.INFINITY;if(this.isInfinite())return e5.ZERO;let t=this.re,e=this.im,r=t*t+e*e;return new e5(t/r,-e/r)},conjugate:function(){return new e5(this.re,-this.im)},neg:function(){return new e5(-this.re,-this.im)},ceil:function(t){return t=Math.pow(10,t||0),new e5(Math.ceil(this.re*t)/t,Math.ceil(this.im*t)/t)},floor:function(t){return t=Math.pow(10,t||0),new e5(Math.floor(this.re*t)/t,Math.floor(this.im*t)/t)},round:function(t){return t=Math.pow(10,t||0),new e5(Math.round(this.re*t)/t,Math.round(this.im*t)/t)},equals:function(t,e){let r=e9(t,e);return Math.abs(r.re-this.re)<=e5.EPSILON&&Math.abs(r.im-this.im)<=e5.EPSILON},clone:function(){return new e5(this.re,this.im)},toString:function(){let t=this.re,e=this.im,r="";return this.isNaN()?"NaN":this.isInfinite()?"Infinity":(Math.abs(t)<e5.EPSILON&&(t=0),Math.abs(e)<e5.EPSILON&&(e=0),0===e)?r+t:(0!==t?(r+=t,r+=" ",e<0?(e=-e,r+="-"):r+="+",r+=" "):e<0&&(e=-e,r+="-"),1!==e&&(r+=e),r+"i")},toVector:function(){return[this.re,this.im]},valueOf:function(){return 0===this.im?this.re:null},isNaN:function(){return isNaN(this.re)||isNaN(this.im)},isZero:function(){return 0===this.im&&0===this.re},isFinite:function(){return isFinite(this.re)&&isFinite(this.im)},isInfinite:function(){return!this.isFinite()}},e5.ZERO=new e5(0,0),e5.ONE=new e5(1,0),e5.I=new e5(0,1),e5.PI=new e5(Math.PI,0),e5.E=new e5(Math.E,0),e5.INFINITY=new e5(1/0,1/0),e5.NAN=new e5(NaN,NaN),e5.EPSILON=1e-15;var e8=Y("Complex",[],()=>(e5.prototype.type="Complex",e5.prototype.isComplex=!0,e5.prototype.toJSON=function(){return{mathjs:"Complex",re:this.re,im:this.im}},e5.prototype.toPolar=function(){return{r:this.abs(),phi:this.arg()}},e5.prototype.format=function(t){var e="",r=this.im,n=this.re,o=te(this.re,t),s=te(this.im,t),a=i(t)?t:t?t.precision:null;if(null!==a){var u=Math.pow(10,-a);Math.abs(n/r)<u&&(n=0),Math.abs(r/n)<u&&(r=0)}return 0===r?o:0===n?1===r?"i":-1===r?"-i":s+"i":r<0?-1===r?o+" - i":o+" - "+s.substring(1)+"i":1===r?o+" + i":o+" + "+s+"i"},e5.fromPolar=function(t){switch(arguments.length){case 1:var e=arguments[0];if("object"==typeof e)return e5(e);throw TypeError("Input has to be an object with r and phi keys.");case 2:var r=arguments[0],n=arguments[1];if(i(r)){if(u(n)&&n.hasBase("ANGLE")&&(n=n.toNumber("rad")),i(n))return new e5({r,phi:n});throw TypeError("Phi is not a number nor an angle unit.")}throw TypeError("Radius r is not a number.");default:throw SyntaxError("Wrong number of arguments in function fromPolar")}},e5.prototype.valueOf=e5.prototype.toString,e5.fromJSON=function(t){return new e5(t)},e5.compare=function(t,e){return t.re>e.re?1:t.re<e.re?-1:t.im>e.im?1:t.im<e.im?-1:0},e5),{isClass:!0}),e7={s:1,n:0,d:1};function e6(t,e){if(isNaN(t=parseInt(t,10)))throw rs();return t*e}function rt(t,e){if(0===e)throw ro();var r=Object.create(ri.prototype);r.s=t<0?-1:1;var n=rn(t=t<0?-t:t,e);return r.n=t/n,r.d=e/n,r}function re(t){for(var e={},r=t,n=2,i=4;i<=r;){for(;r%n==0;)r/=n,e[n]=(e[n]||0)+1;i+=1+2*n++}return r!==t?r>1&&(e[r]=(e[r]||0)+1):e[t]=(e[t]||0)+1,e}var rr=function(t,e){var r,n=0,i=1,o=1,s=0,a=0,u=0,c=1,f=1,l=0,h=1,p=1,d=1;if(null==t);else if(void 0!==e){if(o=(n=t)*(i=e),n%1!=0||i%1!=0)throw ra()}else switch(typeof t){case"object":if("d"in t&&"n"in t)n=t.n,i=t.d,"s"in t&&(n*=t.s);else if(0 in t)n=t[0],1 in t&&(i=t[1]);else throw rs();o=n*i;break;case"number":if(t<0&&(o=t,t=-t),t%1==0)n=t;else if(t>0){for(t>=1&&(f=Math.pow(10,Math.floor(1+Math.log(t)/Math.LN10)),t/=f);h<=1e7&&d<=1e7;){if(t===(r=(l+p)/(h+d))){h+d<=1e7?(n=l+p,i=h+d):d>h?(n=p,i=d):(n=l,i=h);break}t>r?(l+=p,h+=d):(p+=l,d+=h),h>1e7?(n=p,i=d):(n=l,i=h)}n*=f}else(isNaN(t)||isNaN(e))&&(i=n=NaN);break;case"string":if(null===(h=t.match(/\d+|./g)))throw rs();if("-"===h[l]?(o=-1,l++):"+"===h[l]&&l++,h.length===l+1?a=e6(h[l++],o):"."===h[l+1]||"."===h[l]?("."!==h[l]&&(s=e6(h[l++],o)),(++l+1===h.length||"("===h[l+1]&&")"===h[l+3]||"'"===h[l+1]&&"'"===h[l+3])&&(a=e6(h[l],o),c=Math.pow(10,h[l].length),l++),("("===h[l]&&")"===h[l+2]||"'"===h[l]&&"'"===h[l+2])&&(u=e6(h[l+1],o),f=Math.pow(10,h[l+1].length)-1,l+=3)):"/"===h[l+1]||":"===h[l+1]?(a=e6(h[l],o),c=e6(h[l+2],1),l+=3):"/"===h[l+3]&&" "===h[l+1]&&(s=e6(h[l],o),a=e6(h[l+2],o),c=e6(h[l+4],1),l+=5),h.length<=l){o=n=u+(i=c*f)*s+f*a;break}default:throw rs()}if(0===i)throw ro();e7.s=o<0?-1:1,e7.n=Math.abs(n),e7.d=Math.abs(i)};function rn(t,e){if(!t)return e;if(!e)return t;for(;;){if(!(t%=e))return e;if(!(e%=t))return t}}function ri(t,e){if(rr(t,e),!(this instanceof ri))return rt(e7.s*e7.n,e7.d);t=rn(e7.d,e7.n),this.s=e7.s,this.n=e7.n/t,this.d=e7.d/t}var ro=function(){return Error("Division by Zero")},rs=function(){return Error("Invalid argument")},ra=function(){return Error("Parameters must be integer")};ri.prototype={s:1,n:0,d:1,abs:function(){return rt(this.n,this.d)},neg:function(){return rt(-this.s*this.n,this.d)},add:function(t,e){return rr(t,e),rt(this.s*this.n*e7.d+e7.s*this.d*e7.n,this.d*e7.d)},sub:function(t,e){return rr(t,e),rt(this.s*this.n*e7.d-e7.s*this.d*e7.n,this.d*e7.d)},mul:function(t,e){return rr(t,e),rt(this.s*e7.s*this.n*e7.n,this.d*e7.d)},div:function(t,e){return rr(t,e),rt(this.s*e7.s*this.n*e7.d,this.d*e7.n)},clone:function(){return rt(this.s*this.n,this.d)},mod:function(t,e){if(isNaN(this.n)||isNaN(this.d))return new ri(NaN);if(void 0===t)return rt(this.s*this.n%this.d,1);if(rr(t,e),0===e7.n&&0===this.d)throw ro();return rt(this.s*(e7.d*this.n)%(e7.n*this.d),e7.d*this.d)},gcd:function(t,e){return rr(t,e),rt(rn(e7.n,this.n)*rn(e7.d,this.d),e7.d*this.d)},lcm:function(t,e){return(rr(t,e),0===e7.n&&0===this.n)?rt(0,1):rt(e7.n*this.n,rn(e7.n,this.n)*rn(e7.d,this.d))},ceil:function(t){return(t=Math.pow(10,t||0),isNaN(this.n)||isNaN(this.d))?new ri(NaN):rt(Math.ceil(t*this.s*this.n/this.d),t)},floor:function(t){return(t=Math.pow(10,t||0),isNaN(this.n)||isNaN(this.d))?new ri(NaN):rt(Math.floor(t*this.s*this.n/this.d),t)},round:function(t){return(t=Math.pow(10,t||0),isNaN(this.n)||isNaN(this.d))?new ri(NaN):rt(Math.round(t*this.s*this.n/this.d),t)},roundTo:function(t,e){return rr(t,e),rt(this.s*Math.round(this.n*e7.d/(this.d*e7.n))*e7.n,e7.d)},inverse:function(){return rt(this.s*this.d,this.n)},pow:function(t,e){if(rr(t,e),1===e7.d)return e7.s<0?rt(Math.pow(this.s*this.d,e7.n),Math.pow(this.n,e7.n)):rt(Math.pow(this.s*this.n,e7.n),Math.pow(this.d,e7.n));if(this.s<0)return null;var r=re(this.n),n=re(this.d),i=1,o=1;for(var s in r)if("1"!==s){if("0"===s){i=0;break}if(r[s]*=e7.n,r[s]%e7.d!=0)return null;r[s]/=e7.d,i*=Math.pow(s,r[s])}for(var s in n)if("1"!==s){if(n[s]*=e7.n,n[s]%e7.d!=0)return null;n[s]/=e7.d,o*=Math.pow(s,n[s])}return e7.s<0?rt(o,i):rt(i,o)},equals:function(t,e){return rr(t,e),this.s*this.n*e7.d==e7.s*e7.n*this.d},compare:function(t,e){rr(t,e);var r=this.s*this.n*e7.d-e7.s*e7.n*this.d;return(0<r)-(r<0)},simplify:function(t){if(isNaN(this.n)||isNaN(this.d))return this;t=t||.001;for(var e=this.abs(),r=e.toContinued(),n=1;n<r.length;n++){for(var i=rt(r[n-1],1),o=n-2;o>=0;o--)i=i.inverse().add(r[o]);if(Math.abs(i.sub(e).valueOf())<t)return i.mul(this.s)}return this},divisible:function(t,e){return rr(t,e),!(!(e7.n*this.d)||this.n*e7.d%(e7.n*this.d))},valueOf:function(){return this.s*this.n/this.d},toFraction:function(t){var e,r="",n=this.n,i=this.d;return this.s<0&&(r+="-"),1===i?r+=n:(t&&(e=Math.floor(n/i))>0&&(r+=e,r+=" ",n%=i),r+=n,r+="/",r+=i),r},toLatex:function(t){var e,r="",n=this.n,i=this.d;return this.s<0&&(r+="-"),1===i?r+=n:(t&&(e=Math.floor(n/i))>0&&(r+=e,n%=i),r+="\\frac{",r+=n,r+="}{",r+=i,r+="}"),r},toContinued:function(){var t,e=this.n,r=this.d,n=[];if(isNaN(e)||isNaN(r))return n;do n.push(Math.floor(e/r)),t=e%r,e=r,r=t;while(1!==e);return n},toString:function(t){var e=this.n,r=this.d;if(isNaN(e)||isNaN(r))return"NaN";t=t||15;var n=function(t,e){for(;e%2==0;e/=2);for(;e%5==0;e/=5);if(1===e)return 0;for(var r=10%e,n=1;1!==r;n++)if(r=10*r%e,n>2e3)return 0;return n}(0,r),i=function(t,e,r){for(var n=1,i=function(t,e,r){for(var n=1;e>0;t=t*t%r,e>>=1)1&e&&(n=n*t%r);return n}(10,r,e),o=0;o<300;o++){if(n===i)return o;n=10*n%e,i=10*i%e}return 0}(0,r,n),o=this.s<0?"-":"";if(o+=e/r|0,e%=r,(e*=10)&&(o+="."),n){for(var s=i;s--;)o+=e/r|0,e%=r,e*=10;o+="(";for(var s=n;s--;)o+=e/r|0,e%=r,e*=10;o+=")"}else for(var s=t;e&&s--;)o+=e/r|0,e%=r,e*=10;return o}};var ru=Y("Fraction",[],()=>(ri.prototype.type="Fraction",ri.prototype.isFraction=!0,ri.prototype.toJSON=function(){return{mathjs:"Fraction",n:this.s*this.n,d:this.d}},ri.fromJSON=function(t){return new ri(t)},ri),{isClass:!0}),rc=r(27554);function rf(t,e){return!!t&&"object"==typeof t&&(!!W(rh,e)||!(e in Object.prototype)&&!(e in Function.prototype))}function rl(t){return"object"==typeof t&&t&&t.constructor===Object}var rh={length:!0,name:!0},rp={toString:!0,valueOf:!0,toLocaleString:!0};class rd{constructor(t){this.wrappedObject=t}keys(){return Object.keys(this.wrappedObject)}get(t){return function(t,e){var r,n;if(rl(t)&&rf(t,e))return t[e];if("function"==typeof t[e]&&(r=t,n=e,!(null==r||"function"!=typeof r[n]||W(r,n)&&Object.getPrototypeOf&&n in Object.getPrototypeOf(r))&&(W(rp,n)||!(n in Object.prototype)&&!(n in Function.prototype))))throw Error('Cannot access method "'+e+'" as a property');throw Error('No access to property "'+e+'"')}(this.wrappedObject,t)}set(t,e){return!function(t,e,r){if(rl(t)&&rf(t,e))return t[e]=r;throw Error('No access to property "'+e+'"')}(this.wrappedObject,t,e),this}has(t){return t in this.wrappedObject}}function rm(t){return!!t&&(t instanceof Map||t instanceof rd||"function"==typeof t.set&&"function"==typeof t.get&&"function"==typeof t.keys&&"function"==typeof t.has)}var rg=function(){return rg=rc.create,rc};function rv(t){throw Error("Cannot convert value ".concat(t," into a BigNumber: no class 'BigNumber' provided"))}function ry(t){throw Error("Cannot convert value ".concat(t," into a Complex number: no class 'Complex' provided"))}function rw(t){throw Error("Cannot convert value ".concat(t," into a Fraction, no class 'Fraction' provided."))}var rb={BigNumberDependencies:eJ,ComplexDependencies:{createComplexClass:e8},DenseMatrixDependencies:eK,FractionDependencies:{createFractionClass:ru},createTyped:Y("typed",["?BigNumber","?Complex","?DenseMatrix","?Fraction"],function(t){var{BigNumber:e,Complex:r,DenseMatrix:n,Fraction:h}=t,Z=rg();return Z.types=[{name:"number",test:i},{name:"Complex",test:s},{name:"BigNumber",test:o},{name:"Fraction",test:a},{name:"Unit",test:u},{name:"string",test:c},{name:"Chain",test:L},{name:"Array",test:f},{name:"Matrix",test:l},{name:"DenseMatrix",test:p},{name:"SparseMatrix",test:d},{name:"Range",test:m},{name:"Index",test:g},{name:"boolean",test:v},{name:"ResultSet",test:y},{name:"Help",test:w},{name:"function",test:b},{name:"Date",test:x},{name:"RegExp",test:_},{name:"null",test:M},{name:"undefined",test:E},{name:"AccessorNode",test:O},{name:"ArrayNode",test:S},{name:"AssignmentNode",test:A},{name:"BlockNode",test:j},{name:"ConditionalNode",test:F},{name:"ConstantNode",test:z},{name:"FunctionNode",test:C},{name:"FunctionAssignmentNode",test:D},{name:"IndexNode",test:B},{name:"Node",test:T},{name:"ObjectNode",test:k},{name:"OperatorNode",test:$},{name:"ParenthesisNode",test:P},{name:"RangeNode",test:I},{name:"SymbolNode",test:R},{name:"Map",test:rm},{name:"Object",test:N}],Z.conversions=[{from:"number",to:"BigNumber",convert:function(t){if(e||rv(t),t.toExponential().replace(/e.*$/,"").replace(/^0\.?0*|\./,"").length>15)throw TypeError("Cannot implicitly convert a number with >15 significant digits to BigNumber (value: "+t+"). Use function bignumber(x) to convert to BigNumber.");return new e(t)}},{from:"number",to:"Complex",convert:function(t){return r||ry(t),new r(t,0)}},{from:"number",to:"string",convert:function(t){return t+""}},{from:"BigNumber",to:"Complex",convert:function(t){return r||ry(t),new r(t.toNumber(),0)}},{from:"Fraction",to:"BigNumber",convert:function(t){throw TypeError("Cannot implicitly convert a Fraction to BigNumber or vice versa. Use function bignumber(x) to convert to BigNumber or fraction(x) to convert to Fraction.")}},{from:"Fraction",to:"Complex",convert:function(t){return r||ry(t),new r(t.valueOf(),0)}},{from:"number",to:"Fraction",convert:function(t){h||rw(t);var e=new h(t);if(e.valueOf()!==t)throw TypeError("Cannot implicitly convert a number to a Fraction when there will be a loss of precision (value: "+t+"). Use function fraction(x) to convert to Fraction.");return e}},{from:"string",to:"number",convert:function(t){var e=Number(t);if(isNaN(e))throw Error('Cannot convert "'+t+'" to a number');return e}},{from:"string",to:"BigNumber",convert:function(t){e||rv(t);try{return new e(t)}catch(e){throw Error('Cannot convert "'+t+'" to BigNumber')}}},{from:"string",to:"Fraction",convert:function(t){h||rw(t);try{return new h(t)}catch(e){throw Error('Cannot convert "'+t+'" to Fraction')}}},{from:"string",to:"Complex",convert:function(t){r||ry(t);try{return new r(t)}catch(e){throw Error('Cannot convert "'+t+'" to Complex')}}},{from:"boolean",to:"number",convert:function(t){return+t}},{from:"boolean",to:"BigNumber",convert:function(t){return e||rv(t),new e(+t)}},{from:"boolean",to:"Fraction",convert:function(t){return h||rw(t),new h(+t)}},{from:"boolean",to:"string",convert:function(t){return String(t)}},{from:"Array",to:"Matrix",convert:function(t){return n||function(){throw Error("Cannot convert array into a Matrix: no class 'DenseMatrix' provided")}(),new n(t)}},{from:"Matrix",to:"Array",convert:function(t){return t.valueOf()}}],Z})},rx="equalScalar",r_=Y(rx,["typed","config"],t=>{var{typed:e,config:r}=t;return e(rx,{"boolean, boolean":function(t,e){return t===e},"number, number":function(t,e){return ta(t,e,r.epsilon)},"BigNumber, BigNumber":function(t,e){return t.eq(e)||function(t,e,r){if(null==r)return t.eq(e);if(t.eq(e))return!0;if(t.isNaN()||e.isNaN())return!1;if(t.isFinite()&&e.isFinite()){var n=t.minus(e).abs();if(n.isZero())return!0;var i=t.constructor.max(t.abs(),e.abs());return n.lte(i.times(r))}return!1}(t,e,r.epsilon)},"Fraction, Fraction":function(t,e){return t.equals(e)},"Complex, Complex":function(t,e){var n;return n=r.epsilon,ta(t.re,e.re,n)&&ta(t.im,e.im,n)},"Unit, Unit":function(t,e){if(!t.equalBase(e))throw Error("Cannot compare units with different base");return this(t.value,e.value)}})});Y(rx,["typed","config"],t=>{var{typed:e,config:r}=t;return e(rx,{"number, number":function(t,e){return ta(t,e,r.epsilon)}})});var rN={typedDependencies:rb,createEqualScalar:r_},rM=Y("SparseMatrix",["typed","equalScalar","Matrix"],t=>{var{typed:e,equalScalar:r,Matrix:n}=t;function s(t,e){if(!(this instanceof s))throw SyntaxError("Constructor must be called with the new operator");if(e&&!c(e))throw Error("Invalid datatype: "+e);if(l(t)){var r,n,i;r=this,n=t,i=e,"SparseMatrix"===n.type?(r._values=n._values?q(n._values):void 0,r._index=q(n._index),r._ptr=q(n._ptr),r._size=q(n._size),r._datatype=i||n._datatype):a(r,n.valueOf(),i||n._datatype)}else if(t&&f(t.index)&&f(t.ptr)&&f(t.size))this._values=t.values,this._index=t.index,this._ptr=t.ptr,this._size=t.size,this._datatype=e||t.datatype;else if(f(t))a(this,t,e);else if(t)throw TypeError("Unsupported type of data ("+Z(t)+")");else this._values=[],this._index=[],this._ptr=[0],this._size=[0,0],this._datatype=e}function a(t,n,i){t._values=[],t._index=[],t._ptr=[],t._datatype=i;var o=n.length,s=0,a=r,u=0;if(c(i)&&(a=e.find(r,[i,i])||r,u=e.convert(0,i)),o>0){var l=0;do{t._ptr.push(t._index.length);for(var h=0;h<o;h++){var p=n[h];if(f(p)){if(0===l&&s<p.length&&(s=p.length),l<p.length){var d=p[l];a(d,u)||(t._values.push(d),t._index.push(h))}}else 0===l&&s<1&&(s=1),a(p,u)||(t._values.push(p),t._index.push(h))}l++}while(l<s)}t._ptr.push(t._index.length),t._size=[o,s]}function u(t,e,r,n){if(r-e==0)return r;for(var i=e;i<r;i++)if(n[i]===t)return i;return e}function p(t,e,r,n,i,o,s){i.splice(t,0,n),o.splice(t,0,e);for(var a=r+1;a<s.length;a++)s[a]++}function d(t,n,i,o){var s,a,u,f=o||0,l=r,h=0;c(t._datatype)&&(l=e.find(r,[t._datatype,t._datatype])||r,h=e.convert(0,t._datatype),f=e.convert(f,t._datatype));var p=!l(f,h),d=t._size[0],m=t._size[1];if(i>m){for(a=m;a<i;a++)if(t._ptr[a]=t._values.length,p)for(s=0;s<d;s++)t._values.push(f),t._index.push(s);t._ptr[i]=t._values.length}else i<m&&(t._ptr.splice(i+1,m-i),t._values.splice(t._ptr[i],t._values.length),t._index.splice(t._ptr[i],t._index.length));if(m=i,n>d){if(p){var g=0;for(a=0;a<m;a++){t._ptr[a]=t._ptr[a]+g,u=t._ptr[a+1]+g;var v=0;for(s=d;s<n;s++,v++)t._values.splice(u+v,0,f),t._index.splice(u+v,0,s),g++}t._ptr[m]=t._values.length}}else if(n<d){var y=0;for(a=0;a<m;a++){t._ptr[a]=t._ptr[a]-y;var w=t._ptr[a],b=t._ptr[a+1]-y;for(u=w;u<b;u++)(s=t._index[u])>n-1&&(t._values.splice(u,1),t._index.splice(u,1),y++)}t._ptr[a]=t._values.length}return t._size[0]=n,t._size[1]=i,t}function m(t,e,r,n,i){var o,s,a=n[0],u=n[1],c=[];for(o=0;o<a;o++)for(s=0,c[o]=[];s<u;s++)c[o][s]=0;for(s=0;s<u;s++)for(var f=r[s],l=r[s+1],h=f;h<l;h++)c[o=e[h]][s]=t?i?q(t[h]):t[h]:1;return c}return s.prototype=new n,s.prototype.createSparseMatrix=function(t,e){return new s(t,e)},s.prototype.type="SparseMatrix",s.prototype.isSparseMatrix=!0,s.prototype.getDataType=function(){return tb(this._values,Z)},s.prototype.storage=function(){return"sparse"},s.prototype.datatype=function(){return this._datatype},s.prototype.create=function(t,e){return new s(t,e)},s.prototype.density=function(){var t=this._size[0],e=this._size[1];return 0!==t&&0!==e?this._index.length/(t*e):0},s.prototype.subset=function(t,e,r){if(!this._values)throw Error("Cannot invoke subset on a Pattern only matrix");switch(arguments.length){case 1:return function(t,e){if(!g(e))throw TypeError("Invalid index");if(e.isScalar())return t.get(e.min());var r,n,i,o,a=e.size();if(a.length!==t._size.length)throw new tl(a.length,t._size.length);var u=e.min(),c=e.max();for(r=0,n=t._size.length;r<n;r++)tm(u[r],t._size[r]),tm(c[r],t._size[r]);var f=t._values,l=t._index,h=t._ptr,p=e.dimension(0),d=e.dimension(1),m=[],v=[];p.forEach(function(t,e){v[t]=e[0],m[t]=!0});var y=f?[]:void 0,w=[],b=[];return d.forEach(function(t){for(b.push(w.length),i=h[t],o=h[t+1];i<o;i++)!0===m[r=l[i]]&&(w.push(v[r]),y&&y.push(f[i]))}),b.push(w.length),new s({values:y,index:w,ptr:b,size:a,datatype:t._datatype})}(this,t);case 2:case 3:return function(t,e,r,n){if(!e||!0!==e.isIndex)throw TypeError("Invalid index");var i,o=e.size(),s=e.isScalar();if(l(r)?(i=r.size(),r=r.toArray()):i=tp(r),s){if(0!==i.length)throw TypeError("Scalar expected");t.set(e.min(),r,n)}else{if(1!==o.length&&2!==o.length)throw new tl(o.length,t._size.length,"<");if(i.length<o.length){for(var a=0,u=0;1===o[a]&&1===i[a];)a++;for(;1===o[a];)u++,a++;r=tw(r,o.length,u,i)}if(!G(o,i))throw new tl(o,i,">");if(1===o.length)e.dimension(0).forEach(function(e,i){tm(e),t.set([e,0],r[i[0]],n)});else{var c=e.dimension(0),f=e.dimension(1);c.forEach(function(e,i){tm(e),f.forEach(function(o,s){tm(o),t.set([e,o],r[i[0]][s[0]],n)})})}}return t}(this,t,e,r);default:throw SyntaxError("Wrong number of arguments")}},s.prototype.get=function(t){if(!f(t))throw TypeError("Array expected");if(t.length!==this._size.length)throw new tl(t.length,this._size.length);if(!this._values)throw Error("Cannot invoke get on a Pattern only matrix");var e=t[0],r=t[1];tm(e,this._size[0]),tm(r,this._size[1]);var n=u(e,this._ptr[r],this._ptr[r+1],this._index);return n<this._ptr[r+1]&&this._index[n]===e?this._values[n]:0},s.prototype.set=function(t,n,i){if(!f(t))throw TypeError("Array expected");if(t.length!==this._size.length)throw new tl(t.length,this._size.length);if(!this._values)throw Error("Cannot invoke set on a Pattern only matrix");var o=t[0],s=t[1],a=this._size[0],l=this._size[1],h=r,m=0;c(this._datatype)&&(h=e.find(r,[this._datatype,this._datatype])||r,m=e.convert(0,this._datatype)),(o>a-1||s>l-1)&&(d(this,Math.max(o+1,a),Math.max(s+1,l),i),a=this._size[0],l=this._size[1]),tm(o,a),tm(s,l);var g=u(o,this._ptr[s],this._ptr[s+1],this._index);return g<this._ptr[s+1]&&this._index[g]===o?h(n,m)?function(t,e,r,n,i){r.splice(t,1),n.splice(t,1);for(var o=e+1;o<i.length;o++)i[o]--}(g,s,this._values,this._index,this._ptr):this._values[g]=n:p(g,o,s,n,this._values,this._index,this._ptr),this},s.prototype.resize=function(t,e,r){if(!h(t))throw TypeError("Array or Matrix expected");var n=t.valueOf().map(t=>Array.isArray(t)&&1===t.length?t[0]:t);if(2!==n.length)throw Error("Only two dimensions matrix are supported");return n.forEach(function(t){if(!i(t)||!Q(t)||t<0)throw TypeError("Invalid size, must contain positive integers (size: "+tf(n)+")")}),d(r?this.clone():this,n[0],n[1],e)},s.prototype.reshape=function(t,e){if(!f(t))throw TypeError("Array expected");if(2!==t.length)throw Error("Sparse matrices can only be reshaped in two dimensions");t.forEach(function(e){if(!i(e)||!Q(e)||e<=-2||0===e)throw TypeError("Invalid size, must contain positive integers or -1 (size: "+tf(t)+")")});var r=this._size[0]*this._size[1],n=(t=tv(t,r))[0]*t[1];if(r!==n)throw Error("Reshaping sparse matrix will result in the wrong number of elements");var o=e?this.clone():this;if(this._size[0]===t[0]&&this._size[1]===t[1])return o;for(var s=[],a=0;a<o._ptr.length;a++)for(var c=0;c<o._ptr[a+1]-o._ptr[a];c++)s.push(a);for(var l=o._values.slice(),h=o._index.slice(),d=0;d<o._index.length;d++){var m=h[d],g=s[d],v=m*o._size[1]+g;s[d]=v%t[1],h[d]=Math.floor(v/t[1])}o._values.length=0,o._index.length=0,o._ptr.length=t[1]+1,o._size=t.slice();for(var y=0;y<o._ptr.length;y++)o._ptr[y]=0;for(var w=0;w<l.length;w++){var b=h[w],x=s[w],_=l[w];p(u(b,o._ptr[x],o._ptr[x+1],o._index),b,x,_,o._values,o._index,o._ptr)}return o},s.prototype.clone=function(){return new s({values:this._values?q(this._values):void 0,index:q(this._index),ptr:q(this._ptr),size:q(this._size),datatype:this._datatype})},s.prototype.size=function(){return this._size.slice(0)},s.prototype.map=function(t,n){if(!this._values)throw Error("Cannot invoke map on a Pattern only matrix");var i=this;return function(t,n,i,o,a,u,f){var l=[],h=[],p=[],d=r,m=0;c(t._datatype)&&(d=e.find(r,[t._datatype,t._datatype])||r,m=e.convert(0,t._datatype));for(var g=function(t,e,r){t=u(t,e,r),d(t,m)||(l.push(t),h.push(e))},v=0;v<=a;v++){p.push(l.length);var y=t._ptr[v],w=t._ptr[v+1];if(f)for(var b=y;b<w;b++){var x=t._index[b];x>=0&&x<=i&&g(t._values[b],x-n,v-o)}else{for(var _={},N=y;N<w;N++)_[t._index[N]]=t._values[N];for(var M=n;M<=i;M++)g(M in _?_[M]:0,M-n,v-o)}}return p.push(l.length),new s({values:l,index:h,ptr:p,size:[i-n+1,a-o+1]})}(this,0,this._size[0]-1,0,this._size[1]-1,function(e,r,n){return t(e,[r,n],i)},n)},s.prototype.forEach=function(t,e){if(!this._values)throw Error("Cannot invoke forEach on a Pattern only matrix");for(var r=this._size[0],n=this._size[1],i=0;i<n;i++){var o=this._ptr[i],s=this._ptr[i+1];if(e)for(var a=o;a<s;a++){var u=this._index[a];t(this._values[a],[u,i],this)}else{for(var c={},f=o;f<s;f++)c[this._index[f]]=this._values[f];for(var l=0;l<r;l++)t(l in c?c[l]:0,[l,i],this)}}},s.prototype[Symbol.iterator]=function*(){if(!this._values)throw Error("Cannot iterate a Pattern only matrix");for(var t=this._size[1],e=0;e<t;e++)for(var r=this._ptr[e],n=this._ptr[e+1],i=r;i<n;i++){var o=this._index[i];yield{value:this._values[i],index:[o,e]}}},s.prototype.toArray=function(){return m(this._values,this._index,this._ptr,this._size,!0)},s.prototype.valueOf=function(){return m(this._values,this._index,this._ptr,this._size,!1)},s.prototype.format=function(t){for(var e=this._size[0],r=this._size[1],n=this.density(),i="Sparse Matrix ["+tf(e,t)+" x "+tf(r,t)+"] density: "+tf(n,t)+"\n",o=0;o<r;o++)for(var s=this._ptr[o],a=this._ptr[o+1],u=s;u<a;u++)i+="\n ("+tf(this._index[u],t)+", "+tf(o,t)+") ==> "+(this._values?tf(this._values[u],t):"X");return i},s.prototype.toString=function(){return tf(this.toArray())},s.prototype.toJSON=function(){return{mathjs:"SparseMatrix",values:this._values,index:this._index,ptr:this._ptr,size:this._size,datatype:this._datatype}},s.prototype.diagonal=function(t){if(t){if(o(t)&&(t=t.toNumber()),!i(t)||!Q(t))throw TypeError("The parameter k must be an integer number")}else t=0;var e=t>0?t:0,r=t<0?-t:0,n=this._size[0],a=this._size[1],u=Math.min(n-r,a-e),c=[],f=[],l=[];l[0]=0;for(var h=e;h<a&&c.length<u;h++)for(var p=this._ptr[h],d=this._ptr[h+1],m=p;m<d;m++){var g=this._index[m];if(g===h-e+r){c.push(this._values[m]),f[c.length-1]=g-r;break}}return l.push(c.length),new s({values:c,index:f,ptr:l,size:[u,1]})},s.fromJSON=function(t){return new s(t)},s.diagonal=function(t,n,a,u,h){if(!f(t))throw TypeError("Array expected, size parameter");if(2!==t.length)throw Error("Only two dimensions matrix are supported");if(t=t.map(function(t){if(o(t)&&(t=t.toNumber()),!i(t)||!Q(t)||t<1)throw Error("Size values must be positive integers");return t}),a){if(o(a)&&(a=a.toNumber()),!i(a)||!Q(a))throw TypeError("The parameter k must be an integer number")}else a=0;var p,d=r,m=0;c(h)&&(d=e.find(r,[h,h])||r,m=e.convert(0,h));var g=a>0?a:0,v=a<0?-a:0,y=t[0],w=t[1],b=Math.min(y-v,w-g);if(f(n)){if(n.length!==b)throw Error("Invalid value array length");p=function(t){return n[t]}}else if(l(n)){var x=n.size();if(1!==x.length||x[0]!==b)throw Error("Invalid matrix length");p=function(t){return n.get([t])}}else p=function(){return n};for(var _=[],N=[],M=[],E=0;E<w;E++){M.push(_.length);var O=E-g;if(O>=0&&O<b){var S=p(O);d(S,m)||(N.push(O+v),_.push(S))}}return M.push(_.length),new s({values:_,index:N,ptr:M,size:[y,w]})},s.prototype.swapRows=function(t,e){if(!i(t)||!Q(t)||!i(e)||!Q(e))throw Error("Row index must be positive integers");if(2!==this._size.length)throw Error("Only two dimensional matrix is supported");return tm(t,this._size[0]),tm(e,this._size[0]),s._swapRows(t,e,this._size[1],this._values,this._index,this._ptr),this},s._forEachRow=function(t,e,r,n,i){for(var o=n[t],s=n[t+1],a=o;a<s;a++)i(r[a],e[a])},s._swapRows=function(t,e,r,n,i,o){for(var s=0;s<r;s++){var a=o[s],c=o[s+1],f=u(t,a,c,i),l=u(e,a,c,i);if(f<c&&l<c&&i[f]===t&&i[l]===e){if(n){var h=n[f];n[f]=n[l],n[l]=h}continue}if(f<c&&i[f]===t&&(l>=c||i[l]!==e)){var p=n?n[f]:void 0;i.splice(l,0,e),n&&n.splice(l,0,p),i.splice(l<=f?f+1:f,1),n&&n.splice(l<=f?f+1:f,1);continue}if(l<c&&i[l]===e&&(f>=c||i[f]!==t)){var d=n?n[l]:void 0;i.splice(f,0,t),n&&n.splice(f,0,d),i.splice(f<=l?l+1:l,1),n&&n.splice(f<=l?l+1:l,1)}}},s},{isClass:!0}),rE="matrix",rO=Y(rE,["typed","Matrix","DenseMatrix","SparseMatrix"],t=>{var{typed:e,Matrix:r,DenseMatrix:n,SparseMatrix:i}=t;return e(rE,{"":function(){return o([])},string:function(t){return o([],t)},"string, string":function(t,e){return o([],t,e)},Array:function(t){return o(t)},Matrix:function(t){return o(t,t.storage())},"Array | Matrix, string":o,"Array | Matrix, string, string":o});function o(t,e,r){if("dense"===e||"default"===e||void 0===e)return new n(t,r);if("sparse"===e)return new i(t,r);throw TypeError("Unknown matrix type "+JSON.stringify(e)+".")}}),rS=Y("algorithm01",["typed"],t=>{var{typed:e}=t;return function(t,r,n,i){var o,s,a=t._data,u=t._size,c=t._datatype,f=r._values,l=r._index,h=r._ptr,p=r._size,d=r._datatype;if(u.length!==p.length)throw new tl(u.length,p.length);if(u[0]!==p[0]||u[1]!==p[1])throw RangeError("Dimension mismatch. Matrix A ("+u+") must match Matrix B ("+p+")");if(!f)throw Error("Cannot perform operation on Dense Matrix and Pattern Sparse Matrix");var m=u[0],g=u[1],v="string"==typeof c&&c===d?c:void 0,y=v?e.find(n,[v,v]):n,w=[];for(o=0;o<m;o++)w[o]=[];var b=[],x=[];for(s=0;s<g;s++){for(var _=s+1,N=h[s],M=h[s+1],E=N;E<M;E++)b[o=l[E]]=i?y(f[E],a[o][s]):y(a[o][s],f[E]),x[o]=_;for(o=0;o<m;o++)x[o]===_?w[o][s]=b[o]:w[o][s]=a[o][s]}return t.createDenseMatrix({data:w,size:[m,g],datatype:v})}}),rA=Y("algorithm04",["typed","equalScalar"],t=>{var{typed:e,equalScalar:r}=t;return function(t,n,i){var o,s,a,u,c,f,l=t._values,h=t._index,p=t._ptr,d=t._size,m=t._datatype,g=n._values,v=n._index,y=n._ptr,w=n._size,b=n._datatype;if(d.length!==w.length)throw new tl(d.length,w.length);if(d[0]!==w[0]||d[1]!==w[1])throw RangeError("Dimension mismatch. Matrix A ("+d+") must match Matrix B ("+w+")");var x=d[0],_=d[1],N=r,M=0,E=i;"string"==typeof m&&m===b&&(o=m,N=e.find(r,[o,o]),M=e.convert(0,o),E=e.find(i,[o,o]));var O=l&&g?[]:void 0,S=[],A=[],j=l&&g?[]:void 0,F=l&&g?[]:void 0,z=[],D=[];for(a=0;a<_;a++){A[a]=S.length;var C=a+1;for(c=p[a],f=p[a+1],u=c;u<f;u++)s=h[u],S.push(s),z[s]=C,j&&(j[s]=l[u]);for(c=y[a],f=y[a+1],u=c;u<f;u++)if(z[s=v[u]]===C){if(j){var B=E(j[s],g[u]);N(B,M)?z[s]=null:j[s]=B}}else S.push(s),D[s]=C,F&&(F[s]=g[u]);if(j&&F)for(u=A[a];u<S.length;)z[s=S[u]]===C?(O[u]=j[s],u++):D[s]===C?(O[u]=F[s],u++):S.splice(u,1)}return A[_]=S.length,t.createSparseMatrix({values:O,index:S,ptr:A,size:[x,_],datatype:o})}}),rj=Y("algorithm10",["typed","DenseMatrix"],t=>{var{typed:e,DenseMatrix:r}=t;return function(t,n,i,o){var s,a=t._values,u=t._index,c=t._ptr,f=t._size,l=t._datatype;if(!a)throw Error("Cannot perform operation on Pattern Sparse Matrix and Scalar value");var h=f[0],p=f[1],d=i;"string"==typeof l&&(s=l,n=e.convert(n,s),d=e.find(i,[s,s]));for(var m=[],g=[],v=[],y=0;y<p;y++){for(var w=y+1,b=c[y],x=c[y+1],_=b;_<x;_++){var N=u[_];g[N]=a[_],v[N]=w}for(var M=0;M<h;M++)0===y&&(m[M]=[]),v[M]===w?m[M][y]=o?d(n,g[M]):d(g[M],n):m[M][y]=n}return new r({data:m,size:[h,p],datatype:s})}}),rF=Y("algorithm13",["typed"],t=>{var{typed:e}=t;return function(t,r,n){var i,o=t._data,s=t._size,a=t._datatype,u=r._data,c=r._size,f=r._datatype,l=[];if(s.length!==c.length)throw new tl(s.length,c.length);for(var h=0;h<s.length;h++){if(s[h]!==c[h])throw RangeError("Dimension mismatch. Matrix A ("+s+") must match Matrix B ("+c+")");l[h]=s[h]}var p=n;"string"==typeof a&&a===f&&(i=a,p=e.find(n,[i,i]));var d=l.length>0?function t(e,r,n,i,o,s){var a=[];if(r===n.length-1)for(var u=0;u<i;u++)a[u]=e(o[u],s[u]);else for(var c=0;c<i;c++)a[c]=t(e,r+1,n,n[r+1],o[c],s[c]);return a}(p,0,l,l[0],o,u):[];return t.createDenseMatrix({data:d,size:l,datatype:i})}}),rz=Y("algorithm14",["typed"],t=>{var{typed:e}=t;return function(t,r,n,i){var o,s=t._data,a=t._size,u=t._datatype,c=n;"string"==typeof u&&(o=u,r=e.convert(r,o),c=e.find(n,[o,o]));var f=a.length>0?function t(e,r,n,i,o,s,a){var u=[];if(r===n.length-1)for(var c=0;c<i;c++)u[c]=a?e(s,o[c]):e(o[c],s);else for(var f=0;f<i;f++)u[f]=t(e,r+1,n,n[r+1],o[f],s,a);return u}(c,0,a,a[0],s,r,i):[];return t.createDenseMatrix({data:f,size:q(a),datatype:o})}});function rD(t,e){var r;if(!Q(t)||!Q(e))throw Error("Parameters in function gcd must be integer numbers");for(;0!==e;)r=t%e,t=e,e=r;return t<0?-t:t}rD.signature="number, number";let{gcd:rC}=function t(e,r){var Z,G,Q,tt=(0,n.Z)({},tN,r);if("function"!=typeof Object.create)throw Error("ES5 not supported by this JavaScript engine. Please load the es5-shim and es5-sham library for compatibility.");var te=(Z={isNumber:i,isComplex:s,isBigNumber:o,isFraction:a,isUnit:u,isString:c,isArray:f,isMatrix:l,isCollection:h,isDenseMatrix:p,isSparseMatrix:d,isRange:m,isIndex:g,isBoolean:v,isResultSet:y,isHelp:w,isFunction:b,isDate:x,isRegExp:_,isObject:N,isNull:M,isUndefined:E,isAccessorNode:O,isArrayNode:S,isAssignmentNode:A,isBlockNode:j,isConditionalNode:F,isConstantNode:z,isFunctionAssignmentNode:D,isFunctionNode:C,isIndexNode:B,isNode:T,isObjectNode:k,isOperatorNode:$,isParenthesisNode:P,isRangeNode:I,isSymbolNode:R,isChain:L},G=new J,Z.on=G.on.bind(G),Z.off=G.off.bind(G),Z.once=G.once.bind(G),Z.emit=G.emit.bind(G),Z);te.config=function(t,e){function r(r){if(!r)return U(t,q);var n=U(t,q);tO(r,"matrix",tM),tO(r,"number",tE),function t(e,r){if(Array.isArray(r))throw TypeError("Arrays are not supported by deepExtend");for(var n in r)if(W(r,n)&&!(n in Object.prototype)&&!(n in Function.prototype)){if(r[n]&&r[n].constructor===Object)void 0===e[n]&&(e[n]={}),e[n]&&e[n].constructor===Object?t(e[n],r[n]):e[n]=r[n];else if(Array.isArray(r[n]))throw TypeError("Arrays are not supported by deepExtend");else e[n]=r[n]}return e}(t,r);var i=U(t,q);return e("config",i,n,U(r,q)),i}return r.MATRIX_OPTIONS=tM,r.NUMBER_OPTIONS=tE,Object.keys(tN).forEach(e=>{Object.defineProperty(r,e,{get:()=>t[e],enumerable:!0,configurable:!0})}),r}(tt,te.emit),te.expression={transform:{},mathWithTransform:{config:te.config}};var tr={},tn=function(t,e,r,n){function i(t,e){e&&"function"==typeof e.transform?(r.expression.transform[t]=e.transform,W(h,t)||(r.expression.mathWithTransform[t]=e.transform)):(delete r.expression.transform[t],W(h,t)||(r.expression.mathWithTransform[t]=e))}function c(t){return"function"==typeof t&&"object"==typeof t.signatures}function f(t){return void 0!==t&&void 0!==t.meta&&!0===t.meta.isTransformFunction}var h={expression:!0,type:!0,docs:!0,error:!0,json:!0,chain:!0};return function(e,p){var d=arguments.length;if(1!==d&&2!==d)throw new t_("import",d,1,2);p||(p={});var m={};for(var g in!function t(e,r,n){if(Array.isArray(r))r.forEach(r=>t(e,r));else if("object"==typeof r)for(var i in r)W(r,i)&&t(e,r[i],i);else if(K(r)||void 0!==n){var o=K(r)?f(r)?r.fn+".transform":r.fn:n;if(W(e,o)&&e[o]!==r&&!p.silent)throw Error('Cannot import "'+o+'" twice');e[o]=r}else if(!p.silent)throw TypeError("Factory, Object, or Array expected")}(m,e),m)if(W(m,g)){var v,y=m[g];if(K(y))!function(e,i){var o,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.fn;if(tx(s,"."))throw Error("Factory name should not contain a nested path. Name: "+JSON.stringify(s));var a=f(e)?r.expression.transform:r,u=s in r.expression.transform,l=W(a,s)?a[s]:void 0,p=function(){var n={};e.dependencies.map(X).forEach(t=>{if(tx(t,"."))throw Error("Factory dependency should not contain a nested path. Name: "+JSON.stringify(t));"math"===t?n.math=r:"mathWithTransform"===t?n.mathWithTransform=r.expression.mathWithTransform:"classes"===t?n.classes=r:n[t]=r[t]});var o=e(n);if(o&&"function"==typeof o.transform)throw Error('Transforms cannot be attached to factory functions. Please create a separate function for it with exports.path="expression.transform"');if(void 0===l||i.override)return o;if(c(l)&&c(o))return t(l,o);if(i.silent)return l;throw Error('Cannot import "'+s+'": already exists')};e.meta&&!1===e.meta.lazy?a[s]=p():V(a,s,p),l&&u?function(t){delete r.expression.transform[t],W(h,t)?delete r.expression.mathWithTransform[t]:r.expression.mathWithTransform[t]=r[t]}(s):!f(e)&&(-1!==(o=e).fn.indexOf(".")||W(h,o.fn)||o.meta&&o.meta.isClass)||V(r.expression.mathWithTransform,s,()=>a[s]),n[s]=e,r.emit("import",s,p)}(y,p);else{if("function"==typeof(v=y)||"number"==typeof v||"string"==typeof v||"boolean"==typeof v||null===v||u(v)||s(v)||o(v)||a(v)||l(v)||Array.isArray(v))!function(e,o,s){var a;if(s.wrap&&"function"==typeof o&&(o=function(t){var e=function(){for(var e=[],n=0,i=arguments.length;n<i;n++){var o=arguments[n];e[n]=o&&o.valueOf()}return t.apply(r,e)};return t.transform&&(e.transform=t.transform),e}(o)),"function"==typeof(a=o)&&"string"==typeof a.signature&&(o=t(e,{[o.signature]:o})),c(r[e])&&c(o)){o=s.override?t(e,o.signatures):t(r[e],o),r[e]=o,delete n[e],i(e,o),r.emit("import",e,function(){return o});return}if(void 0===r[e]||s.override){r[e]=o,delete n[e],i(e,o),r.emit("import",e,function(){return o});return}if(!s.silent)throw Error('Cannot import "'+e+'": already exists')}(g,y,p);else if(!p.silent)throw TypeError("Factory, Object, or Array expected")}}}}(function(){for(var t=arguments.length,e=Array(t),r=0;r<t;r++)e[r]=arguments[r];return te.typed.apply(te.typed,e)},0,te,tr);return te.import=tn,te.on("config",()=>{H(tr).forEach(t=>{t&&t.meta&&t.meta.recreateOnConfigChange&&tn(t,{override:!0})})}),te.create=t.bind(null,e),te.factory=Y,te.import(H((function t(e,r){for(var n in e)if(W(e,n)){var i=e[n];"object"==typeof i&&null!==i?t(i,r):r[n]=i}}(e,Q={}),Q))),te.ArgumentsError=t_,te.DimensionError=tl,te.IndexError=th,te}({gcdDependencies:{BigNumberDependencies:eJ,DenseMatrixDependencies:eK,equalScalarDependencies:rN,matrixDependencies:{DenseMatrixDependencies:eK,MatrixDependencies:eY,SparseMatrixDependencies:{MatrixDependencies:eY,equalScalarDependencies:rN,typedDependencies:rb,createSparseMatrixClass:rM},typedDependencies:rb,createMatrix:rO},typedDependencies:rb,createGcd:Y("gcd",["typed","matrix","equalScalar","BigNumber","DenseMatrix"],t=>{var{typed:e,matrix:r,equalScalar:n,BigNumber:i,DenseMatrix:o}=t,s=rS({typed:e}),a=rA({typed:e,equalScalar:n}),u=rj({typed:e,DenseMatrix:o}),c=rF({typed:e}),f=rz({typed:e});return e("gcd",{"number, number":rD,"BigNumber, BigNumber":function(t,e){if(!t.isInt()||!e.isInt())throw Error("Parameters in function gcd must be integer numbers");for(var r=new i(0);!e.isZero();){var n=t.mod(e);t=e,e=n}return t.lt(r)?t.neg():t},"Fraction, Fraction":function(t,e){return t.gcd(e)},"SparseMatrix, SparseMatrix":function(t,e){return a(t,e,this)},"SparseMatrix, DenseMatrix":function(t,e){return s(e,t,this,!0)},"DenseMatrix, SparseMatrix":function(t,e){return s(t,e,this,!1)},"DenseMatrix, DenseMatrix":function(t,e){return c(t,e,this)},"Array, Array":function(t,e){return this(r(t),r(e)).valueOf()},"Array, Matrix":function(t,e){return this(r(t),e)},"Matrix, Array":function(t,e){return this(t,r(e))},"SparseMatrix, number | BigNumber":function(t,e){return u(t,e,this,!1)},"DenseMatrix, number | BigNumber":function(t,e){return f(t,e,this,!1)},"number | BigNumber, SparseMatrix":function(t,e){return u(e,t,this,!0)},"number | BigNumber, DenseMatrix":function(t,e){return f(e,t,this,!0)},"Array, number | BigNumber":function(t,e){return f(r(t),e,this,!1).valueOf()},"number | BigNumber, Array":function(t,e){return f(r(e),t,this,!0).valueOf()},"Array | Matrix | number | BigNumber, Array | Matrix | number | BigNumber, ...Array | Matrix | number | BigNumber":function(t,e,r){for(var n=this(t,e),i=0;i<r.length;i++)n=this(n,r[i]);return n}})})}});function rB(t,e){let r=e.startMs,n=t.values,i=[];for(let t of n){for(;r<t[0];)i.push([r,null]),r+=e.stepMs;i.push([r,t[1]]),r+=e.stepMs}for(;r<=e.endMs;)i.push([r,null]),r+=e.stepMs;return i}function rT(t){let e,r;let n=[];for(let e of t)if(e&&"timeRange"in e){if(void 0===e||void 0===e.timeRange||void 0===e.stepMs)continue;if(n.push(e.stepMs),void 0===r){r=e.timeRange;continue}e.timeRange.start<r.start&&(r.start=e.timeRange.start),e.timeRange.end>r.end&&(r.end=e.timeRange.end)}else if(e&&"values"in e){for(let t=0;t<e.values.length;t++){let n=e.values[t];if(void 0===n)continue;let[i]=n,o=new Date(i),s=new Date(i);if(void 0===r){r={start:o,end:s};continue}o<r.start&&(r.start=o),s>r.end&&(r.end=s)}if(void 0===r)return;let t=r.start.valueOf(),n=r.end.valueOf(),i=n-t;return{startMs:t,endMs:n,rangeMs:i,stepMs:10}}if(void 0===r)return;if(1===n.length)e=n[0];else{let t=rC(...n);e=t<10?10:t}let i=r.start.valueOf(),o=r.end.valueOf();return{startMs:i,endMs:o,stepMs:e,rangeMs:o-i}}},82545:function(t,e,r){var n=r(81822)(r(77400),"DataView");t.exports=n},96586:function(t,e,r){var n=r(57753),i=r(82452),o=r(22115),s=r(38256),a=r(67426);function u(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}u.prototype.clear=n,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=s,u.prototype.set=a,t.exports=u},36301:function(t,e,r){var n=r(63663),i=r(72470),o=r(66165),s=r(71873),a=r(52556);function u(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}u.prototype.clear=n,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=s,u.prototype.set=a,t.exports=u},44538:function(t,e,r){var n=r(81822)(r(77400),"Map");t.exports=n},74554:function(t,e,r){var n=r(39448),i=r(7738),o=r(66575),s=r(7238),a=r(38738);function u(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}u.prototype.clear=n,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=s,u.prototype.set=a,t.exports=u},64825:function(t,e,r){var n=r(81822)(r(77400),"Promise");t.exports=n},46151:function(t,e,r){var n=r(81822)(r(77400),"Set");t.exports=n},52485:function(t,e,r){var n=r(74554),i=r(38639),o=r(88379);function s(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new n;++e<r;)this.add(t[e])}s.prototype.add=s.prototype.push=i,s.prototype.has=o,t.exports=s},23694:function(t,e,r){var n=r(36301),i=r(7354),o=r(5863),s=r(12367),a=r(90748),u=r(97569);function c(t){var e=this.__data__=new n(t);this.size=e.size}c.prototype.clear=i,c.prototype.delete=o,c.prototype.get=s,c.prototype.has=a,c.prototype.set=u,t.exports=c},96539:function(t,e,r){var n=r(77400).Symbol;t.exports=n},59942:function(t,e,r){var n=r(77400).Uint8Array;t.exports=n},66902:function(t,e,r){var n=r(81822)(r(77400),"WeakMap");t.exports=n},79349:function(t){t.exports=function(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}},10263:function(t){t.exports=function(t,e){for(var r=-1,n=null==t?0:t.length,i=0,o=[];++r<n;){var s=t[r];e(s,r,t)&&(o[i++]=s)}return o}},98213:function(t,e,r){var n=r(24701),i=r(2900),o=r(19785),s=r(43854),a=r(42383),u=r(48519),c=Object.prototype.hasOwnProperty;t.exports=function(t,e){var r=o(t),f=!r&&i(t),l=!r&&!f&&s(t),h=!r&&!f&&!l&&u(t),p=r||f||l||h,d=p?n(t.length,String):[],m=d.length;for(var g in t)(e||c.call(t,g))&&!(p&&("length"==g||l&&("offset"==g||"parent"==g)||h&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||a(g,m)))&&d.push(g);return d}},97141:function(t){t.exports=function(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t}},90756:function(t){t.exports=function(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1}},73140:function(t,e,r){var n=r(88799),i=r(85638);t.exports=function(t,e,r){(void 0===r||i(t[e],r))&&(void 0!==r||e in t)||n(t,e,r)}},71928:function(t,e,r){var n=r(88799),i=r(85638),o=Object.prototype.hasOwnProperty;t.exports=function(t,e,r){var s=t[e];o.call(t,e)&&i(s,r)&&(void 0!==r||e in t)||n(t,e,r)}},93382:function(t,e,r){var n=r(85638);t.exports=function(t,e){for(var r=t.length;r--;)if(n(t[r][0],e))return r;return -1}},88799:function(t,e,r){var n=r(42630);t.exports=function(t,e,r){"__proto__"==e&&n?n(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}},80158:function(t,e,r){var n=r(11611),i=Object.create,o=function(){function t(){}return function(e){if(!n(e))return{};if(i)return i(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();t.exports=o},49819:function(t,e,r){var n=r(18911)();t.exports=n},11324:function(t,e,r){var n=r(97141),i=r(19785);t.exports=function(t,e,r){var o=e(t);return i(t)?o:n(o,r(t))}},99736:function(t,e,r){var n=r(96539),i=r(34840),o=r(21258),s=n?n.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":s&&s in Object(t)?i(t):o(t)}},55829:function(t,e,r){var n=r(99736),i=r(92360);t.exports=function(t){return i(t)&&"[object Arguments]"==n(t)}},32866:function(t,e,r){var n=r(12772),i=r(92360);t.exports=function t(e,r,o,s,a){return e===r||(null!=e&&null!=r&&(i(e)||i(r))?n(e,r,o,s,t,a):e!=e&&r!=r)}},12772:function(t,e,r){var n=r(23694),i=r(27042),o=r(370),s=r(39584),a=r(3533),u=r(19785),c=r(43854),f=r(48519),l="[object Arguments]",h="[object Array]",p="[object Object]",d=Object.prototype.hasOwnProperty;t.exports=function(t,e,r,m,g,v){var y=u(t),w=u(e),b=y?h:a(t),x=w?h:a(e);b=b==l?p:b,x=x==l?p:x;var _=b==p,N=x==p,M=b==x;if(M&&c(t)){if(!c(e))return!1;y=!0,_=!1}if(M&&!_)return v||(v=new n),y||f(t)?i(t,e,r,m,g,v):o(t,e,b,r,m,g,v);if(!(1&r)){var E=_&&d.call(t,"__wrapped__"),O=N&&d.call(e,"__wrapped__");if(E||O){var S=E?t.value():t,A=O?e.value():e;return v||(v=new n),g(S,A,r,m,v)}}return!!M&&(v||(v=new n),s(t,e,r,m,g,v))}},46729:function(t,e,r){var n=r(28338),i=r(99678),o=r(11611),s=r(76532),a=/^\[object .+?Constructor\]$/,u=Object.prototype,c=Function.prototype.toString,f=u.hasOwnProperty,l=RegExp("^"+c.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!o(t)||i(t))&&(n(t)?l:a).test(s(t))}},26972:function(t,e,r){var n=r(99736),i=r(84194),o=r(92360),s={};s["[object Float32Array]"]=s["[object Float64Array]"]=s["[object Int8Array]"]=s["[object Int16Array]"]=s["[object Int32Array]"]=s["[object Uint8Array]"]=s["[object Uint8ClampedArray]"]=s["[object Uint16Array]"]=s["[object Uint32Array]"]=!0,s["[object Arguments]"]=s["[object Array]"]=s["[object ArrayBuffer]"]=s["[object Boolean]"]=s["[object DataView]"]=s["[object Date]"]=s["[object Error]"]=s["[object Function]"]=s["[object Map]"]=s["[object Number]"]=s["[object Object]"]=s["[object RegExp]"]=s["[object Set]"]=s["[object String]"]=s["[object WeakMap]"]=!1,t.exports=function(t){return o(t)&&i(t.length)&&!!s[n(t)]}},20186:function(t,e,r){var n=r(56016),i=r(50962),o=Object.prototype.hasOwnProperty;t.exports=function(t){if(!n(t))return i(t);var e=[];for(var r in Object(t))o.call(t,r)&&"constructor"!=r&&e.push(r);return e}},59464:function(t,e,r){var n=r(11611),i=r(56016),o=r(21586),s=Object.prototype.hasOwnProperty;t.exports=function(t){if(!n(t))return o(t);var e=i(t),r=[];for(var a in t)"constructor"==a&&(e||!s.call(t,a))||r.push(a);return r}},40015:function(t,e,r){var n=r(23694),i=r(73140),o=r(49819),s=r(68867),a=r(11611),u=r(53893),c=r(97494);t.exports=function t(e,r,f,l,h){e!==r&&o(r,function(o,u){if(h||(h=new n),a(o))s(e,r,u,f,t,l,h);else{var p=l?l(c(e,u),o,u+"",e,r,h):void 0;void 0===p&&(p=o),i(e,u,p)}},u)}},68867:function(t,e,r){var n=r(73140),i=r(2734),o=r(63428),s=r(37561),a=r(97635),u=r(2900),c=r(19785),f=r(36468),l=r(43854),h=r(28338),p=r(11611),d=r(40861),m=r(48519),g=r(97494),v=r(89328);t.exports=function(t,e,r,y,w,b,x){var _=g(t,r),N=g(e,r),M=x.get(N);if(M){n(t,r,M);return}var E=b?b(_,N,r+"",t,e,x):void 0,O=void 0===E;if(O){var S=c(N),A=!S&&l(N),j=!S&&!A&&m(N);E=N,S||A||j?c(_)?E=_:f(_)?E=s(_):A?(O=!1,E=i(N,!0)):j?(O=!1,E=o(N,!0)):E=[]:d(N)||u(N)?(E=_,u(_)?E=v(_):(!p(_)||h(_))&&(E=a(N))):O=!1}O&&(x.set(N,E),w(E,N,y,b,x),x.delete(N)),n(t,r,E)}},1197:function(t,e,r){var n=r(31137),i=r(11871),o=r(63132);t.exports=function(t,e){return o(i(t,e,n),t+"")}},54459:function(t,e,r){var n=r(551),i=r(42630),o=r(31137),s=i?function(t,e){return i(t,"toString",{configurable:!0,enumerable:!1,value:n(e),writable:!0})}:o;t.exports=s},24701:function(t){t.exports=function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}},39334:function(t){t.exports=function(t){return function(e){return t(e)}}},65581:function(t){t.exports=function(t,e){return t.has(e)}},95825:function(t,e,r){var n=r(59942);t.exports=function(t){var e=new t.constructor(t.byteLength);return new n(e).set(new n(t)),e}},2734:function(t,e,r){t=r.nmd(t);var n=r(77400),i=e&&!e.nodeType&&e,o=i&&t&&!t.nodeType&&t,s=o&&o.exports===i?n.Buffer:void 0,a=s?s.allocUnsafe:void 0;t.exports=function(t,e){if(e)return t.slice();var r=t.length,n=a?a(r):new t.constructor(r);return t.copy(n),n}},63428:function(t,e,r){var n=r(95825);t.exports=function(t,e){var r=e?n(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}},37561:function(t){t.exports=function(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}},35159:function(t,e,r){var n=r(71928),i=r(88799);t.exports=function(t,e,r,o){var s=!r;r||(r={});for(var a=-1,u=e.length;++a<u;){var c=e[a],f=o?o(r[c],t[c],c,r,t):void 0;void 0===f&&(f=t[c]),s?i(r,c,f):n(r,c,f)}return r}},64937:function(t,e,r){var n=r(77400)["__core-js_shared__"];t.exports=n},7270:function(t,e,r){var n=r(1197),i=r(57535);t.exports=function(t){return n(function(e,r){var n=-1,o=r.length,s=o>1?r[o-1]:void 0,a=o>2?r[2]:void 0;for(s=t.length>3&&"function"==typeof s?(o--,s):void 0,a&&i(r[0],r[1],a)&&(s=o<3?void 0:s,o=1),e=Object(e);++n<o;){var u=r[n];u&&t(e,u,n,s)}return e})}},18911:function(t){t.exports=function(t){return function(e,r,n){for(var i=-1,o=Object(e),s=n(e),a=s.length;a--;){var u=s[t?a:++i];if(!1===r(o[u],u,o))break}return e}}},42630:function(t,e,r){var n=r(81822),i=function(){try{var t=n(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=i},27042:function(t,e,r){var n=r(52485),i=r(90756),o=r(65581);t.exports=function(t,e,r,s,a,u){var c=1&r,f=t.length,l=e.length;if(f!=l&&!(c&&l>f))return!1;var h=u.get(t),p=u.get(e);if(h&&p)return h==e&&p==t;var d=-1,m=!0,g=2&r?new n:void 0;for(u.set(t,e),u.set(e,t);++d<f;){var v=t[d],y=e[d];if(s)var w=c?s(y,v,d,e,t,u):s(v,y,d,t,e,u);if(void 0!==w){if(w)continue;m=!1;break}if(g){if(!i(e,function(t,e){if(!o(g,e)&&(v===t||a(v,t,r,s,u)))return g.push(e)})){m=!1;break}}else if(!(v===y||a(v,y,r,s,u))){m=!1;break}}return u.delete(t),u.delete(e),m}},370:function(t,e,r){var n=r(96539),i=r(59942),o=r(85638),s=r(27042),a=r(19383),u=r(43735),c=n?n.prototype:void 0,f=c?c.valueOf:void 0;t.exports=function(t,e,r,n,c,l,h){switch(r){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)break;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":if(t.byteLength!=e.byteLength||!l(new i(t),new i(e)))break;return!0;case"[object Boolean]":case"[object Date]":case"[object Number]":return o(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var p=a;case"[object Set]":var d=1&n;if(p||(p=u),t.size!=e.size&&!d)break;var m=h.get(t);if(m)return m==e;n|=2,h.set(t,e);var g=s(p(t),p(e),n,c,l,h);return h.delete(t),g;case"[object Symbol]":if(f)return f.call(t)==f.call(e)}return!1}},39584:function(t,e,r){var n=r(51385),i=Object.prototype.hasOwnProperty;t.exports=function(t,e,r,o,s,a){var u=1&r,c=n(t),f=c.length;if(f!=n(e).length&&!u)return!1;for(var l=f;l--;){var h=c[l];if(!(u?h in e:i.call(e,h)))return!1}var p=a.get(t),d=a.get(e);if(p&&d)return p==e&&d==t;var m=!0;a.set(t,e),a.set(e,t);for(var g=u;++l<f;){var v=t[h=c[l]],y=e[h];if(o)var w=u?o(y,v,h,e,t,a):o(v,y,h,t,e,a);if(!(void 0===w?v===y||s(v,y,r,o,a):w)){m=!1;break}g||(g="constructor"==h)}if(m&&!g){var b=t.constructor,x=e.constructor;b!=x&&"constructor"in t&&"constructor"in e&&!("function"==typeof b&&b instanceof b&&"function"==typeof x&&x instanceof x)&&(m=!1)}return a.delete(t),a.delete(e),m}},39120:function(t,e,r){var n="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g;t.exports=n},51385:function(t,e,r){var n=r(11324),i=r(83080),o=r(50098);t.exports=function(t){return n(t,o,i)}},95899:function(t,e,r){var n=r(54479);t.exports=function(t,e){var r=t.__data__;return n(e)?r["string"==typeof e?"string":"hash"]:r.map}},81822:function(t,e,r){var n=r(46729),i=r(15371);t.exports=function(t,e){var r=i(t,e);return n(r)?r:void 0}},2173:function(t,e,r){var n=r(58023)(Object.getPrototypeOf,Object);t.exports=n},34840:function(t,e,r){var n=r(96539),i=Object.prototype,o=i.hasOwnProperty,s=i.toString,a=n?n.toStringTag:void 0;t.exports=function(t){var e=o.call(t,a),r=t[a];try{t[a]=void 0;var n=!0}catch(t){}var i=s.call(t);return n&&(e?t[a]=r:delete t[a]),i}},83080:function(t,e,r){var n=r(10263),i=r(15937),o=Object.prototype.propertyIsEnumerable,s=Object.getOwnPropertySymbols,a=s?function(t){return null==t?[]:n(s(t=Object(t)),function(e){return o.call(t,e)})}:i;t.exports=a},3533:function(t,e,r){var n=r(82545),i=r(44538),o=r(64825),s=r(46151),a=r(66902),u=r(99736),c=r(76532),f="[object Map]",l="[object Promise]",h="[object Set]",p="[object WeakMap]",d="[object DataView]",m=c(n),g=c(i),v=c(o),y=c(s),w=c(a),b=u;(n&&b(new n(new ArrayBuffer(1)))!=d||i&&b(new i)!=f||o&&b(o.resolve())!=l||s&&b(new s)!=h||a&&b(new a)!=p)&&(b=function(t){var e=u(t),r="[object Object]"==e?t.constructor:void 0,n=r?c(r):"";if(n)switch(n){case m:return d;case g:return f;case v:return l;case y:return h;case w:return p}return e}),t.exports=b},15371:function(t){t.exports=function(t,e){return null==t?void 0:t[e]}},57753:function(t,e,r){var n=r(35718);t.exports=function(){this.__data__=n?n(null):{},this.size=0}},82452:function(t){t.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=+!!e,e}},22115:function(t,e,r){var n=r(35718),i=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;if(n){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return i.call(e,t)?e[t]:void 0}},38256:function(t,e,r){var n=r(35718),i=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return n?void 0!==e[t]:i.call(e,t)}},67426:function(t,e,r){var n=r(35718);t.exports=function(t,e){var r=this.__data__;return this.size+=+!this.has(t),r[t]=n&&void 0===e?"__lodash_hash_undefined__":e,this}},97635:function(t,e,r){var n=r(80158),i=r(2173),o=r(56016);t.exports=function(t){return"function"!=typeof t.constructor||o(t)?{}:n(i(t))}},42383:function(t){var e=/^(?:0|[1-9]\d*)$/;t.exports=function(t,r){var n=typeof t;return!!(r=null==r?0x1fffffffffffff:r)&&("number"==n||"symbol"!=n&&e.test(t))&&t>-1&&t%1==0&&t<r}},57535:function(t,e,r){var n=r(85638),i=r(80068),o=r(42383),s=r(11611);t.exports=function(t,e,r){if(!s(r))return!1;var a=typeof e;return("number"==a?!!(i(r)&&o(e,r.length)):"string"==a&&e in r)&&n(r[e],t)}},54479:function(t){t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},99678:function(t,e,r){var n,i=r(64937),o=(n=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";t.exports=function(t){return!!o&&o in t}},56016:function(t){var e=Object.prototype;t.exports=function(t){var r=t&&t.constructor;return t===("function"==typeof r&&r.prototype||e)}},63663:function(t){t.exports=function(){this.__data__=[],this.size=0}},72470:function(t,e,r){var n=r(93382),i=Array.prototype.splice;t.exports=function(t){var e=this.__data__,r=n(e,t);return!(r<0)&&(r==e.length-1?e.pop():i.call(e,r,1),--this.size,!0)}},66165:function(t,e,r){var n=r(93382);t.exports=function(t){var e=this.__data__,r=n(e,t);return r<0?void 0:e[r][1]}},71873:function(t,e,r){var n=r(93382);t.exports=function(t){return n(this.__data__,t)>-1}},52556:function(t,e,r){var n=r(93382);t.exports=function(t,e){var r=this.__data__,i=n(r,t);return i<0?(++this.size,r.push([t,e])):r[i][1]=e,this}},39448:function(t,e,r){var n=r(96586),i=r(36301),o=r(44538);t.exports=function(){this.size=0,this.__data__={hash:new n,map:new(o||i),string:new n}}},7738:function(t,e,r){var n=r(95899);t.exports=function(t){var e=n(this,t).delete(t);return this.size-=+!!e,e}},66575:function(t,e,r){var n=r(95899);t.exports=function(t){return n(this,t).get(t)}},7238:function(t,e,r){var n=r(95899);t.exports=function(t){return n(this,t).has(t)}},38738:function(t,e,r){var n=r(95899);t.exports=function(t,e){var r=n(this,t),i=r.size;return r.set(t,e),this.size+=+(r.size!=i),this}},19383:function(t){t.exports=function(t){var e=-1,r=Array(t.size);return t.forEach(function(t,n){r[++e]=[n,t]}),r}},35718:function(t,e,r){var n=r(81822)(Object,"create");t.exports=n},50962:function(t,e,r){var n=r(58023)(Object.keys,Object);t.exports=n},21586:function(t){t.exports=function(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e}},18125:function(t,e,r){t=r.nmd(t);var n=r(39120),i=e&&!e.nodeType&&e,o=i&&t&&!t.nodeType&&t,s=o&&o.exports===i&&n.process,a=function(){try{var t=o&&o.require&&o.require("util").types;if(t)return t;return s&&s.binding&&s.binding("util")}catch(t){}}();t.exports=a},21258:function(t){var e=Object.prototype.toString;t.exports=function(t){return e.call(t)}},58023:function(t){t.exports=function(t,e){return function(r){return t(e(r))}}},11871:function(t,e,r){var n=r(79349),i=Math.max;t.exports=function(t,e,r){return e=i(void 0===e?t.length-1:e,0),function(){for(var o=arguments,s=-1,a=i(o.length-e,0),u=Array(a);++s<a;)u[s]=o[e+s];s=-1;for(var c=Array(e+1);++s<e;)c[s]=o[s];return c[e]=r(u),n(t,this,c)}}},77400:function(t,e,r){var n=r(39120),i="object"==typeof self&&self&&self.Object===Object&&self,o=n||i||Function("return this")();t.exports=o},97494:function(t){t.exports=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}},38639:function(t){t.exports=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this}},88379:function(t){t.exports=function(t){return this.__data__.has(t)}},43735:function(t){t.exports=function(t){var e=-1,r=Array(t.size);return t.forEach(function(t){r[++e]=t}),r}},63132:function(t,e,r){var n=r(54459),i=r(49591)(n);t.exports=i},49591:function(t){var e=Date.now;t.exports=function(t){var r=0,n=0;return function(){var i=e(),o=16-(i-n);if(n=i,o>0){if(++r>=800)return arguments[0]}else r=0;return t.apply(void 0,arguments)}}},7354:function(t,e,r){var n=r(36301);t.exports=function(){this.__data__=new n,this.size=0}},5863:function(t){t.exports=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}},12367:function(t){t.exports=function(t){return this.__data__.get(t)}},90748:function(t){t.exports=function(t){return this.__data__.has(t)}},97569:function(t,e,r){var n=r(36301),i=r(44538),o=r(74554);t.exports=function(t,e){var r=this.__data__;if(r instanceof n){var s=r.__data__;if(!i||s.length<199)return s.push([t,e]),this.size=++r.size,this;r=this.__data__=new o(s)}return r.set(t,e),this.size=r.size,this}},76532:function(t){var e=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return e.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},551:function(t){t.exports=function(t){return function(){return t}}},85638:function(t){t.exports=function(t,e){return t===e||t!=t&&e!=e}},31137:function(t){t.exports=function(t){return t}},2900:function(t,e,r){var n=r(55829),i=r(92360),o=Object.prototype,s=o.hasOwnProperty,a=o.propertyIsEnumerable,u=n(function(){return arguments}())?n:function(t){return i(t)&&s.call(t,"callee")&&!a.call(t,"callee")};t.exports=u},19785:function(t){var e=Array.isArray;t.exports=e},80068:function(t,e,r){var n=r(28338),i=r(84194);t.exports=function(t){return null!=t&&i(t.length)&&!n(t)}},36468:function(t,e,r){var n=r(80068),i=r(92360);t.exports=function(t){return i(t)&&n(t)}},43854:function(t,e,r){t=r.nmd(t);var n=r(77400),i=r(57714),o=e&&!e.nodeType&&e,s=o&&t&&!t.nodeType&&t,a=s&&s.exports===o?n.Buffer:void 0,u=a?a.isBuffer:void 0;t.exports=u||i},56141:function(t,e,r){var n=r(32866);t.exports=function(t,e){return n(t,e)}},28338:function(t,e,r){var n=r(99736),i=r(11611);t.exports=function(t){if(!i(t))return!1;var e=n(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},84194:function(t){t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=0x1fffffffffffff}},11611:function(t){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},92360:function(t){t.exports=function(t){return null!=t&&"object"==typeof t}},40861:function(t,e,r){var n=r(99736),i=r(2173),o=r(92360),s=Object.prototype,a=Function.prototype.toString,u=s.hasOwnProperty,c=a.call(Object);t.exports=function(t){if(!o(t)||"[object Object]"!=n(t))return!1;var e=i(t);if(null===e)return!0;var r=u.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&a.call(r)==c}},48519:function(t,e,r){var n=r(26972),i=r(39334),o=r(18125),s=o&&o.isTypedArray,a=s?i(s):n;t.exports=a},50098:function(t,e,r){var n=r(98213),i=r(20186),o=r(80068);t.exports=function(t){return o(t)?n(t):i(t)}},53893:function(t,e,r){var n=r(98213),i=r(59464),o=r(80068);t.exports=function(t){return o(t)?n(t,!0):i(t)}},15409:function(t,e,r){var n=r(40015),i=r(7270)(function(t,e,r){n(t,e,r)});t.exports=i},15937:function(t){t.exports=function(){return[]}},57714:function(t){t.exports=function(){return!1}},89328:function(t,e,r){var n=r(35159),i=r(53893);t.exports=function(t){return n(t,i(t))}},8317:function(t){function e(){}e.prototype={on:function(t,e,r){var n=this.e||(this.e={});return(n[t]||(n[t]=[])).push({fn:e,ctx:r}),this},once:function(t,e,r){var n=this;function i(){n.off(t,i),e.apply(r,arguments)}return i._=e,this.on(t,i,r)},emit:function(t){for(var e=[].slice.call(arguments,1),r=((this.e||(this.e={}))[t]||[]).slice(),n=0,i=r.length;n<i;n++)r[n].fn.apply(r[n].ctx,e);return this},off:function(t,e){var r=this.e||(this.e={}),n=r[t],i=[];if(n&&e)for(var o=0,s=n.length;o<s;o++)n[o].fn!==e&&n[o].fn._!==e&&i.push(n[o]);return i.length?r[t]=i:delete r[t],this}},t.exports=e,t.exports.TinyEmitter=e},27554:function(t){"use strict";var e;e=function(){function t(){return!0}function e(){return!1}function r(){}return function n(){var i=[{name:"number",test:function(t){return"number"==typeof t}},{name:"string",test:function(t){return"string"==typeof t}},{name:"boolean",test:function(t){return"boolean"==typeof t}},{name:"Function",test:function(t){return"function"==typeof t}},{name:"Array",test:Array.isArray},{name:"Date",test:function(t){return t instanceof Date}},{name:"RegExp",test:function(t){return t instanceof RegExp}},{name:"Object",test:function(t){return"object"==typeof t&&null!==t&&t.constructor===Object}},{name:"null",test:function(t){return null===t}},{name:"undefined",test:function(t){return void 0===t}}],o={name:"any",test:t},s=[],a=[],u={types:i,conversions:a,ignore:s};function c(t){var e=k(u.types,function(e){return e.name===t});if(e)return e;if("any"===t)return o;var r=k(u.types,function(e){return e.name.toLowerCase()===t.toLowerCase()});throw TypeError('Unknown type "'+t+'"'+(r?'. Did you mean "'+r.name+'"?':""))}function f(t){return t===o?999:u.types.indexOf(t)}function l(t){var e=k(u.types,function(e){return e.test(t)});if(e)return e.name;throw TypeError("Value has unknown type. Value: "+t)}function h(t){return t.map(function(t){var e=t.types.map(y);return(t.restParam?"...":"")+e.join("|")}).join(",")}function p(t){var e=B(t);return!!e&&e.restParam}function d(t){return t.types.some(function(t){return null!=t.conversion})}function m(e){if(!e||0===e.types.length)return t;if(1===e.types.length)return c(e.types[0].name).test;if(2===e.types.length){var r=c(e.types[0].name).test,n=c(e.types[1].name).test;return function(t){return r(t)||n(t)}}var i=e.types.map(function(t){return c(t.name).test});return function(t){for(var e=0;e<i.length;e++)if(i[e](t))return!0;return!1}}function g(t,e){return e<t.params.length?t.params[e]:p(t.params)?B(t.params):null}function v(t,e,r){var n=g(t,e);return(n?r?n.types.filter(w):n.types:[]).map(y)}function y(t){return t.name}function w(t){return null===t.conversion||void 0===t.conversion}function b(t,e){var r=function(t){for(var e={},r=0;r<t.length;r++)e[t[r]]=!0;return Object.keys(e)}($(t,function(t){return v(t,e,!1)}));return -1!==r.indexOf("any")?["any"]:r}function x(t,e,r){var n,i,o,s=t||"unnamed",a=r;for(o=0;o<e.length;o++){var u=a.filter(function(t){var r=m(g(t,o));return(o<t.params.length||p(t.params))&&r(e[o])});if(0===u.length){if((i=b(a,o)).length>0){var c=l(e[o]);return(n=TypeError("Unexpected type of argument in function "+s+" (expected: "+i.join(" or ")+", actual: "+c+", index: "+o+")")).data={category:"wrongType",fn:s,index:o,actual:c,expected:i},n}}else a=u}var f=a.map(function(t){return p(t.params)?1/0:t.params.length});if(e.length<Math.min.apply(null,f))return(n=TypeError("Too few arguments in function "+s+" (expected: "+(i=b(a,o)).join(" or ")+", index: "+e.length+")")).data={category:"tooFewArgs",fn:s,index:e.length,expected:i},n;var h=Math.max.apply(null,f);return e.length>h?(n=TypeError("Too many arguments in function "+s+" (expected: "+h+", actual: "+e.length+")")).data={category:"tooManyArgs",fn:s,index:e.length,expectedLength:h}:(n=TypeError('Arguments of type "'+e.join(", ")+'" do not match any of the defined signatures of function '+s+".")).data={category:"mismatch",actual:e.map(l)},n}function _(t){for(var e=999,r=0;r<t.types.length;r++)w(t.types[r])&&(e=Math.min(e,t.types[r].typeIndex));return e}function N(t){for(var e=999,r=0;r<t.types.length;r++)w(t.types[r])||(e=Math.min(e,t.types[r].conversionIndex));return e}function M(t,e){var r,n,i=Math.min(t.params.length,e.params.length);if(0!=(n=t.params.some(d)-e.params.some(d)))return n;for(r=0;r<i;r++)if(0!=(n=d(t.params[r])-d(e.params[r])))return n;for(r=0;r<i;r++)if(0!==(n=function(t,e){var r;return 0!=(r=t.restParam-e.restParam)||0!=(r=d(t)-d(e))||0!=(r=_(t)-_(e))?r:N(t)-N(e)}(t.params[r],e.params[r])))return n;return t.params.length-e.params.length}function E(t){var e,r,n,i,o=[],s=[];switch(t.types.forEach(function(t){t.conversion&&(o.push(c(t.conversion.from).test),s.push(t.conversion.convert))}),s.length){case 0:return function(t){return t};case 1:return e=o[0],n=s[0],function(t){return e(t)?n(t):t};case 2:return e=o[0],r=o[1],n=s[0],i=s[1],function(t){return e(t)?n(t):r(t)?i(t):t};default:return function(t){for(var e=0;e<s.length;e++)if(o[e](t))return s[e](t);return t}}}function O(t,e){return function t(r,n,i){if(!(n<r.length))return[i.map(function(t,e){return{types:t,restParam:e===r.length-1&&p(r)}})];var o,s=r[n],a=e?s.types.filter(w):s.types;if(s.restParam){var u=a.filter(w);o=u.length<a.length?[u,a]:[a]}else o=a.map(function(t){return[t]});return $(o,function(e){return t(r,n+1,i.concat([e]))})}(t,0,[])}function S(t,n){if(0===Object.keys(n).length)throw SyntaxError("No signatures provided");var i,o=[];Object.keys(n).map(function(t){var e,r,i;return e=n[t],r=u.conversions,i=[],(""!==t.trim()&&(i=t.split(",").map(F).map(function(t,e,n){var i,o,s,a,u,l,h,p,d=(i=r,o=u=((a=0===t.indexOf("..."))?t.length>3?t.slice(3):"any":t).split("|").map(F).filter(z).filter(j),s={},i.forEach(function(t){-1!==o.indexOf(t.from)||-1===o.indexOf(t.to)||s[t.from]||(s[t.from]=t)}),l=Object.keys(s).map(function(t){return s[t]}),h=u.map(function(t){var e=c(t);return{name:t,typeIndex:f(e),test:e.test,conversion:null,conversionIndex:-1}}),p=l.map(function(t){var e=c(t.from);return{name:t.from,typeIndex:f(e),test:e.test,conversion:t,conversionIndex:r.indexOf(t)}}),{types:h.concat(p),restParam:a});if(d.restParam&&e!==n.length-1)throw SyntaxError('Unexpected rest parameter "'+t+'": only allowed for the last parameter');return d})),i.some(C))?null:{params:i,fn:e}}).filter(D).forEach(function(t){var e=k(o,function(e){return function(t,e){for(var r=Math.max(t.params.length,e.params.length),n=0;n<r;n++)if(!function(t,e){for(var r,n=0;n<t.length;n++)if(r=t[n],-1!==e.indexOf(r))return!0;return!1}(v(t,n,!0),v(e,n,!0)))return!1;var i=t.params.length,o=e.params.length,s=p(t.params),a=p(e.params);return s?a?i===o:o>=i:a?i>=o:i===o}(e,t)});if(e)throw TypeError('Conflicting signatures "'+h(e.params)+'" and "'+h(t.params)+'".');o.push(t)});var s=$(o,function(t){return(t?O(t.params,!1):[]).map(function(e){return{params:e,fn:t.fn}})}).filter(D);s.sort(M);var a=s[0]&&s[0].params.length<=2&&!p(s[0].params),l=s[1]&&s[1].params.length<=2&&!p(s[1].params),g=s[2]&&s[2].params.length<=2&&!p(s[2].params),y=s[3]&&s[3].params.length<=2&&!p(s[3].params),w=s[4]&&s[4].params.length<=2&&!p(s[4].params),b=s[5]&&s[5].params.length<=2&&!p(s[5].params),x=s.map(function(t){return function(t){var e,r,n;if(p(t)){var i,o=(e=(i=t).slice(0,i.length-1).map(m)).length,s=m(B(t)),a=function(t){for(var e=o;e<t.length;e++)if(!s(t[e]))return!1;return!0};return function(t){for(var r=0;r<e.length;r++)if(!e[r](t[r]))return!1;return a(t)&&t.length>=o+1}}return 0===t.length?function(t){return 0===t.length}:1===t.length?(r=m(t[0]),function(t){return r(t[0])&&1===t.length}):2===t.length?(r=m(t[0]),n=m(t[1]),function(t){return r(t[0])&&n(t[1])&&2===t.length}):(e=t.map(m),function(t){for(var r=0;r<e.length;r++)if(!e[r](t[r]))return!1;return t.length===e.length})}(t.params)}),_=a?m(s[0].params[0]):e,N=l?m(s[1].params[0]):e,S=g?m(s[2].params[0]):e,A=y?m(s[3].params[0]):e,P=w?m(s[4].params[0]):e,I=b?m(s[5].params[0]):e,R=a?m(s[0].params[1]):e,L=l?m(s[1].params[1]):e,Z=g?m(s[2].params[1]):e,q=y?m(s[3].params[1]):e,U=w?m(s[4].params[1]):e,G=b?m(s[5].params[1]):e,V=s.map(function(t){return function(t,e){var r=e;if(t.some(d)){var n=p(t),i=t.map(E);r=function(){for(var t=[],r=n?arguments.length-1:arguments.length,o=0;o<r;o++)t[o]=i[o](arguments[o]);return n&&(t[r]=arguments[r].map(i[r])),e.apply(this,t)}}var o=r;if(p(t)){var s=t.length-1;o=function(){return r.apply(this,T(arguments,0,s).concat([T(arguments,s)]))}}return o}(t.params,t.fn)}),W=a?V[0]:r,H=l?V[1]:r,J=g?V[2]:r,Y=y?V[3]:r,K=w?V[4]:r,X=b?V[5]:r,Q=a?s[0].params.length:-1,tt=l?s[1].params.length:-1,te=g?s[2].params.length:-1,tr=y?s[3].params.length:-1,tn=w?s[4].params.length:-1,ti=b?s[5].params.length:-1,to=6*!!(a&&l&&g&&y&&w&&b),ts=s.length,ta=function(){for(var e=to;e<ts;e++)if(x[e](arguments))return V[e].apply(this,arguments);return u.onMismatch(t,arguments,s)},tu=function t(e,r){return arguments.length===Q&&_(e)&&R(r)?W.apply(t,arguments):arguments.length===tt&&N(e)&&L(r)?H.apply(t,arguments):arguments.length===te&&S(e)&&Z(r)?J.apply(t,arguments):arguments.length===tr&&A(e)&&q(r)?Y.apply(t,arguments):arguments.length===tn&&P(e)&&U(r)?K.apply(t,arguments):arguments.length===ti&&I(e)&&G(r)?X.apply(t,arguments):ta.apply(t,arguments)};try{Object.defineProperty(tu,"name",{value:t})}catch(t){}return tu.signatures=(i={},s.forEach(function(t){t.params.some(d)||O(t.params,!0).forEach(function(e){i[h(e)]=t.fn})}),i),tu}function A(t,e,r){throw x(t,e,r)}function j(t){return -1===u.ignore.indexOf(t)}function F(t){return t.trim()}function z(t){return!!t}function D(t){return null!==t}function C(t){return 0===t.types.length}function B(t){return t[t.length-1]}function T(t,e,r){return Array.prototype.slice.call(t,e,r)}function k(t,e){for(var r=0;r<t.length;r++)if(e(t[r]))return t[r]}function $(t,e){return Array.prototype.concat.apply([],t.map(e))}function P(t){for(var e="",r=0;r<t.length;r++){var n=t[r];if(("object"==typeof n.signatures||"string"==typeof n.signature)&&""!==n.name){if(""===e)e=n.name;else if(e!==n.name){var i=Error("Function names do not match (expected: "+e+", actual: "+n.name+")");throw i.data={actual:n.name,expected:e},i}}}return e}function I(t){var e,r={};function n(t,n){if(r.hasOwnProperty(t)&&n!==r[t])throw(e=Error('Signature "'+t+'" is defined twice')).data={signature:t},e}for(var i=0;i<t.length;i++){var o=t[i];if("object"==typeof o.signatures)for(var s in o.signatures)o.signatures.hasOwnProperty(s)&&(n(s,o.signatures[s]),r[s]=o.signatures[s]);else if("string"==typeof o.signature)n(o.signature,o),r[o.signature]=o;else throw(e=TypeError("Function is no typed-function (index: "+i+")")).data={index:i},e}return r}return(u=S("typed",{"string, Object":S,Object:function(t){var e=[];for(var r in t)t.hasOwnProperty(r)&&e.push(t[r]);return S(P(e),t)},"...Function":function(t){return S(P(t),I(t))},"string, ...Function":function(t,e){return S(t,I(e))}})).create=n,u.types=i,u.conversions=a,u.ignore=s,u.onMismatch=A,u.throwMismatchError=A,u.createError=x,u.convert=function(t,e){var r=l(t);if(e===r)return t;for(var n=0;n<u.conversions.length;n++){var i=u.conversions[n];if(i.from===r&&i.to===e)return i.convert(t)}throw Error("Cannot convert from "+r+" to "+e)},u.find=function(t,e){if(!t.signatures)throw TypeError("Function is no typed-function");if("string"==typeof e){r=e.split(",");for(var r,n=0;n<r.length;n++)r[n]=r[n].trim()}else if(Array.isArray(e))r=e;else throw TypeError("String array or a comma separated string expected");var i=r.join(","),o=t.signatures[i];if(o)return o;throw TypeError("Signature not found (signature: "+(t.name||"unnamed")+"("+r.join(", ")+"))")},u.addType=function(t,e){if(!t||"string"!=typeof t.name||"function"!=typeof t.test)throw TypeError("Object with properties {name: string, test: function} expected");if(!1!==e){for(var r=0;r<u.types.length;r++)if("Object"===u.types[r].name){u.types.splice(r,0,t);return}}u.types.push(t)},u.addConversion=function(t){if(!t||"string"!=typeof t.from||"string"!=typeof t.to||"function"!=typeof t.convert)throw TypeError("Object with properties {from: string, to: string, convert: function} expected");u.conversions.push(t)},u}()},"function"==typeof define&&define.amd?define([],e):t.exports=e()}}]);
|