@pie-element/simple-cloze 0.1.4-next.15 → 0.1.4-next.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/module/print.js CHANGED
@@ -2067,38 +2067,64 @@ function Hr(e, t, n, r, i, a) {
2067
2067
  }
2068
2068
  //#endregion
2069
2069
  //#region ../../shared/math-rendering-mathjax/dist/index.js
2070
- var Ur = {
2070
+ var Ur = "https://github.com/pie-framework/pie-players/blob/develop/docs/item-player/loading-strategies.md#one-mathjax-version-per-page", Wr = "pie-mathjax-version-conflict", Gr = Symbol.for("@pie-element/shared-math-rendering-mathjax/unsupported-page");
2071
+ function Kr(e, t) {
2072
+ if (typeof window > "u") return;
2073
+ let n = globalThis;
2074
+ n[Gr] ??= {
2075
+ logged: !1,
2076
+ conditions: []
2077
+ };
2078
+ let r = n[Gr];
2079
+ if (r.conditions.includes(e)) return;
2080
+ r.conditions.push(e);
2081
+ let i = `[math-rendering] Unsupported page (${e}): ${t}. 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 ${Ur}`;
2082
+ r.logged || (r.logged = !0, console.error(i)), window.dispatchEvent(new CustomEvent(Wr, { detail: {
2083
+ condition: e,
2084
+ message: i,
2085
+ docsUrl: Ur
2086
+ } }));
2087
+ }
2088
+ function qr() {
2089
+ let e = window.MathJax?.version;
2090
+ return typeof e == "string" && e.startsWith("3.") ? e : void 0;
2091
+ }
2092
+ var Jr = "https://cdn.jsdelivr.net/npm/mathjax@4.1.3/tex-mml-chtml.js", Yr = {
2071
2093
  parallelogram: "\\lower.2em{\\Huge\\unicode{x25B1}}",
2072
2094
  overarc: "\\overparen",
2073
2095
  napprox: "\\not\\approx",
2074
2096
  longdiv: "\\enclose{longdiv}",
2075
2097
  abs: ["\\left|#1\\right|", 1]
2076
- }, Wr = "[math-rendering] using $ is not advisable, please use $$..$$ or \\(...\\)", Gr = /\\\(|\\\[|\$\$|\\\$|\\begin\{|\\(?:eq)?ref\{/, Kr = /\\\(|\\\[|\$|\\begin\{|\\(?:eq)?ref\{/, qr = /\\embed\{newLine\}\[\]/g, Jr = [
2098
+ }, Xr = "[math-rendering] using $ is not advisable, please use $$..$$ or \\(...\\)", Zr = /\\\(|\\\[|\$\$|\\\$|\\begin\{|\\(?:eq)?ref\{/, Qr = /\\\(|\\\[|\$|\\begin\{|\\(?:eq)?ref\{/, $r = /\\embed\{newLine\}\[\]/g, ei = [
2077
2099
  ["$$", "$$"],
2078
2100
  ["$", "$"],
2079
2101
  ["\\[", "\\]"],
2080
2102
  ["\\(", "\\)"]
2081
- ], Yr = Symbol.for("@pie-element/shared-math-rendering-mathjax/loading");
2082
- function Xr() {
2103
+ ], ti = Symbol.for("@pie-element/shared-math-rendering-mathjax/loading"), ni = "PIE-MJX-CHTML-styles", ri = "MJX-CHTML-styles", ii = [ri, "MJX-SVG-styles"], ai = 201;
2104
+ function oi(e) {
2105
+ let t = [...e.matches("mjx-container") ? [e] : [], ...e.querySelectorAll("mjx-container")];
2106
+ 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");
2107
+ }
2108
+ function si() {
2083
2109
  return window.MathJax;
2084
2110
  }
2085
- function Zr(e) {
2111
+ function ci(e) {
2086
2112
  let t = e.includes("\\displaystyle") ? e.replace("\\displaystyle", "").trim() : e;
2087
- for (let [e, n] of Jr) if (t.startsWith(e) && t.endsWith(n)) return t.substring(e.length, t.length - n.length);
2113
+ for (let [e, n] of ei) if (t.startsWith(e) && t.endsWith(n)) return t.substring(e.length, t.length - n.length);
2088
2114
  return t;
2089
2115
  }
2090
- function Qr(e) {
2116
+ function li(e) {
2091
2117
  for (let t of e.querySelectorAll("[data-latex]")) {
2092
2118
  if (t.dataset.mathHandled || t.closest("mjx-container")) continue;
2093
2119
  let e = t.textContent;
2094
- e && (t.textContent = `\\(${Zr(e)}\\)`.replace(qr, "\\newline "), t.dataset.mathHandled = "true");
2120
+ e && (t.textContent = `\\(${ci(e)}\\)`.replace($r, "\\newline "), t.dataset.mathHandled = "true");
2095
2121
  }
2096
2122
  }
2097
- function $r(e, t) {
2123
+ function ui(e, t) {
2098
2124
  for (let t of e.querySelectorAll("math")) if (!t.closest("mjx-assistive-mml")) return !0;
2099
- return (t ? Kr : Gr).test(e.textContent ?? "");
2125
+ return (t ? Qr : Zr).test(e.textContent ?? "");
2100
2126
  }
2101
- function ei(e) {
2127
+ function di(e) {
2102
2128
  return new Promise((t, n) => {
2103
2129
  let { useSingleDollar: r = !1, accessibility: i = !0, loadFonts: a = !0, srcUrl: o } = e, s = {
2104
2130
  loader: {
@@ -2108,11 +2134,11 @@ function ei(e) {
2108
2134
  startup: {
2109
2135
  typeset: !1,
2110
2136
  ready: () => {
2111
- let e = Xr()?.startup;
2112
- e?.defaultReady?.(), Promise.resolve(e?.promise).then(() => t(), n);
2137
+ let e = si(), r = e?.startup, i = !!e?.version?.startsWith("4.");
2138
+ i && fi(e), r?.defaultReady?.(), i && pi(r?.document), Promise.resolve(r?.promise).then(() => t(), n);
2113
2139
  }
2114
2140
  },
2115
- tex: { macros: { ...Ur } },
2141
+ tex: { macros: { ...Yr } },
2116
2142
  options: {
2117
2143
  enableMenu: i,
2118
2144
  menuOptions: { settings: {
@@ -2122,76 +2148,124 @@ function ei(e) {
2122
2148
  } }
2123
2149
  }
2124
2150
  };
2125
- r && s.tex && (console.warn(Wr), s.tex.inlineMath = [["$", "$"], ["\\(", "\\)"]], s.tex.processEscapes = !0), a || (s.chtml = { fontURL: "" }), window.MathJax = s;
2151
+ r && s.tex && (console.warn(Xr), s.tex.inlineMath = [["$", "$"], ["\\(", "\\)"]], s.tex.processEscapes = !0), a || (s.chtml = { fontURL: "" }), window.MathJax = s;
2126
2152
  let c = document.createElement("script");
2127
- c.src = o || "https://cdn.jsdelivr.net/npm/mathjax@4.1.3/tex-mml-chtml.js", c.async = !0, c.onerror = () => n(/* @__PURE__ */ Error("Failed to load MathJax")), document.head.appendChild(c);
2153
+ c.src = o || Jr, c.async = !0, c.onerror = () => n(/* @__PURE__ */ Error("Failed to load MathJax")), document.head.appendChild(c);
2128
2154
  });
2129
2155
  }
2130
- function ti(e) {
2156
+ function fi(e) {
2157
+ let t = e?._?.output?.chtml_ts?.CHTML;
2158
+ t && (t.STYLESHEETID = ni);
2159
+ }
2160
+ function pi(e) {
2161
+ if (!e) return;
2162
+ let t = /* @__PURE__ */ new WeakSet(), n = (e) => {
2163
+ let n = e.typesetRoot;
2164
+ !n || t.has(n) || (oi(n), t.add(n));
2165
+ };
2166
+ e.addRenderAction?.("pie-strip-latex", ai, (e) => {
2167
+ for (let t of e.math ?? []) n(t);
2168
+ return !1;
2169
+ }, (e) => {
2170
+ let t = e.typesetRoot;
2171
+ return t && oi(t), !1;
2172
+ });
2173
+ let r = e.outputJax?.chtmlStyles;
2174
+ r?.id === ri && (r.id = ni), gi();
2175
+ }
2176
+ function mi(e) {
2177
+ return e instanceof HTMLStyleElement && ii.includes(e.id);
2178
+ }
2179
+ function hi(e) {
2180
+ Kr("foreign-output-stylesheet", `another MathJax added <style id="${e.id}"> to <head>`);
2181
+ }
2182
+ function gi() {
2183
+ let e = document.head, t = [...e.children].find(mi);
2184
+ if (t) {
2185
+ hi(t);
2186
+ return;
2187
+ }
2188
+ let n = new MutationObserver((e) => {
2189
+ for (let t of e) {
2190
+ let e = [...t.addedNodes].find(mi);
2191
+ if (e) {
2192
+ hi(e), n.disconnect();
2193
+ return;
2194
+ }
2195
+ }
2196
+ });
2197
+ n.observe(e, { childList: !0 });
2198
+ }
2199
+ function _i(e) {
2131
2200
  return new Promise((t, n) => {
2132
2201
  let r = e.startup ?? {};
2133
2202
  e.startup = r;
2134
2203
  let i = r.ready;
2135
2204
  r.ready = () => {
2136
- let e = Xr()?.startup;
2205
+ let e = si()?.startup;
2137
2206
  i ? i.call(r) : e?.defaultReady?.(), Promise.resolve(e?.promise).then(() => t(), n);
2138
2207
  };
2139
2208
  });
2140
2209
  }
2141
- function ni(e) {
2142
- let t = Xr();
2143
- return t ? t.version ? t.startup?.promise ? Promise.resolve(t.startup.promise).then(() => void 0) : Promise.resolve() : ti(t) : ei(e);
2210
+ function vi(e) {
2211
+ let t = si();
2212
+ return t ? t.version ? t.startup?.promise ? Promise.resolve(t.startup.promise).then(() => void 0) : Promise.resolve() : _i(t) : di(e);
2144
2213
  }
2145
- function ri(e) {
2146
- return ni(e).then(() => {
2147
- typeof Xr()?.typesetPromise != "function" && console.warn("[mathjax-renderer] MathJax on this page has no typesetPromise; math stays untypeset.");
2214
+ function yi(e) {
2215
+ return vi(e).then(() => {
2216
+ typeof si()?.typesetPromise != "function" && console.warn("[mathjax-renderer] MathJax on this page has no typesetPromise; math stays untypeset.");
2148
2217
  });
2149
2218
  }
2150
- function ii(e) {
2151
- let t = globalThis, n = t[Yr];
2152
- return n || (n = ri(e), t[Yr] = n), n;
2219
+ function bi(e) {
2220
+ let t = globalThis, n = t[ti];
2221
+ return n || (n = yi(e), t[ti] = n), n;
2153
2222
  }
2154
- function ai(e = {}) {
2223
+ function xi(e = {}) {
2155
2224
  let t = e.useSingleDollar ?? !1;
2156
2225
  return async (n) => {
2157
2226
  if (typeof window > "u") return;
2158
- Qr(n);
2159
- let r = ii(e);
2160
- if (!$r(n, t)) {
2161
- r.catch(() => {});
2227
+ let r = qr();
2228
+ r && Kr("mathjax-3-global", `window.MathJax is MathJax ${r}`), li(n);
2229
+ let i = bi(e);
2230
+ if (!ui(n, t)) {
2231
+ i.catch(() => {});
2162
2232
  return;
2163
2233
  }
2164
- await r;
2165
- let i = Xr();
2166
- await i?.startup?.promise, typeof i?.typesetPromise == "function" && await i.typesetPromise([n]);
2234
+ await i;
2235
+ let a = si();
2236
+ await a?.startup?.promise, typeof a?.typesetPromise == "function" && (await a.typesetPromise([n]), oi(n));
2167
2237
  };
2168
2238
  }
2169
- var oi = "@pie-lib/math-rendering", si = "@pie-lib/math-rendering@2", ci = null;
2170
- function li() {
2171
- return !!window[si]?.opts?.useSingleDollar;
2239
+ var Si = "@pie-lib/math-rendering", Ci = "@pie-lib/math-rendering@2", wi = null;
2240
+ function Ti() {
2241
+ return !!window[Ci]?.opts?.useSingleDollar;
2172
2242
  }
2173
- function ui() {
2174
- return ci ||= ai({ useSingleDollar: li() }), ci;
2243
+ function Ei() {
2244
+ return wi ||= xi({ useSingleDollar: Ti() }), wi;
2175
2245
  }
2176
- function di() {
2246
+ function Di() {
2177
2247
  if (typeof window > "u") return null;
2178
- let e = window[oi];
2248
+ let e = window[Si];
2179
2249
  return typeof e?.renderMath == "function" ? e : null;
2180
2250
  }
2181
- var fi = async (e) => {
2251
+ function Oi() {
2252
+ let e = qr();
2253
+ e && Kr("legacy-renderer-delegation", `window['${Si}'] renders this element's math with MathJax ${e}`);
2254
+ }
2255
+ var ki = async (e) => {
2182
2256
  if (typeof window > "u") return;
2183
2257
  let t = typeof e == "string", n;
2184
2258
  t ? (n = document.createElement("div"), n.innerHTML = e) : n = e || document.body;
2185
- let r = di();
2186
- return r ? await r.renderMath?.(n) : await ui()(n), t ? n.innerHTML : void 0;
2187
- }, pi = [
2259
+ let r = Di();
2260
+ return r ? (Oi(), await r.renderMath?.(n)) : await Ei()(n), t ? n.innerHTML : void 0;
2261
+ }, Ai = [
2188
2262
  "nbsp iexcl cent pound curren yen brvbar sect uml copy ordf laquo not shy reg macr",
2189
2263
  "deg plusmn sup2 sup3 acute micro para middot cedil sup1 ordm raquo frac14 frac12 frac34 iquest",
2190
2264
  "Agrave Aacute Acirc Atilde Auml Aring AElig Ccedil Egrave Eacute Ecirc Euml Igrave Iacute Icirc Iuml",
2191
2265
  "ETH Ntilde Ograve Oacute Ocirc Otilde Ouml times Oslash Ugrave Uacute Ucirc Uuml Yacute THORN szlig",
2192
2266
  "agrave aacute acirc atilde auml aring aelig ccedil egrave eacute ecirc euml igrave iacute icirc iuml",
2193
2267
  "eth ntilde ograve oacute ocirc otilde ouml divide oslash ugrave uacute ucirc uuml yacute thorn yuml"
2194
- ].join(" "), mi = "alpha beta gamma delta epsilon zeta eta theta iota kappa lambda mu nu xi omicron pi rho sigmaf sigma tau upsilon phi chi psi omega", hi = new Map(Object.entries({
2268
+ ].join(" "), ji = "alpha beta gamma delta epsilon zeta eta theta iota kappa lambda mu nu xi omicron pi rho sigmaf sigma tau upsilon phi chi psi omega", Mi = new Map(Object.entries({
2195
2269
  quot: 34,
2196
2270
  amp: 38,
2197
2271
  apos: 39,
@@ -2222,16 +2296,16 @@ var fi = async (e) => {
2222
2296
  le: 8804,
2223
2297
  ge: 8805
2224
2298
  }));
2225
- for (let [e, t] of pi.split(" ").entries()) hi.set(t, 160 + e);
2226
- for (let [e, t] of mi.split(" ").entries()) hi.set(t, 945 + e), t !== "sigmaf" && hi.set(t[0].toUpperCase() + t.slice(1), 913 + e);
2227
- var gi = /<\/?(?:br|p|div|li|h[1-6]|blockquote|pre|tr|td|th)\b[^>]*>/gi, _i = /<\/?[a-z][^>]*>|<!--[\s\S]*?-->/gi, vi = /&(#[0-9]+|#x[0-9a-f]+|[a-z][a-z0-9]*);/gi, yi = (e, t) => {
2299
+ for (let [e, t] of Ai.split(" ").entries()) Mi.set(t, 160 + e);
2300
+ for (let [e, t] of ji.split(" ").entries()) Mi.set(t, 945 + e), t !== "sigmaf" && Mi.set(t[0].toUpperCase() + t.slice(1), 913 + e);
2301
+ var Ni = /<\/?(?:br|p|div|li|h[1-6]|blockquote|pre|tr|td|th)\b[^>]*>/gi, Pi = /<\/?[a-z][^>]*>|<!--[\s\S]*?-->/gi, Fi = /&(#[0-9]+|#x[0-9a-f]+|[a-z][a-z0-9]*);/gi, Ii = (e, t) => {
2228
2302
  if (t[0] === "#") {
2229
2303
  let e = t[1] === "x" || t[1] === "X", n = Number.parseInt(t.slice(e ? 2 : 1), e ? 16 : 10), r = n > 0 && n <= 1114111 && (n < 55296 || n > 57343);
2230
2304
  return String.fromCodePoint(r ? n : 65533);
2231
2305
  }
2232
- let n = hi.get(t);
2306
+ let n = Mi.get(t);
2233
2307
  return n === void 0 ? e : String.fromCodePoint(n);
2234
- }, bi = (e) => typeof e == "string" ? e.replace(gi, " ").replace(_i, "").replace(vi, yi).replace(/\s+/g, " ").trim() : "", xi = {
2308
+ }, Li = (e) => typeof e == "string" ? e.replace(Ni, " ").replace(Pi, "").replace(Fi, Ii).replace(/\s+/g, " ").trim() : "", Ri = {
2235
2309
  translation: {
2236
2310
  categorize: {
2237
2311
  limitMaxChoicesPerCategory: "You've reached the limit of {{maxChoicesPerCategory}} responses per area. To add another response, one must first be removed.",
@@ -2371,7 +2445,7 @@ var gi = /<\/?(?:br|p|div|li|h[1-6]|blockquote|pre|tr|td|th)\b[^>]*>/gi, _i = /<
2371
2445
  hideNote: "Hide Note",
2372
2446
  cancel: "Cancel"
2373
2447
  }
2374
- }, Si = {
2448
+ }, zi = {
2375
2449
  translation: {
2376
2450
  categorize: {
2377
2451
  limitMaxChoicesPerCategory: "Has alcanzado el límite de {{maxChoicesPerCategory}} respuestas por área. Para agregar otra respuesta, primero se debe eliminar una respuesta.",
@@ -2511,55 +2585,55 @@ var gi = /<\/?(?:br|p|div|li|h[1-6]|blockquote|pre|tr|td|th)\b[^>]*>/gi, _i = /<
2511
2585
  hideNote: "Ocultar Nota",
2512
2586
  cancel: "Cancelar"
2513
2587
  }
2514
- }, Z = (e) => typeof e == "string", Ci = () => {
2588
+ }, Z = (e) => typeof e == "string", Bi = () => {
2515
2589
  let e, t, n = new Promise((n, r) => {
2516
2590
  e = n, t = r;
2517
2591
  });
2518
2592
  return n.resolve = e, n.reject = t, n;
2519
- }, wi = (e) => e == null ? "" : "" + e, Ti = (e, t, n) => {
2593
+ }, Vi = (e) => e == null ? "" : "" + e, Hi = (e, t, n) => {
2520
2594
  e.forEach((e) => {
2521
2595
  t[e] && (n[e] = t[e]);
2522
2596
  });
2523
- }, Ei = /###/g, Di = (e) => e && e.indexOf("###") > -1 ? e.replace(Ei, ".") : e, Oi = (e) => !e || Z(e), ki = (e, t, n) => {
2597
+ }, Ui = /###/g, Wi = (e) => e && e.indexOf("###") > -1 ? e.replace(Ui, ".") : e, Gi = (e) => !e || Z(e), Ki = (e, t, n) => {
2524
2598
  let r = Z(t) ? t.split(".") : t, i = 0;
2525
2599
  for (; i < r.length - 1;) {
2526
- if (Oi(e)) return {};
2527
- let t = Di(r[i]);
2600
+ if (Gi(e)) return {};
2601
+ let t = Wi(r[i]);
2528
2602
  !e[t] && n && (e[t] = new n()), e = Object.prototype.hasOwnProperty.call(e, t) ? e[t] : {}, ++i;
2529
2603
  }
2530
- return Oi(e) ? {} : {
2604
+ return Gi(e) ? {} : {
2531
2605
  obj: e,
2532
- k: Di(r[i])
2606
+ k: Wi(r[i])
2533
2607
  };
2534
- }, Ai = (e, t, n) => {
2535
- let { obj: r, k: i } = ki(e, t, Object);
2608
+ }, qi = (e, t, n) => {
2609
+ let { obj: r, k: i } = Ki(e, t, Object);
2536
2610
  if (r !== void 0 || t.length === 1) {
2537
2611
  r[i] = n;
2538
2612
  return;
2539
2613
  }
2540
- let a = t[t.length - 1], o = t.slice(0, t.length - 1), s = ki(e, o, Object);
2541
- for (; s.obj === void 0 && o.length;) a = `${o[o.length - 1]}.${a}`, o = o.slice(0, o.length - 1), s = ki(e, o, Object), s?.obj && s.obj[`${s.k}.${a}`] !== void 0 && (s.obj = void 0);
2614
+ let a = t[t.length - 1], o = t.slice(0, t.length - 1), s = Ki(e, o, Object);
2615
+ for (; s.obj === void 0 && o.length;) a = `${o[o.length - 1]}.${a}`, o = o.slice(0, o.length - 1), s = Ki(e, o, Object), s?.obj && s.obj[`${s.k}.${a}`] !== void 0 && (s.obj = void 0);
2542
2616
  s.obj[`${s.k}.${a}`] = n;
2543
- }, ji = (e, t, n, r) => {
2544
- let { obj: i, k: a } = ki(e, t, Object);
2617
+ }, Ji = (e, t, n, r) => {
2618
+ let { obj: i, k: a } = Ki(e, t, Object);
2545
2619
  i[a] = i[a] || [], i[a].push(n);
2546
- }, Mi = (e, t) => {
2547
- let { obj: n, k: r } = ki(e, t);
2620
+ }, Yi = (e, t) => {
2621
+ let { obj: n, k: r } = Ki(e, t);
2548
2622
  if (n && Object.prototype.hasOwnProperty.call(n, r)) return n[r];
2549
- }, Ni = (e, t, n) => {
2550
- let r = Mi(e, n);
2551
- return r === void 0 ? Mi(t, n) : r;
2552
- }, Pi = (e, t, n) => {
2553
- for (let r in t) r !== "__proto__" && r !== "constructor" && (r in e ? Z(e[r]) || e[r] instanceof String || Z(t[r]) || t[r] instanceof String ? n && (e[r] = t[r]) : Pi(e[r], t[r], n) : e[r] = t[r]);
2623
+ }, Xi = (e, t, n) => {
2624
+ let r = Yi(e, n);
2625
+ return r === void 0 ? Yi(t, n) : r;
2626
+ }, Zi = (e, t, n) => {
2627
+ for (let r in t) r !== "__proto__" && r !== "constructor" && (r in e ? Z(e[r]) || e[r] instanceof String || Z(t[r]) || t[r] instanceof String ? n && (e[r] = t[r]) : Zi(e[r], t[r], n) : e[r] = t[r]);
2554
2628
  return e;
2555
- }, Fi = (e) => e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"), Ii = {
2629
+ }, Qi = (e) => e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"), $i = {
2556
2630
  "&": "&amp;",
2557
2631
  "<": "&lt;",
2558
2632
  ">": "&gt;",
2559
2633
  "\"": "&quot;",
2560
2634
  "'": "&#39;",
2561
2635
  "/": "&#x2F;"
2562
- }, Li = (e) => Z(e) ? e.replace(/[&<>"'\/]/g, (e) => Ii[e]) : e, Ri = class {
2636
+ }, ea = (e) => Z(e) ? e.replace(/[&<>"'\/]/g, (e) => $i[e]) : e, ta = class {
2563
2637
  constructor(e) {
2564
2638
  this.capacity = e, this.regExpMap = /* @__PURE__ */ new Map(), this.regExpQueue = [];
2565
2639
  }
@@ -2569,23 +2643,23 @@ var gi = /<\/?(?:br|p|div|li|h[1-6]|blockquote|pre|tr|td|th)\b[^>]*>/gi, _i = /<
2569
2643
  let n = new RegExp(e);
2570
2644
  return this.regExpQueue.length === this.capacity && this.regExpMap.delete(this.regExpQueue.shift()), this.regExpMap.set(e, n), this.regExpQueue.push(e), n;
2571
2645
  }
2572
- }, zi = [
2646
+ }, na = [
2573
2647
  " ",
2574
2648
  ",",
2575
2649
  "?",
2576
2650
  "!",
2577
2651
  ";"
2578
- ], Bi = new Ri(20), Vi = (e, t, n) => {
2652
+ ], ra = new ta(20), ia = (e, t, n) => {
2579
2653
  t ||= "", n ||= "";
2580
- let r = zi.filter((e) => t.indexOf(e) < 0 && n.indexOf(e) < 0);
2654
+ let r = na.filter((e) => t.indexOf(e) < 0 && n.indexOf(e) < 0);
2581
2655
  if (r.length === 0) return !0;
2582
- let i = Bi.getRegExp(`(${r.map((e) => e === "?" ? "\\?" : e).join("|")})`), a = !i.test(e);
2656
+ let i = ra.getRegExp(`(${r.map((e) => e === "?" ? "\\?" : e).join("|")})`), a = !i.test(e);
2583
2657
  if (!a) {
2584
2658
  let t = e.indexOf(n);
2585
2659
  t > 0 && !i.test(e.substring(0, t)) && (a = !0);
2586
2660
  }
2587
2661
  return a;
2588
- }, Hi = (e, t, n = ".") => {
2662
+ }, aa = (e, t, n = ".") => {
2589
2663
  if (!e) return;
2590
2664
  if (e[t]) return Object.prototype.hasOwnProperty.call(e, t) ? e[t] : void 0;
2591
2665
  let r = t.split(n), i = e;
@@ -2604,7 +2678,7 @@ var gi = /<\/?(?:br|p|div|li|h[1-6]|blockquote|pre|tr|td|th)\b[^>]*>/gi, _i = /<
2604
2678
  i = t;
2605
2679
  }
2606
2680
  return i;
2607
- }, Ui = (e) => e?.replace(/_/g, "-"), Wi = {
2681
+ }, oa = (e) => e?.replace(/_/g, "-"), sa = {
2608
2682
  type: "logger",
2609
2683
  log(e) {
2610
2684
  this.output("log", e);
@@ -2623,7 +2697,7 @@ var gi = /<\/?(?:br|p|div|li|h[1-6]|blockquote|pre|tr|td|th)\b[^>]*>/gi, _i = /<
2623
2697
  this.init(e, t);
2624
2698
  }
2625
2699
  init(e, t = {}) {
2626
- this.prefix = t.prefix || "i18next:", this.logger = e || Wi, this.options = t, this.debug = t.debug;
2700
+ this.prefix = t.prefix || "i18next:", this.logger = e || sa, this.options = t, this.debug = t.debug;
2627
2701
  }
2628
2702
  log(...e) {
2629
2703
  return this.forward(e, "log", "", !0);
@@ -2649,7 +2723,7 @@ var gi = /<\/?(?:br|p|div|li|h[1-6]|blockquote|pre|tr|td|th)\b[^>]*>/gi, _i = /<
2649
2723
  clone(t) {
2650
2724
  return t ||= this.options, t.prefix = t.prefix || this.prefix, new e(this.logger, t);
2651
2725
  }
2652
- }(), Gi = class {
2726
+ }(), ca = class {
2653
2727
  constructor() {
2654
2728
  this.observers = {};
2655
2729
  }
@@ -2676,7 +2750,7 @@ var gi = /<\/?(?:br|p|div|li|h[1-6]|blockquote|pre|tr|td|th)\b[^>]*>/gi, _i = /<
2676
2750
  for (let i = 0; i < r; i++) n.apply(n, [e, ...t]);
2677
2751
  });
2678
2752
  }
2679
- }, Ki = class extends Gi {
2753
+ }, la = class extends ca {
2680
2754
  constructor(e, t = {
2681
2755
  ns: ["translation"],
2682
2756
  defaultNS: "translation"
@@ -2693,12 +2767,12 @@ var gi = /<\/?(?:br|p|div|li|h[1-6]|blockquote|pre|tr|td|th)\b[^>]*>/gi, _i = /<
2693
2767
  getResource(e, t, n, r = {}) {
2694
2768
  let i = r.keySeparator === void 0 ? this.options.keySeparator : r.keySeparator, a = r.ignoreJSONStructure === void 0 ? this.options.ignoreJSONStructure : r.ignoreJSONStructure, o;
2695
2769
  e.indexOf(".") > -1 ? o = e.split(".") : (o = [e, t], n && (Array.isArray(n) ? o.push(...n) : Z(n) && i ? o.push(...n.split(i)) : o.push(n)));
2696
- let s = Mi(this.data, o);
2697
- return !s && !t && !n && e.indexOf(".") > -1 && (e = o[0], t = o[1], n = o.slice(2).join(".")), s || !a || !Z(n) ? s : Hi(this.data?.[e]?.[t], n, i);
2770
+ let s = Yi(this.data, o);
2771
+ return !s && !t && !n && e.indexOf(".") > -1 && (e = o[0], t = o[1], n = o.slice(2).join(".")), s || !a || !Z(n) ? s : aa(this.data?.[e]?.[t], n, i);
2698
2772
  }
2699
2773
  addResource(e, t, n, r, i = { silent: !1 }) {
2700
2774
  let a = i.keySeparator === void 0 ? this.options.keySeparator : i.keySeparator, o = [e, t];
2701
- n && (o = o.concat(a ? n.split(a) : n)), e.indexOf(".") > -1 && (o = e.split("."), r = t, t = o[1]), this.addNamespaces(t), Ai(this.data, o, r), i.silent || this.emit("added", e, t, n, r);
2775
+ n && (o = o.concat(a ? n.split(a) : n)), e.indexOf(".") > -1 && (o = e.split("."), r = t, t = o[1]), this.addNamespaces(t), qi(this.data, o, r), i.silent || this.emit("added", e, t, n, r);
2702
2776
  }
2703
2777
  addResources(e, t, n, r = { silent: !1 }) {
2704
2778
  for (let r in n) (Z(n[r]) || Array.isArray(n[r])) && this.addResource(e, t, r, n[r], { silent: !0 });
@@ -2710,11 +2784,11 @@ var gi = /<\/?(?:br|p|div|li|h[1-6]|blockquote|pre|tr|td|th)\b[^>]*>/gi, _i = /<
2710
2784
  }) {
2711
2785
  let o = [e, t];
2712
2786
  e.indexOf(".") > -1 && (o = e.split("."), r = n, n = t, t = o[1]), this.addNamespaces(t);
2713
- let s = Mi(this.data, o) || {};
2714
- a.skipCopy || (n = JSON.parse(JSON.stringify(n))), r ? Pi(s, n, i) : s = {
2787
+ let s = Yi(this.data, o) || {};
2788
+ a.skipCopy || (n = JSON.parse(JSON.stringify(n))), r ? Zi(s, n, i) : s = {
2715
2789
  ...s,
2716
2790
  ...n
2717
- }, Ai(this.data, o, s), a.silent || this.emit("added", e, t, n);
2791
+ }, qi(this.data, o, s), a.silent || this.emit("added", e, t, n);
2718
2792
  }
2719
2793
  removeResourceBundle(e, t) {
2720
2794
  this.hasResourceBundle(e, t) && delete this.data[e][t], this.removeNamespaces(t), this.emit("removed", e, t);
@@ -2735,7 +2809,7 @@ var gi = /<\/?(?:br|p|div|li|h[1-6]|blockquote|pre|tr|td|th)\b[^>]*>/gi, _i = /<
2735
2809
  toJSON() {
2736
2810
  return this.data;
2737
2811
  }
2738
- }, qi = {
2812
+ }, ua = {
2739
2813
  processors: {},
2740
2814
  addPostProcessor(e) {
2741
2815
  this.processors[e.name] = e;
@@ -2745,22 +2819,22 @@ var gi = /<\/?(?:br|p|div|li|h[1-6]|blockquote|pre|tr|td|th)\b[^>]*>/gi, _i = /<
2745
2819
  t = this.processors[e]?.process(t, n, r, i) ?? t;
2746
2820
  }), t;
2747
2821
  }
2748
- }, Ji = Symbol("i18next/PATH_KEY");
2749
- function Yi() {
2822
+ }, da = Symbol("i18next/PATH_KEY");
2823
+ function fa() {
2750
2824
  let e = [], t = Object.create(null), n;
2751
- return t.get = (r, i) => (n?.revoke?.(), i === Ji ? e : (e.push(i), n = Proxy.revocable(r, t), n.proxy)), Proxy.revocable(Object.create(null), t).proxy;
2825
+ return t.get = (r, i) => (n?.revoke?.(), i === da ? e : (e.push(i), n = Proxy.revocable(r, t), n.proxy)), Proxy.revocable(Object.create(null), t).proxy;
2752
2826
  }
2753
- function Xi(e, t) {
2754
- let { [Ji]: n } = e(Yi()), r = t?.keySeparator ?? ".", i = t?.nsSeparator ?? ":";
2827
+ function pa(e, t) {
2828
+ let { [da]: n } = e(fa()), r = t?.keySeparator ?? ".", i = t?.nsSeparator ?? ":";
2755
2829
  if (n.length > 1 && i) {
2756
2830
  let e = t?.ns, a = Array.isArray(e) ? e : null;
2757
2831
  if (a && a.length > 1 && a.slice(1).includes(n[0])) return `${n[0]}${i}${n.slice(1).join(r)}`;
2758
2832
  }
2759
2833
  return n.join(r);
2760
2834
  }
2761
- var Zi = {}, Qi = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number", $i = class e extends Gi {
2835
+ var ma = {}, ha = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number", ga = class e extends ca {
2762
2836
  constructor(e, t = {}) {
2763
- super(), Ti([
2837
+ super(), Hi([
2764
2838
  "resourceStore",
2765
2839
  "languageUtils",
2766
2840
  "pluralResolver",
@@ -2778,13 +2852,13 @@ var Zi = {}, Qi = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
2778
2852
  if (e == null) return !1;
2779
2853
  let r = this.resolve(e, n);
2780
2854
  if (r?.res === void 0) return !1;
2781
- let i = Qi(r.res);
2855
+ let i = ha(r.res);
2782
2856
  return !(n.returnObjects === !1 && i);
2783
2857
  }
2784
2858
  extractFromKey(e, t) {
2785
2859
  let n = t.nsSeparator === void 0 ? this.options.nsSeparator : t.nsSeparator;
2786
2860
  n === void 0 && (n = ":");
2787
- 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 && !Vi(e, n, r);
2861
+ 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 && !ia(e, n, r);
2788
2862
  if (a && !o) {
2789
2863
  let t = e.match(this.interpolator.nestingRegexp);
2790
2864
  if (t && t.length > 0) return {
@@ -2802,10 +2876,10 @@ var Zi = {}, Qi = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
2802
2876
  translate(t, n, r) {
2803
2877
  let i = typeof n == "object" ? { ...n } : n;
2804
2878
  if (typeof i != "object" && this.options.overloadTranslationOptionHandler && (i = this.options.overloadTranslationOptionHandler(arguments)), typeof i == "object" && (i = { ...i }), i ||= {}, t == null) return "";
2805
- typeof t == "function" && (t = Xi(t, {
2879
+ typeof t == "function" && (t = pa(t, {
2806
2880
  ...this.options,
2807
2881
  ...i
2808
- })), Array.isArray(t) || (t = [String(t)]), t = t.map((e) => typeof e == "function" ? Xi(e, {
2882
+ })), Array.isArray(t) || (t = [String(t)]), t = t.map((e) => typeof e == "function" ? pa(e, {
2809
2883
  ...this.options,
2810
2884
  ...i
2811
2885
  }) : String(e));
@@ -2833,7 +2907,7 @@ var Zi = {}, Qi = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
2833
2907
  "[object RegExp]"
2834
2908
  ], _ = i.joinArrays === void 0 ? this.options.joinArrays : i.joinArrays, v = !this.i18nFormat || this.i18nFormat.handleAsObject, y = i.count !== void 0 && !Z(i.count), b = e.hasDefaultValue(i), te = y ? this.pluralResolver.getSuffix(d, i.count, i) : "", ne = i.ordinal && y ? this.pluralResolver.getSuffix(d, i.count, { ordinal: !1 }) : "", re = y && !i.ordinal && i.count === 0, x = re && i[`defaultValue${this.options.pluralSeparator}zero`] || i[`defaultValue${te}`] || i[`defaultValue${ne}`] || i.defaultValue, S = m;
2835
2909
  v && !m && b && (S = x);
2836
- let ie = Qi(S), ae = Object.prototype.toString.apply(S);
2910
+ let ie = ha(S), ae = Object.prototype.toString.apply(S);
2837
2911
  if (v && S && ie && ee.indexOf(ae) < 0 && !(Z(_) && Array.isArray(S))) {
2838
2912
  if (!i.returnObjects && !this.options.returnObjects) {
2839
2913
  this.options.returnedObjectHandler || this.logger.warn("accessing an object - but returnObjects options is not enabled!");
@@ -2849,7 +2923,7 @@ var Zi = {}, Qi = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
2849
2923
  let r = `${n}${o}${e}`;
2850
2924
  b && !m ? t[e] = this.translate(r, {
2851
2925
  ...i,
2852
- defaultValue: Qi(x) ? x[e] : void 0,
2926
+ defaultValue: ha(x) ? x[e] : void 0,
2853
2927
  joinArrays: !1,
2854
2928
  ns: c
2855
2929
  }) : t[e] = this.translate(r, {
@@ -2920,7 +2994,7 @@ var Zi = {}, Qi = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
2920
2994
  !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();
2921
2995
  }
2922
2996
  let a = n.postProcess || this.options.postProcess, o = Z(a) ? [a] : a;
2923
- return e != null && o?.length && n.applyPostProcessor !== !1 && (e = qi.handle(o, e, t, this.options && this.options.postProcessPassResolved ? {
2997
+ return e != null && o?.length && n.applyPostProcessor !== !1 && (e = ua.handle(o, e, t, this.options && this.options.postProcessPassResolved ? {
2924
2998
  i18nResolved: {
2925
2999
  ...r,
2926
3000
  usedParams: this.getUsedParamsDetails(n)
@@ -2930,7 +3004,7 @@ var Zi = {}, Qi = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
2930
3004
  }
2931
3005
  resolve(e, t = {}) {
2932
3006
  let n, r, i, a, o;
2933
- return Z(e) && (e = [e]), Array.isArray(e) && (e = e.map((e) => typeof e == "function" ? Xi(e, {
3007
+ return Z(e) && (e = [e]), Array.isArray(e) && (e = e.map((e) => typeof e == "function" ? pa(e, {
2934
3008
  ...this.options,
2935
3009
  ...t
2936
3010
  }) : e)), e.forEach((e) => {
@@ -2941,7 +3015,7 @@ var Zi = {}, Qi = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
2941
3015
  this.options.fallbackNS && (l = l.concat(this.options.fallbackNS));
2942
3016
  let u = t.count !== void 0 && !Z(t.count), d = u && !t.ordinal && t.count === 0, f = t.context !== void 0 && (Z(t.context) || typeof t.context == "number") && t.context !== "", p = t.lngs ? t.lngs : this.languageUtils.toResolveHierarchy(t.lng || this.language, t.fallbackLng);
2943
3017
  l.forEach((e) => {
2944
- this.isValidLookup(n) || (o = e, !Zi[`${p[0]}-${e}`] && this.utils?.hasLoadedNamespace && !this.utils?.hasLoadedNamespace(o) && (Zi[`${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) => {
3018
+ this.isValidLookup(n) || (o = e, !ma[`${p[0]}-${e}`] && this.utils?.hasLoadedNamespace && !this.utils?.hasLoadedNamespace(o) && (ma[`${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) => {
2945
3019
  if (this.isValidLookup(n)) return;
2946
3020
  a = r;
2947
3021
  let o = [c];
@@ -3004,17 +3078,17 @@ var Zi = {}, Qi = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
3004
3078
  for (let t in e) if (Object.prototype.hasOwnProperty.call(e, t) && t.substring(0, 12) === "defaultValue" && e[t] !== void 0) return !0;
3005
3079
  return !1;
3006
3080
  }
3007
- }, ea = class {
3081
+ }, _a = class {
3008
3082
  constructor(e) {
3009
3083
  this.options = e, this.supportedLngs = this.options.supportedLngs || !1, this.logger = Q.create("languageUtils");
3010
3084
  }
3011
3085
  getScriptPartFromCode(e) {
3012
- if (e = Ui(e), !e || e.indexOf("-") < 0) return null;
3086
+ if (e = oa(e), !e || e.indexOf("-") < 0) return null;
3013
3087
  let t = e.split("-");
3014
3088
  return t.length === 2 || (t.pop(), t[t.length - 1].toLowerCase() === "x") ? null : this.formatLanguageCode(t.join("-"));
3015
3089
  }
3016
3090
  getLanguagePartFromCode(e) {
3017
- if (e = Ui(e), !e || e.indexOf("-") < 0) return e;
3091
+ if (e = oa(e), !e || e.indexOf("-") < 0) return e;
3018
3092
  let t = e.split("-");
3019
3093
  return this.formatLanguageCode(t[0]);
3020
3094
  }
@@ -3064,17 +3138,17 @@ var Zi = {}, Qi = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
3064
3138
  r.indexOf(e) < 0 && i(this.formatLanguageCode(e));
3065
3139
  }), r;
3066
3140
  }
3067
- }, ta = {
3141
+ }, va = {
3068
3142
  zero: 0,
3069
3143
  one: 1,
3070
3144
  two: 2,
3071
3145
  few: 3,
3072
3146
  many: 4,
3073
3147
  other: 5
3074
- }, na = {
3148
+ }, ya = {
3075
3149
  select: (e) => e === 1 ? "one" : "other",
3076
3150
  resolvedOptions: () => ({ pluralCategories: ["one", "other"] })
3077
- }, ra = class {
3151
+ }, ba = class {
3078
3152
  constructor(e, t = {}) {
3079
3153
  this.languageUtils = e, this.options = t, this.logger = Q.create("pluralResolver"), this.pluralRulesCache = {};
3080
3154
  }
@@ -3082,7 +3156,7 @@ var Zi = {}, Qi = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
3082
3156
  this.pluralRulesCache = {};
3083
3157
  }
3084
3158
  getRule(e, t = {}) {
3085
- let n = Ui(e === "dev" ? "en" : e), r = t.ordinal ? "ordinal" : "cardinal", i = JSON.stringify({
3159
+ let n = oa(e === "dev" ? "en" : e), r = t.ordinal ? "ordinal" : "cardinal", i = JSON.stringify({
3086
3160
  cleanedCode: n,
3087
3161
  type: r
3088
3162
  });
@@ -3091,8 +3165,8 @@ var Zi = {}, Qi = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
3091
3165
  try {
3092
3166
  a = new Intl.PluralRules(n, { type: r });
3093
3167
  } catch {
3094
- if (typeof Intl > "u") return this.logger.error("No Intl support, please use an Intl polyfill!"), na;
3095
- if (!e.match(/-|_/)) return na;
3168
+ if (typeof Intl > "u") return this.logger.error("No Intl support, please use an Intl polyfill!"), ya;
3169
+ if (!e.match(/-|_/)) return ya;
3096
3170
  let n = this.languageUtils.getLanguagePartFromCode(e);
3097
3171
  a = this.getRule(n, t);
3098
3172
  }
@@ -3107,23 +3181,23 @@ var Zi = {}, Qi = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
3107
3181
  }
3108
3182
  getSuffixes(e, t = {}) {
3109
3183
  let n = this.getRule(e, t);
3110
- return n ||= this.getRule("dev", t), n ? n.resolvedOptions().pluralCategories.sort((e, t) => ta[e] - ta[t]).map((e) => `${this.options.prepend}${t.ordinal ? `ordinal${this.options.prepend}` : ""}${e}`) : [];
3184
+ return n ||= this.getRule("dev", t), n ? n.resolvedOptions().pluralCategories.sort((e, t) => va[e] - va[t]).map((e) => `${this.options.prepend}${t.ordinal ? `ordinal${this.options.prepend}` : ""}${e}`) : [];
3111
3185
  }
3112
3186
  getSuffix(e, t, n = {}) {
3113
3187
  let r = this.getRule(e, n);
3114
3188
  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));
3115
3189
  }
3116
- }, ia = (e, t, n, r = ".", i = !0) => {
3117
- let a = Ni(e, t, n);
3118
- return !a && i && Z(n) && (a = Hi(e, n, r), a === void 0 && (a = Hi(t, n, r))), a;
3119
- }, aa = (e) => e.replace(/\$/g, "$$$$"), oa = class {
3190
+ }, xa = (e, t, n, r = ".", i = !0) => {
3191
+ let a = Xi(e, t, n);
3192
+ return !a && i && Z(n) && (a = aa(e, n, r), a === void 0 && (a = aa(t, n, r))), a;
3193
+ }, Sa = (e) => e.replace(/\$/g, "$$$$"), Ca = class {
3120
3194
  constructor(e = {}) {
3121
3195
  this.logger = Q.create("interpolator"), this.options = e, this.format = e?.interpolation?.format || ((e) => e), this.init(e);
3122
3196
  }
3123
3197
  init(e = {}) {
3124
3198
  e.interpolation ||= { escapeValue: !0 };
3125
3199
  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: ee } = e.interpolation;
3126
- this.escape = t === void 0 ? Li : t, this.escapeValue = n === void 0 || n, this.useRawValueToEscape = r !== void 0 && r, this.prefix = i ? Fi(i) : a || "{{", this.suffix = o ? Fi(o) : s || "}}", this.formatSeparator = c || ",", this.unescapePrefix = l ? "" : u || "-", this.unescapeSuffix = this.unescapePrefix ? "" : l || "", this.nestingPrefix = d ? Fi(d) : f || Fi("$t("), this.nestingSuffix = p ? Fi(p) : m || Fi(")"), this.nestingOptionsSeparator = h || ",", this.maxReplaces = g || 1e3, this.alwaysFormat = ee !== void 0 && ee, this.resetRegExp();
3200
+ this.escape = t === void 0 ? ea : t, this.escapeValue = n === void 0 || n, this.useRawValueToEscape = r !== void 0 && r, this.prefix = i ? Qi(i) : a || "{{", this.suffix = o ? Qi(o) : s || "}}", this.formatSeparator = c || ",", this.unescapePrefix = l ? "" : u || "-", this.unescapeSuffix = this.unescapePrefix ? "" : l || "", this.nestingPrefix = d ? Qi(d) : f || Qi("$t("), this.nestingSuffix = p ? Qi(p) : m || Qi(")"), this.nestingOptionsSeparator = h || ",", this.maxReplaces = g || 1e3, this.alwaysFormat = ee !== void 0 && ee, this.resetRegExp();
3127
3201
  }
3128
3202
  reset() {
3129
3203
  this.options && this.init(this.options);
@@ -3135,7 +3209,7 @@ var Zi = {}, Qi = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
3135
3209
  interpolate(e, t, n, r) {
3136
3210
  let i, a, o, s = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {}, c = (e) => {
3137
3211
  if (e.indexOf(this.formatSeparator) < 0) {
3138
- let i = ia(t, s, e, this.options.keySeparator, this.options.ignoreJSONStructure);
3212
+ let i = xa(t, s, e, this.options.keySeparator, this.options.ignoreJSONStructure);
3139
3213
  return this.alwaysFormat ? this.format(i, void 0, n, {
3140
3214
  ...r,
3141
3215
  ...t,
@@ -3143,7 +3217,7 @@ var Zi = {}, Qi = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
3143
3217
  }) : i;
3144
3218
  }
3145
3219
  let i = e.split(this.formatSeparator), a = i.shift().trim(), o = i.join(this.formatSeparator).trim();
3146
- return this.format(ia(t, s, a, this.options.keySeparator, this.options.ignoreJSONStructure), o, n, {
3220
+ return this.format(xa(t, s, a, this.options.keySeparator, this.options.ignoreJSONStructure), o, n, {
3147
3221
  ...r,
3148
3222
  ...t,
3149
3223
  interpolationkey: a
@@ -3153,10 +3227,10 @@ var Zi = {}, Qi = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
3153
3227
  let l = r?.missingInterpolationHandler || this.options.missingInterpolationHandler, u = r?.interpolation?.skipOnVariables === void 0 ? this.options.interpolation.skipOnVariables : r.interpolation.skipOnVariables;
3154
3228
  return [{
3155
3229
  regex: this.regexpUnescape,
3156
- safeValue: (e) => aa(e)
3230
+ safeValue: (e) => Sa(e)
3157
3231
  }, {
3158
3232
  regex: this.regexp,
3159
- safeValue: (e) => this.escapeValue ? aa(this.escape(e)) : aa(e)
3233
+ safeValue: (e) => this.escapeValue ? Sa(this.escape(e)) : Sa(e)
3160
3234
  }].forEach((t) => {
3161
3235
  for (o = 0; i = t.regex.exec(e);) {
3162
3236
  let n = i[1].trim();
@@ -3168,7 +3242,7 @@ var Zi = {}, Qi = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
3168
3242
  a = i[0];
3169
3243
  continue;
3170
3244
  } else this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`), a = "";
3171
- else !Z(a) && !this.useRawValueToEscape && (a = wi(a));
3245
+ else !Z(a) && !this.useRawValueToEscape && (a = Vi(a));
3172
3246
  let s = t.safeValue(a);
3173
3247
  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;
3174
3248
  }
@@ -3178,7 +3252,7 @@ var Zi = {}, Qi = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
3178
3252
  let r, i, a, o = (e, t) => {
3179
3253
  let n = this.nestingOptionsSeparator;
3180
3254
  if (e.indexOf(n) < 0) return e;
3181
- let r = e.split(RegExp(`${Fi(n)}[ ]*{`)), i = `{${r[1]}`;
3255
+ let r = e.split(RegExp(`${Qi(n)}[ ]*{`)), i = `{${r[1]}`;
3182
3256
  e = r[0], i = this.interpolate(i, a);
3183
3257
  let o = i.match(/'/g), s = i.match(/"/g);
3184
3258
  ((o?.length ?? 0) % 2 == 0 && !s || (s?.length ?? 0) % 2 != 0) && (i = i.replace(/'/g, "\""));
@@ -3197,14 +3271,14 @@ var Zi = {}, Qi = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
3197
3271
  a = { ...n }, a = a.replace && !Z(a.replace) ? a.replace : a, a.applyPostProcessor = !1, delete a.defaultValue;
3198
3272
  let c = /{.*}/.test(r[1]) ? r[1].lastIndexOf("}") + 1 : r[1].indexOf(this.formatSeparator);
3199
3273
  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 && !Z(i)) return i;
3200
- Z(i) || (i = wi(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, {
3274
+ Z(i) || (i = Vi(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, {
3201
3275
  ...n,
3202
3276
  interpolationkey: r[1].trim()
3203
3277
  }), i.trim())), e = e.replace(r[0], i), this.regexp.lastIndex = 0;
3204
3278
  }
3205
3279
  return e;
3206
3280
  }
3207
- }, sa = (e) => {
3281
+ }, wa = (e) => {
3208
3282
  let t = e.toLowerCase().trim(), n = {};
3209
3283
  if (e.indexOf("(") > -1) {
3210
3284
  let r = e.split("(");
@@ -3221,7 +3295,7 @@ var Zi = {}, Qi = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
3221
3295
  formatName: t,
3222
3296
  formatOptions: n
3223
3297
  };
3224
- }, ca = (e) => {
3298
+ }, Ta = (e) => {
3225
3299
  let t = {};
3226
3300
  return (n, r, i) => {
3227
3301
  let a = i;
@@ -3230,15 +3304,15 @@ var Zi = {}, Qi = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
3230
3304
  [i.interpolationkey]: void 0
3231
3305
  });
3232
3306
  let o = r + JSON.stringify(a), s = t[o];
3233
- return s || (s = e(Ui(r), i), t[o] = s), s(n);
3307
+ return s || (s = e(oa(r), i), t[o] = s), s(n);
3234
3308
  };
3235
- }, la = (e) => (t, n, r) => e(Ui(n), r)(t), ua = class {
3309
+ }, Ea = (e) => (t, n, r) => e(oa(n), r)(t), Da = class {
3236
3310
  constructor(e = {}) {
3237
3311
  this.logger = Q.create("formatter"), this.options = e, this.init(e);
3238
3312
  }
3239
3313
  init(e, t = { interpolation: {} }) {
3240
3314
  this.formatSeparator = t.interpolation.formatSeparator || ",";
3241
- let n = t.cacheInBuiltFormats ? ca : la;
3315
+ let n = t.cacheInBuiltFormats ? Ta : Ea;
3242
3316
  this.formats = {
3243
3317
  number: n((e, t) => {
3244
3318
  let n = new Intl.NumberFormat(e, { ...t });
@@ -3269,7 +3343,7 @@ var Zi = {}, Qi = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
3269
3343
  this.formats[e.toLowerCase().trim()] = t;
3270
3344
  }
3271
3345
  addCached(e, t) {
3272
- this.formats[e.toLowerCase().trim()] = ca(t);
3346
+ this.formats[e.toLowerCase().trim()] = Ta(t);
3273
3347
  }
3274
3348
  format(e, t, n, r = {}) {
3275
3349
  let i = t.split(this.formatSeparator);
@@ -3278,7 +3352,7 @@ var Zi = {}, Qi = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
3278
3352
  i[0] = [i[0], ...i.splice(1, e)].join(this.formatSeparator);
3279
3353
  }
3280
3354
  return i.reduce((e, t) => {
3281
- let { formatName: i, formatOptions: a } = sa(t);
3355
+ let { formatName: i, formatOptions: a } = wa(t);
3282
3356
  if (this.formats[i]) {
3283
3357
  let t = e;
3284
3358
  try {
@@ -3296,9 +3370,9 @@ var Zi = {}, Qi = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
3296
3370
  return e;
3297
3371
  }, e);
3298
3372
  }
3299
- }, da = (e, t) => {
3373
+ }, Oa = (e, t) => {
3300
3374
  e.pending[t] !== void 0 && (delete e.pending[t], e.pendingCount--);
3301
- }, fa = class extends Gi {
3375
+ }, ka = class extends ca {
3302
3376
  constructor(e, t, n, r = {}) {
3303
3377
  super(), this.backend = e, this.store = t, this.services = n, this.languageUtils = n.languageUtils, this.options = r, this.logger = Q.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);
3304
3378
  }
@@ -3328,7 +3402,7 @@ var Zi = {}, Qi = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
3328
3402
  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);
3329
3403
  let o = {};
3330
3404
  this.queue.forEach((n) => {
3331
- ji(n.loaded, [i], a), da(n, e), t && n.errors.push(t), n.pendingCount === 0 && !n.done && (Object.keys(n.loaded).forEach((e) => {
3405
+ Ji(n.loaded, [i], a), Oa(n, e), t && n.errors.push(t), n.pendingCount === 0 && !n.done && (Object.keys(n.loaded).forEach((e) => {
3332
3406
  o[e] || (o[e] = {});
3333
3407
  let t = n.loaded[e];
3334
3408
  t.length && t.forEach((t) => {
@@ -3418,7 +3492,7 @@ var Zi = {}, Qi = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
3418
3492
  !e || !e[0] || this.store.addResource(e[0], t, n, r);
3419
3493
  }
3420
3494
  }
3421
- }, pa = () => ({
3495
+ }, Aa = () => ({
3422
3496
  debug: !1,
3423
3497
  initAsync: !0,
3424
3498
  ns: ["translation"],
@@ -3475,15 +3549,15 @@ var Zi = {}, Qi = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
3475
3549
  skipOnVariables: !0
3476
3550
  },
3477
3551
  cacheInBuiltFormats: !0
3478
- }), ma = (e) => (Z(e.ns) && (e.ns = [e.ns]), Z(e.fallbackLng) && (e.fallbackLng = [e.fallbackLng]), Z(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), ha = () => {}, ga = (e) => {
3552
+ }), ja = (e) => (Z(e.ns) && (e.ns = [e.ns]), Z(e.fallbackLng) && (e.fallbackLng = [e.fallbackLng]), Z(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), Ma = () => {}, Na = (e) => {
3479
3553
  Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach((t) => {
3480
3554
  typeof e[t] == "function" && (e[t] = e[t].bind(e));
3481
3555
  });
3482
- }, _a = "__i18next_supportNoticeShown", va = () => !!(typeof globalThis < "u" && globalThis[_a] || typeof process < "u" && process.env && process.env.I18NEXT_NO_SUPPORT_NOTICE || typeof process < "u" && process.env), ya = () => {
3483
- typeof globalThis < "u" && (globalThis[_a] = !0);
3484
- }, ba = (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)), $ = class e extends Gi {
3556
+ }, Pa = "__i18next_supportNoticeShown", Fa = () => !!(typeof globalThis < "u" && globalThis[Pa] || typeof process < "u" && process.env && process.env.I18NEXT_NO_SUPPORT_NOTICE || typeof process < "u" && process.env), Ia = () => {
3557
+ typeof globalThis < "u" && (globalThis[Pa] = !0);
3558
+ }, La = (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)), $ = class e extends ca {
3485
3559
  constructor(e = {}, t) {
3486
- if (super(), this.options = ma(e), this.services = {}, this.logger = Q, this.modules = { external: [] }, ga(this), t && !this.isInitialized && !e.isClone) {
3560
+ if (super(), this.options = ja(e), this.services = {}, this.logger = Q, this.modules = { external: [] }, Na(this), t && !this.isInitialized && !e.isClone) {
3487
3561
  if (!this.options.initAsync) return this.init(e, t), this;
3488
3562
  setTimeout(() => {
3489
3563
  this.init(e, t);
@@ -3492,35 +3566,35 @@ var Zi = {}, Qi = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
3492
3566
  }
3493
3567
  init(e = {}, t) {
3494
3568
  this.isInitializing = !0, typeof e == "function" && (t = e, e = {}), e.defaultNS == null && e.ns && (Z(e.ns) ? e.defaultNS = e.ns : e.ns.indexOf("translation") < 0 && (e.defaultNS = e.ns[0]));
3495
- let n = pa();
3569
+ let n = Aa();
3496
3570
  this.options = {
3497
3571
  ...n,
3498
3572
  ...this.options,
3499
- ...ma(e)
3573
+ ...ja(e)
3500
3574
  }, this.options.interpolation = {
3501
3575
  ...n.interpolation,
3502
3576
  ...this.options.interpolation
3503
- }, 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 && !ba(this) && !va() && (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 💙"), ya());
3577
+ }, 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 && !La(this) && !Fa() && (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 💙"), Ia());
3504
3578
  let r = (e) => e ? typeof e == "function" ? new e() : e : null;
3505
3579
  if (!this.options.isClone) {
3506
3580
  this.modules.logger ? Q.init(r(this.modules.logger), this.options) : Q.init(null, this.options);
3507
3581
  let e;
3508
- e = this.modules.formatter ? this.modules.formatter : ua;
3509
- let t = new ea(this.options);
3510
- this.store = new Ki(this.options.resources, this.options);
3582
+ e = this.modules.formatter ? this.modules.formatter : Da;
3583
+ let t = new _a(this.options);
3584
+ this.store = new la(this.options.resources, this.options);
3511
3585
  let i = this.services;
3512
- i.logger = Q, i.resourceStore = this.store, i.languageUtils = t, i.pluralResolver = new ra(t, {
3586
+ i.logger = Q, i.resourceStore = this.store, i.languageUtils = t, i.pluralResolver = new ba(t, {
3513
3587
  prepend: this.options.pluralSeparator,
3514
3588
  simplifyPluralSuffix: this.options.simplifyPluralSuffix
3515
- }), 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 oa(this.options), i.utils = { hasLoadedNamespace: this.hasLoadedNamespace.bind(this) }, i.backendConnector = new fa(r(this.modules.backend), i.resourceStore, i, this.options), i.backendConnector.on("*", (e, ...t) => {
3589
+ }), 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 Ca(this.options), i.utils = { hasLoadedNamespace: this.hasLoadedNamespace.bind(this) }, i.backendConnector = new ka(r(this.modules.backend), i.resourceStore, i, this.options), i.backendConnector.on("*", (e, ...t) => {
3516
3590
  this.emit(e, ...t);
3517
- }), 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 $i(this.services, this.options), this.translator.on("*", (e, ...t) => {
3591
+ }), 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 ga(this.services, this.options), this.translator.on("*", (e, ...t) => {
3518
3592
  this.emit(e, ...t);
3519
3593
  }), this.modules.external.forEach((e) => {
3520
3594
  e.init && e.init(this);
3521
3595
  });
3522
3596
  }
3523
- if (this.format = this.options.interpolation.format, t ||= ha, this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
3597
+ if (this.format = this.options.interpolation.format, t ||= Ma, this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
3524
3598
  let e = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);
3525
3599
  e.length > 0 && e[0] !== "dev" && (this.options.lng = e[0]);
3526
3600
  }
@@ -3539,7 +3613,7 @@ var Zi = {}, Qi = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
3539
3613
  ].forEach((e) => {
3540
3614
  this[e] = (...t) => (this.store[e](...t), this);
3541
3615
  });
3542
- let i = Ci(), a = () => {
3616
+ let i = Bi(), a = () => {
3543
3617
  let e = (e, n) => {
3544
3618
  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);
3545
3619
  };
@@ -3548,7 +3622,7 @@ var Zi = {}, Qi = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
3548
3622
  };
3549
3623
  return this.options.resources || !this.options.initAsync ? a() : setTimeout(a, 0), i;
3550
3624
  }
3551
- loadResources(e, t = ha) {
3625
+ loadResources(e, t = Ma) {
3552
3626
  let n = t, r = Z(e) ? e : this.language;
3553
3627
  if (typeof e == "function" && (n = e), !this.options.resources || this.options.partialBundledLanguages) {
3554
3628
  if (r?.toLowerCase() === "cimode" && (!this.options.preload || this.options.preload.length === 0)) return n();
@@ -3563,15 +3637,15 @@ var Zi = {}, Qi = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
3563
3637
  } else n(null);
3564
3638
  }
3565
3639
  reloadResources(e, t, n) {
3566
- let r = Ci();
3567
- 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 ||= ha, this.services.backendConnector.reload(e, t, (e) => {
3640
+ let r = Bi();
3641
+ 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 ||= Ma, this.services.backendConnector.reload(e, t, (e) => {
3568
3642
  r.resolve(), n(e);
3569
3643
  }), r;
3570
3644
  }
3571
3645
  use(e) {
3572
3646
  if (!e) throw Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");
3573
3647
  if (!e.type) throw Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");
3574
- 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" && qi.addPostProcessor(e), e.type === "formatter" && (this.modules.formatter = e), e.type === "3rdParty" && this.modules.external.push(e), this;
3648
+ 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" && ua.addPostProcessor(e), e.type === "formatter" && (this.modules.formatter = e), e.type === "3rdParty" && this.modules.external.push(e), this;
3575
3649
  }
3576
3650
  setResolvedLanguage(e) {
3577
3651
  if (!(!e || !this.languages) && !(["cimode", "dev"].indexOf(e) > -1)) {
@@ -3587,7 +3661,7 @@ var Zi = {}, Qi = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
3587
3661
  }
3588
3662
  changeLanguage(e, t) {
3589
3663
  this.isLanguageChangingTo = e;
3590
- let n = Ci();
3664
+ let n = Bi();
3591
3665
  this.emit("languageChanging", e);
3592
3666
  let r = (e) => {
3593
3667
  this.language = e, this.languages = this.services.languageUtils.toResolveHierarchy(e), this.resolvedLanguage = void 0, this.setResolvedLanguage(e);
@@ -3610,9 +3684,9 @@ var Zi = {}, Qi = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
3610
3684
  ...this.options,
3611
3685
  ...a
3612
3686
  };
3613
- typeof a.keyPrefix == "function" && (a.keyPrefix = Xi(a.keyPrefix, o));
3687
+ typeof a.keyPrefix == "function" && (a.keyPrefix = pa(a.keyPrefix, o));
3614
3688
  let s = this.options.keySeparator || ".", c;
3615
- return a.keyPrefix && Array.isArray(e) ? c = e.map((e) => (typeof e == "function" && (e = Xi(e, o)), `${a.keyPrefix}${s}${e}`)) : (typeof e == "function" && (e = Xi(e, o)), c = a.keyPrefix ? `${a.keyPrefix}${s}${e}` : e), this.t(c, a);
3689
+ return a.keyPrefix && Array.isArray(e) ? c = e.map((e) => (typeof e == "function" && (e = pa(e, o)), `${a.keyPrefix}${s}${e}`)) : (typeof e == "function" && (e = pa(e, o)), c = a.keyPrefix ? `${a.keyPrefix}${s}${e}` : e), this.t(c, a);
3616
3690
  };
3617
3691
  return Z(e) ? r.lng = e : r.lngs = e, r.ns = t, r.keyPrefix = n, r;
3618
3692
  }
@@ -3641,7 +3715,7 @@ var Zi = {}, Qi = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
3641
3715
  return !!(this.hasResourceBundle(n, e) || !this.services.backendConnector.backend || this.options.resources && !this.options.partialBundledLanguages || a(n, e) && (!r || a(i, e)));
3642
3716
  }
3643
3717
  loadNamespaces(e, t) {
3644
- let n = Ci();
3718
+ let n = Bi();
3645
3719
  return this.options.ns ? (Z(e) && (e = [e]), e.forEach((e) => {
3646
3720
  this.options.ns.indexOf(e) < 0 && this.options.ns.push(e);
3647
3721
  }), this.loadResources((e) => {
@@ -3649,7 +3723,7 @@ var Zi = {}, Qi = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
3649
3723
  }), n) : (t && t(), Promise.resolve());
3650
3724
  }
3651
3725
  loadLanguages(e, t) {
3652
- let n = Ci();
3726
+ let n = Bi();
3653
3727
  Z(e) && (e = [e]);
3654
3728
  let r = this.options.preload || [], i = e.filter((e) => r.indexOf(e) < 0 && this.services.languageUtils.isSupportedCode(e));
3655
3729
  return i.length ? (this.options.preload = r.concat(i), this.loadResources((e) => {
@@ -3665,14 +3739,14 @@ var Zi = {}, Qi = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
3665
3739
  if (e && e.direction) return e.direction;
3666
3740
  }
3667
3741
  } catch {}
3668
- 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 ea(pa());
3742
+ 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 _a(Aa());
3669
3743
  return e.toLowerCase().indexOf("-latn") > 1 ? "ltr" : t.indexOf(n.getLanguagePartFromCode(e)) > -1 || e.toLowerCase().indexOf("-arab") > 1 ? "rtl" : "ltr";
3670
3744
  }
3671
3745
  static createInstance(t = {}, n) {
3672
3746
  let r = new e(t, n);
3673
3747
  return r.createInstance = e.createInstance, r;
3674
3748
  }
3675
- cloneInstance(t = {}, n = ha) {
3749
+ cloneInstance(t = {}, n = Ma) {
3676
3750
  let r = t.forkResourceStore;
3677
3751
  r && delete t.forkResourceStore;
3678
3752
  let i = {
@@ -3686,18 +3760,18 @@ var Zi = {}, Qi = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
3686
3760
  "language"
3687
3761
  ].forEach((e) => {
3688
3762
  a[e] = this[e];
3689
- }), a.services = { ...this.services }, a.services.utils = { hasLoadedNamespace: a.hasLoadedNamespace.bind(a) }, r && (a.store = new Ki(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) {
3763
+ }), a.services = { ...this.services }, a.services.utils = { hasLoadedNamespace: a.hasLoadedNamespace.bind(a) }, r && (a.store = new la(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) {
3690
3764
  let e = {
3691
- ...pa().interpolation,
3765
+ ...Aa().interpolation,
3692
3766
  ...this.options.interpolation,
3693
3767
  ...t.interpolation
3694
3768
  }, n = {
3695
3769
  ...i,
3696
3770
  interpolation: e
3697
3771
  };
3698
- a.services.interpolator = new oa(n);
3772
+ a.services.interpolator = new Ca(n);
3699
3773
  }
3700
- return a.translator = new $i(a.services, i), a.translator.on("*", (e, ...t) => {
3774
+ return a.translator = new ga(a.services, i), a.translator.on("*", (e, ...t) => {
3701
3775
  a.emit(e, ...t);
3702
3776
  }), a.init(i, n), a.translator.options = i, a.translator.backendConnector.services.utils = { hasLoadedNamespace: a.hasLoadedNamespace.bind(a) }, a;
3703
3777
  }
@@ -3718,13 +3792,13 @@ $.createInstance, $.dir, $.init, $.loadResources, $.reloadResources, $.use, $.ch
3718
3792
  lng: "en",
3719
3793
  showSupportNotice: !1,
3720
3794
  resources: {
3721
- en: xi,
3722
- es: Si
3795
+ en: Ri,
3796
+ es: zi
3723
3797
  }
3724
3798
  });
3725
3799
  //#endregion
3726
3800
  //#region src/i18n.ts
3727
- var { translator: xa } = {
3801
+ var { translator: Ra } = {
3728
3802
  translator: {
3729
3803
  ...$,
3730
3804
  t: (e, t) => {
@@ -3756,23 +3830,23 @@ var { translator: xa } = {
3756
3830
  label: "Spanish"
3757
3831
  }]
3758
3832
  };
3759
- function Sa(e, t) {
3760
- return xa.t(`translation:simpleCloze:${e}`, { lng: t });
3833
+ function za(e, t) {
3834
+ return Ra.t(`translation:simpleCloze:${e}`, { lng: t });
3761
3835
  }
3762
3836
  //#endregion
3763
3837
  //#region src/print/Print.svelte
3764
- var Ca = /* @__PURE__ */ cr("<div class=\"simple-cloze-print-teacher-instructions svelte-1fx5wwa\"></div>"), wa = /* @__PURE__ */ cr("<div class=\"simple-cloze-print-prompt svelte-1fx5wwa\"></div>"), Ta = /* @__PURE__ */ cr("<span class=\"simple-cloze-print-key-label svelte-1fx5wwa\"> </span> <span class=\"simple-cloze-print-blank simple-cloze-print-blank--key svelte-1fx5wwa\"> </span>", 1), Ea = /* @__PURE__ */ cr("<span class=\"simple-cloze-print-blank svelte-1fx5wwa\" role=\"img\"></span>"), Da = /* @__PURE__ */ cr("<div class=\"simple-cloze-print svelte-1fx5wwa\"><!> <!> <div class=\"simple-cloze-print-response svelte-1fx5wwa\"><!></div></div>"), Oa = {
3838
+ var Ba = /* @__PURE__ */ cr("<div class=\"simple-cloze-print-teacher-instructions svelte-1fx5wwa\"></div>"), Va = /* @__PURE__ */ cr("<div class=\"simple-cloze-print-prompt svelte-1fx5wwa\"></div>"), Ha = /* @__PURE__ */ cr("<span class=\"simple-cloze-print-key-label svelte-1fx5wwa\"> </span> <span class=\"simple-cloze-print-blank simple-cloze-print-blank--key svelte-1fx5wwa\"> </span>", 1), Ua = /* @__PURE__ */ cr("<span class=\"simple-cloze-print-blank svelte-1fx5wwa\" role=\"img\"></span>"), Wa = /* @__PURE__ */ cr("<div class=\"simple-cloze-print svelte-1fx5wwa\"><!> <!> <div class=\"simple-cloze-print-response svelte-1fx5wwa\"><!></div></div>"), Ga = {
3765
3839
  hash: "svelte-1fx5wwa",
3766
3840
  code: "\n /* Self-contained: print players ship no Tailwind or CSS reset. */.simple-cloze-print.svelte-1fx5wwa {padding:1rem;color:var(--pie-text, black);}.simple-cloze-print-teacher-instructions.svelte-1fx5wwa,\n .simple-cloze-print-prompt.svelte-1fx5wwa {margin-bottom:1rem;}.simple-cloze-print-teacher-instructions.svelte-1fx5wwa p,\n .simple-cloze-print-prompt.svelte-1fx5wwa p {margin:0.5em 0;}.simple-cloze-print-prompt.svelte-1fx5wwa strong {font-weight:600;}.simple-cloze-print-response.svelte-1fx5wwa {display:inline-flex;align-items:baseline;gap:0.5rem;}.simple-cloze-print-key-label.svelte-1fx5wwa {font-size:0.875rem;line-height:1.25rem;font-weight:600;}.simple-cloze-print-blank.svelte-1fx5wwa {display:inline-block;min-width:12rem;min-height:1.5rem;padding:0.5rem 0.75rem;border-bottom:2px solid var(--pie-text, black);}.simple-cloze-print-blank--key.svelte-1fx5wwa {min-width:6rem;font-weight:600;}\n\n @media print {.simple-cloze-print.svelte-1fx5wwa {padding:0;}\n }"
3767
3841
  };
3768
- function ka(e, t) {
3769
- Ge(t, !0), Er(e, Oa);
3770
- let n = Ir(t, "model", 7, null), r = Ir(t, "options", 7, null), i = /* @__PURE__ */ pt(() => r()?.role === "instructor"), a = /* @__PURE__ */ pt(() => n()?.promptEnabled !== !1 && typeof n()?.prompt == "string" ? n().prompt : ""), o = /* @__PURE__ */ pt(() => bi(n()?.correctAnswer)), s = /* @__PURE__ */ pt(() => X(i) && !!X(o)), c = /* @__PURE__ */ pt(() => X(i) && n()?.teacherInstructionsEnabled !== !1 && n()?.teacherInstructions || ""), l = /* @__PURE__ */ M(null);
3842
+ function Ka(e, t) {
3843
+ Ge(t, !0), Er(e, Ga);
3844
+ let n = Ir(t, "model", 7, null), r = Ir(t, "options", 7, null), i = /* @__PURE__ */ pt(() => r()?.role === "instructor"), a = /* @__PURE__ */ pt(() => n()?.promptEnabled !== !1 && typeof n()?.prompt == "string" ? n().prompt : ""), o = /* @__PURE__ */ pt(() => Li(n()?.correctAnswer)), s = /* @__PURE__ */ pt(() => X(i) && !!X(o)), c = /* @__PURE__ */ pt(() => X(i) && n()?.teacherInstructionsEnabled !== !1 && n()?.teacherInstructions || ""), l = /* @__PURE__ */ M(null);
3771
3845
  pn(() => {
3772
3846
  if (!X(l) || !X(a)) return;
3773
3847
  let e = (e) => console.warn("simple-cloze: MathJax render failed", e);
3774
3848
  try {
3775
- Promise.resolve(fi(X(l))).catch(e);
3849
+ Promise.resolve(ki(X(l))).catch(e);
3776
3850
  } catch (t) {
3777
3851
  e(t);
3778
3852
  }
@@ -3790,41 +3864,41 @@ function ka(e, t) {
3790
3864
  set options(e = null) {
3791
3865
  r(e), At();
3792
3866
  }
3793
- }, d = Da(), f = $t(d), p = (e) => {
3794
- var t = Ca();
3867
+ }, d = Wa(), f = $t(d), p = (e) => {
3868
+ var t = Ba();
3795
3869
  Tr(t, () => X(c), !0), Ee(t), lr(e, t);
3796
3870
  };
3797
3871
  wr(f, (e) => {
3798
3872
  X(c) && e(p);
3799
3873
  });
3800
3874
  var m = nn(f, 2), h = (e) => {
3801
- var t = wa();
3875
+ var t = Va();
3802
3876
  Tr(t, () => X(a), !0), Ee(t), Fr(t, (e) => N(l, e), () => X(l)), lr(e, t);
3803
3877
  };
3804
3878
  wr(m, (e) => {
3805
3879
  X(a) && e(h);
3806
3880
  });
3807
3881
  var g = nn(m, 2), ee = $t(g), _ = (e) => {
3808
- var t = Ta(), r = en(t), i = tn(r, !0), a = tn(nn(r, 2), !0);
3882
+ var t = Ha(), r = en(t), i = tn(r, !0), a = tn(nn(r, 2), !0);
3809
3883
  bn((e) => {
3810
3884
  gr(i, e), gr(a, X(o));
3811
- }, [() => Sa("printCorrectAnswer", n()?.language)]), lr(e, t);
3885
+ }, [() => za("printCorrectAnswer", n()?.language)]), lr(e, t);
3812
3886
  }, v = (e) => {
3813
- var t = Ea();
3814
- bn((e) => Ar(t, "aria-label", e), [() => Sa("printAnswerBlank", n()?.language)]), lr(e, t);
3887
+ var t = Ua();
3888
+ bn((e) => Ar(t, "aria-label", e), [() => za("printAnswerBlank", n()?.language)]), lr(e, t);
3815
3889
  };
3816
3890
  return wr(ee, (e) => {
3817
3891
  X(s) ? e(_) : e(v, -1);
3818
3892
  }), Ee(g), Ee(d), lr(e, d), Ke(u);
3819
3893
  }
3820
- Hr(ka, {
3894
+ Hr(Ka, {
3821
3895
  model: { type: "Object" },
3822
3896
  options: { type: "Object" }
3823
3897
  }, [], []);
3824
3898
  //#endregion
3825
3899
  //#region src/print/index.ts
3826
- var Aa = ka.element;
3900
+ var qa = Ka.element;
3827
3901
  //#endregion
3828
- export { Aa as default };
3902
+ export { qa as default };
3829
3903
 
3830
3904
  //# sourceMappingURL=print.js.map