(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,645141,e=>{"use strict";let t={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}};class n{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.init(e,t)}init(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=e||t,this.options=n,this.debug=n.debug}log(){for(var e=arguments.length,t=Array(e),n=0;n{this.observers[e]=this.observers[e]||[],this.observers[e].push(t)}),this}off(e,t){if(this.observers[e]){if(!t)return void delete this.observers[e];this.observers[e]=this.observers[e].filter(e=>e!==t)}}emit(e){for(var t=arguments.length,n=Array(t>1?t-1:0),i=1;i{e(...n)}),this.observers["*"]&&[].concat(this.observers["*"]).forEach(t=>{t.apply(t,[e,...n])})}}function r(){let e,t,n=new Promise((n,i)=>{e=n,t=i});return n.resolve=e,n.reject=t,n}function o(e){return null==e?"":""+e}function a(e,t,n){function i(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e}function s(){return!e||"string"==typeof e}let r="string"!=typeof t?[].concat(t):t.split(".");for(;r.length>1;){if(s())return{};let t=i(r.shift());!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{}}return s()?{}:{obj:e,k:i(r.shift())}}function l(e,t,n){let{obj:i,k:s}=a(e,t,Object);i[s]=n}function u(e,t){let{obj:n,k:i}=a(e,t);if(n)return n[i]}function c(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var p={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function g(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,e=>p[e]):e}let h=[" ",",","?","!",";"];function f(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(!e)return;if(e[t])return e[t];let i=t.split(n),s=e;for(let e=0;ee+r;)r++,a=s[o=i.slice(e,e+r).join(n)];if(void 0===a)return;if(null===a)return null;if(t.endsWith(o)){if("string"==typeof a)return a;if(o&&"string"==typeof a[o])return a[o]}let l=i.slice(e+r).join(n);if(l)return f(a,l,n);return}s=s[i[e]]}return s}function d(e){return e&&e.indexOf("_")>0?e.replace("_","-"):e}class m extends s{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{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){0>this.options.ns.indexOf(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,n){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},s=void 0!==i.keySeparator?i.keySeparator:this.options.keySeparator,r=void 0!==i.ignoreJSONStructure?i.ignoreJSONStructure:this.options.ignoreJSONStructure,o=[e,t];n&&"string"!=typeof n&&(o=o.concat(n)),n&&"string"==typeof n&&(o=o.concat(s?n.split(s):n)),e.indexOf(".")>-1&&(o=e.split("."));let a=u(this.data,o);return a||!r||"string"!=typeof n?a:f(this.data&&this.data[e]&&this.data[e][t],n,s)}addResource(e,t,n,i){let s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},r=void 0!==s.keySeparator?s.keySeparator:this.options.keySeparator,o=[e,t];n&&(o=o.concat(r?n.split(r):n)),e.indexOf(".")>-1&&(o=e.split("."),i=t,t=o[1]),this.addNamespaces(t),l(this.data,o,i),s.silent||this.emit("added",e,t,n,i)}addResources(e,t,n){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(let i in n)("string"==typeof n[i]||"[object Array]"===Object.prototype.toString.apply(n[i]))&&this.addResource(e,t,i,n[i],{silent:!0});i.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,i,s){let r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},o=[e,t];e.indexOf(".")>-1&&(o=e.split("."),i=n,n=t,t=o[1]),this.addNamespaces(t);let a=u(this.data,o)||{};i?function e(t,n,i){for(let s in n)"__proto__"!==s&&"constructor"!==s&&(s in t?"string"==typeof t[s]||t[s]instanceof String||"string"==typeof n[s]||n[s]instanceof String?i&&(t[s]=n[s]):e(t[s],n[s],i):t[s]=n[s]);return t}(a,n,s):a={...a,...n},l(this.data,o,a),r.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),"v1"===this.options.compatibilityAPI)?{...this.getResource(e,t)}: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 y={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,i,s){return e.forEach(e=>{this.processors[e]&&(t=this.processors[e].process(t,n,i,s))}),t}};let v={};class b extends s{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(),function(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=i.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(null==e)return!1;let n=this.resolve(e,t);return n&&void 0!==n.res}extractFromKey(e,t){let n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");let i=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,s=t.ns||this.options.defaultNS||[],r=n&&e.indexOf(n)>-1,o=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!function(e,t,n){t=t||"",n=n||"";let i=h.filter(e=>0>t.indexOf(e)&&0>n.indexOf(e));if(0===i.length)return!0;let s=RegExp(`(${i.map(e=>"?"===e?"\\?":e).join("|")})`),r=!s.test(e);if(!r){let t=e.indexOf(n);t>0&&!s.test(e.substring(0,t))&&(r=!0)}return r}(e,n,i);if(r&&!o){let t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:s};let r=e.split(n);(n!==i||n===i&&this.options.ns.indexOf(r[0])>-1)&&(s=r.shift()),e=r.join(i)}return"string"==typeof s&&(s=[s]),{key:e,namespaces:s}}translate(e,t,n){if("object"!=typeof t&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof t&&(t={...t}),t||(t={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);let i=void 0!==t.returnDetails?t.returnDetails:this.options.returnDetails,s=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,{key:r,namespaces:o}=this.extractFromKey(e[e.length-1],t),a=o[o.length-1],l=t.lng||this.language,u=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(l&&"cimode"===l.toLowerCase()){if(u){let e=t.nsSeparator||this.options.nsSeparator;return i?{res:`${a}${e}${r}`,usedKey:r,exactUsedKey:r,usedLng:l,usedNS:a}:`${a}${e}${r}`}return i?{res:r,usedKey:r,exactUsedKey:r,usedLng:l,usedNS:a}:r}let c=this.resolve(e,t),p=c&&c.res,g=c&&c.usedKey||r,h=c&&c.exactUsedKey||r,f=Object.prototype.toString.apply(p),d=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,m=!this.i18nFormat||this.i18nFormat.handleAsObject,y="string"!=typeof p&&"boolean"!=typeof p&&"number"!=typeof p;if(m&&p&&y&&0>["[object Number]","[object Function]","[object RegExp]"].indexOf(f)&&("string"!=typeof d||"[object Array]"!==f)){if(!t.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(g,p,{...t,ns:o}):`key '${r} (${this.language})' returned an object instead of string.`;return i?(c.res=e,c):e}if(s){let e="[object Array]"===f,n=e?[]:{},i=e?h:g;for(let e in p)if(Object.prototype.hasOwnProperty.call(p,e)){let r=`${i}${s}${e}`;n[e]=this.translate(r,{...t,joinArrays:!1,ns:o}),n[e]===r&&(n[e]=p[e])}p=n}}else if(m&&"string"==typeof d&&"[object Array]"===f)(p=p.join(d))&&(p=this.extendTranslation(p,e,t,n));else{let i=!1,o=!1,u=void 0!==t.count&&"string"!=typeof t.count,g=b.hasDefaultValue(t),h=u?this.pluralResolver.getSuffix(l,t.count,t):"",f=t.ordinal&&u?this.pluralResolver.getSuffix(l,t.count,{ordinal:!1}):"",d=t[`defaultValue${h}`]||t[`defaultValue${f}`]||t.defaultValue;!this.isValidLookup(p)&&g&&(i=!0,p=d),this.isValidLookup(p)||(o=!0,p=r);let m=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&o?void 0:p,y=g&&d!==p&&this.options.updateMissing;if(o||i||y){if(this.logger.log(y?"updateKey":"missingKey",l,a,r,y?d:p),s){let e=this.resolve(r,{...t,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=[],n=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&n&&n[0])for(let t=0;t{let s=g&&i!==p?i:m;this.options.missingKeyHandler?this.options.missingKeyHandler(e,a,n,s,y,t):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(e,a,n,s,y,t),this.emit("missingKey",e,a,n,p)};this.options.saveMissing&&(this.options.saveMissingPlurals&&u?e.forEach(e=>{this.pluralResolver.getSuffixes(e,t).forEach(n=>{i([e],r+n,t[`defaultValue${n}`]||d)})}):i(e,r,d))}p=this.extendTranslation(p,e,t,c,n),o&&p===r&&this.options.appendNamespaceToMissingKey&&(p=`${a}:${r}`),(o||i)&&this.options.parseMissingKeyHandler&&(p="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${a}:${r}`:r,i?p:void 0):this.options.parseMissingKeyHandler(p))}return i?(c.res=p,c):p}extendTranslation(e,t,n,i,s){var r=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!n.skipInterpolation){let o;n.interpolation&&this.interpolator.init({...n,...{interpolation:{...this.options.interpolation,...n.interpolation}}});let a="string"==typeof e&&(n&&n.interpolation&&void 0!==n.interpolation.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);if(a){let t=e.match(this.interpolator.nestingRegexp);o=t&&t.length}let l=n.replace&&"string"!=typeof 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,n),a){let t=e.match(this.interpolator.nestingRegexp);o<(t&&t.length)&&(n.nest=!1)}!n.lng&&"v1"!==this.options.compatibilityAPI&&i&&i.res&&(n.lng=i.usedLng),!1!==n.nest&&(e=this.interpolator.nest(e,function(){for(var e=arguments.length,i=Array(e),o=0;o1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach(e=>{if(this.isValidLookup(t))return;let a=this.extractFromKey(e,o),l=a.key;n=l;let u=a.namespaces;this.options.fallbackNS&&(u=u.concat(this.options.fallbackNS));let c=void 0!==o.count&&"string"!=typeof o.count,p=c&&!o.ordinal&&0===o.count&&this.pluralResolver.shouldUseIntlApi(),g=void 0!==o.context&&("string"==typeof o.context||"number"==typeof o.context)&&""!==o.context,h=o.lngs?o.lngs:this.languageUtils.toResolveHierarchy(o.lng||this.language,o.fallbackLng);u.forEach(e=>{this.isValidLookup(t)||(r=e,!v[`${h[0]}-${e}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(r)&&(v[`${h[0]}-${e}`]=!0,this.logger.warn(`key "${n}" for languages "${h.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!!!")),h.forEach(n=>{let r;if(this.isValidLookup(t))return;s=n;let a=[l];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(a,l,n,e,o);else{let e;c&&(e=this.pluralResolver.getSuffix(n,o.count,o));let t=`${this.options.pluralSeparator}zero`,i=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(c&&(a.push(l+e),o.ordinal&&0===e.indexOf(i)&&a.push(l+e.replace(i,this.options.pluralSeparator)),p&&a.push(l+t)),g){let n=`${l}${this.options.contextSeparator}${o.context}`;a.push(n),c&&(a.push(n+e),o.ordinal&&0===e.indexOf(i)&&a.push(n+e.replace(i,this.options.pluralSeparator)),p&&a.push(n+t))}}for(;r=a.pop();)this.isValidLookup(t)||(i=r,t=this.getResource(n,e,r,o))}))})}),{res:t,usedKey:n,exactUsedKey:i,usedLng:s,usedNS:r}}isValidLookup(e){return void 0!==e&&!(!this.options.returnNull&&null===e)&&!(!this.options.returnEmptyString&&""===e)}getResource(e,t,n){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,i):this.resourceStore.getResource(e,t,n,i)}static hasDefaultValue(e){let t="defaultValue";for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,t.length)&&void 0!==e[n])return!0;return!1}}function x(e){return e.charAt(0).toUpperCase()+e.slice(1)}class S{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=i.create("languageUtils")}getScriptPartFromCode(e){if(!(e=d(e))||0>e.indexOf("-"))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=d(e))||0>e.indexOf("-"))return e;let t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if("string"==typeof e&&e.indexOf("-")>-1){let t=["hans","hant","latn","cyrl","cans","mong","arab"],n=e.split("-");return this.options.lowerCaseLng?n=n.map(e=>e.toLowerCase()):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=x(n[1].toLowerCase()))):3===n.length&&(n[0]=n[0].toLowerCase(),2===n[1].length&&(n[1]=n[1].toUpperCase()),"sgn"!==n[0]&&2===n[2].length&&(n[2]=n[2].toUpperCase()),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=x(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=x(n[2].toLowerCase()))),n.join("-")}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.indexOf(e)>-1}getBestMatchFromCodes(e){let t;return e?(e.forEach(e=>{if(t)return;let n=this.formatLanguageCode(e);(!this.options.supportedLngs||this.isSupportedCode(n))&&(t=n)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;let n=this.getLanguagePartFromCode(e);if(this.isSupportedCode(n))return t=n;t=this.options.supportedLngs.find(e=>{if(e===n||!(0>e.indexOf("-")&&0>n.indexOf("-"))&&0===e.indexOf(n))return e})}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null}getFallbackCodes(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),"string"==typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(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){let n=this.getFallbackCodes(t||this.options.fallbackLng||[],e),i=[],s=e=>{e&&(this.isSupportedCode(e)?i.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return"string"==typeof e&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&s(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&s(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&s(this.getLanguagePartFromCode(e))):"string"==typeof e&&s(this.formatLanguageCode(e)),n.forEach(e=>{0>i.indexOf(e)&&s(this.formatLanguageCode(e))}),i}}let O=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],k={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(+(1!=e&&(e%10!=1||e%100==11)))},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0==e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:3*(e%100==3||e%100==4))},22:function(e){return Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)}},L=["v1","v2","v3"],w=["v4"],N={zero:0,one:1,two:2,few:3,many:4,other:5};class C{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=i.create("pluralResolver"),(!this.options.compatibilityJSON||w.includes(this.options.compatibilityJSON))&&("u"{t.lngs.forEach(n=>{e[n]={numbers:t.nr,plurals:k[t.fc]}})}),e}()}addRule(e,t){this.rules[e]=t}getRule(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(d(e),{type:t.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getRule(e,t);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}getPluralFormsOfKey(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,n).map(e=>`${t}${e}`)}getSuffixes(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getRule(e,t);return n?this.shouldUseIntlApi()?n.resolvedOptions().pluralCategories.sort((e,t)=>N[e]-N[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`):n.numbers.map(n=>this.getSuffix(e,n,t)):[]}getSuffix(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=this.getRule(e,n);return i?this.shouldUseIntlApi()?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i.select(t)}`:this.getSuffixRetroCompatible(i,t):(this.logger.warn(`no plural rule found for: ${e}`),"")}getSuffixRetroCompatible(e,t){let n=e.noAbs?e.plurals(t):e.plurals(Math.abs(t)),i=e.numbers[n];this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]&&(2===i?i="plural":1===i&&(i=""));let s=()=>this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString();return"v1"===this.options.compatibilityJSON?1===i?"":"number"==typeof i?`_plural_${i.toString()}`:s():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]?s():this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString()}shouldUseIntlApi(){return!L.includes(this.options.compatibilityJSON)}}function R(e,t,n){let i,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:".",r=!(arguments.length>4)||void 0===arguments[4]||arguments[4],o=void 0!==(i=u(e,n))?i:u(t,n);return!o&&r&&"string"==typeof n&&void 0===(o=f(e,n,s))&&(o=f(t,n,s)),o}class j{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=i.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||(e=>e),this.init(e)}init(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});let t=e.interpolation;this.escape=void 0!==t.escape?t.escape:g,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?c(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?c(t.suffix):t.suffixEscaped||"}}",this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||",",this.unescapePrefix=t.unescapeSuffix?"":t.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":t.unescapeSuffix||"",this.nestingPrefix=t.nestingPrefix?c(t.nestingPrefix):t.nestingPrefixEscaped||c("$t("),this.nestingSuffix=t.nestingSuffix?c(t.nestingSuffix):t.nestingSuffixEscaped||c(")"),this.nestingOptionsSeparator=t.nestingOptionsSeparator?t.nestingOptionsSeparator:t.nestingOptionsSeparator||",",this.maxReplaces=t.maxReplaces?t.maxReplaces:1e3,this.alwaysFormat=void 0!==t.alwaysFormat&&t.alwaysFormat,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){let e=`${this.prefix}(.+?)${this.suffix}`;this.regexp=RegExp(e,"g");let t=`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`;this.regexpUnescape=RegExp(t,"g");let n=`${this.nestingPrefix}(.+?)${this.nestingSuffix}`;this.nestingRegexp=RegExp(n,"g")}interpolate(e,t,n,i){let s,r,a,l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function u(e){return e.replace(/\$/g,"$$$$")}let c=e=>{if(0>e.indexOf(this.formatSeparator)){let s=R(t,l,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(s,void 0,n,{...i,...t,interpolationkey:e}):s}let s=e.split(this.formatSeparator),r=s.shift().trim(),o=s.join(this.formatSeparator).trim();return this.format(R(t,l,r,this.options.keySeparator,this.options.ignoreJSONStructure),o,n,{...i,...t,interpolationkey:r})};this.resetRegExp();let p=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,g=i&&i.interpolation&&void 0!==i.interpolation.skipOnVariables?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>u(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?u(this.escape(e)):u(e)}].forEach(t=>{for(a=0;s=t.regex.exec(e);){let n=s[1].trim();if(void 0===(r=c(n)))if("function"==typeof p){let t=p(e,s,i);r="string"==typeof t?t:""}else if(i&&Object.prototype.hasOwnProperty.call(i,n))r="";else if(g){r=s[0];continue}else this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),r="";else"string"==typeof r||this.useRawValueToEscape||(r=o(r));let l=t.safeValue(r);if(e=e.replace(s[0],l),g?(t.regex.lastIndex+=r.length,t.regex.lastIndex-=s[0].length):t.regex.lastIndex=0,++a>=this.maxReplaces)break}}),e}nest(e,t){let n,i,s,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};function a(e,t){let n=this.nestingOptionsSeparator;if(0>e.indexOf(n))return e;let i=e.split(RegExp(`${n}[ ]*{`)),r=`{${i[1]}`;e=i[0];let o=(r=this.interpolate(r,s)).match(/'/g),a=r.match(/"/g);(o&&o.length%2==0&&!a||a.length%2!=0)&&(r=r.replace(/'/g,'"'));try{s=JSON.parse(r),t&&(s={...t,...s})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${r}`}return delete s.defaultValue,e}for(;n=this.nestingRegexp.exec(e);){let l=[];(s=(s={...r}).replace&&"string"!=typeof s.replace?s.replace:s).applyPostProcessor=!1,delete s.defaultValue;let u=!1;if(-1!==n[0].indexOf(this.formatSeparator)&&!/{.*}/.test(n[1])){let e=n[1].split(this.formatSeparator).map(e=>e.trim());n[1]=e.shift(),l=e,u=!0}if((i=t(a.call(this,n[1].trim(),s),s))&&n[0]===e&&"string"!=typeof i)return i;"string"!=typeof i&&(i=o(i)),i||(this.logger.warn(`missed to resolve ${n[1]} for nesting ${e}`),i=""),u&&(i=l.reduce((e,t)=>this.format(e,t,r.lng,{...r,interpolationkey:n[1].trim()}),i.trim())),e=e.replace(n[0],i),this.regexp.lastIndex=0}return e}}function P(e){let t={};return function(n,i,s){let r=i+JSON.stringify(s),o=t[r];return o||(o=e(i,s),t[r]=o),o(n)}}class ${constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=i.create("formatter"),this.options=e,this.formats={number:P((e,t)=>{let n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)}),currency:P((e,t)=>{let n=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>n.format(e)}),datetime:P((e,t)=>{let n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)}),relativetime:P((e,t)=>{let n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||"day")}),list:P((e,t)=>{let n=new Intl.ListFormat(e,{...t});return e=>n.format(e)})},this.init(e)}init(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},n=t.interpolation;this.formatSeparator=n.formatSeparator?n.formatSeparator:n.formatSeparator||","}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=P(t)}format(e,t,n){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return t.split(this.formatSeparator).reduce((e,t)=>{let{formatName:s,formatOptions:r}=function(e){let t=e.toLowerCase().trim(),n={};if(e.indexOf("(")>-1){let i=e.split("(");t=i[0].toLowerCase().trim();let s=i[1].substring(0,i[1].length-1);"currency"===t&&0>s.indexOf(":")?n.currency||(n.currency=s.trim()):"relativetime"===t&&0>s.indexOf(":")?n.range||(n.range=s.trim()):s.split(";").forEach(e=>{if(!e)return;let[t,...i]=e.split(":"),s=i.join(":").trim().replace(/^'+|'+$/g,"");n[t.trim()]||(n[t.trim()]=s),"false"===s&&(n[t.trim()]=!1),"true"===s&&(n[t.trim()]=!0),isNaN(s)||(n[t.trim()]=parseInt(s,10))})}return{formatName:t,formatOptions:n}}(t);if(this.formats[s]){let t=e;try{let o=i&&i.formatParams&&i.formatParams[i.interpolationkey]||{},a=o.locale||o.lng||i.locale||i.lng||n;t=this.formats[s](e,a,{...r,...i,...o})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${s}`),e},e)}}class I extends s{constructor(e,t,n){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=s,this.logger=i.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=s.maxParallelReads||10,this.readingCalls=0,this.maxRetries=s.maxRetries>=0?s.maxRetries:5,this.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(n,s.backend,s)}queueLoad(e,t,n,i){let s={},r={},o={},a={};return e.forEach(e=>{let i=!0;t.forEach(t=>{let o=`${e}|${t}`;!n.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===s[o]&&(s[o]=!0),void 0===a[t]&&(a[t]=!0)))}),i||(o[e]=!0)}),(Object.keys(s).length||Object.keys(r).length)&&this.queue.push({pending:r,pendingCount:Object.keys(r).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(s),pending:Object.keys(r),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(a)}}loaded(e,t,n){let i=e.split("|"),s=i[0],r=i[1];t&&this.emit("failedLoading",s,r,t),n&&this.store.addResourceBundle(s,r,n),this.state[e]=t?-1:2;let o={};this.queue.forEach(n=>{!function(e,t,n,i){let{obj:s,k:r}=a(e,t,Object);s[r]=s[r]||[],s[r].push(n)}(n.loaded,[s],r),void 0!==n.pending[e]&&(delete n.pending[e],n.pendingCount--),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach(e=>{o[e]||(o[e]={});let t=n.loaded[e];t.length&&t.forEach(t=>{void 0===o[e][t]&&(o[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit("loaded",o),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,r=arguments.length>5?arguments[5]:void 0;if(!e.length)return r(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:t,fcName:n,tried:i,wait:s,callback:r});this.readingCalls++;let o=(o,a)=>{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&&a&&i{this.read.call(this,e,t,n,i+1,2*s,r)},s):r(o,a)},a=this.backend[n].bind(this.backend);if(2===a.length){try{let n=a(e,t);n&&"function"==typeof n.then?n.then(e=>o(null,e)).catch(o):o(null,n)}catch(e){o(e)}return}return a(e,t,o)}prepareLoading(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);let s=this.queueLoad(e,t,n,i);if(!s.toLoad.length)return s.pending.length||i(),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){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=e.split("|"),i=n[0],s=n[1];this.read(i,s,"read",void 0,void 0,(n,r)=>{n&&this.logger.warn(`${t}loading namespace ${s} for language ${i} failed`,n),!n&&r&&this.logger.log(`${t}loaded namespace ${s} for language ${i}`,r),this.loaded(e,n,r)})}saveMissing(e,t,n,i,s){let r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t))return void 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!!!");if(null!=n&&""!==n){if(this.backend&&this.backend.create){let a={...r,isUpdate:s},l=this.backend.create.bind(this.backend);if(l.length<6)try{let s;(s=5===l.length?l(e,t,n,i,a):l(e,t,n,i))&&"function"==typeof s.then?s.then(e=>o(null,e)).catch(o):o(null,s)}catch(e){o(e)}else l(e,t,n,i,o,a)}e&&e[0]&&this.store.addResource(e[0],t,n,i)}}}function E(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",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:function(e){let t={};if("object"==typeof e[1]&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){let n=e[3]||e[2];Object.keys(n).forEach(e=>{t[e]=n[e]})}return t},interpolation:{escapeValue:!0,format:(e,t,n,i)=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function F(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&0>e.supportedLngs.indexOf("cimode")&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function T(){}class A extends s{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if(super(),this.options=F(e),this.services={},this.logger=i,this.modules={external:[]},!function(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.initImmediate)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(){var e=this;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;"function"==typeof t&&(n=t,t={}),!t.defaultNS&&!1!==t.defaultNS&&t.ns&&("string"==typeof t.ns?t.defaultNS=t.ns:0>t.ns.indexOf("translation")&&(t.defaultNS=t.ns[0]));let s=E();function o(e){return e?"function"==typeof e?new e:e:null}if(this.options={...s,...this.options,...F(t)},"v1"!==this.options.compatibilityAPI&&(this.options.interpolation={...s.interpolation,...this.options.interpolation}),void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator),!this.options.isClone){let t;this.modules.logger?i.init(o(this.modules.logger),this.options):i.init(null,this.options),this.modules.formatter?t=this.modules.formatter:"u">typeof Intl&&(t=$);let n=new S(this.options);this.store=new m(this.options.resources,this.options);let r=this.services;r.logger=i,r.resourceStore=this.store,r.languageUtils=n,r.pluralResolver=new C(n,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),t&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)&&(r.formatter=o(t),r.formatter.init(r,this.options),this.options.interpolation.format=r.formatter.format.bind(r.formatter)),r.interpolator=new j(this.options),r.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},r.backendConnector=new I(o(this.modules.backend),r.resourceStore,r,this.options),r.backendConnector.on("*",function(t){for(var n=arguments.length,i=Array(n>1?n-1:0),s=1;s1?n-1:0),s=1;s{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,n||(n=T),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(t=>{this[t]=function(){return e.store[t](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(t=>{this[t]=function(){return e.store[t](...arguments),e}});let a=r(),l=()=>{let e=(e,t)=>{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),a.resolve(t),n(e,t)};if(this.languages&&"v1"!==this.options.compatibilityAPI&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initImmediate?l():setTimeout(l,0),a}loadResources(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:T,n=t,i="string"==typeof e?e:this.language;if("function"==typeof e&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(i&&"cimode"===i.toLowerCase())return n();let e=[],t=t=>{t&&this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{0>e.indexOf(t)&&e.push(t)})};i?t(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e)),this.options.preload&&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){let i=r();return e||(e=this.languages),t||(t=this.options.ns),n||(n=T),this.services.backendConnector.reload(e,t,e=>{i.resolve(),n(e)}),i}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&&y.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"].indexOf(e)>-1))for(let e=0;e-1)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}}changeLanguage(e,t){var n=this;this.isLanguageChangingTo=e;let i=r();this.emit("languageChanging",e);let s=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},o=(e,r)=>{r?(s(r),this.translator.changeLanguage(r),this.isLanguageChangingTo=void 0,this.emit("languageChanged",r),this.logger.log("languageChanged",r)):this.isLanguageChangingTo=void 0,i.resolve(function(){return n.t(...arguments)}),t&&t(e,function(){return n.t(...arguments)})},a=t=>{e||t||!this.services.languageDetector||(t=[]);let n="string"==typeof t?t:this.services.languageUtils.getBestMatchFromCodes(t);n&&(this.language||s(n),this.translator.language||this.translator.changeLanguage(n),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(n)),this.loadResources(n,e=>{o(e,n)})};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(a):this.services.languageDetector.detect(a):a(e):a(this.services.languageDetector.detect()),i}getFixedT(e,t,n){var i=this;let s=function(e,t){let r,o;if("object"!=typeof t){for(var a=arguments.length,l=Array(a>2?a-2:0),u=2;u`${r.keyPrefix}${c}${e}`):r.keyPrefix?`${r.keyPrefix}${c}${e}`:e,i.t(o,r)};return"string"==typeof e?s.lng=e:s.lngs=e,s.ns=t,s.keyPrefix=n,s}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};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;let n=t.lng||this.resolvedLanguage||this.languages[0],i=!!this.options&&this.options.fallbackLng,s=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;let r=(e,t)=>{let n=this.services.backendConnector.state[`${e}|${t}`];return -1===n||2===n};if(t.precheck){let e=t.precheck(this,r);if(void 0!==e)return e}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||r(n,e)&&(!i||r(s,e)))}loadNamespaces(e,t){let n=r();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach(e=>{0>this.options.ns.indexOf(e)&&this.options.ns.push(e)}),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){let n=r();"string"==typeof e&&(e=[e]);let i=this.options.preload||[],s=e.filter(e=>0>i.indexOf(e));return s.length?(this.options.preload=i.concat(s),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){return(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),e)?["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"].indexOf((this.services&&this.services.languageUtils||new S(E())).getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr":"rtl"}static createInstance(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new A(e,t)}cloneInstance(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:T,n=e.forkResourceStore;n&&delete e.forkResourceStore;let i={...this.options,...e,isClone:!0},s=new A(i);return(void 0!==e.debug||void 0!==e.prefix)&&(s.logger=s.logger.clone(e)),["store","services","language"].forEach(e=>{s[e]=this[e]}),s.services={...this.services},s.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},n&&(s.store=new m(this.store.data,i),s.services.resourceStore=s.store),s.translator=new b(s.services,i),s.translator.on("*",function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),i=1;iV])},211577,410160,394257,e=>{"use strict";function t(e){return(t="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})(e)}function n(e){var n=function(e,n){if("object"!=t(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var s=i.call(e,n||"default");if("object"!=t(s))return s;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(e,"string");return"symbol"==t(n)?n:n+""}function i(e,t,i){return(t=n(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}e.s(["default",()=>t],410160),e.s(["default",()=>n],394257),e.s(["default",()=>i],211577)},915874,e=>{"use strict";function t(e,t){if(null==e)return{};var n={};for(var i in e)if(({}).hasOwnProperty.call(e,i)){if(-1!==t.indexOf(i))continue;n[i]=e[i]}return n}e.s(["default",()=>t])},703923,e=>{"use strict";var t=e.i(915874);function n(e,n){if(null==e)return{};var i,s,r=(0,t.default)(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(s=0;sn])},2008,(e,t,n)=>{t.exports={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}},554934,529894,305706,596043,e=>{"use strict";var t,n=e.i(703923),i=e.i(410160),s=e.i(211577),r=e.i(271645);function o(){if(console&&console.warn){for(var e,t=arguments.length,n=Array(t),i=0;ie.options.ns.indexOf(t)&&e.options.ns.push(t)}),e.loadLanguages(t,u(e,i))}function g(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t.languages&&t.languages.length?void 0===t.options.ignoreJSONStructure?function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=t.languages[0],s=!!t.options&&t.options.fallbackLng,r=t.languages[t.languages.length-1];if("cimode"===i.toLowerCase())return!0;var o=function(e,n){var i=t.services.backendConnector.state["".concat(e,"|").concat(n)];return -1===i||2===i};return(!(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1)||!t.services.backendConnector.backend||!t.isLanguageChangingTo||!!o(t.isLanguageChangingTo,e))&&!!(t.hasResourceBundle(i,e)||!t.services.backendConnector.backend||t.options.resources&&!t.options.partialBundledLanguages||o(i,e)&&(!s||o(r,e)))}(e,t,n):t.hasLoadedNamespace(e,{lng:n.lng,precheck:function(t,i){if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!i(t.isLanguageChangingTo,e))return!1}}):(l("i18n.languages were undefined or empty",t.languages),!0)}e.s(["hasLoadedNamespace",()=>g,"loadLanguages",()=>p,"loadNamespaces",()=>c,"warn",()=>o,"warnOnce",()=>l],529894);var h=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,f={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},d=function(e){return f[e]};function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function y(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};v=y(y({},v),e)}function x(){return v}function S(e){t=e}function O(){return t}e.s(["getDefaults",()=>x,"setDefaults",()=>b],305706),e.s(["getI18n",()=>O,"setI18n",()=>S],596043);var k=["format"];e.s(["nodesToString",()=>function e(t,s){if(!t)return"";var a="",l=Array.isArray(t)?t:[t],u=s.transSupportBasicHtmlNodes&&s.transKeepBasicHtmlNodesFor?s.transKeepBasicHtmlNodesFor:[];return l.forEach(function(t,l){if("string"==typeof t)a+="".concat(t);else if((0,r.isValidElement)(t)){var c=Object.keys(t.props).length,p=u.indexOf(t.type)>-1,g=t.props.children;if(!g&&p&&0===c)a+="<".concat(t.type,"/>");else if(g||p&&0===c)if(t.props.i18nIsDynamicList)a+="<".concat(l,">");else if(p&&1===c&&"string"==typeof g)a+="<".concat(t.type,">").concat(g,"");else{var h=e(g,s);a+="<".concat(l,">").concat(h,"")}else a+="<".concat(l,">")}else if(null===t)o("Trans: the passed in value is invalid - seems you passed in a null child.");else if("object"===(0,i.default)(t)){var f=t.format,d=Object.keys((0,n.default)(t,k));if(1===d.length){var m=f?"".concat(d[0],", ").concat(f):d[0];a+="{{".concat(m,"}}")}else o("react-i18next: the passed in object contained more than one variable - the object should look like {{ value, format }} where format is optional.",t)}else o("Trans: the passed in value is invalid - seems you passed in a variable like {number} - please pass in variables for interpolation as full objects like {{number}}.",t)}),a}],554934)},278409,233848,e=>{"use strict";function t(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}e.s(["default",()=>t],278409);var n=e.i(394257);function i(e,t){for(var i=0;is],233848)},345771,402607,746868,e=>{"use strict";e.i(211577),e.i(703923);var t=e.i(271645);e.i(554934);var n=e.i(278409),i=e.i(233848),s=e.i(305706),r=e.i(596043),o={type:"3rdParty",init:function(e){(0,s.setDefaults)(e.options.react),(0,r.setI18n)(e)}};e.s(["initReactI18next",()=>o],402607);var a=(0,t.createContext)(),l=function(){function e(){(0,n.default)(this,e),this.usedNamespaces={}}return(0,i.default)(e,[{key:"addUsedNamespaces",value:function(e){var t=this;e.forEach(function(e){t.usedNamespaces[e]||(t.usedNamespaces[e]=!0)})}},{key:"getUsedNamespaces",value:function(){return Object.keys(this.usedNamespaces)}}]),e}();e.s(["I18nContext",()=>a,"ReportNamespaces",()=>l],746868),e.s([],345771)},392221,949616,713882,e=>{"use strict";function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);ntypeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,s,r,o,a=[],l=!0,u=!1;try{if(r=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(i=r.call(n)).done)&&(a.push(i.value),a.length!==t);l=!0);}catch(e){u=!0,s=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw s}}return a}}(e,t)||n(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}e.s(["default",()=>t],949616),e.s(["default",()=>n],713882),e.s(["default",()=>i],392221)},202053,e=>{"use strict";var t=e.i(843476),n=e.i(271645);let i=(0,n.createContext)(null);function s({children:e,translations:s,locale:r,ns:o}){let a=(0,n.useMemo)(()=>({translations:s,locale:r,ns:o}),[r,o]);return(0,t.jsx)(i.Provider,{value:a,children:e})}e.s(["CustomI18nContext",0,i,"CustomI18nProvider",()=>s])},12346,e=>{"use strict";var t=e.i(645141),n=e.i(271645);e.i(345771),e.i(554934);var i=e.i(392221),s=e.i(211577),r=e.i(410160),o=e.i(746868),a=e.i(596043),l=e.i(305706),u=e.i(529894);function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function p(e){for(var t=1;t{let e=(0,n.useContext)(f.AppRouterI18nContext),s=(0,n.useContext)(d.CustomI18nContext),c=((e="common")=>{let t=(0,h.useAtomsContext)(),{i18n:s,t:c}=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=t.i18n,c=(0,n.useContext)(o.I18nContext)||{},h=c.i18n,f=c.defaultNS,d=s||h||(0,a.getI18n)();if(d&&!d.reportNamespaces&&(d.reportNamespaces=new o.ReportNamespaces),!d){(0,u.warnOnce)("You will need to pass in an i18next instance by using initReactI18next");var m=function(e,t){return"string"==typeof t?t:t&&"object"===(0,r.default)(t)&&"string"==typeof t.defaultValue?t.defaultValue:Array.isArray(e)?e[e.length-1]:e},y=[m,{},!1];return y.t=m,y.i18n={},y.ready=!1,y}d.options.react&&void 0!==d.options.react.wait&&(0,u.warnOnce)("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");var v=p(p(p({},(0,l.getDefaults)()),d.options.react),t),b=v.useSuspense,x=v.keyPrefix,S=e||f||d.options&&d.options.defaultNS;S="string"==typeof S?[S]:S||["translation"],d.reportNamespaces.addUsedNamespaces&&d.reportNamespaces.addUsedNamespaces(S);var O=(d.isInitialized||d.initializedStoreOnce)&&S.every(function(e){return(0,u.hasLoadedNamespace)(e,d,v)});function k(){return d.getFixedT(t.lng||null,"fallback"===v.nsMode?S:S[0],x)}var L=(0,n.useState)(k),w=(0,i.default)(L,2),N=w[0],C=w[1],R=S.join();t.lng&&(R="".concat(t.lng).concat(R));var j=g(R),P=(0,n.useRef)(!0);(0,n.useEffect)(function(){var e=v.bindI18n,n=v.bindI18nStore;function i(){P.current&&C(k)}return P.current=!0,O||b||(t.lng?(0,u.loadLanguages)(d,t.lng,S,function(){P.current&&C(k)}):(0,u.loadNamespaces)(d,S,function(){P.current&&C(k)})),O&&j&&j!==R&&P.current&&C(k),e&&d&&d.on(e,i),n&&d&&d.store.on(n,i),function(){P.current=!1,e&&d&&e.split(" ").forEach(function(e){return d.off(e,i)}),n&&d&&n.split(" ").forEach(function(e){return d.store.off(e,i)})}},[d,R]);var $=(0,n.useRef)(!0);(0,n.useEffect)(function(){P.current&&!$.current&&C(k),$.current=!1},[d,x]);var I=[N,d,O];if(I.t=N,I.i18n=d,I.ready=O,O||!O&&!b)return I;throw new Promise(function(e){t.lng?(0,u.loadLanguages)(d,t.lng,S,function(){return e()}):(0,u.loadNamespaces)(d,S,function(){return e()})})}(e),f=Object.keys(s).length>0;return t?.clientId?{i18n:t.i18n,t:t.t,isLocaleReady:!0}:{i18n:s,t:c,isLocaleReady:f}})();if(e){let{translations:n,locale:i,ns:r}=s??e,o=`${i}-${r}`;if(!m.has(o)){let e=(0,t.createInstance)();e.init({lng:i,resources:{[i]:{[r]:n}}}),m.set(o,{t:e.getFixedT(i,r),isLocaleReady:!0,i18n:e})}return m.get(o)}return console.warn("useLocale hook is being used outside of App Router - hence this hook will use a global, client-side i18n which can cause a small flicker"),{t:c.t,isLocaleReady:c.isLocaleReady,i18n:c.i18n}}],12346)}]); //# sourceMappingURL=26f4b10bcf823477.js.map