@pie-element/simple-cloze 0.1.4-next.8 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/dist/author/index.d.ts +2 -18
  2. package/dist/author/index.js +1151 -456
  3. package/dist/author/index.js.map +1 -1
  4. package/dist/browser/author/index.js +3764 -3612
  5. package/dist/browser/author/index.js.map +1 -1
  6. package/dist/browser/{client-BSTc3boO.js → client-e4ZTphpa.js} +874 -680
  7. package/dist/browser/client-e4ZTphpa.js.map +1 -0
  8. package/dist/browser/controller/index.js +2 -62
  9. package/dist/browser/controller-1IBOQFFL.js +69 -0
  10. package/dist/browser/controller-1IBOQFFL.js.map +1 -0
  11. package/dist/browser/delivery/index.js +82 -82
  12. package/dist/browser/delivery/index.js.map +1 -1
  13. package/dist/browser/editor-runtime/author/index.js +634 -0
  14. package/dist/browser/editor-runtime/author/index.js.map +1 -0
  15. package/dist/browser/editor-runtime/client-e4ZTphpa.js +2370 -0
  16. package/dist/browser/editor-runtime/client-e4ZTphpa.js.map +1 -0
  17. package/dist/browser/editor-runtime/controller/index.js +2 -0
  18. package/dist/browser/editor-runtime/controller-1IBOQFFL.js +69 -0
  19. package/dist/browser/editor-runtime/controller-1IBOQFFL.js.map +1 -0
  20. package/dist/browser/editor-runtime/delivery/index.js +243 -0
  21. package/dist/browser/editor-runtime/delivery/index.js.map +1 -0
  22. package/dist/browser/{i18n-BaF24Jzw.js → editor-runtime/i18n-BTsdzpBv.js} +397 -252
  23. package/dist/browser/editor-runtime/i18n-BTsdzpBv.js.map +1 -0
  24. package/dist/browser/editor-runtime/plain-text-iaQZhkGe.js +53 -0
  25. package/dist/browser/editor-runtime/plain-text-iaQZhkGe.js.map +1 -0
  26. package/dist/browser/editor-runtime/print/index.js +71 -0
  27. package/dist/browser/editor-runtime/print/index.js.map +1 -0
  28. package/dist/browser/i18n-BTsdzpBv.js +1755 -0
  29. package/dist/browser/i18n-BTsdzpBv.js.map +1 -0
  30. package/dist/browser/print/index.js +37 -52
  31. package/dist/browser/print/index.js.map +1 -1
  32. package/dist/controller/defaults.d.ts +5 -0
  33. package/dist/controller/index.js +11 -4
  34. package/dist/controller/index.js.map +1 -1
  35. package/dist/delivery/index.js +366 -200
  36. package/dist/delivery/index.js.map +1 -1
  37. package/dist/index.d.ts +1 -1
  38. package/dist/index.iife.d.ts +1 -1
  39. package/dist/index.iife.js +4 -4
  40. package/dist/print/index.d.ts +2 -10
  41. package/dist/print/index.js +366 -221
  42. package/dist/print/index.js.map +1 -1
  43. package/module/print.js +928 -783
  44. package/module/print.js.map +1 -1
  45. package/package.json +22 -4
  46. package/dist/browser/client-BSTc3boO.js.map +0 -1
  47. package/dist/browser/controller/index.js.map +0 -1
  48. package/dist/browser/i18n-BaF24Jzw.js.map +0 -1
@@ -1,79 +1,224 @@
1
1
  //#region ../../shared/math-rendering-mathjax/dist/index.js
2
- var e = null;
3
- function t(t) {
4
- return typeof window > "u" || window.MathJax?.typesetPromise ? Promise.resolve() : e || (e = new Promise((e, n) => {
5
- let { useSingleDollar: r = !1, accessibility: i = !0, loadFonts: a = !0, srcUrl: o } = t, s = {
6
- loader: { load: i ? ["a11y/assistive-mml"] : [] },
7
- tex: {
8
- packages: [
9
- "base",
10
- "ams",
11
- "autoload"
12
- ],
13
- macros: {
14
- parallelogram: "\\lower.2em{\\Huge\\unicode{x25B1}}",
15
- overarc: "\\overparen",
16
- napprox: "\\not\\approx",
17
- longdiv: "\\enclose{longdiv}"
18
- }
19
- },
20
- options: {
21
- enableMenu: i,
22
- enableExplorer: i,
23
- enableAssistiveMml: i
2
+ var e = "https://github.com/pie-framework/pie-players/blob/develop/docs/item-player/loading-strategies.md#one-mathjax-version-per-page", t = Symbol.for("@pie-element/shared-math-rendering-mathjax/unsupported-page");
3
+ function n(n, r) {
4
+ if (typeof window > "u") return;
5
+ let i = globalThis;
6
+ i[t] ??= {
7
+ logged: !1,
8
+ conditions: []
9
+ };
10
+ let a = i[t];
11
+ if (a.conditions.includes(n)) return;
12
+ a.conditions.push(n);
13
+ let o = `[math-rendering] Unsupported page (${n}): ${r}. PIE supports one MathJax major version per page; with MathJax 3 and 4 on one page, math rendering is best effort and may break. See ${e}`;
14
+ a.logged || (a.logged = !0, console.error(o)), window.dispatchEvent(new CustomEvent("pie-mathjax-version-conflict", { detail: {
15
+ condition: n,
16
+ message: o,
17
+ docsUrl: e
18
+ } }));
19
+ }
20
+ function r() {
21
+ let e = window.MathJax?.version;
22
+ return typeof e == "string" && e.startsWith("3.") ? e : void 0;
23
+ }
24
+ var i = "https://cdn.jsdelivr.net/npm/mathjax@4.1.3/tex-mml-chtml.js", a = {
25
+ parallelogram: "\\lower.2em{\\Huge\\unicode{x25B1}}",
26
+ overarc: "\\overparen",
27
+ napprox: "\\not\\approx",
28
+ longdiv: "\\enclose{longdiv}",
29
+ abs: ["\\left|#1\\right|", 1]
30
+ }, o = "[math-rendering] using $ is not advisable, please use $$..$$ or \\(...\\)", s = /\\\(|\\\[|\$\$|\\\$|\\begin\{|\\(?:eq)?ref\{/, c = /\\\(|\\\[|\$|\\begin\{|\\(?:eq)?ref\{/, l = /\\embed\{newLine\}\[\]/g, u = [
31
+ ["$$", "$$"],
32
+ ["$", "$"],
33
+ ["\\[", "\\]"],
34
+ ["\\(", "\\)"]
35
+ ], d = Symbol.for("@pie-element/shared-math-rendering-mathjax/loading"), f = "PIE-MJX-CHTML-styles", p = "MJX-CHTML-styles", m = [p, "MJX-SVG-styles"], h = 201;
36
+ function g(e) {
37
+ let t = [...e.matches("mjx-container") ? [e] : [], ...e.querySelectorAll("mjx-container")];
38
+ for (let e of t) for (let t of [e, ...e.querySelectorAll("[data-latex],[data-latex-item]")]) t.removeAttribute("data-latex"), t.removeAttribute("data-latex-item");
39
+ }
40
+ function _() {
41
+ return window.MathJax;
42
+ }
43
+ function v(e) {
44
+ for (let [t, n] of u) if (e.startsWith(t) && e.endsWith(n)) return e.substring(t.length, e.length - n.length);
45
+ return e;
46
+ }
47
+ function y(e) {
48
+ return v(e.includes("\\displaystyle") ? e.replace("\\displaystyle", "").trim() : e);
49
+ }
50
+ var b = "mathjax_ignore", x = "mathjax_process";
51
+ function S(e, t) {
52
+ let n = e.closest(`.${b}, .${x}`);
53
+ return n !== null && t.contains(n) && !n.classList.contains(x);
54
+ }
55
+ function C(e) {
56
+ for (let t of e.querySelectorAll("[data-latex]")) {
57
+ if (t.dataset.mathHandled || t.closest("mjx-container") || S(t, e)) continue;
58
+ let n = t.textContent;
59
+ n && (t.textContent = `\\(${y(n)}\\)`.replace(l, "\\newline "), t.dataset.mathHandled = "true");
60
+ }
61
+ }
62
+ function w(e, t) {
63
+ for (let t of e.querySelectorAll("math")) if (!t.closest("mjx-assistive-mml")) return !0;
64
+ return (t ? c : s).test(e.textContent ?? "");
65
+ }
66
+ function T(e) {
67
+ return new Promise((t, n) => {
68
+ let { useSingleDollar: r = !1, accessibility: s = !0, loadFonts: c = !0, srcUrl: l } = e, u = {
69
+ loader: {
70
+ load: s ? ["a11y/assistive-mml"] : [],
71
+ failed: (e) => n(e)
24
72
  },
25
73
  startup: {
74
+ typeset: !1,
26
75
  ready: () => {
27
- window.MathJax?.startup.defaultReady && (window.MathJax.startup.defaultReady(), e());
28
- },
29
- defaultReady: () => {}
76
+ let e = _(), r = e?.startup, i = !!e?.version?.startsWith("4.");
77
+ i && E(e), r?.defaultReady?.(), i && D(r?.document), Promise.resolve(r?.promise).then(() => t(), n);
78
+ }
79
+ },
80
+ tex: { macros: { ...a } },
81
+ options: {
82
+ enableMenu: s,
83
+ menuOptions: { settings: {
84
+ assistiveMml: s,
85
+ enrich: !1,
86
+ inTabOrder: !1
87
+ } }
30
88
  }
31
89
  };
32
- r && s.tex && (s.tex.inlineMath = [["$", "$"], ["\\(", "\\)"]], s.tex.processEscapes = !0), a || (s.chtml = { fontURL: "" }), window.MathJax = s;
33
- let c = document.createElement("script");
34
- c.src = o || "https://cdn.jsdelivr.net/npm/mathjax@4/tex-chtml.js", c.async = !0, c.onload = () => {
35
- setTimeout(e, 100);
36
- }, c.onerror = () => {
37
- n(/* @__PURE__ */ Error("Failed to load MathJax"));
38
- }, document.head.appendChild(c);
39
- }), e);
90
+ r && u.tex && (console.warn(o), u.tex.inlineMath = [["$", "$"], ["\\(", "\\)"]], u.tex.processEscapes = !0), c || (u.chtml = { fontURL: "" }), window.MathJax = u;
91
+ let d = document.createElement("script");
92
+ d.src = l || i, d.async = !0, d.onerror = () => n(/* @__PURE__ */ Error("Failed to load MathJax")), document.head.appendChild(d);
93
+ });
94
+ }
95
+ function E(e) {
96
+ let t = e?._?.output?.chtml_ts?.CHTML;
97
+ t && (t.STYLESHEETID = f);
98
+ }
99
+ function D(e) {
100
+ if (!e) return;
101
+ let t = /* @__PURE__ */ new WeakSet(), n = (e) => {
102
+ let n = e.typesetRoot;
103
+ !n || t.has(n) || (g(n), t.add(n));
104
+ };
105
+ e.addRenderAction?.("pie-strip-latex", h, (e) => {
106
+ for (let t of e.math ?? []) n(t);
107
+ return !1;
108
+ }, (e) => {
109
+ let t = e.typesetRoot;
110
+ return t && g(t), !1;
111
+ });
112
+ let r = e.outputJax?.chtmlStyles;
113
+ r?.id === p && (r.id = f), ee();
40
114
  }
41
- function n() {
42
- let e = window.MathJax?.startup?.document;
43
- if (typeof e?.assistiveMml == "function") try {
44
- e.assistiveMml().updateDocument?.();
45
- } catch (e) {
46
- console.warn("[mathjax-renderer] Failed to attach assistive MathML:", e);
115
+ function O(e) {
116
+ return e instanceof HTMLStyleElement && m.includes(e.id);
117
+ }
118
+ function k(e) {
119
+ n("foreign-output-stylesheet", `another MathJax added <style id="${e.id}"> to <head>`);
120
+ }
121
+ function ee() {
122
+ let e = document.head, t = [...e.children].find(O);
123
+ if (t) {
124
+ k(t);
125
+ return;
47
126
  }
127
+ let n = new MutationObserver((e) => {
128
+ for (let t of e) {
129
+ let e = [...t.addedNodes].find(O);
130
+ if (e) {
131
+ k(e), n.disconnect();
132
+ return;
133
+ }
134
+ }
135
+ });
136
+ n.observe(e, { childList: !0 });
48
137
  }
49
- function r(e = {}) {
50
- return async (r) => {
51
- if (await t(e), !window.MathJax?.typesetPromise) {
52
- console.warn("[mathjax-renderer] MathJax not loaded or missing typesetPromise.");
138
+ function te(e) {
139
+ return new Promise((t, n) => {
140
+ let r = e.startup ?? {};
141
+ e.startup = r;
142
+ let i = r.ready;
143
+ r.ready = () => {
144
+ let e = _()?.startup;
145
+ i ? i.call(r) : e?.defaultReady?.(), Promise.resolve(e?.promise).then(() => t(), n);
146
+ };
147
+ });
148
+ }
149
+ function ne(e) {
150
+ let t = _();
151
+ return t ? t.version ? t.startup?.promise ? Promise.resolve(t.startup.promise).then(() => void 0) : Promise.resolve() : te(t) : T(e);
152
+ }
153
+ function re(e) {
154
+ return ne(e).then(() => {
155
+ typeof _()?.typesetPromise != "function" && console.warn("[mathjax-renderer] MathJax on this page has no typesetPromise; math stays untypeset.");
156
+ });
157
+ }
158
+ function ie(e) {
159
+ let t = globalThis, n = t[d];
160
+ return n || (n = re(e), t[d] = n), n;
161
+ }
162
+ function ae(e = {}) {
163
+ let t = e.useSingleDollar ?? !1;
164
+ return async (i) => {
165
+ if (typeof window > "u") return;
166
+ let a = r();
167
+ a && n("mathjax-3-global", `window.MathJax is MathJax ${a}`), C(i);
168
+ let o = ie(e);
169
+ if (!w(i, t)) {
170
+ o.catch(() => {});
53
171
  return;
54
172
  }
55
- await window.MathJax.typesetPromise([r]), n();
173
+ await o;
174
+ let s = _();
175
+ await s?.startup?.promise, typeof s?.typesetPromise == "function" && (await s.typesetPromise([i]), g(i));
56
176
  };
57
177
  }
58
- var i = null;
59
- function a() {
60
- return i ||= r({
61
- accessibility: !0,
62
- useSingleDollar: !0
63
- }), i;
178
+ var oe = "@pie-lib/math-rendering", se = "@pie-lib/math-rendering@2", ce = "pie-print", le = 50, ue = 1e4, de = null;
179
+ function fe() {
180
+ return !!window[se]?.opts?.useSingleDollar;
64
181
  }
65
- function o() {
182
+ function pe() {
183
+ return de ||= ae({ useSingleDollar: fe() }), de;
184
+ }
185
+ function me() {
66
186
  if (typeof window > "u") return null;
67
- let e = window["@pie-lib/math-rendering"];
68
- return typeof e?.renderMath == "function" ? e : null;
187
+ let e = window[oe];
188
+ return typeof e?.renderMath == "function" && e.renderMath !== j ? e : null;
189
+ }
190
+ function he(e) {
191
+ let t = e;
192
+ for (; t;) {
193
+ if (t instanceof Element && t.localName === ce) return t;
194
+ t = t instanceof ShadowRoot ? t.host : t.parentNode;
195
+ }
196
+ return null;
197
+ }
198
+ function A() {
199
+ let e = window.renderMath;
200
+ return typeof e == "function" ? e : null;
201
+ }
202
+ async function ge(e) {
203
+ let t = he(e);
204
+ if (!t) return null;
205
+ let n = A();
206
+ if (n || t.mathRenderingModuleUrlImported !== !0) return n;
207
+ let r = Date.now() + ue;
208
+ for (; Date.now() < r;) {
209
+ await new Promise((e) => setTimeout(e, le));
210
+ let e = A();
211
+ if (e) return e;
212
+ }
213
+ return null;
69
214
  }
70
- var s = async (e) => {
215
+ var j = async (e) => {
71
216
  if (typeof window > "u") return;
72
217
  let t = typeof e == "string", n;
73
218
  t ? (n = document.createElement("div"), n.innerHTML = e) : n = e || document.body;
74
- let r = o();
75
- return r ? await r.renderMath?.(n) : await a()(n), t ? n.innerHTML : void 0;
76
- }, c = {
219
+ let r = me(), i = r || t ? null : await ge(n);
220
+ return r ? await r.renderMath?.(n) : i && i !== j ? await i(n) : await pe()(n), t ? n.innerHTML : void 0;
221
+ }, _e = {
77
222
  translation: {
78
223
  categorize: {
79
224
  limitMaxChoicesPerCategory: "You've reached the limit of {{maxChoicesPerCategory}} responses per area. To add another response, one must first be removed.",
@@ -213,7 +358,7 @@ var s = async (e) => {
213
358
  hideNote: "Hide Note",
214
359
  cancel: "Cancel"
215
360
  }
216
- }, l = {
361
+ }, ve = {
217
362
  translation: {
218
363
  categorize: {
219
364
  limitMaxChoicesPerCategory: "Has alcanzado el límite de {{maxChoicesPerCategory}} respuestas por área. Para agregar otra respuesta, primero se debe eliminar una respuesta.",
@@ -353,55 +498,55 @@ var s = async (e) => {
353
498
  hideNote: "Ocultar Nota",
354
499
  cancel: "Cancelar"
355
500
  }
356
- }, u = (e) => typeof e == "string", d = () => {
501
+ }, M = (e) => typeof e == "string", N = () => {
357
502
  let e, t, n = new Promise((n, r) => {
358
503
  e = n, t = r;
359
504
  });
360
505
  return n.resolve = e, n.reject = t, n;
361
- }, f = (e) => e == null ? "" : "" + e, p = (e, t, n) => {
506
+ }, P = (e) => e == null ? "" : "" + e, ye = (e, t, n) => {
362
507
  e.forEach((e) => {
363
508
  t[e] && (n[e] = t[e]);
364
509
  });
365
- }, m = /###/g, h = (e) => e && e.indexOf("###") > -1 ? e.replace(m, ".") : e, g = (e) => !e || u(e), _ = (e, t, n) => {
366
- let r = u(t) ? t.split(".") : t, i = 0;
510
+ }, be = /###/g, F = (e) => e && e.indexOf("###") > -1 ? e.replace(be, ".") : e, I = (e) => !e || M(e), L = (e, t, n) => {
511
+ let r = M(t) ? t.split(".") : t, i = 0;
367
512
  for (; i < r.length - 1;) {
368
- if (g(e)) return {};
369
- let t = h(r[i]);
513
+ if (I(e)) return {};
514
+ let t = F(r[i]);
370
515
  !e[t] && n && (e[t] = new n()), e = Object.prototype.hasOwnProperty.call(e, t) ? e[t] : {}, ++i;
371
516
  }
372
- return g(e) ? {} : {
517
+ return I(e) ? {} : {
373
518
  obj: e,
374
- k: h(r[i])
519
+ k: F(r[i])
375
520
  };
376
- }, v = (e, t, n) => {
377
- let { obj: r, k: i } = _(e, t, Object);
521
+ }, R = (e, t, n) => {
522
+ let { obj: r, k: i } = L(e, t, Object);
378
523
  if (r !== void 0 || t.length === 1) {
379
524
  r[i] = n;
380
525
  return;
381
526
  }
382
- let a = t[t.length - 1], o = t.slice(0, t.length - 1), s = _(e, o, Object);
383
- for (; s.obj === void 0 && o.length;) a = `${o[o.length - 1]}.${a}`, o = o.slice(0, o.length - 1), s = _(e, o, Object), s?.obj && s.obj[`${s.k}.${a}`] !== void 0 && (s.obj = void 0);
527
+ let a = t[t.length - 1], o = t.slice(0, t.length - 1), s = L(e, o, Object);
528
+ for (; s.obj === void 0 && o.length;) a = `${o[o.length - 1]}.${a}`, o = o.slice(0, o.length - 1), s = L(e, o, Object), s?.obj && s.obj[`${s.k}.${a}`] !== void 0 && (s.obj = void 0);
384
529
  s.obj[`${s.k}.${a}`] = n;
385
- }, y = (e, t, n, r) => {
386
- let { obj: i, k: a } = _(e, t, Object);
530
+ }, xe = (e, t, n, r) => {
531
+ let { obj: i, k: a } = L(e, t, Object);
387
532
  i[a] = i[a] || [], i[a].push(n);
388
- }, b = (e, t) => {
389
- let { obj: n, k: r } = _(e, t);
533
+ }, z = (e, t) => {
534
+ let { obj: n, k: r } = L(e, t);
390
535
  if (n && Object.prototype.hasOwnProperty.call(n, r)) return n[r];
391
- }, x = (e, t, n) => {
392
- let r = b(e, n);
393
- return r === void 0 ? b(t, n) : r;
394
- }, S = (e, t, n) => {
395
- for (let r in t) r !== "__proto__" && r !== "constructor" && (r in e ? u(e[r]) || e[r] instanceof String || u(t[r]) || t[r] instanceof String ? n && (e[r] = t[r]) : S(e[r], t[r], n) : e[r] = t[r]);
536
+ }, Se = (e, t, n) => {
537
+ let r = z(e, n);
538
+ return r === void 0 ? z(t, n) : r;
539
+ }, B = (e, t, n) => {
540
+ for (let r in t) r !== "__proto__" && r !== "constructor" && (r in e ? M(e[r]) || e[r] instanceof String || M(t[r]) || t[r] instanceof String ? n && (e[r] = t[r]) : B(e[r], t[r], n) : e[r] = t[r]);
396
541
  return e;
397
- }, C = (e) => e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"), w = {
542
+ }, V = (e) => e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"), Ce = {
398
543
  "&": "&amp;",
399
544
  "<": "&lt;",
400
545
  ">": "&gt;",
401
546
  "\"": "&quot;",
402
547
  "'": "&#39;",
403
548
  "/": "&#x2F;"
404
- }, T = (e) => u(e) ? e.replace(/[&<>"'\/]/g, (e) => w[e]) : e, E = class {
549
+ }, we = (e) => M(e) ? e.replace(/[&<>"'\/]/g, (e) => Ce[e]) : e, Te = class {
405
550
  constructor(e) {
406
551
  this.capacity = e, this.regExpMap = /* @__PURE__ */ new Map(), this.regExpQueue = [];
407
552
  }
@@ -411,23 +556,23 @@ var s = async (e) => {
411
556
  let n = new RegExp(e);
412
557
  return this.regExpQueue.length === this.capacity && this.regExpMap.delete(this.regExpQueue.shift()), this.regExpMap.set(e, n), this.regExpQueue.push(e), n;
413
558
  }
414
- }, D = [
559
+ }, Ee = [
415
560
  " ",
416
561
  ",",
417
562
  "?",
418
563
  "!",
419
564
  ";"
420
- ], O = new E(20), k = (e, t, n) => {
565
+ ], De = new Te(20), Oe = (e, t, n) => {
421
566
  t ||= "", n ||= "";
422
- let r = D.filter((e) => t.indexOf(e) < 0 && n.indexOf(e) < 0);
567
+ let r = Ee.filter((e) => t.indexOf(e) < 0 && n.indexOf(e) < 0);
423
568
  if (r.length === 0) return !0;
424
- let i = O.getRegExp(`(${r.map((e) => e === "?" ? "\\?" : e).join("|")})`), a = !i.test(e);
569
+ let i = De.getRegExp(`(${r.map((e) => e === "?" ? "\\?" : e).join("|")})`), a = !i.test(e);
425
570
  if (!a) {
426
571
  let t = e.indexOf(n);
427
572
  t > 0 && !i.test(e.substring(0, t)) && (a = !0);
428
573
  }
429
574
  return a;
430
- }, A = (e, t, n = ".") => {
575
+ }, H = (e, t, n = ".") => {
431
576
  if (!e) return;
432
577
  if (e[t]) return Object.prototype.hasOwnProperty.call(e, t) ? e[t] : void 0;
433
578
  let r = t.split(n), i = e;
@@ -446,7 +591,7 @@ var s = async (e) => {
446
591
  i = t;
447
592
  }
448
593
  return i;
449
- }, j = (e) => e?.replace(/_/g, "-"), ee = {
594
+ }, U = (e) => e?.replace(/_/g, "-"), ke = {
450
595
  type: "logger",
451
596
  log(e) {
452
597
  this.output("log", e);
@@ -460,12 +605,12 @@ var s = async (e) => {
460
605
  output(e, t) {
461
606
  console?.[e]?.apply?.(console, t);
462
607
  }
463
- }, M = new class e {
608
+ }, W = new class e {
464
609
  constructor(e, t = {}) {
465
610
  this.init(e, t);
466
611
  }
467
612
  init(e, t = {}) {
468
- this.prefix = t.prefix || "i18next:", this.logger = e || ee, this.options = t, this.debug = t.debug;
613
+ this.prefix = t.prefix || "i18next:", this.logger = e || ke, this.options = t, this.debug = t.debug;
469
614
  }
470
615
  log(...e) {
471
616
  return this.forward(e, "log", "", !0);
@@ -480,7 +625,7 @@ var s = async (e) => {
480
625
  return this.forward(e, "warn", "WARNING DEPRECATED: ", !0);
481
626
  }
482
627
  forward(e, t, n, r) {
483
- return r && !this.debug ? null : (u(e[0]) && (e[0] = `${n}${this.prefix} ${e[0]}`), this.logger[t](e));
628
+ return r && !this.debug ? null : (M(e[0]) && (e[0] = `${n}${this.prefix} ${e[0]}`), this.logger[t](e));
484
629
  }
485
630
  create(t) {
486
631
  return new e(this.logger, {
@@ -491,7 +636,7 @@ var s = async (e) => {
491
636
  clone(t) {
492
637
  return t ||= this.options, t.prefix = t.prefix || this.prefix, new e(this.logger, t);
493
638
  }
494
- }(), N = class {
639
+ }(), G = class {
495
640
  constructor() {
496
641
  this.observers = {};
497
642
  }
@@ -518,7 +663,7 @@ var s = async (e) => {
518
663
  for (let i = 0; i < r; i++) n.apply(n, [e, ...t]);
519
664
  });
520
665
  }
521
- }, P = class extends N {
666
+ }, K = class extends G {
522
667
  constructor(e, t = {
523
668
  ns: ["translation"],
524
669
  defaultNS: "translation"
@@ -534,16 +679,16 @@ var s = async (e) => {
534
679
  }
535
680
  getResource(e, t, n, r = {}) {
536
681
  let i = r.keySeparator === void 0 ? this.options.keySeparator : r.keySeparator, a = r.ignoreJSONStructure === void 0 ? this.options.ignoreJSONStructure : r.ignoreJSONStructure, o;
537
- e.indexOf(".") > -1 ? o = e.split(".") : (o = [e, t], n && (Array.isArray(n) ? o.push(...n) : u(n) && i ? o.push(...n.split(i)) : o.push(n)));
538
- let s = b(this.data, o);
539
- return !s && !t && !n && e.indexOf(".") > -1 && (e = o[0], t = o[1], n = o.slice(2).join(".")), s || !a || !u(n) ? s : A(this.data?.[e]?.[t], n, i);
682
+ e.indexOf(".") > -1 ? o = e.split(".") : (o = [e, t], n && (Array.isArray(n) ? o.push(...n) : M(n) && i ? o.push(...n.split(i)) : o.push(n)));
683
+ let s = z(this.data, o);
684
+ return !s && !t && !n && e.indexOf(".") > -1 && (e = o[0], t = o[1], n = o.slice(2).join(".")), s || !a || !M(n) ? s : H(this.data?.[e]?.[t], n, i);
540
685
  }
541
686
  addResource(e, t, n, r, i = { silent: !1 }) {
542
687
  let a = i.keySeparator === void 0 ? this.options.keySeparator : i.keySeparator, o = [e, t];
543
- n && (o = o.concat(a ? n.split(a) : n)), e.indexOf(".") > -1 && (o = e.split("."), r = t, t = o[1]), this.addNamespaces(t), v(this.data, o, r), i.silent || this.emit("added", e, t, n, r);
688
+ n && (o = o.concat(a ? n.split(a) : n)), e.indexOf(".") > -1 && (o = e.split("."), r = t, t = o[1]), this.addNamespaces(t), R(this.data, o, r), i.silent || this.emit("added", e, t, n, r);
544
689
  }
545
690
  addResources(e, t, n, r = { silent: !1 }) {
546
- for (let r in n) (u(n[r]) || Array.isArray(n[r])) && this.addResource(e, t, r, n[r], { silent: !0 });
691
+ for (let r in n) (M(n[r]) || Array.isArray(n[r])) && this.addResource(e, t, r, n[r], { silent: !0 });
547
692
  r.silent || this.emit("added", e, t, n);
548
693
  }
549
694
  addResourceBundle(e, t, n, r, i, a = {
@@ -552,11 +697,11 @@ var s = async (e) => {
552
697
  }) {
553
698
  let o = [e, t];
554
699
  e.indexOf(".") > -1 && (o = e.split("."), r = n, n = t, t = o[1]), this.addNamespaces(t);
555
- let s = b(this.data, o) || {};
556
- a.skipCopy || (n = JSON.parse(JSON.stringify(n))), r ? S(s, n, i) : s = {
700
+ let s = z(this.data, o) || {};
701
+ a.skipCopy || (n = JSON.parse(JSON.stringify(n))), r ? B(s, n, i) : s = {
557
702
  ...s,
558
703
  ...n
559
- }, v(this.data, o, s), a.silent || this.emit("added", e, t, n);
704
+ }, R(this.data, o, s), a.silent || this.emit("added", e, t, n);
560
705
  }
561
706
  removeResourceBundle(e, t) {
562
707
  this.hasResourceBundle(e, t) && delete this.data[e][t], this.removeNamespaces(t), this.emit("removed", e, t);
@@ -577,7 +722,7 @@ var s = async (e) => {
577
722
  toJSON() {
578
723
  return this.data;
579
724
  }
580
- }, F = {
725
+ }, Ae = {
581
726
  processors: {},
582
727
  addPostProcessor(e) {
583
728
  this.processors[e.name] = e;
@@ -587,22 +732,22 @@ var s = async (e) => {
587
732
  t = this.processors[e]?.process(t, n, r, i) ?? t;
588
733
  }), t;
589
734
  }
590
- }, I = Symbol("i18next/PATH_KEY");
591
- function te() {
735
+ }, je = Symbol("i18next/PATH_KEY");
736
+ function Me() {
592
737
  let e = [], t = Object.create(null), n;
593
- return t.get = (r, i) => (n?.revoke?.(), i === I ? e : (e.push(i), n = Proxy.revocable(r, t), n.proxy)), Proxy.revocable(Object.create(null), t).proxy;
738
+ return t.get = (r, i) => (n?.revoke?.(), i === je ? e : (e.push(i), n = Proxy.revocable(r, t), n.proxy)), Proxy.revocable(Object.create(null), t).proxy;
594
739
  }
595
- function L(e, t) {
596
- let { [I]: n } = e(te()), r = t?.keySeparator ?? ".", i = t?.nsSeparator ?? ":";
740
+ function q(e, t) {
741
+ let { [je]: n } = e(Me()), r = t?.keySeparator ?? ".", i = t?.nsSeparator ?? ":";
597
742
  if (n.length > 1 && i) {
598
743
  let e = t?.ns, a = Array.isArray(e) ? e : null;
599
744
  if (a && a.length > 1 && a.slice(1).includes(n[0])) return `${n[0]}${i}${n.slice(1).join(r)}`;
600
745
  }
601
746
  return n.join(r);
602
747
  }
603
- var R = {}, z = (e) => !u(e) && typeof e != "boolean" && typeof e != "number", B = class e extends N {
748
+ var Ne = {}, J = (e) => !M(e) && typeof e != "boolean" && typeof e != "number", Pe = class e extends G {
604
749
  constructor(e, t = {}) {
605
- super(), p([
750
+ super(), ye([
606
751
  "resourceStore",
607
752
  "languageUtils",
608
753
  "pluralResolver",
@@ -610,7 +755,7 @@ var R = {}, z = (e) => !u(e) && typeof e != "boolean" && typeof e != "number", B
610
755
  "backendConnector",
611
756
  "i18nFormat",
612
757
  "utils"
613
- ], e, this), this.options = t, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.logger = M.create("translator");
758
+ ], e, this), this.options = t, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.logger = W.create("translator");
614
759
  }
615
760
  changeLanguage(e) {
616
761
  e && (this.language = e);
@@ -620,95 +765,95 @@ var R = {}, z = (e) => !u(e) && typeof e != "boolean" && typeof e != "number", B
620
765
  if (e == null) return !1;
621
766
  let r = this.resolve(e, n);
622
767
  if (r?.res === void 0) return !1;
623
- let i = z(r.res);
768
+ let i = J(r.res);
624
769
  return !(n.returnObjects === !1 && i);
625
770
  }
626
771
  extractFromKey(e, t) {
627
772
  let n = t.nsSeparator === void 0 ? this.options.nsSeparator : t.nsSeparator;
628
773
  n === void 0 && (n = ":");
629
- let r = t.keySeparator === void 0 ? this.options.keySeparator : t.keySeparator, i = t.ns || this.options.defaultNS || [], a = n && e.indexOf(n) > -1, o = !this.options.userDefinedKeySeparator && !t.keySeparator && !this.options.userDefinedNsSeparator && !t.nsSeparator && !k(e, n, r);
774
+ let r = t.keySeparator === void 0 ? this.options.keySeparator : t.keySeparator, i = t.ns || this.options.defaultNS || [], a = n && e.indexOf(n) > -1, o = !this.options.userDefinedKeySeparator && !t.keySeparator && !this.options.userDefinedNsSeparator && !t.nsSeparator && !Oe(e, n, r);
630
775
  if (a && !o) {
631
776
  let t = e.match(this.interpolator.nestingRegexp);
632
777
  if (t && t.length > 0) return {
633
778
  key: e,
634
- namespaces: u(i) ? [i] : i
779
+ namespaces: M(i) ? [i] : i
635
780
  };
636
781
  let a = e.split(n);
637
782
  (n !== r || n === r && this.options.ns.indexOf(a[0]) > -1) && (i = a.shift()), e = a.join(r);
638
783
  }
639
784
  return {
640
785
  key: e,
641
- namespaces: u(i) ? [i] : i
786
+ namespaces: M(i) ? [i] : i
642
787
  };
643
788
  }
644
789
  translate(t, n, r) {
645
790
  let i = typeof n == "object" ? { ...n } : n;
646
791
  if (typeof i != "object" && this.options.overloadTranslationOptionHandler && (i = this.options.overloadTranslationOptionHandler(arguments)), typeof i == "object" && (i = { ...i }), i ||= {}, t == null) return "";
647
- typeof t == "function" && (t = L(t, {
792
+ typeof t == "function" && (t = q(t, {
648
793
  ...this.options,
649
794
  ...i
650
- })), Array.isArray(t) || (t = [String(t)]), t = t.map((e) => typeof e == "function" ? L(e, {
795
+ })), Array.isArray(t) || (t = [String(t)]), t = t.map((e) => typeof e == "function" ? q(e, {
651
796
  ...this.options,
652
797
  ...i
653
798
  }) : String(e));
654
- let a = i.returnDetails === void 0 ? this.options.returnDetails : i.returnDetails, o = i.keySeparator === void 0 ? this.options.keySeparator : i.keySeparator, { key: s, namespaces: c } = this.extractFromKey(t[t.length - 1], i), l = c[c.length - 1], d = i.nsSeparator === void 0 ? this.options.nsSeparator : i.nsSeparator;
655
- d === void 0 && (d = ":");
656
- let f = i.lng || this.language, p = i.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;
657
- if (f?.toLowerCase() === "cimode") return p ? a ? {
658
- res: `${l}${d}${s}`,
799
+ let a = i.returnDetails === void 0 ? this.options.returnDetails : i.returnDetails, o = i.keySeparator === void 0 ? this.options.keySeparator : i.keySeparator, { key: s, namespaces: c } = this.extractFromKey(t[t.length - 1], i), l = c[c.length - 1], u = i.nsSeparator === void 0 ? this.options.nsSeparator : i.nsSeparator;
800
+ u === void 0 && (u = ":");
801
+ let d = i.lng || this.language, f = i.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;
802
+ if (d?.toLowerCase() === "cimode") return f ? a ? {
803
+ res: `${l}${u}${s}`,
659
804
  usedKey: s,
660
805
  exactUsedKey: s,
661
- usedLng: f,
806
+ usedLng: d,
662
807
  usedNS: l,
663
808
  usedParams: this.getUsedParamsDetails(i)
664
- } : `${l}${d}${s}` : a ? {
809
+ } : `${l}${u}${s}` : a ? {
665
810
  res: s,
666
811
  usedKey: s,
667
812
  exactUsedKey: s,
668
- usedLng: f,
813
+ usedLng: d,
669
814
  usedNS: l,
670
815
  usedParams: this.getUsedParamsDetails(i)
671
816
  } : s;
672
- let m = this.resolve(t, i), h = m?.res, g = m?.usedKey || s, _ = m?.exactUsedKey || s, v = [
817
+ let p = this.resolve(t, i), m = p?.res, h = p?.usedKey || s, g = p?.exactUsedKey || s, _ = [
673
818
  "[object Number]",
674
819
  "[object Function]",
675
820
  "[object RegExp]"
676
- ], y = i.joinArrays === void 0 ? this.options.joinArrays : i.joinArrays, b = !this.i18nFormat || this.i18nFormat.handleAsObject, x = i.count !== void 0 && !u(i.count), S = e.hasDefaultValue(i), C = x ? this.pluralResolver.getSuffix(f, i.count, i) : "", w = i.ordinal && x ? this.pluralResolver.getSuffix(f, i.count, { ordinal: !1 }) : "", T = x && !i.ordinal && i.count === 0, E = T && i[`defaultValue${this.options.pluralSeparator}zero`] || i[`defaultValue${C}`] || i[`defaultValue${w}`] || i.defaultValue, D = h;
677
- b && !h && S && (D = E);
678
- let O = z(D), k = Object.prototype.toString.apply(D);
679
- if (b && D && O && v.indexOf(k) < 0 && !(u(y) && Array.isArray(D))) {
821
+ ], v = i.joinArrays === void 0 ? this.options.joinArrays : i.joinArrays, y = !this.i18nFormat || this.i18nFormat.handleAsObject, b = i.count !== void 0 && !M(i.count), x = e.hasDefaultValue(i), S = b ? this.pluralResolver.getSuffix(d, i.count, i) : "", C = i.ordinal && b ? this.pluralResolver.getSuffix(d, i.count, { ordinal: !1 }) : "", w = b && !i.ordinal && i.count === 0, T = w && i[`defaultValue${this.options.pluralSeparator}zero`] || i[`defaultValue${S}`] || i[`defaultValue${C}`] || i.defaultValue, E = m;
822
+ y && !m && x && (E = T);
823
+ let D = J(E), O = Object.prototype.toString.apply(E);
824
+ if (y && E && D && _.indexOf(O) < 0 && !(M(v) && Array.isArray(E))) {
680
825
  if (!i.returnObjects && !this.options.returnObjects) {
681
826
  this.options.returnedObjectHandler || this.logger.warn("accessing an object - but returnObjects options is not enabled!");
682
- let e = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(g, D, {
827
+ let e = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(h, E, {
683
828
  ...i,
684
829
  ns: c
685
830
  }) : `key '${s} (${this.language})' returned an object instead of string.`;
686
- return a ? (m.res = e, m.usedParams = this.getUsedParamsDetails(i), m) : e;
831
+ return a ? (p.res = e, p.usedParams = this.getUsedParamsDetails(i), p) : e;
687
832
  }
688
833
  if (o) {
689
- let e = Array.isArray(D), t = e ? [] : {}, n = e ? _ : g;
690
- for (let e in D) if (Object.prototype.hasOwnProperty.call(D, e)) {
834
+ let e = Array.isArray(E), t = e ? [] : {}, n = e ? g : h;
835
+ for (let e in E) if (Object.prototype.hasOwnProperty.call(E, e)) {
691
836
  let r = `${n}${o}${e}`;
692
- S && !h ? t[e] = this.translate(r, {
837
+ x && !m ? t[e] = this.translate(r, {
693
838
  ...i,
694
- defaultValue: z(E) ? E[e] : void 0,
839
+ defaultValue: J(T) ? T[e] : void 0,
695
840
  joinArrays: !1,
696
841
  ns: c
697
842
  }) : t[e] = this.translate(r, {
698
843
  ...i,
699
844
  joinArrays: !1,
700
845
  ns: c
701
- }), t[e] === r && (t[e] = D[e]);
846
+ }), t[e] === r && (t[e] = E[e]);
702
847
  }
703
- h = t;
848
+ m = t;
704
849
  }
705
- } else if (b && u(y) && Array.isArray(h)) h = h.join(y), h &&= this.extendTranslation(h, t, i, r);
850
+ } else if (y && M(v) && Array.isArray(m)) m = m.join(v), m &&= this.extendTranslation(m, t, i, r);
706
851
  else {
707
852
  let e = !1, n = !1;
708
- !this.isValidLookup(h) && S && (e = !0, h = E), this.isValidLookup(h) || (n = !0, h = s);
709
- let a = (i.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) && n ? void 0 : h, c = S && E !== h && this.options.updateMissing;
853
+ !this.isValidLookup(m) && x && (e = !0, m = T), this.isValidLookup(m) || (n = !0, m = s);
854
+ let a = (i.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) && n ? void 0 : m, c = x && T !== m && this.options.updateMissing;
710
855
  if (n || e || c) {
711
- if (this.logger.log(c ? "updateKey" : "missingKey", f, l, s, c ? E : h), o) {
856
+ if (this.logger.log(c ? "updateKey" : "missingKey", d, l, s, c ? T : m), o) {
712
857
  let e = this.resolve(s, {
713
858
  ...i,
714
859
  keySeparator: !1
@@ -719,19 +864,19 @@ var R = {}, z = (e) => !u(e) && typeof e != "boolean" && typeof e != "number", B
719
864
  if (this.options.saveMissingTo === "fallback" && t && t[0]) for (let n = 0; n < t.length; n++) e.push(t[n]);
720
865
  else this.options.saveMissingTo === "all" ? e = this.languageUtils.toResolveHierarchy(i.lng || this.language) : e.push(i.lng || this.language);
721
866
  let n = (e, t, n) => {
722
- let r = S && n !== h ? n : a;
723
- this.options.missingKeyHandler ? this.options.missingKeyHandler(e, l, t, r, c, i) : this.backendConnector?.saveMissing && this.backendConnector.saveMissing(e, l, t, r, c, i), this.emit("missingKey", e, l, t, h);
867
+ let r = x && n !== m ? n : a;
868
+ this.options.missingKeyHandler ? this.options.missingKeyHandler(e, l, t, r, c, i) : this.backendConnector?.saveMissing && this.backendConnector.saveMissing(e, l, t, r, c, i), this.emit("missingKey", e, l, t, m);
724
869
  };
725
- this.options.saveMissing && (this.options.saveMissingPlurals && x ? e.forEach((e) => {
870
+ this.options.saveMissing && (this.options.saveMissingPlurals && b ? e.forEach((e) => {
726
871
  let t = this.pluralResolver.getSuffixes(e, i);
727
- T && i[`defaultValue${this.options.pluralSeparator}zero`] && t.indexOf(`${this.options.pluralSeparator}zero`) < 0 && t.push(`${this.options.pluralSeparator}zero`), t.forEach((t) => {
728
- n([e], s + t, i[`defaultValue${t}`] || E);
872
+ w && i[`defaultValue${this.options.pluralSeparator}zero`] && t.indexOf(`${this.options.pluralSeparator}zero`) < 0 && t.push(`${this.options.pluralSeparator}zero`), t.forEach((t) => {
873
+ n([e], s + t, i[`defaultValue${t}`] || T);
729
874
  });
730
- }) : n(e, s, E));
875
+ }) : n(e, s, T));
731
876
  }
732
- h = this.extendTranslation(h, t, i, m, r), n && h === s && this.options.appendNamespaceToMissingKey && (h = `${l}${d}${s}`), (n || e) && this.options.parseMissingKeyHandler && (h = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${l}${d}${s}` : s, e ? h : void 0, i));
877
+ m = this.extendTranslation(m, t, i, p, r), n && m === s && this.options.appendNamespaceToMissingKey && (m = `${l}${u}${s}`), (n || e) && this.options.parseMissingKeyHandler && (m = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${l}${u}${s}` : s, e ? m : void 0, i));
733
878
  }
734
- return a ? (m.res = h, m.usedParams = this.getUsedParamsDetails(i), m) : h;
879
+ return a ? (p.res = m, p.usedParams = this.getUsedParamsDetails(i), p) : m;
735
880
  }
736
881
  extendTranslation(e, t, n, r, i) {
737
882
  if (this.i18nFormat?.parse) e = this.i18nFormat.parse(e, {
@@ -746,12 +891,12 @@ var R = {}, z = (e) => !u(e) && typeof e != "boolean" && typeof e != "number", B
746
891
  ...n.interpolation
747
892
  }
748
893
  });
749
- let a = u(e) && (n?.interpolation?.skipOnVariables === void 0 ? this.options.interpolation.skipOnVariables : n.interpolation.skipOnVariables), o;
894
+ let a = M(e) && (n?.interpolation?.skipOnVariables === void 0 ? this.options.interpolation.skipOnVariables : n.interpolation.skipOnVariables), o;
750
895
  if (a) {
751
896
  let t = e.match(this.interpolator.nestingRegexp);
752
897
  o = t && t.length;
753
898
  }
754
- let s = n.replace && !u(n.replace) ? n.replace : n;
899
+ let s = n.replace && !M(n.replace) ? n.replace : n;
755
900
  if (this.options.interpolation.defaultVariables && (s = {
756
901
  ...this.options.interpolation.defaultVariables,
757
902
  ...s
@@ -761,8 +906,8 @@ var R = {}, z = (e) => !u(e) && typeof e != "boolean" && typeof e != "number", B
761
906
  }
762
907
  !n.lng && r && r.res && (n.lng = this.language || r.usedLng), n.nest !== !1 && (e = this.interpolator.nest(e, (...e) => i?.[0] === e[0] && !n.context ? (this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`), null) : this.translate(...e, t), n)), n.interpolation && this.interpolator.reset();
763
908
  }
764
- let a = n.postProcess || this.options.postProcess, o = u(a) ? [a] : a;
765
- return e != null && o?.length && n.applyPostProcessor !== !1 && (e = F.handle(o, e, t, this.options && this.options.postProcessPassResolved ? {
909
+ let a = n.postProcess || this.options.postProcess, o = M(a) ? [a] : a;
910
+ return e != null && o?.length && n.applyPostProcessor !== !1 && (e = Ae.handle(o, e, t, this.options && this.options.postProcessPassResolved ? {
766
911
  i18nResolved: {
767
912
  ...r,
768
913
  usedParams: this.getUsedParamsDetails(n)
@@ -772,7 +917,7 @@ var R = {}, z = (e) => !u(e) && typeof e != "boolean" && typeof e != "number", B
772
917
  }
773
918
  resolve(e, t = {}) {
774
919
  let n, r, i, a, o;
775
- return u(e) && (e = [e]), Array.isArray(e) && (e = e.map((e) => typeof e == "function" ? L(e, {
920
+ return M(e) && (e = [e]), Array.isArray(e) && (e = e.map((e) => typeof e == "function" ? q(e, {
776
921
  ...this.options,
777
922
  ...t
778
923
  }) : e)), e.forEach((e) => {
@@ -781,20 +926,20 @@ var R = {}, z = (e) => !u(e) && typeof e != "boolean" && typeof e != "number", B
781
926
  r = c;
782
927
  let l = s.namespaces;
783
928
  this.options.fallbackNS && (l = l.concat(this.options.fallbackNS));
784
- let d = t.count !== void 0 && !u(t.count), f = d && !t.ordinal && t.count === 0, p = t.context !== void 0 && (u(t.context) || typeof t.context == "number") && t.context !== "", m = t.lngs ? t.lngs : this.languageUtils.toResolveHierarchy(t.lng || this.language, t.fallbackLng);
929
+ let u = t.count !== void 0 && !M(t.count), d = u && !t.ordinal && t.count === 0, f = t.context !== void 0 && (M(t.context) || typeof t.context == "number") && t.context !== "", p = t.lngs ? t.lngs : this.languageUtils.toResolveHierarchy(t.lng || this.language, t.fallbackLng);
785
930
  l.forEach((e) => {
786
- this.isValidLookup(n) || (o = e, !R[`${m[0]}-${e}`] && this.utils?.hasLoadedNamespace && !this.utils?.hasLoadedNamespace(o) && (R[`${m[0]}-${e}`] = !0, this.logger.warn(`key "${r}" for languages "${m.join(", ")}" won't get resolved as namespace "${o}" was not yet loaded`, "This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")), m.forEach((r) => {
931
+ this.isValidLookup(n) || (o = e, !Ne[`${p[0]}-${e}`] && this.utils?.hasLoadedNamespace && !this.utils?.hasLoadedNamespace(o) && (Ne[`${p[0]}-${e}`] = !0, this.logger.warn(`key "${r}" for languages "${p.join(", ")}" won't get resolved as namespace "${o}" was not yet loaded`, "This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")), p.forEach((r) => {
787
932
  if (this.isValidLookup(n)) return;
788
933
  a = r;
789
934
  let o = [c];
790
935
  if (this.i18nFormat?.addLookupKeys) this.i18nFormat.addLookupKeys(o, c, r, e, t);
791
936
  else {
792
937
  let e;
793
- d && (e = this.pluralResolver.getSuffix(r, t.count, t));
938
+ u && (e = this.pluralResolver.getSuffix(r, t.count, t));
794
939
  let n = `${this.options.pluralSeparator}zero`, i = `${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;
795
- if (d && (t.ordinal && e.indexOf(i) === 0 && o.push(c + e.replace(i, this.options.pluralSeparator)), o.push(c + e), f && o.push(c + n)), p) {
940
+ if (u && (t.ordinal && e.indexOf(i) === 0 && o.push(c + e.replace(i, this.options.pluralSeparator)), o.push(c + e), d && o.push(c + n)), f) {
796
941
  let r = `${c}${this.options.contextSeparator || "_"}${t.context}`;
797
- o.push(r), d && (t.ordinal && e.indexOf(i) === 0 && o.push(r + e.replace(i, this.options.pluralSeparator)), o.push(r + e), f && o.push(r + n));
942
+ o.push(r), u && (t.ordinal && e.indexOf(i) === 0 && o.push(r + e.replace(i, this.options.pluralSeparator)), o.push(r + e), d && o.push(r + n));
798
943
  }
799
944
  }
800
945
  let s;
@@ -832,7 +977,7 @@ var R = {}, z = (e) => !u(e) && typeof e != "boolean" && typeof e != "number", B
832
977
  "joinArrays",
833
978
  "postProcess",
834
979
  "interpolation"
835
- ], n = e.replace && !u(e.replace), r = n ? e.replace : e;
980
+ ], n = e.replace && !M(e.replace), r = n ? e.replace : e;
836
981
  if (n && e.count !== void 0 && (r.count = e.count), this.options.interpolation.defaultVariables && (r = {
837
982
  ...this.options.interpolation.defaultVariables,
838
983
  ...r
@@ -846,22 +991,22 @@ var R = {}, z = (e) => !u(e) && typeof e != "boolean" && typeof e != "number", B
846
991
  for (let t in e) if (Object.prototype.hasOwnProperty.call(e, t) && t.substring(0, 12) === "defaultValue" && e[t] !== void 0) return !0;
847
992
  return !1;
848
993
  }
849
- }, V = class {
994
+ }, Fe = class {
850
995
  constructor(e) {
851
- this.options = e, this.supportedLngs = this.options.supportedLngs || !1, this.logger = M.create("languageUtils");
996
+ this.options = e, this.supportedLngs = this.options.supportedLngs || !1, this.logger = W.create("languageUtils");
852
997
  }
853
998
  getScriptPartFromCode(e) {
854
- if (e = j(e), !e || e.indexOf("-") < 0) return null;
999
+ if (e = U(e), !e || e.indexOf("-") < 0) return null;
855
1000
  let t = e.split("-");
856
1001
  return t.length === 2 || (t.pop(), t[t.length - 1].toLowerCase() === "x") ? null : this.formatLanguageCode(t.join("-"));
857
1002
  }
858
1003
  getLanguagePartFromCode(e) {
859
- if (e = j(e), !e || e.indexOf("-") < 0) return e;
1004
+ if (e = U(e), !e || e.indexOf("-") < 0) return e;
860
1005
  let t = e.split("-");
861
1006
  return this.formatLanguageCode(t[0]);
862
1007
  }
863
1008
  formatLanguageCode(e) {
864
- if (u(e) && e.indexOf("-") > -1) {
1009
+ if (M(e) && e.indexOf("-") > -1) {
865
1010
  let t;
866
1011
  try {
867
1012
  t = Intl.getCanonicalLocales(e)[0];
@@ -893,7 +1038,7 @@ var R = {}, z = (e) => !u(e) && typeof e != "boolean" && typeof e != "number", B
893
1038
  }
894
1039
  getFallbackCodes(e, t) {
895
1040
  if (!e) return [];
896
- if (typeof e == "function" && (e = e(t)), u(e) && (e = [e]), Array.isArray(e)) return e;
1041
+ if (typeof e == "function" && (e = e(t)), M(e) && (e = [e]), Array.isArray(e)) return e;
897
1042
  if (!t) return e.default || [];
898
1043
  let n = e[t];
899
1044
  return n ||= e[this.getScriptPartFromCode(t)], n ||= e[this.formatLanguageCode(t)], n ||= e[this.getLanguagePartFromCode(t)], n ||= e.default, n || [];
@@ -902,29 +1047,29 @@ var R = {}, z = (e) => !u(e) && typeof e != "boolean" && typeof e != "number", B
902
1047
  let n = this.getFallbackCodes((t === !1 ? [] : t) || this.options.fallbackLng || [], e), r = [], i = (e) => {
903
1048
  e && (this.isSupportedCode(e) ? r.push(e) : this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`));
904
1049
  };
905
- return u(e) && (e.indexOf("-") > -1 || e.indexOf("_") > -1) ? (this.options.load !== "languageOnly" && i(this.formatLanguageCode(e)), this.options.load !== "languageOnly" && this.options.load !== "currentOnly" && i(this.getScriptPartFromCode(e)), this.options.load !== "currentOnly" && i(this.getLanguagePartFromCode(e))) : u(e) && i(this.formatLanguageCode(e)), n.forEach((e) => {
1050
+ return M(e) && (e.indexOf("-") > -1 || e.indexOf("_") > -1) ? (this.options.load !== "languageOnly" && i(this.formatLanguageCode(e)), this.options.load !== "languageOnly" && this.options.load !== "currentOnly" && i(this.getScriptPartFromCode(e)), this.options.load !== "currentOnly" && i(this.getLanguagePartFromCode(e))) : M(e) && i(this.formatLanguageCode(e)), n.forEach((e) => {
906
1051
  r.indexOf(e) < 0 && i(this.formatLanguageCode(e));
907
1052
  }), r;
908
1053
  }
909
- }, H = {
1054
+ }, Ie = {
910
1055
  zero: 0,
911
1056
  one: 1,
912
1057
  two: 2,
913
1058
  few: 3,
914
1059
  many: 4,
915
1060
  other: 5
916
- }, U = {
1061
+ }, Le = {
917
1062
  select: (e) => e === 1 ? "one" : "other",
918
1063
  resolvedOptions: () => ({ pluralCategories: ["one", "other"] })
919
- }, ne = class {
1064
+ }, Re = class {
920
1065
  constructor(e, t = {}) {
921
- this.languageUtils = e, this.options = t, this.logger = M.create("pluralResolver"), this.pluralRulesCache = {};
1066
+ this.languageUtils = e, this.options = t, this.logger = W.create("pluralResolver"), this.pluralRulesCache = {};
922
1067
  }
923
1068
  clearCache() {
924
1069
  this.pluralRulesCache = {};
925
1070
  }
926
1071
  getRule(e, t = {}) {
927
- let n = j(e === "dev" ? "en" : e), r = t.ordinal ? "ordinal" : "cardinal", i = JSON.stringify({
1072
+ let n = U(e === "dev" ? "en" : e), r = t.ordinal ? "ordinal" : "cardinal", i = JSON.stringify({
928
1073
  cleanedCode: n,
929
1074
  type: r
930
1075
  });
@@ -933,8 +1078,8 @@ var R = {}, z = (e) => !u(e) && typeof e != "boolean" && typeof e != "number", B
933
1078
  try {
934
1079
  a = new Intl.PluralRules(n, { type: r });
935
1080
  } catch {
936
- if (typeof Intl > "u") return this.logger.error("No Intl support, please use an Intl polyfill!"), U;
937
- if (!e.match(/-|_/)) return U;
1081
+ if (typeof Intl > "u") return this.logger.error("No Intl support, please use an Intl polyfill!"), Le;
1082
+ if (!e.match(/-|_/)) return Le;
938
1083
  let n = this.languageUtils.getLanguagePartFromCode(e);
939
1084
  a = this.getRule(n, t);
940
1085
  }
@@ -949,23 +1094,23 @@ var R = {}, z = (e) => !u(e) && typeof e != "boolean" && typeof e != "number", B
949
1094
  }
950
1095
  getSuffixes(e, t = {}) {
951
1096
  let n = this.getRule(e, t);
952
- return n ||= this.getRule("dev", t), n ? n.resolvedOptions().pluralCategories.sort((e, t) => H[e] - H[t]).map((e) => `${this.options.prepend}${t.ordinal ? `ordinal${this.options.prepend}` : ""}${e}`) : [];
1097
+ return n ||= this.getRule("dev", t), n ? n.resolvedOptions().pluralCategories.sort((e, t) => Ie[e] - Ie[t]).map((e) => `${this.options.prepend}${t.ordinal ? `ordinal${this.options.prepend}` : ""}${e}`) : [];
953
1098
  }
954
1099
  getSuffix(e, t, n = {}) {
955
1100
  let r = this.getRule(e, n);
956
1101
  return r ? `${this.options.prepend}${n.ordinal ? `ordinal${this.options.prepend}` : ""}${r.select(t)}` : (this.logger.warn(`no plural rule found for: ${e}`), this.getSuffix("dev", t, n));
957
1102
  }
958
- }, W = (e, t, n, r = ".", i = !0) => {
959
- let a = x(e, t, n);
960
- return !a && i && u(n) && (a = A(e, n, r), a === void 0 && (a = A(t, n, r))), a;
961
- }, G = (e) => e.replace(/\$/g, "$$$$"), K = class {
1103
+ }, ze = (e, t, n, r = ".", i = !0) => {
1104
+ let a = Se(e, t, n);
1105
+ return !a && i && M(n) && (a = H(e, n, r), a === void 0 && (a = H(t, n, r))), a;
1106
+ }, Y = (e) => e.replace(/\$/g, "$$$$"), Be = class {
962
1107
  constructor(e = {}) {
963
- this.logger = M.create("interpolator"), this.options = e, this.format = e?.interpolation?.format || ((e) => e), this.init(e);
1108
+ this.logger = W.create("interpolator"), this.options = e, this.format = e?.interpolation?.format || ((e) => e), this.init(e);
964
1109
  }
965
1110
  init(e = {}) {
966
1111
  e.interpolation ||= { escapeValue: !0 };
967
1112
  let { escape: t, escapeValue: n, useRawValueToEscape: r, prefix: i, prefixEscaped: a, suffix: o, suffixEscaped: s, formatSeparator: c, unescapeSuffix: l, unescapePrefix: u, nestingPrefix: d, nestingPrefixEscaped: f, nestingSuffix: p, nestingSuffixEscaped: m, nestingOptionsSeparator: h, maxReplaces: g, alwaysFormat: _ } = e.interpolation;
968
- this.escape = t === void 0 ? T : t, this.escapeValue = n === void 0 || n, this.useRawValueToEscape = r !== void 0 && r, this.prefix = i ? C(i) : a || "{{", this.suffix = o ? C(o) : s || "}}", this.formatSeparator = c || ",", this.unescapePrefix = l ? "" : u || "-", this.unescapeSuffix = this.unescapePrefix ? "" : l || "", this.nestingPrefix = d ? C(d) : f || C("$t("), this.nestingSuffix = p ? C(p) : m || C(")"), this.nestingOptionsSeparator = h || ",", this.maxReplaces = g || 1e3, this.alwaysFormat = _ !== void 0 && _, this.resetRegExp();
1113
+ this.escape = t === void 0 ? we : t, this.escapeValue = n === void 0 || n, this.useRawValueToEscape = r !== void 0 && r, this.prefix = i ? V(i) : a || "{{", this.suffix = o ? V(o) : s || "}}", this.formatSeparator = c || ",", this.unescapePrefix = l ? "" : u || "-", this.unescapeSuffix = this.unescapePrefix ? "" : l || "", this.nestingPrefix = d ? V(d) : f || V("$t("), this.nestingSuffix = p ? V(p) : m || V(")"), this.nestingOptionsSeparator = h || ",", this.maxReplaces = g || 1e3, this.alwaysFormat = _ !== void 0 && _, this.resetRegExp();
969
1114
  }
970
1115
  reset() {
971
1116
  this.options && this.init(this.options);
@@ -977,7 +1122,7 @@ var R = {}, z = (e) => !u(e) && typeof e != "boolean" && typeof e != "number", B
977
1122
  interpolate(e, t, n, r) {
978
1123
  let i, a, o, s = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {}, c = (e) => {
979
1124
  if (e.indexOf(this.formatSeparator) < 0) {
980
- let i = W(t, s, e, this.options.keySeparator, this.options.ignoreJSONStructure);
1125
+ let i = ze(t, s, e, this.options.keySeparator, this.options.ignoreJSONStructure);
981
1126
  return this.alwaysFormat ? this.format(i, void 0, n, {
982
1127
  ...r,
983
1128
  ...t,
@@ -985,34 +1130,34 @@ var R = {}, z = (e) => !u(e) && typeof e != "boolean" && typeof e != "number", B
985
1130
  }) : i;
986
1131
  }
987
1132
  let i = e.split(this.formatSeparator), a = i.shift().trim(), o = i.join(this.formatSeparator).trim();
988
- return this.format(W(t, s, a, this.options.keySeparator, this.options.ignoreJSONStructure), o, n, {
1133
+ return this.format(ze(t, s, a, this.options.keySeparator, this.options.ignoreJSONStructure), o, n, {
989
1134
  ...r,
990
1135
  ...t,
991
1136
  interpolationkey: a
992
1137
  });
993
1138
  };
994
1139
  this.resetRegExp();
995
- let l = r?.missingInterpolationHandler || this.options.missingInterpolationHandler, d = r?.interpolation?.skipOnVariables === void 0 ? this.options.interpolation.skipOnVariables : r.interpolation.skipOnVariables;
1140
+ let l = r?.missingInterpolationHandler || this.options.missingInterpolationHandler, u = r?.interpolation?.skipOnVariables === void 0 ? this.options.interpolation.skipOnVariables : r.interpolation.skipOnVariables;
996
1141
  return [{
997
1142
  regex: this.regexpUnescape,
998
- safeValue: (e) => G(e)
1143
+ safeValue: (e) => Y(e)
999
1144
  }, {
1000
1145
  regex: this.regexp,
1001
- safeValue: (e) => this.escapeValue ? G(this.escape(e)) : G(e)
1146
+ safeValue: (e) => this.escapeValue ? Y(this.escape(e)) : Y(e)
1002
1147
  }].forEach((t) => {
1003
1148
  for (o = 0; i = t.regex.exec(e);) {
1004
1149
  let n = i[1].trim();
1005
1150
  if (a = c(n), a === void 0) if (typeof l == "function") {
1006
1151
  let t = l(e, i, r);
1007
- a = u(t) ? t : "";
1152
+ a = M(t) ? t : "";
1008
1153
  } else if (r && Object.prototype.hasOwnProperty.call(r, n)) a = "";
1009
- else if (d) {
1154
+ else if (u) {
1010
1155
  a = i[0];
1011
1156
  continue;
1012
1157
  } else this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`), a = "";
1013
- else !u(a) && !this.useRawValueToEscape && (a = f(a));
1158
+ else !M(a) && !this.useRawValueToEscape && (a = P(a));
1014
1159
  let s = t.safeValue(a);
1015
- if (e = e.replace(i[0], s), d ? (t.regex.lastIndex += a.length, t.regex.lastIndex -= i[0].length) : t.regex.lastIndex = 0, o++, o >= this.maxReplaces) break;
1160
+ if (e = e.replace(i[0], s), u ? (t.regex.lastIndex += a.length, t.regex.lastIndex -= i[0].length) : t.regex.lastIndex = 0, o++, o >= this.maxReplaces) break;
1016
1161
  }
1017
1162
  }), e;
1018
1163
  }
@@ -1020,7 +1165,7 @@ var R = {}, z = (e) => !u(e) && typeof e != "boolean" && typeof e != "number", B
1020
1165
  let r, i, a, o = (e, t) => {
1021
1166
  let n = this.nestingOptionsSeparator;
1022
1167
  if (e.indexOf(n) < 0) return e;
1023
- let r = e.split(RegExp(`${C(n)}[ ]*{`)), i = `{${r[1]}`;
1168
+ let r = e.split(RegExp(`${V(n)}[ ]*{`)), i = `{${r[1]}`;
1024
1169
  e = r[0], i = this.interpolate(i, a);
1025
1170
  let o = i.match(/'/g), s = i.match(/"/g);
1026
1171
  ((o?.length ?? 0) % 2 == 0 && !s || (s?.length ?? 0) % 2 != 0) && (i = i.replace(/'/g, "\""));
@@ -1036,17 +1181,17 @@ var R = {}, z = (e) => !u(e) && typeof e != "boolean" && typeof e != "number", B
1036
1181
  };
1037
1182
  for (; r = this.nestingRegexp.exec(e);) {
1038
1183
  let s = [];
1039
- a = { ...n }, a = a.replace && !u(a.replace) ? a.replace : a, a.applyPostProcessor = !1, delete a.defaultValue;
1184
+ a = { ...n }, a = a.replace && !M(a.replace) ? a.replace : a, a.applyPostProcessor = !1, delete a.defaultValue;
1040
1185
  let c = /{.*}/.test(r[1]) ? r[1].lastIndexOf("}") + 1 : r[1].indexOf(this.formatSeparator);
1041
- if (c !== -1 && (s = r[1].slice(c).split(this.formatSeparator).map((e) => e.trim()).filter(Boolean), r[1] = r[1].slice(0, c)), i = t(o.call(this, r[1].trim(), a), a), i && r[0] === e && !u(i)) return i;
1042
- u(i) || (i = f(i)), i ||= (this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`), ""), s.length && (i = s.reduce((e, t) => this.format(e, t, n.lng, {
1186
+ if (c !== -1 && (s = r[1].slice(c).split(this.formatSeparator).map((e) => e.trim()).filter(Boolean), r[1] = r[1].slice(0, c)), i = t(o.call(this, r[1].trim(), a), a), i && r[0] === e && !M(i)) return i;
1187
+ M(i) || (i = P(i)), i ||= (this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`), ""), s.length && (i = s.reduce((e, t) => this.format(e, t, n.lng, {
1043
1188
  ...n,
1044
1189
  interpolationkey: r[1].trim()
1045
1190
  }), i.trim())), e = e.replace(r[0], i), this.regexp.lastIndex = 0;
1046
1191
  }
1047
1192
  return e;
1048
1193
  }
1049
- }, re = (e) => {
1194
+ }, Ve = (e) => {
1050
1195
  let t = e.toLowerCase().trim(), n = {};
1051
1196
  if (e.indexOf("(") > -1) {
1052
1197
  let r = e.split("(");
@@ -1063,7 +1208,7 @@ var R = {}, z = (e) => !u(e) && typeof e != "boolean" && typeof e != "number", B
1063
1208
  formatName: t,
1064
1209
  formatOptions: n
1065
1210
  };
1066
- }, q = (e) => {
1211
+ }, He = (e) => {
1067
1212
  let t = {};
1068
1213
  return (n, r, i) => {
1069
1214
  let a = i;
@@ -1072,15 +1217,15 @@ var R = {}, z = (e) => !u(e) && typeof e != "boolean" && typeof e != "number", B
1072
1217
  [i.interpolationkey]: void 0
1073
1218
  });
1074
1219
  let o = r + JSON.stringify(a), s = t[o];
1075
- return s || (s = e(j(r), i), t[o] = s), s(n);
1220
+ return s || (s = e(U(r), i), t[o] = s), s(n);
1076
1221
  };
1077
- }, ie = (e) => (t, n, r) => e(j(n), r)(t), ae = class {
1222
+ }, Ue = (e) => (t, n, r) => e(U(n), r)(t), We = class {
1078
1223
  constructor(e = {}) {
1079
- this.logger = M.create("formatter"), this.options = e, this.init(e);
1224
+ this.logger = W.create("formatter"), this.options = e, this.init(e);
1080
1225
  }
1081
1226
  init(e, t = { interpolation: {} }) {
1082
1227
  this.formatSeparator = t.interpolation.formatSeparator || ",";
1083
- let n = t.cacheInBuiltFormats ? q : ie;
1228
+ let n = t.cacheInBuiltFormats ? He : Ue;
1084
1229
  this.formats = {
1085
1230
  number: n((e, t) => {
1086
1231
  let n = new Intl.NumberFormat(e, { ...t });
@@ -1111,7 +1256,7 @@ var R = {}, z = (e) => !u(e) && typeof e != "boolean" && typeof e != "number", B
1111
1256
  this.formats[e.toLowerCase().trim()] = t;
1112
1257
  }
1113
1258
  addCached(e, t) {
1114
- this.formats[e.toLowerCase().trim()] = q(t);
1259
+ this.formats[e.toLowerCase().trim()] = He(t);
1115
1260
  }
1116
1261
  format(e, t, n, r = {}) {
1117
1262
  let i = t.split(this.formatSeparator);
@@ -1120,7 +1265,7 @@ var R = {}, z = (e) => !u(e) && typeof e != "boolean" && typeof e != "number", B
1120
1265
  i[0] = [i[0], ...i.splice(1, e)].join(this.formatSeparator);
1121
1266
  }
1122
1267
  return i.reduce((e, t) => {
1123
- let { formatName: i, formatOptions: a } = re(t);
1268
+ let { formatName: i, formatOptions: a } = Ve(t);
1124
1269
  if (this.formats[i]) {
1125
1270
  let t = e;
1126
1271
  try {
@@ -1138,11 +1283,11 @@ var R = {}, z = (e) => !u(e) && typeof e != "boolean" && typeof e != "number", B
1138
1283
  return e;
1139
1284
  }, e);
1140
1285
  }
1141
- }, oe = (e, t) => {
1286
+ }, Ge = (e, t) => {
1142
1287
  e.pending[t] !== void 0 && (delete e.pending[t], e.pendingCount--);
1143
- }, se = class extends N {
1288
+ }, Ke = class extends G {
1144
1289
  constructor(e, t, n, r = {}) {
1145
- super(), this.backend = e, this.store = t, this.services = n, this.languageUtils = n.languageUtils, this.options = r, this.logger = M.create("backendConnector"), this.waitingReads = [], this.maxParallelReads = r.maxParallelReads || 10, this.readingCalls = 0, this.maxRetries = r.maxRetries >= 0 ? r.maxRetries : 5, this.retryTimeout = r.retryTimeout >= 1 ? r.retryTimeout : 350, this.state = {}, this.queue = [], this.backend?.init?.(n, r.backend, r);
1290
+ super(), this.backend = e, this.store = t, this.services = n, this.languageUtils = n.languageUtils, this.options = r, this.logger = W.create("backendConnector"), this.waitingReads = [], this.maxParallelReads = r.maxParallelReads || 10, this.readingCalls = 0, this.maxRetries = r.maxRetries >= 0 ? r.maxRetries : 5, this.retryTimeout = r.retryTimeout >= 1 ? r.retryTimeout : 350, this.state = {}, this.queue = [], this.backend?.init?.(n, r.backend, r);
1146
1291
  }
1147
1292
  queueLoad(e, t, n, r) {
1148
1293
  let i = {}, a = {}, o = {}, s = {};
@@ -1170,7 +1315,7 @@ var R = {}, z = (e) => !u(e) && typeof e != "boolean" && typeof e != "number", B
1170
1315
  t && this.emit("failedLoading", i, a, t), !t && n && this.store.addResourceBundle(i, a, n, void 0, void 0, { skipCopy: !0 }), this.state[e] = t ? -1 : 2, t && n && (this.state[e] = 0);
1171
1316
  let o = {};
1172
1317
  this.queue.forEach((n) => {
1173
- y(n.loaded, [i], a), oe(n, e), t && n.errors.push(t), n.pendingCount === 0 && !n.done && (Object.keys(n.loaded).forEach((e) => {
1318
+ xe(n.loaded, [i], a), Ge(n, e), t && n.errors.push(t), n.pendingCount === 0 && !n.done && (Object.keys(n.loaded).forEach((e) => {
1174
1319
  o[e] || (o[e] = {});
1175
1320
  let t = n.loaded[e];
1176
1321
  t.length && t.forEach((t) => {
@@ -1219,7 +1364,7 @@ var R = {}, z = (e) => !u(e) && typeof e != "boolean" && typeof e != "number", B
1219
1364
  }
1220
1365
  prepareLoading(e, t, n = {}, r) {
1221
1366
  if (!this.backend) return this.logger.warn("No backend was added via i18next.use. Will not load resources."), r && r();
1222
- u(e) && (e = this.languageUtils.toResolveHierarchy(e)), u(t) && (t = [t]);
1367
+ M(e) && (e = this.languageUtils.toResolveHierarchy(e)), M(t) && (t = [t]);
1223
1368
  let i = this.queueLoad(e, t, n, r);
1224
1369
  if (!i.toLoad.length) return i.pending.length || r(), null;
1225
1370
  i.toLoad.forEach((e) => {
@@ -1260,7 +1405,7 @@ var R = {}, z = (e) => !u(e) && typeof e != "boolean" && typeof e != "number", B
1260
1405
  !e || !e[0] || this.store.addResource(e[0], t, n, r);
1261
1406
  }
1262
1407
  }
1263
- }, J = () => ({
1408
+ }, X = () => ({
1264
1409
  debug: !1,
1265
1410
  initAsync: !0,
1266
1411
  ns: ["translation"],
@@ -1295,7 +1440,7 @@ var R = {}, z = (e) => !u(e) && typeof e != "boolean" && typeof e != "number", B
1295
1440
  appendNamespaceToCIMode: !1,
1296
1441
  overloadTranslationOptionHandler: (e) => {
1297
1442
  let t = {};
1298
- if (typeof e[1] == "object" && (t = e[1]), u(e[1]) && (t.defaultValue = e[1]), u(e[2]) && (t.tDescription = e[2]), typeof e[2] == "object" || typeof e[3] == "object") {
1443
+ if (typeof e[1] == "object" && (t = e[1]), M(e[1]) && (t.defaultValue = e[1]), M(e[2]) && (t.tDescription = e[2]), typeof e[2] == "object" || typeof e[3] == "object") {
1299
1444
  let n = e[3] || e[2];
1300
1445
  Object.keys(n).forEach((e) => {
1301
1446
  t[e] = n[e];
@@ -1317,15 +1462,15 @@ var R = {}, z = (e) => !u(e) && typeof e != "boolean" && typeof e != "number", B
1317
1462
  skipOnVariables: !0
1318
1463
  },
1319
1464
  cacheInBuiltFormats: !0
1320
- }), Y = (e) => (u(e.ns) && (e.ns = [e.ns]), u(e.fallbackLng) && (e.fallbackLng = [e.fallbackLng]), u(e.fallbackNS) && (e.fallbackNS = [e.fallbackNS]), e.supportedLngs?.indexOf?.("cimode") < 0 && (e.supportedLngs = e.supportedLngs.concat(["cimode"])), typeof e.initImmediate == "boolean" && (e.initAsync = e.initImmediate), e), X = () => {}, ce = (e) => {
1465
+ }), qe = (e) => (M(e.ns) && (e.ns = [e.ns]), M(e.fallbackLng) && (e.fallbackLng = [e.fallbackLng]), M(e.fallbackNS) && (e.fallbackNS = [e.fallbackNS]), e.supportedLngs?.indexOf?.("cimode") < 0 && (e.supportedLngs = e.supportedLngs.concat(["cimode"])), typeof e.initImmediate == "boolean" && (e.initAsync = e.initImmediate), e), Z = () => {}, Je = (e) => {
1321
1466
  Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach((t) => {
1322
1467
  typeof e[t] == "function" && (e[t] = e[t].bind(e));
1323
1468
  });
1324
- }, Z = "__i18next_supportNoticeShown", le = () => !!(typeof globalThis < "u" && globalThis[Z] || typeof process < "u" && process.env && process.env.I18NEXT_NO_SUPPORT_NOTICE || typeof process < "u" && process.env), ue = () => {
1325
- typeof globalThis < "u" && (globalThis[Z] = !0);
1326
- }, de = (e) => !!(e?.modules?.backend?.name?.indexOf("Locize") > 0 || e?.modules?.backend?.constructor?.name?.indexOf("Locize") > 0 || e?.options?.backend?.backends && e.options.backend.backends.some((e) => e?.name?.indexOf("Locize") > 0 || e?.constructor?.name?.indexOf("Locize") > 0) || e?.options?.backend?.projectId || e?.options?.backend?.backendOptions && e.options.backend.backendOptions.some((e) => e?.projectId)), Q = class e extends N {
1469
+ }, Ye = "__i18next_supportNoticeShown", Xe = () => !!(typeof globalThis < "u" && globalThis[Ye] || typeof process < "u" && process.env && process.env.I18NEXT_NO_SUPPORT_NOTICE || typeof process < "u" && process.env), Ze = () => {
1470
+ typeof globalThis < "u" && (globalThis[Ye] = !0);
1471
+ }, Qe = (e) => !!(e?.modules?.backend?.name?.indexOf("Locize") > 0 || e?.modules?.backend?.constructor?.name?.indexOf("Locize") > 0 || e?.options?.backend?.backends && e.options.backend.backends.some((e) => e?.name?.indexOf("Locize") > 0 || e?.constructor?.name?.indexOf("Locize") > 0) || e?.options?.backend?.projectId || e?.options?.backend?.backendOptions && e.options.backend.backendOptions.some((e) => e?.projectId)), Q = class e extends G {
1327
1472
  constructor(e = {}, t) {
1328
- if (super(), this.options = Y(e), this.services = {}, this.logger = M, this.modules = { external: [] }, ce(this), t && !this.isInitialized && !e.isClone) {
1473
+ if (super(), this.options = qe(e), this.services = {}, this.logger = W, this.modules = { external: [] }, Je(this), t && !this.isInitialized && !e.isClone) {
1329
1474
  if (!this.options.initAsync) return this.init(e, t), this;
1330
1475
  setTimeout(() => {
1331
1476
  this.init(e, t);
@@ -1333,36 +1478,36 @@ var R = {}, z = (e) => !u(e) && typeof e != "boolean" && typeof e != "number", B
1333
1478
  }
1334
1479
  }
1335
1480
  init(e = {}, t) {
1336
- this.isInitializing = !0, typeof e == "function" && (t = e, e = {}), e.defaultNS == null && e.ns && (u(e.ns) ? e.defaultNS = e.ns : e.ns.indexOf("translation") < 0 && (e.defaultNS = e.ns[0]));
1337
- let n = J();
1481
+ this.isInitializing = !0, typeof e == "function" && (t = e, e = {}), e.defaultNS == null && e.ns && (M(e.ns) ? e.defaultNS = e.ns : e.ns.indexOf("translation") < 0 && (e.defaultNS = e.ns[0]));
1482
+ let n = X();
1338
1483
  this.options = {
1339
1484
  ...n,
1340
1485
  ...this.options,
1341
- ...Y(e)
1486
+ ...qe(e)
1342
1487
  }, this.options.interpolation = {
1343
1488
  ...n.interpolation,
1344
1489
  ...this.options.interpolation
1345
- }, e.keySeparator !== void 0 && (this.options.userDefinedKeySeparator = e.keySeparator), e.nsSeparator !== void 0 && (this.options.userDefinedNsSeparator = e.nsSeparator), typeof this.options.overloadTranslationOptionHandler != "function" && (this.options.overloadTranslationOptionHandler = n.overloadTranslationOptionHandler), this.options.showSupportNotice !== !1 && !de(this) && !le() && (typeof console < "u" && console.info !== void 0 && console.info("🌐 i18next is made possible by our own product, Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙"), ue());
1490
+ }, e.keySeparator !== void 0 && (this.options.userDefinedKeySeparator = e.keySeparator), e.nsSeparator !== void 0 && (this.options.userDefinedNsSeparator = e.nsSeparator), typeof this.options.overloadTranslationOptionHandler != "function" && (this.options.overloadTranslationOptionHandler = n.overloadTranslationOptionHandler), this.options.showSupportNotice !== !1 && !Qe(this) && !Xe() && (typeof console < "u" && console.info !== void 0 && console.info("🌐 i18next is made possible by our own product, Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙"), Ze());
1346
1491
  let r = (e) => e ? typeof e == "function" ? new e() : e : null;
1347
1492
  if (!this.options.isClone) {
1348
- this.modules.logger ? M.init(r(this.modules.logger), this.options) : M.init(null, this.options);
1493
+ this.modules.logger ? W.init(r(this.modules.logger), this.options) : W.init(null, this.options);
1349
1494
  let e;
1350
- e = this.modules.formatter ? this.modules.formatter : ae;
1351
- let t = new V(this.options);
1352
- this.store = new P(this.options.resources, this.options);
1495
+ e = this.modules.formatter ? this.modules.formatter : We;
1496
+ let t = new Fe(this.options);
1497
+ this.store = new K(this.options.resources, this.options);
1353
1498
  let i = this.services;
1354
- i.logger = M, i.resourceStore = this.store, i.languageUtils = t, i.pluralResolver = new ne(t, {
1499
+ i.logger = W, i.resourceStore = this.store, i.languageUtils = t, i.pluralResolver = new Re(t, {
1355
1500
  prepend: this.options.pluralSeparator,
1356
1501
  simplifyPluralSuffix: this.options.simplifyPluralSuffix
1357
- }), this.options.interpolation.format && this.options.interpolation.format !== n.interpolation.format && this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"), e && (!this.options.interpolation.format || this.options.interpolation.format === n.interpolation.format) && (i.formatter = r(e), i.formatter.init && i.formatter.init(i, this.options), this.options.interpolation.format = i.formatter.format.bind(i.formatter)), i.interpolator = new K(this.options), i.utils = { hasLoadedNamespace: this.hasLoadedNamespace.bind(this) }, i.backendConnector = new se(r(this.modules.backend), i.resourceStore, i, this.options), i.backendConnector.on("*", (e, ...t) => {
1502
+ }), this.options.interpolation.format && this.options.interpolation.format !== n.interpolation.format && this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"), e && (!this.options.interpolation.format || this.options.interpolation.format === n.interpolation.format) && (i.formatter = r(e), i.formatter.init && i.formatter.init(i, this.options), this.options.interpolation.format = i.formatter.format.bind(i.formatter)), i.interpolator = new Be(this.options), i.utils = { hasLoadedNamespace: this.hasLoadedNamespace.bind(this) }, i.backendConnector = new Ke(r(this.modules.backend), i.resourceStore, i, this.options), i.backendConnector.on("*", (e, ...t) => {
1358
1503
  this.emit(e, ...t);
1359
- }), this.modules.languageDetector && (i.languageDetector = r(this.modules.languageDetector), i.languageDetector.init && i.languageDetector.init(i, this.options.detection, this.options)), this.modules.i18nFormat && (i.i18nFormat = r(this.modules.i18nFormat), i.i18nFormat.init && i.i18nFormat.init(this)), this.translator = new B(this.services, this.options), this.translator.on("*", (e, ...t) => {
1504
+ }), this.modules.languageDetector && (i.languageDetector = r(this.modules.languageDetector), i.languageDetector.init && i.languageDetector.init(i, this.options.detection, this.options)), this.modules.i18nFormat && (i.i18nFormat = r(this.modules.i18nFormat), i.i18nFormat.init && i.i18nFormat.init(this)), this.translator = new Pe(this.services, this.options), this.translator.on("*", (e, ...t) => {
1360
1505
  this.emit(e, ...t);
1361
1506
  }), this.modules.external.forEach((e) => {
1362
1507
  e.init && e.init(this);
1363
1508
  });
1364
1509
  }
1365
- if (this.format = this.options.interpolation.format, t ||= X, this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
1510
+ if (this.format = this.options.interpolation.format, t ||= Z, this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
1366
1511
  let e = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);
1367
1512
  e.length > 0 && e[0] !== "dev" && (this.options.lng = e[0]);
1368
1513
  }
@@ -1381,7 +1526,7 @@ var R = {}, z = (e) => !u(e) && typeof e != "boolean" && typeof e != "number", B
1381
1526
  ].forEach((e) => {
1382
1527
  this[e] = (...t) => (this.store[e](...t), this);
1383
1528
  });
1384
- let i = d(), a = () => {
1529
+ let i = N(), a = () => {
1385
1530
  let e = (e, n) => {
1386
1531
  this.isInitializing = !1, this.isInitialized && !this.initializedStoreOnce && this.logger.warn("init: i18next is already initialized. You should call init just once!"), this.isInitialized = !0, this.options.isClone || this.logger.log("initialized", this.options), this.emit("initialized", this.options), i.resolve(n), t(e, n);
1387
1532
  };
@@ -1390,8 +1535,8 @@ var R = {}, z = (e) => !u(e) && typeof e != "boolean" && typeof e != "number", B
1390
1535
  };
1391
1536
  return this.options.resources || !this.options.initAsync ? a() : setTimeout(a, 0), i;
1392
1537
  }
1393
- loadResources(e, t = X) {
1394
- let n = t, r = u(e) ? e : this.language;
1538
+ loadResources(e, t = Z) {
1539
+ let n = t, r = M(e) ? e : this.language;
1395
1540
  if (typeof e == "function" && (n = e), !this.options.resources || this.options.partialBundledLanguages) {
1396
1541
  if (r?.toLowerCase() === "cimode" && (!this.options.preload || this.options.preload.length === 0)) return n();
1397
1542
  let e = [], t = (t) => {
@@ -1405,15 +1550,15 @@ var R = {}, z = (e) => !u(e) && typeof e != "boolean" && typeof e != "number", B
1405
1550
  } else n(null);
1406
1551
  }
1407
1552
  reloadResources(e, t, n) {
1408
- let r = d();
1409
- return typeof e == "function" && (n = e, e = void 0), typeof t == "function" && (n = t, t = void 0), e ||= this.languages, t ||= this.options.ns, n ||= X, this.services.backendConnector.reload(e, t, (e) => {
1553
+ let r = N();
1554
+ return typeof e == "function" && (n = e, e = void 0), typeof t == "function" && (n = t, t = void 0), e ||= this.languages, t ||= this.options.ns, n ||= Z, this.services.backendConnector.reload(e, t, (e) => {
1410
1555
  r.resolve(), n(e);
1411
1556
  }), r;
1412
1557
  }
1413
1558
  use(e) {
1414
1559
  if (!e) throw Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");
1415
1560
  if (!e.type) throw Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");
1416
- return e.type === "backend" && (this.modules.backend = e), (e.type === "logger" || e.log && e.warn && e.error) && (this.modules.logger = e), e.type === "languageDetector" && (this.modules.languageDetector = e), e.type === "i18nFormat" && (this.modules.i18nFormat = e), e.type === "postProcessor" && F.addPostProcessor(e), e.type === "formatter" && (this.modules.formatter = e), e.type === "3rdParty" && this.modules.external.push(e), this;
1561
+ return e.type === "backend" && (this.modules.backend = e), (e.type === "logger" || e.log && e.warn && e.error) && (this.modules.logger = e), e.type === "languageDetector" && (this.modules.languageDetector = e), e.type === "i18nFormat" && (this.modules.i18nFormat = e), e.type === "postProcessor" && Ae.addPostProcessor(e), e.type === "formatter" && (this.modules.formatter = e), e.type === "3rdParty" && this.modules.external.push(e), this;
1417
1562
  }
1418
1563
  setResolvedLanguage(e) {
1419
1564
  if (!(!e || !this.languages) && !(["cimode", "dev"].indexOf(e) > -1)) {
@@ -1429,7 +1574,7 @@ var R = {}, z = (e) => !u(e) && typeof e != "boolean" && typeof e != "number", B
1429
1574
  }
1430
1575
  changeLanguage(e, t) {
1431
1576
  this.isLanguageChangingTo = e;
1432
- let n = d();
1577
+ let n = N();
1433
1578
  this.emit("languageChanging", e);
1434
1579
  let r = (e) => {
1435
1580
  this.language = e, this.languages = this.services.languageUtils.toResolveHierarchy(e), this.resolvedLanguage = void 0, this.setResolvedLanguage(e);
@@ -1437,7 +1582,7 @@ var R = {}, z = (e) => !u(e) && typeof e != "boolean" && typeof e != "number", B
1437
1582
  a ? this.isLanguageChangingTo === e && (r(a), this.translator.changeLanguage(a), this.isLanguageChangingTo = void 0, this.emit("languageChanged", a), this.logger.log("languageChanged", a)) : this.isLanguageChangingTo = void 0, n.resolve((...e) => this.t(...e)), t && t(i, (...e) => this.t(...e));
1438
1583
  }, a = (t) => {
1439
1584
  !e && !t && this.services.languageDetector && (t = []);
1440
- let n = u(t) ? t : t && t[0], a = this.store.hasLanguageSomeTranslations(n) ? n : this.services.languageUtils.getBestMatchFromCodes(u(t) ? [t] : t);
1585
+ let n = M(t) ? t : t && t[0], a = this.store.hasLanguageSomeTranslations(n) ? n : this.services.languageUtils.getBestMatchFromCodes(M(t) ? [t] : t);
1441
1586
  a && (this.language || r(a), this.translator.language || this.translator.changeLanguage(a), this.services.languageDetector?.cacheUserLanguage?.(a)), this.loadResources(a, (e) => {
1442
1587
  i(e, a);
1443
1588
  });
@@ -1452,11 +1597,11 @@ var R = {}, z = (e) => !u(e) && typeof e != "boolean" && typeof e != "number", B
1452
1597
  ...this.options,
1453
1598
  ...a
1454
1599
  };
1455
- typeof a.keyPrefix == "function" && (a.keyPrefix = L(a.keyPrefix, o));
1600
+ typeof a.keyPrefix == "function" && (a.keyPrefix = q(a.keyPrefix, o));
1456
1601
  let s = this.options.keySeparator || ".", c;
1457
- return a.keyPrefix && Array.isArray(e) ? c = e.map((e) => (typeof e == "function" && (e = L(e, o)), `${a.keyPrefix}${s}${e}`)) : (typeof e == "function" && (e = L(e, o)), c = a.keyPrefix ? `${a.keyPrefix}${s}${e}` : e), this.t(c, a);
1602
+ return a.keyPrefix && Array.isArray(e) ? c = e.map((e) => (typeof e == "function" && (e = q(e, o)), `${a.keyPrefix}${s}${e}`)) : (typeof e == "function" && (e = q(e, o)), c = a.keyPrefix ? `${a.keyPrefix}${s}${e}` : e), this.t(c, a);
1458
1603
  };
1459
- return u(e) ? r.lng = e : r.lngs = e, r.ns = t, r.keyPrefix = n, r;
1604
+ return M(e) ? r.lng = e : r.lngs = e, r.ns = t, r.keyPrefix = n, r;
1460
1605
  }
1461
1606
  t(...e) {
1462
1607
  return this.translator?.translate(...e);
@@ -1483,16 +1628,16 @@ var R = {}, z = (e) => !u(e) && typeof e != "boolean" && typeof e != "number", B
1483
1628
  return !!(this.hasResourceBundle(n, e) || !this.services.backendConnector.backend || this.options.resources && !this.options.partialBundledLanguages || a(n, e) && (!r || a(i, e)));
1484
1629
  }
1485
1630
  loadNamespaces(e, t) {
1486
- let n = d();
1487
- return this.options.ns ? (u(e) && (e = [e]), e.forEach((e) => {
1631
+ let n = N();
1632
+ return this.options.ns ? (M(e) && (e = [e]), e.forEach((e) => {
1488
1633
  this.options.ns.indexOf(e) < 0 && this.options.ns.push(e);
1489
1634
  }), this.loadResources((e) => {
1490
1635
  n.resolve(), t && t(e);
1491
1636
  }), n) : (t && t(), Promise.resolve());
1492
1637
  }
1493
1638
  loadLanguages(e, t) {
1494
- let n = d();
1495
- u(e) && (e = [e]);
1639
+ let n = N();
1640
+ M(e) && (e = [e]);
1496
1641
  let r = this.options.preload || [], i = e.filter((e) => r.indexOf(e) < 0 && this.services.languageUtils.isSupportedCode(e));
1497
1642
  return i.length ? (this.options.preload = r.concat(i), this.loadResources((e) => {
1498
1643
  n.resolve(), t && t(e);
@@ -1507,14 +1652,14 @@ var R = {}, z = (e) => !u(e) && typeof e != "boolean" && typeof e != "number", B
1507
1652
  if (e && e.direction) return e.direction;
1508
1653
  }
1509
1654
  } catch {}
1510
- let t = /* @__PURE__ */ "ar.shu.sqr.ssh.xaa.yhd.yud.aao.abh.abv.acm.acq.acw.acx.acy.adf.ads.aeb.aec.afb.ajp.apc.apd.arb.arq.ars.ary.arz.auz.avl.ayh.ayl.ayn.ayp.bbz.pga.he.iw.ps.pbt.pbu.pst.prp.prd.ug.ur.ydd.yds.yih.ji.yi.hbo.men.xmn.fa.jpr.peo.pes.prs.dv.sam.ckb".split("."), n = this.services?.languageUtils || new V(J());
1655
+ let t = /* @__PURE__ */ "ar.shu.sqr.ssh.xaa.yhd.yud.aao.abh.abv.acm.acq.acw.acx.acy.adf.ads.aeb.aec.afb.ajp.apc.apd.arb.arq.ars.ary.arz.auz.avl.ayh.ayl.ayn.ayp.bbz.pga.he.iw.ps.pbt.pbu.pst.prp.prd.ug.ur.ydd.yds.yih.ji.yi.hbo.men.xmn.fa.jpr.peo.pes.prs.dv.sam.ckb".split("."), n = this.services?.languageUtils || new Fe(X());
1511
1656
  return e.toLowerCase().indexOf("-latn") > 1 ? "ltr" : t.indexOf(n.getLanguagePartFromCode(e)) > -1 || e.toLowerCase().indexOf("-arab") > 1 ? "rtl" : "ltr";
1512
1657
  }
1513
1658
  static createInstance(t = {}, n) {
1514
1659
  let r = new e(t, n);
1515
1660
  return r.createInstance = e.createInstance, r;
1516
1661
  }
1517
- cloneInstance(t = {}, n = X) {
1662
+ cloneInstance(t = {}, n = Z) {
1518
1663
  let r = t.forkResourceStore;
1519
1664
  r && delete t.forkResourceStore;
1520
1665
  let i = {
@@ -1528,18 +1673,18 @@ var R = {}, z = (e) => !u(e) && typeof e != "boolean" && typeof e != "number", B
1528
1673
  "language"
1529
1674
  ].forEach((e) => {
1530
1675
  a[e] = this[e];
1531
- }), a.services = { ...this.services }, a.services.utils = { hasLoadedNamespace: a.hasLoadedNamespace.bind(a) }, r && (a.store = new P(Object.keys(this.store.data).reduce((e, t) => (e[t] = { ...this.store.data[t] }, e[t] = Object.keys(e[t]).reduce((n, r) => (n[r] = { ...e[t][r] }, n), e[t]), e), {}), i), a.services.resourceStore = a.store), t.interpolation) {
1676
+ }), a.services = { ...this.services }, a.services.utils = { hasLoadedNamespace: a.hasLoadedNamespace.bind(a) }, r && (a.store = new K(Object.keys(this.store.data).reduce((e, t) => (e[t] = { ...this.store.data[t] }, e[t] = Object.keys(e[t]).reduce((n, r) => (n[r] = { ...e[t][r] }, n), e[t]), e), {}), i), a.services.resourceStore = a.store), t.interpolation) {
1532
1677
  let e = {
1533
- ...J().interpolation,
1678
+ ...X().interpolation,
1534
1679
  ...this.options.interpolation,
1535
1680
  ...t.interpolation
1536
1681
  }, n = {
1537
1682
  ...i,
1538
1683
  interpolation: e
1539
1684
  };
1540
- a.services.interpolator = new K(n);
1685
+ a.services.interpolator = new Be(n);
1541
1686
  }
1542
- return a.translator = new B(a.services, i), a.translator.on("*", (e, ...t) => {
1687
+ return a.translator = new Pe(a.services, i), a.translator.on("*", (e, ...t) => {
1543
1688
  a.emit(e, ...t);
1544
1689
  }), a.init(i, n), a.translator.options = i, a.translator.backendConnector.services.utils = { hasLoadedNamespace: a.hasLoadedNamespace.bind(a) }, a;
1545
1690
  }
@@ -1560,8 +1705,8 @@ Q.createInstance, Q.dir, Q.init, Q.loadResources, Q.reloadResources, Q.use, Q.ch
1560
1705
  lng: "en",
1561
1706
  showSupportNotice: !1,
1562
1707
  resources: {
1563
- en: c,
1564
- es: l
1708
+ en: _e,
1709
+ es: ve
1565
1710
  }
1566
1711
  });
1567
1712
  //#endregion
@@ -1598,13 +1743,13 @@ var { translator: $ } = {
1598
1743
  label: "Spanish"
1599
1744
  }]
1600
1745
  };
1601
- function fe(e, t) {
1746
+ function $e(e, t) {
1602
1747
  return $.t(`translation:simpleCloze:${e}`, { lng: t });
1603
1748
  }
1604
- function pe(e, t) {
1749
+ function et(e, t) {
1605
1750
  return $.t(`common:${e}`, { lng: t });
1606
1751
  }
1607
1752
  //#endregion
1608
- export { pe as n, s as r, fe as t };
1753
+ export { et as n, j as r, $e as t };
1609
1754
 
1610
- //# sourceMappingURL=i18n-BaF24Jzw.js.map
1755
+ //# sourceMappingURL=i18n-BTsdzpBv.js.map