gt-react 10.19.15 β†’ 10.19.17

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.
Files changed (170) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/dist/browser.cjs +10914 -0
  3. package/dist/browser.cjs.map +1 -0
  4. package/dist/browser.d.cts +699 -0
  5. package/dist/browser.d.cts.map +1 -0
  6. package/dist/browser.d.mts +701 -0
  7. package/dist/browser.d.mts.map +1 -0
  8. package/dist/browser.mjs +10877 -0
  9. package/dist/browser.mjs.map +1 -0
  10. package/dist/client.cjs +3451 -0
  11. package/dist/client.cjs.map +1 -0
  12. package/dist/client.d.cts +248 -0
  13. package/dist/client.d.cts.map +1 -0
  14. package/dist/client.d.mts +249 -0
  15. package/dist/client.d.mts.map +1 -0
  16. package/dist/client.mjs +3392 -0
  17. package/dist/client.mjs.map +1 -0
  18. package/dist/index.cjs +3691 -0
  19. package/dist/index.cjs.map +1 -0
  20. package/dist/index.d.cts +377 -0
  21. package/dist/index.d.cts.map +1 -0
  22. package/dist/index.d.mts +376 -0
  23. package/dist/index.d.mts.map +1 -0
  24. package/dist/index.mjs +3636 -0
  25. package/dist/index.mjs.map +1 -0
  26. package/dist/internal.cjs +4046 -0
  27. package/dist/internal.cjs.map +1 -0
  28. package/dist/internal.d.cts +1118 -0
  29. package/dist/internal.d.cts.map +1 -0
  30. package/dist/internal.d.mts +1118 -0
  31. package/dist/internal.d.mts.map +1 -0
  32. package/dist/internal.mjs +3985 -0
  33. package/dist/internal.mjs.map +1 -0
  34. package/dist/macros.cjs +6206 -0
  35. package/dist/macros.cjs.map +1 -0
  36. package/dist/macros.d.cts +25 -0
  37. package/dist/macros.d.cts.map +1 -0
  38. package/dist/macros.d.mts +25 -0
  39. package/dist/macros.d.mts.map +1 -0
  40. package/dist/macros.mjs +6207 -0
  41. package/dist/macros.mjs.map +1 -0
  42. package/package.json +61 -41
  43. package/dist/browser-types.d.ts +0 -5
  44. package/dist/browser-types.d.ts.map +0 -1
  45. package/dist/browser.cjs.min.cjs +0 -2
  46. package/dist/browser.cjs.min.cjs.map +0 -1
  47. package/dist/browser.d.ts +0 -4
  48. package/dist/browser.d.ts.map +0 -1
  49. package/dist/browser.esm.min.mjs +0 -2
  50. package/dist/browser.esm.min.mjs.map +0 -1
  51. package/dist/client.cjs.min.cjs +0 -2
  52. package/dist/client.cjs.min.cjs.map +0 -1
  53. package/dist/client.d.ts +0 -6
  54. package/dist/client.d.ts.map +0 -1
  55. package/dist/client.esm.min.mjs +0 -2
  56. package/dist/client.esm.min.mjs.map +0 -1
  57. package/dist/i18n-context/browser-i18n-manager/BrowserConditionStore.d.ts +0 -32
  58. package/dist/i18n-context/browser-i18n-manager/BrowserConditionStore.d.ts.map +0 -1
  59. package/dist/i18n-context/browser-i18n-manager/BrowserI18nManager.d.ts +0 -42
  60. package/dist/i18n-context/browser-i18n-manager/BrowserI18nManager.d.ts.map +0 -1
  61. package/dist/i18n-context/browser-i18n-manager/LocalStorageTranslationCache.d.ts +0 -90
  62. package/dist/i18n-context/browser-i18n-manager/LocalStorageTranslationCache.d.ts.map +0 -1
  63. package/dist/i18n-context/browser-i18n-manager/singleton-operations.d.ts +0 -9
  64. package/dist/i18n-context/browser-i18n-manager/singleton-operations.d.ts.map +0 -1
  65. package/dist/i18n-context/browser-i18n-manager/utils/constants.d.ts +0 -3
  66. package/dist/i18n-context/browser-i18n-manager/utils/constants.d.ts.map +0 -1
  67. package/dist/i18n-context/browser-i18n-manager/utils/cookies.d.ts +0 -19
  68. package/dist/i18n-context/browser-i18n-manager/utils/cookies.d.ts.map +0 -1
  69. package/dist/i18n-context/browser-i18n-manager/utils/determineLocale.d.ts +0 -15
  70. package/dist/i18n-context/browser-i18n-manager/utils/determineLocale.d.ts.map +0 -1
  71. package/dist/i18n-context/browser-i18n-manager/utils/types.d.ts +0 -14
  72. package/dist/i18n-context/browser-i18n-manager/utils/types.d.ts.map +0 -1
  73. package/dist/i18n-context/functions/branching/GtInternalBranch.d.ts +0 -29
  74. package/dist/i18n-context/functions/branching/GtInternalBranch.d.ts.map +0 -1
  75. package/dist/i18n-context/functions/branching/GtInternalPlural.d.ts +0 -30
  76. package/dist/i18n-context/functions/branching/GtInternalPlural.d.ts.map +0 -1
  77. package/dist/i18n-context/functions/branching/index.d.ts +0 -3
  78. package/dist/i18n-context/functions/branching/index.d.ts.map +0 -1
  79. package/dist/i18n-context/functions/derivation/GtInternalDerive.d.ts +0 -31
  80. package/dist/i18n-context/functions/derivation/GtInternalDerive.d.ts.map +0 -1
  81. package/dist/i18n-context/functions/derivation/index.d.ts +0 -2
  82. package/dist/i18n-context/functions/derivation/index.d.ts.map +0 -1
  83. package/dist/i18n-context/functions/html-tag-operations.d.ts +0 -19
  84. package/dist/i18n-context/functions/html-tag-operations.d.ts.map +0 -1
  85. package/dist/i18n-context/functions/index.d.ts +0 -8
  86. package/dist/i18n-context/functions/index.d.ts.map +0 -1
  87. package/dist/i18n-context/functions/locale-operations.d.ts +0 -11
  88. package/dist/i18n-context/functions/locale-operations.d.ts.map +0 -1
  89. package/dist/i18n-context/functions/translation/GtInternalRuntimeTranslateJsx.d.ts +0 -11
  90. package/dist/i18n-context/functions/translation/GtInternalRuntimeTranslateJsx.d.ts.map +0 -1
  91. package/dist/i18n-context/functions/translation/GtInternalRuntimeTranslateString.d.ts +0 -11
  92. package/dist/i18n-context/functions/translation/GtInternalRuntimeTranslateString.d.ts.map +0 -1
  93. package/dist/i18n-context/functions/translation/GtInternalTranslateJsx.d.ts +0 -33
  94. package/dist/i18n-context/functions/translation/GtInternalTranslateJsx.d.ts.map +0 -1
  95. package/dist/i18n-context/functions/translation/index.d.ts +0 -5
  96. package/dist/i18n-context/functions/translation/index.d.ts.map +0 -1
  97. package/dist/i18n-context/functions/translation/t.d.ts +0 -25
  98. package/dist/i18n-context/functions/translation/t.d.ts.map +0 -1
  99. package/dist/i18n-context/functions/translation/types.d.ts +0 -21
  100. package/dist/i18n-context/functions/translation/types.d.ts.map +0 -1
  101. package/dist/i18n-context/functions/variables/GtInternalCurrency.d.ts +0 -28
  102. package/dist/i18n-context/functions/variables/GtInternalCurrency.d.ts.map +0 -1
  103. package/dist/i18n-context/functions/variables/GtInternalDateTime.d.ts +0 -26
  104. package/dist/i18n-context/functions/variables/GtInternalDateTime.d.ts.map +0 -1
  105. package/dist/i18n-context/functions/variables/GtInternalNum.d.ts +0 -26
  106. package/dist/i18n-context/functions/variables/GtInternalNum.d.ts.map +0 -1
  107. package/dist/i18n-context/functions/variables/GtInternalRelativeTime.d.ts +0 -35
  108. package/dist/i18n-context/functions/variables/GtInternalRelativeTime.d.ts.map +0 -1
  109. package/dist/i18n-context/functions/variables/GtInternalVar.d.ts +0 -23
  110. package/dist/i18n-context/functions/variables/GtInternalVar.d.ts.map +0 -1
  111. package/dist/i18n-context/functions/variables/index.d.ts +0 -6
  112. package/dist/i18n-context/functions/variables/index.d.ts.map +0 -1
  113. package/dist/i18n-context/functions/variables/utils/computeVar.d.ts +0 -9
  114. package/dist/i18n-context/functions/variables/utils/computeVar.d.ts.map +0 -1
  115. package/dist/i18n-context/functions/variables/utils/renderVariable.d.ts +0 -15
  116. package/dist/i18n-context/functions/variables/utils/renderVariable.d.ts.map +0 -1
  117. package/dist/i18n-context/setup/bootstrap.d.ts +0 -22
  118. package/dist/i18n-context/setup/bootstrap.d.ts.map +0 -1
  119. package/dist/i18n-context/setup/index.d.ts +0 -3
  120. package/dist/i18n-context/setup/index.d.ts.map +0 -1
  121. package/dist/i18n-context/setup/initializeGT.d.ts +0 -7
  122. package/dist/i18n-context/setup/initializeGT.d.ts.map +0 -1
  123. package/dist/i18n-context/setup/types.d.ts +0 -19
  124. package/dist/i18n-context/setup/types.d.ts.map +0 -1
  125. package/dist/i18n-context/ui/LocaleSelector.d.ts +0 -18
  126. package/dist/i18n-context/ui/LocaleSelector.d.ts.map +0 -1
  127. package/dist/i18n-context/utils/enforceBrowser.d.ts +0 -7
  128. package/dist/i18n-context/utils/enforceBrowser.d.ts.map +0 -1
  129. package/dist/index.cjs.min.cjs +0 -2
  130. package/dist/index.cjs.min.cjs.map +0 -1
  131. package/dist/index.d.ts +0 -8
  132. package/dist/index.d.ts.map +0 -1
  133. package/dist/index.esm.min.mjs +0 -2
  134. package/dist/index.esm.min.mjs.map +0 -1
  135. package/dist/internal.cjs.min.cjs +0 -2
  136. package/dist/internal.cjs.min.cjs.map +0 -1
  137. package/dist/internal.d.ts +0 -7
  138. package/dist/internal.d.ts.map +0 -1
  139. package/dist/internal.esm.min.mjs +0 -2
  140. package/dist/internal.esm.min.mjs.map +0 -1
  141. package/dist/macros.cjs.min.cjs +0 -2
  142. package/dist/macros.cjs.min.cjs.map +0 -1
  143. package/dist/macros.d.ts +0 -22
  144. package/dist/macros.d.ts.map +0 -1
  145. package/dist/macros.esm.min.mjs +0 -2
  146. package/dist/macros.esm.min.mjs.map +0 -1
  147. package/dist/react-context/provider/ClientProvider.d.ts +0 -4
  148. package/dist/react-context/provider/ClientProvider.d.ts.map +0 -1
  149. package/dist/react-context/provider/GTProvider.d.ts +0 -29
  150. package/dist/react-context/provider/GTProvider.d.ts.map +0 -1
  151. package/dist/react-context/provider/helpers/isSSREnabled.d.ts +0 -2
  152. package/dist/react-context/provider/helpers/isSSREnabled.d.ts.map +0 -1
  153. package/dist/react-context/provider/hooks/locales/useDetermineLocale.d.ts +0 -5
  154. package/dist/react-context/provider/hooks/locales/useDetermineLocale.d.ts.map +0 -1
  155. package/dist/react-context/provider/hooks/useEnableI18n.d.ts +0 -10
  156. package/dist/react-context/provider/hooks/useEnableI18n.d.ts.map +0 -1
  157. package/dist/react-context/provider/hooks/useRegionState.d.ts +0 -9
  158. package/dist/react-context/provider/hooks/useRegionState.d.ts.map +0 -1
  159. package/dist/react-context/types/config.d.ts +0 -67
  160. package/dist/react-context/types/config.d.ts.map +0 -1
  161. package/dist/react-context/ui/LocaleSelector.d.ts +0 -18
  162. package/dist/react-context/ui/LocaleSelector.d.ts.map +0 -1
  163. package/dist/react-context/ui/RegionSelector.d.ts +0 -38
  164. package/dist/react-context/ui/RegionSelector.d.ts.map +0 -1
  165. package/dist/react-context/utils/readAuthFromEnv.d.ts +0 -9
  166. package/dist/react-context/utils/readAuthFromEnv.d.ts.map +0 -1
  167. package/dist/shared/InternalLocaleSelector.d.ts +0 -26
  168. package/dist/shared/InternalLocaleSelector.d.ts.map +0 -1
  169. package/dist/shared/messages.d.ts +0 -11
  170. package/dist/shared/messages.d.ts.map +0 -1
@@ -0,0 +1,3392 @@
1
+ "use client";
2
+ import * as e from "react";
3
+ import { Suspense, useEffect, useMemo, useRef, useState } from "react";
4
+ import { determineLocale } from "@generaltranslation/format";
5
+ import { GT } from "generaltranslation";
6
+ import { jsx, jsxs } from "react/jsx-runtime";
7
+ import { Branch, Currency, DateTime, Derive, GTContext, GTProvider, Num, Plural, RelativeTime, Static, T, Var, declareStatic, declareVar, decodeMsg, decodeOptions, decodeVars, derive, gtFallback, mFallback, msg, useCreateInternalUseGTFunction, useCreateInternalUseTranslationsFunction, useCreateInternalUseTranslationsObjFunction, useDefaultLocale, useGT, useGTClass, useLocale, useLocaleDirection, useLocaleProperties, useLocaleSelector, useLocaleSelector as useLocaleSelector$1, useLocales, useMessages, useRegion, useRegionSelector, useRegionSelector as useRegionSelector$1, useRuntimeTranslation, useSetLocale, useTranslations, useVersionId } from "@generaltranslation/react-core";
8
+ //#region ../react-core/dist/internal.esm.min.mjs
9
+ var c = Object.defineProperty, l = Object.getOwnPropertyDescriptor, u = Object.getOwnPropertyNames, d = Object.prototype.hasOwnProperty, f = (e, t) => () => (e && (t = e(e = 0)), t), p = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), m = (e, t) => {
10
+ let n = {};
11
+ for (var r in e) c(n, r, {
12
+ get: e[r],
13
+ enumerable: !0
14
+ });
15
+ return t || c(n, Symbol.toStringTag, { value: `Module` }), n;
16
+ }, h = (e, t, n, r) => {
17
+ if (t && typeof t == `object` || typeof t == `function`) for (var i = u(t), a = 0, o = i.length, s; a < o; a++) s = i[a], !d.call(e, s) && s !== n && c(e, s, {
18
+ get: ((e) => t[e]).bind(null, s),
19
+ enumerable: !(r = l(t, s)) || r.enumerable
20
+ });
21
+ return e;
22
+ }, g = (e) => d.call(e, `module.exports`) ? e[`module.exports`] : h(c({}, `__esModule`, { value: !0 }), e);
23
+ function b(e) {
24
+ let t = e.trim();
25
+ return t ? /[.!?)]$/.test(t) ? t : `${t}.` : ``;
26
+ }
27
+ function x(e) {
28
+ let t = e.trim(), n = t.length;
29
+ for (; n > 0;) {
30
+ let e = t[n - 1];
31
+ if (e !== `.` && e !== `!` && e !== `?`) break;
32
+ --n;
33
+ }
34
+ return t.slice(0, n);
35
+ }
36
+ function te(e) {
37
+ return e.replace(/^[A-Z][a-z]/, (e) => e.toLowerCase());
38
+ }
39
+ function ne(e) {
40
+ if (!e) return ``;
41
+ let t = Array.isArray(e) ? e.join(`, `) : e;
42
+ return t.trim() ? b(`Details: ${t}`) : ``;
43
+ }
44
+ function S({ source: e, severity: t, whatHappened: n, reassurance: r, why: i, fix: a, wayOut: o, details: s, docsUrl: c }) {
45
+ let l = e ? t ? `${e} ${t}:` : `${e}:` : t ? `${t}:` : ``, u = i ? `${x(n)} because ${te(x(i))}` : n, d = !!a && !!o && /^[a-z]/.test(x(o)), f = [
46
+ u,
47
+ r,
48
+ d ? `${x(a)}, or ${te(x(o))}` : a,
49
+ d ? void 0 : o,
50
+ ne(s)
51
+ ].filter((e) => !!e).map(b);
52
+ c && f.push(`Learn more: ${c}`);
53
+ let p = f.join(` `);
54
+ return l ? `${l} ${p}` : p;
55
+ }
56
+ function ie(e) {
57
+ return e instanceof Uint8Array || ArrayBuffer.isView(e) && e.constructor.name === `Uint8Array` && `BYTES_PER_ELEMENT` in e && e.BYTES_PER_ELEMENT === 1;
58
+ }
59
+ function D(e, t, n = ``) {
60
+ let r = ie(e), i = e?.length, a = t !== void 0;
61
+ if (!r || a && i !== t) {
62
+ let o = n && `"${n}" `, s = a ? ` of length ${t}` : ``, c = r ? `length=${i}` : `type=${typeof e}`, l = o + `expected Uint8Array` + s + `, got ` + c;
63
+ throw r ? RangeError(l) : TypeError(l);
64
+ }
65
+ return e;
66
+ }
67
+ function ae(e, t = !0) {
68
+ if (e.destroyed) throw Error(`Hash instance has been destroyed`);
69
+ if (t && e.finished) throw Error(`Hash#digest() has already been called`);
70
+ }
71
+ function oe(e, t) {
72
+ D(e, void 0, `digestInto() output`);
73
+ let n = t.outputLen;
74
+ if (e.length < n) throw RangeError(`"digestInto() output" expected to be of length >=` + n);
75
+ }
76
+ function se(...e) {
77
+ for (let t = 0; t < e.length; t++) e[t].fill(0);
78
+ }
79
+ function ce(e) {
80
+ return new DataView(e.buffer, e.byteOffset, e.byteLength);
81
+ }
82
+ function O(e, t) {
83
+ return e << 32 - t | e >>> t;
84
+ }
85
+ new Uint8Array(new Uint32Array([287454020]).buffer)[0];
86
+ typeof Uint8Array.from([]).toHex == `function` && Uint8Array.fromHex;
87
+ Array.from({ length: 256 }, (e, t) => t.toString(16).padStart(2, `0`));
88
+ function pe(e, t = {}) {
89
+ let n = (t, n) => e(n).update(t).digest(), r = e(void 0);
90
+ return n.outputLen = r.outputLen, n.blockLen = r.blockLen, n.canXOF = r.canXOF, n.create = (t) => e(t), Object.assign(n, t), Object.freeze(n);
91
+ }
92
+ const me = (e) => ({ oid: Uint8Array.from([
93
+ 6,
94
+ 9,
95
+ 96,
96
+ 134,
97
+ 72,
98
+ 1,
99
+ 101,
100
+ 3,
101
+ 4,
102
+ 2,
103
+ e
104
+ ]) });
105
+ function he(e, t, n) {
106
+ return e & t ^ ~e & n;
107
+ }
108
+ function ge(e, t, n) {
109
+ return e & t ^ e & n ^ t & n;
110
+ }
111
+ var _e = class {
112
+ blockLen;
113
+ outputLen;
114
+ canXOF = !1;
115
+ padOffset;
116
+ isLE;
117
+ buffer;
118
+ view;
119
+ finished = !1;
120
+ length = 0;
121
+ pos = 0;
122
+ destroyed = !1;
123
+ constructor(e, t, n, r) {
124
+ this.blockLen = e, this.outputLen = t, this.padOffset = n, this.isLE = r, this.buffer = new Uint8Array(e), this.view = ce(this.buffer);
125
+ }
126
+ update(e) {
127
+ ae(this), D(e);
128
+ let { view: t, buffer: n, blockLen: r } = this, i = e.length;
129
+ for (let a = 0; a < i;) {
130
+ let o = Math.min(r - this.pos, i - a);
131
+ if (o === r) {
132
+ let t = ce(e);
133
+ for (; r <= i - a; a += r) this.process(t, a);
134
+ continue;
135
+ }
136
+ n.set(e.subarray(a, a + o), this.pos), this.pos += o, a += o, this.pos === r && (this.process(t, 0), this.pos = 0);
137
+ }
138
+ return this.length += e.length, this.roundClean(), this;
139
+ }
140
+ digestInto(e) {
141
+ ae(this), oe(e, this), this.finished = !0;
142
+ let { buffer: t, view: n, blockLen: r, isLE: i } = this, { pos: a } = this;
143
+ t[a++] = 128, se(this.buffer.subarray(a)), this.padOffset > r - a && (this.process(n, 0), a = 0);
144
+ for (let e = a; e < r; e++) t[e] = 0;
145
+ n.setBigUint64(r - 8, BigInt(this.length * 8), i), this.process(n, 0);
146
+ let o = ce(e), s = this.outputLen;
147
+ if (s % 4) throw Error(`_sha2: outputLen must be aligned to 32bit`);
148
+ let c = s / 4, l = this.get();
149
+ if (c > l.length) throw Error(`_sha2: outputLen bigger than state`);
150
+ for (let e = 0; e < c; e++) o.setUint32(4 * e, l[e], i);
151
+ }
152
+ digest() {
153
+ let { buffer: e, outputLen: t } = this;
154
+ this.digestInto(e);
155
+ let n = e.slice(0, t);
156
+ return this.destroy(), n;
157
+ }
158
+ _cloneInto(e) {
159
+ e ||= new this.constructor(), e.set(...this.get());
160
+ let { blockLen: t, buffer: n, length: r, finished: i, destroyed: a, pos: o } = this;
161
+ return e.destroyed = a, e.finished = i, e.length = r, e.pos = o, r % t && e.buffer.set(n), e;
162
+ }
163
+ clone() {
164
+ return this._cloneInto();
165
+ }
166
+ };
167
+ const k = Uint32Array.from([
168
+ 1779033703,
169
+ 3144134277,
170
+ 1013904242,
171
+ 2773480762,
172
+ 1359893119,
173
+ 2600822924,
174
+ 528734635,
175
+ 1541459225
176
+ ]), A = BigInt(2 ** 32 - 1), ve = BigInt(32);
177
+ function ye(e, t = !1) {
178
+ return t ? {
179
+ h: Number(e & A),
180
+ l: Number(e >> ve & A)
181
+ } : {
182
+ h: Number(e >> ve & A) | 0,
183
+ l: Number(e & A) | 0
184
+ };
185
+ }
186
+ function be(e, t = !1) {
187
+ let n = e.length, r = new Uint32Array(n), i = new Uint32Array(n);
188
+ for (let a = 0; a < n; a++) {
189
+ let { h: n, l: o } = ye(e[a], t);
190
+ [r[a], i[a]] = [n, o];
191
+ }
192
+ return [r, i];
193
+ }
194
+ const xe = Uint32Array.from([
195
+ 1116352408,
196
+ 1899447441,
197
+ 3049323471,
198
+ 3921009573,
199
+ 961987163,
200
+ 1508970993,
201
+ 2453635748,
202
+ 2870763221,
203
+ 3624381080,
204
+ 310598401,
205
+ 607225278,
206
+ 1426881987,
207
+ 1925078388,
208
+ 2162078206,
209
+ 2614888103,
210
+ 3248222580,
211
+ 3835390401,
212
+ 4022224774,
213
+ 264347078,
214
+ 604807628,
215
+ 770255983,
216
+ 1249150122,
217
+ 1555081692,
218
+ 1996064986,
219
+ 2554220882,
220
+ 2821834349,
221
+ 2952996808,
222
+ 3210313671,
223
+ 3336571891,
224
+ 3584528711,
225
+ 113926993,
226
+ 338241895,
227
+ 666307205,
228
+ 773529912,
229
+ 1294757372,
230
+ 1396182291,
231
+ 1695183700,
232
+ 1986661051,
233
+ 2177026350,
234
+ 2456956037,
235
+ 2730485921,
236
+ 2820302411,
237
+ 3259730800,
238
+ 3345764771,
239
+ 3516065817,
240
+ 3600352804,
241
+ 4094571909,
242
+ 275423344,
243
+ 430227734,
244
+ 506948616,
245
+ 659060556,
246
+ 883997877,
247
+ 958139571,
248
+ 1322822218,
249
+ 1537002063,
250
+ 1747873779,
251
+ 1955562222,
252
+ 2024104815,
253
+ 2227730452,
254
+ 2361852424,
255
+ 2428436474,
256
+ 2756734187,
257
+ 3204031479,
258
+ 3329325298
259
+ ]), j = new Uint32Array(64);
260
+ var Se = class extends _e {
261
+ constructor(e) {
262
+ super(64, e, 8, !1);
263
+ }
264
+ get() {
265
+ let { A: e, B: t, C: n, D: r, E: i, F: a, G: o, H: s } = this;
266
+ return [
267
+ e,
268
+ t,
269
+ n,
270
+ r,
271
+ i,
272
+ a,
273
+ o,
274
+ s
275
+ ];
276
+ }
277
+ set(e, t, n, r, i, a, o, s) {
278
+ this.A = e | 0, this.B = t | 0, this.C = n | 0, this.D = r | 0, this.E = i | 0, this.F = a | 0, this.G = o | 0, this.H = s | 0;
279
+ }
280
+ process(e, t) {
281
+ for (let n = 0; n < 16; n++, t += 4) j[n] = e.getUint32(t, !1);
282
+ for (let e = 16; e < 64; e++) {
283
+ let t = j[e - 15], n = j[e - 2], r = O(t, 7) ^ O(t, 18) ^ t >>> 3;
284
+ j[e] = (O(n, 17) ^ O(n, 19) ^ n >>> 10) + j[e - 7] + r + j[e - 16] | 0;
285
+ }
286
+ let { A: n, B: r, C: i, D: a, E: o, F: s, G: c, H: l } = this;
287
+ for (let e = 0; e < 64; e++) {
288
+ let t = O(o, 6) ^ O(o, 11) ^ O(o, 25), u = l + t + he(o, s, c) + xe[e] + j[e] | 0, d = (O(n, 2) ^ O(n, 13) ^ O(n, 22)) + ge(n, r, i) | 0;
289
+ l = c, c = s, s = o, o = a + u | 0, a = i, i = r, r = n, n = u + d | 0;
290
+ }
291
+ n = n + this.A | 0, r = r + this.B | 0, i = i + this.C | 0, a = a + this.D | 0, o = o + this.E | 0, s = s + this.F | 0, c = c + this.G | 0, l = l + this.H | 0, this.set(n, r, i, a, o, s, c, l);
292
+ }
293
+ roundClean() {
294
+ se(j);
295
+ }
296
+ destroy() {
297
+ this.destroyed = !0, this.set(0, 0, 0, 0, 0, 0, 0, 0), se(this.buffer);
298
+ }
299
+ }, Ce = class extends Se {
300
+ A = k[0] | 0;
301
+ B = k[1] | 0;
302
+ C = k[2] | 0;
303
+ D = k[3] | 0;
304
+ E = k[4] | 0;
305
+ F = k[5] | 0;
306
+ G = k[6] | 0;
307
+ H = k[7] | 0;
308
+ constructor() {
309
+ super(32);
310
+ }
311
+ };
312
+ const we = be(`0x428a2f98d728ae22.0x7137449123ef65cd.0xb5c0fbcfec4d3b2f.0xe9b5dba58189dbbc.0x3956c25bf348b538.0x59f111f1b605d019.0x923f82a4af194f9b.0xab1c5ed5da6d8118.0xd807aa98a3030242.0x12835b0145706fbe.0x243185be4ee4b28c.0x550c7dc3d5ffb4e2.0x72be5d74f27b896f.0x80deb1fe3b1696b1.0x9bdc06a725c71235.0xc19bf174cf692694.0xe49b69c19ef14ad2.0xefbe4786384f25e3.0x0fc19dc68b8cd5b5.0x240ca1cc77ac9c65.0x2de92c6f592b0275.0x4a7484aa6ea6e483.0x5cb0a9dcbd41fbd4.0x76f988da831153b5.0x983e5152ee66dfab.0xa831c66d2db43210.0xb00327c898fb213f.0xbf597fc7beef0ee4.0xc6e00bf33da88fc2.0xd5a79147930aa725.0x06ca6351e003826f.0x142929670a0e6e70.0x27b70a8546d22ffc.0x2e1b21385c26c926.0x4d2c6dfc5ac42aed.0x53380d139d95b3df.0x650a73548baf63de.0x766a0abb3c77b2a8.0x81c2c92e47edaee6.0x92722c851482353b.0xa2bfe8a14cf10364.0xa81a664bbc423001.0xc24b8b70d0f89791.0xc76c51a30654be30.0xd192e819d6ef5218.0xd69906245565a910.0xf40e35855771202a.0x106aa07032bbd1b8.0x19a4c116b8d2d0c8.0x1e376c085141ab53.0x2748774cdf8eeb99.0x34b0bcb5e19b48a8.0x391c0cb3c5c95a63.0x4ed8aa4ae3418acb.0x5b9cca4f7763e373.0x682e6ff3d6b2b8a3.0x748f82ee5defb2fc.0x78a5636f43172f60.0x84c87814a1f0ab72.0x8cc702081a6439ec.0x90befffa23631e28.0xa4506cebde82bde9.0xbef9a3f7b2c67915.0xc67178f2e372532b.0xca273eceea26619c.0xd186b8c721c0c207.0xeada7dd6cde0eb1e.0xf57d4f7fee6ed178.0x06f067aa72176fba.0x0a637dc5a2c898a6.0x113f9804bef90dae.0x1b710b35131c471b.0x28db77f523047d84.0x32caab7b40c72493.0x3c9ebe0a15c9bebc.0x431d67c49c100d4c.0x4cc5d4becb3e42b6.0x597f299cfc657e2a.0x5fcb6fab3ad6faec.0x6c44198c4a475817`.split(`.`).map((e) => BigInt(e)));
313
+ we[0], we[1];
314
+ pe(() => new Ce(), me(1));
315
+ const Ee = (e) => `generaltranslation Formatting Error: Invalid cutoff style: ${e}.`, De = `DEFAULT_TERMINATOR_KEY`, Oe = {
316
+ ellipsis: {
317
+ fr: {
318
+ terminator: `…`,
319
+ separator: `β€―`
320
+ },
321
+ zh: {
322
+ terminator: `……`,
323
+ separator: void 0
324
+ },
325
+ ja: {
326
+ terminator: `……`,
327
+ separator: void 0
328
+ },
329
+ [De]: {
330
+ terminator: `…`,
331
+ separator: void 0
332
+ }
333
+ },
334
+ none: { [De]: {
335
+ terminator: void 0,
336
+ separator: void 0
337
+ } }
338
+ };
339
+ var ke = class e {
340
+ static resolveLocale(e) {
341
+ try {
342
+ let t = e ? Array.isArray(e) ? e.map(String) : [String(e)] : [`en`], [n] = Intl.getCanonicalLocales(t);
343
+ return n ?? `en`;
344
+ } catch {
345
+ return `en`;
346
+ }
347
+ }
348
+ constructor(t, n = {}) {
349
+ this.locale = e.resolveLocale(t);
350
+ let r = n.style ?? `ellipsis`;
351
+ if (!Oe[r]) throw Error(Ee(r));
352
+ let i = n.maxChars === void 0 ? void 0 : Oe[r][new Intl.Locale(this.locale).language] || Oe[r].DEFAULT_TERMINATOR_KEY, a = n.terminator ?? i?.terminator, o = a == null ? void 0 : n.separator ?? i?.separator;
353
+ this.additionLength = (a?.length ?? 0) + (o?.length ?? 0), n.maxChars !== void 0 && Math.abs(n.maxChars) < this.additionLength && (a = void 0, o = void 0), this.options = {
354
+ maxChars: n.maxChars,
355
+ style: n.maxChars === void 0 ? void 0 : r,
356
+ terminator: a,
357
+ separator: o
358
+ };
359
+ }
360
+ format(e) {
361
+ return this.formatToParts(e).join(``);
362
+ }
363
+ formatToParts(e) {
364
+ let { maxChars: t, terminator: n, separator: r } = this.options, i = t === void 0 || Math.abs(t) >= e.length ? t : t >= 0 ? Math.max(0, t - this.additionLength) : Math.min(0, t + this.additionLength), a = i !== void 0 && i > -1 ? e.slice(0, i) : e.slice(i);
365
+ return t == null || i == null || i === 0 || n == null || e.length <= Math.abs(t) ? [a] : i > 0 ? r == null ? [a, n] : [
366
+ a,
367
+ r,
368
+ n
369
+ ] : r == null ? [n, a] : [
370
+ n,
371
+ r,
372
+ a
373
+ ];
374
+ }
375
+ resolvedOptions() {
376
+ return this.options;
377
+ }
378
+ };
379
+ const Ae = {
380
+ Collator: Intl.Collator,
381
+ DateTimeFormat: Intl.DateTimeFormat,
382
+ DisplayNames: Intl.DisplayNames,
383
+ ListFormat: Intl.ListFormat,
384
+ Locale: Intl.Locale,
385
+ NumberFormat: Intl.NumberFormat,
386
+ PluralRules: Intl.PluralRules,
387
+ RelativeTimeFormat: Intl.RelativeTimeFormat,
388
+ Segmenter: Intl.Segmenter,
389
+ CutoffFormat: ke
390
+ };
391
+ new class {
392
+ constructor() {
393
+ this.cache = {};
394
+ }
395
+ generateKey(e, t = {}) {
396
+ return `${e ? Array.isArray(e) ? e.map((e) => String(e)).join(`,`) : String(e) : `undefined`}:${t ? JSON.stringify(t, Object.keys(t).sort()) : `{}`}`;
397
+ }
398
+ get(e, ...t) {
399
+ let [n = `en`, r = {}] = t, i = this.generateKey(n, r), a = this.cache[e];
400
+ a === void 0 && (a = {}, this.cache[e] = a);
401
+ let o = a[i];
402
+ return o === void 0 && (o = new Ae[e](...t), a[i] = o), o;
403
+ }
404
+ }();
405
+ var M = m({
406
+ __addDisposableResource: () => it,
407
+ __assign: () => F,
408
+ __asyncDelegator: () => Xe,
409
+ __asyncGenerator: () => Ye,
410
+ __asyncValues: () => Ze,
411
+ __await: () => P,
412
+ __awaiter: () => He,
413
+ __classPrivateFieldGet: () => tt,
414
+ __classPrivateFieldIn: () => rt,
415
+ __classPrivateFieldSet: () => nt,
416
+ __createBinding: () => I,
417
+ __decorate: () => Fe,
418
+ __disposeResources: () => at,
419
+ __esDecorate: () => Le,
420
+ __exportStar: () => We,
421
+ __extends: () => Ne,
422
+ __generator: () => Ue,
423
+ __importDefault: () => et,
424
+ __importStar: () => $e,
425
+ __makeTemplateObject: () => Qe,
426
+ __metadata: () => Ve,
427
+ __param: () => Ie,
428
+ __propKey: () => ze,
429
+ __read: () => Ge,
430
+ __rest: () => Pe,
431
+ __rewriteRelativeImportExtension: () => ot,
432
+ __runInitializers: () => Re,
433
+ __setFunctionName: () => Be,
434
+ __spread: () => Ke,
435
+ __spreadArray: () => Je,
436
+ __spreadArrays: () => qe,
437
+ __values: () => N,
438
+ default: () => ut
439
+ });
440
+ function Ne(e, t) {
441
+ if (typeof t != `function` && t !== null) throw TypeError(`Class extends value ` + String(t) + ` is not a constructor or null`);
442
+ st(e, t);
443
+ function n() {
444
+ this.constructor = e;
445
+ }
446
+ e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n());
447
+ }
448
+ function Pe(e, t) {
449
+ var n = {};
450
+ for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
451
+ if (e != null && typeof Object.getOwnPropertySymbols == `function`) for (var i = 0, r = Object.getOwnPropertySymbols(e); i < r.length; i++) t.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[i]) && (n[r[i]] = e[r[i]]);
452
+ return n;
453
+ }
454
+ function Fe(e, t, n, r) {
455
+ var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
456
+ if (typeof Reflect == `object` && typeof Reflect.decorate == `function`) a = Reflect.decorate(e, t, n, r);
457
+ else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
458
+ return i > 3 && a && Object.defineProperty(t, n, a), a;
459
+ }
460
+ function Ie(e, t) {
461
+ return function(n, r) {
462
+ t(n, r, e);
463
+ };
464
+ }
465
+ function Le(e, t, n, r, i, a) {
466
+ function o(e) {
467
+ if (e !== void 0 && typeof e != `function`) throw TypeError(`Function expected`);
468
+ return e;
469
+ }
470
+ for (var s = r.kind, c = s === `getter` ? `get` : s === `setter` ? `set` : `value`, l = !t && e ? r.static ? e : e.prototype : null, u = t || (l ? Object.getOwnPropertyDescriptor(l, r.name) : {}), d, f = !1, p = n.length - 1; p >= 0; p--) {
471
+ var m = {};
472
+ for (var h in r) m[h] = h === `access` ? {} : r[h];
473
+ for (var h in r.access) m.access[h] = r.access[h];
474
+ m.addInitializer = function(e) {
475
+ if (f) throw TypeError(`Cannot add initializers after decoration has completed`);
476
+ a.push(o(e || null));
477
+ };
478
+ var g = (0, n[p])(s === `accessor` ? {
479
+ get: u.get,
480
+ set: u.set
481
+ } : u[c], m);
482
+ if (s === `accessor`) {
483
+ if (g === void 0) continue;
484
+ if (typeof g != `object` || !g) throw TypeError(`Object expected`);
485
+ (d = o(g.get)) && (u.get = d), (d = o(g.set)) && (u.set = d), (d = o(g.init)) && i.unshift(d);
486
+ } else (d = o(g)) && (s === `field` ? i.unshift(d) : u[c] = d);
487
+ }
488
+ l && Object.defineProperty(l, r.name, u), f = !0;
489
+ }
490
+ function Re(e, t, n) {
491
+ for (var r = arguments.length > 2, i = 0; i < t.length; i++) n = r ? t[i].call(e, n) : t[i].call(e);
492
+ return r ? n : void 0;
493
+ }
494
+ function ze(e) {
495
+ return typeof e == `symbol` ? e : `${e}`;
496
+ }
497
+ function Be(e, t, n) {
498
+ return typeof t == `symbol` && (t = t.description ? `[${t.description}]` : ``), Object.defineProperty(e, `name`, {
499
+ configurable: !0,
500
+ value: n ? `${n} ${t}` : t
501
+ });
502
+ }
503
+ function Ve(e, t) {
504
+ if (typeof Reflect == `object` && typeof Reflect.metadata == `function`) return Reflect.metadata(e, t);
505
+ }
506
+ function He(e, t, n, r) {
507
+ function i(e) {
508
+ return e instanceof n ? e : new n(function(t) {
509
+ t(e);
510
+ });
511
+ }
512
+ return new (n ||= Promise)(function(n, a) {
513
+ function o(e) {
514
+ try {
515
+ c(r.next(e));
516
+ } catch (e) {
517
+ a(e);
518
+ }
519
+ }
520
+ function s(e) {
521
+ try {
522
+ c(r.throw(e));
523
+ } catch (e) {
524
+ a(e);
525
+ }
526
+ }
527
+ function c(e) {
528
+ e.done ? n(e.value) : i(e.value).then(o, s);
529
+ }
530
+ c((r = r.apply(e, t || [])).next());
531
+ });
532
+ }
533
+ function Ue(e, t) {
534
+ var n = {
535
+ label: 0,
536
+ sent: function() {
537
+ if (a[0] & 1) throw a[1];
538
+ return a[1];
539
+ },
540
+ trys: [],
541
+ ops: []
542
+ }, r, i, a, o = Object.create((typeof Iterator == `function` ? Iterator : Object).prototype);
543
+ return o.next = s(0), o.throw = s(1), o.return = s(2), typeof Symbol == `function` && (o[Symbol.iterator] = function() {
544
+ return this;
545
+ }), o;
546
+ function s(e) {
547
+ return function(t) {
548
+ return c([e, t]);
549
+ };
550
+ }
551
+ function c(s) {
552
+ if (r) throw TypeError(`Generator is already executing.`);
553
+ for (; o && (o = 0, s[0] && (n = 0)), n;) try {
554
+ if (r = 1, i && (a = s[0] & 2 ? i.return : s[0] ? i.throw || ((a = i.return) && a.call(i), 0) : i.next) && !(a = a.call(i, s[1])).done) return a;
555
+ switch (i = 0, a && (s = [s[0] & 2, a.value]), s[0]) {
556
+ case 0:
557
+ case 1:
558
+ a = s;
559
+ break;
560
+ case 4: return n.label++, {
561
+ value: s[1],
562
+ done: !1
563
+ };
564
+ case 5:
565
+ n.label++, i = s[1], s = [0];
566
+ continue;
567
+ case 7:
568
+ s = n.ops.pop(), n.trys.pop();
569
+ continue;
570
+ default:
571
+ if ((a = n.trys, !(a = a.length > 0 && a[a.length - 1])) && (s[0] === 6 || s[0] === 2)) {
572
+ n = 0;
573
+ continue;
574
+ }
575
+ if (s[0] === 3 && (!a || s[1] > a[0] && s[1] < a[3])) {
576
+ n.label = s[1];
577
+ break;
578
+ }
579
+ if (s[0] === 6 && n.label < a[1]) {
580
+ n.label = a[1], a = s;
581
+ break;
582
+ }
583
+ if (a && n.label < a[2]) {
584
+ n.label = a[2], n.ops.push(s);
585
+ break;
586
+ }
587
+ a[2] && n.ops.pop(), n.trys.pop();
588
+ continue;
589
+ }
590
+ s = t.call(e, n);
591
+ } catch (e) {
592
+ s = [6, e], i = 0;
593
+ } finally {
594
+ r = a = 0;
595
+ }
596
+ if (s[0] & 5) throw s[1];
597
+ return {
598
+ value: s[0] ? s[1] : void 0,
599
+ done: !0
600
+ };
601
+ }
602
+ }
603
+ function We(e, t) {
604
+ for (var n in e) n !== `default` && !Object.prototype.hasOwnProperty.call(t, n) && I(t, e, n);
605
+ }
606
+ function N(e) {
607
+ var t = typeof Symbol == `function` && Symbol.iterator, n = t && e[t], r = 0;
608
+ if (n) return n.call(e);
609
+ if (e && typeof e.length == `number`) return { next: function() {
610
+ return e && r >= e.length && (e = void 0), {
611
+ value: e && e[r++],
612
+ done: !e
613
+ };
614
+ } };
615
+ throw TypeError(t ? `Object is not iterable.` : `Symbol.iterator is not defined.`);
616
+ }
617
+ function Ge(e, t) {
618
+ var n = typeof Symbol == `function` && e[Symbol.iterator];
619
+ if (!n) return e;
620
+ var r = n.call(e), i, a = [], o;
621
+ try {
622
+ for (; (t === void 0 || t-- > 0) && !(i = r.next()).done;) a.push(i.value);
623
+ } catch (e) {
624
+ o = { error: e };
625
+ } finally {
626
+ try {
627
+ i && !i.done && (n = r.return) && n.call(r);
628
+ } finally {
629
+ if (o) throw o.error;
630
+ }
631
+ }
632
+ return a;
633
+ }
634
+ function Ke() {
635
+ for (var e = [], t = 0; t < arguments.length; t++) e = e.concat(Ge(arguments[t]));
636
+ return e;
637
+ }
638
+ function qe() {
639
+ for (var e = 0, t = 0, n = arguments.length; t < n; t++) e += arguments[t].length;
640
+ for (var r = Array(e), i = 0, t = 0; t < n; t++) for (var a = arguments[t], o = 0, s = a.length; o < s; o++, i++) r[i] = a[o];
641
+ return r;
642
+ }
643
+ function Je(e, t, n) {
644
+ if (n || arguments.length === 2) for (var r = 0, i = t.length, a; r < i; r++) (a || !(r in t)) && (a ||= Array.prototype.slice.call(t, 0, r), a[r] = t[r]);
645
+ return e.concat(a || Array.prototype.slice.call(t));
646
+ }
647
+ function P(e) {
648
+ return this instanceof P ? (this.v = e, this) : new P(e);
649
+ }
650
+ function Ye(e, t, n) {
651
+ if (!Symbol.asyncIterator) throw TypeError(`Symbol.asyncIterator is not defined.`);
652
+ var r = n.apply(e, t || []), i, a = [];
653
+ return i = Object.create((typeof AsyncIterator == `function` ? AsyncIterator : Object).prototype), s(`next`), s(`throw`), s(`return`, o), i[Symbol.asyncIterator] = function() {
654
+ return this;
655
+ }, i;
656
+ function o(e) {
657
+ return function(t) {
658
+ return Promise.resolve(t).then(e, d);
659
+ };
660
+ }
661
+ function s(e, t) {
662
+ r[e] && (i[e] = function(t) {
663
+ return new Promise(function(n, r) {
664
+ a.push([
665
+ e,
666
+ t,
667
+ n,
668
+ r
669
+ ]) > 1 || c(e, t);
670
+ });
671
+ }, t && (i[e] = t(i[e])));
672
+ }
673
+ function c(e, t) {
674
+ try {
675
+ l(r[e](t));
676
+ } catch (e) {
677
+ f(a[0][3], e);
678
+ }
679
+ }
680
+ function l(e) {
681
+ e.value instanceof P ? Promise.resolve(e.value.v).then(u, d) : f(a[0][2], e);
682
+ }
683
+ function u(e) {
684
+ c(`next`, e);
685
+ }
686
+ function d(e) {
687
+ c(`throw`, e);
688
+ }
689
+ function f(e, t) {
690
+ e(t), a.shift(), a.length && c(a[0][0], a[0][1]);
691
+ }
692
+ }
693
+ function Xe(e) {
694
+ var t, n;
695
+ return t = {}, r(`next`), r(`throw`, function(e) {
696
+ throw e;
697
+ }), r(`return`), t[Symbol.iterator] = function() {
698
+ return this;
699
+ }, t;
700
+ function r(r, i) {
701
+ t[r] = e[r] ? function(t) {
702
+ return (n = !n) ? {
703
+ value: P(e[r](t)),
704
+ done: !1
705
+ } : i ? i(t) : t;
706
+ } : i;
707
+ }
708
+ }
709
+ function Ze(e) {
710
+ if (!Symbol.asyncIterator) throw TypeError(`Symbol.asyncIterator is not defined.`);
711
+ var t = e[Symbol.asyncIterator], n;
712
+ return t ? t.call(e) : (e = typeof N == `function` ? N(e) : e[Symbol.iterator](), n = {}, r(`next`), r(`throw`), r(`return`), n[Symbol.asyncIterator] = function() {
713
+ return this;
714
+ }, n);
715
+ function r(t) {
716
+ n[t] = e[t] && function(n) {
717
+ return new Promise(function(r, a) {
718
+ n = e[t](n), i(r, a, n.done, n.value);
719
+ });
720
+ };
721
+ }
722
+ function i(e, t, n, r) {
723
+ Promise.resolve(r).then(function(t) {
724
+ e({
725
+ value: t,
726
+ done: n
727
+ });
728
+ }, t);
729
+ }
730
+ }
731
+ function Qe(e, t) {
732
+ return Object.defineProperty ? Object.defineProperty(e, `raw`, { value: t }) : e.raw = t, e;
733
+ }
734
+ function $e(e) {
735
+ if (e && e.__esModule) return e;
736
+ var t = {};
737
+ if (e != null) for (var n = L(e), r = 0; r < n.length; r++) n[r] !== `default` && I(t, e, n[r]);
738
+ return ct(t, e), t;
739
+ }
740
+ function et(e) {
741
+ return e && e.__esModule ? e : { default: e };
742
+ }
743
+ function tt(e, t, n, r) {
744
+ if (n === `a` && !r) throw TypeError(`Private accessor was defined without a getter`);
745
+ if (typeof t == `function` ? e !== t || !r : !t.has(e)) throw TypeError(`Cannot read private member from an object whose class did not declare it`);
746
+ return n === `m` ? r : n === `a` ? r.call(e) : r ? r.value : t.get(e);
747
+ }
748
+ function nt(e, t, n, r, i) {
749
+ if (r === `m`) throw TypeError(`Private method is not writable`);
750
+ if (r === `a` && !i) throw TypeError(`Private accessor was defined without a setter`);
751
+ if (typeof t == `function` ? e !== t || !i : !t.has(e)) throw TypeError(`Cannot write private member to an object whose class did not declare it`);
752
+ return r === `a` ? i.call(e, n) : i ? i.value = n : t.set(e, n), n;
753
+ }
754
+ function rt(e, t) {
755
+ if (t === null || typeof t != `object` && typeof t != `function`) throw TypeError(`Cannot use 'in' operator on non-object`);
756
+ return typeof e == `function` ? t === e : e.has(t);
757
+ }
758
+ function it(e, t, n) {
759
+ if (t != null) {
760
+ if (typeof t != `object` && typeof t != `function`) throw TypeError(`Object expected.`);
761
+ var r, i;
762
+ if (n) {
763
+ if (!Symbol.asyncDispose) throw TypeError(`Symbol.asyncDispose is not defined.`);
764
+ r = t[Symbol.asyncDispose];
765
+ }
766
+ if (r === void 0) {
767
+ if (!Symbol.dispose) throw TypeError(`Symbol.dispose is not defined.`);
768
+ r = t[Symbol.dispose], n && (i = r);
769
+ }
770
+ if (typeof r != `function`) throw TypeError(`Object not disposable.`);
771
+ i && (r = function() {
772
+ try {
773
+ i.call(this);
774
+ } catch (e) {
775
+ return Promise.reject(e);
776
+ }
777
+ }), e.stack.push({
778
+ value: t,
779
+ dispose: r,
780
+ async: n
781
+ });
782
+ } else n && e.stack.push({ async: !0 });
783
+ return t;
784
+ }
785
+ function at(e) {
786
+ function t(t) {
787
+ e.error = e.hasError ? new lt(t, e.error, `An error was suppressed during disposal.`) : t, e.hasError = !0;
788
+ }
789
+ var n, r = 0;
790
+ function i() {
791
+ for (; n = e.stack.pop();) try {
792
+ if (!n.async && r === 1) return r = 0, e.stack.push(n), Promise.resolve().then(i);
793
+ if (n.dispose) {
794
+ var a = n.dispose.call(n.value);
795
+ if (n.async) return r |= 2, Promise.resolve(a).then(i, function(e) {
796
+ return t(e), i();
797
+ });
798
+ } else r |= 1;
799
+ } catch (e) {
800
+ t(e);
801
+ }
802
+ if (r === 1) return e.hasError ? Promise.reject(e.error) : Promise.resolve();
803
+ if (e.hasError) throw e.error;
804
+ }
805
+ return i();
806
+ }
807
+ function ot(e, t) {
808
+ return typeof e == `string` && /^\.\.?\//.test(e) ? e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(e, n, r, i, a) {
809
+ return n ? t ? `.jsx` : `.js` : r && (!i || !a) ? e : r + i + `.` + a.toLowerCase() + `js`;
810
+ }) : e;
811
+ }
812
+ var st, F, I, ct, L, lt, ut, R = f((() => {
813
+ st = function(e, t) {
814
+ return st = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, t) {
815
+ e.__proto__ = t;
816
+ } || function(e, t) {
817
+ for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]);
818
+ }, st(e, t);
819
+ }, F = function() {
820
+ return F = Object.assign || function(e) {
821
+ for (var t, n = 1, r = arguments.length; n < r; n++) for (var i in t = arguments[n], t) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
822
+ return e;
823
+ }, F.apply(this, arguments);
824
+ }, I = Object.create ? (function(e, t, n, r) {
825
+ r === void 0 && (r = n);
826
+ var i = Object.getOwnPropertyDescriptor(t, n);
827
+ (!i || (`get` in i ? !t.__esModule : i.writable || i.configurable)) && (i = {
828
+ enumerable: !0,
829
+ get: function() {
830
+ return t[n];
831
+ }
832
+ }), Object.defineProperty(e, r, i);
833
+ }) : (function(e, t, n, r) {
834
+ r === void 0 && (r = n), e[r] = t[n];
835
+ }), ct = Object.create ? (function(e, t) {
836
+ Object.defineProperty(e, `default`, {
837
+ enumerable: !0,
838
+ value: t
839
+ });
840
+ }) : function(e, t) {
841
+ e.default = t;
842
+ }, L = function(e) {
843
+ return L = Object.getOwnPropertyNames || function(e) {
844
+ var t = [];
845
+ for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[t.length] = n);
846
+ return t;
847
+ }, L(e);
848
+ }, lt = typeof SuppressedError == `function` ? SuppressedError : function(e, t, n) {
849
+ var r = Error(n);
850
+ return r.name = `SuppressedError`, r.error = e, r.suppressed = t, r;
851
+ }, ut = {
852
+ __extends: Ne,
853
+ __assign: F,
854
+ __rest: Pe,
855
+ __decorate: Fe,
856
+ __param: Ie,
857
+ __esDecorate: Le,
858
+ __runInitializers: Re,
859
+ __propKey: ze,
860
+ __setFunctionName: Be,
861
+ __metadata: Ve,
862
+ __awaiter: He,
863
+ __generator: Ue,
864
+ __createBinding: I,
865
+ __exportStar: We,
866
+ __values: N,
867
+ __read: Ge,
868
+ __spread: Ke,
869
+ __spreadArrays: qe,
870
+ __spreadArray: Je,
871
+ __await: P,
872
+ __asyncGenerator: Ye,
873
+ __asyncDelegator: Xe,
874
+ __asyncValues: Ze,
875
+ __makeTemplateObject: Qe,
876
+ __importStar: $e,
877
+ __importDefault: et,
878
+ __classPrivateFieldGet: tt,
879
+ __classPrivateFieldSet: nt,
880
+ __classPrivateFieldIn: rt,
881
+ __addDisposableResource: it,
882
+ __disposeResources: at,
883
+ __rewriteRelativeImportExtension: ot
884
+ };
885
+ })), dt = p(((e) => {
886
+ Object.defineProperty(e, `__esModule`, { value: !0 }), e.ErrorKind = void 0;
887
+ var t;
888
+ (function(e) {
889
+ e[e.EXPECT_ARGUMENT_CLOSING_BRACE = 1] = `EXPECT_ARGUMENT_CLOSING_BRACE`, e[e.EMPTY_ARGUMENT = 2] = `EMPTY_ARGUMENT`, e[e.MALFORMED_ARGUMENT = 3] = `MALFORMED_ARGUMENT`, e[e.EXPECT_ARGUMENT_TYPE = 4] = `EXPECT_ARGUMENT_TYPE`, e[e.INVALID_ARGUMENT_TYPE = 5] = `INVALID_ARGUMENT_TYPE`, e[e.EXPECT_ARGUMENT_STYLE = 6] = `EXPECT_ARGUMENT_STYLE`, e[e.INVALID_NUMBER_SKELETON = 7] = `INVALID_NUMBER_SKELETON`, e[e.INVALID_DATE_TIME_SKELETON = 8] = `INVALID_DATE_TIME_SKELETON`, e[e.EXPECT_NUMBER_SKELETON = 9] = `EXPECT_NUMBER_SKELETON`, e[e.EXPECT_DATE_TIME_SKELETON = 10] = `EXPECT_DATE_TIME_SKELETON`, e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE = 11] = `UNCLOSED_QUOTE_IN_ARGUMENT_STYLE`, e[e.EXPECT_SELECT_ARGUMENT_OPTIONS = 12] = `EXPECT_SELECT_ARGUMENT_OPTIONS`, e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE = 13] = `EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE`, e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE = 14] = `INVALID_PLURAL_ARGUMENT_OFFSET_VALUE`, e[e.EXPECT_SELECT_ARGUMENT_SELECTOR = 15] = `EXPECT_SELECT_ARGUMENT_SELECTOR`, e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR = 16] = `EXPECT_PLURAL_ARGUMENT_SELECTOR`, e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT = 17] = `EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT`, e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT = 18] = `EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT`, e[e.INVALID_PLURAL_ARGUMENT_SELECTOR = 19] = `INVALID_PLURAL_ARGUMENT_SELECTOR`, e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR = 20] = `DUPLICATE_PLURAL_ARGUMENT_SELECTOR`, e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR = 21] = `DUPLICATE_SELECT_ARGUMENT_SELECTOR`, e[e.MISSING_OTHER_CLAUSE = 22] = `MISSING_OTHER_CLAUSE`, e[e.INVALID_TAG = 23] = `INVALID_TAG`, e[e.INVALID_TAG_NAME = 25] = `INVALID_TAG_NAME`, e[e.UNMATCHED_CLOSING_TAG = 26] = `UNMATCHED_CLOSING_TAG`, e[e.UNCLOSED_TAG = 27] = `UNCLOSED_TAG`;
890
+ })(t || (e.ErrorKind = t = {}));
891
+ })), z = p(((e) => {
892
+ Object.defineProperty(e, `__esModule`, { value: !0 }), e.SKELETON_TYPE = e.TYPE = void 0, e.isLiteralElement = r, e.isArgumentElement = i, e.isNumberElement = a, e.isDateElement = o, e.isTimeElement = s, e.isSelectElement = c, e.isPluralElement = l, e.isPoundElement = u, e.isTagElement = d, e.isNumberSkeleton = f, e.isDateTimeSkeleton = p, e.createLiteralElement = m, e.createNumberElement = h;
893
+ var t;
894
+ (function(e) {
895
+ e[e.literal = 0] = `literal`, e[e.argument = 1] = `argument`, e[e.number = 2] = `number`, e[e.date = 3] = `date`, e[e.time = 4] = `time`, e[e.select = 5] = `select`, e[e.plural = 6] = `plural`, e[e.pound = 7] = `pound`, e[e.tag = 8] = `tag`;
896
+ })(t || (e.TYPE = t = {}));
897
+ var n;
898
+ (function(e) {
899
+ e[e.number = 0] = `number`, e[e.dateTime = 1] = `dateTime`;
900
+ })(n || (e.SKELETON_TYPE = n = {}));
901
+ function r(e) {
902
+ return e.type === t.literal;
903
+ }
904
+ function i(e) {
905
+ return e.type === t.argument;
906
+ }
907
+ function a(e) {
908
+ return e.type === t.number;
909
+ }
910
+ function o(e) {
911
+ return e.type === t.date;
912
+ }
913
+ function s(e) {
914
+ return e.type === t.time;
915
+ }
916
+ function c(e) {
917
+ return e.type === t.select;
918
+ }
919
+ function l(e) {
920
+ return e.type === t.plural;
921
+ }
922
+ function u(e) {
923
+ return e.type === t.pound;
924
+ }
925
+ function d(e) {
926
+ return e.type === t.tag;
927
+ }
928
+ function f(e) {
929
+ return !!(e && typeof e == `object` && e.type === n.number);
930
+ }
931
+ function p(e) {
932
+ return !!(e && typeof e == `object` && e.type === n.dateTime);
933
+ }
934
+ function m(e) {
935
+ return {
936
+ type: t.literal,
937
+ value: e
938
+ };
939
+ }
940
+ function h(e, n) {
941
+ return {
942
+ type: t.number,
943
+ value: e,
944
+ style: n
945
+ };
946
+ }
947
+ })), ft = p(((e) => {
948
+ Object.defineProperty(e, `__esModule`, { value: !0 }), e.WHITE_SPACE_REGEX = e.SPACE_SEPARATOR_REGEX = void 0, e.SPACE_SEPARATOR_REGEX = /[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/, e.WHITE_SPACE_REGEX = /[\t-\r \x85\u200E\u200F\u2028\u2029]/;
949
+ })), pt = p(((e) => {
950
+ Object.defineProperty(e, `__esModule`, { value: !0 }), e.parseDateTimeSkeleton = n;
951
+ var t = /(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;
952
+ function n(e) {
953
+ var n = {};
954
+ return e.replace(t, function(e) {
955
+ var t = e.length;
956
+ switch (e[0]) {
957
+ case `G`:
958
+ n.era = t === 4 ? `long` : t === 5 ? `narrow` : `short`;
959
+ break;
960
+ case `y`:
961
+ n.year = t === 2 ? `2-digit` : `numeric`;
962
+ break;
963
+ case `Y`:
964
+ case `u`:
965
+ case `U`:
966
+ case `r`: throw RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");
967
+ case `q`:
968
+ case `Q`: throw RangeError("`q/Q` (quarter) patterns are not supported");
969
+ case `M`:
970
+ case `L`:
971
+ n.month = [
972
+ `numeric`,
973
+ `2-digit`,
974
+ `short`,
975
+ `long`,
976
+ `narrow`
977
+ ][t - 1];
978
+ break;
979
+ case `w`:
980
+ case `W`: throw RangeError("`w/W` (week) patterns are not supported");
981
+ case `d`:
982
+ n.day = [`numeric`, `2-digit`][t - 1];
983
+ break;
984
+ case `D`:
985
+ case `F`:
986
+ case `g`: throw RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");
987
+ case `E`:
988
+ n.weekday = t === 4 ? `long` : t === 5 ? `narrow` : `short`;
989
+ break;
990
+ case `e`:
991
+ if (t < 4) throw RangeError("`e..eee` (weekday) patterns are not supported");
992
+ n.weekday = [
993
+ `short`,
994
+ `long`,
995
+ `narrow`,
996
+ `short`
997
+ ][t - 4];
998
+ break;
999
+ case `c`:
1000
+ if (t < 4) throw RangeError("`c..ccc` (weekday) patterns are not supported");
1001
+ n.weekday = [
1002
+ `short`,
1003
+ `long`,
1004
+ `narrow`,
1005
+ `short`
1006
+ ][t - 4];
1007
+ break;
1008
+ case `a`:
1009
+ n.hour12 = !0;
1010
+ break;
1011
+ case `b`:
1012
+ case `B`: throw RangeError("`b/B` (period) patterns are not supported, use `a` instead");
1013
+ case `h`:
1014
+ n.hourCycle = `h12`, n.hour = [`numeric`, `2-digit`][t - 1];
1015
+ break;
1016
+ case `H`:
1017
+ n.hourCycle = `h23`, n.hour = [`numeric`, `2-digit`][t - 1];
1018
+ break;
1019
+ case `K`:
1020
+ n.hourCycle = `h11`, n.hour = [`numeric`, `2-digit`][t - 1];
1021
+ break;
1022
+ case `k`:
1023
+ n.hourCycle = `h24`, n.hour = [`numeric`, `2-digit`][t - 1];
1024
+ break;
1025
+ case `j`:
1026
+ case `J`:
1027
+ case `C`: throw RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");
1028
+ case `m`:
1029
+ n.minute = [`numeric`, `2-digit`][t - 1];
1030
+ break;
1031
+ case `s`:
1032
+ n.second = [`numeric`, `2-digit`][t - 1];
1033
+ break;
1034
+ case `S`:
1035
+ case `A`: throw RangeError("`S/A` (second) patterns are not supported, use `s` instead");
1036
+ case `z`:
1037
+ n.timeZoneName = t < 4 ? `short` : `long`;
1038
+ break;
1039
+ case `Z`:
1040
+ case `O`:
1041
+ case `v`:
1042
+ case `V`:
1043
+ case `X`:
1044
+ case `x`: throw RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead");
1045
+ }
1046
+ return ``;
1047
+ }), n;
1048
+ }
1049
+ })), mt = p(((e) => {
1050
+ Object.defineProperty(e, `__esModule`, { value: !0 }), e.WHITE_SPACE_REGEX = void 0, e.WHITE_SPACE_REGEX = /[\t-\r \x85\u200E\u200F\u2028\u2029]/i;
1051
+ })), ht = p(((e) => {
1052
+ Object.defineProperty(e, `__esModule`, { value: !0 }), e.parseNumberSkeletonFromString = r, e.parseNumberSkeleton = p;
1053
+ var t = (R(), g(M)), n = mt();
1054
+ function r(e) {
1055
+ if (e.length === 0) throw Error(`Number skeleton cannot be empty`);
1056
+ for (var t = e.split(n.WHITE_SPACE_REGEX).filter(function(e) {
1057
+ return e.length > 0;
1058
+ }), r = [], i = 0, a = t; i < a.length; i++) {
1059
+ var o = a[i].split(`/`);
1060
+ if (o.length === 0) throw Error(`Invalid number skeleton`);
1061
+ for (var s = o[0], c = o.slice(1), l = 0, u = c; l < u.length; l++) if (u[l].length === 0) throw Error(`Invalid number skeleton`);
1062
+ r.push({
1063
+ stem: s,
1064
+ options: c
1065
+ });
1066
+ }
1067
+ return r;
1068
+ }
1069
+ function i(e) {
1070
+ return e.replace(/^(.*?)-/, ``);
1071
+ }
1072
+ var a = /^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g, o = /^(@+)?(\+|#+)?[rs]?$/g, s = /(\*)(0+)|(#+)(0+)|(0+)/g, c = /^(0+)$/;
1073
+ function l(e) {
1074
+ var t = {};
1075
+ return e[e.length - 1] === `r` ? t.roundingPriority = `morePrecision` : e[e.length - 1] === `s` && (t.roundingPriority = `lessPrecision`), e.replace(o, function(e, n, r) {
1076
+ return typeof r == `string` ? r === `+` ? t.minimumSignificantDigits = n.length : n[0] === `#` ? t.maximumSignificantDigits = n.length : (t.minimumSignificantDigits = n.length, t.maximumSignificantDigits = n.length + (typeof r == `string` ? r.length : 0)) : (t.minimumSignificantDigits = n.length, t.maximumSignificantDigits = n.length), ``;
1077
+ }), t;
1078
+ }
1079
+ function u(e) {
1080
+ switch (e) {
1081
+ case `sign-auto`: return { signDisplay: `auto` };
1082
+ case `sign-accounting`:
1083
+ case `()`: return { currencySign: `accounting` };
1084
+ case `sign-always`:
1085
+ case `+!`: return { signDisplay: `always` };
1086
+ case `sign-accounting-always`:
1087
+ case `()!`: return {
1088
+ signDisplay: `always`,
1089
+ currencySign: `accounting`
1090
+ };
1091
+ case `sign-except-zero`:
1092
+ case `+?`: return { signDisplay: `exceptZero` };
1093
+ case `sign-accounting-except-zero`:
1094
+ case `()?`: return {
1095
+ signDisplay: `exceptZero`,
1096
+ currencySign: `accounting`
1097
+ };
1098
+ case `sign-never`:
1099
+ case `+_`: return { signDisplay: `never` };
1100
+ }
1101
+ }
1102
+ function d(e) {
1103
+ var t;
1104
+ if (e[0] === `E` && e[1] === `E` ? (t = { notation: `engineering` }, e = e.slice(2)) : e[0] === `E` && (t = { notation: `scientific` }, e = e.slice(1)), t) {
1105
+ var n = e.slice(0, 2);
1106
+ if (n === `+!` ? (t.signDisplay = `always`, e = e.slice(2)) : n === `+?` && (t.signDisplay = `exceptZero`, e = e.slice(2)), !c.test(e)) throw Error(`Malformed concise eng/scientific notation`);
1107
+ t.minimumIntegerDigits = e.length;
1108
+ }
1109
+ return t;
1110
+ }
1111
+ function f(e) {
1112
+ return u(e) || {};
1113
+ }
1114
+ function p(e) {
1115
+ for (var n = {}, r = 0, p = e; r < p.length; r++) {
1116
+ var m = p[r];
1117
+ switch (m.stem) {
1118
+ case `percent`:
1119
+ case `%`:
1120
+ n.style = `percent`;
1121
+ continue;
1122
+ case `%x100`:
1123
+ n.style = `percent`, n.scale = 100;
1124
+ continue;
1125
+ case `currency`:
1126
+ n.style = `currency`, n.currency = m.options[0];
1127
+ continue;
1128
+ case `group-off`:
1129
+ case `,_`:
1130
+ n.useGrouping = !1;
1131
+ continue;
1132
+ case `precision-integer`:
1133
+ case `.`:
1134
+ n.maximumFractionDigits = 0;
1135
+ continue;
1136
+ case `measure-unit`:
1137
+ case `unit`:
1138
+ n.style = `unit`, n.unit = i(m.options[0]);
1139
+ continue;
1140
+ case `compact-short`:
1141
+ case `K`:
1142
+ n.notation = `compact`, n.compactDisplay = `short`;
1143
+ continue;
1144
+ case `compact-long`:
1145
+ case `KK`:
1146
+ n.notation = `compact`, n.compactDisplay = `long`;
1147
+ continue;
1148
+ case `scientific`:
1149
+ n = t.__assign(t.__assign(t.__assign({}, n), { notation: `scientific` }), m.options.reduce(function(e, n) {
1150
+ return t.__assign(t.__assign({}, e), f(n));
1151
+ }, {}));
1152
+ continue;
1153
+ case `engineering`:
1154
+ n = t.__assign(t.__assign(t.__assign({}, n), { notation: `engineering` }), m.options.reduce(function(e, n) {
1155
+ return t.__assign(t.__assign({}, e), f(n));
1156
+ }, {}));
1157
+ continue;
1158
+ case `notation-simple`:
1159
+ n.notation = `standard`;
1160
+ continue;
1161
+ case `unit-width-narrow`:
1162
+ n.currencyDisplay = `narrowSymbol`, n.unitDisplay = `narrow`;
1163
+ continue;
1164
+ case `unit-width-short`:
1165
+ n.currencyDisplay = `code`, n.unitDisplay = `short`;
1166
+ continue;
1167
+ case `unit-width-full-name`:
1168
+ n.currencyDisplay = `name`, n.unitDisplay = `long`;
1169
+ continue;
1170
+ case `unit-width-iso-code`:
1171
+ n.currencyDisplay = `symbol`;
1172
+ continue;
1173
+ case `scale`:
1174
+ n.scale = parseFloat(m.options[0]);
1175
+ continue;
1176
+ case `rounding-mode-floor`:
1177
+ n.roundingMode = `floor`;
1178
+ continue;
1179
+ case `rounding-mode-ceiling`:
1180
+ n.roundingMode = `ceil`;
1181
+ continue;
1182
+ case `rounding-mode-down`:
1183
+ n.roundingMode = `trunc`;
1184
+ continue;
1185
+ case `rounding-mode-up`:
1186
+ n.roundingMode = `expand`;
1187
+ continue;
1188
+ case `rounding-mode-half-even`:
1189
+ n.roundingMode = `halfEven`;
1190
+ continue;
1191
+ case `rounding-mode-half-down`:
1192
+ n.roundingMode = `halfTrunc`;
1193
+ continue;
1194
+ case `rounding-mode-half-up`:
1195
+ n.roundingMode = `halfExpand`;
1196
+ continue;
1197
+ case `integer-width`:
1198
+ if (m.options.length > 1) throw RangeError(`integer-width stems only accept a single optional option`);
1199
+ m.options[0].replace(s, function(e, t, r, i, a, o) {
1200
+ if (t) n.minimumIntegerDigits = r.length;
1201
+ else if (i && a) throw Error(`We currently do not support maximum integer digits`);
1202
+ else if (o) throw Error(`We currently do not support exact integer digits`);
1203
+ return ``;
1204
+ });
1205
+ continue;
1206
+ }
1207
+ if (c.test(m.stem)) {
1208
+ n.minimumIntegerDigits = m.stem.length;
1209
+ continue;
1210
+ }
1211
+ if (a.test(m.stem)) {
1212
+ if (m.options.length > 1) throw RangeError(`Fraction-precision stems only accept a single optional option`);
1213
+ m.stem.replace(a, function(e, t, r, i, a, o) {
1214
+ return r === `*` ? n.minimumFractionDigits = t.length : i && i[0] === `#` ? n.maximumFractionDigits = i.length : a && o ? (n.minimumFractionDigits = a.length, n.maximumFractionDigits = a.length + o.length) : (n.minimumFractionDigits = t.length, n.maximumFractionDigits = t.length), ``;
1215
+ });
1216
+ var h = m.options[0];
1217
+ h === `w` ? n = t.__assign(t.__assign({}, n), { trailingZeroDisplay: `stripIfInteger` }) : h && (n = t.__assign(t.__assign({}, n), l(h)));
1218
+ continue;
1219
+ }
1220
+ if (o.test(m.stem)) {
1221
+ n = t.__assign(t.__assign({}, n), l(m.stem));
1222
+ continue;
1223
+ }
1224
+ var g = u(m.stem);
1225
+ g && (n = t.__assign(t.__assign({}, n), g));
1226
+ var _ = d(m.stem);
1227
+ _ && (n = t.__assign(t.__assign({}, n), _));
1228
+ }
1229
+ return n;
1230
+ }
1231
+ })), gt = p(((e) => {
1232
+ Object.defineProperty(e, `__esModule`, { value: !0 });
1233
+ var t = (R(), g(M));
1234
+ t.__exportStar(pt(), e), t.__exportStar(ht(), e);
1235
+ })), _t = p(((e) => {
1236
+ Object.defineProperty(e, `__esModule`, { value: !0 }), e.timeData = void 0, e.timeData = {
1237
+ "001": [`H`, `h`],
1238
+ 419: [
1239
+ `h`,
1240
+ `H`,
1241
+ `hB`,
1242
+ `hb`
1243
+ ],
1244
+ AC: [
1245
+ `H`,
1246
+ `h`,
1247
+ `hb`,
1248
+ `hB`
1249
+ ],
1250
+ AD: [`H`, `hB`],
1251
+ AE: [
1252
+ `h`,
1253
+ `hB`,
1254
+ `hb`,
1255
+ `H`
1256
+ ],
1257
+ AF: [
1258
+ `H`,
1259
+ `hb`,
1260
+ `hB`,
1261
+ `h`
1262
+ ],
1263
+ AG: [
1264
+ `h`,
1265
+ `hb`,
1266
+ `H`,
1267
+ `hB`
1268
+ ],
1269
+ AI: [
1270
+ `H`,
1271
+ `h`,
1272
+ `hb`,
1273
+ `hB`
1274
+ ],
1275
+ AL: [
1276
+ `h`,
1277
+ `H`,
1278
+ `hB`
1279
+ ],
1280
+ AM: [`H`, `hB`],
1281
+ AO: [`H`, `hB`],
1282
+ AR: [
1283
+ `h`,
1284
+ `H`,
1285
+ `hB`,
1286
+ `hb`
1287
+ ],
1288
+ AS: [`h`, `H`],
1289
+ AT: [`H`, `hB`],
1290
+ AU: [
1291
+ `h`,
1292
+ `hb`,
1293
+ `H`,
1294
+ `hB`
1295
+ ],
1296
+ AW: [`H`, `hB`],
1297
+ AX: [`H`],
1298
+ AZ: [
1299
+ `H`,
1300
+ `hB`,
1301
+ `h`
1302
+ ],
1303
+ BA: [
1304
+ `H`,
1305
+ `hB`,
1306
+ `h`
1307
+ ],
1308
+ BB: [
1309
+ `h`,
1310
+ `hb`,
1311
+ `H`,
1312
+ `hB`
1313
+ ],
1314
+ BD: [
1315
+ `h`,
1316
+ `hB`,
1317
+ `H`
1318
+ ],
1319
+ BE: [`H`, `hB`],
1320
+ BF: [`H`, `hB`],
1321
+ BG: [
1322
+ `H`,
1323
+ `hB`,
1324
+ `h`
1325
+ ],
1326
+ BH: [
1327
+ `h`,
1328
+ `hB`,
1329
+ `hb`,
1330
+ `H`
1331
+ ],
1332
+ BI: [`H`, `h`],
1333
+ BJ: [`H`, `hB`],
1334
+ BL: [`H`, `hB`],
1335
+ BM: [
1336
+ `h`,
1337
+ `hb`,
1338
+ `H`,
1339
+ `hB`
1340
+ ],
1341
+ BN: [
1342
+ `hb`,
1343
+ `hB`,
1344
+ `h`,
1345
+ `H`
1346
+ ],
1347
+ BO: [
1348
+ `h`,
1349
+ `H`,
1350
+ `hB`,
1351
+ `hb`
1352
+ ],
1353
+ BQ: [`H`],
1354
+ BR: [`H`, `hB`],
1355
+ BS: [
1356
+ `h`,
1357
+ `hb`,
1358
+ `H`,
1359
+ `hB`
1360
+ ],
1361
+ BT: [`h`, `H`],
1362
+ BW: [
1363
+ `H`,
1364
+ `h`,
1365
+ `hb`,
1366
+ `hB`
1367
+ ],
1368
+ BY: [`H`, `h`],
1369
+ BZ: [
1370
+ `H`,
1371
+ `h`,
1372
+ `hb`,
1373
+ `hB`
1374
+ ],
1375
+ CA: [
1376
+ `h`,
1377
+ `hb`,
1378
+ `H`,
1379
+ `hB`
1380
+ ],
1381
+ CC: [
1382
+ `H`,
1383
+ `h`,
1384
+ `hb`,
1385
+ `hB`
1386
+ ],
1387
+ CD: [`hB`, `H`],
1388
+ CF: [
1389
+ `H`,
1390
+ `h`,
1391
+ `hB`
1392
+ ],
1393
+ CG: [`H`, `hB`],
1394
+ CH: [
1395
+ `H`,
1396
+ `hB`,
1397
+ `h`
1398
+ ],
1399
+ CI: [`H`, `hB`],
1400
+ CK: [
1401
+ `H`,
1402
+ `h`,
1403
+ `hb`,
1404
+ `hB`
1405
+ ],
1406
+ CL: [
1407
+ `h`,
1408
+ `H`,
1409
+ `hB`,
1410
+ `hb`
1411
+ ],
1412
+ CM: [
1413
+ `H`,
1414
+ `h`,
1415
+ `hB`
1416
+ ],
1417
+ CN: [
1418
+ `H`,
1419
+ `hB`,
1420
+ `hb`,
1421
+ `h`
1422
+ ],
1423
+ CO: [
1424
+ `h`,
1425
+ `H`,
1426
+ `hB`,
1427
+ `hb`
1428
+ ],
1429
+ CP: [`H`],
1430
+ CR: [
1431
+ `h`,
1432
+ `H`,
1433
+ `hB`,
1434
+ `hb`
1435
+ ],
1436
+ CU: [
1437
+ `h`,
1438
+ `H`,
1439
+ `hB`,
1440
+ `hb`
1441
+ ],
1442
+ CV: [`H`, `hB`],
1443
+ CW: [`H`, `hB`],
1444
+ CX: [
1445
+ `H`,
1446
+ `h`,
1447
+ `hb`,
1448
+ `hB`
1449
+ ],
1450
+ CY: [
1451
+ `h`,
1452
+ `H`,
1453
+ `hb`,
1454
+ `hB`
1455
+ ],
1456
+ CZ: [`H`],
1457
+ DE: [`H`, `hB`],
1458
+ DG: [
1459
+ `H`,
1460
+ `h`,
1461
+ `hb`,
1462
+ `hB`
1463
+ ],
1464
+ DJ: [`h`, `H`],
1465
+ DK: [`H`],
1466
+ DM: [
1467
+ `h`,
1468
+ `hb`,
1469
+ `H`,
1470
+ `hB`
1471
+ ],
1472
+ DO: [
1473
+ `h`,
1474
+ `H`,
1475
+ `hB`,
1476
+ `hb`
1477
+ ],
1478
+ DZ: [
1479
+ `h`,
1480
+ `hB`,
1481
+ `hb`,
1482
+ `H`
1483
+ ],
1484
+ EA: [
1485
+ `H`,
1486
+ `h`,
1487
+ `hB`,
1488
+ `hb`
1489
+ ],
1490
+ EC: [
1491
+ `h`,
1492
+ `H`,
1493
+ `hB`,
1494
+ `hb`
1495
+ ],
1496
+ EE: [`H`, `hB`],
1497
+ EG: [
1498
+ `h`,
1499
+ `hB`,
1500
+ `hb`,
1501
+ `H`
1502
+ ],
1503
+ EH: [
1504
+ `h`,
1505
+ `hB`,
1506
+ `hb`,
1507
+ `H`
1508
+ ],
1509
+ ER: [`h`, `H`],
1510
+ ES: [
1511
+ `H`,
1512
+ `hB`,
1513
+ `h`,
1514
+ `hb`
1515
+ ],
1516
+ ET: [
1517
+ `hB`,
1518
+ `hb`,
1519
+ `h`,
1520
+ `H`
1521
+ ],
1522
+ FI: [`H`],
1523
+ FJ: [
1524
+ `h`,
1525
+ `hb`,
1526
+ `H`,
1527
+ `hB`
1528
+ ],
1529
+ FK: [
1530
+ `H`,
1531
+ `h`,
1532
+ `hb`,
1533
+ `hB`
1534
+ ],
1535
+ FM: [
1536
+ `h`,
1537
+ `hb`,
1538
+ `H`,
1539
+ `hB`
1540
+ ],
1541
+ FO: [`H`, `h`],
1542
+ FR: [`H`, `hB`],
1543
+ GA: [`H`, `hB`],
1544
+ GB: [
1545
+ `H`,
1546
+ `h`,
1547
+ `hb`,
1548
+ `hB`
1549
+ ],
1550
+ GD: [
1551
+ `h`,
1552
+ `hb`,
1553
+ `H`,
1554
+ `hB`
1555
+ ],
1556
+ GE: [
1557
+ `H`,
1558
+ `hB`,
1559
+ `h`
1560
+ ],
1561
+ GF: [`H`, `hB`],
1562
+ GG: [
1563
+ `H`,
1564
+ `h`,
1565
+ `hb`,
1566
+ `hB`
1567
+ ],
1568
+ GH: [`h`, `H`],
1569
+ GI: [
1570
+ `H`,
1571
+ `h`,
1572
+ `hb`,
1573
+ `hB`
1574
+ ],
1575
+ GL: [`H`, `h`],
1576
+ GM: [
1577
+ `h`,
1578
+ `hb`,
1579
+ `H`,
1580
+ `hB`
1581
+ ],
1582
+ GN: [`H`, `hB`],
1583
+ GP: [`H`, `hB`],
1584
+ GQ: [
1585
+ `H`,
1586
+ `hB`,
1587
+ `h`,
1588
+ `hb`
1589
+ ],
1590
+ GR: [
1591
+ `h`,
1592
+ `H`,
1593
+ `hb`,
1594
+ `hB`
1595
+ ],
1596
+ GT: [
1597
+ `h`,
1598
+ `H`,
1599
+ `hB`,
1600
+ `hb`
1601
+ ],
1602
+ GU: [
1603
+ `h`,
1604
+ `hb`,
1605
+ `H`,
1606
+ `hB`
1607
+ ],
1608
+ GW: [`H`, `hB`],
1609
+ GY: [
1610
+ `h`,
1611
+ `hb`,
1612
+ `H`,
1613
+ `hB`
1614
+ ],
1615
+ HK: [
1616
+ `h`,
1617
+ `hB`,
1618
+ `hb`,
1619
+ `H`
1620
+ ],
1621
+ HN: [
1622
+ `h`,
1623
+ `H`,
1624
+ `hB`,
1625
+ `hb`
1626
+ ],
1627
+ HR: [`H`, `hB`],
1628
+ HU: [`H`, `h`],
1629
+ IC: [
1630
+ `H`,
1631
+ `h`,
1632
+ `hB`,
1633
+ `hb`
1634
+ ],
1635
+ ID: [`H`],
1636
+ IE: [
1637
+ `H`,
1638
+ `h`,
1639
+ `hb`,
1640
+ `hB`
1641
+ ],
1642
+ IL: [`H`, `hB`],
1643
+ IM: [
1644
+ `H`,
1645
+ `h`,
1646
+ `hb`,
1647
+ `hB`
1648
+ ],
1649
+ IN: [`h`, `H`],
1650
+ IO: [
1651
+ `H`,
1652
+ `h`,
1653
+ `hb`,
1654
+ `hB`
1655
+ ],
1656
+ IQ: [
1657
+ `h`,
1658
+ `hB`,
1659
+ `hb`,
1660
+ `H`
1661
+ ],
1662
+ IR: [`hB`, `H`],
1663
+ IS: [`H`],
1664
+ IT: [`H`, `hB`],
1665
+ JE: [
1666
+ `H`,
1667
+ `h`,
1668
+ `hb`,
1669
+ `hB`
1670
+ ],
1671
+ JM: [
1672
+ `h`,
1673
+ `hb`,
1674
+ `H`,
1675
+ `hB`
1676
+ ],
1677
+ JO: [
1678
+ `h`,
1679
+ `hB`,
1680
+ `hb`,
1681
+ `H`
1682
+ ],
1683
+ JP: [
1684
+ `H`,
1685
+ `K`,
1686
+ `h`
1687
+ ],
1688
+ KE: [
1689
+ `hB`,
1690
+ `hb`,
1691
+ `H`,
1692
+ `h`
1693
+ ],
1694
+ KG: [
1695
+ `H`,
1696
+ `h`,
1697
+ `hB`,
1698
+ `hb`
1699
+ ],
1700
+ KH: [
1701
+ `hB`,
1702
+ `h`,
1703
+ `H`,
1704
+ `hb`
1705
+ ],
1706
+ KI: [
1707
+ `h`,
1708
+ `hb`,
1709
+ `H`,
1710
+ `hB`
1711
+ ],
1712
+ KM: [
1713
+ `H`,
1714
+ `h`,
1715
+ `hB`,
1716
+ `hb`
1717
+ ],
1718
+ KN: [
1719
+ `h`,
1720
+ `hb`,
1721
+ `H`,
1722
+ `hB`
1723
+ ],
1724
+ KP: [
1725
+ `h`,
1726
+ `H`,
1727
+ `hB`,
1728
+ `hb`
1729
+ ],
1730
+ KR: [
1731
+ `h`,
1732
+ `H`,
1733
+ `hB`,
1734
+ `hb`
1735
+ ],
1736
+ KW: [
1737
+ `h`,
1738
+ `hB`,
1739
+ `hb`,
1740
+ `H`
1741
+ ],
1742
+ KY: [
1743
+ `h`,
1744
+ `hb`,
1745
+ `H`,
1746
+ `hB`
1747
+ ],
1748
+ KZ: [`H`, `hB`],
1749
+ LA: [
1750
+ `H`,
1751
+ `hb`,
1752
+ `hB`,
1753
+ `h`
1754
+ ],
1755
+ LB: [
1756
+ `h`,
1757
+ `hB`,
1758
+ `hb`,
1759
+ `H`
1760
+ ],
1761
+ LC: [
1762
+ `h`,
1763
+ `hb`,
1764
+ `H`,
1765
+ `hB`
1766
+ ],
1767
+ LI: [
1768
+ `H`,
1769
+ `hB`,
1770
+ `h`
1771
+ ],
1772
+ LK: [
1773
+ `H`,
1774
+ `h`,
1775
+ `hB`,
1776
+ `hb`
1777
+ ],
1778
+ LR: [
1779
+ `h`,
1780
+ `hb`,
1781
+ `H`,
1782
+ `hB`
1783
+ ],
1784
+ LS: [`h`, `H`],
1785
+ LT: [
1786
+ `H`,
1787
+ `h`,
1788
+ `hb`,
1789
+ `hB`
1790
+ ],
1791
+ LU: [
1792
+ `H`,
1793
+ `h`,
1794
+ `hB`
1795
+ ],
1796
+ LV: [
1797
+ `H`,
1798
+ `hB`,
1799
+ `hb`,
1800
+ `h`
1801
+ ],
1802
+ LY: [
1803
+ `h`,
1804
+ `hB`,
1805
+ `hb`,
1806
+ `H`
1807
+ ],
1808
+ MA: [
1809
+ `H`,
1810
+ `h`,
1811
+ `hB`,
1812
+ `hb`
1813
+ ],
1814
+ MC: [`H`, `hB`],
1815
+ MD: [`H`, `hB`],
1816
+ ME: [
1817
+ `H`,
1818
+ `hB`,
1819
+ `h`
1820
+ ],
1821
+ MF: [`H`, `hB`],
1822
+ MG: [`H`, `h`],
1823
+ MH: [
1824
+ `h`,
1825
+ `hb`,
1826
+ `H`,
1827
+ `hB`
1828
+ ],
1829
+ MK: [
1830
+ `H`,
1831
+ `h`,
1832
+ `hb`,
1833
+ `hB`
1834
+ ],
1835
+ ML: [`H`],
1836
+ MM: [
1837
+ `hB`,
1838
+ `hb`,
1839
+ `H`,
1840
+ `h`
1841
+ ],
1842
+ MN: [
1843
+ `H`,
1844
+ `h`,
1845
+ `hb`,
1846
+ `hB`
1847
+ ],
1848
+ MO: [
1849
+ `h`,
1850
+ `hB`,
1851
+ `hb`,
1852
+ `H`
1853
+ ],
1854
+ MP: [
1855
+ `h`,
1856
+ `hb`,
1857
+ `H`,
1858
+ `hB`
1859
+ ],
1860
+ MQ: [`H`, `hB`],
1861
+ MR: [
1862
+ `h`,
1863
+ `hB`,
1864
+ `hb`,
1865
+ `H`
1866
+ ],
1867
+ MS: [
1868
+ `H`,
1869
+ `h`,
1870
+ `hb`,
1871
+ `hB`
1872
+ ],
1873
+ MT: [`H`, `h`],
1874
+ MU: [`H`, `h`],
1875
+ MV: [`H`, `h`],
1876
+ MW: [
1877
+ `h`,
1878
+ `hb`,
1879
+ `H`,
1880
+ `hB`
1881
+ ],
1882
+ MX: [
1883
+ `h`,
1884
+ `H`,
1885
+ `hB`,
1886
+ `hb`
1887
+ ],
1888
+ MY: [
1889
+ `hb`,
1890
+ `hB`,
1891
+ `h`,
1892
+ `H`
1893
+ ],
1894
+ MZ: [`H`, `hB`],
1895
+ NA: [
1896
+ `h`,
1897
+ `H`,
1898
+ `hB`,
1899
+ `hb`
1900
+ ],
1901
+ NC: [`H`, `hB`],
1902
+ NE: [`H`],
1903
+ NF: [
1904
+ `H`,
1905
+ `h`,
1906
+ `hb`,
1907
+ `hB`
1908
+ ],
1909
+ NG: [
1910
+ `H`,
1911
+ `h`,
1912
+ `hb`,
1913
+ `hB`
1914
+ ],
1915
+ NI: [
1916
+ `h`,
1917
+ `H`,
1918
+ `hB`,
1919
+ `hb`
1920
+ ],
1921
+ NL: [`H`, `hB`],
1922
+ NO: [`H`, `h`],
1923
+ NP: [
1924
+ `H`,
1925
+ `h`,
1926
+ `hB`
1927
+ ],
1928
+ NR: [
1929
+ `H`,
1930
+ `h`,
1931
+ `hb`,
1932
+ `hB`
1933
+ ],
1934
+ NU: [
1935
+ `H`,
1936
+ `h`,
1937
+ `hb`,
1938
+ `hB`
1939
+ ],
1940
+ NZ: [
1941
+ `h`,
1942
+ `hb`,
1943
+ `H`,
1944
+ `hB`
1945
+ ],
1946
+ OM: [
1947
+ `h`,
1948
+ `hB`,
1949
+ `hb`,
1950
+ `H`
1951
+ ],
1952
+ PA: [
1953
+ `h`,
1954
+ `H`,
1955
+ `hB`,
1956
+ `hb`
1957
+ ],
1958
+ PE: [
1959
+ `h`,
1960
+ `H`,
1961
+ `hB`,
1962
+ `hb`
1963
+ ],
1964
+ PF: [
1965
+ `H`,
1966
+ `h`,
1967
+ `hB`
1968
+ ],
1969
+ PG: [`h`, `H`],
1970
+ PH: [
1971
+ `h`,
1972
+ `hB`,
1973
+ `hb`,
1974
+ `H`
1975
+ ],
1976
+ PK: [
1977
+ `h`,
1978
+ `hB`,
1979
+ `H`
1980
+ ],
1981
+ PL: [`H`, `h`],
1982
+ PM: [`H`, `hB`],
1983
+ PN: [
1984
+ `H`,
1985
+ `h`,
1986
+ `hb`,
1987
+ `hB`
1988
+ ],
1989
+ PR: [
1990
+ `h`,
1991
+ `H`,
1992
+ `hB`,
1993
+ `hb`
1994
+ ],
1995
+ PS: [
1996
+ `h`,
1997
+ `hB`,
1998
+ `hb`,
1999
+ `H`
2000
+ ],
2001
+ PT: [`H`, `hB`],
2002
+ PW: [`h`, `H`],
2003
+ PY: [
2004
+ `h`,
2005
+ `H`,
2006
+ `hB`,
2007
+ `hb`
2008
+ ],
2009
+ QA: [
2010
+ `h`,
2011
+ `hB`,
2012
+ `hb`,
2013
+ `H`
2014
+ ],
2015
+ RE: [`H`, `hB`],
2016
+ RO: [`H`, `hB`],
2017
+ RS: [
2018
+ `H`,
2019
+ `hB`,
2020
+ `h`
2021
+ ],
2022
+ RU: [`H`],
2023
+ RW: [`H`, `h`],
2024
+ SA: [
2025
+ `h`,
2026
+ `hB`,
2027
+ `hb`,
2028
+ `H`
2029
+ ],
2030
+ SB: [
2031
+ `h`,
2032
+ `hb`,
2033
+ `H`,
2034
+ `hB`
2035
+ ],
2036
+ SC: [
2037
+ `H`,
2038
+ `h`,
2039
+ `hB`
2040
+ ],
2041
+ SD: [
2042
+ `h`,
2043
+ `hB`,
2044
+ `hb`,
2045
+ `H`
2046
+ ],
2047
+ SE: [`H`],
2048
+ SG: [
2049
+ `h`,
2050
+ `hb`,
2051
+ `H`,
2052
+ `hB`
2053
+ ],
2054
+ SH: [
2055
+ `H`,
2056
+ `h`,
2057
+ `hb`,
2058
+ `hB`
2059
+ ],
2060
+ SI: [`H`, `hB`],
2061
+ SJ: [`H`],
2062
+ SK: [`H`],
2063
+ SL: [
2064
+ `h`,
2065
+ `hb`,
2066
+ `H`,
2067
+ `hB`
2068
+ ],
2069
+ SM: [
2070
+ `H`,
2071
+ `h`,
2072
+ `hB`
2073
+ ],
2074
+ SN: [
2075
+ `H`,
2076
+ `h`,
2077
+ `hB`
2078
+ ],
2079
+ SO: [`h`, `H`],
2080
+ SR: [`H`, `hB`],
2081
+ SS: [
2082
+ `h`,
2083
+ `hb`,
2084
+ `H`,
2085
+ `hB`
2086
+ ],
2087
+ ST: [`H`, `hB`],
2088
+ SV: [
2089
+ `h`,
2090
+ `H`,
2091
+ `hB`,
2092
+ `hb`
2093
+ ],
2094
+ SX: [
2095
+ `H`,
2096
+ `h`,
2097
+ `hb`,
2098
+ `hB`
2099
+ ],
2100
+ SY: [
2101
+ `h`,
2102
+ `hB`,
2103
+ `hb`,
2104
+ `H`
2105
+ ],
2106
+ SZ: [
2107
+ `h`,
2108
+ `hb`,
2109
+ `H`,
2110
+ `hB`
2111
+ ],
2112
+ TA: [
2113
+ `H`,
2114
+ `h`,
2115
+ `hb`,
2116
+ `hB`
2117
+ ],
2118
+ TC: [
2119
+ `h`,
2120
+ `hb`,
2121
+ `H`,
2122
+ `hB`
2123
+ ],
2124
+ TD: [
2125
+ `h`,
2126
+ `H`,
2127
+ `hB`
2128
+ ],
2129
+ TF: [
2130
+ `H`,
2131
+ `h`,
2132
+ `hB`
2133
+ ],
2134
+ TG: [`H`, `hB`],
2135
+ TH: [`H`, `h`],
2136
+ TJ: [`H`, `h`],
2137
+ TL: [
2138
+ `H`,
2139
+ `hB`,
2140
+ `hb`,
2141
+ `h`
2142
+ ],
2143
+ TM: [`H`, `h`],
2144
+ TN: [
2145
+ `h`,
2146
+ `hB`,
2147
+ `hb`,
2148
+ `H`
2149
+ ],
2150
+ TO: [`h`, `H`],
2151
+ TR: [`H`, `hB`],
2152
+ TT: [
2153
+ `h`,
2154
+ `hb`,
2155
+ `H`,
2156
+ `hB`
2157
+ ],
2158
+ TW: [
2159
+ `hB`,
2160
+ `hb`,
2161
+ `h`,
2162
+ `H`
2163
+ ],
2164
+ TZ: [
2165
+ `hB`,
2166
+ `hb`,
2167
+ `H`,
2168
+ `h`
2169
+ ],
2170
+ UA: [
2171
+ `H`,
2172
+ `hB`,
2173
+ `h`
2174
+ ],
2175
+ UG: [
2176
+ `hB`,
2177
+ `hb`,
2178
+ `H`,
2179
+ `h`
2180
+ ],
2181
+ UM: [
2182
+ `h`,
2183
+ `hb`,
2184
+ `H`,
2185
+ `hB`
2186
+ ],
2187
+ US: [
2188
+ `h`,
2189
+ `hb`,
2190
+ `H`,
2191
+ `hB`
2192
+ ],
2193
+ UY: [
2194
+ `h`,
2195
+ `H`,
2196
+ `hB`,
2197
+ `hb`
2198
+ ],
2199
+ UZ: [
2200
+ `H`,
2201
+ `hB`,
2202
+ `h`
2203
+ ],
2204
+ VA: [
2205
+ `H`,
2206
+ `h`,
2207
+ `hB`
2208
+ ],
2209
+ VC: [
2210
+ `h`,
2211
+ `hb`,
2212
+ `H`,
2213
+ `hB`
2214
+ ],
2215
+ VE: [
2216
+ `h`,
2217
+ `H`,
2218
+ `hB`,
2219
+ `hb`
2220
+ ],
2221
+ VG: [
2222
+ `h`,
2223
+ `hb`,
2224
+ `H`,
2225
+ `hB`
2226
+ ],
2227
+ VI: [
2228
+ `h`,
2229
+ `hb`,
2230
+ `H`,
2231
+ `hB`
2232
+ ],
2233
+ VN: [`H`, `h`],
2234
+ VU: [`h`, `H`],
2235
+ WF: [`H`, `hB`],
2236
+ WS: [`h`, `H`],
2237
+ XK: [
2238
+ `H`,
2239
+ `hB`,
2240
+ `h`
2241
+ ],
2242
+ YE: [
2243
+ `h`,
2244
+ `hB`,
2245
+ `hb`,
2246
+ `H`
2247
+ ],
2248
+ YT: [`H`, `hB`],
2249
+ ZA: [
2250
+ `H`,
2251
+ `h`,
2252
+ `hb`,
2253
+ `hB`
2254
+ ],
2255
+ ZM: [
2256
+ `h`,
2257
+ `hb`,
2258
+ `H`,
2259
+ `hB`
2260
+ ],
2261
+ ZW: [`H`, `h`],
2262
+ "af-ZA": [
2263
+ `H`,
2264
+ `h`,
2265
+ `hB`,
2266
+ `hb`
2267
+ ],
2268
+ "ar-001": [
2269
+ `h`,
2270
+ `hB`,
2271
+ `hb`,
2272
+ `H`
2273
+ ],
2274
+ "ca-ES": [
2275
+ `H`,
2276
+ `h`,
2277
+ `hB`
2278
+ ],
2279
+ "en-001": [
2280
+ `h`,
2281
+ `hb`,
2282
+ `H`,
2283
+ `hB`
2284
+ ],
2285
+ "en-HK": [
2286
+ `h`,
2287
+ `hb`,
2288
+ `H`,
2289
+ `hB`
2290
+ ],
2291
+ "en-IL": [
2292
+ `H`,
2293
+ `h`,
2294
+ `hb`,
2295
+ `hB`
2296
+ ],
2297
+ "en-MY": [
2298
+ `h`,
2299
+ `hb`,
2300
+ `H`,
2301
+ `hB`
2302
+ ],
2303
+ "es-BR": [
2304
+ `H`,
2305
+ `h`,
2306
+ `hB`,
2307
+ `hb`
2308
+ ],
2309
+ "es-ES": [
2310
+ `H`,
2311
+ `h`,
2312
+ `hB`,
2313
+ `hb`
2314
+ ],
2315
+ "es-GQ": [
2316
+ `H`,
2317
+ `h`,
2318
+ `hB`,
2319
+ `hb`
2320
+ ],
2321
+ "fr-CA": [
2322
+ `H`,
2323
+ `h`,
2324
+ `hB`
2325
+ ],
2326
+ "gl-ES": [
2327
+ `H`,
2328
+ `h`,
2329
+ `hB`
2330
+ ],
2331
+ "gu-IN": [
2332
+ `hB`,
2333
+ `hb`,
2334
+ `h`,
2335
+ `H`
2336
+ ],
2337
+ "hi-IN": [
2338
+ `hB`,
2339
+ `h`,
2340
+ `H`
2341
+ ],
2342
+ "it-CH": [
2343
+ `H`,
2344
+ `h`,
2345
+ `hB`
2346
+ ],
2347
+ "it-IT": [
2348
+ `H`,
2349
+ `h`,
2350
+ `hB`
2351
+ ],
2352
+ "kn-IN": [
2353
+ `hB`,
2354
+ `h`,
2355
+ `H`
2356
+ ],
2357
+ "ml-IN": [
2358
+ `hB`,
2359
+ `h`,
2360
+ `H`
2361
+ ],
2362
+ "mr-IN": [
2363
+ `hB`,
2364
+ `hb`,
2365
+ `h`,
2366
+ `H`
2367
+ ],
2368
+ "pa-IN": [
2369
+ `hB`,
2370
+ `hb`,
2371
+ `h`,
2372
+ `H`
2373
+ ],
2374
+ "ta-IN": [
2375
+ `hB`,
2376
+ `h`,
2377
+ `hb`,
2378
+ `H`
2379
+ ],
2380
+ "te-IN": [
2381
+ `hB`,
2382
+ `h`,
2383
+ `H`
2384
+ ],
2385
+ "zu-ZA": [
2386
+ `H`,
2387
+ `hB`,
2388
+ `hb`,
2389
+ `h`
2390
+ ]
2391
+ };
2392
+ })), vt = p(((e) => {
2393
+ Object.defineProperty(e, `__esModule`, { value: !0 }), e.getBestPattern = n;
2394
+ var t = _t();
2395
+ function n(e, t) {
2396
+ for (var n = ``, i = 0; i < e.length; i++) {
2397
+ var a = e.charAt(i);
2398
+ if (a === `j`) {
2399
+ for (var o = 0; i + 1 < e.length && e.charAt(i + 1) === a;) o++, i++;
2400
+ var s = 1 + (o & 1), c = o < 2 ? 1 : 3 + (o >> 1), l = `a`, u = r(t);
2401
+ for ((u == `H` || u == `k`) && (c = 0); c-- > 0;) n += l;
2402
+ for (; s-- > 0;) n = u + n;
2403
+ } else a === `J` ? n += `H` : n += a;
2404
+ }
2405
+ return n;
2406
+ }
2407
+ function r(e) {
2408
+ var n = e.hourCycle;
2409
+ if (n === void 0 && e.hourCycles && e.hourCycles.length && (n = e.hourCycles[0]), n) switch (n) {
2410
+ case `h24`: return `k`;
2411
+ case `h23`: return `H`;
2412
+ case `h12`: return `h`;
2413
+ case `h11`: return `K`;
2414
+ default: throw Error(`Invalid hourCycle`);
2415
+ }
2416
+ var r = e.language, i;
2417
+ return r !== `root` && (i = e.maximize().region), (t.timeData[i || ``] || t.timeData[r || ``] || t.timeData[`${r}-001`] || t.timeData[`001`])[0];
2418
+ }
2419
+ })), yt = p(((e) => {
2420
+ Object.defineProperty(e, `__esModule`, { value: !0 }), e.Parser = void 0;
2421
+ var t = (R(), g(M)), n = dt(), r = z(), i = ft(), a = gt(), o = vt(), s = RegExp(`^${i.SPACE_SEPARATOR_REGEX.source}*`), c = RegExp(`${i.SPACE_SEPARATOR_REGEX.source}*\$`);
2422
+ function l(e, t) {
2423
+ return {
2424
+ start: e,
2425
+ end: t
2426
+ };
2427
+ }
2428
+ var u = !!String.prototype.startsWith && `_a`.startsWith(`a`, 1), d = !!String.fromCodePoint, f = !!Object.fromEntries, p = !!String.prototype.codePointAt, m = !!String.prototype.trimStart, h = !!String.prototype.trimEnd, _ = Number.isSafeInteger ? Number.isSafeInteger : function(e) {
2429
+ return typeof e == `number` && isFinite(e) && Math.floor(e) === e && Math.abs(e) <= 9007199254740991;
2430
+ }, v = !0;
2431
+ try {
2432
+ v = S(`([^\\p{White_Space}\\p{Pattern_Syntax}]*)`, `yu`).exec(`a`)?.[0] === `a`;
2433
+ } catch {
2434
+ v = !1;
2435
+ }
2436
+ var ee = u ? function(e, t, n) {
2437
+ return e.startsWith(t, n);
2438
+ } : function(e, t, n) {
2439
+ return e.slice(n, n + t.length) === t;
2440
+ }, y = d ? String.fromCodePoint : function() {
2441
+ for (var e = [...arguments], t = ``, n = e.length, r = 0, i; n > r;) {
2442
+ if (i = e[r++], i > 1114111) throw RangeError(i + ` is not a valid code point`);
2443
+ t += i < 65536 ? String.fromCharCode(i) : String.fromCharCode(((i -= 65536) >> 10) + 55296, i % 1024 + 56320);
2444
+ }
2445
+ return t;
2446
+ }, b = f ? Object.fromEntries : function(e) {
2447
+ for (var t = {}, n = 0, r = e; n < r.length; n++) {
2448
+ var i = r[n], a = i[0];
2449
+ t[a] = i[1];
2450
+ }
2451
+ return t;
2452
+ }, x = p ? function(e, t) {
2453
+ return e.codePointAt(t);
2454
+ } : function(e, t) {
2455
+ var n = e.length;
2456
+ if (!(t < 0 || t >= n)) {
2457
+ var r = e.charCodeAt(t), i;
2458
+ return r < 55296 || r > 56319 || t + 1 === n || (i = e.charCodeAt(t + 1)) < 56320 || i > 57343 ? r : (r - 55296 << 10) + (i - 56320) + 65536;
2459
+ }
2460
+ }, te = m ? function(e) {
2461
+ return e.trimStart();
2462
+ } : function(e) {
2463
+ return e.replace(s, ``);
2464
+ }, ne = h ? function(e) {
2465
+ return e.trimEnd();
2466
+ } : function(e) {
2467
+ return e.replace(c, ``);
2468
+ };
2469
+ function S(e, t) {
2470
+ return new RegExp(e, t);
2471
+ }
2472
+ var C;
2473
+ if (v) {
2474
+ var w = S(`([^\\p{White_Space}\\p{Pattern_Syntax}]*)`, `yu`);
2475
+ C = function(e, t) {
2476
+ return w.lastIndex = t, w.exec(e)[1] ?? ``;
2477
+ };
2478
+ } else C = function(e, t) {
2479
+ for (var n = [];;) {
2480
+ var r = x(e, t);
2481
+ if (r === void 0 || ie(r) || D(r)) break;
2482
+ n.push(r), t += r >= 65536 ? 2 : 1;
2483
+ }
2484
+ return y.apply(void 0, n);
2485
+ };
2486
+ e.Parser = function() {
2487
+ function e(e, t) {
2488
+ t === void 0 && (t = {}), this.message = e, this.position = {
2489
+ offset: 0,
2490
+ line: 1,
2491
+ column: 1
2492
+ }, this.ignoreTag = !!t.ignoreTag, this.locale = t.locale, this.requiresOtherClause = !!t.requiresOtherClause, this.shouldParseSkeletons = !!t.shouldParseSkeletons;
2493
+ }
2494
+ return e.prototype.parse = function() {
2495
+ if (this.offset() !== 0) throw Error(`parser can only be used once`);
2496
+ return this.parseMessage(0, ``, !1);
2497
+ }, e.prototype.parseMessage = function(e, t, i) {
2498
+ for (var a = []; !this.isEOF();) {
2499
+ var o = this.char();
2500
+ if (o === 123) {
2501
+ var s = this.parseArgument(e, i);
2502
+ if (s.err) return s;
2503
+ a.push(s.val);
2504
+ } else if (o === 125 && e > 0) break;
2505
+ else if (o === 35 && (t === `plural` || t === `selectordinal`)) {
2506
+ var c = this.clonePosition();
2507
+ this.bump(), a.push({
2508
+ type: r.TYPE.pound,
2509
+ location: l(c, this.clonePosition())
2510
+ });
2511
+ } else if (o === 60 && !this.ignoreTag && this.peek() === 47) {
2512
+ if (i) break;
2513
+ return this.error(n.ErrorKind.UNMATCHED_CLOSING_TAG, l(this.clonePosition(), this.clonePosition()));
2514
+ } else if (o === 60 && !this.ignoreTag && T(this.peek() || 0)) {
2515
+ var s = this.parseTag(e, t);
2516
+ if (s.err) return s;
2517
+ a.push(s.val);
2518
+ } else {
2519
+ var s = this.parseLiteral(e, t);
2520
+ if (s.err) return s;
2521
+ a.push(s.val);
2522
+ }
2523
+ }
2524
+ return {
2525
+ val: a,
2526
+ err: null
2527
+ };
2528
+ }, e.prototype.parseTag = function(e, t) {
2529
+ var i = this.clonePosition();
2530
+ this.bump();
2531
+ var a = this.parseTagName();
2532
+ if (this.bumpSpace(), this.bumpIf(`/>`)) return {
2533
+ val: {
2534
+ type: r.TYPE.literal,
2535
+ value: `<${a}/>`,
2536
+ location: l(i, this.clonePosition())
2537
+ },
2538
+ err: null
2539
+ };
2540
+ if (this.bumpIf(`>`)) {
2541
+ var o = this.parseMessage(e + 1, t, !0);
2542
+ if (o.err) return o;
2543
+ var s = o.val, c = this.clonePosition();
2544
+ if (this.bumpIf(`</`)) {
2545
+ if (this.isEOF() || !T(this.char())) return this.error(n.ErrorKind.INVALID_TAG, l(c, this.clonePosition()));
2546
+ var u = this.clonePosition();
2547
+ return a === this.parseTagName() ? (this.bumpSpace(), this.bumpIf(`>`) ? {
2548
+ val: {
2549
+ type: r.TYPE.tag,
2550
+ value: a,
2551
+ children: s,
2552
+ location: l(i, this.clonePosition())
2553
+ },
2554
+ err: null
2555
+ } : this.error(n.ErrorKind.INVALID_TAG, l(c, this.clonePosition()))) : this.error(n.ErrorKind.UNMATCHED_CLOSING_TAG, l(u, this.clonePosition()));
2556
+ } else return this.error(n.ErrorKind.UNCLOSED_TAG, l(i, this.clonePosition()));
2557
+ } else return this.error(n.ErrorKind.INVALID_TAG, l(i, this.clonePosition()));
2558
+ }, e.prototype.parseTagName = function() {
2559
+ var e = this.offset();
2560
+ for (this.bump(); !this.isEOF() && E(this.char());) this.bump();
2561
+ return this.message.slice(e, this.offset());
2562
+ }, e.prototype.parseLiteral = function(e, t) {
2563
+ for (var n = this.clonePosition(), i = ``;;) {
2564
+ var a = this.tryParseQuote(t);
2565
+ if (a) {
2566
+ i += a;
2567
+ continue;
2568
+ }
2569
+ var o = this.tryParseUnquoted(e, t);
2570
+ if (o) {
2571
+ i += o;
2572
+ continue;
2573
+ }
2574
+ var s = this.tryParseLeftAngleBracket();
2575
+ if (s) {
2576
+ i += s;
2577
+ continue;
2578
+ }
2579
+ break;
2580
+ }
2581
+ var c = l(n, this.clonePosition());
2582
+ return {
2583
+ val: {
2584
+ type: r.TYPE.literal,
2585
+ value: i,
2586
+ location: c
2587
+ },
2588
+ err: null
2589
+ };
2590
+ }, e.prototype.tryParseLeftAngleBracket = function() {
2591
+ return !this.isEOF() && this.char() === 60 && (this.ignoreTag || !re(this.peek() || 0)) ? (this.bump(), `<`) : null;
2592
+ }, e.prototype.tryParseQuote = function(e) {
2593
+ if (this.isEOF() || this.char() !== 39) return null;
2594
+ switch (this.peek()) {
2595
+ case 39: return this.bump(), this.bump(), `'`;
2596
+ case 123:
2597
+ case 60:
2598
+ case 62:
2599
+ case 125: break;
2600
+ case 35:
2601
+ if (e === `plural` || e === `selectordinal`) break;
2602
+ return null;
2603
+ default: return null;
2604
+ }
2605
+ this.bump();
2606
+ var t = [this.char()];
2607
+ for (this.bump(); !this.isEOF();) {
2608
+ var n = this.char();
2609
+ if (n === 39) if (this.peek() === 39) t.push(39), this.bump();
2610
+ else {
2611
+ this.bump();
2612
+ break;
2613
+ }
2614
+ else t.push(n);
2615
+ this.bump();
2616
+ }
2617
+ return y.apply(void 0, t);
2618
+ }, e.prototype.tryParseUnquoted = function(e, t) {
2619
+ if (this.isEOF()) return null;
2620
+ var n = this.char();
2621
+ return n === 60 || n === 123 || n === 35 && (t === `plural` || t === `selectordinal`) || n === 125 && e > 0 ? null : (this.bump(), y(n));
2622
+ }, e.prototype.parseArgument = function(e, t) {
2623
+ var i = this.clonePosition();
2624
+ if (this.bump(), this.bumpSpace(), this.isEOF()) return this.error(n.ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, l(i, this.clonePosition()));
2625
+ if (this.char() === 125) return this.bump(), this.error(n.ErrorKind.EMPTY_ARGUMENT, l(i, this.clonePosition()));
2626
+ var a = this.parseIdentifierIfPossible().value;
2627
+ if (!a) return this.error(n.ErrorKind.MALFORMED_ARGUMENT, l(i, this.clonePosition()));
2628
+ if (this.bumpSpace(), this.isEOF()) return this.error(n.ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, l(i, this.clonePosition()));
2629
+ switch (this.char()) {
2630
+ case 125: return this.bump(), {
2631
+ val: {
2632
+ type: r.TYPE.argument,
2633
+ value: a,
2634
+ location: l(i, this.clonePosition())
2635
+ },
2636
+ err: null
2637
+ };
2638
+ case 44: return this.bump(), this.bumpSpace(), this.isEOF() ? this.error(n.ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, l(i, this.clonePosition())) : this.parseArgumentOptions(e, t, a, i);
2639
+ default: return this.error(n.ErrorKind.MALFORMED_ARGUMENT, l(i, this.clonePosition()));
2640
+ }
2641
+ }, e.prototype.parseIdentifierIfPossible = function() {
2642
+ var e = this.clonePosition(), t = this.offset(), n = C(this.message, t), r = t + n.length;
2643
+ return this.bumpTo(r), {
2644
+ value: n,
2645
+ location: l(e, this.clonePosition())
2646
+ };
2647
+ }, e.prototype.parseArgumentOptions = function(e, i, s, c) {
2648
+ var u = this.clonePosition(), d = this.parseIdentifierIfPossible().value, f = this.clonePosition();
2649
+ switch (d) {
2650
+ case ``: return this.error(n.ErrorKind.EXPECT_ARGUMENT_TYPE, l(u, f));
2651
+ case `number`:
2652
+ case `date`:
2653
+ case `time`:
2654
+ this.bumpSpace();
2655
+ var p = null;
2656
+ if (this.bumpIf(`,`)) {
2657
+ this.bumpSpace();
2658
+ var m = this.clonePosition(), h = this.parseSimpleArgStyleIfPossible();
2659
+ if (h.err) return h;
2660
+ var g = ne(h.val);
2661
+ if (g.length === 0) return this.error(n.ErrorKind.EXPECT_ARGUMENT_STYLE, l(this.clonePosition(), this.clonePosition()));
2662
+ p = {
2663
+ style: g,
2664
+ styleLocation: l(m, this.clonePosition())
2665
+ };
2666
+ }
2667
+ var _ = this.tryParseArgumentClose(c);
2668
+ if (_.err) return _;
2669
+ var v = l(c, this.clonePosition());
2670
+ if (p && ee(p?.style, `::`, 0)) {
2671
+ var y = te(p.style.slice(2));
2672
+ if (d === `number`) {
2673
+ var h = this.parseNumberSkeletonFromString(y, p.styleLocation);
2674
+ return h.err ? h : {
2675
+ val: {
2676
+ type: r.TYPE.number,
2677
+ value: s,
2678
+ location: v,
2679
+ style: h.val
2680
+ },
2681
+ err: null
2682
+ };
2683
+ } else {
2684
+ if (y.length === 0) return this.error(n.ErrorKind.EXPECT_DATE_TIME_SKELETON, v);
2685
+ var x = y;
2686
+ this.locale && (x = (0, o.getBestPattern)(y, this.locale));
2687
+ var g = {
2688
+ type: r.SKELETON_TYPE.dateTime,
2689
+ pattern: x,
2690
+ location: p.styleLocation,
2691
+ parsedOptions: this.shouldParseSkeletons ? (0, a.parseDateTimeSkeleton)(x) : {}
2692
+ };
2693
+ return {
2694
+ val: {
2695
+ type: d === `date` ? r.TYPE.date : r.TYPE.time,
2696
+ value: s,
2697
+ location: v,
2698
+ style: g
2699
+ },
2700
+ err: null
2701
+ };
2702
+ }
2703
+ }
2704
+ return {
2705
+ val: {
2706
+ type: d === `number` ? r.TYPE.number : d === `date` ? r.TYPE.date : r.TYPE.time,
2707
+ value: s,
2708
+ location: v,
2709
+ style: p?.style ?? null
2710
+ },
2711
+ err: null
2712
+ };
2713
+ case `plural`:
2714
+ case `selectordinal`:
2715
+ case `select`:
2716
+ var S = this.clonePosition();
2717
+ if (this.bumpSpace(), !this.bumpIf(`,`)) return this.error(n.ErrorKind.EXPECT_SELECT_ARGUMENT_OPTIONS, l(S, t.__assign({}, S)));
2718
+ this.bumpSpace();
2719
+ var C = this.parseIdentifierIfPossible(), w = 0;
2720
+ if (d !== `select` && C.value === `offset`) {
2721
+ if (!this.bumpIf(`:`)) return this.error(n.ErrorKind.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, l(this.clonePosition(), this.clonePosition()));
2722
+ this.bumpSpace();
2723
+ var h = this.tryParseDecimalInteger(n.ErrorKind.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, n.ErrorKind.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);
2724
+ if (h.err) return h;
2725
+ this.bumpSpace(), C = this.parseIdentifierIfPossible(), w = h.val;
2726
+ }
2727
+ var T = this.tryParsePluralOrSelectOptions(e, d, i, C);
2728
+ if (T.err) return T;
2729
+ var _ = this.tryParseArgumentClose(c);
2730
+ if (_.err) return _;
2731
+ var re = l(c, this.clonePosition());
2732
+ return d === `select` ? {
2733
+ val: {
2734
+ type: r.TYPE.select,
2735
+ value: s,
2736
+ options: b(T.val),
2737
+ location: re
2738
+ },
2739
+ err: null
2740
+ } : {
2741
+ val: {
2742
+ type: r.TYPE.plural,
2743
+ value: s,
2744
+ options: b(T.val),
2745
+ offset: w,
2746
+ pluralType: d === `plural` ? `cardinal` : `ordinal`,
2747
+ location: re
2748
+ },
2749
+ err: null
2750
+ };
2751
+ default: return this.error(n.ErrorKind.INVALID_ARGUMENT_TYPE, l(u, f));
2752
+ }
2753
+ }, e.prototype.tryParseArgumentClose = function(e) {
2754
+ return this.isEOF() || this.char() !== 125 ? this.error(n.ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, l(e, this.clonePosition())) : (this.bump(), {
2755
+ val: !0,
2756
+ err: null
2757
+ });
2758
+ }, e.prototype.parseSimpleArgStyleIfPossible = function() {
2759
+ for (var e = 0, t = this.clonePosition(); !this.isEOF();) switch (this.char()) {
2760
+ case 39:
2761
+ this.bump();
2762
+ var r = this.clonePosition();
2763
+ if (!this.bumpUntil(`'`)) return this.error(n.ErrorKind.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE, l(r, this.clonePosition()));
2764
+ this.bump();
2765
+ break;
2766
+ case 123:
2767
+ e += 1, this.bump();
2768
+ break;
2769
+ case 125:
2770
+ if (e > 0) --e;
2771
+ else return {
2772
+ val: this.message.slice(t.offset, this.offset()),
2773
+ err: null
2774
+ };
2775
+ break;
2776
+ default:
2777
+ this.bump();
2778
+ break;
2779
+ }
2780
+ return {
2781
+ val: this.message.slice(t.offset, this.offset()),
2782
+ err: null
2783
+ };
2784
+ }, e.prototype.parseNumberSkeletonFromString = function(e, t) {
2785
+ var i = [];
2786
+ try {
2787
+ i = (0, a.parseNumberSkeletonFromString)(e);
2788
+ } catch {
2789
+ return this.error(n.ErrorKind.INVALID_NUMBER_SKELETON, t);
2790
+ }
2791
+ return {
2792
+ val: {
2793
+ type: r.SKELETON_TYPE.number,
2794
+ tokens: i,
2795
+ location: t,
2796
+ parsedOptions: this.shouldParseSkeletons ? (0, a.parseNumberSkeleton)(i) : {}
2797
+ },
2798
+ err: null
2799
+ };
2800
+ }, e.prototype.tryParsePluralOrSelectOptions = function(e, t, r, i) {
2801
+ for (var a, o = !1, s = [], c = /* @__PURE__ */ new Set(), u = i.value, d = i.location;;) {
2802
+ if (u.length === 0) {
2803
+ var f = this.clonePosition();
2804
+ if (t !== `select` && this.bumpIf(`=`)) {
2805
+ var p = this.tryParseDecimalInteger(n.ErrorKind.EXPECT_PLURAL_ARGUMENT_SELECTOR, n.ErrorKind.INVALID_PLURAL_ARGUMENT_SELECTOR);
2806
+ if (p.err) return p;
2807
+ d = l(f, this.clonePosition()), u = this.message.slice(f.offset, this.offset());
2808
+ } else break;
2809
+ }
2810
+ if (c.has(u)) return this.error(t === `select` ? n.ErrorKind.DUPLICATE_SELECT_ARGUMENT_SELECTOR : n.ErrorKind.DUPLICATE_PLURAL_ARGUMENT_SELECTOR, d);
2811
+ u === `other` && (o = !0), this.bumpSpace();
2812
+ var m = this.clonePosition();
2813
+ if (!this.bumpIf(`{`)) return this.error(t === `select` ? n.ErrorKind.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT : n.ErrorKind.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT, l(this.clonePosition(), this.clonePosition()));
2814
+ var h = this.parseMessage(e + 1, t, r);
2815
+ if (h.err) return h;
2816
+ var g = this.tryParseArgumentClose(m);
2817
+ if (g.err) return g;
2818
+ s.push([u, {
2819
+ value: h.val,
2820
+ location: l(m, this.clonePosition())
2821
+ }]), c.add(u), this.bumpSpace(), a = this.parseIdentifierIfPossible(), u = a.value, d = a.location;
2822
+ }
2823
+ return s.length === 0 ? this.error(t === `select` ? n.ErrorKind.EXPECT_SELECT_ARGUMENT_SELECTOR : n.ErrorKind.EXPECT_PLURAL_ARGUMENT_SELECTOR, l(this.clonePosition(), this.clonePosition())) : this.requiresOtherClause && !o ? this.error(n.ErrorKind.MISSING_OTHER_CLAUSE, l(this.clonePosition(), this.clonePosition())) : {
2824
+ val: s,
2825
+ err: null
2826
+ };
2827
+ }, e.prototype.tryParseDecimalInteger = function(e, t) {
2828
+ var n = 1, r = this.clonePosition();
2829
+ this.bumpIf(`+`) || this.bumpIf(`-`) && (n = -1);
2830
+ for (var i = !1, a = 0; !this.isEOF();) {
2831
+ var o = this.char();
2832
+ if (o >= 48 && o <= 57) i = !0, a = a * 10 + (o - 48), this.bump();
2833
+ else break;
2834
+ }
2835
+ var s = l(r, this.clonePosition());
2836
+ return i ? (a *= n, _(a) ? {
2837
+ val: a,
2838
+ err: null
2839
+ } : this.error(t, s)) : this.error(e, s);
2840
+ }, e.prototype.offset = function() {
2841
+ return this.position.offset;
2842
+ }, e.prototype.isEOF = function() {
2843
+ return this.offset() === this.message.length;
2844
+ }, e.prototype.clonePosition = function() {
2845
+ return {
2846
+ offset: this.position.offset,
2847
+ line: this.position.line,
2848
+ column: this.position.column
2849
+ };
2850
+ }, e.prototype.char = function() {
2851
+ var e = this.position.offset;
2852
+ if (e >= this.message.length) throw Error(`out of bound`);
2853
+ var t = x(this.message, e);
2854
+ if (t === void 0) throw Error(`Offset ${e} is at invalid UTF-16 code unit boundary`);
2855
+ return t;
2856
+ }, e.prototype.error = function(e, t) {
2857
+ return {
2858
+ val: null,
2859
+ err: {
2860
+ kind: e,
2861
+ message: this.message,
2862
+ location: t
2863
+ }
2864
+ };
2865
+ }, e.prototype.bump = function() {
2866
+ if (!this.isEOF()) {
2867
+ var e = this.char();
2868
+ e === 10 ? (this.position.line += 1, this.position.column = 1, this.position.offset += 1) : (this.position.column += 1, this.position.offset += e < 65536 ? 1 : 2);
2869
+ }
2870
+ }, e.prototype.bumpIf = function(e) {
2871
+ if (ee(this.message, e, this.offset())) {
2872
+ for (var t = 0; t < e.length; t++) this.bump();
2873
+ return !0;
2874
+ }
2875
+ return !1;
2876
+ }, e.prototype.bumpUntil = function(e) {
2877
+ var t = this.offset(), n = this.message.indexOf(e, t);
2878
+ return n >= 0 ? (this.bumpTo(n), !0) : (this.bumpTo(this.message.length), !1);
2879
+ }, e.prototype.bumpTo = function(e) {
2880
+ if (this.offset() > e) throw Error(`targetOffset ${e} must be greater than or equal to the current offset ${this.offset()}`);
2881
+ for (e = Math.min(e, this.message.length);;) {
2882
+ var t = this.offset();
2883
+ if (t === e) break;
2884
+ if (t > e) throw Error(`targetOffset ${e} is at invalid UTF-16 code unit boundary`);
2885
+ if (this.bump(), this.isEOF()) break;
2886
+ }
2887
+ }, e.prototype.bumpSpace = function() {
2888
+ for (; !this.isEOF() && ie(this.char());) this.bump();
2889
+ }, e.prototype.peek = function() {
2890
+ if (this.isEOF()) return null;
2891
+ var e = this.char(), t = this.offset();
2892
+ return this.message.charCodeAt(t + (e >= 65536 ? 2 : 1)) ?? null;
2893
+ }, e;
2894
+ }();
2895
+ function T(e) {
2896
+ return e >= 97 && e <= 122 || e >= 65 && e <= 90;
2897
+ }
2898
+ function re(e) {
2899
+ return T(e) || e === 47;
2900
+ }
2901
+ function E(e) {
2902
+ return e === 45 || e === 46 || e >= 48 && e <= 57 || e === 95 || e >= 97 && e <= 122 || e >= 65 && e <= 90 || e == 183 || e >= 192 && e <= 214 || e >= 216 && e <= 246 || e >= 248 && e <= 893 || e >= 895 && e <= 8191 || e >= 8204 && e <= 8205 || e >= 8255 && e <= 8256 || e >= 8304 && e <= 8591 || e >= 11264 && e <= 12271 || e >= 12289 && e <= 55295 || e >= 63744 && e <= 64975 || e >= 65008 && e <= 65533 || e >= 65536 && e <= 983039;
2903
+ }
2904
+ function ie(e) {
2905
+ return e >= 9 && e <= 13 || e === 32 || e === 133 || e >= 8206 && e <= 8207 || e === 8232 || e === 8233;
2906
+ }
2907
+ function D(e) {
2908
+ return e >= 33 && e <= 35 || e === 36 || e >= 37 && e <= 39 || e === 40 || e === 41 || e === 42 || e === 43 || e === 44 || e === 45 || e >= 46 && e <= 47 || e >= 58 && e <= 59 || e >= 60 && e <= 62 || e >= 63 && e <= 64 || e === 91 || e === 92 || e === 93 || e === 94 || e === 96 || e === 123 || e === 124 || e === 125 || e === 126 || e === 161 || e >= 162 && e <= 165 || e === 166 || e === 167 || e === 169 || e === 171 || e === 172 || e === 174 || e === 176 || e === 177 || e === 182 || e === 187 || e === 191 || e === 215 || e === 247 || e >= 8208 && e <= 8213 || e >= 8214 && e <= 8215 || e === 8216 || e === 8217 || e === 8218 || e >= 8219 && e <= 8220 || e === 8221 || e === 8222 || e === 8223 || e >= 8224 && e <= 8231 || e >= 8240 && e <= 8248 || e === 8249 || e === 8250 || e >= 8251 && e <= 8254 || e >= 8257 && e <= 8259 || e === 8260 || e === 8261 || e === 8262 || e >= 8263 && e <= 8273 || e === 8274 || e === 8275 || e >= 8277 && e <= 8286 || e >= 8592 && e <= 8596 || e >= 8597 && e <= 8601 || e >= 8602 && e <= 8603 || e >= 8604 && e <= 8607 || e === 8608 || e >= 8609 && e <= 8610 || e === 8611 || e >= 8612 && e <= 8613 || e === 8614 || e >= 8615 && e <= 8621 || e === 8622 || e >= 8623 && e <= 8653 || e >= 8654 && e <= 8655 || e >= 8656 && e <= 8657 || e === 8658 || e === 8659 || e === 8660 || e >= 8661 && e <= 8691 || e >= 8692 && e <= 8959 || e >= 8960 && e <= 8967 || e === 8968 || e === 8969 || e === 8970 || e === 8971 || e >= 8972 && e <= 8991 || e >= 8992 && e <= 8993 || e >= 8994 && e <= 9e3 || e === 9001 || e === 9002 || e >= 9003 && e <= 9083 || e === 9084 || e >= 9085 && e <= 9114 || e >= 9115 && e <= 9139 || e >= 9140 && e <= 9179 || e >= 9180 && e <= 9185 || e >= 9186 && e <= 9254 || e >= 9255 && e <= 9279 || e >= 9280 && e <= 9290 || e >= 9291 && e <= 9311 || e >= 9472 && e <= 9654 || e === 9655 || e >= 9656 && e <= 9664 || e === 9665 || e >= 9666 && e <= 9719 || e >= 9720 && e <= 9727 || e >= 9728 && e <= 9838 || e === 9839 || e >= 9840 && e <= 10087 || e === 10088 || e === 10089 || e === 10090 || e === 10091 || e === 10092 || e === 10093 || e === 10094 || e === 10095 || e === 10096 || e === 10097 || e === 10098 || e === 10099 || e === 10100 || e === 10101 || e >= 10132 && e <= 10175 || e >= 10176 && e <= 10180 || e === 10181 || e === 10182 || e >= 10183 && e <= 10213 || e === 10214 || e === 10215 || e === 10216 || e === 10217 || e === 10218 || e === 10219 || e === 10220 || e === 10221 || e === 10222 || e === 10223 || e >= 10224 && e <= 10239 || e >= 10240 && e <= 10495 || e >= 10496 && e <= 10626 || e === 10627 || e === 10628 || e === 10629 || e === 10630 || e === 10631 || e === 10632 || e === 10633 || e === 10634 || e === 10635 || e === 10636 || e === 10637 || e === 10638 || e === 10639 || e === 10640 || e === 10641 || e === 10642 || e === 10643 || e === 10644 || e === 10645 || e === 10646 || e === 10647 || e === 10648 || e >= 10649 && e <= 10711 || e === 10712 || e === 10713 || e === 10714 || e === 10715 || e >= 10716 && e <= 10747 || e === 10748 || e === 10749 || e >= 10750 && e <= 11007 || e >= 11008 && e <= 11055 || e >= 11056 && e <= 11076 || e >= 11077 && e <= 11078 || e >= 11079 && e <= 11084 || e >= 11085 && e <= 11123 || e >= 11124 && e <= 11125 || e >= 11126 && e <= 11157 || e === 11158 || e >= 11159 && e <= 11263 || e >= 11776 && e <= 11777 || e === 11778 || e === 11779 || e === 11780 || e === 11781 || e >= 11782 && e <= 11784 || e === 11785 || e === 11786 || e === 11787 || e === 11788 || e === 11789 || e >= 11790 && e <= 11798 || e === 11799 || e >= 11800 && e <= 11801 || e === 11802 || e === 11803 || e === 11804 || e === 11805 || e >= 11806 && e <= 11807 || e === 11808 || e === 11809 || e === 11810 || e === 11811 || e === 11812 || e === 11813 || e === 11814 || e === 11815 || e === 11816 || e === 11817 || e >= 11818 && e <= 11822 || e === 11823 || e >= 11824 && e <= 11833 || e >= 11834 && e <= 11835 || e >= 11836 && e <= 11839 || e === 11840 || e === 11841 || e === 11842 || e >= 11843 && e <= 11855 || e >= 11856 && e <= 11857 || e === 11858 || e >= 11859 && e <= 11903 || e >= 12289 && e <= 12291 || e === 12296 || e === 12297 || e === 12298 || e === 12299 || e === 12300 || e === 12301 || e === 12302 || e === 12303 || e === 12304 || e === 12305 || e >= 12306 && e <= 12307 || e === 12308 || e === 12309 || e === 12310 || e === 12311 || e === 12312 || e === 12313 || e === 12314 || e === 12315 || e === 12316 || e === 12317 || e >= 12318 && e <= 12319 || e === 12320 || e === 12336 || e === 64830 || e === 64831 || e >= 65093 && e <= 65094;
2909
+ }
2910
+ })), bt = p(((e) => {
2911
+ Object.defineProperty(e, `__esModule`, { value: !0 }), e.hoistSelectors = s, e.isStructurallySame = l;
2912
+ var t = (R(), g(M)), n = z();
2913
+ function r(e) {
2914
+ return Array.isArray(e) ? t.__spreadArray([], e.map(r), !0) : typeof e == `object` && e ? Object.keys(e).reduce(function(t, n) {
2915
+ return t[n] = r(e[n]), t;
2916
+ }, {}) : e;
2917
+ }
2918
+ function i(e, n, i) {
2919
+ var a = r(n), o = a.options;
2920
+ return a.options = Object.keys(o).reduce(function(n, r) {
2921
+ return n[r] = { value: s(t.__spreadArray(t.__spreadArray(t.__spreadArray([], e.slice(0, i), !0), o[r].value, !0), e.slice(i + 1), !0)) }, n;
2922
+ }, {}), a;
2923
+ }
2924
+ function a(e) {
2925
+ return (0, n.isPluralElement)(e) || (0, n.isSelectElement)(e);
2926
+ }
2927
+ function o(e) {
2928
+ return !!e.find(function(e) {
2929
+ return a(e) ? !0 : (0, n.isTagElement)(e) ? o(e.children) : !1;
2930
+ });
2931
+ }
2932
+ function s(e) {
2933
+ for (var t = 0; t < e.length; t++) {
2934
+ var r = e[t];
2935
+ if (a(r)) return [i(e, r, t)];
2936
+ if ((0, n.isTagElement)(r) && o([r])) throw Error(`Cannot hoist plural/select within a tag element. Please put the tag element inside each plural/select option`);
2937
+ }
2938
+ return e;
2939
+ }
2940
+ function c(e, t) {
2941
+ t === void 0 && (t = /* @__PURE__ */ new Map()), e.forEach(function(e) {
2942
+ if ((0, n.isArgumentElement)(e) || (0, n.isDateElement)(e) || (0, n.isTimeElement)(e) || (0, n.isNumberElement)(e)) {
2943
+ if (e.value in t && t.get(e.value) !== e.type) throw Error(`Variable ${e.value} has conflicting types`);
2944
+ t.set(e.value, e.type);
2945
+ }
2946
+ ((0, n.isPluralElement)(e) || (0, n.isSelectElement)(e)) && (t.set(e.value, e.type), Object.keys(e.options).forEach(function(n) {
2947
+ c(e.options[n].value, t);
2948
+ })), (0, n.isTagElement)(e) && (t.set(e.value, e.type), c(e.children, t));
2949
+ });
2950
+ }
2951
+ function l(e, t) {
2952
+ var r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map();
2953
+ return c(e, r), c(t, i), r.size === i.size ? Array.from(r.entries()).reduce(function(e, t) {
2954
+ var r = t[0], a = t[1];
2955
+ if (!e.success) return e;
2956
+ var o = i.get(r);
2957
+ return o == null ? {
2958
+ success: !1,
2959
+ error: Error(`Missing variable ${r} in message`)
2960
+ } : o === a ? e : {
2961
+ success: !1,
2962
+ error: Error(`Variable ${r} has conflicting types: ${n.TYPE[a]} vs ${n.TYPE[o]}`)
2963
+ };
2964
+ }, { success: !0 }) : {
2965
+ success: !1,
2966
+ error: Error(`Different number of variables: [${Array.from(r.keys()).join(`, `)}] vs [${Array.from(i.keys()).join(`, `)}]`)
2967
+ };
2968
+ }
2969
+ })), xt = p(((e) => {
2970
+ Object.defineProperty(e, `__esModule`, { value: !0 }), e.isStructurallySame = e._Parser = void 0, e.parse = o;
2971
+ var t = (R(), g(M)), n = dt(), r = yt(), i = z();
2972
+ function a(e) {
2973
+ e.forEach(function(e) {
2974
+ if (delete e.location, (0, i.isSelectElement)(e) || (0, i.isPluralElement)(e)) for (var t in e.options) delete e.options[t].location, a(e.options[t].value);
2975
+ else (0, i.isNumberElement)(e) && (0, i.isNumberSkeleton)(e.style) || ((0, i.isDateElement)(e) || (0, i.isTimeElement)(e)) && (0, i.isDateTimeSkeleton)(e.style) ? delete e.style.location : (0, i.isTagElement)(e) && a(e.children);
2976
+ });
2977
+ }
2978
+ function o(e, i) {
2979
+ i === void 0 && (i = {}), i = t.__assign({
2980
+ shouldParseSkeletons: !0,
2981
+ requiresOtherClause: !0
2982
+ }, i);
2983
+ var o = new r.Parser(e, i).parse();
2984
+ if (o.err) {
2985
+ var s = SyntaxError(n.ErrorKind[o.err.kind]);
2986
+ throw s.location = o.err.location, s.originalMessage = o.err.message, s;
2987
+ }
2988
+ return i?.captureLocation || a(o.val), o.val;
2989
+ }
2990
+ t.__exportStar(z(), e), e._Parser = r.Parser;
2991
+ var s = bt();
2992
+ Object.defineProperty(e, `isStructurallySame`, {
2993
+ enumerable: !0,
2994
+ get: function() {
2995
+ return s.isStructurallySame;
2996
+ }
2997
+ });
2998
+ })), St = p(((e) => {
2999
+ Object.defineProperty(e, `__esModule`, { value: !0 }), e.printAST = r;
3000
+ var t = (R(), g(M)), n = z();
3001
+ function r(e) {
3002
+ return i(e, !1);
3003
+ }
3004
+ function i(e, t) {
3005
+ return e.map(function(r, i) {
3006
+ if ((0, n.isLiteralElement)(r)) return s(r, t, i === 0, i === e.length - 1);
3007
+ if ((0, n.isArgumentElement)(r)) return c(r);
3008
+ if ((0, n.isDateElement)(r) || (0, n.isTimeElement)(r) || (0, n.isNumberElement)(r)) return l(r);
3009
+ if ((0, n.isPluralElement)(r)) return m(r);
3010
+ if ((0, n.isSelectElement)(r)) return p(r);
3011
+ if ((0, n.isPoundElement)(r)) return `#`;
3012
+ if ((0, n.isTagElement)(r)) return a(r);
3013
+ }).join(``);
3014
+ }
3015
+ function a(e) {
3016
+ return `<${e.value}>${r(e.children)}</${e.value}>`;
3017
+ }
3018
+ function o(e) {
3019
+ return e.replace(/([{}](?:[\s\S]*[{}])?)/, `'$1'`);
3020
+ }
3021
+ function s(e, t, n, r) {
3022
+ var i = e.value;
3023
+ return !n && i[0] === `'` && (i = `''${i.slice(1)}`), !r && i[i.length - 1] === `'` && (i = `${i.slice(0, i.length - 1)}''`), i = o(i), t ? i.replace(`#`, `'#'`) : i;
3024
+ }
3025
+ function c(e) {
3026
+ return `{${e.value}}`;
3027
+ }
3028
+ function l(e) {
3029
+ return `{${e.value}, ${n.TYPE[e.type]}${e.style ? `, ${d(e.style)}` : ``}}`;
3030
+ }
3031
+ function u(e) {
3032
+ var t = e.stem, n = e.options;
3033
+ return n.length === 0 ? t : `${t}${n.map(function(e) {
3034
+ return `/${e}`;
3035
+ }).join(``)}`;
3036
+ }
3037
+ function d(e) {
3038
+ return typeof e == `string` ? o(e) : e.type === n.SKELETON_TYPE.dateTime ? `::${f(e)}` : `::${e.tokens.map(u).join(` `)}`;
3039
+ }
3040
+ function f(e) {
3041
+ return e.pattern;
3042
+ }
3043
+ function p(e) {
3044
+ return `{${[
3045
+ e.value,
3046
+ `select`,
3047
+ Object.keys(e.options).map(function(t) {
3048
+ return `${t}{${i(e.options[t].value, !1)}}`;
3049
+ }).join(` `)
3050
+ ].join(`,`)}}`;
3051
+ }
3052
+ function m(e) {
3053
+ var n = e.pluralType === `cardinal` ? `plural` : `selectordinal`;
3054
+ return `{${[
3055
+ e.value,
3056
+ n,
3057
+ t.__spreadArray([e.offset ? `offset:${e.offset}` : ``], Object.keys(e.options).map(function(t) {
3058
+ return `${t}{${i(e.options[t].value, !0)}}`;
3059
+ }), !0).filter(Boolean).join(` `)
3060
+ ].join(`,`)}}`;
3061
+ }
3062
+ }));
3063
+ xt();
3064
+ z();
3065
+ St();
3066
+ const U = `_gt_`;
3067
+ RegExp(`^${U}\\d+$`);
3068
+ RegExp(`^${U}$`);
3069
+ const Ht = `@generaltranslation/react-core`;
3070
+ function W(e) {
3071
+ return S({
3072
+ source: Ht,
3073
+ ...e
3074
+ });
3075
+ }
3076
+ W({
3077
+ severity: `Error`,
3078
+ whatHappened: `Runtime translation needs a project ID`,
3079
+ fix: `Add projectId to your <GTProvider> configuration or set GT_PROJECT_ID in your environment`,
3080
+ docsUrl: `https://generaltranslation.com/dashboard`
3081
+ }), W({
3082
+ severity: `Error`,
3083
+ whatHappened: `Production environments cannot use a development API key`,
3084
+ fix: `Replace it with a production API key before deploying`
3085
+ }), W({
3086
+ severity: `Error`,
3087
+ whatHappened: `The API key is available to client-side production code`,
3088
+ fix: `Move translation credentials to a server-only environment before deploying`
3089
+ }), W({
3090
+ severity: `Error`,
3091
+ whatHappened: `Runtime translation is not configured`,
3092
+ fix: `Add projectId and devApiKey to your environment, or pass them to <GTProvider> directly`
3093
+ }), W({
3094
+ severity: `Error`,
3095
+ whatHappened: `Runtime translations could not be loaded`,
3096
+ wayOut: `Source content will render as a fallback`,
3097
+ fix: `Check your runtime translation configuration and try again`
3098
+ }), W({
3099
+ severity: `Error`,
3100
+ whatHappened: `Runtime translation could not be completed`
3101
+ });
3102
+ W({
3103
+ severity: `Warning`,
3104
+ whatHappened: `Runtime translation needs a project ID`,
3105
+ fix: `Add projectId to <GTProvider> or set GT_PROJECT_ID in your environment`,
3106
+ docsUrl: `https://generaltranslation.com/dashboard`
3107
+ }), W({
3108
+ severity: `Warning`,
3109
+ whatHappened: `Runtime translation needs a development API key`,
3110
+ fix: `Find your development API key at generaltranslation.com/dashboard, or set runtimeUrl to an empty string to disable runtime translation`
3111
+ }), W({
3112
+ severity: `Warning`,
3113
+ whatHappened: `Runtime translation timed out`
3114
+ }), W({
3115
+ severity: `Warning`,
3116
+ whatHappened: `No dictionary was found`,
3117
+ fix: `Pass a dictionary to <GTProvider> or configure a dictionary loader before rendering translations`
3118
+ });
3119
+ `${Ht}`;
3120
+ const pn = `generaltranslation.locale`, mn = `generaltranslation.region`;
3121
+ e.use;
3122
+ function Jn({ children: e }) {
3123
+ return e;
3124
+ }
3125
+ function Yn(e) {
3126
+ return Jn(e);
3127
+ }
3128
+ Jn._gtt = `derive`, Yn._gtt = `derive`;
3129
+ //#endregion
3130
+ //#region src/shared/cookies.ts
3131
+ /**
3132
+ * Minimally parses a cookie value for a given cookie name.
3133
+ * @param cookieName - The name of the cookie
3134
+ * @returns The cookie value, or undefined when it is not found
3135
+ */
3136
+ function getCookieValue(cookieName) {
3137
+ if (typeof document === "undefined") return void 0;
3138
+ return document.cookie.split("; ").find((row) => row.startsWith(`${cookieName}=`))?.split("=")[1];
3139
+ }
3140
+ /**
3141
+ * Sets a cookie value for a given cookie name.
3142
+ * @param cookieName - The name of the cookie
3143
+ * @param value - The value to set
3144
+ */
3145
+ function setCookieValue(cookieName, value) {
3146
+ if (typeof document === "undefined") return;
3147
+ document.cookie = `${cookieName}=${value};path=/`;
3148
+ }
3149
+ //#endregion
3150
+ //#region src/react-context/provider/ClientProvider.tsx
3151
+ function ClientProvider({ children, dictionary: _dictionary, dictionaryTranslations: _dictionaryTranslations, translations: _translations, locale: _locale, region: _region, _versionId, defaultLocale, translationRequired, dialectTranslationRequired, locales = [], renderSettings, projectId, devApiKey, runtimeUrl, developmentApiEnabled, resetLocaleCookieName, localeCookieName = pn, regionCookieName = mn, customMapping, environment, reloadServer }) {
3152
+ const didMount = useRef(false);
3153
+ const [translations, setTranslations] = useState(_translations);
3154
+ useEffect(() => {
3155
+ if (!didMount.current) return;
3156
+ setTranslations(_translations);
3157
+ }, [_translations]);
3158
+ const [locale, _setLocale] = useState(_locale ? determineLocale(_locale, locales, customMapping) || "" : "");
3159
+ useEffect(() => {
3160
+ let cookieLocale = getCookieValue(localeCookieName);
3161
+ if (cookieLocale) cookieLocale = gt.resolveAliasLocale(cookieLocale);
3162
+ if (locale && cookieLocale && cookieLocale !== locale) setCookieValue(localeCookieName, "");
3163
+ }, [locale, localeCookieName]);
3164
+ const [dictionaryTranslations, setDictionaryTranslations] = useState(_dictionaryTranslations || {});
3165
+ const [dictionary, setDictionary] = useState(_dictionary || {});
3166
+ useEffect(() => {
3167
+ if (!didMount.current) return;
3168
+ setDictionaryTranslations(_dictionaryTranslations);
3169
+ setDictionary(_dictionary);
3170
+ }, [_dictionaryTranslations, _dictionary]);
3171
+ const [region, _setRegion] = useState(_region);
3172
+ const setRegion = (newRegion) => {
3173
+ setCookieValue(regionCookieName, newRegion || "");
3174
+ _setRegion(newRegion);
3175
+ };
3176
+ useEffect(() => {
3177
+ const cookieRegion = getCookieValue(regionCookieName);
3178
+ if (region && cookieRegion && cookieRegion !== region) setCookieValue(regionCookieName, "");
3179
+ }, [region, regionCookieName]);
3180
+ const gt = useMemo(() => new GT({
3181
+ devApiKey,
3182
+ sourceLocale: defaultLocale,
3183
+ targetLocale: locale,
3184
+ projectId,
3185
+ baseUrl: runtimeUrl || void 0,
3186
+ customMapping
3187
+ }), [
3188
+ devApiKey,
3189
+ defaultLocale,
3190
+ locale,
3191
+ projectId,
3192
+ runtimeUrl,
3193
+ customMapping
3194
+ ]);
3195
+ const setLocale = (newLocale) => {
3196
+ newLocale = determineLocale(newLocale, locales, customMapping) || locale || defaultLocale;
3197
+ newLocale = gt.resolveAliasLocale(newLocale);
3198
+ setCookieValue(localeCookieName, newLocale);
3199
+ setCookieValue(resetLocaleCookieName, "true");
3200
+ _setLocale(newLocale);
3201
+ reloadServer();
3202
+ };
3203
+ const { registerIcuForTranslation, registerJsxForTranslation } = useRuntimeTranslation({
3204
+ gt,
3205
+ locale,
3206
+ versionId: _versionId,
3207
+ runtimeUrl,
3208
+ setTranslations,
3209
+ defaultLocale,
3210
+ renderSettings,
3211
+ developmentApiEnabled,
3212
+ environment
3213
+ });
3214
+ const { _gtFunction, _mFunction, _filterMessagesForPreload, _preloadMessages } = useCreateInternalUseGTFunction({
3215
+ gt,
3216
+ translations,
3217
+ locale,
3218
+ defaultLocale,
3219
+ translationRequired,
3220
+ developmentApiEnabled,
3221
+ registerIcuForTranslation,
3222
+ environment
3223
+ });
3224
+ const _dictionaryFunction = useCreateInternalUseTranslationsFunction(gt, dictionary, dictionaryTranslations, translations, locale, defaultLocale, translationRequired, dialectTranslationRequired, developmentApiEnabled, registerIcuForTranslation, environment);
3225
+ const _dictionaryObjFunction = useCreateInternalUseTranslationsObjFunction(dictionary, dictionaryTranslations, setDictionary, setDictionaryTranslations, translations, locale, defaultLocale, translationRequired, dialectTranslationRequired, developmentApiEnabled, registerIcuForTranslation, _dictionaryFunction);
3226
+ const display = !!(!translationRequired || translations) && locale;
3227
+ useEffect(() => {
3228
+ didMount.current = true;
3229
+ }, []);
3230
+ return /* @__PURE__ */ jsx(GTContext.Provider, {
3231
+ value: {
3232
+ gt,
3233
+ registerIcuForTranslation,
3234
+ registerJsxForTranslation,
3235
+ setLocale,
3236
+ _gtFunction,
3237
+ _mFunction,
3238
+ _filterMessagesForPreload,
3239
+ _preloadMessages,
3240
+ _dictionaryFunction,
3241
+ _dictionaryObjFunction,
3242
+ locale,
3243
+ locales,
3244
+ defaultLocale,
3245
+ region,
3246
+ setRegion,
3247
+ translations,
3248
+ translationRequired,
3249
+ dialectTranslationRequired,
3250
+ renderSettings,
3251
+ developmentApiEnabled,
3252
+ _versionId
3253
+ },
3254
+ children: /* @__PURE__ */ jsx(Suspense, {
3255
+ fallback: display && children,
3256
+ children: display && children
3257
+ })
3258
+ });
3259
+ }
3260
+ //#endregion
3261
+ //#region src/shared/InternalLocaleSelector.tsx
3262
+ /**
3263
+ * Capitalizes the first letter of a string if applicable.
3264
+ * For strings that do not use capitalization, it returns the string unchanged.
3265
+ * @param {string} str - The string to capitalize.
3266
+ * @returns {string} The string with the first letter capitalized if applicable.
3267
+ */
3268
+ function capitalizeName(str) {
3269
+ if (!str) return "";
3270
+ return str.charAt(0).toUpperCase() + (str.length > 1 ? str.slice(1) : "");
3271
+ }
3272
+ /**
3273
+ * Internal helper to convert deprecated customNames prop to the new customMapping format.
3274
+ * Used for backward compatibility with previous LocaleSelector API.
3275
+ * @param {object} customNames - Mapping of locale to display name.
3276
+ * @returns {CustomMapping | undefined} The converted mapping or undefined.
3277
+ * @internal
3278
+ */
3279
+ function _convertCustomNamesToMapping(customNames) {
3280
+ if (!customNames) return void 0;
3281
+ const result = {};
3282
+ for (const locale in customNames) result[locale] = { name: customNames[locale] };
3283
+ return result;
3284
+ }
3285
+ /**
3286
+ * A dropdown component that allows users to select a locale.
3287
+ * @param {string} locale - The currently selected locale.
3288
+ * @param {string[]} locales - The list of all available locales.
3289
+ * @param {function} setLocale - Function to update the current locale.
3290
+ * @param {function} getLocaleProperties - Function to retrieve properties for a given locale.
3291
+ * @param {object} [customNames] - (deprecated) An optional object to map locales to custom names. Use `customMapping` instead.
3292
+ * @param {CustomMapping} [customMapping] - An optional object to map locales to custom display names, emojis, or other properties.
3293
+ * @returns {React.ReactElement | null} The rendered locale dropdown component or null to prevent rendering.
3294
+ *
3295
+ * @internal
3296
+ */
3297
+ function InternalLocaleSelector({ locale, locales, customNames, customMapping = _convertCustomNamesToMapping(customNames), setLocale, getLocaleProperties, ...props }) {
3298
+ const getDisplayName = (locale) => {
3299
+ const customLocale = customMapping?.[locale];
3300
+ if (typeof customLocale === "string") return customLocale;
3301
+ if (customLocale?.name) return customLocale.name;
3302
+ return capitalizeName(getLocaleProperties(locale).nativeNameWithRegionCode);
3303
+ };
3304
+ if (!locales?.length || !setLocale) return null;
3305
+ return /* @__PURE__ */ jsxs("select", {
3306
+ ...props,
3307
+ value: locale || "",
3308
+ onChange: (e) => setLocale(e.target.value),
3309
+ children: [!locale && /* @__PURE__ */ jsx("option", { value: "" }), locales.map((locale) => /* @__PURE__ */ jsx("option", {
3310
+ value: locale,
3311
+ suppressHydrationWarning: true,
3312
+ children: getDisplayName(locale)
3313
+ }, locale))]
3314
+ });
3315
+ }
3316
+ //#endregion
3317
+ //#region src/react-context/ui/LocaleSelector.tsx
3318
+ /**
3319
+ * A dropdown component that allows users to select a locale.
3320
+ * @param {string[]} [locales] - An optional list of locales to use for the dropdown. If not provided, the list of locales from the `<GTProvider>` context is used.
3321
+ * @param {object} [customNames] - (deprecated) An optional object to map locales to custom names. Use `customMapping` instead.
3322
+ * @param {CustomMapping} [customMapping] - An optional object to map locales to custom display names, emojis, or other properties.
3323
+ * @returns {React.ReactElement | null} The rendered locale dropdown component or null to prevent rendering.
3324
+ */
3325
+ function LocaleSelector({ locales: _locales, ...props }) {
3326
+ const { locale, locales, setLocale, getLocaleProperties } = useLocaleSelector$1(_locales);
3327
+ return /* @__PURE__ */ jsx(InternalLocaleSelector, {
3328
+ locale,
3329
+ locales,
3330
+ setLocale,
3331
+ getLocaleProperties,
3332
+ ...props
3333
+ });
3334
+ }
3335
+ //#endregion
3336
+ //#region src/react-context/ui/RegionSelector.tsx
3337
+ /**
3338
+ * A dropdown component that allows users to select a region.
3339
+ *
3340
+ * @param {string[]} [regions] - An optional array of ISO 3166 region codes to display. If not provided, regions are inferred from supported locales in the `<GTProvider>` context.
3341
+ * @param {React.ReactNode} [placeholder] - Optional placeholder node to display as the first option when no region is selected.
3342
+ * @param {object} [customMapping] - An optional object to map region codes to custom display names, emojis, or associated locales. The value can be a string (display name) or an object with `name`, `emoji`, and/or `locale` properties.
3343
+ * @param {boolean} [prioritizeCurrentLocaleRegion] - If true, the region corresponding to the current locale is prioritized in the list.
3344
+ * @param {boolean} [sortRegionsAlphabetically] - If true, regions are sorted alphabetically by display name.
3345
+ * @param {boolean} [asLocaleSelector=false] - If true, selecting a region will also update the locale to the region's associated locale.
3346
+ * @param {object} [props] - Additional props to pass to the underlying `<select>` element.
3347
+ * @returns {React.JSX.Element | null} The rendered region dropdown component or null if no regions are available.
3348
+ *
3349
+ * @example
3350
+ * ```tsx
3351
+ * <RegionSelector
3352
+ * regions={['US', 'CA']}
3353
+ * customMapping={{ US: { name: "United States", emoji: "πŸ‡ΊπŸ‡Έ" } }}
3354
+ * placeholder="Select a region"
3355
+ * />
3356
+ * ```
3357
+ */
3358
+ function RegionSelector({ regions: _regions, placeholder, customMapping, prioritizeCurrentLocaleRegion, sortRegionsAlphabetically, asLocaleSelector = false, ...props }) {
3359
+ const { region, setRegion, regions, regionData, locale, setLocale } = useRegionSelector$1({
3360
+ regions: _regions,
3361
+ customMapping,
3362
+ prioritizeCurrentLocaleRegion,
3363
+ sortRegionsAlphabetically
3364
+ });
3365
+ const changeRegion = (region) => {
3366
+ setRegion(region);
3367
+ if (asLocaleSelector) {
3368
+ const regionLocale = regionData.get(region).locale;
3369
+ if (locale !== regionLocale) setLocale(regionLocale);
3370
+ }
3371
+ };
3372
+ return /* @__PURE__ */ jsxs("select", {
3373
+ ...props,
3374
+ value: region || "",
3375
+ onChange: (e) => changeRegion(e.target.value),
3376
+ children: [!region && /* @__PURE__ */ jsx("option", {
3377
+ value: "",
3378
+ disabled: Boolean(region),
3379
+ hidden: Boolean(region),
3380
+ suppressHydrationWarning: true,
3381
+ children: placeholder || ""
3382
+ }, "placeholder"), regions.map((r) => /* @__PURE__ */ jsx("option", {
3383
+ value: r,
3384
+ suppressHydrationWarning: true,
3385
+ children: regionData.get(r).name
3386
+ }, r))]
3387
+ });
3388
+ }
3389
+ //#endregion
3390
+ export { Branch, ClientProvider, Currency, DateTime, Derive, GTProvider, LocaleSelector, Num, Plural, RegionSelector, RelativeTime, Static, T, Var, declareStatic, declareVar, decodeMsg, decodeOptions, decodeVars, derive, gtFallback, mFallback, msg, useDefaultLocale, useGT, useGTClass, useLocale, useLocaleDirection, useLocaleProperties, useLocaleSelector, useLocales, useMessages, useRegion, useRegionSelector, useSetLocale, useTranslations, useVersionId };
3391
+
3392
+ //# sourceMappingURL=client.mjs.map