vendor: 6,784 bytes, line 1
1import{a as j,r as Te}from"./vendor-react-Bjxsyr_G.js";const p=r=>typeof r=="string",z=()=>{let r,e;const t=new Promise((i,s)=>{r=i,e=s});return t.resolve=r,t.reject=e,t},ce=r=>r==null?"":""+r,De=(r,e,t)=>{r.forEach(i=>{e[i]&&(t[i]=e[i])})},Ve=/###/g,he=r=>r&&r.indexOf("###")>-1?r.replace(Ve,"."):r,de=r=>!r||p(r),B=(r,e,t)=>{const i=p(e)?e.split("."):e;let s=0;for(;s<i.length-1;){if(de(r))return{};const n=he(i[s]);!r[n]&&t&&(r[n]=new t),Object.prototype.hasOwnProperty.call(r,n)?r=r[n]:r={},++s}return de(r)?{}:{obj:r,k:he(i[s])}},ge=(r,e,t)=>{const{obj:i,k:s}=B(r,e,Object);if(i!==void 0||e.length===1){i[s]=t;return}let n=e[e.length-1],a=e.slice(0,e.length-1),o=B(r,a,Object);for(;o.obj===void 0&&a.length;)n=`${a[a.length-1]}.${n}`,a=a.slice(0,a.length-1),o=B(r,a,Object),o!=null&&o.obj&&typeof o.obj[`${o.k}.${n}`]<"u"&&(o.obj=void 0);o.obj[`${o.k}.${n}`]=t},Ae=(r,e,t,i)=>{const{obj:s,k:n}=B(r,e,Object);s[n]=s[n]||[],s[n].push(t)},q=(r,e)=>{const{obj:t,k:i}=B(r,e);if(t&&Object.prototype.hasOwnProperty.call(t,i))return t[i]},Ke=(r,e,t)=>{const i=q(r,t);return i!==void 0?i:q(e,t)},$e=(r,e,t)=>{for(const i in e)i!=="__proto__"&&i!=="constructor"&&(i in r?p(r[i])||r[i]instanceof String||p(e[i])||e[i]instanceof String?t&&(r[i]=e[i]):$e(r[i],e[i],t):r[i]=e[i]);return r},M=r=>r.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var Ue={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const Me=r=>p(r)?r.replace(/[&<>"'\/]/g,e=>Ue[e]):r;class He{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 i=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,i),this.regExpQueue.push(e),i}}const ze=[" ",",","?","!",";"],Be=new He(20),_e=(r,e,t)=>{e=e||"",t=t||"";const i=ze.filter(a=>e.indexOf(a)<0&&t.indexOf(a)<0);if(i.length===0)return!0;const s=Be.getRegExp(`(${i.map(a=>a==="?"?"\\?":a).join("|")})`);let n=!s.test(r);if(!n){const a=r.indexOf(t);a>0&&!s.test(r.substring(0,a))&&(n=!0)}return n},ne=(r,e,t=".")=>{if(!r)return;if(r[e])return Object.prototype.hasOwnProperty.call(r,e)?r[e]:void 0;const i=e.split(t);let s=r;for(let n=0;n<i.length;){if(!s||typeof s!="object")return;let a,o="";for(let l=n;l<i.length;++l)if(l!==n&&(o+=t),o+=i[l],a=s[o],a!==void 0){if(["string","number","boolean"].indexOf(typeof a)>-1&&l<i.length-1)continue;n+=l-n+1;break}s=a}return s},J=r=>r==null?void 0:r.replace("_","-"),Je={type:"logger",log(r){this.output("log",r)},warn(r){this.output("warn",r)},error(r){this.output("error",r)},output(r,e){var t,i;(i=(t=console==null?void 0:console[r])==null?void 0:t.apply)==null||i.call(t,console,e)}};class Q{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||"i18next:",this.logger=e||Je,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,"log","",!0)}warn(...e){return this.forward(e,"warn","",!0)}error(...e){return this.forward(e,"error","")}deprecate(...e){return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,i,s){return s&&!this.debug?null:(p(e[0])&&(e[0]=`${i}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new Q(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new Q(this.logger,e)}}var T=new Q;class X{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(i=>{this.observers[i]||(this.observers[i]=new Map);const s=this.observers[i].get(t)||0;this.observers[i].set(t,s+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([s,n])=>{for(let a=0;a<n;a++)s(...t)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([s,n])=>{for(let a=0;a<n;a++)s.apply(s,[e,...t])})}}class pe extends X{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.indexOf(e)<0&&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,i,s={}){var u,c;const n=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,a=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure;let o;e.indexOf(".")>-1?o=e.split("."):(o=[e,t],i&&(Array.isArray(i)?o.push(...i):p(i)&&n?o.push(...i.split(n)):o.push(i)));const l=q(this.data,o);return!l&&!t&&!i&&e.indexOf(".")>-1&&(e=o[0],t=o[1],i=o.slice(2).join(".")),l||!a||!p(i)?l:ne((c=(u=this.data)==null?void 0:u[e])==null?void 0:c[t],i,n)}addResource(e,t,i,s,n={silent:!1}){const a=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let o=[e,t];i&&(o=o.concat(a?i.split(a):i)),e.indexOf(".")>-1&&(o=e.split("."),s=t,t=o[1]),this.addNamespaces(t),ge(this.data,o,s),n.silent||this.emit("added",e,t,i,s)}addResources(e,t,i,s={silent:!1}){for(const n in i)(p(i[n])||Array.isArray(i[n]))&&this.addResource(e,t,n,i[n],{silent:!0});s.silent||this.emit("added",e,t,i)}addResourceBundle(e,t,i,s,n,a={silent:!1,skipCopy:!1}){let o=[e,t];e.indexOf(".")>-1&&(o=e.split("."),s=i,i=t,t=o[1]),this.addNamespaces(t);let l=q(this.data,o)||{};a.skipCopy||(i=JSON.parse(JSON.stringify(i))),s?$e(l,i,n):l={...l,...i},ge(this.data,o,l),a.silent||this.emit("added",e,t,i)}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(s=>t[s]&&Object.keys(t[s]).length>0)}toJSON(){return this.data}}var Ee={processors:{},addPostProcessor(r){this.processors[r.name]=r},handle(r,e,t,i,s){return r.forEach(n=>{var a;e=((a=this.processors[n])==null?void 0:a.process(e,t,i,s))??e}),e}};const ke=Symbol("i18next/PATH_KEY");function We(){const r=[],e=Object.create(null);let t;return e.get=(i,s)=>{var n;return(n=t==null?void 0:t.revoke)==null||n.call(t),s===ke?r:(r.push(s),t=Proxy.revocable(i,e),t.proxy)},Proxy.revocable(Object.create(null),e).proxy}function re(r,e){const{[ke]:t}=r(We());return t.join((e==null?void 0:e.keySeparator)??".")}const me={},ee=r=>!p(r)&&typeof r!="boolean"&&typeof r!="number";class Z extends X{constructor(e,t={}){super(),De(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","
1i18nFormat","utils"],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=T.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){const i={...t};if(e==null)return!1;const s=this.resolve(e,i);if((s==null?void 0:s.res)===void 0)return!1;const n=ee(s.res);return!(i.returnObjects===!1&&n)}extractFromKey(e,t){let i=t.nsSeparator!==void 0?t.nsSeparator:this.options.nsSeparator;i===void 0&&(i=":");const s=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator;let n=t.ns||this.options.defaultNS||[];const a=i&&e.indexOf(i)>-1,o=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!_e(e,i,s);if(a&&!o){const l=e.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:e,namespaces:p(n)?[n]:n};const u=e.split(i);(i!==s||i===s&&this.options.ns.indexOf(u[0])>-1)&&(n=u.shift()),e=u.join(s)}return{key:e,namespaces:p(n)?[n]:n}}translate(e,t,i){let s=typeof t=="object"?{...t}:t;if(typeof s!="object"&&this.options.overloadTranslationOptionHandler&&(s=this.options.overloadTranslationOptionHandler(arguments)),typeof s=="object"&&(s={...s}),s||(s={}),e==null)return"";typeof e=="function"&&(e=re(e,{...this.options,...s})),Array.isArray(e)||(e=[String(e)]);const n=s.returnDetails!==void 0?s.returnDetails:this.options.returnDetails,a=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,{key:o,namespaces:l}=this.extractFromKey(e[e.length-1],s),u=l[l.length-1];let c=s.nsSeparator!==void 0?s.nsSeparator:this.options.nsSeparator;c===void 0&&(c=":");const f=s.lng||this.language,g=s.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((f==null?void 0:f.toLowerCase())==="cimode")return g?n?{res:`${u}${c}${o}`,usedKey:o,exactUsedKey:o,usedLng:f,usedNS:u,usedParams:this.getUsedParamsDetails(s)}:`${u}${c}${o}`:n?{res:o,usedKey:o,exactUsedKey:o,usedLng:f,usedNS:u,usedParams:this.getUsedParamsDetails(s)}:o;const d=this.resolve(e,s);let h=d==null?void 0:d.res;const m=(d==null?void 0:d.usedKey)||o,b=(d==null?void 0:d.exactUsedKey)||o,E=["[object Number]","[object Function]","[object RegExp]"],v=s.joinArrays!==void 0?s.joinArrays:this.options.joinArrays,R=!this.i18nFormat||this.i18nFormat.handleAsObject,O=s.count!==void 0&&!p(s.count),N=Z.hasDefaultValue(s),D=O?this.pluralResolver.getSuffix(f,s.count,s):"",F=s.ordinal&&O?this.pluralResolver.getSuffix(f,s.count,{ordinal:!1}):"",V=O&&!s.ordinal&&s.count===0,C=V&&s[`defaultValue${this.options.pluralSeparator}zero`]||s[`defaultValue${D}`]||s[`defaultValue${F}`]||s.defaultValue;let L=h;R&&!h&&N&&(L=C);const W=ee(L),S=Object.prototype.toString.apply(L);
vendor: 30,713 bytes, line 1
1if(R&&L&&W&&E.indexOf(S)<0&&!(p(v)&&Array.isArray(L))){if(!s.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const y=this.options.returnedObjectHandler?this.options.returnedObjectHandler(m,L,{...s,ns:l}):`key '${o} (${this.language})' returned an object instead of string.`;return n?(d.res=y,d.usedParams=this.getUsedParamsDetails(s),d):y}if(a){const y=Array.isArray(L),x=y?[]:{},w=y?b:m;for(const P in L)if(Object.prototype.hasOwnProperty.call(L,P)){const I=`${w}${a}${P}`;N&&!h?x[P]=this.translate(I,{...s,defaultValue:ee(C)?C[P]:void 0,joinArrays:!1,ns:l}):x[P]=this.translate(I,{...s,joinArrays:!1,ns:l}),x[P]===I&&(x[P]=L[P])}h=x}}else if(R&&p(v)&&Array.isArray(h))h=h.join(v),h&&(h=this.extendTranslation(h,e,s,i));else{let y=!1,x=!1;!this.isValidLookup(h)&&N&&(y=!0,h=C),this.isValidLookup(h)||(x=!0,h=o);const P=(s.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&x?void 0:h,I=N&&C!==h&&this.options.updateMissing;if(x||y||I){if(this.logger.log(I?"updateKey":"missingKey",f,u,o,I?C:h),a){const k=this.resolve(o,{...s,keySeparator:!1});k&&k.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 A=[];const Y=this.languageUtils.getFallbackCodes(this.options.fallbackLng,s.lng||this.language);if(this.options.saveMissingTo==="fallback"&&Y&&Y[0])for(let k=0;k<Y.length;k++)A.push(Y[k]);else this.options.saveMissingTo==="all"?A=this.languageUtils.toResolveHierarchy(s.lng||this.language):A.push(s.lng||this.language);const le=(k,K,H)=>{var fe;const ue=N&&H!==h?H:P;this.options.missingKeyHandler?this.options.missingKeyHandler(k,u,K,ue,I,s):(fe=this.backendConnector)!=null&&fe.saveMissing&&this.backendConnector.saveMissing(k,u,K,ue,I,s),this.emit("missingKey",k,u,K,h)};this.options.saveMissing&&(this.options.saveMissingPlurals&&O?A.forEach(k=>{const K=this.pluralResolver.getSuffixes(k,s);V&&s[`defaultValue${this.options.pluralSeparator}zero`]&&K.indexOf(`${this.options.pluralSeparator}zero`)<0&&K.push(`${this.options.pluralSeparator}zero`),K.forEach(H=>{le([k],o+H,s[`defaultValue${H}`]||C)})}):le(A,o,C))}h=this.extendTranslation(h,e,s,d,i),x&&h===o&&this.options.appendNamespaceToMissingKey&&(h=`${u}${c}${o}`),(x||y)&&this.options.parseMissingKeyHandler&&(h=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${u}${c}${o}`:o,y?h:void 0,s))}return n?(d.res=h,d.usedParams=this.getUsedParamsDetails(s),d):h}extendTranslation(e,t,i,s,n){var l,u;if((l=this.i18nFormat)!=null&&l.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...i},i.lng||this.language||s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!i.skipInterpolation){i.interpolation&&this.interpolator.init({...i,interpolation:{...this.options.interpolation,...i.interpolation}});const c=p(e)&&(((u=i==null?void 0:i.interpolation)==null?void 0:u.skipOnVariables)!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let f;if(c){const d=e.match(this.interpolator.nestingRegexp);f=d&&d.length}let g=i.replace&&!p(i.replace)?i.replace:i;if(this.options.interpolation.defaultVariables&&(g={...this.options.interpolation.defaultVariables,...g}),e=this.interpolator.interpolate(e,g,i.lng||this.language||s.usedLng,i),c){const d=e.match(this.interpolator.nestingRegexp),h=d&&d.length;f<h&&(i.nest=!1)}!i.lng&&s&&s.res&&(i.lng=this.language||s.usedLng),i.nest!==!1&&(e=this.interpolator.nest(e,(...d)=>(n==null?void 0:n[0])===d[0]&&!i.context?(this.logger.warn(`It seems you are nesting recursively key: ${d[0]} in key: ${t[0]}`),null):this.translate(...d,t),i)),i.interpolation&&this.interpolator.reset()}const a=i.postProcess||this.options.postProcess,o=p(a)?[a]:a;return e!=null&&(o!=null&&o.length)&&i.applyPostProcessor!==!1&&(e=Ee.handle(o,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...s,usedParams:this.getUsedParamsDetails(i)},...i}:i,this)),e}resolve(e,t={}){let i,s,n,a,o;return p(e)&&(e=[e]),e.forEach(l=>{if(this.isValidLookup(i))return;const u=this.extractFromKey(l,t),c=u.key;s=c;let f=u.namespaces;this.options.fallbackNS&&(f=f.concat(this.options.fallbackNS));const g=t.count!==void 0&&!p(t.count),d=g&&!t.ordinal&&t.count===0,h=t.context!==void 0&&(p(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 E,v;this.isValidLookup(i)||(o=b,!me[`${m[0]}-${b}`]&&((E=this.utils)!=null&&E.hasLoadedNamespace)&&!((v=this.utils)!=null&&v.hasLoadedNamespace(o))&&(me[`${m[0]}-${b}`]=!0,this.logger.warn(`key "${s}" 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(R=>{var D;if(this.isValidLookup(i))return;a=R;const O=[c];if((D=this.i18nFormat)!=null&&D.addLookupKeys)this.i18nFormat.addLookupKeys(O,c,R,b,t);else{let F;g&&(F=this.pluralResolver.getSuffix(R,t.count,t));const V=`${this.options.pluralSeparator}zero`,C=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(g&&(t.ordinal&&F.indexOf(C)===0&&O.push(c+F.replace(C,this.options.pluralSeparator)),O.push(c+F),d&&O.push(c+V)),h){const L=`${c}${this.options.contextSeparator||"_"}${t.context}`;O.push(L),g&&(t.ordinal&&F.indexOf(C)===0&&O.push(L+F.replace(C,this.options.pluralSeparator)),O.push(L+F),d&&O.push(L+V))}}let N;for(;N=O.pop();)this.isValidLookup(i)||(n=N,i=this.getResource(R,b,N,t))}))})}),{res:i,usedKey:s,exactUsedKey:n,usedLng:a,usedNS:o}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,t,i,s={}){var n;return(n=this.i18nFormat)!=null&&n.getResource?this.i18nFormat.getResource(e,t,i,s):this.resourceStore.getResource(e,t,i,s)}getUsedParamsDetails(e={}){const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],i=e.replace&&!p(e.replace);let s=i?e.replace:e;if(i&&typeof e.count<"u"&&(s.count=e.count),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!i){s={...s};for(const n of t)delete s[n]}return s}static hasDefaultValue(e){const t="defaultValue";for(const i in e)if(Object.prototype.hasOwnProperty.call(e,i)&&t===i.substring(0,t.length)&&e[i]!==void 0)return!0;return!1}}class ye{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=T.create("languageUtils")}getScriptPartFromCode(e){if(e=J(e),!e||e.indexOf("-")<0)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=J(e),!e||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(p(e)&&e.indexOf("-")>-1){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.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(i=>{if(t)return;const s=this.formatLanguageCode(i);(!this.options.supportedLngs||this.isSupportedCode(s))&&(t=s)}),!t&&this.options.supportedLngs&&e.forEach(i=>{if(t)return;const s=this.getScriptPartFromCode(i);if(this.isSupportedCode(s))return t=s;const n=this.getLanguagePartFromCode(i);if(this.isSupportedCode(n))return t=n;t=this.options.supportedLngs.find(a=>{if(a===n)return a;if(!(a.indexOf("-")<0&&n.indexOf("-")<0)&&(a.indexOf("-")>0&&n.indexOf("-")<0&&a.substring(0,a.indexOf("-"))===n||a.indexOf(n)===0&&n.length>1))return a})}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if(typeof e=="function"&&(e=e(t)),p(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let i=e[t];return i||(i=e[this.getScriptPartFromCode(t)]),i||(i=e[this.formatLanguageCode(t)]),i||(i=e[this.getLanguagePartFromCode(t)]),i||(i=e.default),i||[]}toResolveHierarchy(e,t){const i=this.getFallbackCodes((t===!1?[]:t)||this.options.fallbackLng||[],e),s=[],n=a=>{a&&(this.isSupportedCode(a)?s.push(a):this.logger.warn(`rejecting language code not found in supportedLngs: ${a}`))};return p(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&n(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&n(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&n(this.getLanguagePartFromCode(e))):p(e)&&n(this.formatLanguageCode(e)),i.forEach(a=>{s.indexOf(a)<0&&n(this.formatLanguageCode(a))}),s}}const xe={zero:0,one:1,two:2,few:3,many:4,other:5},Se={select:r=>r===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class Ye{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=T.create("pluralResolver"),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){const i=J(e==="dev"?"en":e),s=t.ordinal?"ordinal":"cardinal",n=JSON.stringify({cleanedCode:i,type:s});if(n in this.pluralRulesCache)return this.pluralRulesCache[n];let a;try{a=new Intl.PluralRules(i,{type:s})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),Se;if(!e.match(/-|_/))return Se;const l=this.languageUtils.getLanguagePartFromCode(e);a=this.getRule(l,t)}return this.pluralRulesCache[n]=a,a}needsPlural(e,t={}){let i=this.getRule(e,t);return i||(i=this.getRule("dev",t)),(i==null?void 0:i.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(e,t,i={}){return this.getSuffixes(e,i).map(s=>`${t}${s}`)}getSuffixes(e,t={}){let i=this.getRule(e,t);return i||(i=this.getRule("dev",t)),i?i.resolvedOptions().pluralCategories.sort((s,n)=>xe[s]-xe[n]).map(s=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${s}`):[]}getSuffix(e,t,i={}){const s=this.getRule(e,i);return s?`${this.options.prepend}${i.ordinal?`ordinal${this.options.prepend}`:""}${s.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,i))}}const be=(r,e,t,i=".",s=!0)=>{let n=Ke(r,e,t);return!n&&s&&p(t)&&(n=ne(r,t,i),n===void 0&&(n=ne(e,t,i))),n},te=r=>r.replace(/\$/g,"$$$$");class Oe{constructor(e={}){var t;this.logger=T.create("interpolator"),this.options=e,this.format=((t=e==null?void 0:e.interpolation)==null?void 0:t.format)||(i=>i),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:i,useRawValueToEscape:s,prefix:n,prefixEscaped:a,suffix:o,suffixEscaped:l,formatSeparator:u,unescapeSuffix:c,unescapePrefix:f,nestingPrefix:g,nestingPrefixEscaped:d,nestingSuffix:h,nestingSuffixEscaped:m,nestingOptionsSeparator:b,maxReplaces:E,alwaysFormat:v}=e.interpolation;this.escape=t!==void 0?t:Me,this.escapeValue=i!==void 0?i:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=n?M(n):a||"{{",this.suffix=o?M(o):l||"}}",this.formatSeparator=u||",",this.unescapePrefix=c?"":f||"-",this.unescapeSuffix=this.unescapePrefix?"":c||"",this.nestingPrefix=g?M(g):d||M("$t("),this.nestingSuffix=h?M(h):m||M(")"),this.nestingOptionsSeparator=b||",",this.maxReplaces=E||1e3,this.alwaysFormat=v!==void 0?v:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(t,i)=>(t==null?void 0:t.source)===i?(t.lastIndex=0,t):new RegExp(i,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,i,s){var d;let n,a,o;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=h=>{if(h.indexOf(this.formatSeparator)<0){const v=be(t,l,h,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(v,void 0,i,{...s,...t,interpolationkey:h}):v}const m=h.split(this.formatSeparator),b=m.shift().trim(),E=m.join(this.formatSeparator).trim();return this.format(be(t,l,b,this.options.keySeparator,this.options.ignoreJSONStructure),E,i,{...s,...t,interpolationkey:b})};this.resetRegExp();const c=(s==null?void 0:s.missingInterpolationHandler)||this.options.missingInterpolationHandler,f=((d=s==null?void 0:s.interpolation)==null?void 0:d.skipOnVariables)!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:h=>te(h)},{regex:this.regexp,safeValue:h=>this.escapeValue?te(this.escape(h)):te(h)}].forEach(h=>{for(o=0;n=h.regex.exec(e);){const m=n[1].trim();if(a=u(m),a===void 0)if(typeof c=="function"){const E=c(e,n,s);a=p(E)?E:""}else if(s&&Object.prototype.hasOwnProperty.call(s,m))a="";else if(f){a=n[0];continue}else this.logger.warn(`missed to pass in variable ${m} for interpolating ${e}`),a="";else!p(a)&&!this.useRawValueToEscape&&(a=ce(a));const b=h.safeValue(a);if(e=e.replace(n[0],b),f?(h.regex.lastIndex+=a.length,h.regex.lastIndex-=n[0].length):h.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),e}nest(e,t,i={}){let s,n,a;const o=(l,u)=>{const c=this.nestingOptionsSeparator;if(l.indexOf(c)<0)return l;const f=l.split(new RegExp(`${c}[ ]*{`));let g=`{${f[1]}`;l=f[0],g=this.interpolate(g,a);const d=g.match(/'/g),h=g.match(/"/g);(((d==null?void 0:d.length)??0)%2===0&&!h||h.length%2!==0)&&(g=g.replace(/'/g,'"'));try{a=JSON.parse(g),u&&(a={...u,...a})}catch(m){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,m),`${l}${c}${g}`}return a.defaultValue&&a.defaultValue.indexOf(this.prefix)>-1&&delete a.defaultValue,l};for(;s=this.nestingRegexp.exec(e);){let l=[];a={...i},a=a.replace&&!p(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;const u=/{.*}/.test(s[1])?s[1].lastIndexOf("}")+1:s[1].indexOf(this.formatSeparator);if(u!==-1&&(l=s[1].slice(u).split(this.formatSeparator).map(c=>c.trim()).filter(Boolean),s[1]=s[1].slice(0,u)),n=t(o.call(this,s[1].trim(),a),a),n&&s[0]===e&&!p(n))return n;p(n)||(n=ce(n)),n||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${e}`),n=""),l.length&&(n=l.reduce((c,f)=>this.format(c,f,i.lng,{...i,interpolationkey:s[1].trim()}),n.trim())),e=e.replace(s[0],n),this.regexp.lastIndex=0}return e}}const Ge=r=>{let e=r.toLowerCase().trim();const t={};if(r.indexOf("(")>-1){const i=r.split("(");e=i[0].toLowerCase().trim();const s=i[1].substring(0,i[1].length-1);e==="currency"&&s.indexOf(":")<0?t.currency||(t.currency=s.trim()):e==="relativetime"&&s.indexOf(":")<0?t.range||(t.range=s.trim()):s.split(";").forEach(a=>{if(a){const[o,...l]=a.split(":"),u=l.join(":").trim().replace(/^'+|'+$/g,""),c=o.trim();t[c]||(t[c]=u),u==="false"&&(t[c]=!1),u==="true"&&(t[c]=!0),isNaN(u)||(t[c]=parseInt(u,10))}})}return{formatName:e,formatOptions:t}},Le=r=>{const e={};return(t,i,s)=>{let n=s;s&&s.interpolationkey&&s.formatParams&&s.formatParams[s.interpolationkey]&&s[s.interpolationkey]&&(n={...n,[s.interpolationkey]:void 0});const a=i+JSON.stringify(n);let o=e[a];return o||(o=r(J(i),s),e[a]=o),o(t)}},qe=r=>(e,t,i)=>r(J(t),i)(e);class Qe{constructor(e={}){this.logger=T.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";const i=t.cacheInBuiltFormats?Le:qe;this.formats={number:i((s,n)=>{const a=new Intl.NumberFormat(s,{...n});return o=>a.format(o)}),currency:i((s,n)=>{const a=new Intl.NumberFormat(s,{...n,style:"currency"});return o=>a.format(o)}),datetime:i((s,n)=>{const a=new Intl.DateTimeFormat(s,{...n});return o=>a.format(o)}),relativetime:i((s,n)=>{const a=new Intl.RelativeTimeFormat(s,{...n});return o=>a.format(o,n.range||"day")}),list:i((s,n)=>{const a=new Intl.ListFormat(s,{...n});return o=>a.format(o)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=Le(t)}format(e,t,i,s={}){const n=t.split(this.formatSeparator);if(n.length>1&&n[0].indexOf("(")>1&&n[0].indexOf(")")<0&&n.find(o=>o.indexOf(")")>-1)){const o=n.findIndex(l=>l.indexOf(")")>-1);n[0]=[n[0],...n.splice(1,o)].join(this.formatSeparator)}return n.reduce((o,l)=>{var f;const{formatName:u,formatOptions:c}=Ge(l);if(this.formats[u]){let g=o;try{const d=((f=s==null?void 0:s.formatParams)==null?void 0:f[s.interpolationkey])||{},h=d.locale||d.lng||s.locale||s.lng||i;g=this.formats[u](o,h,{...c,...s,...d})}catch(d){this.logger.warn(d)}return g}else this.logger.warn(`there was no format function for ${u}`);return o},e)}}const Ze=(r,e)=>{r.pending[e]!==void 0&&(delete r.pending[e],r.pendingCount--)};class Xe extends X{constructor(e,t,i,s={}){var n,a;super(),this.backend=e,this.store=t,this.services=i,this.languageUtils=i.languageUtils,this.options=s,this.logger=T.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=[],(a=(n=this.backend)==null?void 0:n.init)==null||a.call(n,i,s.backend,s)}queueLoad(e,t,i,s){const n={},a={},o={},l={};return e.forEach(u=>{let c=!0;t.forEach(f=>{const g=`${u}|${f}`;!i.reload&&this.store.hasResourceBundle(u,f)?this.state[g]=2:this.state[g]<0||(this.state[g]===1?a[g]===void 0&&(a[g]=!0):(this.state[g]=1,c=!1,a[g]===void 0&&(a[g]=!0),n[g]===void 0&&(n[g]=!0),l[f]===void 0&&(l[f]=!0)))}),c||(o[u]=!0)}),(Object.keys(n).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(n),pending:Object.keys(a),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(l)}}loaded(e,t,i){const s=e.split("|"),n=s[0],a=s[1];t&&this.emit("failedLoading",n,a,t),!t&&i&&this.store.addResourceBundle(n,a,i,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&i&&(this.state[e]=0);const o={};this.queue.forEach(l=>{Ae(l.loaded,[n],a),Ze(l,e),t&&l.errors.push(t),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(u=>{o[u]||(o[u]={});const c=l.loaded[u];c.length&&c.forEach(f=>{o[u][f]===void 0&&(o[u][f]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",o),this.queue=this.queue.filter(l=>!l.done)}read(e,t,i,s=0,n=this.retryTimeout,a){if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:i,tried:s,wait:n,callback:a});return}this.readingCalls++;const o=(u,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(u&&c&&s<this.maxRetries){setTimeout(()=>{this.read.call(this,e,t,i,s+1,n*2,a)},n);return}a(u,c)},l=this.backend[i].bind(this.backend);if(l.length===2){try{const u=l(e,t);u&&typeof u.then=="function"?u.then(c=>o(null,c)).catch(o):o(null,u)}catch(u){o(u)}return}return l(e,t,o)}prepareLoading(e,t,i={},s){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),s&&s();p(e)&&(e=this.languageUtils.toResolveHierarchy(e)),p(t)&&(t=[t]);const n=this.queueLoad(e,t,i,s);if(!n.toLoad.length)return n.pending.length||s(),null;n.toLoad.forEach(a=>{this.loadOne(a)})}load(e,t,i){this.prepareLoading(e,t,{},i)}reload(e,t,i){this.prepareLoading(e,t,{reload:!0},i)}loadOne(e,t=""){const i=e.split("|"),s=i[0],n=i[1];this.read(s,n,"read",void 0,void 0,(a,o)=>{a&&this.logger.warn(`${t}loading namespace ${n} for language ${s} failed`,a),!a&&o&&this.logger.log(`${t}loaded namespace ${n} for language ${s}`,o),this.loaded(e,a,o)})}saveMissing(e,t,i,s,n,a={},o=()=>{}){var l,u,c,f,g;if((u=(l=this.services)==null?void 0:l.utils)!=null&&u.hasLoadedNamespace&&!((f=(c=this.services)==null?void 0:c.utils)!=null&&f.hasLoadedNamespace(t))){this.logger.warn(`did not save key "${i}" 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(!(i==null||i==="")){if((g=this.backend)!=null&&g.create){const d={...a,isUpdate:n},h=this.backend.create.bind(this.backend);if(h.length<6)try{let m;h.length===5?m=h(e,t,i,s,d):m=h(e,t,i,s),m&&typeof m.then=="function"?m.then(b=>o(null,b)).catch(o):o(null,m)}catch(m){o(m)}else h(e,t,i,s,o,d)}!e||!e[0]||this.store.addResource(e[0],t,i,s)}}}const we=()=>({debug:!1,initAsync:!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:r=>{let e={};if(typeof r[1]=="object"&&(e=r[1]),p(r[1])&&(e.defaultValue=r[1]),p(r[2])&&(e.tDescription=r[2]),typeof r[2]=="object"||typeof r[3]=="object"){const t=r[3]||r[2];Object.keys(t).forEach(i=>{e[i]=t[i]})}return e},interpolation:{escapeValue:!0,format:r=>r,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),ve=r=>{var e,t;return p(r.ns)&&(r.ns=[r.ns]),p(r.fallbackLng)&&(r.fallbackLng=[r.fallbackLng]),p(r.fallbackNS)&&(r.fallbackNS=[r.fallbackNS]),((t=(e=r.supportedLngs)==null?void 0:e.indexOf)==null?void 0:t.call(e,"cimode"))<0&&(r.supportedLngs=r.supportedLngs.concat(["cimode"])),typeof r.initImmediate=="boolean"&&(r.initAsync=r.initImmediate),r},G=()=>{},et=r=>{Object.getOwnPropertyNames(Object.getPrototypeOf(r)).forEach(t=>{typeof r[t]=="function"&&(r[t]=r[t].bind(r))})};class _ extends X{constructor(e={},t){if(super(),this.options=ve(e),this.services={},this.logger=T,this.modules={external:[]},et(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&&(p(e.ns)?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));const i=we();this.options={...i,...this.options,...ve(e)},this.options.interpolation={...i.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator);const s=u=>u?typeof u=="function"?new u:u:null;if(!this.options.isClone){this.modules.logger?T.init(s(this.modules.logger),this.options):T.init(null,this.options);let u;this.modules.formatter?u=this.modules.formatter:u=Qe;const c=new ye(this.options);this.store=new pe(this.options.resources,this.options);const f=this.services;f.logger=T,f.resourceStore=this.store,f.languageUtils=c,f.pluralResolver=new Ye(c,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==i.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),u&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(f.formatter=s(u),f.formatter.init&&f.formatter.init(f,this.options),this.options.interpolation.format=f.formatter.format.bind(f.formatter)),f.interpolator=new Oe(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new Xe(s(this.modules.backend),f.resourceStore,f,this.options),f.backendConnector.on("*",(d,...h)=>{this.emit(d,...h)}),this.modules.languageDetector&&(f.languageDetector=s(this.modules.languageDetector),f.languageDetector.init&&f.languageDetector.init(f,this.options.detection,this.options)),this.modules.i18nFormat&&(f.i18nFormat=s(this.modules.i18nFormat),f.i18nFormat.init&&f.i18nFormat.init(this)),this.translator=new Z(this.services,this.options),this.translator.on("*",(d,...h)=>{this.emit(d,...h)}),this.modules.external.forEach(d=>{d.init&&d.init(this)})}if(this.format=this.options.interpolation.format,t||(t=G),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const u=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);u.length>0&&u[0]!=="dev"&&(this.options.lng=u[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(u=>{this[u]=(...c)=>this.store[u](...c)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(u=>{this[u]=(...c)=>(this.store[u](...c),this)});const o=z(),l=()=>{const u=(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.isInitialized)return u(null,this.t.bind(this));this.changeLanguage(this.options.lng,u)};return this.options.resources||!this.options.initAsync?l():setTimeout(l,0),o}loadResources(e,t=G){var n,a;let i=t;const s=p(e)?e:this.language;if(typeof e=="function"&&(i=e),!this.options.resources||this.options.partialBundledLanguages){if((s==null?void 0:s.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return i();const o=[],l=u=>{if(!u||u==="cimode")return;this.services.languageUtils.toResolveHierarchy(u).forEach(f=>{f!=="cimode"&&o.indexOf(f)<0&&o.push(f)})};s?l(s):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(c=>l(c)),(a=(n=this.options.preload)==null?void 0:n.forEach)==null||a.call(n,u=>l(u)),this.services.backendConnector.load(o,this.options.ns,u=>{!u&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),i(u)})}else i(null)}reloadResources(e,t,i){const s=z();return typeof e=="function"&&(i=e,e=void 0),typeof t=="function"&&(i=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),i||(i=G),this.services.backendConnector.reload(e,t,n=>{s.resolve(),i(n)}),s}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"&&Ee.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"].indexOf(e)>-1)){for(let t=0;t<this.languages.length;t++){const i=this.languages[t];if(!(["cimode","dev"].indexOf(i)>-1)&&this.store.hasLanguageSomeTranslations(i)){this.resolvedLanguage=i;break}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;const i=z();this.emit("languageChanging",e);const s=o=>{this.language=o,this.languages=this.services.languageUtils.toResolveHierarchy(o),this.resolvedLanguage=void 0,this.setResolvedLanguage(o)},n=(o,l)=>{l?this.isLanguageChangingTo===e&&(s(l),this.translator.changeLanguage(l),this.isLanguageChangingTo=void 0,this.emit("languageChanged",l),this.logger.log("languageChanged",l)):this.isLanguageChangingTo=void 0,i.resolve((...u)=>this.t(...u)),t&&t(o,(...u)=>this.t(...u))},a=o=>{var c,f;!e&&!o&&this.services.languageDetector&&(o=[]);const l=p(o)?o:o&&o[0],u=this.store.hasLanguageSomeTranslations(l)?l:this.services.languageUtils.getBestMatchFromCodes(p(o)?[o]:o);u&&(this.language||s(u),this.translator.language||this.translator.changeLanguage(u),(f=(c=this.services.languageDetector)==null?void 0:c.cacheUserLanguage)==null||f.call(c,u)),this.loadResources(u,g=>{n(g,u)})};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),i}getFixedT(e,t,i){const s=(n,a,...o)=>{let l;typeof a!="object"?l=this.options.overloadTranslationOptionHandler([n,a].concat(o)):l={...a},l.lng=l.lng||s.lng,l.lngs=l.lngs||s.lngs,l.ns=l.ns||s.ns,l.keyPrefix!==""&&(l.keyPrefix=l.keyPrefix||i||s.keyPrefix);const u=this.options.keySeparator||".";let c;return l.keyPrefix&&Array.isArray(n)?c=n.map(f=>(typeof f=="function"&&(f=re(f,{...this.options,...a})),`${l.keyPrefix}${u}${f}`)):(typeof n=="function"&&(n=re(n,{...this.options,...a})),c=l.keyPrefix?`${l.keyPrefix}${u}${n}`:n),this.t(c,l)};return p(e)?s.lng=e:s.lngs=e,s.ns=t,s.keyPrefix=i,s}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;
1if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const i=t.lng||this.resolvedLanguage||this.languages[0],s=this.options?this.options.fallbackLng:!1,n=this.languages[this.languages.length-1];if(i.toLowerCase()==="cimode")return!0;const a=(o,l)=>{const u=this.services.backendConnector.state[`${o}|${l}`];return u===-1||u===0||u===2};if(t.precheck){const o=t.precheck(this,a);if(o!==void 0)return o}return!!(this.hasResourceBundle(i,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(i,e)&&(!s||a(n,e)))}loadNamespaces(e,t){const i=z();return this.options.ns?(p(e)&&(e=[e]),e.forEach(s=>{this.options.ns.indexOf(s)<0&&this.options.ns.push(s)}),this.loadResources(s=>{i.resolve(),t&&t(s)}),i):(t&&t(),Promise.resolve())}loadLanguages(e,t){const i=z();p(e)&&(e=[e]);const s=this.options.preload||[],n=e.filter(a=>s.indexOf(a)<0&&this.services.languageUtils.isSupportedCode(a));return n.length?(this.options.preload=s.concat(n),this.loadResources(a=>{i.resolve(),t&&t(a)}),i):(t&&t(),Promise.resolve())}dir(e){var s,n;if(e||(e=this.resolvedLanguage||(((s=this.languages)==null?void 0:s.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"],i=((n=this.services)==null?void 0:n.languageUtils)||new ye(we());return e.toLowerCase().indexOf("-latn")>1?"ltr":t.indexOf(i.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},t){const i=new _(e,t);return i.createInstance=_.createInstance,i}cloneInstance(e={},t=G){const i=e.forkResourceStore;i&&delete e.forkResourceStore;const s={...this.options,...e,isClone:!0},n=new _(s);if((e.debug!==void 0||e.prefix!==void 0)&&(n.logger=n.logger.clone(e)),["store","services","language"].forEach(o=>{n[o]=this[o]}),n.services={...this.services},n.services.utils={hasLoadedNamespace:n.hasLoadedNamespace.bind(n)},i){const o=Object.keys(this.store.data).reduce((l,u)=>(l[u]={...this.store.data[u]},l[u]=Object.keys(l[u]).reduce((c,f)=>(c[f]={...l[u][f]},c),l[u]),l),{});n.store=new pe(o,s),n.services.resourceStore=n.store}return e.interpolation&&(n.services.interpolator=new Oe(s)),n.translator=new Z(n.services,s),n.translator.on("*",(o,...l)=>{n.emit(o,...l)}),n.init(s,t),n.translator.options=s,n.translator.backendConnector.services.utils={hasLoadedNamespace:n.hasLoadedNamespace.bind(n)},n}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const $=_.createInstance();$.createInstance;$.dir;$.init;$.loadResources;$.reloadResources;$.use;$.changeLanguage;$.getFixedT;$.t;$.exists;$.setDefaultNamespace;$.hasLoadedNamespace;$.loadNamespaces;$.loadLanguages;const tt=(r,e,t,i)=>{var n,a,o,l;const s=[t,{code:e,...i||{}}];if((a=(n=r==null?void 0:r.services)==null?void 0:n.logger)!=null&&a.forward)return r.services.logger.forward(s,"warn","react-i18next::",!0);U(s[0])&&(s[0]=`react-i18next:: ${s[0]}`),(l=(o=r==null?void 0:r.services)==null?void 0:o.logger)!=null&&l.warn?r.services.logger.warn(...s):console!=null&&console.warn},Ce={},je=(r,e,t,i)=>{U(t)&&Ce[t]||(U(t)&&(Ce[t]=new Date),tt(r,e,t,i))},Fe=(r,e)=>()=>{if(r.isInitialized)e();else{const t=()=>{setTimeout(()=>{r.off("initialized",t)},0),e()};r.on("initialized",t)}},ae=(r,e,t)=>{r.loadNamespaces(e,Fe(r,t))},Re=(r,e,t,i)=>{if(U(t)&&(t=[t]),r.options.preload&&r.options.preload.indexOf(e)>-1)return ae(r,t,i);t.forEach(s=>{r.options.ns.indexOf(s)<0&&r.options.ns.push(s)}),r.loadLanguages(e,Fe(r,i))},st=(r,e,t={})=>
1!e.languages||!e.languages.length?(je(e,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:e.languages}),!0):e.hasLoadedNamespace(r,{lng:t.lng,precheck:(i,s)=>{if(t.bindI18n&&t.bindI18n.indexOf("languageChanging")>-1&&i.services.backendConnector.backend&&i.isLanguageChangingTo&&!s(i.isLanguageChangingTo,r))return!1}}),U=r=>typeof r=="string",it=r=>typeof r=="object"&&r!==null,nt=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,rt={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"â¦","…":"â¦","/":"/","/":"/"},at=r=>rt[r],ot=r=>r.replace(nt,at);let oe={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:ot};const lt=(r={})=>{oe={...oe,...r}},ut=()=>oe;let Ie;const ft=r=>{Ie=r},ct=()=>Ie,Ot={type:"3rdParty",init(r){lt(r.options.react),ft(r)}},ht=j.createContext();class dt{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(t=>{this.usedNamespaces[t]||(this.usedNamespaces[t]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}var se={exports:{}},ie={};/** 2 * @license React 3 * use-sync-external-store-shim.production.js 4 * 5 * Copyright (c) Meta Platforms, Inc. and affiliates. 6 * 7 * This source code is licensed under the MIT license found in the 8 * LICENSE file in the root directory of this source tree. 9 */var Ne;function gt(){if(Ne)return ie;Ne=1;var r=Te();function e(f,g){return f===g&&(f!==0||1/f===1/g)||f!==f&&g!==g}var t=typeof Object.is=="function"?Object.is:e,i=r.useState,s=r.useEffect,n=r.useLayoutEffect,a=r.useDebugValue;function o(f,g){var d=g(),h=i({inst:{value:d,getSnapshot:g}}),m=h[0].inst,b=h[1];return n(function(){m.value=d,m.getSnapshot=g,l(m)&&b({inst:m})},[f,d,g]),s(function(){return l(m)&&b({inst:m}),f(function(){l(m)&&b({inst:m})})},[f]),a(d),d}function l(f){var g=f.getSnapshot;f=f.value;try{var d=g();return!t(f,d)}catch{return!0}}function u(f,g){return g()}var c=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:o;return ie.useSyncExternalStore=r.useSyncExternalStore!==void 0?r.useSyncExternalStore:c,ie}var Pe;function pt(){return Pe||(Pe=1,se.exports=gt()),se.exports}var mt=pt();const yt=(r,e)=>U(e)?e:it(e)&&U(e.defaultValue)?e.defaultValue:Array.isArray(r)?r[r.length-1]:r,xt={t:yt,ready:!1},St=()=>()=>{},Lt=(r,e={})=>{var C,L,W;const{i18n:t}=e,{i18n:i,defaultNS:s}=j.useContext(ht)||{},n=t||i||ct();n&&!n.reportNamespaces&&(n.reportNamespaces=new dt),n||je(n,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const a=j.useMemo(()=>{var S;return{...ut(),...(S=n==null?void 0:n.options)==null?void 0:S.react,...e}},[n,e]),{useSuspense:o,keyPrefix:l}=a,u=s||((C=n==null?void 0:n.options)==null?void 0:C.defaultNS),c=U(u)?[u]:u||["translation"],f=j.useMemo(()=>c,c);(W=(L=n==null?void 0:n.reportNamespaces)==null?void 0:L.addUsedNamespaces)==null||W.call(L,f);const g=j.useRef(0),d=j.useCallback(S=>{if(!n)return St;const{bindI18n:y,bindI18nStore:x}=a,w=()=>{g.current+=1,S()};return y&&n.on(y,w),x&&n.store.on(x,w),()=>{y&&y.split(" ").forEach(P=>n.off(P,w)),x&&x.split(" ").forEach(P=>n.store.off(P,w))}},[n,a]),h=j.useRef(),m=j.useCallback(()=>{if(!n)return xt;const S=!!(n.isInitialized||n.initializedStoreOnce)&&f.every(A=>st(A,n,a)),y=e.lng||n.language,x=g.current,w=h.current;if(w&&w.ready===S&&w.lng===y&&w.keyPrefix===l&&w.revision===x)return w;const I={t:n.getFixedT(y,a.nsMode==="fallback"?f:f[0],l),ready:S,lng:y,keyPrefix:l,revision:x};return h.current=I,I},[n,f,l,a,e.lng]),[b,E]=j.useState(0),{t:v,ready:R}=mt.useSyncExternalStore(d,m,m);j.useEffect(()=>{if(n&&!R&&!o){const S=()=>E(y=>y+1);e.lng?Re(n,e.lng,f,S):ae(n,f,S)}},[n,e.lng,f,R,o,b]);const O=n||{},N=j.useRef(null),D=j.useRef(),F=S=>{const y=Object.getOwnPropertyDescriptors(S);y.__original&&delete y.__original;const x=Object.create(Object.getPrototypeOf(S),y);if(!Object.prototype.hasOwnProperty.call(x,"__original"))try{Object.defineProperty(x,"__original",{value:S,writable:!1,enumerable:!1,
9configurable:!1})}catch{}return x},V=j.useMemo(()=>{const S=O,y=S==null?void 0:S.language;let x=S;S&&(N.current&&N.current.__original===S?D.current!==y?(x=F(S),N.current=x,D.current=y):x=N.current:(x=F(S),N.current=x,D.current=y));const w=[v,x,R];return w.t=v,w.i18n=x,w.ready=R,w},[v,O,R,O.resolvedLanguage,O.language,O.languages]);if(n&&o&&!R)throw new Promise(S=>{const y=()=>S();e.lng?Re(n,e.lng,f,y):ae(n,f,y)});return V};export{Ot as a,$ as i,Lt as u};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.