| 2 |
(()=>{"use strict";var e={15(e,t,n){var a=n(594);var s="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=a.useState,i=a.useEffect,r=a.useLayoutEffect,l=a.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!s(e,n)}catch(e){return!0}}var u="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),a=o({inst:{value:n,getSnapshot:t}}),s=a[0].inst,u=a[1];return r(function(){s.value=n,s.getSnapshot=t,c(s)&&u({inst:s})},[e,n,t]),i(function(){return c(s)&&u({inst:s}),e(function(){c(s)&&u({inst:s})})},[e]),l(n),n};void 0!==a.useSyncExternalStore&&a.useSyncExternalStore},98(e,t,n){n(15)},594(e){e.exports=React}};const t={};function n(a){const s=t[a];if(void 0!==s)return s.exports;const o=t[a]={exports:{}};return e[a](o,o.exports,n),o.exports}n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}();var a=n(594);const s=wp.components,o=e=>"string"==typeof e,i=()=>{let e,t;const n=new Promise((n,a)=>{e=n,t=a});return n.resolve=e,n.reject=t,n},r=e=>null==e?"":String(e),l=/###/g,c=e=>e&&e.includes("###")?e.replace(l,"."):e,u=e=>!e||o(e),p=(e,t,n)=>{const a=o(t)?t.split("."):t;let s=0;for(;s<a.length-1;){if(u(e))return{};const t=c(a[s]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++s}return u(e)?{}:{obj:e,k:c(a[s])}},d=(e,t,n)=>{const{obj:a,k:s}=p(e,t,Object);if(void 0!==a||1===t.length)return void(a[s]=n);let o=t[t.length-1],i=t.slice(0,t.length-1),r=p(e,i,Object);for(;void 0===r.obj&&i.length;)o=`${i[i.length-1]}.${o}`,i=i.slice(0,i.length-1),r=p(e,i,Object),r?.obj&&void 0!==r.obj[`${r.k}.${o}`]&&(r.obj=void 0);r.obj[`${r.k}.${o}`]=n},h=(e,t)=>{const{obj:n,k:a}=p(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,a))return n[a]},g=(e,t,n)=>{for(const a in t)"__proto__"!==a&&"constructor"!==a&&(Object.prototype.hasOwnProperty.call(e,a)?o(e[a])||e[a]instanceof String||o(t[a])||t[a]instanceof String?n&&(e[a]=t[a]):g(e[a],t[a],n):e[a]=t[a]);return e},f=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),m={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},v=e=>o(e)?e.replace(/[&<>"'\/]/g,e=>m[e]):e;const y=[" ",",","?","!",";"],b=new class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(void 0!==t)return t;const n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}}(20),k=(e,t,n=".")=>{if(!e)return;if(e[t]){if(!Object.prototype.hasOwnProperty.call(e,t))return;return e[t]}const a=t.split(n);let s=e;for(let e=0;e<a.length;){if(!s||"object"!=typeof s)return;let t,o="";for(let i=e;i<a.length;++i)if(i!==e&&(o+=n),o+=a[i],t=s[o],void 0!==t){if(["string","number","boolean"].includes(typeof t)&&i<a.length-1)continue;e+=i-e+1;break}s=t}return s},N=e=>e?.replace(/_/g,"-"),x={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console?.[e]?.apply?.(console,t)}};class S{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||"i18next:",this.logger=e||x,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,"log","",!0)}warn(...e){return this.forward(e,"warn","",!0)}error(...e){return this.forward(e,"error","")}deprecate(...e){return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,n,a){return a&&!this.debug?null:(e=e.map(e=>o(e)?e.replace(/[\r\n\x00-\x1F\x7F]/g," "):e),o(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new S(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new S(this.logger,e)}}var w=new S;class O{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(e=>{this.observers[e]||(this.observers[e]=new Map);const n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)}),this}off(e,t){this.observers[e]&&(t?this.observers[e].delete(t):delete this.observers[e])}once(e,t){const n=(...a)=>{t(...a),this.off(e,n)};return this.on(e,n),this}emit(e,...t){if(this.observers[e]){Array.from(this.observers[e].entries()).forEach(([e,n])=>{for(let a=0;a<n;a++)e(...t)})}if(this.observers["*"]){Array.from(this.observers["*"].entries()).forEach(([n,a])=>{for(let s=0;s<a;s++)n(e,...t)})}}}class E extends O{constructor(e,t={ns:["translation"],defaultNS:"translation"}){super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.includes(e)||this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n,a={}){const s=void 0!==a.keySeparator?a.keySeparator:this.options.keySeparator,i=void 0!==a.ignoreJSONStructure?a.ignoreJSONStructure:this.options.ignoreJSONStructure;let r;e.includes(".")?r=e.split("."):(r=[e,t],n&&(Array.isArray(n)?r.push(...n):o(n)&&s?r.push(...n.split(s)):r.push(n)));const l=h(this.data,r);return l||t||n||!e.includes(".")||(e=r[0],t=r[1],n=r.slice(2).join(".")),!l&&i&&o(n)?k(this.data?.[e]?.[t],n,s):l}addResource(e,t,n,a,s={silent:!1}){const o=void 0!==s.keySeparator?s.keySeparator:this.options.keySeparator;let i=[e,t];n&&(i=i.concat(o?n.split(o):n)),e.includes(".")&&(i=e.split("."),a=t,t=i[1]),this.addNamespaces(t),d(this.data,i,a),s.silent||this.emit("added",e,t,n,a)}addResources(e,t,n,a={silent:!1}){for(const a in n)(o(n[a])||Array.isArray(n[a]))&&this.addResource(e,t,a,n[a],{silent:!0});a.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,a,s,o={silent:!1,skipCopy:!1}){let i=[e,t];e.includes(".")&&(i=e.split("."),a=n,n=t,t=i[1]),this.addNamespaces(t);let r=h(this.data,i)||{};o.skipCopy||(n=JSON.parse(JSON.stringify(n))),a?g(r,n,s):r={...r,...n},d(this.data,i,r),o.silent||this.emit("added",e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return void 0!==this.getResource(e,t)}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}}var L={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,a,s){return e.forEach(e=>{t=this.processors[e]?.process(t,n,a,s)??t}),t}};const $=Symbol("i18next/PATH_KEY");function j(e,t){const{[$]:n}=e(function(){const e=[],t=Object.create(null);let n;return t.get=(a,s)=>(n?.revoke?.(),s===$?e:(e.push(s),n=Proxy.revocable(a,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}()),a=t?.keySeparator??".",s=t?.nsSeparator??":",o="strict"===t?.enableSelector;if(n.length>1&&s){const e=t?.ns,i=o?Array.isArray(e)?e:e?[e]:null:Array.isArray(e)?e:null;if(i){if((o?i:i.length>1?i.slice(1):[]).includes(n[0]))return`${n[0]}${s}${n.slice(1).join(a)}`}}return n.join(a)}const C=e=>!o(e)&&"boolean"!=typeof e&&"number"!=typeof e;class P extends O{constructor(e,t={}){super(),((e,t,n)=>{e.forEach(e=>{t[e]&&(n[e]=t[e])})})(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=w.create("translator"),this.checkedLoadedFor={}}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){const n={...t};if(null==e)return!1;const a=this.resolve(e,n);if(void 0===a?.res)return!1;const s=C(a.res);return!1!==n.returnObjects||!s}extractFromKey(e,t){let n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");const a=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator;let s=t.ns||this.options.defaultNS||[];const i=n&&e.includes(n),r=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||((e,t,n)=>{t=t||"",n=n||"";const a=y.filter(e=>!t.includes(e)&&!n.includes(e));if(0===a.length)return!0;const s=b.getRegExp(`(${a.map(e=>"?"===e?"\\?":e).join("|")})`);let o=!s.test(e);if(!o){const t=e.indexOf(n);t>0&&!s.test(e.substring(0,t))&&(o=!0)}return o})(e,n,a));if(i&&!r){const t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:o(s)?[s]:s};const i=e.split(n);(n!==a||n===a&&this.options.ns.includes(i[0]))&&(s=i.shift()),e=i.join(a)}return{key:e,namespaces:o(s)?[s]:s}}translate(e,t,n){let a="object"==typeof t?{...t}:t;if("object"!=typeof a&&this.options.overloadTranslationOptionHandler&&(a=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof a&&(a={...a}),a||(a={}),null==e)return"";"function"==typeof e&&(e=j(e,{...this.options,...a})),Array.isArray(e)||(e=[String(e)]),e=e.map(e=>"function"==typeof e?j(e,{...this.options,...a}):String(e));const s=void 0!==a.returnDetails?a.returnDetails:this.options.returnDetails,i=void 0!==a.keySeparator?a.keySeparator:this.options.keySeparator,{key:r,namespaces:l}=this.extractFromKey(e[e.length-1],a),c=l[l.length-1];let u=void 0!==a.nsSeparator?a.nsSeparator:this.options.nsSeparator;void 0===u&&(u=":");const p=a.lng||this.language,d=a.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if("cimode"===p?.toLowerCase())return d?s?{res:`${c}${u}${r}`,usedKey:r,exactUsedKey:r,usedLng:p,usedNS:c,usedParams:this.getUsedParamsDetails(a)}:`${c}${u}${r}`:s?{res:r,usedKey:r,exactUsedKey:r,usedLng:p,usedNS:c,usedParams:this.getUsedParamsDetails(a)}:r;const h=this.resolve(e,a);let g=h?.res;const f=h?.usedKey||r,m=h?.exactUsedKey||r,v=void 0!==a.joinArrays?a.joinArrays:this.options.joinArrays,y=!this.i18nFormat||this.i18nFormat.handleAsObject,b=void 0!==a.count&&!o(a.count),k=P.hasDefaultValue(a),N=b?this.pluralResolver.getSuffix(p,a.count,a):"",x=a.ordinal&&b?this.pluralResolver.getSuffix(p,a.count,{ordinal:!1}):"",S=b&&!a.ordinal&&0===a.count,w=S&&a[`defaultValue${this.options.pluralSeparator}zero`]||a[`defaultValue${N}`]||a[`defaultValue${x}`]||a.defaultValue;let O=g;y&&!g&&k&&(O=w);const E=C(O),L=Object.prototype.toString.apply(O);if(!(y&&O&&E)||["[object Number]","[object Function]","[object RegExp]"].includes(L)||o(v)&&Array.isArray(O))if(y&&o(v)&&Array.isArray(g))g=g.join(v),g&&(g=this.extendTranslation(g,e,a,n));else{let t=!1,s=!1;!this.isValidLookup(g)&&k&&(t=!0,g=w),this.isValidLookup(g)||(s=!0,g=r);const o=(a.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&s?void 0:g,l=k&&w!==g&&this.options.updateMissing;if(s||t||l){if(this.logger.log(l?"updateKey":"missingKey",p,c,b&&!l?`${r}${this.pluralResolver.getSuffix(p,a.count,a)}`:r,l?w:g),i){const e=this.resolve(r,{...a,keySeparator:!1});e&&e.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let e=[];const t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,a.lng||this.language);if("fallback"===this.options.saveMissingTo&&t&&t[0])for(let n=0;n<t.length;n++)e.push(t[n]);else"all"===this.options.saveMissingTo?e=this.languageUtils.toResolveHierarchy(a.lng||this.language):e.push(a.lng||this.language);const n=(e,t,n)=>{const s=k&&n!==g?n:o;this.options.missingKeyHandler?this.options.missingKeyHandler(e,c,t,s,l,a):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,c,t,s,l,a),this.emit("missingKey",e,c,t,g)};this.options.saveMissing&&(this.options.saveMissingPlurals&&b?e.forEach(e=>{const t=this.pluralResolver.getSuffixes(e,a);S&&a[`defaultValue${this.options.pluralSeparator}zero`]&&!t.includes(`${this.options.pluralSeparator}zero`)&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{n([e],r+t,a[`defaultValue${t}`]||w)})}):n(e,r,w))}g=this.extendTranslation(g,e,a,h,n),s&&g===r&&this.options.appendNamespaceToMissingKey&&(g=`${c}${u}${r}`),(s||t)&&this.options.parseMissingKeyHandler&&(g=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}${u}${r}`:r,t?g:void 0,a))}else{if(!a.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(f,O,{...a,ns:l}):`key '${r} (${this.language})' returned an object instead of string.`;return s?(h.res=e,h.usedParams=this.getUsedParamsDetails(a),h):e}if(i){const e=Array.isArray(O),t=e?[]:{},n=e?m:f;for(const e in O)if(Object.prototype.hasOwnProperty.call(O,e)){const s=`${n}${i}${e}`;t[e]=k&&!g?this.translate(s,{...a,defaultValue:C(w)?w[e]:void 0,joinArrays:!1,ns:l}):this.translate(s,{...a,joinArrays:!1,ns:l}),t[e]===s&&(t[e]=O[e])}g=t}}return s?(h.res=g,h.usedParams=this.getUsedParamsDetails(a),h):g}extendTranslation(e,t,n,a,s){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||a.usedLng,a.usedNS,a.usedKey,{resolved:a});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const i=o(e)&&(void 0!==n?.interpolation?.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let r;if(i){const t=e.match(this.interpolator.nestingRegexp);r=t&&t.length}let l=n.replace&&!o(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(l={...this.options.interpolation.defaultVariables,...l}),e=this.interpolator.interpolate(e,l,n.lng||this.language||a.usedLng,n),i){const t=e.match(this.interpolator.nestingRegexp);r<(t&&t.length)&&(n.nest=!1)}!n.lng&&a&&a.res&&(n.lng=this.language||a.usedLng),!1!==n.nest&&(e=this.interpolator.nest(e,(...e)=>s?.[0]!==e[0]||n.context?this.translate(...e,t):(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null),n)),n.interpolation&&this.interpolator.reset()}const i=n.postProcess||this.options.postProcess,r=o(i)?[i]:i;return null!=e&&r?.length&&!1!==n.applyPostProcessor&&(e=L.handle(r,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...a,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,t={}){let n,a,s,i,r;return o(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(e=>"function"==typeof e?j(e,{...this.options,...t}):e)),e.forEach(e=>{if(this.isValidLookup(n))return;const l=this.extractFromKey(e,t),c=l.key;a=c;let u=l.namespaces;this.options.fallbackNS&&(u=u.concat(this.options.fallbackNS));const p=void 0!==t.count&&!o(t.count),d=p&&!t.ordinal&&0===t.count,h=void 0!==t.context&&(o(t.context)||"number"==typeof t.context)&&""!==t.context,g=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);u.forEach(e=>{this.isValidLookup(n)||(r=e,this.checkedLoadedFor[`${g[0]}-${e}`]||!this.utils?.hasLoadedNamespace||this.utils?.hasLoadedNamespace(r)||(this.checkedLoadedFor[`${g[0]}-${e}`]=!0,this.logger.warn(`key "${a}" for languages "${g.join(", ")}" won't get resolved as namespace "${r}" 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!!!")),g.forEach(a=>{if(this.isValidLookup(n))return;i=a;const o=[c];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(o,c,a,e,t);else{let e;p&&(e=this.pluralResolver.getSuffix(a,t.count,t));const n=`${this.options.pluralSeparator}zero`,s=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(p&&(t.ordinal&&e.startsWith(s)&&o.push(c+e.replace(s,this.options.pluralSeparator)),o.push(c+e),d&&o.push(c+n)),h){const a=`${c}${this.options.contextSeparator||"_"}${t.context}`;o.push(a),p&&(t.ordinal&&e.startsWith(s)&&o.push(a+e.replace(s,this.options.pluralSeparator)),o.push(a+e),d&&o.push(a+n))}}let r;for(;r=o.pop();)this.isValidLookup(n)||(s=r,n=this.getResource(a,e,r,t))}))})}),{res:n,usedKey:a,exactUsedKey:s,usedLng:i,usedNS:r}}isValidLookup(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}getResource(e,t,n,a={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,n,a):this.resourceStore.getResource(e,t,n,a)}getUsedParamsDetails(e={}){const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&!o(e.replace);let a=n?e.replace:e;if(n&&void 0!==e.count&&(a={...a,count:e.count}),this.options.interpolation.defaultVariables&&(a={...this.options.interpolation.defaultVariables,...a}),!n){a={...a};for(const e of t)delete a[e]}return a}static hasDefaultValue(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&t.startsWith("defaultValue")&&void 0!==e[t])return!0;return!1}}class R{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=w.create("languageUtils"),this.resolveHierarchyCache={}}clearCache(){this.resolveHierarchyCache={}}getScriptPartFromCode(e){if(!(e=N(e))||!e.includes("-"))return null;const t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}getLanguagePartFromCode(e){if(!(e=N(e))||!e.includes("-"))return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(o(e)&&e.includes("-")){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch(e){}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.includes(e)}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(e=>{if(t)return;const n=this.formatLanguageCode(e);this.options.supportedLngs&&!this.isSupportedCode(n)||(t=n)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;const n=this.getScriptPartFromCode(e);if(this.isSupportedCode(n))return t=n;const a=this.getLanguagePartFromCode(e);if(this.isSupportedCode(a))return t=a;t=this.options.supportedLngs.find(e=>e===a||!(!e.includes("-")&&!a.includes("-"))&&(!(!e.includes("-")||a.includes("-")||e.slice(0,e.indexOf("-"))!==a)||!!(e.startsWith(a)&&a.length>1)))}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),o(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}toResolveHierarchy(e,t){const n=this.options.fallbackLng,a=Array.isArray(n)?n.join("|"):n;a!==this._cachedFallbackLng&&(this.resolveHierarchyCache={},this._cachedFallbackLng=a);const s=void 0===t||!1===t||o(t),i=void 0===t&&"function"==typeof this.options.fallbackLng;let r=null;if(o(e)&&s&&!i){let n;n=void 0===t?"undefined":!1===t?"boolean:false":`string:${t}`,r=`${e.length}:${e}|${n}`}if(null!==r){const e=this.resolveHierarchyCache[r];if(void 0!==e)return e.slice()}const l=this.getFallbackCodes((!1===t?[]:t)||this.options.fallbackLng||[],e),c=[],u=e=>{e&&(this.isSupportedCode(e)?c.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return o(e)&&(e.includes("-")||e.includes("_"))?("languageOnly"!==this.options.load&&u(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&u(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&u(this.getLanguagePartFromCode(e))):o(e)&&u(this.formatLanguageCode(e)),l.forEach(e=>{c.includes(e)||u(this.formatLanguageCode(e))}),null!==r?(this.resolveHierarchyCache[r]=c,c.slice()):c}}const T={zero:0,one:1,two:2,few:3,many:4,other:5},A={select:e=>1===e?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class _{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=w.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){const n=N("dev"===e?"en":e),a=t.ordinal?"ordinal":"cardinal",s=JSON.stringify({cleanedCode:n,type:a});if(s in this.pluralRulesCache)return this.pluralRulesCache[s];let o;try{o=new Intl.PluralRules(n,{type:a})}catch(n){if("undefined"==typeof Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),A;if(!e.match(/-|_/))return A;const a=this.languageUtils.getLanguagePartFromCode(e);o=this.getRule(a,t)}return this.pluralRulesCache[s]=o,o}needsPlural(e,t={}){let n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),n?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,n={}){return this.getSuffixes(e,n).map(e=>`${t}${e}`)}getSuffixes(e,t={}){let n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),n?n.resolvedOptions().pluralCategories.sort((e,t)=>T[e]-T[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`):[]}getSuffix(e,t,n={}){const a=this.getRule(e,n);return a?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${a.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,n))}}const I=(e,t,n,a=".",s=!0)=>{let i=((e,t,n)=>{const a=h(e,n);return void 0!==a?a:h(t,n)})(e,t,n);return!i&&s&&o(n)&&(i=k(e,n,a),void 0===i&&(i=k(t,n,a))),i},F=e=>e.replace(/\$/g,"$$$$");class V{constructor(e={}){this.logger=w.create("interpolator"),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:n,useRawValueToEscape:a,prefix:s,prefixEscaped:o,suffix:i,suffixEscaped:r,formatSeparator:l,unescapeSuffix:c,unescapePrefix:u,nestingPrefix:p,nestingPrefixEscaped:d,nestingSuffix:h,nestingSuffixEscaped:g,nestingOptionsSeparator:m,maxReplaces:y,alwaysFormat:b}=e.interpolation;this.escape=void 0!==t?t:v,this.escapeValue=void 0===n||n,this.useRawValueToEscape=void 0!==a&&a,this.prefix=s?f(s):o||"{{",this.suffix=i?f(i):r||"}}",this.formatSeparator=l||",",this.unescapePrefix=c?"":u?f(u):"-",this.unescapeSuffix=this.unescapePrefix?"":c?f(c):"",this.nestingPrefix=p?f(p):d||f("$t("),this.nestingSuffix=h?f(h):g||f(")"),this.nestingOptionsSeparator=m||",",this.maxReplaces=y||1e3,this.alwaysFormat=void 0!==b&&b,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(e,t)=>e?.source===t?(e.lastIndex=0,e):new RegExp(t,"g");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}`)}interpolate(e,t,n,a){let s,i,l;const c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=e=>{if(!e.includes(this.formatSeparator)){const s=I(t,c,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(s,void 0,n,{...a,...t,interpolationkey:e}):s}const s=e.split(this.formatSeparator),o=s.shift().trim(),i=s.join(this.formatSeparator).trim();return this.format(I(t,c,o,this.options.keySeparator,this.options.ignoreJSONStructure),i,n,{...a,...t,interpolationkey:o})};this.resetRegExp(),!this.escapeValue&&"string"==typeof e&&/\$t\([^)]*\{[^}]*\{\{/.test(e)&&this.logger.warn("nesting options string contains interpolated variables with escapeValue: false — if any of those values are attacker-controlled they can inject additional nesting options (e.g. redirect lng/ns). Sanitise untrusted input before passing it to t(), or keep escapeValue: true.");const p=a?.missingInterpolationHandler||this.options.missingInterpolationHandler,d=void 0!==a?.interpolation?.skipOnVariables?a.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>e},{regex:this.regexp,safeValue:e=>this.escapeValue?this.escape(e):e}].forEach(t=>{for(l=0;s=t.regex.exec(e);){const n=s[1].trim();if(i=u(n),void 0===i)if("function"==typeof p){const t=p(e,s,a);i=o(t)?t:""}else if(a&&Object.prototype.hasOwnProperty.call(a,n))i="";else{if(d){i=s[0];continue}this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),i=""}else o(i)||this.useRawValueToEscape||(i=r(i));const c=t.safeValue(i);if(e=e.replace(s[0],F(c)),d?(t.regex.lastIndex+=c.length,t.regex.lastIndex-=s[0].length):t.regex.lastIndex=0,l++,l>=this.maxReplaces)break}}),e}nest(e,t,n={}){let a,s,i;const l=(e,t)=>{const n=this.nestingOptionsSeparator;if(!e.includes(n))return e;const a=e.split(new RegExp(`${f(n)}[ ]*{`));let s=`{${a[1]}`;e=a[0],s=this.interpolate(s,i);const o=s.match(/'/g),r=s.match(/"/g);((o?.length??0)%2==0&&!r||(r?.length??0)%2!=0)&&(s=s.replace(/'/g,'"'));try{i=JSON.parse(s),t&&(i={...t,...i})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${s}`}return i.defaultValue&&i.defaultValue.includes(this.prefix)&&delete i.defaultValue,e};for(;a=this.nestingRegexp.exec(e);){let c=[];i={...n},i=i.replace&&!o(i.replace)?i.replace:i,i.applyPostProcessor=!1,delete i.defaultValue;const u=/{.*}/s.test(a[1])?a[1].lastIndexOf("}")+1:a[1].indexOf(this.formatSeparator);if(-1!==u&&(c=a[1].slice(u).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),a[1]=a[1].slice(0,u)),s=t(l.call(this,a[1].trim(),i),i),s&&a[0]===e&&!o(s))return s;o(s)||(s=r(s)),s||(this.logger.warn(`missed to resolve ${a[1]} for nesting ${e}`),s=""),c.length&&(s=c.reduce((e,t)=>this.format(e,t,n.lng,{...n,interpolationkey:a[1].trim()}),s.trim())),e=e.replace(a[0],s),this.regexp.lastIndex=0}return e}}const D=e=>{const t={};return(n,a,s)=>{let o=s;s&&s.interpolationkey&&s.formatParams&&s.formatParams[s.interpolationkey]&&s[s.interpolationkey]&&(o={...o,[s.interpolationkey]:void 0});const i=a+JSON.stringify(o);let r=t[i];return r||(r=e(N(a),s),t[i]=r),r(n)}},M=e=>(t,n,a)=>e(N(n),a)(t);class U{constructor(e={}){this.logger=w.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";const n=t.cacheInBuiltFormats?D:M;this.formats={number:n((e,t)=>{const n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)}),currency:n((e,t)=>{const n=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>n.format(e)}),datetime:n((e,t)=>{const n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)}),relativetime:n((e,t)=>{const n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||"day")}),list:n((e,t)=>{const n=new Intl.ListFormat(e,{...t});return e=>n.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=D(t)}format(e,t,n,a={}){if(!t)return e;if(null==e)return e;const s=t.split(this.formatSeparator),o=[];for(let e=0;e<s.length;e++){let t=s[e];for(;t.indexOf("(")>-1&&!t.includes(")")&&e+1<s.length;)t=`${t}${this.formatSeparator}${s[++e]}`;o.push(t)}return o.reduce((e,t)=>{const{formatName:s,formatOptions:o}=(e=>{let t=e.toLowerCase().trim();const n={};if(e.includes("(")){const a=e.split("(");t=a[0].toLowerCase().trim();const s=a[1].slice(0,-1);"currency"!==t||s.includes(":")?"relativetime"!==t||s.includes(":")?s.split(";").forEach(e=>{if(e){const[t,...a]=e.split(":"),s=a.join(":").trim().replace(/^'+|'+$/g,""),o=t.trim();n[o]||(n[o]=s),"false"===s&&(n[o]=!1),"true"===s&&(n[o]=!0),isNaN(s)||(n[o]=parseInt(s,10))}}):n.range||(n.range=s.trim()):n.currency||(n.currency=s.trim())}return{formatName:t,formatOptions:n}})(t);if(this.formats[s]){let t=e;try{const i=a?.formatParams?.[a.interpolationkey]||{},r=i.locale||i.lng||a.locale||a.lng||n;t=this.formats[s](e,r,{...o,...a,...i})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${s}`),e},e)}}class K extends O{constructor(e,t,n,a={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=a,this.logger=w.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=a.maxParallelReads||10,this.readingCalls=0,this.maxRetries=a.maxRetries>=0?a.maxRetries:5,this.retryTimeout=a.retryTimeout>=1?a.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(n,a.backend,a)}queueLoad(e,t,n,a){const s={},o={},i={},r={};return e.forEach(e=>{let a=!0;t.forEach(t=>{const i=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[i]=2:this.state[i]<0||(1===this.state[i]?void 0===o[i]&&(o[i]=!0):(this.state[i]=1,a=!1,void 0===o[i]&&(o[i]=!0),void 0===s[i]&&(s[i]=!0),void 0===r[t]&&(r[t]=!0)))}),a||(i[e]=!0)}),(Object.keys(s).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:a}),{toLoad:Object.keys(s),pending:Object.keys(o),toLoadLanguages:Object.keys(i),toLoadNamespaces:Object.keys(r)}}loaded(e,t,n){const a=e.split("|"),s=a[0],o=a[1];t&&this.emit("failedLoading",s,o,t),!t&&n&&this.store.addResourceBundle(s,o,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);const i={};this.queue.forEach(n=>{((e,t,n)=>{const{obj:a,k:s}=p(e,t,Object);a[s]=a[s]||[],a[s].push(n)})(n.loaded,[s],o),((e,t)=>{void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)})(n,e),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach(e=>{i[e]||(i[e]={});const t=n.loaded[e];t.length&&t.forEach(t=>{void 0===i[e][t]&&(i[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit("loaded",i),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n,a=0,s=this.retryTimeout,o){if(!e.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:t,fcName:n,tried:a,wait:s,callback:o});this.readingCalls++;const i=(i,r)=>{if(this.readingCalls--,this.waitingReads.length>0){const e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}i&&r&&a<this.maxRetries?setTimeout(()=>{this.read(e,t,n,a+1,2*s,o)},s):o(i,r)},r=this.backend[n].bind(this.backend);if(2!==r.length)return r(e,t,i);try{const n=r(e,t);n&&"function"==typeof n.then?n.then(e=>i(null,e)).catch(i):i(null,n)}catch(e){i(e)}}prepareLoading(e,t,n={},a){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),a&&a();o(e)&&(e=this.languageUtils.toResolveHierarchy(e)),o(t)&&(t=[t]);const s=this.queueLoad(e,t,n,a);if(!s.toLoad.length)return s.pending.length||a(),null;s.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e,t=""){const n=e.split("|"),a=n[0],s=n[1];this.read(a,s,"read",void 0,void 0,(n,o)=>{n&&this.logger.warn(`${t}loading namespace ${s} for language ${a} failed`,n),!n&&o&&this.logger.log(`${t}loaded namespace ${s} for language ${a}`,o),this.loaded(e,n,o)})}saveMissing(e,t,n,a,s,o={},i=()=>{}){if(!this.services?.utils?.hasLoadedNamespace||this.services?.utils?.hasLoadedNamespace(t)){if(null!=n&&""!==n){if(this.backend?.create){const r={...o,isUpdate:s},l=this.backend.create.bind(this.backend);if(l.length<6)try{let s;s=5===l.length?l(e,t,n,a,r):l(e,t,n,a),s&&"function"==typeof s.then?s.then(e=>i(null,e)).catch(i):i(null,s)}catch(e){i(e)}else l(e,t,n,a,i,r)}e&&e[0]&&this.store.addResource(e[0],t,n,a)}}else this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")}}const H=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",enableSelector:!1,partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if("object"==typeof e[1]&&(t=e[1]),o(e[1])&&(t.defaultValue=e[1]),o(e[2])&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){const n=e[3]||e[2];Object.keys(n).forEach(e=>{t[e]=n[e]})}return t},interpolation:{escapeValue:!0,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),z=e=>(o(e.ns)&&(e.ns=[e.ns]),o(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),o(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&!e.supportedLngs.includes("cimode")&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),B=()=>{};class q extends O{constructor(e={},t){var n;if(super(),this.options=z(e),this.services={},this.logger=w,this.modules={external:[]},n=this,Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(e=>{"function"==typeof n[e]&&(n[e]=n[e].bind(n))}),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,"function"==typeof e&&(t=e,e={}),null==e.defaultNS&&e.ns&&(o(e.ns)?e.defaultNS=e.ns:e.ns.includes("translation")||(e.defaultNS=e.ns[0]));const n=H();this.options={...n,...this.options,...z(e)},this.options.interpolation={...n.interpolation,...this.options.interpolation},void 0!==e.keySeparator&&(this.options.userDefinedKeySeparator=e.keySeparator),void 0!==e.nsSeparator&&(this.options.userDefinedNsSeparator=e.nsSeparator),"function"!=typeof this.options.overloadTranslationOptionHandler&&(this.options.overloadTranslationOptionHandler=n.overloadTranslationOptionHandler);const a=e=>e?"function"==typeof e?new e:e:null;if(!this.options.isClone){let e;this.modules.logger?w.init(a(this.modules.logger),this.options):w.init(null,this.options),e=this.modules.formatter?this.modules.formatter:U;const t=new R(this.options);this.store=new E(this.options.resources,this.options);const n=this.services;n.logger=w,n.resourceStore=this.store,n.languageUtils=t,n.pluralResolver=new _(t,{prepend:this.options.pluralSeparator}),e&&(n.formatter=a(e),n.formatter.init&&n.formatter.init(n,this.options),this.options.interpolation.format=n.formatter.format.bind(n.formatter)),n.interpolator=new V(this.options),n.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},n.backendConnector=new K(a(this.modules.backend),n.resourceStore,n,this.options),n.backendConnector.on("*",(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(n.languageDetector=a(this.modules.languageDetector),n.languageDetector.init&&n.languageDetector.init(n,this.options.detection,this.options)),this.modules.i18nFormat&&(n.i18nFormat=a(this.modules.i18nFormat),n.i18nFormat.init&&n.i18nFormat.init(this)),this.translator=new P(this.services,this.options),this.translator.on("*",(e,...t)=>{this.emit(e,...t)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,t||(t=B),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&"dev"!==e[0]&&(this.options.lng=e[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(e=>{this[e]=(...t)=>this.store[e](...t)});["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(e=>{this[e]=(...t)=>(this.store[e](...t),this)});const s=i(),r=()=>{const e=(e,n)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),s.resolve(n),t(e,n)};if((this.languages||this.isLanguageChangingTo)&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?r():setTimeout(r,0),s}loadResources(e,t=B){let n=t;const a=o(e)?e:this.language;if("function"==typeof e&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if("cimode"===a?.toLowerCase()&&(!this.options.preload||0===this.options.preload.length))return n();const e=[],t=t=>{if(!t)return;if("cimode"===t)return;this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{"cimode"!==t&&(e.includes(t)||e.push(t))})};if(a)t(a);else{this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e))}this.options.preload?.forEach?.(e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),n(e)})}else n(null)}reloadResources(e,t,n){const a=i();return"function"==typeof e&&(n=e,e=void 0),"function"==typeof t&&(n=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),n||(n=B),this.services.backendConnector.reload(e,t,e=>{a.resolve(),n(e)}),a}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&L.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&!["cimode","dev"].includes(e)){for(let e=0;e<this.languages.length;e++){const t=this.languages[e];if(!["cimode","dev"].includes(t)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}this.resolvedLanguage||this.languages.includes(e)||!this.store.hasLanguageSomeTranslations(e)||(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;const n=i();this.emit("languageChanging",e);const a=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},s=(s,o)=>{o?this.isLanguageChangingTo===e&&(a(o),this.translator.changeLanguage(o),this.isLanguageChangingTo=void 0,this.emit("languageChanged",o),this.logger.log("languageChanged",o)):this.isLanguageChangingTo=void 0,n.resolve((...e)=>this.t(...e)),t&&t(s,(...e)=>this.t(...e))},r=t=>{e||t||!this.services.languageDetector||(t=[]);const n=o(t)?t:t&&t[0],i=this.store.hasLanguageSomeTranslations(n)?n:this.services.languageUtils.getBestMatchFromCodes(o(t)?[t]:t);i&&(this.language||a(i),this.translator.language||this.translator.changeLanguage(i),this.services.languageDetector?.cacheUserLanguage?.(i)),this.loadResources(i,e=>{s(e,i)})};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(r):this.services.languageDetector.detect(r):r(e):r(this.services.languageDetector.detect()),n}getFixedT(e,t,n,a){const s=a?.scopeNs,i=(e,t,...a)=>{let o;o="object"!=typeof t?this.options.overloadTranslationOptionHandler([e,t].concat(a)):{...t},o.lng=o.lng||i.lng,o.lngs=o.lngs||i.lngs;const r=void 0!==o.ns&&null!==o.ns;o.ns=o.ns||i.ns,""!==o.keyPrefix&&(o.keyPrefix=o.keyPrefix||n||i.keyPrefix);const l={...this.options,...o};Array.isArray(s)&&!r&&(l.ns=s),"function"==typeof o.keyPrefix&&(o.keyPrefix=j(o.keyPrefix,l));const c=this.options.keySeparator||".";let u;return o.keyPrefix&&Array.isArray(e)?u=e.map(e=>("function"==typeof e&&(e=j(e,l)),`${o.keyPrefix}${c}${e}`)):("function"==typeof e&&(e=j(e,l)),u=o.keyPrefix?`${o.keyPrefix}${c}${e}`:e),this.t(u,o)};return o(e)?i.lng=e:i.lngs=e,i.ns=t,i.keyPrefix=n,i}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=t.lng||this.resolvedLanguage||this.languages[0],a=!!this.options&&this.options.fallbackLng,s=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;const o=(e,t)=>{const n=this.services.backendConnector.state[`${e}|${t}`];return-1===n||0===n||2===n};if(t.precheck){const e=t.precheck(this,o);if(void 0!==e)return e}return!!this.hasResourceBundle(n,e)||(!(this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages))||!(!o(n,e)||a&&!o(s,e)))}loadNamespaces(e,t){const n=i();return this.options.ns?(o(e)&&(e=[e]),e.forEach(e=>{this.options.ns.includes(e)||this.options.ns.push(e)}),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){const n=i();o(e)&&(e=[e]);const a=this.options.preload||[],s=e.filter(e=>!a.includes(e)&&this.services.languageUtils.isSupportedCode(e));return s.length?(this.options.preload=a.concat(s),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!e)return"rtl";try{const t=new Intl.Locale(e);if(t&&t.getTextInfo){const e=t.getTextInfo();if(e&&e.direction)return e.direction}}catch(e){}const t=this.services?.languageUtils||new R(H());return e.toLowerCase().indexOf("-latn")>1?"ltr":["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"].includes(t.getLanguagePartFromCode(e))||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},t){const n=new q(e,t);return n.createInstance=q.createInstance,n}cloneInstance(e={},t=B){const n=e.forkResourceStore;n&&delete e.forkResourceStore;const a={...this.options,...e,isClone:!0},s=new q(a);void 0===e.debug&&void 0===e.prefix||(s.logger=s.logger.clone(e));if(["store","services","language"].forEach(e=>{s[e]=this[e]}),s.services={...this.services},s.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},n){const e=Object.keys(this.store.data).reduce((e,t)=>(e[t]={...this.store.data[t]},e[t]=Object.keys(e[t]).reduce((n,a)=>(n[a]={...e[t][a]},n),e[t]),e),{});s.store=new E(e,a),s.services.resourceStore=s.store}if(e.interpolation){const t={...H().interpolation,...this.options.interpolation,...e.interpolation},n={...a,interpolation:t};s.services.interpolator=new V(n)}return s.translator=new P(s.services,a),s.translator.on("*",(e,...t)=>{s.emit(e,...t)}),s.init(a,t),s.translator.options=a,s.translator.backendConnector.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},s}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const J=q.createInstance();J.createInstance,J.dir,J.init,J.loadResources,J.reloadResources,J.use,J.changeLanguage,J.getFixedT,J.t,J.exists,J.setDefaultNamespace,J.hasLoadedNamespace,J.loadNamespaces,J.loadLanguages;function W(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function G(e){return G="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},G(e)}function X(e){var t=function(e,t){if("object"!=G(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var a=n.call(e,t||"default");if("object"!=G(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==G(t)?t:t+""}function Y(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,X(a.key),a)}}function Z(e,t,n){return t&&Y(e.prototype,t),n&&Y(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var Q=[],ee=Q.forEach,te=Q.slice,ne=["__proto__","constructor","prototype"];function ae(e,t,n,a){var s=e.read.bind(e);if(2!==s.length)s(t,n,a);else try{var o=s(t,n);o&&"function"==typeof o.then?o.then(function(e){return a(null,e)}).catch(a):a(null,o)}catch(e){a(e)}}var se=function(){return Z(function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};W(this,e),this.backends=[],this.type="backend",this.allOptions=a,this.init(t,n)},[{key:"init",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.services=e,this.options=function(e){return ee.call(te.call(arguments,1),function(t){if(t)for(var n=0,a=Object.keys(t);n<a.length;n++){var s=a[n];ne.indexOf(s)>-1||void 0===e[s]&&(e[s]=t[s])}}),e}(n,this.options||{},{handleEmptyResourcesAsFailed:!0,cacheHitMode:"none",retryOnFailure:!1}),this.allOptions=a,this.options.backends&&this.options.backends.length>1&&(this.allOptions.saveMissing||this.allOptions.updateMissing)&&this.services&&this.services.logger&&this.services.logger.warn("i18next-chained-backend: Using multiple backends in combination with saveMissing/updateMissing is not recommended, as it may trigger based on stale data."),this.options.backends&&this.options.backends.forEach(function(n,s){var o;t.backends[s]=t.backends[s]||((o=n)?"function"==typeof o?new o:o:null),t.backends[s].init(e,t.options.backendOptions&&t.options.backendOptions[s]||{},a)}),this.services&&this.options.reloadInterval&&setInterval(function(){return t.reload()},this.options.reloadInterval)}},{key:"read",value:function(e,t,n){var a=this,s=this.backends.length,o=function(r){if(r>=s)return n(new Error("non of the backend loaded data"),a.options.retryOnFailure);var l=r===s-1,c=a.options.handleEmptyResourcesAsFailed&&!l?0:-1,u=a.backends[r];u.read?ae(u,e,t,function(s,l,p){if(!s&&l&&Object.keys(l).length>c){if(n(null,l,r),i(r-1,l),u.save&&a.options.cacheHitMode&&["refresh","refreshAndUpdateStore"].indexOf(a.options.cacheHitMode)>-1){if(p&&a.options.refreshExpirationTime&&p+a.options.refreshExpirationTime>Date.now())return;var d=a.backends[r+1];d&&d.read&&ae(d,e,t,function(n,s){n||s&&(Object.keys(s).length<=c||(i(r,s),"refreshAndUpdateStore"===a.options.cacheHitMode&&a.services&&a.services.resourceStore&&a.services.resourceStore.addResourceBundle(e,t,s)))})}}else o(r+1)}):o(r+1)},i=function(n,s){if(!(n<0)){var o=a.backends[n];o.save?(o.save(e,t,s),i(n-1,s)):i(n-1,s)}};o(0)}},{key:"create",value:function(e,t,n,a){var s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(){},o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.backends.forEach(function(i){if(i.create){var r=i.create.bind(i);if(r.length<6)try{var l;(l=5===r.length?r(e,t,n,a,o):r(e,t,n,a))&&"function"==typeof l.then?l.then(function(e){return s(null,e)}).catch(s):s(null,l)}catch(e){s(e)}else r(e,t,n,a,s,o)}})}},{key:"reload",value:function(){var e=this,t=this.services,n=t.backendConnector,a=t.languageUtils,s=t.logger,o=n.language;if(!o||"cimode"!==o.toLowerCase()){var i=[],r=function(e){a.toResolveHierarchy(e).forEach(function(e){i.indexOf(e)<0&&i.push(e)})};r(o),this.allOptions.preload&&this.allOptions.preload.forEach(function(e){return r(e)}),i.forEach(function(t){e.allOptions.ns.forEach(function(e){n.read(t,e,"read",null,null,function(a,o){a&&s.warn("loading namespace ".concat(e," for language ").concat(t," failed"),a),!a&&o&&s.log("loaded namespace ".concat(e," for language ").concat(t),o),n.loaded("".concat(t,"|").concat(e),a,o)})})})}}}])}();se.type="backend";const oe=["__proto__","constructor","prototype"];function ie(e){return"string"==typeof e&&(!(0===e.length||e.length>128)&&(!(oe.indexOf(e)>-1)&&(!(e.indexOf("..")>-1)&&(!(e.indexOf("\\")>-1)&&(!/[?#%\s]/.test(e)&&!/[\x00-\x1F\x7F]/.test(e))))))}function re(e){return!!ie(e)&&!(e.indexOf("/")>-1||e.indexOf("@")>-1)}const le={lng:re,ns:function(e){return ie(e)}};function ce(e){return"string"!=typeof e?e:e.replace(/[\r\n\x00-\x1F\x7F]/g," ")}function ue(){return"function"==typeof XMLHttpRequest||"object"==typeof XMLHttpRequest}const pe=/\{\{(.+?)\}\}/g;function de(e,t){let n=!1;const a=e.replace(pe,(e,a)=>{const s=a.trim();if(oe.indexOf(s)>-1)return e;const o=t[s];if(null==o)return e;const i=le[s]||re,r=String(o).split("+");for(const t of r)if(!i(t))return n=!0,e;return r.join("+")});return n?null:a}const he="undefined"!=typeof globalThis?globalThis:void 0!==n.g?n.g:"undefined"!=typeof window?window:void 0;let ge;"function"==typeof fetch?ge=fetch:he&&"function"==typeof he.fetch&&(ge=he.fetch);const fe=ue()&&he?he.XMLHttpRequest:void 0,me="function"==typeof ActiveXObject&&he?he.ActiveXObject:void 0,ve=["__proto__","constructor","prototype"],ye=(e,t)=>{if(t&&"object"==typeof t){let n="";for(const e of Object.keys(t))ve.indexOf(e)>-1||(n+="&"+encodeURIComponent(e)+"="+encodeURIComponent(t[e]));if(!n)return e;e=e+(-1!==e.indexOf("?")?"&":"?")+n.slice(1)}return e},be=(e,t,n,a)=>{const s=e=>{if(!e.ok)return n(e.statusText||"Error",{status:e.status});e.text().then(t=>{n(null,{status:e.status,data:t})}).catch(n)};if(a){const o=a(e,t);if(o instanceof Promise)return void o.then(s).catch(n)}"function"==typeof fetch?fetch(e,t).then(s).catch(n):ge(e,t).then(s).catch(n)},ke=(e,t,a,s)=>("function"==typeof a&&(s=a,a=void 0),s=s||(()=>{}),ge&&0!==t.indexOf("file:")?((e,t,a,s)=>{e.queryStringParams&&(t=ye(t,e.queryStringParams));const o={..."function"==typeof e.customHeaders?e.customHeaders():e.customHeaders};"undefined"==typeof window&&void 0!==n.g&&void 0!==n.g.process&&n.g.process.versions&&n.g.process.versions.node&&(o["User-Agent"]=`i18next-http-backend (node/${n.g.process.version}; ${n.g.process.platform} ${n.g.process.arch})`),a&&(o["Content-Type"]="application/json");const i="function"==typeof e.requestOptions?e.requestOptions(a):e.requestOptions,r={method:a?"POST":"GET",body:a?e.stringify(a):void 0,headers:o,...e._omitFetchOptions?{}:i},l="function"==typeof e.alternateFetch&&e.alternateFetch.length>=1?e.alternateFetch:void 0;try{be(t,r,s,l)}catch(n){if(!i||0===Object.keys(i).length||!n.message||n.message.indexOf("not implemented")<0)return s(n);try{Object.keys(i).forEach(e=>{delete r[e]}),be(t,r,s,l),e._omitFetchOptions=!0}catch(e){s(e)}}})(e,t,a,s):ue()||"function"==typeof ActiveXObject?((e,t,n,a)=>{n&&"object"==typeof n&&(n=ye("",n).slice(1)),e.queryStringParams&&(t=ye(t,e.queryStringParams));try{const s=fe?new fe:new me("MSXML2.XMLHTTP.3.0");s.open(n?"POST":"GET",t,1),e.crossDomain||s.setRequestHeader("X-Requested-With","XMLHttpRequest"),s.withCredentials=!!e.withCredentials,n&&s.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),s.overrideMimeType&&s.overrideMimeType("application/json");let o=e.customHeaders;if(o="function"==typeof o?o():o,o)for(const e of Object.keys(o))ve.indexOf(e)>-1||s.setRequestHeader(e,o[e]);s.onreadystatechange=()=>{s.readyState>3&&a(s.status>=400?s.statusText:null,{status:s.status,data:s.responseText})},s.send(n)}catch(e){console&&console.log(e)}})(e,t,a,s):void s(new Error("No fetch and no xhr implementation found!")));var Ne=class{constructor(e,t={},n={}){this.services=e,this.options=t,this.allOptions=n,this.type="backend",this.init(e,t,n)}init(e,t={},n={}){if(this.services=e,this.options={loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",parse:e=>JSON.parse(e),stringify:JSON.stringify,parsePayload:(e,t,n)=>({[t]:n||""}),parseLoadPayload:(e,t)=>{},request:ke,reloadInterval:"undefined"==typeof window&&36e5,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"},...this.options||{},...t},this.allOptions=n,this.services&&this.options.reloadInterval){const e=setInterval(()=>this.reload(),this.options.reloadInterval);"object"==typeof e&&"function"==typeof e.unref&&e.unref()}}readMulti(e,t,n){this._readAny(e,e,t,t,n)}read(e,t,n){this._readAny([e],e,[t],t,n)}_readAny(e,t,n,a,s){let o=this.options.loadPath;var i;"function"==typeof this.options.loadPath&&(o=this.options.loadPath(e,n)),o=function(e){return!!e&&"function"==typeof e.then}(i=o)?i:Promise.resolve(i),o.then(o=>{if(!o)return s(null,{});const i=de(o,{lng:e.join("+"),ns:n.join("+")});if(null==i){const t=e.map(ce).join(", "),a=n.map(ce).join(", ");return s(new Error("i18next-http-backend: unsafe lng/ns value — refusing to build request URL for languages=["+t+"] namespaces=["+a+"]"),!1)}this.loadUrl(i,s,t,a)})}loadUrl(e,t,n,a){const s="string"==typeof n?[n]:n,o="string"==typeof a?[a]:a,i=this.options.parseLoadPayload(s,o),r=ce(function(e){if("string"!=typeof e||0===e.length)return e;try{const t=new URL(e);return t.username||t.password?(t.username="",t.password="",t.toString()):e}catch(t){return e.replace(/(\/\/)[^/@\s]+@/g,"$1")}}(e));this.options.request(this.options,e,i,(e,s)=>{if(s&&(s.status>=500&&s.status<600||!s.status))return t("failed loading "+r+"; status code: "+s.status,!0);if(s&&s.status>=400&&s.status<500)return t("failed loading "+r+"; status code: "+s.status,!1);if(!s&&e&&e.message){const n=e.message.toLowerCase();if(["failed","fetch","network","load"].find(e=>n.indexOf(e)>-1))return t("failed loading "+r+": "+ce(e.message),!0)}if(e)return t(e,!1);let o,i;try{o="string"==typeof s.data?this.options.parse(s.data,n,a):s.data}catch(e){i="failed parsing "+r+" to json"}if(i)return t(i,!1);t(null,o)})}create(e,t,n,a,s){if(!this.options.addPath)return;"string"==typeof e&&(e=[e]);const o=this.options.parsePayload(t,n,a);let i=0;const r=[],l=[];e.forEach(n=>{let a=this.options.addPath;"function"==typeof this.options.addPath&&(a=this.options.addPath(n,t));const c=de(a,{lng:n,ns:t});if(null==c)return i+=1,void(s&&i===e.length&&s(r,l));this.options.request(this.options,c,o,(t,n)=>{i+=1,r.push(t),l.push(n),i===e.length&&"function"==typeof s&&s(r,l)})})}reload(){const{backendConnector:e,languageUtils:t,logger:n}=this.services,a=e.language;if(a&&"cimode"===a.toLowerCase())return;const s=[],o=e=>{t.toResolveHierarchy(e).forEach(e=>{s.indexOf(e)<0&&s.push(e)})};o(a),this.allOptions.preload&&this.allOptions.preload.forEach(e=>o(e)),s.forEach(t=>{this.allOptions.ns.forEach(a=>{e.read(t,a,"read",null,null,(s,o)=>{s&&n.warn(`loading namespace ${a} for language ${t} failed`,s),!s&&o&&n.log(`loaded namespace ${a} for language ${t}`,o),e.loaded(`${t}|${a}`,s,o)})})})}};function xe(e,t,n){return(t=X(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Se(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,a)}return n}function we(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Se(Object(n),!0).forEach(function(t){xe(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Se(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}Ne.type="backend";var Oe=function(){return Z(function e(t){W(this,e),this.store=t.store},[{key:"setItem",value:function(e,t){if(this.store)try{this.store.setItem(e,t)}catch(e){}}},{key:"getItem",value:function(e,t){if(this.store)try{return this.store.getItem(e,t)}catch(e){}}}])}();var Ee=function(){return Z(function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};W(this,e),this.init(t,n),this.type="backend"},[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.services=e,this.options=we(we(we({},function(){var e=null;try{e=window.localStorage}catch(e){"undefined"!=typeof window&&console.log("Failed to load local storage.",e)}return{prefix:"i18next_res_",expirationTime:6048e5,defaultVersion:void 0,getVersion:void 0,versions:{},store:e}}()),this.options),t),this.storage=new Oe(this.options)}},{key:"read",value:function(e,t,n){var a=Date.now();if(!this.storage.store)return n(null,null);var s=this.storage.getItem("".concat(this.options.prefix).concat(e,"-").concat(t));if(s)try{s=JSON.parse(s)}catch(e){s=null}if(s&&"object"===G(s)){var o=this.getVersion(e,t);if(s.i18nStamp&&s.i18nStamp+this.options.expirationTime>a&&o===s.i18nVersion){var i=s.i18nStamp;return delete s.i18nVersion,delete s.i18nStamp,n(null,s,i)}}return n(null,null)}},{key:"save",value:function(e,t,n){if(this.storage.store){var a=we(we({},n),{},{i18nStamp:Date.now()}),s=this.getVersion(e,t);s&&(a.i18nVersion=s),this.storage.setItem("".concat(this.options.prefix).concat(e,"-").concat(t),JSON.stringify(a))}}},{key:"getVersion",value:function(e,t){var n,a=this.options,s=a.getVersion,o=a.versions,i=a.defaultVersion,r=Object.prototype.hasOwnProperty.call(o,e)?o[e]:void 0;return(null===(n=s)||void 0===n?void 0:n(e,t))||r||i}}])}();Ee.type="backend";const Le={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,"!doctype":!0,"!DOCTYPE":!0},$e=/\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?("[^"]*"|'[^']*')/g;function je(e){const t={type:"tag",name:"",voidElement:!1,attrs:{},children:[]},n=e.match(/<\/?([^\s]+?)[/\s>]/);if(n&&(t.name=n[1],(Le[n[1]]||"/"===e.charAt(e.length-2))&&(t.voidElement=!0),t.name.startsWith("!--"))){const t=e.indexOf("--\x3e");return{type:"comment",comment:-1!==t?e.slice(4,t):""}}const a=new RegExp($e);let s=null;for(;s=a.exec(e),null!==s;)if(s[0].trim())if(s[1]){const e=s[1].trim();let n=[e,null];const o=e.indexOf("=");o>-1&&(n=[e.slice(0,o),e.slice(o+1)]),t.attrs[n[0]]=n[1],a.lastIndex--}else s[2]&&(t.attrs[s[2]]=s[3].trim().substring(1,s[3].length-1));return t}const Ce=/<!--[\s\S]*?-->|<[a-zA-Z0-9\-!/](?:"[^"]*"|'[^']*'|[^'">])*>/g,Pe=/<\/?([^\s]+?)[/\s>]/,Re=/^\s*$/,Te=/^(script|style)$/i,Ae="\0",_e=Object.create(null);function Ie(e){e.forEach(function(e){if("text"!==e.type)if("comment"!==e.type){for(const t in e.attrs){const n=e.attrs[t];"string"==typeof n&&n.indexOf(Ae)>-1&&(e.attrs[t]=n.split(Ae).join("<"))}e.children.length&&Ie(e.children)}else e.comment=e.comment.split(Ae).join("<");else e.content=e.content.split(Ae).join("<")})}function Fe(e,t){switch(t.type){case"text":return e+t.content;case"tag":{const n=t.voidElement&&"!doctype"!==t.name.toLowerCase()?"/>":">";return e+="<"+t.name+(t.attrs?function(e){const t=[];for(const n in e)null===e[n]?t.push(n):t.push(n+'="'+String(e[n]).replace(/"/g,""")+'"');return t.length?" "+t.join(" "):""}(t.attrs):"")+n,t.voidElement?e:e+t.children.reduce(Fe,"")+"</"+t.name+">"}case"comment":return e+="\x3c!--"+t.comment+"--\x3e"}}var Ve={parse:function(e,t){const n=t&&t.components||_e,a=t&&t.allowedTags;let s=!1;if(a){const t="function"==typeof a?a:function(e){return a.indexOf(e)>-1};let n,o="",i=0;for(Ce.lastIndex=0;n=Ce.exec(e);){const a=n[0];o+=e.slice(i,n.index);const r=a.match(Pe);a.startsWith("\x3c!--")||r&&t(r[1])?(o+=a,i=n.index+a.length):(s=!0,o+=Ae,i=n.index+1,Ce.lastIndex=i)}e=o+e.slice(i)}const o=[],i=[];let r,l,c=-1,u=!1,p=0;if(0!==e.indexOf("<")){const t=e.indexOf("<");o.push({type:"text",content:-1===t?e:e.substring(0,t)})}const d=[];let h;for(;h=Ce.exec(e);)d.push(h);return d.forEach(function(e,t){const n=e[0];if(!n)return;if(n.startsWith("\x3c!--"))return;let a=0,s=0,o=-1,i=null;for(let e=0;e<n.length;e++){const t=n.charAt(e);i?t===i&&(i=null):'"'===t||"'"===t?i=t:"<"===t?(a++,2===a&&(o=e)):">"===t&&s++}const r=o>-1&&/[a-zA-Z0-9\-!/]/.test(n.charAt(o+1));if(a>s&&r){const e=n.substring(0,o),a=n.substring(e.length);d[t][0]=a,d[t].index+=e.length}}),d.forEach(function(t,a){const s=t[0];if(!s)return;const h=t.index;if(h<p)return;if(u){if(s!=="</"+r.name+">")return;u=!1}const g="/"!==s.charAt(1),f=s.startsWith("\x3c!--"),m=h+s.length,v=e.charAt(m),y=d[a+1];let b,k;if("<"===v&&y){const t=e.substring(m,y.index);b=t.split("<").length>t.split(">").length}if(f){const t=je(s);if(c<0)return o.push(t),o;k=i[c],k.children.push(t);const n=e.slice(m,y?y.index:void 0);return n.length>0&&k.children.push({type:"text",content:n}),o}if(g){c++,r=je(s),"tag"===r.type&&n[r.name]&&(r.type="component",u=!0);let t=!1;if(!u&&!r.voidElement&&Te.test(r.name)){t=!0,l||(l=e.toLowerCase());const n=l.indexOf("</"+r.name.toLowerCase()+">",m),a=-1===n?e.length:n,s=e.slice(m,a);s&&r.children.push({type:"text",content:s}),p=a}r.voidElement||u||t||!v||"<"===v||r.children.push({type:"text",content:e.slice(m,y?y.index:void 0)}),0===c&&o.push(r),k=i[c-1],k&&k.children.push(r),i[c]=r}if((!g||r.voidElement)&&(c>-1&&(r.voidElement||r.name===s.slice(2,-1))&&(c--,r=-1===c?o:i[c]),!u&&("<"!==v||b)&&v)){k=-1===c?o:i[c].children;const t=y?y.index:-1;let n=e.slice(m,-1===t?void 0:t);Re.test(n)&&(n=" "),(t>-1&&c+k.length>=0||" "!==n)&&k.push({type:"text",content:n})}}),s&&Ie(o),o},stringify:function(e){return e.reduce(function(e,t){return e+Fe("",t)},"")}};const De=(e,t,n,a)=>{const s=[n,{code:t,...a||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(s,"warn","react-i18next::",!0);Ke(s[0])&&(s[0]=`react-i18next:: ${s[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...s):console?.warn&&console.warn(...s)},Me={},Ue=(e,t,n,a)=>{Ke(n)&&Me[n]||(Ke(n)&&(Me[n]=new Date),De(e,t,n,a))},Ke=e=>"string"==typeof e,He=e=>"object"==typeof e&&null!==e,ze=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Be={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},qe=e=>Be[e],Je=e=>e.replace(ze,qe);let We={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:Je,transDefaultProps:void 0};const Ge=()=>We;let Xe;const Ye=()=>Xe,Ze=(e,t)=>{if(!e)return!1;const n=e.props?.children??e.children;return t?n.length>0:!!n},Qe=e=>{if(!e)return[];const t=e.props?.children??e.children;return e.props?.i18nIsDynamicList?et(t):t},et=e=>Array.isArray(e)?e:[e],tt=(e,t,n,s)=>{if(!e)return"";let o="";const i=et(e),r=t?.transSupportBasicHtmlNodes?t.transKeepBasicHtmlNodesFor??[]:[];return i.forEach((e,i)=>{if(Ke(e))o+=`${e}`;else{if((0,a.isValidElement)(e)){const{props:a,type:l}=e,c=Object.keys(a).length,u=r.indexOf(l)>-1,p=a.children;if(!p&&u&&!c)return void(o+=`<${l}/>`);if(!p&&(!u||c)||a.i18nIsDynamicList)return void(o+=`<${i}></${i}>`);if(u&&c<=1){const e=Ke(p)?p:tt(p,t,n,s);return void(o+=`<${l}>${e}</${l}>`)}const d=tt(p,t,n,s);return void(o+=`<${i}>${d}</${i}>`)}if(null!==e){if(He(e)){const{format:t,...a}=e,i=Object.keys(a);if(1===i.length){const e=t?`${i[0]}, ${t}`:i[0];return void(o+=`{{${e}}}`)}return void De(n,"TRANS_INVALID_OBJ","Invalid child - Object should only have keys {{ value, format }} (format is optional).",{i18nKey:s,child:e})}De(n,"TRANS_INVALID_VAR","Passed in a variable like {number} - pass variables for interpolation as full objects like {{number}}.",{i18nKey:s,child:e})}else De(n,"TRANS_NULL_VALUE","Passed in a null value as child",{i18nKey:s})}}),o},nt=(e,t,n,s,o,i,r)=>{if(""===n)return[];const l=o.transKeepBasicHtmlNodesFor||[],c=n&&new RegExp(l.map(e=>`<${e}`).join("|")).test(n);if(!(e||t||c||r))return[n];const u=t??{},p=e=>{et(e).forEach(e=>{Ke(e)||(Ze(e)?p(Qe(e)):He(e)&&!(0,a.isValidElement)(e)&&Object.assign(u,e))})};p(e);const d=Object.keys(u),h=Ve.parse(`<0>${n}</0>`,{allowedTags:e=>/^\d+$/.test(e)||l.indexOf(e)>-1||d.indexOf(e)>-1}),g={...u,...i},f=(e,t,n)=>{const s=Qe(e),o=v(s,t.children,n);return(e=>Array.isArray(e)&&e.every(a.isValidElement))(s)&&0===o.length||e.props?.i18nIsDynamicList?s:o},m=(e,t,n,s,o)=>{e.dummy?(e.children=t,n.push((0,a.cloneElement)(e,{key:s},o?void 0:t))):n.push(...a.Children.map([e],e=>{if(e.type===a.Fragment||void 0!==e.props?.i18nIsDynamicList){const n={key:s};return e&&e.props&&Object.keys(e.props).forEach(t=>{"children"!==t&&"i18nIsDynamicList"!==t&&(n[t]=e.props[t])}),(0,a.createElement)(e.type,n,o?null:t)}const n={key:s};return e&&e.props&&Object.keys(e.props).forEach(t=>{"ref"!==t&&"children"!==t&&(n[t]=e.props[t])}),(0,a.cloneElement)(e,n,o?null:t)}))},v=(e,n,i)=>{const u=et(e),p=et(n),d={};return p.reduce((e,n,p)=>{const h=n.children?.[0]?.content&&s.services.interpolator.interpolate(n.children[0].content,g,s.language);if("tag"===n.type){let y=u[parseInt(n.name,10)];!y&&t&&(y=t[n.name]),1!==i.length||y||(y=i[0][n.name]),y||(y={});const b={...n.attrs};r&&Object.keys(b).forEach(e=>{const t=b[e];Ke(t)&&(b[e]=Je(t))});const k=0!==Object.keys(b).length?((e,t)=>{const n={...t};return n.props={...t.props,...e.props},n})({props:b},y):y,N=(0,a.isValidElement)(k),x=N&&Ze(n,!0)&&!n.voidElement,S=c&&He(k)&&k.dummy&&!N,w=He(t)&&Object.hasOwnProperty.call(t,n.name);if(Ke(k)){const t=s.services.interpolator.interpolate(k,g,s.language);e.push(t)}else if(Ze(k)||x){const t=f(k,n,i);m(k,t,e,p)}else if(S){const t=v(u,n.children,i);m(k,t,e,p)}else if(Number.isNaN(parseFloat(n.name)))if(w){const t=f(k,n,i);m(k,t,e,p,n.voidElement)}else if(o.transSupportBasicHtmlNodes&&l.indexOf(n.name)>-1)if(n.voidElement)e.push((0,a.createElement)(n.name,{key:`${n.name}-${p}`}));else{const t=d[n.name]||0;let s;d[n.name]=t+1;let o=0;for(let e=0;e<u.length;e+=1){const i=u[e];if((0,a.isValidElement)(i)&&i.type===n.name){if(o===t){s=i;break}o+=1}}const r=s?et(Qe(s)):u,l=v(r,n.children,i);e.push((0,a.createElement)(n.name,{key:`${n.name}-${p}`},l))}else if(n.voidElement)e.push(`<${n.name} />`);else{const t=v(u,n.children,i);e.push(`<${n.name}>${t}</${n.name}>`)}else if(He(k)&&!N){const t=n.children[0]?h:null;t&&e.push(t)}else m(k,h,e,p,1!==n.children.length||!h)}else if("text"===n.type){const t=o.transWrapTextNodes,i="function"==typeof o.unescape?o.unescape:Ge().unescape,l=r?i(s.services.interpolator.interpolate(n.content,g,s.language)):s.services.interpolator.interpolate(n.content,g,s.language);t?e.push((0,a.createElement)(t,{key:`${n.name}-${p}`},l)):e.push(l)}return e},[])},y=v([{dummy:!0,children:e||[]}],h,et(e||[]));return Qe(y[0])},at=(e,t,n)=>{const s=e.key||t,o=(0,a.cloneElement)(e,{key:s});if(!o.props||!o.props.children||n.indexOf(`${t}/>`)<0&&n.indexOf(`${t} />`)<0)return o;return(0,a.createElement)(function(){return(0,a.createElement)(a.Fragment,null,o)},{key:s})},st=(e,t,n,a)=>e?Array.isArray(e)?((e,t)=>e.map((e,n)=>at(e,n,t)))(e,t):He(e)?((e,t)=>{const n={};return Object.keys(e).forEach(a=>{Object.assign(n,{[a]:at(e[a],a,t)})}),n})(e,t):(Ue(n,"TRANS_INVALID_COMPONENTS",'<Trans /> "components" prop expects an object or array',{i18nKey:a}),null):null;function ot({children:e,count:t,parent:n,i18nKey:s,context:o,tOptions:i={},values:r,defaults:l,components:c,ns:u,i18n:p,t:d,shouldUnescape:h,...g}){const f=p||Ye();if(!f)return Ue(f,"NO_I18NEXT_INSTANCE","Trans: You need to pass in an i18next instance using initReactI18next or by passing it via props or context. In monorepo setups, make sure there is only one instance of react-i18next.",{i18nKey:s}),e;const m=d||f.t.bind(f)||(e=>e),v={...Ge(),...f.options?.react};let y=u||m.ns||f.options?.defaultNS;y=Ke(y)?[y]:y||["translation"];const{transDefaultProps:b}=v,k=b?.tOptions?{...b.tOptions,...i}:i,N=h??b?.shouldUnescape,x=b?.values?{...b.values,...r}:r,S=b?.components?{...b.components,...c}:c,w=tt(e,v,f,s),O=l||k?.defaultValue||w||v.transEmptyNodeValue||("function"==typeof s?j(s):s),{hashTransKey:E}=v,L=s||(E?E(w||O):w||O);r=f.options?.interpolation?.defaultVariables?x&&Object.keys(x).length>0?{...x,...f.options.interpolation.defaultVariables}:{...f.options.interpolation.defaultVariables}:x;const $=(e=>{const t={};if(!e)return t;const n=e=>{et(e).forEach(e=>{Ke(e)||(Ze(e)?n(Qe(e)):He(e)&&!(0,a.isValidElement)(e)&&Object.assign(t,e))})};return n(e),t})(e);$&&"number"==typeof $.count&&void 0===t&&(t=$.count);const C=r||void 0!==t&&!f.options?.interpolation?.alwaysFormat||!e?k.interpolation:{interpolation:{...k.interpolation,prefix:"#$?",suffix:"?$#"}},P={...k,context:o||k.context,count:t,...r,...C,defaultValue:O,ns:y};let R=L?m(L,P):O;R===L&&O&&(R=O);const T=st(S,R,f,s);let A=T||e,_=null;var I;He(I=T)&&!Array.isArray(I)&&Object.keys(I).reduce((e,t)=>e&&Number.isNaN(Number.parseFloat(t)),!0)&&(_=T,A=e);const F=nt(A,_,R,f,v,P,N),V=n??v.defaultTransParent;return V?(0,a.createElement)(V,g,F):F}const it=(0,a.createContext)();function rt({children:e,count:t,parent:n,i18nKey:s,context:o,tOptions:i={},values:r,defaults:l,components:c,ns:u,i18n:p,t:d,shouldUnescape:h,...g}){const{i18n:f,defaultNS:m}=(0,a.useContext)(it)||{},v=p||f||Ye(),y=d||v?.t.bind(v);return ot({children:e,count:t,parent:n,i18nKey:s,context:o,tOptions:i,values:r,defaults:l,components:c,ns:u||y?.ns||m||v?.options?.defaultNS,i18n:v,t:d,shouldUnescape:h,...g})}class lt extends Error{constructor(e,t,n){super(e),this.name="TranslationParserError",this.position=t,this.translationString=n,Error.captureStackTrace&&Error.captureStackTrace(this,lt)}}const ct={" ":" ","&":"&","<":"<",">":">",""":'"',"'":"'","©":"©","®":"®","™":"™","…":"…","–":"–","—":"—","‘":"‘","’":"’","‚":"‚","“":"“","”":"”","„":"„","†":"†","‡":"‡","•":"•","′":"′","″":"″","‹":"‹","›":"›","§":"§","¶":"¶","·":"·"," ":" "," ":" "," ":" ","€":"€","£":"£","¥":"¥","¢":"¢","¤":"¤","×":"×","÷":"÷","−":"−","±":"±","≠":"≠","≤":"≤","≥":"≥","≈":"≈","≡":"≡","∞":"∞","∫":"∫","∑":"∑","∏":"∏","√":"√","∂":"∂","‰":"‰","°":"°","µ":"µ","←":"←","↑":"↑","→":"→","↓":"↓","↔":"↔","↵":"↵","⇐":"⇐","⇑":"⇑","⇒":"⇒","⇓":"⇓","⇔":"⇔","α":"α","β":"β","γ":"γ","δ":"δ","ε":"ε","ζ":"ζ","η":"η","θ":"θ","ι":"ι","κ":"κ","λ":"λ","μ":"μ","ν":"ν","ξ":"ξ","ο":"ο","π":"π","ρ":"ρ","σ":"σ","τ":"τ","υ":"� |