(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[e]="9e269bf2-54aa-409f-ac07-12fb04ccea5e",r._sentryDebugIdIdentifier="sentry-dbid-9e269bf2-54aa-409f-ac07-12fb04ccea5e")}catch{}})();function pt(r,e){for(var t=0;tn[i]})}}}return Object.freeze(Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}))}var ne=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Te(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var ht={exports:{}},N={};/** * @license React * react.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var oe=Symbol.for("react.element"),Dt=Symbol.for("react.portal"),Ft=Symbol.for("react.fragment"),Ut=Symbol.for("react.strict_mode"),_t=Symbol.for("react.profiler"),Mt=Symbol.for("react.provider"),Bt=Symbol.for("react.context"),Ht=Symbol.for("react.forward_ref"),zt=Symbol.for("react.suspense"),qt=Symbol.for("react.memo"),Vt=Symbol.for("react.lazy"),Be=Symbol.iterator;function Kt(r){return r===null||typeof r!="object"?null:(r=Be&&r[Be]||r["@@iterator"],typeof r=="function"?r:null)}var gt={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},mt=Object.assign,yt={};function G(r,e,t){this.props=r,this.context=e,this.refs=yt,this.updater=t||gt}G.prototype.isReactComponent={};G.prototype.setState=function(r,e){if(typeof r!="object"&&typeof r!="function"&&r!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,r,e,"setState")};G.prototype.forceUpdate=function(r){this.updater.enqueueForceUpdate(this,r,"forceUpdate")};function vt(){}vt.prototype=G.prototype;function Ie(r,e,t){this.props=r,this.context=e,this.refs=yt,this.updater=t||gt}var De=Ie.prototype=new vt;De.constructor=Ie;mt(De,G.prototype);De.isPureReactComponent=!0;var He=Array.isArray,bt=Object.prototype.hasOwnProperty,Fe={current:null},wt={key:!0,ref:!0,__self:!0,__source:!0};function xt(r,e,t){var n,i={},s=null,o=null;if(e!=null)for(n in e.ref!==void 0&&(o=e.ref),e.key!==void 0&&(s=""+e.key),e)bt.call(e,n)&&!wt.hasOwnProperty(n)&&(i[n]=e[n]);var a=arguments.length-2;if(a===1)i.children=t;else if(11&&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||Yt,this.options=t,this.debug=t.debug}log(){for(var e=arguments.length,t=new Array(e),n=0;n{this.observers[n]||(this.observers[n]=new Map);const i=this.observers[n].get(t)||0;this.observers[n].set(t,i+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}emit(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i{let[a,u]=o;for(let l=0;l{let[a,u]=o;for(let l=0;l{r=n,e=i});return t.resolve=r,t.reject=e,t}function qe(r){return r==null?"":""+r}function Zt(r,e,t){r.forEach(n=>{e[n]&&(t[n]=e[n])})}const en=/###/g;function re(r,e,t){function n(a){return a&&a.indexOf("###")>-1?a.replace(en,"."):a}function i(){return!r||typeof r=="string"}const s=typeof e!="string"?e:e.split(".");let o=0;for(;o":">",'"':""","'":"'","/":"/"};function sn(r){return typeof r=="string"?r.replace(/[&<>"'\/]/g,e=>rn[e]):r}class on{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 an=[" ",",","?","!",";"],un=new on(20);function ln(r,e,t){e=e||"",t=t||"";const n=an.filter(o=>e.indexOf(o)<0&&t.indexOf(o)<0);if(n.length===0)return!0;const i=un.getRegExp(`(${n.map(o=>o==="?"?"\\?":o).join("|")})`);let s=!i.test(r);if(!s){const o=r.indexOf(t);o>0&&!i.test(r.substring(0,o))&&(s=!0)}return s}function Ce(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 i=r;for(let s=0;s-1&&u0?r.replace("_","-"):r}class Ke extends xe{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 i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const s=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,o=i.ignoreJSONStructure!==void 0?i.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"&&s?a.push(...n.split(s)):a.push(n)));const u=ge(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:Ce(this.data&&this.data[e]&&this.data[e][t],n,s)}addResource(e,t,n,i){let s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const o=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator;let a=[e,t];n&&(a=a.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(a=e.split("."),i=t,t=a[1]),this.addNamespaces(t),Ve(this.data,a,i),s.silent||this.emit("added",e,t,n,i)}addResources(e,t,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const s in n)(typeof n[s]=="string"||Array.isArray(n[s]))&&this.addResource(e,t,s,n[s],{silent:!0});i.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,i,s){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},a=[e,t];e.indexOf(".")>-1&&(a=e.split("."),i=n,n=t,t=a[1]),this.addNamespaces(t);let u=ge(this.data,a)||{};o.skipCopy||(n=JSON.parse(JSON.stringify(n))),i?Ot(u,n,s):u={...u,...n},Ve(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(i=>t[i]&&Object.keys(t[i]).length>0)}toJSON(){return this.data}}var Et={processors:{},addPostProcessor(r){this.processors[r.name]=r},handle(r,e,t,n,i){return r.forEach(s=>{this.processors[s]&&(e=this.processors[s].process(e,t,n,i))}),e}};const Je={};class ye extends xe{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),Zt(["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 i=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator;let s=t.ns||this.options.defaultNS||[];const o=n&&e.indexOf(n)>-1,a=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!ln(e,n,i);if(o&&!a){const u=e.match(this.interpolator.nestingRegexp);if(u&&u.length>0)return{key:e,namespaces:s};const l=e.split(n);(n!==i||n===i&&this.options.ns.indexOf(l[0])>-1)&&(s=l.shift()),e=l.join(i)}return typeof s=="string"&&(s=[s]),{key:e,namespaces:s}}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 i=t.returnDetails!==void 0?t.returnDetails:this.options.returnDetails,s=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,c=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(l&&l.toLowerCase()==="cimode"){if(c){const S=t.nsSeparator||this.options.nsSeparator;return i?{res:`${u}${S}${o}`,usedKey:o,exactUsedKey:o,usedLng:l,usedNS:u,usedParams:this.getUsedParamsDetails(t)}:`${u}${S}${o}`}return i?{res:o,usedKey:o,exactUsedKey:o,usedLng:l,usedNS:u,usedParams:this.getUsedParamsDetails(t)}:o}const p=this.resolve(e,t);let f=p&&p.res;const g=p&&p.usedKey||o,m=p&&p.exactUsedKey||o,y=Object.prototype.toString.apply(f),v=["[object Number]","[object Function]","[object RegExp]"],x=t.joinArrays!==void 0?t.joinArrays:this.options.joinArrays,w=!this.i18nFormat||this.i18nFormat.handleAsObject;if(w&&f&&(typeof f!="string"&&typeof f!="boolean"&&typeof f!="number")&&v.indexOf(y)<0&&!(typeof x=="string"&&Array.isArray(f))){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const S=this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,f,{...t,ns:a}):`key '${o} (${this.language})' returned an object instead of string.`;return i?(p.res=S,p.usedParams=this.getUsedParamsDetails(t),p):S}if(s){const S=Array.isArray(f),O=S?[]:{},b=S?m:g;for(const L in f)if(Object.prototype.hasOwnProperty.call(f,L)){const U=`${b}${s}${L}`;O[L]=this.translate(U,{...t,joinArrays:!1,ns:a}),O[L]===U&&(O[L]=f[L])}f=O}}else if(w&&typeof x=="string"&&Array.isArray(f))f=f.join(x),f&&(f=this.extendTranslation(f,e,t,n));else{let S=!1,O=!1;const b=t.count!==void 0&&typeof t.count!="string",L=ye.hasDefaultValue(t),U=b?this.pluralResolver.getSuffix(l,t.count,t):"",$=t.ordinal&&b?this.pluralResolver.getSuffix(l,t.count,{ordinal:!1}):"",A=b&&!t.ordinal&&t.count===0&&this.pluralResolver.shouldUseIntlApi(),F=A&&t[`defaultValue${this.options.pluralSeparator}zero`]||t[`defaultValue${U}`]||t[`defaultValue${$}`]||t.defaultValue;!this.isValidLookup(f)&&L&&(S=!0,f=F),this.isValidLookup(f)||(O=!0,f=o);const B=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&O?void 0:f,_=L&&F!==f&&this.options.updateMissing;if(O||S||_){if(this.logger.log(_?"updateKey":"missingKey",l,u,o,_?F:f),s){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 d=[];const h=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if(this.options.saveMissingTo==="fallback"&&h&&h[0])for(let P=0;P{const q=L&&k!==f?k:B;this.options.missingKeyHandler?this.options.missingKeyHandler(P,u,j,q,_,t):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(P,u,j,q,_,t),this.emit("missingKey",P,u,j,f)};this.options.saveMissing&&(this.options.saveMissingPlurals&&b?d.forEach(P=>{const j=this.pluralResolver.getSuffixes(P,t);A&&t[`defaultValue${this.options.pluralSeparator}zero`]&&j.indexOf(`${this.options.pluralSeparator}zero`)<0&&j.push(`${this.options.pluralSeparator}zero`),j.forEach(k=>{E([P],o+k,t[`defaultValue${k}`]||F)})}):E(d,o,F))}f=this.extendTranslation(f,e,t,p,n),O&&f===o&&this.options.appendNamespaceToMissingKey&&(f=`${u}:${o}`),(O||S)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?f=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${u}:${o}`:o,S?f:void 0):f=this.options.parseMissingKeyHandler(f))}return i?(p.res=f,p.usedParams=this.getUsedParamsDetails(t),p):f}extendTranslation(e,t,n,i,s){var o=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const l=typeof e=="string"&&(n&&n.interpolation&&n.interpolation.skipOnVariables!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let c;if(l){const f=e.match(this.interpolator.nestingRegexp);c=f&&f.length}let p=n.replace&&typeof n.replace!="string"?n.replace:n;if(this.options.interpolation.defaultVariables&&(p={...this.options.interpolation.defaultVariables,...p}),e=this.interpolator.interpolate(e,p,n.lng||this.language,n),l){const f=e.match(this.interpolator.nestingRegexp),g=f&&f.length;c1&&arguments[1]!==void 0?arguments[1]:{},n,i,s,o,a;return typeof e=="string"&&(e=[e]),e.forEach(u=>{if(this.isValidLookup(n))return;const l=this.extractFromKey(u,t),c=l.key;i=c;let p=l.namespaces;this.options.fallbackNS&&(p=p.concat(this.options.fallbackNS));const f=t.count!==void 0&&typeof t.count!="string",g=f&&!t.ordinal&&t.count===0&&this.pluralResolver.shouldUseIntlApi(),m=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);p.forEach(v=>{this.isValidLookup(n)||(a=v,!Je[`${y[0]}-${v}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(a)&&(Je[`${y[0]}-${v}`]=!0,this.logger.warn(`key "${i}" 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(x=>{if(this.isValidLookup(n))return;o=x;const w=[c];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(w,c,x,v,t);else{let S;f&&(S=this.pluralResolver.getSuffix(x,t.count,t));const O=`${this.options.pluralSeparator}zero`,b=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(f&&(w.push(c+S),t.ordinal&&S.indexOf(b)===0&&w.push(c+S.replace(b,this.options.pluralSeparator)),g&&w.push(c+O)),m){const L=`${c}${this.options.contextSeparator}${t.context}`;w.push(L),f&&(w.push(L+S),t.ordinal&&S.indexOf(b)===0&&w.push(L+S.replace(b,this.options.pluralSeparator)),g&&w.push(L+O))}}let C;for(;C=w.pop();)this.isValidLookup(n)||(s=C,n=this.getResource(x,v,C,t))}))})}),{res:n,usedKey:i,exactUsedKey:s,usedLng:o,usedNS:a}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,t,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,i):this.resourceStore.getResource(e,t,n,i)}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 i=n?e.replace:e;if(n&&typeof e.count<"u"&&(i.count=e.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!n){i={...i};for(const s of t)delete i[s]}return i}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 Oe(r){return r.charAt(0).toUpperCase()+r.slice(1)}class We{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=H.create("languageUtils")}getScriptPartFromCode(e){if(e=me(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=me(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(i=>i.toLowerCase()):n.length===2?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=Oe(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]=Oe(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=Oe(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 i=this.formatLanguageCode(n);(!this.options.supportedLngs||this.isSupportedCode(i))&&(t=i)}),!t&&this.options.supportedLngs&&e.forEach(n=>{if(t)return;const i=this.getLanguagePartFromCode(n);if(this.isSupportedCode(i))return t=i;t=this.options.supportedLngs.find(s=>{if(s===i)return s;if(!(s.indexOf("-")<0&&i.indexOf("-")<0)&&(s.indexOf("-")>0&&i.indexOf("-")<0&&s.substring(0,s.indexOf("-"))===i||s.indexOf(i)===0&&i.length>1))return s})}),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),i=[],s=o=>{o&&(this.isSupportedCode(o)?i.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"&&s(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&s(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&s(this.getLanguagePartFromCode(e))):typeof e=="string"&&s(this.formatLanguageCode(e)),n.forEach(o=>{i.indexOf(o)<0&&s(this.formatLanguageCode(o))}),i}}let fn=[{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}],cn={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 dn=["v1","v2","v3"],pn=["v4"],Xe={zero:0,one:1,two:2,few:3,many:4,other:5};function hn(){const r={};return fn.forEach(e=>{e.lngs.forEach(t=>{r[t]={numbers:e.nr,plurals:cn[e.fc]}})}),r}class gn{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||pn.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=hn()}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(me(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(i=>`${t}${i}`)}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((i,s)=>Xe[i]-Xe[s]).map(i=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${i}`):n.numbers.map(i=>this.getSuffix(e,i,t)):[]}getSuffix(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=this.getRule(e,n);return i?this.shouldUseIntlApi()?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i.select(t)}`:this.getSuffixRetroCompatible(i,t):(this.logger.warn(`no plural rule found for: ${e}`),"")}getSuffixRetroCompatible(e,t){const n=e.noAbs?e.plurals(t):e.plurals(Math.abs(t));let i=e.numbers[n];this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1&&(i===2?i="plural":i===1&&(i=""));const s=()=>this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString();return this.options.compatibilityJSON==="v1"?i===1?"":typeof i=="number"?`_plural_${i.toString()}`:s():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1?s():this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString()}shouldUseIntlApi(){return!dn.includes(this.options.compatibilityJSON)}}function Ge(r,e,t){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,s=nn(r,e,t);return!s&&i&&typeof t=="string"&&(s=Ce(r,t,n),s===void 0&&(s=Ce(e,t,n))),s}class mn{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:i,prefix:s,prefixEscaped:o,suffix:a,suffixEscaped:u,formatSeparator:l,unescapeSuffix:c,unescapePrefix:p,nestingPrefix:f,nestingPrefixEscaped:g,nestingSuffix:m,nestingSuffixEscaped:y,nestingOptionsSeparator:v,maxReplaces:x,alwaysFormat:w}=e.interpolation;this.escape=t!==void 0?t:sn,this.escapeValue=n!==void 0?n:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=s?K(s):o||"{{",this.suffix=a?K(a):u||"}}",this.formatSeparator=l||",",this.unescapePrefix=c?"":p||"-",this.unescapeSuffix=this.unescapePrefix?"":c||"",this.nestingPrefix=f?K(f):g||K("$t("),this.nestingSuffix=m?K(m):y||K(")"),this.nestingOptionsSeparator=v||",",this.maxReplaces=x||1e3,this.alwaysFormat=w!==void 0?w:!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,i){let s,o,a;const u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function l(m){return m.replace(/\$/g,"$$$$")}const c=m=>{if(m.indexOf(this.formatSeparator)<0){const w=Ge(t,u,m,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(w,void 0,n,{...i,...t,interpolationkey:m}):w}const y=m.split(this.formatSeparator),v=y.shift().trim(),x=y.join(this.formatSeparator).trim();return this.format(Ge(t,u,v,this.options.keySeparator,this.options.ignoreJSONStructure),x,n,{...i,...t,interpolationkey:v})};this.resetRegExp();const p=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,f=i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:m=>l(m)},{regex:this.regexp,safeValue:m=>this.escapeValue?l(this.escape(m)):l(m)}].forEach(m=>{for(a=0;s=m.regex.exec(e);){const y=s[1].trim();if(o=c(y),o===void 0)if(typeof p=="function"){const x=p(e,s,i);o=typeof x=="string"?x:""}else if(i&&Object.prototype.hasOwnProperty.call(i,y))o="";else if(f){o=s[0];continue}else this.logger.warn(`missed to pass in variable ${y} for interpolating ${e}`),o="";else typeof o!="string"&&!this.useRawValueToEscape&&(o=qe(o));const v=m.safeValue(o);if(e=e.replace(s[0],v),f?(m.regex.lastIndex+=o.length,m.regex.lastIndex-=s[0].length):m.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),e}nest(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,s,o;function a(u,l){const c=this.nestingOptionsSeparator;if(u.indexOf(c)<0)return u;const p=u.split(new RegExp(`${c}[ ]*{`));let f=`{${p[1]}`;u=p[0],f=this.interpolate(f,o);const g=f.match(/'/g),m=f.match(/"/g);(g&&g.length%2===0&&!m||m.length%2!==0)&&(f=f.replace(/'/g,'"'));try{o=JSON.parse(f),l&&(o={...l,...o})}catch(y){return this.logger.warn(`failed parsing options string in nesting for key ${u}`,y),`${u}${c}${f}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,u}for(;i=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(i[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(i[1])){const c=i[1].split(this.formatSeparator).map(p=>p.trim());i[1]=c.shift(),u=c,l=!0}if(s=t(a.call(this,i[1].trim(),o),o),s&&i[0]===e&&typeof s!="string")return s;typeof s!="string"&&(s=qe(s)),s||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${e}`),s=""),l&&(s=u.reduce((c,p)=>this.format(c,p,n.lng,{...n,interpolationkey:i[1].trim()}),s.trim())),e=e.replace(i[0],s),this.regexp.lastIndex=0}return e}}function yn(r){let e=r.toLowerCase().trim();const t={};if(r.indexOf("(")>-1){const n=r.split("(");e=n[0].toLowerCase().trim();const i=n[1].substring(0,n[1].length-1);e==="currency"&&i.indexOf(":")<0?t.currency||(t.currency=i.trim()):e==="relativetime"&&i.indexOf(":")<0?t.range||(t.range=i.trim()):i.split(";").forEach(o=>{if(o){const[a,...u]=o.split(":"),l=u.join(":").trim().replace(/^'+|'+$/g,""),c=a.trim();t[c]||(t[c]=l),l==="false"&&(t[c]=!1),l==="true"&&(t[c]=!0),isNaN(l)||(t[c]=parseInt(l,10))}})}return{formatName:e,formatOptions:t}}function J(r){const e={};return function(n,i,s){const o=i+JSON.stringify(s);let a=e[o];return a||(a=r(me(i),s),e[o]=a),a(n)}}class vn{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=H.create("formatter"),this.options=e,this.formats={number:J((t,n)=>{const i=new Intl.NumberFormat(t,{...n});return s=>i.format(s)}),currency:J((t,n)=>{const i=new Intl.NumberFormat(t,{...n,style:"currency"});return s=>i.format(s)}),datetime:J((t,n)=>{const i=new Intl.DateTimeFormat(t,{...n});return s=>i.format(s)}),relativetime:J((t,n)=>{const i=new Intl.RelativeTimeFormat(t,{...n});return s=>i.format(s,n.range||"day")}),list:J((t,n)=>{const i=new Intl.ListFormat(t,{...n});return s=>i.format(s)})},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()]=J(t)}format(e,t,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return t.split(this.formatSeparator).reduce((a,u)=>{const{formatName:l,formatOptions:c}=yn(u);if(this.formats[l]){let p=a;try{const f=i&&i.formatParams&&i.formatParams[i.interpolationkey]||{},g=f.locale||f.lng||i.locale||i.lng||n;p=this.formats[l](a,g,{...c,...i,...f})}catch(f){this.logger.warn(f)}return p}else this.logger.warn(`there was no format function for ${l}`);return a},e)}}function bn(r,e){r.pending[e]!==void 0&&(delete r.pending[e],r.pendingCount--)}class wn extends xe{constructor(e,t,n){let i=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=i,this.logger=H.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(n,i.backend,i)}queueLoad(e,t,n,i){const s={},o={},a={},u={};return e.forEach(l=>{let c=!0;t.forEach(p=>{const f=`${l}|${p}`;!n.reload&&this.store.hasResourceBundle(l,p)?this.state[f]=2:this.state[f]<0||(this.state[f]===1?o[f]===void 0&&(o[f]=!0):(this.state[f]=1,c=!1,o[f]===void 0&&(o[f]=!0),s[f]===void 0&&(s[f]=!0),u[p]===void 0&&(u[p]=!0)))}),c||(a[l]=!0)}),(Object.keys(s).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(s),pending:Object.keys(o),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(u)}}loaded(e,t,n){const i=e.split("|"),s=i[0],o=i[1];t&&this.emit("failedLoading",s,o,t),n&&this.store.addResourceBundle(s,o,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2;const a={};this.queue.forEach(u=>{tn(u.loaded,[s],o),bn(u,e),t&&u.errors.push(t),u.pendingCount===0&&!u.done&&(Object.keys(u.loaded).forEach(l=>{a[l]||(a[l]={});const c=u.loaded[l];c.length&&c.forEach(p=>{a[l][p]===void 0&&(a[l][p]=!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 i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,s=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:i,wait:s,callback:o});return}this.readingCalls++;const a=(l,c)=>{if(this.readingCalls--,this.waitingReads.length>0){const p=this.waitingReads.shift();this.read(p.lng,p.ns,p.fcName,p.tried,p.wait,p.callback)}if(l&&c&&i{this.read.call(this,e,t,n,i+1,s*2,o)},s);return}o(l,c)},u=this.backend[n].bind(this.backend);if(u.length===2){try{const l=u(e,t);l&&typeof l.then=="function"?l.then(c=>a(null,c)).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]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();typeof e=="string"&&(e=this.languageUtils.toResolveHierarchy(e)),typeof t=="string"&&(t=[t]);const s=this.queueLoad(e,t,n,i);if(!s.toLoad.length)return s.pending.length||i(),null;s.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("|"),i=n[0],s=n[1];this.read(i,s,"read",void 0,void 0,(o,a)=>{o&&this.logger.warn(`${t}loading namespace ${s} for language ${i} failed`,o),!o&&a&&this.logger.log(`${t}loaded namespace ${s} for language ${i}`,a),this.loaded(e,o,a)})}saveMissing(e,t,n,i,s){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:s},l=this.backend.create.bind(this.backend);if(l.length<6)try{let c;l.length===5?c=l(e,t,n,i,u):c=l(e,t,n,i),c&&typeof c.then=="function"?c.then(p=>a(null,p)).catch(a):a(null,c)}catch(c){a(c)}else l(e,t,n,i,a,u)}!e||!e[0]||this.store.addResource(e[0],t,n,i)}}}function Qe(){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(i=>{t[i]=n[i]})}return t},interpolation:{escapeValue:!0,format:r=>r,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function Ye(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 le(){}function xn(r){Object.getOwnPropertyNames(Object.getPrototypeOf(r)).forEach(t=>{typeof r[t]=="function"&&(r[t]=r[t].bind(r))})}class ie extends xe{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if(super(),this.options=Ye(e),this.services={},this.logger=H,this.modules={external:[]},xn(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 i=Qe();this.options={...i,...this.options,...Ye(t)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...i.interpolation,...this.options.interpolation}),t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator);function s(c){return c?typeof c=="function"?new c:c:null}if(!this.options.isClone){this.modules.logger?H.init(s(this.modules.logger),this.options):H.init(null,this.options);let c;this.modules.formatter?c=this.modules.formatter:typeof Intl<"u"&&(c=vn);const p=new We(this.options);this.store=new Ke(this.options.resources,this.options);const f=this.services;f.logger=H,f.resourceStore=this.store,f.languageUtils=p,f.pluralResolver=new gn(p,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),c&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(f.formatter=s(c),f.formatter.init(f,this.options),this.options.interpolation.format=f.formatter.format.bind(f.formatter)),f.interpolator=new mn(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new wn(s(this.modules.backend),f.resourceStore,f,this.options),f.backendConnector.on("*",function(g){for(var m=arguments.length,y=new Array(m>1?m-1:0),v=1;v1?m-1:0),v=1;v{g.init&&g.init(this)})}if(this.format=this.options.interpolation.format,n||(n=le),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const c=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);c.length>0&&c[0]!=="dev"&&(this.options.lng=c[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(c=>{this[c]=function(){return e.store[c](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(c=>{this[c]=function(){return e.store[c](...arguments),e}});const u=Q(),l=()=>{const c=(p,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),u.resolve(f),n(p,f)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return c(null,this.t.bind(this));this.changeLanguage(this.options.lng,c)};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]:le;const i=typeof e=="string"?e:this.language;if(typeof e=="function"&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(i&&i.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return n();const s=[],o=a=>{if(!a||a==="cimode")return;this.services.languageUtils.toResolveHierarchy(a).forEach(l=>{l!=="cimode"&&s.indexOf(l)<0&&s.push(l)})};i?o(i):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(s,this.options.ns,a=>{!a&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(a)})}else n(null)}reloadResources(e,t,n){const i=Q();return e||(e=this.languages),t||(t=this.options.ns),n||(n=le),this.services.backendConnector.reload(e,t,s=>{i.resolve(),n(s)}),i}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&Et.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-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}}changeLanguage(e,t){var n=this;this.isLanguageChangingTo=e;const i=Q();this.emit("languageChanging",e);const s=u=>{this.language=u,this.languages=this.services.languageUtils.toResolveHierarchy(u),this.resolvedLanguage=void 0,this.setResolvedLanguage(u)},o=(u,l)=>{l?(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(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||s(l),this.translator.language||this.translator.changeLanguage(l),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(l)),this.loadResources(l,c=>{o(c,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),i}getFixedT(e,t,n){var i=this;const s=function(o,a){let u;if(typeof a!="object"){for(var l=arguments.length,c=new Array(l>2?l-2:0),p=2;p`${u.keyPrefix}${f}${m}`):g=u.keyPrefix?`${u.keyPrefix}${f}${o}`:o,i.t(g,u)};return typeof e=="string"?s.lng=e:s.lngs=e,s.ns=t,s.keyPrefix=n,s}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let t=arguments.length>1&&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],i=this.options?this.options.fallbackLng:!1,s=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)&&(!i||o(s,e)))}loadNamespaces(e,t){const n=Q();return this.options.ns?(typeof e=="string"&&(e=[e]),e.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{n.resolve(),t&&t(i)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){const n=Q();typeof e=="string"&&(e=[e]);const i=this.options.preload||[],s=e.filter(o=>i.indexOf(o)<0&&this.services.languageUtils.isSupportedCode(o));return s.length?(this.options.preload=i.concat(s),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 We(Qe());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 ie(e,t)}cloneInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:le;const n=e.forkResourceStore;n&&delete e.forkResourceStore;const i={...this.options,...e,isClone:!0},s=new ie(i);return(e.debug!==void 0||e.prefix!==void 0)&&(s.logger=s.logger.clone(e)),["store","services","language"].forEach(a=>{s[a]=this[a]}),s.services={...this.services},s.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},n&&(s.store=new Ke(this.store.data,i),s.services.resourceStore=s.store),s.translator=new ye(s.services,i),s.translator.on("*",function(a){for(var u=arguments.length,l=new Array(u>1?u-1:0),c=1;c{if(e)for(const t in e)r[t]===void 0&&(r[t]=e[t])}),r}const Ze=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,Ln=(r,e,t)=>{const n=t||{};n.path=n.path||"/";const i=encodeURIComponent(e);let s=`${r}=${i}`;if(n.maxAge>0){const o=n.maxAge-0;if(Number.isNaN(o))throw new Error("maxAge should be a Number");s+=`; Max-Age=${Math.floor(o)}`}if(n.domain){if(!Ze.test(n.domain))throw new TypeError("option domain is invalid");s+=`; Domain=${n.domain}`}if(n.path){if(!Ze.test(n.path))throw new TypeError("option path is invalid");s+=`; Path=${n.path}`}if(n.expires){if(typeof n.expires.toUTCString!="function")throw new TypeError("option expires is invalid");s+=`; Expires=${n.expires.toUTCString()}`}if(n.httpOnly&&(s+="; HttpOnly"),n.secure&&(s+="; Secure"),n.sameSite)switch(typeof n.sameSite=="string"?n.sameSite.toLowerCase():n.sameSite){case!0:s+="; SameSite=Strict";break;case"lax":s+="; SameSite=Lax";break;case"strict":s+="; SameSite=Strict";break;case"none":s+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return s},et={create(r,e,t,n){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};t&&(i.expires=new Date,i.expires.setTime(i.expires.getTime()+t*60*1e3)),n&&(i.domain=n),document.cookie=Ln(r,encodeURIComponent(e),i)},read(r){const e=`${r}=`,t=document.cookie.split(";");for(let n=0;n-1&&(i=window.location.hash.substring(window.location.hash.indexOf("?")));const o=i.substring(1).split("&");for(let a=0;a0&&o[a].substring(0,u)===e&&(t=o[a].substring(u+1))}}return t}};let Y=null;const tt=()=>{if(Y!==null)return Y;try{Y=window!=="undefined"&&window.localStorage!==null;const r="i18next.translate.boo";window.localStorage.setItem(r,"foo"),window.localStorage.removeItem(r)}catch{Y=!1}return Y};var kn={name:"localStorage",lookup(r){let{lookupLocalStorage:e}=r;if(e&&tt())return window.localStorage.getItem(e)||void 0},cacheUserLanguage(r,e){let{lookupLocalStorage:t}=e;t&&tt()&&window.localStorage.setItem(t,r)}};let Z=null;const nt=()=>{if(Z!==null)return Z;try{Z=window!=="undefined"&&window.sessionStorage!==null;const r="i18next.translate.boo";window.sessionStorage.setItem(r,"foo"),window.sessionStorage.removeItem(r)}catch{Z=!1}return Z};var jn={name:"sessionStorage",lookup(r){let{lookupSessionStorage:e}=r;if(e&&nt())return window.sessionStorage.getItem(e)||void 0},cacheUserLanguage(r,e){let{lookupSessionStorage:t}=e;t&&nt()&&window.sessionStorage.setItem(t,r)}},Cn={name:"navigator",lookup(r){const e=[];if(typeof navigator<"u"){const{languages:t,userLanguage:n,language:i}=navigator;if(t)for(let s=0;s0?e:void 0}},Rn={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}},$n={name:"path",lookup(r){var i;let{lookupFromPathIndex:e}=r;if(typeof window>"u")return;const t=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(t)?(i=t[typeof e=="number"?e:0])==null?void 0:i.replace("/",""):void 0}},An={name:"subdomain",lookup(r){var i,s;let{lookupFromSubdomainIndex:e}=r;const t=typeof e=="number"?e+1:1,n=typeof window<"u"&&((s=(i=window.location)==null?void 0:i.hostname)==null?void 0:s.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(n)return n[t]}};function Tn(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:r=>r}}class In{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=En(t,this.options||{},Tn()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=i=>i.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=n,this.addDetector(Pn),this.addDetector(Nn),this.addDetector(kn),this.addDetector(jn),this.addDetector(Cn),this.addDetector(Rn),this.addDetector($n),this.addDetector(An)}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 i=this.detectors[n].lookup(this.options);i&&typeof i=="string"&&(i=[i]),i&&(t=t.concat(i))}}),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)}))}}In.type="languageDetector";var Lt=[],Dn=Lt.forEach,Fn=Lt.slice;function V(r){return Dn.call(Fn.call(arguments,1),function(e){if(e)for(var t in e)r[t]===void 0&&(r[t]=e[t])}),r}function Un(r,e,t){var n;return function(){var i=this,s=arguments,o=function(){n=null,r.apply(i,s)};clearTimeout(n),n=setTimeout(o,e)}}function _e(r,e,t){function n(o){return o&&o.indexOf("###")>-1?o.replace(/###/g,"."):o}for(var i=typeof e!="string"?[].concat(e):e.split(".");i.length>1;){if(!r)return{};var s=n(i.shift());!r[s]&&t&&(r[s]=new t),r=r[s]}return r?{obj:r,k:n(i.shift())}:{}}function Ee(r,e,t){var n=_e(r,e,Object),i=n.obj,s=n.k;i[s]=t}function _n(r,e,t,n){var i=_e(r,e,Object),s=i.obj,o=i.k;s[o]=s[o]||[],s[o].push(t)}function rt(r,e){var t=_e(r,e),n=t.obj,i=t.k;if(n)return n[i]}var it=new RegExp("{{(.+?)}}","g");function Mn(r){return r==null?"":""+r}function ee(r,e,t){var n,i;function s(o){return o.replace(/\$/g,"$$$$")}for(;n=it.exec(r);)i=n[1].trim(),typeof i!="string"&&(i=Mn(i)),i||(i=""),i=s(i),r=r.replace(n[0],e[i]||i),it.lastIndex=0;return r}function te(r,e){return e.reduce(function(t,n){if(t)return t;if(!r||!r[n]||typeof r[n]!="string"||!r[n].toLowerCase()===n.toLowerCase()){var i='i18next-locize-backend :: got "'.concat(r[n],'" in options for ').concat(n," which is invalid.");return console.warn(i),i}return!1},!1)}function st(){var r,e,t=new Promise(function(n,i){r=n,e=i});return t.resolve=r,t.reject=e,t}function Bn(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 Re={exports:{}},fe={exports:{}},ot;function Hn(){return ot||(ot=1,function(r,e){var t=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof ne<"u"&&ne,n=function(){function s(){this.fetch=!1,this.DOMException=t.DOMException}return s.prototype=t,new s}();(function(s){(function(o){var a=typeof s<"u"&&s||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(d){return d&&DataView.prototype.isPrototypeOf(d)}if(u.arrayBuffer)var c=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],p=ArrayBuffer.isView||function(d){return d&&c.indexOf(Object.prototype.toString.call(d))>-1};function f(d){if(typeof d!="string"&&(d=String(d)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(d)||d==="")throw new TypeError('Invalid character in header field name: "'+d+'"');return d.toLowerCase()}function g(d){return typeof d!="string"&&(d=String(d)),d}function m(d){var h={next:function(){var E=d.shift();return{done:E===void 0,value:E}}};return u.iterable&&(h[Symbol.iterator]=function(){return h}),h}function y(d){this.map={},d instanceof y?d.forEach(function(h,E){this.append(E,h)},this):Array.isArray(d)?d.forEach(function(h){this.append(h[0],h[1])},this):d&&Object.getOwnPropertyNames(d).forEach(function(h){this.append(h,d[h])},this)}y.prototype.append=function(d,h){d=f(d),h=g(h);var E=this.map[d];this.map[d]=E?E+", "+h:h},y.prototype.delete=function(d){delete this.map[f(d)]},y.prototype.get=function(d){return d=f(d),this.has(d)?this.map[d]:null},y.prototype.has=function(d){return this.map.hasOwnProperty(f(d))},y.prototype.set=function(d,h){this.map[f(d)]=g(h)},y.prototype.forEach=function(d,h){for(var E in this.map)this.map.hasOwnProperty(E)&&d.call(h,this.map[E],E,this)},y.prototype.keys=function(){var d=[];return this.forEach(function(h,E){d.push(E)}),m(d)},y.prototype.values=function(){var d=[];return this.forEach(function(h){d.push(h)}),m(d)},y.prototype.entries=function(){var d=[];return this.forEach(function(h,E){d.push([E,h])}),m(d)},u.iterable&&(y.prototype[Symbol.iterator]=y.prototype.entries);function v(d){if(d.bodyUsed)return Promise.reject(new TypeError("Already read"));d.bodyUsed=!0}function x(d){return new Promise(function(h,E){d.onload=function(){h(d.result)},d.onerror=function(){E(d.error)}})}function w(d){var h=new FileReader,E=x(h);return h.readAsArrayBuffer(d),E}function C(d){var h=new FileReader,E=x(h);return h.readAsText(d),E}function S(d){for(var h=new Uint8Array(d),E=new Array(h.length),P=0;P-1?h:d}function $(d,h){if(!(this instanceof $))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');h=h||{};var E=h.body;if(d instanceof $){if(d.bodyUsed)throw new TypeError("Already read");this.url=d.url,this.credentials=d.credentials,h.headers||(this.headers=new y(d.headers)),this.method=d.method,this.mode=d.mode,this.signal=d.signal,!E&&d._bodyInit!=null&&(E=d._bodyInit,d.bodyUsed=!0)}else this.url=String(d);if(this.credentials=h.credentials||this.credentials||"same-origin",(h.headers||!this.headers)&&(this.headers=new y(h.headers)),this.method=U(h.method||this.method||"GET"),this.mode=h.mode||this.mode||null,this.signal=h.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&E)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(E),(this.method==="GET"||this.method==="HEAD")&&(h.cache==="no-store"||h.cache==="no-cache")){var P=/([?&])_=[^&]*/;if(P.test(this.url))this.url=this.url.replace(P,"$1_="+new Date().getTime());else{var j=/\?/;this.url+=(j.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}$.prototype.clone=function(){return new $(this,{body:this._bodyInit})};function A(d){var h=new FormData;return d.trim().split("&").forEach(function(E){if(E){var P=E.split("="),j=P.shift().replace(/\+/g," "),k=P.join("=").replace(/\+/g," ");h.append(decodeURIComponent(j),decodeURIComponent(k))}}),h}function F(d){var h=new y,E=d.replace(/\r?\n[\t ]+/g," ");return E.split("\r").map(function(P){return P.indexOf(` `)===0?P.substr(1,P.length):P}).forEach(function(P){var j=P.split(":"),k=j.shift().trim();if(k){var q=j.join(":").trim();h.append(k,q)}}),h}b.call($.prototype);function T(d,h){if(!(this instanceof T))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');h||(h={}),this.type="default",this.status=h.status===void 0?200:h.status,this.ok=this.status>=200&&this.status<300,this.statusText=h.statusText===void 0?"":""+h.statusText,this.headers=new y(h.headers),this.url=h.url||"",this._initBody(d)}b.call(T.prototype),T.prototype.clone=function(){return new T(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new y(this.headers),url:this.url})},T.error=function(){var d=new T(null,{status:0,statusText:""});return d.type="error",d};var B=[301,302,303,307,308];T.redirect=function(d,h){if(B.indexOf(h)===-1)throw new RangeError("Invalid status code");return new T(null,{status:h,headers:{location:d}})},o.DOMException=a.DOMException;try{new o.DOMException}catch{o.DOMException=function(h,E){this.message=h,this.name=E;var P=Error(h);this.stack=P.stack},o.DOMException.prototype=Object.create(Error.prototype),o.DOMException.prototype.constructor=o.DOMException}function _(d,h){return new Promise(function(E,P){var j=new $(d,h);if(j.signal&&j.signal.aborted)return P(new o.DOMException("Aborted","AbortError"));var k=new XMLHttpRequest;function q(){k.abort()}k.onload=function(){var M={status:k.status,statusText:k.statusText,headers:F(k.getAllResponseHeaders()||"")};M.url="responseURL"in k?k.responseURL:M.headers.get("X-Request-URL");var ae="response"in k?k.response:k.responseText;setTimeout(function(){E(new T(ae,M))},0)},k.onerror=function(){setTimeout(function(){P(new TypeError("Network request failed"))},0)},k.ontimeout=function(){setTimeout(function(){P(new TypeError("Network request failed"))},0)},k.onabort=function(){setTimeout(function(){P(new o.DOMException("Aborted","AbortError"))},0)};function It(M){try{return M===""&&a.location.href?a.location.href:M}catch{return M}}k.open(j.method,It(j.url),!0),j.credentials==="include"?k.withCredentials=!0:j.credentials==="omit"&&(k.withCredentials=!1),"responseType"in k&&(u.blob?k.responseType="blob":u.arrayBuffer&&j.headers.get("Content-Type")&&j.headers.get("Content-Type").indexOf("application/octet-stream")!==-1&&(k.responseType="arraybuffer")),h&&typeof h.headers=="object"&&!(h.headers instanceof y)?Object.getOwnPropertyNames(h.headers).forEach(function(M){k.setRequestHeader(M,g(h.headers[M]))}):j.headers.forEach(function(M,ae){k.setRequestHeader(ae,M)}),j.signal&&(j.signal.addEventListener("abort",q),k.onreadystatechange=function(){k.readyState===4&&j.signal.removeEventListener("abort",q)}),k.send(typeof j._bodyInit>"u"?null:j._bodyInit)})}return _.polyfill=!0,a.fetch||(a.fetch=_,a.Headers=y,a.Request=$,a.Response=T),o.Headers=y,o.Request=$,o.Response=T,o.fetch=_,o})({})})(n),n.fetch.ponyfill=!0,delete n.fetch.polyfill;var i=t.fetch?t:n;e=i.fetch,e.default=i.fetch,e.fetch=i.fetch,e.Headers=i.Headers,e.Request=i.Request,e.Response=i.Response,r.exports=e}(fe,fe.exports)),fe.exports}(function(r,e){var t;if(typeof fetch=="function"&&(typeof ne<"u"&&ne.fetch?t=ne.fetch:typeof window<"u"&&window.fetch?t=window.fetch:t=fetch),typeof Bn<"u"&&typeof window>"u"){var n=t||Hn();n.default&&(n=n.default),e.default=n,r.exports=e.default}})(Re,Re.exports);var Pt=Re.exports;const Nt=Te(Pt),at=pt({__proto__:null,default:Nt},[Pt]);function ve(r){"@babel/helpers - typeof";return ve=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},ve(r)}var z;typeof fetch=="function"&&(typeof global<"u"&&global.fetch?z=global.fetch:typeof window<"u"&&window.fetch?z=window.fetch:z=fetch);var se;(typeof XMLHttpRequest=="function"||(typeof XMLHttpRequest>"u"?"undefined":ve(XMLHttpRequest))==="object")&&(typeof global<"u"&&global.XMLHttpRequest?se=global.XMLHttpRequest:typeof window<"u"&&window.XMLHttpRequest&&(se=window.XMLHttpRequest));var be;typeof ActiveXObject=="function"&&(typeof global<"u"&&global.ActiveXObject?be=global.ActiveXObject:typeof window<"u"&&window.ActiveXObject&&(be=window.ActiveXObject));!z&&at&&!se&&!be&&(z=Nt||at);typeof z!="function"&&(z=void 0);var zn=function(e,t,n,i){var s={};typeof window>"u"&&typeof global<"u"&&typeof global.process<"u"&&global.process.versions&&global.process.versions.node&&(s["User-Agent"]="i18next-locize-backend (node/".concat(global.process.version,"; ").concat(global.process.platform," ").concat(global.process.arch,")")),e.authorize&&e.apiKey&&(s.Authorization=e.apiKey),(n||e.setContentTypeJSON)&&(s["Content-Type"]="application/json");var o=function(u){var l=u.headers&&u.headers.get("x-cache")==="Error from cloudfront";if(!u.ok)return i(u.statusText||"Error",{status:u.status,resourceNotExisting:l});u.text().then(function(c){i(null,{status:u.status,data:c,resourceNotExisting:l})}).catch(i)};typeof fetch=="function"?fetch(t,{method:n?"POST":"GET",body:n?JSON.stringify(n):void 0,headers:s}).then(o).catch(i):z(t,{method:n?"POST":"GET",body:n?JSON.stringify(n):void 0,headers:s}).then(o).catch(i)},qn=function(e,t,n,i){try{var s;se?s=new se:s=new be("MSXML2.XMLHTTP.3.0"),s.open(n?"POST":"GET",t,1),e.crossDomain||s.setRequestHeader("X-Requested-With","XMLHttpRequest"),e.authorize&&e.apiKey&&s.setRequestHeader("Authorization",e.apiKey),(n||e.setContentTypeJSON)&&s.setRequestHeader("Content-Type","application/json"),s.onreadystatechange=function(){var o=s.getResponseHeader("x-cache")==="Error from cloudfront";s.readyState>3&&i(s.status>=400?s.statusText:null,{status:s.status,data:s.responseText,resourceNotExisting:o})},s.send(JSON.stringify(n))}catch(o){console&&console.log(o)}},Le=function(e,t,n,i){if(typeof n=="function"&&(i=n,n=void 0),i=i||function(){},z)return zn(e,t,n,i);if(typeof XMLHttpRequest=="function"||(typeof XMLHttpRequest>"u"?"undefined":ve(XMLHttpRequest))==="object"||typeof ActiveXObject=="function")return qn(e,t,n,i);i(new Error("No fetch and no xhr implementation found!"))};function X(r){"@babel/helpers - typeof";return X=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},X(r)}function Vn(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function Kn(r,e){for(var t=0;tr?(window.localStorage.removeItem("notExistingLocizeProject_".concat(i)),!1):!0:!1}):typeof document<"u"&&(e=function(i){var s=new Date;s.setTime(s.getTime()+r);var o="; expires=".concat(s.toGMTString()),a="notExistingLocizeProject_".concat(i);try{document.cookie="".concat(a,"=").concat(Date.now()).concat(o,";path=/")}catch{}},t=function(i){var s="notExistingLocizeProject_".concat(i),o="".concat(s,"=");try{for(var a=document.cookie.split(";"),u=0;u1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;Vn(this,r),this.services=e,this.options=t,this.allOptions=n,this.type="backend",e&&e.projectId?this.init(null,e,n,t):this.init(e,t,n,i)}return Jn(r,[{key:"init",value:function(t){var n=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;!i.referenceLng&&s.fallbackLng&&Array.isArray(s.fallbackLng)&&s.fallbackLng[0]!=="dev"&&(i.referenceLng=s.fallbackLng[0]),this.services=t;var a=Gn(),u=V(i,this.options||{});u.reloadInterval&&u.reloadInterval<5*60*1e3&&(console.warn("Your configured reloadInterval option is to low."),u.reloadInterval=a.reloadInterval),this.options=V(i,this.options||{},a),this.allOptions=s,this.somethingLoaded=!1,this.isProjectNotExisting=!1,this.storage=Qn(this.options.storageExpiration),this.options.pull&&console.warn('The pull API was removed use "private: true" option instead: https://docs.locize.com/integration/api#fetch-private-namespace-resources');var l=typeof window<"u"&&window.location&&window.location.hostname;l?(this.isAddOrUpdateAllowed=typeof this.options.allowedAddOrUpdateHosts=="function"?this.options.allowedAddOrUpdateHosts(l):this.options.allowedAddOrUpdateHosts.indexOf(l)>-1,t&&t.logger&&(s.saveMissing||s.updateMissing)&&(this.isAddOrUpdateAllowed?l!=="localhost"&&t.logger.warn('locize-backend: you are using the save or update missings feature from this host "'.concat(l,`". Make sure you will not use it in production! https://docs.locize.com/guides-tips-and-tricks/going-production`)):t.logger.warn(typeof this.options.allowedAddOrUpdateHosts=="function"?'locize-backend: will not save or update missings because allowedAddOrUpdateHosts returned false for the host "'.concat(l,'".'):'locize-backend: will not save or update missings because the host "'.concat(l,'" was not in the list of allowedAddOrUpdateHosts: ').concat(this.options.allowedAddOrUpdateHosts.join(", ")," (matches need to be exact).")))):this.isAddOrUpdateAllowed=!0,typeof o=="function"&&this.getOptions(function(c,p,f){if(c)return o(c);n.options.referenceLng=i.referenceLng||p.referenceLng||n.options.referenceLng,o(null,p,f)}),this.queuedWrites={pending:{}},this.debouncedProcess=Un(this.process,this.options.writeDebounce),this.interval&&clearInterval(this.interval),this.options.reloadInterval&&this.options.projectId&&(this.interval=setInterval(function(){return n.reload()},this.options.reloadInterval),X(this.interval)==="object"&&typeof this.interval.unref=="function"&&this.interval.unref())}},{key:"reload",value:function(){var t=this,n=this.services||{logger:console},i=n.backendConnector,s=n.languageUtils,o=n.logger;if(i){var a=i.language;if(!(a&&a.toLowerCase()==="cimode")){var u=[],l=function(p){var f=s.toResolveHierarchy(p);f.forEach(function(g){u.indexOf(g)<0&&u.push(g)})};l(a),this.allOptions.preload&&this.allOptions.preload.forEach(function(c){return l(c)}),u.forEach(function(c){t.allOptions.ns.forEach(function(p){i.read(c,p,"read",null,null,function(f,g){f&&o.warn("loading namespace ".concat(p," for language ").concat(c," failed"),f),!f&&g&&o.log("loaded namespace ".concat(p," for language ").concat(c),g),i.loaded("".concat(c,"|").concat(p),f,g)})})})}}}},{key:"getLanguages",value:function(t){var n=this,i;t||(i=st(),t=function(u,l){if(u)return i.reject(u);i.resolve(l)});var s=te(this.options,["projectId"]);if(s)return t(new Error(s));var o=ee(this.options.getLanguagesPath,{projectId:this.options.projectId});if(!this.isProjectNotExisting&&this.storage.isProjectNotExisting(this.options.projectId)&&(this.isProjectNotExisting=!0),this.isProjectNotExisting)return t(new Error("locize project ".concat(this.options.projectId," does not exist!")));if(this.getLanguagesCalls=this.getLanguagesCalls||[],this.getLanguagesCalls.push(t),!(this.getLanguagesCalls.length>1))return this.loadUrl({},o,function(a,u,l){if(!n.somethingLoaded&&l&&l.resourceNotExisting){n.isProjectNotExisting=!0,n.storage.setProjectNotExisting(n.options.projectId);var c=new Error("locize project ".concat(n.options.projectId," does not exist!")),p=n.getLanguagesCalls;return n.getLanguagesCalls=[],p.forEach(function(m){return m(c)})}if(u){var f=Object.keys(u).reduce(function(m,y){var v=u[y];return v.isReferenceLanguage&&(m=y),m},"");f&&n.options.referenceLng!==f&&(n.options.referenceLng=f)}n.somethingLoaded=!0;var g=n.getLanguagesCalls;n.getLanguagesCalls=[],g.forEach(function(m){return m(a,u)})}),i}},{key:"getOptions",value:function(t){var n=this,i;return t||(i=st(),t=function(o,a){if(o)return i.reject(o);i.resolve(a)}),this.getLanguages(function(s,o){if(s)return t(s);var a=Object.keys(o);if(!a.length)return t(new Error("was unable to load languages via API"));var u=a.reduce(function(c,p){var f=o[p];return f.translated[n.options.version]&&f.translated[n.options.version]>=n.options.translatedPercentageThreshold&&c.push(p),c},[]),l=a.reduce(function(c,p){return p.indexOf("-")>-1?!0:c},!1);t(null,{fallbackLng:n.options.referenceLng,referenceLng:n.options.referenceLng,supportedLngs:u,load:l?"all":"languageOnly"},o)}),i}},{key:"checkIfProjectExists",value:function(t){var n=this,i=this.services||{logger:console},s=i.logger;if(this.somethingLoaded){t&&t(null);return}if(this.alreadyRequestedCheckIfProjectExists){setTimeout(function(){return n.checkIfProjectExists(t)},this.options.checkForProjectTimeout);return}this.alreadyRequestedCheckIfProjectExists=!0,this.getLanguages(function(o){o&&o.message&&o.message.indexOf("does not exist")>0&&s&&s.error(o.message),t&&t(o)})}},{key:"read",value:function(t,n,i){var s=this,o=this.services||{logger:console},a=o.logger,u,l={};if(this.options.private){var c=te(this.options,["projectId","version","apiKey"]);if(c)return i(new Error(c),!1);u=ee(this.options.privatePath,{lng:t,ns:n,projectId:this.options.projectId,version:this.options.version}),l={authorize:!0}}else{var p=te(this.options,["projectId","version"]);if(p)return i(new Error(p),!1);u=ee(this.options.loadPath,{lng:t,ns:n,projectId:this.options.projectId,version:this.options.version})}if(!this.isProjectNotExisting&&this.storage.isProjectNotExisting(this.options.projectId)&&(this.isProjectNotExisting=!0),this.isProjectNotExisting){var f=new Error("locize project ".concat(this.options.projectId," does not exist!"));a&&a.error(f.message),i&&i(f);return}this.loadUrl(l,u,function(g,m,y){s.somethingLoaded||(y&&y.resourceNotExisting?setTimeout(function(){return s.checkIfProjectExists()},s.options.checkForProjectTimeout):s.somethingLoaded=!0),i(g,m)})}},{key:"loadUrl",value:function(t,n,i,s){var o=this;t=V(t,this.options),typeof i=="function"&&(s=i,i=void 0),s=s||function(){};var a=function(c,p){var f=p&&p.resourceNotExisting;if(p&&(p.status===408||p.status===400))return s("failed loading "+n,!0,{resourceNotExisting:f});if(p&&(p.status>=500&&p.status<600||!p.status))return s("failed loading "+n,!0,{resourceNotExisting:f});if(p&&p.status>=400&&p.status<500)return s("failed loading "+n,!1,{resourceNotExisting:f});if(!p&&c&&c.message&&c.message.indexOf("Failed to fetch")>-1)return s("failed loading "+n,!0,{resourceNotExisting:f});if(c)return s(c,!1);var g,m;try{typeof p.data=="string"?g=JSON.parse(p.data):g=p.data}catch{m="failed parsing "+n+" to json"}if(m)return s(m,!1);if(o.options.failLoadingOnEmptyJSON&&!Object.keys(g).length)return s("loaded result empty for "+n,!1,{resourceNotExisting:f});s(null,g,{resourceNotExisting:f})};if(!this.options.request||n.indexOf("/languages/".concat(t.projectId))>0)return Le(t,n,i,a);var u=Pe(n,t,i);Ne(this.options,u,a)}},{key:"create",value:function(t,n,i,s,o,a){var u=this;typeof o!="function"&&(o=function(){}),this.checkIfProjectExists(function(l){if(l)return o(l);var c=te(u.options,["projectId","version","apiKey","referenceLng"]);if(c)return o(new Error(c));if(!u.isAddOrUpdateAllowed)return o("host is not allowed to create key.");typeof t=="string"&&(t=[t]),t.filter(function(p){return p===u.options.referenceLng}).length<1&&u.services&&u.services.logger&&u.services.logger.warn('locize-backend: will not save missings because the reference language "'.concat(u.options.referenceLng,'" was not in the list of to save languages: ').concat(t.join(", ")," (open your site in the reference language to save missings).")),t.forEach(function(p){p===u.options.referenceLng&&u.queue.call(u,u.options.referenceLng,n,i,s,o,a)})})}},{key:"update",value:function(t,n,i,s,o,a){var u=this;typeof o!="function"&&(o=function(){}),this.checkIfProjectExists(function(l){if(l)return o(l);var c=te(u.options,["projectId","version","apiKey","referenceLng"]);if(c)return o(new Error(c));if(!u.isAddOrUpdateAllowed)return o("host is not allowed to update key.");a||(a={}),typeof t=="string"&&(t=[t]),a.isUpdate=!0,t.forEach(function(p){p===u.options.referenceLng&&u.queue.call(u,u.options.referenceLng,n,i,s,o,a)})})}},{key:"writePage",value:function(t,n,i,s){var o=ee(this.options.addPath,{lng:t,ns:n,projectId:this.options.projectId,version:this.options.version}),a=ee(this.options.updatePath,{lng:t,ns:n,projectId:this.options.projectId,version:this.options.version}),u=!1,l=!1,c={},p={};i.forEach(function(v){var x=v.options&&v.options.tDescription?{value:v.fallbackValue||"",context:{text:v.options.tDescription}}:v.fallbackValue||"";v.options&&v.options.isUpdate?(l||(l=!0),p[v.key]=x):(u||(u=!0),c[v.key]=x)});var f=0;u&&f++,l&&f++;var g=function(x){f--,f||s(x)};if(f||g(),u)if(!this.options.request)Le(V({authorize:!0},this.options),o,c,g);else{var m=Pe(o,V({authorize:!0},this.options),c);Ne(this.options,m,g)}if(l)if(!this.options.request)Le(V({authorize:!0},this.options),a,p,g);else{var y=Pe(a,V({authorize:!0},this.options),p);Ne(this.options,y,g)}}},{key:"write",value:function(t,n){var i=this,s=rt(this.queuedWrites,["locks",t,n]);if(!s){var o=rt(this.queuedWrites,[t,n]);Ee(this.queuedWrites,[t,n],[]);var a=1e3,u=o.filter(function(g){return g.callback}).map(function(g){return g.callback});if(o.length){Ee(this.queuedWrites,["locks",t,n],!0);var l=function(){Ee(i.queuedWrites,["locks",t,n],!1),u.forEach(function(m){return m()}),i.options.onSaved&&i.options.onSaved(t,n),i.debouncedProcess(t,n)},c=o.length/a,p=0,f=o.splice(0,a);for(this.writePage(t,n,f,function(){p++,p>=c&&l()});f.length===a;)f=o.splice(0,a),f.length&&this.writePage(t,n,f,function(){p++,p>=c&&l()})}}}},{key:"process",value:function(){var t=this;Object.keys(this.queuedWrites).forEach(function(n){n!=="locks"&&Object.keys(t.queuedWrites[n]).forEach(function(i){var s=t.queuedWrites[n][i];s.length&&t.write(n,i)})})}},{key:"queue",value:function(t,n,i,s,o,a){_n(this.queuedWrites,[t,n],{key:i,fallbackValue:s||"",callback:o,options:a}),this.debouncedProcess()}}])}();Yn.type="backend";var Zn={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 er=Te(Zn);var tr=/\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;function lt(r){var e={type:"tag",name:"",voidElement:!1,attrs:{},children:[]},t=r.match(/<\/?([^\s]+?)[/\s>]/);if(t&&(e.name=t[1],(er[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 i=new RegExp(tr),s=null;(s=i.exec(r))!==null;)if(s[0].trim())if(s[1]){var o=s[1].trim(),a=[o,""];o.indexOf("=")>-1&&(a=o.split("=")),e.attrs[a[0]]=a[1],i.lastIndex--}else s[2]&&(e.attrs[s[2]]=s[3].trim().substring(1,s[3].length-1));return e}var nr=/<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g,rr=/^\s*$/,ir=Object.create(null);function kt(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 i in t)n.push(i+'="'+t[i]+'"');return n.length?" "+n.join(" "):""}(e.attrs):"")+(e.voidElement?"/>":">"),e.voidElement?r:r+e.children.reduce(kt,"")+"";case"comment":return r+""}}var sr={parse:function(r,e){e||(e={}),e.components||(e.components=ir);var t,n=[],i=[],s=-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(nr,function(u,l){if(o){if(u!=="")return;o=!1}var c,p=u.charAt(1)!=="/",f=u.startsWith("