var Je=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Qe(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}/*! * Copyright (c) 2017 Benjamin Van Ryseghem * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */var Te,Ve;function et(){return Ve||(Ve=1,Te={languageTag:"en-US",delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},spaceSeparated:!1,ordinal:function(n){let t=n%10;return~~(n%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"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}}}),Te}/*! * Copyright (c) 2017 Benjamin Van Ryseghem * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */var Le,qe;function Ze(){if(qe)return Le;qe=1;const n=[{key:"ZiB",factor:Math.pow(1024,7)},{key:"ZB",factor:Math.pow(1e3,7)},{key:"YiB",factor:Math.pow(1024,8)},{key:"YB",factor:Math.pow(1e3,8)},{key:"TiB",factor:Math.pow(1024,4)},{key:"TB",factor:Math.pow(1e3,4)},{key:"PiB",factor:Math.pow(1024,5)},{key:"PB",factor:Math.pow(1e3,5)},{key:"MiB",factor:Math.pow(1024,2)},{key:"MB",factor:Math.pow(1e3,2)},{key:"KiB",factor:Math.pow(1024,1)},{key:"KB",factor:Math.pow(1e3,1)},{key:"GiB",factor:Math.pow(1024,3)},{key:"GB",factor:Math.pow(1e3,3)},{key:"EiB",factor:Math.pow(1024,6)},{key:"EB",factor:Math.pow(1e3,6)},{key:"B",factor:1}];function t(w){return w.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}function p(w,g,B,_,A,T,X){if(!isNaN(+w))return+w;let P="",D=w.replace(/(^[^(]*)\((.*)\)([^)]*$)/,"$1$2$3");if(D!==w)return-1*p(D,g,B,_,A,T);for(let N=0;N{Q[T[N]]=N});let te=Object.keys(Q).sort().reverse(),R=te.length;for(let N=0;N * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */var Ce,Ge;function ke(){if(Ge)return Ce;Ge=1;let n=Ze();const t=/^[a-z]{2,3}(-[a-zA-Z]{4})?(-([A-Z]{2}|[0-9]{3}))?$/,p=["currency","percent","byte","time","ordinal","number"],d=["trillion","billion","million","thousand"],v=["prefix","infix","postfix"],y=["sign","parenthesis"],O={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},g={output:{type:"string",validValues:p},base:{type:"string",validValues:["decimal","binary","general"],restriction:(D,F)=>F.output==="byte",message:"`base` must be provided only when the output is `byte`",mandatory:D=>D.output==="byte"},characteristic:{type:"number",restriction:D=>D>=0,message:"value must be positive"},prefix:"string",postfix:"string",forceAverage:{type:"string",validValues:d},average:"boolean",lowPrecision:{type:"boolean",restriction:(D,F)=>F.average===!0,message:"`lowPrecision` must be provided only when the option `average` is set"},currencyPosition:{type:"string",validValues:v},currencySymbol:"string",totalLength:{type:"number",restrictions:[{restriction:D=>D>=0,message:"value must be positive"},{restriction:(D,F)=>!F.exponential,message:"`totalLength` is incompatible with `exponential`"}]},mantissa:{type:"number",restriction:D=>D>=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:y},forceSign:"boolean",exponential:{type:"boolean"},prefixSymbol:{type:"boolean",restriction:(D,F)=>F.output==="percent",message:"`prefixSymbol` can be provided only when the output is `percent`"}},B={languageTag:{type:"string",mandatory:!0,restriction:D=>D.match(t),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:O,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 _(D,F){let L=A(D),Q=X(F);return L&&Q}function A(D){return n.unformat(D)!==void 0}function T(D,F,L,Q=!1){let te=Object.keys(D).map(R=>{if(!F[R])return console.error(`${L} Invalid key: ${R}`),!1;let N=D[R],x=F[R];if(typeof x=="string"&&(x={type:x}),x.type==="format"){if(!T(N,g,`[Validate ${R}]`,!0))return!1}else if(typeof N!==x.type)return console.error(`${L} ${R} type mismatched: "${x.type}" expected, "${typeof N}" provided`),!1;if(x.restrictions&&x.restrictions.length){let C=x.restrictions.length;for(let I=0;I{let N=F[R];if(typeof N=="string"&&(N={type:N}),N.mandatory){let x=N.mandatory;if(typeof x=="function"&&(x=x(D)),x&&D[R]===void 0)return console.error(`${L} Missing mandatory key "${R}"`),!1}return!0})),te.reduce((R,N)=>R&&N,!0)}function X(D){return T(D,g,"[Validate format]")}function P(D){return T(D,B,"[Validate language]")}return Ce={validate:_,validateFormat:X,validateInput:A,validateLanguage:P},Ce}/*! * Copyright (c) 2017 Benjamin Van Ryseghem * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */function tt(n,t){let p=n.match(/^{([^}]*)}/);return p?(t.prefix=p[1],n.slice(p[0].length)):n}function rt(n,t){let p=n.match(/{([^}]*)}$/);return p?(t.postfix=p[1],n.slice(0,-p[0].length)):n}function nt(n,t){if(n.indexOf("$")!==-1){t.output="currency";return}if(n.indexOf("%")!==-1){t.output="percent";return}if(n.indexOf("bd")!==-1){t.output="byte",t.base="general";return}if(n.indexOf("b")!==-1){t.output="byte",t.base="binary";return}if(n.indexOf("d")!==-1){t.output="byte",t.base="decimal";return}if(n.indexOf(":")!==-1){t.output="time";return}n.indexOf("o")!==-1&&(t.output="ordinal")}function it(n,t){n.indexOf(",")!==-1&&(t.thousandSeparated=!0)}function at(n,t){n.indexOf(" ")!==-1&&(t.spaceSeparated=!0,t.spaceSeparatedCurrency=!0,(t.average||t.forceAverage)&&(t.spaceSeparatedAbbreviation=!0))}function lt(n,t){let p=n.match(/[1-9]+[0-9]*/);p&&(t.totalLength=+p[0])}function ot(n,t){let d=n.split(".")[0].match(/0+/);d&&(t.characteristic=d[0].length)}function st(n,t){let p=n.split(".")[1];if(p){let d=p.match(/0+/);d&&(t.mantissa=d[0].length)}}function ut(n,t){const p=n.split(".")[1];p&&(t.trimMantissa=p.indexOf("[")!==-1)}function ft(n,t){n.indexOf("a")!==-1&&(t.average=!0)}function ct(n,t){n.indexOf("K")!==-1?t.forceAverage="thousand":n.indexOf("M")!==-1?t.forceAverage="million":n.indexOf("B")!==-1?t.forceAverage="billion":n.indexOf("T")!==-1&&(t.forceAverage="trillion")}function ht(n,t){n.match(/\[\.]/)?t.optionalMantissa=!0:n.match(/\./)&&(t.optionalMantissa=!1)}function pt(n,t){if(n.indexOf(".")!==-1){let p=n.split(".")[0];t.optionalCharacteristic=p.indexOf("0")===-1}}function gt(n,t){n.match(/^\+?\([^)]*\)$/)&&(t.negative="parenthesis"),n.match(/^\+?-/)&&(t.negative="sign")}function dt(n,t){n.match(/^\+/)&&(t.forceSign=!0)}function mt(n,t={}){return typeof n!="string"?n:(n=tt(n,t),n=rt(n,t),nt(n,t),lt(n,t),ot(n,t),pt(n,t),ft(n,t),ct(n,t),st(n,t),ht(n,t),ut(n,t),it(n,t),at(n,t),gt(n,t),dt(n,t),t)}var Ue={parseFormat:mt};/*! * Copyright (c) 2017 Benjamin Van Ryseghem * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */var Pe,je;function Re(){if(je)return Pe;je=1;const n=et(),t=ke(),p=Ue;let d={},v,y={},O=null,M={};function w(B){v=B}function g(){return y[v]}return d.languages=()=>Object.assign({},y),d.currentLanguage=()=>v,d.currentBytes=()=>g().bytes||{},d.currentCurrency=()=>g().currency,d.currentAbbreviations=()=>g().abbreviations,d.currentDelimiters=()=>g().delimiters,d.currentOrdinal=()=>g().ordinal,d.currentDefaults=()=>Object.assign({},g().defaults,M),d.currentOrdinalDefaultFormat=()=>Object.assign({},d.currentDefaults(),g().ordinalFormat),d.currentByteDefaultFormat=()=>Object.assign({},d.currentDefaults(),g().byteFormat),d.currentPercentageDefaultFormat=()=>Object.assign({},d.currentDefaults(),g().percentageFormat),d.currentCurrencyDefaultFormat=()=>Object.assign({},d.currentDefaults(),g().currencyFormat),d.currentTimeDefaultFormat=()=>Object.assign({},d.currentDefaults(),g().timeFormat),d.setDefaults=B=>{B=p.parseFormat(B),t.validateFormat(B)&&(M=B)},d.getZeroFormat=()=>O,d.setZeroFormat=B=>O=typeof B=="string"?B:null,d.hasZeroFormat=()=>O!==null,d.languageData=B=>{if(B){if(y[B])return y[B];throw new Error(`Unknown tag "${B}"`)}return g()},d.registerLanguage=(B,_=!1)=>{if(!t.validateLanguage(B))throw new Error("Invalid language data");y[B.languageTag]=B,_&&w(B.languageTag)},d.setLanguage=(B,_=n.languageTag)=>{if(!y[B]){let A=B.split("-")[0],T=Object.keys(y).find(X=>X.split("-")[0]===A);if(!y[T]){w(_);return}w(T);return}w(B)},d.registerLanguage(n),v=n.languageTag,Pe=d,Pe}function yt(n){throw new Error('Could not dynamically require "'+n+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}/*! * Copyright (c) 2017 Benjamin Van Ryseghem * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */function vt(n,t){n.forEach(p=>{let d;try{d=yt(`../languages/${p}`)}catch{console.error(`Unable to load "${p}". No matching language file found.`)}d&&t.registerLanguage(d)})}var wt=n=>({loadLanguagesInNode:t=>vt(t,n)}),ze={exports:{}};(function(n){(function(t){var p,d=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,v=Math.ceil,y=Math.floor,O="[BigNumber Error] ",M=O+"Number primitive has more than 15 significant digits: ",w=1e14,g=14,B=9007199254740991,_=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],A=1e7,T=1e9;function X(N){var x,C,I,S=b.prototype={constructor:b,toString:null,valueOf:null},W=new b(1),q=20,G=4,ee=-7,re=21,he=-1e7,ae=1e7,pe=!1,ve=1,ce=0,$e={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},ge="0123456789abcdefghijklmnopqrstuvwxyz",Me=!0;function b(e,r){var i,f,l,s,h,a,o,c,u=this;if(!(u instanceof b))return new b(e,r);if(r==null){if(e&&e._isBigNumber===!0){u.s=e.s,!e.c||e.e>ae?u.c=u.e=null:e.e=10;h/=10,s++);s>ae?u.c=u.e=null:(u.e=s,u.c=[e]);return}c=String(e)}else{if(!d.test(c=String(e)))return I(u,c,a);u.s=c.charCodeAt(0)==45?(c=c.slice(1),-1):1}(s=c.indexOf("."))>-1&&(c=c.replace(".","")),(h=c.search(/e/i))>0?(s<0&&(s=h),s+=+c.slice(h+1),c=c.substring(0,h)):s<0&&(s=c.length)}else{if(L(r,2,ge.length,"Base"),r==10&&Me)return u=new b(e),ne(u,q+u.e+1,G);if(c=String(e),a=typeof e=="number"){if(e*0!=0)return I(u,c,a,r);if(u.s=1/e<0?(c=c.slice(1),-1):1,b.DEBUG&&c.replace(/^0\.0*|\./,"").length>15)throw Error(M+e)}else u.s=c.charCodeAt(0)===45?(c=c.slice(1),-1):1;for(i=ge.slice(0,r),s=h=0,o=c.length;hs){s=o;continue}}else if(!l&&(c==c.toUpperCase()&&(c=c.toLowerCase())||c==c.toLowerCase()&&(c=c.toUpperCase()))){l=!0,h=-1,s=0;continue}return I(u,String(e),a,r)}a=!1,c=C(c,r,10,u.s),(s=c.indexOf("."))>-1?c=c.replace(".",""):s=c.length}for(h=0;c.charCodeAt(h)===48;h++);for(o=c.length;c.charCodeAt(--o)===48;);if(c=c.slice(h,++o)){if(o-=h,a&&b.DEBUG&&o>15&&(e>B||e!==y(e)))throw Error(M+u.s*e);if((s=s-h-1)>ae)u.c=u.e=null;else if(s=-1e9&&l<=T&&l===y(l)){if(f[0]===0){if(l===0&&f.length===1)return!0;break e}if(r=(l+1)%g,r<1&&(r+=g),String(f[0]).length==r){for(r=0;r=w||i!==y(i))break e;if(i!==0)return!0}}}else if(f===null&&l===null&&(s===null||s===1||s===-1))return!0;throw Error(O+"Invalid BigNumber: "+e)},b.maximum=b.max=function(){return Fe(arguments,-1)},b.minimum=b.min=function(){return Fe(arguments,1)},b.random=function(){var e=9007199254740992,r=Math.random()*e&2097151?function(){return y(Math.random()*e)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function(i){var f,l,s,h,a,o=0,c=[],u=new b(W);if(i==null?i=q:L(i,0,T),h=v(i/g),pe)if(crypto.getRandomValues){for(f=crypto.getRandomValues(new Uint32Array(h*=2));o>>11),a>=9e15?(l=crypto.getRandomValues(new Uint32Array(2)),f[o]=l[0],f[o+1]=l[1]):(c.push(a%1e14),o+=2);o=h/2}else if(crypto.randomBytes){for(f=crypto.randomBytes(h*=7);o=9e15?crypto.randomBytes(7).copy(f,o):(c.push(a%1e14),o+=7);o=h/7}else throw pe=!1,Error(O+"crypto unavailable");if(!pe)for(;o=10;a/=10,o++);ol-1&&(a[h+1]==null&&(a[h+1]=0),a[h+1]+=a[h]/l|0,a[h]%=l)}return a.reverse()}return function(i,f,l,s,h){var a,o,c,u,m,$,E,U,j=i.indexOf("."),H=q,k=G;for(j>=0&&(u=ce,ce=0,i=i.replace(".",""),U=new b(f),$=U.pow(i.length-j),ce=u,U.c=r(R(D($.c),$.e,"0"),10,l,e),U.e=U.c.length),E=r(i,f,l,h?(a=ge,e):(a=e,ge)),c=u=E.length;E[--u]==0;E.pop());if(!E[0])return a.charAt(0);if(j<0?--c:($.c=E,$.e=c,$.s=s,$=x($,U,H,k,l),E=$.c,m=$.r,c=$.e),o=c+H+1,j=E[o],u=l/2,m=m||o<0||E[o+1]!=null,m=k<4?(j!=null||m)&&(k==0||k==($.s<0?3:2)):j>u||j==u&&(k==4||m||k==6&&E[o-1]&1||k==($.s<0?8:7)),o<1||!E[0])i=m?R(a.charAt(1),-H,a.charAt(0)):a.charAt(0);else{if(E.length=o,m)for(--l;++E[--o]>l;)E[o]=0,o||(++c,E=[1].concat(E));for(u=E.length;!E[--u];);for(j=0,i="";j<=u;i+=a.charAt(E[j++]));i=R(i,c,a.charAt(0))}return i}}(),x=function(){function e(f,l,s){var h,a,o,c,u=0,m=f.length,$=l%A,E=l/A|0;for(f=f.slice();m--;)o=f[m]%A,c=f[m]/A|0,h=E*o+c*$,a=$*o+h%A*A+u,u=(a/s|0)+(h/A|0)+E*c,f[m]=a%s;return u&&(f=[u].concat(f)),f}function r(f,l,s,h){var a,o;if(s!=h)o=s>h?1:-1;else for(a=o=0;al[a]?1:-1;break}return o}function i(f,l,s,h){for(var a=0;s--;)f[s]-=a,a=f[s]1;f.splice(0,1));}return function(f,l,s,h,a){var o,c,u,m,$,E,U,j,H,k,V,K,Oe,Ae,_e,oe,we,ie=f.s==l.s?1:-1,J=f.c,Z=l.c;if(!J||!J[0]||!Z||!Z[0])return new b(!f.s||!l.s||(J?Z&&J[0]==Z[0]:!Z)?NaN:J&&J[0]==0||!Z?ie*0:ie/0);for(j=new b(ie),H=j.c=[],c=f.e-l.e,ie=s+c+1,a||(a=w,c=P(f.e/g)-P(l.e/g),ie=ie/g|0),u=0;Z[u]==(J[u]||0);u++);if(Z[u]>(J[u]||0)&&c--,ie<0)H.push(1),m=!0;else{for(Ae=J.length,oe=Z.length,u=0,ie+=2,$=y(a/(Z[0]+1)),$>1&&(Z=e(Z,$,a),J=e(J,$,a),oe=Z.length,Ae=J.length),Oe=oe,k=J.slice(0,oe),V=k.length;V=a/2&&_e++;do{if($=0,o=r(Z,k,oe,V),o<0){if(K=k[0],oe!=V&&(K=K*a+(k[1]||0)),$=y(K/_e),$>1)for($>=a&&($=a-1),E=e(Z,$,a),U=E.length,V=k.length;r(E,k,U,V)==1;)$--,i(E,oe=10;ie/=10,u++);ne(j,s+(j.e=u+c*g-1)+1,h,m)}else j.e=c,j.r=+m;return j}}();function Ee(e,r,i,f){var l,s,h,a,o;if(i==null?i=G:L(i,0,8),!e.c)return e.toString();if(l=e.c[0],h=e.e,r==null)o=D(e.c),o=f==1||f==2&&(h<=ee||h>=re)?te(o,h):R(o,h,"0");else if(e=ne(new b(e),r,i),s=e.e,o=D(e.c),a=o.length,f==1||f==2&&(r<=s||s<=ee)){for(;aa){if(--r>0)for(o+=".";r--;o+="0");}else if(r+=s-a,r>0)for(s+1==a&&(o+=".");r--;o+="0");return e.s<0&&l?"-"+o:o}function Fe(e,r){for(var i,f,l=1,s=new b(e[0]);l=10;l/=10,f++);return(i=f+i*g-1)>ae?e.c=e.e=null:i=10;a/=10,l++);if(s=r-l,s<0)s+=g,h=r,o=m[c=0],u=y(o/$[l-h-1]%10);else if(c=v((s+1)/g),c>=m.length)if(f){for(;m.length<=c;m.push(0));o=u=0,l=1,s%=g,h=s-g+1}else break e;else{for(o=a=m[c],l=1;a>=10;a/=10,l++);s%=g,h=s-g+l,u=h<0?0:y(o/$[l-h-1]%10)}if(f=f||r<0||m[c+1]!=null||(h<0?o:o%$[l-h-1]),f=i<4?(u||f)&&(i==0||i==(e.s<0?3:2)):u>5||u==5&&(i==4||f||i==6&&(s>0?h>0?o/$[l-h]:0:m[c-1])%10&1||i==(e.s<0?8:7)),r<1||!m[0])return m.length=0,f?(r-=e.e+1,m[0]=$[(g-r%g)%g],e.e=-r||0):m[0]=e.e=0,e;if(s==0?(m.length=c,a=1,c--):(m.length=c+1,a=$[g-s],m[c]=h>0?y(o/$[l-h]%$[h])*a:0),f)for(;;)if(c==0){for(s=1,h=m[0];h>=10;h/=10,s++);for(h=m[0]+=a,a=1;h>=10;h/=10,a++);s!=a&&(e.e++,m[0]==w&&(m[0]=1));break}else{if(m[c]+=a,m[c]!=w)break;m[c--]=0,a=1}for(s=m.length;m[--s]===0;m.pop());}e.e>ae?e.c=e.e=null:e.e=re?te(r,i):R(r,i,"0"),e.s<0?"-"+r:r)}return S.absoluteValue=S.abs=function(){var e=new b(this);return e.s<0&&(e.s=1),e},S.comparedTo=function(e,r){return F(this,new b(e,r))},S.decimalPlaces=S.dp=function(e,r){var i,f,l,s=this;if(e!=null)return L(e,0,T),r==null?r=G:L(r,0,8),ne(new b(s),e+s.e+1,r);if(!(i=s.c))return null;if(f=((l=i.length-1)-P(this.e/g))*g,l=i[l])for(;l%10==0;l/=10,f--);return f<0&&(f=0),f},S.dividedBy=S.div=function(e,r){return x(this,new b(e,r),q,G)},S.dividedToIntegerBy=S.idiv=function(e,r){return x(this,new b(e,r),0,1)},S.exponentiatedBy=S.pow=function(e,r){var i,f,l,s,h,a,o,c,u,m=this;if(e=new b(e),e.c&&!e.isInteger())throw Error(O+"Exponent not an integer: "+ue(e));if(r!=null&&(r=new b(r)),a=e.e>14,!m.c||!m.c[0]||m.c[0]==1&&!m.e&&m.c.length==1||!e.c||!e.c[0])return u=new b(Math.pow(+ue(m),a?e.s*(2-Q(e)):+ue(e))),r?u.mod(r):u;if(o=e.s<0,r){if(r.c?!r.c[0]:!r.s)return new b(NaN);f=!o&&m.isInteger()&&r.isInteger(),f&&(m=m.mod(r))}else{if(e.e>9&&(m.e>0||m.e<-1||(m.e==0?m.c[0]>1||a&&m.c[1]>=24e7:m.c[0]<8e13||a&&m.c[0]<=9999975e7)))return s=m.s<0&&Q(e)?-0:0,m.e>-1&&(s=1/s),new b(o?1/s:s);ce&&(s=v(ce/g+2))}for(a?(i=new b(.5),o&&(e.s=1),c=Q(e)):(l=Math.abs(+ue(e)),c=l%2),u=new b(W);;){if(c){if(u=u.times(m),!u.c)break;s?u.c.length>s&&(u.c.length=s):f&&(u=u.mod(r))}if(l){if(l=y(l/2),l===0)break;c=l%2}else if(e=e.times(i),ne(e,e.e+1,1),e.e>14)c=Q(e);else{if(l=+ue(e),l===0)break;c=l%2}m=m.times(m),s?m.c&&m.c.length>s&&(m.c.length=s):f&&(m=m.mod(r))}return f?u:(o&&(u=W.div(u)),r?u.mod(r):s?ne(u,ce,G,h):u)},S.integerValue=function(e){var r=new b(this);return e==null?e=G:L(e,0,8),ne(r,r.e+1,e)},S.isEqualTo=S.eq=function(e,r){return F(this,new b(e,r))===0},S.isFinite=function(){return!!this.c},S.isGreaterThan=S.gt=function(e,r){return F(this,new b(e,r))>0},S.isGreaterThanOrEqualTo=S.gte=function(e,r){return(r=F(this,new b(e,r)))===1||r===0},S.isInteger=function(){return!!this.c&&P(this.e/g)>this.c.length-2},S.isLessThan=S.lt=function(e,r){return F(this,new b(e,r))<0},S.isLessThanOrEqualTo=S.lte=function(e,r){return(r=F(this,new b(e,r)))===-1||r===0},S.isNaN=function(){return!this.s},S.isNegative=function(){return this.s<0},S.isPositive=function(){return this.s>0},S.isZero=function(){return!!this.c&&this.c[0]==0},S.minus=function(e,r){var i,f,l,s,h=this,a=h.s;if(e=new b(e,r),r=e.s,!a||!r)return new b(NaN);if(a!=r)return e.s=-r,h.plus(e);var o=h.e/g,c=e.e/g,u=h.c,m=e.c;if(!o||!c){if(!u||!m)return u?(e.s=-r,e):new b(m?h:NaN);if(!u[0]||!m[0])return m[0]?(e.s=-r,e):new b(u[0]?h:G==3?-0:0)}if(o=P(o),c=P(c),u=u.slice(),a=o-c){for((s=a<0)?(a=-a,l=u):(c=o,l=m),l.reverse(),r=a;r--;l.push(0));l.reverse()}else for(f=(s=(a=u.length)<(r=m.length))?a:r,a=r=0;r0)for(;r--;u[i++]=0);for(r=w-1;f>a;){if(u[--f]=0;){for(i=0,$=K[l]%H,E=K[l]/H|0,h=o,s=l+h;s>l;)c=V[--h]%H,u=V[h]/H|0,a=E*c+u*$,c=$*c+a%H*H+U[s]+i,i=(c/j|0)+(a/H|0)+E*u,U[s--]=c%j;U[s]=i}return i?++f:U.splice(0,1),De(e,U,f)},S.negated=function(){var e=new b(this);return e.s=-e.s||null,e},S.plus=function(e,r){var i,f=this,l=f.s;if(e=new b(e,r),r=e.s,!l||!r)return new b(NaN);if(l!=r)return e.s=-r,f.minus(e);var s=f.e/g,h=e.e/g,a=f.c,o=e.c;if(!s||!h){if(!a||!o)return new b(l/0);if(!a[0]||!o[0])return o[0]?e:new b(a[0]?f:l*0)}if(s=P(s),h=P(h),a=a.slice(),l=s-h){for(l>0?(h=s,i=o):(l=-l,i=a),i.reverse();l--;i.push(0));i.reverse()}for(l=a.length,r=o.length,l-r<0&&(i=o,o=a,a=i,r=l),l=0;r;)l=(a[--r]=a[r]+o[r]+l)/w|0,a[r]=w===a[r]?0:a[r]%w;return l&&(a=[l].concat(a),++h),De(e,a,h)},S.precision=S.sd=function(e,r){var i,f,l,s=this;if(e!=null&&e!==!!e)return L(e,1,T),r==null?r=G:L(r,0,8),ne(new b(s),e,r);if(!(i=s.c))return null;if(l=i.length-1,f=l*g+1,l=i[l]){for(;l%10==0;l/=10,f--);for(l=i[0];l>=10;l/=10,f++);}return e&&s.e+1>f&&(f=s.e+1),f},S.shiftedBy=function(e){return L(e,-9007199254740991,B),this.times("1e"+e)},S.squareRoot=S.sqrt=function(){var e,r,i,f,l,s=this,h=s.c,a=s.s,o=s.e,c=q+4,u=new b("0.5");if(a!==1||!h||!h[0])return new b(!a||a<0&&(!h||h[0])?NaN:h?s:1/0);if(a=Math.sqrt(+ue(s)),a==0||a==1/0?(r=D(h),(r.length+o)%2==0&&(r+="0"),a=Math.sqrt(+r),o=P((o+1)/2)-(o<0||o%2),a==1/0?r="5e"+o:(r=a.toExponential(),r=r.slice(0,r.indexOf("e")+1)+o),i=new b(r)):i=new b(a+""),i.c[0]){for(o=i.e,a=o+c,a<3&&(a=0);;)if(l=i,i=u.times(l.plus(x(s,l,c,1))),D(l.c).slice(0,a)===(r=D(i.c)).slice(0,a))if(i.e0&&U>0){for(s=U%a||a,u=E.substr(0,s);s0&&(u+=c+E.slice(s)),$&&(u="-"+u)}f=m?u+(i.decimalSeparator||"")+((o=+i.fractionGroupSize)?m.replace(new RegExp("\\d{"+o+"}\\B","g"),"$&"+(i.fractionGroupSeparator||"")):m):u}return(i.prefix||"")+f+(i.suffix||"")},S.toFraction=function(e){var r,i,f,l,s,h,a,o,c,u,m,$,E=this,U=E.c;if(e!=null&&(a=new b(e),!a.isInteger()&&(a.c||a.s!==1)||a.lt(W)))throw Error(O+"Argument "+(a.isInteger()?"out of range: ":"not an integer: ")+ue(a));if(!U)return new b(E);for(r=new b(W),c=i=new b(W),f=o=new b(W),$=D(U),s=r.e=$.length-E.e-1,r.c[0]=_[(h=s%g)<0?g+h:h],e=!e||a.comparedTo(r)>0?s>0?r:c:a,h=ae,ae=1/0,a=new b($),o.c[0]=0;u=x(a,r,0,1),l=i.plus(u.times(f)),l.comparedTo(e)!=1;)i=f,f=l,c=o.plus(u.times(l=c)),o=l,r=a.minus(u.times(l=r)),a=l;return l=x(e.minus(i),f,0,1),o=o.plus(l.times(c)),i=i.plus(l.times(f)),o.s=c.s=E.s,s=s*2,m=x(c,f,s,G).minus(E).abs().comparedTo(x(o,i,s,G).minus(E).abs())<1?[c,f]:[o,i],ae=h,m},S.toNumber=function(){return+ue(this)},S.toPrecision=function(e,r){return e!=null&&L(e,1,T),Ee(this,e,r,2)},S.toString=function(e){var r,i=this,f=i.s,l=i.e;return l===null?f?(r="Infinity",f<0&&(r="-"+r)):r="NaN":(e==null?r=l<=ee||l>=re?te(D(i.c),l):R(D(i.c),l,"0"):e===10&&Me?(i=ne(new b(i),q+l+1,G),r=R(D(i.c),i.e,"0")):(L(e,2,ge.length,"Base"),r=C(R(D(i.c),l,"0"),10,e,f,!0)),f<0&&i.c[0]&&(r="-"+r)),r},S.valueOf=S.toJSON=function(){return ue(this)},S._isBigNumber=!0,N!=null&&b.set(N),b}function P(N){var x=N|0;return N>0||N===x?x:x-1}function D(N){for(var x,C,I=1,S=N.length,W=N[0]+"";Ire^C?1:-1;for(G=(ee=S.length)<(re=W.length)?ee:re,q=0;qW[q]^C?1:-1;return ee==re?0:ee>re^C?1:-1}function L(N,x,C,I){if(NC||N!==y(N))throw Error(O+(I||"Argument")+(typeof N=="number"?NC?" out of range: ":" not an integer: ":" not a primitive number: ")+String(N))}function Q(N){var x=N.c.length-1;return P(N.e/g)==x&&N.c[x]%2!=0}function te(N,x){return(N.length>1?N.charAt(0)+"."+N.slice(1):N)+(x<0?"e":"e+")+x}function R(N,x,C){var I,S;if(x<0){for(S=C+".";++x;S+=C);N=S+N}else if(I=N.length,++x>I){for(S=C,x-=I;--x;S+=C);N+=S}else x * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */const le=Re(),bt=ke(),xt=Ue,Ot=We,Y={trillion:Math.pow(10,12),billion:Math.pow(10,9),million:Math.pow(10,6),thousand:Math.pow(10,3)},be={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:He,decimalSuffixes:Se}=le.currentBytes(),Ie={general:{scale:1024,suffixes:Se},binary:{scale:1024,suffixes:He},decimal:{scale:1e3,suffixes:Se}};function Nt(n,t={},p){if(typeof t=="string"&&(t=xt.parseFormat(t)),!bt.validateFormat(t))return"ERROR: invalid format";let v=t.prefix||"",y=t.postfix||"",O=St(n,t,p);return O=Gt(O,v),O=jt(O,y),O}function St(n,t,p){switch(t.output){case"currency":return t=ye(t,le.currentCurrencyDefaultFormat()),Tt(n,t,le);case"percent":return t=ye(t,le.currentPercentageDefaultFormat()),_t(n,t,le,p);case"byte":return t=ye(t,le.currentByteDefaultFormat()),Et(n,t,le,p);case"time":return t=ye(t,le.currentTimeDefaultFormat()),At(n);case"ordinal":return t=ye(t,le.currentOrdinalDefaultFormat()),Dt(n,t,le);case"number":default:return xe({instance:n,providedFormat:t})}}function Bt(n){let t=Ie.decimal;return Be(n._value,t.suffixes,t.scale).suffix}function $t(n){let t=Ie.binary;return Be(n._value,t.suffixes,t.scale).suffix}function Mt(n){let t=Ie.general;return Be(n._value,t.suffixes,t.scale).suffix}function Be(n,t,p){let d=t[0],v=Math.abs(n);if(v>=p){for(let y=1;y=O&&v0&&y.forceSign?A=`+${M}${B}${A.slice(1)}`:A=B+M+A),(!g||g==="postfix")&&(M=!y.spaceSeparatedAbbreviation&&w?"":M,A=A+M+B),A}function Lt({value:n,forceAverage:t,lowPrecision:p=!0,abbreviations:d,spaceSeparated:v=!1,totalLength:y=0,roundingFunction:O=Math.round}){let M="",w=Math.abs(n),g=-1;if(t&&d[t]&&Y[t]?(M=d[t],n=n/Y[t]):w>=Y.trillion||p&&O(w/Y.trillion)===1?(M=d.trillion,n=n/Y.trillion):w=Y.billion||p&&O(w/Y.billion)===1?(M=d.billion,n=n/Y.billion):w=Y.million||p&&O(w/Y.million)===1?(M=d.million,n=n/Y.million):(w=Y.thousand||p&&O(w/Y.thousand)===1)&&(M=d.thousand,n=n/Y.thousand),M&&(M=(v?" ":"")+M),y){let _=n<0,A=n.toString().split(".")[0],T=_?A.length-1:A.length;g=Math.max(y-T,0)}return{value:n,abbreviation:M,mantissaPrecision:g}}function Ct({value:n,characteristicPrecision:t}){let[p,d]=n.toExponential().split("e"),v=+p;if(!t)return{value:v,abbreviation:`e${d}`};let y=1;return y=0?`+${d}`:d),{value:v,abbreviation:`e${d}`}}function Ne(n){let t="";for(let p=0;p0)p=y+O+Ne(v-O.length);else{let M=".";+y<0?M=`-0${M}`:M=`0${M}`;let w=(Ne(-v-1)+Math.abs(y)+O).substr(0,t);w.length0&&t>0&&(p+=`.${Ne(t)}`),p}function kt(n,t,p=Math.round){return n.toString().indexOf("e")!==-1?Pt(n,t):new Ot(p(+`${n}e+${t}`)/Math.pow(10,t)).toFixed(t)}function Ut(n,t,p,d,v,y){if(d===-1)return n;let O=kt(t,d,y),[M,w=""]=O.toString().split(".");if(w.match(/^0+$/)&&(p||v))return M;let g=w.match(/0+$/);return v&&g?`${M}.${w.toString().slice(0,g.index)}`:O.toString()}function Rt(n,t,p,d){let v=n,[y,O]=v.toString().split(".");if(y.match(/^-?0$/)&&p)return O?`${y.replace("0","")}.${O}`:y.replace("0","");const M=t<0&&y.indexOf("-")===0;if(M&&(y=y.slice(1),v=v.slice(1)),y.length0;v--)d===t&&(p.unshift(v),d=0),d++;return p}function Ft(n,t,p,d,v){let y=d.currentDelimiters(),O=y.thousands;v=v||y.decimal;let M=y.thousandsSize||3,w=n.toString(),g=w.split(".")[0],B=w.split(".")[1];const _=t<0&&g.indexOf("-")===0;return p&&(_&&(g=g.slice(1)),It(g.length,M).forEach((T,X)=>{g=g.slice(0,T+X)+O+g.slice(T+X)}),_&&(g=`-${g}`)),B?w=g+v+B:w=g,w}function Vt(n,t){return n+t}function qt(n,t,p){return t===0?n:+n==0?n.replace("-",""):t>0?`+${n}`:p==="sign"?n:`(${n.replace("-","")})`}function Gt(n,t){return t+n}function jt(n,t){return n+t}function xe({instance:n,providedFormat:t,state:p=le,decimalSeparator:d,defaults:v=p.currentDefaults()}){let y=n._value;if(y===0&&p.hasZeroFormat())return p.getZeroFormat();if(!isFinite(y))return y.toString();let O=Object.assign({},be,v,t),M=O.totalLength,w=M?0:O.characteristic,g=O.optionalCharacteristic,B=O.forceAverage,_=O.lowPrecision,A=!!M||!!B||O.average,T=M?-1:A&&t.mantissa===void 0?0:O.mantissa,X=M?!1:t.optionalMantissa===void 0?T===-1:O.optionalMantissa,P=O.trimMantissa,D=O.thousandSeparated,F=O.spaceSeparated,L=O.negative,Q=O.forceSign,te=O.exponential,R=O.roundingFunction,N="";if(A){let C=Lt({value:y,forceAverage:B,lowPrecision:_,abbreviations:p.currentAbbreviations(),spaceSeparated:F,roundingFunction:R,totalLength:M});y=C.value,N+=C.abbreviation,M&&(T=C.mantissaPrecision)}if(te){let C=Ct({value:y,characteristicPrecision:w});y=C.value,N=C.abbreviation+N}let x=Ut(y.toString(),y,X,T,P,R);return x=Rt(x,y,g,w),x=Ft(x,y,D,p,d),(A||te)&&(x=Vt(x,N)),(Q||y<0)&&(x=qt(x,y,L)),x}function ye(n,t){if(!n)return t;let p=Object.keys(n);return p.length===1&&p[0]==="output"?t:n}var Zt=n=>({format:(...t)=>Nt(...t,n),getByteUnit:(...t)=>Mt(...t,n),getBinaryByteUnit:(...t)=>$t(...t,n),getDecimalByteUnit:(...t)=>Bt(...t,n),formatOrDefault:ye});/*! * Copyright (c) 2017 Benjamin Van Ryseghem * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */const fe=We;function zt(n,t,p){let d=new fe(n._value),v=t;return p.isNumbro(t)&&(v=t._value),v=new fe(v),n._value=d.plus(v).toNumber(),n}function Xe(n,t,p){let d=new fe(n._value),v=t;return p.isNumbro(t)&&(v=t._value),v=new fe(v),n._value=d.minus(v).toNumber(),n}function Wt(n,t,p){let d=new fe(n._value),v=t;return p.isNumbro(t)&&(v=t._value),v=new fe(v),n._value=d.times(v).toNumber(),n}function Ht(n,t,p){let d=new fe(n._value),v=t;return p.isNumbro(t)&&(v=t._value),v=new fe(v),n._value=d.dividedBy(v).toNumber(),n}function Xt(n,t,p){let d=t;return p.isNumbro(t)&&(d=t._value),n._value=d,n}function Yt(n,t,p){let d=p(n._value);return Xe(d,t,p),Math.abs(d._value)}var Kt=n=>({add:(t,p)=>zt(t,p,n),subtract:(t,p)=>Xe(t,p,n),multiply:(t,p)=>Wt(t,p,n),divide:(t,p)=>Ht(t,p,n),set:(t,p)=>Xt(t,p,n),difference:(t,p)=>Yt(t,p,n),BigNumber:fe});/*! * Copyright (c) 2017 Benjamin Van Ryseghem * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */const Jt="2.5.0",se=Re(),Qt=ke(),er=wt(z),tr=Ze();let de=Zt(z),me=Kt(z);const rr=Ue;class Ye{constructor(t){this._value=t}clone(){return z(this._value)}format(t={}){return de.format(this,t)}formatCurrency(t){return typeof t=="string"&&(t=rr.parseFormat(t)),t=de.formatOrDefault(t,se.currentCurrencyDefaultFormat()),t.output="currency",de.format(this,t)}formatTime(t={}){return t.output="time",de.format(this,t)}binaryByteUnits(){return de.getBinaryByteUnit(this)}decimalByteUnits(){return de.getDecimalByteUnit(this)}byteUnits(){return de.getByteUnit(this)}difference(t){return me.difference(this,t)}add(t){return me.add(this,t)}subtract(t){return me.subtract(this,t)}multiply(t){return me.multiply(this,t)}divide(t){return me.divide(this,t)}set(t){return me.set(this,Ke(t))}value(){return this._value}valueOf(){return this._value}}function Ke(n){let t=n;return z.isNumbro(n)?t=n._value:typeof n=="string"?t=z.unformat(n):isNaN(n)&&(t=NaN),t}function z(n){return new Ye(Ke(n))}z.version=Jt;z.isNumbro=function(n){return n instanceof Ye};z.language=se.currentLanguage;z.registerLanguage=se.registerLanguage;z.setLanguage=se.setLanguage;z.languages=se.languages;z.languageData=se.languageData;z.zeroFormat=se.setZeroFormat;z.defaultFormat=se.currentDefaults;z.setDefaults=se.setDefaults;z.defaultCurrencyFormat=se.currentCurrencyDefaultFormat;z.validate=Qt.validate;z.loadLanguagesInNode=er.loadLanguagesInNode;z.unformat=tr.unformat;z.BigNumber=me.BigNumber;var nr=z,ir=Qe(nr);export{ir as n};