@fctc/sme-widget-ui 4.0.0 → 4.0.4
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.
- package/dist/chunk-BCFEY74H.mjs +1 -0
- package/dist/chunk-M3ISROCS.mjs +44 -0
- package/dist/index.mjs +1 -1
- package/dist/utils.mjs +1 -1
- package/dist/widgets.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-BJCU5X7S.mjs +0 -1
- package/dist/chunk-Q23RCKL6.mjs +0 -44
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {a,b}from'./chunk-YEKQJ4YC.mjs';import C from'moment';import {createContext,useEffect,useContext,useCallback,useState,useRef,useMemo,createElement}from'react';import {jsx}from'react/jsx-runtime';var Ie=a((Ln,Ce)=>{Ce.exports={area:true,base:true,br:true,col:true,embed:true,hr:true,img:true,input:true,link:true,meta:true,param:true,source:true,track:true,wbr:true};});b(Ie());var Te=(s,e,t,n)=>{let r=[t,{code:e,...n||{}}];if(s?.services?.logger?.forward)return s.services.logger.forward(r,"warn","react-i18next::",true);E(r[0])&&(r[0]=`react-i18next:: ${r[0]}`),s?.services?.logger?.warn?s.services.logger.warn(...r):console?.warn&&console.warn(...r);},Re={},K=(s,e,t,n)=>{E(t)&&Re[t]||(E(t)&&(Re[t]=new Date),Te(s,e,t,n));},De=(s,e)=>()=>{if(s.isInitialized)e();else {let t=()=>{setTimeout(()=>{s.off("initialized",t);},0),e();};s.on("initialized",t);}},Q=(s,e,t)=>{s.loadNamespaces(e,De(s,t));},fe=(s,e,t,n)=>{if(E(t)&&(t=[t]),s.options.preload&&s.options.preload.indexOf(e)>-1)return Q(s,t,n);t.forEach(r=>{s.options.ns.indexOf(r)<0&&s.options.ns.push(r);}),s.loadLanguages(e,De(s,n));},Ee=(s,e,t={})=>!e.languages||!e.languages.length?(K(e,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:e.languages}),true):e.hasLoadedNamespace(s,{lng:t.lng,precheck:(n,r)=>{if(t.bindI18n&&t.bindI18n.indexOf("languageChanging")>-1&&n.services.backendConnector.backend&&n.isLanguageChangingTo&&!r(n.isLanguageChangingTo,s))return false}});var E=s=>typeof s=="string",de=s=>typeof s=="object"&&s!==null;var Ct=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,It={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"\xA9","©":"\xA9","®":"\xAE","®":"\xAE","…":"\u2026","…":"\u2026","/":"/","/":"/"},Rt=s=>It[s],Fe=s=>s.replace(Ct,Rt);var ge={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:true,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:true,unescape:Fe},ee=(s={})=>{ge={...ge,...s};},z=()=>ge;var Ae,te=s=>{Ae=s;},A=()=>Ae;var ne={type:"3rdParty",init(s){ee(s.options.react),te(s);}};var j=createContext(),se=class{constructor(){this.usedNamespaces={};}addUsedNamespaces(e){e.forEach(t=>{this.usedNamespaces[t]||(this.usedNamespaces[t]=true);});}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}};var jt=(s,e)=>{let t=useRef();return useEffect(()=>{t.current=s;},[s,e]),t.current},Me=(s,e,t,n)=>s.getFixedT(e,t,n),Mt=(s,e,t,n)=>useCallback(Me(s,e,t,n),[s,e,t,n]),G=(s,e={})=>{let{i18n:t}=e,{i18n:n,defaultNS:r}=useContext(j)||{},i=t||n||A();if(i&&!i.reportNamespaces&&(i.reportNamespaces=new se),!i){K(i,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");let w=(O,v)=>E(v)?v:de(v)&&E(v.defaultValue)?v.defaultValue:Array.isArray(O)?O[O.length-1]:O,L=[w,{},false];return L.t=w,L.i18n={},L.ready=false,L}i.options.react?.wait&&K(i,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");let a={...z(),...i.options.react,...e},{useSuspense:o,keyPrefix:l}=a,u=r||i.options?.defaultNS;u=E(u)?[u]:u||["translation"],i.reportNamespaces.addUsedNamespaces?.(u);let c=(i.isInitialized||i.initializedStoreOnce)&&u.every(w=>Ee(w,i,a)),p=Mt(i,e.lng||null,a.nsMode==="fallback"?u:u[0],l),f=()=>p,x=()=>Me(i,e.lng||null,a.nsMode==="fallback"?u:u[0],l),[d,h]=useState(f),g=u.join();e.lng&&(g=`${e.lng}${g}`);let y=jt(g),m=useRef(true);useEffect(()=>{let{bindI18n:w,bindI18nStore:L}=a;m.current=true,!c&&!o&&(e.lng?fe(i,e.lng,u,()=>{m.current&&h(x);}):Q(i,u,()=>{m.current&&h(x);})),c&&y&&y!==g&&m.current&&h(x);let O=()=>{m.current&&h(x);};return w&&i?.on(w,O),L&&i?.store.on(L,O),()=>{m.current=false,i&&w&&w?.split(" ").forEach(v=>i.off(v,O)),L&&i&&L.split(" ").forEach(v=>i.store.off(v,O));}},[i,g]),useEffect(()=>{m.current&&c&&h(f);},[i,l,c]);let b=[d,i,c];if(b.t=d,b.i18n=i,b.ready=c,c||!c&&!o)return b;throw new Promise(w=>{e.lng?fe(i,e.lng,u,()=>w()):Q(i,u,()=>w());})};function pe({i18n:s,defaultNS:e,children:t}){let n=useMemo(()=>({i18n:s,defaultNS:e}),[s,e]);return createElement(j.Provider,{value:n},t)}var S=s=>typeof s=="string",J=()=>{let s,e,t=new Promise((n,r)=>{s=n,e=r;});return t.resolve=s,t.reject=e,t},Ve=s=>s==null?"":""+s,Yt=(s,e,t)=>{s.forEach(n=>{e[n]&&(t[n]=e[n]);});},Kt=/###/g,He=s=>s&&s.indexOf("###")>-1?s.replace(Kt,"."):s,_e=s=>!s||S(s),X=(s,e,t)=>{let n=S(e)?e.split("."):e,r=0;for(;r<n.length-1;){if(_e(s))return {};let i=He(n[r]);!s[i]&&t&&(s[i]=new t),Object.prototype.hasOwnProperty.call(s,i)?s=s[i]:s={},++r;}return _e(s)?{}:{obj:s,k:He(n[r])}},Ue=(s,e,t)=>{let{obj:n,k:r}=X(s,e,Object);if(n!==void 0||e.length===1){n[r]=t;return}let i=e[e.length-1],a=e.slice(0,e.length-1),o=X(s,a,Object);for(;o.obj===void 0&&a.length;)i=`${a[a.length-1]}.${i}`,a=a.slice(0,a.length-1),o=X(s,a,Object),o?.obj&&typeof o.obj[`${o.k}.${i}`]<"u"&&(o.obj=void 0);o.obj[`${o.k}.${i}`]=t;},zt=(s,e,t,n)=>{let{obj:r,k:i}=X(s,e,Object);r[i]=r[i]||[],r[i].push(t);},ie=(s,e)=>{let{obj:t,k:n}=X(s,e);if(t&&Object.prototype.hasOwnProperty.call(t,n))return t[n]},Gt=(s,e,t)=>{let n=ie(s,t);return n!==void 0?n:ie(e,t)},We=(s,e,t)=>{for(let n in e)n!=="__proto__"&&n!=="constructor"&&(n in s?S(s[n])||s[n]instanceof String||S(e[n])||e[n]instanceof String?t&&(s[n]=e[n]):We(s[n],e[n],t):s[n]=e[n]);return s},M=s=>s.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),Jt={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},Xt=s=>S(s)?s.replace(/[&<>"'\/]/g,e=>Jt[e]):s,ye=class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[];}getRegExp(e){let t=this.regExpMap.get(e);if(t!==void 0)return t;let n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}},Wt=[" ",",","?","!",";"],Zt=new ye(20),qt=(s,e,t)=>{e=e||"",t=t||"";let n=Wt.filter(a=>e.indexOf(a)<0&&t.indexOf(a)<0);if(n.length===0)return true;let r=Zt.getRegExp(`(${n.map(a=>a==="?"?"\\?":a).join("|")})`),i=!r.test(s);if(!i){let a=s.indexOf(t);a>0&&!r.test(s.substring(0,a))&&(i=true);}return i},xe=function(s,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!s)return;if(s[e])return Object.prototype.hasOwnProperty.call(s,e)?s[e]:void 0;let n=e.split(t),r=s;for(let i=0;i<n.length;){if(!r||typeof r!="object")return;let a,o="";for(let l=i;l<n.length;++l)if(l!==i&&(o+=t),o+=n[l],a=r[o],a!==void 0){if(["string","number","boolean"].indexOf(typeof a)>-1&&l<n.length-1)continue;i+=l-i+1;break}r=a;}return r},ae=s=>s?.replace("_","-"),Qt={type:"logger",log(s){this.output("log",s);},warn(s){this.output("warn",s);},error(s){this.output("error",s);},output(s,e){console?.[s]?.apply?.(console,e);}},be=class s{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(e,t);}init(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||Qt,this.options=t,this.debug=t.debug;}log(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"log","",true)}warn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","",true)}error(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"error","")}deprecate(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","WARNING DEPRECATED: ",true)}forward(e,t,n,r){return r&&!this.debug?null:(S(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new s(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new s(this.logger,e)}},T=new be,H=class{constructor(){this.observers={};}on(e,t){return e.split(" ").forEach(n=>{this.observers[n]||(this.observers[n]=new Map);let r=this.observers[n].get(t)||0;this.observers[n].set(t,r+1);}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t);}}emit(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];this.observers[e]&&Array.from(this.observers[e].entries()).forEach(a=>{let[o,l]=a;for(let u=0;u<l;u++)o(...n);}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(a=>{let[o,l]=a;for(let u=0;u<l;u++)o.apply(o,[e,...n]);});}},oe=class extends H{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=true);}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e);}removeNamespaces(e){let t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1);}getResource(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},i=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator,a=r.ignoreJSONStructure!==void 0?r.ignoreJSONStructure:this.options.ignoreJSONStructure,o;e.indexOf(".")>-1?o=e.split("."):(o=[e,t],n&&(Array.isArray(n)?o.push(...n):S(n)&&i?o.push(...n.split(i)):o.push(n)));let l=ie(this.data,o);return !l&&!t&&!n&&e.indexOf(".")>-1&&(e=o[0],t=o[1],n=o.slice(2).join(".")),l||!a||!S(n)?l:xe(this.data?.[e]?.[t],n,i)}addResource(e,t,n,r){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:false},a=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,o=[e,t];n&&(o=o.concat(a?n.split(a):n)),e.indexOf(".")>-1&&(o=e.split("."),r=t,t=o[1]),this.addNamespaces(t),Ue(this.data,o,r),i.silent||this.emit("added",e,t,n,r);}addResources(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:false};for(let i in n)(S(n[i])||Array.isArray(n[i]))&&this.addResource(e,t,i,n[i],{silent:true});r.silent||this.emit("added",e,t,n);}addResourceBundle(e,t,n,r,i){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:false,skipCopy:false},o=[e,t];e.indexOf(".")>-1&&(o=e.split("."),r=n,n=t,t=o[1]),this.addNamespaces(t);let l=ie(this.data,o)||{};a.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?We(l,n,i):l={...l,...n},Ue(this.data,o,l),a.silent||this.emit("added",e,t,n);}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t);}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){let t=this.getDataByLanguage(e);return !!(t&&Object.keys(t)||[]).find(r=>t[r]&&Object.keys(t[r]).length>0)}toJSON(){return this.data}},Ze={processors:{},addPostProcessor(s){this.processors[s.name]=s;},handle(s,e,t,n,r){return s.forEach(i=>{e=this.processors[i]?.process(e,t,n,r)??e;}),e}},Be={},Ye=s=>!S(s)&&typeof s!="boolean"&&typeof s!="number",le=class s extends H{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),Yt(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=T.create("translator");}changeLanguage(e){e&&(this.language=e);}exists(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};return e==null?false:this.resolve(e,t)?.res!==void 0}extractFromKey(e,t){let n=t.nsSeparator!==void 0?t.nsSeparator:this.options.nsSeparator;n===void 0&&(n=":");let r=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator,i=t.ns||this.options.defaultNS||[],a=n&&e.indexOf(n)>-1,o=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!qt(e,n,r);if(a&&!o){let l=e.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return {key:e,namespaces:S(i)?[i]:i};let u=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(u[0])>-1)&&(i=u.shift()),e=u.join(r);}return {key:e,namespaces:S(i)?[i]:i}}translate(e,t,n){if(typeof t!="object"&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),typeof t=="object"&&(t={...t}),t||(t={}),e==null)return "";Array.isArray(e)||(e=[String(e)]);let r=t.returnDetails!==void 0?t.returnDetails:this.options.returnDetails,i=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator,{key:a,namespaces:o}=this.extractFromKey(e[e.length-1],t),l=o[o.length-1],u=t.lng||this.language,c=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(u?.toLowerCase()==="cimode"){if(c){let k=t.nsSeparator||this.options.nsSeparator;return r?{res:`${l}${k}${a}`,usedKey:a,exactUsedKey:a,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(t)}:`${l}${k}${a}`}return r?{res:a,usedKey:a,exactUsedKey:a,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(t)}:a}let p=this.resolve(e,t),f=p?.res,x=p?.usedKey||a,d=p?.exactUsedKey||a,h=["[object Number]","[object Function]","[object RegExp]"],g=t.joinArrays!==void 0?t.joinArrays:this.options.joinArrays,y=!this.i18nFormat||this.i18nFormat.handleAsObject,m=t.count!==void 0&&!S(t.count),b=s.hasDefaultValue(t),w=m?this.pluralResolver.getSuffix(u,t.count,t):"",L=t.ordinal&&m?this.pluralResolver.getSuffix(u,t.count,{ordinal:false}):"",O=m&&!t.ordinal&&t.count===0,v=O&&t[`defaultValue${this.options.pluralSeparator}zero`]||t[`defaultValue${w}`]||t[`defaultValue${L}`]||t.defaultValue,N=f;y&&!f&&b&&(N=v);let $t=Ye(N),Lt=Object.prototype.toString.apply(N);if(y&&N&&$t&&h.indexOf(Lt)<0&&!(S(g)&&Array.isArray(N))){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");let k=this.options.returnedObjectHandler?this.options.returnedObjectHandler(x,N,{...t,ns:o}):`key '${a} (${this.language})' returned an object instead of string.`;return r?(p.res=k,p.usedParams=this.getUsedParamsDetails(t),p):k}if(i){let k=Array.isArray(N),I=k?[]:{},Ne=k?d:x;for(let R in N)if(Object.prototype.hasOwnProperty.call(N,R)){let D=`${Ne}${i}${R}`;b&&!f?I[R]=this.translate(D,{...t,defaultValue:Ye(v)?v[R]:void 0,joinArrays:false,ns:o}):I[R]=this.translate(D,{...t,joinArrays:false,ns:o}),I[R]===D&&(I[R]=N[R]);}f=I;}}else if(y&&S(g)&&Array.isArray(f))f=f.join(g),f&&(f=this.extendTranslation(f,e,t,n));else {let k=false,I=false;!this.isValidLookup(f)&&b&&(k=true,f=v),this.isValidLookup(f)||(I=true,f=a);let R=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&I?void 0:f,D=b&&v!==f&&this.options.updateMissing;if(I||k||D){if(this.logger.log(D?"updateKey":"missingKey",u,l,a,D?v:f),i){let P=this.resolve(a,{...t,keySeparator:false});P&&P.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.");}let B=[],q=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if(this.options.saveMissingTo==="fallback"&&q&&q[0])for(let P=0;P<q.length;P++)B.push(q[P]);else this.options.saveMissingTo==="all"?B=this.languageUtils.toResolveHierarchy(t.lng||this.language):B.push(t.lng||this.language);let ke=(P,F,Y)=>{let Pe=b&&Y!==f?Y:R;this.options.missingKeyHandler?this.options.missingKeyHandler(P,l,F,Pe,D,t):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(P,l,F,Pe,D,t),this.emit("missingKey",P,l,F,f);};this.options.saveMissing&&(this.options.saveMissingPlurals&&m?B.forEach(P=>{let F=this.pluralResolver.getSuffixes(P,t);O&&t[`defaultValue${this.options.pluralSeparator}zero`]&&F.indexOf(`${this.options.pluralSeparator}zero`)<0&&F.push(`${this.options.pluralSeparator}zero`),F.forEach(Y=>{ke([P],a+Y,t[`defaultValue${Y}`]||v);});}):ke(B,a,v));}f=this.extendTranslation(f,e,t,p,n),I&&f===a&&this.options.appendNamespaceToMissingKey&&(f=`${l}:${a}`),(I||k)&&this.options.parseMissingKeyHandler&&(f=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}:${a}`:a,k?f:void 0));}return r?(p.res=f,p.usedParams=this.getUsedParamsDetails(t),p):f}extendTranslation(e,t,n,r,i){var a=this;if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});let u=S(e)&&(n?.interpolation?.skipOnVariables!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables),c;if(u){let f=e.match(this.interpolator.nestingRegexp);c=f&&f.length;}let p=n.replace&&!S(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(p={...this.options.interpolation.defaultVariables,...p}),e=this.interpolator.interpolate(e,p,n.lng||this.language||r.usedLng,n),u){let f=e.match(this.interpolator.nestingRegexp),x=f&&f.length;c<x&&(n.nest=false);}!n.lng&&r&&r.res&&(n.lng=this.language||r.usedLng),n.nest!==false&&(e=this.interpolator.nest(e,function(){for(var f=arguments.length,x=new Array(f),d=0;d<f;d++)x[d]=arguments[d];return i?.[0]===x[0]&&!n.context?(a.logger.warn(`It seems you are nesting recursively key: ${x[0]} in key: ${t[0]}`),null):a.translate(...x,t)},n)),n.interpolation&&this.interpolator.reset();}let o=n.postProcess||this.options.postProcess,l=S(o)?[o]:o;return e!=null&&l?.length&&n.applyPostProcessor!==false&&(e=Ze.handle(l,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n,r,i,a,o;return S(e)&&(e=[e]),e.forEach(l=>{if(this.isValidLookup(n))return;let u=this.extractFromKey(l,t),c=u.key;r=c;let p=u.namespaces;this.options.fallbackNS&&(p=p.concat(this.options.fallbackNS));let f=t.count!==void 0&&!S(t.count),x=f&&!t.ordinal&&t.count===0,d=t.context!==void 0&&(S(t.context)||typeof t.context=="number")&&t.context!=="",h=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);p.forEach(g=>{this.isValidLookup(n)||(o=g,!Be[`${h[0]}-${g}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(o)&&(Be[`${h[0]}-${g}`]=true,this.logger.warn(`key "${r}" for languages "${h.join(", ")}" won't get resolved as namespace "${o}" 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!!!")),h.forEach(y=>{if(this.isValidLookup(n))return;a=y;let m=[c];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(m,c,y,g,t);else {let w;f&&(w=this.pluralResolver.getSuffix(y,t.count,t));let L=`${this.options.pluralSeparator}zero`,O=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(f&&(m.push(c+w),t.ordinal&&w.indexOf(O)===0&&m.push(c+w.replace(O,this.options.pluralSeparator)),x&&m.push(c+L)),d){let v=`${c}${this.options.contextSeparator}${t.context}`;m.push(v),f&&(m.push(v+w),t.ordinal&&w.indexOf(O)===0&&m.push(v+w.replace(O,this.options.pluralSeparator)),x&&m.push(v+L));}}let b;for(;b=m.pop();)this.isValidLookup(n)||(i=b,n=this.getResource(y,g,b,t));}));});}),{res:n,usedKey:r,exactUsedKey:i,usedLng:a,usedNS:o}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&!S(e.replace),r=n?e.replace:e;if(n&&typeof e.count<"u"&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(let i of t)delete r[i];}return r}static hasDefaultValue(e){let t="defaultValue";for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,t.length)&&e[n]!==void 0)return true;return false}},ue=class{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||false,this.logger=T.create("languageUtils");}getScriptPartFromCode(e){if(e=ae(e),!e||e.indexOf("-")<0)return null;let t=e.split("-");return t.length===2||(t.pop(),t[t.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(t.join("-"))}getLanguagePartFromCode(e){if(e=ae(e),!e||e.indexOf("-")<0)return e;let t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(S(e)&&e.indexOf("-")>-1){let t;try{t=Intl.getCanonicalLocales(e)[0];}catch{}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return (this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(n=>{if(t)return;let r=this.formatLanguageCode(n);(!this.options.supportedLngs||this.isSupportedCode(r))&&(t=r);}),!t&&this.options.supportedLngs&&e.forEach(n=>{if(t)return;let r=this.getLanguagePartFromCode(n);if(this.isSupportedCode(r))return t=r;t=this.options.supportedLngs.find(i=>{if(i===r)return i;if(!(i.indexOf("-")<0&&r.indexOf("-")<0)&&(i.indexOf("-")>0&&r.indexOf("-")<0&&i.substring(0,i.indexOf("-"))===r||i.indexOf(r)===0&&r.length>1))return i});}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return [];if(typeof e=="function"&&(e=e(t)),S(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}toResolveHierarchy(e,t){let n=this.getFallbackCodes(t||this.options.fallbackLng||[],e),r=[],i=a=>{a&&(this.isSupportedCode(a)?r.push(a):this.logger.warn(`rejecting language code not found in supportedLngs: ${a}`));};return S(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&i(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&i(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&i(this.getLanguagePartFromCode(e))):S(e)&&i(this.formatLanguageCode(e)),n.forEach(a=>{r.indexOf(a)<0&&i(this.formatLanguageCode(a));}),r}},Ke={zero:0,one:1,two:2,few:3,many:4,other:5},ze={select:s=>s===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})},Se=class{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=T.create("pluralResolver"),this.pluralRulesCache={};}addRule(e,t){this.rules[e]=t;}clearCache(){this.pluralRulesCache={};}getRule(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=ae(e==="dev"?"en":e),r=t.ordinal?"ordinal":"cardinal",i=JSON.stringify({cleanedCode:n,type:r});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let a;try{a=new Intl.PluralRules(n,{type:r});}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),ze;if(!e.match(/-|_/))return ze;let l=this.languageUtils.getLanguagePartFromCode(e);a=this.getRule(l,t);}return this.pluralRulesCache[i]=a,a}needsPlural(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),n?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(e,n).map(r=>`${t}${r}`)}getSuffixes(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),n?n.resolvedOptions().pluralCategories.sort((r,i)=>Ke[r]-Ke[i]).map(r=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${r}`):[]}getSuffix(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=this.getRule(e,n);return r?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${r.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,n))}},Ge=function(s,e,t){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:true,i=Gt(s,e,t);return !i&&r&&S(t)&&(i=xe(s,t,n),i===void 0&&(i=xe(e,t,n))),i},me=s=>s.replace(/\$/g,"$$$$"),we=class{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=T.create("interpolator"),this.options=e,this.format=e?.interpolation?.format||(t=>t),this.init(e);}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:true});let{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:i,prefixEscaped:a,suffix:o,suffixEscaped:l,formatSeparator:u,unescapeSuffix:c,unescapePrefix:p,nestingPrefix:f,nestingPrefixEscaped:x,nestingSuffix:d,nestingSuffixEscaped:h,nestingOptionsSeparator:g,maxReplaces:y,alwaysFormat:m}=e.interpolation;this.escape=t!==void 0?t:Xt,this.escapeValue=n!==void 0?n:true,this.useRawValueToEscape=r!==void 0?r:false,this.prefix=i?M(i):a||"{{",this.suffix=o?M(o):l||"}}",this.formatSeparator=u||",",this.unescapePrefix=c?"":p||"-",this.unescapeSuffix=this.unescapePrefix?"":c||"",this.nestingPrefix=f?M(f):x||M("$t("),this.nestingSuffix=d?M(d):h||M(")"),this.nestingOptionsSeparator=g||",",this.maxReplaces=y||1e3,this.alwaysFormat=m!==void 0?m:false,this.resetRegExp();}reset(){this.options&&this.init(this.options);}resetRegExp(){let e=(t,n)=>t?.source===n?(t.lastIndex=0,t):new RegExp(n,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`);}interpolate(e,t,n,r){let i,a,o,l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=x=>{if(x.indexOf(this.formatSeparator)<0){let y=Ge(t,l,x,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(y,void 0,n,{...r,...t,interpolationkey:x}):y}let d=x.split(this.formatSeparator),h=d.shift().trim(),g=d.join(this.formatSeparator).trim();return this.format(Ge(t,l,h,this.options.keySeparator,this.options.ignoreJSONStructure),g,n,{...r,...t,interpolationkey:h})};this.resetRegExp();let c=r?.missingInterpolationHandler||this.options.missingInterpolationHandler,p=r?.interpolation?.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return [{regex:this.regexpUnescape,safeValue:x=>me(x)},{regex:this.regexp,safeValue:x=>this.escapeValue?me(this.escape(x)):me(x)}].forEach(x=>{for(o=0;i=x.regex.exec(e);){let d=i[1].trim();if(a=u(d),a===void 0)if(typeof c=="function"){let g=c(e,i,r);a=S(g)?g:"";}else if(r&&Object.prototype.hasOwnProperty.call(r,d))a="";else if(p){a=i[0];continue}else this.logger.warn(`missed to pass in variable ${d} for interpolating ${e}`),a="";else !S(a)&&!this.useRawValueToEscape&&(a=Ve(a));let h=x.safeValue(a);if(e=e.replace(i[0],h),p?(x.regex.lastIndex+=a.length,x.regex.lastIndex-=i[0].length):x.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),e}nest(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r,i,a,o=(l,u)=>{let c=this.nestingOptionsSeparator;if(l.indexOf(c)<0)return l;let p=l.split(new RegExp(`${c}[ ]*{`)),f=`{${p[1]}`;l=p[0],f=this.interpolate(f,a);let x=f.match(/'/g),d=f.match(/"/g);((x?.length??0)%2===0&&!d||d.length%2!==0)&&(f=f.replace(/'/g,'"'));try{a=JSON.parse(f),u&&(a={...u,...a});}catch(h){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,h),`${l}${c}${f}`}return a.defaultValue&&a.defaultValue.indexOf(this.prefix)>-1&&delete a.defaultValue,l};for(;r=this.nestingRegexp.exec(e);){let l=[];a={...n},a=a.replace&&!S(a.replace)?a.replace:a,a.applyPostProcessor=false,delete a.defaultValue;let u=false;if(r[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(r[1])){let c=r[1].split(this.formatSeparator).map(p=>p.trim());r[1]=c.shift(),l=c,u=true;}if(i=t(o.call(this,r[1].trim(),a),a),i&&r[0]===e&&!S(i))return i;S(i)||(i=Ve(i)),i||(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),i=""),u&&(i=l.reduce((c,p)=>this.format(c,p,n.lng,{...n,interpolationkey:r[1].trim()}),i.trim())),e=e.replace(r[0],i),this.regexp.lastIndex=0;}return e}},en=s=>{let e=s.toLowerCase().trim(),t={};if(s.indexOf("(")>-1){let n=s.split("(");e=n[0].toLowerCase().trim();let r=n[1].substring(0,n[1].length-1);e==="currency"&&r.indexOf(":")<0?t.currency||(t.currency=r.trim()):e==="relativetime"&&r.indexOf(":")<0?t.range||(t.range=r.trim()):r.split(";").forEach(a=>{if(a){let[o,...l]=a.split(":"),u=l.join(":").trim().replace(/^'+|'+$/g,""),c=o.trim();t[c]||(t[c]=u),u==="false"&&(t[c]=false),u==="true"&&(t[c]=true),isNaN(u)||(t[c]=parseInt(u,10));}});}return {formatName:e,formatOptions:t}},V=s=>{let e={};return (t,n,r)=>{let i=r;r&&r.interpolationkey&&r.formatParams&&r.formatParams[r.interpolationkey]&&r[r.interpolationkey]&&(i={...i,[r.interpolationkey]:void 0});let a=n+JSON.stringify(i),o=e[a];return o||(o=s(ae(n),r),e[a]=o),o(t)}},ve=class{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=T.create("formatter"),this.options=e,this.formats={number:V((t,n)=>{let r=new Intl.NumberFormat(t,{...n});return i=>r.format(i)}),currency:V((t,n)=>{let r=new Intl.NumberFormat(t,{...n,style:"currency"});return i=>r.format(i)}),datetime:V((t,n)=>{let r=new Intl.DateTimeFormat(t,{...n});return i=>r.format(i)}),relativetime:V((t,n)=>{let r=new Intl.RelativeTimeFormat(t,{...n});return i=>r.format(i,n.range||"day")}),list:V((t,n)=>{let r=new Intl.ListFormat(t,{...n});return i=>r.format(i)})},this.init(e);}init(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=t.interpolation.formatSeparator||",";}add(e,t){this.formats[e.toLowerCase().trim()]=t;}addCached(e,t){this.formats[e.toLowerCase().trim()]=V(t);}format(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},i=t.split(this.formatSeparator);if(i.length>1&&i[0].indexOf("(")>1&&i[0].indexOf(")")<0&&i.find(o=>o.indexOf(")")>-1)){let o=i.findIndex(l=>l.indexOf(")")>-1);i[0]=[i[0],...i.splice(1,o)].join(this.formatSeparator);}return i.reduce((o,l)=>{let{formatName:u,formatOptions:c}=en(l);if(this.formats[u]){let p=o;try{let f=r?.formatParams?.[r.interpolationkey]||{},x=f.locale||f.lng||r.locale||r.lng||n;p=this.formats[u](o,x,{...c,...r,...f});}catch(f){this.logger.warn(f);}return p}else this.logger.warn(`there was no format function for ${u}`);return o},e)}},tn=(s,e)=>{s.pending[e]!==void 0&&(delete s.pending[e],s.pendingCount--);},Oe=class extends H{constructor(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=T.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(n,r.backend,r);}queueLoad(e,t,n,r){let i={},a={},o={},l={};return e.forEach(u=>{let c=true;t.forEach(p=>{let f=`${u}|${p}`;!n.reload&&this.store.hasResourceBundle(u,p)?this.state[f]=2:this.state[f]<0||(this.state[f]===1?a[f]===void 0&&(a[f]=true):(this.state[f]=1,c=false,a[f]===void 0&&(a[f]=true),i[f]===void 0&&(i[f]=true),l[p]===void 0&&(l[p]=true)));}),c||(o[u]=true);}),(Object.keys(i).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(i),pending:Object.keys(a),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(l)}}loaded(e,t,n){let r=e.split("|"),i=r[0],a=r[1];t&&this.emit("failedLoading",i,a,t),!t&&n&&this.store.addResourceBundle(i,a,n,void 0,void 0,{skipCopy:true}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);let o={};this.queue.forEach(l=>{zt(l.loaded,[i],a),tn(l,e),t&&l.errors.push(t),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(u=>{o[u]||(o[u]={});let c=l.loaded[u];c.length&&c.forEach(p=>{o[u][p]===void 0&&(o[u][p]=true);});}),l.done=true,l.errors.length?l.callback(l.errors):l.callback());}),this.emit("loaded",o),this.queue=this.queue.filter(l=>!l.done);}read(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,a=arguments.length>5?arguments[5]:void 0;if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:i,callback:a});return}this.readingCalls++;let o=(u,c)=>{if(this.readingCalls--,this.waitingReads.length>0){let p=this.waitingReads.shift();this.read(p.lng,p.ns,p.fcName,p.tried,p.wait,p.callback);}if(u&&c&&r<this.maxRetries){setTimeout(()=>{this.read.call(this,e,t,n,r+1,i*2,a);},i);return}a(u,c);},l=this.backend[n].bind(this.backend);if(l.length===2){try{let u=l(e,t);u&&typeof u.then=="function"?u.then(c=>o(null,c)).catch(o):o(null,u);}catch(u){o(u);}return}return l(e,t,o)}prepareLoading(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),r&&r();S(e)&&(e=this.languageUtils.toResolveHierarchy(e)),S(t)&&(t=[t]);let i=this.queueLoad(e,t,n,r);if(!i.toLoad.length)return i.pending.length||r(),null;i.toLoad.forEach(a=>{this.loadOne(a);});}load(e,t,n){this.prepareLoading(e,t,{},n);}reload(e,t,n){this.prepareLoading(e,t,{reload:true},n);}loadOne(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",n=e.split("|"),r=n[0],i=n[1];this.read(r,i,"read",void 0,void 0,(a,o)=>{a&&this.logger.warn(`${t}loading namespace ${i} for language ${r} failed`,a),!a&&o&&this.logger.log(`${t}loaded namespace ${i} for language ${r}`,o),this.loaded(e,a,o);});}saveMissing(e,t,n,r,i){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},o=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(t)){this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(n==null||n==="")){if(this.backend?.create){let l={...a,isUpdate:i},u=this.backend.create.bind(this.backend);if(u.length<6)try{let c;u.length===5?c=u(e,t,n,r,l):c=u(e,t,n,r),c&&typeof c.then=="function"?c.then(p=>o(null,p)).catch(o):o(null,c);}catch(c){o(c);}else u(e,t,n,r,o,l);}!e||!e[0]||this.store.addResource(e[0],t,n,r);}}},Je=()=>({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:s=>{let e={};if(typeof s[1]=="object"&&(e=s[1]),S(s[1])&&(e.defaultValue=s[1]),S(s[2])&&(e.tDescription=s[2]),typeof s[2]=="object"||typeof s[3]=="object"){let t=s[3]||s[2];Object.keys(t).forEach(n=>{e[n]=t[n];});}return e},interpolation:{escapeValue:true,format:s=>s,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:true}}),Xe=s=>(S(s.ns)&&(s.ns=[s.ns]),S(s.fallbackLng)&&(s.fallbackLng=[s.fallbackLng]),S(s.fallbackNS)&&(s.fallbackNS=[s.fallbackNS]),s.supportedLngs?.indexOf?.("cimode")<0&&(s.supportedLngs=s.supportedLngs.concat(["cimode"])),typeof s.initImmediate=="boolean"&&(s.initAsync=s.initImmediate),s),re=()=>{},nn=s=>{Object.getOwnPropertyNames(Object.getPrototypeOf(s)).forEach(t=>{typeof s[t]=="function"&&(s[t]=s[t].bind(s));});},ce=class s extends H{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if(super(),this.options=Xe(e),this.services={},this.logger=T,this.modules={external:[]},nn(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t);},0);}}init(){var e=this;let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;this.isInitializing=true,typeof t=="function"&&(n=t,t={}),t.defaultNS==null&&t.ns&&(S(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));let r=Je();this.options={...r,...this.options,...Xe(t)},this.options.interpolation={...r.interpolation,...this.options.interpolation},t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator);let i=c=>c?typeof c=="function"?new c:c:null;if(!this.options.isClone){this.modules.logger?T.init(i(this.modules.logger),this.options):T.init(null,this.options);let c;this.modules.formatter?c=this.modules.formatter:c=ve;let p=new ue(this.options);this.store=new oe(this.options.resources,this.options);let f=this.services;f.logger=T,f.resourceStore=this.store,f.languageUtils=p,f.pluralResolver=new Se(p,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),c&&(!this.options.interpolation.format||this.options.interpolation.format===r.interpolation.format)&&(f.formatter=i(c),f.formatter.init(f,this.options),this.options.interpolation.format=f.formatter.format.bind(f.formatter)),f.interpolator=new we(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new Oe(i(this.modules.backend),f.resourceStore,f,this.options),f.backendConnector.on("*",function(x){for(var d=arguments.length,h=new Array(d>1?d-1:0),g=1;g<d;g++)h[g-1]=arguments[g];e.emit(x,...h);}),this.modules.languageDetector&&(f.languageDetector=i(this.modules.languageDetector),f.languageDetector.init&&f.languageDetector.init(f,this.options.detection,this.options)),this.modules.i18nFormat&&(f.i18nFormat=i(this.modules.i18nFormat),f.i18nFormat.init&&f.i18nFormat.init(this)),this.translator=new le(this.services,this.options),this.translator.on("*",function(x){for(var d=arguments.length,h=new Array(d>1?d-1:0),g=1;g<d;g++)h[g-1]=arguments[g];e.emit(x,...h);}),this.modules.external.forEach(x=>{x.init&&x.init(this);});}if(this.format=this.options.interpolation.format,n||(n=re),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){let c=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);c.length>0&&c[0]!=="dev"&&(this.options.lng=c[0]);}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(c=>{this[c]=function(){return e.store[c](...arguments)};}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(c=>{this[c]=function(){return e.store[c](...arguments),e};});let l=J(),u=()=>{let c=(p,f)=>{this.isInitializing=false,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=true,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),l.resolve(f),n(p,f);};if(this.languages&&!this.isInitialized)return c(null,this.t.bind(this));this.changeLanguage(this.options.lng,c);};return this.options.resources||!this.options.initAsync?u():setTimeout(u,0),l}loadResources(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:re,r=S(e)?e:this.language;if(typeof e=="function"&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(r?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return n();let i=[],a=o=>{if(!o||o==="cimode")return;this.services.languageUtils.toResolveHierarchy(o).forEach(u=>{u!=="cimode"&&i.indexOf(u)<0&&i.push(u);});};r?a(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(l=>a(l)),this.options.preload?.forEach?.(o=>a(o)),this.services.backendConnector.load(i,this.options.ns,o=>{!o&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(o);});}else n(null);}reloadResources(e,t,n){let r=J();return typeof e=="function"&&(n=e,e=void 0),typeof t=="function"&&(n=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),n||(n=re),this.services.backendConnector.reload(e,t,i=>{r.resolve(),n(i);}),r}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&Ze.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1))for(let t=0;t<this.languages.length;t++){let n=this.languages[t];if(!(["cimode","dev"].indexOf(n)>-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}}changeLanguage(e,t){var n=this;this.isLanguageChangingTo=e;let r=J();this.emit("languageChanging",e);let i=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l);},a=(l,u)=>{u?(i(u),this.translator.changeLanguage(u),this.isLanguageChangingTo=void 0,this.emit("languageChanged",u),this.logger.log("languageChanged",u)):this.isLanguageChangingTo=void 0,r.resolve(function(){return n.t(...arguments)}),t&&t(l,function(){return n.t(...arguments)});},o=l=>{!e&&!l&&this.services.languageDetector&&(l=[]);let u=S(l)?l:this.services.languageUtils.getBestMatchFromCodes(l);u&&(this.language||i(u),this.translator.language||this.translator.changeLanguage(u),this.services.languageDetector?.cacheUserLanguage?.(u)),this.loadResources(u,c=>{a(c,u);});};return !e&&this.services.languageDetector&&!this.services.languageDetector.async?o(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(o):this.services.languageDetector.detect(o):o(e),r}getFixedT(e,t,n){var r=this;let i=function(a,o){let l;if(typeof o!="object"){for(var u=arguments.length,c=new Array(u>2?u-2:0),p=2;p<u;p++)c[p-2]=arguments[p];l=r.options.overloadTranslationOptionHandler([a,o].concat(c));}else l={...o};l.lng=l.lng||i.lng,l.lngs=l.lngs||i.lngs,l.ns=l.ns||i.ns,l.keyPrefix!==""&&(l.keyPrefix=l.keyPrefix||n||i.keyPrefix);let f=r.options.keySeparator||".",x;return l.keyPrefix&&Array.isArray(a)?x=a.map(d=>`${l.keyPrefix}${f}${d}`):x=l.keyPrefix?`${l.keyPrefix}${f}${a}`:a,r.t(x,l)};return S(e)?i.lng=e:i.lngs=e,i.ns=t,i.keyPrefix=n,i}t(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.translator?.translate(...t)}exists(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.translator?.exists(...t)}setDefaultNamespace(e){this.options.defaultNS=e;}hasLoadedNamespace(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),false;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),false;let n=t.lng||this.resolvedLanguage||this.languages[0],r=this.options?this.options.fallbackLng:false,i=this.languages[this.languages.length-1];if(n.toLowerCase()==="cimode")return true;let a=(o,l)=>{let u=this.services.backendConnector.state[`${o}|${l}`];return u===-1||u===0||u===2};if(t.precheck){let o=t.precheck(this,a);if(o!==void 0)return o}return !!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(n,e)&&(!r||a(i,e)))}loadNamespaces(e,t){let n=J();return this.options.ns?(S(e)&&(e=[e]),e.forEach(r=>{this.options.ns.indexOf(r)<0&&this.options.ns.push(r);}),this.loadResources(r=>{n.resolve(),t&&t(r);}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){let n=J();S(e)&&(e=[e]);let r=this.options.preload||[],i=e.filter(a=>r.indexOf(a)<0&&this.services.languageUtils.isSupportedCode(a));return i.length?(this.options.preload=r.concat(i),this.loadResources(a=>{n.resolve(),t&&t(a);}),n):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!e)return "rtl";let t=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],n=this.services?.languageUtils||new ue(Je());return t.indexOf(n.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new s(e,t)}cloneInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:re,n=e.forkResourceStore;n&&delete e.forkResourceStore;let r={...this.options,...e,isClone:true},i=new s(r);if((e.debug!==void 0||e.prefix!==void 0)&&(i.logger=i.logger.clone(e)),["store","services","language"].forEach(o=>{i[o]=this[o];}),i.services={...this.services},i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},n){let o=Object.keys(this.store.data).reduce((l,u)=>(l[u]={...this.store.data[u]},Object.keys(l[u]).reduce((c,p)=>(c[p]={...l[u][p]},c),{})),{});i.store=new oe(o,r),i.services.resourceStore=i.store;}return i.translator=new le(i.services,r),i.translator.on("*",function(o){for(var l=arguments.length,u=new Array(l>1?l-1:0),c=1;c<l;c++)u[c-1]=arguments[c];i.emit(o,...u);}),i.init(r,t),i.translator.options=r,i.translator.backendConnector.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i}toJSON(){return {options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}},$=ce.createInstance();$.createInstance=ce.createInstance;$.createInstance;$.dir;$.init;$.loadResources;$.reloadResources;$.use;$.changeLanguage;$.getFixedT;var tr=$.t;$.exists;$.setDefaultNamespace;$.hasLoadedNamespace;$.loadNamespaces;$.loadLanguages;var{slice:sn,forEach:rn}=[];function an(s){return rn.call(sn.call(arguments,1),e=>{if(e)for(let t in e)s[t]===void 0&&(s[t]=e[t]);}),s}function on(s){return typeof s!="string"?false:[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(t=>t.test(s))}var qe=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,ln=function(s,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},r=encodeURIComponent(e),i=`${s}=${r}`;if(n.maxAge>0){let a=n.maxAge-0;if(Number.isNaN(a))throw new Error("maxAge should be a Number");i+=`; Max-Age=${Math.floor(a)}`;}if(n.domain){if(!qe.test(n.domain))throw new TypeError("option domain is invalid");i+=`; Domain=${n.domain}`;}if(n.path){if(!qe.test(n.path))throw new TypeError("option path is invalid");i+=`; Path=${n.path}`;}if(n.expires){if(typeof n.expires.toUTCString!="function")throw new TypeError("option expires is invalid");i+=`; Expires=${n.expires.toUTCString()}`;}if(n.httpOnly&&(i+="; HttpOnly"),n.secure&&(i+="; Secure"),n.sameSite)switch(typeof n.sameSite=="string"?n.sameSite.toLowerCase():n.sameSite){case true:i+="; SameSite=Strict";break;case "lax":i+="; SameSite=Lax";break;case "strict":i+="; SameSite=Strict";break;case "none":i+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return n.partitioned&&(i+="; Partitioned"),i},Qe={create(s,e,t,n){let r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};t&&(r.expires=new Date,r.expires.setTime(r.expires.getTime()+t*60*1e3)),n&&(r.domain=n),document.cookie=ln(s,e,r);},read(s){let e=`${s}=`,t=document.cookie.split(";");for(let n=0;n<t.length;n++){let r=t[n];for(;r.charAt(0)===" ";)r=r.substring(1,r.length);if(r.indexOf(e)===0)return r.substring(e.length,r.length)}return null},remove(s,e){this.create(s,"",-1,e);}},un={name:"cookie",lookup(s){let{lookupCookie:e}=s;if(e&&typeof document<"u")return Qe.read(e)||void 0},cacheUserLanguage(s,e){let{lookupCookie:t,cookieMinutes:n,cookieDomain:r,cookieOptions:i}=e;t&&typeof document<"u"&&Qe.create(t,s,n,r,i);}},cn={name:"querystring",lookup(s){let{lookupQuerystring:e}=s,t;if(typeof window<"u"){let{search:n}=window.location;!window.location.search&&window.location.hash?.indexOf("?")>-1&&(n=window.location.hash.substring(window.location.hash.indexOf("?")));let i=n.substring(1).split("&");for(let a=0;a<i.length;a++){let o=i[a].indexOf("=");o>0&&i[a].substring(0,o)===e&&(t=i[a].substring(o+1));}}return t}},fn={name:"hash",lookup(s){let{lookupHash:e,lookupFromHashIndex:t}=s,n;if(typeof window<"u"){let{hash:r}=window.location;if(r&&r.length>2){let i=r.substring(1);if(e){let a=i.split("&");for(let o=0;o<a.length;o++){let l=a[o].indexOf("=");l>0&&a[o].substring(0,l)===e&&(n=a[o].substring(l+1));}}if(n)return n;if(!n&&t>-1){let a=r.match(/\/([a-zA-Z-]*)/g);return Array.isArray(a)?a[typeof t=="number"?t:0]?.replace("/",""):void 0}}}return n}},_=null,et=()=>{if(_!==null)return _;try{if(_=typeof window<"u"&&window.localStorage!==null,!_)return !1;let s="i18next.translate.boo";window.localStorage.setItem(s,"foo"),window.localStorage.removeItem(s);}catch{_=false;}return _},dn={name:"localStorage",lookup(s){let{lookupLocalStorage:e}=s;if(e&&et())return window.localStorage.getItem(e)||void 0},cacheUserLanguage(s,e){let{lookupLocalStorage:t}=e;t&&et()&&window.localStorage.setItem(t,s);}},U=null,tt=()=>{if(U!==null)return U;try{if(U=typeof window<"u"&&window.sessionStorage!==null,!U)return !1;let s="i18next.translate.boo";window.sessionStorage.setItem(s,"foo"),window.sessionStorage.removeItem(s);}catch{U=false;}return U},gn={name:"sessionStorage",lookup(s){let{lookupSessionStorage:e}=s;if(e&&tt())return window.sessionStorage.getItem(e)||void 0},cacheUserLanguage(s,e){let{lookupSessionStorage:t}=e;t&&tt()&&window.sessionStorage.setItem(t,s);}},hn={name:"navigator",lookup(s){let e=[];if(typeof navigator<"u"){let{languages:t,userLanguage:n,language:r}=navigator;if(t)for(let i=0;i<t.length;i++)e.push(t[i]);n&&e.push(n),r&&e.push(r);}return e.length>0?e:void 0}},pn={name:"htmlTag",lookup(s){let{htmlTag:e}=s,t,n=e||(typeof document<"u"?document.documentElement:null);return n&&typeof n.getAttribute=="function"&&(t=n.getAttribute("lang")),t}},mn={name:"path",lookup(s){let{lookupFromPathIndex:e}=s;if(typeof window>"u")return;let t=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(t)?t[typeof e=="number"?e:0]?.replace("/",""):void 0}},yn={name:"subdomain",lookup(s){let{lookupFromSubdomainIndex:e}=s,t=typeof e=="number"?e+1:1,n=typeof window<"u"&&window.location?.hostname?.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(n)return n[t]}},nt=false;try{document.cookie,nt=!0;}catch{}var st=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];nt||st.splice(1,1);var xn=()=>({order:st,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:s=>s}),W=class{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(e,t);}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=e,this.options=an(t,this.options||{},xn()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=r=>r.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=n,this.addDetector(un),this.addDetector(cn),this.addDetector(dn),this.addDetector(gn),this.addDetector(hn),this.addDetector(pn),this.addDetector(mn),this.addDetector(yn),this.addDetector(fn);}addDetector(e){return this.detectors[e.name]=e,this}detect(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,t=[];return e.forEach(n=>{if(this.detectors[n]){let r=this.detectors[n].lookup(this.options);r&&typeof r=="string"&&(r=[r]),r&&(t=t.concat(r));}}),t=t.filter(n=>n!=null&&!on(n)).map(n=>this.options.convertDetectedLanguage(n)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?t:t.length>0?t[0]:null}cacheUserLanguage(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;t&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||t.forEach(n=>{this.detectors[n]&&this.detectors[n].cacheUserLanguage(e,this.options);}));}};W.type="languageDetector";var rt={"search...":"T\xECm ki\u1EBFm...",search:"T\xECm ki\u1EBFm",search_more:"T\xECm ki\u1EBFm th\xEAm",for:"cho",cancel:"H\u1EE7y",empty_data:"D\u1EEF li\u1EC7u tr\u1ED1ng",detail_button:"Chi ti\u1EBFt",cancel_button:"H\u1EE7y",choose:"Ch\u1ECDn",total:"T\u1ED5ng ti\u1EC1n",no:"Kh\xF4ng",loading:"\u0110ang t\u1EA3i",active:"Ho\u1EA1t \u0111\u1ED9ng",in_active:"Ng\u01B0ng ho\u1EA1t \u0111\u1ED9ng",new:"M\u1EDBi",add_line:"Th\xEAm d\xF2ng",choose_place:"Vui l\xF2ng ch\u1ECDn",filter_by:"B\u1ED9 l\u1ECDc",group_by:"Nh\xF3m theo",or:"ho\u1EB7c",second_ago:"gi\xE2y tr\u01B0\u1EDBc",minute_ago:"ph\xFAt tr\u01B0\u1EDBc",hour_ago:"gi\u1EDD tr\u01B0\u1EDBc",day_ago:"ng\xE0y tr\u01B0\u1EDBc",month_ago:"th\xE1ng tr\u01B0\u1EDBc",year_ago:"n\u0103m tr\u01B0\u1EDBc",second_future:"gi\xE2y n\u1EEFa",minute_future:"ph\xFAt n\u1EEFa",hour_future:"gi\u1EDD n\u1EEFa",day_future:"ng\xE0y n\u1EEFa",month_future:"th\xE1ng n\u1EEFa",year_future:"n\u0103m n\u1EEFa",now:"B\xE2y gi\u1EDD",download_file:"T\u1EA3i xu\u1ED1ng t\u1EC7p n\xE0y",upload_success:"T\u1EA3i t\u1EC7p l\xEAn th\xE0nh c\xF4ng",upload_failure:"T\u1EA3i t\u1EC7p l\xEAn th\u1EA5t b\u1EA1i",file_accept_single:"Ch\u1EC9 ch\u1EA5p nh\u1EADn c\xE1c \u0111\u1ECBnh d\u1EA1ng JPEG, PNG, PDF, MP4, XLS, XLXS, ZIP v\xE0 m\u1ED7i t\u1EC7p c\xF3 dung l\u01B0\u1EE3ng t\u1ED1i \u0111a l\xE0 10MB.",file_accept_total:"Ch\u1EC9 ch\u1EA5p nh\u1EADn c\xE1c \u0111\u1ECBnh d\u1EA1ng JPEG, PNG, PDF, MP4, XLS, XLXS, ZIP v\xE0 t\u1ED5ng dung l\u01B0\u1EE3ng t\u1ED1i \u0111a l\xE0 50MB.",must_required:"l\xE0 b\u1EAFt bu\u1ED9c.","none-validated":"Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7",invalid_number:"\u0110\u1ECBnh d\u1EA1ng s\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7",upload_file_placeholder:"T\u1EA3i t\u1EC7p c\u1EE7a b\u1EA1n","no-available":"Kh\xF4ng c\xF3 l\u1EF1a ch\u1ECDn n\xE0o",paid_amount:"S\u1ED1 ti\u1EC1n \u0111\xE3 tr\u1EA3",remanining_amount:"S\u1ED1 ti\u1EC1n c\xF2n l\u1EA1i",only_image_accept:"Ch\u1EC9 \u0111\u01B0\u1EE3c t\u1EA3i l\xEAn h\xECnh \u1EA3nh","text-only":"Ch\u1EC9 \u0111\u01B0\u1EE3c nh\u1EADp ch\u1EEF (kh\xF4ng ch\u1EE9a s\u1ED1 v\xE0 k\xFD t\u1EF1 \u0111\u1EB7c bi\u1EC7t)","number-only":"Ch\u1EC9 \u0111\u01B0\u1EE3c nh\u1EADp s\u1ED1 (kh\xF4ng ch\u1EE9a ch\u1EEF v\xE0 k\xFD t\u1EF1 \u0111\u1EB7c bi\u1EC7t)","email-only":"Email kh\xF4ng h\u1EE3p l\u1EC7","phone-only":"S\u1ED1 \u0111i\u1EC7n tho\u1EA1i kh\xF4ng h\u1EE3p l\u1EC7",message:"M\u1EADt kh\u1EA9u ph\u1EA3i c\xF3 t\u1EEB {{min}} \u0111\u1EBFn {{max}} k\xFD t\u1EF1","message-text-error":" kh\xF4ng \u0111\u01B0\u1EE3c v\u01B0\u1EE3t qu\xE1 {{max}} k\xFD t\u1EF1",upcase:", {{count}} ch\u1EEF in hoa",digit:", {{count}} s\u1ED1",special:", {{count}} k\xFD t\u1EF1 \u0111\u1EB7c bi\u1EC7t",upload_files_accept:"Ch\u1EC9 ch\u1EA5p nh\u1EADn c\xE1c \u0111\u1ECBnh d\u1EA1ng JPEG, PNG, PDF, MP4, XLS, XLXS, ZIP"};var it={"none-validated":"Invalid value","search...":"Search...",search:"Search",search_more:"Search more",for:"for",cancel:"Cancel",choose:"Choose",total:"Total",no:"No",loading:"Loading",detail_button:"Detail",cancel_button:"Cancel",empty_data:"No data",new:"New",add_line:"Add a line",choose_place:"Please choose",filter_by:"Filter",group_by:"Group By",or:"or",now:"Now",second_ago:"seconds ago",minute_ago:"minutes ago",hour_ago:"hours ago",day_ago:"days ago",month_ago:"months ago",year_ago:"years ago",second_future:"seconds",minute_future:"minutes",hour_future:"hours",day_future:"days",month_future:"months",year_future:"years",download_file:"Download this file",upload_success:"Upload file success",upload_failure:"Upload file failure",file_accept_single:"Only JPEG, PNG, PDF, MP4, XLS, XLXS, ZIP, JSON formats are allowed, and each file should be up to 10MB.",file_accept_total:"Only JPEG, PNG, PDF, MP4, XLS, XLXS, ZIP, JSON formats are allowed, and total should be up to 50MB.",must_required:"is required",invalid_number:"Invalid number",active:"Active",in_active:"Inactive",upload_file_placeholder:"Upload your file","no-available":"No options available",paid_amount:"Amount Paid",remanining_amount:"Amount Remaining",only_image_accept:"Only accept image","text-only":"Only letters (no numbers or special characters)","number-only":"Only enter numbers (no letters or special characters)","email-only":"Invalid email address","phone-only":"Invalid phone number",message:"Password must be between {{min}} and {{max}} characters","message-text-error":" must not exceed {{max}} characters",upcase:", {{count}} uppercase letter",digit:", {{count}} digit",special:", {{count}} special character",upload_files_accept:"Only JPEG, PNG, PDF, MP4, XLS, XLXS, ZIP, JSON formats are allowed"};$.use(W).use(ne).init({resources:{vi:{translation:rt},en:{translation:it}},fallbackLng:"vi",lng:"vi_VN",debug:false,nonExplicitSupportedLngs:true,interpolation:{escapeValue:false},detection:{caches:["cookie"]}});var Z=$;var ot=createContext(null),$n=({children:s,lang:e})=>{useEffect(()=>{e&&Z.changeLanguage(e);},[e]);let{t}=G();return jsx(ot.Provider,{value:{lang:Z.language,t,changeLanguage:Z.changeLanguage},children:jsx(pe,{i18n:Z,children:s})})},$e=()=>{let s=useContext(ot);if(!s)throw new Error("useI18n must be used within I18nProvider");return s};var lt=()=>{let{t:s}=$e();return {getRelativeTime:t=>{let n=[{unit:"year",seconds:31536e3,keyPast:"year_ago",keyFuture:"year_future"},{unit:"month",seconds:2592e3,keyPast:"month_ago",keyFuture:"month_future"},{unit:"day",seconds:86400,keyPast:"day_ago",keyFuture:"day_future"},{unit:"hour",seconds:3600,keyPast:"hour_ago",keyFuture:"hour_future"},{unit:"minute",seconds:60,keyPast:"minute_ago",keyFuture:"minute_future"},{unit:"second",seconds:1,keyPast:"second_ago",keyFuture:"second_future"}],r=new Date,i,a,o,l=0,u=0,c=0,p=t.split(/[- :]/).map(Number);p[0]>31?[i,a,o]=p:[o,a,i]=p,p.length>3&&([l,u,c]=p.slice(3));let f=new Date(i,a-1,o,l,u,c);l===0&&u===0&&c===0&&f.setHours(23,59,59);let x=Math.floor((f.getTime()-r.getTime())/1e3),d=x>0,h=Math.abs(x);for(let{seconds:g,keyPast:y,keyFuture:m}of n){let b=h/g;if(b>=1)return b=d?Math.ceil(b):Math.floor(b),d?`${b} ${s(m,{count:b})}`:`${b} ${s(y,{count:b})}`}return s("now")}}};function ut(s,e){return e==="text"?/^[\p{L}\s]+$/u.test(s):e==="number"?/^[0-9]+$/.test(s):e==="email"?/^[a-zA-Z0-9._]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(s):e==="phone"?/^(0|\+?84)[0-9]{9}$/.test(s):false}function ct(s,e,t,n,r){let i=`M\u1EADt kh\u1EA9u ph\u1EA3i c\xF3 t\u1EEB ${s} \u0111\u1EBFn ${e} k\xFD t\u1EF1`;return (t||t==="0")&&(i+=`, ${t} ch\u1EEF in hoa`),(n||n==="0")&&(i+=`, ${n} s\u1ED1`),(r||r==="0")&&(i+=`, ${r} k\xFD t\u1EF1 \u0111\u1EB7c bi\u1EC7t`),i}var ft=(s,e)=>{let t=e-s+1;return Array.from({length:t},(n,r)=>r+s)},dt=s=>isNaN(s)?"":s?.toString()?.replace(/\B(?=(\d{3})+(?!\d))/g,","),gt=s=>{if(!s)return "0";let e=s.replace(/[^\d]/g,"");return e?parseFloat(e):""},ht=(s,e=false)=>{if(!s||typeof s!="string")return null;let t=s.replace(/[^0-9-\/:\s]/g,""),n="YYYY-MM-DD",r="YYYY-MM-DD HH:mm:ss",i=C().format("DD"),a=C().format("MM"),o=C().format("YYYY"),l="00:00:00",u=parseInt(o)+10,c=(d,h,g)=>C(`${d}-${h}-${g}`,"DD-MM-YYYY",true).isValid(),p=(d,h="00",g="00")=>{let y=parseInt(d,10),m=parseInt(h,10),b=parseInt(g,10);return y>=0&&y<=23&&m>=0&&m<=59&&b>=0&&b<=59},f=(d,h,g,y=l)=>{let m=C(`${d}-${h}-${g} ${y}`,"DD-MM-YYYY HH:mm:ss");return m.isValid()?e?(m=m.subtract(7,"hours"),m.format(r)):m.format(n):null};if(e&&s.match(/^\d{1,2}[\/-]\d{1,2}[\/-]\d{2,4}\s+\d{1,2}(:\d{1,2}(:\d{1,2})?)?$/)){let[d,h]=s.split(/\s+/),g=d.split(/[\/-]/),y=h.split(":"),m=g[0].padStart(2,"0"),b=g[1].padStart(2,"0"),w=g[2].length<=2?`20${g[2].padStart(2,"0")}`:g[2].padStart(4,"0"),L=y[0].padStart(2,"0"),O=y[1]?y[1].padStart(2,"0"):"00",v=y[2]?y[2].padStart(2,"0"):"00";if(c(m,b,w)&&p(L,O,v)){let N=C(`${m}-${b}-${w} ${L}:${O}:${v}`,"DD-MM-YYYY HH:mm:ss");return N.isValid()?(N=N.subtract(7,"hours"),N.format(r)):null}return null}if(t.match(/^\d{4}-\d{2}-\d{2}$/)){let[d,h,g]=t.split("-");return c(g,h,d)?f(g,h,d):null}if(t.match(/^\d{1,2}\/\d{1,2}\/\d{2,4}$/)){let[d,h,g]=t.split("/"),y=d.padStart(2,"0"),m=h.padStart(2,"0"),b=g.length<=2?`20${g.padStart(2,"0")}`:g.padStart(4,"0");return c(y,m,b)?f(y,m,b):null}if(t.match(/^\d{1,2}-\d{1,2}-\d{2,4}$/)){let[d,h,g]=t.split("-"),y=d.padStart(2,"0"),m=h.padStart(2,"0"),b=g.length<=2?`20${g.padStart(2,"0")}`:g.padStart(4,"0");return c(y,m,b)?f(y,m,b):null}if(t.match(/^\d{1,2}[\/-]\d{1,2}$/)){let[d,h]=t.split(/[\/-]/),g=d.padStart(2,"0"),y=h.padStart(2,"0");return c(g,y,o)?f(g,y,o):null}if(t.match(/^\d{4}$/)){let d=parseInt(t,10);if(d>=2e3&&d<=u)return c(i,a,d.toString())?f(i,a,d.toString()):null;let h=t.slice(0,2),g=t.slice(2,4);return c(h,g,o)?f(h,g,o):null}if(t.startsWith("-")&&/^\-\d+$/.test(t)){let d=Math.abs(parseInt(t,10)),h=C().subtract(d,"days");return e&&(h=h.subtract(7,"hours")),h.isValid()?e?h.format(r):h.format(n):null}if(s.match(/^\d{1,2}[^0-9-\/]+\d{1,2}[^0-9-\/]+\d{2,4}.*$/)){let d=s.split(/[^0-9-\/]+/).filter(Boolean),h=d[0].padStart(2,"0"),g=d[1].padStart(2,"0"),y=d[2];return y=y.length===2?`20${y}`:y.padStart(4,"0"),c(h,g,y)?f(h,g,y):null}if(e){if(t.length===9){let d=t.slice(0,2),h=t.slice(2,4),g=t.slice(4,8),y=t.slice(8,9).padStart(2,"0");if(c(d,h,g)&&p(y)){let m=C(`${d}-${h}-${g} ${y}:00:00`,"DD-MM-YYYY HH:mm:ss");return m.isValid()?(m=m.subtract(7,"hours"),m.format(r)):null}return null}if(t.length===10){let d=t.slice(0,2),h=t.slice(2,4),g=t.slice(4,8),y=t.slice(8,10);if(c(d,h,g)&&p(y)){let m=C(`${d}-${h}-${g} ${y}:00:00`,"DD-MM-YYYY HH:mm:ss");return m.isValid()?(m=m.subtract(7,"hours"),m.format(r)):null}return null}if(t.length===11){let d=t.slice(0,2),h=t.slice(2,4),g=t.slice(4,8),y=t.slice(8,10),m=t.slice(10,11).padStart(2,"0");if(c(d,h,g)&&p(y,m)){let b=C(`${d}-${h}-${g} ${y}:${m}:00`,"DD-MM-YYYY HH:mm:ss");return b.isValid()?(b=b.subtract(7,"hours"),b.format(r)):null}return null}if(t.length===12){let d=t.slice(0,2),h=t.slice(2,4),g=t.slice(4,8),y=t.slice(8,10),m=t.slice(10,12);if(c(d,h,g)&&p(y,m)){let b=C(`${d}-${h}-${g} ${y}:${m}:00`,"DD-MM-YYYY HH:mm:ss");return b.isValid()?(b=b.subtract(7,"hours"),b.format(r)):null}return null}if(t.length===13){let d=t.slice(0,2),h=t.slice(2,4),g=t.slice(4,8),y=t.slice(8,10),m=t.slice(10,12),b=t.slice(12,13).padStart(2,"0");if(c(d,h,g)&&p(y,m,b)){let w=C(`${d}-${h}-${g} ${y}:${m}:${b}`,"DD-MM-YYYY HH:mm:ss");return w.isValid()?(w=w.subtract(7,"hours"),w.format(r)):null}return null}if(t.length===14){let d=t.slice(0,2),h=t.slice(2,4),g=t.slice(4,8),y=t.slice(8,10),m=t.slice(10,12),b=t.slice(12,14);if(c(d,h,g)&&p(y,m,b)){let w=C(`${d}-${h}-${g} ${y}:${m}:${b}`,"DD-MM-YYYY HH:mm:ss");return w.isValid()?(w=w.subtract(7,"hours"),w.format(r)):null}return null}}let x=t.length;if(x===1||x===2){let d=t.padStart(2,"0");return c(d,a,o)?f(d,a,o):null}if(x===3){let d=t.slice(0,2),h=t.slice(2,3).padStart(2,"0");return c(d,h,o)?f(d,h,o):null}if(x===6){let d=t.slice(0,2),h=t.slice(2,4),g=t.slice(4,6);return g=`20${g}`,parseInt(h)>12?c(d,a,o)?f(d,a,o):null:c(d,h,g)?f(d,h,g):null}if(x===7)return null;if(x===8){let d=t.slice(0,2),h=t.slice(2,4),g=t.slice(4,8);return c(d,h,g)?f(d,h,g):null}return null},pt=s=>Object.keys(s).length===0,mt=s=>{let e=Math.floor(s),t=Math.round((s-e)*60),n=String(e).padStart(2,"0"),r=String(t).padStart(2,"0");return `${n}:${r}`},Le=s=>{if(!/^data:image\/(png|jpeg|jpg|gif|webp);base64,/.test(s))return false;try{let t=s.split(",")[1];return !!t&&atob(t).length>0}catch{return false}},yt=s=>/\.(jpg|jpeg|png|gif|bmp|webp|svg|tiff|ico)$/i.test(s)||Le(s),xt=s=>{if(s<1024)return `${s} B`;let e=Math.floor(Math.log(s)/Math.log(1024)),t=["B","KB","MB","GB","TB"];return `${(s/Math.pow(1024,e)).toFixed(2)} ${t[e]}`},bt=s=>{let[e,t]=s.split(":").map(Number);return e+t/60},St=s=>{if(s==null||s==="")return "";let e=typeof s=="string"?parseFloat(s.replace(/,/g,"")):s;return isNaN(e)?"":e.toLocaleString("en-US",{minimumFractionDigits:e%1===0?0:1,maximumFractionDigits:20})};var wt=[{name:"no_color",color:"RGBA(230.1375,221.3625,221.3625,1)",id:0},{name:"red",color:"rgba(255,155.5,155.5,1)",id:1},{name:"orange",color:"RGBA(247.0375,198.06116071,152.4625,1)",id:2},{name:"yellow",color:"RGBA(252.88960843, 226.89175248, 135.61039157,1)",id:3},{name:"cyan",color:"RGBA(187.45210396, 215.03675558, 248.04789604,1)",id:4},{name:"purple",color:"RGBA(216.79194664, 167.70805336, 203.91748283,1)",id:5},{name:"almond",color:"RGBA(247.84539474, 213.9484835, 199.65460526,1)",id:6},{name:"teal",color:"RGBA(136.6125, 224.8875, 218.94591346,1)",id:7},{name:"blue",color:"RGBA(150.60535714, 165.68382711, 248.89464286,1)",id:8},{name:"raspberry",color:"RGBA(254.94583333, 157.55416667, 203.95543194,1)",id:9},{name:"green",color:"RGBA(182.62075688, 236.87924312, 189.81831118,1)",id:10},{name:"violet",color:"RGBA(230.11575613, 219.41069277, 252.08930723,1)",id:11}],vt="...",Ot={FILTER:"filter_by",SEARCH:"search_by",GROUP:"group_by"};export{$ as a,tr as b,$n as c,$e as d,lt as e,ut as f,ct as g,ft as h,dt as i,gt as j,ht as k,pt as l,mt as m,Le as n,yt as o,xt as p,bt as q,St as r,wt as s,vt as t,Ot as u};
|