티스토리 수익 글 보기

티스토리 수익 글 보기

“use strict”;(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3752],{63:(e,t,i)=>{var s=i(7260);i.o(s,”usePathname”)&&i.d(t,{usePathname:function(){return s.usePathname}}),i.o(s,”useRouter”)&&i.d(t,{useRouter:function(){return s.useRouter}}),i.o(s,”useSearchParams”)&&i.d(t,{useSearchParams:function(){return s.useSearchParams}})},338:(e,t,i)=>{i.d(t,{Ay:()=>z});let s=e=>”string”==typeof e,r=()=>{let e,t,i=new Promise((i,s)=>{e=i,t=s});return i.resolve=e,i.reject=t,i},o=e=>null==e?””:””+e,n=/###/g,a=e=>e&&e.indexOf(“###”)>-1?e.replace(n,”.”):e,l=e=>!e||s(e),u=(e,t,i)=>{let r=s(t)?t.split(“.”):t,o=0;for(;o{let{obj:s,k:r}=u(e,t,Object);if(void 0!==s||1===t.length){s[r]=i;return}let o=t[t.length-1],n=t.slice(0,t.length-1),a=u(e,n,Object);for(;void 0===a.obj&&n.length;)o=`${n[n.length-1]}.${o}`,a=u(e,n=n.slice(0,n.length-1),Object),a?.obj&&void 0!==a.obj[`${a.k}.${o}`]&&(a.obj=void 0);a.obj[`${a.k}.${o}`]=i},p=(e,t)=>{let{obj:i,k:s}=u(e,t);if(i&&Object.prototype.hasOwnProperty.call(i,s))return i[s]},c=(e,t,i)=>{for(let r in t)”__proto__”!==r&&”constructor”!==r&&(r in e?s(e[r])||e[r]instanceof String||s(t[r])||t[r]instanceof String?i&&(e[r]=t[r]):c(e[r],t[r],i):e[r]=t[r]);return e},d=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,”\\$&”);var g={“&”:”&”,”<":"<",">“:”>”,'”‘:”"”,”‘”:”'”,”/”:”/”};let f=e=>s(e)?e.replace(/[&<>“‘\/]/g,e=>g[e]):e;class y{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){let t=this.regExpMap.get(e);if(void 0!==t)return t;let 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}}let m=[” “,”,”,”?”,”!”,”;”],v=new y(20),b=function(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:”.”;if(!e)return;if(e[t]){if(!Object.prototype.hasOwnProperty.call(e,t))return;return e[t]}let s=t.split(i),r=e;for(let e=0;e-1&&ne?.replace(“_”,”-“),O={type:”logger”,log(e){this.output(“log”,e)},warn(e){this.output(“warn”,e)},error(e){this.output(“error”,e)},output(e,t){console?.[e]?.apply?.(console,t)}};class S{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.init(e,t)}init(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||”i18next:”,this.logger=e||O,this.options=t,this.debug=t.debug}log(){for(var e=arguments.length,t=Array(e),i=0;i{this.observers[e]||(this.observers[e]=new Map);let i=this.observers[e].get(t)||0;this.observers[e].set(t,i+1)}),this}off(e,t){if(this.observers[e]){if(!t)return void delete this.observers[e];this.observers[e].delete(t)}}emit(e){for(var t=arguments.length,i=Array(t>1?t-1:0),s=1;s{let[t,s]=e;for(let e=0;e{let[s,r]=t;for(let t=0;t1&&void 0!==arguments[1]?arguments[1]:{ns:[“translation”],defaultNS:”translation”};super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator=”.”),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){0>this.options.ns.indexOf(e)&&this.options.ns.push(e)}removeNamespaces(e){let t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,i){let r,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},n=void 0!==o.keySeparator?o.keySeparator:this.options.keySeparator,a=void 0!==o.ignoreJSONStructure?o.ignoreJSONStructure:this.options.ignoreJSONStructure;e.indexOf(“.”)>-1?r=e.split(“.”):(r=[e,t],i&&(Array.isArray(i)?r.push(…i):s(i)&&n?r.push(…i.split(n)):r.push(i)));let l=p(this.data,r);return(!l&&!t&&!i&&e.indexOf(“.”)>-1&&(e=r[0],t=r[1],i=r.slice(2).join(“.”)),!l&&a&&s(i))?b(this.data?.[e]?.[t],i,n):l}addResource(e,t,i,s){let r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},o=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,n=[e,t];i&&(n=n.concat(o?i.split(o):i)),e.indexOf(“.”)>-1&&(n=e.split(“.”),s=t,t=n[1]),this.addNamespaces(t),h(this.data,n,s),r.silent||this.emit(“added”,e,t,i,s)}addResources(e,t,i){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(let r in i)(s(i[r])||Array.isArray(i[r]))&&this.addResource(e,t,r,i[r],{silent:!0});r.silent||this.emit(“added”,e,t,i)}addResourceBundle(e,t,i,s,r){let o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1,skipCopy:!1},n=[e,t];e.indexOf(“.”)>-1&&(n=e.split(“.”),s=i,i=t,t=n[1]),this.addNamespaces(t);let a=p(this.data,n)||{};o.skipCopy||(i=JSON.parse(JSON.stringify(i))),s?c(a,i,r):a={…a,…i},h(this.data,n,a),o.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 void 0!==this.getResource(e,t)}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){let t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}}var P={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,i,s,r){return e.forEach(e=>{t=this.processors[e]?.process(t,i,s,r)??t}),t}};let j={},R=e=>!s(e)&&”boolean”!=typeof e&&”number”!=typeof e;class $ extends w{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(),((e,t,i)=>{e.forEach(e=>{t[e]&&(i[e]=t[e])})})([“resourceStore”,”languageUtils”,”pluralResolver”,”interpolator”,”backendConnector”,”i18nFormat”,”utils”],e,this),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator=”.”),this.logger=k.create(“translator”)}changeLanguage(e){e&&(this.language=e)}exists(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(null==e)return!1;let i=this.resolve(e,t);return i?.res!==void 0}extractFromKey(e,t){let i=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===i&&(i=”:”);let r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,o=t.ns||this.options.defaultNS||[],n=i&&e.indexOf(i)>-1,a=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!((e,t,i)=>{t=t||””,i=i||””;let s=m.filter(e=>0>t.indexOf(e)&&0>i.indexOf(e));if(0===s.length)return!0;let r=v.getRegExp(`(${s.map(e=>”?”===e?”\\?”:e).join(“|”)})`),o=!r.test(e);if(!o){let t=e.indexOf(i);t>0&&!r.test(e.substring(0,t))&&(o=!0)}return o})(e,i,r);if(n&&!a){let t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:s(o)?[o]:o};let n=e.split(i);(i!==r||i===r&&this.options.ns.indexOf(n[0])>-1)&&(o=n.shift()),e=n.join(r)}return{key:e,namespaces:s(o)?[o]:o}}translate(e,t,i){if(“object”!=typeof t&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),”object”==typeof t&&(t={…t}),t||(t={}),null==e)return””;Array.isArray(e)||(e=[String(e)]);let r=void 0!==t.returnDetails?t.returnDetails:this.options.returnDetails,o=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,{key:n,namespaces:a}=this.extractFromKey(e[e.length-1],t),l=a[a.length-1],u=t.lng||this.language,h=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(u?.toLowerCase()===”cimode”){if(h){let e=t.nsSeparator||this.options.nsSeparator;return r?{res:`${l}${e}${n}`,usedKey:n,exactUsedKey:n,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(t)}:`${l}${e}${n}`}return r?{res:n,usedKey:n,exactUsedKey:n,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(t)}:n}let p=this.resolve(e,t),c=p?.res,d=p?.usedKey||n,g=p?.exactUsedKey||n,f=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,y=!this.i18nFormat||this.i18nFormat.handleAsObject,m=void 0!==t.count&&!s(t.count),v=$.hasDefaultValue(t),b=m?this.pluralResolver.getSuffix(u,t.count,t):””,x=t.ordinal&&m?this.pluralResolver.getSuffix(u,t.count,{ordinal:!1}):””,O=m&&!t.ordinal&&0===t.count,S=O&&t[`defaultValue${this.options.pluralSeparator}zero`]||t[`defaultValue${b}`]||t[`defaultValue${x}`]||t.defaultValue,k=c;y&&!c&&v&&(k=S);let w=R(k),L=Object.prototype.toString.apply(k);if(y&&k&&w&&0>[“[object Number]”,”[object Function]”,”[object RegExp]”].indexOf(L)&&!(s(f)&&Array.isArray(k))){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn(“accessing an object – but returnObjects options is not enabled!”);let e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(d,k,{…t,ns:a}):`key ‘${n} (${this.language})’ returned an object instead of string.`;return r?(p.res=e,p.usedParams=this.getUsedParamsDetails(t),p):e}if(o){let e=Array.isArray(k),i=e?[]:{},s=e?g:d;for(let e in k)if(Object.prototype.hasOwnProperty.call(k,e)){let r=`${s}${o}${e}`;v&&!c?i[e]=this.translate(r,{…t,defaultValue:R(S)?S[e]:void 0,…{joinArrays:!1,ns:a}}):i[e]=this.translate(r,{…t,joinArrays:!1,ns:a}),i[e]===r&&(i[e]=k[e])}c=i}}else if(y&&s(f)&&Array.isArray(c))(c=c.join(f))&&(c=this.extendTranslation(c,e,t,i));else{let s=!1,r=!1;!this.isValidLookup(c)&&v&&(s=!0,c=S),this.isValidLookup(c)||(r=!0,c=n);let a=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&r?void 0:c,h=v&&S!==c&&this.options.updateMissing;if(r||s||h){if(this.logger.log(h?”updateKey”:”missingKey”,u,l,n,h?S:c),o){let e=this.resolve(n,{…t,keySeparator:!1});e&&e.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 e=[],i=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if(“fallback”===this.options.saveMissingTo&&i&&i[0])for(let t=0;t{let r=v&&s!==c?s:a;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,i,r,h,t):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,l,i,r,h,t),this.emit(“missingKey”,e,l,i,c)};this.options.saveMissing&&(this.options.saveMissingPlurals&&m?e.forEach(e=>{let i=this.pluralResolver.getSuffixes(e,t);O&&t[`defaultValue${this.options.pluralSeparator}zero`]&&0>i.indexOf(`${this.options.pluralSeparator}zero`)&&i.push(`${this.options.pluralSeparator}zero`),i.forEach(i=>{s([e],n+i,t[`defaultValue${i}`]||S)})}):s(e,n,S))}c=this.extendTranslation(c,e,t,p,i),r&&c===n&&this.options.appendNamespaceToMissingKey&&(c=`${l}:${n}`),(r||s)&&this.options.parseMissingKeyHandler&&(c=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}:${n}`:n,s?c:void 0))}return r?(p.res=c,p.usedParams=this.getUsedParamsDetails(t),p):c}extendTranslation(e,t,i,r,o){var n=this;if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{…this.options.interpolation.defaultVariables,…i},i.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!i.skipInterpolation){let a;i.interpolation&&this.interpolator.init({…i,…{interpolation:{…this.options.interpolation,…i.interpolation}}});let l=s(e)&&(i?.interpolation?.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);if(l){let t=e.match(this.interpolator.nestingRegexp);a=t&&t.length}let u=i.replace&&!s(i.replace)?i.replace:i;if(this.options.interpolation.defaultVariables&&(u={…this.options.interpolation.defaultVariables,…u}),e=this.interpolator.interpolate(e,u,i.lng||this.language||r.usedLng,i),l){let t=e.match(this.interpolator.nestingRegexp);a<(t&&t.length)&&(i.nest=!1)}!i.lng&&r&&r.res&&(i.lng=this.language||r.usedLng),!1!==i.nest&&(e=this.interpolator.nest(e,function(){for(var e=arguments.length,s=Array(e),r=0;r1&&void 0!==arguments[1]?arguments[1]:{};return s(e)&&(e=[e]),e.forEach(e=>{if(this.isValidLookup(t))return;let l=this.extractFromKey(e,a),u=l.key;i=u;let h=l.namespaces;this.options.fallbackNS&&(h=h.concat(this.options.fallbackNS));let p=void 0!==a.count&&!s(a.count),c=p&&!a.ordinal&&0===a.count,d=void 0!==a.context&&(s(a.context)||”number”==typeof a.context)&&””!==a.context,g=a.lngs?a.lngs:this.languageUtils.toResolveHierarchy(a.lng||this.language,a.fallbackLng);h.forEach(e=>{this.isValidLookup(t)||(n=e,!j[`${g[0]}-${e}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(n)&&(j[`${g[0]}-${e}`]=!0,this.logger.warn(`key “${i}” for languages “${g.join(“, “)}” won’t get resolved as namespace “${n}” 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!!!”)),g.forEach(i=>{let s;if(this.isValidLookup(t))return;o=i;let n=[u];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(n,u,i,e,a);else{let e;p&&(e=this.pluralResolver.getSuffix(i,a.count,a));let t=`${this.options.pluralSeparator}zero`,s=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(p&&(n.push(u+e),a.ordinal&&0===e.indexOf(s)&&n.push(u+e.replace(s,this.options.pluralSeparator)),c&&n.push(u+t)),d){let i=`${u}${this.options.contextSeparator}${a.context}`;n.push(i),p&&(n.push(i+e),a.ordinal&&0===e.indexOf(s)&&n.push(i+e.replace(s,this.options.pluralSeparator)),c&&n.push(i+t))}}for(;s=n.pop();)this.isValidLookup(t)||(r=s,t=this.getResource(i,e,s,a))}))})}),{res:t,usedKey:i,exactUsedKey:r,usedLng:o,usedNS:n}}isValidLookup(e){return void 0!==e&&!(!this.options.returnNull&&null===e)&&!(!this.options.returnEmptyString&&””===e)}getResource(e,t,i){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,i,s):this.resourceStore.getResource(e,t,i,s)}getUsedParamsDetails(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.replace&&!s(e.replace),i=t?e.replace:e;if(t&&void 0!==e.count&&(i.count=e.count),this.options.interpolation.defaultVariables&&(i={…this.options.interpolation.defaultVariables,…i}),!t)for(let e of(i={…i},[“defaultValue”,”ordinal”,”context”,”replace”,”lng”,”lngs”,”fallbackLng”,”ns”,”keySeparator”,”nsSeparator”,”returnObjects”,”returnDetails”,”joinArrays”,”postProcess”,”interpolation”]))delete i[e];return i}static hasDefaultValue(e){let t=”defaultValue”;for(let i in e)if(Object.prototype.hasOwnProperty.call(e,i)&&t===i.substring(0,t.length)&&void 0!==e[i])return!0;return!1}}class C{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=k.create(“languageUtils”)}getScriptPartFromCode(e){if(!(e=x(e))||0>e.indexOf(“-“))return null;let t=e.split(“-“);return 2===t.length||(t.pop(),”x”===t[t.length-1].toLowerCase())?null:this.formatLanguageCode(t.join(“-“))}getLanguagePartFromCode(e){if(!(e=x(e))||0>e.indexOf(“-“))return e;let t=e.split(“-“);return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(s(e)&&e.indexOf(“-“)>-1){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch(e){}return(t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t)?t:this.options.lowerCaseLng?e.toLowerCase():e}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(“languageOnly”===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){let t;return e?(e.forEach(e=>{if(t)return;let i=this.formatLanguageCode(e);(!this.options.supportedLngs||this.isSupportedCode(i))&&(t=i)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;let i=this.getLanguagePartFromCode(e);if(this.isSupportedCode(i))return t=i;t=this.options.supportedLngs.find(e=>{if(e===i||!(0>e.indexOf(“-“)&&0>i.indexOf(“-“))&&(e.indexOf(“-“)>0&&0>i.indexOf(“-“)&&e.substring(0,e.indexOf(“-“))===i||0===e.indexOf(i)&&i.length>1))return e})}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null}getFallbackCodes(e,t){if(!e)return[];if(“function”==typeof e&&(e=e(t)),s(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){let i=this.getFallbackCodes(t||this.options.fallbackLng||[],e),r=[],o=e=>{e&&(this.isSupportedCode(e)?r.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return s(e)&&(e.indexOf(“-“)>-1||e.indexOf(“_”)>-1)?(“languageOnly”!==this.options.load&&o(this.formatLanguageCode(e)),”languageOnly”!==this.options.load&&”currentOnly”!==this.options.load&&o(this.getScriptPartFromCode(e)),”currentOnly”!==this.options.load&&o(this.getLanguagePartFromCode(e))):s(e)&&o(this.formatLanguageCode(e)),i.forEach(e=>{0>r.indexOf(e)&&o(this.formatLanguageCode(e))}),r}}let N={zero:0,one:1,two:2,few:3,many:4,other:5},E={select:e=>1===e?”one”:”other”,resolvedOptions:()=>({pluralCategories:[“one”,”other”]})};class A{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=k.create(“pluralResolver”),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e){let t,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=x(“dev”===e?”en”:e),r=i.ordinal?”ordinal”:”cardinal”,o=JSON.stringify({cleanedCode:s,type:r});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];try{t=new Intl.PluralRules(s,{type:r})}catch(r){if(!Intl)return this.logger.error(“No Intl support, please use an Intl polyfill!”),E;if(!e.match(/-|_/))return E;let s=this.languageUtils.getLanguagePartFromCode(e);t=this.getRule(s,i)}return this.pluralRulesCache[o]=t,t}needsPlural(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=this.getRule(e,t);return i||(i=this.getRule(“dev”,t)),i?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,i).map(e=>`${t}${e}`)}getSuffixes(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=this.getRule(e,t);return(i||(i=this.getRule(“dev”,t)),i)?i.resolvedOptions().pluralCategories.sort((e,t)=>N[e]-N[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:””}${e}`):[]}getSuffix(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},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))}}let T=function(e,t,i){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:”.”,o=!(arguments.length>4)||void 0===arguments[4]||arguments[4],n=((e,t,i)=>{let s=p(e,i);return void 0!==s?s:p(t,i)})(e,t,i);return!n&&o&&s(i)&&void 0===(n=b(e,i,r))&&(n=b(t,i,r)),n},D=e=>e.replace(/\$/g,”$$$$”);class F{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=k.create(“interpolator”),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});let{escape:t,escapeValue:i,useRawValueToEscape:s,prefix:r,prefixEscaped:o,suffix:n,suffixEscaped:a,formatSeparator:l,unescapeSuffix:u,unescapePrefix:h,nestingPrefix:p,nestingPrefixEscaped:c,nestingSuffix:g,nestingSuffixEscaped:y,nestingOptionsSeparator:m,maxReplaces:v,alwaysFormat:b}=e.interpolation;this.escape=void 0!==t?t:f,this.escapeValue=void 0===i||i,this.useRawValueToEscape=void 0!==s&&s,this.prefix=r?d(r):o||”{{“,this.suffix=n?d(n):a||”}}”,this.formatSeparator=l||”,”,this.unescapePrefix=u?””:h||”-“,this.unescapeSuffix=this.unescapePrefix?””:u||””,this.nestingPrefix=p?d(p):c||d(“$t(“),this.nestingSuffix=g?d(g):y||d(“)”),this.nestingOptionsSeparator=m||”,”,this.maxReplaces=v||1e3,this.alwaysFormat=void 0!==b&&b,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){let e=(e,t)=>e?.source===t?(e.lastIndex=0,e):RegExp(t,”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,r){let n,a,l,u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},h=e=>{if(0>e.indexOf(this.formatSeparator)){let s=T(t,u,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(s,void 0,i,{…r,…t,interpolationkey:e}):s}let s=e.split(this.formatSeparator),o=s.shift().trim(),n=s.join(this.formatSeparator).trim();return this.format(T(t,u,o,this.options.keySeparator,this.options.ignoreJSONStructure),n,i,{…r,…t,interpolationkey:o})};this.resetRegExp();let p=r?.missingInterpolationHandler||this.options.missingInterpolationHandler,c=r?.interpolation?.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>D(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?D(this.escape(e)):D(e)}].forEach(t=>{for(l=0;n=t.regex.exec(e);){let i=n[1].trim();if(void 0===(a=h(i)))if(“function”==typeof p){let t=p(e,n,r);a=s(t)?t:””}else if(r&&Object.prototype.hasOwnProperty.call(r,i))a=””;else if(c){a=n[0];continue}else this.logger.warn(`missed to pass in variable ${i} for interpolating ${e}`),a=””;else s(a)||this.useRawValueToEscape||(a=o(a));let u=t.safeValue(a);if(e=e.replace(n[0],u),c?(t.regex.lastIndex+=a.length,t.regex.lastIndex-=n[0].length):t.regex.lastIndex=0,++l>=this.maxReplaces)break}}),e}nest(e,t){let i,r,n,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},l=(e,t)=>{let i=this.nestingOptionsSeparator;if(0>e.indexOf(i))return e;let s=e.split(RegExp(`${i}[ ]*{`)),r=`{${s[1]}`;e=s[0];let o=(r=this.interpolate(r,n)).match(/’/g),a=r.match(/”/g);((o?.length??0)%2!=0||a)&&a.length%2==0||(r=r.replace(/’/g,'”‘));try{n=JSON.parse(r),t&&(n={…t,…n})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${i}${r}`}return n.defaultValue&&n.defaultValue.indexOf(this.prefix)>-1&&delete n.defaultValue,e};for(;i=this.nestingRegexp.exec(e);){let u=[];(n=(n={…a}).replace&&!s(n.replace)?n.replace:n).applyPostProcessor=!1,delete n.defaultValue;let h=!1;if(-1!==i[0].indexOf(this.formatSeparator)&&!/{.*}/.test(i[1])){let e=i[1].split(this.formatSeparator).map(e=>e.trim());i[1]=e.shift(),u=e,h=!0}if((r=t(l.call(this,i[1].trim(),n),n))&&i[0]===e&&!s(r))return r;s(r)||(r=o(r)),r||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${e}`),r=””),h&&(r=u.reduce((e,t)=>this.format(e,t,a.lng,{…a,interpolationkey:i[1].trim()}),r.trim())),e=e.replace(i[0],r),this.regexp.lastIndex=0}return e}}let I=e=>{let t={};return(i,s,r)=>{let o=r;r&&r.interpolationkey&&r.formatParams&&r.formatParams[r.interpolationkey]&&r[r.interpolationkey]&&(o={…o,[r.interpolationkey]:void 0});let n=s+JSON.stringify(o),a=t[n];return a||(a=e(x(s),r),t[n]=a),a(i)}};class V{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=k.create(“formatter”),this.options=e,this.formats={number:I((e,t)=>{let i=new Intl.NumberFormat(e,{…t});return e=>i.format(e)}),currency:I((e,t)=>{let i=new Intl.NumberFormat(e,{…t,style:”currency”});return e=>i.format(e)}),datetime:I((e,t)=>{let i=new Intl.DateTimeFormat(e,{…t});return e=>i.format(e)}),relativetime:I((e,t)=>{let i=new Intl.RelativeTimeFormat(e,{…t});return e=>i.format(e,t.range||”day”)}),list:I((e,t)=>{let i=new Intl.ListFormat(e,{…t});return e=>i.format(e)})},this.init(e)}init(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};this.formatSeparator=t.interpolation.formatSeparator||”,”}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=I(t)}format(e,t,i){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=t.split(this.formatSeparator);if(r.length>1&&r[0].indexOf(“(“)>1&&0>r[0].indexOf(“)”)&&r.find(e=>e.indexOf(“)”)>-1)){let e=r.findIndex(e=>e.indexOf(“)”)>-1);r[0]=[r[0],…r.splice(1,e)].join(this.formatSeparator)}return r.reduce((e,t)=>{let{formatName:r,formatOptions:o}=(e=>{let t=e.toLowerCase().trim(),i={};if(e.indexOf(“(“)>-1){let s=e.split(“(“);t=s[0].toLowerCase().trim();let r=s[1].substring(0,s[1].length-1);”currency”===t&&0>r.indexOf(“:”)?i.currency||(i.currency=r.trim()):”relativetime”===t&&0>r.indexOf(“:”)?i.range||(i.range=r.trim()):r.split(“;”).forEach(e=>{if(e){let[t,…s]=e.split(“:”),r=s.join(“:”).trim().replace(/^’+|’+$/g,””),o=t.trim();i[o]||(i[o]=r),”false”===r&&(i[o]=!1),”true”===r&&(i[o]=!0),isNaN(r)||(i[o]=parseInt(r,10))}})}return{formatName:t,formatOptions:i}})(t);if(this.formats[r]){let t=e;try{let n=s?.formatParams?.[s.interpolationkey]||{},a=n.locale||n.lng||s.locale||s.lng||i;t=this.formats[r](e,a,{…o,…s,…n})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${r}`),e},e)}}class M extends w{constructor(e,t,i){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};super(),this.backend=e,this.store=t,this.services=i,this.languageUtils=i.languageUtils,this.options=s,this.logger=k.create(“backendConnector”),this.waitingReads=[],this.maxParallelReads=s.maxParallelReads||10,this.readingCalls=0,this.maxRetries=s.maxRetries>=0?s.maxRetries:5,this.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(i,s.backend,s)}queueLoad(e,t,i,s){let r={},o={},n={},a={};return e.forEach(e=>{let s=!0;t.forEach(t=>{let n=`${e}|${t}`;!i.reload&&this.store.hasResourceBundle(e,t)?this.state[n]=2:this.state[n]<0||(1===this.state[n]?void 0===o[n]&&(o[n]=!0):(this.state[n]=1,s=!1,void 0===o[n]&&(o[n]=!0),void 0===r[n]&&(r[n]=!0),void 0===a[t]&&(a[t]=!0)))}),s||(n[e]=!0)}),(Object.keys(r).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(r),pending:Object.keys(o),toLoadLanguages:Object.keys(n),toLoadNamespaces:Object.keys(a)}}loaded(e,t,i){let s=e.split("|"),r=s[0],o=s[1];t&&this.emit("failedLoading",r,o,t),!t&&i&&this.store.addResourceBundle(r,o,i,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&i&&(this.state[e]=0);let n={};this.queue.forEach(i=>{((e,t,i,s)=>{let{obj:r,k:o}=u(e,t,Object);r[o]=r[o]||[],r[o].push(i)})(i.loaded,[r],o),void 0!==i.pending[e]&&(delete i.pending[e],i.pendingCount–),t&&i.errors.push(t),0!==i.pendingCount||i.done||(Object.keys(i.loaded).forEach(e=>{n[e]||(n[e]={});let t=i.loaded[e];t.length&&t.forEach(t=>{void 0===n[e][t]&&(n[e][t]=!0)})}),i.done=!0,i.errors.length?i.callback(i.errors):i.callback())}),this.emit(“loaded”,n),this.queue=this.queue.filter(e=>!e.done)}read(e,t,i){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,o=arguments.length>5?arguments[5]:void 0;if(!e.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:t,fcName:i,tried:s,wait:r,callback:o});this.readingCalls++;let n=(n,a)=>{if(this.readingCalls–,this.waitingReads.length>0){let e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}if(n&&a&&s{this.read.call(this,e,t,i,s+1,2*r,o)},r);o(n,a)},a=this.backend[i].bind(this.backend);if(2===a.length){try{let i=a(e,t);i&&”function”==typeof i.then?i.then(e=>n(null,e)).catch(n):n(null,i)}catch(e){n(e)}return}return a(e,t,n)}prepareLoading(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn(“No backend was added via i18next.use. Will not load resources.”),r&&r();s(e)&&(e=this.languageUtils.toResolveHierarchy(e)),s(t)&&(t=[t]);let o=this.queueLoad(e,t,i,r);if(!o.toLoad.length)return o.pending.length||r(),null;o.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,i){this.prepareLoading(e,t,{},i)}reload(e,t,i){this.prepareLoading(e,t,{reload:!0},i)}loadOne(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:””,i=e.split(“|”),s=i[0],r=i[1];this.read(s,r,”read”,void 0,void 0,(i,o)=>{i&&this.logger.warn(`${t}loading namespace ${r} for language ${s} failed`,i),!i&&o&&this.logger.log(`${t}loaded namespace ${r} for language ${s}`,o),this.loaded(e,i,o)})}saveMissing(e,t,i,s,r){let o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},n=arguments.length>6&&void 0!==arguments[6]?arguments[6]:()=>{};if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(t))return void 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!!!”);if(null!=i&&””!==i){if(this.backend?.create){let a={…o,isUpdate:r},l=this.backend.create.bind(this.backend);if(l.length<6)try{let r;(r=5===l.length?l(e,t,i,s,a):l(e,t,i,s))&&"function"==typeof r.then?r.then(e=>n(null,e)).catch(n):n(null,r)}catch(e){n(e)}else l(e,t,i,s,n,a)}e&&e[0]&&this.store.addResource(e[0],t,i,s)}}}let H=()=>({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:e=>{let t={};if(“object”==typeof e[1]&&(t=e[1]),s(e[1])&&(t.defaultValue=e[1]),s(e[2])&&(t.tDescription=e[2]),”object”==typeof e[2]||”object”==typeof e[3]){let i=e[3]||e[2];Object.keys(i).forEach(e=>{t[e]=i[e]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:”{{“,suffix:”}}”,formatSeparator:”,”,unescapePrefix:”-“,nestingPrefix:”$t(“,nestingSuffix:”)”,nestingOptionsSeparator:”,”,maxReplaces:1e3,skipOnVariables:!0}}),U=e=>(s(e.ns)&&(e.ns=[e.ns]),s(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),s(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs?.indexOf?.(“cimode”)<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),"boolean"==typeof e.initImmediate&&(e.initAsync=e.initImmediate),e),q=()=>{};class K extends w{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if(super(),this.options=U(e),this.services={},this.logger=k,this.modules={external:[]},(e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>{“function”==typeof e[t]&&(e[t]=e[t].bind(e))})})(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(){var e=this;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,”function”==typeof t&&(i=t,t={}),null==t.defaultNS&&t.ns&&(s(t.ns)?t.defaultNS=t.ns:0>t.ns.indexOf(“translation”)&&(t.defaultNS=t.ns[0]));let o=H();this.options={…o,…this.options,…U(t)},this.options.interpolation={…o.interpolation,…this.options.interpolation},void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator);let n=e=>e?”function”==typeof e?new e:e:null;if(!this.options.isClone){let t;this.modules.logger?k.init(n(this.modules.logger),this.options):k.init(null,this.options),t=this.modules.formatter?this.modules.formatter:V;let i=new C(this.options);this.store=new L(this.options.resources,this.options);let s=this.services;s.logger=k,s.resourceStore=this.store,s.languageUtils=i,s.pluralResolver=new A(i,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),t&&(!this.options.interpolation.format||this.options.interpolation.format===o.interpolation.format)&&(s.formatter=n(t),s.formatter.init(s,this.options),this.options.interpolation.format=s.formatter.format.bind(s.formatter)),s.interpolator=new F(this.options),s.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},s.backendConnector=new M(n(this.modules.backend),s.resourceStore,s,this.options),s.backendConnector.on(“*”,function(t){for(var i=arguments.length,s=Array(i>1?i-1:0),r=1;r1?i-1:0),r=1;r{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,i||(i=q),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){let e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&”dev”!==e[0]&&(this.options.lng=e[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(t=>{this[t]=function(){return e.store[t](…arguments)}}),[“addResource”,”addResources”,”addResourceBundle”,”removeResourceBundle”].forEach(t=>{this[t]=function(){return e.store[t](…arguments),e}});let a=r(),l=()=>{let e=(e,t)=>{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(t),i(e,t)};if(this.languages&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?l():setTimeout(l,0),a}loadResources(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:q,i=t,r=s(e)?e:this.language;if(“function”==typeof e&&(i=e),!this.options.resources||this.options.partialBundledLanguages){if(r?.toLowerCase()===”cimode”&&(!this.options.preload||0===this.options.preload.length))return i();let e=[],t=t=>{t&&”cimode”!==t&&this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{“cimode”!==t&&0>e.indexOf(t)&&e.push(t)})};r?t(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e)),this.options.preload?.forEach?.(e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),i(e)})}else i(null)}reloadResources(e,t,i){let s=r();return”function”==typeof e&&(i=e,e=void 0),”function”==typeof t&&(i=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),i||(i=q),this.services.backendConnector.reload(e,t,e=>{s.resolve(),i(e)}),s}use(e){if(!e)throw Error(“You are passing an undefined module! Please check the object you are passing to i18next.use()”);if(!e.type)throw Error(“You are passing a wrong module! Please check the object you are passing to i18next.use()”);return”backend”===e.type&&(this.modules.backend=e),(“logger”===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),”languageDetector”===e.type&&(this.modules.languageDetector=e),”i18nFormat”===e.type&&(this.modules.i18nFormat=e),”postProcessor”===e.type&&P.addPostProcessor(e),”formatter”===e.type&&(this.modules.formatter=e),”3rdParty”===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&!([“cimode”,”dev”].indexOf(e)>-1))for(let e=0;e-1)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}}changeLanguage(e,t){var i=this;this.isLanguageChangingTo=e;let o=r();this.emit(“languageChanging”,e);let n=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},a=(e,s)=>{s?(n(s),this.translator.changeLanguage(s),this.isLanguageChangingTo=void 0,this.emit(“languageChanged”,s),this.logger.log(“languageChanged”,s)):this.isLanguageChangingTo=void 0,o.resolve(function(){return i.t(…arguments)}),t&&t(e,function(){return i.t(…arguments)})},l=t=>{e||t||!this.services.languageDetector||(t=[]);let i=s(t)?t:this.services.languageUtils.getBestMatchFromCodes(t);i&&(this.language||n(i),this.translator.language||this.translator.changeLanguage(i),this.services.languageDetector?.cacheUserLanguage?.(i)),this.loadResources(i,e=>{a(e,i)})};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(l):this.services.languageDetector.detect(l):l(e):l(this.services.languageDetector.detect()),o}getFixedT(e,t,i){var r=this;let o=function(e,t){let s,n;if(“object”!=typeof t){for(var a=arguments.length,l=Array(a>2?a-2:0),u=2;u`${s.keyPrefix}${h}${e}`):s.keyPrefix?`${s.keyPrefix}${h}${e}`:e,r.t(n,s)};return s(e)?o.lng=e:o.lngs=e,o.ns=t,o.keyPrefix=i,o}t(){for(var e=arguments.length,t=Array(e),i=0;i1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn(“hasLoadedNamespace: i18next was not initialized”,this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn(“hasLoadedNamespace: i18n.languages were undefined or empty”,this.languages),!1;let i=t.lng||this.resolvedLanguage||this.languages[0],s=!!this.options&&this.options.fallbackLng,r=this.languages[this.languages.length-1];if(“cimode”===i.toLowerCase())return!0;let o=(e,t)=>{let i=this.services.backendConnector.state[`${e}|${t}`];return -1===i||0===i||2===i};if(t.precheck){let e=t.precheck(this,o);if(void 0!==e)return e}return!!(this.hasResourceBundle(i,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||o(i,e)&&(!s||o(r,e)))}loadNamespaces(e,t){let i=r();return this.options.ns?(s(e)&&(e=[e]),e.forEach(e=>{0>this.options.ns.indexOf(e)&&this.options.ns.push(e)}),this.loadResources(e=>{i.resolve(),t&&t(e)}),i):(t&&t(),Promise.resolve())}loadLanguages(e,t){let i=r();s(e)&&(e=[e]);let o=this.options.preload||[],n=e.filter(e=>0>o.indexOf(e)&&this.services.languageUtils.isSupportedCode(e));return n.length?(this.options.preload=o.concat(n),this.loadResources(e=>{i.resolve(),t&&t(e)}),i):(t&&t(),Promise.resolve())}dir(e){return(e||(e=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),e)?[“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”].indexOf((this.services?.languageUtils||new C(H())).getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf(“-arab”)>1?”rtl”:”ltr”:”rtl”}static createInstance(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new K(e,t)}cloneInstance(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:q,i=e.forkResourceStore;i&&delete e.forkResourceStore;let s={…this.options,…e,isClone:!0},r=new K(s);return(void 0!==e.debug||void 0!==e.prefix)&&(r.logger=r.logger.clone(e)),[“store”,”services”,”language”].forEach(e=>{r[e]=this[e]}),r.services={…this.services},r.services.utils={hasLoadedNamespace:r.hasLoadedNamespace.bind(r)},i&&(r.store=new L(Object.keys(this.store.data).reduce((e,t)=>(e[t]={…this.store.data[t]},Object.keys(e[t]).reduce((i,s)=>(i[s]={…e[t][s]},i),{})),{}),s),r.services.resourceStore=r.store),r.translator=new $(r.services,s),r.translator.on(“*”,function(e){for(var t=arguments.length,i=Array(t>1?t-1:0),s=1;s{function s(e){return(s=”function”==typeof Symbol&&”symbol”==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&”function”==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?”symbol”:typeof e})(e)}i.d(t,{A:()=>w});var r,o,n=[];function a(){return”function”==typeof XMLHttpRequest||(“undefined”==typeof XMLHttpRequest?”undefined”:s(XMLHttpRequest))===”object”}function l(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),i.push.apply(i,s)}return i}function u(e){for(var t=1;t=1?e.alternateFetch:void 0;try{d(t,n,s,a)}catch(e){if(!o||0===Object.keys(o).length||!e.message||0>e.message.indexOf(“not implemented”))return s(e);try{Object.keys(o).forEach(function(e){delete n[e]}),d(t,n,s,a),g=!0}catch(e){s(e)}}},y=function(e,t,i,s){i&&”object”===h(i)&&(i=c(“”,i).slice(1)),e.queryStringParams&&(t=c(t,e.queryStringParams));try{var n=r?new r:new o(“MSXML2.XMLHTTP.3.0″);n.open(i?”POST”:”GET”,t,1),e.crossDomain||n.setRequestHeader(“X-Requested-With”,”XMLHttpRequest”),n.withCredentials=!!e.withCredentials,i&&n.setRequestHeader(“Content-Type”,”application/x-www-form-urlencoded”),n.overrideMimeType&&n.overrideMimeType(“application/json”);var a=e.customHeaders;if(a=”function”==typeof a?a():a)for(var l in a)n.setRequestHeader(l,a[l]);n.onreadystatechange=function(){n.readyState>3&&s(n.status>=400?n.statusText:null,{status:n.status,data:n.responseText})},n.send(i)}catch(e){console&&console.log(e)}};let m=function(e,t,i,s){return(“function”==typeof i&&(s=i,i=void 0),s=s||function(){},p&&0!==t.indexOf(“file:”))?f(e,t,i,s):a()||”function”==typeof ActiveXObject?y(e,t,i,s):void s(Error(“No fetch and no xhr implementation found!”))};function v(e){return(v=”function”==typeof Symbol&&”symbol”==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&”function”==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?”symbol”:typeof e})(e)}function b(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),i.push.apply(i,s)}return i}function x(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{},s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!(this instanceof e))throw TypeError(“Cannot call a class as a function”);this.services=t,this.options=i,this.allOptions=s,this.type=”backend”,this.init(t,i,s)},t=[{key:”init”,value:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(this.services=e,this.options=x(x(x({},{loadPath:”/locales/{{lng}}/{{ns}}.json”,addPath:”/locales/add/{{lng}}/{{ns}}”,parse:function(e){return JSON.parse(e)},stringify:JSON.stringify,parsePayload:function(e,t,i){return O({},t,i||””)},parseLoadPayload:function(e,t){},request:m,reloadInterval:”undefined”==typeof window&&36e5,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:”cors”,credentials:”same-origin”,cache:”default”}}),this.options||{}),i),this.allOptions=s,this.services&&this.options.reloadInterval){var r=setInterval(function(){return t.reload()},this.options.reloadInterval);”object”===v(r)&&”function”==typeof r.unref&&r.unref()}}},{key:”readMulti”,value:function(e,t,i){this._readAny(e,e,t,t,i)}},{key:”read”,value:function(e,t,i){this._readAny([e],e,[t],t,i)}},{key:”_readAny”,value:function(e,t,i,s,r){var o,n,a=this,l=this.options.loadPath;”function”==typeof this.options.loadPath&&(l=this.options.loadPath(e,i)),(l=(n=o=l)&&”function”==typeof n.then?o:Promise.resolve(o)).then(function(o){if(!o)return r(null,{});var n=a.services.interpolator.interpolate(o,{lng:e.join(“+”),ns:i.join(“+”)});a.loadUrl(n,r,t,s)})}},{key:”loadUrl”,value:function(e,t,i,s){var r=this,o=this.options.parseLoadPayload(“string”==typeof i?[i]:i,”string”==typeof s?[s]:s);this.options.request(this.options,e,o,function(o,n){if(n&&(n.status>=500&&n.status<600||!n.status))return t("failed loading "+e+"; status code: "+n.status,!0);if(n&&n.status>=400&&n.status<500)return t("failed loading "+e+"; status code: "+n.status,!1);if(!n&&o&&o.message){var a,l,u=o.message.toLowerCase();if(["failed","fetch","network","load"].find(function(e){return u.indexOf(e)>-1}))return t(“failed loading “+e+”: “+o.message,!0)}if(o)return t(o,!1);try{a=”string”==typeof n.data?r.options.parse(n.data,i,s):n.data}catch(t){l=”failed parsing “+e+” to json”}if(l)return t(l,!1);t(null,a)})}},{key:”create”,value:function(e,t,i,s,r){var o=this;if(this.options.addPath){“string”==typeof e&&(e=[e]);var n=this.options.parsePayload(t,i,s),a=0,l=[],u=[];e.forEach(function(i){var s=o.options.addPath;”function”==typeof o.options.addPath&&(s=o.options.addPath(i,t));var h=o.services.interpolator.interpolate(s,{lng:i,ns:t});o.options.request(o.options,h,n,function(t,i){a+=1,l.push(t),u.push(i),a===e.length&&”function”==typeof r&&r(l,u)})})}}},{key:”reload”,value:function(){var e=this,t=this.services,i=t.backendConnector,s=t.languageUtils,r=t.logger,o=i.language;if(!o||”cimode”!==o.toLowerCase()){var n=[],a=function(e){s.toResolveHierarchy(e).forEach(function(e){0>n.indexOf(e)&&n.push(e)})};a(o),this.allOptions.preload&&this.allOptions.preload.forEach(function(e){return a(e)}),n.forEach(function(t){e.allOptions.ns.forEach(function(e){i.read(t,e,”read”,null,null,function(s,o){s&&r.warn(“loading namespace “.concat(e,” for language “).concat(t,” failed”),s),!s&&o&&r.log(“loaded namespace “.concat(e,” for language “).concat(t),o),i.loaded(“”.concat(t,”|”).concat(e),s,o)})})})}}}],function(e,t){for(var i=0;i{Object.defineProperty(t,”__esModule”,{value:!0}),!function(e,t){for(var i in t)Object.defineProperty(e,i,{enumerable:!0,get:t[i]})}(t,{default:function(){return l},getImageProps:function(){return a}});let s=i(8140),r=i(5040),o=i(1356),n=s._(i(1124));function a(e){let{props:t}=(0,r.getImgProps)(e,{defaultLoader:n.default,imgConf:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:”/_next/image”,loader:”default”,dangerouslyAllowSVG:!1,unoptimized:!1}});for(let[e,i]of Object.entries(t))void 0===i&&delete t[e];return{props:t}}let l=o.Image},5239:(e,t,i)=>{i.d(t,{default:()=>r.a});var s=i(4652),r=i.n(s)}}]);