vue-i18n-bridge
Advanced tools
Comparing version 9.2.0-beta.7 to 9.2.0-beta.8
/*! | ||
* vue-i18n-bridge v9.2.0-beta.7 | ||
* vue-i18n-bridge v9.2.0-beta.8 | ||
* (c) 2021 kazuya kawaguchi | ||
@@ -22,3 +22,3 @@ * Released under the MIT License. | ||
*/ | ||
const VERSION = '9.2.0-beta.7'; | ||
const VERSION = '9.2.0-beta.8'; | ||
@@ -1058,2 +1058,24 @@ let code$1 = coreBase.CoreWarnCodes.__EXTEND_POINT__; | ||
} | ||
/** | ||
* Cast to VueI18n legacy compatible type | ||
* | ||
* @remarks | ||
* This API is provided only with [vue-i18n-bridge](https://vue-i18n.intlify.dev/guide/migration/ways.html#what-is-vue-i18n-bridge). | ||
* | ||
* The purpose of this function is to convert an {@link I18n} instance created with {@link createI18n | createI18n(legacy: true)} into a `vue-i18n@v8.x` compatible instance of `new VueI18n` in a TypeScript environment. | ||
* | ||
* @param i18n - An instance of {@link I18n} | ||
* @returns A i18n instance which is casted to {@link VueI18n} type | ||
* | ||
* @VueI18nTip | ||
* :new: provided by **vue-i18n-bridge only** | ||
* | ||
* @VueI18nGeneral | ||
*/ | ||
const castToVueI18n = (i18n) => { | ||
if (!isLegacyVueI18n(i18n)) { | ||
throw createI18nError(I18nErrorCodes.NOT_COMPATIBLE_LEGACY_VUE_I18N); | ||
} | ||
return i18n; | ||
}; | ||
function createGlobal(options, legacyMode, VueI18nLegacy // eslint-disable-line @typescript-eslint/no-explicit-any | ||
@@ -1222,3 +1244,4 @@ ) { | ||
exports.VERSION = VERSION; | ||
exports.castToVueI18n = castToVueI18n; | ||
exports.createI18n = createI18n; | ||
exports.useI18n = useI18n; |
/*! | ||
* vue-i18n-bridge v9.2.0-beta.7 | ||
* vue-i18n-bridge v9.2.0-beta.8 | ||
* (c) 2021 kazuya kawaguchi | ||
@@ -22,3 +22,3 @@ * Released under the MIT License. | ||
*/ | ||
const VERSION = '9.2.0-beta.7'; | ||
const VERSION = '9.2.0-beta.8'; | ||
@@ -969,2 +969,24 @@ let code = coreBase.CompileErrorCodes.__EXTEND_POINT__; | ||
} | ||
/** | ||
* Cast to VueI18n legacy compatible type | ||
* | ||
* @remarks | ||
* This API is provided only with [vue-i18n-bridge](https://vue-i18n.intlify.dev/guide/migration/ways.html#what-is-vue-i18n-bridge). | ||
* | ||
* The purpose of this function is to convert an {@link I18n} instance created with {@link createI18n | createI18n(legacy: true)} into a `vue-i18n@v8.x` compatible instance of `new VueI18n` in a TypeScript environment. | ||
* | ||
* @param i18n - An instance of {@link I18n} | ||
* @returns A i18n instance which is casted to {@link VueI18n} type | ||
* | ||
* @VueI18nTip | ||
* :new: provided by **vue-i18n-bridge only** | ||
* | ||
* @VueI18nGeneral | ||
*/ | ||
const castToVueI18n = (i18n) => { | ||
if (!isLegacyVueI18n(i18n)) { | ||
throw createI18nError(I18nErrorCodes.NOT_COMPATIBLE_LEGACY_VUE_I18N); | ||
} | ||
return i18n; | ||
}; | ||
function createGlobal(options, legacyMode, VueI18nLegacy // eslint-disable-line @typescript-eslint/no-explicit-any | ||
@@ -1127,3 +1149,4 @@ ) { | ||
exports.VERSION = VERSION; | ||
exports.castToVueI18n = castToVueI18n; | ||
exports.createI18n = createI18n; | ||
exports.useI18n = useI18n; |
/*! | ||
* vue-i18n-bridge v9.2.0-beta.7 | ||
* vue-i18n-bridge v9.2.0-beta.8 | ||
* (c) 2021 kazuya kawaguchi | ||
* Released under the MIT License. | ||
*/ | ||
import{ref as e,getCurrentInstance as t,computed as n,watch as r,onBeforeMount as o,onUnmounted as a}from"@vue/composition-api";const s="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,l=e=>s?Symbol(e):e,c=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),i=e=>"number"==typeof e&&isFinite(e),u=e=>"[object RegExp]"===T(e),f=e=>E(e)&&0===Object.keys(e).length;function m(e,t){"undefined"!=typeof console&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}const p=Object.assign;function _(e){return e.replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}const d=Object.prototype.hasOwnProperty;function h(e,t){return d.call(e,t)}const g=Array.isArray,b=e=>"function"==typeof e,k=e=>"string"==typeof e,v=e=>"boolean"==typeof e,L=e=>null!==e&&"object"==typeof e,y=Object.prototype.toString,T=e=>y.call(e),E=e=>"[object Object]"===T(e),N=15;function F(e){throw e}function I(e,t,n){const r={start:e,end:t};return null!=n&&(r.source=n),r}const C=String.fromCharCode(8232),O=String.fromCharCode(8233);function P(e){const t=e;let n=0,r=1,o=1,a=0;const s=e=>"\r"===t[e]&&"\n"===t[e+1],l=e=>t[e]===O,c=e=>t[e]===C,i=e=>s(e)||(e=>"\n"===t[e])(e)||l(e)||c(e),u=e=>s(e)||l(e)||c(e)?"\n":t[e];function f(){return a=0,i(n)&&(r++,o=0),s(n)&&n++,n++,o++,t[n]}return{index:()=>n,line:()=>r,column:()=>o,peekOffset:()=>a,charAt:u,currentChar:()=>u(n),currentPeek:()=>u(n+a),next:f,peek:function(){return s(n+a)&&a++,a++,t[n+a]},reset:function(){n=0,r=1,o=1,a=0},resetPeek:function(e=0){a=e},skipToPeek:function(){const e=n+a;for(;e!==n;)f();a=0}}}const w=void 0;function R(e,t={}){const n=!1!==t.location,r=P(e),o=()=>r.index(),a=()=>{return e=r.line(),t=r.column(),n=r.index(),{line:e,column:t,offset:n};var e,t,n},s=a(),l=o(),c={currentType:14,offset:l,startLoc:s,endLoc:s,lastType:14,lastOffset:l,lastStartLoc:s,lastEndLoc:s,braceNest:0,inLinked:!1,text:""},i=()=>c,{onError:u}=t;function f(e,t,r){e.endLoc=a(),e.currentType=t;const o={type:t};return n&&(o.loc=I(e.startLoc,e.endLoc)),null!=r&&(o.value=r),o}const m=e=>f(e,14);function p(e,t){return e.currentChar()===t?(e.next(),t):(a(),"")}function _(e){let t="";for(;" "===e.currentPeek()||"\n"===e.currentPeek();)t+=e.currentPeek(),e.peek();return t}function d(e){const t=_(e);return e.skipToPeek(),t}function h(e){if(e===w)return!1;const t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||95===t}function g(e,t){const{currentType:n}=t;if(2!==n)return!1;_(e);const r=function(e){if(e===w)return!1;const t=e.charCodeAt(0);return t>=48&&t<=57}("-"===e.currentPeek()?e.peek():e.currentPeek());return e.resetPeek(),r}function b(e){_(e);const t="|"===e.currentPeek();return e.resetPeek(),t}function k(e,t=!0){const n=(t=!1,r="",o=!1)=>{const a=e.currentPeek();return"{"===a?"%"!==r&&t:"@"!==a&&a?"%"===a?(e.peek(),n(t,"%",!0)):"|"===a?!("%"!==r&&!o)||!(" "===r||"\n"===r):" "===a?(e.peek(),n(!0," ",o)):"\n"!==a||(e.peek(),n(!0,"\n",o)):"%"===r||t},r=n();return t&&e.resetPeek(),r}function v(e,t){const n=e.currentChar();return n===w?w:t(n)?(e.next(),n):null}function L(e){return v(e,(e=>{const t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||t>=48&&t<=57||95===t||36===t}))}function y(e){return v(e,(e=>{const t=e.charCodeAt(0);return t>=48&&t<=57}))}function T(e){return v(e,(e=>{const t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}))}function E(e){let t="",n="";for(;t=y(e);)n+=t;return n}function N(e){const t=e.currentChar();switch(t){case"\\":case"'":return e.next(),`\\${t}`;case"u":return F(e,t,4);case"U":return F(e,t,6);default:return a(),""}}function F(e,t,n){p(e,t);let r="";for(let t=0;t<n;t++){const t=T(e);if(!t){a(),e.currentChar();break}r+=t}return`\\${t}${r}`}function C(e){d(e);const t=p(e,"|");return d(e),t}function O(e,t){let n=null;switch(e.currentChar()){case"{":return t.braceNest>=1&&a(),e.next(),n=f(t,2,"{"),d(e),t.braceNest++,n;case"}":return t.braceNest>0&&2===t.currentType&&a(),e.next(),n=f(t,3,"}"),t.braceNest--,t.braceNest>0&&d(e),t.inLinked&&0===t.braceNest&&(t.inLinked=!1),n;case"@":return t.braceNest>0&&a(),n=R(e,t)||m(t),t.braceNest=0,n;default:let r=!0,o=!0,s=!0;if(b(e))return t.braceNest>0&&a(),n=f(t,1,C(e)),t.braceNest=0,t.inLinked=!1,n;if(t.braceNest>0&&(5===t.currentType||6===t.currentType||7===t.currentType))return a(),t.braceNest=0,x(e,t);if(r=function(e,t){const{currentType:n}=t;if(2!==n)return!1;_(e);const r=h(e.currentPeek());return e.resetPeek(),r}(e,t))return n=f(t,5,function(e){d(e);let t="",n="";for(;t=L(e);)n+=t;return e.currentChar()===w&&a(),n}(e)),d(e),n;if(o=g(e,t))return n=f(t,6,function(e){d(e);let t="";return"-"===e.currentChar()?(e.next(),t+=`-${E(e)}`):t+=E(e),e.currentChar()===w&&a(),t}(e)),d(e),n;if(s=function(e,t){const{currentType:n}=t;if(2!==n)return!1;_(e);const r="'"===e.currentPeek();return e.resetPeek(),r}(e,t))return n=f(t,7,function(e){d(e),p(e,"'");let t="",n="";const r=e=>"'"!==e&&"\n"!==e;for(;t=v(e,r);)n+="\\"===t?N(e):t;const o=e.currentChar();return"\n"===o||o===w?(a(),"\n"===o&&(e.next(),p(e,"'")),n):(p(e,"'"),n)}(e)),d(e),n;if(!r&&!o&&!s)return n=f(t,13,function(e){d(e);let t="",n="";const r=e=>"{"!==e&&"}"!==e&&" "!==e&&"\n"!==e;for(;t=v(e,r);)n+=t;return n}(e)),a(),d(e),n}return n}function R(e,t){const{currentType:n}=t;let r=null;const o=e.currentChar();switch(8!==n&&9!==n&&12!==n&&10!==n||"\n"!==o&&" "!==o||a(),o){case"@":return e.next(),r=f(t,8,"@"),t.inLinked=!0,r;case".":return d(e),e.next(),f(t,9,".");case":":return d(e),e.next(),f(t,10,":");default:return b(e)?(r=f(t,1,C(e)),t.braceNest=0,t.inLinked=!1,r):function(e,t){const{currentType:n}=t;if(8!==n)return!1;_(e);const r="."===e.currentPeek();return e.resetPeek(),r}(e,t)||function(e,t){const{currentType:n}=t;if(8!==n&&12!==n)return!1;_(e);const r=":"===e.currentPeek();return e.resetPeek(),r}(e,t)?(d(e),R(e,t)):function(e,t){const{currentType:n}=t;if(9!==n)return!1;_(e);const r=h(e.currentPeek());return e.resetPeek(),r}(e,t)?(d(e),f(t,12,function(e){let t="",n="";for(;t=L(e);)n+=t;return n}(e))):function(e,t){const{currentType:n}=t;if(10!==n)return!1;const r=()=>{const t=e.currentPeek();return"{"===t?h(e.peek()):!("@"===t||"%"===t||"|"===t||":"===t||"."===t||" "===t||!t)&&("\n"===t?(e.peek(),r()):h(t))},o=r();return e.resetPeek(),o}(e,t)?(d(e),"{"===o?O(e,t)||r:f(t,11,function(e){const t=(n=!1,r)=>{const o=e.currentChar();return"{"!==o&&"%"!==o&&"@"!==o&&"|"!==o&&o?" "===o?r:"\n"===o?(r+=o,e.next(),t(n,r)):(r+=o,e.next(),t(!0,r)):r};return t(!1,"")}(e))):(8===n&&a(),t.braceNest=0,t.inLinked=!1,x(e,t))}}function x(e,t){let n={type:14};if(t.braceNest>0)return O(e,t)||m(t);if(t.inLinked)return R(e,t)||m(t);const r=e.currentChar();switch(r){case"{":return O(e,t)||m(t);case"}":return a(),e.next(),f(t,3,"}");case"@":return R(e,t)||m(t);default:if(b(e))return n=f(t,1,C(e)),t.braceNest=0,t.inLinked=!1,n;if(k(e))return f(t,0,function(e){const t=n=>{const r=e.currentChar();return"{"!==r&&"}"!==r&&"@"!==r&&r?"%"===r?k(e)?(n+=r,e.next(),t(n)):n:"|"===r?n:" "===r||"\n"===r?k(e)?(n+=r,e.next(),t(n)):b(e)?n:(n+=r,e.next(),t(n)):(n+=r,e.next(),t(n)):n};return t("")}(e));if("%"===r)return e.next(),f(t,4,"%")}return n}return{nextToken:function(){const{currentType:e,offset:t,startLoc:n,endLoc:s}=c;return c.lastType=e,c.lastOffset=t,c.lastStartLoc=n,c.lastEndLoc=s,c.offset=o(),c.startLoc=a(),r.currentChar()===w?f(c,14):x(r,c)},currentOffset:o,currentPosition:a,context:i}}const x=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function A(e,t,n){switch(e){case"\\\\":return"\\";case"\\'":return"'";default:{const e=parseInt(t||n,16);return e<=55295||e>=57344?String.fromCodePoint(e):"οΏ½"}}}function $(e={}){const t=!1!==e.location,{onError:n}=e;function r(e,n,r){const o={type:e,start:n,end:n};return t&&(o.loc={start:r,end:r}),o}function o(e,n,r,o){e.end=n,o&&(e.type=o),t&&e.loc&&(e.loc.end=r)}function a(e,t){const n=e.context(),a=r(3,n.offset,n.startLoc);return a.value=t,o(a,e.currentOffset(),e.currentPosition()),a}function s(e,t){const n=e.context(),{lastOffset:a,lastStartLoc:s}=n,l=r(5,a,s);return l.index=parseInt(t,10),e.nextToken(),o(l,e.currentOffset(),e.currentPosition()),l}function l(e,t){const n=e.context(),{lastOffset:a,lastStartLoc:s}=n,l=r(4,a,s);return l.key=t,e.nextToken(),o(l,e.currentOffset(),e.currentPosition()),l}function c(e,t){const n=e.context(),{lastOffset:a,lastStartLoc:s}=n,l=r(9,a,s);return l.value=t.replace(x,A),e.nextToken(),o(l,e.currentOffset(),e.currentPosition()),l}function i(e){const t=e.context(),n=r(6,t.offset,t.startLoc);let a=e.nextToken();if(9===a.type){const t=function(e){const t=e.nextToken(),n=e.context(),{lastOffset:a,lastStartLoc:s}=n,l=r(8,a,s);return 12!==t.type?(l.value="",o(l,a,s),{nextConsumeToken:t,node:l}):(null==t.value&&D(t),l.value=t.value||"",o(l,e.currentOffset(),e.currentPosition()),{node:l})}(e);n.modifier=t.node,a=t.nextConsumeToken||e.nextToken()}switch(10!==a.type&&D(a),a=e.nextToken(),2===a.type&&(a=e.nextToken()),a.type){case 11:null==a.value&&D(a),n.key=function(e,t){const n=e.context(),a=r(7,n.offset,n.startLoc);return a.value=t,o(a,e.currentOffset(),e.currentPosition()),a}(e,a.value||"");break;case 5:null==a.value&&D(a),n.key=l(e,a.value||"");break;case 6:null==a.value&&D(a),n.key=s(e,a.value||"");break;case 7:null==a.value&&D(a),n.key=c(e,a.value||"");break;default:const t=e.context(),i=r(7,t.offset,t.startLoc);return i.value="",o(i,t.offset,t.startLoc),n.key=i,o(n,t.offset,t.startLoc),{nextConsumeToken:a,node:n}}return o(n,e.currentOffset(),e.currentPosition()),{node:n}}function u(e){const t=e.context(),n=r(2,1===t.currentType?e.currentOffset():t.offset,1===t.currentType?t.endLoc:t.startLoc);n.items=[];let u=null;do{const t=u||e.nextToken();switch(u=null,t.type){case 0:null==t.value&&D(t),n.items.push(a(e,t.value||""));break;case 6:null==t.value&&D(t),n.items.push(s(e,t.value||""));break;case 5:null==t.value&&D(t),n.items.push(l(e,t.value||""));break;case 7:null==t.value&&D(t),n.items.push(c(e,t.value||""));break;case 8:const r=i(e);n.items.push(r.node),u=r.nextConsumeToken||null}}while(14!==t.currentType&&1!==t.currentType);return o(n,1===t.currentType?t.lastOffset:e.currentOffset(),1===t.currentType?t.lastEndLoc:e.currentPosition()),n}function f(e){const t=e.context(),{offset:n,startLoc:a}=t,s=u(e);return 14===t.currentType?s:function(e,t,n,a){const s=e.context();let l=0===a.items.length;const c=r(1,t,n);c.cases=[],c.cases.push(a);do{const t=u(e);l||(l=0===t.items.length),c.cases.push(t)}while(14!==s.currentType);return o(c,e.currentOffset(),e.currentPosition()),c}(e,n,a,s)}return{parse:function(n){const a=R(n,p({},e)),s=a.context(),l=r(0,s.offset,s.startLoc);return t&&l.loc&&(l.loc.source=n),l.body=f(a),o(l,a.currentOffset(),a.currentPosition()),l}}}function D(e){if(14===e.type)return"EOF";const t=(e.value||"").replace(/\r?\n/gu,"\\n");return t.length>10?t.slice(0,9)+"β¦":t}function W(e,t){for(let n=0;n<e.length;n++)M(e[n],t)}function M(e,t){switch(e.type){case 1:W(e.cases,t),t.helper("plural");break;case 2:W(e.items,t);break;case 6:M(e.key,t),t.helper("linked");break;case 5:t.helper("interpolate"),t.helper("list");break;case 4:t.helper("interpolate"),t.helper("named")}}function S(e,t={}){const n=function(e,t={}){const n={ast:e,helpers:new Set};return{context:()=>n,helper:e=>(n.helpers.add(e),e)}}(e);n.helper("normalize"),e.body&&M(e.body,n);const r=n.context();e.helpers=Array.from(r.helpers)}function U(e,t){const{helper:n}=e;switch(t.type){case 0:!function(e,t){t.body?U(e,t.body):e.push("null")}(e,t);break;case 1:!function(e,t){const{helper:n,needIndent:r}=e;if(t.cases.length>1){e.push(`${n("plural")}([`),e.indent(r());const o=t.cases.length;for(let n=0;n<o&&(U(e,t.cases[n]),n!==o-1);n++)e.push(", ");e.deindent(r()),e.push("])")}}(e,t);break;case 2:!function(e,t){const{helper:n,needIndent:r}=e;e.push(`${n("normalize")}([`),e.indent(r());const o=t.items.length;for(let n=0;n<o&&(U(e,t.items[n]),n!==o-1);n++)e.push(", ");e.deindent(r()),e.push("])")}(e,t);break;case 6:!function(e,t){const{helper:n}=e;e.push(`${n("linked")}(`),U(e,t.key),t.modifier&&(e.push(", "),U(e,t.modifier)),e.push(")")}(e,t);break;case 8:case 7:e.push(JSON.stringify(t.value),t);break;case 5:e.push(`${n("interpolate")}(${n("list")}(${t.index}))`,t);break;case 4:e.push(`${n("interpolate")}(${n("named")}(${JSON.stringify(t.key)}))`,t);break;case 9:case 3:e.push(JSON.stringify(t.value),t)}}function V(e,t={}){const n=p({},t),r=$(n).parse(e);return S(r,n),((e,t={})=>{const n=k(t.mode)?t.mode:"normal",r=k(t.filename)?t.filename:"message.intl",o=t.needIndent?t.needIndent:"arrow"!==n,a=e.helpers||[],s=function(e,t){const{filename:n,breakLineCode:r,needIndent:o}=t,a={source:e.loc.source,filename:n,code:"",column:1,line:1,offset:0,map:void 0,breakLineCode:r,needIndent:o,indentLevel:0};function s(e,t){a.code+=e}function l(e,t=!0){const n=t?r:"";s(o?n+" ".repeat(e):n)}return{context:()=>a,push:s,indent:function(e=!0){const t=++a.indentLevel;e&&l(t)},deindent:function(e=!0){const t=--a.indentLevel;e&&l(t)},newline:function(){l(a.indentLevel)},helper:e=>`_${e}`,needIndent:()=>a.needIndent}}(e,{mode:n,filename:r,sourceMap:!!t.sourceMap,breakLineCode:null!=t.breakLineCode?t.breakLineCode:"arrow"===n?";":"\n",needIndent:o});s.push("normal"===n?"function __msg__ (ctx) {":"(ctx) => {"),s.indent(o),a.length>0&&(s.push(`const { ${a.map((e=>`${e}: _${e}`)).join(", ")} } = ctx`),s.newline()),s.push("return "),U(s,e),s.deindent(o),s.push("}");const{code:l,map:c}=s.context();return{ast:e,code:l,map:c?c.toJSON():void 0}})(r,n)}const j=[];j[0]={w:[0],i:[3,0],"[":[4],o:[7]},j[1]={w:[1],".":[2],"[":[4],o:[7]},j[2]={w:[2],i:[3,0],0:[3,0]},j[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},j[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},j[5]={"'":[4,0],o:8,l:[5,0]},j[6]={'"':[4,0],o:8,l:[6,0]};const G=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function H(e){if(null==e)return"o";switch(e.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return e;case 95:case 36:case 45:return"i";case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"w"}return"i"}function B(e){const t=e.trim();return("0"!==e.charAt(0)||!isNaN(parseInt(e)))&&(G.test(t)?function(e){const t=e.charCodeAt(0);return t!==e.charCodeAt(e.length-1)||34!==t&&39!==t?e:e.slice(1,-1)}(t):"*"+t)}const J=new Map;function z(e,t){return L(e)?e[t]:null}const X=e=>e,Y=e=>"",K=e=>0===e.length?"":e.join(""),q=e=>null==e?"":g(e)||E(e)&&e.toString===y?JSON.stringify(e,null,2):String(e);function Q(e,t){return e=Math.abs(e),2===t?e?e>1?1:0:1:e?Math.min(e,2):0}function Z(e={}){const t=e.locale,n=function(e){const t=i(e.pluralIndex)?e.pluralIndex:-1;return e.named&&(i(e.named.count)||i(e.named.n))?i(e.named.count)?e.named.count:i(e.named.n)?e.named.n:t:t}(e),r=L(e.pluralRules)&&k(t)&&b(e.pluralRules[t])?e.pluralRules[t]:Q,o=L(e.pluralRules)&&k(t)&&b(e.pluralRules[t])?Q:void 0,a=e.list||[],s=e.named||{};i(e.pluralIndex)&&function(e,t){t.count||(t.count=e),t.n||(t.n=e)}(n,s);function l(t){const n=b(e.messages)?e.messages(t):!!L(e.messages)&&e.messages[t];return n||(e.parent?e.parent.message(t):Y)}const c=E(e.processor)&&b(e.processor.normalize)?e.processor.normalize:K,u=E(e.processor)&&b(e.processor.interpolate)?e.processor.interpolate:q,f={list:e=>a[e],named:e=>s[e],plural:e=>e[r(n,e.length,o)],linked:(t,n)=>{const r=l(t)(f);return k(n)?(o=n,e.modifiers?e.modifiers[o]:X)(r):r;var o},message:l,type:E(e.processor)&&k(e.processor.type)?e.processor.type:"text",interpolate:u,normalize:c};return f}function ee(e,t,n){return[...new Set([n,...g(t)?t:L(t)?Object.keys(t):k(t)?[t]:[n]])]}function te(e,t,n){const r=k(n)?n:ae,o=e;o.__localeChainCache||(o.__localeChainCache=new Map);let a=o.__localeChainCache.get(r);if(!a){a=[];let e=[n];for(;g(e);)e=ne(a,e,t);const s=g(t)||!E(t)?t:t.default?t.default:null;e=k(s)?[s]:s,g(e)&&ne(a,e,!1),o.__localeChainCache.set(r,a)}return a}function ne(e,t,n){let r=!0;for(let o=0;o<t.length&&v(r);o++){k(t[o])&&(r=re(e,t[o],n))}return r}function re(e,t,n){let r;const o=t.split("-");do{r=oe(e,o.join("-"),n),o.splice(-1,1)}while(o.length&&!0===r);return r}function oe(e,t,n){let r=!1;if(!e.includes(t)&&(r=!0,t)){r="!"!==t[t.length-1];const o=t.replace(/!/g,"");e.push(o),(g(n)||E(n))&&n[o]&&(r=n[o])}return r}const ae="en-US";let se,le,ce;let ie=0;function ue(e={}){const t=k(e.version)?e.version:"9.2.0-beta.7",n=k(e.locale)?e.locale:ae,r=g(e.fallbackLocale)||E(e.fallbackLocale)||k(e.fallbackLocale)||!1===e.fallbackLocale?e.fallbackLocale:n,o=E(e.messages)?e.messages:{[n]:{}},a=E(e.datetimeFormats)?e.datetimeFormats:{[n]:{}},s=E(e.numberFormats)?e.numberFormats:{[n]:{}},l=p({},e.modifiers||{},{upper:e=>k(e)?e.toUpperCase():e,lower:e=>k(e)?e.toLowerCase():e,capitalize:e=>k(e)?`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`:e}),c=e.pluralRules||{},i=b(e.missing)?e.missing:null,f=!v(e.missingWarn)&&!u(e.missingWarn)||e.missingWarn,_=!v(e.fallbackWarn)&&!u(e.fallbackWarn)||e.fallbackWarn,d=!!e.fallbackFormat,h=!!e.unresolving,y=b(e.postTranslation)?e.postTranslation:null,T=E(e.processor)?e.processor:null,N=!v(e.warnHtmlMessage)||e.warnHtmlMessage,F=!!e.escapeParameter,I=b(e.messageCompiler)?e.messageCompiler:se,C=b(e.messageResolver)?e.messageResolver:le||z,O=b(e.localeFallbacker)?e.localeFallbacker:ce||ee,P=b(e.onWarn)?e.onWarn:m,w=e,R=L(w.__datetimeFormatters)?w.__datetimeFormatters:new Map,x=L(w.__numberFormatters)?w.__numberFormatters:new Map,A=L(w.__meta)?w.__meta:{};ie++;const $={version:t,cid:ie,locale:n,fallbackLocale:r,messages:o,modifiers:l,pluralRules:c,missing:i,missingWarn:f,fallbackWarn:_,fallbackFormat:d,unresolving:h,postTranslation:y,processor:T,warnHtmlMessage:N,escapeParameter:F,messageCompiler:I,messageResolver:C,localeFallbacker:O,onWarn:P,__meta:A};return $.datetimeFormats=a,$.numberFormats=s,$.__datetimeFormatters=R,$.__numberFormatters=x,$}function fe(e,t,n,r,o){const{missing:a}=e;if(null!==a){const r=a(e,n,t,o);return k(r)?r:t}return t}function me(e,t,n){e.__localeChainCache=new Map,e.localeFallbacker(e,n,t)}const pe=e=>e;let _e=Object.create(null);let de=N;const he=()=>de++,ge={INVALID_ARGUMENT:de,INVALID_DATE_ARGUMENT:he(),INVALID_ISO_DATE_ARGUMENT:he(),__EXTEND_POINT__:he()},be=()=>"",ke=e=>b(e);function ve(e,...t){const{fallbackFormat:n,postTranslation:r,unresolving:o,fallbackLocale:a,messages:s}=e,[l,c]=ye(...t),u=(v(c.missingWarn),v(c.fallbackWarn),v(c.escapeParameter)?c.escapeParameter:e.escapeParameter),f=!!c.resolvedMessage,m=k(c.default)||v(c.default)?v(c.default)?l:c.default:n?l:"",p=n||""!==m,d=k(c.locale)?c.locale:e.locale;u&&function(e){g(e.list)?e.list=e.list.map((e=>k(e)?_(e):e)):L(e.named)&&Object.keys(e.named).forEach((t=>{k(e.named[t])&&(e.named[t]=_(e.named[t]))}))}(c);let[h,y,T]=f?[l,d,s[d]||{}]:function(e,t,n,r,o,a){const{messages:s,messageResolver:l,localeFallbacker:c}=e,i=c(e,r,n);let u,f={},m=null;const p="translate";for(let n=0;n<i.length&&(u=i[n],f=s[u]||{},null===(m=l(f,t))&&(m=f[t]),!k(m)&&!b(m));n++){const n=fe(e,t,u,0,p);n!==t&&(m=n)}return[m,u,f]}(e,l,d,a),E=l;if(f||k(h)||ke(h)||p&&(h=m,E=h),!(f||(k(h)||ke(h))&&k(y)))return o?-1:l;let N=!1;const F=ke(h)?h:Le(e,l,y,h,E,(()=>{N=!0}));if(N)return h;const I=function(e,t,n){return t(n)}(0,F,Z(function(e,t,n,r){const{modifiers:o,pluralRules:a,messageResolver:s}=e,l={locale:t,modifiers:o,pluralRules:a,messages:r=>{const o=s(n,r);if(k(o)){let n=!1;const a=Le(e,r,t,o,r,(()=>{n=!0}));return n?be:a}return ke(o)?o:be}};e.processor&&(l.processor=e.processor);r.list&&(l.list=r.list);r.named&&(l.named=r.named);i(r.plural)&&(l.pluralIndex=r.plural);return l}(e,y,T,c)));return r?r(I):I}function Le(e,t,n,r,o,a){const{messageCompiler:s,warnHtmlMessage:l}=e;if(ke(r)){const e=r;return e.locale=e.locale||n,e.key=e.key||t,e}const i=s(r,function(e,t,n,r,o,a){return{warnHtmlMessage:o,onError:e=>{throw a&&a(e),e},onCacheKey:e=>((e,t,n)=>c({l:e,k:t,s:n}))(t,n,e)}}(0,n,o,0,l,a));return i.locale=n,i.key=t,i.source=r,i}function ye(...e){const[t,n,r]=e,o={};if(!k(t)&&!i(t)&&!ke(t))throw Error(ge.INVALID_ARGUMENT);const a=i(t)?String(t):(ke(t),t);return i(n)?o.plural=n:k(n)?o.default=n:E(n)&&!f(n)?o.named=n:g(n)&&(o.list=n),i(r)?o.plural=r:k(r)?o.default=r:E(r)&&p(o,r),[a,o]}function Te(e,...t){const{datetimeFormats:n,unresolving:r,fallbackLocale:o,localeFallbacker:a}=e,{__datetimeFormatters:s}=e,[l,c,i,u]=Ee(...t);v(i.missingWarn);v(i.fallbackWarn);const m=!!i.part,_=k(i.locale)?i.locale:e.locale,d=a(e,o,_);if(!k(l)||""===l)return new Intl.DateTimeFormat(_).format(c);let h,g={},b=null;for(let t=0;t<d.length&&(h=d[t],g=n[h]||{},b=g[l],!E(b));t++)fe(e,l,h,0,"datetime format");if(!E(b)||!k(h))return r?-1:l;let L=`${h}__${l}`;f(u)||(L=`${L}__${JSON.stringify(u)}`);let y=s.get(L);return y||(y=new Intl.DateTimeFormat(h,p({},b,u)),s.set(L,y)),m?y.formatToParts(c):y.format(c)}function Ee(...e){const[t,n,r,o]=e;let a,s={},l={};if(k(t)){const e=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!e)throw Error(ge.INVALID_ISO_DATE_ARGUMENT);const n=e[3]?e[3].trim().startsWith("T")?`${e[1].trim()}${e[3].trim()}`:`${e[1].trim()}T${e[3].trim()}`:e[1].trim();a=new Date(n);try{a.toISOString()}catch(e){throw Error(ge.INVALID_ISO_DATE_ARGUMENT)}}else if("[object Date]"===T(t)){if(isNaN(t.getTime()))throw Error(ge.INVALID_DATE_ARGUMENT);a=t}else{if(!i(t))throw Error(ge.INVALID_ARGUMENT);a=t}return k(n)?s.key=n:E(n)&&(s=n),k(r)?s.locale=r:E(r)&&(l=r),E(o)&&(l=o),[s.key||"",a,s,l]}function Ne(e,t,n){const r=e;for(const e in n){const n=`${t}__${e}`;r.__datetimeFormatters.has(n)&&r.__datetimeFormatters.delete(n)}}function Fe(e,...t){const{numberFormats:n,unresolving:r,fallbackLocale:o,localeFallbacker:a}=e,{__numberFormatters:s}=e,[l,c,i,u]=Ie(...t);v(i.missingWarn);v(i.fallbackWarn);const m=!!i.part,_=k(i.locale)?i.locale:e.locale,d=a(e,o,_);if(!k(l)||""===l)return new Intl.NumberFormat(_).format(c);let h,g={},b=null;for(let t=0;t<d.length&&(h=d[t],g=n[h]||{},b=g[l],!E(b));t++)fe(e,l,h,0,"number format");if(!E(b)||!k(h))return r?-1:l;let L=`${h}__${l}`;f(u)||(L=`${L}__${JSON.stringify(u)}`);let y=s.get(L);return y||(y=new Intl.NumberFormat(h,p({},b,u)),s.set(L,y)),m?y.formatToParts(c):y.format(c)}function Ie(...e){const[t,n,r,o]=e;let a={},s={};if(!i(t))throw Error(ge.INVALID_ARGUMENT);const l=t;return k(n)?a.key=n:E(n)&&(a=n),k(r)?a.locale=r:E(r)&&(s=r),E(o)&&(s=o),[a.key||"",l,a,s]}function Ce(e,t,n){const r=e;for(const e in n){const n=`${t}__${e}`;r.__numberFormatters.has(n)&&r.__numberFormatters.delete(n)}}const Oe="9.2.0-beta.7";let Pe=N;const we=()=>Pe++,Re={UNEXPECTED_RETURN_TYPE:Pe,INVALID_ARGUMENT:we(),MUST_BE_CALL_SETUP_TOP:we(),NOT_INSLALLED:we(),NOT_AVAILABLE_IN_LEGACY_MODE:we(),REQUIRED_VALUE:we(),INVALID_VALUE:we(),CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:we(),NOT_INSLALLED_WITH_PROVIDE:we(),UNEXPECTED_ERROR:we(),NOT_COMPATIBLE_LEGACY_VUE_I18N:we(),BRIDGE_SUPPORT_VUE_2_ONLY:we(),__EXTEND_POINT__:we()},xe=l("__setPluralRules"),Ae=l("__legacyVueI18n");function $e(e){return null!=e&&null!=e.version&&(Number(e.version.split(".")[0])||-1)>=8}function De(e){if(!L(e))return e;for(const t in e)if(h(e,t))if(t.includes(".")){const n=t.split("."),r=n.length-1;let o=e;for(let e=0;e<r;e++)n[e]in o||(o[n[e]]={}),o=o[n[e]];o[n[r]]=e[t],delete e[t],L(o[n[r]])&&De(o[n[r]])}else L(e[t])&&De(e[t]);return e}function We(e,t){const{messages:n,__i18n:r,messageResolver:o,flatJson:a}=t,s=E(n)?n:g(r)?{}:{[e]:{}};if(g(r)&&r.forEach((e=>{if("locale"in e&&"resource"in e){const{locale:t,resource:n}=e;t?(s[t]=s[t]||{},Se(n,s[t])):Se(n,s)}else k(e)&&Se(JSON.parse(e),s)})),null==o&&a)for(const e in s)h(s,e)&&De(s[e]);return s}const Me=e=>!L(e)||g(e);function Se(e,t){if(Me(e)||Me(t))throw Error(Re.INVALID_VALUE);for(const n in e)h(e,n)&&(Me(e[n])||Me(t[n])?t[n]=e[n]:Se(e[n],t[n]))}let Ue=0;function Ve(e){return(n,r,o,a)=>e(r,o,t()||void 0,a)}function je(t={},o){const{__root:a}=t,s=void 0===a;let l=!v(t.inheritLocale)||t.inheritLocale;const c=e(a&&l?a.locale.value:k(t.locale)?t.locale:ae),f=e(a&&l?a.fallbackLocale.value:k(t.fallbackLocale)||g(t.fallbackLocale)||E(t.fallbackLocale)||!1===t.fallbackLocale?t.fallbackLocale:c.value),m=e(We(c.value,t)),_=e(E(t.datetimeFormats)?t.datetimeFormats:{[c.value]:{}}),d=e(E(t.numberFormats)?t.numberFormats:{[c.value]:{}});let h=a?a.missingWarn:!v(t.missingWarn)&&!u(t.missingWarn)||t.missingWarn,y=a?a.fallbackWarn:!v(t.fallbackWarn)&&!u(t.fallbackWarn)||t.fallbackWarn,T=a?a.fallbackRoot:!v(t.fallbackRoot)||t.fallbackRoot,N=!!t.fallbackFormat,F=b(t.missing)?t.missing:null,I=b(t.missing)?Ve(t.missing):null,C=b(t.postTranslation)?t.postTranslation:null,O=!v(t.warnHtmlMessage)||t.warnHtmlMessage,P=!!t.escapeParameter;const w=a?a.modifiers:E(t.modifiers)?t.modifiers:{};let R,x,A=t.pluralRules||a&&a.pluralRules;{$e(o);const e={locale:c.value,fallbackLocale:f.value,messages:m.value,dateTimeFormats:_.value,numberFormats:d.value,modifiers:w,missing:F,fallbackRoot:T,postTranslation:C,pluralizationRules:A,escapeParameterHtml:P,sync:l,silentFallbackWarn:v(y)?!y:y,silentTranslationWarn:v(h)?!h:h,formatFallbackMessages:v(N)?!N:N,warnHtmlInMessage:v(O)&&O?"warn":"off"};R=new o(e)}x=function(){const e={version:"9.2.0-beta.7",locale:c.value,fallbackLocale:f.value,messages:m.value,modifiers:w,pluralRules:A,missing:null===I?void 0:I,missingWarn:h,fallbackWarn:y,fallbackFormat:N,unresolving:!0,postTranslation:null===C?void 0:C,warnHtmlMessage:O,escapeParameter:P,messageResolver:t.messageResolver,__meta:{framework:"vue"}};return e.datetimeFormats=_.value,e.numberFormats=d.value,e.__datetimeFormatters=E(x)?x.__datetimeFormatters:void 0,e.__numberFormatters=E(x)?x.__numberFormatters:void 0,ue(e)}(),me(x,c.value,f.value);const $=n({get:()=>c.value,set:e=>{c.value=e,R&&(R.locale=e),x.locale=c.value}}),D=n({get:()=>f.value,set:e=>{f.value=e,R&&(R.fallbackLocale=e),x.fallbackLocale=f.value,me(x,c.value,e)}}),W=n((()=>m.value)),M=n((()=>_.value)),S=n((()=>d.value));function U(e,t,n,r,o,s){let l;if(l=e(x),i(l)&&-1===l){const[e,n]=t();return a&&T?r(a):o(e)}if(s(l))return l;throw Error(Re.UNEXPECTED_RETURN_TYPE)}function V(...e){return U((t=>Reflect.apply(ve,null,[t,...e])),(()=>ye(...e)),0,(t=>Reflect.apply(t.t,t,[...e])),(e=>e),(e=>k(e)))}function j(e){return m.value[e]||{}}Ue++,a&&(r(a.locale,(e=>{l&&(c.value=e,R&&(R.locale=e),x.locale=e,me(x,c.value,f.value))})),r(a.fallbackLocale,(e=>{l&&(f.value=e,R&&(R.fallbackLocale=e),x.fallbackLocale=e,me(x,c.value,f.value))})));const G={id:Ue,locale:$,fallbackLocale:D,get inheritLocale(){return l},set inheritLocale(e){l=e,R&&(R._sync=e),e&&a&&(c.value=a.locale.value,f.value=a.fallbackLocale.value,R&&(R.locale=a.locale.value,R.fallbackLocale=a.fallbackLocale.value),me(x,c.value,f.value))},get availableLocales(){return Object.keys(m.value).sort()},messages:W,get modifiers(){return w},get pluralRules(){return A||{}},get isGlobal(){return s},get missingWarn(){return h},set missingWarn(e){h=e,x.missingWarn=h},get fallbackWarn(){return y},set fallbackWarn(e){y=e,x.fallbackWarn=y},get fallbackRoot(){return T},set fallbackRoot(e){T=e},get fallbackFormat(){return N},set fallbackFormat(e){N=e,x.fallbackFormat=N},get warnHtmlMessage(){return O},set warnHtmlMessage(e){O=e,x.warnHtmlMessage=e},get escapeParameter(){return P},set escapeParameter(e){P=e,x.escapeParameter=e},t:V,getLocaleMessage:j,setLocaleMessage:function(e,t){m.value[e]=t,R&&R.setLocaleMessage(e,t),x.messages=m.value},mergeLocaleMessage:function(e,t){m.value[e]=m.value[e]||{},R&&R.mergeLocaleMessage(e,t),Se(t,m.value[e]),x.messages=m.value},getPostTranslationHandler:function(){return b(C)?C:null},setPostTranslationHandler:function(e){C=e,x.postTranslation=e},getMissingHandler:function(){return F},setMissingHandler:function(e){null!==e&&(I=Ve(e)),F=e,x.missing=I},[xe]:function(e){A=e,x.pluralRules=A}};return G.datetimeFormats=M,G.numberFormats=S,G.rt=function(...e){const[t,n,r]=e;if(r&&!L(r))throw Error(Re.INVALID_ARGUMENT);return V(t,n,p({resolvedMessage:!0},r||{}))},G.te=function(e,t){const n=j(k(t)?t:c.value);return null!==x.messageResolver(n,e)},G.tm=function(e){const t=function(e){let t=null;const n=te(x,f.value,c.value);for(let r=0;r<n.length;r++){const o=x.messageResolver(m.value[n[r]]||{},e);if(null!=o){t=o;break}}return t}(e);return null!=t?t:a&&a.tm(e)||{}},G.d=function(...e){return U((t=>Reflect.apply(Te,null,[t,...e])),(()=>Ee(...e)),0,(t=>Reflect.apply(t.d,t,[...e])),(()=>""),(e=>k(e)))},G.n=function(...e){return U((t=>Reflect.apply(Fe,null,[t,...e])),(()=>Ie(...e)),0,(t=>Reflect.apply(t.n,t,[...e])),(()=>""),(e=>k(e)))},G.getDateTimeFormat=function(e){return _.value[e]||{}},G.setDateTimeFormat=function(e,t){_.value[e]=t,R&&R.setDateTimeFormat(e,t),x.datetimeFormats=_.value,Ne(x,e,t)},G.mergeDateTimeFormat=function(e,t){_.value[e]=p(_.value[e]||{},t),R&&R.mergeDateTimeFormat(e,t),x.datetimeFormats=_.value,Ne(x,e,t)},G.getNumberFormat=function(e){return d.value[e]||{}},G.setNumberFormat=function(e,t){d.value[e]=t,R&&R.setNumberFormat(e,t),x.numberFormats=d.value,Ce(x,e,t)},G.mergeNumberFormat=function(e,t){d.value[e]=p(d.value[e]||{},t),R&&R.mergeNumberFormat(e,t),x.numberFormats=d.value,Ce(x,e,t)},G[Ae]=R,G}let Ge=null,He=null;const Be=l("global-vue-i18n");function Je(e={},t){if(He)return He;Ge=t;const n=!v(e.legacy)||e.legacy,r=new Map,o=function(e,t,n){if(!$e(n))throw Error(Re.NOT_COMPATIBLE_LEGACY_VUE_I18N);return je(e,n)}(e,0,t);l("");{const e=o[Ae];Object.defineProperty(e,"global",{get:()=>o}),Object.defineProperty(e,"mode",{get:()=>n?"legacy":"composition"}),Object.defineProperty(e,"__instances",{get:()=>r}),Object.defineProperty(e,"install",{value:t=>{if(2!==(t&&t.version&&Number(t.version.split(".")[0])||-1))throw Error(Re.BRIDGE_SUPPORT_VUE_2_ONLY);t.mixin(function(e,t){return{beforeCreate(){const n=this.$options;if(!n.__VUE18N__INSTANCE__)if(n.i18n=n.i18n||(n.__i18n?{}:null),this._i18nBridgeRoot=e,"composition"!==e.mode)if(n.i18n){if(n.i18n instanceof t){if(n.__i18n)try{const e=n.i18n&&n.i18n.messages?n.i18n.messages:{};n.__i18n.forEach((t=>Se(e,JSON.parse(t)))),Object.keys(e).forEach((t=>{n.i18n.mergeLocaleMessage(t,e[t])}))}catch(e){}this._i18n=n.i18n,this._i18nWatcher=this._i18n.watchI18nData()}else if(E(n.i18n)){const e=this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof t?this.$root.$i18n:null;if(e&&(n.i18n.root=this.$root,n.i18n.formatter=e.formatter,n.i18n.fallbackLocale=e.fallbackLocale,n.i18n.formatFallbackMessages=e.formatFallbackMessages,n.i18n.silentTranslationWarn=e.silentTranslationWarn,n.i18n.silentFallbackWarn=e.silentFallbackWarn,n.i18n.pluralizationRules=e.pluralizationRules,n.i18n.preserveDirectiveContent=e.preserveDirectiveContent),n.__i18n)try{const e=n.i18n&&n.i18n.messages?n.i18n.messages:{};n.__i18n.forEach((t=>Se(e,JSON.parse(t)))),n.i18n.messages=e}catch(e){}const{sharedMessages:r}=n.i18n;r&&E(r)&&Se(n.i18n.messages,r),this._i18n=new t(n.i18n),this._i18nWatcher=this._i18n.watchI18nData(),(void 0===n.i18n.sync||n.i18n.sync)&&(this._localeWatcher=this.$i18n.watchLocale()),e&&e.onComponentInstanceCreated(this._i18n)}}else this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof t?this._i18n=this.$root.$i18n:n.parent&&n.parent.$i18n&&n.parent.$i18n instanceof t&&(this._i18n=n.parent.$i18n);else this._i18n=e},beforeMount(){const e=this.$options;e.__VUE18N__INSTANCE__||(e.i18n=e.i18n||(e.__i18n?{}:null),e.i18n?(e.i18n instanceof t||E(e.i18n))&&(this._i18n.subscribeDataChanging(this),this._subscribing=!0):(this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof t||e.parent&&e.parent.$i18n&&e.parent.$i18n instanceof t)&&(this._i18n.subscribeDataChanging(this),this._subscribing=!0))},beforeDestroy(){if(this.$options.__VUE18N__INSTANCE__)return;if(this._i18nBridgeRoot)return void delete this._i18nBridgeRoot;if("composition"===e.mode)return void delete this._i18n;if(!this._i18n)return;const t=this;this.$nextTick((()=>{t._subscribing&&(t._i18n.unsubscribeDataChanging(t),delete t._subscribing),t._i18nWatcher&&(t._i18nWatcher(),t._i18n.destroyVM(),delete t._i18nWatcher),t._localeWatcher&&(t._localeWatcher(),delete t._localeWatcher)}))}}}(e,Ge))}});const t={__getInstance:function(e){return r.get(e)||null},__setInstance:function(e,t){r.set(e,t)},__deleteInstance:function(e){r.delete(e)}};return Object.keys(t).forEach((n=>Object.defineProperty(e,n,{value:t[n]}))),He=e,e}}function ze(e={}){const n=t();if(null==n)throw Error(Re.MUST_BE_CALL_SETUP_TOP);if(null==Ge||null==He)throw Error(Re.NOT_INSLALLED);const r=function(e){{const t=e.proxy;if(null==t)throw Error(Re.UNEXPECTED_ERROR);const n=t._i18nBridgeRoot;if(!n)throw Error(Re.NOT_INSLALLED);return n}}(n),s=function(e){return e.global}(r),l=function(e){return e.proxy.$options}(n),c=function(e,t){return f(e)?"__i18n"in t?"local":"global":e.useScope?e.useScope:"local"}(e,l);if("global"===c)return function(e,t,n){let r=L(t.messages)?t.messages:{};"__i18nGlobal"in n&&(r=We(e.locale.value,{messages:r,__i18n:n.__i18nGlobal}));const o=Object.keys(r);o.length&&o.forEach((t=>{e.mergeLocaleMessage(t,r[t])}));if(L(t.datetimeFormats)){const n=Object.keys(t.datetimeFormats);n.length&&n.forEach((n=>{e.mergeDateTimeFormat(n,t.datetimeFormats[n])}))}if(L(t.numberFormats)){const n=Object.keys(t.numberFormats);n.length&&n.forEach((n=>{e.mergeNumberFormat(n,t.numberFormats[n])}))}}(s,e,l),s;if("parent"===c){let e=function(e,t){let n=null;const r=t.root;let o=t.parent;for(;null!=o;){const t=e;if("composition"===e.mode)n=t.__getInstance(o);else{const e=t.__getInstance(o);null!=e&&(n=e.__composer)}if(null!=n)break;if(r===o)break;o=o.parent}return n}(r,n);return null==e&&(e=s),e}if("legacy"===r.mode)throw Error(Re.NOT_AVAILABLE_IN_LEGACY_MODE);const i=r;let u=i.__getInstance(n);if(null==u){const t=p({},e);"__i18n"in l&&(t.__i18n=l.__i18n),s&&(t.__root=s),u=je(t,Ge),function(e,t,n){{const r=t.proxy;if(null==r)throw Error(Re.UNEXPECTED_ERROR);const s=n[Ae];if(s===e)throw Error(Re.UNEXPECTED_ERROR);r._i18n=s,r._i18n_bridge=!0,r._i18nWatcher=r._i18n.watchI18nData(),r._i18n._sync&&(r._localeWatcher=r._i18n.watchLocale());let l=!1;o((()=>{r._i18n.subscribeDataChanging(r),l=!0}),t),a((()=>{l&&(r._i18n.unsubscribeDataChanging(r),l=!1),r._i18nWatcher&&(r._i18nWatcher(),r._i18n.destroyVM(),delete r._i18nWatcher),r._localeWatcher&&(r._localeWatcher(),delete r._localeWatcher),delete r._i18n_bridge,delete r._i18n}),t)}}(i,n,u),i.__setInstance(n,u)}return u}se=function(e,t={}){{const n=(t.onCacheKey||pe)(e),r=_e[n];if(r)return r;let o=!1;const a=t.onError||F;t.onError=e=>{o=!0,a(e)};const{code:s}=V(e,t),l=new Function(`return ${s}`)();return o?l:_e[n]=l}},le=function(e,t){if(!L(e))return null;let n=J.get(t);if(n||(n=function(e){const t=[];let n,r,o,a,s,l,c,i=-1,u=0,f=0;const m=[];function p(){const t=e[i+1];if(5===u&&"'"===t||6===u&&'"'===t)return i++,o="\\"+t,m[0](),!0}for(m[0]=()=>{void 0===r?r=o:r+=o},m[1]=()=>{void 0!==r&&(t.push(r),r=void 0)},m[2]=()=>{m[0](),f++},m[3]=()=>{if(f>0)f--,u=4,m[0]();else{if(f=0,void 0===r)return!1;if(r=B(r),!1===r)return!1;m[1]()}};null!==u;)if(i++,n=e[i],"\\"!==n||!p()){if(a=H(n),c=j[u],s=c[a]||c.l||8,8===s)return;if(u=s[0],void 0!==s[1]&&(l=m[s[1]],l&&(o=n,!1===l())))return;if(7===u)return t}}(t),n&&J.set(t,n)),!n)return null;const r=n.length;let o=e,a=0;for(;a<r;){const e=o[n[a]];if(void 0===e)return null;o=e,a++}return o},ce=te;export{Be as I18nInjectionKey,Oe as VERSION,Je as createI18n,ze as useI18n}; | ||
import{ref as e,getCurrentInstance as t,computed as n,watch as r,onBeforeMount as o,onUnmounted as a}from"@vue/composition-api";const s="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,l=e=>s?Symbol(e):e,c=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),i=e=>"number"==typeof e&&isFinite(e),u=e=>"[object RegExp]"===T(e),f=e=>E(e)&&0===Object.keys(e).length;function m(e,t){"undefined"!=typeof console&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}const p=Object.assign;function _(e){return e.replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}const d=Object.prototype.hasOwnProperty;function h(e,t){return d.call(e,t)}const g=Array.isArray,b=e=>"function"==typeof e,k=e=>"string"==typeof e,v=e=>"boolean"==typeof e,L=e=>null!==e&&"object"==typeof e,y=Object.prototype.toString,T=e=>y.call(e),E=e=>"[object Object]"===T(e),N=15;function I(e){throw e}function C(e,t,n){const r={start:e,end:t};return null!=n&&(r.source=n),r}const F=String.fromCharCode(8232),O=String.fromCharCode(8233);function P(e){const t=e;let n=0,r=1,o=1,a=0;const s=e=>"\r"===t[e]&&"\n"===t[e+1],l=e=>t[e]===O,c=e=>t[e]===F,i=e=>s(e)||(e=>"\n"===t[e])(e)||l(e)||c(e),u=e=>s(e)||l(e)||c(e)?"\n":t[e];function f(){return a=0,i(n)&&(r++,o=0),s(n)&&n++,n++,o++,t[n]}return{index:()=>n,line:()=>r,column:()=>o,peekOffset:()=>a,charAt:u,currentChar:()=>u(n),currentPeek:()=>u(n+a),next:f,peek:function(){return s(n+a)&&a++,a++,t[n+a]},reset:function(){n=0,r=1,o=1,a=0},resetPeek:function(e=0){a=e},skipToPeek:function(){const e=n+a;for(;e!==n;)f();a=0}}}const w=void 0;function R(e,t={}){const n=!1!==t.location,r=P(e),o=()=>r.index(),a=()=>{return e=r.line(),t=r.column(),n=r.index(),{line:e,column:t,offset:n};var e,t,n},s=a(),l=o(),c={currentType:14,offset:l,startLoc:s,endLoc:s,lastType:14,lastOffset:l,lastStartLoc:s,lastEndLoc:s,braceNest:0,inLinked:!1,text:""},i=()=>c,{onError:u}=t;function f(e,t,r){e.endLoc=a(),e.currentType=t;const o={type:t};return n&&(o.loc=C(e.startLoc,e.endLoc)),null!=r&&(o.value=r),o}const m=e=>f(e,14);function p(e,t){return e.currentChar()===t?(e.next(),t):(a(),"")}function _(e){let t="";for(;" "===e.currentPeek()||"\n"===e.currentPeek();)t+=e.currentPeek(),e.peek();return t}function d(e){const t=_(e);return e.skipToPeek(),t}function h(e){if(e===w)return!1;const t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||95===t}function g(e,t){const{currentType:n}=t;if(2!==n)return!1;_(e);const r=function(e){if(e===w)return!1;const t=e.charCodeAt(0);return t>=48&&t<=57}("-"===e.currentPeek()?e.peek():e.currentPeek());return e.resetPeek(),r}function b(e){_(e);const t="|"===e.currentPeek();return e.resetPeek(),t}function k(e,t=!0){const n=(t=!1,r="",o=!1)=>{const a=e.currentPeek();return"{"===a?"%"!==r&&t:"@"!==a&&a?"%"===a?(e.peek(),n(t,"%",!0)):"|"===a?!("%"!==r&&!o)||!(" "===r||"\n"===r):" "===a?(e.peek(),n(!0," ",o)):"\n"!==a||(e.peek(),n(!0,"\n",o)):"%"===r||t},r=n();return t&&e.resetPeek(),r}function v(e,t){const n=e.currentChar();return n===w?w:t(n)?(e.next(),n):null}function L(e){return v(e,(e=>{const t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||t>=48&&t<=57||95===t||36===t}))}function y(e){return v(e,(e=>{const t=e.charCodeAt(0);return t>=48&&t<=57}))}function T(e){return v(e,(e=>{const t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}))}function E(e){let t="",n="";for(;t=y(e);)n+=t;return n}function N(e){const t=e.currentChar();switch(t){case"\\":case"'":return e.next(),`\\${t}`;case"u":return I(e,t,4);case"U":return I(e,t,6);default:return a(),""}}function I(e,t,n){p(e,t);let r="";for(let t=0;t<n;t++){const t=T(e);if(!t){a(),e.currentChar();break}r+=t}return`\\${t}${r}`}function F(e){d(e);const t=p(e,"|");return d(e),t}function O(e,t){let n=null;switch(e.currentChar()){case"{":return t.braceNest>=1&&a(),e.next(),n=f(t,2,"{"),d(e),t.braceNest++,n;case"}":return t.braceNest>0&&2===t.currentType&&a(),e.next(),n=f(t,3,"}"),t.braceNest--,t.braceNest>0&&d(e),t.inLinked&&0===t.braceNest&&(t.inLinked=!1),n;case"@":return t.braceNest>0&&a(),n=R(e,t)||m(t),t.braceNest=0,n;default:let r=!0,o=!0,s=!0;if(b(e))return t.braceNest>0&&a(),n=f(t,1,F(e)),t.braceNest=0,t.inLinked=!1,n;if(t.braceNest>0&&(5===t.currentType||6===t.currentType||7===t.currentType))return a(),t.braceNest=0,A(e,t);if(r=function(e,t){const{currentType:n}=t;if(2!==n)return!1;_(e);const r=h(e.currentPeek());return e.resetPeek(),r}(e,t))return n=f(t,5,function(e){d(e);let t="",n="";for(;t=L(e);)n+=t;return e.currentChar()===w&&a(),n}(e)),d(e),n;if(o=g(e,t))return n=f(t,6,function(e){d(e);let t="";return"-"===e.currentChar()?(e.next(),t+=`-${E(e)}`):t+=E(e),e.currentChar()===w&&a(),t}(e)),d(e),n;if(s=function(e,t){const{currentType:n}=t;if(2!==n)return!1;_(e);const r="'"===e.currentPeek();return e.resetPeek(),r}(e,t))return n=f(t,7,function(e){d(e),p(e,"'");let t="",n="";const r=e=>"'"!==e&&"\n"!==e;for(;t=v(e,r);)n+="\\"===t?N(e):t;const o=e.currentChar();return"\n"===o||o===w?(a(),"\n"===o&&(e.next(),p(e,"'")),n):(p(e,"'"),n)}(e)),d(e),n;if(!r&&!o&&!s)return n=f(t,13,function(e){d(e);let t="",n="";const r=e=>"{"!==e&&"}"!==e&&" "!==e&&"\n"!==e;for(;t=v(e,r);)n+=t;return n}(e)),a(),d(e),n}return n}function R(e,t){const{currentType:n}=t;let r=null;const o=e.currentChar();switch(8!==n&&9!==n&&12!==n&&10!==n||"\n"!==o&&" "!==o||a(),o){case"@":return e.next(),r=f(t,8,"@"),t.inLinked=!0,r;case".":return d(e),e.next(),f(t,9,".");case":":return d(e),e.next(),f(t,10,":");default:return b(e)?(r=f(t,1,F(e)),t.braceNest=0,t.inLinked=!1,r):function(e,t){const{currentType:n}=t;if(8!==n)return!1;_(e);const r="."===e.currentPeek();return e.resetPeek(),r}(e,t)||function(e,t){const{currentType:n}=t;if(8!==n&&12!==n)return!1;_(e);const r=":"===e.currentPeek();return e.resetPeek(),r}(e,t)?(d(e),R(e,t)):function(e,t){const{currentType:n}=t;if(9!==n)return!1;_(e);const r=h(e.currentPeek());return e.resetPeek(),r}(e,t)?(d(e),f(t,12,function(e){let t="",n="";for(;t=L(e);)n+=t;return n}(e))):function(e,t){const{currentType:n}=t;if(10!==n)return!1;const r=()=>{const t=e.currentPeek();return"{"===t?h(e.peek()):!("@"===t||"%"===t||"|"===t||":"===t||"."===t||" "===t||!t)&&("\n"===t?(e.peek(),r()):h(t))},o=r();return e.resetPeek(),o}(e,t)?(d(e),"{"===o?O(e,t)||r:f(t,11,function(e){const t=(n=!1,r)=>{const o=e.currentChar();return"{"!==o&&"%"!==o&&"@"!==o&&"|"!==o&&o?" "===o?r:"\n"===o?(r+=o,e.next(),t(n,r)):(r+=o,e.next(),t(!0,r)):r};return t(!1,"")}(e))):(8===n&&a(),t.braceNest=0,t.inLinked=!1,A(e,t))}}function A(e,t){let n={type:14};if(t.braceNest>0)return O(e,t)||m(t);if(t.inLinked)return R(e,t)||m(t);const r=e.currentChar();switch(r){case"{":return O(e,t)||m(t);case"}":return a(),e.next(),f(t,3,"}");case"@":return R(e,t)||m(t);default:if(b(e))return n=f(t,1,F(e)),t.braceNest=0,t.inLinked=!1,n;if(k(e))return f(t,0,function(e){const t=n=>{const r=e.currentChar();return"{"!==r&&"}"!==r&&"@"!==r&&r?"%"===r?k(e)?(n+=r,e.next(),t(n)):n:"|"===r?n:" "===r||"\n"===r?k(e)?(n+=r,e.next(),t(n)):b(e)?n:(n+=r,e.next(),t(n)):(n+=r,e.next(),t(n)):n};return t("")}(e));if("%"===r)return e.next(),f(t,4,"%")}return n}return{nextToken:function(){const{currentType:e,offset:t,startLoc:n,endLoc:s}=c;return c.lastType=e,c.lastOffset=t,c.lastStartLoc=n,c.lastEndLoc=s,c.offset=o(),c.startLoc=a(),r.currentChar()===w?f(c,14):A(r,c)},currentOffset:o,currentPosition:a,context:i}}const A=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function x(e,t,n){switch(e){case"\\\\":return"\\";case"\\'":return"'";default:{const e=parseInt(t||n,16);return e<=55295||e>=57344?String.fromCodePoint(e):"οΏ½"}}}function $(e={}){const t=!1!==e.location,{onError:n}=e;function r(e,n,r){const o={type:e,start:n,end:n};return t&&(o.loc={start:r,end:r}),o}function o(e,n,r,o){e.end=n,o&&(e.type=o),t&&e.loc&&(e.loc.end=r)}function a(e,t){const n=e.context(),a=r(3,n.offset,n.startLoc);return a.value=t,o(a,e.currentOffset(),e.currentPosition()),a}function s(e,t){const n=e.context(),{lastOffset:a,lastStartLoc:s}=n,l=r(5,a,s);return l.index=parseInt(t,10),e.nextToken(),o(l,e.currentOffset(),e.currentPosition()),l}function l(e,t){const n=e.context(),{lastOffset:a,lastStartLoc:s}=n,l=r(4,a,s);return l.key=t,e.nextToken(),o(l,e.currentOffset(),e.currentPosition()),l}function c(e,t){const n=e.context(),{lastOffset:a,lastStartLoc:s}=n,l=r(9,a,s);return l.value=t.replace(A,x),e.nextToken(),o(l,e.currentOffset(),e.currentPosition()),l}function i(e){const t=e.context(),n=r(6,t.offset,t.startLoc);let a=e.nextToken();if(9===a.type){const t=function(e){const t=e.nextToken(),n=e.context(),{lastOffset:a,lastStartLoc:s}=n,l=r(8,a,s);return 12!==t.type?(l.value="",o(l,a,s),{nextConsumeToken:t,node:l}):(null==t.value&&D(t),l.value=t.value||"",o(l,e.currentOffset(),e.currentPosition()),{node:l})}(e);n.modifier=t.node,a=t.nextConsumeToken||e.nextToken()}switch(10!==a.type&&D(a),a=e.nextToken(),2===a.type&&(a=e.nextToken()),a.type){case 11:null==a.value&&D(a),n.key=function(e,t){const n=e.context(),a=r(7,n.offset,n.startLoc);return a.value=t,o(a,e.currentOffset(),e.currentPosition()),a}(e,a.value||"");break;case 5:null==a.value&&D(a),n.key=l(e,a.value||"");break;case 6:null==a.value&&D(a),n.key=s(e,a.value||"");break;case 7:null==a.value&&D(a),n.key=c(e,a.value||"");break;default:const t=e.context(),i=r(7,t.offset,t.startLoc);return i.value="",o(i,t.offset,t.startLoc),n.key=i,o(n,t.offset,t.startLoc),{nextConsumeToken:a,node:n}}return o(n,e.currentOffset(),e.currentPosition()),{node:n}}function u(e){const t=e.context(),n=r(2,1===t.currentType?e.currentOffset():t.offset,1===t.currentType?t.endLoc:t.startLoc);n.items=[];let u=null;do{const t=u||e.nextToken();switch(u=null,t.type){case 0:null==t.value&&D(t),n.items.push(a(e,t.value||""));break;case 6:null==t.value&&D(t),n.items.push(s(e,t.value||""));break;case 5:null==t.value&&D(t),n.items.push(l(e,t.value||""));break;case 7:null==t.value&&D(t),n.items.push(c(e,t.value||""));break;case 8:const r=i(e);n.items.push(r.node),u=r.nextConsumeToken||null}}while(14!==t.currentType&&1!==t.currentType);return o(n,1===t.currentType?t.lastOffset:e.currentOffset(),1===t.currentType?t.lastEndLoc:e.currentPosition()),n}function f(e){const t=e.context(),{offset:n,startLoc:a}=t,s=u(e);return 14===t.currentType?s:function(e,t,n,a){const s=e.context();let l=0===a.items.length;const c=r(1,t,n);c.cases=[],c.cases.push(a);do{const t=u(e);l||(l=0===t.items.length),c.cases.push(t)}while(14!==s.currentType);return o(c,e.currentOffset(),e.currentPosition()),c}(e,n,a,s)}return{parse:function(n){const a=R(n,p({},e)),s=a.context(),l=r(0,s.offset,s.startLoc);return t&&l.loc&&(l.loc.source=n),l.body=f(a),o(l,a.currentOffset(),a.currentPosition()),l}}}function D(e){if(14===e.type)return"EOF";const t=(e.value||"").replace(/\r?\n/gu,"\\n");return t.length>10?t.slice(0,9)+"β¦":t}function M(e,t){for(let n=0;n<e.length;n++)W(e[n],t)}function W(e,t){switch(e.type){case 1:M(e.cases,t),t.helper("plural");break;case 2:M(e.items,t);break;case 6:W(e.key,t),t.helper("linked");break;case 5:t.helper("interpolate"),t.helper("list");break;case 4:t.helper("interpolate"),t.helper("named")}}function S(e,t={}){const n=function(e,t={}){const n={ast:e,helpers:new Set};return{context:()=>n,helper:e=>(n.helpers.add(e),e)}}(e);n.helper("normalize"),e.body&&W(e.body,n);const r=n.context();e.helpers=Array.from(r.helpers)}function U(e,t){const{helper:n}=e;switch(t.type){case 0:!function(e,t){t.body?U(e,t.body):e.push("null")}(e,t);break;case 1:!function(e,t){const{helper:n,needIndent:r}=e;if(t.cases.length>1){e.push(`${n("plural")}([`),e.indent(r());const o=t.cases.length;for(let n=0;n<o&&(U(e,t.cases[n]),n!==o-1);n++)e.push(", ");e.deindent(r()),e.push("])")}}(e,t);break;case 2:!function(e,t){const{helper:n,needIndent:r}=e;e.push(`${n("normalize")}([`),e.indent(r());const o=t.items.length;for(let n=0;n<o&&(U(e,t.items[n]),n!==o-1);n++)e.push(", ");e.deindent(r()),e.push("])")}(e,t);break;case 6:!function(e,t){const{helper:n}=e;e.push(`${n("linked")}(`),U(e,t.key),t.modifier&&(e.push(", "),U(e,t.modifier)),e.push(")")}(e,t);break;case 8:case 7:e.push(JSON.stringify(t.value),t);break;case 5:e.push(`${n("interpolate")}(${n("list")}(${t.index}))`,t);break;case 4:e.push(`${n("interpolate")}(${n("named")}(${JSON.stringify(t.key)}))`,t);break;case 9:case 3:e.push(JSON.stringify(t.value),t)}}function V(e,t={}){const n=p({},t),r=$(n).parse(e);return S(r,n),((e,t={})=>{const n=k(t.mode)?t.mode:"normal",r=k(t.filename)?t.filename:"message.intl",o=t.needIndent?t.needIndent:"arrow"!==n,a=e.helpers||[],s=function(e,t){const{filename:n,breakLineCode:r,needIndent:o}=t,a={source:e.loc.source,filename:n,code:"",column:1,line:1,offset:0,map:void 0,breakLineCode:r,needIndent:o,indentLevel:0};function s(e,t){a.code+=e}function l(e,t=!0){const n=t?r:"";s(o?n+" ".repeat(e):n)}return{context:()=>a,push:s,indent:function(e=!0){const t=++a.indentLevel;e&&l(t)},deindent:function(e=!0){const t=--a.indentLevel;e&&l(t)},newline:function(){l(a.indentLevel)},helper:e=>`_${e}`,needIndent:()=>a.needIndent}}(e,{mode:n,filename:r,sourceMap:!!t.sourceMap,breakLineCode:null!=t.breakLineCode?t.breakLineCode:"arrow"===n?";":"\n",needIndent:o});s.push("normal"===n?"function __msg__ (ctx) {":"(ctx) => {"),s.indent(o),a.length>0&&(s.push(`const { ${a.map((e=>`${e}: _${e}`)).join(", ")} } = ctx`),s.newline()),s.push("return "),U(s,e),s.deindent(o),s.push("}");const{code:l,map:c}=s.context();return{ast:e,code:l,map:c?c.toJSON():void 0}})(r,n)}const j=[];j[0]={w:[0],i:[3,0],"[":[4],o:[7]},j[1]={w:[1],".":[2],"[":[4],o:[7]},j[2]={w:[2],i:[3,0],0:[3,0]},j[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},j[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},j[5]={"'":[4,0],o:8,l:[5,0]},j[6]={'"':[4,0],o:8,l:[6,0]};const G=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function H(e){if(null==e)return"o";switch(e.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return e;case 95:case 36:case 45:return"i";case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"w"}return"i"}function B(e){const t=e.trim();return("0"!==e.charAt(0)||!isNaN(parseInt(e)))&&(G.test(t)?function(e){const t=e.charCodeAt(0);return t!==e.charCodeAt(e.length-1)||34!==t&&39!==t?e:e.slice(1,-1)}(t):"*"+t)}const J=new Map;function z(e,t){return L(e)?e[t]:null}const Y=e=>e,X=e=>"",K=e=>0===e.length?"":e.join(""),q=e=>null==e?"":g(e)||E(e)&&e.toString===y?JSON.stringify(e,null,2):String(e);function Q(e,t){return e=Math.abs(e),2===t?e?e>1?1:0:1:e?Math.min(e,2):0}function Z(e={}){const t=e.locale,n=function(e){const t=i(e.pluralIndex)?e.pluralIndex:-1;return e.named&&(i(e.named.count)||i(e.named.n))?i(e.named.count)?e.named.count:i(e.named.n)?e.named.n:t:t}(e),r=L(e.pluralRules)&&k(t)&&b(e.pluralRules[t])?e.pluralRules[t]:Q,o=L(e.pluralRules)&&k(t)&&b(e.pluralRules[t])?Q:void 0,a=e.list||[],s=e.named||{};i(e.pluralIndex)&&function(e,t){t.count||(t.count=e),t.n||(t.n=e)}(n,s);function l(t){const n=b(e.messages)?e.messages(t):!!L(e.messages)&&e.messages[t];return n||(e.parent?e.parent.message(t):X)}const c=E(e.processor)&&b(e.processor.normalize)?e.processor.normalize:K,u=E(e.processor)&&b(e.processor.interpolate)?e.processor.interpolate:q,f={list:e=>a[e],named:e=>s[e],plural:e=>e[r(n,e.length,o)],linked:(t,n)=>{const r=l(t)(f);return k(n)?(o=n,e.modifiers?e.modifiers[o]:Y)(r):r;var o},message:l,type:E(e.processor)&&k(e.processor.type)?e.processor.type:"text",interpolate:u,normalize:c};return f}function ee(e,t,n){return[...new Set([n,...g(t)?t:L(t)?Object.keys(t):k(t)?[t]:[n]])]}function te(e,t,n){const r=k(n)?n:ae,o=e;o.__localeChainCache||(o.__localeChainCache=new Map);let a=o.__localeChainCache.get(r);if(!a){a=[];let e=[n];for(;g(e);)e=ne(a,e,t);const s=g(t)||!E(t)?t:t.default?t.default:null;e=k(s)?[s]:s,g(e)&&ne(a,e,!1),o.__localeChainCache.set(r,a)}return a}function ne(e,t,n){let r=!0;for(let o=0;o<t.length&&v(r);o++){k(t[o])&&(r=re(e,t[o],n))}return r}function re(e,t,n){let r;const o=t.split("-");do{r=oe(e,o.join("-"),n),o.splice(-1,1)}while(o.length&&!0===r);return r}function oe(e,t,n){let r=!1;if(!e.includes(t)&&(r=!0,t)){r="!"!==t[t.length-1];const o=t.replace(/!/g,"");e.push(o),(g(n)||E(n))&&n[o]&&(r=n[o])}return r}const ae="en-US";let se,le,ce;let ie=0;function ue(e={}){const t=k(e.version)?e.version:"9.2.0-beta.8",n=k(e.locale)?e.locale:ae,r=g(e.fallbackLocale)||E(e.fallbackLocale)||k(e.fallbackLocale)||!1===e.fallbackLocale?e.fallbackLocale:n,o=E(e.messages)?e.messages:{[n]:{}},a=E(e.datetimeFormats)?e.datetimeFormats:{[n]:{}},s=E(e.numberFormats)?e.numberFormats:{[n]:{}},l=p({},e.modifiers||{},{upper:e=>k(e)?e.toUpperCase():e,lower:e=>k(e)?e.toLowerCase():e,capitalize:e=>k(e)?`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`:e}),c=e.pluralRules||{},i=b(e.missing)?e.missing:null,f=!v(e.missingWarn)&&!u(e.missingWarn)||e.missingWarn,_=!v(e.fallbackWarn)&&!u(e.fallbackWarn)||e.fallbackWarn,d=!!e.fallbackFormat,h=!!e.unresolving,y=b(e.postTranslation)?e.postTranslation:null,T=E(e.processor)?e.processor:null,N=!v(e.warnHtmlMessage)||e.warnHtmlMessage,I=!!e.escapeParameter,C=b(e.messageCompiler)?e.messageCompiler:se,F=b(e.messageResolver)?e.messageResolver:le||z,O=b(e.localeFallbacker)?e.localeFallbacker:ce||ee,P=b(e.onWarn)?e.onWarn:m,w=e,R=L(w.__datetimeFormatters)?w.__datetimeFormatters:new Map,A=L(w.__numberFormatters)?w.__numberFormatters:new Map,x=L(w.__meta)?w.__meta:{};ie++;const $={version:t,cid:ie,locale:n,fallbackLocale:r,messages:o,modifiers:l,pluralRules:c,missing:i,missingWarn:f,fallbackWarn:_,fallbackFormat:d,unresolving:h,postTranslation:y,processor:T,warnHtmlMessage:N,escapeParameter:I,messageCompiler:C,messageResolver:F,localeFallbacker:O,onWarn:P,__meta:x};return $.datetimeFormats=a,$.numberFormats=s,$.__datetimeFormatters=R,$.__numberFormatters=A,$}function fe(e,t,n,r,o){const{missing:a}=e;if(null!==a){const r=a(e,n,t,o);return k(r)?r:t}return t}function me(e,t,n){e.__localeChainCache=new Map,e.localeFallbacker(e,n,t)}const pe=e=>e;let _e=Object.create(null);let de=N;const he=()=>de++,ge={INVALID_ARGUMENT:de,INVALID_DATE_ARGUMENT:he(),INVALID_ISO_DATE_ARGUMENT:he(),__EXTEND_POINT__:he()},be=()=>"",ke=e=>b(e);function ve(e,...t){const{fallbackFormat:n,postTranslation:r,unresolving:o,fallbackLocale:a,messages:s}=e,[l,c]=ye(...t),u=(v(c.missingWarn),v(c.fallbackWarn),v(c.escapeParameter)?c.escapeParameter:e.escapeParameter),f=!!c.resolvedMessage,m=k(c.default)||v(c.default)?v(c.default)?l:c.default:n?l:"",p=n||""!==m,d=k(c.locale)?c.locale:e.locale;u&&function(e){g(e.list)?e.list=e.list.map((e=>k(e)?_(e):e)):L(e.named)&&Object.keys(e.named).forEach((t=>{k(e.named[t])&&(e.named[t]=_(e.named[t]))}))}(c);let[h,y,T]=f?[l,d,s[d]||{}]:function(e,t,n,r,o,a){const{messages:s,messageResolver:l,localeFallbacker:c}=e,i=c(e,r,n);let u,f={},m=null;const p="translate";for(let n=0;n<i.length&&(u=i[n],f=s[u]||{},null===(m=l(f,t))&&(m=f[t]),!k(m)&&!b(m));n++){const n=fe(e,t,u,0,p);n!==t&&(m=n)}return[m,u,f]}(e,l,d,a),E=l;if(f||k(h)||ke(h)||p&&(h=m,E=h),!(f||(k(h)||ke(h))&&k(y)))return o?-1:l;let N=!1;const I=ke(h)?h:Le(e,l,y,h,E,(()=>{N=!0}));if(N)return h;const C=function(e,t,n){return t(n)}(0,I,Z(function(e,t,n,r){const{modifiers:o,pluralRules:a,messageResolver:s}=e,l={locale:t,modifiers:o,pluralRules:a,messages:r=>{const o=s(n,r);if(k(o)){let n=!1;const a=Le(e,r,t,o,r,(()=>{n=!0}));return n?be:a}return ke(o)?o:be}};e.processor&&(l.processor=e.processor);r.list&&(l.list=r.list);r.named&&(l.named=r.named);i(r.plural)&&(l.pluralIndex=r.plural);return l}(e,y,T,c)));return r?r(C):C}function Le(e,t,n,r,o,a){const{messageCompiler:s,warnHtmlMessage:l}=e;if(ke(r)){const e=r;return e.locale=e.locale||n,e.key=e.key||t,e}const i=s(r,function(e,t,n,r,o,a){return{warnHtmlMessage:o,onError:e=>{throw a&&a(e),e},onCacheKey:e=>((e,t,n)=>c({l:e,k:t,s:n}))(t,n,e)}}(0,n,o,0,l,a));return i.locale=n,i.key=t,i.source=r,i}function ye(...e){const[t,n,r]=e,o={};if(!k(t)&&!i(t)&&!ke(t))throw Error(ge.INVALID_ARGUMENT);const a=i(t)?String(t):(ke(t),t);return i(n)?o.plural=n:k(n)?o.default=n:E(n)&&!f(n)?o.named=n:g(n)&&(o.list=n),i(r)?o.plural=r:k(r)?o.default=r:E(r)&&p(o,r),[a,o]}function Te(e,...t){const{datetimeFormats:n,unresolving:r,fallbackLocale:o,localeFallbacker:a}=e,{__datetimeFormatters:s}=e,[l,c,i,u]=Ee(...t);v(i.missingWarn);v(i.fallbackWarn);const m=!!i.part,_=k(i.locale)?i.locale:e.locale,d=a(e,o,_);if(!k(l)||""===l)return new Intl.DateTimeFormat(_).format(c);let h,g={},b=null;for(let t=0;t<d.length&&(h=d[t],g=n[h]||{},b=g[l],!E(b));t++)fe(e,l,h,0,"datetime format");if(!E(b)||!k(h))return r?-1:l;let L=`${h}__${l}`;f(u)||(L=`${L}__${JSON.stringify(u)}`);let y=s.get(L);return y||(y=new Intl.DateTimeFormat(h,p({},b,u)),s.set(L,y)),m?y.formatToParts(c):y.format(c)}function Ee(...e){const[t,n,r,o]=e;let a,s={},l={};if(k(t)){const e=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!e)throw Error(ge.INVALID_ISO_DATE_ARGUMENT);const n=e[3]?e[3].trim().startsWith("T")?`${e[1].trim()}${e[3].trim()}`:`${e[1].trim()}T${e[3].trim()}`:e[1].trim();a=new Date(n);try{a.toISOString()}catch(e){throw Error(ge.INVALID_ISO_DATE_ARGUMENT)}}else if("[object Date]"===T(t)){if(isNaN(t.getTime()))throw Error(ge.INVALID_DATE_ARGUMENT);a=t}else{if(!i(t))throw Error(ge.INVALID_ARGUMENT);a=t}return k(n)?s.key=n:E(n)&&(s=n),k(r)?s.locale=r:E(r)&&(l=r),E(o)&&(l=o),[s.key||"",a,s,l]}function Ne(e,t,n){const r=e;for(const e in n){const n=`${t}__${e}`;r.__datetimeFormatters.has(n)&&r.__datetimeFormatters.delete(n)}}function Ie(e,...t){const{numberFormats:n,unresolving:r,fallbackLocale:o,localeFallbacker:a}=e,{__numberFormatters:s}=e,[l,c,i,u]=Ce(...t);v(i.missingWarn);v(i.fallbackWarn);const m=!!i.part,_=k(i.locale)?i.locale:e.locale,d=a(e,o,_);if(!k(l)||""===l)return new Intl.NumberFormat(_).format(c);let h,g={},b=null;for(let t=0;t<d.length&&(h=d[t],g=n[h]||{},b=g[l],!E(b));t++)fe(e,l,h,0,"number format");if(!E(b)||!k(h))return r?-1:l;let L=`${h}__${l}`;f(u)||(L=`${L}__${JSON.stringify(u)}`);let y=s.get(L);return y||(y=new Intl.NumberFormat(h,p({},b,u)),s.set(L,y)),m?y.formatToParts(c):y.format(c)}function Ce(...e){const[t,n,r,o]=e;let a={},s={};if(!i(t))throw Error(ge.INVALID_ARGUMENT);const l=t;return k(n)?a.key=n:E(n)&&(a=n),k(r)?a.locale=r:E(r)&&(s=r),E(o)&&(s=o),[a.key||"",l,a,s]}function Fe(e,t,n){const r=e;for(const e in n){const n=`${t}__${e}`;r.__numberFormatters.has(n)&&r.__numberFormatters.delete(n)}}const Oe="9.2.0-beta.8";let Pe=N;const we=()=>Pe++,Re={UNEXPECTED_RETURN_TYPE:Pe,INVALID_ARGUMENT:we(),MUST_BE_CALL_SETUP_TOP:we(),NOT_INSLALLED:we(),NOT_AVAILABLE_IN_LEGACY_MODE:we(),REQUIRED_VALUE:we(),INVALID_VALUE:we(),CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:we(),NOT_INSLALLED_WITH_PROVIDE:we(),UNEXPECTED_ERROR:we(),NOT_COMPATIBLE_LEGACY_VUE_I18N:we(),BRIDGE_SUPPORT_VUE_2_ONLY:we(),__EXTEND_POINT__:we()},Ae=l("__setPluralRules"),xe=l("__legacyVueI18n");function $e(e){return null!=e&&null!=e.version&&(Number(e.version.split(".")[0])||-1)>=8}function De(e){if(!L(e))return e;for(const t in e)if(h(e,t))if(t.includes(".")){const n=t.split("."),r=n.length-1;let o=e;for(let e=0;e<r;e++)n[e]in o||(o[n[e]]={}),o=o[n[e]];o[n[r]]=e[t],delete e[t],L(o[n[r]])&&De(o[n[r]])}else L(e[t])&&De(e[t]);return e}function Me(e,t){const{messages:n,__i18n:r,messageResolver:o,flatJson:a}=t,s=E(n)?n:g(r)?{}:{[e]:{}};if(g(r)&&r.forEach((e=>{if("locale"in e&&"resource"in e){const{locale:t,resource:n}=e;t?(s[t]=s[t]||{},Se(n,s[t])):Se(n,s)}else k(e)&&Se(JSON.parse(e),s)})),null==o&&a)for(const e in s)h(s,e)&&De(s[e]);return s}const We=e=>!L(e)||g(e);function Se(e,t){if(We(e)||We(t))throw Error(Re.INVALID_VALUE);for(const n in e)h(e,n)&&(We(e[n])||We(t[n])?t[n]=e[n]:Se(e[n],t[n]))}let Ue=0;function Ve(e){return(n,r,o,a)=>e(r,o,t()||void 0,a)}function je(t={},o){const{__root:a}=t,s=void 0===a;let l=!v(t.inheritLocale)||t.inheritLocale;const c=e(a&&l?a.locale.value:k(t.locale)?t.locale:ae),f=e(a&&l?a.fallbackLocale.value:k(t.fallbackLocale)||g(t.fallbackLocale)||E(t.fallbackLocale)||!1===t.fallbackLocale?t.fallbackLocale:c.value),m=e(Me(c.value,t)),_=e(E(t.datetimeFormats)?t.datetimeFormats:{[c.value]:{}}),d=e(E(t.numberFormats)?t.numberFormats:{[c.value]:{}});let h=a?a.missingWarn:!v(t.missingWarn)&&!u(t.missingWarn)||t.missingWarn,y=a?a.fallbackWarn:!v(t.fallbackWarn)&&!u(t.fallbackWarn)||t.fallbackWarn,T=a?a.fallbackRoot:!v(t.fallbackRoot)||t.fallbackRoot,N=!!t.fallbackFormat,I=b(t.missing)?t.missing:null,C=b(t.missing)?Ve(t.missing):null,F=b(t.postTranslation)?t.postTranslation:null,O=!v(t.warnHtmlMessage)||t.warnHtmlMessage,P=!!t.escapeParameter;const w=a?a.modifiers:E(t.modifiers)?t.modifiers:{};let R,A,x=t.pluralRules||a&&a.pluralRules;{$e(o);const e={locale:c.value,fallbackLocale:f.value,messages:m.value,dateTimeFormats:_.value,numberFormats:d.value,modifiers:w,missing:I,fallbackRoot:T,postTranslation:F,pluralizationRules:x,escapeParameterHtml:P,sync:l,silentFallbackWarn:v(y)?!y:y,silentTranslationWarn:v(h)?!h:h,formatFallbackMessages:v(N)?!N:N,warnHtmlInMessage:v(O)&&O?"warn":"off"};R=new o(e)}A=function(){const e={version:"9.2.0-beta.8",locale:c.value,fallbackLocale:f.value,messages:m.value,modifiers:w,pluralRules:x,missing:null===C?void 0:C,missingWarn:h,fallbackWarn:y,fallbackFormat:N,unresolving:!0,postTranslation:null===F?void 0:F,warnHtmlMessage:O,escapeParameter:P,messageResolver:t.messageResolver,__meta:{framework:"vue"}};return e.datetimeFormats=_.value,e.numberFormats=d.value,e.__datetimeFormatters=E(A)?A.__datetimeFormatters:void 0,e.__numberFormatters=E(A)?A.__numberFormatters:void 0,ue(e)}(),me(A,c.value,f.value);const $=n({get:()=>c.value,set:e=>{c.value=e,R&&(R.locale=e),A.locale=c.value}}),D=n({get:()=>f.value,set:e=>{f.value=e,R&&(R.fallbackLocale=e),A.fallbackLocale=f.value,me(A,c.value,e)}}),M=n((()=>m.value)),W=n((()=>_.value)),S=n((()=>d.value));function U(e,t,n,r,o,s){let l;if(l=e(A),i(l)&&-1===l){const[e,n]=t();return a&&T?r(a):o(e)}if(s(l))return l;throw Error(Re.UNEXPECTED_RETURN_TYPE)}function V(...e){return U((t=>Reflect.apply(ve,null,[t,...e])),(()=>ye(...e)),0,(t=>Reflect.apply(t.t,t,[...e])),(e=>e),(e=>k(e)))}function j(e){return m.value[e]||{}}Ue++,a&&(r(a.locale,(e=>{l&&(c.value=e,R&&(R.locale=e),A.locale=e,me(A,c.value,f.value))})),r(a.fallbackLocale,(e=>{l&&(f.value=e,R&&(R.fallbackLocale=e),A.fallbackLocale=e,me(A,c.value,f.value))})));const G={id:Ue,locale:$,fallbackLocale:D,get inheritLocale(){return l},set inheritLocale(e){l=e,R&&(R._sync=e),e&&a&&(c.value=a.locale.value,f.value=a.fallbackLocale.value,R&&(R.locale=a.locale.value,R.fallbackLocale=a.fallbackLocale.value),me(A,c.value,f.value))},get availableLocales(){return Object.keys(m.value).sort()},messages:M,get modifiers(){return w},get pluralRules(){return x||{}},get isGlobal(){return s},get missingWarn(){return h},set missingWarn(e){h=e,A.missingWarn=h},get fallbackWarn(){return y},set fallbackWarn(e){y=e,A.fallbackWarn=y},get fallbackRoot(){return T},set fallbackRoot(e){T=e},get fallbackFormat(){return N},set fallbackFormat(e){N=e,A.fallbackFormat=N},get warnHtmlMessage(){return O},set warnHtmlMessage(e){O=e,A.warnHtmlMessage=e},get escapeParameter(){return P},set escapeParameter(e){P=e,A.escapeParameter=e},t:V,getLocaleMessage:j,setLocaleMessage:function(e,t){m.value[e]=t,R&&R.setLocaleMessage(e,t),A.messages=m.value},mergeLocaleMessage:function(e,t){m.value[e]=m.value[e]||{},R&&R.mergeLocaleMessage(e,t),Se(t,m.value[e]),A.messages=m.value},getPostTranslationHandler:function(){return b(F)?F:null},setPostTranslationHandler:function(e){F=e,A.postTranslation=e},getMissingHandler:function(){return I},setMissingHandler:function(e){null!==e&&(C=Ve(e)),I=e,A.missing=C},[Ae]:function(e){x=e,A.pluralRules=x}};return G.datetimeFormats=W,G.numberFormats=S,G.rt=function(...e){const[t,n,r]=e;if(r&&!L(r))throw Error(Re.INVALID_ARGUMENT);return V(t,n,p({resolvedMessage:!0},r||{}))},G.te=function(e,t){const n=j(k(t)?t:c.value);return null!==A.messageResolver(n,e)},G.tm=function(e){const t=function(e){let t=null;const n=te(A,f.value,c.value);for(let r=0;r<n.length;r++){const o=A.messageResolver(m.value[n[r]]||{},e);if(null!=o){t=o;break}}return t}(e);return null!=t?t:a&&a.tm(e)||{}},G.d=function(...e){return U((t=>Reflect.apply(Te,null,[t,...e])),(()=>Ee(...e)),0,(t=>Reflect.apply(t.d,t,[...e])),(()=>""),(e=>k(e)))},G.n=function(...e){return U((t=>Reflect.apply(Ie,null,[t,...e])),(()=>Ce(...e)),0,(t=>Reflect.apply(t.n,t,[...e])),(()=>""),(e=>k(e)))},G.getDateTimeFormat=function(e){return _.value[e]||{}},G.setDateTimeFormat=function(e,t){_.value[e]=t,R&&R.setDateTimeFormat(e,t),A.datetimeFormats=_.value,Ne(A,e,t)},G.mergeDateTimeFormat=function(e,t){_.value[e]=p(_.value[e]||{},t),R&&R.mergeDateTimeFormat(e,t),A.datetimeFormats=_.value,Ne(A,e,t)},G.getNumberFormat=function(e){return d.value[e]||{}},G.setNumberFormat=function(e,t){d.value[e]=t,R&&R.setNumberFormat(e,t),A.numberFormats=d.value,Fe(A,e,t)},G.mergeNumberFormat=function(e,t){d.value[e]=p(d.value[e]||{},t),R&&R.mergeNumberFormat(e,t),A.numberFormats=d.value,Fe(A,e,t)},G[xe]=R,G}let Ge=null,He=null;const Be=l("global-vue-i18n");function Je(e={},t){if(He)return He;Ge=t;const n=!v(e.legacy)||e.legacy,r=new Map,o=function(e,t,n){if(!$e(n))throw Error(Re.NOT_COMPATIBLE_LEGACY_VUE_I18N);return je(e,n)}(e,0,t);l("");{const e=o[xe];Object.defineProperty(e,"global",{get:()=>o}),Object.defineProperty(e,"mode",{get:()=>n?"legacy":"composition"}),Object.defineProperty(e,"__instances",{get:()=>r}),Object.defineProperty(e,"install",{value:t=>{if(2!==(t&&t.version&&Number(t.version.split(".")[0])||-1))throw Error(Re.BRIDGE_SUPPORT_VUE_2_ONLY);t.mixin(function(e,t){return{beforeCreate(){const n=this.$options;if(!n.__VUE18N__INSTANCE__)if(n.i18n=n.i18n||(n.__i18n?{}:null),this._i18nBridgeRoot=e,"composition"!==e.mode)if(n.i18n){if(n.i18n instanceof t){if(n.__i18n)try{const e=n.i18n&&n.i18n.messages?n.i18n.messages:{};n.__i18n.forEach((t=>Se(e,JSON.parse(t)))),Object.keys(e).forEach((t=>{n.i18n.mergeLocaleMessage(t,e[t])}))}catch(e){}this._i18n=n.i18n,this._i18nWatcher=this._i18n.watchI18nData()}else if(E(n.i18n)){const e=this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof t?this.$root.$i18n:null;if(e&&(n.i18n.root=this.$root,n.i18n.formatter=e.formatter,n.i18n.fallbackLocale=e.fallbackLocale,n.i18n.formatFallbackMessages=e.formatFallbackMessages,n.i18n.silentTranslationWarn=e.silentTranslationWarn,n.i18n.silentFallbackWarn=e.silentFallbackWarn,n.i18n.pluralizationRules=e.pluralizationRules,n.i18n.preserveDirectiveContent=e.preserveDirectiveContent),n.__i18n)try{const e=n.i18n&&n.i18n.messages?n.i18n.messages:{};n.__i18n.forEach((t=>Se(e,JSON.parse(t)))),n.i18n.messages=e}catch(e){}const{sharedMessages:r}=n.i18n;r&&E(r)&&Se(n.i18n.messages,r),this._i18n=new t(n.i18n),this._i18nWatcher=this._i18n.watchI18nData(),(void 0===n.i18n.sync||n.i18n.sync)&&(this._localeWatcher=this.$i18n.watchLocale()),e&&e.onComponentInstanceCreated(this._i18n)}}else this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof t?this._i18n=this.$root.$i18n:n.parent&&n.parent.$i18n&&n.parent.$i18n instanceof t&&(this._i18n=n.parent.$i18n);else this._i18n=e},beforeMount(){const e=this.$options;e.__VUE18N__INSTANCE__||(e.i18n=e.i18n||(e.__i18n?{}:null),e.i18n?(e.i18n instanceof t||E(e.i18n))&&(this._i18n.subscribeDataChanging(this),this._subscribing=!0):(this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof t||e.parent&&e.parent.$i18n&&e.parent.$i18n instanceof t)&&(this._i18n.subscribeDataChanging(this),this._subscribing=!0))},beforeDestroy(){if(this.$options.__VUE18N__INSTANCE__)return;if(this._i18nBridgeRoot)return void delete this._i18nBridgeRoot;if("composition"===e.mode)return void delete this._i18n;if(!this._i18n)return;const t=this;this.$nextTick((()=>{t._subscribing&&(t._i18n.unsubscribeDataChanging(t),delete t._subscribing),t._i18nWatcher&&(t._i18nWatcher(),t._i18n.destroyVM(),delete t._i18nWatcher),t._localeWatcher&&(t._localeWatcher(),delete t._localeWatcher)}))}}}(e,Ge))}});const t={__getInstance:function(e){return r.get(e)||null},__setInstance:function(e,t){r.set(e,t)},__deleteInstance:function(e){r.delete(e)}};return Object.keys(t).forEach((n=>Object.defineProperty(e,n,{value:t[n]}))),He=e,e}}function ze(e={}){const n=t();if(null==n)throw Error(Re.MUST_BE_CALL_SETUP_TOP);if(null==Ge||null==He)throw Error(Re.NOT_INSLALLED);const r=function(e){{const t=e.proxy;if(null==t)throw Error(Re.UNEXPECTED_ERROR);const n=t._i18nBridgeRoot;if(!n)throw Error(Re.NOT_INSLALLED);return n}}(n),s=function(e){return e.global}(r),l=function(e){return e.proxy.$options}(n),c=function(e,t){return f(e)?"__i18n"in t?"local":"global":e.useScope?e.useScope:"local"}(e,l);if("global"===c)return function(e,t,n){let r=L(t.messages)?t.messages:{};"__i18nGlobal"in n&&(r=Me(e.locale.value,{messages:r,__i18n:n.__i18nGlobal}));const o=Object.keys(r);o.length&&o.forEach((t=>{e.mergeLocaleMessage(t,r[t])}));if(L(t.datetimeFormats)){const n=Object.keys(t.datetimeFormats);n.length&&n.forEach((n=>{e.mergeDateTimeFormat(n,t.datetimeFormats[n])}))}if(L(t.numberFormats)){const n=Object.keys(t.numberFormats);n.length&&n.forEach((n=>{e.mergeNumberFormat(n,t.numberFormats[n])}))}}(s,e,l),s;if("parent"===c){let e=function(e,t){let n=null;const r=t.root;let o=t.parent;for(;null!=o;){const t=e;if("composition"===e.mode)n=t.__getInstance(o);else{const e=t.__getInstance(o);null!=e&&(n=e.__composer)}if(null!=n)break;if(r===o)break;o=o.parent}return n}(r,n);return null==e&&(e=s),e}if("legacy"===r.mode)throw Error(Re.NOT_AVAILABLE_IN_LEGACY_MODE);const i=r;let u=i.__getInstance(n);if(null==u){const t=p({},e);"__i18n"in l&&(t.__i18n=l.__i18n),s&&(t.__root=s),u=je(t,Ge),function(e,t,n){{const r=t.proxy;if(null==r)throw Error(Re.UNEXPECTED_ERROR);const s=n[xe];if(s===e)throw Error(Re.UNEXPECTED_ERROR);r._i18n=s,r._i18n_bridge=!0,r._i18nWatcher=r._i18n.watchI18nData(),r._i18n._sync&&(r._localeWatcher=r._i18n.watchLocale());let l=!1;o((()=>{r._i18n.subscribeDataChanging(r),l=!0}),t),a((()=>{l&&(r._i18n.unsubscribeDataChanging(r),l=!1),r._i18nWatcher&&(r._i18nWatcher(),r._i18n.destroyVM(),delete r._i18nWatcher),r._localeWatcher&&(r._localeWatcher(),delete r._localeWatcher),delete r._i18n_bridge,delete r._i18n}),t)}}(i,n,u),i.__setInstance(n,u)}return u}const Ye=e=>{if(!$e(e))throw Error(Re.NOT_COMPATIBLE_LEGACY_VUE_I18N);return e};se=function(e,t={}){{const n=(t.onCacheKey||pe)(e),r=_e[n];if(r)return r;let o=!1;const a=t.onError||I;t.onError=e=>{o=!0,a(e)};const{code:s}=V(e,t),l=new Function(`return ${s}`)();return o?l:_e[n]=l}},le=function(e,t){if(!L(e))return null;let n=J.get(t);if(n||(n=function(e){const t=[];let n,r,o,a,s,l,c,i=-1,u=0,f=0;const m=[];function p(){const t=e[i+1];if(5===u&&"'"===t||6===u&&'"'===t)return i++,o="\\"+t,m[0](),!0}for(m[0]=()=>{void 0===r?r=o:r+=o},m[1]=()=>{void 0!==r&&(t.push(r),r=void 0)},m[2]=()=>{m[0](),f++},m[3]=()=>{if(f>0)f--,u=4,m[0]();else{if(f=0,void 0===r)return!1;if(r=B(r),!1===r)return!1;m[1]()}};null!==u;)if(i++,n=e[i],"\\"!==n||!p()){if(a=H(n),c=j[u],s=c[a]||c.l||8,8===s)return;if(u=s[0],void 0!==s[1]&&(l=m[s[1]],l&&(o=n,!1===l())))return;if(7===u)return t}}(t),n&&J.set(t,n)),!n)return null;const r=n.length;let o=e,a=0;for(;a<r;){const e=o[n[a]];if(void 0===e)return null;o=e,a++}return o},ce=te;export{Be as I18nInjectionKey,Oe as VERSION,Ye as castToVueI18n,Je as createI18n,ze as useI18n}; |
/*! | ||
* vue-i18n-bridge v9.2.0-beta.7 | ||
* vue-i18n-bridge v9.2.0-beta.8 | ||
* (c) 2021 kazuya kawaguchi | ||
@@ -18,3 +18,3 @@ * Released under the MIT License. | ||
*/ | ||
const VERSION = '9.2.0-beta.7'; | ||
const VERSION = '9.2.0-beta.8'; | ||
/** | ||
@@ -1082,2 +1082,24 @@ * This is only called in esm-bundler builds. | ||
} | ||
/** | ||
* Cast to VueI18n legacy compatible type | ||
* | ||
* @remarks | ||
* This API is provided only with [vue-i18n-bridge](https://vue-i18n.intlify.dev/guide/migration/ways.html#what-is-vue-i18n-bridge). | ||
* | ||
* The purpose of this function is to convert an {@link I18n} instance created with {@link createI18n | createI18n(legacy: true)} into a `vue-i18n@v8.x` compatible instance of `new VueI18n` in a TypeScript environment. | ||
* | ||
* @param i18n - An instance of {@link I18n} | ||
* @returns A i18n instance which is casted to {@link VueI18n} type | ||
* | ||
* @VueI18nTip | ||
* :new: provided by **vue-i18n-bridge only** | ||
* | ||
* @VueI18nGeneral | ||
*/ | ||
const castToVueI18n = (i18n) => { | ||
if (!isLegacyVueI18n(i18n)) { | ||
throw createI18nError(I18nErrorCodes.NOT_COMPATIBLE_LEGACY_VUE_I18N); | ||
} | ||
return i18n; | ||
}; | ||
function createGlobal(options, legacyMode, VueI18nLegacy // eslint-disable-line @typescript-eslint/no-explicit-any | ||
@@ -1248,2 +1270,2 @@ ) { | ||
export { I18nInjectionKey, VERSION, createI18n, useI18n }; | ||
export { I18nInjectionKey, VERSION, castToVueI18n, createI18n, useI18n }; |
/*! | ||
* vue-i18n-bridge v9.2.0-beta.7 | ||
* vue-i18n-bridge v9.2.0-beta.8 | ||
* (c) 2021 kazuya kawaguchi | ||
* Released under the MIT License. | ||
*/ | ||
var VueI18nBridge=function(e,t){"use strict";const n="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,r=e=>n?Symbol(e):e,o=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),a=e=>"number"==typeof e&&isFinite(e),s=e=>"[object RegExp]"===k(e),l=e=>v(e)&&0===Object.keys(e).length;function c(e,t){"undefined"!=typeof console&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}const i=Object.assign;function u(e){return e.replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}const f=Object.prototype.hasOwnProperty;function m(e,t){return f.call(e,t)}const p=Array.isArray,_=e=>"function"==typeof e,d=e=>"string"==typeof e,h=e=>"boolean"==typeof e,g=e=>null!==e&&"object"==typeof e,b=Object.prototype.toString,k=e=>b.call(e),v=e=>"[object Object]"===k(e),L=15;function y(e){throw e}function T(e,t,n){const r={start:e,end:t};return null!=n&&(r.source=n),r}const E=" ",N="\n",I=String.fromCharCode(8232),C=String.fromCharCode(8233);function F(e){const t=e;let n=0,r=1,o=1,a=0;const s=e=>"\r"===t[e]&&t[e+1]===N,l=e=>t[e]===C,c=e=>t[e]===I,i=e=>s(e)||(e=>t[e]===N)(e)||l(e)||c(e),u=e=>s(e)||l(e)||c(e)?N:t[e];function f(){return a=0,i(n)&&(r++,o=0),s(n)&&n++,n++,o++,t[n]}return{index:()=>n,line:()=>r,column:()=>o,peekOffset:()=>a,charAt:u,currentChar:()=>u(n),currentPeek:()=>u(n+a),next:f,peek:function(){return s(n+a)&&a++,a++,t[n+a]},reset:function(){n=0,r=1,o=1,a=0},resetPeek:function(e=0){a=e},skipToPeek:function(){const e=n+a;for(;e!==n;)f();a=0}}}const O=void 0;function P(e,t={}){const n=!1!==t.location,r=F(e),o=()=>r.index(),a=()=>{return e=r.line(),t=r.column(),n=r.index(),{line:e,column:t,offset:n};var e,t,n},s=a(),l=o(),c={currentType:14,offset:l,startLoc:s,endLoc:s,lastType:14,lastOffset:l,lastStartLoc:s,lastEndLoc:s,braceNest:0,inLinked:!1,text:""},i=()=>c,{onError:u}=t;function f(e,t,r){e.endLoc=a(),e.currentType=t;const o={type:t};return n&&(o.loc=T(e.startLoc,e.endLoc)),null!=r&&(o.value=r),o}const m=e=>f(e,14);function p(e,t){return e.currentChar()===t?(e.next(),t):(a(),"")}function _(e){let t="";for(;e.currentPeek()===E||e.currentPeek()===N;)t+=e.currentPeek(),e.peek();return t}function d(e){const t=_(e);return e.skipToPeek(),t}function h(e){if(e===O)return!1;const t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||95===t}function g(e,t){const{currentType:n}=t;if(2!==n)return!1;_(e);const r=function(e){if(e===O)return!1;const t=e.charCodeAt(0);return t>=48&&t<=57}("-"===e.currentPeek()?e.peek():e.currentPeek());return e.resetPeek(),r}function b(e){_(e);const t="|"===e.currentPeek();return e.resetPeek(),t}function k(e,t=!0){const n=(t=!1,r="",o=!1)=>{const a=e.currentPeek();return"{"===a?"%"!==r&&t:"@"!==a&&a?"%"===a?(e.peek(),n(t,"%",!0)):"|"===a?!("%"!==r&&!o)||!(r===E||r===N):a===E?(e.peek(),n(!0,E,o)):a!==N||(e.peek(),n(!0,N,o)):"%"===r||t},r=n();return t&&e.resetPeek(),r}function v(e,t){const n=e.currentChar();return n===O?O:t(n)?(e.next(),n):null}function L(e){return v(e,(e=>{const t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||t>=48&&t<=57||95===t||36===t}))}function y(e){return v(e,(e=>{const t=e.charCodeAt(0);return t>=48&&t<=57}))}function I(e){return v(e,(e=>{const t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}))}function C(e){let t="",n="";for(;t=y(e);)n+=t;return n}function P(e){const t=e.currentChar();switch(t){case"\\":case"'":return e.next(),`\\${t}`;case"u":return w(e,t,4);case"U":return w(e,t,6);default:return a(),""}}function w(e,t,n){p(e,t);let r="";for(let t=0;t<n;t++){const t=I(e);if(!t){a(),e.currentChar();break}r+=t}return`\\${t}${r}`}function R(e){d(e);const t=p(e,"|");return d(e),t}function A(e,t){let n=null;switch(e.currentChar()){case"{":return t.braceNest>=1&&a(),e.next(),n=f(t,2,"{"),d(e),t.braceNest++,n;case"}":return t.braceNest>0&&2===t.currentType&&a(),e.next(),n=f(t,3,"}"),t.braceNest--,t.braceNest>0&&d(e),t.inLinked&&0===t.braceNest&&(t.inLinked=!1),n;case"@":return t.braceNest>0&&a(),n=x(e,t)||m(t),t.braceNest=0,n;default:let r=!0,o=!0,s=!0;if(b(e))return t.braceNest>0&&a(),n=f(t,1,R(e)),t.braceNest=0,t.inLinked=!1,n;if(t.braceNest>0&&(5===t.currentType||6===t.currentType||7===t.currentType))return a(),t.braceNest=0,$(e,t);if(r=function(e,t){const{currentType:n}=t;if(2!==n)return!1;_(e);const r=h(e.currentPeek());return e.resetPeek(),r}(e,t))return n=f(t,5,function(e){d(e);let t="",n="";for(;t=L(e);)n+=t;return e.currentChar()===O&&a(),n}(e)),d(e),n;if(o=g(e,t))return n=f(t,6,function(e){d(e);let t="";return"-"===e.currentChar()?(e.next(),t+=`-${C(e)}`):t+=C(e),e.currentChar()===O&&a(),t}(e)),d(e),n;if(s=function(e,t){const{currentType:n}=t;if(2!==n)return!1;_(e);const r="'"===e.currentPeek();return e.resetPeek(),r}(e,t))return n=f(t,7,function(e){d(e),p(e,"'");let t="",n="";const r=e=>"'"!==e&&e!==N;for(;t=v(e,r);)n+="\\"===t?P(e):t;const o=e.currentChar();return o===N||o===O?(a(),o===N&&(e.next(),p(e,"'")),n):(p(e,"'"),n)}(e)),d(e),n;if(!r&&!o&&!s)return n=f(t,13,function(e){d(e);let t="",n="";const r=e=>"{"!==e&&"}"!==e&&e!==E&&e!==N;for(;t=v(e,r);)n+=t;return n}(e)),a(),d(e),n}return n}function x(e,t){const{currentType:n}=t;let r=null;const o=e.currentChar();switch(8!==n&&9!==n&&12!==n&&10!==n||o!==N&&o!==E||a(),o){case"@":return e.next(),r=f(t,8,"@"),t.inLinked=!0,r;case".":return d(e),e.next(),f(t,9,".");case":":return d(e),e.next(),f(t,10,":");default:return b(e)?(r=f(t,1,R(e)),t.braceNest=0,t.inLinked=!1,r):function(e,t){const{currentType:n}=t;if(8!==n)return!1;_(e);const r="."===e.currentPeek();return e.resetPeek(),r}(e,t)||function(e,t){const{currentType:n}=t;if(8!==n&&12!==n)return!1;_(e);const r=":"===e.currentPeek();return e.resetPeek(),r}(e,t)?(d(e),x(e,t)):function(e,t){const{currentType:n}=t;if(9!==n)return!1;_(e);const r=h(e.currentPeek());return e.resetPeek(),r}(e,t)?(d(e),f(t,12,function(e){let t="",n="";for(;t=L(e);)n+=t;return n}(e))):function(e,t){const{currentType:n}=t;if(10!==n)return!1;const r=()=>{const t=e.currentPeek();return"{"===t?h(e.peek()):!("@"===t||"%"===t||"|"===t||":"===t||"."===t||t===E||!t)&&(t===N?(e.peek(),r()):h(t))},o=r();return e.resetPeek(),o}(e,t)?(d(e),"{"===o?A(e,t)||r:f(t,11,function(e){const t=(n=!1,r)=>{const o=e.currentChar();return"{"!==o&&"%"!==o&&"@"!==o&&"|"!==o&&o?o===E?r:o===N?(r+=o,e.next(),t(n,r)):(r+=o,e.next(),t(!0,r)):r};return t(!1,"")}(e))):(8===n&&a(),t.braceNest=0,t.inLinked=!1,$(e,t))}}function $(e,t){let n={type:14};if(t.braceNest>0)return A(e,t)||m(t);if(t.inLinked)return x(e,t)||m(t);const r=e.currentChar();switch(r){case"{":return A(e,t)||m(t);case"}":return a(),e.next(),f(t,3,"}");case"@":return x(e,t)||m(t);default:if(b(e))return n=f(t,1,R(e)),t.braceNest=0,t.inLinked=!1,n;if(k(e))return f(t,0,function(e){const t=n=>{const r=e.currentChar();return"{"!==r&&"}"!==r&&"@"!==r&&r?"%"===r?k(e)?(n+=r,e.next(),t(n)):n:"|"===r?n:r===E||r===N?k(e)?(n+=r,e.next(),t(n)):b(e)?n:(n+=r,e.next(),t(n)):(n+=r,e.next(),t(n)):n};return t("")}(e));if("%"===r)return e.next(),f(t,4,"%")}return n}return{nextToken:function(){const{currentType:e,offset:t,startLoc:n,endLoc:s}=c;return c.lastType=e,c.lastOffset=t,c.lastStartLoc=n,c.lastEndLoc=s,c.offset=o(),c.startLoc=a(),r.currentChar()===O?f(c,14):$(r,c)},currentOffset:o,currentPosition:a,context:i}}const w=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function R(e,t,n){switch(e){case"\\\\":return"\\";case"\\'":return"'";default:{const e=parseInt(t||n,16);return e<=55295||e>=57344?String.fromCodePoint(e):"οΏ½"}}}function A(e={}){const t=!1!==e.location,{onError:n}=e;function r(e,n,r){const o={type:e,start:n,end:n};return t&&(o.loc={start:r,end:r}),o}function o(e,n,r,o){e.end=n,o&&(e.type=o),t&&e.loc&&(e.loc.end=r)}function a(e,t){const n=e.context(),a=r(3,n.offset,n.startLoc);return a.value=t,o(a,e.currentOffset(),e.currentPosition()),a}function s(e,t){const n=e.context(),{lastOffset:a,lastStartLoc:s}=n,l=r(5,a,s);return l.index=parseInt(t,10),e.nextToken(),o(l,e.currentOffset(),e.currentPosition()),l}function l(e,t){const n=e.context(),{lastOffset:a,lastStartLoc:s}=n,l=r(4,a,s);return l.key=t,e.nextToken(),o(l,e.currentOffset(),e.currentPosition()),l}function c(e,t){const n=e.context(),{lastOffset:a,lastStartLoc:s}=n,l=r(9,a,s);return l.value=t.replace(w,R),e.nextToken(),o(l,e.currentOffset(),e.currentPosition()),l}function u(e){const t=e.context(),n=r(6,t.offset,t.startLoc);let a=e.nextToken();if(9===a.type){const t=function(e){const t=e.nextToken(),n=e.context(),{lastOffset:a,lastStartLoc:s}=n,l=r(8,a,s);return 12!==t.type?(l.value="",o(l,a,s),{nextConsumeToken:t,node:l}):(null==t.value&&x(t),l.value=t.value||"",o(l,e.currentOffset(),e.currentPosition()),{node:l})}(e);n.modifier=t.node,a=t.nextConsumeToken||e.nextToken()}switch(10!==a.type&&x(a),a=e.nextToken(),2===a.type&&(a=e.nextToken()),a.type){case 11:null==a.value&&x(a),n.key=function(e,t){const n=e.context(),a=r(7,n.offset,n.startLoc);return a.value=t,o(a,e.currentOffset(),e.currentPosition()),a}(e,a.value||"");break;case 5:null==a.value&&x(a),n.key=l(e,a.value||"");break;case 6:null==a.value&&x(a),n.key=s(e,a.value||"");break;case 7:null==a.value&&x(a),n.key=c(e,a.value||"");break;default:const t=e.context(),i=r(7,t.offset,t.startLoc);return i.value="",o(i,t.offset,t.startLoc),n.key=i,o(n,t.offset,t.startLoc),{nextConsumeToken:a,node:n}}return o(n,e.currentOffset(),e.currentPosition()),{node:n}}function f(e){const t=e.context(),n=r(2,1===t.currentType?e.currentOffset():t.offset,1===t.currentType?t.endLoc:t.startLoc);n.items=[];let i=null;do{const t=i||e.nextToken();switch(i=null,t.type){case 0:null==t.value&&x(t),n.items.push(a(e,t.value||""));break;case 6:null==t.value&&x(t),n.items.push(s(e,t.value||""));break;case 5:null==t.value&&x(t),n.items.push(l(e,t.value||""));break;case 7:null==t.value&&x(t),n.items.push(c(e,t.value||""));break;case 8:const r=u(e);n.items.push(r.node),i=r.nextConsumeToken||null}}while(14!==t.currentType&&1!==t.currentType);return o(n,1===t.currentType?t.lastOffset:e.currentOffset(),1===t.currentType?t.lastEndLoc:e.currentPosition()),n}function m(e){const t=e.context(),{offset:n,startLoc:a}=t,s=f(e);return 14===t.currentType?s:function(e,t,n,a){const s=e.context();let l=0===a.items.length;const c=r(1,t,n);c.cases=[],c.cases.push(a);do{const t=f(e);l||(l=0===t.items.length),c.cases.push(t)}while(14!==s.currentType);return o(c,e.currentOffset(),e.currentPosition()),c}(e,n,a,s)}return{parse:function(n){const a=P(n,i({},e)),s=a.context(),l=r(0,s.offset,s.startLoc);return t&&l.loc&&(l.loc.source=n),l.body=m(a),o(l,a.currentOffset(),a.currentPosition()),l}}}function x(e){if(14===e.type)return"EOF";const t=(e.value||"").replace(/\r?\n/gu,"\\n");return t.length>10?t.slice(0,9)+"β¦":t}function $(e,t){for(let n=0;n<e.length;n++)M(e[n],t)}function M(e,t){switch(e.type){case 1:$(e.cases,t),t.helper("plural");break;case 2:$(e.items,t);break;case 6:M(e.key,t),t.helper("linked");break;case 5:t.helper("interpolate"),t.helper("list");break;case 4:t.helper("interpolate"),t.helper("named")}}function D(e,t={}){const n=function(e,t={}){const n={ast:e,helpers:new Set};return{context:()=>n,helper:e=>(n.helpers.add(e),e)}}(e);n.helper("normalize"),e.body&&M(e.body,n);const r=n.context();e.helpers=Array.from(r.helpers)}function W(e,t){const{helper:n}=e;switch(t.type){case 0:!function(e,t){t.body?W(e,t.body):e.push("null")}(e,t);break;case 1:!function(e,t){const{helper:n,needIndent:r}=e;if(t.cases.length>1){e.push(`${n("plural")}([`),e.indent(r());const o=t.cases.length;for(let n=0;n<o&&(W(e,t.cases[n]),n!==o-1);n++)e.push(", ");e.deindent(r()),e.push("])")}}(e,t);break;case 2:!function(e,t){const{helper:n,needIndent:r}=e;e.push(`${n("normalize")}([`),e.indent(r());const o=t.items.length;for(let n=0;n<o&&(W(e,t.items[n]),n!==o-1);n++)e.push(", ");e.deindent(r()),e.push("])")}(e,t);break;case 6:!function(e,t){const{helper:n}=e;e.push(`${n("linked")}(`),W(e,t.key),t.modifier&&(e.push(", "),W(e,t.modifier)),e.push(")")}(e,t);break;case 8:case 7:e.push(JSON.stringify(t.value),t);break;case 5:e.push(`${n("interpolate")}(${n("list")}(${t.index}))`,t);break;case 4:e.push(`${n("interpolate")}(${n("named")}(${JSON.stringify(t.key)}))`,t);break;case 9:case 3:e.push(JSON.stringify(t.value),t)}}function S(e,t={}){const n=i({},t),r=A(n).parse(e);return D(r,n),((e,t={})=>{const n=d(t.mode)?t.mode:"normal",r=d(t.filename)?t.filename:"message.intl",o=t.needIndent?t.needIndent:"arrow"!==n,a=e.helpers||[],s=function(e,t){const{filename:n,breakLineCode:r,needIndent:o}=t,a={source:e.loc.source,filename:n,code:"",column:1,line:1,offset:0,map:void 0,breakLineCode:r,needIndent:o,indentLevel:0};function s(e,t){a.code+=e}function l(e,t=!0){const n=t?r:"";s(o?n+" ".repeat(e):n)}return{context:()=>a,push:s,indent:function(e=!0){const t=++a.indentLevel;e&&l(t)},deindent:function(e=!0){const t=--a.indentLevel;e&&l(t)},newline:function(){l(a.indentLevel)},helper:e=>`_${e}`,needIndent:()=>a.needIndent}}(e,{mode:n,filename:r,sourceMap:!!t.sourceMap,breakLineCode:null!=t.breakLineCode?t.breakLineCode:"arrow"===n?";":"\n",needIndent:o});s.push("normal"===n?"function __msg__ (ctx) {":"(ctx) => {"),s.indent(o),a.length>0&&(s.push(`const { ${a.map((e=>`${e}: _${e}`)).join(", ")} } = ctx`),s.newline()),s.push("return "),W(s,e),s.deindent(o),s.push("}");const{code:l,map:c}=s.context();return{ast:e,code:l,map:c?c.toJSON():void 0}})(r,n)}const U=[];U[0]={w:[0],i:[3,0],"[":[4],o:[7]},U[1]={w:[1],".":[2],"[":[4],o:[7]},U[2]={w:[2],i:[3,0],0:[3,0]},U[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},U[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},U[5]={"'":[4,0],o:8,l:[5,0]},U[6]={'"':[4,0],o:8,l:[6,0]};const V=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function j(e){if(null==e)return"o";switch(e.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return e;case 95:case 36:case 45:return"i";case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"w"}return"i"}function G(e){const t=e.trim();return("0"!==e.charAt(0)||!isNaN(parseInt(e)))&&(V.test(t)?function(e){const t=e.charCodeAt(0);return t!==e.charCodeAt(e.length-1)||34!==t&&39!==t?e:e.slice(1,-1)}(t):"*"+t)}const H=new Map;function B(e,t){return g(e)?e[t]:null}const J=e=>e,z=e=>"",X=e=>0===e.length?"":e.join(""),Y=e=>null==e?"":p(e)||v(e)&&e.toString===b?JSON.stringify(e,null,2):String(e);function K(e,t){return e=Math.abs(e),2===t?e?e>1?1:0:1:e?Math.min(e,2):0}function q(e={}){const t=e.locale,n=function(e){const t=a(e.pluralIndex)?e.pluralIndex:-1;return e.named&&(a(e.named.count)||a(e.named.n))?a(e.named.count)?e.named.count:a(e.named.n)?e.named.n:t:t}(e),r=g(e.pluralRules)&&d(t)&&_(e.pluralRules[t])?e.pluralRules[t]:K,o=g(e.pluralRules)&&d(t)&&_(e.pluralRules[t])?K:void 0,s=e.list||[],l=e.named||{};a(e.pluralIndex)&&function(e,t){t.count||(t.count=e),t.n||(t.n=e)}(n,l);function c(t){const n=_(e.messages)?e.messages(t):!!g(e.messages)&&e.messages[t];return n||(e.parent?e.parent.message(t):z)}const i=v(e.processor)&&_(e.processor.normalize)?e.processor.normalize:X,u=v(e.processor)&&_(e.processor.interpolate)?e.processor.interpolate:Y,f={list:e=>s[e],named:e=>l[e],plural:e=>e[r(n,e.length,o)],linked:(t,n)=>{const r=c(t)(f);return d(n)?(o=n,e.modifiers?e.modifiers[o]:J)(r):r;var o},message:c,type:v(e.processor)&&d(e.processor.type)?e.processor.type:"text",interpolate:u,normalize:i};return f}function Q(e,t,n){return[...new Set([n,...p(t)?t:g(t)?Object.keys(t):d(t)?[t]:[n]])]}function Z(e,t,n){const r=d(n)?n:re,o=e;o.__localeChainCache||(o.__localeChainCache=new Map);let a=o.__localeChainCache.get(r);if(!a){a=[];let e=[n];for(;p(e);)e=ee(a,e,t);const s=p(t)||!v(t)?t:t.default?t.default:null;e=d(s)?[s]:s,p(e)&&ee(a,e,!1),o.__localeChainCache.set(r,a)}return a}function ee(e,t,n){let r=!0;for(let o=0;o<t.length&&h(r);o++){d(t[o])&&(r=te(e,t[o],n))}return r}function te(e,t,n){let r;const o=t.split("-");do{r=ne(e,o.join("-"),n),o.splice(-1,1)}while(o.length&&!0===r);return r}function ne(e,t,n){let r=!1;if(!e.includes(t)&&(r=!0,t)){r="!"!==t[t.length-1];const o=t.replace(/!/g,"");e.push(o),(p(n)||v(n))&&n[o]&&(r=n[o])}return r}const re="en-US";let oe,ae,se;let le=0;function ce(e={}){const t=d(e.version)?e.version:"9.2.0-beta.7",n=d(e.locale)?e.locale:re,r=p(e.fallbackLocale)||v(e.fallbackLocale)||d(e.fallbackLocale)||!1===e.fallbackLocale?e.fallbackLocale:n,o=v(e.messages)?e.messages:{[n]:{}},a=v(e.datetimeFormats)?e.datetimeFormats:{[n]:{}},l=v(e.numberFormats)?e.numberFormats:{[n]:{}},u=i({},e.modifiers||{},{upper:e=>d(e)?e.toUpperCase():e,lower:e=>d(e)?e.toLowerCase():e,capitalize:e=>d(e)?`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`:e}),f=e.pluralRules||{},m=_(e.missing)?e.missing:null,b=!h(e.missingWarn)&&!s(e.missingWarn)||e.missingWarn,k=!h(e.fallbackWarn)&&!s(e.fallbackWarn)||e.fallbackWarn,L=!!e.fallbackFormat,y=!!e.unresolving,T=_(e.postTranslation)?e.postTranslation:null,E=v(e.processor)?e.processor:null,N=!h(e.warnHtmlMessage)||e.warnHtmlMessage,I=!!e.escapeParameter,C=_(e.messageCompiler)?e.messageCompiler:oe,F=_(e.messageResolver)?e.messageResolver:ae||B,O=_(e.localeFallbacker)?e.localeFallbacker:se||Q,P=_(e.onWarn)?e.onWarn:c,w=e,R=g(w.__datetimeFormatters)?w.__datetimeFormatters:new Map,A=g(w.__numberFormatters)?w.__numberFormatters:new Map,x=g(w.__meta)?w.__meta:{};le++;const $={version:t,cid:le,locale:n,fallbackLocale:r,messages:o,modifiers:u,pluralRules:f,missing:m,missingWarn:b,fallbackWarn:k,fallbackFormat:L,unresolving:y,postTranslation:T,processor:E,warnHtmlMessage:N,escapeParameter:I,messageCompiler:C,messageResolver:F,localeFallbacker:O,onWarn:P,__meta:x};return $.datetimeFormats=a,$.numberFormats=l,$.__datetimeFormatters=R,$.__numberFormatters=A,$}function ie(e,t,n,r,o){const{missing:a}=e;if(null!==a){const r=a(e,n,t,o);return d(r)?r:t}return t}function ue(e,t,n){e.__localeChainCache=new Map,e.localeFallbacker(e,n,t)}const fe=e=>e;let me=Object.create(null);let pe=L;const _e=()=>pe++,de={INVALID_ARGUMENT:pe,INVALID_DATE_ARGUMENT:_e(),INVALID_ISO_DATE_ARGUMENT:_e(),__EXTEND_POINT__:_e()},he=()=>"",ge=e=>_(e);function be(e,...t){const{fallbackFormat:n,postTranslation:r,unresolving:o,fallbackLocale:s,messages:l}=e,[c,i]=ve(...t),f=(h(i.missingWarn),h(i.fallbackWarn),h(i.escapeParameter)?i.escapeParameter:e.escapeParameter),m=!!i.resolvedMessage,b=d(i.default)||h(i.default)?h(i.default)?c:i.default:n?c:"",k=n||""!==b,v=d(i.locale)?i.locale:e.locale;f&&function(e){p(e.list)?e.list=e.list.map((e=>d(e)?u(e):e)):g(e.named)&&Object.keys(e.named).forEach((t=>{d(e.named[t])&&(e.named[t]=u(e.named[t]))}))}(i);let[L,y,T]=m?[c,v,l[v]||{}]:function(e,t,n,r,o,a){const{messages:s,messageResolver:l,localeFallbacker:c}=e,i=c(e,r,n);let u,f={},m=null;const p="translate";for(let n=0;n<i.length&&(u=i[n],f=s[u]||{},null===(m=l(f,t))&&(m=f[t]),!d(m)&&!_(m));n++){const n=ie(e,t,u,0,p);n!==t&&(m=n)}return[m,u,f]}(e,c,v,s),E=c;if(m||d(L)||ge(L)||k&&(L=b,E=L),!(m||(d(L)||ge(L))&&d(y)))return o?-1:c;let N=!1;const I=ge(L)?L:ke(e,c,y,L,E,(()=>{N=!0}));if(N)return L;const C=function(e,t,n){return t(n)}(0,I,q(function(e,t,n,r){const{modifiers:o,pluralRules:s,messageResolver:l}=e,c={locale:t,modifiers:o,pluralRules:s,messages:r=>{const o=l(n,r);if(d(o)){let n=!1;const a=ke(e,r,t,o,r,(()=>{n=!0}));return n?he:a}return ge(o)?o:he}};e.processor&&(c.processor=e.processor);r.list&&(c.list=r.list);r.named&&(c.named=r.named);a(r.plural)&&(c.pluralIndex=r.plural);return c}(e,y,T,i)));return r?r(C):C}function ke(e,t,n,r,a,s){const{messageCompiler:l,warnHtmlMessage:c}=e;if(ge(r)){const e=r;return e.locale=e.locale||n,e.key=e.key||t,e}const i=l(r,function(e,t,n,r,a,s){return{warnHtmlMessage:a,onError:e=>{throw s&&s(e),e},onCacheKey:e=>((e,t,n)=>o({l:e,k:t,s:n}))(t,n,e)}}(0,n,a,0,c,s));return i.locale=n,i.key=t,i.source=r,i}function ve(...e){const[t,n,r]=e,o={};if(!d(t)&&!a(t)&&!ge(t))throw Error(de.INVALID_ARGUMENT);const s=a(t)?String(t):(ge(t),t);return a(n)?o.plural=n:d(n)?o.default=n:v(n)&&!l(n)?o.named=n:p(n)&&(o.list=n),a(r)?o.plural=r:d(r)?o.default=r:v(r)&&i(o,r),[s,o]}function Le(e,...t){const{datetimeFormats:n,unresolving:r,fallbackLocale:o,localeFallbacker:a}=e,{__datetimeFormatters:s}=e,[c,u,f,m]=ye(...t);h(f.missingWarn);h(f.fallbackWarn);const p=!!f.part,_=d(f.locale)?f.locale:e.locale,g=a(e,o,_);if(!d(c)||""===c)return new Intl.DateTimeFormat(_).format(u);let b,k={},L=null;for(let t=0;t<g.length&&(b=g[t],k=n[b]||{},L=k[c],!v(L));t++)ie(e,c,b,0,"datetime format");if(!v(L)||!d(b))return r?-1:c;let y=`${b}__${c}`;l(m)||(y=`${y}__${JSON.stringify(m)}`);let T=s.get(y);return T||(T=new Intl.DateTimeFormat(b,i({},L,m)),s.set(y,T)),p?T.formatToParts(u):T.format(u)}function ye(...e){const[t,n,r,o]=e;let s,l={},c={};if(d(t)){const e=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!e)throw Error(de.INVALID_ISO_DATE_ARGUMENT);const n=e[3]?e[3].trim().startsWith("T")?`${e[1].trim()}${e[3].trim()}`:`${e[1].trim()}T${e[3].trim()}`:e[1].trim();s=new Date(n);try{s.toISOString()}catch(e){throw Error(de.INVALID_ISO_DATE_ARGUMENT)}}else if("[object Date]"===k(t)){if(isNaN(t.getTime()))throw Error(de.INVALID_DATE_ARGUMENT);s=t}else{if(!a(t))throw Error(de.INVALID_ARGUMENT);s=t}return d(n)?l.key=n:v(n)&&(l=n),d(r)?l.locale=r:v(r)&&(c=r),v(o)&&(c=o),[l.key||"",s,l,c]}function Te(e,t,n){const r=e;for(const e in n){const n=`${t}__${e}`;r.__datetimeFormatters.has(n)&&r.__datetimeFormatters.delete(n)}}function Ee(e,...t){const{numberFormats:n,unresolving:r,fallbackLocale:o,localeFallbacker:a}=e,{__numberFormatters:s}=e,[c,u,f,m]=Ne(...t);h(f.missingWarn);h(f.fallbackWarn);const p=!!f.part,_=d(f.locale)?f.locale:e.locale,g=a(e,o,_);if(!d(c)||""===c)return new Intl.NumberFormat(_).format(u);let b,k={},L=null;for(let t=0;t<g.length&&(b=g[t],k=n[b]||{},L=k[c],!v(L));t++)ie(e,c,b,0,"number format");if(!v(L)||!d(b))return r?-1:c;let y=`${b}__${c}`;l(m)||(y=`${y}__${JSON.stringify(m)}`);let T=s.get(y);return T||(T=new Intl.NumberFormat(b,i({},L,m)),s.set(y,T)),p?T.formatToParts(u):T.format(u)}function Ne(...e){const[t,n,r,o]=e;let s={},l={};if(!a(t))throw Error(de.INVALID_ARGUMENT);const c=t;return d(n)?s.key=n:v(n)&&(s=n),d(r)?s.locale=r:v(r)&&(l=r),v(o)&&(l=o),[s.key||"",c,s,l]}function Ie(e,t,n){const r=e;for(const e in n){const n=`${t}__${e}`;r.__numberFormatters.has(n)&&r.__numberFormatters.delete(n)}}const Ce="9.2.0-beta.7";let Fe=L;const Oe=()=>Fe++,Pe={UNEXPECTED_RETURN_TYPE:Fe,INVALID_ARGUMENT:Oe(),MUST_BE_CALL_SETUP_TOP:Oe(),NOT_INSLALLED:Oe(),NOT_AVAILABLE_IN_LEGACY_MODE:Oe(),REQUIRED_VALUE:Oe(),INVALID_VALUE:Oe(),CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:Oe(),NOT_INSLALLED_WITH_PROVIDE:Oe(),UNEXPECTED_ERROR:Oe(),NOT_COMPATIBLE_LEGACY_VUE_I18N:Oe(),BRIDGE_SUPPORT_VUE_2_ONLY:Oe(),__EXTEND_POINT__:Oe()},we=r("__setPluralRules"),Re=r("__legacyVueI18n");function Ae(e){return null!=e&&null!=e.version&&(Number(e.version.split(".")[0])||-1)>=8}function xe(e){if(!g(e))return e;for(const t in e)if(m(e,t))if(t.includes(".")){const n=t.split("."),r=n.length-1;let o=e;for(let e=0;e<r;e++)n[e]in o||(o[n[e]]={}),o=o[n[e]];o[n[r]]=e[t],delete e[t],g(o[n[r]])&&xe(o[n[r]])}else g(e[t])&&xe(e[t]);return e}function $e(e,t){const{messages:n,__i18n:r,messageResolver:o,flatJson:a}=t,s=v(n)?n:p(r)?{}:{[e]:{}};if(p(r)&&r.forEach((e=>{if("locale"in e&&"resource"in e){const{locale:t,resource:n}=e;t?(s[t]=s[t]||{},De(n,s[t])):De(n,s)}else d(e)&&De(JSON.parse(e),s)})),null==o&&a)for(const e in s)m(s,e)&&xe(s[e]);return s}const Me=e=>!g(e)||p(e);function De(e,t){if(Me(e)||Me(t))throw Error(Pe.INVALID_VALUE);for(const n in e)m(e,n)&&(Me(e[n])||Me(t[n])?t[n]=e[n]:De(e[n],t[n]))}let We=0;function Se(e){return(n,r,o,a)=>e(r,o,t.getCurrentInstance()||void 0,a)}function Ue(e={},n){const{__root:r}=e,o=void 0===r;let l=!h(e.inheritLocale)||e.inheritLocale;const c=t.ref(r&&l?r.locale.value:d(e.locale)?e.locale:re),u=t.ref(r&&l?r.fallbackLocale.value:d(e.fallbackLocale)||p(e.fallbackLocale)||v(e.fallbackLocale)||!1===e.fallbackLocale?e.fallbackLocale:c.value),f=t.ref($e(c.value,e)),m=t.ref(v(e.datetimeFormats)?e.datetimeFormats:{[c.value]:{}}),b=t.ref(v(e.numberFormats)?e.numberFormats:{[c.value]:{}});let k=r?r.missingWarn:!h(e.missingWarn)&&!s(e.missingWarn)||e.missingWarn,L=r?r.fallbackWarn:!h(e.fallbackWarn)&&!s(e.fallbackWarn)||e.fallbackWarn,y=r?r.fallbackRoot:!h(e.fallbackRoot)||e.fallbackRoot,T=!!e.fallbackFormat,E=_(e.missing)?e.missing:null,N=_(e.missing)?Se(e.missing):null,I=_(e.postTranslation)?e.postTranslation:null,C=!h(e.warnHtmlMessage)||e.warnHtmlMessage,F=!!e.escapeParameter;const O=r?r.modifiers:v(e.modifiers)?e.modifiers:{};let P,w,R=e.pluralRules||r&&r.pluralRules;{Ae(n);const e={locale:c.value,fallbackLocale:u.value,messages:f.value,dateTimeFormats:m.value,numberFormats:b.value,modifiers:O,missing:E,fallbackRoot:y,postTranslation:I,pluralizationRules:R,escapeParameterHtml:F,sync:l,silentFallbackWarn:h(L)?!L:L,silentTranslationWarn:h(k)?!k:k,formatFallbackMessages:h(T)?!T:T,warnHtmlInMessage:h(C)&&C?"warn":"off"};P=new n(e)}w=function(){const t={version:Ce,locale:c.value,fallbackLocale:u.value,messages:f.value,modifiers:O,pluralRules:R,missing:null===N?void 0:N,missingWarn:k,fallbackWarn:L,fallbackFormat:T,unresolving:!0,postTranslation:null===I?void 0:I,warnHtmlMessage:C,escapeParameter:F,messageResolver:e.messageResolver,__meta:{framework:"vue"}};return t.datetimeFormats=m.value,t.numberFormats=b.value,t.__datetimeFormatters=v(w)?w.__datetimeFormatters:void 0,t.__numberFormatters=v(w)?w.__numberFormatters:void 0,ce(t)}(),ue(w,c.value,u.value);const A=t.computed({get:()=>c.value,set:e=>{c.value=e,P&&(P.locale=e),w.locale=c.value}}),x=t.computed({get:()=>u.value,set:e=>{u.value=e,P&&(P.fallbackLocale=e),w.fallbackLocale=u.value,ue(w,c.value,e)}}),$=t.computed((()=>f.value)),M=t.computed((()=>m.value)),D=t.computed((()=>b.value));function W(e,t,n,o,s,l){let c;if(c=e(w),a(c)&&-1===c){const[e,n]=t();return r&&y?o(r):s(e)}if(l(c))return c;throw Error(Pe.UNEXPECTED_RETURN_TYPE)}function S(...e){return W((t=>Reflect.apply(be,null,[t,...e])),(()=>ve(...e)),0,(t=>Reflect.apply(t.t,t,[...e])),(e=>e),(e=>d(e)))}function U(e){return f.value[e]||{}}We++,r&&(t.watch(r.locale,(e=>{l&&(c.value=e,P&&(P.locale=e),w.locale=e,ue(w,c.value,u.value))})),t.watch(r.fallbackLocale,(e=>{l&&(u.value=e,P&&(P.fallbackLocale=e),w.fallbackLocale=e,ue(w,c.value,u.value))})));const V={id:We,locale:A,fallbackLocale:x,get inheritLocale(){return l},set inheritLocale(e){l=e,P&&(P._sync=e),e&&r&&(c.value=r.locale.value,u.value=r.fallbackLocale.value,P&&(P.locale=r.locale.value,P.fallbackLocale=r.fallbackLocale.value),ue(w,c.value,u.value))},get availableLocales(){return Object.keys(f.value).sort()},messages:$,get modifiers(){return O},get pluralRules(){return R||{}},get isGlobal(){return o},get missingWarn(){return k},set missingWarn(e){k=e,w.missingWarn=k},get fallbackWarn(){return L},set fallbackWarn(e){L=e,w.fallbackWarn=L},get fallbackRoot(){return y},set fallbackRoot(e){y=e},get fallbackFormat(){return T},set fallbackFormat(e){T=e,w.fallbackFormat=T},get warnHtmlMessage(){return C},set warnHtmlMessage(e){C=e,w.warnHtmlMessage=e},get escapeParameter(){return F},set escapeParameter(e){F=e,w.escapeParameter=e},t:S,getLocaleMessage:U,setLocaleMessage:function(e,t){f.value[e]=t,P&&P.setLocaleMessage(e,t),w.messages=f.value},mergeLocaleMessage:function(e,t){f.value[e]=f.value[e]||{},P&&P.mergeLocaleMessage(e,t),De(t,f.value[e]),w.messages=f.value},getPostTranslationHandler:function(){return _(I)?I:null},setPostTranslationHandler:function(e){I=e,w.postTranslation=e},getMissingHandler:function(){return E},setMissingHandler:function(e){null!==e&&(N=Se(e)),E=e,w.missing=N},[we]:function(e){R=e,w.pluralRules=R}};return V.datetimeFormats=M,V.numberFormats=D,V.rt=function(...e){const[t,n,r]=e;if(r&&!g(r))throw Error(Pe.INVALID_ARGUMENT);return S(t,n,i({resolvedMessage:!0},r||{}))},V.te=function(e,t){const n=U(d(t)?t:c.value);return null!==w.messageResolver(n,e)},V.tm=function(e){const t=function(e){let t=null;const n=Z(w,u.value,c.value);for(let r=0;r<n.length;r++){const o=w.messageResolver(f.value[n[r]]||{},e);if(null!=o){t=o;break}}return t}(e);return null!=t?t:r&&r.tm(e)||{}},V.d=function(...e){return W((t=>Reflect.apply(Le,null,[t,...e])),(()=>ye(...e)),0,(t=>Reflect.apply(t.d,t,[...e])),(()=>""),(e=>d(e)))},V.n=function(...e){return W((t=>Reflect.apply(Ee,null,[t,...e])),(()=>Ne(...e)),0,(t=>Reflect.apply(t.n,t,[...e])),(()=>""),(e=>d(e)))},V.getDateTimeFormat=function(e){return m.value[e]||{}},V.setDateTimeFormat=function(e,t){m.value[e]=t,P&&P.setDateTimeFormat(e,t),w.datetimeFormats=m.value,Te(w,e,t)},V.mergeDateTimeFormat=function(e,t){m.value[e]=i(m.value[e]||{},t),P&&P.mergeDateTimeFormat(e,t),w.datetimeFormats=m.value,Te(w,e,t)},V.getNumberFormat=function(e){return b.value[e]||{}},V.setNumberFormat=function(e,t){b.value[e]=t,P&&P.setNumberFormat(e,t),w.numberFormats=b.value,Ie(w,e,t)},V.mergeNumberFormat=function(e,t){b.value[e]=i(b.value[e]||{},t),P&&P.mergeNumberFormat(e,t),w.numberFormats=b.value,Ie(w,e,t)},V[Re]=P,V}let Ve=null,je=null;return oe=function(e,t={}){{const n=(t.onCacheKey||fe)(e),r=me[n];if(r)return r;let o=!1;const a=t.onError||y;t.onError=e=>{o=!0,a(e)};const{code:s}=S(e,t),l=new Function(`return ${s}`)();return o?l:me[n]=l}},ae=function(e,t){if(!g(e))return null;let n=H.get(t);if(n||(n=function(e){const t=[];let n,r,o,a,s,l,c,i=-1,u=0,f=0;const m=[];function p(){const t=e[i+1];if(5===u&&"'"===t||6===u&&'"'===t)return i++,o="\\"+t,m[0](),!0}for(m[0]=()=>{void 0===r?r=o:r+=o},m[1]=()=>{void 0!==r&&(t.push(r),r=void 0)},m[2]=()=>{m[0](),f++},m[3]=()=>{if(f>0)f--,u=4,m[0]();else{if(f=0,void 0===r)return!1;if(r=G(r),!1===r)return!1;m[1]()}};null!==u;)if(i++,n=e[i],"\\"!==n||!p()){if(a=j(n),c=U[u],s=c[a]||c.l||8,8===s)return;if(u=s[0],void 0!==s[1]&&(l=m[s[1]],l&&(o=n,!1===l())))return;if(7===u)return t}}(t),n&&H.set(t,n)),!n)return null;const r=n.length;let o=e,a=0;for(;a<r;){const e=o[n[a]];if(void 0===e)return null;o=e,a++}return o},se=Z,e.I18nInjectionKey=r("global-vue-i18n"),e.VERSION=Ce,e.createI18n=function(e={},t){if(je)return je;Ve=t;const n=!h(e.legacy)||e.legacy,o=new Map,a=function(e,t,n){if(!Ae(n))throw Error(Pe.NOT_COMPATIBLE_LEGACY_VUE_I18N);return Ue(e,n)}(e,0,t);r("");{const e=a[Re];Object.defineProperty(e,"global",{get:()=>a}),Object.defineProperty(e,"mode",{get:()=>n?"legacy":"composition"}),Object.defineProperty(e,"__instances",{get:()=>o}),Object.defineProperty(e,"install",{value:t=>{if(2!==(t&&t.version&&Number(t.version.split(".")[0])||-1))throw Error(Pe.BRIDGE_SUPPORT_VUE_2_ONLY);t.mixin(function(e,t){return{beforeCreate(){const n=this.$options;if(!n.__VUE18N__INSTANCE__)if(n.i18n=n.i18n||(n.__i18n?{}:null),this._i18nBridgeRoot=e,"composition"!==e.mode)if(n.i18n){if(n.i18n instanceof t){if(n.__i18n)try{const e=n.i18n&&n.i18n.messages?n.i18n.messages:{};n.__i18n.forEach((t=>De(e,JSON.parse(t)))),Object.keys(e).forEach((t=>{n.i18n.mergeLocaleMessage(t,e[t])}))}catch(e){}this._i18n=n.i18n,this._i18nWatcher=this._i18n.watchI18nData()}else if(v(n.i18n)){const e=this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof t?this.$root.$i18n:null;if(e&&(n.i18n.root=this.$root,n.i18n.formatter=e.formatter,n.i18n.fallbackLocale=e.fallbackLocale,n.i18n.formatFallbackMessages=e.formatFallbackMessages,n.i18n.silentTranslationWarn=e.silentTranslationWarn,n.i18n.silentFallbackWarn=e.silentFallbackWarn,n.i18n.pluralizationRules=e.pluralizationRules,n.i18n.preserveDirectiveContent=e.preserveDirectiveContent),n.__i18n)try{const e=n.i18n&&n.i18n.messages?n.i18n.messages:{};n.__i18n.forEach((t=>De(e,JSON.parse(t)))),n.i18n.messages=e}catch(e){}const{sharedMessages:r}=n.i18n;r&&v(r)&&De(n.i18n.messages,r),this._i18n=new t(n.i18n),this._i18nWatcher=this._i18n.watchI18nData(),(void 0===n.i18n.sync||n.i18n.sync)&&(this._localeWatcher=this.$i18n.watchLocale()),e&&e.onComponentInstanceCreated(this._i18n)}}else this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof t?this._i18n=this.$root.$i18n:n.parent&&n.parent.$i18n&&n.parent.$i18n instanceof t&&(this._i18n=n.parent.$i18n);else this._i18n=e},beforeMount(){const e=this.$options;e.__VUE18N__INSTANCE__||(e.i18n=e.i18n||(e.__i18n?{}:null),e.i18n?(e.i18n instanceof t||v(e.i18n))&&(this._i18n.subscribeDataChanging(this),this._subscribing=!0):(this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof t||e.parent&&e.parent.$i18n&&e.parent.$i18n instanceof t)&&(this._i18n.subscribeDataChanging(this),this._subscribing=!0))},beforeDestroy(){if(this.$options.__VUE18N__INSTANCE__)return;if(this._i18nBridgeRoot)return void delete this._i18nBridgeRoot;if("composition"===e.mode)return void delete this._i18n;if(!this._i18n)return;const t=this;this.$nextTick((()=>{t._subscribing&&(t._i18n.unsubscribeDataChanging(t),delete t._subscribing),t._i18nWatcher&&(t._i18nWatcher(),t._i18n.destroyVM(),delete t._i18nWatcher),t._localeWatcher&&(t._localeWatcher(),delete t._localeWatcher)}))}}}(e,Ve))}});const t={__getInstance:function(e){return o.get(e)||null},__setInstance:function(e,t){o.set(e,t)},__deleteInstance:function(e){o.delete(e)}};return Object.keys(t).forEach((n=>Object.defineProperty(e,n,{value:t[n]}))),je=e,e}},e.useI18n=function(e={}){const n=t.getCurrentInstance();if(null==n)throw Error(Pe.MUST_BE_CALL_SETUP_TOP);if(null==Ve||null==je)throw Error(Pe.NOT_INSLALLED);const r=function(e){{const t=e.proxy;if(null==t)throw Error(Pe.UNEXPECTED_ERROR);const n=t._i18nBridgeRoot;if(!n)throw Error(Pe.NOT_INSLALLED);return n}}(n),o=function(e){return e.global}(r),a=function(e){return e.proxy.$options}(n),s=function(e,t){return l(e)?"__i18n"in t?"local":"global":e.useScope?e.useScope:"local"}(e,a);if("global"===s)return function(e,t,n){let r=g(t.messages)?t.messages:{};"__i18nGlobal"in n&&(r=$e(e.locale.value,{messages:r,__i18n:n.__i18nGlobal}));const o=Object.keys(r);o.length&&o.forEach((t=>{e.mergeLocaleMessage(t,r[t])}));if(g(t.datetimeFormats)){const n=Object.keys(t.datetimeFormats);n.length&&n.forEach((n=>{e.mergeDateTimeFormat(n,t.datetimeFormats[n])}))}if(g(t.numberFormats)){const n=Object.keys(t.numberFormats);n.length&&n.forEach((n=>{e.mergeNumberFormat(n,t.numberFormats[n])}))}}(o,e,a),o;if("parent"===s){let e=function(e,t){let n=null;const r=t.root;let o=t.parent;for(;null!=o;){const t=e;if("composition"===e.mode)n=t.__getInstance(o);else{const e=t.__getInstance(o);null!=e&&(n=e.__composer)}if(null!=n)break;if(r===o)break;o=o.parent}return n}(r,n);return null==e&&(e=o),e}if("legacy"===r.mode)throw Error(Pe.NOT_AVAILABLE_IN_LEGACY_MODE);const c=r;let u=c.__getInstance(n);if(null==u){const r=i({},e);"__i18n"in a&&(r.__i18n=a.__i18n),o&&(r.__root=o),u=Ue(r,Ve),function(e,n,r){{const o=n.proxy;if(null==o)throw Error(Pe.UNEXPECTED_ERROR);const a=r[Re];if(a===e)throw Error(Pe.UNEXPECTED_ERROR);o._i18n=a,o._i18n_bridge=!0,o._i18nWatcher=o._i18n.watchI18nData(),o._i18n._sync&&(o._localeWatcher=o._i18n.watchLocale());let s=!1;t.onBeforeMount((()=>{o._i18n.subscribeDataChanging(o),s=!0}),n),t.onUnmounted((()=>{s&&(o._i18n.unsubscribeDataChanging(o),s=!1),o._i18nWatcher&&(o._i18nWatcher(),o._i18n.destroyVM(),delete o._i18nWatcher),o._localeWatcher&&(o._localeWatcher(),delete o._localeWatcher),delete o._i18n_bridge,delete o._i18n}),n)}}(c,n,u),c.__setInstance(n,u)}return u},Object.defineProperty(e,"__esModule",{value:!0}),e}({},VueCompositionAPI); | ||
var VueI18nBridge=function(e,t){"use strict";const n="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,r=e=>n?Symbol(e):e,o=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),a=e=>"number"==typeof e&&isFinite(e),s=e=>"[object RegExp]"===k(e),l=e=>v(e)&&0===Object.keys(e).length;function c(e,t){"undefined"!=typeof console&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}const i=Object.assign;function u(e){return e.replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}const f=Object.prototype.hasOwnProperty;function m(e,t){return f.call(e,t)}const p=Array.isArray,_=e=>"function"==typeof e,d=e=>"string"==typeof e,h=e=>"boolean"==typeof e,g=e=>null!==e&&"object"==typeof e,b=Object.prototype.toString,k=e=>b.call(e),v=e=>"[object Object]"===k(e),L=15;function y(e){throw e}function T(e,t,n){const r={start:e,end:t};return null!=n&&(r.source=n),r}const E=" ",N="\n",I=String.fromCharCode(8232),C=String.fromCharCode(8233);function O(e){const t=e;let n=0,r=1,o=1,a=0;const s=e=>"\r"===t[e]&&t[e+1]===N,l=e=>t[e]===C,c=e=>t[e]===I,i=e=>s(e)||(e=>t[e]===N)(e)||l(e)||c(e),u=e=>s(e)||l(e)||c(e)?N:t[e];function f(){return a=0,i(n)&&(r++,o=0),s(n)&&n++,n++,o++,t[n]}return{index:()=>n,line:()=>r,column:()=>o,peekOffset:()=>a,charAt:u,currentChar:()=>u(n),currentPeek:()=>u(n+a),next:f,peek:function(){return s(n+a)&&a++,a++,t[n+a]},reset:function(){n=0,r=1,o=1,a=0},resetPeek:function(e=0){a=e},skipToPeek:function(){const e=n+a;for(;e!==n;)f();a=0}}}const F=void 0;function P(e,t={}){const n=!1!==t.location,r=O(e),o=()=>r.index(),a=()=>{return e=r.line(),t=r.column(),n=r.index(),{line:e,column:t,offset:n};var e,t,n},s=a(),l=o(),c={currentType:14,offset:l,startLoc:s,endLoc:s,lastType:14,lastOffset:l,lastStartLoc:s,lastEndLoc:s,braceNest:0,inLinked:!1,text:""},i=()=>c,{onError:u}=t;function f(e,t,r){e.endLoc=a(),e.currentType=t;const o={type:t};return n&&(o.loc=T(e.startLoc,e.endLoc)),null!=r&&(o.value=r),o}const m=e=>f(e,14);function p(e,t){return e.currentChar()===t?(e.next(),t):(a(),"")}function _(e){let t="";for(;e.currentPeek()===E||e.currentPeek()===N;)t+=e.currentPeek(),e.peek();return t}function d(e){const t=_(e);return e.skipToPeek(),t}function h(e){if(e===F)return!1;const t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||95===t}function g(e,t){const{currentType:n}=t;if(2!==n)return!1;_(e);const r=function(e){if(e===F)return!1;const t=e.charCodeAt(0);return t>=48&&t<=57}("-"===e.currentPeek()?e.peek():e.currentPeek());return e.resetPeek(),r}function b(e){_(e);const t="|"===e.currentPeek();return e.resetPeek(),t}function k(e,t=!0){const n=(t=!1,r="",o=!1)=>{const a=e.currentPeek();return"{"===a?"%"!==r&&t:"@"!==a&&a?"%"===a?(e.peek(),n(t,"%",!0)):"|"===a?!("%"!==r&&!o)||!(r===E||r===N):a===E?(e.peek(),n(!0,E,o)):a!==N||(e.peek(),n(!0,N,o)):"%"===r||t},r=n();return t&&e.resetPeek(),r}function v(e,t){const n=e.currentChar();return n===F?F:t(n)?(e.next(),n):null}function L(e){return v(e,(e=>{const t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||t>=48&&t<=57||95===t||36===t}))}function y(e){return v(e,(e=>{const t=e.charCodeAt(0);return t>=48&&t<=57}))}function I(e){return v(e,(e=>{const t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}))}function C(e){let t="",n="";for(;t=y(e);)n+=t;return n}function P(e){const t=e.currentChar();switch(t){case"\\":case"'":return e.next(),`\\${t}`;case"u":return w(e,t,4);case"U":return w(e,t,6);default:return a(),""}}function w(e,t,n){p(e,t);let r="";for(let t=0;t<n;t++){const t=I(e);if(!t){a(),e.currentChar();break}r+=t}return`\\${t}${r}`}function R(e){d(e);const t=p(e,"|");return d(e),t}function A(e,t){let n=null;switch(e.currentChar()){case"{":return t.braceNest>=1&&a(),e.next(),n=f(t,2,"{"),d(e),t.braceNest++,n;case"}":return t.braceNest>0&&2===t.currentType&&a(),e.next(),n=f(t,3,"}"),t.braceNest--,t.braceNest>0&&d(e),t.inLinked&&0===t.braceNest&&(t.inLinked=!1),n;case"@":return t.braceNest>0&&a(),n=x(e,t)||m(t),t.braceNest=0,n;default:let r=!0,o=!0,s=!0;if(b(e))return t.braceNest>0&&a(),n=f(t,1,R(e)),t.braceNest=0,t.inLinked=!1,n;if(t.braceNest>0&&(5===t.currentType||6===t.currentType||7===t.currentType))return a(),t.braceNest=0,$(e,t);if(r=function(e,t){const{currentType:n}=t;if(2!==n)return!1;_(e);const r=h(e.currentPeek());return e.resetPeek(),r}(e,t))return n=f(t,5,function(e){d(e);let t="",n="";for(;t=L(e);)n+=t;return e.currentChar()===F&&a(),n}(e)),d(e),n;if(o=g(e,t))return n=f(t,6,function(e){d(e);let t="";return"-"===e.currentChar()?(e.next(),t+=`-${C(e)}`):t+=C(e),e.currentChar()===F&&a(),t}(e)),d(e),n;if(s=function(e,t){const{currentType:n}=t;if(2!==n)return!1;_(e);const r="'"===e.currentPeek();return e.resetPeek(),r}(e,t))return n=f(t,7,function(e){d(e),p(e,"'");let t="",n="";const r=e=>"'"!==e&&e!==N;for(;t=v(e,r);)n+="\\"===t?P(e):t;const o=e.currentChar();return o===N||o===F?(a(),o===N&&(e.next(),p(e,"'")),n):(p(e,"'"),n)}(e)),d(e),n;if(!r&&!o&&!s)return n=f(t,13,function(e){d(e);let t="",n="";const r=e=>"{"!==e&&"}"!==e&&e!==E&&e!==N;for(;t=v(e,r);)n+=t;return n}(e)),a(),d(e),n}return n}function x(e,t){const{currentType:n}=t;let r=null;const o=e.currentChar();switch(8!==n&&9!==n&&12!==n&&10!==n||o!==N&&o!==E||a(),o){case"@":return e.next(),r=f(t,8,"@"),t.inLinked=!0,r;case".":return d(e),e.next(),f(t,9,".");case":":return d(e),e.next(),f(t,10,":");default:return b(e)?(r=f(t,1,R(e)),t.braceNest=0,t.inLinked=!1,r):function(e,t){const{currentType:n}=t;if(8!==n)return!1;_(e);const r="."===e.currentPeek();return e.resetPeek(),r}(e,t)||function(e,t){const{currentType:n}=t;if(8!==n&&12!==n)return!1;_(e);const r=":"===e.currentPeek();return e.resetPeek(),r}(e,t)?(d(e),x(e,t)):function(e,t){const{currentType:n}=t;if(9!==n)return!1;_(e);const r=h(e.currentPeek());return e.resetPeek(),r}(e,t)?(d(e),f(t,12,function(e){let t="",n="";for(;t=L(e);)n+=t;return n}(e))):function(e,t){const{currentType:n}=t;if(10!==n)return!1;const r=()=>{const t=e.currentPeek();return"{"===t?h(e.peek()):!("@"===t||"%"===t||"|"===t||":"===t||"."===t||t===E||!t)&&(t===N?(e.peek(),r()):h(t))},o=r();return e.resetPeek(),o}(e,t)?(d(e),"{"===o?A(e,t)||r:f(t,11,function(e){const t=(n=!1,r)=>{const o=e.currentChar();return"{"!==o&&"%"!==o&&"@"!==o&&"|"!==o&&o?o===E?r:o===N?(r+=o,e.next(),t(n,r)):(r+=o,e.next(),t(!0,r)):r};return t(!1,"")}(e))):(8===n&&a(),t.braceNest=0,t.inLinked=!1,$(e,t))}}function $(e,t){let n={type:14};if(t.braceNest>0)return A(e,t)||m(t);if(t.inLinked)return x(e,t)||m(t);const r=e.currentChar();switch(r){case"{":return A(e,t)||m(t);case"}":return a(),e.next(),f(t,3,"}");case"@":return x(e,t)||m(t);default:if(b(e))return n=f(t,1,R(e)),t.braceNest=0,t.inLinked=!1,n;if(k(e))return f(t,0,function(e){const t=n=>{const r=e.currentChar();return"{"!==r&&"}"!==r&&"@"!==r&&r?"%"===r?k(e)?(n+=r,e.next(),t(n)):n:"|"===r?n:r===E||r===N?k(e)?(n+=r,e.next(),t(n)):b(e)?n:(n+=r,e.next(),t(n)):(n+=r,e.next(),t(n)):n};return t("")}(e));if("%"===r)return e.next(),f(t,4,"%")}return n}return{nextToken:function(){const{currentType:e,offset:t,startLoc:n,endLoc:s}=c;return c.lastType=e,c.lastOffset=t,c.lastStartLoc=n,c.lastEndLoc=s,c.offset=o(),c.startLoc=a(),r.currentChar()===F?f(c,14):$(r,c)},currentOffset:o,currentPosition:a,context:i}}const w=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function R(e,t,n){switch(e){case"\\\\":return"\\";case"\\'":return"'";default:{const e=parseInt(t||n,16);return e<=55295||e>=57344?String.fromCodePoint(e):"οΏ½"}}}function A(e={}){const t=!1!==e.location,{onError:n}=e;function r(e,n,r){const o={type:e,start:n,end:n};return t&&(o.loc={start:r,end:r}),o}function o(e,n,r,o){e.end=n,o&&(e.type=o),t&&e.loc&&(e.loc.end=r)}function a(e,t){const n=e.context(),a=r(3,n.offset,n.startLoc);return a.value=t,o(a,e.currentOffset(),e.currentPosition()),a}function s(e,t){const n=e.context(),{lastOffset:a,lastStartLoc:s}=n,l=r(5,a,s);return l.index=parseInt(t,10),e.nextToken(),o(l,e.currentOffset(),e.currentPosition()),l}function l(e,t){const n=e.context(),{lastOffset:a,lastStartLoc:s}=n,l=r(4,a,s);return l.key=t,e.nextToken(),o(l,e.currentOffset(),e.currentPosition()),l}function c(e,t){const n=e.context(),{lastOffset:a,lastStartLoc:s}=n,l=r(9,a,s);return l.value=t.replace(w,R),e.nextToken(),o(l,e.currentOffset(),e.currentPosition()),l}function u(e){const t=e.context(),n=r(6,t.offset,t.startLoc);let a=e.nextToken();if(9===a.type){const t=function(e){const t=e.nextToken(),n=e.context(),{lastOffset:a,lastStartLoc:s}=n,l=r(8,a,s);return 12!==t.type?(l.value="",o(l,a,s),{nextConsumeToken:t,node:l}):(null==t.value&&x(t),l.value=t.value||"",o(l,e.currentOffset(),e.currentPosition()),{node:l})}(e);n.modifier=t.node,a=t.nextConsumeToken||e.nextToken()}switch(10!==a.type&&x(a),a=e.nextToken(),2===a.type&&(a=e.nextToken()),a.type){case 11:null==a.value&&x(a),n.key=function(e,t){const n=e.context(),a=r(7,n.offset,n.startLoc);return a.value=t,o(a,e.currentOffset(),e.currentPosition()),a}(e,a.value||"");break;case 5:null==a.value&&x(a),n.key=l(e,a.value||"");break;case 6:null==a.value&&x(a),n.key=s(e,a.value||"");break;case 7:null==a.value&&x(a),n.key=c(e,a.value||"");break;default:const t=e.context(),i=r(7,t.offset,t.startLoc);return i.value="",o(i,t.offset,t.startLoc),n.key=i,o(n,t.offset,t.startLoc),{nextConsumeToken:a,node:n}}return o(n,e.currentOffset(),e.currentPosition()),{node:n}}function f(e){const t=e.context(),n=r(2,1===t.currentType?e.currentOffset():t.offset,1===t.currentType?t.endLoc:t.startLoc);n.items=[];let i=null;do{const t=i||e.nextToken();switch(i=null,t.type){case 0:null==t.value&&x(t),n.items.push(a(e,t.value||""));break;case 6:null==t.value&&x(t),n.items.push(s(e,t.value||""));break;case 5:null==t.value&&x(t),n.items.push(l(e,t.value||""));break;case 7:null==t.value&&x(t),n.items.push(c(e,t.value||""));break;case 8:const r=u(e);n.items.push(r.node),i=r.nextConsumeToken||null}}while(14!==t.currentType&&1!==t.currentType);return o(n,1===t.currentType?t.lastOffset:e.currentOffset(),1===t.currentType?t.lastEndLoc:e.currentPosition()),n}function m(e){const t=e.context(),{offset:n,startLoc:a}=t,s=f(e);return 14===t.currentType?s:function(e,t,n,a){const s=e.context();let l=0===a.items.length;const c=r(1,t,n);c.cases=[],c.cases.push(a);do{const t=f(e);l||(l=0===t.items.length),c.cases.push(t)}while(14!==s.currentType);return o(c,e.currentOffset(),e.currentPosition()),c}(e,n,a,s)}return{parse:function(n){const a=P(n,i({},e)),s=a.context(),l=r(0,s.offset,s.startLoc);return t&&l.loc&&(l.loc.source=n),l.body=m(a),o(l,a.currentOffset(),a.currentPosition()),l}}}function x(e){if(14===e.type)return"EOF";const t=(e.value||"").replace(/\r?\n/gu,"\\n");return t.length>10?t.slice(0,9)+"β¦":t}function $(e,t){for(let n=0;n<e.length;n++)M(e[n],t)}function M(e,t){switch(e.type){case 1:$(e.cases,t),t.helper("plural");break;case 2:$(e.items,t);break;case 6:M(e.key,t),t.helper("linked");break;case 5:t.helper("interpolate"),t.helper("list");break;case 4:t.helper("interpolate"),t.helper("named")}}function D(e,t={}){const n=function(e,t={}){const n={ast:e,helpers:new Set};return{context:()=>n,helper:e=>(n.helpers.add(e),e)}}(e);n.helper("normalize"),e.body&&M(e.body,n);const r=n.context();e.helpers=Array.from(r.helpers)}function W(e,t){const{helper:n}=e;switch(t.type){case 0:!function(e,t){t.body?W(e,t.body):e.push("null")}(e,t);break;case 1:!function(e,t){const{helper:n,needIndent:r}=e;if(t.cases.length>1){e.push(`${n("plural")}([`),e.indent(r());const o=t.cases.length;for(let n=0;n<o&&(W(e,t.cases[n]),n!==o-1);n++)e.push(", ");e.deindent(r()),e.push("])")}}(e,t);break;case 2:!function(e,t){const{helper:n,needIndent:r}=e;e.push(`${n("normalize")}([`),e.indent(r());const o=t.items.length;for(let n=0;n<o&&(W(e,t.items[n]),n!==o-1);n++)e.push(", ");e.deindent(r()),e.push("])")}(e,t);break;case 6:!function(e,t){const{helper:n}=e;e.push(`${n("linked")}(`),W(e,t.key),t.modifier&&(e.push(", "),W(e,t.modifier)),e.push(")")}(e,t);break;case 8:case 7:e.push(JSON.stringify(t.value),t);break;case 5:e.push(`${n("interpolate")}(${n("list")}(${t.index}))`,t);break;case 4:e.push(`${n("interpolate")}(${n("named")}(${JSON.stringify(t.key)}))`,t);break;case 9:case 3:e.push(JSON.stringify(t.value),t)}}function S(e,t={}){const n=i({},t),r=A(n).parse(e);return D(r,n),((e,t={})=>{const n=d(t.mode)?t.mode:"normal",r=d(t.filename)?t.filename:"message.intl",o=t.needIndent?t.needIndent:"arrow"!==n,a=e.helpers||[],s=function(e,t){const{filename:n,breakLineCode:r,needIndent:o}=t,a={source:e.loc.source,filename:n,code:"",column:1,line:1,offset:0,map:void 0,breakLineCode:r,needIndent:o,indentLevel:0};function s(e,t){a.code+=e}function l(e,t=!0){const n=t?r:"";s(o?n+" ".repeat(e):n)}return{context:()=>a,push:s,indent:function(e=!0){const t=++a.indentLevel;e&&l(t)},deindent:function(e=!0){const t=--a.indentLevel;e&&l(t)},newline:function(){l(a.indentLevel)},helper:e=>`_${e}`,needIndent:()=>a.needIndent}}(e,{mode:n,filename:r,sourceMap:!!t.sourceMap,breakLineCode:null!=t.breakLineCode?t.breakLineCode:"arrow"===n?";":"\n",needIndent:o});s.push("normal"===n?"function __msg__ (ctx) {":"(ctx) => {"),s.indent(o),a.length>0&&(s.push(`const { ${a.map((e=>`${e}: _${e}`)).join(", ")} } = ctx`),s.newline()),s.push("return "),W(s,e),s.deindent(o),s.push("}");const{code:l,map:c}=s.context();return{ast:e,code:l,map:c?c.toJSON():void 0}})(r,n)}const U=[];U[0]={w:[0],i:[3,0],"[":[4],o:[7]},U[1]={w:[1],".":[2],"[":[4],o:[7]},U[2]={w:[2],i:[3,0],0:[3,0]},U[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},U[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},U[5]={"'":[4,0],o:8,l:[5,0]},U[6]={'"':[4,0],o:8,l:[6,0]};const V=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function j(e){if(null==e)return"o";switch(e.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return e;case 95:case 36:case 45:return"i";case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"w"}return"i"}function G(e){const t=e.trim();return("0"!==e.charAt(0)||!isNaN(parseInt(e)))&&(V.test(t)?function(e){const t=e.charCodeAt(0);return t!==e.charCodeAt(e.length-1)||34!==t&&39!==t?e:e.slice(1,-1)}(t):"*"+t)}const H=new Map;function B(e,t){return g(e)?e[t]:null}const J=e=>e,z=e=>"",Y=e=>0===e.length?"":e.join(""),X=e=>null==e?"":p(e)||v(e)&&e.toString===b?JSON.stringify(e,null,2):String(e);function K(e,t){return e=Math.abs(e),2===t?e?e>1?1:0:1:e?Math.min(e,2):0}function q(e={}){const t=e.locale,n=function(e){const t=a(e.pluralIndex)?e.pluralIndex:-1;return e.named&&(a(e.named.count)||a(e.named.n))?a(e.named.count)?e.named.count:a(e.named.n)?e.named.n:t:t}(e),r=g(e.pluralRules)&&d(t)&&_(e.pluralRules[t])?e.pluralRules[t]:K,o=g(e.pluralRules)&&d(t)&&_(e.pluralRules[t])?K:void 0,s=e.list||[],l=e.named||{};a(e.pluralIndex)&&function(e,t){t.count||(t.count=e),t.n||(t.n=e)}(n,l);function c(t){const n=_(e.messages)?e.messages(t):!!g(e.messages)&&e.messages[t];return n||(e.parent?e.parent.message(t):z)}const i=v(e.processor)&&_(e.processor.normalize)?e.processor.normalize:Y,u=v(e.processor)&&_(e.processor.interpolate)?e.processor.interpolate:X,f={list:e=>s[e],named:e=>l[e],plural:e=>e[r(n,e.length,o)],linked:(t,n)=>{const r=c(t)(f);return d(n)?(o=n,e.modifiers?e.modifiers[o]:J)(r):r;var o},message:c,type:v(e.processor)&&d(e.processor.type)?e.processor.type:"text",interpolate:u,normalize:i};return f}function Q(e,t,n){return[...new Set([n,...p(t)?t:g(t)?Object.keys(t):d(t)?[t]:[n]])]}function Z(e,t,n){const r=d(n)?n:re,o=e;o.__localeChainCache||(o.__localeChainCache=new Map);let a=o.__localeChainCache.get(r);if(!a){a=[];let e=[n];for(;p(e);)e=ee(a,e,t);const s=p(t)||!v(t)?t:t.default?t.default:null;e=d(s)?[s]:s,p(e)&&ee(a,e,!1),o.__localeChainCache.set(r,a)}return a}function ee(e,t,n){let r=!0;for(let o=0;o<t.length&&h(r);o++){d(t[o])&&(r=te(e,t[o],n))}return r}function te(e,t,n){let r;const o=t.split("-");do{r=ne(e,o.join("-"),n),o.splice(-1,1)}while(o.length&&!0===r);return r}function ne(e,t,n){let r=!1;if(!e.includes(t)&&(r=!0,t)){r="!"!==t[t.length-1];const o=t.replace(/!/g,"");e.push(o),(p(n)||v(n))&&n[o]&&(r=n[o])}return r}const re="en-US";let oe,ae,se;let le=0;function ce(e={}){const t=d(e.version)?e.version:"9.2.0-beta.8",n=d(e.locale)?e.locale:re,r=p(e.fallbackLocale)||v(e.fallbackLocale)||d(e.fallbackLocale)||!1===e.fallbackLocale?e.fallbackLocale:n,o=v(e.messages)?e.messages:{[n]:{}},a=v(e.datetimeFormats)?e.datetimeFormats:{[n]:{}},l=v(e.numberFormats)?e.numberFormats:{[n]:{}},u=i({},e.modifiers||{},{upper:e=>d(e)?e.toUpperCase():e,lower:e=>d(e)?e.toLowerCase():e,capitalize:e=>d(e)?`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`:e}),f=e.pluralRules||{},m=_(e.missing)?e.missing:null,b=!h(e.missingWarn)&&!s(e.missingWarn)||e.missingWarn,k=!h(e.fallbackWarn)&&!s(e.fallbackWarn)||e.fallbackWarn,L=!!e.fallbackFormat,y=!!e.unresolving,T=_(e.postTranslation)?e.postTranslation:null,E=v(e.processor)?e.processor:null,N=!h(e.warnHtmlMessage)||e.warnHtmlMessage,I=!!e.escapeParameter,C=_(e.messageCompiler)?e.messageCompiler:oe,O=_(e.messageResolver)?e.messageResolver:ae||B,F=_(e.localeFallbacker)?e.localeFallbacker:se||Q,P=_(e.onWarn)?e.onWarn:c,w=e,R=g(w.__datetimeFormatters)?w.__datetimeFormatters:new Map,A=g(w.__numberFormatters)?w.__numberFormatters:new Map,x=g(w.__meta)?w.__meta:{};le++;const $={version:t,cid:le,locale:n,fallbackLocale:r,messages:o,modifiers:u,pluralRules:f,missing:m,missingWarn:b,fallbackWarn:k,fallbackFormat:L,unresolving:y,postTranslation:T,processor:E,warnHtmlMessage:N,escapeParameter:I,messageCompiler:C,messageResolver:O,localeFallbacker:F,onWarn:P,__meta:x};return $.datetimeFormats=a,$.numberFormats=l,$.__datetimeFormatters=R,$.__numberFormatters=A,$}function ie(e,t,n,r,o){const{missing:a}=e;if(null!==a){const r=a(e,n,t,o);return d(r)?r:t}return t}function ue(e,t,n){e.__localeChainCache=new Map,e.localeFallbacker(e,n,t)}const fe=e=>e;let me=Object.create(null);let pe=L;const _e=()=>pe++,de={INVALID_ARGUMENT:pe,INVALID_DATE_ARGUMENT:_e(),INVALID_ISO_DATE_ARGUMENT:_e(),__EXTEND_POINT__:_e()},he=()=>"",ge=e=>_(e);function be(e,...t){const{fallbackFormat:n,postTranslation:r,unresolving:o,fallbackLocale:s,messages:l}=e,[c,i]=ve(...t),f=(h(i.missingWarn),h(i.fallbackWarn),h(i.escapeParameter)?i.escapeParameter:e.escapeParameter),m=!!i.resolvedMessage,b=d(i.default)||h(i.default)?h(i.default)?c:i.default:n?c:"",k=n||""!==b,v=d(i.locale)?i.locale:e.locale;f&&function(e){p(e.list)?e.list=e.list.map((e=>d(e)?u(e):e)):g(e.named)&&Object.keys(e.named).forEach((t=>{d(e.named[t])&&(e.named[t]=u(e.named[t]))}))}(i);let[L,y,T]=m?[c,v,l[v]||{}]:function(e,t,n,r,o,a){const{messages:s,messageResolver:l,localeFallbacker:c}=e,i=c(e,r,n);let u,f={},m=null;const p="translate";for(let n=0;n<i.length&&(u=i[n],f=s[u]||{},null===(m=l(f,t))&&(m=f[t]),!d(m)&&!_(m));n++){const n=ie(e,t,u,0,p);n!==t&&(m=n)}return[m,u,f]}(e,c,v,s),E=c;if(m||d(L)||ge(L)||k&&(L=b,E=L),!(m||(d(L)||ge(L))&&d(y)))return o?-1:c;let N=!1;const I=ge(L)?L:ke(e,c,y,L,E,(()=>{N=!0}));if(N)return L;const C=function(e,t,n){return t(n)}(0,I,q(function(e,t,n,r){const{modifiers:o,pluralRules:s,messageResolver:l}=e,c={locale:t,modifiers:o,pluralRules:s,messages:r=>{const o=l(n,r);if(d(o)){let n=!1;const a=ke(e,r,t,o,r,(()=>{n=!0}));return n?he:a}return ge(o)?o:he}};e.processor&&(c.processor=e.processor);r.list&&(c.list=r.list);r.named&&(c.named=r.named);a(r.plural)&&(c.pluralIndex=r.plural);return c}(e,y,T,i)));return r?r(C):C}function ke(e,t,n,r,a,s){const{messageCompiler:l,warnHtmlMessage:c}=e;if(ge(r)){const e=r;return e.locale=e.locale||n,e.key=e.key||t,e}const i=l(r,function(e,t,n,r,a,s){return{warnHtmlMessage:a,onError:e=>{throw s&&s(e),e},onCacheKey:e=>((e,t,n)=>o({l:e,k:t,s:n}))(t,n,e)}}(0,n,a,0,c,s));return i.locale=n,i.key=t,i.source=r,i}function ve(...e){const[t,n,r]=e,o={};if(!d(t)&&!a(t)&&!ge(t))throw Error(de.INVALID_ARGUMENT);const s=a(t)?String(t):(ge(t),t);return a(n)?o.plural=n:d(n)?o.default=n:v(n)&&!l(n)?o.named=n:p(n)&&(o.list=n),a(r)?o.plural=r:d(r)?o.default=r:v(r)&&i(o,r),[s,o]}function Le(e,...t){const{datetimeFormats:n,unresolving:r,fallbackLocale:o,localeFallbacker:a}=e,{__datetimeFormatters:s}=e,[c,u,f,m]=ye(...t);h(f.missingWarn);h(f.fallbackWarn);const p=!!f.part,_=d(f.locale)?f.locale:e.locale,g=a(e,o,_);if(!d(c)||""===c)return new Intl.DateTimeFormat(_).format(u);let b,k={},L=null;for(let t=0;t<g.length&&(b=g[t],k=n[b]||{},L=k[c],!v(L));t++)ie(e,c,b,0,"datetime format");if(!v(L)||!d(b))return r?-1:c;let y=`${b}__${c}`;l(m)||(y=`${y}__${JSON.stringify(m)}`);let T=s.get(y);return T||(T=new Intl.DateTimeFormat(b,i({},L,m)),s.set(y,T)),p?T.formatToParts(u):T.format(u)}function ye(...e){const[t,n,r,o]=e;let s,l={},c={};if(d(t)){const e=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!e)throw Error(de.INVALID_ISO_DATE_ARGUMENT);const n=e[3]?e[3].trim().startsWith("T")?`${e[1].trim()}${e[3].trim()}`:`${e[1].trim()}T${e[3].trim()}`:e[1].trim();s=new Date(n);try{s.toISOString()}catch(e){throw Error(de.INVALID_ISO_DATE_ARGUMENT)}}else if("[object Date]"===k(t)){if(isNaN(t.getTime()))throw Error(de.INVALID_DATE_ARGUMENT);s=t}else{if(!a(t))throw Error(de.INVALID_ARGUMENT);s=t}return d(n)?l.key=n:v(n)&&(l=n),d(r)?l.locale=r:v(r)&&(c=r),v(o)&&(c=o),[l.key||"",s,l,c]}function Te(e,t,n){const r=e;for(const e in n){const n=`${t}__${e}`;r.__datetimeFormatters.has(n)&&r.__datetimeFormatters.delete(n)}}function Ee(e,...t){const{numberFormats:n,unresolving:r,fallbackLocale:o,localeFallbacker:a}=e,{__numberFormatters:s}=e,[c,u,f,m]=Ne(...t);h(f.missingWarn);h(f.fallbackWarn);const p=!!f.part,_=d(f.locale)?f.locale:e.locale,g=a(e,o,_);if(!d(c)||""===c)return new Intl.NumberFormat(_).format(u);let b,k={},L=null;for(let t=0;t<g.length&&(b=g[t],k=n[b]||{},L=k[c],!v(L));t++)ie(e,c,b,0,"number format");if(!v(L)||!d(b))return r?-1:c;let y=`${b}__${c}`;l(m)||(y=`${y}__${JSON.stringify(m)}`);let T=s.get(y);return T||(T=new Intl.NumberFormat(b,i({},L,m)),s.set(y,T)),p?T.formatToParts(u):T.format(u)}function Ne(...e){const[t,n,r,o]=e;let s={},l={};if(!a(t))throw Error(de.INVALID_ARGUMENT);const c=t;return d(n)?s.key=n:v(n)&&(s=n),d(r)?s.locale=r:v(r)&&(l=r),v(o)&&(l=o),[s.key||"",c,s,l]}function Ie(e,t,n){const r=e;for(const e in n){const n=`${t}__${e}`;r.__numberFormatters.has(n)&&r.__numberFormatters.delete(n)}}const Ce="9.2.0-beta.8";let Oe=L;const Fe=()=>Oe++,Pe={UNEXPECTED_RETURN_TYPE:Oe,INVALID_ARGUMENT:Fe(),MUST_BE_CALL_SETUP_TOP:Fe(),NOT_INSLALLED:Fe(),NOT_AVAILABLE_IN_LEGACY_MODE:Fe(),REQUIRED_VALUE:Fe(),INVALID_VALUE:Fe(),CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:Fe(),NOT_INSLALLED_WITH_PROVIDE:Fe(),UNEXPECTED_ERROR:Fe(),NOT_COMPATIBLE_LEGACY_VUE_I18N:Fe(),BRIDGE_SUPPORT_VUE_2_ONLY:Fe(),__EXTEND_POINT__:Fe()},we=r("__setPluralRules"),Re=r("__legacyVueI18n");function Ae(e){return null!=e&&null!=e.version&&(Number(e.version.split(".")[0])||-1)>=8}function xe(e){if(!g(e))return e;for(const t in e)if(m(e,t))if(t.includes(".")){const n=t.split("."),r=n.length-1;let o=e;for(let e=0;e<r;e++)n[e]in o||(o[n[e]]={}),o=o[n[e]];o[n[r]]=e[t],delete e[t],g(o[n[r]])&&xe(o[n[r]])}else g(e[t])&&xe(e[t]);return e}function $e(e,t){const{messages:n,__i18n:r,messageResolver:o,flatJson:a}=t,s=v(n)?n:p(r)?{}:{[e]:{}};if(p(r)&&r.forEach((e=>{if("locale"in e&&"resource"in e){const{locale:t,resource:n}=e;t?(s[t]=s[t]||{},De(n,s[t])):De(n,s)}else d(e)&&De(JSON.parse(e),s)})),null==o&&a)for(const e in s)m(s,e)&&xe(s[e]);return s}const Me=e=>!g(e)||p(e);function De(e,t){if(Me(e)||Me(t))throw Error(Pe.INVALID_VALUE);for(const n in e)m(e,n)&&(Me(e[n])||Me(t[n])?t[n]=e[n]:De(e[n],t[n]))}let We=0;function Se(e){return(n,r,o,a)=>e(r,o,t.getCurrentInstance()||void 0,a)}function Ue(e={},n){const{__root:r}=e,o=void 0===r;let l=!h(e.inheritLocale)||e.inheritLocale;const c=t.ref(r&&l?r.locale.value:d(e.locale)?e.locale:re),u=t.ref(r&&l?r.fallbackLocale.value:d(e.fallbackLocale)||p(e.fallbackLocale)||v(e.fallbackLocale)||!1===e.fallbackLocale?e.fallbackLocale:c.value),f=t.ref($e(c.value,e)),m=t.ref(v(e.datetimeFormats)?e.datetimeFormats:{[c.value]:{}}),b=t.ref(v(e.numberFormats)?e.numberFormats:{[c.value]:{}});let k=r?r.missingWarn:!h(e.missingWarn)&&!s(e.missingWarn)||e.missingWarn,L=r?r.fallbackWarn:!h(e.fallbackWarn)&&!s(e.fallbackWarn)||e.fallbackWarn,y=r?r.fallbackRoot:!h(e.fallbackRoot)||e.fallbackRoot,T=!!e.fallbackFormat,E=_(e.missing)?e.missing:null,N=_(e.missing)?Se(e.missing):null,I=_(e.postTranslation)?e.postTranslation:null,C=!h(e.warnHtmlMessage)||e.warnHtmlMessage,O=!!e.escapeParameter;const F=r?r.modifiers:v(e.modifiers)?e.modifiers:{};let P,w,R=e.pluralRules||r&&r.pluralRules;{Ae(n);const e={locale:c.value,fallbackLocale:u.value,messages:f.value,dateTimeFormats:m.value,numberFormats:b.value,modifiers:F,missing:E,fallbackRoot:y,postTranslation:I,pluralizationRules:R,escapeParameterHtml:O,sync:l,silentFallbackWarn:h(L)?!L:L,silentTranslationWarn:h(k)?!k:k,formatFallbackMessages:h(T)?!T:T,warnHtmlInMessage:h(C)&&C?"warn":"off"};P=new n(e)}w=function(){const t={version:Ce,locale:c.value,fallbackLocale:u.value,messages:f.value,modifiers:F,pluralRules:R,missing:null===N?void 0:N,missingWarn:k,fallbackWarn:L,fallbackFormat:T,unresolving:!0,postTranslation:null===I?void 0:I,warnHtmlMessage:C,escapeParameter:O,messageResolver:e.messageResolver,__meta:{framework:"vue"}};return t.datetimeFormats=m.value,t.numberFormats=b.value,t.__datetimeFormatters=v(w)?w.__datetimeFormatters:void 0,t.__numberFormatters=v(w)?w.__numberFormatters:void 0,ce(t)}(),ue(w,c.value,u.value);const A=t.computed({get:()=>c.value,set:e=>{c.value=e,P&&(P.locale=e),w.locale=c.value}}),x=t.computed({get:()=>u.value,set:e=>{u.value=e,P&&(P.fallbackLocale=e),w.fallbackLocale=u.value,ue(w,c.value,e)}}),$=t.computed((()=>f.value)),M=t.computed((()=>m.value)),D=t.computed((()=>b.value));function W(e,t,n,o,s,l){let c;if(c=e(w),a(c)&&-1===c){const[e,n]=t();return r&&y?o(r):s(e)}if(l(c))return c;throw Error(Pe.UNEXPECTED_RETURN_TYPE)}function S(...e){return W((t=>Reflect.apply(be,null,[t,...e])),(()=>ve(...e)),0,(t=>Reflect.apply(t.t,t,[...e])),(e=>e),(e=>d(e)))}function U(e){return f.value[e]||{}}We++,r&&(t.watch(r.locale,(e=>{l&&(c.value=e,P&&(P.locale=e),w.locale=e,ue(w,c.value,u.value))})),t.watch(r.fallbackLocale,(e=>{l&&(u.value=e,P&&(P.fallbackLocale=e),w.fallbackLocale=e,ue(w,c.value,u.value))})));const V={id:We,locale:A,fallbackLocale:x,get inheritLocale(){return l},set inheritLocale(e){l=e,P&&(P._sync=e),e&&r&&(c.value=r.locale.value,u.value=r.fallbackLocale.value,P&&(P.locale=r.locale.value,P.fallbackLocale=r.fallbackLocale.value),ue(w,c.value,u.value))},get availableLocales(){return Object.keys(f.value).sort()},messages:$,get modifiers(){return F},get pluralRules(){return R||{}},get isGlobal(){return o},get missingWarn(){return k},set missingWarn(e){k=e,w.missingWarn=k},get fallbackWarn(){return L},set fallbackWarn(e){L=e,w.fallbackWarn=L},get fallbackRoot(){return y},set fallbackRoot(e){y=e},get fallbackFormat(){return T},set fallbackFormat(e){T=e,w.fallbackFormat=T},get warnHtmlMessage(){return C},set warnHtmlMessage(e){C=e,w.warnHtmlMessage=e},get escapeParameter(){return O},set escapeParameter(e){O=e,w.escapeParameter=e},t:S,getLocaleMessage:U,setLocaleMessage:function(e,t){f.value[e]=t,P&&P.setLocaleMessage(e,t),w.messages=f.value},mergeLocaleMessage:function(e,t){f.value[e]=f.value[e]||{},P&&P.mergeLocaleMessage(e,t),De(t,f.value[e]),w.messages=f.value},getPostTranslationHandler:function(){return _(I)?I:null},setPostTranslationHandler:function(e){I=e,w.postTranslation=e},getMissingHandler:function(){return E},setMissingHandler:function(e){null!==e&&(N=Se(e)),E=e,w.missing=N},[we]:function(e){R=e,w.pluralRules=R}};return V.datetimeFormats=M,V.numberFormats=D,V.rt=function(...e){const[t,n,r]=e;if(r&&!g(r))throw Error(Pe.INVALID_ARGUMENT);return S(t,n,i({resolvedMessage:!0},r||{}))},V.te=function(e,t){const n=U(d(t)?t:c.value);return null!==w.messageResolver(n,e)},V.tm=function(e){const t=function(e){let t=null;const n=Z(w,u.value,c.value);for(let r=0;r<n.length;r++){const o=w.messageResolver(f.value[n[r]]||{},e);if(null!=o){t=o;break}}return t}(e);return null!=t?t:r&&r.tm(e)||{}},V.d=function(...e){return W((t=>Reflect.apply(Le,null,[t,...e])),(()=>ye(...e)),0,(t=>Reflect.apply(t.d,t,[...e])),(()=>""),(e=>d(e)))},V.n=function(...e){return W((t=>Reflect.apply(Ee,null,[t,...e])),(()=>Ne(...e)),0,(t=>Reflect.apply(t.n,t,[...e])),(()=>""),(e=>d(e)))},V.getDateTimeFormat=function(e){return m.value[e]||{}},V.setDateTimeFormat=function(e,t){m.value[e]=t,P&&P.setDateTimeFormat(e,t),w.datetimeFormats=m.value,Te(w,e,t)},V.mergeDateTimeFormat=function(e,t){m.value[e]=i(m.value[e]||{},t),P&&P.mergeDateTimeFormat(e,t),w.datetimeFormats=m.value,Te(w,e,t)},V.getNumberFormat=function(e){return b.value[e]||{}},V.setNumberFormat=function(e,t){b.value[e]=t,P&&P.setNumberFormat(e,t),w.numberFormats=b.value,Ie(w,e,t)},V.mergeNumberFormat=function(e,t){b.value[e]=i(b.value[e]||{},t),P&&P.mergeNumberFormat(e,t),w.numberFormats=b.value,Ie(w,e,t)},V[Re]=P,V}let Ve=null,je=null;return oe=function(e,t={}){{const n=(t.onCacheKey||fe)(e),r=me[n];if(r)return r;let o=!1;const a=t.onError||y;t.onError=e=>{o=!0,a(e)};const{code:s}=S(e,t),l=new Function(`return ${s}`)();return o?l:me[n]=l}},ae=function(e,t){if(!g(e))return null;let n=H.get(t);if(n||(n=function(e){const t=[];let n,r,o,a,s,l,c,i=-1,u=0,f=0;const m=[];function p(){const t=e[i+1];if(5===u&&"'"===t||6===u&&'"'===t)return i++,o="\\"+t,m[0](),!0}for(m[0]=()=>{void 0===r?r=o:r+=o},m[1]=()=>{void 0!==r&&(t.push(r),r=void 0)},m[2]=()=>{m[0](),f++},m[3]=()=>{if(f>0)f--,u=4,m[0]();else{if(f=0,void 0===r)return!1;if(r=G(r),!1===r)return!1;m[1]()}};null!==u;)if(i++,n=e[i],"\\"!==n||!p()){if(a=j(n),c=U[u],s=c[a]||c.l||8,8===s)return;if(u=s[0],void 0!==s[1]&&(l=m[s[1]],l&&(o=n,!1===l())))return;if(7===u)return t}}(t),n&&H.set(t,n)),!n)return null;const r=n.length;let o=e,a=0;for(;a<r;){const e=o[n[a]];if(void 0===e)return null;o=e,a++}return o},se=Z,e.I18nInjectionKey=r("global-vue-i18n"),e.VERSION=Ce,e.castToVueI18n=e=>{if(!Ae(e))throw Error(Pe.NOT_COMPATIBLE_LEGACY_VUE_I18N);return e},e.createI18n=function(e={},t){if(je)return je;Ve=t;const n=!h(e.legacy)||e.legacy,o=new Map,a=function(e,t,n){if(!Ae(n))throw Error(Pe.NOT_COMPATIBLE_LEGACY_VUE_I18N);return Ue(e,n)}(e,0,t);r("");{const e=a[Re];Object.defineProperty(e,"global",{get:()=>a}),Object.defineProperty(e,"mode",{get:()=>n?"legacy":"composition"}),Object.defineProperty(e,"__instances",{get:()=>o}),Object.defineProperty(e,"install",{value:t=>{if(2!==(t&&t.version&&Number(t.version.split(".")[0])||-1))throw Error(Pe.BRIDGE_SUPPORT_VUE_2_ONLY);t.mixin(function(e,t){return{beforeCreate(){const n=this.$options;if(!n.__VUE18N__INSTANCE__)if(n.i18n=n.i18n||(n.__i18n?{}:null),this._i18nBridgeRoot=e,"composition"!==e.mode)if(n.i18n){if(n.i18n instanceof t){if(n.__i18n)try{const e=n.i18n&&n.i18n.messages?n.i18n.messages:{};n.__i18n.forEach((t=>De(e,JSON.parse(t)))),Object.keys(e).forEach((t=>{n.i18n.mergeLocaleMessage(t,e[t])}))}catch(e){}this._i18n=n.i18n,this._i18nWatcher=this._i18n.watchI18nData()}else if(v(n.i18n)){const e=this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof t?this.$root.$i18n:null;if(e&&(n.i18n.root=this.$root,n.i18n.formatter=e.formatter,n.i18n.fallbackLocale=e.fallbackLocale,n.i18n.formatFallbackMessages=e.formatFallbackMessages,n.i18n.silentTranslationWarn=e.silentTranslationWarn,n.i18n.silentFallbackWarn=e.silentFallbackWarn,n.i18n.pluralizationRules=e.pluralizationRules,n.i18n.preserveDirectiveContent=e.preserveDirectiveContent),n.__i18n)try{const e=n.i18n&&n.i18n.messages?n.i18n.messages:{};n.__i18n.forEach((t=>De(e,JSON.parse(t)))),n.i18n.messages=e}catch(e){}const{sharedMessages:r}=n.i18n;r&&v(r)&&De(n.i18n.messages,r),this._i18n=new t(n.i18n),this._i18nWatcher=this._i18n.watchI18nData(),(void 0===n.i18n.sync||n.i18n.sync)&&(this._localeWatcher=this.$i18n.watchLocale()),e&&e.onComponentInstanceCreated(this._i18n)}}else this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof t?this._i18n=this.$root.$i18n:n.parent&&n.parent.$i18n&&n.parent.$i18n instanceof t&&(this._i18n=n.parent.$i18n);else this._i18n=e},beforeMount(){const e=this.$options;e.__VUE18N__INSTANCE__||(e.i18n=e.i18n||(e.__i18n?{}:null),e.i18n?(e.i18n instanceof t||v(e.i18n))&&(this._i18n.subscribeDataChanging(this),this._subscribing=!0):(this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof t||e.parent&&e.parent.$i18n&&e.parent.$i18n instanceof t)&&(this._i18n.subscribeDataChanging(this),this._subscribing=!0))},beforeDestroy(){if(this.$options.__VUE18N__INSTANCE__)return;if(this._i18nBridgeRoot)return void delete this._i18nBridgeRoot;if("composition"===e.mode)return void delete this._i18n;if(!this._i18n)return;const t=this;this.$nextTick((()=>{t._subscribing&&(t._i18n.unsubscribeDataChanging(t),delete t._subscribing),t._i18nWatcher&&(t._i18nWatcher(),t._i18n.destroyVM(),delete t._i18nWatcher),t._localeWatcher&&(t._localeWatcher(),delete t._localeWatcher)}))}}}(e,Ve))}});const t={__getInstance:function(e){return o.get(e)||null},__setInstance:function(e,t){o.set(e,t)},__deleteInstance:function(e){o.delete(e)}};return Object.keys(t).forEach((n=>Object.defineProperty(e,n,{value:t[n]}))),je=e,e}},e.useI18n=function(e={}){const n=t.getCurrentInstance();if(null==n)throw Error(Pe.MUST_BE_CALL_SETUP_TOP);if(null==Ve||null==je)throw Error(Pe.NOT_INSLALLED);const r=function(e){{const t=e.proxy;if(null==t)throw Error(Pe.UNEXPECTED_ERROR);const n=t._i18nBridgeRoot;if(!n)throw Error(Pe.NOT_INSLALLED);return n}}(n),o=function(e){return e.global}(r),a=function(e){return e.proxy.$options}(n),s=function(e,t){return l(e)?"__i18n"in t?"local":"global":e.useScope?e.useScope:"local"}(e,a);if("global"===s)return function(e,t,n){let r=g(t.messages)?t.messages:{};"__i18nGlobal"in n&&(r=$e(e.locale.value,{messages:r,__i18n:n.__i18nGlobal}));const o=Object.keys(r);o.length&&o.forEach((t=>{e.mergeLocaleMessage(t,r[t])}));if(g(t.datetimeFormats)){const n=Object.keys(t.datetimeFormats);n.length&&n.forEach((n=>{e.mergeDateTimeFormat(n,t.datetimeFormats[n])}))}if(g(t.numberFormats)){const n=Object.keys(t.numberFormats);n.length&&n.forEach((n=>{e.mergeNumberFormat(n,t.numberFormats[n])}))}}(o,e,a),o;if("parent"===s){let e=function(e,t){let n=null;const r=t.root;let o=t.parent;for(;null!=o;){const t=e;if("composition"===e.mode)n=t.__getInstance(o);else{const e=t.__getInstance(o);null!=e&&(n=e.__composer)}if(null!=n)break;if(r===o)break;o=o.parent}return n}(r,n);return null==e&&(e=o),e}if("legacy"===r.mode)throw Error(Pe.NOT_AVAILABLE_IN_LEGACY_MODE);const c=r;let u=c.__getInstance(n);if(null==u){const r=i({},e);"__i18n"in a&&(r.__i18n=a.__i18n),o&&(r.__root=o),u=Ue(r,Ve),function(e,n,r){{const o=n.proxy;if(null==o)throw Error(Pe.UNEXPECTED_ERROR);const a=r[Re];if(a===e)throw Error(Pe.UNEXPECTED_ERROR);o._i18n=a,o._i18n_bridge=!0,o._i18nWatcher=o._i18n.watchI18nData(),o._i18n._sync&&(o._localeWatcher=o._i18n.watchLocale());let s=!1;t.onBeforeMount((()=>{o._i18n.subscribeDataChanging(o),s=!0}),n),t.onUnmounted((()=>{s&&(o._i18n.unsubscribeDataChanging(o),s=!1),o._i18nWatcher&&(o._i18nWatcher(),o._i18n.destroyVM(),delete o._i18nWatcher),o._localeWatcher&&(o._localeWatcher(),delete o._localeWatcher),delete o._i18n_bridge,delete o._i18n}),n)}}(c,n,u),c.__setInstance(n,u)}return u},Object.defineProperty(e,"__esModule",{value:!0}),e}({},VueCompositionAPI); |
/*! | ||
* vue-i18n-bridge v9.2.0-beta.7 | ||
* vue-i18n-bridge v9.2.0-beta.8 | ||
* (c) 2021 kazuya kawaguchi | ||
* Released under the MIT License. | ||
*/ | ||
import{ref as e,getCurrentInstance as t,computed as n,watch as a,onBeforeMount as r,onUnmounted as l}from"@vue/composition-api";const o="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,s=e=>o?Symbol(e):e,i=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),c=e=>"number"==typeof e&&isFinite(e),u=e=>"[object RegExp]"===N(e),m=e=>T(e)&&0===Object.keys(e).length;function f(e,t){"undefined"!=typeof console&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}const _=Object.assign;function g(e){return e.replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}const b=Object.prototype.hasOwnProperty;function p(e,t){return b.call(e,t)}const h=Array.isArray,d=e=>"function"==typeof e,v=e=>"string"==typeof e,E=e=>"boolean"==typeof e,k=e=>null!==e&&"object"==typeof e,L=Object.prototype.toString,N=e=>L.call(e),T=e=>"[object Object]"===N(e),F=15,R=[];R[0]={w:[0],i:[3,0],"[":[4],o:[7]},R[1]={w:[1],".":[2],"[":[4],o:[7]},R[2]={w:[2],i:[3,0],0:[3,0]},R[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},R[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},R[5]={"'":[4,0],o:8,l:[5,0]},R[6]={'"':[4,0],o:8,l:[6,0]};const I=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function y(e){if(null==e)return"o";switch(e.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return e;case 95:case 36:case 45:return"i";case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"w"}return"i"}function w(e){const t=e.trim();return("0"!==e.charAt(0)||!isNaN(parseInt(e)))&&(I.test(t)?function(e){const t=e.charCodeAt(0);return t!==e.charCodeAt(e.length-1)||34!==t&&39!==t?e:e.slice(1,-1)}(t):"*"+t)}const A=new Map;function D(e,t){return k(e)?e[t]:null}const O=e=>e,W=e=>"",M=e=>0===e.length?"":e.join(""),$=e=>null==e?"":h(e)||T(e)&&e.toString===L?JSON.stringify(e,null,2):String(e);function C(e,t){return e=Math.abs(e),2===t?e?e>1?1:0:1:e?Math.min(e,2):0}function P(e={}){const t=e.locale,n=function(e){const t=c(e.pluralIndex)?e.pluralIndex:-1;return e.named&&(c(e.named.count)||c(e.named.n))?c(e.named.count)?e.named.count:c(e.named.n)?e.named.n:t:t}(e),a=k(e.pluralRules)&&v(t)&&d(e.pluralRules[t])?e.pluralRules[t]:C,r=k(e.pluralRules)&&v(t)&&d(e.pluralRules[t])?C:void 0,l=e.list||[],o=e.named||{};c(e.pluralIndex)&&function(e,t){t.count||(t.count=e),t.n||(t.n=e)}(n,o);function s(t){const n=d(e.messages)?e.messages(t):!!k(e.messages)&&e.messages[t];return n||(e.parent?e.parent.message(t):W)}const i=T(e.processor)&&d(e.processor.normalize)?e.processor.normalize:M,u=T(e.processor)&&d(e.processor.interpolate)?e.processor.interpolate:$,m={list:e=>l[e],named:e=>o[e],plural:e=>e[a(n,e.length,r)],linked:(t,n)=>{const a=s(t)(m);return v(n)?(r=n,e.modifiers?e.modifiers[r]:O)(a):a;var r},message:s,type:T(e.processor)&&v(e.processor.type)?e.processor.type:"text",interpolate:u,normalize:i};return m}function U(e,t,n){return[...new Set([n,...h(t)?t:k(t)?Object.keys(t):v(t)?[t]:[n]])]}function S(e,t,n){const a=v(n)?n:H,r=e;r.__localeChainCache||(r.__localeChainCache=new Map);let l=r.__localeChainCache.get(a);if(!l){l=[];let e=[n];for(;h(e);)e=V(l,e,t);const o=h(t)||!T(t)?t:t.default?t.default:null;e=v(o)?[o]:o,h(e)&&V(l,e,!1),r.__localeChainCache.set(a,l)}return l}function V(e,t,n){let a=!0;for(let r=0;r<t.length&&E(a);r++){v(t[r])&&(a=j(e,t[r],n))}return a}function j(e,t,n){let a;const r=t.split("-");do{a=G(e,r.join("-"),n),r.splice(-1,1)}while(r.length&&!0===a);return a}function G(e,t,n){let a=!1;if(!e.includes(t)&&(a=!0,t)){a="!"!==t[t.length-1];const r=t.replace(/!/g,"");e.push(r),(h(n)||T(n))&&n[r]&&(a=n[r])}return a}const H="en-US";let x,B;let J=0;function X(e={}){const t=v(e.version)?e.version:"9.2.0-beta.7",n=v(e.locale)?e.locale:H,a=h(e.fallbackLocale)||T(e.fallbackLocale)||v(e.fallbackLocale)||!1===e.fallbackLocale?e.fallbackLocale:n,r=T(e.messages)?e.messages:{[n]:{}},l=T(e.datetimeFormats)?e.datetimeFormats:{[n]:{}},o=T(e.numberFormats)?e.numberFormats:{[n]:{}},s=_({},e.modifiers||{},{upper:e=>v(e)?e.toUpperCase():e,lower:e=>v(e)?e.toLowerCase():e,capitalize:e=>v(e)?`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`:e}),i=e.pluralRules||{},c=d(e.missing)?e.missing:null,m=!E(e.missingWarn)&&!u(e.missingWarn)||e.missingWarn,g=!E(e.fallbackWarn)&&!u(e.fallbackWarn)||e.fallbackWarn,b=!!e.fallbackFormat,p=!!e.unresolving,L=d(e.postTranslation)?e.postTranslation:null,N=T(e.processor)?e.processor:null,F=!E(e.warnHtmlMessage)||e.warnHtmlMessage,R=!!e.escapeParameter,I=d(e.messageCompiler)?e.messageCompiler:undefined,y=d(e.messageResolver)?e.messageResolver:x||D,w=d(e.localeFallbacker)?e.localeFallbacker:B||U,A=d(e.onWarn)?e.onWarn:f,O=e,W=k(O.__datetimeFormatters)?O.__datetimeFormatters:new Map,M=k(O.__numberFormatters)?O.__numberFormatters:new Map,$=k(O.__meta)?O.__meta:{};J++;const C={version:t,cid:J,locale:n,fallbackLocale:a,messages:r,modifiers:s,pluralRules:i,missing:c,missingWarn:m,fallbackWarn:g,fallbackFormat:b,unresolving:p,postTranslation:L,processor:N,warnHtmlMessage:F,escapeParameter:R,messageCompiler:I,messageResolver:y,localeFallbacker:w,onWarn:A,__meta:$};return C.datetimeFormats=l,C.numberFormats=o,C.__datetimeFormatters=W,C.__numberFormatters=M,C}function Y(e,t,n,a,r){const{missing:l}=e;if(null!==l){const a=l(e,n,t,r);return v(a)?a:t}return t}function z(e,t,n){e.__localeChainCache=new Map,e.localeFallbacker(e,n,t)}let q=F;const K=()=>q++,Q={INVALID_ARGUMENT:q,INVALID_DATE_ARGUMENT:K(),INVALID_ISO_DATE_ARGUMENT:K(),__EXTEND_POINT__:K()},Z=()=>"",ee=e=>d(e);function te(e,...t){const{fallbackFormat:n,postTranslation:a,unresolving:r,fallbackLocale:l,messages:o}=e,[s,i]=ae(...t),u=(E(i.missingWarn),E(i.fallbackWarn),E(i.escapeParameter)?i.escapeParameter:e.escapeParameter),m=!!i.resolvedMessage,f=v(i.default)||E(i.default)?E(i.default)?s:i.default:n?s:"",_=n||""!==f,b=v(i.locale)?i.locale:e.locale;u&&function(e){h(e.list)?e.list=e.list.map((e=>v(e)?g(e):e)):k(e.named)&&Object.keys(e.named).forEach((t=>{v(e.named[t])&&(e.named[t]=g(e.named[t]))}))}(i);let[p,L,N]=m?[s,b,o[b]||{}]:function(e,t,n,a,r,l){const{messages:o,messageResolver:s,localeFallbacker:i}=e,c=i(e,a,n);let u,m={},f=null;const _="translate";for(let n=0;n<c.length&&(u=c[n],m=o[u]||{},null===(f=s(m,t))&&(f=m[t]),!v(f)&&!d(f));n++){const n=Y(e,t,u,0,_);n!==t&&(f=n)}return[f,u,m]}(e,s,b,l),T=s;if(m||v(p)||ee(p)||_&&(p=f,T=p),!(m||(v(p)||ee(p))&&v(L)))return r?-1:s;let F=!1;const R=ee(p)?p:ne(e,s,L,p,T,(()=>{F=!0}));if(F)return p;const I=function(e,t,n){return t(n)}(0,R,P(function(e,t,n,a){const{modifiers:r,pluralRules:l,messageResolver:o}=e,s={locale:t,modifiers:r,pluralRules:l,messages:a=>{const r=o(n,a);if(v(r)){let n=!1;const l=ne(e,a,t,r,a,(()=>{n=!0}));return n?Z:l}return ee(r)?r:Z}};e.processor&&(s.processor=e.processor);a.list&&(s.list=a.list);a.named&&(s.named=a.named);c(a.plural)&&(s.pluralIndex=a.plural);return s}(e,L,N,i)));return a?a(I):I}function ne(e,t,n,a,r,l){const{messageCompiler:o,warnHtmlMessage:s}=e;if(ee(a)){const e=a;return e.locale=e.locale||n,e.key=e.key||t,e}const c=o(a,function(e,t,n,a,r,l){return{warnHtmlMessage:r,onError:e=>{throw l&&l(e),e},onCacheKey:e=>((e,t,n)=>i({l:e,k:t,s:n}))(t,n,e)}}(0,n,r,0,s,l));return c.locale=n,c.key=t,c.source=a,c}function ae(...e){const[t,n,a]=e,r={};if(!v(t)&&!c(t)&&!ee(t))throw Error(Q.INVALID_ARGUMENT);const l=c(t)?String(t):(ee(t),t);return c(n)?r.plural=n:v(n)?r.default=n:T(n)&&!m(n)?r.named=n:h(n)&&(r.list=n),c(a)?r.plural=a:v(a)?r.default=a:T(a)&&_(r,a),[l,r]}function re(e,...t){const{datetimeFormats:n,unresolving:a,fallbackLocale:r,localeFallbacker:l}=e,{__datetimeFormatters:o}=e,[s,i,c,u]=le(...t);E(c.missingWarn);E(c.fallbackWarn);const f=!!c.part,g=v(c.locale)?c.locale:e.locale,b=l(e,r,g);if(!v(s)||""===s)return new Intl.DateTimeFormat(g).format(i);let p,h={},d=null;for(let t=0;t<b.length&&(p=b[t],h=n[p]||{},d=h[s],!T(d));t++)Y(e,s,p,0,"datetime format");if(!T(d)||!v(p))return a?-1:s;let k=`${p}__${s}`;m(u)||(k=`${k}__${JSON.stringify(u)}`);let L=o.get(k);return L||(L=new Intl.DateTimeFormat(p,_({},d,u)),o.set(k,L)),f?L.formatToParts(i):L.format(i)}function le(...e){const[t,n,a,r]=e;let l,o={},s={};if(v(t)){const e=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!e)throw Error(Q.INVALID_ISO_DATE_ARGUMENT);const n=e[3]?e[3].trim().startsWith("T")?`${e[1].trim()}${e[3].trim()}`:`${e[1].trim()}T${e[3].trim()}`:e[1].trim();l=new Date(n);try{l.toISOString()}catch(e){throw Error(Q.INVALID_ISO_DATE_ARGUMENT)}}else if("[object Date]"===N(t)){if(isNaN(t.getTime()))throw Error(Q.INVALID_DATE_ARGUMENT);l=t}else{if(!c(t))throw Error(Q.INVALID_ARGUMENT);l=t}return v(n)?o.key=n:T(n)&&(o=n),v(a)?o.locale=a:T(a)&&(s=a),T(r)&&(s=r),[o.key||"",l,o,s]}function oe(e,t,n){const a=e;for(const e in n){const n=`${t}__${e}`;a.__datetimeFormatters.has(n)&&a.__datetimeFormatters.delete(n)}}function se(e,...t){const{numberFormats:n,unresolving:a,fallbackLocale:r,localeFallbacker:l}=e,{__numberFormatters:o}=e,[s,i,c,u]=ie(...t);E(c.missingWarn);E(c.fallbackWarn);const f=!!c.part,g=v(c.locale)?c.locale:e.locale,b=l(e,r,g);if(!v(s)||""===s)return new Intl.NumberFormat(g).format(i);let p,h={},d=null;for(let t=0;t<b.length&&(p=b[t],h=n[p]||{},d=h[s],!T(d));t++)Y(e,s,p,0,"number format");if(!T(d)||!v(p))return a?-1:s;let k=`${p}__${s}`;m(u)||(k=`${k}__${JSON.stringify(u)}`);let L=o.get(k);return L||(L=new Intl.NumberFormat(p,_({},d,u)),o.set(k,L)),f?L.formatToParts(i):L.format(i)}function ie(...e){const[t,n,a,r]=e;let l={},o={};if(!c(t))throw Error(Q.INVALID_ARGUMENT);const s=t;return v(n)?l.key=n:T(n)&&(l=n),v(a)?l.locale=a:T(a)&&(o=a),T(r)&&(o=r),[l.key||"",s,l,o]}function ce(e,t,n){const a=e;for(const e in n){const n=`${t}__${e}`;a.__numberFormatters.has(n)&&a.__numberFormatters.delete(n)}}const ue="9.2.0-beta.7";let me=F;const fe=()=>me++,_e={UNEXPECTED_RETURN_TYPE:me,INVALID_ARGUMENT:fe(),MUST_BE_CALL_SETUP_TOP:fe(),NOT_INSLALLED:fe(),NOT_AVAILABLE_IN_LEGACY_MODE:fe(),REQUIRED_VALUE:fe(),INVALID_VALUE:fe(),CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:fe(),NOT_INSLALLED_WITH_PROVIDE:fe(),UNEXPECTED_ERROR:fe(),NOT_COMPATIBLE_LEGACY_VUE_I18N:fe(),BRIDGE_SUPPORT_VUE_2_ONLY:fe(),__EXTEND_POINT__:fe()},ge=s("__setPluralRules"),be=s("__legacyVueI18n");function pe(e){return null!=e&&null!=e.version&&(Number(e.version.split(".")[0])||-1)>=8}function he(e){if(!k(e))return e;for(const t in e)if(p(e,t))if(t.includes(".")){const n=t.split("."),a=n.length-1;let r=e;for(let e=0;e<a;e++)n[e]in r||(r[n[e]]={}),r=r[n[e]];r[n[a]]=e[t],delete e[t],k(r[n[a]])&&he(r[n[a]])}else k(e[t])&&he(e[t]);return e}function de(e,t){const{messages:n,__i18n:a,messageResolver:r,flatJson:l}=t,o=T(n)?n:h(a)?{}:{[e]:{}};if(h(a)&&a.forEach((e=>{if("locale"in e&&"resource"in e){const{locale:t,resource:n}=e;t?(o[t]=o[t]||{},Ee(n,o[t])):Ee(n,o)}else v(e)&&Ee(JSON.parse(e),o)})),null==r&&l)for(const e in o)p(o,e)&&he(o[e]);return o}const ve=e=>!k(e)||h(e);function Ee(e,t){if(ve(e)||ve(t))throw Error(_e.INVALID_VALUE);for(const n in e)p(e,n)&&(ve(e[n])||ve(t[n])?t[n]=e[n]:Ee(e[n],t[n]))}let ke=0;function Le(e){return(n,a,r,l)=>e(a,r,t()||void 0,l)}function Ne(t={},r){const{__root:l}=t,o=void 0===l;let s=!E(t.inheritLocale)||t.inheritLocale;const i=e(l&&s?l.locale.value:v(t.locale)?t.locale:H),m=e(l&&s?l.fallbackLocale.value:v(t.fallbackLocale)||h(t.fallbackLocale)||T(t.fallbackLocale)||!1===t.fallbackLocale?t.fallbackLocale:i.value),f=e(de(i.value,t)),g=e(T(t.datetimeFormats)?t.datetimeFormats:{[i.value]:{}}),b=e(T(t.numberFormats)?t.numberFormats:{[i.value]:{}});let p=l?l.missingWarn:!E(t.missingWarn)&&!u(t.missingWarn)||t.missingWarn,L=l?l.fallbackWarn:!E(t.fallbackWarn)&&!u(t.fallbackWarn)||t.fallbackWarn,N=l?l.fallbackRoot:!E(t.fallbackRoot)||t.fallbackRoot,F=!!t.fallbackFormat,R=d(t.missing)?t.missing:null,I=d(t.missing)?Le(t.missing):null,y=d(t.postTranslation)?t.postTranslation:null,w=!E(t.warnHtmlMessage)||t.warnHtmlMessage,A=!!t.escapeParameter;const D=l?l.modifiers:T(t.modifiers)?t.modifiers:{};let O,W,M=t.pluralRules||l&&l.pluralRules;{pe(r);const e={locale:i.value,fallbackLocale:m.value,messages:f.value,dateTimeFormats:g.value,numberFormats:b.value,modifiers:D,missing:R,fallbackRoot:N,postTranslation:y,pluralizationRules:M,escapeParameterHtml:A,sync:s,silentFallbackWarn:E(L)?!L:L,silentTranslationWarn:E(p)?!p:p,formatFallbackMessages:E(F)?!F:F,warnHtmlInMessage:E(w)&&w?"warn":"off"};O=new r(e)}W=function(){const e={version:"9.2.0-beta.7",locale:i.value,fallbackLocale:m.value,messages:f.value,modifiers:D,pluralRules:M,missing:null===I?void 0:I,missingWarn:p,fallbackWarn:L,fallbackFormat:F,unresolving:!0,postTranslation:null===y?void 0:y,warnHtmlMessage:w,escapeParameter:A,messageResolver:t.messageResolver,__meta:{framework:"vue"}};return e.datetimeFormats=g.value,e.numberFormats=b.value,e.__datetimeFormatters=T(W)?W.__datetimeFormatters:void 0,e.__numberFormatters=T(W)?W.__numberFormatters:void 0,X(e)}(),z(W,i.value,m.value);const $=n({get:()=>i.value,set:e=>{i.value=e,O&&(O.locale=e),W.locale=i.value}}),C=n({get:()=>m.value,set:e=>{m.value=e,O&&(O.fallbackLocale=e),W.fallbackLocale=m.value,z(W,i.value,e)}}),P=n((()=>f.value)),U=n((()=>g.value)),V=n((()=>b.value));function j(e,t,n,a,r,o){let s;if(s=e(W),c(s)&&-1===s){const[e,n]=t();return l&&N?a(l):r(e)}if(o(s))return s;throw Error(_e.UNEXPECTED_RETURN_TYPE)}function G(...e){return j((t=>Reflect.apply(te,null,[t,...e])),(()=>ae(...e)),0,(t=>Reflect.apply(t.t,t,[...e])),(e=>e),(e=>v(e)))}function x(e){return f.value[e]||{}}ke++,l&&(a(l.locale,(e=>{s&&(i.value=e,O&&(O.locale=e),W.locale=e,z(W,i.value,m.value))})),a(l.fallbackLocale,(e=>{s&&(m.value=e,O&&(O.fallbackLocale=e),W.fallbackLocale=e,z(W,i.value,m.value))})));const B={id:ke,locale:$,fallbackLocale:C,get inheritLocale(){return s},set inheritLocale(e){s=e,O&&(O._sync=e),e&&l&&(i.value=l.locale.value,m.value=l.fallbackLocale.value,O&&(O.locale=l.locale.value,O.fallbackLocale=l.fallbackLocale.value),z(W,i.value,m.value))},get availableLocales(){return Object.keys(f.value).sort()},messages:P,get modifiers(){return D},get pluralRules(){return M||{}},get isGlobal(){return o},get missingWarn(){return p},set missingWarn(e){p=e,W.missingWarn=p},get fallbackWarn(){return L},set fallbackWarn(e){L=e,W.fallbackWarn=L},get fallbackRoot(){return N},set fallbackRoot(e){N=e},get fallbackFormat(){return F},set fallbackFormat(e){F=e,W.fallbackFormat=F},get warnHtmlMessage(){return w},set warnHtmlMessage(e){w=e,W.warnHtmlMessage=e},get escapeParameter(){return A},set escapeParameter(e){A=e,W.escapeParameter=e},t:G,getLocaleMessage:x,setLocaleMessage:function(e,t){f.value[e]=t,O&&O.setLocaleMessage(e,t),W.messages=f.value},mergeLocaleMessage:function(e,t){f.value[e]=f.value[e]||{},O&&O.mergeLocaleMessage(e,t),Ee(t,f.value[e]),W.messages=f.value},getPostTranslationHandler:function(){return d(y)?y:null},setPostTranslationHandler:function(e){y=e,W.postTranslation=e},getMissingHandler:function(){return R},setMissingHandler:function(e){null!==e&&(I=Le(e)),R=e,W.missing=I},[ge]:function(e){M=e,W.pluralRules=M}};return B.datetimeFormats=U,B.numberFormats=V,B.rt=function(...e){const[t,n,a]=e;if(a&&!k(a))throw Error(_e.INVALID_ARGUMENT);return G(t,n,_({resolvedMessage:!0},a||{}))},B.te=function(e,t){const n=x(v(t)?t:i.value);return null!==W.messageResolver(n,e)},B.tm=function(e){const t=function(e){let t=null;const n=S(W,m.value,i.value);for(let a=0;a<n.length;a++){const r=W.messageResolver(f.value[n[a]]||{},e);if(null!=r){t=r;break}}return t}(e);return null!=t?t:l&&l.tm(e)||{}},B.d=function(...e){return j((t=>Reflect.apply(re,null,[t,...e])),(()=>le(...e)),0,(t=>Reflect.apply(t.d,t,[...e])),(()=>""),(e=>v(e)))},B.n=function(...e){return j((t=>Reflect.apply(se,null,[t,...e])),(()=>ie(...e)),0,(t=>Reflect.apply(t.n,t,[...e])),(()=>""),(e=>v(e)))},B.getDateTimeFormat=function(e){return g.value[e]||{}},B.setDateTimeFormat=function(e,t){g.value[e]=t,O&&O.setDateTimeFormat(e,t),W.datetimeFormats=g.value,oe(W,e,t)},B.mergeDateTimeFormat=function(e,t){g.value[e]=_(g.value[e]||{},t),O&&O.mergeDateTimeFormat(e,t),W.datetimeFormats=g.value,oe(W,e,t)},B.getNumberFormat=function(e){return b.value[e]||{}},B.setNumberFormat=function(e,t){b.value[e]=t,O&&O.setNumberFormat(e,t),W.numberFormats=b.value,ce(W,e,t)},B.mergeNumberFormat=function(e,t){b.value[e]=_(b.value[e]||{},t),O&&O.mergeNumberFormat(e,t),W.numberFormats=b.value,ce(W,e,t)},B[be]=O,B}let Te=null,Fe=null;const Re=s("global-vue-i18n");function Ie(e={},t){if(Fe)return Fe;Te=t;const n=!E(e.legacy)||e.legacy,a=new Map,r=function(e,t,n){if(!pe(n))throw Error(_e.NOT_COMPATIBLE_LEGACY_VUE_I18N);return Ne(e,n)}(e,0,t);s("");{const e=r[be];Object.defineProperty(e,"global",{get:()=>r}),Object.defineProperty(e,"mode",{get:()=>n?"legacy":"composition"}),Object.defineProperty(e,"__instances",{get:()=>a}),Object.defineProperty(e,"install",{value:t=>{if(2!==(t&&t.version&&Number(t.version.split(".")[0])||-1))throw Error(_e.BRIDGE_SUPPORT_VUE_2_ONLY);t.mixin(function(e,t){return{beforeCreate(){const n=this.$options;if(!n.__VUE18N__INSTANCE__)if(n.i18n=n.i18n||(n.__i18n?{}:null),this._i18nBridgeRoot=e,"composition"!==e.mode)if(n.i18n){if(n.i18n instanceof t){if(n.__i18n)try{const e=n.i18n&&n.i18n.messages?n.i18n.messages:{};n.__i18n.forEach((t=>Ee(e,JSON.parse(t)))),Object.keys(e).forEach((t=>{n.i18n.mergeLocaleMessage(t,e[t])}))}catch(e){}this._i18n=n.i18n,this._i18nWatcher=this._i18n.watchI18nData()}else if(T(n.i18n)){const e=this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof t?this.$root.$i18n:null;if(e&&(n.i18n.root=this.$root,n.i18n.formatter=e.formatter,n.i18n.fallbackLocale=e.fallbackLocale,n.i18n.formatFallbackMessages=e.formatFallbackMessages,n.i18n.silentTranslationWarn=e.silentTranslationWarn,n.i18n.silentFallbackWarn=e.silentFallbackWarn,n.i18n.pluralizationRules=e.pluralizationRules,n.i18n.preserveDirectiveContent=e.preserveDirectiveContent),n.__i18n)try{const e=n.i18n&&n.i18n.messages?n.i18n.messages:{};n.__i18n.forEach((t=>Ee(e,JSON.parse(t)))),n.i18n.messages=e}catch(e){}const{sharedMessages:a}=n.i18n;a&&T(a)&&Ee(n.i18n.messages,a),this._i18n=new t(n.i18n),this._i18nWatcher=this._i18n.watchI18nData(),(void 0===n.i18n.sync||n.i18n.sync)&&(this._localeWatcher=this.$i18n.watchLocale()),e&&e.onComponentInstanceCreated(this._i18n)}}else this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof t?this._i18n=this.$root.$i18n:n.parent&&n.parent.$i18n&&n.parent.$i18n instanceof t&&(this._i18n=n.parent.$i18n);else this._i18n=e},beforeMount(){const e=this.$options;e.__VUE18N__INSTANCE__||(e.i18n=e.i18n||(e.__i18n?{}:null),e.i18n?(e.i18n instanceof t||T(e.i18n))&&(this._i18n.subscribeDataChanging(this),this._subscribing=!0):(this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof t||e.parent&&e.parent.$i18n&&e.parent.$i18n instanceof t)&&(this._i18n.subscribeDataChanging(this),this._subscribing=!0))},beforeDestroy(){if(this.$options.__VUE18N__INSTANCE__)return;if(this._i18nBridgeRoot)return void delete this._i18nBridgeRoot;if("composition"===e.mode)return void delete this._i18n;if(!this._i18n)return;const t=this;this.$nextTick((()=>{t._subscribing&&(t._i18n.unsubscribeDataChanging(t),delete t._subscribing),t._i18nWatcher&&(t._i18nWatcher(),t._i18n.destroyVM(),delete t._i18nWatcher),t._localeWatcher&&(t._localeWatcher(),delete t._localeWatcher)}))}}}(e,Te))}});const t={__getInstance:function(e){return a.get(e)||null},__setInstance:function(e,t){a.set(e,t)},__deleteInstance:function(e){a.delete(e)}};return Object.keys(t).forEach((n=>Object.defineProperty(e,n,{value:t[n]}))),Fe=e,e}}function ye(e={}){const n=t();if(null==n)throw Error(_e.MUST_BE_CALL_SETUP_TOP);if(null==Te||null==Fe)throw Error(_e.NOT_INSLALLED);const a=function(e){{const t=e.proxy;if(null==t)throw Error(_e.UNEXPECTED_ERROR);const n=t._i18nBridgeRoot;if(!n)throw Error(_e.NOT_INSLALLED);return n}}(n),o=function(e){return e.global}(a),s=function(e){return e.proxy.$options}(n),i=function(e,t){return m(e)?"__i18n"in t?"local":"global":e.useScope?e.useScope:"local"}(e,s);if("global"===i)return function(e,t,n){let a=k(t.messages)?t.messages:{};"__i18nGlobal"in n&&(a=de(e.locale.value,{messages:a,__i18n:n.__i18nGlobal}));const r=Object.keys(a);r.length&&r.forEach((t=>{e.mergeLocaleMessage(t,a[t])}));if(k(t.datetimeFormats)){const n=Object.keys(t.datetimeFormats);n.length&&n.forEach((n=>{e.mergeDateTimeFormat(n,t.datetimeFormats[n])}))}if(k(t.numberFormats)){const n=Object.keys(t.numberFormats);n.length&&n.forEach((n=>{e.mergeNumberFormat(n,t.numberFormats[n])}))}}(o,e,s),o;if("parent"===i){let e=function(e,t){let n=null;const a=t.root;let r=t.parent;for(;null!=r;){const t=e;if("composition"===e.mode)n=t.__getInstance(r);else{const e=t.__getInstance(r);null!=e&&(n=e.__composer)}if(null!=n)break;if(a===r)break;r=r.parent}return n}(a,n);return null==e&&(e=o),e}if("legacy"===a.mode)throw Error(_e.NOT_AVAILABLE_IN_LEGACY_MODE);const c=a;let u=c.__getInstance(n);if(null==u){const t=_({},e);"__i18n"in s&&(t.__i18n=s.__i18n),o&&(t.__root=o),u=Ne(t,Te),function(e,t,n){{const a=t.proxy;if(null==a)throw Error(_e.UNEXPECTED_ERROR);const o=n[be];if(o===e)throw Error(_e.UNEXPECTED_ERROR);a._i18n=o,a._i18n_bridge=!0,a._i18nWatcher=a._i18n.watchI18nData(),a._i18n._sync&&(a._localeWatcher=a._i18n.watchLocale());let s=!1;r((()=>{a._i18n.subscribeDataChanging(a),s=!0}),t),l((()=>{s&&(a._i18n.unsubscribeDataChanging(a),s=!1),a._i18nWatcher&&(a._i18nWatcher(),a._i18n.destroyVM(),delete a._i18nWatcher),a._localeWatcher&&(a._localeWatcher(),delete a._localeWatcher),delete a._i18n_bridge,delete a._i18n}),t)}}(c,n,u),c.__setInstance(n,u)}return u}x=function(e,t){if(!k(e))return null;let n=A.get(t);if(n||(n=function(e){const t=[];let n,a,r,l,o,s,i,c=-1,u=0,m=0;const f=[];function _(){const t=e[c+1];if(5===u&&"'"===t||6===u&&'"'===t)return c++,r="\\"+t,f[0](),!0}for(f[0]=()=>{void 0===a?a=r:a+=r},f[1]=()=>{void 0!==a&&(t.push(a),a=void 0)},f[2]=()=>{f[0](),m++},f[3]=()=>{if(m>0)m--,u=4,f[0]();else{if(m=0,void 0===a)return!1;if(a=w(a),!1===a)return!1;f[1]()}};null!==u;)if(c++,n=e[c],"\\"!==n||!_()){if(l=y(n),i=R[u],o=i[l]||i.l||8,8===o)return;if(u=o[0],void 0!==o[1]&&(s=f[o[1]],s&&(r=n,!1===s())))return;if(7===u)return t}}(t),n&&A.set(t,n)),!n)return null;const a=n.length;let r=e,l=0;for(;l<a;){const e=r[n[l]];if(void 0===e)return null;r=e,l++}return r},B=S;export{Re as I18nInjectionKey,ue as VERSION,Ie as createI18n,ye as useI18n}; | ||
import{ref as e,getCurrentInstance as t,computed as n,watch as a,onBeforeMount as r,onUnmounted as l}from"@vue/composition-api";const o="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,s=e=>o?Symbol(e):e,i=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),c=e=>"number"==typeof e&&isFinite(e),u=e=>"[object RegExp]"===N(e),m=e=>T(e)&&0===Object.keys(e).length;function f(e,t){"undefined"!=typeof console&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}const _=Object.assign;function g(e){return e.replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}const b=Object.prototype.hasOwnProperty;function p(e,t){return b.call(e,t)}const h=Array.isArray,d=e=>"function"==typeof e,v=e=>"string"==typeof e,E=e=>"boolean"==typeof e,k=e=>null!==e&&"object"==typeof e,L=Object.prototype.toString,N=e=>L.call(e),T=e=>"[object Object]"===N(e),F=15,R=[];R[0]={w:[0],i:[3,0],"[":[4],o:[7]},R[1]={w:[1],".":[2],"[":[4],o:[7]},R[2]={w:[2],i:[3,0],0:[3,0]},R[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},R[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},R[5]={"'":[4,0],o:8,l:[5,0]},R[6]={'"':[4,0],o:8,l:[6,0]};const I=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function y(e){if(null==e)return"o";switch(e.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return e;case 95:case 36:case 45:return"i";case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"w"}return"i"}function w(e){const t=e.trim();return("0"!==e.charAt(0)||!isNaN(parseInt(e)))&&(I.test(t)?function(e){const t=e.charCodeAt(0);return t!==e.charCodeAt(e.length-1)||34!==t&&39!==t?e:e.slice(1,-1)}(t):"*"+t)}const A=new Map;function O(e,t){return k(e)?e[t]:null}const D=e=>e,W=e=>"",M=e=>0===e.length?"":e.join(""),C=e=>null==e?"":h(e)||T(e)&&e.toString===L?JSON.stringify(e,null,2):String(e);function $(e,t){return e=Math.abs(e),2===t?e?e>1?1:0:1:e?Math.min(e,2):0}function P(e={}){const t=e.locale,n=function(e){const t=c(e.pluralIndex)?e.pluralIndex:-1;return e.named&&(c(e.named.count)||c(e.named.n))?c(e.named.count)?e.named.count:c(e.named.n)?e.named.n:t:t}(e),a=k(e.pluralRules)&&v(t)&&d(e.pluralRules[t])?e.pluralRules[t]:$,r=k(e.pluralRules)&&v(t)&&d(e.pluralRules[t])?$:void 0,l=e.list||[],o=e.named||{};c(e.pluralIndex)&&function(e,t){t.count||(t.count=e),t.n||(t.n=e)}(n,o);function s(t){const n=d(e.messages)?e.messages(t):!!k(e.messages)&&e.messages[t];return n||(e.parent?e.parent.message(t):W)}const i=T(e.processor)&&d(e.processor.normalize)?e.processor.normalize:M,u=T(e.processor)&&d(e.processor.interpolate)?e.processor.interpolate:C,m={list:e=>l[e],named:e=>o[e],plural:e=>e[a(n,e.length,r)],linked:(t,n)=>{const a=s(t)(m);return v(n)?(r=n,e.modifiers?e.modifiers[r]:D)(a):a;var r},message:s,type:T(e.processor)&&v(e.processor.type)?e.processor.type:"text",interpolate:u,normalize:i};return m}function U(e,t,n){return[...new Set([n,...h(t)?t:k(t)?Object.keys(t):v(t)?[t]:[n]])]}function S(e,t,n){const a=v(n)?n:H,r=e;r.__localeChainCache||(r.__localeChainCache=new Map);let l=r.__localeChainCache.get(a);if(!l){l=[];let e=[n];for(;h(e);)e=V(l,e,t);const o=h(t)||!T(t)?t:t.default?t.default:null;e=v(o)?[o]:o,h(e)&&V(l,e,!1),r.__localeChainCache.set(a,l)}return l}function V(e,t,n){let a=!0;for(let r=0;r<t.length&&E(a);r++){v(t[r])&&(a=j(e,t[r],n))}return a}function j(e,t,n){let a;const r=t.split("-");do{a=G(e,r.join("-"),n),r.splice(-1,1)}while(r.length&&!0===a);return a}function G(e,t,n){let a=!1;if(!e.includes(t)&&(a=!0,t)){a="!"!==t[t.length-1];const r=t.replace(/!/g,"");e.push(r),(h(n)||T(n))&&n[r]&&(a=n[r])}return a}const H="en-US";let B,x;let Y=0;function J(e={}){const t=v(e.version)?e.version:"9.2.0-beta.8",n=v(e.locale)?e.locale:H,a=h(e.fallbackLocale)||T(e.fallbackLocale)||v(e.fallbackLocale)||!1===e.fallbackLocale?e.fallbackLocale:n,r=T(e.messages)?e.messages:{[n]:{}},l=T(e.datetimeFormats)?e.datetimeFormats:{[n]:{}},o=T(e.numberFormats)?e.numberFormats:{[n]:{}},s=_({},e.modifiers||{},{upper:e=>v(e)?e.toUpperCase():e,lower:e=>v(e)?e.toLowerCase():e,capitalize:e=>v(e)?`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`:e}),i=e.pluralRules||{},c=d(e.missing)?e.missing:null,m=!E(e.missingWarn)&&!u(e.missingWarn)||e.missingWarn,g=!E(e.fallbackWarn)&&!u(e.fallbackWarn)||e.fallbackWarn,b=!!e.fallbackFormat,p=!!e.unresolving,L=d(e.postTranslation)?e.postTranslation:null,N=T(e.processor)?e.processor:null,F=!E(e.warnHtmlMessage)||e.warnHtmlMessage,R=!!e.escapeParameter,I=d(e.messageCompiler)?e.messageCompiler:undefined,y=d(e.messageResolver)?e.messageResolver:B||O,w=d(e.localeFallbacker)?e.localeFallbacker:x||U,A=d(e.onWarn)?e.onWarn:f,D=e,W=k(D.__datetimeFormatters)?D.__datetimeFormatters:new Map,M=k(D.__numberFormatters)?D.__numberFormatters:new Map,C=k(D.__meta)?D.__meta:{};Y++;const $={version:t,cid:Y,locale:n,fallbackLocale:a,messages:r,modifiers:s,pluralRules:i,missing:c,missingWarn:m,fallbackWarn:g,fallbackFormat:b,unresolving:p,postTranslation:L,processor:N,warnHtmlMessage:F,escapeParameter:R,messageCompiler:I,messageResolver:y,localeFallbacker:w,onWarn:A,__meta:C};return $.datetimeFormats=l,$.numberFormats=o,$.__datetimeFormatters=W,$.__numberFormatters=M,$}function X(e,t,n,a,r){const{missing:l}=e;if(null!==l){const a=l(e,n,t,r);return v(a)?a:t}return t}function z(e,t,n){e.__localeChainCache=new Map,e.localeFallbacker(e,n,t)}let q=F;const K=()=>q++,Q={INVALID_ARGUMENT:q,INVALID_DATE_ARGUMENT:K(),INVALID_ISO_DATE_ARGUMENT:K(),__EXTEND_POINT__:K()},Z=()=>"",ee=e=>d(e);function te(e,...t){const{fallbackFormat:n,postTranslation:a,unresolving:r,fallbackLocale:l,messages:o}=e,[s,i]=ae(...t),u=(E(i.missingWarn),E(i.fallbackWarn),E(i.escapeParameter)?i.escapeParameter:e.escapeParameter),m=!!i.resolvedMessage,f=v(i.default)||E(i.default)?E(i.default)?s:i.default:n?s:"",_=n||""!==f,b=v(i.locale)?i.locale:e.locale;u&&function(e){h(e.list)?e.list=e.list.map((e=>v(e)?g(e):e)):k(e.named)&&Object.keys(e.named).forEach((t=>{v(e.named[t])&&(e.named[t]=g(e.named[t]))}))}(i);let[p,L,N]=m?[s,b,o[b]||{}]:function(e,t,n,a,r,l){const{messages:o,messageResolver:s,localeFallbacker:i}=e,c=i(e,a,n);let u,m={},f=null;const _="translate";for(let n=0;n<c.length&&(u=c[n],m=o[u]||{},null===(f=s(m,t))&&(f=m[t]),!v(f)&&!d(f));n++){const n=X(e,t,u,0,_);n!==t&&(f=n)}return[f,u,m]}(e,s,b,l),T=s;if(m||v(p)||ee(p)||_&&(p=f,T=p),!(m||(v(p)||ee(p))&&v(L)))return r?-1:s;let F=!1;const R=ee(p)?p:ne(e,s,L,p,T,(()=>{F=!0}));if(F)return p;const I=function(e,t,n){return t(n)}(0,R,P(function(e,t,n,a){const{modifiers:r,pluralRules:l,messageResolver:o}=e,s={locale:t,modifiers:r,pluralRules:l,messages:a=>{const r=o(n,a);if(v(r)){let n=!1;const l=ne(e,a,t,r,a,(()=>{n=!0}));return n?Z:l}return ee(r)?r:Z}};e.processor&&(s.processor=e.processor);a.list&&(s.list=a.list);a.named&&(s.named=a.named);c(a.plural)&&(s.pluralIndex=a.plural);return s}(e,L,N,i)));return a?a(I):I}function ne(e,t,n,a,r,l){const{messageCompiler:o,warnHtmlMessage:s}=e;if(ee(a)){const e=a;return e.locale=e.locale||n,e.key=e.key||t,e}const c=o(a,function(e,t,n,a,r,l){return{warnHtmlMessage:r,onError:e=>{throw l&&l(e),e},onCacheKey:e=>((e,t,n)=>i({l:e,k:t,s:n}))(t,n,e)}}(0,n,r,0,s,l));return c.locale=n,c.key=t,c.source=a,c}function ae(...e){const[t,n,a]=e,r={};if(!v(t)&&!c(t)&&!ee(t))throw Error(Q.INVALID_ARGUMENT);const l=c(t)?String(t):(ee(t),t);return c(n)?r.plural=n:v(n)?r.default=n:T(n)&&!m(n)?r.named=n:h(n)&&(r.list=n),c(a)?r.plural=a:v(a)?r.default=a:T(a)&&_(r,a),[l,r]}function re(e,...t){const{datetimeFormats:n,unresolving:a,fallbackLocale:r,localeFallbacker:l}=e,{__datetimeFormatters:o}=e,[s,i,c,u]=le(...t);E(c.missingWarn);E(c.fallbackWarn);const f=!!c.part,g=v(c.locale)?c.locale:e.locale,b=l(e,r,g);if(!v(s)||""===s)return new Intl.DateTimeFormat(g).format(i);let p,h={},d=null;for(let t=0;t<b.length&&(p=b[t],h=n[p]||{},d=h[s],!T(d));t++)X(e,s,p,0,"datetime format");if(!T(d)||!v(p))return a?-1:s;let k=`${p}__${s}`;m(u)||(k=`${k}__${JSON.stringify(u)}`);let L=o.get(k);return L||(L=new Intl.DateTimeFormat(p,_({},d,u)),o.set(k,L)),f?L.formatToParts(i):L.format(i)}function le(...e){const[t,n,a,r]=e;let l,o={},s={};if(v(t)){const e=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!e)throw Error(Q.INVALID_ISO_DATE_ARGUMENT);const n=e[3]?e[3].trim().startsWith("T")?`${e[1].trim()}${e[3].trim()}`:`${e[1].trim()}T${e[3].trim()}`:e[1].trim();l=new Date(n);try{l.toISOString()}catch(e){throw Error(Q.INVALID_ISO_DATE_ARGUMENT)}}else if("[object Date]"===N(t)){if(isNaN(t.getTime()))throw Error(Q.INVALID_DATE_ARGUMENT);l=t}else{if(!c(t))throw Error(Q.INVALID_ARGUMENT);l=t}return v(n)?o.key=n:T(n)&&(o=n),v(a)?o.locale=a:T(a)&&(s=a),T(r)&&(s=r),[o.key||"",l,o,s]}function oe(e,t,n){const a=e;for(const e in n){const n=`${t}__${e}`;a.__datetimeFormatters.has(n)&&a.__datetimeFormatters.delete(n)}}function se(e,...t){const{numberFormats:n,unresolving:a,fallbackLocale:r,localeFallbacker:l}=e,{__numberFormatters:o}=e,[s,i,c,u]=ie(...t);E(c.missingWarn);E(c.fallbackWarn);const f=!!c.part,g=v(c.locale)?c.locale:e.locale,b=l(e,r,g);if(!v(s)||""===s)return new Intl.NumberFormat(g).format(i);let p,h={},d=null;for(let t=0;t<b.length&&(p=b[t],h=n[p]||{},d=h[s],!T(d));t++)X(e,s,p,0,"number format");if(!T(d)||!v(p))return a?-1:s;let k=`${p}__${s}`;m(u)||(k=`${k}__${JSON.stringify(u)}`);let L=o.get(k);return L||(L=new Intl.NumberFormat(p,_({},d,u)),o.set(k,L)),f?L.formatToParts(i):L.format(i)}function ie(...e){const[t,n,a,r]=e;let l={},o={};if(!c(t))throw Error(Q.INVALID_ARGUMENT);const s=t;return v(n)?l.key=n:T(n)&&(l=n),v(a)?l.locale=a:T(a)&&(o=a),T(r)&&(o=r),[l.key||"",s,l,o]}function ce(e,t,n){const a=e;for(const e in n){const n=`${t}__${e}`;a.__numberFormatters.has(n)&&a.__numberFormatters.delete(n)}}const ue="9.2.0-beta.8";let me=F;const fe=()=>me++,_e={UNEXPECTED_RETURN_TYPE:me,INVALID_ARGUMENT:fe(),MUST_BE_CALL_SETUP_TOP:fe(),NOT_INSLALLED:fe(),NOT_AVAILABLE_IN_LEGACY_MODE:fe(),REQUIRED_VALUE:fe(),INVALID_VALUE:fe(),CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:fe(),NOT_INSLALLED_WITH_PROVIDE:fe(),UNEXPECTED_ERROR:fe(),NOT_COMPATIBLE_LEGACY_VUE_I18N:fe(),BRIDGE_SUPPORT_VUE_2_ONLY:fe(),__EXTEND_POINT__:fe()},ge=s("__setPluralRules"),be=s("__legacyVueI18n");function pe(e){return null!=e&&null!=e.version&&(Number(e.version.split(".")[0])||-1)>=8}function he(e){if(!k(e))return e;for(const t in e)if(p(e,t))if(t.includes(".")){const n=t.split("."),a=n.length-1;let r=e;for(let e=0;e<a;e++)n[e]in r||(r[n[e]]={}),r=r[n[e]];r[n[a]]=e[t],delete e[t],k(r[n[a]])&&he(r[n[a]])}else k(e[t])&&he(e[t]);return e}function de(e,t){const{messages:n,__i18n:a,messageResolver:r,flatJson:l}=t,o=T(n)?n:h(a)?{}:{[e]:{}};if(h(a)&&a.forEach((e=>{if("locale"in e&&"resource"in e){const{locale:t,resource:n}=e;t?(o[t]=o[t]||{},Ee(n,o[t])):Ee(n,o)}else v(e)&&Ee(JSON.parse(e),o)})),null==r&&l)for(const e in o)p(o,e)&&he(o[e]);return o}const ve=e=>!k(e)||h(e);function Ee(e,t){if(ve(e)||ve(t))throw Error(_e.INVALID_VALUE);for(const n in e)p(e,n)&&(ve(e[n])||ve(t[n])?t[n]=e[n]:Ee(e[n],t[n]))}let ke=0;function Le(e){return(n,a,r,l)=>e(a,r,t()||void 0,l)}function Ne(t={},r){const{__root:l}=t,o=void 0===l;let s=!E(t.inheritLocale)||t.inheritLocale;const i=e(l&&s?l.locale.value:v(t.locale)?t.locale:H),m=e(l&&s?l.fallbackLocale.value:v(t.fallbackLocale)||h(t.fallbackLocale)||T(t.fallbackLocale)||!1===t.fallbackLocale?t.fallbackLocale:i.value),f=e(de(i.value,t)),g=e(T(t.datetimeFormats)?t.datetimeFormats:{[i.value]:{}}),b=e(T(t.numberFormats)?t.numberFormats:{[i.value]:{}});let p=l?l.missingWarn:!E(t.missingWarn)&&!u(t.missingWarn)||t.missingWarn,L=l?l.fallbackWarn:!E(t.fallbackWarn)&&!u(t.fallbackWarn)||t.fallbackWarn,N=l?l.fallbackRoot:!E(t.fallbackRoot)||t.fallbackRoot,F=!!t.fallbackFormat,R=d(t.missing)?t.missing:null,I=d(t.missing)?Le(t.missing):null,y=d(t.postTranslation)?t.postTranslation:null,w=!E(t.warnHtmlMessage)||t.warnHtmlMessage,A=!!t.escapeParameter;const O=l?l.modifiers:T(t.modifiers)?t.modifiers:{};let D,W,M=t.pluralRules||l&&l.pluralRules;{pe(r);const e={locale:i.value,fallbackLocale:m.value,messages:f.value,dateTimeFormats:g.value,numberFormats:b.value,modifiers:O,missing:R,fallbackRoot:N,postTranslation:y,pluralizationRules:M,escapeParameterHtml:A,sync:s,silentFallbackWarn:E(L)?!L:L,silentTranslationWarn:E(p)?!p:p,formatFallbackMessages:E(F)?!F:F,warnHtmlInMessage:E(w)&&w?"warn":"off"};D=new r(e)}W=function(){const e={version:"9.2.0-beta.8",locale:i.value,fallbackLocale:m.value,messages:f.value,modifiers:O,pluralRules:M,missing:null===I?void 0:I,missingWarn:p,fallbackWarn:L,fallbackFormat:F,unresolving:!0,postTranslation:null===y?void 0:y,warnHtmlMessage:w,escapeParameter:A,messageResolver:t.messageResolver,__meta:{framework:"vue"}};return e.datetimeFormats=g.value,e.numberFormats=b.value,e.__datetimeFormatters=T(W)?W.__datetimeFormatters:void 0,e.__numberFormatters=T(W)?W.__numberFormatters:void 0,J(e)}(),z(W,i.value,m.value);const C=n({get:()=>i.value,set:e=>{i.value=e,D&&(D.locale=e),W.locale=i.value}}),$=n({get:()=>m.value,set:e=>{m.value=e,D&&(D.fallbackLocale=e),W.fallbackLocale=m.value,z(W,i.value,e)}}),P=n((()=>f.value)),U=n((()=>g.value)),V=n((()=>b.value));function j(e,t,n,a,r,o){let s;if(s=e(W),c(s)&&-1===s){const[e,n]=t();return l&&N?a(l):r(e)}if(o(s))return s;throw Error(_e.UNEXPECTED_RETURN_TYPE)}function G(...e){return j((t=>Reflect.apply(te,null,[t,...e])),(()=>ae(...e)),0,(t=>Reflect.apply(t.t,t,[...e])),(e=>e),(e=>v(e)))}function B(e){return f.value[e]||{}}ke++,l&&(a(l.locale,(e=>{s&&(i.value=e,D&&(D.locale=e),W.locale=e,z(W,i.value,m.value))})),a(l.fallbackLocale,(e=>{s&&(m.value=e,D&&(D.fallbackLocale=e),W.fallbackLocale=e,z(W,i.value,m.value))})));const x={id:ke,locale:C,fallbackLocale:$,get inheritLocale(){return s},set inheritLocale(e){s=e,D&&(D._sync=e),e&&l&&(i.value=l.locale.value,m.value=l.fallbackLocale.value,D&&(D.locale=l.locale.value,D.fallbackLocale=l.fallbackLocale.value),z(W,i.value,m.value))},get availableLocales(){return Object.keys(f.value).sort()},messages:P,get modifiers(){return O},get pluralRules(){return M||{}},get isGlobal(){return o},get missingWarn(){return p},set missingWarn(e){p=e,W.missingWarn=p},get fallbackWarn(){return L},set fallbackWarn(e){L=e,W.fallbackWarn=L},get fallbackRoot(){return N},set fallbackRoot(e){N=e},get fallbackFormat(){return F},set fallbackFormat(e){F=e,W.fallbackFormat=F},get warnHtmlMessage(){return w},set warnHtmlMessage(e){w=e,W.warnHtmlMessage=e},get escapeParameter(){return A},set escapeParameter(e){A=e,W.escapeParameter=e},t:G,getLocaleMessage:B,setLocaleMessage:function(e,t){f.value[e]=t,D&&D.setLocaleMessage(e,t),W.messages=f.value},mergeLocaleMessage:function(e,t){f.value[e]=f.value[e]||{},D&&D.mergeLocaleMessage(e,t),Ee(t,f.value[e]),W.messages=f.value},getPostTranslationHandler:function(){return d(y)?y:null},setPostTranslationHandler:function(e){y=e,W.postTranslation=e},getMissingHandler:function(){return R},setMissingHandler:function(e){null!==e&&(I=Le(e)),R=e,W.missing=I},[ge]:function(e){M=e,W.pluralRules=M}};return x.datetimeFormats=U,x.numberFormats=V,x.rt=function(...e){const[t,n,a]=e;if(a&&!k(a))throw Error(_e.INVALID_ARGUMENT);return G(t,n,_({resolvedMessage:!0},a||{}))},x.te=function(e,t){const n=B(v(t)?t:i.value);return null!==W.messageResolver(n,e)},x.tm=function(e){const t=function(e){let t=null;const n=S(W,m.value,i.value);for(let a=0;a<n.length;a++){const r=W.messageResolver(f.value[n[a]]||{},e);if(null!=r){t=r;break}}return t}(e);return null!=t?t:l&&l.tm(e)||{}},x.d=function(...e){return j((t=>Reflect.apply(re,null,[t,...e])),(()=>le(...e)),0,(t=>Reflect.apply(t.d,t,[...e])),(()=>""),(e=>v(e)))},x.n=function(...e){return j((t=>Reflect.apply(se,null,[t,...e])),(()=>ie(...e)),0,(t=>Reflect.apply(t.n,t,[...e])),(()=>""),(e=>v(e)))},x.getDateTimeFormat=function(e){return g.value[e]||{}},x.setDateTimeFormat=function(e,t){g.value[e]=t,D&&D.setDateTimeFormat(e,t),W.datetimeFormats=g.value,oe(W,e,t)},x.mergeDateTimeFormat=function(e,t){g.value[e]=_(g.value[e]||{},t),D&&D.mergeDateTimeFormat(e,t),W.datetimeFormats=g.value,oe(W,e,t)},x.getNumberFormat=function(e){return b.value[e]||{}},x.setNumberFormat=function(e,t){b.value[e]=t,D&&D.setNumberFormat(e,t),W.numberFormats=b.value,ce(W,e,t)},x.mergeNumberFormat=function(e,t){b.value[e]=_(b.value[e]||{},t),D&&D.mergeNumberFormat(e,t),W.numberFormats=b.value,ce(W,e,t)},x[be]=D,x}let Te=null,Fe=null;const Re=s("global-vue-i18n");function Ie(e={},t){if(Fe)return Fe;Te=t;const n=!E(e.legacy)||e.legacy,a=new Map,r=function(e,t,n){if(!pe(n))throw Error(_e.NOT_COMPATIBLE_LEGACY_VUE_I18N);return Ne(e,n)}(e,0,t);s("");{const e=r[be];Object.defineProperty(e,"global",{get:()=>r}),Object.defineProperty(e,"mode",{get:()=>n?"legacy":"composition"}),Object.defineProperty(e,"__instances",{get:()=>a}),Object.defineProperty(e,"install",{value:t=>{if(2!==(t&&t.version&&Number(t.version.split(".")[0])||-1))throw Error(_e.BRIDGE_SUPPORT_VUE_2_ONLY);t.mixin(function(e,t){return{beforeCreate(){const n=this.$options;if(!n.__VUE18N__INSTANCE__)if(n.i18n=n.i18n||(n.__i18n?{}:null),this._i18nBridgeRoot=e,"composition"!==e.mode)if(n.i18n){if(n.i18n instanceof t){if(n.__i18n)try{const e=n.i18n&&n.i18n.messages?n.i18n.messages:{};n.__i18n.forEach((t=>Ee(e,JSON.parse(t)))),Object.keys(e).forEach((t=>{n.i18n.mergeLocaleMessage(t,e[t])}))}catch(e){}this._i18n=n.i18n,this._i18nWatcher=this._i18n.watchI18nData()}else if(T(n.i18n)){const e=this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof t?this.$root.$i18n:null;if(e&&(n.i18n.root=this.$root,n.i18n.formatter=e.formatter,n.i18n.fallbackLocale=e.fallbackLocale,n.i18n.formatFallbackMessages=e.formatFallbackMessages,n.i18n.silentTranslationWarn=e.silentTranslationWarn,n.i18n.silentFallbackWarn=e.silentFallbackWarn,n.i18n.pluralizationRules=e.pluralizationRules,n.i18n.preserveDirectiveContent=e.preserveDirectiveContent),n.__i18n)try{const e=n.i18n&&n.i18n.messages?n.i18n.messages:{};n.__i18n.forEach((t=>Ee(e,JSON.parse(t)))),n.i18n.messages=e}catch(e){}const{sharedMessages:a}=n.i18n;a&&T(a)&&Ee(n.i18n.messages,a),this._i18n=new t(n.i18n),this._i18nWatcher=this._i18n.watchI18nData(),(void 0===n.i18n.sync||n.i18n.sync)&&(this._localeWatcher=this.$i18n.watchLocale()),e&&e.onComponentInstanceCreated(this._i18n)}}else this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof t?this._i18n=this.$root.$i18n:n.parent&&n.parent.$i18n&&n.parent.$i18n instanceof t&&(this._i18n=n.parent.$i18n);else this._i18n=e},beforeMount(){const e=this.$options;e.__VUE18N__INSTANCE__||(e.i18n=e.i18n||(e.__i18n?{}:null),e.i18n?(e.i18n instanceof t||T(e.i18n))&&(this._i18n.subscribeDataChanging(this),this._subscribing=!0):(this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof t||e.parent&&e.parent.$i18n&&e.parent.$i18n instanceof t)&&(this._i18n.subscribeDataChanging(this),this._subscribing=!0))},beforeDestroy(){if(this.$options.__VUE18N__INSTANCE__)return;if(this._i18nBridgeRoot)return void delete this._i18nBridgeRoot;if("composition"===e.mode)return void delete this._i18n;if(!this._i18n)return;const t=this;this.$nextTick((()=>{t._subscribing&&(t._i18n.unsubscribeDataChanging(t),delete t._subscribing),t._i18nWatcher&&(t._i18nWatcher(),t._i18n.destroyVM(),delete t._i18nWatcher),t._localeWatcher&&(t._localeWatcher(),delete t._localeWatcher)}))}}}(e,Te))}});const t={__getInstance:function(e){return a.get(e)||null},__setInstance:function(e,t){a.set(e,t)},__deleteInstance:function(e){a.delete(e)}};return Object.keys(t).forEach((n=>Object.defineProperty(e,n,{value:t[n]}))),Fe=e,e}}function ye(e={}){const n=t();if(null==n)throw Error(_e.MUST_BE_CALL_SETUP_TOP);if(null==Te||null==Fe)throw Error(_e.NOT_INSLALLED);const a=function(e){{const t=e.proxy;if(null==t)throw Error(_e.UNEXPECTED_ERROR);const n=t._i18nBridgeRoot;if(!n)throw Error(_e.NOT_INSLALLED);return n}}(n),o=function(e){return e.global}(a),s=function(e){return e.proxy.$options}(n),i=function(e,t){return m(e)?"__i18n"in t?"local":"global":e.useScope?e.useScope:"local"}(e,s);if("global"===i)return function(e,t,n){let a=k(t.messages)?t.messages:{};"__i18nGlobal"in n&&(a=de(e.locale.value,{messages:a,__i18n:n.__i18nGlobal}));const r=Object.keys(a);r.length&&r.forEach((t=>{e.mergeLocaleMessage(t,a[t])}));if(k(t.datetimeFormats)){const n=Object.keys(t.datetimeFormats);n.length&&n.forEach((n=>{e.mergeDateTimeFormat(n,t.datetimeFormats[n])}))}if(k(t.numberFormats)){const n=Object.keys(t.numberFormats);n.length&&n.forEach((n=>{e.mergeNumberFormat(n,t.numberFormats[n])}))}}(o,e,s),o;if("parent"===i){let e=function(e,t){let n=null;const a=t.root;let r=t.parent;for(;null!=r;){const t=e;if("composition"===e.mode)n=t.__getInstance(r);else{const e=t.__getInstance(r);null!=e&&(n=e.__composer)}if(null!=n)break;if(a===r)break;r=r.parent}return n}(a,n);return null==e&&(e=o),e}if("legacy"===a.mode)throw Error(_e.NOT_AVAILABLE_IN_LEGACY_MODE);const c=a;let u=c.__getInstance(n);if(null==u){const t=_({},e);"__i18n"in s&&(t.__i18n=s.__i18n),o&&(t.__root=o),u=Ne(t,Te),function(e,t,n){{const a=t.proxy;if(null==a)throw Error(_e.UNEXPECTED_ERROR);const o=n[be];if(o===e)throw Error(_e.UNEXPECTED_ERROR);a._i18n=o,a._i18n_bridge=!0,a._i18nWatcher=a._i18n.watchI18nData(),a._i18n._sync&&(a._localeWatcher=a._i18n.watchLocale());let s=!1;r((()=>{a._i18n.subscribeDataChanging(a),s=!0}),t),l((()=>{s&&(a._i18n.unsubscribeDataChanging(a),s=!1),a._i18nWatcher&&(a._i18nWatcher(),a._i18n.destroyVM(),delete a._i18nWatcher),a._localeWatcher&&(a._localeWatcher(),delete a._localeWatcher),delete a._i18n_bridge,delete a._i18n}),t)}}(c,n,u),c.__setInstance(n,u)}return u}const we=e=>{if(!pe(e))throw Error(_e.NOT_COMPATIBLE_LEGACY_VUE_I18N);return e};B=function(e,t){if(!k(e))return null;let n=A.get(t);if(n||(n=function(e){const t=[];let n,a,r,l,o,s,i,c=-1,u=0,m=0;const f=[];function _(){const t=e[c+1];if(5===u&&"'"===t||6===u&&'"'===t)return c++,r="\\"+t,f[0](),!0}for(f[0]=()=>{void 0===a?a=r:a+=r},f[1]=()=>{void 0!==a&&(t.push(a),a=void 0)},f[2]=()=>{f[0](),m++},f[3]=()=>{if(m>0)m--,u=4,f[0]();else{if(m=0,void 0===a)return!1;if(a=w(a),!1===a)return!1;f[1]()}};null!==u;)if(c++,n=e[c],"\\"!==n||!_()){if(l=y(n),i=R[u],o=i[l]||i.l||8,8===o)return;if(u=o[0],void 0!==o[1]&&(s=f[o[1]],s&&(r=n,!1===s())))return;if(7===u)return t}}(t),n&&A.set(t,n)),!n)return null;const a=n.length;let r=e,l=0;for(;l<a;){const e=r[n[l]];if(void 0===e)return null;r=e,l++}return r},x=S;export{Re as I18nInjectionKey,ue as VERSION,we as castToVueI18n,Ie as createI18n,ye as useI18n}; |
/*! | ||
* vue-i18n-bridge v9.2.0-beta.7 | ||
* vue-i18n-bridge v9.2.0-beta.8 | ||
* (c) 2021 kazuya kawaguchi | ||
@@ -18,3 +18,3 @@ * Released under the MIT License. | ||
*/ | ||
const VERSION = '9.2.0-beta.7'; | ||
const VERSION = '9.2.0-beta.8'; | ||
/** | ||
@@ -1082,2 +1082,24 @@ * This is only called in esm-bundler builds. | ||
} | ||
/** | ||
* Cast to VueI18n legacy compatible type | ||
* | ||
* @remarks | ||
* This API is provided only with [vue-i18n-bridge](https://vue-i18n.intlify.dev/guide/migration/ways.html#what-is-vue-i18n-bridge). | ||
* | ||
* The purpose of this function is to convert an {@link I18n} instance created with {@link createI18n | createI18n(legacy: true)} into a `vue-i18n@v8.x` compatible instance of `new VueI18n` in a TypeScript environment. | ||
* | ||
* @param i18n - An instance of {@link I18n} | ||
* @returns A i18n instance which is casted to {@link VueI18n} type | ||
* | ||
* @VueI18nTip | ||
* :new: provided by **vue-i18n-bridge only** | ||
* | ||
* @VueI18nGeneral | ||
*/ | ||
const castToVueI18n = (i18n) => { | ||
if (!isLegacyVueI18n(i18n)) { | ||
throw createI18nError(I18nErrorCodes.NOT_COMPATIBLE_LEGACY_VUE_I18N); | ||
} | ||
return i18n; | ||
}; | ||
function createGlobal(options, legacyMode, VueI18nLegacy // eslint-disable-line @typescript-eslint/no-explicit-any | ||
@@ -1246,2 +1268,2 @@ ) { | ||
export { I18nInjectionKey, VERSION, createI18n, useI18n }; | ||
export { I18nInjectionKey, VERSION, castToVueI18n, createI18n, useI18n }; |
/*! | ||
* vue-i18n-bridge v9.2.0-beta.7 | ||
* vue-i18n-bridge v9.2.0-beta.8 | ||
* (c) 2021 kazuya kawaguchi | ||
* Released under the MIT License. | ||
*/ | ||
var VueI18nBridge=function(e,t){"use strict";const n="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,a=e=>n?Symbol(e):e,r=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),l=e=>"number"==typeof e&&isFinite(e),o=e=>"[object RegExp]"===v(e),s=e=>E(e)&&0===Object.keys(e).length;function i(e,t){"undefined"!=typeof console&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}const c=Object.assign;function u(e){return e.replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}const m=Object.prototype.hasOwnProperty;function f(e,t){return m.call(e,t)}const _=Array.isArray,g=e=>"function"==typeof e,p=e=>"string"==typeof e,b=e=>"boolean"==typeof e,d=e=>null!==e&&"object"==typeof e,h=Object.prototype.toString,v=e=>h.call(e),E=e=>"[object Object]"===v(e),k=15,L=[];L[0]={w:[0],i:[3,0],"[":[4],o:[7]},L[1]={w:[1],".":[2],"[":[4],o:[7]},L[2]={w:[2],i:[3,0],0:[3,0]},L[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},L[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},L[5]={"'":[4,0],o:8,l:[5,0]},L[6]={'"':[4,0],o:8,l:[6,0]};const N=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function T(e){if(null==e)return"o";switch(e.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return e;case 95:case 36:case 45:return"i";case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"w"}return"i"}function I(e){const t=e.trim();return("0"!==e.charAt(0)||!isNaN(parseInt(e)))&&(N.test(t)?function(e){const t=e.charCodeAt(0);return t!==e.charCodeAt(e.length-1)||34!==t&&39!==t?e:e.slice(1,-1)}(t):"*"+t)}const F=new Map;function R(e,t){return d(e)?e[t]:null}const y=e=>e,w=e=>"",A=e=>0===e.length?"":e.join(""),O=e=>null==e?"":_(e)||E(e)&&e.toString===h?JSON.stringify(e,null,2):String(e);function D(e,t){return e=Math.abs(e),2===t?e?e>1?1:0:1:e?Math.min(e,2):0}function W(e={}){const t=e.locale,n=function(e){const t=l(e.pluralIndex)?e.pluralIndex:-1;return e.named&&(l(e.named.count)||l(e.named.n))?l(e.named.count)?e.named.count:l(e.named.n)?e.named.n:t:t}(e),a=d(e.pluralRules)&&p(t)&&g(e.pluralRules[t])?e.pluralRules[t]:D,r=d(e.pluralRules)&&p(t)&&g(e.pluralRules[t])?D:void 0,o=e.list||[],s=e.named||{};l(e.pluralIndex)&&function(e,t){t.count||(t.count=e),t.n||(t.n=e)}(n,s);function i(t){const n=g(e.messages)?e.messages(t):!!d(e.messages)&&e.messages[t];return n||(e.parent?e.parent.message(t):w)}const c=E(e.processor)&&g(e.processor.normalize)?e.processor.normalize:A,u=E(e.processor)&&g(e.processor.interpolate)?e.processor.interpolate:O,m={list:e=>o[e],named:e=>s[e],plural:e=>e[a(n,e.length,r)],linked:(t,n)=>{const a=i(t)(m);return p(n)?(r=n,e.modifiers?e.modifiers[r]:y)(a):a;var r},message:i,type:E(e.processor)&&p(e.processor.type)?e.processor.type:"text",interpolate:u,normalize:c};return m}function M(e,t,n){return[...new Set([n,..._(t)?t:d(t)?Object.keys(t):p(t)?[t]:[n]])]}function C(e,t,n){const a=p(n)?n:S,r=e;r.__localeChainCache||(r.__localeChainCache=new Map);let l=r.__localeChainCache.get(a);if(!l){l=[];let e=[n];for(;_(e);)e=$(l,e,t);const o=_(t)||!E(t)?t:t.default?t.default:null;e=p(o)?[o]:o,_(e)&&$(l,e,!1),r.__localeChainCache.set(a,l)}return l}function $(e,t,n){let a=!0;for(let r=0;r<t.length&&b(a);r++){p(t[r])&&(a=P(e,t[r],n))}return a}function P(e,t,n){let a;const r=t.split("-");do{a=U(e,r.join("-"),n),r.splice(-1,1)}while(r.length&&!0===a);return a}function U(e,t,n){let a=!1;if(!e.includes(t)&&(a=!0,t)){a="!"!==t[t.length-1];const r=t.replace(/!/g,"");e.push(r),(_(n)||E(n))&&n[r]&&(a=n[r])}return a}const S="en-US";let V,j;let G=0;function H(e={}){const t=p(e.version)?e.version:"9.2.0-beta.7",n=p(e.locale)?e.locale:S,a=_(e.fallbackLocale)||E(e.fallbackLocale)||p(e.fallbackLocale)||!1===e.fallbackLocale?e.fallbackLocale:n,r=E(e.messages)?e.messages:{[n]:{}},l=E(e.datetimeFormats)?e.datetimeFormats:{[n]:{}},s=E(e.numberFormats)?e.numberFormats:{[n]:{}},u=c({},e.modifiers||{},{upper:e=>p(e)?e.toUpperCase():e,lower:e=>p(e)?e.toLowerCase():e,capitalize:e=>p(e)?`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`:e}),m=e.pluralRules||{},f=g(e.missing)?e.missing:null,h=!b(e.missingWarn)&&!o(e.missingWarn)||e.missingWarn,v=!b(e.fallbackWarn)&&!o(e.fallbackWarn)||e.fallbackWarn,k=!!e.fallbackFormat,L=!!e.unresolving,N=g(e.postTranslation)?e.postTranslation:null,T=E(e.processor)?e.processor:null,I=!b(e.warnHtmlMessage)||e.warnHtmlMessage,F=!!e.escapeParameter,y=g(e.messageCompiler)?e.messageCompiler:undefined,w=g(e.messageResolver)?e.messageResolver:V||R,A=g(e.localeFallbacker)?e.localeFallbacker:j||M,O=g(e.onWarn)?e.onWarn:i,D=e,W=d(D.__datetimeFormatters)?D.__datetimeFormatters:new Map,C=d(D.__numberFormatters)?D.__numberFormatters:new Map,$=d(D.__meta)?D.__meta:{};G++;const P={version:t,cid:G,locale:n,fallbackLocale:a,messages:r,modifiers:u,pluralRules:m,missing:f,missingWarn:h,fallbackWarn:v,fallbackFormat:k,unresolving:L,postTranslation:N,processor:T,warnHtmlMessage:I,escapeParameter:F,messageCompiler:y,messageResolver:w,localeFallbacker:A,onWarn:O,__meta:$};return P.datetimeFormats=l,P.numberFormats=s,P.__datetimeFormatters=W,P.__numberFormatters=C,P}function B(e,t,n,a,r){const{missing:l}=e;if(null!==l){const a=l(e,n,t,r);return p(a)?a:t}return t}function x(e,t,n){e.__localeChainCache=new Map,e.localeFallbacker(e,n,t)}let J=k;const X=()=>J++,Y={INVALID_ARGUMENT:J,INVALID_DATE_ARGUMENT:X(),INVALID_ISO_DATE_ARGUMENT:X(),__EXTEND_POINT__:X()},z=()=>"",K=e=>g(e);function q(e,...t){const{fallbackFormat:n,postTranslation:a,unresolving:r,fallbackLocale:o,messages:s}=e,[i,c]=Z(...t),m=(b(c.missingWarn),b(c.fallbackWarn),b(c.escapeParameter)?c.escapeParameter:e.escapeParameter),f=!!c.resolvedMessage,h=p(c.default)||b(c.default)?b(c.default)?i:c.default:n?i:"",v=n||""!==h,E=p(c.locale)?c.locale:e.locale;m&&function(e){_(e.list)?e.list=e.list.map((e=>p(e)?u(e):e)):d(e.named)&&Object.keys(e.named).forEach((t=>{p(e.named[t])&&(e.named[t]=u(e.named[t]))}))}(c);let[k,L,N]=f?[i,E,s[E]||{}]:function(e,t,n,a,r,l){const{messages:o,messageResolver:s,localeFallbacker:i}=e,c=i(e,a,n);let u,m={},f=null;const _="translate";for(let n=0;n<c.length&&(u=c[n],m=o[u]||{},null===(f=s(m,t))&&(f=m[t]),!p(f)&&!g(f));n++){const n=B(e,t,u,0,_);n!==t&&(f=n)}return[f,u,m]}(e,i,E,o),T=i;if(f||p(k)||K(k)||v&&(k=h,T=k),!(f||(p(k)||K(k))&&p(L)))return r?-1:i;let I=!1;const F=K(k)?k:Q(e,i,L,k,T,(()=>{I=!0}));if(I)return k;const R=function(e,t,n){return t(n)}(0,F,W(function(e,t,n,a){const{modifiers:r,pluralRules:o,messageResolver:s}=e,i={locale:t,modifiers:r,pluralRules:o,messages:a=>{const r=s(n,a);if(p(r)){let n=!1;const l=Q(e,a,t,r,a,(()=>{n=!0}));return n?z:l}return K(r)?r:z}};e.processor&&(i.processor=e.processor);a.list&&(i.list=a.list);a.named&&(i.named=a.named);l(a.plural)&&(i.pluralIndex=a.plural);return i}(e,L,N,c)));return a?a(R):R}function Q(e,t,n,a,l,o){const{messageCompiler:s,warnHtmlMessage:i}=e;if(K(a)){const e=a;return e.locale=e.locale||n,e.key=e.key||t,e}const c=s(a,function(e,t,n,a,l,o){return{warnHtmlMessage:l,onError:e=>{throw o&&o(e),e},onCacheKey:e=>((e,t,n)=>r({l:e,k:t,s:n}))(t,n,e)}}(0,n,l,0,i,o));return c.locale=n,c.key=t,c.source=a,c}function Z(...e){const[t,n,a]=e,r={};if(!p(t)&&!l(t)&&!K(t))throw Error(Y.INVALID_ARGUMENT);const o=l(t)?String(t):(K(t),t);return l(n)?r.plural=n:p(n)?r.default=n:E(n)&&!s(n)?r.named=n:_(n)&&(r.list=n),l(a)?r.plural=a:p(a)?r.default=a:E(a)&&c(r,a),[o,r]}function ee(e,...t){const{datetimeFormats:n,unresolving:a,fallbackLocale:r,localeFallbacker:l}=e,{__datetimeFormatters:o}=e,[i,u,m,f]=te(...t);b(m.missingWarn);b(m.fallbackWarn);const _=!!m.part,g=p(m.locale)?m.locale:e.locale,d=l(e,r,g);if(!p(i)||""===i)return new Intl.DateTimeFormat(g).format(u);let h,v={},k=null;for(let t=0;t<d.length&&(h=d[t],v=n[h]||{},k=v[i],!E(k));t++)B(e,i,h,0,"datetime format");if(!E(k)||!p(h))return a?-1:i;let L=`${h}__${i}`;s(f)||(L=`${L}__${JSON.stringify(f)}`);let N=o.get(L);return N||(N=new Intl.DateTimeFormat(h,c({},k,f)),o.set(L,N)),_?N.formatToParts(u):N.format(u)}function te(...e){const[t,n,a,r]=e;let o,s={},i={};if(p(t)){const e=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!e)throw Error(Y.INVALID_ISO_DATE_ARGUMENT);const n=e[3]?e[3].trim().startsWith("T")?`${e[1].trim()}${e[3].trim()}`:`${e[1].trim()}T${e[3].trim()}`:e[1].trim();o=new Date(n);try{o.toISOString()}catch(e){throw Error(Y.INVALID_ISO_DATE_ARGUMENT)}}else if("[object Date]"===v(t)){if(isNaN(t.getTime()))throw Error(Y.INVALID_DATE_ARGUMENT);o=t}else{if(!l(t))throw Error(Y.INVALID_ARGUMENT);o=t}return p(n)?s.key=n:E(n)&&(s=n),p(a)?s.locale=a:E(a)&&(i=a),E(r)&&(i=r),[s.key||"",o,s,i]}function ne(e,t,n){const a=e;for(const e in n){const n=`${t}__${e}`;a.__datetimeFormatters.has(n)&&a.__datetimeFormatters.delete(n)}}function ae(e,...t){const{numberFormats:n,unresolving:a,fallbackLocale:r,localeFallbacker:l}=e,{__numberFormatters:o}=e,[i,u,m,f]=re(...t);b(m.missingWarn);b(m.fallbackWarn);const _=!!m.part,g=p(m.locale)?m.locale:e.locale,d=l(e,r,g);if(!p(i)||""===i)return new Intl.NumberFormat(g).format(u);let h,v={},k=null;for(let t=0;t<d.length&&(h=d[t],v=n[h]||{},k=v[i],!E(k));t++)B(e,i,h,0,"number format");if(!E(k)||!p(h))return a?-1:i;let L=`${h}__${i}`;s(f)||(L=`${L}__${JSON.stringify(f)}`);let N=o.get(L);return N||(N=new Intl.NumberFormat(h,c({},k,f)),o.set(L,N)),_?N.formatToParts(u):N.format(u)}function re(...e){const[t,n,a,r]=e;let o={},s={};if(!l(t))throw Error(Y.INVALID_ARGUMENT);const i=t;return p(n)?o.key=n:E(n)&&(o=n),p(a)?o.locale=a:E(a)&&(s=a),E(r)&&(s=r),[o.key||"",i,o,s]}function le(e,t,n){const a=e;for(const e in n){const n=`${t}__${e}`;a.__numberFormatters.has(n)&&a.__numberFormatters.delete(n)}}const oe="9.2.0-beta.7";let se=k;const ie=()=>se++,ce={UNEXPECTED_RETURN_TYPE:se,INVALID_ARGUMENT:ie(),MUST_BE_CALL_SETUP_TOP:ie(),NOT_INSLALLED:ie(),NOT_AVAILABLE_IN_LEGACY_MODE:ie(),REQUIRED_VALUE:ie(),INVALID_VALUE:ie(),CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:ie(),NOT_INSLALLED_WITH_PROVIDE:ie(),UNEXPECTED_ERROR:ie(),NOT_COMPATIBLE_LEGACY_VUE_I18N:ie(),BRIDGE_SUPPORT_VUE_2_ONLY:ie(),__EXTEND_POINT__:ie()},ue=a("__setPluralRules"),me=a("__legacyVueI18n");function fe(e){return null!=e&&null!=e.version&&(Number(e.version.split(".")[0])||-1)>=8}function _e(e){if(!d(e))return e;for(const t in e)if(f(e,t))if(t.includes(".")){const n=t.split("."),a=n.length-1;let r=e;for(let e=0;e<a;e++)n[e]in r||(r[n[e]]={}),r=r[n[e]];r[n[a]]=e[t],delete e[t],d(r[n[a]])&&_e(r[n[a]])}else d(e[t])&&_e(e[t]);return e}function ge(e,t){const{messages:n,__i18n:a,messageResolver:r,flatJson:l}=t,o=E(n)?n:_(a)?{}:{[e]:{}};if(_(a)&&a.forEach((e=>{if("locale"in e&&"resource"in e){const{locale:t,resource:n}=e;t?(o[t]=o[t]||{},be(n,o[t])):be(n,o)}else p(e)&&be(JSON.parse(e),o)})),null==r&&l)for(const e in o)f(o,e)&&_e(o[e]);return o}const pe=e=>!d(e)||_(e);function be(e,t){if(pe(e)||pe(t))throw Error(ce.INVALID_VALUE);for(const n in e)f(e,n)&&(pe(e[n])||pe(t[n])?t[n]=e[n]:be(e[n],t[n]))}let de=0;function he(e){return(n,a,r,l)=>e(a,r,t.getCurrentInstance()||void 0,l)}function ve(e={},n){const{__root:a}=e,r=void 0===a;let s=!b(e.inheritLocale)||e.inheritLocale;const i=t.ref(a&&s?a.locale.value:p(e.locale)?e.locale:S),u=t.ref(a&&s?a.fallbackLocale.value:p(e.fallbackLocale)||_(e.fallbackLocale)||E(e.fallbackLocale)||!1===e.fallbackLocale?e.fallbackLocale:i.value),m=t.ref(ge(i.value,e)),f=t.ref(E(e.datetimeFormats)?e.datetimeFormats:{[i.value]:{}}),h=t.ref(E(e.numberFormats)?e.numberFormats:{[i.value]:{}});let v=a?a.missingWarn:!b(e.missingWarn)&&!o(e.missingWarn)||e.missingWarn,k=a?a.fallbackWarn:!b(e.fallbackWarn)&&!o(e.fallbackWarn)||e.fallbackWarn,L=a?a.fallbackRoot:!b(e.fallbackRoot)||e.fallbackRoot,N=!!e.fallbackFormat,T=g(e.missing)?e.missing:null,I=g(e.missing)?he(e.missing):null,F=g(e.postTranslation)?e.postTranslation:null,R=!b(e.warnHtmlMessage)||e.warnHtmlMessage,y=!!e.escapeParameter;const w=a?a.modifiers:E(e.modifiers)?e.modifiers:{};let A,O,D=e.pluralRules||a&&a.pluralRules;{fe(n);const e={locale:i.value,fallbackLocale:u.value,messages:m.value,dateTimeFormats:f.value,numberFormats:h.value,modifiers:w,missing:T,fallbackRoot:L,postTranslation:F,pluralizationRules:D,escapeParameterHtml:y,sync:s,silentFallbackWarn:b(k)?!k:k,silentTranslationWarn:b(v)?!v:v,formatFallbackMessages:b(N)?!N:N,warnHtmlInMessage:b(R)&&R?"warn":"off"};A=new n(e)}O=function(){const t={version:oe,locale:i.value,fallbackLocale:u.value,messages:m.value,modifiers:w,pluralRules:D,missing:null===I?void 0:I,missingWarn:v,fallbackWarn:k,fallbackFormat:N,unresolving:!0,postTranslation:null===F?void 0:F,warnHtmlMessage:R,escapeParameter:y,messageResolver:e.messageResolver,__meta:{framework:"vue"}};return t.datetimeFormats=f.value,t.numberFormats=h.value,t.__datetimeFormatters=E(O)?O.__datetimeFormatters:void 0,t.__numberFormatters=E(O)?O.__numberFormatters:void 0,H(t)}(),x(O,i.value,u.value);const W=t.computed({get:()=>i.value,set:e=>{i.value=e,A&&(A.locale=e),O.locale=i.value}}),M=t.computed({get:()=>u.value,set:e=>{u.value=e,A&&(A.fallbackLocale=e),O.fallbackLocale=u.value,x(O,i.value,e)}}),$=t.computed((()=>m.value)),P=t.computed((()=>f.value)),U=t.computed((()=>h.value));function V(e,t,n,r,o,s){let i;if(i=e(O),l(i)&&-1===i){const[e,n]=t();return a&&L?r(a):o(e)}if(s(i))return i;throw Error(ce.UNEXPECTED_RETURN_TYPE)}function j(...e){return V((t=>Reflect.apply(q,null,[t,...e])),(()=>Z(...e)),0,(t=>Reflect.apply(t.t,t,[...e])),(e=>e),(e=>p(e)))}function G(e){return m.value[e]||{}}de++,a&&(t.watch(a.locale,(e=>{s&&(i.value=e,A&&(A.locale=e),O.locale=e,x(O,i.value,u.value))})),t.watch(a.fallbackLocale,(e=>{s&&(u.value=e,A&&(A.fallbackLocale=e),O.fallbackLocale=e,x(O,i.value,u.value))})));const B={id:de,locale:W,fallbackLocale:M,get inheritLocale(){return s},set inheritLocale(e){s=e,A&&(A._sync=e),e&&a&&(i.value=a.locale.value,u.value=a.fallbackLocale.value,A&&(A.locale=a.locale.value,A.fallbackLocale=a.fallbackLocale.value),x(O,i.value,u.value))},get availableLocales(){return Object.keys(m.value).sort()},messages:$,get modifiers(){return w},get pluralRules(){return D||{}},get isGlobal(){return r},get missingWarn(){return v},set missingWarn(e){v=e,O.missingWarn=v},get fallbackWarn(){return k},set fallbackWarn(e){k=e,O.fallbackWarn=k},get fallbackRoot(){return L},set fallbackRoot(e){L=e},get fallbackFormat(){return N},set fallbackFormat(e){N=e,O.fallbackFormat=N},get warnHtmlMessage(){return R},set warnHtmlMessage(e){R=e,O.warnHtmlMessage=e},get escapeParameter(){return y},set escapeParameter(e){y=e,O.escapeParameter=e},t:j,getLocaleMessage:G,setLocaleMessage:function(e,t){m.value[e]=t,A&&A.setLocaleMessage(e,t),O.messages=m.value},mergeLocaleMessage:function(e,t){m.value[e]=m.value[e]||{},A&&A.mergeLocaleMessage(e,t),be(t,m.value[e]),O.messages=m.value},getPostTranslationHandler:function(){return g(F)?F:null},setPostTranslationHandler:function(e){F=e,O.postTranslation=e},getMissingHandler:function(){return T},setMissingHandler:function(e){null!==e&&(I=he(e)),T=e,O.missing=I},[ue]:function(e){D=e,O.pluralRules=D}};return B.datetimeFormats=P,B.numberFormats=U,B.rt=function(...e){const[t,n,a]=e;if(a&&!d(a))throw Error(ce.INVALID_ARGUMENT);return j(t,n,c({resolvedMessage:!0},a||{}))},B.te=function(e,t){const n=G(p(t)?t:i.value);return null!==O.messageResolver(n,e)},B.tm=function(e){const t=function(e){let t=null;const n=C(O,u.value,i.value);for(let a=0;a<n.length;a++){const r=O.messageResolver(m.value[n[a]]||{},e);if(null!=r){t=r;break}}return t}(e);return null!=t?t:a&&a.tm(e)||{}},B.d=function(...e){return V((t=>Reflect.apply(ee,null,[t,...e])),(()=>te(...e)),0,(t=>Reflect.apply(t.d,t,[...e])),(()=>""),(e=>p(e)))},B.n=function(...e){return V((t=>Reflect.apply(ae,null,[t,...e])),(()=>re(...e)),0,(t=>Reflect.apply(t.n,t,[...e])),(()=>""),(e=>p(e)))},B.getDateTimeFormat=function(e){return f.value[e]||{}},B.setDateTimeFormat=function(e,t){f.value[e]=t,A&&A.setDateTimeFormat(e,t),O.datetimeFormats=f.value,ne(O,e,t)},B.mergeDateTimeFormat=function(e,t){f.value[e]=c(f.value[e]||{},t),A&&A.mergeDateTimeFormat(e,t),O.datetimeFormats=f.value,ne(O,e,t)},B.getNumberFormat=function(e){return h.value[e]||{}},B.setNumberFormat=function(e,t){h.value[e]=t,A&&A.setNumberFormat(e,t),O.numberFormats=h.value,le(O,e,t)},B.mergeNumberFormat=function(e,t){h.value[e]=c(h.value[e]||{},t),A&&A.mergeNumberFormat(e,t),O.numberFormats=h.value,le(O,e,t)},B[me]=A,B}let Ee=null,ke=null;return V=function(e,t){if(!d(e))return null;let n=F.get(t);if(n||(n=function(e){const t=[];let n,a,r,l,o,s,i,c=-1,u=0,m=0;const f=[];function _(){const t=e[c+1];if(5===u&&"'"===t||6===u&&'"'===t)return c++,r="\\"+t,f[0](),!0}for(f[0]=()=>{void 0===a?a=r:a+=r},f[1]=()=>{void 0!==a&&(t.push(a),a=void 0)},f[2]=()=>{f[0](),m++},f[3]=()=>{if(m>0)m--,u=4,f[0]();else{if(m=0,void 0===a)return!1;if(a=I(a),!1===a)return!1;f[1]()}};null!==u;)if(c++,n=e[c],"\\"!==n||!_()){if(l=T(n),i=L[u],o=i[l]||i.l||8,8===o)return;if(u=o[0],void 0!==o[1]&&(s=f[o[1]],s&&(r=n,!1===s())))return;if(7===u)return t}}(t),n&&F.set(t,n)),!n)return null;const a=n.length;let r=e,l=0;for(;l<a;){const e=r[n[l]];if(void 0===e)return null;r=e,l++}return r},j=C,e.I18nInjectionKey=a("global-vue-i18n"),e.VERSION=oe,e.createI18n=function(e={},t){if(ke)return ke;Ee=t;const n=!b(e.legacy)||e.legacy,r=new Map,l=function(e,t,n){if(!fe(n))throw Error(ce.NOT_COMPATIBLE_LEGACY_VUE_I18N);return ve(e,n)}(e,0,t);a("");{const e=l[me];Object.defineProperty(e,"global",{get:()=>l}),Object.defineProperty(e,"mode",{get:()=>n?"legacy":"composition"}),Object.defineProperty(e,"__instances",{get:()=>r}),Object.defineProperty(e,"install",{value:t=>{if(2!==(t&&t.version&&Number(t.version.split(".")[0])||-1))throw Error(ce.BRIDGE_SUPPORT_VUE_2_ONLY);t.mixin(function(e,t){return{beforeCreate(){const n=this.$options;if(!n.__VUE18N__INSTANCE__)if(n.i18n=n.i18n||(n.__i18n?{}:null),this._i18nBridgeRoot=e,"composition"!==e.mode)if(n.i18n){if(n.i18n instanceof t){if(n.__i18n)try{const e=n.i18n&&n.i18n.messages?n.i18n.messages:{};n.__i18n.forEach((t=>be(e,JSON.parse(t)))),Object.keys(e).forEach((t=>{n.i18n.mergeLocaleMessage(t,e[t])}))}catch(e){}this._i18n=n.i18n,this._i18nWatcher=this._i18n.watchI18nData()}else if(E(n.i18n)){const e=this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof t?this.$root.$i18n:null;if(e&&(n.i18n.root=this.$root,n.i18n.formatter=e.formatter,n.i18n.fallbackLocale=e.fallbackLocale,n.i18n.formatFallbackMessages=e.formatFallbackMessages,n.i18n.silentTranslationWarn=e.silentTranslationWarn,n.i18n.silentFallbackWarn=e.silentFallbackWarn,n.i18n.pluralizationRules=e.pluralizationRules,n.i18n.preserveDirectiveContent=e.preserveDirectiveContent),n.__i18n)try{const e=n.i18n&&n.i18n.messages?n.i18n.messages:{};n.__i18n.forEach((t=>be(e,JSON.parse(t)))),n.i18n.messages=e}catch(e){}const{sharedMessages:a}=n.i18n;a&&E(a)&&be(n.i18n.messages,a),this._i18n=new t(n.i18n),this._i18nWatcher=this._i18n.watchI18nData(),(void 0===n.i18n.sync||n.i18n.sync)&&(this._localeWatcher=this.$i18n.watchLocale()),e&&e.onComponentInstanceCreated(this._i18n)}}else this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof t?this._i18n=this.$root.$i18n:n.parent&&n.parent.$i18n&&n.parent.$i18n instanceof t&&(this._i18n=n.parent.$i18n);else this._i18n=e},beforeMount(){const e=this.$options;e.__VUE18N__INSTANCE__||(e.i18n=e.i18n||(e.__i18n?{}:null),e.i18n?(e.i18n instanceof t||E(e.i18n))&&(this._i18n.subscribeDataChanging(this),this._subscribing=!0):(this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof t||e.parent&&e.parent.$i18n&&e.parent.$i18n instanceof t)&&(this._i18n.subscribeDataChanging(this),this._subscribing=!0))},beforeDestroy(){if(this.$options.__VUE18N__INSTANCE__)return;if(this._i18nBridgeRoot)return void delete this._i18nBridgeRoot;if("composition"===e.mode)return void delete this._i18n;if(!this._i18n)return;const t=this;this.$nextTick((()=>{t._subscribing&&(t._i18n.unsubscribeDataChanging(t),delete t._subscribing),t._i18nWatcher&&(t._i18nWatcher(),t._i18n.destroyVM(),delete t._i18nWatcher),t._localeWatcher&&(t._localeWatcher(),delete t._localeWatcher)}))}}}(e,Ee))}});const t={__getInstance:function(e){return r.get(e)||null},__setInstance:function(e,t){r.set(e,t)},__deleteInstance:function(e){r.delete(e)}};return Object.keys(t).forEach((n=>Object.defineProperty(e,n,{value:t[n]}))),ke=e,e}},e.useI18n=function(e={}){const n=t.getCurrentInstance();if(null==n)throw Error(ce.MUST_BE_CALL_SETUP_TOP);if(null==Ee||null==ke)throw Error(ce.NOT_INSLALLED);const a=function(e){{const t=e.proxy;if(null==t)throw Error(ce.UNEXPECTED_ERROR);const n=t._i18nBridgeRoot;if(!n)throw Error(ce.NOT_INSLALLED);return n}}(n),r=function(e){return e.global}(a),l=function(e){return e.proxy.$options}(n),o=function(e,t){return s(e)?"__i18n"in t?"local":"global":e.useScope?e.useScope:"local"}(e,l);if("global"===o)return function(e,t,n){let a=d(t.messages)?t.messages:{};"__i18nGlobal"in n&&(a=ge(e.locale.value,{messages:a,__i18n:n.__i18nGlobal}));const r=Object.keys(a);r.length&&r.forEach((t=>{e.mergeLocaleMessage(t,a[t])}));if(d(t.datetimeFormats)){const n=Object.keys(t.datetimeFormats);n.length&&n.forEach((n=>{e.mergeDateTimeFormat(n,t.datetimeFormats[n])}))}if(d(t.numberFormats)){const n=Object.keys(t.numberFormats);n.length&&n.forEach((n=>{e.mergeNumberFormat(n,t.numberFormats[n])}))}}(r,e,l),r;if("parent"===o){let e=function(e,t){let n=null;const a=t.root;let r=t.parent;for(;null!=r;){const t=e;if("composition"===e.mode)n=t.__getInstance(r);else{const e=t.__getInstance(r);null!=e&&(n=e.__composer)}if(null!=n)break;if(a===r)break;r=r.parent}return n}(a,n);return null==e&&(e=r),e}if("legacy"===a.mode)throw Error(ce.NOT_AVAILABLE_IN_LEGACY_MODE);const i=a;let u=i.__getInstance(n);if(null==u){const a=c({},e);"__i18n"in l&&(a.__i18n=l.__i18n),r&&(a.__root=r),u=ve(a,Ee),function(e,n,a){{const r=n.proxy;if(null==r)throw Error(ce.UNEXPECTED_ERROR);const l=a[me];if(l===e)throw Error(ce.UNEXPECTED_ERROR);r._i18n=l,r._i18n_bridge=!0,r._i18nWatcher=r._i18n.watchI18nData(),r._i18n._sync&&(r._localeWatcher=r._i18n.watchLocale());let o=!1;t.onBeforeMount((()=>{r._i18n.subscribeDataChanging(r),o=!0}),n),t.onUnmounted((()=>{o&&(r._i18n.unsubscribeDataChanging(r),o=!1),r._i18nWatcher&&(r._i18nWatcher(),r._i18n.destroyVM(),delete r._i18nWatcher),r._localeWatcher&&(r._localeWatcher(),delete r._localeWatcher),delete r._i18n_bridge,delete r._i18n}),n)}}(i,n,u),i.__setInstance(n,u)}return u},Object.defineProperty(e,"__esModule",{value:!0}),e}({},VueCompositionAPI); | ||
var VueI18nBridge=function(e,t){"use strict";const n="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,a=e=>n?Symbol(e):e,r=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),l=e=>"number"==typeof e&&isFinite(e),o=e=>"[object RegExp]"===v(e),s=e=>E(e)&&0===Object.keys(e).length;function i(e,t){"undefined"!=typeof console&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}const c=Object.assign;function u(e){return e.replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}const m=Object.prototype.hasOwnProperty;function f(e,t){return m.call(e,t)}const _=Array.isArray,g=e=>"function"==typeof e,p=e=>"string"==typeof e,b=e=>"boolean"==typeof e,d=e=>null!==e&&"object"==typeof e,h=Object.prototype.toString,v=e=>h.call(e),E=e=>"[object Object]"===v(e),k=15,L=[];L[0]={w:[0],i:[3,0],"[":[4],o:[7]},L[1]={w:[1],".":[2],"[":[4],o:[7]},L[2]={w:[2],i:[3,0],0:[3,0]},L[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},L[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},L[5]={"'":[4,0],o:8,l:[5,0]},L[6]={'"':[4,0],o:8,l:[6,0]};const N=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function T(e){if(null==e)return"o";switch(e.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return e;case 95:case 36:case 45:return"i";case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"w"}return"i"}function I(e){const t=e.trim();return("0"!==e.charAt(0)||!isNaN(parseInt(e)))&&(N.test(t)?function(e){const t=e.charCodeAt(0);return t!==e.charCodeAt(e.length-1)||34!==t&&39!==t?e:e.slice(1,-1)}(t):"*"+t)}const F=new Map;function R(e,t){return d(e)?e[t]:null}const y=e=>e,w=e=>"",A=e=>0===e.length?"":e.join(""),O=e=>null==e?"":_(e)||E(e)&&e.toString===h?JSON.stringify(e,null,2):String(e);function D(e,t){return e=Math.abs(e),2===t?e?e>1?1:0:1:e?Math.min(e,2):0}function M(e={}){const t=e.locale,n=function(e){const t=l(e.pluralIndex)?e.pluralIndex:-1;return e.named&&(l(e.named.count)||l(e.named.n))?l(e.named.count)?e.named.count:l(e.named.n)?e.named.n:t:t}(e),a=d(e.pluralRules)&&p(t)&&g(e.pluralRules[t])?e.pluralRules[t]:D,r=d(e.pluralRules)&&p(t)&&g(e.pluralRules[t])?D:void 0,o=e.list||[],s=e.named||{};l(e.pluralIndex)&&function(e,t){t.count||(t.count=e),t.n||(t.n=e)}(n,s);function i(t){const n=g(e.messages)?e.messages(t):!!d(e.messages)&&e.messages[t];return n||(e.parent?e.parent.message(t):w)}const c=E(e.processor)&&g(e.processor.normalize)?e.processor.normalize:A,u=E(e.processor)&&g(e.processor.interpolate)?e.processor.interpolate:O,m={list:e=>o[e],named:e=>s[e],plural:e=>e[a(n,e.length,r)],linked:(t,n)=>{const a=i(t)(m);return p(n)?(r=n,e.modifiers?e.modifiers[r]:y)(a):a;var r},message:i,type:E(e.processor)&&p(e.processor.type)?e.processor.type:"text",interpolate:u,normalize:c};return m}function W(e,t,n){return[...new Set([n,..._(t)?t:d(t)?Object.keys(t):p(t)?[t]:[n]])]}function C(e,t,n){const a=p(n)?n:S,r=e;r.__localeChainCache||(r.__localeChainCache=new Map);let l=r.__localeChainCache.get(a);if(!l){l=[];let e=[n];for(;_(e);)e=$(l,e,t);const o=_(t)||!E(t)?t:t.default?t.default:null;e=p(o)?[o]:o,_(e)&&$(l,e,!1),r.__localeChainCache.set(a,l)}return l}function $(e,t,n){let a=!0;for(let r=0;r<t.length&&b(a);r++){p(t[r])&&(a=P(e,t[r],n))}return a}function P(e,t,n){let a;const r=t.split("-");do{a=U(e,r.join("-"),n),r.splice(-1,1)}while(r.length&&!0===a);return a}function U(e,t,n){let a=!1;if(!e.includes(t)&&(a=!0,t)){a="!"!==t[t.length-1];const r=t.replace(/!/g,"");e.push(r),(_(n)||E(n))&&n[r]&&(a=n[r])}return a}const S="en-US";let V,j;let G=0;function H(e={}){const t=p(e.version)?e.version:"9.2.0-beta.8",n=p(e.locale)?e.locale:S,a=_(e.fallbackLocale)||E(e.fallbackLocale)||p(e.fallbackLocale)||!1===e.fallbackLocale?e.fallbackLocale:n,r=E(e.messages)?e.messages:{[n]:{}},l=E(e.datetimeFormats)?e.datetimeFormats:{[n]:{}},s=E(e.numberFormats)?e.numberFormats:{[n]:{}},u=c({},e.modifiers||{},{upper:e=>p(e)?e.toUpperCase():e,lower:e=>p(e)?e.toLowerCase():e,capitalize:e=>p(e)?`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`:e}),m=e.pluralRules||{},f=g(e.missing)?e.missing:null,h=!b(e.missingWarn)&&!o(e.missingWarn)||e.missingWarn,v=!b(e.fallbackWarn)&&!o(e.fallbackWarn)||e.fallbackWarn,k=!!e.fallbackFormat,L=!!e.unresolving,N=g(e.postTranslation)?e.postTranslation:null,T=E(e.processor)?e.processor:null,I=!b(e.warnHtmlMessage)||e.warnHtmlMessage,F=!!e.escapeParameter,y=g(e.messageCompiler)?e.messageCompiler:undefined,w=g(e.messageResolver)?e.messageResolver:V||R,A=g(e.localeFallbacker)?e.localeFallbacker:j||W,O=g(e.onWarn)?e.onWarn:i,D=e,M=d(D.__datetimeFormatters)?D.__datetimeFormatters:new Map,C=d(D.__numberFormatters)?D.__numberFormatters:new Map,$=d(D.__meta)?D.__meta:{};G++;const P={version:t,cid:G,locale:n,fallbackLocale:a,messages:r,modifiers:u,pluralRules:m,missing:f,missingWarn:h,fallbackWarn:v,fallbackFormat:k,unresolving:L,postTranslation:N,processor:T,warnHtmlMessage:I,escapeParameter:F,messageCompiler:y,messageResolver:w,localeFallbacker:A,onWarn:O,__meta:$};return P.datetimeFormats=l,P.numberFormats=s,P.__datetimeFormatters=M,P.__numberFormatters=C,P}function B(e,t,n,a,r){const{missing:l}=e;if(null!==l){const a=l(e,n,t,r);return p(a)?a:t}return t}function x(e,t,n){e.__localeChainCache=new Map,e.localeFallbacker(e,n,t)}let Y=k;const J=()=>Y++,X={INVALID_ARGUMENT:Y,INVALID_DATE_ARGUMENT:J(),INVALID_ISO_DATE_ARGUMENT:J(),__EXTEND_POINT__:J()},z=()=>"",K=e=>g(e);function q(e,...t){const{fallbackFormat:n,postTranslation:a,unresolving:r,fallbackLocale:o,messages:s}=e,[i,c]=Z(...t),m=(b(c.missingWarn),b(c.fallbackWarn),b(c.escapeParameter)?c.escapeParameter:e.escapeParameter),f=!!c.resolvedMessage,h=p(c.default)||b(c.default)?b(c.default)?i:c.default:n?i:"",v=n||""!==h,E=p(c.locale)?c.locale:e.locale;m&&function(e){_(e.list)?e.list=e.list.map((e=>p(e)?u(e):e)):d(e.named)&&Object.keys(e.named).forEach((t=>{p(e.named[t])&&(e.named[t]=u(e.named[t]))}))}(c);let[k,L,N]=f?[i,E,s[E]||{}]:function(e,t,n,a,r,l){const{messages:o,messageResolver:s,localeFallbacker:i}=e,c=i(e,a,n);let u,m={},f=null;const _="translate";for(let n=0;n<c.length&&(u=c[n],m=o[u]||{},null===(f=s(m,t))&&(f=m[t]),!p(f)&&!g(f));n++){const n=B(e,t,u,0,_);n!==t&&(f=n)}return[f,u,m]}(e,i,E,o),T=i;if(f||p(k)||K(k)||v&&(k=h,T=k),!(f||(p(k)||K(k))&&p(L)))return r?-1:i;let I=!1;const F=K(k)?k:Q(e,i,L,k,T,(()=>{I=!0}));if(I)return k;const R=function(e,t,n){return t(n)}(0,F,M(function(e,t,n,a){const{modifiers:r,pluralRules:o,messageResolver:s}=e,i={locale:t,modifiers:r,pluralRules:o,messages:a=>{const r=s(n,a);if(p(r)){let n=!1;const l=Q(e,a,t,r,a,(()=>{n=!0}));return n?z:l}return K(r)?r:z}};e.processor&&(i.processor=e.processor);a.list&&(i.list=a.list);a.named&&(i.named=a.named);l(a.plural)&&(i.pluralIndex=a.plural);return i}(e,L,N,c)));return a?a(R):R}function Q(e,t,n,a,l,o){const{messageCompiler:s,warnHtmlMessage:i}=e;if(K(a)){const e=a;return e.locale=e.locale||n,e.key=e.key||t,e}const c=s(a,function(e,t,n,a,l,o){return{warnHtmlMessage:l,onError:e=>{throw o&&o(e),e},onCacheKey:e=>((e,t,n)=>r({l:e,k:t,s:n}))(t,n,e)}}(0,n,l,0,i,o));return c.locale=n,c.key=t,c.source=a,c}function Z(...e){const[t,n,a]=e,r={};if(!p(t)&&!l(t)&&!K(t))throw Error(X.INVALID_ARGUMENT);const o=l(t)?String(t):(K(t),t);return l(n)?r.plural=n:p(n)?r.default=n:E(n)&&!s(n)?r.named=n:_(n)&&(r.list=n),l(a)?r.plural=a:p(a)?r.default=a:E(a)&&c(r,a),[o,r]}function ee(e,...t){const{datetimeFormats:n,unresolving:a,fallbackLocale:r,localeFallbacker:l}=e,{__datetimeFormatters:o}=e,[i,u,m,f]=te(...t);b(m.missingWarn);b(m.fallbackWarn);const _=!!m.part,g=p(m.locale)?m.locale:e.locale,d=l(e,r,g);if(!p(i)||""===i)return new Intl.DateTimeFormat(g).format(u);let h,v={},k=null;for(let t=0;t<d.length&&(h=d[t],v=n[h]||{},k=v[i],!E(k));t++)B(e,i,h,0,"datetime format");if(!E(k)||!p(h))return a?-1:i;let L=`${h}__${i}`;s(f)||(L=`${L}__${JSON.stringify(f)}`);let N=o.get(L);return N||(N=new Intl.DateTimeFormat(h,c({},k,f)),o.set(L,N)),_?N.formatToParts(u):N.format(u)}function te(...e){const[t,n,a,r]=e;let o,s={},i={};if(p(t)){const e=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!e)throw Error(X.INVALID_ISO_DATE_ARGUMENT);const n=e[3]?e[3].trim().startsWith("T")?`${e[1].trim()}${e[3].trim()}`:`${e[1].trim()}T${e[3].trim()}`:e[1].trim();o=new Date(n);try{o.toISOString()}catch(e){throw Error(X.INVALID_ISO_DATE_ARGUMENT)}}else if("[object Date]"===v(t)){if(isNaN(t.getTime()))throw Error(X.INVALID_DATE_ARGUMENT);o=t}else{if(!l(t))throw Error(X.INVALID_ARGUMENT);o=t}return p(n)?s.key=n:E(n)&&(s=n),p(a)?s.locale=a:E(a)&&(i=a),E(r)&&(i=r),[s.key||"",o,s,i]}function ne(e,t,n){const a=e;for(const e in n){const n=`${t}__${e}`;a.__datetimeFormatters.has(n)&&a.__datetimeFormatters.delete(n)}}function ae(e,...t){const{numberFormats:n,unresolving:a,fallbackLocale:r,localeFallbacker:l}=e,{__numberFormatters:o}=e,[i,u,m,f]=re(...t);b(m.missingWarn);b(m.fallbackWarn);const _=!!m.part,g=p(m.locale)?m.locale:e.locale,d=l(e,r,g);if(!p(i)||""===i)return new Intl.NumberFormat(g).format(u);let h,v={},k=null;for(let t=0;t<d.length&&(h=d[t],v=n[h]||{},k=v[i],!E(k));t++)B(e,i,h,0,"number format");if(!E(k)||!p(h))return a?-1:i;let L=`${h}__${i}`;s(f)||(L=`${L}__${JSON.stringify(f)}`);let N=o.get(L);return N||(N=new Intl.NumberFormat(h,c({},k,f)),o.set(L,N)),_?N.formatToParts(u):N.format(u)}function re(...e){const[t,n,a,r]=e;let o={},s={};if(!l(t))throw Error(X.INVALID_ARGUMENT);const i=t;return p(n)?o.key=n:E(n)&&(o=n),p(a)?o.locale=a:E(a)&&(s=a),E(r)&&(s=r),[o.key||"",i,o,s]}function le(e,t,n){const a=e;for(const e in n){const n=`${t}__${e}`;a.__numberFormatters.has(n)&&a.__numberFormatters.delete(n)}}const oe="9.2.0-beta.8";let se=k;const ie=()=>se++,ce={UNEXPECTED_RETURN_TYPE:se,INVALID_ARGUMENT:ie(),MUST_BE_CALL_SETUP_TOP:ie(),NOT_INSLALLED:ie(),NOT_AVAILABLE_IN_LEGACY_MODE:ie(),REQUIRED_VALUE:ie(),INVALID_VALUE:ie(),CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:ie(),NOT_INSLALLED_WITH_PROVIDE:ie(),UNEXPECTED_ERROR:ie(),NOT_COMPATIBLE_LEGACY_VUE_I18N:ie(),BRIDGE_SUPPORT_VUE_2_ONLY:ie(),__EXTEND_POINT__:ie()},ue=a("__setPluralRules"),me=a("__legacyVueI18n");function fe(e){return null!=e&&null!=e.version&&(Number(e.version.split(".")[0])||-1)>=8}function _e(e){if(!d(e))return e;for(const t in e)if(f(e,t))if(t.includes(".")){const n=t.split("."),a=n.length-1;let r=e;for(let e=0;e<a;e++)n[e]in r||(r[n[e]]={}),r=r[n[e]];r[n[a]]=e[t],delete e[t],d(r[n[a]])&&_e(r[n[a]])}else d(e[t])&&_e(e[t]);return e}function ge(e,t){const{messages:n,__i18n:a,messageResolver:r,flatJson:l}=t,o=E(n)?n:_(a)?{}:{[e]:{}};if(_(a)&&a.forEach((e=>{if("locale"in e&&"resource"in e){const{locale:t,resource:n}=e;t?(o[t]=o[t]||{},be(n,o[t])):be(n,o)}else p(e)&&be(JSON.parse(e),o)})),null==r&&l)for(const e in o)f(o,e)&&_e(o[e]);return o}const pe=e=>!d(e)||_(e);function be(e,t){if(pe(e)||pe(t))throw Error(ce.INVALID_VALUE);for(const n in e)f(e,n)&&(pe(e[n])||pe(t[n])?t[n]=e[n]:be(e[n],t[n]))}let de=0;function he(e){return(n,a,r,l)=>e(a,r,t.getCurrentInstance()||void 0,l)}function ve(e={},n){const{__root:a}=e,r=void 0===a;let s=!b(e.inheritLocale)||e.inheritLocale;const i=t.ref(a&&s?a.locale.value:p(e.locale)?e.locale:S),u=t.ref(a&&s?a.fallbackLocale.value:p(e.fallbackLocale)||_(e.fallbackLocale)||E(e.fallbackLocale)||!1===e.fallbackLocale?e.fallbackLocale:i.value),m=t.ref(ge(i.value,e)),f=t.ref(E(e.datetimeFormats)?e.datetimeFormats:{[i.value]:{}}),h=t.ref(E(e.numberFormats)?e.numberFormats:{[i.value]:{}});let v=a?a.missingWarn:!b(e.missingWarn)&&!o(e.missingWarn)||e.missingWarn,k=a?a.fallbackWarn:!b(e.fallbackWarn)&&!o(e.fallbackWarn)||e.fallbackWarn,L=a?a.fallbackRoot:!b(e.fallbackRoot)||e.fallbackRoot,N=!!e.fallbackFormat,T=g(e.missing)?e.missing:null,I=g(e.missing)?he(e.missing):null,F=g(e.postTranslation)?e.postTranslation:null,R=!b(e.warnHtmlMessage)||e.warnHtmlMessage,y=!!e.escapeParameter;const w=a?a.modifiers:E(e.modifiers)?e.modifiers:{};let A,O,D=e.pluralRules||a&&a.pluralRules;{fe(n);const e={locale:i.value,fallbackLocale:u.value,messages:m.value,dateTimeFormats:f.value,numberFormats:h.value,modifiers:w,missing:T,fallbackRoot:L,postTranslation:F,pluralizationRules:D,escapeParameterHtml:y,sync:s,silentFallbackWarn:b(k)?!k:k,silentTranslationWarn:b(v)?!v:v,formatFallbackMessages:b(N)?!N:N,warnHtmlInMessage:b(R)&&R?"warn":"off"};A=new n(e)}O=function(){const t={version:oe,locale:i.value,fallbackLocale:u.value,messages:m.value,modifiers:w,pluralRules:D,missing:null===I?void 0:I,missingWarn:v,fallbackWarn:k,fallbackFormat:N,unresolving:!0,postTranslation:null===F?void 0:F,warnHtmlMessage:R,escapeParameter:y,messageResolver:e.messageResolver,__meta:{framework:"vue"}};return t.datetimeFormats=f.value,t.numberFormats=h.value,t.__datetimeFormatters=E(O)?O.__datetimeFormatters:void 0,t.__numberFormatters=E(O)?O.__numberFormatters:void 0,H(t)}(),x(O,i.value,u.value);const M=t.computed({get:()=>i.value,set:e=>{i.value=e,A&&(A.locale=e),O.locale=i.value}}),W=t.computed({get:()=>u.value,set:e=>{u.value=e,A&&(A.fallbackLocale=e),O.fallbackLocale=u.value,x(O,i.value,e)}}),$=t.computed((()=>m.value)),P=t.computed((()=>f.value)),U=t.computed((()=>h.value));function V(e,t,n,r,o,s){let i;if(i=e(O),l(i)&&-1===i){const[e,n]=t();return a&&L?r(a):o(e)}if(s(i))return i;throw Error(ce.UNEXPECTED_RETURN_TYPE)}function j(...e){return V((t=>Reflect.apply(q,null,[t,...e])),(()=>Z(...e)),0,(t=>Reflect.apply(t.t,t,[...e])),(e=>e),(e=>p(e)))}function G(e){return m.value[e]||{}}de++,a&&(t.watch(a.locale,(e=>{s&&(i.value=e,A&&(A.locale=e),O.locale=e,x(O,i.value,u.value))})),t.watch(a.fallbackLocale,(e=>{s&&(u.value=e,A&&(A.fallbackLocale=e),O.fallbackLocale=e,x(O,i.value,u.value))})));const B={id:de,locale:M,fallbackLocale:W,get inheritLocale(){return s},set inheritLocale(e){s=e,A&&(A._sync=e),e&&a&&(i.value=a.locale.value,u.value=a.fallbackLocale.value,A&&(A.locale=a.locale.value,A.fallbackLocale=a.fallbackLocale.value),x(O,i.value,u.value))},get availableLocales(){return Object.keys(m.value).sort()},messages:$,get modifiers(){return w},get pluralRules(){return D||{}},get isGlobal(){return r},get missingWarn(){return v},set missingWarn(e){v=e,O.missingWarn=v},get fallbackWarn(){return k},set fallbackWarn(e){k=e,O.fallbackWarn=k},get fallbackRoot(){return L},set fallbackRoot(e){L=e},get fallbackFormat(){return N},set fallbackFormat(e){N=e,O.fallbackFormat=N},get warnHtmlMessage(){return R},set warnHtmlMessage(e){R=e,O.warnHtmlMessage=e},get escapeParameter(){return y},set escapeParameter(e){y=e,O.escapeParameter=e},t:j,getLocaleMessage:G,setLocaleMessage:function(e,t){m.value[e]=t,A&&A.setLocaleMessage(e,t),O.messages=m.value},mergeLocaleMessage:function(e,t){m.value[e]=m.value[e]||{},A&&A.mergeLocaleMessage(e,t),be(t,m.value[e]),O.messages=m.value},getPostTranslationHandler:function(){return g(F)?F:null},setPostTranslationHandler:function(e){F=e,O.postTranslation=e},getMissingHandler:function(){return T},setMissingHandler:function(e){null!==e&&(I=he(e)),T=e,O.missing=I},[ue]:function(e){D=e,O.pluralRules=D}};return B.datetimeFormats=P,B.numberFormats=U,B.rt=function(...e){const[t,n,a]=e;if(a&&!d(a))throw Error(ce.INVALID_ARGUMENT);return j(t,n,c({resolvedMessage:!0},a||{}))},B.te=function(e,t){const n=G(p(t)?t:i.value);return null!==O.messageResolver(n,e)},B.tm=function(e){const t=function(e){let t=null;const n=C(O,u.value,i.value);for(let a=0;a<n.length;a++){const r=O.messageResolver(m.value[n[a]]||{},e);if(null!=r){t=r;break}}return t}(e);return null!=t?t:a&&a.tm(e)||{}},B.d=function(...e){return V((t=>Reflect.apply(ee,null,[t,...e])),(()=>te(...e)),0,(t=>Reflect.apply(t.d,t,[...e])),(()=>""),(e=>p(e)))},B.n=function(...e){return V((t=>Reflect.apply(ae,null,[t,...e])),(()=>re(...e)),0,(t=>Reflect.apply(t.n,t,[...e])),(()=>""),(e=>p(e)))},B.getDateTimeFormat=function(e){return f.value[e]||{}},B.setDateTimeFormat=function(e,t){f.value[e]=t,A&&A.setDateTimeFormat(e,t),O.datetimeFormats=f.value,ne(O,e,t)},B.mergeDateTimeFormat=function(e,t){f.value[e]=c(f.value[e]||{},t),A&&A.mergeDateTimeFormat(e,t),O.datetimeFormats=f.value,ne(O,e,t)},B.getNumberFormat=function(e){return h.value[e]||{}},B.setNumberFormat=function(e,t){h.value[e]=t,A&&A.setNumberFormat(e,t),O.numberFormats=h.value,le(O,e,t)},B.mergeNumberFormat=function(e,t){h.value[e]=c(h.value[e]||{},t),A&&A.mergeNumberFormat(e,t),O.numberFormats=h.value,le(O,e,t)},B[me]=A,B}let Ee=null,ke=null;return V=function(e,t){if(!d(e))return null;let n=F.get(t);if(n||(n=function(e){const t=[];let n,a,r,l,o,s,i,c=-1,u=0,m=0;const f=[];function _(){const t=e[c+1];if(5===u&&"'"===t||6===u&&'"'===t)return c++,r="\\"+t,f[0](),!0}for(f[0]=()=>{void 0===a?a=r:a+=r},f[1]=()=>{void 0!==a&&(t.push(a),a=void 0)},f[2]=()=>{f[0](),m++},f[3]=()=>{if(m>0)m--,u=4,f[0]();else{if(m=0,void 0===a)return!1;if(a=I(a),!1===a)return!1;f[1]()}};null!==u;)if(c++,n=e[c],"\\"!==n||!_()){if(l=T(n),i=L[u],o=i[l]||i.l||8,8===o)return;if(u=o[0],void 0!==o[1]&&(s=f[o[1]],s&&(r=n,!1===s())))return;if(7===u)return t}}(t),n&&F.set(t,n)),!n)return null;const a=n.length;let r=e,l=0;for(;l<a;){const e=r[n[l]];if(void 0===e)return null;r=e,l++}return r},j=C,e.I18nInjectionKey=a("global-vue-i18n"),e.VERSION=oe,e.castToVueI18n=e=>{if(!fe(e))throw Error(ce.NOT_COMPATIBLE_LEGACY_VUE_I18N);return e},e.createI18n=function(e={},t){if(ke)return ke;Ee=t;const n=!b(e.legacy)||e.legacy,r=new Map,l=function(e,t,n){if(!fe(n))throw Error(ce.NOT_COMPATIBLE_LEGACY_VUE_I18N);return ve(e,n)}(e,0,t);a("");{const e=l[me];Object.defineProperty(e,"global",{get:()=>l}),Object.defineProperty(e,"mode",{get:()=>n?"legacy":"composition"}),Object.defineProperty(e,"__instances",{get:()=>r}),Object.defineProperty(e,"install",{value:t=>{if(2!==(t&&t.version&&Number(t.version.split(".")[0])||-1))throw Error(ce.BRIDGE_SUPPORT_VUE_2_ONLY);t.mixin(function(e,t){return{beforeCreate(){const n=this.$options;if(!n.__VUE18N__INSTANCE__)if(n.i18n=n.i18n||(n.__i18n?{}:null),this._i18nBridgeRoot=e,"composition"!==e.mode)if(n.i18n){if(n.i18n instanceof t){if(n.__i18n)try{const e=n.i18n&&n.i18n.messages?n.i18n.messages:{};n.__i18n.forEach((t=>be(e,JSON.parse(t)))),Object.keys(e).forEach((t=>{n.i18n.mergeLocaleMessage(t,e[t])}))}catch(e){}this._i18n=n.i18n,this._i18nWatcher=this._i18n.watchI18nData()}else if(E(n.i18n)){const e=this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof t?this.$root.$i18n:null;if(e&&(n.i18n.root=this.$root,n.i18n.formatter=e.formatter,n.i18n.fallbackLocale=e.fallbackLocale,n.i18n.formatFallbackMessages=e.formatFallbackMessages,n.i18n.silentTranslationWarn=e.silentTranslationWarn,n.i18n.silentFallbackWarn=e.silentFallbackWarn,n.i18n.pluralizationRules=e.pluralizationRules,n.i18n.preserveDirectiveContent=e.preserveDirectiveContent),n.__i18n)try{const e=n.i18n&&n.i18n.messages?n.i18n.messages:{};n.__i18n.forEach((t=>be(e,JSON.parse(t)))),n.i18n.messages=e}catch(e){}const{sharedMessages:a}=n.i18n;a&&E(a)&&be(n.i18n.messages,a),this._i18n=new t(n.i18n),this._i18nWatcher=this._i18n.watchI18nData(),(void 0===n.i18n.sync||n.i18n.sync)&&(this._localeWatcher=this.$i18n.watchLocale()),e&&e.onComponentInstanceCreated(this._i18n)}}else this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof t?this._i18n=this.$root.$i18n:n.parent&&n.parent.$i18n&&n.parent.$i18n instanceof t&&(this._i18n=n.parent.$i18n);else this._i18n=e},beforeMount(){const e=this.$options;e.__VUE18N__INSTANCE__||(e.i18n=e.i18n||(e.__i18n?{}:null),e.i18n?(e.i18n instanceof t||E(e.i18n))&&(this._i18n.subscribeDataChanging(this),this._subscribing=!0):(this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof t||e.parent&&e.parent.$i18n&&e.parent.$i18n instanceof t)&&(this._i18n.subscribeDataChanging(this),this._subscribing=!0))},beforeDestroy(){if(this.$options.__VUE18N__INSTANCE__)return;if(this._i18nBridgeRoot)return void delete this._i18nBridgeRoot;if("composition"===e.mode)return void delete this._i18n;if(!this._i18n)return;const t=this;this.$nextTick((()=>{t._subscribing&&(t._i18n.unsubscribeDataChanging(t),delete t._subscribing),t._i18nWatcher&&(t._i18nWatcher(),t._i18n.destroyVM(),delete t._i18nWatcher),t._localeWatcher&&(t._localeWatcher(),delete t._localeWatcher)}))}}}(e,Ee))}});const t={__getInstance:function(e){return r.get(e)||null},__setInstance:function(e,t){r.set(e,t)},__deleteInstance:function(e){r.delete(e)}};return Object.keys(t).forEach((n=>Object.defineProperty(e,n,{value:t[n]}))),ke=e,e}},e.useI18n=function(e={}){const n=t.getCurrentInstance();if(null==n)throw Error(ce.MUST_BE_CALL_SETUP_TOP);if(null==Ee||null==ke)throw Error(ce.NOT_INSLALLED);const a=function(e){{const t=e.proxy;if(null==t)throw Error(ce.UNEXPECTED_ERROR);const n=t._i18nBridgeRoot;if(!n)throw Error(ce.NOT_INSLALLED);return n}}(n),r=function(e){return e.global}(a),l=function(e){return e.proxy.$options}(n),o=function(e,t){return s(e)?"__i18n"in t?"local":"global":e.useScope?e.useScope:"local"}(e,l);if("global"===o)return function(e,t,n){let a=d(t.messages)?t.messages:{};"__i18nGlobal"in n&&(a=ge(e.locale.value,{messages:a,__i18n:n.__i18nGlobal}));const r=Object.keys(a);r.length&&r.forEach((t=>{e.mergeLocaleMessage(t,a[t])}));if(d(t.datetimeFormats)){const n=Object.keys(t.datetimeFormats);n.length&&n.forEach((n=>{e.mergeDateTimeFormat(n,t.datetimeFormats[n])}))}if(d(t.numberFormats)){const n=Object.keys(t.numberFormats);n.length&&n.forEach((n=>{e.mergeNumberFormat(n,t.numberFormats[n])}))}}(r,e,l),r;if("parent"===o){let e=function(e,t){let n=null;const a=t.root;let r=t.parent;for(;null!=r;){const t=e;if("composition"===e.mode)n=t.__getInstance(r);else{const e=t.__getInstance(r);null!=e&&(n=e.__composer)}if(null!=n)break;if(a===r)break;r=r.parent}return n}(a,n);return null==e&&(e=r),e}if("legacy"===a.mode)throw Error(ce.NOT_AVAILABLE_IN_LEGACY_MODE);const i=a;let u=i.__getInstance(n);if(null==u){const a=c({},e);"__i18n"in l&&(a.__i18n=l.__i18n),r&&(a.__root=r),u=ve(a,Ee),function(e,n,a){{const r=n.proxy;if(null==r)throw Error(ce.UNEXPECTED_ERROR);const l=a[me];if(l===e)throw Error(ce.UNEXPECTED_ERROR);r._i18n=l,r._i18n_bridge=!0,r._i18nWatcher=r._i18n.watchI18nData(),r._i18n._sync&&(r._localeWatcher=r._i18n.watchLocale());let o=!1;t.onBeforeMount((()=>{r._i18n.subscribeDataChanging(r),o=!0}),n),t.onUnmounted((()=>{o&&(r._i18n.unsubscribeDataChanging(r),o=!1),r._i18nWatcher&&(r._i18nWatcher(),r._i18n.destroyVM(),delete r._i18nWatcher),r._localeWatcher&&(r._localeWatcher(),delete r._localeWatcher),delete r._i18n_bridge,delete r._i18n}),n)}}(i,n,u),i.__setInstance(n,u)}return u},Object.defineProperty(e,"__esModule",{value:!0}),e}({},VueCompositionAPI); |
{ | ||
"name": "vue-i18n-bridge", | ||
"version": "9.2.0-beta.7", | ||
"version": "9.2.0-beta.8", | ||
"description": "A bridge for Vue I18n Legacy", | ||
@@ -39,5 +39,5 @@ "keywords": [ | ||
"dependencies": { | ||
"@intlify/core-base": "9.2.0-beta.7", | ||
"@intlify/shared": "9.2.0-beta.7", | ||
"@intlify/vue-devtools": "9.2.0-beta.7", | ||
"@intlify/core-base": "9.2.0-beta.8", | ||
"@intlify/shared": "9.2.0-beta.8", | ||
"@intlify/vue-devtools": "9.2.0-beta.8", | ||
"@vue/composition-api": "^1.2.1", | ||
@@ -47,3 +47,3 @@ "@vue/devtools-api": "^6.0.0-beta.13" | ||
"devDependencies": { | ||
"@intlify/devtools-if": "9.2.0-beta.7" | ||
"@intlify/devtools-if": "9.2.0-beta.8" | ||
}, | ||
@@ -50,0 +50,0 @@ "peerDependencies": { |
@@ -42,3 +42,3 @@ # π vue-i18n-bridge | ||
<script src="https://cdn.jsdelivr.net/npm/@vue/composition-api@1.2"></script> | ||
<script src="https://unpkg.com/vue-i18n-bridge@9.2.0-beta.5/dist/vue-i18n-bridge.global.prod.js"></script> | ||
<script src="https://unpkg.com/vue-i18n-bridge@9.2.0-beta.8/dist/vue-i18n-bridge.global.prod.js"></script> | ||
``` | ||
@@ -123,2 +123,33 @@ | ||
For TypeScript: | ||
```ts | ||
import Vue from 'vue' | ||
import VueCompositionAPI from '@vue/composition-api' | ||
import { createI18n, useI18n, castToVueI18n } from 'vue-i18n-bridge' | ||
Vue.use(VueCompositionAPI) | ||
Vue.use(VueI18n, { bridge: true }) | ||
const i18n = createI18n({ | ||
locale: 'ja', | ||
messages: { | ||
en: { | ||
message: { | ||
hello: 'hello, {name}!' | ||
} | ||
}, | ||
ja: { | ||
message: { | ||
hello: 'γγγ«γ‘γ―γ{name}οΌ' | ||
} | ||
} | ||
} | ||
}, VueI18n) | ||
Vue.use(i18n) | ||
const app = new Vue({ i18n: castToVueI18n(i18n) }) // you need to cast `i18n` instance | ||
app.$mount('#app') | ||
``` | ||
### Usage UMD module in browser | ||
@@ -125,0 +156,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
954291
22418
221
+ Added@intlify/core-base@9.2.0-beta.8(transitive)
+ Added@intlify/devtools-if@9.2.0-beta.8(transitive)
+ Added@intlify/message-compiler@9.2.0-beta.8(transitive)
+ Added@intlify/shared@9.2.0-beta.8(transitive)
+ Added@intlify/vue-devtools@9.2.0-beta.8(transitive)
- Removed@intlify/core-base@9.2.0-beta.7(transitive)
- Removed@intlify/devtools-if@9.2.0-beta.7(transitive)
- Removed@intlify/message-compiler@9.2.0-beta.7(transitive)
- Removed@intlify/shared@9.2.0-beta.7(transitive)
- Removed@intlify/vue-devtools@9.2.0-beta.7(transitive)
Updated@intlify/shared@9.2.0-beta.8