@pie-element/categorize 13.2.0-next.18 → 13.2.0-next.19

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.
@@ -0,0 +1,1973 @@
1
+ import { a as e, t } from "./rolldown-runtime-CHQKHQ89.js";
2
+ //#region ../../../node_modules/.bun/ms@2.1.3/node_modules/ms/index.js
3
+ var n = /* @__PURE__ */ t(((e, t) => {
4
+ var n = 1e3, r = n * 60, i = r * 60, a = i * 24, o = a * 7, s = a * 365.25;
5
+ t.exports = function(e, t) {
6
+ t ||= {};
7
+ var n = typeof e;
8
+ if (n === "string" && e.length > 0) return c(e);
9
+ if (n === "number" && isFinite(e)) return t.long ? u(e) : l(e);
10
+ throw Error("val is not a non-empty string or a valid number. val=" + JSON.stringify(e));
11
+ };
12
+ function c(e) {
13
+ if (e = String(e), !(e.length > 100)) {
14
+ var t = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);
15
+ if (t) {
16
+ var c = parseFloat(t[1]);
17
+ switch ((t[2] || "ms").toLowerCase()) {
18
+ case "years":
19
+ case "year":
20
+ case "yrs":
21
+ case "yr":
22
+ case "y": return c * s;
23
+ case "weeks":
24
+ case "week":
25
+ case "w": return c * o;
26
+ case "days":
27
+ case "day":
28
+ case "d": return c * a;
29
+ case "hours":
30
+ case "hour":
31
+ case "hrs":
32
+ case "hr":
33
+ case "h": return c * i;
34
+ case "minutes":
35
+ case "minute":
36
+ case "mins":
37
+ case "min":
38
+ case "m": return c * r;
39
+ case "seconds":
40
+ case "second":
41
+ case "secs":
42
+ case "sec":
43
+ case "s": return c * n;
44
+ case "milliseconds":
45
+ case "millisecond":
46
+ case "msecs":
47
+ case "msec":
48
+ case "ms": return c;
49
+ default: return;
50
+ }
51
+ }
52
+ }
53
+ }
54
+ function l(e) {
55
+ var t = Math.abs(e);
56
+ return t >= a ? Math.round(e / a) + "d" : t >= i ? Math.round(e / i) + "h" : t >= r ? Math.round(e / r) + "m" : t >= n ? Math.round(e / n) + "s" : e + "ms";
57
+ }
58
+ function u(e) {
59
+ var t = Math.abs(e);
60
+ return t >= a ? d(e, t, a, "day") : t >= i ? d(e, t, i, "hour") : t >= r ? d(e, t, r, "minute") : t >= n ? d(e, t, n, "second") : e + " ms";
61
+ }
62
+ function d(e, t, n, r) {
63
+ var i = t >= n * 1.5;
64
+ return Math.round(e / n) + " " + r + (i ? "s" : "");
65
+ }
66
+ })), r = /* @__PURE__ */ t(((e, t) => {
67
+ function r(e) {
68
+ r.debug = r, r.default = r, r.coerce = l, r.disable = s, r.enable = a, r.enabled = c, r.humanize = n(), r.destroy = u, Object.keys(e).forEach((t) => {
69
+ r[t] = e[t];
70
+ }), r.names = [], r.skips = [], r.formatters = {};
71
+ function t(e) {
72
+ let t = 0;
73
+ for (let n = 0; n < e.length; n++) t = (t << 5) - t + e.charCodeAt(n), t |= 0;
74
+ return r.colors[Math.abs(t) % r.colors.length];
75
+ }
76
+ r.selectColor = t;
77
+ function r(e) {
78
+ let t, n = null, a, o;
79
+ function s(...e) {
80
+ if (!s.enabled) return;
81
+ let n = s, i = Number(/* @__PURE__ */ new Date());
82
+ n.diff = i - (t || i), n.prev = t, n.curr = i, t = i, e[0] = r.coerce(e[0]), typeof e[0] != "string" && e.unshift("%O");
83
+ let a = 0;
84
+ e[0] = e[0].replace(/%([a-zA-Z%])/g, (t, i) => {
85
+ if (t === "%%") return "%";
86
+ a++;
87
+ let o = r.formatters[i];
88
+ if (typeof o == "function") {
89
+ let r = e[a];
90
+ t = o.call(n, r), e.splice(a, 1), a--;
91
+ }
92
+ return t;
93
+ }), r.formatArgs.call(n, e), (n.log || r.log).apply(n, e);
94
+ }
95
+ return s.namespace = e, s.useColors = r.useColors(), s.color = r.selectColor(e), s.extend = i, s.destroy = r.destroy, Object.defineProperty(s, "enabled", {
96
+ enumerable: !0,
97
+ configurable: !1,
98
+ get: () => n === null ? (a !== r.namespaces && (a = r.namespaces, o = r.enabled(e)), o) : n,
99
+ set: (e) => {
100
+ n = e;
101
+ }
102
+ }), typeof r.init == "function" && r.init(s), s;
103
+ }
104
+ function i(e, t) {
105
+ let n = r(this.namespace + (t === void 0 ? ":" : t) + e);
106
+ return n.log = this.log, n;
107
+ }
108
+ function a(e) {
109
+ r.save(e), r.namespaces = e, r.names = [], r.skips = [];
110
+ let t = (typeof e == "string" ? e : "").trim().replace(/\s+/g, ",").split(",").filter(Boolean);
111
+ for (let e of t) e[0] === "-" ? r.skips.push(e.slice(1)) : r.names.push(e);
112
+ }
113
+ function o(e, t) {
114
+ let n = 0, r = 0, i = -1, a = 0;
115
+ for (; n < e.length;) if (r < t.length && (t[r] === e[n] || t[r] === "*")) t[r] === "*" ? (i = r, a = n, r++) : (n++, r++);
116
+ else if (i !== -1) r = i + 1, a++, n = a;
117
+ else return !1;
118
+ for (; r < t.length && t[r] === "*";) r++;
119
+ return r === t.length;
120
+ }
121
+ function s() {
122
+ let e = [...r.names, ...r.skips.map((e) => "-" + e)].join(",");
123
+ return r.enable(""), e;
124
+ }
125
+ function c(e) {
126
+ for (let t of r.skips) if (o(e, t)) return !1;
127
+ for (let t of r.names) if (o(e, t)) return !0;
128
+ return !1;
129
+ }
130
+ function l(e) {
131
+ return e instanceof Error ? e.stack || e.message : e;
132
+ }
133
+ function u() {
134
+ console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
135
+ }
136
+ return r.enable(r.load()), r;
137
+ }
138
+ t.exports = r;
139
+ })), i = /* @__PURE__ */ t(((e, t) => {
140
+ e.formatArgs = i, e.save = a, e.load = o, e.useColors = n, e.storage = s(), e.destroy = (() => {
141
+ let e = !1;
142
+ return () => {
143
+ e || (e = !0, console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."));
144
+ };
145
+ })(), e.colors = /* @__PURE__ */ "#0000CC.#0000FF.#0033CC.#0033FF.#0066CC.#0066FF.#0099CC.#0099FF.#00CC00.#00CC33.#00CC66.#00CC99.#00CCCC.#00CCFF.#3300CC.#3300FF.#3333CC.#3333FF.#3366CC.#3366FF.#3399CC.#3399FF.#33CC00.#33CC33.#33CC66.#33CC99.#33CCCC.#33CCFF.#6600CC.#6600FF.#6633CC.#6633FF.#66CC00.#66CC33.#9900CC.#9900FF.#9933CC.#9933FF.#99CC00.#99CC33.#CC0000.#CC0033.#CC0066.#CC0099.#CC00CC.#CC00FF.#CC3300.#CC3333.#CC3366.#CC3399.#CC33CC.#CC33FF.#CC6600.#CC6633.#CC9900.#CC9933.#CCCC00.#CCCC33.#FF0000.#FF0033.#FF0066.#FF0099.#FF00CC.#FF00FF.#FF3300.#FF3333.#FF3366.#FF3399.#FF33CC.#FF33FF.#FF6600.#FF6633.#FF9900.#FF9933.#FFCC00.#FFCC33".split(".");
146
+ function n() {
147
+ if (typeof window < "u" && window.process && (window.process.type === "renderer" || window.process.__nwjs)) return !0;
148
+ if (typeof navigator < "u" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) return !1;
149
+ let e;
150
+ return typeof document < "u" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || typeof window < "u" && window.console && (window.console.firebug || window.console.exception && window.console.table) || typeof navigator < "u" && navigator.userAgent && (e = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(e[1], 10) >= 31 || typeof navigator < "u" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
151
+ }
152
+ function i(e) {
153
+ if (e[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + e[0] + (this.useColors ? "%c " : " ") + "+" + t.exports.humanize(this.diff), !this.useColors) return;
154
+ let n = "color: " + this.color;
155
+ e.splice(1, 0, n, "color: inherit");
156
+ let r = 0, i = 0;
157
+ e[0].replace(/%[a-zA-Z%]/g, (e) => {
158
+ e !== "%%" && (r++, e === "%c" && (i = r));
159
+ }), e.splice(i, 0, n);
160
+ }
161
+ e.log = console.debug || console.log || (() => {});
162
+ function a(t) {
163
+ try {
164
+ t ? e.storage.setItem("debug", t) : e.storage.removeItem("debug");
165
+ } catch {}
166
+ }
167
+ function o() {
168
+ let t;
169
+ try {
170
+ t = e.storage.getItem("debug") || e.storage.getItem("DEBUG");
171
+ } catch {}
172
+ return !t && typeof process < "u" && "env" in process && (t = process.env.DEBUG), t;
173
+ }
174
+ function s() {
175
+ try {
176
+ return localStorage;
177
+ } catch {}
178
+ }
179
+ t.exports = r()(e);
180
+ var { formatters: c } = t.exports;
181
+ c.j = function(e) {
182
+ try {
183
+ return JSON.stringify(e);
184
+ } catch (e) {
185
+ return "[UnexpectedJSONParseError]: " + e.message;
186
+ }
187
+ };
188
+ })), a = {
189
+ translation: {
190
+ categorize: {
191
+ limitMaxChoicesPerCategory: "You've reached the limit of {{maxChoicesPerCategory}} responses per area. To add another response, one must first be removed.",
192
+ maxChoicesPerCategoryRestriction: "To change this value to {{maxChoicesPerCategory}}, each category must have {{maxChoicesPerCategory}} or fewer answer choice[s]."
193
+ },
194
+ ebsr: { part: "Part {{index}}" },
195
+ numberLine: {
196
+ addElementLimit_one: "You can only add {{count}} element",
197
+ addElementLimit_other: "You can only add {{count}} elements",
198
+ clearAll: "Clear all"
199
+ },
200
+ imageClozeAssociation: {
201
+ reachedLimit_one: "You’ve reached the limit of {{count}} response per area. To add another response, one must first be removed.",
202
+ reachedLimit_other: "Full"
203
+ },
204
+ drawingResponse: {
205
+ fillColor: "Fill color",
206
+ outlineColor: "Outline color",
207
+ noFill: "No fill",
208
+ lightblue: "Light blue",
209
+ lightyellow: "Light yellow",
210
+ red: "Red",
211
+ orange: "Orange",
212
+ yellow: "Yellow",
213
+ violet: "Violet",
214
+ blue: "Blue",
215
+ green: "Green",
216
+ white: "White",
217
+ black: "Black",
218
+ onDoubleClick: "Double click to edit this text. Press Enter to submit."
219
+ },
220
+ charting: {
221
+ addCategory: "Add category",
222
+ actions: "Actions",
223
+ add: "Add",
224
+ delete: "Delete",
225
+ newLabel: "New label",
226
+ reachedLimit_other: "There can't be more than {{count}} categories.",
227
+ keyLegend: {
228
+ incorrectAnswer: "Student incorrect answer",
229
+ correctAnswer: "Student correct answer",
230
+ correctKeyAnswer: "Answer key correct"
231
+ }
232
+ },
233
+ graphing: {
234
+ point: "Point",
235
+ circle: "Circle",
236
+ line: "Line",
237
+ parabola: "Parabola",
238
+ absolute: "Absolute Value",
239
+ exponential: "Exponential",
240
+ polygon: "Polygon",
241
+ ray: "Ray",
242
+ segment: "Segment",
243
+ sine: "Sine",
244
+ vector: "Vector",
245
+ label: "Label",
246
+ redo: "Redo",
247
+ reset: "Reset"
248
+ },
249
+ mathInline: { primaryCorrectWithAlternates: "Note: The answer shown above is the primary correct answer specified by the author for this item, but other answers may also be recognized as correct." },
250
+ mcPopulatedBlank: {
251
+ answerChoices: "Answer choices",
252
+ blankLabel: "blank",
253
+ emptyBlank: "(blank)",
254
+ blankPreSelectionHint: "The answer you choose will appear on the blank line above.",
255
+ correctAnswerSelected: "Correct answer selected",
256
+ incorrectAnswerSelected: "Incorrect answer selected",
257
+ selectedAnswerImage: "Selected answer image",
258
+ choiceImage: "Choice {{id}}",
259
+ clickToEnableAutoplay: "Click to enable audio autoplay",
260
+ audioResourceUnavailable: "Audio is enabled but no playable audio URL is configured.",
261
+ listen: "Listen",
262
+ listenSilentAlt: "Repeat instructions",
263
+ listenPlayingAlt: "Instructions are playing",
264
+ printAudio: "Audio:",
265
+ printTranscript: "Transcript:"
266
+ },
267
+ multipleChoice: {
268
+ minSelections: "Select at least {{minSelections}}.",
269
+ maxSelections_one: "Only {{maxSelections}} answer is allowed.",
270
+ maxSelections_other: "Only {{maxSelections}} answers are allowed.",
271
+ minmaxSelections_equal: "Select {{minSelections}}.",
272
+ minmaxSelections_range: "Select between {{minSelections}} and {{maxSelections}}."
273
+ },
274
+ selectText: {
275
+ correctAnswerSelected: "Correct",
276
+ correctAnswerNotSelected: "Correct Answer Not Selected",
277
+ incorrectSelection: "Incorrect Selection",
278
+ key: "Key"
279
+ },
280
+ simpleCloze: {
281
+ correctAnswerShown: "Correct answer",
282
+ correct: "Correct",
283
+ incorrect: "Incorrect",
284
+ unanswered: "No answer",
285
+ placeholder: "Enter your answer...",
286
+ answerInput: "Your answer",
287
+ printCorrectAnswer: "Correct answer:",
288
+ printAnswerBlank: "Answer blank"
289
+ },
290
+ vennClassification: {
291
+ tray: "Tiles to classify",
292
+ unknownTarget: "unknown",
293
+ cancelled: "Cancelled",
294
+ returnedToTray: "{{name}} returned to tray",
295
+ placedIn: "{{name}} placed in {{target}}",
296
+ pickedUp: "Picked up {{name}}",
297
+ pickedUpWithKeyboard: "Picked up {{name}}, drop target: {{target}}. Use arrow keys to choose a drop target, Enter to drop, Escape to cancel.",
298
+ dropTarget: "Drop target: {{target}}",
299
+ unsupportedCircles_one: "This diagram cannot be shown: it has {{count}} circle, and only {{supported}} are supported.",
300
+ unsupportedCircles_other: "This diagram cannot be shown: it has {{count}} circles, and only {{supported}} are supported.",
301
+ setNumber: "Set {{number}}",
302
+ regionOnly: "{{set}} only",
303
+ regionNeither: "Neither {{first}} nor {{second}}",
304
+ regionNoneOf: "None of {{sets}}",
305
+ regionAndSeparator: " and ",
306
+ tileFallbackName: "Tile",
307
+ tileNotPlaced: "not placed",
308
+ tileInRegion: "in {{region}}",
309
+ tileCorrect: "correct",
310
+ tileIncorrect: "incorrect"
311
+ }
312
+ },
313
+ common: {
314
+ undo: "Undo",
315
+ clearAll: "Clear all",
316
+ correct: "Correct",
317
+ incorrect: "Incorrect",
318
+ showCorrectAnswer: "Show correct answer",
319
+ hideCorrectAnswer: "Hide correct answer",
320
+ showTeacherInstructions: "Show Teacher Instructions",
321
+ hideTeacherInstructions: "Hide Teacher Instructions",
322
+ commonCorrectAnswerWithAlternates: "Note: The answer shown above is the most common correct answer for this item. One or more additional correct answers are also defined, and will also be recognized as correct.",
323
+ warning: "Warning",
324
+ showNote: "Show Note",
325
+ hideNote: "Hide Note",
326
+ cancel: "Cancel"
327
+ }
328
+ }, o = {
329
+ translation: {
330
+ categorize: {
331
+ limitMaxChoicesPerCategory: "Has alcanzado el límite de {{maxChoicesPerCategory}} respuestas por área. Para agregar otra respuesta, primero se debe eliminar una respuesta.",
332
+ maxChoicesPerCategoryRestriction: "Para cambiar este valor a {{maxChoicesPerCategory}}, cada categoría debe tener {{maxChoicesPerCategory}} o menos opciones de respuesta"
333
+ },
334
+ ebsr: { part: "Parte {{index}}" },
335
+ numberLine: {
336
+ addElementLimit_one: "Solo puedes agregar {{count}} elemento",
337
+ addElementLimit_other: "Solo puedes agregar {{count}} elementos",
338
+ clearAll: "Borrar todo"
339
+ },
340
+ imageClozeAssociation: {
341
+ reachedLimit_one: "Has alcanzado el límite de {{count}} respuesta por área. Para agregar otra respuesta, primero se debe eliminar una respuesta.",
342
+ reachedLimit_other: "Lleno"
343
+ },
344
+ drawingResponse: {
345
+ fillColor: "Color de relleno",
346
+ outlineColor: "Color del contorno",
347
+ noFill: "Sin relleno",
348
+ lightblue: "Azul claro",
349
+ lightyellow: "Amarillo claro",
350
+ red: "Rojo",
351
+ orange: "Naranja",
352
+ yellow: "Amarillo",
353
+ violet: "Violeta",
354
+ blue: "Azul",
355
+ green: "Verde",
356
+ white: "Blanco",
357
+ black: "Negro",
358
+ onDoubleClick: "Haz doble clic para revisar este texto. Presiona el botón de ingreso para enviar"
359
+ },
360
+ charting: {
361
+ addCategory: "Añadir categoría",
362
+ actions: "Acciones",
363
+ add: "Añadir",
364
+ delete: "Eliminar",
365
+ newLabel: "Nueva etiqueta",
366
+ reachedLimit_other: "No puede haber más de {{count}} categorías.",
367
+ keyLegend: {
368
+ incorrectAnswer: "Respuesta incorrecta del estudiante",
369
+ correctAnswer: "Respuesta correcta del estudiante",
370
+ correctKeyAnswer: "Clave de respuesta correcta"
371
+ }
372
+ },
373
+ graphing: {
374
+ point: "Punto",
375
+ circle: "Circulo",
376
+ line: "Línea",
377
+ parabola: "Parábola",
378
+ absolute: "Valor absoluto",
379
+ exponential: "Exponencial",
380
+ polygon: "Polígono",
381
+ ray: "Semirrecta",
382
+ segment: "Segmento ",
383
+ sine: "Seno",
384
+ vector: "Vector",
385
+ label: "Etiqueta",
386
+ redo: "Rehacer",
387
+ reset: "Reiniciar"
388
+ },
389
+ mathInline: { primaryCorrectWithAlternates: "Nota: La respuesta que se muestra arriba es la respuesta correcta principal especificada por el autor para esta pregunta, pero también se pueden reconocer otras respuestas como correctas." },
390
+ mcPopulatedBlank: {
391
+ answerChoices: "Opciones de respuesta",
392
+ blankLabel: "espacio en blanco",
393
+ emptyBlank: "(en blanco)",
394
+ blankPreSelectionHint: "La respuesta que elijas aparecerá en la línea en blanco de arriba.",
395
+ correctAnswerSelected: "Respuesta correcta seleccionada",
396
+ incorrectAnswerSelected: "Respuesta incorrecta seleccionada",
397
+ selectedAnswerImage: "Imagen de la respuesta seleccionada",
398
+ choiceImage: "Opción {{id}}",
399
+ clickToEnableAutoplay: "Haz clic para activar la reproducción automática del audio",
400
+ audioResourceUnavailable: "El audio está activado, pero no hay una URL de audio reproducible configurada.",
401
+ listen: "Escuchar",
402
+ listenSilentAlt: "Escuchar. Repetir las instrucciones.",
403
+ listenPlayingAlt: "Escuchar. Estas son las instrucciones.",
404
+ printAudio: "Audio:",
405
+ printTranscript: "Transcripción:"
406
+ },
407
+ multipleChoice: {
408
+ minSelections: "Seleccione al menos {{minSelections}}.",
409
+ maxSelections_one: "Sólo se permite {{maxSelections}} respuesta.",
410
+ maxSelections_other: "Sólo se permiten {{maxSelections}} respuestas.",
411
+ minmaxSelections_equal: "Seleccione {{minSelections}}.",
412
+ minmaxSelections_range: "Seleccione entre {{minSelections}} y {{maxSelections}}."
413
+ },
414
+ selectText: {
415
+ correctAnswerSelected: "Respuesta Correcta",
416
+ correctAnswerNotSelected: "Respuesta Correcta No Seleccionada",
417
+ incorrectSelection: "Selección Incorrecta",
418
+ key: "Clave"
419
+ },
420
+ simpleCloze: {
421
+ correctAnswerShown: "Respuesta correcta",
422
+ correct: "Correcto",
423
+ incorrect: "Incorrecto",
424
+ unanswered: "Sin respuesta",
425
+ placeholder: "Escribe tu respuesta...",
426
+ answerInput: "Tu respuesta",
427
+ printCorrectAnswer: "Respuesta correcta:",
428
+ printAnswerBlank: "Espacio para la respuesta"
429
+ },
430
+ vennClassification: {
431
+ tray: "Fichas para clasificar",
432
+ unknownTarget: "desconocido",
433
+ cancelled: "Cancelado",
434
+ returnedToTray: "Se devolvió {{name}} a la bandeja",
435
+ placedIn: "Se colocó {{name}} en {{target}}",
436
+ pickedUp: "Se tomó {{name}}",
437
+ pickedUpWithKeyboard: "Se tomó {{name}}, destino: {{target}}. Usa las flechas para elegir un destino, Enter para soltar y Escape para cancelar.",
438
+ dropTarget: "Destino: {{target}}",
439
+ unsupportedCircles_one: "No se puede mostrar este diagrama: tiene {{count}} círculo, y solo se admiten {{supported}}.",
440
+ unsupportedCircles_other: "No se puede mostrar este diagrama: tiene {{count}} círculos, y solo se admiten {{supported}}.",
441
+ setNumber: "Conjunto {{number}}",
442
+ regionOnly: "Solo {{set}}",
443
+ regionNeither: "Ni {{first}} ni {{second}}",
444
+ regionNoneOf: "Ninguno de {{sets}}",
445
+ regionAndSeparator: " y ",
446
+ tileFallbackName: "Ficha",
447
+ tileNotPlaced: "sin colocar",
448
+ tileInRegion: "en {{region}}",
449
+ tileCorrect: "correcta",
450
+ tileIncorrect: "incorrecta"
451
+ }
452
+ },
453
+ common: {
454
+ undo: "Deshacer",
455
+ clearAll: "Borrar todo",
456
+ correct: "Correcto",
457
+ incorrect: "Incorrecto",
458
+ showCorrectAnswer: "Mostrar respuesta correcta",
459
+ hideCorrectAnswer: "Ocultar respuesta correcta",
460
+ showTeacherInstructions: "Mostrar instrucciones para el maestro",
461
+ hideTeacherInstructions: "Ocultar instrucciones para el maestro",
462
+ commonCorrectAnswerWithAlternates: "Nota: La respuesta que se muestra arriba es la respuesta correcta más común para esta pregunta. También se definen una o más respuestas correctas adicionales, y también se reconocerán como correctas.",
463
+ warning: "Advertencia",
464
+ showNote: "Mostrar Nota",
465
+ hideNote: "Ocultar Nota",
466
+ cancel: "Cancelar"
467
+ }
468
+ }, s = (e) => typeof e == "string", c = () => {
469
+ let e, t, n = new Promise((n, r) => {
470
+ e = n, t = r;
471
+ });
472
+ return n.resolve = e, n.reject = t, n;
473
+ }, l = (e) => e == null ? "" : "" + e, u = (e, t, n) => {
474
+ e.forEach((e) => {
475
+ t[e] && (n[e] = t[e]);
476
+ });
477
+ }, d = /###/g, f = (e) => e && e.indexOf("###") > -1 ? e.replace(d, ".") : e, p = (e) => !e || s(e), m = (e, t, n) => {
478
+ let r = s(t) ? t.split(".") : t, i = 0;
479
+ for (; i < r.length - 1;) {
480
+ if (p(e)) return {};
481
+ let t = f(r[i]);
482
+ !e[t] && n && (e[t] = new n()), e = Object.prototype.hasOwnProperty.call(e, t) ? e[t] : {}, ++i;
483
+ }
484
+ return p(e) ? {} : {
485
+ obj: e,
486
+ k: f(r[i])
487
+ };
488
+ }, h = (e, t, n) => {
489
+ let { obj: r, k: i } = m(e, t, Object);
490
+ if (r !== void 0 || t.length === 1) {
491
+ r[i] = n;
492
+ return;
493
+ }
494
+ let a = t[t.length - 1], o = t.slice(0, t.length - 1), s = m(e, o, Object);
495
+ for (; s.obj === void 0 && o.length;) a = `${o[o.length - 1]}.${a}`, o = o.slice(0, o.length - 1), s = m(e, o, Object), s?.obj && s.obj[`${s.k}.${a}`] !== void 0 && (s.obj = void 0);
496
+ s.obj[`${s.k}.${a}`] = n;
497
+ }, g = (e, t, n, r) => {
498
+ let { obj: i, k: a } = m(e, t, Object);
499
+ i[a] = i[a] || [], i[a].push(n);
500
+ }, _ = (e, t) => {
501
+ let { obj: n, k: r } = m(e, t);
502
+ if (n && Object.prototype.hasOwnProperty.call(n, r)) return n[r];
503
+ }, v = (e, t, n) => {
504
+ let r = _(e, n);
505
+ return r === void 0 ? _(t, n) : r;
506
+ }, y = (e, t, n) => {
507
+ for (let r in t) r !== "__proto__" && r !== "constructor" && (r in e ? s(e[r]) || e[r] instanceof String || s(t[r]) || t[r] instanceof String ? n && (e[r] = t[r]) : y(e[r], t[r], n) : e[r] = t[r]);
508
+ return e;
509
+ }, b = (e) => e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"), x = {
510
+ "&": "&amp;",
511
+ "<": "&lt;",
512
+ ">": "&gt;",
513
+ "\"": "&quot;",
514
+ "'": "&#39;",
515
+ "/": "&#x2F;"
516
+ }, S = (e) => s(e) ? e.replace(/[&<>"'\/]/g, (e) => x[e]) : e, C = class {
517
+ constructor(e) {
518
+ this.capacity = e, this.regExpMap = /* @__PURE__ */ new Map(), this.regExpQueue = [];
519
+ }
520
+ getRegExp(e) {
521
+ let t = this.regExpMap.get(e);
522
+ if (t !== void 0) return t;
523
+ let n = new RegExp(e);
524
+ return this.regExpQueue.length === this.capacity && this.regExpMap.delete(this.regExpQueue.shift()), this.regExpMap.set(e, n), this.regExpQueue.push(e), n;
525
+ }
526
+ }, w = [
527
+ " ",
528
+ ",",
529
+ "?",
530
+ "!",
531
+ ";"
532
+ ], T = new C(20), E = (e, t, n) => {
533
+ t ||= "", n ||= "";
534
+ let r = w.filter((e) => t.indexOf(e) < 0 && n.indexOf(e) < 0);
535
+ if (r.length === 0) return !0;
536
+ let i = T.getRegExp(`(${r.map((e) => e === "?" ? "\\?" : e).join("|")})`), a = !i.test(e);
537
+ if (!a) {
538
+ let t = e.indexOf(n);
539
+ t > 0 && !i.test(e.substring(0, t)) && (a = !0);
540
+ }
541
+ return a;
542
+ }, D = (e, t, n = ".") => {
543
+ if (!e) return;
544
+ if (e[t]) return Object.prototype.hasOwnProperty.call(e, t) ? e[t] : void 0;
545
+ let r = t.split(n), i = e;
546
+ for (let e = 0; e < r.length;) {
547
+ if (!i || typeof i != "object") return;
548
+ let t, a = "";
549
+ for (let o = e; o < r.length; ++o) if (o !== e && (a += n), a += r[o], t = i[a], t !== void 0) {
550
+ if ([
551
+ "string",
552
+ "number",
553
+ "boolean"
554
+ ].indexOf(typeof t) > -1 && o < r.length - 1) continue;
555
+ e += o - e + 1;
556
+ break;
557
+ }
558
+ i = t;
559
+ }
560
+ return i;
561
+ }, O = (e) => e?.replace(/_/g, "-"), ee = {
562
+ type: "logger",
563
+ log(e) {
564
+ this.output("log", e);
565
+ },
566
+ warn(e) {
567
+ this.output("warn", e);
568
+ },
569
+ error(e) {
570
+ this.output("error", e);
571
+ },
572
+ output(e, t) {
573
+ console?.[e]?.apply?.(console, t);
574
+ }
575
+ }, k = new class e {
576
+ constructor(e, t = {}) {
577
+ this.init(e, t);
578
+ }
579
+ init(e, t = {}) {
580
+ this.prefix = t.prefix || "i18next:", this.logger = e || ee, this.options = t, this.debug = t.debug;
581
+ }
582
+ log(...e) {
583
+ return this.forward(e, "log", "", !0);
584
+ }
585
+ warn(...e) {
586
+ return this.forward(e, "warn", "", !0);
587
+ }
588
+ error(...e) {
589
+ return this.forward(e, "error", "");
590
+ }
591
+ deprecate(...e) {
592
+ return this.forward(e, "warn", "WARNING DEPRECATED: ", !0);
593
+ }
594
+ forward(e, t, n, r) {
595
+ return r && !this.debug ? null : (s(e[0]) && (e[0] = `${n}${this.prefix} ${e[0]}`), this.logger[t](e));
596
+ }
597
+ create(t) {
598
+ return new e(this.logger, {
599
+ prefix: `${this.prefix}:${t}:`,
600
+ ...this.options
601
+ });
602
+ }
603
+ clone(t) {
604
+ return t ||= this.options, t.prefix = t.prefix || this.prefix, new e(this.logger, t);
605
+ }
606
+ }(), A = class {
607
+ constructor() {
608
+ this.observers = {};
609
+ }
610
+ on(e, t) {
611
+ return e.split(" ").forEach((e) => {
612
+ this.observers[e] || (this.observers[e] = /* @__PURE__ */ new Map());
613
+ let n = this.observers[e].get(t) || 0;
614
+ this.observers[e].set(t, n + 1);
615
+ }), this;
616
+ }
617
+ off(e, t) {
618
+ if (this.observers[e]) {
619
+ if (!t) {
620
+ delete this.observers[e];
621
+ return;
622
+ }
623
+ this.observers[e].delete(t);
624
+ }
625
+ }
626
+ emit(e, ...t) {
627
+ this.observers[e] && Array.from(this.observers[e].entries()).forEach(([e, n]) => {
628
+ for (let r = 0; r < n; r++) e(...t);
629
+ }), this.observers["*"] && Array.from(this.observers["*"].entries()).forEach(([n, r]) => {
630
+ for (let i = 0; i < r; i++) n.apply(n, [e, ...t]);
631
+ });
632
+ }
633
+ }, j = class extends A {
634
+ constructor(e, t = {
635
+ ns: ["translation"],
636
+ defaultNS: "translation"
637
+ }) {
638
+ super(), this.data = e || {}, this.options = t, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.options.ignoreJSONStructure === void 0 && (this.options.ignoreJSONStructure = !0);
639
+ }
640
+ addNamespaces(e) {
641
+ this.options.ns.indexOf(e) < 0 && this.options.ns.push(e);
642
+ }
643
+ removeNamespaces(e) {
644
+ let t = this.options.ns.indexOf(e);
645
+ t > -1 && this.options.ns.splice(t, 1);
646
+ }
647
+ getResource(e, t, n, r = {}) {
648
+ let i = r.keySeparator === void 0 ? this.options.keySeparator : r.keySeparator, a = r.ignoreJSONStructure === void 0 ? this.options.ignoreJSONStructure : r.ignoreJSONStructure, o;
649
+ e.indexOf(".") > -1 ? o = e.split(".") : (o = [e, t], n && (Array.isArray(n) ? o.push(...n) : s(n) && i ? o.push(...n.split(i)) : o.push(n)));
650
+ let c = _(this.data, o);
651
+ return !c && !t && !n && e.indexOf(".") > -1 && (e = o[0], t = o[1], n = o.slice(2).join(".")), c || !a || !s(n) ? c : D(this.data?.[e]?.[t], n, i);
652
+ }
653
+ addResource(e, t, n, r, i = { silent: !1 }) {
654
+ let a = i.keySeparator === void 0 ? this.options.keySeparator : i.keySeparator, o = [e, t];
655
+ n && (o = o.concat(a ? n.split(a) : n)), e.indexOf(".") > -1 && (o = e.split("."), r = t, t = o[1]), this.addNamespaces(t), h(this.data, o, r), i.silent || this.emit("added", e, t, n, r);
656
+ }
657
+ addResources(e, t, n, r = { silent: !1 }) {
658
+ for (let r in n) (s(n[r]) || Array.isArray(n[r])) && this.addResource(e, t, r, n[r], { silent: !0 });
659
+ r.silent || this.emit("added", e, t, n);
660
+ }
661
+ addResourceBundle(e, t, n, r, i, a = {
662
+ silent: !1,
663
+ skipCopy: !1
664
+ }) {
665
+ let o = [e, t];
666
+ e.indexOf(".") > -1 && (o = e.split("."), r = n, n = t, t = o[1]), this.addNamespaces(t);
667
+ let s = _(this.data, o) || {};
668
+ a.skipCopy || (n = JSON.parse(JSON.stringify(n))), r ? y(s, n, i) : s = {
669
+ ...s,
670
+ ...n
671
+ }, h(this.data, o, s), a.silent || this.emit("added", e, t, n);
672
+ }
673
+ removeResourceBundle(e, t) {
674
+ this.hasResourceBundle(e, t) && delete this.data[e][t], this.removeNamespaces(t), this.emit("removed", e, t);
675
+ }
676
+ hasResourceBundle(e, t) {
677
+ return this.getResource(e, t) !== void 0;
678
+ }
679
+ getResourceBundle(e, t) {
680
+ return t ||= this.options.defaultNS, this.getResource(e, t);
681
+ }
682
+ getDataByLanguage(e) {
683
+ return this.data[e];
684
+ }
685
+ hasLanguageSomeTranslations(e) {
686
+ let t = this.getDataByLanguage(e);
687
+ return !!(t && Object.keys(t) || []).find((e) => t[e] && Object.keys(t[e]).length > 0);
688
+ }
689
+ toJSON() {
690
+ return this.data;
691
+ }
692
+ }, M = {
693
+ processors: {},
694
+ addPostProcessor(e) {
695
+ this.processors[e.name] = e;
696
+ },
697
+ handle(e, t, n, r, i) {
698
+ return e.forEach((e) => {
699
+ t = this.processors[e]?.process(t, n, r, i) ?? t;
700
+ }), t;
701
+ }
702
+ }, N = Symbol("i18next/PATH_KEY");
703
+ function te() {
704
+ let e = [], t = Object.create(null), n;
705
+ return t.get = (r, i) => (n?.revoke?.(), i === N ? e : (e.push(i), n = Proxy.revocable(r, t), n.proxy)), Proxy.revocable(Object.create(null), t).proxy;
706
+ }
707
+ function P(e, t) {
708
+ let { [N]: n } = e(te()), r = t?.keySeparator ?? ".", i = t?.nsSeparator ?? ":";
709
+ if (n.length > 1 && i) {
710
+ let e = t?.ns, a = Array.isArray(e) ? e : null;
711
+ if (a && a.length > 1 && a.slice(1).includes(n[0])) return `${n[0]}${i}${n.slice(1).join(r)}`;
712
+ }
713
+ return n.join(r);
714
+ }
715
+ var F = {}, I = (e) => !s(e) && typeof e != "boolean" && typeof e != "number", L = class e extends A {
716
+ constructor(e, t = {}) {
717
+ super(), u([
718
+ "resourceStore",
719
+ "languageUtils",
720
+ "pluralResolver",
721
+ "interpolator",
722
+ "backendConnector",
723
+ "i18nFormat",
724
+ "utils"
725
+ ], e, this), this.options = t, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.logger = k.create("translator");
726
+ }
727
+ changeLanguage(e) {
728
+ e && (this.language = e);
729
+ }
730
+ exists(e, t = { interpolation: {} }) {
731
+ let n = { ...t };
732
+ if (e == null) return !1;
733
+ let r = this.resolve(e, n);
734
+ if (r?.res === void 0) return !1;
735
+ let i = I(r.res);
736
+ return !(n.returnObjects === !1 && i);
737
+ }
738
+ extractFromKey(e, t) {
739
+ let n = t.nsSeparator === void 0 ? this.options.nsSeparator : t.nsSeparator;
740
+ n === void 0 && (n = ":");
741
+ 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 && !E(e, n, r);
742
+ if (a && !o) {
743
+ let t = e.match(this.interpolator.nestingRegexp);
744
+ if (t && t.length > 0) return {
745
+ key: e,
746
+ namespaces: s(i) ? [i] : i
747
+ };
748
+ let a = e.split(n);
749
+ (n !== r || n === r && this.options.ns.indexOf(a[0]) > -1) && (i = a.shift()), e = a.join(r);
750
+ }
751
+ return {
752
+ key: e,
753
+ namespaces: s(i) ? [i] : i
754
+ };
755
+ }
756
+ translate(t, n, r) {
757
+ let i = typeof n == "object" ? { ...n } : n;
758
+ if (typeof i != "object" && this.options.overloadTranslationOptionHandler && (i = this.options.overloadTranslationOptionHandler(arguments)), typeof i == "object" && (i = { ...i }), i ||= {}, t == null) return "";
759
+ typeof t == "function" && (t = P(t, {
760
+ ...this.options,
761
+ ...i
762
+ })), Array.isArray(t) || (t = [String(t)]), t = t.map((e) => typeof e == "function" ? P(e, {
763
+ ...this.options,
764
+ ...i
765
+ }) : String(e));
766
+ let a = i.returnDetails === void 0 ? this.options.returnDetails : i.returnDetails, o = i.keySeparator === void 0 ? this.options.keySeparator : i.keySeparator, { key: c, namespaces: l } = this.extractFromKey(t[t.length - 1], i), u = l[l.length - 1], d = i.nsSeparator === void 0 ? this.options.nsSeparator : i.nsSeparator;
767
+ d === void 0 && (d = ":");
768
+ let f = i.lng || this.language, p = i.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;
769
+ if (f?.toLowerCase() === "cimode") return p ? a ? {
770
+ res: `${u}${d}${c}`,
771
+ usedKey: c,
772
+ exactUsedKey: c,
773
+ usedLng: f,
774
+ usedNS: u,
775
+ usedParams: this.getUsedParamsDetails(i)
776
+ } : `${u}${d}${c}` : a ? {
777
+ res: c,
778
+ usedKey: c,
779
+ exactUsedKey: c,
780
+ usedLng: f,
781
+ usedNS: u,
782
+ usedParams: this.getUsedParamsDetails(i)
783
+ } : c;
784
+ let m = this.resolve(t, i), h = m?.res, g = m?.usedKey || c, _ = m?.exactUsedKey || c, v = [
785
+ "[object Number]",
786
+ "[object Function]",
787
+ "[object RegExp]"
788
+ ], y = i.joinArrays === void 0 ? this.options.joinArrays : i.joinArrays, b = !this.i18nFormat || this.i18nFormat.handleAsObject, x = i.count !== void 0 && !s(i.count), S = e.hasDefaultValue(i), C = x ? this.pluralResolver.getSuffix(f, i.count, i) : "", w = i.ordinal && x ? this.pluralResolver.getSuffix(f, i.count, { ordinal: !1 }) : "", T = x && !i.ordinal && i.count === 0, E = T && i[`defaultValue${this.options.pluralSeparator}zero`] || i[`defaultValue${C}`] || i[`defaultValue${w}`] || i.defaultValue, D = h;
789
+ b && !h && S && (D = E);
790
+ let O = I(D), ee = Object.prototype.toString.apply(D);
791
+ if (b && D && O && v.indexOf(ee) < 0 && !(s(y) && Array.isArray(D))) {
792
+ if (!i.returnObjects && !this.options.returnObjects) {
793
+ this.options.returnedObjectHandler || this.logger.warn("accessing an object - but returnObjects options is not enabled!");
794
+ let e = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(g, D, {
795
+ ...i,
796
+ ns: l
797
+ }) : `key '${c} (${this.language})' returned an object instead of string.`;
798
+ return a ? (m.res = e, m.usedParams = this.getUsedParamsDetails(i), m) : e;
799
+ }
800
+ if (o) {
801
+ let e = Array.isArray(D), t = e ? [] : {}, n = e ? _ : g;
802
+ for (let e in D) if (Object.prototype.hasOwnProperty.call(D, e)) {
803
+ let r = `${n}${o}${e}`;
804
+ S && !h ? t[e] = this.translate(r, {
805
+ ...i,
806
+ defaultValue: I(E) ? E[e] : void 0,
807
+ joinArrays: !1,
808
+ ns: l
809
+ }) : t[e] = this.translate(r, {
810
+ ...i,
811
+ joinArrays: !1,
812
+ ns: l
813
+ }), t[e] === r && (t[e] = D[e]);
814
+ }
815
+ h = t;
816
+ }
817
+ } else if (b && s(y) && Array.isArray(h)) h = h.join(y), h &&= this.extendTranslation(h, t, i, r);
818
+ else {
819
+ let e = !1, n = !1;
820
+ !this.isValidLookup(h) && S && (e = !0, h = E), this.isValidLookup(h) || (n = !0, h = c);
821
+ let a = (i.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) && n ? void 0 : h, s = S && E !== h && this.options.updateMissing;
822
+ if (n || e || s) {
823
+ if (this.logger.log(s ? "updateKey" : "missingKey", f, u, c, s ? E : h), o) {
824
+ let e = this.resolve(c, {
825
+ ...i,
826
+ keySeparator: !1
827
+ });
828
+ e && e.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.");
829
+ }
830
+ let e = [], t = this.languageUtils.getFallbackCodes(this.options.fallbackLng, i.lng || this.language);
831
+ if (this.options.saveMissingTo === "fallback" && t && t[0]) for (let n = 0; n < t.length; n++) e.push(t[n]);
832
+ else this.options.saveMissingTo === "all" ? e = this.languageUtils.toResolveHierarchy(i.lng || this.language) : e.push(i.lng || this.language);
833
+ let n = (e, t, n) => {
834
+ let r = S && n !== h ? n : a;
835
+ this.options.missingKeyHandler ? this.options.missingKeyHandler(e, u, t, r, s, i) : this.backendConnector?.saveMissing && this.backendConnector.saveMissing(e, u, t, r, s, i), this.emit("missingKey", e, u, t, h);
836
+ };
837
+ this.options.saveMissing && (this.options.saveMissingPlurals && x ? e.forEach((e) => {
838
+ let t = this.pluralResolver.getSuffixes(e, i);
839
+ T && i[`defaultValue${this.options.pluralSeparator}zero`] && t.indexOf(`${this.options.pluralSeparator}zero`) < 0 && t.push(`${this.options.pluralSeparator}zero`), t.forEach((t) => {
840
+ n([e], c + t, i[`defaultValue${t}`] || E);
841
+ });
842
+ }) : n(e, c, E));
843
+ }
844
+ h = this.extendTranslation(h, t, i, m, r), n && h === c && this.options.appendNamespaceToMissingKey && (h = `${u}${d}${c}`), (n || e) && this.options.parseMissingKeyHandler && (h = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${u}${d}${c}` : c, e ? h : void 0, i));
845
+ }
846
+ return a ? (m.res = h, m.usedParams = this.getUsedParamsDetails(i), m) : h;
847
+ }
848
+ extendTranslation(e, t, n, r, i) {
849
+ if (this.i18nFormat?.parse) e = this.i18nFormat.parse(e, {
850
+ ...this.options.interpolation.defaultVariables,
851
+ ...n
852
+ }, n.lng || this.language || r.usedLng, r.usedNS, r.usedKey, { resolved: r });
853
+ else if (!n.skipInterpolation) {
854
+ n.interpolation && this.interpolator.init({
855
+ ...n,
856
+ interpolation: {
857
+ ...this.options.interpolation,
858
+ ...n.interpolation
859
+ }
860
+ });
861
+ let a = s(e) && (n?.interpolation?.skipOnVariables === void 0 ? this.options.interpolation.skipOnVariables : n.interpolation.skipOnVariables), o;
862
+ if (a) {
863
+ let t = e.match(this.interpolator.nestingRegexp);
864
+ o = t && t.length;
865
+ }
866
+ let c = n.replace && !s(n.replace) ? n.replace : n;
867
+ if (this.options.interpolation.defaultVariables && (c = {
868
+ ...this.options.interpolation.defaultVariables,
869
+ ...c
870
+ }), e = this.interpolator.interpolate(e, c, n.lng || this.language || r.usedLng, n), a) {
871
+ let t = e.match(this.interpolator.nestingRegexp), r = t && t.length;
872
+ o < r && (n.nest = !1);
873
+ }
874
+ !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();
875
+ }
876
+ let a = n.postProcess || this.options.postProcess, o = s(a) ? [a] : a;
877
+ return e != null && o?.length && n.applyPostProcessor !== !1 && (e = M.handle(o, e, t, this.options && this.options.postProcessPassResolved ? {
878
+ i18nResolved: {
879
+ ...r,
880
+ usedParams: this.getUsedParamsDetails(n)
881
+ },
882
+ ...n
883
+ } : n, this)), e;
884
+ }
885
+ resolve(e, t = {}) {
886
+ let n, r, i, a, o;
887
+ return s(e) && (e = [e]), Array.isArray(e) && (e = e.map((e) => typeof e == "function" ? P(e, {
888
+ ...this.options,
889
+ ...t
890
+ }) : e)), e.forEach((e) => {
891
+ if (this.isValidLookup(n)) return;
892
+ let c = this.extractFromKey(e, t), l = c.key;
893
+ r = l;
894
+ let u = c.namespaces;
895
+ this.options.fallbackNS && (u = u.concat(this.options.fallbackNS));
896
+ let d = t.count !== void 0 && !s(t.count), f = d && !t.ordinal && t.count === 0, p = t.context !== void 0 && (s(t.context) || typeof t.context == "number") && t.context !== "", m = t.lngs ? t.lngs : this.languageUtils.toResolveHierarchy(t.lng || this.language, t.fallbackLng);
897
+ u.forEach((e) => {
898
+ this.isValidLookup(n) || (o = e, !F[`${m[0]}-${e}`] && this.utils?.hasLoadedNamespace && !this.utils?.hasLoadedNamespace(o) && (F[`${m[0]}-${e}`] = !0, this.logger.warn(`key "${r}" for languages "${m.join(", ")}" won't get resolved as namespace "${o}" was not yet loaded`, "This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")), m.forEach((r) => {
899
+ if (this.isValidLookup(n)) return;
900
+ a = r;
901
+ let o = [l];
902
+ if (this.i18nFormat?.addLookupKeys) this.i18nFormat.addLookupKeys(o, l, r, e, t);
903
+ else {
904
+ let e;
905
+ d && (e = this.pluralResolver.getSuffix(r, t.count, t));
906
+ let n = `${this.options.pluralSeparator}zero`, i = `${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;
907
+ if (d && (t.ordinal && e.indexOf(i) === 0 && o.push(l + e.replace(i, this.options.pluralSeparator)), o.push(l + e), f && o.push(l + n)), p) {
908
+ let r = `${l}${this.options.contextSeparator || "_"}${t.context}`;
909
+ o.push(r), d && (t.ordinal && e.indexOf(i) === 0 && o.push(r + e.replace(i, this.options.pluralSeparator)), o.push(r + e), f && o.push(r + n));
910
+ }
911
+ }
912
+ let s;
913
+ for (; s = o.pop();) this.isValidLookup(n) || (i = s, n = this.getResource(r, e, s, t));
914
+ }));
915
+ });
916
+ }), {
917
+ res: n,
918
+ usedKey: r,
919
+ exactUsedKey: i,
920
+ usedLng: a,
921
+ usedNS: o
922
+ };
923
+ }
924
+ isValidLookup(e) {
925
+ return e !== void 0 && !(!this.options.returnNull && e === null) && !(!this.options.returnEmptyString && e === "");
926
+ }
927
+ getResource(e, t, n, r = {}) {
928
+ return this.i18nFormat?.getResource ? this.i18nFormat.getResource(e, t, n, r) : this.resourceStore.getResource(e, t, n, r);
929
+ }
930
+ getUsedParamsDetails(e = {}) {
931
+ let t = [
932
+ "defaultValue",
933
+ "ordinal",
934
+ "context",
935
+ "replace",
936
+ "lng",
937
+ "lngs",
938
+ "fallbackLng",
939
+ "ns",
940
+ "keySeparator",
941
+ "nsSeparator",
942
+ "returnObjects",
943
+ "returnDetails",
944
+ "joinArrays",
945
+ "postProcess",
946
+ "interpolation"
947
+ ], n = e.replace && !s(e.replace), r = n ? e.replace : e;
948
+ if (n && e.count !== void 0 && (r.count = e.count), this.options.interpolation.defaultVariables && (r = {
949
+ ...this.options.interpolation.defaultVariables,
950
+ ...r
951
+ }), !n) {
952
+ r = { ...r };
953
+ for (let e of t) delete r[e];
954
+ }
955
+ return r;
956
+ }
957
+ static hasDefaultValue(e) {
958
+ for (let t in e) if (Object.prototype.hasOwnProperty.call(e, t) && t.substring(0, 12) === "defaultValue" && e[t] !== void 0) return !0;
959
+ return !1;
960
+ }
961
+ }, R = class {
962
+ constructor(e) {
963
+ this.options = e, this.supportedLngs = this.options.supportedLngs || !1, this.logger = k.create("languageUtils");
964
+ }
965
+ getScriptPartFromCode(e) {
966
+ if (e = O(e), !e || e.indexOf("-") < 0) return null;
967
+ let t = e.split("-");
968
+ return t.length === 2 || (t.pop(), t[t.length - 1].toLowerCase() === "x") ? null : this.formatLanguageCode(t.join("-"));
969
+ }
970
+ getLanguagePartFromCode(e) {
971
+ if (e = O(e), !e || e.indexOf("-") < 0) return e;
972
+ let t = e.split("-");
973
+ return this.formatLanguageCode(t[0]);
974
+ }
975
+ formatLanguageCode(e) {
976
+ if (s(e) && e.indexOf("-") > -1) {
977
+ let t;
978
+ try {
979
+ t = Intl.getCanonicalLocales(e)[0];
980
+ } catch {}
981
+ return t && this.options.lowerCaseLng && (t = t.toLowerCase()), t || (this.options.lowerCaseLng ? e.toLowerCase() : e);
982
+ }
983
+ return this.options.cleanCode || this.options.lowerCaseLng ? e.toLowerCase() : e;
984
+ }
985
+ isSupportedCode(e) {
986
+ return (this.options.load === "languageOnly" || this.options.nonExplicitSupportedLngs) && (e = this.getLanguagePartFromCode(e)), !this.supportedLngs || !this.supportedLngs.length || this.supportedLngs.indexOf(e) > -1;
987
+ }
988
+ getBestMatchFromCodes(e) {
989
+ if (!e) return null;
990
+ let t;
991
+ return e.forEach((e) => {
992
+ if (t) return;
993
+ let n = this.formatLanguageCode(e);
994
+ (!this.options.supportedLngs || this.isSupportedCode(n)) && (t = n);
995
+ }), !t && this.options.supportedLngs && e.forEach((e) => {
996
+ if (t) return;
997
+ let n = this.getScriptPartFromCode(e);
998
+ if (this.isSupportedCode(n)) return t = n;
999
+ let r = this.getLanguagePartFromCode(e);
1000
+ if (this.isSupportedCode(r)) return t = r;
1001
+ t = this.options.supportedLngs.find((e) => {
1002
+ if (e === r || !(e.indexOf("-") < 0 && r.indexOf("-") < 0) && (e.indexOf("-") > 0 && r.indexOf("-") < 0 && e.substring(0, e.indexOf("-")) === r || e.indexOf(r) === 0 && r.length > 1)) return e;
1003
+ });
1004
+ }), t ||= this.getFallbackCodes(this.options.fallbackLng)[0], t;
1005
+ }
1006
+ getFallbackCodes(e, t) {
1007
+ if (!e) return [];
1008
+ if (typeof e == "function" && (e = e(t)), s(e) && (e = [e]), Array.isArray(e)) return e;
1009
+ if (!t) return e.default || [];
1010
+ let n = e[t];
1011
+ return n ||= e[this.getScriptPartFromCode(t)], n ||= e[this.formatLanguageCode(t)], n ||= e[this.getLanguagePartFromCode(t)], n ||= e.default, n || [];
1012
+ }
1013
+ toResolveHierarchy(e, t) {
1014
+ let n = this.getFallbackCodes((t === !1 ? [] : t) || this.options.fallbackLng || [], e), r = [], i = (e) => {
1015
+ e && (this.isSupportedCode(e) ? r.push(e) : this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`));
1016
+ };
1017
+ return s(e) && (e.indexOf("-") > -1 || e.indexOf("_") > -1) ? (this.options.load !== "languageOnly" && i(this.formatLanguageCode(e)), this.options.load !== "languageOnly" && this.options.load !== "currentOnly" && i(this.getScriptPartFromCode(e)), this.options.load !== "currentOnly" && i(this.getLanguagePartFromCode(e))) : s(e) && i(this.formatLanguageCode(e)), n.forEach((e) => {
1018
+ r.indexOf(e) < 0 && i(this.formatLanguageCode(e));
1019
+ }), r;
1020
+ }
1021
+ }, z = {
1022
+ zero: 0,
1023
+ one: 1,
1024
+ two: 2,
1025
+ few: 3,
1026
+ many: 4,
1027
+ other: 5
1028
+ }, B = {
1029
+ select: (e) => e === 1 ? "one" : "other",
1030
+ resolvedOptions: () => ({ pluralCategories: ["one", "other"] })
1031
+ }, ne = class {
1032
+ constructor(e, t = {}) {
1033
+ this.languageUtils = e, this.options = t, this.logger = k.create("pluralResolver"), this.pluralRulesCache = {};
1034
+ }
1035
+ clearCache() {
1036
+ this.pluralRulesCache = {};
1037
+ }
1038
+ getRule(e, t = {}) {
1039
+ let n = O(e === "dev" ? "en" : e), r = t.ordinal ? "ordinal" : "cardinal", i = JSON.stringify({
1040
+ cleanedCode: n,
1041
+ type: r
1042
+ });
1043
+ if (i in this.pluralRulesCache) return this.pluralRulesCache[i];
1044
+ let a;
1045
+ try {
1046
+ a = new Intl.PluralRules(n, { type: r });
1047
+ } catch {
1048
+ if (typeof Intl > "u") return this.logger.error("No Intl support, please use an Intl polyfill!"), B;
1049
+ if (!e.match(/-|_/)) return B;
1050
+ let n = this.languageUtils.getLanguagePartFromCode(e);
1051
+ a = this.getRule(n, t);
1052
+ }
1053
+ return this.pluralRulesCache[i] = a, a;
1054
+ }
1055
+ needsPlural(e, t = {}) {
1056
+ let n = this.getRule(e, t);
1057
+ return n ||= this.getRule("dev", t), n?.resolvedOptions().pluralCategories.length > 1;
1058
+ }
1059
+ getPluralFormsOfKey(e, t, n = {}) {
1060
+ return this.getSuffixes(e, n).map((e) => `${t}${e}`);
1061
+ }
1062
+ getSuffixes(e, t = {}) {
1063
+ let n = this.getRule(e, t);
1064
+ return n ||= this.getRule("dev", t), n ? n.resolvedOptions().pluralCategories.sort((e, t) => z[e] - z[t]).map((e) => `${this.options.prepend}${t.ordinal ? `ordinal${this.options.prepend}` : ""}${e}`) : [];
1065
+ }
1066
+ getSuffix(e, t, n = {}) {
1067
+ let r = this.getRule(e, n);
1068
+ 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));
1069
+ }
1070
+ }, V = (e, t, n, r = ".", i = !0) => {
1071
+ let a = v(e, t, n);
1072
+ return !a && i && s(n) && (a = D(e, n, r), a === void 0 && (a = D(t, n, r))), a;
1073
+ }, H = (e) => e.replace(/\$/g, "$$$$"), U = class {
1074
+ constructor(e = {}) {
1075
+ this.logger = k.create("interpolator"), this.options = e, this.format = e?.interpolation?.format || ((e) => e), this.init(e);
1076
+ }
1077
+ init(e = {}) {
1078
+ e.interpolation ||= { escapeValue: !0 };
1079
+ let { escape: t, escapeValue: n, useRawValueToEscape: r, prefix: i, prefixEscaped: a, suffix: o, suffixEscaped: s, formatSeparator: c, unescapeSuffix: l, unescapePrefix: u, nestingPrefix: d, nestingPrefixEscaped: f, nestingSuffix: p, nestingSuffixEscaped: m, nestingOptionsSeparator: h, maxReplaces: g, alwaysFormat: _ } = e.interpolation;
1080
+ this.escape = t === void 0 ? S : t, this.escapeValue = n === void 0 || n, this.useRawValueToEscape = r !== void 0 && r, this.prefix = i ? b(i) : a || "{{", this.suffix = o ? b(o) : s || "}}", this.formatSeparator = c || ",", this.unescapePrefix = l ? "" : u || "-", this.unescapeSuffix = this.unescapePrefix ? "" : l || "", this.nestingPrefix = d ? b(d) : f || b("$t("), this.nestingSuffix = p ? b(p) : m || b(")"), this.nestingOptionsSeparator = h || ",", this.maxReplaces = g || 1e3, this.alwaysFormat = _ !== void 0 && _, this.resetRegExp();
1081
+ }
1082
+ reset() {
1083
+ this.options && this.init(this.options);
1084
+ }
1085
+ resetRegExp() {
1086
+ let e = (e, t) => e?.source === t ? (e.lastIndex = 0, e) : new RegExp(t, "g");
1087
+ 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}`);
1088
+ }
1089
+ interpolate(e, t, n, r) {
1090
+ let i, a, o, c = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {}, u = (e) => {
1091
+ if (e.indexOf(this.formatSeparator) < 0) {
1092
+ let i = V(t, c, e, this.options.keySeparator, this.options.ignoreJSONStructure);
1093
+ return this.alwaysFormat ? this.format(i, void 0, n, {
1094
+ ...r,
1095
+ ...t,
1096
+ interpolationkey: e
1097
+ }) : i;
1098
+ }
1099
+ let i = e.split(this.formatSeparator), a = i.shift().trim(), o = i.join(this.formatSeparator).trim();
1100
+ return this.format(V(t, c, a, this.options.keySeparator, this.options.ignoreJSONStructure), o, n, {
1101
+ ...r,
1102
+ ...t,
1103
+ interpolationkey: a
1104
+ });
1105
+ };
1106
+ this.resetRegExp();
1107
+ let d = r?.missingInterpolationHandler || this.options.missingInterpolationHandler, f = r?.interpolation?.skipOnVariables === void 0 ? this.options.interpolation.skipOnVariables : r.interpolation.skipOnVariables;
1108
+ return [{
1109
+ regex: this.regexpUnescape,
1110
+ safeValue: (e) => H(e)
1111
+ }, {
1112
+ regex: this.regexp,
1113
+ safeValue: (e) => this.escapeValue ? H(this.escape(e)) : H(e)
1114
+ }].forEach((t) => {
1115
+ for (o = 0; i = t.regex.exec(e);) {
1116
+ let n = i[1].trim();
1117
+ if (a = u(n), a === void 0) if (typeof d == "function") {
1118
+ let t = d(e, i, r);
1119
+ a = s(t) ? t : "";
1120
+ } else if (r && Object.prototype.hasOwnProperty.call(r, n)) a = "";
1121
+ else if (f) {
1122
+ a = i[0];
1123
+ continue;
1124
+ } else this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`), a = "";
1125
+ else !s(a) && !this.useRawValueToEscape && (a = l(a));
1126
+ let c = t.safeValue(a);
1127
+ if (e = e.replace(i[0], c), f ? (t.regex.lastIndex += a.length, t.regex.lastIndex -= i[0].length) : t.regex.lastIndex = 0, o++, o >= this.maxReplaces) break;
1128
+ }
1129
+ }), e;
1130
+ }
1131
+ nest(e, t, n = {}) {
1132
+ let r, i, a, o = (e, t) => {
1133
+ let n = this.nestingOptionsSeparator;
1134
+ if (e.indexOf(n) < 0) return e;
1135
+ let r = e.split(RegExp(`${b(n)}[ ]*{`)), i = `{${r[1]}`;
1136
+ e = r[0], i = this.interpolate(i, a);
1137
+ let o = i.match(/'/g), s = i.match(/"/g);
1138
+ ((o?.length ?? 0) % 2 == 0 && !s || (s?.length ?? 0) % 2 != 0) && (i = i.replace(/'/g, "\""));
1139
+ try {
1140
+ a = JSON.parse(i), t && (a = {
1141
+ ...t,
1142
+ ...a
1143
+ });
1144
+ } catch (t) {
1145
+ return this.logger.warn(`failed parsing options string in nesting for key ${e}`, t), `${e}${n}${i}`;
1146
+ }
1147
+ return a.defaultValue && a.defaultValue.indexOf(this.prefix) > -1 && delete a.defaultValue, e;
1148
+ };
1149
+ for (; r = this.nestingRegexp.exec(e);) {
1150
+ let c = [];
1151
+ a = { ...n }, a = a.replace && !s(a.replace) ? a.replace : a, a.applyPostProcessor = !1, delete a.defaultValue;
1152
+ let u = /{.*}/.test(r[1]) ? r[1].lastIndexOf("}") + 1 : r[1].indexOf(this.formatSeparator);
1153
+ if (u !== -1 && (c = r[1].slice(u).split(this.formatSeparator).map((e) => e.trim()).filter(Boolean), r[1] = r[1].slice(0, u)), i = t(o.call(this, r[1].trim(), a), a), i && r[0] === e && !s(i)) return i;
1154
+ s(i) || (i = l(i)), i ||= (this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`), ""), c.length && (i = c.reduce((e, t) => this.format(e, t, n.lng, {
1155
+ ...n,
1156
+ interpolationkey: r[1].trim()
1157
+ }), i.trim())), e = e.replace(r[0], i), this.regexp.lastIndex = 0;
1158
+ }
1159
+ return e;
1160
+ }
1161
+ }, re = (e) => {
1162
+ let t = e.toLowerCase().trim(), n = {};
1163
+ if (e.indexOf("(") > -1) {
1164
+ let r = e.split("(");
1165
+ t = r[0].toLowerCase().trim();
1166
+ let i = r[1].substring(0, r[1].length - 1);
1167
+ t === "currency" && i.indexOf(":") < 0 ? n.currency ||= i.trim() : t === "relativetime" && i.indexOf(":") < 0 ? n.range ||= i.trim() : i.split(";").forEach((e) => {
1168
+ if (e) {
1169
+ let [t, ...r] = e.split(":"), i = r.join(":").trim().replace(/^'+|'+$/g, ""), a = t.trim();
1170
+ n[a] || (n[a] = i), i === "false" && (n[a] = !1), i === "true" && (n[a] = !0), isNaN(i) || (n[a] = parseInt(i, 10));
1171
+ }
1172
+ });
1173
+ }
1174
+ return {
1175
+ formatName: t,
1176
+ formatOptions: n
1177
+ };
1178
+ }, W = (e) => {
1179
+ let t = {};
1180
+ return (n, r, i) => {
1181
+ let a = i;
1182
+ i && i.interpolationkey && i.formatParams && i.formatParams[i.interpolationkey] && i[i.interpolationkey] && (a = {
1183
+ ...a,
1184
+ [i.interpolationkey]: void 0
1185
+ });
1186
+ let o = r + JSON.stringify(a), s = t[o];
1187
+ return s || (s = e(O(r), i), t[o] = s), s(n);
1188
+ };
1189
+ }, ie = (e) => (t, n, r) => e(O(n), r)(t), ae = class {
1190
+ constructor(e = {}) {
1191
+ this.logger = k.create("formatter"), this.options = e, this.init(e);
1192
+ }
1193
+ init(e, t = { interpolation: {} }) {
1194
+ this.formatSeparator = t.interpolation.formatSeparator || ",";
1195
+ let n = t.cacheInBuiltFormats ? W : ie;
1196
+ this.formats = {
1197
+ number: n((e, t) => {
1198
+ let n = new Intl.NumberFormat(e, { ...t });
1199
+ return (e) => n.format(e);
1200
+ }),
1201
+ currency: n((e, t) => {
1202
+ let n = new Intl.NumberFormat(e, {
1203
+ ...t,
1204
+ style: "currency"
1205
+ });
1206
+ return (e) => n.format(e);
1207
+ }),
1208
+ datetime: n((e, t) => {
1209
+ let n = new Intl.DateTimeFormat(e, { ...t });
1210
+ return (e) => n.format(e);
1211
+ }),
1212
+ relativetime: n((e, t) => {
1213
+ let n = new Intl.RelativeTimeFormat(e, { ...t });
1214
+ return (e) => n.format(e, t.range || "day");
1215
+ }),
1216
+ list: n((e, t) => {
1217
+ let n = new Intl.ListFormat(e, { ...t });
1218
+ return (e) => n.format(e);
1219
+ })
1220
+ };
1221
+ }
1222
+ add(e, t) {
1223
+ this.formats[e.toLowerCase().trim()] = t;
1224
+ }
1225
+ addCached(e, t) {
1226
+ this.formats[e.toLowerCase().trim()] = W(t);
1227
+ }
1228
+ format(e, t, n, r = {}) {
1229
+ let i = t.split(this.formatSeparator);
1230
+ if (i.length > 1 && i[0].indexOf("(") > 1 && i[0].indexOf(")") < 0 && i.find((e) => e.indexOf(")") > -1)) {
1231
+ let e = i.findIndex((e) => e.indexOf(")") > -1);
1232
+ i[0] = [i[0], ...i.splice(1, e)].join(this.formatSeparator);
1233
+ }
1234
+ return i.reduce((e, t) => {
1235
+ let { formatName: i, formatOptions: a } = re(t);
1236
+ if (this.formats[i]) {
1237
+ let t = e;
1238
+ try {
1239
+ let o = r?.formatParams?.[r.interpolationkey] || {}, s = o.locale || o.lng || r.locale || r.lng || n;
1240
+ t = this.formats[i](e, s, {
1241
+ ...a,
1242
+ ...r,
1243
+ ...o
1244
+ });
1245
+ } catch (e) {
1246
+ this.logger.warn(e);
1247
+ }
1248
+ return t;
1249
+ } else this.logger.warn(`there was no format function for ${i}`);
1250
+ return e;
1251
+ }, e);
1252
+ }
1253
+ }, oe = (e, t) => {
1254
+ e.pending[t] !== void 0 && (delete e.pending[t], e.pendingCount--);
1255
+ }, se = class extends A {
1256
+ constructor(e, t, n, r = {}) {
1257
+ super(), this.backend = e, this.store = t, this.services = n, this.languageUtils = n.languageUtils, this.options = r, this.logger = k.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);
1258
+ }
1259
+ queueLoad(e, t, n, r) {
1260
+ let i = {}, a = {}, o = {}, s = {};
1261
+ return e.forEach((e) => {
1262
+ let r = !0;
1263
+ t.forEach((t) => {
1264
+ let o = `${e}|${t}`;
1265
+ !n.reload && this.store.hasResourceBundle(e, t) ? this.state[o] = 2 : this.state[o] < 0 || (this.state[o] === 1 ? a[o] === void 0 && (a[o] = !0) : (this.state[o] = 1, r = !1, a[o] === void 0 && (a[o] = !0), i[o] === void 0 && (i[o] = !0), s[t] === void 0 && (s[t] = !0)));
1266
+ }), r || (o[e] = !0);
1267
+ }), (Object.keys(i).length || Object.keys(a).length) && this.queue.push({
1268
+ pending: a,
1269
+ pendingCount: Object.keys(a).length,
1270
+ loaded: {},
1271
+ errors: [],
1272
+ callback: r
1273
+ }), {
1274
+ toLoad: Object.keys(i),
1275
+ pending: Object.keys(a),
1276
+ toLoadLanguages: Object.keys(o),
1277
+ toLoadNamespaces: Object.keys(s)
1278
+ };
1279
+ }
1280
+ loaded(e, t, n) {
1281
+ let r = e.split("|"), i = r[0], a = r[1];
1282
+ 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);
1283
+ let o = {};
1284
+ this.queue.forEach((n) => {
1285
+ g(n.loaded, [i], a), oe(n, e), t && n.errors.push(t), n.pendingCount === 0 && !n.done && (Object.keys(n.loaded).forEach((e) => {
1286
+ o[e] || (o[e] = {});
1287
+ let t = n.loaded[e];
1288
+ t.length && t.forEach((t) => {
1289
+ o[e][t] === void 0 && (o[e][t] = !0);
1290
+ });
1291
+ }), n.done = !0, n.errors.length ? n.callback(n.errors) : n.callback());
1292
+ }), this.emit("loaded", o), this.queue = this.queue.filter((e) => !e.done);
1293
+ }
1294
+ read(e, t, n, r = 0, i = this.retryTimeout, a) {
1295
+ if (!e.length) return a(null, {});
1296
+ if (this.readingCalls >= this.maxParallelReads) {
1297
+ this.waitingReads.push({
1298
+ lng: e,
1299
+ ns: t,
1300
+ fcName: n,
1301
+ tried: r,
1302
+ wait: i,
1303
+ callback: a
1304
+ });
1305
+ return;
1306
+ }
1307
+ this.readingCalls++;
1308
+ let o = (o, s) => {
1309
+ if (this.readingCalls--, this.waitingReads.length > 0) {
1310
+ let e = this.waitingReads.shift();
1311
+ this.read(e.lng, e.ns, e.fcName, e.tried, e.wait, e.callback);
1312
+ }
1313
+ if (o && s && r < this.maxRetries) {
1314
+ setTimeout(() => {
1315
+ this.read.call(this, e, t, n, r + 1, i * 2, a);
1316
+ }, i);
1317
+ return;
1318
+ }
1319
+ a(o, s);
1320
+ }, s = this.backend[n].bind(this.backend);
1321
+ if (s.length === 2) {
1322
+ try {
1323
+ let n = s(e, t);
1324
+ n && typeof n.then == "function" ? n.then((e) => o(null, e)).catch(o) : o(null, n);
1325
+ } catch (e) {
1326
+ o(e);
1327
+ }
1328
+ return;
1329
+ }
1330
+ return s(e, t, o);
1331
+ }
1332
+ prepareLoading(e, t, n = {}, r) {
1333
+ if (!this.backend) return this.logger.warn("No backend was added via i18next.use. Will not load resources."), r && r();
1334
+ s(e) && (e = this.languageUtils.toResolveHierarchy(e)), s(t) && (t = [t]);
1335
+ let i = this.queueLoad(e, t, n, r);
1336
+ if (!i.toLoad.length) return i.pending.length || r(), null;
1337
+ i.toLoad.forEach((e) => {
1338
+ this.loadOne(e);
1339
+ });
1340
+ }
1341
+ load(e, t, n) {
1342
+ this.prepareLoading(e, t, {}, n);
1343
+ }
1344
+ reload(e, t, n) {
1345
+ this.prepareLoading(e, t, { reload: !0 }, n);
1346
+ }
1347
+ loadOne(e, t = "") {
1348
+ let n = e.split("|"), r = n[0], i = n[1];
1349
+ this.read(r, i, "read", void 0, void 0, (n, a) => {
1350
+ n && this.logger.warn(`${t}loading namespace ${i} for language ${r} failed`, n), !n && a && this.logger.log(`${t}loaded namespace ${i} for language ${r}`, a), this.loaded(e, n, a);
1351
+ });
1352
+ }
1353
+ saveMissing(e, t, n, r, i, a = {}, o = () => {}) {
1354
+ if (this.services?.utils?.hasLoadedNamespace && !this.services?.utils?.hasLoadedNamespace(t)) {
1355
+ this.logger.warn(`did not save key "${n}" 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!!!");
1356
+ return;
1357
+ }
1358
+ if (!(n == null || n === "")) {
1359
+ if (this.backend?.create) {
1360
+ let s = {
1361
+ ...a,
1362
+ isUpdate: i
1363
+ }, c = this.backend.create.bind(this.backend);
1364
+ if (c.length < 6) try {
1365
+ let i;
1366
+ i = c.length === 5 ? c(e, t, n, r, s) : c(e, t, n, r), i && typeof i.then == "function" ? i.then((e) => o(null, e)).catch(o) : o(null, i);
1367
+ } catch (e) {
1368
+ o(e);
1369
+ }
1370
+ else c(e, t, n, r, o, s);
1371
+ }
1372
+ !e || !e[0] || this.store.addResource(e[0], t, n, r);
1373
+ }
1374
+ }
1375
+ }, G = () => ({
1376
+ debug: !1,
1377
+ initAsync: !0,
1378
+ ns: ["translation"],
1379
+ defaultNS: ["translation"],
1380
+ fallbackLng: ["dev"],
1381
+ fallbackNS: !1,
1382
+ supportedLngs: !1,
1383
+ nonExplicitSupportedLngs: !1,
1384
+ load: "all",
1385
+ preload: !1,
1386
+ simplifyPluralSuffix: !0,
1387
+ keySeparator: ".",
1388
+ nsSeparator: ":",
1389
+ pluralSeparator: "_",
1390
+ contextSeparator: "_",
1391
+ partialBundledLanguages: !1,
1392
+ saveMissing: !1,
1393
+ updateMissing: !1,
1394
+ saveMissingTo: "fallback",
1395
+ saveMissingPlurals: !0,
1396
+ missingKeyHandler: !1,
1397
+ missingInterpolationHandler: !1,
1398
+ postProcess: !1,
1399
+ postProcessPassResolved: !1,
1400
+ returnNull: !1,
1401
+ returnEmptyString: !0,
1402
+ returnObjects: !1,
1403
+ joinArrays: !1,
1404
+ returnedObjectHandler: !1,
1405
+ parseMissingKeyHandler: !1,
1406
+ appendNamespaceToMissingKey: !1,
1407
+ appendNamespaceToCIMode: !1,
1408
+ overloadTranslationOptionHandler: (e) => {
1409
+ let t = {};
1410
+ if (typeof e[1] == "object" && (t = e[1]), s(e[1]) && (t.defaultValue = e[1]), s(e[2]) && (t.tDescription = e[2]), typeof e[2] == "object" || typeof e[3] == "object") {
1411
+ let n = e[3] || e[2];
1412
+ Object.keys(n).forEach((e) => {
1413
+ t[e] = n[e];
1414
+ });
1415
+ }
1416
+ return t;
1417
+ },
1418
+ interpolation: {
1419
+ escapeValue: !0,
1420
+ format: (e) => e,
1421
+ prefix: "{{",
1422
+ suffix: "}}",
1423
+ formatSeparator: ",",
1424
+ unescapePrefix: "-",
1425
+ nestingPrefix: "$t(",
1426
+ nestingSuffix: ")",
1427
+ nestingOptionsSeparator: ",",
1428
+ maxReplaces: 1e3,
1429
+ skipOnVariables: !0
1430
+ },
1431
+ cacheInBuiltFormats: !0
1432
+ }), K = (e) => (s(e.ns) && (e.ns = [e.ns]), s(e.fallbackLng) && (e.fallbackLng = [e.fallbackLng]), s(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), q = () => {}, ce = (e) => {
1433
+ Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach((t) => {
1434
+ typeof e[t] == "function" && (e[t] = e[t].bind(e));
1435
+ });
1436
+ }, J = "__i18next_supportNoticeShown", le = () => !!(typeof globalThis < "u" && globalThis[J] || typeof process < "u" && process.env && process.env.I18NEXT_NO_SUPPORT_NOTICE || typeof process < "u" && process.env), ue = () => {
1437
+ typeof globalThis < "u" && (globalThis[J] = !0);
1438
+ }, de = (e) => !!(e?.modules?.backend?.name?.indexOf("Locize") > 0 || e?.modules?.backend?.constructor?.name?.indexOf("Locize") > 0 || e?.options?.backend?.backends && e.options.backend.backends.some((e) => e?.name?.indexOf("Locize") > 0 || e?.constructor?.name?.indexOf("Locize") > 0) || e?.options?.backend?.projectId || e?.options?.backend?.backendOptions && e.options.backend.backendOptions.some((e) => e?.projectId)), Y = class e extends A {
1439
+ constructor(e = {}, t) {
1440
+ if (super(), this.options = K(e), this.services = {}, this.logger = k, this.modules = { external: [] }, ce(this), t && !this.isInitialized && !e.isClone) {
1441
+ if (!this.options.initAsync) return this.init(e, t), this;
1442
+ setTimeout(() => {
1443
+ this.init(e, t);
1444
+ }, 0);
1445
+ }
1446
+ }
1447
+ init(e = {}, t) {
1448
+ this.isInitializing = !0, typeof e == "function" && (t = e, e = {}), e.defaultNS == null && e.ns && (s(e.ns) ? e.defaultNS = e.ns : e.ns.indexOf("translation") < 0 && (e.defaultNS = e.ns[0]));
1449
+ let n = G();
1450
+ this.options = {
1451
+ ...n,
1452
+ ...this.options,
1453
+ ...K(e)
1454
+ }, this.options.interpolation = {
1455
+ ...n.interpolation,
1456
+ ...this.options.interpolation
1457
+ }, e.keySeparator !== void 0 && (this.options.userDefinedKeySeparator = e.keySeparator), e.nsSeparator !== void 0 && (this.options.userDefinedNsSeparator = e.nsSeparator), typeof this.options.overloadTranslationOptionHandler != "function" && (this.options.overloadTranslationOptionHandler = n.overloadTranslationOptionHandler), this.options.showSupportNotice !== !1 && !de(this) && !le() && (typeof console < "u" && console.info !== void 0 && console.info("🌐 i18next is made possible by our own product, Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙"), ue());
1458
+ let r = (e) => e ? typeof e == "function" ? new e() : e : null;
1459
+ if (!this.options.isClone) {
1460
+ this.modules.logger ? k.init(r(this.modules.logger), this.options) : k.init(null, this.options);
1461
+ let e;
1462
+ e = this.modules.formatter ? this.modules.formatter : ae;
1463
+ let t = new R(this.options);
1464
+ this.store = new j(this.options.resources, this.options);
1465
+ let i = this.services;
1466
+ i.logger = k, i.resourceStore = this.store, i.languageUtils = t, i.pluralResolver = new ne(t, {
1467
+ prepend: this.options.pluralSeparator,
1468
+ simplifyPluralSuffix: this.options.simplifyPluralSuffix
1469
+ }), 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 U(this.options), i.utils = { hasLoadedNamespace: this.hasLoadedNamespace.bind(this) }, i.backendConnector = new se(r(this.modules.backend), i.resourceStore, i, this.options), i.backendConnector.on("*", (e, ...t) => {
1470
+ this.emit(e, ...t);
1471
+ }), 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 L(this.services, this.options), this.translator.on("*", (e, ...t) => {
1472
+ this.emit(e, ...t);
1473
+ }), this.modules.external.forEach((e) => {
1474
+ e.init && e.init(this);
1475
+ });
1476
+ }
1477
+ if (this.format = this.options.interpolation.format, t ||= q, this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
1478
+ let e = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);
1479
+ e.length > 0 && e[0] !== "dev" && (this.options.lng = e[0]);
1480
+ }
1481
+ !this.services.languageDetector && !this.options.lng && this.logger.warn("init: no languageDetector is used and no lng is defined"), [
1482
+ "getResource",
1483
+ "hasResourceBundle",
1484
+ "getResourceBundle",
1485
+ "getDataByLanguage"
1486
+ ].forEach((e) => {
1487
+ this[e] = (...t) => this.store[e](...t);
1488
+ }), [
1489
+ "addResource",
1490
+ "addResources",
1491
+ "addResourceBundle",
1492
+ "removeResourceBundle"
1493
+ ].forEach((e) => {
1494
+ this[e] = (...t) => (this.store[e](...t), this);
1495
+ });
1496
+ let i = c(), a = () => {
1497
+ let e = (e, n) => {
1498
+ 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);
1499
+ };
1500
+ if (this.languages && !this.isInitialized) return e(null, this.t.bind(this));
1501
+ this.changeLanguage(this.options.lng, e);
1502
+ };
1503
+ return this.options.resources || !this.options.initAsync ? a() : setTimeout(a, 0), i;
1504
+ }
1505
+ loadResources(e, t = q) {
1506
+ let n = t, r = s(e) ? e : this.language;
1507
+ if (typeof e == "function" && (n = e), !this.options.resources || this.options.partialBundledLanguages) {
1508
+ if (r?.toLowerCase() === "cimode" && (!this.options.preload || this.options.preload.length === 0)) return n();
1509
+ let e = [], t = (t) => {
1510
+ t && t !== "cimode" && this.services.languageUtils.toResolveHierarchy(t).forEach((t) => {
1511
+ t !== "cimode" && e.indexOf(t) < 0 && e.push(t);
1512
+ });
1513
+ };
1514
+ r ? t(r) : this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((e) => t(e)), this.options.preload?.forEach?.((e) => t(e)), this.services.backendConnector.load(e, this.options.ns, (e) => {
1515
+ !e && !this.resolvedLanguage && this.language && this.setResolvedLanguage(this.language), n(e);
1516
+ });
1517
+ } else n(null);
1518
+ }
1519
+ reloadResources(e, t, n) {
1520
+ let r = c();
1521
+ 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 ||= q, this.services.backendConnector.reload(e, t, (e) => {
1522
+ r.resolve(), n(e);
1523
+ }), r;
1524
+ }
1525
+ use(e) {
1526
+ if (!e) throw Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");
1527
+ if (!e.type) throw Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");
1528
+ 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" && M.addPostProcessor(e), e.type === "formatter" && (this.modules.formatter = e), e.type === "3rdParty" && this.modules.external.push(e), this;
1529
+ }
1530
+ setResolvedLanguage(e) {
1531
+ if (!(!e || !this.languages) && !(["cimode", "dev"].indexOf(e) > -1)) {
1532
+ for (let e = 0; e < this.languages.length; e++) {
1533
+ let t = this.languages[e];
1534
+ if (!(["cimode", "dev"].indexOf(t) > -1) && this.store.hasLanguageSomeTranslations(t)) {
1535
+ this.resolvedLanguage = t;
1536
+ break;
1537
+ }
1538
+ }
1539
+ !this.resolvedLanguage && this.languages.indexOf(e) < 0 && this.store.hasLanguageSomeTranslations(e) && (this.resolvedLanguage = e, this.languages.unshift(e));
1540
+ }
1541
+ }
1542
+ changeLanguage(e, t) {
1543
+ this.isLanguageChangingTo = e;
1544
+ let n = c();
1545
+ this.emit("languageChanging", e);
1546
+ let r = (e) => {
1547
+ this.language = e, this.languages = this.services.languageUtils.toResolveHierarchy(e), this.resolvedLanguage = void 0, this.setResolvedLanguage(e);
1548
+ }, i = (i, a) => {
1549
+ a ? this.isLanguageChangingTo === e && (r(a), this.translator.changeLanguage(a), this.isLanguageChangingTo = void 0, this.emit("languageChanged", a), this.logger.log("languageChanged", a)) : this.isLanguageChangingTo = void 0, n.resolve((...e) => this.t(...e)), t && t(i, (...e) => this.t(...e));
1550
+ }, a = (t) => {
1551
+ !e && !t && this.services.languageDetector && (t = []);
1552
+ let n = s(t) ? t : t && t[0], a = this.store.hasLanguageSomeTranslations(n) ? n : this.services.languageUtils.getBestMatchFromCodes(s(t) ? [t] : t);
1553
+ a && (this.language || r(a), this.translator.language || this.translator.changeLanguage(a), this.services.languageDetector?.cacheUserLanguage?.(a)), this.loadResources(a, (e) => {
1554
+ i(e, a);
1555
+ });
1556
+ };
1557
+ return !e && this.services.languageDetector && !this.services.languageDetector.async ? a(this.services.languageDetector.detect()) : !e && this.services.languageDetector && this.services.languageDetector.async ? this.services.languageDetector.detect.length === 0 ? this.services.languageDetector.detect().then(a) : this.services.languageDetector.detect(a) : a(e), n;
1558
+ }
1559
+ getFixedT(e, t, n) {
1560
+ let r = (e, t, ...i) => {
1561
+ let a;
1562
+ a = typeof t == "object" ? { ...t } : this.options.overloadTranslationOptionHandler([e, t].concat(i)), a.lng = a.lng || r.lng, a.lngs = a.lngs || r.lngs, a.ns = a.ns || r.ns, a.keyPrefix !== "" && (a.keyPrefix = a.keyPrefix || n || r.keyPrefix);
1563
+ let o = {
1564
+ ...this.options,
1565
+ ...a
1566
+ };
1567
+ typeof a.keyPrefix == "function" && (a.keyPrefix = P(a.keyPrefix, o));
1568
+ let s = this.options.keySeparator || ".", c;
1569
+ return a.keyPrefix && Array.isArray(e) ? c = e.map((e) => (typeof e == "function" && (e = P(e, o)), `${a.keyPrefix}${s}${e}`)) : (typeof e == "function" && (e = P(e, o)), c = a.keyPrefix ? `${a.keyPrefix}${s}${e}` : e), this.t(c, a);
1570
+ };
1571
+ return s(e) ? r.lng = e : r.lngs = e, r.ns = t, r.keyPrefix = n, r;
1572
+ }
1573
+ t(...e) {
1574
+ return this.translator?.translate(...e);
1575
+ }
1576
+ exists(...e) {
1577
+ return this.translator?.exists(...e);
1578
+ }
1579
+ setDefaultNamespace(e) {
1580
+ this.options.defaultNS = e;
1581
+ }
1582
+ hasLoadedNamespace(e, t = {}) {
1583
+ if (!this.isInitialized) return this.logger.warn("hasLoadedNamespace: i18next was not initialized", this.languages), !1;
1584
+ if (!this.languages || !this.languages.length) return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty", this.languages), !1;
1585
+ let n = t.lng || this.resolvedLanguage || this.languages[0], r = this.options ? this.options.fallbackLng : !1, i = this.languages[this.languages.length - 1];
1586
+ if (n.toLowerCase() === "cimode") return !0;
1587
+ let a = (e, t) => {
1588
+ let n = this.services.backendConnector.state[`${e}|${t}`];
1589
+ return n === -1 || n === 0 || n === 2;
1590
+ };
1591
+ if (t.precheck) {
1592
+ let e = t.precheck(this, a);
1593
+ if (e !== void 0) return e;
1594
+ }
1595
+ return !!(this.hasResourceBundle(n, e) || !this.services.backendConnector.backend || this.options.resources && !this.options.partialBundledLanguages || a(n, e) && (!r || a(i, e)));
1596
+ }
1597
+ loadNamespaces(e, t) {
1598
+ let n = c();
1599
+ return this.options.ns ? (s(e) && (e = [e]), e.forEach((e) => {
1600
+ this.options.ns.indexOf(e) < 0 && this.options.ns.push(e);
1601
+ }), this.loadResources((e) => {
1602
+ n.resolve(), t && t(e);
1603
+ }), n) : (t && t(), Promise.resolve());
1604
+ }
1605
+ loadLanguages(e, t) {
1606
+ let n = c();
1607
+ s(e) && (e = [e]);
1608
+ let r = this.options.preload || [], i = e.filter((e) => r.indexOf(e) < 0 && this.services.languageUtils.isSupportedCode(e));
1609
+ return i.length ? (this.options.preload = r.concat(i), this.loadResources((e) => {
1610
+ n.resolve(), t && t(e);
1611
+ }), n) : (t && t(), Promise.resolve());
1612
+ }
1613
+ dir(e) {
1614
+ if (e ||= this.resolvedLanguage || (this.languages?.length > 0 ? this.languages[0] : this.language), !e) return "rtl";
1615
+ try {
1616
+ let t = new Intl.Locale(e);
1617
+ if (t && t.getTextInfo) {
1618
+ let e = t.getTextInfo();
1619
+ if (e && e.direction) return e.direction;
1620
+ }
1621
+ } catch {}
1622
+ 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 R(G());
1623
+ return e.toLowerCase().indexOf("-latn") > 1 ? "ltr" : t.indexOf(n.getLanguagePartFromCode(e)) > -1 || e.toLowerCase().indexOf("-arab") > 1 ? "rtl" : "ltr";
1624
+ }
1625
+ static createInstance(t = {}, n) {
1626
+ let r = new e(t, n);
1627
+ return r.createInstance = e.createInstance, r;
1628
+ }
1629
+ cloneInstance(t = {}, n = q) {
1630
+ let r = t.forkResourceStore;
1631
+ r && delete t.forkResourceStore;
1632
+ let i = {
1633
+ ...this.options,
1634
+ ...t,
1635
+ isClone: !0
1636
+ }, a = new e(i);
1637
+ if ((t.debug !== void 0 || t.prefix !== void 0) && (a.logger = a.logger.clone(t)), [
1638
+ "store",
1639
+ "services",
1640
+ "language"
1641
+ ].forEach((e) => {
1642
+ a[e] = this[e];
1643
+ }), a.services = { ...this.services }, a.services.utils = { hasLoadedNamespace: a.hasLoadedNamespace.bind(a) }, r && (a.store = new j(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) {
1644
+ let e = {
1645
+ ...G().interpolation,
1646
+ ...this.options.interpolation,
1647
+ ...t.interpolation
1648
+ }, n = {
1649
+ ...i,
1650
+ interpolation: e
1651
+ };
1652
+ a.services.interpolator = new U(n);
1653
+ }
1654
+ return a.translator = new L(a.services, i), a.translator.on("*", (e, ...t) => {
1655
+ a.emit(e, ...t);
1656
+ }), a.init(i, n), a.translator.options = i, a.translator.backendConnector.services.utils = { hasLoadedNamespace: a.hasLoadedNamespace.bind(a) }, a;
1657
+ }
1658
+ toJSON() {
1659
+ return {
1660
+ options: this.options,
1661
+ store: this.store,
1662
+ language: this.language,
1663
+ languages: this.languages,
1664
+ resolvedLanguage: this.resolvedLanguage
1665
+ };
1666
+ }
1667
+ }.createInstance();
1668
+ //#endregion
1669
+ //#region ../../shared/translator/dist/index.js
1670
+ Y.createInstance, Y.dir, Y.init, Y.loadResources, Y.reloadResources, Y.use, Y.changeLanguage, Y.getFixedT, Y.t, Y.exists, Y.setDefaultNamespace, Y.hasLoadedNamespace, Y.loadNamespaces, Y.loadLanguages, Y.init({
1671
+ fallbackLng: "en",
1672
+ lng: "en",
1673
+ showSupportNotice: !1,
1674
+ resources: {
1675
+ en: a,
1676
+ es: o
1677
+ }
1678
+ });
1679
+ var fe = {
1680
+ translator: {
1681
+ ...Y,
1682
+ t: (e, t) => {
1683
+ let { lng: n } = t;
1684
+ switch (n) {
1685
+ case "en_US":
1686
+ case "en-US":
1687
+ t.lng = "en";
1688
+ break;
1689
+ case "es_ES":
1690
+ case "es-ES":
1691
+ case "es_MX":
1692
+ case "es-MX":
1693
+ t.lng = "es";
1694
+ break;
1695
+ default: break;
1696
+ }
1697
+ return Y.t(e, {
1698
+ lng: n,
1699
+ ...t
1700
+ });
1701
+ }
1702
+ },
1703
+ languageOptions: [{
1704
+ value: "en_US",
1705
+ label: "English (US)"
1706
+ }, {
1707
+ value: "es_ES",
1708
+ label: "Spanish"
1709
+ }]
1710
+ }, pe = /* @__PURE__ */ e(i(), 1), me = Object.prototype;
1711
+ function X(e) {
1712
+ return typeof e == "object" && !!e;
1713
+ }
1714
+ function he(e) {
1715
+ return Array.isArray(e) ? e : typeof e == "number" ? [e] : e.replace(/\[(\d+)\]/g, ".$1").split(".").filter(Boolean);
1716
+ }
1717
+ function ge(e) {
1718
+ return (t) => Ce(t, e);
1719
+ }
1720
+ function _e(e) {
1721
+ return (t) => X(t) ? Object.entries(e).every(([e, n]) => Ee(t[e], n)) : !1;
1722
+ }
1723
+ function ve(e) {
1724
+ return typeof e == "function" ? e : typeof e == "string" ? ge(e) : X(e) ? _e(e) : ((e) => e);
1725
+ }
1726
+ function ye(e) {
1727
+ return Array.isArray(e) ? e.slice() : X(e) ? { ...e } : e;
1728
+ }
1729
+ function Z(e) {
1730
+ if (!X(e)) return e;
1731
+ if (e instanceof Date) return new Date(e.getTime());
1732
+ if (Array.isArray(e)) return e.map((e) => Z(e));
1733
+ let t = {};
1734
+ for (let [n, r] of Object.entries(e)) t[n] = Z(r);
1735
+ return t;
1736
+ }
1737
+ function be(e) {
1738
+ return (e ?? []).filter(Boolean);
1739
+ }
1740
+ function xe(e, t = 0, n = {}) {
1741
+ let r, i, a, o, s, c = n.leading === !0, l = n.trailing !== !1, u = () => {
1742
+ if (!a) return s;
1743
+ let t = a, n = o;
1744
+ return a = void 0, o = void 0, s = e.apply(n, t), s;
1745
+ }, d = () => {
1746
+ r && clearTimeout(r), i && clearTimeout(i), r = void 0, i = void 0, a = void 0, o = void 0;
1747
+ }, f = function(...e) {
1748
+ let d = c && !r;
1749
+ return a = e, o = this, d && u(), r && clearTimeout(r), r = setTimeout(() => {
1750
+ r = void 0, i &&= (clearTimeout(i), void 0), l ? u() : (a = void 0, o = void 0);
1751
+ }, t), n.maxWait !== void 0 && !i && (i = setTimeout(() => {
1752
+ r && clearTimeout(r), r = void 0, i = void 0, l || !c ? u() : (a = void 0, o = void 0);
1753
+ }, n.maxWait)), s;
1754
+ };
1755
+ return f.cancel = d, f.flush = () => (r &&= (clearTimeout(r), void 0), i &&= (clearTimeout(i), void 0), u()), f;
1756
+ }
1757
+ function Se(e) {
1758
+ let t = [];
1759
+ for (let n of e ?? []) Array.isArray(n) ? t.push(...n) : t.push(n);
1760
+ return t;
1761
+ }
1762
+ function Ce(e, t, n) {
1763
+ if (!Array.isArray(t) && e != null && Object.prototype.hasOwnProperty.call(Object(e), t)) {
1764
+ let r = e[t];
1765
+ return r === void 0 ? n : r;
1766
+ }
1767
+ let r = e;
1768
+ for (let e of he(t)) {
1769
+ if (r == null) return n;
1770
+ r = r[e];
1771
+ }
1772
+ return r === void 0 ? n : r;
1773
+ }
1774
+ function we(e, t) {
1775
+ return typeof e == "string" ? e.includes(String(t)) : Array.isArray(e) ? e.includes(t) : Object.values(e ?? {}).includes(t);
1776
+ }
1777
+ function Te(e) {
1778
+ return e == null ? !0 : typeof e == "string" || Array.isArray(e) ? e.length === 0 : e instanceof Map || e instanceof Set ? e.size === 0 : !X(e) || Object.keys(e).length === 0;
1779
+ }
1780
+ function Q(e, t, n) {
1781
+ let r = n?.(e, t);
1782
+ if (r !== void 0) return !!r;
1783
+ if (Object.is(e, t)) return !0;
1784
+ if (!X(e) || !X(t)) return !1;
1785
+ if (e instanceof Date || t instanceof Date) return e instanceof Date && t instanceof Date && e.getTime() === t.getTime();
1786
+ if (Array.isArray(e) || Array.isArray(t)) return Array.isArray(e) && Array.isArray(t) && e.length === t.length && e.every((e, r) => Q(e, t[r], n));
1787
+ let i = Object.keys(e), a = Object.keys(t);
1788
+ return i.length === a.length && i.every((r) => me.hasOwnProperty.call(t, r) && Q(e[r], t[r], n));
1789
+ }
1790
+ function Ee(e, t) {
1791
+ return Q(e, t);
1792
+ }
1793
+ function De(e) {
1794
+ return Number.isFinite(e);
1795
+ }
1796
+ function Oe(e, ...t) {
1797
+ for (let n of t) if (n) for (let [t, r] of Object.entries(n)) X(r) && !Array.isArray(r) && X(e[t]) ? Oe(e[t], r) : e[t] = Z(r);
1798
+ return e;
1799
+ }
1800
+ function ke(e, t) {
1801
+ let n = { ...e ?? {} };
1802
+ for (let e of Array.isArray(t) ? t : [t]) delete n[e];
1803
+ return n;
1804
+ }
1805
+ function Ae(e, t) {
1806
+ let n = ve(t), r = [];
1807
+ for (let t = e.length - 1; t >= 0; t--) n(e[t], t, e) && r.unshift(...e.splice(t, 1));
1808
+ return r;
1809
+ }
1810
+ function je(e, t, n) {
1811
+ let r = he(t), i = e;
1812
+ return r.forEach((e, t) => {
1813
+ if (t === r.length - 1) {
1814
+ i[e] = n;
1815
+ return;
1816
+ }
1817
+ let a = r[t + 1];
1818
+ i[e] ??= typeof a == "number" || /^\d+$/.test(String(a)) ? [] : {}, i = i[e];
1819
+ }), e;
1820
+ }
1821
+ function Me(e, t) {
1822
+ let n = t ?? ((e) => e);
1823
+ return Array.from({ length: Math.max(0, e) }, (e, t) => n(t));
1824
+ }
1825
+ function Ne(...e) {
1826
+ let t = Math.max(0, ...e.map((e) => e.length));
1827
+ return Array.from({ length: t }, (t, n) => e.map((e) => e[n]));
1828
+ }
1829
+ //#endregion
1830
+ //#region ../../lib-react/categorize/dist/index.js
1831
+ var $ = (0, pe.default)("@pie-lib:categorize"), Pe = (e, t, n) => (t ||= [], t.reduce((t, r) => {
1832
+ let i = Fe(e, r, n - t.count);
1833
+ return t.out.push(i.array), t.count += i.count || 0, t;
1834
+ }, {
1835
+ out: [],
1836
+ count: 0
1837
+ }).out), Fe = (e, t, n) => {
1838
+ if (t ||= [], n === 0) {
1839
+ let n = t.filter((t) => t !== e);
1840
+ return {
1841
+ array: n,
1842
+ count: t.length - n.length
1843
+ };
1844
+ } else {
1845
+ let r = t.reduce((t, r) => (r === e ? t.count < n && (t.count += 1, t.out.push(r)) : t.out.push(r), t), {
1846
+ out: [],
1847
+ count: 0
1848
+ });
1849
+ return {
1850
+ array: r.out,
1851
+ count: r.count
1852
+ };
1853
+ }
1854
+ }, Ie = (e, t) => (t ||= [], t.reduce((e, t) => {
1855
+ if ($("choice: ----> ", t.id, "categoryCount: ", t.categoryCount), t.categoryCount === void 0 || t.categoryCount === 0) return e;
1856
+ {
1857
+ let n = e.map((e) => e.choices);
1858
+ return Pe(t.id, n, t.categoryCount).map((t, n) => ({
1859
+ category: e[n].category,
1860
+ alternateResponses: e[n].alternateResponses,
1861
+ choices: t
1862
+ }));
1863
+ }
1864
+ }, e)), Le = (e, t) => (t ||= [], t.reduce((e, t) => {
1865
+ if ($("choice: ----> ", t.id, "categoryCount: ", t.categoryCount), t.categoryCount === void 0 || t.categoryCount === 0) return e;
1866
+ {
1867
+ let n = {};
1868
+ e.forEach((e) => (e.alternateResponses || []).forEach((e, t) => {
1869
+ t in n || (n[t] = []), n[t].push(e);
1870
+ }));
1871
+ let r = [];
1872
+ return Object.keys(n).forEach((e) => {
1873
+ let i = Pe(t.id, n[e], t.categoryCount);
1874
+ n[e] = i, n[e].forEach((e, t) => {
1875
+ r[t] || (r[t] = []), r[t].push(e);
1876
+ });
1877
+ }), e.map((e, t) => ({
1878
+ category: e.category,
1879
+ alternateResponses: r[t] || e.alternateResponses,
1880
+ choices: e.choices
1881
+ }));
1882
+ }
1883
+ }, e)), Re = (e, t) => {
1884
+ let n = t.reduce((t, n) => t + ze(e, n.choices), 0);
1885
+ return $("[countInAnswer] choiceId:", e, t), n;
1886
+ }, ze = (e, t) => (t || []).filter((t) => t === e).length, Be = (e, t) => !e || !e.id || !Array.isArray(t) ? 0 : t.reduce((t, n) => t + (n.choices || []).filter((t) => t && t.id === e.id).length, 0), Ve = (e, t) => t.filter((t) => t.category !== e), He = (e, t, n) => t.map((t) => {
1887
+ if (!n || t.category === n) {
1888
+ let n = ye(t.choices);
1889
+ return Ae(n, (t) => t === e), {
1890
+ ...t,
1891
+ choices: n
1892
+ };
1893
+ } else return t;
1894
+ }), Ue = (e, t, n) => n.map((n) => n.category === t ? (n.choices = n.choices.reduce((t, n) => (n.id === e.id ? t.findIndex((t) => t.id === e.id) === -1 && t.push(n) : t.push(n), t), []), n) : (n.choices = (n.choices || []).filter((t) => t !== e.id), n)), We = (e, t, n, r) => ($("[removeChoiceFromCategory] choiceIndex:", n), r.map((r) => {
1895
+ if (r.category === t) {
1896
+ let t = ye(r.choices), i = t.findIndex((t, r) => t === e && r >= n);
1897
+ return i !== -1 && t.splice(i, 1), {
1898
+ ...r,
1899
+ choices: t
1900
+ };
1901
+ } else return r;
1902
+ })), Ge = (e, t, n, r, i) => (i || []).map((e) => {
1903
+ if (e?.category === t) {
1904
+ let t = (e?.alternateResponses || []).map((e, t) => (t === r && (e || []).splice(n, 1), e));
1905
+ return {
1906
+ ...e,
1907
+ alternateResponses: t
1908
+ };
1909
+ }
1910
+ return e;
1911
+ }), Ke = (e, t, n, r, i) => ($("[moveChoiceToCategory] choice: ", e, "from: ", t, "to: ", n, "answers: ", i), t === n ? i : (t && (i = We(e, t, r, i)), i.findIndex((e) => e.category === n) === -1 ? (i.push({
1912
+ category: n,
1913
+ choices: [e]
1914
+ }), i) : i.map((t) => t.category === n ? (t.choices = t.choices || [], t.choices.push(e), t) : t))), qe = (e, t, n, r, i, a, o) => ($("[moveChoiceToAlternate] choice: ", e, "from: ", t, "to: ", n, "answers: ", i, "chocieIndex: ", r), t === n ? i : i.map((r) => (r.category === n && (o !== 0 && r.alternateResponses && (r.alternateResponses[a] = (r.alternateResponses[a] || []).filter((t) => t !== e)), r.alternateResponses || (r.alternateResponses = [], r.alternateResponses[a] = []), r.alternateResponses[a].push(e)), r.category === t && o !== 0 && r.alternateResponses && r.alternateResponses[a] && (r.alternateResponses[a] = r.alternateResponses[a].filter((t) => t !== e)), r))), Je = (e, t) => e.categoryCount > 0 ? Be(e, t) < e.categoryCount : !0, Ye = (e, t) => t.reduce((e, t) => {
1915
+ let n = e.copyOfPossibleResponse.findIndex((e) => t && e === t.id);
1916
+ return n >= 0 ? (e.builtChoices.push({
1917
+ ...t,
1918
+ correct: !0
1919
+ }), e.copyOfPossibleResponse = [...e.copyOfPossibleResponse.slice(0, n), ...e.copyOfPossibleResponse.slice(n + 1)]) : (e.builtChoices.push({
1920
+ ...t,
1921
+ correct: !1
1922
+ }), e.allChoicesAreCorrect = !1), e;
1923
+ }, {
1924
+ builtChoices: [],
1925
+ copyOfPossibleResponse: [...e],
1926
+ allChoicesAreCorrect: !0
1927
+ }), Xe = (e, t) => t.reduce((t, n) => {
1928
+ let r = e[n.id] || [], i = n.choices || [], { builtChoices: a, allChoicesAreCorrect: o } = Ye(r, i), s = i.length === r.length;
1929
+ return t.builtCategories.push({
1930
+ ...n,
1931
+ correct: o && s,
1932
+ choices: a
1933
+ }), t.correct = t.correct && o && s, t;
1934
+ }, {
1935
+ builtCategories: [],
1936
+ correct: !0
1937
+ }), Ze = (e) => e ? e.reduce((e, t) => (e[0] ? e[0][t.category] = t.choices : e.push({ [t.category]: t.choices }), t.alternateResponses && t.alternateResponses.forEach((n, r) => {
1938
+ e[r + 1] ? e[r + 1][t.category] = n : e.push({ [t.category]: n });
1939
+ }), e), []) : [], Qe = (e, t, n) => (e ||= [], n ||= [], t ||= [], e.map((e) => {
1940
+ let { choices: r = [] } = n.find((t) => t.category === e.id) || {};
1941
+ return {
1942
+ ...e,
1943
+ choices: r.map((e) => t.find((t) => t.id === e))
1944
+ };
1945
+ })), $e = (e, t, n, r) => {
1946
+ e ||= [], t ||= [], n ||= [];
1947
+ let i = Ze(r) || [], a = Qe(e, t, n), o, s;
1948
+ if (i.length) {
1949
+ let e = i.reduce((e, t) => {
1950
+ let { builtCategories: n, correct: r } = Xe(t, a);
1951
+ return e.bestResponse === null || !e.entirelyCorrect && r ? {
1952
+ bestResponse: t,
1953
+ builtCategories: n,
1954
+ entirelyCorrect: r
1955
+ } : e;
1956
+ }, {
1957
+ bestResponse: null,
1958
+ builtCategories: [],
1959
+ entirelyCorrect: !1
1960
+ });
1961
+ a = e.builtCategories, o = e.bestResponse, s = e.entirelyCorrect;
1962
+ }
1963
+ return {
1964
+ choices: t.map((e) => Je(e, a) ? e : { empty: !0 }),
1965
+ categories: a,
1966
+ correct: s,
1967
+ bestResponse: o
1968
+ };
1969
+ };
1970
+ //#endregion
1971
+ export { be as C, i as D, fe as E, Ne as S, Se as T, we as _, He as a, Z as b, Le as c, Ge as d, Ee as f, Te as g, De as h, Re as i, We as l, je as m, Ue as n, Ie as o, Oe as p, Ke as r, Ve as s, $e as t, qe as u, ke as v, Ce as w, Me as x, xe as y };
1972
+
1973
+ //# sourceMappingURL=dist-BiRlv37L.js.map