UNPKG

@voerkai18n/runtime

Version:
8 lines 39.5 kB
var VoerkaI18n=(function(exports){'use strict';/*** * ---=== VoerkaI18n Runtime ===--- * https://zhangfisher.github.io/voerka-i18n/* */ var we=Object.defineProperty;var rt=(s,e,t)=>e in s?we(s,e,{enumerable:true,configurable:true,writable:true,value:t}):s[e]=t;var o=(s,e)=>we(s,"name",{value:e,configurable:true}),d=(s=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(s,{get:(e,t)=>(typeof require<"u"?require:e)[t]}):s)(function(s){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+s+'" is not supported')});var g=(s,e,t)=>rt(s,typeof e!="symbol"?e+"":e,t);var b,Se=(b=class{constructor(e){this._listeners=new Map,this._lastMessage={},this.options=Object.assign({ignoreError:false},e);}get listeners(){return this._listeners}on(){let e=arguments[0],t=arguments[1],r=arguments[2],{objectify:n=true,count:i=-1}=Object.assign({},r);this._listeners.has(e)||this._listeners.set(e,new Map);let a=++b.listenerSeqId,l=this._listeners.get(e);return l?.set(a,[t,i]),this._emitRetainEvent(e,a,l),n?{off:o(()=>{l?.delete(a),l?.size==0&&this._listeners.delete(e);},"off")}:a}onAny(e,t){return this.on("*",e,t)}_emitRetainEvent(e,t,r){e in this._lastMessage&&this._executeListener(t,r,this._lastMessage[e]);}once(e,t,r){return this.on(e,t,Object.assign({},r,{count:1}))}_forEachListeners(e){let t=false;for(let[r,n]of this._listeners.entries()){if(t)break;for(let[i,[a,l]]of n.entries()){if(t)break;t=e({event:r,listenerId:i,listener:a,count:l,eventListeners:n})===false;}}}_forEachEventListeners(e,t){let r=false,n=[[e,this._listeners.get(e)]];for(let[i,a]of n)if(a)for(let[l,[c,u]]of a){if(r)break;r=t({event:i,listenerId:l,listener:c,count:u,eventListeners:a})===false;}}off(){if(arguments.length==1){if(typeof arguments[0]=="number")this._forEachListeners(({listenerId:e,eventListeners:t,event:r})=>{if(e==arguments[0])return t.delete(e),this._listeners.get(r)?.size==0&&this._listeners.delete(r),false});else if(typeof arguments[0]=="function"){let e=arguments[0];this._forEachListeners(({listenerId:t,listener:r,eventListeners:n,event:i})=>{r==e&&(n.delete(t),this._listeners.get(i)?.size==0&&this._listeners.delete(i));});}}else arguments.length==2&&typeof arguments[0]=="string"&&typeof arguments[1]=="function"&&this._forEachEventListeners(arguments[0],({event:e,listenerId:t,listener:r,eventListeners:n})=>{e==arguments[0]&&r==arguments[1]&&(n.delete(t),this._listeners.get(e)?.size==0&&this._listeners.delete(e));});}waitFor(e,t=0){return new Promise((r,n)=>{let i,a=false,l;t>0&&(i=setTimeout(()=>{a=true,this.off(l),n(new Error("Timeout"));},t)),l=this.once(e,c=>{a||(clearTimeout(i),r(c));});})}offAll(e){e?this._listeners.delete(e):this._listeners.clear();}_executeListener(e,t,r){if(!t)return;let n=t.get(e);if(n)try{return n[0](r)}catch(i){if(!this.options.ignoreError)throw i}finally{n[1]>-1&&(n[1]=n[1]-1,n[1]==0&&t.delete(e));}}_executeListeners(e,t,r){let n=[];return this._forEachEventListeners(e,({event:i,listenerId:a,eventListeners:l})=>{n.push(this._executeListener(a,l,t)),typeof r=="function"&&r(a),l.size==0&&this._listeners.delete(i);}),n}emit(e,t,r){return r&&(this._lastMessage[e]=t),this._executeListeners(e,t)}async emitAsync(e,t,r){return await Promise.allSettled(this.emit(e,t,r))}},o(b,"l"),b);Se.listenerSeqId=0;var k=Se;(s=>typeof d<"u"?d:typeof Proxy<"u"?new Proxy(s,{get:o((e,t)=>(typeof d<"u"?d:e)[t],"get")}):s)(function(s){if(typeof d<"u")return d.apply(this,arguments);throw Error('Dynamic require of "'+s+'" is not supported')});function Ee(){return Date.now().toString()+parseInt(String(Math.random()*1e3))}o(Ee,"getId");function E(s,e=false){if(typeof s=="number")return true;if(typeof s!="string"||e)return false;try{if(s.includes(".")){let t=parseFloat(s);return s.endsWith(".")?!isNaN(t)&&String(t).length===s.length-1:!isNaN(t)&&String(t).length===s.length}else {let t=parseInt(s);return !isNaN(t)&&String(t).length===s.length}}catch{return false}}o(E,"r");function N(s){return E(s)}o(N,"isMessageId");function Oe(s){return s&&typeof s=="object"&&s.__VoerkaI18nScope__}o(Oe,"isI18nScope");async function Pe(s){let e=await s.call(this);return e&&"__esModule"in e||Symbol.toStringTag in e?e.default:e}o(Pe,"loadAsyncModule");function Le(s){return s&&typeof s.get=="function"&&typeof s.set=="function"&&typeof s.remove=="function"}o(Le,"isStorage");async function Me(s){return (await Promise.allSettled(s)).map(t=>t.status==="fulfilled"?t.value:t.reason)}o(Me,"execAsyncs");function ee(){try{return typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"}catch{return false}}o(ee,"isBrowser");var x=class x extends k{constructor(t){super();g(this,"__VoerkaI18nManager__",true);g(this,"_scopes",[]);g(this,"_appScope");if(x.instance)return x.instance;if(!t)throw new Error("create VoerkaI18nManager failed, appScope is required");this._registerAppScope(t),this._registerScopes(),this._loadPlugins(),x.instance=this,globalThis.VoerkaI18n=this;}get debug(){return this.scope.debug}get logger(){return this.scope.logger}get scopes(){return this._scopes}get activeLanguage(){return this._appScope.activeLanguage}get defaultLanguage(){return this._appScope.defaultLanguage}get loader(){return this._appScope.loader}get storage(){return this.scope.storage}get languages(){return this.scope.languages}get scope(){return this._appScope}_registerScopes(){let t=globalThis.__VoerkaI18nScopes__;t&&Array.isArray(t)&&t.forEach(r=>this.register(r)),delete globalThis.__VoerkaI18nScopes__;}getScope(t){return this._scopes.find(r=>r.id===t)}_loadPlugins(){let t=globalThis.__VoerkaI18nPlugins__;t&&Array.isArray(t)&&t.forEach(r=>r(this)),delete globalThis.__VoerkaI18nPlugins__;}registerPlugin(t){typeof t=="function"&&t(this);}_registerAppScope(t){this._scopes.push(t),this._appScope=t,this.logger.debug("VoerkaI18nScope<"+t.id+"> is registered as appScope"),this.emitAsync("init",()=>this._appScope.activeLanguage,true);}register(t){if(!Oe(t))throw new Error("register scope failed, invalid scope");this._scopes.push(t),t.bind(this),this.logger.debug(`VoerkaI18nScope<${t.id}> is registered`);}async change(t){await this._refreshScopes(t);let r=this._appScope.activeLanguage;return this.scope.saveLanguage(),this.emit("change",r,true),this.logger.info("language changed to: "+r),r}async _refreshScopes(t){let r=this._scopes.map(n=>n.refresh(t));await Me(r);}async refresh(){return await this._refreshScopes(this.activeLanguage)}ready(t,r){return this.waitFor("ready",r).then(n=>{t&&t.call(this,n);})}clearPatchedMessages(){this._scopes.forEach(t=>t.clearPatchedMessages());}hasLanguage(t){return this.languages.findIndex(r=>r.name==t)!=-1}clearLanguage(){this.scope.clearLanguage();}saveLanguage(){this.scope.saveLanguage();}restoreLanguage(){this.scope.restoreLanguage();}};o(x,"VoerkaI18nManager"),g(x,"instance");var O=x;var q={get(s){if(globalThis.localStorage)return globalThis.localStorage.getItem(s)},set(s,e){globalThis.localStorage&&globalThis.localStorage.setItem(s,e);},remove(s){globalThis.localStorage&&globalThis.localStorage.removeItem(s);}};var Fr="en",Ae=[{name:"zh",title:"\u4E2D\u6587",default:true,active:true},{name:"en",title:"\u82F1\u6587"}],Tr=["String","Number","Boolean","Object","Array","Function","Error","Symbol","RegExp","Date","Null","Undefined","Set","Map","WeakSet","WeakMap"],Cr=Symbol("VoerkaI18nFormatter"),$r=Symbol("VoerkaI18nFormatterBuilder"),kr={debug:true,storage:q,languages:[{name:"zh",title:"\u4E2D\u6587",default:true,active:true},{name:"en",title:"\u82F1\u6587"}]},Nr="vt-msg",Dr="data-id",Vr="data-scope";var Ce=o((s,e,t=[])=>{let r=Object.getOwnPropertyDescriptors(e);for(let n of t)delete r[n];Object.defineProperties(s,r);},"copyProps"),P=o((s,e=[s])=>{let t=Object.getPrototypeOf(s);return t===null?e:P(t,[...e,t])},"protoChain"),st=o((...s)=>{if(s.length===0)return;let e,t=s.map(r=>P(r));for(;t.every(r=>r.length>0);){let r=t.map(i=>i.pop()),n=r[0];if(r.every(i=>i===n))e=n;else break}return e},"nearestCommonProto"),je=o((s,e,t=[])=>{var r;let n=(r=st(...s))!==null&&r!==void 0?r:Object.prototype,i=Object.create(n),a=P(n);for(let l of s){let c=P(l);for(let u=c.length-1;u>=0;u--){let f=c[u];a.indexOf(f)===-1&&(Ce(i,f,["constructor",...t]),a.push(f));}}return i.constructor=e,i},"hardMixProtos"),te=o(s=>s.filter((e,t)=>s.indexOf(e)==t),"unique"),W=o((s,e)=>{let t=e.map(i=>P(i)),r=0,n=true;for(;n;){n=false;for(let i=e.length-1;i>=0;i--){let a=t[i][r];if(a!=null&&(n=true,Object.getOwnPropertyDescriptor(a,s)!=null))return t[i][0]}r++;}},"getIngredientWithProp"),$e=o((s,e=Object.prototype)=>new Proxy({},{getPrototypeOf(){return e},setPrototypeOf(){throw Error("Cannot set prototype of Proxies created by ts-mixer")},getOwnPropertyDescriptor(t,r){return Object.getOwnPropertyDescriptor(W(r,s)||{},r)},defineProperty(){throw new Error("Cannot define new properties on Proxies created by ts-mixer")},has(t,r){return W(r,s)!==void 0||e[r]!==void 0},get(t,r){return (W(r,s)||e)[r]},set(t,r,n){let i=W(r,s);if(i===void 0)throw new Error("Cannot set new properties on Proxies created by ts-mixer");return i[r]=n,true},deleteProperty(){throw new Error("Cannot delete properties on Proxies created by ts-mixer")},ownKeys(){return s.map(Object.getOwnPropertyNames).reduce((t,r)=>r.concat(t.filter(n=>r.indexOf(n)<0)))}}),"proxyMix");o((s,e)=>$e([...s,{constructor:e}]),"softMixProtos");var ke=new WeakMap,it=o(s=>ke.get(s),"getMixinsForClass"),ot=o((s,e)=>ke.set(s,e),"registerMixins");var Ie=o((s,e)=>{var t,r;let n=te([...Object.getOwnPropertyNames(s),...Object.getOwnPropertyNames(e)]),i={};for(let a of n)i[a]=te([...(t=s?.[a])!==null&&t!==void 0?t:[],...(r=e?.[a])!==null&&r!==void 0?r:[]]);return i},"mergeObjectsOfDecorators"),Fe=o((s,e)=>{var t,r,n,i;return {property:Ie((t=s?.property)!==null&&t!==void 0?t:{},(r=e?.property)!==null&&r!==void 0?r:{}),method:Ie((n=s?.method)!==null&&n!==void 0?n:{},(i=e?.method)!==null&&i!==void 0?i:{})}},"mergePropertyAndMethodDecorators"),Ne=o((s,e)=>{var t,r,n,i,a,l;return {class:te([...(t=s?.class)!==null&&t!==void 0?t:[],...(r=e?.class)!==null&&r!==void 0?r:[]]),static:Fe((n=s?.static)!==null&&n!==void 0?n:{},(i=e?.static)!==null&&i!==void 0?i:{}),instance:Fe((a=s?.instance)!==null&&a!==void 0?a:{},(l=e?.instance)!==null&&l!==void 0?l:{})}},"mergeDecorators"),re=new Map,at=o((...s)=>{var e;let t=new Set,r=new Set([...s]);for(;r.size>0;)for(let n of r){let i=P(n.prototype).map(u=>u.constructor),a=(e=it(n))!==null&&e!==void 0?e:[],c=[...i,...a].filter(u=>!t.has(u));for(let u of c)r.add(u);t.add(n),r.delete(n);}return [...t]},"findAllConstituentClasses"),lt=o((...s)=>{let e=at(...s).map(t=>re.get(t)).filter(t=>!!t);return e.length==0?{}:e.length==1?e[0]:e.reduce((t,r)=>Ne(t,r))},"deepDecoratorSearch");o((...s)=>{let e=s.map(t=>ut(t));return e.length===0?{}:e.length===1?e[0]:e.reduce((t,r)=>Ne(t,r))},"directDecoratorSearch");var ut=o(s=>{let e=re.get(s);return e||(e={},re.set(s,e)),e},"getDecoratorsForClass");function De(...s){var e,t,r;let n=s.map(c=>c.prototype);function a(...c){for(let u of s)Ce(this,new u(...c));}o(a,"MixedClass"),a.prototype=je(n,a),Object.setPrototypeOf(a,je(s,null,["prototype"]));let l=a;{let c=lt(...s);for(let u of (e=c?.class)!==null&&e!==void 0?e:[]){let f=u(l);f&&(l=f);}Te((t=c?.static)!==null&&t!==void 0?t:{},l),Te((r=c?.instance)!==null&&r!==void 0?r:{},l.prototype);}return ot(l,s),l}o(De,"Mixin");var Te=o((s,e)=>{let t=s.property,r=s.method;if(t)for(let n in t)for(let i of t[n])i(e,n);if(r)for(let n in r)for(let i of r[n])i(e,n,Object.getOwnPropertyDescriptor(e,n));},"applyPropAndMethodDecorators");var se=class se{constructor(){g(this,"_eventEmitter");}_getEventEmitter(){return this.attached?this.manager:(this._eventEmitter||(this._eventEmitter=new k),this._eventEmitter)}on(e,t){return this._getEventEmitter().on(e,t)}once(e,t){return this._getEventEmitter().once(e,t)}off(e,t){return this._getEventEmitter().off(e,t)}waitFor(e,t){return this._getEventEmitter().waitFor(e,t)}async emit(e,t,r){return await this._getEventEmitter().emitAsync(e,t,r)}};o(se,"EventEmitterMixin");var K=se;function m(s){return s&&typeof s=="function"}o(m,"t");function _(s){if(typeof s!="object"||s===null)return false;var e=Object.getPrototypeOf(s);if(e===null)return true;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return e===t}o(_,"o");var L,Ve=(L=class extends Error{},o(L,"m"),L),ft=0;function ne(s,e={timeout:0}){let t=false,r=false,n=false,i,a,l=0,c,u=++ft,f=o(function(){clearTimeout(l),t=false,r=false,n=false,c=new Promise((p,y)=>{i=p,a=y;});},"g");f();async function h(p=0,y){if(typeof s=="function"&&s()){t=true;return}return (t||r)&&f(),p>0&&(l=setTimeout(()=>{t=true;try{y instanceof Error?a(y):i(y);}catch{}},p)),n=true,c}return o(h,"o"),h.id=u,h.resolve=p=>{if(clearTimeout(l),!!n&&!(t||r)){if(typeof s=="function"&&s())if(s())i(p);else return;else i(p);t=true;}},h.reject=p=>{clearTimeout(l),n&&(t||r||(a(typeof p=="string"?new Error(p):p instanceof Error?p:new Error),r=true));},h.destroy=()=>{clearTimeout(l),n&&a(new Ve),t=false,n=false,r=false,c=null;},h.reset=f,h.isResolved=()=>t,h.isRejected=()=>r,h.isPending=()=>n,h}o(ne,"p");var ie=class ie{constructor(){g(this,"_patching");}_getPatchKey(e){return `voerkai18n_${this.id}_${e}_patched_messages`}clearPatchedMessages(e){if(this.storage){let t=e?[e]:this.languages.map(r=>r.name);for(let r of t)this.storage.remove(this._getPatchKey(r));}}async _patch(e){this._patching=ne(),e||(e=this.activeLanguage),this._restorePatchedMessages(this.activeMessages,e);try{if(m(this.loader)){let t=await this._loadMessagesFromLoader(e);_(t)&&(Object.assign(this._activeMessages,t),this._setPatchedMessages(t,e),this.emit("patched",{language:e,scope:this.id}));}}catch(t){this.logger.warn(`\u4ECE\u8FDC\u7A0B\u52A0\u8F7D\u8BED\u8A00\u8865\u4E01\u5305<${e}>\u65F6\u51FA\u9519: ${t.stack}(scope=${this.id})`);}finally{this._patching?.resolve(),this._patching=void 0;}}_restorePatchedMessages(e,t){let r=this._getPatchedMessages(t);_(r)&&(Object.assign(e,r),this.emit("restore",{language:t,scope:this.id}),this.logger.debug(`\u6210\u529F\u6062\u590D\u8865\u4E01\u8BED\u8A00\u5305<${t}>(scope=${this.id})`));}_setPatchedMessages(e,t){if(!(!this.attached&&!this.storage))try{this.storage&&this.storage.set(this._getPatchKey(t),JSON.stringify(e));}catch(r){this.logger.error(`\u4FDD\u5B58\u8BED\u8A00\u5305\u8865\u4E01(${t})\u65F6\u51FA\u9519: ${r.stack}(scope=${this.id})`);}}_getPatchedMessages(e){try{return this.storage&&this.options.cachePatch?this.storage.get(this._getPatchKey(e)):{}}catch(t){return this.logger.error(`\u8BFB\u53D6\u8BED\u8A00\u5305\u8865\u4E01(${e})\u65F6\u51FA\u9519:${t.stack}(scope=${this.id})`),{}}}};o(ie,"PatchMessageMixin");var z=ie;var gt=o((s,e,t)=>new Promise((r,n)=>{var i=o(c=>{try{l(t.next(c));}catch(u){n(u);}},"f"),a=o(c=>{try{l(t.throw(c));}catch(u){n(u);}},"d"),l=o(c=>c.done?r(c.value):Promise.resolve(c.value).then(i,a),"u");l((t=t.apply(s,e)).next());}),"j"),M,pt=(M=class extends Error{},o(M,"b"),M),dt=0;function Re(s,e={timeout:0}){let t=false,r=false,n=false,i,a,l=0,c,u=++dt,f=o(function(){clearTimeout(l),t=false,r=false,n=false,c=new Promise((p,y)=>{i=p,a=y;});},"m");f();function h(){return gt(this,arguments,function*(p=e.timeout,y){if(typeof s=="function"&&s()){t=true;return}return (t||r)&&f(),p>0&&(l=setTimeout(()=>{t=true;try{y instanceof Error?a(y):i(y);}catch{}},p)),n=true,c})}return o(h,"c"),h.id=u,h.resolve=p=>{if(clearTimeout(l),!!n&&!(t||r)){if(typeof s=="function"&&s())if(s())i(p);else return;else i(p);t=true;}},h.reject=p=>{clearTimeout(l),n&&(t||r||(a(typeof p=="string"?new Error(p):p instanceof Error?p:new Error),r=true));},h.destroy=()=>{clearTimeout(l),n&&a(new pt),t=false,n=false,r=false,c=null;},h.reset=f,h.isResolved=()=>t,h.isRejected=()=>r,h.isPending=()=>n,h}o(Re,"R");var oe=class oe extends Error{};o(oe,"VoerkaI18nError");var v=oe,ae=class ae extends v{};o(ae,"VoerkaI18nInvalidLanguageError");var qe=ae,le=class le extends v{};o(le,"VoerkaI18nOnlyOneAppScopeError");var We=le,ce=class ce extends v{};o(ce,"VoerkaI18nChangeLanguageError");var Ke=ce,ue=class ue extends v{};o(ue,"VoerkaI18nLoadLanguageError");var V=ue;var fe=class fe{constructor(){g(this,"_refreshSignal");}async refresh(e,t){this._refreshSignal||(this._refreshSignal=Re()),e||(e=this.activeLanguage);let r=e,n,{patch:i,fallback:a}=Object.assign({fallback:false,patch:true},t);try{n=await this._loadLanguageMessages(e),this._activeMessages=n,n&&!n.$remote&&i&&await this._patch(e);}catch(l){if(l&&l instanceof v){let c=this.getFallbackLanguage(e);c&&c!==e&&(r=await this.refresh(c,{patch:i,fallback:true}));}}finally{a||(this._activeLanguage=r,(typeof this.messages[r]=="function"||!(r in this.messages))&&(this.messages[r]=this._activeMessages),this._activeParagraphs=this.paragraphs[r],this._refreshSignal.resolve(),this._refreshSignal=void 0,await this.emit("scope/change",r,true));}return this._setLanguageAttr(),r}async _loadLanguageMessages(e){this.logger.debug(`\u51C6\u5907\u52A0\u8F7D\u8BED\u8A00\u5305:${e}`);let t=this.messages[e],r;if(_(t))r=t;else if(m(t))try{r=await Pe.call(this,t);}catch(n){this.logger.error(`\u52A0\u8F7D\u5F02\u6B65\u8BED\u8A00\u5305<${e}>\u5931\u8D25:${n.message}`),r=void 0;}if(!r&&m(this.loader))try{let n=await this._loadMessagesFromLoader(e);_(n)?r=Object.assign({$remote:!0},this.messages[this.defaultLanguage],n):this.logger.error(`\u9519\u8BEF\u7684\u8BED\u8A00\u5305<${e}>\u6570\u636E:${n}`);}catch(n){throw new V(n.message)}if(!_(r))throw new V(e);return r}async _loadMessagesFromLoader(e){if(m(this.loader))return await this.loader.call(this,e,this)}ready(){let e=typeof arguments[0]=="function"?arguments[0]:void 0,t=typeof arguments[0]=="number"?arguments[0]:arguments[1];if(typeof e=="function")this.manager.ready(e,t);else return new Promise(r=>{this.manager.ready(r,t);})}async changing(e){!this._refreshSignal&&!this._patching||await Promise.all([this._refreshSignal?.(e),this._patching?.(e)]);}};o(fe,"ChangeLanguageMixin");var B=fe;var yt={warn:console.warn,error:console.error,info:console.info,debug:console.debug};function ze(s){let e,t=[],r=o((n,...i)=>{let a=i.join(" ");if(e){if(!e.debug)return;e.emit("log",{level:n,message:a});}else if(e=globalThis.VoerkaI18n,e&&e instanceof O)if(e.debug){t.push([n,a]);let l=o((c,u)=>{s?s(c,u):yt[c](u);},"log");e.on("log",({level:c,message:u})=>l(c,u)),t.forEach(([c,u])=>l(c,u));}else t.splice(0,t.length);else t.push([n,a]);},"logOutput");return {warn:o((...n)=>r("warn",...n),"warn"),error:o((...n)=>r("error",...n),"error"),info:o((...n)=>r("info",...n),"info"),debug:o((...n)=>r("debug",...n),"debug")}}o(ze,"createLogger");var he=class he extends Error{constructor(e){super(`Formatters of language<${e}> is not loaded,try to call load()`);}};o(he,"FormattersNotLoadedError");var Be=he,ge=class ge{constructor(e){g(this,"_formatters",[]);g(this,"_scope");this._scope=e,this._formatters=e?.options.formatters,this._registerFormatters();}get scope(){return this._scope}get formatters(){return this._formatters}_registerFormatters(){this._formatters&&this._formatters.forEach(e=>{Array.isArray(e)?this.register.apply(this,e):this.register.apply(this,[e]);});}_addFormatter(e){try{if(this.scope.interpolator.addFilter(e),e){let t=this.scope.manager.scope;t.id!==this.scope.id&&t.interpolator.addFilter(e);}}catch(t){this.scope.logger.error(`fail while register formatter<${e.name}>\uFF1A${t.stack}`);}}register(e,t,r){let n=this.scope,i=e.next;e.next=function(a,l,c){let u=c.getConfig;return c.getConfig=()=>Object.assign({},r,t?.[n.activeLanguage],u(e.name)),i.call(this,a,l,c)},this._addFormatter(e);}};o(ge,"VoerkaI18nFormatterManager");var G=ge;function Ge(s){return s&&typeof s=="object"&&s.__VoerkaI18nManager__}o(Ge,"isI18nManger");var pe=class pe{getLanguage(e){let t=this.languages.findIndex(r=>r.name==e);if(t!==-1)return this.languages[t]}getFallbackLanguage(e){let t=this.getLanguage(e);return t&&t.fallback||this.options.fallback||this._defaultLanguage}hasLanguage(e){return this.languages.findIndex(t=>t.name==e)!=-1}};o(pe,"LanguageMixin");var J=pe;var de=class de{_getPluraMessage(e,t){try{return Array.isArray(e)?e.length>t?e[t]:e[e.length-1]:e}catch{return Array.isArray(e)?e[0]:e}}_getPluraValue(e){let t=null,r=[];if(_(e)){let n=e;for(let[i,a]of Object.entries(n)){if(m(a))try{n[i]=a();}catch{n[i]=a;}let l=typeof n[i]=="number";(t==null&&l||i.startsWith("$")&&l)&&(t=n[i]);}r=[n];}else Array.isArray(e)?r=e.map(n=>{try{n=m(n)?n():n,E(n)&&!t&&(t=parseInt(n));}catch{return String(n)}return n}):e!==void 0&&(t=E(e)?parseInt(e):0,r=[e]);return [t,r]}_getTranslateComponent(){if(!this._translateComponent){let e=this.options.component||this.appScope.options.component;typeof e=="function"?this._translateComponent=e.call(this,this):(this._translateComponent=()=>{},this.logger.warn("No translate component builder configured"));}return this._translateComponent}_getTranslateTransformer(){if(!this._translateTransformer){let e=this.options.transform||this.appScope.options.transform;typeof e=="function"&&(this._translateTransformer=e.call(this,this));}return this._translateTransformer}_getActiveMessages(e){return typeof this.messages[e]=="function"?(this.logger.warn(`When the t function specifies the language <${e}> , only synchronized language packs can be used`),this.activeMessages):this.messages[e]}translate(e,t,r){if(typeof e!="string")return this.logger.debug(`failed to translate message:${e},it is not a string`),"";let n=r?.language||this.activeLanguage,i=this._getActiveMessages(n);e=e.replace(/\n/g,"\\n");let a=e;if(typeof e!="string")return e;let l=t===void 0?[]:m(t)?t():t;try{if(N(e))a=i[e]||e;else {let f=this.idMap[e];a=i[f]||i[e]||e;}let[c,u]=this._getPluraValue(l);Array.isArray(a)&&a.length>0&&(c!==null?a=this._getPluraMessage(a,c):a=a[0]),l.length,a=this.interpolator.replace(a,...u),this._translateTransformer&&r?.transform&&(a=this._translateTransformer(a,u,r));}catch(c){this.logger.error(`\u7FFB\u8BD1\u5931\u8D25\uFF1A${c.stack}`);}return a}};o(de,"TranslateMixin");var U=de;var me=class me{_getStorage(){let e=this.storage;return Le(e)?e:void 0}_getStorageKey(){return this.options.storageKey.replace("{scope}",this.id)}restoreLanguage(){let e=this._getStorage();if(e){let t=this._getStorageKey(),r=e.get(t);if(!r||!this.hasLanguage(r))return;this._activeLanguage=r,this.logger.debug(`\u4ECE\u5B58\u50A8<${t}>\u4E2D\u6062\u590D\u4FDD\u5B58\u7684\u8BED\u8A00\uFF1A${r}`);}}saveLanguage(){let e=this._getStorage();if(e){if(!this._activeLanguage)return;let t=this._getStorageKey();e.set(t,this.activeLanguage),this.logger.debug(`\u5F53\u524D\u8BED\u8A00\u5DF2\u4FDD\u5B58\u5230\u5B58\u50A8${t}=${this.activeLanguage}`);}}clearLanguage(){let e=this._getStorage();e&&e.remove(this._getStorageKey());}};o(me,"RestoreMixin");var H=me;var _t=Object.defineProperty,Je=Object.getOwnPropertySymbols,vt=Object.prototype.hasOwnProperty,bt=Object.prototype.propertyIsEnumerable,Ue=o((s,e,t)=>e in s?_t(s,e,{enumerable:true,configurable:true,writable:true,value:t}):s[e]=t,"R"),He=o((s,e)=>{for(var t in e||(e={}))vt.call(e,t)&&Ue(s,t,e[t]);if(Je)for(var t of Je(e))bt.call(e,t)&&Ue(s,t,e[t]);return s},"b"),A=(s=>typeof d<"u"?d:typeof Proxy<"u"?new Proxy(s,{get:o((e,t)=>(typeof d<"u"?d:e)[t],"get")}):s)(function(s){if(typeof d<"u")return d.apply(this,arguments);throw Error('Dynamic require of "'+s+'" is not supported')}),w={Abort:Symbol("Abort"),Throw:Symbol("Throw"),Ignore:Symbol("Ignore")},j,$=(j=class extends Error{constructor(e){super(),this.value=e;}},o(j,"a"),j);var I,S=(I=class extends ${},o(I,"p"),I),F,Y=(F=class extends ${},o(F,"x"),F),T,_e=(T=class extends ${},o(T,"g"),T),xt={name:"error",priority:"before",args:["operate","value"],default:{operate:"ignore"},next(s,e,t){let r=e.operate.toLowerCase(),n=e.value;return t.onError=(i,a,l,c)=>{if(!(i instanceof Error)||i instanceof $)throw i;if(r=="throw")throw n?new Error(n):i;if(r=="abort")throw new S(n);if(r=="ignore")throw new Y(n);return a},s}},wt={name:"empty",priority:"before",args:["operate","value"],default:{operate:"abort",value:""},next(s,e,t){let r=e.operate.toLowerCase(),n=e.value;return t.onEmpty=()=>{if(r=="throw")throw new _e;if(r=="abort")throw new S(n);if(r=="ignore")throw new Y;return r},s}};function X(s,...e){if(e.length===0)return s;let t=e.map((r,n)=>{let i=Object.entries(r||{});return i.some(([a,l])=>l===void 0)?i.reduce((a,[l,c])=>(c!==void 0&&(a[l]=c),a),{}):r});return Object.assign(s,...t)}o(X,"F");(s=>typeof A<"u"?A:typeof Proxy<"u"?new Proxy(s,{get:o((e,t)=>(typeof A<"u"?A:e)[t],"get")}):s)(function(s){if(typeof A<"u")return A.apply(this,arguments);throw Error('Dynamic require of "'+s+'" is not supported')});function Ye(s){if(typeof s!="object"||s===null)return false;var e=Object.getPrototypeOf(s);if(e===null)return true;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return e===t}o(Ye,"y");function St(s){return s&&typeof s=="function"}o(St,"v");function Ze(s,e,t){if(typeof e=="string"){let r=0,n;for(;(n=s.indexOf(e,r))>-1;){let i=typeof t=="function"?t(e):t,a=s.length;s=s.substring(0,n)+i+s.substring(n+e.length),r=n+i.length+s.length-a;}}else {let r;if(!e.global||!e.multiline)throw new Error("The search parameter must be enabled '/gm' option");for(;(r=e.exec(s))!==null;){r.index===e.lastIndex&&e.lastIndex++;let n=s.length,i=r[0].length,a=typeof t=="function"?t(r[0],...r):t;s=s.substring(0,r.index)+a+s.substring(r.index+i),e.lastIndex+=s.length-n;}}return s}o(Ze,"w");String.prototype.replaceAll||(String.prototype.replaceAll=function(s,e){return Ze(this,s,e)});function Q(s){return s.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}o(Q,"m");function Et(s,e=false){if(typeof s=="number")return true;if(typeof s!="string"||e)return false;try{if(s.includes(".")){let t=parseFloat(s);return s.endsWith(".")?!isNaN(t)&&String(t).length===s.length-1:!isNaN(t)&&String(t).length===s.length}else {let t=parseInt(s);return !isNaN(t)&&String(t).length===s.length}}catch{return false}}o(Et,"C");var Ot=/\n/gm,Pt=/(["'])(.*?)(\1)/gm,Lt=/([\s\[\,\{])(\w+)(\s*\:)/gm;function Mt(s,e){try{return JSON.parse(s,(r,n)=>e?e(r,n):n)}catch{}let t=s.replace(Ot,(r,n,i)=>{let a=i.slice(0,n).trim(),l=i.slice(n+1).trim();return !/,$/.test(a)&&!/[\[\{\}]$/.test(a)&&!/^\}/.test(l)?`, `:` `});return t=t.replaceAll(Pt,(r,n,i)=>`"${encodeURI(i)}"`),t=t.replaceAll(Lt,(r,n,i,a)=>`${n}"${i}"${a}`),t=t.replaceAll("\uFF0C",",").replaceAll("\u201C",'"').replaceAll("\u201D",'"'),JSON.parse(t,(r,n)=>(typeof n=="string"&&(n=decodeURI(n)),n))}o(Mt,"V");function At(s,e="{",t="}"){let r=0,n=0;for(;r<s.length;){let i=s.slice(r,r+e.length),a=s.slice(r,r+t.length);if(i==e){n++,s=s.substring(0,r+e.length)+`${n}%`+s.substring(r+e.length),r+=e.length+String(n).length+1;continue}if(a==t){n>0&&(s=s.substring(0,r)+`%${n}`+s.substring(r)),r+=t.length+String(n).length+1,n--;continue}r++;}return s}o(At,"J");function jt(s,...e){return e.length==0&&(e.push(["{","}"]),e.push(["[","]"])),e.forEach(t=>{s.includes(t[0])&&s.includes(t[1])&&(s=At(s,...t));}),s}o(jt,"H");function It(s,e,t){return [[e,new RegExp(Q(e)+"\\d+%")],[t,new RegExp("%\\d+"+Q(t))]].forEach(([r,n])=>{let i;for(;(i=n.exec(s))!==null;)i.index===n.lastIndex&&n.lastIndex++,s=s.replace(n,r);}),s}o(It,"G");function ye(s,...e){return e.length==0&&(e.push(["{","}"]),e.push(["[","]"])),e.forEach(([t,r])=>{s.includes(t)&&s.includes(r)&&(s=It(s,t,r));}),s}o(ye,"E");function Ft(s){return s?s.trim().substring(1).trim().split("|").map(e=>e.trim()).map(e=>{if(e=="")return null;let t=e.indexOf("("),r=e.lastIndexOf(")");if(t!==-1&&r!==-1){let n=e.substring(t+1,r).trim(),i=$t(n);return [e.substring(0,t),i]}else return [e,[]]}).filter(e=>Array.isArray(e)):[]}o(Ft,"M");function Tt(...s){s.length==0&&(s.push(["{","}"]),s.push(["[","]"]));let e=s.map(([t,r])=>`(${Q(t)}1%.*?%1${Q(r)})`);return Ct.replace("__TAG_REGEXP__",e.length>0?e.join("|")+"|":"")}o(Tt,"z");var Ct=String.raw`((([\'\"])(.*?)\3))|__TAG_REGEXP__([\d]+\.?[\d]?)|((true|false|null)(?=[,\b\s]))|([\w\.]+)|((?<=,)\s*(?=,))(?<=\s*[,\)]?\s*)`;function $t(s){let e=[],t;s=jt(s);try{let r=new RegExp(Tt(),"g");for(;(t=r.exec(s))!==null;){t.index===r.lastIndex&&r.lastIndex++;let n=t[0];if(n.trim()=="")n=void 0;else if(n.startsWith("'")&&n.endsWith("'")||n.startsWith('"')&&n.endsWith('"'))n=n.substring(1,n.length-1),n=ye(n);else if(n.startsWith("{")&&n.endsWith("}")||n.startsWith("[")&&n.endsWith("]"))try{n=ye(n),n=Mt(n);}catch{}else ["true","false","null"].includes(n)?n=JSON.parse(n):Et(n)?n=parseFloat(n):n=ye(String(n));e.push(n);}}catch{}return e}o($t,"U");var kt=new RegExp("(?<!\\\\)\\{([\\S]+\\s)?\\s*(\\w+)?((\\s*\\|\\s*\\w*(\\(.*?\\)){0,1}\\s*)*)\\s*(\\s[\\S]+)?\\}","gm");function Xe(s,e,t={}){let r=s,n,i=Object.assign({replaceAll:true},t),a=kt;for(a.lastIndex=0;(n=a.exec(r))!==null;){n.index===a.lastIndex&&a.lastIndex++;let l=n[2]||"",c=(n[1]||"").trim(),u=(n[6]||"").trim(),f=r.length,h=Ft(n[3]||"");if(St(e)){let p=e(l,c,u,h,n[0]);i.replaceAll?r=Ze(r,n[0],p):r=r.replace(n[0],p),a.lastIndex+=r.length-f;}}return r}o(Xe,"O");function Qe(s,e){let t=e.value;if(s.length>0){let r=qt.call(this,s,e);for(let n of r)try{t=n.call(this,t);}catch(i){if(i instanceof _e)throw i;if(i instanceof $){if(i.value!=null&&(t=i.value),i instanceof S)break}else throw i}}return this.options.isEmpty(t)||(t=`${e.prefix}${t}${e.suffix}`),t}o(Qe,"I");function Nt(s,e,t,r){if(!this.options.isEmpty(s))return s;let n=r.onEmpty||t.onEmpty||this.options.onEmpty;if(typeof n!="function")return s;let i=n.call(this,s,e,r);throw i instanceof Error?i:i==w.Abort?new S:i==w.Ignore?new Y:i==w.Throw?new _e:new S(i)}o(Nt,"K");function Dt(s,e,t,r,n){let i=n.onError||r.onError||this.options.onError;if(typeof i!="function")return e;let a=i.call(this,s,e,t,n);throw a instanceof Error?a:a==w.Abort?new S:a==w.Ignore?new Y:a==w.Throw?s:new S(a)}o(Dt,"Q");function Vt(s,e,t){var r;let n=Object.assign({},typeof s.default=="function"?s.default():s.default);return e.length==1&&Ye(e[0])?X(n,e[0]):s.args&&((r=s.args)==null?void 0:r.length)>0&&s.args.forEach((i,a)=>{e[a]!==void 0&&(n[i]=e[a]);}),i=>{let a;try{t.args=e,a=s.next.call(this,i,n,t),a=Nt.call(this,a,n,s,t);}catch(l){if(l.filter=s.name,l instanceof $)throw l;return this.log(`\u5F53\u6267\u884C\u8FC7\u6EE4\u5668\u5668<${t.match}:${s.name}>\u65F6\u51FA\u9519:${l.stack}`),Dt.call(this,l,i,n,s,t)}return String(a)}}o(Vt,"Y");function Rt(s){let e=[],t=s.map(([r,n])=>[this.getFilter.call(this,r),n]).filter(([r])=>r!=null);return t=t.reduce((r,[n,i])=>(n&&(n.priority=="before"?r.unshift([n,i]):n.priority=="after"?e.push([n,i]):r.push([n,i])),r),[]),t.concat(e)}o(Rt,"Z");function qt(s,e){let t=Rt.call(this,s),r=[];for(let[n,i]of t)r.push(Vt.call(this,n,i,e));return r}o(qt,"ee");var C,et=(C=class{constructor(e){this.options=X({log:console.log,filters:{},missing:"default",filterContext:{}},e),this.addDefaultHandlers(),this.addBuildinFilters(),this.normalizeFilters();}get filters(){return this.options.filters}addDefaultHandlers(){this.options.onError=()=>w.Ignore,this.options.onEmpty=()=>"",this.options.isEmpty=e=>e===null||e==="";}addFilter(e){if(!e.name)throw new Error("Filter name cannot be empty");if(typeof e.next!="function")throw new Error("The filter must provide a next function");return e=X({priority:"normal"},e),this.filters[e.name]=e}removeFilter(e){delete this.filters[e];}getFilter(e){var t;if(e in this.options.filters)return this.options.filters[e];{let r=(t=this.options.getFilter)==null?void 0:t.call(this,e);return typeof r=="function"?{name:e,next:r}:e in String.prototype?{name:e,next:o((n,i,a)=>n[e](...a.args),"next")}:r}}addBuildinFilters(){this.addFilter(xt),this.addFilter(wt);}normalizeFilters(){Object.entries(this.options.filters).forEach(([e,t])=>{let r=X({name:e,priority:"normal",args:null,next:o(n=>n,"next")},typeof t=="function"?{filter:t}:t);this.options.filters[e]=r;});}getMissingValue(e,t){let r=this.options.missing;if(r=="default")return "";if(r=="ignore")return t;if(typeof r=="function")return r.call(this,e)}replace(e,...t){if(t.length===0)return e;if(t.length===1&&typeof t[0]=="function"&&(t[0]=t[0].call(this)),t.length===1&&Ye(t[0])){let r=t[0];return Xe.call(this,e,(n,i,a,l,c)=>{let u=n in r?r[n]:this.getMissingValue(n,c);return typeof u=="function"&&(u=u.call(this)),Qe.call(this,l,He({name:n,value:u,prefix:i,suffix:a,template:e,match:c,args:[]},this.options.filterContext))})}else {let r=t.length===1&&Array.isArray(t[0])?[...t[0]]:t,n=0;return Xe.call(this,e,(i,a,l,c,u)=>{let f=r.length>n?r[n++]:this.getMissingValue(n,u);return typeof f=="function"&&(f=f.call(this)),Qe.call(this,c,He({name:i,value:f,prefix:a,suffix:l,template:e,match:u,args:[]},this.options.filterContext))},{replaceAll:false})}}log(e,...t){this.options.debug&&this.options.log(e,...t);}},o(C,"$"),C);function ve(s,e,t){let{defaultValue:r,delimiter:n,matched:i}=Object.assign({delimiter:"."},t);if(!s||typeof e!="string")return r;if(!e)return s;let a=e.split(n),l=s,c,u;try{for(let f of a)if(l instanceof Map||l instanceof WeakMap){if(!l.has(f))return r;c=l,u=f,l=l.get(f);}else if(l instanceof Set){let h=parseInt(f,10);if(h>=l.size)return r;c=l,u=h,l=[...l][h];}else if(l&&typeof l=="object"&&f in l)c=l,u=Array.isArray(l)?parseInt(f):f,l=l[f];else return r}catch{return r}return typeof i=="function"&&i({value:l,parent:c,indexOrKey:u}),l}o(ve,"u");var be=class be{constructor(){g(this,"_flexVars");}_initInterpolators(){this._flexVars=new et({filterContext:{getConfig:o(e=>{let t=this.activeMessages.$config||{};return e?ve(t,e):t},"getConfig"),scope:this}});}};o(be,"InterpolatorMixin");var Z=be;function xe(s,...e){if(e.length===0)return s;let t=e.map((r,n)=>{let i=Object.entries(r||{});return i.some(([a,l])=>l===void 0)?i.reduce((a,[l,c])=>(c!==void 0&&(a[l]=c),a),{}):r});return Object.assign(s,...t)}o(xe,"u");var R=class R extends De(K,z,B,J,U,Z,H){constructor(t){super();g(this,"__VoerkaI18nScope__",true);g(this,"_options");g(this,"_manager");g(this,"_formatterManager",null);g(this,"_logger");g(this,"_defaultLanguage","zh-CN");g(this,"_activeLanguage","zh-CN");g(this,"_activeMessages",{});g(this,"_patchedMessages",{});g(this,"_translateComponent");g(this,"_translateTransformer");g(this,"_activeParagraphs",{});g(this,"$id",++R.idSeq);this._options=xe({id:Ee(),library:false,debug:false,injectLangAttr:true,languages:[],messages:{},paragraphs:{},idMap:{},formatters:[],attached:true,storageKey:"language",cachePatch:true},t),this._init();}get id(){return this._options.id}get options(){return this._options}get attached(){return this._options.attached}get debug(){return this._options.debug}get library(){return this._options.library}get formatters(){return this._formatterManager}get defaultLanguage(){return this._defaultLanguage}get defaultMessages(){return this.messages[this.defaultLanguage]}get messages(){return this._options.messages}get paragraphs(){return this._options.paragraphs}get idMap(){return this._options.idMap}get languages(){return this._options.languages}get manager(){return this._manager}get appScope(){return this._manager.scope}get interpolator(){return this._flexVars}get logger(){return this._logger}get t(){return this.translate.bind(this)}get Translate(){return this._getTranslateComponent()}get activeMessages(){return this._activeMessages}get activeParagraphs(){return this._activeParagraphs}get activeLanguage(){return this._activeLanguage}get storage(){return this.getScopeOption("storage")}get loader(){return this.getScopeOption("loader")}get $t(){return (t,r,n)=>(this._getTranslateTransformer(),n||(n={}),n.transform=true,this.translate(t,r,n))}getScopeOption(t){let r=this._options;return this.attached?r[t]||(this.library?this._manager[t]:void 0):r[t]}_initOptions(){if(!Array.isArray(this.languages))this.logger.warn("[VoerkaI18n] invalid language settings, will use default language settings."),this._options.languages=Object.assign([],Ae);else if(this.languages.length==0)throw new Error("[VoerkaI18n] must provide valid language settings.");let t,r;this.languages.forEach(i=>{i.default&&(r=i.name),i.active&&(t=i.name);});let n=this._options.messages;if(r in n||(r=Object.keys(n)[0]),t in n||(t=r),!(r in n))throw new Error("[VoerkaI18n] invalid language configuration, must provide valid default and active languages.");if(this._activeLanguage=t,this._defaultLanguage=r,!this._options.library&&!this._options.storage&&(this._options.storage=q),m(this.messages[this._defaultLanguage]))throw new Error("[VoerkaI18n] default language pack must be static content, can't use async load way.");this._activeMessages=this.messages[this._activeLanguage],this._activeParagraphs=this.paragraphs[this._activeLanguage];}_init(){this._logger=ze(this._options.log),this._initOptions(),this.library||this.restoreLanguage(),this._initInterpolators(),this.registerToManager(),this._formatterManager=new G(this);}bind(t){this._manager=t,this._manager.once("init",this._initRefresh.bind(this));}_initRefresh(t){if(this.library)this.refresh(t&&t());else {let r=[];(this._defaultLanguage!==this._activeLanguage||m(this.activeMessages))&&r.push(this.refresh(void 0,{patch:false})),r.push(this._patch()),Promise.all(r).then(()=>{this.emit("ready",this.activeLanguage,true),this._setLanguageAttr();});}}registerToManager(){if(!this.attached)return;let t=!this.options.library;t&&(globalThis.VoerkaI18n&&globalThis.VoerkaI18n.scope&&ee()&&console.warn("Only can have one i18nScope with library=false"),this._manager=new O(this));let r=globalThis.VoerkaI18n;r&&Ge(r)?t?this._initRefresh():r.register(this):(globalThis.__VoerkaI18nScopes__||(globalThis.__VoerkaI18nScopes__=[]),globalThis.__VoerkaI18nScopes__.push(this));}async change(t){let r=this.activeLanguage;return this.attached?r=await this._manager.change(t):r=await this.refresh(t),r}_setLanguageAttr(){if(!(this.library||!ee()))try{let t=this._options.injectLangAttr;if(!t)return;let r=t===!0?document.body:document.body.querySelector(t);r&&r.setAttribute("lang",this.activeLanguage);}catch{}}getRawMessage(t){if(N(t)){if(t in this.defaultMessages)return this.defaultMessages[t]}else return t}getMessageId(t){if(N(t))return t;if(t in this.idMap)return this.idMap[t]}};o(R,"VoerkaI18nScope"),g(R,"idSeq",0);var tt=R;function An(s,e,t){return r=>{let n=s.next;return s.next=function(i,a,l){let c=l.getConfig;return l.getConfig=()=>Object.assign({},t,e?.[r.activeLanguage],c(s.name)),n.call(this,i,a,l)},s}}o(An,"createFormatter");function kn(s){let e=globalThis.VoerkaI18n;e?e.registerPlugin(s):(globalThis.__VoerkaI18nPlugins__||(globalThis.__VoerkaI18nPlugins__=[]),globalThis.__VoerkaI18nPlugins__.push(s));}o(kn,"definePlugin");exports.DataTypes=Tr;exports.DefaultFallbackLanguage=Fr;exports.DefaultLanguageSettings=Ae;exports.FormattersNotLoadedError=Be;exports.LocalStorage=q;exports.TEleClassName=Nr;exports.TEleMsgIdAttr=Dr;exports.TEleScopeIdAttr=Vr;exports.VOERKAI18N_FORMATTER=Cr;exports.VOERKAI18N_FORMATTER_BUILDER=$r;exports.VoerkaI18nChangeLanguageError=Ke;exports.VoerkaI18nError=v;exports.VoerkaI18nFormatterManager=G;exports.VoerkaI18nInvalidLanguageError=qe;exports.VoerkaI18nLoadLanguageError=V;exports.VoerkaI18nManager=O;exports.VoerkaI18nOnlyOneAppScopeError=We;exports.VoerkaI18nScope=tt;exports.createFormatter=An;exports.defaultLanguageSettings=kr;exports.definePlugin=kn;exports.execAsyncs=Me;exports.getId=Ee;exports.isBrowser=ee;exports.isI18nScope=Oe;exports.isMessageId=N;exports.isStorage=Le;exports.loadAsyncModule=Pe;return exports;})({});//# sourceMappingURL=index.global.js.map //# sourceMappingURL=index.global.js.map