import{l as gt,q as C}from"./vendor-react-Br0ZiotI.js";const S=s=>typeof s=="string",ne=()=>{let s,e;const t=new Promise((n,i)=>{s=n,e=i});return t.resolve=s,t.reject=e,t},Pe=s=>s==null?"":String(s),mt=(s,e,t)=>{s.forEach(n=>{e[n]&&(t[n]=e[n])})},yt=/###/g,Re=s=>s&&s.includes("###")?s.replace(yt,"."):s,Te=s=>!s||S(s),ie=(s,e,t)=>{const n=S(e)?e.split("."):e;let i=0;for(;i<n.length-1;){if(Te(s))return{};const r=Re(n[i]);!s[r]&&t&&(s[r]=new t),Object.prototype.hasOwnProperty.call(s,r)?s=s[r]:s={},++i}return Te(s)?{}:{obj:s,k:Re(n[i])}},je=(s,e,t)=>{const{obj:n,k:i}=ie(s,e,Object);if(n!==void 0||e.length===1){n[i]=t;return}let r=e[e.length-1],a=e.slice(0,e.length-1),o=ie(s,a,Object);for(;o.obj===void 0&&a.length;)r=`${a[a.length-1]}.${r}`,a=a.slice(0,a.length-1),o=ie(s,a,Object),o!=null&&o.obj&&typeof o.obj[`${o.k}.${r}`]<"u"&&(o.obj=void 0);o.obj[`${o.k}.${r}`]=t},xt=(s,e,t,n)=>{const{obj:i,k:r}=ie(s,e,Object);i[r]=i[r]||[],i[r].push(t)},de=(s,e)=>{const{obj:t,k:n}=ie(s,e);if(t&&Object.prototype.hasOwnProperty.call(t,n))return t[n]},St=(s,e,t)=>{const n=de(s,t);return n!==void 0?n:de(e,t)},Ge=(s,e,t)=>{for(const n in e)n!=="__proto__"&&n!=="constructor"&&(n in s?S(s[n])||s[n]instanceof String||S(e[n])||e[n]instanceof String?t&&(s[n]=e[n]):Ge(s[n],e[n],t):s[n]=e[n]);return s},z=s=>s.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),bt={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},wt=s=>S(s)?s.replace(/[&<>"'\/]/g,e=>bt[e]):s;class vt{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(t!==void 0)return t;const n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}}const Lt=[" ",",","?","!",";"],Ot=new vt(20),Ct=(s,e,t)=>{e=e||"",t=t||"";const n=Lt.filter(a=>!e.includes(a)&&!t.includes(a));if(n.length===0)return!0;const i=Ot.getRegExp(`(${n.map(a=>a==="?"?"\\?":a).join("|")})`);let r=!i.test(s);if(!r){const a=s.indexOf(t);a>0&&!i.test(s.substring(0,a))&&(r=!0)}return r},ve=(s,e,t=".")=>{if(!s)return;if(s[e])return Object.prototype.hasOwnProperty.call(s,e)?s[e]:void 0;const n=e.split(t);let i=s;for(let r=0;r<n.length;){if(!i||typeof i!="object")return;let a,o="";for(let u=r;u<n.length;++u)if(u!==r&&(o+=t),o+=n[u],a=i[o],a!==void 0){if(["string","number","boolean"].includes(typeof a)&&u<n.length-1)continue;r+=u-r+1;break}i=a}return i},ae=s=>s==null?void 0:s.replace(/_/g,"-"),Et={type:"logger",log(s){this.output("log",s)},warn(s){this.output("warn",s)},error(s){this.output("error",s)},output(s,e){var t,n;(n=(t=console==null?void 0:console[s])==null?void 0:t.apply)==null||n.call(t,console,e)}};class he{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||"i18next:",this.logger=e||Et,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,"log","",!0)}warn(...e){return this.forward(e,"warn","",!0)}error(...e){return this.forward(e,"error","")}deprecate(...e){return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,n,i){return i&&!this.debug?null:(e=e.map(r=>S(r)?r.replace(/[\r\n\x00-\x1F\x7F]/g," "):r),S(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new he(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new he(this.logger,e)}}var _=new he;class me{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(n=>{this.observers[n]||(this.observers[n]=new Map);const i=this.observers[n].get(t)||0;this.observers[n].set(t,i+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}once(e,t){const n=(...i)=>{t(...i),this.off(e,n)};return this.on(e,n),this}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([i,r])=>{for(let a=0;a<r;a++)i(...t)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([i,r])=>{for(let a=0;a<r;a++)i(e,...t)})}}class Ae extends me{constructor(e,t={ns:["translation"],defaultNS:"translation"}){super(),this.data=e||{},this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.includes(e)||this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n,i={}){var l,c;const r=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,a=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let o;e.includes(".")?o=e.split("."):(o=[e,t],n&&(Array.isArray(n)?o.push(...n):S(n)&&r?o.push(...n.split(r)):o.push(n)));const u=de(this.data,o);return!u&&!t&&!n&&e.includes(".")&&(e=o[0],t=o[1],n=o.slice(2).join(".")),u||!a||!S(n)?u:ve((c=(l=this.data)==null?void 0:l[e])==null?void 0:c[t],n,r)}addResource(e,t,n,i,r={silent:!1}){const a=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator;let o=[e,t];n&&(o=o.concat(a?n.split(a):n)),e.includes(".")&&(o=e.split("."),i=t,t=o[1]),this.addNamespaces(t),je(this.data,o,i),r.silent||this.emit("added",e,t,n,i)}addResources(e,t,n,i={silent:!1}){for(const r in n)(S(n[r])||Array.isArray(n[r]))&&this.addResource(e,t,r,n[r],{silent:!0});i.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,i,r,a={silent:!1,skipCopy:!1}){let o=[e,t];e.includes(".")&&(o=e.split("."),i=n,n=t,t=o[1]),this.addNamespaces(t);let u=de(this.data,o)||{};a.skipCopy||(n=JSON.parse(JSON.stringify(n))),i?Ge(u,n,r):u={...u,...n},je(this.data,o,u),a.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 this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(i=>t[i]&&Object.keys(t[i]).length>0)}toJSON(){return this.data}}var Qe={processors:{},addPostProcessor(s){this.processors[s.name]=s},handle(s,e,t,n,i){return s.forEach(r=>{var a;e=((a=this.processors[r])==null?void 0:a.process(e,t,n,i))??e}),e}};const et=Symbol("i18next/PATH_KEY");function $t(){const s=[],e=Object.create(null);let t;return e.get=(n,i)=>{var r;return(r=t==null?void 0:t.revoke)==null||r.call(t),i===et?s:(s.push(i),t=Proxy.revocable(n,e),t.proxy)},Proxy.revocable(Object.create(null),e).proxy}function Y(s,e){const{[et]:t}=s($t()),n=(e==null?void 0:e.keySeparator)??".",i=(e==null?void 0:e.nsSeparator)??":",r=(e==null?void 0:e.enableSelector)==="strict";if(t.length>1&&i){const a=e==null?void 0:e.ns,o=r?Array.isArray(a)?a:a?[a]:null:Array.isArray(a)?a:null;if(o&&(r?o:o.length>1?o.slice(1):[]).includes(t[0]))return`${t[0]}${i}${t.slice(1).join(n)}`}return t.join(n)}const xe=s=>!S(s)&&typeof s!="boolean"&&typeof s!="number";class pe extends me{constructor(e,t={}){super(),mt(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=_.create("translator"),this.checkedLoadedFor={}}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){const n={...t};if(e==null)return!1;const i=this.resolve(e,n);if((i==null?void 0:i.res)===void 0)return!1;const r=xe(i.res);return!(n.returnObjects===!1&&r)}extractFromKey(e,t){let n=t.nsSeparator!==void 0?t.nsSeparator:this.options.nsSeparator;n===void 0&&(n=":");const i=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator;let r=t.ns||this.options.defaultNS||[];const a=n&&e.includes(n),o=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!Ct(e,n,i);if(a&&!o){const u=e.match(this.interpolator.nestingRegexp);if(u&&u.length>0)return{key:e,namespaces:S(r)?[r]:r};const l=e.split(n);(n!==i||n===i&&this.options.ns.includes(l[0]))&&(r=l.shift()),e=l.join(i)}return{key:e,namespaces:S(r)?[r]:r}}translate(e,t,n){let i=typeof t=="object"?{...t}:t;if(typeof i!="object"&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),typeof i=="object"&&(i={...i}),i||(i={}),e==null)return"";typeof e=="function"&&(e=Y(e,{...this.options,...i})),Array.isArray(e)||(e=[String(e)]),e=e.map(v=>typeof v=="function"?Y(v,{...this.options,...i}):String(v));const r=i.returnDetails!==void 0?i.returnDetails:this.options.returnDetails,a=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,{key:o,namespaces:u}=this.extractFromKey(e[e.length-1],i),l=u[u.length-1];let c=i.nsSeparator!==void 0?i.nsSeparator:this.options.nsSeparator;c===void 0&&(c=":");const f=i.lng||this.language,p=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((f==null?void 0:f.toLowerCase())==="cimode")return p?r?{res:`${l}${c}${o}`,usedKey:o,exactUsedKey:o,usedLng:f,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:`${l}${c}${o}`:r?{res:o,usedKey:o,exactUsedKey:o,usedLng:f,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:o;const h=this.resolve(e,i);let d=h==null?void 0:h.res;const m=(h==null?void 0:h.usedKey)||o,b=(h==null?void 0:h.exactUsedKey)||o,T=["[object Number]","[object Function]","[object RegExp]"],y=i.joinArrays!==void 0?i.joinArrays:this.options.joinArrays,k=!this.i18nFormat||this.i18nFormat.handleAsObject,w=i.count!==void 0&&!S(i.count),E=pe.hasDefaultValue(i),F=w?this.pluralResolver.getSuffix(f,i.count,i):"",$=i.ordinal&&w?this.pluralResolver.getSuffix(f,i.count,{ordinal:!1}):"",R=w&&!i.ordinal&&i.count===0,g=R&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${F}`]||i[`defaultValue${$}`]||i.defaultValue;let L=d;k&&!d&&E&&(L=g);const I=xe(L),P=Object.prototype.toString.apply(L);if(k&&L&&I&&!T.includes(P)&&!(S(y)&&Array.isArray(L))){if(!i.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const v=this.options.returnedObjectHandler?this.options.returnedObjectHandler(m,L,{...i,ns:u}):`key '${o} (${this.language})' returned an object instead of string.`;return r?(h.res=v,h.usedParams=this.getUsedParamsDetails(i),h):v}if(a){const v=Array.isArray(L),x=v?[]:{},j=v?b:m;for(const O in L)if(Object.prototype.hasOwnProperty.call(L,O)){const A=`${j}${a}${O}`;E&&!d?x[O]=this.translate(A,{...i,defaultValue:xe(g)?g[O]:void 0,joinArrays:!1,ns:u}):x[O]=this.translate(A,{...i,joinArrays:!1,ns:u}),x[O]===A&&(x[O]=L[O])}d=x}}else if(k&&S(y)&&Array.isArray(d))d=d.join(y),d&&(d=this.extendTranslation(d,e,i,n));else{let v=!1,x=!1;!this.isValidLookup(d)&&E&&(v=!0,d=g),this.isValidLookup(d)||(x=!0,d=o);const O=(i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&x?void 0:d,A=E&&g!==d&&this.options.updateMissing;if(x||v||A){if(this.logger.log(A?"updateKey":"missingKey",f,l,w&&!A?`${o}${this.pluralResolver.getSuffix(f,i.count,i)}`:o,A?g:d),a){const N=this.resolve(o,{...i,keySeparator:!1});N&&N.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 H=[];const K=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo==="fallback"&&K&&K[0])for(let N=0;N<K.length;N++)H.push(K[N]);else this.options.saveMissingTo==="all"?H=this.languageUtils.toResolveHierarchy(i.lng||this.language):H.push(i.lng||this.language);const W=(N,D,M)=>{var X;const J=E&&M!==d?M:O;this.options.missingKeyHandler?this.options.missingKeyHandler(N,l,D,J,A,i):(X=this.backendConnector)!=null&&X.saveMissing&&this.backendConnector.saveMissing(N,l,D,J,A,i),this.emit("missingKey",N,l,D,d)};this.options.saveMissing&&(this.options.saveMissingPlurals&&w?H.forEach(N=>{const D=this.pluralResolver.getSuffixes(N,i);R&&i[`defaultValue${this.options.pluralSeparator}zero`]&&!D.includes(`${this.options.pluralSeparator}zero`)&&D.push(`${this.options.pluralSeparator}zero`),D.forEach(M=>{W([N],o+M,i[`defaultValue${M}`]||g)})}):W(H,o,g))}d=this.extendTranslation(d,e,i,h,n),x&&d===o&&this.options.appendNamespaceToMissingKey&&(d=`${l}${c}${o}`),(x||v)&&this.options.parseMissingKeyHandler&&(d=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${c}${o}`:o,v?d:void 0,i))}return r?(h.res=d,h.usedParams=this.getUsedParamsDetails(i),h):d}extendTranslation(e,t,n,i,r){var u,l;if((u=this.i18nFormat)!=null&&u.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const c=S(e)&&(((l=n==null?void 0:n.interpolation)==null?void 0:l.skipOnVariables)!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let f;if(c){const h=e.match(this.interpolator.nestingRegexp);f=h&&h.length}let p=n.replace&&!S(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(p={...this.options.interpolation.defaultVariables,...p}),e=this.interpolator.interpolate(e,p,n.lng||this.language||i.usedLng,n),c){const h=e.match(this.interpolator.nestingRegexp),d=h&&h.length;f<d&&(n.nest=!1)}!n.lng&&i&&i.res&&(n.lng=this.language||i.usedLng),n.nest!==!1&&(e=this.interpolator.nest(e,(...h)=>(r==null?void 0:r[0])===h[0]&&!n.context?(this.logger.warn(`It seems you are nesting recursively key: ${h[0]} in key: ${t[0]}`),null):this.translate(...h,t),n)),n.interpolation&&this.interpolator.reset()}const a=n.postProcess||this.options.postProcess,o=S(a)?[a]:a;return e!=null&&(o!=null&&o.length)&&n.applyPostProcessor!==!1&&(e=Qe.handle(o,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...i,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,t={}){let n,i,r,a,o;return S(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(u=>typeof u=="function"?Y(u,{...this.options,...t}):u)),e.forEach(u=>{if(this.isValidLookup(n))return;const l=this.extractFromKey(u,t),c=l.key;i=c;let f=l.namespaces;this.options.fallbackNS&&(f=f.concat(this.options.fallbackNS));const p=t.count!==void 0&&!S(t.count),h=p&&!t.ordinal&&t.count===0,d=t.context!==void 0&&(S(t.context)||typeof t.context=="number")&&t.context!=="",m=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);f.forEach(b=>{var T,y;this.isValidLookup(n)||(o=b,!this.checkedLoadedFor[`${m[0]}-${b}`]&&((T=this.utils)!=null&&T.hasLoadedNamespace)&&!((y=this.utils)!=null&&y.hasLoadedNamespace(o))&&(this.checkedLoadedFor[`${m[0]}-${b}`]=!0,this.logger.warn(`key "${i}" for languages "${m.join(", ")}" won't get resolved as namespace "${o}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),m.forEach(k=>{var F;if(this.isValidLookup(n))return;a=k;const w=[c];if((F=this.i18nFormat)!=null&&F.addLookupKeys)this.i18nFormat.addLookupKeys(w,c,k,b,t);else{let $;p&&($=this.pluralResolver.getSuffix(k,t.count,t));const R=`${this.options.pluralSeparator}zero`,g=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(p&&(t.ordinal&&$.startsWith(g)&&w.push(c+$.replace(g,this.options.pluralSeparator)),w.push(c+$),h&&w.push(c+R)),d){const L=`${c}${this.options.contextSeparator||"_"}${t.context}`;w.push(L),p&&(t.ordinal&&$.startsWith(g)&&w.push(L+$.replace(g,this.options.pluralSeparator)),w.push(L+$),h&&w.push(L+R))}}let E;for(;E=w.pop();)this.isValidLookup(n)||(r=E,n=this.getResource(k,b,E,t))}))})}),{res:n,usedKey:i,exactUsedKey:r,usedLng:a,usedNS:o}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,t,n,i={}){var r;return(r=this.i18nFormat)!=null&&r.getResource?this.i18nFormat.getResource(e,t,n,i):this.resourceStore.getResource(e,t,n,i)}getUsedParamsDetails(e={}){const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&!S(e.replace);let i=n?e.replace:e;if(n&&typeof e.count<"u"&&(i.count=e.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!n){i={...i};for(const r of t)delete i[r]}return i}static hasDefaultValue(e){const t="defaultValue";for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&n.startsWith(t)&&e[n]!==void 0)return!0;return!1}}class Fe{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=_.create("languageUtils")}getScriptPartFromCode(e){if(e=ae(e),!e||!e.includes("-"))return null;const t=e.split("-");return t.length===2||(t.pop(),t[t.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(t.join("-"))}getLanguagePartFromCode(e){if(e=ae(e),!e||!e.includes("-"))return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(S(e)&&e.includes("-")){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch{}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.includes(e)}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(n=>{if(t)return;const i=this.formatLanguageCode(n);(!this.options.supportedLngs||this.isSupportedCode(i))&&(t=i)}),!t&&this.options.supportedLngs&&e.forEach(n=>{if(t)return;const i=this.getScriptPartFromCode(n);if(this.isSupportedCode(i))return t=i;const r=this.getLanguagePartFromCode(n);if(this.isSupportedCode(r))return t=r;t=this.options.supportedLngs.find(a=>a===r?!0:!a.includes("-")&&!r.includes("-")?!1:!!(a.includes("-")&&!r.includes("-")&&a.slice(0,a.indexOf("-"))===r||a.startsWith(r)&&r.length>1))}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if(typeof e=="function"&&(e=e(t)),S(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}toResolveHierarchy(e,t){const n=this.getFallbackCodes((t===!1?[]:t)||this.options.fallbackLng||[],e),i=[],r=a=>{a&&(this.isSupportedCode(a)?i.push(a):this.logger.warn(`rejecting language code not found in supportedLngs: ${a}`))};return S(e)&&(e.includes("-")||e.includes("_"))?(this.options.load!=="languageOnly"&&r(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&r(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&r(this.getLanguagePartFromCode(e))):S(e)&&r(this.formatLanguageCode(e)),n.forEach(a=>{i.includes(a)||r(this.formatLanguageCode(a))}),i}}const Ie={zero:0,one:1,two:2,few:3,many:4,other:5},De={select:s=>s===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class Nt{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=_.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){const n=ae(e==="dev"?"en":e),i=t.ordinal?"ordinal":"cardinal",r=JSON.stringify({cleanedCode:n,type:i});if(r in this.pluralRulesCache)return this.pluralRulesCache[r];let a;try{a=new Intl.PluralRules(n,{type:i})}catch{if(typeof Intl>"u")return this.logger.error("No Intl support, please use an Intl polyfill!"),De;if(!e.match(/-|_/))return De;const u=this.languageUtils.getLanguagePartFromCode(e);a=this.getRule(u,t)}return this.pluralRulesCache[r]=a,a}needsPlural(e,t={}){let n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),(n==null?void 0:n.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(e,t,n={}){return this.getSuffixes(e,n).map(i=>`${t}${i}`)}getSuffixes(e,t={}){let n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),n?n.resolvedOptions().pluralCategories.sort((i,r)=>Ie[i]-Ie[r]).map(i=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${i}`):[]}getSuffix(e,t,n={}){const i=this.getRule(e,n);return i?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,n))}}const Ve=(s,e,t,n=".",i=!0)=>{let r=St(s,e,t);return!r&&i&&S(t)&&(r=ve(s,t,n),r===void 0&&(r=ve(e,t,n))),r},Se=s=>s.replace(/\$/g,"$$$$");class Ue{constructor(e={}){var t;this.logger=_.create("interpolator"),this.options=e,this.format=((t=e==null?void 0:e.interpolation)==null?void 0:t.format)||(n=>n),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:n,useRawValueToEscape:i,prefix:r,prefixEscaped:a,suffix:o,suffixEscaped:u,formatSeparator:l,unescapeSuffix:c,unescapePrefix:f,nestingPrefix:p,nestingPrefixEscaped:h,nestingSuffix:d,nestingSuffixEscaped:m,nestingOptionsSeparator:b,maxReplaces:T,alwaysFormat:y}=e.interpolation;this.escape=t!==void 0?t:wt,this.escapeValue=n!==void 0?n:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=r?z(r):a||"{{",this.suffix=o?z(o):u||"}}",this.formatSeparator=l||",",this.unescapePrefix=c?"":f?z(f):"-",this.unescapeSuffix=this.unescapePrefix?"":c?z(c):"",this.nestingPrefix=p?z(p):h||z("$t("),this.nestingSuffix=d?z(d):m||z(")"),this.nestingOptionsSeparator=b||",",this.maxReplaces=T||1e3,this.alwaysFormat=y!==void 0?y:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(t,n)=>(t==null?void 0:t.source)===n?(t.lastIndex=0,t):new RegExp(n,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,n,i){var h;let r,a,o;const u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},l=d=>{if(!d.includes(this.formatSeparator)){const y=Ve(t,u,d,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(y,void 0,n,{...i,...t,interpolationkey:d}):y}const m=d.split(this.formatSeparator),b=m.shift().trim(),T=m.join(this.formatSeparator).trim();return this.format(Ve(t,u,b,this.options.keySeparator,this.options.ignoreJSONStructure),T,n,{...i,...t,interpolationkey:b})};this.resetRegExp(),!this.escapeValue&&typeof e=="string"&&/\$t\([^)]*\{[^}]*\{\{/.test(e)&&this.logger.warn("nesting options string contains interpolated variables with escapeValue: false — if any of those values are attacker-controlled they can inject additional nesting options (e.g. redirect lng/ns). Sanitise untrusted input before passing it to t(), or keep escapeValue: true.");const c=(i==null?void 0:i.missingInterpolationHandler)||this.options.missingInterpolationHandler,f=((h=i==null?void 0:i.interpolation)==null?void 0:h.skipOnVariables)!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:d=>Se(d)},{regex:this.regexp,safeValue:d=>this.escapeValue?Se(this.escape(d)):Se(d)}].forEach(d=>{for(o=0;r=d.regex.exec(e);){const m=r[1].trim();if(a=l(m),a===void 0)if(typeof c=="function"){const T=c(e,r,i);a=S(T)?T:""}else if(i&&Object.prototype.hasOwnProperty.call(i,m))a="";else if(f){a=r[0];continue}else this.logger.warn(`missed to pass in variable ${m} for interpolating ${e}`),a="";else!S(a)&&!this.useRawValueToEscape&&(a=Pe(a));const b=d.safeValue(a);if(e=e.replace(r[0],b),f?(d.regex.lastIndex+=a.length,d.regex.lastIndex-=r[0].length):d.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),e}nest(e,t,n={}){let i,r,a;const o=(u,l)=>{const c=this.nestingOptionsSeparator;if(!u.includes(c))return u;const f=u.split(new RegExp(`${z(c)}[ ]*{`));let p=`{${f[1]}`;u=f[0],p=this.interpolate(p,a);const h=p.match(/'/g),d=p.match(/"/g);(((h==null?void 0:h.length)??0)%2===0&&!d||((d==null?void 0:d.length)??0)%2!==0)&&(p=p.replace(/'/g,'"'));try{a=JSON.parse(p),l&&(a={...l,...a})}catch(m){return this.logger.warn(`failed parsing options string in nesting for key ${u}`,m),`${u}${c}${p}`}return a.defaultValue&&a.defaultValue.includes(this.prefix)&&delete a.defaultValue,u};for(;i=this.nestingRegexp.exec(e);){let u=[];a={...n},a=a.replace&&!S(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;const l=/{.*}/.test(i[1])?i[1].lastIndexOf("}")+1:i[1].indexOf(this.formatSeparator);if(l!==-1&&(u=i[1].slice(l).split(this.formatSeparator).map(c=>c.trim()).filter(Boolean),i[1]=i[1].slice(0,l)),r=t(o.call(this,i[1].trim(),a),a),r&&i[0]===e&&!S(r))return r;S(r)||(r=Pe(r)),r||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${e}`),r=""),u.length&&(r=u.reduce((c,f)=>this.format(c,f,n.lng,{...n,interpolationkey:i[1].trim()}),r.trim())),e=e.replace(i[0],r),this.regexp.lastIndex=0}return e}}const kt=s=>{let e=s.toLowerCase().trim();const t={};if(s.includes("(")){const n=s.split("(");e=n[0].toLowerCase().trim();const i=n[1].slice(0,-1);e==="currency"&&!i.includes(":")?t.currency||(t.currency=i.trim()):e==="relativetime"&&!i.includes(":")?t.range||(t.range=i.trim()):i.split(";").forEach(a=>{if(a){const[o,...u]=a.split(":"),l=u.join(":").trim().replace(/^'+|'+$/g,""),c=o.trim();t[c]||(t[c]=l),l==="false"&&(t[c]=!1),l==="true"&&(t[c]=!0),isNaN(l)||(t[c]=parseInt(l,10))}})}return{formatName:e,formatOptions:t}},He=s=>{const e={};return(t,n,i)=>{let r=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(r={...r,[i.interpolationkey]:void 0});const a=n+JSON.stringify(r);let o=e[a];return o||(o=s(ae(n),i),e[a]=o),o(t)}},Pt=s=>(e,t,n)=>s(ae(t),n)(e);class Rt{constructor(e={}){this.logger=_.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";const n=t.cacheInBuiltFormats?He:Pt;this.formats={number:n((i,r)=>{const a=new Intl.NumberFormat(i,{...r});return o=>a.format(o)}),currency:n((i,r)=>{const a=new Intl.NumberFormat(i,{...r,style:"currency"});return o=>a.format(o)}),datetime:n((i,r)=>{const a=new Intl.DateTimeFormat(i,{...r});return o=>a.format(o)}),relativetime:n((i,r)=>{const a=new Intl.RelativeTimeFormat(i,{...r});return o=>a.format(o,r.range||"day")}),list:n((i,r)=>{const a=new Intl.ListFormat(i,{...r});return o=>a.format(o)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=He(t)}format(e,t,n,i={}){if(!t||e==null)return e;const r=t.split(this.formatSeparator);if(r.length>1&&r[0].indexOf("(")>1&&!r[0].includes(")")&&r.find(o=>o.includes(")"))){const o=r.findIndex(u=>u.includes(")"));r[0]=[r[0],...r.splice(1,o)].join(this.formatSeparator)}return r.reduce((o,u)=>{var f;const{formatName:l,formatOptions:c}=kt(u);if(this.formats[l]){let p=o;try{const h=((f=i==null?void 0:i.formatParams)==null?void 0:f[i.interpolationkey])||{},d=h.locale||h.lng||i.locale||i.lng||n;p=this.formats[l](o,d,{...c,...i,...h})}catch(h){this.logger.warn(h)}return p}else this.logger.warn(`there was no format function for ${l}`);return o},e)}}const Tt=(s,e)=>{s.pending[e]!==void 0&&(delete s.pending[e],s.pendingCount--)};class jt extends me{constructor(e,t,n,i={}){var r,a;super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=i,this.logger=_.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=[],(a=(r=this.backend)==null?void 0:r.init)==null||a.call(r,n,i.backend,i)}queueLoad(e,t,n,i){const r={},a={},o={},u={};return e.forEach(l=>{let c=!0;t.forEach(f=>{const p=`${l}|${f}`;!n.reload&&this.store.hasResourceBundle(l,f)?this.state[p]=2:this.state[p]<0||(this.state[p]===1?a[p]===void 0&&(a[p]=!0):(this.state[p]=1,c=!1,a[p]===void 0&&(a[p]=!0),r[p]===void 0&&(r[p]=!0),u[f]===void 0&&(u[f]=!0)))}),c||(o[l]=!0)}),(Object.keys(r).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(r),pending:Object.keys(a),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(u)}}loaded(e,t,n){const i=e.split("|"),r=i[0],a=i[1];t&&this.emit("failedLoading",r,a,t),!t&&n&&this.store.addResourceBundle(r,a,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);const o={};this.queue.forEach(u=>{xt(u.loaded,[r],a),Tt(u,e),t&&u.errors.push(t),u.pendingCount===0&&!u.done&&(Object.keys(u.loaded).forEach(l=>{o[l]||(o[l]={});const c=u.loaded[l];c.length&&c.forEach(f=>{o[l][f]===void 0&&(o[l][f]=!0)})}),u.done=!0,u.errors.length?u.callback(u.errors):u.callback())}),this.emit("loaded",o),this.queue=this.queue.filter(u=>!u.done)}read(e,t,n,i=0,r=this.retryTimeout,a){if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:n,tried:i,wait:r,callback:a});return}this.readingCalls++;const o=(l,c)=>{if(this.readingCalls--,this.waitingReads.length>0){const f=this.waitingReads.shift();this.read(f.lng,f.ns,f.fcName,f.tried,f.wait,f.callback)}if(l&&c&&i<this.maxRetries){setTimeout(()=>{this.read(e,t,n,i+1,r*2,a)},r);return}a(l,c)},u=this.backend[n].bind(this.backend);if(u.length===2){try{const l=u(e,t);l&&typeof l.then=="function"?l.then(c=>o(null,c)).catch(o):o(null,l)}catch(l){o(l)}return}return u(e,t,o)}prepareLoading(e,t,n={},i){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();S(e)&&(e=this.languageUtils.toResolveHierarchy(e)),S(t)&&(t=[t]);const r=this.queueLoad(e,t,n,i);if(!r.toLoad.length)return r.pending.length||i(),null;r.toLoad.forEach(a=>{this.loadOne(a)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e,t=""){const n=e.split("|"),i=n[0],r=n[1];this.read(i,r,"read",void 0,void 0,(a,o)=>{a&&this.logger.warn(`${t}loading namespace ${r} for language ${i} failed`,a),!a&&o&&this.logger.log(`${t}loaded namespace ${r} for language ${i}`,o),this.loaded(e,a,o)})}saveMissing(e,t,n,i,r,a={},o=()=>{}){var u,l,c,f,p;if((l=(u=this.services)==null?void 0:u.utils)!=null&&l.hasLoadedNamespace&&!((f=(c=this.services)==null?void 0:c.utils)!=null&&f.hasLoadedNamespace(t))){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!!!");return}if(!(n==null||n==="")){if((p=this.backend)!=null&&p.create){const h={...a,isUpdate:r},d=this.backend.create.bind(this.backend);if(d.length<6)try{let m;d.length===5?m=d(e,t,n,i,h):m=d(e,t,n,i),m&&typeof m.then=="function"?m.then(b=>o(null,b)).catch(o):o(null,m)}catch(m){o(m)}else d(e,t,n,i,o,h)}!e||!e[0]||this.store.addResource(e[0],t,n,i)}}}const be=()=>({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:s=>{let e={};if(typeof s[1]=="object"&&(e=s[1]),S(s[1])&&(e.defaultValue=s[1]),S(s[2])&&(e.tDescription=s[2]),typeof s[2]=="object"||typeof s[3]=="object"){const t=s[3]||s[2];Object.keys(t).forEach(n=>{e[n]=t[n]})}return e},interpolation:{escapeValue:!0,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),Me=s=>(S(s.ns)&&(s.ns=[s.ns]),S(s.fallbackLng)&&(s.fallbackLng=[s.fallbackLng]),S(s.fallbackNS)&&(s.fallbackNS=[s.fallbackNS]),s.supportedLngs&&!s.supportedLngs.includes("cimode")&&(s.supportedLngs=s.supportedLngs.concat(["cimode"])),s),le=()=>{},At=s=>{Object.getOwnPropertyNames(Object.getPrototypeOf(s)).forEach(t=>{typeof s[t]=="function"&&(s[t]=s[t].bind(s))})};class re extends me{constructor(e={},t){if(super(),this.options=Me(e),this.services={},this.logger=_,this.modules={external:[]},At(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,typeof e=="function"&&(t=e,e={}),e.defaultNS==null&&e.ns&&(S(e.ns)?e.defaultNS=e.ns:e.ns.includes("translation")||(e.defaultNS=e.ns[0]));const n=be();this.options={...n,...this.options,...Me(e)},this.options.interpolation={...n.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=n.overloadTranslationOptionHandler);const i=l=>l?typeof l=="function"?new l:l:null;if(!this.options.isClone){this.modules.logger?_.init(i(this.modules.logger),this.options):_.init(null,this.options);let l;this.modules.formatter?l=this.modules.formatter:l=Rt;const c=new Fe(this.options);this.store=new Ae(this.options.resources,this.options);const f=this.services;f.logger=_,f.resourceStore=this.store,f.languageUtils=c,f.pluralResolver=new Nt(c,{prepend:this.options.pluralSeparator}),l&&(f.formatter=i(l),f.formatter.init&&f.formatter.init(f,this.options),this.options.interpolation.format=f.formatter.format.bind(f.formatter)),f.interpolator=new Ue(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new jt(i(this.modules.backend),f.resourceStore,f,this.options),f.backendConnector.on("*",(p,...h)=>{this.emit(p,...h)}),this.modules.languageDetector&&(f.languageDetector=i(this.modules.languageDetector),f.languageDetector.init&&f.languageDetector.init(f,this.options.detection,this.options)),this.modules.i18nFormat&&(f.i18nFormat=i(this.modules.i18nFormat),f.i18nFormat.init&&f.i18nFormat.init(this)),this.translator=new pe(this.services,this.options),this.translator.on("*",(p,...h)=>{this.emit(p,...h)}),this.modules.external.forEach(p=>{p.init&&p.init(this)})}if(this.format=this.options.interpolation.format,t||(t=le),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const l=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);l.length>0&&l[0]!=="dev"&&(this.options.lng=l[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(l=>{this[l]=(...c)=>this.store[l](...c)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(l=>{this[l]=(...c)=>(this.store[l](...c),this)});const o=ne(),u=()=>{const l=(c,f)=>{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(f),t(c,f)};if((this.languages||this.isLanguageChangingTo)&&!this.isInitialized)return l(null,this.t.bind(this));this.changeLanguage(this.options.lng,l)};return this.options.resources||!this.options.initAsync?u():setTimeout(u,0),o}loadResources(e,t=le){var r,a;let n=t;const i=S(e)?e:this.language;if(typeof e=="function"&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if((i==null?void 0:i.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return n();const o=[],u=l=>{if(!l||l==="cimode")return;this.services.languageUtils.toResolveHierarchy(l).forEach(f=>{f!=="cimode"&&(o.includes(f)||o.push(f))})};i?u(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(c=>u(c)),(a=(r=this.options.preload)==null?void 0:r.forEach)==null||a.call(r,l=>u(l)),this.services.backendConnector.load(o,this.options.ns,l=>{!l&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(l)})}else n(null)}reloadResources(e,t,n){const i=ne();return typeof e=="function"&&(n=e,e=void 0),typeof t=="function"&&(n=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),n||(n=le),this.services.backendConnector.reload(e,t,r=>{i.resolve(),n(r)}),i}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&Qe.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!["cimode","dev"].includes(e)){for(let t=0;t<this.languages.length;t++){const n=this.languages[t];if(!["cimode","dev"].includes(n)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}!this.resolvedLanguage&&!this.languages.includes(e)&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;const n=ne();this.emit("languageChanging",e);const i=o=>{this.language=o,this.languages=this.services.languageUtils.toResolveHierarchy(o),this.resolvedLanguage=void 0,this.setResolvedLanguage(o)},r=(o,u)=>{u?this.isLanguageChangingTo===e&&(i(u),this.translator.changeLanguage(u),this.isLanguageChangingTo=void 0,this.emit("languageChanged",u),this.logger.log("languageChanged",u)):this.isLanguageChangingTo=void 0,n.resolve((...l)=>this.t(...l)),t&&t(o,(...l)=>this.t(...l))},a=o=>{var c,f;!e&&!o&&this.services.languageDetector&&(o=[]);const u=S(o)?o:o&&o[0],l=this.store.hasLanguageSomeTranslations(u)?u:this.services.languageUtils.getBestMatchFromCodes(S(o)?[o]:o);l&&(this.language||i(l),this.translator.language||this.translator.changeLanguage(l),(f=(c=this.services.languageDetector)==null?void 0:c.cacheUserLanguage)==null||f.call(c,l)),this.loadResources(l,p=>{r(p,l)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e),n}getFixedT(e,t,n,i){const r=i==null?void 0:i.scopeNs,a=(o,u,...l)=>{let c;typeof u!="object"?c=this.options.overloadTranslationOptionHandler([o,u].concat(l)):c={...u},c.lng=c.lng||a.lng,c.lngs=c.lngs||a.lngs;const f=c.ns!==void 0&&c.ns!==null;c.ns=c.ns||a.ns,c.keyPrefix!==""&&(c.keyPrefix=c.keyPrefix||n||a.keyPrefix);const p={...this.options,...c};Array.isArray(r)&&!f&&(p.ns=r),typeof c.keyPrefix=="function"&&(c.keyPrefix=Y(c.keyPrefix,p));const h=this.options.keySeparator||".";let d;return c.keyPrefix&&Array.isArray(o)?d=o.map(m=>(typeof m=="function"&&(m=Y(m,p)),`${c.keyPrefix}${h}${m}`)):(typeof o=="function"&&(o=Y(o,p)),d=c.keyPrefix?`${c.keyPrefix}${h}${o}`:o),this.t(d,c)};return S(e)?a.lng=e:a.lngs=e,a.ns=t,a.keyPrefix=n,a}t(...e){var t;return(t=this.translator)==null?void 0:t.translate(...e)}exists(...e){var t;return(t=this.translator)==null?void 0:t.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=t.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,r=this.languages[this.languages.length-1];if(n.toLowerCase()==="cimode")return!0;const a=(o,u)=>{const l=this.services.backendConnector.state[`${o}|${u}`];return l===-1||l===0||l===2};if(t.precheck){const o=t.precheck(this,a);if(o!==void 0)return o}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(n,e)&&(!i||a(r,e)))}loadNamespaces(e,t){const n=ne();return this.options.ns?(S(e)&&(e=[e]),e.forEach(i=>{this.options.ns.includes(i)||this.options.ns.push(i)}),this.loadResources(i=>{n.resolve(),t&&t(i)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){const n=ne();S(e)&&(e=[e]);const i=this.options.preload||[],r=e.filter(a=>!i.includes(a)&&this.services.languageUtils.isSupportedCode(a));return r.length?(this.options.preload=i.concat(r),this.loadResources(a=>{n.resolve(),t&&t(a)}),n):(t&&t(),Promise.resolve())}dir(e){var i,r;if(e||(e=this.resolvedLanguage||(((i=this.languages)==null?void 0:i.length)>0?this.languages[0]:this.language)),!e)return"rtl";try{const a=new Intl.Locale(e);if(a&&a.getTextInfo){const o=a.getTextInfo();if(o&&o.direction)return o.direction}}catch{}const t=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],n=((r=this.services)==null?void 0:r.languageUtils)||new Fe(be());return e.toLowerCase().indexOf("-latn")>1?"ltr":t.includes(n.getLanguagePartFromCode(e))||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},t){const n=new re(e,t);return n.createInstance=re.createInstance,n}cloneInstance(e={},t=le){const n=e.forkResourceStore;n&&delete e.forkResourceStore;const i={...this.options,...e,isClone:!0},r=new re(i);if((e.debug!==void 0||e.prefix!==void 0)&&(r.logger=r.logger.clone(e)),["store","services","language"].forEach(o=>{r[o]=this[o]}),r.services={...this.services},r.services.utils={hasLoadedNamespace:r.hasLoadedNamespace.bind(r)},n){const o=Object.keys(this.store.data).reduce((u,l)=>(u[l]={...this.store.data[l]},u[l]=Object.keys(u[l]).reduce((c,f)=>(c[f]={...u[l][f]},c),u[l]),u),{});r.store=new Ae(o,i),r.services.resourceStore=r.store}if(e.interpolation){const u={...be().interpolation,...this.options.interpolation,...e.interpolation},l={...i,interpolation:u};r.services.interpolator=new Ue(l)}return r.translator=new pe(r.services,i),r.translator.on("*",(o,...u)=>{r.emit(o,...u)}),r.init(i,t),r.translator.options=i,r.translator.backendConnector.services.utils={hasLoadedNamespace:r.hasLoadedNamespace.bind(r)},r}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const U=re.createInstance();U.createInstance;U.dir;U.init;U.loadResources;U.reloadResources;U.use;U.changeLanguage;U.getFixedT;U.t;U.exists;U.setDefaultNamespace;U.hasLoadedNamespace;U.loadNamespaces;U.loadLanguages;var Ft={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};const It=gt(Ft);var Dt=/\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;function _e(s){var e={type:"tag",name:"",voidElement:!1,attrs:{},children:[]},t=s.match(/<\/?([^\s]+?)[/\s>]/);if(t&&(e.name=t[1],(It[t[1]]||s.charAt(s.length-2)==="/")&&(e.voidElement=!0),e.name.startsWith("!--"))){var n=s.indexOf("-->");return{type:"comment",comment:n!==-1?s.slice(4,n):""}}for(var i=new RegExp(Dt),r=null;(r=i.exec(s))!==null;)if(r[0].trim())if(r[1]){var a=r[1].trim(),o=[a,""];a.indexOf("=")>-1&&(o=a.split("=")),e.attrs[o[0]]=o[1],i.lastIndex--}else r[2]&&(e.attrs[r[2]]=r[3].trim().substring(1,r[3].length-1));return e}var Vt=/<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g,Ut=/^\s*$/,Ht=Object.create(null);function tt(s,e){switch(e.type){case"text":return s+e.content;case"tag":return s+="<"+e.name+(e.attrs?function(t){var n=[];for(var i in t)n.push(i+'="'+t[i]+'"');return n.length?" "+n.join(" "):""}(e.attrs):"")+(e.voidElement?"/>":">"),e.voidElement?s:s+e.children.reduce(tt,"")+"</"+e.name+">";case"comment":return s+"<!--"+e.comment+"-->"}}var Mt={parse:function(s,e){e||(e={}),e.components||(e.components=Ht);var t,n=[],i=[],r=-1,a=!1;if(s.indexOf("<")!==0){var o=s.indexOf("<");n.push({type:"text",content:o===-1?s:s.substring(0,o)})}return s.replace(Vt,function(u,l){if(a){if(u!=="</"+t.name+">")return;a=!1}var c,f=u.charAt(1)!=="/",p=u.startsWith("<!--"),h=l+u.length,d=s.charAt(h);if(p){var m=_e(u);return r<0?(n.push(m),n):((c=i[r]).children.push(m),n)}if(f&&(r++,(t=_e(u)).type==="tag"&&e.components[t.name]&&(t.type="component",a=!0),t.voidElement||a||!d||d==="<"||t.children.push({type:"text",content:s.slice(h,s.indexOf("<",h))}),r===0&&n.push(t),(c=i[r-1])&&c.children.push(t),i[r]=t),(!f||t.voidElement)&&(r>-1&&(t.voidElement||t.name===u.slice(2,-1))&&(r--,t=r===-1?n:i[r]),!a&&d!=="<"&&d)){c=r===-1?n:i[r].children;var b=s.indexOf("<",h),T=s.slice(h,b===-1?void 0:b);Ut.test(T)&&(T=" "),(b>-1&&r+c.length>=0||T!==" ")&&c.push({type:"text",content:T})}}),n},stringify:function(s){return s.reduce(function(e,t){return e+tt("",t)},"")}};const ce=(s,e,t,n)=>{var r,a,o,u;const i=[t,{code:e,...n||{}}];if((a=(r=s==null?void 0:s.services)==null?void 0:r.logger)!=null&&a.forward)return s.services.logger.forward(i,"warn","react-i18next::",!0);V(i[0])&&(i[0]=`react-i18next:: ${i[0]}`),(u=(o=s==null?void 0:s.services)==null?void 0:o.logger)!=null&&u.warn?s.services.logger.warn(...i):console!=null&&console.warn&&console.warn(...i)},Ke={},oe=(s,e,t,n)=>{V(t)&&Ke[t]||(V(t)&&(Ke[t]=new Date),ce(s,e,t,n))},nt=(s,e)=>()=>{if(s.isInitialized)e();else{const t=()=>{setTimeout(()=>{s.off("initialized",t)},0),e()};s.on("initialized",t)}},Le=(s,e,t)=>{s.loadNamespaces(e,nt(s,t))},ze=(s,e,t,n)=>{if(V(t)&&(t=[t]),s.options.preload&&s.options.preload.indexOf(e)>-1)return Le(s,t,n);t.forEach(i=>{s.options.ns.indexOf(i)<0&&s.options.ns.push(i)}),s.loadLanguages(e,nt(s,n))},_t=(s,e,t={})=>!e.languages||!e.languages.length?(oe(e,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:e.languages}),!0):e.hasLoadedNamespace(s,{lng:t.lng,precheck:(n,i)=>{if(t.bindI18n&&t.bindI18n.indexOf("languageChanging")>-1&&n.services.backendConnector.backend&&n.isLanguageChangingTo&&!i(n.isLanguageChangingTo,s))return!1}}),V=s=>typeof s=="string",B=s=>typeof s=="object"&&s!==null,Kt=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,zt={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"В©","©":"В©","®":"В®","®":"В®","…":"…","…":"…","/":"/","/":"/"},Bt=s=>zt[s],st=s=>s.replace(Kt,Bt);let Oe={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:st,transDefaultProps:void 0};const qt=(s={})=>{Oe={...Oe,...s}},$e=()=>Oe;let it;const Wt=s=>{it=s},Ne=()=>it,fe=(s,e)=>{var n;if(!s)return!1;const t=((n=s.props)==null?void 0:n.children)??s.children;return e?t.length>0:!!t},se=s=>{var t,n;if(!s)return[];const e=((t=s.props)==null?void 0:t.children)??s.children;return(n=s.props)!=null&&n.i18nIsDynamicList?q(e):e},Jt=s=>Array.isArray(s)&&s.every(C.isValidElement),q=s=>Array.isArray(s)?s:[s],Xt=(s,e)=>{const t={...e};return t.props={...e.props,...s.props},t},Yt=s=>{const e={};if(!s)return e;const t=n=>{q(n).forEach(r=>{V(r)||(fe(r)?t(se(r)):B(r)&&!C.isValidElement(r)&&Object.assign(e,r))})};return t(s),e},Ce=(s,e,t,n)=>{if(!s)return"";let i="";const r=q(s),a=e!=null&&e.transSupportBasicHtmlNodes?e.transKeepBasicHtmlNodesFor??[]:[];return r.forEach((o,u)=>{if(V(o)){i+=`${o}`;return}if(C.isValidElement(o)){const{props:l,type:c}=o,f=Object.keys(l).length,p=a.indexOf(c)>-1,h=l.children;if(!h&&p&&!f){i+=`<${c}/>`;return}if(!h&&(!p||f)||l.i18nIsDynamicList){i+=`<${u}></${u}>`;return}if(p&&f<=1){const m=V(h)?h:Ce(h,e,t,n);i+=`<${c}>${m}</${c}>`;return}const d=Ce(h,e,t,n);i+=`<${u}>${d}</${u}>`;return}if(o===null){ce(t,"TRANS_NULL_VALUE","Passed in a null value as child",{i18nKey:n});return}if(B(o)){const{format:l,...c}=o,f=Object.keys(c);if(f.length===1){const p=l?`${f[0]}, ${l}`:f[0];i+=`{{${p}}}`;return}ce(t,"TRANS_INVALID_OBJ","Invalid child - Object should only have keys {{ value, format }} (format is optional).",{i18nKey:n,child:o});return}ce(t,"TRANS_INVALID_VAR","Passed in a variable like {number} - pass variables for interpolation as full objects like {{number}}.",{i18nKey:n,child:o})}),i},Zt=(s,e=[],t={})=>{if(!s)return s;const n=Object.keys(t),i=[...e,...n];let r="",a=0;for(;a<s.length;)if(s[a]==="<"){let o=!1;const u=s.slice(a).match(/^<\/(\d+|[a-zA-Z][a-zA-Z0-9_-]*)>/);if(u){const l=u[1];(/^\d+$/.test(l)||i.includes(l))&&(o=!0,r+=u[0],a+=u[0].length)}if(!o){const l=s.slice(a).match(/^<(\d+|[a-zA-Z][a-zA-Z0-9_-]*)(\s+[\w-]+(?:=(?:"[^"]*"|'[^']*'|[^\s>]+))?)*\s*(\/)?>/);if(l){const c=l[1];(/^\d+$/.test(c)||i.includes(c))&&(o=!0,r+=l[0],a+=l[0].length)}}o||(r+="<",a+=1)}else r+=s[a],a+=1;return r},Gt=(s,e,t,n,i,r,a)=>{if(t==="")return[];const o=i.transKeepBasicHtmlNodesFor||[],u=t&&new RegExp(o.map(y=>`<${y}`).join("|")).test(t);if(!s&&!e&&!u&&!a)return[t];const l=e??{},c=y=>{q(y).forEach(w=>{V(w)||(fe(w)?c(se(w)):B(w)&&!C.isValidElement(w)&&Object.assign(l,w))})};c(s);const f=Zt(t,o,l),p=Mt.parse(`<0>${f}</0>`),h={...l,...r},d=(y,k,w)=>{var $;const E=se(y),F=b(E,k.children,w);return Jt(E)&&F.length===0||($=y.props)!=null&&$.i18nIsDynamicList?E:F},m=(y,k,w,E,F)=>{y.dummy?(y.children=k,w.push(C.cloneElement(y,{key:E},F?void 0:k))):w.push(...C.Children.map([y],$=>{var g;if($.type===C.Fragment||((g=$.props)==null?void 0:g.i18nIsDynamicList)!==void 0){const L={key:E};return $&&$.props&&Object.keys($.props).forEach(I=>{I==="children"||I==="i18nIsDynamicList"||(L[I]=$.props[I])}),C.createElement($.type,L,F?null:k)}const R={key:E};return $&&$.props&&Object.keys($.props).forEach(L=>{L==="ref"||L==="children"||(R[L]=$.props[L])}),C.cloneElement($,R,F?null:k)}))},b=(y,k,w)=>{const E=q(y),F=q(k),$={};return F.reduce((R,g,L)=>{var P,v;const I=((v=(P=g.children)==null?void 0:P[0])==null?void 0:v.content)&&n.services.interpolator.interpolate(g.children[0].content,h,n.language);if(g.type==="tag"){let x=E[parseInt(g.name,10)];!x&&e&&(x=e[g.name]),w.length===1&&!x&&(x=w[0][g.name]),x||(x={});const j={...g.attrs};a&&Object.keys(j).forEach(N=>{const D=j[N];V(D)&&(j[N]=st(D))});const O=Object.keys(j).length!==0?Xt({props:j},x):x,A=C.isValidElement(O),H=A&&fe(g,!0)&&!g.voidElement,K=u&&B(O)&&O.dummy&&!A,W=B(e)&&Object.hasOwnProperty.call(e,g.name);if(V(O)){const N=n.services.interpolator.interpolate(O,h,n.language);R.push(N)}else if(fe(O)||H){const N=d(O,g,w);m(O,N,R,L)}else if(K){const N=b(E,g.children,w);m(O,N,R,L)}else if(Number.isNaN(parseFloat(g.name)))if(W){const N=d(O,g,w);m(O,N,R,L,g.voidElement)}else if(i.transSupportBasicHtmlNodes&&o.indexOf(g.name)>-1)if(g.voidElement)R.push(C.createElement(g.name,{key:`${g.name}-${L}`}));else{const N=$[g.name]||0;$[g.name]=N+1;let D,M=0;for(let te=0;te<E.length;te+=1){const ye=E[te];if(C.isValidElement(ye)&&ye.type===g.name){if(M===N){D=ye;break}M+=1}}const J=D?q(se(D)):E,X=b(J,g.children,w);R.push(C.createElement(g.name,{key:`${g.name}-${L}`},X))}else if(g.voidElement)R.push(`<${g.name} />`);else{const N=b(E,g.children,w);R.push(`<${g.name}>${N}</${g.name}>`)}else if(B(O)&&!A){const N=g.children[0]?I:null;N&&R.push(N)}else m(O,I,R,L,g.children.length!==1||!I)}else if(g.type==="text"){const x=i.transWrapTextNodes,j=typeof i.unescape=="function"?i.unescape:$e().unescape,O=a?j(n.services.interpolator.interpolate(g.content,h,n.language)):n.services.interpolator.interpolate(g.content,h,n.language);x?R.push(C.createElement(x,{key:`${g.name}-${L}`},O)):R.push(O)}return R},[])},T=b([{dummy:!0,children:s||[]}],p,q(s||[]));return se(T[0])},rt=(s,e,t)=>{const n=s.key||e,i=C.cloneElement(s,{key:n});if(!i.props||!i.props.children||t.indexOf(`${e}/>`)<0&&t.indexOf(`${e} />`)<0)return i;function r(){return C.createElement(C.Fragment,null,i)}return C.createElement(r,{key:n})},Qt=(s,e)=>s.map((t,n)=>rt(t,n,e)),en=(s,e)=>{const t={};return Object.keys(s).forEach(n=>{Object.assign(t,{[n]:rt(s[n],n,e)})}),t},tn=(s,e,t,n)=>s?Array.isArray(s)?Qt(s,e):B(s)?en(s,e):(oe(t,"TRANS_INVALID_COMPONENTS",'<Trans /> "components" prop expects an object or array',{i18nKey:n}),null):null,nn=s=>!B(s)||Array.isArray(s)?!1:Object.keys(s).reduce((e,t)=>e&&Number.isNaN(Number.parseFloat(t)),!0);function sn({children:s,count:e,parent:t,i18nKey:n,context:i,tOptions:r={},values:a,defaults:o,components:u,ns:l,i18n:c,t:f,shouldUnescape:p,...h}){var W,N,D,M,J,X;const d=c||Ne();if(!d)return oe(d,"NO_I18NEXT_INSTANCE","Trans: You need to pass in an i18next instance using i18nextReactModule",{i18nKey:n}),s;const m=f||d.t.bind(d)||(te=>te),b={...$e(),...(W=d.options)==null?void 0:W.react};let T=l||m.ns||((N=d.options)==null?void 0:N.defaultNS);T=V(T)?[T]:T||["translation"];const{transDefaultProps:y}=b,k=y!=null&&y.tOptions?{...y.tOptions,...r}:r,w=p??(y==null?void 0:y.shouldUnescape),E=y!=null&&y.values?{...y.values,...a}:a,F=y!=null&&y.components?{...y.components,...u}:u,$=Ce(s,b,d,n),R=o||(k==null?void 0:k.defaultValue)||$||b.transEmptyNodeValue||(typeof n=="function"?Y(n):n),{hashTransKey:g}=b,L=n||(g?g($||R):$||R);(M=(D=d.options)==null?void 0:D.interpolation)!=null&&M.defaultVariables?a=E&&Object.keys(E).length>0?{...E,...d.options.interpolation.defaultVariables}:{...d.options.interpolation.defaultVariables}:a=E;const I=Yt(s);I&&typeof I.count=="number"&&e===void 0&&(e=I.count);const P=a||e!==void 0&&!((X=(J=d.options)==null?void 0:J.interpolation)!=null&&X.alwaysFormat)||!s?k.interpolation:{interpolation:{...k.interpolation,prefix:"#$?",suffix:"?$#"}},v={...k,context:i||k.context,count:e,...a,...P,defaultValue:R,ns:T};let x=L?m(L,v):R;x===L&&R&&(x=R);const j=tn(F,x,d,n);let O=j||s,A=null;nn(j)&&(A=j,O=s);const H=Gt(O,A,x,d,b,v,w),K=t??b.defaultTransParent;return K?C.createElement(K,h,H):H}const Jn={type:"3rdParty",init(s){qt(s.options.react),Wt(s)}},ke=C.createContext();class rn{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(t=>{this.usedNamespaces[t]||(this.usedNamespaces[t]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}function Xn({children:s,count:e,parent:t,i18nKey:n,context:i,tOptions:r={},values:a,defaults:o,components:u,ns:l,i18n:c,t:f,shouldUnescape:p,...h}){var y;const{i18n:d,defaultNS:m}=C.useContext(ke)||{},b=c||d||Ne(),T=f||(b==null?void 0:b.t.bind(b));return sn({children:s,count:e,parent:t,i18nKey:n,context:i,tOptions:r,values:a,defaults:o,components:u,ns:l||(T==null?void 0:T.ns)||m||((y=b==null?void 0:b.options)==null?void 0:y.defaultNS),i18n:b,t:f,shouldUnescape:p,...h})}var at={exports:{}},ot={};/**
* @license React
* use-sync-external-store-shim.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var ee=C;function an(s,e){return s===e&&(s!==0||1/s===1/e)||s!==s&&e!==e}var on=typeof Object.is=="function"?Object.is:an,ln=ee.useState,un=ee.useEffect,cn=ee.useLayoutEffect,fn=ee.useDebugValue;function dn(s,e){var t=e(),n=ln({inst:{value:t,getSnapshot:e}}),i=n[0].inst,r=n[1];return cn(function(){i.value=t,i.getSnapshot=e,we(i)&&r({inst:i})},[s,t,e]),un(function(){return we(i)&&r({inst:i}),s(function(){we(i)&&r({inst:i})})},[s]),fn(t),t}function we(s){var e=s.getSnapshot;s=s.value;try{var t=e();return!on(s,t)}catch{return!0}}function hn(s,e){return e()}var pn=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?hn:dn;ot.useSyncExternalStore=ee.useSyncExternalStore!==void 0?ee.useSyncExternalStore:pn;at.exports=ot;var gn=at.exports;const mn=(s,e)=>{if(V(e))return e;if(B(e)&&V(e.defaultValue))return e.defaultValue;if(typeof s=="function")return"";if(Array.isArray(s)){const t=s[s.length-1];return typeof t=="function"?"":t}return s},yn={t:mn,ready:!1},xn=()=>()=>{},Yn=(s,e={})=>{var g,L,I;const{i18n:t}=e,{i18n:n,defaultNS:i}=C.useContext(ke)||{},r=t||n||Ne();r&&!r.reportNamespaces&&(r.reportNamespaces=new rn),r||oe(r,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const a=C.useMemo(()=>{var P;return{...$e(),...(P=r==null?void 0:r.options)==null?void 0:P.react,...e}},[r,e]),{useSuspense:o,keyPrefix:u}=a,l=i||((g=r==null?void 0:r.options)==null?void 0:g.defaultNS),c=V(l)?[l]:l||["translation"],f=C.useMemo(()=>c,c);(I=(L=r==null?void 0:r.reportNamespaces)==null?void 0:L.addUsedNamespaces)==null||I.call(L,f);const p=C.useRef(0),h=C.useCallback(P=>{if(!r)return xn;const{bindI18n:v,bindI18nStore:x}=a,j=()=>{p.current+=1,P()};return v&&r.on(v,j),x&&r.store.on(x,j),()=>{v&&v.split(" ").forEach(O=>r.off(O,j)),x&&x.split(" ").forEach(O=>r.store.off(O,j))}},[r,a]),d=C.useRef(),m=C.useCallback(()=>{if(!r)return yn;const P=!!(r.isInitialized||r.initializedStoreOnce)&&f.every(H=>_t(H,r,a)),v=e.lng||r.language,x=p.current,j=d.current;if(j&&j.ready===P&&j.lng===v&&j.keyPrefix===u&&j.revision===x)return j;const A={t:r.getFixedT(v,a.nsMode==="fallback"?f:f[0],u,{scopeNs:f}),ready:P,lng:v,keyPrefix:u,revision:x};return d.current=A,A},[r,f,u,a,e.lng]),[b,T]=C.useState(0),{t:y,ready:k}=gn.useSyncExternalStore(h,m,m);C.useEffect(()=>{if(r&&!k&&!o){const P=()=>T(v=>v+1);e.lng?ze(r,e.lng,f,P):Le(r,f,P)}},[r,e.lng,f,k,o,b]);const w=r||{},E=C.useRef(null),F=C.useRef(),$=P=>{const v=Object.getOwnPropertyDescriptors(P);v.__original&&delete v.__original;const x=Object.create(Object.getPrototypeOf(P),v);if(!Object.prototype.hasOwnProperty.call(x,"__original"))try{Object.defineProperty(x,"__original",{value:P,writable:!1,enumerable:!1,configurable:!1})}catch{}return x},R=C.useMemo(()=>{const P=w,v=P==null?void 0:P.language;let x=P;P&&(E.current&&E.current.__original===P?F.current!==v?(x=$(P),E.current=x,F.current=v):x=E.current:(x=$(P),E.current=x,F.current=v));const j=!k&&!o?(...A)=>(oe(r,"USE_T_BEFORE_READY","useTranslation: t was called before ready. When using useSuspense: false, make sure to check the ready flag before using t."),y(...A)):y,O=[j,x,k];return O.t=j,O.i18n=x,O.ready=k,O},[y,w,k,w.resolvedLanguage,w.language,w.languages]);if(r&&o&&!k)throw new Promise(P=>{const v=()=>P();e.lng?ze(r,e.lng,f,v):Le(r,f,v)});return R};function Zn({i18n:s,defaultNS:e,children:t}){const n=C.useMemo(()=>({i18n:s,defaultNS:e}),[s,e]);return C.createElement(ke.Provider,{value:n},t)}const lt=["__proto__","constructor","prototype"];function ut(s){return!(typeof s!="string"||s.length===0||s.length>128||lt.indexOf(s)>-1||s.indexOf("..")>-1||s.indexOf("\\")>-1||/[?#%\s@]/.test(s)||/[\x00-\x1F\x7F]/.test(s))}function ct(s){return!(!ut(s)||s.indexOf("/")>-1)}function Sn(s){return ut(s)}const bn={lng:ct,ns:Sn};function ue(s){return typeof s!="string"?s:s.replace(/[\r\n\x00-\x1F\x7F]/g," ")}function wn(s){if(typeof s!="string"||s.length===0)return s;try{const e=new URL(s);return e.username||e.password?(e.username="",e.password="",e.toString()):s}catch{return s.replace(/(\/\/)[^/@\s]+@/g,"$1")}}function ft(){return typeof XMLHttpRequest=="function"||typeof XMLHttpRequest=="object"}function vn(s){return!!s&&typeof s.then=="function"}function Ln(s){return vn(s)?s:Promise.resolve(s)}const On=/\{\{(.+?)\}\}/g;function Be(s,e){let t=!1;const n=s.replace(On,(i,r)=>{const a=r.trim();if(lt.indexOf(a)>-1)return i;const o=e[a];if(o==null)return i;const u=bn[a]||ct,l=String(o).split("+");for(const c of l)if(!u(c))return t=!0,i;return l.join("+")});return t?null:n}const Z=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof window<"u"?window:void 0;let ge;typeof fetch=="function"?ge=fetch:Z&&typeof Z.fetch=="function"&&(ge=Z.fetch);const qe=ft()&&Z?Z.XMLHttpRequest:void 0,Cn=typeof ActiveXObject=="function"&&Z?Z.ActiveXObject:void 0,dt=["__proto__","constructor","prototype"],Ee=(s,e)=>{if(e&&typeof e=="object"){let t="";for(const n of Object.keys(e))dt.indexOf(n)>-1||(t+="&"+encodeURIComponent(n)+"="+encodeURIComponent(e[n]));if(!t)return s;s=s+(s.indexOf("?")!==-1?"&":"?")+t.slice(1)}return s},We=(s,e,t,n)=>{const i=r=>{if(!r.ok)return t(r.statusText||"Error",{status:r.status});r.text().then(a=>{t(null,{status:r.status,data:a})}).catch(t)};if(n){const r=n(s,e);if(r instanceof Promise){r.then(i).catch(t);return}}typeof fetch=="function"?fetch(s,e).then(i).catch(t):ge(s,e).then(i).catch(t)},En=(s,e,t,n)=>{s.queryStringParams&&(e=Ee(e,s.queryStringParams));const i={...typeof s.customHeaders=="function"?s.customHeaders():s.customHeaders};typeof window>"u"&&typeof global<"u"&&typeof global.process<"u"&&global.process.versions&&global.process.versions.node&&(i["User-Agent"]=`i18next-http-backend (node/${global.process.version}; ${global.process.platform} ${global.process.arch})`),t&&(i["Content-Type"]="application/json");const r=typeof s.requestOptions=="function"?s.requestOptions(t):s.requestOptions,a={method:t?"POST":"GET",body:t?s.stringify(t):void 0,headers:i,...s._omitFetchOptions?{}:r},o=typeof s.alternateFetch=="function"&&s.alternateFetch.length>=1?s.alternateFetch:void 0;try{We(e,a,n,o)}catch(u){if(!r||Object.keys(r).length===0||!u.message||u.message.indexOf("not implemented")<0)return n(u);try{Object.keys(r).forEach(l=>{delete a[l]}),We(e,a,n,o),s._omitFetchOptions=!0}catch(l){n(l)}}},$n=(s,e,t,n)=>{t&&typeof t=="object"&&(t=Ee("",t).slice(1)),s.queryStringParams&&(e=Ee(e,s.queryStringParams));try{const i=qe?new qe:new Cn("MSXML2.XMLHTTP.3.0");i.open(t?"POST":"GET",e,1),s.crossDomain||i.setRequestHeader("X-Requested-With","XMLHttpRequest"),i.withCredentials=!!s.withCredentials,t&&i.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),i.overrideMimeType&&i.overrideMimeType("application/json");let r=s.customHeaders;if(r=typeof r=="function"?r():r,r)for(const a of Object.keys(r))dt.indexOf(a)>-1||i.setRequestHeader(a,r[a]);i.onreadystatechange=()=>{i.readyState>3&&n(i.status>=400?i.statusText:null,{status:i.status,data:i.responseText})},i.send(t)}catch(i){console&&console.log(i)}},Nn=(s,e,t,n)=>{if(typeof t=="function"&&(n=t,t=void 0),n=n||(()=>{}),ge&&e.indexOf("file:")!==0)return En(s,e,t,n);if(ft()||typeof ActiveXObject=="function")return $n(s,e,t,n);n(new Error("No fetch and no xhr implementation found!"))},kn=()=>({loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",parse:s=>JSON.parse(s),stringify:JSON.stringify,parsePayload:(s,e,t)=>({[e]:t||""}),parseLoadPayload:(s,e)=>{},request:Nn,reloadInterval:typeof window<"u"?!1:3600*1e3,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}});var Pn=class{constructor(s,e={},t={}){this.services=s,this.options=e,this.allOptions=t,this.type="backend",this.init(s,e,t)}init(s,e={},t={}){if(this.services=s,this.options={...kn(),...this.options||{},...e},this.allOptions=t,this.services&&this.options.reloadInterval){const n=setInterval(()=>this.reload(),this.options.reloadInterval);typeof n=="object"&&typeof n.unref=="function"&&n.unref()}}readMulti(s,e,t){this._readAny(s,s,e,e,t)}read(s,e,t){this._readAny([s],s,[e],e,t)}_readAny(s,e,t,n,i){let r=this.options.loadPath;typeof this.options.loadPath=="function"&&(r=this.options.loadPath(s,t)),r=Ln(r),r.then(a=>{if(!a)return i(null,{});const o=Be(a,{lng:s.join("+"),ns:t.join("+")});if(o==null){const u=s.map(ue).join(", "),l=t.map(ue).join(", ");return i(new Error("i18next-http-backend: unsafe lng/ns value — refusing to build request URL for languages=["+u+"] namespaces=["+l+"]"),!1)}this.loadUrl(o,i,e,n)})}loadUrl(s,e,t,n){const i=typeof t=="string"?[t]:t,r=typeof n=="string"?[n]:n,a=this.options.parseLoadPayload(i,r),o=ue(wn(s));this.options.request(this.options,s,a,(u,l)=>{if(l&&(l.status>=500&&l.status<600||!l.status))return e("failed loading "+o+"; status code: "+l.status,!0);if(l&&l.status>=400&&l.status<500)return e("failed loading "+o+"; status code: "+l.status,!1);if(!l&&u&&u.message){const p=u.message.toLowerCase();if(["failed","fetch","network","load"].find(h=>p.indexOf(h)>-1))return e("failed loading "+o+": "+ue(u.message),!0)}if(u)return e(u,!1);let c,f;try{typeof l.data=="string"?c=this.options.parse(l.data,t,n):c=l.data}catch{f="failed parsing "+o+" to json"}if(f)return e(f,!1);e(null,c)})}create(s,e,t,n,i){if(!this.options.addPath)return;typeof s=="string"&&(s=[s]);const r=this.options.parsePayload(e,t,n);let a=0;const o=[],u=[];s.forEach(l=>{let c=this.options.addPath;typeof this.options.addPath=="function"&&(c=this.options.addPath(l,e));const f=Be(c,{lng:l,ns:e});if(f==null){a+=1,i&&a===s.length&&i(o,u);return}this.options.request(this.options,f,r,(p,h)=>{a+=1,o.push(p),u.push(h),a===s.length&&typeof i=="function"&&i(o,u)})})}reload(){const{backendConnector:s,languageUtils:e,logger:t}=this.services,n=s.language;if(n&&n.toLowerCase()==="cimode")return;const i=[],r=a=>{e.toResolveHierarchy(a).forEach(o=>{i.indexOf(o)<0&&i.push(o)})};r(n),this.allOptions.preload&&this.allOptions.preload.forEach(a=>r(a)),i.forEach(a=>{this.allOptions.ns.forEach(o=>{s.read(a,o,"read",null,null,(u,l)=>{u&&t.warn(`loading namespace ${o} for language ${a} failed`,u),!u&&l&&t.log(`loaded namespace ${o} for language ${a}`,l),s.loaded(`${a}|${o}`,u,l)})})})}};Pn.type="backend";const{slice:Rn,forEach:Tn}=[];function jn(s){return Tn.call(Rn.call(arguments,1),e=>{if(e)for(const t in e)s[t]===void 0&&(s[t]=e[t])}),s}function An(s){return typeof s!="string"?!1:[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(t=>t.test(s))}const Je=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,Fn=function(s,e){const n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},i=encodeURIComponent(e);let r=`${s}=${i}`;if(n.maxAge>0){const a=n.maxAge-0;if(Number.isNaN(a))throw new Error("maxAge should be a Number");r+=`; Max-Age=${Math.floor(a)}`}if(n.domain){if(!Je.test(n.domain))throw new TypeError("option domain is invalid");r+=`; Domain=${n.domain}`}if(n.path){if(!Je.test(n.path))throw new TypeError("option path is invalid");r+=`; Path=${n.path}`}if(n.expires){if(typeof n.expires.toUTCString!="function")throw new TypeError("option expires is invalid");r+=`; Expires=${n.expires.toUTCString()}`}if(n.httpOnly&&(r+="; HttpOnly"),n.secure&&(r+="; Secure"),n.sameSite)switch(typeof n.sameSite=="string"?n.sameSite.toLowerCase():n.sameSite){case!0:r+="; SameSite=Strict";break;case"lax":r+="; SameSite=Lax";break;case"strict":r+="; SameSite=Strict";break;case"none":r+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return n.partitioned&&(r+="; Partitioned"),r},Xe={create(s,e,t,n){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};t&&(i.expires=new Date,i.expires.setTime(i.expires.getTime()+t*60*1e3)),n&&(i.domain=n),document.cookie=Fn(s,e,i)},read(s){const e=`${s}=`,t=document.cookie.split(";");for(let n=0;n<t.length;n++){let i=t[n];for(;i.charAt(0)===" ";)i=i.substring(1,i.length);if(i.indexOf(e)===0)return i.substring(e.length,i.length)}return null},remove(s,e){this.create(s,"",-1,e)}};var In={name:"cookie",lookup(s){let{lookupCookie:e}=s;if(e&&typeof document<"u")return Xe.read(e)||void 0},cacheUserLanguage(s,e){let{lookupCookie:t,cookieMinutes:n,cookieDomain:i,cookieOptions:r}=e;t&&typeof document<"u"&&Xe.create(t,s,n,i,r)}},Dn={name:"querystring",lookup(s){var n;let{lookupQuerystring:e}=s,t;if(typeof window<"u"){let{search:i}=window.location;!window.location.search&&((n=window.location.hash)==null?void 0:n.indexOf("?"))>-1&&(i=window.location.hash.substring(window.location.hash.indexOf("?")));const a=i.substring(1).split("&");for(let o=0;o<a.length;o++){const u=a[o].indexOf("=");u>0&&a[o].substring(0,u)===e&&(t=a[o].substring(u+1))}}return t}},Vn={name:"hash",lookup(s){var i;let{lookupHash:e,lookupFromHashIndex:t}=s,n;if(typeof window<"u"){const{hash:r}=window.location;if(r&&r.length>2){const a=r.substring(1);if(e){const o=a.split("&");for(let u=0;u<o.length;u++){const l=o[u].indexOf("=");l>0&&o[u].substring(0,l)===e&&(n=o[u].substring(l+1))}}if(n)return n;if(!n&&t>-1){const o=r.match(/\/([a-zA-Z-]*)/g);return Array.isArray(o)?(i=o[typeof t=="number"?t:0])==null?void 0:i.replace("/",""):void 0}}}return n}};let G=null;const Ye=()=>{if(G!==null)return G;try{if(G=typeof window<"u"&&window.localStorage!==null,!G)return!1;const s="i18next.translate.boo";window.localStorage.setItem(s,"foo"),window.localStorage.removeItem(s)}catch{G=!1}return G};var Un={name:"localStorage",lookup(s){let{lookupLocalStorage:e}=s;if(e&&Ye())return window.localStorage.getItem(e)||void 0},cacheUserLanguage(s,e){let{lookupLocalStorage:t}=e;t&&Ye()&&window.localStorage.setItem(t,s)}};let Q=null;const Ze=()=>{if(Q!==null)return Q;try{if(Q=typeof window<"u"&&window.sessionStorage!==null,!Q)return!1;const s="i18next.translate.boo";window.sessionStorage.setItem(s,"foo"),window.sessionStorage.removeItem(s)}catch{Q=!1}return Q};var Hn={name:"sessionStorage",lookup(s){let{lookupSessionStorage:e}=s;if(e&&Ze())return window.sessionStorage.getItem(e)||void 0},cacheUserLanguage(s,e){let{lookupSessionStorage:t}=e;t&&Ze()&&window.sessionStorage.setItem(t,s)}},Mn={name:"navigator",lookup(s){const e=[];if(typeof navigator<"u"){const{languages:t,userLanguage:n,language:i}=navigator;if(t)for(let r=0;r<t.length;r++)e.push(t[r]);n&&e.push(n),i&&e.push(i)}return e.length>0?e:void 0}},_n={name:"htmlTag",lookup(s){let{htmlTag:e}=s,t;const n=e||(typeof document<"u"?document.documentElement:null);return n&&typeof n.getAttribute=="function"&&(t=n.getAttribute("lang")),t}},Kn={name:"path",lookup(s){var i;let{lookupFromPathIndex:e}=s;if(typeof window>"u")return;const t=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(t)?(i=t[typeof e=="number"?e:0])==null?void 0:i.replace("/",""):void 0}},zn={name:"subdomain",lookup(s){var i,r;let{lookupFromSubdomainIndex:e}=s;const t=typeof e=="number"?e+1:1,n=typeof window<"u"&&((r=(i=window.location)==null?void 0:i.hostname)==null?void 0:r.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(n)return n[t]}};let ht=!1;try{document.cookie,ht=!0}catch{}const pt=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];ht||pt.splice(1,1);const Bn=()=>({order:pt,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:s=>s});class qn{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(e,t)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=e,this.options=jn(t,this.options||{},Bn()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=i=>i.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=n,this.addDetector(In),this.addDetector(Dn),this.addDetector(Un),this.addDetector(Hn),this.addDetector(Mn),this.addDetector(_n),this.addDetector(Kn),this.addDetector(zn),this.addDetector(Vn)}addDetector(e){return this.detectors[e.name]=e,this}detect(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,t=[];return e.forEach(n=>{if(this.detectors[n]){let i=this.detectors[n].lookup(this.options);i&&typeof i=="string"&&(i=[i]),i&&(t=t.concat(i))}}),t=t.filter(n=>n!=null&&!An(n)).map(n=>this.options.convertDetectedLanguage(n)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?t:t.length>0?t[0]:null}cacheUserLanguage(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;t&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||t.forEach(n=>{this.detectors[n]&&this.detectors[n].cacheUserLanguage(e,this.options)}))}}qn.type="languageDetector";export{Pn as B,Zn as I,Xn as T,qn as a,U as b,Jn as i,gn as s,Yn as u};