Socket
Socket
Sign inDemoInstall

@formatjs/intl-unified-numberformat

Package Overview
Dependencies
Maintainers
3
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@formatjs/intl-unified-numberformat - npm Package Compare versions

Comparing version 3.3.4 to 3.3.5

dist/numbering-systems.json

8

CHANGELOG.md

@@ -6,2 +6,10 @@ # Change Log

## 3.3.5 (2020-04-28)
**Note:** Version bump only for package @formatjs/intl-unified-numberformat
## [3.3.4](https://github.com/formatjs/formatjs/compare/@formatjs/intl-unified-numberformat@3.3.3...@formatjs/intl-unified-numberformat@3.3.4) (2020-04-24)

@@ -8,0 +16,0 @@

1

dist/core.d.ts

@@ -19,2 +19,3 @@ import { Unit } from './units-constants';

unitDisplay?: UnifiedNumberFormatOptionsUnitDisplay;
numberingSystem?: string;
};

@@ -21,0 +22,0 @@ export declare type ResolvedUnifiedNumberFormatOptions = Intl.ResolvedNumberFormatOptions & Pick<UnifiedNumberFormatInternal, 'currencySign' | 'unit' | 'unitDisplay' | 'notation' | 'compactDisplay' | 'signDisplay'>;

@@ -15,2 +15,8 @@ "use strict";

var ILND = require("./ilnd-numbers.json");
var numbering_systems_json_1 = require("./numbering-systems.json");
var VALID_NUMBERING_SYSTEM_NAMES = Object.create(null);
for (var _i = 0, numberingSystemNames_1 = numbering_systems_json_1.names; _i < numberingSystemNames_1.length; _i++) {
var nu = numberingSystemNames_1[_i];
VALID_NUMBERING_SYSTEM_NAMES[nu] = true;
}
var RESOLVED_OPTIONS_KEYS = [

@@ -101,2 +107,10 @@ 'locale',

opt.localeMatcher = matcher;
var numberingSystem = intl_utils_1.getOption(options, 'numberingSystem', 'string', undefined, undefined);
if (numberingSystem !== undefined &&
!VALID_NUMBERING_SYSTEM_NAMES[numberingSystem]) {
// 8.a. If numberingSystem does not match the Unicode Locale Identifier type nonterminal,
// throw a RangeError exception.
throw RangeError("Invalid numberingSystems: " + numberingSystem);
}
opt.nu = numberingSystem;
var localeData = exports.UnifiedNumberFormat.localeData;

@@ -107,8 +121,7 @@ var r = intl_utils_1.createResolveLocale(exports.UnifiedNumberFormat.getDefaultLocale)(exports.UnifiedNumberFormat.availableLocales, requestedLocales, opt,

var ildData = localeData[removeUnicodeExtensionFromLocale(r.locale)];
var numberingSystem = r.nu;
intl_utils_1.setMultiInternalSlots(__INTERNAL_SLOT_MAP__, nf, {
locale: r.locale,
dataLocale: r.dataLocale,
numberingSystem: numberingSystem,
ild: data_1.extractILD(ildData.units, ildData.currencies, ildData.numbers, numberingSystem),
numberingSystem: r.nu,
ild: data_1.extractILD(ildData.units, ildData.currencies, ildData.numbers, r.nu),
});

@@ -115,0 +128,0 @@ // https://tc39.es/proposal-unified-intl-numberformat/section11/numberformat_proposed_out.html#sec-setnumberformatunitoptions

2

dist/umd/intl-unified-numberformat.min.js

@@ -1,2 +0,2 @@

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).IntlUnifiedNumberFormat={})}(this,function(e){"use strict";function R(e,t,n){if(void 0===n&&(n=Error),!e)throw new n(t)}function D(e){if(null==e)throw new TypeError("undefined/null cannot be converted to object");return Object(e)}function v(e,t,n,r,i){var u=e[t];if(void 0===u)return i;if("boolean"!==n&&"string"!==n)throw new TypeError("invalid type");if("boolean"===n&&(u=Boolean(u)),"string"===n&&(u=function(e){if("symbol"==typeof e)throw TypeError("Cannot convert a Symbol value to a string");return String(e)}(u)),void 0!==r&&!r.filter(function(e){return e==u}).length)throw new RangeError(u+" is not within "+r.join(", "));return u}function l(e,t,n,r){if(void 0===e)return r;if(e=Number(e),isNaN(e)||e<t||n<e)throw new RangeError(e+" is outside of range ["+t+", "+n+"]");return Math.floor(e)}function S(e,t,n,r){e.get(t)||e.set(t,Object.create(null)),e.get(t)[n]=r}function F(e,t,n){for(var r=0,i=Object.keys(n);r<i.length;r++){var u=i[r];S(e,t,u,n[u])}}function K(e,t,n){return U(e,t,n)[n]}function U(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=e.get(t);if(!i)throw new TypeError(t+" InternalSlot has not been initialized");return n.reduce(function(e,t){return e[t]=i[t],e},Object.create(null))}function P(e,t,n,r,i){var u=function(e,t,n,r,i){return l(e[t],n,r,i)}(n,"minimumIntegerDigits",1,21,1),a=n.minimumFractionDigits,o=n.maximumFractionDigits,c=n.minimumSignificantDigits,s=n.maximumSignificantDigits;if(S(e,t,"minimumIntegerDigits",u),void 0!==c||void 0!==s)S(e,t,"roundingType","significantDigits"),s=l(s,c=l(c,1,21,1),21,21),S(e,t,"minimumSignificantDigits",c),S(e,t,"maximumSignificantDigits",s);else if(void 0!==a||void 0!==o){S(e,t,"roundingType","fractionDigits"),o=l(o,a=l(a,0,20,r),20,Math.max(a,i)),S(e,t,"minimumFractionDigits",a),S(e,t,"maximumFractionDigits",o)}else"compact"===K(e,t,"notation")?S(e,t,"roundingType","compactRounding"):(S(e,t,"roundingType","fractionDigits"),S(e,t,"minimumFractionDigits",r),S(e,t,"maximumFractionDigits",i))}function Z(e,t){return Object.is?Object.is(e,t):e===t?0!==e||1/e==1/t:e!=e&&t!=t}var O=/[^A-Z]/;function C(e){var t=Intl.getCanonicalLocales;return"function"==typeof t?t(e):Intl.DateTimeFormat.supportedLocalesOf(e||"")}var r,t=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),u=function(){return(u=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function E(e){var D=function(c){return function(e,t){for(var n={locale:""},r=0,i=t;r<i.length;r++){var u=i[r],a=u.replace(s,""),o=p(e,a);if(o)return n.locale=o,u!==a&&(n.extension=u.slice(a.length+1,u.length)),n}return n.locale=c(),n}}(e),v=function(c){return function(e,t){for(var n={locale:""},r=0,i=t;r<i.length;r++){var u=i[r],a=u.replace(s,""),o=p(e,a);if(o)return n.locale=o,u!==a&&(n.extension=u.slice(a.length+1,u.length)),n}return n.locale=c(),n}}(e);return function(e,t,n,r,i){for(var u,a=(u="lookup"===n.localeMatcher?D(e,t):v(e,t)).locale,o={locale:"",dataLocale:a},c="-u",s=0,l=r;s<l.length;s++){var p=l[s],g=i[a];R("object"==typeof g&&null!==g,"locale data "+p+" must be an object");var y=g[p];R(Array.isArray(y),"keyLocaleData for "+p+" must be an array");var m=y[0];R("string"==typeof m||null===m,"value must be string or null");var f="";if(u.extension){var h=j(u.extension,p);void 0!==h&&(""!==h?~y.indexOf(h)&&(f="-"+p+"-"+(m=h)):~h.indexOf("true")&&(m="true",f="-"+p))}if(p in n){var b=n[p];R("string"==typeof b||null==b,"optionsValue must be String, Undefined or Null"),~y.indexOf(b)&&b!==m&&(m=b,f="")}o[p]=m,c+=f}if(2<c.length){var d=a.indexOf("-x-");if(-1===d)a+=c;else a=a.slice(0,d)+c+a.slice(d,a.length);a=C(a)[0]}return o.locale=a,o}}function j(e,t){R(2===t.length,"key must have 2 elements");var n=e.length,r="-"+t+"-",i=e.indexOf(r);if(-1!==i){for(var u=i+4,a=u,o=u,c=!1;!c;){var s=e.indexOf("-",o);2===(-1===s?n-o:s-o)?c=!0:-1===s?(a=n,c=!0):o=(a=s)+1}return e.slice(u,a)}if(r="-"+t,-1!==(i=e.indexOf(r))&&i+3===n)return""}var s=/-u(?:-[0-9a-z]{2,8})+/gi;function p(e,t){for(var n=t;;){if(~e.indexOf(n))return n;var r=n.lastIndexOf("-");if(!~r)return;2<=r&&"-"===n[r-2]&&(r-=2),n=n.slice(0,r)}}function i(e,t){for(var n=[],r=0,i=t;r<i.length;r++){var u=p(e,i[r].replace(s,""));u&&n.push(u)}return n}var n,a=(n=Error,t(o,n),o);function o(){var e=null!==n&&n.apply(this,arguments)||this;return e.type="MISSING_LOCALE_DATA",e}function c(e,t,n){void 0===n&&(n=function(e,t){return u(u({},e),t)});var r=function(e,t,n){var r=[e];t[e]&&(e=t[e],r.push(e));var i=n[e];i&&r.push(i);for(var u=e.split("-"),a=u.length;1<a;a--)r.push(u.slice(0,a-1).join("-"));return r}(e,t.aliases,t.parentLocales),i=r.map(function(e){return t.data[e]}).filter(Boolean);if(!i.length)throw new a('Missing locale data for "'+e+'", lookup hierarchy: '+r.join(", "));return i.reverse(),i.reduce(n,{})}var Y,g;function G(e){return Math.floor(Math.log(e)*Math.LOG10E)}function z(e,t,n){var r,i,u,a=n,o=e*Math.pow(10,a),c=Math.floor(o),s=Math.ceil(o),l=(r=o-c<s-o?c:s)/Math.pow(10,a);if(r<1e21)i=r.toString();else{var p=(i=r.toString()).indexOf("."),g=i.indexOf("e+"),y=parseInt(i.substring(g+2),10);i=i.substring(0,p)+i.substring(p+1,g)+b("0",y-(g-p-1))}if(0!==a){var m=i.length;if(m<=a)i=b("0",a+1-m)+i,m=a+1;var f=i.slice(0,m-a);i=f+"."+i.slice(m-a),u=f.length}else u=i.length;for(var h=n-t;0<h&&"0"===i[i.length-1];)i=i.slice(0,-1),h--;return"."===i[i.length-1]&&(i=i.slice(0,-1)),{formattedString:i,roundedNumber:l,integerDigitsCount:u}}function y(e,t,n){var r,i,u,a,o=n;if(0===e)r=b("0",o),u=i=0;else{var c=void 0,s=(i=G(e))-o+1,l=s<0?e*Math.pow(10,-s):e/Math.pow(10,s),p=Math.floor(l),g=Math.ceil(l);r=(c=l-p<g-l?p:g).toString(),u=c*Math.pow(10,i-o+1)}if(a=o-1<=i?(r+=b("0",i-o+1),i+1):0<=i?(r=r.slice(0,i+1)+"."+r.slice(i+1),i+1):(r="0."+b("0",-i-1)+r,1),0<=r.indexOf(".")&&t<n){for(var y=n-t;0<y&&"0"===r[r.length-1];)r=r.slice(0,-1),y--;"."===r[r.length-1]&&(r=r.slice(0,-1))}return{formattedString:r,roundedNumber:u,integerDigitsCount:a}}function b(e,t){if("function"==typeof e.repeat)return e.repeat(t);for(var n=new Array(t),r=0;r<n.length;r++)n[r]=e;return n.join("")}(g=Y||(Y={})).compactName="compactName",g.compactSymbol="compactSymbol",g.currencyCode="currencyCode",g.currencyName="currencyName",g.currencyNarrowSymbol="currencyNarrowSymbol",g.currencySymbol="currencySymbol",g.minusSign="minusSign",g.number="number",g.percentSign="percentSign",g.plusSign="plusSign",g.scientificExponent="scientificExponent",g.scientificSeparator="scientificSeparator",g.unitName="unitName",g.unitNarrowSymbol="unitNarrowSymbol",g.unitSymbol="unitSymbol";var m,f=(m=function(e,t){return(m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}m(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});function h(e,t,n){if(void 0===n&&(n=Error),!e)throw new n(t)}var d=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20BF\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B98-\u2BFF\u2CE5-\u2CEA\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uFB29\uFBB2-\uFBC1\uFDFC\uFDFD\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9B\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDE8\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD10-\uDD6C\uDD70-\uDDAC\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED5\uDEE0-\uDEEC\uDEF0-\uDEFA\uDF00-\uDF73\uDF80-\uDFD8\uDFE0-\uDFEB]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDD00-\uDD0B\uDD0D-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDE53\uDE60-\uDE6D\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95]/,w=/¤/g,x=/\{1\}/g,A=/\{0\}/g;function N(r){if(r)return Object.keys(r).reduce(function(e,t){var n=r[t];return e[t]=Object.keys(n).reduce(function(e,t){return e[t]=(n[t]||"").replace(/[¤0]/g,"").replace(/'(.*?)'/g,"$1").trim(),e},{other:n.other.replace(/[¤0]/g,"").replace(/'(.*?)'/g,"$1").trim()}),e},Object.create(null))}function B(n,r){return Object.keys(n).reduce(function(e,t){return e[t]=n[t][r],e},{other:n.other[r]})}function L(e){return Array.isArray(e)?e.map(function(e){return"{"+e+"}"}).join(""):"{"+e+"}"}var k=/[#0](?:[\.,][#0]+)*/g,M=L([Y.number,Y.scientificSeparator,Y.scientificExponent]),T=L([Y.minusSign,Y.number,Y.scientificSeparator,Y.scientificExponent]),_=L([Y.number]),I=L([Y.minusSign,Y.number]),W=_+";"+I,V=M+";"+T;function X(e,t){void 0===t&&(t=Y.compactSymbol);var n=e.replace(/0+/,"").trim();n&&(e=e.replace(n,L(t)));var r=-1<e.indexOf("-")?e:e.replace(/(0+)/,"-$1");return[e.replace(/0+/,"{number}"),r.replace(/0+/,"{number}")]}function H(e,t){void 0===t&&(t=Y.compactSymbol);var n=e.replace(/[¤0]/g,"").trim();n&&(e=e.replace(n,L(t)));var r=-1<e.indexOf("-")?e:"-"+e;return e.replace(/0+/,"{number}")+";"+r.replace(/0+/,"{number}")}var J=/[^\s;(-]¤/,$=/¤[^\s);]/;function Q(e,t,n){return function(e,t){return $.test(t)&&!d.test(e[e.length-1])}(e,t)?t.replace(w,"¤"+n):function(e,t){return J.test(t)&&!d.test(e[0])}(e,t)?t.replace(w,n+"¤"):t}var q=(Object.defineProperty(ee.prototype,"decimal",{get:function(){return this.decimalPatterns||(this.decimalPatterns=new ue(this.numbers,this.numberingSystem)),this.decimalPatterns},enumerable:!0,configurable:!0}),Object.defineProperty(ee.prototype,"percent",{get:function(){return this.percentPatterns||(this.percentPatterns=new ce(this.numbers,this.numberingSystem)),this.percentPatterns},enumerable:!0,configurable:!0}),Object.defineProperty(ee.prototype,"unit",{get:function(){return this.unitPatterns||(h(!!this._unit,"unit must be supplied"),this.unitPatterns=Object.create(null),this.unitPatterns[this._unit]=new pe(this.units,this.numbers,this.numberingSystem,this._unit)),this.unitPatterns},enumerable:!0,configurable:!0}),Object.defineProperty(ee.prototype,"currency",{get:function(){return this.currencyPatterns||(h(!!this._currency,"currency must be supplied"),h(!!this.currencySign,"currencySign must be supplied"),this.currencyPatterns=Object.create(null),this.currencyPatterns[this._currency]=new fe(this.currencies,this.numbers,this.numberingSystem,this._currency,this.currencySign)),this.currencyPatterns},enumerable:!0,configurable:!0}),ee);function ee(e,t,n,r,i,u,a){this.units=e,this.currencies=t,this.numbers=n,this.numberingSystem=r,this._unit=i,this._currency=u,this.currencySign=a}function te(e,t){h(!!e,"Pattern should have existed");var n=e.split(";"),r=n[0],i=n[1];h(!!i,'negativePattern should have existed but got "'+e+'"');var u=r.replace("+",""),a=r;switch(a=-1<(i=i.replace("-",L(Y.minusSign))).indexOf(Y.minusSign)?i.replace(Y.minusSign,Y.plusSign):-1<r.indexOf("+")?r=r.replace("+",L(Y.plusSign)):""+L(Y.plusSign)+u,r=r.replace("{0}",L(Y.number)),a=a.replace("{0}",L(Y.number)),i=i.replace("{0}",L(Y.number)),u=u.replace("{0}",L(Y.number)),t){case"always":return{positivePattern:a,zeroPattern:a,negativePattern:i};case"auto":return{positivePattern:r,zeroPattern:r,negativePattern:i};case"exceptZero":return{positivePattern:a,zeroPattern:u,negativePattern:i};case"never":return{positivePattern:u,zeroPattern:u,negativePattern:u}}}var ne=(Object.defineProperty(re.prototype,"compactShort",{get:function(){return this.notation="compactShort",this},enumerable:!0,configurable:!0}),Object.defineProperty(re.prototype,"compactLong",{get:function(){return this.notation="compactLong",this},enumerable:!0,configurable:!0}),Object.defineProperty(re.prototype,"1000",{get:function(){return this.produceCompactSignPattern("1000")},enumerable:!0,configurable:!0}),Object.defineProperty(re.prototype,"10000",{get:function(){return this.produceCompactSignPattern("10000")},enumerable:!0,configurable:!0}),Object.defineProperty(re.prototype,"100000",{get:function(){return this.produceCompactSignPattern("100000")},enumerable:!0,configurable:!0}),Object.defineProperty(re.prototype,"1000000",{get:function(){return this.produceCompactSignPattern("1000000")},enumerable:!0,configurable:!0}),Object.defineProperty(re.prototype,"10000000",{get:function(){return this.produceCompactSignPattern("10000000")},enumerable:!0,configurable:!0}),Object.defineProperty(re.prototype,"100000000",{get:function(){return this.produceCompactSignPattern("100000000")},enumerable:!0,configurable:!0}),Object.defineProperty(re.prototype,"1000000000",{get:function(){return this.produceCompactSignPattern("1000000000")},enumerable:!0,configurable:!0}),Object.defineProperty(re.prototype,"10000000000",{get:function(){return this.produceCompactSignPattern("10000000000")},enumerable:!0,configurable:!0}),Object.defineProperty(re.prototype,"100000000000",{get:function(){return this.produceCompactSignPattern("100000000000")},enumerable:!0,configurable:!0}),Object.defineProperty(re.prototype,"1000000000000",{get:function(){return this.produceCompactSignPattern("1000000000000")},enumerable:!0,configurable:!0}),Object.defineProperty(re.prototype,"10000000000000",{get:function(){return this.produceCompactSignPattern("10000000000000")},enumerable:!0,configurable:!0}),Object.defineProperty(re.prototype,"100000000000000",{get:function(){return this.produceCompactSignPattern("100000000000000")},enumerable:!0,configurable:!0}),re);function re(){}var ie,ue=(f(ae,ie=ne),ae.prototype.produceCompactSignPattern=function(e){this.compactSignPattern||(this.compactSignPattern=Object.create(null));var t=this.compactSignPattern;return t[e]||(h(!!this.signDisplay,"Sign Display should have existed"),"compactLong"===this.notation?t[e]=te(X(this.numbers.decimal[this.numberingSystem].long[e].other,Y.compactName).join(";"),this.signDisplay):t[e]=te(X(this.numbers.decimal[this.numberingSystem].short[e].other,Y.compactSymbol).join(";"),this.signDisplay)),t[e]},Object.defineProperty(ae.prototype,"always",{get:function(){return this.signDisplay="always",this},enumerable:!0,configurable:!0}),Object.defineProperty(ae.prototype,"auto",{get:function(){return this.signDisplay="auto",this},enumerable:!0,configurable:!0}),Object.defineProperty(ae.prototype,"never",{get:function(){return this.signDisplay="never",this},enumerable:!0,configurable:!0}),Object.defineProperty(ae.prototype,"exceptZero",{get:function(){return this.signDisplay="exceptZero",this},enumerable:!0,configurable:!0}),Object.defineProperty(ae.prototype,"standard",{get:function(){return this.signPattern||(h(!!this.signDisplay,"Sign Display should have existed"),this.signPattern=te(W,this.signDisplay)),this.signPattern},enumerable:!0,configurable:!0}),Object.defineProperty(ae.prototype,"scientific",{get:function(){return this.signPattern||(h(!!this.signDisplay,"Sign Display should have existed"),this.signPattern=te(V,this.signDisplay)),this.signPattern},enumerable:!0,configurable:!0}),ae);function ae(e,t){var n=ie.call(this)||this;return n.numbers=e,n.numberingSystem=t,n}var oe,ce=(f(se,oe=ue),se.prototype.generateStandardOrScientificPattern=function(e){h(!!this.signDisplay,"Sign Display should have existed");var t=this.numbers.percent[this.numberingSystem].replace(/%/g,L(Y.percentSign)).replace(k,e?M:L(Y.number));return t.indexOf(";")<0&&(t+=";"+L(Y.minusSign)+t),te(t,this.signDisplay)},Object.defineProperty(se.prototype,"standard",{get:function(){return this.signPattern||(this.signPattern=this.generateStandardOrScientificPattern()),this.signPattern},enumerable:!0,configurable:!0}),Object.defineProperty(se.prototype,"scientific",{get:function(){return this.signPattern||(this.signPattern=this.generateStandardOrScientificPattern(!0)),this.signPattern},enumerable:!0,configurable:!0}),se);function se(){return null!==oe&&oe.apply(this,arguments)||this}var le,pe=(f(ge,le=ne),ge.prototype.generateStandardOrScientificPattern=function(e){h(!!this.signDisplay,"Sign Display should have existed"),h(!!this.pattern,"Pattern must exist");var t,n=this.pattern;return n.indexOf(";")<0&&(t=n.replace("{0}","-{0}"),n+=";"+t),te(n=n.replace(A,e?M:L(Y.number)),this.signDisplay)},ge.prototype.produceCompactSignPattern=function(e){this.compactSignPattern||(this.compactSignPattern=Object.create(null));var t=this.compactSignPattern;if(!t[e]){h(!!this.pattern,"Pattern should exist"),h(!!this.signDisplay,"Sign Display should exist");var n=this.pattern,r=void 0;r="compactShort"===this.notation?X(this.numbers.decimal[this.numberingSystem].short[e].other,Y.compactSymbol):X(this.numbers.decimal[this.numberingSystem].long[e].other,Y.compactName),n=n.replace("{0}",r[0])+";"+n.replace("{0}",r[1]),t[e]=te(n,this.signDisplay)}return t[e]},Object.defineProperty(ge.prototype,"narrow",{get:function(){return this.pattern||(this.pattern=this.units[this.unit].narrow.other.pattern.replace(x,L(Y.unitNarrowSymbol))),this},enumerable:!0,configurable:!0}),Object.defineProperty(ge.prototype,"short",{get:function(){return this.pattern||(this.pattern=this.units[this.unit].short.other.pattern.replace(x,L(Y.unitSymbol))),this},enumerable:!0,configurable:!0}),Object.defineProperty(ge.prototype,"long",{get:function(){return this.pattern||(this.pattern=this.units[this.unit].long.other.pattern.replace(x,L(Y.unitName))),this},enumerable:!0,configurable:!0}),Object.defineProperty(ge.prototype,"always",{get:function(){return this.signDisplay="always",this},enumerable:!0,configurable:!0}),Object.defineProperty(ge.prototype,"auto",{get:function(){return this.signDisplay="auto",this},enumerable:!0,configurable:!0}),Object.defineProperty(ge.prototype,"never",{get:function(){return this.signDisplay="never",this},enumerable:!0,configurable:!0}),Object.defineProperty(ge.prototype,"exceptZero",{get:function(){return this.signDisplay="exceptZero",this},enumerable:!0,configurable:!0}),Object.defineProperty(ge.prototype,"standard",{get:function(){return this.signPattern||(this.signPattern=this.generateStandardOrScientificPattern()),this.signPattern},enumerable:!0,configurable:!0}),Object.defineProperty(ge.prototype,"scientific",{get:function(){return this.signPattern||(this.signPattern=this.generateStandardOrScientificPattern(!0)),this.signPattern},enumerable:!0,configurable:!0}),ge);function ge(e,t,n,r){var i=le.call(this)||this;return i.unit=r,i.units=e,i.numbers=t,i.numberingSystem=n,i}function ye(e,t,n,r,i){var u=t.short,a=t.long||t.short,o="";switch(n){case"compactLong":return H(Q(e,o=(null==a?void 0:a[i].other)||(null==u?void 0:u[i].other)||t.standard,t.currencySpacing.beforeInsertBetween),Y.compactName);case"compactShort":return H(Q(e,o=(null==u?void 0:u[i].other)||t.standard,t.currencySpacing.beforeInsertBetween),Y.compactSymbol);case"scientific":return(o=Q(e,o="accounting"===r?t.accounting:t.standard,t.currencySpacing.beforeInsertBetween)).indexOf(";")<0&&(o+=";-"+o),o.replace(k,M);case"standard":return(o=Q(e,o="accounting"===r?t.accounting:t.standard,t.currencySpacing.beforeInsertBetween)).indexOf(";")<0&&(o+=";-"+o),o.replace(k,L(Y.number))}}function me(e,t,n,r){var i,u=e.currency[t].unitPattern.replace(x,L(Y.currencyName));switch(n){case"compactLong":i=X(e.decimal[t].long[r].other,Y.compactName);break;case"compactShort":i=X(e.decimal[t].short[r].other,Y.compactSymbol);break;case"scientific":i=[M,T];break;case"standard":i=[_,I]}return u.replace("{0}",i[0])+";"+u.replace("{0}",i[1])}var fe=(Object.defineProperty(he.prototype,"code",{get:function(){return this.currencySlotToken=Y.currencyCode,this.resolvedCurrency=this.currency,this},enumerable:!0,configurable:!0}),Object.defineProperty(he.prototype,"symbol",{get:function(){return this.currencySlotToken=Y.currencySymbol,this.resolvedCurrency=this.currencies[this.currency].symbol,this},enumerable:!0,configurable:!0}),Object.defineProperty(he.prototype,"narrowSymbol",{get:function(){return this.currencySlotToken=Y.currencyNarrowSymbol,this.resolvedCurrency=this.currencies[this.currency].narrow,this},enumerable:!0,configurable:!0}),Object.defineProperty(he.prototype,"name",{get:function(){return this.currencySlotToken=Y.currencyName,this.resolvedCurrency=this.currencies[this.currency].displayName.other,this},enumerable:!0,configurable:!0}),Object.defineProperty(he.prototype,"accounting",{get:function(){return this.currencySign="accounting",this.signDisplayPatterns||(h(!!this.currencySign,"Currency Sign should have existed"),h(!!this.currencySlotToken,"Currency Slot Token should have existed"),h(!!this.resolvedCurrency,"Currency should have been resolved"),this.signDisplayPatterns=new de(this.resolvedCurrency,this.numbers,this.numberingSystem,this.currencySign,this.currencySlotToken)),this.signDisplayPatterns},enumerable:!0,configurable:!0}),Object.defineProperty(he.prototype,"standard",{get:function(){return this.currencySign="standard",this.signDisplayPatterns||(h(!!this.currencySign,"Currency Sign should have existed"),h(!!this.currencySlotToken,"Currency Display should have existed"),h(!!this.resolvedCurrency,"Currency should have been resolved"),this.signDisplayPatterns=new de(this.resolvedCurrency,this.numbers,this.numberingSystem,this.currencySign,this.currencySlotToken)),this.signDisplayPatterns},enumerable:!0,configurable:!0}),he);function he(e,t,n,r,i){this.currency=r,this.currencies=e,this.numbers=t,this.numberingSystem=n,this.currencySign=i}var be,de=(f(De,be=ne),Object.defineProperty(De.prototype,"always",{get:function(){return this.signDisplay="always",this},enumerable:!0,configurable:!0}),Object.defineProperty(De.prototype,"auto",{get:function(){return this.signDisplay="auto",this},enumerable:!0,configurable:!0}),Object.defineProperty(De.prototype,"never",{get:function(){return this.signDisplay="never",this},enumerable:!0,configurable:!0}),Object.defineProperty(De.prototype,"exceptZero",{get:function(){return this.signDisplay="exceptZero",this},enumerable:!0,configurable:!0}),Object.defineProperty(De.prototype,"standard",{get:function(){if(!this.signPattern){h(!!this.currencySign,"Currency sign should exist"),h(!!this.signDisplay,"Sign display must exist");var e="";e=this.currencySlotToken===Y.currencyName?me(this.numbers,this.numberingSystem,"standard","1000"):ye(this.currency,this.numbers.currency[this.numberingSystem],"standard",this.currencySign,"1000").replace(w,L(this.currencySlotToken)),this.signPattern=te(e,this.signDisplay)}return this.signPattern},enumerable:!0,configurable:!0}),Object.defineProperty(De.prototype,"scientific",{get:function(){if(!this.signPattern){h(!!this.currencySign,"Currency sign should exist"),h(!!this.signDisplay,"Sign display must exist");var e="";e=this.currencySlotToken===Y.currencyName?me(this.numbers,this.numberingSystem,"scientific","1000"):ye(this.currency,this.numbers.currency[this.numberingSystem],"scientific",this.currencySign,"1000").replace(w,L(this.currencySlotToken)),this.signPattern=te(e,this.signDisplay)}return this.signPattern},enumerable:!0,configurable:!0}),De.prototype.produceCompactSignPattern=function(e){this.compactSignPattern||(this.compactSignPattern=Object.create(null));var t=this.compactSignPattern;if(!t[e]){h(!!this.currencySign,"Currency sign should exist"),h(!!this.signDisplay,"Sign display must exist");var n="";n=this.currencySlotToken===Y.currencyName?me(this.numbers,this.numberingSystem,this.notation,e):ye(this.currency,this.numbers.currency[this.numberingSystem],this.notation,this.currencySign,e).replace(w,L(this.currencySlotToken)),t[e]=function(e,t){return t?{positivePattern:t(e.positivePattern),zeroPattern:t(e.zeroPattern),negativePattern:t(e.negativePattern)}:e}(te(n,this.signDisplay),function(e){return e.replace(/0+/,"{number}")})}return t[e]},De);function De(e,t,n,r,i){var u=be.call(this)||this;return u.currency=e,u.numbers=t,u.numberingSystem=n,u.currencySign=r,u.currencySlotToken=i,u}var ve={ADP:0,AFN:0,ALL:0,AMD:2,BHD:3,BIF:0,BYN:2,BYR:0,CAD:2,CHF:2,CLF:4,CLP:0,COP:2,CRC:2,CZK:2,DEFAULT:2,DJF:0,DKK:2,ESP:0,GNF:0,GYD:2,HUF:2,IDR:2,IQD:0,IRR:0,ISK:0,ITL:0,JOD:3,JPY:0,KMF:0,KPW:0,KRW:0,KWD:3,LAK:0,LBP:0,LUF:0,LYD:3,MGA:0,MGF:0,MMK:0,MNT:2,MRO:0,MUR:2,NOK:2,OMR:3,PKR:2,PYG:0,RSD:0,RWF:0,SEK:2,SLL:0,SOS:0,STD:0,SYP:0,TMM:0,TND:3,TRL:0,TWD:2,TZS:2,UGX:0,UYI:0,UYW:4,UZS:2,VEF:2,VND:0,VUV:0,XAF:0,XOF:0,XPF:0,YER:0,ZMK:0,ZWD:0},Se=Object.freeze({__proto__:null,ADP:0,AFN:0,ALL:0,AMD:2,BHD:3,BIF:0,BYN:2,BYR:0,CAD:2,CHF:2,CLF:4,CLP:0,COP:2,CRC:2,CZK:2,DEFAULT:2,DJF:0,DKK:2,ESP:0,GNF:0,GYD:2,HUF:2,IDR:2,IQD:0,IRR:0,ISK:0,ITL:0,JOD:3,JPY:0,KMF:0,KPW:0,KRW:0,KWD:3,LAK:0,LBP:0,LUF:0,LYD:3,MGA:0,MGF:0,MMK:0,MNT:2,MRO:0,MUR:2,NOK:2,OMR:3,PKR:2,PYG:0,RSD:0,RWF:0,SEK:2,SLL:0,SOS:0,STD:0,SYP:0,TMM:0,TND:3,TRL:0,TWD:2,TZS:2,UGX:0,UYI:0,UYW:4,UZS:2,VEF:2,VND:0,VUV:0,XAF:0,XOF:0,XPF:0,YER:0,ZMK:0,ZWD:0,default:ve}),Fe=["٠","١","٢","٣","٤","٥","٦","٧","٨","٩"],Pe=["۰","۱","۲","۳","۴","۵","۶","۷","۸","۹"],Oe=["᭐","᭑","᭒","᭓","᭔","᭕","᭖","᭗","᭘","᭙"],Ce=["০","১","২","৩","৪","৫","৬","৭","৮","৯"],Ee=["०","१","२","३","४","५","६","७","८","९"],je=["0","1","2","3","4","5","6","7","8","9"],we=["૦","૧","૨","૩","૪","૫","૬","૭","૮","૯"],xe=["੦","੧","੨","੩","੪","੫","੬","੭","੮","੯"],Ae=["០","១","២","៣","៤","៥","៦","៧","៨","៩"],Ne=["೦","೧","೨","೩","೪","೫","೬","೭","೮","೯"],Be=["໐","໑","໒","໓","໔","໕","໖","໗","໘","໙"],Le=["0","1","2","3","4","5","6","7","8","9"],ke=["᥆","᥇","᥈","᥉","᥊","᥋","᥌","᥍","᥎","᥏"],Me=["൦","൧","൨","൩","൪","൫","൬","൭","൮","൯"],Te=["᠐","᠑","᠒","᠓","᠔","᠕","᠖","᠗","᠘","᠙"],_e=["၀","၁","၂","၃","၄","၅","၆","၇","၈","၉"],Ie=["୦","୧","୨","୩","୪","୫","୬","୭","୮","୯"],Re=["௦","௧","௨","௩","௪","௫","௬","௭","௮","௯"],Ke=["౦","౧","౨","౩","౪","౫","౬","౭","౮","౯"],Ue=["๐","๑","๒","๓","๔","๕","๖","๗","๘","๙"],Ze=["༠","༡","༢","༣","༤","༥","༦","༧","༨","༩"],Ye=["〇","一","二","三","四","五","六","七","八","九"],Ge={arab:Fe,arabext:Pe,bali:Oe,beng:Ce,deva:Ee,fullwide:je,gujr:we,guru:xe,khmr:Ae,knda:Ne,laoo:Be,latn:Le,limb:ke,mlym:Me,mong:Te,mymr:_e,orya:Ie,tamldec:Re,telu:Ke,thai:Ue,tibt:Ze,hanidec:Ye},ze=Object.freeze({__proto__:null,arab:Fe,arabext:Pe,bali:Oe,beng:Ce,deva:Ee,fullwide:je,gujr:we,guru:xe,khmr:Ae,knda:Ne,laoo:Be,latn:Le,limb:ke,mlym:Me,mong:Te,mymr:_e,orya:Ie,tamldec:Re,telu:Ke,thai:Ue,tibt:Ze,hanidec:Ye,default:Ge}),We=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var u=arguments[t],a=0,o=u.length;a<o;a++,i++)r[i]=u[a];return r},Ve=["locale","numberingSystem","style","currency","currencyDisplay","currencySign","unit","unitDisplay","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","useGrouping","notation","compactDisplay","signDisplay"],Xe=["angle-degree","area-acre","area-hectare","concentr-percent","digital-bit","digital-byte","digital-gigabit","digital-gigabyte","digital-kilobit","digital-kilobyte","digital-megabit","digital-megabyte","digital-petabyte","digital-terabit","digital-terabyte","duration-day","duration-hour","duration-millisecond","duration-minute","duration-month","duration-second","duration-week","duration-year","length-centimeter","length-foot","length-inch","length-kilometer","length-meter","length-mile-scandinavian","length-mile","length-millimeter","length-yard","mass-gram","mass-kilogram","mass-ounce","mass-pound","mass-stone","temperature-celsius","temperature-fahrenheit","volume-fluid-ounce","volume-gallon","volume-liter","volume-milliliter"].map(function(e){return e.replace(/^(.*?)-/,"")});function He(e){var t=e.indexOf("-u-");return 0<=t?e.slice(0,t):e}var Je=new WeakMap;function $e(e,t,n){var r=C(t),i=void 0===n?Object.create(null):D(n),u=Object.create(null),a=v(i,"localeMatcher","string",["best fit","lookup"],"best fit");u.localeMatcher=a;var o=qe.localeData,c=E(qe.getDefaultLocale)(qe.availableLocales,r,u,["nu"],o),s=o[He(c.locale)],l=c.nu;F(Je,e,{locale:c.locale,dataLocale:c.dataLocale,numberingSystem:l,ild:function(n,r,e,t){return{decimal:{compactShort:N(e.decimal[t].short),compactLong:N(e.decimal[t].long)},currency:{compactShort:N(e.currency[t].short)},symbols:e.symbols[t],currencySymbols:Object.keys(r).reduce(function(e,t){return e[t]={currencyName:r[t].displayName,currencySymbol:r[t].symbol,currencyNarrowSymbol:r[t].narrow||r[t].symbol},e},Object.create(null)),unitSymbols:Object.keys(n).reduce(function(e,t){return e[t]={unitSymbol:B(n[t].short,"symbol"),unitNarrowSymbol:B(n[t].narrow,"symbol"),unitName:B(n[t].long,"symbol")},e},Object.create(null))}}(s.units,s.currencies,s.numbers,l)}),function(e,t){void 0===t&&(t=Object.create(null));var n=v(t,"style","string",["decimal","percent","currency","unit"],"decimal");S(Je,e,"style",n);var r=v(t,"currency","string",void 0,void 0);if(void 0!==r&&!function(e){return 3===(e=function(e){return e.replace(/([a-z])/g,function(e,t){return t.toUpperCase()})}(e)).length&&!O.test(e)}(r))throw RangeError("Malformed currency code");var i=v(t,"currencyDisplay","string",["code","symbol","narrowSymbol","name"],"symbol"),u=v(t,"currencySign","string",["standard","accounting"],"standard"),a=v(t,"unit","string",void 0,void 0);if(void 0!==a&&!function(e){if(e=function(e){return e.replace(/([A-Z])/g,function(e,t){return t.toLowerCase()})}(e),-1<Xe.indexOf(e))return!0;var t=e.split("-per-");return 2===t.length&&!(Xe.indexOf(t[0])<0||Xe.indexOf(t[1])<0)}(a))throw RangeError("Invalid unit argument for Intl.NumberFormat()");var o=v(t,"unitDisplay","string",["short","narrow","long"],"short");if("currency"===n){if(void 0===r)throw new TypeError("currency cannot be undefined");F(Je,e,{currency:r.toUpperCase(),currencyDisplay:i,currencySign:u})}else if("unit"===n){if(void 0===a)throw new TypeError("unit cannot be undefined");F(Je,e,{unit:a,unitDisplay:o})}}(e,i);var p,g,y=K(Je,e,"style");if("currency"===y){var m=function(e){return e in Se?Se[e]:2}(K(Je,e,"currency"));g=p=m}else p=0,g="percent"===y?0:3;var f=v(i,"notation","string",["standard","scientific","engineering","compact"],"standard");S(Je,e,"notation",f),P(Je,e,i,p,g);var h=v(i,"compactDisplay","string",["short","long"],"short");"compact"===f&&S(Je,e,"compactDisplay",h);var b=v(i,"useGrouping","boolean",void 0,!0);S(Je,e,"useGrouping",b);var d=v(i,"signDisplay","string",["auto","never","always","exceptZero"],"auto");S(Je,e,"signDisplay",d)}function Qe(e,t){var n,r=K(Je,e,"pl"),i=0,u=K(Je,e,"ild"),a=t;if(isNaN(t))n=u.symbols.nan;else if(isFinite(t)){"percent"===K(Je,e,"style")&&(a*=100),i=function(e,t){if(0===t)return 0;t<0&&(t=-t);var n=G(t),r=rt(e,n);return t/=Math.pow(10,r),0!==nt(e,t).roundedNumber&&G(t)!==n-r?rt(e,n+1):r}(e,a);var o=nt(e,a/=Math.pow(10,i));n=o.formattedString,a=o.roundedNumber}else n=u.symbols.infinity;for(var c=function(e,t,n){var r,i=U(Je,e,"style","patterns","signDisplay","notation"),u=i.style,a=i.patterns;switch(u){case"percent":r=a.percent;break;case"unit":var o=K(Je,e,"unitDisplay"),c=K(Je,e,"unit");r=a.unit[c][o];break;case"currency":var s=U(Je,e,"currency","currencyDisplay","currencySign"),l=s.currency,p=s.currencyDisplay,g=s.currencySign;r=a.currency[l][p][g];break;case"decimal":r=a.decimal}var y,m,f=K(Je,e,"notation"),h=K(Je,e,"signDisplay"),b=r[h];if(!isNaN(t)&&isFinite(t))if("scientific"===f||"engineering"===f)y=b.scientific;else if(0!==n){R("compact"===f,"notation must be compact");var d=K(Je,e,"compactDisplay"),D=String(Math.pow(10,n));"short"===d&&2<n&&n<15?y=b.compactShort[D]:2<n&&n<15&&(R("long"===d,"compactDisplay must be long"),y=b.compactLong[D])}y||(y=b.standard);m="never"===h?y.zeroPattern:"auto"===h?Z(t,0)||0<t||isNaN(t)?y.zeroPattern:y.negativePattern:"always"===h?Z(t,0)||0<t||isNaN(t)?y.positivePattern:y.negativePattern:(R("exceptZero"===h,"signDisplay must be exceptZero"),Z(t,0)||isNaN(t)?y.zeroPattern:0<t||Z(t,0)?y.positivePattern:y.negativePattern);return m}(e,t,i),s=function(e){for(var t=[],n=e.indexOf("{"),r=0,i=0,u=e.length;n<e.length&&-1<n;)R(n<(r=e.indexOf("}",n)),"Invalid pattern "+e),i<n&&t.push({type:"literal",value:e.substring(i,n)}),t.push({type:e.substring(n+1,r),value:void 0}),i=r+1,n=e.indexOf("{",i);return i<u&&t.push({type:"literal",value:e.substring(i,u)}),t}(c),l=[],p=0,g=K(Je,e,"notation"),y=0,m=s;y<m.length;y++){var f=m[y];switch(f.type){case"literal":l.push(f);break;case Y.number:if(isNaN(a))l.push({type:"nan",value:n});else if(a===1/0||t===-1/0)l.push({type:"infinity",value:n});else{var h=U(Je,e,"numberingSystem","useGrouping","notation"),b=h.numberingSystem,d=h.useGrouping;if(b&&b in ze){for(var D=ze[b],v="",S=0,F=n;S<F.length;S++){var P=F[S];v+=D[+P]||P}n=v}var O=n.indexOf("."),C=void 0,E=void 0;if(0<O?(C=n.slice(0,O),E=n.slice(O+1)):C=n,d&&("compact"!==g||4<C.length)){for(var j=u.symbols.group,w=[],x=C.length-3;0<x;x-=3)w.push(C.slice(x,x+3));for(w.push(C.slice(0,x+3));0<w.length;){var A=w.pop();l.push({type:"integer",value:A}),0<w.length&&l.push({type:"group",value:j})}}else l.push({type:"integer",value:C});void 0!==E&&l.push({type:"decimal",value:u.symbols.decimal},{type:"fraction",value:E})}break;case Y.plusSign:l.push({type:"plusSign",value:u.symbols.plusSign});break;case Y.minusSign:l.push({type:"minusSign",value:u.symbols.minusSign});break;case Y.compactSymbol:var N=void 0;(N="currency"===(B=K(Je,e,"style"))?u.currency.compactShort:u.decimal.compactShort)&&l.push({type:"compact",value:it(r,t,N[String(Math.pow(10,i))])});break;case Y.compactName:var B=K(Je,e,"style"),L=K(Je,e,"currencyDisplay");N=void 0;(N="currency"===B&&"name"!==L?u.currency.compactLong||u.currency.compactShort:u.decimal.compactLong||u.decimal.compactShort)&&l.push({type:"compact",value:it(r,t,N[String(Math.pow(10,i))])});break;case Y.scientificSeparator:l.push({type:"exponentSeparator",value:u.symbols.exponential});break;case Y.scientificExponent:i<0&&(l.push({type:"exponentMinusSign",value:u.symbols.minusSign}),i=-i);var k=z(i,0,0);l.push({type:"exponentInteger",value:k.formattedString});break;case Y.percentSign:l.push({type:"percentSign",value:u.symbols.percentSign});break;case Y.unitSymbol:case Y.unitNarrowSymbol:case Y.unitName:if("unit"===(B=K(Je,e,"style"))){var M=K(Je,e,"unit"),T=it(r,t,u.unitSymbols[M][f.type])[p];l.push({type:"unit",value:T}),p++}break;case Y.currencyCode:var _=K(Je,e,"currency");l.push({type:"currency",value:_});break;case Y.currencySymbol:_=K(Je,e,"currency");l.push({type:"currency",value:u.currencySymbols[_].currencySymbol||_});break;case Y.currencyNarrowSymbol:_=K(Je,e,"currency");l.push({type:"currency",value:u.currencySymbols[_].currencyNarrowSymbol||_});break;case Y.currencyName:_=K(Je,e,"currency");var I=it(r,t,u.currencySymbols[_].currencyName);l.push({type:"currency",value:I});break;default:throw Error('unrecognized pattern part "'+f.type+'" in "'+c+'"')}}return l}var qe=function(e,t){if(!(this&&this instanceof qe))return new qe(e,t);$e(this,e,t);var n=qe.localeData[He(K(Je,this,"locale"))];F(Je,this,{pl:new Intl.PluralRules(e,U(Je,this,"minimumFractionDigits","maximumFractionDigits","minimumIntegerDigits","minimumSignificantDigits","maximumSignificantDigits","roundingType","notation")),patterns:new q(n.units,n.currencies,n.numbers,K(Je,this,"numberingSystem"),K(Je,this,"unit"),K(Je,this,"currency"),K(Je,this,"currencySign"))})};function et(e,t,n){var r=n.value;Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:!0,value:r})}et(qe.prototype,"formatToParts",{value:function(e){return function(e,t){return Qe(e,t)}(this,ut(e))}}),et(qe.prototype,"resolvedOptions",{value:function(){for(var e=U.apply(void 0,We([Je,this],Ve)),t={},n=0,r=Ve;n<r.length;n++){var i=r[n],u=e[i];void 0!==u&&(t[i]=u)}return t}});var tt={enumerable:!1,configurable:!0,get:function(){if("object"!=typeof this||!(this instanceof qe))throw TypeError("Intl.NumberFormat format property accessor called on imcompatible receiver");var n=this,e=K(Je,this,"boundFormat");return void 0===e&&(e=function(e){var t=ut(e);return n.formatToParts(t).map(function(e){return e.value}).join("")},Object.defineProperty(e,"name",{configurable:!0,enumerable:!1,writable:!1,value:""}),S(Je,this,"boundFormat",e)),e}};function nt(e,t){var n=t<0||Z(t,-0);n&&(t=-t);var r,i=U(Je,e,"roundingType","minimumFractionDigits","maximumFractionDigits","minimumIntegerDigits","minimumSignificantDigits","maximumSignificantDigits"),u=i.roundingType,a=i.minimumSignificantDigits,o=i.maximumSignificantDigits,c=i.minimumFractionDigits,s=i.maximumFractionDigits,l=i.minimumIntegerDigits;"significantDigits"===u?r=y(t,a,o):"fractionDigits"===u?r=z(t,c,s):(R("compactRounding"===u,"roundingType must be compactRounding"),1<(r=y(t,1,2)).integerDigitsCount&&(r=z(t,0,0))),t=r.roundedNumber;var p=r.formattedString,g=r.integerDigitsCount;g<l&&(p=b("0",l-g)+p);return n&&(t=-t),{roundedNumber:t,formattedString:p}}function rt(e,t){var n,r=K(Je,e,"notation"),i=K(Je,e,"style"),u=K(Je,e,"ild");switch(r){case"standard":return 0;case"scientific":return t;case"engineering":return 3*Math.floor(t/3);case"compact":var a=K(Je,e,"compactDisplay"),o=K(Je,e,"currencyDisplay"),c=void 0;if(!(c="currency"===i&&"name"!==o?("long"===a?u.currency.compactLong:u.currency.compactShort)||u.currency.compactShort:"long"===a?u.decimal.compactLong:u.decimal.compactShort))return 0;var s=String(Math.pow(10,t)),l=Object.keys(c);if(!(null===(n=c[s])||void 0===n?void 0:n.other))return 0;if(s<l[0])return 0;if(s>l[l.length-1])return G(+l[l.length-1]);for(var p=l.indexOf(s);0<p&&c[l[p-1]].other===c[s].other;p--);return G(+l[p])}}function it(e,t,n){return n[e.select(t)]||n.other}function ut(e){return"bigint"==typeof e?e:function(e){if(void 0===e)return NaN;if(null===e)return 0;if("boolean"==typeof e)return e?1:0;if("number"==typeof e)return e;if("symbol"!=typeof e&&"bigint"!=typeof e)return Number(e);throw new TypeError("Cannot convert symbol/bigint to number")}(e)}Object.defineProperty(tt.get,"name",{configurable:!0,enumerable:!1,writable:!1,value:"get format"}),Object.defineProperty(qe.prototype,"format",tt),et(qe,"supportedLocalesOf",{value:function(e,t){return function(e,t,n){return void 0!==n&&v(n=D(n),"localeMatcher","string",["lookup","best fit"],"best fit"),i(e,t)}(qe.availableLocales,C(e),t)}}),qe.__addLocaleData=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=0,r=e;n<r.length;n++)for(var i=r[n],u=0,a=Object.keys(We(i.availableLocales,Object.keys(i.aliases),Object.keys(i.parentLocales)).reduce(function(e,t){return e[t]=!0,e},{}));u<a.length;u++){var o=a[u];try{qe.localeData[o]=c(o,i)}catch(e){}}qe.availableLocales=Object.keys(qe.localeData),qe.__defaultLocale||(qe.__defaultLocale=qe.availableLocales[0])},qe.__defaultLocale="en",qe.localeData={},qe.availableLocales=[],qe.getDefaultLocale=function(){return qe.__defaultLocale},qe.polyfilled=!0;try{"undefined"!=typeof Symbol&&Object.defineProperty(qe.prototype,Symbol.toStringTag,{configurable:!0,enumerable:!1,writable:!1,value:"Object"}),Object.defineProperty(qe.prototype.constructor,"length",{configurable:!0,enumerable:!1,writable:!1,value:0}),Object.defineProperty(qe.supportedLocalesOf,"length",{configurable:!0,enumerable:!1,writable:!1,value:1}),Object.defineProperty(qe,"prototype",{configurable:!1,enumerable:!1,writable:!1,value:qe.prototype})}catch(e){}e.UnifiedNumberFormat=qe,e.isUnitSupported=function(e){try{new Intl.NumberFormat(void 0,{style:"unit",unit:e})}catch(e){return!1}return!0},Object.defineProperty(e,"__esModule",{value:!0})});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).IntlUnifiedNumberFormat={})}(this,function(e){"use strict";function R(e,t,n){if(void 0===n&&(n=Error),!e)throw new n(t)}function C(e){if(null==e)throw new TypeError("undefined/null cannot be converted to object");return Object(e)}function E(e,t,n,r,i){var u=e[t];if(void 0===u)return i;if("boolean"!==n&&"string"!==n)throw new TypeError("invalid type");if("boolean"===n&&(u=Boolean(u)),"string"===n&&(u=function(e){if("symbol"==typeof e)throw TypeError("Cannot convert a Symbol value to a string");return String(e)}(u)),void 0!==r&&!r.filter(function(e){return e==u}).length)throw new RangeError(u+" is not within "+r.join(", "));return u}function g(e,t,n,r){if(void 0===e)return r;if(e=Number(e),isNaN(e)||e<t||n<e)throw new RangeError(e+" is outside of range ["+t+", "+n+"]");return Math.floor(e)}function j(e,t,n,r){e.get(t)||e.set(t,Object.create(null)),e.get(t)[n]=r}function w(e,t,n){for(var r=0,i=Object.keys(n);r<i.length;r++){var u=i[r];j(e,t,u,n[u])}}function K(e,t,n){return U(e,t,n)[n]}function U(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=e.get(t);if(!i)throw new TypeError(t+" InternalSlot has not been initialized");return n.reduce(function(e,t){return e[t]=i[t],e},Object.create(null))}function x(e,t,n,r,i){var u,a,o,c=(a=21,o=u=1,g(n["minimumIntegerDigits"],u,a,o)),s=n.minimumFractionDigits,l=n.maximumFractionDigits,p=n.minimumSignificantDigits,m=n.maximumSignificantDigits;if(j(e,t,"minimumIntegerDigits",c),void 0!==p||void 0!==m)j(e,t,"roundingType","significantDigits"),p=g(p,1,21,1),m=g(m,p,21,21),j(e,t,"minimumSignificantDigits",p),j(e,t,"maximumSignificantDigits",m);else if(void 0!==s||void 0!==l){j(e,t,"roundingType","fractionDigits"),s=g(s,0,20,r),l=g(l,s,20,Math.max(s,i)),j(e,t,"minimumFractionDigits",s),j(e,t,"maximumFractionDigits",l)}else"compact"===K(e,t,"notation")?j(e,t,"roundingType","compactRounding"):(j(e,t,"roundingType","fractionDigits"),j(e,t,"minimumFractionDigits",r),j(e,t,"maximumFractionDigits",i))}function Z(e,t){return Object.is?Object.is(e,t):e===t?0!==e||1/e==1/t:e!=e&&t!=t}var t=/[^A-Z]/;function A(e){return 3===(e=e.replace(/([a-z])/g,function(e,t){return t.toUpperCase()})).length&&!t.test(e)}function N(e){var t=Intl.getCanonicalLocales;return"function"==typeof t?t(e):Intl.DateTimeFormat.supportedLocalesOf(e||"")}var r,n=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),u=function(){return(u=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function k(e){var c,s,D=function(e,t){for(var n={locale:""},r=0,i=t;r<i.length;r++){var u=i[r],a=u.replace(l,""),o=p(e,a);if(o)return n.locale=o,u!==a&&(n.extension=u.slice(a.length+1,u.length)),n}return n.locale=c(),n},v=(s=c=e,function(e,t){for(var n={locale:""},r=0,i=t;r<i.length;r++){var u=i[r],a=u.replace(l,""),o=p(e,a);if(o)return n.locale=o,u!==a&&(n.extension=u.slice(a.length+1,u.length)),n}return n.locale=s(),n});return function(e,t,n,r,i){for(var u,a=(u=("lookup"===n.localeMatcher?D:v)(e,t)).locale,o={locale:"",dataLocale:a},c="-u",s=0,l=r;s<l.length;s++){var p=l[s],m=i[a];R("object"==typeof m&&null!==m,"locale data "+p+" must be an object");var g=m[p];R(Array.isArray(g),"keyLocaleData for "+p+" must be an array");var y=g[0];R("string"==typeof y||null===y,"value must be string or null");var h="";if(u.extension){var f=S(u.extension,p);void 0!==f&&(""!==f?~g.indexOf(f)&&(h="-"+p+"-"+(y=f)):~f.indexOf("true")&&(y="true",h="-"+p))}if(p in n){var b=n[p];R("string"==typeof b||null==b,"optionsValue must be String, Undefined or Null"),~g.indexOf(b)&&b!==y&&(y=b,h="")}o[p]=y,c+=h}if(2<c.length){var d=a.indexOf("-x-");if(-1===d)a+=c;else a=a.slice(0,d)+c+a.slice(d,a.length);a=N(a)[0]}return o.locale=a,o}}function S(e,t){R(2===t.length,"key must have 2 elements");var n=e.length,r="-"+t+"-",i=e.indexOf(r);if(-1!==i){for(var u=i+4,a=u,o=u,c=!1;!c;){var s=e.indexOf("-",o);2===(-1===s?n-o:s-o)?c=!0:-1===s?(a=n,c=!0):o=(a=s)+1}return e.slice(u,a)}if(r="-"+t,-1!==(i=e.indexOf(r))&&i+3===n)return""}var l=/-u(?:-[0-9a-z]{2,8})+/gi;function p(e,t){for(var n=t;;){if(~e.indexOf(n))return n;var r=n.lastIndexOf("-");if(!~r)return;2<=r&&"-"===n[r-2]&&(r-=2),n=n.slice(0,r)}}function a(e,t){for(var n=[],r=0,i=t;r<i.length;r++){var u=p(e,i[r].replace(l,""));u&&n.push(u)}return n}var i,o=(i=Error,n(c,i),c);function c(){var e=null!==i&&i.apply(this,arguments)||this;return e.type="MISSING_LOCALE_DATA",e}function s(e,t,n){void 0===n&&(n=function(e,t){return u(u({},e),t)});var r=function(e,t,n){var r=[e];t[e]&&(e=t[e],r.push(e));var i=n[e];i&&r.push(i);for(var u=e.split("-"),a=u.length;1<a;a--)r.push(u.slice(0,a-1).join("-"));return r}(e,t.aliases,t.parentLocales),i=r.map(function(e){return t.data[e]}).filter(Boolean);if(!i.length)throw new o('Missing locale data for "'+e+'", lookup hierarchy: '+r.join(", "));return i.reverse(),i.reduce(n,{})}var Y,m;function G(e){return Math.floor(Math.log(e)*Math.LOG10E)}function z(e,t,n){var r,i,u,a=n,o=e*Math.pow(10,a),c=Math.floor(o),s=Math.ceil(o),l=(r=o-c<s-o?c:s)/Math.pow(10,a);if(r<1e21)i=r.toString();else{var p=(i=r.toString()).indexOf("."),m=i.indexOf("e+"),g=parseInt(i.substring(m+2),10);i=i.substring(0,p)+i.substring(p+1,m)+b("0",g-(m-p-1))}if(0!==a){var y=i.length;if(y<=a)i=b("0",a+1-y)+i,y=a+1;var h=i.slice(0,y-a);i=h+"."+i.slice(y-a),u=h.length}else u=i.length;for(var f=n-t;0<f&&"0"===i[i.length-1];)i=i.slice(0,-1),f--;return"."===i[i.length-1]&&(i=i.slice(0,-1)),{formattedString:i,roundedNumber:l,integerDigitsCount:u}}function y(e,t,n){var r,i,u,a,o=n;if(0===e)r=b("0",o),u=i=0;else{var c=void 0,s=(i=G(e))-o+1,l=s<0?e*Math.pow(10,-s):e/Math.pow(10,s),p=Math.floor(l),m=Math.ceil(l);r=(c=l-p<m-l?p:m).toString(),u=c*Math.pow(10,i-o+1)}if(a=o-1<=i?(r+=b("0",i-o+1),i+1):0<=i?(r=r.slice(0,i+1)+"."+r.slice(i+1),i+1):(r="0."+b("0",-i-1)+r,1),0<=r.indexOf(".")&&t<n){for(var g=n-t;0<g&&"0"===r[r.length-1];)r=r.slice(0,-1),g--;"."===r[r.length-1]&&(r=r.slice(0,-1))}return{formattedString:r,roundedNumber:u,integerDigitsCount:a}}function b(e,t){if("function"==typeof e.repeat)return e.repeat(t);for(var n=new Array(t),r=0;r<n.length;r++)n[r]=e;return n.join("")}(m=Y=Y||{}).compactName="compactName",m.compactSymbol="compactSymbol",m.currencyCode="currencyCode",m.currencyName="currencyName",m.currencyNarrowSymbol="currencyNarrowSymbol",m.currencySymbol="currencySymbol",m.minusSign="minusSign",m.number="number",m.percentSign="percentSign",m.plusSign="plusSign",m.scientificExponent="scientificExponent",m.scientificSeparator="scientificSeparator",m.unitName="unitName",m.unitNarrowSymbol="unitNarrowSymbol",m.unitSymbol="unitSymbol";var h,f=(h=function(e,t){return(h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}h(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});function d(e,t,n){if(void 0===n&&(n=Error),!e)throw new n(t)}var D=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20BF\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B98-\u2BFF\u2CE5-\u2CEA\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uFB29\uFBB2-\uFBC1\uFDFC\uFDFD\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9B\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDE8\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD10-\uDD6C\uDD70-\uDDAC\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED5\uDEE0-\uDEEC\uDEF0-\uDEFA\uDF00-\uDF73\uDF80-\uDFD8\uDFE0-\uDFEB]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDD00-\uDD0B\uDD0D-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDE53\uDE60-\uDE6D\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95]/,v=/¤/g,F=/\{1\}/g,P=/\{0\}/g;function B(r){if(r)return Object.keys(r).reduce(function(e,t){var n=r[t];return e[t]=Object.keys(n).reduce(function(e,t){return e[t]=(n[t]||"").replace(/[¤0]/g,"").replace(/'(.*?)'/g,"$1").trim(),e},{other:n.other.replace(/[¤0]/g,"").replace(/'(.*?)'/g,"$1").trim()}),e},Object.create(null))}function L(n,r){return Object.keys(n).reduce(function(e,t){return e[t]=n[t][r],e},{other:n.other[r]})}function O(e){return Array.isArray(e)?e.map(function(e){return"{"+e+"}"}).join(""):"{"+e+"}"}var M=/[#0](?:[\.,][#0]+)*/g,T=O([Y.number,Y.scientificSeparator,Y.scientificExponent]),_=O([Y.minusSign,Y.number,Y.scientificSeparator,Y.scientificExponent]),I=O([Y.number]),W=O([Y.minusSign,Y.number]),V=I+";"+W,X=T+";"+_;function H(e,t){void 0===t&&(t=Y.compactSymbol);var n=e.replace(/0+/,"").trim();n&&(e=e.replace(n,O(t)));var r=-1<e.indexOf("-")?e:e.replace(/(0+)/,"-$1");return[e.replace(/0+/,"{number}"),r.replace(/0+/,"{number}")]}function J(e,t){void 0===t&&(t=Y.compactSymbol);var n=e.replace(/[¤0]/g,"").trim();n&&(e=e.replace(n,O(t)));var r=-1<e.indexOf("-")?e:"-"+e;return e.replace(/0+/,"{number}")+";"+r.replace(/0+/,"{number}")}var $=/[^\s;(-]¤/,Q=/¤[^\s);]/;function q(e,t,n){return r=e,i=t,Q.test(i)&&!D.test(r[r.length-1])?t.replace(v,"¤"+n):(u=e,a=t,$.test(a)&&!D.test(u[0])?t.replace(v,n+"¤"):t);var r,i,u,a}var ee=(Object.defineProperty(te.prototype,"decimal",{get:function(){return this.decimalPatterns||(this.decimalPatterns=new ae(this.numbers,this.numberingSystem)),this.decimalPatterns},enumerable:!0,configurable:!0}),Object.defineProperty(te.prototype,"percent",{get:function(){return this.percentPatterns||(this.percentPatterns=new se(this.numbers,this.numberingSystem)),this.percentPatterns},enumerable:!0,configurable:!0}),Object.defineProperty(te.prototype,"unit",{get:function(){return this.unitPatterns||(d(!!this._unit,"unit must be supplied"),this.unitPatterns=Object.create(null),this.unitPatterns[this._unit]=new me(this.units,this.numbers,this.numberingSystem,this._unit)),this.unitPatterns},enumerable:!0,configurable:!0}),Object.defineProperty(te.prototype,"currency",{get:function(){return this.currencyPatterns||(d(!!this._currency,"currency must be supplied"),d(!!this.currencySign,"currencySign must be supplied"),this.currencyPatterns=Object.create(null),this.currencyPatterns[this._currency]=new fe(this.currencies,this.numbers,this.numberingSystem,this._currency,this.currencySign)),this.currencyPatterns},enumerable:!0,configurable:!0}),te);function te(e,t,n,r,i,u,a){this.units=e,this.currencies=t,this.numbers=n,this.numberingSystem=r,this._unit=i,this._currency=u,this.currencySign=a}function ne(e,t){d(!!e,"Pattern should have existed");var n=e.split(";"),r=n[0],i=n[1];d(!!i,'negativePattern should have existed but got "'+e+'"');var u=r.replace("+",""),a=r;switch(a=-1<(i=i.replace("-",O(Y.minusSign))).indexOf(Y.minusSign)?i.replace(Y.minusSign,Y.plusSign):-1<r.indexOf("+")?r=r.replace("+",O(Y.plusSign)):""+O(Y.plusSign)+u,r=r.replace("{0}",O(Y.number)),a=a.replace("{0}",O(Y.number)),i=i.replace("{0}",O(Y.number)),u=u.replace("{0}",O(Y.number)),t){case"always":return{positivePattern:a,zeroPattern:a,negativePattern:i};case"auto":return{positivePattern:r,zeroPattern:r,negativePattern:i};case"exceptZero":return{positivePattern:a,zeroPattern:u,negativePattern:i};case"never":return{positivePattern:u,zeroPattern:u,negativePattern:u}}}var re=(Object.defineProperty(ie.prototype,"compactShort",{get:function(){return this.notation="compactShort",this},enumerable:!0,configurable:!0}),Object.defineProperty(ie.prototype,"compactLong",{get:function(){return this.notation="compactLong",this},enumerable:!0,configurable:!0}),Object.defineProperty(ie.prototype,"1000",{get:function(){return this.produceCompactSignPattern("1000")},enumerable:!0,configurable:!0}),Object.defineProperty(ie.prototype,"10000",{get:function(){return this.produceCompactSignPattern("10000")},enumerable:!0,configurable:!0}),Object.defineProperty(ie.prototype,"100000",{get:function(){return this.produceCompactSignPattern("100000")},enumerable:!0,configurable:!0}),Object.defineProperty(ie.prototype,"1000000",{get:function(){return this.produceCompactSignPattern("1000000")},enumerable:!0,configurable:!0}),Object.defineProperty(ie.prototype,"10000000",{get:function(){return this.produceCompactSignPattern("10000000")},enumerable:!0,configurable:!0}),Object.defineProperty(ie.prototype,"100000000",{get:function(){return this.produceCompactSignPattern("100000000")},enumerable:!0,configurable:!0}),Object.defineProperty(ie.prototype,"1000000000",{get:function(){return this.produceCompactSignPattern("1000000000")},enumerable:!0,configurable:!0}),Object.defineProperty(ie.prototype,"10000000000",{get:function(){return this.produceCompactSignPattern("10000000000")},enumerable:!0,configurable:!0}),Object.defineProperty(ie.prototype,"100000000000",{get:function(){return this.produceCompactSignPattern("100000000000")},enumerable:!0,configurable:!0}),Object.defineProperty(ie.prototype,"1000000000000",{get:function(){return this.produceCompactSignPattern("1000000000000")},enumerable:!0,configurable:!0}),Object.defineProperty(ie.prototype,"10000000000000",{get:function(){return this.produceCompactSignPattern("10000000000000")},enumerable:!0,configurable:!0}),Object.defineProperty(ie.prototype,"100000000000000",{get:function(){return this.produceCompactSignPattern("100000000000000")},enumerable:!0,configurable:!0}),ie);function ie(){}var ue,ae=(f(oe,ue=re),oe.prototype.produceCompactSignPattern=function(e){this.compactSignPattern||(this.compactSignPattern=Object.create(null));var t=this.compactSignPattern;return t[e]||(d(!!this.signDisplay,"Sign Display should have existed"),"compactLong"===this.notation?t[e]=ne(H(this.numbers.decimal[this.numberingSystem].long[e].other,Y.compactName).join(";"),this.signDisplay):t[e]=ne(H(this.numbers.decimal[this.numberingSystem].short[e].other,Y.compactSymbol).join(";"),this.signDisplay)),t[e]},Object.defineProperty(oe.prototype,"always",{get:function(){return this.signDisplay="always",this},enumerable:!0,configurable:!0}),Object.defineProperty(oe.prototype,"auto",{get:function(){return this.signDisplay="auto",this},enumerable:!0,configurable:!0}),Object.defineProperty(oe.prototype,"never",{get:function(){return this.signDisplay="never",this},enumerable:!0,configurable:!0}),Object.defineProperty(oe.prototype,"exceptZero",{get:function(){return this.signDisplay="exceptZero",this},enumerable:!0,configurable:!0}),Object.defineProperty(oe.prototype,"standard",{get:function(){return this.signPattern||(d(!!this.signDisplay,"Sign Display should have existed"),this.signPattern=ne(V,this.signDisplay)),this.signPattern},enumerable:!0,configurable:!0}),Object.defineProperty(oe.prototype,"scientific",{get:function(){return this.signPattern||(d(!!this.signDisplay,"Sign Display should have existed"),this.signPattern=ne(X,this.signDisplay)),this.signPattern},enumerable:!0,configurable:!0}),oe);function oe(e,t){var n=ue.call(this)||this;return n.numbers=e,n.numberingSystem=t,n}var ce,se=(f(le,ce=ae),le.prototype.generateStandardOrScientificPattern=function(e){d(!!this.signDisplay,"Sign Display should have existed");var t=this.numbers.percent[this.numberingSystem].replace(/%/g,O(Y.percentSign)).replace(M,e?T:O(Y.number));return t.indexOf(";")<0&&(t+=";"+O(Y.minusSign)+t),ne(t,this.signDisplay)},Object.defineProperty(le.prototype,"standard",{get:function(){return this.signPattern||(this.signPattern=this.generateStandardOrScientificPattern()),this.signPattern},enumerable:!0,configurable:!0}),Object.defineProperty(le.prototype,"scientific",{get:function(){return this.signPattern||(this.signPattern=this.generateStandardOrScientificPattern(!0)),this.signPattern},enumerable:!0,configurable:!0}),le);function le(){return null!==ce&&ce.apply(this,arguments)||this}var pe,me=(f(ge,pe=re),ge.prototype.generateStandardOrScientificPattern=function(e){d(!!this.signDisplay,"Sign Display should have existed"),d(!!this.pattern,"Pattern must exist");var t,n=this.pattern;return n.indexOf(";")<0&&(t=n.replace("{0}","-{0}"),n+=";"+t),ne(n=n.replace(P,e?T:O(Y.number)),this.signDisplay)},ge.prototype.produceCompactSignPattern=function(e){this.compactSignPattern||(this.compactSignPattern=Object.create(null));var t=this.compactSignPattern;if(!t[e]){d(!!this.pattern,"Pattern should exist"),d(!!this.signDisplay,"Sign Display should exist");var n=this.pattern,r=void 0;r="compactShort"===this.notation?H(this.numbers.decimal[this.numberingSystem].short[e].other,Y.compactSymbol):H(this.numbers.decimal[this.numberingSystem].long[e].other,Y.compactName),n=n.replace("{0}",r[0])+";"+n.replace("{0}",r[1]),t[e]=ne(n,this.signDisplay)}return t[e]},Object.defineProperty(ge.prototype,"narrow",{get:function(){return this.pattern||(this.pattern=this.units[this.unit].narrow.other.pattern.replace(F,O(Y.unitNarrowSymbol))),this},enumerable:!0,configurable:!0}),Object.defineProperty(ge.prototype,"short",{get:function(){return this.pattern||(this.pattern=this.units[this.unit].short.other.pattern.replace(F,O(Y.unitSymbol))),this},enumerable:!0,configurable:!0}),Object.defineProperty(ge.prototype,"long",{get:function(){return this.pattern||(this.pattern=this.units[this.unit].long.other.pattern.replace(F,O(Y.unitName))),this},enumerable:!0,configurable:!0}),Object.defineProperty(ge.prototype,"always",{get:function(){return this.signDisplay="always",this},enumerable:!0,configurable:!0}),Object.defineProperty(ge.prototype,"auto",{get:function(){return this.signDisplay="auto",this},enumerable:!0,configurable:!0}),Object.defineProperty(ge.prototype,"never",{get:function(){return this.signDisplay="never",this},enumerable:!0,configurable:!0}),Object.defineProperty(ge.prototype,"exceptZero",{get:function(){return this.signDisplay="exceptZero",this},enumerable:!0,configurable:!0}),Object.defineProperty(ge.prototype,"standard",{get:function(){return this.signPattern||(this.signPattern=this.generateStandardOrScientificPattern()),this.signPattern},enumerable:!0,configurable:!0}),Object.defineProperty(ge.prototype,"scientific",{get:function(){return this.signPattern||(this.signPattern=this.generateStandardOrScientificPattern(!0)),this.signPattern},enumerable:!0,configurable:!0}),ge);function ge(e,t,n,r){var i=pe.call(this)||this;return i.unit=r,i.units=e,i.numbers=t,i.numberingSystem=n,i}function ye(e,t,n,r,i){var u=t.short,a=t.long||t.short,o="";switch(n){case"compactLong":return J(q(e,o=(null==a?void 0:a[i].other)||(null==u?void 0:u[i].other)||t.standard,t.currencySpacing.beforeInsertBetween),Y.compactName);case"compactShort":return J(q(e,o=(null==u?void 0:u[i].other)||t.standard,t.currencySpacing.beforeInsertBetween),Y.compactSymbol);case"scientific":return(o=q(e,o="accounting"===r?t.accounting:t.standard,t.currencySpacing.beforeInsertBetween)).indexOf(";")<0&&(o+=";-"+o),o.replace(M,T);case"standard":return(o=q(e,o="accounting"===r?t.accounting:t.standard,t.currencySpacing.beforeInsertBetween)).indexOf(";")<0&&(o+=";-"+o),o.replace(M,O(Y.number))}}function he(e,t,n,r){var i,u=e.currency[t].unitPattern.replace(F,O(Y.currencyName));switch(n){case"compactLong":i=H(e.decimal[t].long[r].other,Y.compactName);break;case"compactShort":i=H(e.decimal[t].short[r].other,Y.compactSymbol);break;case"scientific":i=[T,_];break;case"standard":i=[I,W]}return u.replace("{0}",i[0])+";"+u.replace("{0}",i[1])}var fe=(Object.defineProperty(be.prototype,"code",{get:function(){return this.currencySlotToken=Y.currencyCode,this.resolvedCurrency=this.currency,this},enumerable:!0,configurable:!0}),Object.defineProperty(be.prototype,"symbol",{get:function(){return this.currencySlotToken=Y.currencySymbol,this.resolvedCurrency=this.currencies[this.currency].symbol,this},enumerable:!0,configurable:!0}),Object.defineProperty(be.prototype,"narrowSymbol",{get:function(){return this.currencySlotToken=Y.currencyNarrowSymbol,this.resolvedCurrency=this.currencies[this.currency].narrow,this},enumerable:!0,configurable:!0}),Object.defineProperty(be.prototype,"name",{get:function(){return this.currencySlotToken=Y.currencyName,this.resolvedCurrency=this.currencies[this.currency].displayName.other,this},enumerable:!0,configurable:!0}),Object.defineProperty(be.prototype,"accounting",{get:function(){return this.currencySign="accounting",this.signDisplayPatterns||(d(!!this.currencySign,"Currency Sign should have existed"),d(!!this.currencySlotToken,"Currency Slot Token should have existed"),d(!!this.resolvedCurrency,"Currency should have been resolved"),this.signDisplayPatterns=new De(this.resolvedCurrency,this.numbers,this.numberingSystem,this.currencySign,this.currencySlotToken)),this.signDisplayPatterns},enumerable:!0,configurable:!0}),Object.defineProperty(be.prototype,"standard",{get:function(){return this.currencySign="standard",this.signDisplayPatterns||(d(!!this.currencySign,"Currency Sign should have existed"),d(!!this.currencySlotToken,"Currency Display should have existed"),d(!!this.resolvedCurrency,"Currency should have been resolved"),this.signDisplayPatterns=new De(this.resolvedCurrency,this.numbers,this.numberingSystem,this.currencySign,this.currencySlotToken)),this.signDisplayPatterns},enumerable:!0,configurable:!0}),be);function be(e,t,n,r,i){this.currency=r,this.currencies=e,this.numbers=t,this.numberingSystem=n,this.currencySign=i}var de,De=(f(ve,de=re),Object.defineProperty(ve.prototype,"always",{get:function(){return this.signDisplay="always",this},enumerable:!0,configurable:!0}),Object.defineProperty(ve.prototype,"auto",{get:function(){return this.signDisplay="auto",this},enumerable:!0,configurable:!0}),Object.defineProperty(ve.prototype,"never",{get:function(){return this.signDisplay="never",this},enumerable:!0,configurable:!0}),Object.defineProperty(ve.prototype,"exceptZero",{get:function(){return this.signDisplay="exceptZero",this},enumerable:!0,configurable:!0}),Object.defineProperty(ve.prototype,"standard",{get:function(){if(!this.signPattern){d(!!this.currencySign,"Currency sign should exist"),d(!!this.signDisplay,"Sign display must exist");var e="";e=this.currencySlotToken===Y.currencyName?he(this.numbers,this.numberingSystem,"standard","1000"):ye(this.currency,this.numbers.currency[this.numberingSystem],"standard",this.currencySign,"1000").replace(v,O(this.currencySlotToken)),this.signPattern=ne(e,this.signDisplay)}return this.signPattern},enumerable:!0,configurable:!0}),Object.defineProperty(ve.prototype,"scientific",{get:function(){if(!this.signPattern){d(!!this.currencySign,"Currency sign should exist"),d(!!this.signDisplay,"Sign display must exist");var e="";e=this.currencySlotToken===Y.currencyName?he(this.numbers,this.numberingSystem,"scientific","1000"):ye(this.currency,this.numbers.currency[this.numberingSystem],"scientific",this.currencySign,"1000").replace(v,O(this.currencySlotToken)),this.signPattern=ne(e,this.signDisplay)}return this.signPattern},enumerable:!0,configurable:!0}),ve.prototype.produceCompactSignPattern=function(e){this.compactSignPattern||(this.compactSignPattern=Object.create(null));var t,n,r=this.compactSignPattern;if(!r[e]){d(!!this.currencySign,"Currency sign should exist"),d(!!this.signDisplay,"Sign display must exist");var i="";i=this.currencySlotToken===Y.currencyName?he(this.numbers,this.numberingSystem,this.notation,e):ye(this.currency,this.numbers.currency[this.numberingSystem],this.notation,this.currencySign,e).replace(v,O(this.currencySlotToken)),r[e]=(t=ne(i,this.signDisplay),{positivePattern:(n=function(e){return e.replace(/0+/,"{number}")})(t.positivePattern),zeroPattern:n(t.zeroPattern),negativePattern:n(t.negativePattern)})}return r[e]},ve);function ve(e,t,n,r,i){var u=de.call(this)||this;return u.currency=e,u.numbers=t,u.numberingSystem=n,u.currencySign=r,u.currencySlotToken=i,u}for(var Se={ADP:0,AFN:0,ALL:0,AMD:2,BHD:3,BIF:0,BYN:2,BYR:0,CAD:2,CHF:2,CLF:4,CLP:0,COP:2,CRC:2,CZK:2,DEFAULT:2,DJF:0,DKK:2,ESP:0,GNF:0,GYD:2,HUF:2,IDR:2,IQD:0,IRR:0,ISK:0,ITL:0,JOD:3,JPY:0,KMF:0,KPW:0,KRW:0,KWD:3,LAK:0,LBP:0,LUF:0,LYD:3,MGA:0,MGF:0,MMK:0,MNT:2,MRO:0,MUR:2,NOK:2,OMR:3,PKR:2,PYG:0,RSD:0,RWF:0,SEK:2,SLL:0,SOS:0,STD:0,SYP:0,TMM:0,TND:3,TRL:0,TWD:2,TZS:2,UGX:0,UYI:0,UYW:4,UZS:2,VEF:2,VND:0,VUV:0,XAF:0,XOF:0,XPF:0,YER:0,ZMK:0,ZWD:0},Fe=Object.freeze({__proto__:null,ADP:0,AFN:0,ALL:0,AMD:2,BHD:3,BIF:0,BYN:2,BYR:0,CAD:2,CHF:2,CLF:4,CLP:0,COP:2,CRC:2,CZK:2,DEFAULT:2,DJF:0,DKK:2,ESP:0,GNF:0,GYD:2,HUF:2,IDR:2,IQD:0,IRR:0,ISK:0,ITL:0,JOD:3,JPY:0,KMF:0,KPW:0,KRW:0,KWD:3,LAK:0,LBP:0,LUF:0,LYD:3,MGA:0,MGF:0,MMK:0,MNT:2,MRO:0,MUR:2,NOK:2,OMR:3,PKR:2,PYG:0,RSD:0,RWF:0,SEK:2,SLL:0,SOS:0,STD:0,SYP:0,TMM:0,TND:3,TRL:0,TWD:2,TZS:2,UGX:0,UYI:0,UYW:4,UZS:2,VEF:2,VND:0,VUV:0,XAF:0,XOF:0,XPF:0,YER:0,ZMK:0,ZWD:0,default:Se}),Pe=["٠","١","٢","٣","٤","٥","٦","٧","٨","٩"],Oe=["۰","۱","۲","۳","۴","۵","۶","۷","۸","۹"],Ce=["᭐","᭑","᭒","᭓","᭔","᭕","᭖","᭗","᭘","᭙"],Ee=["০","১","২","৩","৪","৫","৬","৭","৮","৯"],je=["०","१","२","३","४","५","६","७","८","९"],we=["0","1","2","3","4","5","6","7","8","9"],xe=["૦","૧","૨","૩","૪","૫","૬","૭","૮","૯"],Ae=["੦","੧","੨","੩","੪","੫","੬","੭","੮","੯"],Ne=["០","១","២","៣","៤","៥","៦","៧","៨","៩"],ke=["೦","೧","೨","೩","೪","೫","೬","೭","೮","೯"],Be=["໐","໑","໒","໓","໔","໕","໖","໗","໘","໙"],Le=["0","1","2","3","4","5","6","7","8","9"],Me=["᥆","᥇","᥈","᥉","᥊","᥋","᥌","᥍","᥎","᥏"],Te=["൦","൧","൨","൩","൪","൫","൬","൭","൮","൯"],_e=["᠐","᠑","᠒","᠓","᠔","᠕","᠖","᠗","᠘","᠙"],Ie=["၀","၁","၂","၃","၄","၅","၆","၇","၈","၉"],Re=["୦","୧","୨","୩","୪","୫","୬","୭","୮","୯"],Ke=["௦","௧","௨","௩","௪","௫","௬","௭","௮","௯"],Ue=["౦","౧","౨","౩","౪","౫","౬","౭","౮","౯"],Ze=["๐","๑","๒","๓","๔","๕","๖","๗","๘","๙"],Ye=["༠","༡","༢","༣","༤","༥","༦","༧","༨","༩"],Ge=["〇","一","二","三","四","五","六","七","八","九"],ze={arab:Pe,arabext:Oe,bali:Ce,beng:Ee,deva:je,fullwide:we,gujr:xe,guru:Ae,khmr:Ne,knda:ke,laoo:Be,latn:Le,limb:Me,mlym:Te,mong:_e,mymr:Ie,orya:Re,tamldec:Ke,telu:Ue,thai:Ze,tibt:Ye,hanidec:Ge},We=Object.freeze({__proto__:null,arab:Pe,arabext:Oe,bali:Ce,beng:Ee,deva:je,fullwide:we,gujr:xe,guru:Ae,khmr:Ne,knda:ke,laoo:Be,latn:Le,limb:Me,mlym:Te,mong:_e,mymr:Ie,orya:Re,tamldec:Ke,telu:Ue,thai:Ze,tibt:Ye,hanidec:Ge,default:ze}),Ve=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var u=arguments[t],a=0,o=u.length;a<o;a++,i++)r[i]=u[a];return r},Xe=Object.create(null),He=0,Je=["adlm","ahom","arab","arabext","armn","armnlow","bali","beng","bhks","brah","cakm","cham","cyrl","deva","ethi","fullwide","geor","gong","gonm","grek","greklow","gujr","guru","hanidays","hanidec","hans","hansfin","hant","hantfin","hebr","hmng","hmnp","java","jpan","jpanfin","jpanyear","kali","khmr","knda","lana","lanatham","laoo","latn","lepc","limb","mathbold","mathdbl","mathmono","mathsanb","mathsans","mlym","modi","mong","mroo","mtei","mymr","mymrshan","mymrtlng","newa","nkoo","olck","orya","osma","rohg","roman","romanlow","saur","shrd","sind","sinh","sora","sund","takr","talu","taml","tamldec","telu","thai","tibt","tirh","vaii","wara","wcho"];He<Je.length;He++){Xe[Je[He]]=!0}var $e=["locale","numberingSystem","style","currency","currencyDisplay","currencySign","unit","unitDisplay","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","useGrouping","notation","compactDisplay","signDisplay"],Qe=["angle-degree","area-acre","area-hectare","concentr-percent","digital-bit","digital-byte","digital-gigabit","digital-gigabyte","digital-kilobit","digital-kilobyte","digital-megabit","digital-megabyte","digital-petabyte","digital-terabit","digital-terabyte","duration-day","duration-hour","duration-millisecond","duration-minute","duration-month","duration-second","duration-week","duration-year","length-centimeter","length-foot","length-inch","length-kilometer","length-meter","length-mile-scandinavian","length-mile","length-millimeter","length-yard","mass-gram","mass-kilogram","mass-ounce","mass-pound","mass-stone","temperature-celsius","temperature-fahrenheit","volume-fluid-ounce","volume-gallon","volume-liter","volume-milliliter"].map(function(e){return e.replace(/^(.*?)-/,"")});function qe(e){if(e=e.replace(/([A-Z])/g,function(e,t){return t.toLowerCase()}),-1<Qe.indexOf(e))return 1;var t=e.split("-per-");return!(2!==t.length||Qe.indexOf(t[0])<0||Qe.indexOf(t[1])<0)}function et(e){var t=e.indexOf("-u-");return 0<=t?e.slice(0,t):e}var tt=new WeakMap;function nt(e,t,n){var r=N(t),i=void 0===n?Object.create(null):C(n),u=Object.create(null),a=E(i,"localeMatcher","string",["best fit","lookup"],"best fit");u.localeMatcher=a;var o=E(i,"numberingSystem","string",void 0,void 0);if(void 0!==o&&!Xe[o])throw RangeError("Invalid numberingSystems: "+o);u.nu=o;var c,s,l,p,m=it.localeData,g=k(it.getDefaultLocale)(it.availableLocales,r,u,["nu"],m),y=m[et(g.locale)];w(tt,e,{locale:g.locale,dataLocale:g.dataLocale,numberingSystem:g.nu,ild:(c=y.units,s=y.currencies,l=y.numbers,p=g.nu,{decimal:{compactShort:B(l.decimal[p].short),compactLong:B(l.decimal[p].long)},currency:{compactShort:B(l.currency[p].short)},symbols:l.symbols[p],currencySymbols:Object.keys(s).reduce(function(e,t){return e[t]={currencyName:s[t].displayName,currencySymbol:s[t].symbol,currencyNarrowSymbol:s[t].narrow||s[t].symbol},e},Object.create(null)),unitSymbols:Object.keys(c).reduce(function(e,t){return e[t]={unitSymbol:L(c[t].short,"symbol"),unitNarrowSymbol:L(c[t].narrow,"symbol"),unitName:L(c[t].long,"symbol")},e},Object.create(null))})}),function(e,t){void 0===t&&(t=Object.create(null));var n=E(t,"style","string",["decimal","percent","currency","unit"],"decimal");j(tt,e,"style",n);var r=E(t,"currency","string",void 0,void 0);if(void 0!==r&&!A(r))throw RangeError("Malformed currency code");var i=E(t,"currencyDisplay","string",["code","symbol","narrowSymbol","name"],"symbol"),u=E(t,"currencySign","string",["standard","accounting"],"standard"),a=E(t,"unit","string",void 0,void 0);if(void 0!==a&&!qe(a))throw RangeError("Invalid unit argument for Intl.NumberFormat()");var o=E(t,"unitDisplay","string",["short","narrow","long"],"short");if("currency"===n){if(void 0===r)throw new TypeError("currency cannot be undefined");w(tt,e,{currency:r.toUpperCase(),currencyDisplay:i,currencySign:u})}else if("unit"===n){if(void 0===a)throw new TypeError("unit cannot be undefined");w(tt,e,{unit:a,unitDisplay:o})}}(e,i);var h,f,b,d=K(tt,e,"style");if("currency"===d){var D=K(tt,e,"currency"),v=(b=D)in Fe?Fe[b]:2;f=h=v}else h=0,f="percent"===d?0:3;var S=E(i,"notation","string",["standard","scientific","engineering","compact"],"standard");j(tt,e,"notation",S),x(tt,e,i,h,f);var F=E(i,"compactDisplay","string",["short","long"],"short");"compact"===S&&j(tt,e,"compactDisplay",F);var P=E(i,"useGrouping","boolean",void 0,!0);j(tt,e,"useGrouping",P);var O=E(i,"signDisplay","string",["auto","never","always","exceptZero"],"auto");j(tt,e,"signDisplay",O)}function rt(e,t){var n,r=K(tt,e,"pl"),i=0,u=K(tt,e,"ild"),a=t;if(isNaN(t))n=u.symbols.nan;else if(isFinite(t)){"percent"===K(tt,e,"style")&&(a*=100),i=function(e,t){if(0===t)return 0;t<0&&(t=-t);var n=G(t),r=ct(e,n);return t/=Math.pow(10,r),0!==ot(e,t).roundedNumber&&G(t)!==n-r?ct(e,n+1):r}(e,a);var o=ot(e,a/=Math.pow(10,i));n=o.formattedString,a=o.roundedNumber}else n=u.symbols.infinity;for(var c=function(e,t,n){var r,i=U(tt,e,"style","patterns","signDisplay","notation"),u=i.style,a=i.patterns;switch(u){case"percent":r=a.percent;break;case"unit":var o=K(tt,e,"unitDisplay"),c=K(tt,e,"unit");r=a.unit[c][o];break;case"currency":var s=U(tt,e,"currency","currencyDisplay","currencySign"),l=s.currency,p=s.currencyDisplay,m=s.currencySign;r=a.currency[l][p][m];break;case"decimal":r=a.decimal}var g,y,h=K(tt,e,"notation"),f=K(tt,e,"signDisplay"),b=r[f];if(!isNaN(t)&&isFinite(t))if("scientific"===h||"engineering"===h)g=b.scientific;else if(0!==n){R("compact"===h,"notation must be compact");var d=K(tt,e,"compactDisplay"),D=String(Math.pow(10,n));"short"===d&&2<n&&n<15?g=b.compactShort[D]:2<n&&n<15&&(R("long"===d,"compactDisplay must be long"),g=b.compactLong[D])}g=g||b.standard;y="never"===f?g.zeroPattern:"auto"===f?Z(t,0)||0<t||isNaN(t)?g.zeroPattern:g.negativePattern:"always"===f?Z(t,0)||0<t||isNaN(t)?g.positivePattern:g.negativePattern:(R("exceptZero"===f,"signDisplay must be exceptZero"),Z(t,0)||isNaN(t)?g.zeroPattern:0<t||Z(t,0)?g.positivePattern:g.negativePattern);return y}(e,t,i),s=function(e){for(var t=[],n=e.indexOf("{"),r=0,i=0,u=e.length;n<e.length&&-1<n;)R(n<(r=e.indexOf("}",n)),"Invalid pattern "+e),i<n&&t.push({type:"literal",value:e.substring(i,n)}),t.push({type:e.substring(n+1,r),value:void 0}),i=r+1,n=e.indexOf("{",i);return i<u&&t.push({type:"literal",value:e.substring(i,u)}),t}(c),l=[],p=0,m=K(tt,e,"notation"),g=0,y=s;g<y.length;g++){var h=y[g];switch(h.type){case"literal":l.push(h);break;case Y.number:if(isNaN(a))l.push({type:"nan",value:n});else if(a===1/0||t===-1/0)l.push({type:"infinity",value:n});else{var f=U(tt,e,"numberingSystem","useGrouping","notation"),b=f.numberingSystem,d=f.useGrouping;if(b&&b in We){for(var D=We[b],v="",S=0,F=n;S<F.length;S++){var P=F[S];v+=D[+P]||P}n=v}var O=n.indexOf("."),C=void 0,E=void 0;if(0<O?(C=n.slice(0,O),E=n.slice(O+1)):C=n,d&&("compact"!==m||4<C.length)){for(var j=u.symbols.group,w=[],x=C.length-3;0<x;x-=3)w.push(C.slice(x,x+3));for(w.push(C.slice(0,x+3));0<w.length;){var A=w.pop();l.push({type:"integer",value:A}),0<w.length&&l.push({type:"group",value:j})}}else l.push({type:"integer",value:C});void 0!==E&&l.push({type:"decimal",value:u.symbols.decimal},{type:"fraction",value:E})}break;case Y.plusSign:l.push({type:"plusSign",value:u.symbols.plusSign});break;case Y.minusSign:l.push({type:"minusSign",value:u.symbols.minusSign});break;case Y.compactSymbol:var N=void 0;(N="currency"===(k=K(tt,e,"style"))?u.currency.compactShort:u.decimal.compactShort)&&l.push({type:"compact",value:st(r,t,N[String(Math.pow(10,i))])});break;case Y.compactName:var k=K(tt,e,"style"),B=K(tt,e,"currencyDisplay");N=void 0;(N="currency"===k&&"name"!==B?u.currency.compactLong||u.currency.compactShort:u.decimal.compactLong||u.decimal.compactShort)&&l.push({type:"compact",value:st(r,t,N[String(Math.pow(10,i))])});break;case Y.scientificSeparator:l.push({type:"exponentSeparator",value:u.symbols.exponential});break;case Y.scientificExponent:i<0&&(l.push({type:"exponentMinusSign",value:u.symbols.minusSign}),i=-i);var L=z(i,0,0);l.push({type:"exponentInteger",value:L.formattedString});break;case Y.percentSign:l.push({type:"percentSign",value:u.symbols.percentSign});break;case Y.unitSymbol:case Y.unitNarrowSymbol:case Y.unitName:if("unit"===(k=K(tt,e,"style"))){var M=K(tt,e,"unit"),T=st(r,t,u.unitSymbols[M][h.type])[p];l.push({type:"unit",value:T}),p++}break;case Y.currencyCode:var _=K(tt,e,"currency");l.push({type:"currency",value:_});break;case Y.currencySymbol:_=K(tt,e,"currency");l.push({type:"currency",value:u.currencySymbols[_].currencySymbol||_});break;case Y.currencyNarrowSymbol:_=K(tt,e,"currency");l.push({type:"currency",value:u.currencySymbols[_].currencyNarrowSymbol||_});break;case Y.currencyName:_=K(tt,e,"currency");var I=st(r,t,u.currencySymbols[_].currencyName);l.push({type:"currency",value:I});break;default:throw Error('unrecognized pattern part "'+h.type+'" in "'+c+'"')}}return l}var it=function(e,t){if(!(this&&this instanceof it))return new it(e,t);nt(this,e,t);var n=it.localeData[et(K(tt,this,"locale"))];w(tt,this,{pl:new Intl.PluralRules(e,U(tt,this,"minimumFractionDigits","maximumFractionDigits","minimumIntegerDigits","minimumSignificantDigits","maximumSignificantDigits","roundingType","notation")),patterns:new ee(n.units,n.currencies,n.numbers,K(tt,this,"numberingSystem"),K(tt,this,"unit"),K(tt,this,"currency"),K(tt,this,"currencySign"))})};function ut(e,t,n){var r=n.value;Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:!0,value:r})}ut(it.prototype,"formatToParts",{value:function(e){return t=this,n=lt(e),rt(t,n);var t,n}}),ut(it.prototype,"resolvedOptions",{value:function(){for(var e=U.apply(void 0,Ve([tt,this],$e)),t={},n=0,r=$e;n<r.length;n++){var i=r[n],u=e[i];void 0!==u&&(t[i]=u)}return t}});var at={enumerable:!1,configurable:!0,get:function(){if("object"!=typeof this||!(this instanceof it))throw TypeError("Intl.NumberFormat format property accessor called on imcompatible receiver");var n=this,e=K(tt,this,"boundFormat");return void 0===e&&(e=function(e){var t=lt(e);return n.formatToParts(t).map(function(e){return e.value}).join("")},Object.defineProperty(e,"name",{configurable:!0,enumerable:!1,writable:!1,value:""}),j(tt,this,"boundFormat",e)),e}};function ot(e,t){var n=t<0||Z(t,-0);n&&(t=-t);var r,i=U(tt,e,"roundingType","minimumFractionDigits","maximumFractionDigits","minimumIntegerDigits","minimumSignificantDigits","maximumSignificantDigits"),u=i.roundingType,a=i.minimumSignificantDigits,o=i.maximumSignificantDigits,c=i.minimumFractionDigits,s=i.maximumFractionDigits,l=i.minimumIntegerDigits;"significantDigits"===u?r=y(t,a,o):"fractionDigits"===u?r=z(t,c,s):(R("compactRounding"===u,"roundingType must be compactRounding"),1<(r=y(t,1,2)).integerDigitsCount&&(r=z(t,0,0))),t=r.roundedNumber;var p=r.formattedString,m=r.integerDigitsCount;m<l&&(p=b("0",l-m)+p);return n&&(t=-t),{roundedNumber:t,formattedString:p}}function ct(e,t){var n,r=K(tt,e,"notation"),i=K(tt,e,"style"),u=K(tt,e,"ild");switch(r){case"standard":return 0;case"scientific":return t;case"engineering":return 3*Math.floor(t/3);case"compact":var a=K(tt,e,"compactDisplay"),o=K(tt,e,"currencyDisplay"),c=void 0;if(!(c="currency"===i&&"name"!==o?("long"===a?u.currency.compactLong:u.currency.compactShort)||u.currency.compactShort:"long"===a?u.decimal.compactLong:u.decimal.compactShort))return 0;var s=String(Math.pow(10,t)),l=Object.keys(c);if(null===(n=c[s])||void 0===n||!n.other)return 0;if(s<l[0])return 0;if(s>l[l.length-1])return G(+l[l.length-1]);for(var p=l.indexOf(s);0<p&&c[l[p-1]].other===c[s].other;p--);return G(+l[p])}}function st(e,t,n){return n[e.select(t)]||n.other}function lt(e){return"bigint"==typeof e?e:function(e){if(void 0===e)return NaN;if(null===e)return 0;if("boolean"==typeof e)return e?1:0;if("number"==typeof e)return e;if("symbol"!=typeof e&&"bigint"!=typeof e)return Number(e);throw new TypeError("Cannot convert symbol/bigint to number")}(e)}Object.defineProperty(at.get,"name",{configurable:!0,enumerable:!1,writable:!1,value:"get format"}),Object.defineProperty(it.prototype,"format",at),ut(it,"supportedLocalesOf",{value:function(e,t){return n=it.availableLocales,r=N(e),void 0!==(i=t)&&E(i=C(i),"localeMatcher","string",["lookup","best fit"],"best fit"),a(n,r);var n,r,i}}),it.__addLocaleData=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=0,r=e;n<r.length;n++)for(var i=r[n],u=0,a=Object.keys(Ve(i.availableLocales,Object.keys(i.aliases),Object.keys(i.parentLocales)).reduce(function(e,t){return e[t]=!0,e},{}));u<a.length;u++){var o=a[u];try{it.localeData[o]=s(o,i)}catch(e){}}it.availableLocales=Object.keys(it.localeData),it.__defaultLocale||(it.__defaultLocale=it.availableLocales[0])},it.__defaultLocale="en",it.localeData={},it.availableLocales=[],it.getDefaultLocale=function(){return it.__defaultLocale},it.polyfilled=!0;try{"undefined"!=typeof Symbol&&Object.defineProperty(it.prototype,Symbol.toStringTag,{configurable:!0,enumerable:!1,writable:!1,value:"Object"}),Object.defineProperty(it.prototype.constructor,"length",{configurable:!0,enumerable:!1,writable:!1,value:0}),Object.defineProperty(it.supportedLocalesOf,"length",{configurable:!0,enumerable:!1,writable:!1,value:1}),Object.defineProperty(it,"prototype",{configurable:!1,enumerable:!1,writable:!1,value:it.prototype})}catch(e){}e.UnifiedNumberFormat=it,e.isUnitSupported=function(e){try{new Intl.NumberFormat(void 0,{style:"unit",unit:e})}catch(e){return!1}return!0},Object.defineProperty(e,"__esModule",{value:!0})});
//# sourceMappingURL=intl-unified-numberformat.min.js.map

@@ -19,2 +19,3 @@ import { Unit } from './units-constants';

unitDisplay?: UnifiedNumberFormatOptionsUnitDisplay;
numberingSystem?: string;
};

@@ -21,0 +22,0 @@ export declare type ResolvedUnifiedNumberFormatOptions = Intl.ResolvedNumberFormatOptions & Pick<UnifiedNumberFormatInternal, 'currencySign' | 'unit' | 'unitDisplay' | 'notation' | 'compactDisplay' | 'signDisplay'>;

@@ -13,2 +13,8 @@ var __spreadArrays = (this && this.__spreadArrays) || function () {

import * as ILND from './ilnd-numbers.json';
import { names as numberingSystemNames } from './numbering-systems.json';
var VALID_NUMBERING_SYSTEM_NAMES = Object.create(null);
for (var _i = 0, numberingSystemNames_1 = numberingSystemNames; _i < numberingSystemNames_1.length; _i++) {
var nu = numberingSystemNames_1[_i];
VALID_NUMBERING_SYSTEM_NAMES[nu] = true;
}
var RESOLVED_OPTIONS_KEYS = [

@@ -98,2 +104,10 @@ 'locale',

opt.localeMatcher = matcher;
var numberingSystem = getOption(options, 'numberingSystem', 'string', undefined, undefined);
if (numberingSystem !== undefined &&
!VALID_NUMBERING_SYSTEM_NAMES[numberingSystem]) {
// 8.a. If numberingSystem does not match the Unicode Locale Identifier type nonterminal,
// throw a RangeError exception.
throw RangeError("Invalid numberingSystems: " + numberingSystem);
}
opt.nu = numberingSystem;
var localeData = UnifiedNumberFormat.localeData;

@@ -104,8 +118,7 @@ var r = createResolveLocale(UnifiedNumberFormat.getDefaultLocale)(UnifiedNumberFormat.availableLocales, requestedLocales, opt,

var ildData = localeData[removeUnicodeExtensionFromLocale(r.locale)];
var numberingSystem = r.nu;
setMultiInternalSlots(__INTERNAL_SLOT_MAP__, nf, {
locale: r.locale,
dataLocale: r.dataLocale,
numberingSystem: numberingSystem,
ild: extractILD(ildData.units, ildData.currencies, ildData.numbers, numberingSystem),
numberingSystem: r.nu,
ild: extractILD(ildData.units, ildData.currencies, ildData.numbers, r.nu),
});

@@ -112,0 +125,0 @@ // https://tc39.es/proposal-unified-intl-numberformat/section11/numberformat_proposed_out.html#sec-setnumberformatunitoptions

@@ -75,2 +75,3 @@ import { NumberFormatDigitInternalSlots } from '@formatjs/intl-utils';

unitDisplay?: UnifiedNumberFormatOptionsUnitDisplay;
numberingSystem?: string;
};

@@ -77,0 +78,0 @@

{
"name": "@formatjs/intl-unified-numberformat",
"version": "3.3.4",
"version": "3.3.5",
"description": "Ponyfill for intl unified numberformat proposal",

@@ -28,19 +28,22 @@ "keywords": [

"devDependencies": {
"@formatjs/intl-pluralrules": "^1.5.6",
"@formatjs/intl-pluralrules": "^1.5.7",
"@types/jest": "^25.2.1",
"chalk": "^4.0.0",
"formatjs-extract-cldr-data": "^10.1.5"
"formatjs-extract-cldr-data": "^10.1.6",
"jest": "^25.4.0",
"ts-jest": "^25.4.0"
},
"dependencies": {
"@formatjs/intl-utils": "^2.2.3"
"@formatjs/intl-utils": "^2.2.4"
},
"scripts": {
"benchmark": "ts-node --project ./tsconfig.cjs.json tests/benchmark",
"build": "npm run cldr && npm run compile && npm run rollup ",
"cldr": "NODE_OPTIONS=--max-old-space-size=8192 ts-node --project tsconfig.cjs.json scripts/cldr",
"benchmark": "ts-node tests/benchmark",
"build": "yarn run cldr && yarn run compile && yarn run rollup ",
"cldr": "NODE_OPTIONS=--max-old-space-size=8192 ts-node scripts/cldr",
"clean": "rimraf dist dist-es6 lib src/locales.ts *.tsbuildinfo",
"compile": "NODE_OPTIONS=--max-old-space-size=8192 tsc && tsc -p tsconfig.cjs.json && tsc -p tsconfig.es6.json && api-extractor run --local",
"jest": "cross-env NODE_ICU_DATA=../../node_modules/full-icu TS_NODE_PROJECT=tsconfig.cjs.json cross-env NODE_ENV=test jest",
"compile": "NODE_OPTIONS=--max-old-space-size=8192 tsc && tsc -p tsconfig.esm.json && tsc -p tsconfig.es6.json && api-extractor run --local",
"jest": "cross-env NODE_ICU_DATA=../../node_modules/full-icu cross-env NODE_ENV=test jest",
"rollup": "NODE_OPTIONS=--max-old-space-size=8192 rollup -c rollup.config.js",
"test": "npm run jest",
"test262": "cross-env NODE_ICU_DATA=../../node_modules/full-icu TS_NODE_PROJECT=tsconfig.cjs.json ts-node tests/runner"
"test": "yarn run jest",
"test262": "cross-env NODE_ICU_DATA=../../node_modules/full-icu ts-node tests/runner"
},

@@ -50,3 +53,3 @@ "bugs": {

},
"gitHead": "9c83c2c89c3fcf8d68da29be3f1be8f516b21ae0"
"gitHead": "84e7cc6f3723801271661fdbdb5391fac7e6f74c"
}

@@ -1,1 +0,1 @@

require('./dist/polyfill')
require('./dist/polyfill');
# `intl-unified-numberformat`
A ponyfill/polyfill for [`intl-unified-numberformat`](https://github.com/tc39/proposal-unified-intl-numberformat). This wraps `Intl.NumberFormat` and has the exact same APIs.
## Installation
```
npm install @formatjs/intl-unified-numberformat
```
## Requirements
This package requires the following capabilities:
- [Intl.PluralRules](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/PluralRules)
# Features
Everything in the https://github.com/tc39/proposal-unified-intl-numberformat proposal with the caveats below.
## Caveats
1. `compact` notation is currently buggy in certain locales with special compact rules (such as `zh-Hant` or `Somali`) See https://github.com/tc39/proposal-unified-intl-numberformat/issues/26 for more details.
# Usage
To use the ponyfill, import it along with its data:
```tsx
import {UnifiedNumberFormat} from '@formatjs/intl-unified-numberformat';
UnifiedNumberFormat.__addLocaleData(
require('@formatjs/intl-unified-numberformat/dist/locale-data/zh.json') // locale-data for zh
);
UnifiedNumberFormat.__addLocaleData(
require('@formatjs/intl-unified-numberformat/dist/locale-data/en.json') // locale-data for en
);
new UnifiedNumberFormat('zh', {
style: 'unit',
unit: 'bit',
unitDisplay: 'long',
}).format(1000); // 1,000比特
```
To use this as a polyfill, override `Intl.NumberFormat` as below:
```tsx
import '@formatjs/intl-unified-numberformat/polyfill';
if (typeof Intl.NumberFormat.__addLocaleData === 'function') {
Intl.NumberFormat.__addLocaleData(
require('@formatjs/intl-unified-numberformat/dist/locale-data/zh.json') // locale-data for zh
);
Intl.NumberFormat.__addLocaleData(
require('@formatjs/intl-unified-numberformat/dist/locale-data/en.json') // locale-data for en
);
}
new Intl.NumberFormat('zh', {
style: 'unit',
unit: 'bit',
unitDisplay: 'long',
}).format(1000); // 1,000比特
new Intl.NumberFormat('en-US', {
notation: 'engineering',
}).format(987654321); // 987.7E6
new Intl.NumberFormat('zh', {
style: 'currency',
currency: 'EUR',
currencySign: 'accounting',
}).format(-100); // (€100.00)
```
## Supported Units
Currently [intl-unified-numberformat](https://tc39.es/proposal-unified-intl-numberformat/section6/locales-currencies-tz_diff_out.html#sec-issanctionedsimpleunitidentifier) has a list of sanctioned units as below
```tsx
type Unit =
| 'acre'
| 'bit'
| 'byte'
| 'celsius'
| 'centimeter'
| 'day'
| 'degree'
| 'fahrenheit'
| 'fluid-ounce'
| 'foot'
| 'gallon'
| 'gigabit'
| 'gigabyte'
| 'gram'
| 'hectare'
| 'hour'
| 'inch'
| 'kilobit'
| 'kilobyte'
| 'kilogram'
| 'kilometer'
| 'liter'
| 'megabit'
| 'megabyte'
| 'meter'
| 'mile'
| 'mile-scandinavian'
| 'millimeter'
| 'milliliter'
| 'millisecond'
| 'minute'
| 'month'
| 'ounce'
| 'percent'
| 'petabyte'
| 'pound'
| 'second'
| 'stone'
| 'terabit'
| 'terabyte'
| 'week'
| 'yard'
| 'year';
```
We've migrated the docs to https://formatjs.io.

@@ -50,3 +50,11 @@ import {Unit} from './units-constants';

import * as ILND from './ilnd-numbers.json';
import {names as numberingSystemNames} from './numbering-systems.json';
const VALID_NUMBERING_SYSTEM_NAMES: Record<string, boolean> = Object.create(
null
);
for (const nu of numberingSystemNames) {
VALID_NUMBERING_SYSTEM_NAMES[nu] = true;
}
const RESOLVED_OPTIONS_KEYS = [

@@ -144,2 +152,3 @@ 'locale',

unitDisplay?: UnifiedNumberFormatOptionsUnitDisplay;
numberingSystem?: string;
};

@@ -208,3 +217,4 @@

const requestedLocales = getCanonicalLocales(locales);
const options = opts === undefined ? Object.create(null) : toObject(opts);
const options: UnifiedNumberFormatOptions =
opts === undefined ? Object.create(null) : toObject(opts);
const opt: any = Object.create(null);

@@ -219,2 +229,20 @@ const matcher = getOption(

opt.localeMatcher = matcher;
const numberingSystem = getOption(
options,
'numberingSystem',
'string',
undefined,
undefined
);
if (
numberingSystem !== undefined &&
!VALID_NUMBERING_SYSTEM_NAMES[numberingSystem]
) {
// 8.a. If numberingSystem does not match the Unicode Locale Identifier type nonterminal,
// throw a RangeError exception.
throw RangeError(`Invalid numberingSystems: ${numberingSystem}`);
}
opt.nu = numberingSystem;
const {localeData} = UnifiedNumberFormat;

@@ -230,13 +258,7 @@ const r = createResolveLocale(UnifiedNumberFormat.getDefaultLocale)(

const ildData = localeData[removeUnicodeExtensionFromLocale(r.locale)];
const numberingSystem = r.nu;
setMultiInternalSlots(__INTERNAL_SLOT_MAP__, nf, {
locale: r.locale,
dataLocale: r.dataLocale,
numberingSystem,
ild: extractILD(
ildData.units,
ildData.currencies,
ildData.numbers,
numberingSystem
),
numberingSystem: r.nu,
ild: extractILD(ildData.units, ildData.currencies, ildData.numbers, r.nu),
});

@@ -243,0 +265,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc