1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,657563,e=>{"use strict";var t=e.i(271645);let s=e=>"string"==typeof e,i=()=>{let e,t,s=new Promise((s,i)=>{e=s,t=i});return s.resolve=e,s.reject=t,s},a=e=>null==e?"":String(e),r=/###/g,o=e=>e&&e.includes("###")?e.replace(r,"."):e,n=e=>!e||s(e),l=(e,t,i)=>{let a=s(t)?t.split("."):t,r=0;for(;r<a.length-1;){if(n(e))return{};let t=o(a[r]);!e[t]&&i&&(e[t]=new i),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++r}return n(e)?{}:{obj:e,k:o(a[r])}},h=(e,t,s)=>{let{obj:i,k:a}=l(e,t,Object);if(void 0!==i||1===t.length){i[a]=s;return}let r=t[t.length-1],o=t.slice(0,t.length-1),n=l(e,o,Object);for(;void 0===n.obj&&o.length;)r=`${o[o.length-1]}.${r}`,n=l(e,o=o.slice(0,o.length-1),Object),n?.obj&&void 0!==n.obj[`${n.k}.${r}`]&&(n.obj=void 0);n.obj[`${n.k}.${r}`]=s},u=(e,t)=>{let{obj:s,k:i}=l(e,t);if(s&&Object.prototype.hasOwnProperty.call(s,i))return s[i]},p=(e,t,i)=>{for(let a in t)"__proto__"!==a&&"constructor"!==a&&(Object.prototype.hasOwnProperty.call(e,a)?s(e[a])||e[a]instanceof String||s(t[a])||t[a]instanceof String?i&&(e[a]=t[a]):p(e[a],t[a],i):e[a]=t[a]);return e},g={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},c=e=>s(e)?e.replace(/[&<>"'\/]/g,e=>g[e]):e,d=[" ",",","?","!",";"],f=new class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){let t=this.regExpMap.get(e);if(void 0!==t)return t;let s=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,s),this.regExpQueue.push(e),s}}(20),m=(e,t,s=".")=>{if(!e)return;if(e[t]){if(!Object.prototype.hasOwnProperty.call(e,t))return;return e[t]}let i=t.split(s),a=e;for(let e=0;e<i.length;){let t;if(!a||"object"!=typeof a)return;let r="";for(let o=e;o<i.length;++o)if(o!==e&&(r+=s),r+=i[o],void 0!==(t=a[r])){if(["string","number","boolean"].includes(typeof t)&&o<i.length-1)continue;e+=o-e+1;break}a=t}return a},y=e=>e?.replace(/_/g,"-"),v={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)}};var b=new class e{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||"i18next:",this.logger=e||v,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,i,a){return a&&!this.debug?null:(e=e.map(e=>s(e)?e.replace(/[\r\n\x00-\x1F\x7F]/g," "):e),s(e[0])&&(e[0]=`${i}${this.prefix} ${e[0]}`),this.logger[t](e))}create(t){return new e(this.logger,{...{prefix:`${this.prefix}:${t}:`},...this.options})}clone(t){return(t=t||this.options).prefix=t.prefix||this.prefix,new e(this.logger,t)}};class k{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(e=>{this.observers[e]||(this.observers[e]=new Map);let s=this.observers[e].get(t)||0;this.observers[e].set(t,s+1)}),this}off(e,t){if(this.observers[e]){if(!t)return void delete this.observers[e];this.observers[e].delete(t)}}once(e,t){let s=(...i)=>{t(...i),this.off(e,s)};return this.on(e,s),this}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([e,s])=>{for(let i=0;i<s;i++)e(...t)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([s,i])=>{for(let a=0;a<i;a++)s(e,...t)})}}class x extends k{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){let t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,i,a={}){let r,o=void 0!==a.keySeparator?a.keySeparator:this.options.keySeparator,n=void 0!==a.ignoreJSONStructure?a.ignoreJSONStructure:this.options.ignoreJSONStructure;e.includes(".")?r=e.split("."):(r=[e,t],i&&(Array.isArray(i)?r.push(...i):s(i)&&o?r.push(...i.split(o)):r.push(i)));let l=u(this.data,r);return(!l&&!t&&!i&&e.includes(".")&&(e=r[0],t=r[1],i=r.slice(2).join(".")),!l&&n&&s(i))?m
1(this.data?.[e]?.[t],i,o):l}addResource(e,t,s,i,a={silent:!1}){let r=void 0!==a.keySeparator?a.keySeparator:this.options.keySeparator,o=[e,t];s&&(o=o.concat(r?s.split(r):s)),e.includes(".")&&(o=e.split("."),i=t,t=o[1]),this.addNamespaces(t),h(this.data,o,i),a.silent||this.emit("added",e,t,s,i)}addResources(e,t,i,a={silent:!1}){for(let a in i)(s(i[a])||Array.isArray(i[a]))&&this.addResource(e,t,a,i[a],{silent:!0});a.silent||this.emit("added",e,t,i)}addResourceBundle(e,t,s,i,a,r={silent:!1,skipCopy:!1}){let o=[e,t];e.includes(".")&&(o=e.split("."),i=s,s=t,t=o[1]),this.addNamespaces(t);let n=u(this.data,o)||{};r.skipCopy||(s=JSON.parse(JSON.stringify(s))),i?p(n,s,a):n={...n,...s},h(this.data,o,n),r.silent||this.emit("added",e,t,s)}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){let t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}}var S={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,s,i,a){return e.forEach(e=>{t=this.processors[e]?.process(t,s,i,a)??t}),t}};let L=Symbol("i18next/PATH_KEY");function $(e,t){let s,i,a,{[L]:r}=e((i=[],(a=Object.create(null)).get=(e,t)=>(s?.revoke?.(),t===L)?i:(i.push(t),(s=Proxy.revocable(e,a)).proxy),Proxy.revocable(Object.create(null),a).proxy)),o=t?.keySeparator??".",n=t?.nsSeparator??":",l=t?.enableSelector==="strict";if(r.length>1&&n){let e=t?.ns,s=l?Array.isArray(e)?e:e?[e]:null:Array.isArray(e)?e:null;if(s&&(l?s:s.length>1?s.slice(1):[]).includes(r[0]))return`${r[0]}${n}${r.slice(1).join(o)}`}return r.join(o)}let w=e=>!s(e)&&"boolean"!=typeof e&&"number"!=typeof e;class R extends k{constructor(e,t={}){super(),((e,t,s)=>{e.forEach(e=>{t[e]&&(s[e]=t[e])})})(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","
1i18nFormat","utils"],e,this),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=b.create("translator"),this.checkedLoadedFor={}}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){let s={...t};if(null==e)return!1;let i=this.resolve(e,s);if(i?.res===void 0)return!1;let a=w(i.res);return!1!==s.returnObjects||!a}extractFromKey(e,t){let i=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===i&&(i=":");let a=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,r=t.ns||this.options.defaultNS||[],o=i&&e.includes(i),n=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!((e,t,s)=>{t=t||"",s=s||"";let i=d.filter(e=>!t.includes(e)&&!s.includes(e));if(0===i.length)return!0;let a=f.getRegExp(`(${i.map(e=>"?"===e?"\\?":e).join("|")})`),r=!a.test(e);if(!r){let t=e.indexOf(s);t>0&&!a.test(e.substring(0,t))&&(r=!0)}return r})(e,i,a);if(o&&!n){let t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:s(r)?[r]:r};let o=e.split(i);(i!==a||i===a&&this.options.ns.includes(o[0]))&&(r=o.shift()),e=o.join(a)}return{key:e,namespaces:s(r)?[r]:r}}translate(e,t,i){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=$(e,{...this.options,...a})),Array.isArray(e)||(e=[String(e)]),e=e.map(e=>"function"==typeof e?$(e,{...this.options,...a}):String(e));let r=void 0!==a.returnDetails?a.returnDetails:this.options.returnDetails,o=void 0!==a.keySeparator?a.keySeparator:this.options.keySeparator,{key:n,namespaces:l}=this.extractFromKey(e[e.length-1],a),h=l[l.length-1],u=void 0!==a.nsSeparator?a.nsSeparator:this.options.nsSeparator;void 0===u&&(u=":");let p=a.lng||this.language,g=a.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(p?.toLowerCase()==="cimode")return g?r?{res:`${h}${u}${n}`,usedKey:n,exactUsedKey:n,usedLng:p,usedNS:h,usedParams:this.getUsedParamsDetails(a)}:`${h}${u}${n}`:r?{res:n,usedKey:n,exactUsedKey:n,usedLng:p,usedNS:h,usedParams:this.getUsedParamsDetails(a)}:n;let c=this.resolve(e,a),d=c?.res,f=c?.usedKey||n,m=c?.exactUsedKey||n,y=void 0!==a.joinArrays?a.joinArrays:this.options.joinArrays,v=!this.i18nFormat||this.i18nFormat.handleAsObject,b=void 0!==a.count&&!s(a.count),k=R.hasDefaultValue(a),x=b?this.pluralResolver.getSuffix(p,a.count,a):"",S=a.ordinal&&b?this.pluralResolver.getSuffix(p,a.count,{ordinal:!1}):"",L=b&&!a.ordinal&&0===a.count,C=L&&a[`defaultValue${this.options.pluralSeparator}zero`]||a[`defaultValue${x}`]||a[`defaultValue${S}`]||a.defaultValue,O=d;v&&!d&&k&&(O=C);let P=w(O),j=Object.prototype.toString.apply(O);if(v&&O&&P&&!["[object Number]","[object Function]","[object RegExp]"].includes(j)&&!(s(y)&&Array.isArray(O))){if
1(!a.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");let e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(f,O,{...a,ns:l}):`key '${n} (${this.language})' returned an object instead of string.`;return r?(c.res=e,c.usedParams=this.getUsedParamsDetails(a),c):e}if(o){let e=Array.isArray(O),t=e?[]:{},s=e?m:f;for(let e in O)if(Object.prototype.hasOwnProperty.call(O,e)){let i=`${s}${o}${e}`;k&&!d?t[e]=this.translate(i,{...a,defaultValue:w(C)?C[e]:void 0,...{joinArrays:!1,ns:l}}):t[e]=this.translate(i,{...a,joinArrays:!1,ns:l}),t[e]===i&&(t[e]=O[e])}d=t}}else if(v&&s(y)&&Array.isArray(d))(d=d.join(y))&&(d=this.extendTranslation(d,e,a,i));else{let t=!1,s=!1;!this.isValidLookup(d)&&k&&(t=!0,d=C),this.isValidLookup(d)||(s=!0,d=n);let r=(a.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&s?void 0:d,l=k&&C!==d&&this.options.updateMissing;if(s||t||l){if(this.logger.log(l?"updateKey":"missingKey",p,h,b&&!l?`${n}${this.pluralResolver.getSuffix(p,a.count,a)}`:n,l?C:d),o){let e=this.resolve(n,{...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=[],t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,a.lng||this.language);if("fallback"===this.options.saveMissingTo&&t&&t[0])for(let s=0;s<t.length;s++)e.push(t[s]);else"all"===this.options.saveMissingTo?e=this.languageUtils.toResolveHierarchy(a.lng||this.language):e.push(a.lng||this.language);let s=(e,t,s)=>{let i=k&&s!==d?s:r;this.options.missingKeyHandler?this.options.missingKeyHandler(e,h,t,i,l,a):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,h,t,i,l,a),this.emit("missingKey",e,h,t,d)};this.options.saveMissing&&(this.options.saveMissingPlurals&&b?e.forEach(e=>{let t=this.pluralResolver.getSuffixes(e,a);L&&a[`defaultValue${this.options.pluralSeparator}zero`]&&!t.includes(`${this.options.pluralSeparator}zero`)&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{s([e],n+t,a[`defaultValue${t}`]||C)})}):s(e,n,C))}d=this.extendTranslation(d,e,a,c,i),s&&d===n&&this.options.appendNamespaceToMissingKey&&(d=`${h}${u}${n}`),(s||t)&&this.options.parseMissingKeyHandler&&(d=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${h}${u}${n}`:n,t?d:void 0,a))}return r?(c.res=d,c.usedParams=this.getUsedParamsDetails(a),c):d}extendTranslation(e,t,i,a,r){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...i},i.lng||this.language||a.usedLng,a.usedNS,a.usedKey,{resolved:a});else if(!i.skipInterpolation){let o;i.interpolation&&this.interpolator.init({...i,...{interpolation:{...this.options.interpolation,...i.interpolation}}});let n=s(e)&&(i?.interpolation?.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);if(n){let t=e.match(this.interpolator.nestingRegexp);o=t&&t.length}let l=i.replace&&!s(i.replace)?i.replace:i;if(this.options.interpolation.defaultVariables&&(l={...this.options.interpolation.defaultVariables,...l}),e=this.interpolator.interpolate(e,l,i.lng||this.language||a.usedLng,i),n){let t=e.match(this.interpolator.nestingRegexp);o<(t&&t.length)&&(i.nest=!1)}!i.lng&&a&&a.res&&(i.lng=this.language||a.usedLng),!1!==i.nest&&(e=this.interpolator.nest(e,(...e)=>r?.[0]!==e[0]||i.context?this.translate(...e,t):(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null),i)),i.interpolation&&this.interpolator.reset()}let o=i.postProcess||this.options.postProcess,n=s(o)?[o]:o;return null!=e&&n?.length&&!1!==i.applyPostProcessor&&(e=S.handle(n,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...a,usedParams:this.getUsedParamsDetails(i)},...i}:i,this)),e}resolve(e,t={}){let i,a,r,o,n;return s(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(e=>"function"==typeof e?$(e,{...this.options,...t}
1):e)),e.forEach(e=>{if(this.isValidLookup(i))return;let l=this.extractFromKey(e,t),h=l.key;a=h;let u=l.namespaces;this.options.fallbackNS&&(u=u.concat(this.options.fallbackNS));let p=void 0!==t.count&&!s(t.count),g=p&&!t.ordinal&&0===t.count,c=void 0!==t.context&&(s(t.context)||"number"==typeof t.context)&&""!==t.context,d=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);u.forEach(e=>{this.isValidLookup(i)||(n=e,!this.checkedLoadedFor[`${d[0]}-${e}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(n)&&(this.checkedLoadedFor[`${d[0]}-${e}`]=!0,this.logger.warn(`key "${a}" for languages "${d.join(", ")}" won't get resolved as namespace "${n}" 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!!!")),d.forEach(s=>{let a;if(this.isValidLookup(i))return;o=s;let n=[h];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(n,h,s,e,t);else{let e;p&&(e=this.pluralResolver.getSuffix(s,t.count,t));let i=`${this.options.pluralSeparator}zero`,a=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(p&&(t.ordinal&&e.startsWith(a)&&n.push(h+e.replace(a,this.options.pluralSeparator)),n.push(h+e),g&&n.push(h+i)),c){let s=`${h}${this.options.contextSeparator||"_"}${t.context}`;n.push(s),p&&(t.ordinal&&e.startsWith(a)&&n.push(s+e.replace(a,this.options.pluralSeparator)),n.push(s+e),g&&n.push(s+i))}}for(;a=n.pop();)this.isValidLookup(i)||(r=a,i=this.getResource(s,e,a,t))}))})}),{res:i,usedKey:a,exactUsedKey:r,usedLng:o,usedNS:n}}isValidLookup(e){return void 0!==e&&!(!this.options.returnNull&&null===e)&&!(!this.options.returnEmptyString&&""===e)}getResource(e,t,s,i={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,s,i):this.resourceStore.getResource(e,t,s,i)}getUsedParamsDetails(e={}){let t=e.replace&&!s(e.replace),i=t?e.replace:e;if(t&&void 0!==e.count&&(i={...i,count:e.count}),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!t)for(let e of(i={...i},["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"]))delete i[e];return i}static hasDefaultValue(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&t.startsWith("defaultValue")&&void 0!==e[t])return!0;return!1}}class C{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=b.create("languageUtils"),this.resolveHierarchyCache={}}clearCache(){this.resolveHierarchyCache={}}getScriptPartFromCode(e){if(!(e=y(e))||!e.includes("-"))return null;let t=e.split("-");return 2===t.length||(t.pop(),"x"===t[t.length-1].toLowerCase())?null:this.formatLanguageCode(t.join("-"))}getLanguagePartFromCode(e){if(!(e=y(e))||!e.includes("-"))return e;let t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(s(e)&&e.includes("-")){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch(e){}return(t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t)?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){let t;return e?(e.forEach(e=>{if(t)return;let s=this.formatLanguageCode(e);(!this.options.supportedLngs||this.isSupportedCode(s))&&(t=s)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;let s=this.getScriptPartFromCode(e);if(this.isSupportedCode(s))return t=s;let i=this.getLanguagePartFromCode(e);if(this.isSupportedCode(i))return t=i;t=this.options.supportedLngs.find(e=>e===i||(!!e.includes("-")||!!i.includes("-"))&&!!(e.includes("-")&&!i.includes("-")&&e.slice(0,e.indexOf("-"))===i||e.startsWith(i)&&i.length>1))}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null}getFallbackCodes(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),s(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let i=e[t];
1return i||(i=e[this.getScriptPartFromCode(t)]),i||(i=e[this.formatLanguageCode(t)]),i||(i=e[this.getLanguagePartFromCode(t)]),i||(i=e.default),i||[]}toResolveHierarchy(e,t){let i=this.options.fallbackLng,a=Array.isArray(i)?i.join("|"):i;a!==this._cachedFallbackLng&&(this.resolveHierarchyCache={},this._cachedFallbackLng=a);let r=void 0===t||!1===t||s(t),o=void 0===t&&"function"==typeof this.options.fallbackLng,n=s(e)&&r&&!o,l=null;if(n){let s;s=void 0===t?"undefined":!1===t?"boolean:false":`string:${t}`,l=`${e.length}:${e}|${s}`}if(null!==l){let e=this.resolveHierarchyCache[l];if(void 0!==e)return e.slice()}let h=this.getFallbackCodes((!1===t?[]:t)||this.options.fallbackLng||[],e),u=[],p=e=>{e&&(this.isSupportedCode(e)?u.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return(s(e)&&(e.includes("-")||e.includes("_"))?("languageOnly"!==this.options.load&&p(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&p(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&p(this.getLanguagePartFromCode(e))):s(e)&&p(this.formatLanguageCode(e)),h.forEach(e=>{u.includes(e)||p(this.formatLanguageCode(e))}),null!==l)?(this.resolveHierarchyCache[l]=u,u.slice()):u}}let O={zero:0,one:1,two:2,few:3,many:4,other:5},P={select:e=>1===e?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class j{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=b.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){let s,i=y("dev"===e?"en":e),a=t.ordinal?"ordinal":"cardinal",r=JSON.stringify({cleanedCode:i,type:a});if(r in this.pluralRulesCache)return this.pluralRulesCache[r];try{s=new Intl.PluralRules(i,{type:a})}catch(a){if("u"<typeof Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),P;if(!e.match(/-|_/))return P;let i=this.languageUtils.getLanguagePartFromCode(e);s=this.getRule(i,t)}return this.pluralRulesCache[r]=s,s}needsPlural(e,t={}){let s=this.getRule(e,t);return s||(s=this.getRule("dev",t)),s?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,s={}){return this.getSuffixes(e,s).map(e=>`${t}${e}`)}getSuffixes(e,t={}){let s=this.getRule(e,t);return(s||(s=this.getRule("dev",t)),s)?s.resolvedOptions().pluralCategories.sort((e,t)=>O[e]-O[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`):[]}getSuffix(e,t,s={}){let i=this.getRule(e,s);return i?`${this.options.prepend}${s.ordinal?`ordinal${this.options.prepend}`:""}${i.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,s))}}let N=(e,t,i,a=".",r=!0)=>{let o,n=void 0!==(o=u(e,i))?o:u(t,i);return!n&&r&&s(i)&&void 0===(n=m(e,i,a))&&(n=m(t,i,a)),n},E=e=>e.replace(/\$/g,"$$$$");class F{constructor(e={}){this.logger=b.create("interpolator"),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});let{escape:t,escapeValue:s,useRawValueToEscape:i,prefix:a,prefixEscaped:r,suffix:o,suffixEscaped:n,formatSeparator:l,unescapeSuffix:h,unescapePrefix:u,nestingPrefix:p,nestingPrefixEscaped:g,nestingSuffix:d,nestingSuffixEscaped:f,nestingOptionsSeparator:m,maxReplaces:y,alwaysFormat:v}=e.interpolation;this.escape=void 0!==t?t:c,this.escapeValue=void 0===s||s,this.useRawValueToEscape=void 0!==i&&i,this.prefix=a?a.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"):r||"{{",this.suffix=o?o.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"):n||"}}",this.formatSeparator=l||",",this.unescapePrefix=h?"":u?u.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"):"-",this.unescapeSuffix=this.unescapePrefix?"":h?h.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"):"",this.nestingPrefix=p?p.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"):g||"$t(".replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),this.nestingSuffix=d?d.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"):f||")".replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),this.nestingOptionsSeparator=m||",",this.maxReplaces=y||1e3,this.alwaysFormat=void 0!==v&&v,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){let e=(e,t)=>
1e?.source===t?(e.lastIndex=0,e):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,i,r){let o,n,l,h=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=e=>{if(!e.includes(this.formatSeparator)){let s=N(t,h,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(s,void 0,i,{...r,...t,interpolationkey:e}):s}let s=e.split(this.formatSeparator),a=s.shift().trim(),o=s.join(this.formatSeparator).trim();return this.format(N(t,h,a,this.options.keySeparator,this.options.ignoreJSONStructure),o,i,{...r,...t,interpolationkey:a})};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.");let p=r?.missingInterpolationHandler||this.options.missingInterpolationHandler,g=r?.interpolation?.skipOnVariables!==void 0?r.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;o=t.regex.exec(e);){let i=o[1].trim();if(void 0===(n=u(i)))if("function"==typeof p){let t=p(e,o,r);n=s(t)?t:""}else if(r&&Object.prototype.hasOwnProperty.call(r,i))n="";else if(g){n=o[0];continue}else this.logger.warn(`missed to pass in variable ${i} for interpolating ${e}`),n="";else s(n)||this.useRawValueToEscape||(n=a(n));let h=t.safeValue(n);if(e=e.replace(o[0],E(h)),g?(t.regex.lastIndex+=h.length,t.regex.lastIndex-=o[0].length):t.regex.lastIndex=0,++l>=this.maxReplaces)break}}),e}nest(e,t,i={}){let r,o,n,l=(e,t)=>{let s=this.nestingOptionsSeparator;if(!e.includes(s))return e;let i=e.split(RegExp(`${s.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}[ ]*{`)),a=`{${i[1]}`;e=i[0];let r=(a=this.interpolate(a,n)).match(/'/g),o=a.match(/"/g);((r?.length??0)%2!=0||o)&&(o?.length??0)%2==0||(a=a.replace(/'/g,'"'));try{n=JSON.parse(a),t&&(n={...t,...n})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${s}${a}`}return n.defaultValue&&n.defaultValue.includes(this.prefix)&&delete n.defaultValue,e};for(;r=this.nestingRegexp.exec(e);){let h=[];(n=(n={...i}).replace&&!s(n.replace)?n.replace:n).applyPostProcessor=!1,delete n.defaultValue;let u=/{.*}/s.test(r[1])?r[1].lastIndexOf("}")+1:r[1].indexOf(this.formatSeparator);if(-1!==u&&(h=r[1].slice(u).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),r[1]=r[1].slice(0,u)),(o=t(l.call(this,r[1].trim(),n),n))&&r[0]===e&&!s(o))return o;s(o)||(o=a(o)),o||(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),o=""),h.length&&(o=h.reduce((e,t)=>this.format(e,t,i.lng,{...i,interpolationkey:r[1].trim()}),o.trim())),e=e.replace(r[0],E(a(o))),this.regexp.lastIndex=0}return e}}let T=e=>{let t={};return(s,i,a)=>{let r=a;a&&a.interpolationkey&&a.formatParams&&a.formatParams[a.interpolationkey]&&a[a.interpolationkey]&&(r={...r,[a.interpolationkey]:void 0});let o=i+JSON.stringify(r),n=t[o];return n||(n=e(y(i),a),t[o]=n),n(s)}},V=e=>(t,s,i)=>e(y(s),i)(t);class I{constructor(e={}){this.logger=b.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";let s=t.cacheInBuiltFormats?T:V;this.formats={number:s((e,t)=>{let s=new Intl.NumberFormat(e,{...t});return e=>s.format(e)}),currency:s((e,t)=>{let s=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>s.format(e)}),datetime:s((e,t)=>{let s=new Intl.DateTimeFormat(e,{...t});return e=>s.format(e)}),relativetime:s((e,t)=>{let s=new Intl.RelativeTimeFormat(e,{...t});return e=>s.format(e,t.range||"day")}),list:s((e,t)=>{let s=new Intl.ListFormat(e,{...t});return e=>s.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=T(t)}format(e,t,s,i={}){if(!t||null==e)return e;let a=t.split(this.formatSeparator),r=[];for(let e=0;e<a.length;e++){let t=a[e];for(;t.indexOf("(")>-1&&!t.includes(")")&&e+1<a.length;)t=`${t}${this.formatSeparator}${a[++e]}`;r.push(t)}return r.reduce((e,t)=>
1{let{formatName:a,formatOptions:r}=(e=>{let t=e.toLowerCase().trim(),s={};if(e.includes("(")){let i=e.split("(");t=i[0].toLowerCase().trim();let a=i[1].slice(0,-1);"currency"!==t||a.includes(":")?"relativetime"!==t||a.includes(":")?a.split(";").forEach(e=>{if(e){let[t,...i]=e.split(":"),a=i.join(":").trim().replace(/^'+|'+$/g,""),r=t.trim();s[r]||(s[r]=a),"false"===a&&(s[r]=!1),"true"===a&&(s[r]=!0),isNaN(a)||(s[r]=parseInt(a,10))}}):s.range||(s.range=a.trim()):s.currency||(s.currency=a.trim())}return{formatName:t,formatOptions:s}})(t);if(this.formats[a]){let t=e;try{let o=i?.formatParams?.[i.interpolationkey]||{},n=o.locale||o.lng||i.locale||i.lng||s;t=this.formats[a](e,n,{...r,...i,...o})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${a}`),e},e)}}class D extends k{constructor(e,t,s,i={}){super(),this.backend=e,this.store=t,this.services=s,this.languageUtils=s.languageUtils,this.options=i,this.logger=b.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(s,i.backend,i)}queueLoad(e,t,s,i){let a={},r={},o={},n={};return e.forEach(e=>{let i=!0;t.forEach(t=>{let o=`${e}|${t}`;!s.reload&&this.store.hasResourceBundle(e,t)?this.state[o]=2:this.state[o]<0||(1===this.state[o]?void 0===r[o]&&(r[o]=!0):(this.state[o]=1,i=!1,void 0===r[o]&&(r[o]=!0),void 0===a[o]&&(a[o]=!0),void 0===n[t]&&(n[t]=!0)))}),i||(o[e]=!0)}),(Object.keys(a).length||Object.keys(r).length)&&this.queue.push({pending:r,pendingCount:Object.keys(r).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(a),pending:Object.keys(r),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(n)}}loaded(e,t,s){let i=e.split("|"),a=i[0],r=i[1];t&&this.emit("failedLoading",a,r,t),!t&&s&&this.store.addResourceBundle(a,r,s,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&s&&(this.state[e]=0);let o={};this.queue.forEach(s=>{((e,t,s)=>{let{obj:i,k:a}=l(e,t,Object);i[a]=i[a]||[],i[a].push(s)})(s.loaded,[a],r),void 0!==s.pending[e]&&(delete s.pending[e],s.pendingCount--),t&&s.errors.push(t),0!==s.pendingCount||s.done||(Object.keys(s.loaded).forEach(e=>{o[e]||(o[e]={});let t=s.loaded[e];t.length&&t.forEach(t=>{void 0===o[e][t]&&(o[e][t]=!0)})}),s.done=!0,s.errors.length?s.callback(s.errors):s.callback())}),this.emit("loaded",o),this.queue=this.queue.filter(e=>!e.done)}read(e,t,s,i=0,a=this.retryTimeout,r){if(!e.length)return r(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:t,fcName:s,tried:i,wait:a,callback:r});this.readingCalls++;let o=(o,n)=>{if(this.readingCalls--,this.waitingReads.length>0){let e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}o&&n&&i<this.maxRetries?setTimeout(()=>{this.read(e,t,s,i+1,2*a,r)},a):r(o,n)},n=this.backend[s].bind(this.backend);if(2===n.length){try{let s=n(e,t);s&&"function"==typeof s.then?s.then(e=>o(null,e)).catch(o):o(null,s)}catch(e){o(e)}return}return n(e,t,o)}prepareLoading(e,t,i={},a){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),a&&a();s(e)&&(e=this.languageUtils.toResolveHierarchy(e)),s(t)&&(t=[t]);let r=this.queueLoad(e,t,i,a);if(!r.toLoad.length)return r.pending.length||a(),null;r.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,s){this.prepareLoading(e,t,{},s)}reload(e,t,s){this.prepareLoading(e,t,{reload:!0},s)}loadOne(e,t=""){let s=e.split("|"),i=s[0],a=s[1];this.read(i,a,"read",void 0,void 0,(s,r)=>{s&&this.logger.warn(`${t}loading namespace ${a} for language ${i} failed`,s),!s&&r&&this.logger.log(`${t}loaded namespace ${a} for language ${i}`,r),this.loaded(e,s,r)})}saveMissing(e,t,s,i,a,r={},o=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(t))return void this.logger.warn(`did not save key "${s}" 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!!!");if(null!=s&&""!==s){if(this.backend?.create){let n={...r,isUpdate:a},l=this.backend.create.bind(this.backend);if(l.length<6)try{let a;(a=5===l.length?l(e,t,s,i,n):l(e,t,s,i))&&"function"==typeof a.then?a.then(e=>o(null,e)).catch(o):o(null,a)}catch(e){o(e)}else l(e,t,s,i,o,n)}e&&e[0]&&this.store.addResource(e[0],t,s,i)}}}let A=()=>({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]),s(e[1])&&(t.defaultValue=e[1]),s(e[2])&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){let s=e[3]||e[2];
1Object.keys(s).forEach(e=>{t[e]=s[e]})}return t},interpolation:{escapeValue:!0,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),K=e=>(s(e.ns)&&(e.ns=[e.ns]),s(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),s(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&!e.supportedLngs.includes("cimode")&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),U=()=>{};class H extends k{constructor(e={},t){if(super(),this.options=K(e),this.services={},this.logger=b,this.modules={external:[]},(e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>{"function"==typeof e[t]&&(e[t]=e[t].bind(e))})})(this),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&&(s(e.ns)?e.defaultNS=e.ns:e.ns.includes("translation")||(e.defaultNS=e.ns[0]));let a=A();this.options={...a,...this.options,...K(e)},this.options.interpolation={...a.interpolation,...this.options.interpolation}
1,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=a.overloadTranslationOptionHandler);let r=e=>e?"function"==typeof e?new e:e:null;if(!this.options.isClone){let e;this.modules.logger?b.init(r(this.modules.logger),this.options):b.init(null,this.options),e=this.modules.formatter?this.modules.formatter:I;let t=new C(this.options);this.store=new x(this.options.resources,this.options);let s=this.services;s.logger=b,s.resourceStore=this.store,s.languageUtils=t,s.pluralResolver=new j(t,{prepend:this.options.pluralSeparator}),e&&(s.formatter=r(e),s.formatter.init&&s.formatter.init(s,this.options),this.options.interpolation.format=s.formatter.format.bind(s.formatter)),s.interpolator=new F(this.options),s.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},s.backendConnector=new D(r(this.modules.backend),s.resourceStore,s,this.options),s.backendConnector.on("*",(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(s.languageDetector=r(this.modules.languageDetector),s.languageDetector.init&&s.languageDetector.init(s,this.options.detection,this.options)),this.modules.i18nFormat&&(s.i18nFormat=r(this.modules.i18nFormat),s.i18nFormat.init&&s.i18nFormat.init(this)),this.translator=new R(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=U),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){let 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)});let o=i(),n=()=>{let e=(e,s)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),o.resolve(s),t(e,s)};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?n():setTimeout(n,0),o}loadResources(e,t=U){let i=t,a=s(e)?e:this.language;if("function"==typeof e&&(i=e),!this.options.resources||this.options.partialBundledLanguages){if(a?.toLowerCase()==="cimode"&&(!this.options.preload||0===this.options.preload.length))return i();let e=[],t=t=>{t&&"cimode"!==t&&this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{"cimode"!==t&&(e.includes(t)||e.push(t))})};a?t(a):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),i(e)})}else i(null)}reloadResources(e,t,s){let a=i();return"function"==typeof e&&(s=e,e=void 0),"function"==typeof t&&(s=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),s||(s=U),this.services.backendConnector.reload(e,t,e=>{a.resolve(),s(e)}),a}use(e){if(!e)throw Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw 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&&S.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++){let 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;let a=i();
1this.emit("languageChanging",e);let r=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},o=(s,i)=>{i?this.isLanguageChangingTo===e&&(r(i),this.translator.changeLanguage(i),this.isLanguageChangingTo=void 0,this.emit("languageChanged",i),this.logger.log("languageChanged",i)):this.isLanguageChangingTo=void 0,a.resolve((...e)=>this.t(...e)),t&&t(s,(...e)=>this.t(...e))},n=t=>{e||t||!this.services.languageDetector||(t=[]);let i=s(t)?t:t&&t[0],a=this.store.hasLanguageSomeTranslations(i)?i:this.services.languageUtils.getBestMatchFromCodes(s(t)?[t]:t);a&&(this.language||r(a),this.translator.language||this.translator.changeLanguage(a),this.services.languageDetector?.cacheUserLanguage?.(a)),this.loadResources(a,e=>{o(e,a)})};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(n):this.services.languageDetector.detect(n):n(e):n(this.services.languageDetector.detect()),a}getFixedT(e,t,i,a){let r=a?.scopeNs,o=(e,t,...s)=>{let a,n;(a="object"!=typeof t?this.options.overloadTranslationOptionHandler([e,t].concat(s)):{...t}).lng=a.lng||o.lng,a.lngs=a.lngs||o.lngs;let l=void 0!==a.ns&&null!==a.ns;a.ns=a.ns||o.ns,""!==a.keyPrefix&&(a.keyPrefix=a.keyPrefix||i||o.keyPrefix);let h={...this.options,...a};Array.isArray(r)&&!l&&(h.ns=r),"function"==typeof a.keyPrefix&&(a.keyPrefix=$(a.keyPrefix,h));let u=this.options.keySeparator||".";return a.keyPrefix&&Array.isArray(e)?n=e.map(e=>("function"==typeof e&&(e=$(e,h)),`${a.keyPrefix}${u}${e}`)):("function"==typeof e&&(e=$(e,h)),n=a.keyPrefix?`${a.keyPrefix}${u}${e}`:e),this.t(n,a)};return s(e)?o.lng=e:o.lngs=e,o.ns=t,o.keyPrefix=i,o}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;
1if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;let s=t.lng||this.resolvedLanguage||this.languages[0],i=!!this.options&&this.options.fallbackLng,a=this.languages[this.languages.length-1];if("cimode"===s.toLowerCase())return!0;let r=(e,t)=>{let s=this.services.backendConnector.state[`${e}|${t}`];return -1===s||0===s||2===s};if(t.precheck){let e=t.precheck(this,r);if(void 0!==e)return e}return!!(this.hasResourceBundle(s,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||r(s,e)&&(!i||r(a,e)))}loadNamespaces(e,t){let a=i();return this.options.ns?(s(e)&&(e=[e]),e.forEach(e=>{this.options.ns.includes(e)||this.options.ns.push(e)}),this.loadResources(e=>{a.resolve(),t&&t(e)}),a):(t&&t(),Promise.resolve())}loadLanguages(e,t){let a=i();s(e)&&(e=[e]);let r=this.options.preload||[],o=e.filter(e=>!r.includes(e)&&this.services.languageUtils.isSupportedCode(e));return o.length?(this.options.preload=r.concat(o),this.loadResources(e=>{a.resolve(),t&&t(e)}),a):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!e)return"rtl";try{let t=new Intl.Locale(e);if(t&&t.getTextInfo){let e=t.getTextInfo();if(e&&e.direction)return e.direction}}catch(e){}let t=this.services?.languageUtils||new C(A());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){let s=new H(e,t);return s.createInstance=H.createInstance,s}cloneInstance(e={},t=U){let s=e.forkResourceStore;s&&delete e.forkResourceStore;let i={...this.options,...e,isClone:!0},a=new H(i);if((void 0!==e.debug||void 0!==e.prefix)&&(a.logger=a.logger.clone(e)),["store","services","language"].forEach(e=>{a[e]=this[e]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},s&&(a.store=new x(Object.keys(this.store.data).reduce((e,t)=>(e[t]={...this.store.data[t]},e[t]=Object.keys(e[t]).reduce((s,i)=>(s[i]={...e[t][i]},s),e[t]),e),{}),i),a.services.resourceStore=a.store),e.interpolation){let t={...A().interpolation,...this.options.interpolation,...e.interpolation},s={...i,interpolation:t};a.services.interpolator=new F(s)}return a.translator=new R(a.services,i),a.translator.on("*",(e,...t)=>{a.emit(e,...t)}),a.init(i,t),a.translator.options=i,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}let M=H.createInstance(),B=M.createInstance;M.dir,M.init,M.loadResources,M.reloadResources,M.use,M.changeLanguage,M.getFixedT,M.t,M.exists,M.setDefaultNamespace,M.hasLoadedNamespace,M.loadNamespaces,M.loadLanguages,e.i(785269);var z=e.i(200071);e.i(345771);var J=e.i(322831),_=e.i(402607),q=e.i(618566),W=e.i(843476);e.s(["I18nProvider",0,function({children:e,language:s,resources:i,supportedLngs:a,defaultNS:r="common",fallbackLng:o,localePath:n="/locales",localeStructure:l="{{lng}}/{{ns}}",localeExtension:h="json",use:u=[],i18nextOptions:p={}}){let[g]=(0,t.useState)(()=>{var e;let t=B();t.use(_.initReactI18next);let g=u.some(e=>"backend"===e.type),c=i?new Set(Object.values(i).flatMap(e=>Object.keys(e))):new Set,d=c.size>0?[...c]:[r];g||t.use((e=(e,t)=>c.has(t)?{}:fetch(`${n}/${l.replace("{{lng}}",e).replace("{{ns}}",t)}.${h}`).then(e=>e.ok?e.json():{}),{type:"backend",init:function(e,t,s){},read:function(t,s,i){!0;if(e.length<3){try{var a=e(t,s);a&&"function"==typeof a.then?a.then(function(e){return i(null,e&&e.default||e)}).catch(i):i(null,a)}catch(e){i(e)}return}e(t,s)}}
1)),u.forEach(e=>t.use(e));let f=g||!i;return t.init({lng:s,resources:i,ns:d,partialBundledLanguages:f,defaultNS:r,fallbackLng:o??s,supportedLngs:a??(i?Object.keys(i):[s]),fallbackNS:r,interpolation:{escapeValue:!1},react:{useSuspense:!1},...p}),t});return(0,t.useEffect)(()=>{g.language!==s&&g.changeLanguage(s)},[g,s]),(0,W.jsx)(z.I18nextProvider,{i18n:g,children:e})},"useChangeLanguage",0,function(e="i18next"){let{i18n:s}=(0,J.useTranslation)(),i=(0,q.useRouter)();return(0,t.useCallback)(async t=>{document.cookie=`${e}=${t};path=/;max-age=31536000;SameSite=Lax`,await s.changeLanguage(t),i.refresh()},[s,i,e])},"useT",0,function(e,s){let i=(0,q.useParams)(),a="string"==typeof i?.lng?i.lng:"string"==typeof i?.locale?i.locale:void 0,r=(0,J.useTranslation)(e,s);return(0,t.useEffect)(()=>{a&&r.i18n.resolvedLanguage!==a&&r.i18n.changeLanguage(a)},[a,r.i18n]),r}],657563)}]); 2 3//# sourceMappingURL=06z_gzitnevl0.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.