PHP-Course/exam/dist/assets/i18n-Be01V9yD.js
2024-07-29 16:14:18 +02:00

3 lines
84 KiB
JavaScript

var ft=Object.defineProperty;var ct=(r,e,t)=>e in r?ft(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var Oe=(r,e,t)=>ct(r,typeof e!="symbol"?e+"":e,t);import{g as Xe,r as j,e as Z}from"./react-C9_qfvjK.js";function dt(r,e){for(var t=0;t<e.length;t++){const n=e[t];if(typeof n!="string"&&!Array.isArray(n)){for(const s in n)if(s!=="default"&&!(s in r)){const i=Object.getOwnPropertyDescriptor(n,s);i&&Object.defineProperty(r,s,i.get?i:{enumerable:!0,get:()=>n[s]})}}}return Object.freeze(Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}))}const ht={type:"logger",log(r){this.output("log",r)},warn(r){this.output("warn",r)},error(r){this.output("error",r)},output(r,e){console&&console[r]&&console[r].apply(console,e)}};class ae{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(e,t)}init(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||ht,this.options=t,this.debug=t.debug}log(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"log","",!0)}warn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","",!0)}error(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"error","")}deprecate(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,n,s){return s&&!this.debug?null:(typeof e[0]=="string"&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new ae(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new ae(this.logger,e)}}var H=new ae;class he{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(n=>{this.observers[n]||(this.observers[n]=new Map);const s=this.observers[n].get(t)||0;this.observers[n].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){for(var t=arguments.length,n=new Array(t>1?t-1:0),s=1;s<t;s++)n[s-1]=arguments[s];this.observers[e]&&Array.from(this.observers[e].entries()).forEach(o=>{let[a,u]=o;for(let l=0;l<u;l++)a(...n)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(o=>{let[a,u]=o;for(let l=0;l<u;l++)a.apply(a,[e,...n])})}}function G(){let r,e;const t=new Promise((n,s)=>{r=n,e=s});return t.resolve=r,t.reject=e,t}function Pe(r){return r==null?"":""+r}function pt(r,e,t){r.forEach(n=>{e[n]&&(t[n]=e[n])})}const gt=/###/g;function ee(r,e,t){function n(a){return a&&a.indexOf("###")>-1?a.replace(gt,"."):a}function s(){return!r||typeof r=="string"}const i=typeof e!="string"?e:e.split(".");let o=0;for(;o<i.length-1;){if(s())return{};const a=n(i[o]);!r[a]&&t&&(r[a]=new t),Object.prototype.hasOwnProperty.call(r,a)?r=r[a]:r={},++o}return s()?{}:{obj:r,k:n(i[o])}}function Le(r,e,t){const{obj:n,k:s}=ee(r,e,Object);if(n!==void 0||e.length===1){n[s]=t;return}let i=e[e.length-1],o=e.slice(0,e.length-1),a=ee(r,o,Object);for(;a.obj===void 0&&o.length;)i=`${o[o.length-1]}.${i}`,o=o.slice(0,o.length-1),a=ee(r,o,Object),a&&a.obj&&typeof a.obj[`${a.k}.${i}`]<"u"&&(a.obj=void 0);a.obj[`${a.k}.${i}`]=t}function mt(r,e,t,n){const{obj:s,k:i}=ee(r,e,Object);s[i]=s[i]||[],s[i].push(t)}function ue(r,e){const{obj:t,k:n}=ee(r,e);if(t)return t[n]}function yt(r,e,t){const n=ue(r,t);return n!==void 0?n:ue(e,t)}function We(r,e,t){for(const n in e)n!=="__proto__"&&n!=="constructor"&&(n in r?typeof r[n]=="string"||r[n]instanceof String||typeof e[n]=="string"||e[n]instanceof String?t&&(r[n]=e[n]):We(r[n],e[n],t):r[n]=e[n]);return r}function _(r){return r.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var bt={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function vt(r){return typeof r=="string"?r.replace(/[&<>"'\/]/g,e=>bt[e]):r}class wt{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 xt=[" ",",","?","!",";"],St=new wt(20);function Ot(r,e,t){e=e||"",t=t||"";const n=xt.filter(o=>e.indexOf(o)<0&&t.indexOf(o)<0);if(n.length===0)return!0;const s=St.getRegExp(`(${n.map(o=>o==="?"?"\\?":o).join("|")})`);let i=!s.test(r);if(!i){const o=r.indexOf(t);o>0&&!s.test(r.substring(0,o))&&(i=!0)}return i}function be(r,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!r)return;if(r[e])return r[e];const n=e.split(t);let s=r;for(let i=0;i<n.length;){if(!s||typeof s!="object")return;let o,a="";for(let u=i;u<n.length;++u)if(u!==i&&(a+=t),a+=n[u],o=s[a],o!==void 0){if(["string","number","boolean"].indexOf(typeof o)>-1&&u<n.length-1)continue;i+=u-i+1;break}s=o}return s}function le(r){return r&&r.indexOf("_")>0?r.replace("_","-"):r}class Ee extends he{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{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,n){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const i=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,o=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;e.indexOf(".")>-1?a=e.split("."):(a=[e,t],n&&(Array.isArray(n)?a.push(...n):typeof n=="string"&&i?a.push(...n.split(i)):a.push(n)));const u=ue(this.data,a);return!u&&!t&&!n&&e.indexOf(".")>-1&&(e=a[0],t=a[1],n=a.slice(2).join(".")),u||!o||typeof n!="string"?u:be(this.data&&this.data[e]&&this.data[e][t],n,i)}addResource(e,t,n,s){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const o=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator;let a=[e,t];n&&(a=a.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(a=e.split("."),s=t,t=a[1]),this.addNamespaces(t),Le(this.data,a,s),i.silent||this.emit("added",e,t,n,s)}addResources(e,t,n){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const i in n)(typeof n[i]=="string"||Array.isArray(n[i]))&&this.addResource(e,t,i,n[i],{silent:!0});s.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,s,i){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},a=[e,t];e.indexOf(".")>-1&&(a=e.split("."),s=n,n=t,t=a[1]),this.addNamespaces(t);let u=ue(this.data,a)||{};o.skipCopy||(n=JSON.parse(JSON.stringify(n))),s?We(u,n,i):u={...u,...n},Le(this.data,a,u),o.silent||this.emit("added",e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(e,t)}: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 Ge={processors:{},addPostProcessor(r){this.processors[r.name]=r},handle(r,e,t,n,s){return r.forEach(i=>{this.processors[i]&&(e=this.processors[i].process(e,t,n,s))}),e}};const Ce={};class fe extends he{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),pt(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=H.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(e==null)return!1;const n=this.resolve(e,t);return n&&n.res!==void 0}extractFromKey(e,t){let n=t.nsSeparator!==void 0?t.nsSeparator:this.options.nsSeparator;n===void 0&&(n=":");const s=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator;let i=t.ns||this.options.defaultNS||[];const o=n&&e.indexOf(n)>-1,a=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!Ot(e,n,s);if(o&&!a){const u=e.match(this.interpolator.nestingRegexp);if(u&&u.length>0)return{key:e,namespaces:i};const l=e.split(n);(n!==s||n===s&&this.options.ns.indexOf(l[0])>-1)&&(i=l.shift()),e=l.join(s)}return typeof i=="string"&&(i=[i]),{key:e,namespaces:i}}translate(e,t,n){if(typeof t!="object"&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),typeof t=="object"&&(t={...t}),t||(t={}),e==null)return"";Array.isArray(e)||(e=[String(e)]);const s=t.returnDetails!==void 0?t.returnDetails:this.options.returnDetails,i=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator,{key:o,namespaces:a}=this.extractFromKey(e[e.length-1],t),u=a[a.length-1],l=t.lng||this.language,d=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(l&&l.toLowerCase()==="cimode"){if(d){const L=t.nsSeparator||this.options.nsSeparator;return s?{res:`${u}${L}${o}`,usedKey:o,exactUsedKey:o,usedLng:l,usedNS:u,usedParams:this.getUsedParamsDetails(t)}:`${u}${L}${o}`}return s?{res:o,usedKey:o,exactUsedKey:o,usedLng:l,usedNS:u,usedParams:this.getUsedParamsDetails(t)}:o}const h=this.resolve(e,t);let c=h&&h.res;const m=h&&h.usedKey||o,g=h&&h.exactUsedKey||o,y=Object.prototype.toString.apply(c),b=["[object Number]","[object Function]","[object RegExp]"],O=t.joinArrays!==void 0?t.joinArrays:this.options.joinArrays,x=!this.i18nFormat||this.i18nFormat.handleAsObject;if(x&&c&&(typeof c!="string"&&typeof c!="boolean"&&typeof c!="number")&&b.indexOf(y)<0&&!(typeof O=="string"&&Array.isArray(c))){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const L=this.options.returnedObjectHandler?this.options.returnedObjectHandler(m,c,{...t,ns:a}):`key '${o} (${this.language})' returned an object instead of string.`;return s?(h.res=L,h.usedParams=this.getUsedParamsDetails(t),h):L}if(i){const L=Array.isArray(c),S=L?[]:{},w=L?g:m;for(const N in c)if(Object.prototype.hasOwnProperty.call(c,N)){const $=`${w}${i}${N}`;S[N]=this.translate($,{...t,joinArrays:!1,ns:a}),S[N]===$&&(S[N]=c[N])}c=S}}else if(x&&typeof O=="string"&&Array.isArray(c))c=c.join(O),c&&(c=this.extendTranslation(c,e,t,n));else{let L=!1,S=!1;const w=t.count!==void 0&&typeof t.count!="string",N=fe.hasDefaultValue(t),$=w?this.pluralResolver.getSuffix(l,t.count,t):"",T=t.ordinal&&w?this.pluralResolver.getSuffix(l,t.count,{ordinal:!1}):"",D=w&&!t.ordinal&&t.count===0&&this.pluralResolver.shouldUseIntlApi(),R=D&&t[`defaultValue${this.options.pluralSeparator}zero`]||t[`defaultValue${$}`]||t[`defaultValue${T}`]||t.defaultValue;!this.isValidLookup(c)&&N&&(L=!0,c=R),this.isValidLookup(c)||(S=!0,c=o);const M=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&S?void 0:c,I=N&&R!==c&&this.options.updateMissing;if(S||L||I){if(this.logger.log(I?"updateKey":"missingKey",l,u,o,I?R:c),i){const P=this.resolve(o,{...t,keySeparator:!1});P&&P.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 f=[];const p=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if(this.options.saveMissingTo==="fallback"&&p&&p[0])for(let P=0;P<p.length;P++)f.push(p[P]);else this.options.saveMissingTo==="all"?f=this.languageUtils.toResolveHierarchy(t.lng||this.language):f.push(t.lng||this.language);const v=(P,A,E)=>{const K=N&&E!==c?E:M;this.options.missingKeyHandler?this.options.missingKeyHandler(P,u,A,K,I,t):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(P,u,A,K,I,t),this.emit("missingKey",P,u,A,c)};this.options.saveMissing&&(this.options.saveMissingPlurals&&w?f.forEach(P=>{const A=this.pluralResolver.getSuffixes(P,t);D&&t[`defaultValue${this.options.pluralSeparator}zero`]&&A.indexOf(`${this.options.pluralSeparator}zero`)<0&&A.push(`${this.options.pluralSeparator}zero`),A.forEach(E=>{v([P],o+E,t[`defaultValue${E}`]||R)})}):v(f,o,R))}c=this.extendTranslation(c,e,t,h,n),S&&c===o&&this.options.appendNamespaceToMissingKey&&(c=`${u}:${o}`),(S||L)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?c=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${u}:${o}`:o,L?c:void 0):c=this.options.parseMissingKeyHandler(c))}return s?(h.res=c,h.usedParams=this.getUsedParamsDetails(t),h):c}extendTranslation(e,t,n,s,i){var o=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const l=typeof e=="string"&&(n&&n.interpolation&&n.interpolation.skipOnVariables!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let d;if(l){const c=e.match(this.interpolator.nestingRegexp);d=c&&c.length}let h=n.replace&&typeof n.replace!="string"?n.replace:n;if(this.options.interpolation.defaultVariables&&(h={...this.options.interpolation.defaultVariables,...h}),e=this.interpolator.interpolate(e,h,n.lng||this.language||s.usedLng,n),l){const c=e.match(this.interpolator.nestingRegexp),m=c&&c.length;d<m&&(n.nest=!1)}!n.lng&&this.options.compatibilityAPI!=="v1"&&s&&s.res&&(n.lng=this.language||s.usedLng),n.nest!==!1&&(e=this.interpolator.nest(e,function(){for(var c=arguments.length,m=new Array(c),g=0;g<c;g++)m[g]=arguments[g];return i&&i[0]===m[0]&&!n.context?(o.logger.warn(`It seems you are nesting recursively key: ${m[0]} in key: ${t[0]}`),null):o.translate(...m,t)},n)),n.interpolation&&this.interpolator.reset()}const a=n.postProcess||this.options.postProcess,u=typeof a=="string"?[a]:a;return e!=null&&u&&u.length&&n.applyPostProcessor!==!1&&(e=Ge.handle(u,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...s,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n,s,i,o,a;return typeof e=="string"&&(e=[e]),e.forEach(u=>{if(this.isValidLookup(n))return;const l=this.extractFromKey(u,t),d=l.key;s=d;let h=l.namespaces;this.options.fallbackNS&&(h=h.concat(this.options.fallbackNS));const c=t.count!==void 0&&typeof t.count!="string",m=c&&!t.ordinal&&t.count===0&&this.pluralResolver.shouldUseIntlApi(),g=t.context!==void 0&&(typeof t.context=="string"||typeof t.context=="number")&&t.context!=="",y=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);h.forEach(b=>{this.isValidLookup(n)||(a=b,!Ce[`${y[0]}-${b}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(a)&&(Ce[`${y[0]}-${b}`]=!0,this.logger.warn(`key "${s}" for languages "${y.join(", ")}" won't get resolved as namespace "${a}" 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!!!")),y.forEach(O=>{if(this.isValidLookup(n))return;o=O;const x=[d];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(x,d,O,b,t);else{let L;c&&(L=this.pluralResolver.getSuffix(O,t.count,t));const S=`${this.options.pluralSeparator}zero`,w=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(c&&(x.push(d+L),t.ordinal&&L.indexOf(w)===0&&x.push(d+L.replace(w,this.options.pluralSeparator)),m&&x.push(d+S)),g){const N=`${d}${this.options.contextSeparator}${t.context}`;x.push(N),c&&(x.push(N+L),t.ordinal&&L.indexOf(w)===0&&x.push(N+L.replace(w,this.options.pluralSeparator)),m&&x.push(N+S))}}let k;for(;k=x.pop();)this.isValidLookup(n)||(i=k,n=this.getResource(O,b,k,t))}))})}),{res:n,usedKey:s,exactUsedKey:i,usedLng:o,usedNS:a}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,t,n){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,s):this.resourceStore.getResource(e,t,n,s)}getUsedParamsDetails(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&typeof e.replace!="string";let s=n?e.replace:e;if(n&&typeof e.count<"u"&&(s.count=e.count),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!n){s={...s};for(const i of t)delete s[i]}return s}static hasDefaultValue(e){const t="defaultValue";for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,t.length)&&e[n]!==void 0)return!0;return!1}}function pe(r){return r.charAt(0).toUpperCase()+r.slice(1)}class Ne{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=H.create("languageUtils")}getScriptPartFromCode(e){if(e=le(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=le(e),!e||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(typeof e=="string"&&e.indexOf("-")>-1){const t=["hans","hant","latn","cyrl","cans","mong","arab"];let n=e.split("-");return this.options.lowerCaseLng?n=n.map(s=>s.toLowerCase()):n.length===2?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=pe(n[1].toLowerCase()))):n.length===3&&(n[0]=n[0].toLowerCase(),n[1].length===2&&(n[1]=n[1].toUpperCase()),n[0]!=="sgn"&&n[2].length===2&&(n[2]=n[2].toUpperCase()),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=pe(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=pe(n[2].toLowerCase()))),n.join("-")}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(n=>{if(t)return;const s=this.formatLanguageCode(n);(!this.options.supportedLngs||this.isSupportedCode(s))&&(t=s)}),!t&&this.options.supportedLngs&&e.forEach(n=>{if(t)return;const s=this.getLanguagePartFromCode(n);if(this.isSupportedCode(s))return t=s;t=this.options.supportedLngs.find(i=>{if(i===s)return i;if(!(i.indexOf("-")<0&&s.indexOf("-")<0)&&(i.indexOf("-")>0&&s.indexOf("-")<0&&i.substring(0,i.indexOf("-"))===s||i.indexOf(s)===0&&s.length>1))return i})}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if(typeof e=="function"&&(e=e(t)),typeof e=="string"&&(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||this.options.fallbackLng||[],e),s=[],i=o=>{o&&(this.isSupportedCode(o)?s.push(o):this.logger.warn(`rejecting language code not found in supportedLngs: ${o}`))};return typeof e=="string"&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&i(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&i(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&i(this.getLanguagePartFromCode(e))):typeof e=="string"&&i(this.formatLanguageCode(e)),n.forEach(o=>{s.indexOf(o)<0&&i(this.formatLanguageCode(o))}),s}}let Pt=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],Lt={1:function(r){return+(r>1)},2:function(r){return+(r!=1)},3:function(r){return 0},4:function(r){return r%10==1&&r%100!=11?0:r%10>=2&&r%10<=4&&(r%100<10||r%100>=20)?1:2},5:function(r){return r==0?0:r==1?1:r==2?2:r%100>=3&&r%100<=10?3:r%100>=11?4:5},6:function(r){return r==1?0:r>=2&&r<=4?1:2},7:function(r){return r==1?0:r%10>=2&&r%10<=4&&(r%100<10||r%100>=20)?1:2},8:function(r){return r==1?0:r==2?1:r!=8&&r!=11?2:3},9:function(r){return+(r>=2)},10:function(r){return r==1?0:r==2?1:r<7?2:r<11?3:4},11:function(r){return r==1||r==11?0:r==2||r==12?1:r>2&&r<20?2:3},12:function(r){return+(r%10!=1||r%100==11)},13:function(r){return+(r!==0)},14:function(r){return r==1?0:r==2?1:r==3?2:3},15:function(r){return r%10==1&&r%100!=11?0:r%10>=2&&(r%100<10||r%100>=20)?1:2},16:function(r){return r%10==1&&r%100!=11?0:r!==0?1:2},17:function(r){return r==1||r%10==1&&r%100!=11?0:1},18:function(r){return r==0?0:r==1?1:2},19:function(r){return r==1?0:r==0||r%100>1&&r%100<11?1:r%100>10&&r%100<20?2:3},20:function(r){return r==1?0:r==0||r%100>0&&r%100<20?1:2},21:function(r){return r%100==1?1:r%100==2?2:r%100==3||r%100==4?3:0},22:function(r){return r==1?0:r==2?1:(r<0||r>10)&&r%10==0?2:3}};const Et=["v1","v2","v3"],Ct=["v4"],Re={zero:0,one:1,two:2,few:3,many:4,other:5};function Nt(){const r={};return Pt.forEach(e=>{e.lngs.forEach(t=>{r[t]={numbers:e.nr,plurals:Lt[e.fc]}})}),r}class Rt{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=H.create("pluralResolver"),(!this.options.compatibilityJSON||Ct.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=Nt()}addRule(e,t){this.rules[e]=t}getRule(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(le(e==="dev"?"en":e),{type:t.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=this.getRule(e,t);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}getPluralFormsOfKey(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(e,n).map(s=>`${t}${s}`)}getSuffixes(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=this.getRule(e,t);return n?this.shouldUseIntlApi()?n.resolvedOptions().pluralCategories.sort((s,i)=>Re[s]-Re[i]).map(s=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${s}`):n.numbers.map(s=>this.getSuffix(e,s,t)):[]}getSuffix(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const s=this.getRule(e,n);return s?this.shouldUseIntlApi()?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${s.select(t)}`:this.getSuffixRetroCompatible(s,t):(this.logger.warn(`no plural rule found for: ${e}`),"")}getSuffixRetroCompatible(e,t){const n=e.noAbs?e.plurals(t):e.plurals(Math.abs(t));let s=e.numbers[n];this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1&&(s===2?s="plural":s===1&&(s=""));const i=()=>this.options.prepend&&s.toString()?this.options.prepend+s.toString():s.toString();return this.options.compatibilityJSON==="v1"?s===1?"":typeof s=="number"?`_plural_${s.toString()}`:i():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1?i():this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString()}shouldUseIntlApi(){return!Et.includes(this.options.compatibilityJSON)}}function ke(r,e,t){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,i=yt(r,e,t);return!i&&s&&typeof t=="string"&&(i=be(r,t,n),i===void 0&&(i=be(e,t,n))),i}class kt{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=H.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||(t=>t),this.init(e)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:n,useRawValueToEscape:s,prefix:i,prefixEscaped:o,suffix:a,suffixEscaped:u,formatSeparator:l,unescapeSuffix:d,unescapePrefix:h,nestingPrefix:c,nestingPrefixEscaped:m,nestingSuffix:g,nestingSuffixEscaped:y,nestingOptionsSeparator:b,maxReplaces:O,alwaysFormat:x}=e.interpolation;this.escape=t!==void 0?t:vt,this.escapeValue=n!==void 0?n:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=i?_(i):o||"{{",this.suffix=a?_(a):u||"}}",this.formatSeparator=l||",",this.unescapePrefix=d?"":h||"-",this.unescapeSuffix=this.unescapePrefix?"":d||"",this.nestingPrefix=c?_(c):m||_("$t("),this.nestingSuffix=g?_(g):y||_(")"),this.nestingOptionsSeparator=b||",",this.maxReplaces=O||1e3,this.alwaysFormat=x!==void 0?x:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(t,n)=>t&&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,s){let i,o,a;const u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function l(g){return g.replace(/\$/g,"$$$$")}const d=g=>{if(g.indexOf(this.formatSeparator)<0){const x=ke(t,u,g,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(x,void 0,n,{...s,...t,interpolationkey:g}):x}const y=g.split(this.formatSeparator),b=y.shift().trim(),O=y.join(this.formatSeparator).trim();return this.format(ke(t,u,b,this.options.keySeparator,this.options.ignoreJSONStructure),O,n,{...s,...t,interpolationkey:b})};this.resetRegExp();const h=s&&s.missingInterpolationHandler||this.options.missingInterpolationHandler,c=s&&s.interpolation&&s.interpolation.skipOnVariables!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:g=>l(g)},{regex:this.regexp,safeValue:g=>this.escapeValue?l(this.escape(g)):l(g)}].forEach(g=>{for(a=0;i=g.regex.exec(e);){const y=i[1].trim();if(o=d(y),o===void 0)if(typeof h=="function"){const O=h(e,i,s);o=typeof O=="string"?O:""}else if(s&&Object.prototype.hasOwnProperty.call(s,y))o="";else if(c){o=i[0];continue}else this.logger.warn(`missed to pass in variable ${y} for interpolating ${e}`),o="";else typeof o!="string"&&!this.useRawValueToEscape&&(o=Pe(o));const b=g.safeValue(o);if(e=e.replace(i[0],b),c?(g.regex.lastIndex+=o.length,g.regex.lastIndex-=i[0].length):g.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),e}nest(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s,i,o;function a(u,l){const d=this.nestingOptionsSeparator;if(u.indexOf(d)<0)return u;const h=u.split(new RegExp(`${d}[ ]*{`));let c=`{${h[1]}`;u=h[0],c=this.interpolate(c,o);const m=c.match(/'/g),g=c.match(/"/g);(m&&m.length%2===0&&!g||g.length%2!==0)&&(c=c.replace(/'/g,'"'));try{o=JSON.parse(c),l&&(o={...l,...o})}catch(y){return this.logger.warn(`failed parsing options string in nesting for key ${u}`,y),`${u}${d}${c}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,u}for(;s=this.nestingRegexp.exec(e);){let u=[];o={...n},o=o.replace&&typeof o.replace!="string"?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;let l=!1;if(s[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(s[1])){const d=s[1].split(this.formatSeparator).map(h=>h.trim());s[1]=d.shift(),u=d,l=!0}if(i=t(a.call(this,s[1].trim(),o),o),i&&s[0]===e&&typeof i!="string")return i;typeof i!="string"&&(i=Pe(i)),i||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${e}`),i=""),l&&(i=u.reduce((d,h)=>this.format(d,h,n.lng,{...n,interpolationkey:s[1].trim()}),i.trim())),e=e.replace(s[0],i),this.regexp.lastIndex=0}return e}}function At(r){let e=r.toLowerCase().trim();const t={};if(r.indexOf("(")>-1){const n=r.split("(");e=n[0].toLowerCase().trim();const s=n[1].substring(0,n[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(o=>{if(o){const[a,...u]=o.split(":"),l=u.join(":").trim().replace(/^'+|'+$/g,""),d=a.trim();t[d]||(t[d]=l),l==="false"&&(t[d]=!1),l==="true"&&(t[d]=!0),isNaN(l)||(t[d]=parseInt(l,10))}})}return{formatName:e,formatOptions:t}}function z(r){const e={};return function(n,s,i){const o=s+JSON.stringify(i);let a=e[o];return a||(a=r(le(s),i),e[o]=a),a(n)}}class $t{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=H.create("formatter"),this.options=e,this.formats={number:z((t,n)=>{const s=new Intl.NumberFormat(t,{...n});return i=>s.format(i)}),currency:z((t,n)=>{const s=new Intl.NumberFormat(t,{...n,style:"currency"});return i=>s.format(i)}),datetime:z((t,n)=>{const s=new Intl.DateTimeFormat(t,{...n});return i=>s.format(i)}),relativetime:z((t,n)=>{const s=new Intl.RelativeTimeFormat(t,{...n});return i=>s.format(i,n.range||"day")}),list:z((t,n)=>{const s=new Intl.ListFormat(t,{...n});return i=>s.format(i)})},this.init(e)}init(e){const n=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=n.formatSeparator?n.formatSeparator:n.formatSeparator||","}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=z(t)}format(e,t,n){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return t.split(this.formatSeparator).reduce((a,u)=>{const{formatName:l,formatOptions:d}=At(u);if(this.formats[l]){let h=a;try{const c=s&&s.formatParams&&s.formatParams[s.interpolationkey]||{},m=c.locale||c.lng||s.locale||s.lng||n;h=this.formats[l](a,m,{...d,...s,...c})}catch(c){this.logger.warn(c)}return h}else this.logger.warn(`there was no format function for ${l}`);return a},e)}}function Tt(r,e){r.pending[e]!==void 0&&(delete r.pending[e],r.pendingCount--)}class jt extends he{constructor(e,t,n){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=s,this.logger=H.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=s.maxParallelReads||10,this.readingCalls=0,this.maxRetries=s.maxRetries>=0?s.maxRetries:5,this.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(n,s.backend,s)}queueLoad(e,t,n,s){const i={},o={},a={},u={};return e.forEach(l=>{let d=!0;t.forEach(h=>{const c=`${l}|${h}`;!n.reload&&this.store.hasResourceBundle(l,h)?this.state[c]=2:this.state[c]<0||(this.state[c]===1?o[c]===void 0&&(o[c]=!0):(this.state[c]=1,d=!1,o[c]===void 0&&(o[c]=!0),i[c]===void 0&&(i[c]=!0),u[h]===void 0&&(u[h]=!0)))}),d||(a[l]=!0)}),(Object.keys(i).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(i),pending:Object.keys(o),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(u)}}loaded(e,t,n){const s=e.split("|"),i=s[0],o=s[1];t&&this.emit("failedLoading",i,o,t),n&&this.store.addResourceBundle(i,o,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2;const a={};this.queue.forEach(u=>{mt(u.loaded,[i],o),Tt(u,e),t&&u.errors.push(t),u.pendingCount===0&&!u.done&&(Object.keys(u.loaded).forEach(l=>{a[l]||(a[l]={});const d=u.loaded[l];d.length&&d.forEach(h=>{a[l][h]===void 0&&(a[l][h]=!0)})}),u.done=!0,u.errors.length?u.callback(u.errors):u.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(u=>!u.done)}read(e,t,n){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,o=arguments.length>5?arguments[5]:void 0;if(!e.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:n,tried:s,wait:i,callback:o});return}this.readingCalls++;const a=(l,d)=>{if(this.readingCalls--,this.waitingReads.length>0){const h=this.waitingReads.shift();this.read(h.lng,h.ns,h.fcName,h.tried,h.wait,h.callback)}if(l&&d&&s<this.maxRetries){setTimeout(()=>{this.read.call(this,e,t,n,s+1,i*2,o)},i);return}o(l,d)},u=this.backend[n].bind(this.backend);if(u.length===2){try{const l=u(e,t);l&&typeof l.then=="function"?l.then(d=>a(null,d)).catch(a):a(null,l)}catch(l){a(l)}return}return u(e,t,a)}prepareLoading(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),s&&s();typeof e=="string"&&(e=this.languageUtils.toResolveHierarchy(e)),typeof t=="string"&&(t=[t]);const i=this.queueLoad(e,t,n,s);if(!i.toLoad.length)return i.pending.length||s(),null;i.toLoad.forEach(o=>{this.loadOne(o)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const n=e.split("|"),s=n[0],i=n[1];this.read(s,i,"read",void 0,void 0,(o,a)=>{o&&this.logger.warn(`${t}loading namespace ${i} for language ${s} failed`,o),!o&&a&&this.logger.log(`${t}loaded namespace ${i} for language ${s}`,a),this.loaded(e,o,a)})}saveMissing(e,t,n,s,i){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},a=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.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(this.backend&&this.backend.create){const u={...o,isUpdate:i},l=this.backend.create.bind(this.backend);if(l.length<6)try{let d;l.length===5?d=l(e,t,n,s,u):d=l(e,t,n,s),d&&typeof d.then=="function"?d.then(h=>a(null,h)).catch(a):a(null,d)}catch(d){a(d)}else l(e,t,n,s,a,u)}!e||!e[0]||this.store.addResource(e[0],t,n,s)}}}function Ae(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){let t={};if(typeof e[1]=="object"&&(t=e[1]),typeof e[1]=="string"&&(t.defaultValue=e[1]),typeof e[2]=="string"&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const n=e[3]||e[2];Object.keys(n).forEach(s=>{t[s]=n[s]})}return t},interpolation:{escapeValue:!0,format:r=>r,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function $e(r){return typeof r.ns=="string"&&(r.ns=[r.ns]),typeof r.fallbackLng=="string"&&(r.fallbackLng=[r.fallbackLng]),typeof r.fallbackNS=="string"&&(r.fallbackNS=[r.fallbackNS]),r.supportedLngs&&r.supportedLngs.indexOf("cimode")<0&&(r.supportedLngs=r.supportedLngs.concat(["cimode"])),r}function se(){}function Dt(r){Object.getOwnPropertyNames(Object.getPrototypeOf(r)).forEach(t=>{typeof r[t]=="function"&&(r[t]=r[t].bind(r))})}class te extends he{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if(super(),this.options=$e(e),this.services={},this.logger=H,this.modules={external:[]},Dt(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(){var e=this;let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof t=="function"&&(n=t,t={}),!t.defaultNS&&t.defaultNS!==!1&&t.ns&&(typeof t.ns=="string"?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const s=Ae();this.options={...s,...this.options,...$e(t)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...s.interpolation,...this.options.interpolation}),t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator);function i(d){return d?typeof d=="function"?new d:d:null}if(!this.options.isClone){this.modules.logger?H.init(i(this.modules.logger),this.options):H.init(null,this.options);let d;this.modules.formatter?d=this.modules.formatter:typeof Intl<"u"&&(d=$t);const h=new Ne(this.options);this.store=new Ee(this.options.resources,this.options);const c=this.services;c.logger=H,c.resourceStore=this.store,c.languageUtils=h,c.pluralResolver=new Rt(h,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),d&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)&&(c.formatter=i(d),c.formatter.init(c,this.options),this.options.interpolation.format=c.formatter.format.bind(c.formatter)),c.interpolator=new kt(this.options),c.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},c.backendConnector=new jt(i(this.modules.backend),c.resourceStore,c,this.options),c.backendConnector.on("*",function(m){for(var g=arguments.length,y=new Array(g>1?g-1:0),b=1;b<g;b++)y[b-1]=arguments[b];e.emit(m,...y)}),this.modules.languageDetector&&(c.languageDetector=i(this.modules.languageDetector),c.languageDetector.init&&c.languageDetector.init(c,this.options.detection,this.options)),this.modules.i18nFormat&&(c.i18nFormat=i(this.modules.i18nFormat),c.i18nFormat.init&&c.i18nFormat.init(this)),this.translator=new fe(this.services,this.options),this.translator.on("*",function(m){for(var g=arguments.length,y=new Array(g>1?g-1:0),b=1;b<g;b++)y[b-1]=arguments[b];e.emit(m,...y)}),this.modules.external.forEach(m=>{m.init&&m.init(this)})}if(this.format=this.options.interpolation.format,n||(n=se),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const d=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);d.length>0&&d[0]!=="dev"&&(this.options.lng=d[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(d=>{this[d]=function(){return e.store[d](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(d=>{this[d]=function(){return e.store[d](...arguments),e}});const u=G(),l=()=>{const d=(h,c)=>{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),u.resolve(c),n(h,c)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return d(null,this.t.bind(this));this.changeLanguage(this.options.lng,d)};return this.options.resources||!this.options.initImmediate?l():setTimeout(l,0),u}loadResources(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:se;const s=typeof e=="string"?e:this.language;if(typeof e=="function"&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(s&&s.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return n();const i=[],o=a=>{if(!a||a==="cimode")return;this.services.languageUtils.toResolveHierarchy(a).forEach(l=>{l!=="cimode"&&i.indexOf(l)<0&&i.push(l)})};s?o(s):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(u=>o(u)),this.options.preload&&this.options.preload.forEach(a=>o(a)),this.services.backendConnector.load(i,this.options.ns,a=>{!a&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(a)})}else n(null)}reloadResources(e,t,n){const s=G();return e||(e=this.languages),t||(t=this.options.ns),n||(n=se),this.services.backendConnector.reload(e,t,i=>{s.resolve(),n(i)}),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"&&Ge.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 n=this.languages[t];if(!(["cimode","dev"].indexOf(n)>-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}}changeLanguage(e,t){var n=this;this.isLanguageChangingTo=e;const s=G();this.emit("languageChanging",e);const i=u=>{this.language=u,this.languages=this.services.languageUtils.toResolveHierarchy(u),this.resolvedLanguage=void 0,this.setResolvedLanguage(u)},o=(u,l)=>{l?(i(l),this.translator.changeLanguage(l),this.isLanguageChangingTo=void 0,this.emit("languageChanged",l),this.logger.log("languageChanged",l)):this.isLanguageChangingTo=void 0,s.resolve(function(){return n.t(...arguments)}),t&&t(u,function(){return n.t(...arguments)})},a=u=>{!e&&!u&&this.services.languageDetector&&(u=[]);const l=typeof u=="string"?u:this.services.languageUtils.getBestMatchFromCodes(u);l&&(this.language||i(l),this.translator.language||this.translator.changeLanguage(l),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(l)),this.loadResources(l,d=>{o(d,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),s}getFixedT(e,t,n){var s=this;const i=function(o,a){let u;if(typeof a!="object"){for(var l=arguments.length,d=new Array(l>2?l-2:0),h=2;h<l;h++)d[h-2]=arguments[h];u=s.options.overloadTranslationOptionHandler([o,a].concat(d))}else u={...a};u.lng=u.lng||i.lng,u.lngs=u.lngs||i.lngs,u.ns=u.ns||i.ns,u.keyPrefix!==""&&(u.keyPrefix=u.keyPrefix||n||i.keyPrefix);const c=s.options.keySeparator||".";let m;return u.keyPrefix&&Array.isArray(o)?m=o.map(g=>`${u.keyPrefix}${c}${g}`):m=u.keyPrefix?`${u.keyPrefix}${c}${o}`:o,s.t(m,u)};return typeof e=="string"?i.lng=e:i.lngs=e,i.ns=t,i.keyPrefix=n,i}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=t.lng||this.resolvedLanguage||this.languages[0],s=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(n.toLowerCase()==="cimode")return!0;const o=(a,u)=>{const l=this.services.backendConnector.state[`${a}|${u}`];return l===-1||l===2};if(t.precheck){const a=t.precheck(this,o);if(a!==void 0)return a}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||o(n,e)&&(!s||o(i,e)))}loadNamespaces(e,t){const n=G();return this.options.ns?(typeof e=="string"&&(e=[e]),e.forEach(s=>{this.options.ns.indexOf(s)<0&&this.options.ns.push(s)}),this.loadResources(s=>{n.resolve(),t&&t(s)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){const n=G();typeof e=="string"&&(e=[e]);const s=this.options.preload||[],i=e.filter(o=>s.indexOf(o)<0&&this.services.languageUtils.isSupportedCode(o));return i.length?(this.options.preload=s.concat(i),this.loadResources(o=>{n.resolve(),t&&t(o)}),n):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";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=this.services&&this.services.languageUtils||new Ne(Ae());return t.indexOf(n.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new te(e,t)}cloneInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:se;const n=e.forkResourceStore;n&&delete e.forkResourceStore;const s={...this.options,...e,isClone:!0},i=new te(s);return(e.debug!==void 0||e.prefix!==void 0)&&(i.logger=i.logger.clone(e)),["store","services","language"].forEach(a=>{i[a]=this[a]}),i.services={...this.services},i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},n&&(i.store=new Ee(this.store.data,s),i.services.resourceStore=i.store),i.translator=new fe(i.services,s),i.translator.on("*",function(a){for(var u=arguments.length,l=new Array(u>1?u-1:0),d=1;d<u;d++)l[d-1]=arguments[d];i.emit(a,...l)}),i.init(s,t),i.translator.options=s,i.translator.backendConnector.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const F=te.createInstance();F.createInstance=te.createInstance;F.createInstance;F.dir;F.init;F.loadResources;F.reloadResources;F.use;F.changeLanguage;F.getFixedT;const Fn=F.t;F.exists;F.setDefaultNamespace;F.hasLoadedNamespace;F.loadNamespaces;F.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=Xe(Ft);var Ut=/\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;function Te(r){var e={type:"tag",name:"",voidElement:!1,attrs:{},children:[]},t=r.match(/<\/?([^\s]+?)[/\s>]/);if(t&&(e.name=t[1],(It[t[1]]||r.charAt(r.length-2)==="/")&&(e.voidElement=!0),e.name.startsWith("!--"))){var n=r.indexOf("-->");return{type:"comment",comment:n!==-1?r.slice(4,n):""}}for(var s=new RegExp(Ut),i=null;(i=s.exec(r))!==null;)if(i[0].trim())if(i[1]){var o=i[1].trim(),a=[o,""];o.indexOf("=")>-1&&(a=o.split("=")),e.attrs[a[0]]=a[1],s.lastIndex--}else i[2]&&(e.attrs[i[2]]=i[3].trim().substring(1,i[3].length-1));return e}var Bt=/<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g,Mt=/^\s*$/,Ht=Object.create(null);function Qe(r,e){switch(e.type){case"text":return r+e.content;case"tag":return r+="<"+e.name+(e.attrs?function(t){var n=[];for(var s in t)n.push(s+'="'+t[s]+'"');return n.length?" "+n.join(" "):""}(e.attrs):"")+(e.voidElement?"/>":">"),e.voidElement?r:r+e.children.reduce(Qe,"")+"</"+e.name+">";case"comment":return r+"<!--"+e.comment+"-->"}}var Vt={parse:function(r,e){e||(e={}),e.components||(e.components=Ht);var t,n=[],s=[],i=-1,o=!1;if(r.indexOf("<")!==0){var a=r.indexOf("<");n.push({type:"text",content:a===-1?r:r.substring(0,a)})}return r.replace(Bt,function(u,l){if(o){if(u!=="</"+t.name+">")return;o=!1}var d,h=u.charAt(1)!=="/",c=u.startsWith("<!--"),m=l+u.length,g=r.charAt(m);if(c){var y=Te(u);return i<0?(n.push(y),n):((d=s[i]).children.push(y),n)}if(h&&(i++,(t=Te(u)).type==="tag"&&e.components[t.name]&&(t.type="component",o=!0),t.voidElement||o||!g||g==="<"||t.children.push({type:"text",content:r.slice(m,r.indexOf("<",m))}),i===0&&n.push(t),(d=s[i-1])&&d.children.push(t),s[i]=t),(!h||t.voidElement)&&(i>-1&&(t.voidElement||t.name===u.slice(2,-1))&&(i--,t=i===-1?n:s[i]),!o&&g!=="<"&&g)){d=i===-1?n:s[i].children;var b=r.indexOf("<",m),O=r.slice(m,b===-1?void 0:b);Mt.test(O)&&(O=" "),(b>-1&&i+d.length>=0||O!==" ")&&d.push({type:"text",content:O})}}),n},stringify:function(r){return r.reduce(function(e,t){return e+Qe("",t)},"")}};const oe=(...r)=>{console!=null&&console.warn&&(B(r[0])&&(r[0]=`react-i18next:: ${r[0]}`),console.warn(...r))},je={},ce=(...r)=>{B(r[0])&&je[r[0]]||(B(r[0])&&(je[r[0]]=new Date),oe(...r))},Ye=(r,e)=>()=>{if(r.isInitialized)e();else{const t=()=>{setTimeout(()=>{r.off("initialized",t)},0),e()};r.on("initialized",t)}},De=(r,e,t)=>{r.loadNamespaces(e,Ye(r,t))},Fe=(r,e,t,n)=>{B(t)&&(t=[t]),t.forEach(s=>{r.options.ns.indexOf(s)<0&&r.options.ns.push(s)}),r.loadLanguages(e,Ye(r,n))},Kt=(r,e,t={})=>!e.languages||!e.languages.length?(ce("i18n.languages were undefined or empty",e.languages),!0):e.hasLoadedNamespace(r,{lng:t.lng,precheck:(n,s)=>{var i;if(((i=t.bindI18n)==null?void 0:i.indexOf("languageChanging"))>-1&&n.services.backendConnector.backend&&n.isLanguageChangingTo&&!s(n.isLanguageChangingTo,r))return!1}}),B=r=>typeof r=="string",J=r=>typeof r=="object"&&r!==null,qt=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,_t={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},zt=r=>_t[r],Jt=r=>r.replace(qt,zt);let ve={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:Jt};const Xt=(r={})=>{ve={...ve,...r}},Ze=()=>ve;let et;const Wt=r=>{et=r},tt=()=>et,ge=(r,e)=>{var n;if(!r)return!1;const t=((n=r.props)==null?void 0:n.children)??r.children;return e?t.length>0:!!t},me=r=>{var t,n;if(!r)return[];const e=((t=r.props)==null?void 0:t.children)??r.children;return(n=r.props)!=null&&n.i18nIsDynamicList?X(e):e},Gt=r=>Array.isArray(r)&&r.every(j.isValidElement),X=r=>Array.isArray(r)?r:[r],Qt=(r,e)=>{const t={...e};return t.props=Object.assign(r.props,e.props),t},nt=(r,e)=>{if(!r)return"";let t="";const n=X(r),s=e!=null&&e.transSupportBasicHtmlNodes?e.transKeepBasicHtmlNodesFor??[]:[];return n.forEach((i,o)=>{if(B(i))t+=`${i}`;else if(j.isValidElement(i)){const{props:a,type:u}=i,l=Object.keys(a).length,d=s.indexOf(u)>-1,h=a.children;if(!h&&d&&!l)t+=`<${u}/>`;else if(!h&&(!d||l)||a.i18nIsDynamicList)t+=`<${o}></${o}>`;else if(d&&l===1&&B(h))t+=`<${u}>${h}</${u}>`;else{const c=nt(h,e);t+=`<${o}>${c}</${o}>`}}else if(i===null)oe("Trans: the passed in value is invalid - seems you passed in a null child.");else if(J(i)){const{format:a,...u}=i,l=Object.keys(u);if(l.length===1){const d=a?`${l[0]}, ${a}`:l[0];t+=`{{${d}}}`}else oe("react-i18next: the passed in object contained more than one variable - the object should look like {{ value, format }} where format is optional.",i)}else oe("Trans: the passed in value is invalid - seems you passed in a variable like {number} - please pass in variables for interpolation as full objects like {{number}}.",i)}),t},Yt=(r,e,t,n,s,i)=>{if(e==="")return[];const o=n.transKeepBasicHtmlNodesFor||[],a=e&&new RegExp(o.map(b=>`<${b}`).join("|")).test(e);if(!r&&!a&&!i)return[e];const u={},l=b=>{X(b).forEach(x=>{B(x)||(ge(x)?l(me(x)):J(x)&&!j.isValidElement(x)&&Object.assign(u,x))})};l(r);const d=Vt.parse(`<0>${e}</0>`),h={...u,...s},c=(b,O,x)=>{var S;const k=me(b),L=g(k,O.children,x);return Gt(k)&&L.length===0||(S=b.props)!=null&&S.i18nIsDynamicList?k:L},m=(b,O,x,k,L)=>{b.dummy?(b.children=O,x.push(j.cloneElement(b,{key:k},L?void 0:O))):x.push(...j.Children.map([b],S=>{const w={...S.props};return delete w.i18nIsDynamicList,j.createElement(S.type,{...w,key:k,ref:S.ref},L?null:O)}))},g=(b,O,x)=>{const k=X(b);return X(O).reduce((S,w,N)=>{var T,D;const $=((D=(T=w.children)==null?void 0:T[0])==null?void 0:D.content)&&t.services.interpolator.interpolate(w.children[0].content,h,t.language);if(w.type==="tag"){let R=k[parseInt(w.name,10)];x.length===1&&!R&&(R=x[0][w.name]),R||(R={});const C=Object.keys(w.attrs).length!==0?Qt({props:w.attrs},R):R,M=j.isValidElement(C),I=M&&ge(w,!0)&&!w.voidElement,f=a&&J(C)&&C.dummy&&!M,p=J(r)&&Object.hasOwnProperty.call(r,w.name);if(B(C)){const v=t.services.interpolator.interpolate(C,h,t.language);S.push(v)}else if(ge(C)||I){const v=c(C,w,x);m(C,v,S,N)}else if(f){const v=g(k,w.children,x);m(C,v,S,N)}else if(Number.isNaN(parseFloat(w.name)))if(p){const v=c(C,w,x);m(C,v,S,N,w.voidElement)}else if(n.transSupportBasicHtmlNodes&&o.indexOf(w.name)>-1)if(w.voidElement)S.push(j.createElement(w.name,{key:`${w.name}-${N}`}));else{const v=g(k,w.children,x);S.push(j.createElement(w.name,{key:`${w.name}-${N}`},v))}else if(w.voidElement)S.push(`<${w.name} />`);else{const v=g(k,w.children,x);S.push(`<${w.name}>${v}</${w.name}>`)}else if(J(C)&&!M){const v=w.children[0]?$:null;v&&S.push(v)}else m(C,$,S,N,w.children.length!==1||!$)}else if(w.type==="text"){const R=n.transWrapTextNodes,C=i?n.unescape(t.services.interpolator.interpolate(w.content,h,t.language)):t.services.interpolator.interpolate(w.content,h,t.language);R?S.push(j.createElement(R,{key:`${w.name}-${N}`},C)):S.push(C)}return S},[])},y=g([{dummy:!0,children:r||[]}],d,X(r||[]));return me(y[0])};function In({children:r,count:e,parent:t,i18nKey:n,context:s,tOptions:i={},values:o,defaults:a,components:u,ns:l,i18n:d,t:h,shouldUnescape:c,...m}){var R,C,M,I;const g=d||tt();if(!g)return ce("You will need to pass in an i18next instance by using i18nextReactModule"),r;const y=h||g.t.bind(g)||(f=>f),b={...Ze(),...(R=g.options)==null?void 0:R.react};let O=l||y.ns||((C=g.options)==null?void 0:C.defaultNS);O=B(O)?[O]:O||["translation"];const x=nt(r,b),k=a||x||b.transEmptyNodeValue||n,{hashTransKey:L}=b,S=n||(L?L(x||k):x||k);(I=(M=g.options)==null?void 0:M.interpolation)!=null&&I.defaultVariables&&(o=o&&Object.keys(o).length>0?{...o,...g.options.interpolation.defaultVariables}:{...g.options.interpolation.defaultVariables});const w=o||e!==void 0||!r?i.interpolation:{interpolation:{...i.interpolation,prefix:"#$?",suffix:"?$#"}},N={...i,context:s||i.context,count:e,...o,...w,defaultValue:k,ns:O},$=S?y(S,N):k;u&&Object.keys(u).forEach(f=>{const p=u[f];if(typeof p.type=="function"||!p.props||!p.props.children||$.indexOf(`${f}/>`)<0&&$.indexOf(`${f} />`)<0)return;function v(){return j.createElement(j.Fragment,null,p)}u[f]=j.createElement(v)});const T=Yt(u||r,$,g,b,N,c),D=t??b.defaultTransParent;return D?j.createElement(D,m,T):T}const Un={type:"3rdParty",init(r){Xt(r.options.react),Wt(r)}},Zt=j.createContext();class en{constructor(){Oe(this,"getUsedNamespaces",()=>Object.keys(this.usedNamespaces));this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(t=>{var n;(n=this.usedNamespaces)[t]??(n[t]=!0)})}}const tn=(r,e)=>{const t=j.useRef();return j.useEffect(()=>{t.current=r},[r,e]),t.current},rt=(r,e,t,n)=>r.getFixedT(e,t,n),nn=(r,e,t,n)=>j.useCallback(rt(r,e,t,n),[r,e,t,n]),Bn=(r,e={})=>{var L,S,w,N;const{i18n:t}=e,{i18n:n,defaultNS:s}=j.useContext(Zt)||{},i=t||n||tt();if(i&&!i.reportNamespaces&&(i.reportNamespaces=new en),!i){ce("You will need to pass in an i18next instance by using initReactI18next");const $=(D,R)=>B(R)?R:J(R)&&B(R.defaultValue)?R.defaultValue:Array.isArray(D)?D[D.length-1]:D,T=[$,{},!1];return T.t=$,T.i18n={},T.ready=!1,T}(L=i.options.react)!=null&&L.wait&&ce("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const o={...Ze(),...i.options.react,...e},{useSuspense:a,keyPrefix:u}=o;let l=s||((S=i.options)==null?void 0:S.defaultNS);l=B(l)?[l]:l||["translation"],(N=(w=i.reportNamespaces).addUsedNamespaces)==null||N.call(w,l);const d=(i.isInitialized||i.initializedStoreOnce)&&l.every($=>Kt($,i,o)),h=nn(i,e.lng||null,o.nsMode==="fallback"?l:l[0],u),c=()=>h,m=()=>rt(i,e.lng||null,o.nsMode==="fallback"?l:l[0],u),[g,y]=j.useState(c);let b=l.join();e.lng&&(b=`${e.lng}${b}`);const O=tn(b),x=j.useRef(!0);j.useEffect(()=>{const{bindI18n:$,bindI18nStore:T}=o;x.current=!0,!d&&!a&&(e.lng?Fe(i,e.lng,l,()=>{x.current&&y(m)}):De(i,l,()=>{x.current&&y(m)})),d&&O&&O!==b&&x.current&&y(m);const D=()=>{x.current&&y(m)};return $&&(i==null||i.on($,D)),T&&(i==null||i.store.on(T,D)),()=>{x.current=!1,i&&($==null||$.split(" ").forEach(R=>i.off(R,D))),T&&i&&T.split(" ").forEach(R=>i.store.off(R,D))}},[i,b]),j.useEffect(()=>{x.current&&d&&y(c)},[i,u,d]);const k=[g,i,d];if(k.t=g,k.i18n=i,k.ready=d,d||!d&&!a)return k;throw new Promise($=>{e.lng?Fe(i,e.lng,l,()=>$()):De(i,l,()=>$())})},{slice:rn,forEach:sn}=[];function on(r){return sn.call(rn.call(arguments,1),e=>{if(e)for(const t in e)r[t]===void 0&&(r[t]=e[t])}),r}const Ie=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,an=(r,e,t)=>{const n=t||{};n.path=n.path||"/";const s=encodeURIComponent(e);let i=`${r}=${s}`;if(n.maxAge>0){const o=n.maxAge-0;if(Number.isNaN(o))throw new Error("maxAge should be a Number");i+=`; Max-Age=${Math.floor(o)}`}if(n.domain){if(!Ie.test(n.domain))throw new TypeError("option domain is invalid");i+=`; Domain=${n.domain}`}if(n.path){if(!Ie.test(n.path))throw new TypeError("option path is invalid");i+=`; Path=${n.path}`}if(n.expires){if(typeof n.expires.toUTCString!="function")throw new TypeError("option expires is invalid");i+=`; Expires=${n.expires.toUTCString()}`}if(n.httpOnly&&(i+="; HttpOnly"),n.secure&&(i+="; Secure"),n.sameSite)switch(typeof n.sameSite=="string"?n.sameSite.toLowerCase():n.sameSite){case!0:i+="; SameSite=Strict";break;case"lax":i+="; SameSite=Lax";break;case"strict":i+="; SameSite=Strict";break;case"none":i+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return i},Ue={create(r,e,t,n){let s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};t&&(s.expires=new Date,s.expires.setTime(s.expires.getTime()+t*60*1e3)),n&&(s.domain=n),document.cookie=an(r,encodeURIComponent(e),s)},read(r){const e=`${r}=`,t=document.cookie.split(";");for(let n=0;n<t.length;n++){let s=t[n];for(;s.charAt(0)===" ";)s=s.substring(1,s.length);if(s.indexOf(e)===0)return s.substring(e.length,s.length)}return null},remove(r){this.create(r,"",-1)}};var un={name:"cookie",lookup(r){let{lookupCookie:e}=r;if(e&&typeof document<"u")return Ue.read(e)||void 0},cacheUserLanguage(r,e){let{lookupCookie:t,cookieMinutes:n,cookieDomain:s,cookieOptions:i}=e;t&&typeof document<"u"&&Ue.create(t,r,n,s,i)}},ln={name:"querystring",lookup(r){var n;let{lookupQuerystring:e}=r,t;if(typeof window<"u"){let{search:s}=window.location;!window.location.search&&((n=window.location.hash)==null?void 0:n.indexOf("?"))>-1&&(s=window.location.hash.substring(window.location.hash.indexOf("?")));const o=s.substring(1).split("&");for(let a=0;a<o.length;a++){const u=o[a].indexOf("=");u>0&&o[a].substring(0,u)===e&&(t=o[a].substring(u+1))}}return t}};let Q=null;const Be=()=>{if(Q!==null)return Q;try{Q=window!=="undefined"&&window.localStorage!==null;const r="i18next.translate.boo";window.localStorage.setItem(r,"foo"),window.localStorage.removeItem(r)}catch{Q=!1}return Q};var fn={name:"localStorage",lookup(r){let{lookupLocalStorage:e}=r;if(e&&Be())return window.localStorage.getItem(e)||void 0},cacheUserLanguage(r,e){let{lookupLocalStorage:t}=e;t&&Be()&&window.localStorage.setItem(t,r)}};let Y=null;const Me=()=>{if(Y!==null)return Y;try{Y=window!=="undefined"&&window.sessionStorage!==null;const r="i18next.translate.boo";window.sessionStorage.setItem(r,"foo"),window.sessionStorage.removeItem(r)}catch{Y=!1}return Y};var cn={name:"sessionStorage",lookup(r){let{lookupSessionStorage:e}=r;if(e&&Me())return window.sessionStorage.getItem(e)||void 0},cacheUserLanguage(r,e){let{lookupSessionStorage:t}=e;t&&Me()&&window.sessionStorage.setItem(t,r)}},dn={name:"navigator",lookup(r){const e=[];if(typeof navigator<"u"){const{languages:t,userLanguage:n,language:s}=navigator;if(t)for(let i=0;i<t.length;i++)e.push(t[i]);n&&e.push(n),s&&e.push(s)}return e.length>0?e:void 0}},hn={name:"htmlTag",lookup(r){let{htmlTag:e}=r,t;const n=e||(typeof document<"u"?document.documentElement:null);return n&&typeof n.getAttribute=="function"&&(t=n.getAttribute("lang")),t}},pn={name:"path",lookup(r){var s;let{lookupFromPathIndex:e}=r;if(typeof window>"u")return;const t=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(t)?(s=t[typeof e=="number"?e:0])==null?void 0:s.replace("/",""):void 0}},gn={name:"subdomain",lookup(r){var s,i;let{lookupFromSubdomainIndex:e}=r;const t=typeof e=="number"?e+1:1,n=typeof window<"u"&&((i=(s=window.location)==null?void 0:s.hostname)==null?void 0:i.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(n)return n[t]}};function mn(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:r=>r}}class yn{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(e,t)}init(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=e||{languageUtils:{}},this.options=on(t,this.options||{},mn()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=s=>s.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=n,this.addDetector(un),this.addDetector(ln),this.addDetector(fn),this.addDetector(cn),this.addDetector(dn),this.addDetector(hn),this.addDetector(pn),this.addDetector(gn)}addDetector(e){return this.detectors[e.name]=e,this}detect(e){e||(e=this.options.order);let t=[];return e.forEach(n=>{if(this.detectors[n]){let s=this.detectors[n].lookup(this.options);s&&typeof s=="string"&&(s=[s]),s&&(t=t.concat(s))}}),t=t.map(n=>this.options.convertDetectedLanguage(n)),this.services.languageUtils.getBestMatchFromCodes?t:t.length>0?t[0]:null}cacheUserLanguage(e,t){t||(t=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)}))}}yn.type="languageDetector";function we(r){"@babel/helpers - typeof";return we=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},we(r)}function st(){return typeof XMLHttpRequest=="function"||(typeof XMLHttpRequest>"u"?"undefined":we(XMLHttpRequest))==="object"}function bn(r){return!!r&&typeof r.then=="function"}function vn(r){return bn(r)?r:Promise.resolve(r)}function wn(r){throw new Error('Could not dynamically require "'+r+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var xe={exports:{}},ie={exports:{}},He;function xn(){return He||(He=1,function(r,e){var t=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof Z<"u"&&Z,n=function(){function i(){this.fetch=!1,this.DOMException=t.DOMException}return i.prototype=t,new i}();(function(i){(function(o){var a=typeof i<"u"&&i||typeof self<"u"&&self||typeof a<"u"&&a,u={searchParams:"URLSearchParams"in a,iterable:"Symbol"in a&&"iterator"in Symbol,blob:"FileReader"in a&&"Blob"in a&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in a,arrayBuffer:"ArrayBuffer"in a};function l(f){return f&&DataView.prototype.isPrototypeOf(f)}if(u.arrayBuffer)var d=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],h=ArrayBuffer.isView||function(f){return f&&d.indexOf(Object.prototype.toString.call(f))>-1};function c(f){if(typeof f!="string"&&(f=String(f)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(f)||f==="")throw new TypeError('Invalid character in header field name: "'+f+'"');return f.toLowerCase()}function m(f){return typeof f!="string"&&(f=String(f)),f}function g(f){var p={next:function(){var v=f.shift();return{done:v===void 0,value:v}}};return u.iterable&&(p[Symbol.iterator]=function(){return p}),p}function y(f){this.map={},f instanceof y?f.forEach(function(p,v){this.append(v,p)},this):Array.isArray(f)?f.forEach(function(p){this.append(p[0],p[1])},this):f&&Object.getOwnPropertyNames(f).forEach(function(p){this.append(p,f[p])},this)}y.prototype.append=function(f,p){f=c(f),p=m(p);var v=this.map[f];this.map[f]=v?v+", "+p:p},y.prototype.delete=function(f){delete this.map[c(f)]},y.prototype.get=function(f){return f=c(f),this.has(f)?this.map[f]:null},y.prototype.has=function(f){return this.map.hasOwnProperty(c(f))},y.prototype.set=function(f,p){this.map[c(f)]=m(p)},y.prototype.forEach=function(f,p){for(var v in this.map)this.map.hasOwnProperty(v)&&f.call(p,this.map[v],v,this)},y.prototype.keys=function(){var f=[];return this.forEach(function(p,v){f.push(v)}),g(f)},y.prototype.values=function(){var f=[];return this.forEach(function(p){f.push(p)}),g(f)},y.prototype.entries=function(){var f=[];return this.forEach(function(p,v){f.push([v,p])}),g(f)},u.iterable&&(y.prototype[Symbol.iterator]=y.prototype.entries);function b(f){if(f.bodyUsed)return Promise.reject(new TypeError("Already read"));f.bodyUsed=!0}function O(f){return new Promise(function(p,v){f.onload=function(){p(f.result)},f.onerror=function(){v(f.error)}})}function x(f){var p=new FileReader,v=O(p);return p.readAsArrayBuffer(f),v}function k(f){var p=new FileReader,v=O(p);return p.readAsText(f),v}function L(f){for(var p=new Uint8Array(f),v=new Array(p.length),P=0;P<p.length;P++)v[P]=String.fromCharCode(p[P]);return v.join("")}function S(f){if(f.slice)return f.slice(0);var p=new Uint8Array(f.byteLength);return p.set(new Uint8Array(f)),p.buffer}function w(){return this.bodyUsed=!1,this._initBody=function(f){this.bodyUsed=this.bodyUsed,this._bodyInit=f,f?typeof f=="string"?this._bodyText=f:u.blob&&Blob.prototype.isPrototypeOf(f)?this._bodyBlob=f:u.formData&&FormData.prototype.isPrototypeOf(f)?this._bodyFormData=f:u.searchParams&&URLSearchParams.prototype.isPrototypeOf(f)?this._bodyText=f.toString():u.arrayBuffer&&u.blob&&l(f)?(this._bodyArrayBuffer=S(f.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):u.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(f)||h(f))?this._bodyArrayBuffer=S(f):this._bodyText=f=Object.prototype.toString.call(f):this._bodyText="",this.headers.get("content-type")||(typeof f=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):u.searchParams&&URLSearchParams.prototype.isPrototypeOf(f)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},u.blob&&(this.blob=function(){var f=b(this);if(f)return f;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){if(this._bodyArrayBuffer){var f=b(this);return f||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}else return this.blob().then(x)}),this.text=function(){var f=b(this);if(f)return f;if(this._bodyBlob)return k(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(L(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},u.formData&&(this.formData=function(){return this.text().then(D)}),this.json=function(){return this.text().then(JSON.parse)},this}var N=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function $(f){var p=f.toUpperCase();return N.indexOf(p)>-1?p:f}function T(f,p){if(!(this instanceof T))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');p=p||{};var v=p.body;if(f instanceof T){if(f.bodyUsed)throw new TypeError("Already read");this.url=f.url,this.credentials=f.credentials,p.headers||(this.headers=new y(f.headers)),this.method=f.method,this.mode=f.mode,this.signal=f.signal,!v&&f._bodyInit!=null&&(v=f._bodyInit,f.bodyUsed=!0)}else this.url=String(f);if(this.credentials=p.credentials||this.credentials||"same-origin",(p.headers||!this.headers)&&(this.headers=new y(p.headers)),this.method=$(p.method||this.method||"GET"),this.mode=p.mode||this.mode||null,this.signal=p.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&v)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(v),(this.method==="GET"||this.method==="HEAD")&&(p.cache==="no-store"||p.cache==="no-cache")){var P=/([?&])_=[^&]*/;if(P.test(this.url))this.url=this.url.replace(P,"$1_="+new Date().getTime());else{var A=/\?/;this.url+=(A.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}T.prototype.clone=function(){return new T(this,{body:this._bodyInit})};function D(f){var p=new FormData;return f.trim().split("&").forEach(function(v){if(v){var P=v.split("="),A=P.shift().replace(/\+/g," "),E=P.join("=").replace(/\+/g," ");p.append(decodeURIComponent(A),decodeURIComponent(E))}}),p}function R(f){var p=new y,v=f.replace(/\r?\n[\t ]+/g," ");return v.split("\r").map(function(P){return P.indexOf(`
`)===0?P.substr(1,P.length):P}).forEach(function(P){var A=P.split(":"),E=A.shift().trim();if(E){var K=A.join(":").trim();p.append(E,K)}}),p}w.call(T.prototype);function C(f,p){if(!(this instanceof C))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');p||(p={}),this.type="default",this.status=p.status===void 0?200:p.status,this.ok=this.status>=200&&this.status<300,this.statusText=p.statusText===void 0?"":""+p.statusText,this.headers=new y(p.headers),this.url=p.url||"",this._initBody(f)}w.call(C.prototype),C.prototype.clone=function(){return new C(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new y(this.headers),url:this.url})},C.error=function(){var f=new C(null,{status:0,statusText:""});return f.type="error",f};var M=[301,302,303,307,308];C.redirect=function(f,p){if(M.indexOf(p)===-1)throw new RangeError("Invalid status code");return new C(null,{status:p,headers:{location:f}})},o.DOMException=a.DOMException;try{new o.DOMException}catch{o.DOMException=function(p,v){this.message=p,this.name=v;var P=Error(p);this.stack=P.stack},o.DOMException.prototype=Object.create(Error.prototype),o.DOMException.prototype.constructor=o.DOMException}function I(f,p){return new Promise(function(v,P){var A=new T(f,p);if(A.signal&&A.signal.aborted)return P(new o.DOMException("Aborted","AbortError"));var E=new XMLHttpRequest;function K(){E.abort()}E.onload=function(){var U={status:E.status,statusText:E.statusText,headers:R(E.getAllResponseHeaders()||"")};U.url="responseURL"in E?E.responseURL:U.headers.get("X-Request-URL");var re="response"in E?E.response:E.responseText;setTimeout(function(){v(new C(re,U))},0)},E.onerror=function(){setTimeout(function(){P(new TypeError("Network request failed"))},0)},E.ontimeout=function(){setTimeout(function(){P(new TypeError("Network request failed"))},0)},E.onabort=function(){setTimeout(function(){P(new o.DOMException("Aborted","AbortError"))},0)};function lt(U){try{return U===""&&a.location.href?a.location.href:U}catch{return U}}E.open(A.method,lt(A.url),!0),A.credentials==="include"?E.withCredentials=!0:A.credentials==="omit"&&(E.withCredentials=!1),"responseType"in E&&(u.blob?E.responseType="blob":u.arrayBuffer&&A.headers.get("Content-Type")&&A.headers.get("Content-Type").indexOf("application/octet-stream")!==-1&&(E.responseType="arraybuffer")),p&&typeof p.headers=="object"&&!(p.headers instanceof y)?Object.getOwnPropertyNames(p.headers).forEach(function(U){E.setRequestHeader(U,m(p.headers[U]))}):A.headers.forEach(function(U,re){E.setRequestHeader(re,U)}),A.signal&&(A.signal.addEventListener("abort",K),E.onreadystatechange=function(){E.readyState===4&&A.signal.removeEventListener("abort",K)}),E.send(typeof A._bodyInit>"u"?null:A._bodyInit)})}return I.polyfill=!0,a.fetch||(a.fetch=I,a.Headers=y,a.Request=T,a.Response=C),o.Headers=y,o.Request=T,o.Response=C,o.fetch=I,o})({})})(n),n.fetch.ponyfill=!0,delete n.fetch.polyfill;var s=t.fetch?t:n;e=s.fetch,e.default=s.fetch,e.fetch=s.fetch,e.Headers=s.Headers,e.Request=s.Request,e.Response=s.Response,r.exports=e}(ie,ie.exports)),ie.exports}(function(r,e){var t;if(typeof fetch=="function"&&(typeof Z<"u"&&Z.fetch?t=Z.fetch:typeof window<"u"&&window.fetch?t=window.fetch:t=fetch),typeof wn<"u"&&typeof window>"u"){var n=t||xn();n.default&&(n=n.default),e.default=n,r.exports=e.default}})(xe,xe.exports);var it=xe.exports;const ot=Xe(it),Ve=dt({__proto__:null,default:ot},[it]);function Ke(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(r,s).enumerable})),t.push.apply(t,n)}return t}function qe(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Ke(Object(t),!0).forEach(function(n){Sn(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):Ke(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function Sn(r,e,t){return e=On(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function On(r){var e=Pn(r,"string");return q(e)=="symbol"?e:e+""}function Pn(r,e){if(q(r)!="object"||!r)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(q(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}function q(r){"@babel/helpers - typeof";return q=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},q(r)}var V;typeof fetch=="function"&&(typeof global<"u"&&global.fetch?V=global.fetch:typeof window<"u"&&window.fetch?V=window.fetch:V=fetch);var ne;st()&&(typeof global<"u"&&global.XMLHttpRequest?ne=global.XMLHttpRequest:typeof window<"u"&&window.XMLHttpRequest&&(ne=window.XMLHttpRequest));var de;typeof ActiveXObject=="function"&&(typeof global<"u"&&global.ActiveXObject?de=global.ActiveXObject:typeof window<"u"&&window.ActiveXObject&&(de=window.ActiveXObject));!V&&Ve&&!ne&&!de&&(V=ot||Ve);typeof V!="function"&&(V=void 0);var Se=function(e,t){if(t&&q(t)==="object"){var n="";for(var s in t)n+="&"+encodeURIComponent(s)+"="+encodeURIComponent(t[s]);if(!n)return e;e=e+(e.indexOf("?")!==-1?"&":"?")+n.slice(1)}return e},_e=function(e,t,n,s){var i=function(u){if(!u.ok)return n(u.statusText||"Error",{status:u.status});u.text().then(function(l){n(null,{status:u.status,data:l})}).catch(n)};if(s){var o=s(e,t);if(o instanceof Promise){o.then(i).catch(n);return}}typeof fetch=="function"?fetch(e,t).then(i).catch(n):V(e,t).then(i).catch(n)},ze=!1,Ln=function(e,t,n,s){e.queryStringParams&&(t=Se(t,e.queryStringParams));var i=qe({},typeof e.customHeaders=="function"?e.customHeaders():e.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/".concat(global.process.version,"; ").concat(global.process.platform," ").concat(global.process.arch,")")),n&&(i["Content-Type"]="application/json");var o=typeof e.requestOptions=="function"?e.requestOptions(n):e.requestOptions,a=qe({method:n?"POST":"GET",body:n?e.stringify(n):void 0,headers:i},ze?{}:o),u=typeof e.alternateFetch=="function"&&e.alternateFetch.length>=1?e.alternateFetch:void 0;try{_e(t,a,s,u)}catch(l){if(!o||Object.keys(o).length===0||!l.message||l.message.indexOf("not implemented")<0)return s(l);try{Object.keys(o).forEach(function(d){delete a[d]}),_e(t,a,s,u),ze=!0}catch(d){s(d)}}},En=function(e,t,n,s){n&&q(n)==="object"&&(n=Se("",n).slice(1)),e.queryStringParams&&(t=Se(t,e.queryStringParams));try{var i;ne?i=new ne:i=new de("MSXML2.XMLHTTP.3.0"),i.open(n?"POST":"GET",t,1),e.crossDomain||i.setRequestHeader("X-Requested-With","XMLHttpRequest"),i.withCredentials=!!e.withCredentials,n&&i.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),i.overrideMimeType&&i.overrideMimeType("application/json");var o=e.customHeaders;if(o=typeof o=="function"?o():o,o)for(var a in o)i.setRequestHeader(a,o[a]);i.onreadystatechange=function(){i.readyState>3&&s(i.status>=400?i.statusText:null,{status:i.status,data:i.responseText})},i.send(n)}catch(u){console&&console.log(u)}},Cn=function(e,t,n,s){if(typeof n=="function"&&(s=n,n=void 0),s=s||function(){},V&&t.indexOf("file:")!==0)return Ln(e,t,n,s);if(st()||typeof ActiveXObject=="function")return En(e,t,n,s);s(new Error("No fetch and no xhr implementation found!"))};function W(r){"@babel/helpers - typeof";return W=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},W(r)}function Je(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(r,s).enumerable})),t.push.apply(t,n)}return t}function ye(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Je(Object(t),!0).forEach(function(n){at(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):Je(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function Nn(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function Rn(r,e){for(var t=0;t<e.length;t++){var n=e[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(r,ut(n.key),n)}}function kn(r,e,t){return e&&Rn(r.prototype,e),Object.defineProperty(r,"prototype",{writable:!1}),r}function at(r,e,t){return e=ut(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function ut(r){var e=An(r,"string");return W(e)=="symbol"?e:e+""}function An(r,e){if(W(r)!="object"||!r)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(W(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}var $n=function(){return{loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",parse:function(t){return JSON.parse(t)},stringify:JSON.stringify,parsePayload:function(t,n,s){return at({},n,s||"")},parseLoadPayload:function(t,n){},request:Cn,reloadInterval:typeof window<"u"?!1:60*60*1e3,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}}},Tn=function(){function r(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Nn(this,r),this.services=e,this.options=t,this.allOptions=n,this.type="backend",this.init(e,t,n)}return kn(r,[{key:"init",value:function(t){var n=this,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(this.services=t,this.options=ye(ye(ye({},$n()),this.options||{}),s),this.allOptions=i,this.services&&this.options.reloadInterval){var o=setInterval(function(){return n.reload()},this.options.reloadInterval);W(o)==="object"&&typeof o.unref=="function"&&o.unref()}}},{key:"readMulti",value:function(t,n,s){this._readAny(t,t,n,n,s)}},{key:"read",value:function(t,n,s){this._readAny([t],t,[n],n,s)}},{key:"_readAny",value:function(t,n,s,i,o){var a=this,u=this.options.loadPath;typeof this.options.loadPath=="function"&&(u=this.options.loadPath(t,s)),u=vn(u),u.then(function(l){if(!l)return o(null,{});var d=a.services.interpolator.interpolate(l,{lng:t.join("+"),ns:s.join("+")});a.loadUrl(d,o,n,i)})}},{key:"loadUrl",value:function(t,n,s,i){var o=this,a=typeof s=="string"?[s]:s,u=typeof i=="string"?[i]:i,l=this.options.parseLoadPayload(a,u);this.options.request(this.options,t,l,function(d,h){if(h&&(h.status>=500&&h.status<600||!h.status))return n("failed loading "+t+"; status code: "+h.status,!0);if(h&&h.status>=400&&h.status<500)return n("failed loading "+t+"; status code: "+h.status,!1);if(!h&&d&&d.message&&d.message.indexOf("Failed to fetch")>-1)return n("failed loading "+t+": "+d.message,!0);if(d)return n(d,!1);var c,m;try{typeof h.data=="string"?c=o.options.parse(h.data,s,i):c=h.data}catch{m="failed parsing "+t+" to json"}if(m)return n(m,!1);n(null,c)})}},{key:"create",value:function(t,n,s,i,o){var a=this;if(this.options.addPath){typeof t=="string"&&(t=[t]);var u=this.options.parsePayload(n,s,i),l=0,d=[],h=[];t.forEach(function(c){var m=a.options.addPath;typeof a.options.addPath=="function"&&(m=a.options.addPath(c,n));var g=a.services.interpolator.interpolate(m,{lng:c,ns:n});a.options.request(a.options,g,u,function(y,b){l+=1,d.push(y),h.push(b),l===t.length&&typeof o=="function"&&o(d,h)})})}}},{key:"reload",value:function(){var t=this,n=this.services,s=n.backendConnector,i=n.languageUtils,o=n.logger,a=s.language;if(!(a&&a.toLowerCase()==="cimode")){var u=[],l=function(h){var c=i.toResolveHierarchy(h);c.forEach(function(m){u.indexOf(m)<0&&u.push(m)})};l(a),this.allOptions.preload&&this.allOptions.preload.forEach(function(d){return l(d)}),u.forEach(function(d){t.allOptions.ns.forEach(function(h){s.read(d,h,"read",null,null,function(c,m){c&&o.warn("loading namespace ".concat(h," for language ").concat(d," failed"),c),!c&&m&&o.log("loaded namespace ".concat(h," for language ").concat(d),m),s.loaded("".concat(d,"|").concat(h),c,m)})})})}}}])}();Tn.type="backend";export{Tn as B,In as T,yn as a,Un as b,F as i,Fn as t,Bn as u};