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