@intlify/core 12.0.0-alpha.12 → 12.0.0-alpha.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @intlify/core v12.0.0-alpha.12
2
+ * @intlify/core v12.0.0-alpha.14
3
3
  * (c) 2016-present kazuya kawaguchi and contributors
4
4
  * @license MIT
5
5
  **/ var IntlifyCore = (function(e) {
@@ -76,61 +76,146 @@
76
76
  let a = n || ``;
77
77
  return `${i}=${a}${fe(e, t)}${a}`;
78
78
  }
79
- function me(e, t, n) {
79
+ let me = /^(?:area|base|basefont|bgsound|br|col|embed|frame|hr|image|img|input|keygen|link|meta|param|source|track|wbr|html|head|body|frameset)$/, F = /^(?:[bipsu]|big|blockquote|body|br|center|code|dd|div|dl|dt|em|embed|h[1-6]|head|hr|img|li|listing|menu|meta|nobr|ol|pre|ruby|small|span|strong|strike|sub|sup|table|tt|ul|var)$/, I = /^(?:address|article|aside|blockquote|center|details|dialog|dir|div|dl|fieldset|figcaption|figure|footer|header|hgroup|main|menu|nav|ol|p|search|section|summary|ul|h[1-6]|pre|listing|form|li|dd|dt|plaintext|table|hr|xmp)$/, L = /^(?:applet|caption|html|table|td|th|marquee|object|template|button)$/, he = /^(?:foreignobject|desc|title)$/, ge = /^(?:foreignobject|desc|mi|mo|mn|ms|mtext|annotation-xml)$/, _e = /^(?:mi|mo|mn|ms|mtext)$/, ve = /^(?:text\/html|application\/xhtml\+xml)$/i;
80
+ function ye(e) {
81
+ return e.replace(/[A-Z]+/g, (e) => e.toLowerCase());
82
+ }
83
+ function be(e, t) {
84
+ return !!e && e.namespace !== 0 && (!e.integration || _e.test(e.name) && (t === `mglyph` || t === `malignmark`)) && (e.name !== `annotation-xml` || t !== `svg`);
85
+ }
86
+ function xe(e, t) {
87
+ return F.test(e) || e === `font` && (t.has(`color`) || t.has(`face`) || t.has(`size`));
88
+ }
89
+ function Se(e, t, n) {
90
+ let r = ``;
91
+ for (let i = e.length - 1; i >= t; i--) {
92
+ let t = e[i];
93
+ t.namespace === 0 && t.name === `form` ? n[t.part] = P(n[t.part]) : r += `</${t.name}>`;
94
+ }
95
+ return e.length = t, r;
96
+ }
97
+ function Ce(e, t) {
98
+ let n = e.length;
99
+ for (; n > 0 && e[n - 1].namespace !== 0 && !e[n - 1].integration;) n--;
100
+ return Se(e, n, t);
101
+ }
102
+ function we(e, t, n, r, i) {
103
+ let a = t.length + 1, o = ``, s = e[e.length - 1];
104
+ if (be(s, n)) {
105
+ if (!xe(n, r)) return i || e.push({
106
+ name: n,
107
+ namespace: s.namespace,
108
+ integration: s.namespace === 1 ? he.test(n) : _e.test(n) || n === `annotation-xml` && ve.test((r.get(`encoding`) || ``).replace(k, ue)),
109
+ part: a
110
+ }), o;
111
+ o = Ce(e, t);
112
+ }
113
+ if (I.test(n)) for (let n = e.length - 1; n >= 0; n--) {
114
+ let r = e[n];
115
+ if (r.namespace === 0 ? L.test(r.name) : r.integration) break;
116
+ if (r.namespace === 0 && r.name === `p`) {
117
+ o += Se(e, n, t);
118
+ break;
119
+ }
120
+ }
121
+ if (!ge.test(n)) return n === `svg` || n === `math` ? i || e.push({
122
+ name: n,
123
+ namespace: n === `svg` ? 1 : 2,
124
+ integration: !1,
125
+ part: a
126
+ }) : me.test(n) || e.push({
127
+ name: n,
128
+ namespace: 0,
129
+ integration: !1,
130
+ part: a
131
+ }), o;
132
+ }
133
+ function Te(e, t, n) {
134
+ let r = ``;
135
+ (n === `p` || n === `br`) && (r = Ce(e, t));
136
+ let i = e.length - 1;
137
+ for (; i >= 0 && e[i].namespace !== 0 && e[i].name !== n;) i--;
138
+ if (!(i >= 0 && e[i].namespace !== 0)) for (; i >= 0 && (e[i].namespace !== 0 || e[i].name !== n);) i--;
139
+ return i < 0 ? n === `br` || n === `p` ? r : void 0 : (r += Se(e, i + 1, t), e.length = i, r);
140
+ }
141
+ function Ee(e, t, n) {
80
142
  A.lastIndex = t;
81
143
  let r = A.exec(e);
82
144
  if (!r) return;
83
- let [, i, a] = r, o = r[0], s;
84
- for (j.lastIndex = A.lastIndex; s = j.exec(e);) {
85
- let [r, c, l, u, d, f, p, m] = s;
86
- if (l) {
145
+ let [, i, a] = r, o = r[0], s = /* @__PURE__ */ new Map(), c;
146
+ for (j.lastIndex = A.lastIndex; c = j.exec(e);) {
147
+ let [r, l, u, d, f, p, m, h] = c;
148
+ if (u) {
87
149
  let n = j.lastIndex;
88
150
  return [
89
151
  i ? e.slice(t, n) : o + r,
90
152
  a,
91
- n
153
+ n,
154
+ !i && l.endsWith(`/`),
155
+ s
92
156
  ];
93
157
  }
94
- if (d && !p) break;
95
- i || (o += c + pe(u, d ? f : m, d, n));
158
+ if (f && !m) break;
159
+ if (!i) {
160
+ let e = f ? p : h, t = ye(d);
161
+ s.has(t) || s.set(t, e || ``), o += l + pe(d, e, f, n);
162
+ }
96
163
  }
97
164
  return [
98
165
  o,
99
166
  a,
100
- -1
167
+ -1,
168
+ !1,
169
+ s
101
170
  ];
102
171
  }
103
- function F(e, t, n) {
172
+ function De(e, t, n) {
104
173
  for (let r = e.indexOf(`</`, t); r !== -1; r = e.indexOf(`</`, r + 2)) {
105
- let t = me(e, r, {});
174
+ let t = Ee(e, r, {});
106
175
  if (t && t[1].toLowerCase() === n.toLowerCase()) return t[2] === -1 ? -1 : r;
107
176
  }
108
177
  return -1;
109
178
  }
110
- function I(e) {
111
- let t = {}, n = ``, r = 0, i;
112
- for (; (i = e.indexOf(`<`, r)) !== -1;) {
113
- n += e.slice(r, i), r = i + 1;
114
- let a = me(e, i, t);
115
- if (a) {
116
- let [o, s, c] = a;
117
- if (c === -1) {
118
- t.unclosed = !0, n += P(e.slice(i)), r = e.length;
179
+ function Oe(e) {
180
+ let t = {}, n = [], r = [], i = 0, a;
181
+ for (; (a = e.indexOf(`<`, i)) !== -1;) {
182
+ n.push(e.slice(i, a)), i = a + 1;
183
+ let o = Ee(e, a, t);
184
+ if (o) {
185
+ let [s, c, l, u, d] = o;
186
+ if (l === -1) {
187
+ t.unclosed = !0, n.push(P(e.slice(a))), i = e.length;
119
188
  break;
120
189
  }
121
- if (r = c, o[1] === `/`) n += o;
122
- else if (ce.test(s)) t.element = !0, n += P(o);
123
- else if (le.test(s)) {
124
- let i = F(e, c, s);
125
- i === -1 ? (t.unclosed = !0, n += P(o)) : (n += o + P(e.slice(c, i)), r = i);
126
- } else n += o;
127
- } else M.lastIndex = i, M.test(e) ? (n += e.slice(i, M.lastIndex), r = M.lastIndex) : (e.startsWith(`<!--`, i) && (t.unclosed = !0), n += `&lt;`);
128
- }
129
- return n += e.slice(r), n;
130
- }
131
- let L = (e) => !b(e) || g(e);
132
- function R(e, t) {
133
- if (L(e) || L(t) || t === Object.prototype) throw Error(`Invalid value`);
190
+ if (i = l, s[1] === `/`) {
191
+ let e = Te(r, n, ye(c));
192
+ e === void 0 ? t.closed = !0 : (e && (t.closed = !0), n.push(e + s));
193
+ } else if (ce.test(c)) t.element = !0, n.push(P(s));
194
+ else {
195
+ let a = ``;
196
+ if (le.test(c)) {
197
+ let r = De(e, l, c);
198
+ if (r === -1) {
199
+ t.unclosed = !0, n.push(P(s));
200
+ continue;
201
+ }
202
+ a = P(e.slice(l, r)), i = r;
203
+ }
204
+ let o = we(r, n, ye(c), d, u);
205
+ o === void 0 ? (t.closed = !0, n.push(P(s) + a)) : n.push(o, s + a);
206
+ }
207
+ } else M.lastIndex = a, M.test(e) ? (n.push(e.slice(a, M.lastIndex)), i = M.lastIndex) : (e.startsWith(`<!--`, a) && (t.unclosed = !0), n.push(`&lt;`));
208
+ }
209
+ n.push(e.slice(i));
210
+ for (let e = r.length - 1; e >= 0; e--) {
211
+ let i = r[e];
212
+ t.closed = !0, i.namespace === 0 && i.name === `form` ? n[i.part] = P(n[i.part]) : n.push(`</${i.name}>`);
213
+ }
214
+ return n.join(``);
215
+ }
216
+ let ke = (e) => !b(e) || g(e);
217
+ function Ae(e, t) {
218
+ if (ke(e) || ke(t) || t === Object.prototype) throw Error(`Invalid value`);
134
219
  let n = [e, t];
135
220
  for (; n.length;) {
136
221
  let e = n.pop(), t = n.pop(), r = Object.keys(t);
@@ -152,21 +237,21 @@
152
237
  }
153
238
  }
154
239
  }
155
- function he(e, t, n) {
240
+ function je(e, t, n) {
156
241
  return {
157
242
  line: e,
158
243
  column: t,
159
244
  offset: n
160
245
  };
161
246
  }
162
- function ge(e, t, n) {
247
+ function Me(e, t, n) {
163
248
  let r = {
164
249
  start: e,
165
250
  end: t
166
251
  };
167
252
  return n != null && (r.source = n), r;
168
253
  }
169
- let z = {
254
+ let R = {
170
255
  EXPECTED_TOKEN: 1,
171
256
  INVALID_TOKEN_IN_PLACEHOLDER: 2,
172
257
  UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER: 3,
@@ -184,30 +269,30 @@
184
269
  UNHANDLED_CODEGEN_NODE_TYPE: 15,
185
270
  UNHANDLED_MINIFIER_NODE_TYPE: 16
186
271
  };
187
- z.EXPECTED_TOKEN, z.INVALID_TOKEN_IN_PLACEHOLDER, z.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER, z.UNKNOWN_ESCAPE_SEQUENCE, z.INVALID_UNICODE_ESCAPE_SEQUENCE, z.UNBALANCED_CLOSING_BRACE, z.UNTERMINATED_CLOSING_BRACE, z.EMPTY_PLACEHOLDER, z.NOT_ALLOW_NEST_PLACEHOLDER, z.INVALID_LINKED_FORMAT, z.MUST_HAVE_MESSAGES_IN_PLURAL, z.UNEXPECTED_EMPTY_LINKED_MODIFIER, z.UNEXPECTED_EMPTY_LINKED_KEY, z.UNEXPECTED_LEXICAL_ANALYSIS, z.UNHANDLED_CODEGEN_NODE_TYPE, z.UNHANDLED_MINIFIER_NODE_TYPE;
188
- function B(e, t, n = {}) {
272
+ R.EXPECTED_TOKEN, R.INVALID_TOKEN_IN_PLACEHOLDER, R.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER, R.UNKNOWN_ESCAPE_SEQUENCE, R.INVALID_UNICODE_ESCAPE_SEQUENCE, R.UNBALANCED_CLOSING_BRACE, R.UNTERMINATED_CLOSING_BRACE, R.EMPTY_PLACEHOLDER, R.NOT_ALLOW_NEST_PLACEHOLDER, R.INVALID_LINKED_FORMAT, R.MUST_HAVE_MESSAGES_IN_PLURAL, R.UNEXPECTED_EMPTY_LINKED_MODIFIER, R.UNEXPECTED_EMPTY_LINKED_KEY, R.UNEXPECTED_LEXICAL_ANALYSIS, R.UNHANDLED_CODEGEN_NODE_TYPE, R.UNHANDLED_MINIFIER_NODE_TYPE;
273
+ function z(e, t, n = {}) {
189
274
  let { domain: r, messages: i, args: a } = n, o = SyntaxError(String(e));
190
275
  return o.code = e, t && (o.location = t), o.domain = r, o;
191
276
  }
192
- function _e(e) {
277
+ function Ne(e) {
193
278
  throw e;
194
279
  }
195
- function V(e) {
280
+ function B(e) {
196
281
  switch (e.t = e.type, e.type) {
197
282
  case 0: {
198
283
  let t = e;
199
- V(t.body), t.b = t.body, delete t.body;
284
+ B(t.body), t.b = t.body, delete t.body;
200
285
  break;
201
286
  }
202
287
  case 1: {
203
288
  let t = e, n = t.cases;
204
- for (let e = 0; e < n.length; e++) V(n[e]);
289
+ for (let e = 0; e < n.length; e++) B(n[e]);
205
290
  t.c = n, delete t.cases;
206
291
  break;
207
292
  }
208
293
  case 2: {
209
294
  let t = e, n = t.items;
210
- for (let e = 0; e < n.length; e++) V(n[e]);
295
+ for (let e = 0; e < n.length; e++) B(n[e]);
211
296
  t.i = n, delete t.items, t.static && (t.s = t.static, delete t.static);
212
297
  break;
213
298
  }
@@ -221,7 +306,7 @@
221
306
  }
222
307
  case 6: {
223
308
  let t = e;
224
- V(t.key), t.k = t.key, delete t.key, t.modifier && (V(t.modifier), t.m = t.modifier, delete t.modifier);
309
+ B(t.key), t.k = t.key, delete t.key, t.modifier && (B(t.modifier), t.m = t.modifier, delete t.modifier);
225
310
  break;
226
311
  }
227
312
  case 5: {
@@ -237,11 +322,11 @@
237
322
  }
238
323
  delete e.type;
239
324
  }
240
- function ve(e) {
325
+ function Pe(e) {
241
326
  let t = e.body;
242
- return t.type === 2 ? ye(t) : t.cases.forEach((e) => ye(e)), e;
327
+ return t.type === 2 ? Fe(t) : t.cases.forEach((e) => Fe(e)), e;
243
328
  }
244
- function ye(e) {
329
+ function Fe(e) {
245
330
  if (e.items.length === 1) {
246
331
  let t = e.items[0];
247
332
  (t.type === 3 || t.type === 9) && (e.static = t.value, delete t.value);
@@ -261,7 +346,7 @@
261
346
  }
262
347
  }
263
348
  }
264
- function be(e) {
349
+ function Ie(e) {
265
350
  let t = e, n = 0, r = 1, i = 1, a = 0, o = (e) => t[e] === `\r` && t[e + 1] === `
266
351
  `, s = (e) => t[e] === `
267
352
  `, c = (e) => t[e] === `\u2029`, l = (e) => t[e] === `\u2028`, u = (e) => o(e) || s(e) || c(e) || l(e), d = () => n, f = () => r, p = () => i, m = () => a, h = (e) => o(e) || c(e) || l(e) ? `
@@ -298,8 +383,8 @@
298
383
  skipToPeek: S
299
384
  };
300
385
  }
301
- function xe(e, t = {}) {
302
- let n = t.location !== !1, r = be(e), i = () => r.index(), a = () => he(r.line(), r.column(), r.index()), o = a(), s = i(), c = {
386
+ function Le(e, t = {}) {
387
+ let n = t.location !== !1, r = Ie(e), i = () => r.index(), a = () => je(r.line(), r.column(), r.index()), o = a(), s = i(), c = {
303
388
  currentType: 13,
304
389
  offset: s,
305
390
  startLoc: o,
@@ -315,7 +400,7 @@
315
400
  function d(e, t, r, ...i) {
316
401
  let a = l();
317
402
  if (t.column += r, t.offset += r, u) {
318
- let r = B(e, n ? ge(a.startLoc, t) : null, {
403
+ let r = z(e, n ? Me(a.startLoc, t) : null, {
319
404
  domain: `tokenizer`,
320
405
  args: i
321
406
  });
@@ -325,11 +410,11 @@
325
410
  function f(e, t, r) {
326
411
  e.endLoc = a(), e.currentType = t;
327
412
  let i = { type: t };
328
- return n && (i.loc = ge(e.startLoc, e.endLoc)), r != null && (i.value = r), i;
413
+ return n && (i.loc = Me(e.startLoc, e.endLoc)), r != null && (i.value = r), i;
329
414
  }
330
415
  let p = (e) => f(e, 13);
331
416
  function m(e, t) {
332
- return e.currentChar() === t ? (e.next(), t) : (d(z.EXPECTED_TOKEN, a(), 0, t), ``);
417
+ return e.currentChar() === t ? (e.next(), t) : (d(R.EXPECTED_TOKEN, a(), 0, t), ``);
333
418
  }
334
419
  function h(e) {
335
420
  let t = ``;
@@ -480,14 +565,14 @@
480
565
  if (r && r !== `}` && r !== void 0 && r !== ` ` && r !== `
481
566
  ` && r !== ` `) {
482
567
  let t = fe(e);
483
- return d(z.INVALID_TOKEN_IN_PLACEHOLDER, a(), 0, n + t), n + t;
568
+ return d(R.INVALID_TOKEN_IN_PLACEHOLDER, a(), 0, n + t), n + t;
484
569
  }
485
- return e.currentChar() === void 0 && d(z.UNTERMINATED_CLOSING_BRACE, a(), 0), n;
570
+ return e.currentChar() === void 0 && d(R.UNTERMINATED_CLOSING_BRACE, a(), 0), n;
486
571
  }
487
572
  function A(e) {
488
573
  g(e);
489
574
  let t = ``;
490
- return e.currentChar() === `-` ? (e.next(), t += `-${se(e)}`) : t += se(e), e.currentChar() === void 0 && d(z.UNTERMINATED_CLOSING_BRACE, a(), 0), t;
575
+ return e.currentChar() === `-` ? (e.next(), t += `-${se(e)}`) : t += se(e), e.currentChar() === void 0 && d(R.UNTERMINATED_CLOSING_BRACE, a(), 0), t;
491
576
  }
492
577
  function j(e) {
493
578
  return e !== `'` && e !== `
@@ -499,7 +584,7 @@
499
584
  for (; t = O(e, j);) n += t === `\\` ? ue(e) : t;
500
585
  let r = e.currentChar();
501
586
  return r === `
502
- ` || r === void 0 ? (d(z.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER, a(), 0), r === `
587
+ ` || r === void 0 ? (d(R.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER, a(), 0), r === `
503
588
  ` && (e.next(), m(e, `'`)), n) : (m(e, `'`), n);
504
589
  }
505
590
  function ue(e) {
@@ -509,7 +594,7 @@
509
594
  case `'`: return e.next(), `\\${t}`;
510
595
  case `u`: return N(e, t, 4);
511
596
  case `U`: return N(e, t, 6);
512
- default: return d(z.UNKNOWN_ESCAPE_SEQUENCE, a(), 0, t), ``;
597
+ default: return d(R.UNKNOWN_ESCAPE_SEQUENCE, a(), 0, t), ``;
513
598
  }
514
599
  }
515
600
  function N(e, t, n) {
@@ -518,7 +603,7 @@
518
603
  for (let i = 0; i < n; i++) {
519
604
  let n = oe(e);
520
605
  if (!n) {
521
- d(z.INVALID_UNICODE_ESCAPE_SEQUENCE, a(), 0, `\\${t}${r}${e.currentChar()}`);
606
+ d(R.INVALID_UNICODE_ESCAPE_SEQUENCE, a(), 0, `\\${t}${r}${e.currentChar()}`);
522
607
  break;
523
608
  }
524
609
  r += n;
@@ -558,17 +643,17 @@
558
643
  function I(e, t) {
559
644
  let n = null;
560
645
  switch (e.currentChar()) {
561
- case `{`: return t.braceNest >= 1 && d(z.NOT_ALLOW_NEST_PLACEHOLDER, a(), 0), e.next(), n = f(t, 2, `{`), g(e), t.braceNest++, n;
562
- case `}`: return t.braceNest > 0 && t.currentType === 2 && d(z.EMPTY_PLACEHOLDER, a(), 0), e.next(), n = f(t, 3, `}`), t.braceNest--, t.braceNest > 0 && g(e), t.inLinked && t.braceNest === 0 && (t.inLinked = !1), n;
563
- case `@`: return t.braceNest > 0 && d(z.UNTERMINATED_CLOSING_BRACE, a(), 0), n = L(e, t) || p(t), t.braceNest = 0, n;
646
+ case `{`: return t.braceNest >= 1 && d(R.NOT_ALLOW_NEST_PLACEHOLDER, a(), 0), e.next(), n = f(t, 2, `{`), g(e), t.braceNest++, n;
647
+ case `}`: return t.braceNest > 0 && t.currentType === 2 && d(R.EMPTY_PLACEHOLDER, a(), 0), e.next(), n = f(t, 3, `}`), t.braceNest--, t.braceNest > 0 && g(e), t.inLinked && t.braceNest === 0 && (t.inLinked = !1), n;
648
+ case `@`: return t.braceNest > 0 && d(R.UNTERMINATED_CLOSING_BRACE, a(), 0), n = L(e, t) || p(t), t.braceNest = 0, n;
564
649
  default: {
565
650
  let r = !0, i = !0, o = !0;
566
- if (E(e)) return t.braceNest > 0 && d(z.UNTERMINATED_CLOSING_BRACE, a(), 0), n = f(t, 1, F(e)), t.braceNest = 0, t.inLinked = !1, n;
567
- if (t.braceNest > 0 && (t.currentType === 4 || t.currentType === 5 || t.currentType === 6)) return d(z.UNTERMINATED_CLOSING_BRACE, a(), 0), t.braceNest = 0, R(e, t);
651
+ if (E(e)) return t.braceNest > 0 && d(R.UNTERMINATED_CLOSING_BRACE, a(), 0), n = f(t, 1, F(e)), t.braceNest = 0, t.inLinked = !1, n;
652
+ if (t.braceNest > 0 && (t.currentType === 4 || t.currentType === 5 || t.currentType === 6)) return d(R.UNTERMINATED_CLOSING_BRACE, a(), 0), t.braceNest = 0, he(e, t);
568
653
  if (r = y(e, t)) return n = f(t, 4, le(e)), g(e), n;
569
654
  if (i = b(e, t)) return n = f(t, 5, A(e)), g(e), n;
570
655
  if (o = x(e, t)) return n = f(t, 6, M(e)), g(e), n;
571
- if (!r && !i && !o) return n = f(t, 12, fe(e)), d(z.INVALID_TOKEN_IN_PLACEHOLDER, a(), 0, n.value), g(e), n;
656
+ if (!r && !i && !o) return n = f(t, 12, fe(e)), d(R.INVALID_TOKEN_IN_PLACEHOLDER, a(), 0, n.value), g(e), n;
572
657
  break;
573
658
  }
574
659
  }
@@ -577,20 +662,20 @@
577
662
  function L(e, t) {
578
663
  let { currentType: n } = t, r = null, i = e.currentChar();
579
664
  switch (n !== 7 && n !== 8 && n !== 11 && n !== 9 || i !== `
580
- ` && i !== ` ` || d(z.INVALID_LINKED_FORMAT, a(), 0), i) {
665
+ ` && i !== ` ` || d(R.INVALID_LINKED_FORMAT, a(), 0), i) {
581
666
  case `@`: return e.next(), r = f(t, 7, `@`), t.inLinked = !0, r;
582
667
  case `.`: return g(e), e.next(), f(t, 8, `.`);
583
668
  case `:`: return g(e), e.next(), f(t, 9, `:`);
584
- default: return E(e) ? (r = f(t, 1, F(e)), t.braceNest = 0, t.inLinked = !1, r) : S(e, t) || w(e, t) ? (g(e), L(e, t)) : C(e, t) ? (g(e), f(t, 11, P(e))) : T(e, t) ? (g(e), i === `{` ? I(e, t) || r : f(t, 10, me(e))) : (n === 7 && d(z.INVALID_LINKED_FORMAT, a(), 0), t.braceNest = 0, t.inLinked = !1, R(e, t));
669
+ default: return E(e) ? (r = f(t, 1, F(e)), t.braceNest = 0, t.inLinked = !1, r) : S(e, t) || w(e, t) ? (g(e), L(e, t)) : C(e, t) ? (g(e), f(t, 11, P(e))) : T(e, t) ? (g(e), i === `{` ? I(e, t) || r : f(t, 10, me(e))) : (n === 7 && d(R.INVALID_LINKED_FORMAT, a(), 0), t.braceNest = 0, t.inLinked = !1, he(e, t));
585
670
  }
586
671
  }
587
- function R(e, t) {
672
+ function he(e, t) {
588
673
  let n = { type: 13 };
589
674
  if (t.braceNest > 0) return I(e, t) || p(t);
590
675
  if (t.inLinked) return L(e, t) || p(t);
591
676
  switch (e.currentChar()) {
592
677
  case `{`: return I(e, t) || p(t);
593
- case `}`: return d(z.UNBALANCED_CLOSING_BRACE, a(), 0), e.next(), f(t, 3, `}`);
678
+ case `}`: return d(R.UNBALANCED_CLOSING_BRACE, a(), 0), e.next(), f(t, 3, `}`);
594
679
  case `@`: return L(e, t) || p(t);
595
680
  default:
596
681
  if (E(e)) return n = f(t, 1, F(e)), t.braceNest = 0, t.inLinked = !1, n;
@@ -598,22 +683,22 @@
598
683
  }
599
684
  return n;
600
685
  }
601
- function _e() {
686
+ function ge() {
602
687
  let { currentType: e, offset: t, startLoc: n, endLoc: o } = c;
603
- return c.lastType = e, c.lastOffset = t, c.lastStartLoc = n, c.lastEndLoc = o, c.offset = i(), c.startLoc = a(), r.currentChar() === void 0 ? f(c, 13) : R(r, c);
688
+ return c.lastType = e, c.lastOffset = t, c.lastStartLoc = n, c.lastEndLoc = o, c.offset = i(), c.startLoc = a(), r.currentChar() === void 0 ? f(c, 13) : he(r, c);
604
689
  }
605
690
  return {
606
- nextToken: _e,
691
+ nextToken: ge,
607
692
  currentOffset: i,
608
693
  currentPosition: a,
609
694
  context: l
610
695
  };
611
696
  }
612
- let Se = /\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6})/g, Ce = /\\([\\@{}|])/g;
613
- function we(e, t) {
697
+ let Re = /\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6})/g, ze = /\\([\\@{}|])/g;
698
+ function Be(e, t) {
614
699
  return t;
615
700
  }
616
- function Te(e, t, n) {
701
+ function Ve(e, t, n) {
617
702
  switch (e) {
618
703
  case `\\\\`: return `\\`;
619
704
  case `\\'`: return `'`;
@@ -623,12 +708,12 @@
623
708
  }
624
709
  }
625
710
  }
626
- function Ee(e = {}) {
711
+ function He(e = {}) {
627
712
  let t = e.location !== !1, { onError: n } = e;
628
713
  function r(e, r, i, a, ...o) {
629
714
  let s = e.currentPosition();
630
715
  if (s.offset += a, s.column += a, n) {
631
- let e = B(r, t ? ge(i, s) : null, {
716
+ let e = z(r, t ? Me(i, s) : null, {
632
717
  domain: `parser`,
633
718
  args: o
634
719
  });
@@ -647,7 +732,7 @@
647
732
  }
648
733
  function o(e, t) {
649
734
  let n = e.context(), r = i(3, n.offset, n.startLoc);
650
- return r.value = t.replace(Ce, we), a(r, e.currentOffset(), e.currentPosition()), r;
735
+ return r.value = t.replace(ze, Be), a(r, e.currentOffset(), e.currentPosition()), r;
651
736
  }
652
737
  function s(e, t) {
653
738
  let { lastOffset: n, lastStartLoc: r } = e.context(), o = i(5, n, r);
@@ -659,11 +744,11 @@
659
744
  }
660
745
  function u(e, t) {
661
746
  let { lastOffset: n, lastStartLoc: r } = e.context(), o = i(9, n, r);
662
- return o.value = t.replace(Se, Te), e.nextToken(), a(o, e.currentOffset(), e.currentPosition()), o;
747
+ return o.value = t.replace(Re, Ve), e.nextToken(), a(o, e.currentOffset(), e.currentPosition()), o;
663
748
  }
664
749
  function d(e) {
665
750
  let t = e.nextToken(), n = e.context(), { lastOffset: o, lastStartLoc: s } = n, c = i(8, o, s);
666
- return t.type === 11 ? (t.value == null && r(e, z.UNEXPECTED_LEXICAL_ANALYSIS, n.lastStartLoc, 0, H(t)), c.value = t.value || ``, a(c, e.currentOffset(), e.currentPosition()), { node: c }) : (r(e, z.UNEXPECTED_EMPTY_LINKED_MODIFIER, n.lastStartLoc, 0), c.value = ``, a(c, o, s), {
751
+ return t.type === 11 ? (t.value == null && r(e, R.UNEXPECTED_LEXICAL_ANALYSIS, n.lastStartLoc, 0, V(t)), c.value = t.value || ``, a(c, e.currentOffset(), e.currentPosition()), { node: c }) : (r(e, R.UNEXPECTED_EMPTY_LINKED_MODIFIER, n.lastStartLoc, 0), c.value = ``, a(c, o, s), {
667
752
  nextConsumeToken: t,
668
753
  node: c
669
754
  });
@@ -678,21 +763,21 @@
678
763
  let t = d(e);
679
764
  n.modifier = t.node, o = t.nextConsumeToken || e.nextToken();
680
765
  }
681
- switch (o.type !== 9 && r(e, z.UNEXPECTED_LEXICAL_ANALYSIS, t.lastStartLoc, 0, H(o)), o = e.nextToken(), o.type === 2 && (o = e.nextToken()), o.type) {
766
+ switch (o.type !== 9 && r(e, R.UNEXPECTED_LEXICAL_ANALYSIS, t.lastStartLoc, 0, V(o)), o = e.nextToken(), o.type === 2 && (o = e.nextToken()), o.type) {
682
767
  case 10:
683
- o.value == null && r(e, z.UNEXPECTED_LEXICAL_ANALYSIS, t.lastStartLoc, 0, H(o)), n.key = f(e, o.value || ``);
768
+ o.value == null && r(e, R.UNEXPECTED_LEXICAL_ANALYSIS, t.lastStartLoc, 0, V(o)), n.key = f(e, o.value || ``);
684
769
  break;
685
770
  case 4:
686
- o.value == null && r(e, z.UNEXPECTED_LEXICAL_ANALYSIS, t.lastStartLoc, 0, H(o)), n.key = c(e, o.value || ``);
771
+ o.value == null && r(e, R.UNEXPECTED_LEXICAL_ANALYSIS, t.lastStartLoc, 0, V(o)), n.key = c(e, o.value || ``);
687
772
  break;
688
773
  case 5:
689
- o.value == null && r(e, z.UNEXPECTED_LEXICAL_ANALYSIS, t.lastStartLoc, 0, H(o)), n.key = s(e, o.value || ``);
774
+ o.value == null && r(e, R.UNEXPECTED_LEXICAL_ANALYSIS, t.lastStartLoc, 0, V(o)), n.key = s(e, o.value || ``);
690
775
  break;
691
776
  case 6:
692
- o.value == null && r(e, z.UNEXPECTED_LEXICAL_ANALYSIS, t.lastStartLoc, 0, H(o)), n.key = u(e, o.value || ``);
777
+ o.value == null && r(e, R.UNEXPECTED_LEXICAL_ANALYSIS, t.lastStartLoc, 0, V(o)), n.key = u(e, o.value || ``);
693
778
  break;
694
779
  default: {
695
- r(e, z.UNEXPECTED_EMPTY_LINKED_KEY, t.lastStartLoc, 0);
780
+ r(e, R.UNEXPECTED_EMPTY_LINKED_KEY, t.lastStartLoc, 0);
696
781
  let s = e.context(), c = i(7, s.offset, s.startLoc);
697
782
  return c.value = ``, a(c, s.offset, s.startLoc), n.key = c, a(n, s.offset, s.startLoc), {
698
783
  nextConsumeToken: o,
@@ -710,16 +795,16 @@
710
795
  let i = l || e.nextToken();
711
796
  switch (l = null, i.type) {
712
797
  case 0:
713
- i.value == null && r(e, z.UNEXPECTED_LEXICAL_ANALYSIS, t.lastStartLoc, 0, H(i)), n.items.push(o(e, i.value || ``));
798
+ i.value == null && r(e, R.UNEXPECTED_LEXICAL_ANALYSIS, t.lastStartLoc, 0, V(i)), n.items.push(o(e, i.value || ``));
714
799
  break;
715
800
  case 5:
716
- i.value == null && r(e, z.UNEXPECTED_LEXICAL_ANALYSIS, t.lastStartLoc, 0, H(i)), n.items.push(s(e, i.value || ``));
801
+ i.value == null && r(e, R.UNEXPECTED_LEXICAL_ANALYSIS, t.lastStartLoc, 0, V(i)), n.items.push(s(e, i.value || ``));
717
802
  break;
718
803
  case 4:
719
- i.value == null && r(e, z.UNEXPECTED_LEXICAL_ANALYSIS, t.lastStartLoc, 0, H(i)), n.items.push(c(e, i.value || ``));
804
+ i.value == null && r(e, R.UNEXPECTED_LEXICAL_ANALYSIS, t.lastStartLoc, 0, V(i)), n.items.push(c(e, i.value || ``));
720
805
  break;
721
806
  case 6:
722
- i.value == null && r(e, z.UNEXPECTED_LEXICAL_ANALYSIS, t.lastStartLoc, 0, H(i)), n.items.push(u(e, i.value || ``));
807
+ i.value == null && r(e, R.UNEXPECTED_LEXICAL_ANALYSIS, t.lastStartLoc, 0, V(i)), n.items.push(u(e, i.value || ``));
723
808
  break;
724
809
  case 7: {
725
810
  let t = p(e);
@@ -737,164 +822,142 @@
737
822
  let t = m(e);
738
823
  c || (c = t.items.length === 0), l.cases.push(t);
739
824
  } while (s.currentType !== 13);
740
- return c && r(e, z.MUST_HAVE_MESSAGES_IN_PLURAL, n, 0), a(l, e.currentOffset(), e.currentPosition()), l;
825
+ return c && r(e, R.MUST_HAVE_MESSAGES_IN_PLURAL, n, 0), a(l, e.currentOffset(), e.currentPosition()), l;
741
826
  }
742
827
  function g(e) {
743
828
  let t = e.context(), { offset: n, startLoc: r } = t, i = m(e);
744
829
  return t.currentType === 13 ? i : h(e, n, r, i);
745
830
  }
746
831
  function _(n) {
747
- let o = xe(n, l({}, e)), s = o.context(), c = i(0, s.offset, s.startLoc);
748
- return t && c.loc && (c.loc.source = n), c.body = g(o), e.onCacheKey && (c.cacheKey = e.onCacheKey(n)), s.currentType !== 13 && r(o, z.UNEXPECTED_LEXICAL_ANALYSIS, s.lastStartLoc, 0, n[s.offset] || ``), a(c, o.currentOffset(), o.currentPosition()), c;
832
+ let o = Le(n, l({}, e)), s = o.context(), c = i(0, s.offset, s.startLoc);
833
+ return t && c.loc && (c.loc.source = n), c.body = g(o), e.onCacheKey && (c.cacheKey = e.onCacheKey(n)), s.currentType !== 13 && r(o, R.UNEXPECTED_LEXICAL_ANALYSIS, s.lastStartLoc, 0, n[s.offset] || ``), a(c, o.currentOffset(), o.currentPosition()), c;
749
834
  }
750
835
  return { parse: _ };
751
836
  }
752
- function H(e) {
837
+ function V(e) {
753
838
  if (e.type === 13) return `EOF`;
754
839
  let t = (e.value || ``).replace(/\r?\n/gu, `\\n`);
755
840
  return t.length > 10 ? t.slice(0, 9) + `…` : t;
756
841
  }
757
- function U(e) {
758
- return b(e) && Ie(e) === 0 && (p(e, `b`) || p(e, `body`));
842
+ function H(e) {
843
+ return b(e) && Qe(e) === 0 && (p(e, `b`) || p(e, `body`));
759
844
  }
760
- let De = [`b`, `body`];
761
- function Oe(e) {
762
- return G(e, De);
845
+ let Ue = [`b`, `body`];
846
+ function We(e) {
847
+ return U(e, Ue);
763
848
  }
764
- let ke = [`c`, `cases`];
765
- function Ae(e) {
766
- return G(e, ke, []);
849
+ let Ge = [`c`, `cases`];
850
+ function Ke(e) {
851
+ return U(e, Ge, []);
767
852
  }
768
- let je = [`s`, `static`];
769
- function Me(e) {
770
- return G(e, je);
853
+ let qe = [`s`, `static`];
854
+ function Je(e) {
855
+ return U(e, qe);
771
856
  }
772
- let Ne = [`i`, `items`];
773
- function Pe(e) {
774
- return G(e, Ne, []);
857
+ let Ye = [`i`, `items`];
858
+ function Xe(e) {
859
+ return U(e, Ye, []);
775
860
  }
776
- let Fe = [`t`, `type`];
777
- function Ie(e) {
778
- return G(e, Fe);
861
+ let Ze = [`t`, `type`];
862
+ function Qe(e) {
863
+ return U(e, Ze);
779
864
  }
780
- let Le = [`v`, `value`];
781
- function W(e, t) {
782
- let n = G(e, Le);
865
+ let $e = [`v`, `value`];
866
+ function et(e, t) {
867
+ let n = U(e, $e);
783
868
  if (n != null) return n;
784
- throw K(t);
869
+ throw W(t);
785
870
  }
786
- let Re = [`m`, `modifier`];
787
- function ze(e) {
788
- return G(e, Re);
871
+ let tt = [`m`, `modifier`];
872
+ function nt(e) {
873
+ return U(e, tt);
789
874
  }
790
- let Be = [`k`, `key`];
791
- function Ve(e) {
792
- let t = G(e, Be);
875
+ let rt = [`k`, `key`];
876
+ function it(e) {
877
+ let t = U(e, rt);
793
878
  if (t) return t;
794
- throw K(6);
879
+ throw W(6);
795
880
  }
796
- function G(e, t, n) {
881
+ function U(e, t, n) {
797
882
  for (let n = 0; n < t.length; n++) {
798
883
  let r = t[n];
799
884
  if (p(e, r) && e[r] != null) return e[r];
800
885
  }
801
886
  return n;
802
887
  }
803
- let He = [
804
- ...De,
805
- ...ke,
806
- ...je,
807
- ...Ne,
808
- ...Be,
809
- ...Re,
810
- ...Le,
811
- ...Fe
888
+ let at = [
889
+ ...Ue,
890
+ ...Ge,
891
+ ...qe,
892
+ ...Ye,
893
+ ...rt,
894
+ ...tt,
895
+ ...$e,
896
+ ...Ze
812
897
  ];
813
- function K(e) {
898
+ function W(e) {
814
899
  return Error(`unhandled node type: ${e}`);
815
900
  }
816
- function Ue(e) {
817
- return (t) => We(t, e);
901
+ function ot(e) {
902
+ return (t) => st(t, e);
818
903
  }
819
- function We(e, t) {
820
- let n = Oe(t);
821
- if (n == null) throw K(0);
822
- if (Ie(n) === 1) {
823
- let t = Ae(n);
824
- return e.plural(t.reduce((t, n) => [...g(t) ? t : [t], Ge(e, n)], []));
904
+ function st(e, t) {
905
+ let n = We(t);
906
+ if (n == null) throw W(0);
907
+ if (Qe(n) === 1) {
908
+ let t = Ke(n);
909
+ return e.plural(t.reduce((t, n) => [...g(t) ? t : [t], ct(e, n)], []));
825
910
  }
826
- return Ge(e, n);
911
+ return ct(e, n);
827
912
  }
828
- function Ge(e, t) {
829
- let n = Me(t);
913
+ function ct(e, t) {
914
+ let n = Je(t);
830
915
  if (n != null) return e.type === `text` ? n : e.normalize([n]);
831
916
  {
832
- let n = Pe(t).reduce((t, n) => [...t, Ke(e, n)], []);
917
+ let n = Xe(t).reduce((t, n) => [...t, lt(e, n)], []);
833
918
  return e.normalize(n);
834
919
  }
835
920
  }
836
- function Ke(e, t) {
837
- let n = Ie(t);
921
+ function lt(e, t) {
922
+ let n = Qe(t);
838
923
  switch (n) {
839
- case 3: return W(t, n);
840
- case 9: return W(t, n);
924
+ case 3:
925
+ case 9: return et(t, n);
841
926
  case 4: {
842
927
  let r = t;
843
928
  if (p(r, `k`) && r.k) return e.interpolate(e.named(r.k));
844
929
  if (p(r, `key`) && r.key) return e.interpolate(e.named(r.key));
845
- throw K(n);
930
+ throw W(n);
846
931
  }
847
932
  case 5: {
848
933
  let r = t;
849
934
  if (p(r, `i`) && a(r.i)) return e.interpolate(e.list(r.i));
850
935
  if (p(r, `index`) && a(r.index)) return e.interpolate(e.list(r.index));
851
- throw K(n);
936
+ throw W(n);
852
937
  }
853
938
  case 6: {
854
- let n = t, r = ze(n), i = Ve(n);
855
- return e.linked(Ke(e, i), r ? Ke(e, r) : void 0, e.type);
939
+ let n = t, r = nt(n), i = it(n);
940
+ return e.linked(lt(e, i), r ? lt(e, r) : void 0, e.type);
856
941
  }
857
- case 7: return W(t, n);
858
- case 8: return W(t, n);
942
+ case 7:
943
+ case 8: return et(t, n);
859
944
  default: throw Error(`unhandled node on format message part: ${n}`);
860
945
  }
861
946
  }
862
- let qe = (e) => e, q = d();
863
- function Je() {
864
- q = d();
865
- }
866
- function Ye(e, t = {}) {
867
- let n = !1, r = t.onError || _e;
947
+ let ut = (e) => e, G = d();
948
+ function dt(e, t = {}) {
949
+ let n = !1, r = t.onError || Ne;
868
950
  t.onError = (e) => {
869
951
  n = !0, r(e);
870
952
  };
871
- let i = Ee(t).parse(e);
872
- return t.optimize && ve(i), t.mangle && V(i), {
953
+ let i = He(t).parse(e);
954
+ return t.optimize && Pe(i), t.mangle && B(i), {
873
955
  ast: i,
874
956
  detectError: n,
875
957
  code: ``
876
958
  };
877
959
  }
878
- function Xe(e, t) {
879
- if (v(e)) {
880
- y(t.warnHtmlMessage) && t.warnHtmlMessage;
881
- let n = (t.onCacheKey || qe)(e), r = q[n];
882
- if (r) return r;
883
- let { ast: i, detectError: a } = Ye(e, {
884
- ...t,
885
- location: !1,
886
- mangle: !0,
887
- optimize: !0
888
- }), o = Ue(i);
889
- return a ? o : q[n] = o;
890
- }
891
- {
892
- if (!U(e)) return (() => e);
893
- let t = e.cacheKey;
894
- return t ? q[t] || (q[t] = Ue(e)) : Ue(e);
895
- }
896
- }
897
- let J = {
960
+ let K = {
898
961
  INVALID_ARGUMENT: 17,
899
962
  INVALID_DATE_ARGUMENT: 18,
900
963
  INVALID_ISO_DATE_ARGUMENT: 19,
@@ -902,56 +965,46 @@
902
965
  NOT_SUPPORT_LOCALE_ASYNC_FUNCTION: 21,
903
966
  NOT_SUPPORT_LOCALE_TYPE: 22
904
967
  };
905
- function Y(e) {
906
- return B(e, null, void 0);
968
+ function q(e) {
969
+ return z(e, null, void 0);
907
970
  }
908
- J.INVALID_ARGUMENT, J.INVALID_DATE_ARGUMENT, J.INVALID_ISO_DATE_ARGUMENT, J.NOT_SUPPORT_LOCALE_PROMISE_VALUE, J.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION, J.NOT_SUPPORT_LOCALE_TYPE;
909
- function Ze(e, t) {
910
- return t.locale == null ? $e(e.locale) : $e(t.locale);
971
+ K.INVALID_ARGUMENT, K.INVALID_DATE_ARGUMENT, K.INVALID_ISO_DATE_ARGUMENT, K.NOT_SUPPORT_LOCALE_PROMISE_VALUE, K.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION, K.NOT_SUPPORT_LOCALE_TYPE;
972
+ function ft(e, t) {
973
+ return t.locale == null ? mt(e.locale) : mt(t.locale);
911
974
  }
912
- let Qe;
913
- function $e(e) {
975
+ let pt;
976
+ function mt(e) {
914
977
  if (v(e)) return e;
915
978
  if (_(e)) {
916
- if (e.resolvedOnce && Qe != null) return Qe;
979
+ if (e.resolvedOnce && pt != null) return pt;
917
980
  if (e.constructor.name === `Function`) {
918
981
  let t = e();
919
- if (x(t)) throw Y(J.NOT_SUPPORT_LOCALE_PROMISE_VALUE);
920
- return Qe = t;
982
+ if (x(t)) throw q(K.NOT_SUPPORT_LOCALE_PROMISE_VALUE);
983
+ return pt = t;
921
984
  }
922
- throw Y(J.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION);
985
+ throw q(K.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION);
923
986
  }
924
- throw Y(J.NOT_SUPPORT_LOCALE_TYPE);
987
+ throw q(K.NOT_SUPPORT_LOCALE_TYPE);
925
988
  }
926
- function et(e, t, n) {
989
+ function ht(e, t, n) {
927
990
  return [.../* @__PURE__ */ new Set([n, ...g(t) ? t : b(t) ? Object.keys(t).filter((e) => e !== "default") : v(t) ? [t] : [n]])];
928
991
  }
929
- function tt(e, t, n) {
930
- let r = v(n) ? n : _t, i = e, a;
931
- b(t) ? (i.__localeChainObjectCache || (i.__localeChainObjectCache = /* @__PURE__ */ new WeakMap()), a = i.__localeChainObjectCache.get(t), a || (a = /* @__PURE__ */ new Map(), i.__localeChainObjectCache.set(t, a))) : (i.__localeChainCache || (i.__localeChainCache = /* @__PURE__ */ new Map()), a = i.__localeChainCache.get(t), a || (a = /* @__PURE__ */ new Map(), i.__localeChainCache.set(t, a)));
932
- let o = a.get(r);
933
- if (o) return o;
934
- let s = [], c = [n];
935
- for (; g(c);) c = nt(s, c, t);
936
- let l = g(t) || !w(t) ? t : t.default ? t.default : null;
937
- return c = v(l) ? [l] : l, g(c) && nt(s, c, !1), a.set(r, s), s;
938
- }
939
- function nt(e, t, n) {
992
+ function gt(e, t, n) {
940
993
  let r = !0;
941
994
  for (let i = 0; i < t.length && y(r); i++) {
942
995
  let a = t[i];
943
- v(a) && (r = rt(e, t[i], n));
996
+ v(a) && (r = _t(e, t[i], n));
944
997
  }
945
998
  return r;
946
999
  }
947
- function rt(e, t, n) {
1000
+ function _t(e, t, n) {
948
1001
  let r, i = t.split(`-`);
949
1002
  do
950
- r = it(e, i.join(`-`), n), i.splice(-1, 1);
1003
+ r = vt(e, i.join(`-`), n), i.splice(-1, 1);
951
1004
  while (i.length && r === !0);
952
1005
  return r;
953
1006
  }
954
- function it(e, t, n) {
1007
+ function vt(e, t, n) {
955
1008
  let r = !1;
956
1009
  if (!e.includes(t) && (r = !0, t)) {
957
1010
  r = t[t.length - 1] !== `!`;
@@ -960,53 +1013,53 @@
960
1013
  }
961
1014
  return r;
962
1015
  }
963
- let X = [];
964
- X[0] = {
1016
+ let J = [];
1017
+ J[0] = {
965
1018
  w: [0],
966
1019
  i: [3, 0],
967
1020
  "[": [4],
968
1021
  o: [7]
969
- }, X[1] = {
1022
+ }, J[1] = {
970
1023
  w: [1],
971
1024
  ".": [2],
972
1025
  "[": [4],
973
1026
  o: [7]
974
- }, X[2] = {
1027
+ }, J[2] = {
975
1028
  w: [2],
976
1029
  i: [3, 0],
977
1030
  0: [3, 0]
978
- }, X[3] = {
1031
+ }, J[3] = {
979
1032
  i: [3, 0],
980
1033
  0: [3, 0],
981
1034
  w: [1, 1],
982
1035
  ".": [2, 1],
983
1036
  "[": [4, 1],
984
1037
  o: [7, 1]
985
- }, X[4] = {
1038
+ }, J[4] = {
986
1039
  "'": [5, 0],
987
1040
  "\"": [6, 0],
988
1041
  "[": [4, 2],
989
1042
  "]": [1, 3],
990
1043
  o: 8,
991
1044
  l: [4, 0]
992
- }, X[5] = {
1045
+ }, J[5] = {
993
1046
  "'": [4, 0],
994
1047
  o: 8,
995
1048
  l: [5, 0]
996
- }, X[6] = {
1049
+ }, J[6] = {
997
1050
  "\"": [4, 0],
998
1051
  o: 8,
999
1052
  l: [6, 0]
1000
1053
  };
1001
- let at = /^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;
1002
- function ot(e) {
1003
- return at.test(e);
1054
+ let yt = /^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;
1055
+ function bt(e) {
1056
+ return yt.test(e);
1004
1057
  }
1005
- function st(e) {
1058
+ function xt(e) {
1006
1059
  let t = e.charCodeAt(0);
1007
1060
  return t === e.charCodeAt(e.length - 1) && (t === 34 || t === 39) ? e.slice(1, -1) : e;
1008
1061
  }
1009
- function ct(e) {
1062
+ function St(e) {
1010
1063
  if (e == null) return `o`;
1011
1064
  switch (e.charCodeAt(0)) {
1012
1065
  case 91:
@@ -1027,11 +1080,11 @@
1027
1080
  }
1028
1081
  return `i`;
1029
1082
  }
1030
- function lt(e) {
1083
+ function Ct(e) {
1031
1084
  let t = e.trim();
1032
- return e.charAt(0) === `0` && isNaN(parseInt(e)) ? !1 : ot(t) ? st(t) : `*` + t;
1085
+ return e.charAt(0) === `0` && isNaN(parseInt(e)) ? !1 : bt(t) ? xt(t) : `*` + t;
1033
1086
  }
1034
- function ut(e) {
1087
+ function wt(e) {
1035
1088
  let t = [], n = -1, r = 0, i = 0, a, o, s, c, l, u, d, f = [];
1036
1089
  f[0] = () => {
1037
1090
  o === void 0 ? o = s : o += s;
@@ -1042,7 +1095,7 @@
1042
1095
  }, f[3] = () => {
1043
1096
  if (i > 0) i--, r = 4, f[0]();
1044
1097
  else {
1045
- if (i = 0, o === void 0 || (o = lt(o), o === !1)) return !1;
1098
+ if (i = 0, o === void 0 || (o = Ct(o), o === !1)) return !1;
1046
1099
  f[1]();
1047
1100
  }
1048
1101
  };
@@ -1051,29 +1104,15 @@
1051
1104
  if (r === 5 && t === `'` || r === 6 && t === `"`) return n++, s = `\\` + t, f[0](), !0;
1052
1105
  }
1053
1106
  for (; r !== null;) if (n++, a = e[n], !(a === `\\` && p())) {
1054
- if (c = ct(a), d = X[r], l = d[c] || d.l || 8, l === 8 || (r = l[0], l[1] !== void 0 && (u = f[l[1]], u && (s = a, u() === !1)))) return;
1107
+ if (c = St(a), d = J[r], l = d[c] || d.l || 8, l === 8 || (r = l[0], l[1] !== void 0 && (u = f[l[1]], u && (s = a, u() === !1)))) return;
1055
1108
  if (r === 7) return t;
1056
1109
  }
1057
1110
  }
1058
- let dt = /* @__PURE__ */ new Map();
1059
- function ft(e, t) {
1111
+ let Tt = /* @__PURE__ */ new Map();
1112
+ function Et(e, t) {
1060
1113
  return b(e) ? m(e, t) : null;
1061
1114
  }
1062
- function pt(e, t) {
1063
- if (!b(e)) return null;
1064
- let n = dt.get(t);
1065
- if (n || (n = ut(t), n && dt.set(t, n)), !n) return null;
1066
- let r = n.length, i = e, a = 0;
1067
- for (; a < r;) {
1068
- let e = n[a];
1069
- if (He.includes(e) && U(i) || !b(i) || !p(i, e)) return null;
1070
- let t = i[e];
1071
- if (t === void 0 || _(i)) return null;
1072
- i = t, a++;
1073
- }
1074
- return i;
1075
- }
1076
- let Z = {
1115
+ let Y = {
1077
1116
  NOT_FOUND_KEY: 1,
1078
1117
  FALLBACK_TO_TRANSLATE: 2,
1079
1118
  CANNOT_FORMAT_NUMBER: 3,
@@ -1086,95 +1125,35 @@
1086
1125
  IGNORE_UNSAFE_LOCALE: 10,
1087
1126
  FALLBACK_TO_DEFAULT_PLURAL_RULE: 11,
1088
1127
  FALLBACK_FROM_INVALID_LOCALE: 12
1089
- }, mt = {
1090
- [Z.NOT_FOUND_KEY]: `Not found '{key}' key in '{locale}' locale {resource}.`,
1091
- [Z.FALLBACK_TO_TRANSLATE]: `Fall back to translate '{key}' key with '{target}' locale.`,
1092
- [Z.CANNOT_FORMAT_NUMBER]: `Cannot format a number value due to not supported Intl.NumberFormat.`,
1093
- [Z.FALLBACK_TO_NUMBER_FORMAT]: `Fall back to number format '{key}' key with '{target}' locale.`,
1094
- [Z.CANNOT_FORMAT_DATE]: `Cannot format a date value due to not supported Intl.DateTimeFormat.`,
1095
- [Z.FALLBACK_TO_DATE_FORMAT]: `Fall back to datetime format '{key}' key with '{target}' locale.`,
1096
- [Z.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER]: `This project is using Custom Message Compiler, which is an experimental feature. It may receive breaking changes or be removed in the future.`,
1097
- [Z.INVALID_NUMBER_ARGUMENT]: `Invalid argument for number formatting: expected a number but received '{value}'.`,
1098
- [Z.INVALID_DATE_ARGUMENT]: `Invalid argument for datetime formatting: expected a Date, number, or ISO string but received '{value}'.`,
1099
- [Z.IGNORE_UNSAFE_LOCALE]: `Ignore '{locale}' locale: it is a property name of Object.prototype`,
1100
- [Z.FALLBACK_TO_DEFAULT_PLURAL_RULE]: `Fall back to the default plural rule for '{locale}' locale: Intl.PluralRules does not support it`,
1101
- [Z.FALLBACK_FROM_INVALID_LOCALE]: `Fall back to '{target}' locale for {type} formatting with '{locale}' locale: it is not a BCP 47 language tag`
1102
- };
1103
- function ht(e, ...t) {
1104
- return n(mt[e], ...t);
1105
- }
1106
- let gt = `12.0.0-alpha.12`, _t = `en-US`, vt = (e) => `${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;
1107
- function yt() {
1128
+ }, Dt = {
1129
+ [Y.NOT_FOUND_KEY]: `Not found '{key}' key in '{locale}' locale {resource}.`,
1130
+ [Y.FALLBACK_TO_TRANSLATE]: `Fall back to translate '{key}' key with '{target}' locale.`,
1131
+ [Y.CANNOT_FORMAT_NUMBER]: `Cannot format a number value due to not supported Intl.NumberFormat.`,
1132
+ [Y.FALLBACK_TO_NUMBER_FORMAT]: `Fall back to number format '{key}' key with '{target}' locale.`,
1133
+ [Y.CANNOT_FORMAT_DATE]: `Cannot format a date value due to not supported Intl.DateTimeFormat.`,
1134
+ [Y.FALLBACK_TO_DATE_FORMAT]: `Fall back to datetime format '{key}' key with '{target}' locale.`,
1135
+ [Y.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER]: `This project is using Custom Message Compiler, which is an experimental feature. It may receive breaking changes or be removed in the future.`,
1136
+ [Y.INVALID_NUMBER_ARGUMENT]: `Invalid argument for number formatting: expected a number but received '{value}'.`,
1137
+ [Y.INVALID_DATE_ARGUMENT]: `Invalid argument for datetime formatting: expected a Date, number, or ISO string but received '{value}'.`,
1138
+ [Y.IGNORE_UNSAFE_LOCALE]: `Ignore '{locale}' locale: it is a property name of Object.prototype`,
1139
+ [Y.FALLBACK_TO_DEFAULT_PLURAL_RULE]: `Fall back to the default plural rule for '{locale}' locale: Intl.PluralRules does not support it`,
1140
+ [Y.FALLBACK_FROM_INVALID_LOCALE]: `Fall back to '{target}' locale for {type} formatting with '{locale}' locale: it is not a BCP 47 language tag`
1141
+ }, Ot = `12.0.0-alpha.14`, X = `en-US`, kt = (e) => `${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;
1142
+ function At() {
1108
1143
  return {
1109
1144
  upper: (e, t) => t === `text` && v(e) ? e.toUpperCase() : t === `vnode` && b(e) && `__v_isVNode` in e ? e.children.toUpperCase() : e,
1110
1145
  lower: (e, t) => t === `text` && v(e) ? e.toLowerCase() : t === `vnode` && b(e) && `__v_isVNode` in e ? e.children.toLowerCase() : e,
1111
- capitalize: (e, t) => t === `text` && v(e) ? vt(e) : t === `vnode` && b(e) && `__v_isVNode` in e ? vt(e.children) : e
1146
+ capitalize: (e, t) => t === `text` && v(e) ? kt(e) : t === `vnode` && b(e) && `__v_isVNode` in e ? kt(e.children) : e
1112
1147
  };
1113
1148
  }
1114
- let bt;
1115
- function xt(e) {
1116
- bt = e;
1117
- }
1118
- let St;
1119
- function Ct(e) {
1120
- St = e;
1121
- }
1122
- let wt;
1123
- function Tt(e) {
1124
- wt = e;
1125
- }
1126
- let Et = 0;
1127
- function Dt(e = {}) {
1128
- let t = _(e.onWarn) ? e.onWarn : D, n = v(e.version) ? e.version : gt, r = v(e.locale) || _(e.locale) ? e.locale : _t, i = _(r) ? _t : r, a = jt(e.fallbackLocale) ? e.fallbackLocale : i, o = w(e.messages) ? e.messages : Ot(i), s = w(e.datetimeFormats) ? e.datetimeFormats : Ot(i), c = w(e.numberFormats) ? e.numberFormats : Ot(i), u = l(d(), e.modifiers, yt()), f = e.pluralRules || d(), p = _(e.missing) ? e.missing : null, m = !Mt(e.missingWarn) || e.missingWarn, h = !Mt(e.fallbackWarn) || e.fallbackWarn, g = !!e.fallbackFormat, x = !!e.unresolving, S = _(e.postTranslation) ? e.postTranslation : null, C = w(e.processor) ? e.processor : null, T = !y(e.warnHtmlMessage) || e.warnHtmlMessage, E = !!e.escapeParameter, O = _(e.messageCompiler) ? e.messageCompiler : bt || null, ee = _(e.messageResolver) ? e.messageResolver : St || ft, te = _(e.localeFallbacker) ? e.localeFallbacker : wt || et, ne = b(e.fallbackContext) ? e.fallbackContext : void 0;
1129
- Et++;
1130
- let k = {
1131
- version: n,
1132
- cid: Et,
1133
- locale: r,
1134
- fallbackLocale: a,
1135
- messages: o,
1136
- modifiers: u,
1137
- pluralRules: f,
1138
- missing: p,
1139
- missingWarn: m,
1140
- fallbackWarn: h,
1141
- fallbackFormat: g,
1142
- unresolving: x,
1143
- postTranslation: S,
1144
- processor: C,
1145
- warnHtmlMessage: T,
1146
- escapeParameter: E,
1147
- messageCompiler: O,
1148
- messageResolver: ee,
1149
- localeFallbacker: te,
1150
- fallbackContext: ne,
1151
- onWarn: t
1152
- };
1153
- return k.datetimeFormats = s, k.numberFormats = c, k.__datetimeFormatters = /* @__PURE__ */ new Map(), k.__numberFormatters = /* @__PURE__ */ new Map(), k;
1154
- }
1155
- let Ot = (e) => ({ [e]: d() });
1156
- function kt(e, t) {
1157
- let n = m(e.messages, t);
1158
- if (n == null) return;
1159
- let r = d();
1160
- return R(n, r), r;
1161
- }
1162
- function At(e, t, n) {
1163
- h(t) || (e.messages[t] = n);
1164
- }
1165
- function jt(e) {
1149
+ let jt, Mt, Nt, Pt = 0, Ft = (e) => ({ [e]: d() });
1150
+ function It(e) {
1166
1151
  return v(e) || g(e) || w(e) || e === !1;
1167
1152
  }
1168
- function Mt(e) {
1153
+ function Lt(e) {
1169
1154
  return y(e) || s(e);
1170
1155
  }
1171
- function Nt(e, t) {
1172
- return s(e) ? e.test(t) : e;
1173
- }
1174
- function Pt(e, t) {
1175
- return s(e) ? e.test(t) : e;
1176
- }
1177
- function Ft(e, t, n, r, i) {
1156
+ function Rt(e, t, n, r, i) {
1178
1157
  let { missing: a, onWarn: o } = e;
1179
1158
  if (a !== null) {
1180
1159
  let r = a(e, n, t, i);
@@ -1182,84 +1161,72 @@
1182
1161
  }
1183
1162
  return t;
1184
1163
  }
1185
- function It(e, t) {
1164
+ function zt(e, t) {
1186
1165
  let n = e;
1187
1166
  b(t) ? n.__localeChainObjectCache?.delete(t) : n.__localeChainCache?.delete(t);
1188
1167
  }
1189
- function Lt(e, t, n) {
1190
- It(e, n), e.fallbackContext && It(e.fallbackContext, n);
1191
- {
1192
- let { __datetimeFormatters: t, __numberFormatters: n } = e;
1193
- t.clear(), n.clear();
1194
- }
1195
- e.localeFallbacker(e, n, t);
1196
- }
1197
- function Rt(e, t) {
1168
+ function Bt(e, t) {
1198
1169
  return e !== t && e.split(`-`)[0] === t.split(`-`)[0];
1199
1170
  }
1200
- function zt(e, t) {
1171
+ function Vt(e, t) {
1201
1172
  let n = t.indexOf(e);
1202
1173
  if (n === -1) return !1;
1203
- for (let r = n + 1; r < t.length; r++) if (Rt(e, t[r])) return !0;
1174
+ for (let r = n + 1; r < t.length; r++) if (Bt(e, t[r])) return !0;
1204
1175
  return !1;
1205
1176
  }
1206
- function Bt(e, t, n, r, i, a, o) {
1177
+ function Ht(e, t, n, r, i, a, o) {
1207
1178
  let { fallbackLocale: s, localeFallbacker: c, onWarn: l } = e, u = c(e, s, n);
1208
1179
  for (let n = 0; n < u.length; n++) {
1209
1180
  let a = u[n], s = m(m(r, a) || {}, t);
1210
1181
  if (w(s) && v(a)) return a;
1211
- Ft(e, t, a, i, o);
1182
+ Rt(e, t, a, i, o);
1212
1183
  }
1213
1184
  return null;
1214
1185
  }
1215
- function Vt(e) {
1186
+ function Ut(e) {
1216
1187
  try {
1217
1188
  return Intl.getCanonicalLocales(e), !0;
1218
1189
  } catch {
1219
1190
  return !1;
1220
1191
  }
1221
1192
  }
1222
- function Ht(e, t, n, r, i) {
1193
+ function Wt(e, t, n, r, i) {
1223
1194
  try {
1224
1195
  return new t(n, r);
1225
1196
  } catch (i) {
1226
- if (Vt(n)) throw i;
1197
+ if (Ut(n)) throw i;
1227
1198
  let { fallbackLocale: a, localeFallbacker: o, onWarn: s } = e;
1228
- return new t(o(e, a, n).find(Vt) || `en-US`, r);
1199
+ return new t(o(e, a, n).find(Ut) || `en-US`, r);
1229
1200
  }
1230
1201
  }
1231
- function Ut(e, [t, n, r, i], a, o, s, c) {
1232
- let u = y(r.missingWarn) ? r.missingWarn : e.missingWarn, d = y(r.fallbackWarn) ? r.fallbackWarn : e.fallbackWarn, f = !!r.part, p = Ze(e, r);
1202
+ function Gt(e, [t, n, r, i], a, o, s, c) {
1203
+ let u = y(r.missingWarn) ? r.missingWarn : e.missingWarn, d = y(r.fallbackWarn) ? r.fallbackWarn : e.fallbackWarn, f = !!r.part, p = ft(e, r);
1233
1204
  if (!v(t) || t === ``) {
1234
- let t = Ht(e, a, p.replace(/!/g, ``), i, c);
1205
+ let t = Wt(e, a, p.replace(/!/g, ``), i, c);
1235
1206
  return f ? t.formatToParts(n) : t.format(n);
1236
1207
  }
1237
- let m = Bt(e, t, p, s, u, d, c);
1208
+ let m = Ht(e, t, p, s, u, d, c);
1238
1209
  if (!v(m)) return e.unresolving ? -1 : t;
1239
- let h = s[m][t], g = Wt(m, t, i), _ = o.get(g);
1240
- return _ || (_ = Ht(e, a, m, l({}, h, i), c), o.set(g, _)), f ? _.formatToParts(n) : _.format(n);
1210
+ let h = s[m][t], g = Kt(m, t, i), _ = o.get(g);
1211
+ return _ || (_ = Wt(e, a, m, l({}, h, i), c), o.set(g, _)), f ? _.formatToParts(n) : _.format(n);
1241
1212
  }
1242
- function Wt(e, t, n) {
1213
+ function Kt(e, t, n) {
1243
1214
  let r = `${e}__${t}`;
1244
1215
  return w(n) && !c(n) && (r = `${r}__${JSON.stringify(n)}`), r;
1245
1216
  }
1246
- function Gt(e, t, n) {
1217
+ function qt(e, t, n) {
1247
1218
  for (let r in n) {
1248
1219
  let n = `${t}__${r}`;
1249
1220
  for (let t of e.keys()) (t === n || t.startsWith(`${n}__`)) && e.delete(t);
1250
1221
  }
1251
1222
  }
1252
- function Kt(e, t, n, r) {
1223
+ function Jt(e, t, n, r) {
1253
1224
  let [, i, a, o] = e, s = n;
1254
1225
  return v(i) ? t.key = i : w(i) && Object.keys(i).forEach((e) => {
1255
1226
  r.includes(e) ? s[e] = i[e] : t[e] = i[e];
1256
1227
  }), v(a) ? t.locale = a : w(a) && (s = a), w(o) && (s = o), s;
1257
1228
  }
1258
- function qt(e, ...t) {
1259
- let { datetimeFormats: n, onWarn: r } = e, { __datetimeFormatters: i } = e;
1260
- return !v(t[0]) && !o(t[0]) && !a(t[0]) ? `` : Ut(e, Yt(...t), Intl.DateTimeFormat, i, n, `datetime format`);
1261
- }
1262
- let Jt = [
1229
+ let Yt = [
1263
1230
  `localeMatcher`,
1264
1231
  `weekday`,
1265
1232
  `era`,
@@ -1281,24 +1248,24 @@
1281
1248
  `hourCycle`,
1282
1249
  `fractionalSecondDigits`
1283
1250
  ];
1284
- function Yt(...e) {
1251
+ function Xt(...e) {
1285
1252
  let [t] = e, n = d(), r = d(), i;
1286
1253
  if (v(t)) {
1287
1254
  let e = t.match(/^(\d{4}-\d{2}-\d{2})(?:(T|\s)(.+))?$/);
1288
- if (!e) throw Y(J.INVALID_ISO_DATE_ARGUMENT);
1255
+ if (!e) throw q(K.INVALID_ISO_DATE_ARGUMENT);
1289
1256
  let n = e[3] ? e[3].trim().startsWith(`T`) ? `${e[1].trim()}${e[3].trim()}` : `${e[1].trim()}T${e[3].trim()}` : e[1].trim();
1290
1257
  i = new Date(n);
1291
1258
  try {
1292
1259
  i.toISOString();
1293
1260
  } catch {
1294
- throw Y(J.INVALID_ISO_DATE_ARGUMENT);
1261
+ throw q(K.INVALID_ISO_DATE_ARGUMENT);
1295
1262
  }
1296
1263
  } else if (o(t)) {
1297
- if (isNaN(t.getTime())) throw Y(J.INVALID_DATE_ARGUMENT);
1264
+ if (isNaN(t.getTime())) throw q(K.INVALID_DATE_ARGUMENT);
1298
1265
  i = t;
1299
1266
  } else if (a(t)) i = t;
1300
- else throw Y(J.INVALID_ARGUMENT);
1301
- let s = Kt(e, n, r, Jt);
1267
+ else throw q(K.INVALID_ARGUMENT);
1268
+ let s = Jt(e, n, r, Yt);
1302
1269
  return [
1303
1270
  n.key || ``,
1304
1271
  i,
@@ -1306,14 +1273,7 @@
1306
1273
  s
1307
1274
  ];
1308
1275
  }
1309
- function Xt(e, t, n) {
1310
- Gt(e.__datetimeFormatters, t, n);
1311
- }
1312
- function Zt(e, ...t) {
1313
- let { numberFormats: n, onWarn: r } = e, { __numberFormatters: i } = e;
1314
- return a(t[0]) ? Ut(e, $t(...t), Intl.NumberFormat, i, n, `number format`) : ``;
1315
- }
1316
- let Qt = [
1276
+ let Zt = [
1317
1277
  `localeMatcher`,
1318
1278
  `style`,
1319
1279
  `currency`,
@@ -1335,10 +1295,10 @@
1335
1295
  `roundingIncrement`,
1336
1296
  `trailingZeroDisplay`
1337
1297
  ];
1338
- function $t(...e) {
1298
+ function Qt(...e) {
1339
1299
  let [t] = e, n = d(), r = d();
1340
- if (!a(t)) throw Y(J.INVALID_ARGUMENT);
1341
- let i = t, o = Kt(e, n, r, Qt);
1300
+ if (!a(t)) throw q(K.INVALID_ARGUMENT);
1301
+ let i = t, o = Jt(e, n, r, Zt);
1342
1302
  return [
1343
1303
  n.key || ``,
1344
1304
  i,
@@ -1346,14 +1306,11 @@
1346
1306
  o
1347
1307
  ];
1348
1308
  }
1349
- function en(e, t, n) {
1350
- Gt(e.__numberFormatters, t, n);
1351
- }
1352
- let tn = (e) => e, nn = (e) => ``, rn = `text`, an = (e) => e.length === 0 ? `` : E(e), on = T;
1353
- function sn(e, t) {
1309
+ let $t = (e) => e, en = (e) => ``, tn = `text`, nn = (e) => e.length === 0 ? `` : E(e), rn = T;
1310
+ function Z(e, t) {
1354
1311
  return e = Math.abs(e), t === 2 ? e === 1 ? 0 : 1 : Math.min(e, 2);
1355
1312
  }
1356
- let cn = [
1313
+ let an = [
1357
1314
  `zero`,
1358
1315
  `one`,
1359
1316
  `two`,
@@ -1361,41 +1318,41 @@
1361
1318
  `many`,
1362
1319
  `other`
1363
1320
  ], Q = /* @__PURE__ */ new Map();
1364
- function ln(e) {
1321
+ function on(e) {
1365
1322
  try {
1366
1323
  if (Intl.PluralRules.supportedLocalesOf(e).length === 0) return null;
1367
1324
  let t = new Intl.PluralRules(e);
1368
1325
  return {
1369
1326
  rules: t,
1370
- categories: t.resolvedOptions().pluralCategories.slice().sort((e, t) => cn.indexOf(e) - cn.indexOf(t))
1327
+ categories: t.resolvedOptions().pluralCategories.slice().sort((e, t) => an.indexOf(e) - an.indexOf(t))
1371
1328
  };
1372
1329
  } catch {
1373
1330
  return null;
1374
1331
  }
1375
1332
  }
1376
- function un(e) {
1333
+ function sn(e) {
1377
1334
  let t = Q.get(e);
1378
- return t === void 0 && (t = ln(e), Q.size >= 1e3 && Q.delete(Q.keys().next().value), Q.set(e, t)), t;
1335
+ return t === void 0 && (t = on(e), Q.size >= 1e3 && Q.delete(Q.keys().next().value), Q.set(e, t)), t;
1379
1336
  }
1380
- function dn(e) {
1337
+ function cn(e) {
1381
1338
  return a(e.pluralIndex) ? e.pluralIndex : a(e.named?.count) ? e.named.count : a(e.named?.n) ? e.named.n : -1;
1382
1339
  }
1383
- function fn(e = {}) {
1384
- let t = e.locale, n = dn(e), r;
1340
+ function ln(e = {}) {
1341
+ let t = e.locale, n = cn(e), r;
1385
1342
  r = v(t) && e.pluralRules && _(m(e.pluralRules, t)) ? e.pluralRules[t] : v(t) && typeof Intl < `u` && Intl.PluralRules !== void 0 ? (e, n) => {
1386
- let r = un(t);
1387
- if (r === null || n > r.categories.length) return sn(e, n);
1343
+ let r = sn(t);
1344
+ if (r === null || n > r.categories.length) return Z(e, n);
1388
1345
  let { rules: i, categories: a } = r, o = i.select(Math.abs(e)), s = a.indexOf(o);
1389
1346
  return Math.min(s === -1 ? n - 1 : s, n - 1);
1390
- } : sn;
1391
- let i = r === sn ? void 0 : sn, o = (e) => e[r(n, e.length, i)], s = e.list || [], c = (e) => s[e], u = e.named || d(), f = a(e.pluralIndex), p = (t) => {
1347
+ } : Z;
1348
+ let i = r === Z ? void 0 : Z, o = (e) => e[r(n, e.length, i)], s = e.list || [], c = (e) => s[e], u = e.named || d(), f = a(e.pluralIndex), p = (t) => {
1392
1349
  let n = h(t) ? m(u, t) : u[t];
1393
1350
  return f && n == null && (t === `count` || t === `n`) ? e.pluralIndex : n;
1394
1351
  };
1395
1352
  function y(t, n) {
1396
- return (_(e.messages) ? e.messages(t, !!n) : b(e.messages) ? e.messages[t] : !1) || (e.parent ? e.parent.message(t) : nn);
1353
+ return (_(e.messages) ? e.messages(t, !!n) : b(e.messages) ? e.messages[t] : !1) || (e.parent ? e.parent.message(t) : en);
1397
1354
  }
1398
- let x = (t) => e.modifiers ? m(e.modifiers, t) : tn, S = _(e.processor?.normalize) ? e.processor.normalize : an, C = _(e.processor?.interpolate) ? e.processor.interpolate : on, w = {
1355
+ let x = (t) => e.modifiers ? m(e.modifiers, t) : $t, S = _(e.processor?.normalize) ? e.processor.normalize : nn, C = _(e.processor?.interpolate) ? e.processor.interpolate : rn, w = {
1399
1356
  list: c,
1400
1357
  named: p,
1401
1358
  plural: o,
@@ -1408,7 +1365,7 @@
1408
1365
  return _(l) ? l(c, i) : c;
1409
1366
  },
1410
1367
  message: y,
1411
- type: v(e.processor?.type) ? e.processor.type : rn,
1368
+ type: v(e.processor?.type) ? e.processor.type : tn,
1412
1369
  interpolate: C,
1413
1370
  normalize: S,
1414
1371
  values: l(d(), s, u, f ? {
@@ -1418,28 +1375,8 @@
1418
1375
  };
1419
1376
  return w;
1420
1377
  }
1421
- let pn = () => ``, $ = (e) => _(e), mn = (e) => v(e) || U(e) || $(e);
1422
- function hn(e, ...t) {
1423
- let [n, r] = xn(...t), i = Ze(e, r), a = y(r.escapeParameter) ? r.escapeParameter : e.escapeParameter;
1424
- a && gn(r);
1425
- let o = !!r.resolvedMessage, [s, c, l] = o ? [
1426
- n,
1427
- i,
1428
- m(e.messages, i) || d()
1429
- ] : yn(e, n, i, e.fallbackLocale, y(r.fallbackWarn) ? r.fallbackWarn : e.fallbackWarn, y(r.missingWarn) ? r.missingWarn : e.missingWarn), u = n;
1430
- if (!o && !mn(s)) {
1431
- let t = v(r.default) ? r.default : y(r.default) || e.fallbackFormat ? e.messageCompiler ? n : () => n : null;
1432
- (e.fallbackFormat || t != null && (v(t) || _(t))) && (s = t, u = s);
1433
- }
1434
- if (!o && (!mn(s) || !v(c))) return e.unresolving ? -1 : n;
1435
- let f = !1, p = $(s) ? s : bn(e, n, c, s, u, () => {
1436
- f = !0;
1437
- });
1438
- if (f) return s;
1439
- let h = p(fn(Cn(e, c, l, r, a))), g = e.postTranslation ? e.postTranslation(h, n) : h;
1440
- return a && v(g) && (g = I(g)), g;
1441
- }
1442
- function gn(e) {
1378
+ let un = () => ``, $ = (e) => _(e), dn = (e) => v(e) || H(e) || $(e);
1379
+ function fn(e) {
1443
1380
  if (g(e.list) && (e.list = e.list.map((e) => v(e) ? O(e) : e)), b(e.named)) {
1444
1381
  let t = e.named, n = d();
1445
1382
  for (let e of Object.keys(t)) {
@@ -1449,16 +1386,16 @@
1449
1386
  e.named = n;
1450
1387
  }
1451
1388
  }
1452
- function _n(e) {
1389
+ function pn(e) {
1453
1390
  return v(e) ? e : O(T(e));
1454
1391
  }
1455
- function vn(e, t) {
1456
- return !t || _(e?.interpolate) ? e ?? void 0 : l({}, e, { interpolate: _n });
1392
+ function mn(e, t) {
1393
+ return !t || _(e?.interpolate) ? e ?? void 0 : l({}, e, { interpolate: pn });
1457
1394
  }
1458
- function yn(e, t, n, r, i, a) {
1395
+ function hn(e, t, n, r, i, a) {
1459
1396
  let { messages: o, onWarn: s, messageResolver: c, localeFallbacker: l } = e, u = l(e, r, n), f = d(), p, h = null;
1460
- for (let n = 0; n < u.length && (p = u[n], f = m(o, p) || d(), (h = c(f, t)) === null && (h = m(f, t)), !mn(h)); n++) if (!zt(p, u)) {
1461
- let n = Ft(e, t, p, a, `translate`);
1397
+ for (let n = 0; n < u.length && (p = u[n], f = m(o, p) || d(), (h = c(f, t)) === null && (h = m(f, t)), !dn(h)); n++) if (!Vt(p, u)) {
1398
+ let n = Rt(e, t, p, a, `translate`);
1462
1399
  n !== t && (h = n);
1463
1400
  }
1464
1401
  return [
@@ -1467,7 +1404,7 @@
1467
1404
  f
1468
1405
  ];
1469
1406
  }
1470
- function bn(e, t, n, r, i, a) {
1407
+ function gn(e, t, n, r, i, a) {
1471
1408
  if ($(r)) {
1472
1409
  let e = r;
1473
1410
  return e.locale = e.locale || n, e.key = e.key || t, e;
@@ -1476,16 +1413,16 @@
1476
1413
  let e = (() => r);
1477
1414
  return e.locale = n, e.key = t, e;
1478
1415
  }
1479
- let o = e.messageCompiler(r, Sn(e, n, i, r, e.warnHtmlMessage, a));
1416
+ let o = e.messageCompiler(r, vn(e, n, i, r, e.warnHtmlMessage, a));
1480
1417
  return o.locale = n, o.key = t, o.source = r, o;
1481
1418
  }
1482
- function xn(...e) {
1419
+ function _n(...e) {
1483
1420
  let [t, n, r] = e;
1484
- if (!v(t) && !a(t) && !$(t) && !U(t)) throw Y(J.INVALID_ARGUMENT);
1421
+ if (!v(t) && !a(t) && !$(t) && !H(t)) throw q(K.INVALID_ARGUMENT);
1485
1422
  let i = a(t) ? String(t) : ($(t), t), o = d();
1486
1423
  return a(n) ? o.plural = n : v(n) ? o.default = n : w(n) && !c(n) ? o.named = n : g(n) && (o.list = n), a(r) ? o.plural = r : v(r) ? o.default = r : w(r) && l(o, r), [i, o];
1487
1424
  }
1488
- function Sn(e, t, n, i, a, o) {
1425
+ function vn(e, t, n, i, a, o) {
1489
1426
  return {
1490
1427
  locale: t,
1491
1428
  key: n,
@@ -1496,7 +1433,7 @@
1496
1433
  onCacheKey: (e) => r(t, n, e)
1497
1434
  };
1498
1435
  }
1499
- function Cn(e, t, n, r, i) {
1436
+ function yn(e, t, n, r, i) {
1500
1437
  let { modifiers: o, pluralRules: s, messageResolver: c, fallbackLocale: l, fallbackWarn: u, missingWarn: d, fallbackContext: f } = e;
1501
1438
  return {
1502
1439
  locale: t,
@@ -1505,22 +1442,146 @@
1505
1442
  messages: (r, i) => {
1506
1443
  let a = c(n, r);
1507
1444
  if (a == null && (f || i)) {
1508
- let [n, , i] = yn(f || e, r, t, l, u, d);
1445
+ let [n, , i] = hn(f || e, r, t, l, u, d);
1509
1446
  a = n ?? c(i, r);
1510
1447
  }
1511
- if (v(a) || U(a)) {
1512
- let n = !1, i = bn(e, r, t, a, r, () => {
1448
+ if (v(a) || H(a)) {
1449
+ let n = !1, i = gn(e, r, t, a, r, () => {
1513
1450
  n = !0;
1514
1451
  });
1515
- return n ? pn : i;
1452
+ return n ? un : i;
1516
1453
  }
1517
- return $(a) ? a : pn;
1454
+ return $(a) ? a : un;
1518
1455
  },
1519
- processor: vn(e.processor, i),
1456
+ processor: mn(e.processor, i),
1520
1457
  list: r.list ?? void 0,
1521
1458
  named: r.named ?? void 0,
1522
1459
  pluralIndex: a(r.plural) ? r.plural : void 0
1523
1460
  };
1524
1461
  }
1525
- return e.AST_NODE_PROPS_KEYS = He, e.CORE_ERROR_CODES_EXTEND_POINT = 23, e.CORE_WARN_CODES_EXTEND_POINT = 13, e.CoreWarnCodes = Z, e.DATETIME_FORMAT_OPTIONS_KEYS = Jt, e.DEFAULT_LOCALE = _t, e.DEFAULT_MESSAGE_DATA_TYPE = rn, e.MISSING_RESOLVE_VALUE = ``, e.NOT_RESOLVED = -1, e.NUMBER_FORMAT_OPTIONS_KEYS = Qt, e.VERSION = gt, e.clearCompileCache = Je, e.clearDateTimeFormat = Xt, e.clearNumberFormat = en, e.compile = Xe, e.createCompileError = B, e.createCoreContext = Dt, e.createCoreError = Y, e.createMessageContext = fn, e.datetime = qt, e.fallbackWithLocaleChain = tt, e.fallbackWithSimple = et, e.getLocale = Ze, e.getLocaleMessage = kt, e.getWarnMessage = ht, e.handleMissing = Ft, e.isAlmostSameLocale = Rt, e.isFallbackLocale = jt, e.isImplicitFallback = zt, e.isMessageAST = U, e.isMessageFormat = mn, e.isMessageFunction = $, e.isTranslateFallbackWarn = Nt, e.isTranslateMissingWarn = Pt, e.isWarnOption = Mt, e.number = Zt, e.parse = ut, e.parseDateTimeArgs = Yt, e.parseNumberArgs = $t, e.parseTranslateArgs = xn, e.registerLocaleFallbacker = Tt, e.registerMessageCompiler = xt, e.registerMessageResolver = Ct, e.resolveLocale = $e, e.resolveValue = pt, e.resolveWithKeyValue = ft, e.setLocaleMessage = At, e.translate = hn, e.updateFallbackLocale = Lt, e;
1462
+ return e.AST_NODE_PROPS_KEYS = at, e.CORE_ERROR_CODES_EXTEND_POINT = 23, e.CORE_WARN_CODES_EXTEND_POINT = 13, e.CoreWarnCodes = Y, e.DATETIME_FORMAT_OPTIONS_KEYS = Yt, e.DEFAULT_LOCALE = X, e.DEFAULT_MESSAGE_DATA_TYPE = tn, e.MISSING_RESOLVE_VALUE = ``, e.NOT_RESOLVED = -1, e.NUMBER_FORMAT_OPTIONS_KEYS = Zt, e.VERSION = Ot, e.clearCompileCache = function() {
1463
+ G = d();
1464
+ }, e.clearDateTimeFormat = function(e, t, n) {
1465
+ qt(e.__datetimeFormatters, t, n);
1466
+ }, e.clearNumberFormat = function(e, t, n) {
1467
+ qt(e.__numberFormatters, t, n);
1468
+ }, e.compile = function(e, t) {
1469
+ if (v(e)) {
1470
+ y(t.warnHtmlMessage) && t.warnHtmlMessage;
1471
+ let n = (t.onCacheKey || ut)(e), r = G[n];
1472
+ if (r) return r;
1473
+ let { ast: i, detectError: a } = dt(e, {
1474
+ ...t,
1475
+ location: !1,
1476
+ mangle: !0,
1477
+ optimize: !0
1478
+ }), o = ot(i);
1479
+ return a ? o : G[n] = o;
1480
+ }
1481
+ {
1482
+ if (!H(e)) return (() => e);
1483
+ let t = e.cacheKey;
1484
+ return t ? G[t] || (G[t] = ot(e)) : ot(e);
1485
+ }
1486
+ }, e.createCompileError = z, e.createCoreContext = function(e = {}) {
1487
+ let t = _(e.onWarn) ? e.onWarn : D, n = v(e.version) ? e.version : Ot, r = v(e.locale) || _(e.locale) ? e.locale : X, i = _(r) ? X : r, a = It(e.fallbackLocale) ? e.fallbackLocale : i, o = w(e.messages) ? e.messages : Ft(i), s = w(e.datetimeFormats) ? e.datetimeFormats : Ft(i), c = w(e.numberFormats) ? e.numberFormats : Ft(i), u = l(d(), e.modifiers, At()), f = e.pluralRules || d(), p = _(e.missing) ? e.missing : null, m = !Lt(e.missingWarn) || e.missingWarn, h = !Lt(e.fallbackWarn) || e.fallbackWarn, g = !!e.fallbackFormat, x = !!e.unresolving, S = _(e.postTranslation) ? e.postTranslation : null, C = w(e.processor) ? e.processor : null, T = !y(e.warnHtmlMessage) || e.warnHtmlMessage, E = !!e.escapeParameter, O = _(e.messageCompiler) ? e.messageCompiler : jt || null, ee = _(e.messageResolver) ? e.messageResolver : Mt || Et, te = _(e.localeFallbacker) ? e.localeFallbacker : Nt || ht, ne = b(e.fallbackContext) ? e.fallbackContext : void 0;
1488
+ Pt++;
1489
+ let k = {
1490
+ version: n,
1491
+ cid: Pt,
1492
+ locale: r,
1493
+ fallbackLocale: a,
1494
+ messages: o,
1495
+ modifiers: u,
1496
+ pluralRules: f,
1497
+ missing: p,
1498
+ missingWarn: m,
1499
+ fallbackWarn: h,
1500
+ fallbackFormat: g,
1501
+ unresolving: x,
1502
+ postTranslation: S,
1503
+ processor: C,
1504
+ warnHtmlMessage: T,
1505
+ escapeParameter: E,
1506
+ messageCompiler: O,
1507
+ messageResolver: ee,
1508
+ localeFallbacker: te,
1509
+ fallbackContext: ne,
1510
+ onWarn: t
1511
+ };
1512
+ return k.datetimeFormats = s, k.numberFormats = c, k.__datetimeFormatters = /* @__PURE__ */ new Map(), k.__numberFormatters = /* @__PURE__ */ new Map(), k;
1513
+ }, e.createCoreError = q, e.createMessageContext = ln, e.datetime = function(e, ...t) {
1514
+ let { datetimeFormats: n, onWarn: r } = e, { __datetimeFormatters: i } = e;
1515
+ return !v(t[0]) && !o(t[0]) && !a(t[0]) ? `` : Gt(e, Xt(...t), Intl.DateTimeFormat, i, n, `datetime format`);
1516
+ }, e.fallbackWithLocaleChain = function(e, t, n) {
1517
+ let r = v(n) ? n : X, i = e, a;
1518
+ b(t) ? (i.__localeChainObjectCache || (i.__localeChainObjectCache = /* @__PURE__ */ new WeakMap()), a = i.__localeChainObjectCache.get(t), a || (a = /* @__PURE__ */ new Map(), i.__localeChainObjectCache.set(t, a))) : (i.__localeChainCache || (i.__localeChainCache = /* @__PURE__ */ new Map()), a = i.__localeChainCache.get(t), a || (a = /* @__PURE__ */ new Map(), i.__localeChainCache.set(t, a)));
1519
+ let o = a.get(r);
1520
+ if (o) return o;
1521
+ let s = [], c = [n];
1522
+ for (; g(c);) c = gt(s, c, t);
1523
+ let l = g(t) || !w(t) ? t : t.default ? t.default : null;
1524
+ return c = v(l) ? [l] : l, g(c) && gt(s, c, !1), a.set(r, s), s;
1525
+ }, e.fallbackWithSimple = ht, e.getLocale = ft, e.getLocaleMessage = function(e, t) {
1526
+ let n = m(e.messages, t);
1527
+ if (n == null) return;
1528
+ let r = d();
1529
+ return Ae(n, r), r;
1530
+ }, e.getWarnMessage = function(e, ...t) {
1531
+ return n(Dt[e], ...t);
1532
+ }, e.handleMissing = Rt, e.isAlmostSameLocale = Bt, e.isFallbackLocale = It, e.isImplicitFallback = Vt, e.isMessageAST = H, e.isMessageFormat = dn, e.isMessageFunction = $, e.isTranslateFallbackWarn = function(e, t) {
1533
+ return s(e) ? e.test(t) : e;
1534
+ }, e.isTranslateMissingWarn = function(e, t) {
1535
+ return s(e) ? e.test(t) : e;
1536
+ }, e.isWarnOption = Lt, e.number = function(e, ...t) {
1537
+ let { numberFormats: n, onWarn: r } = e, { __numberFormatters: i } = e;
1538
+ return a(t[0]) ? Gt(e, Qt(...t), Intl.NumberFormat, i, n, `number format`) : ``;
1539
+ }, e.parse = wt, e.parseDateTimeArgs = Xt, e.parseNumberArgs = Qt, e.parseTranslateArgs = _n, e.registerLocaleFallbacker = function(e) {
1540
+ Nt = e;
1541
+ }, e.registerMessageCompiler = function(e) {
1542
+ jt = e;
1543
+ }, e.registerMessageResolver = function(e) {
1544
+ Mt = e;
1545
+ }, e.resolveLocale = mt, e.resolveValue = function(e, t) {
1546
+ if (!b(e)) return null;
1547
+ let n = Tt.get(t);
1548
+ if (n || (n = wt(t), n && Tt.set(t, n)), !n) return null;
1549
+ let r = n.length, i = e, a = 0;
1550
+ for (; a < r;) {
1551
+ let e = n[a];
1552
+ if (at.includes(e) && H(i) || !b(i)) return null;
1553
+ let t = m(i, e);
1554
+ if (t === void 0 || _(i)) return null;
1555
+ i = t, a++;
1556
+ }
1557
+ return i;
1558
+ }, e.resolveWithKeyValue = Et, e.setLocaleMessage = function(e, t, n) {
1559
+ h(t) || (e.messages[t] = n);
1560
+ }, e.translate = function(e, ...t) {
1561
+ let [n, r] = _n(...t), i = ft(e, r), a = y(r.escapeParameter) ? r.escapeParameter : e.escapeParameter;
1562
+ a && fn(r);
1563
+ let o = !!r.resolvedMessage, [s, c, l] = o ? [
1564
+ n,
1565
+ i,
1566
+ m(e.messages, i) || d()
1567
+ ] : hn(e, n, i, e.fallbackLocale, y(r.fallbackWarn) ? r.fallbackWarn : e.fallbackWarn, y(r.missingWarn) ? r.missingWarn : e.missingWarn), u = n;
1568
+ if (!o && !dn(s)) {
1569
+ let t = v(r.default) ? r.default : y(r.default) || e.fallbackFormat ? e.messageCompiler ? n : () => n : null;
1570
+ (e.fallbackFormat || t != null && (v(t) || _(t))) && (s = t, u = s);
1571
+ }
1572
+ if (!o && (!dn(s) || !v(c))) return e.unresolving ? -1 : n;
1573
+ let f = !1, p = $(s) ? s : gn(e, n, c, s, u, () => {
1574
+ f = !0;
1575
+ });
1576
+ if (f) return s;
1577
+ let h = p(ln(yn(e, c, l, r, a))), g = e.postTranslation ? e.postTranslation(h, n) : h;
1578
+ return a && v(g) && (g = Oe(g)), g;
1579
+ }, e.updateFallbackLocale = function(e, t, n) {
1580
+ zt(e, n), e.fallbackContext && zt(e.fallbackContext, n);
1581
+ {
1582
+ let { __datetimeFormatters: t, __numberFormatters: n } = e;
1583
+ t.clear(), n.clear();
1584
+ }
1585
+ e.localeFallbacker(e, n, t);
1586
+ }, e;
1526
1587
  })({});