crmbonus-component-wake 2.0.49 → 2.0.50

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (106) hide show
  1. package/dist/cjs/countdown-timer_4.cjs.entry.js +3 -2
  2. package/dist/cjs/countdown-timer_4.cjs.entry.js.map +1 -1
  3. package/dist/cjs/crm-bonus-form.cjs.entry.js +1 -1
  4. package/dist/cjs/crm-bonus.cjs.entry.js +2 -2
  5. package/dist/cjs/crm-button.cjs.entry.js +2 -1
  6. package/dist/cjs/crm-button.cjs.entry.js.map +1 -1
  7. package/dist/cjs/crm-giftback-form.cjs.entry.js +7 -7
  8. package/dist/cjs/crm-giftback-form.cjs.entry.js.map +1 -1
  9. package/dist/cjs/crmbonus-component-wake.cjs.js +1 -1
  10. package/dist/cjs/{crmbonus.service-7991795d.js → crmbonus.service-3c4ebbdf.js} +2 -2
  11. package/dist/cjs/{crmbonus.service-7991795d.js.map → crmbonus.service-3c4ebbdf.js.map} +1 -1
  12. package/dist/cjs/{i18n-818275e6.js → i18n-efd790a3.js} +2 -2
  13. package/dist/cjs/{i18n-818275e6.js.map → i18n-efd790a3.js.map} +1 -1
  14. package/dist/cjs/loader.cjs.js +1 -1
  15. package/dist/cjs/pedido-finalizado.cjs.entry.js +1 -1
  16. package/dist/cjs/phone-input-mask.cjs.entry.js +4 -1
  17. package/dist/cjs/phone-input-mask.cjs.entry.js.map +1 -1
  18. package/dist/collection/components/button/index.js +17 -1
  19. package/dist/collection/components/button/index.js.map +1 -1
  20. package/dist/collection/components/giftback-form/giftback-form.js +5 -5
  21. package/dist/collection/components/giftback-form/giftback-form.js.map +1 -1
  22. package/dist/collection/components/giftback-form/subcomponents/pin-form/pin-form.js +2 -1
  23. package/dist/collection/components/giftback-form/subcomponents/pin-form/pin-form.js.map +1 -1
  24. package/dist/collection/components/phone/phone-input-mask.js +4 -1
  25. package/dist/collection/components/phone/phone-input-mask.js.map +1 -1
  26. package/dist/collection/i18n/i18n.js +1 -1
  27. package/dist/collection/i18n/i18n.js.map +1 -1
  28. package/dist/components/crm-bonus-form.js +1 -1
  29. package/dist/components/crm-bonus.js +8 -8
  30. package/dist/components/crm-button.js +1 -1
  31. package/dist/components/crm-giftback-form.js +1 -1
  32. package/dist/components/giftback-info.js +1 -1
  33. package/dist/components/{p-5dfa24e0.js → p-255eed34.js} +5 -4
  34. package/dist/components/p-255eed34.js.map +1 -0
  35. package/dist/components/{p-25f37293.js → p-3cb4afe5.js} +13 -13
  36. package/dist/components/p-3cb4afe5.js.map +1 -0
  37. package/dist/components/{p-11bd8050.js → p-78300478.js} +3 -3
  38. package/dist/components/{p-11bd8050.js.map → p-78300478.js.map} +1 -1
  39. package/dist/components/{p-be365312.js → p-b808ff34.js} +5 -2
  40. package/dist/components/p-b808ff34.js.map +1 -0
  41. package/dist/components/{p-384fabf7.js → p-dd6f6ab7.js} +2 -2
  42. package/dist/components/{p-384fabf7.js.map → p-dd6f6ab7.js.map} +1 -1
  43. package/dist/components/{p-46578efa.js → p-e4ac17bf.js} +5 -3
  44. package/dist/components/p-e4ac17bf.js.map +1 -0
  45. package/dist/components/{p-0a57e57f.js → p-f579d773.js} +2 -2
  46. package/dist/components/{p-0a57e57f.js.map → p-f579d773.js.map} +1 -1
  47. package/dist/{esm/i18n-853fedb3.js → components/p-fb505488.js} +2 -2
  48. package/dist/components/{p-1d5eeac0.js.map → p-fb505488.js.map} +1 -1
  49. package/dist/components/pedido-finalizado.js +1 -1
  50. package/dist/components/phone-cancel-input.js +1 -1
  51. package/dist/components/phone-form.js +1 -1
  52. package/dist/components/phone-input-mask.js +1 -1
  53. package/dist/components/phone-input.js +1 -1
  54. package/dist/components/pin-form.js +1 -1
  55. package/dist/crmbonus-component-wake/crmbonus-component-wake.esm.js +1 -1
  56. package/dist/crmbonus-component-wake/crmbonus-component-wake.esm.js.map +1 -1
  57. package/dist/crmbonus-component-wake/p-0a853764.entry.js +2 -0
  58. package/dist/crmbonus-component-wake/p-0a853764.entry.js.map +1 -0
  59. package/dist/crmbonus-component-wake/{p-d0349daf.entry.js → p-3522a3e3.entry.js} +2 -2
  60. package/dist/crmbonus-component-wake/{p-c271c472.entry.js → p-4b5f8662.entry.js} +2 -2
  61. package/dist/crmbonus-component-wake/p-4b5f8662.entry.js.map +1 -0
  62. package/dist/crmbonus-component-wake/{p-9514339e.entry.js → p-72448900.entry.js} +2 -2
  63. package/dist/crmbonus-component-wake/{p-cc452df3.entry.js → p-c8054eaf.entry.js} +2 -2
  64. package/dist/crmbonus-component-wake/p-c86583a2.entry.js +2 -0
  65. package/dist/crmbonus-component-wake/p-c86583a2.entry.js.map +1 -0
  66. package/dist/crmbonus-component-wake/{p-af160cdc.entry.js → p-d277f2a9.entry.js} +2 -2
  67. package/dist/crmbonus-component-wake/p-d277f2a9.entry.js.map +1 -0
  68. package/dist/crmbonus-component-wake/{p-384fabf7.js → p-dd6f6ab7.js} +1 -1
  69. package/dist/crmbonus-component-wake/{p-384fabf7.js.map → p-dd6f6ab7.js.map} +1 -1
  70. package/dist/crmbonus-component-wake/{p-1d5eeac0.js → p-fb505488.js} +2 -2
  71. package/dist/crmbonus-component-wake/{p-1d5eeac0.js.map → p-fb505488.js.map} +1 -1
  72. package/dist/env.js +1 -1
  73. package/dist/env.js.map +1 -1
  74. package/dist/esm/countdown-timer_4.entry.js +3 -2
  75. package/dist/esm/countdown-timer_4.entry.js.map +1 -1
  76. package/dist/esm/crm-bonus-form.entry.js +1 -1
  77. package/dist/esm/crm-bonus.entry.js +2 -2
  78. package/dist/esm/crm-button.entry.js +2 -1
  79. package/dist/esm/crm-button.entry.js.map +1 -1
  80. package/dist/esm/crm-giftback-form.entry.js +7 -7
  81. package/dist/esm/crm-giftback-form.entry.js.map +1 -1
  82. package/dist/esm/crmbonus-component-wake.js +1 -1
  83. package/dist/esm/{crmbonus.service-a846150c.js → crmbonus.service-9cba7b49.js} +2 -2
  84. package/dist/esm/{crmbonus.service-a846150c.js.map → crmbonus.service-9cba7b49.js.map} +1 -1
  85. package/dist/{components/p-1d5eeac0.js → esm/i18n-887a3ef8.js} +2 -2
  86. package/dist/esm/{i18n-853fedb3.js.map → i18n-887a3ef8.js.map} +1 -1
  87. package/dist/esm/loader.js +1 -1
  88. package/dist/esm/pedido-finalizado.entry.js +1 -1
  89. package/dist/esm/phone-input-mask.entry.js +4 -1
  90. package/dist/esm/phone-input-mask.entry.js.map +1 -1
  91. package/dist/types/components/button/index.d.ts +1 -0
  92. package/dist/types/components.d.ts +2 -0
  93. package/package.json +1 -1
  94. package/dist/components/p-25f37293.js.map +0 -1
  95. package/dist/components/p-46578efa.js.map +0 -1
  96. package/dist/components/p-5dfa24e0.js.map +0 -1
  97. package/dist/components/p-be365312.js.map +0 -1
  98. package/dist/crmbonus-component-wake/p-5a8fa5b9.entry.js +0 -2
  99. package/dist/crmbonus-component-wake/p-5a8fa5b9.entry.js.map +0 -1
  100. package/dist/crmbonus-component-wake/p-5ede3b10.entry.js +0 -2
  101. package/dist/crmbonus-component-wake/p-5ede3b10.entry.js.map +0 -1
  102. package/dist/crmbonus-component-wake/p-af160cdc.entry.js.map +0 -1
  103. package/dist/crmbonus-component-wake/p-c271c472.entry.js.map +0 -1
  104. /package/dist/crmbonus-component-wake/{p-d0349daf.entry.js.map → p-3522a3e3.entry.js.map} +0 -0
  105. /package/dist/crmbonus-component-wake/{p-9514339e.entry.js.map → p-72448900.entry.js.map} +0 -0
  106. /package/dist/crmbonus-component-wake/{p-cc452df3.entry.js.map → p-c8054eaf.entry.js.map} +0 -0
@@ -1,2 +1,2 @@
1
- const t=t=>typeof t==="string";const e=()=>{let t;let e;const i=new Promise(((i,s)=>{t=i;e=s}));i.resolve=t;i.reject=e;return i};const i=t=>{if(t==null)return"";return""+t};const s=(t,e,i)=>{t.forEach((t=>{if(e[t])i[t]=e[t]}))};const n=/###/g;const r=t=>t&&t.indexOf("###")>-1?t.replace(n,"."):t;const o=e=>!e||t(e);const f=(e,i,s)=>{const n=!t(i)?i:i.split(".");let f=0;while(f<n.length-1){if(o(e))return{};const t=r(n[f]);if(!e[t]&&s)e[t]=new s;if(Object.prototype.hasOwnProperty.call(e,t)){e=e[t]}else{e={}}++f}if(o(e))return{};return{obj:e,k:r(n[f])}};const h=(t,e,i)=>{const{obj:s,k:n}=f(t,e,Object);if(s!==undefined||e.length===1){s[n]=i;return}let r=e[e.length-1];let o=e.slice(0,e.length-1);let h=f(t,o,Object);while(h.obj===undefined&&o.length){r=`${o[o.length-1]}.${r}`;o=o.slice(0,o.length-1);h=f(t,o,Object);if(h?.obj&&typeof h.obj[`${h.k}.${r}`]!=="undefined"){h.obj=undefined}}h.obj[`${h.k}.${r}`]=i};const a=(t,e,i,s)=>{const{obj:n,k:r}=f(t,e,Object);n[r]=n[r]||[];n[r].push(i)};const u=(t,e)=>{const{obj:i,k:s}=f(t,e);if(!i)return undefined;return i[s]};const l=(t,e,i)=>{const s=u(t,i);if(s!==undefined){return s}return u(e,i)};const c=(e,i,s)=>{for(const n in i){if(n!=="__proto__"&&n!=="constructor"){if(n in e){if(t(e[n])||e[n]instanceof String||t(i[n])||i[n]instanceof String){if(s)e[n]=i[n]}else{c(e[n],i[n],s)}}else{e[n]=i[n]}}}return e};const d=t=>t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var p={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const g=e=>{if(t(e)){return e.replace(/[&<>"'\/]/g,(t=>p[t]))}return e};class y{constructor(t){this.capacity=t;this.regExpMap=new Map;this.regExpQueue=[]}getRegExp(t){const e=this.regExpMap.get(t);if(e!==undefined){return e}const i=new RegExp(t);if(this.regExpQueue.length===this.capacity){this.regExpMap.delete(this.regExpQueue.shift())}this.regExpMap.set(t,i);this.regExpQueue.push(t);return i}}const m=[" ",",","?","!",";"];const $=new y(20);const b=(t,e,i)=>{e=e||"";i=i||"";const s=m.filter((t=>e.indexOf(t)<0&&i.indexOf(t)<0));if(s.length===0)return true;const n=$.getRegExp(`(${s.map((t=>t==="?"?"\\?":t)).join("|")})`);let r=!n.test(t);if(!r){const e=t.indexOf(i);if(e>0&&!n.test(t.substring(0,e))){r=true}}return r};const w=function(t,e){let i=arguments.length>2&&arguments[2]!==undefined?arguments[2]:".";if(!t)return undefined;if(t[e])return t[e];const s=e.split(i);let n=t;for(let t=0;t<s.length;){if(!n||typeof n!=="object"){return undefined}let e;let r="";for(let o=t;o<s.length;++o){if(o!==t){r+=i}r+=s[o];e=n[r];if(e!==undefined){if(["string","number","boolean"].indexOf(typeof e)>-1&&o<s.length-1){continue}t+=o-t+1;break}}n=e}return n};const x=t=>t?.replace("_","-");const v={type:"logger",log(t){this.output("log",t)},warn(t){this.output("warn",t)},error(t){this.output("error",t)},output(t,e){console?.[t]?.apply?.(console,e)}};class j{constructor(t){let e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};this.init(t,e)}init(t){let e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};this.prefix=e.prefix||"i18next:";this.logger=t||v;this.options=e;this.debug=e.debug}log(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++){e[i]=arguments[i]}return this.forward(e,"log","",true)}warn(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++){e[i]=arguments[i]}return this.forward(e,"warn","",true)}error(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++){e[i]=arguments[i]}return this.forward(e,"error","")}deprecate(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++){e[i]=arguments[i]}return this.forward(e,"warn","WARNING DEPRECATED: ",true)}forward(e,i,s,n){if(n&&!this.debug)return null;if(t(e[0]))e[0]=`${s}${this.prefix} ${e[0]}`;return this.logger[i](e)}create(t){return new j(this.logger,{...{prefix:`${this.prefix}:${t}:`},...this.options})}clone(t){t=t||this.options;t.prefix=t.prefix||this.prefix;return new j(this.logger,t)}}var O=new j;class S{constructor(){this.observers={}}on(t,e){t.split(" ").forEach((t=>{if(!this.observers[t])this.observers[t]=new Map;const i=this.observers[t].get(e)||0;this.observers[t].set(e,i+1)}));return this}off(t,e){if(!this.observers[t])return;if(!e){delete this.observers[t];return}this.observers[t].delete(e)}emit(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),s=1;s<e;s++){i[s-1]=arguments[s]}if(this.observers[t]){const e=Array.from(this.observers[t].entries());e.forEach((t=>{let[e,s]=t;for(let t=0;t<s;t++){e(...i)}}))}if(this.observers["*"]){const e=Array.from(this.observers["*"].entries());e.forEach((e=>{let[s,n]=e;for(let e=0;e<n;e++){s.apply(s,[t,...i])}}))}}}class k extends S{constructor(t){let e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{ns:["translation"],defaultNS:"translation"};super();this.data=t||{};this.options=e;if(this.options.keySeparator===undefined){this.options.keySeparator="."}if(this.options.ignoreJSONStructure===undefined){this.options.ignoreJSONStructure=true}}addNamespaces(t){if(this.options.ns.indexOf(t)<0){this.options.ns.push(t)}}removeNamespaces(t){const e=this.options.ns.indexOf(t);if(e>-1){this.options.ns.splice(e,1)}}getResource(e,i,s){let n=arguments.length>3&&arguments[3]!==undefined?arguments[3]:{};const r=n.keySeparator!==undefined?n.keySeparator:this.options.keySeparator;const o=n.ignoreJSONStructure!==undefined?n.ignoreJSONStructure:this.options.ignoreJSONStructure;let f;if(e.indexOf(".")>-1){f=e.split(".")}else{f=[e,i];if(s){if(Array.isArray(s)){f.push(...s)}else if(t(s)&&r){f.push(...s.split(r))}else{f.push(s)}}}const h=u(this.data,f);if(!h&&!i&&!s&&e.indexOf(".")>-1){e=f[0];i=f[1];s=f.slice(2).join(".")}if(h||!o||!t(s))return h;return w(this.data?.[e]?.[i],s,r)}addResource(t,e,i,s){let n=arguments.length>4&&arguments[4]!==undefined?arguments[4]:{silent:false};const r=n.keySeparator!==undefined?n.keySeparator:this.options.keySeparator;let o=[t,e];if(i)o=o.concat(r?i.split(r):i);if(t.indexOf(".")>-1){o=t.split(".");s=e;e=o[1]}this.addNamespaces(e);h(this.data,o,s);if(!n.silent)this.emit("added",t,e,i,s)}addResources(e,i,s){let n=arguments.length>3&&arguments[3]!==undefined?arguments[3]:{silent:false};for(const n in s){if(t(s[n])||Array.isArray(s[n]))this.addResource(e,i,n,s[n],{silent:true})}if(!n.silent)this.emit("added",e,i,s)}addResourceBundle(t,e,i,s,n){let r=arguments.length>5&&arguments[5]!==undefined?arguments[5]:{silent:false,skipCopy:false};let o=[t,e];if(t.indexOf(".")>-1){o=t.split(".");s=i;i=e;e=o[1]}this.addNamespaces(e);let f=u(this.data,o)||{};if(!r.skipCopy)i=JSON.parse(JSON.stringify(i));if(s){c(f,i,n)}else{f={...f,...i}}h(this.data,o,f);if(!r.silent)this.emit("added",t,e,i)}removeResourceBundle(t,e){if(this.hasResourceBundle(t,e)){delete this.data[t][e]}this.removeNamespaces(e);this.emit("removed",t,e)}hasResourceBundle(t,e){return this.getResource(t,e)!==undefined}getResourceBundle(t,e){if(!e)e=this.options.defaultNS;return this.getResource(t,e)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const e=this.getDataByLanguage(t);const i=e&&Object.keys(e)||[];return!!i.find((t=>e[t]&&Object.keys(e[t]).length>0))}toJSON(){return this.data}}var N={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,e,i,s,n){t.forEach((t=>{e=this.processors[t]?.process(e,i,s,n)??e}));return e}};const R={};class L extends S{constructor(t){let e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};super();s(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this);this.options=e;if(this.options.keySeparator===undefined){this.options.keySeparator="."}this.logger=O.create("translator")}changeLanguage(t){if(t)this.language=t}exists(t){let e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{interpolation:{}};if(t===undefined||t===null){return false}const i=this.resolve(t,e);return i?.res!==undefined}extractFromKey(e,i){let s=i.nsSeparator!==undefined?i.nsSeparator:this.options.nsSeparator;if(s===undefined)s=":";const n=i.keySeparator!==undefined?i.keySeparator:this.options.keySeparator;let r=i.ns||this.options.defaultNS||[];const o=s&&e.indexOf(s)>-1;const f=!this.options.userDefinedKeySeparator&&!i.keySeparator&&!this.options.userDefinedNsSeparator&&!i.nsSeparator&&!b(e,s,n);if(o&&!f){const i=e.match(this.interpolator.nestingRegexp);if(i&&i.length>0){return{key:e,namespaces:t(r)?[r]:r}}const o=e.split(s);if(s!==n||s===n&&this.options.ns.indexOf(o[0])>-1)r=o.shift();e=o.join(n)}return{key:e,namespaces:t(r)?[r]:r}}translate(e,i,s){if(typeof i!=="object"&&this.options.overloadTranslationOptionHandler){i=this.options.overloadTranslationOptionHandler(arguments)}if(typeof i==="object")i={...i};if(!i)i={};if(e===undefined||e===null)return"";if(!Array.isArray(e))e=[String(e)];const n=i.returnDetails!==undefined?i.returnDetails:this.options.returnDetails;const r=i.keySeparator!==undefined?i.keySeparator:this.options.keySeparator;const{key:o,namespaces:f}=this.extractFromKey(e[e.length-1],i);const h=f[f.length-1];const a=i.lng||this.language;const u=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(a?.toLowerCase()==="cimode"){if(u){const t=i.nsSeparator||this.options.nsSeparator;if(n){return{res:`${h}${t}${o}`,usedKey:o,exactUsedKey:o,usedLng:a,usedNS:h,usedParams:this.getUsedParamsDetails(i)}}return`${h}${t}${o}`}if(n){return{res:o,usedKey:o,exactUsedKey:o,usedLng:a,usedNS:h,usedParams:this.getUsedParamsDetails(i)}}return o}const l=this.resolve(e,i);let c=l?.res;const d=l?.usedKey||o;const p=l?.exactUsedKey||o;const g=Object.prototype.toString.apply(c);const y=["[object Number]","[object Function]","[object RegExp]"];const m=i.joinArrays!==undefined?i.joinArrays:this.options.joinArrays;const $=!this.i18nFormat||this.i18nFormat.handleAsObject;const b=!t(c)&&typeof c!=="boolean"&&typeof c!=="number";if($&&c&&b&&y.indexOf(g)<0&&!(t(m)&&Array.isArray(c))){if(!i.returnObjects&&!this.options.returnObjects){if(!this.options.returnedObjectHandler){this.logger.warn("accessing an object - but returnObjects options is not enabled!")}const t=this.options.returnedObjectHandler?this.options.returnedObjectHandler(d,c,{...i,ns:f}):`key '${o} (${this.language})' returned an object instead of string.`;if(n){l.res=t;l.usedParams=this.getUsedParamsDetails(i);return l}return t}if(r){const t=Array.isArray(c);const e=t?[]:{};const s=t?p:d;for(const t in c){if(Object.prototype.hasOwnProperty.call(c,t)){const n=`${s}${r}${t}`;e[t]=this.translate(n,{...i,...{joinArrays:false,ns:f}});if(e[t]===n)e[t]=c[t]}}c=e}}else if($&&t(m)&&Array.isArray(c)){c=c.join(m);if(c)c=this.extendTranslation(c,e,i,s)}else{let n=false;let f=false;const u=i.count!==undefined&&!t(i.count);const d=L.hasDefaultValue(i);const p=u?this.pluralResolver.getSuffix(a,i.count,i):"";const g=i.ordinal&&u?this.pluralResolver.getSuffix(a,i.count,{ordinal:false}):"";const y=u&&!i.ordinal&&i.count===0;const m=y&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${p}`]||i[`defaultValue${g}`]||i.defaultValue;if(!this.isValidLookup(c)&&d){n=true;c=m}if(!this.isValidLookup(c)){f=true;c=o}const $=i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey;const b=$&&f?undefined:c;const w=d&&m!==c&&this.options.updateMissing;if(f||n||w){this.logger.log(w?"updateKey":"missingKey",a,h,o,w?m:c);if(r){const t=this.resolve(o,{...i,keySeparator:false});if(t&&t.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 e=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo==="fallback"&&e&&e[0]){for(let i=0;i<e.length;i++){t.push(e[i])}}else if(this.options.saveMissingTo==="all"){t=this.languageUtils.toResolveHierarchy(i.lng||this.language)}else{t.push(i.lng||this.language)}const s=(t,e,s)=>{const n=d&&s!==c?s:b;if(this.options.missingKeyHandler){this.options.missingKeyHandler(t,h,e,n,w,i)}else if(this.backendConnector?.saveMissing){this.backendConnector.saveMissing(t,h,e,n,w,i)}this.emit("missingKey",t,h,e,c)};if(this.options.saveMissing){if(this.options.saveMissingPlurals&&u){t.forEach((t=>{const e=this.pluralResolver.getSuffixes(t,i);if(y&&i[`defaultValue${this.options.pluralSeparator}zero`]&&e.indexOf(`${this.options.pluralSeparator}zero`)<0){e.push(`${this.options.pluralSeparator}zero`)}e.forEach((e=>{s([t],o+e,i[`defaultValue${e}`]||m)}))}))}else{s(t,o,m)}}}c=this.extendTranslation(c,e,i,l,s);if(f&&c===o&&this.options.appendNamespaceToMissingKey)c=`${h}:${o}`;if((f||n)&&this.options.parseMissingKeyHandler){c=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${h}:${o}`:o,n?c:undefined)}}if(n){l.res=c;l.usedParams=this.getUsedParamsDetails(i);return l}return c}extendTranslation(e,i,s,n,r){var o=this;if(this.i18nFormat?.parse){e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...s},s.lng||this.language||n.usedLng,n.usedNS,n.usedKey,{resolved:n})}else if(!s.skipInterpolation){if(s.interpolation)this.interpolator.init({...s,...{interpolation:{...this.options.interpolation,...s.interpolation}}});const f=t(e)&&(s?.interpolation?.skipOnVariables!==undefined?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let h;if(f){const t=e.match(this.interpolator.nestingRegexp);h=t&&t.length}let a=s.replace&&!t(s.replace)?s.replace:s;if(this.options.interpolation.defaultVariables)a={...this.options.interpolation.defaultVariables,...a};e=this.interpolator.interpolate(e,a,s.lng||this.language||n.usedLng,s);if(f){const t=e.match(this.interpolator.nestingRegexp);const i=t&&t.length;if(h<i)s.nest=false}if(!s.lng&&n&&n.res)s.lng=this.language||n.usedLng;if(s.nest!==false)e=this.interpolator.nest(e,(function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++){e[n]=arguments[n]}if(r?.[0]===e[0]&&!s.context){o.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${i[0]}`);return null}return o.translate(...e,i)}),s);if(s.interpolation)this.interpolator.reset()}const f=s.postProcess||this.options.postProcess;const h=t(f)?[f]:f;if(e!==undefined&&e!==null&&h?.length&&s.applyPostProcessor!==false){e=N.handle(h,e,i,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...n,usedParams:this.getUsedParamsDetails(s)},...s}:s,this)}return e}resolve(e){let i=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};let s;let n;let r;let o;let f;if(t(e))e=[e];e.forEach((e=>{if(this.isValidLookup(s))return;const h=this.extractFromKey(e,i);const a=h.key;n=a;let u=h.namespaces;if(this.options.fallbackNS)u=u.concat(this.options.fallbackNS);const l=i.count!==undefined&&!t(i.count);const c=l&&!i.ordinal&&i.count===0;const d=i.context!==undefined&&(t(i.context)||typeof i.context==="number")&&i.context!=="";const p=i.lngs?i.lngs:this.languageUtils.toResolveHierarchy(i.lng||this.language,i.fallbackLng);u.forEach((t=>{if(this.isValidLookup(s))return;f=t;if(!R[`${p[0]}-${t}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(f)){R[`${p[0]}-${t}`]=true;this.logger.warn(`key "${n}" for languages "${p.join(", ")}" won't get resolved as namespace "${f}" 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!!!")}p.forEach((e=>{if(this.isValidLookup(s))return;o=e;const n=[a];if(this.i18nFormat?.addLookupKeys){this.i18nFormat.addLookupKeys(n,a,e,t,i)}else{let t;if(l)t=this.pluralResolver.getSuffix(e,i.count,i);const s=`${this.options.pluralSeparator}zero`;const r=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(l){n.push(a+t);if(i.ordinal&&t.indexOf(r)===0){n.push(a+t.replace(r,this.options.pluralSeparator))}if(c){n.push(a+s)}}if(d){const e=`${a}${this.options.contextSeparator}${i.context}`;n.push(e);if(l){n.push(e+t);if(i.ordinal&&t.indexOf(r)===0){n.push(e+t.replace(r,this.options.pluralSeparator))}if(c){n.push(e+s)}}}}let f;while(f=n.pop()){if(!this.isValidLookup(s)){r=f;s=this.getResource(e,t,f,i)}}}))}))}));return{res:s,usedKey:n,exactUsedKey:r,usedLng:o,usedNS:f}}isValidLookup(t){return t!==undefined&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,e,i){let s=arguments.length>3&&arguments[3]!==undefined?arguments[3]:{};if(this.i18nFormat?.getResource)return this.i18nFormat.getResource(t,e,i,s);return this.resourceStore.getResource(t,e,i,s)}getUsedParamsDetails(){let e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};const i=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"];const s=e.replace&&!t(e.replace);let n=s?e.replace:e;if(s&&typeof e.count!=="undefined"){n.count=e.count}if(this.options.interpolation.defaultVariables){n={...this.options.interpolation.defaultVariables,...n}}if(!s){n={...n};for(const t of i){delete n[t]}}return n}static hasDefaultValue(t){const e="defaultValue";for(const i in t){if(Object.prototype.hasOwnProperty.call(t,i)&&e===i.substring(0,e.length)&&undefined!==t[i]){return true}}return false}}class P{constructor(t){this.options=t;this.supportedLngs=this.options.supportedLngs||false;this.logger=O.create("languageUtils")}getScriptPartFromCode(t){t=x(t);if(!t||t.indexOf("-")<0)return null;const e=t.split("-");if(e.length===2)return null;e.pop();if(e[e.length-1].toLowerCase()==="x")return null;return this.formatLanguageCode(e.join("-"))}getLanguagePartFromCode(t){t=x(t);if(!t||t.indexOf("-")<0)return t;const e=t.split("-");return this.formatLanguageCode(e[0])}formatLanguageCode(e){if(t(e)&&e.indexOf("-")>-1){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch(t){}if(t&&this.options.lowerCaseLng){t=t.toLowerCase()}if(t)return t;if(this.options.lowerCaseLng){return e.toLowerCase()}return e}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(t){if(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs){t=this.getLanguagePartFromCode(t)}return!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let e;t.forEach((t=>{if(e)return;const i=this.formatLanguageCode(t);if(!this.options.supportedLngs||this.isSupportedCode(i))e=i}));if(!e&&this.options.supportedLngs){t.forEach((t=>{if(e)return;const i=this.getLanguagePartFromCode(t);if(this.isSupportedCode(i))return e=i;e=this.options.supportedLngs.find((t=>{if(t===i)return t;if(t.indexOf("-")<0&&i.indexOf("-")<0)return;if(t.indexOf("-")>0&&i.indexOf("-")<0&&t.substring(0,t.indexOf("-"))===i)return t;if(t.indexOf(i)===0&&i.length>1)return t}))}))}if(!e)e=this.getFallbackCodes(this.options.fallbackLng)[0];return e}getFallbackCodes(e,i){if(!e)return[];if(typeof e==="function")e=e(i);if(t(e))e=[e];if(Array.isArray(e))return e;if(!i)return e.default||[];let s=e[i];if(!s)s=e[this.getScriptPartFromCode(i)];if(!s)s=e[this.formatLanguageCode(i)];if(!s)s=e[this.getLanguagePartFromCode(i)];if(!s)s=e.default;return s||[]}toResolveHierarchy(e,i){const s=this.getFallbackCodes(i||this.options.fallbackLng||[],e);const n=[];const r=t=>{if(!t)return;if(this.isSupportedCode(t)){n.push(t)}else{this.logger.warn(`rejecting language code not found in supportedLngs: ${t}`)}};if(t(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)){if(this.options.load!=="languageOnly")r(this.formatLanguageCode(e));if(this.options.load!=="languageOnly"&&this.options.load!=="currentOnly")r(this.getScriptPartFromCode(e));if(this.options.load!=="currentOnly")r(this.getLanguagePartFromCode(e))}else if(t(e)){r(this.formatLanguageCode(e))}s.forEach((t=>{if(n.indexOf(t)<0)r(this.formatLanguageCode(t))}));return n}}const A={zero:0,one:1,two:2,few:3,many:4,other:5};const C={select:t=>t===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class E{constructor(t){let e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};this.languageUtils=t;this.options=e;this.logger=O.create("pluralResolver");this.pluralRulesCache={}}addRule(t,e){this.rules[t]=e}clearCache(){this.pluralRulesCache={}}getRule(t){let e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};const i=x(t==="dev"?"en":t);const s=e.ordinal?"ordinal":"cardinal";const 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(i){if(!Intl){this.logger.error("No Intl support, please use an Intl polyfill!");return C}if(!t.match(/-|_/))return C;const s=this.languageUtils.getLanguagePartFromCode(t);r=this.getRule(s,e)}this.pluralRulesCache[n]=r;return r}needsPlural(t){let e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};let i=this.getRule(t,e);if(!i)i=this.getRule("dev",e);return i?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(t,e){let i=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};return this.getSuffixes(t,i).map((t=>`${e}${t}`))}getSuffixes(t){let e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};let i=this.getRule(t,e);if(!i)i=this.getRule("dev",e);if(!i)return[];return i.resolvedOptions().pluralCategories.sort(((t,e)=>A[t]-A[e])).map((t=>`${this.options.prepend}${e.ordinal?`ordinal${this.options.prepend}`:""}${t}`))}getSuffix(t,e){let i=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};const s=this.getRule(t,i);if(s){return`${this.options.prepend}${i.ordinal?`ordinal${this.options.prepend}`:""}${s.select(e)}`}this.logger.warn(`no plural rule found for: ${t}`);return this.getSuffix("dev",e,i)}}const I=function(e,i,s){let n=arguments.length>3&&arguments[3]!==undefined?arguments[3]:".";let r=arguments.length>4&&arguments[4]!==undefined?arguments[4]:true;let o=l(e,i,s);if(!o&&r&&t(s)){o=w(e,s,n);if(o===undefined)o=w(i,s,n)}return o};const V=t=>t.replace(/\$/g,"$$$$");class T{constructor(){let t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};this.logger=O.create("interpolator");this.options=t;this.format=t?.interpolation?.format||(t=>t);this.init(t)}init(){let t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};if(!t.interpolation)t.interpolation={escapeValue:true};const{escape:e,escapeValue:i,useRawValueToEscape:s,prefix:n,prefixEscaped:r,suffix:o,suffixEscaped:f,formatSeparator:h,unescapeSuffix:a,unescapePrefix:u,nestingPrefix:l,nestingPrefixEscaped:c,nestingSuffix:p,nestingSuffixEscaped:y,nestingOptionsSeparator:m,maxReplaces:$,alwaysFormat:b}=t.interpolation;this.escape=e!==undefined?e:g;this.escapeValue=i!==undefined?i:true;this.useRawValueToEscape=s!==undefined?s:false;this.prefix=n?d(n):r||"{{";this.suffix=o?d(o):f||"}}";this.formatSeparator=h||",";this.unescapePrefix=a?"":u||"-";this.unescapeSuffix=this.unescapePrefix?"":a||"";this.nestingPrefix=l?d(l):c||d("$t(");this.nestingSuffix=p?d(p):y||d(")");this.nestingOptionsSeparator=m||",";this.maxReplaces=$||1e3;this.alwaysFormat=b!==undefined?b:false;this.resetRegExp()}reset(){if(this.options)this.init(this.options)}resetRegExp(){const t=(t,e)=>{if(t?.source===e){t.lastIndex=0;return t}return new RegExp(e,"g")};this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`);this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`);this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(e,s,n,r){let o;let f;let h;const a=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};const u=t=>{if(t.indexOf(this.formatSeparator)<0){const e=I(s,a,t,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(e,undefined,n,{...r,...s,interpolationkey:t}):e}const e=t.split(this.formatSeparator);const i=e.shift().trim();const o=e.join(this.formatSeparator).trim();return this.format(I(s,a,i,this.options.keySeparator,this.options.ignoreJSONStructure),o,n,{...r,...s,interpolationkey:i})};this.resetRegExp();const l=r?.missingInterpolationHandler||this.options.missingInterpolationHandler;const c=r?.interpolation?.skipOnVariables!==undefined?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;const d=[{regex:this.regexpUnescape,safeValue:t=>V(t)},{regex:this.regexp,safeValue:t=>this.escapeValue?V(this.escape(t)):V(t)}];d.forEach((s=>{h=0;while(o=s.regex.exec(e)){const n=o[1].trim();f=u(n);if(f===undefined){if(typeof l==="function"){const i=l(e,o,r);f=t(i)?i:""}else if(r&&Object.prototype.hasOwnProperty.call(r,n)){f=""}else if(c){f=o[0];continue}else{this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`);f=""}}else if(!t(f)&&!this.useRawValueToEscape){f=i(f)}const a=s.safeValue(f);e=e.replace(o[0],a);if(c){s.regex.lastIndex+=f.length;s.regex.lastIndex-=o[0].length}else{s.regex.lastIndex=0}h++;if(h>=this.maxReplaces){break}}}));return e}nest(e,s){let n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};let r;let o;let f;const h=(t,e)=>{const i=this.nestingOptionsSeparator;if(t.indexOf(i)<0)return t;const s=t.split(new RegExp(`${i}[ ]*{`));let n=`{${s[1]}`;t=s[0];n=this.interpolate(n,f);const r=n.match(/'/g);const o=n.match(/"/g);if((r?.length??0)%2===0&&!o||o.length%2!==0){n=n.replace(/'/g,'"')}try{f=JSON.parse(n);if(e)f={...e,...f}}catch(e){this.logger.warn(`failed parsing options string in nesting for key ${t}`,e);return`${t}${i}${n}`}if(f.defaultValue&&f.defaultValue.indexOf(this.prefix)>-1)delete f.defaultValue;return t};while(r=this.nestingRegexp.exec(e)){let a=[];f={...n};f=f.replace&&!t(f.replace)?f.replace:f;f.applyPostProcessor=false;delete f.defaultValue;let u=false;if(r[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(r[1])){const t=r[1].split(this.formatSeparator).map((t=>t.trim()));r[1]=t.shift();a=t;u=true}o=s(h.call(this,r[1].trim(),f),f);if(o&&r[0]===e&&!t(o))return o;if(!t(o))o=i(o);if(!o){this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`);o=""}if(u){o=a.reduce(((t,e)=>this.format(t,e,n.lng,{...n,interpolationkey:r[1].trim()})),o.trim())}e=e.replace(r[0],o);this.regexp.lastIndex=0}return e}}const K=t=>{let e=t.toLowerCase().trim();const i={};if(t.indexOf("(")>-1){const s=t.split("(");e=s[0].toLowerCase().trim();const n=s[1].substring(0,s[1].length-1);if(e==="currency"&&n.indexOf(":")<0){if(!i.currency)i.currency=n.trim()}else if(e==="relativetime"&&n.indexOf(":")<0){if(!i.range)i.range=n.trim()}else{const t=n.split(";");t.forEach((t=>{if(t){const[e,...s]=t.split(":");const n=s.join(":").trim().replace(/^'+|'+$/g,"");const r=e.trim();if(!i[r])i[r]=n;if(n==="false")i[r]=false;if(n==="true")i[r]=true;if(!isNaN(n))i[r]=parseInt(n,10)}}))}}return{formatName:e,formatOptions:i}};const z=t=>{const e={};return(i,s,n)=>{let r=n;if(n&&n.interpolationkey&&n.formatParams&&n.formatParams[n.interpolationkey]&&n[n.interpolationkey]){r={...r,[n.interpolationkey]:undefined}}const o=s+JSON.stringify(r);let f=e[o];if(!f){f=t(x(s),n);e[o]=f}return f(i)}};class B{constructor(){let t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};this.logger=O.create("formatter");this.options=t;this.formats={number:z(((t,e)=>{const i=new Intl.NumberFormat(t,{...e});return t=>i.format(t)})),currency:z(((t,e)=>{const i=new Intl.NumberFormat(t,{...e,style:"currency"});return t=>i.format(t)})),datetime:z(((t,e)=>{const i=new Intl.DateTimeFormat(t,{...e});return t=>i.format(t)})),relativetime:z(((t,e)=>{const i=new Intl.RelativeTimeFormat(t,{...e});return t=>i.format(t,e.range||"day")})),list:z(((t,e)=>{const i=new Intl.ListFormat(t,{...e});return t=>i.format(t)}))};this.init(t)}init(t){let e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{interpolation:{}};this.formatSeparator=e.interpolation.formatSeparator||","}add(t,e){this.formats[t.toLowerCase().trim()]=e}addCached(t,e){this.formats[t.toLowerCase().trim()]=z(e)}format(t,e,i){let s=arguments.length>3&&arguments[3]!==undefined?arguments[3]:{};const n=e.split(this.formatSeparator);if(n.length>1&&n[0].indexOf("(")>1&&n[0].indexOf(")")<0&&n.find((t=>t.indexOf(")")>-1))){const t=n.findIndex((t=>t.indexOf(")")>-1));n[0]=[n[0],...n.splice(1,t)].join(this.formatSeparator)}const r=n.reduce(((t,e)=>{const{formatName:n,formatOptions:r}=K(e);if(this.formats[n]){let e=t;try{const o=s?.formatParams?.[s.interpolationkey]||{};const f=o.locale||o.lng||s.locale||s.lng||i;e=this.formats[n](t,f,{...r,...s,...o})}catch(t){this.logger.warn(t)}return e}else{this.logger.warn(`there was no format function for ${n}`)}return t}),t);return r}}const M=(t,e)=>{if(t.pending[e]!==undefined){delete t.pending[e];t.pendingCount--}};class D extends S{constructor(t,e,i){let s=arguments.length>3&&arguments[3]!==undefined?arguments[3]:{};super();this.backend=t;this.store=e;this.services=i;this.languageUtils=i.languageUtils;this.options=s;this.logger=O.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(t,e,i,s){const n={};const r={};const o={};const f={};t.forEach((t=>{let s=true;e.forEach((e=>{const o=`${t}|${e}`;if(!i.reload&&this.store.hasResourceBundle(t,e)){this.state[o]=2}else if(this.state[o]<0);else if(this.state[o]===1){if(r[o]===undefined)r[o]=true}else{this.state[o]=1;s=false;if(r[o]===undefined)r[o]=true;if(n[o]===undefined)n[o]=true;if(f[e]===undefined)f[e]=true}}));if(!s)o[t]=true}));if(Object.keys(n).length||Object.keys(r).length){this.queue.push({pending:r,pendingCount:Object.keys(r).length,loaded:{},errors:[],callback:s})}return{toLoad:Object.keys(n),pending:Object.keys(r),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(f)}}loaded(t,e,i){const s=t.split("|");const n=s[0];const r=s[1];if(e)this.emit("failedLoading",n,r,e);if(!e&&i){this.store.addResourceBundle(n,r,i,undefined,undefined,{skipCopy:true})}this.state[t]=e?-1:2;if(e&&i)this.state[t]=0;const o={};this.queue.forEach((i=>{a(i.loaded,[n],r);M(i,t);if(e)i.errors.push(e);if(i.pendingCount===0&&!i.done){Object.keys(i.loaded).forEach((t=>{if(!o[t])o[t]={};const e=i.loaded[t];if(e.length){e.forEach((e=>{if(o[t][e]===undefined)o[t][e]=true}))}}));i.done=true;if(i.errors.length){i.callback(i.errors)}else{i.callback()}}}));this.emit("loaded",o);this.queue=this.queue.filter((t=>!t.done))}read(t,e,i){let s=arguments.length>3&&arguments[3]!==undefined?arguments[3]:0;let n=arguments.length>4&&arguments[4]!==undefined?arguments[4]:this.retryTimeout;let r=arguments.length>5?arguments[5]:undefined;if(!t.length)return r(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:e,fcName:i,tried:s,wait:n,callback:r});return}this.readingCalls++;const o=(o,f)=>{this.readingCalls--;if(this.waitingReads.length>0){const t=this.waitingReads.shift();this.read(t.lng,t.ns,t.fcName,t.tried,t.wait,t.callback)}if(o&&f&&s<this.maxRetries){setTimeout((()=>{this.read.call(this,t,e,i,s+1,n*2,r)}),n);return}r(o,f)};const f=this.backend[i].bind(this.backend);if(f.length===2){try{const i=f(t,e);if(i&&typeof i.then==="function"){i.then((t=>o(null,t))).catch(o)}else{o(null,i)}}catch(t){o(t)}return}return f(t,e,o)}prepareLoading(e,i){let s=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};let n=arguments.length>3?arguments[3]:undefined;if(!this.backend){this.logger.warn("No backend was added via i18next.use. Will not load resources.");return n&&n()}if(t(e))e=this.languageUtils.toResolveHierarchy(e);if(t(i))i=[i];const r=this.queueLoad(e,i,s,n);if(!r.toLoad.length){if(!r.pending.length)n();return null}r.toLoad.forEach((t=>{this.loadOne(t)}))}load(t,e,i){this.prepareLoading(t,e,{},i)}reload(t,e,i){this.prepareLoading(t,e,{reload:true},i)}loadOne(t){let e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:"";const i=t.split("|");const s=i[0];const n=i[1];this.read(s,n,"read",undefined,undefined,((i,r)=>{if(i)this.logger.warn(`${e}loading namespace ${n} for language ${s} failed`,i);if(!i&&r)this.logger.log(`${e}loaded namespace ${n} for language ${s}`,r);this.loaded(t,i,r)}))}saveMissing(t,e,i,s,n){let r=arguments.length>5&&arguments[5]!==undefined?arguments[5]:{};let o=arguments.length>6&&arguments[6]!==undefined?arguments[6]:()=>{};if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(e)){this.logger.warn(`did not save key "${i}" as the namespace "${e}" 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===undefined||i===null||i==="")return;if(this.backend?.create){const f={...r,isUpdate:n};const h=this.backend.create.bind(this.backend);if(h.length<6){try{let n;if(h.length===5){n=h(t,e,i,s,f)}else{n=h(t,e,i,s)}if(n&&typeof n.then==="function"){n.then((t=>o(null,t))).catch(o)}else{o(null,n)}}catch(t){o(t)}}else{h(t,e,i,s,o,f)}}if(!t||!t[0])return;this.store.addResource(t[0],e,i,s)}}const F=()=>({debug:false,initAsync:true,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:false,supportedLngs:false,nonExplicitSupportedLngs:false,load:"all",preload:false,simplifyPluralSuffix:true,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:false,saveMissing:false,updateMissing:false,saveMissingTo:"fallback",saveMissingPlurals:true,missingKeyHandler:false,missingInterpolationHandler:false,postProcess:false,postProcessPassResolved:false,returnNull:false,returnEmptyString:true,returnObjects:false,joinArrays:false,returnedObjectHandler:false,parseMissingKeyHandler:false,appendNamespaceToMissingKey:false,appendNamespaceToCIMode:false,overloadTranslationOptionHandler:e=>{let i={};if(typeof e[1]==="object")i=e[1];if(t(e[1]))i.defaultValue=e[1];if(t(e[2]))i.tDescription=e[2];if(typeof e[2]==="object"||typeof e[3]==="object"){const t=e[3]||e[2];Object.keys(t).forEach((e=>{i[e]=t[e]}))}return i},interpolation:{escapeValue:true,format:t=>t,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:true}});const _=e=>{if(t(e.ns))e.ns=[e.ns];if(t(e.fallbackLng))e.fallbackLng=[e.fallbackLng];if(t(e.fallbackNS))e.fallbackNS=[e.fallbackNS];if(e.supportedLngs?.indexOf?.("cimode")<0){e.supportedLngs=e.supportedLngs.concat(["cimode"])}if(typeof e.initImmediate==="boolean")e.initAsync=e.initImmediate;return e};const J=()=>{};const U=t=>{const e=Object.getOwnPropertyNames(Object.getPrototypeOf(t));e.forEach((e=>{if(typeof t[e]==="function"){t[e]=t[e].bind(t)}}))};class W extends S{constructor(){let t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};let e=arguments.length>1?arguments[1]:undefined;super();this.options=_(t);this.services={};this.logger=O;this.modules={external:[]};U(this);if(e&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync){this.init(t,e);return this}setTimeout((()=>{this.init(t,e)}),0)}}init(){var i=this;let s=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};let n=arguments.length>1?arguments[1]:undefined;this.isInitializing=true;if(typeof s==="function"){n=s;s={}}if(!s.defaultNS&&s.defaultNS!==false&&s.ns){if(t(s.ns)){s.defaultNS=s.ns}else if(s.ns.indexOf("translation")<0){s.defaultNS=s.ns[0]}}const r=F();this.options={...r,...this.options,..._(s)};this.options.interpolation={...r.interpolation,...this.options.interpolation};if(s.keySeparator!==undefined){this.options.userDefinedKeySeparator=s.keySeparator}if(s.nsSeparator!==undefined){this.options.userDefinedNsSeparator=s.nsSeparator}const o=t=>{if(!t)return null;if(typeof t==="function")return new t;return t};if(!this.options.isClone){if(this.modules.logger){O.init(o(this.modules.logger),this.options)}else{O.init(null,this.options)}let t;if(this.modules.formatter){t=this.modules.formatter}else{t=B}const e=new P(this.options);this.store=new k(this.options.resources,this.options);const s=this.services;s.logger=O;s.resourceStore=this.store;s.languageUtils=e;s.pluralResolver=new E(e,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix});if(t&&(!this.options.interpolation.format||this.options.interpolation.format===r.interpolation.format)){s.formatter=o(t);s.formatter.init(s,this.options);this.options.interpolation.format=s.formatter.format.bind(s.formatter)}s.interpolator=new T(this.options);s.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)};s.backendConnector=new D(o(this.modules.backend),s.resourceStore,s,this.options);s.backendConnector.on("*",(function(t){for(var e=arguments.length,s=new Array(e>1?e-1:0),n=1;n<e;n++){s[n-1]=arguments[n]}i.emit(t,...s)}));if(this.modules.languageDetector){s.languageDetector=o(this.modules.languageDetector);if(s.languageDetector.init)s.languageDetector.init(s,this.options.detection,this.options)}if(this.modules.i18nFormat){s.i18nFormat=o(this.modules.i18nFormat);if(s.i18nFormat.init)s.i18nFormat.init(this)}this.translator=new L(this.services,this.options);this.translator.on("*",(function(t){for(var e=arguments.length,s=new Array(e>1?e-1:0),n=1;n<e;n++){s[n-1]=arguments[n]}i.emit(t,...s)}));this.modules.external.forEach((t=>{if(t.init)t.init(this)}))}this.format=this.options.interpolation.format;if(!n)n=J;if(this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const t=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);if(t.length>0&&t[0]!=="dev")this.options.lng=t[0]}if(!this.services.languageDetector&&!this.options.lng){this.logger.warn("init: no languageDetector is used and no lng is defined")}const f=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];f.forEach((t=>{this[t]=function(){return i.store[t](...arguments)}}));const h=["addResource","addResources","addResourceBundle","removeResourceBundle"];h.forEach((t=>{this[t]=function(){i.store[t](...arguments);return i}}));const a=e();const u=()=>{const t=(t,e)=>{this.isInitializing=false;if(this.isInitialized&&!this.initializedStoreOnce)this.logger.warn("init: i18next is already initialized. You should call init just once!");this.isInitialized=true;if(!this.options.isClone)this.logger.log("initialized",this.options);this.emit("initialized",this.options);a.resolve(e);n(t,e)};if(this.languages&&!this.isInitialized)return t(null,this.t.bind(this));this.changeLanguage(this.options.lng,t)};if(this.options.resources||!this.options.initAsync){u()}else{setTimeout(u,0)}return a}loadResources(e){let i=arguments.length>1&&arguments[1]!==undefined?arguments[1]:J;let s=i;const n=t(e)?e:this.language;if(typeof e==="function")s=e;if(!this.options.resources||this.options.partialBundledLanguages){if(n?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return s();const t=[];const e=e=>{if(!e)return;if(e==="cimode")return;const i=this.services.languageUtils.toResolveHierarchy(e);i.forEach((e=>{if(e==="cimode")return;if(t.indexOf(e)<0)t.push(e)}))};if(!n){const t=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);t.forEach((t=>e(t)))}else{e(n)}this.options.preload?.forEach?.((t=>e(t)));this.services.backendConnector.load(t,this.options.ns,(t=>{if(!t&&!this.resolvedLanguage&&this.language)this.setResolvedLanguage(this.language);s(t)}))}else{s(null)}}reloadResources(t,i,s){const n=e();if(typeof t==="function"){s=t;t=undefined}if(typeof i==="function"){s=i;i=undefined}if(!t)t=this.languages;if(!i)i=this.options.ns;if(!s)s=J;this.services.backendConnector.reload(t,i,(t=>{n.resolve();s(t)}));return n}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");if(t.type==="backend"){this.modules.backend=t}if(t.type==="logger"||t.log&&t.warn&&t.error){this.modules.logger=t}if(t.type==="languageDetector"){this.modules.languageDetector=t}if(t.type==="i18nFormat"){this.modules.i18nFormat=t}if(t.type==="postProcessor"){N.addPostProcessor(t)}if(t.type==="formatter"){this.modules.formatter=t}if(t.type==="3rdParty"){this.modules.external.push(t)}return this}setResolvedLanguage(t){if(!t||!this.languages)return;if(["cimode","dev"].indexOf(t)>-1)return;for(let t=0;t<this.languages.length;t++){const e=this.languages[t];if(["cimode","dev"].indexOf(e)>-1)continue;if(this.store.hasLanguageSomeTranslations(e)){this.resolvedLanguage=e;break}}}changeLanguage(i,s){var n=this;this.isLanguageChangingTo=i;const r=e();this.emit("languageChanging",i);const o=t=>{this.language=t;this.languages=this.services.languageUtils.toResolveHierarchy(t);this.resolvedLanguage=undefined;this.setResolvedLanguage(t)};const f=(t,e)=>{if(e){o(e);this.translator.changeLanguage(e);this.isLanguageChangingTo=undefined;this.emit("languageChanged",e);this.logger.log("languageChanged",e)}else{this.isLanguageChangingTo=undefined}r.resolve((function(){return n.t(...arguments)}));if(s)s(t,(function(){return n.t(...arguments)}))};const h=e=>{if(!i&&!e&&this.services.languageDetector)e=[];const s=t(e)?e:this.services.languageUtils.getBestMatchFromCodes(e);if(s){if(!this.language){o(s)}if(!this.translator.language)this.translator.changeLanguage(s);this.services.languageDetector?.cacheUserLanguage?.(s)}this.loadResources(s,(t=>{f(t,s)}))};if(!i&&this.services.languageDetector&&!this.services.languageDetector.async){h(this.services.languageDetector.detect())}else if(!i&&this.services.languageDetector&&this.services.languageDetector.async){if(this.services.languageDetector.detect.length===0){this.services.languageDetector.detect().then(h)}else{this.services.languageDetector.detect(h)}}else{h(i)}return r}getFixedT(e,i,s){var n=this;const r=function(t,e){let i;if(typeof e!=="object"){for(var o=arguments.length,f=new Array(o>2?o-2:0),h=2;h<o;h++){f[h-2]=arguments[h]}i=n.options.overloadTranslationOptionHandler([t,e].concat(f))}else{i={...e}}i.lng=i.lng||r.lng;i.lngs=i.lngs||r.lngs;i.ns=i.ns||r.ns;if(i.keyPrefix!=="")i.keyPrefix=i.keyPrefix||s||r.keyPrefix;const a=n.options.keySeparator||".";let u;if(i.keyPrefix&&Array.isArray(t)){u=t.map((t=>`${i.keyPrefix}${a}${t}`))}else{u=i.keyPrefix?`${i.keyPrefix}${a}${t}`:t}return n.t(u,i)};if(t(e)){r.lng=e}else{r.lngs=e}r.ns=i;r.keyPrefix=s;return r}t(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++){e[i]=arguments[i]}return this.translator?.translate(...e)}exists(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++){e[i]=arguments[i]}return this.translator?.exists(...e)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t){let e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};if(!this.isInitialized){this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages);return false}if(!this.languages||!this.languages.length){this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages);return false}const i=e.lng||this.resolvedLanguage||this.languages[0];const s=this.options?this.options.fallbackLng:false;const n=this.languages[this.languages.length-1];if(i.toLowerCase()==="cimode")return true;const r=(t,e)=>{const i=this.services.backendConnector.state[`${t}|${e}`];return i===-1||i===0||i===2};if(e.precheck){const t=e.precheck(this,r);if(t!==undefined)return t}if(this.hasResourceBundle(i,t))return true;if(!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages)return true;if(r(i,t)&&(!s||r(n,t)))return true;return false}loadNamespaces(i,s){const n=e();if(!this.options.ns){if(s)s();return Promise.resolve()}if(t(i))i=[i];i.forEach((t=>{if(this.options.ns.indexOf(t)<0)this.options.ns.push(t)}));this.loadResources((t=>{n.resolve();if(s)s(t)}));return n}loadLanguages(i,s){const n=e();if(t(i))i=[i];const r=this.options.preload||[];const o=i.filter((t=>r.indexOf(t)<0&&this.services.languageUtils.isSupportedCode(t)));if(!o.length){if(s)s();return Promise.resolve()}this.options.preload=r.concat(o);this.loadResources((t=>{n.resolve();if(s)s(t)}));return n}dir(t){if(!t)t=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language);if(!t)return"rtl";const 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"];const i=this.services?.languageUtils||new P(F());return e.indexOf(i.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};let e=arguments.length>1?arguments[1]:undefined;return new W(t,e)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};let e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:J;const i=t.forkResourceStore;if(i)delete t.forkResourceStore;const s={...this.options,...t,...{isClone:true}};const n=new W(s);if(t.debug!==undefined||t.prefix!==undefined){n.logger=n.logger.clone(t)}const r=["store","services","language"];r.forEach((t=>{n[t]=this[t]}));n.services={...this.services};n.services.utils={hasLoadedNamespace:n.hasLoadedNamespace.bind(n)};if(i){n.store=new k(this.store.data,s);n.services.resourceStore=n.store}n.translator=new L(n.services,s);n.translator.on("*",(function(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),s=1;s<e;s++){i[s-1]=arguments[s]}n.emit(t,...i)}));n.init(s,e);n.translator.options=s;n.translator.backendConnector.services.utils={hasLoadedNamespace:n.hasLoadedNamespace.bind(n)};return n}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const H=W.createInstance();H.createInstance=W.createInstance;H.init({lng:"pt",fallbackLng:"en",resources:{en:{translation:{welcome:"Welcome",description:"This is an example","pin-sutitle":"Enter the 4-digit code sent via SMS to the number"}},pt:{translation:{welcome:"Bem-vindo",description:"Este é um exemplo","pin-sutitle":"Digite o código de 4 dígitos enviado por SMS ao número",giftDescription:"Você tem até <strong>R$ {{amount}}</strong> de {{custom_name}}",noGiftback:"Você não possui Giftback disponível para essa compra."}}}});export{H as i};
2
- //# sourceMappingURL=p-1d5eeac0.js.map
1
+ const t=t=>typeof t==="string";const e=()=>{let t;let e;const i=new Promise(((i,s)=>{t=i;e=s}));i.resolve=t;i.reject=e;return i};const i=t=>{if(t==null)return"";return""+t};const s=(t,e,i)=>{t.forEach((t=>{if(e[t])i[t]=e[t]}))};const n=/###/g;const r=t=>t&&t.indexOf("###")>-1?t.replace(n,"."):t;const o=e=>!e||t(e);const f=(e,i,s)=>{const n=!t(i)?i:i.split(".");let f=0;while(f<n.length-1){if(o(e))return{};const t=r(n[f]);if(!e[t]&&s)e[t]=new s;if(Object.prototype.hasOwnProperty.call(e,t)){e=e[t]}else{e={}}++f}if(o(e))return{};return{obj:e,k:r(n[f])}};const h=(t,e,i)=>{const{obj:s,k:n}=f(t,e,Object);if(s!==undefined||e.length===1){s[n]=i;return}let r=e[e.length-1];let o=e.slice(0,e.length-1);let h=f(t,o,Object);while(h.obj===undefined&&o.length){r=`${o[o.length-1]}.${r}`;o=o.slice(0,o.length-1);h=f(t,o,Object);if(h?.obj&&typeof h.obj[`${h.k}.${r}`]!=="undefined"){h.obj=undefined}}h.obj[`${h.k}.${r}`]=i};const a=(t,e,i,s)=>{const{obj:n,k:r}=f(t,e,Object);n[r]=n[r]||[];n[r].push(i)};const u=(t,e)=>{const{obj:i,k:s}=f(t,e);if(!i)return undefined;return i[s]};const l=(t,e,i)=>{const s=u(t,i);if(s!==undefined){return s}return u(e,i)};const c=(e,i,s)=>{for(const n in i){if(n!=="__proto__"&&n!=="constructor"){if(n in e){if(t(e[n])||e[n]instanceof String||t(i[n])||i[n]instanceof String){if(s)e[n]=i[n]}else{c(e[n],i[n],s)}}else{e[n]=i[n]}}}return e};const d=t=>t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var p={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const g=e=>{if(t(e)){return e.replace(/[&<>"'\/]/g,(t=>p[t]))}return e};class y{constructor(t){this.capacity=t;this.regExpMap=new Map;this.regExpQueue=[]}getRegExp(t){const e=this.regExpMap.get(t);if(e!==undefined){return e}const i=new RegExp(t);if(this.regExpQueue.length===this.capacity){this.regExpMap.delete(this.regExpQueue.shift())}this.regExpMap.set(t,i);this.regExpQueue.push(t);return i}}const m=[" ",",","?","!",";"];const $=new y(20);const b=(t,e,i)=>{e=e||"";i=i||"";const s=m.filter((t=>e.indexOf(t)<0&&i.indexOf(t)<0));if(s.length===0)return true;const n=$.getRegExp(`(${s.map((t=>t==="?"?"\\?":t)).join("|")})`);let r=!n.test(t);if(!r){const e=t.indexOf(i);if(e>0&&!n.test(t.substring(0,e))){r=true}}return r};const w=function(t,e){let i=arguments.length>2&&arguments[2]!==undefined?arguments[2]:".";if(!t)return undefined;if(t[e])return t[e];const s=e.split(i);let n=t;for(let t=0;t<s.length;){if(!n||typeof n!=="object"){return undefined}let e;let r="";for(let o=t;o<s.length;++o){if(o!==t){r+=i}r+=s[o];e=n[r];if(e!==undefined){if(["string","number","boolean"].indexOf(typeof e)>-1&&o<s.length-1){continue}t+=o-t+1;break}}n=e}return n};const x=t=>t?.replace("_","-");const v={type:"logger",log(t){this.output("log",t)},warn(t){this.output("warn",t)},error(t){this.output("error",t)},output(t,e){console?.[t]?.apply?.(console,e)}};class j{constructor(t){let e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};this.init(t,e)}init(t){let e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};this.prefix=e.prefix||"i18next:";this.logger=t||v;this.options=e;this.debug=e.debug}log(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++){e[i]=arguments[i]}return this.forward(e,"log","",true)}warn(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++){e[i]=arguments[i]}return this.forward(e,"warn","",true)}error(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++){e[i]=arguments[i]}return this.forward(e,"error","")}deprecate(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++){e[i]=arguments[i]}return this.forward(e,"warn","WARNING DEPRECATED: ",true)}forward(e,i,s,n){if(n&&!this.debug)return null;if(t(e[0]))e[0]=`${s}${this.prefix} ${e[0]}`;return this.logger[i](e)}create(t){return new j(this.logger,{...{prefix:`${this.prefix}:${t}:`},...this.options})}clone(t){t=t||this.options;t.prefix=t.prefix||this.prefix;return new j(this.logger,t)}}var O=new j;class S{constructor(){this.observers={}}on(t,e){t.split(" ").forEach((t=>{if(!this.observers[t])this.observers[t]=new Map;const i=this.observers[t].get(e)||0;this.observers[t].set(e,i+1)}));return this}off(t,e){if(!this.observers[t])return;if(!e){delete this.observers[t];return}this.observers[t].delete(e)}emit(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),s=1;s<e;s++){i[s-1]=arguments[s]}if(this.observers[t]){const e=Array.from(this.observers[t].entries());e.forEach((t=>{let[e,s]=t;for(let t=0;t<s;t++){e(...i)}}))}if(this.observers["*"]){const e=Array.from(this.observers["*"].entries());e.forEach((e=>{let[s,n]=e;for(let e=0;e<n;e++){s.apply(s,[t,...i])}}))}}}class k extends S{constructor(t){let e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{ns:["translation"],defaultNS:"translation"};super();this.data=t||{};this.options=e;if(this.options.keySeparator===undefined){this.options.keySeparator="."}if(this.options.ignoreJSONStructure===undefined){this.options.ignoreJSONStructure=true}}addNamespaces(t){if(this.options.ns.indexOf(t)<0){this.options.ns.push(t)}}removeNamespaces(t){const e=this.options.ns.indexOf(t);if(e>-1){this.options.ns.splice(e,1)}}getResource(e,i,s){let n=arguments.length>3&&arguments[3]!==undefined?arguments[3]:{};const r=n.keySeparator!==undefined?n.keySeparator:this.options.keySeparator;const o=n.ignoreJSONStructure!==undefined?n.ignoreJSONStructure:this.options.ignoreJSONStructure;let f;if(e.indexOf(".")>-1){f=e.split(".")}else{f=[e,i];if(s){if(Array.isArray(s)){f.push(...s)}else if(t(s)&&r){f.push(...s.split(r))}else{f.push(s)}}}const h=u(this.data,f);if(!h&&!i&&!s&&e.indexOf(".")>-1){e=f[0];i=f[1];s=f.slice(2).join(".")}if(h||!o||!t(s))return h;return w(this.data?.[e]?.[i],s,r)}addResource(t,e,i,s){let n=arguments.length>4&&arguments[4]!==undefined?arguments[4]:{silent:false};const r=n.keySeparator!==undefined?n.keySeparator:this.options.keySeparator;let o=[t,e];if(i)o=o.concat(r?i.split(r):i);if(t.indexOf(".")>-1){o=t.split(".");s=e;e=o[1]}this.addNamespaces(e);h(this.data,o,s);if(!n.silent)this.emit("added",t,e,i,s)}addResources(e,i,s){let n=arguments.length>3&&arguments[3]!==undefined?arguments[3]:{silent:false};for(const n in s){if(t(s[n])||Array.isArray(s[n]))this.addResource(e,i,n,s[n],{silent:true})}if(!n.silent)this.emit("added",e,i,s)}addResourceBundle(t,e,i,s,n){let r=arguments.length>5&&arguments[5]!==undefined?arguments[5]:{silent:false,skipCopy:false};let o=[t,e];if(t.indexOf(".")>-1){o=t.split(".");s=i;i=e;e=o[1]}this.addNamespaces(e);let f=u(this.data,o)||{};if(!r.skipCopy)i=JSON.parse(JSON.stringify(i));if(s){c(f,i,n)}else{f={...f,...i}}h(this.data,o,f);if(!r.silent)this.emit("added",t,e,i)}removeResourceBundle(t,e){if(this.hasResourceBundle(t,e)){delete this.data[t][e]}this.removeNamespaces(e);this.emit("removed",t,e)}hasResourceBundle(t,e){return this.getResource(t,e)!==undefined}getResourceBundle(t,e){if(!e)e=this.options.defaultNS;return this.getResource(t,e)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const e=this.getDataByLanguage(t);const i=e&&Object.keys(e)||[];return!!i.find((t=>e[t]&&Object.keys(e[t]).length>0))}toJSON(){return this.data}}var N={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,e,i,s,n){t.forEach((t=>{e=this.processors[t]?.process(e,i,s,n)??e}));return e}};const R={};class L extends S{constructor(t){let e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};super();s(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this);this.options=e;if(this.options.keySeparator===undefined){this.options.keySeparator="."}this.logger=O.create("translator")}changeLanguage(t){if(t)this.language=t}exists(t){let e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{interpolation:{}};if(t===undefined||t===null){return false}const i=this.resolve(t,e);return i?.res!==undefined}extractFromKey(e,i){let s=i.nsSeparator!==undefined?i.nsSeparator:this.options.nsSeparator;if(s===undefined)s=":";const n=i.keySeparator!==undefined?i.keySeparator:this.options.keySeparator;let r=i.ns||this.options.defaultNS||[];const o=s&&e.indexOf(s)>-1;const f=!this.options.userDefinedKeySeparator&&!i.keySeparator&&!this.options.userDefinedNsSeparator&&!i.nsSeparator&&!b(e,s,n);if(o&&!f){const i=e.match(this.interpolator.nestingRegexp);if(i&&i.length>0){return{key:e,namespaces:t(r)?[r]:r}}const o=e.split(s);if(s!==n||s===n&&this.options.ns.indexOf(o[0])>-1)r=o.shift();e=o.join(n)}return{key:e,namespaces:t(r)?[r]:r}}translate(e,i,s){if(typeof i!=="object"&&this.options.overloadTranslationOptionHandler){i=this.options.overloadTranslationOptionHandler(arguments)}if(typeof i==="object")i={...i};if(!i)i={};if(e===undefined||e===null)return"";if(!Array.isArray(e))e=[String(e)];const n=i.returnDetails!==undefined?i.returnDetails:this.options.returnDetails;const r=i.keySeparator!==undefined?i.keySeparator:this.options.keySeparator;const{key:o,namespaces:f}=this.extractFromKey(e[e.length-1],i);const h=f[f.length-1];const a=i.lng||this.language;const u=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(a?.toLowerCase()==="cimode"){if(u){const t=i.nsSeparator||this.options.nsSeparator;if(n){return{res:`${h}${t}${o}`,usedKey:o,exactUsedKey:o,usedLng:a,usedNS:h,usedParams:this.getUsedParamsDetails(i)}}return`${h}${t}${o}`}if(n){return{res:o,usedKey:o,exactUsedKey:o,usedLng:a,usedNS:h,usedParams:this.getUsedParamsDetails(i)}}return o}const l=this.resolve(e,i);let c=l?.res;const d=l?.usedKey||o;const p=l?.exactUsedKey||o;const g=Object.prototype.toString.apply(c);const y=["[object Number]","[object Function]","[object RegExp]"];const m=i.joinArrays!==undefined?i.joinArrays:this.options.joinArrays;const $=!this.i18nFormat||this.i18nFormat.handleAsObject;const b=!t(c)&&typeof c!=="boolean"&&typeof c!=="number";if($&&c&&b&&y.indexOf(g)<0&&!(t(m)&&Array.isArray(c))){if(!i.returnObjects&&!this.options.returnObjects){if(!this.options.returnedObjectHandler){this.logger.warn("accessing an object - but returnObjects options is not enabled!")}const t=this.options.returnedObjectHandler?this.options.returnedObjectHandler(d,c,{...i,ns:f}):`key '${o} (${this.language})' returned an object instead of string.`;if(n){l.res=t;l.usedParams=this.getUsedParamsDetails(i);return l}return t}if(r){const t=Array.isArray(c);const e=t?[]:{};const s=t?p:d;for(const t in c){if(Object.prototype.hasOwnProperty.call(c,t)){const n=`${s}${r}${t}`;e[t]=this.translate(n,{...i,...{joinArrays:false,ns:f}});if(e[t]===n)e[t]=c[t]}}c=e}}else if($&&t(m)&&Array.isArray(c)){c=c.join(m);if(c)c=this.extendTranslation(c,e,i,s)}else{let n=false;let f=false;const u=i.count!==undefined&&!t(i.count);const d=L.hasDefaultValue(i);const p=u?this.pluralResolver.getSuffix(a,i.count,i):"";const g=i.ordinal&&u?this.pluralResolver.getSuffix(a,i.count,{ordinal:false}):"";const y=u&&!i.ordinal&&i.count===0;const m=y&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${p}`]||i[`defaultValue${g}`]||i.defaultValue;if(!this.isValidLookup(c)&&d){n=true;c=m}if(!this.isValidLookup(c)){f=true;c=o}const $=i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey;const b=$&&f?undefined:c;const w=d&&m!==c&&this.options.updateMissing;if(f||n||w){this.logger.log(w?"updateKey":"missingKey",a,h,o,w?m:c);if(r){const t=this.resolve(o,{...i,keySeparator:false});if(t&&t.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 e=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo==="fallback"&&e&&e[0]){for(let i=0;i<e.length;i++){t.push(e[i])}}else if(this.options.saveMissingTo==="all"){t=this.languageUtils.toResolveHierarchy(i.lng||this.language)}else{t.push(i.lng||this.language)}const s=(t,e,s)=>{const n=d&&s!==c?s:b;if(this.options.missingKeyHandler){this.options.missingKeyHandler(t,h,e,n,w,i)}else if(this.backendConnector?.saveMissing){this.backendConnector.saveMissing(t,h,e,n,w,i)}this.emit("missingKey",t,h,e,c)};if(this.options.saveMissing){if(this.options.saveMissingPlurals&&u){t.forEach((t=>{const e=this.pluralResolver.getSuffixes(t,i);if(y&&i[`defaultValue${this.options.pluralSeparator}zero`]&&e.indexOf(`${this.options.pluralSeparator}zero`)<0){e.push(`${this.options.pluralSeparator}zero`)}e.forEach((e=>{s([t],o+e,i[`defaultValue${e}`]||m)}))}))}else{s(t,o,m)}}}c=this.extendTranslation(c,e,i,l,s);if(f&&c===o&&this.options.appendNamespaceToMissingKey)c=`${h}:${o}`;if((f||n)&&this.options.parseMissingKeyHandler){c=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${h}:${o}`:o,n?c:undefined)}}if(n){l.res=c;l.usedParams=this.getUsedParamsDetails(i);return l}return c}extendTranslation(e,i,s,n,r){var o=this;if(this.i18nFormat?.parse){e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...s},s.lng||this.language||n.usedLng,n.usedNS,n.usedKey,{resolved:n})}else if(!s.skipInterpolation){if(s.interpolation)this.interpolator.init({...s,...{interpolation:{...this.options.interpolation,...s.interpolation}}});const f=t(e)&&(s?.interpolation?.skipOnVariables!==undefined?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let h;if(f){const t=e.match(this.interpolator.nestingRegexp);h=t&&t.length}let a=s.replace&&!t(s.replace)?s.replace:s;if(this.options.interpolation.defaultVariables)a={...this.options.interpolation.defaultVariables,...a};e=this.interpolator.interpolate(e,a,s.lng||this.language||n.usedLng,s);if(f){const t=e.match(this.interpolator.nestingRegexp);const i=t&&t.length;if(h<i)s.nest=false}if(!s.lng&&n&&n.res)s.lng=this.language||n.usedLng;if(s.nest!==false)e=this.interpolator.nest(e,(function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++){e[n]=arguments[n]}if(r?.[0]===e[0]&&!s.context){o.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${i[0]}`);return null}return o.translate(...e,i)}),s);if(s.interpolation)this.interpolator.reset()}const f=s.postProcess||this.options.postProcess;const h=t(f)?[f]:f;if(e!==undefined&&e!==null&&h?.length&&s.applyPostProcessor!==false){e=N.handle(h,e,i,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...n,usedParams:this.getUsedParamsDetails(s)},...s}:s,this)}return e}resolve(e){let i=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};let s;let n;let r;let o;let f;if(t(e))e=[e];e.forEach((e=>{if(this.isValidLookup(s))return;const h=this.extractFromKey(e,i);const a=h.key;n=a;let u=h.namespaces;if(this.options.fallbackNS)u=u.concat(this.options.fallbackNS);const l=i.count!==undefined&&!t(i.count);const c=l&&!i.ordinal&&i.count===0;const d=i.context!==undefined&&(t(i.context)||typeof i.context==="number")&&i.context!=="";const p=i.lngs?i.lngs:this.languageUtils.toResolveHierarchy(i.lng||this.language,i.fallbackLng);u.forEach((t=>{if(this.isValidLookup(s))return;f=t;if(!R[`${p[0]}-${t}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(f)){R[`${p[0]}-${t}`]=true;this.logger.warn(`key "${n}" for languages "${p.join(", ")}" won't get resolved as namespace "${f}" 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!!!")}p.forEach((e=>{if(this.isValidLookup(s))return;o=e;const n=[a];if(this.i18nFormat?.addLookupKeys){this.i18nFormat.addLookupKeys(n,a,e,t,i)}else{let t;if(l)t=this.pluralResolver.getSuffix(e,i.count,i);const s=`${this.options.pluralSeparator}zero`;const r=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(l){n.push(a+t);if(i.ordinal&&t.indexOf(r)===0){n.push(a+t.replace(r,this.options.pluralSeparator))}if(c){n.push(a+s)}}if(d){const e=`${a}${this.options.contextSeparator}${i.context}`;n.push(e);if(l){n.push(e+t);if(i.ordinal&&t.indexOf(r)===0){n.push(e+t.replace(r,this.options.pluralSeparator))}if(c){n.push(e+s)}}}}let f;while(f=n.pop()){if(!this.isValidLookup(s)){r=f;s=this.getResource(e,t,f,i)}}}))}))}));return{res:s,usedKey:n,exactUsedKey:r,usedLng:o,usedNS:f}}isValidLookup(t){return t!==undefined&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,e,i){let s=arguments.length>3&&arguments[3]!==undefined?arguments[3]:{};if(this.i18nFormat?.getResource)return this.i18nFormat.getResource(t,e,i,s);return this.resourceStore.getResource(t,e,i,s)}getUsedParamsDetails(){let e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};const i=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"];const s=e.replace&&!t(e.replace);let n=s?e.replace:e;if(s&&typeof e.count!=="undefined"){n.count=e.count}if(this.options.interpolation.defaultVariables){n={...this.options.interpolation.defaultVariables,...n}}if(!s){n={...n};for(const t of i){delete n[t]}}return n}static hasDefaultValue(t){const e="defaultValue";for(const i in t){if(Object.prototype.hasOwnProperty.call(t,i)&&e===i.substring(0,e.length)&&undefined!==t[i]){return true}}return false}}class P{constructor(t){this.options=t;this.supportedLngs=this.options.supportedLngs||false;this.logger=O.create("languageUtils")}getScriptPartFromCode(t){t=x(t);if(!t||t.indexOf("-")<0)return null;const e=t.split("-");if(e.length===2)return null;e.pop();if(e[e.length-1].toLowerCase()==="x")return null;return this.formatLanguageCode(e.join("-"))}getLanguagePartFromCode(t){t=x(t);if(!t||t.indexOf("-")<0)return t;const e=t.split("-");return this.formatLanguageCode(e[0])}formatLanguageCode(e){if(t(e)&&e.indexOf("-")>-1){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch(t){}if(t&&this.options.lowerCaseLng){t=t.toLowerCase()}if(t)return t;if(this.options.lowerCaseLng){return e.toLowerCase()}return e}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(t){if(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs){t=this.getLanguagePartFromCode(t)}return!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let e;t.forEach((t=>{if(e)return;const i=this.formatLanguageCode(t);if(!this.options.supportedLngs||this.isSupportedCode(i))e=i}));if(!e&&this.options.supportedLngs){t.forEach((t=>{if(e)return;const i=this.getLanguagePartFromCode(t);if(this.isSupportedCode(i))return e=i;e=this.options.supportedLngs.find((t=>{if(t===i)return t;if(t.indexOf("-")<0&&i.indexOf("-")<0)return;if(t.indexOf("-")>0&&i.indexOf("-")<0&&t.substring(0,t.indexOf("-"))===i)return t;if(t.indexOf(i)===0&&i.length>1)return t}))}))}if(!e)e=this.getFallbackCodes(this.options.fallbackLng)[0];return e}getFallbackCodes(e,i){if(!e)return[];if(typeof e==="function")e=e(i);if(t(e))e=[e];if(Array.isArray(e))return e;if(!i)return e.default||[];let s=e[i];if(!s)s=e[this.getScriptPartFromCode(i)];if(!s)s=e[this.formatLanguageCode(i)];if(!s)s=e[this.getLanguagePartFromCode(i)];if(!s)s=e.default;return s||[]}toResolveHierarchy(e,i){const s=this.getFallbackCodes(i||this.options.fallbackLng||[],e);const n=[];const r=t=>{if(!t)return;if(this.isSupportedCode(t)){n.push(t)}else{this.logger.warn(`rejecting language code not found in supportedLngs: ${t}`)}};if(t(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)){if(this.options.load!=="languageOnly")r(this.formatLanguageCode(e));if(this.options.load!=="languageOnly"&&this.options.load!=="currentOnly")r(this.getScriptPartFromCode(e));if(this.options.load!=="currentOnly")r(this.getLanguagePartFromCode(e))}else if(t(e)){r(this.formatLanguageCode(e))}s.forEach((t=>{if(n.indexOf(t)<0)r(this.formatLanguageCode(t))}));return n}}const A={zero:0,one:1,two:2,few:3,many:4,other:5};const C={select:t=>t===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class E{constructor(t){let e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};this.languageUtils=t;this.options=e;this.logger=O.create("pluralResolver");this.pluralRulesCache={}}addRule(t,e){this.rules[t]=e}clearCache(){this.pluralRulesCache={}}getRule(t){let e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};const i=x(t==="dev"?"en":t);const s=e.ordinal?"ordinal":"cardinal";const 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(i){if(!Intl){this.logger.error("No Intl support, please use an Intl polyfill!");return C}if(!t.match(/-|_/))return C;const s=this.languageUtils.getLanguagePartFromCode(t);r=this.getRule(s,e)}this.pluralRulesCache[n]=r;return r}needsPlural(t){let e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};let i=this.getRule(t,e);if(!i)i=this.getRule("dev",e);return i?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(t,e){let i=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};return this.getSuffixes(t,i).map((t=>`${e}${t}`))}getSuffixes(t){let e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};let i=this.getRule(t,e);if(!i)i=this.getRule("dev",e);if(!i)return[];return i.resolvedOptions().pluralCategories.sort(((t,e)=>A[t]-A[e])).map((t=>`${this.options.prepend}${e.ordinal?`ordinal${this.options.prepend}`:""}${t}`))}getSuffix(t,e){let i=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};const s=this.getRule(t,i);if(s){return`${this.options.prepend}${i.ordinal?`ordinal${this.options.prepend}`:""}${s.select(e)}`}this.logger.warn(`no plural rule found for: ${t}`);return this.getSuffix("dev",e,i)}}const I=function(e,i,s){let n=arguments.length>3&&arguments[3]!==undefined?arguments[3]:".";let r=arguments.length>4&&arguments[4]!==undefined?arguments[4]:true;let o=l(e,i,s);if(!o&&r&&t(s)){o=w(e,s,n);if(o===undefined)o=w(i,s,n)}return o};const V=t=>t.replace(/\$/g,"$$$$");class T{constructor(){let t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};this.logger=O.create("interpolator");this.options=t;this.format=t?.interpolation?.format||(t=>t);this.init(t)}init(){let t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};if(!t.interpolation)t.interpolation={escapeValue:true};const{escape:e,escapeValue:i,useRawValueToEscape:s,prefix:n,prefixEscaped:r,suffix:o,suffixEscaped:f,formatSeparator:h,unescapeSuffix:a,unescapePrefix:u,nestingPrefix:l,nestingPrefixEscaped:c,nestingSuffix:p,nestingSuffixEscaped:y,nestingOptionsSeparator:m,maxReplaces:$,alwaysFormat:b}=t.interpolation;this.escape=e!==undefined?e:g;this.escapeValue=i!==undefined?i:true;this.useRawValueToEscape=s!==undefined?s:false;this.prefix=n?d(n):r||"{{";this.suffix=o?d(o):f||"}}";this.formatSeparator=h||",";this.unescapePrefix=a?"":u||"-";this.unescapeSuffix=this.unescapePrefix?"":a||"";this.nestingPrefix=l?d(l):c||d("$t(");this.nestingSuffix=p?d(p):y||d(")");this.nestingOptionsSeparator=m||",";this.maxReplaces=$||1e3;this.alwaysFormat=b!==undefined?b:false;this.resetRegExp()}reset(){if(this.options)this.init(this.options)}resetRegExp(){const t=(t,e)=>{if(t?.source===e){t.lastIndex=0;return t}return new RegExp(e,"g")};this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`);this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`);this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(e,s,n,r){let o;let f;let h;const a=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};const u=t=>{if(t.indexOf(this.formatSeparator)<0){const e=I(s,a,t,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(e,undefined,n,{...r,...s,interpolationkey:t}):e}const e=t.split(this.formatSeparator);const i=e.shift().trim();const o=e.join(this.formatSeparator).trim();return this.format(I(s,a,i,this.options.keySeparator,this.options.ignoreJSONStructure),o,n,{...r,...s,interpolationkey:i})};this.resetRegExp();const l=r?.missingInterpolationHandler||this.options.missingInterpolationHandler;const c=r?.interpolation?.skipOnVariables!==undefined?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;const d=[{regex:this.regexpUnescape,safeValue:t=>V(t)},{regex:this.regexp,safeValue:t=>this.escapeValue?V(this.escape(t)):V(t)}];d.forEach((s=>{h=0;while(o=s.regex.exec(e)){const n=o[1].trim();f=u(n);if(f===undefined){if(typeof l==="function"){const i=l(e,o,r);f=t(i)?i:""}else if(r&&Object.prototype.hasOwnProperty.call(r,n)){f=""}else if(c){f=o[0];continue}else{this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`);f=""}}else if(!t(f)&&!this.useRawValueToEscape){f=i(f)}const a=s.safeValue(f);e=e.replace(o[0],a);if(c){s.regex.lastIndex+=f.length;s.regex.lastIndex-=o[0].length}else{s.regex.lastIndex=0}h++;if(h>=this.maxReplaces){break}}}));return e}nest(e,s){let n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};let r;let o;let f;const h=(t,e)=>{const i=this.nestingOptionsSeparator;if(t.indexOf(i)<0)return t;const s=t.split(new RegExp(`${i}[ ]*{`));let n=`{${s[1]}`;t=s[0];n=this.interpolate(n,f);const r=n.match(/'/g);const o=n.match(/"/g);if((r?.length??0)%2===0&&!o||o.length%2!==0){n=n.replace(/'/g,'"')}try{f=JSON.parse(n);if(e)f={...e,...f}}catch(e){this.logger.warn(`failed parsing options string in nesting for key ${t}`,e);return`${t}${i}${n}`}if(f.defaultValue&&f.defaultValue.indexOf(this.prefix)>-1)delete f.defaultValue;return t};while(r=this.nestingRegexp.exec(e)){let a=[];f={...n};f=f.replace&&!t(f.replace)?f.replace:f;f.applyPostProcessor=false;delete f.defaultValue;let u=false;if(r[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(r[1])){const t=r[1].split(this.formatSeparator).map((t=>t.trim()));r[1]=t.shift();a=t;u=true}o=s(h.call(this,r[1].trim(),f),f);if(o&&r[0]===e&&!t(o))return o;if(!t(o))o=i(o);if(!o){this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`);o=""}if(u){o=a.reduce(((t,e)=>this.format(t,e,n.lng,{...n,interpolationkey:r[1].trim()})),o.trim())}e=e.replace(r[0],o);this.regexp.lastIndex=0}return e}}const K=t=>{let e=t.toLowerCase().trim();const i={};if(t.indexOf("(")>-1){const s=t.split("(");e=s[0].toLowerCase().trim();const n=s[1].substring(0,s[1].length-1);if(e==="currency"&&n.indexOf(":")<0){if(!i.currency)i.currency=n.trim()}else if(e==="relativetime"&&n.indexOf(":")<0){if(!i.range)i.range=n.trim()}else{const t=n.split(";");t.forEach((t=>{if(t){const[e,...s]=t.split(":");const n=s.join(":").trim().replace(/^'+|'+$/g,"");const r=e.trim();if(!i[r])i[r]=n;if(n==="false")i[r]=false;if(n==="true")i[r]=true;if(!isNaN(n))i[r]=parseInt(n,10)}}))}}return{formatName:e,formatOptions:i}};const z=t=>{const e={};return(i,s,n)=>{let r=n;if(n&&n.interpolationkey&&n.formatParams&&n.formatParams[n.interpolationkey]&&n[n.interpolationkey]){r={...r,[n.interpolationkey]:undefined}}const o=s+JSON.stringify(r);let f=e[o];if(!f){f=t(x(s),n);e[o]=f}return f(i)}};class B{constructor(){let t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};this.logger=O.create("formatter");this.options=t;this.formats={number:z(((t,e)=>{const i=new Intl.NumberFormat(t,{...e});return t=>i.format(t)})),currency:z(((t,e)=>{const i=new Intl.NumberFormat(t,{...e,style:"currency"});return t=>i.format(t)})),datetime:z(((t,e)=>{const i=new Intl.DateTimeFormat(t,{...e});return t=>i.format(t)})),relativetime:z(((t,e)=>{const i=new Intl.RelativeTimeFormat(t,{...e});return t=>i.format(t,e.range||"day")})),list:z(((t,e)=>{const i=new Intl.ListFormat(t,{...e});return t=>i.format(t)}))};this.init(t)}init(t){let e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{interpolation:{}};this.formatSeparator=e.interpolation.formatSeparator||","}add(t,e){this.formats[t.toLowerCase().trim()]=e}addCached(t,e){this.formats[t.toLowerCase().trim()]=z(e)}format(t,e,i){let s=arguments.length>3&&arguments[3]!==undefined?arguments[3]:{};const n=e.split(this.formatSeparator);if(n.length>1&&n[0].indexOf("(")>1&&n[0].indexOf(")")<0&&n.find((t=>t.indexOf(")")>-1))){const t=n.findIndex((t=>t.indexOf(")")>-1));n[0]=[n[0],...n.splice(1,t)].join(this.formatSeparator)}const r=n.reduce(((t,e)=>{const{formatName:n,formatOptions:r}=K(e);if(this.formats[n]){let e=t;try{const o=s?.formatParams?.[s.interpolationkey]||{};const f=o.locale||o.lng||s.locale||s.lng||i;e=this.formats[n](t,f,{...r,...s,...o})}catch(t){this.logger.warn(t)}return e}else{this.logger.warn(`there was no format function for ${n}`)}return t}),t);return r}}const M=(t,e)=>{if(t.pending[e]!==undefined){delete t.pending[e];t.pendingCount--}};class D extends S{constructor(t,e,i){let s=arguments.length>3&&arguments[3]!==undefined?arguments[3]:{};super();this.backend=t;this.store=e;this.services=i;this.languageUtils=i.languageUtils;this.options=s;this.logger=O.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(t,e,i,s){const n={};const r={};const o={};const f={};t.forEach((t=>{let s=true;e.forEach((e=>{const o=`${t}|${e}`;if(!i.reload&&this.store.hasResourceBundle(t,e)){this.state[o]=2}else if(this.state[o]<0);else if(this.state[o]===1){if(r[o]===undefined)r[o]=true}else{this.state[o]=1;s=false;if(r[o]===undefined)r[o]=true;if(n[o]===undefined)n[o]=true;if(f[e]===undefined)f[e]=true}}));if(!s)o[t]=true}));if(Object.keys(n).length||Object.keys(r).length){this.queue.push({pending:r,pendingCount:Object.keys(r).length,loaded:{},errors:[],callback:s})}return{toLoad:Object.keys(n),pending:Object.keys(r),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(f)}}loaded(t,e,i){const s=t.split("|");const n=s[0];const r=s[1];if(e)this.emit("failedLoading",n,r,e);if(!e&&i){this.store.addResourceBundle(n,r,i,undefined,undefined,{skipCopy:true})}this.state[t]=e?-1:2;if(e&&i)this.state[t]=0;const o={};this.queue.forEach((i=>{a(i.loaded,[n],r);M(i,t);if(e)i.errors.push(e);if(i.pendingCount===0&&!i.done){Object.keys(i.loaded).forEach((t=>{if(!o[t])o[t]={};const e=i.loaded[t];if(e.length){e.forEach((e=>{if(o[t][e]===undefined)o[t][e]=true}))}}));i.done=true;if(i.errors.length){i.callback(i.errors)}else{i.callback()}}}));this.emit("loaded",o);this.queue=this.queue.filter((t=>!t.done))}read(t,e,i){let s=arguments.length>3&&arguments[3]!==undefined?arguments[3]:0;let n=arguments.length>4&&arguments[4]!==undefined?arguments[4]:this.retryTimeout;let r=arguments.length>5?arguments[5]:undefined;if(!t.length)return r(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:e,fcName:i,tried:s,wait:n,callback:r});return}this.readingCalls++;const o=(o,f)=>{this.readingCalls--;if(this.waitingReads.length>0){const t=this.waitingReads.shift();this.read(t.lng,t.ns,t.fcName,t.tried,t.wait,t.callback)}if(o&&f&&s<this.maxRetries){setTimeout((()=>{this.read.call(this,t,e,i,s+1,n*2,r)}),n);return}r(o,f)};const f=this.backend[i].bind(this.backend);if(f.length===2){try{const i=f(t,e);if(i&&typeof i.then==="function"){i.then((t=>o(null,t))).catch(o)}else{o(null,i)}}catch(t){o(t)}return}return f(t,e,o)}prepareLoading(e,i){let s=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};let n=arguments.length>3?arguments[3]:undefined;if(!this.backend){this.logger.warn("No backend was added via i18next.use. Will not load resources.");return n&&n()}if(t(e))e=this.languageUtils.toResolveHierarchy(e);if(t(i))i=[i];const r=this.queueLoad(e,i,s,n);if(!r.toLoad.length){if(!r.pending.length)n();return null}r.toLoad.forEach((t=>{this.loadOne(t)}))}load(t,e,i){this.prepareLoading(t,e,{},i)}reload(t,e,i){this.prepareLoading(t,e,{reload:true},i)}loadOne(t){let e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:"";const i=t.split("|");const s=i[0];const n=i[1];this.read(s,n,"read",undefined,undefined,((i,r)=>{if(i)this.logger.warn(`${e}loading namespace ${n} for language ${s} failed`,i);if(!i&&r)this.logger.log(`${e}loaded namespace ${n} for language ${s}`,r);this.loaded(t,i,r)}))}saveMissing(t,e,i,s,n){let r=arguments.length>5&&arguments[5]!==undefined?arguments[5]:{};let o=arguments.length>6&&arguments[6]!==undefined?arguments[6]:()=>{};if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(e)){this.logger.warn(`did not save key "${i}" as the namespace "${e}" 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===undefined||i===null||i==="")return;if(this.backend?.create){const f={...r,isUpdate:n};const h=this.backend.create.bind(this.backend);if(h.length<6){try{let n;if(h.length===5){n=h(t,e,i,s,f)}else{n=h(t,e,i,s)}if(n&&typeof n.then==="function"){n.then((t=>o(null,t))).catch(o)}else{o(null,n)}}catch(t){o(t)}}else{h(t,e,i,s,o,f)}}if(!t||!t[0])return;this.store.addResource(t[0],e,i,s)}}const F=()=>({debug:false,initAsync:true,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:false,supportedLngs:false,nonExplicitSupportedLngs:false,load:"all",preload:false,simplifyPluralSuffix:true,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:false,saveMissing:false,updateMissing:false,saveMissingTo:"fallback",saveMissingPlurals:true,missingKeyHandler:false,missingInterpolationHandler:false,postProcess:false,postProcessPassResolved:false,returnNull:false,returnEmptyString:true,returnObjects:false,joinArrays:false,returnedObjectHandler:false,parseMissingKeyHandler:false,appendNamespaceToMissingKey:false,appendNamespaceToCIMode:false,overloadTranslationOptionHandler:e=>{let i={};if(typeof e[1]==="object")i=e[1];if(t(e[1]))i.defaultValue=e[1];if(t(e[2]))i.tDescription=e[2];if(typeof e[2]==="object"||typeof e[3]==="object"){const t=e[3]||e[2];Object.keys(t).forEach((e=>{i[e]=t[e]}))}return i},interpolation:{escapeValue:true,format:t=>t,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:true}});const _=e=>{if(t(e.ns))e.ns=[e.ns];if(t(e.fallbackLng))e.fallbackLng=[e.fallbackLng];if(t(e.fallbackNS))e.fallbackNS=[e.fallbackNS];if(e.supportedLngs?.indexOf?.("cimode")<0){e.supportedLngs=e.supportedLngs.concat(["cimode"])}if(typeof e.initImmediate==="boolean")e.initAsync=e.initImmediate;return e};const J=()=>{};const U=t=>{const e=Object.getOwnPropertyNames(Object.getPrototypeOf(t));e.forEach((e=>{if(typeof t[e]==="function"){t[e]=t[e].bind(t)}}))};class W extends S{constructor(){let t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};let e=arguments.length>1?arguments[1]:undefined;super();this.options=_(t);this.services={};this.logger=O;this.modules={external:[]};U(this);if(e&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync){this.init(t,e);return this}setTimeout((()=>{this.init(t,e)}),0)}}init(){var i=this;let s=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};let n=arguments.length>1?arguments[1]:undefined;this.isInitializing=true;if(typeof s==="function"){n=s;s={}}if(!s.defaultNS&&s.defaultNS!==false&&s.ns){if(t(s.ns)){s.defaultNS=s.ns}else if(s.ns.indexOf("translation")<0){s.defaultNS=s.ns[0]}}const r=F();this.options={...r,...this.options,..._(s)};this.options.interpolation={...r.interpolation,...this.options.interpolation};if(s.keySeparator!==undefined){this.options.userDefinedKeySeparator=s.keySeparator}if(s.nsSeparator!==undefined){this.options.userDefinedNsSeparator=s.nsSeparator}const o=t=>{if(!t)return null;if(typeof t==="function")return new t;return t};if(!this.options.isClone){if(this.modules.logger){O.init(o(this.modules.logger),this.options)}else{O.init(null,this.options)}let t;if(this.modules.formatter){t=this.modules.formatter}else{t=B}const e=new P(this.options);this.store=new k(this.options.resources,this.options);const s=this.services;s.logger=O;s.resourceStore=this.store;s.languageUtils=e;s.pluralResolver=new E(e,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix});if(t&&(!this.options.interpolation.format||this.options.interpolation.format===r.interpolation.format)){s.formatter=o(t);s.formatter.init(s,this.options);this.options.interpolation.format=s.formatter.format.bind(s.formatter)}s.interpolator=new T(this.options);s.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)};s.backendConnector=new D(o(this.modules.backend),s.resourceStore,s,this.options);s.backendConnector.on("*",(function(t){for(var e=arguments.length,s=new Array(e>1?e-1:0),n=1;n<e;n++){s[n-1]=arguments[n]}i.emit(t,...s)}));if(this.modules.languageDetector){s.languageDetector=o(this.modules.languageDetector);if(s.languageDetector.init)s.languageDetector.init(s,this.options.detection,this.options)}if(this.modules.i18nFormat){s.i18nFormat=o(this.modules.i18nFormat);if(s.i18nFormat.init)s.i18nFormat.init(this)}this.translator=new L(this.services,this.options);this.translator.on("*",(function(t){for(var e=arguments.length,s=new Array(e>1?e-1:0),n=1;n<e;n++){s[n-1]=arguments[n]}i.emit(t,...s)}));this.modules.external.forEach((t=>{if(t.init)t.init(this)}))}this.format=this.options.interpolation.format;if(!n)n=J;if(this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const t=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);if(t.length>0&&t[0]!=="dev")this.options.lng=t[0]}if(!this.services.languageDetector&&!this.options.lng){this.logger.warn("init: no languageDetector is used and no lng is defined")}const f=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];f.forEach((t=>{this[t]=function(){return i.store[t](...arguments)}}));const h=["addResource","addResources","addResourceBundle","removeResourceBundle"];h.forEach((t=>{this[t]=function(){i.store[t](...arguments);return i}}));const a=e();const u=()=>{const t=(t,e)=>{this.isInitializing=false;if(this.isInitialized&&!this.initializedStoreOnce)this.logger.warn("init: i18next is already initialized. You should call init just once!");this.isInitialized=true;if(!this.options.isClone)this.logger.log("initialized",this.options);this.emit("initialized",this.options);a.resolve(e);n(t,e)};if(this.languages&&!this.isInitialized)return t(null,this.t.bind(this));this.changeLanguage(this.options.lng,t)};if(this.options.resources||!this.options.initAsync){u()}else{setTimeout(u,0)}return a}loadResources(e){let i=arguments.length>1&&arguments[1]!==undefined?arguments[1]:J;let s=i;const n=t(e)?e:this.language;if(typeof e==="function")s=e;if(!this.options.resources||this.options.partialBundledLanguages){if(n?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return s();const t=[];const e=e=>{if(!e)return;if(e==="cimode")return;const i=this.services.languageUtils.toResolveHierarchy(e);i.forEach((e=>{if(e==="cimode")return;if(t.indexOf(e)<0)t.push(e)}))};if(!n){const t=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);t.forEach((t=>e(t)))}else{e(n)}this.options.preload?.forEach?.((t=>e(t)));this.services.backendConnector.load(t,this.options.ns,(t=>{if(!t&&!this.resolvedLanguage&&this.language)this.setResolvedLanguage(this.language);s(t)}))}else{s(null)}}reloadResources(t,i,s){const n=e();if(typeof t==="function"){s=t;t=undefined}if(typeof i==="function"){s=i;i=undefined}if(!t)t=this.languages;if(!i)i=this.options.ns;if(!s)s=J;this.services.backendConnector.reload(t,i,(t=>{n.resolve();s(t)}));return n}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");if(t.type==="backend"){this.modules.backend=t}if(t.type==="logger"||t.log&&t.warn&&t.error){this.modules.logger=t}if(t.type==="languageDetector"){this.modules.languageDetector=t}if(t.type==="i18nFormat"){this.modules.i18nFormat=t}if(t.type==="postProcessor"){N.addPostProcessor(t)}if(t.type==="formatter"){this.modules.formatter=t}if(t.type==="3rdParty"){this.modules.external.push(t)}return this}setResolvedLanguage(t){if(!t||!this.languages)return;if(["cimode","dev"].indexOf(t)>-1)return;for(let t=0;t<this.languages.length;t++){const e=this.languages[t];if(["cimode","dev"].indexOf(e)>-1)continue;if(this.store.hasLanguageSomeTranslations(e)){this.resolvedLanguage=e;break}}}changeLanguage(i,s){var n=this;this.isLanguageChangingTo=i;const r=e();this.emit("languageChanging",i);const o=t=>{this.language=t;this.languages=this.services.languageUtils.toResolveHierarchy(t);this.resolvedLanguage=undefined;this.setResolvedLanguage(t)};const f=(t,e)=>{if(e){o(e);this.translator.changeLanguage(e);this.isLanguageChangingTo=undefined;this.emit("languageChanged",e);this.logger.log("languageChanged",e)}else{this.isLanguageChangingTo=undefined}r.resolve((function(){return n.t(...arguments)}));if(s)s(t,(function(){return n.t(...arguments)}))};const h=e=>{if(!i&&!e&&this.services.languageDetector)e=[];const s=t(e)?e:this.services.languageUtils.getBestMatchFromCodes(e);if(s){if(!this.language){o(s)}if(!this.translator.language)this.translator.changeLanguage(s);this.services.languageDetector?.cacheUserLanguage?.(s)}this.loadResources(s,(t=>{f(t,s)}))};if(!i&&this.services.languageDetector&&!this.services.languageDetector.async){h(this.services.languageDetector.detect())}else if(!i&&this.services.languageDetector&&this.services.languageDetector.async){if(this.services.languageDetector.detect.length===0){this.services.languageDetector.detect().then(h)}else{this.services.languageDetector.detect(h)}}else{h(i)}return r}getFixedT(e,i,s){var n=this;const r=function(t,e){let i;if(typeof e!=="object"){for(var o=arguments.length,f=new Array(o>2?o-2:0),h=2;h<o;h++){f[h-2]=arguments[h]}i=n.options.overloadTranslationOptionHandler([t,e].concat(f))}else{i={...e}}i.lng=i.lng||r.lng;i.lngs=i.lngs||r.lngs;i.ns=i.ns||r.ns;if(i.keyPrefix!=="")i.keyPrefix=i.keyPrefix||s||r.keyPrefix;const a=n.options.keySeparator||".";let u;if(i.keyPrefix&&Array.isArray(t)){u=t.map((t=>`${i.keyPrefix}${a}${t}`))}else{u=i.keyPrefix?`${i.keyPrefix}${a}${t}`:t}return n.t(u,i)};if(t(e)){r.lng=e}else{r.lngs=e}r.ns=i;r.keyPrefix=s;return r}t(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++){e[i]=arguments[i]}return this.translator?.translate(...e)}exists(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++){e[i]=arguments[i]}return this.translator?.exists(...e)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t){let e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};if(!this.isInitialized){this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages);return false}if(!this.languages||!this.languages.length){this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages);return false}const i=e.lng||this.resolvedLanguage||this.languages[0];const s=this.options?this.options.fallbackLng:false;const n=this.languages[this.languages.length-1];if(i.toLowerCase()==="cimode")return true;const r=(t,e)=>{const i=this.services.backendConnector.state[`${t}|${e}`];return i===-1||i===0||i===2};if(e.precheck){const t=e.precheck(this,r);if(t!==undefined)return t}if(this.hasResourceBundle(i,t))return true;if(!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages)return true;if(r(i,t)&&(!s||r(n,t)))return true;return false}loadNamespaces(i,s){const n=e();if(!this.options.ns){if(s)s();return Promise.resolve()}if(t(i))i=[i];i.forEach((t=>{if(this.options.ns.indexOf(t)<0)this.options.ns.push(t)}));this.loadResources((t=>{n.resolve();if(s)s(t)}));return n}loadLanguages(i,s){const n=e();if(t(i))i=[i];const r=this.options.preload||[];const o=i.filter((t=>r.indexOf(t)<0&&this.services.languageUtils.isSupportedCode(t)));if(!o.length){if(s)s();return Promise.resolve()}this.options.preload=r.concat(o);this.loadResources((t=>{n.resolve();if(s)s(t)}));return n}dir(t){if(!t)t=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language);if(!t)return"rtl";const 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"];const i=this.services?.languageUtils||new P(F());return e.indexOf(i.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};let e=arguments.length>1?arguments[1]:undefined;return new W(t,e)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};let e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:J;const i=t.forkResourceStore;if(i)delete t.forkResourceStore;const s={...this.options,...t,...{isClone:true}};const n=new W(s);if(t.debug!==undefined||t.prefix!==undefined){n.logger=n.logger.clone(t)}const r=["store","services","language"];r.forEach((t=>{n[t]=this[t]}));n.services={...this.services};n.services.utils={hasLoadedNamespace:n.hasLoadedNamespace.bind(n)};if(i){n.store=new k(this.store.data,s);n.services.resourceStore=n.store}n.translator=new L(n.services,s);n.translator.on("*",(function(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),s=1;s<e;s++){i[s-1]=arguments[s]}n.emit(t,...i)}));n.init(s,e);n.translator.options=s;n.translator.backendConnector.services.utils={hasLoadedNamespace:n.hasLoadedNamespace.bind(n)};return n}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const H=W.createInstance();H.createInstance=W.createInstance;H.init({lng:"pt",fallbackLng:"en",resources:{en:{translation:{welcome:"Welcome",description:"This is an example","pin-sutitle":"Enter the 4-digit code sent via SMS to the number"}},pt:{translation:{welcome:"Bem-vindo",description:"Este é um exemplo","pin-sutitle":"Digite o código de 4 dígitos enviado por SMS ao número",giftDescription:"Você tem até <strong>R$ {{amount}}</strong> de {{custom_name}}",noGiftback:"Você não possui {{storename}} disponível para essa compra."}}}});export{H as i};
2
+ //# sourceMappingURL=p-fb505488.js.map