@1024pix/epreuves-components 4.0.1 → 4.1.0

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 (54) hide show
  1. package/dist/{Button.ce-CTKrSDrC.js → Button.ce-DZ8jDtW5.js} +2 -2
  2. package/dist/{ButtonTooltip.ce-CtHo2Dwx.js → ButtonTooltip.ce-BnJlaEqx.js} +8 -8
  3. package/dist/{Cross.ce.vue_vue_type_script_setup_true_lang-CVBFTfq5.js → Cross.ce.vue_vue_type_script_setup_true_lang-l4hAa4eW.js} +16 -14
  4. package/dist/FocusManager.ce-DHXwg6WZ.js +131 -0
  5. package/dist/{LLMMessage.ce-Bdmf0R1g.js → LLMMessage.ce-jLEqjxsl.js} +11 -11
  6. package/dist/{Loading.ce-Bh7-h48F.js → Loading.ce-DDtlSLlu.js} +2 -2
  7. package/dist/{NavigationButton.ce-CA1M8sgV.js → NavigationButton.ce-BnnVUwGr.js} +2 -2
  8. package/dist/PixMailMessage.ce-oCccQFGV.js +261 -0
  9. package/dist/Popin.ce-Co12R3C8.js +75 -0
  10. package/dist/{Retry-BZf7NJz9.js → Retry-C7C78Wpj.js} +2 -2
  11. package/dist/{Stepper.ce-B1yDelzC.js → Stepper.ce-Dttf3Dsf.js} +4 -4
  12. package/dist/{_plugin-vue_export-helper-D0N_62VD.js → _plugin-vue_export-helper-B-lVMTio.js} +1777 -1713
  13. package/dist/components/analyse-mails-phishing.ce.js.js +14 -14
  14. package/dist/components/calcul-impact.ce.js.js +20 -20
  15. package/dist/components/capacity-calculation.ce.js.js +22 -22
  16. package/dist/components/clickable-image.ce.js.js +30 -30
  17. package/dist/components/complete-phrase.ce.js.js +18 -18
  18. package/dist/components/flip-cards.ce.js.js +10 -10
  19. package/dist/components/image-quiz.ce.js.js +3 -3
  20. package/dist/components/image-quizzes.ce.js.js +3 -3
  21. package/dist/components/llm-compare-messages.ce.js.js +7 -7
  22. package/dist/components/llm-messages.ce.js.js +7 -7
  23. package/dist/components/llm-prompt-select.ce.js.js +5 -5
  24. package/dist/components/mdp-classement.ce.js.js +29 -29
  25. package/dist/components/message-conversation.ce.js.js +34 -34
  26. package/dist/components/mobile-shell.ce.js.js +8 -8
  27. package/dist/components/phishing-message.ce.js.js +128 -128
  28. package/dist/components/phishing-notification.ce.js.js +30 -30
  29. package/dist/components/pix-anonymisation.ce.js.js +27 -27
  30. package/dist/components/pix-article.ce.js.js +5 -5
  31. package/dist/components/pix-carousel.ce.js.js +38 -38
  32. package/dist/components/pix-combinaisons.ce.js.js +93 -92
  33. package/dist/components/pix-cursor.ce.js.js +26 -26
  34. package/dist/components/pix-mail-message.ce.js.js +3 -3
  35. package/dist/components/proteger-mail-spam.ce.js.js +66 -64
  36. package/dist/components/qcm-deepfake.ce.js.js +16 -16
  37. package/dist/components/quiz-stepper.ce.js.js +21 -21
  38. package/dist/components/select-conversation.ce.js.js +11 -11
  39. package/dist/components/template-mail.ce.js.js +4 -4
  40. package/dist/components/test-top-mdp.ce.js.js +86 -79
  41. package/dist/components/trouver-mdp-rs.ce.js.js +334 -418
  42. package/dist/{i18n-ekiZvzf6.js → i18n-CsT7k7zW.js} +329 -316
  43. package/dist/{i18n-lite-t2jNOu0C.js → i18n-lite-BIJ2LVs6.js} +19 -12
  44. package/dist/{image-quiz.ce-DqalWHKw.js → image-quiz.ce-BK6-8YF1.js} +9 -9
  45. package/dist/{index-BpqxFmwz.js → index-BaI3Qosp.js} +1 -1
  46. package/dist/index.js +1 -1
  47. package/dist/props.examples.js +13 -13
  48. package/dist/schema.js +77 -67
  49. package/dist/shadow-dom-Bouq869n.js +14 -0
  50. package/dist/{temporal.utils-7Uvm62ss.js → temporal.utils-DgmGPVba.js} +537 -536
  51. package/package.json +1 -1
  52. package/dist/PixMailMessage.ce-XPDbJiyC.js +0 -219
  53. package/dist/Popin.ce-DUQ7-GMT.js +0 -197
  54. package/dist/shadow-dom-C3AZuSZe.js +0 -9
@@ -1,60 +1,60 @@
1
- import { v as ve, x as Re, b as Ce, i as Pe } from "./_plugin-vue_export-helper-D0N_62VD.js";
2
- const d = (o) => typeof o == "string", V = () => {
3
- let o, e;
1
+ import { n as Re, b as Ce, A as Pe, i as $e } from "./_plugin-vue_export-helper-B-lVMTio.js";
2
+ const d = (a) => typeof a == "string", K = () => {
3
+ let a, e;
4
4
  const t = new Promise((i, s) => {
5
- o = i, e = s;
5
+ a = i, e = s;
6
6
  });
7
- return t.resolve = o, t.reject = e, t;
8
- }, ie = (o) => o == null ? "" : "" + o, $e = (o, e, t) => {
9
- o.forEach((i) => {
7
+ return t.resolve = a, t.reject = e, t;
8
+ }, ie = (a) => a == null ? "" : "" + a, Ne = (a, e, t) => {
9
+ a.forEach((i) => {
10
10
  e[i] && (t[i] = e[i]);
11
11
  });
12
- }, Ne = /###/g, ne = (o) => o && o.indexOf("###") > -1 ? o.replace(Ne, ".") : o, re = (o) => !o || d(o), A = (o, e, t) => {
12
+ }, ke = /###/g, ne = (a) => a && a.indexOf("###") > -1 ? a.replace(ke, ".") : a, re = (a) => !a || d(a), V = (a, e, t) => {
13
13
  const i = d(e) ? e.split(".") : e;
14
14
  let s = 0;
15
15
  for (; s < i.length - 1; ) {
16
- if (re(o)) return {};
16
+ if (re(a)) return {};
17
17
  const n = ne(i[s]);
18
- !o[n] && t && (o[n] = new t()), Object.prototype.hasOwnProperty.call(o, n) ? o = o[n] : o = {}, ++s;
18
+ !a[n] && t && (a[n] = new t()), Object.prototype.hasOwnProperty.call(a, n) ? a = a[n] : a = {}, ++s;
19
19
  }
20
- return re(o) ? {} : {
21
- obj: o,
20
+ return re(a) ? {} : {
21
+ obj: a,
22
22
  k: ne(i[s])
23
23
  };
24
- }, ae = (o, e, t) => {
24
+ }, ae = (a, e, t) => {
25
25
  const {
26
26
  obj: i,
27
27
  k: s
28
- } = A(o, e, Object);
28
+ } = V(a, e, Object);
29
29
  if (i !== void 0 || e.length === 1) {
30
30
  i[s] = t;
31
31
  return;
32
32
  }
33
- let n = e[e.length - 1], r = e.slice(0, e.length - 1), a = A(o, r, Object);
34
- for (; a.obj === void 0 && r.length; )
35
- n = `${r[r.length - 1]}.${n}`, r = r.slice(0, r.length - 1), a = A(o, r, Object), a?.obj && typeof a.obj[`${a.k}.${n}`] < "u" && (a.obj = void 0);
36
- a.obj[`${a.k}.${n}`] = t;
37
- }, ke = (o, e, t, i) => {
33
+ let n = e[e.length - 1], r = e.slice(0, e.length - 1), o = V(a, r, Object);
34
+ for (; o.obj === void 0 && r.length; )
35
+ n = `${r[r.length - 1]}.${n}`, r = r.slice(0, r.length - 1), o = V(a, r, Object), o?.obj && typeof o.obj[`${o.k}.${n}`] < "u" && (o.obj = void 0);
36
+ o.obj[`${o.k}.${n}`] = t;
37
+ }, Ee = (a, e, t, i) => {
38
38
  const {
39
39
  obj: s,
40
40
  k: n
41
- } = A(o, e, Object);
41
+ } = V(a, e, Object);
42
42
  s[n] = s[n] || [], s[n].push(t);
43
- }, B = (o, e) => {
43
+ }, J = (a, e) => {
44
44
  const {
45
45
  obj: t,
46
46
  k: i
47
- } = A(o, e);
47
+ } = V(a, e);
48
48
  if (t && Object.prototype.hasOwnProperty.call(t, i))
49
49
  return t[i];
50
- }, Ee = (o, e, t) => {
51
- const i = B(o, t);
52
- return i !== void 0 ? i : B(e, t);
53
- }, xe = (o, e, t) => {
50
+ }, je = (a, e, t) => {
51
+ const i = J(a, t);
52
+ return i !== void 0 ? i : J(e, t);
53
+ }, xe = (a, e, t) => {
54
54
  for (const i in e)
55
- i !== "__proto__" && i !== "constructor" && (i in o ? d(o[i]) || o[i] instanceof String || d(e[i]) || e[i] instanceof String ? t && (o[i] = e[i]) : xe(o[i], e[i], t) : o[i] = e[i]);
56
- return o;
57
- }, T = (o) => o.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
55
+ i !== "__proto__" && i !== "constructor" && (i in a ? d(a[i]) || a[i] instanceof String || d(e[i]) || e[i] instanceof String ? t && (a[i] = e[i]) : xe(a[i], e[i], t) : a[i] = e[i]);
56
+ return a;
57
+ }, F = (a) => a.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
58
58
  var Fe = {
59
59
  "&": "&amp;",
60
60
  "<": "&lt;",
@@ -63,8 +63,8 @@ var Fe = {
63
63
  "'": "&#39;",
64
64
  "/": "&#x2F;"
65
65
  };
66
- const je = (o) => d(o) ? o.replace(/[&<>"'\/]/g, (e) => Fe[e]) : o;
67
- class Ie {
66
+ const Ie = (a) => d(a) ? a.replace(/[&<>"'\/]/g, (e) => Fe[e]) : a;
67
+ class Te {
68
68
  constructor(e) {
69
69
  this.capacity = e, this.regExpMap = /* @__PURE__ */ new Map(), this.regExpQueue = [];
70
70
  }
@@ -76,29 +76,29 @@ class Ie {
76
76
  return this.regExpQueue.length === this.capacity && this.regExpMap.delete(this.regExpQueue.shift()), this.regExpMap.set(e, i), this.regExpQueue.push(e), i;
77
77
  }
78
78
  }
79
- const Te = [" ", ",", "?", "!", ";"], De = new Ie(20), Ke = (o, e, t) => {
79
+ const Ae = [" ", ",", "?", "!", ";"], De = new Te(20), Ke = (a, e, t) => {
80
80
  e = e || "", t = t || "";
81
- const i = Te.filter((r) => e.indexOf(r) < 0 && t.indexOf(r) < 0);
81
+ const i = Ae.filter((r) => e.indexOf(r) < 0 && t.indexOf(r) < 0);
82
82
  if (i.length === 0) return !0;
83
83
  const s = De.getRegExp(`(${i.map((r) => r === "?" ? "\\?" : r).join("|")})`);
84
- let n = !s.test(o);
84
+ let n = !s.test(a);
85
85
  if (!n) {
86
- const r = o.indexOf(t);
87
- r > 0 && !s.test(o.substring(0, r)) && (n = !0);
86
+ const r = a.indexOf(t);
87
+ r > 0 && !s.test(a.substring(0, r)) && (n = !0);
88
88
  }
89
89
  return n;
90
- }, Z = (o, e, t = ".") => {
91
- if (!o) return;
92
- if (o[e])
93
- return Object.prototype.hasOwnProperty.call(o, e) ? o[e] : void 0;
90
+ }, X = (a, e, t = ".") => {
91
+ if (!a) return;
92
+ if (a[e])
93
+ return Object.prototype.hasOwnProperty.call(a, e) ? a[e] : void 0;
94
94
  const i = e.split(t);
95
- let s = o;
95
+ let s = a;
96
96
  for (let n = 0; n < i.length; ) {
97
97
  if (!s || typeof s != "object")
98
98
  return;
99
- let r, a = "";
99
+ let r, o = "";
100
100
  for (let l = n; l < i.length; ++l)
101
- if (l !== n && (a += t), a += i[l], r = s[a], r !== void 0) {
101
+ if (l !== n && (o += t), o += i[l], r = s[o], r !== void 0) {
102
102
  if (["string", "number", "boolean"].indexOf(typeof r) > -1 && l < i.length - 1)
103
103
  continue;
104
104
  n += l - n + 1;
@@ -107,22 +107,22 @@ const Te = [" ", ",", "?", "!", ";"], De = new Ie(20), Ke = (o, e, t) => {
107
107
  s = r;
108
108
  }
109
109
  return s;
110
- }, M = (o) => o?.replace("_", "-"), Ve = {
110
+ }, z = (a) => a?.replace(/_/g, "-"), Ve = {
111
111
  type: "logger",
112
- log(o) {
113
- this.output("log", o);
112
+ log(a) {
113
+ this.output("log", a);
114
114
  },
115
- warn(o) {
116
- this.output("warn", o);
115
+ warn(a) {
116
+ this.output("warn", a);
117
117
  },
118
- error(o) {
119
- this.output("error", o);
118
+ error(a) {
119
+ this.output("error", a);
120
120
  },
121
- output(o, e) {
122
- console?.[o]?.apply?.(console, e);
121
+ output(a, e) {
122
+ console?.[a]?.apply?.(console, e);
123
123
  }
124
124
  };
125
- class J {
125
+ class _ {
126
126
  constructor(e, t = {}) {
127
127
  this.init(e, t);
128
128
  }
@@ -145,16 +145,16 @@ class J {
145
145
  return s && !this.debug ? null : (d(e[0]) && (e[0] = `${i}${this.prefix} ${e[0]}`), this.logger[t](e));
146
146
  }
147
147
  create(e) {
148
- return new J(this.logger, {
148
+ return new _(this.logger, {
149
149
  prefix: `${this.prefix}:${e}:`,
150
150
  ...this.options
151
151
  });
152
152
  }
153
153
  clone(e) {
154
- return e = e || this.options, e.prefix = e.prefix || this.prefix, new J(this.logger, e);
154
+ return e = e || this.options, e.prefix = e.prefix || this.prefix, new _(this.logger, e);
155
155
  }
156
156
  }
157
- var P = new J();
157
+ var P = new _();
158
158
  class W {
159
159
  constructor() {
160
160
  this.observers = {};
@@ -201,17 +201,17 @@ class oe extends W {
201
201
  }
202
202
  getResource(e, t, i, s = {}) {
203
203
  const n = s.keySeparator !== void 0 ? s.keySeparator : this.options.keySeparator, r = s.ignoreJSONStructure !== void 0 ? s.ignoreJSONStructure : this.options.ignoreJSONStructure;
204
- let a;
205
- e.indexOf(".") > -1 ? a = e.split(".") : (a = [e, t], i && (Array.isArray(i) ? a.push(...i) : d(i) && n ? a.push(...i.split(n)) : a.push(i)));
206
- const l = B(this.data, a);
207
- return !l && !t && !i && e.indexOf(".") > -1 && (e = a[0], t = a[1], i = a.slice(2).join(".")), l || !r || !d(i) ? l : Z(this.data?.[e]?.[t], i, n);
204
+ let o;
205
+ e.indexOf(".") > -1 ? o = e.split(".") : (o = [e, t], i && (Array.isArray(i) ? o.push(...i) : d(i) && n ? o.push(...i.split(n)) : o.push(i)));
206
+ const l = J(this.data, o);
207
+ return !l && !t && !i && e.indexOf(".") > -1 && (e = o[0], t = o[1], i = o.slice(2).join(".")), l || !r || !d(i) ? l : X(this.data?.[e]?.[t], i, n);
208
208
  }
209
209
  addResource(e, t, i, s, n = {
210
210
  silent: !1
211
211
  }) {
212
212
  const r = n.keySeparator !== void 0 ? n.keySeparator : this.options.keySeparator;
213
- let a = [e, t];
214
- i && (a = a.concat(r ? i.split(r) : i)), e.indexOf(".") > -1 && (a = e.split("."), s = t, t = a[1]), this.addNamespaces(t), ae(this.data, a, s), n.silent || this.emit("added", e, t, i, s);
213
+ let o = [e, t];
214
+ i && (o = o.concat(r ? i.split(r) : i)), e.indexOf(".") > -1 && (o = e.split("."), s = t, t = o[1]), this.addNamespaces(t), ae(this.data, o, s), n.silent || this.emit("added", e, t, i, s);
215
215
  }
216
216
  addResources(e, t, i, s = {
217
217
  silent: !1
@@ -226,13 +226,13 @@ class oe extends W {
226
226
  silent: !1,
227
227
  skipCopy: !1
228
228
  }) {
229
- let a = [e, t];
230
- e.indexOf(".") > -1 && (a = e.split("."), s = i, i = t, t = a[1]), this.addNamespaces(t);
231
- let l = B(this.data, a) || {};
229
+ let o = [e, t];
230
+ e.indexOf(".") > -1 && (o = e.split("."), s = i, i = t, t = o[1]), this.addNamespaces(t);
231
+ let l = J(this.data, o) || {};
232
232
  r.skipCopy || (i = JSON.parse(JSON.stringify(i))), s ? xe(l, i, n) : l = {
233
233
  ...l,
234
234
  ...i
235
- }, ae(this.data, a, l), r.silent || this.emit("added", e, t, i);
235
+ }, ae(this.data, o, l), r.silent || this.emit("added", e, t, i);
236
236
  }
237
237
  removeResourceBundle(e, t) {
238
238
  this.hasResourceBundle(e, t) && delete this.data[e][t], this.removeNamespaces(t), this.emit("removed", e, t);
@@ -256,31 +256,36 @@ class oe extends W {
256
256
  }
257
257
  var ye = {
258
258
  processors: {},
259
- addPostProcessor(o) {
260
- this.processors[o.name] = o;
259
+ addPostProcessor(a) {
260
+ this.processors[a.name] = a;
261
261
  },
262
- handle(o, e, t, i, s) {
263
- return o.forEach((n) => {
262
+ handle(a, e, t, i, s) {
263
+ return a.forEach((n) => {
264
264
  e = this.processors[n]?.process(e, t, i, s) ?? e;
265
265
  }), e;
266
266
  }
267
267
  };
268
268
  const Se = /* @__PURE__ */ Symbol("i18next/PATH_KEY");
269
- function Ae() {
270
- const o = [], e = /* @__PURE__ */ Object.create(null);
269
+ function Ue() {
270
+ const a = [], e = /* @__PURE__ */ Object.create(null);
271
271
  let t;
272
- return e.get = (i, s) => (t?.revoke?.(), s === Se ? o : (o.push(s), t = Proxy.revocable(i, e), t.proxy)), Proxy.revocable(/* @__PURE__ */ Object.create(null), e).proxy;
272
+ return e.get = (i, s) => (t?.revoke?.(), s === Se ? a : (a.push(s), t = Proxy.revocable(i, e), t.proxy)), Proxy.revocable(/* @__PURE__ */ Object.create(null), e).proxy;
273
273
  }
274
- function X(o, e) {
274
+ function U(a, e) {
275
275
  const {
276
276
  [Se]: t
277
- } = o(Ae());
278
- return t.join(e?.keySeparator ?? ".");
277
+ } = a(Ue()), i = e?.keySeparator ?? ".", s = e?.nsSeparator ?? ":";
278
+ if (t.length > 1 && s) {
279
+ const n = e?.ns;
280
+ if ((n ? Array.isArray(n) ? n : [n] : []).includes(t[0]))
281
+ return `${t[0]}${s}${t.slice(1).join(i)}`;
282
+ }
283
+ return t.join(i);
279
284
  }
280
- const le = {}, Y = (o) => !d(o) && typeof o != "boolean" && typeof o != "number";
281
- class _ extends W {
285
+ const le = {}, Q = (a) => !d(a) && typeof a != "boolean" && typeof a != "number";
286
+ class Y extends W {
282
287
  constructor(e, t = {}) {
283
- super(), $e(["resourceStore", "languageUtils", "pluralResolver", "interpolator", "backendConnector", "i18nFormat", "utils"], e, this), this.options = t, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.logger = P.create("translator");
288
+ super(), Ne(["resourceStore", "languageUtils", "pluralResolver", "interpolator", "backendConnector", "i18nFormat", "utils"], e, this), this.options = t, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.logger = P.create("translator");
284
289
  }
285
290
  changeLanguage(e) {
286
291
  e && (this.language = e);
@@ -294,7 +299,7 @@ class _ extends W {
294
299
  if (e == null) return !1;
295
300
  const s = this.resolve(e, i);
296
301
  if (s?.res === void 0) return !1;
297
- const n = Y(s.res);
302
+ const n = Q(s.res);
298
303
  return !(i.returnObjects === !1 && n);
299
304
  }
300
305
  extractFromKey(e, t) {
@@ -302,8 +307,8 @@ class _ extends W {
302
307
  i === void 0 && (i = ":");
303
308
  const s = t.keySeparator !== void 0 ? t.keySeparator : this.options.keySeparator;
304
309
  let n = t.ns || this.options.defaultNS || [];
305
- const r = i && e.indexOf(i) > -1, a = !this.options.userDefinedKeySeparator && !t.keySeparator && !this.options.userDefinedNsSeparator && !t.nsSeparator && !Ke(e, i, s);
306
- if (r && !a) {
310
+ const r = i && e.indexOf(i) > -1, o = !this.options.userDefinedKeySeparator && !t.keySeparator && !this.options.userDefinedNsSeparator && !t.nsSeparator && !Ke(e, i, s);
311
+ if (r && !o) {
307
312
  const l = e.match(this.interpolator.nestingRegexp);
308
313
  if (l && l.length > 0)
309
314
  return {
@@ -325,12 +330,15 @@ class _ extends W {
325
330
  if (typeof s != "object" && this.options.overloadTranslationOptionHandler && (s = this.options.overloadTranslationOptionHandler(arguments)), typeof s == "object" && (s = {
326
331
  ...s
327
332
  }), s || (s = {}), e == null) return "";
328
- typeof e == "function" && (e = X(e, {
333
+ typeof e == "function" && (e = U(e, {
334
+ ...this.options,
335
+ ...s
336
+ })), Array.isArray(e) || (e = [String(e)]), e = e.map((b) => typeof b == "function" ? U(b, {
329
337
  ...this.options,
330
338
  ...s
331
- })), Array.isArray(e) || (e = [String(e)]);
339
+ }) : String(b));
332
340
  const n = s.returnDetails !== void 0 ? s.returnDetails : this.options.returnDetails, r = s.keySeparator !== void 0 ? s.keySeparator : this.options.keySeparator, {
333
- key: a,
341
+ key: o,
334
342
  namespaces: l
335
343
  } = this.extractFromKey(e[e.length - 1], s), u = l[l.length - 1];
336
344
  let c = s.nsSeparator !== void 0 ? s.nsSeparator : this.options.nsSeparator;
@@ -338,87 +346,87 @@ class _ extends W {
338
346
  const f = s.lng || this.language, g = s.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;
339
347
  if (f?.toLowerCase() === "cimode")
340
348
  return g ? n ? {
341
- res: `${u}${c}${a}`,
342
- usedKey: a,
343
- exactUsedKey: a,
349
+ res: `${u}${c}${o}`,
350
+ usedKey: o,
351
+ exactUsedKey: o,
344
352
  usedLng: f,
345
353
  usedNS: u,
346
354
  usedParams: this.getUsedParamsDetails(s)
347
- } : `${u}${c}${a}` : n ? {
348
- res: a,
349
- usedKey: a,
350
- exactUsedKey: a,
355
+ } : `${u}${c}${o}` : n ? {
356
+ res: o,
357
+ usedKey: o,
358
+ exactUsedKey: o,
351
359
  usedLng: f,
352
360
  usedNS: u,
353
361
  usedParams: this.getUsedParamsDetails(s)
354
- } : a;
362
+ } : o;
355
363
  const p = this.resolve(e, s);
356
364
  let h = p?.res;
357
- const x = p?.usedKey || a, S = p?.exactUsedKey || a, L = ["[object Number]", "[object Function]", "[object RegExp]"], y = s.joinArrays !== void 0 ? s.joinArrays : this.options.joinArrays, E = !this.i18nFormat || this.i18nFormat.handleAsObject, O = s.count !== void 0 && !d(s.count), N = _.hasDefaultValue(s), j = O ? this.pluralResolver.getSuffix(f, s.count, s) : "", I = s.ordinal && O ? this.pluralResolver.getSuffix(f, s.count, {
365
+ const x = p?.usedKey || o, S = p?.exactUsedKey || o, w = ["[object Number]", "[object Function]", "[object RegExp]"], y = s.joinArrays !== void 0 ? s.joinArrays : this.options.joinArrays, E = !this.i18nFormat || this.i18nFormat.handleAsObject, L = s.count !== void 0 && !d(s.count), N = Y.hasDefaultValue(s), I = L ? this.pluralResolver.getSuffix(f, s.count, s) : "", T = s.ordinal && L ? this.pluralResolver.getSuffix(f, s.count, {
358
366
  ordinal: !1
359
- }) : "", q = O && !s.ordinal && s.count === 0, k = q && s[`defaultValue${this.options.pluralSeparator}zero`] || s[`defaultValue${j}`] || s[`defaultValue${I}`] || s.defaultValue;
360
- let v = h;
361
- E && !h && N && (v = k);
362
- const Le = Y(v), we = Object.prototype.toString.apply(v);
363
- if (E && v && Le && L.indexOf(we) < 0 && !(d(y) && Array.isArray(v))) {
367
+ }) : "", q = L && !s.ordinal && s.count === 0, k = q && s[`defaultValue${this.options.pluralSeparator}zero`] || s[`defaultValue${I}`] || s[`defaultValue${T}`] || s.defaultValue;
368
+ let R = h;
369
+ E && !h && N && (R = k);
370
+ const we = Q(R), ve = Object.prototype.toString.apply(R);
371
+ if (E && R && we && w.indexOf(ve) < 0 && !(d(y) && Array.isArray(R))) {
364
372
  if (!s.returnObjects && !this.options.returnObjects) {
365
373
  this.options.returnedObjectHandler || this.logger.warn("accessing an object - but returnObjects options is not enabled!");
366
- const R = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(x, v, {
374
+ const b = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(x, R, {
367
375
  ...s,
368
376
  ns: l
369
- }) : `key '${a} (${this.language})' returned an object instead of string.`;
370
- return n ? (p.res = R, p.usedParams = this.getUsedParamsDetails(s), p) : R;
377
+ }) : `key '${o} (${this.language})' returned an object instead of string.`;
378
+ return n ? (p.res = b, p.usedParams = this.getUsedParamsDetails(s), p) : b;
371
379
  }
372
380
  if (r) {
373
- const R = Array.isArray(v), w = R ? [] : {}, ee = R ? S : x;
374
- for (const C in v)
375
- if (Object.prototype.hasOwnProperty.call(v, C)) {
381
+ const b = Array.isArray(R), v = b ? [] : {}, ee = b ? S : x;
382
+ for (const C in R)
383
+ if (Object.prototype.hasOwnProperty.call(R, C)) {
376
384
  const $ = `${ee}${r}${C}`;
377
- N && !h ? w[C] = this.translate($, {
385
+ N && !h ? v[C] = this.translate($, {
378
386
  ...s,
379
- defaultValue: Y(k) ? k[C] : void 0,
387
+ defaultValue: Q(k) ? k[C] : void 0,
380
388
  joinArrays: !1,
381
389
  ns: l
382
- }) : w[C] = this.translate($, {
390
+ }) : v[C] = this.translate($, {
383
391
  ...s,
384
392
  joinArrays: !1,
385
393
  ns: l
386
- }), w[C] === $ && (w[C] = v[C]);
394
+ }), v[C] === $ && (v[C] = R[C]);
387
395
  }
388
- h = w;
396
+ h = v;
389
397
  }
390
398
  } else if (E && d(y) && Array.isArray(h))
391
399
  h = h.join(y), h && (h = this.extendTranslation(h, e, s, i));
392
400
  else {
393
- let R = !1, w = !1;
394
- !this.isValidLookup(h) && N && (R = !0, h = k), this.isValidLookup(h) || (w = !0, h = a);
395
- const C = (s.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) && w ? void 0 : h, $ = N && k !== h && this.options.updateMissing;
396
- if (w || R || $) {
397
- if (this.logger.log($ ? "updateKey" : "missingKey", f, u, a, $ ? k : h), r) {
398
- const b = this.resolve(a, {
401
+ let b = !1, v = !1;
402
+ !this.isValidLookup(h) && N && (b = !0, h = k), this.isValidLookup(h) || (v = !0, h = o);
403
+ const C = (s.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) && v ? void 0 : h, $ = N && k !== h && this.options.updateMissing;
404
+ if (v || b || $) {
405
+ if (this.logger.log($ ? "updateKey" : "missingKey", f, u, o, $ ? k : h), r) {
406
+ const O = this.resolve(o, {
399
407
  ...s,
400
408
  keySeparator: !1
401
409
  });
402
- b && b.res && this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.");
410
+ O && O.res && this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.");
403
411
  }
404
- let D = [];
412
+ let A = [];
405
413
  const H = this.languageUtils.getFallbackCodes(this.options.fallbackLng, s.lng || this.language);
406
414
  if (this.options.saveMissingTo === "fallback" && H && H[0])
407
- for (let b = 0; b < H.length; b++)
408
- D.push(H[b]);
409
- else this.options.saveMissingTo === "all" ? D = this.languageUtils.toResolveHierarchy(s.lng || this.language) : D.push(s.lng || this.language);
410
- const te = (b, F, K) => {
411
- const se = N && K !== h ? K : C;
412
- this.options.missingKeyHandler ? this.options.missingKeyHandler(b, u, F, se, $, s) : this.backendConnector?.saveMissing && this.backendConnector.saveMissing(b, u, F, se, $, s), this.emit("missingKey", b, u, F, h);
415
+ for (let O = 0; O < H.length; O++)
416
+ A.push(H[O]);
417
+ else this.options.saveMissingTo === "all" ? A = this.languageUtils.toResolveHierarchy(s.lng || this.language) : A.push(s.lng || this.language);
418
+ const te = (O, j, D) => {
419
+ const se = N && D !== h ? D : C;
420
+ this.options.missingKeyHandler ? this.options.missingKeyHandler(O, u, j, se, $, s) : this.backendConnector?.saveMissing && this.backendConnector.saveMissing(O, u, j, se, $, s), this.emit("missingKey", O, u, j, h);
413
421
  };
414
- this.options.saveMissing && (this.options.saveMissingPlurals && O ? D.forEach((b) => {
415
- const F = this.pluralResolver.getSuffixes(b, s);
416
- q && s[`defaultValue${this.options.pluralSeparator}zero`] && F.indexOf(`${this.options.pluralSeparator}zero`) < 0 && F.push(`${this.options.pluralSeparator}zero`), F.forEach((K) => {
417
- te([b], a + K, s[`defaultValue${K}`] || k);
422
+ this.options.saveMissing && (this.options.saveMissingPlurals && L ? A.forEach((O) => {
423
+ const j = this.pluralResolver.getSuffixes(O, s);
424
+ q && s[`defaultValue${this.options.pluralSeparator}zero`] && j.indexOf(`${this.options.pluralSeparator}zero`) < 0 && j.push(`${this.options.pluralSeparator}zero`), j.forEach((D) => {
425
+ te([O], o + D, s[`defaultValue${D}`] || k);
418
426
  });
419
- }) : te(D, a, k));
427
+ }) : te(A, o, k));
420
428
  }
421
- h = this.extendTranslation(h, e, s, p, i), w && h === a && this.options.appendNamespaceToMissingKey && (h = `${u}${c}${a}`), (w || R) && this.options.parseMissingKeyHandler && (h = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${u}${c}${a}` : a, R ? h : void 0, s));
429
+ h = this.extendTranslation(h, e, s, p, i), v && h === o && this.options.appendNamespaceToMissingKey && (h = `${u}${c}${o}`), (v || b) && this.options.parseMissingKeyHandler && (h = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${u}${c}${o}` : o, b ? h : void 0, s));
422
430
  }
423
431
  return n ? (p.res = h, p.usedParams = this.getUsedParamsDetails(s), p) : h;
424
432
  }
@@ -454,8 +462,8 @@ class _ extends W {
454
462
  }
455
463
  !i.lng && s && s.res && (i.lng = this.language || s.usedLng), i.nest !== !1 && (e = this.interpolator.nest(e, (...f) => n?.[0] === f[0] && !i.context ? (this.logger.warn(`It seems you are nesting recursively key: ${f[0]} in key: ${t[0]}`), null) : this.translate(...f, t), i)), i.interpolation && this.interpolator.reset();
456
464
  }
457
- const r = i.postProcess || this.options.postProcess, a = d(r) ? [r] : r;
458
- return e != null && a?.length && i.applyPostProcessor !== !1 && (e = ye.handle(a, e, t, this.options && this.options.postProcessPassResolved ? {
465
+ const r = i.postProcess || this.options.postProcess, o = d(r) ? [r] : r;
466
+ return e != null && o?.length && i.applyPostProcessor !== !1 && (e = ye.handle(o, e, t, this.options && this.options.postProcessPassResolved ? {
459
467
  i18nResolved: {
460
468
  ...s,
461
469
  usedParams: this.getUsedParamsDetails(i)
@@ -464,8 +472,11 @@ class _ extends W {
464
472
  } : i, this)), e;
465
473
  }
466
474
  resolve(e, t = {}) {
467
- let i, s, n, r, a;
468
- return d(e) && (e = [e]), e.forEach((l) => {
475
+ let i, s, n, r, o;
476
+ return d(e) && (e = [e]), Array.isArray(e) && (e = e.map((l) => typeof l == "function" ? U(l, {
477
+ ...this.options,
478
+ ...t
479
+ }) : l)), e.forEach((l) => {
469
480
  if (this.isValidLookup(i)) return;
470
481
  const u = this.extractFromKey(l, t), c = u.key;
471
482
  s = c;
@@ -473,24 +484,24 @@ class _ extends W {
473
484
  this.options.fallbackNS && (f = f.concat(this.options.fallbackNS));
474
485
  const g = t.count !== void 0 && !d(t.count), p = g && !t.ordinal && t.count === 0, h = t.context !== void 0 && (d(t.context) || typeof t.context == "number") && t.context !== "", x = t.lngs ? t.lngs : this.languageUtils.toResolveHierarchy(t.lng || this.language, t.fallbackLng);
475
486
  f.forEach((S) => {
476
- this.isValidLookup(i) || (a = S, !le[`${x[0]}-${S}`] && this.utils?.hasLoadedNamespace && !this.utils?.hasLoadedNamespace(a) && (le[`${x[0]}-${S}`] = !0, this.logger.warn(`key "${s}" for languages "${x.join(", ")}" won't get resolved as namespace "${a}" 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!!!")), x.forEach((L) => {
487
+ this.isValidLookup(i) || (o = S, !le[`${x[0]}-${S}`] && this.utils?.hasLoadedNamespace && !this.utils?.hasLoadedNamespace(o) && (le[`${x[0]}-${S}`] = !0, this.logger.warn(`key "${s}" for languages "${x.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!!!")), x.forEach((w) => {
477
488
  if (this.isValidLookup(i)) return;
478
- r = L;
489
+ r = w;
479
490
  const y = [c];
480
491
  if (this.i18nFormat?.addLookupKeys)
481
- this.i18nFormat.addLookupKeys(y, c, L, S, t);
492
+ this.i18nFormat.addLookupKeys(y, c, w, S, t);
482
493
  else {
483
- let O;
484
- g && (O = this.pluralResolver.getSuffix(L, t.count, t));
485
- const N = `${this.options.pluralSeparator}zero`, j = `${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;
486
- if (g && (t.ordinal && O.indexOf(j) === 0 && y.push(c + O.replace(j, this.options.pluralSeparator)), y.push(c + O), p && y.push(c + N)), h) {
487
- const I = `${c}${this.options.contextSeparator || "_"}${t.context}`;
488
- y.push(I), g && (t.ordinal && O.indexOf(j) === 0 && y.push(I + O.replace(j, this.options.pluralSeparator)), y.push(I + O), p && y.push(I + N));
494
+ let L;
495
+ g && (L = this.pluralResolver.getSuffix(w, t.count, t));
496
+ const N = `${this.options.pluralSeparator}zero`, I = `${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;
497
+ if (g && (t.ordinal && L.indexOf(I) === 0 && y.push(c + L.replace(I, this.options.pluralSeparator)), y.push(c + L), p && y.push(c + N)), h) {
498
+ const T = `${c}${this.options.contextSeparator || "_"}${t.context}`;
499
+ y.push(T), g && (t.ordinal && L.indexOf(I) === 0 && y.push(T + L.replace(I, this.options.pluralSeparator)), y.push(T + L), p && y.push(T + N));
489
500
  }
490
501
  }
491
502
  let E;
492
503
  for (; E = y.pop(); )
493
- this.isValidLookup(i) || (n = E, i = this.getResource(L, S, E, t));
504
+ this.isValidLookup(i) || (n = E, i = this.getResource(w, S, E, t));
494
505
  }));
495
506
  });
496
507
  }), {
@@ -498,7 +509,7 @@ class _ extends W {
498
509
  usedKey: s,
499
510
  exactUsedKey: n,
500
511
  usedLng: r,
501
- usedNS: a
512
+ usedNS: o
502
513
  };
503
514
  }
504
515
  isValidLookup(e) {
@@ -535,12 +546,12 @@ class ue {
535
546
  this.options = e, this.supportedLngs = this.options.supportedLngs || !1, this.logger = P.create("languageUtils");
536
547
  }
537
548
  getScriptPartFromCode(e) {
538
- if (e = M(e), !e || e.indexOf("-") < 0) return null;
549
+ if (e = z(e), !e || e.indexOf("-") < 0) return null;
539
550
  const t = e.split("-");
540
551
  return t.length === 2 || (t.pop(), t[t.length - 1].toLowerCase() === "x") ? null : this.formatLanguageCode(t.join("-"));
541
552
  }
542
553
  getLanguagePartFromCode(e) {
543
- if (e = M(e), !e || e.indexOf("-") < 0) return e;
554
+ if (e = z(e), !e || e.indexOf("-") < 0) return e;
544
555
  const t = e.split("-");
545
556
  return this.formatLanguageCode(t[0]);
546
557
  }
@@ -602,12 +613,12 @@ const fe = {
602
613
  many: 4,
603
614
  other: 5
604
615
  }, ce = {
605
- select: (o) => o === 1 ? "one" : "other",
616
+ select: (a) => a === 1 ? "one" : "other",
606
617
  resolvedOptions: () => ({
607
618
  pluralCategories: ["one", "other"]
608
619
  })
609
620
  };
610
- class Ue {
621
+ class Me {
611
622
  constructor(e, t = {}) {
612
623
  this.languageUtils = e, this.options = t, this.logger = P.create("pluralResolver"), this.pluralRulesCache = {};
613
624
  }
@@ -615,7 +626,7 @@ class Ue {
615
626
  this.pluralRulesCache = {};
616
627
  }
617
628
  getRule(e, t = {}) {
618
- const i = M(e === "dev" ? "en" : e), s = t.ordinal ? "ordinal" : "cardinal", n = JSON.stringify({
629
+ const i = z(e === "dev" ? "en" : e), s = t.ordinal ? "ordinal" : "cardinal", n = JSON.stringify({
619
630
  cleanedCode: i,
620
631
  type: s
621
632
  });
@@ -627,7 +638,7 @@ class Ue {
627
638
  type: s
628
639
  });
629
640
  } catch {
630
- if (!Intl)
641
+ if (typeof Intl > "u")
631
642
  return this.logger.error("No Intl support, please use an Intl polyfill!"), ce;
632
643
  if (!e.match(/-|_/)) return ce;
633
644
  const l = this.languageUtils.getLanguagePartFromCode(e);
@@ -651,10 +662,10 @@ class Ue {
651
662
  return s ? `${this.options.prepend}${i.ordinal ? `ordinal${this.options.prepend}` : ""}${s.select(t)}` : (this.logger.warn(`no plural rule found for: ${e}`), this.getSuffix("dev", t, i));
652
663
  }
653
664
  }
654
- const he = (o, e, t, i = ".", s = !0) => {
655
- let n = Ee(o, e, t);
656
- return !n && s && d(t) && (n = Z(o, t, i), n === void 0 && (n = Z(e, t, i))), n;
657
- }, Q = (o) => o.replace(/\$/g, "$$$$");
665
+ const he = (a, e, t, i = ".", s = !0) => {
666
+ let n = je(a, e, t);
667
+ return !n && s && d(t) && (n = X(a, t, i), n === void 0 && (n = X(e, t, i))), n;
668
+ }, G = (a) => a.replace(/\$/g, "$$$$");
658
669
  class de {
659
670
  constructor(e = {}) {
660
671
  this.logger = P.create("interpolator"), this.options = e, this.format = e?.interpolation?.format || ((t) => t), this.init(e);
@@ -669,7 +680,7 @@ class de {
669
680
  useRawValueToEscape: s,
670
681
  prefix: n,
671
682
  prefixEscaped: r,
672
- suffix: a,
683
+ suffix: o,
673
684
  suffixEscaped: l,
674
685
  formatSeparator: u,
675
686
  unescapeSuffix: c,
@@ -679,10 +690,10 @@ class de {
679
690
  nestingSuffix: h,
680
691
  nestingSuffixEscaped: x,
681
692
  nestingOptionsSeparator: S,
682
- maxReplaces: L,
693
+ maxReplaces: w,
683
694
  alwaysFormat: y
684
695
  } = e.interpolation;
685
- this.escape = t !== void 0 ? t : je, this.escapeValue = i !== void 0 ? i : !0, this.useRawValueToEscape = s !== void 0 ? s : !1, this.prefix = n ? T(n) : r || "{{", this.suffix = a ? T(a) : l || "}}", this.formatSeparator = u || ",", this.unescapePrefix = c ? "" : f || "-", this.unescapeSuffix = this.unescapePrefix ? "" : c || "", this.nestingPrefix = g ? T(g) : p || T("$t("), this.nestingSuffix = h ? T(h) : x || T(")"), this.nestingOptionsSeparator = S || ",", this.maxReplaces = L || 1e3, this.alwaysFormat = y !== void 0 ? y : !1, this.resetRegExp();
696
+ this.escape = t !== void 0 ? t : Ie, this.escapeValue = i !== void 0 ? i : !0, this.useRawValueToEscape = s !== void 0 ? s : !1, this.prefix = n ? F(n) : r || "{{", this.suffix = o ? F(o) : l || "}}", this.formatSeparator = u || ",", this.unescapePrefix = c ? "" : f || "-", this.unescapeSuffix = this.unescapePrefix ? "" : c || "", this.nestingPrefix = g ? F(g) : p || F("$t("), this.nestingSuffix = h ? F(h) : x || F(")"), this.nestingOptionsSeparator = S || ",", this.maxReplaces = w || 1e3, this.alwaysFormat = y !== void 0 ? y : !1, this.resetRegExp();
686
697
  }
687
698
  reset() {
688
699
  this.options && this.init(this.options);
@@ -692,15 +703,15 @@ class de {
692
703
  this.regexp = e(this.regexp, `${this.prefix}(.+?)${this.suffix}`), this.regexpUnescape = e(this.regexpUnescape, `${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`), this.nestingRegexp = e(this.nestingRegexp, `${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`);
693
704
  }
694
705
  interpolate(e, t, i, s) {
695
- let n, r, a;
706
+ let n, r, o;
696
707
  const l = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {}, u = (p) => {
697
708
  if (p.indexOf(this.formatSeparator) < 0) {
698
- const L = he(t, l, p, this.options.keySeparator, this.options.ignoreJSONStructure);
699
- return this.alwaysFormat ? this.format(L, void 0, i, {
709
+ const w = he(t, l, p, this.options.keySeparator, this.options.ignoreJSONStructure);
710
+ return this.alwaysFormat ? this.format(w, void 0, i, {
700
711
  ...s,
701
712
  ...t,
702
713
  interpolationkey: p
703
- }) : L;
714
+ }) : w;
704
715
  }
705
716
  const h = p.split(this.formatSeparator), x = h.shift().trim(), S = h.join(this.formatSeparator).trim();
706
717
  return this.format(he(t, l, x, this.options.keySeparator, this.options.ignoreJSONStructure), S, i, {
@@ -713,12 +724,12 @@ class de {
713
724
  const c = s?.missingInterpolationHandler || this.options.missingInterpolationHandler, f = s?.interpolation?.skipOnVariables !== void 0 ? s.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables;
714
725
  return [{
715
726
  regex: this.regexpUnescape,
716
- safeValue: (p) => Q(p)
727
+ safeValue: (p) => G(p)
717
728
  }, {
718
729
  regex: this.regexp,
719
- safeValue: (p) => this.escapeValue ? Q(this.escape(p)) : Q(p)
730
+ safeValue: (p) => this.escapeValue ? G(this.escape(p)) : G(p)
720
731
  }].forEach((p) => {
721
- for (a = 0; n = p.regex.exec(e); ) {
732
+ for (o = 0; n = p.regex.exec(e); ) {
722
733
  const h = n[1].trim();
723
734
  if (r = u(h), r === void 0)
724
735
  if (typeof c == "function") {
@@ -733,21 +744,21 @@ class de {
733
744
  this.logger.warn(`missed to pass in variable ${h} for interpolating ${e}`), r = "";
734
745
  else !d(r) && !this.useRawValueToEscape && (r = ie(r));
735
746
  const x = p.safeValue(r);
736
- if (e = e.replace(n[0], x), f ? (p.regex.lastIndex += r.length, p.regex.lastIndex -= n[0].length) : p.regex.lastIndex = 0, a++, a >= this.maxReplaces)
747
+ if (e = e.replace(n[0], x), f ? (p.regex.lastIndex += r.length, p.regex.lastIndex -= n[0].length) : p.regex.lastIndex = 0, o++, o >= this.maxReplaces)
737
748
  break;
738
749
  }
739
750
  }), e;
740
751
  }
741
752
  nest(e, t, i = {}) {
742
753
  let s, n, r;
743
- const a = (l, u) => {
754
+ const o = (l, u) => {
744
755
  const c = this.nestingOptionsSeparator;
745
756
  if (l.indexOf(c) < 0) return l;
746
- const f = l.split(new RegExp(`${c}[ ]*{`));
757
+ const f = l.split(new RegExp(`${F(c)}[ ]*{`));
747
758
  let g = `{${f[1]}`;
748
759
  l = f[0], g = this.interpolate(g, r);
749
760
  const p = g.match(/'/g), h = g.match(/"/g);
750
- ((p?.length ?? 0) % 2 === 0 && !h || h.length % 2 !== 0) && (g = g.replace(/'/g, '"'));
761
+ ((p?.length ?? 0) % 2 === 0 && !h || (h?.length ?? 0) % 2 !== 0) && (g = g.replace(/'/g, '"'));
751
762
  try {
752
763
  r = JSON.parse(g), u && (r = {
753
764
  ...u,
@@ -764,7 +775,7 @@ class de {
764
775
  ...i
765
776
  }, r = r.replace && !d(r.replace) ? r.replace : r, r.applyPostProcessor = !1, delete r.defaultValue;
766
777
  const u = /{.*}/.test(s[1]) ? s[1].lastIndexOf("}") + 1 : s[1].indexOf(this.formatSeparator);
767
- if (u !== -1 && (l = s[1].slice(u).split(this.formatSeparator).map((c) => c.trim()).filter(Boolean), s[1] = s[1].slice(0, u)), n = t(a.call(this, s[1].trim(), r), r), n && s[0] === e && !d(n)) return n;
778
+ if (u !== -1 && (l = s[1].slice(u).split(this.formatSeparator).map((c) => c.trim()).filter(Boolean), s[1] = s[1].slice(0, u)), n = t(o.call(this, s[1].trim(), r), r), n && s[0] === e && !d(n)) return n;
768
779
  d(n) || (n = ie(n)), n || (this.logger.warn(`missed to resolve ${s[1]} for nesting ${e}`), n = ""), l.length && (n = l.reduce((c, f) => this.format(c, f, i.lng, {
769
780
  ...i,
770
781
  interpolationkey: s[1].trim()
@@ -773,16 +784,16 @@ class de {
773
784
  return e;
774
785
  }
775
786
  }
776
- const Me = (o) => {
777
- let e = o.toLowerCase().trim();
787
+ const ze = (a) => {
788
+ let e = a.toLowerCase().trim();
778
789
  const t = {};
779
- if (o.indexOf("(") > -1) {
780
- const i = o.split("(");
790
+ if (a.indexOf("(") > -1) {
791
+ const i = a.split("(");
781
792
  e = i[0].toLowerCase().trim();
782
793
  const s = i[1].substring(0, i[1].length - 1);
783
794
  e === "currency" && s.indexOf(":") < 0 ? t.currency || (t.currency = s.trim()) : e === "relativetime" && s.indexOf(":") < 0 ? t.range || (t.range = s.trim()) : s.split(";").forEach((r) => {
784
795
  if (r) {
785
- const [a, ...l] = r.split(":"), u = l.join(":").trim().replace(/^'+|'+$/g, ""), c = a.trim();
796
+ const [o, ...l] = r.split(":"), u = l.join(":").trim().replace(/^'+|'+$/g, ""), c = o.trim();
786
797
  t[c] || (t[c] = u), u === "false" && (t[c] = !1), u === "true" && (t[c] = !0), isNaN(u) || (t[c] = parseInt(u, 10));
787
798
  }
788
799
  });
@@ -791,7 +802,7 @@ const Me = (o) => {
791
802
  formatName: e,
792
803
  formatOptions: t
793
804
  };
794
- }, pe = (o) => {
805
+ }, pe = (a) => {
795
806
  const e = {};
796
807
  return (t, i, s) => {
797
808
  let n = s;
@@ -800,11 +811,11 @@ const Me = (o) => {
800
811
  [s.interpolationkey]: void 0
801
812
  });
802
813
  const r = i + JSON.stringify(n);
803
- let a = e[r];
804
- return a || (a = o(M(i), s), e[r] = a), a(t);
814
+ let o = e[r];
815
+ return o || (o = a(z(i), s), e[r] = o), o(t);
805
816
  };
806
- }, He = (o) => (e, t, i) => o(M(t), i)(e);
807
- class ze {
817
+ }, He = (a) => (e, t, i) => a(z(t), i)(e);
818
+ class Be {
808
819
  constructor(e = {}) {
809
820
  this.logger = P.create("formatter"), this.options = e, this.init(e);
810
821
  }
@@ -818,32 +829,32 @@ class ze {
818
829
  const r = new Intl.NumberFormat(s, {
819
830
  ...n
820
831
  });
821
- return (a) => r.format(a);
832
+ return (o) => r.format(o);
822
833
  }),
823
834
  currency: i((s, n) => {
824
835
  const r = new Intl.NumberFormat(s, {
825
836
  ...n,
826
837
  style: "currency"
827
838
  });
828
- return (a) => r.format(a);
839
+ return (o) => r.format(o);
829
840
  }),
830
841
  datetime: i((s, n) => {
831
842
  const r = new Intl.DateTimeFormat(s, {
832
843
  ...n
833
844
  });
834
- return (a) => r.format(a);
845
+ return (o) => r.format(o);
835
846
  }),
836
847
  relativetime: i((s, n) => {
837
848
  const r = new Intl.RelativeTimeFormat(s, {
838
849
  ...n
839
850
  });
840
- return (a) => r.format(a, n.range || "day");
851
+ return (o) => r.format(o, n.range || "day");
841
852
  }),
842
853
  list: i((s, n) => {
843
854
  const r = new Intl.ListFormat(s, {
844
855
  ...n
845
856
  });
846
- return (a) => r.format(a);
857
+ return (o) => r.format(o);
847
858
  })
848
859
  };
849
860
  }
@@ -855,20 +866,20 @@ class ze {
855
866
  }
856
867
  format(e, t, i, s = {}) {
857
868
  const n = t.split(this.formatSeparator);
858
- if (n.length > 1 && n[0].indexOf("(") > 1 && n[0].indexOf(")") < 0 && n.find((a) => a.indexOf(")") > -1)) {
859
- const a = n.findIndex((l) => l.indexOf(")") > -1);
860
- n[0] = [n[0], ...n.splice(1, a)].join(this.formatSeparator);
869
+ if (n.length > 1 && n[0].indexOf("(") > 1 && n[0].indexOf(")") < 0 && n.find((o) => o.indexOf(")") > -1)) {
870
+ const o = n.findIndex((l) => l.indexOf(")") > -1);
871
+ n[0] = [n[0], ...n.splice(1, o)].join(this.formatSeparator);
861
872
  }
862
- return n.reduce((a, l) => {
873
+ return n.reduce((o, l) => {
863
874
  const {
864
875
  formatName: u,
865
876
  formatOptions: c
866
- } = Me(l);
877
+ } = ze(l);
867
878
  if (this.formats[u]) {
868
- let f = a;
879
+ let f = o;
869
880
  try {
870
881
  const g = s?.formatParams?.[s.interpolationkey] || {}, p = g.locale || g.lng || s.locale || s.lng || i;
871
- f = this.formats[u](a, p, {
882
+ f = this.formats[u](o, p, {
872
883
  ...c,
873
884
  ...s,
874
885
  ...g
@@ -879,25 +890,25 @@ class ze {
879
890
  return f;
880
891
  } else
881
892
  this.logger.warn(`there was no format function for ${u}`);
882
- return a;
893
+ return o;
883
894
  }, e);
884
895
  }
885
896
  }
886
- const Be = (o, e) => {
887
- o.pending[e] !== void 0 && (delete o.pending[e], o.pendingCount--);
897
+ const Je = (a, e) => {
898
+ a.pending[e] !== void 0 && (delete a.pending[e], a.pendingCount--);
888
899
  };
889
- class Je extends W {
900
+ class _e extends W {
890
901
  constructor(e, t, i, s = {}) {
891
902
  super(), this.backend = e, this.store = t, this.services = i, this.languageUtils = i.languageUtils, this.options = s, this.logger = P.create("backendConnector"), this.waitingReads = [], this.maxParallelReads = s.maxParallelReads || 10, this.readingCalls = 0, this.maxRetries = s.maxRetries >= 0 ? s.maxRetries : 5, this.retryTimeout = s.retryTimeout >= 1 ? s.retryTimeout : 350, this.state = {}, this.queue = [], this.backend?.init?.(i, s.backend, s);
892
903
  }
893
904
  queueLoad(e, t, i, s) {
894
- const n = {}, r = {}, a = {}, l = {};
905
+ const n = {}, r = {}, o = {}, l = {};
895
906
  return e.forEach((u) => {
896
907
  let c = !0;
897
908
  t.forEach((f) => {
898
909
  const g = `${u}|${f}`;
899
910
  !i.reload && this.store.hasResourceBundle(u, f) ? this.state[g] = 2 : this.state[g] < 0 || (this.state[g] === 1 ? r[g] === void 0 && (r[g] = !0) : (this.state[g] = 1, c = !1, r[g] === void 0 && (r[g] = !0), n[g] === void 0 && (n[g] = !0), l[f] === void 0 && (l[f] = !0)));
900
- }), c || (a[u] = !0);
911
+ }), c || (o[u] = !0);
901
912
  }), (Object.keys(n).length || Object.keys(r).length) && this.queue.push({
902
913
  pending: r,
903
914
  pendingCount: Object.keys(r).length,
@@ -907,7 +918,7 @@ class Je extends W {
907
918
  }), {
908
919
  toLoad: Object.keys(n),
909
920
  pending: Object.keys(r),
910
- toLoadLanguages: Object.keys(a),
921
+ toLoadLanguages: Object.keys(o),
911
922
  toLoadNamespaces: Object.keys(l)
912
923
  };
913
924
  }
@@ -916,16 +927,16 @@ class Je extends W {
916
927
  t && this.emit("failedLoading", n, r, t), !t && i && this.store.addResourceBundle(n, r, i, void 0, void 0, {
917
928
  skipCopy: !0
918
929
  }), this.state[e] = t ? -1 : 2, t && i && (this.state[e] = 0);
919
- const a = {};
930
+ const o = {};
920
931
  this.queue.forEach((l) => {
921
- ke(l.loaded, [n], r), Be(l, e), t && l.errors.push(t), l.pendingCount === 0 && !l.done && (Object.keys(l.loaded).forEach((u) => {
922
- a[u] || (a[u] = {});
932
+ Ee(l.loaded, [n], r), Je(l, e), t && l.errors.push(t), l.pendingCount === 0 && !l.done && (Object.keys(l.loaded).forEach((u) => {
933
+ o[u] || (o[u] = {});
923
934
  const c = l.loaded[u];
924
935
  c.length && c.forEach((f) => {
925
- a[u][f] === void 0 && (a[u][f] = !0);
936
+ o[u][f] === void 0 && (o[u][f] = !0);
926
937
  });
927
938
  }), l.done = !0, l.errors.length ? l.callback(l.errors) : l.callback());
928
- }), this.emit("loaded", a), this.queue = this.queue.filter((l) => !l.done);
939
+ }), this.emit("loaded", o), this.queue = this.queue.filter((l) => !l.done);
929
940
  }
930
941
  read(e, t, i, s = 0, n = this.retryTimeout, r) {
931
942
  if (!e.length) return r(null, {});
@@ -941,7 +952,7 @@ class Je extends W {
941
952
  return;
942
953
  }
943
954
  this.readingCalls++;
944
- const a = (u, c) => {
955
+ const o = (u, c) => {
945
956
  if (this.readingCalls--, this.waitingReads.length > 0) {
946
957
  const f = this.waitingReads.shift();
947
958
  this.read(f.lng, f.ns, f.fcName, f.tried, f.wait, f.callback);
@@ -957,13 +968,13 @@ class Je extends W {
957
968
  if (l.length === 2) {
958
969
  try {
959
970
  const u = l(e, t);
960
- u && typeof u.then == "function" ? u.then((c) => a(null, c)).catch(a) : a(null, u);
971
+ u && typeof u.then == "function" ? u.then((c) => o(null, c)).catch(o) : o(null, u);
961
972
  } catch (u) {
962
- a(u);
973
+ o(u);
963
974
  }
964
975
  return;
965
976
  }
966
- return l(e, t, a);
977
+ return l(e, t, o);
967
978
  }
968
979
  prepareLoading(e, t, i = {}, s) {
969
980
  if (!this.backend)
@@ -986,11 +997,11 @@ class Je extends W {
986
997
  }
987
998
  loadOne(e, t = "") {
988
999
  const i = e.split("|"), s = i[0], n = i[1];
989
- this.read(s, n, "read", void 0, void 0, (r, a) => {
990
- r && this.logger.warn(`${t}loading namespace ${n} for language ${s} failed`, r), !r && a && this.logger.log(`${t}loaded namespace ${n} for language ${s}`, a), this.loaded(e, r, a);
1000
+ this.read(s, n, "read", void 0, void 0, (r, o) => {
1001
+ r && this.logger.warn(`${t}loading namespace ${n} for language ${s} failed`, r), !r && o && this.logger.log(`${t}loaded namespace ${n} for language ${s}`, o), this.loaded(e, r, o);
991
1002
  });
992
1003
  }
993
- saveMissing(e, t, i, s, n, r = {}, a = () => {
1004
+ saveMissing(e, t, i, s, n, r = {}, o = () => {
994
1005
  }) {
995
1006
  if (this.services?.utils?.hasLoadedNamespace && !this.services?.utils?.hasLoadedNamespace(t)) {
996
1007
  this.logger.warn(`did not save key "${i}" as the namespace "${t}" 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!!!");
@@ -1005,18 +1016,18 @@ class Je extends W {
1005
1016
  if (u.length < 6)
1006
1017
  try {
1007
1018
  let c;
1008
- u.length === 5 ? c = u(e, t, i, s, l) : c = u(e, t, i, s), c && typeof c.then == "function" ? c.then((f) => a(null, f)).catch(a) : a(null, c);
1019
+ u.length === 5 ? c = u(e, t, i, s, l) : c = u(e, t, i, s), c && typeof c.then == "function" ? c.then((f) => o(null, f)).catch(o) : o(null, c);
1009
1020
  } catch (c) {
1010
- a(c);
1021
+ o(c);
1011
1022
  }
1012
1023
  else
1013
- u(e, t, i, s, a, l);
1024
+ u(e, t, i, s, o, l);
1014
1025
  }
1015
1026
  !e || !e[0] || this.store.addResource(e[0], t, i, s);
1016
1027
  }
1017
1028
  }
1018
1029
  }
1019
- const G = () => ({
1030
+ const Z = () => ({
1020
1031
  debug: !1,
1021
1032
  initAsync: !0,
1022
1033
  ns: ["translation"],
@@ -1049,10 +1060,10 @@ const G = () => ({
1049
1060
  parseMissingKeyHandler: !1,
1050
1061
  appendNamespaceToMissingKey: !1,
1051
1062
  appendNamespaceToCIMode: !1,
1052
- overloadTranslationOptionHandler: (o) => {
1063
+ overloadTranslationOptionHandler: (a) => {
1053
1064
  let e = {};
1054
- if (typeof o[1] == "object" && (e = o[1]), d(o[1]) && (e.defaultValue = o[1]), d(o[2]) && (e.tDescription = o[2]), typeof o[2] == "object" || typeof o[3] == "object") {
1055
- const t = o[3] || o[2];
1065
+ if (typeof a[1] == "object" && (e = a[1]), d(a[1]) && (e.defaultValue = a[1]), d(a[2]) && (e.tDescription = a[2]), typeof a[2] == "object" || typeof a[3] == "object") {
1066
+ const t = a[3] || a[2];
1056
1067
  Object.keys(t).forEach((i) => {
1057
1068
  e[i] = t[i];
1058
1069
  });
@@ -1061,7 +1072,7 @@ const G = () => ({
1061
1072
  },
1062
1073
  interpolation: {
1063
1074
  escapeValue: !0,
1064
- format: (o) => o,
1075
+ format: (a) => a,
1065
1076
  prefix: "{{",
1066
1077
  suffix: "}}",
1067
1078
  formatSeparator: ",",
@@ -1073,17 +1084,19 @@ const G = () => ({
1073
1084
  skipOnVariables: !0
1074
1085
  },
1075
1086
  cacheInBuiltFormats: !0
1076
- }), ge = (o) => (d(o.ns) && (o.ns = [o.ns]), d(o.fallbackLng) && (o.fallbackLng = [o.fallbackLng]), d(o.fallbackNS) && (o.fallbackNS = [o.fallbackNS]), o.supportedLngs?.indexOf?.("cimode") < 0 && (o.supportedLngs = o.supportedLngs.concat(["cimode"])), typeof o.initImmediate == "boolean" && (o.initAsync = o.initImmediate), o), z = () => {
1077
- }, _e = (o) => {
1078
- Object.getOwnPropertyNames(Object.getPrototypeOf(o)).forEach((t) => {
1079
- typeof o[t] == "function" && (o[t] = o[t].bind(o));
1087
+ }), ge = (a) => (d(a.ns) && (a.ns = [a.ns]), d(a.fallbackLng) && (a.fallbackLng = [a.fallbackLng]), d(a.fallbackNS) && (a.fallbackNS = [a.fallbackNS]), a.supportedLngs?.indexOf?.("cimode") < 0 && (a.supportedLngs = a.supportedLngs.concat(["cimode"])), typeof a.initImmediate == "boolean" && (a.initAsync = a.initImmediate), a), B = () => {
1088
+ }, Ye = (a) => {
1089
+ Object.getOwnPropertyNames(Object.getPrototypeOf(a)).forEach((t) => {
1090
+ typeof a[t] == "function" && (a[t] = a[t].bind(a));
1080
1091
  });
1081
- };
1082
- class U extends W {
1092
+ }, be = "__i18next_supportNoticeShown", We = () => typeof globalThis < "u" && !!globalThis[be], Qe = () => {
1093
+ typeof globalThis < "u" && (globalThis[be] = !0);
1094
+ }, Ge = (a) => !!(a?.modules?.backend?.name?.indexOf("Locize") > 0 || a?.modules?.backend?.constructor?.name?.indexOf("Locize") > 0 || a?.options?.backend?.backends && a.options.backend.backends.some((e) => e?.name?.indexOf("Locize") > 0 || e?.constructor?.name?.indexOf("Locize") > 0) || a?.options?.backend?.projectId || a?.options?.backend?.backendOptions && a.options.backend.backendOptions.some((e) => e?.projectId));
1095
+ class M extends W {
1083
1096
  constructor(e = {}, t) {
1084
1097
  if (super(), this.options = ge(e), this.services = {}, this.logger = P, this.modules = {
1085
1098
  external: []
1086
- }, _e(this), t && !this.isInitialized && !e.isClone) {
1099
+ }, Ye(this), t && !this.isInitialized && !e.isClone) {
1087
1100
  if (!this.options.initAsync)
1088
1101
  return this.init(e, t), this;
1089
1102
  setTimeout(() => {
@@ -1093,7 +1106,7 @@ class U extends W {
1093
1106
  }
1094
1107
  init(e = {}, t) {
1095
1108
  this.isInitializing = !0, typeof e == "function" && (t = e, e = {}), e.defaultNS == null && e.ns && (d(e.ns) ? e.defaultNS = e.ns : e.ns.indexOf("translation") < 0 && (e.defaultNS = e.ns[0]));
1096
- const i = G();
1109
+ const i = Z();
1097
1110
  this.options = {
1098
1111
  ...i,
1099
1112
  ...this.options,
@@ -1101,29 +1114,29 @@ class U extends W {
1101
1114
  }, this.options.interpolation = {
1102
1115
  ...i.interpolation,
1103
1116
  ...this.options.interpolation
1104
- }, 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 = i.overloadTranslationOptionHandler);
1117
+ }, 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 = i.overloadTranslationOptionHandler), this.options.showSupportNotice !== !1 && !Ge(this) && !We() && (typeof console < "u" && typeof console.info < "u" && console.info("🌐 i18next is made possible by our own product, Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙"), Qe());
1105
1118
  const s = (u) => u ? typeof u == "function" ? new u() : u : null;
1106
1119
  if (!this.options.isClone) {
1107
1120
  this.modules.logger ? P.init(s(this.modules.logger), this.options) : P.init(null, this.options);
1108
1121
  let u;
1109
- this.modules.formatter ? u = this.modules.formatter : u = ze;
1122
+ this.modules.formatter ? u = this.modules.formatter : u = Be;
1110
1123
  const c = new ue(this.options);
1111
1124
  this.store = new oe(this.options.resources, this.options);
1112
1125
  const f = this.services;
1113
- f.logger = P, f.resourceStore = this.store, f.languageUtils = c, f.pluralResolver = new Ue(c, {
1126
+ f.logger = P, f.resourceStore = this.store, f.languageUtils = c, f.pluralResolver = new Me(c, {
1114
1127
  prepend: this.options.pluralSeparator,
1115
1128
  simplifyPluralSuffix: this.options.simplifyPluralSuffix
1116
1129
  }), this.options.interpolation.format && this.options.interpolation.format !== i.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"), u && (!this.options.interpolation.format || this.options.interpolation.format === i.interpolation.format) && (f.formatter = s(u), f.formatter.init && f.formatter.init(f, this.options), this.options.interpolation.format = f.formatter.format.bind(f.formatter)), f.interpolator = new de(this.options), f.utils = {
1117
1130
  hasLoadedNamespace: this.hasLoadedNamespace.bind(this)
1118
- }, f.backendConnector = new Je(s(this.modules.backend), f.resourceStore, f, this.options), f.backendConnector.on("*", (p, ...h) => {
1131
+ }, f.backendConnector = new _e(s(this.modules.backend), f.resourceStore, f, this.options), f.backendConnector.on("*", (p, ...h) => {
1119
1132
  this.emit(p, ...h);
1120
- }), this.modules.languageDetector && (f.languageDetector = s(this.modules.languageDetector), f.languageDetector.init && f.languageDetector.init(f, this.options.detection, this.options)), this.modules.i18nFormat && (f.i18nFormat = s(this.modules.i18nFormat), f.i18nFormat.init && f.i18nFormat.init(this)), this.translator = new _(this.services, this.options), this.translator.on("*", (p, ...h) => {
1133
+ }), this.modules.languageDetector && (f.languageDetector = s(this.modules.languageDetector), f.languageDetector.init && f.languageDetector.init(f, this.options.detection, this.options)), this.modules.i18nFormat && (f.i18nFormat = s(this.modules.i18nFormat), f.i18nFormat.init && f.i18nFormat.init(this)), this.translator = new Y(this.services, this.options), this.translator.on("*", (p, ...h) => {
1121
1134
  this.emit(p, ...h);
1122
1135
  }), this.modules.external.forEach((p) => {
1123
1136
  p.init && p.init(this);
1124
1137
  });
1125
1138
  }
1126
- if (this.format = this.options.interpolation.format, t || (t = z), this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
1139
+ if (this.format = this.options.interpolation.format, t || (t = B), this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
1127
1140
  const u = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);
1128
1141
  u.length > 0 && u[0] !== "dev" && (this.options.lng = u[0]);
1129
1142
  }
@@ -1132,35 +1145,35 @@ class U extends W {
1132
1145
  }), ["addResource", "addResources", "addResourceBundle", "removeResourceBundle"].forEach((u) => {
1133
1146
  this[u] = (...c) => (this.store[u](...c), this);
1134
1147
  });
1135
- const a = V(), l = () => {
1148
+ const o = K(), l = () => {
1136
1149
  const u = (c, f) => {
1137
- 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), a.resolve(f), t(c, f);
1150
+ 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), o.resolve(f), t(c, f);
1138
1151
  };
1139
1152
  if (this.languages && !this.isInitialized) return u(null, this.t.bind(this));
1140
1153
  this.changeLanguage(this.options.lng, u);
1141
1154
  };
1142
- return this.options.resources || !this.options.initAsync ? l() : setTimeout(l, 0), a;
1155
+ return this.options.resources || !this.options.initAsync ? l() : setTimeout(l, 0), o;
1143
1156
  }
1144
- loadResources(e, t = z) {
1157
+ loadResources(e, t = B) {
1145
1158
  let i = t;
1146
1159
  const s = d(e) ? e : this.language;
1147
1160
  if (typeof e == "function" && (i = e), !this.options.resources || this.options.partialBundledLanguages) {
1148
1161
  if (s?.toLowerCase() === "cimode" && (!this.options.preload || this.options.preload.length === 0)) return i();
1149
- const n = [], r = (a) => {
1150
- if (!a || a === "cimode") return;
1151
- this.services.languageUtils.toResolveHierarchy(a).forEach((u) => {
1162
+ const n = [], r = (o) => {
1163
+ if (!o || o === "cimode") return;
1164
+ this.services.languageUtils.toResolveHierarchy(o).forEach((u) => {
1152
1165
  u !== "cimode" && n.indexOf(u) < 0 && n.push(u);
1153
1166
  });
1154
1167
  };
1155
- s ? r(s) : this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((l) => r(l)), this.options.preload?.forEach?.((a) => r(a)), this.services.backendConnector.load(n, this.options.ns, (a) => {
1156
- !a && !this.resolvedLanguage && this.language && this.setResolvedLanguage(this.language), i(a);
1168
+ s ? r(s) : this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((l) => r(l)), this.options.preload?.forEach?.((o) => r(o)), this.services.backendConnector.load(n, this.options.ns, (o) => {
1169
+ !o && !this.resolvedLanguage && this.language && this.setResolvedLanguage(this.language), i(o);
1157
1170
  });
1158
1171
  } else
1159
1172
  i(null);
1160
1173
  }
1161
1174
  reloadResources(e, t, i) {
1162
- const s = V();
1163
- return typeof e == "function" && (i = e, e = void 0), typeof t == "function" && (i = t, t = void 0), e || (e = this.languages), t || (t = this.options.ns), i || (i = z), this.services.backendConnector.reload(e, t, (n) => {
1175
+ const s = K();
1176
+ return typeof e == "function" && (i = e, e = void 0), typeof t == "function" && (i = t, t = void 0), e || (e = this.languages), t || (t = this.options.ns), i || (i = B), this.services.backendConnector.reload(e, t, (n) => {
1164
1177
  s.resolve(), i(n);
1165
1178
  }), s;
1166
1179
  }
@@ -1183,15 +1196,15 @@ class U extends W {
1183
1196
  }
1184
1197
  changeLanguage(e, t) {
1185
1198
  this.isLanguageChangingTo = e;
1186
- const i = V();
1199
+ const i = K();
1187
1200
  this.emit("languageChanging", e);
1188
- const s = (a) => {
1189
- this.language = a, this.languages = this.services.languageUtils.toResolveHierarchy(a), this.resolvedLanguage = void 0, this.setResolvedLanguage(a);
1190
- }, n = (a, l) => {
1191
- l ? this.isLanguageChangingTo === e && (s(l), this.translator.changeLanguage(l), this.isLanguageChangingTo = void 0, this.emit("languageChanged", l), this.logger.log("languageChanged", l)) : this.isLanguageChangingTo = void 0, i.resolve((...u) => this.t(...u)), t && t(a, (...u) => this.t(...u));
1192
- }, r = (a) => {
1193
- !e && !a && this.services.languageDetector && (a = []);
1194
- const l = d(a) ? a : a && a[0], u = this.store.hasLanguageSomeTranslations(l) ? l : this.services.languageUtils.getBestMatchFromCodes(d(a) ? [a] : a);
1201
+ const s = (o) => {
1202
+ this.language = o, this.languages = this.services.languageUtils.toResolveHierarchy(o), this.resolvedLanguage = void 0, this.setResolvedLanguage(o);
1203
+ }, n = (o, l) => {
1204
+ l ? this.isLanguageChangingTo === e && (s(l), this.translator.changeLanguage(l), this.isLanguageChangingTo = void 0, this.emit("languageChanged", l), this.logger.log("languageChanged", l)) : this.isLanguageChangingTo = void 0, i.resolve((...u) => this.t(...u)), t && t(o, (...u) => this.t(...u));
1205
+ }, r = (o) => {
1206
+ !e && !o && this.services.languageDetector && (o = []);
1207
+ const l = d(o) ? o : o && o[0], u = this.store.hasLanguageSomeTranslations(l) ? l : this.services.languageUtils.getBestMatchFromCodes(d(o) ? [o] : o);
1195
1208
  u && (this.language || s(u), this.translator.language || this.translator.changeLanguage(u), this.services.languageDetector?.cacheUserLanguage?.(u)), this.loadResources(u, (c) => {
1196
1209
  n(c, u);
1197
1210
  });
@@ -1199,17 +1212,17 @@ class U extends W {
1199
1212
  return !e && this.services.languageDetector && !this.services.languageDetector.async ? r(this.services.languageDetector.detect()) : !e && this.services.languageDetector && this.services.languageDetector.async ? this.services.languageDetector.detect.length === 0 ? this.services.languageDetector.detect().then(r) : this.services.languageDetector.detect(r) : r(e), i;
1200
1213
  }
1201
1214
  getFixedT(e, t, i) {
1202
- const s = (n, r, ...a) => {
1215
+ const s = (n, r, ...o) => {
1203
1216
  let l;
1204
- typeof r != "object" ? l = this.options.overloadTranslationOptionHandler([n, r].concat(a)) : l = {
1217
+ typeof r != "object" ? l = this.options.overloadTranslationOptionHandler([n, r].concat(o)) : l = {
1205
1218
  ...r
1206
1219
  }, l.lng = l.lng || s.lng, l.lngs = l.lngs || s.lngs, l.ns = l.ns || s.ns, l.keyPrefix !== "" && (l.keyPrefix = l.keyPrefix || i || s.keyPrefix);
1207
1220
  const u = this.options.keySeparator || ".";
1208
1221
  let c;
1209
- return l.keyPrefix && Array.isArray(n) ? c = n.map((f) => (typeof f == "function" && (f = X(f, {
1222
+ return l.keyPrefix && Array.isArray(n) ? c = n.map((f) => (typeof f == "function" && (f = U(f, {
1210
1223
  ...this.options,
1211
1224
  ...r
1212
- })), `${l.keyPrefix}${u}${f}`)) : (typeof n == "function" && (n = X(n, {
1225
+ })), `${l.keyPrefix}${u}${f}`)) : (typeof n == "function" && (n = U(n, {
1213
1226
  ...this.options,
1214
1227
  ...r
1215
1228
  })), c = l.keyPrefix ? `${l.keyPrefix}${u}${n}` : n), this.t(c, l);
@@ -1232,18 +1245,18 @@ class U extends W {
1232
1245
  return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty", this.languages), !1;
1233
1246
  const i = t.lng || this.resolvedLanguage || this.languages[0], s = this.options ? this.options.fallbackLng : !1, n = this.languages[this.languages.length - 1];
1234
1247
  if (i.toLowerCase() === "cimode") return !0;
1235
- const r = (a, l) => {
1236
- const u = this.services.backendConnector.state[`${a}|${l}`];
1248
+ const r = (o, l) => {
1249
+ const u = this.services.backendConnector.state[`${o}|${l}`];
1237
1250
  return u === -1 || u === 0 || u === 2;
1238
1251
  };
1239
1252
  if (t.precheck) {
1240
- const a = t.precheck(this, r);
1241
- if (a !== void 0) return a;
1253
+ const o = t.precheck(this, r);
1254
+ if (o !== void 0) return o;
1242
1255
  }
1243
1256
  return !!(this.hasResourceBundle(i, e) || !this.services.backendConnector.backend || this.options.resources && !this.options.partialBundledLanguages || r(i, e) && (!s || r(n, e)));
1244
1257
  }
1245
1258
  loadNamespaces(e, t) {
1246
- const i = V();
1259
+ const i = K();
1247
1260
  return this.options.ns ? (d(e) && (e = [e]), e.forEach((s) => {
1248
1261
  this.options.ns.indexOf(s) < 0 && this.options.ns.push(s);
1249
1262
  }), this.loadResources((s) => {
@@ -1251,7 +1264,7 @@ class U extends W {
1251
1264
  }), i) : (t && t(), Promise.resolve());
1252
1265
  }
1253
1266
  loadLanguages(e, t) {
1254
- const i = V();
1267
+ const i = K();
1255
1268
  d(e) && (e = [e]);
1256
1269
  const s = this.options.preload || [], n = e.filter((r) => s.indexOf(r) < 0 && this.services.languageUtils.isSupportedCode(r));
1257
1270
  return n.length ? (this.options.preload = s.concat(n), this.loadResources((r) => {
@@ -1268,38 +1281,38 @@ class U extends W {
1268
1281
  }
1269
1282
  } catch {
1270
1283
  }
1271
- const t = ["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"], i = this.services?.languageUtils || new ue(G());
1284
+ const t = ["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"], i = this.services?.languageUtils || new ue(Z());
1272
1285
  return e.toLowerCase().indexOf("-latn") > 1 ? "ltr" : t.indexOf(i.getLanguagePartFromCode(e)) > -1 || e.toLowerCase().indexOf("-arab") > 1 ? "rtl" : "ltr";
1273
1286
  }
1274
1287
  static createInstance(e = {}, t) {
1275
- const i = new U(e, t);
1276
- return i.createInstance = U.createInstance, i;
1288
+ const i = new M(e, t);
1289
+ return i.createInstance = M.createInstance, i;
1277
1290
  }
1278
- cloneInstance(e = {}, t = z) {
1291
+ cloneInstance(e = {}, t = B) {
1279
1292
  const i = e.forkResourceStore;
1280
1293
  i && delete e.forkResourceStore;
1281
1294
  const s = {
1282
1295
  ...this.options,
1283
1296
  ...e,
1284
1297
  isClone: !0
1285
- }, n = new U(s);
1286
- if ((e.debug !== void 0 || e.prefix !== void 0) && (n.logger = n.logger.clone(e)), ["store", "services", "language"].forEach((a) => {
1287
- n[a] = this[a];
1298
+ }, n = new M(s);
1299
+ if ((e.debug !== void 0 || e.prefix !== void 0) && (n.logger = n.logger.clone(e)), ["store", "services", "language"].forEach((o) => {
1300
+ n[o] = this[o];
1288
1301
  }), n.services = {
1289
1302
  ...this.services
1290
1303
  }, n.services.utils = {
1291
1304
  hasLoadedNamespace: n.hasLoadedNamespace.bind(n)
1292
1305
  }, i) {
1293
- const a = Object.keys(this.store.data).reduce((l, u) => (l[u] = {
1306
+ const o = Object.keys(this.store.data).reduce((l, u) => (l[u] = {
1294
1307
  ...this.store.data[u]
1295
1308
  }, l[u] = Object.keys(l[u]).reduce((c, f) => (c[f] = {
1296
1309
  ...l[u][f]
1297
1310
  }, c), l[u]), l), {});
1298
- n.store = new oe(a, s), n.services.resourceStore = n.store;
1311
+ n.store = new oe(o, s), n.services.resourceStore = n.store;
1299
1312
  }
1300
1313
  if (e.interpolation) {
1301
1314
  const l = {
1302
- ...G().interpolation,
1315
+ ...Z().interpolation,
1303
1316
  ...this.options.interpolation,
1304
1317
  ...e.interpolation
1305
1318
  }, u = {
@@ -1308,8 +1321,8 @@ class U extends W {
1308
1321
  };
1309
1322
  n.services.interpolator = new de(u);
1310
1323
  }
1311
- return n.translator = new _(n.services, s), n.translator.on("*", (a, ...l) => {
1312
- n.emit(a, ...l);
1324
+ return n.translator = new Y(n.services, s), n.translator.on("*", (o, ...l) => {
1325
+ n.emit(o, ...l);
1313
1326
  }), n.init(s, t), n.translator.options = s, n.translator.backendConnector.services.utils = {
1314
1327
  hasLoadedNamespace: n.hasLoadedNamespace.bind(n)
1315
1328
  }, n;
@@ -1324,7 +1337,7 @@ class U extends W {
1324
1337
  };
1325
1338
  }
1326
1339
  }
1327
- const m = U.createInstance();
1340
+ const m = M.createInstance();
1328
1341
  m.createInstance;
1329
1342
  m.dir;
1330
1343
  m.init;
@@ -1339,16 +1352,16 @@ m.setDefaultNamespace;
1339
1352
  m.hasLoadedNamespace;
1340
1353
  m.loadNamespaces;
1341
1354
  m.loadLanguages;
1342
- const be = /* @__PURE__ */ Symbol();
1343
- function et(o, { i18next: e, rerenderOn: t = [
1355
+ const Oe = /* @__PURE__ */ Symbol();
1356
+ function nt(a, { i18next: e, rerenderOn: t = [
1344
1357
  "languageChanged",
1345
1358
  "loaded",
1346
1359
  "added",
1347
1360
  "removed"
1348
1361
  ], slotStart: i = "{", slotEnd: s = "}" }) {
1349
- const n = ve(/* @__PURE__ */ new Date()), r = () => Re(() => {
1362
+ const n = Pe(/* @__PURE__ */ new Date()), r = () => Re(() => {
1350
1363
  n.value = /* @__PURE__ */ new Date();
1351
- }), a = () => n.value;
1364
+ }), o = () => n.value;
1352
1365
  t.forEach((c) => {
1353
1366
  switch (c) {
1354
1367
  case "added":
@@ -1359,87 +1372,87 @@ function et(o, { i18next: e, rerenderOn: t = [
1359
1372
  e.on(c, r);
1360
1373
  break;
1361
1374
  }
1362
- }), o.component("i18next", Qe);
1375
+ }), a.component("i18next", qe);
1363
1376
  const l = () => e.isInitialized;
1364
- o.config.globalProperties.$t = me(e.t.bind(e), a, l);
1377
+ a.config.globalProperties.$t = me(e.t.bind(e), o, l);
1365
1378
  const u = new Proxy(e, { get(c, f) {
1366
- return a(), Reflect.get(c, f);
1379
+ return o(), Reflect.get(c, f);
1367
1380
  } });
1368
- o.config.globalProperties.$i18next = u, o.provide(be, {
1381
+ a.config.globalProperties.$i18next = u, a.provide(Oe, {
1369
1382
  i18next: u,
1370
- slotPattern: Ye(i, s),
1383
+ slotPattern: Xe(i, s),
1371
1384
  withAccessRecording(c, f) {
1372
- return me(c, a, f);
1385
+ return me(c, o, f);
1373
1386
  }
1374
1387
  });
1375
1388
  }
1376
- function tt(o, e) {
1377
- const { i18next: t, withAccessRecording: i } = Oe();
1389
+ function rt(a, e) {
1390
+ const { i18next: t, withAccessRecording: i } = Le();
1378
1391
  let s;
1379
1392
  return s = t.getFixedT(null, null, e?.keyPrefix), {
1380
1393
  i18next: t,
1381
- t: i(s, We(t, o))
1394
+ t: i(s, Ze(t, a))
1382
1395
  };
1383
1396
  }
1384
- function We(o, e = []) {
1397
+ function Ze(a, e = []) {
1385
1398
  let t;
1386
1399
  return () => {
1387
- if (t === void 0) if (o.isInitialized) {
1388
- const i = (typeof e == "string" ? [e] : e).filter((s) => !o.hasLoadedNamespace(s));
1389
- i.length ? (t = !1, o.loadNamespaces(i).then(() => t = !0)) : t = !0;
1400
+ if (t === void 0) if (a.isInitialized) {
1401
+ const i = (typeof e == "string" ? [e] : e).filter((s) => !a.hasLoadedNamespace(s));
1402
+ i.length ? (t = !1, a.loadNamespaces(i).then(() => t = !0)) : t = !0;
1390
1403
  } else
1391
1404
  return !1;
1392
1405
  return t;
1393
1406
  };
1394
1407
  }
1395
- function me(o, e, t) {
1396
- return new Proxy(o, { apply: function(i, s, n) {
1408
+ function me(a, e, t) {
1409
+ return new Proxy(a, { apply: function(i, s, n) {
1397
1410
  return e(), t() ? Reflect.apply(i, s, n) : "";
1398
1411
  } });
1399
1412
  }
1400
- function Oe() {
1401
- const o = Pe(be);
1402
- if (!o) throw new Error("i18next-vue: Make sure to register the i18next-vue plugin using app.use(...).");
1403
- return o;
1413
+ function Le() {
1414
+ const a = $e(Oe);
1415
+ if (!a) throw new Error("i18next-vue: Make sure to register the i18next-vue plugin using app.use(...).");
1416
+ return a;
1404
1417
  }
1405
- function Ye(o, e) {
1406
- const t = `${o}\\s*([a-z0-9\\-]+)\\s*${e}`;
1418
+ function Xe(a, e) {
1419
+ const t = `${a}\\s*([a-z0-9\\-]+)\\s*${e}`;
1407
1420
  return new RegExp(t, "gi");
1408
1421
  }
1409
- const Qe = Ce({
1422
+ const qe = Ce({
1410
1423
  props: { translation: {
1411
1424
  type: String,
1412
1425
  required: !0
1413
1426
  } },
1414
- setup(o, { slots: e }) {
1415
- const { slotPattern: t } = Oe();
1427
+ setup(a, { slots: e }) {
1428
+ const { slotPattern: t } = Le();
1416
1429
  return () => {
1417
- const i = o.translation, s = [];
1430
+ const i = a.translation, s = [];
1418
1431
  let n, r = 0;
1419
1432
  for (; (n = t.exec(i)) !== null; ) {
1420
1433
  s.push(i.substring(r, n.index));
1421
- const a = e[n[1]];
1422
- a ? s.push(...a()) : s.push(n[0]), r = t.lastIndex;
1434
+ const o = e[n[1]];
1435
+ o ? s.push(...o()) : s.push(n[0]), r = t.lastIndex;
1423
1436
  }
1424
1437
  return s.push(i.substring(r)), s;
1425
1438
  };
1426
1439
  }
1427
- }), Ge = "translation";
1428
- async function st(o) {
1429
- for (const [e, t] of Object.entries(o)) {
1440
+ }), et = "translation";
1441
+ async function at(a) {
1442
+ for (const [e, t] of Object.entries(a)) {
1430
1443
  const i = e.match(/\/([^/]+)\.json$/)[1];
1431
- await Ze(i, t);
1444
+ await tt(i, t);
1432
1445
  }
1433
1446
  }
1434
- async function Ze(o, e) {
1435
- await Xe(), m.addResourceBundle(o, Ge, e, !0, !0);
1447
+ async function tt(a, e) {
1448
+ await st(), m.addResourceBundle(a, et, e, !0, !0);
1436
1449
  }
1437
- async function Xe() {
1450
+ async function st() {
1438
1451
  m.isInitialized || await m.init();
1439
1452
  }
1440
1453
  export {
1441
- st as a,
1442
- et as b,
1454
+ at as a,
1455
+ nt as b,
1443
1456
  m as i,
1444
- tt as u
1457
+ rt as u
1445
1458
  };