@nice2dev/i18n 1.0.8 → 1.0.11
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/dist/index.cjs +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.mjs +653 -354
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as B } from "react/jsx-runtime";
|
|
2
|
-
import { useMemo as w, useContext as
|
|
2
|
+
import { useMemo as w, useContext as N, createContext as I, useEffect as L, useState as P, useCallback as Q } from "react";
|
|
3
3
|
const j = [
|
|
4
4
|
"en",
|
|
5
5
|
"pl",
|
|
@@ -22,7 +22,24 @@ const j = [
|
|
|
22
22
|
"ja",
|
|
23
23
|
"ko",
|
|
24
24
|
"zh",
|
|
25
|
-
"ar"
|
|
25
|
+
"ar",
|
|
26
|
+
// ── Added in v1.0.10 (G4.1 — 30+ languages) ──
|
|
27
|
+
"hi",
|
|
28
|
+
// Hindi
|
|
29
|
+
"bn",
|
|
30
|
+
// Bengali
|
|
31
|
+
"th",
|
|
32
|
+
// Thai
|
|
33
|
+
"vi",
|
|
34
|
+
// Vietnamese
|
|
35
|
+
"id",
|
|
36
|
+
// Indonesian
|
|
37
|
+
"sw",
|
|
38
|
+
// Swahili
|
|
39
|
+
"fil",
|
|
40
|
+
// Filipino
|
|
41
|
+
"ms"
|
|
42
|
+
// Malay
|
|
26
43
|
], ve = {
|
|
27
44
|
// ── Global / Generic ──
|
|
28
45
|
ok: "OK",
|
|
@@ -3697,7 +3714,7 @@ const j = [
|
|
|
3697
3714
|
"wm.minimizeAll": "Minimalizovat vše",
|
|
3698
3715
|
"wm.newWindow": "Nové okno",
|
|
3699
3716
|
"wm.moveToFront": "Přenést dopředu"
|
|
3700
|
-
},
|
|
3717
|
+
}, Ne = {
|
|
3701
3718
|
ok: "OK",
|
|
3702
3719
|
cancel: "Zrušiť",
|
|
3703
3720
|
save: "Uložiť",
|
|
@@ -3760,7 +3777,7 @@ const j = [
|
|
|
3760
3777
|
"lang.ko": "Kórejčina",
|
|
3761
3778
|
"lang.zh": "Čínština",
|
|
3762
3779
|
"lang.ar": "Arabčina"
|
|
3763
|
-
},
|
|
3780
|
+
}, Fe = {
|
|
3764
3781
|
ok: "OK",
|
|
3765
3782
|
cancel: "Mégse",
|
|
3766
3783
|
save: "Mentés",
|
|
@@ -5748,6 +5765,94 @@ const j = [
|
|
|
5748
5765
|
"wm.minimizeAll": "تصغير الكل",
|
|
5749
5766
|
"wm.newWindow": "نافذة جديدة",
|
|
5750
5767
|
"wm.moveToFront": "نقل إلى الأمام"
|
|
5768
|
+
}, He = {
|
|
5769
|
+
ok: "ठीक है",
|
|
5770
|
+
cancel: "रद्द करें",
|
|
5771
|
+
save: "सहेजें",
|
|
5772
|
+
close: "बंद करें",
|
|
5773
|
+
yes: "हाँ",
|
|
5774
|
+
no: "नहीं",
|
|
5775
|
+
loading: "लोड हो रहा है…",
|
|
5776
|
+
error: "त्रुटि",
|
|
5777
|
+
success: "सफलता",
|
|
5778
|
+
search: "खोजें"
|
|
5779
|
+
}, Ke = {
|
|
5780
|
+
ok: "ঠিক আছে",
|
|
5781
|
+
cancel: "বাতিল",
|
|
5782
|
+
save: "সংরক্ষণ",
|
|
5783
|
+
close: "বন্ধ",
|
|
5784
|
+
yes: "হ্যাঁ",
|
|
5785
|
+
no: "না",
|
|
5786
|
+
loading: "লোড হচ্ছে…",
|
|
5787
|
+
error: "ত্রুটি",
|
|
5788
|
+
success: "সফল",
|
|
5789
|
+
search: "অনুসন্ধান"
|
|
5790
|
+
}, Ve = {
|
|
5791
|
+
ok: "ตกลง",
|
|
5792
|
+
cancel: "ยกเลิก",
|
|
5793
|
+
save: "บันทึก",
|
|
5794
|
+
close: "ปิด",
|
|
5795
|
+
yes: "ใช่",
|
|
5796
|
+
no: "ไม่",
|
|
5797
|
+
loading: "กำลังโหลด…",
|
|
5798
|
+
error: "ข้อผิดพลาด",
|
|
5799
|
+
success: "สำเร็จ",
|
|
5800
|
+
search: "ค้นหา"
|
|
5801
|
+
}, We = {
|
|
5802
|
+
ok: "OK",
|
|
5803
|
+
cancel: "Hủy",
|
|
5804
|
+
save: "Lưu",
|
|
5805
|
+
close: "Đóng",
|
|
5806
|
+
yes: "Có",
|
|
5807
|
+
no: "Không",
|
|
5808
|
+
loading: "Đang tải…",
|
|
5809
|
+
error: "Lỗi",
|
|
5810
|
+
success: "Thành công",
|
|
5811
|
+
search: "Tìm kiếm"
|
|
5812
|
+
}, Ze = {
|
|
5813
|
+
ok: "OK",
|
|
5814
|
+
cancel: "Batal",
|
|
5815
|
+
save: "Simpan",
|
|
5816
|
+
close: "Tutup",
|
|
5817
|
+
yes: "Ya",
|
|
5818
|
+
no: "Tidak",
|
|
5819
|
+
loading: "Memuat…",
|
|
5820
|
+
error: "Kesalahan",
|
|
5821
|
+
success: "Berhasil",
|
|
5822
|
+
search: "Cari"
|
|
5823
|
+
}, qe = {
|
|
5824
|
+
ok: "Sawa",
|
|
5825
|
+
cancel: "Ghairi",
|
|
5826
|
+
save: "Hifadhi",
|
|
5827
|
+
close: "Funga",
|
|
5828
|
+
yes: "Ndiyo",
|
|
5829
|
+
no: "Hapana",
|
|
5830
|
+
loading: "Inapakia…",
|
|
5831
|
+
error: "Hitilafu",
|
|
5832
|
+
success: "Imefanikiwa",
|
|
5833
|
+
search: "Tafuta"
|
|
5834
|
+
}, Ge = {
|
|
5835
|
+
ok: "OK",
|
|
5836
|
+
cancel: "Kanselahin",
|
|
5837
|
+
save: "I-save",
|
|
5838
|
+
close: "Isara",
|
|
5839
|
+
yes: "Oo",
|
|
5840
|
+
no: "Hindi",
|
|
5841
|
+
loading: "Naglo-load…",
|
|
5842
|
+
error: "Error",
|
|
5843
|
+
success: "Tagumpay",
|
|
5844
|
+
search: "Maghanap"
|
|
5845
|
+
}, $e = {
|
|
5846
|
+
ok: "OK",
|
|
5847
|
+
cancel: "Batal",
|
|
5848
|
+
save: "Simpan",
|
|
5849
|
+
close: "Tutup",
|
|
5850
|
+
yes: "Ya",
|
|
5851
|
+
no: "Tidak",
|
|
5852
|
+
loading: "Memuat…",
|
|
5853
|
+
error: "Ralat",
|
|
5854
|
+
success: "Berjaya",
|
|
5855
|
+
search: "Cari"
|
|
5751
5856
|
}, v = {
|
|
5752
5857
|
en: ve,
|
|
5753
5858
|
pl: be,
|
|
@@ -5762,36 +5867,45 @@ const j = [
|
|
|
5762
5867
|
da: Te,
|
|
5763
5868
|
fi: Pe,
|
|
5764
5869
|
cs: je,
|
|
5765
|
-
sk:
|
|
5766
|
-
hu:
|
|
5870
|
+
sk: Ne,
|
|
5871
|
+
hu: Fe,
|
|
5767
5872
|
ro: Me,
|
|
5768
5873
|
bg: Oe,
|
|
5769
5874
|
uk: Re,
|
|
5770
5875
|
ja: Le,
|
|
5771
5876
|
ko: Be,
|
|
5772
5877
|
zh: Ie,
|
|
5773
|
-
ar: Ue
|
|
5774
|
-
|
|
5878
|
+
ar: Ue,
|
|
5879
|
+
hi: He,
|
|
5880
|
+
bn: Ke,
|
|
5881
|
+
th: Ve,
|
|
5882
|
+
vi: We,
|
|
5883
|
+
id: Ze,
|
|
5884
|
+
sw: qe,
|
|
5885
|
+
fil: Ge,
|
|
5886
|
+
ms: $e
|
|
5887
|
+
}, Je = (e, o) => o, X = I(Je), Vo = ({
|
|
5775
5888
|
t: e,
|
|
5776
5889
|
lang: o = "en",
|
|
5777
5890
|
overrides: t,
|
|
5778
5891
|
children: a
|
|
5779
5892
|
}) => {
|
|
5780
5893
|
const n = w(() => {
|
|
5781
|
-
if (e)
|
|
5894
|
+
if (e)
|
|
5895
|
+
return e;
|
|
5782
5896
|
const r = v[o] ?? v.en, i = t ? { ...r, ...t } : r;
|
|
5783
|
-
return (s,
|
|
5897
|
+
return (s, l) => i[s] ?? l;
|
|
5784
5898
|
}, [e, o, t]);
|
|
5785
5899
|
return /* @__PURE__ */ B(X.Provider, { value: n, children: a });
|
|
5786
5900
|
};
|
|
5787
|
-
function
|
|
5788
|
-
return { t:
|
|
5901
|
+
function Wo() {
|
|
5902
|
+
return { t: N(X) };
|
|
5789
5903
|
}
|
|
5790
|
-
function
|
|
5904
|
+
function Zo(e = "en", o) {
|
|
5791
5905
|
const t = v[e] ?? v.en, a = o ? { ...t, ...o } : t;
|
|
5792
5906
|
return (n, r) => a[n] ?? r;
|
|
5793
5907
|
}
|
|
5794
|
-
function
|
|
5908
|
+
function qo(e, o = {}) {
|
|
5795
5909
|
let t = e.replace(/\{(\w+)\}/g, (a, n) => {
|
|
5796
5910
|
const r = o[n];
|
|
5797
5911
|
return r !== void 0 ? String(r) : a;
|
|
@@ -5804,14 +5918,15 @@ function Bo(e, o = {}) {
|
|
|
5804
5918
|
}
|
|
5805
5919
|
), t;
|
|
5806
5920
|
}
|
|
5807
|
-
function
|
|
5921
|
+
function _e(e) {
|
|
5808
5922
|
return j.includes(e);
|
|
5809
5923
|
}
|
|
5810
|
-
function
|
|
5924
|
+
function Go() {
|
|
5811
5925
|
var o;
|
|
5812
|
-
if (typeof navigator > "u")
|
|
5926
|
+
if (typeof navigator > "u")
|
|
5927
|
+
return "en";
|
|
5813
5928
|
const e = (o = navigator.language) == null ? void 0 : o.split("-")[0];
|
|
5814
|
-
return
|
|
5929
|
+
return _e(e) ? e : "en";
|
|
5815
5930
|
}
|
|
5816
5931
|
function ee(e, o) {
|
|
5817
5932
|
var r;
|
|
@@ -5858,13 +5973,21 @@ function ee(e, o) {
|
|
|
5858
5973
|
return "other";
|
|
5859
5974
|
// ── Arabic (zero/one/two/few/many/other) ────────────────
|
|
5860
5975
|
case "ar": {
|
|
5861
|
-
if (e === 0)
|
|
5862
|
-
|
|
5863
|
-
if (e ===
|
|
5976
|
+
if (e === 0)
|
|
5977
|
+
return "zero";
|
|
5978
|
+
if (e === 1)
|
|
5979
|
+
return "one";
|
|
5980
|
+
if (e === 2)
|
|
5981
|
+
return "two";
|
|
5864
5982
|
const i = e % 100;
|
|
5865
5983
|
return i >= 3 && i <= 10 ? "few" : i >= 11 && i <= 99 ? "many" : "other";
|
|
5866
5984
|
}
|
|
5867
5985
|
default:
|
|
5986
|
+
if (typeof Intl < "u" && typeof Intl.PluralRules == "function")
|
|
5987
|
+
try {
|
|
5988
|
+
return new Intl.PluralRules(o).select(e);
|
|
5989
|
+
} catch {
|
|
5990
|
+
}
|
|
5868
5991
|
return a === 1 && n === 0 ? "one" : "other";
|
|
5869
5992
|
}
|
|
5870
5993
|
}
|
|
@@ -5894,29 +6017,35 @@ function oe(e, o) {
|
|
|
5894
6017
|
case "da":
|
|
5895
6018
|
case "fi":
|
|
5896
6019
|
default:
|
|
6020
|
+
if (typeof Intl < "u" && typeof Intl.PluralRules == "function")
|
|
6021
|
+
try {
|
|
6022
|
+
return new Intl.PluralRules(o, { type: "ordinal" }).select(e);
|
|
6023
|
+
} catch {
|
|
6024
|
+
}
|
|
5897
6025
|
return "other";
|
|
5898
6026
|
}
|
|
5899
6027
|
}
|
|
5900
|
-
function
|
|
6028
|
+
function Ye(e) {
|
|
5901
6029
|
var n;
|
|
5902
6030
|
if (e = e.trim(), !e.includes(","))
|
|
5903
6031
|
return { type: "simple", name: e };
|
|
5904
6032
|
const o = e.split(",").map((r) => r.trim()), t = o[0], a = (n = o[1]) == null ? void 0 : n.toLowerCase();
|
|
5905
|
-
if (!a || !t)
|
|
6033
|
+
if (!a || !t)
|
|
6034
|
+
return null;
|
|
5906
6035
|
if (a === "number")
|
|
5907
6036
|
return { type: "number", name: t, style: o[2] };
|
|
5908
6037
|
if (a === "date" || a === "time")
|
|
5909
6038
|
return { type: a, name: t, style: o[2] || "medium" };
|
|
5910
6039
|
if (a === "plural" || a === "select" || a === "selectordinal") {
|
|
5911
6040
|
const r = o.slice(2).join(",").trim(), i = {}, s = /(=?\w+)\s*\{([^{}]*(?:\{[^{}]*\}[^{}]*)*)\}/g;
|
|
5912
|
-
let
|
|
5913
|
-
for (; (
|
|
5914
|
-
i[
|
|
6041
|
+
let l;
|
|
6042
|
+
for (; (l = s.exec(r)) !== null; )
|
|
6043
|
+
i[l[1]] = l[2];
|
|
5915
6044
|
return { type: a, name: t, options: i };
|
|
5916
6045
|
}
|
|
5917
6046
|
return { type: "simple", name: t };
|
|
5918
6047
|
}
|
|
5919
|
-
function
|
|
6048
|
+
function Qe(e, o, t) {
|
|
5920
6049
|
const a = {};
|
|
5921
6050
|
switch (t) {
|
|
5922
6051
|
case "currency":
|
|
@@ -5931,7 +6060,7 @@ function Ke(e, o, t) {
|
|
|
5931
6060
|
}
|
|
5932
6061
|
return new Intl.NumberFormat(o, a).format(e);
|
|
5933
6062
|
}
|
|
5934
|
-
function
|
|
6063
|
+
function Xe(e, o, t) {
|
|
5935
6064
|
const a = e instanceof Date ? e : new Date(e);
|
|
5936
6065
|
let n;
|
|
5937
6066
|
switch (t) {
|
|
@@ -5951,7 +6080,7 @@ function Ze(e, o, t) {
|
|
|
5951
6080
|
}
|
|
5952
6081
|
return new Intl.DateTimeFormat(o, n).format(a);
|
|
5953
6082
|
}
|
|
5954
|
-
function
|
|
6083
|
+
function eo(e, o, t) {
|
|
5955
6084
|
const a = e instanceof Date ? e : new Date(e);
|
|
5956
6085
|
let n;
|
|
5957
6086
|
switch (t) {
|
|
@@ -5971,63 +6100,68 @@ function qe(e, o, t) {
|
|
|
5971
6100
|
}
|
|
5972
6101
|
return new Intl.DateTimeFormat(o, n).format(a);
|
|
5973
6102
|
}
|
|
5974
|
-
function
|
|
6103
|
+
function H(e, o, t) {
|
|
5975
6104
|
return e.replace(/#/g, String(t));
|
|
5976
6105
|
}
|
|
5977
|
-
function
|
|
6106
|
+
function oo(e, o = {}, t = {}) {
|
|
5978
6107
|
const a = t.lang || "en", n = t.locale || a, r = /\{([^{}]*(?:\{[^{}]*\}[^{}]*)*)\}/g;
|
|
5979
6108
|
return e.replace(r, (i, s) => {
|
|
5980
|
-
const
|
|
5981
|
-
if (!
|
|
5982
|
-
|
|
5983
|
-
|
|
5984
|
-
|
|
6109
|
+
const l = Ye(s);
|
|
6110
|
+
if (!l)
|
|
6111
|
+
return i;
|
|
6112
|
+
const d = o[l.name];
|
|
6113
|
+
if (d === void 0)
|
|
6114
|
+
return i;
|
|
6115
|
+
switch (l.type) {
|
|
5985
6116
|
case "simple":
|
|
5986
|
-
return String(
|
|
6117
|
+
return String(d);
|
|
5987
6118
|
case "number":
|
|
5988
|
-
return typeof
|
|
6119
|
+
return typeof d != "number" ? i : Qe(d, n, l.style);
|
|
5989
6120
|
case "date":
|
|
5990
|
-
return
|
|
6121
|
+
return Xe(d, n, l.style);
|
|
5991
6122
|
case "time":
|
|
5992
|
-
return
|
|
6123
|
+
return eo(d, n, l.style);
|
|
5993
6124
|
case "plural": {
|
|
5994
|
-
if (typeof
|
|
5995
|
-
|
|
5996
|
-
|
|
6125
|
+
if (typeof d != "number" || !l.options)
|
|
6126
|
+
return i;
|
|
6127
|
+
const m = ee(d, a), f = `=${d}`, u = l.options[f] ?? l.options[m] ?? l.options.other ?? "";
|
|
6128
|
+
return H(u, l.name, d);
|
|
5997
6129
|
}
|
|
5998
6130
|
case "selectordinal": {
|
|
5999
|
-
if (typeof
|
|
6000
|
-
|
|
6001
|
-
|
|
6131
|
+
if (typeof d != "number" || !l.options)
|
|
6132
|
+
return i;
|
|
6133
|
+
const m = oe(d, a), f = l.options[m] ?? l.options.other ?? "";
|
|
6134
|
+
return H(f, l.name, d);
|
|
6002
6135
|
}
|
|
6003
6136
|
case "select": {
|
|
6004
|
-
if (!
|
|
6005
|
-
|
|
6006
|
-
|
|
6137
|
+
if (!l.options)
|
|
6138
|
+
return i;
|
|
6139
|
+
const m = l.options[String(d)] ?? l.options.other ?? "";
|
|
6140
|
+
return H(m, l.name, d);
|
|
6007
6141
|
}
|
|
6008
6142
|
default:
|
|
6009
6143
|
return i;
|
|
6010
6144
|
}
|
|
6011
6145
|
});
|
|
6012
6146
|
}
|
|
6013
|
-
function
|
|
6147
|
+
function $o(e, o = "en") {
|
|
6014
6148
|
return function(a, n, r) {
|
|
6015
6149
|
const i = e[a] ?? n;
|
|
6016
|
-
return r ?
|
|
6150
|
+
return r ? oo(i, r, { lang: o }) : i;
|
|
6017
6151
|
};
|
|
6018
6152
|
}
|
|
6019
|
-
function
|
|
6153
|
+
function Jo(e, o, t = "en") {
|
|
6020
6154
|
const a = ee(e, t);
|
|
6021
6155
|
return (o[a] ?? o.other).replace(/#/g, String(e));
|
|
6022
6156
|
}
|
|
6023
|
-
function
|
|
6157
|
+
function _o(e, o, t = "en") {
|
|
6024
6158
|
const a = oe(e, t);
|
|
6025
6159
|
return (o[a] ?? o.other).replace(/#/g, String(e));
|
|
6026
6160
|
}
|
|
6027
|
-
function
|
|
6161
|
+
function Yo(e, o) {
|
|
6028
6162
|
return o[e] ?? o.other;
|
|
6029
6163
|
}
|
|
6030
|
-
const
|
|
6164
|
+
const ao = [
|
|
6031
6165
|
"ar",
|
|
6032
6166
|
// Arabic
|
|
6033
6167
|
"he",
|
|
@@ -6042,26 +6176,27 @@ const $e = [
|
|
|
6042
6176
|
// Pashto
|
|
6043
6177
|
];
|
|
6044
6178
|
function ae(e) {
|
|
6045
|
-
return
|
|
6179
|
+
return ao.includes(e);
|
|
6046
6180
|
}
|
|
6047
|
-
function
|
|
6181
|
+
function to(e) {
|
|
6048
6182
|
return ae(e) ? "rtl" : "ltr";
|
|
6049
6183
|
}
|
|
6050
|
-
function
|
|
6051
|
-
if (typeof document > "u")
|
|
6052
|
-
|
|
6184
|
+
function no(e) {
|
|
6185
|
+
if (typeof document > "u")
|
|
6186
|
+
return;
|
|
6187
|
+
const o = to(e);
|
|
6053
6188
|
document.documentElement.setAttribute("dir", o), document.documentElement.setAttribute("lang", e);
|
|
6054
6189
|
}
|
|
6055
|
-
function
|
|
6190
|
+
function Qo() {
|
|
6056
6191
|
return typeof document > "u" ? "ltr" : document.documentElement.getAttribute("dir") || "ltr";
|
|
6057
6192
|
}
|
|
6058
|
-
function
|
|
6193
|
+
function ro(e, o) {
|
|
6059
6194
|
return o ? e.rtl : e.ltr;
|
|
6060
6195
|
}
|
|
6061
|
-
function
|
|
6196
|
+
function Xo(e) {
|
|
6062
6197
|
return e === "left" ? "right" : "left";
|
|
6063
6198
|
}
|
|
6064
|
-
function
|
|
6199
|
+
function io(e, o) {
|
|
6065
6200
|
return o && {
|
|
6066
6201
|
left: "right",
|
|
6067
6202
|
right: "left",
|
|
@@ -6071,7 +6206,7 @@ function Qe(e, o) {
|
|
|
6071
6206
|
"flex-end": "flex-start"
|
|
6072
6207
|
}[e] || e;
|
|
6073
6208
|
}
|
|
6074
|
-
function
|
|
6209
|
+
function so(e) {
|
|
6075
6210
|
return {
|
|
6076
6211
|
// Margins
|
|
6077
6212
|
"margin-left": "margin-inline-start",
|
|
@@ -6106,30 +6241,33 @@ const q = I({
|
|
|
6106
6241
|
isRTL: !1,
|
|
6107
6242
|
flip: (e) => e,
|
|
6108
6243
|
value: (e) => e.ltr
|
|
6109
|
-
}),
|
|
6244
|
+
}), ea = ({
|
|
6110
6245
|
lang: e,
|
|
6111
6246
|
autoSetDocument: o = !0,
|
|
6112
6247
|
children: t
|
|
6113
6248
|
}) => {
|
|
6114
6249
|
const a = ae(e), n = a ? "rtl" : "ltr";
|
|
6115
6250
|
L(() => {
|
|
6116
|
-
o &&
|
|
6251
|
+
o && no(e);
|
|
6117
6252
|
}, [e, o]);
|
|
6118
|
-
const r = w(
|
|
6119
|
-
|
|
6120
|
-
|
|
6121
|
-
|
|
6122
|
-
|
|
6123
|
-
|
|
6253
|
+
const r = w(
|
|
6254
|
+
() => ({
|
|
6255
|
+
dir: n,
|
|
6256
|
+
isRTL: a,
|
|
6257
|
+
flip: (i) => io(i, a),
|
|
6258
|
+
value: (i) => ro(i, a)
|
|
6259
|
+
}),
|
|
6260
|
+
[n, a]
|
|
6261
|
+
);
|
|
6124
6262
|
return /* @__PURE__ */ B(q.Provider, { value: r, children: t });
|
|
6125
6263
|
};
|
|
6126
|
-
function
|
|
6127
|
-
return
|
|
6264
|
+
function oa() {
|
|
6265
|
+
return N(q);
|
|
6128
6266
|
}
|
|
6129
|
-
function
|
|
6130
|
-
return
|
|
6267
|
+
function aa() {
|
|
6268
|
+
return N(q).isRTL;
|
|
6131
6269
|
}
|
|
6132
|
-
function
|
|
6270
|
+
function ta(e) {
|
|
6133
6271
|
const o = [], t = [
|
|
6134
6272
|
"left",
|
|
6135
6273
|
"right",
|
|
@@ -6141,10 +6279,10 @@ function Jo(e) {
|
|
|
6141
6279
|
"border-right"
|
|
6142
6280
|
];
|
|
6143
6281
|
for (const [a, n] of Object.entries(e))
|
|
6144
|
-
t.includes(a) && o.push(`Use logical property instead of '${a}' → '${
|
|
6282
|
+
t.includes(a) && o.push(`Use logical property instead of '${a}' → '${so(a)}'`), a === "text-align" && (n === "left" || n === "right") && o.push(`Use 'text-align: start/end' instead of 'text-align: ${n}'`), a === "float" && (n === "left" || n === "right") && o.push(`Use flexbox or grid instead of 'float: ${n}' for RTL support`);
|
|
6145
6283
|
return o;
|
|
6146
6284
|
}
|
|
6147
|
-
const
|
|
6285
|
+
const K = {
|
|
6148
6286
|
// Direction multiplier: 1 for LTR, -1 for RTL
|
|
6149
6287
|
dirMultiplier: "--nice-dir-multiplier",
|
|
6150
6288
|
// Inline start (left in LTR, right in RTL)
|
|
@@ -6152,24 +6290,25 @@ const H = {
|
|
|
6152
6290
|
// Inline end (right in LTR, left in RTL)
|
|
6153
6291
|
inlineEnd: "--nice-inline-end"
|
|
6154
6292
|
};
|
|
6155
|
-
function
|
|
6293
|
+
function na(e) {
|
|
6156
6294
|
return {
|
|
6157
|
-
[
|
|
6158
|
-
[
|
|
6159
|
-
[
|
|
6295
|
+
[K.dirMultiplier]: e ? "-1" : "1",
|
|
6296
|
+
[K.inlineStart]: e ? "right" : "left",
|
|
6297
|
+
[K.inlineEnd]: e ? "left" : "right"
|
|
6160
6298
|
};
|
|
6161
6299
|
}
|
|
6162
|
-
function
|
|
6300
|
+
function ra() {
|
|
6163
6301
|
return Object.keys(v.en);
|
|
6164
6302
|
}
|
|
6165
|
-
function
|
|
6166
|
-
if (e === "en")
|
|
6303
|
+
function lo(e) {
|
|
6304
|
+
if (e === "en")
|
|
6305
|
+
return [];
|
|
6167
6306
|
const o = v.en, t = v[e], a = [];
|
|
6168
6307
|
for (const [n, r] of Object.entries(o))
|
|
6169
6308
|
t[n] || a.push({ key: n, englishValue: r });
|
|
6170
6309
|
return a;
|
|
6171
6310
|
}
|
|
6172
|
-
function
|
|
6311
|
+
function co(e) {
|
|
6173
6312
|
const o = Object.keys(v.en).length, t = Object.keys(v[e]).length, a = o - t, n = Math.round(t / o * 100);
|
|
6174
6313
|
return {
|
|
6175
6314
|
lang: e,
|
|
@@ -6179,10 +6318,10 @@ function oo(e) {
|
|
|
6179
6318
|
coverage: n
|
|
6180
6319
|
};
|
|
6181
6320
|
}
|
|
6182
|
-
function
|
|
6183
|
-
return j.map((e) =>
|
|
6321
|
+
function mo() {
|
|
6322
|
+
return j.map((e) => co(e));
|
|
6184
6323
|
}
|
|
6185
|
-
function
|
|
6324
|
+
function ia(e, o) {
|
|
6186
6325
|
const t = o.map((a) => {
|
|
6187
6326
|
const n = a.translated.replace(/'/g, "\\'");
|
|
6188
6327
|
return ` '${a.key}': '${n}',`;
|
|
@@ -6194,8 +6333,8 @@ ${t.join(`
|
|
|
6194
6333
|
`)}
|
|
6195
6334
|
}`;
|
|
6196
6335
|
}
|
|
6197
|
-
function
|
|
6198
|
-
const e =
|
|
6336
|
+
function sa() {
|
|
6337
|
+
const e = mo();
|
|
6199
6338
|
let o = `# Translation Coverage Report
|
|
6200
6339
|
|
|
6201
6340
|
Generated: ${(/* @__PURE__ */ new Date()).toISOString()}
|
|
@@ -6218,7 +6357,7 @@ Generated: ${(/* @__PURE__ */ new Date()).toISOString()}
|
|
|
6218
6357
|
o += `### ${t.lang.toUpperCase()} (${t.coverage}% complete)
|
|
6219
6358
|
|
|
6220
6359
|
`;
|
|
6221
|
-
const a =
|
|
6360
|
+
const a = lo(t.lang);
|
|
6222
6361
|
o += `Missing ${a.length} keys:
|
|
6223
6362
|
|
|
6224
6363
|
`, o += "```\n", o += a.slice(0, 10).map((n) => n.key).join(`
|
|
@@ -6227,7 +6366,7 @@ Generated: ${(/* @__PURE__ */ new Date()).toISOString()}
|
|
|
6227
6366
|
}
|
|
6228
6367
|
return o;
|
|
6229
6368
|
}
|
|
6230
|
-
const
|
|
6369
|
+
const uo = {
|
|
6231
6370
|
en: "en-US",
|
|
6232
6371
|
pl: "pl-PL",
|
|
6233
6372
|
de: "de-DE",
|
|
@@ -6249,12 +6388,20 @@ const to = {
|
|
|
6249
6388
|
ja: "ja-JP",
|
|
6250
6389
|
ko: "ko-KR",
|
|
6251
6390
|
zh: "zh-CN",
|
|
6252
|
-
ar: "ar-SA"
|
|
6391
|
+
ar: "ar-SA",
|
|
6392
|
+
hi: "hi-IN",
|
|
6393
|
+
bn: "bn-BD",
|
|
6394
|
+
th: "th-TH",
|
|
6395
|
+
vi: "vi-VN",
|
|
6396
|
+
id: "id-ID",
|
|
6397
|
+
sw: "sw-KE",
|
|
6398
|
+
fil: "fil-PH",
|
|
6399
|
+
ms: "ms-MY"
|
|
6253
6400
|
};
|
|
6254
6401
|
function D(e) {
|
|
6255
|
-
return
|
|
6402
|
+
return uo[e] ?? "en-US";
|
|
6256
6403
|
}
|
|
6257
|
-
function
|
|
6404
|
+
function po(e, o = "medium") {
|
|
6258
6405
|
const t = D(e), a = new Intl.DateTimeFormat(t, { dateStyle: o });
|
|
6259
6406
|
return {
|
|
6260
6407
|
format: (n) => a.format(n instanceof Date ? n : new Date(n)),
|
|
@@ -6262,22 +6409,22 @@ function no(e, o = "medium") {
|
|
|
6262
6409
|
const i = n instanceof Date ? n : new Date(n), s = r instanceof Date ? r : new Date(r);
|
|
6263
6410
|
return a.formatRange(i, s);
|
|
6264
6411
|
},
|
|
6265
|
-
formatRelative: (n) =>
|
|
6412
|
+
formatRelative: (n) => ko(n instanceof Date ? n : new Date(n), t)
|
|
6266
6413
|
};
|
|
6267
6414
|
}
|
|
6268
|
-
function
|
|
6269
|
-
return w(() =>
|
|
6415
|
+
function la(e, o = "medium") {
|
|
6416
|
+
return w(() => po(e, o), [e, o]);
|
|
6270
6417
|
}
|
|
6271
|
-
function
|
|
6418
|
+
function go(e, o = "short") {
|
|
6272
6419
|
const t = D(e), a = new Intl.DateTimeFormat(t, { timeStyle: o });
|
|
6273
6420
|
return {
|
|
6274
6421
|
format: (n) => a.format(n instanceof Date ? n : new Date(n))
|
|
6275
6422
|
};
|
|
6276
6423
|
}
|
|
6277
|
-
function
|
|
6278
|
-
return w(() =>
|
|
6424
|
+
function da(e, o = "short") {
|
|
6425
|
+
return w(() => go(e, o), [e, o]);
|
|
6279
6426
|
}
|
|
6280
|
-
function
|
|
6427
|
+
function ho(e) {
|
|
6281
6428
|
const o = D(e);
|
|
6282
6429
|
return {
|
|
6283
6430
|
format: (t) => new Intl.NumberFormat(o).format(t),
|
|
@@ -6285,58 +6432,200 @@ function io(e) {
|
|
|
6285
6432
|
formatPercent: (t) => new Intl.NumberFormat(o, { style: "percent", maximumFractionDigits: 1 }).format(t)
|
|
6286
6433
|
};
|
|
6287
6434
|
}
|
|
6288
|
-
function
|
|
6289
|
-
return w(() =>
|
|
6435
|
+
function ca(e) {
|
|
6436
|
+
return w(() => ho(e), [e]);
|
|
6290
6437
|
}
|
|
6291
|
-
function
|
|
6438
|
+
function fo(e, o = "USD") {
|
|
6292
6439
|
const t = D(e), a = new Intl.NumberFormat(t, { style: "currency", currency: o });
|
|
6293
6440
|
return {
|
|
6294
6441
|
format: (n) => a.format(n)
|
|
6295
6442
|
};
|
|
6296
6443
|
}
|
|
6297
|
-
function
|
|
6298
|
-
return w(() =>
|
|
6444
|
+
function ma(e, o = "USD") {
|
|
6445
|
+
return w(() => fo(e, o), [e, o]);
|
|
6299
6446
|
}
|
|
6300
|
-
function
|
|
6447
|
+
function ko(e, o) {
|
|
6301
6448
|
const t = Date.now(), a = e.getTime() - t, n = Math.abs(a), r = new Intl.RelativeTimeFormat(o, { numeric: "auto" });
|
|
6302
6449
|
return n < 6e4 ? r.format(Math.round(a / 1e3), "second") : n < 36e5 ? r.format(Math.round(a / 6e4), "minute") : n < 864e5 ? r.format(Math.round(a / 36e5), "hour") : n < 2592e6 ? r.format(Math.round(a / 864e5), "day") : n < 31536e6 ? r.format(Math.round(a / 2592e6), "month") : r.format(Math.round(a / 31536e6), "year");
|
|
6303
6450
|
}
|
|
6304
6451
|
const te = [
|
|
6305
|
-
{
|
|
6306
|
-
|
|
6307
|
-
|
|
6308
|
-
|
|
6309
|
-
|
|
6310
|
-
|
|
6311
|
-
|
|
6312
|
-
|
|
6313
|
-
|
|
6314
|
-
|
|
6452
|
+
{
|
|
6453
|
+
en: "Save",
|
|
6454
|
+
translations: {
|
|
6455
|
+
pl: "Zapisz",
|
|
6456
|
+
de: "Speichern",
|
|
6457
|
+
fr: "Enregistrer",
|
|
6458
|
+
es: "Guardar",
|
|
6459
|
+
uk: "Зберегти",
|
|
6460
|
+
cs: "Uložit",
|
|
6461
|
+
ja: "保存",
|
|
6462
|
+
ko: "저장",
|
|
6463
|
+
zh: "保存",
|
|
6464
|
+
ar: "حفظ"
|
|
6465
|
+
}
|
|
6466
|
+
},
|
|
6467
|
+
{
|
|
6468
|
+
en: "Cancel",
|
|
6469
|
+
translations: {
|
|
6470
|
+
pl: "Anuluj",
|
|
6471
|
+
de: "Abbrechen",
|
|
6472
|
+
fr: "Annuler",
|
|
6473
|
+
es: "Cancelar",
|
|
6474
|
+
uk: "Скасувати",
|
|
6475
|
+
cs: "Zrušit",
|
|
6476
|
+
ja: "キャンセル",
|
|
6477
|
+
ko: "취소",
|
|
6478
|
+
zh: "取消",
|
|
6479
|
+
ar: "إلغاء"
|
|
6480
|
+
}
|
|
6481
|
+
},
|
|
6482
|
+
{
|
|
6483
|
+
en: "Delete",
|
|
6484
|
+
translations: {
|
|
6485
|
+
pl: "Usuń",
|
|
6486
|
+
de: "Löschen",
|
|
6487
|
+
fr: "Supprimer",
|
|
6488
|
+
es: "Eliminar",
|
|
6489
|
+
uk: "Видалити",
|
|
6490
|
+
cs: "Smazat",
|
|
6491
|
+
ja: "削除",
|
|
6492
|
+
ko: "삭제",
|
|
6493
|
+
zh: "删除",
|
|
6494
|
+
ar: "حذف"
|
|
6495
|
+
}
|
|
6496
|
+
},
|
|
6497
|
+
{
|
|
6498
|
+
en: "Edit",
|
|
6499
|
+
translations: {
|
|
6500
|
+
pl: "Edytuj",
|
|
6501
|
+
de: "Bearbeiten",
|
|
6502
|
+
fr: "Modifier",
|
|
6503
|
+
es: "Editar",
|
|
6504
|
+
uk: "Редагувати",
|
|
6505
|
+
cs: "Upravit",
|
|
6506
|
+
ja: "編集",
|
|
6507
|
+
ko: "편집",
|
|
6508
|
+
zh: "编辑",
|
|
6509
|
+
ar: "تعديل"
|
|
6510
|
+
}
|
|
6511
|
+
},
|
|
6512
|
+
{
|
|
6513
|
+
en: "Add",
|
|
6514
|
+
translations: {
|
|
6515
|
+
pl: "Dodaj",
|
|
6516
|
+
de: "Hinzufügen",
|
|
6517
|
+
fr: "Ajouter",
|
|
6518
|
+
es: "Añadir",
|
|
6519
|
+
uk: "Додати",
|
|
6520
|
+
cs: "Přidat",
|
|
6521
|
+
ja: "追加",
|
|
6522
|
+
ko: "추가",
|
|
6523
|
+
zh: "添加",
|
|
6524
|
+
ar: "إضافة"
|
|
6525
|
+
}
|
|
6526
|
+
},
|
|
6527
|
+
{
|
|
6528
|
+
en: "Search",
|
|
6529
|
+
translations: {
|
|
6530
|
+
pl: "Szukaj",
|
|
6531
|
+
de: "Suchen",
|
|
6532
|
+
fr: "Rechercher",
|
|
6533
|
+
es: "Buscar",
|
|
6534
|
+
uk: "Шукати",
|
|
6535
|
+
cs: "Hledat",
|
|
6536
|
+
ja: "検索",
|
|
6537
|
+
ko: "검색",
|
|
6538
|
+
zh: "搜索",
|
|
6539
|
+
ar: "بحث"
|
|
6540
|
+
}
|
|
6541
|
+
},
|
|
6542
|
+
{
|
|
6543
|
+
en: "Settings",
|
|
6544
|
+
translations: {
|
|
6545
|
+
pl: "Ustawienia",
|
|
6546
|
+
de: "Einstellungen",
|
|
6547
|
+
fr: "Paramètres",
|
|
6548
|
+
es: "Configuración",
|
|
6549
|
+
uk: "Налаштування",
|
|
6550
|
+
cs: "Nastavení",
|
|
6551
|
+
ja: "設定",
|
|
6552
|
+
ko: "설정",
|
|
6553
|
+
zh: "设置",
|
|
6554
|
+
ar: "إعدادات"
|
|
6555
|
+
}
|
|
6556
|
+
},
|
|
6557
|
+
{
|
|
6558
|
+
en: "Loading",
|
|
6559
|
+
translations: {
|
|
6560
|
+
pl: "Ładowanie",
|
|
6561
|
+
de: "Laden",
|
|
6562
|
+
fr: "Chargement",
|
|
6563
|
+
es: "Cargando",
|
|
6564
|
+
uk: "Завантаження",
|
|
6565
|
+
cs: "Načítání",
|
|
6566
|
+
ja: "読み込み中",
|
|
6567
|
+
ko: "로딩 중",
|
|
6568
|
+
zh: "加载中",
|
|
6569
|
+
ar: "جاري التحميل"
|
|
6570
|
+
}
|
|
6571
|
+
},
|
|
6572
|
+
{
|
|
6573
|
+
en: "Error",
|
|
6574
|
+
translations: {
|
|
6575
|
+
pl: "Błąd",
|
|
6576
|
+
de: "Fehler",
|
|
6577
|
+
fr: "Erreur",
|
|
6578
|
+
es: "Error",
|
|
6579
|
+
uk: "Помилка",
|
|
6580
|
+
cs: "Chyba",
|
|
6581
|
+
ja: "エラー",
|
|
6582
|
+
ko: "오류",
|
|
6583
|
+
zh: "错误",
|
|
6584
|
+
ar: "خطأ"
|
|
6585
|
+
}
|
|
6586
|
+
},
|
|
6587
|
+
{
|
|
6588
|
+
en: "Success",
|
|
6589
|
+
translations: {
|
|
6590
|
+
pl: "Sukces",
|
|
6591
|
+
de: "Erfolg",
|
|
6592
|
+
fr: "Succès",
|
|
6593
|
+
es: "Éxito",
|
|
6594
|
+
uk: "Успіх",
|
|
6595
|
+
cs: "Úspěch",
|
|
6596
|
+
ja: "成功",
|
|
6597
|
+
ko: "성공",
|
|
6598
|
+
zh: "成功",
|
|
6599
|
+
ar: "نجاح"
|
|
6600
|
+
}
|
|
6601
|
+
}
|
|
6315
6602
|
];
|
|
6316
|
-
function
|
|
6317
|
-
const t = te.find(
|
|
6318
|
-
(a) => a.en.toLowerCase() === e.toLowerCase()
|
|
6319
|
-
);
|
|
6603
|
+
function wo(e, o) {
|
|
6604
|
+
const t = te.find((a) => a.en.toLowerCase() === e.toLowerCase());
|
|
6320
6605
|
return t == null ? void 0 : t.translations[o];
|
|
6321
6606
|
}
|
|
6322
|
-
function
|
|
6607
|
+
function ua(e, o, t = 0.8) {
|
|
6323
6608
|
const a = v.en, n = v[o], r = e.toLowerCase().trim();
|
|
6324
6609
|
let i;
|
|
6325
|
-
for (const [s,
|
|
6326
|
-
const
|
|
6327
|
-
if (!
|
|
6328
|
-
|
|
6329
|
-
|
|
6610
|
+
for (const [s, l] of Object.entries(a)) {
|
|
6611
|
+
const d = n[s];
|
|
6612
|
+
if (!d)
|
|
6613
|
+
continue;
|
|
6614
|
+
const m = vo(r, l.toLowerCase().trim());
|
|
6615
|
+
m >= t && (!i || m > i.similarity) && (i = { key: s, english: l, translated: d, similarity: m });
|
|
6330
6616
|
}
|
|
6331
6617
|
return i;
|
|
6332
6618
|
}
|
|
6333
|
-
function
|
|
6334
|
-
return te.filter((o) => o.translations[e] != null).map((o) => ({
|
|
6619
|
+
function pa(e) {
|
|
6620
|
+
return te.filter((o) => o.translations[e] != null).map((o) => ({
|
|
6621
|
+
en: o.en,
|
|
6622
|
+
translation: o.translations[e]
|
|
6623
|
+
}));
|
|
6335
6624
|
}
|
|
6336
|
-
function
|
|
6625
|
+
function ga(e) {
|
|
6337
6626
|
const o = v[e], t = v.en, a = [];
|
|
6338
6627
|
for (const [n, r] of Object.entries(t)) {
|
|
6339
|
-
const i =
|
|
6628
|
+
const i = wo(r, e), s = o[n];
|
|
6340
6629
|
i && s && s !== i && a.push({ key: n, currentTranslation: s, glossaryTranslation: i });
|
|
6341
6630
|
}
|
|
6342
6631
|
return a;
|
|
@@ -6347,9 +6636,11 @@ function J(e) {
|
|
|
6347
6636
|
o.add(e.substring(t, t + 2));
|
|
6348
6637
|
return o;
|
|
6349
6638
|
}
|
|
6350
|
-
function
|
|
6351
|
-
if (e === o)
|
|
6352
|
-
|
|
6639
|
+
function vo(e, o) {
|
|
6640
|
+
if (e === o)
|
|
6641
|
+
return 1;
|
|
6642
|
+
if (e.length < 2 || o.length < 2)
|
|
6643
|
+
return 0;
|
|
6353
6644
|
const t = J(e), a = J(o);
|
|
6354
6645
|
let n = 0;
|
|
6355
6646
|
for (const r of t)
|
|
@@ -6424,14 +6715,14 @@ function G() {
|
|
|
6424
6715
|
return "UTC";
|
|
6425
6716
|
}
|
|
6426
6717
|
}
|
|
6427
|
-
function
|
|
6718
|
+
function ha(e) {
|
|
6428
6719
|
try {
|
|
6429
6720
|
return new Intl.DateTimeFormat("en", { timeZone: e }), !0;
|
|
6430
6721
|
} catch {
|
|
6431
6722
|
return !1;
|
|
6432
6723
|
}
|
|
6433
6724
|
}
|
|
6434
|
-
function
|
|
6725
|
+
function F(e, o = "en", t = /* @__PURE__ */ new Date()) {
|
|
6435
6726
|
var b, M;
|
|
6436
6727
|
const a = D(o), n = new Intl.DateTimeFormat(a, {
|
|
6437
6728
|
timeZone: e,
|
|
@@ -6439,84 +6730,82 @@ function N(e, o = "en", t = /* @__PURE__ */ new Date()) {
|
|
|
6439
6730
|
}), r = new Intl.DateTimeFormat(a, {
|
|
6440
6731
|
timeZone: e,
|
|
6441
6732
|
timeZoneName: "short"
|
|
6442
|
-
}), i = n.formatToParts(t), s = r.formatToParts(t),
|
|
6733
|
+
}), i = n.formatToParts(t), s = r.formatToParts(t), l = ((b = i.find((x) => x.type === "timeZoneName")) == null ? void 0 : b.value) || e, d = ((M = s.find((x) => x.type === "timeZoneName")) == null ? void 0 : M.value) || e, m = new Date(t.toLocaleString("en-US", { timeZone: "UTC" })), f = new Date(t.toLocaleString("en-US", { timeZone: e })), u = Math.round((f.getTime() - m.getTime()) / 6e4), p = new Date(t.getFullYear(), 0, 1), k = new Date(t.getFullYear(), 6, 1), g = W(e, p), y = W(e, k), E = W(e, t), C = Math.min(g, y), A = E !== C && g !== y;
|
|
6443
6734
|
return {
|
|
6444
6735
|
id: e,
|
|
6445
|
-
displayName:
|
|
6446
|
-
shortName:
|
|
6736
|
+
displayName: l,
|
|
6737
|
+
shortName: d,
|
|
6447
6738
|
offsetMinutes: u,
|
|
6448
|
-
offsetString:
|
|
6739
|
+
offsetString: Eo(u),
|
|
6449
6740
|
isDST: A
|
|
6450
6741
|
};
|
|
6451
6742
|
}
|
|
6452
|
-
function
|
|
6453
|
-
return Object.values(ne).flat().map((a) =>
|
|
6743
|
+
function fa(e = "en", o = /* @__PURE__ */ new Date()) {
|
|
6744
|
+
return Object.values(ne).flat().map((a) => F(a, e, o));
|
|
6454
6745
|
}
|
|
6455
|
-
function
|
|
6746
|
+
function ka(e = "en", o = /* @__PURE__ */ new Date()) {
|
|
6456
6747
|
const t = {};
|
|
6457
6748
|
for (const [a, n] of Object.entries(ne))
|
|
6458
|
-
t[a] = n.map((r) =>
|
|
6749
|
+
t[a] = n.map((r) => F(r, e, o));
|
|
6459
6750
|
return t;
|
|
6460
6751
|
}
|
|
6461
6752
|
function re(e, o, t) {
|
|
6462
6753
|
const a = e.toLocaleString("en-US", { timeZone: o }), n = new Date(a), r = e.toLocaleString("en-US", { timeZone: t }), i = new Date(r), s = n.getTime() - i.getTime();
|
|
6463
6754
|
return new Date(e.getTime() + s);
|
|
6464
6755
|
}
|
|
6465
|
-
function
|
|
6756
|
+
function bo(e, o) {
|
|
6466
6757
|
const t = o || G();
|
|
6467
6758
|
return re(e, t, "UTC");
|
|
6468
6759
|
}
|
|
6469
|
-
function
|
|
6760
|
+
function Co(e, o) {
|
|
6470
6761
|
const t = o || G();
|
|
6471
6762
|
return re(e, "UTC", t);
|
|
6472
6763
|
}
|
|
6473
|
-
function
|
|
6764
|
+
function yo(e, o, t = {}) {
|
|
6474
6765
|
const a = D(e), { dateStyle: n = "medium", timeStyle: r = "short", nameStyle: i = "short" } = t, s = new Intl.DateTimeFormat(a, {
|
|
6475
6766
|
timeZone: o,
|
|
6476
6767
|
dateStyle: n,
|
|
6477
6768
|
timeStyle: r
|
|
6478
|
-
}),
|
|
6769
|
+
}), l = new Intl.DateTimeFormat(a, {
|
|
6479
6770
|
timeZone: o,
|
|
6480
6771
|
dateStyle: n,
|
|
6481
6772
|
timeStyle: r,
|
|
6482
6773
|
timeZoneName: i
|
|
6483
|
-
}),
|
|
6774
|
+
}), d = new Intl.DateTimeFormat(a, {
|
|
6484
6775
|
timeZone: o,
|
|
6485
6776
|
timeZoneName: "short"
|
|
6486
6777
|
});
|
|
6487
6778
|
return {
|
|
6488
6779
|
format: (m) => s.format(m),
|
|
6489
|
-
formatWithZone: (m) =>
|
|
6490
|
-
getOffset: (m) =>
|
|
6780
|
+
formatWithZone: (m) => l.format(m),
|
|
6781
|
+
getOffset: (m) => F(o, e, m).offsetString,
|
|
6491
6782
|
getAbbreviation: (m) => {
|
|
6492
6783
|
var u;
|
|
6493
|
-
return ((u =
|
|
6784
|
+
return ((u = d.formatToParts(m).find((p) => p.type === "timeZoneName")) == null ? void 0 : u.value) || "";
|
|
6494
6785
|
}
|
|
6495
6786
|
};
|
|
6496
6787
|
}
|
|
6497
|
-
function
|
|
6498
|
-
return
|
|
6788
|
+
function V(e, o = /* @__PURE__ */ new Date()) {
|
|
6789
|
+
return F(e, "en", o).isDST;
|
|
6499
6790
|
}
|
|
6500
|
-
function
|
|
6501
|
-
const t =
|
|
6502
|
-
let a = new Date(o);
|
|
6503
|
-
const n = new Date(o);
|
|
6791
|
+
function wa(e, o = /* @__PURE__ */ new Date()) {
|
|
6792
|
+
const t = V(e, o), a = new Date(o), n = new Date(o);
|
|
6504
6793
|
for (n.setFullYear(n.getFullYear() + 1); a < n; )
|
|
6505
|
-
if (a.setDate(a.getDate() + 1),
|
|
6794
|
+
if (a.setDate(a.getDate() + 1), V(e, a) !== t) {
|
|
6506
6795
|
a.setDate(a.getDate() - 1);
|
|
6507
6796
|
const r = new Date(a);
|
|
6508
6797
|
r.setHours(0, 0, 0, 0);
|
|
6509
6798
|
const i = new Date(a);
|
|
6510
6799
|
for (i.setDate(i.getDate() + 2); i.getTime() - r.getTime() > 6e4; ) {
|
|
6511
6800
|
const s = new Date((r.getTime() + i.getTime()) / 2);
|
|
6512
|
-
|
|
6801
|
+
V(e, s) === t ? r.setTime(s.getTime()) : i.setTime(s.getTime());
|
|
6513
6802
|
}
|
|
6514
6803
|
return i;
|
|
6515
6804
|
}
|
|
6516
6805
|
return null;
|
|
6517
6806
|
}
|
|
6518
|
-
function
|
|
6519
|
-
const [a] = P(() => G()), n = o || a, r = w(() =>
|
|
6807
|
+
function va(e, o, t) {
|
|
6808
|
+
const [a] = P(() => G()), n = o || a, r = w(() => yo(e, n, t), [e, n, t]), i = w(() => F(n, e), [n, e]);
|
|
6520
6809
|
return {
|
|
6521
6810
|
timezone: n,
|
|
6522
6811
|
info: i,
|
|
@@ -6524,15 +6813,15 @@ function ma(e, o, t) {
|
|
|
6524
6813
|
formatWithZone: r.formatWithZone,
|
|
6525
6814
|
getOffset: r.getOffset,
|
|
6526
6815
|
getAbbreviation: r.getAbbreviation,
|
|
6527
|
-
toUTC: (s) =>
|
|
6528
|
-
fromUTC: (s) =>
|
|
6816
|
+
toUTC: (s) => bo(s, n),
|
|
6817
|
+
fromUTC: (s) => Co(s, n)
|
|
6529
6818
|
};
|
|
6530
6819
|
}
|
|
6531
|
-
function
|
|
6820
|
+
function W(e, o) {
|
|
6532
6821
|
const t = o.toLocaleString("en-US", { timeZone: "UTC" }), a = o.toLocaleString("en-US", { timeZone: e }), n = new Date(t), r = new Date(a);
|
|
6533
6822
|
return Math.round((r.getTime() - n.getTime()) / 6e4);
|
|
6534
6823
|
}
|
|
6535
|
-
function
|
|
6824
|
+
function Eo(e) {
|
|
6536
6825
|
const o = e >= 0 ? "+" : "-", t = Math.abs(e), a = Math.floor(t / 60), n = t % 60;
|
|
6537
6826
|
return `${o}${a.toString().padStart(2, "0")}:${n.toString().padStart(2, "0")}`;
|
|
6538
6827
|
}
|
|
@@ -6692,7 +6981,15 @@ const U = {
|
|
|
6692
6981
|
ja: "japanese",
|
|
6693
6982
|
ko: "gregory",
|
|
6694
6983
|
zh: "gregory",
|
|
6695
|
-
ar: "islamic"
|
|
6984
|
+
ar: "islamic",
|
|
6985
|
+
hi: "gregory",
|
|
6986
|
+
bn: "gregory",
|
|
6987
|
+
th: "buddhist",
|
|
6988
|
+
vi: "gregory",
|
|
6989
|
+
id: "gregory",
|
|
6990
|
+
sw: "gregory",
|
|
6991
|
+
fil: "gregory",
|
|
6992
|
+
ms: "gregory"
|
|
6696
6993
|
};
|
|
6697
6994
|
function se(e, o = "gregory", t = {}) {
|
|
6698
6995
|
const a = D(e), { dateStyle: n = "medium", showEra: r = !1, showWeekday: i = !1 } = t, s = {
|
|
@@ -6700,15 +6997,15 @@ function se(e, o = "gregory", t = {}) {
|
|
|
6700
6997
|
dateStyle: n
|
|
6701
6998
|
};
|
|
6702
6999
|
i && (delete s.dateStyle, s.weekday = "long", s.year = "numeric", s.month = "long", s.day = "numeric");
|
|
6703
|
-
const
|
|
7000
|
+
const l = new Intl.DateTimeFormat(a, s), d = {
|
|
6704
7001
|
calendar: o,
|
|
6705
7002
|
year: "numeric",
|
|
6706
7003
|
month: "long",
|
|
6707
7004
|
day: "numeric",
|
|
6708
7005
|
era: "long"
|
|
6709
|
-
}, m = new Intl.DateTimeFormat(a,
|
|
7006
|
+
}, m = new Intl.DateTimeFormat(a, d), f = new Intl.DateTimeFormat(a, { calendar: o, month: "long" }), u = new Intl.DateTimeFormat(a, { calendar: o, weekday: "long" });
|
|
6710
7007
|
return {
|
|
6711
|
-
format: (p) =>
|
|
7008
|
+
format: (p) => l.format(p),
|
|
6712
7009
|
formatWithEra: (p) => m.format(p),
|
|
6713
7010
|
getMonthName: (p) => f.format(p),
|
|
6714
7011
|
getMonthNames: () => {
|
|
@@ -6751,13 +7048,13 @@ function se(e, o = "gregory", t = {}) {
|
|
|
6751
7048
|
}
|
|
6752
7049
|
};
|
|
6753
7050
|
}
|
|
6754
|
-
function
|
|
7051
|
+
function le(e, o, t = "en") {
|
|
6755
7052
|
return se(t, o).parseParts(e);
|
|
6756
7053
|
}
|
|
6757
|
-
function
|
|
6758
|
-
return
|
|
7054
|
+
function So(e, o = "en") {
|
|
7055
|
+
return le(/* @__PURE__ */ new Date(), e, o);
|
|
6759
7056
|
}
|
|
6760
|
-
const
|
|
7057
|
+
const ba = [
|
|
6761
7058
|
"Muharram",
|
|
6762
7059
|
"Safar",
|
|
6763
7060
|
"Rabi' al-Awwal",
|
|
@@ -6771,13 +7068,13 @@ const ua = [
|
|
|
6771
7068
|
"Dhu al-Qi'dah",
|
|
6772
7069
|
"Dhu al-Hijjah"
|
|
6773
7070
|
];
|
|
6774
|
-
function
|
|
7071
|
+
function zo(e) {
|
|
6775
7072
|
return (11 * e + 14) % 30 < 11;
|
|
6776
7073
|
}
|
|
6777
|
-
function
|
|
6778
|
-
return o === 12 ?
|
|
7074
|
+
function Ca(e, o) {
|
|
7075
|
+
return o === 12 ? zo(e) ? 30 : 29 : o % 2 === 1 ? 30 : 29;
|
|
6779
7076
|
}
|
|
6780
|
-
const
|
|
7077
|
+
const ya = [
|
|
6781
7078
|
"Tishrei",
|
|
6782
7079
|
"Cheshvan",
|
|
6783
7080
|
"Kislev",
|
|
@@ -6790,7 +7087,7 @@ const ga = [
|
|
|
6790
7087
|
"Tammuz",
|
|
6791
7088
|
"Av",
|
|
6792
7089
|
"Elul"
|
|
6793
|
-
],
|
|
7090
|
+
], Ea = [
|
|
6794
7091
|
"Tishrei",
|
|
6795
7092
|
"Cheshvan",
|
|
6796
7093
|
"Kislev",
|
|
@@ -6805,7 +7102,7 @@ const ga = [
|
|
|
6805
7102
|
"Av",
|
|
6806
7103
|
"Elul"
|
|
6807
7104
|
];
|
|
6808
|
-
function
|
|
7105
|
+
function Sa(e) {
|
|
6809
7106
|
return (7 * e + 1) % 19 < 7;
|
|
6810
7107
|
}
|
|
6811
7108
|
const Z = [
|
|
@@ -6815,17 +7112,17 @@ const Z = [
|
|
|
6815
7112
|
{ name: "Heisei", kanji: "平成", startDate: new Date(1989, 0, 8) },
|
|
6816
7113
|
{ name: "Reiwa", kanji: "令和", startDate: new Date(2019, 4, 1) }
|
|
6817
7114
|
];
|
|
6818
|
-
function
|
|
7115
|
+
function Do(e) {
|
|
6819
7116
|
for (let o = Z.length - 1; o >= 0; o--)
|
|
6820
7117
|
if (e >= Z[o].startDate)
|
|
6821
7118
|
return Z[o];
|
|
6822
7119
|
return null;
|
|
6823
7120
|
}
|
|
6824
|
-
function
|
|
6825
|
-
const o =
|
|
7121
|
+
function za(e) {
|
|
7122
|
+
const o = Do(e);
|
|
6826
7123
|
return o ? e.getFullYear() - o.startDate.getFullYear() + 1 : null;
|
|
6827
7124
|
}
|
|
6828
|
-
const
|
|
7125
|
+
const Da = [
|
|
6829
7126
|
"Farvardin",
|
|
6830
7127
|
"Ordibehesht",
|
|
6831
7128
|
"Khordad",
|
|
@@ -6839,10 +7136,10 @@ const wa = [
|
|
|
6839
7136
|
"Bahman",
|
|
6840
7137
|
"Esfand"
|
|
6841
7138
|
];
|
|
6842
|
-
function
|
|
7139
|
+
function Aa(e) {
|
|
6843
7140
|
return ((e - 474) % 2820 + 2820) % 2820 * 682 % 2816 < 682;
|
|
6844
7141
|
}
|
|
6845
|
-
const
|
|
7142
|
+
const Ao = [
|
|
6846
7143
|
"Rat",
|
|
6847
7144
|
"Ox",
|
|
6848
7145
|
"Tiger",
|
|
@@ -6856,10 +7153,10 @@ const vo = [
|
|
|
6856
7153
|
"Dog",
|
|
6857
7154
|
"Pig"
|
|
6858
7155
|
];
|
|
6859
|
-
function
|
|
6860
|
-
return
|
|
7156
|
+
function xa(e) {
|
|
7157
|
+
return Ao[(e - 4) % 12];
|
|
6861
7158
|
}
|
|
6862
|
-
const
|
|
7159
|
+
const xo = [
|
|
6863
7160
|
"Jia",
|
|
6864
7161
|
"Yi",
|
|
6865
7162
|
"Bing",
|
|
@@ -6871,14 +7168,14 @@ const bo = [
|
|
|
6871
7168
|
"Ren",
|
|
6872
7169
|
"Gui"
|
|
6873
7170
|
];
|
|
6874
|
-
function
|
|
6875
|
-
return
|
|
7171
|
+
function Ta(e) {
|
|
7172
|
+
return xo[(e - 4) % 10];
|
|
6876
7173
|
}
|
|
6877
|
-
function
|
|
7174
|
+
function Pa(e, o, t) {
|
|
6878
7175
|
const a = o || ie[e], n = w(
|
|
6879
7176
|
() => se(e, a, t),
|
|
6880
7177
|
[e, a, t]
|
|
6881
|
-
), r = w(() => U[a], [a]), i = w(() =>
|
|
7178
|
+
), r = w(() => U[a], [a]), i = w(() => So(a, e), [a, e]);
|
|
6882
7179
|
return {
|
|
6883
7180
|
calendar: a,
|
|
6884
7181
|
info: r,
|
|
@@ -6891,13 +7188,13 @@ function ya(e, o, t) {
|
|
|
6891
7188
|
getWeekdayNames: n.getWeekdayNames,
|
|
6892
7189
|
parseParts: n.parseParts,
|
|
6893
7190
|
getEraName: n.getEraName,
|
|
6894
|
-
toCalendar: (s) =>
|
|
7191
|
+
toCalendar: (s) => le(s, a, e)
|
|
6895
7192
|
};
|
|
6896
7193
|
}
|
|
6897
|
-
function
|
|
7194
|
+
function ja() {
|
|
6898
7195
|
return Object.keys(U);
|
|
6899
7196
|
}
|
|
6900
|
-
function
|
|
7197
|
+
function Na(e, o = "en") {
|
|
6901
7198
|
const t = { ...U[e] };
|
|
6902
7199
|
try {
|
|
6903
7200
|
const a = D(o), r = new Intl.DisplayNames([a], { type: "calendar" }).of(e);
|
|
@@ -6906,7 +7203,7 @@ function Sa(e, o = "en") {
|
|
|
6906
7203
|
}
|
|
6907
7204
|
return t;
|
|
6908
7205
|
}
|
|
6909
|
-
function
|
|
7206
|
+
function Fa(e) {
|
|
6910
7207
|
const o = ie[e], t = /* @__PURE__ */ new Set([o]);
|
|
6911
7208
|
for (const [a, n] of Object.entries(U))
|
|
6912
7209
|
n.associatedLanguages.includes(e) && t.add(a);
|
|
@@ -6967,7 +7264,7 @@ const $ = {
|
|
|
6967
7264
|
X: "Χ",
|
|
6968
7265
|
Y: "Ÿ",
|
|
6969
7266
|
Z: "Ž"
|
|
6970
|
-
},
|
|
7267
|
+
}, To = {
|
|
6971
7268
|
...$,
|
|
6972
7269
|
// Additional mappings
|
|
6973
7270
|
a: "ặ",
|
|
@@ -6982,30 +7279,31 @@ const $ = {
|
|
|
6982
7279
|
O: "Ộ",
|
|
6983
7280
|
U: "Ụ",
|
|
6984
7281
|
Y: "Ỵ"
|
|
6985
|
-
},
|
|
6986
|
-
function
|
|
6987
|
-
const t = o ?
|
|
7282
|
+
}, Po = "", jo = "", _ = "", No = "~∼~≈";
|
|
7283
|
+
function Ma(e, o = !1) {
|
|
7284
|
+
const t = o ? To : $;
|
|
6988
7285
|
return e.split("").map((a) => t[a] || a).join("");
|
|
6989
7286
|
}
|
|
6990
|
-
function
|
|
7287
|
+
function Oa(e, o = "[", t = "]") {
|
|
6991
7288
|
return `${o}${e}${t}`;
|
|
6992
7289
|
}
|
|
6993
|
-
function
|
|
7290
|
+
function Fo(e, o = 0.3, t = !1) {
|
|
6994
7291
|
if (t)
|
|
6995
|
-
return
|
|
7292
|
+
return Mo(e);
|
|
6996
7293
|
const n = Math.ceil(e.length * (1 + o)) - e.length;
|
|
6997
|
-
if (n <= 0)
|
|
6998
|
-
|
|
7294
|
+
if (n <= 0)
|
|
7295
|
+
return e;
|
|
7296
|
+
const r = No[0].repeat(n);
|
|
6999
7297
|
return e + r;
|
|
7000
7298
|
}
|
|
7001
|
-
function
|
|
7299
|
+
function Mo(e) {
|
|
7002
7300
|
const o = /* @__PURE__ */ new Set(["a", "e", "i", "o", "u", "A", "E", "I", "O", "U"]);
|
|
7003
7301
|
return e.split("").map((t) => o.has(t) ? t + t : t).join("");
|
|
7004
7302
|
}
|
|
7005
|
-
function
|
|
7006
|
-
return o ? `${
|
|
7303
|
+
function Oo(e, o = !1) {
|
|
7304
|
+
return o ? `${jo}${e}${_}` : `${Po}${e}${_}`;
|
|
7007
7305
|
}
|
|
7008
|
-
function
|
|
7306
|
+
function de(e, o = {}) {
|
|
7009
7307
|
const {
|
|
7010
7308
|
addBrackets: t = !0,
|
|
7011
7309
|
expansionFactor: a = 0.3,
|
|
@@ -7013,23 +7311,23 @@ function le(e, o = {}) {
|
|
|
7013
7311
|
addBidiMarkers: r = !1,
|
|
7014
7312
|
useVowelDoubling: i = !1,
|
|
7015
7313
|
preservePlaceholders: s = !0,
|
|
7016
|
-
preserveHtml:
|
|
7017
|
-
prefix:
|
|
7314
|
+
preserveHtml: l = !0,
|
|
7315
|
+
prefix: d = "[",
|
|
7018
7316
|
suffix: m = "]"
|
|
7019
7317
|
} = o, f = /* @__PURE__ */ new Map();
|
|
7020
7318
|
let u = e, p = 0;
|
|
7021
7319
|
s && (u = u.replace(/\{[^}]+\}/g, (k) => {
|
|
7022
7320
|
const g = `__PH${p++}__`;
|
|
7023
7321
|
return f.set(g, k), g;
|
|
7024
|
-
})),
|
|
7322
|
+
})), l && (u = u.replace(/<[^>]+>/g, (k) => {
|
|
7025
7323
|
const g = `__PH${p++}__`;
|
|
7026
7324
|
return f.set(g, k), g;
|
|
7027
|
-
})), n && (u =
|
|
7325
|
+
})), n && (u = Ro(u, f)), a > 0 && (u = Fo(u, a, i)), r && (u = Oo(u)), t && (u = `${d}${u}${m}`);
|
|
7028
7326
|
for (const [k, g] of f.entries())
|
|
7029
7327
|
u = u.replace(k, g);
|
|
7030
7328
|
return u;
|
|
7031
7329
|
}
|
|
7032
|
-
function
|
|
7330
|
+
function Ro(e, o) {
|
|
7033
7331
|
const t = new Set(o.keys());
|
|
7034
7332
|
return e.split("").map((a) => {
|
|
7035
7333
|
for (const n of t)
|
|
@@ -7072,22 +7370,22 @@ function T(e) {
|
|
|
7072
7370
|
};
|
|
7073
7371
|
}
|
|
7074
7372
|
}
|
|
7075
|
-
function
|
|
7373
|
+
function Ra(e, o) {
|
|
7076
7374
|
const t = {};
|
|
7077
7375
|
for (const [a, n] of Object.entries(e))
|
|
7078
|
-
t[a] =
|
|
7376
|
+
t[a] = de(n, o);
|
|
7079
7377
|
return t;
|
|
7080
7378
|
}
|
|
7081
|
-
function
|
|
7379
|
+
function Lo(e) {
|
|
7082
7380
|
return /[^\x00-\x7F]/.test(e);
|
|
7083
7381
|
}
|
|
7084
|
-
function
|
|
7382
|
+
function Bo(e) {
|
|
7085
7383
|
if (!e || /^[\d.,-]+$/.test(e) || e.startsWith("["))
|
|
7086
7384
|
return !1;
|
|
7087
|
-
const o = /[a-zA-Z]{2,}/.test(e), t =
|
|
7385
|
+
const o = /[a-zA-Z]{2,}/.test(e), t = Lo(e);
|
|
7088
7386
|
return o && !t;
|
|
7089
7387
|
}
|
|
7090
|
-
function
|
|
7388
|
+
function La(e, o) {
|
|
7091
7389
|
const t = {
|
|
7092
7390
|
totalKeys: Object.keys(e).length,
|
|
7093
7391
|
hardcodedStrings: [],
|
|
@@ -7100,13 +7398,13 @@ function Ta(e, o) {
|
|
|
7100
7398
|
t.emptyValues.push(a), t.potentialIssues++;
|
|
7101
7399
|
continue;
|
|
7102
7400
|
}
|
|
7103
|
-
if (
|
|
7104
|
-
const r = Y(n), i = Y(o[a]), s = r.filter((
|
|
7105
|
-
(s.length > 0 ||
|
|
7401
|
+
if (Bo(n) && t.hardcodedStrings.push(a), o && o[a]) {
|
|
7402
|
+
const r = Y(n), i = Y(o[a]), s = r.filter((d) => !i.includes(d)), l = i.filter((d) => !r.includes(d));
|
|
7403
|
+
(s.length > 0 || l.length > 0) && (t.placeholderMismatches.push({
|
|
7106
7404
|
key: a,
|
|
7107
7405
|
placeholders: [
|
|
7108
|
-
...s.map((
|
|
7109
|
-
...
|
|
7406
|
+
...s.map((d) => `-${d}`),
|
|
7407
|
+
...l.map((d) => `+${d}`)
|
|
7110
7408
|
]
|
|
7111
7409
|
}), t.potentialIssues++);
|
|
7112
7410
|
}
|
|
@@ -7117,26 +7415,26 @@ function Y(e) {
|
|
|
7117
7415
|
return (e.match(/\{([^}]+)\}/g) || []).map((t) => t.replace(/[{}]/g, "").split(",")[0].trim());
|
|
7118
7416
|
}
|
|
7119
7417
|
const ce = I(null);
|
|
7120
|
-
function
|
|
7418
|
+
function Ba({
|
|
7121
7419
|
children: e,
|
|
7122
7420
|
initialEnabled: o = !1,
|
|
7123
7421
|
initialMode: t = "full"
|
|
7124
7422
|
}) {
|
|
7125
|
-
const [a, n] = P(o), [r, i] = P(t), s = w(() => T(r), [r]),
|
|
7423
|
+
const [a, n] = P(o), [r, i] = P(t), s = w(() => T(r), [r]), l = w(() => (m) => a ? de(m, s) : m, [a, s]), d = w(
|
|
7126
7424
|
() => ({
|
|
7127
7425
|
enabled: a,
|
|
7128
7426
|
mode: r,
|
|
7129
7427
|
options: s,
|
|
7130
7428
|
toggle: () => n((m) => !m),
|
|
7131
7429
|
setMode: i,
|
|
7132
|
-
transform:
|
|
7430
|
+
transform: l
|
|
7133
7431
|
}),
|
|
7134
|
-
[a, r, s,
|
|
7432
|
+
[a, r, s, l]
|
|
7135
7433
|
);
|
|
7136
|
-
return /* @__PURE__ */ B(ce.Provider, { value:
|
|
7434
|
+
return /* @__PURE__ */ B(ce.Provider, { value: d, children: e });
|
|
7137
7435
|
}
|
|
7138
|
-
function
|
|
7139
|
-
const e =
|
|
7436
|
+
function Ia() {
|
|
7437
|
+
const e = N(ce);
|
|
7140
7438
|
return e || {
|
|
7141
7439
|
enabled: !1,
|
|
7142
7440
|
mode: "full",
|
|
@@ -7148,7 +7446,7 @@ function ja() {
|
|
|
7148
7446
|
transform: (o) => o
|
|
7149
7447
|
};
|
|
7150
7448
|
}
|
|
7151
|
-
const
|
|
7449
|
+
const Ua = {
|
|
7152
7450
|
/** Minimal: brackets only */
|
|
7153
7451
|
MINIMAL: { addBrackets: !0, addAccents: !1, expansionFactor: 0 },
|
|
7154
7452
|
/** Accented: brackets + accents */
|
|
@@ -7166,7 +7464,7 @@ const Fa = {
|
|
|
7166
7464
|
/** CJK: Short expansion, no accents (CJK often shorter) */
|
|
7167
7465
|
CJK: { addBrackets: !0, addAccents: !1, expansionFactor: -0.1 }
|
|
7168
7466
|
};
|
|
7169
|
-
class
|
|
7467
|
+
class Io {
|
|
7170
7468
|
constructor(o = 0) {
|
|
7171
7469
|
this.cache = /* @__PURE__ */ new Map(), this.ttl = o;
|
|
7172
7470
|
}
|
|
@@ -7217,9 +7515,9 @@ function me(e) {
|
|
|
7217
7515
|
namespaces: r = [],
|
|
7218
7516
|
defaultNamespace: i,
|
|
7219
7517
|
onLoadStart: s,
|
|
7220
|
-
onLoadComplete:
|
|
7221
|
-
onLoadError:
|
|
7222
|
-
} = e, m = new
|
|
7518
|
+
onLoadComplete: l,
|
|
7519
|
+
onLoadError: d
|
|
7520
|
+
} = e, m = new Io(a), f = /* @__PURE__ */ new Set(), u = /* @__PURE__ */ new Map();
|
|
7223
7521
|
let p = t;
|
|
7224
7522
|
const k = /* @__PURE__ */ new Set();
|
|
7225
7523
|
function g() {
|
|
@@ -7246,7 +7544,8 @@ function me(e) {
|
|
|
7246
7544
|
}
|
|
7247
7545
|
async function C(c, h) {
|
|
7248
7546
|
const S = y(c, h), O = m.get(c, h);
|
|
7249
|
-
if (O)
|
|
7547
|
+
if (O)
|
|
7548
|
+
return O;
|
|
7250
7549
|
if (f.has(S))
|
|
7251
7550
|
return new Promise((z) => {
|
|
7252
7551
|
const R = setInterval(() => {
|
|
@@ -7256,10 +7555,10 @@ function me(e) {
|
|
|
7256
7555
|
f.add(S), u.delete(c), s == null || s(c, h), g();
|
|
7257
7556
|
try {
|
|
7258
7557
|
const z = await o(c, h);
|
|
7259
|
-
return m.set(c, z, h),
|
|
7558
|
+
return m.set(c, z, h), l == null || l(c, h), z;
|
|
7260
7559
|
} catch (z) {
|
|
7261
7560
|
const R = z instanceof Error ? z : new Error(String(z));
|
|
7262
|
-
return u.set(c, R),
|
|
7561
|
+
return u.set(c, R), d == null || d(c, R, h), c !== t && !h ? (console.warn(`Failed to load ${c}, falling back to ${t}`), C(t, h)) : null;
|
|
7263
7562
|
} finally {
|
|
7264
7563
|
f.delete(S), g();
|
|
7265
7564
|
}
|
|
@@ -7314,7 +7613,7 @@ function me(e) {
|
|
|
7314
7613
|
subscribe: we
|
|
7315
7614
|
};
|
|
7316
7615
|
}
|
|
7317
|
-
function
|
|
7616
|
+
function Ha(e, o) {
|
|
7318
7617
|
return me({
|
|
7319
7618
|
...o,
|
|
7320
7619
|
loadFn: async (t, a) => {
|
|
@@ -7325,14 +7624,14 @@ function Na(e, o) {
|
|
|
7325
7624
|
}
|
|
7326
7625
|
});
|
|
7327
7626
|
}
|
|
7328
|
-
function
|
|
7627
|
+
function Ka(e, o) {
|
|
7329
7628
|
return me({
|
|
7330
7629
|
...o,
|
|
7331
7630
|
loadFn: async (t, a) => (await e(t, a)).default
|
|
7332
7631
|
});
|
|
7333
7632
|
}
|
|
7334
7633
|
const ue = I(null);
|
|
7335
|
-
function
|
|
7634
|
+
function Va({
|
|
7336
7635
|
children: e,
|
|
7337
7636
|
loader: o,
|
|
7338
7637
|
initialLanguage: t,
|
|
@@ -7342,7 +7641,7 @@ function Oa({
|
|
|
7342
7641
|
L(() => o.subscribe(r), [o]), L(() => {
|
|
7343
7642
|
t && !o.isLoaded(t, a) && o.loadLanguage(t, a).catch(s);
|
|
7344
7643
|
}, [o, t, a]);
|
|
7345
|
-
const
|
|
7644
|
+
const l = w(() => o.getTranslations(n.currentLanguage, a) || {}, [o, n.currentLanguage, a]), d = Q(
|
|
7346
7645
|
async (f) => {
|
|
7347
7646
|
s(null);
|
|
7348
7647
|
try {
|
|
@@ -7355,39 +7654,39 @@ function Oa({
|
|
|
7355
7654
|
), m = w(
|
|
7356
7655
|
() => ({
|
|
7357
7656
|
loader: o,
|
|
7358
|
-
translations:
|
|
7657
|
+
translations: l,
|
|
7359
7658
|
isLoading: n.loadingLanguages.size > 0,
|
|
7360
7659
|
error: i,
|
|
7361
|
-
setLanguage:
|
|
7660
|
+
setLanguage: d,
|
|
7362
7661
|
currentLanguage: n.currentLanguage,
|
|
7363
7662
|
loadedLanguages: Array.from(n.loadedLanguages)
|
|
7364
7663
|
}),
|
|
7365
|
-
[o,
|
|
7664
|
+
[o, l, n, i, d]
|
|
7366
7665
|
);
|
|
7367
7666
|
return /* @__PURE__ */ B(ue.Provider, { value: m, children: e });
|
|
7368
7667
|
}
|
|
7369
|
-
function
|
|
7370
|
-
const e =
|
|
7668
|
+
function Uo() {
|
|
7669
|
+
const e = N(ue);
|
|
7371
7670
|
if (!e)
|
|
7372
7671
|
throw new Error("useDynamicI18n must be used within DynamicI18nProvider");
|
|
7373
7672
|
return e;
|
|
7374
7673
|
}
|
|
7375
|
-
function
|
|
7376
|
-
const { translations: o, currentLanguage: t, loader: a, isLoading: n } =
|
|
7674
|
+
function Wa(e) {
|
|
7675
|
+
const { translations: o, currentLanguage: t, loader: a, isLoading: n } = Uo();
|
|
7377
7676
|
return L(() => {
|
|
7378
7677
|
e && !a.isLoaded(t, e) && a.loadLanguage(t, e);
|
|
7379
7678
|
}, [a, t, e]), { t: Q(
|
|
7380
7679
|
(i, s) => {
|
|
7381
|
-
let
|
|
7680
|
+
let l = o[i] || i;
|
|
7382
7681
|
if (s)
|
|
7383
|
-
for (const [
|
|
7384
|
-
|
|
7385
|
-
return
|
|
7682
|
+
for (const [d, m] of Object.entries(s))
|
|
7683
|
+
l = l.replace(new RegExp(`\\{${d}\\}`, "g"), String(m));
|
|
7684
|
+
return l;
|
|
7386
7685
|
},
|
|
7387
7686
|
[o]
|
|
7388
7687
|
), isLoading: n, currentLanguage: t };
|
|
7389
7688
|
}
|
|
7390
|
-
function
|
|
7689
|
+
function Za(e, o, t) {
|
|
7391
7690
|
switch (t) {
|
|
7392
7691
|
case "immediate":
|
|
7393
7692
|
e.loadLanguages(o);
|
|
@@ -7417,7 +7716,7 @@ function La(e, o, t) {
|
|
|
7417
7716
|
break;
|
|
7418
7717
|
}
|
|
7419
7718
|
}
|
|
7420
|
-
async function
|
|
7719
|
+
async function qa(e, o) {
|
|
7421
7720
|
const { fallback: t = "en", preferredLanguages: a = [] } = o || {};
|
|
7422
7721
|
for (const r of a)
|
|
7423
7722
|
if (j.includes(r))
|
|
@@ -7427,111 +7726,111 @@ async function Ba(e, o) {
|
|
|
7427
7726
|
}
|
|
7428
7727
|
export {
|
|
7429
7728
|
U as CALENDAR_INFO,
|
|
7430
|
-
|
|
7431
|
-
|
|
7729
|
+
xo as CELESTIAL_STEMS,
|
|
7730
|
+
Ao as CHINESE_ZODIAC,
|
|
7432
7731
|
ie as DEFAULT_CALENDAR,
|
|
7433
|
-
|
|
7434
|
-
|
|
7435
|
-
|
|
7436
|
-
|
|
7732
|
+
Va as DynamicI18nProvider,
|
|
7733
|
+
ya as HEBREW_MONTHS,
|
|
7734
|
+
Ea as HEBREW_MONTHS_LEAP,
|
|
7735
|
+
ba as HIJRI_MONTHS,
|
|
7437
7736
|
Z as JAPANESE_ERAS,
|
|
7438
7737
|
te as NICE_GLOSSARY,
|
|
7439
7738
|
v as NICE_I18N_DICTIONARIES,
|
|
7440
7739
|
j as NICE_SUPPORTED_LANGS,
|
|
7441
|
-
|
|
7442
|
-
|
|
7443
|
-
|
|
7444
|
-
|
|
7445
|
-
|
|
7446
|
-
|
|
7447
|
-
|
|
7740
|
+
Vo as NiceI18nProvider,
|
|
7741
|
+
Da as PERSIAN_MONTHS,
|
|
7742
|
+
Ua as PSEUDO_PRESETS,
|
|
7743
|
+
Ba as PseudoLocalizationProvider,
|
|
7744
|
+
ea as RTLProvider,
|
|
7745
|
+
K as RTL_CSS_VARS,
|
|
7746
|
+
ao as RTL_LANGUAGES,
|
|
7448
7747
|
ne as TIMEZONE_GROUPS,
|
|
7449
|
-
|
|
7450
|
-
|
|
7451
|
-
|
|
7452
|
-
|
|
7453
|
-
|
|
7454
|
-
|
|
7748
|
+
Ma as addAccents,
|
|
7749
|
+
Oo as addBidiMarkers,
|
|
7750
|
+
Oa as addBrackets,
|
|
7751
|
+
La as analyzeDictionary,
|
|
7752
|
+
ta as analyzeStylesForRTL,
|
|
7753
|
+
Lo as containsNonAscii,
|
|
7455
7754
|
re as convertTimezone,
|
|
7456
7755
|
se as createCalendarFormatter,
|
|
7457
|
-
|
|
7458
|
-
|
|
7756
|
+
fo as createCurrencyFormatter,
|
|
7757
|
+
po as createDateFormatter,
|
|
7459
7758
|
me as createDynamicLoader,
|
|
7460
|
-
|
|
7461
|
-
|
|
7462
|
-
|
|
7463
|
-
|
|
7464
|
-
|
|
7465
|
-
|
|
7466
|
-
|
|
7467
|
-
|
|
7468
|
-
|
|
7469
|
-
|
|
7759
|
+
Ha as createFetchLoader,
|
|
7760
|
+
$o as createICUTranslator,
|
|
7761
|
+
Ka as createImportLoader,
|
|
7762
|
+
ho as createNumberFormatter,
|
|
7763
|
+
go as createTimeFormatter,
|
|
7764
|
+
yo as createTimezoneFormatter,
|
|
7765
|
+
Zo as createTranslator,
|
|
7766
|
+
qa as detectAndLoad,
|
|
7767
|
+
Go as detectBrowserLanguage,
|
|
7768
|
+
Bo as detectHardcodedText,
|
|
7470
7769
|
G as detectTimezone,
|
|
7471
|
-
|
|
7472
|
-
|
|
7473
|
-
|
|
7474
|
-
|
|
7475
|
-
|
|
7476
|
-
|
|
7477
|
-
|
|
7478
|
-
|
|
7479
|
-
|
|
7480
|
-
|
|
7481
|
-
|
|
7482
|
-
|
|
7483
|
-
|
|
7484
|
-
|
|
7485
|
-
|
|
7486
|
-
|
|
7487
|
-
|
|
7488
|
-
|
|
7489
|
-
|
|
7490
|
-
|
|
7491
|
-
|
|
7770
|
+
Fo as expandText,
|
|
7771
|
+
ua as findSimilarTranslation,
|
|
7772
|
+
io as flipAlignment,
|
|
7773
|
+
Xo as flipHorizontal,
|
|
7774
|
+
oo as formatICU,
|
|
7775
|
+
qo as formatMessage,
|
|
7776
|
+
Co as fromUTC,
|
|
7777
|
+
sa as generateCoverageReport,
|
|
7778
|
+
ia as generateTranslationCode,
|
|
7779
|
+
fa as getAllTimezones,
|
|
7780
|
+
mo as getAllTranslationStats,
|
|
7781
|
+
ja as getAvailableCalendars,
|
|
7782
|
+
Na as getCalendarInfo,
|
|
7783
|
+
Ta as getCelestialStem,
|
|
7784
|
+
xa as getChineseZodiac,
|
|
7785
|
+
So as getCurrentCalendarDate,
|
|
7786
|
+
Qo as getDocumentDirection,
|
|
7787
|
+
pa as getGlossaryForLanguage,
|
|
7788
|
+
Ca as getHijriMonthDays,
|
|
7789
|
+
Do as getJapaneseEra,
|
|
7790
|
+
za as getJapaneseYear,
|
|
7492
7791
|
D as getLocaleTag,
|
|
7493
|
-
|
|
7494
|
-
|
|
7495
|
-
|
|
7792
|
+
so as getLogicalProperty,
|
|
7793
|
+
lo as getMissingTranslations,
|
|
7794
|
+
wa as getNextDSTTransition,
|
|
7496
7795
|
oe as getOrdinalCategory,
|
|
7497
7796
|
ee as getPluralCategory,
|
|
7498
7797
|
T as getPseudoLocalizationPreset,
|
|
7499
|
-
|
|
7500
|
-
|
|
7501
|
-
|
|
7502
|
-
|
|
7503
|
-
|
|
7504
|
-
|
|
7505
|
-
|
|
7506
|
-
|
|
7507
|
-
|
|
7508
|
-
|
|
7509
|
-
|
|
7798
|
+
na as getRTLCSSVars,
|
|
7799
|
+
Fa as getRecommendedCalendars,
|
|
7800
|
+
ra as getSourceKeys,
|
|
7801
|
+
to as getTextDirection,
|
|
7802
|
+
F as getTimezoneInfo,
|
|
7803
|
+
ka as getTimezonesGrouped,
|
|
7804
|
+
co as getTranslationStats,
|
|
7805
|
+
V as isDSTActive,
|
|
7806
|
+
Sa as isHebrewLeapYear,
|
|
7807
|
+
zo as isHijriLeapYear,
|
|
7808
|
+
Aa as isPersianLeapYear,
|
|
7510
7809
|
ae as isRTLLanguage,
|
|
7511
|
-
|
|
7512
|
-
|
|
7513
|
-
|
|
7514
|
-
|
|
7515
|
-
|
|
7516
|
-
|
|
7517
|
-
|
|
7518
|
-
|
|
7519
|
-
|
|
7520
|
-
|
|
7521
|
-
|
|
7522
|
-
|
|
7523
|
-
|
|
7524
|
-
|
|
7525
|
-
|
|
7526
|
-
|
|
7527
|
-
|
|
7528
|
-
|
|
7529
|
-
|
|
7530
|
-
|
|
7531
|
-
|
|
7532
|
-
|
|
7533
|
-
|
|
7534
|
-
|
|
7535
|
-
|
|
7536
|
-
|
|
7810
|
+
_e as isSupported,
|
|
7811
|
+
ha as isValidTimezone,
|
|
7812
|
+
wo as lookupGlossary,
|
|
7813
|
+
_o as ordinal,
|
|
7814
|
+
Jo as plural,
|
|
7815
|
+
Za as preloadWithStrategy,
|
|
7816
|
+
de as pseudoLocalize,
|
|
7817
|
+
Ra as pseudoLocalizeDictionary,
|
|
7818
|
+
ro as rtlValue,
|
|
7819
|
+
Yo as select,
|
|
7820
|
+
no as setDocumentDirection,
|
|
7821
|
+
le as toCalendar,
|
|
7822
|
+
bo as toUTC,
|
|
7823
|
+
Pa as useCalendar,
|
|
7824
|
+
Uo as useDynamicI18n,
|
|
7825
|
+
Wa as useDynamicTranslation,
|
|
7826
|
+
aa as useIsRTL,
|
|
7827
|
+
ma as useNiceCurrencyFormat,
|
|
7828
|
+
la as useNiceDateFormat,
|
|
7829
|
+
ca as useNiceNumberFormat,
|
|
7830
|
+
da as useNiceTimeFormat,
|
|
7831
|
+
Wo as useNiceTranslation,
|
|
7832
|
+
Ia as usePseudoLocalization,
|
|
7833
|
+
oa as useRTL,
|
|
7834
|
+
va as useTimezone,
|
|
7835
|
+
ga as validateAgainstGlossary
|
|
7537
7836
|
};
|