1import { T as je, f as Te, u as Ie, i as Ae } from "./lit-element.chunk-D8LD1Lqz.js"; 2/** 3 * @license 4 * Copyright 2017 Google LLC 5 * SPDX-License-Identifier: BSD-3-Clause 6 */ 7const Fe = { ATTRIBUTE: 1, CHILD: 2 }, De = (n) => (...e) => ({ _$litDirective$: n, values: e }); 8class Ue { 9 constructor(e) { 10 } 11 get _$AU() { 12 return this._$AM._$AU; 13 } 14 _$AT(e, t, a) { 15 this._$Ct = e, this._$AM = t, this._$Ci = a; 16 } 17 _$AS(e, t) { 18 return this.update(e, t); 19 } 20 update(e, t) { 21 return this.render(...t); 22 } 23} 24/** 25 * @license 26 * Copyright 2018 Google LLC 27 * SPDX-License-Identifier: BSD-3-Clause 28 */ 29const ze = De(class extends Ue { 30 constructor(n) { 31 if (super(n), n.type !== Fe.ATTRIBUTE || n.name !== "class" || n.strings?.length > 2) throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute."); 32 } 33 render(n) { 34 return " " + Object.keys(n).filter(((e) => n[e])).join(" ") + " "; 35 } 36 update(n, [e]) { 37 if (this.st === void 0) { 38 this.st = /* @__PURE__ */ new Set(), n.strings !== void 0 && (this.nt = new Set(n.strings.join(" ").split(/\s/).filter(((a) => a !== "")))); 39 for (const a in e) e[a] && !this.nt?.has(a) && this.st.add(a); 40 return this.render(e); 41 } 42 const t = n.element.classList; 43 for (const a of this.st) a in e || (t.remove(a), this.st.delete(a)); 44 for (const a in e) { 45 const s = !!e[a]; 46 s === this.st.has(a) || this.nt?.has(a) || (s ? (t.add(a), this.st.add(a)) : (t.remove(a), this.st.delete(a))); 47 } 48 return je; 49 } 50}); 51/** 52 * @license 53 * Copyright 2017 Google LLC 54 * SPDX-License-Identifier: BSD-3-Clause 55 */ 56const Ve = { attribute: !0, type: String, converter: Ie, reflect: !1, hasChanged: Te }, Me = (n = Ve, e, t) => { 57 const { kind: a, metadata: s } = t; 58 let i = globalThis.litPropertyMetadata.get(s); 59 if (i === void 0 && globalThis.litPropertyMetadata.set(s, i = /* @__PURE__ */ new Map()), a === "setter" && ((n = Object.create(n)).wrapped = !0), i.set(t.name, n), a === "accessor") { 60 const { name: r } = t; 61 return { set(o) { 62 const l = e.get.call(this); 63 e.set.call(this, o), this.requestUpdate(r, l, n); 64 }, init(o) { 65 return o !== void 0 && this.C(r, void 0, n, o), o; 66 } }; 67 } 68 if (a === "setter") { 69 const { name: r } = t; 70 return function(o) { 71 const l = this[r]; 72 e.call(this, o), this.requestUpdate(r, l, n); 73 }; 74 } 75 throw Error("Unsupported decorator location: " + a); 76}; 77function ke(n) { 78 return (e, t) => typeof t == "object" ? Me(n, e, t) : ((a, s, i) => { 79 const r = s.hasOwnProperty(i); 80 return s.constructor.createProperty(i, a), r ? Object.getOwnPropertyDescriptor(s, i) : void 0; 81 })(n, e, t); 82} 83/** 84 * @license 85 * Copyright 2017 Google LLC 86 * SPDX-License-Identifier: BSD-3-Clause 87 */ 88function ee(n) { 89 return ke({ ...n, state: !0, attribute: !1 }); 90} 91const Rt = 320, Ke = 540, He = 768, qe = 1024, Be = 1366, h = (n) => typeof n == "string", V = () => { 92 let n, e; 93 const t = new Promise((a, s) => { 94 n = a, e = s; 95 }); 96 return t.resolve = n, t.reject = e, t; 97}, ne = (n) => n == null ? "" : "" + n, _e = (n, e, t) => { 98 n.forEach((a) => { 99 e[a] && (t[a] = e[a]); 100 }); 101}, We = /###/g, re = (n) => n && n.indexOf("###") > -1 ? n.replace(We, ".") : n, oe = (n) => !n || h(n), M = (n, e, t) => { 102 const a = h(e) ? e.split(".") : e; 103 let s = 0; 104 for (; s < a.length - 1; ) { 105 if (oe(n)) return {}; 106 const i = re(a[s]); 107 !n[i] && t && (n[i] = new t()), Object.prototype.hasOwnProperty.call(n, i) ? n = n[i] : n = {}, ++s; 108 } 109 return oe(n) ? {} : { 110 obj: n, 111 k: re(a[s]) 112 }; 113}, le = (n, e, t) => { 114 const { 115 obj: a, 116 k: s 117 } = M(n, e, Object); 118 if (a !== void 0 || e.length === 1) { 119 a[s] = t; 120 return; 121 } 122 let i = e[e.length - 1], r = e.slice(0, e.length - 1), o = M(n, r, Object); 123 for (; o.obj === void 0 && r.length; ) 124 i = `${r[r.length - 1]}.${i}`, r = r.slice(0, r.length - 1), o = M(n, r, Object), o?.obj && typeof o.obj[`${o.k}.${i}`] < "u" && (o.obj = void 0); 125 o.obj[`${o.k}.${i}`] = t; 126}, Ge = (n, e, t, a) => { 127 const { 128 obj: s, 129 k: i 130 } = M(n, e, Object); 131 s[i] = s[i] || [], s[i].push(t); 132}, _ = (n, e) => { 133 const { 134 obj: t,
vendor: 40,083 bytes, lines 135-1150
135 k: a 136 } = M(n, e); 137 if (t && Object.prototype.hasOwnProperty.call(t, a)) 138 return t[a]; 139}, Je = (n, e, t) => { 140 const a = _(n, t); 141 return a !== void 0 ? a : _(e, t); 142}, Oe = (n, e, t) => { 143 for (const a in e) 144 a !== "__proto__" && a !== "constructor" && (a in n ? h(n[a]) || n[a] instanceof String || h(e[a]) || e[a] instanceof String ? t && (n[a] = e[a]) : Oe(n[a], e[a], t) : n[a] = e[a]); 145 return n; 146}, A = (n) => n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"); 147var Ye = { 148 "&": "&", 149 "<": "<", 150 ">": ">", 151 '"': """, 152 "'": "'", 153 "/": "/" 154}; 155const Qe = (n) => h(n) ? n.replace(/[&<>"'\/]/g, (e) => Ye[e]) : n; 156class Xe { 157 constructor(e) { 158 this.capacity = e, this.regExpMap = /* @__PURE__ */ new Map(), this.regExpQueue = []; 159 } 160 getRegExp(e) { 161 const t = this.regExpMap.get(e); 162 if (t !== void 0) 163 return t; 164 const a = new RegExp(e); 165 return this.regExpQueue.length === this.capacity && this.regExpMap.delete(this.regExpQueue.shift()), this.regExpMap.set(e, a), this.regExpQueue.push(e), a; 166 } 167} 168const Ze = [" ", ",", "?", "!", ";"], et = new Xe(20), tt = (n, e, t) => { 169 e = e || "", t = t || ""; 170 const a = Ze.filter((r) => e.indexOf(r) < 0 && t.indexOf(r) < 0); 171 if (a.length === 0) return !0; 172 const s = et.getRegExp(`(${a.map((r) => r === "?" ? "\\?" : r).join("|")})`); 173 let i = !s.test(n); 174 if (!i) { 175 const r = n.indexOf(t); 176 r > 0 && !s.test(n.substring(0, r)) && (i = !0); 177 } 178 return i; 179}, Z = (n, e, t = ".") => { 180 if (!n) return; 181 if (n[e]) 182 return Object.prototype.hasOwnProperty.call(n, e) ? n[e] : void 0; 183 const a = e.split(t); 184 let s = n; 185 for (let i = 0; i < a.length; ) { 186 if (!s || typeof s != "object") 187 return; 188 let r, o = ""; 189 for (let l = i; l < a.length; ++l) 190 if (l !== i && (o += t), o += a[l], r = s[o], r !== void 0) { 191 if (["string", "number", "boolean"].indexOf(typeof r) > -1 && l < a.length - 1) 192 continue; 193 i += l - i + 1; 194 break; 195 } 196 s = r; 197 } 198 return s; 199}, K = (n) => n?.replace("_", "-"), at = { 200 type: "logger", 201 log(n) { 202 this.output("log", n); 203 }, 204 warn(n) { 205 this.output("warn", n); 206 }, 207 error(n) { 208 this.output("error", n); 209 }, 210 output(n, e) { 211 console?.[n]?.apply?.(console, e); 212 } 213}; 214class W { 215 constructor(e, t = {}) { 216 this.init(e, t); 217 } 218 init(e, t = {}) { 219 this.prefix = t.prefix || "i18next:", this.logger = e || at, this.options = t, this.debug = t.debug; 220 } 221 log(...e) { 222 return this.forward(e, "log", "", !0); 223 } 224 warn(...e) { 225 return this.forward(e, "warn", "", !0); 226 } 227 error(...e) { 228 return this.forward(e, "error", ""); 229 } 230 deprecate(...e) { 231 return this.forward(e, "warn", "WARNING DEPRECATED: ", !0); 232 } 233 forward(e, t, a, s) { 234 return s && !this.debug ? null : (h(e[0]) && (e[0] = `${a}${this.prefix} ${e[0]}`), this.logger[t](e)); 235 } 236 create(e) { 237 return new W(this.logger, { 238 prefix: `${this.prefix}:${e}:`, 239 ...this.options 240 }); 241 } 242 clone(e) { 243 return e = e || this.options, e.prefix = e.prefix || this.prefix, new W(this.logger, e); 244 } 245} 246var C = new W(); 247class J { 248 constructor() { 249 this.observers = {}; 250 } 251 on(e, t) { 252 return e.split(" ").forEach((a) => { 253 this.observers[a] || (this.observers[a] = /* @__PURE__ */ new Map()); 254 const s = this.observers[a].get(t) || 0; 255 this.observers[a].set(t, s + 1); 256 }), this; 257 } 258 off(e, t) { 259 if (this.observers[e]) { 260 if (!t) { 261 delete this.observers[e]; 262 return; 263 } 264 this.observers[e].delete(t); 265 } 266 } 267 emit(e, ...t) { 268 this.observers[e] && Array.from(this.observers[e].entries()).forEach(([s, i]) => { 269 for (let r = 0; r < i; r++) 270 s(...t); 271 }), this.observers["*"] && Array.from(this.observers["*"].entries()).forEach(([s, i]) => { 272 for (let r = 0; r < i; r++) 273 s.apply(s, [e, ...t]); 274 }); 275 } 276} 277class ue extends J { 278 constructor(e, t = { 279 ns: ["translation"], 280 defaultNS: "translation" 281 }) { 282 super(), this.data = e || {}, this.options = t, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.options.ignoreJSONStructure === void 0 && (this.options.ignoreJSONStructure = !0); 283 } 284 addNamespaces(e) { 285 this.options.ns.indexOf(e) < 0 && this.options.ns.push(e); 286 } 287 removeNamespaces(e) { 288 const t = this.options.ns.indexOf(e); 289 t > -1 && this.options.ns.splice(t, 1); 290 } 291 getResource(e, t, a, s = {}) { 292 const i = s.keySeparator !== void 0 ? s.keySeparator : this.options.keySeparator, r = s.ignoreJSONStructure !== void 0 ? s.ignoreJSONStructure : this.options.ignoreJSONStructure; 293 let o; 294 e.indexOf(".") > -1 ? o = e.split(".") : (o = [e, t], a && (Array.isArray(a) ? o.push(...a) : h(a) && i ? o.push(...a.split(i)) : o.push(a))); 295 const l = _(this.data, o); 296 return !l && !t && !a && e.indexOf(".") > -1 && (e = o[0], t = o[1], a = o.slice(2).join(".")), l || !r || !h(a) ? l : Z(this.data?.[e]?.[t], a, i); 297 } 298 addResource(e, t, a, s, i = { 299 silent: !1 300 }) { 301 const r = i.keySeparator !== void 0 ? i.keySeparator : this.options.keySeparator; 302 let o = [e, t]; 303 a && (o = o.concat(r ? a.split(r) : a)), e.indexOf(".") > -1 && (o = e.split("."), s = t, t = o[1]), this.addNamespaces(t), le(this.data, o, s), i.silent || this.emit("added", e, t, a, s); 304 } 305 addResources(e, t, a, s = { 306 silent: !1 307 }) { 308 for (const i in a) 309 (h(a[i]) || Array.isArray(a[i])) && this.addResource(e, t, i, a[i], { 310 silent: !0 311 }); 312 s.silent || this.emit("added", e, t, a); 313 } 314 addResourceBundle(e, t, a, s, i, r = { 315 silent: !1, 316 skipCopy: !1 317 }) { 318 let o = [e, t]; 319 e.indexOf(".") > -1 && (o = e.split("."), s = a, a = t, t = o[1]), this.addNamespaces(t); 320 let l = _(this.data, o) || {}; 321 r.skipCopy || (a = JSON.parse(JSON.stringify(a))), s ? Oe(l, a, i) : l = { 322 ...l, 323 ...a 324 }, le(this.data, o, l), r.silent || this.emit("added", e, t, a); 325 } 326 removeResourceBundle(e, t) { 327 this.hasResourceBundle(e, t) && delete this.data[e][t], this.removeNamespaces(t), this.emit("removed", e, t); 328 } 329 hasResourceBundle(e, t) { 330 return this.getResource(e, t) !== void 0; 331 } 332 getResourceBundle(e, t) { 333 return t || (t = this.options.defaultNS), this.getResource(e, t); 334 } 335 getDataByLanguage(e) { 336 return this.data[e]; 337 } 338 hasLanguageSomeTranslations(e) { 339 const t = this.getDataByLanguage(e); 340 return !!(t && Object.keys(t) || []).find((s) => t[s] && Object.keys(t[s]).length > 0); 341 } 342 toJSON() { 343 return this.data; 344 } 345} 346var Pe = { 347 processors: {}, 348 addPostProcessor(n) { 349 this.processors[n.name] = n; 350 }, 351 handle(n, e, t, a, s) { 352 return n.forEach((i) => { 353 e = this.processors[i]?.process(e, t, a, s) ?? e; 354 }), e; 355 } 356}; 357const de = {}, ce = (n) => !h(n) && typeof n != "boolean" && typeof n != "number"; 358class G extends J { 359 constructor(e, t = {}) { 360 super(), _e(["resourceStore", "languageUtils", "pluralResolver", "interpolator", "backendConnector", "i18nFormat", "utils"], e, this), this.options = t, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.logger = C.create("translator"); 361 } 362 changeLanguage(e) { 363 e && (this.language = e); 364 } 365 exists(e, t = { 366 interpolation: {} 367 }) { 368 const a = { 369 ...t 370 }; 371 return e == null ? !1 : this.resolve(e, a)?.res !== void 0; 372 } 373 extractFromKey(e, t) { 374 let a = t.nsSeparator !== void 0 ? t.nsSeparator : this.options.nsSeparator; 375 a === void 0 && (a = ":"); 376 const s = t.keySeparator !== void 0 ? t.keySeparator : this.options.keySeparator; 377 let i = t.ns || this.options.defaultNS || []; 378 const r = a && e.indexOf(a) > -1, o = !this.options.userDefinedKeySeparator && !t.keySeparator && !this.options.userDefinedNsSeparator && !t.nsSeparator && !tt(e, a, s); 379 if (r && !o) { 380 const l = e.match(this.interpolator.nestingRegexp); 381 if (l && l.length > 0) 382 return { 383 key: e, 384 namespaces: h(i) ? [i] : i 385 }; 386 const u = e.split(a); 387 (a !== s || a === s && this.options.ns.indexOf(u[0]) > -1) && (i = u.shift()), e = u.join(s); 388 } 389 return { 390 key: e, 391 namespaces: h(i) ? [i] : i 392 }; 393 } 394 translate(e, t, a) { 395 let s = typeof t == "object" ? { 396 ...t 397 } : t; 398 if (typeof s != "object" && this.options.overloadTranslationOptionHandler && (s = this.options.overloadTranslationOptionHandler(arguments)), typeof options == "object" && (s = { 399 ...s 400 }), s || (s = {}), e == null) return ""; 401 Array.isArray(e) || (e = [String(e)]); 402 const i = s.returnDetails !== void 0 ? s.returnDetails : this.options.returnDetails, r = s.keySeparator !== void 0 ? s.keySeparator : this.options.keySeparator, { 403 key: o, 404 namespaces: l 405 } = this.extractFromKey(e[e.length - 1], s), u = l[l.length - 1]; 406 let c = s.nsSeparator !== void 0 ? s.nsSeparator : this.options.nsSeparator; 407 c === void 0 && (c = ":"); 408 const d = s.lng || this.language, g = s.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode; 409 if (d?.toLowerCase() === "cimode") 410 return g ? i ? { 411 res: `${u}${c}${o}`, 412 usedKey: o, 413 exactUsedKey: o, 414 usedLng: d, 415 usedNS: u, 416 usedParams: this.getUsedParamsDetails(s) 417 } : `${u}${c}${o}` : i ? { 418 res: o, 419 usedKey: o, 420 exactUsedKey: o, 421 usedLng: d, 422 usedNS: u, 423 usedParams: this.getUsedParamsDetails(s) 424 } : o; 425 const f = this.resolve(e, s); 426 let p = f?.res; 427 const b = f?.usedKey || o, v = f?.exactUsedKey || o, S = ["[object Number]", "[object Function]", "[object RegExp]"], y = s.joinArrays !== void 0 ? s.joinArrays : this.options.joinArrays, $ = !this.i18nFormat || this.i18nFormat.handleAsObject, x = s.count !== void 0 && !h(s.count), E = G.hasDefaultValue(s), T = x ? this.pluralResolver.getSuffix(d, s.count, s) : "", I = s.ordinal && x ? this.pluralResolver.getSuffix(d, s.count, { 428 ordinal: !1 429 }) : "", te = x && !s.ordinal && s.count === 0, N = te && s[`defaultValue${this.options.pluralSeparator}zero`] || s[`defaultValue${T}`] || s[`defaultValue${I}`] || s.defaultValue; 430 let k = p; 431 $ && !p && E && (k = N); 432 const Ne = ce(k), $e = Object.prototype.toString.apply(k); 433 if ($ && k && Ne && S.indexOf($e) < 0 && !(h(y) && Array.isArray(k))) { 434 if (!s.returnObjects && !this.options.returnObjects) { 435 this.options.returnedObjectHandler || this.logger.warn("accessing an object - but returnObjects options is not enabled!"); 436 const O = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(b, k, { 437 ...s, 438 ns: l 439 }) : `key '${o} (${this.language})' returned an object instead of string.`; 440 return i ? (f.res = O, f.usedParams = this.getUsedParamsDetails(s), f) : O; 441 } 442 if (r) { 443 const O = Array.isArray(k), L = O ? [] : {}, ae = O ? v : b; 444 for (const P in k) 445 if (Object.prototype.hasOwnProperty.call(k, P)) { 446 const R = `${ae}${r}${P}`; 447 E && !p ? L[P] = this.translate(R, { 448 ...s, 449 defaultValue: ce(N) ? N[P] : void 0, 450 joinArrays: !1, 451 ns: l 452 }) : L[P] = this.translate(R, { 453 ...s, 454 joinArrays: !1, 455 ns: l 456 }), L[P] === R && (L[P] = k[P]); 457 } 458 p = L; 459 } 460 } else if ($ && h(y) && Array.isArray(p)) 461 p = p.join(y), p && (p = this.extendTranslation(p, e, s, a)); 462 else { 463 let O = !1, L = !1; 464 !this.isValidLookup(p) && E && (O = !0, p = N), this.isValidLookup(p) || (L = !0, p = o); 465 const P = (s.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) && L ? void 0 : p, R = E && N !== p && this.options.updateMissing; 466 if (L || O || R) { 467 if (this.logger.log(R ? "updateKey" : "missingKey", d, u, o, R ? N : p), r) { 468 const w = this.resolve(o, { 469 ...s, 470 keySeparator: !1 471 }); 472 w && w.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."); 473 } 474 let U = []; 475 const q = this.languageUtils.getFallbackCodes(this.options.fallbackLng, s.lng || this.language); 476 if (this.options.saveMissingTo === "fallback" && q && q[0]) 477 for (let w = 0; w < q.length; w++) 478 U.push(q[w]); 479 else this.options.saveMissingTo === "all" ? U = this.languageUtils.toResolveHierarchy(s.lng || this.language) : U.push(s.lng || this.language); 480 const se = (w, j, z) => { 481 const ie = E && z !== p ? z : P; 482 this.options.missingKeyHandler ? this.options.missingKeyHandler(w, u, j, ie, R, s) : this.backendConnector?.saveMissing && this.backendConnector.saveMissing(w, u, j, ie, R, s), this.emit("missingKey", w, u, j, p); 483 }; 484 this.options.saveMissing && (this.options.saveMissingPlurals && x ? U.forEach((w) => { 485 const j = this.pluralResolver.getSuffixes(w, s); 486 te && s[`defaultValue${this.options.pluralSeparator}zero`] && j.indexOf(`${this.options.pluralSeparator}zero`) < 0 && j.push(`${this.options.pluralSeparator}zero`), j.forEach((z) => { 487 se([w], o + z, s[`defaultValue${z}`] || N); 488 }); 489 }) : se(U, o, N)); 490 } 491 p = this.extendTranslation(p, e, s, f, a), L && p === o && this.options.appendNamespaceToMissingKey && (p = `${u}${c}${o}`), (L || O) && this.options.parseMissingKeyHandler && (p = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${u}${c}${o}` : o, O ? p : void 0, s)); 492 } 493 return i ? (f.res = p, f.usedParams = this.getUsedParamsDetails(s), f) : p; 494 } 495 extendTranslation(e, t, a, s, i) { 496 if (this.i18nFormat?.parse) 497 e = this.i18nFormat.parse(e, { 498 ...this.options.interpolation.defaultVariables, 499 ...a 500 }, a.lng || this.language || s.usedLng, s.usedNS, s.usedKey, { 501 resolved: s 502 }); 503 else if (!a.skipInterpolation) { 504 a.interpolation && this.interpolator.init({ 505 ...a, 506 interpolation: { 507 ...this.options.interpolation, 508 ...a.interpolation 509 } 510 }); 511 const l = h(e) && (a?.interpolation?.skipOnVariables !== void 0 ? a.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables); 512 let u; 513 if (l) { 514 const d = e.match(this.interpolator.nestingRegexp); 515 u = d && d.length; 516 } 517 let c = a.replace && !h(a.replace) ? a.replace : a; 518 if (this.options.interpolation.defaultVariables && (c = { 519 ...this.options.interpolation.defaultVariables, 520 ...c 521 }), e = this.interpolator.interpolate(e, c, a.lng || this.language || s.usedLng, a), l) { 522 const d = e.match(this.interpolator.nestingRegexp), g = d && d.length; 523 u < g && (a.nest = !1); 524 } 525 !a.lng && s && s.res && (a.lng = this.language || s.usedLng), a.nest !== !1 && (e = this.interpolator.nest(e, (...d) => i?.[0] === d[0] && !a.context ? (this.logger.warn(`It seems you are nesting recursively key: ${d[0]} in key: ${t[0]}`), null) : this.translate(...d, t), a)), a.interpolation && this.interpolator.reset(); 526 } 527 const r = a.postProcess || this.options.postProcess, o = h(r) ? [r] : r; 528 return e != null && o?.length && a.applyPostProcessor !== !1 && (e = Pe.handle(o, e, t, this.options && this.options.postProcessPassResolved ? { 529 i18nResolved: { 530 ...s, 531 usedParams: this.getUsedParamsDetails(a) 532 }, 533 ...a 534 } : a, this)), e; 535 } 536 resolve(e, t = {}) { 537 let a, s, i, r, o; 538 return h(e) && (e = [e]), e.forEach((l) => { 539 if (this.isValidLookup(a)) return; 540 const u = this.extractFromKey(l, t), c = u.key; 541 s = c; 542 let d = u.namespaces; 543 this.options.fallbackNS && (d = d.concat(this.options.fallbackNS)); 544 const g = t.count !== void 0 && !h(t.count), f = g && !t.ordinal && t.count === 0, p = t.context !== void 0 && (h(t.context) || typeof t.context == "number") && t.context !== "", b = t.lngs ? t.lngs : this.languageUtils.toResolveHierarchy(t.lng || this.language, t.fallbackLng); 545 d.forEach((v) => { 546 this.isValidLookup(a) || (o = v, !de[`${b[0]}-${v}`] && this.utils?.hasLoadedNamespace && !this.utils?.hasLoadedNamespace(o) && (de[`${b[0]}-${v}`] = !0, this.logger.warn(`key "${s}" for languages "${b.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!!!")), b.forEach((S) => { 547 if (this.isValidLookup(a)) return; 548 r = S; 549 const y = [c]; 550 if (this.i18nFormat?.addLookupKeys) 551 this.i18nFormat.addLookupKeys(y, c, S, v, t); 552 else { 553 let x; 554 g && (x = this.pluralResolver.getSuffix(S, t.count, t)); 555 const E = `${this.options.pluralSeparator}zero`, T = `${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`; 556 if (g && (t.ordinal && x.indexOf(T) === 0 && y.push(c + x.replace(T, this.options.pluralSeparator)), y.push(c + x), f && y.push(c + E)), p) { 557 const I = `${c}${this.options.contextSeparator}${t.context}`; 558 y.push(I), g && (y.push(I + x), t.ordinal && x.indexOf(T) === 0 && y.push(I + x.replace(T, this.options.pluralSeparator)), f && y.push(I + E)); 559 } 560 } 561 let $; 562 for (; $ = y.pop(); ) 563 this.isValidLookup(a) || (i = $, a = this.getResource(S, v, $, t)); 564 })); 565 }); 566 }), { 567 res: a, 568 usedKey: s, 569 exactUsedKey: i, 570 usedLng: r, 571 usedNS: o 572 }; 573 } 574 isValidLookup(e) { 575 return e !== void 0 && !(!this.options.returnNull && e === null) && !(!this.options.returnEmptyString && e === ""); 576 } 577 getResource(e, t, a, s = {}) { 578 return this.i18nFormat?.getResource ? this.i18nFormat.getResource(e, t, a, s) : this.resourceStore.getResource(e, t, a, s); 579 } 580 getUsedParamsDetails(e = {}) { 581 const t = ["defaultValue", "ordinal", "context", "replace", "lng", "lngs", "fallbackLng", "ns", "keySeparator", "nsSeparator", "returnObjects", "returnDetails", "joinArrays", "postProcess", "interpolation"], a = e.replace && !h(e.replace); 582 let s = a ? e.replace : e; 583 if (a && typeof e.count < "u" && (s.count = e.count), this.options.interpolation.defaultVariables && (s = { 584 ...this.options.interpolation.defaultVariables, 585 ...s 586 }), !a) { 587 s = { 588 ...s 589 }; 590 for (const i of t) 591 delete s[i]; 592 } 593 return s; 594 } 595 static hasDefaultValue(e) { 596 const t = "defaultValue"; 597 for (const a in e) 598 if (Object.prototype.hasOwnProperty.call(e, a) && t === a.substring(0, t.length) && e[a] !== void 0) 599 return !0; 600 return !1; 601 } 602} 603class pe { 604 constructor(e) { 605 this.options = e, this.supportedLngs = this.options.supportedLngs || !1, this.logger = C.create("languageUtils"); 606 } 607 getScriptPartFromCode(e) { 608 if (e = K(e), !e || e.indexOf("-") < 0) return null; 609 const t = e.split("-"); 610 return t.length === 2 || (t.pop(), t[t.length - 1].toLowerCase() === "x") ? null : this.formatLanguageCode(t.join("-")); 611 } 612 getLanguagePartFromCode(e) { 613 if (e = K(e), !e || e.indexOf("-") < 0) return e; 614 const t = e.split("-"); 615 return this.formatLanguageCode(t[0]); 616 } 617 formatLanguageCode(e) { 618 if (h(e) && e.indexOf("-") > -1) { 619 let t; 620 try { 621 t = Intl.getCanonicalLocales(e)[0]; 622 } catch { 623 } 624 return t && this.options.lowerCaseLng && (t = t.toLowerCase()), t || (this.options.lowerCaseLng ? e.toLowerCase() : e); 625 } 626 return this.options.cleanCode || this.options.lowerCaseLng ? e.toLowerCase() : e; 627 } 628 isSupportedCode(e) { 629 return (this.options.load === "languageOnly" || this.options.nonExplicitSupportedLngs) && (e = this.getLanguagePartFromCode(e)), !this.supportedLngs || !this.supportedLngs.length || this.supportedLngs.indexOf(e) > -1; 630 } 631 getBestMatchFromCodes(e) { 632 if (!e) return null; 633 let t; 634 return e.forEach((a) => { 635 if (t) return; 636 const s = this.formatLanguageCode(a); 637 (!this.options.supportedLngs || this.isSupportedCode(s)) && (t = s); 638 }), !t && this.options.supportedLngs && e.forEach((a) => { 639 if (t) return; 640 const s = this.getScriptPartFromCode(a); 641 if (this.isSupportedCode(s)) return t = s; 642 const i = this.getLanguagePartFromCode(a); 643 if (this.isSupportedCode(i)) return t = i; 644 t = this.options.supportedLngs.find((r) => { 645 if (r === i) return r; 646 if (!(r.indexOf("-") < 0 && i.indexOf("-") < 0) && (r.indexOf("-") > 0 && i.indexOf("-") < 0 && r.substring(0, r.indexOf("-")) === i || r.indexOf(i) === 0 && i.length > 1)) 647 return r; 648 }); 649 }), t || (t = this.getFallbackCodes(this.options.fallbackLng)[0]), t; 650 } 651 getFallbackCodes(e, t) { 652 if (!e) return []; 653 if (typeof e == "function" && (e = e(t)), h(e) && (e = [e]), Array.isArray(e)) return e; 654 if (!t) return e.default || []; 655 let a = e[t]; 656 return a || (a = e[this.getScriptPartFromCode(t)]), a || (a = e[this.formatLanguageCode(t)]), a || (a = e[this.getLanguagePartFromCode(t)]), a || (a = e.default), a || []; 657 } 658 toResolveHierarchy(e, t) { 659 const a = this.getFallbackCodes((t === !1 ? [] : t) || this.options.fallbackLng || [], e), s = [], i = (r) => { 660 r && (this.isSupportedCode(r) ? s.push(r) : this.logger.warn(`rejecting language code not found in supportedLngs: ${r}`)); 661 }; 662 return h(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))) : h(e) && i(this.formatLanguageCode(e)), a.forEach((r) => { 663 s.indexOf(r) < 0 && i(this.formatLanguageCode(r)); 664 }), s; 665 } 666} 667const he = { 668 zero: 0, 669 one: 1, 670 two: 2, 671 few: 3, 672 many: 4, 673 other: 5 674}, fe = { 675 select: (n) => n === 1 ? "one" : "other", 676 resolvedOptions: () => ({ 677 pluralCategories: ["one", "other"] 678 }) 679}; 680class st { 681 constructor(e, t = {}) { 682 this.languageUtils = e, this.options = t, this.logger = C.create("pluralResolver"), this.pluralRulesCache = {}; 683 } 684 addRule(e, t) { 685 this.rules[e] = t; 686 } 687 clearCache() { 688 this.pluralRulesCache = {}; 689 } 690 getRule(e, t = {}) { 691 const a = K(e === "dev" ? "en" : e), s = t.ordinal ? "ordinal" : "cardinal", i = JSON.stringify({ 692 cleanedCode: a, 693 type: s 694 }); 695 if (i in this.pluralRulesCache) 696 return this.pluralRulesCache[i]; 697 let r; 698 try { 699 r = new Intl.PluralRules(a, { 700 type: s 701 }); 702 } catch { 703 if (!Intl) 704 return this.logger.error("No Intl support, please use an Intl polyfill!"), fe; 705 if (!e.match(/-|_/)) return fe; 706 const l = this.languageUtils.getLanguagePartFromCode(e); 707 r = this.getRule(l, t); 708 } 709 return this.pluralRulesCache[i] = r, r; 710 } 711 needsPlural(e, t = {}) { 712 let a = this.getRule(e, t); 713 return a || (a = this.getRule("dev", t)), a?.resolvedOptions().pluralCategories.length > 1; 714 } 715 getPluralFormsOfKey(e, t, a = {}) { 716 return this.getSuffixes(e, a).map((s) => `${t}${s}`); 717 } 718 getSuffixes(e, t = {}) { 719 let a = this.getRule(e, t); 720 return a || (a = this.getRule("dev", t)), a ? a.resolvedOptions().pluralCategories.sort((s, i) => he[s] - he[i]).map((s) => `${this.options.prepend}${t.ordinal ? `ordinal${this.options.prepend}` : ""}${s}`) : []; 721 } 722 getSuffix(e, t, a = {}) { 723 const s = this.getRule(e, a); 724 return s ? `${this.options.prepend}${a.ordinal ? `ordinal${this.options.prepend}` : ""}${s.select(t)}` : (this.logger.warn(`no plural rule found for: ${e}`), this.getSuffix("dev", t, a)); 725 } 726} 727const ge = (n, e, t, a = ".", s = !0) => { 728 let i = Je(n, e, t); 729 return !i && s && h(t) && (i = Z(n, t, a), i === void 0 && (i = Z(e, t, a))), i; 730}, X = (n) => n.replace(/\$/g, "$$$$"); 731class it { 732 constructor(e = {}) { 733 this.logger = C.create("interpolator"), this.options = e, this.format = e?.interpolation?.format || ((t) => t), this.init(e); 734 } 735 init(e = {}) { 736 e.interpolation || (e.interpolation = { 737 escapeValue: !0 738 }); 739 const { 740 escape: t, 741 escapeValue: a, 742 useRawValueToEscape: s, 743 prefix: i, 744 prefixEscaped: r, 745 suffix: o, 746 suffixEscaped: l, 747 formatSeparator: u, 748 unescapeSuffix: c, 749 unescapePrefix: d, 750 nestingPrefix: g, 751 nestingPrefixEscaped: f, 752 nestingSuffix: p, 753 nestingSuffixEscaped: b, 754 nestingOptionsSeparator: v, 755 maxReplaces: S, 756 alwaysFormat: y 757 } = e.interpolation; 758 this.escape = t !== void 0 ? t : Qe, this.escapeValue = a !== void 0 ? a : !0, this.useRawValueToEscape = s !== void 0 ? s : !1, this.prefix = i ? A(i) : r || "{{", this.suffix = o ? A(o) : l || "}}", this.formatSeparator = u || ",", this.unescapePrefix = c ? "" : d || "-", this.unescapeSuffix = this.unescapePrefix ? "" : c || "", this.nestingPrefix = g ? A(g) : f || A("$t("), this.nestingSuffix = p ? A(p) : b || A(")"), this.nestingOptionsSeparator = v || ",", this.maxReplaces = S || 1e3, this.alwaysFormat = y !== void 0 ? y : !1, this.resetRegExp(); 759 } 760 reset() { 761 this.options && this.init(this.options); 762 } 763 resetRegExp() { 764 const e = (t, a) => t?.source === a ? (t.lastIndex = 0, t) : new RegExp(a, "g"); 765 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}`); 766 } 767 interpolate(e, t, a, s) { 768 let i, r, o; 769 const l = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {}, u = (f) => { 770 if (f.indexOf(this.formatSeparator) < 0) { 771 const S = ge(t, l, f, this.options.keySeparator, this.options.ignoreJSONStructure); 772 return this.alwaysFormat ? this.format(S, void 0, a, { 773 ...s, 774 ...t, 775 interpolationkey: f 776 }) : S; 777 } 778 const p = f.split(this.formatSeparator), b = p.shift().trim(), v = p.join(this.formatSeparator).trim(); 779 return this.format(ge(t, l, b, this.options.keySeparator, this.options.ignoreJSONStructure), v, a, { 780 ...s, 781 ...t, 782 interpolationkey: b 783 }); 784 }; 785 this.resetRegExp(); 786 const c = s?.missingInterpolationHandler || this.options.missingInterpolationHandler, d = s?.interpolation?.skipOnVariables !== void 0 ? s.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables; 787 return [{ 788 regex: this.regexpUnescape, 789 safeValue: (f) => X(f) 790 }, { 791 regex: this.regexp, 792 safeValue: (f) => this.escapeValue ? X(this.escape(f)) : X(f) 793 }].forEach((f) => { 794 for (o = 0; i = f.regex.exec(e); ) { 795 const p = i[1].trim(); 796 if (r = u(p), r === void 0) 797 if (typeof c == "function") { 798 const v = c(e, i, s); 799 r = h(v) ? v : ""; 800 } else if (s && Object.prototype.hasOwnProperty.call(s, p)) 801 r = ""; 802 else if (d) { 803 r = i[0]; 804 continue; 805 } else 806 this.logger.warn(`missed to pass in variable ${p} for interpolating ${e}`), r = ""; 807 else !h(r) && !this.useRawValueToEscape && (r = ne(r)); 808 const b = f.safeValue(r); 809 if (e = e.replace(i[0], b), d ? (f.regex.lastIndex += r.length, f.regex.lastIndex -= i[0].length) : f.regex.lastIndex = 0, o++, o >= this.maxReplaces) 810 break; 811 } 812 }), e; 813 } 814 nest(e, t, a = {}) { 815 let s, i, r; 816 const o = (l, u) => { 817 const c = this.nestingOptionsSeparator; 818 if (l.indexOf(c) < 0) return l; 819 const d = l.split(new RegExp(`${c}[ ]*{`)); 820 let g = `{${d[1]}`; 821 l = d[0], g = this.interpolate(g, r); 822 const f = g.match(/'/g), p = g.match(/"/g); 823 ((f?.length ?? 0) % 2 === 0 && !p || p.length % 2 !== 0) && (g = g.replace(/'/g, '"')); 824 try { 825 r = JSON.parse(g), u && (r = { 826 ...u, 827 ...r 828 }); 829 } catch (b) { 830 return this.logger.warn(`failed parsing options string in nesting for key ${l}`, b), `${l}${c}${g}`; 831 } 832 return r.defaultValue && r.defaultValue.indexOf(this.prefix) > -1 && delete r.defaultValue, l; 833 }; 834 for (; s = this.nestingRegexp.exec(e); ) { 835 let l = []; 836 r = { 837 ...a 838 }, r = r.replace && !h(r.replace) ? r.replace : r, r.applyPostProcessor = !1, delete r.defaultValue; 839 const u = /{.*}/.test(s[1]) ? s[1].lastIndexOf("}") + 1 : s[1].indexOf(this.formatSeparator); 840 if (u !== -1 && (l = s[1].slice(u).split(this.formatSeparator).map((c) => c.trim()).filter(Boolean), s[1] = s[1].slice(0, u)), i = t(o.call(this, s[1].trim(), r), r), i && s[0] === e && !h(i)) return i; 841 h(i) || (i = ne(i)), i || (this.logger.warn(`missed to resolve ${s[1]} for nesting ${e}`), i = ""), l.length && (i = l.reduce((c, d) => this.format(c, d, a.lng, { 842 ...a, 843 interpolationkey: s[1].trim() 844 }), i.trim())), e = e.replace(s[0], i), this.regexp.lastIndex = 0; 845 } 846 return e; 847 } 848} 849const nt = (n) => { 850 let e = n.toLowerCase().trim(); 851 const t = {}; 852 if (n.indexOf("(") > -1) { 853 const a = n.split("("); 854 e = a[0].toLowerCase().trim(); 855 const s = a[1].substring(0, a[1].length - 1); 856 e === "currency" && s.indexOf(":") < 0 ? t.currency || (t.currency = s.trim()) : e === "relativetime" && s.indexOf(":") < 0 ? t.range || (t.range = s.trim()) : s.split(";").forEach((r) => { 857 if (r) { 858 const [o, ...l] = r.split(":"), u = l.join(":").trim().replace(/^'+|'+$/g, ""), c = o.trim(); 859 t[c] || (t[c] = u), u === "false" && (t[c] = !1), u === "true" && (t[c] = !0), isNaN(u) || (t[c] = parseInt(u, 10)); 860 } 861 }); 862 } 863 return { 864 formatName: e, 865 formatOptions: t 866 }; 867}, me = (n) => { 868 const e = {}; 869 return (t, a, s) => { 870 let i = s; 871 s && s.interpolationkey && s.formatParams && s.formatParams[s.interpolationkey] && s[s.interpolationkey] && (i = { 872 ...i, 873 [s.interpolationkey]: void 0 874 }); 875 const r = a + JSON.stringify(i); 876 let o = e[r]; 877 return o || (o = n(K(a), s), e[r] = o), o(t); 878 }; 879}, rt = (n) => (e, t, a) => n(K(t), a)(e); 880class ot { 881 constructor(e = {}) { 882 this.logger = C.create("formatter"), this.options = e, this.init(e); 883 } 884 init(e, t = { 885 interpolation: {} 886 }) { 887 this.formatSeparator = t.interpolation.formatSeparator || ","; 888 const a = t.cacheInBuiltFormats ? me : rt; 889 this.formats = { 890 number: a((s, i) => { 891 const r = new Intl.NumberFormat(s, { 892 ...i 893 }); 894 return (o) => r.format(o); 895 }), 896 currency: a((s, i) => { 897 const r = new Intl.NumberFormat(s, { 898 ...i, 899 style: "currency" 900 }); 901 return (o) => r.format(o); 902 }), 903 datetime: a((s, i) => { 904 const r = new Intl.DateTimeFormat(s, { 905 ...i 906 }); 907 return (o) => r.format(o); 908 }), 909 relativetime: a((s, i) => { 910 const r = new Intl.RelativeTimeFormat(s, { 911 ...i 912 }); 913 return (o) => r.format(o, i.range || "day"); 914 }), 915 list: a((s, i) => { 916 const r = new Intl.ListFormat(s, { 917 ...i 918 }); 919 return (o) => r.format(o); 920 }) 921 }; 922 } 923 add(e, t) { 924 this.formats[e.toLowerCase().trim()] = t; 925 } 926 addCached(e, t) { 927 this.formats[e.toLowerCase().trim()] = me(t); 928 } 929 format(e, t, a, s = {}) { 930 const i = t.split(this.formatSeparator); 931 if (i.length > 1 && i[0].indexOf("(") > 1 && i[0].indexOf(")") < 0 && i.find((o) => o.indexOf(")") > -1)) { 932 const o = i.findIndex((l) => l.indexOf(")") > -1); 933 i[0] = [i[0], ...i.splice(1, o)].join(this.formatSeparator); 934 } 935 return i.reduce((o, l) => { 936 const { 937 formatName: u, 938 formatOptions: c 939 } = nt(l); 940 if (this.formats[u]) { 941 let d = o; 942 try { 943 const g = s?.formatParams?.[s.interpolationkey] || {}, f = g.locale || g.lng || s.locale || s.lng || a; 944 d = this.formats[u](o, f, { 945 ...c, 946 ...s, 947 ...g 948 }); 949 } catch (g) { 950 this.logger.warn(g); 951 } 952 return d; 953 } else 954 this.logger.warn(`there was no format function for ${u}`); 955 return o; 956 }, e); 957 } 958} 959const lt = (n, e) => { 960 n.pending[e] !== void 0 && (delete n.pending[e], n.pendingCount--); 961}; 962class ut extends J { 963 constructor(e, t, a, s = {}) { 964 super(), this.backend = e, this.store = t, this.services = a, this.languageUtils = a.languageUtils, this.options = s, this.logger = C.create("backendConnector"), this.waitingReads = [], this.maxParallelReads = s.maxParallelReads || 10, this.readingCalls = 0, this.maxRetries = s.maxRetries >= 0 ? s.maxRetries : 5, this.retryTimeout = s.retryTimeout >= 1 ? s.retryTimeout : 350, this.state = {}, this.queue = [], this.backend?.init?.(a, s.backend, s); 965 } 966 queueLoad(e, t, a, s) { 967 const i = {}, r = {}, o = {}, l = {}; 968 return e.forEach((u) => { 969 let c = !0; 970 t.forEach((d) => { 971 const g = `${u}|${d}`; 972 !a.reload && this.store.hasResourceBundle(u, d) ? this.state[g] = 2 : this.state[g] < 0 || (this.state[g] === 1 ? r[g] === void 0 && (r[g] = !0) : (this.state[g] = 1, c = !1, r[g] === void 0 && (r[g] = !0), i[g] === void 0 && (i[g] = !0), l[d] === void 0 && (l[d] = !0))); 973 }), c || (o[u] = !0); 974 }), (Object.keys(i).length || Object.keys(r).length) && this.queue.push({ 975 pending: r, 976 pendingCount: Object.keys(r).length, 977 loaded: {}, 978 errors: [], 979 callback: s 980 }), { 981 toLoad: Object.keys(i), 982 pending: Object.keys(r), 983 toLoadLanguages: Object.keys(o), 984 toLoadNamespaces: Object.keys(l) 985 }; 986 } 987 loaded(e, t, a) { 988 const s = e.split("|"), i = s[0], r = s[1]; 989 t && this.emit("failedLoading", i, r, t), !t && a && this.store.addResourceBundle(i, r, a, void 0, void 0, { 990 skipCopy: !0 991 }), this.state[e] = t ? -1 : 2, t && a && (this.state[e] = 0); 992 const o = {}; 993 this.queue.forEach((l) => { 994 Ge(l.loaded, [i], r), lt(l, e), t && l.errors.push(t), l.pendingCount === 0 && !l.done && (Object.keys(l.loaded).forEach((u) => { 995 o[u] || (o[u] = {}); 996 const c = l.loaded[u]; 997 c.length && c.forEach((d) => { 998 o[u][d] === void 0 && (o[u][d] = !0); 999 }); 1000 }), l.done = !0, l.errors.length ? l.callback(l.errors) : l.callback()); 1001 }), this.emit("loaded", o), this.queue = this.queue.filter((l) => !l.done); 1002 } 1003 read(e, t, a, s = 0, i = this.retryTimeout, r) { 1004 if (!e.length) return r(null, {}); 1005 if (this.readingCalls >= this.maxParallelReads) { 1006 this.waitingReads.push({ 1007 lng: e, 1008 ns: t, 1009 fcName: a, 1010 tried: s, 1011 wait: i, 1012 callback: r 1013 }); 1014 return; 1015 } 1016 this.readingCalls++; 1017 const o = (u, c) => { 1018 if (this.readingCalls--, this.waitingReads.length > 0) { 1019 const d = this.waitingReads.shift(); 1020 this.read(d.lng, d.ns, d.fcName, d.tried, d.wait, d.callback); 1021 } 1022 if (u && c && s < this.maxRetries) { 1023 setTimeout(() => { 1024 this.read.call(this, e, t, a, s + 1, i * 2, r); 1025 }, i); 1026 return; 1027 } 1028 r(u, c); 1029 }, l = this.backend[a].bind(this.backend); 1030 if (l.length === 2) { 1031 try { 1032 const u = l(e, t); 1033 u && typeof u.then == "function" ? u.then((c) => o(null, c)).catch(o) : o(null, u); 1034 } catch (u) { 1035 o(u); 1036 } 1037 return; 1038 } 1039 return l(e, t, o); 1040 } 1041 prepareLoading(e, t, a = {}, s) { 1042 if (!this.backend) 1043 return this.logger.warn("No backend was added via i18next.use. Will not load resources."), s && s(); 1044 h(e) && (e = this.languageUtils.toResolveHierarchy(e)), h(t) && (t = [t]); 1045 const i = this.queueLoad(e, t, a, s); 1046 if (!i.toLoad.length) 1047 return i.pending.length || s(), null; 1048 i.toLoad.forEach((r) => { 1049 this.loadOne(r); 1050 }); 1051 } 1052 load(e, t, a) { 1053 this.prepareLoading(e, t, {}, a); 1054 } 1055 reload(e, t, a) { 1056 this.prepareLoading(e, t, { 1057 reload: !0 1058 }, a); 1059 } 1060 loadOne(e, t = "") { 1061 const a = e.split("|"), s = a[0], i = a[1]; 1062 this.read(s, i, "read", void 0, void 0, (r, o) => { 1063 r && this.logger.warn(`${t}loading namespace ${i} for language ${s} failed`, r), !r && o && this.logger.log(`${t}loaded namespace ${i} for language ${s}`, o), this.loaded(e, r, o); 1064 }); 1065 } 1066 saveMissing(e, t, a, s, i, r = {}, o = () => { 1067 }) { 1068 if (this.services?.utils?.hasLoadedNamespace && !this.services?.utils?.hasLoadedNamespace(t)) { 1069 this.logger.warn(`did not save key "${a}" 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!!!"); 1070 return; 1071 } 1072 if (!(a == null || a === "")) { 1073 if (this.backend?.create) { 1074 const l = { 1075 ...r, 1076 isUpdate: i 1077 }, u = this.backend.create.bind(this.backend); 1078 if (u.length < 6) 1079 try { 1080 let c; 1081 u.length === 5 ? c = u(e, t, a, s, l) : c = u(e, t, a, s), c && typeof c.then == "function" ? c.then((d) => o(null, d)).catch(o) : o(null, c); 1082 } catch (c) { 1083 o(c); 1084 } 1085 else 1086 u(e, t, a, s, o, l); 1087 } 1088 !e || !e[0] || this.store.addResource(e[0], t, a, s); 1089 } 1090 } 1091} 1092const be = () => ({ 1093 debug: !1, 1094 initAsync: !0, 1095 ns: ["translation"], 1096 defaultNS: ["translation"], 1097 fallbackLng: ["dev"], 1098 fallbackNS: !1, 1099 supportedLngs: !1, 1100 nonExplicitSupportedLngs: !1, 1101 load: "all", 1102 preload: !1, 1103 simplifyPluralSuffix: !0, 1104 keySeparator: ".", 1105 nsSeparator: ":", 1106 pluralSeparator: "_", 1107 contextSeparator: "_", 1108 partialBundledLanguages: !1, 1109 saveMissing: !1, 1110 updateMissing: !1, 1111 saveMissingTo: "fallback", 1112 saveMissingPlurals: !0, 1113 missingKeyHandler: !1, 1114 missingInterpolationHandler: !1, 1115 postProcess: !1, 1116 postProcessPassResolved: !1, 1117 returnNull: !1, 1118 returnEmptyString: !0, 1119 returnObjects: !1, 1120 joinArrays: !1, 1121 returnedObjectHandler: !1, 1122 parseMissingKeyHandler: !1, 1123 appendNamespaceToMissingKey: !1, 1124 appendNamespaceToCIMode: !1, 1125 overloadTranslationOptionHandler: (n) => { 1126 let e = {}; 1127 if (typeof n[1] == "object" && (e = n[1]), h(n[1]) && (e.defaultValue = n[1]), h(n[2]) && (e.tDescription = n[2]), typeof n[2] == "object" || typeof n[3] == "object") { 1128 const t = n[3] || n[2]; 1129 Object.keys(t).forEach((a) => { 1130 e[a] = t[a]; 1131 }); 1132 } 1133 return e; 1134 }, 1135 interpolation: { 1136 escapeValue: !0, 1137 format: (n) => n, 1138 prefix: "{{", 1139 suffix: "}}", 1140 formatSeparator: ",", 1141 unescapePrefix: "-", 1142 nestingPrefix: "$t(", 1143 nestingSuffix: ")", 1144 nestingOptionsSeparator: ",", 1145 maxReplaces: 1e3, 1146 skipOnVariables: !0 1147 }, 1148 cacheInBuiltFormats: !0 1149}), ye = (n) => (h(n.ns) && (n.ns = [n.ns]), h(n.fallbackLng) && (n.fallbackLng = [n.fallbackLng]), h(n.fallbackNS) && (n.fallbackNS = [n.fallbackNS]), n.supportedLngs?.indexOf?.("cimode") < 0 && (n.supportedLngs = n.supportedLngs.concat(["cimode"])), typeof n.initImmediate == "boolean" && (n.initAsync = n.initImmediate), n), B = () => { 1150}, dt = (n) => {
vendor: 4,161 bytes, lines 1151-1210
1151 Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach((t) => { 1152 typeof n[t] == "function" && (n[t] = n[t].bind(n)); 1153 }); 1154}; 1155class H extends J { 1156 constructor(e = {}, t) { 1157 if (super(), this.options = ye(e), this.services = {}, this.logger = C, this.modules = { 1158 external: [] 1159 }, dt(this), t && !this.isInitialized && !e.isClone) { 1160 if (!this.options.initAsync) 1161 return this.init(e, t), this; 1162 setTimeout(() => { 1163 this.init(e, t); 1164 }, 0); 1165 } 1166 } 1167 init(e = {}, t) { 1168 this.isInitializing = !0, typeof e == "function" && (t = e, e = {}), e.defaultNS == null && e.ns && (h(e.ns) ? e.defaultNS = e.ns : e.ns.indexOf("translation") < 0 && (e.defaultNS = e.ns[0])); 1169 const a = be(); 1170 this.options = { 1171 ...a, 1172 ...this.options, 1173 ...ye(e) 1174 }, this.options.interpolation = { 1175 ...a.interpolation, 1176 ...this.options.interpolation 1177 }, e.keySeparator !== void 0 && (this.options.userDefinedKeySeparator = e.keySeparator), e.nsSeparator !== void 0 && (this.options.userDefinedNsSeparator = e.nsSeparator); 1178 const s = (u) => u ? typeof u == "function" ? new u() : u : null; 1179 if (!this.options.isClone) { 1180 this.modules.logger ? C.init(s(this.modules.logger), this.options) : C.init(null, this.options); 1181 let u; 1182 this.modules.formatter ? u = this.modules.formatter : u = ot; 1183 const c = new pe(this.options); 1184 this.store = new ue(this.options.resources, this.options); 1185 const d = this.services; 1186 d.logger = C, d.resourceStore = this.store, d.languageUtils = c, d.pluralResolver = new st(c, { 1187 prepend: this.options.pluralSeparator, 1188 simplifyPluralSuffix: this.options.simplifyPluralSuffix 1189 }), this.options.interpolation.format && this.options.interpolation.format !== a.interpolation.format && this.logger.warn("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"), u && (!this.options.interpolation.format || this.options.interpolation.format === a.interpolation.format) && (d.formatter = s(u), d.formatter.init && d.formatter.init(d, this.options), this.options.interpolation.format = d.formatter.format.bind(d.formatter)), d.interpolator = new it(this.options), d.utils = { 1190 hasLoadedNamespace: this.hasLoadedNamespace.bind(this) 1191 }, d.backendConnector = new ut(s(this.modules.backend), d.resourceStore, d, this.options), d.backendConnector.on("*", (f, ...p) => { 1192 this.emit(f, ...p); 1193 }), this.modules.languageDetector && (d.languageDetector = s(this.modules.languageDetector), d.languageDetector.init && d.languageDetector.init(d, this.options.detection, this.options)), this.modules.i18nFormat && (d.i18nFormat = s(this.modules.i18nFormat), d.i18nFormat.init && d.i18nFormat.init(this)), this.translator = new G(this.services, this.options), this.translator.on("*", (f, ...p) => { 1194 this.emit(f, ...p); 1195 }), this.modules.external.forEach((f) => { 1196 f.init && f.init(this); 1197 }); 1198 } 1199 if (this.format = this.options.interpolation.format, t || (t = B), this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) { 1200 const u = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng); 1201 u.length > 0 && u[0] !== "dev" && (this.options.lng = u[0]); 1202 } 1203 !this.services.languageDetector && !this.options.lng && this.logger.warn("init: no languageDetector is used and no lng is defined"), ["getResource", "hasResourceBundle", "getResourceBundle", "getDataByLanguage"].forEach((u) => { 1204 this[u] = (...c) => this.store[u](...c); 1205 }), ["addResource", "addResources", "addResourceBundle", "removeResourceBundle"].forEach((u) => { 1206 this[u] = (...c) => (this.store[u](...c), this); 1207 }); 1208 const o = V(), l = () => { 1209 const u = (c, d) => { 1210 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
vendor: 6,814 bytes, lines 1210-1329
1210("initialized", this.options), o.resolve(d), t(c, d); 1211 }; 1212 if (this.languages && !this.isInitialized) return u(null, this.t.bind(this)); 1213 this.changeLanguage(this.options.lng, u); 1214 }; 1215 return this.options.resources || !this.options.initAsync ? l() : setTimeout(l, 0), o; 1216 } 1217 loadResources(e, t = B) { 1218 let a = t; 1219 const s = h(e) ? e : this.language; 1220 if (typeof e == "function" && (a = e), !this.options.resources || this.options.partialBundledLanguages) { 1221 if (s?.toLowerCase() === "cimode" && (!this.options.preload || this.options.preload.length === 0)) return a(); 1222 const i = [], r = (o) => { 1223 if (!o || o === "cimode") return; 1224 this.services.languageUtils.toResolveHierarchy(o).forEach((u) => { 1225 u !== "cimode" && i.indexOf(u) < 0 && i.push(u); 1226 }); 1227 }; 1228 s ? r(s) : this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((l) => r(l)), this.options.preload?.forEach?.((o) => r(o)), this.services.backendConnector.load(i, this.options.ns, (o) => { 1229 !o && !this.resolvedLanguage && this.language && this.setResolvedLanguage(this.language), a(o); 1230 }); 1231 } else 1232 a(null); 1233 } 1234 reloadResources(e, t, a) { 1235 const s = V(); 1236 return typeof e == "function" && (a = e, e = void 0), typeof t == "function" && (a = t, t = void 0), e || (e = this.languages), t || (t = this.options.ns), a || (a = B), this.services.backendConnector.reload(e, t, (i) => { 1237 s.resolve(), a(i); 1238 }), s; 1239 } 1240 use(e) { 1241 if (!e) throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()"); 1242 if (!e.type) throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()"); 1243 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" && Pe.addPostProcessor(e), e.type === "formatter" && (this.modules.formatter = e), e.type === "3rdParty" && this.modules.external.push(e), this; 1244 } 1245 setResolvedLanguage(e) { 1246 if (!(!e || !this.languages) && !(["cimode", "dev"].indexOf(e) > -1)) { 1247 for (let t = 0; t < this.languages.length; t++) { 1248 const a = this.languages[t]; 1249 if (!(["cimode", "dev"].indexOf(a) > -1) && this.store.hasLanguageSomeTranslations(a)) { 1250 this.resolvedLanguage = a; 1251 break; 1252 } 1253 } 1254 !this.resolvedLanguage && this.languages.indexOf(e) < 0 && this.store.hasLanguageSomeTranslations(e) && (this.resolvedLanguage = e, this.languages.unshift(e)); 1255 } 1256 } 1257 changeLanguage(e, t) { 1258 this.isLanguageChangingTo = e; 1259 const a = V(); 1260 this.emit("languageChanging", e); 1261 const s = (o) => { 1262 this.language = o, this.languages = this.services.languageUtils.toResolveHierarchy(o), this.resolvedLanguage = void 0, this.setResolvedLanguage(o); 1263 }, i = (o, l) => { 1264 l ? this.isLanguageChangingTo === e && (s(l), this.translator.changeLanguage(l), this.isLanguageChangingTo = void 0, this.emit("languageChanged", l), this.logger.log("languageChanged", l)) : this.isLanguageChangingTo = void 0, a.resolve((...u) => this.t(...u)), t && t(o, (...u) => this.t(...u)); 1265 }, r = (o) => { 1266 !e && !o && this.services.languageDetector && (o = []); 1267 const l = h(o) ? o : o && o[0], u = this.store.hasLanguageSomeTranslations(l) ? l : this.services.languageUtils.getBestMatchFromCodes(h(o) ? [o] : o); 1268 u && (this.language || s(u), this.translator.language || this.translator.changeLanguage(u), this.services.languageDetector?.cacheUserLanguage?.(u)), this.loadResources(u, (c) => { 1269 i(c, u); 1270 }); 1271 }; 1272 return !e && this.services.languageDetector && !this.services.languageDetector.async ? r(this.services.languageDetector.detect()) : !e && this.services.languageDetector && this.services.languageDetector.async ? this.services.languageDetector.detect.length === 0 ? this.services.languageDetector.detect().then(r) : this.services.languageDetector.detect(r) : r(e), a; 1273 } 1274 getFixedT(e, t, a) { 1275 const s = (i, r, ...o) => { 1276 let l; 1277 typeof r != "object" ? l = this.options.overloadTranslationOptionHandler([i, r].concat(o)) : l = { 1278 ...r 1279 }, l.lng = l.lng || s.lng, l.lngs = l.lngs || s.lngs, l.ns = l.ns || s.ns, l.keyPrefix !== "" && (l.keyPrefix = l.keyPrefix || a || s.keyPrefix); 1280 const u = this.options.keySeparator || "."; 1281 let c; 1282 return l.keyPrefix && Array.isArray(i) ? c = i.map((d) => `${l.keyPrefix}${u}${d}`) : c = l.keyPrefix ? `${l.keyPrefix}${u}${i}` : i, this.t(c, l); 1283 }; 1284 return h(e) ? s.lng = e : s.lngs = e, s.ns = t, s.keyPrefix = a, s; 1285 } 1286 t(...e) { 1287 return this.translator?.translate(...e); 1288 } 1289 exists(...e) { 1290 return this.translator?.exists(...e); 1291 } 1292 setDefaultNamespace(e) { 1293 this.options.defaultNS = e; 1294 } 1295 hasLoadedNamespace(e, t = {}) { 1296 if (!this.isInitialized) 1297 return this.logger.warn("hasLoadedNamespace: i18next was not initialized", this.languages), !1; 1298 if (!this.languages || !this.languages.length) 1299 return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty", this.languages), !1; 1300 const a = t.lng || this.resolvedLanguage || this.languages[0], s = this.options ? this.options.fallbackLng : !1, i = this.languages[this.languages.length - 1]; 1301 if (a.toLowerCase() === "cimode") return !0; 1302 const r = (o, l) => { 1303 const u = this.services.backendConnector.state[`${o}|${l}`]; 1304 return u === -1 || u === 0 || u === 2; 1305 }; 1306 if (t.precheck) { 1307 const o = t.precheck(this, r); 1308 if (o !== void 0) return o; 1309 } 1310 return !!(this.hasResourceBundle(a, e) || !this.services.backendConnector.backend || this.options.resources && !this.options.partialBundledLanguages || r(a, e) && (!s || r(i, e))); 1311 } 1312 loadNamespaces(e, t) { 1313 const a = V(); 1314 return this.options.ns ? (h(e) && (e = [e]), e.forEach((s) => { 1315 this.options.ns.indexOf(s) < 0 && this.options.ns.push(s); 1316 }), this.loadResources((s) => { 1317 a.resolve(), t && t(s); 1318 }), a) : (t && t(), Promise.resolve()); 1319 } 1320 loadLanguages(e, t) { 1321 const a = V(); 1322 h(e) && (e = [e]); 1323 const s = this.options.preload || [], i = e.filter((r) => s.indexOf(r) < 0 && this.services.languageUtils.isSupportedCode(r)); 1324 return i.length ? (this.options.preload = s.concat(i), this.loadResources((r) => { 1325 a.resolve(), t && t(r); 1326 }), a) : (t && t(), Promise.resolve()); 1327 } 1328 dir(e) { 1329 if (e || (e = this.resolvedLanguage || (this.languages?.length > 0 ? this.languages[0] : this.language)), !e) return "rtl";
vendor: 3,622 bytes, lines 1330-1430
1330 try { 1331 const s = new Intl.Locale(e); 1332 if (s && s.getTextInfo) { 1333 const i = s.getTextInfo(); 1334 if (i && i.direction) return i.direction; 1335 } 1336 } catch { 1337 } 1338 const t = ["ar", "shu", "sqr", "ssh", "xaa", "yhd", "yud", "aao", "abh", "abv", "acm", "acq", "acw", "acx", "acy", "adf", "ads", "aeb", "aec", "afb", "ajp", "apc", "apd", "arb", "arq", "ars", "ary", "arz", "auz", "avl", "ayh", "ayl", "ayn", "ayp", "bbz", "pga", "he", "iw", "ps", "pbt", "pbu", "pst", "prp", "prd", "ug", "ur", "ydd", "yds", "yih", "ji", "yi", "hbo", "men", "xmn", "fa", "jpr", "peo", "pes", "prs", "dv", "sam", "ckb"], a = this.services?.languageUtils || new pe(be()); 1339 return e.toLowerCase().indexOf("-latn") > 1 ? "ltr" : t.indexOf(a.getLanguagePartFromCode(e)) > -1 || e.toLowerCase().indexOf("-arab") > 1 ? "rtl" : "ltr"; 1340 } 1341 static createInstance(e = {}, t) { 1342 return new H(e, t); 1343 } 1344 cloneInstance(e = {}, t = B) { 1345 const a = e.forkResourceStore; 1346 a && delete e.forkResourceStore; 1347 const s = { 1348 ...this.options, 1349 ...e, 1350 isClone: !0 1351 }, i = new H(s); 1352 if ((e.debug !== void 0 || e.prefix !== void 0) && (i.logger = i.logger.clone(e)), ["store", "services", "language"].forEach((o) => { 1353 i[o] = this[o]; 1354 }), i.services = { 1355 ...this.services 1356 }, i.services.utils = { 1357 hasLoadedNamespace: i.hasLoadedNamespace.bind(i) 1358 }, a) { 1359 const o = Object.keys(this.store.data).reduce((l, u) => (l[u] = { 1360 ...this.store.data[u] 1361 }, l[u] = Object.keys(l[u]).reduce((c, d) => (c[d] = { 1362 ...l[u][d] 1363 }, c), l[u]), l), {}); 1364 i.store = new ue(o, s), i.services.resourceStore = i.store; 1365 } 1366 return i.translator = new G(i.services, s), i.translator.on("*", (o, ...l) => { 1367 i.emit(o, ...l); 1368 }), i.init(s, t), i.translator.options = s, i.translator.backendConnector.services.utils = { 1369 hasLoadedNamespace: i.hasLoadedNamespace.bind(i) 1370 }, i; 1371 } 1372 toJSON() { 1373 return { 1374 options: this.options, 1375 store: this.store, 1376 language: this.language, 1377 languages: this.languages, 1378 resolvedLanguage: this.resolvedLanguage 1379 }; 1380 } 1381} 1382const m = H.createInstance(); 1383m.createInstance = H.createInstance; 1384m.createInstance; 1385m.dir; 1386m.init; 1387m.loadResources; 1388m.reloadResources; 1389m.use; 1390m.changeLanguage; 1391m.getFixedT; 1392m.t; 1393m.exists; 1394m.setDefaultNamespace; 1395m.hasLoadedNamespace; 1396m.loadNamespaces; 1397m.loadLanguages; 1398const { 1399 slice: ct, 1400 forEach: pt 1401} = []; 1402function ht(n) { 1403 return pt.call(ct.call(arguments, 1), (e) => { 1404 if (e) 1405 for (const t in e) 1406 n[t] === void 0 && (n[t] = e[t]); 1407 }), n; 1408} 1409function ft(n) { 1410 return typeof n != "string" ? !1 : [/<\s*script.*?>/i, /<\s*\/\s*script\s*>/i, /<\s*img.*?on\w+\s*=/i, /<\s*\w+\s*on\w+\s*=.*?>/i, /javascript\s*:/i, /vbscript\s*:/i, /expression\s*\(/i, /eval\s*\(/i, /alert\s*\(/i, /document\.cookie/i, /document\.write\s*\(/i, /window\.location/i, /innerHTML/i].some((t) => t.test(n)); 1411} 1412const ve = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/, gt = function(n, e) { 1413 const a = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : { 1414 path: "/" 1415 }, s = encodeURIComponent(e); 1416 let i = `${n}=${s}`; 1417 if (a.maxAge > 0) { 1418 const r = a.maxAge - 0; 1419 if (Number.isNaN(r)) throw new Error("maxAge should be a Number"); 1420 i += `; Max-Age=${Math.floor(r)}`; 1421 } 1422 if (a.domain) { 1423 if (!ve.test(a.domain)) 1424 throw new TypeError("option domain is invalid"); 1425 i += `; Domain=${a.domain}`; 1426 } 1427 if (a.path) { 1428 if (!ve.test(a.path)) 1429 throw new TypeError("option path is invalid"); 1430 i += `; Path=${a.path}`;
1431 } 1432 if (a.expires) { 1433 if (typeof a.expires.toUTCString != "function") 1434 throw new TypeError("option expires is invalid"); 1435 i += `; Expires=${a.expires.toUTCString()}`; 1436 } 1437 if (a.httpOnly && (i += "; HttpOnly"), a.secure && (i += "; Secure"), a.sameSite) 1438 switch (typeof a.sameSite == "string" ? a.sameSite.toLowerCase() : a.sameSite) { 1439 case !0: 1440 i += "; SameSite=Strict"; 1441 break; 1442 case "lax": 1443 i += "; SameSite=Lax"; 1444 break; 1445 case "strict": 1446 i += "; SameSite=Strict"; 1447 break; 1448 case "none": 1449 i += "; SameSite=None"; 1450 break; 1451 default: 1452 throw new TypeError("option sameSite is invalid"); 1453 } 1454 return a.partitioned && (i += "; Partitioned"), i; 1455}, we = { 1456 create(n, e, t, a) { 1457 let s = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : { 1458 path: "/", 1459 sameSite: "strict" 1460 }; 1461 t && (s.expires = /* @__PURE__ */ new Date(), s.expires.setTime(s.expires.getTime() + t * 60 * 1e3)), a && (s.domain = a), document.cookie = gt(n, e, s); 1462 }, 1463 read(n) { 1464 const e = `${n}=`, t = document.cookie.split(";"); 1465 for (let a = 0; a < t.length; a++) { 1466 let s = t[a]; 1467 for (; s.charAt(0) === " "; ) s = s.substring(1, s.length); 1468 if (s.indexOf(e) === 0) return s.substring(e.length, s.length); 1469 } 1470 return null; 1471 }, 1472 remove(n, e) { 1473 this.create(n, "", -1, e); 1474 } 1475}; 1476var mt = { 1477 name: "cookie", 1478 // Deconstruct the options object and extract the lookupCookie property 1479 lookup(n) { 1480 let { 1481 lookupCookie: e 1482 } = n; 1483 if (e && typeof document < "u") 1484 return we.read(e) || void 0; 1485 }, 1486 // Deconstruct the options object and extract the lookupCookie, cookieMinutes, cookieDomain, and cookieOptions properties 1487 cacheUserLanguage(n, e) { 1488 let { 1489 lookupCookie: t, 1490 cookieMinutes: a, 1491 cookieDomain: s, 1492 cookieOptions: i 1493 } = e; 1494 t && typeof document < "u" && we.create(t, n, a, s, i); 1495 } 1496}, bt = { 1497 name: "querystring", 1498 // Deconstruct the options object and extract the lookupQuerystring property 1499 lookup(n) { 1500 let { 1501 lookupQuerystring: e 1502 } = n, t; 1503 if (typeof window < "u") { 1504 let { 1505 search: a 1506 } = window.location; 1507 !window.location.search && window.location.hash?.indexOf("?") > -1 && (a = window.location.hash.substring(window.location.hash.indexOf("?"))); 1508 const i = a.substring(1).split("&"); 1509 for (let r = 0; r < i.length; r++) { 1510 const o = i[r].indexOf("="); 1511 o > 0 && i[r].substring(0, o) === e && (t = i[r].substring(o + 1)); 1512 } 1513 } 1514 return t; 1515 } 1516}, yt = { 1517 name: "hash", 1518 // Deconstruct the options object and extract the lookupHash property and the lookupFromHashIndex property 1519 lookup(n) { 1520 let { 1521 lookupHash: e, 1522 lookupFromHashIndex: t 1523 } = n, a; 1524 if (typeof window < "u") { 1525 const { 1526 hash: s 1527 } = window.location; 1528 if (s && s.length > 2) { 1529 const i = s.substring(1); 1530 if (e) { 1531 const r = i.split("&"); 1532 for (let o = 0; o < r.length; o++) { 1533 const l = r[o].indexOf("="); 1534 l > 0 && r[o].substring(0, l) === e && (a = r[o].substring(l + 1)); 1535 } 1536 } 1537 if (a) return a; 1538 if (!a && t > -1) { 1539 const r = s.match(/\/([a-zA-Z-]*)/g); 1540 return Array.isArray(r) ? r[typeof t == "number" ? t : 0]?.replace("/", "") : void 0; 1541 } 1542 } 1543 } 1544 return a; 1545 } 1546}; 1547let F = null; 1548const xe = () => { 1549 if (F !== null) return F; 1550 try { 1551 if (F = typeof window < "u" && window.localStorage !== null, !F) 1552 return !1; 1553 const n = "i18next.translate.boo"; 1554 window.localStorage.setItem(n, "foo"), window.localStorage.removeItem(n); 1555 } catch { 1556 F = !1; 1557 } 1558 return F; 1559}; 1560var vt = { 1561 name: "localStorage", 1562 // Deconstruct the options object and extract the lookupLocalStorage property 1563 lookup(n) { 1564 let { 1565 lookupLocalStorage: e 1566 } = n; 1567 if (e && xe()) 1568 return window.localStorage.getItem(e) || void 0; 1569 }, 1570 // Deconstruct the options object and extract the lookupLocalStorage property 1571 cacheUserLanguage(n, e) { 1572 let { 1573 lookupLocalStorage: t 1574 } = e; 1575 t && xe() && window.localStorage.setItem(t, n); 1576 } 1577}; 1578let D = null; 1579const Se = () => { 1580 if (D !== null) return D; 1581 try { 1582 if (D = typeof window < "u" && window.sessionStorage !== null, !D) 1583 return !1; 1584 const n = "i18next.translate.boo"; 1585 window.sessionStorage.setItem(n, "foo"), window.sessionStorage.removeItem(n); 1586 } catch { 1587 D = !1; 1588 } 1589 return D; 1590}; 1591var wt = { 1592 name: "sessionStorage", 1593 lookup(n) { 1594 let { 1595 lookupSessionStorage: e 1596 } = n; 1597 if (e && Se()) 1598 return window.sessionStorage.getItem(e) || void 0; 1599 }, 1600 cacheUserLanguage(n, e) { 1601 let { 1602 lookupSessionStorage: t 1603 } = e; 1604 t && Se() && window.sessionStorage.setItem(t, n); 1605 } 1606}, xt = { 1607 name: "navigator", 1608 lookup(n) { 1609 const e = []; 1610 if (typeof navigator < "u") { 1611 const { 1612 languages: t, 1613 userLanguage: a, 1614 language: s 1615 } = navigator; 1616 if (t) 1617 for (let i = 0; i < t.length; i++) 1618 e.push(t[i]); 1619 a && e.push(a), s && e.push(s); 1620 } 1621 return e.length > 0 ? e : void 0; 1622 } 1623}, St = { 1624 name: "htmlTag", 1625 // Deconstruct the options object and extract the htmlTag property 1626 lookup(n) { 1627 let { 1628 htmlTag: e 1629 } = n, t; 1630 const a = e || (typeof document < "u" ? document.documentElement : null); 1631 return a && typeof a.getAttribute == "function" && (t = a.getAttribute("lang")), t; 1632 } 1633}, Lt = { 1634 name: "path", 1635 // Deconstruct the options object and extract the lookupFromPathIndex property 1636 lookup(n) { 1637 let { 1638 lookupFromPathIndex: e 1639 } = n; 1640 if (typeof window > "u") return; 1641 const t = window.location.pathname.match(/\/([a-zA-Z-]*)/g); 1642 return Array.isArray(t) ? t[typeof e == "number" ? e : 0]?.replace("/", "") : void 0; 1643 } 1644}
vendor: 8,660 bytes, lines 1644-1806
1644, kt = { 1645 name: "subdomain", 1646 lookup(n) { 1647 let { 1648 lookupFromSubdomainIndex: e 1649 } = n; 1650 const t = typeof e == "number" ? e + 1 : 1, a = typeof window < "u" && window.location?.hostname?.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i); 1651 if (a) 1652 return a[t]; 1653 } 1654}; 1655let Ce = !1; 1656try { 1657 document.cookie, Ce = !0; 1658} catch { 1659} 1660const Re = ["querystring", "cookie", "localStorage", "sessionStorage", "navigator", "htmlTag"]; 1661Ce || Re.splice(1, 1); 1662const Ot = () => ({ 1663 order: Re, 1664 lookupQuerystring: "lng", 1665 lookupCookie: "i18next", 1666 lookupLocalStorage: "i18nextLng", 1667 lookupSessionStorage: "i18nextLng", 1668 // cache user language 1669 caches: ["localStorage"], 1670 excludeCacheFor: ["cimode"], 1671 // cookieMinutes: 10, 1672 // cookieDomain: 'myDomain' 1673 convertDetectedLanguage: (n) => n 1674}); 1675class Ee { 1676 constructor(e) { 1677 let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; 1678 this.type = "languageDetector", this.detectors = {}, this.init(e, t); 1679 } 1680 init() { 1681 let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : { 1682 languageUtils: {} 1683 }, t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, a = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}; 1684 this.services = e, this.options = ht(t, this.options || {}, Ot()), typeof this.options.convertDetectedLanguage == "string" && this.options.convertDetectedLanguage.indexOf("15897") > -1 && (this.options.convertDetectedLanguage = (s) => s.replace("-", "_")), this.options.lookupFromUrlIndex && (this.options.lookupFromPathIndex = this.options.lookupFromUrlIndex), this.i18nOptions = a, this.addDetector(mt), this.addDetector(bt), this.addDetector(vt), this.addDetector(wt), this.addDetector(xt), this.addDetector(St), this.addDetector(Lt), this.addDetector(kt), this.addDetector(yt); 1685 } 1686 addDetector(e) { 1687 return this.detectors[e.name] = e, this; 1688 } 1689 detect() { 1690 let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.options.order, t = []; 1691 return e.forEach((a) => { 1692 if (this.detectors[a]) { 1693 let s = this.detectors[a].lookup(this.options); 1694 s && typeof s == "string" && (s = [s]), s && (t = t.concat(s)); 1695 } 1696 }), t = t.filter((a) => a != null && !ft(a)).map((a) => this.options.convertDetectedLanguage(a)), this.services && this.services.languageUtils && this.services.languageUtils.getBestMatchFromCodes ? t : t.length > 0 ? t[0] : null; 1697 } 1698 cacheUserLanguage(e) { 1699 let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this.options.caches; 1700 t && (this.options.excludeCacheFor && this.options.excludeCacheFor.indexOf(e) > -1 || t.forEach((a) => { 1701 this.detectors[a] && this.detectors[a].cacheUserLanguage(e, this.options); 1702 })); 1703 } 1704} 1705Ee.type = "languageDetector"; 1706const Le = { 1707 en: { 1708 translation: { 1709 "characters-remaining": "{{charactersRemaining}} characters remaining", 1710 ascending: "ascending", 1711 descending: "descending", 1712 "data-table-sorted": "{{caption}} table, column {{headerName}} is now sorted by {{sortDirection}} values", 1713 "column-headers-buttons-sortable": "column headers with buttons are sortable", 1714 "table-sort-removed": "Table sort removed", 1715 "sort-by-ascending-values": "Sort by ascending values", 1716 "sort-by-descending-values": "Sort by descending values", 1717 "reset-sort": "Reset sort", 1718 "table-now-displaying-page": "Table now displaying page {{pageNumber}} of {{totalPages}}", 1719 "table-now-displaying-rows": "Table now displaying {{pageSize}} rows per page which results in {{totalPages}} total pages for {{totalRows}} rows of data", 1720 "no-matching-results-found": "No matching results found, try another filter term", 1721 "table-filtered": "Table filtered, {{numberOfRows}} rows of data available", 1722 "table-filter-removed": "Filter removed, {{numberOfRows}} rows of data are available", 1723 "video-duration-is": "Video duration is", 1724 "minutes-and": "minutes and", 1725 "seconds-long": "seconds long", 1726 "view-video-transcript": "View video transcript", 1727 close: "close", 1728 disabled: "disabled", 1729 breadcrumbs: "breadcrumbs", 1730 calendar: "calendar", 1731 "escape-exit-calendar": "Press escape to exit the calendar.", 1732 "previous-year": "Previous year", 1733 "next-year": "Next year", 1734 "previous-month": "Previous month", 1735 "next-month": "Next month", 1736 "show-today": "Show today", 1737 "clear-value": "Clear value", 1738 "choose-date": "Choose date", 1739 "please-follow-format": "Please follow the {{format}} format.", 1740 "please-enter-valid-date": "Please enter a valid date.", 1741 "press-down-for-calendar": "Press the down arrow key to access the calendar.", 1742 error: "ERROR", 1743 "please-refresh-browser": "Please refresh your browser or try again in a few minutes.", 1744 "sorry-no-permission": "Sorry! It looks like you donât have permission to access this page.", 1745 "sorry-broken-link": "Weâre sorry. It looks like the link you followed may be broken or the page may have been moved.", 1746 "sorry-site-unavailable": "Sorry! This part of our site is currently unavailable, weâre working on resolving the issue as quickly as possible.", 1747 "well-thats-puzzling": 'Well, thatâs <span class="{{spanClass}}">puzzling.</span>', 1748 "well-shoot": '<span class="{{spanClass}}">Well, shoot.</span> Our system doesnât recognize you.', 1749 "uh-oh-small-glitch": '<span class="{{spanClass}}">Uh-oh.</span> Weâre experiencing a small glitch.', 1750 "bump-in-the-road": 'Looks like thereâs a <span class="{{spanClass}}">bump</span> in the road.', 1751 "attach-files": "Attach files", 1752 "attach-file": "Attach file", 1753 "drop-file-click": "Drop a file to attach, or <span class={{spanClass}}>click to browse.</span>", 1754 "drop-files-click": "Drop files to attach, or <span class={{spanClass}}>click to browse.</span>", 1755 "drop-file-tap": "Drop a file to attach, or <span class={{spanClass}}>tap to browse.</span>", 1756 "drop-files-tap": "Drop files to attach, or <span class={{spanClass}}>tap to browse.</span>", 1757 cancel: "Cancel", 1758 "replace-file-confirmation": "Are you sure you want to replace this file:", 1759 with: "With", 1760 replace: "Replace", 1761 "no-files-attached": "No files have been attached.", 1762 "please-ensure-file-formats": "Please make sure your files are in one of the following formats", 1763 "please-ensure-file-size": "Please make sure your files are below", 1764 "file-could-not-be-uploaded": "The following file could not be uploaded", 1765 "try-again": "Try again", 1766 "remove-attachment": "Remove attachment", 1767 "file-added-live-region": "1 file added", 1768 "files-added-live-region": "{{count}} files added", 1769 "removed-file-live-region": "Your {{fileToRemove}} file was removed", 1770 "show-more": "Show more", 1771 "show-less": "Show less", 1772 loading: "loading...", 1773 "expand-collapse-row": "Expand/collapse row", 1774 "expand-collapse-column": "Expand/collapse column", 1775 "expand-row": "Expand row", 1776 "collapse-row": "Collapse row", 1777 "trouble-logging-in": "Trouble logging in?", 1778 "get-help": "Get help", 1779 "link-to-principal-homepage": "Principal Financial Group logo, Link to Principal homepage", 1780 contact: "Contact", 1781 footer: "Footer", 1782 "terms-of-use": "Terms of use", 1783 disclosures: "Disclosures", 1784 privacy: "Privacy", 1785 security: "Security", 1786 "report-fraud": "Report fraud", 1787 accessibility: "Accessibility", 1788 "securities-offered": "Securities offered through Principal Securities, Inc.,", 1789 "member-sipc": "member SIPC", 1790 "principal-on-X": "Principal on X", 1791 "principal-on-youtube": "Principal on YouTube", 1792 "principal-on-facebook": "Principal on Facebook", 1793 "principal-on-linkedin": "Principal on LinkedIn", 1794 "principal-on-AppStore": "Principal on AppStore", 1795 "principal-on-GooglePlay": "Principal on GooglePlay", 1796 "back-to-footnote": "Back to footnote {{footnoteNumber}}", 1797 "mobile-navigation-menu": "Mobile navigation menu", 1798 "hang-on-a-moment": "Hang on a moment...", 1799 "few-more-seconds": "Just a few more seconds!", 1800 "session-expired": "Your session has expired.", 1801 "logged-out": "You've logged out.", 1802 "we-logged-you-out": "To keep your account secure, we've logged you out.", 1803 "not-what-you-wanted": "Not what you wanted to do?", 1804 "log-back-in": "Log back in", 1805 "go-to-first-page": "Go to first page", 1806 "go-to-previous-page": "Go to previous page",
1807 "go-to-next-page": "Go to next page", 1808 "go-to-last-page": "Go to last page", 1809 "no-more-additional-pages": "There are no more additional pages.", 1810 "no-more-previous-pages": "There are no more previous pages.", 1811 pagination: "pagination", 1812 "primary-navigation": "primary navigation", 1813 "go-to-page": "go to page", 1814 "log-out": "Log out", 1815 "log-in": "Log in", 1816 "skip-to-content": "Skip to content", 1817 search: "search", 1818 notifications: "notifications", 1819 messages: "Messages", 1820 "other-alerts": "Other alerts", 1821 "error-displaying-table-data": "Error displaying table data", 1822 "no-available-table-data": "No available table data", 1823 menu: "Menu", 1824 "secondary-navigation": "secondary navigation", 1825 "logout-alert": "Logout alert!", 1826 minutes: "minutes", 1827 "stay-logged-in": "Stay logged in", 1828 seconds: "seconds", 1829 "one-moment": "One moment", 1830 "close-the-timer": "close the timer", 1831 "to-save-your-work": "to save your work before you get logged out.", 1832 "sorry-something-wrong-session": "Sorry! Something went wrong on our end when trying to extend your session. Give it another try, or ", 1833 "still-there": "Still there? You're about to be logged out.",
1834 "auto-log-you-out-warning": "To keep your account secure, we'll automatically log you out in ", 1835 dismiss: "Dismiss", 1836 minute: "minute", 1837 "time-remaining": "{{time}} remaining", 1838 progress: "progress", 1839 completed: "completed", 1840 incomplete: "incomplete", 1841 "filter-table": "Filter table", 1842 show: "Show", 1843 hide: "Hide", 1844 "value-hidden-show-available": "Value hidden. Show button available.", 1845 "value-visible-hide-available": "Value visible. Hide button available.", 1846 "no-entries": "No entries", 1847 "number-rows-displayed": "Number of rows to display in table", 1848 of: "of", 1849 entries: "entries", 1850 entry: "entry", 1851 "contact-us": "Contact us", 1852 "help-topics": "Help topics", 1853 "call-us-at": "Call us at", 1854 "principal-legal-links": "Principal legal links", 1855 "social-media": "Social media", 1856 "utility-menu": "utility menu", 1857 "user-menu": "user menu", 1858 "dropdown-button": "dropdown-button", 1859 "additional-information": "Additional information", 1860 "required-group": "At least one option within the group must be checked.", 1861 "numeric-characters-allowed": "Only numeric characters are allowed", 1862 "success-alert": "Success alert", 1863 "information-alert": "Information alert", 1864 "warning-alert": "Warning alert", 1865 "error-alert": "Error alert", 1866 "banner-alert": "Banner alert", 1867 "alert-not-dismissible": "This alert is not dismissible", 1868 "not-found": "Not found", 1869 forbidden: "Forbidden", 1870 "internal-server-error": "Internal server error", 1871 "service-unavailable": "Service unavailable", 1872 "this-link-opens-in-a-new-tab": "This link opens in a new tab", 1873 "pfg-logo": "Principal Financial Group logo", 1874 "info-toast": "Information toast", 1875 "loading-toast": "Loading toast", 1876 "success-toast": "Success toast", 1877 "error-toast": "Error toast", 1878 legend: "Legend", 1879 "error-loading-chart": "Error loading chart", 1880 retry: "Retry", 1881 label: "Label", 1882 value: "Value", 1883 description: "Description", 1884 "search-combo-box": "Search combo box", 1885 "your-account-has-notifications": "Your account has notifications", 1886 chart: "Chart", 1887 table: "Table", 1888 "this-triggers-a-tooltip": "This triggers a tooltip", 1889 "no-chart-data": "No chart data available", 1890 expanded: "expanded", 1891 "donut-chart-accompanying-table": "Donut chart has an accompanying table with the following information", 1892 "selected-country": "Selected country", 1893 "aria-value-text": "The current value is {{value}} out of a range from {{min}} to {{max}} and increment is {{step}}", 1894 "current-value": "Current value", 1895 "range-slider-aria-value-text": "Range slider with value {{min}} to {{max}}, adjustable in increments of {{step}}. Current slider setting (start) {{rangeStart}}, (end) {{rangeEnd}}", 1896 "range-start": "Range start {{rangeStart}}", 1897 "range-end": "Range end {{rangeEnd}}", 1898 "slider-not-multiple-of-step": "The original value ({{newValue}}) is not a multiple of {{step}}, so it has been adjusted to the closest valid value ({{clampedValue}}). Use the slider handle to confirm or update this value.", 1899 "slider-outside-valid-range": "The original value ({{newValue}}) was outside of the available range ({{min}} to {{max}}), so it has been adjusted to the closest valid value ({{clampedValue}}). Use the slider handle to confirm or update this value.", 1900 "slider-range-outside-range": "The original values ({{newRangeStart}} and {{newRangeEnd}}) were outside of the available range ({{min}} to {{max}}), so it has been adjusted to the closest valid range ({{min}} to {{max}}). Use the slider handles to confirm or update these values.", 1901 "slider-range-start-above-max": "The original start value ({{newRangeStart}}) is above the maximum range ({{max}}), so it has been adjusted to the valid value ({{min}}). Use the slider handle to confirm or update this value.", 1902 "slider-range-end-below-min": "The original end value ({{newRangeEnd}}) is below the minimum range ({{min}}), so it has been adjusted to the valid value ({{max}}). Use the slider handle to confirm or update this value.", 1903 "slider-range-start-above-range": "The original start value ({{newRangeStart}}) is above the range end value ({{newRangeEnd}}), so it has been adjusted to the valid range ({{min}} to {{max}}). Use the slider handles to confirm or update these values.", 1904 "slider-range-start-outside": "The original start value ({{newRangeStart}}) was outside of the available range ({{min}} to {{max}}
1904), so it has been adjusted to the closest valid value ({{min}}). Use the slider handle to confirm or update this value.", 1905 "slider-range-end-outside": "The original end value ({{newRangeEnd}}) was outside of the available range ({{min}} to {{max}}), so it has been adjusted to the closest valid value ({{max}}). Use the slider handle to confirm or update this value.", 1906 "slider-range-not-multiple-of-step": "The original values ({{newRangeStart}} and {{newRangeEnd}}) are not multiples of {{step}}, so it has been adjusted to the closest valid range ({{snappedStart}} to {{snappedEnd}}). Use the slider handles to confirm or update these values.", 1907 "slider-range-start-not-multiple-of-step": "The original value ({{newRangeStart}}) is not a multiple of {{step}}, so it has been adjusted to the closest valid value ({{snappedStart}}). Use the slider handle to confirm or update this value.", 1908 "slider-range-end-not-multiple-of-step": "The original value ({{newRangeEnd}}) is not a multiple of {{step}}, so it has been adjusted to the closest valid value ({{snappedEnd}}). Use the slider handle to confirm or update this value.", 1909 "slider-range-same-values": "The original start value ({{newRangeStart}}) and end value ({{newRangeEnd}}) cannot be the same, so it has been adjusted to the valid range ({{min}} to {{max}}). Use the slider handles to confirm or update these values.", 1910 "view-footnote": "View footnote {{footnoteNumber}}", 1911 link: "Link" 1912 } 1913 }, 1914 es: { 1915 translation: { 1916 "characters-remaining": "restantes {{charactersRemaining}} caracteres", 1917 ascending: "ascendentes", 1918 descending: "descendentes", 1919 "data-table-sorted": "{{caption}} tabla, la columna {{headerName}} está ordenada por valores {{sortDirection}}", 1920 "column-headers-buttons-sortable": "los encabezados de columna con botones se pueden ordenar", 1921 "table-sort-removed": "La clasificación de la tabla se ha eliminado", 1922 "sort-by-ascending-values": "Ordenar por valores ascendentes", 1923 "sort-by-descending-values": "Ordenar por valores descendientes", 1924 "reset-sort": "Restablecer el orden", 1925 "table-now-displaying-page": "La tabla muestra la página {{pageNumber}} de {{totalPages}}", 1926 "table-now-displaying-rows": "La tabla muestra {{pageSize}} filas por página, es decir {{totalPages}} páginas en total con {{totalRows}} filas de datos", 1927 "no-matching-results-found": "No se encontraron resultados concordantes, intenta otra palabra de filtro", 1928 "table-filtered": "La tabla ha aplicado los filtros, hay {{numberOfRows}} filas de datos disponibles", 1929 "table-filter-removed": "El filtro se ha eliminado, hay {{numberOfRows}} filas de datos disponibles", 1930 "video-duration-is": "La duración del vÃdeo es de", 1931 "minutes-and": "minutos y", 1932 "seconds-long": "segundos", 1933 "view-video-transcript": "Ver la transcripción del video", 1934 close: "cerrar", 1935 disabled: "deshabilitado", 1936 breadcrumbs: "ayuda a la navegación", 1937 calendar: "calendario", 1938 "escape-exit-calendar": "Para salir del calendario pulsa la tecla escape.", 1939 "previous-year": "Año anterior", 1940 "next-year": "Año siguiente", 1941 "previous-month": "Mes anterior", 1942 "next-month": "Mes siguiente", 1943 "show-today": "Mostrar la fecha de hoy", 1944 "clear-value": "Borrar la fecha", 1945 "choose-date": "Elegir fecha", 1946 "please-follow-format": "Utiliza el formato {{format}}, por favor.", 1947 "please-enter-valid-date": "Por favor, ingresa una fecha válida.", 1948 "press-down-for-calendar": "Para acceder al calendario pulsa la flecha hacia abajo.", 1949 error: "ERROR", 1950 "please-refresh-browser": "Actualice su navegador o inténtelo de nuevo en unos minutos.", 1951 "sorry-no-permission": "¡Arrepentido! Parece que no tienes permiso para acceder a esta página.", 1952 "sorry-broken-link": "Lo sentimos. Parece que el enlace que siguió puede estar roto o la página puede haber sido movida.", 1953 "sorry-site-unavailable": "Arrepentido! Esta parte de nuestro sitio no está disponible actualmente, estamos trabajando para resolver el problema lo más rápido posible.", 1954 "well-thats-puzzling": 'Bueno, eso es <span class="{{spanClass}}">desconcertante.</span>', 1955 "well-shoot": '<span class="{{spanClass}}">Bueno, dispara.</span> Nuestro sistema no te reconoce.', 1956 "uh-oh-small-glitch": '<span class="{{spanClass}}">Uh-oh.</span> Estamos experimentando una pequeña falla.', 1957 "bump-in-the-road": 'Parece que hay un <span class="{{spanClass}}">chichón</span> en la carretera.', 1958 "attach-files": "Adjuntar archivos", 1959 "attach-file": "Adjuntar archivo", 1960 "drop-file-click": "Arrastra un archivo para adjuntar o <span class={{spanClass}}>haz clic para buscarlo en tu equipo.</span>", 1961 "drop-files-click": "Arrastra los archivos para adjuntar o <span class={{spanClass}}>haz clic para buscarlos en tu equipo.</span>", 1962 "drop-file-tap": "Arrastra un archivo para adjuntar o <span class={{spanClass}}>haz clic para buscarlo en tu equipo.</span>", 1963 "drop-files-tap": "Arrastra los archivos para adjuntar o <span class={{spanClass}}>pulsa para buscarlos en tu equipo.</span>", 1964 cancel: "Cancelar", 1965 "replace-file-confirmation": "¿Está seguro de que desea reemplazar el siguiente archivo?", 1966 with: "Con", 1967 replace: "Reemplazar", 1968 "no-files-attached": "No se adjuntó ningún archivo.", 1969 "please-ensure-file-formats": "Por favor, asegúrate de que tus archivos estén en alguno de los siguientes formatos", 1970 "please-ensure-file-size": "Asegúrese de que sus archivos estén debajo", 1971 "file-could-not-be-uploaded": "El siguiente archivo no se pudo cargar", 1972 "try-again": "Intenta de nuevo", 1973 "remove-attachment": "Eliminar adjunto", 1974 "file-added-live-region": "Se agregó 1 archivo", 1975 "files-added-live-region": "Se agregaron {{count}} archivos", 1976 "removed-file-live-region": "Tu {{fileToRemove}} archivo fue eliminado.", 1977 "show-more": "Mostrar más", 1978 "show-less": "Ver menos", 1979 loading: "cargando...", 1980 "expand-collapse-row": "Expandir/contraer fila", 1981 "expand-collapse-column": "Expandir/contraer columna", 1982 "expand-row": "Expanda la fila", 1983 "collapse-row": "Contraiga la fila", 1984 "trouble-logging-in": "¿Tienes problemas para iniciar sesión?", 1985 "get-help": "Consigue ayuda", 1986 "link-to-principal-homepage": "Logo de Principal Financial Group, Bienvenida a la página principal", 1987 contact: "ComunÃcate con nosotros", 1988 footer: "Pie de página", 1989 "terms-of-use": "Términos de uso", 1990 disclosures: "Declaraciones", 1991 privacy: "Privacidad", 1992 security: "Seguridad", 1993 "report-fraud": "Reporte de fraudes", 1994 accessibility: "Accesibilidad", 1995 "securities-offered": "Los valores son ofrecidos a través de Principal Securities, Inc.,", 1996 "member-sipc": "miembro de la SIPC", 1997 "principal-on-X": "Principal en X", 1998 "principal-on-youtube": "Principal en YouTube", 1999 "principal-on-facebook": "Principal en Facebook", 2000 "principal-on-linkedin": "Principal en LinkedIn", 2001 "principal-on-AppStore": "Principal en AppStore", 2002 "principal-on-GooglePlay": "Principal en GooglePlay", 2003 "back-to-footnote": "Volver a la nota a pie de página {{footnoteNumber}}", 2004 "mobile-navigation-menu": "Menú de navegación móvil", 2005 "hang-on-a-moment": "Espera un momento...", 2006 "few-more-seconds": "¡Solo unos segundos más!", 2007 "session-expired": "Tu sesión venció.", 2008 "logged-out": "Cerraste sesión.", 2009 "we-logged-you-out": "Para mantener tu cuenta segura, hemos cerrado tu sesión.", 2010 "not-what-you-wanted": "¿No era lo que querÃas hacer?", 2011 "log-back-in": "Iniciar sesión de nuevo", 2012 "go-to-first-page": "Ir a la primera página", 2013 "go-to-previous-page": "Ir a la página anterior", 2014 "go-to-next-page": "Ir a la página siguiente", 2015 "go-to-last-page": "Ir a la última página", 2016 "no-more-additional-pages": "No hay más páginas adicionales", 2017 "no-more-previous-pages": "No hay más páginas anteriores.", 2018 pagination: "paginación", 2019 "primary-navigation": "navegación primaria", 2020 "go-to-page": "ir a la página", 2021 "log-out": "Cerrar sesión", 2022 "log-in": "Ingresar", 2023 "skip-to-content": "Saltar al contenido", 2024 search: "buscar", 2025 notifications: "notificaciones", 2026 messages: "Mensajes", 2027 "other-alerts": "Otras alertas", 2028 "error-displaying-table-data": "Error al mostrar los datos de la tabla", 2029 "no-available-table-data": "No hay datos de tabla disponibles", 2030 menu: "Menú", 2031 "secondary-navigation": "secundario navigation", 2032 "logout-alert": "¡Aviso de cierre de sesión!", 2033 minutes: "minutos", 2034 "stay-logged-in": "Mantener la sesión", 2035 seconds: "segundos", 2036 "one-moment": "Un momento", 2037 "close-the-timer": "cerrar el temporizador", 2038 "to-save-your-work": " y guarda tu trabajo.", 2039 "sorry-something-wrong-session": "¡Disculpa! Algo salió mal al tratar de alargar tu sesión. Antes de que se te cierre la sesión, inténtalo nuevamente o ", 2040 "still-there": "¿Aún estás aquÃ? Pronto se te cerrará la sesión.",
2041 "auto-log-you-out-warning": "Por la seguridad de tu cuenta, cerraremos tu sesión en ", 2042 dismiss: "Ignorar", 2043 minute: "minuto", 2044 "time-remaining": "El tiempo que te queda es {{time}}", 2045 progress: "progreso", 2046 completed: "paso completo", 2047 incomplete: "paso incompleto", 2048 "filter-table": "Filtrar tabla", 2049 show: "Mostrar", 2050 hide: "Ocultar", 2051 "value-hidden-show-available": "Valor oculto. Botón Mostrar disponible.", 2052 "value-visible-hide-available": "Valor visible. Botón Ocultar disponible.", 2053 "no-entries": "No hay registros", 2054 "number-rows-displayed": "Número de filas que aparecerán en la tabla", 2055 of: "de", 2056 entries: "registros", 2057 entry: "registro", 2058 "contact-us": "ComunÃcate con nosotros", 2059 "help-topics": "Temas de ayuda", 2060 "call-us-at": "Llamenos al", 2061 "principal-legal-links": "Principales enlaces legales", 2062 "social-media": "Medios de comunicación social", 2063 "utility-menu": "menú de utilidades", 2064 "user-menu": "Menú del Usuario", 2065 "dropdown-button": "botón desplegable", 2066 "additional-information": "Información adicional", 2067 "required-group": "Se debe marcar al menos una opción dentro del grupo.", 2068 "numeric-characters-allowed": "Solo se permiten caracteres numéricos", 2069 "success-alert": "Alerta de éxito", 2070 "information-alert": "Alerta de información", 2071 "warning-alert": "Alerta de advertencia", 2072 "error-alert": "Alerta de error", 2073 "banner-alert": "Alerta de banner", 2074 "alert-not-dismissible": "Esta alerta no se puede descartar", 2075 "not-found": "No se encontró", 2076 forbidden: "No está permitido", 2077 "internal-server-error": "Error del servidor interno", 2078 "service-unavailable": "Servicio no disponible", 2079 "this-link-opens-in-a-new-tab": "Este enlace se abre en una nueva pestaña", 2080 "pfg-logo": "Logo de Principal Financial Group", 2081 "info-toast": "Notificación temporal (toast) informativa", 2082 "loading-toast": "Notificación temporal (toast) sobre una carga (loading)", 2083 "success-toast": "Notificación temporal (toast) sobre un paso exitoso", 2084 "error-toast": "Notificación temporal (toast) sobre un error", 2085 legend: "Referencia", 2086 "error-loading-chart": "Error al cargar gráfico", 2087 retry: "Intentar otra vez", 2088 label: "Identificar", 2089 value: "Valor", 2090 description: "Descripción", 2091 "search-combo-box": "Buscar en cuadro combinado", 2092 "your-account-has-notifications": "Tienes notificaciones en tu cuenta", 2093 chart: "Gráfica", 2094 table: "Tabla", 2095 "this-triggers-a-tooltip": "Esto activa información en pantalla", 2096 "no-chart-data": "No hay datos de gráfica disponibles", 2097 expanded: "Vista expandida", 2098 "donut-chart-accompanying-table": "La gráfica circular está acompañada por una tabla con la siguiente información", 2099 "selected-country": "PaÃs seleccionado", 2100 "aria-value-text": "El valor actual es {{value}} dentro de un rango de {{min}} a {{max}}, en incrementos de {{step}}", 2101 "current-value": "Valor actual", 2102 "range-slider-aria-value-text": "Barra deslizable de rangos con valores del {{min}} al {{max}}, ajustable en incrementos de {{step}}. Configuración actual de la barra deslizable (inicio) {{rangeStart}}, (fin) {{rangeEnd}}", 2103 "range-start": "Inicio de rango {{rangeStart}}", 2104 "range-end": "Fin de rango {{rangeEnd}}", 2105 "slider-not-multiple-of-step": "El valor original ({{newValue}}) no es un múltiplo de {{step}}, asà que se ajustó al valor válido más cercano ({{clampedValue}}). Usa la barra deslizadora para confirmar o actualizar este valor.", 2106 "slider-outside-valid-range": "El valor original ({{newValue}}) está fuera del rango disponible (de {{min}} a {{max}}), asà que se ajustó al valor válido más cercano ({{clampedValue}}). Usa la barra deslizadora para confirmar o actualizar este valor.", 2107 "slider-range-outside-range": "Los valores originales ({{newRangeStart}} y {{newRangeEnd}}) están fuera del rango disponible (de {{min}} a {{max}}), asà que se ajustó al rango válido más cercano (de {{min}} a {{max}}). Usa las barras deslizadoras para confirmar o actualizar estos valores.", 2108 "slider-range-start-above-max": "El valor inicial original ({{newRangeStart}}) supera el rango máximo ({{max}}), asà que se ajustó al valor válido ({{min}}). Usa la barra deslizadora para confirmar o actualizar este valor.", 2109 "slider-range-end-below-min": "El valor final original ({{newRangeEnd}}) está por debajo del rango mÃnimo ({{min}}), asà que se ajustó al valor válido ({{max}}). Usa la barra deslizadora para confirmar o actualizar este valor.", 2110 "slider-range-start-above-range": "El valor inicial original ({{newRangeStart}}) supera el valor final del rango ({{newRangeEnd}}), asà que se ajustó al rango válido (de {{min}} a {{max}}). Usa las barras deslizadoras para confirmar o actualizar estos valores.",
2111 "slider-range-start-outside": "El valor inicial original ({{newRangeStart}}) está fuera del rango disponible (de {{min}} a {{max}}), asà que se ajustó al valor válido más cercano ({{min}}). Usa la barra deslizadora para confirmar o actualizar este valor.", 2112 "slider-range-end-outside": "El valor final original ({{newRangeEnd}}) está fuera del rango disponible (de {{min}} a {{max}}), asà que se ajustó al valor válido más cercano ({{max}}). Usa la barra deslizadora para confirmar o actualizar este valor.", 2113 "slider-range-not-multiple-of-step": "Los valores originales ({{newRangeStart}} y {{newRangeEnd}}) no son múltiplos de {{step}}, asà que se ajustó al rango válido más cercano (de {{snappedStart}} a {{snappedEnd}}). Usa las barras deslizadoras para confirmar o actualizar estos valores.", 2114 "slider-range-start-not-multiple-of-step": "El valor original ({{newRangeStart}}) no es un múltiplo de {{step}}, asà que se ajustó al valor válido más cercano ({{snappedStart}}). Usa la barra deslizadora para confirmar o actualizar este valor.", 2115 "slider-range-end-not-multiple-of-step": "El valor original ({{newRangeEnd}}) no es un múltiplo de {{step}}, asà que se ajustó al valor válido más cercano ({{snappedEnd}}). Usa la barra deslizadora para confirmar o actualizar este valor.", 2116 "slider-range-same-values": "El valor inicial original ({{newRangeStart}}) y el valor final ({{newRangeEnd}}) no pueden ser iguales, asà que se ha ajustado al rango válido de ({{min}} a {{max}}). Usa la barra deslizadora para confirmar o actualizar estos valores.", 2117 "view-footnote": "Ver nota a pie de página {{footnoteNumber}}", 2118 link: "Enlace" 2119 } 2120 } 2121}; 2122var Pt = Object.defineProperty, Y = (n, e, t, a) => { 2123 for (var s = void 0, i = n.length - 1, r; i >= 0; i--) 2124 (r = n[i]) && (s = r(e, t, s) || s); 2125 return s && Pt(e, t, s), s; 2126}; 2127class Q extends Ae { 2128 constructor() { 2129 super(...arguments), this.initialRenderForRequiredSlotValidation = !0, this.requiredSlotElements = {}, this.requiredSlotTimeout = null, this.isSuspended = !1, this.isHydrationComplete = !1; 2130 } 2131 /** 2132 * Skip updates when the component is suspended 2133 * @internal 2134 */ 2135 shouldUpdate() { 2136 return !this.isSuspended; 2137 } 2138 /** 2139 * The class map used to derive the class attribute for the component. 2140 * This will be used by the getClass method. 2141 * @internal 2142 */ 2143 get classNames() { 2144 return {}; 2145 } 2146 /** 2147 * The class name prefixed with the appropriate global namespace and class prefix. 2148 * @internal 2149 */ 2150 get classNamespaceAndPrefix() { 2151 const e = { 2152 component: "c", 2153 layout: "l" 2154 }; 2155 return this.isComponent(this.componentType) ? `pds-${e[this.componentCategory]}-${this.componentName}` : `${e[this.componentCategory]}-${this.componentName}`; 2156 } 2157 isComponent(e) { 2158 return e === "component"; 2159 } 2160 /** 2161 * Prepends the appropriate namespace to the class: 'pds-' Components or '' Recipes 2162 * @param key 2163 */ 2164 getClassNamespace(e) { 2165 return this.isComponent(this.componentType) ? `pds-${e}` : ""; 2166 } 2167 /** 2168 * Prepends the appropriate prefix to the class name as a BEM modifier 2169 * @param className 2170 */ 2171 classMod(e) { 2172 return `${this.classNamespaceAndPrefix}--${e}`; 2173 } 2174 /** 2175 * Prepends the appropriate prefix to the class as a BEM element 2176 * @param className 2177 */ 2178 classEl(e) { 2179 return `${this.classNamespaceAndPrefix}__${e}`; 2180 } 2181 /** 2182 * Wraps the classNames object in Lit's classMap directive,
2183 * adding the appropriate prefix to each class name 2184 * @returns the string to pass to the component's class attribute 2185 * @example 2186 * class Button extends PdsElement { 2187 * componentName = 'button'; 2188 * 2189 * componentCategory:ComponentCategory = 'component'; 2190 * 2191 * componentType: ComponentType = 'component'; 2192 * 2193 * \@property() 2194 * variant: 'primary' | 'secondary'; 2195 * 2196 * get classNames() { 2197 * return { 2198 * [this.variant]: !!this.variant, // pds-c-button--primary 2199 * centered: this.aligned === "centered", // pds-c-button--centered 2200 * inverse: this.inverted, // pds-c-button--inverse 2201 * "is-active": this.active, // pds-is-active 2202 * }; 2203 * } 2204 * } 2205 * 2206 * // Given the above component class, if you render the following 2207 * <pds-button variant="primary">Hello world</pds-button> 2208 * 2209 * // then if you call this method, it will return the following (recipe components omit 'pds-') 2210 * this.getClass() // 'pds-c-button pds-c-button--primary' 2211 */ 2212 getClass() { 2213 return ze( 2214 Object.keys(this.classNames).reduce( 2215 (e, t) => { 2216 const a = /^is-/.test(t) ? this.getClassNamespace(t) : this.classMod(t); 2217 return { 2218 ...e, 2219 [a]: this.classNames[t] 2220 }; 2221 }, 2222 { 2223 [this.classNamespaceAndPrefix]: !0 2224 } 2225 ) 2226 ); 2227 } 2228 /** 2229 * Sets the isHydrationComplete check to true 2230 * This needs to get set in the element's 2231 * firstUpdated lifecycle hook (this is done by default) 2232 */ 2233 setHydrationComplete() { 2234 this.isHydrationComplete = !0; 2235 } 2236 /** 2237 * Check if a slot is empty 2238 * This can only be used once hydration is complete, and thus 2239 * setHydrationComplete will need to run first for this to work 2240 * 2241 * @param slotName 2242 */ 2243 slotEmpty(e) { 2244 return this.isHydrationComplete ? !this.querySelector(`[slot${e ? `="${e}"` : ""}]`) : !0; 2245 } 2246 /** 2247 * Check if a slot is not empty 2248 * This can only be used once hydration is complete, and thus 2249 * setHydrationComplete will need to run first for this to work 2250 * 2251 * @param slotName 2252 */ 2253 slotNotEmpty(e) { 2254 return this.slotEmpty(e) ? "" : !this.slotEmpty(e); 2255 } 2256 firstUpdated() { 2257 this.setHydrationComplete(), m.isInitialized && m.changeLanguage(); 2258 } 2259 /** 2260 * Dynamically generate random unique IDs 2261 * Returns '' if window.crypto.randomUUID() is not available 2262 */ 2263 getRandomId() { 2264 return window.crypto && window.crypto.randomUUID ? window.crypto.randomUUID() : Math.random().toString(36).substring(2, 10); 2265 } 2266 /** 2267 * This initializes language localization capabilities on a component 2268 * Call this function from the connectedCallback() function, like this: 2269 * 2270 * connectedCallback() { 2271 * super.connectedCallback(); 2272 * this.initLocalization(); 2273 * } 2274 */ 2275 initLocalization() { 2276 m.isInitialized || (m.use(Ee).init({ 2277 fallbackLng: "en", 2278 resources: Le, 2279 detection: { 2280 lookupLocalStorage: "pds-language", 2281 lookupQuerystring: "lang", 2282 order: [ 2283 "htmlTag", 2284 "localStorage", 2285 "querystring", 2286 "cookie", 2287 "sessionStorage", 2288 "navigator" 2289 ] 2290 } 2291 }), m.languages = ["en", "es"]); 2292 } 2293 /** 2294 * This function is a wrapper for i18next.t(). 2295 * 2296 * It will default to the English translation if i18next 2297 * is not yet available. 2298 */ 2299 translateText(e, t) { 2300 return !this.isHydrationComplete || !m.isInitialized ? Le.en.translation[e] : m.t(e, t); 2301 } 2302 /** 2303 * Clone a lit element 2304 */ 2305 cloneLitElement(e) { 2306 const t = e.cloneNode(!0); 2307 try { 2308 const a = Object.getOwnPropertyNames(e).filter( 2309 (r) => r.startsWith("__reactFiber") 2310 )[0], i = Object.getOwnPropertyDescriptors(e)[a]; 2311 if (i?.value?.return?.pendingProps) { 2312 const r = i.value.return.pendingProps, o = Object.keys(r).filter( 2313 (u) => u !== "children" && u !== "suppressHydrationWarning" && !u.startsWith("_") 2314 ).reduce((u, c) => ({ 2315 ...u, 2316 [c]: r[c] 2317 }), {});
2318 Object.keys(o).forEach((u) => { 2319 o[u] !== !1 && t.setAttribute(u, o[u]); 2320 }); 2321 } 2322 } catch { 2323 } 2324 return t; 2325 } 2326 /** 2327 * Note: this needs to be called on the client only 2328 * You can call it on the client by calling it from a slotchange event 2329 */ 2330 setWindowResizeHandler() { 2331 if (window) { 2332 const e = () => { 2333 const t = window.innerWidth; 2334 t && (t < Ke ? this.responsiveViewportSize = "xs" : t < He ? this.responsiveViewportSize = "sm" : t < qe ? this.responsiveViewportSize = "md" : t < Be ? this.responsiveViewportSize = "lg" : this.responsiveViewportSize = "xl"); 2335 }; 2336 e(), window.visualViewport?.addEventListener("resize", e); 2337 } 2338 } 2339 /** 2340 * Used to duplicate slot markup if the markup differs between mobile and desktop views. 2341 */ 2342 duplicateSlotMarkup(e) { 2343 const t = e.assignedNodes(); 2344 this.dynamicSlotMarkup = t.map((a) => { 2345 let s = a; 2346 return s.tagName && s.tagName.toLowerCase().startsWith("pds-") ? s = this.cloneLitElement(s) : s = a.cloneNode(!0), s instanceof HTMLElement && (s.removeAttribute("slot"), s.removeAttribute("id")), s; 2347 }); 2348 } 2349 /** 2350 * Returns the duplicated slot markup 2351 */ 2352 getDynamicSlotMarkup() { 2353 if (this.dynamicSlotMarkup) 2354 return this.dynamicSlotMarkup.map((e) => { 2355 const t = e; 2356 return t.tagName && t.tagName.toLowerCase().startsWith("pds-") ? this.cloneLitElement(t) : e.cloneNode(!0); 2357 }); 2358 } 2359 /** 2360 * Checks if a slotted element is valid for its slot 2361 * Can pass the slot event on slotchange or the slot 2362 * name to validate 2363 */ 2364 handleSlotValidation(e) { 2365 let t; 2366 if (typeof e == "string") { 2367 if (t = this.querySelector( 2368 `slot[name="${e}"]` 2369 ) || this.shadowRoot?.querySelector( 2370 `slot[name="${e}"]` 2371 ), t === null) 2372 return; 2373 } else if (e) 2374 t = e.target; 2375 else if (t = this.querySelector("slot") || this.shadowRoot?.querySelector("slot"), t === null) 2376 return; 2377 const a = t.getAttribute("allowed-elements")?.split(",").map((i) => i.trim().toUpperCase()); 2378 if (typeof a > "u") 2379 return; 2380 t.assignedElements().forEach((i) => { 2381 this.validateSlottedElements(i, a) || (console.error("Invalid slotted element:", i), i.remove()); 2382 }); 2383 } 2384 /** 2385 * Checks if an element's tag name is valid, based on a list of valid tag namesubstrings 2386 */ 2387 validateSlottedElements(e, t) { 2388 return !!(e instanceof Element && t.find((a) => e.tagName.toUpperCase().includes(a))); 2389 } 2390} 2391Y([ 2392 ke({ type: Boolean, reflect: !0 }) 2393], Q.prototype, "isSuspended"); 2394Y([ 2395 ee() 2396], Q.prototype, "isHydrationComplete"); 2397Y([ 2398 ee() 2399], Q.prototype, "responsiveViewportSize"); 2400Y([ 2401 ee() 2402], Q.prototype, "dynamicSlotMarkup"); 2403export { 2404 Ke as B, 2405 Q as P, 2406 Ue as a, 2407 qe as b, 2408 Rt as c, 2409 ze as d, 2410 De as e, 2411 m as i, 2412 ke as n, 2413 ee as r, 2414 Fe as t 2415}; 2416//# sourceMappingURL=PdsElement.chunk-DRcGehWK.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.