PageSourceSearch

https://cybershoke.net/assets/vendor-i18n-BWleq_Sd.js

js cybershoke.net collected 2026-10-04 05:21:26 UTC 67,454 bytes, 1 lines download raw bytes

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

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.