PageSourceSearch

https://www.ddtab.com/assets/I18n-GXDzbrzN.js

js ddtab.com collected 2026-09-24 14:42:03 UTC 49,535 bytes, 1 lines download raw bytes

1const $e=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Ce={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},Re=o=>Ce[o],Ne=o=>o.replace($e,Re);let Z={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:Ne};const ke=(o={})=>{Z={...Z,...o}},Ot=()=>Z;let xe;const Ee=o=>{xe=o},Lt=()=>xe,Fe={type:"3rdParty",init(o){ke(o.options.react),Ee(o)}},g=o=>typeof o=="string",V=()=>{let o,e;const t=new Promise((i,s)=>{o=i,e=s});return t.resolve=o,t.reject=e,t},re=o=>o==null?"":""+o,Ie=(o,e,t)=>{o.forEach(i=>{e[i]&&(t[i]=e[i])})},je=/###/g,ae=o=>o&&o.indexOf("###")>-1?o.replace(je,"."):o,oe=o=>!o||g(o),K=(o,e,t)=>{const i=g(e)?e.split("."):e;let s=0;for(;s<i.length-1;){if(oe(o))return{};const n=ae(i[s]);!o[n]&&t&&(o[n]=new t),Object.prototype.hasOwnProperty.call(o,n)?o=o[n]:o={},++s}return oe(o)?{}:{obj:o,k:ae(i[s])}},le=(o,e,t)=>{const{obj:i,k:s}=K(o,e,Object);if(i!==void 0||e.length===1){i[s]=t;return}let n=e[e.length-1],r=e.slice(0,e.length-1),a=K(o,r,Object);for(;a.obj===void 0&&r.length;)n=`${r[r.length-1]}.${n}`,r=r.slice(0,r.length-1),a=K(o,r,Object),a!=null&&a.obj&&typeof a.obj[`${a.k}.${n}`]<"u"&&(a.obj=void 0);a.obj[`${a.k}.${n}`]=t},Ae=(o,e,t,i)=>{const{obj:s,k:n}=K(o,e,Object);s[n]=s[n]||[],s[n].push(t)},J=(o,e)=>{const{obj:t,k:i}=K(o,e);if(t&&Object.prototype.hasOwnProperty.call(t,i))return t[i]},Te=(o,e,t)=>{const i=J(o,t);return i!==void 0?i:J(e,t)},be=(o,e,t)=>{for(const i in e)i!=="__proto__"&&i!=="constructor"&&(i in o?g(o[i])||o[i]instanceof String||g(e[i])||e[i]instanceof String?t&&(o[i]=e[i]):be(o[i],e[i],t):o[i]=e[i]);return o},j=o=>o.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var De={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const Ve=o=>g(o)?o.replace(/[&<>"'\/]/g,e=>De[e]):o;class Ke{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(t!==void 0)return t;const i=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,i),this.regExpQueue.push(e),i}}const He=[" ",",","?","!",";"],Me=new Ke(20),Ue=(o,e,t)=>{e=e||"",t=t||"";const i=He.filter(r=>e.indexOf(r)<0&&t.indexOf(r)<0);if(i.length===0)return!0;const s=Me.getRegExp(`(${i.map(r=>r==="?"?"\\?":r).join("|")})`);let n=!s.test(o);if(!n){const r=o.indexOf(t);r>0&&!s.test(o.substring(0,r))&&(n=!0)}return n},X=(o,e,t=".")=>{if(!o)return;if(o[e])return Object.prototype.hasOwnProperty.call(o,e)?o[e]:void 0;const i=e.split(t);let s=o;for(let n=0;n<i.length;){if(!s||typeof s!="object")return;let r,a="";for(let u=n;u<i.length;++u)if(u!==n&&(a+=t),a+=i[u],r=s[a],r!==void 0){if(["string","number","boolean"].indexOf(typeof r)>-1&&u<i.length-1)continue;n+=u-n+1;break}s=r}return s},M=o=>o==null?void 0:o.replace("_","-"),ze={type:"logger",log(o){this.output("log",o)},warn(o){this.output("warn",o)},error(o){this.output("error",o)},output(o,e){var t,i;(i=(t=console==null?void 0:console[o])==null?void 0:t.apply)==null||i.call(t,console,e)}};class W{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||"i18next:",this.logger=e||ze,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,"log","",!0)}warn(...e){return this.forward(e,"warn","",!0)}error(...e){return this.forward(e,"error","")}deprecate(...e){return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,i,s){return s&&!this.debug?null:(g(e[0])&&(e[0]=`${i}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new W(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new W(this.logger,e)}}var R=new W;class _{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(i=>
1{this.observers[i]||(this.observers[i]=new Map);const s=this.observers[i].get(t)||0;this.observers[i].set(t,s+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([s,n])=>{for(let r=0;r<n;r++)s(...t)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([s,n])=>{for(let r=0;r<n;r++)s.apply(s,[e,...t])})}}class ue extends _{constructor(e,t={ns:["translation"],defaultNS:"translation"}){super(),this.data=e||{},this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,i,s={}){var l,h;const n=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,r=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;e.indexOf(".")>-1?a=e.split("."):(a=[e,t],i&&(Array.isArray(i)?a.push(...i):g(i)&&n?a.push(...i.split(n)):a.push(i)));const u=J(this.data,a);return!u&&!t&&!i&&e.indexOf(".")>-1&&(e=a[0],t=a[1],i=a.slice(2).join(".")),u||!r||!g(i)?u:X((h=(l=this.data)==null?void 0:l[e])==null?void 0:h[t],i,n)}addResource(e,t,i,s,n={silent:!1}){const r=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let a=[e,t];i&&(a=a.concat(r?i.split(r):i)),e.indexOf(".")>-1&&(a=e.split("."),s=t,t=a[1]),this.addNamespaces(t),le(this.data,a,s),n.silent||this.emit("added",e,t,i,s)}addResources(e,t,i,s={silent:!1}){for(const n in i)(g(i[n])||Array.isArray(i[n]))&&this.addResource(e,t,n,i[n],{silent:!0});s.silent||this.emit("added",e,t,i)}addResourceBundle(e,t,i,s,n,r={silent:!1,skipCopy:!1}){let a=[e,t];e.indexOf(".")>-1&&(a=e.split("."),s=i,i=t,t=a[1]),this.addNamespaces(t);let u=J(this.data,a)||{};r.skipCopy||(i=JSON.parse(JSON.stringify(i))),s?be(u,i,n):u={...u,...i},le(this.data,a,u),r.silent||this.emit("added",e,t,i)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(s=>t[s]&&Object.keys(t[s]).length>0)}toJSON(){return this.data}}var Se={processors:{},addPostProcessor(o){this.processors[o.name]=o},handle(o,e,t,i,s){return o.forEach(n=>{var r;e=((r=this.processors[n])==null?void 0:r.process(e,t,i,s))??e}),e}};const Oe=Symbol("i18next/PATH_KEY");function Be(){const o=[],e=Object.create(null);let t;return e.get=(i,s)=>{var n;return(n=t==null?void 0:t.revoke)==null||n.call(t),s===Oe?o:(o.push(s),t=Proxy.revocable(i,e),t.proxy)},Proxy.revocable(Object.create(null),e).proxy}function ee(o,e){const{[Oe]:t}=o(Be());return t.join((e==null?void 0:e.keySeparator)??".")}const ce={},Q=o=>!g(o)&&typeof o!="boolean"&&typeof o!="number";class Y extends _{constructor(e,t={}){super(),Ie(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","
1i18nFormat","utils"],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=R.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){const i={...t};if(e==null)return!1;const s=this.resolve(e,i);if((s==null?void 0:s.res)===void 0)return!1;const n=Q(s.res);return!(i.returnObjects===!1&&n)}extractFromKey(e,t){let i=t.nsSeparator!==void 0?t.nsSeparator:this.options.nsSeparator;i===void 0&&(i=":");const s=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator;let n=t.ns||this.options.defaultNS||[];const r=i&&e.indexOf(i)>-1,a=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!Ue(e,i,s);if(r&&!a){const u=e.match(this.interpolator.nestingRegexp);if(u&&u.length>0)return{key:e,namespaces:g(n)?[n]:n};const l=e.split(i);(i!==s||i===s&&this.options.ns.indexOf(l[0])>-1)&&(n=l.shift()),e=l.join(s)}return{key:e,namespaces:g(n)?[n]:n}}translate(e,t,i){let s=typeof t=="object"?{...t}:t;if(typeof s!="object"&&this.options.overloadTranslationOptionHandler&&(s=this.options.overloadTranslationOptionHandler(arguments)),typeof s=="object"&&(s={...s}),s||(s={}),e==null)return"";typeof e=="function"&&(e=ee(e,{...this.options,...s})),Array.isArray(e)||(e=[String(e)]);const n=s.returnDetails!==void 0?s.returnDetails:this.options.returnDetails,r=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,{key:a,namespaces:u}=this.extractFromKey(e[e.length-1],s),l=u[u.length-1];let h=s.nsSeparator!==void 0?s.nsSeparator:this.options.nsSeparator;h===void 0&&(h=":");const c=s.lng||this.language,p=s.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((c==null?void 0:c.toLowerCase())==="cimode")return p?n?{res:`${l}${h}${a}`,usedKey:a,exactUsedKey:a,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(s)}:`${l}${h}${a}`:n?{res:a,usedKey:a,exactUsedKey:a,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(s)}:a;const d=this.resolve(e,s);let f=d==null?void 0:d.res;const m=(d==null?void 0:d.usedKey)||a,y=(d==null?void 0:d.exactUsedKey)||a,v=["[object Number]","[object Function]","[object RegExp]"],w=s.joinArrays!==void 0?s.joinArrays:this.options.joinArrays,F=!this.i18nFormat||this.i18nFormat.handleAsObject,S=s.count!==void 0&&!g(s.count),N=Y.hasDefaultValue(s),U=S?this.pluralResolver.getSuffix(c,s.count,s):"",k=s.ordinal&&S?this.pluralResolver.getSuffix(c,s.count,{ordinal:!1}):"",A=S&&!s.ordinal&&s.count===0,O=A&&s[`defaultValue${this.options.pluralSeparator}zero`]||s[`defaultValue${U}`]||s[`defaultValue${k}`]||s.defaultValue;let x=f;F&&!f&&N&&(x=O);const ve=Q(x),Pe=Object.prototype.toString.apply(x);if(F&&x&&ve&&v.indexOf(Pe)<0&&!(g(w)&&Array.isArray(x))){if(!s.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const $=this.options.returnedObjectHandler?this.options.returnedObjectHandler(m,x,{...s,ns:u}):`key '${a} (${this.language})' returned an object instead of string.`;return n?(d.res=$,d.usedParams=this.getUsedParamsDetails(s),d):$}if(r){const $=Array.isArray(x),P=$?[]:{},te=$?y:m;for(const C in x)if(Object.prototype.hasOwnProperty.call(x,C)){const E=`${te}${r}${C}`;N&&!f?P[C]=this.translate(E,{...s,defaultValue:Q(O)?O[C]:void 0,joinArrays:!1,ns:u}):P[C]=this.translate(E,{...s,joinArrays:!1,ns:u}),P[C]===E&&(P[C]=x[C])}f=P}}else if(F&&g(w)&&Array.isArray(f))f=f.join(w),f&&(f=this.extendTranslation(f,e,s,i));else{let $=!1,P=!1;!this.isValidLookup(f)&&N&&($=!0,f=O),this.isValidLookup(f)||(P=!0,f=a);const C=(s.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&P?void 0:f,E=N&&O!==f&&this.options.updateMissing;if(P||$||E){if(this.logger.log(E?"updateKey":"missingKey",c,l,a,E?O:f),r){const L=this.resolve(a,{...s,keySeparator:!1});L&&L.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 T=[];const z=this.languageUtils.getFallbackCodes(this.options.fallbackLng,s.lng||this.language);if(this.options.saveMissingTo==="fallback"&&z&&z[0])for(let L=0;L<z.length;L++)T.push(z[L]);else this.options.saveMissingTo==="all"?T=this.languageUtils.toResolveHierarchy(s.lng||this.language):T.push(s.lng||this.language);const se=(L,I,D)=>{var ne;const ie=N&&D!==f?D:C;this.options.missingKeyHandler?this.options.missingKeyHandler(L,l,I,ie,E,s):(ne=this.backendConnector)!=null&&ne.saveMissing&&this.backendConnector.saveMissing(L,l,I,ie,E,s),this.emit
1("missingKey",L,l,I,f)};this.options.saveMissing&&(this.options.saveMissingPlurals&&S?T.forEach(L=>{const I=this.pluralResolver.getSuffixes(L,s);A&&s[`defaultValue${this.options.pluralSeparator}zero`]&&I.indexOf(`${this.options.pluralSeparator}zero`)<0&&I.push(`${this.options.pluralSeparator}zero`),I.forEach(D=>{se([L],a+D,s[`defaultValue${D}`]||O)})}):se(T,a,O))}f=this.extendTranslation(f,e,s,d,i),P&&f===a&&this.options.appendNamespaceToMissingKey&&(f=`${l}${h}${a}`),(P||$)&&this.options.parseMissingKeyHandler&&(f=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${h}${a}`:a,$?f:void 0,s))}return n?(d.res=f,d.usedParams=this.getUsedParamsDetails(s),d):f}extendTranslation(e,t,i,s,n){var u,l;if((u=this.i18nFormat)!=null&&u.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...i},i.lng||this.language||s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!i.skipInterpolation){i.interpolation&&this.interpolator.init({...i,interpolation:{...this.options.interpolation,...i.interpolation}});const h=g(e)&&(((l=i==null?void 0:i.interpolation)==null?void 0:l.skipOnVariables)!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let c;if(h){const d=e.match(this.interpolator.nestingRegexp);c=d&&d.length}let p=i.replace&&!g(i.replace)?i.replace:i;if(this.options.interpolation.defaultVariables&&(p={...this.options.interpolation.defaultVariables,...p}),e=this.interpolator.interpolate(e,p,i.lng||this.language||s.usedLng,i),h){const d=e.match(this.interpolator.nestingRegexp),f=d&&d.length;c<f&&(i.nest=!1)}!i.lng&&s&&s.res&&(i.lng=this.language||s.usedLng),i.nest!==!1&&(e=this.interpolator.nest(e,(...d)=>(n==null?void 0:n[0])===d[0]&&!i.context?(this.logger.warn(`It seems you are nesting recursively key: ${d[0]} in key: ${t[0]}`),null):this.translate(...d,t),i)),i.interpolation&&this.interpolator.reset()}const r=i.postProcess||this.options.postProcess,a=g(r)?[r]:r;return e!=null&&(a!=null&&a.length)&&i.applyPostProcessor!==!1&&(e=Se.handle(a,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...s,usedParams:this.getUsedParamsDetails(i)},...i}:i,this)),e}resolve(e,t={}){let i,s,n,r,a;return g(e)&&(e=[e]),e.forEach(u=>{if(this.isValidLookup(i))return;const l=this.extractFromKey(u,t),h=l.key;s=h;let c=l.namespaces;this.options.fallbackNS&&(c=c.concat(this.options.fallbackNS));const p=t.count!==void 0&&!g(t.count),d=p&&!t.ordinal&&t.count===0,f=t.context!==void 0&&(g(t.context)||typeof t.context=="number")&&t.context!=="",m=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);
1c.forEach(y=>{var v,w;this.isValidLookup(i)||(a=y,!ce[`${m[0]}-${y}`]&&((v=this.utils)!=null&&v.hasLoadedNamespace)&&!((w=this.utils)!=null&&w.hasLoadedNamespace(a))&&(ce[`${m[0]}-${y}`]=!0,this.logger.warn(`key "${s}" for languages "${m.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!!!")),m.forEach(F=>{var U;if(this.isValidLookup(i))return;r=F;const S=[h];if((U=this.i18nFormat)!=null&&U.addLookupKeys)this.i18nFormat.addLookupKeys(S,h,F,y,t);else{let k;p&&(k=this.pluralResolver.getSuffix(F,t.count,t));const A=`${this.options.pluralSeparator}zero`,O=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(p&&(t.ordinal&&k.indexOf(O)===0&&S.push(h+k.replace(O,this.options.pluralSeparator)),S.push(h+k),d&&S.push(h+A)),f){const x=`${h}${this.options.contextSeparator||"_"}${t.context}`;S.push(x),p&&(t.ordinal&&k.indexOf(O)===0&&S.push(x+k.replace(O,this.options.pluralSeparator)),S.push(x+k),d&&S.push(x+A))}}let N;for(;N=S.pop();)this.isValidLookup(i)||(n=N,i=this.getResource(F,y,N,t))}))})}),{res:i,usedKey:s,exactUsedKey:n,usedLng:r,usedNS:a}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,t,i,s={}){var n;return(n=this.i18nFormat)!=null&&n.getResource?this.i18nFormat.getResource(e,t,i,s):this.resourceStore.getResource(e,t,i,s)}getUsedParamsDetails(e={}){const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],i=e.replace&&!g(e.replace);let s=i?e.replace:e;if(i&&typeof e.count<"u"&&(s.count=e.count),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!i){s={...s};for(const n of t)delete s[n]}return s}static hasDefaultValue(e){const t="defaultValue";for(const i in e)if(Object.prototype.hasOwnProperty.call(e,i)&&t===i.substring(0,t.length)&&e[i]!==void 0)return!0;return!1}}class he{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=R.create("languageUtils")}getScriptPartFromCode(e){if(e=M(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=M(e),!e||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(g(e)&&e.indexOf("-")>-1){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch{}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(i=>{if(t)return;const s=this.formatLanguageCode(i);(!this.options.supportedLngs||this.isSupportedCode(s))&&(t=s)}),!t&&this.options.supportedLngs&&e.forEach(i=>{if(t)return;const s=this.getScriptPartFromCode(i);if(this.isSupportedCode(s))return t=s;const n=this.getLanguagePartFromCode(i);if(this.isSupportedCode(n))return t=n;t=this.options.supportedLngs.find(r=>{if(r===n)return r;if(!(r.indexOf("-")<0&&n.indexOf("-")<0)&&(r.indexOf("-")>0&&n.indexOf("-")<0&&r.substring(0,r.indexOf("-"))===n||r.indexOf(n)===0&&n.length>1))return r})}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if(typeof e=="function"&&(e=e(t)),g(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let i=e[t];return i||(i=e[this.getScriptPartFromCode(t)]),i||(i=e[this.formatLanguageCode(t)]),i||(i=e[this.getLanguagePartFromCode(t)]),i||(i=e.default),i||[]}toResolveHierarchy(e,t){const i=this.getFallbackCodes((t===!1?[]:t)||this.options.fallbackLng||[],e),s=[],n=r=>{r&&(this.isSupportedCode(r)?s.push(r):this.logger.warn(`rejecting language code not found in supportedLngs: ${r}`))};return g(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&n(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&n(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&n(this.getLanguagePartFromCode(e))):g(e)&&n(this.formatLanguageCode(e)),i.forEac
1h(r=>{s.indexOf(r)<0&&n(this.formatLanguageCode(r))}),s}}const fe={zero:0,one:1,two:2,few:3,many:4,other:5},de={select:o=>o===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class Je{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=R.create("pluralResolver"),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){const i=M(e==="dev"?"en":e),s=t.ordinal?"ordinal":"cardinal",n=JSON.stringify({cleanedCode:i,type:s});if(n in this.pluralRulesCache)return this.pluralRulesCache[n];let r;try{r=new Intl.PluralRules(i,{type:s})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),de;if(!e.match(/-|_/))return de;const u=this.languageUtils.getLanguagePartFromCode(e);r=this.getRule(u,t)}return this.pluralRulesCache[n]=r,r}needsPlural(e,t={}){let i=this.getRule(e,t);return i||(i=this.getRule("dev",t)),(i==null?void 0:i.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(e,t,i={}){return this.getSuffixes(e,i).map(s=>`${t}${s}`)}getSuffixes(e,t={}){let i=this.getRule(e,t);return i||(i=this.getRule("dev",t)),i?i.resolvedOptions().pluralCategories.sort((s,n)=>fe[s]-fe[n]).map(s=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${s}`):[]}getSuffix(e,t,i={}){const s=this.getRule(e,i);return s?`${this.options.prepend}${i.ordinal?`ordinal${this.options.prepend}`:""}${s.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,i))}}const ge=(o,e,t,i=".",s=!0)=>{let n=Te(o,e,t);return!n&&s&&g(t)&&(n=X(o,t,i),n===void 0&&(n=X(e,t,i))),n},G=o=>o.replace(/\$/g,"$$$$");class We{constructor(e={}){var t;this.logger=R.create("interpolator"),this.options=e,this.format=((t=e==null?void 0:e.interpolation)==null?void 0:t.format)||(i=>i),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:i,useRawValueToEscape:s,prefix:n,prefixEscaped:r,suffix:a,suffixEscaped:u,formatSeparator:l,unescapeSuffix:h,unescapePrefix:c,nestingPrefix:p,nestingPrefixEscaped:d,nestingSuffix:f,nestingSuffixEscaped:m,nestingOptionsSeparator:y,maxReplaces:v,alwaysFormat:w}=e.interpolation;this.escape=t!==void 0?t:Ve,this.escapeValue=i!==void 0?i:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=n?j(n):r||"{{",this.suffix=a?j(a):u||"}}",this.formatSeparator=l||",",this.unescapePrefix=h?"":c||"-",this.unescapeSuffix=this.unescapePrefix?"":h||"",this.nestingPrefix=p?j(p):d||j("$t("),this.nestingSuffix=f?j(f):m||j(")"),this.nestingOptionsSeparator=y||",",this.maxReplaces=v||1e3,this.alwaysFormat=w!==void 0?w:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(t,i)=>(t==null?void 0:t.source)===i?(t.lastIndex=0,t):new RegExp(i,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,i,s){var d;let n,r,a;const u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},l=f=>{if(f.indexOf(this.formatSeparator)<0){const w=ge(t,u,f,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(w,void 0,i,{...s,...t,interpolationkey:f}):w}const m=f.split(this.formatSeparator),y=m.shift().trim(),v=m.join(this.formatSeparator).trim();return this.format(ge(t,u,y,this.options.keySeparator,this.options.ignoreJSONStructure),v,i,{...s,...t,interpolationkey:y})};this.resetRegExp();const h=(s==null?void 0:s.missingInterpolationHandler)||this.options.missingInterpolationHandler,c=((d=s==null?void 0:s.interpolation)==null?void 0:d.skipOnVariables)!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:f=>G(f)},{regex:this.regexp,safeValue:f=>this.escapeValue?G(this.escape(f)):G(f)}
1].forEach(f=>{for(a=0;n=f.regex.exec(e);){const m=n[1].trim();if(r=l(m),r===void 0)if(typeof h=="function"){const v=h(e,n,s);r=g(v)?v:""}else if(s&&Object.prototype.hasOwnProperty.call(s,m))r="";else if(c){r=n[0];continue}else this.logger.warn(`missed to pass in variable ${m} for interpolating ${e}`),r="";else!g(r)&&!this.useRawValueToEscape&&(r=re(r));const y=f.safeValue(r);if(e=e.replace(n[0],y),c?(f.regex.lastIndex+=r.length,f.regex.lastIndex-=n[0].length):f.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),e}nest(e,t,i={}){let s,n,r;const a=(u,l)=>{const h=this.nestingOptionsSeparator;if(u.indexOf(h)<0)return u;const c=u.split(new RegExp(`${h}[ ]*{`));let p=`{${c[1]}`;u=c[0],p=this.interpolate(p,r);const d=p.match(/'/g),f=p.match(/"/g);(((d==null?void 0:d.length)??0)%2===0&&!f||f.length%2!==0)&&(p=p.replace(/'/g,'"'));try{r=JSON.parse(p),l&&(r={...l,...r})}catch(m){return this.logger.warn(`failed parsing options string in nesting for key ${u}`,m),`${u}${h}${p}`}return r.defaultValue&&r.defaultValue.indexOf(this.prefix)>-1&&delete r.defaultValue,u};for(;s=this.nestingRegexp.exec(e);){let u=[];r={...i},r=r.replace&&!g(r.replace)?r.replace:r,r.applyPostProcessor=!1,delete r.defaultValue;const l=/{.*}/.test(s[1])?s[1].lastIndexOf("}")+1:s[1].indexOf(this.formatSeparator);if(l!==-1&&(u=s[1].slice(l).split(this.formatSeparator).map(h=>h.trim()).filter(Boolean),s[1]=s[1].slice(0,l)),n=t(a.call(this,s[1].trim(),r),r),n&&s[0]===e&&!g(n))return n;g(n)||(n=re(n)),n||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${e}`),n=""),u.length&&(n=u.reduce((h,c)=>this.format(h,c,i.lng,{...i,interpolationkey:s[1].trim()}),n.trim())),e=e.replace(s[0],n),this.regexp.lastIndex=0}return e}}const Ye=o=>{let e=o.toLowerCase().trim();const t={};if(o.indexOf("(")>-1){const i=o.split("(");e=i[0].toLowerCase().trim();const s=i[1].substring(0,i[1].length-1);e==="currency"&&s.indexOf(":")<0?t.currency||(t.currency=s.trim()):e==="relativetime"&&s.indexOf(":")<0?t.range||(t.range=s.trim()):s.split(";").forEach(r=>{if(r){const[a,...u]=r.split(":"),l=u.join(":").trim().replace(/^'+|'+$/g,""),h=a.trim();t[h]||(t[h]=l),l==="false"&&(t[h]=!1),l==="true"&&(t[h]=!0),isNaN(l)||(t[h]=parseInt(l,10))}})}return{formatName:e,formatOptions:t}},pe=o=>{const e={};return(t,i,s)=>{let n=s;s&&s.interpolationkey&&s.formatParams&&s.formatParams[s.interpolationkey]&&s[s.interpolationkey]&&(n={...n,[s.interpolationkey]:void 0});const r=i+JSON.stringify(n);let a=e[r];return a||(a=o(M(i),s),e[r]=a),a(t)}},_e=o=>(e,t,i)=>o(M(t),i)(e);class Qe{constructor(e={}){this.logger=R.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";const i=t.cacheInBuiltFormats?pe:_e;this.formats={number:i((s,n)=>{const r=new Intl.NumberFormat(s,{...n});return a=>r.format(a)}),currency:i((s,n)=>{const r=new Intl.NumberFormat(s,{...n,style:"currency"});return a=>r.format(a)}),datetime:i((s,n)=>{const r=new Intl.DateTimeFormat(s,{...n});return a=>r.format(a)}),relativetime:i((s,n)=>{const r=new Intl.RelativeTimeFormat(s,{...n});return a=>r.format(a,n.range||"day")}),list:i((s,n)=>{const r=new Intl.ListFormat(s,{...n});return a=>r.format(a)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=pe(t)}format(e,t,i,s={}){const n=t.split(this.formatSeparator);if(n.length>1&&n[0].indexOf("(")>1&&n[0].indexOf(")")<0&&n.find(a=>a.indexOf(")")>-1)){const a=n.findIndex(u=>u.indexOf(")")>-1);n[0]=[n[0],...n.splice(1,a)].join(this.formatSeparator)}return n.reduce((a,u)=>{var c;const{formatName:l,formatOptions:h}=Ye(u);if(this.formats[l]){let p=a;try{const d=((c=s==null?void 0:s.formatParams)==null?void 0:c[s.interpolationkey])||{},f=d.locale||d.lng||s.locale||s.lng||i;p=this.formats[l](a,f,{...h,...s,...d})}catch(d){this.logger.warn(d)}return p}else this.logger.warn(`there was no format function for ${l}`);return a},e)}}const Ge=(o,e)=>{o.pending[e]!==void 0&&(delete o.pending[e],o.pendingCount--)};class qe extends _{constructor(e,t,i,s={}){var n,r;super(),this.backend=e,this.store=t,this.services=i,this.languageUtils=i.languageUtils,this.options=s,this.logger=R.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=s.maxParallelReads||10,this.readingCalls=0,this.maxRetries=s.maxRetries>=0?s.maxRetries:5,this.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,this.state={},this.queue=[],(r=(n=this.backend)==null?void 0:n.init)==null||r.call(n,i,s.backend,s)}queueLoad(e,t,i,s){const n={},r={},a={},u={};return e.forEach(l=>{let h=!0;t.forEach(c=>{const p=`${l}|${c}`;!i.reload&&this.store.hasResourceBundle(l,c)?this.state[p]=2:this.state[p]<0||(this.state[p]===1?r[p]===void 0&&(r[p]=!0):(this.state[p]=1,h=!1,r[p]===void 0&&(r[p]=!0),n[p]===void 0&&(n[p]=!0),u[c]===void 0&&(u[c]=!0)))}),h||(a[l]=!0)}),(Object.keys(n).length||Object.keys(r).length)&&this.queue.push({pending:r,pen
1dingCount:Object.keys(r).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(n),pending:Object.keys(r),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(u)}}loaded(e,t,i){const s=e.split("|"),n=s[0],r=s[1];t&&this.emit("failedLoading",n,r,t),!t&&i&&this.store.addResourceBundle(n,r,i,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&i&&(this.state[e]=0);const a={};this.queue.forEach(u=>{Ae(u.loaded,[n],r),Ge(u,e),t&&u.errors.push(t),u.pendingCount===0&&!u.done&&(Object.keys(u.loaded).forEach(l=>{a[l]||(a[l]={});const h=u.loaded[l];h.length&&h.forEach(c=>{a[l][c]===void 0&&(a[l][c]=!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,i,s=0,n=this.retryTimeout,r){if(!e.length)return r(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:i,tried:s,wait:n,callback:r});return}this.readingCalls++;const a=(l,h)=>{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(l&&h&&s<this.maxRetries){setTimeout(()=>{this.read.call(this,e,t,i,s+1,n*2,r)},n);return}r(l,h)},u=this.backend[i].bind(this.backend);if(u.length===2){try{const l=u(e,t);l&&typeof l.then=="function"?l.then(h=>a(null,h)).catch(a):a(null,l)}catch(l){a(l)}return}return u(e,t,a)}prepareLoading(e,t,i={},s){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),s&&s();g(e)&&(e=this.languageUtils.toResolveHierarchy(e)),g(t)&&(t=[t]);const n=this.queueLoad(e,t,i,s);if(!n.toLoad.length)return n.pending.length||s(),null;n.toLoad.forEach(r=>{this.loadOne(r)})}load(e,t,i){this.prepareLoading(e,t,{},i)}reload(e,t,i){this.prepareLoading(e,t,{reload:!0},i)}loadOne(e,t=""){const i=e.split("|"),s=i[0],n=i[1];this.read(s,n,"read",void 0,void 0,(r,a)=>{r&&this.logger.warn(`${t}loading namespace ${n} for language ${s} failed`,r),!r&&a&&this.logger.log(`${t}loaded namespace ${n} for language ${s}`,a),this.loaded(e,r,a)})}saveMissing(e,t,i,s,n,r={},a=()=>{}){var u,l,h,c,p;if((l=(u=this.services)==null?void 0:u.utils)!=null&&l.hasLoadedNamespace&&!((c=(h=this.services)==null?void 0:h.utils)!=null&&c.hasLoadedNamespace(t))){this.logger.warn(`did not save key "${i}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(i==null||i==="")){if((p=this.backend)!=null&&p.create){const d={...r,isUpdate:n},f=this.backend.create.bind(this.backend);if(f.length<6)try{let m;f.length===5?m=f(e,t,i,s,d):m=f(e,t,i,s),m&&typeof m.then=="function"?m.then(y=>a(null,y)).catch(a):a(null,m)}catch(m){a(m)}else f(e,t,i,s,a,d)}!e||!e[0]||this.store.addResource(e[0],t,i,s)}}}const me=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:o=>{let e={};if(typeof o[1]=="object"&&(e=o[1]),g(o[1])&&(e.defaultValue=o[1]),g(o[2])&&(e.tDescription=o[2]),typeof o[2]=="object"||typeof o[3]=="object"){const t=o[3]||o[2];Object.keys(t).forEach(i=>{e[i]=t[i]})}return e},interpolation:{escapeValue:!0,format:o=>o,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),ye=o=>{var e,t;return g(o.ns)&&(o.ns=[o.ns]),g(o.fallbackLng)&&(o.fallbackLng=[o.fallbackLng]),g(o.fallbackNS)&&(o.fallbackNS=[o.fallbackNS]),((t=(e=o.supportedLngs)==null?void 0:e.indexOf)==null?void 0:t.call(e,"cimode"))<0&&(o.supportedLngs=o.supportedLngs.concat(["cimode"])),typeof o.initImmediate=="boolean"&&(o.initAsync=o.initImmediate),o},B=()=>{},Ze=o=>
1{Object.getOwnPropertyNames(Object.getPrototypeOf(o)).forEach(t=>{typeof o[t]=="function"&&(o[t]=o[t].bind(o))})};class H extends _{constructor(e={},t){if(super(),this.options=ye(e),this.services={},this.logger=R,this.modules={external:[]},Ze(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&&(g(e.ns)?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));const i=me();this.options={...i,...this.options,...ye(e)},this.options.interpolation={...i.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator);const s=l=>l?typeof l=="function"?new l:l:null;if(!this.options.isClone){this.modules.logger?R.init(s(this.modules.logger),this.options):R.init(null,this.options);let l;this.modules.formatter?l=this.modules.formatter:l=Qe;const h=new he(this.options);this.store=new ue(this.options.resources,this.options);const c=this.services;c.logger=R,c.resourceStore=this.store,c.languageUtils=h,c.pluralResolver=new Je(h,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==i.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),l&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(c.formatter=s(l),c.formatter.init&&c.formatter.init(c,this.options),this.options.interpolation.format=c.formatter.format.bind(c.formatter)),c.interpolator=new We(this.options),c.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},c.backendConnector=new qe(s(this.modules.backend),c.resourceStore,c,this.options),c.backendConnector.on("*",(d,...f)=>{this.emit(d,...f)}),this.modules.languageDetector&&(c.languageDetector=s(this.modules.languageDetector),c.languageDetector.init&&c.languageDetector.init(c,this.options.detection,this.options)),this.modules.i18nFormat&&(c.i18nFormat=s(this.modules.i18nFormat),c.i18nFormat.init&&c.i18nFormat.init(this)),this.translator=new Y(this.services,this.options),this.translator.on("*",(d,...f)=>{this.emit(d,...f)}),this.modules.external.forEach(d=>{d.init&&d.init(this)})}if(this.format=this.options.interpolation.format,t||(t=B),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const l=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);l.length>0&&l[0]!=="dev"&&(this.options.lng=l[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(l=>{this[l]=(...h)=>this.store[l](...h)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(l=>{this[l]=(...h)=>(this.store[l](...h),this)});const a=V(),u=()=>{const l=(h,c)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),a.resolve(c),t(h,c)};if(this.languages&&!this.isInitialized)return l(null,this.t.bind(this));this.changeLanguage(this.options.lng,l)};return this.options.resources||!this.options.initAsync?u():setTimeout(u,0),a}loadResources(e,t=B){var n,r;let i=t;const s=g(e)?e:this.language;if(typeof e=="function"&&(i=e),!this.options.resources||this.options.partialBundledLanguages){if((s==null?void 0:s.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return i();const a=[],u=l=>{if(!l||l==="cimode")return;this.services.languageUtils.toResolveHierarchy(l).forEach(c=>{c!=="cimode"&&a.indexOf(c)<0&&a.push(c)})};s?u(s):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(h=>u(h)),(r=(n=this.options.preload)==null?void 0:n.forEach)==null||r.call(n,l=>u(l)),this.services.backendConnector.load(a,this.options.ns,l=>{!l&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),i(l)})}else i(null)}reloadResources(e,t,i){const s=V();return typeof e=="function"&&(i=e,e=void 0),typeof t=="function"&&(i=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),i||(i=B),this.services.backendConnector.reload(e,t,n=>{s.resolve(),i(n)}),s}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&Se.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1)){for(let t=0;t<this.languages.length;t++){const i=this.languages[t];if(!(["cimode","dev"].indexOf(i)>-1)&&this.store.hasLanguageSomeTranslations(i)){this.resolvedLanguage=i;break}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;const i=V();
1this.emit("languageChanging",e);const s=a=>{this.language=a,this.languages=this.services.languageUtils.toResolveHierarchy(a),this.resolvedLanguage=void 0,this.setResolvedLanguage(a)},n=(a,u)=>{u?this.isLanguageChangingTo===e&&(s(u),this.translator.changeLanguage(u),this.isLanguageChangingTo=void 0,this.emit("languageChanged",u),this.logger.log("languageChanged",u)):this.isLanguageChangingTo=void 0,i.resolve((...l)=>this.t(...l)),t&&t(a,(...l)=>this.t(...l))},r=a=>{var h,c;!e&&!a&&this.services.languageDetector&&(a=[]);const u=g(a)?a:a&&a[0],l=this.store.hasLanguageSomeTranslations(u)?u:this.services.languageUtils.getBestMatchFromCodes(g(a)?[a]:a);l&&(this.language||s(l),this.translator.language||this.translator.changeLanguage(l),(c=(h=this.services.languageDetector)==null?void 0:h.cacheUserLanguage)==null||c.call(h,l)),this.loadResources(l,p=>{n(p,l)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?r(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(r):this.services.languageDetector.detect(r):r(e),i}getFixedT(e,t,i){const s=(n,r,...a)=>{let u;typeof r!="object"?u=this.options.overloadTranslationOptionHandler([n,r].concat(a)):u={...r},u.lng=u.lng||s.lng,u.lngs=u.lngs||s.lngs,u.ns=u.ns||s.ns,u.keyPrefix!==""&&(u.keyPrefix=u.keyPrefix||i||s.keyPrefix);const l=this.options.keySeparator||".";let h;return u.keyPrefix&&Array.isArray(n)?h=n.map(c=>(typeof c=="function"&&(c=ee(c,{...this.options,...r})),`${u.keyPrefix}${l}${c}`)):(typeof n=="function"&&(n=ee(n,{...this.options,...r})),h=u.keyPrefix?`${u.keyPrefix}${l}${n}`:n),this.t(h,u)};return g(e)?s.lng=e:s.lngs=e,s.ns=t,s.keyPrefix=i,s}t(...e){var t;return(t=this.translator)==null?void 0:t.translate(...e)}exists(...e){var t;return(t=this.translator)==null?void 0:t.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;
1if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const i=t.lng||this.resolvedLanguage||this.languages[0],s=this.options?this.options.fallbackLng:!1,n=this.languages[this.languages.length-1];if(i.toLowerCase()==="cimode")return!0;const r=(a,u)=>{const l=this.services.backendConnector.state[`${a}|${u}`];return l===-1||l===0||l===2};if(t.precheck){const a=t.precheck(this,r);if(a!==void 0)return a}return!!(this.hasResourceBundle(i,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||r(i,e)&&(!s||r(n,e)))}loadNamespaces(e,t){const i=V();return this.options.ns?(g(e)&&(e=[e]),e.forEach(s=>{this.options.ns.indexOf(s)<0&&this.options.ns.push(s)}),this.loadResources(s=>{i.resolve(),t&&t(s)}),i):(t&&t(),Promise.resolve())}loadLanguages(e,t){const i=V();g(e)&&(e=[e]);const s=this.options.preload||[],n=e.filter(r=>s.indexOf(r)<0&&this.services.languageUtils.isSupportedCode(r));return n.length?(this.options.preload=s.concat(n),this.loadResources(r=>{i.resolve(),t&&t(r)}),i):(t&&t(),Promise.resolve())}dir(e){var s,n;if(e||(e=this.resolvedLanguage||(((s=this.languages)==null?void 0:s.length)>0?this.languages[0]:this.language)),!e)return"rtl";try{const r=new Intl.Locale(e);if(r&&r.getTextInfo){const a=r.getTextInfo();if(a&&a.direction)return a.direction}}catch{}const t=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],i=((n=this.services)==null?void 0:n.languageUtils)||new he(me());return e.toLowerCase().indexOf("-latn")>1?"ltr":t.indexOf(i.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},t){const i=new H(e,t);return i.createInstance=H.createInstance,i}cloneInstance(e={},t=B){const i=e.forkResourceStore;i&&delete e.forkResourceStore;const s={...this.options,...e,isClone:!0},n=new H(s);if((e.debug!==void 0||e.prefix!==void 0)&&(n.logger=n.logger.clone(e)),["store","services","language"].forEach(a=>{n[a]=this[a]}),n.services={...this.services},n.services.utils={hasLoadedNamespace:n.hasLoadedNamespace.bind(n)},i){const a=Object.keys(this.store.data).reduce((u,l)=>(u[l]={...this.store.data[l]},u[l]=Object.keys(u[l]).reduce((h,c)=>(h[c]={...u[l][c]},h),u[l]),u),{});n.store=new ue(a,s),n.services.resourceStore=n.store}return n.translator=new Y(n.services,s),n.translator.on("*",(a,...u)=>{n.emit(a,...u)}),n.init(s,t),n.translator.options=s,n.translator.backendConnector.services.utils={hasLoadedNamespace:n.hasLoadedNamespace.bind(n)},n}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const b=H.createInstance();b.createInstance;b.dir;b.init;b.loadResources;b.reloadResources;b.use;b.changeLanguage;b.getFixedT;b.t;b.exists;b.setDefaultNamespace;b.hasLoadedNamespace;b.loadNamespaces;b.loadLanguages;const Xe={home:"Home",sites:"Sites",title:"{{siteName}} sites in your browser sidebar, offering tons of wallpapers and customizable websites",description:"{{siteName}}, your AI assistant, resides in the browser sidebar with massive wallpapers and easily customizable favorite sites!"},et={zh:"中文简体",en:"English"},tt={light:"Light",dark:"Dark"},st={titleHighlight:"AI New Tab",title:"Next Browsing Start Point",subtitle:"Always in your browser sidebar, customize wallpapers and frequently used sites!",cta:"To Chrome Store to Install",sectionTitle:"Try DDTab Now",sectionSubtitle:"Make your new tab truly unique. Click to install and start your AI assistant journey."},it={title:"Custom Navigation",highlight:"Cloud Sync Across Devices",subtitle:"Your links, everywhere. Boost productivity with cross-platform sync."},nt={title:"Massive Beautiful Wallpapers",highlight:"Rich Practical Widgets",subtitle:"Millions of HD wallpapers × Smart desktop aesthetic widgets, create your personalized space with one click"},rt={title:"Explore the global internet",titleHighlight:"Discover Treasure Websites",subtitle:"Break free from the information bubble: AI intelligently recommends the top 1% most efficient websites worldwide"},at={title:"Sign In",syncDesc:"After login, your settings will be synced automatically",haveAccount:"Already have an account?",noAccount:"Don't have an account?",register:"Register",forgetPassword:"Forgot Password?",email:"Email",password:"Password",emailLogin:"Email Login",forgot:"Forgot Password?"},ot={title:"{{type}}WebBank{{siteName}} sits in your browser sidebar",description:"Explore the global internet and discover amazing {{type}} websites",all:"All",ai:"AI",news:"News",music:"Music",tech:"Tech",photos:"Photos",life:"Life",education:"Education",entertainment:"Entertainment",shopping:"Shopping",social:"Social",finance:"Finance",read:"Reading",sports:"Sports",others:"Others",visit:"Visit"},lt={subscribeNow:"Subscribe",currentSubscription:"Current Plan",monthlyVisits:"{{count}} visits per month",dailyVisits:"{{count}} visits per day",unlimitedVisits:"Unlimited visits",month:"Month"},ut={title:"{{tab}} {{siteName}} AI Assistant",description:"{{siteName}} AI Assistant is your AI assistant",all:"All",write:"Write",photos:"Photos",image:"Image",video:"Video",discover:"Discover",resume:"Resume",explore:"Explore",usePrompt:"Use This",autoStyle:"Auto",illustrationStyle:"Illustration",my:{public:"Public",all:"All",like:"Like"}},Le={nav:Xe,language:et,theme:tt,hero:st,customNav:it,wallpaper:nt,search:rt,login:at,site:ot,plan:lt,ai:ut},ct={home:"首页",sites:"网站库",title:"{{siteName}}常驻在浏览器侧边栏,海量壁纸、常用网址随心订制",description:"{{siteName}}你的 AI 助手,常驻在浏览器侧边栏,海量壁纸、常用网址随心订制!"},ht={zh:"中文简体",en:"English"},ft={light:"亮色",dark:"暗色"},dt={titleHighlight:"AI 新标签页",title:"新一代网上冲浪起点",subt
1itle:"常驻于浏览器侧边栏,海量壁纸、常用网址随心订制!",cta:"前往 Chrome 商店安装",sectionTitle:"立即试用 DDTab",sectionSubtitle:"让你的新标签页与众不同,点击安装开启 AI 助手之旅"},gt={title:"自定义网址导航",highlight:"跨端云同步",subtitle:"网址随行,效率翻倍 跨平台云同步导航系统"},pt={title:"海量精美壁纸",highlight:"丰富实用小组件",subtitle:"百万高清壁纸库×智能桌面美学组件,一键打造个性空间"},mt={title:"探索全球互联网",titleHighlight:"发现宝藏网站",subtitle:"告别信息茧房:AI智能推荐全球TOP1%效率网站"},yt={title:"登录",syncDesc:"登录后,自动同步个性化配置",haveAccount:"已有账号?",noAccount:"没有账号?",register:"注册",emailLogin:"邮箱登录",forgot:"忘记密码?"},xt={title:"{{type}}网址库{{siteName}}常驻在浏览器侧边栏",description:"探索全球互联网,发现宝藏{{type}}网站",all:"全部",ai:"AI",news:"新闻",music:"音乐",tech:"科技",photos:"图片",life:"生活",education:"教育",entertainment:"娱乐",shopping:"购物",social:"社交",finance:"金融",read:"阅读",sports:"体育",others:"其他",visit:"打开网站"},bt={subscribeNow:"马上订阅",currentSubscription:"马上订阅",monthlyVisits:"每月 {{count}} 次访问",dailyVisits:"每日 {{count}} 次访问",unlimitedVisits:"无限次数访问",month:"月"},St={title:"{{tab}} {{siteName}} AI 智能助手",description:"{{siteName}} AI 智能助手,基于大语言模型,提供智能对话服务",write:"写作",all:"全部",photos:"图片",image:"图片",video:"视频",discover:"发现",resume:"简历制作",explore:"探索",usePrompt:"做同款",autoStyle:"自动",illustrationStyle:"插图",my:{public:"公开创作",all:"我的创作",like:"我的喜欢"}},we={nav:ct,language:ht,theme:ft,hero:dt,customNav:gt,wallpaper:pt,search:mt,login:yt,site:xt,plan:bt,ai:St},q={};function wt(o){if(!q[o]){const e=b.createInstance();e.use(Fe).init({lng:o,fallbackLng:"en",resources:{en:{translation:Le},zh:{translation:we}},interpolation:{escapeValue:!1},react:{useSuspense:!1}}),q[o]=e}return q[o]}function vt(o,e,t){const i=o==="zh"?we:Le,s=e.split(".");let n=i;for(const r of s)n=n==null?void 0:n[r];return typeof n!="string"&&(n=e),t&&Object.keys(t).forEach(r=>{const a=new RegExp(`{{\\s*${r}\\s*}}`,"g");n=n.replace(a,t[r])}),n}export{Ot as a,wt as c,Lt as g,vt as t};

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.