messageformat-wrapper 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: c46becbfc85a8a93dad68b5dc56c57f49199db1b2e850435323219e3e74ecb03
4
+ data.tar.gz: e59561ec34d12cd4c27f161e4ad53c61acc1e229eb4bdfe8d17eacc235b8b5b5
5
+ SHA512:
6
+ metadata.gz: fc0b838ba2d8d7132863509efe815b72f6c2f8ec914c641492c4302bbbc442fc16a252bd36811d4350f9ac75da525f990e2e87710c25b5a3e3c2d0be40a5cc2b
7
+ data.tar.gz: 82228aa62d6c9d48d44982143a39684c89d222c99b3a5ac4c54fe1ff0d9b0c547a2e7f05fea8ead1d7cc60e9f7143805fe1ca8f543ae4af48017810d50e8f6b2
data/.rubocop.yml ADDED
@@ -0,0 +1,9 @@
1
+ inherit_gem:
2
+ rubocop-discourse: default.yml
3
+ inherit_mode:
4
+ merge:
5
+ - Exclude
6
+ Discourse/NoChdir:
7
+ Enabled: false
8
+ RSpec:
9
+ Enabled: false
data/.streerc ADDED
@@ -0,0 +1,2 @@
1
+ --print-width=100
2
+ --plugins=plugin/trailing_comma,plugin/disable_auto_ternary
data/CHANGELOG.md ADDED
@@ -0,0 +1,5 @@
1
+ ## [Unreleased]
2
+
3
+ ## [1.0.0] - 2024-06-17
4
+
5
+ - Initial release
@@ -0,0 +1,84 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
+
7
+ We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8
+
9
+ ## Our Standards
10
+
11
+ Examples of behavior that contributes to a positive environment for our community include:
12
+
13
+ * Demonstrating empathy and kindness toward other people
14
+ * Being respectful of differing opinions, viewpoints, and experiences
15
+ * Giving and gracefully accepting constructive feedback
16
+ * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17
+ * Focusing on what is best not just for us as individuals, but for the overall community
18
+
19
+ Examples of unacceptable behavior include:
20
+
21
+ * The use of sexualized language or imagery, and sexual attention or
22
+ advances of any kind
23
+ * Trolling, insulting or derogatory comments, and personal or political attacks
24
+ * Public or private harassment
25
+ * Publishing others' private information, such as a physical or email
26
+ address, without their explicit permission
27
+ * Other conduct which could reasonably be considered inappropriate in a
28
+ professional setting
29
+
30
+ ## Enforcement Responsibilities
31
+
32
+ Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
33
+
34
+ Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
35
+
36
+ ## Scope
37
+
38
+ This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
39
+
40
+ ## Enforcement
41
+
42
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at asooomaasoooma90@gmail.com. All complaints will be reviewed and investigated promptly and fairly.
43
+
44
+ All community leaders are obligated to respect the privacy and security of the reporter of any incident.
45
+
46
+ ## Enforcement Guidelines
47
+
48
+ Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
49
+
50
+ ### 1. Correction
51
+
52
+ **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
53
+
54
+ **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
55
+
56
+ ### 2. Warning
57
+
58
+ **Community Impact**: A violation through a single incident or series of actions.
59
+
60
+ **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
61
+
62
+ ### 3. Temporary Ban
63
+
64
+ **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
65
+
66
+ **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
67
+
68
+ ### 4. Permanent Ban
69
+
70
+ **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
71
+
72
+ **Consequence**: A permanent ban from any sort of public interaction within the community.
73
+
74
+ ## Attribution
75
+
76
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
77
+ available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
78
+
79
+ Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
80
+
81
+ [homepage]: https://www.contributor-covenant.org
82
+
83
+ For answers to common questions about this code of conduct, see the FAQ at
84
+ https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
data/Gemfile ADDED
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gemspec
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Discourse
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,61 @@
1
+ # MessageFormat
2
+
3
+ A wrapper gem for the `@messageformant/core` [npm package](https://www.npmjs.com/package/@messageformat/core) to compile MessageFormat messages.
4
+
5
+ This gem uses [`mini_racer`](https://github.com/rubyjs/mini_racer) to call the `@messageformat/core` npm package.
6
+
7
+ ## Installation
8
+
9
+ Install the gem and add to the application's Gemfile by executing:
10
+
11
+ $ bundle add messageformat-wrapper --require messageformat
12
+
13
+ If bundler is not being used to manage dependencies, install the gem by executing:
14
+
15
+ $ gem install messageformat-wrapper
16
+
17
+ ## Usage
18
+
19
+ ```ruby
20
+ require "messageformat"
21
+
22
+ messages =
23
+ {
24
+ a: "A {TYPE} example.",
25
+ b: "This has {COUNT, plural, one{one member} other{# members}}.",
26
+ c: "We have {P, number, percent} code coverage.",
27
+ }
28
+ MessageFormat.compile("en", messages)
29
+ # Will output:
30
+ #
31
+ # import { number, plural } from "@messageformat/runtime";
32
+ # import { en } from "@messageformat/runtime/lib/cardinals";
33
+ # import { numberPercent } from "@messageformat/runtime/lib/formatters";
34
+ # export default {
35
+ # a: (d) => "A " + d.TYPE + " example.",
36
+ # b: (d) => "This has " + plural(d.COUNT, 0, en, { one: "one member", other: number("en", d.COUNT, 0) + " members" }) + ".",
37
+ # c: (d) => "We have " + numberPercent(d.P, "en") + " code coverage."
38
+ # }
39
+ ```
40
+
41
+ Syntactically-broken messages will raise a `MessageFormat::Compiler::CompileError` exception.
42
+
43
+ ## Development
44
+
45
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
46
+
47
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, update the `CHANGELOG.md` file, and commit the changes and push to GitHub. Our GitHub Action will then take care of pushing the new version to rubygems.org.
48
+
49
+ Instructions for updating the distributed copy of `@messageformat/core` that's included with this gem can be found in the README in the `messageformat-miniracer` directory.
50
+
51
+ ## Contributing
52
+
53
+ Bug reports and pull requests are welcome on GitHub at https://github.com/discourse/messageformat. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/discourse/messageformat/blob/main/CODE_OF_CONDUCT.md).
54
+
55
+ ## License
56
+
57
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
58
+
59
+ ## Code of Conduct
60
+
61
+ Everyone interacting in the MessageFormat project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/discourse/messageformat/blob/main/CODE_OF_CONDUCT.md).
data/Rakefile ADDED
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ require "rake/testtask"
5
+
6
+ Rake::TestTask.new(:test) do |t|
7
+ t.libs << "spec"
8
+ t.libs << "lib"
9
+ t.test_files = FileList["spec/**/*_spec.rb"]
10
+ end
11
+
12
+ require "rubocop/rake_task"
13
+
14
+ RuboCop::RakeTask.new
15
+
16
+ task default: %i[test rubocop]
@@ -0,0 +1 @@
1
+ var compileModule,__webpack_modules__={561:(e,t,r)=>{e.exports=r(390)},390:(e,t,r)=>{"use strict";var n=r(121),i=r(248);function s(e,t=0){if("object"!=typeof e)return e;const r=" ".repeat(t);return`{${Object.keys(e).map((i=>{const o=s(e[i],t+1);return`\n${r} ${n.property(null,i)}: ${o}`})).join(",")}\n${r}}`}e.exports=function(e,t){const{plurals:r}=e,n={};if(r.length>1)for(const e of r)n[e.lc]=n[e.locale]=e;const o=new i(e.options),a=s(o.compile(t,r[0],n)),c=function(e){const t={},r={};for(const[n,i]of Object.entries(e))if(i.module){const e=i.id&&i.id!==n?`${i.id} as ${n}`:n,r=t[i.module];t[i.module]=r?[...r,e]:[e]}else r[n]=String(i);const n=Object.entries(t).map((([e,t])=>`import { ${t.sort().join(", ")} } from ${JSON.stringify(e)};`)),i=Object.entries(r).map((([e,t])=>new RegExp(`^function ${e}\\b`).test(t)?t:`const ${e} = ${t};`));return n.length>0&&i.length>0&&n.push(""),n.concat(i).join("\n")}(o.runtime);return`${c}\nexport default ${a}`}},248:(e,t,r)=>{"use strict";var n=r(845),i=r(571),s=r(362),o=r(121);function a(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var c=a(i),u=a(s);class l extends Error{constructor(e,t,r){super(e),this.token=t,this.type=r||"error"}}const f=e=>e<4?"short":4===e?"long":"narrow",h=e=>e%2==0?"2-digit":"numeric";function p(e,t){switch(e.width){case 1:return"numeric";case 2:return"2-digit";case 3:return"short";case 4:return"long";case 5:return"narrow";default:return void t(`${e.desc} is not supported with width ${e.width}`)}}function d(e,t){const{char:r,desc:n,width:i}=e;return"d"===r?h(i):void t(`${n} is not supported`)}function m(e,t){const{char:r,desc:n,width:i}=e;return("c"===r||"e"===r)&&i<3&&t(`Numeric value is not supported for ${n}; falling back to weekday:short`,l.WARNING),f(i)}function g(e,t){const{char:r,desc:n,width:i}=e;switch(r){case"v":case"z":return 4===i?"long":"short";case"V":return 4===i?"long":void t(`${n} is not supported with width ${i}`);case"X":return void t(`${n} is not supported`)}return"short"}function y(e,t){switch(e.field){case"era":return{era:f(e.width)};case"year":return function(e,t){switch(e.char){case"y":return{year:h(e.width)};case"r":return{calendar:"gregory",year:"numeric"};default:return t(`${e.desc} is not supported; falling back to year:numeric`,l.WARNING),{year:"numeric"}}}(e,t);case"month":return{month:p(e,t)};case"day":return{day:d(e,t)};case"weekday":return{weekday:m(e,t)};case"period":return;case"hour":return function(e){const t=h(e.width);let r;switch(e.char){case"h":r="h12";break;case"H":r="h23";break;case"k":r="h24";break;case"K":r="h11"}return r?{hour:t,hourCycle:r}:{hour:t}}(e);case"min":return{minute:h(e.width)};case"sec":return{second:h(e.width)};case"tz":return{timeZoneName:g(e,t)};case"quarter":case"week":case"sec-frac":case"ms":t(`${e.desc} is not supported`)}}function w(e,t=(e=>{throw e})){const r={},n=[];for(const i of e){const{error:e,field:s,str:o}=i;if(e){const r=new l(e.message,i);r.stack=e.stack,t(r)}o&&t(new l(`Ignoring string part: ${o}`,i,l.WARNING)),s&&(-1===n.indexOf(s)?n.push(s):t(new l(`Duplicate ${s} token`,i)));const a=y(i,((e,r)=>t(new l(e,i,r))));a&&Object.assign(r,a)}return r}const b={G:{field:"era",desc:"Era"},y:{field:"year",desc:"Year"},Y:{field:"year",desc:'Year of "Week of Year"'},u:{field:"year",desc:"Extended year"},U:{field:"year",desc:"Cyclic year name"},r:{field:"year",desc:"Related Gregorian year"},Q:{field:"quarter",desc:"Quarter"},q:{field:"quarter",desc:"Stand-alone quarter"},M:{field:"month",desc:"Month in year"},L:{field:"month",desc:"Stand-alone month in year"},w:{field:"week",desc:"Week of year"},W:{field:"week",desc:"Week of month"},d:{field:"day",desc:"Day in month"},D:{field:"day",desc:"Day of year"},F:{field:"day",desc:"Day of week in month"},g:{field:"day",desc:"Modified julian day"},E:{field:"weekday",desc:"Day of week"},e:{field:"weekday",desc:"Local day of week"},c:{field:"weekday",desc:"Stand-alone local day of week"},a:{field:"period",desc:"AM/PM marker"},b:{field:"period",desc:"AM/PM/noon/midnight marker"},B:{field:"period",desc:"Flexible day period"},h:{field:"hour",desc:"Hour in AM/PM (1~12)"},H:{field:"hour",desc:"Hour in day (0~23)"},k:{field:"hour",desc:"Hour in day (1~24)"},K:{field:"hour",desc:"Hour in AM/PM (0~11)"},j:{field:"hour",desc:"Hour in preferred cycle"},J:{field:"hour",desc:"Hour in preferred cycle without marker"},C:{field:"hour",desc:"Hour in preferred cycle with flexible marker"},m:{field:"min",desc:"Minute in hour"},s:{field:"sec",desc:"Second in minute"},S:{field:"sec-frac",desc:"Fractional second"},A:{field:"ms",desc:"Milliseconds in day"},z:{field:"tz",desc:"Time Zone: specific non-location"},Z:{field:"tz",desc:"Time Zone"},O:{field:"tz",desc:"Time Zone: localized"},v:{field:"tz",desc:"Time Zone: generic non-location"},V:{field:"tz",desc:"Time Zone: ID"},X:{field:"tz",desc:"Time Zone: ISO8601 with Z"},x:{field:"tz",desc:"Time Zone: ISO8601"}},k=e=>e>="A"&&e<="Z"||e>="a"&&e<="z";function x(e,t){const r=e[t];if(!r)return null;if(k(r))return function(e,t){const r=e[t];let n=1;for(;e[++t]===r;)++n;const i=b[r];return i?{char:r,field:i.field,desc:i.desc,width:n}:{char:r,error:new Error(`The letter ${r} is not a valid field identifier`),width:n}}(e,t);if("'"===r)return function(e,t){let r=e[++t],n=2;if("'"===r)return{char:"'",str:r,width:n};for(;;){const i=e[++t];if(++n,void 0===i)return{char:"'",error:new Error(`Unterminated quoted literal in pattern: ${r||e}`),str:r,width:n};if("'"===i){if("'"!==e[++t])return{char:"'",str:r,width:n};++n}r+=i}}(e,t);let n=r,i=1;for(;;){const s=e[++t];if(!s||k(s)||"'"===s)return{char:r,str:n,width:i};n+=s,i+=1}}function v(e){const t=[];let r=0;for(;;){const n=x(e,r);if(!n)return t;t.push(n),r+=n.width}}class S extends Error{constructor(e,t){super(t),this.code=e}}class $ extends S{constructor(e,t){super("BAD_OPTION",`Unknown ${e} option: ${t}`),this.stem=e,this.option=t}}class _ extends S{constructor(e){super("BAD_STEM",`Unknown stem: ${e}`),this.stem=e}}class O extends S{constructor(e,t){super("MASKED_VALUE",`Value for ${e} is set multiple times`),this.type=e,this.prev=t}}class E extends S{constructor(e){super("MISSING_OPTION",`Required option missing for ${e}`),this.stem=e}}class N extends S{constructor(e,t){super("BAD_PATTERN",t),this.char=e}}class j extends S{constructor(e,t,r){super("TOO_MANY_OPTIONS",`Token ${e} only supports ${r>1?`${r} options`:"one option"} (got ${t.length})`),this.stem=e,this.options=t}}class D extends S{constructor(e,t){super("UNSUPPORTED",`The stem ${e} is not supported`),this.stem=e,t&&(this.message+=` with value ${t}`,this.source=t)}}function T(e,{numberingSystem:t}){return Array.isArray(e)||(e=[e]),t?e.map((e=>{const r=-1===e.indexOf("-u-")?"u-nu":"nu";return`${e}-${r}-${t}`})).concat(e):e}function F({scale:e,unit:t}){let r="number"==typeof e&&e>=0?e:1;return t&&"percent"===t.style&&(r*=.01),r}function P(e,t){const{decimal:r,group:n,integerWidth:i,notation:s,precision:o,roundingMode:a,sign:c,unit:u,unitPer:l,unitWidth:f}=e,h=(e,r)=>{t&&t(new D(e,r))},p={};if(u)switch(u.style){case"base-unit":p.style="decimal";break;case"currency":p.style="currency",p.currency=u.currency;break;case"measure-unit":p.style="unit",p.unit=u.unit.replace(/.*-/,""),l&&(p.unit+="-per-"+l.replace(/.*-/,""));break;case"percent":p.style="percent";break;case"permille":h("permille")}switch(f){case"unit-width-full-name":p.currencyDisplay="name",p.unitDisplay="long";break;case"unit-width-hidden":h(f);break;case"unit-width-iso-code":p.currencyDisplay="code";break;case"unit-width-narrow":p.currencyDisplay="narrowSymbol",p.unitDisplay="narrow";break;case"unit-width-short":p.currencyDisplay="symbol",p.unitDisplay="short"}switch(n){case"group-off":p.useGrouping=!1;break;case"group-auto":p.useGrouping=!0;break;case"group-min2":case"group-on-aligned":case"group-thousands":h(n),p.useGrouping=!0}if(o)switch(o.style){case"precision-fraction":{const{minFraction:e,maxFraction:t,minSignificant:r,maxSignificant:n,source:i}=o;"number"==typeof e&&(p.minimumFractionDigits=e,"number"==typeof r&&h("precision-fraction",i)),"number"==typeof t&&(p.maximumFractionDigits=t),"number"==typeof r&&(p.minimumSignificantDigits=r),"number"==typeof n&&(p.maximumSignificantDigits=n);break}case"precision-integer":p.maximumFractionDigits=0;break;case"precision-unlimited":p.maximumFractionDigits=20;break;case"precision-increment":break;case"precision-currency-standard":p.trailingZeroDisplay=o.trailingZero;break;case"precision-currency-cash":h(o.style)}if(s)switch(s.style){case"compact-short":p.notation="compact",p.compactDisplay="short";break;case"compact-long":p.notation="compact",p.compactDisplay="long";break;case"notation-simple":p.notation="standard";break;case"scientific":case"engineering":{const{expDigits:e,expSign:t,source:r,style:n}=s;p.notation=n,(e&&e>1||t&&"sign-auto"!==t)&&h(n,r);break}}if(i){const{min:e,max:t,source:r}=i;if(e>0&&(p.minimumIntegerDigits=e),Number(t)>0){const e="engineering"===p.notation||"scientific"===p.notation;3===t&&e?p.notation="engineering":h("integer-width",r)}}switch(c){case"sign-auto":p.signDisplay="auto";break;case"sign-always":p.signDisplay="always";break;case"sign-except-zero":p.signDisplay="exceptZero";break;case"sign-never":p.signDisplay="never";break;case"sign-accounting":p.currencySign="accounting";break;case"sign-accounting-always":p.currencySign="accounting",p.signDisplay="always";break;case"sign-accounting-except-zero":p.currencySign="accounting",p.signDisplay="exceptZero"}return"decimal-always"===r&&h(r),a&&h(a),p}function A(e,t,r){const n=e[t];switch(n){case"%":return{char:"%",style:"percent",width:1};case"‰":return{char:"%",style:"permille",width:1};case"¤":{let i=1;for(;"¤"===e[++t];)++i;switch(i){case 1:return{char:n,currency:"default",width:i};case 2:return{char:n,currency:"iso-code",width:i};case 3:return{char:n,currency:"full-name",width:i};case 5:return{char:n,currency:"narrow",width:i};default:return r(new N("¤",`Invalid number (${i}) of ¤ chars in pattern`)),null}}case"*":{const r=e[t+1];if(r)return{char:n,pad:r,width:2};break}case"+":case"-":return{char:n,width:1};case"'":{let i=e[++t],s=2;if("'"===i)return{char:n,str:i,width:s};for(;;){const o=e[++t];if(++s,void 0===o)return r(new N("'",`Unterminated quoted literal in pattern: ${i}`)),{char:n,str:i,width:s};if("'"===o){if("'"!==e[++t])return{char:n,str:i,width:s};++s}i+=o}}}return null}const q=e=>e>="0"&&e<="9";function M(e,t){const r=e[t];if(q(r)){let n=r;for(;;){const r=e[++t];if(!q(r))return{char:"0",digits:n,width:n.length};n+=r}}switch(r){case"#":{let n=1;for(;"#"===e[++t];)++n;return{char:r,width:n}}case"@":{let n=1;for(;"@"===e[++t];)++n;let i=n;for(t-=1;"#"===e[++t];)++i;return{char:r,min:n,width:i}}case"E":{const n="+"===e[t+1];n&&++t;let i=0;for(;"0"===e[++t];)++i;if(i)return{char:r,expDigits:i,plus:n,width:(n?2:1)+i};break}case".":case",":return{char:r,width:1}}return null}function I(e,t,r){let n;!function(e){e[e.Prefix=0]="Prefix",e[e.Number=1]="Number",e[e.Suffix=2]="Suffix"}(n||(n={}));const i=[],s=[],o=[];let a=n.Prefix,c="";for(;t<e.length;){const u=e[t];if(";"===u){t+=1;break}switch(a){case n.Prefix:{const o=A(e,t,r);if(o)c&&(i.push({char:"'",str:c,width:c.length}),c=""),i.push(o),t+=o.width;else{const r=M(e,t);r?(c&&(i.push({char:"'",str:c,width:c.length}),c=""),a=n.Number,s.push(r),t+=r.width):(c+=u,t+=1)}break}case n.Number:{const r=M(e,t);r?(s.push(r),t+=r.width):a=n.Suffix;break}case n.Suffix:{const n=A(e,t,r);n?(c&&(o.push({char:"'",str:c,width:c.length}),c=""),o.push(n),t+=n.width):(c+=u,t+=1);break}}}return c&&o.push({char:"'",str:c,width:c.length}),{pattern:{prefix:i,number:s,suffix:o},pos:t}}function B(e,t,r,n,i){let s=!1,o="";for(const a of e)switch(a.char){case"%":t.unit={style:a.style},i?s=!0:o="";break;case"¤":if(!r){n(new N("¤","The ¤ pattern requires a currency"));break}switch(t.unit={style:"currency",currency:r},a.currency){case"iso-code":t.unitWidth="unit-width-iso-code";break;case"full-name":t.unitWidth="unit-width-full-name";break;case"narrow":t.unitWidth="unit-width-narrow"}i?s=!0:o="";break;case"*":break;case"+":s||(o+="+");break;case"'":s||(o+=a.str)}return o}function R(e,t){let r=!1,n="";for(const i of e)switch(i.char){case"%":case"¤":t?r=!0:n="";break;case"-":r||(n+="-");break;case"'":r||(n+=i.str)}return n}function z(e,t,r=(e=>{throw e})){const{tokens:n,negative:i}=function(e,t){const{pattern:r,pos:n}=I(e,0,t);if(n<e.length){const{pattern:i}=I(e,n,t);return{tokens:r,negative:i}}return{tokens:r}}(e,r),s=function(e,t){const r={};let n=!1,i=!1,s=0,o="",a=-1,c="",u=0;for(let l=0;l<e.length;++l){const f=e[l];switch(f.char){case"#":-1===a?(o&&t(new N("#","Pattern has # after integer digits")),s+=f.width):u+=f.width;break;case"0":-1===a?o+=f.digits:(u&&t(new N("0","Pattern has digits after # in fraction")),c+=f.digits);break;case"@":r.precision&&t(new O("precision",r.precision)),r.precision={style:"precision-fraction",minSignificant:f.min,maxSignificant:f.width};break;case",":n=!0;break;case".":1===a&&t(new N(".","Pattern has more than one decimal separator")),a=l;break;case"E":i&&t(new O("exponent",r.notation)),n&&t(new N("E","Exponential patterns may not contain grouping separators")),r.notation={style:"scientific"},f.expDigits>1&&(r.notation.expDigits=f.expDigits),f.plus&&(r.notation.expSign="sign-always"),i=!0}}n?r.group="group-auto":s+o.length>3&&(r.group="group-off");const l=Number(`${o||"0"}.${c}`);if(l&&(r.precision={style:"precision-increment",increment:l}),i)if(r.precision&&!l||(r.integerWidth=s?{min:1,max:s+o.length}:{min:Math.max(1,o.length)}),r.precision)l||(r.integerWidth={min:1,max:1});else{const e=o.length+c.length;-1===a?e>0&&(r.precision={style:"precision-fraction",maxSignificant:e}):(r.precision={style:"precision-fraction",maxSignificant:Math.max(1,e)+u},e>1&&(r.precision.minSignificant=e))}else o.length>1&&(r.integerWidth={min:o.length}),r.precision||!c.length&&!u||(r.precision={style:"precision-fraction",minFraction:c.length,maxFraction:c.length+u});return r}(n.number,r),o=B(n.prefix,s,t,r,!0),a=B(n.suffix,s,t,r,!1);if(i){const e=R(i.prefix,!0),t=R(i.suffix,!1);s.affix={pos:[o,a],neg:[e,t]},s.sign="sign-never"}else(o||a)&&(s.affix={pos:[o,a]});return s}function J(e){const[t]=e.split("-",1);return-1!==["acceleration","angle","area","concentr","consumption","digital","duration","electric","energy","force","frequency","graphics","length","light","mass","power","pressure","speed","temperature","torque","volume"].indexOf(t)}const W={"compact-short":0,"compact-long":0,"notation-simple":0,scientific:2,engineering:2,percent:0,permille:0,"base-unit":0,currency:1,"measure-unit":1,"per-measure-unit":1,"unit-width-narrow":0,"unit-width-short":0,"unit-width-full-name":0,"unit-width-iso-code":0,"unit-width-hidden":0,"precision-integer":0,"precision-unlimited":0,"precision-currency-standard":1,"precision-currency-cash":0,"precision-increment":1,"rounding-mode-ceiling":0,"rounding-mode-floor":0,"rounding-mode-down":0,"rounding-mode-up":0,"rounding-mode-half-even":0,"rounding-mode-half-down":0,"rounding-mode-half-up":0,"rounding-mode-unnecessary":0,"integer-width":1,scale:1,"group-off":0,"group-min2":0,"group-auto":0,"group-on-aligned":0,"group-thousands":0,latin:0,"numbering-system":1,"sign-auto":0,"sign-always":0,"sign-never":0,"sign-accounting":0,"sign-accounting-always":0,"sign-except-zero":0,"sign-accounting-except-zero":0,"decimal-auto":0,"decimal-always":0},Z={currency:1,"integer-width":1,"measure-unit":1,"numbering-system":1,"per-measure-unit":1,"precision-increment":1,scale:1};function U(e,t){const r="fraction"===t?/^\.(0*)(\+|#*)$/:/^(@+)(\+|#*)$/,n=e&&e.match(r);if(n){const e=n[1].length;switch(n[2].charAt(0)){case"":return{min:e,max:e};case"+":return{min:e,max:null};case"#":return{min:e,max:e+n[2].length}}}return null}class C{constructor(e){this.skeleton={},this.onError=e}badOption(e,t){this.onError(new $(e,t))}assertEmpty(e){const t=this.skeleton[e];t&&this.onError(new O(e,t))}parseToken(e,t){if(!function(e,t,r){if(function(e){return e in W}(e)){const n=W[e];if(t.length>n){if(0===n)for(const n of t)r(new $(e,n));else r(new j(e,t,n));return!1}if(function(e){return e in Z}(e)&&t.length<Z[e])return r(new E(e)),!1}return!0}(e,t,this.onError))return;const r=t[0],n=this.skeleton;switch(e){case"compact-short":case"compact-long":case"notation-simple":this.assertEmpty("notation"),n.notation={style:e};break;case"scientific":case"engineering":{let r,i=null;for(const n of t)switch(n){case"sign-auto":case"sign-always":case"sign-never":case"sign-accounting":case"sign-accounting-always":case"sign-except-zero":case"sign-accounting-except-zero":r=n;break;default:/^\+e+$/.test(n)?i=n.length-1:this.badOption(e,n)}this.assertEmpty("notation");const s=t.join("/");n.notation=i&&r?{style:e,source:s,expDigits:i,expSign:r}:i?{style:e,source:s,expDigits:i}:r?{style:e,source:s,expSign:r}:{style:e,source:s};break}case"percent":case"permille":case"base-unit":this.assertEmpty("unit"),n.unit={style:e};break;case"currency":/^[A-Z]{3}$/.test(r)?(this.assertEmpty("unit"),n.unit={style:e,currency:r}):this.badOption(e,r);break;case"measure-unit":J(r)?(this.assertEmpty("unit"),n.unit={style:e,unit:r}):this.badOption(e,r);break;case"per-measure-unit":J(r)?(this.assertEmpty("unitPer"),n.unitPer=r):this.badOption(e,r);break;case"unit-width-narrow":case"unit-width-short":case"unit-width-full-name":case"unit-width-iso-code":case"unit-width-hidden":this.assertEmpty("unitWidth"),n.unitWidth=e;break;case"precision-integer":case"precision-unlimited":case"precision-currency-cash":this.assertEmpty("precision"),n.precision={style:e};break;case"precision-currency-standard":this.assertEmpty("precision"),n.precision="w"===r?{style:e,trailingZero:"stripIfInteger"}:{style:e};break;case"precision-increment":{const t=Number(r);t>0?(this.assertEmpty("precision"),n.precision={style:e,increment:t}):this.badOption(e,r);break}case"rounding-mode-ceiling":case"rounding-mode-floor":case"rounding-mode-down":case"rounding-mode-up":case"rounding-mode-half-even":case"rounding-mode-half-odd":case"rounding-mode-half-ceiling":case"rounding-mode-half-floor":case"rounding-mode-half-down":case"rounding-mode-half-up":case"rounding-mode-unnecessary":this.assertEmpty("roundingMode"),n.roundingMode=e;break;case"integer-width":if(/^\+0*$/.test(r))this.assertEmpty("integerWidth"),n.integerWidth={source:r,min:r.length-1};else{const t=r.match(/^#*(0*)$/);t?(this.assertEmpty("integerWidth"),n.integerWidth={source:r,min:t[1].length,max:t[0].length}):this.badOption(e,r)}break;case"scale":{const t=Number(r);t>0?(this.assertEmpty("scale"),n.scale=t):this.badOption(e,r);break}case"group-off":case"group-min2":case"group-auto":case"group-on-aligned":case"group-thousands":this.assertEmpty("group"),n.group=e;break;case"latin":this.assertEmpty("numberingSystem"),n.numberingSystem="latn";break;case"numbering-system":-1!==["arab","arabext","bali","beng","deva","fullwide","gujr","guru","hanidec","khmr","knda","laoo","latn","limb","mlym","mong","mymr","orya","tamldec","telu","thai","tibt"].indexOf(r)?(this.assertEmpty("numberingSystem"),n.numberingSystem=r):this.badOption(e,r);break;case"sign-auto":case"sign-always":case"sign-never":case"sign-accounting":case"sign-accounting-always":case"sign-except-zero":case"sign-accounting-except-zero":this.assertEmpty("sign"),n.sign=e;break;case"decimal-auto":case"decimal-always":this.assertEmpty("decimal"),n.decimal=e;break;default:{const r=function(e,t,r){const n=U(e,"fraction");if(n){t.length>1&&r(new j(e,t,1));const i={style:"precision-fraction",source:e,minFraction:n.min};null!=n.max&&(i.maxFraction=n.max);const s=t[0],o=U(s,"significant");return o?(i.source=`${e}/${s}`,i.minSignificant=o.min,null!=o.max&&(i.maxSignificant=o.max)):s&&r(new $(e,s)),i}const i=U(e,"significant");if(i){for(const n of t)r(new $(e,n));const n={style:"precision-fraction",source:e,minSignificant:i.min};return null!=i.max&&(n.maxSignificant=i.max),n}return null}(e,t,this.onError);r?(this.assertEmpty("precision"),n.precision=r):this.onError(new _(e))}}}}function G(e,t=(e=>{throw e})){const r=[];for(const t of e.split(" "))if(t){const e=t.split("/"),n=e.shift()||"";r.push({stem:n,options:e})}const n=new C(t);for(const{stem:e,options:t}of r)n.parseToken(e,t);return n.skeleton}const K=new RegExp("^"+["ar","ckb","fa","he","ks($|[^bfh])","lrc","mzn","pa-Arab","ps","ug","ur","uz-Arab","yi"].join("|^")),L="@messageformat/runtime/lib/plurals";function H(e){return e in u}e.exports=class{constructor(e){this.arguments=[],this.runtime={},this.options=e}compile(e,t,r){const{localeCodeFromKey:i,requireAllArguments:s,strict:o,strictPluralKeys:a}=this.options;if("object"==typeof e){const n={};for(const s of Object.keys(e)){const o=i?i(s):s,a=r&&o&&r[o]||t;n[s]=this.compile(e[s],a,r)}return n}this.plural=t;const c={cardinal:t.cardinals,ordinal:t.ordinals,strict:o,strictPluralKeys:a};this.arguments=[];const u=n.parse(e,c).map((e=>this.token(e,null))),l=this.arguments.length>0,f=this.concatenate(u,!0);return s&&l?(this.setRuntimeFn("reqArgs"),`(d) => { reqArgs(${JSON.stringify(this.arguments)}, d); return ${f}; }`):`(${l?"d":""}) => ${f}`}cases(e,t){let r=!0;const n=e.cases.map((({key:e,tokens:n})=>{"other"===e&&(r=!1);const i=n.map((e=>this.token(e,t)));return`${o.property(null,e.replace(/^=/,""))}: ${this.concatenate(i,!1)}`}));if(r){const{type:t}=e,{cardinals:r,ordinals:n}=this.plural;if("select"===t||"plural"===t&&r.includes("other")||"selectordinal"===t&&n.includes("other"))throw new Error(`No 'other' form found in ${JSON.stringify(e)}`)}return`{ ${n.join(", ")} }`}concatenate(e,t){return"values"===this.options.returnType&&(t||e.length>1)?"["+e.join(", ")+"]":e.join(" + ")||'""'}token(e,t){if("content"===e.type)return JSON.stringify(e.value);const{id:r,lc:n}=this.plural;let i,s;switch("arg"in e?(this.arguments.push(e.arg),i=[o.property("d",e.arg)]):i=[],e.type){case"argument":return this.options.biDiSupport?function(e,t){const r=K.test(t),n=JSON.stringify(r?"‏":"‎");return`${n} + ${e} + ${n}`}(String(i[0]),n):String(i[0]);case"select":s="select",t&&this.options.strict&&(t=null),i.push(this.cases(e,t)),this.setRuntimeFn("select");break;case"selectordinal":s="plural",i.push(e.pluralOffset||0,r,this.cases(e,e),1),this.setLocale(r,!0),this.setRuntimeFn("plural");break;case"plural":s="plural",i.push(e.pluralOffset||0,r,this.cases(e,e)),this.setLocale(r,!1),this.setRuntimeFn("plural");break;case"function":{const r=this.options.customFormatters[e.key],n=r&&"module"in r&&"function"==typeof r.module;if(!r){if("date"===e.key){s=this.setDateFormatter(e,i,t);break}if("number"===e.key){s=this.setNumberFormatter(e,i,t);break}}if(i.push(JSON.stringify(this.plural.locale)),e.param){t&&this.options.strict&&(t=null);const r=this.getFormatterArg(e,t);r&&i.push(r)}s=n?o.identifier(`${e.key}__${this.plural.locale}`):e.key,this.setFormatter(s,e.key);break}case"octothorpe":if(!t)return'"#"';i=[JSON.stringify(this.plural.locale),o.property("d",t.arg),t.pluralOffset||0],this.options.strict?(s="strictNumber",i.push(JSON.stringify(t.arg)),this.setRuntimeFn("strictNumber")):(s="number",this.setRuntimeFn("number"))}if(!s)throw new Error("Parser error for token "+JSON.stringify(e));return`${s}(${i.join(", ")})`}runtimeIncludes(e,t){if(o.identifier(e)!==e)throw new SyntaxError(`Reserved word used as ${t} identifier: ${e}`);const r=this.runtime[e];if(!r||r.type===t)return r;throw new TypeError(`Cannot override ${r.type} runtime function as ${t}: ${e}`)}setLocale(e,t){const r=this.runtimeIncludes(e,"locale"),{getCardinal:n,getPlural:i,isDefault:s}=this.plural;let o,a,c;if(!t&&s&&n){if(r)return;o=e=>n(e),a="@messageformat/runtime/lib/cardinals",c=()=>String(n)}else{if(r&&(!s||r.module===L))return;o=(e,t)=>i(e,t),a=s?L:i.module||null,c=()=>String(i)}this.runtime[e]=Object.assign(o,{id:e,module:a,toString:c,type:"locale"})}setRuntimeFn(e){this.runtimeIncludes(e,"runtime")||(this.runtime[e]=Object.assign(c[e],{id:e,module:"@messageformat/runtime",type:"runtime"}))}getFormatterArg({key:e,param:t},r){const n=this.options.customFormatters[e]||H(e)&&u[e];if(!n||!t)return null;const i="arg"in n&&n.arg||"string";if("options"===i){let r="";for(const n of t){if("content"!==n.type)throw new SyntaxError(`Expected literal options for ${e} formatter`);r+=n.value}const n={};for(const e of r.split(",")){const t=e.indexOf(":");if(-1===t)n[e.trim()]=null;else{const r=e.substring(0,t).trim(),i=e.substring(t+1).trim();if("true"===i)n[r]=!0;else if("false"===i)n[r]=!1;else if("null"===i)n[r]=null;else{const e=Number(i);n[r]=Number.isFinite(e)?e:i}}}return JSON.stringify(n)}{const e=t.map((e=>this.token(e,r)));if("raw"===i)return`[${e.join(", ")}]`;const n=e.join(" + ");return n?`(${n}).trim()`:'""'}}setFormatter(e,t){if(this.runtimeIncludes(e,"formatter"))return;const r=this.options.customFormatters[t||e];if(r){const t="function"==typeof r?{formatter:r}:r;this.runtime[e]=Object.assign(t.formatter.bind({}),Object.assign(Object.assign({},t.formatter.prototype),{toString:()=>String(t.formatter)}),{type:"formatter"},"module"in r&&r.module&&r.id?{id:o.identifier(r.id),module:"function"==typeof r.module?r.module(this.plural.locale):r.module}:{id:null,module:null})}else{if(!H(e))throw new Error(`Formatting function not found: ${e}`);this.runtime[e]=Object.assign(u[e],{type:"formatter"},{id:e,module:"@messageformat/runtime/lib/formatters"})}}setDateFormatter({param:e},t,r){const{locale:n}=this.plural,i=e&&1===e.length&&e[0];if(i&&"content"===i.type&&/^\s*::/.test(i.value)){const e=i.value.trim().substr(2),t=o.identifier(`date_${n}_${e}`,!0);if(!this.runtimeIncludes(t,"formatter")){const r=function(e,t,r){"string"==typeof t&&(t=v(t));const n=w(t,void 0),i=new Intl.DateTimeFormat(e,n);return e=>i.format(e)}(n,e);this.runtime[t]=Object.assign(r,{id:t,module:null,toString:()=>function(e,t,r){"string"==typeof t&&(t=v(t));const n=w(t,void 0);return["(function() {",`var opt = ${JSON.stringify(n)};`,`var dtf = new Intl.DateTimeFormat(${JSON.stringify(e)}, opt);`,"return function(value) { return dtf.format(value); }"].join("\n ")+"\n})()"}(n,e),type:"formatter"})}return t}if(t.push(JSON.stringify(n)),e&&e.length>0){r&&this.options.strict&&(r=null);const n=e.map((e=>this.token(e,r)));t.push("("+(n.join(" + ")||'""')+").trim()")}return this.setFormatter("date"),"date"}setNumberFormatter({param:e},t,r){const{locale:n}=this.plural;if(!e||0===e.length)return t.unshift(JSON.stringify(n)),t.push("0"),this.setRuntimeFn("number"),"number";if(t.push(JSON.stringify(n)),1===e.length&&"content"===e[0].type){const r=e[0].value.trim();switch(r){case"currency":return t.push(JSON.stringify(this.options.currency)),this.setFormatter("numberCurrency"),"numberCurrency";case"integer":return this.setFormatter("numberInteger"),"numberInteger";case"percent":return this.setFormatter("numberPercent"),"numberPercent"}const i=r.match(/^currency:([A-Z]+)$/);if(i)return t.push(JSON.stringify(i[1])),this.setFormatter("numberCurrency"),"numberCurrency";const s=o.identifier(`number_${n}_${r}`,!0);if(!this.runtimeIncludes(s,"formatter")){const{currency:e}=this.options,t=function(e,t,r,n){"string"==typeof t&&(t=0===t.indexOf("::")?G(t.slice(2),n):z(t,r,n));const i=T(e,t),s=P(t,n),o=function(e){const t=F(e),{precision:r}=e;return r&&"precision-increment"===r.style?e=>function(e,t){const r=+e+t/2;return r-r%+t}(e,r.increment)*t:e=>e*t}(t),a=new Intl.NumberFormat(i,s);if(t.affix){const[e,r]=t.affix.pos,[n,i]=t.affix.neg||["",""];return t=>{const s=a.format(o(t));return t<0?`${n}${s}${i}`:`${e}${s}${r}`}}return e=>a.format(o(e))}(n,r,e);this.runtime[s]=Object.assign(t,{id:null,module:null,toString:()=>function(e,t,r,n){"string"==typeof t&&(t=0===t.indexOf("::")?G(t.slice(2),n):z(t,r,n));const i=T(e,t),s=P(t,n),o=function(e){const t=F(e),{precision:r}=e;if(r&&"precision-increment"===r.style){const e="+n + "+r.increment/2;let n=`x - (x % +${r.increment})`;return 1!==t&&(n=`(${n}) * ${t}`),`function(n) { var x = ${e}; return ${n}; }`}return 1!==t?`function(n) { return n * ${t}; }`:null}(t),a=["(function() {",`var opt = ${JSON.stringify(s)};`,`var nf = new Intl.NumberFormat(${JSON.stringify(i)}, opt);`];let c="nf.format(value)";if(o&&(a.push(`var mod = ${o};`),c="nf.format(mod(value))"),t.affix){const[e,r]=t.affix.pos.map((e=>JSON.stringify(e)));if(t.affix.neg){const[n,i]=t.affix.neg.map((e=>JSON.stringify(e)));c=`value < 0 ? ${n} + ${c} + ${i} : ${e} + ${c} + ${r}`}else c=`${e} + ${c} + ${r}`}return a.push(`return function(value) { return ${c}; }`),a.join("\n ")+"\n})()"}(n,r,e),type:"formatter"})}return s}r&&this.options.strict&&(r=null);const i=e.map((e=>this.token(e,r)));return t.push("("+(i.join(" + ")||'""')+").trim()"),t.push(JSON.stringify(this.options.currency)),this.setFormatter("numberFmt"),"numberFmt"}}},887:function(e,t){var r,n;void 0===(n="function"==typeof(r=function(){"use strict";var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,r="boolean"==typeof(new RegExp).sticky;function n(e){return e&&"[object RegExp]"===t.call(e)}function i(e){return e&&"object"==typeof e&&!n(e)&&!Array.isArray(e)}function s(e){return"("+e+")"}function o(e){return e.length?"(?:"+e.map((function(e){return"(?:"+e+")"})).join("|")+")":"(?!)"}function a(e){if("string"==typeof e)return"(?:"+(e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")+")");if(n(e)){if(e.ignoreCase)throw new Error("RegExp /i flag not allowed");if(e.global)throw new Error("RegExp /g flag is implied");if(e.sticky)throw new Error("RegExp /y flag is implied");if(e.multiline)throw new Error("RegExp /m flag is implied");return e.source}throw new Error("Not a pattern: "+e)}function c(e,t){return e.length>t?e:Array(t-e.length+1).join(" ")+e}function u(t,r){if(i(r)||(r={match:r}),r.include)throw new Error("Matching rules cannot also include states");var s={defaultType:t,lineBreaks:!!r.error||!!r.fallback,pop:!1,next:null,push:null,error:!1,fallback:!1,value:null,type:null,shouldThrow:!1};for(var o in r)e.call(r,o)&&(s[o]=r[o]);if("string"==typeof s.type&&t!==s.type)throw new Error("Type transform cannot be a string (type '"+s.type+"' for token '"+t+"')");var a=s.match;return s.match=Array.isArray(a)?a:a?[a]:[],s.match.sort((function(e,t){return n(e)&&n(t)?0:n(t)?-1:n(e)?1:t.length-e.length})),s}function l(e){return Array.isArray(e)?function(e){for(var t=[],r=0;r<e.length;r++){var n=e[r];if(n.include)for(var i=[].concat(n.include),s=0;s<i.length;s++)t.push({include:i[s]});else{if(!n.type)throw new Error("Rule has no type: "+JSON.stringify(n));t.push(u(n.type,n))}}return t}(e):function(e){for(var t=Object.getOwnPropertyNames(e),r=[],n=0;n<t.length;n++){var s=t[n],o=e[s],a=[].concat(o);if("include"!==s){var c=[];a.forEach((function(e){i(e)?(c.length&&r.push(u(s,c)),r.push(u(s,e)),c=[]):c.push(e)})),c.length&&r.push(u(s,c))}else for(var l=0;l<a.length;l++)r.push({include:a[l]})}return r}(e)}var f=u("error",{lineBreaks:!0,shouldThrow:!0});function h(e,t){for(var i=null,c=Object.create(null),u=!0,l=null,h=[],p=[],d=0;d<e.length;d++)e[d].fallback&&(u=!1);for(d=0;d<e.length;d++){var m=e[d];if(m.include)throw new Error("Inheritance is not allowed in stateless lexers");if(m.error||m.fallback){if(i)throw!m.fallback==!i.fallback?new Error("Multiple "+(m.fallback?"fallback":"error")+" rules not allowed (for token '"+m.defaultType+"')"):new Error("fallback and error are mutually exclusive (for token '"+m.defaultType+"')");i=m}var g=m.match.slice();if(u)for(;g.length&&"string"==typeof g[0]&&1===g[0].length;)c[g.shift().charCodeAt(0)]=m;if(m.pop||m.push||m.next){if(!t)throw new Error("State-switching options are not allowed in stateless lexers (for token '"+m.defaultType+"')");if(m.fallback)throw new Error("State-switching options are not allowed on fallback tokens (for token '"+m.defaultType+"')")}if(0!==g.length){u=!1,h.push(m);for(var y=0;y<g.length;y++){var w=g[y];if(n(w))if(null===l)l=w.unicode;else if(l!==w.unicode&&!1===m.fallback)throw new Error("If one rule is /u then all must be")}var b=o(g.map(a)),k=new RegExp(b);if(k.test(""))throw new Error("RegExp matches empty string: "+k);if(new RegExp("|"+b).exec("").length-1>0)throw new Error("RegExp has capture groups: "+k+"\nUse (?: … ) instead");if(!m.lineBreaks&&k.test("\n"))throw new Error("Rule should declare lineBreaks: "+k);p.push(s(b))}}var x=i&&i.fallback,v=r&&!x?"ym":"gm",S=r||x?"":"|";return!0===l&&(v+="u"),{regexp:new RegExp(o(p)+S,v),groups:h,fast:c,error:i||f}}function p(e,t,r){var n=e&&(e.push||e.next);if(n&&!r[n])throw new Error("Missing state '"+n+"' (in token '"+e.defaultType+"' of state '"+t+"')");if(e&&e.pop&&1!=+e.pop)throw new Error("pop must be 1 (in token '"+e.defaultType+"' of state '"+t+"')")}var d=function(e,t){this.startState=t,this.states=e,this.buffer="",this.stack=[],this.reset()};d.prototype.reset=function(e,t){return this.buffer=e||"",this.index=0,this.line=t?t.line:1,this.col=t?t.col:1,this.queuedToken=t?t.queuedToken:null,this.queuedText=t?t.queuedText:"",this.queuedThrow=t?t.queuedThrow:null,this.setState(t?t.state:this.startState),this.stack=t&&t.stack?t.stack.slice():[],this},d.prototype.save=function(){return{line:this.line,col:this.col,state:this.state,stack:this.stack.slice(),queuedToken:this.queuedToken,queuedText:this.queuedText,queuedThrow:this.queuedThrow}},d.prototype.setState=function(e){if(e&&this.state!==e){this.state=e;var t=this.states[e];this.groups=t.groups,this.error=t.error,this.re=t.regexp,this.fast=t.fast}},d.prototype.popState=function(){this.setState(this.stack.pop())},d.prototype.pushState=function(e){this.stack.push(this.state),this.setState(e)};var m=r?function(e,t){return e.exec(t)}:function(e,t){var r=e.exec(t);return 0===r[0].length?null:r};function g(){return this.value}if(d.prototype._getGroup=function(e){for(var t=this.groups.length,r=0;r<t;r++)if(void 0!==e[r+1])return this.groups[r];throw new Error("Cannot find token type for matched text")},d.prototype.next=function(){var e=this.index;if(this.queuedGroup){var t=this._token(this.queuedGroup,this.queuedText,e);return this.queuedGroup=null,this.queuedText="",t}var r=this.buffer;if(e!==r.length){if(o=this.fast[r.charCodeAt(e)])return this._token(o,r.charAt(e),e);var n=this.re;n.lastIndex=e;var i=m(n,r),s=this.error;if(null==i)return this._token(s,r.slice(e,r.length),e);var o=this._getGroup(i),a=i[0];return s.fallback&&i.index!==e?(this.queuedGroup=o,this.queuedText=a,this._token(s,r.slice(e,i.index),e)):this._token(o,a,e)}},d.prototype._token=function(e,t,r){var n=0;if(e.lineBreaks){var i=/\n/g,s=1;if("\n"===t)n=1;else for(;i.exec(t);)n++,s=i.lastIndex}var o={type:"function"==typeof e.type&&e.type(t)||e.defaultType,value:"function"==typeof e.value?e.value(t):t,text:t,toString:g,offset:r,lineBreaks:n,line:this.line,col:this.col},a=t.length;if(this.index+=a,this.line+=n,0!==n?this.col=a-s+1:this.col+=a,e.shouldThrow)throw new Error(this.formatError(o,"invalid syntax"));return e.pop?this.popState():e.push?this.pushState(e.push):e.next&&this.setState(e.next),o},"undefined"!=typeof Symbol&&Symbol.iterator){var y=function(e){this.lexer=e};y.prototype.next=function(){var e=this.lexer.next();return{value:e,done:!e}},y.prototype[Symbol.iterator]=function(){return this},d.prototype[Symbol.iterator]=function(){return new y(this)}}return d.prototype.formatError=function(e,t){if(null==e){var r=this.buffer.slice(this.index);e={text:r,offset:this.index,lineBreaks:-1===r.indexOf("\n")?0:1,line:this.line,col:this.col}}var n=Math.max(e.line-2,1),i=e.line+2,s=String(i).length,o=function(e,t){for(var r=e.length,n=0;;){var i=e.lastIndexOf("\n",r-1);if(-1===i)break;if(r=i,++n===t)break;if(0===r)break}var s=n<t?0:r+1;return e.substring(s).split("\n")}(this.buffer,this.line-e.line+2+1).slice(0,5),a=[];a.push(t+" at line "+e.line+" col "+e.col+":"),a.push("");for(var u=0;u<o.length;u++){var l=o[u],f=n+u;a.push(c(String(f),s)+" "+l),f===e.line&&a.push(c("",s+e.col+1)+"^")}return a.join("\n")},d.prototype.clone=function(){return new d(this.states,this.state)},d.prototype.has=function(e){return!0},{compile:function(e){var t=h(l(e));return new d({start:t},"start")},states:function(e,t){var r=e.$all?l(e.$all):[];delete e.$all;var n=Object.getOwnPropertyNames(e);t||(t=n[0]);for(var i=Object.create(null),s=0;s<n.length;s++)i[b=n[s]]=l(e[b]).concat(r);for(s=0;s<n.length;s++)for(var o=i[b=n[s]],a=Object.create(null),c=0;c<o.length;c++){var u=o[c];if(u.include){var f=[c,1];if(u.include!==b&&!a[u.include]){a[u.include]=!0;var m=i[u.include];if(!m)throw new Error("Cannot include nonexistent state '"+u.include+"' (in state '"+b+"')");for(var g=0;g<m.length;g++){var y=m[g];-1===o.indexOf(y)&&f.push(y)}}o.splice.apply(o,f),c--}}var w=Object.create(null);for(s=0;s<n.length;s++){var b;w[b=n[s]]=h(i[b],!0)}for(s=0;s<n.length;s++){var k=n[s],x=w[k],v=x.groups;for(c=0;c<v.length;c++)p(v[c],k,w);var S=Object.getOwnPropertyNames(x.fast);for(c=0;c<S.length;c++)p(x.fast[S[c]],k,w)}return new d(w,t)},error:Object.freeze({error:!0}),fallback:Object.freeze({fallback:!0}),keywords:function(e){for(var t="undefined"!=typeof Map,r=t?new Map:Object.create(null),n=Object.getOwnPropertyNames(e),i=0;i<n.length;i++){var s=n[i],o=e[s];(Array.isArray(o)?o:[o]).forEach((function(e){if("string"!=typeof e)throw new Error("keyword must be string (in keyword '"+s+"')");t?r.set(e,s):r[e]=s}))}return function(e){return t?r.get(e):r[e]}}}})?r.apply(t,[]):r)||(e.exports=n)},602:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.lexer=t.states=void 0;const i=n(r(887));t.states={body:{doubleapos:{match:"''",value:()=>"'"},quoted:{lineBreaks:!0,match:/'[{}#](?:[^]*?[^'])?'(?!')/u,value:e=>e.slice(1,-1).replace(/''/g,"'")},argument:{lineBreaks:!0,match:/\{\s*[^\p{Pat_Syn}\p{Pat_WS}]+\s*/u,push:"arg",value:e=>e.substring(1).trim()},octothorpe:"#",end:{match:"}",pop:1},content:{lineBreaks:!0,match:/[^][^{}#']*/u}},arg:{select:{lineBreaks:!0,match:/,\s*(?:plural|select|selectordinal)\s*,\s*/u,next:"select",value:e=>e.split(",")[1].trim()},"func-args":{lineBreaks:!0,match:/,\s*[^\p{Pat_Syn}\p{Pat_WS}]+\s*,/u,next:"body",value:e=>e.split(",")[1].trim()},"func-simple":{lineBreaks:!0,match:/,\s*[^\p{Pat_Syn}\p{Pat_WS}]+\s*/u,value:e=>e.substring(1).trim()},end:{match:"}",pop:1}},select:{offset:{lineBreaks:!0,match:/\s*offset\s*:\s*\d+\s*/u,value:e=>e.split(":")[1].trim()},case:{lineBreaks:!0,match:/\s*(?:=\d+|[^\p{Pat_Syn}\p{Pat_WS}]+)\s*\{/u,push:"body",value:e=>e.substring(0,e.indexOf("{")).trim()},end:{match:/\s*\}/u,pop:1}}},t.lexer=i.default.states(t.states)},845:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parse=t.ParseError=void 0;const n=r(602),i=e=>({offset:e.offset,line:e.line,col:e.col,text:e.text,lineBreaks:e.lineBreaks}),s=e=>"plural"===e||"select"===e||"selectordinal"===e,o=["number","date","time","spellout","ordinal","duration"],a=["zero","one","two","few","many","other"];class c extends Error{constructor(e,t){super(n.lexer.formatError(e,t))}}t.ParseError=c;class u{constructor(e,t){var r,i,s,o;this.lexer=n.lexer.reset(e),this.cardinalKeys=null!==(r=null==t?void 0:t.cardinal)&&void 0!==r?r:a,this.ordinalKeys=null!==(i=null==t?void 0:t.ordinal)&&void 0!==i?i:a,this.strict=null!==(s=null==t?void 0:t.strict)&&void 0!==s&&s,this.strictPluralKeys=null===(o=null==t?void 0:t.strictPluralKeys)||void 0===o||o}parse(){return this.parseBody(!1,!0)}checkSelectKey(e,t,r){if("="===r[0]){if("select"===t)throw new c(e,`The case ${r} is not valid with select`)}else if("select"!==t){const n="plural"===t?this.cardinalKeys:this.ordinalKeys;if(this.strictPluralKeys&&n.length>0&&!n.includes(r))throw new c(e,`The ${t} case ${r} is not valid in this locale`)}}parseSelect({value:e},t,r,n){const s={type:n,arg:e,cases:[],ctx:r};"plural"===n||"selectordinal"===n?t=!0:this.strict&&(t=!1);for(const e of this.lexer)switch(e.type){case"offset":if("select"===n)throw new c(e,"Unexpected plural offset for select");if(s.cases.length>0)throw new c(e,"Plural offset must be set before cases");s.pluralOffset=Number(e.value),r.text+=e.text,r.lineBreaks+=e.lineBreaks;break;case"case":this.checkSelectKey(e,n,e.value),s.cases.push({key:e.value,tokens:this.parseBody(t),ctx:i(e)});break;case"end":return s;default:throw new c(e,`Unexpected lexer token: ${e.type}`)}throw new c(null,"Unexpected message end")}parseArgToken(e,t){const r=i(e),n=this.lexer.next();if(!n)throw new c(null,"Unexpected message end");if(r.text+=n.text,r.lineBreaks+=n.lineBreaks,this.strict&&("func-simple"===n.type||"func-args"===n.type)&&!o.includes(n.value)){const t=`Invalid strict mode function arg type: ${n.value}`;throw new c(e,t)}switch(n.type){case"end":return{type:"argument",arg:e.value,ctx:r};case"func-simple":{const t=this.lexer.next();if(!t)throw new c(null,"Unexpected message end");if("end"!==t.type)throw new c(t,`Unexpected lexer token: ${t.type}`);if(r.text+=t.text,s(n.value.toLowerCase()))throw new c(n,`Invalid type identifier: ${n.value}`);return{type:"function",arg:e.value,key:n.value,ctx:r}}case"func-args":{if(s(n.value.toLowerCase())){const e=`Invalid type identifier: ${n.value}`;throw new c(n,e)}let i=this.parseBody(!this.strict&&t);return this.strict&&i.length>0&&(i=function(e,t){let r="",n="";for(const i of t){const t=i.ctx.text;switch(n+=t,i.type){case"content":r+=i.value;break;case"argument":case"function":case"octothorpe":r+=t;break;default:throw new c(e,`Unsupported part in strict mode function arg style: ${t}`)}}return[{type:"content",value:r.trim(),ctx:Object.assign({},t[0].ctx,{text:n})}]}(e,i)),{type:"function",arg:e.value,key:n.value,param:i,ctx:r}}case"select":if(s(n.value))return this.parseSelect(e,t,r,n.value);throw new c(n,`Unexpected select type ${n.value}`);default:throw new c(n,`Unexpected lexer token: ${n.type}`)}}parseBody(e,t){const r=[];let n=null;for(const s of this.lexer)if("argument"===s.type)n&&(n=null),r.push(this.parseArgToken(s,e));else if("octothorpe"===s.type&&e)n&&(n=null),r.push({type:"octothorpe",ctx:i(s)});else{if("end"===s.type&&!t)return r;{let t=s.value;if(!e&&"quoted"===s.type&&"#"===t[0]){if(t.includes("{"))throw new c(s,`Unsupported escape pattern: ${t}`);t=s.text}n?(n.value+=t,n.ctx.text+=s.text,n.ctx.lineBreaks+=s.lineBreaks):(n={type:"content",value:t,ctx:i(s)},r.push(n))}}if(t)return r;throw new c(null,"Unexpected message end")}}t.parse=function(e,t={}){return new u(e,t).parse()}},121:(e,t,r)=>{const n=r(457);e.exports={identifier:function(e,t){t&&(e+=" "+function(e){let t=0;for(let r=0;r<e.length;++r)t=(t<<5)-t+e.charCodeAt(r),t|=0;return t}(e).toString(36));const r=e.trim().replace(/\W+/g,"_");return n.ES3[r]||n.ESnext[r]||/^\d/.test(r)?"_"+r:r},property:function(e,t){if(/^[A-Z_$][0-9A-Z_$]*$/i.test(t)&&!n.ES3[t])return e?e+"."+t:t;{const r=JSON.stringify(t);return e?e+"["+r+"]":r}}}},457:e=>{e.exports={ES3:{break:!0,continue:!0,delete:!0,else:!0,for:!0,function:!0,if:!0,in:!0,new:!0,return:!0,this:!0,typeof:!0,var:!0,void:!0,while:!0,with:!0,case:!0,catch:!0,default:!0,do:!0,finally:!0,instanceof:!0,switch:!0,throw:!0,try:!0},ESnext:{await:!0,debugger:!0,class:!0,enum:!0,extends:!0,super:!0,const:!0,export:!0,import:!0,null:!0,true:!0,false:!0,implements:!0,let:!0,private:!0,public:!0,yield:!0,interface:!0,package:!0,protected:!0,static:!0}}},362:(e,t,r)=>{"use strict";function n(e,t,r){var n={day:"numeric",month:"short",year:"numeric"};switch(r){case"full":n.weekday="long";case"long":n.month="long";break;case"short":n.month="numeric"}return new Date(e).toLocaleDateString(t,n)}function i(e){if("number"!=typeof e&&(e=Number(e)),!isFinite(e))return String(e);var t="";e<0?(t="-",e=Math.abs(e)):e=Number(e);var r=e%60,n=[Math.round(r)===r?r:r.toFixed(3)];return e<60?n.unshift(0):(e=Math.round((e-Number(n[0]))/60),n.unshift(e%60),e>=60&&(e=Math.round((e-Number(n[0]))/60),n.unshift(e))),t+n.shift()+":"+n.map((function(e){return e<10?"0"+String(e):String(e)})).join(":")}r.r(t),r.d(t,{date:()=>n,duration:()=>i,numberCurrency:()=>c,numberFmt:()=>a,numberInteger:()=>u,numberPercent:()=>l,time:()=>f});var s={};function o(e,t){var r=String(e)+JSON.stringify(t);return s[r]||(s[r]=new Intl.NumberFormat(e,t)),s[r]}function a(e,t,r,n){var i=r&&r.split(":")||[],s=i[0],a=i[1];return o(t,{integer:{maximumFractionDigits:0},percent:{style:"percent"},currency:{style:"currency",currency:a&&a.trim()||n,minimumFractionDigits:2,maximumFractionDigits:2}}[s]||{}).format(e)}var c=function(e,t,r){return o(t,{style:"currency",currency:r,minimumFractionDigits:2,maximumFractionDigits:2}).format(e)},u=function(e,t){return o(t,{maximumFractionDigits:0}).format(e)},l=function(e,t){return o(t,{style:"percent"}).format(e)};function f(e,t,r){var n={second:"numeric",minute:"numeric",hour:"numeric"};switch(r){case"full":case"long":n.timeZoneName="short";break;case"short":delete n.second}return new Date(e).toLocaleTimeString(t,n)}},571:(e,t,r)=>{"use strict";function n(e){return n[e]||(n[e]=new Intl.NumberFormat(e))}function i(e,t,r){return n(e).format(t-r)}function s(e,t,r,i){var s=t-r;if(isNaN(s))throw new Error("`"+i+"` or its offset is not a number");return n(e).format(s)}function o(e,t,r,n,i){if({}.hasOwnProperty.call(n,e))return n[e];t&&(e-=t);var s=r(e,i);return s in n?n[s]:n.other}function a(e,t){return{}.hasOwnProperty.call(t,e)?t[e]:t.other}function c(e,t){for(var r=0;r<e.length;++r)if(!t||void 0===t[e[r]])throw new Error("Message requires argument '".concat(e[r],"'"))}r.r(t),r.d(t,{_nf:()=>n,number:()=>i,plural:()=>o,reqArgs:()=>c,select:()=>a,strictNumber:()=>s})}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var r=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e].call(r.exports,r,r.exports,__webpack_require__),r.exports}__webpack_require__.d=(e,t)=>{for(var r in t)__webpack_require__.o(t,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__=__webpack_require__(561);compileModule=__webpack_exports__;
@@ -0,0 +1 @@
1
+ var MessageFormat,__webpack_modules__={9:function(e,t,r){e.exports=function(){"use strict";var e=function(){return e=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},e.apply(this,arguments)};function t(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function n(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s}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"==typeof SuppressedError&&SuppressedError;class o extends Error{constructor(e,t,r){super(e),this.token=t,this.type=r||"error"}}const s=e=>e<4?"short":4===e?"long":"narrow",a=e=>e%2==0?"2-digit":"numeric";function c(e,t){switch(e.width){case 1:return"numeric";case 2:return"2-digit";case 3:return"short";case 4:return"long";case 5:return"narrow";default:return void t(`${e.desc} is not supported with width ${e.width}`)}}function l(e,t){const{char:r,desc:n,width:i}=e;return"d"===r?a(i):void t(`${n} is not supported`)}function u(e,t){const{char:r,desc:n,width:i}=e;return("c"===r||"e"===r)&&i<3&&t(`Numeric value is not supported for ${n}; falling back to weekday:short`,o.WARNING),s(i)}function h(e,t){const{char:r,desc:n,width:i}=e;switch(r){case"v":case"z":return 4===i?"long":"short";case"V":return 4===i?"long":void t(`${n} is not supported with width ${i}`);case"X":return void t(`${n} is not supported`)}return"short"}function f(e,t){switch(e.field){case"era":return{era:s(e.width)};case"year":return function(e,t){switch(e.char){case"y":return{year:a(e.width)};case"r":return{calendar:"gregory",year:"numeric"};default:return t(`${e.desc} is not supported; falling back to year:numeric`,o.WARNING),{year:"numeric"}}}(e,t);case"month":return{month:c(e,t)};case"day":return{day:l(e,t)};case"weekday":return{weekday:u(e,t)};case"period":return;case"hour":return function(e){const t=a(e.width);let r;switch(e.char){case"h":r="h12";break;case"H":r="h23";break;case"k":r="h24";break;case"K":r="h11"}return r?{hour:t,hourCycle:r}:{hour:t}}(e);case"min":return{minute:a(e.width)};case"sec":return{second:a(e.width)};case"tz":return{timeZoneName:h(e,t)};case"quarter":case"week":case"sec-frac":case"ms":t(`${e.desc} is not supported`)}}function p(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e=>{throw e};const r={},n=[];for(const i of e){const{error:e,field:s,str:a}=i;if(e){const r=new o(e.message,i);r.stack=e.stack,t(r)}a&&t(new o(`Ignoring string part: ${a}`,i,o.WARNING)),s&&(-1===n.indexOf(s)?n.push(s):t(new o(`Duplicate ${s} token`,i)));const c=f(i,((e,r)=>t(new o(e,i,r))));c&&Object.assign(r,c)}return r}const d={G:{field:"era",desc:"Era"},y:{field:"year",desc:"Year"},Y:{field:"year",desc:'Year of "Week of Year"'},u:{field:"year",desc:"Extended year"},U:{field:"year",desc:"Cyclic year name"},r:{field:"year",desc:"Related Gregorian year"},Q:{field:"quarter",desc:"Quarter"},q:{field:"quarter",desc:"Stand-alone quarter"},M:{field:"month",desc:"Month in year"},L:{field:"month",desc:"Stand-alone month in year"},w:{field:"week",desc:"Week of year"},W:{field:"week",desc:"Week of month"},d:{field:"day",desc:"Day in month"},D:{field:"day",desc:"Day of year"},F:{field:"day",desc:"Day of week in month"},g:{field:"day",desc:"Modified julian day"},E:{field:"weekday",desc:"Day of week"},e:{field:"weekday",desc:"Local day of week"},c:{field:"weekday",desc:"Stand-alone local day of week"},a:{field:"period",desc:"AM/PM marker"},b:{field:"period",desc:"AM/PM/noon/midnight marker"},B:{field:"period",desc:"Flexible day period"},h:{field:"hour",desc:"Hour in AM/PM (1~12)"},H:{field:"hour",desc:"Hour in day (0~23)"},k:{field:"hour",desc:"Hour in day (1~24)"},K:{field:"hour",desc:"Hour in AM/PM (0~11)"},j:{field:"hour",desc:"Hour in preferred cycle"},J:{field:"hour",desc:"Hour in preferred cycle without marker"},C:{field:"hour",desc:"Hour in preferred cycle with flexible marker"},m:{field:"min",desc:"Minute in hour"},s:{field:"sec",desc:"Second in minute"},S:{field:"sec-frac",desc:"Fractional second"},A:{field:"ms",desc:"Milliseconds in day"},z:{field:"tz",desc:"Time Zone: specific non-location"},Z:{field:"tz",desc:"Time Zone"},O:{field:"tz",desc:"Time Zone: localized"},v:{field:"tz",desc:"Time Zone: generic non-location"},V:{field:"tz",desc:"Time Zone: ID"},X:{field:"tz",desc:"Time Zone: ISO8601 with Z"},x:{field:"tz",desc:"Time Zone: ISO8601"}},m=e=>e>="A"&&e<="Z"||e>="a"&&e<="z";function g(e,t){const r=e[t];if(!r)return null;if(m(r))return function(e,t){const r=e[t];let n=1;for(;e[++t]===r;)++n;const i=d[r];return i?{char:r,field:i.field,desc:i.desc,width:n}:{char:r,error:new Error(`The letter ${r} is not a valid field identifier`),width:n}}(e,t);if("'"===r)return function(e,t){let r=e[++t],n=2;if("'"===r)return{char:"'",str:r,width:n};for(;;){const i=e[++t];if(++n,void 0===i)return{char:"'",error:new Error(`Unterminated quoted literal in pattern: ${r||e}`),str:r,width:n};if("'"===i){if("'"!==e[++t])return{char:"'",str:r,width:n};++n}r+=i}}(e,t);let n=r,i=1;for(;;){const o=e[++t];if(!o||m(o)||"'"===o)return{char:r,str:n,width:i};n+=o,i+=1}}function y(e){const t=[];let r=0;for(;;){const n=g(e,r);if(!n)return t;t.push(n),r+=n.width}}class w extends Error{constructor(e,t){super(t),this.code=e}}class b extends w{constructor(e,t){super("BAD_OPTION",`Unknown ${e} option: ${t}`),this.stem=e,this.option=t}}class k extends w{constructor(e){super("BAD_STEM",`Unknown stem: ${e}`),this.stem=e}}class v extends w{constructor(e,t){super("MASKED_VALUE",`Value for ${e} is set multiple times`),this.type=e,this.prev=t}}class x extends w{constructor(e){super("MISSING_OPTION",`Required option missing for ${e}`),this.stem=e}}class S extends w{constructor(e,t){super("BAD_PATTERN",t),this.char=e}}class _ extends w{constructor(e,t,r){super("TOO_MANY_OPTIONS",`Token ${e} only supports ${r>1?`${r} options`:"one option"} (got ${t.length})`),this.stem=e,this.options=t}}class N extends w{constructor(e,t){super("UNSUPPORTED",`The stem ${e} is not supported`),this.stem=e,t&&(this.message+=` with value ${t}`,this.source=t)}}function O(e,t){let{numberingSystem:r}=t;return Array.isArray(e)||(e=[e]),r?e.map((e=>{const t=-1===e.indexOf("-u-")?"u-nu":"nu";return`${e}-${t}-${r}`})).concat(e):e}function E(e){let{scale:t,unit:r}=e,n="number"==typeof t&&t>=0?t:1;return r&&"percent"===r.style&&(n*=.01),n}function j(e,t){const{decimal:r,group:n,integerWidth:i,notation:o,precision:s,roundingMode:a,sign:c,unit:l,unitPer:u,unitWidth:h}=e,f=(e,r)=>{t&&t(new N(e,r))},p={};if(l)switch(l.style){case"base-unit":p.style="decimal";break;case"currency":p.style="currency",p.currency=l.currency;break;case"measure-unit":p.style="unit",p.unit=l.unit.replace(/.*-/,""),u&&(p.unit+="-per-"+u.replace(/.*-/,""));break;case"percent":p.style="percent";break;case"permille":f("permille")}switch(h){case"unit-width-full-name":p.currencyDisplay="name",p.unitDisplay="long";break;case"unit-width-hidden":f(h);break;case"unit-width-iso-code":p.currencyDisplay="code";break;case"unit-width-narrow":p.currencyDisplay="narrowSymbol",p.unitDisplay="narrow";break;case"unit-width-short":p.currencyDisplay="symbol",p.unitDisplay="short"}switch(n){case"group-off":p.useGrouping=!1;break;case"group-auto":p.useGrouping=!0;break;case"group-min2":case"group-on-aligned":case"group-thousands":f(n),p.useGrouping=!0}if(s)switch(s.style){case"precision-fraction":{const{minFraction:e,maxFraction:t,minSignificant:r,maxSignificant:n,source:i}=s;"number"==typeof e&&(p.minimumFractionDigits=e,"number"==typeof r&&f("precision-fraction",i)),"number"==typeof t&&(p.maximumFractionDigits=t),"number"==typeof r&&(p.minimumSignificantDigits=r),"number"==typeof n&&(p.maximumSignificantDigits=n);break}case"precision-integer":p.maximumFractionDigits=0;break;case"precision-unlimited":p.maximumFractionDigits=20;break;case"precision-increment":break;case"precision-currency-standard":p.trailingZeroDisplay=s.trailingZero;break;case"precision-currency-cash":f(s.style)}if(o)switch(o.style){case"compact-short":p.notation="compact",p.compactDisplay="short";break;case"compact-long":p.notation="compact",p.compactDisplay="long";break;case"notation-simple":p.notation="standard";break;case"scientific":case"engineering":{const{expDigits:e,expSign:t,source:r,style:n}=o;p.notation=n,(e&&e>1||t&&"sign-auto"!==t)&&f(n,r);break}}if(i){const{min:e,max:t,source:r}=i;if(e>0&&(p.minimumIntegerDigits=e),Number(t)>0){const e="engineering"===p.notation||"scientific"===p.notation;3===t&&e?p.notation="engineering":f("integer-width",r)}}switch(c){case"sign-auto":p.signDisplay="auto";break;case"sign-always":p.signDisplay="always";break;case"sign-except-zero":p.signDisplay="exceptZero";break;case"sign-never":p.signDisplay="never";break;case"sign-accounting":p.currencySign="accounting";break;case"sign-accounting-always":p.currencySign="accounting",p.signDisplay="always";break;case"sign-accounting-except-zero":p.currencySign="accounting",p.signDisplay="exceptZero"}return"decimal-always"===r&&f(r),a&&f(a),p}function $(e,t,r){const n=e[t];switch(n){case"%":return{char:"%",style:"percent",width:1};case"‰":return{char:"%",style:"permille",width:1};case"¤":{let i=1;for(;"¤"===e[++t];)++i;switch(i){case 1:return{char:n,currency:"default",width:i};case 2:return{char:n,currency:"iso-code",width:i};case 3:return{char:n,currency:"full-name",width:i};case 5:return{char:n,currency:"narrow",width:i};default:return r(new S("¤",`Invalid number (${i}) of ¤ chars in pattern`)),null}}case"*":{const r=e[t+1];if(r)return{char:n,pad:r,width:2};break}case"+":case"-":return{char:n,width:1};case"'":{let i=e[++t],o=2;if("'"===i)return{char:n,str:i,width:o};for(;;){const s=e[++t];if(++o,void 0===s)return r(new S("'",`Unterminated quoted literal in pattern: ${i}`)),{char:n,str:i,width:o};if("'"===s){if("'"!==e[++t])return{char:n,str:i,width:o};++o}i+=s}}}return null}const z=e=>e>="0"&&e<="9";function T(e,t){const r=e[t];if(z(r)){let n=r;for(;;){const r=e[++t];if(!z(r))return{char:"0",digits:n,width:n.length};n+=r}}switch(r){case"#":{let n=1;for(;"#"===e[++t];)++n;return{char:r,width:n}}case"@":{let n=1;for(;"@"===e[++t];)++n;let i=n;for(t-=1;"#"===e[++t];)++i;return{char:r,min:n,width:i}}case"E":{const n="+"===e[t+1];n&&++t;let i=0;for(;"0"===e[++t];)++i;if(i)return{char:r,expDigits:i,plus:n,width:(n?2:1)+i};break}case".":case",":return{char:r,width:1}}return null}function F(e,t,r){let n;!function(e){e[e.Prefix=0]="Prefix",e[e.Number=1]="Number",e[e.Suffix=2]="Suffix"}(n||(n={}));const i=[],o=[],s=[];let a=n.Prefix,c="";for(;t<e.length;){const l=e[t];if(";"===l){t+=1;break}switch(a){case n.Prefix:{const s=$(e,t,r);if(s)c&&(i.push({char:"'",str:c,width:c.length}),c=""),i.push(s),t+=s.width;else{const r=T(e,t);r?(c&&(i.push({char:"'",str:c,width:c.length}),c=""),a=n.Number,o.push(r),t+=r.width):(c+=l,t+=1)}break}case n.Number:{const r=T(e,t);r?(o.push(r),t+=r.width):a=n.Suffix;break}case n.Suffix:{const n=$(e,t,r);n?(c&&(s.push({char:"'",str:c,width:c.length}),c=""),s.push(n),t+=n.width):(c+=l,t+=1);break}}}return c&&s.push({char:"'",str:c,width:c.length}),{pattern:{prefix:i,number:o,suffix:s},pos:t}}function D(e,t,r,n,i){let o=!1,s="";for(const a of e)switch(a.char){case"%":t.unit={style:a.style},i?o=!0:s="";break;case"¤":if(!r){n(new S("¤","The ¤ pattern requires a currency"));break}switch(t.unit={style:"currency",currency:r},a.currency){case"iso-code":t.unitWidth="unit-width-iso-code";break;case"full-name":t.unitWidth="unit-width-full-name";break;case"narrow":t.unitWidth="unit-width-narrow"}i?o=!0:s="";break;case"*":break;case"+":o||(s+="+");break;case"'":o||(s+=a.str)}return s}function P(e,t){let r=!1,n="";for(const i of e)switch(i.char){case"%":case"¤":t?r=!0:n="";break;case"-":r||(n+="-");break;case"'":r||(n+=i.str)}return n}function A(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e=>{throw e};const{tokens:n,negative:i}=function(e,t){const{pattern:r,pos:n}=F(e,0,t);if(n<e.length){const{pattern:i}=F(e,n,t);return{tokens:r,negative:i}}return{tokens:r}}(e,r),o=function(e,t){const r={};let n=!1,i=!1,o=0,s="",a=-1,c="",l=0;for(let u=0;u<e.length;++u){const h=e[u];switch(h.char){case"#":-1===a?(s&&t(new S("#","Pattern has # after integer digits")),o+=h.width):l+=h.width;break;case"0":-1===a?s+=h.digits:(l&&t(new S("0","Pattern has digits after # in fraction")),c+=h.digits);break;case"@":r.precision&&t(new v("precision",r.precision)),r.precision={style:"precision-fraction",minSignificant:h.min,maxSignificant:h.width};break;case",":n=!0;break;case".":1===a&&t(new S(".","Pattern has more than one decimal separator")),a=u;break;case"E":i&&t(new v("exponent",r.notation)),n&&t(new S("E","Exponential patterns may not contain grouping separators")),r.notation={style:"scientific"},h.expDigits>1&&(r.notation.expDigits=h.expDigits),h.plus&&(r.notation.expSign="sign-always"),i=!0}}n?r.group="group-auto":o+s.length>3&&(r.group="group-off");const u=Number(`${s||"0"}.${c}`);if(u&&(r.precision={style:"precision-increment",increment:u}),i)if(r.precision&&!u||(r.integerWidth=o?{min:1,max:o+s.length}:{min:Math.max(1,s.length)}),r.precision)u||(r.integerWidth={min:1,max:1});else{const e=s.length+c.length;-1===a?e>0&&(r.precision={style:"precision-fraction",maxSignificant:e}):(r.precision={style:"precision-fraction",maxSignificant:Math.max(1,e)+l},e>1&&(r.precision.minSignificant=e))}else s.length>1&&(r.integerWidth={min:s.length}),r.precision||!c.length&&!l||(r.precision={style:"precision-fraction",minFraction:c.length,maxFraction:c.length+l});return r}(n.number,r),s=D(n.prefix,o,t,r,!0),a=D(n.suffix,o,t,r,!1);if(i){const e=P(i.prefix,!0),t=P(i.suffix,!1);o.affix={pos:[s,a],neg:[e,t]},o.sign="sign-never"}else(s||a)&&(o.affix={pos:[s,a]});return o}function q(e){const[t]=e.split("-",1);return-1!==["acceleration","angle","area","concentr","consumption","digital","duration","electric","energy","force","frequency","graphics","length","light","mass","power","pressure","speed","temperature","torque","volume"].indexOf(t)}const I={"compact-short":0,"compact-long":0,"notation-simple":0,scientific:2,engineering:2,percent:0,permille:0,"base-unit":0,currency:1,"measure-unit":1,"per-measure-unit":1,"unit-width-narrow":0,"unit-width-short":0,"unit-width-full-name":0,"unit-width-iso-code":0,"unit-width-hidden":0,"precision-integer":0,"precision-unlimited":0,"precision-currency-standard":1,"precision-currency-cash":0,"precision-increment":1,"rounding-mode-ceiling":0,"rounding-mode-floor":0,"rounding-mode-down":0,"rounding-mode-up":0,"rounding-mode-half-even":0,"rounding-mode-half-down":0,"rounding-mode-half-up":0,"rounding-mode-unnecessary":0,"integer-width":1,scale:1,"group-off":0,"group-min2":0,"group-auto":0,"group-on-aligned":0,"group-thousands":0,latin:0,"numbering-system":1,"sign-auto":0,"sign-always":0,"sign-never":0,"sign-accounting":0,"sign-accounting-always":0,"sign-except-zero":0,"sign-accounting-except-zero":0,"decimal-auto":0,"decimal-always":0},M={currency:1,"integer-width":1,"measure-unit":1,"numbering-system":1,"per-measure-unit":1,"precision-increment":1,scale:1};function B(e,t,r){if(function(e){return e in I}(e)){const n=I[e];if(t.length>n){if(0===n)for(const n of t)r(new b(e,n));else r(new _(e,t,n));return!1}if(function(e){return e in M}(e)&&t.length<M[e])return r(new x(e)),!1}return!0}function R(e,t){const r="fraction"===t?/^\.(0*)(\+|#*)$/:/^(@+)(\+|#*)$/,n=e&&e.match(r);if(n){const e=n[1].length;switch(n[2].charAt(0)){case"":return{min:e,max:e};case"+":return{min:e,max:null};case"#":return{min:e,max:e+n[2].length}}}return null}class W{constructor(e){this.skeleton={},this.onError=e}badOption(e,t){this.onError(new b(e,t))}assertEmpty(e){const t=this.skeleton[e];t&&this.onError(new v(e,t))}parseToken(e,t){if(!B(e,t,this.onError))return;const r=t[0],n=this.skeleton;switch(e){case"compact-short":case"compact-long":case"notation-simple":this.assertEmpty("notation"),n.notation={style:e};break;case"scientific":case"engineering":{let r,i=null;for(const n of t)switch(n){case"sign-auto":case"sign-always":case"sign-never":case"sign-accounting":case"sign-accounting-always":case"sign-except-zero":case"sign-accounting-except-zero":r=n;break;default:/^\+e+$/.test(n)?i=n.length-1:this.badOption(e,n)}this.assertEmpty("notation");const o=t.join("/");n.notation=i&&r?{style:e,source:o,expDigits:i,expSign:r}:i?{style:e,source:o,expDigits:i}:r?{style:e,source:o,expSign:r}:{style:e,source:o};break}case"percent":case"permille":case"base-unit":this.assertEmpty("unit"),n.unit={style:e};break;case"currency":/^[A-Z]{3}$/.test(r)?(this.assertEmpty("unit"),n.unit={style:e,currency:r}):this.badOption(e,r);break;case"measure-unit":q(r)?(this.assertEmpty("unit"),n.unit={style:e,unit:r}):this.badOption(e,r);break;case"per-measure-unit":q(r)?(this.assertEmpty("unitPer"),n.unitPer=r):this.badOption(e,r);break;case"unit-width-narrow":case"unit-width-short":case"unit-width-full-name":case"unit-width-iso-code":case"unit-width-hidden":this.assertEmpty("unitWidth"),n.unitWidth=e;break;case"precision-integer":case"precision-unlimited":case"precision-currency-cash":this.assertEmpty("precision"),n.precision={style:e};break;case"precision-currency-standard":this.assertEmpty("precision"),n.precision="w"===r?{style:e,trailingZero:"stripIfInteger"}:{style:e};break;case"precision-increment":{const t=Number(r);t>0?(this.assertEmpty("precision"),n.precision={style:e,increment:t}):this.badOption(e,r);break}case"rounding-mode-ceiling":case"rounding-mode-floor":case"rounding-mode-down":case"rounding-mode-up":case"rounding-mode-half-even":case"rounding-mode-half-odd":case"rounding-mode-half-ceiling":case"rounding-mode-half-floor":case"rounding-mode-half-down":case"rounding-mode-half-up":case"rounding-mode-unnecessary":this.assertEmpty("roundingMode"),n.roundingMode=e;break;case"integer-width":if(/^\+0*$/.test(r))this.assertEmpty("integerWidth"),n.integerWidth={source:r,min:r.length-1};else{const t=r.match(/^#*(0*)$/);t?(this.assertEmpty("integerWidth"),n.integerWidth={source:r,min:t[1].length,max:t[0].length}):this.badOption(e,r)}break;case"scale":{const t=Number(r);t>0?(this.assertEmpty("scale"),n.scale=t):this.badOption(e,r);break}case"group-off":case"group-min2":case"group-auto":case"group-on-aligned":case"group-thousands":this.assertEmpty("group"),n.group=e;break;case"latin":this.assertEmpty("numberingSystem"),n.numberingSystem="latn";break;case"numbering-system":-1!==["arab","arabext","bali","beng","deva","fullwide","gujr","guru","hanidec","khmr","knda","laoo","latn","limb","mlym","mong","mymr","orya","tamldec","telu","thai","tibt"].indexOf(r)?(this.assertEmpty("numberingSystem"),n.numberingSystem=r):this.badOption(e,r);break;case"sign-auto":case"sign-always":case"sign-never":case"sign-accounting":case"sign-accounting-always":case"sign-except-zero":case"sign-accounting-except-zero":this.assertEmpty("sign"),n.sign=e;break;case"decimal-auto":case"decimal-always":this.assertEmpty("decimal"),n.decimal=e;break;default:{const r=function(e,t,r){const n=R(e,"fraction");if(n){t.length>1&&r(new _(e,t,1));const i={style:"precision-fraction",source:e,minFraction:n.min};null!=n.max&&(i.maxFraction=n.max);const o=t[0],s=R(o,"significant");return s?(i.source=`${e}/${o}`,i.minSignificant=s.min,null!=s.max&&(i.maxSignificant=s.max)):o&&r(new b(e,o)),i}const i=R(e,"significant");if(i){for(const n of t)r(new b(e,n));const n={style:"precision-fraction",source:e,minSignificant:i.min};return null!=i.max&&(n.maxSignificant=i.max),n}return null}(e,t,this.onError);r?(this.assertEmpty("precision"),n.precision=r):this.onError(new k(e))}}}}function J(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e=>{throw e};const r=[];for(const t of e.split(" "))if(t){const e=t.split("/"),n=e.shift()||"";r.push({stem:n,options:e})}const n=new W(t);for(const{stem:e,options:t}of r)n.parseToken(e,t);return n.skeleton}function C(e,t,r,n){"string"==typeof t&&(t=0===t.indexOf("::")?J(t.slice(2),n):A(t,r,n));const i=O(e,t),o=j(t,n),s=function(e){const t=E(e),{precision:r}=e;return r&&"precision-increment"===r.style?e=>function(e,t){const r=+e+t/2;return r-r%+t}(e,r.increment)*t:e=>e*t}(t),a=new Intl.NumberFormat(i,o);if(t.affix){const[e,r]=t.affix.pos,[n,i]=t.affix.neg||["",""];return t=>{const o=a.format(s(t));return t<0?`${n}${o}${i}`:`${e}${o}${r}`}}return e=>a.format(s(e))}function U(e,t,r,n){"string"==typeof t&&(t=0===t.indexOf("::")?J(t.slice(2),n):A(t,r,n));const i=O(e,t),o=j(t,n),s=function(e){const t=E(e),{precision:r}=e;if(r&&"precision-increment"===r.style){const e="+n + "+r.increment/2;let n=`x - (x % +${r.increment})`;return 1!==t&&(n=`(${n}) * ${t}`),`function(n) { var x = ${e}; return ${n}; }`}return 1!==t?`function(n) { return n * ${t}; }`:null}(t),a=["(function() {",`var opt = ${JSON.stringify(o)};`,`var nf = new Intl.NumberFormat(${JSON.stringify(i)}, opt);`];let c="nf.format(value)";if(s&&(a.push(`var mod = ${s};`),c="nf.format(mod(value))"),t.affix){const[e,r]=t.affix.pos.map((e=>JSON.stringify(e)));if(t.affix.neg){const[n,i]=t.affix.neg.map((e=>JSON.stringify(e)));c=`value < 0 ? ${n} + ${c} + ${i} : ${e} + ${c} + ${r}`}else c=`${e} + ${c} + ${r}`}return a.push(`return function(value) { return ${c}; }`),a.join("\n ")+"\n})()"}var Z="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==r.g?r.g:"undefined"!=typeof self?self:{};function K(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var G={},L={},H={exports:{}};!function(e){var t,r;t=Z,r=function(){var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,r="boolean"==typeof(new RegExp).sticky;function n(e){return e&&"[object RegExp]"===t.call(e)}function i(e){return e&&"object"==typeof e&&!n(e)&&!Array.isArray(e)}function o(e){return"("+e+")"}function s(e){return e.length?"(?:"+e.map((function(e){return"(?:"+e+")"})).join("|")+")":"(?!)"}function a(e){if("string"==typeof e)return"(?:"+e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")+")";if(n(e)){if(e.ignoreCase)throw new Error("RegExp /i flag not allowed");if(e.global)throw new Error("RegExp /g flag is implied");if(e.sticky)throw new Error("RegExp /y flag is implied");if(e.multiline)throw new Error("RegExp /m flag is implied");return e.source}throw new Error("Not a pattern: "+e)}function c(e,t){return e.length>t?e:Array(t-e.length+1).join(" ")+e}function l(t,r){if(i(r)||(r={match:r}),r.include)throw new Error("Matching rules cannot also include states");var o={defaultType:t,lineBreaks:!!r.error||!!r.fallback,pop:!1,next:null,push:null,error:!1,fallback:!1,value:null,type:null,shouldThrow:!1};for(var s in r)e.call(r,s)&&(o[s]=r[s]);if("string"==typeof o.type&&t!==o.type)throw new Error("Type transform cannot be a string (type '"+o.type+"' for token '"+t+"')");var a=o.match;return o.match=Array.isArray(a)?a:a?[a]:[],o.match.sort((function(e,t){return n(e)&&n(t)?0:n(t)?-1:n(e)?1:t.length-e.length})),o}function u(e){return Array.isArray(e)?function(e){for(var t=[],r=0;r<e.length;r++){var n=e[r];if(n.include)for(var i=[].concat(n.include),o=0;o<i.length;o++)t.push({include:i[o]});else{if(!n.type)throw new Error("Rule has no type: "+JSON.stringify(n));t.push(l(n.type,n))}}return t}(e):function(e){for(var t=Object.getOwnPropertyNames(e),r=[],n=0;n<t.length;n++){var o=t[n],s=e[o],a=[].concat(s);if("include"!==o){var c=[];a.forEach((function(e){i(e)?(c.length&&r.push(l(o,c)),r.push(l(o,e)),c=[]):c.push(e)})),c.length&&r.push(l(o,c))}else for(var u=0;u<a.length;u++)r.push({include:a[u]})}return r}(e)}var h=l("error",{lineBreaks:!0,shouldThrow:!0});function f(e,t){for(var i=null,c=Object.create(null),l=!0,u=null,f=[],p=[],d=0;d<e.length;d++)e[d].fallback&&(l=!1);for(d=0;d<e.length;d++){var m=e[d];if(m.include)throw new Error("Inheritance is not allowed in stateless lexers");if(m.error||m.fallback){if(i)throw!m.fallback==!i.fallback?new Error("Multiple "+(m.fallback?"fallback":"error")+" rules not allowed (for token '"+m.defaultType+"')"):new Error("fallback and error are mutually exclusive (for token '"+m.defaultType+"')");i=m}var g=m.match.slice();if(l)for(;g.length&&"string"==typeof g[0]&&1===g[0].length;)c[g.shift().charCodeAt(0)]=m;if(m.pop||m.push||m.next){if(!t)throw new Error("State-switching options are not allowed in stateless lexers (for token '"+m.defaultType+"')");if(m.fallback)throw new Error("State-switching options are not allowed on fallback tokens (for token '"+m.defaultType+"')")}if(0!==g.length){l=!1,f.push(m);for(var y=0;y<g.length;y++){var w=g[y];if(n(w))if(null===u)u=w.unicode;else if(u!==w.unicode&&!1===m.fallback)throw new Error("If one rule is /u then all must be")}var b=s(g.map(a)),k=new RegExp(b);if(k.test(""))throw new Error("RegExp matches empty string: "+k);if(new RegExp("|"+b).exec("").length-1>0)throw new Error("RegExp has capture groups: "+k+"\nUse (?: … ) instead");if(!m.lineBreaks&&k.test("\n"))throw new Error("Rule should declare lineBreaks: "+k);p.push(o(b))}}var v=i&&i.fallback,x=r&&!v?"ym":"gm",S=r||v?"":"|";return!0===u&&(x+="u"),{regexp:new RegExp(s(p)+S,x),groups:f,fast:c,error:i||h}}function p(e,t,r){var n=e&&(e.push||e.next);if(n&&!r[n])throw new Error("Missing state '"+n+"' (in token '"+e.defaultType+"' of state '"+t+"')");if(e&&e.pop&&1!=+e.pop)throw new Error("pop must be 1 (in token '"+e.defaultType+"' of state '"+t+"')")}var d=function(e,t){this.startState=t,this.states=e,this.buffer="",this.stack=[],this.reset()};d.prototype.reset=function(e,t){return this.buffer=e||"",this.index=0,this.line=t?t.line:1,this.col=t?t.col:1,this.queuedToken=t?t.queuedToken:null,this.queuedText=t?t.queuedText:"",this.queuedThrow=t?t.queuedThrow:null,this.setState(t?t.state:this.startState),this.stack=t&&t.stack?t.stack.slice():[],this},d.prototype.save=function(){return{line:this.line,col:this.col,state:this.state,stack:this.stack.slice(),queuedToken:this.queuedToken,queuedText:this.queuedText,queuedThrow:this.queuedThrow}},d.prototype.setState=function(e){if(e&&this.state!==e){this.state=e;var t=this.states[e];this.groups=t.groups,this.error=t.error,this.re=t.regexp,this.fast=t.fast}},d.prototype.popState=function(){this.setState(this.stack.pop())},d.prototype.pushState=function(e){this.stack.push(this.state),this.setState(e)};var m=r?function(e,t){return e.exec(t)}:function(e,t){var r=e.exec(t);return 0===r[0].length?null:r};function g(){return this.value}if(d.prototype._getGroup=function(e){for(var t=this.groups.length,r=0;r<t;r++)if(void 0!==e[r+1])return this.groups[r];throw new Error("Cannot find token type for matched text")},d.prototype.next=function(){var e=this.index;if(this.queuedGroup){var t=this._token(this.queuedGroup,this.queuedText,e);return this.queuedGroup=null,this.queuedText="",t}var r=this.buffer;if(e!==r.length){if(s=this.fast[r.charCodeAt(e)])return this._token(s,r.charAt(e),e);var n=this.re;n.lastIndex=e;var i=m(n,r),o=this.error;if(null==i)return this._token(o,r.slice(e,r.length),e);var s=this._getGroup(i),a=i[0];return o.fallback&&i.index!==e?(this.queuedGroup=s,this.queuedText=a,this._token(o,r.slice(e,i.index),e)):this._token(s,a,e)}},d.prototype._token=function(e,t,r){var n=0;if(e.lineBreaks){var i=/\n/g,o=1;if("\n"===t)n=1;else for(;i.exec(t);)n++,o=i.lastIndex}var s={type:"function"==typeof e.type&&e.type(t)||e.defaultType,value:"function"==typeof e.value?e.value(t):t,text:t,toString:g,offset:r,lineBreaks:n,line:this.line,col:this.col},a=t.length;if(this.index+=a,this.line+=n,0!==n?this.col=a-o+1:this.col+=a,e.shouldThrow)throw new Error(this.formatError(s,"invalid syntax"));return e.pop?this.popState():e.push?this.pushState(e.push):e.next&&this.setState(e.next),s},"undefined"!=typeof Symbol&&Symbol.iterator){var y=function(e){this.lexer=e};y.prototype.next=function(){var e=this.lexer.next();return{value:e,done:!e}},y.prototype[Symbol.iterator]=function(){return this},d.prototype[Symbol.iterator]=function(){return new y(this)}}return d.prototype.formatError=function(e,t){if(null==e){var r=this.buffer.slice(this.index);e={text:r,offset:this.index,lineBreaks:-1===r.indexOf("\n")?0:1,line:this.line,col:this.col}}var n=Math.max(e.line-2,1),i=e.line+2,o=String(i).length,s=function(e,t){for(var r=e.length,n=0;;){var i=e.lastIndexOf("\n",r-1);if(-1===i)break;if(r=i,++n===t)break;if(0===r)break}var o=n<t?0:r+1;return e.substring(o).split("\n")}(this.buffer,this.line-e.line+2+1).slice(0,5),a=[];a.push(t+" at line "+e.line+" col "+e.col+":"),a.push("");for(var l=0;l<s.length;l++){var u=s[l],h=n+l;a.push(c(String(h),o)+" "+u),h===e.line&&a.push(c("",o+e.col+1)+"^")}return a.join("\n")},d.prototype.clone=function(){return new d(this.states,this.state)},d.prototype.has=function(e){return!0},{compile:function(e){var t=f(u(e));return new d({start:t},"start")},states:function(e,t){var r=e.$all?u(e.$all):[];delete e.$all;var n=Object.getOwnPropertyNames(e);t||(t=n[0]);for(var i=Object.create(null),o=0;o<n.length;o++)i[b=n[o]]=u(e[b]).concat(r);for(o=0;o<n.length;o++)for(var s=i[b=n[o]],a=Object.create(null),c=0;c<s.length;c++){var l=s[c];if(l.include){var h=[c,1];if(l.include!==b&&!a[l.include]){a[l.include]=!0;var m=i[l.include];if(!m)throw new Error("Cannot include nonexistent state '"+l.include+"' (in state '"+b+"')");for(var g=0;g<m.length;g++){var y=m[g];-1===s.indexOf(y)&&h.push(y)}}s.splice.apply(s,h),c--}}var w=Object.create(null);for(o=0;o<n.length;o++){var b;w[b=n[o]]=f(i[b],!0)}for(o=0;o<n.length;o++){var k=n[o],v=w[k],x=v.groups;for(c=0;c<x.length;c++)p(x[c],k,w);var S=Object.getOwnPropertyNames(v.fast);for(c=0;c<S.length;c++)p(v.fast[S[c]],k,w)}return new d(w,t)},error:Object.freeze({error:!0}),fallback:Object.freeze({fallback:!0}),keywords:function(e){for(var t="undefined"!=typeof Map,r=t?new Map:Object.create(null),n=Object.getOwnPropertyNames(e),i=0;i<n.length;i++){var o=n[i],s=e[o];(Array.isArray(s)?s:[s]).forEach((function(e){if("string"!=typeof e)throw new Error("keyword must be string (in keyword '"+o+"')");t?r.set(e,o):r[e]=o}))}return function(e){return t?r.get(e):r[e]}}}},e.exports?e.exports=r():t.moo=r()}(H);var Y=H.exports;(function(e){var t=Z&&Z.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.lexer=e.states=void 0;const r=t(Y);e.states={body:{doubleapos:{match:"''",value:()=>"'"},quoted:{lineBreaks:!0,match:/'[{}#](?:[^]*?[^'])?'(?!')/u,value:e=>e.slice(1,-1).replace(/''/g,"'")},argument:{lineBreaks:!0,match:/\{\s*[^\p{Pat_Syn}\p{Pat_WS}]+\s*/u,push:"arg",value:e=>e.substring(1).trim()},octothorpe:"#",end:{match:"}",pop:1},content:{lineBreaks:!0,match:/[^][^{}#']*/u}},arg:{select:{lineBreaks:!0,match:/,\s*(?:plural|select|selectordinal)\s*,\s*/u,next:"select",value:e=>e.split(",")[1].trim()},"func-args":{lineBreaks:!0,match:/,\s*[^\p{Pat_Syn}\p{Pat_WS}]+\s*,/u,next:"body",value:e=>e.split(",")[1].trim()},"func-simple":{lineBreaks:!0,match:/,\s*[^\p{Pat_Syn}\p{Pat_WS}]+\s*/u,value:e=>e.substring(1).trim()},end:{match:"}",pop:1}},select:{offset:{lineBreaks:!0,match:/\s*offset\s*:\s*\d+\s*/u,value:e=>e.split(":")[1].trim()},case:{lineBreaks:!0,match:/\s*(?:=\d+|[^\p{Pat_Syn}\p{Pat_WS}]+)\s*\{/u,push:"body",value:e=>e.substring(0,e.indexOf("{")).trim()},end:{match:/\s*\}/u,pop:1}}},e.lexer=r.default.states(e.states)})(L),Object.defineProperty(G,"__esModule",{value:!0});var V=G.parse=G.ParseError=void 0;const Q=L,X=e=>({offset:e.offset,line:e.line,col:e.col,text:e.text,lineBreaks:e.lineBreaks}),ee=e=>"plural"===e||"select"===e||"selectordinal"===e;const te=["number","date","time","spellout","ordinal","duration"],re=["zero","one","two","few","many","other"];class ne extends Error{constructor(e,t){super(Q.lexer.formatError(e,t))}}G.ParseError=ne;class ie{constructor(e,t){var r,n,i,o;this.lexer=Q.lexer.reset(e),this.cardinalKeys=null!==(r=null==t?void 0:t.cardinal)&&void 0!==r?r:re,this.ordinalKeys=null!==(n=null==t?void 0:t.ordinal)&&void 0!==n?n:re,this.strict=null!==(i=null==t?void 0:t.strict)&&void 0!==i&&i,this.strictPluralKeys=null===(o=null==t?void 0:t.strictPluralKeys)||void 0===o||o}parse(){return this.parseBody(!1,!0)}checkSelectKey(e,t,r){if("="===r[0]){if("select"===t)throw new ne(e,`The case ${r} is not valid with select`)}else if("select"!==t){const n="plural"===t?this.cardinalKeys:this.ordinalKeys;if(this.strictPluralKeys&&n.length>0&&!n.includes(r))throw new ne(e,`The ${t} case ${r} is not valid in this locale`)}}parseSelect(e,t,r,n){let{value:i}=e;const o={type:n,arg:i,cases:[],ctx:r};"plural"===n||"selectordinal"===n?t=!0:this.strict&&(t=!1);for(const e of this.lexer)switch(e.type){case"offset":if("select"===n)throw new ne(e,"Unexpected plural offset for select");if(o.cases.length>0)throw new ne(e,"Plural offset must be set before cases");o.pluralOffset=Number(e.value),r.text+=e.text,r.lineBreaks+=e.lineBreaks;break;case"case":this.checkSelectKey(e,n,e.value),o.cases.push({key:e.value,tokens:this.parseBody(t),ctx:X(e)});break;case"end":return o;default:throw new ne(e,`Unexpected lexer token: ${e.type}`)}throw new ne(null,"Unexpected message end")}parseArgToken(e,t){const r=X(e),n=this.lexer.next();if(!n)throw new ne(null,"Unexpected message end");if(r.text+=n.text,r.lineBreaks+=n.lineBreaks,this.strict&&("func-simple"===n.type||"func-args"===n.type)&&!te.includes(n.value)){const t=`Invalid strict mode function arg type: ${n.value}`;throw new ne(e,t)}switch(n.type){case"end":return{type:"argument",arg:e.value,ctx:r};case"func-simple":{const t=this.lexer.next();if(!t)throw new ne(null,"Unexpected message end");if("end"!==t.type)throw new ne(t,`Unexpected lexer token: ${t.type}`);if(r.text+=t.text,ee(n.value.toLowerCase()))throw new ne(n,`Invalid type identifier: ${n.value}`);return{type:"function",arg:e.value,key:n.value,ctx:r}}case"func-args":{if(ee(n.value.toLowerCase())){const e=`Invalid type identifier: ${n.value}`;throw new ne(n,e)}let i=this.parseBody(!this.strict&&t);return this.strict&&i.length>0&&(i=function(e,t){let r="",n="";for(const i of t){const t=i.ctx.text;switch(n+=t,i.type){case"content":r+=i.value;break;case"argument":case"function":case"octothorpe":r+=t;break;default:throw new ne(e,`Unsupported part in strict mode function arg style: ${t}`)}}return[{type:"content",value:r.trim(),ctx:Object.assign({},t[0].ctx,{text:n})}]}(e,i)),{type:"function",arg:e.value,key:n.value,param:i,ctx:r}}case"select":if(ee(n.value))return this.parseSelect(e,t,r,n.value);throw new ne(n,`Unexpected select type ${n.value}`);default:throw new ne(n,`Unexpected lexer token: ${n.type}`)}}parseBody(e,t){const r=[];let n=null;for(const i of this.lexer)if("argument"===i.type)n&&(n=null),r.push(this.parseArgToken(i,e));else if("octothorpe"===i.type&&e)n&&(n=null),r.push({type:"octothorpe",ctx:X(i)});else{if("end"===i.type&&!t)return r;{let t=i.value;if(!e&&"quoted"===i.type&&"#"===t[0]){if(t.includes("{"))throw new ne(i,`Unsupported escape pattern: ${t}`);t=i.text}n?(n.value+=t,n.ctx.text+=i.text,n.ctx.lineBreaks+=i.lineBreaks):(n={type:"content",value:t,ctx:X(i)},r.push(n))}}if(t)return r;throw new ne(null,"Unexpected message end")}}function oe(e){return oe[e]||(oe[e]=new Intl.NumberFormat(e))}V=G.parse=function(e){return new ie(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).parse()};var se=Object.freeze({__proto__:null,_nf:oe,number:function(e,t,r){return oe(e).format(t-r)},plural:function(e,t,r,n,i){if({}.hasOwnProperty.call(n,e))return n[e];t&&(e-=t);var o=r(e,i);return o in n?n[o]:n.other},reqArgs:function(e,t){for(var r=0;r<e.length;++r)if(!t||void 0===t[e[r]])throw new Error("Message requires argument '".concat(e[r],"'"))},select:function(e,t){return{}.hasOwnProperty.call(t,e)?t[e]:t.other},strictNumber:function(e,t,r,n){var i=t-r;if(isNaN(i))throw new Error("`"+n+"` or its offset is not a number");return oe(e).format(i)}});var ae={};function ce(e,t){var r=String(e)+JSON.stringify(t);return ae[r]||(ae[r]=new Intl.NumberFormat(e,t)),ae[r]}var le=Object.freeze({__proto__:null,date:function(e,t,r){var n={day:"numeric",month:"short",year:"numeric"};switch(r){case"full":n.weekday="long";case"long":n.month="long";break;case"short":n.month="numeric"}return new Date(e).toLocaleDateString(t,n)},duration:function(e){if("number"!=typeof e&&(e=Number(e)),!isFinite(e))return String(e);var t="";e<0?(t="-",e=Math.abs(e)):e=Number(e);var r=e%60,n=[Math.round(r)===r?r:r.toFixed(3)];return e<60?n.unshift(0):(e=Math.round((e-Number(n[0]))/60),n.unshift(e%60),e>=60&&(e=Math.round((e-Number(n[0]))/60),n.unshift(e))),t+n.shift()+":"+n.map((function(e){return Number(e)<10?"0"+String(e):String(e)})).join(":")},numberCurrency:function(e,t,r){return ce(t,{style:"currency",currency:r,minimumFractionDigits:2,maximumFractionDigits:2}).format(e)},numberFmt:function(e,t,r,n){var i=r&&r.split(":")||[],o=i[0],s=i[1];return ce(t,{integer:{maximumFractionDigits:0},percent:{style:"percent"},currency:{style:"currency",currency:s&&s.trim()||n,minimumFractionDigits:2,maximumFractionDigits:2}}[o]||{}).format(e)},numberInteger:function(e,t){return ce(t,{maximumFractionDigits:0}).format(e)},numberPercent:function(e,t){return ce(t,{style:"percent"}).format(e)},time:function(e,t,r){var n={second:"numeric",minute:"numeric",hour:"numeric"};switch(r){case"full":case"long":n.timeZoneName="short";break;case"short":delete n.second}return new Date(e).toLocaleTimeString(t,n)}}),ue=K({ES3:{break:!0,continue:!0,delete:!0,else:!0,for:!0,function:!0,if:!0,in:!0,new:!0,return:!0,this:!0,typeof:!0,var:!0,void:!0,while:!0,with:!0,case:!0,catch:!0,default:!0,do:!0,finally:!0,instanceof:!0,switch:!0,throw:!0,try:!0},ESnext:{await:!0,debugger:!0,class:!0,enum:!0,extends:!0,super:!0,const:!0,export:!0,import:!0,null:!0,true:!0,false:!0,implements:!0,let:!0,private:!0,public:!0,yield:!0,interface:!0,package:!0,protected:!0,static:!0}});function he(e,t){t&&(e+=" "+function(e){let t=0;for(let r=0;r<e.length;++r)t=(t<<5)-t+e.charCodeAt(r),t|=0;return t}(e).toString(36));const r=e.trim().replace(/\W+/g,"_");return ue.ES3[r]||ue.ESnext[r]||/^\d/.test(r)?"_"+r:r}function fe(e,t){if(/^[A-Z_$][0-9A-Z_$]*$/i.test(t)&&!ue.ES3[t])return e?e+"."+t:t;{const r=JSON.stringify(t);return e?e+"["+r+"]":r}}var pe=new RegExp("^"+["ar","ckb","fa","he","ks($|[^bfh])","lrc","mzn","pa-Arab","ps","ug","ur","uz-Arab","yi"].join("|^"));var de="@messageformat/runtime/lib/plurals",me=function(){function r(e){this.arguments=[],this.runtime={},this.options=e}return r.prototype.compile=function(e,r,n){var i,o,s=this,a=this.options,c=a.localeCodeFromKey,l=a.requireAllArguments,u=a.strict,h=a.strictPluralKeys;if("object"==typeof e){var f={};try{for(var p=t(Object.keys(e)),d=p.next();!d.done;d=p.next()){var m=d.value,g=c?c(m):m,y=n&&g&&n[g]||r;f[m]=this.compile(e[m],y,n)}}catch(e){i={error:e}}finally{try{d&&!d.done&&(o=p.return)&&o.call(p)}finally{if(i)throw i.error}}return f}this.plural=r;var w={cardinal:r.cardinals,ordinal:r.ordinals,strict:u,strictPluralKeys:h};this.arguments=[];var b=V(e,w).map((function(e){return s.token(e,null)})),k=this.arguments.length>0,v=this.concatenate(b,!0);if(l&&k){this.setRuntimeFn("reqArgs");var x=JSON.stringify(this.arguments);return"(d) => { reqArgs(".concat(x,", d); return ").concat(v,"; }")}return"(".concat(k?"d":"",") => ").concat(v)},r.prototype.cases=function(e,t){var r=this,n=!0,i=e.cases.map((function(e){var i=e.key,o=e.tokens;"other"===i&&(n=!1);var s=o.map((function(e){return r.token(e,t)}));return"".concat(fe(null,i.replace(/^=/,"")),": ").concat(r.concatenate(s,!1))}));if(n){var o=e.type,s=this.plural,a=s.cardinals,c=s.ordinals;if("select"===o||"plural"===o&&a.includes("other")||"selectordinal"===o&&c.includes("other"))throw new Error("No 'other' form found in ".concat(JSON.stringify(e)))}return"{ ".concat(i.join(", ")," }")},r.prototype.concatenate=function(e,t){return"values"===this.options.returnType&&(t||e.length>1)?"["+e.join(", ")+"]":e.join(" + ")||'""'},r.prototype.token=function(e,t){if("content"===e.type)return JSON.stringify(e.value);var r,n,i,o,s,a,c=this.plural,l=c.id,u=c.lc;switch("arg"in e?(this.arguments.push(e.arg),r=[fe("d",e.arg)]):r=[],e.type){case"argument":return this.options.biDiSupport?(i=String(r[0]),o=u,s=pe.test(o),a=JSON.stringify(s?"‏":"‎"),"".concat(a," + ").concat(i," + ").concat(a)):String(r[0]);case"select":n="select",t&&this.options.strict&&(t=null),r.push(this.cases(e,t)),this.setRuntimeFn("select");break;case"selectordinal":n="plural",r.push(e.pluralOffset||0,l,this.cases(e,e),1),this.setLocale(l,!0),this.setRuntimeFn("plural");break;case"plural":n="plural",r.push(e.pluralOffset||0,l,this.cases(e,e)),this.setLocale(l,!1),this.setRuntimeFn("plural");break;case"function":var h=this.options.customFormatters[e.key],f=h&&"module"in h&&"function"==typeof h.module;if(!h){if("date"===e.key){n=this.setDateFormatter(e,r,t);break}if("number"===e.key){n=this.setNumberFormatter(e,r,t);break}}if(r.push(JSON.stringify(this.plural.locale)),e.param){t&&this.options.strict&&(t=null);var p=this.getFormatterArg(e,t);p&&r.push(p)}n=f?he("".concat(e.key,"__").concat(this.plural.locale)):e.key,this.setFormatter(n,e.key);break;case"octothorpe":if(!t)return'"#"';r=[JSON.stringify(this.plural.locale),fe("d",t.arg),t.pluralOffset||0],this.options.strict?(n="strictNumber",r.push(JSON.stringify(t.arg)),this.setRuntimeFn("strictNumber")):(n="number",this.setRuntimeFn("number"))}if(!n)throw new Error("Parser error for token "+JSON.stringify(e));return"".concat(n,"(").concat(r.join(", "),")")},r.prototype.runtimeIncludes=function(e,t){if(he(e)!==e)throw new SyntaxError("Reserved word used as ".concat(t," identifier: ").concat(e));var r=this.runtime[e];if(!r||r.type===t)return r;throw new TypeError("Cannot override ".concat(r.type," runtime function as ").concat(t,": ").concat(e))},r.prototype.setLocale=function(e,t){var r,n,i,o=this.runtimeIncludes(e,"locale"),s=this.plural,a=s.getCardinal,c=s.getPlural,l=s.isDefault;if(!t&&l&&a){if(o)return;r=function(e){return a(e)},n="@messageformat/runtime/lib/cardinals",i=function(){return String(a)}}else{if(o&&(!l||o.module===de))return;r=function(e,t){return c(e,t)},n=l?de:c.module||null,i=function(){return String(c)}}this.runtime[e]=Object.assign(r,{id:e,module:n,toString:i,type:"locale"})},r.prototype.setRuntimeFn=function(e){this.runtimeIncludes(e,"runtime")||(this.runtime[e]=Object.assign(se[e],{id:e,module:"@messageformat/runtime",type:"runtime"}))},r.prototype.getFormatterArg=function(e,r){var n,i,o,s,a=this,c=e.key,l=e.param,u=this.options.customFormatters[c]||ge(c)&&le[c];if(!u||!l)return null;var h="arg"in u&&u.arg||"string";if("options"===h){var f="";try{for(var p=t(l),d=p.next();!d.done;d=p.next()){var m=d.value;if("content"!==m.type)throw new SyntaxError("Expected literal options for ".concat(c," formatter"));f+=m.value}}catch(e){n={error:e}}finally{try{d&&!d.done&&(i=p.return)&&i.call(p)}finally{if(n)throw n.error}}var g={};try{for(var y=t(f.split(",")),w=y.next();!w.done;w=y.next()){var b=w.value,k=b.indexOf(":");if(-1===k)g[b.trim()]=null;else{var v=b.substring(0,k).trim(),x=b.substring(k+1).trim();if("true"===x)g[v]=!0;else if("false"===x)g[v]=!1;else if("null"===x)g[v]=null;else{var S=Number(x);g[v]=Number.isFinite(S)?S:x}}}}catch(e){o={error:e}}finally{try{w&&!w.done&&(s=y.return)&&s.call(y)}finally{if(o)throw o.error}}return JSON.stringify(g)}var _=l.map((function(e){return a.token(e,r)}));if("raw"===h)return"[".concat(_.join(", "),"]");var N=_.join(" + ");return N?"(".concat(N,").trim()"):'""'},r.prototype.setFormatter=function(t,r){if(!this.runtimeIncludes(t,"formatter")){var n=this.options.customFormatters[r||t];if(n){var i="function"==typeof n?{formatter:n}:n;this.runtime[t]=Object.assign(i.formatter.bind({}),e(e({},i.formatter.prototype),{toString:function(){return String(i.formatter)}}),{type:"formatter"},"module"in n&&n.module&&n.id?{id:he(n.id),module:"function"==typeof n.module?n.module(this.plural.locale):n.module}:{id:null,module:null})}else{if(!ge(t))throw new Error("Formatting function not found: ".concat(t));this.runtime[t]=Object.assign(le[t],{type:"formatter"},{id:t,module:"@messageformat/runtime/lib/formatters"})}}},r.prototype.setDateFormatter=function(e,t,r){var n=this,i=e.param,o=this.plural.locale,s=i&&1===i.length&&i[0];if(s&&"content"===s.type&&/^\s*::/.test(s.value)){var a=s.value.trim().substr(2),c=he("date_".concat(o,"_").concat(a),!0);if(!this.runtimeIncludes(c,"formatter")){var l=function(e,t,r){"string"==typeof t&&(t=y(t));const n=p(t,r),i=new Intl.DateTimeFormat(e,n);return e=>i.format(e)}(o,a);this.runtime[c]=Object.assign(l,{id:c,module:null,toString:function(){return function(e,t,r){"string"==typeof t&&(t=y(t));const n=p(t,r);return["(function() {",`var opt = ${JSON.stringify(n)};`,`var dtf = new Intl.DateTimeFormat(${JSON.stringify(e)}, opt);`,"return function(value) { return dtf.format(value); }"].join("\n ")+"\n})()"}(o,a)},type:"formatter"})}return c}if(t.push(JSON.stringify(o)),i&&i.length>0){r&&this.options.strict&&(r=null);var u=i.map((function(e){return n.token(e,r)}));t.push("("+(u.join(" + ")||'""')+").trim()")}return this.setFormatter("date"),"date"},r.prototype.setNumberFormatter=function(e,t,r){var n=this,i=e.param,o=this.plural.locale;if(!i||0===i.length)return t.unshift(JSON.stringify(o)),t.push("0"),this.setRuntimeFn("number"),"number";if(t.push(JSON.stringify(o)),1===i.length&&"content"===i[0].type){var s=i[0].value.trim();switch(s){case"currency":return t.push(JSON.stringify(this.options.currency)),this.setFormatter("numberCurrency"),"numberCurrency";case"integer":return this.setFormatter("numberInteger"),"numberInteger";case"percent":return this.setFormatter("numberPercent"),"numberPercent"}var a=s.match(/^currency:([A-Z]+)$/);if(a)return t.push(JSON.stringify(a[1])),this.setFormatter("numberCurrency"),"numberCurrency";var c=he("number_".concat(o,"_").concat(s),!0);if(!this.runtimeIncludes(c,"formatter")){var l=this.options.currency,u=C(o,s,l);this.runtime[c]=Object.assign(u,{id:null,module:null,toString:function(){return U(o,s,l)},type:"formatter"})}return c}r&&this.options.strict&&(r=null);var h=i.map((function(e){return n.token(e,r)}));return t.push("("+(h.join(" + ")||'""')+").trim()"),t.push(JSON.stringify(this.options.currency)),this.setFormatter("numberFmt"),"numberFmt"},r}();function ge(e){return e in le}const ye=e=>1==e?"one":"other",we=e=>0==e||1==e?"one":"other",be=e=>e>=0&&e<=1?"one":"other",ke=e=>{const t=!String(e).split(".")[1];return 1==e&&t?"one":"other"},ve=e=>"other",xe=e=>1==e?"one":2==e?"two":"other",Se=ye,_e=we,Ne=be,Oe=ye,Ee=be,je=ye,$e=ke,ze=ye,Te=ye,Fe=ye,De=ye,Pe=ye,Ae=we,qe=ve,Ie=be,Me=ve,Be=ye,Re=ye,We=ye,Je=ye,Ce=ye,Ue=ke,Ze=be,Ke=ye,Ge=ve,Le=ye,He=ye,Ye=ke,Ve=ye,Qe=ke,Xe=ye,et=be,tt=ke,rt=ye,nt=ye,it=ke,ot=ke,st=ye,at=be,ct=we,lt=ye,ut=ye,ht=be,ft=ve,pt=ye,dt=ke,mt=ve,gt=ve,yt=ve,wt=ke,bt=xe,kt=ve,vt=ve,xt=ye,St=ye,_t=ve,Nt=ve,Ot=ye,Et=ye,jt=ye,$t=ve,zt=ve,Tt=ye,Ft=ye,Dt=ye,Pt=ve,At=be,qt=ve,It=ye,Mt=ye,Bt=ye,Rt=ye,Wt=ye,Jt=ye,Ct=ke,Ut=ve,Zt=we,Kt=ve,Gt=ye,Lt=we,Ht=ye,Yt=ye,Vt=ye,Qt=ye,Xt=ve,er=ve,tr=ye,rr=xe,nr=ye,ir=ye,or=ye,sr=ke,ar=ye,cr=ye,lr=ye,ur=ve,hr=ye,fr=we,pr=ye,dr=ye,mr=ye,gr=ye,yr=ye,wr=ve,br=we,kr=ye,vr=be,xr=ye,Sr=ye,_r=ye,Nr=ye,Or=ve,Er=ye,jr=xe,$r=ke,zr=ke,Tr=ye,Fr=ye,Dr=xe,Pr=ye,Ar=ve,qr=ve,Ir=xe,Mr=xe,Br=xe,Rr=xe,Wr=xe,Jr=ye,Cr=ye,Ur=ye,Zr=ye,Kr=ye,Gr=ye,Lr=ve,Hr=ke,Yr=ke,Vr=ye,Qr=ye,Xr=ye,en=ye,tn=ve,rn=we,nn=ye,on=ye,sn=ye,an=ve,cn=ve,ln=ye,un=ye,hn=ye,fn=ve,pn=ke,dn=ye,mn=ye,gn=ve,yn=ye,wn=ye,bn=we,kn=ye,vn=ve,xn=ye,Sn=ye,_n=ke,Nn=ve,On=ve,En=ve,jn=be;var $n=Object.freeze({__proto__:null,af:Se,ak:_e,am:Ne,an:Oe,ar:e=>{const t=String(e).split("."),r=Number(t[0])==e&&t[0].slice(-2);return 0==e?"zero":1==e?"one":2==e?"two":r>=3&&r<=10?"few":r>=11&&r<=99?"many":"other"},ars:e=>{const t=String(e).split("."),r=Number(t[0])==e&&t[0].slice(-2);return 0==e?"zero":1==e?"one":2==e?"two":r>=3&&r<=10?"few":r>=11&&r<=99?"many":"other"},as:Ee,asa:je,ast:$e,az:ze,bal:Te,be:e=>{const t=String(e).split("."),r=Number(t[0])==e,n=r&&t[0].slice(-1),i=r&&t[0].slice(-2);return 1==n&&11!=i?"one":n>=2&&n<=4&&(i<12||i>14)?"few":r&&0==n||n>=5&&n<=9||i>=11&&i<=14?"many":"other"},bem:Fe,bez:De,bg:Pe,bho:Ae,bm:qe,bn:Ie,bo:Me,br:e=>{const t=String(e).split("."),r=Number(t[0])==e,n=r&&t[0].slice(-1),i=r&&t[0].slice(-2),o=r&&t[0].slice(-6);return 1==n&&11!=i&&71!=i&&91!=i?"one":2==n&&12!=i&&72!=i&&92!=i?"two":(3==n||4==n||9==n)&&(i<10||i>19)&&(i<70||i>79)&&(i<90||i>99)?"few":0!=e&&r&&0==o?"many":"other"},brx:Be,bs:e=>{const t=String(e).split("."),r=t[0],n=t[1]||"",i=!t[1],o=r.slice(-1),s=r.slice(-2),a=n.slice(-1),c=n.slice(-2);return i&&1==o&&11!=s||1==a&&11!=c?"one":i&&o>=2&&o<=4&&(s<12||s>14)||a>=2&&a<=4&&(c<12||c>14)?"few":"other"},ca:e=>{const t=String(e).split("."),r=t[0],n=!t[1],i=r.slice(-6);return 1==e&&n?"one":0!=r&&0==i&&n?"many":"other"},ce:Re,ceb:e=>{const t=String(e).split("."),r=t[0],n=t[1]||"",i=!t[1],o=r.slice(-1),s=n.slice(-1);return i&&(1==r||2==r||3==r)||i&&4!=o&&6!=o&&9!=o||!i&&4!=s&&6!=s&&9!=s?"one":"other"},cgg:We,chr:Je,ckb:Ce,cs:e=>{const t=String(e).split("."),r=t[0],n=!t[1];return 1==e&&n?"one":r>=2&&r<=4&&n?"few":n?"other":"many"},cy:e=>0==e?"zero":1==e?"one":2==e?"two":3==e?"few":6==e?"many":"other",da:e=>{const t=String(e).split("."),r=t[0],n=Number(t[0])==e;return 1!=e&&(n||0!=r&&1!=r)?"other":"one"},de:Ue,doi:Ze,dsb:e=>{const t=String(e).split("."),r=t[0],n=t[1]||"",i=!t[1],o=r.slice(-2),s=n.slice(-2);return i&&1==o||1==s?"one":i&&2==o||2==s?"two":i&&(3==o||4==o)||3==s||4==s?"few":"other"},dv:Ke,dz:Ge,ee:Le,el:He,en:Ye,eo:Ve,es:e=>{const t=String(e).split("."),r=t[0],n=!t[1],i=r.slice(-6);return 1==e?"one":0!=r&&0==i&&n?"many":"other"},et:Qe,eu:Xe,fa:et,ff:e=>e>=0&&e<2?"one":"other",fi:tt,fil:e=>{const t=String(e).split("."),r=t[0],n=t[1]||"",i=!t[1],o=r.slice(-1),s=n.slice(-1);return i&&(1==r||2==r||3==r)||i&&4!=o&&6!=o&&9!=o||!i&&4!=s&&6!=s&&9!=s?"one":"other"},fo:rt,fr:e=>{const t=String(e).split("."),r=t[0],n=!t[1],i=r.slice(-6);return e>=0&&e<2?"one":0!=r&&0==i&&n?"many":"other"},fur:nt,fy:it,ga:e=>{const t=String(e).split("."),r=Number(t[0])==e;return 1==e?"one":2==e?"two":r&&e>=3&&e<=6?"few":r&&e>=7&&e<=10?"many":"other"},gd:e=>{const t=String(e).split("."),r=Number(t[0])==e;return 1==e||11==e?"one":2==e||12==e?"two":r&&e>=3&&e<=10||r&&e>=13&&e<=19?"few":"other"},gl:ot,gsw:st,gu:at,guw:ct,gv:e=>{const t=String(e).split("."),r=t[0],n=!t[1],i=r.slice(-1),o=r.slice(-2);return n&&1==i?"one":n&&2==i?"two":!n||0!=o&&20!=o&&40!=o&&60!=o&&80!=o?n?"other":"many":"few"},ha:lt,haw:ut,he:e=>{const t=String(e).split("."),r=t[0],n=!t[1];return 1==r&&n||0==r&&!n?"one":2==r&&n?"two":"other"},hi:ht,hnj:ft,hr:e=>{const t=String(e).split("."),r=t[0],n=t[1]||"",i=!t[1],o=r.slice(-1),s=r.slice(-2),a=n.slice(-1),c=n.slice(-2);return i&&1==o&&11!=s||1==a&&11!=c?"one":i&&o>=2&&o<=4&&(s<12||s>14)||a>=2&&a<=4&&(c<12||c>14)?"few":"other"},hsb:e=>{const t=String(e).split("."),r=t[0],n=t[1]||"",i=!t[1],o=r.slice(-2),s=n.slice(-2);return i&&1==o||1==s?"one":i&&2==o||2==s?"two":i&&(3==o||4==o)||3==s||4==s?"few":"other"},hu:pt,hy:e=>e>=0&&e<2?"one":"other",ia:dt,id:mt,ig:gt,ii:yt,io:wt,is:e=>{const t=String(e).split("."),r=t[0],n=(t[1]||"").replace(/0+$/,""),i=Number(t[0])==e,o=r.slice(-1),s=r.slice(-2);return i&&1==o&&11!=s||n%10==1&&n%100!=11?"one":"other"},it:e=>{const t=String(e).split("."),r=t[0],n=!t[1],i=r.slice(-6);return 1==e&&n?"one":0!=r&&0==i&&n?"many":"other"},iu:bt,ja:kt,jbo:vt,jgo:xt,jmc:St,jv:_t,jw:Nt,ka:Ot,kab:e=>e>=0&&e<2?"one":"other",kaj:Et,kcg:jt,kde:$t,kea:zt,kk:Tt,kkj:Ft,kl:Dt,km:Pt,kn:At,ko:qt,ks:It,ksb:Mt,ksh:e=>0==e?"zero":1==e?"one":"other",ku:Bt,kw:e=>{const t=String(e).split("."),r=Number(t[0])==e,n=r&&t[0].slice(-2),i=r&&t[0].slice(-3),o=r&&t[0].slice(-5),s=r&&t[0].slice(-6);return 0==e?"zero":1==e?"one":2==n||22==n||42==n||62==n||82==n||r&&0==i&&(o>=1e3&&o<=2e4||4e4==o||6e4==o||8e4==o)||0!=e&&1e5==s?"two":3==n||23==n||43==n||63==n||83==n?"few":1==e||1!=n&&21!=n&&41!=n&&61!=n&&81!=n?"other":"many"},ky:Rt,lag:e=>{const t=String(e).split(".")[0];return 0==e?"zero":0!=t&&1!=t||0==e?"other":"one"},lb:Wt,lg:Jt,lij:Ct,lkt:Ut,ln:Zt,lo:Kt,lt:e=>{const t=String(e).split("."),r=t[1]||"",n=Number(t[0])==e,i=n&&t[0].slice(-1),o=n&&t[0].slice(-2);return 1==i&&(o<11||o>19)?"one":i>=2&&i<=9&&(o<11||o>19)?"few":0!=r?"many":"other"},lv:e=>{const t=String(e).split("."),r=t[1]||"",n=r.length,i=Number(t[0])==e,o=i&&t[0].slice(-1),s=i&&t[0].slice(-2),a=r.slice(-2),c=r.slice(-1);return i&&0==o||s>=11&&s<=19||2==n&&a>=11&&a<=19?"zero":1==o&&11!=s||2==n&&1==c&&11!=a||2!=n&&1==c?"one":"other"},mas:Gt,mg:Lt,mgo:Ht,mk:e=>{const t=String(e).split("."),r=t[0],n=t[1]||"",i=!t[1],o=r.slice(-1),s=r.slice(-2),a=n.slice(-1),c=n.slice(-2);return i&&1==o&&11!=s||1==a&&11!=c?"one":"other"},ml:Yt,mn:Vt,mo:e=>{const t=String(e).split("."),r=!t[1],n=Number(t[0])==e&&t[0].slice(-2);return 1==e&&r?"one":!r||0==e||1!=e&&n>=1&&n<=19?"few":"other"},mr:Qt,ms:Xt,mt:e=>{const t=String(e).split("."),r=Number(t[0])==e&&t[0].slice(-2);return 1==e?"one":2==e?"two":0==e||r>=3&&r<=10?"few":r>=11&&r<=19?"many":"other"},my:er,nah:tr,naq:rr,nb:nr,nd:ir,ne:or,nl:sr,nn:ar,nnh:cr,no:lr,nqo:ur,nr:hr,nso:fr,ny:pr,nyn:dr,om:mr,or:gr,os:yr,osa:wr,pa:br,pap:kr,pcm:vr,pl:e=>{const t=String(e).split("."),r=t[0],n=!t[1],i=r.slice(-1),o=r.slice(-2);return 1==e&&n?"one":n&&i>=2&&i<=4&&(o<12||o>14)?"few":n&&1!=r&&(0==i||1==i)||n&&i>=5&&i<=9||n&&o>=12&&o<=14?"many":"other"},prg:e=>{const t=String(e).split("."),r=t[1]||"",n=r.length,i=Number(t[0])==e,o=i&&t[0].slice(-1),s=i&&t[0].slice(-2),a=r.slice(-2),c=r.slice(-1);return i&&0==o||s>=11&&s<=19||2==n&&a>=11&&a<=19?"zero":1==o&&11!=s||2==n&&1==c&&11!=a||2!=n&&1==c?"one":"other"},ps:xr,pt:e=>{const t=String(e).split("."),r=t[0],n=!t[1],i=r.slice(-6);return 0==r||1==r?"one":0!=r&&0==i&&n?"many":"other"},pt_PT:e=>{const t=String(e).split("."),r=t[0],n=!t[1],i=r.slice(-6);return 1==e&&n?"one":0!=r&&0==i&&n?"many":"other"},rm:Sr,ro:e=>{const t=String(e).split("."),r=!t[1],n=Number(t[0])==e&&t[0].slice(-2);return 1==e&&r?"one":!r||0==e||1!=e&&n>=1&&n<=19?"few":"other"},rof:_r,ru:e=>{const t=String(e).split("."),r=t[0],n=!t[1],i=r.slice(-1),o=r.slice(-2);return n&&1==i&&11!=o?"one":n&&i>=2&&i<=4&&(o<12||o>14)?"few":n&&0==i||n&&i>=5&&i<=9||n&&o>=11&&o<=14?"many":"other"},rwk:Nr,sah:Or,saq:Er,sat:jr,sc:$r,scn:zr,sd:Tr,sdh:Fr,se:Dr,seh:Pr,ses:Ar,sg:qr,sh:e=>{const t=String(e).split("."),r=t[0],n=t[1]||"",i=!t[1],o=r.slice(-1),s=r.slice(-2),a=n.slice(-1),c=n.slice(-2);return i&&1==o&&11!=s||1==a&&11!=c?"one":i&&o>=2&&o<=4&&(s<12||s>14)||a>=2&&a<=4&&(c<12||c>14)?"few":"other"},shi:e=>{const t=String(e).split("."),r=Number(t[0])==e;return e>=0&&e<=1?"one":r&&e>=2&&e<=10?"few":"other"},si:e=>{const t=String(e).split("."),r=t[0],n=t[1]||"";return 0==e||1==e||0==r&&1==n?"one":"other"},sk:e=>{const t=String(e).split("."),r=t[0],n=!t[1];return 1==e&&n?"one":r>=2&&r<=4&&n?"few":n?"other":"many"},sl:e=>{const t=String(e).split("."),r=t[0],n=!t[1],i=r.slice(-2);return n&&1==i?"one":n&&2==i?"two":n&&(3==i||4==i)||!n?"few":"other"},sma:Ir,smi:Mr,smj:Br,smn:Rr,sms:Wr,sn:Jr,so:Cr,sq:Ur,sr:e=>{const t=String(e).split("."),r=t[0],n=t[1]||"",i=!t[1],o=r.slice(-1),s=r.slice(-2),a=n.slice(-1),c=n.slice(-2);return i&&1==o&&11!=s||1==a&&11!=c?"one":i&&o>=2&&o<=4&&(s<12||s>14)||a>=2&&a<=4&&(c<12||c>14)?"few":"other"},ss:Zr,ssy:Kr,st:Gr,su:Lr,sv:Hr,sw:Yr,syr:Vr,ta:Qr,te:Xr,teo:en,th:tn,ti:rn,tig:nn,tk:on,tl:e=>{const t=String(e).split("."),r=t[0],n=t[1]||"",i=!t[1],o=r.slice(-1),s=n.slice(-1);return i&&(1==r||2==r||3==r)||i&&4!=o&&6!=o&&9!=o||!i&&4!=s&&6!=s&&9!=s?"one":"other"},tn:sn,to:an,tpi:cn,tr:ln,ts:un,tzm:e=>{const t=String(e).split("."),r=Number(t[0])==e;return 0==e||1==e||r&&e>=11&&e<=99?"one":"other"},ug:hn,uk:e=>{const t=String(e).split("."),r=t[0],n=!t[1],i=r.slice(-1),o=r.slice(-2);return n&&1==i&&11!=o?"one":n&&i>=2&&i<=4&&(o<12||o>14)?"few":n&&0==i||n&&i>=5&&i<=9||n&&o>=11&&o<=14?"many":"other"},und:fn,ur:pn,uz:dn,ve:mn,vec:e=>{const t=String(e).split("."),r=t[0],n=!t[1],i=r.slice(-6);return 1==e&&n?"one":0!=r&&0==i&&n?"many":"other"},vi:gn,vo:yn,vun:wn,wa:bn,wae:kn,wo:vn,xh:xn,xog:Sn,yi:_n,yo:Nn,yue:On,zh:En,zu:jn});const zn="zero",Tn="one",Fn="two",Dn="few",Pn="many",An="other",qn={cardinal:[Tn,An],ordinal:[An]},In={cardinal:[Tn,An],ordinal:[Tn,An]},Mn={cardinal:[An],ordinal:[An]},Bn={cardinal:[Tn,Fn,An],ordinal:[An]},Rn=qn,Wn=qn,Jn=qn,Cn=qn,Un={cardinal:[zn,Tn,Fn,Dn,Pn,An],ordinal:[An]},Zn={cardinal:[zn,Tn,Fn,Dn,Pn,An],ordinal:[An]},Kn={cardinal:[Tn,An],ordinal:[Tn,Fn,Dn,Pn,An]},Gn=qn,Ln=qn,Hn={cardinal:[Tn,An],ordinal:[Tn,Dn,Pn,An]},Yn=In,Vn={cardinal:[Tn,Dn,Pn,An],ordinal:[Dn,An]},Qn=qn,Xn=qn,ei=qn,ti=qn,ri=Mn,ni={cardinal:[Tn,An],ordinal:[Tn,Fn,Dn,Pn,An]},ii=Mn,oi={cardinal:[Tn,Fn,Dn,Pn,An],ordinal:[An]},si=qn,ai={cardinal:[Tn,Dn,An],ordinal:[An]},ci={cardinal:[Tn,Pn,An],ordinal:[Tn,Fn,Dn,An]},li=qn,ui=qn,hi=qn,fi=qn,pi=qn,di={cardinal:[Tn,Dn,Pn,An],ordinal:[An]},mi={cardinal:[zn,Tn,Fn,Dn,Pn,An],ordinal:[zn,Tn,Fn,Dn,Pn,An]},gi=qn,yi=qn,wi=qn,bi={cardinal:[Tn,Fn,Dn,An],ordinal:[An]},ki=qn,vi=Mn,xi=qn,Si=qn,_i={cardinal:[Tn,An],ordinal:[Tn,Fn,Dn,An]},Ni=qn,Oi={cardinal:[Tn,Pn,An],ordinal:[An]},Ei=qn,ji=qn,$i=qn,zi=qn,Ti=qn,Fi=In,Di=qn,Pi={cardinal:[Tn,Pn,An],ordinal:[Tn,An]},Ai=qn,qi=qn,Ii={cardinal:[Tn,Fn,Dn,Pn,An],ordinal:[Tn,An]},Mi={cardinal:[Tn,Fn,Dn,An],ordinal:[Tn,Fn,Dn,An]},Bi=qn,Ri=qn,Wi={cardinal:[Tn,An],ordinal:[Tn,Fn,Dn,Pn,An]},Ji=qn,Ci={cardinal:[Tn,Fn,Dn,Pn,An],ordinal:[An]},Ui=qn,Zi=qn,Ki=Bn,Gi={cardinal:[Tn,An],ordinal:[Tn,Fn,Dn,Pn,An]},Li=Mn,Hi={cardinal:[Tn,Dn,An],ordinal:[An]},Yi={cardinal:[Tn,Fn,Dn,An],ordinal:[An]},Vi=In,Qi=In,Xi=qn,eo=Mn,to=Mn,ro=Mn,no=qn,io=qn,oo={cardinal:[Tn,Pn,An],ordinal:[Pn,An]},so=Bn,ao=Mn,co=Mn,lo=qn,uo=qn,ho=Mn,fo=Mn,po={cardinal:[Tn,An],ordinal:[Tn,Pn,An]},mo=qn,go=qn,yo=qn,wo=Mn,bo=Mn,ko={cardinal:[Tn,An],ordinal:[Pn,An]},vo=qn,xo=qn,So=Mn,_o=qn,No=Mn,Oo=qn,Eo=qn,jo={cardinal:[zn,Tn,An],ordinal:[An]},$o=qn,zo={cardinal:[zn,Tn,Fn,Dn,Pn,An],ordinal:[Tn,Pn,An]},To=qn,Fo={cardinal:[zn,Tn,An],ordinal:[An]},Do=qn,Po=qn,Ao={cardinal:[Tn,An],ordinal:[Pn,An]},qo=Mn,Io=qn,Mo={cardinal:[An],ordinal:[Tn,An]},Bo={cardinal:[Tn,Dn,Pn,An],ordinal:[An]},Ro={cardinal:[zn,Tn,An],ordinal:[An]},Wo=qn,Jo=qn,Co=qn,Uo={cardinal:[Tn,An],ordinal:[Tn,Fn,Pn,An]},Zo=qn,Ko=qn,Go={cardinal:[Tn,Dn,An],ordinal:[Tn,An]},Lo={cardinal:[Tn,An],ordinal:[Tn,Fn,Dn,An]},Ho={cardinal:[An],ordinal:[Tn,An]},Yo={cardinal:[Tn,Fn,Dn,Pn,An],ordinal:[An]},Vo=Mn,Qo=qn,Xo=Bn,es=qn,ts=qn,rs=In,ns=qn,is=qn,os=qn,ss=qn,as=Mn,cs=qn,ls=qn,us=qn,hs=qn,fs=qn,ps={cardinal:[Tn,An],ordinal:[Tn,Fn,Dn,Pn,An]},ds=qn,ms=Mn,gs=qn,ys=qn,ws=qn,bs={cardinal:[Tn,Dn,Pn,An],ordinal:[An]},ks={cardinal:[zn,Tn,An],ordinal:[An]},vs=qn,xs={cardinal:[Tn,Pn,An],ordinal:[An]},Ss={cardinal:[Tn,Pn,An],ordinal:[An]},_s=qn,Ns={cardinal:[Tn,Dn,An],ordinal:[Tn,An]},Os=qn,Es={cardinal:[Tn,Dn,Pn,An],ordinal:[An]},js=qn,$s=Mn,zs=qn,Ts=Bn,Fs={cardinal:[Tn,An],ordinal:[Pn,An]},Ds={cardinal:[Tn,An],ordinal:[Pn,An]},Ps=qn,As=qn,qs=Bn,Is=qn,Ms=Mn,Bs=Mn,Rs={cardinal:[Tn,Dn,An],ordinal:[An]},Ws={cardinal:[Tn,Dn,An],ordinal:[An]},Js=qn,Cs={cardinal:[Tn,Dn,Pn,An],ordinal:[An]},Us={cardinal:[Tn,Fn,Dn,An],ordinal:[An]},Zs=Bn,Ks=Bn,Gs=Bn,Ls=Bn,Hs=Bn,Ys=qn,Vs=qn,Qs={cardinal:[Tn,An],ordinal:[Tn,Pn,An]},Xs={cardinal:[Tn,Dn,An],ordinal:[An]},ea=qn,ta=qn,ra=qn,na=Mn,ia=In,oa=qn,sa=qn,aa=qn,ca=qn,la=qn,ua=Mn,ha=qn,fa=qn,pa={cardinal:[Tn,An],ordinal:[Dn,An]},da=In,ma=qn,ga=Mn,ya=Mn,wa=qn,ba=qn,ka=qn,va=qn,xa={cardinal:[Tn,Dn,Pn,An],ordinal:[Dn,An]},Sa=Mn,_a=qn,Na=qn,Oa=qn,Ea={cardinal:[Tn,Pn,An],ordinal:[Pn,An]},ja={cardinal:[An],ordinal:[Tn,An]},$a=qn,za=qn,Ta=qn,Fa=qn,Da=Mn,Pa=qn,Aa=qn,qa=qn,Ia=Mn,Ma=Mn,Ba=Mn,Ra=qn;var Wa=Object.freeze({__proto__:null,af:Rn,ak:Wn,am:Jn,an:Cn,ar:Un,ars:Zn,as:Kn,asa:Gn,ast:Ln,az:Hn,bal:Yn,be:Vn,bem:Qn,bez:Xn,bg:ei,bho:ti,bm:ri,bn:ni,bo:ii,br:oi,brx:si,bs:ai,ca:ci,ce:li,ceb:ui,cgg:hi,chr:fi,ckb:pi,cs:di,cy:mi,da:gi,de:yi,doi:wi,dsb:bi,dv:ki,dz:vi,ee:xi,el:Si,en:_i,eo:Ni,es:Oi,et:Ei,eu:ji,fa:$i,ff:zi,fi:Ti,fil:Fi,fo:Di,fr:Pi,fur:Ai,fy:qi,ga:Ii,gd:Mi,gl:Bi,gsw:Ri,gu:Wi,guw:Ji,gv:Ci,ha:Ui,haw:Zi,he:Ki,hi:Gi,hnj:Li,hr:Hi,hsb:Yi,hu:Vi,hy:Qi,ia:Xi,id:eo,ig:to,ii:ro,io:no,is:io,it:oo,iu:so,ja:ao,jbo:co,jgo:lo,jmc:uo,jv:ho,jw:fo,ka:po,kab:mo,kaj:go,kcg:yo,kde:wo,kea:bo,kk:ko,kkj:vo,kl:xo,km:So,kn:_o,ko:No,ks:Oo,ksb:Eo,ksh:jo,ku:$o,kw:zo,ky:To,lag:Fo,lb:Do,lg:Po,lij:Ao,lkt:qo,ln:Io,lo:Mo,lt:Bo,lv:Ro,mas:Wo,mg:Jo,mgo:Co,mk:Uo,ml:Zo,mn:Ko,mo:Go,mr:Lo,ms:Ho,mt:Yo,my:Vo,nah:Qo,naq:Xo,nb:es,nd:ts,ne:rs,nl:ns,nn:is,nnh:os,no:ss,nqo:as,nr:cs,nso:ls,ny:us,nyn:hs,om:fs,or:ps,os:ds,osa:ms,pa:gs,pap:ys,pcm:ws,pl:bs,prg:ks,ps:vs,pt:xs,pt_PT:Ss,rm:_s,ro:Ns,rof:Os,ru:Es,rwk:js,sah:$s,saq:zs,sat:Ts,sc:Fs,scn:Ds,sd:Ps,sdh:As,se:qs,seh:Is,ses:Ms,sg:Bs,sh:Rs,shi:Ws,si:Js,sk:Cs,sl:Us,sma:Zs,smi:Ks,smj:Gs,smn:Ls,sms:Hs,sn:Ys,so:Vs,sq:Qs,sr:Xs,ss:ea,ssy:ta,st:ra,su:na,sv:ia,sw:oa,syr:sa,ta:aa,te:ca,teo:la,th:ua,ti:ha,tig:fa,tk:pa,tl:da,tn:ma,to:ga,tpi:ya,tr:wa,ts:ba,tzm:ka,ug:va,uk:xa,und:Sa,ur:_a,uz:Na,ve:Oa,vec:Ea,vi:ja,vo:$a,vun:za,wa:Ta,wae:Fa,wo:Da,xh:Pa,xog:Aa,yi:qa,yo:Ia,yue:Ma,zh:Ba,zu:Ra});const Ja=(e,t)=>t?"other":1==e?"one":"other",Ca=(e,t)=>t?"other":0==e||1==e?"one":"other",Ua=(e,t)=>t?"other":e>=0&&e<=1?"one":"other",Za=(e,t)=>{const r=!String(e).split(".")[1];return t?"other":1==e&&r?"one":"other"},Ka=(e,t)=>"other",Ga=(e,t)=>t?"other":1==e?"one":2==e?"two":"other",La=Ja,Ha=Ca,Ya=Ua,Va=Ja,Qa=Ja,Xa=Za,ec=Ja,tc=Ja,rc=Ja,nc=Ca,ic=Ka,oc=Ka,sc=Ja,ac=Ja,cc=Ja,lc=Ja,uc=Ja,hc=Za,fc=Ua,pc=Ja,dc=Ka,mc=Ja,gc=Ja,yc=Ja,wc=Za,bc=Ja,kc=Ua,vc=Za,xc=Ja,Sc=Ja,_c=Za,Nc=Za,Oc=Ja,Ec=Ca,jc=Ja,$c=Ja,zc=Ka,Tc=Za,Fc=Ka,Dc=Ka,Pc=Ka,Ac=Za,qc=Ga,Ic=Ka,Mc=Ka,Bc=Ja,Rc=Ja,Wc=Ka,Jc=Ka,Cc=Ja,Uc=Ja,Zc=Ka,Kc=Ka,Gc=Ja,Lc=Ja,Hc=Ka,Yc=Ua,Vc=Ka,Qc=Ja,Xc=Ja,el=Ja,tl=Ja,rl=Ja,nl=Ja,il=Ka,ol=Ca,sl=Ja,al=Ca,cl=Ja,ll=Ja,ul=Ja,hl=Ka,fl=Ja,pl=Ga,dl=Ja,ml=Ja,gl=Za,yl=Ja,wl=Ja,bl=Ja,kl=Ka,vl=Ja,xl=Ca,Sl=Ja,_l=Ja,Nl=Ja,Ol=Ja,El=Ka,jl=Ca,$l=Ja,zl=Ua,Tl=Ja,Fl=Ja,Dl=Ja,Pl=Ja,Al=Ka,ql=Ja,Il=Ga,Ml=Ja,Bl=Ja,Rl=Ga,Wl=Ja,Jl=Ka,Cl=Ka,Ul=Ga,Zl=Ga,Kl=Ga,Gl=Ga,Ll=Ga,Hl=Ja,Yl=Ja,Vl=Ja,Ql=Ja,Xl=Ja,eu=Ka,tu=Za,ru=Ja,nu=Ja,iu=Ja,ou=Ja,su=Ka,au=Ca,cu=Ja,lu=Ja,uu=Ka,hu=Ka,fu=Ja,pu=Ja,du=Ja,mu=Ka,gu=Za,yu=Ja,wu=Ja,bu=Ja,ku=Ja,vu=Ca,xu=Ja,Su=Ka,_u=Ja,Nu=Ja,Ou=Za,Eu=Ka,ju=Ka,$u=Ka,zu=Ua;var Tu=Object.freeze({__proto__:null,af:La,ak:Ha,am:Ya,an:Va,ar:(e,t)=>{const r=String(e).split("."),n=Number(r[0])==e&&r[0].slice(-2);return t?"other":0==e?"zero":1==e?"one":2==e?"two":n>=3&&n<=10?"few":n>=11&&n<=99?"many":"other"},ars:(e,t)=>{const r=String(e).split("."),n=Number(r[0])==e&&r[0].slice(-2);return t?"other":0==e?"zero":1==e?"one":2==e?"two":n>=3&&n<=10?"few":n>=11&&n<=99?"many":"other"},as:(e,t)=>t?1==e||5==e||7==e||8==e||9==e||10==e?"one":2==e||3==e?"two":4==e?"few":6==e?"many":"other":e>=0&&e<=1?"one":"other",asa:Qa,ast:Xa,az:(e,t)=>{const r=String(e).split(".")[0],n=r.slice(-1),i=r.slice(-2),o=r.slice(-3);return t?1==n||2==n||5==n||7==n||8==n||20==i||50==i||70==i||80==i?"one":3==n||4==n||100==o||200==o||300==o||400==o||500==o||600==o||700==o||800==o||900==o?"few":0==r||6==n||40==i||60==i||90==i?"many":"other":1==e?"one":"other"},bal:(e,t)=>1==e?"one":"other",be:(e,t)=>{const r=String(e).split("."),n=Number(r[0])==e,i=n&&r[0].slice(-1),o=n&&r[0].slice(-2);return t?2!=i&&3!=i||12==o||13==o?"other":"few":1==i&&11!=o?"one":i>=2&&i<=4&&(o<12||o>14)?"few":n&&0==i||i>=5&&i<=9||o>=11&&o<=14?"many":"other"},bem:ec,bez:tc,bg:rc,bho:nc,bm:ic,bn:(e,t)=>t?1==e||5==e||7==e||8==e||9==e||10==e?"one":2==e||3==e?"two":4==e?"few":6==e?"many":"other":e>=0&&e<=1?"one":"other",bo:oc,br:(e,t)=>{const r=String(e).split("."),n=Number(r[0])==e,i=n&&r[0].slice(-1),o=n&&r[0].slice(-2),s=n&&r[0].slice(-6);return t?"other":1==i&&11!=o&&71!=o&&91!=o?"one":2==i&&12!=o&&72!=o&&92!=o?"two":(3==i||4==i||9==i)&&(o<10||o>19)&&(o<70||o>79)&&(o<90||o>99)?"few":0!=e&&n&&0==s?"many":"other"},brx:sc,bs:(e,t)=>{const r=String(e).split("."),n=r[0],i=r[1]||"",o=!r[1],s=n.slice(-1),a=n.slice(-2),c=i.slice(-1),l=i.slice(-2);return t?"other":o&&1==s&&11!=a||1==c&&11!=l?"one":o&&s>=2&&s<=4&&(a<12||a>14)||c>=2&&c<=4&&(l<12||l>14)?"few":"other"},ca:(e,t)=>{const r=String(e).split("."),n=r[0],i=!r[1],o=n.slice(-6);return t?1==e||3==e?"one":2==e?"two":4==e?"few":"other":1==e&&i?"one":0!=n&&0==o&&i?"many":"other"},ce:ac,ceb:(e,t)=>{const r=String(e).split("."),n=r[0],i=r[1]||"",o=!r[1],s=n.slice(-1),a=i.slice(-1);return t?"other":o&&(1==n||2==n||3==n)||o&&4!=s&&6!=s&&9!=s||!o&&4!=a&&6!=a&&9!=a?"one":"other"},cgg:cc,chr:lc,ckb:uc,cs:(e,t)=>{const r=String(e).split("."),n=r[0],i=!r[1];return t?"other":1==e&&i?"one":n>=2&&n<=4&&i?"few":i?"other":"many"},cy:(e,t)=>t?0==e||7==e||8==e||9==e?"zero":1==e?"one":2==e?"two":3==e||4==e?"few":5==e||6==e?"many":"other":0==e?"zero":1==e?"one":2==e?"two":3==e?"few":6==e?"many":"other",da:(e,t)=>{const r=String(e).split("."),n=r[0],i=Number(r[0])==e;return t||1!=e&&(i||0!=n&&1!=n)?"other":"one"},de:hc,doi:fc,dsb:(e,t)=>{const r=String(e).split("."),n=r[0],i=r[1]||"",o=!r[1],s=n.slice(-2),a=i.slice(-2);return t?"other":o&&1==s||1==a?"one":o&&2==s||2==a?"two":o&&(3==s||4==s)||3==a||4==a?"few":"other"},dv:pc,dz:dc,ee:mc,el:gc,en:(e,t)=>{const r=String(e).split("."),n=!r[1],i=Number(r[0])==e,o=i&&r[0].slice(-1),s=i&&r[0].slice(-2);return t?1==o&&11!=s?"one":2==o&&12!=s?"two":3==o&&13!=s?"few":"other":1==e&&n?"one":"other"},eo:yc,es:(e,t)=>{const r=String(e).split("."),n=r[0],i=!r[1],o=n.slice(-6);return t?"other":1==e?"one":0!=n&&0==o&&i?"many":"other"},et:wc,eu:bc,fa:kc,ff:(e,t)=>t?"other":e>=0&&e<2?"one":"other",fi:vc,fil:(e,t)=>{const r=String(e).split("."),n=r[0],i=r[1]||"",o=!r[1],s=n.slice(-1),a=i.slice(-1);return t?1==e?"one":"other":o&&(1==n||2==n||3==n)||o&&4!=s&&6!=s&&9!=s||!o&&4!=a&&6!=a&&9!=a?"one":"other"},fo:xc,fr:(e,t)=>{const r=String(e).split("."),n=r[0],i=!r[1],o=n.slice(-6);return t?1==e?"one":"other":e>=0&&e<2?"one":0!=n&&0==o&&i?"many":"other"},fur:Sc,fy:_c,ga:(e,t)=>{const r=String(e).split("."),n=Number(r[0])==e;return t?1==e?"one":"other":1==e?"one":2==e?"two":n&&e>=3&&e<=6?"few":n&&e>=7&&e<=10?"many":"other"},gd:(e,t)=>{const r=String(e).split("."),n=Number(r[0])==e;return t?1==e||11==e?"one":2==e||12==e?"two":3==e||13==e?"few":"other":1==e||11==e?"one":2==e||12==e?"two":n&&e>=3&&e<=10||n&&e>=13&&e<=19?"few":"other"},gl:Nc,gsw:Oc,gu:(e,t)=>t?1==e?"one":2==e||3==e?"two":4==e?"few":6==e?"many":"other":e>=0&&e<=1?"one":"other",guw:Ec,gv:(e,t)=>{const r=String(e).split("."),n=r[0],i=!r[1],o=n.slice(-1),s=n.slice(-2);return t?"other":i&&1==o?"one":i&&2==o?"two":!i||0!=s&&20!=s&&40!=s&&60!=s&&80!=s?i?"other":"many":"few"},ha:jc,haw:$c,he:(e,t)=>{const r=String(e).split("."),n=r[0],i=!r[1];return t?"other":1==n&&i||0==n&&!i?"one":2==n&&i?"two":"other"},hi:(e,t)=>t?1==e?"one":2==e||3==e?"two":4==e?"few":6==e?"many":"other":e>=0&&e<=1?"one":"other",hnj:zc,hr:(e,t)=>{const r=String(e).split("."),n=r[0],i=r[1]||"",o=!r[1],s=n.slice(-1),a=n.slice(-2),c=i.slice(-1),l=i.slice(-2);return t?"other":o&&1==s&&11!=a||1==c&&11!=l?"one":o&&s>=2&&s<=4&&(a<12||a>14)||c>=2&&c<=4&&(l<12||l>14)?"few":"other"},hsb:(e,t)=>{const r=String(e).split("."),n=r[0],i=r[1]||"",o=!r[1],s=n.slice(-2),a=i.slice(-2);return t?"other":o&&1==s||1==a?"one":o&&2==s||2==a?"two":o&&(3==s||4==s)||3==a||4==a?"few":"other"},hu:(e,t)=>t?1==e||5==e?"one":"other":1==e?"one":"other",hy:(e,t)=>t?1==e?"one":"other":e>=0&&e<2?"one":"other",ia:Tc,id:Fc,ig:Dc,ii:Pc,io:Ac,is:(e,t)=>{const r=String(e).split("."),n=r[0],i=(r[1]||"").replace(/0+$/,""),o=Number(r[0])==e,s=n.slice(-1),a=n.slice(-2);return t?"other":o&&1==s&&11!=a||i%10==1&&i%100!=11?"one":"other"},it:(e,t)=>{const r=String(e).split("."),n=r[0],i=!r[1],o=n.slice(-6);return t?11==e||8==e||80==e||800==e?"many":"other":1==e&&i?"one":0!=n&&0==o&&i?"many":"other"},iu:qc,ja:Ic,jbo:Mc,jgo:Bc,jmc:Rc,jv:Wc,jw:Jc,ka:(e,t)=>{const r=String(e).split(".")[0],n=r.slice(-2);return t?1==r?"one":0==r||n>=2&&n<=20||40==n||60==n||80==n?"many":"other":1==e?"one":"other"},kab:(e,t)=>t?"other":e>=0&&e<2?"one":"other",kaj:Cc,kcg:Uc,kde:Zc,kea:Kc,kk:(e,t)=>{const r=String(e).split("."),n=Number(r[0])==e,i=n&&r[0].slice(-1);return t?6==i||9==i||n&&0==i&&0!=e?"many":"other":1==e?"one":"other"},kkj:Gc,kl:Lc,km:Hc,kn:Yc,ko:Vc,ks:Qc,ksb:Xc,ksh:(e,t)=>t?"other":0==e?"zero":1==e?"one":"other",ku:el,kw:(e,t)=>{const r=String(e).split("."),n=Number(r[0])==e,i=n&&r[0].slice(-2),o=n&&r[0].slice(-3),s=n&&r[0].slice(-5),a=n&&r[0].slice(-6);return t?n&&e>=1&&e<=4||i>=1&&i<=4||i>=21&&i<=24||i>=41&&i<=44||i>=61&&i<=64||i>=81&&i<=84?"one":5==e||5==i?"many":"other":0==e?"zero":1==e?"one":2==i||22==i||42==i||62==i||82==i||n&&0==o&&(s>=1e3&&s<=2e4||4e4==s||6e4==s||8e4==s)||0!=e&&1e5==a?"two":3==i||23==i||43==i||63==i||83==i?"few":1==e||1!=i&&21!=i&&41!=i&&61!=i&&81!=i?"other":"many"},ky:tl,lag:(e,t)=>{const r=String(e).split(".")[0];return t?"other":0==e?"zero":0!=r&&1!=r||0==e?"other":"one"},lb:rl,lg:nl,lij:(e,t)=>{const r=String(e).split("."),n=!r[1],i=Number(r[0])==e;return t?11==e||8==e||i&&e>=80&&e<=89||i&&e>=800&&e<=899?"many":"other":1==e&&n?"one":"other"},lkt:il,ln:ol,lo:(e,t)=>t&&1==e?"one":"other",lt:(e,t)=>{const r=String(e).split("."),n=r[1]||"",i=Number(r[0])==e,o=i&&r[0].slice(-1),s=i&&r[0].slice(-2);return t?"other":1==o&&(s<11||s>19)?"one":o>=2&&o<=9&&(s<11||s>19)?"few":0!=n?"many":"other"},lv:(e,t)=>{const r=String(e).split("."),n=r[1]||"",i=n.length,o=Number(r[0])==e,s=o&&r[0].slice(-1),a=o&&r[0].slice(-2),c=n.slice(-2),l=n.slice(-1);return t?"other":o&&0==s||a>=11&&a<=19||2==i&&c>=11&&c<=19?"zero":1==s&&11!=a||2==i&&1==l&&11!=c||2!=i&&1==l?"one":"other"},mas:sl,mg:al,mgo:cl,mk:(e,t)=>{const r=String(e).split("."),n=r[0],i=r[1]||"",o=!r[1],s=n.slice(-1),a=n.slice(-2),c=i.slice(-1),l=i.slice(-2);return t?1==s&&11!=a?"one":2==s&&12!=a?"two":7!=s&&8!=s||17==a||18==a?"other":"many":o&&1==s&&11!=a||1==c&&11!=l?"one":"other"},ml:ll,mn:ul,mo:(e,t)=>{const r=String(e).split("."),n=!r[1],i=Number(r[0])==e&&r[0].slice(-2);return t?1==e?"one":"other":1==e&&n?"one":!n||0==e||1!=e&&i>=1&&i<=19?"few":"other"},mr:(e,t)=>t?1==e?"one":2==e||3==e?"two":4==e?"few":"other":1==e?"one":"other",ms:(e,t)=>t&&1==e?"one":"other",mt:(e,t)=>{const r=String(e).split("."),n=Number(r[0])==e&&r[0].slice(-2);return t?"other":1==e?"one":2==e?"two":0==e||n>=3&&n<=10?"few":n>=11&&n<=19?"many":"other"},my:hl,nah:fl,naq:pl,nb:dl,nd:ml,ne:(e,t)=>{const r=String(e).split("."),n=Number(r[0])==e;return t?n&&e>=1&&e<=4?"one":"other":1==e?"one":"other"},nl:gl,nn:yl,nnh:wl,no:bl,nqo:kl,nr:vl,nso:xl,ny:Sl,nyn:_l,om:Nl,or:(e,t)=>{const r=String(e).split("."),n=Number(r[0])==e;return t?1==e||5==e||n&&e>=7&&e<=9?"one":2==e||3==e?"two":4==e?"few":6==e?"many":"other":1==e?"one":"other"},os:Ol,osa:El,pa:jl,pap:$l,pcm:zl,pl:(e,t)=>{const r=String(e).split("."),n=r[0],i=!r[1],o=n.slice(-1),s=n.slice(-2);return t?"other":1==e&&i?"one":i&&o>=2&&o<=4&&(s<12||s>14)?"few":i&&1!=n&&(0==o||1==o)||i&&o>=5&&o<=9||i&&s>=12&&s<=14?"many":"other"},prg:(e,t)=>{const r=String(e).split("."),n=r[1]||"",i=n.length,o=Number(r[0])==e,s=o&&r[0].slice(-1),a=o&&r[0].slice(-2),c=n.slice(-2),l=n.slice(-1);return t?"other":o&&0==s||a>=11&&a<=19||2==i&&c>=11&&c<=19?"zero":1==s&&11!=a||2==i&&1==l&&11!=c||2!=i&&1==l?"one":"other"},ps:Tl,pt:(e,t)=>{const r=String(e).split("."),n=r[0],i=!r[1],o=n.slice(-6);return t?"other":0==n||1==n?"one":0!=n&&0==o&&i?"many":"other"},pt_PT:(e,t)=>{const r=String(e).split("."),n=r[0],i=!r[1],o=n.slice(-6);return t?"other":1==e&&i?"one":0!=n&&0==o&&i?"many":"other"},rm:Fl,ro:(e,t)=>{const r=String(e).split("."),n=!r[1],i=Number(r[0])==e&&r[0].slice(-2);return t?1==e?"one":"other":1==e&&n?"one":!n||0==e||1!=e&&i>=1&&i<=19?"few":"other"},rof:Dl,ru:(e,t)=>{const r=String(e).split("."),n=r[0],i=!r[1],o=n.slice(-1),s=n.slice(-2);return t?"other":i&&1==o&&11!=s?"one":i&&o>=2&&o<=4&&(s<12||s>14)?"few":i&&0==o||i&&o>=5&&o<=9||i&&s>=11&&s<=14?"many":"other"},rwk:Pl,sah:Al,saq:ql,sat:Il,sc:(e,t)=>{const r=!String(e).split(".")[1];return t?11==e||8==e||80==e||800==e?"many":"other":1==e&&r?"one":"other"},scn:(e,t)=>{const r=!String(e).split(".")[1];return t?11==e||8==e||80==e||800==e?"many":"other":1==e&&r?"one":"other"},sd:Ml,sdh:Bl,se:Rl,seh:Wl,ses:Jl,sg:Cl,sh:(e,t)=>{const r=String(e).split("."),n=r[0],i=r[1]||"",o=!r[1],s=n.slice(-1),a=n.slice(-2),c=i.slice(-1),l=i.slice(-2);return t?"other":o&&1==s&&11!=a||1==c&&11!=l?"one":o&&s>=2&&s<=4&&(a<12||a>14)||c>=2&&c<=4&&(l<12||l>14)?"few":"other"},shi:(e,t)=>{const r=String(e).split("."),n=Number(r[0])==e;return t?"other":e>=0&&e<=1?"one":n&&e>=2&&e<=10?"few":"other"},si:(e,t)=>{const r=String(e).split("."),n=r[0],i=r[1]||"";return t?"other":0==e||1==e||0==n&&1==i?"one":"other"},sk:(e,t)=>{const r=String(e).split("."),n=r[0],i=!r[1];return t?"other":1==e&&i?"one":n>=2&&n<=4&&i?"few":i?"other":"many"},sl:(e,t)=>{const r=String(e).split("."),n=r[0],i=!r[1],o=n.slice(-2);return t?"other":i&&1==o?"one":i&&2==o?"two":i&&(3==o||4==o)||!i?"few":"other"},sma:Ul,smi:Zl,smj:Kl,smn:Gl,sms:Ll,sn:Hl,so:Yl,sq:(e,t)=>{const r=String(e).split("."),n=Number(r[0])==e,i=n&&r[0].slice(-1),o=n&&r[0].slice(-2);return t?1==e?"one":4==i&&14!=o?"many":"other":1==e?"one":"other"},sr:(e,t)=>{const r=String(e).split("."),n=r[0],i=r[1]||"",o=!r[1],s=n.slice(-1),a=n.slice(-2),c=i.slice(-1),l=i.slice(-2);return t?"other":o&&1==s&&11!=a||1==c&&11!=l?"one":o&&s>=2&&s<=4&&(a<12||a>14)||c>=2&&c<=4&&(l<12||l>14)?"few":"other"},ss:Vl,ssy:Ql,st:Xl,su:eu,sv:(e,t)=>{const r=String(e).split("."),n=!r[1],i=Number(r[0])==e,o=i&&r[0].slice(-1),s=i&&r[0].slice(-2);return t?1!=o&&2!=o||11==s||12==s?"other":"one":1==e&&n?"one":"other"},sw:tu,syr:ru,ta:nu,te:iu,teo:ou,th:su,ti:au,tig:cu,tk:(e,t)=>{const r=String(e).split("."),n=Number(r[0])==e&&r[0].slice(-1);return t?6==n||9==n||10==e?"few":"other":1==e?"one":"other"},tl:(e,t)=>{const r=String(e).split("."),n=r[0],i=r[1]||"",o=!r[1],s=n.slice(-1),a=i.slice(-1);return t?1==e?"one":"other":o&&(1==n||2==n||3==n)||o&&4!=s&&6!=s&&9!=s||!o&&4!=a&&6!=a&&9!=a?"one":"other"},tn:lu,to:uu,tpi:hu,tr:fu,ts:pu,tzm:(e,t)=>{const r=String(e).split("."),n=Number(r[0])==e;return t?"other":0==e||1==e||n&&e>=11&&e<=99?"one":"other"},ug:du,uk:(e,t)=>{const r=String(e).split("."),n=r[0],i=!r[1],o=Number(r[0])==e,s=o&&r[0].slice(-1),a=o&&r[0].slice(-2),c=n.slice(-1),l=n.slice(-2);return t?3==s&&13!=a?"few":"other":i&&1==c&&11!=l?"one":i&&c>=2&&c<=4&&(l<12||l>14)?"few":i&&0==c||i&&c>=5&&c<=9||i&&l>=11&&l<=14?"many":"other"},und:mu,ur:gu,uz:yu,ve:wu,vec:(e,t)=>{const r=String(e).split("."),n=r[0],i=!r[1],o=n.slice(-6);return t?11==e||8==e||80==e||800==e?"many":"other":1==e&&i?"one":0!=n&&0==o&&i?"many":"other"},vi:(e,t)=>t&&1==e?"one":"other",vo:bu,vun:ku,wa:vu,wae:xu,wo:Su,xh:_u,xog:Nu,yi:Ou,yo:Eu,yue:ju,zh:$u,zu});function Fu(e){if("string"!=typeof e||e.length<2)throw new RangeError("Invalid language tag: ".concat(e));if(e.startsWith("pt-PT"))return"pt-PT";var t=e.match(/.+?(?=[-_])/);return t?t[0]:e}function Du(e){if("function"==typeof e){var t=Fu(e.name);return{isDefault:!1,id:he(t),lc:t,locale:e.name,getPlural:e,cardinals:e.cardinals||[],ordinals:e.ordinals||[]}}var r=Fu(e),n=he(r);return function(e){return e in Tu}(n)?{isDefault:!0,id:n,lc:r,locale:e,getCardinal:$n[n],getPlural:Tu[n],cardinals:Wa[n].cardinal,ordinals:Wa[n].ordinal}:null}function Pu(e){return he(Fu(e))in Tu}var Au=function(){function r(e,t){if(this.plurals=[],this.options=Object.assign({biDiSupport:!1,currency:"USD",customFormatters:{},localeCodeFromKey:null,requireAllArguments:!1,returnType:"string",strict:t&&t.strictNumberSign||!1,strictPluralKeys:!0},t),"*"===e?this.plurals=(i=r.defaultLocale,(o=Object.keys(Tu).filter((function(e){return e!==i}))).unshift(i),o.map(Du)):Array.isArray(e)?this.plurals=e.map(Du).filter(Boolean):e&&(n=Du(e))&&(this.plurals=[n]),0===this.plurals.length){var n=Du(r.defaultLocale);this.plurals=[n]}var i,o}return r.escape=function(e,t){var r=t?/[#{}]/g:/[{}]/g;return String(e).replace(r,"'$&'")},r.supportedLocalesOf=function(e){return(Array.isArray(e)?e:[e]).filter(Pu)},r.prototype.resolvedOptions=function(){return e(e({},this.options),{locale:this.plurals[0].locale,plurals:this.plurals})},r.prototype.compile=function(e){var r,o,s=new me(this.options),a="return "+s.compile(e,this.plurals[0]),c=[],l=[];try{for(var u=t(Object.entries(s.runtime)),h=u.next();!h.done;h=u.next()){var f=n(h.value,2),p=f[0],d=f[1];c.push(p),l.push(d)}}catch(e){r={error:e}}finally{try{h&&!h.done&&(o=u.return)&&o.call(u)}finally{if(r)throw r.error}}return(new(Function.bind.apply(Function,i(i([void 0],n(c),!1),[a],!1)))).apply(void 0,i([],n(l),!1))},r.defaultLocale="en",r}();return Au}()}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var r=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e].call(r.exports,r,r.exports,__webpack_require__),r.exports}__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}();var __webpack_exports__=__webpack_require__(9);MessageFormat=__webpack_exports__;
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module MessageFormat
4
+ VERSION = "1.0.0"
5
+ end
@@ -0,0 +1,46 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "messageformat/version"
4
+ require "mini_racer"
5
+
6
+ module MessageFormat
7
+ def self.compile(...)
8
+ Compiler.new(...).compile
9
+ end
10
+
11
+ class Compiler
12
+ class CompileError < StandardError
13
+ end
14
+
15
+ attr_reader :locale, :messages, :context
16
+
17
+ def initialize(locale, messages)
18
+ @locale = locale
19
+ @messages = messages
20
+ @context = init_context
21
+ end
22
+
23
+ def compile
24
+ context.call("compileMessageFormat", locale, messages)
25
+ rescue MiniRacer::RuntimeError => e
26
+ raise CompileError.new(cause: e)
27
+ end
28
+
29
+ private
30
+
31
+ def init_context
32
+ MiniRacer::Context
33
+ .new(timeout: 10_000)
34
+ .tap do |context|
35
+ context.load(File.expand_path("../dist/messageformat.js", __dir__))
36
+ context.load(File.expand_path("../dist/compilemodule.js", __dir__))
37
+ context.eval(<<~JS)
38
+ function compileMessageFormat(locale, messages) {
39
+ const mf = new MessageFormat(locale);
40
+ return compileModule(mf, messages);
41
+ }
42
+ JS
43
+ end
44
+ end
45
+ end
46
+ end
@@ -0,0 +1,42 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "lib/messageformat/version"
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "messageformat-wrapper"
7
+ spec.version = MessageFormat::VERSION
8
+ spec.authors = ["Loïc Guitaut"]
9
+ spec.email = ["team@discourse.org"]
10
+
11
+ spec.summary =
12
+ "A wrapper around the @messageformat/core npm package to compile MessageFormat messages in Ruby"
13
+ spec.description = spec.summary
14
+ spec.homepage = "https://github.com/discourse/messageformat"
15
+ spec.license = "MIT"
16
+ spec.required_ruby_version = ">= 3.2.0"
17
+
18
+ spec.metadata["homepage_uri"] = spec.homepage
19
+ spec.metadata["source_code_uri"] = spec.homepage
20
+
21
+ # Specify which files should be added to the gem when it is released.
22
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
23
+ spec.files =
24
+ Dir.chdir(__dir__) do
25
+ `git ls-files -z`.split("\x0")
26
+ .reject do |f|
27
+ (f == __FILE__) ||
28
+ f.match(
29
+ %r{\A(?:(?:bin|test|spec|features|messageformat-miniracer)/|\.(?:git|circleci)|appveyor)},
30
+ )
31
+ end
32
+ .append(*Dir.glob("dist/*.js"))
33
+ end
34
+ spec.require_paths = ["lib"]
35
+
36
+ spec.add_dependency "mini_racer", ">= 0.6.3"
37
+
38
+ spec.add_development_dependency "rake", "~> 13.0"
39
+ spec.add_development_dependency "minitest", "~> 5.0"
40
+ spec.add_development_dependency "rubocop-discourse"
41
+ spec.add_development_dependency "syntax_tree"
42
+ end
metadata ADDED
@@ -0,0 +1,130 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: messageformat-wrapper
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Loïc Guitaut
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2024-06-19 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: mini_racer
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: 0.6.3
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: 0.6.3
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '13.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '13.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: minitest
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '5.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '5.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rubocop-discourse
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: syntax_tree
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ description: A wrapper around the @messageformat/core npm package to compile MessageFormat
84
+ messages in Ruby
85
+ email:
86
+ - team@discourse.org
87
+ executables: []
88
+ extensions: []
89
+ extra_rdoc_files: []
90
+ files:
91
+ - ".rubocop.yml"
92
+ - ".streerc"
93
+ - CHANGELOG.md
94
+ - CODE_OF_CONDUCT.md
95
+ - Gemfile
96
+ - LICENSE
97
+ - README.md
98
+ - Rakefile
99
+ - dist/compilemodule.js
100
+ - dist/messageformat.js
101
+ - lib/messageformat.rb
102
+ - lib/messageformat/version.rb
103
+ - messageformat.gemspec
104
+ homepage: https://github.com/discourse/messageformat
105
+ licenses:
106
+ - MIT
107
+ metadata:
108
+ homepage_uri: https://github.com/discourse/messageformat
109
+ source_code_uri: https://github.com/discourse/messageformat
110
+ post_install_message:
111
+ rdoc_options: []
112
+ require_paths:
113
+ - lib
114
+ required_ruby_version: !ruby/object:Gem::Requirement
115
+ requirements:
116
+ - - ">="
117
+ - !ruby/object:Gem::Version
118
+ version: 3.2.0
119
+ required_rubygems_version: !ruby/object:Gem::Requirement
120
+ requirements:
121
+ - - ">="
122
+ - !ruby/object:Gem::Version
123
+ version: '0'
124
+ requirements: []
125
+ rubygems_version: 3.5.11
126
+ signing_key:
127
+ specification_version: 4
128
+ summary: A wrapper around the @messageformat/core npm package to compile MessageFormat
129
+ messages in Ruby
130
+ test_files: []