New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@tolgee/format-icu

Package Overview
Dependencies
Maintainers
0
Versions
228
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tolgee/format-icu - npm Package Compare versions

Comparing version 5.30.2-prerelease.4588b3b3.0 to 5.31.0

2

dist/tolgee-format-icu.cjs.min.js

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

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};function t(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}var r=function(){return r=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},r.apply(this,arguments)};function n(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}function i(e,t){var r=t&&t.cache?t.cache:E,n=t&&t.serializer?t.serializer:u;return(t&&t.strategy?t.strategy:a)(e,{cache:r,serializer:n})}function o(e,t,r,n){var i,o=null==(i=n)||"number"==typeof i||"boolean"==typeof i?n:r(n),h=t.get(o);return void 0===h&&(h=e.call(this,n),t.set(o,h)),h}function h(e,t,r){var n=Array.prototype.slice.call(arguments,3),i=r(n),o=t.get(i);return void 0===o&&(o=e.apply(this,n),t.set(i,o)),o}function s(e,t,r,n,i){return r.bind(t,e,n,i)}function a(e,t){return s(e,this,1===e.length?o:h,t.cache.create(),t.serializer)}var u=function(){return JSON.stringify(arguments)};function c(){this.cache=Object.create(null)}c.prototype.get=function(e){return this.cache[e]},c.prototype.set=function(e,t){this.cache[e]=t};var l,p,f,E={create:function(){return new c}},m={variadic:function(e,t){return s(e,this,h,t.cache.create(),t.serializer)},monadic:function(e,t){return s(e,this,o,t.cache.create(),t.serializer)}};function g(e){return e.type===p.literal}function b(e){return e.type===p.argument}function H(e){return e.type===p.number}function y(e){return e.type===p.date}function T(e){return e.type===p.time}function B(e){return e.type===p.select}function v(e){return e.type===p.plural}function d(e){return e.type===p.pound}function _(e){return e.type===p.tag}function A(e){return!(!e||"object"!=typeof e||e.type!==f.number)}function L(e){return!(!e||"object"!=typeof e||e.type!==f.dateTime)}!function(e){e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",e[e.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",e[e.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",e[e.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",e[e.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",e[e.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",e[e.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",e[e.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",e[e.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",e[e.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",e[e.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",e[e.INVALID_TAG=23]="INVALID_TAG",e[e.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",e[e.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",e[e.UNCLOSED_TAG=27]="UNCLOSED_TAG"}(l||(l={})),function(e){e[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound",e[e.tag=8]="tag"}(p||(p={})),function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"}(f||(f={}));var P=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,S=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function N(e){var t={};return e.replace(S,(function(e){var r=e.length;switch(e[0]){case"G":t.era=4===r?"long":5===r?"narrow":"short";break;case"y":t.year=2===r?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":t.month=["numeric","2-digit","short","long","narrow"][r-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":t.day=["numeric","2-digit"][r-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":t.weekday=4===r?"long":5===r?"narrow":"short";break;case"e":if(r<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][r-4];break;case"c":if(r<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][r-4];break;case"a":t.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":t.hourCycle="h12",t.hour=["numeric","2-digit"][r-1];break;case"H":t.hourCycle="h23",t.hour=["numeric","2-digit"][r-1];break;case"K":t.hourCycle="h11",t.hour=["numeric","2-digit"][r-1];break;case"k":t.hourCycle="h24",t.hour=["numeric","2-digit"][r-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":t.minute=["numeric","2-digit"][r-1];break;case"s":t.second=["numeric","2-digit"][r-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":t.timeZoneName=r<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""})),t}var I=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;var C=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,R=/^(@+)?(\+|#+)?[rs]?$/g,M=/(\*)(0+)|(#+)(0+)|(0+)/g,O=/^(0+)$/;function U(e){var t={};return"r"===e[e.length-1]?t.roundingPriority="morePrecision":"s"===e[e.length-1]&&(t.roundingPriority="lessPrecision"),e.replace(R,(function(e,r,n){return"string"!=typeof n?(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length):"+"===n?t.minimumSignificantDigits=r.length:"#"===r[0]?t.maximumSignificantDigits=r.length:(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length+("string"==typeof n?n.length:0)),""})),t}function G(e){switch(e){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function w(e){var t;if("E"===e[0]&&"E"===e[1]?(t={notation:"engineering"},e=e.slice(2)):"E"===e[0]&&(t={notation:"scientific"},e=e.slice(1)),t){var r=e.slice(0,2);if("+!"===r?(t.signDisplay="always",e=e.slice(2)):"+?"===r&&(t.signDisplay="exceptZero",e=e.slice(2)),!O.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function D(e){var t=G(e);return t||{}}function F(e){for(var t={},n=0,i=e;n<i.length;n++){var o=i[n];switch(o.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=o.options[0];continue;case"group-off":case",_":t.useGrouping=!1;continue;case"precision-integer":case".":t.maximumFractionDigits=0;continue;case"measure-unit":case"unit":t.style="unit",t.unit=o.options[0].replace(/^(.*?)-/,"");continue;case"compact-short":case"K":t.notation="compact",t.compactDisplay="short";continue;case"compact-long":case"KK":t.notation="compact",t.compactDisplay="long";continue;case"scientific":t=r(r(r({},t),{notation:"scientific"}),o.options.reduce((function(e,t){return r(r({},e),D(t))}),{}));continue;case"engineering":t=r(r(r({},t),{notation:"engineering"}),o.options.reduce((function(e,t){return r(r({},e),D(t))}),{}));continue;case"notation-simple":t.notation="standard";continue;case"unit-width-narrow":t.currencyDisplay="narrowSymbol",t.unitDisplay="narrow";continue;case"unit-width-short":t.currencyDisplay="code",t.unitDisplay="short";continue;case"unit-width-full-name":t.currencyDisplay="name",t.unitDisplay="long";continue;case"unit-width-iso-code":t.currencyDisplay="symbol";continue;case"scale":t.scale=parseFloat(o.options[0]);continue;case"rounding-mode-floor":t.roundingMode="floor";continue;case"rounding-mode-ceiling":t.roundingMode="ceil";continue;case"rounding-mode-down":t.roundingMode="trunc";continue;case"rounding-mode-up":t.roundingMode="expand";continue;case"rounding-mode-half-even":t.roundingMode="halfEven";continue;case"rounding-mode-half-down":t.roundingMode="halfTrunc";continue;case"rounding-mode-half-up":t.roundingMode="halfExpand";continue;case"integer-width":if(o.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");o.options[0].replace(M,(function(e,r,n,i,o,h){if(r)t.minimumIntegerDigits=n.length;else{if(i&&o)throw new Error("We currently do not support maximum integer digits");if(h)throw new Error("We currently do not support exact integer digits")}return""}));continue}if(O.test(o.stem))t.minimumIntegerDigits=o.stem.length;else if(C.test(o.stem)){if(o.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");o.stem.replace(C,(function(e,r,n,i,o,h){return"*"===n?t.minimumFractionDigits=r.length:i&&"#"===i[0]?t.maximumFractionDigits=i.length:o&&h?(t.minimumFractionDigits=o.length,t.maximumFractionDigits=o.length+h.length):(t.minimumFractionDigits=r.length,t.maximumFractionDigits=r.length),""}));var h=o.options[0];"w"===h?t=r(r({},t),{trailingZeroDisplay:"stripIfInteger"}):h&&(t=r(r({},t),U(h)))}else if(R.test(o.stem))t=r(r({},t),U(o.stem));else{var s=G(o.stem);s&&(t=r(r({},t),s));var a=w(o.stem);a&&(t=r(r({},t),a))}}return t}var k,V={"001":["H","h"],419:["h","H","hB","hb"],AC:["H","h","hb","hB"],AD:["H","hB"],AE:["h","hB","hb","H"],AF:["H","hb","hB","h"],AG:["h","hb","H","hB"],AI:["H","h","hb","hB"],AL:["h","H","hB"],AM:["H","hB"],AO:["H","hB"],AR:["h","H","hB","hb"],AS:["h","H"],AT:["H","hB"],AU:["h","hb","H","hB"],AW:["H","hB"],AX:["H"],AZ:["H","hB","h"],BA:["H","hB","h"],BB:["h","hb","H","hB"],BD:["h","hB","H"],BE:["H","hB"],BF:["H","hB"],BG:["H","hB","h"],BH:["h","hB","hb","H"],BI:["H","h"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["h","H","hB","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],BY:["H","h"],BZ:["H","h","hb","hB"],CA:["h","hb","H","hB"],CC:["H","h","hb","hB"],CD:["hB","H"],CF:["H","h","hB"],CG:["H","hB"],CH:["H","hB","h"],CI:["H","hB"],CK:["H","h","hb","hB"],CL:["h","H","hB","hb"],CM:["H","h","hB"],CN:["H","hB","hb","h"],CO:["h","H","hB","hb"],CP:["H"],CR:["h","H","hB","hb"],CU:["h","H","hB","hb"],CV:["H","hB"],CW:["H","hB"],CX:["H","h","hb","hB"],CY:["h","H","hb","hB"],CZ:["H"],DE:["H","hB"],DG:["H","h","hb","hB"],DJ:["h","H"],DK:["H"],DM:["h","hb","H","hB"],DO:["h","H","hB","hb"],DZ:["h","hB","hb","H"],EA:["H","h","hB","hb"],EC:["h","H","hB","hb"],EE:["H","hB"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],ER:["h","H"],ES:["H","hB","h","hb"],ET:["hB","hb","h","H"],FI:["H"],FJ:["h","hb","H","hB"],FK:["H","h","hb","hB"],FM:["h","hb","H","hB"],FO:["H","h"],FR:["H","hB"],GA:["H","hB"],GB:["H","h","hb","hB"],GD:["h","hb","H","hB"],GE:["H","hB","h"],GF:["H","hB"],GG:["H","h","hb","hB"],GH:["h","H"],GI:["H","h","hb","hB"],GL:["H","h"],GM:["h","hb","H","hB"],GN:["H","hB"],GP:["H","hB"],GQ:["H","hB","h","hb"],GR:["h","H","hb","hB"],GT:["h","H","hB","hb"],GU:["h","hb","H","hB"],GW:["H","hB"],GY:["h","hb","H","hB"],HK:["h","hB","hb","H"],HN:["h","H","hB","hb"],HR:["H","hB"],HU:["H","h"],IC:["H","h","hB","hb"],ID:["H"],IE:["H","h","hb","hB"],IL:["H","hB"],IM:["H","h","hb","hB"],IN:["h","H"],IO:["H","h","hb","hB"],IQ:["h","hB","hb","H"],IR:["hB","H"],IS:["H"],IT:["H","hB"],JE:["H","h","hb","hB"],JM:["h","hb","H","hB"],JO:["h","hB","hb","H"],JP:["H","K","h"],KE:["hB","hb","H","h"],KG:["H","h","hB","hb"],KH:["hB","h","H","hb"],KI:["h","hb","H","hB"],KM:["H","h","hB","hb"],KN:["h","hb","H","hB"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],KW:["h","hB","hb","H"],KY:["h","hb","H","hB"],KZ:["H","hB"],LA:["H","hb","hB","h"],LB:["h","hB","hb","H"],LC:["h","hb","H","hB"],LI:["H","hB","h"],LK:["H","h","hB","hb"],LR:["h","hb","H","hB"],LS:["h","H"],LT:["H","h","hb","hB"],LU:["H","h","hB"],LV:["H","hB","hb","h"],LY:["h","hB","hb","H"],MA:["H","h","hB","hb"],MC:["H","hB"],MD:["H","hB"],ME:["H","hB","h"],MF:["H","hB"],MG:["H","h"],MH:["h","hb","H","hB"],MK:["H","h","hb","hB"],ML:["H"],MM:["hB","hb","H","h"],MN:["H","h","hb","hB"],MO:["h","hB","hb","H"],MP:["h","hb","H","hB"],MQ:["H","hB"],MR:["h","hB","hb","H"],MS:["H","h","hb","hB"],MT:["H","h"],MU:["H","h"],MV:["H","h"],MW:["h","hb","H","hB"],MX:["h","H","hB","hb"],MY:["hb","hB","h","H"],MZ:["H","hB"],NA:["h","H","hB","hb"],NC:["H","hB"],NE:["H"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NI:["h","H","hB","hb"],NL:["H","hB"],NO:["H","h"],NP:["H","h","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],NZ:["h","hb","H","hB"],OM:["h","hB","hb","H"],PA:["h","H","hB","hb"],PE:["h","H","hB","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","H"],PL:["H","h"],PM:["H","hB"],PN:["H","h","hb","hB"],PR:["h","H","hB","hb"],PS:["h","hB","hb","H"],PT:["H","hB"],PW:["h","H"],PY:["h","H","hB","hb"],QA:["h","hB","hb","H"],RE:["H","hB"],RO:["H","hB"],RS:["H","hB","h"],RU:["H"],RW:["H","h"],SA:["h","hB","hb","H"],SB:["h","hb","H","hB"],SC:["H","h","hB"],SD:["h","hB","hb","H"],SE:["H"],SG:["h","hb","H","hB"],SH:["H","h","hb","hB"],SI:["H","hB"],SJ:["H"],SK:["H"],SL:["h","hb","H","hB"],SM:["H","h","hB"],SN:["H","h","hB"],SO:["h","H"],SR:["H","hB"],SS:["h","hb","H","hB"],ST:["H","hB"],SV:["h","H","hB","hb"],SX:["H","h","hb","hB"],SY:["h","hB","hb","H"],SZ:["h","hb","H","hB"],TA:["H","h","hb","hB"],TC:["h","hb","H","hB"],TD:["h","H","hB"],TF:["H","h","hB"],TG:["H","hB"],TH:["H","h"],TJ:["H","h"],TL:["H","hB","hb","h"],TM:["H","h"],TN:["h","hB","hb","H"],TO:["h","H"],TR:["H","hB"],TT:["h","hb","H","hB"],TW:["hB","hb","h","H"],TZ:["hB","hb","H","h"],UA:["H","hB","h"],UG:["hB","hb","H","h"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],UY:["h","H","hB","hb"],UZ:["H","hB","h"],VA:["H","h","hB"],VC:["h","hb","H","hB"],VE:["h","H","hB","hb"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],VN:["H","h"],VU:["h","H"],WF:["H","hB"],WS:["h","H"],XK:["H","hB","h"],YE:["h","hB","hb","H"],YT:["H","hB"],ZA:["H","h","hb","hB"],ZM:["h","hb","H","hB"],ZW:["H","h"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","hB"],"en-HK":["h","hb","H","hB"],"en-IL":["H","h","hb","hB"],"en-MY":["h","hb","H","hB"],"es-BR":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"gu-IN":["hB","hb","h","H"],"hi-IN":["hB","h","H"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],"ta-IN":["hB","h","hb","H"],"te-IN":["hB","h","H"],"zu-ZA":["H","hB","hb","h"]};function X(e){var t=e.hourCycle;if(void 0===t&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var r,n=e.language;return"root"!==n&&(r=e.maximize().region),(V[r||""]||V[n||""]||V["".concat(n,"-001")]||V["001"])[0]}var x=new RegExp("^".concat(P.source,"*")),K=new RegExp("".concat(P.source,"*$"));function j(e,t){return{start:e,end:t}}var Y=!!String.prototype.startsWith&&"_a".startsWith("a",1),Z=!!String.fromCodePoint,W=!!Object.fromEntries,z=!!String.prototype.codePointAt,Q=!!String.prototype.trimStart,J=!!String.prototype.trimEnd,q=!!Number.isSafeInteger?Number.isSafeInteger:function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},$=!0;try{$="a"===(null===(k=se("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu").exec("a"))||void 0===k?void 0:k[0])}catch(e){$=!1}var ee,te=Y?function(e,t,r){return e.startsWith(t,r)}:function(e,t,r){return e.slice(r,r+t.length)===t},re=Z?String.fromCodePoint:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r,n="",i=e.length,o=0;i>o;){if((r=e[o++])>1114111)throw RangeError(r+" is not a valid code point");n+=r<65536?String.fromCharCode(r):String.fromCharCode(55296+((r-=65536)>>10),r%1024+56320)}return n},ne=W?Object.fromEntries:function(e){for(var t={},r=0,n=e;r<n.length;r++){var i=n[r],o=i[0],h=i[1];t[o]=h}return t},ie=z?function(e,t){return e.codePointAt(t)}:function(e,t){var r=e.length;if(!(t<0||t>=r)){var n,i=e.charCodeAt(t);return i<55296||i>56319||t+1===r||(n=e.charCodeAt(t+1))<56320||n>57343?i:n-56320+(i-55296<<10)+65536}},oe=Q?function(e){return e.trimStart()}:function(e){return e.replace(x,"")},he=J?function(e){return e.trimEnd()}:function(e){return e.replace(K,"")};function se(e,t){return new RegExp(e,t)}if($){var ae=se("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");ee=function(e,t){var r;return ae.lastIndex=t,null!==(r=ae.exec(e)[1])&&void 0!==r?r:""}}else ee=function(e,t){for(var r=[];;){var n=ie(e,t);if(void 0===n||pe(n)||fe(n))break;r.push(n),t+=n>=65536?2:1}return re.apply(void 0,r)};var ue,ce=function(){function e(e,t){void 0===t&&(t={}),this.message=e,this.position={offset:0,line:1,column:1},this.ignoreTag=!!t.ignoreTag,this.locale=t.locale,this.requiresOtherClause=!!t.requiresOtherClause,this.shouldParseSkeletons=!!t.shouldParseSkeletons}return e.prototype.parse=function(){if(0!==this.offset())throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(e,t,r){for(var n=[];!this.isEOF();){var i=this.char();if(123===i){if((o=this.parseArgument(e,r)).err)return o;n.push(o.val)}else{if(125===i&&e>0)break;if(35!==i||"plural"!==t&&"selectordinal"!==t){if(60===i&&!this.ignoreTag&&47===this.peek()){if(r)break;return this.error(l.UNMATCHED_CLOSING_TAG,j(this.clonePosition(),this.clonePosition()))}if(60===i&&!this.ignoreTag&&le(this.peek()||0)){if((o=this.parseTag(e,t)).err)return o;n.push(o.val)}else{var o;if((o=this.parseLiteral(e,t)).err)return o;n.push(o.val)}}else{var h=this.clonePosition();this.bump(),n.push({type:p.pound,location:j(h,this.clonePosition())})}}}return{val:n,err:null}},e.prototype.parseTag=function(e,t){var r=this.clonePosition();this.bump();var n=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:p.literal,value:"<".concat(n,"/>"),location:j(r,this.clonePosition())},err:null};if(this.bumpIf(">")){var i=this.parseMessage(e+1,t,!0);if(i.err)return i;var o=i.val,h=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!le(this.char()))return this.error(l.INVALID_TAG,j(h,this.clonePosition()));var s=this.clonePosition();return n!==this.parseTagName()?this.error(l.UNMATCHED_CLOSING_TAG,j(s,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:p.tag,value:n,children:o,location:j(r,this.clonePosition())},err:null}:this.error(l.INVALID_TAG,j(h,this.clonePosition())))}return this.error(l.UNCLOSED_TAG,j(r,this.clonePosition()))}return this.error(l.INVALID_TAG,j(r,this.clonePosition()))},e.prototype.parseTagName=function(){var e,t=this.offset();for(this.bump();!this.isEOF()&&(45===(e=this.char())||46===e||e>=48&&e<=57||95===e||e>=97&&e<=122||e>=65&&e<=90||183==e||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039);)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(e,t){for(var r=this.clonePosition(),n="";;){var i=this.tryParseQuote(t);if(i)n+=i;else{var o=this.tryParseUnquoted(e,t);if(o)n+=o;else{var h=this.tryParseLeftAngleBracket();if(!h)break;n+=h}}}var s=j(r,this.clonePosition());return{val:{type:p.literal,value:n,location:s},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return this.isEOF()||60!==this.char()||!this.ignoreTag&&(le(e=this.peek()||0)||47===e)?null:(this.bump(),"<");var e},e.prototype.tryParseQuote=function(e){if(this.isEOF()||39!==this.char())return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if("plural"===e||"selectordinal"===e)break;return null;default:return null}this.bump();var t=[this.char()];for(this.bump();!this.isEOF();){var r=this.char();if(39===r){if(39!==this.peek()){this.bump();break}t.push(39),this.bump()}else t.push(r);this.bump()}return re.apply(void 0,t)},e.prototype.tryParseUnquoted=function(e,t){if(this.isEOF())return null;var r=this.char();return 60===r||123===r||35===r&&("plural"===t||"selectordinal"===t)||125===r&&e>0?null:(this.bump(),re(r))},e.prototype.parseArgument=function(e,t){var r=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(l.EXPECT_ARGUMENT_CLOSING_BRACE,j(r,this.clonePosition()));if(125===this.char())return this.bump(),this.error(l.EMPTY_ARGUMENT,j(r,this.clonePosition()));var n=this.parseIdentifierIfPossible().value;if(!n)return this.error(l.MALFORMED_ARGUMENT,j(r,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(l.EXPECT_ARGUMENT_CLOSING_BRACE,j(r,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:p.argument,value:n,location:j(r,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(l.EXPECT_ARGUMENT_CLOSING_BRACE,j(r,this.clonePosition())):this.parseArgumentOptions(e,t,n,r);default:return this.error(l.MALFORMED_ARGUMENT,j(r,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var e=this.clonePosition(),t=this.offset(),r=ee(this.message,t),n=t+r.length;return this.bumpTo(n),{value:r,location:j(e,this.clonePosition())}},e.prototype.parseArgumentOptions=function(e,t,n,i){var o,h=this.clonePosition(),s=this.parseIdentifierIfPossible().value,a=this.clonePosition();switch(s){case"":return this.error(l.EXPECT_ARGUMENT_TYPE,j(h,a));case"number":case"date":case"time":this.bumpSpace();var u=null;if(this.bumpIf(",")){this.bumpSpace();var c=this.clonePosition();if((B=this.parseSimpleArgStyleIfPossible()).err)return B;if(0===(b=he(B.val)).length)return this.error(l.EXPECT_ARGUMENT_STYLE,j(this.clonePosition(),this.clonePosition()));u={style:b,styleLocation:j(c,this.clonePosition())}}if((v=this.tryParseArgumentClose(i)).err)return v;var E=j(i,this.clonePosition());if(u&&te(null==u?void 0:u.style,"::",0)){var m=oe(u.style.slice(2));if("number"===s)return(B=this.parseNumberSkeletonFromString(m,u.styleLocation)).err?B:{val:{type:p.number,value:n,location:E,style:B.val},err:null};if(0===m.length)return this.error(l.EXPECT_DATE_TIME_SKELETON,E);var g=m;this.locale&&(g=function(e,t){for(var r="",n=0;n<e.length;n++){var i=e.charAt(n);if("j"===i){for(var o=0;n+1<e.length&&e.charAt(n+1)===i;)o++,n++;var h=1+(1&o),s=o<2?1:3+(o>>1),a=X(t);for("H"!=a&&"k"!=a||(s=0);s-- >0;)r+="a";for(;h-- >0;)r=a+r}else r+="J"===i?"H":i}return r}(m,this.locale));var b={type:f.dateTime,pattern:g,location:u.styleLocation,parsedOptions:this.shouldParseSkeletons?N(g):{}};return{val:{type:"date"===s?p.date:p.time,value:n,location:E,style:b},err:null}}return{val:{type:"number"===s?p.number:"date"===s?p.date:p.time,value:n,location:E,style:null!==(o=null==u?void 0:u.style)&&void 0!==o?o:null},err:null};case"plural":case"selectordinal":case"select":var H=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(l.EXPECT_SELECT_ARGUMENT_OPTIONS,j(H,r({},H)));this.bumpSpace();var y=this.parseIdentifierIfPossible(),T=0;if("select"!==s&&"offset"===y.value){if(!this.bumpIf(":"))return this.error(l.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,j(this.clonePosition(),this.clonePosition()));var B;if(this.bumpSpace(),(B=this.tryParseDecimalInteger(l.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,l.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE)).err)return B;this.bumpSpace(),y=this.parseIdentifierIfPossible(),T=B.val}var v,d=this.tryParsePluralOrSelectOptions(e,s,t,y);if(d.err)return d;if((v=this.tryParseArgumentClose(i)).err)return v;var _=j(i,this.clonePosition());return"select"===s?{val:{type:p.select,value:n,options:ne(d.val),location:_},err:null}:{val:{type:p.plural,value:n,options:ne(d.val),offset:T,pluralType:"plural"===s?"cardinal":"ordinal",location:_},err:null};default:return this.error(l.INVALID_ARGUMENT_TYPE,j(h,a))}},e.prototype.tryParseArgumentClose=function(e){return this.isEOF()||125!==this.char()?this.error(l.EXPECT_ARGUMENT_CLOSING_BRACE,j(e,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var e=0,t=this.clonePosition();!this.isEOF();){switch(this.char()){case 39:this.bump();var r=this.clonePosition();if(!this.bumpUntil("'"))return this.error(l.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,j(r,this.clonePosition()));this.bump();break;case 123:e+=1,this.bump();break;case 125:if(!(e>0))return{val:this.message.slice(t.offset,this.offset()),err:null};e-=1;break;default:this.bump()}}return{val:this.message.slice(t.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(e,t){var r=[];try{r=function(e){if(0===e.length)throw new Error("Number skeleton cannot be empty");for(var t=[],r=0,n=e.split(I).filter((function(e){return e.length>0}));r<n.length;r++){var i=n[r].split("/");if(0===i.length)throw new Error("Invalid number skeleton");for(var o=i[0],h=i.slice(1),s=0,a=h;s<a.length;s++)if(0===a[s].length)throw new Error("Invalid number skeleton");t.push({stem:o,options:h})}return t}(e)}catch(e){return this.error(l.INVALID_NUMBER_SKELETON,t)}return{val:{type:f.number,tokens:r,location:t,parsedOptions:this.shouldParseSkeletons?F(r):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(e,t,r,n){for(var i,o=!1,h=[],s=new Set,a=n.value,u=n.location;;){if(0===a.length){var c=this.clonePosition();if("select"===t||!this.bumpIf("="))break;var p=this.tryParseDecimalInteger(l.EXPECT_PLURAL_ARGUMENT_SELECTOR,l.INVALID_PLURAL_ARGUMENT_SELECTOR);if(p.err)return p;u=j(c,this.clonePosition()),a=this.message.slice(c.offset,this.offset())}if(s.has(a))return this.error("select"===t?l.DUPLICATE_SELECT_ARGUMENT_SELECTOR:l.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,u);"other"===a&&(o=!0),this.bumpSpace();var f=this.clonePosition();if(!this.bumpIf("{"))return this.error("select"===t?l.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:l.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,j(this.clonePosition(),this.clonePosition()));var E=this.parseMessage(e+1,t,r);if(E.err)return E;var m=this.tryParseArgumentClose(f);if(m.err)return m;h.push([a,{value:E.val,location:j(f,this.clonePosition())}]),s.add(a),this.bumpSpace(),a=(i=this.parseIdentifierIfPossible()).value,u=i.location}return 0===h.length?this.error("select"===t?l.EXPECT_SELECT_ARGUMENT_SELECTOR:l.EXPECT_PLURAL_ARGUMENT_SELECTOR,j(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!o?this.error(l.MISSING_OTHER_CLAUSE,j(this.clonePosition(),this.clonePosition())):{val:h,err:null}},e.prototype.tryParseDecimalInteger=function(e,t){var r=1,n=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(r=-1);for(var i=!1,o=0;!this.isEOF();){var h=this.char();if(!(h>=48&&h<=57))break;i=!0,o=10*o+(h-48),this.bump()}var s=j(n,this.clonePosition());return i?q(o*=r)?{val:o,err:null}:this.error(t,s):this.error(e,s)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var e=this.position.offset;if(e>=this.message.length)throw Error("out of bound");var t=ie(this.message,e);if(void 0===t)throw Error("Offset ".concat(e," is at invalid UTF-16 code unit boundary"));return t},e.prototype.error=function(e,t){return{val:null,err:{kind:e,message:this.message,location:t}}},e.prototype.bump=function(){if(!this.isEOF()){var e=this.char();10===e?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=e<65536?1:2)}},e.prototype.bumpIf=function(e){if(te(this.message,e,this.offset())){for(var t=0;t<e.length;t++)this.bump();return!0}return!1},e.prototype.bumpUntil=function(e){var t=this.offset(),r=this.message.indexOf(e,t);return r>=0?(this.bumpTo(r),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(e){if(this.offset()>e)throw Error("targetOffset ".concat(e," must be greater than or equal to the current offset ").concat(this.offset()));for(e=Math.min(e,this.message.length);;){var t=this.offset();if(t===e)break;if(t>e)throw Error("targetOffset ".concat(e," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&pe(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var e=this.char(),t=this.offset(),r=this.message.charCodeAt(t+(e>=65536?2:1));return null!=r?r:null},e}();function le(e){return e>=97&&e<=122||e>=65&&e<=90}function pe(e){return e>=9&&e<=13||32===e||133===e||e>=8206&&e<=8207||8232===e||8233===e}function fe(e){return e>=33&&e<=35||36===e||e>=37&&e<=39||40===e||41===e||42===e||43===e||44===e||45===e||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||91===e||92===e||93===e||94===e||96===e||123===e||124===e||125===e||126===e||161===e||e>=162&&e<=165||166===e||167===e||169===e||171===e||172===e||174===e||176===e||177===e||182===e||187===e||191===e||215===e||247===e||e>=8208&&e<=8213||e>=8214&&e<=8215||8216===e||8217===e||8218===e||e>=8219&&e<=8220||8221===e||8222===e||8223===e||e>=8224&&e<=8231||e>=8240&&e<=8248||8249===e||8250===e||e>=8251&&e<=8254||e>=8257&&e<=8259||8260===e||8261===e||8262===e||e>=8263&&e<=8273||8274===e||8275===e||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||8608===e||e>=8609&&e<=8610||8611===e||e>=8612&&e<=8613||8614===e||e>=8615&&e<=8621||8622===e||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||8658===e||8659===e||8660===e||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||8968===e||8969===e||8970===e||8971===e||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||9001===e||9002===e||e>=9003&&e<=9083||9084===e||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||9655===e||e>=9656&&e<=9664||9665===e||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||9839===e||e>=9840&&e<=10087||10088===e||10089===e||10090===e||10091===e||10092===e||10093===e||10094===e||10095===e||10096===e||10097===e||10098===e||10099===e||10100===e||10101===e||e>=10132&&e<=10175||e>=10176&&e<=10180||10181===e||10182===e||e>=10183&&e<=10213||10214===e||10215===e||10216===e||10217===e||10218===e||10219===e||10220===e||10221===e||10222===e||10223===e||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||10627===e||10628===e||10629===e||10630===e||10631===e||10632===e||10633===e||10634===e||10635===e||10636===e||10637===e||10638===e||10639===e||10640===e||10641===e||10642===e||10643===e||10644===e||10645===e||10646===e||10647===e||10648===e||e>=10649&&e<=10711||10712===e||10713===e||10714===e||10715===e||e>=10716&&e<=10747||10748===e||10749===e||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||11158===e||e>=11159&&e<=11263||e>=11776&&e<=11777||11778===e||11779===e||11780===e||11781===e||e>=11782&&e<=11784||11785===e||11786===e||11787===e||11788===e||11789===e||e>=11790&&e<=11798||11799===e||e>=11800&&e<=11801||11802===e||11803===e||11804===e||11805===e||e>=11806&&e<=11807||11808===e||11809===e||11810===e||11811===e||11812===e||11813===e||11814===e||11815===e||11816===e||11817===e||e>=11818&&e<=11822||11823===e||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||11840===e||11841===e||11842===e||e>=11843&&e<=11855||e>=11856&&e<=11857||11858===e||e>=11859&&e<=11903||e>=12289&&e<=12291||12296===e||12297===e||12298===e||12299===e||12300===e||12301===e||12302===e||12303===e||12304===e||12305===e||e>=12306&&e<=12307||12308===e||12309===e||12310===e||12311===e||12312===e||12313===e||12314===e||12315===e||12316===e||12317===e||e>=12318&&e<=12319||12320===e||12336===e||64830===e||64831===e||e>=65093&&e<=65094}function Ee(e){e.forEach((function(e){if(delete e.location,B(e)||v(e))for(var t in e.options)delete e.options[t].location,Ee(e.options[t].value);else H(e)&&A(e.style)||(y(e)||T(e))&&L(e.style)?delete e.style.location:_(e)&&Ee(e.children)}))}function me(e,t){void 0===t&&(t={}),t=r({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new ce(e,t).parse();if(n.err){var i=SyntaxError(l[n.err.kind]);throw i.location=n.err.location,i.originalMessage=n.err.message,i}return(null==t?void 0:t.captureLocation)||Ee(n.val),n.val}!function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"}(ue||(ue={}));var ge,be=function(e){function r(t,r,n){var i=e.call(this,t)||this;return i.code=r,i.originalMessage=n,i}return t(r,e),r.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},r}(Error),He=function(e){function r(t,r,n,i){return e.call(this,'Invalid values for "'.concat(t,'": "').concat(r,'". Options are "').concat(Object.keys(n).join('", "'),'"'),ue.INVALID_VALUE,i)||this}return t(r,e),r}(be),ye=function(e){function r(t,r,n){return e.call(this,'Value for "'.concat(t,'" must be of type ').concat(r),ue.INVALID_VALUE,n)||this}return t(r,e),r}(be),Te=function(e){function r(t,r){return e.call(this,'The intl string context variable "'.concat(t,'" was not provided to the string "').concat(r,'"'),ue.MISSING_VALUE,r)||this}return t(r,e),r}(be);function Be(e){return"function"==typeof e}function ve(e,t,r,n,i,o,h){if(1===e.length&&g(e[0]))return[{type:ge.literal,value:e[0].value}];for(var s=[],a=0,u=e;a<u.length;a++){var c=u[a];if(g(c))s.push({type:ge.literal,value:c.value});else if(d(c))"number"==typeof o&&s.push({type:ge.literal,value:r.getNumberFormat(t).format(o)});else{var l=c.value;if(!i||!(l in i))throw new Te(l,h);var p=i[l];if(b(c))p&&"string"!=typeof p&&"number"!=typeof p||(p="string"==typeof p||"number"==typeof p?String(p):""),s.push({type:"string"==typeof p?ge.literal:ge.object,value:p});else if(y(c)){var f="string"==typeof c.style?n.date[c.style]:L(c.style)?c.style.parsedOptions:void 0;s.push({type:ge.literal,value:r.getDateTimeFormat(t,f).format(p)})}else if(T(c)){f="string"==typeof c.style?n.time[c.style]:L(c.style)?c.style.parsedOptions:n.time.medium;s.push({type:ge.literal,value:r.getDateTimeFormat(t,f).format(p)})}else if(H(c)){(f="string"==typeof c.style?n.number[c.style]:A(c.style)?c.style.parsedOptions:void 0)&&f.scale&&(p*=f.scale||1),s.push({type:ge.literal,value:r.getNumberFormat(t,f).format(p)})}else{if(_(c)){var E=c.children,m=c.value,P=i[m];if(!Be(P))throw new ye(m,"function",h);var S=P(ve(E,t,r,n,i,o).map((function(e){return e.value})));Array.isArray(S)||(S=[S]),s.push.apply(s,S.map((function(e){return{type:"string"==typeof e?ge.literal:ge.object,value:e}})))}if(B(c)){if(!(N=c.options[p]||c.options.other))throw new He(c.value,p,Object.keys(c.options),h);s.push.apply(s,ve(N.value,t,r,n,i))}else if(v(c)){var N;if(!(N=c.options["=".concat(p)])){if(!Intl.PluralRules)throw new be('Intl.PluralRules is not available in this environment.\nTry polyfilling it using "@formatjs/intl-pluralrules"\n',ue.MISSING_INTL_API,h);var I=r.getPluralRules(t,{type:c.pluralType}).select(p-(c.offset||0));N=c.options[I]||c.options.other}if(!N)throw new He(c.value,p,Object.keys(c.options),h);s.push.apply(s,ve(N.value,t,r,n,i,p-(c.offset||0)))}else;}}}return function(e){return e.length<2?e:e.reduce((function(e,t){var r=e[e.length-1];return r&&r.type===ge.literal&&t.type===ge.literal?r.value+=t.value:e.push(t),e}),[])}(s)}function de(e,t){return t?Object.keys(e).reduce((function(n,i){var o,h;return n[i]=(o=e[i],(h=t[i])?r(r(r({},o||{}),h||{}),Object.keys(o).reduce((function(e,t){return e[t]=r(r({},o[t]),h[t]||{}),e}),{})):o),n}),r({},e)):e}function _e(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,r){e[t]=r}}}}}!function(e){e[e.literal=0]="literal",e[e.object=1]="object"}(ge||(ge={}));var Ae=function(){function e(t,o,h,s){void 0===o&&(o=e.defaultLocale);var a,u=this;if(this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(e){var t=u.formatToParts(e);if(1===t.length)return t[0].value;var r=t.reduce((function(e,t){return e.length&&t.type===ge.literal&&"string"==typeof e[e.length-1]?e[e.length-1]+=t.value:e.push(t.value),e}),[]);return r.length<=1?r[0]||"":r},this.formatToParts=function(e){return ve(u.ast,u.locales,u.formatters,u.formats,e,void 0,u.message)},this.resolvedOptions=function(){var e;return{locale:(null===(e=u.resolvedLocale)||void 0===e?void 0:e.toString())||Intl.NumberFormat.supportedLocalesOf(u.locales)[0]}},this.getAst=function(){return u.ast},this.locales=o,this.resolvedLocale=e.resolveLocale(o),"string"==typeof t){if(this.message=t,!e.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");var c=s||{};c.formatters;var l=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r}(c,["formatters"]);this.ast=e.__parse(t,r(r({},l),{locale:this.resolvedLocale}))}else this.ast=t;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=de(e.formats,h),this.formatters=s&&s.formatters||(void 0===(a=this.formatterCache)&&(a={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:i((function(){for(var e,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return new((e=Intl.NumberFormat).bind.apply(e,n([void 0],t,!1)))}),{cache:_e(a.number),strategy:m.variadic}),getDateTimeFormat:i((function(){for(var e,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return new((e=Intl.DateTimeFormat).bind.apply(e,n([void 0],t,!1)))}),{cache:_e(a.dateTime),strategy:m.variadic}),getPluralRules:i((function(){for(var e,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return new((e=Intl.PluralRules).bind.apply(e,n([void 0],t,!1)))}),{cache:_e(a.pluralRules),strategy:m.variadic})})}return Object.defineProperty(e,"defaultLocale",{get:function(){return e.memoizedDefaultLocale||(e.memoizedDefaultLocale=(new Intl.NumberFormat).resolvedOptions().locale),e.memoizedDefaultLocale},enumerable:!1,configurable:!0}),e.memoizedDefaultLocale=null,e.resolveLocale=function(e){if(void 0!==Intl.Locale){var t=Intl.NumberFormat.supportedLocalesOf(e);return t.length>0?new Intl.Locale(t[0]):new Intl.Locale("string"==typeof e?e:e[0])}},e.__parse=me,e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},e}(),Le=Ae;exports.FormatIcu=()=>(e,t)=>(t.setFinalFormatter((()=>{const e=new Map;function t(e){try{return Boolean(Intl.NumberFormat.supportedLocalesOf(e).length)}catch(e){return!1}}function r(r){if(!e.get(r)){let n=String(r).replace(/[^a-zA-Z]/g,"-");for(;!t(n);)n=n.split("-").slice(0,-1).join("-")||"en";e.set(r,n)}return e.get(r)}return Object.freeze({getLanguage:r,format:({translation:e,language:t,params:n})=>{const i=!Object.values(n||{}).find((e=>"function"==typeof e)),o=r(t);return new Le(e,o,void 0,{ignoreTag:i}).format(n)}})})()),e);
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};function t(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}var r,n,i,o=function(){return o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},o.apply(this,arguments)};function h(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}function s(e){return e.type===n.literal}function a(e){return e.type===n.argument}function u(e){return e.type===n.number}function c(e){return e.type===n.date}function l(e){return e.type===n.time}function p(e){return e.type===n.select}function f(e){return e.type===n.plural}function E(e){return e.type===n.pound}function m(e){return e.type===n.tag}function g(e){return!(!e||"object"!=typeof e||e.type!==i.number)}function b(e){return!(!e||"object"!=typeof e||e.type!==i.dateTime)}!function(e){e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",e[e.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",e[e.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",e[e.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",e[e.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",e[e.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",e[e.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",e[e.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",e[e.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",e[e.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",e[e.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",e[e.INVALID_TAG=23]="INVALID_TAG",e[e.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",e[e.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",e[e.UNCLOSED_TAG=27]="UNCLOSED_TAG"}(r||(r={})),function(e){e[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound",e[e.tag=8]="tag"}(n||(n={})),function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"}(i||(i={}));var H=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,y=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function T(e){var t={};return e.replace(y,(function(e){var r=e.length;switch(e[0]){case"G":t.era=4===r?"long":5===r?"narrow":"short";break;case"y":t.year=2===r?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":t.month=["numeric","2-digit","short","long","narrow"][r-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":t.day=["numeric","2-digit"][r-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":t.weekday=4===r?"short":5===r?"narrow":"short";break;case"e":if(r<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][r-4];break;case"c":if(r<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][r-4];break;case"a":t.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":t.hourCycle="h12",t.hour=["numeric","2-digit"][r-1];break;case"H":t.hourCycle="h23",t.hour=["numeric","2-digit"][r-1];break;case"K":t.hourCycle="h11",t.hour=["numeric","2-digit"][r-1];break;case"k":t.hourCycle="h24",t.hour=["numeric","2-digit"][r-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":t.minute=["numeric","2-digit"][r-1];break;case"s":t.second=["numeric","2-digit"][r-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":t.timeZoneName=r<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""})),t}var B=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;var v=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,_=/^(@+)?(\+|#+)?[rs]?$/g,A=/(\*)(0+)|(#+)(0+)|(0+)/g,d=/^(0+)$/;function L(e){var t={};return"r"===e[e.length-1]?t.roundingPriority="morePrecision":"s"===e[e.length-1]&&(t.roundingPriority="lessPrecision"),e.replace(_,(function(e,r,n){return"string"!=typeof n?(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length):"+"===n?t.minimumSignificantDigits=r.length:"#"===r[0]?t.maximumSignificantDigits=r.length:(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length+("string"==typeof n?n.length:0)),""})),t}function P(e){switch(e){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function S(e){var t;if("E"===e[0]&&"E"===e[1]?(t={notation:"engineering"},e=e.slice(2)):"E"===e[0]&&(t={notation:"scientific"},e=e.slice(1)),t){var r=e.slice(0,2);if("+!"===r?(t.signDisplay="always",e=e.slice(2)):"+?"===r&&(t.signDisplay="exceptZero",e=e.slice(2)),!d.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function N(e){var t=P(e);return t||{}}function I(e){for(var t={},r=0,n=e;r<n.length;r++){var i=n[r];switch(i.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=i.options[0];continue;case"group-off":case",_":t.useGrouping=!1;continue;case"precision-integer":case".":t.maximumFractionDigits=0;continue;case"measure-unit":case"unit":t.style="unit",t.unit=i.options[0].replace(/^(.*?)-/,"");continue;case"compact-short":case"K":t.notation="compact",t.compactDisplay="short";continue;case"compact-long":case"KK":t.notation="compact",t.compactDisplay="long";continue;case"scientific":t=o(o(o({},t),{notation:"scientific"}),i.options.reduce((function(e,t){return o(o({},e),N(t))}),{}));continue;case"engineering":t=o(o(o({},t),{notation:"engineering"}),i.options.reduce((function(e,t){return o(o({},e),N(t))}),{}));continue;case"notation-simple":t.notation="standard";continue;case"unit-width-narrow":t.currencyDisplay="narrowSymbol",t.unitDisplay="narrow";continue;case"unit-width-short":t.currencyDisplay="code",t.unitDisplay="short";continue;case"unit-width-full-name":t.currencyDisplay="name",t.unitDisplay="long";continue;case"unit-width-iso-code":t.currencyDisplay="symbol";continue;case"scale":t.scale=parseFloat(i.options[0]);continue;case"integer-width":if(i.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");i.options[0].replace(A,(function(e,r,n,i,o,h){if(r)t.minimumIntegerDigits=n.length;else{if(i&&o)throw new Error("We currently do not support maximum integer digits");if(h)throw new Error("We currently do not support exact integer digits")}return""}));continue}if(d.test(i.stem))t.minimumIntegerDigits=i.stem.length;else if(v.test(i.stem)){if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(v,(function(e,r,n,i,o,h){return"*"===n?t.minimumFractionDigits=r.length:i&&"#"===i[0]?t.maximumFractionDigits=i.length:o&&h?(t.minimumFractionDigits=o.length,t.maximumFractionDigits=o.length+h.length):(t.minimumFractionDigits=r.length,t.maximumFractionDigits=r.length),""}));var h=i.options[0];"w"===h?t=o(o({},t),{trailingZeroDisplay:"stripIfInteger"}):h&&(t=o(o({},t),L(h)))}else if(_.test(i.stem))t=o(o({},t),L(i.stem));else{var s=P(i.stem);s&&(t=o(o({},t),s));var a=S(i.stem);a&&(t=o(o({},t),a))}}return t}var C,R={AX:["H"],BQ:["H"],CP:["H"],CZ:["H"],DK:["H"],FI:["H"],ID:["H"],IS:["H"],ML:["H"],NE:["H"],RU:["H"],SE:["H"],SJ:["H"],SK:["H"],AS:["h","H"],BT:["h","H"],DJ:["h","H"],ER:["h","H"],GH:["h","H"],IN:["h","H"],LS:["h","H"],PG:["h","H"],PW:["h","H"],SO:["h","H"],TO:["h","H"],VU:["h","H"],WS:["h","H"],"001":["H","h"],AL:["h","H","hB"],TD:["h","H","hB"],"ca-ES":["H","h","hB"],CF:["H","h","hB"],CM:["H","h","hB"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],LU:["H","h","hB"],NP:["H","h","hB"],PF:["H","h","hB"],SC:["H","h","hB"],SM:["H","h","hB"],SN:["H","h","hB"],TF:["H","h","hB"],VA:["H","h","hB"],CY:["h","H","hb","hB"],GR:["h","H","hb","hB"],CO:["h","H","hB","hb"],DO:["h","H","hB","hb"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],NA:["h","H","hB","hb"],PA:["h","H","hB","hb"],PR:["h","H","hB","hb"],VE:["h","H","hB","hb"],AC:["H","h","hb","hB"],AI:["H","h","hb","hB"],BW:["H","h","hb","hB"],BZ:["H","h","hb","hB"],CC:["H","h","hb","hB"],CK:["H","h","hb","hB"],CX:["H","h","hb","hB"],DG:["H","h","hb","hB"],FK:["H","h","hb","hB"],GB:["H","h","hb","hB"],GG:["H","h","hb","hB"],GI:["H","h","hb","hB"],IE:["H","h","hb","hB"],IM:["H","h","hb","hB"],IO:["H","h","hb","hB"],JE:["H","h","hb","hB"],LT:["H","h","hb","hB"],MK:["H","h","hb","hB"],MN:["H","h","hb","hB"],MS:["H","h","hb","hB"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],PN:["H","h","hb","hB"],SH:["H","h","hb","hB"],SX:["H","h","hb","hB"],TA:["H","h","hb","hB"],ZA:["H","h","hb","hB"],"af-ZA":["H","h","hB","hb"],AR:["H","h","hB","hb"],CL:["H","h","hB","hb"],CR:["H","h","hB","hb"],CU:["H","h","hB","hb"],EA:["H","h","hB","hb"],"es-BO":["H","h","hB","hb"],"es-BR":["H","h","hB","hb"],"es-EC":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"es-PE":["H","h","hB","hb"],GT:["H","h","hB","hb"],HN:["H","h","hB","hb"],IC:["H","h","hB","hb"],KG:["H","h","hB","hb"],KM:["H","h","hB","hb"],LK:["H","h","hB","hb"],MA:["H","h","hB","hb"],MX:["H","h","hB","hb"],NI:["H","h","hB","hb"],PY:["H","h","hB","hb"],SV:["H","h","hB","hb"],UY:["H","h","hB","hb"],JP:["H","h","K"],AD:["H","hB"],AM:["H","hB"],AO:["H","hB"],AT:["H","hB"],AW:["H","hB"],BE:["H","hB"],BF:["H","hB"],BJ:["H","hB"],BL:["H","hB"],BR:["H","hB"],CG:["H","hB"],CI:["H","hB"],CV:["H","hB"],DE:["H","hB"],EE:["H","hB"],FR:["H","hB"],GA:["H","hB"],GF:["H","hB"],GN:["H","hB"],GP:["H","hB"],GW:["H","hB"],HR:["H","hB"],IL:["H","hB"],IT:["H","hB"],KZ:["H","hB"],MC:["H","hB"],MD:["H","hB"],MF:["H","hB"],MQ:["H","hB"],MZ:["H","hB"],NC:["H","hB"],NL:["H","hB"],PM:["H","hB"],PT:["H","hB"],RE:["H","hB"],RO:["H","hB"],SI:["H","hB"],SR:["H","hB"],ST:["H","hB"],TG:["H","hB"],TR:["H","hB"],WF:["H","hB"],YT:["H","hB"],BD:["h","hB","H"],PK:["h","hB","H"],AZ:["H","hB","h"],BA:["H","hB","h"],BG:["H","hB","h"],CH:["H","hB","h"],GE:["H","hB","h"],LI:["H","hB","h"],ME:["H","hB","h"],RS:["H","hB","h"],UA:["H","hB","h"],UZ:["H","hB","h"],XK:["H","hB","h"],AG:["h","hb","H","hB"],AU:["h","hb","H","hB"],BB:["h","hb","H","hB"],BM:["h","hb","H","hB"],BS:["h","hb","H","hB"],CA:["h","hb","H","hB"],DM:["h","hb","H","hB"],"en-001":["h","hb","H","hB"],FJ:["h","hb","H","hB"],FM:["h","hb","H","hB"],GD:["h","hb","H","hB"],GM:["h","hb","H","hB"],GU:["h","hb","H","hB"],GY:["h","hb","H","hB"],JM:["h","hb","H","hB"],KI:["h","hb","H","hB"],KN:["h","hb","H","hB"],KY:["h","hb","H","hB"],LC:["h","hb","H","hB"],LR:["h","hb","H","hB"],MH:["h","hb","H","hB"],MP:["h","hb","H","hB"],MW:["h","hb","H","hB"],NZ:["h","hb","H","hB"],SB:["h","hb","H","hB"],SG:["h","hb","H","hB"],SL:["h","hb","H","hB"],SS:["h","hb","H","hB"],SZ:["h","hb","H","hB"],TC:["h","hb","H","hB"],TT:["h","hb","H","hB"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],VC:["h","hb","H","hB"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],ZM:["h","hb","H","hB"],BO:["H","hB","h","hb"],EC:["H","hB","h","hb"],ES:["H","hB","h","hb"],GQ:["H","hB","h","hb"],PE:["H","hB","h","hb"],AE:["h","hB","hb","H"],"ar-001":["h","hB","hb","H"],BH:["h","hB","hb","H"],DZ:["h","hB","hb","H"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],HK:["h","hB","hb","H"],IQ:["h","hB","hb","H"],JO:["h","hB","hb","H"],KW:["h","hB","hb","H"],LB:["h","hB","hb","H"],LY:["h","hB","hb","H"],MO:["h","hB","hb","H"],MR:["h","hB","hb","H"],OM:["h","hB","hb","H"],PH:["h","hB","hb","H"],PS:["h","hB","hb","H"],QA:["h","hB","hb","H"],SA:["h","hB","hb","H"],SD:["h","hB","hb","H"],SY:["h","hB","hb","H"],TN:["h","hB","hb","H"],YE:["h","hB","hb","H"],AF:["H","hb","hB","h"],LA:["H","hb","hB","h"],CN:["H","hB","hb","h"],LV:["H","hB","hb","h"],TL:["H","hB","hb","h"],"zu-ZA":["H","hB","hb","h"],CD:["hB","H"],IR:["hB","H"],"hi-IN":["hB","h","H"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"te-IN":["hB","h","H"],KH:["hB","h","H","hb"],"ta-IN":["hB","h","hb","H"],BN:["hb","hB","h","H"],MY:["hb","hB","h","H"],ET:["hB","hb","h","H"],"gu-IN":["hB","hb","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],TW:["hB","hb","h","H"],KE:["hB","hb","H","h"],MM:["hB","hb","H","h"],TZ:["hB","hb","H","h"],UG:["hB","hb","H","h"]};function O(e){var t=e.hourCycle;if(void 0===t&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var r,n=e.language;return"root"!==n&&(r=e.maximize().region),(R[r||""]||R[n||""]||R["".concat(n,"-001")]||R["001"])[0]}var M=new RegExp("^".concat(H.source,"*")),U=new RegExp("".concat(H.source,"*$"));function G(e,t){return{start:e,end:t}}var w=!!String.prototype.startsWith,D=!!String.fromCodePoint,F=!!Object.fromEntries,k=!!String.prototype.codePointAt,V=!!String.prototype.trimStart,X=!!String.prototype.trimEnd,K=!!Number.isSafeInteger?Number.isSafeInteger:function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},x=!0;try{x="a"===(null===(C=q("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu").exec("a"))||void 0===C?void 0:C[0])}catch(e){x=!1}var j,Y=w?function(e,t,r){return e.startsWith(t,r)}:function(e,t,r){return e.slice(r,r+t.length)===t},Z=D?String.fromCodePoint:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r,n="",i=e.length,o=0;i>o;){if((r=e[o++])>1114111)throw RangeError(r+" is not a valid code point");n+=r<65536?String.fromCharCode(r):String.fromCharCode(55296+((r-=65536)>>10),r%1024+56320)}return n},z=F?Object.fromEntries:function(e){for(var t={},r=0,n=e;r<n.length;r++){var i=n[r],o=i[0],h=i[1];t[o]=h}return t},W=k?function(e,t){return e.codePointAt(t)}:function(e,t){var r=e.length;if(!(t<0||t>=r)){var n,i=e.charCodeAt(t);return i<55296||i>56319||t+1===r||(n=e.charCodeAt(t+1))<56320||n>57343?i:n-56320+(i-55296<<10)+65536}},Q=V?function(e){return e.trimStart()}:function(e){return e.replace(M,"")},J=X?function(e){return e.trimEnd()}:function(e){return e.replace(U,"")};function q(e,t){return new RegExp(e,t)}if(x){var $=q("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");j=function(e,t){var r;return $.lastIndex=t,null!==(r=$.exec(e)[1])&&void 0!==r?r:""}}else j=function(e,t){for(var r=[];;){var n=W(e,t);if(void 0===n||re(n)||ne(n))break;r.push(n),t+=n>=65536?2:1}return Z.apply(void 0,r)};var ee=function(){function e(e,t){void 0===t&&(t={}),this.message=e,this.position={offset:0,line:1,column:1},this.ignoreTag=!!t.ignoreTag,this.locale=t.locale,this.requiresOtherClause=!!t.requiresOtherClause,this.shouldParseSkeletons=!!t.shouldParseSkeletons}return e.prototype.parse=function(){if(0!==this.offset())throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(e,t,i){for(var o=[];!this.isEOF();){var h=this.char();if(123===h){if((s=this.parseArgument(e,i)).err)return s;o.push(s.val)}else{if(125===h&&e>0)break;if(35!==h||"plural"!==t&&"selectordinal"!==t){if(60===h&&!this.ignoreTag&&47===this.peek()){if(i)break;return this.error(r.UNMATCHED_CLOSING_TAG,G(this.clonePosition(),this.clonePosition()))}if(60===h&&!this.ignoreTag&&te(this.peek()||0)){if((s=this.parseTag(e,t)).err)return s;o.push(s.val)}else{var s;if((s=this.parseLiteral(e,t)).err)return s;o.push(s.val)}}else{var a=this.clonePosition();this.bump(),o.push({type:n.pound,location:G(a,this.clonePosition())})}}}return{val:o,err:null}},e.prototype.parseTag=function(e,t){var i=this.clonePosition();this.bump();var o=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:n.literal,value:"<".concat(o,"/>"),location:G(i,this.clonePosition())},err:null};if(this.bumpIf(">")){var h=this.parseMessage(e+1,t,!0);if(h.err)return h;var s=h.val,a=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!te(this.char()))return this.error(r.INVALID_TAG,G(a,this.clonePosition()));var u=this.clonePosition();return o!==this.parseTagName()?this.error(r.UNMATCHED_CLOSING_TAG,G(u,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:n.tag,value:o,children:s,location:G(i,this.clonePosition())},err:null}:this.error(r.INVALID_TAG,G(a,this.clonePosition())))}return this.error(r.UNCLOSED_TAG,G(i,this.clonePosition()))}return this.error(r.INVALID_TAG,G(i,this.clonePosition()))},e.prototype.parseTagName=function(){var e,t=this.offset();for(this.bump();!this.isEOF()&&(45===(e=this.char())||46===e||e>=48&&e<=57||95===e||e>=97&&e<=122||e>=65&&e<=90||183==e||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039);)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(e,t){for(var r=this.clonePosition(),i="";;){var o=this.tryParseQuote(t);if(o)i+=o;else{var h=this.tryParseUnquoted(e,t);if(h)i+=h;else{var s=this.tryParseLeftAngleBracket();if(!s)break;i+=s}}}var a=G(r,this.clonePosition());return{val:{type:n.literal,value:i,location:a},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return this.isEOF()||60!==this.char()||!this.ignoreTag&&(te(e=this.peek()||0)||47===e)?null:(this.bump(),"<");var e},e.prototype.tryParseQuote=function(e){if(this.isEOF()||39!==this.char())return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if("plural"===e||"selectordinal"===e)break;return null;default:return null}this.bump();var t=[this.char()];for(this.bump();!this.isEOF();){var r=this.char();if(39===r){if(39!==this.peek()){this.bump();break}t.push(39),this.bump()}else t.push(r);this.bump()}return Z.apply(void 0,t)},e.prototype.tryParseUnquoted=function(e,t){if(this.isEOF())return null;var r=this.char();return 60===r||123===r||35===r&&("plural"===t||"selectordinal"===t)||125===r&&e>0?null:(this.bump(),Z(r))},e.prototype.parseArgument=function(e,t){var i=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(r.EXPECT_ARGUMENT_CLOSING_BRACE,G(i,this.clonePosition()));if(125===this.char())return this.bump(),this.error(r.EMPTY_ARGUMENT,G(i,this.clonePosition()));var o=this.parseIdentifierIfPossible().value;if(!o)return this.error(r.MALFORMED_ARGUMENT,G(i,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(r.EXPECT_ARGUMENT_CLOSING_BRACE,G(i,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:n.argument,value:o,location:G(i,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(r.EXPECT_ARGUMENT_CLOSING_BRACE,G(i,this.clonePosition())):this.parseArgumentOptions(e,t,o,i);default:return this.error(r.MALFORMED_ARGUMENT,G(i,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var e=this.clonePosition(),t=this.offset(),r=j(this.message,t),n=t+r.length;return this.bumpTo(n),{value:r,location:G(e,this.clonePosition())}},e.prototype.parseArgumentOptions=function(e,t,h,s){var a,u=this.clonePosition(),c=this.parseIdentifierIfPossible().value,l=this.clonePosition();switch(c){case"":return this.error(r.EXPECT_ARGUMENT_TYPE,G(u,l));case"number":case"date":case"time":this.bumpSpace();var p=null;if(this.bumpIf(",")){this.bumpSpace();var f=this.clonePosition();if((v=this.parseSimpleArgStyleIfPossible()).err)return v;if(0===(b=J(v.val)).length)return this.error(r.EXPECT_ARGUMENT_STYLE,G(this.clonePosition(),this.clonePosition()));p={style:b,styleLocation:G(f,this.clonePosition())}}if((_=this.tryParseArgumentClose(s)).err)return _;var E=G(s,this.clonePosition());if(p&&Y(null==p?void 0:p.style,"::",0)){var m=Q(p.style.slice(2));if("number"===c)return(v=this.parseNumberSkeletonFromString(m,p.styleLocation)).err?v:{val:{type:n.number,value:h,location:E,style:v.val},err:null};if(0===m.length)return this.error(r.EXPECT_DATE_TIME_SKELETON,E);var g=m;this.locale&&(g=function(e,t){for(var r="",n=0;n<e.length;n++){var i=e.charAt(n);if("j"===i){for(var o=0;n+1<e.length&&e.charAt(n+1)===i;)o++,n++;var h=1+(1&o),s=o<2?1:3+(o>>1),a=O(t);for("H"!=a&&"k"!=a||(s=0);s-- >0;)r+="a";for(;h-- >0;)r=a+r}else r+="J"===i?"H":i}return r}(m,this.locale));var b={type:i.dateTime,pattern:g,location:p.styleLocation,parsedOptions:this.shouldParseSkeletons?T(g):{}};return{val:{type:"date"===c?n.date:n.time,value:h,location:E,style:b},err:null}}return{val:{type:"number"===c?n.number:"date"===c?n.date:n.time,value:h,location:E,style:null!==(a=null==p?void 0:p.style)&&void 0!==a?a:null},err:null};case"plural":case"selectordinal":case"select":var H=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(r.EXPECT_SELECT_ARGUMENT_OPTIONS,G(H,o({},H)));this.bumpSpace();var y=this.parseIdentifierIfPossible(),B=0;if("select"!==c&&"offset"===y.value){if(!this.bumpIf(":"))return this.error(r.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,G(this.clonePosition(),this.clonePosition()));var v;if(this.bumpSpace(),(v=this.tryParseDecimalInteger(r.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,r.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE)).err)return v;this.bumpSpace(),y=this.parseIdentifierIfPossible(),B=v.val}var _,A=this.tryParsePluralOrSelectOptions(e,c,t,y);if(A.err)return A;if((_=this.tryParseArgumentClose(s)).err)return _;var d=G(s,this.clonePosition());return"select"===c?{val:{type:n.select,value:h,options:z(A.val),location:d},err:null}:{val:{type:n.plural,value:h,options:z(A.val),offset:B,pluralType:"plural"===c?"cardinal":"ordinal",location:d},err:null};default:return this.error(r.INVALID_ARGUMENT_TYPE,G(u,l))}},e.prototype.tryParseArgumentClose=function(e){return this.isEOF()||125!==this.char()?this.error(r.EXPECT_ARGUMENT_CLOSING_BRACE,G(e,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var e=0,t=this.clonePosition();!this.isEOF();){switch(this.char()){case 39:this.bump();var n=this.clonePosition();if(!this.bumpUntil("'"))return this.error(r.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,G(n,this.clonePosition()));this.bump();break;case 123:e+=1,this.bump();break;case 125:if(!(e>0))return{val:this.message.slice(t.offset,this.offset()),err:null};e-=1;break;default:this.bump()}}return{val:this.message.slice(t.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(e,t){var n=[];try{n=function(e){if(0===e.length)throw new Error("Number skeleton cannot be empty");for(var t=[],r=0,n=e.split(B).filter((function(e){return e.length>0}));r<n.length;r++){var i=n[r].split("/");if(0===i.length)throw new Error("Invalid number skeleton");for(var o=i[0],h=i.slice(1),s=0,a=h;s<a.length;s++)if(0===a[s].length)throw new Error("Invalid number skeleton");t.push({stem:o,options:h})}return t}(e)}catch(e){return this.error(r.INVALID_NUMBER_SKELETON,t)}return{val:{type:i.number,tokens:n,location:t,parsedOptions:this.shouldParseSkeletons?I(n):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(e,t,n,i){for(var o,h=!1,s=[],a=new Set,u=i.value,c=i.location;;){if(0===u.length){var l=this.clonePosition();if("select"===t||!this.bumpIf("="))break;var p=this.tryParseDecimalInteger(r.EXPECT_PLURAL_ARGUMENT_SELECTOR,r.INVALID_PLURAL_ARGUMENT_SELECTOR);if(p.err)return p;c=G(l,this.clonePosition()),u=this.message.slice(l.offset,this.offset())}if(a.has(u))return this.error("select"===t?r.DUPLICATE_SELECT_ARGUMENT_SELECTOR:r.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,c);"other"===u&&(h=!0),this.bumpSpace();var f=this.clonePosition();if(!this.bumpIf("{"))return this.error("select"===t?r.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:r.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,G(this.clonePosition(),this.clonePosition()));var E=this.parseMessage(e+1,t,n);if(E.err)return E;var m=this.tryParseArgumentClose(f);if(m.err)return m;s.push([u,{value:E.val,location:G(f,this.clonePosition())}]),a.add(u),this.bumpSpace(),u=(o=this.parseIdentifierIfPossible()).value,c=o.location}return 0===s.length?this.error("select"===t?r.EXPECT_SELECT_ARGUMENT_SELECTOR:r.EXPECT_PLURAL_ARGUMENT_SELECTOR,G(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!h?this.error(r.MISSING_OTHER_CLAUSE,G(this.clonePosition(),this.clonePosition())):{val:s,err:null}},e.prototype.tryParseDecimalInteger=function(e,t){var r=1,n=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(r=-1);for(var i=!1,o=0;!this.isEOF();){var h=this.char();if(!(h>=48&&h<=57))break;i=!0,o=10*o+(h-48),this.bump()}var s=G(n,this.clonePosition());return i?K(o*=r)?{val:o,err:null}:this.error(t,s):this.error(e,s)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var e=this.position.offset;if(e>=this.message.length)throw Error("out of bound");var t=W(this.message,e);if(void 0===t)throw Error("Offset ".concat(e," is at invalid UTF-16 code unit boundary"));return t},e.prototype.error=function(e,t){return{val:null,err:{kind:e,message:this.message,location:t}}},e.prototype.bump=function(){if(!this.isEOF()){var e=this.char();10===e?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=e<65536?1:2)}},e.prototype.bumpIf=function(e){if(Y(this.message,e,this.offset())){for(var t=0;t<e.length;t++)this.bump();return!0}return!1},e.prototype.bumpUntil=function(e){var t=this.offset(),r=this.message.indexOf(e,t);return r>=0?(this.bumpTo(r),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(e){if(this.offset()>e)throw Error("targetOffset ".concat(e," must be greater than or equal to the current offset ").concat(this.offset()));for(e=Math.min(e,this.message.length);;){var t=this.offset();if(t===e)break;if(t>e)throw Error("targetOffset ".concat(e," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&re(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var e=this.char(),t=this.offset(),r=this.message.charCodeAt(t+(e>=65536?2:1));return null!=r?r:null},e}();function te(e){return e>=97&&e<=122||e>=65&&e<=90}function re(e){return e>=9&&e<=13||32===e||133===e||e>=8206&&e<=8207||8232===e||8233===e}function ne(e){return e>=33&&e<=35||36===e||e>=37&&e<=39||40===e||41===e||42===e||43===e||44===e||45===e||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||91===e||92===e||93===e||94===e||96===e||123===e||124===e||125===e||126===e||161===e||e>=162&&e<=165||166===e||167===e||169===e||171===e||172===e||174===e||176===e||177===e||182===e||187===e||191===e||215===e||247===e||e>=8208&&e<=8213||e>=8214&&e<=8215||8216===e||8217===e||8218===e||e>=8219&&e<=8220||8221===e||8222===e||8223===e||e>=8224&&e<=8231||e>=8240&&e<=8248||8249===e||8250===e||e>=8251&&e<=8254||e>=8257&&e<=8259||8260===e||8261===e||8262===e||e>=8263&&e<=8273||8274===e||8275===e||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||8608===e||e>=8609&&e<=8610||8611===e||e>=8612&&e<=8613||8614===e||e>=8615&&e<=8621||8622===e||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||8658===e||8659===e||8660===e||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||8968===e||8969===e||8970===e||8971===e||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||9001===e||9002===e||e>=9003&&e<=9083||9084===e||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||9655===e||e>=9656&&e<=9664||9665===e||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||9839===e||e>=9840&&e<=10087||10088===e||10089===e||10090===e||10091===e||10092===e||10093===e||10094===e||10095===e||10096===e||10097===e||10098===e||10099===e||10100===e||10101===e||e>=10132&&e<=10175||e>=10176&&e<=10180||10181===e||10182===e||e>=10183&&e<=10213||10214===e||10215===e||10216===e||10217===e||10218===e||10219===e||10220===e||10221===e||10222===e||10223===e||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||10627===e||10628===e||10629===e||10630===e||10631===e||10632===e||10633===e||10634===e||10635===e||10636===e||10637===e||10638===e||10639===e||10640===e||10641===e||10642===e||10643===e||10644===e||10645===e||10646===e||10647===e||10648===e||e>=10649&&e<=10711||10712===e||10713===e||10714===e||10715===e||e>=10716&&e<=10747||10748===e||10749===e||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||11158===e||e>=11159&&e<=11263||e>=11776&&e<=11777||11778===e||11779===e||11780===e||11781===e||e>=11782&&e<=11784||11785===e||11786===e||11787===e||11788===e||11789===e||e>=11790&&e<=11798||11799===e||e>=11800&&e<=11801||11802===e||11803===e||11804===e||11805===e||e>=11806&&e<=11807||11808===e||11809===e||11810===e||11811===e||11812===e||11813===e||11814===e||11815===e||11816===e||11817===e||e>=11818&&e<=11822||11823===e||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||11840===e||11841===e||11842===e||e>=11843&&e<=11855||e>=11856&&e<=11857||11858===e||e>=11859&&e<=11903||e>=12289&&e<=12291||12296===e||12297===e||12298===e||12299===e||12300===e||12301===e||12302===e||12303===e||12304===e||12305===e||e>=12306&&e<=12307||12308===e||12309===e||12310===e||12311===e||12312===e||12313===e||12314===e||12315===e||12316===e||12317===e||e>=12318&&e<=12319||12320===e||12336===e||64830===e||64831===e||e>=65093&&e<=65094}function ie(e){e.forEach((function(e){if(delete e.location,p(e)||f(e))for(var t in e.options)delete e.options[t].location,ie(e.options[t].value);else u(e)&&g(e.style)||(c(e)||l(e))&&b(e.style)?delete e.style.location:m(e)&&ie(e.children)}))}function oe(e,t){void 0===t&&(t={}),t=o({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new ee(e,t).parse();if(n.err){var i=SyntaxError(r[n.err.kind]);throw i.location=n.err.location,i.originalMessage=n.err.message,i}return(null==t?void 0:t.captureLocation)||ie(n.val),n.val}function he(e,t){var r=t&&t.cache?t.cache:Ee,n=t&&t.serializer?t.serializer:le;return(t&&t.strategy?t.strategy:ce)(e,{cache:r,serializer:n})}function se(e,t,r,n){var i,o=null==(i=n)||"number"==typeof i||"boolean"==typeof i?n:r(n),h=t.get(o);return void 0===h&&(h=e.call(this,n),t.set(o,h)),h}function ae(e,t,r){var n=Array.prototype.slice.call(arguments,3),i=r(n),o=t.get(i);return void 0===o&&(o=e.apply(this,n),t.set(i,o)),o}function ue(e,t,r,n,i){return r.bind(t,e,n,i)}function ce(e,t){return ue(e,this,1===e.length?se:ae,t.cache.create(),t.serializer)}var le=function(){return JSON.stringify(arguments)};function pe(){this.cache=Object.create(null)}pe.prototype.get=function(e){return this.cache[e]},pe.prototype.set=function(e,t){this.cache[e]=t};var fe,Ee={create:function(){return new pe}},me={variadic:function(e,t){return ue(e,this,ae,t.cache.create(),t.serializer)},monadic:function(e,t){return ue(e,this,se,t.cache.create(),t.serializer)}};!function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"}(fe||(fe={}));var ge,be=function(e){function r(t,r,n){var i=e.call(this,t)||this;return i.code=r,i.originalMessage=n,i}return t(r,e),r.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},r}(Error),He=function(e){function r(t,r,n,i){return e.call(this,'Invalid values for "'.concat(t,'": "').concat(r,'". Options are "').concat(Object.keys(n).join('", "'),'"'),fe.INVALID_VALUE,i)||this}return t(r,e),r}(be),ye=function(e){function r(t,r,n){return e.call(this,'Value for "'.concat(t,'" must be of type ').concat(r),fe.INVALID_VALUE,n)||this}return t(r,e),r}(be),Te=function(e){function r(t,r){return e.call(this,'The intl string context variable "'.concat(t,'" was not provided to the string "').concat(r,'"'),fe.MISSING_VALUE,r)||this}return t(r,e),r}(be);function Be(e){return"function"==typeof e}function ve(e,t,r,n,i,o,h){if(1===e.length&&s(e[0]))return[{type:ge.literal,value:e[0].value}];for(var H=[],y=0,T=e;y<T.length;y++){var B=T[y];if(s(B))H.push({type:ge.literal,value:B.value});else if(E(B))"number"==typeof o&&H.push({type:ge.literal,value:r.getNumberFormat(t).format(o)});else{var v=B.value;if(!i||!(v in i))throw new Te(v,h);var _=i[v];if(a(B))_&&"string"!=typeof _&&"number"!=typeof _||(_="string"==typeof _||"number"==typeof _?String(_):""),H.push({type:"string"==typeof _?ge.literal:ge.object,value:_});else if(c(B)){var A="string"==typeof B.style?n.date[B.style]:b(B.style)?B.style.parsedOptions:void 0;H.push({type:ge.literal,value:r.getDateTimeFormat(t,A).format(_)})}else if(l(B)){A="string"==typeof B.style?n.time[B.style]:b(B.style)?B.style.parsedOptions:n.time.medium;H.push({type:ge.literal,value:r.getDateTimeFormat(t,A).format(_)})}else if(u(B)){(A="string"==typeof B.style?n.number[B.style]:g(B.style)?B.style.parsedOptions:void 0)&&A.scale&&(_*=A.scale||1),H.push({type:ge.literal,value:r.getNumberFormat(t,A).format(_)})}else{if(m(B)){var d=B.children,L=B.value,P=i[L];if(!Be(P))throw new ye(L,"function",h);var S=P(ve(d,t,r,n,i,o).map((function(e){return e.value})));Array.isArray(S)||(S=[S]),H.push.apply(H,S.map((function(e){return{type:"string"==typeof e?ge.literal:ge.object,value:e}})))}if(p(B)){if(!(N=B.options[_]||B.options.other))throw new He(B.value,_,Object.keys(B.options),h);H.push.apply(H,ve(N.value,t,r,n,i))}else if(f(B)){var N;if(!(N=B.options["=".concat(_)])){if(!Intl.PluralRules)throw new be('Intl.PluralRules is not available in this environment.\nTry polyfilling it using "@formatjs/intl-pluralrules"\n',fe.MISSING_INTL_API,h);var I=r.getPluralRules(t,{type:B.pluralType}).select(_-(B.offset||0));N=B.options[I]||B.options.other}if(!N)throw new He(B.value,_,Object.keys(B.options),h);H.push.apply(H,ve(N.value,t,r,n,i,_-(B.offset||0)))}else;}}}return function(e){return e.length<2?e:e.reduce((function(e,t){var r=e[e.length-1];return r&&r.type===ge.literal&&t.type===ge.literal?r.value+=t.value:e.push(t),e}),[])}(H)}function _e(e,t){return t?Object.keys(e).reduce((function(r,n){var i,h;return r[n]=(i=e[n],(h=t[n])?o(o(o({},i||{}),h||{}),Object.keys(i).reduce((function(e,t){return e[t]=o(o({},i[t]),h[t]||{}),e}),{})):i),r}),o({},e)):e}function Ae(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,r){e[t]=r}}}}}!function(e){e[e.literal=0]="literal",e[e.object=1]="object"}(ge||(ge={}));var de=function(){function e(t,r,n,i){var o,s=this;if(void 0===r&&(r=e.defaultLocale),this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(e){var t=s.formatToParts(e);if(1===t.length)return t[0].value;var r=t.reduce((function(e,t){return e.length&&t.type===ge.literal&&"string"==typeof e[e.length-1]?e[e.length-1]+=t.value:e.push(t.value),e}),[]);return r.length<=1?r[0]||"":r},this.formatToParts=function(e){return ve(s.ast,s.locales,s.formatters,s.formats,e,void 0,s.message)},this.resolvedOptions=function(){return{locale:s.resolvedLocale.toString()}},this.getAst=function(){return s.ast},this.locales=r,this.resolvedLocale=e.resolveLocale(r),"string"==typeof t){if(this.message=t,!e.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");this.ast=e.__parse(t,{ignoreTag:null==i?void 0:i.ignoreTag,locale:this.resolvedLocale})}else this.ast=t;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=_e(e.formats,n),this.formatters=i&&i.formatters||(void 0===(o=this.formatterCache)&&(o={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:he((function(){for(var e,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return new((e=Intl.NumberFormat).bind.apply(e,h([void 0],t,!1)))}),{cache:Ae(o.number),strategy:me.variadic}),getDateTimeFormat:he((function(){for(var e,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return new((e=Intl.DateTimeFormat).bind.apply(e,h([void 0],t,!1)))}),{cache:Ae(o.dateTime),strategy:me.variadic}),getPluralRules:he((function(){for(var e,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return new((e=Intl.PluralRules).bind.apply(e,h([void 0],t,!1)))}),{cache:Ae(o.pluralRules),strategy:me.variadic})})}return Object.defineProperty(e,"defaultLocale",{get:function(){return e.memoizedDefaultLocale||(e.memoizedDefaultLocale=(new Intl.NumberFormat).resolvedOptions().locale),e.memoizedDefaultLocale},enumerable:!1,configurable:!0}),e.memoizedDefaultLocale=null,e.resolveLocale=function(e){var t=Intl.NumberFormat.supportedLocalesOf(e);return t.length>0?new Intl.Locale(t[0]):new Intl.Locale("string"==typeof e?e:e[0])},e.__parse=oe,e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},e}(),Le=de;exports.FormatIcu=()=>(e,t)=>(t.setFinalFormatter((()=>{const e=new Map;function t(e){try{return Boolean(Intl.NumberFormat.supportedLocalesOf(e).length)}catch(e){return!1}}function r(r){if(!e.get(r)){let n=String(r).replace(/[^a-zA-Z]/g,"-");for(;!t(n);)n=n.split("-").slice(0,-1).join("-")||"en";e.set(r,n)}return e.get(r)}return Object.freeze({getLanguage:r,format:({translation:e,language:t,params:n})=>{const i=!Object.values(n||{}).find((e=>"function"==typeof e)),o=r(t);return new Le(e,o,void 0,{ignoreTag:i}).format(n)}})})()),e);
//# sourceMappingURL=tolgee-format-icu.cjs.min.js.map

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

var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};function t(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}var r=function(){return r=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},r.apply(this,arguments)};function n(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}function i(e,t){var r=t&&t.cache?t.cache:E,n=t&&t.serializer?t.serializer:u;return(t&&t.strategy?t.strategy:a)(e,{cache:r,serializer:n})}function o(e,t,r,n){var i,o=null==(i=n)||"number"==typeof i||"boolean"==typeof i?n:r(n),h=t.get(o);return void 0===h&&(h=e.call(this,n),t.set(o,h)),h}function h(e,t,r){var n=Array.prototype.slice.call(arguments,3),i=r(n),o=t.get(i);return void 0===o&&(o=e.apply(this,n),t.set(i,o)),o}function s(e,t,r,n,i){return r.bind(t,e,n,i)}function a(e,t){return s(e,this,1===e.length?o:h,t.cache.create(),t.serializer)}var u=function(){return JSON.stringify(arguments)};function c(){this.cache=Object.create(null)}c.prototype.get=function(e){return this.cache[e]},c.prototype.set=function(e,t){this.cache[e]=t};var l,p,f,E={create:function(){return new c}},m={variadic:function(e,t){return s(e,this,h,t.cache.create(),t.serializer)},monadic:function(e,t){return s(e,this,o,t.cache.create(),t.serializer)}};function g(e){return e.type===p.literal}function b(e){return e.type===p.argument}function H(e){return e.type===p.number}function y(e){return e.type===p.date}function T(e){return e.type===p.time}function B(e){return e.type===p.select}function v(e){return e.type===p.plural}function d(e){return e.type===p.pound}function _(e){return e.type===p.tag}function A(e){return!(!e||"object"!=typeof e||e.type!==f.number)}function L(e){return!(!e||"object"!=typeof e||e.type!==f.dateTime)}!function(e){e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",e[e.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",e[e.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",e[e.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",e[e.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",e[e.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",e[e.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",e[e.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",e[e.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",e[e.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",e[e.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",e[e.INVALID_TAG=23]="INVALID_TAG",e[e.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",e[e.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",e[e.UNCLOSED_TAG=27]="UNCLOSED_TAG"}(l||(l={})),function(e){e[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound",e[e.tag=8]="tag"}(p||(p={})),function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"}(f||(f={}));var P=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,S=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function N(e){var t={};return e.replace(S,(function(e){var r=e.length;switch(e[0]){case"G":t.era=4===r?"long":5===r?"narrow":"short";break;case"y":t.year=2===r?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":t.month=["numeric","2-digit","short","long","narrow"][r-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":t.day=["numeric","2-digit"][r-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":t.weekday=4===r?"long":5===r?"narrow":"short";break;case"e":if(r<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][r-4];break;case"c":if(r<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][r-4];break;case"a":t.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":t.hourCycle="h12",t.hour=["numeric","2-digit"][r-1];break;case"H":t.hourCycle="h23",t.hour=["numeric","2-digit"][r-1];break;case"K":t.hourCycle="h11",t.hour=["numeric","2-digit"][r-1];break;case"k":t.hourCycle="h24",t.hour=["numeric","2-digit"][r-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":t.minute=["numeric","2-digit"][r-1];break;case"s":t.second=["numeric","2-digit"][r-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":t.timeZoneName=r<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""})),t}var I=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;var C=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,R=/^(@+)?(\+|#+)?[rs]?$/g,M=/(\*)(0+)|(#+)(0+)|(0+)/g,O=/^(0+)$/;function U(e){var t={};return"r"===e[e.length-1]?t.roundingPriority="morePrecision":"s"===e[e.length-1]&&(t.roundingPriority="lessPrecision"),e.replace(R,(function(e,r,n){return"string"!=typeof n?(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length):"+"===n?t.minimumSignificantDigits=r.length:"#"===r[0]?t.maximumSignificantDigits=r.length:(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length+("string"==typeof n?n.length:0)),""})),t}function G(e){switch(e){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function w(e){var t;if("E"===e[0]&&"E"===e[1]?(t={notation:"engineering"},e=e.slice(2)):"E"===e[0]&&(t={notation:"scientific"},e=e.slice(1)),t){var r=e.slice(0,2);if("+!"===r?(t.signDisplay="always",e=e.slice(2)):"+?"===r&&(t.signDisplay="exceptZero",e=e.slice(2)),!O.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function D(e){var t=G(e);return t||{}}function F(e){for(var t={},n=0,i=e;n<i.length;n++){var o=i[n];switch(o.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=o.options[0];continue;case"group-off":case",_":t.useGrouping=!1;continue;case"precision-integer":case".":t.maximumFractionDigits=0;continue;case"measure-unit":case"unit":t.style="unit",t.unit=o.options[0].replace(/^(.*?)-/,"");continue;case"compact-short":case"K":t.notation="compact",t.compactDisplay="short";continue;case"compact-long":case"KK":t.notation="compact",t.compactDisplay="long";continue;case"scientific":t=r(r(r({},t),{notation:"scientific"}),o.options.reduce((function(e,t){return r(r({},e),D(t))}),{}));continue;case"engineering":t=r(r(r({},t),{notation:"engineering"}),o.options.reduce((function(e,t){return r(r({},e),D(t))}),{}));continue;case"notation-simple":t.notation="standard";continue;case"unit-width-narrow":t.currencyDisplay="narrowSymbol",t.unitDisplay="narrow";continue;case"unit-width-short":t.currencyDisplay="code",t.unitDisplay="short";continue;case"unit-width-full-name":t.currencyDisplay="name",t.unitDisplay="long";continue;case"unit-width-iso-code":t.currencyDisplay="symbol";continue;case"scale":t.scale=parseFloat(o.options[0]);continue;case"rounding-mode-floor":t.roundingMode="floor";continue;case"rounding-mode-ceiling":t.roundingMode="ceil";continue;case"rounding-mode-down":t.roundingMode="trunc";continue;case"rounding-mode-up":t.roundingMode="expand";continue;case"rounding-mode-half-even":t.roundingMode="halfEven";continue;case"rounding-mode-half-down":t.roundingMode="halfTrunc";continue;case"rounding-mode-half-up":t.roundingMode="halfExpand";continue;case"integer-width":if(o.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");o.options[0].replace(M,(function(e,r,n,i,o,h){if(r)t.minimumIntegerDigits=n.length;else{if(i&&o)throw new Error("We currently do not support maximum integer digits");if(h)throw new Error("We currently do not support exact integer digits")}return""}));continue}if(O.test(o.stem))t.minimumIntegerDigits=o.stem.length;else if(C.test(o.stem)){if(o.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");o.stem.replace(C,(function(e,r,n,i,o,h){return"*"===n?t.minimumFractionDigits=r.length:i&&"#"===i[0]?t.maximumFractionDigits=i.length:o&&h?(t.minimumFractionDigits=o.length,t.maximumFractionDigits=o.length+h.length):(t.minimumFractionDigits=r.length,t.maximumFractionDigits=r.length),""}));var h=o.options[0];"w"===h?t=r(r({},t),{trailingZeroDisplay:"stripIfInteger"}):h&&(t=r(r({},t),U(h)))}else if(R.test(o.stem))t=r(r({},t),U(o.stem));else{var s=G(o.stem);s&&(t=r(r({},t),s));var a=w(o.stem);a&&(t=r(r({},t),a))}}return t}var k,V={"001":["H","h"],419:["h","H","hB","hb"],AC:["H","h","hb","hB"],AD:["H","hB"],AE:["h","hB","hb","H"],AF:["H","hb","hB","h"],AG:["h","hb","H","hB"],AI:["H","h","hb","hB"],AL:["h","H","hB"],AM:["H","hB"],AO:["H","hB"],AR:["h","H","hB","hb"],AS:["h","H"],AT:["H","hB"],AU:["h","hb","H","hB"],AW:["H","hB"],AX:["H"],AZ:["H","hB","h"],BA:["H","hB","h"],BB:["h","hb","H","hB"],BD:["h","hB","H"],BE:["H","hB"],BF:["H","hB"],BG:["H","hB","h"],BH:["h","hB","hb","H"],BI:["H","h"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["h","H","hB","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],BY:["H","h"],BZ:["H","h","hb","hB"],CA:["h","hb","H","hB"],CC:["H","h","hb","hB"],CD:["hB","H"],CF:["H","h","hB"],CG:["H","hB"],CH:["H","hB","h"],CI:["H","hB"],CK:["H","h","hb","hB"],CL:["h","H","hB","hb"],CM:["H","h","hB"],CN:["H","hB","hb","h"],CO:["h","H","hB","hb"],CP:["H"],CR:["h","H","hB","hb"],CU:["h","H","hB","hb"],CV:["H","hB"],CW:["H","hB"],CX:["H","h","hb","hB"],CY:["h","H","hb","hB"],CZ:["H"],DE:["H","hB"],DG:["H","h","hb","hB"],DJ:["h","H"],DK:["H"],DM:["h","hb","H","hB"],DO:["h","H","hB","hb"],DZ:["h","hB","hb","H"],EA:["H","h","hB","hb"],EC:["h","H","hB","hb"],EE:["H","hB"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],ER:["h","H"],ES:["H","hB","h","hb"],ET:["hB","hb","h","H"],FI:["H"],FJ:["h","hb","H","hB"],FK:["H","h","hb","hB"],FM:["h","hb","H","hB"],FO:["H","h"],FR:["H","hB"],GA:["H","hB"],GB:["H","h","hb","hB"],GD:["h","hb","H","hB"],GE:["H","hB","h"],GF:["H","hB"],GG:["H","h","hb","hB"],GH:["h","H"],GI:["H","h","hb","hB"],GL:["H","h"],GM:["h","hb","H","hB"],GN:["H","hB"],GP:["H","hB"],GQ:["H","hB","h","hb"],GR:["h","H","hb","hB"],GT:["h","H","hB","hb"],GU:["h","hb","H","hB"],GW:["H","hB"],GY:["h","hb","H","hB"],HK:["h","hB","hb","H"],HN:["h","H","hB","hb"],HR:["H","hB"],HU:["H","h"],IC:["H","h","hB","hb"],ID:["H"],IE:["H","h","hb","hB"],IL:["H","hB"],IM:["H","h","hb","hB"],IN:["h","H"],IO:["H","h","hb","hB"],IQ:["h","hB","hb","H"],IR:["hB","H"],IS:["H"],IT:["H","hB"],JE:["H","h","hb","hB"],JM:["h","hb","H","hB"],JO:["h","hB","hb","H"],JP:["H","K","h"],KE:["hB","hb","H","h"],KG:["H","h","hB","hb"],KH:["hB","h","H","hb"],KI:["h","hb","H","hB"],KM:["H","h","hB","hb"],KN:["h","hb","H","hB"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],KW:["h","hB","hb","H"],KY:["h","hb","H","hB"],KZ:["H","hB"],LA:["H","hb","hB","h"],LB:["h","hB","hb","H"],LC:["h","hb","H","hB"],LI:["H","hB","h"],LK:["H","h","hB","hb"],LR:["h","hb","H","hB"],LS:["h","H"],LT:["H","h","hb","hB"],LU:["H","h","hB"],LV:["H","hB","hb","h"],LY:["h","hB","hb","H"],MA:["H","h","hB","hb"],MC:["H","hB"],MD:["H","hB"],ME:["H","hB","h"],MF:["H","hB"],MG:["H","h"],MH:["h","hb","H","hB"],MK:["H","h","hb","hB"],ML:["H"],MM:["hB","hb","H","h"],MN:["H","h","hb","hB"],MO:["h","hB","hb","H"],MP:["h","hb","H","hB"],MQ:["H","hB"],MR:["h","hB","hb","H"],MS:["H","h","hb","hB"],MT:["H","h"],MU:["H","h"],MV:["H","h"],MW:["h","hb","H","hB"],MX:["h","H","hB","hb"],MY:["hb","hB","h","H"],MZ:["H","hB"],NA:["h","H","hB","hb"],NC:["H","hB"],NE:["H"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NI:["h","H","hB","hb"],NL:["H","hB"],NO:["H","h"],NP:["H","h","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],NZ:["h","hb","H","hB"],OM:["h","hB","hb","H"],PA:["h","H","hB","hb"],PE:["h","H","hB","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","H"],PL:["H","h"],PM:["H","hB"],PN:["H","h","hb","hB"],PR:["h","H","hB","hb"],PS:["h","hB","hb","H"],PT:["H","hB"],PW:["h","H"],PY:["h","H","hB","hb"],QA:["h","hB","hb","H"],RE:["H","hB"],RO:["H","hB"],RS:["H","hB","h"],RU:["H"],RW:["H","h"],SA:["h","hB","hb","H"],SB:["h","hb","H","hB"],SC:["H","h","hB"],SD:["h","hB","hb","H"],SE:["H"],SG:["h","hb","H","hB"],SH:["H","h","hb","hB"],SI:["H","hB"],SJ:["H"],SK:["H"],SL:["h","hb","H","hB"],SM:["H","h","hB"],SN:["H","h","hB"],SO:["h","H"],SR:["H","hB"],SS:["h","hb","H","hB"],ST:["H","hB"],SV:["h","H","hB","hb"],SX:["H","h","hb","hB"],SY:["h","hB","hb","H"],SZ:["h","hb","H","hB"],TA:["H","h","hb","hB"],TC:["h","hb","H","hB"],TD:["h","H","hB"],TF:["H","h","hB"],TG:["H","hB"],TH:["H","h"],TJ:["H","h"],TL:["H","hB","hb","h"],TM:["H","h"],TN:["h","hB","hb","H"],TO:["h","H"],TR:["H","hB"],TT:["h","hb","H","hB"],TW:["hB","hb","h","H"],TZ:["hB","hb","H","h"],UA:["H","hB","h"],UG:["hB","hb","H","h"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],UY:["h","H","hB","hb"],UZ:["H","hB","h"],VA:["H","h","hB"],VC:["h","hb","H","hB"],VE:["h","H","hB","hb"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],VN:["H","h"],VU:["h","H"],WF:["H","hB"],WS:["h","H"],XK:["H","hB","h"],YE:["h","hB","hb","H"],YT:["H","hB"],ZA:["H","h","hb","hB"],ZM:["h","hb","H","hB"],ZW:["H","h"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","hB"],"en-HK":["h","hb","H","hB"],"en-IL":["H","h","hb","hB"],"en-MY":["h","hb","H","hB"],"es-BR":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"gu-IN":["hB","hb","h","H"],"hi-IN":["hB","h","H"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],"ta-IN":["hB","h","hb","H"],"te-IN":["hB","h","H"],"zu-ZA":["H","hB","hb","h"]};function X(e){var t=e.hourCycle;if(void 0===t&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var r,n=e.language;return"root"!==n&&(r=e.maximize().region),(V[r||""]||V[n||""]||V["".concat(n,"-001")]||V["001"])[0]}var x=new RegExp("^".concat(P.source,"*")),K=new RegExp("".concat(P.source,"*$"));function j(e,t){return{start:e,end:t}}var Y=!!String.prototype.startsWith&&"_a".startsWith("a",1),Z=!!String.fromCodePoint,W=!!Object.fromEntries,z=!!String.prototype.codePointAt,Q=!!String.prototype.trimStart,J=!!String.prototype.trimEnd,q=!!Number.isSafeInteger?Number.isSafeInteger:function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},$=!0;try{$="a"===(null===(k=se("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu").exec("a"))||void 0===k?void 0:k[0])}catch(e){$=!1}var ee,te=Y?function(e,t,r){return e.startsWith(t,r)}:function(e,t,r){return e.slice(r,r+t.length)===t},re=Z?String.fromCodePoint:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r,n="",i=e.length,o=0;i>o;){if((r=e[o++])>1114111)throw RangeError(r+" is not a valid code point");n+=r<65536?String.fromCharCode(r):String.fromCharCode(55296+((r-=65536)>>10),r%1024+56320)}return n},ne=W?Object.fromEntries:function(e){for(var t={},r=0,n=e;r<n.length;r++){var i=n[r],o=i[0],h=i[1];t[o]=h}return t},ie=z?function(e,t){return e.codePointAt(t)}:function(e,t){var r=e.length;if(!(t<0||t>=r)){var n,i=e.charCodeAt(t);return i<55296||i>56319||t+1===r||(n=e.charCodeAt(t+1))<56320||n>57343?i:n-56320+(i-55296<<10)+65536}},oe=Q?function(e){return e.trimStart()}:function(e){return e.replace(x,"")},he=J?function(e){return e.trimEnd()}:function(e){return e.replace(K,"")};function se(e,t){return new RegExp(e,t)}if($){var ae=se("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");ee=function(e,t){var r;return ae.lastIndex=t,null!==(r=ae.exec(e)[1])&&void 0!==r?r:""}}else ee=function(e,t){for(var r=[];;){var n=ie(e,t);if(void 0===n||pe(n)||fe(n))break;r.push(n),t+=n>=65536?2:1}return re.apply(void 0,r)};var ue,ce=function(){function e(e,t){void 0===t&&(t={}),this.message=e,this.position={offset:0,line:1,column:1},this.ignoreTag=!!t.ignoreTag,this.locale=t.locale,this.requiresOtherClause=!!t.requiresOtherClause,this.shouldParseSkeletons=!!t.shouldParseSkeletons}return e.prototype.parse=function(){if(0!==this.offset())throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(e,t,r){for(var n=[];!this.isEOF();){var i=this.char();if(123===i){if((o=this.parseArgument(e,r)).err)return o;n.push(o.val)}else{if(125===i&&e>0)break;if(35!==i||"plural"!==t&&"selectordinal"!==t){if(60===i&&!this.ignoreTag&&47===this.peek()){if(r)break;return this.error(l.UNMATCHED_CLOSING_TAG,j(this.clonePosition(),this.clonePosition()))}if(60===i&&!this.ignoreTag&&le(this.peek()||0)){if((o=this.parseTag(e,t)).err)return o;n.push(o.val)}else{var o;if((o=this.parseLiteral(e,t)).err)return o;n.push(o.val)}}else{var h=this.clonePosition();this.bump(),n.push({type:p.pound,location:j(h,this.clonePosition())})}}}return{val:n,err:null}},e.prototype.parseTag=function(e,t){var r=this.clonePosition();this.bump();var n=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:p.literal,value:"<".concat(n,"/>"),location:j(r,this.clonePosition())},err:null};if(this.bumpIf(">")){var i=this.parseMessage(e+1,t,!0);if(i.err)return i;var o=i.val,h=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!le(this.char()))return this.error(l.INVALID_TAG,j(h,this.clonePosition()));var s=this.clonePosition();return n!==this.parseTagName()?this.error(l.UNMATCHED_CLOSING_TAG,j(s,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:p.tag,value:n,children:o,location:j(r,this.clonePosition())},err:null}:this.error(l.INVALID_TAG,j(h,this.clonePosition())))}return this.error(l.UNCLOSED_TAG,j(r,this.clonePosition()))}return this.error(l.INVALID_TAG,j(r,this.clonePosition()))},e.prototype.parseTagName=function(){var e,t=this.offset();for(this.bump();!this.isEOF()&&(45===(e=this.char())||46===e||e>=48&&e<=57||95===e||e>=97&&e<=122||e>=65&&e<=90||183==e||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039);)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(e,t){for(var r=this.clonePosition(),n="";;){var i=this.tryParseQuote(t);if(i)n+=i;else{var o=this.tryParseUnquoted(e,t);if(o)n+=o;else{var h=this.tryParseLeftAngleBracket();if(!h)break;n+=h}}}var s=j(r,this.clonePosition());return{val:{type:p.literal,value:n,location:s},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return this.isEOF()||60!==this.char()||!this.ignoreTag&&(le(e=this.peek()||0)||47===e)?null:(this.bump(),"<");var e},e.prototype.tryParseQuote=function(e){if(this.isEOF()||39!==this.char())return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if("plural"===e||"selectordinal"===e)break;return null;default:return null}this.bump();var t=[this.char()];for(this.bump();!this.isEOF();){var r=this.char();if(39===r){if(39!==this.peek()){this.bump();break}t.push(39),this.bump()}else t.push(r);this.bump()}return re.apply(void 0,t)},e.prototype.tryParseUnquoted=function(e,t){if(this.isEOF())return null;var r=this.char();return 60===r||123===r||35===r&&("plural"===t||"selectordinal"===t)||125===r&&e>0?null:(this.bump(),re(r))},e.prototype.parseArgument=function(e,t){var r=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(l.EXPECT_ARGUMENT_CLOSING_BRACE,j(r,this.clonePosition()));if(125===this.char())return this.bump(),this.error(l.EMPTY_ARGUMENT,j(r,this.clonePosition()));var n=this.parseIdentifierIfPossible().value;if(!n)return this.error(l.MALFORMED_ARGUMENT,j(r,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(l.EXPECT_ARGUMENT_CLOSING_BRACE,j(r,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:p.argument,value:n,location:j(r,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(l.EXPECT_ARGUMENT_CLOSING_BRACE,j(r,this.clonePosition())):this.parseArgumentOptions(e,t,n,r);default:return this.error(l.MALFORMED_ARGUMENT,j(r,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var e=this.clonePosition(),t=this.offset(),r=ee(this.message,t),n=t+r.length;return this.bumpTo(n),{value:r,location:j(e,this.clonePosition())}},e.prototype.parseArgumentOptions=function(e,t,n,i){var o,h=this.clonePosition(),s=this.parseIdentifierIfPossible().value,a=this.clonePosition();switch(s){case"":return this.error(l.EXPECT_ARGUMENT_TYPE,j(h,a));case"number":case"date":case"time":this.bumpSpace();var u=null;if(this.bumpIf(",")){this.bumpSpace();var c=this.clonePosition();if((B=this.parseSimpleArgStyleIfPossible()).err)return B;if(0===(b=he(B.val)).length)return this.error(l.EXPECT_ARGUMENT_STYLE,j(this.clonePosition(),this.clonePosition()));u={style:b,styleLocation:j(c,this.clonePosition())}}if((v=this.tryParseArgumentClose(i)).err)return v;var E=j(i,this.clonePosition());if(u&&te(null==u?void 0:u.style,"::",0)){var m=oe(u.style.slice(2));if("number"===s)return(B=this.parseNumberSkeletonFromString(m,u.styleLocation)).err?B:{val:{type:p.number,value:n,location:E,style:B.val},err:null};if(0===m.length)return this.error(l.EXPECT_DATE_TIME_SKELETON,E);var g=m;this.locale&&(g=function(e,t){for(var r="",n=0;n<e.length;n++){var i=e.charAt(n);if("j"===i){for(var o=0;n+1<e.length&&e.charAt(n+1)===i;)o++,n++;var h=1+(1&o),s=o<2?1:3+(o>>1),a=X(t);for("H"!=a&&"k"!=a||(s=0);s-- >0;)r+="a";for(;h-- >0;)r=a+r}else r+="J"===i?"H":i}return r}(m,this.locale));var b={type:f.dateTime,pattern:g,location:u.styleLocation,parsedOptions:this.shouldParseSkeletons?N(g):{}};return{val:{type:"date"===s?p.date:p.time,value:n,location:E,style:b},err:null}}return{val:{type:"number"===s?p.number:"date"===s?p.date:p.time,value:n,location:E,style:null!==(o=null==u?void 0:u.style)&&void 0!==o?o:null},err:null};case"plural":case"selectordinal":case"select":var H=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(l.EXPECT_SELECT_ARGUMENT_OPTIONS,j(H,r({},H)));this.bumpSpace();var y=this.parseIdentifierIfPossible(),T=0;if("select"!==s&&"offset"===y.value){if(!this.bumpIf(":"))return this.error(l.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,j(this.clonePosition(),this.clonePosition()));var B;if(this.bumpSpace(),(B=this.tryParseDecimalInteger(l.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,l.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE)).err)return B;this.bumpSpace(),y=this.parseIdentifierIfPossible(),T=B.val}var v,d=this.tryParsePluralOrSelectOptions(e,s,t,y);if(d.err)return d;if((v=this.tryParseArgumentClose(i)).err)return v;var _=j(i,this.clonePosition());return"select"===s?{val:{type:p.select,value:n,options:ne(d.val),location:_},err:null}:{val:{type:p.plural,value:n,options:ne(d.val),offset:T,pluralType:"plural"===s?"cardinal":"ordinal",location:_},err:null};default:return this.error(l.INVALID_ARGUMENT_TYPE,j(h,a))}},e.prototype.tryParseArgumentClose=function(e){return this.isEOF()||125!==this.char()?this.error(l.EXPECT_ARGUMENT_CLOSING_BRACE,j(e,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var e=0,t=this.clonePosition();!this.isEOF();){switch(this.char()){case 39:this.bump();var r=this.clonePosition();if(!this.bumpUntil("'"))return this.error(l.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,j(r,this.clonePosition()));this.bump();break;case 123:e+=1,this.bump();break;case 125:if(!(e>0))return{val:this.message.slice(t.offset,this.offset()),err:null};e-=1;break;default:this.bump()}}return{val:this.message.slice(t.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(e,t){var r=[];try{r=function(e){if(0===e.length)throw new Error("Number skeleton cannot be empty");for(var t=[],r=0,n=e.split(I).filter((function(e){return e.length>0}));r<n.length;r++){var i=n[r].split("/");if(0===i.length)throw new Error("Invalid number skeleton");for(var o=i[0],h=i.slice(1),s=0,a=h;s<a.length;s++)if(0===a[s].length)throw new Error("Invalid number skeleton");t.push({stem:o,options:h})}return t}(e)}catch(e){return this.error(l.INVALID_NUMBER_SKELETON,t)}return{val:{type:f.number,tokens:r,location:t,parsedOptions:this.shouldParseSkeletons?F(r):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(e,t,r,n){for(var i,o=!1,h=[],s=new Set,a=n.value,u=n.location;;){if(0===a.length){var c=this.clonePosition();if("select"===t||!this.bumpIf("="))break;var p=this.tryParseDecimalInteger(l.EXPECT_PLURAL_ARGUMENT_SELECTOR,l.INVALID_PLURAL_ARGUMENT_SELECTOR);if(p.err)return p;u=j(c,this.clonePosition()),a=this.message.slice(c.offset,this.offset())}if(s.has(a))return this.error("select"===t?l.DUPLICATE_SELECT_ARGUMENT_SELECTOR:l.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,u);"other"===a&&(o=!0),this.bumpSpace();var f=this.clonePosition();if(!this.bumpIf("{"))return this.error("select"===t?l.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:l.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,j(this.clonePosition(),this.clonePosition()));var E=this.parseMessage(e+1,t,r);if(E.err)return E;var m=this.tryParseArgumentClose(f);if(m.err)return m;h.push([a,{value:E.val,location:j(f,this.clonePosition())}]),s.add(a),this.bumpSpace(),a=(i=this.parseIdentifierIfPossible()).value,u=i.location}return 0===h.length?this.error("select"===t?l.EXPECT_SELECT_ARGUMENT_SELECTOR:l.EXPECT_PLURAL_ARGUMENT_SELECTOR,j(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!o?this.error(l.MISSING_OTHER_CLAUSE,j(this.clonePosition(),this.clonePosition())):{val:h,err:null}},e.prototype.tryParseDecimalInteger=function(e,t){var r=1,n=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(r=-1);for(var i=!1,o=0;!this.isEOF();){var h=this.char();if(!(h>=48&&h<=57))break;i=!0,o=10*o+(h-48),this.bump()}var s=j(n,this.clonePosition());return i?q(o*=r)?{val:o,err:null}:this.error(t,s):this.error(e,s)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var e=this.position.offset;if(e>=this.message.length)throw Error("out of bound");var t=ie(this.message,e);if(void 0===t)throw Error("Offset ".concat(e," is at invalid UTF-16 code unit boundary"));return t},e.prototype.error=function(e,t){return{val:null,err:{kind:e,message:this.message,location:t}}},e.prototype.bump=function(){if(!this.isEOF()){var e=this.char();10===e?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=e<65536?1:2)}},e.prototype.bumpIf=function(e){if(te(this.message,e,this.offset())){for(var t=0;t<e.length;t++)this.bump();return!0}return!1},e.prototype.bumpUntil=function(e){var t=this.offset(),r=this.message.indexOf(e,t);return r>=0?(this.bumpTo(r),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(e){if(this.offset()>e)throw Error("targetOffset ".concat(e," must be greater than or equal to the current offset ").concat(this.offset()));for(e=Math.min(e,this.message.length);;){var t=this.offset();if(t===e)break;if(t>e)throw Error("targetOffset ".concat(e," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&pe(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var e=this.char(),t=this.offset(),r=this.message.charCodeAt(t+(e>=65536?2:1));return null!=r?r:null},e}();function le(e){return e>=97&&e<=122||e>=65&&e<=90}function pe(e){return e>=9&&e<=13||32===e||133===e||e>=8206&&e<=8207||8232===e||8233===e}function fe(e){return e>=33&&e<=35||36===e||e>=37&&e<=39||40===e||41===e||42===e||43===e||44===e||45===e||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||91===e||92===e||93===e||94===e||96===e||123===e||124===e||125===e||126===e||161===e||e>=162&&e<=165||166===e||167===e||169===e||171===e||172===e||174===e||176===e||177===e||182===e||187===e||191===e||215===e||247===e||e>=8208&&e<=8213||e>=8214&&e<=8215||8216===e||8217===e||8218===e||e>=8219&&e<=8220||8221===e||8222===e||8223===e||e>=8224&&e<=8231||e>=8240&&e<=8248||8249===e||8250===e||e>=8251&&e<=8254||e>=8257&&e<=8259||8260===e||8261===e||8262===e||e>=8263&&e<=8273||8274===e||8275===e||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||8608===e||e>=8609&&e<=8610||8611===e||e>=8612&&e<=8613||8614===e||e>=8615&&e<=8621||8622===e||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||8658===e||8659===e||8660===e||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||8968===e||8969===e||8970===e||8971===e||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||9001===e||9002===e||e>=9003&&e<=9083||9084===e||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||9655===e||e>=9656&&e<=9664||9665===e||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||9839===e||e>=9840&&e<=10087||10088===e||10089===e||10090===e||10091===e||10092===e||10093===e||10094===e||10095===e||10096===e||10097===e||10098===e||10099===e||10100===e||10101===e||e>=10132&&e<=10175||e>=10176&&e<=10180||10181===e||10182===e||e>=10183&&e<=10213||10214===e||10215===e||10216===e||10217===e||10218===e||10219===e||10220===e||10221===e||10222===e||10223===e||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||10627===e||10628===e||10629===e||10630===e||10631===e||10632===e||10633===e||10634===e||10635===e||10636===e||10637===e||10638===e||10639===e||10640===e||10641===e||10642===e||10643===e||10644===e||10645===e||10646===e||10647===e||10648===e||e>=10649&&e<=10711||10712===e||10713===e||10714===e||10715===e||e>=10716&&e<=10747||10748===e||10749===e||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||11158===e||e>=11159&&e<=11263||e>=11776&&e<=11777||11778===e||11779===e||11780===e||11781===e||e>=11782&&e<=11784||11785===e||11786===e||11787===e||11788===e||11789===e||e>=11790&&e<=11798||11799===e||e>=11800&&e<=11801||11802===e||11803===e||11804===e||11805===e||e>=11806&&e<=11807||11808===e||11809===e||11810===e||11811===e||11812===e||11813===e||11814===e||11815===e||11816===e||11817===e||e>=11818&&e<=11822||11823===e||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||11840===e||11841===e||11842===e||e>=11843&&e<=11855||e>=11856&&e<=11857||11858===e||e>=11859&&e<=11903||e>=12289&&e<=12291||12296===e||12297===e||12298===e||12299===e||12300===e||12301===e||12302===e||12303===e||12304===e||12305===e||e>=12306&&e<=12307||12308===e||12309===e||12310===e||12311===e||12312===e||12313===e||12314===e||12315===e||12316===e||12317===e||e>=12318&&e<=12319||12320===e||12336===e||64830===e||64831===e||e>=65093&&e<=65094}function Ee(e){e.forEach((function(e){if(delete e.location,B(e)||v(e))for(var t in e.options)delete e.options[t].location,Ee(e.options[t].value);else H(e)&&A(e.style)||(y(e)||T(e))&&L(e.style)?delete e.style.location:_(e)&&Ee(e.children)}))}function me(e,t){void 0===t&&(t={}),t=r({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new ce(e,t).parse();if(n.err){var i=SyntaxError(l[n.err.kind]);throw i.location=n.err.location,i.originalMessage=n.err.message,i}return(null==t?void 0:t.captureLocation)||Ee(n.val),n.val}!function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"}(ue||(ue={}));var ge,be=function(e){function r(t,r,n){var i=e.call(this,t)||this;return i.code=r,i.originalMessage=n,i}return t(r,e),r.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},r}(Error),He=function(e){function r(t,r,n,i){return e.call(this,'Invalid values for "'.concat(t,'": "').concat(r,'". Options are "').concat(Object.keys(n).join('", "'),'"'),ue.INVALID_VALUE,i)||this}return t(r,e),r}(be),ye=function(e){function r(t,r,n){return e.call(this,'Value for "'.concat(t,'" must be of type ').concat(r),ue.INVALID_VALUE,n)||this}return t(r,e),r}(be),Te=function(e){function r(t,r){return e.call(this,'The intl string context variable "'.concat(t,'" was not provided to the string "').concat(r,'"'),ue.MISSING_VALUE,r)||this}return t(r,e),r}(be);function Be(e){return"function"==typeof e}function ve(e,t,r,n,i,o,h){if(1===e.length&&g(e[0]))return[{type:ge.literal,value:e[0].value}];for(var s=[],a=0,u=e;a<u.length;a++){var c=u[a];if(g(c))s.push({type:ge.literal,value:c.value});else if(d(c))"number"==typeof o&&s.push({type:ge.literal,value:r.getNumberFormat(t).format(o)});else{var l=c.value;if(!i||!(l in i))throw new Te(l,h);var p=i[l];if(b(c))p&&"string"!=typeof p&&"number"!=typeof p||(p="string"==typeof p||"number"==typeof p?String(p):""),s.push({type:"string"==typeof p?ge.literal:ge.object,value:p});else if(y(c)){var f="string"==typeof c.style?n.date[c.style]:L(c.style)?c.style.parsedOptions:void 0;s.push({type:ge.literal,value:r.getDateTimeFormat(t,f).format(p)})}else if(T(c)){f="string"==typeof c.style?n.time[c.style]:L(c.style)?c.style.parsedOptions:n.time.medium;s.push({type:ge.literal,value:r.getDateTimeFormat(t,f).format(p)})}else if(H(c)){(f="string"==typeof c.style?n.number[c.style]:A(c.style)?c.style.parsedOptions:void 0)&&f.scale&&(p*=f.scale||1),s.push({type:ge.literal,value:r.getNumberFormat(t,f).format(p)})}else{if(_(c)){var E=c.children,m=c.value,P=i[m];if(!Be(P))throw new ye(m,"function",h);var S=P(ve(E,t,r,n,i,o).map((function(e){return e.value})));Array.isArray(S)||(S=[S]),s.push.apply(s,S.map((function(e){return{type:"string"==typeof e?ge.literal:ge.object,value:e}})))}if(B(c)){if(!(N=c.options[p]||c.options.other))throw new He(c.value,p,Object.keys(c.options),h);s.push.apply(s,ve(N.value,t,r,n,i))}else if(v(c)){var N;if(!(N=c.options["=".concat(p)])){if(!Intl.PluralRules)throw new be('Intl.PluralRules is not available in this environment.\nTry polyfilling it using "@formatjs/intl-pluralrules"\n',ue.MISSING_INTL_API,h);var I=r.getPluralRules(t,{type:c.pluralType}).select(p-(c.offset||0));N=c.options[I]||c.options.other}if(!N)throw new He(c.value,p,Object.keys(c.options),h);s.push.apply(s,ve(N.value,t,r,n,i,p-(c.offset||0)))}else;}}}return function(e){return e.length<2?e:e.reduce((function(e,t){var r=e[e.length-1];return r&&r.type===ge.literal&&t.type===ge.literal?r.value+=t.value:e.push(t),e}),[])}(s)}function de(e,t){return t?Object.keys(e).reduce((function(n,i){var o,h;return n[i]=(o=e[i],(h=t[i])?r(r(r({},o||{}),h||{}),Object.keys(o).reduce((function(e,t){return e[t]=r(r({},o[t]),h[t]||{}),e}),{})):o),n}),r({},e)):e}function _e(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,r){e[t]=r}}}}}!function(e){e[e.literal=0]="literal",e[e.object=1]="object"}(ge||(ge={}));var Ae=function(){function e(t,o,h,s){void 0===o&&(o=e.defaultLocale);var a,u=this;if(this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(e){var t=u.formatToParts(e);if(1===t.length)return t[0].value;var r=t.reduce((function(e,t){return e.length&&t.type===ge.literal&&"string"==typeof e[e.length-1]?e[e.length-1]+=t.value:e.push(t.value),e}),[]);return r.length<=1?r[0]||"":r},this.formatToParts=function(e){return ve(u.ast,u.locales,u.formatters,u.formats,e,void 0,u.message)},this.resolvedOptions=function(){var e;return{locale:(null===(e=u.resolvedLocale)||void 0===e?void 0:e.toString())||Intl.NumberFormat.supportedLocalesOf(u.locales)[0]}},this.getAst=function(){return u.ast},this.locales=o,this.resolvedLocale=e.resolveLocale(o),"string"==typeof t){if(this.message=t,!e.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");var c=s||{};c.formatters;var l=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r}(c,["formatters"]);this.ast=e.__parse(t,r(r({},l),{locale:this.resolvedLocale}))}else this.ast=t;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=de(e.formats,h),this.formatters=s&&s.formatters||(void 0===(a=this.formatterCache)&&(a={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:i((function(){for(var e,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return new((e=Intl.NumberFormat).bind.apply(e,n([void 0],t,!1)))}),{cache:_e(a.number),strategy:m.variadic}),getDateTimeFormat:i((function(){for(var e,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return new((e=Intl.DateTimeFormat).bind.apply(e,n([void 0],t,!1)))}),{cache:_e(a.dateTime),strategy:m.variadic}),getPluralRules:i((function(){for(var e,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return new((e=Intl.PluralRules).bind.apply(e,n([void 0],t,!1)))}),{cache:_e(a.pluralRules),strategy:m.variadic})})}return Object.defineProperty(e,"defaultLocale",{get:function(){return e.memoizedDefaultLocale||(e.memoizedDefaultLocale=(new Intl.NumberFormat).resolvedOptions().locale),e.memoizedDefaultLocale},enumerable:!1,configurable:!0}),e.memoizedDefaultLocale=null,e.resolveLocale=function(e){if(void 0!==Intl.Locale){var t=Intl.NumberFormat.supportedLocalesOf(e);return t.length>0?new Intl.Locale(t[0]):new Intl.Locale("string"==typeof e?e:e[0])}},e.__parse=me,e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},e}(),Le=Ae;const Pe=()=>(e,t)=>(t.setFinalFormatter((()=>{const e=new Map;function t(e){try{return Boolean(Intl.NumberFormat.supportedLocalesOf(e).length)}catch(e){return!1}}function r(r){if(!e.get(r)){let n=String(r).replace(/[^a-zA-Z]/g,"-");for(;!t(n);)n=n.split("-").slice(0,-1).join("-")||"en";e.set(r,n)}return e.get(r)}return Object.freeze({getLanguage:r,format:({translation:e,language:t,params:n})=>{const i=!Object.values(n||{}).find((e=>"function"==typeof e)),o=r(t);return new Le(e,o,void 0,{ignoreTag:i}).format(n)}})})()),e);export{Pe as FormatIcu};
var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};function t(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}var r,n,i,o=function(){return o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},o.apply(this,arguments)};function h(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}function s(e){return e.type===n.literal}function a(e){return e.type===n.argument}function u(e){return e.type===n.number}function c(e){return e.type===n.date}function l(e){return e.type===n.time}function p(e){return e.type===n.select}function f(e){return e.type===n.plural}function E(e){return e.type===n.pound}function m(e){return e.type===n.tag}function g(e){return!(!e||"object"!=typeof e||e.type!==i.number)}function b(e){return!(!e||"object"!=typeof e||e.type!==i.dateTime)}!function(e){e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",e[e.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",e[e.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",e[e.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",e[e.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",e[e.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",e[e.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",e[e.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",e[e.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",e[e.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",e[e.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",e[e.INVALID_TAG=23]="INVALID_TAG",e[e.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",e[e.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",e[e.UNCLOSED_TAG=27]="UNCLOSED_TAG"}(r||(r={})),function(e){e[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound",e[e.tag=8]="tag"}(n||(n={})),function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"}(i||(i={}));var H=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,y=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function T(e){var t={};return e.replace(y,(function(e){var r=e.length;switch(e[0]){case"G":t.era=4===r?"long":5===r?"narrow":"short";break;case"y":t.year=2===r?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":t.month=["numeric","2-digit","short","long","narrow"][r-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":t.day=["numeric","2-digit"][r-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":t.weekday=4===r?"short":5===r?"narrow":"short";break;case"e":if(r<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][r-4];break;case"c":if(r<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][r-4];break;case"a":t.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":t.hourCycle="h12",t.hour=["numeric","2-digit"][r-1];break;case"H":t.hourCycle="h23",t.hour=["numeric","2-digit"][r-1];break;case"K":t.hourCycle="h11",t.hour=["numeric","2-digit"][r-1];break;case"k":t.hourCycle="h24",t.hour=["numeric","2-digit"][r-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":t.minute=["numeric","2-digit"][r-1];break;case"s":t.second=["numeric","2-digit"][r-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":t.timeZoneName=r<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""})),t}var B=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;var v=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,_=/^(@+)?(\+|#+)?[rs]?$/g,A=/(\*)(0+)|(#+)(0+)|(0+)/g,d=/^(0+)$/;function L(e){var t={};return"r"===e[e.length-1]?t.roundingPriority="morePrecision":"s"===e[e.length-1]&&(t.roundingPriority="lessPrecision"),e.replace(_,(function(e,r,n){return"string"!=typeof n?(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length):"+"===n?t.minimumSignificantDigits=r.length:"#"===r[0]?t.maximumSignificantDigits=r.length:(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length+("string"==typeof n?n.length:0)),""})),t}function P(e){switch(e){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function S(e){var t;if("E"===e[0]&&"E"===e[1]?(t={notation:"engineering"},e=e.slice(2)):"E"===e[0]&&(t={notation:"scientific"},e=e.slice(1)),t){var r=e.slice(0,2);if("+!"===r?(t.signDisplay="always",e=e.slice(2)):"+?"===r&&(t.signDisplay="exceptZero",e=e.slice(2)),!d.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function N(e){var t=P(e);return t||{}}function I(e){for(var t={},r=0,n=e;r<n.length;r++){var i=n[r];switch(i.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=i.options[0];continue;case"group-off":case",_":t.useGrouping=!1;continue;case"precision-integer":case".":t.maximumFractionDigits=0;continue;case"measure-unit":case"unit":t.style="unit",t.unit=i.options[0].replace(/^(.*?)-/,"");continue;case"compact-short":case"K":t.notation="compact",t.compactDisplay="short";continue;case"compact-long":case"KK":t.notation="compact",t.compactDisplay="long";continue;case"scientific":t=o(o(o({},t),{notation:"scientific"}),i.options.reduce((function(e,t){return o(o({},e),N(t))}),{}));continue;case"engineering":t=o(o(o({},t),{notation:"engineering"}),i.options.reduce((function(e,t){return o(o({},e),N(t))}),{}));continue;case"notation-simple":t.notation="standard";continue;case"unit-width-narrow":t.currencyDisplay="narrowSymbol",t.unitDisplay="narrow";continue;case"unit-width-short":t.currencyDisplay="code",t.unitDisplay="short";continue;case"unit-width-full-name":t.currencyDisplay="name",t.unitDisplay="long";continue;case"unit-width-iso-code":t.currencyDisplay="symbol";continue;case"scale":t.scale=parseFloat(i.options[0]);continue;case"integer-width":if(i.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");i.options[0].replace(A,(function(e,r,n,i,o,h){if(r)t.minimumIntegerDigits=n.length;else{if(i&&o)throw new Error("We currently do not support maximum integer digits");if(h)throw new Error("We currently do not support exact integer digits")}return""}));continue}if(d.test(i.stem))t.minimumIntegerDigits=i.stem.length;else if(v.test(i.stem)){if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(v,(function(e,r,n,i,o,h){return"*"===n?t.minimumFractionDigits=r.length:i&&"#"===i[0]?t.maximumFractionDigits=i.length:o&&h?(t.minimumFractionDigits=o.length,t.maximumFractionDigits=o.length+h.length):(t.minimumFractionDigits=r.length,t.maximumFractionDigits=r.length),""}));var h=i.options[0];"w"===h?t=o(o({},t),{trailingZeroDisplay:"stripIfInteger"}):h&&(t=o(o({},t),L(h)))}else if(_.test(i.stem))t=o(o({},t),L(i.stem));else{var s=P(i.stem);s&&(t=o(o({},t),s));var a=S(i.stem);a&&(t=o(o({},t),a))}}return t}var C,R={AX:["H"],BQ:["H"],CP:["H"],CZ:["H"],DK:["H"],FI:["H"],ID:["H"],IS:["H"],ML:["H"],NE:["H"],RU:["H"],SE:["H"],SJ:["H"],SK:["H"],AS:["h","H"],BT:["h","H"],DJ:["h","H"],ER:["h","H"],GH:["h","H"],IN:["h","H"],LS:["h","H"],PG:["h","H"],PW:["h","H"],SO:["h","H"],TO:["h","H"],VU:["h","H"],WS:["h","H"],"001":["H","h"],AL:["h","H","hB"],TD:["h","H","hB"],"ca-ES":["H","h","hB"],CF:["H","h","hB"],CM:["H","h","hB"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],LU:["H","h","hB"],NP:["H","h","hB"],PF:["H","h","hB"],SC:["H","h","hB"],SM:["H","h","hB"],SN:["H","h","hB"],TF:["H","h","hB"],VA:["H","h","hB"],CY:["h","H","hb","hB"],GR:["h","H","hb","hB"],CO:["h","H","hB","hb"],DO:["h","H","hB","hb"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],NA:["h","H","hB","hb"],PA:["h","H","hB","hb"],PR:["h","H","hB","hb"],VE:["h","H","hB","hb"],AC:["H","h","hb","hB"],AI:["H","h","hb","hB"],BW:["H","h","hb","hB"],BZ:["H","h","hb","hB"],CC:["H","h","hb","hB"],CK:["H","h","hb","hB"],CX:["H","h","hb","hB"],DG:["H","h","hb","hB"],FK:["H","h","hb","hB"],GB:["H","h","hb","hB"],GG:["H","h","hb","hB"],GI:["H","h","hb","hB"],IE:["H","h","hb","hB"],IM:["H","h","hb","hB"],IO:["H","h","hb","hB"],JE:["H","h","hb","hB"],LT:["H","h","hb","hB"],MK:["H","h","hb","hB"],MN:["H","h","hb","hB"],MS:["H","h","hb","hB"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],PN:["H","h","hb","hB"],SH:["H","h","hb","hB"],SX:["H","h","hb","hB"],TA:["H","h","hb","hB"],ZA:["H","h","hb","hB"],"af-ZA":["H","h","hB","hb"],AR:["H","h","hB","hb"],CL:["H","h","hB","hb"],CR:["H","h","hB","hb"],CU:["H","h","hB","hb"],EA:["H","h","hB","hb"],"es-BO":["H","h","hB","hb"],"es-BR":["H","h","hB","hb"],"es-EC":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"es-PE":["H","h","hB","hb"],GT:["H","h","hB","hb"],HN:["H","h","hB","hb"],IC:["H","h","hB","hb"],KG:["H","h","hB","hb"],KM:["H","h","hB","hb"],LK:["H","h","hB","hb"],MA:["H","h","hB","hb"],MX:["H","h","hB","hb"],NI:["H","h","hB","hb"],PY:["H","h","hB","hb"],SV:["H","h","hB","hb"],UY:["H","h","hB","hb"],JP:["H","h","K"],AD:["H","hB"],AM:["H","hB"],AO:["H","hB"],AT:["H","hB"],AW:["H","hB"],BE:["H","hB"],BF:["H","hB"],BJ:["H","hB"],BL:["H","hB"],BR:["H","hB"],CG:["H","hB"],CI:["H","hB"],CV:["H","hB"],DE:["H","hB"],EE:["H","hB"],FR:["H","hB"],GA:["H","hB"],GF:["H","hB"],GN:["H","hB"],GP:["H","hB"],GW:["H","hB"],HR:["H","hB"],IL:["H","hB"],IT:["H","hB"],KZ:["H","hB"],MC:["H","hB"],MD:["H","hB"],MF:["H","hB"],MQ:["H","hB"],MZ:["H","hB"],NC:["H","hB"],NL:["H","hB"],PM:["H","hB"],PT:["H","hB"],RE:["H","hB"],RO:["H","hB"],SI:["H","hB"],SR:["H","hB"],ST:["H","hB"],TG:["H","hB"],TR:["H","hB"],WF:["H","hB"],YT:["H","hB"],BD:["h","hB","H"],PK:["h","hB","H"],AZ:["H","hB","h"],BA:["H","hB","h"],BG:["H","hB","h"],CH:["H","hB","h"],GE:["H","hB","h"],LI:["H","hB","h"],ME:["H","hB","h"],RS:["H","hB","h"],UA:["H","hB","h"],UZ:["H","hB","h"],XK:["H","hB","h"],AG:["h","hb","H","hB"],AU:["h","hb","H","hB"],BB:["h","hb","H","hB"],BM:["h","hb","H","hB"],BS:["h","hb","H","hB"],CA:["h","hb","H","hB"],DM:["h","hb","H","hB"],"en-001":["h","hb","H","hB"],FJ:["h","hb","H","hB"],FM:["h","hb","H","hB"],GD:["h","hb","H","hB"],GM:["h","hb","H","hB"],GU:["h","hb","H","hB"],GY:["h","hb","H","hB"],JM:["h","hb","H","hB"],KI:["h","hb","H","hB"],KN:["h","hb","H","hB"],KY:["h","hb","H","hB"],LC:["h","hb","H","hB"],LR:["h","hb","H","hB"],MH:["h","hb","H","hB"],MP:["h","hb","H","hB"],MW:["h","hb","H","hB"],NZ:["h","hb","H","hB"],SB:["h","hb","H","hB"],SG:["h","hb","H","hB"],SL:["h","hb","H","hB"],SS:["h","hb","H","hB"],SZ:["h","hb","H","hB"],TC:["h","hb","H","hB"],TT:["h","hb","H","hB"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],VC:["h","hb","H","hB"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],ZM:["h","hb","H","hB"],BO:["H","hB","h","hb"],EC:["H","hB","h","hb"],ES:["H","hB","h","hb"],GQ:["H","hB","h","hb"],PE:["H","hB","h","hb"],AE:["h","hB","hb","H"],"ar-001":["h","hB","hb","H"],BH:["h","hB","hb","H"],DZ:["h","hB","hb","H"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],HK:["h","hB","hb","H"],IQ:["h","hB","hb","H"],JO:["h","hB","hb","H"],KW:["h","hB","hb","H"],LB:["h","hB","hb","H"],LY:["h","hB","hb","H"],MO:["h","hB","hb","H"],MR:["h","hB","hb","H"],OM:["h","hB","hb","H"],PH:["h","hB","hb","H"],PS:["h","hB","hb","H"],QA:["h","hB","hb","H"],SA:["h","hB","hb","H"],SD:["h","hB","hb","H"],SY:["h","hB","hb","H"],TN:["h","hB","hb","H"],YE:["h","hB","hb","H"],AF:["H","hb","hB","h"],LA:["H","hb","hB","h"],CN:["H","hB","hb","h"],LV:["H","hB","hb","h"],TL:["H","hB","hb","h"],"zu-ZA":["H","hB","hb","h"],CD:["hB","H"],IR:["hB","H"],"hi-IN":["hB","h","H"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"te-IN":["hB","h","H"],KH:["hB","h","H","hb"],"ta-IN":["hB","h","hb","H"],BN:["hb","hB","h","H"],MY:["hb","hB","h","H"],ET:["hB","hb","h","H"],"gu-IN":["hB","hb","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],TW:["hB","hb","h","H"],KE:["hB","hb","H","h"],MM:["hB","hb","H","h"],TZ:["hB","hb","H","h"],UG:["hB","hb","H","h"]};function O(e){var t=e.hourCycle;if(void 0===t&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var r,n=e.language;return"root"!==n&&(r=e.maximize().region),(R[r||""]||R[n||""]||R["".concat(n,"-001")]||R["001"])[0]}var M=new RegExp("^".concat(H.source,"*")),U=new RegExp("".concat(H.source,"*$"));function G(e,t){return{start:e,end:t}}var w=!!String.prototype.startsWith,D=!!String.fromCodePoint,F=!!Object.fromEntries,k=!!String.prototype.codePointAt,V=!!String.prototype.trimStart,X=!!String.prototype.trimEnd,K=!!Number.isSafeInteger?Number.isSafeInteger:function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},x=!0;try{x="a"===(null===(C=q("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu").exec("a"))||void 0===C?void 0:C[0])}catch(e){x=!1}var j,Y=w?function(e,t,r){return e.startsWith(t,r)}:function(e,t,r){return e.slice(r,r+t.length)===t},Z=D?String.fromCodePoint:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r,n="",i=e.length,o=0;i>o;){if((r=e[o++])>1114111)throw RangeError(r+" is not a valid code point");n+=r<65536?String.fromCharCode(r):String.fromCharCode(55296+((r-=65536)>>10),r%1024+56320)}return n},z=F?Object.fromEntries:function(e){for(var t={},r=0,n=e;r<n.length;r++){var i=n[r],o=i[0],h=i[1];t[o]=h}return t},W=k?function(e,t){return e.codePointAt(t)}:function(e,t){var r=e.length;if(!(t<0||t>=r)){var n,i=e.charCodeAt(t);return i<55296||i>56319||t+1===r||(n=e.charCodeAt(t+1))<56320||n>57343?i:n-56320+(i-55296<<10)+65536}},Q=V?function(e){return e.trimStart()}:function(e){return e.replace(M,"")},J=X?function(e){return e.trimEnd()}:function(e){return e.replace(U,"")};function q(e,t){return new RegExp(e,t)}if(x){var $=q("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");j=function(e,t){var r;return $.lastIndex=t,null!==(r=$.exec(e)[1])&&void 0!==r?r:""}}else j=function(e,t){for(var r=[];;){var n=W(e,t);if(void 0===n||re(n)||ne(n))break;r.push(n),t+=n>=65536?2:1}return Z.apply(void 0,r)};var ee=function(){function e(e,t){void 0===t&&(t={}),this.message=e,this.position={offset:0,line:1,column:1},this.ignoreTag=!!t.ignoreTag,this.locale=t.locale,this.requiresOtherClause=!!t.requiresOtherClause,this.shouldParseSkeletons=!!t.shouldParseSkeletons}return e.prototype.parse=function(){if(0!==this.offset())throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(e,t,i){for(var o=[];!this.isEOF();){var h=this.char();if(123===h){if((s=this.parseArgument(e,i)).err)return s;o.push(s.val)}else{if(125===h&&e>0)break;if(35!==h||"plural"!==t&&"selectordinal"!==t){if(60===h&&!this.ignoreTag&&47===this.peek()){if(i)break;return this.error(r.UNMATCHED_CLOSING_TAG,G(this.clonePosition(),this.clonePosition()))}if(60===h&&!this.ignoreTag&&te(this.peek()||0)){if((s=this.parseTag(e,t)).err)return s;o.push(s.val)}else{var s;if((s=this.parseLiteral(e,t)).err)return s;o.push(s.val)}}else{var a=this.clonePosition();this.bump(),o.push({type:n.pound,location:G(a,this.clonePosition())})}}}return{val:o,err:null}},e.prototype.parseTag=function(e,t){var i=this.clonePosition();this.bump();var o=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:n.literal,value:"<".concat(o,"/>"),location:G(i,this.clonePosition())},err:null};if(this.bumpIf(">")){var h=this.parseMessage(e+1,t,!0);if(h.err)return h;var s=h.val,a=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!te(this.char()))return this.error(r.INVALID_TAG,G(a,this.clonePosition()));var u=this.clonePosition();return o!==this.parseTagName()?this.error(r.UNMATCHED_CLOSING_TAG,G(u,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:n.tag,value:o,children:s,location:G(i,this.clonePosition())},err:null}:this.error(r.INVALID_TAG,G(a,this.clonePosition())))}return this.error(r.UNCLOSED_TAG,G(i,this.clonePosition()))}return this.error(r.INVALID_TAG,G(i,this.clonePosition()))},e.prototype.parseTagName=function(){var e,t=this.offset();for(this.bump();!this.isEOF()&&(45===(e=this.char())||46===e||e>=48&&e<=57||95===e||e>=97&&e<=122||e>=65&&e<=90||183==e||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039);)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(e,t){for(var r=this.clonePosition(),i="";;){var o=this.tryParseQuote(t);if(o)i+=o;else{var h=this.tryParseUnquoted(e,t);if(h)i+=h;else{var s=this.tryParseLeftAngleBracket();if(!s)break;i+=s}}}var a=G(r,this.clonePosition());return{val:{type:n.literal,value:i,location:a},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return this.isEOF()||60!==this.char()||!this.ignoreTag&&(te(e=this.peek()||0)||47===e)?null:(this.bump(),"<");var e},e.prototype.tryParseQuote=function(e){if(this.isEOF()||39!==this.char())return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if("plural"===e||"selectordinal"===e)break;return null;default:return null}this.bump();var t=[this.char()];for(this.bump();!this.isEOF();){var r=this.char();if(39===r){if(39!==this.peek()){this.bump();break}t.push(39),this.bump()}else t.push(r);this.bump()}return Z.apply(void 0,t)},e.prototype.tryParseUnquoted=function(e,t){if(this.isEOF())return null;var r=this.char();return 60===r||123===r||35===r&&("plural"===t||"selectordinal"===t)||125===r&&e>0?null:(this.bump(),Z(r))},e.prototype.parseArgument=function(e,t){var i=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(r.EXPECT_ARGUMENT_CLOSING_BRACE,G(i,this.clonePosition()));if(125===this.char())return this.bump(),this.error(r.EMPTY_ARGUMENT,G(i,this.clonePosition()));var o=this.parseIdentifierIfPossible().value;if(!o)return this.error(r.MALFORMED_ARGUMENT,G(i,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(r.EXPECT_ARGUMENT_CLOSING_BRACE,G(i,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:n.argument,value:o,location:G(i,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(r.EXPECT_ARGUMENT_CLOSING_BRACE,G(i,this.clonePosition())):this.parseArgumentOptions(e,t,o,i);default:return this.error(r.MALFORMED_ARGUMENT,G(i,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var e=this.clonePosition(),t=this.offset(),r=j(this.message,t),n=t+r.length;return this.bumpTo(n),{value:r,location:G(e,this.clonePosition())}},e.prototype.parseArgumentOptions=function(e,t,h,s){var a,u=this.clonePosition(),c=this.parseIdentifierIfPossible().value,l=this.clonePosition();switch(c){case"":return this.error(r.EXPECT_ARGUMENT_TYPE,G(u,l));case"number":case"date":case"time":this.bumpSpace();var p=null;if(this.bumpIf(",")){this.bumpSpace();var f=this.clonePosition();if((v=this.parseSimpleArgStyleIfPossible()).err)return v;if(0===(b=J(v.val)).length)return this.error(r.EXPECT_ARGUMENT_STYLE,G(this.clonePosition(),this.clonePosition()));p={style:b,styleLocation:G(f,this.clonePosition())}}if((_=this.tryParseArgumentClose(s)).err)return _;var E=G(s,this.clonePosition());if(p&&Y(null==p?void 0:p.style,"::",0)){var m=Q(p.style.slice(2));if("number"===c)return(v=this.parseNumberSkeletonFromString(m,p.styleLocation)).err?v:{val:{type:n.number,value:h,location:E,style:v.val},err:null};if(0===m.length)return this.error(r.EXPECT_DATE_TIME_SKELETON,E);var g=m;this.locale&&(g=function(e,t){for(var r="",n=0;n<e.length;n++){var i=e.charAt(n);if("j"===i){for(var o=0;n+1<e.length&&e.charAt(n+1)===i;)o++,n++;var h=1+(1&o),s=o<2?1:3+(o>>1),a=O(t);for("H"!=a&&"k"!=a||(s=0);s-- >0;)r+="a";for(;h-- >0;)r=a+r}else r+="J"===i?"H":i}return r}(m,this.locale));var b={type:i.dateTime,pattern:g,location:p.styleLocation,parsedOptions:this.shouldParseSkeletons?T(g):{}};return{val:{type:"date"===c?n.date:n.time,value:h,location:E,style:b},err:null}}return{val:{type:"number"===c?n.number:"date"===c?n.date:n.time,value:h,location:E,style:null!==(a=null==p?void 0:p.style)&&void 0!==a?a:null},err:null};case"plural":case"selectordinal":case"select":var H=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(r.EXPECT_SELECT_ARGUMENT_OPTIONS,G(H,o({},H)));this.bumpSpace();var y=this.parseIdentifierIfPossible(),B=0;if("select"!==c&&"offset"===y.value){if(!this.bumpIf(":"))return this.error(r.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,G(this.clonePosition(),this.clonePosition()));var v;if(this.bumpSpace(),(v=this.tryParseDecimalInteger(r.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,r.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE)).err)return v;this.bumpSpace(),y=this.parseIdentifierIfPossible(),B=v.val}var _,A=this.tryParsePluralOrSelectOptions(e,c,t,y);if(A.err)return A;if((_=this.tryParseArgumentClose(s)).err)return _;var d=G(s,this.clonePosition());return"select"===c?{val:{type:n.select,value:h,options:z(A.val),location:d},err:null}:{val:{type:n.plural,value:h,options:z(A.val),offset:B,pluralType:"plural"===c?"cardinal":"ordinal",location:d},err:null};default:return this.error(r.INVALID_ARGUMENT_TYPE,G(u,l))}},e.prototype.tryParseArgumentClose=function(e){return this.isEOF()||125!==this.char()?this.error(r.EXPECT_ARGUMENT_CLOSING_BRACE,G(e,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var e=0,t=this.clonePosition();!this.isEOF();){switch(this.char()){case 39:this.bump();var n=this.clonePosition();if(!this.bumpUntil("'"))return this.error(r.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,G(n,this.clonePosition()));this.bump();break;case 123:e+=1,this.bump();break;case 125:if(!(e>0))return{val:this.message.slice(t.offset,this.offset()),err:null};e-=1;break;default:this.bump()}}return{val:this.message.slice(t.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(e,t){var n=[];try{n=function(e){if(0===e.length)throw new Error("Number skeleton cannot be empty");for(var t=[],r=0,n=e.split(B).filter((function(e){return e.length>0}));r<n.length;r++){var i=n[r].split("/");if(0===i.length)throw new Error("Invalid number skeleton");for(var o=i[0],h=i.slice(1),s=0,a=h;s<a.length;s++)if(0===a[s].length)throw new Error("Invalid number skeleton");t.push({stem:o,options:h})}return t}(e)}catch(e){return this.error(r.INVALID_NUMBER_SKELETON,t)}return{val:{type:i.number,tokens:n,location:t,parsedOptions:this.shouldParseSkeletons?I(n):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(e,t,n,i){for(var o,h=!1,s=[],a=new Set,u=i.value,c=i.location;;){if(0===u.length){var l=this.clonePosition();if("select"===t||!this.bumpIf("="))break;var p=this.tryParseDecimalInteger(r.EXPECT_PLURAL_ARGUMENT_SELECTOR,r.INVALID_PLURAL_ARGUMENT_SELECTOR);if(p.err)return p;c=G(l,this.clonePosition()),u=this.message.slice(l.offset,this.offset())}if(a.has(u))return this.error("select"===t?r.DUPLICATE_SELECT_ARGUMENT_SELECTOR:r.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,c);"other"===u&&(h=!0),this.bumpSpace();var f=this.clonePosition();if(!this.bumpIf("{"))return this.error("select"===t?r.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:r.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,G(this.clonePosition(),this.clonePosition()));var E=this.parseMessage(e+1,t,n);if(E.err)return E;var m=this.tryParseArgumentClose(f);if(m.err)return m;s.push([u,{value:E.val,location:G(f,this.clonePosition())}]),a.add(u),this.bumpSpace(),u=(o=this.parseIdentifierIfPossible()).value,c=o.location}return 0===s.length?this.error("select"===t?r.EXPECT_SELECT_ARGUMENT_SELECTOR:r.EXPECT_PLURAL_ARGUMENT_SELECTOR,G(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!h?this.error(r.MISSING_OTHER_CLAUSE,G(this.clonePosition(),this.clonePosition())):{val:s,err:null}},e.prototype.tryParseDecimalInteger=function(e,t){var r=1,n=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(r=-1);for(var i=!1,o=0;!this.isEOF();){var h=this.char();if(!(h>=48&&h<=57))break;i=!0,o=10*o+(h-48),this.bump()}var s=G(n,this.clonePosition());return i?K(o*=r)?{val:o,err:null}:this.error(t,s):this.error(e,s)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var e=this.position.offset;if(e>=this.message.length)throw Error("out of bound");var t=W(this.message,e);if(void 0===t)throw Error("Offset ".concat(e," is at invalid UTF-16 code unit boundary"));return t},e.prototype.error=function(e,t){return{val:null,err:{kind:e,message:this.message,location:t}}},e.prototype.bump=function(){if(!this.isEOF()){var e=this.char();10===e?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=e<65536?1:2)}},e.prototype.bumpIf=function(e){if(Y(this.message,e,this.offset())){for(var t=0;t<e.length;t++)this.bump();return!0}return!1},e.prototype.bumpUntil=function(e){var t=this.offset(),r=this.message.indexOf(e,t);return r>=0?(this.bumpTo(r),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(e){if(this.offset()>e)throw Error("targetOffset ".concat(e," must be greater than or equal to the current offset ").concat(this.offset()));for(e=Math.min(e,this.message.length);;){var t=this.offset();if(t===e)break;if(t>e)throw Error("targetOffset ".concat(e," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&re(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var e=this.char(),t=this.offset(),r=this.message.charCodeAt(t+(e>=65536?2:1));return null!=r?r:null},e}();function te(e){return e>=97&&e<=122||e>=65&&e<=90}function re(e){return e>=9&&e<=13||32===e||133===e||e>=8206&&e<=8207||8232===e||8233===e}function ne(e){return e>=33&&e<=35||36===e||e>=37&&e<=39||40===e||41===e||42===e||43===e||44===e||45===e||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||91===e||92===e||93===e||94===e||96===e||123===e||124===e||125===e||126===e||161===e||e>=162&&e<=165||166===e||167===e||169===e||171===e||172===e||174===e||176===e||177===e||182===e||187===e||191===e||215===e||247===e||e>=8208&&e<=8213||e>=8214&&e<=8215||8216===e||8217===e||8218===e||e>=8219&&e<=8220||8221===e||8222===e||8223===e||e>=8224&&e<=8231||e>=8240&&e<=8248||8249===e||8250===e||e>=8251&&e<=8254||e>=8257&&e<=8259||8260===e||8261===e||8262===e||e>=8263&&e<=8273||8274===e||8275===e||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||8608===e||e>=8609&&e<=8610||8611===e||e>=8612&&e<=8613||8614===e||e>=8615&&e<=8621||8622===e||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||8658===e||8659===e||8660===e||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||8968===e||8969===e||8970===e||8971===e||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||9001===e||9002===e||e>=9003&&e<=9083||9084===e||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||9655===e||e>=9656&&e<=9664||9665===e||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||9839===e||e>=9840&&e<=10087||10088===e||10089===e||10090===e||10091===e||10092===e||10093===e||10094===e||10095===e||10096===e||10097===e||10098===e||10099===e||10100===e||10101===e||e>=10132&&e<=10175||e>=10176&&e<=10180||10181===e||10182===e||e>=10183&&e<=10213||10214===e||10215===e||10216===e||10217===e||10218===e||10219===e||10220===e||10221===e||10222===e||10223===e||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||10627===e||10628===e||10629===e||10630===e||10631===e||10632===e||10633===e||10634===e||10635===e||10636===e||10637===e||10638===e||10639===e||10640===e||10641===e||10642===e||10643===e||10644===e||10645===e||10646===e||10647===e||10648===e||e>=10649&&e<=10711||10712===e||10713===e||10714===e||10715===e||e>=10716&&e<=10747||10748===e||10749===e||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||11158===e||e>=11159&&e<=11263||e>=11776&&e<=11777||11778===e||11779===e||11780===e||11781===e||e>=11782&&e<=11784||11785===e||11786===e||11787===e||11788===e||11789===e||e>=11790&&e<=11798||11799===e||e>=11800&&e<=11801||11802===e||11803===e||11804===e||11805===e||e>=11806&&e<=11807||11808===e||11809===e||11810===e||11811===e||11812===e||11813===e||11814===e||11815===e||11816===e||11817===e||e>=11818&&e<=11822||11823===e||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||11840===e||11841===e||11842===e||e>=11843&&e<=11855||e>=11856&&e<=11857||11858===e||e>=11859&&e<=11903||e>=12289&&e<=12291||12296===e||12297===e||12298===e||12299===e||12300===e||12301===e||12302===e||12303===e||12304===e||12305===e||e>=12306&&e<=12307||12308===e||12309===e||12310===e||12311===e||12312===e||12313===e||12314===e||12315===e||12316===e||12317===e||e>=12318&&e<=12319||12320===e||12336===e||64830===e||64831===e||e>=65093&&e<=65094}function ie(e){e.forEach((function(e){if(delete e.location,p(e)||f(e))for(var t in e.options)delete e.options[t].location,ie(e.options[t].value);else u(e)&&g(e.style)||(c(e)||l(e))&&b(e.style)?delete e.style.location:m(e)&&ie(e.children)}))}function oe(e,t){void 0===t&&(t={}),t=o({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new ee(e,t).parse();if(n.err){var i=SyntaxError(r[n.err.kind]);throw i.location=n.err.location,i.originalMessage=n.err.message,i}return(null==t?void 0:t.captureLocation)||ie(n.val),n.val}function he(e,t){var r=t&&t.cache?t.cache:Ee,n=t&&t.serializer?t.serializer:le;return(t&&t.strategy?t.strategy:ce)(e,{cache:r,serializer:n})}function se(e,t,r,n){var i,o=null==(i=n)||"number"==typeof i||"boolean"==typeof i?n:r(n),h=t.get(o);return void 0===h&&(h=e.call(this,n),t.set(o,h)),h}function ae(e,t,r){var n=Array.prototype.slice.call(arguments,3),i=r(n),o=t.get(i);return void 0===o&&(o=e.apply(this,n),t.set(i,o)),o}function ue(e,t,r,n,i){return r.bind(t,e,n,i)}function ce(e,t){return ue(e,this,1===e.length?se:ae,t.cache.create(),t.serializer)}var le=function(){return JSON.stringify(arguments)};function pe(){this.cache=Object.create(null)}pe.prototype.get=function(e){return this.cache[e]},pe.prototype.set=function(e,t){this.cache[e]=t};var fe,Ee={create:function(){return new pe}},me={variadic:function(e,t){return ue(e,this,ae,t.cache.create(),t.serializer)},monadic:function(e,t){return ue(e,this,se,t.cache.create(),t.serializer)}};!function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"}(fe||(fe={}));var ge,be=function(e){function r(t,r,n){var i=e.call(this,t)||this;return i.code=r,i.originalMessage=n,i}return t(r,e),r.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},r}(Error),He=function(e){function r(t,r,n,i){return e.call(this,'Invalid values for "'.concat(t,'": "').concat(r,'". Options are "').concat(Object.keys(n).join('", "'),'"'),fe.INVALID_VALUE,i)||this}return t(r,e),r}(be),ye=function(e){function r(t,r,n){return e.call(this,'Value for "'.concat(t,'" must be of type ').concat(r),fe.INVALID_VALUE,n)||this}return t(r,e),r}(be),Te=function(e){function r(t,r){return e.call(this,'The intl string context variable "'.concat(t,'" was not provided to the string "').concat(r,'"'),fe.MISSING_VALUE,r)||this}return t(r,e),r}(be);function Be(e){return"function"==typeof e}function ve(e,t,r,n,i,o,h){if(1===e.length&&s(e[0]))return[{type:ge.literal,value:e[0].value}];for(var H=[],y=0,T=e;y<T.length;y++){var B=T[y];if(s(B))H.push({type:ge.literal,value:B.value});else if(E(B))"number"==typeof o&&H.push({type:ge.literal,value:r.getNumberFormat(t).format(o)});else{var v=B.value;if(!i||!(v in i))throw new Te(v,h);var _=i[v];if(a(B))_&&"string"!=typeof _&&"number"!=typeof _||(_="string"==typeof _||"number"==typeof _?String(_):""),H.push({type:"string"==typeof _?ge.literal:ge.object,value:_});else if(c(B)){var A="string"==typeof B.style?n.date[B.style]:b(B.style)?B.style.parsedOptions:void 0;H.push({type:ge.literal,value:r.getDateTimeFormat(t,A).format(_)})}else if(l(B)){A="string"==typeof B.style?n.time[B.style]:b(B.style)?B.style.parsedOptions:n.time.medium;H.push({type:ge.literal,value:r.getDateTimeFormat(t,A).format(_)})}else if(u(B)){(A="string"==typeof B.style?n.number[B.style]:g(B.style)?B.style.parsedOptions:void 0)&&A.scale&&(_*=A.scale||1),H.push({type:ge.literal,value:r.getNumberFormat(t,A).format(_)})}else{if(m(B)){var d=B.children,L=B.value,P=i[L];if(!Be(P))throw new ye(L,"function",h);var S=P(ve(d,t,r,n,i,o).map((function(e){return e.value})));Array.isArray(S)||(S=[S]),H.push.apply(H,S.map((function(e){return{type:"string"==typeof e?ge.literal:ge.object,value:e}})))}if(p(B)){if(!(N=B.options[_]||B.options.other))throw new He(B.value,_,Object.keys(B.options),h);H.push.apply(H,ve(N.value,t,r,n,i))}else if(f(B)){var N;if(!(N=B.options["=".concat(_)])){if(!Intl.PluralRules)throw new be('Intl.PluralRules is not available in this environment.\nTry polyfilling it using "@formatjs/intl-pluralrules"\n',fe.MISSING_INTL_API,h);var I=r.getPluralRules(t,{type:B.pluralType}).select(_-(B.offset||0));N=B.options[I]||B.options.other}if(!N)throw new He(B.value,_,Object.keys(B.options),h);H.push.apply(H,ve(N.value,t,r,n,i,_-(B.offset||0)))}else;}}}return function(e){return e.length<2?e:e.reduce((function(e,t){var r=e[e.length-1];return r&&r.type===ge.literal&&t.type===ge.literal?r.value+=t.value:e.push(t),e}),[])}(H)}function _e(e,t){return t?Object.keys(e).reduce((function(r,n){var i,h;return r[n]=(i=e[n],(h=t[n])?o(o(o({},i||{}),h||{}),Object.keys(i).reduce((function(e,t){return e[t]=o(o({},i[t]),h[t]||{}),e}),{})):i),r}),o({},e)):e}function Ae(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,r){e[t]=r}}}}}!function(e){e[e.literal=0]="literal",e[e.object=1]="object"}(ge||(ge={}));var de=function(){function e(t,r,n,i){var o,s=this;if(void 0===r&&(r=e.defaultLocale),this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(e){var t=s.formatToParts(e);if(1===t.length)return t[0].value;var r=t.reduce((function(e,t){return e.length&&t.type===ge.literal&&"string"==typeof e[e.length-1]?e[e.length-1]+=t.value:e.push(t.value),e}),[]);return r.length<=1?r[0]||"":r},this.formatToParts=function(e){return ve(s.ast,s.locales,s.formatters,s.formats,e,void 0,s.message)},this.resolvedOptions=function(){return{locale:s.resolvedLocale.toString()}},this.getAst=function(){return s.ast},this.locales=r,this.resolvedLocale=e.resolveLocale(r),"string"==typeof t){if(this.message=t,!e.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");this.ast=e.__parse(t,{ignoreTag:null==i?void 0:i.ignoreTag,locale:this.resolvedLocale})}else this.ast=t;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=_e(e.formats,n),this.formatters=i&&i.formatters||(void 0===(o=this.formatterCache)&&(o={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:he((function(){for(var e,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return new((e=Intl.NumberFormat).bind.apply(e,h([void 0],t,!1)))}),{cache:Ae(o.number),strategy:me.variadic}),getDateTimeFormat:he((function(){for(var e,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return new((e=Intl.DateTimeFormat).bind.apply(e,h([void 0],t,!1)))}),{cache:Ae(o.dateTime),strategy:me.variadic}),getPluralRules:he((function(){for(var e,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return new((e=Intl.PluralRules).bind.apply(e,h([void 0],t,!1)))}),{cache:Ae(o.pluralRules),strategy:me.variadic})})}return Object.defineProperty(e,"defaultLocale",{get:function(){return e.memoizedDefaultLocale||(e.memoizedDefaultLocale=(new Intl.NumberFormat).resolvedOptions().locale),e.memoizedDefaultLocale},enumerable:!1,configurable:!0}),e.memoizedDefaultLocale=null,e.resolveLocale=function(e){var t=Intl.NumberFormat.supportedLocalesOf(e);return t.length>0?new Intl.Locale(t[0]):new Intl.Locale("string"==typeof e?e:e[0])},e.__parse=oe,e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},e}(),Le=de;const Pe=()=>(e,t)=>(t.setFinalFormatter((()=>{const e=new Map;function t(e){try{return Boolean(Intl.NumberFormat.supportedLocalesOf(e).length)}catch(e){return!1}}function r(r){if(!e.get(r)){let n=String(r).replace(/[^a-zA-Z]/g,"-");for(;!t(n);)n=n.split("-").slice(0,-1).join("-")||"en";e.set(r,n)}return e.get(r)}return Object.freeze({getLanguage:r,format:({translation:e,language:t,params:n})=>{const i=!Object.values(n||{}).find((e=>"function"==typeof e)),o=r(t);return new Le(e,o,void 0,{ignoreTag:i}).format(n)}})})()),e);export{Pe as FormatIcu};
//# sourceMappingURL=tolgee-format-icu.esm.min.js.map

@@ -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="undefined"!=typeof globalThis?globalThis:e||self)["@tolgee/format-icu"]={})}(this,(function(e){"use strict";var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},t(e,r)};function r(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}var n=function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},n.apply(this,arguments)};function i(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}function o(e,t){var r=t&&t.cache?t.cache:m,n=t&&t.serializer?t.serializer:c;return(t&&t.strategy?t.strategy:u)(e,{cache:r,serializer:n})}function h(e,t,r,n){var i,o=null==(i=n)||"number"==typeof i||"boolean"==typeof i?n:r(n),h=t.get(o);return void 0===h&&(h=e.call(this,n),t.set(o,h)),h}function s(e,t,r){var n=Array.prototype.slice.call(arguments,3),i=r(n),o=t.get(i);return void 0===o&&(o=e.apply(this,n),t.set(i,o)),o}function a(e,t,r,n,i){return r.bind(t,e,n,i)}function u(e,t){return a(e,this,1===e.length?h:s,t.cache.create(),t.serializer)}var c=function(){return JSON.stringify(arguments)};function l(){this.cache=Object.create(null)}l.prototype.get=function(e){return this.cache[e]},l.prototype.set=function(e,t){this.cache[e]=t};var p,f,E,m={create:function(){return new l}},g={variadic:function(e,t){return a(e,this,s,t.cache.create(),t.serializer)},monadic:function(e,t){return a(e,this,h,t.cache.create(),t.serializer)}};function b(e){return e.type===f.literal}function H(e){return e.type===f.argument}function y(e){return e.type===f.number}function T(e){return e.type===f.date}function B(e){return e.type===f.time}function d(e){return e.type===f.select}function v(e){return e.type===f.plural}function _(e){return e.type===f.pound}function A(e){return e.type===f.tag}function L(e){return!(!e||"object"!=typeof e||e.type!==E.number)}function P(e){return!(!e||"object"!=typeof e||e.type!==E.dateTime)}!function(e){e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",e[e.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",e[e.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",e[e.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",e[e.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",e[e.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",e[e.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",e[e.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",e[e.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",e[e.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",e[e.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",e[e.INVALID_TAG=23]="INVALID_TAG",e[e.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",e[e.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",e[e.UNCLOSED_TAG=27]="UNCLOSED_TAG"}(p||(p={})),function(e){e[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound",e[e.tag=8]="tag"}(f||(f={})),function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"}(E||(E={}));var S=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,N=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function I(e){var t={};return e.replace(N,(function(e){var r=e.length;switch(e[0]){case"G":t.era=4===r?"long":5===r?"narrow":"short";break;case"y":t.year=2===r?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":t.month=["numeric","2-digit","short","long","narrow"][r-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":t.day=["numeric","2-digit"][r-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":t.weekday=4===r?"long":5===r?"narrow":"short";break;case"e":if(r<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][r-4];break;case"c":if(r<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][r-4];break;case"a":t.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":t.hourCycle="h12",t.hour=["numeric","2-digit"][r-1];break;case"H":t.hourCycle="h23",t.hour=["numeric","2-digit"][r-1];break;case"K":t.hourCycle="h11",t.hour=["numeric","2-digit"][r-1];break;case"k":t.hourCycle="h24",t.hour=["numeric","2-digit"][r-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":t.minute=["numeric","2-digit"][r-1];break;case"s":t.second=["numeric","2-digit"][r-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":t.timeZoneName=r<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""})),t}var C=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;var R=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,M=/^(@+)?(\+|#+)?[rs]?$/g,O=/(\*)(0+)|(#+)(0+)|(0+)/g,U=/^(0+)$/;function G(e){var t={};return"r"===e[e.length-1]?t.roundingPriority="morePrecision":"s"===e[e.length-1]&&(t.roundingPriority="lessPrecision"),e.replace(M,(function(e,r,n){return"string"!=typeof n?(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length):"+"===n?t.minimumSignificantDigits=r.length:"#"===r[0]?t.maximumSignificantDigits=r.length:(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length+("string"==typeof n?n.length:0)),""})),t}function w(e){switch(e){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function D(e){var t;if("E"===e[0]&&"E"===e[1]?(t={notation:"engineering"},e=e.slice(2)):"E"===e[0]&&(t={notation:"scientific"},e=e.slice(1)),t){var r=e.slice(0,2);if("+!"===r?(t.signDisplay="always",e=e.slice(2)):"+?"===r&&(t.signDisplay="exceptZero",e=e.slice(2)),!U.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function F(e){var t=w(e);return t||{}}function k(e){for(var t={},r=0,i=e;r<i.length;r++){var o=i[r];switch(o.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=o.options[0];continue;case"group-off":case",_":t.useGrouping=!1;continue;case"precision-integer":case".":t.maximumFractionDigits=0;continue;case"measure-unit":case"unit":t.style="unit",t.unit=o.options[0].replace(/^(.*?)-/,"");continue;case"compact-short":case"K":t.notation="compact",t.compactDisplay="short";continue;case"compact-long":case"KK":t.notation="compact",t.compactDisplay="long";continue;case"scientific":t=n(n(n({},t),{notation:"scientific"}),o.options.reduce((function(e,t){return n(n({},e),F(t))}),{}));continue;case"engineering":t=n(n(n({},t),{notation:"engineering"}),o.options.reduce((function(e,t){return n(n({},e),F(t))}),{}));continue;case"notation-simple":t.notation="standard";continue;case"unit-width-narrow":t.currencyDisplay="narrowSymbol",t.unitDisplay="narrow";continue;case"unit-width-short":t.currencyDisplay="code",t.unitDisplay="short";continue;case"unit-width-full-name":t.currencyDisplay="name",t.unitDisplay="long";continue;case"unit-width-iso-code":t.currencyDisplay="symbol";continue;case"scale":t.scale=parseFloat(o.options[0]);continue;case"rounding-mode-floor":t.roundingMode="floor";continue;case"rounding-mode-ceiling":t.roundingMode="ceil";continue;case"rounding-mode-down":t.roundingMode="trunc";continue;case"rounding-mode-up":t.roundingMode="expand";continue;case"rounding-mode-half-even":t.roundingMode="halfEven";continue;case"rounding-mode-half-down":t.roundingMode="halfTrunc";continue;case"rounding-mode-half-up":t.roundingMode="halfExpand";continue;case"integer-width":if(o.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");o.options[0].replace(O,(function(e,r,n,i,o,h){if(r)t.minimumIntegerDigits=n.length;else{if(i&&o)throw new Error("We currently do not support maximum integer digits");if(h)throw new Error("We currently do not support exact integer digits")}return""}));continue}if(U.test(o.stem))t.minimumIntegerDigits=o.stem.length;else if(R.test(o.stem)){if(o.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");o.stem.replace(R,(function(e,r,n,i,o,h){return"*"===n?t.minimumFractionDigits=r.length:i&&"#"===i[0]?t.maximumFractionDigits=i.length:o&&h?(t.minimumFractionDigits=o.length,t.maximumFractionDigits=o.length+h.length):(t.minimumFractionDigits=r.length,t.maximumFractionDigits=r.length),""}));var h=o.options[0];"w"===h?t=n(n({},t),{trailingZeroDisplay:"stripIfInteger"}):h&&(t=n(n({},t),G(h)))}else if(M.test(o.stem))t=n(n({},t),G(o.stem));else{var s=w(o.stem);s&&(t=n(n({},t),s));var a=D(o.stem);a&&(t=n(n({},t),a))}}return t}var V,X={"001":["H","h"],419:["h","H","hB","hb"],AC:["H","h","hb","hB"],AD:["H","hB"],AE:["h","hB","hb","H"],AF:["H","hb","hB","h"],AG:["h","hb","H","hB"],AI:["H","h","hb","hB"],AL:["h","H","hB"],AM:["H","hB"],AO:["H","hB"],AR:["h","H","hB","hb"],AS:["h","H"],AT:["H","hB"],AU:["h","hb","H","hB"],AW:["H","hB"],AX:["H"],AZ:["H","hB","h"],BA:["H","hB","h"],BB:["h","hb","H","hB"],BD:["h","hB","H"],BE:["H","hB"],BF:["H","hB"],BG:["H","hB","h"],BH:["h","hB","hb","H"],BI:["H","h"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["h","H","hB","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],BY:["H","h"],BZ:["H","h","hb","hB"],CA:["h","hb","H","hB"],CC:["H","h","hb","hB"],CD:["hB","H"],CF:["H","h","hB"],CG:["H","hB"],CH:["H","hB","h"],CI:["H","hB"],CK:["H","h","hb","hB"],CL:["h","H","hB","hb"],CM:["H","h","hB"],CN:["H","hB","hb","h"],CO:["h","H","hB","hb"],CP:["H"],CR:["h","H","hB","hb"],CU:["h","H","hB","hb"],CV:["H","hB"],CW:["H","hB"],CX:["H","h","hb","hB"],CY:["h","H","hb","hB"],CZ:["H"],DE:["H","hB"],DG:["H","h","hb","hB"],DJ:["h","H"],DK:["H"],DM:["h","hb","H","hB"],DO:["h","H","hB","hb"],DZ:["h","hB","hb","H"],EA:["H","h","hB","hb"],EC:["h","H","hB","hb"],EE:["H","hB"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],ER:["h","H"],ES:["H","hB","h","hb"],ET:["hB","hb","h","H"],FI:["H"],FJ:["h","hb","H","hB"],FK:["H","h","hb","hB"],FM:["h","hb","H","hB"],FO:["H","h"],FR:["H","hB"],GA:["H","hB"],GB:["H","h","hb","hB"],GD:["h","hb","H","hB"],GE:["H","hB","h"],GF:["H","hB"],GG:["H","h","hb","hB"],GH:["h","H"],GI:["H","h","hb","hB"],GL:["H","h"],GM:["h","hb","H","hB"],GN:["H","hB"],GP:["H","hB"],GQ:["H","hB","h","hb"],GR:["h","H","hb","hB"],GT:["h","H","hB","hb"],GU:["h","hb","H","hB"],GW:["H","hB"],GY:["h","hb","H","hB"],HK:["h","hB","hb","H"],HN:["h","H","hB","hb"],HR:["H","hB"],HU:["H","h"],IC:["H","h","hB","hb"],ID:["H"],IE:["H","h","hb","hB"],IL:["H","hB"],IM:["H","h","hb","hB"],IN:["h","H"],IO:["H","h","hb","hB"],IQ:["h","hB","hb","H"],IR:["hB","H"],IS:["H"],IT:["H","hB"],JE:["H","h","hb","hB"],JM:["h","hb","H","hB"],JO:["h","hB","hb","H"],JP:["H","K","h"],KE:["hB","hb","H","h"],KG:["H","h","hB","hb"],KH:["hB","h","H","hb"],KI:["h","hb","H","hB"],KM:["H","h","hB","hb"],KN:["h","hb","H","hB"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],KW:["h","hB","hb","H"],KY:["h","hb","H","hB"],KZ:["H","hB"],LA:["H","hb","hB","h"],LB:["h","hB","hb","H"],LC:["h","hb","H","hB"],LI:["H","hB","h"],LK:["H","h","hB","hb"],LR:["h","hb","H","hB"],LS:["h","H"],LT:["H","h","hb","hB"],LU:["H","h","hB"],LV:["H","hB","hb","h"],LY:["h","hB","hb","H"],MA:["H","h","hB","hb"],MC:["H","hB"],MD:["H","hB"],ME:["H","hB","h"],MF:["H","hB"],MG:["H","h"],MH:["h","hb","H","hB"],MK:["H","h","hb","hB"],ML:["H"],MM:["hB","hb","H","h"],MN:["H","h","hb","hB"],MO:["h","hB","hb","H"],MP:["h","hb","H","hB"],MQ:["H","hB"],MR:["h","hB","hb","H"],MS:["H","h","hb","hB"],MT:["H","h"],MU:["H","h"],MV:["H","h"],MW:["h","hb","H","hB"],MX:["h","H","hB","hb"],MY:["hb","hB","h","H"],MZ:["H","hB"],NA:["h","H","hB","hb"],NC:["H","hB"],NE:["H"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NI:["h","H","hB","hb"],NL:["H","hB"],NO:["H","h"],NP:["H","h","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],NZ:["h","hb","H","hB"],OM:["h","hB","hb","H"],PA:["h","H","hB","hb"],PE:["h","H","hB","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","H"],PL:["H","h"],PM:["H","hB"],PN:["H","h","hb","hB"],PR:["h","H","hB","hb"],PS:["h","hB","hb","H"],PT:["H","hB"],PW:["h","H"],PY:["h","H","hB","hb"],QA:["h","hB","hb","H"],RE:["H","hB"],RO:["H","hB"],RS:["H","hB","h"],RU:["H"],RW:["H","h"],SA:["h","hB","hb","H"],SB:["h","hb","H","hB"],SC:["H","h","hB"],SD:["h","hB","hb","H"],SE:["H"],SG:["h","hb","H","hB"],SH:["H","h","hb","hB"],SI:["H","hB"],SJ:["H"],SK:["H"],SL:["h","hb","H","hB"],SM:["H","h","hB"],SN:["H","h","hB"],SO:["h","H"],SR:["H","hB"],SS:["h","hb","H","hB"],ST:["H","hB"],SV:["h","H","hB","hb"],SX:["H","h","hb","hB"],SY:["h","hB","hb","H"],SZ:["h","hb","H","hB"],TA:["H","h","hb","hB"],TC:["h","hb","H","hB"],TD:["h","H","hB"],TF:["H","h","hB"],TG:["H","hB"],TH:["H","h"],TJ:["H","h"],TL:["H","hB","hb","h"],TM:["H","h"],TN:["h","hB","hb","H"],TO:["h","H"],TR:["H","hB"],TT:["h","hb","H","hB"],TW:["hB","hb","h","H"],TZ:["hB","hb","H","h"],UA:["H","hB","h"],UG:["hB","hb","H","h"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],UY:["h","H","hB","hb"],UZ:["H","hB","h"],VA:["H","h","hB"],VC:["h","hb","H","hB"],VE:["h","H","hB","hb"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],VN:["H","h"],VU:["h","H"],WF:["H","hB"],WS:["h","H"],XK:["H","hB","h"],YE:["h","hB","hb","H"],YT:["H","hB"],ZA:["H","h","hb","hB"],ZM:["h","hb","H","hB"],ZW:["H","h"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","hB"],"en-HK":["h","hb","H","hB"],"en-IL":["H","h","hb","hB"],"en-MY":["h","hb","H","hB"],"es-BR":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"gu-IN":["hB","hb","h","H"],"hi-IN":["hB","h","H"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],"ta-IN":["hB","h","hb","H"],"te-IN":["hB","h","H"],"zu-ZA":["H","hB","hb","h"]};function x(e){var t=e.hourCycle;if(void 0===t&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var r,n=e.language;return"root"!==n&&(r=e.maximize().region),(X[r||""]||X[n||""]||X["".concat(n,"-001")]||X["001"])[0]}var K=new RegExp("^".concat(S.source,"*")),j=new RegExp("".concat(S.source,"*$"));function Y(e,t){return{start:e,end:t}}var Z=!!String.prototype.startsWith&&"_a".startsWith("a",1),W=!!String.fromCodePoint,z=!!Object.fromEntries,Q=!!String.prototype.codePointAt,J=!!String.prototype.trimStart,q=!!String.prototype.trimEnd,$=!!Number.isSafeInteger?Number.isSafeInteger:function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},ee=!0;try{ee="a"===(null===(V=ae("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu").exec("a"))||void 0===V?void 0:V[0])}catch(e){ee=!1}var te,re=Z?function(e,t,r){return e.startsWith(t,r)}:function(e,t,r){return e.slice(r,r+t.length)===t},ne=W?String.fromCodePoint:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r,n="",i=e.length,o=0;i>o;){if((r=e[o++])>1114111)throw RangeError(r+" is not a valid code point");n+=r<65536?String.fromCharCode(r):String.fromCharCode(55296+((r-=65536)>>10),r%1024+56320)}return n},ie=z?Object.fromEntries:function(e){for(var t={},r=0,n=e;r<n.length;r++){var i=n[r],o=i[0],h=i[1];t[o]=h}return t},oe=Q?function(e,t){return e.codePointAt(t)}:function(e,t){var r=e.length;if(!(t<0||t>=r)){var n,i=e.charCodeAt(t);return i<55296||i>56319||t+1===r||(n=e.charCodeAt(t+1))<56320||n>57343?i:n-56320+(i-55296<<10)+65536}},he=J?function(e){return e.trimStart()}:function(e){return e.replace(K,"")},se=q?function(e){return e.trimEnd()}:function(e){return e.replace(j,"")};function ae(e,t){return new RegExp(e,t)}if(ee){var ue=ae("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");te=function(e,t){var r;return ue.lastIndex=t,null!==(r=ue.exec(e)[1])&&void 0!==r?r:""}}else te=function(e,t){for(var r=[];;){var n=oe(e,t);if(void 0===n||fe(n)||Ee(n))break;r.push(n),t+=n>=65536?2:1}return ne.apply(void 0,r)};var ce,le=function(){function e(e,t){void 0===t&&(t={}),this.message=e,this.position={offset:0,line:1,column:1},this.ignoreTag=!!t.ignoreTag,this.locale=t.locale,this.requiresOtherClause=!!t.requiresOtherClause,this.shouldParseSkeletons=!!t.shouldParseSkeletons}return e.prototype.parse=function(){if(0!==this.offset())throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(e,t,r){for(var n=[];!this.isEOF();){var i=this.char();if(123===i){if((o=this.parseArgument(e,r)).err)return o;n.push(o.val)}else{if(125===i&&e>0)break;if(35!==i||"plural"!==t&&"selectordinal"!==t){if(60===i&&!this.ignoreTag&&47===this.peek()){if(r)break;return this.error(p.UNMATCHED_CLOSING_TAG,Y(this.clonePosition(),this.clonePosition()))}if(60===i&&!this.ignoreTag&&pe(this.peek()||0)){if((o=this.parseTag(e,t)).err)return o;n.push(o.val)}else{var o;if((o=this.parseLiteral(e,t)).err)return o;n.push(o.val)}}else{var h=this.clonePosition();this.bump(),n.push({type:f.pound,location:Y(h,this.clonePosition())})}}}return{val:n,err:null}},e.prototype.parseTag=function(e,t){var r=this.clonePosition();this.bump();var n=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:f.literal,value:"<".concat(n,"/>"),location:Y(r,this.clonePosition())},err:null};if(this.bumpIf(">")){var i=this.parseMessage(e+1,t,!0);if(i.err)return i;var o=i.val,h=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!pe(this.char()))return this.error(p.INVALID_TAG,Y(h,this.clonePosition()));var s=this.clonePosition();return n!==this.parseTagName()?this.error(p.UNMATCHED_CLOSING_TAG,Y(s,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:f.tag,value:n,children:o,location:Y(r,this.clonePosition())},err:null}:this.error(p.INVALID_TAG,Y(h,this.clonePosition())))}return this.error(p.UNCLOSED_TAG,Y(r,this.clonePosition()))}return this.error(p.INVALID_TAG,Y(r,this.clonePosition()))},e.prototype.parseTagName=function(){var e,t=this.offset();for(this.bump();!this.isEOF()&&(45===(e=this.char())||46===e||e>=48&&e<=57||95===e||e>=97&&e<=122||e>=65&&e<=90||183==e||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039);)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(e,t){for(var r=this.clonePosition(),n="";;){var i=this.tryParseQuote(t);if(i)n+=i;else{var o=this.tryParseUnquoted(e,t);if(o)n+=o;else{var h=this.tryParseLeftAngleBracket();if(!h)break;n+=h}}}var s=Y(r,this.clonePosition());return{val:{type:f.literal,value:n,location:s},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return this.isEOF()||60!==this.char()||!this.ignoreTag&&(pe(e=this.peek()||0)||47===e)?null:(this.bump(),"<");var e},e.prototype.tryParseQuote=function(e){if(this.isEOF()||39!==this.char())return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if("plural"===e||"selectordinal"===e)break;return null;default:return null}this.bump();var t=[this.char()];for(this.bump();!this.isEOF();){var r=this.char();if(39===r){if(39!==this.peek()){this.bump();break}t.push(39),this.bump()}else t.push(r);this.bump()}return ne.apply(void 0,t)},e.prototype.tryParseUnquoted=function(e,t){if(this.isEOF())return null;var r=this.char();return 60===r||123===r||35===r&&("plural"===t||"selectordinal"===t)||125===r&&e>0?null:(this.bump(),ne(r))},e.prototype.parseArgument=function(e,t){var r=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(p.EXPECT_ARGUMENT_CLOSING_BRACE,Y(r,this.clonePosition()));if(125===this.char())return this.bump(),this.error(p.EMPTY_ARGUMENT,Y(r,this.clonePosition()));var n=this.parseIdentifierIfPossible().value;if(!n)return this.error(p.MALFORMED_ARGUMENT,Y(r,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(p.EXPECT_ARGUMENT_CLOSING_BRACE,Y(r,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:f.argument,value:n,location:Y(r,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(p.EXPECT_ARGUMENT_CLOSING_BRACE,Y(r,this.clonePosition())):this.parseArgumentOptions(e,t,n,r);default:return this.error(p.MALFORMED_ARGUMENT,Y(r,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var e=this.clonePosition(),t=this.offset(),r=te(this.message,t),n=t+r.length;return this.bumpTo(n),{value:r,location:Y(e,this.clonePosition())}},e.prototype.parseArgumentOptions=function(e,t,r,i){var o,h=this.clonePosition(),s=this.parseIdentifierIfPossible().value,a=this.clonePosition();switch(s){case"":return this.error(p.EXPECT_ARGUMENT_TYPE,Y(h,a));case"number":case"date":case"time":this.bumpSpace();var u=null;if(this.bumpIf(",")){this.bumpSpace();var c=this.clonePosition();if((B=this.parseSimpleArgStyleIfPossible()).err)return B;if(0===(b=se(B.val)).length)return this.error(p.EXPECT_ARGUMENT_STYLE,Y(this.clonePosition(),this.clonePosition()));u={style:b,styleLocation:Y(c,this.clonePosition())}}if((d=this.tryParseArgumentClose(i)).err)return d;var l=Y(i,this.clonePosition());if(u&&re(null==u?void 0:u.style,"::",0)){var m=he(u.style.slice(2));if("number"===s)return(B=this.parseNumberSkeletonFromString(m,u.styleLocation)).err?B:{val:{type:f.number,value:r,location:l,style:B.val},err:null};if(0===m.length)return this.error(p.EXPECT_DATE_TIME_SKELETON,l);var g=m;this.locale&&(g=function(e,t){for(var r="",n=0;n<e.length;n++){var i=e.charAt(n);if("j"===i){for(var o=0;n+1<e.length&&e.charAt(n+1)===i;)o++,n++;var h=1+(1&o),s=o<2?1:3+(o>>1),a=x(t);for("H"!=a&&"k"!=a||(s=0);s-- >0;)r+="a";for(;h-- >0;)r=a+r}else r+="J"===i?"H":i}return r}(m,this.locale));var b={type:E.dateTime,pattern:g,location:u.styleLocation,parsedOptions:this.shouldParseSkeletons?I(g):{}};return{val:{type:"date"===s?f.date:f.time,value:r,location:l,style:b},err:null}}return{val:{type:"number"===s?f.number:"date"===s?f.date:f.time,value:r,location:l,style:null!==(o=null==u?void 0:u.style)&&void 0!==o?o:null},err:null};case"plural":case"selectordinal":case"select":var H=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(p.EXPECT_SELECT_ARGUMENT_OPTIONS,Y(H,n({},H)));this.bumpSpace();var y=this.parseIdentifierIfPossible(),T=0;if("select"!==s&&"offset"===y.value){if(!this.bumpIf(":"))return this.error(p.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,Y(this.clonePosition(),this.clonePosition()));var B;if(this.bumpSpace(),(B=this.tryParseDecimalInteger(p.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,p.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE)).err)return B;this.bumpSpace(),y=this.parseIdentifierIfPossible(),T=B.val}var d,v=this.tryParsePluralOrSelectOptions(e,s,t,y);if(v.err)return v;if((d=this.tryParseArgumentClose(i)).err)return d;var _=Y(i,this.clonePosition());return"select"===s?{val:{type:f.select,value:r,options:ie(v.val),location:_},err:null}:{val:{type:f.plural,value:r,options:ie(v.val),offset:T,pluralType:"plural"===s?"cardinal":"ordinal",location:_},err:null};default:return this.error(p.INVALID_ARGUMENT_TYPE,Y(h,a))}},e.prototype.tryParseArgumentClose=function(e){return this.isEOF()||125!==this.char()?this.error(p.EXPECT_ARGUMENT_CLOSING_BRACE,Y(e,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var e=0,t=this.clonePosition();!this.isEOF();){switch(this.char()){case 39:this.bump();var r=this.clonePosition();if(!this.bumpUntil("'"))return this.error(p.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,Y(r,this.clonePosition()));this.bump();break;case 123:e+=1,this.bump();break;case 125:if(!(e>0))return{val:this.message.slice(t.offset,this.offset()),err:null};e-=1;break;default:this.bump()}}return{val:this.message.slice(t.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(e,t){var r=[];try{r=function(e){if(0===e.length)throw new Error("Number skeleton cannot be empty");for(var t=[],r=0,n=e.split(C).filter((function(e){return e.length>0}));r<n.length;r++){var i=n[r].split("/");if(0===i.length)throw new Error("Invalid number skeleton");for(var o=i[0],h=i.slice(1),s=0,a=h;s<a.length;s++)if(0===a[s].length)throw new Error("Invalid number skeleton");t.push({stem:o,options:h})}return t}(e)}catch(e){return this.error(p.INVALID_NUMBER_SKELETON,t)}return{val:{type:E.number,tokens:r,location:t,parsedOptions:this.shouldParseSkeletons?k(r):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(e,t,r,n){for(var i,o=!1,h=[],s=new Set,a=n.value,u=n.location;;){if(0===a.length){var c=this.clonePosition();if("select"===t||!this.bumpIf("="))break;var l=this.tryParseDecimalInteger(p.EXPECT_PLURAL_ARGUMENT_SELECTOR,p.INVALID_PLURAL_ARGUMENT_SELECTOR);if(l.err)return l;u=Y(c,this.clonePosition()),a=this.message.slice(c.offset,this.offset())}if(s.has(a))return this.error("select"===t?p.DUPLICATE_SELECT_ARGUMENT_SELECTOR:p.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,u);"other"===a&&(o=!0),this.bumpSpace();var f=this.clonePosition();if(!this.bumpIf("{"))return this.error("select"===t?p.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:p.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,Y(this.clonePosition(),this.clonePosition()));var E=this.parseMessage(e+1,t,r);if(E.err)return E;var m=this.tryParseArgumentClose(f);if(m.err)return m;h.push([a,{value:E.val,location:Y(f,this.clonePosition())}]),s.add(a),this.bumpSpace(),a=(i=this.parseIdentifierIfPossible()).value,u=i.location}return 0===h.length?this.error("select"===t?p.EXPECT_SELECT_ARGUMENT_SELECTOR:p.EXPECT_PLURAL_ARGUMENT_SELECTOR,Y(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!o?this.error(p.MISSING_OTHER_CLAUSE,Y(this.clonePosition(),this.clonePosition())):{val:h,err:null}},e.prototype.tryParseDecimalInteger=function(e,t){var r=1,n=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(r=-1);for(var i=!1,o=0;!this.isEOF();){var h=this.char();if(!(h>=48&&h<=57))break;i=!0,o=10*o+(h-48),this.bump()}var s=Y(n,this.clonePosition());return i?$(o*=r)?{val:o,err:null}:this.error(t,s):this.error(e,s)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var e=this.position.offset;if(e>=this.message.length)throw Error("out of bound");var t=oe(this.message,e);if(void 0===t)throw Error("Offset ".concat(e," is at invalid UTF-16 code unit boundary"));return t},e.prototype.error=function(e,t){return{val:null,err:{kind:e,message:this.message,location:t}}},e.prototype.bump=function(){if(!this.isEOF()){var e=this.char();10===e?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=e<65536?1:2)}},e.prototype.bumpIf=function(e){if(re(this.message,e,this.offset())){for(var t=0;t<e.length;t++)this.bump();return!0}return!1},e.prototype.bumpUntil=function(e){var t=this.offset(),r=this.message.indexOf(e,t);return r>=0?(this.bumpTo(r),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(e){if(this.offset()>e)throw Error("targetOffset ".concat(e," must be greater than or equal to the current offset ").concat(this.offset()));for(e=Math.min(e,this.message.length);;){var t=this.offset();if(t===e)break;if(t>e)throw Error("targetOffset ".concat(e," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&fe(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var e=this.char(),t=this.offset(),r=this.message.charCodeAt(t+(e>=65536?2:1));return null!=r?r:null},e}();function pe(e){return e>=97&&e<=122||e>=65&&e<=90}function fe(e){return e>=9&&e<=13||32===e||133===e||e>=8206&&e<=8207||8232===e||8233===e}function Ee(e){return e>=33&&e<=35||36===e||e>=37&&e<=39||40===e||41===e||42===e||43===e||44===e||45===e||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||91===e||92===e||93===e||94===e||96===e||123===e||124===e||125===e||126===e||161===e||e>=162&&e<=165||166===e||167===e||169===e||171===e||172===e||174===e||176===e||177===e||182===e||187===e||191===e||215===e||247===e||e>=8208&&e<=8213||e>=8214&&e<=8215||8216===e||8217===e||8218===e||e>=8219&&e<=8220||8221===e||8222===e||8223===e||e>=8224&&e<=8231||e>=8240&&e<=8248||8249===e||8250===e||e>=8251&&e<=8254||e>=8257&&e<=8259||8260===e||8261===e||8262===e||e>=8263&&e<=8273||8274===e||8275===e||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||8608===e||e>=8609&&e<=8610||8611===e||e>=8612&&e<=8613||8614===e||e>=8615&&e<=8621||8622===e||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||8658===e||8659===e||8660===e||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||8968===e||8969===e||8970===e||8971===e||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||9001===e||9002===e||e>=9003&&e<=9083||9084===e||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||9655===e||e>=9656&&e<=9664||9665===e||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||9839===e||e>=9840&&e<=10087||10088===e||10089===e||10090===e||10091===e||10092===e||10093===e||10094===e||10095===e||10096===e||10097===e||10098===e||10099===e||10100===e||10101===e||e>=10132&&e<=10175||e>=10176&&e<=10180||10181===e||10182===e||e>=10183&&e<=10213||10214===e||10215===e||10216===e||10217===e||10218===e||10219===e||10220===e||10221===e||10222===e||10223===e||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||10627===e||10628===e||10629===e||10630===e||10631===e||10632===e||10633===e||10634===e||10635===e||10636===e||10637===e||10638===e||10639===e||10640===e||10641===e||10642===e||10643===e||10644===e||10645===e||10646===e||10647===e||10648===e||e>=10649&&e<=10711||10712===e||10713===e||10714===e||10715===e||e>=10716&&e<=10747||10748===e||10749===e||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||11158===e||e>=11159&&e<=11263||e>=11776&&e<=11777||11778===e||11779===e||11780===e||11781===e||e>=11782&&e<=11784||11785===e||11786===e||11787===e||11788===e||11789===e||e>=11790&&e<=11798||11799===e||e>=11800&&e<=11801||11802===e||11803===e||11804===e||11805===e||e>=11806&&e<=11807||11808===e||11809===e||11810===e||11811===e||11812===e||11813===e||11814===e||11815===e||11816===e||11817===e||e>=11818&&e<=11822||11823===e||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||11840===e||11841===e||11842===e||e>=11843&&e<=11855||e>=11856&&e<=11857||11858===e||e>=11859&&e<=11903||e>=12289&&e<=12291||12296===e||12297===e||12298===e||12299===e||12300===e||12301===e||12302===e||12303===e||12304===e||12305===e||e>=12306&&e<=12307||12308===e||12309===e||12310===e||12311===e||12312===e||12313===e||12314===e||12315===e||12316===e||12317===e||e>=12318&&e<=12319||12320===e||12336===e||64830===e||64831===e||e>=65093&&e<=65094}function me(e){e.forEach((function(e){if(delete e.location,d(e)||v(e))for(var t in e.options)delete e.options[t].location,me(e.options[t].value);else y(e)&&L(e.style)||(T(e)||B(e))&&P(e.style)?delete e.style.location:A(e)&&me(e.children)}))}function ge(e,t){void 0===t&&(t={}),t=n({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var r=new le(e,t).parse();if(r.err){var i=SyntaxError(p[r.err.kind]);throw i.location=r.err.location,i.originalMessage=r.err.message,i}return(null==t?void 0:t.captureLocation)||me(r.val),r.val}!function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"}(ce||(ce={}));var be,He=function(e){function t(t,r,n){var i=e.call(this,t)||this;return i.code=r,i.originalMessage=n,i}return r(t,e),t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error),ye=function(e){function t(t,r,n,i){return e.call(this,'Invalid values for "'.concat(t,'": "').concat(r,'". Options are "').concat(Object.keys(n).join('", "'),'"'),ce.INVALID_VALUE,i)||this}return r(t,e),t}(He),Te=function(e){function t(t,r,n){return e.call(this,'Value for "'.concat(t,'" must be of type ').concat(r),ce.INVALID_VALUE,n)||this}return r(t,e),t}(He),Be=function(e){function t(t,r){return e.call(this,'The intl string context variable "'.concat(t,'" was not provided to the string "').concat(r,'"'),ce.MISSING_VALUE,r)||this}return r(t,e),t}(He);function de(e){return"function"==typeof e}function ve(e,t,r,n,i,o,h){if(1===e.length&&b(e[0]))return[{type:be.literal,value:e[0].value}];for(var s=[],a=0,u=e;a<u.length;a++){var c=u[a];if(b(c))s.push({type:be.literal,value:c.value});else if(_(c))"number"==typeof o&&s.push({type:be.literal,value:r.getNumberFormat(t).format(o)});else{var l=c.value;if(!i||!(l in i))throw new Be(l,h);var p=i[l];if(H(c))p&&"string"!=typeof p&&"number"!=typeof p||(p="string"==typeof p||"number"==typeof p?String(p):""),s.push({type:"string"==typeof p?be.literal:be.object,value:p});else if(T(c)){var f="string"==typeof c.style?n.date[c.style]:P(c.style)?c.style.parsedOptions:void 0;s.push({type:be.literal,value:r.getDateTimeFormat(t,f).format(p)})}else if(B(c)){f="string"==typeof c.style?n.time[c.style]:P(c.style)?c.style.parsedOptions:n.time.medium;s.push({type:be.literal,value:r.getDateTimeFormat(t,f).format(p)})}else if(y(c)){(f="string"==typeof c.style?n.number[c.style]:L(c.style)?c.style.parsedOptions:void 0)&&f.scale&&(p*=f.scale||1),s.push({type:be.literal,value:r.getNumberFormat(t,f).format(p)})}else{if(A(c)){var E=c.children,m=c.value,g=i[m];if(!de(g))throw new Te(m,"function",h);var S=g(ve(E,t,r,n,i,o).map((function(e){return e.value})));Array.isArray(S)||(S=[S]),s.push.apply(s,S.map((function(e){return{type:"string"==typeof e?be.literal:be.object,value:e}})))}if(d(c)){if(!(N=c.options[p]||c.options.other))throw new ye(c.value,p,Object.keys(c.options),h);s.push.apply(s,ve(N.value,t,r,n,i))}else if(v(c)){var N;if(!(N=c.options["=".concat(p)])){if(!Intl.PluralRules)throw new He('Intl.PluralRules is not available in this environment.\nTry polyfilling it using "@formatjs/intl-pluralrules"\n',ce.MISSING_INTL_API,h);var I=r.getPluralRules(t,{type:c.pluralType}).select(p-(c.offset||0));N=c.options[I]||c.options.other}if(!N)throw new ye(c.value,p,Object.keys(c.options),h);s.push.apply(s,ve(N.value,t,r,n,i,p-(c.offset||0)))}else;}}}return function(e){return e.length<2?e:e.reduce((function(e,t){var r=e[e.length-1];return r&&r.type===be.literal&&t.type===be.literal?r.value+=t.value:e.push(t),e}),[])}(s)}function _e(e,t){return t?Object.keys(e).reduce((function(r,i){var o,h;return r[i]=(o=e[i],(h=t[i])?n(n(n({},o||{}),h||{}),Object.keys(o).reduce((function(e,t){return e[t]=n(n({},o[t]),h[t]||{}),e}),{})):o),r}),n({},e)):e}function Ae(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,r){e[t]=r}}}}}!function(e){e[e.literal=0]="literal",e[e.object=1]="object"}(be||(be={}));var Le=function(){function e(t,r,h,s){void 0===r&&(r=e.defaultLocale);var a,u=this;if(this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(e){var t=u.formatToParts(e);if(1===t.length)return t[0].value;var r=t.reduce((function(e,t){return e.length&&t.type===be.literal&&"string"==typeof e[e.length-1]?e[e.length-1]+=t.value:e.push(t.value),e}),[]);return r.length<=1?r[0]||"":r},this.formatToParts=function(e){return ve(u.ast,u.locales,u.formatters,u.formats,e,void 0,u.message)},this.resolvedOptions=function(){var e;return{locale:(null===(e=u.resolvedLocale)||void 0===e?void 0:e.toString())||Intl.NumberFormat.supportedLocalesOf(u.locales)[0]}},this.getAst=function(){return u.ast},this.locales=r,this.resolvedLocale=e.resolveLocale(r),"string"==typeof t){if(this.message=t,!e.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");var c=s||{};c.formatters;var l=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r}(c,["formatters"]);this.ast=e.__parse(t,n(n({},l),{locale:this.resolvedLocale}))}else this.ast=t;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=_e(e.formats,h),this.formatters=s&&s.formatters||(void 0===(a=this.formatterCache)&&(a={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:o((function(){for(var e,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return new((e=Intl.NumberFormat).bind.apply(e,i([void 0],t,!1)))}),{cache:Ae(a.number),strategy:g.variadic}),getDateTimeFormat:o((function(){for(var e,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return new((e=Intl.DateTimeFormat).bind.apply(e,i([void 0],t,!1)))}),{cache:Ae(a.dateTime),strategy:g.variadic}),getPluralRules:o((function(){for(var e,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return new((e=Intl.PluralRules).bind.apply(e,i([void 0],t,!1)))}),{cache:Ae(a.pluralRules),strategy:g.variadic})})}return Object.defineProperty(e,"defaultLocale",{get:function(){return e.memoizedDefaultLocale||(e.memoizedDefaultLocale=(new Intl.NumberFormat).resolvedOptions().locale),e.memoizedDefaultLocale},enumerable:!1,configurable:!0}),e.memoizedDefaultLocale=null,e.resolveLocale=function(e){if(void 0!==Intl.Locale){var t=Intl.NumberFormat.supportedLocalesOf(e);return t.length>0?new Intl.Locale(t[0]):new Intl.Locale("string"==typeof e?e:e[0])}},e.__parse=ge,e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},e}(),Pe=Le;e.FormatIcu=()=>(e,t)=>(t.setFinalFormatter((()=>{const e=new Map;function t(e){try{return Boolean(Intl.NumberFormat.supportedLocalesOf(e).length)}catch(e){return!1}}function r(r){if(!e.get(r)){let n=String(r).replace(/[^a-zA-Z]/g,"-");for(;!t(n);)n=n.split("-").slice(0,-1).join("-")||"en";e.set(r,n)}return e.get(r)}return Object.freeze({getLanguage:r,format:({translation:e,language:t,params:n})=>{const i=!Object.values(n||{}).find((e=>"function"==typeof e)),o=r(t);return new Pe(e,o,void 0,{ignoreTag:i}).format(n)}})})()),e),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="undefined"!=typeof globalThis?globalThis:e||self)["@tolgee/format-icu"]={})}(this,(function(e){"use strict";var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},t(e,r)};function r(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}var n,i,o,h=function(){return h=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},h.apply(this,arguments)};function s(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}function a(e){return e.type===i.literal}function u(e){return e.type===i.argument}function c(e){return e.type===i.number}function l(e){return e.type===i.date}function p(e){return e.type===i.time}function f(e){return e.type===i.select}function E(e){return e.type===i.plural}function m(e){return e.type===i.pound}function g(e){return e.type===i.tag}function b(e){return!(!e||"object"!=typeof e||e.type!==o.number)}function y(e){return!(!e||"object"!=typeof e||e.type!==o.dateTime)}!function(e){e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",e[e.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",e[e.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",e[e.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",e[e.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",e[e.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",e[e.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",e[e.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",e[e.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",e[e.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",e[e.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",e[e.INVALID_TAG=23]="INVALID_TAG",e[e.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",e[e.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",e[e.UNCLOSED_TAG=27]="UNCLOSED_TAG"}(n||(n={})),function(e){e[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound",e[e.tag=8]="tag"}(i||(i={})),function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"}(o||(o={}));var H=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,T=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function B(e){var t={};return e.replace(T,(function(e){var r=e.length;switch(e[0]){case"G":t.era=4===r?"long":5===r?"narrow":"short";break;case"y":t.year=2===r?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":t.month=["numeric","2-digit","short","long","narrow"][r-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":t.day=["numeric","2-digit"][r-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":t.weekday=4===r?"short":5===r?"narrow":"short";break;case"e":if(r<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][r-4];break;case"c":if(r<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][r-4];break;case"a":t.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":t.hourCycle="h12",t.hour=["numeric","2-digit"][r-1];break;case"H":t.hourCycle="h23",t.hour=["numeric","2-digit"][r-1];break;case"K":t.hourCycle="h11",t.hour=["numeric","2-digit"][r-1];break;case"k":t.hourCycle="h24",t.hour=["numeric","2-digit"][r-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":t.minute=["numeric","2-digit"][r-1];break;case"s":t.second=["numeric","2-digit"][r-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":t.timeZoneName=r<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""})),t}var v=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;var _=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,A=/^(@+)?(\+|#+)?[rs]?$/g,d=/(\*)(0+)|(#+)(0+)|(0+)/g,L=/^(0+)$/;function P(e){var t={};return"r"===e[e.length-1]?t.roundingPriority="morePrecision":"s"===e[e.length-1]&&(t.roundingPriority="lessPrecision"),e.replace(A,(function(e,r,n){return"string"!=typeof n?(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length):"+"===n?t.minimumSignificantDigits=r.length:"#"===r[0]?t.maximumSignificantDigits=r.length:(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length+("string"==typeof n?n.length:0)),""})),t}function S(e){switch(e){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function N(e){var t;if("E"===e[0]&&"E"===e[1]?(t={notation:"engineering"},e=e.slice(2)):"E"===e[0]&&(t={notation:"scientific"},e=e.slice(1)),t){var r=e.slice(0,2);if("+!"===r?(t.signDisplay="always",e=e.slice(2)):"+?"===r&&(t.signDisplay="exceptZero",e=e.slice(2)),!L.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function I(e){var t=S(e);return t||{}}function C(e){for(var t={},r=0,n=e;r<n.length;r++){var i=n[r];switch(i.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=i.options[0];continue;case"group-off":case",_":t.useGrouping=!1;continue;case"precision-integer":case".":t.maximumFractionDigits=0;continue;case"measure-unit":case"unit":t.style="unit",t.unit=i.options[0].replace(/^(.*?)-/,"");continue;case"compact-short":case"K":t.notation="compact",t.compactDisplay="short";continue;case"compact-long":case"KK":t.notation="compact",t.compactDisplay="long";continue;case"scientific":t=h(h(h({},t),{notation:"scientific"}),i.options.reduce((function(e,t){return h(h({},e),I(t))}),{}));continue;case"engineering":t=h(h(h({},t),{notation:"engineering"}),i.options.reduce((function(e,t){return h(h({},e),I(t))}),{}));continue;case"notation-simple":t.notation="standard";continue;case"unit-width-narrow":t.currencyDisplay="narrowSymbol",t.unitDisplay="narrow";continue;case"unit-width-short":t.currencyDisplay="code",t.unitDisplay="short";continue;case"unit-width-full-name":t.currencyDisplay="name",t.unitDisplay="long";continue;case"unit-width-iso-code":t.currencyDisplay="symbol";continue;case"scale":t.scale=parseFloat(i.options[0]);continue;case"integer-width":if(i.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");i.options[0].replace(d,(function(e,r,n,i,o,h){if(r)t.minimumIntegerDigits=n.length;else{if(i&&o)throw new Error("We currently do not support maximum integer digits");if(h)throw new Error("We currently do not support exact integer digits")}return""}));continue}if(L.test(i.stem))t.minimumIntegerDigits=i.stem.length;else if(_.test(i.stem)){if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(_,(function(e,r,n,i,o,h){return"*"===n?t.minimumFractionDigits=r.length:i&&"#"===i[0]?t.maximumFractionDigits=i.length:o&&h?(t.minimumFractionDigits=o.length,t.maximumFractionDigits=o.length+h.length):(t.minimumFractionDigits=r.length,t.maximumFractionDigits=r.length),""}));var o=i.options[0];"w"===o?t=h(h({},t),{trailingZeroDisplay:"stripIfInteger"}):o&&(t=h(h({},t),P(o)))}else if(A.test(i.stem))t=h(h({},t),P(i.stem));else{var s=S(i.stem);s&&(t=h(h({},t),s));var a=N(i.stem);a&&(t=h(h({},t),a))}}return t}var R,O={AX:["H"],BQ:["H"],CP:["H"],CZ:["H"],DK:["H"],FI:["H"],ID:["H"],IS:["H"],ML:["H"],NE:["H"],RU:["H"],SE:["H"],SJ:["H"],SK:["H"],AS:["h","H"],BT:["h","H"],DJ:["h","H"],ER:["h","H"],GH:["h","H"],IN:["h","H"],LS:["h","H"],PG:["h","H"],PW:["h","H"],SO:["h","H"],TO:["h","H"],VU:["h","H"],WS:["h","H"],"001":["H","h"],AL:["h","H","hB"],TD:["h","H","hB"],"ca-ES":["H","h","hB"],CF:["H","h","hB"],CM:["H","h","hB"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],LU:["H","h","hB"],NP:["H","h","hB"],PF:["H","h","hB"],SC:["H","h","hB"],SM:["H","h","hB"],SN:["H","h","hB"],TF:["H","h","hB"],VA:["H","h","hB"],CY:["h","H","hb","hB"],GR:["h","H","hb","hB"],CO:["h","H","hB","hb"],DO:["h","H","hB","hb"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],NA:["h","H","hB","hb"],PA:["h","H","hB","hb"],PR:["h","H","hB","hb"],VE:["h","H","hB","hb"],AC:["H","h","hb","hB"],AI:["H","h","hb","hB"],BW:["H","h","hb","hB"],BZ:["H","h","hb","hB"],CC:["H","h","hb","hB"],CK:["H","h","hb","hB"],CX:["H","h","hb","hB"],DG:["H","h","hb","hB"],FK:["H","h","hb","hB"],GB:["H","h","hb","hB"],GG:["H","h","hb","hB"],GI:["H","h","hb","hB"],IE:["H","h","hb","hB"],IM:["H","h","hb","hB"],IO:["H","h","hb","hB"],JE:["H","h","hb","hB"],LT:["H","h","hb","hB"],MK:["H","h","hb","hB"],MN:["H","h","hb","hB"],MS:["H","h","hb","hB"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],PN:["H","h","hb","hB"],SH:["H","h","hb","hB"],SX:["H","h","hb","hB"],TA:["H","h","hb","hB"],ZA:["H","h","hb","hB"],"af-ZA":["H","h","hB","hb"],AR:["H","h","hB","hb"],CL:["H","h","hB","hb"],CR:["H","h","hB","hb"],CU:["H","h","hB","hb"],EA:["H","h","hB","hb"],"es-BO":["H","h","hB","hb"],"es-BR":["H","h","hB","hb"],"es-EC":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"es-PE":["H","h","hB","hb"],GT:["H","h","hB","hb"],HN:["H","h","hB","hb"],IC:["H","h","hB","hb"],KG:["H","h","hB","hb"],KM:["H","h","hB","hb"],LK:["H","h","hB","hb"],MA:["H","h","hB","hb"],MX:["H","h","hB","hb"],NI:["H","h","hB","hb"],PY:["H","h","hB","hb"],SV:["H","h","hB","hb"],UY:["H","h","hB","hb"],JP:["H","h","K"],AD:["H","hB"],AM:["H","hB"],AO:["H","hB"],AT:["H","hB"],AW:["H","hB"],BE:["H","hB"],BF:["H","hB"],BJ:["H","hB"],BL:["H","hB"],BR:["H","hB"],CG:["H","hB"],CI:["H","hB"],CV:["H","hB"],DE:["H","hB"],EE:["H","hB"],FR:["H","hB"],GA:["H","hB"],GF:["H","hB"],GN:["H","hB"],GP:["H","hB"],GW:["H","hB"],HR:["H","hB"],IL:["H","hB"],IT:["H","hB"],KZ:["H","hB"],MC:["H","hB"],MD:["H","hB"],MF:["H","hB"],MQ:["H","hB"],MZ:["H","hB"],NC:["H","hB"],NL:["H","hB"],PM:["H","hB"],PT:["H","hB"],RE:["H","hB"],RO:["H","hB"],SI:["H","hB"],SR:["H","hB"],ST:["H","hB"],TG:["H","hB"],TR:["H","hB"],WF:["H","hB"],YT:["H","hB"],BD:["h","hB","H"],PK:["h","hB","H"],AZ:["H","hB","h"],BA:["H","hB","h"],BG:["H","hB","h"],CH:["H","hB","h"],GE:["H","hB","h"],LI:["H","hB","h"],ME:["H","hB","h"],RS:["H","hB","h"],UA:["H","hB","h"],UZ:["H","hB","h"],XK:["H","hB","h"],AG:["h","hb","H","hB"],AU:["h","hb","H","hB"],BB:["h","hb","H","hB"],BM:["h","hb","H","hB"],BS:["h","hb","H","hB"],CA:["h","hb","H","hB"],DM:["h","hb","H","hB"],"en-001":["h","hb","H","hB"],FJ:["h","hb","H","hB"],FM:["h","hb","H","hB"],GD:["h","hb","H","hB"],GM:["h","hb","H","hB"],GU:["h","hb","H","hB"],GY:["h","hb","H","hB"],JM:["h","hb","H","hB"],KI:["h","hb","H","hB"],KN:["h","hb","H","hB"],KY:["h","hb","H","hB"],LC:["h","hb","H","hB"],LR:["h","hb","H","hB"],MH:["h","hb","H","hB"],MP:["h","hb","H","hB"],MW:["h","hb","H","hB"],NZ:["h","hb","H","hB"],SB:["h","hb","H","hB"],SG:["h","hb","H","hB"],SL:["h","hb","H","hB"],SS:["h","hb","H","hB"],SZ:["h","hb","H","hB"],TC:["h","hb","H","hB"],TT:["h","hb","H","hB"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],VC:["h","hb","H","hB"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],ZM:["h","hb","H","hB"],BO:["H","hB","h","hb"],EC:["H","hB","h","hb"],ES:["H","hB","h","hb"],GQ:["H","hB","h","hb"],PE:["H","hB","h","hb"],AE:["h","hB","hb","H"],"ar-001":["h","hB","hb","H"],BH:["h","hB","hb","H"],DZ:["h","hB","hb","H"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],HK:["h","hB","hb","H"],IQ:["h","hB","hb","H"],JO:["h","hB","hb","H"],KW:["h","hB","hb","H"],LB:["h","hB","hb","H"],LY:["h","hB","hb","H"],MO:["h","hB","hb","H"],MR:["h","hB","hb","H"],OM:["h","hB","hb","H"],PH:["h","hB","hb","H"],PS:["h","hB","hb","H"],QA:["h","hB","hb","H"],SA:["h","hB","hb","H"],SD:["h","hB","hb","H"],SY:["h","hB","hb","H"],TN:["h","hB","hb","H"],YE:["h","hB","hb","H"],AF:["H","hb","hB","h"],LA:["H","hb","hB","h"],CN:["H","hB","hb","h"],LV:["H","hB","hb","h"],TL:["H","hB","hb","h"],"zu-ZA":["H","hB","hb","h"],CD:["hB","H"],IR:["hB","H"],"hi-IN":["hB","h","H"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"te-IN":["hB","h","H"],KH:["hB","h","H","hb"],"ta-IN":["hB","h","hb","H"],BN:["hb","hB","h","H"],MY:["hb","hB","h","H"],ET:["hB","hb","h","H"],"gu-IN":["hB","hb","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],TW:["hB","hb","h","H"],KE:["hB","hb","H","h"],MM:["hB","hb","H","h"],TZ:["hB","hb","H","h"],UG:["hB","hb","H","h"]};function M(e){var t=e.hourCycle;if(void 0===t&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var r,n=e.language;return"root"!==n&&(r=e.maximize().region),(O[r||""]||O[n||""]||O["".concat(n,"-001")]||O["001"])[0]}var U=new RegExp("^".concat(H.source,"*")),G=new RegExp("".concat(H.source,"*$"));function w(e,t){return{start:e,end:t}}var D=!!String.prototype.startsWith,F=!!String.fromCodePoint,k=!!Object.fromEntries,V=!!String.prototype.codePointAt,X=!!String.prototype.trimStart,K=!!String.prototype.trimEnd,x=!!Number.isSafeInteger?Number.isSafeInteger:function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},j=!0;try{j="a"===(null===(R=$("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu").exec("a"))||void 0===R?void 0:R[0])}catch(e){j=!1}var Y,Z=D?function(e,t,r){return e.startsWith(t,r)}:function(e,t,r){return e.slice(r,r+t.length)===t},z=F?String.fromCodePoint:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r,n="",i=e.length,o=0;i>o;){if((r=e[o++])>1114111)throw RangeError(r+" is not a valid code point");n+=r<65536?String.fromCharCode(r):String.fromCharCode(55296+((r-=65536)>>10),r%1024+56320)}return n},W=k?Object.fromEntries:function(e){for(var t={},r=0,n=e;r<n.length;r++){var i=n[r],o=i[0],h=i[1];t[o]=h}return t},Q=V?function(e,t){return e.codePointAt(t)}:function(e,t){var r=e.length;if(!(t<0||t>=r)){var n,i=e.charCodeAt(t);return i<55296||i>56319||t+1===r||(n=e.charCodeAt(t+1))<56320||n>57343?i:n-56320+(i-55296<<10)+65536}},J=X?function(e){return e.trimStart()}:function(e){return e.replace(U,"")},q=K?function(e){return e.trimEnd()}:function(e){return e.replace(G,"")};function $(e,t){return new RegExp(e,t)}if(j){var ee=$("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Y=function(e,t){var r;return ee.lastIndex=t,null!==(r=ee.exec(e)[1])&&void 0!==r?r:""}}else Y=function(e,t){for(var r=[];;){var n=Q(e,t);if(void 0===n||ne(n)||ie(n))break;r.push(n),t+=n>=65536?2:1}return z.apply(void 0,r)};var te=function(){function e(e,t){void 0===t&&(t={}),this.message=e,this.position={offset:0,line:1,column:1},this.ignoreTag=!!t.ignoreTag,this.locale=t.locale,this.requiresOtherClause=!!t.requiresOtherClause,this.shouldParseSkeletons=!!t.shouldParseSkeletons}return e.prototype.parse=function(){if(0!==this.offset())throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(e,t,r){for(var o=[];!this.isEOF();){var h=this.char();if(123===h){if((s=this.parseArgument(e,r)).err)return s;o.push(s.val)}else{if(125===h&&e>0)break;if(35!==h||"plural"!==t&&"selectordinal"!==t){if(60===h&&!this.ignoreTag&&47===this.peek()){if(r)break;return this.error(n.UNMATCHED_CLOSING_TAG,w(this.clonePosition(),this.clonePosition()))}if(60===h&&!this.ignoreTag&&re(this.peek()||0)){if((s=this.parseTag(e,t)).err)return s;o.push(s.val)}else{var s;if((s=this.parseLiteral(e,t)).err)return s;o.push(s.val)}}else{var a=this.clonePosition();this.bump(),o.push({type:i.pound,location:w(a,this.clonePosition())})}}}return{val:o,err:null}},e.prototype.parseTag=function(e,t){var r=this.clonePosition();this.bump();var o=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:i.literal,value:"<".concat(o,"/>"),location:w(r,this.clonePosition())},err:null};if(this.bumpIf(">")){var h=this.parseMessage(e+1,t,!0);if(h.err)return h;var s=h.val,a=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!re(this.char()))return this.error(n.INVALID_TAG,w(a,this.clonePosition()));var u=this.clonePosition();return o!==this.parseTagName()?this.error(n.UNMATCHED_CLOSING_TAG,w(u,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:i.tag,value:o,children:s,location:w(r,this.clonePosition())},err:null}:this.error(n.INVALID_TAG,w(a,this.clonePosition())))}return this.error(n.UNCLOSED_TAG,w(r,this.clonePosition()))}return this.error(n.INVALID_TAG,w(r,this.clonePosition()))},e.prototype.parseTagName=function(){var e,t=this.offset();for(this.bump();!this.isEOF()&&(45===(e=this.char())||46===e||e>=48&&e<=57||95===e||e>=97&&e<=122||e>=65&&e<=90||183==e||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039);)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(e,t){for(var r=this.clonePosition(),n="";;){var o=this.tryParseQuote(t);if(o)n+=o;else{var h=this.tryParseUnquoted(e,t);if(h)n+=h;else{var s=this.tryParseLeftAngleBracket();if(!s)break;n+=s}}}var a=w(r,this.clonePosition());return{val:{type:i.literal,value:n,location:a},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return this.isEOF()||60!==this.char()||!this.ignoreTag&&(re(e=this.peek()||0)||47===e)?null:(this.bump(),"<");var e},e.prototype.tryParseQuote=function(e){if(this.isEOF()||39!==this.char())return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if("plural"===e||"selectordinal"===e)break;return null;default:return null}this.bump();var t=[this.char()];for(this.bump();!this.isEOF();){var r=this.char();if(39===r){if(39!==this.peek()){this.bump();break}t.push(39),this.bump()}else t.push(r);this.bump()}return z.apply(void 0,t)},e.prototype.tryParseUnquoted=function(e,t){if(this.isEOF())return null;var r=this.char();return 60===r||123===r||35===r&&("plural"===t||"selectordinal"===t)||125===r&&e>0?null:(this.bump(),z(r))},e.prototype.parseArgument=function(e,t){var r=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(n.EXPECT_ARGUMENT_CLOSING_BRACE,w(r,this.clonePosition()));if(125===this.char())return this.bump(),this.error(n.EMPTY_ARGUMENT,w(r,this.clonePosition()));var o=this.parseIdentifierIfPossible().value;if(!o)return this.error(n.MALFORMED_ARGUMENT,w(r,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(n.EXPECT_ARGUMENT_CLOSING_BRACE,w(r,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:i.argument,value:o,location:w(r,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(n.EXPECT_ARGUMENT_CLOSING_BRACE,w(r,this.clonePosition())):this.parseArgumentOptions(e,t,o,r);default:return this.error(n.MALFORMED_ARGUMENT,w(r,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var e=this.clonePosition(),t=this.offset(),r=Y(this.message,t),n=t+r.length;return this.bumpTo(n),{value:r,location:w(e,this.clonePosition())}},e.prototype.parseArgumentOptions=function(e,t,r,s){var a,u=this.clonePosition(),c=this.parseIdentifierIfPossible().value,l=this.clonePosition();switch(c){case"":return this.error(n.EXPECT_ARGUMENT_TYPE,w(u,l));case"number":case"date":case"time":this.bumpSpace();var p=null;if(this.bumpIf(",")){this.bumpSpace();var f=this.clonePosition();if((v=this.parseSimpleArgStyleIfPossible()).err)return v;if(0===(b=q(v.val)).length)return this.error(n.EXPECT_ARGUMENT_STYLE,w(this.clonePosition(),this.clonePosition()));p={style:b,styleLocation:w(f,this.clonePosition())}}if((_=this.tryParseArgumentClose(s)).err)return _;var E=w(s,this.clonePosition());if(p&&Z(null==p?void 0:p.style,"::",0)){var m=J(p.style.slice(2));if("number"===c)return(v=this.parseNumberSkeletonFromString(m,p.styleLocation)).err?v:{val:{type:i.number,value:r,location:E,style:v.val},err:null};if(0===m.length)return this.error(n.EXPECT_DATE_TIME_SKELETON,E);var g=m;this.locale&&(g=function(e,t){for(var r="",n=0;n<e.length;n++){var i=e.charAt(n);if("j"===i){for(var o=0;n+1<e.length&&e.charAt(n+1)===i;)o++,n++;var h=1+(1&o),s=o<2?1:3+(o>>1),a=M(t);for("H"!=a&&"k"!=a||(s=0);s-- >0;)r+="a";for(;h-- >0;)r=a+r}else r+="J"===i?"H":i}return r}(m,this.locale));var b={type:o.dateTime,pattern:g,location:p.styleLocation,parsedOptions:this.shouldParseSkeletons?B(g):{}};return{val:{type:"date"===c?i.date:i.time,value:r,location:E,style:b},err:null}}return{val:{type:"number"===c?i.number:"date"===c?i.date:i.time,value:r,location:E,style:null!==(a=null==p?void 0:p.style)&&void 0!==a?a:null},err:null};case"plural":case"selectordinal":case"select":var y=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(n.EXPECT_SELECT_ARGUMENT_OPTIONS,w(y,h({},y)));this.bumpSpace();var H=this.parseIdentifierIfPossible(),T=0;if("select"!==c&&"offset"===H.value){if(!this.bumpIf(":"))return this.error(n.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,w(this.clonePosition(),this.clonePosition()));var v;if(this.bumpSpace(),(v=this.tryParseDecimalInteger(n.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,n.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE)).err)return v;this.bumpSpace(),H=this.parseIdentifierIfPossible(),T=v.val}var _,A=this.tryParsePluralOrSelectOptions(e,c,t,H);if(A.err)return A;if((_=this.tryParseArgumentClose(s)).err)return _;var d=w(s,this.clonePosition());return"select"===c?{val:{type:i.select,value:r,options:W(A.val),location:d},err:null}:{val:{type:i.plural,value:r,options:W(A.val),offset:T,pluralType:"plural"===c?"cardinal":"ordinal",location:d},err:null};default:return this.error(n.INVALID_ARGUMENT_TYPE,w(u,l))}},e.prototype.tryParseArgumentClose=function(e){return this.isEOF()||125!==this.char()?this.error(n.EXPECT_ARGUMENT_CLOSING_BRACE,w(e,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var e=0,t=this.clonePosition();!this.isEOF();){switch(this.char()){case 39:this.bump();var r=this.clonePosition();if(!this.bumpUntil("'"))return this.error(n.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,w(r,this.clonePosition()));this.bump();break;case 123:e+=1,this.bump();break;case 125:if(!(e>0))return{val:this.message.slice(t.offset,this.offset()),err:null};e-=1;break;default:this.bump()}}return{val:this.message.slice(t.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(e,t){var r=[];try{r=function(e){if(0===e.length)throw new Error("Number skeleton cannot be empty");for(var t=[],r=0,n=e.split(v).filter((function(e){return e.length>0}));r<n.length;r++){var i=n[r].split("/");if(0===i.length)throw new Error("Invalid number skeleton");for(var o=i[0],h=i.slice(1),s=0,a=h;s<a.length;s++)if(0===a[s].length)throw new Error("Invalid number skeleton");t.push({stem:o,options:h})}return t}(e)}catch(e){return this.error(n.INVALID_NUMBER_SKELETON,t)}return{val:{type:o.number,tokens:r,location:t,parsedOptions:this.shouldParseSkeletons?C(r):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(e,t,r,i){for(var o,h=!1,s=[],a=new Set,u=i.value,c=i.location;;){if(0===u.length){var l=this.clonePosition();if("select"===t||!this.bumpIf("="))break;var p=this.tryParseDecimalInteger(n.EXPECT_PLURAL_ARGUMENT_SELECTOR,n.INVALID_PLURAL_ARGUMENT_SELECTOR);if(p.err)return p;c=w(l,this.clonePosition()),u=this.message.slice(l.offset,this.offset())}if(a.has(u))return this.error("select"===t?n.DUPLICATE_SELECT_ARGUMENT_SELECTOR:n.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,c);"other"===u&&(h=!0),this.bumpSpace();var f=this.clonePosition();if(!this.bumpIf("{"))return this.error("select"===t?n.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:n.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,w(this.clonePosition(),this.clonePosition()));var E=this.parseMessage(e+1,t,r);if(E.err)return E;var m=this.tryParseArgumentClose(f);if(m.err)return m;s.push([u,{value:E.val,location:w(f,this.clonePosition())}]),a.add(u),this.bumpSpace(),u=(o=this.parseIdentifierIfPossible()).value,c=o.location}return 0===s.length?this.error("select"===t?n.EXPECT_SELECT_ARGUMENT_SELECTOR:n.EXPECT_PLURAL_ARGUMENT_SELECTOR,w(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!h?this.error(n.MISSING_OTHER_CLAUSE,w(this.clonePosition(),this.clonePosition())):{val:s,err:null}},e.prototype.tryParseDecimalInteger=function(e,t){var r=1,n=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(r=-1);for(var i=!1,o=0;!this.isEOF();){var h=this.char();if(!(h>=48&&h<=57))break;i=!0,o=10*o+(h-48),this.bump()}var s=w(n,this.clonePosition());return i?x(o*=r)?{val:o,err:null}:this.error(t,s):this.error(e,s)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var e=this.position.offset;if(e>=this.message.length)throw Error("out of bound");var t=Q(this.message,e);if(void 0===t)throw Error("Offset ".concat(e," is at invalid UTF-16 code unit boundary"));return t},e.prototype.error=function(e,t){return{val:null,err:{kind:e,message:this.message,location:t}}},e.prototype.bump=function(){if(!this.isEOF()){var e=this.char();10===e?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=e<65536?1:2)}},e.prototype.bumpIf=function(e){if(Z(this.message,e,this.offset())){for(var t=0;t<e.length;t++)this.bump();return!0}return!1},e.prototype.bumpUntil=function(e){var t=this.offset(),r=this.message.indexOf(e,t);return r>=0?(this.bumpTo(r),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(e){if(this.offset()>e)throw Error("targetOffset ".concat(e," must be greater than or equal to the current offset ").concat(this.offset()));for(e=Math.min(e,this.message.length);;){var t=this.offset();if(t===e)break;if(t>e)throw Error("targetOffset ".concat(e," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&ne(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var e=this.char(),t=this.offset(),r=this.message.charCodeAt(t+(e>=65536?2:1));return null!=r?r:null},e}();function re(e){return e>=97&&e<=122||e>=65&&e<=90}function ne(e){return e>=9&&e<=13||32===e||133===e||e>=8206&&e<=8207||8232===e||8233===e}function ie(e){return e>=33&&e<=35||36===e||e>=37&&e<=39||40===e||41===e||42===e||43===e||44===e||45===e||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||91===e||92===e||93===e||94===e||96===e||123===e||124===e||125===e||126===e||161===e||e>=162&&e<=165||166===e||167===e||169===e||171===e||172===e||174===e||176===e||177===e||182===e||187===e||191===e||215===e||247===e||e>=8208&&e<=8213||e>=8214&&e<=8215||8216===e||8217===e||8218===e||e>=8219&&e<=8220||8221===e||8222===e||8223===e||e>=8224&&e<=8231||e>=8240&&e<=8248||8249===e||8250===e||e>=8251&&e<=8254||e>=8257&&e<=8259||8260===e||8261===e||8262===e||e>=8263&&e<=8273||8274===e||8275===e||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||8608===e||e>=8609&&e<=8610||8611===e||e>=8612&&e<=8613||8614===e||e>=8615&&e<=8621||8622===e||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||8658===e||8659===e||8660===e||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||8968===e||8969===e||8970===e||8971===e||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||9001===e||9002===e||e>=9003&&e<=9083||9084===e||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||9655===e||e>=9656&&e<=9664||9665===e||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||9839===e||e>=9840&&e<=10087||10088===e||10089===e||10090===e||10091===e||10092===e||10093===e||10094===e||10095===e||10096===e||10097===e||10098===e||10099===e||10100===e||10101===e||e>=10132&&e<=10175||e>=10176&&e<=10180||10181===e||10182===e||e>=10183&&e<=10213||10214===e||10215===e||10216===e||10217===e||10218===e||10219===e||10220===e||10221===e||10222===e||10223===e||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||10627===e||10628===e||10629===e||10630===e||10631===e||10632===e||10633===e||10634===e||10635===e||10636===e||10637===e||10638===e||10639===e||10640===e||10641===e||10642===e||10643===e||10644===e||10645===e||10646===e||10647===e||10648===e||e>=10649&&e<=10711||10712===e||10713===e||10714===e||10715===e||e>=10716&&e<=10747||10748===e||10749===e||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||11158===e||e>=11159&&e<=11263||e>=11776&&e<=11777||11778===e||11779===e||11780===e||11781===e||e>=11782&&e<=11784||11785===e||11786===e||11787===e||11788===e||11789===e||e>=11790&&e<=11798||11799===e||e>=11800&&e<=11801||11802===e||11803===e||11804===e||11805===e||e>=11806&&e<=11807||11808===e||11809===e||11810===e||11811===e||11812===e||11813===e||11814===e||11815===e||11816===e||11817===e||e>=11818&&e<=11822||11823===e||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||11840===e||11841===e||11842===e||e>=11843&&e<=11855||e>=11856&&e<=11857||11858===e||e>=11859&&e<=11903||e>=12289&&e<=12291||12296===e||12297===e||12298===e||12299===e||12300===e||12301===e||12302===e||12303===e||12304===e||12305===e||e>=12306&&e<=12307||12308===e||12309===e||12310===e||12311===e||12312===e||12313===e||12314===e||12315===e||12316===e||12317===e||e>=12318&&e<=12319||12320===e||12336===e||64830===e||64831===e||e>=65093&&e<=65094}function oe(e){e.forEach((function(e){if(delete e.location,f(e)||E(e))for(var t in e.options)delete e.options[t].location,oe(e.options[t].value);else c(e)&&b(e.style)||(l(e)||p(e))&&y(e.style)?delete e.style.location:g(e)&&oe(e.children)}))}function he(e,t){void 0===t&&(t={}),t=h({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var r=new te(e,t).parse();if(r.err){var i=SyntaxError(n[r.err.kind]);throw i.location=r.err.location,i.originalMessage=r.err.message,i}return(null==t?void 0:t.captureLocation)||oe(r.val),r.val}function se(e,t){var r=t&&t.cache?t.cache:me,n=t&&t.serializer?t.serializer:pe;return(t&&t.strategy?t.strategy:le)(e,{cache:r,serializer:n})}function ae(e,t,r,n){var i,o=null==(i=n)||"number"==typeof i||"boolean"==typeof i?n:r(n),h=t.get(o);return void 0===h&&(h=e.call(this,n),t.set(o,h)),h}function ue(e,t,r){var n=Array.prototype.slice.call(arguments,3),i=r(n),o=t.get(i);return void 0===o&&(o=e.apply(this,n),t.set(i,o)),o}function ce(e,t,r,n,i){return r.bind(t,e,n,i)}function le(e,t){return ce(e,this,1===e.length?ae:ue,t.cache.create(),t.serializer)}var pe=function(){return JSON.stringify(arguments)};function fe(){this.cache=Object.create(null)}fe.prototype.get=function(e){return this.cache[e]},fe.prototype.set=function(e,t){this.cache[e]=t};var Ee,me={create:function(){return new fe}},ge={variadic:function(e,t){return ce(e,this,ue,t.cache.create(),t.serializer)},monadic:function(e,t){return ce(e,this,ae,t.cache.create(),t.serializer)}};!function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"}(Ee||(Ee={}));var be,ye=function(e){function t(t,r,n){var i=e.call(this,t)||this;return i.code=r,i.originalMessage=n,i}return r(t,e),t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error),He=function(e){function t(t,r,n,i){return e.call(this,'Invalid values for "'.concat(t,'": "').concat(r,'". Options are "').concat(Object.keys(n).join('", "'),'"'),Ee.INVALID_VALUE,i)||this}return r(t,e),t}(ye),Te=function(e){function t(t,r,n){return e.call(this,'Value for "'.concat(t,'" must be of type ').concat(r),Ee.INVALID_VALUE,n)||this}return r(t,e),t}(ye),Be=function(e){function t(t,r){return e.call(this,'The intl string context variable "'.concat(t,'" was not provided to the string "').concat(r,'"'),Ee.MISSING_VALUE,r)||this}return r(t,e),t}(ye);function ve(e){return"function"==typeof e}function _e(e,t,r,n,i,o,h){if(1===e.length&&a(e[0]))return[{type:be.literal,value:e[0].value}];for(var s=[],H=0,T=e;H<T.length;H++){var B=T[H];if(a(B))s.push({type:be.literal,value:B.value});else if(m(B))"number"==typeof o&&s.push({type:be.literal,value:r.getNumberFormat(t).format(o)});else{var v=B.value;if(!i||!(v in i))throw new Be(v,h);var _=i[v];if(u(B))_&&"string"!=typeof _&&"number"!=typeof _||(_="string"==typeof _||"number"==typeof _?String(_):""),s.push({type:"string"==typeof _?be.literal:be.object,value:_});else if(l(B)){var A="string"==typeof B.style?n.date[B.style]:y(B.style)?B.style.parsedOptions:void 0;s.push({type:be.literal,value:r.getDateTimeFormat(t,A).format(_)})}else if(p(B)){A="string"==typeof B.style?n.time[B.style]:y(B.style)?B.style.parsedOptions:n.time.medium;s.push({type:be.literal,value:r.getDateTimeFormat(t,A).format(_)})}else if(c(B)){(A="string"==typeof B.style?n.number[B.style]:b(B.style)?B.style.parsedOptions:void 0)&&A.scale&&(_*=A.scale||1),s.push({type:be.literal,value:r.getNumberFormat(t,A).format(_)})}else{if(g(B)){var d=B.children,L=B.value,P=i[L];if(!ve(P))throw new Te(L,"function",h);var S=P(_e(d,t,r,n,i,o).map((function(e){return e.value})));Array.isArray(S)||(S=[S]),s.push.apply(s,S.map((function(e){return{type:"string"==typeof e?be.literal:be.object,value:e}})))}if(f(B)){if(!(N=B.options[_]||B.options.other))throw new He(B.value,_,Object.keys(B.options),h);s.push.apply(s,_e(N.value,t,r,n,i))}else if(E(B)){var N;if(!(N=B.options["=".concat(_)])){if(!Intl.PluralRules)throw new ye('Intl.PluralRules is not available in this environment.\nTry polyfilling it using "@formatjs/intl-pluralrules"\n',Ee.MISSING_INTL_API,h);var I=r.getPluralRules(t,{type:B.pluralType}).select(_-(B.offset||0));N=B.options[I]||B.options.other}if(!N)throw new He(B.value,_,Object.keys(B.options),h);s.push.apply(s,_e(N.value,t,r,n,i,_-(B.offset||0)))}else;}}}return function(e){return e.length<2?e:e.reduce((function(e,t){var r=e[e.length-1];return r&&r.type===be.literal&&t.type===be.literal?r.value+=t.value:e.push(t),e}),[])}(s)}function Ae(e,t){return t?Object.keys(e).reduce((function(r,n){var i,o;return r[n]=(i=e[n],(o=t[n])?h(h(h({},i||{}),o||{}),Object.keys(i).reduce((function(e,t){return e[t]=h(h({},i[t]),o[t]||{}),e}),{})):i),r}),h({},e)):e}function de(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,r){e[t]=r}}}}}!function(e){e[e.literal=0]="literal",e[e.object=1]="object"}(be||(be={}));var Le=function(){function e(t,r,n,i){var o,h=this;if(void 0===r&&(r=e.defaultLocale),this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(e){var t=h.formatToParts(e);if(1===t.length)return t[0].value;var r=t.reduce((function(e,t){return e.length&&t.type===be.literal&&"string"==typeof e[e.length-1]?e[e.length-1]+=t.value:e.push(t.value),e}),[]);return r.length<=1?r[0]||"":r},this.formatToParts=function(e){return _e(h.ast,h.locales,h.formatters,h.formats,e,void 0,h.message)},this.resolvedOptions=function(){return{locale:h.resolvedLocale.toString()}},this.getAst=function(){return h.ast},this.locales=r,this.resolvedLocale=e.resolveLocale(r),"string"==typeof t){if(this.message=t,!e.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");this.ast=e.__parse(t,{ignoreTag:null==i?void 0:i.ignoreTag,locale:this.resolvedLocale})}else this.ast=t;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=Ae(e.formats,n),this.formatters=i&&i.formatters||(void 0===(o=this.formatterCache)&&(o={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:se((function(){for(var e,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return new((e=Intl.NumberFormat).bind.apply(e,s([void 0],t,!1)))}),{cache:de(o.number),strategy:ge.variadic}),getDateTimeFormat:se((function(){for(var e,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return new((e=Intl.DateTimeFormat).bind.apply(e,s([void 0],t,!1)))}),{cache:de(o.dateTime),strategy:ge.variadic}),getPluralRules:se((function(){for(var e,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return new((e=Intl.PluralRules).bind.apply(e,s([void 0],t,!1)))}),{cache:de(o.pluralRules),strategy:ge.variadic})})}return Object.defineProperty(e,"defaultLocale",{get:function(){return e.memoizedDefaultLocale||(e.memoizedDefaultLocale=(new Intl.NumberFormat).resolvedOptions().locale),e.memoizedDefaultLocale},enumerable:!1,configurable:!0}),e.memoizedDefaultLocale=null,e.resolveLocale=function(e){var t=Intl.NumberFormat.supportedLocalesOf(e);return t.length>0?new Intl.Locale(t[0]):new Intl.Locale("string"==typeof e?e:e[0])},e.__parse=he,e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},e}(),Pe=Le;e.FormatIcu=()=>(e,t)=>(t.setFinalFormatter((()=>{const e=new Map;function t(e){try{return Boolean(Intl.NumberFormat.supportedLocalesOf(e).length)}catch(e){return!1}}function r(r){if(!e.get(r)){let n=String(r).replace(/[^a-zA-Z]/g,"-");for(;!t(n);)n=n.split("-").slice(0,-1).join("-")||"en";e.set(r,n)}return e.get(r)}return Object.freeze({getLanguage:r,format:({translation:e,language:t,params:n})=>{const i=!Object.values(n||{}).find((e=>"function"==typeof e)),o=r(t);return new Pe(e,o,void 0,{ignoreTag:i}).format(n)}})})()),e),Object.defineProperty(e,"__esModule",{value:!0})}));
//# sourceMappingURL=tolgee-format-icu.umd.min.js.map
{
"name": "@tolgee/format-icu",
"version": "5.30.2-prerelease.4588b3b3.0",
"version": "5.31.0",
"description": "Tolgee format-icu plugin.",

@@ -55,3 +55,3 @@ "main": "./dist/tolgee-format-icu.cjs.js",

"@testing-library/jest-dom": "^5.16.5",
"@tolgee/core": "5.30.2-prerelease.4588b3b3.0",
"@tolgee/core": "5.31.0",
"@types/jest": "^27.0.2",

@@ -61,3 +61,3 @@ "@types/node": "^17.0.8",

"concurrently": "7.3.0",
"intl-messageformat": "^10.7.3",
"intl-messageformat": "^9.9.1",
"jest": "~27.5.1",

@@ -77,3 +77,3 @@ "jest-environment-jsdom": "~27.5.1",

"sideEffects": false,
"gitHead": "710ac8c2eb8c101c224b977a21813806a649c116"
"gitHead": "f0d2ca0909442e551bf48523fac1f5bd2737325b"
}

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 not supported yet

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

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

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