vue-i18n-bridge
Advanced tools
Comparing version 9.3.0-beta.15 to 9.3.0-beta.16
/*! | ||
* vue-i18n-bridge v9.3.0-beta.15 | ||
* vue-i18n-bridge v9.3.0-beta.16 | ||
* (c) 2023 kazuya kawaguchi | ||
* Released under the MIT License. | ||
*/ | ||
import{ref,computed,watch,getCurrentInstance,defineComponent,h,effectScope,onBeforeMount,onUnmounted,shallowRef}from"vue-demi";const inBrowser="undefined"!=typeof window,makeSymbol=(e,t=!1)=>t?Symbol.for(e):Symbol(e),generateFormatCacheKey=(e,t,n)=>friendlyJSONstringify({l:e,k:t,s:n}),friendlyJSONstringify=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),isNumber=e=>"number"==typeof e&&isFinite(e),isDate=e=>"[object Date]"===toTypeString(e),isRegExp=e=>"[object RegExp]"===toTypeString(e),isEmptyObject=e=>isPlainObject(e)&&0===Object.keys(e).length;function warn(e,t){"undefined"!=typeof console&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}const assign=Object.assign;function escapeHtml(e){return e.replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}const hasOwnProperty=Object.prototype.hasOwnProperty;function hasOwn(e,t){return hasOwnProperty.call(e,t)}const isArray=Array.isArray,isFunction=e=>"function"==typeof e,isString=e=>"string"==typeof e,isBoolean=e=>"boolean"==typeof e,isObject=e=>null!==e&&"object"==typeof e,objectToString=Object.prototype.toString,toTypeString=e=>objectToString.call(e),isPlainObject=e=>"[object Object]"===toTypeString(e),toDisplayString=e=>null==e?"":isArray(e)||isPlainObject(e)&&e.toString===objectToString?JSON.stringify(e,null,2):String(e),CompileErrorCodes={EXPECTED_TOKEN:1,INVALID_TOKEN_IN_PLACEHOLDER:2,UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER:3,UNKNOWN_ESCAPE_SEQUENCE:4,INVALID_UNICODE_ESCAPE_SEQUENCE:5,UNBALANCED_CLOSING_BRACE:6,UNTERMINATED_CLOSING_BRACE:7,EMPTY_PLACEHOLDER:8,NOT_ALLOW_NEST_PLACEHOLDER:9,INVALID_LINKED_FORMAT:10,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14,__EXTEND_POINT__:15};function createCompileError(e,t,n={}){const{domain:r,messages:a,args:o}=n,s=new SyntaxError(String(e));return s.code=e,t&&(s.location=t),s.domain=r,s}function defaultOnError(e){throw e}function createPosition(e,t,n){return{line:e,column:t,offset:n}}function createLocation(e,t,n){const r={start:e,end:t};return null!=n&&(r.source=n),r}const CHAR_SP=" ",CHAR_CR="\r",CHAR_LF="\n",CHAR_LS=String.fromCharCode(8232),CHAR_PS=String.fromCharCode(8233);function createScanner(e){const t=e;let n=0,r=1,a=1,o=0;const s=e=>"\r"===t[e]&&"\n"===t[e+1],l=e=>t[e]===CHAR_PS,i=e=>t[e]===CHAR_LS,c=e=>s(e)||(e=>"\n"===t[e])(e)||l(e)||i(e),u=e=>s(e)||l(e)||i(e)?"\n":t[e];function m(){return o=0,c(n)&&(r++,a=0),s(n)&&n++,n++,a++,t[n]}return{index:()=>n,line:()=>r,column:()=>a,peekOffset:()=>o,charAt:u,currentChar:()=>u(n),currentPeek:()=>u(n+o),next:m,peek:function(){return s(n+o)&&o++,o++,t[n+o]},reset:function(){n=0,r=1,a=1,o=0},resetPeek:function(e=0){o=e},skipToPeek:function(){const e=n+o;for(;e!==n;)m();o=0}}}const EOF=void 0,LITERAL_DELIMITER="'",ERROR_DOMAIN$1="tokenizer";function createTokenizer(e,t={}){const n=!1!==t.location,r=createScanner(e),a=()=>r.index(),o=()=>createPosition(r.line(),r.column(),r.index()),s=o(),l=a(),i={currentType:14,offset:l,startLoc:s,endLoc:s,lastType:14,lastOffset:l,lastStartLoc:s,lastEndLoc:s,braceNest:0,inLinked:!1,text:""},c=()=>i,{onError:u}=t;function m(e,t,r){e.endLoc=o(),e.currentType=t;const a={type:t};return n&&(a.loc=createLocation(e.startLoc,e.endLoc)),null!=r&&(a.value=r),a}const f=e=>m(e,14);function p(e,t){return e.currentChar()===t?(e.next(),t):(o(),"")}function g(e){let t="";for(;" "===e.currentPeek()||"\n"===e.currentPeek();)t+=e.currentPeek(),e.peek();return t}function d(e){const t=g(e);return e.skipToPeek(),t}function _(e){if(e===EOF)return!1;const t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||95===t}function b(e,t){const{currentType:n}=t;if(2!==n)return!1;g(e);const r=function(e){if(e===EOF)return!1;const t=e.charCodeAt(0);return t>=48&&t<=57}("-"===e.currentPeek()?e.peek():e.currentPeek());return e.resetPeek(),r}function h(e){g(e);const t="|"===e.currentPeek();return e.resetPeek(),t}function v(e,t=!0){const n=(t=!1,r="",a=!1)=>{const o=e.currentPeek();return"{"===o?"%"!==r&&t:"@"!==o&&o?"%"===o?(e.peek(),n(t,"%",!0)):"|"===o?!("%"!==r&&!a)||!(" "===r||"\n"===r):" "===o?(e.peek(),n(!0," ",a)):"\n"!==o||(e.peek(),n(!0,"\n",a)):"%"===r||t},r=n();return t&&e.resetPeek(),r}function E(e,t){const n=e.currentChar();return n===EOF?EOF:t(n)?(e.next(),n):null}function y(e){return E(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 O(e){return E(e,(e=>{const t=e.charCodeAt(0);return t>=48&&t<=57}))}function k(e){return E(e,(e=>{const t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}))}function N(e){let t="",n="";for(;t=O(e);)n+=t;return n}function L(e){let t="";for(;;){const n=e.currentChar();if("{"===n||"}"===n||"@"===n||"|"===n||!n)break;if("%"===n){if(!v(e))break;t+=n,e.next()}else if(" "===n||"\n"===n)if(v(e))t+=n,e.next();else{if(h(e))break;t+=n,e.next()}else t+=n,e.next()}return t}function T(e){const t=e.currentChar();switch(t){case"\\":case"'":return e.next(),`\\${t}`;case"u":return S(e,t,4);case"U":return S(e,t,6);default:return o(),""}}function S(e,t,n){p(e,t);let r="";for(let t=0;t<n;t++){const t=k(e);if(!t){o(),e.currentChar();break}r+=t}return`\\${t}${r}`}function C(e){d(e);const t=p(e,"|");return d(e),t}function I(e,t){let n=null;switch(e.currentChar()){case"{":return t.braceNest>=1&&o(),e.next(),n=m(t,2,"{"),d(e),t.braceNest++,n;case"}":return t.braceNest>0&&2===t.currentType&&o(),e.next(),n=m(t,3,"}"),t.braceNest--,t.braceNest>0&&d(e),t.inLinked&&0===t.braceNest&&(t.inLinked=!1),n;case"@":return t.braceNest>0&&o(),n=F(e,t)||f(t),t.braceNest=0,n;default:let r=!0,a=!0,s=!0;if(h(e))return t.braceNest>0&&o(),n=m(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 o(),t.braceNest=0,P(e,t);if(r=function(e,t){const{currentType:n}=t;if(2!==n)return!1;g(e);const r=_(e.currentPeek());return e.resetPeek(),r}(e,t))return n=m(t,5,function(e){d(e);let t="",n="";for(;t=y(e);)n+=t;return e.currentChar()===EOF&&o(),n}(e)),d(e),n;if(a=b(e,t))return n=m(t,6,function(e){d(e);let t="";return"-"===e.currentChar()?(e.next(),t+=`-${N(e)}`):t+=N(e),e.currentChar()===EOF&&o(),t}(e)),d(e),n;if(s=function(e,t){const{currentType:n}=t;if(2!==n)return!1;g(e);const r="'"===e.currentPeek();return e.resetPeek(),r}(e,t))return n=m(t,7,function(e){d(e),p(e,"'");let t="",n="";const r=e=>"'"!==e&&"\n"!==e;for(;t=E(e,r);)n+="\\"===t?T(e):t;const a=e.currentChar();return"\n"===a||a===EOF?(o(),"\n"===a&&(e.next(),p(e,"'")),n):(p(e,"'"),n)}(e)),d(e),n;if(!r&&!a&&!s)return n=m(t,13,function(e){d(e);let t="",n="";const r=e=>"{"!==e&&"}"!==e&&" "!==e&&"\n"!==e;for(;t=E(e,r);)n+=t;return n}(e)),o(),n.value,d(e),n}return n}function F(e,t){const{currentType:n}=t;let r=null;const a=e.currentChar();switch(8!==n&&9!==n&&12!==n&&10!==n||"\n"!==a&&" "!==a||o(),a){case"@":return e.next(),r=m(t,8,"@"),t.inLinked=!0,r;case".":return d(e),e.next(),m(t,9,".");case":":return d(e),e.next(),m(t,10,":");default:return h(e)?(r=m(t,1,C(e)),t.braceNest=0,t.inLinked=!1,r):function(e,t){const{currentType:n}=t;if(8!==n)return!1;g(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;g(e);const r=":"===e.currentPeek();return e.resetPeek(),r}(e,t)?(d(e),F(e,t)):function(e,t){const{currentType:n}=t;if(9!==n)return!1;g(e);const r=_(e.currentPeek());return e.resetPeek(),r}(e,t)?(d(e),m(t,12,function(e){let t="",n="";for(;t=y(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?_(e.peek()):!("@"===t||"%"===t||"|"===t||":"===t||"."===t||" "===t||!t)&&("\n"===t?(e.peek(),r()):_(t))},a=r();return e.resetPeek(),a}(e,t)?(d(e),"{"===a?I(e,t)||r:m(t,11,function(e){const t=(n=!1,r)=>{const a=e.currentChar();return"{"!==a&&"%"!==a&&"@"!==a&&"|"!==a&&a?" "===a?r:"\n"===a?(r+=a,e.next(),t(n,r)):(r+=a,e.next(),t(!0,r)):r};return t(!1,"")}(e))):(8===n&&o(),t.braceNest=0,t.inLinked=!1,P(e,t))}}function P(e,t){let n={type:14};if(t.braceNest>0)return I(e,t)||f(t);if(t.inLinked)return F(e,t)||f(t);switch(e.currentChar()){case"{":return I(e,t)||f(t);case"}":return o(),e.next(),m(t,3,"}");case"@":return F(e,t)||f(t);default:if(h(e))return n=m(t,1,C(e)),t.braceNest=0,t.inLinked=!1,n;const{isModulo:r,hasSpace:a}=function(e){const t=g(e),n="%"===e.currentPeek()&&"{"===e.peek();return e.resetPeek(),{isModulo:n,hasSpace:t.length>0}}(e);if(r)return a?m(t,0,L(e)):m(t,4,function(e){d(e);return"%"!==e.currentChar()&&o(),e.next(),"%"}(e));if(v(e))return m(t,0,L(e))}return n}return{nextToken:function(){const{currentType:e,offset:t,startLoc:n,endLoc:s}=i;return i.lastType=e,i.lastOffset=t,i.lastStartLoc=n,i.lastEndLoc=s,i.offset=a(),i.startLoc=o(),r.currentChar()===EOF?m(i,14):P(r,i)},currentOffset:a,currentPosition:o,context:c}}const ERROR_DOMAIN="parser",KNOWN_ESCAPES=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function fromEscapeSequence(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 createParser(e={}){const t=!1!==e.location,{onError:n}=e;function r(e,n,r){const a={type:e,start:n,end:n};return t&&(a.loc={start:r,end:r}),a}function a(e,n,r,a){e.end=n,a&&(e.type=a),t&&e.loc&&(e.loc.end=r)}function o(e,t){const n=e.context(),o=r(3,n.offset,n.startLoc);return o.value=t,a(o,e.currentOffset(),e.currentPosition()),o}function s(e,t){const n=e.context(),{lastOffset:o,lastStartLoc:s}=n,l=r(5,o,s);return l.index=parseInt(t,10),e.nextToken(),a(l,e.currentOffset(),e.currentPosition()),l}function l(e,t){const n=e.context(),{lastOffset:o,lastStartLoc:s}=n,l=r(4,o,s);return l.key=t,e.nextToken(),a(l,e.currentOffset(),e.currentPosition()),l}function i(e,t){const n=e.context(),{lastOffset:o,lastStartLoc:s}=n,l=r(9,o,s);return l.value=t.replace(KNOWN_ESCAPES,fromEscapeSequence),e.nextToken(),a(l,e.currentOffset(),e.currentPosition()),l}function c(e){const t=e.context(),n=r(6,t.offset,t.startLoc);let o=e.nextToken();if(9===o.type){const t=function(e){const t=e.nextToken(),n=e.context(),{lastOffset:o,lastStartLoc:s}=n,l=r(8,o,s);return 12!==t.type?(n.lastStartLoc,l.value="",a(l,o,s),{nextConsumeToken:t,node:l}):(null==t.value&&(n.lastStartLoc,getTokenCaption(t)),l.value=t.value||"",a(l,e.currentOffset(),e.currentPosition()),{node:l})}(e);n.modifier=t.node,o=t.nextConsumeToken||e.nextToken()}switch(10!==o.type&&(t.lastStartLoc,getTokenCaption(o)),o=e.nextToken(),2===o.type&&(o=e.nextToken()),o.type){case 11:null==o.value&&(t.lastStartLoc,getTokenCaption(o)),n.key=function(e,t){const n=e.context(),o=r(7,n.offset,n.startLoc);return o.value=t,a(o,e.currentOffset(),e.currentPosition()),o}(e,o.value||"");break;case 5:null==o.value&&(t.lastStartLoc,getTokenCaption(o)),n.key=l(e,o.value||"");break;case 6:null==o.value&&(t.lastStartLoc,getTokenCaption(o)),n.key=s(e,o.value||"");break;case 7:null==o.value&&(t.lastStartLoc,getTokenCaption(o)),n.key=i(e,o.value||"");break;default:t.lastStartLoc;const c=e.context(),u=r(7,c.offset,c.startLoc);return u.value="",a(u,c.offset,c.startLoc),n.key=u,a(n,c.offset,c.startLoc),{nextConsumeToken:o,node:n}}return a(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 r=u||e.nextToken();switch(u=null,r.type){case 0:null==r.value&&(t.lastStartLoc,getTokenCaption(r)),n.items.push(o(e,r.value||""));break;case 6:null==r.value&&(t.lastStartLoc,getTokenCaption(r)),n.items.push(s(e,r.value||""));break;case 5:null==r.value&&(t.lastStartLoc,getTokenCaption(r)),n.items.push(l(e,r.value||""));break;case 7:null==r.value&&(t.lastStartLoc,getTokenCaption(r)),n.items.push(i(e,r.value||""));break;case 8:const a=c(e);n.items.push(a.node),u=a.nextConsumeToken||null}}while(14!==t.currentType&&1!==t.currentType);return a(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:o}=t,s=u(e);return 14===t.currentType?s:function(e,t,n,o){const s=e.context();let l=0===o.items.length;const i=r(1,t,n);i.cases=[],i.cases.push(o);do{const t=u(e);l||(l=0===t.items.length),i.cases.push(t)}while(14!==s.currentType);return a(i,e.currentOffset(),e.currentPosition()),i}(e,n,o,s)}return{parse:function(n){const o=createTokenizer(n,assign({},e)),s=o.context(),l=r(0,s.offset,s.startLoc);return t&&l.loc&&(l.loc.source=n),l.body=m(o),14!==s.currentType&&(s.lastStartLoc,n[s.offset]),a(l,o.currentOffset(),o.currentPosition()),l}}}function getTokenCaption(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 createTransformer(e,t={}){const n={ast:e,helpers:new Set};return{context:()=>n,helper:e=>(n.helpers.add(e),e)}}function traverseNodes(e,t){for(let n=0;n<e.length;n++)traverseNode(e[n],t)}function traverseNode(e,t){switch(e.type){case 1:traverseNodes(e.cases,t),t.helper("plural");break;case 2:traverseNodes(e.items,t);break;case 6:traverseNode(e.key,t),t.helper("linked"),t.helper("type");break;case 5:t.helper("interpolate"),t.helper("list");break;case 4:t.helper("interpolate"),t.helper("named")}}function transform(e,t={}){const n=createTransformer(e);n.helper("normalize"),e.body&&traverseNode(e.body,n);const r=n.context();e.helpers=Array.from(r.helpers)}function createCodeGenerator(e,t){const{sourceMap:n,filename:r,breakLineCode:a,needIndent:o}=t,s={source:e.loc.source,filename:r,code:"",column:1,line:1,offset:0,map:void 0,breakLineCode:a,needIndent:o,indentLevel:0};function l(e,t){s.code+=e}function i(e,t=!0){const n=t?a:"";l(o?n+" ".repeat(e):n)}return{context:()=>s,push:l,indent:function(e=!0){const t=++s.indentLevel;e&&i(t)},deindent:function(e=!0){const t=--s.indentLevel;e&&i(t)},newline:function(){i(s.indentLevel)},helper:e=>`_${e}`,needIndent:()=>s.needIndent}}function generateLinkedNode(e,t){const{helper:n}=e;e.push(`${n("linked")}(`),generateNode(e,t.key),t.modifier?(e.push(", "),generateNode(e,t.modifier),e.push(", _type")):e.push(", undefined, _type"),e.push(")")}function generateMessageNode(e,t){const{helper:n,needIndent:r}=e;e.push(`${n("normalize")}([`),e.indent(r());const a=t.items.length;for(let n=0;n<a&&(generateNode(e,t.items[n]),n!==a-1);n++)e.push(", ");e.deindent(r()),e.push("])")}function generatePluralNode(e,t){const{helper:n,needIndent:r}=e;if(t.cases.length>1){e.push(`${n("plural")}([`),e.indent(r());const a=t.cases.length;for(let n=0;n<a&&(generateNode(e,t.cases[n]),n!==a-1);n++)e.push(", ");e.deindent(r()),e.push("])")}}function generateResource(e,t){t.body?generateNode(e,t.body):e.push("null")}function generateNode(e,t){const{helper:n}=e;switch(t.type){case 0:generateResource(e,t);break;case 1:generatePluralNode(e,t);break;case 2:generateMessageNode(e,t);break;case 6:generateLinkedNode(e,t);break;case 8:case 7:case 9:case 3: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)}}const generate=(e,t={})=>{const n=isString(t.mode)?t.mode:"normal",r=isString(t.filename)?t.filename:"message.intl",a=!!t.sourceMap,o=null!=t.breakLineCode?t.breakLineCode:"arrow"===n?";":"\n",s=t.needIndent?t.needIndent:"arrow"!==n,l=e.helpers||[],i=createCodeGenerator(e,{mode:n,filename:r,sourceMap:a,breakLineCode:o,needIndent:s});i.push("normal"===n?"function __msg__ (ctx) {":"(ctx) => {"),i.indent(s),l.length>0&&(i.push(`const { ${l.map((e=>`${e}: _${e}`)).join(", ")} } = ctx`),i.newline()),i.push("return "),generateNode(i,e),i.deindent(s),i.push("}");const{code:c,map:u}=i.context();return{ast:e,code:c,map:u?u.toJSON():void 0}};function baseCompile(e,t={}){const n=assign({},t),r=createParser(n).parse(e);return transform(r,n),generate(r,n)}const pathStateMachine=[];pathStateMachine[0]={w:[0],i:[3,0],"[":[4],o:[7]},pathStateMachine[1]={w:[1],".":[2],"[":[4],o:[7]},pathStateMachine[2]={w:[2],i:[3,0],0:[3,0]},pathStateMachine[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},pathStateMachine[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},pathStateMachine[5]={"'":[4,0],o:8,l:[5,0]},pathStateMachine[6]={'"':[4,0],o:8,l:[6,0]};const literalValueRE=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function isLiteral(e){return literalValueRE.test(e)}function stripQuotes(e){const t=e.charCodeAt(0);return t!==e.charCodeAt(e.length-1)||34!==t&&39!==t?e:e.slice(1,-1)}function getPathCharType(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 formatSubPath(e){const t=e.trim();return("0"!==e.charAt(0)||!isNaN(parseInt(e)))&&(isLiteral(t)?stripQuotes(t):"*"+t)}function parse(e){const t=[];let n,r,a,o,s,l,i,c=-1,u=0,m=0;const f=[];function p(){const t=e[c+1];if(5===u&&"'"===t||6===u&&'"'===t)return c++,a="\\"+t,f[0](),!0}for(f[0]=()=>{void 0===r?r=a:r+=a},f[1]=()=>{void 0!==r&&(t.push(r),r=void 0)},f[2]=()=>{f[0](),m++},f[3]=()=>{if(m>0)m--,u=4,f[0]();else{if(m=0,void 0===r)return!1;if(r=formatSubPath(r),!1===r)return!1;f[1]()}};null!==u;)if(c++,n=e[c],"\\"!==n||!p()){if(o=getPathCharType(n),i=pathStateMachine[u],s=i[o]||i.l||8,8===s)return;if(u=s[0],void 0!==s[1]&&(l=f[s[1]],l&&(a=n,!1===l())))return;if(7===u)return t}}const cache=new Map;function resolveWithKeyValue(e,t){return isObject(e)?e[t]:null}function resolveValue(e,t){if(!isObject(e))return null;let n=cache.get(t);if(n||(n=parse(t),n&&cache.set(t,n)),!n)return null;const r=n.length;let a=e,o=0;for(;o<r;){const e=a[n[o]];if(void 0===e)return null;a=e,o++}return a}const DEFAULT_MODIFIER=e=>e,DEFAULT_MESSAGE=e=>"",DEFAULT_MESSAGE_DATA_TYPE="text",DEFAULT_NORMALIZE=e=>0===e.length?"":e.join(""),DEFAULT_INTERPOLATE=toDisplayString;function pluralDefault(e,t){return e=Math.abs(e),2===t?e?e>1?1:0:1:e?Math.min(e,2):0}function getPluralIndex(e){const t=isNumber(e.pluralIndex)?e.pluralIndex:-1;return e.named&&(isNumber(e.named.count)||isNumber(e.named.n))?isNumber(e.named.count)?e.named.count:isNumber(e.named.n)?e.named.n:t:t}function normalizeNamed(e,t){t.count||(t.count=e),t.n||(t.n=e)}function createMessageContext(e={}){const t=e.locale,n=getPluralIndex(e),r=isObject(e.pluralRules)&&isString(t)&&isFunction(e.pluralRules[t])?e.pluralRules[t]:pluralDefault,a=isObject(e.pluralRules)&&isString(t)&&isFunction(e.pluralRules[t])?pluralDefault:void 0,o=e.list||[],s=e.named||{};isNumber(e.pluralIndex)&&normalizeNamed(n,s);function l(t){const n=isFunction(e.messages)?e.messages(t):!!isObject(e.messages)&&e.messages[t];return n||(e.parent?e.parent.message(t):DEFAULT_MESSAGE)}const i=isPlainObject(e.processor)&&isFunction(e.processor.normalize)?e.processor.normalize:DEFAULT_NORMALIZE,c=isPlainObject(e.processor)&&isFunction(e.processor.interpolate)?e.processor.interpolate:DEFAULT_INTERPOLATE,u={list:e=>o[e],named:e=>s[e],plural:e=>e[r(n,e.length,a)],linked:(t,...n)=>{const[r,a]=n;let o="text",s="";1===n.length?isObject(r)?(s=r.modifier||s,o=r.type||o):isString(r)&&(s=r||s):2===n.length&&(isString(r)&&(s=r||s),isString(a)&&(o=a||o));let i=l(t)(u);return"vnode"===o&&isArray(i)&&s&&(i=i[0]),s?(c=s,e.modifiers?e.modifiers[c]:DEFAULT_MODIFIER)(i,o):i;var c},message:l,type:isPlainObject(e.processor)&&isString(e.processor.type)?e.processor.type:"text",interpolate:c,normalize:i};return u}function fallbackWithSimple(e,t,n){return[...new Set([n,...isArray(t)?t:isObject(t)?Object.keys(t):isString(t)?[t]:[n]])]}function fallbackWithLocaleChain(e,t,n){const r=isString(n)?n:DEFAULT_LOCALE,a=e;a.__localeChainCache||(a.__localeChainCache=new Map);let o=a.__localeChainCache.get(r);if(!o){o=[];let e=[n];for(;isArray(e);)e=appendBlockToChain(o,e,t);const s=isArray(t)||!isPlainObject(t)?t:t.default?t.default:null;e=isString(s)?[s]:s,isArray(e)&&appendBlockToChain(o,e,!1),a.__localeChainCache.set(r,o)}return o}function appendBlockToChain(e,t,n){let r=!0;for(let a=0;a<t.length&&isBoolean(r);a++){const o=t[a];isString(o)&&(r=appendLocaleToChain(e,t[a],n))}return r}function appendLocaleToChain(e,t,n){let r;const a=t.split("-");do{r=appendItemToChain(e,a.join("-"),n),a.splice(-1,1)}while(a.length&&!0===r);return r}function appendItemToChain(e,t,n){let r=!1;if(!e.includes(t)&&(r=!0,t)){r="!"!==t[t.length-1];const a=t.replace(/!/g,"");e.push(a),(isArray(n)||isPlainObject(n))&&n[a]&&(r=n[a])}return r}const VERSION$1="9.3.0-beta.15",NOT_REOSLVED=-1,DEFAULT_LOCALE="en-US",MISSING_RESOLVE_VALUE="",capitalize=e=>`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;function getDefaultLinkedModifiers(){return{upper:(e,t)=>"text"===t&&isString(e)?e.toUpperCase():"vnode"===t&&isObject(e)&&"__v_isVNode"in e?e.children.toUpperCase():e,lower:(e,t)=>"text"===t&&isString(e)?e.toLowerCase():"vnode"===t&&isObject(e)&&"__v_isVNode"in e?e.children.toLowerCase():e,capitalize:(e,t)=>"text"===t&&isString(e)?capitalize(e):"vnode"===t&&isObject(e)&&"__v_isVNode"in e?capitalize(e.children):e}}let _compiler,_resolver,_fallbacker;function registerMessageCompiler(e){_compiler=e}function registerMessageResolver(e){_resolver=e}function registerLocaleFallbacker(e){_fallbacker=e}let _cid=0;function createCoreContext(e={}){const t=isString(e.version)?e.version:VERSION$1,n=isString(e.locale)?e.locale:DEFAULT_LOCALE,r=isArray(e.fallbackLocale)||isPlainObject(e.fallbackLocale)||isString(e.fallbackLocale)||!1===e.fallbackLocale?e.fallbackLocale:n,a=isPlainObject(e.messages)?e.messages:{[n]:{}},o=isPlainObject(e.datetimeFormats)?e.datetimeFormats:{[n]:{}},s=isPlainObject(e.numberFormats)?e.numberFormats:{[n]:{}},l=assign({},e.modifiers||{},getDefaultLinkedModifiers()),i=e.pluralRules||{},c=isFunction(e.missing)?e.missing:null,u=!isBoolean(e.missingWarn)&&!isRegExp(e.missingWarn)||e.missingWarn,m=!isBoolean(e.fallbackWarn)&&!isRegExp(e.fallbackWarn)||e.fallbackWarn,f=!!e.fallbackFormat,p=!!e.unresolving,g=isFunction(e.postTranslation)?e.postTranslation:null,d=isPlainObject(e.processor)?e.processor:null,_=!isBoolean(e.warnHtmlMessage)||e.warnHtmlMessage,b=!!e.escapeParameter,h=isFunction(e.messageCompiler)?e.messageCompiler:_compiler,v=isFunction(e.messageResolver)?e.messageResolver:_resolver||resolveWithKeyValue,E=isFunction(e.localeFallbacker)?e.localeFallbacker:_fallbacker||fallbackWithSimple,y=isObject(e.fallbackContext)?e.fallbackContext:void 0,O=isFunction(e.onWarn)?e.onWarn:warn,k=e,N=isObject(k.__datetimeFormatters)?k.__datetimeFormatters:new Map,L=isObject(k.__numberFormatters)?k.__numberFormatters:new Map,T=isObject(k.__meta)?k.__meta:{};_cid++;const S={version:t,cid:_cid,locale:n,fallbackLocale:r,messages:a,modifiers:l,pluralRules:i,missing:c,missingWarn:u,fallbackWarn:m,fallbackFormat:f,unresolving:p,postTranslation:g,processor:d,warnHtmlMessage:_,escapeParameter:b,messageCompiler:h,messageResolver:v,localeFallbacker:E,fallbackContext:y,onWarn:O,__meta:T};return S.datetimeFormats=o,S.numberFormats=s,S.__datetimeFormatters=N,S.__numberFormatters=L,S}function handleMissing(e,t,n,r,a){const{missing:o,onWarn:s}=e;if(null!==o){const r=o(e,n,t,a);return isString(r)?r:t}return t}function updateFallbackLocale(e,t,n){e.__localeChainCache=new Map,e.localeFallbacker(e,n,t)}const defaultOnCacheKey=e=>e;let compileCache=Object.create(null);function compileToFunction(e,t={}){{const n=(t.onCacheKey||defaultOnCacheKey)(e),r=compileCache[n];if(r)return r;let a=!1;const o=t.onError||defaultOnError;t.onError=e=>{a=!0,o(e)};const{code:s}=baseCompile(e,t),l=new Function(`return ${s}`)();return a?l:compileCache[n]=l}}let code$1=CompileErrorCodes.__EXTEND_POINT__;const inc$1=()=>++code$1,CoreErrorCodes={INVALID_ARGUMENT:code$1,INVALID_DATE_ARGUMENT:inc$1(),INVALID_ISO_DATE_ARGUMENT:inc$1(),__EXTEND_POINT__:inc$1()},NOOP_MESSAGE_FUNCTION=()=>"",isMessageFunction=e=>isFunction(e);function translate(e,...t){const{fallbackFormat:n,postTranslation:r,unresolving:a,messageCompiler:o,fallbackLocale:s,messages:l}=e,[i,c]=parseTranslateArgs(...t),u=isBoolean(c.missingWarn)?c.missingWarn:e.missingWarn,m=isBoolean(c.fallbackWarn)?c.fallbackWarn:e.fallbackWarn,f=isBoolean(c.escapeParameter)?c.escapeParameter:e.escapeParameter,p=!!c.resolvedMessage,g=isString(c.default)||isBoolean(c.default)?isBoolean(c.default)?o?i:()=>i:c.default:n?o?i:()=>i:"",d=n||""!==g,_=isString(c.locale)?c.locale:e.locale;f&&escapeParams(c);let[b,h,v]=p?[i,_,l[_]||{}]:resolveMessageFormat(e,i,_,s,m,u),E=b,y=i;if(p||isString(E)||isMessageFunction(E)||d&&(E=g,y=E),!(p||(isString(E)||isMessageFunction(E))&&isString(h)))return a?-1:i;let O=!1;const k=isMessageFunction(E)?E:compileMessageFormat(e,i,h,E,y,(()=>{O=!0}));if(O)return E;const N=evaluateMessage(e,k,createMessageContext(getMessageContextOptions(e,h,v,c)));return r?r(N,i):N}function escapeParams(e){isArray(e.list)?e.list=e.list.map((e=>isString(e)?escapeHtml(e):e)):isObject(e.named)&&Object.keys(e.named).forEach((t=>{isString(e.named[t])&&(e.named[t]=escapeHtml(e.named[t]))}))}function resolveMessageFormat(e,t,n,r,a,o){const{messages:s,onWarn:l,messageResolver:i,localeFallbacker:c}=e,u=c(e,r,n);let m,f={},p=null;for(let n=0;n<u.length&&(m=u[n],f=s[m]||{},null===(p=i(f,t))&&(p=f[t]),!isString(p)&&!isFunction(p));n++){const n=handleMissing(e,t,m,o,"translate");n!==t&&(p=n)}return[p,m,f]}function compileMessageFormat(e,t,n,r,a,o){const{messageCompiler:s,warnHtmlMessage:l}=e;if(isMessageFunction(r)){const e=r;return e.locale=e.locale||n,e.key=e.key||t,e}if(null==s){const e=()=>r;return e.locale=n,e.key=t,e}const i=s(r,getCompileOptions(e,n,a,r,l,o));return i.locale=n,i.key=t,i.source=r,i}function evaluateMessage(e,t,n){return t(n)}function parseTranslateArgs(...e){const[t,n,r]=e,a={};if(!isString(t)&&!isNumber(t)&&!isMessageFunction(t))throw Error(CoreErrorCodes.INVALID_ARGUMENT);const o=isNumber(t)?String(t):(isMessageFunction(t),t);return isNumber(n)?a.plural=n:isString(n)?a.default=n:isPlainObject(n)&&!isEmptyObject(n)?a.named=n:isArray(n)&&(a.list=n),isNumber(r)?a.plural=r:isString(r)?a.default=r:isPlainObject(r)&&assign(a,r),[o,a]}function getCompileOptions(e,t,n,r,a,o){return{warnHtmlMessage:a,onError:e=>{throw o&&o(e),e},onCacheKey:e=>generateFormatCacheKey(t,n,e)}}function getMessageContextOptions(e,t,n,r){const{modifiers:a,pluralRules:o,messageResolver:s,fallbackLocale:l,fallbackWarn:i,missingWarn:c,fallbackContext:u}=e,m={locale:t,modifiers:a,pluralRules:o,messages:r=>{let a=s(n,r);if(null==a&&u){const[,,e]=resolveMessageFormat(u,r,t,l,i,c);a=s(e,r)}if(isString(a)){let n=!1;const o=compileMessageFormat(e,r,t,a,r,(()=>{n=!0}));return n?NOOP_MESSAGE_FUNCTION:o}return isMessageFunction(a)?a:NOOP_MESSAGE_FUNCTION}};return e.processor&&(m.processor=e.processor),r.list&&(m.list=r.list),r.named&&(m.named=r.named),isNumber(r.plural)&&(m.pluralIndex=r.plural),m}function datetime(e,...t){const{datetimeFormats:n,unresolving:r,fallbackLocale:a,onWarn:o,localeFallbacker:s}=e,{__datetimeFormatters:l}=e,[i,c,u,m]=parseDateTimeArgs(...t),f=isBoolean(u.missingWarn)?u.missingWarn:e.missingWarn;isBoolean(u.fallbackWarn)?u.fallbackWarn:e.fallbackWarn;const p=!!u.part,g=isString(u.locale)?u.locale:e.locale,d=s(e,a,g);if(!isString(i)||""===i)return new Intl.DateTimeFormat(g,m).format(c);let _,b={},h=null;for(let t=0;t<d.length&&(_=d[t],b=n[_]||{},h=b[i],!isPlainObject(h));t++)handleMissing(e,i,_,f,"datetime format");if(!isPlainObject(h)||!isString(_))return r?-1:i;let v=`${_}__${i}`;isEmptyObject(m)||(v=`${v}__${JSON.stringify(m)}`);let E=l.get(v);return E||(E=new Intl.DateTimeFormat(_,assign({},h,m)),l.set(v,E)),p?E.formatToParts(c):E.format(c)}const DATETIME_FORMAT_OPTIONS_KEYS=["localeMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName","formatMatcher","hour12","timeZone","dateStyle","timeStyle","calendar","dayPeriod","numberingSystem","hourCycle","fractionalSecondDigits"];function parseDateTimeArgs(...e){const[t,n,r,a]=e,o={};let s,l={};if(isString(t)){const e=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!e)throw Error(CoreErrorCodes.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(CoreErrorCodes.INVALID_ISO_DATE_ARGUMENT)}}else if("[object Date]"===toTypeString(t)){if(isNaN(t.getTime()))throw Error(CoreErrorCodes.INVALID_DATE_ARGUMENT);s=t}else{if(!isNumber(t))throw Error(CoreErrorCodes.INVALID_ARGUMENT);s=t}return isString(n)?o.key=n:isPlainObject(n)&&Object.keys(n).forEach((e=>{DATETIME_FORMAT_OPTIONS_KEYS.includes(e)?l[e]=n[e]:o[e]=n[e]})),isString(r)?o.locale=r:isPlainObject(r)&&(l=r),isPlainObject(a)&&(l=a),[o.key||"",s,o,l]}function clearDateTimeFormat(e,t,n){const r=e;for(const e in n){const n=`${t}__${e}`;r.__datetimeFormatters.has(n)&&r.__datetimeFormatters.delete(n)}}function number(e,...t){const{numberFormats:n,unresolving:r,fallbackLocale:a,onWarn:o,localeFallbacker:s}=e,{__numberFormatters:l}=e,[i,c,u,m]=parseNumberArgs(...t),f=isBoolean(u.missingWarn)?u.missingWarn:e.missingWarn;isBoolean(u.fallbackWarn)?u.fallbackWarn:e.fallbackWarn;const p=!!u.part,g=isString(u.locale)?u.locale:e.locale,d=s(e,a,g);if(!isString(i)||""===i)return new Intl.NumberFormat(g,m).format(c);let _,b={},h=null;for(let t=0;t<d.length&&(_=d[t],b=n[_]||{},h=b[i],!isPlainObject(h));t++)handleMissing(e,i,_,f,"number format");if(!isPlainObject(h)||!isString(_))return r?-1:i;let v=`${_}__${i}`;isEmptyObject(m)||(v=`${v}__${JSON.stringify(m)}`);let E=l.get(v);return E||(E=new Intl.NumberFormat(_,assign({},h,m)),l.set(v,E)),p?E.formatToParts(c):E.format(c)}const NUMBER_FORMAT_OPTIONS_KEYS=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function parseNumberArgs(...e){const[t,n,r,a]=e,o={};let s={};if(!isNumber(t))throw Error(CoreErrorCodes.INVALID_ARGUMENT);const l=t;return isString(n)?o.key=n:isPlainObject(n)&&Object.keys(n).forEach((e=>{NUMBER_FORMAT_OPTIONS_KEYS.includes(e)?s[e]=n[e]:o[e]=n[e]})),isString(r)?o.locale=r:isPlainObject(r)&&(s=r),isPlainObject(a)&&(s=a),[o.key||"",l,o,s]}function clearNumberFormat(e,t,n){const r=e;for(const e in n){const n=`${t}__${e}`;r.__numberFormatters.has(n)&&r.__numberFormatters.delete(n)}}const VERSION="9.3.0-beta.15";let code=CompileErrorCodes.__EXTEND_POINT__;const inc=()=>++code,I18nErrorCodes={UNEXPECTED_RETURN_TYPE:code,INVALID_ARGUMENT:inc(),MUST_BE_CALL_SETUP_TOP:inc(),NOT_INSLALLED:inc(),NOT_AVAILABLE_IN_LEGACY_MODE:inc(),REQUIRED_VALUE:inc(),INVALID_VALUE:inc(),CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:inc(),NOT_INSLALLED_WITH_PROVIDE:inc(),UNEXPECTED_ERROR:inc(),NOT_COMPATIBLE_LEGACY_VUE_I18N:inc(),BRIDGE_SUPPORT_VUE_2_ONLY:inc(),MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION:inc(),NOT_AVAILABLE_COMPOSITION_IN_LEGACY:inc(),__EXTEND_POINT__:inc()},TranslateVNodeSymbol=makeSymbol("__translateVNode"),DatetimePartsSymbol=makeSymbol("__datetimeParts"),NumberPartsSymbol=makeSymbol("__numberParts"),SetPluralRulesSymbol=makeSymbol("__setPluralRules"),LegacyInstanceSymbol=makeSymbol("__legacyVueI18n"),InejctWithOption=makeSymbol("__injectWithOption"),__VUE_I18N_BRIDGE__="__VUE_I18N_BRIDGE__";function isLegacyVueI18n(e){return null!=e&&null!=e.version&&(Number(e.version.split(".")[0])||-1)>=8}function handleFlatJson(e){if(!isObject(e))return e;for(const t in e)if(hasOwn(e,t))if(t.includes(".")){const n=t.split("."),r=n.length-1;let a=e;for(let e=0;e<r;e++)n[e]in a||(a[n[e]]={}),a=a[n[e]];a[n[r]]=e[t],delete e[t],isObject(a[n[r]])&&handleFlatJson(a[n[r]])}else isObject(e[t])&&handleFlatJson(e[t]);return e}function getLocaleMessages(e,t){const{messages:n,__i18n:r,messageResolver:a,flatJson:o}=t,s=isPlainObject(n)?n:isArray(r)?{}:{[e]:{}};if(isArray(r)&&r.forEach((e=>{if("locale"in e&&"resource"in e){const{locale:t,resource:n}=e;t?(s[t]=s[t]||{},deepCopy(n,s[t])):deepCopy(n,s)}else isString(e)&&deepCopy(JSON.parse(e),s)})),null==a&&o)for(const e in s)hasOwn(s,e)&&handleFlatJson(s[e]);return s}const isNotObjectOrIsArray=e=>!isObject(e)||isArray(e);function deepCopy(e,t){if(isNotObjectOrIsArray(e)||isNotObjectOrIsArray(t))throw Error(I18nErrorCodes.INVALID_VALUE);for(const n in e)hasOwn(e,n)&&(isNotObjectOrIsArray(e[n])||isNotObjectOrIsArray(t[n])?t[n]=e[n]:deepCopy(e[n],t[n]))}function getComponentOptions(e){return e.proxy.$options}function adjustI18nResources(e,t,n){let r=isObject(t.messages)?t.messages:{};"__i18nGlobal"in n&&(r=getLocaleMessages(e.locale.value,{messages:r,__i18n:n.__i18nGlobal}));const a=Object.keys(r);if(a.length&&a.forEach((t=>{e.mergeLocaleMessage(t,r[t])})),isObject(t.datetimeFormats)){const n=Object.keys(t.datetimeFormats);n.length&&n.forEach((n=>{e.mergeDateTimeFormat(n,t.datetimeFormats[n])}))}if(isObject(t.numberFormats)){const n=Object.keys(t.numberFormats);n.length&&n.forEach((n=>{e.mergeNumberFormat(n,t.numberFormats[n])}))}}function createTextNode(e){return createVNodeVue2Compatible(e)}function createVNodeVue2Compatible(e){const t=void 0;return{tag:void 0,data:void 0,children:void 0,text:e,elm:void 0,ns:void 0,context:void 0,fnContext:void 0,fnOptions:void 0,fnScopeId:void 0,key:void 0,componentOptions:void 0,componentInstance:t,parent:void 0,raw:!1,isStatic:!1,isRootInsert:!0,isComment:!1,isCloned:!1,isOnce:!1,asyncFactory:void 0,asyncMeta:void 0,isAsyncPlaceholder:!1,child:()=>t}}let composerID=0;function defineCoreMissingHandler(e){return(t,n,r,a)=>e(n,r,getCurrentInstance()||void 0,a)}function createComposer(e={},t){const{__root:n}=e,r=void 0===n;let a=!isBoolean(e.inheritLocale)||e.inheritLocale;const o=ref(n&&a?n.locale.value:isString(e.locale)?e.locale:DEFAULT_LOCALE),s=ref(n&&a?n.fallbackLocale.value:isString(e.fallbackLocale)||isArray(e.fallbackLocale)||isPlainObject(e.fallbackLocale)||!1===e.fallbackLocale?e.fallbackLocale:o.value),l=ref(getLocaleMessages(o.value,e)),i=ref(isPlainObject(e.datetimeFormats)?e.datetimeFormats:{[o.value]:{}}),c=ref(isPlainObject(e.numberFormats)?e.numberFormats:{[o.value]:{}});let u=n?n.missingWarn:!isBoolean(e.missingWarn)&&!isRegExp(e.missingWarn)||e.missingWarn,m=n?n.fallbackWarn:!isBoolean(e.fallbackWarn)&&!isRegExp(e.fallbackWarn)||e.fallbackWarn,f=n?n.fallbackRoot:!isBoolean(e.fallbackRoot)||e.fallbackRoot,p=!!e.fallbackFormat,g=isFunction(e.missing)?e.missing:null,d=isFunction(e.missing)?defineCoreMissingHandler(e.missing):null,_=isFunction(e.postTranslation)?e.postTranslation:null,b=n?n.warnHtmlMessage:!isBoolean(e.warnHtmlMessage)||e.warnHtmlMessage,h=!!e.escapeParameter;const v=n?n.modifiers:isPlainObject(e.modifiers)?e.modifiers:{};let E,y,O=e.pluralRules||n&&n.pluralRules;{isLegacyVueI18n(t);const e={locale:o.value,fallbackLocale:s.value,messages:l.value,dateTimeFormats:i.value,numberFormats:c.value,modifiers:v,missing:g,fallbackRoot:f,postTranslation:_,pluralizationRules:O,escapeParameterHtml:h,sync:a,silentFallbackWarn:isBoolean(m)?!m:m,silentTranslationWarn:isBoolean(u)?!u:u,formatFallbackMessages:isBoolean(p)?!p:p,warnHtmlInMessage:isBoolean(b)&&b?"warn":"off",__VUE_I18N_BRIDGE__:__VUE_I18N_BRIDGE__};E=new t(e)}y=(()=>{const t={version:VERSION,locale:o.value,fallbackLocale:s.value,messages:l.value,modifiers:v,pluralRules:O,missing:null===d?void 0:d,missingWarn:u,fallbackWarn:m,fallbackFormat:p,unresolving:!0,postTranslation:null===_?void 0:_,warnHtmlMessage:b,escapeParameter:h,messageResolver:e.messageResolver,__meta:{framework:"vue"}};t.datetimeFormats=i.value,t.numberFormats=c.value,t.__datetimeFormatters=isPlainObject(y)?y.__datetimeFormatters:void 0,t.__numberFormatters=isPlainObject(y)?y.__numberFormatters:void 0;return createCoreContext(t)})(),updateFallbackLocale(y,o.value,s.value);const k=computed({get:()=>o.value,set:e=>{o.value=e,E&&!r&&(E.locale=e),y.locale=o.value}}),N=computed({get:()=>s.value,set:e=>{s.value=e,E&&!r&&(E.fallbackLocale=e),y.fallbackLocale=s.value,updateFallbackLocale(y,o.value,e)}}),L=computed((()=>l.value)),T=computed((()=>i.value)),S=computed((()=>c.value));const C=(e,t,r,a,u,m)=>{let p;if(o.value,s.value,l.value,i.value,c.value,p=e(y),isNumber(p)&&-1===p){const[e,r]=t();return n&&f?a(n):u(e)}if(m(p))return p;throw Error(I18nErrorCodes.UNEXPECTED_RETURN_TYPE)};function I(...e){return C((t=>Reflect.apply(translate,null,[t,...e])),(()=>parseTranslateArgs(...e)),0,(t=>Reflect.apply(t.t,t,[...e])),(e=>e),(e=>isString(e)))}const F={normalize:function(e){return e.map((e=>isString(e)||isNumber(e)||isBoolean(e)?createTextNode(String(e)):e))},interpolate:e=>e,type:"vnode"};function P(e){return l.value[e]||{}}composerID++,n&&inBrowser&&(watch(n.locale,(e=>{a&&(o.value=e,E&&!r&&(E.locale=e),y.locale=e,updateFallbackLocale(y,o.value,s.value))})),watch(n.fallbackLocale,(e=>{a&&(s.value=e,E&&!r&&(E.fallbackLocale=e),y.fallbackLocale=e,updateFallbackLocale(y,o.value,s.value))})));const A={id:composerID,locale:k,fallbackLocale:N,get inheritLocale(){return a},set inheritLocale(e){a=e,E&&(E._sync=e),e&&n&&(o.value=n.locale.value,s.value=n.fallbackLocale.value,E&&(E.locale=n.locale.value,E.fallbackLocale=n.fallbackLocale.value),updateFallbackLocale(y,o.value,s.value))},get availableLocales(){return Object.keys(l.value).sort()},messages:L,get modifiers(){return v},get pluralRules(){return O||{}},get isGlobal(){return r},get missingWarn(){return u},set missingWarn(e){u=e,y.missingWarn=u},get fallbackWarn(){return m},set fallbackWarn(e){m=e,y.fallbackWarn=m},get fallbackRoot(){return f},set fallbackRoot(e){f=e},get fallbackFormat(){return p},set fallbackFormat(e){p=e,y.fallbackFormat=p},get warnHtmlMessage(){return b},set warnHtmlMessage(e){b=e,y.warnHtmlMessage=e},get escapeParameter(){return h},set escapeParameter(e){h=e,y.escapeParameter=e},t:I,getLocaleMessage:P,setLocaleMessage:function(e,t){l.value[e]=t,E&&E.setLocaleMessage(e,t),y.messages=l.value},mergeLocaleMessage:function(e,t){l.value[e]=l.value[e]||{},E&&E.mergeLocaleMessage(e,t),deepCopy(t,l.value[e]),y.messages=l.value},getPostTranslationHandler:function(){return isFunction(_)?_:null},setPostTranslationHandler:function(e){_=e,y.postTranslation=e},getMissingHandler:function(){return g},setMissingHandler:function(e){null!==e&&(d=defineCoreMissingHandler(e)),g=e,y.missing=d},[SetPluralRulesSymbol]:function(e){O=e,y.pluralRules=O}};return A.datetimeFormats=T,A.numberFormats=S,A.rt=function(...e){const[t,n,r]=e;if(r&&!isObject(r))throw Error(I18nErrorCodes.INVALID_ARGUMENT);return I(t,n,assign({resolvedMessage:!0},r||{}))},A.te=function(e,t){const n=P(isString(t)?t:o.value);return null!==y.messageResolver(n,e)},A.tm=function(e){const t=function(e){let t=null;const n=fallbackWithLocaleChain(y,s.value,o.value);for(let r=0;r<n.length;r++){const a=l.value[n[r]]||{},o=y.messageResolver(a,e);if(null!=o){t=o;break}}return t}(e);return null!=t?t:n&&n.tm(e)||{}},A.d=function(...e){return C((t=>Reflect.apply(datetime,null,[t,...e])),(()=>parseDateTimeArgs(...e)),0,(t=>Reflect.apply(t.d,t,[...e])),(()=>""),(e=>isString(e)))},A.n=function(...e){return C((t=>Reflect.apply(number,null,[t,...e])),(()=>parseNumberArgs(...e)),0,(t=>Reflect.apply(t.n,t,[...e])),(()=>""),(e=>isString(e)))},A.getDateTimeFormat=function(e){return i.value[e]||{}},A.setDateTimeFormat=function(e,t){i.value[e]=t,E&&E.setDateTimeFormat(e,t),y.datetimeFormats=i.value,clearDateTimeFormat(y,e,t)},A.mergeDateTimeFormat=function(e,t){i.value[e]=assign(i.value[e]||{},t),E&&E.mergeDateTimeFormat(e,t),y.datetimeFormats=i.value,clearDateTimeFormat(y,e,t)},A.getNumberFormat=function(e){return c.value[e]||{}},A.setNumberFormat=function(e,t){c.value[e]=t,E&&E.setNumberFormat(e,t),y.numberFormats=c.value,clearNumberFormat(y,e,t)},A.mergeNumberFormat=function(e,t){c.value[e]=assign(c.value[e]||{},t),E&&E.mergeNumberFormat(e,t),y.numberFormats=c.value,clearNumberFormat(y,e,t)},A[InejctWithOption]=e.__injectWithOption,A[TranslateVNodeSymbol]=function(...e){return C((t=>{let n;const r=t;try{r.processor=F,n=Reflect.apply(translate,null,[r,...e])}finally{r.processor=null}return n}),(()=>parseTranslateArgs(...e)),0,(t=>t[TranslateVNodeSymbol](...e)),(e=>[createTextNode(e)]),(e=>isArray(e)))},A[DatetimePartsSymbol]=function(...e){return C((t=>Reflect.apply(datetime,null,[t,...e])),(()=>parseDateTimeArgs(...e)),0,(t=>t[DatetimePartsSymbol](...e)),(()=>[]),(e=>isString(e)||isArray(e)))},A[NumberPartsSymbol]=function(...e){return C((t=>Reflect.apply(number,null,[t,...e])),(()=>parseNumberArgs(...e)),0,(t=>t[NumberPartsSymbol](...e)),(()=>[]),(e=>isString(e)||isArray(e)))},A[LegacyInstanceSymbol]=E,A}const baseFormatProps={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>"parent"===e||"global"===e,default:"parent"},i18n:{type:Object}};function getInterpolateArg({slots:e},t){if(1===t.length&&"default"===t[0]){return(e.default?e.default():[]).reduce(((e,t)=>[...e,...t.children?t.children:[t]]),[])}return t.reduce(((t,n)=>{const r=e[n];return r&&(t[n]=r()),t}),{})}function getFragmentableTag(e){return e}const TranslationImpl=defineComponent({name:"i18n-t",props:assign({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>isNumber(e)||!isNaN(e)}},baseFormatProps),setup(e,t){const{slots:n,attrs:r}=t,a=e.i18n||useI18n({useScope:e.scope,__useComponent:!0});return()=>{const o=Object.keys(n).filter((e=>"_"!==e)),s={};e.locale&&(s.locale=e.locale),void 0!==e.plural&&(s.plural=isString(e.plural)?+e.plural:e.plural);const l=getInterpolateArg(t,o),i=a[TranslateVNodeSymbol](e.keypath,l,s),c=assign({},r),u=isString(e.tag)||isObject(e.tag)?e.tag:getFragmentableTag("span");return h(u,c,i)}}}),Translation=TranslationImpl,I18nT=Translation;function isVNode(e){return isArray(e)&&!isString(e[0])}function renderFormatter(e,t,n,r){const{slots:a,attrs:o}=t;return()=>{const t={part:!0};let s={};e.locale&&(t.locale=e.locale),isString(e.format)?t.key=e.format:isObject(e.format)&&(isString(e.format.key)&&(t.key=e.format.key),s=Object.keys(e.format).reduce(((t,r)=>n.includes(r)?assign({},t,{[r]:e.format[r]}):t),{}));const l=r(e.value,t,s);let i=[t.key];isArray(l)?i=l.map(((e,t)=>{const n=a[e.type],r=n?n({[e.type]:e.value,index:t,parts:l}):[e.value];return isVNode(r)&&(r[0].key=`${e.type}-${t}`),r})):isString(l)&&(i=[l]);const c=assign({},o),u=isString(e.tag)||isObject(e.tag)?e.tag:getFragmentableTag("span");return h(u,c,i)}}const NumberFormatImpl=defineComponent({name:"i18n-n",props:assign({value:{type:Number,required:!0},format:{type:[String,Object]}},baseFormatProps),setup(e,t){const n=e.i18n||useI18n({useScope:"parent",__useComponent:!0});return renderFormatter(e,t,NUMBER_FORMAT_OPTIONS_KEYS,((...e)=>n[NumberPartsSymbol](...e)))}}),NumberFormat=NumberFormatImpl,I18nN=NumberFormat,DatetimeFormatImpl=defineComponent({name:"i18n-d",props:assign({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},baseFormatProps),setup(e,t){const n=e.i18n||useI18n({useScope:"parent",__useComponent:!0});return renderFormatter(e,t,DATETIME_FORMAT_OPTIONS_KEYS,((...e)=>n[DatetimePartsSymbol](...e)))}}),DatetimeFormat=DatetimeFormatImpl,I18nD=DatetimeFormat;function apply(e,...t){const n=isPlainObject(t[0])?t[0]:{};(!isBoolean(n.globalInstall)||n.globalInstall)&&(e.component(Translation.name,Translation),e.component(NumberFormat.name,NumberFormat),e.component(DatetimeFormat.name,DatetimeFormat))}function defineMixin(e,t){return{beforeCreate(){const n=this.$options;if(!n.__VUE18N__INSTANCE__)if(n.i18n=n.i18n||(n.__i18nBridge?{}:null),this._i18nBridgeRoot=e,"composition"!==e.mode)if(n.i18n){if(n.i18n instanceof t){if(n.__i18nBridge)try{const e=n.i18n&&n.i18n.messages?n.i18n.messages:{};n.__i18nBridge.forEach((t=>deepCopy(JSON.parse(t),e))),Object.keys(e).forEach((t=>{n.i18n.mergeLocaleMessage(t,e[t])}))}catch(e){}this._i18n=n.i18n,this._i18nWatcher=this._i18n.watchI18nData()}else if(isPlainObject(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.__i18nBridge)try{const e=n.i18n&&n.i18n.messages?n.i18n.messages:{};n.__i18nBridge.forEach((t=>deepCopy(JSON.parse(t),e))),n.i18n.messages=e}catch(e){}const{sharedMessages:r}=n.i18n;r&&isPlainObject(r)&&deepCopy(r,n.i18n.messages),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 n=this.$options;n.__VUE18N__INSTANCE__||"composition"!==e.mode&&(n.i18n=n.i18n||(n.__i18nBridge?{}:null),n.i18n?(n.i18n instanceof t||isPlainObject(n.i18n))&&(this._i18n.subscribeDataChanging(this),this._subscribing=!0):(this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof t||n.parent&&n.parent.$i18n&&n.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)}))}}}let _legacyVueI18n=null;const I18nInjectionKey=makeSymbol("global-vue-i18n");function createI18n(e={},t){_legacyVueI18n=t;const n=!isBoolean(e.legacy)||e.legacy,r=!isBoolean(e.globalInjection)||e.globalInjection,a=!n||!!e.allowComposition,o=new Map,[s,l]=createGlobal(e,n,t);{const e=l[LegacyInstanceSymbol];let t=null;Object.defineProperty(e,"global",{get:()=>l}),Object.defineProperty(e,"mode",{get:()=>n?"legacy":"composition"}),Object.defineProperty(e,"allowComposition",{get:()=>a}),Object.defineProperty(e,"__instances",{get:()=>o}),Object.defineProperty(e,"install",{writable:!0,value:(a,...o)=>{if(2!==(a&&a.version&&Number(a.version.split(".")[0])||-1))throw Error(I18nErrorCodes.BRIDGE_SUPPORT_VUE_2_ONLY);apply(a,...o),!n&&r&&(t=injectGlobalFieldsForBridge(a,e,l)),a.mixin(defineMixin(e,_legacyVueI18n))}}),Object.defineProperty(e,"dispose",{value:()=>{t&&t(),s.stop()}});const i={__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(i).forEach((t=>Object.defineProperty(e,t,{value:i[t]}))),e}}function useI18n(e={}){const t=getCurrentInstance();if(null==t)throw Error(I18nErrorCodes.MUST_BE_CALL_SETUP_TOP);if(null==_legacyVueI18n)throw Error(I18nErrorCodes.NOT_INSLALLED);const n=getI18nInstance(t),r=getGlobalComposer(n),a=getComponentOptions(t),o=getScope(e,a);if("legacy"===n.mode&&!e.__useComponent){if(!n.allowComposition)throw Error(I18nErrorCodes.NOT_AVAILABLE_IN_LEGACY_MODE);return useI18nForLegacy(t,o,r,e)}if("global"===o)return adjustI18nResources(r,e,a),r;if("parent"===o){let a=getComposer(n,t,e.__useComponent);return null==a&&(a=r),a}const s=n;let l=s.__getInstance(t);if(null==l){const n=assign({},e);"__i18n"in a&&(n.__i18n=a.__i18n),r&&(n.__root=r),l=createComposer(n,_legacyVueI18n),s.__composerExtend&&s.__composerExtend(l),setupLifeCycle(s,t,l),s.__setInstance(t,l)}return l}const castToVueI18n=e=>{if(!(__VUE_I18N_BRIDGE__ in e))throw Error(I18nErrorCodes.NOT_COMPATIBLE_LEGACY_VUE_I18N);return e};function createGlobal(e,t,n){const r=effectScope();{if(!isLegacyVueI18n(n))throw Error(I18nErrorCodes.NOT_COMPATIBLE_LEGACY_VUE_I18N);const t=r.run((()=>createComposer(e,n)));if(null==t)throw Error(I18nErrorCodes.UNEXPECTED_ERROR);return[r,t]}}function getI18nInstance(e){{const t=e.proxy;if(null==t)throw Error(I18nErrorCodes.UNEXPECTED_ERROR);const n=t._i18nBridgeRoot;if(!n)throw Error(I18nErrorCodes.NOT_INSLALLED);return n}}function getScope(e,t){return isEmptyObject(e)?"__i18n"in t?"local":"global":e.useScope?e.useScope:"local"}function getGlobalComposer(e){return e.global}function getComposer(e,t,n=!1){let r=null;const a=t.root;let o=t.parent;for(;null!=o;){const t=e;if("composition"===e.mode)r=t.__getInstance(o);else{const e=t.__getInstance(o);null!=e&&(r=e.__composer,n&&r&&!r[InejctWithOption]&&(r=null))}if(null!=r)break;if(a===o)break;o=o.parent}return r}function setupLifeCycle(e,t,n){{const r=t.proxy;if(null==r)throw Error(I18nErrorCodes.UNEXPECTED_ERROR);const a=n[LegacyInstanceSymbol];if(a===e)throw Error(I18nErrorCodes.UNEXPECTED_ERROR);r._i18n=a,r._i18n_bridge=!0,inBrowser&&(r._i18nWatcher=r._i18n.watchI18nData(),r._i18n._sync&&(r._localeWatcher=r._i18n.watchLocale()));let o=!1;onBeforeMount((()=>{r._i18n.subscribeDataChanging(r),o=!0})),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}))}}function useI18nForLegacy(e,t,n,r={}){const a="local"===t,o=shallowRef(null);if(a&&e.proxy&&!e.proxy.$options.i18n&&!e.proxy.$options.__i18n)throw Error(I18nErrorCodes.MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION);const s=!isBoolean(r.inheritLocale)||r.inheritLocale,l=ref(a&&s?n.locale.value:isString(r.locale)?r.locale:DEFAULT_LOCALE),i=ref(a&&s?n.fallbackLocale.value:isString(r.fallbackLocale)||isArray(r.fallbackLocale)||isPlainObject(r.fallbackLocale)||!1===r.fallbackLocale?r.fallbackLocale:l.value),c=ref(getLocaleMessages(l.value,r)),u=ref(isPlainObject(r.datetimeFormats)?r.datetimeFormats:{[l.value]:{}}),m=ref(isPlainObject(r.numberFormats)?r.numberFormats:{[l.value]:{}}),f=a?n.missingWarn:!isBoolean(r.missingWarn)&&!isRegExp(r.missingWarn)||r.missingWarn,p=a?n.fallbackWarn:!isBoolean(r.fallbackWarn)&&!isRegExp(r.fallbackWarn)||r.fallbackWarn,g=a?n.fallbackRoot:!isBoolean(r.fallbackRoot)||r.fallbackRoot,d=!!r.fallbackFormat,_=isFunction(r.missing)?r.missing:null,b=isFunction(r.postTranslation)?r.postTranslation:null,h=a?n.warnHtmlMessage:!isBoolean(r.warnHtmlMessage)||r.warnHtmlMessage,v=!!r.escapeParameter,E=a?n.modifiers:isPlainObject(r.modifiers)?r.modifiers:{},y=r.pluralRules||a&&n.pluralRules;function O(e){return l.value,i.value,c.value,u.value,m.value,e()}const k={get id(){return o.value?o.value.id:-1},locale:computed({get:()=>o.value?o.value.locale.value:l.value,set:e=>{o.value&&(o.value.locale.value=e),l.value=e}}),fallbackLocale:computed({get:()=>o.value?o.value.fallbackLocale.value:i.value,set:e=>{o.value&&(o.value.fallbackLocale.value=e),i.value=e}}),messages:computed((()=>o.value?o.value.messages.value:c.value)),datetimeFormats:computed((()=>u.value)),numberFormats:computed((()=>m.value)),get inheritLocale(){return o.value?o.value.inheritLocale:s},set inheritLocale(e){o.value&&(o.value.inheritLocale=e)},get availableLocales(){return o.value?o.value.availableLocales:Object.keys(c.value)},get modifiers(){return o.value?o.value.modifiers:E},get pluralRules(){return o.value?o.value.pluralRules:y},get isGlobal(){return!!o.value&&o.value.isGlobal},get missingWarn(){return o.value?o.value.missingWarn:f},set missingWarn(e){o.value&&(o.value.missingWarn=e)},get fallbackWarn(){return o.value?o.value.fallbackWarn:p},set fallbackWarn(e){o.value&&(o.value.missingWarn=e)},get fallbackRoot(){return o.value?o.value.fallbackRoot:g},set fallbackRoot(e){o.value&&(o.value.fallbackRoot=e)},get fallbackFormat(){return o.value?o.value.fallbackFormat:d},set fallbackFormat(e){o.value&&(o.value.fallbackFormat=e)},get warnHtmlMessage(){return o.value?o.value.warnHtmlMessage:h},set warnHtmlMessage(e){o.value&&(o.value.warnHtmlMessage=e)},get escapeParameter(){return o.value?o.value.escapeParameter:v},set escapeParameter(e){o.value&&(o.value.escapeParameter=e)},t:function(...e){return o.value?O((()=>Reflect.apply(o.value.t,null,[...e]))):O((()=>""))},getPostTranslationHandler:function(){return o.value?o.value.getPostTranslationHandler():b},setPostTranslationHandler:function(e){o.value&&o.value.setPostTranslationHandler(e)},getMissingHandler:function(){return o.value?o.value.getMissingHandler():_},setMissingHandler:function(e){o.value&&o.value.setMissingHandler(e)},rt:function(...e){return o.value?Reflect.apply(o.value.rt,null,[...e]):""},d:function(...e){return o.value?O((()=>Reflect.apply(o.value.d,null,[...e]))):O((()=>""))},n:function(...e){return o.value?O((()=>Reflect.apply(o.value.n,null,[...e]))):O((()=>""))},tm:function(e){return o.value?o.value.tm(e):{}},te:function(e,t){return!!o.value&&o.value.te(e,t)},getLocaleMessage:function(e){return o.value?o.value.getLocaleMessage(e):{}},setLocaleMessage:function(e,t){o.value&&(o.value.setLocaleMessage(e,t),c.value[e]=t)},mergeLocaleMessage:function(e,t){o.value&&o.value.mergeLocaleMessage(e,t)},getDateTimeFormat:function(e){return o.value?o.value.getDateTimeFormat(e):{}},setDateTimeFormat:function(e,t){o.value&&(o.value.setDateTimeFormat(e,t),u.value[e]=t)},mergeDateTimeFormat:function(e,t){o.value&&o.value.mergeDateTimeFormat(e,t)},getNumberFormat:function(e){return o.value?o.value.getNumberFormat(e):{}},setNumberFormat:function(e,t){o.value&&(o.value.setNumberFormat(e,t),m.value[e]=t)},mergeNumberFormat:function(e,t){o.value&&o.value.mergeNumberFormat(e,t)}};return onBeforeMount((()=>{if(null==e.proxy||null==e.proxy.$i18n)throw Error(I18nErrorCodes.NOT_AVAILABLE_COMPOSITION_IN_LEGACY);const n=o.value=e.proxy.$i18n.__composer;"global"===t?(l.value=n.locale.value,i.value=n.fallbackLocale.value,c.value=n.messages.value,u.value=n.datetimeFormats.value,m.value=n.numberFormats.value):a&&function(e){e.locale.value=l.value,e.fallbackLocale.value=i.value,Object.keys(c.value).forEach((t=>{e.mergeLocaleMessage(t,c.value[t])})),Object.keys(u.value).forEach((t=>{e.mergeDateTimeFormat(t,u.value[t])})),Object.keys(m.value).forEach((t=>{e.mergeNumberFormat(t,m.value[t])})),e.escapeParameter=v,e.fallbackFormat=d,e.fallbackRoot=g,e.fallbackWarn=p,e.missingWarn=f,e.warnHtmlMessage=h}(n)})),k}function injectGlobalFieldsForBridge(e,t,n){const r=t.watchLocale(n);return e.prototype.$t=function(...e){return Reflect.apply(n.t,n,[...e])},e.prototype.$d=function(...e){return Reflect.apply(n.d,n,[...e])},e.prototype.$n=function(...e){return Reflect.apply(n.n,n,[...e])},r}registerMessageCompiler(compileToFunction),registerMessageResolver(resolveValue),registerLocaleFallbacker(fallbackWithLocaleChain);export{DatetimeFormat,I18nD,I18nInjectionKey,I18nN,I18nT,NumberFormat,Translation,VERSION,castToVueI18n,createI18n,useI18n}; | ||
import{ref,computed,watch,getCurrentInstance,defineComponent,h,effectScope,onBeforeMount,onUnmounted,shallowRef}from"vue-demi";const inBrowser="undefined"!=typeof window,makeSymbol=(e,t=!1)=>t?Symbol.for(e):Symbol(e),generateFormatCacheKey=(e,t,n)=>friendlyJSONstringify({l:e,k:t,s:n}),friendlyJSONstringify=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),isNumber=e=>"number"==typeof e&&isFinite(e),isDate=e=>"[object Date]"===toTypeString(e),isRegExp=e=>"[object RegExp]"===toTypeString(e),isEmptyObject=e=>isPlainObject(e)&&0===Object.keys(e).length;function warn(e,t){"undefined"!=typeof console&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}const assign=Object.assign;function escapeHtml(e){return e.replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}const hasOwnProperty=Object.prototype.hasOwnProperty;function hasOwn(e,t){return hasOwnProperty.call(e,t)}const isArray=Array.isArray,isFunction=e=>"function"==typeof e,isString=e=>"string"==typeof e,isBoolean=e=>"boolean"==typeof e,isObject=e=>null!==e&&"object"==typeof e,objectToString=Object.prototype.toString,toTypeString=e=>objectToString.call(e),isPlainObject=e=>"[object Object]"===toTypeString(e),toDisplayString=e=>null==e?"":isArray(e)||isPlainObject(e)&&e.toString===objectToString?JSON.stringify(e,null,2):String(e),CompileErrorCodes={EXPECTED_TOKEN:1,INVALID_TOKEN_IN_PLACEHOLDER:2,UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER:3,UNKNOWN_ESCAPE_SEQUENCE:4,INVALID_UNICODE_ESCAPE_SEQUENCE:5,UNBALANCED_CLOSING_BRACE:6,UNTERMINATED_CLOSING_BRACE:7,EMPTY_PLACEHOLDER:8,NOT_ALLOW_NEST_PLACEHOLDER:9,INVALID_LINKED_FORMAT:10,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14,__EXTEND_POINT__:15};function createCompileError(e,t,n={}){const{domain:r,messages:a,args:o}=n,s=new SyntaxError(String(e));return s.code=e,t&&(s.location=t),s.domain=r,s}function defaultOnError(e){throw e}function createPosition(e,t,n){return{line:e,column:t,offset:n}}function createLocation(e,t,n){const r={start:e,end:t};return null!=n&&(r.source=n),r}const CHAR_SP=" ",CHAR_CR="\r",CHAR_LF="\n",CHAR_LS=String.fromCharCode(8232),CHAR_PS=String.fromCharCode(8233);function createScanner(e){const t=e;let n=0,r=1,a=1,o=0;const s=e=>"\r"===t[e]&&"\n"===t[e+1],l=e=>t[e]===CHAR_PS,i=e=>t[e]===CHAR_LS,c=e=>s(e)||(e=>"\n"===t[e])(e)||l(e)||i(e),u=e=>s(e)||l(e)||i(e)?"\n":t[e];function m(){return o=0,c(n)&&(r++,a=0),s(n)&&n++,n++,a++,t[n]}return{index:()=>n,line:()=>r,column:()=>a,peekOffset:()=>o,charAt:u,currentChar:()=>u(n),currentPeek:()=>u(n+o),next:m,peek:function(){return s(n+o)&&o++,o++,t[n+o]},reset:function(){n=0,r=1,a=1,o=0},resetPeek:function(e=0){o=e},skipToPeek:function(){const e=n+o;for(;e!==n;)m();o=0}}}const EOF=void 0,LITERAL_DELIMITER="'",ERROR_DOMAIN$1="tokenizer";function createTokenizer(e,t={}){const n=!1!==t.location,r=createScanner(e),a=()=>r.index(),o=()=>createPosition(r.line(),r.column(),r.index()),s=o(),l=a(),i={currentType:14,offset:l,startLoc:s,endLoc:s,lastType:14,lastOffset:l,lastStartLoc:s,lastEndLoc:s,braceNest:0,inLinked:!1,text:""},c=()=>i,{onError:u}=t;function m(e,t,r){e.endLoc=o(),e.currentType=t;const a={type:t};return n&&(a.loc=createLocation(e.startLoc,e.endLoc)),null!=r&&(a.value=r),a}const f=e=>m(e,14);function p(e,t){return e.currentChar()===t?(e.next(),t):(o(),"")}function g(e){let t="";for(;" "===e.currentPeek()||"\n"===e.currentPeek();)t+=e.currentPeek(),e.peek();return t}function d(e){const t=g(e);return e.skipToPeek(),t}function _(e){if(e===EOF)return!1;const t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||95===t}function b(e,t){const{currentType:n}=t;if(2!==n)return!1;g(e);const r=function(e){if(e===EOF)return!1;const t=e.charCodeAt(0);return t>=48&&t<=57}("-"===e.currentPeek()?e.peek():e.currentPeek());return e.resetPeek(),r}function h(e){g(e);const t="|"===e.currentPeek();return e.resetPeek(),t}function v(e,t=!0){const n=(t=!1,r="",a=!1)=>{const o=e.currentPeek();return"{"===o?"%"!==r&&t:"@"!==o&&o?"%"===o?(e.peek(),n(t,"%",!0)):"|"===o?!("%"!==r&&!a)||!(" "===r||"\n"===r):" "===o?(e.peek(),n(!0," ",a)):"\n"!==o||(e.peek(),n(!0,"\n",a)):"%"===r||t},r=n();return t&&e.resetPeek(),r}function E(e,t){const n=e.currentChar();return n===EOF?EOF:t(n)?(e.next(),n):null}function y(e){return E(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 O(e){return E(e,(e=>{const t=e.charCodeAt(0);return t>=48&&t<=57}))}function k(e){return E(e,(e=>{const t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}))}function N(e){let t="",n="";for(;t=O(e);)n+=t;return n}function L(e){let t="";for(;;){const n=e.currentChar();if("{"===n||"}"===n||"@"===n||"|"===n||!n)break;if("%"===n){if(!v(e))break;t+=n,e.next()}else if(" "===n||"\n"===n)if(v(e))t+=n,e.next();else{if(h(e))break;t+=n,e.next()}else t+=n,e.next()}return t}function T(e){const t=e.currentChar();switch(t){case"\\":case"'":return e.next(),`\\${t}`;case"u":return S(e,t,4);case"U":return S(e,t,6);default:return o(),""}}function S(e,t,n){p(e,t);let r="";for(let t=0;t<n;t++){const t=k(e);if(!t){o(),e.currentChar();break}r+=t}return`\\${t}${r}`}function C(e){d(e);const t=p(e,"|");return d(e),t}function I(e,t){let n=null;switch(e.currentChar()){case"{":return t.braceNest>=1&&o(),e.next(),n=m(t,2,"{"),d(e),t.braceNest++,n;case"}":return t.braceNest>0&&2===t.currentType&&o(),e.next(),n=m(t,3,"}"),t.braceNest--,t.braceNest>0&&d(e),t.inLinked&&0===t.braceNest&&(t.inLinked=!1),n;case"@":return t.braceNest>0&&o(),n=F(e,t)||f(t),t.braceNest=0,n;default:let r=!0,a=!0,s=!0;if(h(e))return t.braceNest>0&&o(),n=m(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 o(),t.braceNest=0,P(e,t);if(r=function(e,t){const{currentType:n}=t;if(2!==n)return!1;g(e);const r=_(e.currentPeek());return e.resetPeek(),r}(e,t))return n=m(t,5,function(e){d(e);let t="",n="";for(;t=y(e);)n+=t;return e.currentChar()===EOF&&o(),n}(e)),d(e),n;if(a=b(e,t))return n=m(t,6,function(e){d(e);let t="";return"-"===e.currentChar()?(e.next(),t+=`-${N(e)}`):t+=N(e),e.currentChar()===EOF&&o(),t}(e)),d(e),n;if(s=function(e,t){const{currentType:n}=t;if(2!==n)return!1;g(e);const r="'"===e.currentPeek();return e.resetPeek(),r}(e,t))return n=m(t,7,function(e){d(e),p(e,"'");let t="",n="";const r=e=>"'"!==e&&"\n"!==e;for(;t=E(e,r);)n+="\\"===t?T(e):t;const a=e.currentChar();return"\n"===a||a===EOF?(o(),"\n"===a&&(e.next(),p(e,"'")),n):(p(e,"'"),n)}(e)),d(e),n;if(!r&&!a&&!s)return n=m(t,13,function(e){d(e);let t="",n="";const r=e=>"{"!==e&&"}"!==e&&" "!==e&&"\n"!==e;for(;t=E(e,r);)n+=t;return n}(e)),o(),n.value,d(e),n}return n}function F(e,t){const{currentType:n}=t;let r=null;const a=e.currentChar();switch(8!==n&&9!==n&&12!==n&&10!==n||"\n"!==a&&" "!==a||o(),a){case"@":return e.next(),r=m(t,8,"@"),t.inLinked=!0,r;case".":return d(e),e.next(),m(t,9,".");case":":return d(e),e.next(),m(t,10,":");default:return h(e)?(r=m(t,1,C(e)),t.braceNest=0,t.inLinked=!1,r):function(e,t){const{currentType:n}=t;if(8!==n)return!1;g(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;g(e);const r=":"===e.currentPeek();return e.resetPeek(),r}(e,t)?(d(e),F(e,t)):function(e,t){const{currentType:n}=t;if(9!==n)return!1;g(e);const r=_(e.currentPeek());return e.resetPeek(),r}(e,t)?(d(e),m(t,12,function(e){let t="",n="";for(;t=y(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?_(e.peek()):!("@"===t||"%"===t||"|"===t||":"===t||"."===t||" "===t||!t)&&("\n"===t?(e.peek(),r()):_(t))},a=r();return e.resetPeek(),a}(e,t)?(d(e),"{"===a?I(e,t)||r:m(t,11,function(e){const t=(n=!1,r)=>{const a=e.currentChar();return"{"!==a&&"%"!==a&&"@"!==a&&"|"!==a&&a?" "===a?r:"\n"===a?(r+=a,e.next(),t(n,r)):(r+=a,e.next(),t(!0,r)):r};return t(!1,"")}(e))):(8===n&&o(),t.braceNest=0,t.inLinked=!1,P(e,t))}}function P(e,t){let n={type:14};if(t.braceNest>0)return I(e,t)||f(t);if(t.inLinked)return F(e,t)||f(t);switch(e.currentChar()){case"{":return I(e,t)||f(t);case"}":return o(),e.next(),m(t,3,"}");case"@":return F(e,t)||f(t);default:if(h(e))return n=m(t,1,C(e)),t.braceNest=0,t.inLinked=!1,n;const{isModulo:r,hasSpace:a}=function(e){const t=g(e),n="%"===e.currentPeek()&&"{"===e.peek();return e.resetPeek(),{isModulo:n,hasSpace:t.length>0}}(e);if(r)return a?m(t,0,L(e)):m(t,4,function(e){d(e);return"%"!==e.currentChar()&&o(),e.next(),"%"}(e));if(v(e))return m(t,0,L(e))}return n}return{nextToken:function(){const{currentType:e,offset:t,startLoc:n,endLoc:s}=i;return i.lastType=e,i.lastOffset=t,i.lastStartLoc=n,i.lastEndLoc=s,i.offset=a(),i.startLoc=o(),r.currentChar()===EOF?m(i,14):P(r,i)},currentOffset:a,currentPosition:o,context:c}}const ERROR_DOMAIN="parser",KNOWN_ESCAPES=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function fromEscapeSequence(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 createParser(e={}){const t=!1!==e.location,{onError:n}=e;function r(e,n,r){const a={type:e,start:n,end:n};return t&&(a.loc={start:r,end:r}),a}function a(e,n,r,a){e.end=n,a&&(e.type=a),t&&e.loc&&(e.loc.end=r)}function o(e,t){const n=e.context(),o=r(3,n.offset,n.startLoc);return o.value=t,a(o,e.currentOffset(),e.currentPosition()),o}function s(e,t){const n=e.context(),{lastOffset:o,lastStartLoc:s}=n,l=r(5,o,s);return l.index=parseInt(t,10),e.nextToken(),a(l,e.currentOffset(),e.currentPosition()),l}function l(e,t){const n=e.context(),{lastOffset:o,lastStartLoc:s}=n,l=r(4,o,s);return l.key=t,e.nextToken(),a(l,e.currentOffset(),e.currentPosition()),l}function i(e,t){const n=e.context(),{lastOffset:o,lastStartLoc:s}=n,l=r(9,o,s);return l.value=t.replace(KNOWN_ESCAPES,fromEscapeSequence),e.nextToken(),a(l,e.currentOffset(),e.currentPosition()),l}function c(e){const t=e.context(),n=r(6,t.offset,t.startLoc);let o=e.nextToken();if(9===o.type){const t=function(e){const t=e.nextToken(),n=e.context(),{lastOffset:o,lastStartLoc:s}=n,l=r(8,o,s);return 12!==t.type?(n.lastStartLoc,l.value="",a(l,o,s),{nextConsumeToken:t,node:l}):(null==t.value&&(n.lastStartLoc,getTokenCaption(t)),l.value=t.value||"",a(l,e.currentOffset(),e.currentPosition()),{node:l})}(e);n.modifier=t.node,o=t.nextConsumeToken||e.nextToken()}switch(10!==o.type&&(t.lastStartLoc,getTokenCaption(o)),o=e.nextToken(),2===o.type&&(o=e.nextToken()),o.type){case 11:null==o.value&&(t.lastStartLoc,getTokenCaption(o)),n.key=function(e,t){const n=e.context(),o=r(7,n.offset,n.startLoc);return o.value=t,a(o,e.currentOffset(),e.currentPosition()),o}(e,o.value||"");break;case 5:null==o.value&&(t.lastStartLoc,getTokenCaption(o)),n.key=l(e,o.value||"");break;case 6:null==o.value&&(t.lastStartLoc,getTokenCaption(o)),n.key=s(e,o.value||"");break;case 7:null==o.value&&(t.lastStartLoc,getTokenCaption(o)),n.key=i(e,o.value||"");break;default:t.lastStartLoc;const c=e.context(),u=r(7,c.offset,c.startLoc);return u.value="",a(u,c.offset,c.startLoc),n.key=u,a(n,c.offset,c.startLoc),{nextConsumeToken:o,node:n}}return a(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 r=u||e.nextToken();switch(u=null,r.type){case 0:null==r.value&&(t.lastStartLoc,getTokenCaption(r)),n.items.push(o(e,r.value||""));break;case 6:null==r.value&&(t.lastStartLoc,getTokenCaption(r)),n.items.push(s(e,r.value||""));break;case 5:null==r.value&&(t.lastStartLoc,getTokenCaption(r)),n.items.push(l(e,r.value||""));break;case 7:null==r.value&&(t.lastStartLoc,getTokenCaption(r)),n.items.push(i(e,r.value||""));break;case 8:const a=c(e);n.items.push(a.node),u=a.nextConsumeToken||null}}while(14!==t.currentType&&1!==t.currentType);return a(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:o}=t,s=u(e);return 14===t.currentType?s:function(e,t,n,o){const s=e.context();let l=0===o.items.length;const i=r(1,t,n);i.cases=[],i.cases.push(o);do{const t=u(e);l||(l=0===t.items.length),i.cases.push(t)}while(14!==s.currentType);return a(i,e.currentOffset(),e.currentPosition()),i}(e,n,o,s)}return{parse:function(n){const o=createTokenizer(n,assign({},e)),s=o.context(),l=r(0,s.offset,s.startLoc);return t&&l.loc&&(l.loc.source=n),l.body=m(o),14!==s.currentType&&(s.lastStartLoc,n[s.offset]),a(l,o.currentOffset(),o.currentPosition()),l}}}function getTokenCaption(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 createTransformer(e,t={}){const n={ast:e,helpers:new Set};return{context:()=>n,helper:e=>(n.helpers.add(e),e)}}function traverseNodes(e,t){for(let n=0;n<e.length;n++)traverseNode(e[n],t)}function traverseNode(e,t){switch(e.type){case 1:traverseNodes(e.cases,t),t.helper("plural");break;case 2:traverseNodes(e.items,t);break;case 6:traverseNode(e.key,t),t.helper("linked"),t.helper("type");break;case 5:t.helper("interpolate"),t.helper("list");break;case 4:t.helper("interpolate"),t.helper("named")}}function transform(e,t={}){const n=createTransformer(e);n.helper("normalize"),e.body&&traverseNode(e.body,n);const r=n.context();e.helpers=Array.from(r.helpers)}function createCodeGenerator(e,t){const{sourceMap:n,filename:r,breakLineCode:a,needIndent:o}=t,s={source:e.loc.source,filename:r,code:"",column:1,line:1,offset:0,map:void 0,breakLineCode:a,needIndent:o,indentLevel:0};function l(e,t){s.code+=e}function i(e,t=!0){const n=t?a:"";l(o?n+" ".repeat(e):n)}return{context:()=>s,push:l,indent:function(e=!0){const t=++s.indentLevel;e&&i(t)},deindent:function(e=!0){const t=--s.indentLevel;e&&i(t)},newline:function(){i(s.indentLevel)},helper:e=>`_${e}`,needIndent:()=>s.needIndent}}function generateLinkedNode(e,t){const{helper:n}=e;e.push(`${n("linked")}(`),generateNode(e,t.key),t.modifier?(e.push(", "),generateNode(e,t.modifier),e.push(", _type")):e.push(", undefined, _type"),e.push(")")}function generateMessageNode(e,t){const{helper:n,needIndent:r}=e;e.push(`${n("normalize")}([`),e.indent(r());const a=t.items.length;for(let n=0;n<a&&(generateNode(e,t.items[n]),n!==a-1);n++)e.push(", ");e.deindent(r()),e.push("])")}function generatePluralNode(e,t){const{helper:n,needIndent:r}=e;if(t.cases.length>1){e.push(`${n("plural")}([`),e.indent(r());const a=t.cases.length;for(let n=0;n<a&&(generateNode(e,t.cases[n]),n!==a-1);n++)e.push(", ");e.deindent(r()),e.push("])")}}function generateResource(e,t){t.body?generateNode(e,t.body):e.push("null")}function generateNode(e,t){const{helper:n}=e;switch(t.type){case 0:generateResource(e,t);break;case 1:generatePluralNode(e,t);break;case 2:generateMessageNode(e,t);break;case 6:generateLinkedNode(e,t);break;case 8:case 7:case 9:case 3: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)}}const generate=(e,t={})=>{const n=isString(t.mode)?t.mode:"normal",r=isString(t.filename)?t.filename:"message.intl",a=!!t.sourceMap,o=null!=t.breakLineCode?t.breakLineCode:"arrow"===n?";":"\n",s=t.needIndent?t.needIndent:"arrow"!==n,l=e.helpers||[],i=createCodeGenerator(e,{mode:n,filename:r,sourceMap:a,breakLineCode:o,needIndent:s});i.push("normal"===n?"function __msg__ (ctx) {":"(ctx) => {"),i.indent(s),l.length>0&&(i.push(`const { ${l.map((e=>`${e}: _${e}`)).join(", ")} } = ctx`),i.newline()),i.push("return "),generateNode(i,e),i.deindent(s),i.push("}");const{code:c,map:u}=i.context();return{ast:e,code:c,map:u?u.toJSON():void 0}};function baseCompile(e,t={}){const n=assign({},t),r=createParser(n).parse(e);return transform(r,n),generate(r,n)}const pathStateMachine=[];pathStateMachine[0]={w:[0],i:[3,0],"[":[4],o:[7]},pathStateMachine[1]={w:[1],".":[2],"[":[4],o:[7]},pathStateMachine[2]={w:[2],i:[3,0],0:[3,0]},pathStateMachine[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},pathStateMachine[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},pathStateMachine[5]={"'":[4,0],o:8,l:[5,0]},pathStateMachine[6]={'"':[4,0],o:8,l:[6,0]};const literalValueRE=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function isLiteral(e){return literalValueRE.test(e)}function stripQuotes(e){const t=e.charCodeAt(0);return t!==e.charCodeAt(e.length-1)||34!==t&&39!==t?e:e.slice(1,-1)}function getPathCharType(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 formatSubPath(e){const t=e.trim();return("0"!==e.charAt(0)||!isNaN(parseInt(e)))&&(isLiteral(t)?stripQuotes(t):"*"+t)}function parse(e){const t=[];let n,r,a,o,s,l,i,c=-1,u=0,m=0;const f=[];function p(){const t=e[c+1];if(5===u&&"'"===t||6===u&&'"'===t)return c++,a="\\"+t,f[0](),!0}for(f[0]=()=>{void 0===r?r=a:r+=a},f[1]=()=>{void 0!==r&&(t.push(r),r=void 0)},f[2]=()=>{f[0](),m++},f[3]=()=>{if(m>0)m--,u=4,f[0]();else{if(m=0,void 0===r)return!1;if(r=formatSubPath(r),!1===r)return!1;f[1]()}};null!==u;)if(c++,n=e[c],"\\"!==n||!p()){if(o=getPathCharType(n),i=pathStateMachine[u],s=i[o]||i.l||8,8===s)return;if(u=s[0],void 0!==s[1]&&(l=f[s[1]],l&&(a=n,!1===l())))return;if(7===u)return t}}const cache=new Map;function resolveWithKeyValue(e,t){return isObject(e)?e[t]:null}function resolveValue(e,t){if(!isObject(e))return null;let n=cache.get(t);if(n||(n=parse(t),n&&cache.set(t,n)),!n)return null;const r=n.length;let a=e,o=0;for(;o<r;){const e=a[n[o]];if(void 0===e)return null;a=e,o++}return a}const DEFAULT_MODIFIER=e=>e,DEFAULT_MESSAGE=e=>"",DEFAULT_MESSAGE_DATA_TYPE="text",DEFAULT_NORMALIZE=e=>0===e.length?"":e.join(""),DEFAULT_INTERPOLATE=toDisplayString;function pluralDefault(e,t){return e=Math.abs(e),2===t?e?e>1?1:0:1:e?Math.min(e,2):0}function getPluralIndex(e){const t=isNumber(e.pluralIndex)?e.pluralIndex:-1;return e.named&&(isNumber(e.named.count)||isNumber(e.named.n))?isNumber(e.named.count)?e.named.count:isNumber(e.named.n)?e.named.n:t:t}function normalizeNamed(e,t){t.count||(t.count=e),t.n||(t.n=e)}function createMessageContext(e={}){const t=e.locale,n=getPluralIndex(e),r=isObject(e.pluralRules)&&isString(t)&&isFunction(e.pluralRules[t])?e.pluralRules[t]:pluralDefault,a=isObject(e.pluralRules)&&isString(t)&&isFunction(e.pluralRules[t])?pluralDefault:void 0,o=e.list||[],s=e.named||{};isNumber(e.pluralIndex)&&normalizeNamed(n,s);function l(t){const n=isFunction(e.messages)?e.messages(t):!!isObject(e.messages)&&e.messages[t];return n||(e.parent?e.parent.message(t):DEFAULT_MESSAGE)}const i=isPlainObject(e.processor)&&isFunction(e.processor.normalize)?e.processor.normalize:DEFAULT_NORMALIZE,c=isPlainObject(e.processor)&&isFunction(e.processor.interpolate)?e.processor.interpolate:DEFAULT_INTERPOLATE,u={list:e=>o[e],named:e=>s[e],plural:e=>e[r(n,e.length,a)],linked:(t,...n)=>{const[r,a]=n;let o="text",s="";1===n.length?isObject(r)?(s=r.modifier||s,o=r.type||o):isString(r)&&(s=r||s):2===n.length&&(isString(r)&&(s=r||s),isString(a)&&(o=a||o));let i=l(t)(u);return"vnode"===o&&isArray(i)&&s&&(i=i[0]),s?(c=s,e.modifiers?e.modifiers[c]:DEFAULT_MODIFIER)(i,o):i;var c},message:l,type:isPlainObject(e.processor)&&isString(e.processor.type)?e.processor.type:"text",interpolate:c,normalize:i};return u}function fallbackWithSimple(e,t,n){return[...new Set([n,...isArray(t)?t:isObject(t)?Object.keys(t):isString(t)?[t]:[n]])]}function fallbackWithLocaleChain(e,t,n){const r=isString(n)?n:DEFAULT_LOCALE,a=e;a.__localeChainCache||(a.__localeChainCache=new Map);let o=a.__localeChainCache.get(r);if(!o){o=[];let e=[n];for(;isArray(e);)e=appendBlockToChain(o,e,t);const s=isArray(t)||!isPlainObject(t)?t:t.default?t.default:null;e=isString(s)?[s]:s,isArray(e)&&appendBlockToChain(o,e,!1),a.__localeChainCache.set(r,o)}return o}function appendBlockToChain(e,t,n){let r=!0;for(let a=0;a<t.length&&isBoolean(r);a++){const o=t[a];isString(o)&&(r=appendLocaleToChain(e,t[a],n))}return r}function appendLocaleToChain(e,t,n){let r;const a=t.split("-");do{r=appendItemToChain(e,a.join("-"),n),a.splice(-1,1)}while(a.length&&!0===r);return r}function appendItemToChain(e,t,n){let r=!1;if(!e.includes(t)&&(r=!0,t)){r="!"!==t[t.length-1];const a=t.replace(/!/g,"");e.push(a),(isArray(n)||isPlainObject(n))&&n[a]&&(r=n[a])}return r}const VERSION$1="9.3.0-beta.16",NOT_REOSLVED=-1,DEFAULT_LOCALE="en-US",MISSING_RESOLVE_VALUE="",capitalize=e=>`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;function getDefaultLinkedModifiers(){return{upper:(e,t)=>"text"===t&&isString(e)?e.toUpperCase():"vnode"===t&&isObject(e)&&"__v_isVNode"in e?e.children.toUpperCase():e,lower:(e,t)=>"text"===t&&isString(e)?e.toLowerCase():"vnode"===t&&isObject(e)&&"__v_isVNode"in e?e.children.toLowerCase():e,capitalize:(e,t)=>"text"===t&&isString(e)?capitalize(e):"vnode"===t&&isObject(e)&&"__v_isVNode"in e?capitalize(e.children):e}}let _compiler,_resolver,_fallbacker;function registerMessageCompiler(e){_compiler=e}function registerMessageResolver(e){_resolver=e}function registerLocaleFallbacker(e){_fallbacker=e}let _cid=0;function createCoreContext(e={}){const t=isString(e.version)?e.version:VERSION$1,n=isString(e.locale)?e.locale:DEFAULT_LOCALE,r=isArray(e.fallbackLocale)||isPlainObject(e.fallbackLocale)||isString(e.fallbackLocale)||!1===e.fallbackLocale?e.fallbackLocale:n,a=isPlainObject(e.messages)?e.messages:{[n]:{}},o=isPlainObject(e.datetimeFormats)?e.datetimeFormats:{[n]:{}},s=isPlainObject(e.numberFormats)?e.numberFormats:{[n]:{}},l=assign({},e.modifiers||{},getDefaultLinkedModifiers()),i=e.pluralRules||{},c=isFunction(e.missing)?e.missing:null,u=!isBoolean(e.missingWarn)&&!isRegExp(e.missingWarn)||e.missingWarn,m=!isBoolean(e.fallbackWarn)&&!isRegExp(e.fallbackWarn)||e.fallbackWarn,f=!!e.fallbackFormat,p=!!e.unresolving,g=isFunction(e.postTranslation)?e.postTranslation:null,d=isPlainObject(e.processor)?e.processor:null,_=!isBoolean(e.warnHtmlMessage)||e.warnHtmlMessage,b=!!e.escapeParameter,h=isFunction(e.messageCompiler)?e.messageCompiler:_compiler,v=isFunction(e.messageResolver)?e.messageResolver:_resolver||resolveWithKeyValue,E=isFunction(e.localeFallbacker)?e.localeFallbacker:_fallbacker||fallbackWithSimple,y=isObject(e.fallbackContext)?e.fallbackContext:void 0,O=isFunction(e.onWarn)?e.onWarn:warn,k=e,N=isObject(k.__datetimeFormatters)?k.__datetimeFormatters:new Map,L=isObject(k.__numberFormatters)?k.__numberFormatters:new Map,T=isObject(k.__meta)?k.__meta:{};_cid++;const S={version:t,cid:_cid,locale:n,fallbackLocale:r,messages:a,modifiers:l,pluralRules:i,missing:c,missingWarn:u,fallbackWarn:m,fallbackFormat:f,unresolving:p,postTranslation:g,processor:d,warnHtmlMessage:_,escapeParameter:b,messageCompiler:h,messageResolver:v,localeFallbacker:E,fallbackContext:y,onWarn:O,__meta:T};return S.datetimeFormats=o,S.numberFormats=s,S.__datetimeFormatters=N,S.__numberFormatters=L,S}function handleMissing(e,t,n,r,a){const{missing:o,onWarn:s}=e;if(null!==o){const r=o(e,n,t,a);return isString(r)?r:t}return t}function updateFallbackLocale(e,t,n){e.__localeChainCache=new Map,e.localeFallbacker(e,n,t)}const defaultOnCacheKey=e=>e;let compileCache=Object.create(null);function compileToFunction(e,t={}){{const n=(t.onCacheKey||defaultOnCacheKey)(e),r=compileCache[n];if(r)return r;let a=!1;const o=t.onError||defaultOnError;t.onError=e=>{a=!0,o(e)};const{code:s}=baseCompile(e,t),l=new Function(`return ${s}`)();return a?l:compileCache[n]=l}}let code$1=CompileErrorCodes.__EXTEND_POINT__;const inc$1=()=>++code$1,CoreErrorCodes={INVALID_ARGUMENT:code$1,INVALID_DATE_ARGUMENT:inc$1(),INVALID_ISO_DATE_ARGUMENT:inc$1(),__EXTEND_POINT__:inc$1()},NOOP_MESSAGE_FUNCTION=()=>"",isMessageFunction=e=>isFunction(e);function translate(e,...t){const{fallbackFormat:n,postTranslation:r,unresolving:a,messageCompiler:o,fallbackLocale:s,messages:l}=e,[i,c]=parseTranslateArgs(...t),u=isBoolean(c.missingWarn)?c.missingWarn:e.missingWarn,m=isBoolean(c.fallbackWarn)?c.fallbackWarn:e.fallbackWarn,f=isBoolean(c.escapeParameter)?c.escapeParameter:e.escapeParameter,p=!!c.resolvedMessage,g=isString(c.default)||isBoolean(c.default)?isBoolean(c.default)?o?i:()=>i:c.default:n?o?i:()=>i:"",d=n||""!==g,_=isString(c.locale)?c.locale:e.locale;f&&escapeParams(c);let[b,h,v]=p?[i,_,l[_]||{}]:resolveMessageFormat(e,i,_,s,m,u),E=b,y=i;if(p||isString(E)||isMessageFunction(E)||d&&(E=g,y=E),!(p||(isString(E)||isMessageFunction(E))&&isString(h)))return a?-1:i;let O=!1;const k=isMessageFunction(E)?E:compileMessageFormat(e,i,h,E,y,(()=>{O=!0}));if(O)return E;const N=evaluateMessage(e,k,createMessageContext(getMessageContextOptions(e,h,v,c)));return r?r(N,i):N}function escapeParams(e){isArray(e.list)?e.list=e.list.map((e=>isString(e)?escapeHtml(e):e)):isObject(e.named)&&Object.keys(e.named).forEach((t=>{isString(e.named[t])&&(e.named[t]=escapeHtml(e.named[t]))}))}function resolveMessageFormat(e,t,n,r,a,o){const{messages:s,onWarn:l,messageResolver:i,localeFallbacker:c}=e,u=c(e,r,n);let m,f={},p=null;for(let n=0;n<u.length&&(m=u[n],f=s[m]||{},null===(p=i(f,t))&&(p=f[t]),!isString(p)&&!isFunction(p));n++){const n=handleMissing(e,t,m,o,"translate");n!==t&&(p=n)}return[p,m,f]}function compileMessageFormat(e,t,n,r,a,o){const{messageCompiler:s,warnHtmlMessage:l}=e;if(isMessageFunction(r)){const e=r;return e.locale=e.locale||n,e.key=e.key||t,e}if(null==s){const e=()=>r;return e.locale=n,e.key=t,e}const i=s(r,getCompileOptions(e,n,a,r,l,o));return i.locale=n,i.key=t,i.source=r,i}function evaluateMessage(e,t,n){return t(n)}function parseTranslateArgs(...e){const[t,n,r]=e,a={};if(!isString(t)&&!isNumber(t)&&!isMessageFunction(t))throw Error(CoreErrorCodes.INVALID_ARGUMENT);const o=isNumber(t)?String(t):(isMessageFunction(t),t);return isNumber(n)?a.plural=n:isString(n)?a.default=n:isPlainObject(n)&&!isEmptyObject(n)?a.named=n:isArray(n)&&(a.list=n),isNumber(r)?a.plural=r:isString(r)?a.default=r:isPlainObject(r)&&assign(a,r),[o,a]}function getCompileOptions(e,t,n,r,a,o){return{warnHtmlMessage:a,onError:e=>{throw o&&o(e),e},onCacheKey:e=>generateFormatCacheKey(t,n,e)}}function getMessageContextOptions(e,t,n,r){const{modifiers:a,pluralRules:o,messageResolver:s,fallbackLocale:l,fallbackWarn:i,missingWarn:c,fallbackContext:u}=e,m={locale:t,modifiers:a,pluralRules:o,messages:r=>{let a=s(n,r);if(null==a&&u){const[,,e]=resolveMessageFormat(u,r,t,l,i,c);a=s(e,r)}if(isString(a)){let n=!1;const o=compileMessageFormat(e,r,t,a,r,(()=>{n=!0}));return n?NOOP_MESSAGE_FUNCTION:o}return isMessageFunction(a)?a:NOOP_MESSAGE_FUNCTION}};return e.processor&&(m.processor=e.processor),r.list&&(m.list=r.list),r.named&&(m.named=r.named),isNumber(r.plural)&&(m.pluralIndex=r.plural),m}function datetime(e,...t){const{datetimeFormats:n,unresolving:r,fallbackLocale:a,onWarn:o,localeFallbacker:s}=e,{__datetimeFormatters:l}=e,[i,c,u,m]=parseDateTimeArgs(...t),f=isBoolean(u.missingWarn)?u.missingWarn:e.missingWarn;isBoolean(u.fallbackWarn)?u.fallbackWarn:e.fallbackWarn;const p=!!u.part,g=isString(u.locale)?u.locale:e.locale,d=s(e,a,g);if(!isString(i)||""===i)return new Intl.DateTimeFormat(g,m).format(c);let _,b={},h=null;for(let t=0;t<d.length&&(_=d[t],b=n[_]||{},h=b[i],!isPlainObject(h));t++)handleMissing(e,i,_,f,"datetime format");if(!isPlainObject(h)||!isString(_))return r?-1:i;let v=`${_}__${i}`;isEmptyObject(m)||(v=`${v}__${JSON.stringify(m)}`);let E=l.get(v);return E||(E=new Intl.DateTimeFormat(_,assign({},h,m)),l.set(v,E)),p?E.formatToParts(c):E.format(c)}const DATETIME_FORMAT_OPTIONS_KEYS=["localeMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName","formatMatcher","hour12","timeZone","dateStyle","timeStyle","calendar","dayPeriod","numberingSystem","hourCycle","fractionalSecondDigits"];function parseDateTimeArgs(...e){const[t,n,r,a]=e,o={};let s,l={};if(isString(t)){const e=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!e)throw Error(CoreErrorCodes.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(CoreErrorCodes.INVALID_ISO_DATE_ARGUMENT)}}else if("[object Date]"===toTypeString(t)){if(isNaN(t.getTime()))throw Error(CoreErrorCodes.INVALID_DATE_ARGUMENT);s=t}else{if(!isNumber(t))throw Error(CoreErrorCodes.INVALID_ARGUMENT);s=t}return isString(n)?o.key=n:isPlainObject(n)&&Object.keys(n).forEach((e=>{DATETIME_FORMAT_OPTIONS_KEYS.includes(e)?l[e]=n[e]:o[e]=n[e]})),isString(r)?o.locale=r:isPlainObject(r)&&(l=r),isPlainObject(a)&&(l=a),[o.key||"",s,o,l]}function clearDateTimeFormat(e,t,n){const r=e;for(const e in n){const n=`${t}__${e}`;r.__datetimeFormatters.has(n)&&r.__datetimeFormatters.delete(n)}}function number(e,...t){const{numberFormats:n,unresolving:r,fallbackLocale:a,onWarn:o,localeFallbacker:s}=e,{__numberFormatters:l}=e,[i,c,u,m]=parseNumberArgs(...t),f=isBoolean(u.missingWarn)?u.missingWarn:e.missingWarn;isBoolean(u.fallbackWarn)?u.fallbackWarn:e.fallbackWarn;const p=!!u.part,g=isString(u.locale)?u.locale:e.locale,d=s(e,a,g);if(!isString(i)||""===i)return new Intl.NumberFormat(g,m).format(c);let _,b={},h=null;for(let t=0;t<d.length&&(_=d[t],b=n[_]||{},h=b[i],!isPlainObject(h));t++)handleMissing(e,i,_,f,"number format");if(!isPlainObject(h)||!isString(_))return r?-1:i;let v=`${_}__${i}`;isEmptyObject(m)||(v=`${v}__${JSON.stringify(m)}`);let E=l.get(v);return E||(E=new Intl.NumberFormat(_,assign({},h,m)),l.set(v,E)),p?E.formatToParts(c):E.format(c)}const NUMBER_FORMAT_OPTIONS_KEYS=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function parseNumberArgs(...e){const[t,n,r,a]=e,o={};let s={};if(!isNumber(t))throw Error(CoreErrorCodes.INVALID_ARGUMENT);const l=t;return isString(n)?o.key=n:isPlainObject(n)&&Object.keys(n).forEach((e=>{NUMBER_FORMAT_OPTIONS_KEYS.includes(e)?s[e]=n[e]:o[e]=n[e]})),isString(r)?o.locale=r:isPlainObject(r)&&(s=r),isPlainObject(a)&&(s=a),[o.key||"",l,o,s]}function clearNumberFormat(e,t,n){const r=e;for(const e in n){const n=`${t}__${e}`;r.__numberFormatters.has(n)&&r.__numberFormatters.delete(n)}}const VERSION="9.3.0-beta.16";let code=CompileErrorCodes.__EXTEND_POINT__;const inc=()=>++code,I18nErrorCodes={UNEXPECTED_RETURN_TYPE:code,INVALID_ARGUMENT:inc(),MUST_BE_CALL_SETUP_TOP:inc(),NOT_INSLALLED:inc(),NOT_AVAILABLE_IN_LEGACY_MODE:inc(),REQUIRED_VALUE:inc(),INVALID_VALUE:inc(),CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:inc(),NOT_INSLALLED_WITH_PROVIDE:inc(),UNEXPECTED_ERROR:inc(),NOT_COMPATIBLE_LEGACY_VUE_I18N:inc(),BRIDGE_SUPPORT_VUE_2_ONLY:inc(),MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION:inc(),NOT_AVAILABLE_COMPOSITION_IN_LEGACY:inc(),__EXTEND_POINT__:inc()},TranslateVNodeSymbol=makeSymbol("__translateVNode"),DatetimePartsSymbol=makeSymbol("__datetimeParts"),NumberPartsSymbol=makeSymbol("__numberParts"),SetPluralRulesSymbol=makeSymbol("__setPluralRules"),LegacyInstanceSymbol=makeSymbol("__legacyVueI18n"),InejctWithOption=makeSymbol("__injectWithOption"),__VUE_I18N_BRIDGE__="__VUE_I18N_BRIDGE__";function isLegacyVueI18n(e){return null!=e&&null!=e.version&&(Number(e.version.split(".")[0])||-1)>=8}function handleFlatJson(e){if(!isObject(e))return e;for(const t in e)if(hasOwn(e,t))if(t.includes(".")){const n=t.split("."),r=n.length-1;let a=e;for(let e=0;e<r;e++)n[e]in a||(a[n[e]]={}),a=a[n[e]];a[n[r]]=e[t],delete e[t],isObject(a[n[r]])&&handleFlatJson(a[n[r]])}else isObject(e[t])&&handleFlatJson(e[t]);return e}function getLocaleMessages(e,t){const{messages:n,__i18n:r,messageResolver:a,flatJson:o}=t,s=isPlainObject(n)?n:isArray(r)?{}:{[e]:{}};if(isArray(r)&&r.forEach((e=>{if("locale"in e&&"resource"in e){const{locale:t,resource:n}=e;t?(s[t]=s[t]||{},deepCopy(n,s[t])):deepCopy(n,s)}else isString(e)&&deepCopy(JSON.parse(e),s)})),null==a&&o)for(const e in s)hasOwn(s,e)&&handleFlatJson(s[e]);return s}const isNotObjectOrIsArray=e=>!isObject(e)||isArray(e);function deepCopy(e,t){if(isNotObjectOrIsArray(e)||isNotObjectOrIsArray(t))throw Error(I18nErrorCodes.INVALID_VALUE);for(const n in e)hasOwn(e,n)&&(isNotObjectOrIsArray(e[n])||isNotObjectOrIsArray(t[n])?t[n]=e[n]:deepCopy(e[n],t[n]))}function getComponentOptions(e){return e.proxy.$options}function adjustI18nResources(e,t,n){let r=isObject(t.messages)?t.messages:{};"__i18nGlobal"in n&&(r=getLocaleMessages(e.locale.value,{messages:r,__i18n:n.__i18nGlobal}));const a=Object.keys(r);if(a.length&&a.forEach((t=>{e.mergeLocaleMessage(t,r[t])})),isObject(t.datetimeFormats)){const n=Object.keys(t.datetimeFormats);n.length&&n.forEach((n=>{e.mergeDateTimeFormat(n,t.datetimeFormats[n])}))}if(isObject(t.numberFormats)){const n=Object.keys(t.numberFormats);n.length&&n.forEach((n=>{e.mergeNumberFormat(n,t.numberFormats[n])}))}}function createTextNode(e){return createVNodeVue2Compatible(e)}function createVNodeVue2Compatible(e){const t=void 0;return{tag:void 0,data:void 0,children:void 0,text:e,elm:void 0,ns:void 0,context:void 0,fnContext:void 0,fnOptions:void 0,fnScopeId:void 0,key:void 0,componentOptions:void 0,componentInstance:t,parent:void 0,raw:!1,isStatic:!1,isRootInsert:!0,isComment:!1,isCloned:!1,isOnce:!1,asyncFactory:void 0,asyncMeta:void 0,isAsyncPlaceholder:!1,child:()=>t}}let composerID=0;function defineCoreMissingHandler(e){return(t,n,r,a)=>e(n,r,getCurrentInstance()||void 0,a)}function createComposer(e={},t){const{__root:n}=e,r=void 0===n;let a=!isBoolean(e.inheritLocale)||e.inheritLocale;const o=ref(n&&a?n.locale.value:isString(e.locale)?e.locale:DEFAULT_LOCALE),s=ref(n&&a?n.fallbackLocale.value:isString(e.fallbackLocale)||isArray(e.fallbackLocale)||isPlainObject(e.fallbackLocale)||!1===e.fallbackLocale?e.fallbackLocale:o.value),l=ref(getLocaleMessages(o.value,e)),i=ref(isPlainObject(e.datetimeFormats)?e.datetimeFormats:{[o.value]:{}}),c=ref(isPlainObject(e.numberFormats)?e.numberFormats:{[o.value]:{}});let u=n?n.missingWarn:!isBoolean(e.missingWarn)&&!isRegExp(e.missingWarn)||e.missingWarn,m=n?n.fallbackWarn:!isBoolean(e.fallbackWarn)&&!isRegExp(e.fallbackWarn)||e.fallbackWarn,f=n?n.fallbackRoot:!isBoolean(e.fallbackRoot)||e.fallbackRoot,p=!!e.fallbackFormat,g=isFunction(e.missing)?e.missing:null,d=isFunction(e.missing)?defineCoreMissingHandler(e.missing):null,_=isFunction(e.postTranslation)?e.postTranslation:null,b=n?n.warnHtmlMessage:!isBoolean(e.warnHtmlMessage)||e.warnHtmlMessage,h=!!e.escapeParameter;const v=n?n.modifiers:isPlainObject(e.modifiers)?e.modifiers:{};let E,y,O=e.pluralRules||n&&n.pluralRules;{isLegacyVueI18n(t);const e={locale:o.value,fallbackLocale:s.value,messages:l.value,dateTimeFormats:i.value,numberFormats:c.value,modifiers:v,missing:g,fallbackRoot:f,postTranslation:_,pluralizationRules:O,escapeParameterHtml:h,sync:a,silentFallbackWarn:isBoolean(m)?!m:m,silentTranslationWarn:isBoolean(u)?!u:u,formatFallbackMessages:isBoolean(p)?!p:p,warnHtmlInMessage:isBoolean(b)&&b?"warn":"off",__VUE_I18N_BRIDGE__:__VUE_I18N_BRIDGE__};E=new t(e)}y=(()=>{const t={version:VERSION,locale:o.value,fallbackLocale:s.value,messages:l.value,modifiers:v,pluralRules:O,missing:null===d?void 0:d,missingWarn:u,fallbackWarn:m,fallbackFormat:p,unresolving:!0,postTranslation:null===_?void 0:_,warnHtmlMessage:b,escapeParameter:h,messageResolver:e.messageResolver,__meta:{framework:"vue"}};t.datetimeFormats=i.value,t.numberFormats=c.value,t.__datetimeFormatters=isPlainObject(y)?y.__datetimeFormatters:void 0,t.__numberFormatters=isPlainObject(y)?y.__numberFormatters:void 0;return createCoreContext(t)})(),updateFallbackLocale(y,o.value,s.value);const k=computed({get:()=>o.value,set:e=>{o.value=e,E&&!r&&(E.locale=e),y.locale=o.value}}),N=computed({get:()=>s.value,set:e=>{s.value=e,E&&!r&&(E.fallbackLocale=e),y.fallbackLocale=s.value,updateFallbackLocale(y,o.value,e)}}),L=computed((()=>l.value)),T=computed((()=>i.value)),S=computed((()=>c.value));const C=(e,t,r,a,u,m)=>{let p;if(o.value,s.value,l.value,i.value,c.value,p=e(y),isNumber(p)&&-1===p){const[e,r]=t();return n&&f?a(n):u(e)}if(m(p))return p;throw Error(I18nErrorCodes.UNEXPECTED_RETURN_TYPE)};function I(...e){return C((t=>Reflect.apply(translate,null,[t,...e])),(()=>parseTranslateArgs(...e)),0,(t=>Reflect.apply(t.t,t,[...e])),(e=>e),(e=>isString(e)))}const F={normalize:function(e){return e.map((e=>isString(e)||isNumber(e)||isBoolean(e)?createTextNode(String(e)):e))},interpolate:e=>e,type:"vnode"};function P(e){return l.value[e]||{}}composerID++,n&&inBrowser&&(watch(n.locale,(e=>{a&&(o.value=e,E&&!r&&(E.locale=e),y.locale=e,updateFallbackLocale(y,o.value,s.value))})),watch(n.fallbackLocale,(e=>{a&&(s.value=e,E&&!r&&(E.fallbackLocale=e),y.fallbackLocale=e,updateFallbackLocale(y,o.value,s.value))})));const A={id:composerID,locale:k,fallbackLocale:N,get inheritLocale(){return a},set inheritLocale(e){a=e,E&&(E._sync=e),e&&n&&(o.value=n.locale.value,s.value=n.fallbackLocale.value,E&&(E.locale=n.locale.value,E.fallbackLocale=n.fallbackLocale.value),updateFallbackLocale(y,o.value,s.value))},get availableLocales(){return Object.keys(l.value).sort()},messages:L,get modifiers(){return v},get pluralRules(){return O||{}},get isGlobal(){return r},get missingWarn(){return u},set missingWarn(e){u=e,y.missingWarn=u},get fallbackWarn(){return m},set fallbackWarn(e){m=e,y.fallbackWarn=m},get fallbackRoot(){return f},set fallbackRoot(e){f=e},get fallbackFormat(){return p},set fallbackFormat(e){p=e,y.fallbackFormat=p},get warnHtmlMessage(){return b},set warnHtmlMessage(e){b=e,y.warnHtmlMessage=e},get escapeParameter(){return h},set escapeParameter(e){h=e,y.escapeParameter=e},t:I,getLocaleMessage:P,setLocaleMessage:function(e,t){l.value[e]=t,E&&E.setLocaleMessage(e,t),y.messages=l.value},mergeLocaleMessage:function(e,t){l.value[e]=l.value[e]||{},E&&E.mergeLocaleMessage(e,t),deepCopy(t,l.value[e]),y.messages=l.value},getPostTranslationHandler:function(){return isFunction(_)?_:null},setPostTranslationHandler:function(e){_=e,y.postTranslation=e},getMissingHandler:function(){return g},setMissingHandler:function(e){null!==e&&(d=defineCoreMissingHandler(e)),g=e,y.missing=d},[SetPluralRulesSymbol]:function(e){O=e,y.pluralRules=O}};return A.datetimeFormats=T,A.numberFormats=S,A.rt=function(...e){const[t,n,r]=e;if(r&&!isObject(r))throw Error(I18nErrorCodes.INVALID_ARGUMENT);return I(t,n,assign({resolvedMessage:!0},r||{}))},A.te=function(e,t){const n=P(isString(t)?t:o.value);return null!==y.messageResolver(n,e)},A.tm=function(e){const t=function(e){let t=null;const n=fallbackWithLocaleChain(y,s.value,o.value);for(let r=0;r<n.length;r++){const a=l.value[n[r]]||{},o=y.messageResolver(a,e);if(null!=o){t=o;break}}return t}(e);return null!=t?t:n&&n.tm(e)||{}},A.d=function(...e){return C((t=>Reflect.apply(datetime,null,[t,...e])),(()=>parseDateTimeArgs(...e)),0,(t=>Reflect.apply(t.d,t,[...e])),(()=>""),(e=>isString(e)))},A.n=function(...e){return C((t=>Reflect.apply(number,null,[t,...e])),(()=>parseNumberArgs(...e)),0,(t=>Reflect.apply(t.n,t,[...e])),(()=>""),(e=>isString(e)))},A.getDateTimeFormat=function(e){return i.value[e]||{}},A.setDateTimeFormat=function(e,t){i.value[e]=t,E&&E.setDateTimeFormat(e,t),y.datetimeFormats=i.value,clearDateTimeFormat(y,e,t)},A.mergeDateTimeFormat=function(e,t){i.value[e]=assign(i.value[e]||{},t),E&&E.mergeDateTimeFormat(e,t),y.datetimeFormats=i.value,clearDateTimeFormat(y,e,t)},A.getNumberFormat=function(e){return c.value[e]||{}},A.setNumberFormat=function(e,t){c.value[e]=t,E&&E.setNumberFormat(e,t),y.numberFormats=c.value,clearNumberFormat(y,e,t)},A.mergeNumberFormat=function(e,t){c.value[e]=assign(c.value[e]||{},t),E&&E.mergeNumberFormat(e,t),y.numberFormats=c.value,clearNumberFormat(y,e,t)},A[InejctWithOption]=e.__injectWithOption,A[TranslateVNodeSymbol]=function(...e){return C((t=>{let n;const r=t;try{r.processor=F,n=Reflect.apply(translate,null,[r,...e])}finally{r.processor=null}return n}),(()=>parseTranslateArgs(...e)),0,(t=>t[TranslateVNodeSymbol](...e)),(e=>[createTextNode(e)]),(e=>isArray(e)))},A[DatetimePartsSymbol]=function(...e){return C((t=>Reflect.apply(datetime,null,[t,...e])),(()=>parseDateTimeArgs(...e)),0,(t=>t[DatetimePartsSymbol](...e)),(()=>[]),(e=>isString(e)||isArray(e)))},A[NumberPartsSymbol]=function(...e){return C((t=>Reflect.apply(number,null,[t,...e])),(()=>parseNumberArgs(...e)),0,(t=>t[NumberPartsSymbol](...e)),(()=>[]),(e=>isString(e)||isArray(e)))},A[LegacyInstanceSymbol]=E,A}const baseFormatProps={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>"parent"===e||"global"===e,default:"parent"},i18n:{type:Object}};function getInterpolateArg({slots:e},t){if(1===t.length&&"default"===t[0]){return(e.default?e.default():[]).reduce(((e,t)=>[...e,...t.children?t.children:[t]]),[])}return t.reduce(((t,n)=>{const r=e[n];return r&&(t[n]=r()),t}),{})}function getFragmentableTag(e){return e}const TranslationImpl=defineComponent({name:"i18n-t",props:assign({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>isNumber(e)||!isNaN(e)}},baseFormatProps),setup(e,t){const{slots:n,attrs:r}=t,a=e.i18n||useI18n({useScope:e.scope,__useComponent:!0});return()=>{const o=Object.keys(n).filter((e=>"_"!==e)),s={};e.locale&&(s.locale=e.locale),void 0!==e.plural&&(s.plural=isString(e.plural)?+e.plural:e.plural);const l=getInterpolateArg(t,o),i=a[TranslateVNodeSymbol](e.keypath,l,s),c=assign({},r),u=isString(e.tag)||isObject(e.tag)?e.tag:getFragmentableTag("span");return h(u,c,i)}}}),Translation=TranslationImpl,I18nT=Translation;function isVNode(e){return isArray(e)&&!isString(e[0])}function renderFormatter(e,t,n,r){const{slots:a,attrs:o}=t;return()=>{const t={part:!0};let s={};e.locale&&(t.locale=e.locale),isString(e.format)?t.key=e.format:isObject(e.format)&&(isString(e.format.key)&&(t.key=e.format.key),s=Object.keys(e.format).reduce(((t,r)=>n.includes(r)?assign({},t,{[r]:e.format[r]}):t),{}));const l=r(e.value,t,s);let i=[t.key];isArray(l)?i=l.map(((e,t)=>{const n=a[e.type],r=n?n({[e.type]:e.value,index:t,parts:l}):[e.value];return isVNode(r)&&(r[0].key=`${e.type}-${t}`),r})):isString(l)&&(i=[l]);const c=assign({},o),u=isString(e.tag)||isObject(e.tag)?e.tag:getFragmentableTag("span");return h(u,c,i)}}const NumberFormatImpl=defineComponent({name:"i18n-n",props:assign({value:{type:Number,required:!0},format:{type:[String,Object]}},baseFormatProps),setup(e,t){const n=e.i18n||useI18n({useScope:"parent",__useComponent:!0});return renderFormatter(e,t,NUMBER_FORMAT_OPTIONS_KEYS,((...e)=>n[NumberPartsSymbol](...e)))}}),NumberFormat=NumberFormatImpl,I18nN=NumberFormat,DatetimeFormatImpl=defineComponent({name:"i18n-d",props:assign({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},baseFormatProps),setup(e,t){const n=e.i18n||useI18n({useScope:"parent",__useComponent:!0});return renderFormatter(e,t,DATETIME_FORMAT_OPTIONS_KEYS,((...e)=>n[DatetimePartsSymbol](...e)))}}),DatetimeFormat=DatetimeFormatImpl,I18nD=DatetimeFormat;function apply(e,...t){const n=isPlainObject(t[0])?t[0]:{};(!isBoolean(n.globalInstall)||n.globalInstall)&&(e.component(Translation.name,Translation),e.component(NumberFormat.name,NumberFormat),e.component(DatetimeFormat.name,DatetimeFormat))}function defineMixin(e,t){return{beforeCreate(){const n=this.$options;if(!n.__VUE18N__INSTANCE__)if(n.i18n=n.i18n||(n.__i18nBridge?{}:null),this._i18nBridgeRoot=e,"composition"!==e.mode)if(n.i18n){if(n.i18n instanceof t){if(n.__i18nBridge)try{const e=n.i18n&&n.i18n.messages?n.i18n.messages:{};n.__i18nBridge.forEach((t=>deepCopy(JSON.parse(t),e))),Object.keys(e).forEach((t=>{n.i18n.mergeLocaleMessage(t,e[t])}))}catch(e){}this._i18n=n.i18n,this._i18nWatcher=this._i18n.watchI18nData()}else if(isPlainObject(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.__i18nBridge)try{const e=n.i18n&&n.i18n.messages?n.i18n.messages:{};n.__i18nBridge.forEach((t=>deepCopy(JSON.parse(t),e))),n.i18n.messages=e}catch(e){}const{sharedMessages:r}=n.i18n;r&&isPlainObject(r)&&deepCopy(r,n.i18n.messages),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 n=this.$options;n.__VUE18N__INSTANCE__||"composition"!==e.mode&&(n.i18n=n.i18n||(n.__i18nBridge?{}:null),n.i18n?(n.i18n instanceof t||isPlainObject(n.i18n))&&(this._i18n.subscribeDataChanging(this),this._subscribing=!0):(this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof t||n.parent&&n.parent.$i18n&&n.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)}))}}}let _legacyVueI18n=null;const I18nInjectionKey=makeSymbol("global-vue-i18n");function createI18n(e={},t){_legacyVueI18n=t;const n=!isBoolean(e.legacy)||e.legacy,r=!isBoolean(e.globalInjection)||e.globalInjection,a=!n||!!e.allowComposition,o=new Map,[s,l]=createGlobal(e,n,t);{const e=l[LegacyInstanceSymbol];let t=null;Object.defineProperty(e,"global",{get:()=>l}),Object.defineProperty(e,"mode",{get:()=>n?"legacy":"composition"}),Object.defineProperty(e,"allowComposition",{get:()=>a}),Object.defineProperty(e,"__instances",{get:()=>o}),Object.defineProperty(e,"install",{writable:!0,value:(a,...o)=>{if(2!==(a&&a.version&&Number(a.version.split(".")[0])||-1))throw Error(I18nErrorCodes.BRIDGE_SUPPORT_VUE_2_ONLY);apply(a,...o),!n&&r&&(t=injectGlobalFieldsForBridge(a,e,l)),a.mixin(defineMixin(e,_legacyVueI18n))}}),Object.defineProperty(e,"dispose",{value:()=>{t&&t(),s.stop()}});const i={__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(i).forEach((t=>Object.defineProperty(e,t,{value:i[t]}))),e}}function useI18n(e={}){const t=getCurrentInstance();if(null==t)throw Error(I18nErrorCodes.MUST_BE_CALL_SETUP_TOP);if(null==_legacyVueI18n)throw Error(I18nErrorCodes.NOT_INSLALLED);const n=getI18nInstance(t),r=getGlobalComposer(n),a=getComponentOptions(t),o=getScope(e,a);if("legacy"===n.mode&&!e.__useComponent){if(!n.allowComposition)throw Error(I18nErrorCodes.NOT_AVAILABLE_IN_LEGACY_MODE);return useI18nForLegacy(t,o,r,e)}if("global"===o)return adjustI18nResources(r,e,a),r;if("parent"===o){let a=getComposer(n,t,e.__useComponent);return null==a&&(a=r),a}const s=n;let l=s.__getInstance(t);if(null==l){const n=assign({},e);"__i18n"in a&&(n.__i18n=a.__i18n),r&&(n.__root=r),l=createComposer(n,_legacyVueI18n),s.__composerExtend&&s.__composerExtend(l),setupLifeCycle(s,t,l),s.__setInstance(t,l)}return l}const castToVueI18n=e=>{if(!(__VUE_I18N_BRIDGE__ in e))throw Error(I18nErrorCodes.NOT_COMPATIBLE_LEGACY_VUE_I18N);return e};function createGlobal(e,t,n){const r=effectScope();{if(!isLegacyVueI18n(n))throw Error(I18nErrorCodes.NOT_COMPATIBLE_LEGACY_VUE_I18N);const t=r.run((()=>createComposer(e,n)));if(null==t)throw Error(I18nErrorCodes.UNEXPECTED_ERROR);return[r,t]}}function getI18nInstance(e){{const t=e.proxy;if(null==t)throw Error(I18nErrorCodes.UNEXPECTED_ERROR);const n=t._i18nBridgeRoot;if(!n)throw Error(I18nErrorCodes.NOT_INSLALLED);return n}}function getScope(e,t){return isEmptyObject(e)?"__i18n"in t?"local":"global":e.useScope?e.useScope:"local"}function getGlobalComposer(e){return e.global}function getComposer(e,t,n=!1){let r=null;const a=t.root;let o=t.parent;for(;null!=o;){const t=e;if("composition"===e.mode)r=t.__getInstance(o);else{const e=t.__getInstance(o);null!=e&&(r=e.__composer,n&&r&&!r[InejctWithOption]&&(r=null))}if(null!=r)break;if(a===o)break;o=o.parent}return r}function setupLifeCycle(e,t,n){{const r=t.proxy;if(null==r)throw Error(I18nErrorCodes.UNEXPECTED_ERROR);const a=n[LegacyInstanceSymbol];if(a===e)throw Error(I18nErrorCodes.UNEXPECTED_ERROR);r._i18n=a,r._i18n_bridge=!0,inBrowser&&(r._i18nWatcher=r._i18n.watchI18nData(),r._i18n._sync&&(r._localeWatcher=r._i18n.watchLocale()));let o=!1;onBeforeMount((()=>{r._i18n.subscribeDataChanging(r),o=!0})),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}))}}function useI18nForLegacy(e,t,n,r={}){const a="local"===t,o=shallowRef(null);if(a&&e.proxy&&!e.proxy.$options.i18n&&!e.proxy.$options.__i18n)throw Error(I18nErrorCodes.MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION);const s=!isBoolean(r.inheritLocale)||r.inheritLocale,l=ref(a&&s?n.locale.value:isString(r.locale)?r.locale:DEFAULT_LOCALE),i=ref(a&&s?n.fallbackLocale.value:isString(r.fallbackLocale)||isArray(r.fallbackLocale)||isPlainObject(r.fallbackLocale)||!1===r.fallbackLocale?r.fallbackLocale:l.value),c=ref(getLocaleMessages(l.value,r)),u=ref(isPlainObject(r.datetimeFormats)?r.datetimeFormats:{[l.value]:{}}),m=ref(isPlainObject(r.numberFormats)?r.numberFormats:{[l.value]:{}}),f=a?n.missingWarn:!isBoolean(r.missingWarn)&&!isRegExp(r.missingWarn)||r.missingWarn,p=a?n.fallbackWarn:!isBoolean(r.fallbackWarn)&&!isRegExp(r.fallbackWarn)||r.fallbackWarn,g=a?n.fallbackRoot:!isBoolean(r.fallbackRoot)||r.fallbackRoot,d=!!r.fallbackFormat,_=isFunction(r.missing)?r.missing:null,b=isFunction(r.postTranslation)?r.postTranslation:null,h=a?n.warnHtmlMessage:!isBoolean(r.warnHtmlMessage)||r.warnHtmlMessage,v=!!r.escapeParameter,E=a?n.modifiers:isPlainObject(r.modifiers)?r.modifiers:{},y=r.pluralRules||a&&n.pluralRules;function O(e){return l.value,i.value,c.value,u.value,m.value,e()}const k={get id(){return o.value?o.value.id:-1},locale:computed({get:()=>o.value?o.value.locale.value:l.value,set:e=>{o.value&&(o.value.locale.value=e),l.value=e}}),fallbackLocale:computed({get:()=>o.value?o.value.fallbackLocale.value:i.value,set:e=>{o.value&&(o.value.fallbackLocale.value=e),i.value=e}}),messages:computed((()=>o.value?o.value.messages.value:c.value)),datetimeFormats:computed((()=>u.value)),numberFormats:computed((()=>m.value)),get inheritLocale(){return o.value?o.value.inheritLocale:s},set inheritLocale(e){o.value&&(o.value.inheritLocale=e)},get availableLocales(){return o.value?o.value.availableLocales:Object.keys(c.value)},get modifiers(){return o.value?o.value.modifiers:E},get pluralRules(){return o.value?o.value.pluralRules:y},get isGlobal(){return!!o.value&&o.value.isGlobal},get missingWarn(){return o.value?o.value.missingWarn:f},set missingWarn(e){o.value&&(o.value.missingWarn=e)},get fallbackWarn(){return o.value?o.value.fallbackWarn:p},set fallbackWarn(e){o.value&&(o.value.missingWarn=e)},get fallbackRoot(){return o.value?o.value.fallbackRoot:g},set fallbackRoot(e){o.value&&(o.value.fallbackRoot=e)},get fallbackFormat(){return o.value?o.value.fallbackFormat:d},set fallbackFormat(e){o.value&&(o.value.fallbackFormat=e)},get warnHtmlMessage(){return o.value?o.value.warnHtmlMessage:h},set warnHtmlMessage(e){o.value&&(o.value.warnHtmlMessage=e)},get escapeParameter(){return o.value?o.value.escapeParameter:v},set escapeParameter(e){o.value&&(o.value.escapeParameter=e)},t:function(...e){return o.value?O((()=>Reflect.apply(o.value.t,null,[...e]))):O((()=>""))},getPostTranslationHandler:function(){return o.value?o.value.getPostTranslationHandler():b},setPostTranslationHandler:function(e){o.value&&o.value.setPostTranslationHandler(e)},getMissingHandler:function(){return o.value?o.value.getMissingHandler():_},setMissingHandler:function(e){o.value&&o.value.setMissingHandler(e)},rt:function(...e){return o.value?Reflect.apply(o.value.rt,null,[...e]):""},d:function(...e){return o.value?O((()=>Reflect.apply(o.value.d,null,[...e]))):O((()=>""))},n:function(...e){return o.value?O((()=>Reflect.apply(o.value.n,null,[...e]))):O((()=>""))},tm:function(e){return o.value?o.value.tm(e):{}},te:function(e,t){return!!o.value&&o.value.te(e,t)},getLocaleMessage:function(e){return o.value?o.value.getLocaleMessage(e):{}},setLocaleMessage:function(e,t){o.value&&(o.value.setLocaleMessage(e,t),c.value[e]=t)},mergeLocaleMessage:function(e,t){o.value&&o.value.mergeLocaleMessage(e,t)},getDateTimeFormat:function(e){return o.value?o.value.getDateTimeFormat(e):{}},setDateTimeFormat:function(e,t){o.value&&(o.value.setDateTimeFormat(e,t),u.value[e]=t)},mergeDateTimeFormat:function(e,t){o.value&&o.value.mergeDateTimeFormat(e,t)},getNumberFormat:function(e){return o.value?o.value.getNumberFormat(e):{}},setNumberFormat:function(e,t){o.value&&(o.value.setNumberFormat(e,t),m.value[e]=t)},mergeNumberFormat:function(e,t){o.value&&o.value.mergeNumberFormat(e,t)}};return onBeforeMount((()=>{if(null==e.proxy||null==e.proxy.$i18n)throw Error(I18nErrorCodes.NOT_AVAILABLE_COMPOSITION_IN_LEGACY);const n=o.value=e.proxy.$i18n.__composer;"global"===t?(l.value=n.locale.value,i.value=n.fallbackLocale.value,c.value=n.messages.value,u.value=n.datetimeFormats.value,m.value=n.numberFormats.value):a&&function(e){e.locale.value=l.value,e.fallbackLocale.value=i.value,Object.keys(c.value).forEach((t=>{e.mergeLocaleMessage(t,c.value[t])})),Object.keys(u.value).forEach((t=>{e.mergeDateTimeFormat(t,u.value[t])})),Object.keys(m.value).forEach((t=>{e.mergeNumberFormat(t,m.value[t])})),e.escapeParameter=v,e.fallbackFormat=d,e.fallbackRoot=g,e.fallbackWarn=p,e.missingWarn=f,e.warnHtmlMessage=h}(n)})),k}function injectGlobalFieldsForBridge(e,t,n){const r=t.watchLocale(n);return e.prototype.$t=function(...e){return Reflect.apply(n.t,n,[...e])},e.prototype.$d=function(...e){return Reflect.apply(n.d,n,[...e])},e.prototype.$n=function(...e){return Reflect.apply(n.n,n,[...e])},r}registerMessageCompiler(compileToFunction),registerMessageResolver(resolveValue),registerLocaleFallbacker(fallbackWithLocaleChain);export{DatetimeFormat,I18nD,I18nInjectionKey,I18nN,I18nT,NumberFormat,Translation,VERSION,castToVueI18n,createI18n,useI18n}; |
/*! | ||
* vue-i18n-bridge v9.3.0-beta.15 | ||
* vue-i18n-bridge v9.3.0-beta.16 | ||
* (c) 2023 kazuya kawaguchi | ||
* Released under the MIT License. | ||
*/ | ||
var VueI18nBridge=function(e,t){"use strict";const n="undefined"!=typeof window,r=(e,t=!1)=>t?Symbol.for(e):Symbol(e),a=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),o=e=>"number"==typeof e&&isFinite(e),l=e=>"[object RegExp]"===h(e),s=e=>k(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,d=e=>"function"==typeof e,g=e=>"string"==typeof e,_=e=>"boolean"==typeof e,v=e=>null!==e&&"object"==typeof e,b=Object.prototype.toString,h=e=>b.call(e),k=e=>"[object Object]"===h(e),y=15;function L(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),O=String.fromCharCode(8233);function F(e){const t=e;let n=0,r=1,a=1,o=0;const l=e=>"\r"===t[e]&&t[e+1]===N,s=e=>t[e]===O,c=e=>t[e]===I,i=e=>l(e)||(e=>t[e]===N)(e)||s(e)||c(e),u=e=>l(e)||s(e)||c(e)?N:t[e];function f(){return o=0,i(n)&&(r++,a=0),l(n)&&n++,n++,a++,t[n]}return{index:()=>n,line:()=>r,column:()=>a,peekOffset:()=>o,charAt:u,currentChar:()=>u(n),currentPeek:()=>u(n+o),next:f,peek:function(){return l(n+o)&&o++,o++,t[n+o]},reset:function(){n=0,r=1,a=1,o=0},resetPeek:function(e=0){o=e},skipToPeek:function(){const e=n+o;for(;e!==n;)f();o=0}}}const C=void 0;function P(e,t={}){const n=!1!==t.location,r=F(e),a=()=>r.index(),o=()=>{return e=r.line(),t=r.column(),n=r.index(),{line:e,column:t,offset:n};var e,t,n},l=o(),s=a(),c={currentType:14,offset:s,startLoc:l,endLoc:l,lastType:14,lastOffset:s,lastStartLoc:l,lastEndLoc:l,braceNest:0,inLinked:!1,text:""},i=()=>c,{onError:u}=t;function f(e,t,r){e.endLoc=o(),e.currentType=t;const a={type:t};return n&&(a.loc=T(e.startLoc,e.endLoc)),null!=r&&(a.value=r),a}const m=e=>f(e,14);function p(e,t){return e.currentChar()===t?(e.next(),t):(o(),"")}function d(e){let t="";for(;e.currentPeek()===E||e.currentPeek()===N;)t+=e.currentPeek(),e.peek();return t}function g(e){const t=d(e);return e.skipToPeek(),t}function _(e){if(e===C)return!1;const t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||95===t}function v(e,t){const{currentType:n}=t;if(2!==n)return!1;d(e);const r=function(e){if(e===C)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){d(e);const t="|"===e.currentPeek();return e.resetPeek(),t}function h(e,t=!0){const n=(t=!1,r="",a=!1)=>{const o=e.currentPeek();return"{"===o?"%"!==r&&t:"@"!==o&&o?"%"===o?(e.peek(),n(t,"%",!0)):"|"===o?!("%"!==r&&!a)||!(r===E||r===N):o===E?(e.peek(),n(!0,E,a)):o!==N||(e.peek(),n(!0,N,a)):"%"===r||t},r=n();return t&&e.resetPeek(),r}function k(e,t){const n=e.currentChar();return n===C?C:t(n)?(e.next(),n):null}function y(e){return k(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 L(e){return k(e,(e=>{const t=e.charCodeAt(0);return t>=48&&t<=57}))}function I(e){return k(e,(e=>{const t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}))}function O(e){let t="",n="";for(;t=L(e);)n+=t;return n}function P(e){let t="";for(;;){const n=e.currentChar();if("{"===n||"}"===n||"@"===n||"|"===n||!n)break;if("%"===n){if(!h(e))break;t+=n,e.next()}else if(n===E||n===N)if(h(e))t+=n,e.next();else{if(b(e))break;t+=n,e.next()}else t+=n,e.next()}return t}function R(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 o(),""}}function w(e,t,n){p(e,t);let r="";for(let t=0;t<n;t++){const t=I(e);if(!t){o(),e.currentChar();break}r+=t}return`\\${t}${r}`}function W(e){g(e);const t=p(e,"|");return g(e),t}function M(e,t){let n=null;switch(e.currentChar()){case"{":return t.braceNest>=1&&o(),e.next(),n=f(t,2,"{"),g(e),t.braceNest++,n;case"}":return t.braceNest>0&&2===t.currentType&&o(),e.next(),n=f(t,3,"}"),t.braceNest--,t.braceNest>0&&g(e),t.inLinked&&0===t.braceNest&&(t.inLinked=!1),n;case"@":return t.braceNest>0&&o(),n=S(e,t)||m(t),t.braceNest=0,n;default:let r=!0,a=!0,l=!0;if(b(e))return t.braceNest>0&&o(),n=f(t,1,W(e)),t.braceNest=0,t.inLinked=!1,n;if(t.braceNest>0&&(5===t.currentType||6===t.currentType||7===t.currentType))return o(),t.braceNest=0,x(e,t);if(r=function(e,t){const{currentType:n}=t;if(2!==n)return!1;d(e);const r=_(e.currentPeek());return e.resetPeek(),r}(e,t))return n=f(t,5,function(e){g(e);let t="",n="";for(;t=y(e);)n+=t;return e.currentChar()===C&&o(),n}(e)),g(e),n;if(a=v(e,t))return n=f(t,6,function(e){g(e);let t="";return"-"===e.currentChar()?(e.next(),t+=`-${O(e)}`):t+=O(e),e.currentChar()===C&&o(),t}(e)),g(e),n;if(l=function(e,t){const{currentType:n}=t;if(2!==n)return!1;d(e);const r="'"===e.currentPeek();return e.resetPeek(),r}(e,t))return n=f(t,7,function(e){g(e),p(e,"'");let t="",n="";const r=e=>"'"!==e&&e!==N;for(;t=k(e,r);)n+="\\"===t?R(e):t;const a=e.currentChar();return a===N||a===C?(o(),a===N&&(e.next(),p(e,"'")),n):(p(e,"'"),n)}(e)),g(e),n;if(!r&&!a&&!l)return n=f(t,13,function(e){g(e);let t="",n="";const r=e=>"{"!==e&&"}"!==e&&e!==E&&e!==N;for(;t=k(e,r);)n+=t;return n}(e)),o(),n.value,g(e),n}return n}function S(e,t){const{currentType:n}=t;let r=null;const a=e.currentChar();switch(8!==n&&9!==n&&12!==n&&10!==n||a!==N&&a!==E||o(),a){case"@":return e.next(),r=f(t,8,"@"),t.inLinked=!0,r;case".":return g(e),e.next(),f(t,9,".");case":":return g(e),e.next(),f(t,10,":");default:return b(e)?(r=f(t,1,W(e)),t.braceNest=0,t.inLinked=!1,r):function(e,t){const{currentType:n}=t;if(8!==n)return!1;d(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;d(e);const r=":"===e.currentPeek();return e.resetPeek(),r}(e,t)?(g(e),S(e,t)):function(e,t){const{currentType:n}=t;if(9!==n)return!1;d(e);const r=_(e.currentPeek());return e.resetPeek(),r}(e,t)?(g(e),f(t,12,function(e){let t="",n="";for(;t=y(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?_(e.peek()):!("@"===t||"%"===t||"|"===t||":"===t||"."===t||t===E||!t)&&(t===N?(e.peek(),r()):_(t))},a=r();return e.resetPeek(),a}(e,t)?(g(e),"{"===a?M(e,t)||r:f(t,11,function(e){const t=(n=!1,r)=>{const a=e.currentChar();return"{"!==a&&"%"!==a&&"@"!==a&&"|"!==a&&a?a===E?r:a===N?(r+=a,e.next(),t(n,r)):(r+=a,e.next(),t(!0,r)):r};return t(!1,"")}(e))):(8===n&&o(),t.braceNest=0,t.inLinked=!1,x(e,t))}}function x(e,t){let n={type:14};if(t.braceNest>0)return M(e,t)||m(t);if(t.inLinked)return S(e,t)||m(t);switch(e.currentChar()){case"{":return M(e,t)||m(t);case"}":return o(),e.next(),f(t,3,"}");case"@":return S(e,t)||m(t);default:if(b(e))return n=f(t,1,W(e)),t.braceNest=0,t.inLinked=!1,n;const{isModulo:r,hasSpace:a}=function(e){const t=d(e),n="%"===e.currentPeek()&&"{"===e.peek();return e.resetPeek(),{isModulo:n,hasSpace:t.length>0}}(e);if(r)return a?f(t,0,P(e)):f(t,4,function(e){g(e);return"%"!==e.currentChar()&&o(),e.next(),"%"}(e));if(h(e))return f(t,0,P(e))}return n}return{nextToken:function(){const{currentType:e,offset:t,startLoc:n,endLoc:l}=c;return c.lastType=e,c.lastOffset=t,c.lastStartLoc=n,c.lastEndLoc=l,c.offset=a(),c.startLoc=o(),r.currentChar()===C?f(c,14):x(r,c)},currentOffset:a,currentPosition:o,context:i}}const R=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function w(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 W(e={}){const t=!1!==e.location,{onError:n}=e;function r(e,n,r){const a={type:e,start:n,end:n};return t&&(a.loc={start:r,end:r}),a}function a(e,n,r,a){e.end=n,a&&(e.type=a),t&&e.loc&&(e.loc.end=r)}function o(e,t){const n=e.context(),o=r(3,n.offset,n.startLoc);return o.value=t,a(o,e.currentOffset(),e.currentPosition()),o}function l(e,t){const n=e.context(),{lastOffset:o,lastStartLoc:l}=n,s=r(5,o,l);return s.index=parseInt(t,10),e.nextToken(),a(s,e.currentOffset(),e.currentPosition()),s}function s(e,t){const n=e.context(),{lastOffset:o,lastStartLoc:l}=n,s=r(4,o,l);return s.key=t,e.nextToken(),a(s,e.currentOffset(),e.currentPosition()),s}function c(e,t){const n=e.context(),{lastOffset:o,lastStartLoc:l}=n,s=r(9,o,l);return s.value=t.replace(R,w),e.nextToken(),a(s,e.currentOffset(),e.currentPosition()),s}function u(e){const t=e.context(),n=r(6,t.offset,t.startLoc);let o=e.nextToken();if(9===o.type){const t=function(e){const t=e.nextToken(),n=e.context(),{lastOffset:o,lastStartLoc:l}=n,s=r(8,o,l);return 12!==t.type?(n.lastStartLoc,s.value="",a(s,o,l),{nextConsumeToken:t,node:s}):(null==t.value&&(n.lastStartLoc,M(t)),s.value=t.value||"",a(s,e.currentOffset(),e.currentPosition()),{node:s})}(e);n.modifier=t.node,o=t.nextConsumeToken||e.nextToken()}switch(10!==o.type&&(t.lastStartLoc,M(o)),o=e.nextToken(),2===o.type&&(o=e.nextToken()),o.type){case 11:null==o.value&&(t.lastStartLoc,M(o)),n.key=function(e,t){const n=e.context(),o=r(7,n.offset,n.startLoc);return o.value=t,a(o,e.currentOffset(),e.currentPosition()),o}(e,o.value||"");break;case 5:null==o.value&&(t.lastStartLoc,M(o)),n.key=s(e,o.value||"");break;case 6:null==o.value&&(t.lastStartLoc,M(o)),n.key=l(e,o.value||"");break;case 7:null==o.value&&(t.lastStartLoc,M(o)),n.key=c(e,o.value||"");break;default:t.lastStartLoc;const i=e.context(),u=r(7,i.offset,i.startLoc);return u.value="",a(u,i.offset,i.startLoc),n.key=u,a(n,i.offset,i.startLoc),{nextConsumeToken:o,node:n}}return a(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 r=i||e.nextToken();switch(i=null,r.type){case 0:null==r.value&&(t.lastStartLoc,M(r)),n.items.push(o(e,r.value||""));break;case 6:null==r.value&&(t.lastStartLoc,M(r)),n.items.push(l(e,r.value||""));break;case 5:null==r.value&&(t.lastStartLoc,M(r)),n.items.push(s(e,r.value||""));break;case 7:null==r.value&&(t.lastStartLoc,M(r)),n.items.push(c(e,r.value||""));break;case 8:const a=u(e);n.items.push(a.node),i=a.nextConsumeToken||null}}while(14!==t.currentType&&1!==t.currentType);return a(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:o}=t,l=f(e);return 14===t.currentType?l:function(e,t,n,o){const l=e.context();let s=0===o.items.length;const c=r(1,t,n);c.cases=[],c.cases.push(o);do{const t=f(e);s||(s=0===t.items.length),c.cases.push(t)}while(14!==l.currentType);return a(c,e.currentOffset(),e.currentPosition()),c}(e,n,o,l)}return{parse:function(n){const o=P(n,i({},e)),l=o.context(),s=r(0,l.offset,l.startLoc);return t&&s.loc&&(s.loc.source=n),s.body=m(o),14!==l.currentType&&(l.lastStartLoc,n[l.offset]),a(s,o.currentOffset(),o.currentPosition()),s}}}function M(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 S(e,t){for(let n=0;n<e.length;n++)x(e[n],t)}function x(e,t){switch(e.type){case 1:S(e.cases,t),t.helper("plural");break;case 2:S(e.items,t);break;case 6:x(e.key,t),t.helper("linked"),t.helper("type");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&&x(e.body,n);const r=n.context();e.helpers=Array.from(r.helpers)}function A(e,t){const{helper:n}=e;switch(t.type){case 0:!function(e,t){t.body?A(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 a=t.cases.length;for(let n=0;n<a&&(A(e,t.cases[n]),n!==a-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 a=t.items.length;for(let n=0;n<a&&(A(e,t.items[n]),n!==a-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")}(`),A(e,t.key),t.modifier?(e.push(", "),A(e,t.modifier),e.push(", _type")):e.push(", undefined, _type"),e.push(")")}(e,t);break;case 8:case 7:case 9:case 3: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)}}function $(e,t={}){const n=i({},t),r=W(n).parse(e);return D(r,n),((e,t={})=>{const n=g(t.mode)?t.mode:"normal",r=g(t.filename)?t.filename:"message.intl",a=!!t.sourceMap,o=null!=t.breakLineCode?t.breakLineCode:"arrow"===n?";":"\n",l=t.needIndent?t.needIndent:"arrow"!==n,s=e.helpers||[],c=function(e,t){const{sourceMap:n,filename:r,breakLineCode:a,needIndent:o}=t,l={source:e.loc.source,filename:r,code:"",column:1,line:1,offset:0,map:void 0,breakLineCode:a,needIndent:o,indentLevel:0};function s(e,t){l.code+=e}function c(e,t=!0){const n=t?a:"";s(o?n+" ".repeat(e):n)}return{context:()=>l,push:s,indent:function(e=!0){const t=++l.indentLevel;e&&c(t)},deindent:function(e=!0){const t=--l.indentLevel;e&&c(t)},newline:function(){c(l.indentLevel)},helper:e=>`_${e}`,needIndent:()=>l.needIndent}}(e,{mode:n,filename:r,sourceMap:a,breakLineCode:o,needIndent:l});c.push("normal"===n?"function __msg__ (ctx) {":"(ctx) => {"),c.indent(l),s.length>0&&(c.push(`const { ${s.map((e=>`${e}: _${e}`)).join(", ")} } = ctx`),c.newline()),c.push("return "),A(c,e),c.deindent(l),c.push("}");const{code:i,map:u}=c.context();return{ast:e,code:i,map:u?u.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 j=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function V(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 H(e){const t=e.trim();return("0"!==e.charAt(0)||!isNaN(parseInt(e)))&&(n=t,j.test(n)?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);var n}const G=new Map;function B(e,t){return v(e)?e[t]:null}const J=e=>e,Y=e=>"",z=e=>0===e.length?"":e.join(""),X=e=>null==e?"":p(e)||k(e)&&e.toString===b?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 K(e={}){const t=e.locale,n=function(e){const t=o(e.pluralIndex)?e.pluralIndex:-1;return e.named&&(o(e.named.count)||o(e.named.n))?o(e.named.count)?e.named.count:o(e.named.n)?e.named.n:t:t}(e),r=v(e.pluralRules)&&g(t)&&d(e.pluralRules[t])?e.pluralRules[t]:q,a=v(e.pluralRules)&&g(t)&&d(e.pluralRules[t])?q:void 0,l=e.list||[],s=e.named||{};o(e.pluralIndex)&&function(e,t){t.count||(t.count=e),t.n||(t.n=e)}(n,s);function c(t){const n=d(e.messages)?e.messages(t):!!v(e.messages)&&e.messages[t];return n||(e.parent?e.parent.message(t):Y)}const i=k(e.processor)&&d(e.processor.normalize)?e.processor.normalize:z,u=k(e.processor)&&d(e.processor.interpolate)?e.processor.interpolate:X,f={list:e=>l[e],named:e=>s[e],plural:e=>e[r(n,e.length,a)],linked:(t,...n)=>{const[r,a]=n;let o="text",l="";1===n.length?v(r)?(l=r.modifier||l,o=r.type||o):g(r)&&(l=r||l):2===n.length&&(g(r)&&(l=r||l),g(a)&&(o=a||o));let s=c(t)(f);return"vnode"===o&&p(s)&&l&&(s=s[0]),l?(i=l,e.modifiers?e.modifiers[i]:J)(s,o):s;var i},message:c,type:k(e.processor)&&g(e.processor.type)?e.processor.type:"text",interpolate:u,normalize:i};return f}function Z(e,t,n){return[...new Set([n,...p(t)?t:v(t)?Object.keys(t):g(t)?[t]:[n]])]}function Q(e,t,n){const r=g(n)?n:re,a=e;a.__localeChainCache||(a.__localeChainCache=new Map);let o=a.__localeChainCache.get(r);if(!o){o=[];let e=[n];for(;p(e);)e=ee(o,e,t);const l=p(t)||!k(t)?t:t.default?t.default:null;e=g(l)?[l]:l,p(e)&&ee(o,e,!1),a.__localeChainCache.set(r,o)}return o}function ee(e,t,n){let r=!0;for(let a=0;a<t.length&&_(r);a++){const o=t[a];g(o)&&(r=te(e,t[a],n))}return r}function te(e,t,n){let r;const a=t.split("-");do{r=ne(e,a.join("-"),n),a.splice(-1,1)}while(a.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 a=t.replace(/!/g,"");e.push(a),(p(n)||k(n))&&n[a]&&(r=n[a])}return r}const re="en-US",ae=e=>`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;let oe,le,se;let ce=0;function ie(e={}){const t=g(e.version)?e.version:"9.3.0-beta.15",n=g(e.locale)?e.locale:re,r=p(e.fallbackLocale)||k(e.fallbackLocale)||g(e.fallbackLocale)||!1===e.fallbackLocale?e.fallbackLocale:n,a=k(e.messages)?e.messages:{[n]:{}},o=k(e.datetimeFormats)?e.datetimeFormats:{[n]:{}},s=k(e.numberFormats)?e.numberFormats:{[n]:{}},u=i({},e.modifiers||{},{upper:(e,t)=>"text"===t&&g(e)?e.toUpperCase():"vnode"===t&&v(e)&&"__v_isVNode"in e?e.children.toUpperCase():e,lower:(e,t)=>"text"===t&&g(e)?e.toLowerCase():"vnode"===t&&v(e)&&"__v_isVNode"in e?e.children.toLowerCase():e,capitalize:(e,t)=>"text"===t&&g(e)?ae(e):"vnode"===t&&v(e)&&"__v_isVNode"in e?ae(e.children):e}),f=e.pluralRules||{},m=d(e.missing)?e.missing:null,b=!_(e.missingWarn)&&!l(e.missingWarn)||e.missingWarn,h=!_(e.fallbackWarn)&&!l(e.fallbackWarn)||e.fallbackWarn,y=!!e.fallbackFormat,L=!!e.unresolving,T=d(e.postTranslation)?e.postTranslation:null,E=k(e.processor)?e.processor:null,N=!_(e.warnHtmlMessage)||e.warnHtmlMessage,I=!!e.escapeParameter,O=d(e.messageCompiler)?e.messageCompiler:oe,F=d(e.messageResolver)?e.messageResolver:le||B,C=d(e.localeFallbacker)?e.localeFallbacker:se||Z,P=v(e.fallbackContext)?e.fallbackContext:void 0,R=d(e.onWarn)?e.onWarn:c,w=e,W=v(w.__datetimeFormatters)?w.__datetimeFormatters:new Map,M=v(w.__numberFormatters)?w.__numberFormatters:new Map,S=v(w.__meta)?w.__meta:{};ce++;const x={version:t,cid:ce,locale:n,fallbackLocale:r,messages:a,modifiers:u,pluralRules:f,missing:m,missingWarn:b,fallbackWarn:h,fallbackFormat:y,unresolving:L,postTranslation:T,processor:E,warnHtmlMessage:N,escapeParameter:I,messageCompiler:O,messageResolver:F,localeFallbacker:C,fallbackContext:P,onWarn:R,__meta:S};return x.datetimeFormats=o,x.numberFormats=s,x.__datetimeFormatters=W,x.__numberFormatters=M,x}function ue(e,t,n,r,a){const{missing:o,onWarn:l}=e;if(null!==o){const r=o(e,n,t,a);return g(r)?r:t}return t}function fe(e,t,n){e.__localeChainCache=new Map,e.localeFallbacker(e,n,t)}const me=e=>e;let pe=Object.create(null);let de=y;const ge=()=>++de,_e={INVALID_ARGUMENT:de,INVALID_DATE_ARGUMENT:ge(),INVALID_ISO_DATE_ARGUMENT:ge(),__EXTEND_POINT__:ge()},ve=()=>"",be=e=>d(e);function he(e,...t){const{fallbackFormat:n,postTranslation:r,unresolving:a,messageCompiler:l,fallbackLocale:s,messages:c}=e,[i,f]=Le(...t),m=_(f.missingWarn)?f.missingWarn:e.missingWarn,d=_(f.fallbackWarn)?f.fallbackWarn:e.fallbackWarn,b=_(f.escapeParameter)?f.escapeParameter:e.escapeParameter,h=!!f.resolvedMessage,k=g(f.default)||_(f.default)?_(f.default)?l?i:()=>i:f.default:n?l?i:()=>i:"",y=n||""!==k,L=g(f.locale)?f.locale:e.locale;b&&function(e){p(e.list)?e.list=e.list.map((e=>g(e)?u(e):e)):v(e.named)&&Object.keys(e.named).forEach((t=>{g(e.named[t])&&(e.named[t]=u(e.named[t]))}))}(f);let[T,E,N]=h?[i,L,c[L]||{}]:ke(e,i,L,s,d,m),I=T,O=i;if(h||g(I)||be(I)||y&&(I=k,O=I),!(h||(g(I)||be(I))&&g(E)))return a?-1:i;let F=!1;const C=be(I)?I:ye(e,i,E,I,O,(()=>{F=!0}));if(F)return I;const P=function(e,t,n,r){const{modifiers:a,pluralRules:l,messageResolver:s,fallbackLocale:c,fallbackWarn:i,missingWarn:u,fallbackContext:f}=e,m=r=>{let a=s(n,r);if(null==a&&f){const[,,e]=ke(f,r,t,c,i,u);a=s(e,r)}if(g(a)){let n=!1;const o=ye(e,r,t,a,r,(()=>{n=!0}));return n?ve:o}return be(a)?a:ve},p={locale:t,modifiers:a,pluralRules:l,messages:m};e.processor&&(p.processor=e.processor);r.list&&(p.list=r.list);r.named&&(p.named=r.named);o(r.plural)&&(p.pluralIndex=r.plural);return p}(e,E,N,f),R=function(e,t,n){return t(n)}(0,C,K(P));return r?r(R,i):R}function ke(e,t,n,r,a,o){const{messages:l,onWarn:s,messageResolver:c,localeFallbacker:i}=e,u=i(e,r,n);let f,m={},p=null;for(let n=0;n<u.length&&(f=u[n],m=l[f]||{},null===(p=c(m,t))&&(p=m[t]),!g(p)&&!d(p));n++){const n=ue(e,t,f,0,"translate");n!==t&&(p=n)}return[p,f,m]}function ye(e,t,n,r,o,l){const{messageCompiler:s,warnHtmlMessage:c}=e;if(be(r)){const e=r;return e.locale=e.locale||n,e.key=e.key||t,e}if(null==s){const e=()=>r;return e.locale=n,e.key=t,e}const i=s(r,function(e,t,n,r,o,l){return{warnHtmlMessage:o,onError:e=>{throw l&&l(e),e},onCacheKey:e=>((e,t,n)=>a({l:e,k:t,s:n}))(t,n,e)}}(0,n,o,0,c,l));return i.locale=n,i.key=t,i.source=r,i}function Le(...e){const[t,n,r]=e,a={};if(!g(t)&&!o(t)&&!be(t))throw Error(_e.INVALID_ARGUMENT);const l=o(t)?String(t):(be(t),t);return o(n)?a.plural=n:g(n)?a.default=n:k(n)&&!s(n)?a.named=n:p(n)&&(a.list=n),o(r)?a.plural=r:g(r)?a.default=r:k(r)&&i(a,r),[l,a]}function Te(e,...t){const{datetimeFormats:n,unresolving:r,fallbackLocale:a,onWarn:o,localeFallbacker:l}=e,{__datetimeFormatters:c}=e,[u,f,m,p]=Ne(...t);_(m.missingWarn)?m.missingWarn:e.missingWarn;_(m.fallbackWarn)?m.fallbackWarn:e.fallbackWarn;const d=!!m.part,v=g(m.locale)?m.locale:e.locale,b=l(e,a,v);if(!g(u)||""===u)return new Intl.DateTimeFormat(v,p).format(f);let h,y={},L=null;for(let t=0;t<b.length&&(h=b[t],y=n[h]||{},L=y[u],!k(L));t++)ue(e,u,h,0,"datetime format");if(!k(L)||!g(h))return r?-1:u;let T=`${h}__${u}`;s(p)||(T=`${T}__${JSON.stringify(p)}`);let E=c.get(T);return E||(E=new Intl.DateTimeFormat(h,i({},L,p)),c.set(T,E)),d?E.formatToParts(f):E.format(f)}const Ee=["localeMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName","formatMatcher","hour12","timeZone","dateStyle","timeStyle","calendar","dayPeriod","numberingSystem","hourCycle","fractionalSecondDigits"];function Ne(...e){const[t,n,r,a]=e,l={};let s,c={};if(g(t)){const e=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!e)throw Error(_e.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(_e.INVALID_ISO_DATE_ARGUMENT)}}else if("[object Date]"===h(t)){if(isNaN(t.getTime()))throw Error(_e.INVALID_DATE_ARGUMENT);s=t}else{if(!o(t))throw Error(_e.INVALID_ARGUMENT);s=t}return g(n)?l.key=n:k(n)&&Object.keys(n).forEach((e=>{Ee.includes(e)?c[e]=n[e]:l[e]=n[e]})),g(r)?l.locale=r:k(r)&&(c=r),k(a)&&(c=a),[l.key||"",s,l,c]}function Ie(e,t,n){const r=e;for(const e in n){const n=`${t}__${e}`;r.__datetimeFormatters.has(n)&&r.__datetimeFormatters.delete(n)}}function Oe(e,...t){const{numberFormats:n,unresolving:r,fallbackLocale:a,onWarn:o,localeFallbacker:l}=e,{__numberFormatters:c}=e,[u,f,m,p]=Ce(...t);_(m.missingWarn)?m.missingWarn:e.missingWarn;_(m.fallbackWarn)?m.fallbackWarn:e.fallbackWarn;const d=!!m.part,v=g(m.locale)?m.locale:e.locale,b=l(e,a,v);if(!g(u)||""===u)return new Intl.NumberFormat(v,p).format(f);let h,y={},L=null;for(let t=0;t<b.length&&(h=b[t],y=n[h]||{},L=y[u],!k(L));t++)ue(e,u,h,0,"number format");if(!k(L)||!g(h))return r?-1:u;let T=`${h}__${u}`;s(p)||(T=`${T}__${JSON.stringify(p)}`);let E=c.get(T);return E||(E=new Intl.NumberFormat(h,i({},L,p)),c.set(T,E)),d?E.formatToParts(f):E.format(f)}const Fe=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function Ce(...e){const[t,n,r,a]=e,l={};let s={};if(!o(t))throw Error(_e.INVALID_ARGUMENT);const c=t;return g(n)?l.key=n:k(n)&&Object.keys(n).forEach((e=>{Fe.includes(e)?s[e]=n[e]:l[e]=n[e]})),g(r)?l.locale=r:k(r)&&(s=r),k(a)&&(s=a),[l.key||"",c,l,s]}function Pe(e,t,n){const r=e;for(const e in n){const n=`${t}__${e}`;r.__numberFormatters.has(n)&&r.__numberFormatters.delete(n)}}const Re="9.3.0-beta.15";let we=y;const We=()=>++we,Me={UNEXPECTED_RETURN_TYPE:we,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(),MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION:We(),NOT_AVAILABLE_COMPOSITION_IN_LEGACY:We(),__EXTEND_POINT__:We()},Se=r("__translateVNode"),xe=r("__datetimeParts"),De=r("__numberParts"),Ae=r("__setPluralRules"),$e=r("__legacyVueI18n"),Ue=r("__injectWithOption"),je="__VUE_I18N_BRIDGE__";function Ve(e){return null!=e&&null!=e.version&&(Number(e.version.split(".")[0])||-1)>=8}function He(e){if(!v(e))return e;for(const t in e)if(m(e,t))if(t.includes(".")){const n=t.split("."),r=n.length-1;let a=e;for(let e=0;e<r;e++)n[e]in a||(a[n[e]]={}),a=a[n[e]];a[n[r]]=e[t],delete e[t],v(a[n[r]])&&He(a[n[r]])}else v(e[t])&&He(e[t]);return e}function Ge(e,t){const{messages:n,__i18n:r,messageResolver:a,flatJson:o}=t,l=k(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?(l[t]=l[t]||{},Je(n,l[t])):Je(n,l)}else g(e)&&Je(JSON.parse(e),l)})),null==a&&o)for(const e in l)m(l,e)&&He(l[e]);return l}const Be=e=>!v(e)||p(e);function Je(e,t){if(Be(e)||Be(t))throw Error(Me.INVALID_VALUE);for(const n in e)m(e,n)&&(Be(e[n])||Be(t[n])?t[n]=e[n]:Je(e[n],t[n]))}function Ye(e){return function(e){const t=void 0;return{tag:void 0,data:void 0,children:void 0,text:e,elm:void 0,ns:void 0,context:void 0,fnContext:void 0,fnOptions:void 0,fnScopeId:void 0,key:void 0,componentOptions:void 0,componentInstance:t,parent:void 0,raw:!1,isStatic:!1,isRootInsert:!0,isComment:!1,isCloned:!1,isOnce:!1,asyncFactory:void 0,asyncMeta:void 0,isAsyncPlaceholder:!1,child:()=>t}}(e)}let ze=0;function Xe(e){return(n,r,a,o)=>e(r,a,t.getCurrentInstance()||void 0,o)}function qe(e={},r){const{__root:a}=e,s=void 0===a;let c=!_(e.inheritLocale)||e.inheritLocale;const u=t.ref(a&&c?a.locale.value:g(e.locale)?e.locale:re),f=t.ref(a&&c?a.fallbackLocale.value:g(e.fallbackLocale)||p(e.fallbackLocale)||k(e.fallbackLocale)||!1===e.fallbackLocale?e.fallbackLocale:u.value),m=t.ref(Ge(u.value,e)),b=t.ref(k(e.datetimeFormats)?e.datetimeFormats:{[u.value]:{}}),h=t.ref(k(e.numberFormats)?e.numberFormats:{[u.value]:{}});let y=a?a.missingWarn:!_(e.missingWarn)&&!l(e.missingWarn)||e.missingWarn,L=a?a.fallbackWarn:!_(e.fallbackWarn)&&!l(e.fallbackWarn)||e.fallbackWarn,T=a?a.fallbackRoot:!_(e.fallbackRoot)||e.fallbackRoot,E=!!e.fallbackFormat,N=d(e.missing)?e.missing:null,I=d(e.missing)?Xe(e.missing):null,O=d(e.postTranslation)?e.postTranslation:null,F=a?a.warnHtmlMessage:!_(e.warnHtmlMessage)||e.warnHtmlMessage,C=!!e.escapeParameter;const P=a?a.modifiers:k(e.modifiers)?e.modifiers:{};let R,w,W=e.pluralRules||a&&a.pluralRules;{Ve(r);const e={locale:u.value,fallbackLocale:f.value,messages:m.value,dateTimeFormats:b.value,numberFormats:h.value,modifiers:P,missing:N,fallbackRoot:T,postTranslation:O,pluralizationRules:W,escapeParameterHtml:C,sync:c,silentFallbackWarn:_(L)?!L:L,silentTranslationWarn:_(y)?!y:y,formatFallbackMessages:_(E)?!E:E,warnHtmlInMessage:_(F)&&F?"warn":"off",__VUE_I18N_BRIDGE__:je};R=new r(e)}w=(()=>{const t={version:Re,locale:u.value,fallbackLocale:f.value,messages:m.value,modifiers:P,pluralRules:W,missing:null===I?void 0:I,missingWarn:y,fallbackWarn:L,fallbackFormat:E,unresolving:!0,postTranslation:null===O?void 0:O,warnHtmlMessage:F,escapeParameter:C,messageResolver:e.messageResolver,__meta:{framework:"vue"}};t.datetimeFormats=b.value,t.numberFormats=h.value,t.__datetimeFormatters=k(w)?w.__datetimeFormatters:void 0,t.__numberFormatters=k(w)?w.__numberFormatters:void 0;return ie(t)})(),fe(w,u.value,f.value);const M=t.computed({get:()=>u.value,set:e=>{u.value=e,R&&!s&&(R.locale=e),w.locale=u.value}}),S=t.computed({get:()=>f.value,set:e=>{f.value=e,R&&!s&&(R.fallbackLocale=e),w.fallbackLocale=f.value,fe(w,u.value,e)}}),x=t.computed((()=>m.value)),D=t.computed((()=>b.value)),A=t.computed((()=>h.value));const $=(e,t,n,r,l,s)=>{let c;if(u.value,f.value,m.value,b.value,h.value,c=e(w),o(c)&&-1===c){const[e,n]=t();return a&&T?r(a):l(e)}if(s(c))return c;throw Error(Me.UNEXPECTED_RETURN_TYPE)};function U(...e){return $((t=>Reflect.apply(he,null,[t,...e])),(()=>Le(...e)),0,(t=>Reflect.apply(t.t,t,[...e])),(e=>e),(e=>g(e)))}const j={normalize:function(e){return e.map((e=>g(e)||o(e)||_(e)?Ye(String(e)):e))},interpolate:e=>e,type:"vnode"};function V(e){return m.value[e]||{}}ze++,a&&n&&(t.watch(a.locale,(e=>{c&&(u.value=e,R&&!s&&(R.locale=e),w.locale=e,fe(w,u.value,f.value))})),t.watch(a.fallbackLocale,(e=>{c&&(f.value=e,R&&!s&&(R.fallbackLocale=e),w.fallbackLocale=e,fe(w,u.value,f.value))})));const H={id:ze,locale:M,fallbackLocale:S,get inheritLocale(){return c},set inheritLocale(e){c=e,R&&(R._sync=e),e&&a&&(u.value=a.locale.value,f.value=a.fallbackLocale.value,R&&(R.locale=a.locale.value,R.fallbackLocale=a.fallbackLocale.value),fe(w,u.value,f.value))},get availableLocales(){return Object.keys(m.value).sort()},messages:x,get modifiers(){return P},get pluralRules(){return W||{}},get isGlobal(){return s},get missingWarn(){return y},set missingWarn(e){y=e,w.missingWarn=y},get fallbackWarn(){return L},set fallbackWarn(e){L=e,w.fallbackWarn=L},get fallbackRoot(){return T},set fallbackRoot(e){T=e},get fallbackFormat(){return E},set fallbackFormat(e){E=e,w.fallbackFormat=E},get warnHtmlMessage(){return F},set warnHtmlMessage(e){F=e,w.warnHtmlMessage=e},get escapeParameter(){return C},set escapeParameter(e){C=e,w.escapeParameter=e},t:U,getLocaleMessage:V,setLocaleMessage:function(e,t){m.value[e]=t,R&&R.setLocaleMessage(e,t),w.messages=m.value},mergeLocaleMessage:function(e,t){m.value[e]=m.value[e]||{},R&&R.mergeLocaleMessage(e,t),Je(t,m.value[e]),w.messages=m.value},getPostTranslationHandler:function(){return d(O)?O:null},setPostTranslationHandler:function(e){O=e,w.postTranslation=e},getMissingHandler:function(){return N},setMissingHandler:function(e){null!==e&&(I=Xe(e)),N=e,w.missing=I},[Ae]:function(e){W=e,w.pluralRules=W}};return H.datetimeFormats=D,H.numberFormats=A,H.rt=function(...e){const[t,n,r]=e;if(r&&!v(r))throw Error(Me.INVALID_ARGUMENT);return U(t,n,i({resolvedMessage:!0},r||{}))},H.te=function(e,t){const n=V(g(t)?t:u.value);return null!==w.messageResolver(n,e)},H.tm=function(e){const t=function(e){let t=null;const n=Q(w,f.value,u.value);for(let r=0;r<n.length;r++){const a=m.value[n[r]]||{},o=w.messageResolver(a,e);if(null!=o){t=o;break}}return t}(e);return null!=t?t:a&&a.tm(e)||{}},H.d=function(...e){return $((t=>Reflect.apply(Te,null,[t,...e])),(()=>Ne(...e)),0,(t=>Reflect.apply(t.d,t,[...e])),(()=>""),(e=>g(e)))},H.n=function(...e){return $((t=>Reflect.apply(Oe,null,[t,...e])),(()=>Ce(...e)),0,(t=>Reflect.apply(t.n,t,[...e])),(()=>""),(e=>g(e)))},H.getDateTimeFormat=function(e){return b.value[e]||{}},H.setDateTimeFormat=function(e,t){b.value[e]=t,R&&R.setDateTimeFormat(e,t),w.datetimeFormats=b.value,Ie(w,e,t)},H.mergeDateTimeFormat=function(e,t){b.value[e]=i(b.value[e]||{},t),R&&R.mergeDateTimeFormat(e,t),w.datetimeFormats=b.value,Ie(w,e,t)},H.getNumberFormat=function(e){return h.value[e]||{}},H.setNumberFormat=function(e,t){h.value[e]=t,R&&R.setNumberFormat(e,t),w.numberFormats=h.value,Pe(w,e,t)},H.mergeNumberFormat=function(e,t){h.value[e]=i(h.value[e]||{},t),R&&R.mergeNumberFormat(e,t),w.numberFormats=h.value,Pe(w,e,t)},H[Ue]=e.__injectWithOption,H[Se]=function(...e){return $((t=>{let n;const r=t;try{r.processor=j,n=Reflect.apply(he,null,[r,...e])}finally{r.processor=null}return n}),(()=>Le(...e)),0,(t=>t[Se](...e)),(e=>[Ye(e)]),(e=>p(e)))},H[xe]=function(...e){return $((t=>Reflect.apply(Te,null,[t,...e])),(()=>Ne(...e)),0,(t=>t[xe](...e)),(()=>[]),(e=>g(e)||p(e)))},H[De]=function(...e){return $((t=>Reflect.apply(Oe,null,[t,...e])),(()=>Ce(...e)),0,(t=>t[De](...e)),(()=>[]),(e=>g(e)||p(e)))},H[$e]=R,H}const Ke={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>"parent"===e||"global"===e,default:"parent"},i18n:{type:Object}};const Ze=t.defineComponent({name:"i18n-t",props:i({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>o(e)||!isNaN(e)}},Ke),setup(e,n){const{slots:r,attrs:a}=n,o=e.i18n||st({useScope:e.scope,__useComponent:!0});return()=>{const l=Object.keys(r).filter((e=>"_"!==e)),s={};e.locale&&(s.locale=e.locale),void 0!==e.plural&&(s.plural=g(e.plural)?+e.plural:e.plural);const c=function({slots:e},t){if(1===t.length&&"default"===t[0])return(e.default?e.default():[]).reduce(((e,t)=>[...e,...t.children?t.children:[t]]),[]);return t.reduce(((t,n)=>{const r=e[n];return r&&(t[n]=r()),t}),{})}(n,l),u=o[Se](e.keypath,c,s),f=i({},a),m=g(e.tag)||v(e.tag)?e.tag:"span";return t.h(m,f,u)}}}),Qe=Ze;function et(e,n,r,a){const{slots:o,attrs:l}=n;return()=>{const n={part:!0};let s={};e.locale&&(n.locale=e.locale),g(e.format)?n.key=e.format:v(e.format)&&(g(e.format.key)&&(n.key=e.format.key),s=Object.keys(e.format).reduce(((t,n)=>r.includes(n)?i({},t,{[n]:e.format[n]}):t),{}));const c=a(e.value,n,s);let u=[n.key];p(c)?u=c.map(((e,t)=>{const n=o[e.type],r=n?n({[e.type]:e.value,index:t,parts:c}):[e.value];var a;return p(a=r)&&!g(a[0])&&(r[0].key=`${e.type}-${t}`),r})):g(c)&&(u=[c]);const f=i({},l),m=g(e.tag)||v(e.tag)?e.tag:"span";return t.h(m,f,u)}}const tt=t.defineComponent({name:"i18n-n",props:i({value:{type:Number,required:!0},format:{type:[String,Object]}},Ke),setup(e,t){const n=e.i18n||st({useScope:"parent",__useComponent:!0});return et(e,t,Fe,((...e)=>n[De](...e)))}}),nt=tt,rt=t.defineComponent({name:"i18n-d",props:i({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},Ke),setup(e,t){const n=e.i18n||st({useScope:"parent",__useComponent:!0});return et(e,t,Ee,((...e)=>n[xe](...e)))}}),at=rt;let ot=null;const lt=r("global-vue-i18n");function st(e={}){const r=t.getCurrentInstance();if(null==r)throw Error(Me.MUST_BE_CALL_SETUP_TOP);if(null==ot)throw Error(Me.NOT_INSLALLED);const a=function(e){{const t=e.proxy;if(null==t)throw Error(Me.UNEXPECTED_ERROR);const n=t._i18nBridgeRoot;if(!n)throw Error(Me.NOT_INSLALLED);return n}}(r),o=function(e){return e.global}(a),c=function(e){return e.proxy.$options}(r),u=function(e,t){return s(e)?"__i18n"in t?"local":"global":e.useScope?e.useScope:"local"}(e,c);if("legacy"===a.mode&&!e.__useComponent){if(!a.allowComposition)throw Error(Me.NOT_AVAILABLE_IN_LEGACY_MODE);return function(e,n,r,a={}){const o="local"===n,s=t.shallowRef(null);if(o&&e.proxy&&!e.proxy.$options.i18n&&!e.proxy.$options.__i18n)throw Error(Me.MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION);const c=!_(a.inheritLocale)||a.inheritLocale,i=t.ref(o&&c?r.locale.value:g(a.locale)?a.locale:re),u=t.ref(o&&c?r.fallbackLocale.value:g(a.fallbackLocale)||p(a.fallbackLocale)||k(a.fallbackLocale)||!1===a.fallbackLocale?a.fallbackLocale:i.value),f=t.ref(Ge(i.value,a)),m=t.ref(k(a.datetimeFormats)?a.datetimeFormats:{[i.value]:{}}),v=t.ref(k(a.numberFormats)?a.numberFormats:{[i.value]:{}}),b=o?r.missingWarn:!_(a.missingWarn)&&!l(a.missingWarn)||a.missingWarn,h=o?r.fallbackWarn:!_(a.fallbackWarn)&&!l(a.fallbackWarn)||a.fallbackWarn,y=o?r.fallbackRoot:!_(a.fallbackRoot)||a.fallbackRoot,L=!!a.fallbackFormat,T=d(a.missing)?a.missing:null,E=d(a.postTranslation)?a.postTranslation:null,N=o?r.warnHtmlMessage:!_(a.warnHtmlMessage)||a.warnHtmlMessage,I=!!a.escapeParameter,O=o?r.modifiers:k(a.modifiers)?a.modifiers:{},F=a.pluralRules||o&&r.pluralRules;function C(){return[i.value,u.value,f.value,m.value,v.value]}const P=t.computed({get:()=>s.value?s.value.locale.value:i.value,set:e=>{s.value&&(s.value.locale.value=e),i.value=e}}),R=t.computed({get:()=>s.value?s.value.fallbackLocale.value:u.value,set:e=>{s.value&&(s.value.fallbackLocale.value=e),u.value=e}}),w=t.computed((()=>s.value?s.value.messages.value:f.value)),W=t.computed((()=>m.value)),M=t.computed((()=>v.value));function S(){return s.value?s.value.getPostTranslationHandler():E}function x(e){s.value&&s.value.setPostTranslationHandler(e)}function D(){return s.value?s.value.getMissingHandler():T}function A(e){s.value&&s.value.setMissingHandler(e)}function $(e){return C(),e()}function U(...e){return s.value?$((()=>Reflect.apply(s.value.t,null,[...e]))):$((()=>""))}function j(...e){return s.value?Reflect.apply(s.value.rt,null,[...e]):""}function V(...e){return s.value?$((()=>Reflect.apply(s.value.d,null,[...e]))):$((()=>""))}function H(...e){return s.value?$((()=>Reflect.apply(s.value.n,null,[...e]))):$((()=>""))}function G(e){return s.value?s.value.tm(e):{}}function B(e,t){return!!s.value&&s.value.te(e,t)}function J(e){return s.value?s.value.getLocaleMessage(e):{}}function Y(e,t){s.value&&(s.value.setLocaleMessage(e,t),f.value[e]=t)}function z(e,t){s.value&&s.value.mergeLocaleMessage(e,t)}function X(e){return s.value?s.value.getDateTimeFormat(e):{}}function q(e,t){s.value&&(s.value.setDateTimeFormat(e,t),m.value[e]=t)}function K(e,t){s.value&&s.value.mergeDateTimeFormat(e,t)}function Z(e){return s.value?s.value.getNumberFormat(e):{}}function Q(e,t){s.value&&(s.value.setNumberFormat(e,t),v.value[e]=t)}function ee(e,t){s.value&&s.value.mergeNumberFormat(e,t)}const te={get id(){return s.value?s.value.id:-1},locale:P,fallbackLocale:R,messages:w,datetimeFormats:W,numberFormats:M,get inheritLocale(){return s.value?s.value.inheritLocale:c},set inheritLocale(e){s.value&&(s.value.inheritLocale=e)},get availableLocales(){return s.value?s.value.availableLocales:Object.keys(f.value)},get modifiers(){return s.value?s.value.modifiers:O},get pluralRules(){return s.value?s.value.pluralRules:F},get isGlobal(){return!!s.value&&s.value.isGlobal},get missingWarn(){return s.value?s.value.missingWarn:b},set missingWarn(e){s.value&&(s.value.missingWarn=e)},get fallbackWarn(){return s.value?s.value.fallbackWarn:h},set fallbackWarn(e){s.value&&(s.value.missingWarn=e)},get fallbackRoot(){return s.value?s.value.fallbackRoot:y},set fallbackRoot(e){s.value&&(s.value.fallbackRoot=e)},get fallbackFormat(){return s.value?s.value.fallbackFormat:L},set fallbackFormat(e){s.value&&(s.value.fallbackFormat=e)},get warnHtmlMessage(){return s.value?s.value.warnHtmlMessage:N},set warnHtmlMessage(e){s.value&&(s.value.warnHtmlMessage=e)},get escapeParameter(){return s.value?s.value.escapeParameter:I},set escapeParameter(e){s.value&&(s.value.escapeParameter=e)},t:U,getPostTranslationHandler:S,setPostTranslationHandler:x,getMissingHandler:D,setMissingHandler:A,rt:j,d:V,n:H,tm:G,te:B,getLocaleMessage:J,setLocaleMessage:Y,mergeLocaleMessage:z,getDateTimeFormat:X,setDateTimeFormat:q,mergeDateTimeFormat:K,getNumberFormat:Z,setNumberFormat:Q,mergeNumberFormat:ee};function ne(e){e.locale.value=i.value,e.fallbackLocale.value=u.value,Object.keys(f.value).forEach((t=>{e.mergeLocaleMessage(t,f.value[t])})),Object.keys(m.value).forEach((t=>{e.mergeDateTimeFormat(t,m.value[t])})),Object.keys(v.value).forEach((t=>{e.mergeNumberFormat(t,v.value[t])})),e.escapeParameter=I,e.fallbackFormat=L,e.fallbackRoot=y,e.fallbackWarn=h,e.missingWarn=b,e.warnHtmlMessage=N}return t.onBeforeMount((()=>{if(null==e.proxy||null==e.proxy.$i18n)throw Error(Me.NOT_AVAILABLE_COMPOSITION_IN_LEGACY);const t=s.value=e.proxy.$i18n.__composer;"global"===n?(i.value=t.locale.value,u.value=t.fallbackLocale.value,f.value=t.messages.value,m.value=t.datetimeFormats.value,v.value=t.numberFormats.value):o&&ne(t)})),te}(r,u,o,e)}if("global"===u)return function(e,t,n){let r=v(t.messages)?t.messages:{};"__i18nGlobal"in n&&(r=Ge(e.locale.value,{messages:r,__i18n:n.__i18nGlobal}));const a=Object.keys(r);if(a.length&&a.forEach((t=>{e.mergeLocaleMessage(t,r[t])})),v(t.datetimeFormats)){const n=Object.keys(t.datetimeFormats);n.length&&n.forEach((n=>{e.mergeDateTimeFormat(n,t.datetimeFormats[n])}))}if(v(t.numberFormats)){const n=Object.keys(t.numberFormats);n.length&&n.forEach((n=>{e.mergeNumberFormat(n,t.numberFormats[n])}))}}(o,e,c),o;if("parent"===u){let t=function(e,t,n=!1){let r=null;const a=t.root;let o=t.parent;for(;null!=o;){const t=e;if("composition"===e.mode)r=t.__getInstance(o);else{const e=t.__getInstance(o);null!=e&&(r=e.__composer,n&&r&&!r[Ue]&&(r=null))}if(null!=r)break;if(a===o)break;o=o.parent}return r}(a,r,e.__useComponent);return null==t&&(t=o),t}const f=a;let m=f.__getInstance(r);if(null==m){const a=i({},e);"__i18n"in c&&(a.__i18n=c.__i18n),o&&(a.__root=o),m=qe(a,ot),f.__composerExtend&&f.__composerExtend(m),function(e,r,a){{const o=r.proxy;if(null==o)throw Error(Me.UNEXPECTED_ERROR);const l=a[$e];if(l===e)throw Error(Me.UNEXPECTED_ERROR);o._i18n=l,o._i18n_bridge=!0,n&&(o._i18nWatcher=o._i18n.watchI18nData(),o._i18n._sync&&(o._localeWatcher=o._i18n.watchLocale()));let s=!1;t.onBeforeMount((()=>{o._i18n.subscribeDataChanging(o),s=!0})),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}))}}(f,r,m),f.__setInstance(r,m)}return m}var ct;return ct=function(e,t={}){{const n=(t.onCacheKey||me)(e),r=pe[n];if(r)return r;let a=!1;const o=t.onError||L;t.onError=e=>{a=!0,o(e)};const{code:l}=$(e,t),s=new Function(`return ${l}`)();return a?s:pe[n]=s}},oe=ct,le=function(e,t){if(!v(e))return null;let n=G.get(t);if(n||(n=function(e){const t=[];let n,r,a,o,l,s,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++,a="\\"+t,m[0](),!0}for(m[0]=()=>{void 0===r?r=a:r+=a},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=H(r),!1===r)return!1;m[1]()}};null!==u;)if(i++,n=e[i],"\\"!==n||!p()){if(o=V(n),c=U[u],l=c[o]||c.l||8,8===l)return;if(u=l[0],void 0!==l[1]&&(s=m[l[1]],s&&(a=n,!1===s())))return;if(7===u)return t}}(t),n&&G.set(t,n)),!n)return null;const r=n.length;let a=e,o=0;for(;o<r;){const e=a[n[o]];if(void 0===e)return null;a=e,o++}return a},se=Q,e.DatetimeFormat=rt,e.I18nD=at,e.I18nInjectionKey=lt,e.I18nN=nt,e.I18nT=Qe,e.NumberFormat=tt,e.Translation=Ze,e.VERSION=Re,e.castToVueI18n=e=>{if(!(je in e))throw Error(Me.NOT_COMPATIBLE_LEGACY_VUE_I18N);return e},e.createI18n=function(e={},n){ot=n;const r=!_(e.legacy)||e.legacy,a=!_(e.globalInjection)||e.globalInjection,o=!r||!!e.allowComposition,l=new Map,[s,c]=function(e,n,r){const a=t.effectScope();{if(!Ve(r))throw Error(Me.NOT_COMPATIBLE_LEGACY_VUE_I18N);const t=a.run((()=>qe(e,r)));if(null==t)throw Error(Me.UNEXPECTED_ERROR);return[a,t]}}(e,0,n);{const e=c[$e];let t=null;Object.defineProperty(e,"global",{get:()=>c}),Object.defineProperty(e,"mode",{get:()=>r?"legacy":"composition"}),Object.defineProperty(e,"allowComposition",{get:()=>o}),Object.defineProperty(e,"__instances",{get:()=>l}),Object.defineProperty(e,"install",{writable:!0,value:(n,...o)=>{if(2!==(n&&n.version&&Number(n.version.split(".")[0])||-1))throw Error(Me.BRIDGE_SUPPORT_VUE_2_ONLY);!function(e,...t){const n=k(t[0])?t[0]:{};(!_(n.globalInstall)||n.globalInstall)&&(e.component(Ze.name,Ze),e.component(tt.name,tt),e.component(rt.name,rt))}(n,...o),!r&&a&&(t=function(e,t,n){const r=t.watchLocale(n);return e.prototype.$t=function(...e){return Reflect.apply(n.t,n,[...e])},e.prototype.$d=function(...e){return Reflect.apply(n.d,n,[...e])},e.prototype.$n=function(...e){return Reflect.apply(n.n,n,[...e])},r}(n,e,c)),n.mixin(function(e,t){return{beforeCreate(){const n=this.$options;if(!n.__VUE18N__INSTANCE__)if(n.i18n=n.i18n||(n.__i18nBridge?{}:null),this._i18nBridgeRoot=e,"composition"!==e.mode)if(n.i18n){if(n.i18n instanceof t){if(n.__i18nBridge)try{const e=n.i18n&&n.i18n.messages?n.i18n.messages:{};n.__i18nBridge.forEach((t=>Je(JSON.parse(t),e))),Object.keys(e).forEach((t=>{n.i18n.mergeLocaleMessage(t,e[t])}))}catch(e){}this._i18n=n.i18n,this._i18nWatcher=this._i18n.watchI18nData()}else if(k(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.__i18nBridge)try{const e=n.i18n&&n.i18n.messages?n.i18n.messages:{};n.__i18nBridge.forEach((t=>Je(JSON.parse(t),e))),n.i18n.messages=e}catch(e){}const{sharedMessages:r}=n.i18n;r&&k(r)&&Je(r,n.i18n.messages),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 n=this.$options;n.__VUE18N__INSTANCE__||"composition"!==e.mode&&(n.i18n=n.i18n||(n.__i18nBridge?{}:null),n.i18n?(n.i18n instanceof t||k(n.i18n))&&(this._i18n.subscribeDataChanging(this),this._subscribing=!0):(this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof t||n.parent&&n.parent.$i18n&&n.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,ot))}}),Object.defineProperty(e,"dispose",{value:()=>{t&&t(),s.stop()}});const n={__getInstance:function(e){return l.get(e)||null},__setInstance:function(e,t){l.set(e,t)},__deleteInstance:function(e){l.delete(e)}};return Object.keys(n).forEach((t=>Object.defineProperty(e,t,{value:n[t]}))),e}},e.useI18n=st,Object.defineProperty(e,"__esModule",{value:!0}),e}({},VueDemi); | ||
var VueI18nBridge=function(e,t){"use strict";const n="undefined"!=typeof window,r=(e,t=!1)=>t?Symbol.for(e):Symbol(e),a=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),o=e=>"number"==typeof e&&isFinite(e),l=e=>"[object RegExp]"===h(e),s=e=>k(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,d=e=>"function"==typeof e,g=e=>"string"==typeof e,_=e=>"boolean"==typeof e,v=e=>null!==e&&"object"==typeof e,b=Object.prototype.toString,h=e=>b.call(e),k=e=>"[object Object]"===h(e),y=15;function L(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),O=String.fromCharCode(8233);function F(e){const t=e;let n=0,r=1,a=1,o=0;const l=e=>"\r"===t[e]&&t[e+1]===N,s=e=>t[e]===O,c=e=>t[e]===I,i=e=>l(e)||(e=>t[e]===N)(e)||s(e)||c(e),u=e=>l(e)||s(e)||c(e)?N:t[e];function f(){return o=0,i(n)&&(r++,a=0),l(n)&&n++,n++,a++,t[n]}return{index:()=>n,line:()=>r,column:()=>a,peekOffset:()=>o,charAt:u,currentChar:()=>u(n),currentPeek:()=>u(n+o),next:f,peek:function(){return l(n+o)&&o++,o++,t[n+o]},reset:function(){n=0,r=1,a=1,o=0},resetPeek:function(e=0){o=e},skipToPeek:function(){const e=n+o;for(;e!==n;)f();o=0}}}const C=void 0;function P(e,t={}){const n=!1!==t.location,r=F(e),a=()=>r.index(),o=()=>{return e=r.line(),t=r.column(),n=r.index(),{line:e,column:t,offset:n};var e,t,n},l=o(),s=a(),c={currentType:14,offset:s,startLoc:l,endLoc:l,lastType:14,lastOffset:s,lastStartLoc:l,lastEndLoc:l,braceNest:0,inLinked:!1,text:""},i=()=>c,{onError:u}=t;function f(e,t,r){e.endLoc=o(),e.currentType=t;const a={type:t};return n&&(a.loc=T(e.startLoc,e.endLoc)),null!=r&&(a.value=r),a}const m=e=>f(e,14);function p(e,t){return e.currentChar()===t?(e.next(),t):(o(),"")}function d(e){let t="";for(;e.currentPeek()===E||e.currentPeek()===N;)t+=e.currentPeek(),e.peek();return t}function g(e){const t=d(e);return e.skipToPeek(),t}function _(e){if(e===C)return!1;const t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||95===t}function v(e,t){const{currentType:n}=t;if(2!==n)return!1;d(e);const r=function(e){if(e===C)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){d(e);const t="|"===e.currentPeek();return e.resetPeek(),t}function h(e,t=!0){const n=(t=!1,r="",a=!1)=>{const o=e.currentPeek();return"{"===o?"%"!==r&&t:"@"!==o&&o?"%"===o?(e.peek(),n(t,"%",!0)):"|"===o?!("%"!==r&&!a)||!(r===E||r===N):o===E?(e.peek(),n(!0,E,a)):o!==N||(e.peek(),n(!0,N,a)):"%"===r||t},r=n();return t&&e.resetPeek(),r}function k(e,t){const n=e.currentChar();return n===C?C:t(n)?(e.next(),n):null}function y(e){return k(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 L(e){return k(e,(e=>{const t=e.charCodeAt(0);return t>=48&&t<=57}))}function I(e){return k(e,(e=>{const t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}))}function O(e){let t="",n="";for(;t=L(e);)n+=t;return n}function P(e){let t="";for(;;){const n=e.currentChar();if("{"===n||"}"===n||"@"===n||"|"===n||!n)break;if("%"===n){if(!h(e))break;t+=n,e.next()}else if(n===E||n===N)if(h(e))t+=n,e.next();else{if(b(e))break;t+=n,e.next()}else t+=n,e.next()}return t}function R(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 o(),""}}function w(e,t,n){p(e,t);let r="";for(let t=0;t<n;t++){const t=I(e);if(!t){o(),e.currentChar();break}r+=t}return`\\${t}${r}`}function W(e){g(e);const t=p(e,"|");return g(e),t}function M(e,t){let n=null;switch(e.currentChar()){case"{":return t.braceNest>=1&&o(),e.next(),n=f(t,2,"{"),g(e),t.braceNest++,n;case"}":return t.braceNest>0&&2===t.currentType&&o(),e.next(),n=f(t,3,"}"),t.braceNest--,t.braceNest>0&&g(e),t.inLinked&&0===t.braceNest&&(t.inLinked=!1),n;case"@":return t.braceNest>0&&o(),n=S(e,t)||m(t),t.braceNest=0,n;default:let r=!0,a=!0,l=!0;if(b(e))return t.braceNest>0&&o(),n=f(t,1,W(e)),t.braceNest=0,t.inLinked=!1,n;if(t.braceNest>0&&(5===t.currentType||6===t.currentType||7===t.currentType))return o(),t.braceNest=0,x(e,t);if(r=function(e,t){const{currentType:n}=t;if(2!==n)return!1;d(e);const r=_(e.currentPeek());return e.resetPeek(),r}(e,t))return n=f(t,5,function(e){g(e);let t="",n="";for(;t=y(e);)n+=t;return e.currentChar()===C&&o(),n}(e)),g(e),n;if(a=v(e,t))return n=f(t,6,function(e){g(e);let t="";return"-"===e.currentChar()?(e.next(),t+=`-${O(e)}`):t+=O(e),e.currentChar()===C&&o(),t}(e)),g(e),n;if(l=function(e,t){const{currentType:n}=t;if(2!==n)return!1;d(e);const r="'"===e.currentPeek();return e.resetPeek(),r}(e,t))return n=f(t,7,function(e){g(e),p(e,"'");let t="",n="";const r=e=>"'"!==e&&e!==N;for(;t=k(e,r);)n+="\\"===t?R(e):t;const a=e.currentChar();return a===N||a===C?(o(),a===N&&(e.next(),p(e,"'")),n):(p(e,"'"),n)}(e)),g(e),n;if(!r&&!a&&!l)return n=f(t,13,function(e){g(e);let t="",n="";const r=e=>"{"!==e&&"}"!==e&&e!==E&&e!==N;for(;t=k(e,r);)n+=t;return n}(e)),o(),n.value,g(e),n}return n}function S(e,t){const{currentType:n}=t;let r=null;const a=e.currentChar();switch(8!==n&&9!==n&&12!==n&&10!==n||a!==N&&a!==E||o(),a){case"@":return e.next(),r=f(t,8,"@"),t.inLinked=!0,r;case".":return g(e),e.next(),f(t,9,".");case":":return g(e),e.next(),f(t,10,":");default:return b(e)?(r=f(t,1,W(e)),t.braceNest=0,t.inLinked=!1,r):function(e,t){const{currentType:n}=t;if(8!==n)return!1;d(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;d(e);const r=":"===e.currentPeek();return e.resetPeek(),r}(e,t)?(g(e),S(e,t)):function(e,t){const{currentType:n}=t;if(9!==n)return!1;d(e);const r=_(e.currentPeek());return e.resetPeek(),r}(e,t)?(g(e),f(t,12,function(e){let t="",n="";for(;t=y(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?_(e.peek()):!("@"===t||"%"===t||"|"===t||":"===t||"."===t||t===E||!t)&&(t===N?(e.peek(),r()):_(t))},a=r();return e.resetPeek(),a}(e,t)?(g(e),"{"===a?M(e,t)||r:f(t,11,function(e){const t=(n=!1,r)=>{const a=e.currentChar();return"{"!==a&&"%"!==a&&"@"!==a&&"|"!==a&&a?a===E?r:a===N?(r+=a,e.next(),t(n,r)):(r+=a,e.next(),t(!0,r)):r};return t(!1,"")}(e))):(8===n&&o(),t.braceNest=0,t.inLinked=!1,x(e,t))}}function x(e,t){let n={type:14};if(t.braceNest>0)return M(e,t)||m(t);if(t.inLinked)return S(e,t)||m(t);switch(e.currentChar()){case"{":return M(e,t)||m(t);case"}":return o(),e.next(),f(t,3,"}");case"@":return S(e,t)||m(t);default:if(b(e))return n=f(t,1,W(e)),t.braceNest=0,t.inLinked=!1,n;const{isModulo:r,hasSpace:a}=function(e){const t=d(e),n="%"===e.currentPeek()&&"{"===e.peek();return e.resetPeek(),{isModulo:n,hasSpace:t.length>0}}(e);if(r)return a?f(t,0,P(e)):f(t,4,function(e){g(e);return"%"!==e.currentChar()&&o(),e.next(),"%"}(e));if(h(e))return f(t,0,P(e))}return n}return{nextToken:function(){const{currentType:e,offset:t,startLoc:n,endLoc:l}=c;return c.lastType=e,c.lastOffset=t,c.lastStartLoc=n,c.lastEndLoc=l,c.offset=a(),c.startLoc=o(),r.currentChar()===C?f(c,14):x(r,c)},currentOffset:a,currentPosition:o,context:i}}const R=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function w(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 W(e={}){const t=!1!==e.location,{onError:n}=e;function r(e,n,r){const a={type:e,start:n,end:n};return t&&(a.loc={start:r,end:r}),a}function a(e,n,r,a){e.end=n,a&&(e.type=a),t&&e.loc&&(e.loc.end=r)}function o(e,t){const n=e.context(),o=r(3,n.offset,n.startLoc);return o.value=t,a(o,e.currentOffset(),e.currentPosition()),o}function l(e,t){const n=e.context(),{lastOffset:o,lastStartLoc:l}=n,s=r(5,o,l);return s.index=parseInt(t,10),e.nextToken(),a(s,e.currentOffset(),e.currentPosition()),s}function s(e,t){const n=e.context(),{lastOffset:o,lastStartLoc:l}=n,s=r(4,o,l);return s.key=t,e.nextToken(),a(s,e.currentOffset(),e.currentPosition()),s}function c(e,t){const n=e.context(),{lastOffset:o,lastStartLoc:l}=n,s=r(9,o,l);return s.value=t.replace(R,w),e.nextToken(),a(s,e.currentOffset(),e.currentPosition()),s}function u(e){const t=e.context(),n=r(6,t.offset,t.startLoc);let o=e.nextToken();if(9===o.type){const t=function(e){const t=e.nextToken(),n=e.context(),{lastOffset:o,lastStartLoc:l}=n,s=r(8,o,l);return 12!==t.type?(n.lastStartLoc,s.value="",a(s,o,l),{nextConsumeToken:t,node:s}):(null==t.value&&(n.lastStartLoc,M(t)),s.value=t.value||"",a(s,e.currentOffset(),e.currentPosition()),{node:s})}(e);n.modifier=t.node,o=t.nextConsumeToken||e.nextToken()}switch(10!==o.type&&(t.lastStartLoc,M(o)),o=e.nextToken(),2===o.type&&(o=e.nextToken()),o.type){case 11:null==o.value&&(t.lastStartLoc,M(o)),n.key=function(e,t){const n=e.context(),o=r(7,n.offset,n.startLoc);return o.value=t,a(o,e.currentOffset(),e.currentPosition()),o}(e,o.value||"");break;case 5:null==o.value&&(t.lastStartLoc,M(o)),n.key=s(e,o.value||"");break;case 6:null==o.value&&(t.lastStartLoc,M(o)),n.key=l(e,o.value||"");break;case 7:null==o.value&&(t.lastStartLoc,M(o)),n.key=c(e,o.value||"");break;default:t.lastStartLoc;const i=e.context(),u=r(7,i.offset,i.startLoc);return u.value="",a(u,i.offset,i.startLoc),n.key=u,a(n,i.offset,i.startLoc),{nextConsumeToken:o,node:n}}return a(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 r=i||e.nextToken();switch(i=null,r.type){case 0:null==r.value&&(t.lastStartLoc,M(r)),n.items.push(o(e,r.value||""));break;case 6:null==r.value&&(t.lastStartLoc,M(r)),n.items.push(l(e,r.value||""));break;case 5:null==r.value&&(t.lastStartLoc,M(r)),n.items.push(s(e,r.value||""));break;case 7:null==r.value&&(t.lastStartLoc,M(r)),n.items.push(c(e,r.value||""));break;case 8:const a=u(e);n.items.push(a.node),i=a.nextConsumeToken||null}}while(14!==t.currentType&&1!==t.currentType);return a(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:o}=t,l=f(e);return 14===t.currentType?l:function(e,t,n,o){const l=e.context();let s=0===o.items.length;const c=r(1,t,n);c.cases=[],c.cases.push(o);do{const t=f(e);s||(s=0===t.items.length),c.cases.push(t)}while(14!==l.currentType);return a(c,e.currentOffset(),e.currentPosition()),c}(e,n,o,l)}return{parse:function(n){const o=P(n,i({},e)),l=o.context(),s=r(0,l.offset,l.startLoc);return t&&s.loc&&(s.loc.source=n),s.body=m(o),14!==l.currentType&&(l.lastStartLoc,n[l.offset]),a(s,o.currentOffset(),o.currentPosition()),s}}}function M(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 S(e,t){for(let n=0;n<e.length;n++)x(e[n],t)}function x(e,t){switch(e.type){case 1:S(e.cases,t),t.helper("plural");break;case 2:S(e.items,t);break;case 6:x(e.key,t),t.helper("linked"),t.helper("type");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&&x(e.body,n);const r=n.context();e.helpers=Array.from(r.helpers)}function A(e,t){const{helper:n}=e;switch(t.type){case 0:!function(e,t){t.body?A(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 a=t.cases.length;for(let n=0;n<a&&(A(e,t.cases[n]),n!==a-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 a=t.items.length;for(let n=0;n<a&&(A(e,t.items[n]),n!==a-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")}(`),A(e,t.key),t.modifier?(e.push(", "),A(e,t.modifier),e.push(", _type")):e.push(", undefined, _type"),e.push(")")}(e,t);break;case 8:case 7:case 9:case 3: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)}}function $(e,t={}){const n=i({},t),r=W(n).parse(e);return D(r,n),((e,t={})=>{const n=g(t.mode)?t.mode:"normal",r=g(t.filename)?t.filename:"message.intl",a=!!t.sourceMap,o=null!=t.breakLineCode?t.breakLineCode:"arrow"===n?";":"\n",l=t.needIndent?t.needIndent:"arrow"!==n,s=e.helpers||[],c=function(e,t){const{sourceMap:n,filename:r,breakLineCode:a,needIndent:o}=t,l={source:e.loc.source,filename:r,code:"",column:1,line:1,offset:0,map:void 0,breakLineCode:a,needIndent:o,indentLevel:0};function s(e,t){l.code+=e}function c(e,t=!0){const n=t?a:"";s(o?n+" ".repeat(e):n)}return{context:()=>l,push:s,indent:function(e=!0){const t=++l.indentLevel;e&&c(t)},deindent:function(e=!0){const t=--l.indentLevel;e&&c(t)},newline:function(){c(l.indentLevel)},helper:e=>`_${e}`,needIndent:()=>l.needIndent}}(e,{mode:n,filename:r,sourceMap:a,breakLineCode:o,needIndent:l});c.push("normal"===n?"function __msg__ (ctx) {":"(ctx) => {"),c.indent(l),s.length>0&&(c.push(`const { ${s.map((e=>`${e}: _${e}`)).join(", ")} } = ctx`),c.newline()),c.push("return "),A(c,e),c.deindent(l),c.push("}");const{code:i,map:u}=c.context();return{ast:e,code:i,map:u?u.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 j=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function V(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 H(e){const t=e.trim();return("0"!==e.charAt(0)||!isNaN(parseInt(e)))&&(n=t,j.test(n)?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);var n}const G=new Map;function B(e,t){return v(e)?e[t]:null}const J=e=>e,Y=e=>"",z=e=>0===e.length?"":e.join(""),X=e=>null==e?"":p(e)||k(e)&&e.toString===b?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 K(e={}){const t=e.locale,n=function(e){const t=o(e.pluralIndex)?e.pluralIndex:-1;return e.named&&(o(e.named.count)||o(e.named.n))?o(e.named.count)?e.named.count:o(e.named.n)?e.named.n:t:t}(e),r=v(e.pluralRules)&&g(t)&&d(e.pluralRules[t])?e.pluralRules[t]:q,a=v(e.pluralRules)&&g(t)&&d(e.pluralRules[t])?q:void 0,l=e.list||[],s=e.named||{};o(e.pluralIndex)&&function(e,t){t.count||(t.count=e),t.n||(t.n=e)}(n,s);function c(t){const n=d(e.messages)?e.messages(t):!!v(e.messages)&&e.messages[t];return n||(e.parent?e.parent.message(t):Y)}const i=k(e.processor)&&d(e.processor.normalize)?e.processor.normalize:z,u=k(e.processor)&&d(e.processor.interpolate)?e.processor.interpolate:X,f={list:e=>l[e],named:e=>s[e],plural:e=>e[r(n,e.length,a)],linked:(t,...n)=>{const[r,a]=n;let o="text",l="";1===n.length?v(r)?(l=r.modifier||l,o=r.type||o):g(r)&&(l=r||l):2===n.length&&(g(r)&&(l=r||l),g(a)&&(o=a||o));let s=c(t)(f);return"vnode"===o&&p(s)&&l&&(s=s[0]),l?(i=l,e.modifiers?e.modifiers[i]:J)(s,o):s;var i},message:c,type:k(e.processor)&&g(e.processor.type)?e.processor.type:"text",interpolate:u,normalize:i};return f}function Z(e,t,n){return[...new Set([n,...p(t)?t:v(t)?Object.keys(t):g(t)?[t]:[n]])]}function Q(e,t,n){const r=g(n)?n:re,a=e;a.__localeChainCache||(a.__localeChainCache=new Map);let o=a.__localeChainCache.get(r);if(!o){o=[];let e=[n];for(;p(e);)e=ee(o,e,t);const l=p(t)||!k(t)?t:t.default?t.default:null;e=g(l)?[l]:l,p(e)&&ee(o,e,!1),a.__localeChainCache.set(r,o)}return o}function ee(e,t,n){let r=!0;for(let a=0;a<t.length&&_(r);a++){const o=t[a];g(o)&&(r=te(e,t[a],n))}return r}function te(e,t,n){let r;const a=t.split("-");do{r=ne(e,a.join("-"),n),a.splice(-1,1)}while(a.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 a=t.replace(/!/g,"");e.push(a),(p(n)||k(n))&&n[a]&&(r=n[a])}return r}const re="en-US",ae=e=>`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;let oe,le,se;let ce=0;function ie(e={}){const t=g(e.version)?e.version:"9.3.0-beta.16",n=g(e.locale)?e.locale:re,r=p(e.fallbackLocale)||k(e.fallbackLocale)||g(e.fallbackLocale)||!1===e.fallbackLocale?e.fallbackLocale:n,a=k(e.messages)?e.messages:{[n]:{}},o=k(e.datetimeFormats)?e.datetimeFormats:{[n]:{}},s=k(e.numberFormats)?e.numberFormats:{[n]:{}},u=i({},e.modifiers||{},{upper:(e,t)=>"text"===t&&g(e)?e.toUpperCase():"vnode"===t&&v(e)&&"__v_isVNode"in e?e.children.toUpperCase():e,lower:(e,t)=>"text"===t&&g(e)?e.toLowerCase():"vnode"===t&&v(e)&&"__v_isVNode"in e?e.children.toLowerCase():e,capitalize:(e,t)=>"text"===t&&g(e)?ae(e):"vnode"===t&&v(e)&&"__v_isVNode"in e?ae(e.children):e}),f=e.pluralRules||{},m=d(e.missing)?e.missing:null,b=!_(e.missingWarn)&&!l(e.missingWarn)||e.missingWarn,h=!_(e.fallbackWarn)&&!l(e.fallbackWarn)||e.fallbackWarn,y=!!e.fallbackFormat,L=!!e.unresolving,T=d(e.postTranslation)?e.postTranslation:null,E=k(e.processor)?e.processor:null,N=!_(e.warnHtmlMessage)||e.warnHtmlMessage,I=!!e.escapeParameter,O=d(e.messageCompiler)?e.messageCompiler:oe,F=d(e.messageResolver)?e.messageResolver:le||B,C=d(e.localeFallbacker)?e.localeFallbacker:se||Z,P=v(e.fallbackContext)?e.fallbackContext:void 0,R=d(e.onWarn)?e.onWarn:c,w=e,W=v(w.__datetimeFormatters)?w.__datetimeFormatters:new Map,M=v(w.__numberFormatters)?w.__numberFormatters:new Map,S=v(w.__meta)?w.__meta:{};ce++;const x={version:t,cid:ce,locale:n,fallbackLocale:r,messages:a,modifiers:u,pluralRules:f,missing:m,missingWarn:b,fallbackWarn:h,fallbackFormat:y,unresolving:L,postTranslation:T,processor:E,warnHtmlMessage:N,escapeParameter:I,messageCompiler:O,messageResolver:F,localeFallbacker:C,fallbackContext:P,onWarn:R,__meta:S};return x.datetimeFormats=o,x.numberFormats=s,x.__datetimeFormatters=W,x.__numberFormatters=M,x}function ue(e,t,n,r,a){const{missing:o,onWarn:l}=e;if(null!==o){const r=o(e,n,t,a);return g(r)?r:t}return t}function fe(e,t,n){e.__localeChainCache=new Map,e.localeFallbacker(e,n,t)}const me=e=>e;let pe=Object.create(null);let de=y;const ge=()=>++de,_e={INVALID_ARGUMENT:de,INVALID_DATE_ARGUMENT:ge(),INVALID_ISO_DATE_ARGUMENT:ge(),__EXTEND_POINT__:ge()},ve=()=>"",be=e=>d(e);function he(e,...t){const{fallbackFormat:n,postTranslation:r,unresolving:a,messageCompiler:l,fallbackLocale:s,messages:c}=e,[i,f]=Le(...t),m=_(f.missingWarn)?f.missingWarn:e.missingWarn,d=_(f.fallbackWarn)?f.fallbackWarn:e.fallbackWarn,b=_(f.escapeParameter)?f.escapeParameter:e.escapeParameter,h=!!f.resolvedMessage,k=g(f.default)||_(f.default)?_(f.default)?l?i:()=>i:f.default:n?l?i:()=>i:"",y=n||""!==k,L=g(f.locale)?f.locale:e.locale;b&&function(e){p(e.list)?e.list=e.list.map((e=>g(e)?u(e):e)):v(e.named)&&Object.keys(e.named).forEach((t=>{g(e.named[t])&&(e.named[t]=u(e.named[t]))}))}(f);let[T,E,N]=h?[i,L,c[L]||{}]:ke(e,i,L,s,d,m),I=T,O=i;if(h||g(I)||be(I)||y&&(I=k,O=I),!(h||(g(I)||be(I))&&g(E)))return a?-1:i;let F=!1;const C=be(I)?I:ye(e,i,E,I,O,(()=>{F=!0}));if(F)return I;const P=function(e,t,n,r){const{modifiers:a,pluralRules:l,messageResolver:s,fallbackLocale:c,fallbackWarn:i,missingWarn:u,fallbackContext:f}=e,m=r=>{let a=s(n,r);if(null==a&&f){const[,,e]=ke(f,r,t,c,i,u);a=s(e,r)}if(g(a)){let n=!1;const o=ye(e,r,t,a,r,(()=>{n=!0}));return n?ve:o}return be(a)?a:ve},p={locale:t,modifiers:a,pluralRules:l,messages:m};e.processor&&(p.processor=e.processor);r.list&&(p.list=r.list);r.named&&(p.named=r.named);o(r.plural)&&(p.pluralIndex=r.plural);return p}(e,E,N,f),R=function(e,t,n){return t(n)}(0,C,K(P));return r?r(R,i):R}function ke(e,t,n,r,a,o){const{messages:l,onWarn:s,messageResolver:c,localeFallbacker:i}=e,u=i(e,r,n);let f,m={},p=null;for(let n=0;n<u.length&&(f=u[n],m=l[f]||{},null===(p=c(m,t))&&(p=m[t]),!g(p)&&!d(p));n++){const n=ue(e,t,f,0,"translate");n!==t&&(p=n)}return[p,f,m]}function ye(e,t,n,r,o,l){const{messageCompiler:s,warnHtmlMessage:c}=e;if(be(r)){const e=r;return e.locale=e.locale||n,e.key=e.key||t,e}if(null==s){const e=()=>r;return e.locale=n,e.key=t,e}const i=s(r,function(e,t,n,r,o,l){return{warnHtmlMessage:o,onError:e=>{throw l&&l(e),e},onCacheKey:e=>((e,t,n)=>a({l:e,k:t,s:n}))(t,n,e)}}(0,n,o,0,c,l));return i.locale=n,i.key=t,i.source=r,i}function Le(...e){const[t,n,r]=e,a={};if(!g(t)&&!o(t)&&!be(t))throw Error(_e.INVALID_ARGUMENT);const l=o(t)?String(t):(be(t),t);return o(n)?a.plural=n:g(n)?a.default=n:k(n)&&!s(n)?a.named=n:p(n)&&(a.list=n),o(r)?a.plural=r:g(r)?a.default=r:k(r)&&i(a,r),[l,a]}function Te(e,...t){const{datetimeFormats:n,unresolving:r,fallbackLocale:a,onWarn:o,localeFallbacker:l}=e,{__datetimeFormatters:c}=e,[u,f,m,p]=Ne(...t);_(m.missingWarn)?m.missingWarn:e.missingWarn;_(m.fallbackWarn)?m.fallbackWarn:e.fallbackWarn;const d=!!m.part,v=g(m.locale)?m.locale:e.locale,b=l(e,a,v);if(!g(u)||""===u)return new Intl.DateTimeFormat(v,p).format(f);let h,y={},L=null;for(let t=0;t<b.length&&(h=b[t],y=n[h]||{},L=y[u],!k(L));t++)ue(e,u,h,0,"datetime format");if(!k(L)||!g(h))return r?-1:u;let T=`${h}__${u}`;s(p)||(T=`${T}__${JSON.stringify(p)}`);let E=c.get(T);return E||(E=new Intl.DateTimeFormat(h,i({},L,p)),c.set(T,E)),d?E.formatToParts(f):E.format(f)}const Ee=["localeMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName","formatMatcher","hour12","timeZone","dateStyle","timeStyle","calendar","dayPeriod","numberingSystem","hourCycle","fractionalSecondDigits"];function Ne(...e){const[t,n,r,a]=e,l={};let s,c={};if(g(t)){const e=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!e)throw Error(_e.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(_e.INVALID_ISO_DATE_ARGUMENT)}}else if("[object Date]"===h(t)){if(isNaN(t.getTime()))throw Error(_e.INVALID_DATE_ARGUMENT);s=t}else{if(!o(t))throw Error(_e.INVALID_ARGUMENT);s=t}return g(n)?l.key=n:k(n)&&Object.keys(n).forEach((e=>{Ee.includes(e)?c[e]=n[e]:l[e]=n[e]})),g(r)?l.locale=r:k(r)&&(c=r),k(a)&&(c=a),[l.key||"",s,l,c]}function Ie(e,t,n){const r=e;for(const e in n){const n=`${t}__${e}`;r.__datetimeFormatters.has(n)&&r.__datetimeFormatters.delete(n)}}function Oe(e,...t){const{numberFormats:n,unresolving:r,fallbackLocale:a,onWarn:o,localeFallbacker:l}=e,{__numberFormatters:c}=e,[u,f,m,p]=Ce(...t);_(m.missingWarn)?m.missingWarn:e.missingWarn;_(m.fallbackWarn)?m.fallbackWarn:e.fallbackWarn;const d=!!m.part,v=g(m.locale)?m.locale:e.locale,b=l(e,a,v);if(!g(u)||""===u)return new Intl.NumberFormat(v,p).format(f);let h,y={},L=null;for(let t=0;t<b.length&&(h=b[t],y=n[h]||{},L=y[u],!k(L));t++)ue(e,u,h,0,"number format");if(!k(L)||!g(h))return r?-1:u;let T=`${h}__${u}`;s(p)||(T=`${T}__${JSON.stringify(p)}`);let E=c.get(T);return E||(E=new Intl.NumberFormat(h,i({},L,p)),c.set(T,E)),d?E.formatToParts(f):E.format(f)}const Fe=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function Ce(...e){const[t,n,r,a]=e,l={};let s={};if(!o(t))throw Error(_e.INVALID_ARGUMENT);const c=t;return g(n)?l.key=n:k(n)&&Object.keys(n).forEach((e=>{Fe.includes(e)?s[e]=n[e]:l[e]=n[e]})),g(r)?l.locale=r:k(r)&&(s=r),k(a)&&(s=a),[l.key||"",c,l,s]}function Pe(e,t,n){const r=e;for(const e in n){const n=`${t}__${e}`;r.__numberFormatters.has(n)&&r.__numberFormatters.delete(n)}}const Re="9.3.0-beta.16";let we=y;const We=()=>++we,Me={UNEXPECTED_RETURN_TYPE:we,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(),MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION:We(),NOT_AVAILABLE_COMPOSITION_IN_LEGACY:We(),__EXTEND_POINT__:We()},Se=r("__translateVNode"),xe=r("__datetimeParts"),De=r("__numberParts"),Ae=r("__setPluralRules"),$e=r("__legacyVueI18n"),Ue=r("__injectWithOption"),je="__VUE_I18N_BRIDGE__";function Ve(e){return null!=e&&null!=e.version&&(Number(e.version.split(".")[0])||-1)>=8}function He(e){if(!v(e))return e;for(const t in e)if(m(e,t))if(t.includes(".")){const n=t.split("."),r=n.length-1;let a=e;for(let e=0;e<r;e++)n[e]in a||(a[n[e]]={}),a=a[n[e]];a[n[r]]=e[t],delete e[t],v(a[n[r]])&&He(a[n[r]])}else v(e[t])&&He(e[t]);return e}function Ge(e,t){const{messages:n,__i18n:r,messageResolver:a,flatJson:o}=t,l=k(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?(l[t]=l[t]||{},Je(n,l[t])):Je(n,l)}else g(e)&&Je(JSON.parse(e),l)})),null==a&&o)for(const e in l)m(l,e)&&He(l[e]);return l}const Be=e=>!v(e)||p(e);function Je(e,t){if(Be(e)||Be(t))throw Error(Me.INVALID_VALUE);for(const n in e)m(e,n)&&(Be(e[n])||Be(t[n])?t[n]=e[n]:Je(e[n],t[n]))}function Ye(e){return function(e){const t=void 0;return{tag:void 0,data:void 0,children:void 0,text:e,elm:void 0,ns:void 0,context:void 0,fnContext:void 0,fnOptions:void 0,fnScopeId:void 0,key:void 0,componentOptions:void 0,componentInstance:t,parent:void 0,raw:!1,isStatic:!1,isRootInsert:!0,isComment:!1,isCloned:!1,isOnce:!1,asyncFactory:void 0,asyncMeta:void 0,isAsyncPlaceholder:!1,child:()=>t}}(e)}let ze=0;function Xe(e){return(n,r,a,o)=>e(r,a,t.getCurrentInstance()||void 0,o)}function qe(e={},r){const{__root:a}=e,s=void 0===a;let c=!_(e.inheritLocale)||e.inheritLocale;const u=t.ref(a&&c?a.locale.value:g(e.locale)?e.locale:re),f=t.ref(a&&c?a.fallbackLocale.value:g(e.fallbackLocale)||p(e.fallbackLocale)||k(e.fallbackLocale)||!1===e.fallbackLocale?e.fallbackLocale:u.value),m=t.ref(Ge(u.value,e)),b=t.ref(k(e.datetimeFormats)?e.datetimeFormats:{[u.value]:{}}),h=t.ref(k(e.numberFormats)?e.numberFormats:{[u.value]:{}});let y=a?a.missingWarn:!_(e.missingWarn)&&!l(e.missingWarn)||e.missingWarn,L=a?a.fallbackWarn:!_(e.fallbackWarn)&&!l(e.fallbackWarn)||e.fallbackWarn,T=a?a.fallbackRoot:!_(e.fallbackRoot)||e.fallbackRoot,E=!!e.fallbackFormat,N=d(e.missing)?e.missing:null,I=d(e.missing)?Xe(e.missing):null,O=d(e.postTranslation)?e.postTranslation:null,F=a?a.warnHtmlMessage:!_(e.warnHtmlMessage)||e.warnHtmlMessage,C=!!e.escapeParameter;const P=a?a.modifiers:k(e.modifiers)?e.modifiers:{};let R,w,W=e.pluralRules||a&&a.pluralRules;{Ve(r);const e={locale:u.value,fallbackLocale:f.value,messages:m.value,dateTimeFormats:b.value,numberFormats:h.value,modifiers:P,missing:N,fallbackRoot:T,postTranslation:O,pluralizationRules:W,escapeParameterHtml:C,sync:c,silentFallbackWarn:_(L)?!L:L,silentTranslationWarn:_(y)?!y:y,formatFallbackMessages:_(E)?!E:E,warnHtmlInMessage:_(F)&&F?"warn":"off",__VUE_I18N_BRIDGE__:je};R=new r(e)}w=(()=>{const t={version:Re,locale:u.value,fallbackLocale:f.value,messages:m.value,modifiers:P,pluralRules:W,missing:null===I?void 0:I,missingWarn:y,fallbackWarn:L,fallbackFormat:E,unresolving:!0,postTranslation:null===O?void 0:O,warnHtmlMessage:F,escapeParameter:C,messageResolver:e.messageResolver,__meta:{framework:"vue"}};t.datetimeFormats=b.value,t.numberFormats=h.value,t.__datetimeFormatters=k(w)?w.__datetimeFormatters:void 0,t.__numberFormatters=k(w)?w.__numberFormatters:void 0;return ie(t)})(),fe(w,u.value,f.value);const M=t.computed({get:()=>u.value,set:e=>{u.value=e,R&&!s&&(R.locale=e),w.locale=u.value}}),S=t.computed({get:()=>f.value,set:e=>{f.value=e,R&&!s&&(R.fallbackLocale=e),w.fallbackLocale=f.value,fe(w,u.value,e)}}),x=t.computed((()=>m.value)),D=t.computed((()=>b.value)),A=t.computed((()=>h.value));const $=(e,t,n,r,l,s)=>{let c;if(u.value,f.value,m.value,b.value,h.value,c=e(w),o(c)&&-1===c){const[e,n]=t();return a&&T?r(a):l(e)}if(s(c))return c;throw Error(Me.UNEXPECTED_RETURN_TYPE)};function U(...e){return $((t=>Reflect.apply(he,null,[t,...e])),(()=>Le(...e)),0,(t=>Reflect.apply(t.t,t,[...e])),(e=>e),(e=>g(e)))}const j={normalize:function(e){return e.map((e=>g(e)||o(e)||_(e)?Ye(String(e)):e))},interpolate:e=>e,type:"vnode"};function V(e){return m.value[e]||{}}ze++,a&&n&&(t.watch(a.locale,(e=>{c&&(u.value=e,R&&!s&&(R.locale=e),w.locale=e,fe(w,u.value,f.value))})),t.watch(a.fallbackLocale,(e=>{c&&(f.value=e,R&&!s&&(R.fallbackLocale=e),w.fallbackLocale=e,fe(w,u.value,f.value))})));const H={id:ze,locale:M,fallbackLocale:S,get inheritLocale(){return c},set inheritLocale(e){c=e,R&&(R._sync=e),e&&a&&(u.value=a.locale.value,f.value=a.fallbackLocale.value,R&&(R.locale=a.locale.value,R.fallbackLocale=a.fallbackLocale.value),fe(w,u.value,f.value))},get availableLocales(){return Object.keys(m.value).sort()},messages:x,get modifiers(){return P},get pluralRules(){return W||{}},get isGlobal(){return s},get missingWarn(){return y},set missingWarn(e){y=e,w.missingWarn=y},get fallbackWarn(){return L},set fallbackWarn(e){L=e,w.fallbackWarn=L},get fallbackRoot(){return T},set fallbackRoot(e){T=e},get fallbackFormat(){return E},set fallbackFormat(e){E=e,w.fallbackFormat=E},get warnHtmlMessage(){return F},set warnHtmlMessage(e){F=e,w.warnHtmlMessage=e},get escapeParameter(){return C},set escapeParameter(e){C=e,w.escapeParameter=e},t:U,getLocaleMessage:V,setLocaleMessage:function(e,t){m.value[e]=t,R&&R.setLocaleMessage(e,t),w.messages=m.value},mergeLocaleMessage:function(e,t){m.value[e]=m.value[e]||{},R&&R.mergeLocaleMessage(e,t),Je(t,m.value[e]),w.messages=m.value},getPostTranslationHandler:function(){return d(O)?O:null},setPostTranslationHandler:function(e){O=e,w.postTranslation=e},getMissingHandler:function(){return N},setMissingHandler:function(e){null!==e&&(I=Xe(e)),N=e,w.missing=I},[Ae]:function(e){W=e,w.pluralRules=W}};return H.datetimeFormats=D,H.numberFormats=A,H.rt=function(...e){const[t,n,r]=e;if(r&&!v(r))throw Error(Me.INVALID_ARGUMENT);return U(t,n,i({resolvedMessage:!0},r||{}))},H.te=function(e,t){const n=V(g(t)?t:u.value);return null!==w.messageResolver(n,e)},H.tm=function(e){const t=function(e){let t=null;const n=Q(w,f.value,u.value);for(let r=0;r<n.length;r++){const a=m.value[n[r]]||{},o=w.messageResolver(a,e);if(null!=o){t=o;break}}return t}(e);return null!=t?t:a&&a.tm(e)||{}},H.d=function(...e){return $((t=>Reflect.apply(Te,null,[t,...e])),(()=>Ne(...e)),0,(t=>Reflect.apply(t.d,t,[...e])),(()=>""),(e=>g(e)))},H.n=function(...e){return $((t=>Reflect.apply(Oe,null,[t,...e])),(()=>Ce(...e)),0,(t=>Reflect.apply(t.n,t,[...e])),(()=>""),(e=>g(e)))},H.getDateTimeFormat=function(e){return b.value[e]||{}},H.setDateTimeFormat=function(e,t){b.value[e]=t,R&&R.setDateTimeFormat(e,t),w.datetimeFormats=b.value,Ie(w,e,t)},H.mergeDateTimeFormat=function(e,t){b.value[e]=i(b.value[e]||{},t),R&&R.mergeDateTimeFormat(e,t),w.datetimeFormats=b.value,Ie(w,e,t)},H.getNumberFormat=function(e){return h.value[e]||{}},H.setNumberFormat=function(e,t){h.value[e]=t,R&&R.setNumberFormat(e,t),w.numberFormats=h.value,Pe(w,e,t)},H.mergeNumberFormat=function(e,t){h.value[e]=i(h.value[e]||{},t),R&&R.mergeNumberFormat(e,t),w.numberFormats=h.value,Pe(w,e,t)},H[Ue]=e.__injectWithOption,H[Se]=function(...e){return $((t=>{let n;const r=t;try{r.processor=j,n=Reflect.apply(he,null,[r,...e])}finally{r.processor=null}return n}),(()=>Le(...e)),0,(t=>t[Se](...e)),(e=>[Ye(e)]),(e=>p(e)))},H[xe]=function(...e){return $((t=>Reflect.apply(Te,null,[t,...e])),(()=>Ne(...e)),0,(t=>t[xe](...e)),(()=>[]),(e=>g(e)||p(e)))},H[De]=function(...e){return $((t=>Reflect.apply(Oe,null,[t,...e])),(()=>Ce(...e)),0,(t=>t[De](...e)),(()=>[]),(e=>g(e)||p(e)))},H[$e]=R,H}const Ke={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>"parent"===e||"global"===e,default:"parent"},i18n:{type:Object}};const Ze=t.defineComponent({name:"i18n-t",props:i({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>o(e)||!isNaN(e)}},Ke),setup(e,n){const{slots:r,attrs:a}=n,o=e.i18n||st({useScope:e.scope,__useComponent:!0});return()=>{const l=Object.keys(r).filter((e=>"_"!==e)),s={};e.locale&&(s.locale=e.locale),void 0!==e.plural&&(s.plural=g(e.plural)?+e.plural:e.plural);const c=function({slots:e},t){if(1===t.length&&"default"===t[0])return(e.default?e.default():[]).reduce(((e,t)=>[...e,...t.children?t.children:[t]]),[]);return t.reduce(((t,n)=>{const r=e[n];return r&&(t[n]=r()),t}),{})}(n,l),u=o[Se](e.keypath,c,s),f=i({},a),m=g(e.tag)||v(e.tag)?e.tag:"span";return t.h(m,f,u)}}}),Qe=Ze;function et(e,n,r,a){const{slots:o,attrs:l}=n;return()=>{const n={part:!0};let s={};e.locale&&(n.locale=e.locale),g(e.format)?n.key=e.format:v(e.format)&&(g(e.format.key)&&(n.key=e.format.key),s=Object.keys(e.format).reduce(((t,n)=>r.includes(n)?i({},t,{[n]:e.format[n]}):t),{}));const c=a(e.value,n,s);let u=[n.key];p(c)?u=c.map(((e,t)=>{const n=o[e.type],r=n?n({[e.type]:e.value,index:t,parts:c}):[e.value];var a;return p(a=r)&&!g(a[0])&&(r[0].key=`${e.type}-${t}`),r})):g(c)&&(u=[c]);const f=i({},l),m=g(e.tag)||v(e.tag)?e.tag:"span";return t.h(m,f,u)}}const tt=t.defineComponent({name:"i18n-n",props:i({value:{type:Number,required:!0},format:{type:[String,Object]}},Ke),setup(e,t){const n=e.i18n||st({useScope:"parent",__useComponent:!0});return et(e,t,Fe,((...e)=>n[De](...e)))}}),nt=tt,rt=t.defineComponent({name:"i18n-d",props:i({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},Ke),setup(e,t){const n=e.i18n||st({useScope:"parent",__useComponent:!0});return et(e,t,Ee,((...e)=>n[xe](...e)))}}),at=rt;let ot=null;const lt=r("global-vue-i18n");function st(e={}){const r=t.getCurrentInstance();if(null==r)throw Error(Me.MUST_BE_CALL_SETUP_TOP);if(null==ot)throw Error(Me.NOT_INSLALLED);const a=function(e){{const t=e.proxy;if(null==t)throw Error(Me.UNEXPECTED_ERROR);const n=t._i18nBridgeRoot;if(!n)throw Error(Me.NOT_INSLALLED);return n}}(r),o=function(e){return e.global}(a),c=function(e){return e.proxy.$options}(r),u=function(e,t){return s(e)?"__i18n"in t?"local":"global":e.useScope?e.useScope:"local"}(e,c);if("legacy"===a.mode&&!e.__useComponent){if(!a.allowComposition)throw Error(Me.NOT_AVAILABLE_IN_LEGACY_MODE);return function(e,n,r,a={}){const o="local"===n,s=t.shallowRef(null);if(o&&e.proxy&&!e.proxy.$options.i18n&&!e.proxy.$options.__i18n)throw Error(Me.MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION);const c=!_(a.inheritLocale)||a.inheritLocale,i=t.ref(o&&c?r.locale.value:g(a.locale)?a.locale:re),u=t.ref(o&&c?r.fallbackLocale.value:g(a.fallbackLocale)||p(a.fallbackLocale)||k(a.fallbackLocale)||!1===a.fallbackLocale?a.fallbackLocale:i.value),f=t.ref(Ge(i.value,a)),m=t.ref(k(a.datetimeFormats)?a.datetimeFormats:{[i.value]:{}}),v=t.ref(k(a.numberFormats)?a.numberFormats:{[i.value]:{}}),b=o?r.missingWarn:!_(a.missingWarn)&&!l(a.missingWarn)||a.missingWarn,h=o?r.fallbackWarn:!_(a.fallbackWarn)&&!l(a.fallbackWarn)||a.fallbackWarn,y=o?r.fallbackRoot:!_(a.fallbackRoot)||a.fallbackRoot,L=!!a.fallbackFormat,T=d(a.missing)?a.missing:null,E=d(a.postTranslation)?a.postTranslation:null,N=o?r.warnHtmlMessage:!_(a.warnHtmlMessage)||a.warnHtmlMessage,I=!!a.escapeParameter,O=o?r.modifiers:k(a.modifiers)?a.modifiers:{},F=a.pluralRules||o&&r.pluralRules;function C(){return[i.value,u.value,f.value,m.value,v.value]}const P=t.computed({get:()=>s.value?s.value.locale.value:i.value,set:e=>{s.value&&(s.value.locale.value=e),i.value=e}}),R=t.computed({get:()=>s.value?s.value.fallbackLocale.value:u.value,set:e=>{s.value&&(s.value.fallbackLocale.value=e),u.value=e}}),w=t.computed((()=>s.value?s.value.messages.value:f.value)),W=t.computed((()=>m.value)),M=t.computed((()=>v.value));function S(){return s.value?s.value.getPostTranslationHandler():E}function x(e){s.value&&s.value.setPostTranslationHandler(e)}function D(){return s.value?s.value.getMissingHandler():T}function A(e){s.value&&s.value.setMissingHandler(e)}function $(e){return C(),e()}function U(...e){return s.value?$((()=>Reflect.apply(s.value.t,null,[...e]))):$((()=>""))}function j(...e){return s.value?Reflect.apply(s.value.rt,null,[...e]):""}function V(...e){return s.value?$((()=>Reflect.apply(s.value.d,null,[...e]))):$((()=>""))}function H(...e){return s.value?$((()=>Reflect.apply(s.value.n,null,[...e]))):$((()=>""))}function G(e){return s.value?s.value.tm(e):{}}function B(e,t){return!!s.value&&s.value.te(e,t)}function J(e){return s.value?s.value.getLocaleMessage(e):{}}function Y(e,t){s.value&&(s.value.setLocaleMessage(e,t),f.value[e]=t)}function z(e,t){s.value&&s.value.mergeLocaleMessage(e,t)}function X(e){return s.value?s.value.getDateTimeFormat(e):{}}function q(e,t){s.value&&(s.value.setDateTimeFormat(e,t),m.value[e]=t)}function K(e,t){s.value&&s.value.mergeDateTimeFormat(e,t)}function Z(e){return s.value?s.value.getNumberFormat(e):{}}function Q(e,t){s.value&&(s.value.setNumberFormat(e,t),v.value[e]=t)}function ee(e,t){s.value&&s.value.mergeNumberFormat(e,t)}const te={get id(){return s.value?s.value.id:-1},locale:P,fallbackLocale:R,messages:w,datetimeFormats:W,numberFormats:M,get inheritLocale(){return s.value?s.value.inheritLocale:c},set inheritLocale(e){s.value&&(s.value.inheritLocale=e)},get availableLocales(){return s.value?s.value.availableLocales:Object.keys(f.value)},get modifiers(){return s.value?s.value.modifiers:O},get pluralRules(){return s.value?s.value.pluralRules:F},get isGlobal(){return!!s.value&&s.value.isGlobal},get missingWarn(){return s.value?s.value.missingWarn:b},set missingWarn(e){s.value&&(s.value.missingWarn=e)},get fallbackWarn(){return s.value?s.value.fallbackWarn:h},set fallbackWarn(e){s.value&&(s.value.missingWarn=e)},get fallbackRoot(){return s.value?s.value.fallbackRoot:y},set fallbackRoot(e){s.value&&(s.value.fallbackRoot=e)},get fallbackFormat(){return s.value?s.value.fallbackFormat:L},set fallbackFormat(e){s.value&&(s.value.fallbackFormat=e)},get warnHtmlMessage(){return s.value?s.value.warnHtmlMessage:N},set warnHtmlMessage(e){s.value&&(s.value.warnHtmlMessage=e)},get escapeParameter(){return s.value?s.value.escapeParameter:I},set escapeParameter(e){s.value&&(s.value.escapeParameter=e)},t:U,getPostTranslationHandler:S,setPostTranslationHandler:x,getMissingHandler:D,setMissingHandler:A,rt:j,d:V,n:H,tm:G,te:B,getLocaleMessage:J,setLocaleMessage:Y,mergeLocaleMessage:z,getDateTimeFormat:X,setDateTimeFormat:q,mergeDateTimeFormat:K,getNumberFormat:Z,setNumberFormat:Q,mergeNumberFormat:ee};function ne(e){e.locale.value=i.value,e.fallbackLocale.value=u.value,Object.keys(f.value).forEach((t=>{e.mergeLocaleMessage(t,f.value[t])})),Object.keys(m.value).forEach((t=>{e.mergeDateTimeFormat(t,m.value[t])})),Object.keys(v.value).forEach((t=>{e.mergeNumberFormat(t,v.value[t])})),e.escapeParameter=I,e.fallbackFormat=L,e.fallbackRoot=y,e.fallbackWarn=h,e.missingWarn=b,e.warnHtmlMessage=N}return t.onBeforeMount((()=>{if(null==e.proxy||null==e.proxy.$i18n)throw Error(Me.NOT_AVAILABLE_COMPOSITION_IN_LEGACY);const t=s.value=e.proxy.$i18n.__composer;"global"===n?(i.value=t.locale.value,u.value=t.fallbackLocale.value,f.value=t.messages.value,m.value=t.datetimeFormats.value,v.value=t.numberFormats.value):o&&ne(t)})),te}(r,u,o,e)}if("global"===u)return function(e,t,n){let r=v(t.messages)?t.messages:{};"__i18nGlobal"in n&&(r=Ge(e.locale.value,{messages:r,__i18n:n.__i18nGlobal}));const a=Object.keys(r);if(a.length&&a.forEach((t=>{e.mergeLocaleMessage(t,r[t])})),v(t.datetimeFormats)){const n=Object.keys(t.datetimeFormats);n.length&&n.forEach((n=>{e.mergeDateTimeFormat(n,t.datetimeFormats[n])}))}if(v(t.numberFormats)){const n=Object.keys(t.numberFormats);n.length&&n.forEach((n=>{e.mergeNumberFormat(n,t.numberFormats[n])}))}}(o,e,c),o;if("parent"===u){let t=function(e,t,n=!1){let r=null;const a=t.root;let o=t.parent;for(;null!=o;){const t=e;if("composition"===e.mode)r=t.__getInstance(o);else{const e=t.__getInstance(o);null!=e&&(r=e.__composer,n&&r&&!r[Ue]&&(r=null))}if(null!=r)break;if(a===o)break;o=o.parent}return r}(a,r,e.__useComponent);return null==t&&(t=o),t}const f=a;let m=f.__getInstance(r);if(null==m){const a=i({},e);"__i18n"in c&&(a.__i18n=c.__i18n),o&&(a.__root=o),m=qe(a,ot),f.__composerExtend&&f.__composerExtend(m),function(e,r,a){{const o=r.proxy;if(null==o)throw Error(Me.UNEXPECTED_ERROR);const l=a[$e];if(l===e)throw Error(Me.UNEXPECTED_ERROR);o._i18n=l,o._i18n_bridge=!0,n&&(o._i18nWatcher=o._i18n.watchI18nData(),o._i18n._sync&&(o._localeWatcher=o._i18n.watchLocale()));let s=!1;t.onBeforeMount((()=>{o._i18n.subscribeDataChanging(o),s=!0})),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}))}}(f,r,m),f.__setInstance(r,m)}return m}var ct;return ct=function(e,t={}){{const n=(t.onCacheKey||me)(e),r=pe[n];if(r)return r;let a=!1;const o=t.onError||L;t.onError=e=>{a=!0,o(e)};const{code:l}=$(e,t),s=new Function(`return ${l}`)();return a?s:pe[n]=s}},oe=ct,le=function(e,t){if(!v(e))return null;let n=G.get(t);if(n||(n=function(e){const t=[];let n,r,a,o,l,s,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++,a="\\"+t,m[0](),!0}for(m[0]=()=>{void 0===r?r=a:r+=a},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=H(r),!1===r)return!1;m[1]()}};null!==u;)if(i++,n=e[i],"\\"!==n||!p()){if(o=V(n),c=U[u],l=c[o]||c.l||8,8===l)return;if(u=l[0],void 0!==l[1]&&(s=m[l[1]],s&&(a=n,!1===s())))return;if(7===u)return t}}(t),n&&G.set(t,n)),!n)return null;const r=n.length;let a=e,o=0;for(;o<r;){const e=a[n[o]];if(void 0===e)return null;a=e,o++}return a},se=Q,e.DatetimeFormat=rt,e.I18nD=at,e.I18nInjectionKey=lt,e.I18nN=nt,e.I18nT=Qe,e.NumberFormat=tt,e.Translation=Ze,e.VERSION=Re,e.castToVueI18n=e=>{if(!(je in e))throw Error(Me.NOT_COMPATIBLE_LEGACY_VUE_I18N);return e},e.createI18n=function(e={},n){ot=n;const r=!_(e.legacy)||e.legacy,a=!_(e.globalInjection)||e.globalInjection,o=!r||!!e.allowComposition,l=new Map,[s,c]=function(e,n,r){const a=t.effectScope();{if(!Ve(r))throw Error(Me.NOT_COMPATIBLE_LEGACY_VUE_I18N);const t=a.run((()=>qe(e,r)));if(null==t)throw Error(Me.UNEXPECTED_ERROR);return[a,t]}}(e,0,n);{const e=c[$e];let t=null;Object.defineProperty(e,"global",{get:()=>c}),Object.defineProperty(e,"mode",{get:()=>r?"legacy":"composition"}),Object.defineProperty(e,"allowComposition",{get:()=>o}),Object.defineProperty(e,"__instances",{get:()=>l}),Object.defineProperty(e,"install",{writable:!0,value:(n,...o)=>{if(2!==(n&&n.version&&Number(n.version.split(".")[0])||-1))throw Error(Me.BRIDGE_SUPPORT_VUE_2_ONLY);!function(e,...t){const n=k(t[0])?t[0]:{};(!_(n.globalInstall)||n.globalInstall)&&(e.component(Ze.name,Ze),e.component(tt.name,tt),e.component(rt.name,rt))}(n,...o),!r&&a&&(t=function(e,t,n){const r=t.watchLocale(n);return e.prototype.$t=function(...e){return Reflect.apply(n.t,n,[...e])},e.prototype.$d=function(...e){return Reflect.apply(n.d,n,[...e])},e.prototype.$n=function(...e){return Reflect.apply(n.n,n,[...e])},r}(n,e,c)),n.mixin(function(e,t){return{beforeCreate(){const n=this.$options;if(!n.__VUE18N__INSTANCE__)if(n.i18n=n.i18n||(n.__i18nBridge?{}:null),this._i18nBridgeRoot=e,"composition"!==e.mode)if(n.i18n){if(n.i18n instanceof t){if(n.__i18nBridge)try{const e=n.i18n&&n.i18n.messages?n.i18n.messages:{};n.__i18nBridge.forEach((t=>Je(JSON.parse(t),e))),Object.keys(e).forEach((t=>{n.i18n.mergeLocaleMessage(t,e[t])}))}catch(e){}this._i18n=n.i18n,this._i18nWatcher=this._i18n.watchI18nData()}else if(k(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.__i18nBridge)try{const e=n.i18n&&n.i18n.messages?n.i18n.messages:{};n.__i18nBridge.forEach((t=>Je(JSON.parse(t),e))),n.i18n.messages=e}catch(e){}const{sharedMessages:r}=n.i18n;r&&k(r)&&Je(r,n.i18n.messages),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 n=this.$options;n.__VUE18N__INSTANCE__||"composition"!==e.mode&&(n.i18n=n.i18n||(n.__i18nBridge?{}:null),n.i18n?(n.i18n instanceof t||k(n.i18n))&&(this._i18n.subscribeDataChanging(this),this._subscribing=!0):(this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof t||n.parent&&n.parent.$i18n&&n.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,ot))}}),Object.defineProperty(e,"dispose",{value:()=>{t&&t(),s.stop()}});const n={__getInstance:function(e){return l.get(e)||null},__setInstance:function(e,t){l.set(e,t)},__deleteInstance:function(e){l.delete(e)}};return Object.keys(n).forEach((t=>Object.defineProperty(e,t,{value:n[t]}))),e}},e.useI18n=st,Object.defineProperty(e,"__esModule",{value:!0}),e}({},VueDemi); |
/*! | ||
* vue-i18n-bridge v9.3.0-beta.15 | ||
* vue-i18n-bridge v9.3.0-beta.16 | ||
* (c) 2023 kazuya kawaguchi | ||
* Released under the MIT License. | ||
*/ | ||
import{ref,computed,watch,getCurrentInstance,defineComponent,h,effectScope,onBeforeMount,onUnmounted,shallowRef}from"vue-demi";const inBrowser="undefined"!=typeof window,makeSymbol=(e,t=!1)=>t?Symbol.for(e):Symbol(e),generateFormatCacheKey=(e,t,a)=>friendlyJSONstringify({l:e,k:t,s:a}),friendlyJSONstringify=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),isNumber=e=>"number"==typeof e&&isFinite(e),isDate=e=>"[object Date]"===toTypeString(e),isRegExp=e=>"[object RegExp]"===toTypeString(e),isEmptyObject=e=>isPlainObject(e)&&0===Object.keys(e).length;function warn(e,t){"undefined"!=typeof console&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}const assign=Object.assign;function escapeHtml(e){return e.replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}const hasOwnProperty=Object.prototype.hasOwnProperty;function hasOwn(e,t){return hasOwnProperty.call(e,t)}const isArray=Array.isArray,isFunction=e=>"function"==typeof e,isString=e=>"string"==typeof e,isBoolean=e=>"boolean"==typeof e,isObject=e=>null!==e&&"object"==typeof e,objectToString=Object.prototype.toString,toTypeString=e=>objectToString.call(e),isPlainObject=e=>"[object Object]"===toTypeString(e),toDisplayString=e=>null==e?"":isArray(e)||isPlainObject(e)&&e.toString===objectToString?JSON.stringify(e,null,2):String(e),CompileErrorCodes={EXPECTED_TOKEN:1,INVALID_TOKEN_IN_PLACEHOLDER:2,UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER:3,UNKNOWN_ESCAPE_SEQUENCE:4,INVALID_UNICODE_ESCAPE_SEQUENCE:5,UNBALANCED_CLOSING_BRACE:6,UNTERMINATED_CLOSING_BRACE:7,EMPTY_PLACEHOLDER:8,NOT_ALLOW_NEST_PLACEHOLDER:9,INVALID_LINKED_FORMAT:10,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14,__EXTEND_POINT__:15},pathStateMachine=[];pathStateMachine[0]={w:[0],i:[3,0],"[":[4],o:[7]},pathStateMachine[1]={w:[1],".":[2],"[":[4],o:[7]},pathStateMachine[2]={w:[2],i:[3,0],0:[3,0]},pathStateMachine[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},pathStateMachine[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},pathStateMachine[5]={"'":[4,0],o:8,l:[5,0]},pathStateMachine[6]={'"':[4,0],o:8,l:[6,0]};const literalValueRE=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function isLiteral(e){return literalValueRE.test(e)}function stripQuotes(e){const t=e.charCodeAt(0);return t!==e.charCodeAt(e.length-1)||34!==t&&39!==t?e:e.slice(1,-1)}function getPathCharType(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 formatSubPath(e){const t=e.trim();return("0"!==e.charAt(0)||!isNaN(parseInt(e)))&&(isLiteral(t)?stripQuotes(t):"*"+t)}function parse(e){const t=[];let a,n,r,l,o,s,i,c=-1,u=0,m=0;const g=[];function f(){const t=e[c+1];if(5===u&&"'"===t||6===u&&'"'===t)return c++,r="\\"+t,g[0](),!0}for(g[0]=()=>{void 0===n?n=r:n+=r},g[1]=()=>{void 0!==n&&(t.push(n),n=void 0)},g[2]=()=>{g[0](),m++},g[3]=()=>{if(m>0)m--,u=4,g[0]();else{if(m=0,void 0===n)return!1;if(n=formatSubPath(n),!1===n)return!1;g[1]()}};null!==u;)if(c++,a=e[c],"\\"!==a||!f()){if(l=getPathCharType(a),i=pathStateMachine[u],o=i[l]||i.l||8,8===o)return;if(u=o[0],void 0!==o[1]&&(s=g[o[1]],s&&(r=a,!1===s())))return;if(7===u)return t}}const cache=new Map;function resolveWithKeyValue(e,t){return isObject(e)?e[t]:null}function resolveValue(e,t){if(!isObject(e))return null;let a=cache.get(t);if(a||(a=parse(t),a&&cache.set(t,a)),!a)return null;const n=a.length;let r=e,l=0;for(;l<n;){const e=r[a[l]];if(void 0===e)return null;r=e,l++}return r}const DEFAULT_MODIFIER=e=>e,DEFAULT_MESSAGE=e=>"",DEFAULT_MESSAGE_DATA_TYPE="text",DEFAULT_NORMALIZE=e=>0===e.length?"":e.join(""),DEFAULT_INTERPOLATE=toDisplayString;function pluralDefault(e,t){return e=Math.abs(e),2===t?e?e>1?1:0:1:e?Math.min(e,2):0}function getPluralIndex(e){const t=isNumber(e.pluralIndex)?e.pluralIndex:-1;return e.named&&(isNumber(e.named.count)||isNumber(e.named.n))?isNumber(e.named.count)?e.named.count:isNumber(e.named.n)?e.named.n:t:t}function normalizeNamed(e,t){t.count||(t.count=e),t.n||(t.n=e)}function createMessageContext(e={}){const t=e.locale,a=getPluralIndex(e),n=isObject(e.pluralRules)&&isString(t)&&isFunction(e.pluralRules[t])?e.pluralRules[t]:pluralDefault,r=isObject(e.pluralRules)&&isString(t)&&isFunction(e.pluralRules[t])?pluralDefault:void 0,l=e.list||[],o=e.named||{};isNumber(e.pluralIndex)&&normalizeNamed(a,o);function s(t){const a=isFunction(e.messages)?e.messages(t):!!isObject(e.messages)&&e.messages[t];return a||(e.parent?e.parent.message(t):DEFAULT_MESSAGE)}const i=isPlainObject(e.processor)&&isFunction(e.processor.normalize)?e.processor.normalize:DEFAULT_NORMALIZE,c=isPlainObject(e.processor)&&isFunction(e.processor.interpolate)?e.processor.interpolate:DEFAULT_INTERPOLATE,u={list:e=>l[e],named:e=>o[e],plural:e=>e[n(a,e.length,r)],linked:(t,...a)=>{const[n,r]=a;let l="text",o="";1===a.length?isObject(n)?(o=n.modifier||o,l=n.type||l):isString(n)&&(o=n||o):2===a.length&&(isString(n)&&(o=n||o),isString(r)&&(l=r||l));let i=s(t)(u);return"vnode"===l&&isArray(i)&&o&&(i=i[0]),o?(c=o,e.modifiers?e.modifiers[c]:DEFAULT_MODIFIER)(i,l):i;var c},message:s,type:isPlainObject(e.processor)&&isString(e.processor.type)?e.processor.type:"text",interpolate:c,normalize:i};return u}function fallbackWithSimple(e,t,a){return[...new Set([a,...isArray(t)?t:isObject(t)?Object.keys(t):isString(t)?[t]:[a]])]}function fallbackWithLocaleChain(e,t,a){const n=isString(a)?a:DEFAULT_LOCALE,r=e;r.__localeChainCache||(r.__localeChainCache=new Map);let l=r.__localeChainCache.get(n);if(!l){l=[];let e=[a];for(;isArray(e);)e=appendBlockToChain(l,e,t);const o=isArray(t)||!isPlainObject(t)?t:t.default?t.default:null;e=isString(o)?[o]:o,isArray(e)&&appendBlockToChain(l,e,!1),r.__localeChainCache.set(n,l)}return l}function appendBlockToChain(e,t,a){let n=!0;for(let r=0;r<t.length&&isBoolean(n);r++){const l=t[r];isString(l)&&(n=appendLocaleToChain(e,t[r],a))}return n}function appendLocaleToChain(e,t,a){let n;const r=t.split("-");do{n=appendItemToChain(e,r.join("-"),a),r.splice(-1,1)}while(r.length&&!0===n);return n}function appendItemToChain(e,t,a){let n=!1;if(!e.includes(t)&&(n=!0,t)){n="!"!==t[t.length-1];const r=t.replace(/!/g,"");e.push(r),(isArray(a)||isPlainObject(a))&&a[r]&&(n=a[r])}return n}const VERSION$1="9.3.0-beta.15",NOT_REOSLVED=-1,DEFAULT_LOCALE="en-US",MISSING_RESOLVE_VALUE="",capitalize=e=>`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;function getDefaultLinkedModifiers(){return{upper:(e,t)=>"text"===t&&isString(e)?e.toUpperCase():"vnode"===t&&isObject(e)&&"__v_isVNode"in e?e.children.toUpperCase():e,lower:(e,t)=>"text"===t&&isString(e)?e.toLowerCase():"vnode"===t&&isObject(e)&&"__v_isVNode"in e?e.children.toLowerCase():e,capitalize:(e,t)=>"text"===t&&isString(e)?capitalize(e):"vnode"===t&&isObject(e)&&"__v_isVNode"in e?capitalize(e.children):e}}let _compiler,_resolver,_fallbacker;function registerMessageResolver(e){_resolver=e}function registerLocaleFallbacker(e){_fallbacker=e}let _cid=0;function createCoreContext(e={}){const t=isString(e.version)?e.version:VERSION$1,a=isString(e.locale)?e.locale:DEFAULT_LOCALE,n=isArray(e.fallbackLocale)||isPlainObject(e.fallbackLocale)||isString(e.fallbackLocale)||!1===e.fallbackLocale?e.fallbackLocale:a,r=isPlainObject(e.messages)?e.messages:{[a]:{}},l=isPlainObject(e.datetimeFormats)?e.datetimeFormats:{[a]:{}},o=isPlainObject(e.numberFormats)?e.numberFormats:{[a]:{}},s=assign({},e.modifiers||{},getDefaultLinkedModifiers()),i=e.pluralRules||{},c=isFunction(e.missing)?e.missing:null,u=!isBoolean(e.missingWarn)&&!isRegExp(e.missingWarn)||e.missingWarn,m=!isBoolean(e.fallbackWarn)&&!isRegExp(e.fallbackWarn)||e.fallbackWarn,g=!!e.fallbackFormat,f=!!e.unresolving,_=isFunction(e.postTranslation)?e.postTranslation:null,p=isPlainObject(e.processor)?e.processor:null,b=!isBoolean(e.warnHtmlMessage)||e.warnHtmlMessage,d=!!e.escapeParameter,E=isFunction(e.messageCompiler)?e.messageCompiler:_compiler,v=isFunction(e.messageResolver)?e.messageResolver:_resolver||resolveWithKeyValue,O=isFunction(e.localeFallbacker)?e.localeFallbacker:_fallbacker||fallbackWithSimple,h=isObject(e.fallbackContext)?e.fallbackContext:void 0,y=isFunction(e.onWarn)?e.onWarn:warn,N=e,I=isObject(N.__datetimeFormatters)?N.__datetimeFormatters:new Map,S=isObject(N.__numberFormatters)?N.__numberFormatters:new Map,F=isObject(N.__meta)?N.__meta:{};_cid++;const T={version:t,cid:_cid,locale:a,fallbackLocale:n,messages:r,modifiers:s,pluralRules:i,missing:c,missingWarn:u,fallbackWarn:m,fallbackFormat:g,unresolving:f,postTranslation:_,processor:p,warnHtmlMessage:b,escapeParameter:d,messageCompiler:E,messageResolver:v,localeFallbacker:O,fallbackContext:h,onWarn:y,__meta:F};return T.datetimeFormats=l,T.numberFormats=o,T.__datetimeFormatters=I,T.__numberFormatters=S,T}function handleMissing(e,t,a,n,r){const{missing:l,onWarn:o}=e;if(null!==l){const n=l(e,a,t,r);return isString(n)?n:t}return t}function updateFallbackLocale(e,t,a){e.__localeChainCache=new Map,e.localeFallbacker(e,a,t)}let code$1=CompileErrorCodes.__EXTEND_POINT__;const inc$1=()=>++code$1,CoreErrorCodes={INVALID_ARGUMENT:code$1,INVALID_DATE_ARGUMENT:inc$1(),INVALID_ISO_DATE_ARGUMENT:inc$1(),__EXTEND_POINT__:inc$1()},NOOP_MESSAGE_FUNCTION=()=>"",isMessageFunction=e=>isFunction(e);function translate(e,...t){const{fallbackFormat:a,postTranslation:n,unresolving:r,messageCompiler:l,fallbackLocale:o,messages:s}=e,[i,c]=parseTranslateArgs(...t),u=isBoolean(c.missingWarn)?c.missingWarn:e.missingWarn,m=isBoolean(c.fallbackWarn)?c.fallbackWarn:e.fallbackWarn,g=isBoolean(c.escapeParameter)?c.escapeParameter:e.escapeParameter,f=!!c.resolvedMessage,_=isString(c.default)||isBoolean(c.default)?isBoolean(c.default)?l?i:()=>i:c.default:a?l?i:()=>i:"",p=a||""!==_,b=isString(c.locale)?c.locale:e.locale;g&&escapeParams(c);let[d,E,v]=f?[i,b,s[b]||{}]:resolveMessageFormat(e,i,b,o,m,u),O=d,h=i;if(f||isString(O)||isMessageFunction(O)||p&&(O=_,h=O),!(f||(isString(O)||isMessageFunction(O))&&isString(E)))return r?-1:i;let y=!1;const N=isMessageFunction(O)?O:compileMessageFormat(e,i,E,O,h,(()=>{y=!0}));if(y)return O;const I=evaluateMessage(e,N,createMessageContext(getMessageContextOptions(e,E,v,c)));return n?n(I,i):I}function escapeParams(e){isArray(e.list)?e.list=e.list.map((e=>isString(e)?escapeHtml(e):e)):isObject(e.named)&&Object.keys(e.named).forEach((t=>{isString(e.named[t])&&(e.named[t]=escapeHtml(e.named[t]))}))}function resolveMessageFormat(e,t,a,n,r,l){const{messages:o,onWarn:s,messageResolver:i,localeFallbacker:c}=e,u=c(e,n,a);let m,g={},f=null;for(let a=0;a<u.length&&(m=u[a],g=o[m]||{},null===(f=i(g,t))&&(f=g[t]),!isString(f)&&!isFunction(f));a++){const a=handleMissing(e,t,m,l,"translate");a!==t&&(f=a)}return[f,m,g]}function compileMessageFormat(e,t,a,n,r,l){const{messageCompiler:o,warnHtmlMessage:s}=e;if(isMessageFunction(n)){const e=n;return e.locale=e.locale||a,e.key=e.key||t,e}if(null==o){const e=()=>n;return e.locale=a,e.key=t,e}const i=o(n,getCompileOptions(e,a,r,n,s,l));return i.locale=a,i.key=t,i.source=n,i}function evaluateMessage(e,t,a){return t(a)}function parseTranslateArgs(...e){const[t,a,n]=e,r={};if(!isString(t)&&!isNumber(t)&&!isMessageFunction(t))throw Error(CoreErrorCodes.INVALID_ARGUMENT);const l=isNumber(t)?String(t):(isMessageFunction(t),t);return isNumber(a)?r.plural=a:isString(a)?r.default=a:isPlainObject(a)&&!isEmptyObject(a)?r.named=a:isArray(a)&&(r.list=a),isNumber(n)?r.plural=n:isString(n)?r.default=n:isPlainObject(n)&&assign(r,n),[l,r]}function getCompileOptions(e,t,a,n,r,l){return{warnHtmlMessage:r,onError:e=>{throw l&&l(e),e},onCacheKey:e=>generateFormatCacheKey(t,a,e)}}function getMessageContextOptions(e,t,a,n){const{modifiers:r,pluralRules:l,messageResolver:o,fallbackLocale:s,fallbackWarn:i,missingWarn:c,fallbackContext:u}=e,m={locale:t,modifiers:r,pluralRules:l,messages:n=>{let r=o(a,n);if(null==r&&u){const[,,e]=resolveMessageFormat(u,n,t,s,i,c);r=o(e,n)}if(isString(r)){let a=!1;const l=compileMessageFormat(e,n,t,r,n,(()=>{a=!0}));return a?NOOP_MESSAGE_FUNCTION:l}return isMessageFunction(r)?r:NOOP_MESSAGE_FUNCTION}};return e.processor&&(m.processor=e.processor),n.list&&(m.list=n.list),n.named&&(m.named=n.named),isNumber(n.plural)&&(m.pluralIndex=n.plural),m}function datetime(e,...t){const{datetimeFormats:a,unresolving:n,fallbackLocale:r,onWarn:l,localeFallbacker:o}=e,{__datetimeFormatters:s}=e,[i,c,u,m]=parseDateTimeArgs(...t),g=isBoolean(u.missingWarn)?u.missingWarn:e.missingWarn;isBoolean(u.fallbackWarn)?u.fallbackWarn:e.fallbackWarn;const f=!!u.part,_=isString(u.locale)?u.locale:e.locale,p=o(e,r,_);if(!isString(i)||""===i)return new Intl.DateTimeFormat(_,m).format(c);let b,d={},E=null;for(let t=0;t<p.length&&(b=p[t],d=a[b]||{},E=d[i],!isPlainObject(E));t++)handleMissing(e,i,b,g,"datetime format");if(!isPlainObject(E)||!isString(b))return n?-1:i;let v=`${b}__${i}`;isEmptyObject(m)||(v=`${v}__${JSON.stringify(m)}`);let O=s.get(v);return O||(O=new Intl.DateTimeFormat(b,assign({},E,m)),s.set(v,O)),f?O.formatToParts(c):O.format(c)}const DATETIME_FORMAT_OPTIONS_KEYS=["localeMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName","formatMatcher","hour12","timeZone","dateStyle","timeStyle","calendar","dayPeriod","numberingSystem","hourCycle","fractionalSecondDigits"];function parseDateTimeArgs(...e){const[t,a,n,r]=e,l={};let o,s={};if(isString(t)){const e=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!e)throw Error(CoreErrorCodes.INVALID_ISO_DATE_ARGUMENT);const a=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(a);try{o.toISOString()}catch(e){throw Error(CoreErrorCodes.INVALID_ISO_DATE_ARGUMENT)}}else if("[object Date]"===toTypeString(t)){if(isNaN(t.getTime()))throw Error(CoreErrorCodes.INVALID_DATE_ARGUMENT);o=t}else{if(!isNumber(t))throw Error(CoreErrorCodes.INVALID_ARGUMENT);o=t}return isString(a)?l.key=a:isPlainObject(a)&&Object.keys(a).forEach((e=>{DATETIME_FORMAT_OPTIONS_KEYS.includes(e)?s[e]=a[e]:l[e]=a[e]})),isString(n)?l.locale=n:isPlainObject(n)&&(s=n),isPlainObject(r)&&(s=r),[l.key||"",o,l,s]}function clearDateTimeFormat(e,t,a){const n=e;for(const e in a){const a=`${t}__${e}`;n.__datetimeFormatters.has(a)&&n.__datetimeFormatters.delete(a)}}function number(e,...t){const{numberFormats:a,unresolving:n,fallbackLocale:r,onWarn:l,localeFallbacker:o}=e,{__numberFormatters:s}=e,[i,c,u,m]=parseNumberArgs(...t),g=isBoolean(u.missingWarn)?u.missingWarn:e.missingWarn;isBoolean(u.fallbackWarn)?u.fallbackWarn:e.fallbackWarn;const f=!!u.part,_=isString(u.locale)?u.locale:e.locale,p=o(e,r,_);if(!isString(i)||""===i)return new Intl.NumberFormat(_,m).format(c);let b,d={},E=null;for(let t=0;t<p.length&&(b=p[t],d=a[b]||{},E=d[i],!isPlainObject(E));t++)handleMissing(e,i,b,g,"number format");if(!isPlainObject(E)||!isString(b))return n?-1:i;let v=`${b}__${i}`;isEmptyObject(m)||(v=`${v}__${JSON.stringify(m)}`);let O=s.get(v);return O||(O=new Intl.NumberFormat(b,assign({},E,m)),s.set(v,O)),f?O.formatToParts(c):O.format(c)}const NUMBER_FORMAT_OPTIONS_KEYS=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function parseNumberArgs(...e){const[t,a,n,r]=e,l={};let o={};if(!isNumber(t))throw Error(CoreErrorCodes.INVALID_ARGUMENT);const s=t;return isString(a)?l.key=a:isPlainObject(a)&&Object.keys(a).forEach((e=>{NUMBER_FORMAT_OPTIONS_KEYS.includes(e)?o[e]=a[e]:l[e]=a[e]})),isString(n)?l.locale=n:isPlainObject(n)&&(o=n),isPlainObject(r)&&(o=r),[l.key||"",s,l,o]}function clearNumberFormat(e,t,a){const n=e;for(const e in a){const a=`${t}__${e}`;n.__numberFormatters.has(a)&&n.__numberFormatters.delete(a)}}const VERSION="9.3.0-beta.15";let code=CompileErrorCodes.__EXTEND_POINT__;const inc=()=>++code,I18nErrorCodes={UNEXPECTED_RETURN_TYPE:code,INVALID_ARGUMENT:inc(),MUST_BE_CALL_SETUP_TOP:inc(),NOT_INSLALLED:inc(),NOT_AVAILABLE_IN_LEGACY_MODE:inc(),REQUIRED_VALUE:inc(),INVALID_VALUE:inc(),CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:inc(),NOT_INSLALLED_WITH_PROVIDE:inc(),UNEXPECTED_ERROR:inc(),NOT_COMPATIBLE_LEGACY_VUE_I18N:inc(),BRIDGE_SUPPORT_VUE_2_ONLY:inc(),MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION:inc(),NOT_AVAILABLE_COMPOSITION_IN_LEGACY:inc(),__EXTEND_POINT__:inc()},TranslateVNodeSymbol=makeSymbol("__translateVNode"),DatetimePartsSymbol=makeSymbol("__datetimeParts"),NumberPartsSymbol=makeSymbol("__numberParts"),SetPluralRulesSymbol=makeSymbol("__setPluralRules"),LegacyInstanceSymbol=makeSymbol("__legacyVueI18n"),InejctWithOption=makeSymbol("__injectWithOption"),__VUE_I18N_BRIDGE__="__VUE_I18N_BRIDGE__";function isLegacyVueI18n(e){return null!=e&&null!=e.version&&(Number(e.version.split(".")[0])||-1)>=8}function handleFlatJson(e){if(!isObject(e))return e;for(const t in e)if(hasOwn(e,t))if(t.includes(".")){const a=t.split("."),n=a.length-1;let r=e;for(let e=0;e<n;e++)a[e]in r||(r[a[e]]={}),r=r[a[e]];r[a[n]]=e[t],delete e[t],isObject(r[a[n]])&&handleFlatJson(r[a[n]])}else isObject(e[t])&&handleFlatJson(e[t]);return e}function getLocaleMessages(e,t){const{messages:a,__i18n:n,messageResolver:r,flatJson:l}=t,o=isPlainObject(a)?a:isArray(n)?{}:{[e]:{}};if(isArray(n)&&n.forEach((e=>{if("locale"in e&&"resource"in e){const{locale:t,resource:a}=e;t?(o[t]=o[t]||{},deepCopy(a,o[t])):deepCopy(a,o)}else isString(e)&&deepCopy(JSON.parse(e),o)})),null==r&&l)for(const e in o)hasOwn(o,e)&&handleFlatJson(o[e]);return o}const isNotObjectOrIsArray=e=>!isObject(e)||isArray(e);function deepCopy(e,t){if(isNotObjectOrIsArray(e)||isNotObjectOrIsArray(t))throw Error(I18nErrorCodes.INVALID_VALUE);for(const a in e)hasOwn(e,a)&&(isNotObjectOrIsArray(e[a])||isNotObjectOrIsArray(t[a])?t[a]=e[a]:deepCopy(e[a],t[a]))}function getComponentOptions(e){return e.proxy.$options}function adjustI18nResources(e,t,a){let n=isObject(t.messages)?t.messages:{};"__i18nGlobal"in a&&(n=getLocaleMessages(e.locale.value,{messages:n,__i18n:a.__i18nGlobal}));const r=Object.keys(n);if(r.length&&r.forEach((t=>{e.mergeLocaleMessage(t,n[t])})),isObject(t.datetimeFormats)){const a=Object.keys(t.datetimeFormats);a.length&&a.forEach((a=>{e.mergeDateTimeFormat(a,t.datetimeFormats[a])}))}if(isObject(t.numberFormats)){const a=Object.keys(t.numberFormats);a.length&&a.forEach((a=>{e.mergeNumberFormat(a,t.numberFormats[a])}))}}function createTextNode(e){return createVNodeVue2Compatible(e)}function createVNodeVue2Compatible(e){const t=void 0;return{tag:void 0,data:void 0,children:void 0,text:e,elm:void 0,ns:void 0,context:void 0,fnContext:void 0,fnOptions:void 0,fnScopeId:void 0,key:void 0,componentOptions:void 0,componentInstance:t,parent:void 0,raw:!1,isStatic:!1,isRootInsert:!0,isComment:!1,isCloned:!1,isOnce:!1,asyncFactory:void 0,asyncMeta:void 0,isAsyncPlaceholder:!1,child:()=>t}}let composerID=0;function defineCoreMissingHandler(e){return(t,a,n,r)=>e(a,n,getCurrentInstance()||void 0,r)}function createComposer(e={},t){const{__root:a}=e,n=void 0===a;let r=!isBoolean(e.inheritLocale)||e.inheritLocale;const l=ref(a&&r?a.locale.value:isString(e.locale)?e.locale:DEFAULT_LOCALE),o=ref(a&&r?a.fallbackLocale.value:isString(e.fallbackLocale)||isArray(e.fallbackLocale)||isPlainObject(e.fallbackLocale)||!1===e.fallbackLocale?e.fallbackLocale:l.value),s=ref(getLocaleMessages(l.value,e)),i=ref(isPlainObject(e.datetimeFormats)?e.datetimeFormats:{[l.value]:{}}),c=ref(isPlainObject(e.numberFormats)?e.numberFormats:{[l.value]:{}});let u=a?a.missingWarn:!isBoolean(e.missingWarn)&&!isRegExp(e.missingWarn)||e.missingWarn,m=a?a.fallbackWarn:!isBoolean(e.fallbackWarn)&&!isRegExp(e.fallbackWarn)||e.fallbackWarn,g=a?a.fallbackRoot:!isBoolean(e.fallbackRoot)||e.fallbackRoot,f=!!e.fallbackFormat,_=isFunction(e.missing)?e.missing:null,p=isFunction(e.missing)?defineCoreMissingHandler(e.missing):null,b=isFunction(e.postTranslation)?e.postTranslation:null,d=a?a.warnHtmlMessage:!isBoolean(e.warnHtmlMessage)||e.warnHtmlMessage,E=!!e.escapeParameter;const v=a?a.modifiers:isPlainObject(e.modifiers)?e.modifiers:{};let O,h,y=e.pluralRules||a&&a.pluralRules;{isLegacyVueI18n(t);const e={locale:l.value,fallbackLocale:o.value,messages:s.value,dateTimeFormats:i.value,numberFormats:c.value,modifiers:v,missing:_,fallbackRoot:g,postTranslation:b,pluralizationRules:y,escapeParameterHtml:E,sync:r,silentFallbackWarn:isBoolean(m)?!m:m,silentTranslationWarn:isBoolean(u)?!u:u,formatFallbackMessages:isBoolean(f)?!f:f,warnHtmlInMessage:isBoolean(d)&&d?"warn":"off",__VUE_I18N_BRIDGE__:__VUE_I18N_BRIDGE__};O=new t(e)}h=(()=>{const t={version:VERSION,locale:l.value,fallbackLocale:o.value,messages:s.value,modifiers:v,pluralRules:y,missing:null===p?void 0:p,missingWarn:u,fallbackWarn:m,fallbackFormat:f,unresolving:!0,postTranslation:null===b?void 0:b,warnHtmlMessage:d,escapeParameter:E,messageResolver:e.messageResolver,__meta:{framework:"vue"}};t.datetimeFormats=i.value,t.numberFormats=c.value,t.__datetimeFormatters=isPlainObject(h)?h.__datetimeFormatters:void 0,t.__numberFormatters=isPlainObject(h)?h.__numberFormatters:void 0;return createCoreContext(t)})(),updateFallbackLocale(h,l.value,o.value);const N=computed({get:()=>l.value,set:e=>{l.value=e,O&&!n&&(O.locale=e),h.locale=l.value}}),I=computed({get:()=>o.value,set:e=>{o.value=e,O&&!n&&(O.fallbackLocale=e),h.fallbackLocale=o.value,updateFallbackLocale(h,l.value,e)}}),S=computed((()=>s.value)),F=computed((()=>i.value)),T=computed((()=>c.value));const L=(e,t,n,r,u,m)=>{let f;if(l.value,o.value,s.value,i.value,c.value,f=e(h),isNumber(f)&&-1===f){const[e,n]=t();return a&&g?r(a):u(e)}if(m(f))return f;throw Error(I18nErrorCodes.UNEXPECTED_RETURN_TYPE)};function C(...e){return L((t=>Reflect.apply(translate,null,[t,...e])),(()=>parseTranslateArgs(...e)),0,(t=>Reflect.apply(t.t,t,[...e])),(e=>e),(e=>isString(e)))}const k={normalize:function(e){return e.map((e=>isString(e)||isNumber(e)||isBoolean(e)?createTextNode(String(e)):e))},interpolate:e=>e,type:"vnode"};function A(e){return s.value[e]||{}}composerID++,a&&inBrowser&&(watch(a.locale,(e=>{r&&(l.value=e,O&&!n&&(O.locale=e),h.locale=e,updateFallbackLocale(h,l.value,o.value))})),watch(a.fallbackLocale,(e=>{r&&(o.value=e,O&&!n&&(O.fallbackLocale=e),h.fallbackLocale=e,updateFallbackLocale(h,l.value,o.value))})));const M={id:composerID,locale:N,fallbackLocale:I,get inheritLocale(){return r},set inheritLocale(e){r=e,O&&(O._sync=e),e&&a&&(l.value=a.locale.value,o.value=a.fallbackLocale.value,O&&(O.locale=a.locale.value,O.fallbackLocale=a.fallbackLocale.value),updateFallbackLocale(h,l.value,o.value))},get availableLocales(){return Object.keys(s.value).sort()},messages:S,get modifiers(){return v},get pluralRules(){return y||{}},get isGlobal(){return n},get missingWarn(){return u},set missingWarn(e){u=e,h.missingWarn=u},get fallbackWarn(){return m},set fallbackWarn(e){m=e,h.fallbackWarn=m},get fallbackRoot(){return g},set fallbackRoot(e){g=e},get fallbackFormat(){return f},set fallbackFormat(e){f=e,h.fallbackFormat=f},get warnHtmlMessage(){return d},set warnHtmlMessage(e){d=e,h.warnHtmlMessage=e},get escapeParameter(){return E},set escapeParameter(e){E=e,h.escapeParameter=e},t:C,getLocaleMessage:A,setLocaleMessage:function(e,t){s.value[e]=t,O&&O.setLocaleMessage(e,t),h.messages=s.value},mergeLocaleMessage:function(e,t){s.value[e]=s.value[e]||{},O&&O.mergeLocaleMessage(e,t),deepCopy(t,s.value[e]),h.messages=s.value},getPostTranslationHandler:function(){return isFunction(b)?b:null},setPostTranslationHandler:function(e){b=e,h.postTranslation=e},getMissingHandler:function(){return _},setMissingHandler:function(e){null!==e&&(p=defineCoreMissingHandler(e)),_=e,h.missing=p},[SetPluralRulesSymbol]:function(e){y=e,h.pluralRules=y}};return M.datetimeFormats=F,M.numberFormats=T,M.rt=function(...e){const[t,a,n]=e;if(n&&!isObject(n))throw Error(I18nErrorCodes.INVALID_ARGUMENT);return C(t,a,assign({resolvedMessage:!0},n||{}))},M.te=function(e,t){const a=A(isString(t)?t:l.value);return null!==h.messageResolver(a,e)},M.tm=function(e){const t=function(e){let t=null;const a=fallbackWithLocaleChain(h,o.value,l.value);for(let n=0;n<a.length;n++){const r=s.value[a[n]]||{},l=h.messageResolver(r,e);if(null!=l){t=l;break}}return t}(e);return null!=t?t:a&&a.tm(e)||{}},M.d=function(...e){return L((t=>Reflect.apply(datetime,null,[t,...e])),(()=>parseDateTimeArgs(...e)),0,(t=>Reflect.apply(t.d,t,[...e])),(()=>""),(e=>isString(e)))},M.n=function(...e){return L((t=>Reflect.apply(number,null,[t,...e])),(()=>parseNumberArgs(...e)),0,(t=>Reflect.apply(t.n,t,[...e])),(()=>""),(e=>isString(e)))},M.getDateTimeFormat=function(e){return i.value[e]||{}},M.setDateTimeFormat=function(e,t){i.value[e]=t,O&&O.setDateTimeFormat(e,t),h.datetimeFormats=i.value,clearDateTimeFormat(h,e,t)},M.mergeDateTimeFormat=function(e,t){i.value[e]=assign(i.value[e]||{},t),O&&O.mergeDateTimeFormat(e,t),h.datetimeFormats=i.value,clearDateTimeFormat(h,e,t)},M.getNumberFormat=function(e){return c.value[e]||{}},M.setNumberFormat=function(e,t){c.value[e]=t,O&&O.setNumberFormat(e,t),h.numberFormats=c.value,clearNumberFormat(h,e,t)},M.mergeNumberFormat=function(e,t){c.value[e]=assign(c.value[e]||{},t),O&&O.mergeNumberFormat(e,t),h.numberFormats=c.value,clearNumberFormat(h,e,t)},M[InejctWithOption]=e.__injectWithOption,M[TranslateVNodeSymbol]=function(...e){return L((t=>{let a;const n=t;try{n.processor=k,a=Reflect.apply(translate,null,[n,...e])}finally{n.processor=null}return a}),(()=>parseTranslateArgs(...e)),0,(t=>t[TranslateVNodeSymbol](...e)),(e=>[createTextNode(e)]),(e=>isArray(e)))},M[DatetimePartsSymbol]=function(...e){return L((t=>Reflect.apply(datetime,null,[t,...e])),(()=>parseDateTimeArgs(...e)),0,(t=>t[DatetimePartsSymbol](...e)),(()=>[]),(e=>isString(e)||isArray(e)))},M[NumberPartsSymbol]=function(...e){return L((t=>Reflect.apply(number,null,[t,...e])),(()=>parseNumberArgs(...e)),0,(t=>t[NumberPartsSymbol](...e)),(()=>[]),(e=>isString(e)||isArray(e)))},M[LegacyInstanceSymbol]=O,M}const baseFormatProps={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>"parent"===e||"global"===e,default:"parent"},i18n:{type:Object}};function getInterpolateArg({slots:e},t){if(1===t.length&&"default"===t[0]){return(e.default?e.default():[]).reduce(((e,t)=>[...e,...t.children?t.children:[t]]),[])}return t.reduce(((t,a)=>{const n=e[a];return n&&(t[a]=n()),t}),{})}function getFragmentableTag(e){return e}const TranslationImpl=defineComponent({name:"i18n-t",props:assign({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>isNumber(e)||!isNaN(e)}},baseFormatProps),setup(e,t){const{slots:a,attrs:n}=t,r=e.i18n||useI18n({useScope:e.scope,__useComponent:!0});return()=>{const l=Object.keys(a).filter((e=>"_"!==e)),o={};e.locale&&(o.locale=e.locale),void 0!==e.plural&&(o.plural=isString(e.plural)?+e.plural:e.plural);const s=getInterpolateArg(t,l),i=r[TranslateVNodeSymbol](e.keypath,s,o),c=assign({},n),u=isString(e.tag)||isObject(e.tag)?e.tag:getFragmentableTag("span");return h(u,c,i)}}}),Translation=TranslationImpl,I18nT=Translation;function isVNode(e){return isArray(e)&&!isString(e[0])}function renderFormatter(e,t,a,n){const{slots:r,attrs:l}=t;return()=>{const t={part:!0};let o={};e.locale&&(t.locale=e.locale),isString(e.format)?t.key=e.format:isObject(e.format)&&(isString(e.format.key)&&(t.key=e.format.key),o=Object.keys(e.format).reduce(((t,n)=>a.includes(n)?assign({},t,{[n]:e.format[n]}):t),{}));const s=n(e.value,t,o);let i=[t.key];isArray(s)?i=s.map(((e,t)=>{const a=r[e.type],n=a?a({[e.type]:e.value,index:t,parts:s}):[e.value];return isVNode(n)&&(n[0].key=`${e.type}-${t}`),n})):isString(s)&&(i=[s]);const c=assign({},l),u=isString(e.tag)||isObject(e.tag)?e.tag:getFragmentableTag("span");return h(u,c,i)}}const NumberFormatImpl=defineComponent({name:"i18n-n",props:assign({value:{type:Number,required:!0},format:{type:[String,Object]}},baseFormatProps),setup(e,t){const a=e.i18n||useI18n({useScope:"parent",__useComponent:!0});return renderFormatter(e,t,NUMBER_FORMAT_OPTIONS_KEYS,((...e)=>a[NumberPartsSymbol](...e)))}}),NumberFormat=NumberFormatImpl,I18nN=NumberFormat,DatetimeFormatImpl=defineComponent({name:"i18n-d",props:assign({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},baseFormatProps),setup(e,t){const a=e.i18n||useI18n({useScope:"parent",__useComponent:!0});return renderFormatter(e,t,DATETIME_FORMAT_OPTIONS_KEYS,((...e)=>a[DatetimePartsSymbol](...e)))}}),DatetimeFormat=DatetimeFormatImpl,I18nD=DatetimeFormat;function apply(e,...t){const a=isPlainObject(t[0])?t[0]:{};(!isBoolean(a.globalInstall)||a.globalInstall)&&(e.component(Translation.name,Translation),e.component(NumberFormat.name,NumberFormat),e.component(DatetimeFormat.name,DatetimeFormat))}function defineMixin(e,t){return{beforeCreate(){const a=this.$options;if(!a.__VUE18N__INSTANCE__)if(a.i18n=a.i18n||(a.__i18nBridge?{}:null),this._i18nBridgeRoot=e,"composition"!==e.mode)if(a.i18n){if(a.i18n instanceof t){if(a.__i18nBridge)try{const e=a.i18n&&a.i18n.messages?a.i18n.messages:{};a.__i18nBridge.forEach((t=>deepCopy(JSON.parse(t),e))),Object.keys(e).forEach((t=>{a.i18n.mergeLocaleMessage(t,e[t])}))}catch(e){}this._i18n=a.i18n,this._i18nWatcher=this._i18n.watchI18nData()}else if(isPlainObject(a.i18n)){const e=this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof t?this.$root.$i18n:null;if(e&&(a.i18n.root=this.$root,a.i18n.formatter=e.formatter,a.i18n.fallbackLocale=e.fallbackLocale,a.i18n.formatFallbackMessages=e.formatFallbackMessages,a.i18n.silentTranslationWarn=e.silentTranslationWarn,a.i18n.silentFallbackWarn=e.silentFallbackWarn,a.i18n.pluralizationRules=e.pluralizationRules,a.i18n.preserveDirectiveContent=e.preserveDirectiveContent),a.__i18nBridge)try{const e=a.i18n&&a.i18n.messages?a.i18n.messages:{};a.__i18nBridge.forEach((t=>deepCopy(JSON.parse(t),e))),a.i18n.messages=e}catch(e){}const{sharedMessages:n}=a.i18n;n&&isPlainObject(n)&&deepCopy(n,a.i18n.messages),this._i18n=new t(a.i18n),this._i18nWatcher=this._i18n.watchI18nData(),(void 0===a.i18n.sync||a.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:a.parent&&a.parent.$i18n&&a.parent.$i18n instanceof t&&(this._i18n=a.parent.$i18n);else this._i18n=e},beforeMount(){const a=this.$options;a.__VUE18N__INSTANCE__||"composition"!==e.mode&&(a.i18n=a.i18n||(a.__i18nBridge?{}:null),a.i18n?(a.i18n instanceof t||isPlainObject(a.i18n))&&(this._i18n.subscribeDataChanging(this),this._subscribing=!0):(this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof t||a.parent&&a.parent.$i18n&&a.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)}))}}}let _legacyVueI18n=null;const I18nInjectionKey=makeSymbol("global-vue-i18n");function createI18n(e={},t){_legacyVueI18n=t;const a=!isBoolean(e.legacy)||e.legacy,n=!isBoolean(e.globalInjection)||e.globalInjection,r=!a||!!e.allowComposition,l=new Map,[o,s]=createGlobal(e,a,t);{const e=s[LegacyInstanceSymbol];let t=null;Object.defineProperty(e,"global",{get:()=>s}),Object.defineProperty(e,"mode",{get:()=>a?"legacy":"composition"}),Object.defineProperty(e,"allowComposition",{get:()=>r}),Object.defineProperty(e,"__instances",{get:()=>l}),Object.defineProperty(e,"install",{writable:!0,value:(r,...l)=>{if(2!==(r&&r.version&&Number(r.version.split(".")[0])||-1))throw Error(I18nErrorCodes.BRIDGE_SUPPORT_VUE_2_ONLY);apply(r,...l),!a&&n&&(t=injectGlobalFieldsForBridge(r,e,s)),r.mixin(defineMixin(e,_legacyVueI18n))}}),Object.defineProperty(e,"dispose",{value:()=>{t&&t(),o.stop()}});const i={__getInstance:function(e){return l.get(e)||null},__setInstance:function(e,t){l.set(e,t)},__deleteInstance:function(e){l.delete(e)}};return Object.keys(i).forEach((t=>Object.defineProperty(e,t,{value:i[t]}))),e}}function useI18n(e={}){const t=getCurrentInstance();if(null==t)throw Error(I18nErrorCodes.MUST_BE_CALL_SETUP_TOP);if(null==_legacyVueI18n)throw Error(I18nErrorCodes.NOT_INSLALLED);const a=getI18nInstance(t),n=getGlobalComposer(a),r=getComponentOptions(t),l=getScope(e,r);if("legacy"===a.mode&&!e.__useComponent){if(!a.allowComposition)throw Error(I18nErrorCodes.NOT_AVAILABLE_IN_LEGACY_MODE);return useI18nForLegacy(t,l,n,e)}if("global"===l)return adjustI18nResources(n,e,r),n;if("parent"===l){let r=getComposer(a,t,e.__useComponent);return null==r&&(r=n),r}const o=a;let s=o.__getInstance(t);if(null==s){const a=assign({},e);"__i18n"in r&&(a.__i18n=r.__i18n),n&&(a.__root=n),s=createComposer(a,_legacyVueI18n),o.__composerExtend&&o.__composerExtend(s),setupLifeCycle(o,t,s),o.__setInstance(t,s)}return s}const castToVueI18n=e=>{if(!(__VUE_I18N_BRIDGE__ in e))throw Error(I18nErrorCodes.NOT_COMPATIBLE_LEGACY_VUE_I18N);return e};function createGlobal(e,t,a){const n=effectScope();{if(!isLegacyVueI18n(a))throw Error(I18nErrorCodes.NOT_COMPATIBLE_LEGACY_VUE_I18N);const t=n.run((()=>createComposer(e,a)));if(null==t)throw Error(I18nErrorCodes.UNEXPECTED_ERROR);return[n,t]}}function getI18nInstance(e){{const t=e.proxy;if(null==t)throw Error(I18nErrorCodes.UNEXPECTED_ERROR);const a=t._i18nBridgeRoot;if(!a)throw Error(I18nErrorCodes.NOT_INSLALLED);return a}}function getScope(e,t){return isEmptyObject(e)?"__i18n"in t?"local":"global":e.useScope?e.useScope:"local"}function getGlobalComposer(e){return e.global}function getComposer(e,t,a=!1){let n=null;const r=t.root;let l=t.parent;for(;null!=l;){const t=e;if("composition"===e.mode)n=t.__getInstance(l);else{const e=t.__getInstance(l);null!=e&&(n=e.__composer,a&&n&&!n[InejctWithOption]&&(n=null))}if(null!=n)break;if(r===l)break;l=l.parent}return n}function setupLifeCycle(e,t,a){{const n=t.proxy;if(null==n)throw Error(I18nErrorCodes.UNEXPECTED_ERROR);const r=a[LegacyInstanceSymbol];if(r===e)throw Error(I18nErrorCodes.UNEXPECTED_ERROR);n._i18n=r,n._i18n_bridge=!0,inBrowser&&(n._i18nWatcher=n._i18n.watchI18nData(),n._i18n._sync&&(n._localeWatcher=n._i18n.watchLocale()));let l=!1;onBeforeMount((()=>{n._i18n.subscribeDataChanging(n),l=!0})),onUnmounted((()=>{l&&(n._i18n.unsubscribeDataChanging(n),l=!1),n._i18nWatcher&&(n._i18nWatcher(),n._i18n.destroyVM(),delete n._i18nWatcher),n._localeWatcher&&(n._localeWatcher(),delete n._localeWatcher),delete n._i18n_bridge,delete n._i18n}))}}function useI18nForLegacy(e,t,a,n={}){const r="local"===t,l=shallowRef(null);if(r&&e.proxy&&!e.proxy.$options.i18n&&!e.proxy.$options.__i18n)throw Error(I18nErrorCodes.MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION);const o=!isBoolean(n.inheritLocale)||n.inheritLocale,s=ref(r&&o?a.locale.value:isString(n.locale)?n.locale:DEFAULT_LOCALE),i=ref(r&&o?a.fallbackLocale.value:isString(n.fallbackLocale)||isArray(n.fallbackLocale)||isPlainObject(n.fallbackLocale)||!1===n.fallbackLocale?n.fallbackLocale:s.value),c=ref(getLocaleMessages(s.value,n)),u=ref(isPlainObject(n.datetimeFormats)?n.datetimeFormats:{[s.value]:{}}),m=ref(isPlainObject(n.numberFormats)?n.numberFormats:{[s.value]:{}}),g=r?a.missingWarn:!isBoolean(n.missingWarn)&&!isRegExp(n.missingWarn)||n.missingWarn,f=r?a.fallbackWarn:!isBoolean(n.fallbackWarn)&&!isRegExp(n.fallbackWarn)||n.fallbackWarn,_=r?a.fallbackRoot:!isBoolean(n.fallbackRoot)||n.fallbackRoot,p=!!n.fallbackFormat,b=isFunction(n.missing)?n.missing:null,d=isFunction(n.postTranslation)?n.postTranslation:null,E=r?a.warnHtmlMessage:!isBoolean(n.warnHtmlMessage)||n.warnHtmlMessage,v=!!n.escapeParameter,O=r?a.modifiers:isPlainObject(n.modifiers)?n.modifiers:{},h=n.pluralRules||r&&a.pluralRules;function y(e){return s.value,i.value,c.value,u.value,m.value,e()}const N={get id(){return l.value?l.value.id:-1},locale:computed({get:()=>l.value?l.value.locale.value:s.value,set:e=>{l.value&&(l.value.locale.value=e),s.value=e}}),fallbackLocale:computed({get:()=>l.value?l.value.fallbackLocale.value:i.value,set:e=>{l.value&&(l.value.fallbackLocale.value=e),i.value=e}}),messages:computed((()=>l.value?l.value.messages.value:c.value)),datetimeFormats:computed((()=>u.value)),numberFormats:computed((()=>m.value)),get inheritLocale(){return l.value?l.value.inheritLocale:o},set inheritLocale(e){l.value&&(l.value.inheritLocale=e)},get availableLocales(){return l.value?l.value.availableLocales:Object.keys(c.value)},get modifiers(){return l.value?l.value.modifiers:O},get pluralRules(){return l.value?l.value.pluralRules:h},get isGlobal(){return!!l.value&&l.value.isGlobal},get missingWarn(){return l.value?l.value.missingWarn:g},set missingWarn(e){l.value&&(l.value.missingWarn=e)},get fallbackWarn(){return l.value?l.value.fallbackWarn:f},set fallbackWarn(e){l.value&&(l.value.missingWarn=e)},get fallbackRoot(){return l.value?l.value.fallbackRoot:_},set fallbackRoot(e){l.value&&(l.value.fallbackRoot=e)},get fallbackFormat(){return l.value?l.value.fallbackFormat:p},set fallbackFormat(e){l.value&&(l.value.fallbackFormat=e)},get warnHtmlMessage(){return l.value?l.value.warnHtmlMessage:E},set warnHtmlMessage(e){l.value&&(l.value.warnHtmlMessage=e)},get escapeParameter(){return l.value?l.value.escapeParameter:v},set escapeParameter(e){l.value&&(l.value.escapeParameter=e)},t:function(...e){return l.value?y((()=>Reflect.apply(l.value.t,null,[...e]))):y((()=>""))},getPostTranslationHandler:function(){return l.value?l.value.getPostTranslationHandler():d},setPostTranslationHandler:function(e){l.value&&l.value.setPostTranslationHandler(e)},getMissingHandler:function(){return l.value?l.value.getMissingHandler():b},setMissingHandler:function(e){l.value&&l.value.setMissingHandler(e)},rt:function(...e){return l.value?Reflect.apply(l.value.rt,null,[...e]):""},d:function(...e){return l.value?y((()=>Reflect.apply(l.value.d,null,[...e]))):y((()=>""))},n:function(...e){return l.value?y((()=>Reflect.apply(l.value.n,null,[...e]))):y((()=>""))},tm:function(e){return l.value?l.value.tm(e):{}},te:function(e,t){return!!l.value&&l.value.te(e,t)},getLocaleMessage:function(e){return l.value?l.value.getLocaleMessage(e):{}},setLocaleMessage:function(e,t){l.value&&(l.value.setLocaleMessage(e,t),c.value[e]=t)},mergeLocaleMessage:function(e,t){l.value&&l.value.mergeLocaleMessage(e,t)},getDateTimeFormat:function(e){return l.value?l.value.getDateTimeFormat(e):{}},setDateTimeFormat:function(e,t){l.value&&(l.value.setDateTimeFormat(e,t),u.value[e]=t)},mergeDateTimeFormat:function(e,t){l.value&&l.value.mergeDateTimeFormat(e,t)},getNumberFormat:function(e){return l.value?l.value.getNumberFormat(e):{}},setNumberFormat:function(e,t){l.value&&(l.value.setNumberFormat(e,t),m.value[e]=t)},mergeNumberFormat:function(e,t){l.value&&l.value.mergeNumberFormat(e,t)}};return onBeforeMount((()=>{if(null==e.proxy||null==e.proxy.$i18n)throw Error(I18nErrorCodes.NOT_AVAILABLE_COMPOSITION_IN_LEGACY);const a=l.value=e.proxy.$i18n.__composer;"global"===t?(s.value=a.locale.value,i.value=a.fallbackLocale.value,c.value=a.messages.value,u.value=a.datetimeFormats.value,m.value=a.numberFormats.value):r&&function(e){e.locale.value=s.value,e.fallbackLocale.value=i.value,Object.keys(c.value).forEach((t=>{e.mergeLocaleMessage(t,c.value[t])})),Object.keys(u.value).forEach((t=>{e.mergeDateTimeFormat(t,u.value[t])})),Object.keys(m.value).forEach((t=>{e.mergeNumberFormat(t,m.value[t])})),e.escapeParameter=v,e.fallbackFormat=p,e.fallbackRoot=_,e.fallbackWarn=f,e.missingWarn=g,e.warnHtmlMessage=E}(a)})),N}function injectGlobalFieldsForBridge(e,t,a){const n=t.watchLocale(a);return e.prototype.$t=function(...e){return Reflect.apply(a.t,a,[...e])},e.prototype.$d=function(...e){return Reflect.apply(a.d,a,[...e])},e.prototype.$n=function(...e){return Reflect.apply(a.n,a,[...e])},n}registerMessageResolver(resolveValue),registerLocaleFallbacker(fallbackWithLocaleChain);export{DatetimeFormat,I18nD,I18nInjectionKey,I18nN,I18nT,NumberFormat,Translation,VERSION,castToVueI18n,createI18n,useI18n}; | ||
import{ref,computed,watch,getCurrentInstance,defineComponent,h,effectScope,onBeforeMount,onUnmounted,shallowRef}from"vue-demi";const inBrowser="undefined"!=typeof window,makeSymbol=(e,t=!1)=>t?Symbol.for(e):Symbol(e),generateFormatCacheKey=(e,t,a)=>friendlyJSONstringify({l:e,k:t,s:a}),friendlyJSONstringify=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),isNumber=e=>"number"==typeof e&&isFinite(e),isDate=e=>"[object Date]"===toTypeString(e),isRegExp=e=>"[object RegExp]"===toTypeString(e),isEmptyObject=e=>isPlainObject(e)&&0===Object.keys(e).length;function warn(e,t){"undefined"!=typeof console&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}const assign=Object.assign;function escapeHtml(e){return e.replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}const hasOwnProperty=Object.prototype.hasOwnProperty;function hasOwn(e,t){return hasOwnProperty.call(e,t)}const isArray=Array.isArray,isFunction=e=>"function"==typeof e,isString=e=>"string"==typeof e,isBoolean=e=>"boolean"==typeof e,isObject=e=>null!==e&&"object"==typeof e,objectToString=Object.prototype.toString,toTypeString=e=>objectToString.call(e),isPlainObject=e=>"[object Object]"===toTypeString(e),toDisplayString=e=>null==e?"":isArray(e)||isPlainObject(e)&&e.toString===objectToString?JSON.stringify(e,null,2):String(e),CompileErrorCodes={EXPECTED_TOKEN:1,INVALID_TOKEN_IN_PLACEHOLDER:2,UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER:3,UNKNOWN_ESCAPE_SEQUENCE:4,INVALID_UNICODE_ESCAPE_SEQUENCE:5,UNBALANCED_CLOSING_BRACE:6,UNTERMINATED_CLOSING_BRACE:7,EMPTY_PLACEHOLDER:8,NOT_ALLOW_NEST_PLACEHOLDER:9,INVALID_LINKED_FORMAT:10,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14,__EXTEND_POINT__:15},pathStateMachine=[];pathStateMachine[0]={w:[0],i:[3,0],"[":[4],o:[7]},pathStateMachine[1]={w:[1],".":[2],"[":[4],o:[7]},pathStateMachine[2]={w:[2],i:[3,0],0:[3,0]},pathStateMachine[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},pathStateMachine[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},pathStateMachine[5]={"'":[4,0],o:8,l:[5,0]},pathStateMachine[6]={'"':[4,0],o:8,l:[6,0]};const literalValueRE=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function isLiteral(e){return literalValueRE.test(e)}function stripQuotes(e){const t=e.charCodeAt(0);return t!==e.charCodeAt(e.length-1)||34!==t&&39!==t?e:e.slice(1,-1)}function getPathCharType(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 formatSubPath(e){const t=e.trim();return("0"!==e.charAt(0)||!isNaN(parseInt(e)))&&(isLiteral(t)?stripQuotes(t):"*"+t)}function parse(e){const t=[];let a,n,r,l,o,s,i,c=-1,u=0,m=0;const g=[];function f(){const t=e[c+1];if(5===u&&"'"===t||6===u&&'"'===t)return c++,r="\\"+t,g[0](),!0}for(g[0]=()=>{void 0===n?n=r:n+=r},g[1]=()=>{void 0!==n&&(t.push(n),n=void 0)},g[2]=()=>{g[0](),m++},g[3]=()=>{if(m>0)m--,u=4,g[0]();else{if(m=0,void 0===n)return!1;if(n=formatSubPath(n),!1===n)return!1;g[1]()}};null!==u;)if(c++,a=e[c],"\\"!==a||!f()){if(l=getPathCharType(a),i=pathStateMachine[u],o=i[l]||i.l||8,8===o)return;if(u=o[0],void 0!==o[1]&&(s=g[o[1]],s&&(r=a,!1===s())))return;if(7===u)return t}}const cache=new Map;function resolveWithKeyValue(e,t){return isObject(e)?e[t]:null}function resolveValue(e,t){if(!isObject(e))return null;let a=cache.get(t);if(a||(a=parse(t),a&&cache.set(t,a)),!a)return null;const n=a.length;let r=e,l=0;for(;l<n;){const e=r[a[l]];if(void 0===e)return null;r=e,l++}return r}const DEFAULT_MODIFIER=e=>e,DEFAULT_MESSAGE=e=>"",DEFAULT_MESSAGE_DATA_TYPE="text",DEFAULT_NORMALIZE=e=>0===e.length?"":e.join(""),DEFAULT_INTERPOLATE=toDisplayString;function pluralDefault(e,t){return e=Math.abs(e),2===t?e?e>1?1:0:1:e?Math.min(e,2):0}function getPluralIndex(e){const t=isNumber(e.pluralIndex)?e.pluralIndex:-1;return e.named&&(isNumber(e.named.count)||isNumber(e.named.n))?isNumber(e.named.count)?e.named.count:isNumber(e.named.n)?e.named.n:t:t}function normalizeNamed(e,t){t.count||(t.count=e),t.n||(t.n=e)}function createMessageContext(e={}){const t=e.locale,a=getPluralIndex(e),n=isObject(e.pluralRules)&&isString(t)&&isFunction(e.pluralRules[t])?e.pluralRules[t]:pluralDefault,r=isObject(e.pluralRules)&&isString(t)&&isFunction(e.pluralRules[t])?pluralDefault:void 0,l=e.list||[],o=e.named||{};isNumber(e.pluralIndex)&&normalizeNamed(a,o);function s(t){const a=isFunction(e.messages)?e.messages(t):!!isObject(e.messages)&&e.messages[t];return a||(e.parent?e.parent.message(t):DEFAULT_MESSAGE)}const i=isPlainObject(e.processor)&&isFunction(e.processor.normalize)?e.processor.normalize:DEFAULT_NORMALIZE,c=isPlainObject(e.processor)&&isFunction(e.processor.interpolate)?e.processor.interpolate:DEFAULT_INTERPOLATE,u={list:e=>l[e],named:e=>o[e],plural:e=>e[n(a,e.length,r)],linked:(t,...a)=>{const[n,r]=a;let l="text",o="";1===a.length?isObject(n)?(o=n.modifier||o,l=n.type||l):isString(n)&&(o=n||o):2===a.length&&(isString(n)&&(o=n||o),isString(r)&&(l=r||l));let i=s(t)(u);return"vnode"===l&&isArray(i)&&o&&(i=i[0]),o?(c=o,e.modifiers?e.modifiers[c]:DEFAULT_MODIFIER)(i,l):i;var c},message:s,type:isPlainObject(e.processor)&&isString(e.processor.type)?e.processor.type:"text",interpolate:c,normalize:i};return u}function fallbackWithSimple(e,t,a){return[...new Set([a,...isArray(t)?t:isObject(t)?Object.keys(t):isString(t)?[t]:[a]])]}function fallbackWithLocaleChain(e,t,a){const n=isString(a)?a:DEFAULT_LOCALE,r=e;r.__localeChainCache||(r.__localeChainCache=new Map);let l=r.__localeChainCache.get(n);if(!l){l=[];let e=[a];for(;isArray(e);)e=appendBlockToChain(l,e,t);const o=isArray(t)||!isPlainObject(t)?t:t.default?t.default:null;e=isString(o)?[o]:o,isArray(e)&&appendBlockToChain(l,e,!1),r.__localeChainCache.set(n,l)}return l}function appendBlockToChain(e,t,a){let n=!0;for(let r=0;r<t.length&&isBoolean(n);r++){const l=t[r];isString(l)&&(n=appendLocaleToChain(e,t[r],a))}return n}function appendLocaleToChain(e,t,a){let n;const r=t.split("-");do{n=appendItemToChain(e,r.join("-"),a),r.splice(-1,1)}while(r.length&&!0===n);return n}function appendItemToChain(e,t,a){let n=!1;if(!e.includes(t)&&(n=!0,t)){n="!"!==t[t.length-1];const r=t.replace(/!/g,"");e.push(r),(isArray(a)||isPlainObject(a))&&a[r]&&(n=a[r])}return n}const VERSION$1="9.3.0-beta.16",NOT_REOSLVED=-1,DEFAULT_LOCALE="en-US",MISSING_RESOLVE_VALUE="",capitalize=e=>`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;function getDefaultLinkedModifiers(){return{upper:(e,t)=>"text"===t&&isString(e)?e.toUpperCase():"vnode"===t&&isObject(e)&&"__v_isVNode"in e?e.children.toUpperCase():e,lower:(e,t)=>"text"===t&&isString(e)?e.toLowerCase():"vnode"===t&&isObject(e)&&"__v_isVNode"in e?e.children.toLowerCase():e,capitalize:(e,t)=>"text"===t&&isString(e)?capitalize(e):"vnode"===t&&isObject(e)&&"__v_isVNode"in e?capitalize(e.children):e}}let _compiler,_resolver,_fallbacker;function registerMessageResolver(e){_resolver=e}function registerLocaleFallbacker(e){_fallbacker=e}let _cid=0;function createCoreContext(e={}){const t=isString(e.version)?e.version:VERSION$1,a=isString(e.locale)?e.locale:DEFAULT_LOCALE,n=isArray(e.fallbackLocale)||isPlainObject(e.fallbackLocale)||isString(e.fallbackLocale)||!1===e.fallbackLocale?e.fallbackLocale:a,r=isPlainObject(e.messages)?e.messages:{[a]:{}},l=isPlainObject(e.datetimeFormats)?e.datetimeFormats:{[a]:{}},o=isPlainObject(e.numberFormats)?e.numberFormats:{[a]:{}},s=assign({},e.modifiers||{},getDefaultLinkedModifiers()),i=e.pluralRules||{},c=isFunction(e.missing)?e.missing:null,u=!isBoolean(e.missingWarn)&&!isRegExp(e.missingWarn)||e.missingWarn,m=!isBoolean(e.fallbackWarn)&&!isRegExp(e.fallbackWarn)||e.fallbackWarn,g=!!e.fallbackFormat,f=!!e.unresolving,_=isFunction(e.postTranslation)?e.postTranslation:null,p=isPlainObject(e.processor)?e.processor:null,b=!isBoolean(e.warnHtmlMessage)||e.warnHtmlMessage,d=!!e.escapeParameter,E=isFunction(e.messageCompiler)?e.messageCompiler:_compiler,v=isFunction(e.messageResolver)?e.messageResolver:_resolver||resolveWithKeyValue,O=isFunction(e.localeFallbacker)?e.localeFallbacker:_fallbacker||fallbackWithSimple,h=isObject(e.fallbackContext)?e.fallbackContext:void 0,y=isFunction(e.onWarn)?e.onWarn:warn,N=e,I=isObject(N.__datetimeFormatters)?N.__datetimeFormatters:new Map,S=isObject(N.__numberFormatters)?N.__numberFormatters:new Map,F=isObject(N.__meta)?N.__meta:{};_cid++;const T={version:t,cid:_cid,locale:a,fallbackLocale:n,messages:r,modifiers:s,pluralRules:i,missing:c,missingWarn:u,fallbackWarn:m,fallbackFormat:g,unresolving:f,postTranslation:_,processor:p,warnHtmlMessage:b,escapeParameter:d,messageCompiler:E,messageResolver:v,localeFallbacker:O,fallbackContext:h,onWarn:y,__meta:F};return T.datetimeFormats=l,T.numberFormats=o,T.__datetimeFormatters=I,T.__numberFormatters=S,T}function handleMissing(e,t,a,n,r){const{missing:l,onWarn:o}=e;if(null!==l){const n=l(e,a,t,r);return isString(n)?n:t}return t}function updateFallbackLocale(e,t,a){e.__localeChainCache=new Map,e.localeFallbacker(e,a,t)}let code$1=CompileErrorCodes.__EXTEND_POINT__;const inc$1=()=>++code$1,CoreErrorCodes={INVALID_ARGUMENT:code$1,INVALID_DATE_ARGUMENT:inc$1(),INVALID_ISO_DATE_ARGUMENT:inc$1(),__EXTEND_POINT__:inc$1()},NOOP_MESSAGE_FUNCTION=()=>"",isMessageFunction=e=>isFunction(e);function translate(e,...t){const{fallbackFormat:a,postTranslation:n,unresolving:r,messageCompiler:l,fallbackLocale:o,messages:s}=e,[i,c]=parseTranslateArgs(...t),u=isBoolean(c.missingWarn)?c.missingWarn:e.missingWarn,m=isBoolean(c.fallbackWarn)?c.fallbackWarn:e.fallbackWarn,g=isBoolean(c.escapeParameter)?c.escapeParameter:e.escapeParameter,f=!!c.resolvedMessage,_=isString(c.default)||isBoolean(c.default)?isBoolean(c.default)?l?i:()=>i:c.default:a?l?i:()=>i:"",p=a||""!==_,b=isString(c.locale)?c.locale:e.locale;g&&escapeParams(c);let[d,E,v]=f?[i,b,s[b]||{}]:resolveMessageFormat(e,i,b,o,m,u),O=d,h=i;if(f||isString(O)||isMessageFunction(O)||p&&(O=_,h=O),!(f||(isString(O)||isMessageFunction(O))&&isString(E)))return r?-1:i;let y=!1;const N=isMessageFunction(O)?O:compileMessageFormat(e,i,E,O,h,(()=>{y=!0}));if(y)return O;const I=evaluateMessage(e,N,createMessageContext(getMessageContextOptions(e,E,v,c)));return n?n(I,i):I}function escapeParams(e){isArray(e.list)?e.list=e.list.map((e=>isString(e)?escapeHtml(e):e)):isObject(e.named)&&Object.keys(e.named).forEach((t=>{isString(e.named[t])&&(e.named[t]=escapeHtml(e.named[t]))}))}function resolveMessageFormat(e,t,a,n,r,l){const{messages:o,onWarn:s,messageResolver:i,localeFallbacker:c}=e,u=c(e,n,a);let m,g={},f=null;for(let a=0;a<u.length&&(m=u[a],g=o[m]||{},null===(f=i(g,t))&&(f=g[t]),!isString(f)&&!isFunction(f));a++){const a=handleMissing(e,t,m,l,"translate");a!==t&&(f=a)}return[f,m,g]}function compileMessageFormat(e,t,a,n,r,l){const{messageCompiler:o,warnHtmlMessage:s}=e;if(isMessageFunction(n)){const e=n;return e.locale=e.locale||a,e.key=e.key||t,e}if(null==o){const e=()=>n;return e.locale=a,e.key=t,e}const i=o(n,getCompileOptions(e,a,r,n,s,l));return i.locale=a,i.key=t,i.source=n,i}function evaluateMessage(e,t,a){return t(a)}function parseTranslateArgs(...e){const[t,a,n]=e,r={};if(!isString(t)&&!isNumber(t)&&!isMessageFunction(t))throw Error(CoreErrorCodes.INVALID_ARGUMENT);const l=isNumber(t)?String(t):(isMessageFunction(t),t);return isNumber(a)?r.plural=a:isString(a)?r.default=a:isPlainObject(a)&&!isEmptyObject(a)?r.named=a:isArray(a)&&(r.list=a),isNumber(n)?r.plural=n:isString(n)?r.default=n:isPlainObject(n)&&assign(r,n),[l,r]}function getCompileOptions(e,t,a,n,r,l){return{warnHtmlMessage:r,onError:e=>{throw l&&l(e),e},onCacheKey:e=>generateFormatCacheKey(t,a,e)}}function getMessageContextOptions(e,t,a,n){const{modifiers:r,pluralRules:l,messageResolver:o,fallbackLocale:s,fallbackWarn:i,missingWarn:c,fallbackContext:u}=e,m={locale:t,modifiers:r,pluralRules:l,messages:n=>{let r=o(a,n);if(null==r&&u){const[,,e]=resolveMessageFormat(u,n,t,s,i,c);r=o(e,n)}if(isString(r)){let a=!1;const l=compileMessageFormat(e,n,t,r,n,(()=>{a=!0}));return a?NOOP_MESSAGE_FUNCTION:l}return isMessageFunction(r)?r:NOOP_MESSAGE_FUNCTION}};return e.processor&&(m.processor=e.processor),n.list&&(m.list=n.list),n.named&&(m.named=n.named),isNumber(n.plural)&&(m.pluralIndex=n.plural),m}function datetime(e,...t){const{datetimeFormats:a,unresolving:n,fallbackLocale:r,onWarn:l,localeFallbacker:o}=e,{__datetimeFormatters:s}=e,[i,c,u,m]=parseDateTimeArgs(...t),g=isBoolean(u.missingWarn)?u.missingWarn:e.missingWarn;isBoolean(u.fallbackWarn)?u.fallbackWarn:e.fallbackWarn;const f=!!u.part,_=isString(u.locale)?u.locale:e.locale,p=o(e,r,_);if(!isString(i)||""===i)return new Intl.DateTimeFormat(_,m).format(c);let b,d={},E=null;for(let t=0;t<p.length&&(b=p[t],d=a[b]||{},E=d[i],!isPlainObject(E));t++)handleMissing(e,i,b,g,"datetime format");if(!isPlainObject(E)||!isString(b))return n?-1:i;let v=`${b}__${i}`;isEmptyObject(m)||(v=`${v}__${JSON.stringify(m)}`);let O=s.get(v);return O||(O=new Intl.DateTimeFormat(b,assign({},E,m)),s.set(v,O)),f?O.formatToParts(c):O.format(c)}const DATETIME_FORMAT_OPTIONS_KEYS=["localeMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName","formatMatcher","hour12","timeZone","dateStyle","timeStyle","calendar","dayPeriod","numberingSystem","hourCycle","fractionalSecondDigits"];function parseDateTimeArgs(...e){const[t,a,n,r]=e,l={};let o,s={};if(isString(t)){const e=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!e)throw Error(CoreErrorCodes.INVALID_ISO_DATE_ARGUMENT);const a=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(a);try{o.toISOString()}catch(e){throw Error(CoreErrorCodes.INVALID_ISO_DATE_ARGUMENT)}}else if("[object Date]"===toTypeString(t)){if(isNaN(t.getTime()))throw Error(CoreErrorCodes.INVALID_DATE_ARGUMENT);o=t}else{if(!isNumber(t))throw Error(CoreErrorCodes.INVALID_ARGUMENT);o=t}return isString(a)?l.key=a:isPlainObject(a)&&Object.keys(a).forEach((e=>{DATETIME_FORMAT_OPTIONS_KEYS.includes(e)?s[e]=a[e]:l[e]=a[e]})),isString(n)?l.locale=n:isPlainObject(n)&&(s=n),isPlainObject(r)&&(s=r),[l.key||"",o,l,s]}function clearDateTimeFormat(e,t,a){const n=e;for(const e in a){const a=`${t}__${e}`;n.__datetimeFormatters.has(a)&&n.__datetimeFormatters.delete(a)}}function number(e,...t){const{numberFormats:a,unresolving:n,fallbackLocale:r,onWarn:l,localeFallbacker:o}=e,{__numberFormatters:s}=e,[i,c,u,m]=parseNumberArgs(...t),g=isBoolean(u.missingWarn)?u.missingWarn:e.missingWarn;isBoolean(u.fallbackWarn)?u.fallbackWarn:e.fallbackWarn;const f=!!u.part,_=isString(u.locale)?u.locale:e.locale,p=o(e,r,_);if(!isString(i)||""===i)return new Intl.NumberFormat(_,m).format(c);let b,d={},E=null;for(let t=0;t<p.length&&(b=p[t],d=a[b]||{},E=d[i],!isPlainObject(E));t++)handleMissing(e,i,b,g,"number format");if(!isPlainObject(E)||!isString(b))return n?-1:i;let v=`${b}__${i}`;isEmptyObject(m)||(v=`${v}__${JSON.stringify(m)}`);let O=s.get(v);return O||(O=new Intl.NumberFormat(b,assign({},E,m)),s.set(v,O)),f?O.formatToParts(c):O.format(c)}const NUMBER_FORMAT_OPTIONS_KEYS=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function parseNumberArgs(...e){const[t,a,n,r]=e,l={};let o={};if(!isNumber(t))throw Error(CoreErrorCodes.INVALID_ARGUMENT);const s=t;return isString(a)?l.key=a:isPlainObject(a)&&Object.keys(a).forEach((e=>{NUMBER_FORMAT_OPTIONS_KEYS.includes(e)?o[e]=a[e]:l[e]=a[e]})),isString(n)?l.locale=n:isPlainObject(n)&&(o=n),isPlainObject(r)&&(o=r),[l.key||"",s,l,o]}function clearNumberFormat(e,t,a){const n=e;for(const e in a){const a=`${t}__${e}`;n.__numberFormatters.has(a)&&n.__numberFormatters.delete(a)}}const VERSION="9.3.0-beta.16";let code=CompileErrorCodes.__EXTEND_POINT__;const inc=()=>++code,I18nErrorCodes={UNEXPECTED_RETURN_TYPE:code,INVALID_ARGUMENT:inc(),MUST_BE_CALL_SETUP_TOP:inc(),NOT_INSLALLED:inc(),NOT_AVAILABLE_IN_LEGACY_MODE:inc(),REQUIRED_VALUE:inc(),INVALID_VALUE:inc(),CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:inc(),NOT_INSLALLED_WITH_PROVIDE:inc(),UNEXPECTED_ERROR:inc(),NOT_COMPATIBLE_LEGACY_VUE_I18N:inc(),BRIDGE_SUPPORT_VUE_2_ONLY:inc(),MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION:inc(),NOT_AVAILABLE_COMPOSITION_IN_LEGACY:inc(),__EXTEND_POINT__:inc()},TranslateVNodeSymbol=makeSymbol("__translateVNode"),DatetimePartsSymbol=makeSymbol("__datetimeParts"),NumberPartsSymbol=makeSymbol("__numberParts"),SetPluralRulesSymbol=makeSymbol("__setPluralRules"),LegacyInstanceSymbol=makeSymbol("__legacyVueI18n"),InejctWithOption=makeSymbol("__injectWithOption"),__VUE_I18N_BRIDGE__="__VUE_I18N_BRIDGE__";function isLegacyVueI18n(e){return null!=e&&null!=e.version&&(Number(e.version.split(".")[0])||-1)>=8}function handleFlatJson(e){if(!isObject(e))return e;for(const t in e)if(hasOwn(e,t))if(t.includes(".")){const a=t.split("."),n=a.length-1;let r=e;for(let e=0;e<n;e++)a[e]in r||(r[a[e]]={}),r=r[a[e]];r[a[n]]=e[t],delete e[t],isObject(r[a[n]])&&handleFlatJson(r[a[n]])}else isObject(e[t])&&handleFlatJson(e[t]);return e}function getLocaleMessages(e,t){const{messages:a,__i18n:n,messageResolver:r,flatJson:l}=t,o=isPlainObject(a)?a:isArray(n)?{}:{[e]:{}};if(isArray(n)&&n.forEach((e=>{if("locale"in e&&"resource"in e){const{locale:t,resource:a}=e;t?(o[t]=o[t]||{},deepCopy(a,o[t])):deepCopy(a,o)}else isString(e)&&deepCopy(JSON.parse(e),o)})),null==r&&l)for(const e in o)hasOwn(o,e)&&handleFlatJson(o[e]);return o}const isNotObjectOrIsArray=e=>!isObject(e)||isArray(e);function deepCopy(e,t){if(isNotObjectOrIsArray(e)||isNotObjectOrIsArray(t))throw Error(I18nErrorCodes.INVALID_VALUE);for(const a in e)hasOwn(e,a)&&(isNotObjectOrIsArray(e[a])||isNotObjectOrIsArray(t[a])?t[a]=e[a]:deepCopy(e[a],t[a]))}function getComponentOptions(e){return e.proxy.$options}function adjustI18nResources(e,t,a){let n=isObject(t.messages)?t.messages:{};"__i18nGlobal"in a&&(n=getLocaleMessages(e.locale.value,{messages:n,__i18n:a.__i18nGlobal}));const r=Object.keys(n);if(r.length&&r.forEach((t=>{e.mergeLocaleMessage(t,n[t])})),isObject(t.datetimeFormats)){const a=Object.keys(t.datetimeFormats);a.length&&a.forEach((a=>{e.mergeDateTimeFormat(a,t.datetimeFormats[a])}))}if(isObject(t.numberFormats)){const a=Object.keys(t.numberFormats);a.length&&a.forEach((a=>{e.mergeNumberFormat(a,t.numberFormats[a])}))}}function createTextNode(e){return createVNodeVue2Compatible(e)}function createVNodeVue2Compatible(e){const t=void 0;return{tag:void 0,data:void 0,children:void 0,text:e,elm:void 0,ns:void 0,context:void 0,fnContext:void 0,fnOptions:void 0,fnScopeId:void 0,key:void 0,componentOptions:void 0,componentInstance:t,parent:void 0,raw:!1,isStatic:!1,isRootInsert:!0,isComment:!1,isCloned:!1,isOnce:!1,asyncFactory:void 0,asyncMeta:void 0,isAsyncPlaceholder:!1,child:()=>t}}let composerID=0;function defineCoreMissingHandler(e){return(t,a,n,r)=>e(a,n,getCurrentInstance()||void 0,r)}function createComposer(e={},t){const{__root:a}=e,n=void 0===a;let r=!isBoolean(e.inheritLocale)||e.inheritLocale;const l=ref(a&&r?a.locale.value:isString(e.locale)?e.locale:DEFAULT_LOCALE),o=ref(a&&r?a.fallbackLocale.value:isString(e.fallbackLocale)||isArray(e.fallbackLocale)||isPlainObject(e.fallbackLocale)||!1===e.fallbackLocale?e.fallbackLocale:l.value),s=ref(getLocaleMessages(l.value,e)),i=ref(isPlainObject(e.datetimeFormats)?e.datetimeFormats:{[l.value]:{}}),c=ref(isPlainObject(e.numberFormats)?e.numberFormats:{[l.value]:{}});let u=a?a.missingWarn:!isBoolean(e.missingWarn)&&!isRegExp(e.missingWarn)||e.missingWarn,m=a?a.fallbackWarn:!isBoolean(e.fallbackWarn)&&!isRegExp(e.fallbackWarn)||e.fallbackWarn,g=a?a.fallbackRoot:!isBoolean(e.fallbackRoot)||e.fallbackRoot,f=!!e.fallbackFormat,_=isFunction(e.missing)?e.missing:null,p=isFunction(e.missing)?defineCoreMissingHandler(e.missing):null,b=isFunction(e.postTranslation)?e.postTranslation:null,d=a?a.warnHtmlMessage:!isBoolean(e.warnHtmlMessage)||e.warnHtmlMessage,E=!!e.escapeParameter;const v=a?a.modifiers:isPlainObject(e.modifiers)?e.modifiers:{};let O,h,y=e.pluralRules||a&&a.pluralRules;{isLegacyVueI18n(t);const e={locale:l.value,fallbackLocale:o.value,messages:s.value,dateTimeFormats:i.value,numberFormats:c.value,modifiers:v,missing:_,fallbackRoot:g,postTranslation:b,pluralizationRules:y,escapeParameterHtml:E,sync:r,silentFallbackWarn:isBoolean(m)?!m:m,silentTranslationWarn:isBoolean(u)?!u:u,formatFallbackMessages:isBoolean(f)?!f:f,warnHtmlInMessage:isBoolean(d)&&d?"warn":"off",__VUE_I18N_BRIDGE__:__VUE_I18N_BRIDGE__};O=new t(e)}h=(()=>{const t={version:VERSION,locale:l.value,fallbackLocale:o.value,messages:s.value,modifiers:v,pluralRules:y,missing:null===p?void 0:p,missingWarn:u,fallbackWarn:m,fallbackFormat:f,unresolving:!0,postTranslation:null===b?void 0:b,warnHtmlMessage:d,escapeParameter:E,messageResolver:e.messageResolver,__meta:{framework:"vue"}};t.datetimeFormats=i.value,t.numberFormats=c.value,t.__datetimeFormatters=isPlainObject(h)?h.__datetimeFormatters:void 0,t.__numberFormatters=isPlainObject(h)?h.__numberFormatters:void 0;return createCoreContext(t)})(),updateFallbackLocale(h,l.value,o.value);const N=computed({get:()=>l.value,set:e=>{l.value=e,O&&!n&&(O.locale=e),h.locale=l.value}}),I=computed({get:()=>o.value,set:e=>{o.value=e,O&&!n&&(O.fallbackLocale=e),h.fallbackLocale=o.value,updateFallbackLocale(h,l.value,e)}}),S=computed((()=>s.value)),F=computed((()=>i.value)),T=computed((()=>c.value));const L=(e,t,n,r,u,m)=>{let f;if(l.value,o.value,s.value,i.value,c.value,f=e(h),isNumber(f)&&-1===f){const[e,n]=t();return a&&g?r(a):u(e)}if(m(f))return f;throw Error(I18nErrorCodes.UNEXPECTED_RETURN_TYPE)};function C(...e){return L((t=>Reflect.apply(translate,null,[t,...e])),(()=>parseTranslateArgs(...e)),0,(t=>Reflect.apply(t.t,t,[...e])),(e=>e),(e=>isString(e)))}const k={normalize:function(e){return e.map((e=>isString(e)||isNumber(e)||isBoolean(e)?createTextNode(String(e)):e))},interpolate:e=>e,type:"vnode"};function A(e){return s.value[e]||{}}composerID++,a&&inBrowser&&(watch(a.locale,(e=>{r&&(l.value=e,O&&!n&&(O.locale=e),h.locale=e,updateFallbackLocale(h,l.value,o.value))})),watch(a.fallbackLocale,(e=>{r&&(o.value=e,O&&!n&&(O.fallbackLocale=e),h.fallbackLocale=e,updateFallbackLocale(h,l.value,o.value))})));const M={id:composerID,locale:N,fallbackLocale:I,get inheritLocale(){return r},set inheritLocale(e){r=e,O&&(O._sync=e),e&&a&&(l.value=a.locale.value,o.value=a.fallbackLocale.value,O&&(O.locale=a.locale.value,O.fallbackLocale=a.fallbackLocale.value),updateFallbackLocale(h,l.value,o.value))},get availableLocales(){return Object.keys(s.value).sort()},messages:S,get modifiers(){return v},get pluralRules(){return y||{}},get isGlobal(){return n},get missingWarn(){return u},set missingWarn(e){u=e,h.missingWarn=u},get fallbackWarn(){return m},set fallbackWarn(e){m=e,h.fallbackWarn=m},get fallbackRoot(){return g},set fallbackRoot(e){g=e},get fallbackFormat(){return f},set fallbackFormat(e){f=e,h.fallbackFormat=f},get warnHtmlMessage(){return d},set warnHtmlMessage(e){d=e,h.warnHtmlMessage=e},get escapeParameter(){return E},set escapeParameter(e){E=e,h.escapeParameter=e},t:C,getLocaleMessage:A,setLocaleMessage:function(e,t){s.value[e]=t,O&&O.setLocaleMessage(e,t),h.messages=s.value},mergeLocaleMessage:function(e,t){s.value[e]=s.value[e]||{},O&&O.mergeLocaleMessage(e,t),deepCopy(t,s.value[e]),h.messages=s.value},getPostTranslationHandler:function(){return isFunction(b)?b:null},setPostTranslationHandler:function(e){b=e,h.postTranslation=e},getMissingHandler:function(){return _},setMissingHandler:function(e){null!==e&&(p=defineCoreMissingHandler(e)),_=e,h.missing=p},[SetPluralRulesSymbol]:function(e){y=e,h.pluralRules=y}};return M.datetimeFormats=F,M.numberFormats=T,M.rt=function(...e){const[t,a,n]=e;if(n&&!isObject(n))throw Error(I18nErrorCodes.INVALID_ARGUMENT);return C(t,a,assign({resolvedMessage:!0},n||{}))},M.te=function(e,t){const a=A(isString(t)?t:l.value);return null!==h.messageResolver(a,e)},M.tm=function(e){const t=function(e){let t=null;const a=fallbackWithLocaleChain(h,o.value,l.value);for(let n=0;n<a.length;n++){const r=s.value[a[n]]||{},l=h.messageResolver(r,e);if(null!=l){t=l;break}}return t}(e);return null!=t?t:a&&a.tm(e)||{}},M.d=function(...e){return L((t=>Reflect.apply(datetime,null,[t,...e])),(()=>parseDateTimeArgs(...e)),0,(t=>Reflect.apply(t.d,t,[...e])),(()=>""),(e=>isString(e)))},M.n=function(...e){return L((t=>Reflect.apply(number,null,[t,...e])),(()=>parseNumberArgs(...e)),0,(t=>Reflect.apply(t.n,t,[...e])),(()=>""),(e=>isString(e)))},M.getDateTimeFormat=function(e){return i.value[e]||{}},M.setDateTimeFormat=function(e,t){i.value[e]=t,O&&O.setDateTimeFormat(e,t),h.datetimeFormats=i.value,clearDateTimeFormat(h,e,t)},M.mergeDateTimeFormat=function(e,t){i.value[e]=assign(i.value[e]||{},t),O&&O.mergeDateTimeFormat(e,t),h.datetimeFormats=i.value,clearDateTimeFormat(h,e,t)},M.getNumberFormat=function(e){return c.value[e]||{}},M.setNumberFormat=function(e,t){c.value[e]=t,O&&O.setNumberFormat(e,t),h.numberFormats=c.value,clearNumberFormat(h,e,t)},M.mergeNumberFormat=function(e,t){c.value[e]=assign(c.value[e]||{},t),O&&O.mergeNumberFormat(e,t),h.numberFormats=c.value,clearNumberFormat(h,e,t)},M[InejctWithOption]=e.__injectWithOption,M[TranslateVNodeSymbol]=function(...e){return L((t=>{let a;const n=t;try{n.processor=k,a=Reflect.apply(translate,null,[n,...e])}finally{n.processor=null}return a}),(()=>parseTranslateArgs(...e)),0,(t=>t[TranslateVNodeSymbol](...e)),(e=>[createTextNode(e)]),(e=>isArray(e)))},M[DatetimePartsSymbol]=function(...e){return L((t=>Reflect.apply(datetime,null,[t,...e])),(()=>parseDateTimeArgs(...e)),0,(t=>t[DatetimePartsSymbol](...e)),(()=>[]),(e=>isString(e)||isArray(e)))},M[NumberPartsSymbol]=function(...e){return L((t=>Reflect.apply(number,null,[t,...e])),(()=>parseNumberArgs(...e)),0,(t=>t[NumberPartsSymbol](...e)),(()=>[]),(e=>isString(e)||isArray(e)))},M[LegacyInstanceSymbol]=O,M}const baseFormatProps={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>"parent"===e||"global"===e,default:"parent"},i18n:{type:Object}};function getInterpolateArg({slots:e},t){if(1===t.length&&"default"===t[0]){return(e.default?e.default():[]).reduce(((e,t)=>[...e,...t.children?t.children:[t]]),[])}return t.reduce(((t,a)=>{const n=e[a];return n&&(t[a]=n()),t}),{})}function getFragmentableTag(e){return e}const TranslationImpl=defineComponent({name:"i18n-t",props:assign({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>isNumber(e)||!isNaN(e)}},baseFormatProps),setup(e,t){const{slots:a,attrs:n}=t,r=e.i18n||useI18n({useScope:e.scope,__useComponent:!0});return()=>{const l=Object.keys(a).filter((e=>"_"!==e)),o={};e.locale&&(o.locale=e.locale),void 0!==e.plural&&(o.plural=isString(e.plural)?+e.plural:e.plural);const s=getInterpolateArg(t,l),i=r[TranslateVNodeSymbol](e.keypath,s,o),c=assign({},n),u=isString(e.tag)||isObject(e.tag)?e.tag:getFragmentableTag("span");return h(u,c,i)}}}),Translation=TranslationImpl,I18nT=Translation;function isVNode(e){return isArray(e)&&!isString(e[0])}function renderFormatter(e,t,a,n){const{slots:r,attrs:l}=t;return()=>{const t={part:!0};let o={};e.locale&&(t.locale=e.locale),isString(e.format)?t.key=e.format:isObject(e.format)&&(isString(e.format.key)&&(t.key=e.format.key),o=Object.keys(e.format).reduce(((t,n)=>a.includes(n)?assign({},t,{[n]:e.format[n]}):t),{}));const s=n(e.value,t,o);let i=[t.key];isArray(s)?i=s.map(((e,t)=>{const a=r[e.type],n=a?a({[e.type]:e.value,index:t,parts:s}):[e.value];return isVNode(n)&&(n[0].key=`${e.type}-${t}`),n})):isString(s)&&(i=[s]);const c=assign({},l),u=isString(e.tag)||isObject(e.tag)?e.tag:getFragmentableTag("span");return h(u,c,i)}}const NumberFormatImpl=defineComponent({name:"i18n-n",props:assign({value:{type:Number,required:!0},format:{type:[String,Object]}},baseFormatProps),setup(e,t){const a=e.i18n||useI18n({useScope:"parent",__useComponent:!0});return renderFormatter(e,t,NUMBER_FORMAT_OPTIONS_KEYS,((...e)=>a[NumberPartsSymbol](...e)))}}),NumberFormat=NumberFormatImpl,I18nN=NumberFormat,DatetimeFormatImpl=defineComponent({name:"i18n-d",props:assign({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},baseFormatProps),setup(e,t){const a=e.i18n||useI18n({useScope:"parent",__useComponent:!0});return renderFormatter(e,t,DATETIME_FORMAT_OPTIONS_KEYS,((...e)=>a[DatetimePartsSymbol](...e)))}}),DatetimeFormat=DatetimeFormatImpl,I18nD=DatetimeFormat;function apply(e,...t){const a=isPlainObject(t[0])?t[0]:{};(!isBoolean(a.globalInstall)||a.globalInstall)&&(e.component(Translation.name,Translation),e.component(NumberFormat.name,NumberFormat),e.component(DatetimeFormat.name,DatetimeFormat))}function defineMixin(e,t){return{beforeCreate(){const a=this.$options;if(!a.__VUE18N__INSTANCE__)if(a.i18n=a.i18n||(a.__i18nBridge?{}:null),this._i18nBridgeRoot=e,"composition"!==e.mode)if(a.i18n){if(a.i18n instanceof t){if(a.__i18nBridge)try{const e=a.i18n&&a.i18n.messages?a.i18n.messages:{};a.__i18nBridge.forEach((t=>deepCopy(JSON.parse(t),e))),Object.keys(e).forEach((t=>{a.i18n.mergeLocaleMessage(t,e[t])}))}catch(e){}this._i18n=a.i18n,this._i18nWatcher=this._i18n.watchI18nData()}else if(isPlainObject(a.i18n)){const e=this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof t?this.$root.$i18n:null;if(e&&(a.i18n.root=this.$root,a.i18n.formatter=e.formatter,a.i18n.fallbackLocale=e.fallbackLocale,a.i18n.formatFallbackMessages=e.formatFallbackMessages,a.i18n.silentTranslationWarn=e.silentTranslationWarn,a.i18n.silentFallbackWarn=e.silentFallbackWarn,a.i18n.pluralizationRules=e.pluralizationRules,a.i18n.preserveDirectiveContent=e.preserveDirectiveContent),a.__i18nBridge)try{const e=a.i18n&&a.i18n.messages?a.i18n.messages:{};a.__i18nBridge.forEach((t=>deepCopy(JSON.parse(t),e))),a.i18n.messages=e}catch(e){}const{sharedMessages:n}=a.i18n;n&&isPlainObject(n)&&deepCopy(n,a.i18n.messages),this._i18n=new t(a.i18n),this._i18nWatcher=this._i18n.watchI18nData(),(void 0===a.i18n.sync||a.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:a.parent&&a.parent.$i18n&&a.parent.$i18n instanceof t&&(this._i18n=a.parent.$i18n);else this._i18n=e},beforeMount(){const a=this.$options;a.__VUE18N__INSTANCE__||"composition"!==e.mode&&(a.i18n=a.i18n||(a.__i18nBridge?{}:null),a.i18n?(a.i18n instanceof t||isPlainObject(a.i18n))&&(this._i18n.subscribeDataChanging(this),this._subscribing=!0):(this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof t||a.parent&&a.parent.$i18n&&a.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)}))}}}let _legacyVueI18n=null;const I18nInjectionKey=makeSymbol("global-vue-i18n");function createI18n(e={},t){_legacyVueI18n=t;const a=!isBoolean(e.legacy)||e.legacy,n=!isBoolean(e.globalInjection)||e.globalInjection,r=!a||!!e.allowComposition,l=new Map,[o,s]=createGlobal(e,a,t);{const e=s[LegacyInstanceSymbol];let t=null;Object.defineProperty(e,"global",{get:()=>s}),Object.defineProperty(e,"mode",{get:()=>a?"legacy":"composition"}),Object.defineProperty(e,"allowComposition",{get:()=>r}),Object.defineProperty(e,"__instances",{get:()=>l}),Object.defineProperty(e,"install",{writable:!0,value:(r,...l)=>{if(2!==(r&&r.version&&Number(r.version.split(".")[0])||-1))throw Error(I18nErrorCodes.BRIDGE_SUPPORT_VUE_2_ONLY);apply(r,...l),!a&&n&&(t=injectGlobalFieldsForBridge(r,e,s)),r.mixin(defineMixin(e,_legacyVueI18n))}}),Object.defineProperty(e,"dispose",{value:()=>{t&&t(),o.stop()}});const i={__getInstance:function(e){return l.get(e)||null},__setInstance:function(e,t){l.set(e,t)},__deleteInstance:function(e){l.delete(e)}};return Object.keys(i).forEach((t=>Object.defineProperty(e,t,{value:i[t]}))),e}}function useI18n(e={}){const t=getCurrentInstance();if(null==t)throw Error(I18nErrorCodes.MUST_BE_CALL_SETUP_TOP);if(null==_legacyVueI18n)throw Error(I18nErrorCodes.NOT_INSLALLED);const a=getI18nInstance(t),n=getGlobalComposer(a),r=getComponentOptions(t),l=getScope(e,r);if("legacy"===a.mode&&!e.__useComponent){if(!a.allowComposition)throw Error(I18nErrorCodes.NOT_AVAILABLE_IN_LEGACY_MODE);return useI18nForLegacy(t,l,n,e)}if("global"===l)return adjustI18nResources(n,e,r),n;if("parent"===l){let r=getComposer(a,t,e.__useComponent);return null==r&&(r=n),r}const o=a;let s=o.__getInstance(t);if(null==s){const a=assign({},e);"__i18n"in r&&(a.__i18n=r.__i18n),n&&(a.__root=n),s=createComposer(a,_legacyVueI18n),o.__composerExtend&&o.__composerExtend(s),setupLifeCycle(o,t,s),o.__setInstance(t,s)}return s}const castToVueI18n=e=>{if(!(__VUE_I18N_BRIDGE__ in e))throw Error(I18nErrorCodes.NOT_COMPATIBLE_LEGACY_VUE_I18N);return e};function createGlobal(e,t,a){const n=effectScope();{if(!isLegacyVueI18n(a))throw Error(I18nErrorCodes.NOT_COMPATIBLE_LEGACY_VUE_I18N);const t=n.run((()=>createComposer(e,a)));if(null==t)throw Error(I18nErrorCodes.UNEXPECTED_ERROR);return[n,t]}}function getI18nInstance(e){{const t=e.proxy;if(null==t)throw Error(I18nErrorCodes.UNEXPECTED_ERROR);const a=t._i18nBridgeRoot;if(!a)throw Error(I18nErrorCodes.NOT_INSLALLED);return a}}function getScope(e,t){return isEmptyObject(e)?"__i18n"in t?"local":"global":e.useScope?e.useScope:"local"}function getGlobalComposer(e){return e.global}function getComposer(e,t,a=!1){let n=null;const r=t.root;let l=t.parent;for(;null!=l;){const t=e;if("composition"===e.mode)n=t.__getInstance(l);else{const e=t.__getInstance(l);null!=e&&(n=e.__composer,a&&n&&!n[InejctWithOption]&&(n=null))}if(null!=n)break;if(r===l)break;l=l.parent}return n}function setupLifeCycle(e,t,a){{const n=t.proxy;if(null==n)throw Error(I18nErrorCodes.UNEXPECTED_ERROR);const r=a[LegacyInstanceSymbol];if(r===e)throw Error(I18nErrorCodes.UNEXPECTED_ERROR);n._i18n=r,n._i18n_bridge=!0,inBrowser&&(n._i18nWatcher=n._i18n.watchI18nData(),n._i18n._sync&&(n._localeWatcher=n._i18n.watchLocale()));let l=!1;onBeforeMount((()=>{n._i18n.subscribeDataChanging(n),l=!0})),onUnmounted((()=>{l&&(n._i18n.unsubscribeDataChanging(n),l=!1),n._i18nWatcher&&(n._i18nWatcher(),n._i18n.destroyVM(),delete n._i18nWatcher),n._localeWatcher&&(n._localeWatcher(),delete n._localeWatcher),delete n._i18n_bridge,delete n._i18n}))}}function useI18nForLegacy(e,t,a,n={}){const r="local"===t,l=shallowRef(null);if(r&&e.proxy&&!e.proxy.$options.i18n&&!e.proxy.$options.__i18n)throw Error(I18nErrorCodes.MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION);const o=!isBoolean(n.inheritLocale)||n.inheritLocale,s=ref(r&&o?a.locale.value:isString(n.locale)?n.locale:DEFAULT_LOCALE),i=ref(r&&o?a.fallbackLocale.value:isString(n.fallbackLocale)||isArray(n.fallbackLocale)||isPlainObject(n.fallbackLocale)||!1===n.fallbackLocale?n.fallbackLocale:s.value),c=ref(getLocaleMessages(s.value,n)),u=ref(isPlainObject(n.datetimeFormats)?n.datetimeFormats:{[s.value]:{}}),m=ref(isPlainObject(n.numberFormats)?n.numberFormats:{[s.value]:{}}),g=r?a.missingWarn:!isBoolean(n.missingWarn)&&!isRegExp(n.missingWarn)||n.missingWarn,f=r?a.fallbackWarn:!isBoolean(n.fallbackWarn)&&!isRegExp(n.fallbackWarn)||n.fallbackWarn,_=r?a.fallbackRoot:!isBoolean(n.fallbackRoot)||n.fallbackRoot,p=!!n.fallbackFormat,b=isFunction(n.missing)?n.missing:null,d=isFunction(n.postTranslation)?n.postTranslation:null,E=r?a.warnHtmlMessage:!isBoolean(n.warnHtmlMessage)||n.warnHtmlMessage,v=!!n.escapeParameter,O=r?a.modifiers:isPlainObject(n.modifiers)?n.modifiers:{},h=n.pluralRules||r&&a.pluralRules;function y(e){return s.value,i.value,c.value,u.value,m.value,e()}const N={get id(){return l.value?l.value.id:-1},locale:computed({get:()=>l.value?l.value.locale.value:s.value,set:e=>{l.value&&(l.value.locale.value=e),s.value=e}}),fallbackLocale:computed({get:()=>l.value?l.value.fallbackLocale.value:i.value,set:e=>{l.value&&(l.value.fallbackLocale.value=e),i.value=e}}),messages:computed((()=>l.value?l.value.messages.value:c.value)),datetimeFormats:computed((()=>u.value)),numberFormats:computed((()=>m.value)),get inheritLocale(){return l.value?l.value.inheritLocale:o},set inheritLocale(e){l.value&&(l.value.inheritLocale=e)},get availableLocales(){return l.value?l.value.availableLocales:Object.keys(c.value)},get modifiers(){return l.value?l.value.modifiers:O},get pluralRules(){return l.value?l.value.pluralRules:h},get isGlobal(){return!!l.value&&l.value.isGlobal},get missingWarn(){return l.value?l.value.missingWarn:g},set missingWarn(e){l.value&&(l.value.missingWarn=e)},get fallbackWarn(){return l.value?l.value.fallbackWarn:f},set fallbackWarn(e){l.value&&(l.value.missingWarn=e)},get fallbackRoot(){return l.value?l.value.fallbackRoot:_},set fallbackRoot(e){l.value&&(l.value.fallbackRoot=e)},get fallbackFormat(){return l.value?l.value.fallbackFormat:p},set fallbackFormat(e){l.value&&(l.value.fallbackFormat=e)},get warnHtmlMessage(){return l.value?l.value.warnHtmlMessage:E},set warnHtmlMessage(e){l.value&&(l.value.warnHtmlMessage=e)},get escapeParameter(){return l.value?l.value.escapeParameter:v},set escapeParameter(e){l.value&&(l.value.escapeParameter=e)},t:function(...e){return l.value?y((()=>Reflect.apply(l.value.t,null,[...e]))):y((()=>""))},getPostTranslationHandler:function(){return l.value?l.value.getPostTranslationHandler():d},setPostTranslationHandler:function(e){l.value&&l.value.setPostTranslationHandler(e)},getMissingHandler:function(){return l.value?l.value.getMissingHandler():b},setMissingHandler:function(e){l.value&&l.value.setMissingHandler(e)},rt:function(...e){return l.value?Reflect.apply(l.value.rt,null,[...e]):""},d:function(...e){return l.value?y((()=>Reflect.apply(l.value.d,null,[...e]))):y((()=>""))},n:function(...e){return l.value?y((()=>Reflect.apply(l.value.n,null,[...e]))):y((()=>""))},tm:function(e){return l.value?l.value.tm(e):{}},te:function(e,t){return!!l.value&&l.value.te(e,t)},getLocaleMessage:function(e){return l.value?l.value.getLocaleMessage(e):{}},setLocaleMessage:function(e,t){l.value&&(l.value.setLocaleMessage(e,t),c.value[e]=t)},mergeLocaleMessage:function(e,t){l.value&&l.value.mergeLocaleMessage(e,t)},getDateTimeFormat:function(e){return l.value?l.value.getDateTimeFormat(e):{}},setDateTimeFormat:function(e,t){l.value&&(l.value.setDateTimeFormat(e,t),u.value[e]=t)},mergeDateTimeFormat:function(e,t){l.value&&l.value.mergeDateTimeFormat(e,t)},getNumberFormat:function(e){return l.value?l.value.getNumberFormat(e):{}},setNumberFormat:function(e,t){l.value&&(l.value.setNumberFormat(e,t),m.value[e]=t)},mergeNumberFormat:function(e,t){l.value&&l.value.mergeNumberFormat(e,t)}};return onBeforeMount((()=>{if(null==e.proxy||null==e.proxy.$i18n)throw Error(I18nErrorCodes.NOT_AVAILABLE_COMPOSITION_IN_LEGACY);const a=l.value=e.proxy.$i18n.__composer;"global"===t?(s.value=a.locale.value,i.value=a.fallbackLocale.value,c.value=a.messages.value,u.value=a.datetimeFormats.value,m.value=a.numberFormats.value):r&&function(e){e.locale.value=s.value,e.fallbackLocale.value=i.value,Object.keys(c.value).forEach((t=>{e.mergeLocaleMessage(t,c.value[t])})),Object.keys(u.value).forEach((t=>{e.mergeDateTimeFormat(t,u.value[t])})),Object.keys(m.value).forEach((t=>{e.mergeNumberFormat(t,m.value[t])})),e.escapeParameter=v,e.fallbackFormat=p,e.fallbackRoot=_,e.fallbackWarn=f,e.missingWarn=g,e.warnHtmlMessage=E}(a)})),N}function injectGlobalFieldsForBridge(e,t,a){const n=t.watchLocale(a);return e.prototype.$t=function(...e){return Reflect.apply(a.t,a,[...e])},e.prototype.$d=function(...e){return Reflect.apply(a.d,a,[...e])},e.prototype.$n=function(...e){return Reflect.apply(a.n,a,[...e])},n}registerMessageResolver(resolveValue),registerLocaleFallbacker(fallbackWithLocaleChain);export{DatetimeFormat,I18nD,I18nInjectionKey,I18nN,I18nT,NumberFormat,Translation,VERSION,castToVueI18n,createI18n,useI18n}; |
/*! | ||
* vue-i18n-bridge v9.3.0-beta.15 | ||
* vue-i18n-bridge v9.3.0-beta.16 | ||
* (c) 2023 kazuya kawaguchi | ||
* Released under the MIT License. | ||
*/ | ||
var VueI18nBridge=function(e,t){"use strict";const a="undefined"!=typeof window,n=(e,t=!1)=>t?Symbol.for(e):Symbol(e),l=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),r=e=>"number"==typeof e&&isFinite(e),o=e=>"[object RegExp]"===h(e),s=e=>k(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,v=e=>"boolean"==typeof e,d=e=>null!==e&&"object"==typeof e,b=Object.prototype.toString,h=e=>b.call(e),k=e=>"[object Object]"===h(e),y=15,E=[];E[0]={w:[0],i:[3,0],"[":[4],o:[7]},E[1]={w:[1],".":[2],"[":[4],o:[7]},E[2]={w:[2],i:[3,0],0:[3,0]},E[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},E[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},E[5]={"'":[4,0],o:8,l:[5,0]},E[6]={'"':[4,0],o:8,l:[6,0]};const L=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function N(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)))&&(a=t,L.test(a)?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);var a}const F=new Map;function T(e,t){return d(e)?e[t]:null}const R=e=>e,O=e=>"",W=e=>0===e.length?"":e.join(""),w=e=>null==e?"":_(e)||k(e)&&e.toString===b?JSON.stringify(e,null,2):String(e);function M(e,t){return e=Math.abs(e),2===t?e?e>1?1:0:1:e?Math.min(e,2):0}function D(e={}){const t=e.locale,a=function(e){const t=r(e.pluralIndex)?e.pluralIndex:-1;return e.named&&(r(e.named.count)||r(e.named.n))?r(e.named.count)?e.named.count:r(e.named.n)?e.named.n:t:t}(e),n=d(e.pluralRules)&&p(t)&&g(e.pluralRules[t])?e.pluralRules[t]:M,l=d(e.pluralRules)&&p(t)&&g(e.pluralRules[t])?M:void 0,o=e.list||[],s=e.named||{};r(e.pluralIndex)&&function(e,t){t.count||(t.count=e),t.n||(t.n=e)}(a,s);function i(t){const a=g(e.messages)?e.messages(t):!!d(e.messages)&&e.messages[t];return a||(e.parent?e.parent.message(t):O)}const c=k(e.processor)&&g(e.processor.normalize)?e.processor.normalize:W,u=k(e.processor)&&g(e.processor.interpolate)?e.processor.interpolate:w,m={list:e=>o[e],named:e=>s[e],plural:e=>e[n(a,e.length,l)],linked:(t,...a)=>{const[n,l]=a;let r="text",o="";1===a.length?d(n)?(o=n.modifier||o,r=n.type||r):p(n)&&(o=n||o):2===a.length&&(p(n)&&(o=n||o),p(l)&&(r=l||r));let s=i(t)(m);return"vnode"===r&&_(s)&&o&&(s=s[0]),o?(c=o,e.modifiers?e.modifiers[c]:R)(s,r):s;var c},message:i,type:k(e.processor)&&p(e.processor.type)?e.processor.type:"text",interpolate:u,normalize:c};return m}function C(e,t,a){return[...new Set([a,..._(t)?t:d(t)?Object.keys(t):p(t)?[t]:[a]])]}function A(e,t,a){const n=p(a)?a:U,l=e;l.__localeChainCache||(l.__localeChainCache=new Map);let r=l.__localeChainCache.get(n);if(!r){r=[];let e=[a];for(;_(e);)e=P(r,e,t);const o=_(t)||!k(t)?t:t.default?t.default:null;e=p(o)?[o]:o,_(e)&&P(r,e,!1),l.__localeChainCache.set(n,r)}return r}function P(e,t,a){let n=!0;for(let l=0;l<t.length&&v(n);l++){const r=t[l];p(r)&&(n=S(e,t[l],a))}return n}function S(e,t,a){let n;const l=t.split("-");do{n=$(e,l.join("-"),a),l.splice(-1,1)}while(l.length&&!0===n);return n}function $(e,t,a){let n=!1;if(!e.includes(t)&&(n=!0,t)){n="!"!==t[t.length-1];const l=t.replace(/!/g,"");e.push(l),(_(a)||k(a))&&a[l]&&(n=a[l])}return n}const U="en-US",j=e=>`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;let V,H;let x=0;function G(e={}){const t=p(e.version)?e.version:"9.3.0-beta.15",a=p(e.locale)?e.locale:U,n=_(e.fallbackLocale)||k(e.fallbackLocale)||p(e.fallbackLocale)||!1===e.fallbackLocale?e.fallbackLocale:a,l=k(e.messages)?e.messages:{[a]:{}},r=k(e.datetimeFormats)?e.datetimeFormats:{[a]:{}},s=k(e.numberFormats)?e.numberFormats:{[a]:{}},u=c({},e.modifiers||{},{upper:(e,t)=>"text"===t&&p(e)?e.toUpperCase():"vnode"===t&&d(e)&&"__v_isVNode"in e?e.children.toUpperCase():e,lower:(e,t)=>"text"===t&&p(e)?e.toLowerCase():"vnode"===t&&d(e)&&"__v_isVNode"in e?e.children.toLowerCase():e,capitalize:(e,t)=>"text"===t&&p(e)?j(e):"vnode"===t&&d(e)&&"__v_isVNode"in e?j(e.children):e}),m=e.pluralRules||{},f=g(e.missing)?e.missing:null,b=!v(e.missingWarn)&&!o(e.missingWarn)||e.missingWarn,h=!v(e.fallbackWarn)&&!o(e.fallbackWarn)||e.fallbackWarn,y=!!e.fallbackFormat,E=!!e.unresolving,L=g(e.postTranslation)?e.postTranslation:null,N=k(e.processor)?e.processor:null,I=!v(e.warnHtmlMessage)||e.warnHtmlMessage,F=!!e.escapeParameter,R=g(e.messageCompiler)?e.messageCompiler:undefined,O=g(e.messageResolver)?e.messageResolver:V||T,W=g(e.localeFallbacker)?e.localeFallbacker:H||C,w=d(e.fallbackContext)?e.fallbackContext:void 0,M=g(e.onWarn)?e.onWarn:i,D=e,A=d(D.__datetimeFormatters)?D.__datetimeFormatters:new Map,P=d(D.__numberFormatters)?D.__numberFormatters:new Map,S=d(D.__meta)?D.__meta:{};x++;const $={version:t,cid:x,locale:a,fallbackLocale:n,messages:l,modifiers:u,pluralRules:m,missing:f,missingWarn:b,fallbackWarn:h,fallbackFormat:y,unresolving:E,postTranslation:L,processor:N,warnHtmlMessage:I,escapeParameter:F,messageCompiler:R,messageResolver:O,localeFallbacker:W,fallbackContext:w,onWarn:M,__meta:S};return $.datetimeFormats=r,$.numberFormats=s,$.__datetimeFormatters=A,$.__numberFormatters=P,$}function B(e,t,a,n,l){const{missing:r,onWarn:o}=e;if(null!==r){const n=r(e,a,t,l);return p(n)?n:t}return t}function Y(e,t,a){e.__localeChainCache=new Map,e.localeFallbacker(e,a,t)}let X=y;const z=()=>++X,J={INVALID_ARGUMENT:X,INVALID_DATE_ARGUMENT:z(),INVALID_ISO_DATE_ARGUMENT:z(),__EXTEND_POINT__:z()},q=()=>"",Z=e=>g(e);function K(e,...t){const{fallbackFormat:a,postTranslation:n,unresolving:l,messageCompiler:o,fallbackLocale:s,messages:i}=e,[c,m]=te(...t),f=v(m.missingWarn)?m.missingWarn:e.missingWarn,g=v(m.fallbackWarn)?m.fallbackWarn:e.fallbackWarn,b=v(m.escapeParameter)?m.escapeParameter:e.escapeParameter,h=!!m.resolvedMessage,k=p(m.default)||v(m.default)?v(m.default)?o?c:()=>c:m.default:a?o?c:()=>c:"",y=a||""!==k,E=p(m.locale)?m.locale:e.locale;b&&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]))}))}(m);let[L,N,I]=h?[c,E,i[E]||{}]:Q(e,c,E,s,g,f),F=L,T=c;if(h||p(F)||Z(F)||y&&(F=k,T=F),!(h||(p(F)||Z(F))&&p(N)))return l?-1:c;let R=!1;const O=Z(F)?F:ee(e,c,N,F,T,(()=>{R=!0}));if(R)return F;const W=function(e,t,a,n){const{modifiers:l,pluralRules:o,messageResolver:s,fallbackLocale:i,fallbackWarn:c,missingWarn:u,fallbackContext:m}=e,f=n=>{let l=s(a,n);if(null==l&&m){const[,,e]=Q(m,n,t,i,c,u);l=s(e,n)}if(p(l)){let a=!1;const r=ee(e,n,t,l,n,(()=>{a=!0}));return a?q:r}return Z(l)?l:q},_={locale:t,modifiers:l,pluralRules:o,messages:f};e.processor&&(_.processor=e.processor);n.list&&(_.list=n.list);n.named&&(_.named=n.named);r(n.plural)&&(_.pluralIndex=n.plural);return _}(e,N,I,m),w=function(e,t,a){return t(a)}(0,O,D(W));return n?n(w,c):w}function Q(e,t,a,n,l,r){const{messages:o,onWarn:s,messageResolver:i,localeFallbacker:c}=e,u=c(e,n,a);let m,f={},_=null;for(let a=0;a<u.length&&(m=u[a],f=o[m]||{},null===(_=i(f,t))&&(_=f[t]),!p(_)&&!g(_));a++){const a=B(e,t,m,0,"translate");a!==t&&(_=a)}return[_,m,f]}function ee(e,t,a,n,r,o){const{messageCompiler:s,warnHtmlMessage:i}=e;if(Z(n)){const e=n;return e.locale=e.locale||a,e.key=e.key||t,e}if(null==s){const e=()=>n;return e.locale=a,e.key=t,e}const c=s(n,function(e,t,a,n,r,o){return{warnHtmlMessage:r,onError:e=>{throw o&&o(e),e},onCacheKey:e=>((e,t,a)=>l({l:e,k:t,s:a}))(t,a,e)}}(0,a,r,0,i,o));return c.locale=a,c.key=t,c.source=n,c}function te(...e){const[t,a,n]=e,l={};if(!p(t)&&!r(t)&&!Z(t))throw Error(J.INVALID_ARGUMENT);const o=r(t)?String(t):(Z(t),t);return r(a)?l.plural=a:p(a)?l.default=a:k(a)&&!s(a)?l.named=a:_(a)&&(l.list=a),r(n)?l.plural=n:p(n)?l.default=n:k(n)&&c(l,n),[o,l]}function ae(e,...t){const{datetimeFormats:a,unresolving:n,fallbackLocale:l,onWarn:r,localeFallbacker:o}=e,{__datetimeFormatters:i}=e,[u,m,f,_]=le(...t);v(f.missingWarn)?f.missingWarn:e.missingWarn;v(f.fallbackWarn)?f.fallbackWarn:e.fallbackWarn;const g=!!f.part,d=p(f.locale)?f.locale:e.locale,b=o(e,l,d);if(!p(u)||""===u)return new Intl.DateTimeFormat(d,_).format(m);let h,y={},E=null;for(let t=0;t<b.length&&(h=b[t],y=a[h]||{},E=y[u],!k(E));t++)B(e,u,h,0,"datetime format");if(!k(E)||!p(h))return n?-1:u;let L=`${h}__${u}`;s(_)||(L=`${L}__${JSON.stringify(_)}`);let N=i.get(L);return N||(N=new Intl.DateTimeFormat(h,c({},E,_)),i.set(L,N)),g?N.formatToParts(m):N.format(m)}const ne=["localeMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName","formatMatcher","hour12","timeZone","dateStyle","timeStyle","calendar","dayPeriod","numberingSystem","hourCycle","fractionalSecondDigits"];function le(...e){const[t,a,n,l]=e,o={};let s,i={};if(p(t)){const e=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!e)throw Error(J.INVALID_ISO_DATE_ARGUMENT);const a=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(a);try{s.toISOString()}catch(e){throw Error(J.INVALID_ISO_DATE_ARGUMENT)}}else if("[object Date]"===h(t)){if(isNaN(t.getTime()))throw Error(J.INVALID_DATE_ARGUMENT);s=t}else{if(!r(t))throw Error(J.INVALID_ARGUMENT);s=t}return p(a)?o.key=a:k(a)&&Object.keys(a).forEach((e=>{ne.includes(e)?i[e]=a[e]:o[e]=a[e]})),p(n)?o.locale=n:k(n)&&(i=n),k(l)&&(i=l),[o.key||"",s,o,i]}function re(e,t,a){const n=e;for(const e in a){const a=`${t}__${e}`;n.__datetimeFormatters.has(a)&&n.__datetimeFormatters.delete(a)}}function oe(e,...t){const{numberFormats:a,unresolving:n,fallbackLocale:l,onWarn:r,localeFallbacker:o}=e,{__numberFormatters:i}=e,[u,m,f,_]=ie(...t);v(f.missingWarn)?f.missingWarn:e.missingWarn;v(f.fallbackWarn)?f.fallbackWarn:e.fallbackWarn;const g=!!f.part,d=p(f.locale)?f.locale:e.locale,b=o(e,l,d);if(!p(u)||""===u)return new Intl.NumberFormat(d,_).format(m);let h,y={},E=null;for(let t=0;t<b.length&&(h=b[t],y=a[h]||{},E=y[u],!k(E));t++)B(e,u,h,0,"number format");if(!k(E)||!p(h))return n?-1:u;let L=`${h}__${u}`;s(_)||(L=`${L}__${JSON.stringify(_)}`);let N=i.get(L);return N||(N=new Intl.NumberFormat(h,c({},E,_)),i.set(L,N)),g?N.formatToParts(m):N.format(m)}const se=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function ie(...e){const[t,a,n,l]=e,o={};let s={};if(!r(t))throw Error(J.INVALID_ARGUMENT);const i=t;return p(a)?o.key=a:k(a)&&Object.keys(a).forEach((e=>{se.includes(e)?s[e]=a[e]:o[e]=a[e]})),p(n)?o.locale=n:k(n)&&(s=n),k(l)&&(s=l),[o.key||"",i,o,s]}function ce(e,t,a){const n=e;for(const e in a){const a=`${t}__${e}`;n.__numberFormatters.has(a)&&n.__numberFormatters.delete(a)}}const ue="9.3.0-beta.15";let me=y;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(),MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION:fe(),NOT_AVAILABLE_COMPOSITION_IN_LEGACY:fe(),__EXTEND_POINT__:fe()},ge=n("__translateVNode"),pe=n("__datetimeParts"),ve=n("__numberParts"),de=n("__setPluralRules"),be=n("__legacyVueI18n"),he=n("__injectWithOption"),ke="__VUE_I18N_BRIDGE__";function ye(e){return null!=e&&null!=e.version&&(Number(e.version.split(".")[0])||-1)>=8}function Ee(e){if(!d(e))return e;for(const t in e)if(f(e,t))if(t.includes(".")){const a=t.split("."),n=a.length-1;let l=e;for(let e=0;e<n;e++)a[e]in l||(l[a[e]]={}),l=l[a[e]];l[a[n]]=e[t],delete e[t],d(l[a[n]])&&Ee(l[a[n]])}else d(e[t])&&Ee(e[t]);return e}function Le(e,t){const{messages:a,__i18n:n,messageResolver:l,flatJson:r}=t,o=k(a)?a:_(n)?{}:{[e]:{}};if(_(n)&&n.forEach((e=>{if("locale"in e&&"resource"in e){const{locale:t,resource:a}=e;t?(o[t]=o[t]||{},Ie(a,o[t])):Ie(a,o)}else p(e)&&Ie(JSON.parse(e),o)})),null==l&&r)for(const e in o)f(o,e)&&Ee(o[e]);return o}const Ne=e=>!d(e)||_(e);function Ie(e,t){if(Ne(e)||Ne(t))throw Error(_e.INVALID_VALUE);for(const a in e)f(e,a)&&(Ne(e[a])||Ne(t[a])?t[a]=e[a]:Ie(e[a],t[a]))}function Fe(e){return function(e){const t=void 0;return{tag:void 0,data:void 0,children:void 0,text:e,elm:void 0,ns:void 0,context:void 0,fnContext:void 0,fnOptions:void 0,fnScopeId:void 0,key:void 0,componentOptions:void 0,componentInstance:t,parent:void 0,raw:!1,isStatic:!1,isRootInsert:!0,isComment:!1,isCloned:!1,isOnce:!1,asyncFactory:void 0,asyncMeta:void 0,isAsyncPlaceholder:!1,child:()=>t}}(e)}let Te=0;function Re(e){return(a,n,l,r)=>e(n,l,t.getCurrentInstance()||void 0,r)}function Oe(e={},n){const{__root:l}=e,s=void 0===l;let i=!v(e.inheritLocale)||e.inheritLocale;const u=t.ref(l&&i?l.locale.value:p(e.locale)?e.locale:U),m=t.ref(l&&i?l.fallbackLocale.value:p(e.fallbackLocale)||_(e.fallbackLocale)||k(e.fallbackLocale)||!1===e.fallbackLocale?e.fallbackLocale:u.value),f=t.ref(Le(u.value,e)),b=t.ref(k(e.datetimeFormats)?e.datetimeFormats:{[u.value]:{}}),h=t.ref(k(e.numberFormats)?e.numberFormats:{[u.value]:{}});let y=l?l.missingWarn:!v(e.missingWarn)&&!o(e.missingWarn)||e.missingWarn,E=l?l.fallbackWarn:!v(e.fallbackWarn)&&!o(e.fallbackWarn)||e.fallbackWarn,L=l?l.fallbackRoot:!v(e.fallbackRoot)||e.fallbackRoot,N=!!e.fallbackFormat,I=g(e.missing)?e.missing:null,F=g(e.missing)?Re(e.missing):null,T=g(e.postTranslation)?e.postTranslation:null,R=l?l.warnHtmlMessage:!v(e.warnHtmlMessage)||e.warnHtmlMessage,O=!!e.escapeParameter;const W=l?l.modifiers:k(e.modifiers)?e.modifiers:{};let w,M,D=e.pluralRules||l&&l.pluralRules;{ye(n);const e={locale:u.value,fallbackLocale:m.value,messages:f.value,dateTimeFormats:b.value,numberFormats:h.value,modifiers:W,missing:I,fallbackRoot:L,postTranslation:T,pluralizationRules:D,escapeParameterHtml:O,sync:i,silentFallbackWarn:v(E)?!E:E,silentTranslationWarn:v(y)?!y:y,formatFallbackMessages:v(N)?!N:N,warnHtmlInMessage:v(R)&&R?"warn":"off",__VUE_I18N_BRIDGE__:ke};w=new n(e)}M=(()=>{const t={version:ue,locale:u.value,fallbackLocale:m.value,messages:f.value,modifiers:W,pluralRules:D,missing:null===F?void 0:F,missingWarn:y,fallbackWarn:E,fallbackFormat:N,unresolving:!0,postTranslation:null===T?void 0:T,warnHtmlMessage:R,escapeParameter:O,messageResolver:e.messageResolver,__meta:{framework:"vue"}};t.datetimeFormats=b.value,t.numberFormats=h.value,t.__datetimeFormatters=k(M)?M.__datetimeFormatters:void 0,t.__numberFormatters=k(M)?M.__numberFormatters:void 0;return G(t)})(),Y(M,u.value,m.value);const C=t.computed({get:()=>u.value,set:e=>{u.value=e,w&&!s&&(w.locale=e),M.locale=u.value}}),P=t.computed({get:()=>m.value,set:e=>{m.value=e,w&&!s&&(w.fallbackLocale=e),M.fallbackLocale=m.value,Y(M,u.value,e)}}),S=t.computed((()=>f.value)),$=t.computed((()=>b.value)),j=t.computed((()=>h.value));const V=(e,t,a,n,o,s)=>{let i;if(u.value,m.value,f.value,b.value,h.value,i=e(M),r(i)&&-1===i){const[e,a]=t();return l&&L?n(l):o(e)}if(s(i))return i;throw Error(_e.UNEXPECTED_RETURN_TYPE)};function H(...e){return V((t=>Reflect.apply(K,null,[t,...e])),(()=>te(...e)),0,(t=>Reflect.apply(t.t,t,[...e])),(e=>e),(e=>p(e)))}const x={normalize:function(e){return e.map((e=>p(e)||r(e)||v(e)?Fe(String(e)):e))},interpolate:e=>e,type:"vnode"};function B(e){return f.value[e]||{}}Te++,l&&a&&(t.watch(l.locale,(e=>{i&&(u.value=e,w&&!s&&(w.locale=e),M.locale=e,Y(M,u.value,m.value))})),t.watch(l.fallbackLocale,(e=>{i&&(m.value=e,w&&!s&&(w.fallbackLocale=e),M.fallbackLocale=e,Y(M,u.value,m.value))})));const X={id:Te,locale:C,fallbackLocale:P,get inheritLocale(){return i},set inheritLocale(e){i=e,w&&(w._sync=e),e&&l&&(u.value=l.locale.value,m.value=l.fallbackLocale.value,w&&(w.locale=l.locale.value,w.fallbackLocale=l.fallbackLocale.value),Y(M,u.value,m.value))},get availableLocales(){return Object.keys(f.value).sort()},messages:S,get modifiers(){return W},get pluralRules(){return D||{}},get isGlobal(){return s},get missingWarn(){return y},set missingWarn(e){y=e,M.missingWarn=y},get fallbackWarn(){return E},set fallbackWarn(e){E=e,M.fallbackWarn=E},get fallbackRoot(){return L},set fallbackRoot(e){L=e},get fallbackFormat(){return N},set fallbackFormat(e){N=e,M.fallbackFormat=N},get warnHtmlMessage(){return R},set warnHtmlMessage(e){R=e,M.warnHtmlMessage=e},get escapeParameter(){return O},set escapeParameter(e){O=e,M.escapeParameter=e},t:H,getLocaleMessage:B,setLocaleMessage:function(e,t){f.value[e]=t,w&&w.setLocaleMessage(e,t),M.messages=f.value},mergeLocaleMessage:function(e,t){f.value[e]=f.value[e]||{},w&&w.mergeLocaleMessage(e,t),Ie(t,f.value[e]),M.messages=f.value},getPostTranslationHandler:function(){return g(T)?T:null},setPostTranslationHandler:function(e){T=e,M.postTranslation=e},getMissingHandler:function(){return I},setMissingHandler:function(e){null!==e&&(F=Re(e)),I=e,M.missing=F},[de]:function(e){D=e,M.pluralRules=D}};return X.datetimeFormats=$,X.numberFormats=j,X.rt=function(...e){const[t,a,n]=e;if(n&&!d(n))throw Error(_e.INVALID_ARGUMENT);return H(t,a,c({resolvedMessage:!0},n||{}))},X.te=function(e,t){const a=B(p(t)?t:u.value);return null!==M.messageResolver(a,e)},X.tm=function(e){const t=function(e){let t=null;const a=A(M,m.value,u.value);for(let n=0;n<a.length;n++){const l=f.value[a[n]]||{},r=M.messageResolver(l,e);if(null!=r){t=r;break}}return t}(e);return null!=t?t:l&&l.tm(e)||{}},X.d=function(...e){return V((t=>Reflect.apply(ae,null,[t,...e])),(()=>le(...e)),0,(t=>Reflect.apply(t.d,t,[...e])),(()=>""),(e=>p(e)))},X.n=function(...e){return V((t=>Reflect.apply(oe,null,[t,...e])),(()=>ie(...e)),0,(t=>Reflect.apply(t.n,t,[...e])),(()=>""),(e=>p(e)))},X.getDateTimeFormat=function(e){return b.value[e]||{}},X.setDateTimeFormat=function(e,t){b.value[e]=t,w&&w.setDateTimeFormat(e,t),M.datetimeFormats=b.value,re(M,e,t)},X.mergeDateTimeFormat=function(e,t){b.value[e]=c(b.value[e]||{},t),w&&w.mergeDateTimeFormat(e,t),M.datetimeFormats=b.value,re(M,e,t)},X.getNumberFormat=function(e){return h.value[e]||{}},X.setNumberFormat=function(e,t){h.value[e]=t,w&&w.setNumberFormat(e,t),M.numberFormats=h.value,ce(M,e,t)},X.mergeNumberFormat=function(e,t){h.value[e]=c(h.value[e]||{},t),w&&w.mergeNumberFormat(e,t),M.numberFormats=h.value,ce(M,e,t)},X[he]=e.__injectWithOption,X[ge]=function(...e){return V((t=>{let a;const n=t;try{n.processor=x,a=Reflect.apply(K,null,[n,...e])}finally{n.processor=null}return a}),(()=>te(...e)),0,(t=>t[ge](...e)),(e=>[Fe(e)]),(e=>_(e)))},X[pe]=function(...e){return V((t=>Reflect.apply(ae,null,[t,...e])),(()=>le(...e)),0,(t=>t[pe](...e)),(()=>[]),(e=>p(e)||_(e)))},X[ve]=function(...e){return V((t=>Reflect.apply(oe,null,[t,...e])),(()=>ie(...e)),0,(t=>t[ve](...e)),(()=>[]),(e=>p(e)||_(e)))},X[be]=w,X}const We={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>"parent"===e||"global"===e,default:"parent"},i18n:{type:Object}};const we=t.defineComponent({name:"i18n-t",props:c({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>r(e)||!isNaN(e)}},We),setup(e,a){const{slots:n,attrs:l}=a,r=e.i18n||je({useScope:e.scope,__useComponent:!0});return()=>{const o=Object.keys(n).filter((e=>"_"!==e)),s={};e.locale&&(s.locale=e.locale),void 0!==e.plural&&(s.plural=p(e.plural)?+e.plural:e.plural);const i=function({slots:e},t){if(1===t.length&&"default"===t[0])return(e.default?e.default():[]).reduce(((e,t)=>[...e,...t.children?t.children:[t]]),[]);return t.reduce(((t,a)=>{const n=e[a];return n&&(t[a]=n()),t}),{})}(a,o),u=r[ge](e.keypath,i,s),m=c({},l),f=p(e.tag)||d(e.tag)?e.tag:"span";return t.h(f,m,u)}}}),Me=we;function De(e,a,n,l){const{slots:r,attrs:o}=a;return()=>{const a={part:!0};let s={};e.locale&&(a.locale=e.locale),p(e.format)?a.key=e.format:d(e.format)&&(p(e.format.key)&&(a.key=e.format.key),s=Object.keys(e.format).reduce(((t,a)=>n.includes(a)?c({},t,{[a]:e.format[a]}):t),{}));const i=l(e.value,a,s);let u=[a.key];_(i)?u=i.map(((e,t)=>{const a=r[e.type],n=a?a({[e.type]:e.value,index:t,parts:i}):[e.value];var l;return _(l=n)&&!p(l[0])&&(n[0].key=`${e.type}-${t}`),n})):p(i)&&(u=[i]);const m=c({},o),f=p(e.tag)||d(e.tag)?e.tag:"span";return t.h(f,m,u)}}const Ce=t.defineComponent({name:"i18n-n",props:c({value:{type:Number,required:!0},format:{type:[String,Object]}},We),setup(e,t){const a=e.i18n||je({useScope:"parent",__useComponent:!0});return De(e,t,se,((...e)=>a[ve](...e)))}}),Ae=Ce,Pe=t.defineComponent({name:"i18n-d",props:c({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},We),setup(e,t){const a=e.i18n||je({useScope:"parent",__useComponent:!0});return De(e,t,ne,((...e)=>a[pe](...e)))}}),Se=Pe;let $e=null;const Ue=n("global-vue-i18n");function je(e={}){const n=t.getCurrentInstance();if(null==n)throw Error(_e.MUST_BE_CALL_SETUP_TOP);if(null==$e)throw Error(_e.NOT_INSLALLED);const l=function(e){{const t=e.proxy;if(null==t)throw Error(_e.UNEXPECTED_ERROR);const a=t._i18nBridgeRoot;if(!a)throw Error(_e.NOT_INSLALLED);return a}}(n),r=function(e){return e.global}(l),i=function(e){return e.proxy.$options}(n),u=function(e,t){return s(e)?"__i18n"in t?"local":"global":e.useScope?e.useScope:"local"}(e,i);if("legacy"===l.mode&&!e.__useComponent){if(!l.allowComposition)throw Error(_e.NOT_AVAILABLE_IN_LEGACY_MODE);return function(e,a,n,l={}){const r="local"===a,s=t.shallowRef(null);if(r&&e.proxy&&!e.proxy.$options.i18n&&!e.proxy.$options.__i18n)throw Error(_e.MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION);const i=!v(l.inheritLocale)||l.inheritLocale,c=t.ref(r&&i?n.locale.value:p(l.locale)?l.locale:U),u=t.ref(r&&i?n.fallbackLocale.value:p(l.fallbackLocale)||_(l.fallbackLocale)||k(l.fallbackLocale)||!1===l.fallbackLocale?l.fallbackLocale:c.value),m=t.ref(Le(c.value,l)),f=t.ref(k(l.datetimeFormats)?l.datetimeFormats:{[c.value]:{}}),d=t.ref(k(l.numberFormats)?l.numberFormats:{[c.value]:{}}),b=r?n.missingWarn:!v(l.missingWarn)&&!o(l.missingWarn)||l.missingWarn,h=r?n.fallbackWarn:!v(l.fallbackWarn)&&!o(l.fallbackWarn)||l.fallbackWarn,y=r?n.fallbackRoot:!v(l.fallbackRoot)||l.fallbackRoot,E=!!l.fallbackFormat,L=g(l.missing)?l.missing:null,N=g(l.postTranslation)?l.postTranslation:null,I=r?n.warnHtmlMessage:!v(l.warnHtmlMessage)||l.warnHtmlMessage,F=!!l.escapeParameter,T=r?n.modifiers:k(l.modifiers)?l.modifiers:{},R=l.pluralRules||r&&n.pluralRules;function O(){return[c.value,u.value,m.value,f.value,d.value]}const W=t.computed({get:()=>s.value?s.value.locale.value:c.value,set:e=>{s.value&&(s.value.locale.value=e),c.value=e}}),w=t.computed({get:()=>s.value?s.value.fallbackLocale.value:u.value,set:e=>{s.value&&(s.value.fallbackLocale.value=e),u.value=e}}),M=t.computed((()=>s.value?s.value.messages.value:m.value)),D=t.computed((()=>f.value)),C=t.computed((()=>d.value));function A(){return s.value?s.value.getPostTranslationHandler():N}function P(e){s.value&&s.value.setPostTranslationHandler(e)}function S(){return s.value?s.value.getMissingHandler():L}function $(e){s.value&&s.value.setMissingHandler(e)}function j(e){return O(),e()}function V(...e){return s.value?j((()=>Reflect.apply(s.value.t,null,[...e]))):j((()=>""))}function H(...e){return s.value?Reflect.apply(s.value.rt,null,[...e]):""}function x(...e){return s.value?j((()=>Reflect.apply(s.value.d,null,[...e]))):j((()=>""))}function G(...e){return s.value?j((()=>Reflect.apply(s.value.n,null,[...e]))):j((()=>""))}function B(e){return s.value?s.value.tm(e):{}}function Y(e,t){return!!s.value&&s.value.te(e,t)}function X(e){return s.value?s.value.getLocaleMessage(e):{}}function z(e,t){s.value&&(s.value.setLocaleMessage(e,t),m.value[e]=t)}function J(e,t){s.value&&s.value.mergeLocaleMessage(e,t)}function q(e){return s.value?s.value.getDateTimeFormat(e):{}}function Z(e,t){s.value&&(s.value.setDateTimeFormat(e,t),f.value[e]=t)}function K(e,t){s.value&&s.value.mergeDateTimeFormat(e,t)}function Q(e){return s.value?s.value.getNumberFormat(e):{}}function ee(e,t){s.value&&(s.value.setNumberFormat(e,t),d.value[e]=t)}function te(e,t){s.value&&s.value.mergeNumberFormat(e,t)}const ae={get id(){return s.value?s.value.id:-1},locale:W,fallbackLocale:w,messages:M,datetimeFormats:D,numberFormats:C,get inheritLocale(){return s.value?s.value.inheritLocale:i},set inheritLocale(e){s.value&&(s.value.inheritLocale=e)},get availableLocales(){return s.value?s.value.availableLocales:Object.keys(m.value)},get modifiers(){return s.value?s.value.modifiers:T},get pluralRules(){return s.value?s.value.pluralRules:R},get isGlobal(){return!!s.value&&s.value.isGlobal},get missingWarn(){return s.value?s.value.missingWarn:b},set missingWarn(e){s.value&&(s.value.missingWarn=e)},get fallbackWarn(){return s.value?s.value.fallbackWarn:h},set fallbackWarn(e){s.value&&(s.value.missingWarn=e)},get fallbackRoot(){return s.value?s.value.fallbackRoot:y},set fallbackRoot(e){s.value&&(s.value.fallbackRoot=e)},get fallbackFormat(){return s.value?s.value.fallbackFormat:E},set fallbackFormat(e){s.value&&(s.value.fallbackFormat=e)},get warnHtmlMessage(){return s.value?s.value.warnHtmlMessage:I},set warnHtmlMessage(e){s.value&&(s.value.warnHtmlMessage=e)},get escapeParameter(){return s.value?s.value.escapeParameter:F},set escapeParameter(e){s.value&&(s.value.escapeParameter=e)},t:V,getPostTranslationHandler:A,setPostTranslationHandler:P,getMissingHandler:S,setMissingHandler:$,rt:H,d:x,n:G,tm:B,te:Y,getLocaleMessage:X,setLocaleMessage:z,mergeLocaleMessage:J,getDateTimeFormat:q,setDateTimeFormat:Z,mergeDateTimeFormat:K,getNumberFormat:Q,setNumberFormat:ee,mergeNumberFormat:te};function ne(e){e.locale.value=c.value,e.fallbackLocale.value=u.value,Object.keys(m.value).forEach((t=>{e.mergeLocaleMessage(t,m.value[t])})),Object.keys(f.value).forEach((t=>{e.mergeDateTimeFormat(t,f.value[t])})),Object.keys(d.value).forEach((t=>{e.mergeNumberFormat(t,d.value[t])})),e.escapeParameter=F,e.fallbackFormat=E,e.fallbackRoot=y,e.fallbackWarn=h,e.missingWarn=b,e.warnHtmlMessage=I}return t.onBeforeMount((()=>{if(null==e.proxy||null==e.proxy.$i18n)throw Error(_e.NOT_AVAILABLE_COMPOSITION_IN_LEGACY);const t=s.value=e.proxy.$i18n.__composer;"global"===a?(c.value=t.locale.value,u.value=t.fallbackLocale.value,m.value=t.messages.value,f.value=t.datetimeFormats.value,d.value=t.numberFormats.value):r&&ne(t)})),ae}(n,u,r,e)}if("global"===u)return function(e,t,a){let n=d(t.messages)?t.messages:{};"__i18nGlobal"in a&&(n=Le(e.locale.value,{messages:n,__i18n:a.__i18nGlobal}));const l=Object.keys(n);if(l.length&&l.forEach((t=>{e.mergeLocaleMessage(t,n[t])})),d(t.datetimeFormats)){const a=Object.keys(t.datetimeFormats);a.length&&a.forEach((a=>{e.mergeDateTimeFormat(a,t.datetimeFormats[a])}))}if(d(t.numberFormats)){const a=Object.keys(t.numberFormats);a.length&&a.forEach((a=>{e.mergeNumberFormat(a,t.numberFormats[a])}))}}(r,e,i),r;if("parent"===u){let t=function(e,t,a=!1){let n=null;const l=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,a&&n&&!n[he]&&(n=null))}if(null!=n)break;if(l===r)break;r=r.parent}return n}(l,n,e.__useComponent);return null==t&&(t=r),t}const m=l;let f=m.__getInstance(n);if(null==f){const l=c({},e);"__i18n"in i&&(l.__i18n=i.__i18n),r&&(l.__root=r),f=Oe(l,$e),m.__composerExtend&&m.__composerExtend(f),function(e,n,l){{const r=n.proxy;if(null==r)throw Error(_e.UNEXPECTED_ERROR);const o=l[be];if(o===e)throw Error(_e.UNEXPECTED_ERROR);r._i18n=o,r._i18n_bridge=!0,a&&(r._i18nWatcher=r._i18n.watchI18nData(),r._i18n._sync&&(r._localeWatcher=r._i18n.watchLocale()));let s=!1;t.onBeforeMount((()=>{r._i18n.subscribeDataChanging(r),s=!0})),t.onUnmounted((()=>{s&&(r._i18n.unsubscribeDataChanging(r),s=!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}))}}(m,n,f),m.__setInstance(n,f)}return f}return V=function(e,t){if(!d(e))return null;let a=F.get(t);if(a||(a=function(e){const t=[];let a,n,l,r,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++,l="\\"+t,f[0](),!0}for(f[0]=()=>{void 0===n?n=l:n+=l},f[1]=()=>{void 0!==n&&(t.push(n),n=void 0)},f[2]=()=>{f[0](),m++},f[3]=()=>{if(m>0)m--,u=4,f[0]();else{if(m=0,void 0===n)return!1;if(n=I(n),!1===n)return!1;f[1]()}};null!==u;)if(c++,a=e[c],"\\"!==a||!_()){if(r=N(a),i=E[u],o=i[r]||i.l||8,8===o)return;if(u=o[0],void 0!==o[1]&&(s=f[o[1]],s&&(l=a,!1===s())))return;if(7===u)return t}}(t),a&&F.set(t,a)),!a)return null;const n=a.length;let l=e,r=0;for(;r<n;){const e=l[a[r]];if(void 0===e)return null;l=e,r++}return l},H=A,e.DatetimeFormat=Pe,e.I18nD=Se,e.I18nInjectionKey=Ue,e.I18nN=Ae,e.I18nT=Me,e.NumberFormat=Ce,e.Translation=we,e.VERSION=ue,e.castToVueI18n=e=>{if(!(ke in e))throw Error(_e.NOT_COMPATIBLE_LEGACY_VUE_I18N);return e},e.createI18n=function(e={},a){$e=a;const n=!v(e.legacy)||e.legacy,l=!v(e.globalInjection)||e.globalInjection,r=!n||!!e.allowComposition,o=new Map,[s,i]=function(e,a,n){const l=t.effectScope();{if(!ye(n))throw Error(_e.NOT_COMPATIBLE_LEGACY_VUE_I18N);const t=l.run((()=>Oe(e,n)));if(null==t)throw Error(_e.UNEXPECTED_ERROR);return[l,t]}}(e,0,a);{const e=i[be];let t=null;Object.defineProperty(e,"global",{get:()=>i}),Object.defineProperty(e,"mode",{get:()=>n?"legacy":"composition"}),Object.defineProperty(e,"allowComposition",{get:()=>r}),Object.defineProperty(e,"__instances",{get:()=>o}),Object.defineProperty(e,"install",{writable:!0,value:(a,...r)=>{if(2!==(a&&a.version&&Number(a.version.split(".")[0])||-1))throw Error(_e.BRIDGE_SUPPORT_VUE_2_ONLY);!function(e,...t){const a=k(t[0])?t[0]:{};(!v(a.globalInstall)||a.globalInstall)&&(e.component(we.name,we),e.component(Ce.name,Ce),e.component(Pe.name,Pe))}(a,...r),!n&&l&&(t=function(e,t,a){const n=t.watchLocale(a);return e.prototype.$t=function(...e){return Reflect.apply(a.t,a,[...e])},e.prototype.$d=function(...e){return Reflect.apply(a.d,a,[...e])},e.prototype.$n=function(...e){return Reflect.apply(a.n,a,[...e])},n}(a,e,i)),a.mixin(function(e,t){return{beforeCreate(){const a=this.$options;if(!a.__VUE18N__INSTANCE__)if(a.i18n=a.i18n||(a.__i18nBridge?{}:null),this._i18nBridgeRoot=e,"composition"!==e.mode)if(a.i18n){if(a.i18n instanceof t){if(a.__i18nBridge)try{const e=a.i18n&&a.i18n.messages?a.i18n.messages:{};a.__i18nBridge.forEach((t=>Ie(JSON.parse(t),e))),Object.keys(e).forEach((t=>{a.i18n.mergeLocaleMessage(t,e[t])}))}catch(e){}this._i18n=a.i18n,this._i18nWatcher=this._i18n.watchI18nData()}else if(k(a.i18n)){const e=this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof t?this.$root.$i18n:null;if(e&&(a.i18n.root=this.$root,a.i18n.formatter=e.formatter,a.i18n.fallbackLocale=e.fallbackLocale,a.i18n.formatFallbackMessages=e.formatFallbackMessages,a.i18n.silentTranslationWarn=e.silentTranslationWarn,a.i18n.silentFallbackWarn=e.silentFallbackWarn,a.i18n.pluralizationRules=e.pluralizationRules,a.i18n.preserveDirectiveContent=e.preserveDirectiveContent),a.__i18nBridge)try{const e=a.i18n&&a.i18n.messages?a.i18n.messages:{};a.__i18nBridge.forEach((t=>Ie(JSON.parse(t),e))),a.i18n.messages=e}catch(e){}const{sharedMessages:n}=a.i18n;n&&k(n)&&Ie(n,a.i18n.messages),this._i18n=new t(a.i18n),this._i18nWatcher=this._i18n.watchI18nData(),(void 0===a.i18n.sync||a.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:a.parent&&a.parent.$i18n&&a.parent.$i18n instanceof t&&(this._i18n=a.parent.$i18n);else this._i18n=e},beforeMount(){const a=this.$options;a.__VUE18N__INSTANCE__||"composition"!==e.mode&&(a.i18n=a.i18n||(a.__i18nBridge?{}:null),a.i18n?(a.i18n instanceof t||k(a.i18n))&&(this._i18n.subscribeDataChanging(this),this._subscribing=!0):(this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof t||a.parent&&a.parent.$i18n&&a.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,$e))}}),Object.defineProperty(e,"dispose",{value:()=>{t&&t(),s.stop()}});const a={__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(a).forEach((t=>Object.defineProperty(e,t,{value:a[t]}))),e}},e.useI18n=je,Object.defineProperty(e,"__esModule",{value:!0}),e}({},VueDemi); | ||
var VueI18nBridge=function(e,t){"use strict";const a="undefined"!=typeof window,n=(e,t=!1)=>t?Symbol.for(e):Symbol(e),l=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),r=e=>"number"==typeof e&&isFinite(e),o=e=>"[object RegExp]"===h(e),s=e=>k(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,v=e=>"boolean"==typeof e,d=e=>null!==e&&"object"==typeof e,b=Object.prototype.toString,h=e=>b.call(e),k=e=>"[object Object]"===h(e),y=15,E=[];E[0]={w:[0],i:[3,0],"[":[4],o:[7]},E[1]={w:[1],".":[2],"[":[4],o:[7]},E[2]={w:[2],i:[3,0],0:[3,0]},E[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},E[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},E[5]={"'":[4,0],o:8,l:[5,0]},E[6]={'"':[4,0],o:8,l:[6,0]};const L=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function N(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)))&&(a=t,L.test(a)?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);var a}const F=new Map;function T(e,t){return d(e)?e[t]:null}const R=e=>e,O=e=>"",W=e=>0===e.length?"":e.join(""),w=e=>null==e?"":_(e)||k(e)&&e.toString===b?JSON.stringify(e,null,2):String(e);function M(e,t){return e=Math.abs(e),2===t?e?e>1?1:0:1:e?Math.min(e,2):0}function D(e={}){const t=e.locale,a=function(e){const t=r(e.pluralIndex)?e.pluralIndex:-1;return e.named&&(r(e.named.count)||r(e.named.n))?r(e.named.count)?e.named.count:r(e.named.n)?e.named.n:t:t}(e),n=d(e.pluralRules)&&p(t)&&g(e.pluralRules[t])?e.pluralRules[t]:M,l=d(e.pluralRules)&&p(t)&&g(e.pluralRules[t])?M:void 0,o=e.list||[],s=e.named||{};r(e.pluralIndex)&&function(e,t){t.count||(t.count=e),t.n||(t.n=e)}(a,s);function i(t){const a=g(e.messages)?e.messages(t):!!d(e.messages)&&e.messages[t];return a||(e.parent?e.parent.message(t):O)}const c=k(e.processor)&&g(e.processor.normalize)?e.processor.normalize:W,u=k(e.processor)&&g(e.processor.interpolate)?e.processor.interpolate:w,m={list:e=>o[e],named:e=>s[e],plural:e=>e[n(a,e.length,l)],linked:(t,...a)=>{const[n,l]=a;let r="text",o="";1===a.length?d(n)?(o=n.modifier||o,r=n.type||r):p(n)&&(o=n||o):2===a.length&&(p(n)&&(o=n||o),p(l)&&(r=l||r));let s=i(t)(m);return"vnode"===r&&_(s)&&o&&(s=s[0]),o?(c=o,e.modifiers?e.modifiers[c]:R)(s,r):s;var c},message:i,type:k(e.processor)&&p(e.processor.type)?e.processor.type:"text",interpolate:u,normalize:c};return m}function C(e,t,a){return[...new Set([a,..._(t)?t:d(t)?Object.keys(t):p(t)?[t]:[a]])]}function A(e,t,a){const n=p(a)?a:U,l=e;l.__localeChainCache||(l.__localeChainCache=new Map);let r=l.__localeChainCache.get(n);if(!r){r=[];let e=[a];for(;_(e);)e=P(r,e,t);const o=_(t)||!k(t)?t:t.default?t.default:null;e=p(o)?[o]:o,_(e)&&P(r,e,!1),l.__localeChainCache.set(n,r)}return r}function P(e,t,a){let n=!0;for(let l=0;l<t.length&&v(n);l++){const r=t[l];p(r)&&(n=S(e,t[l],a))}return n}function S(e,t,a){let n;const l=t.split("-");do{n=$(e,l.join("-"),a),l.splice(-1,1)}while(l.length&&!0===n);return n}function $(e,t,a){let n=!1;if(!e.includes(t)&&(n=!0,t)){n="!"!==t[t.length-1];const l=t.replace(/!/g,"");e.push(l),(_(a)||k(a))&&a[l]&&(n=a[l])}return n}const U="en-US",j=e=>`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;let V,H;let x=0;function G(e={}){const t=p(e.version)?e.version:"9.3.0-beta.16",a=p(e.locale)?e.locale:U,n=_(e.fallbackLocale)||k(e.fallbackLocale)||p(e.fallbackLocale)||!1===e.fallbackLocale?e.fallbackLocale:a,l=k(e.messages)?e.messages:{[a]:{}},r=k(e.datetimeFormats)?e.datetimeFormats:{[a]:{}},s=k(e.numberFormats)?e.numberFormats:{[a]:{}},u=c({},e.modifiers||{},{upper:(e,t)=>"text"===t&&p(e)?e.toUpperCase():"vnode"===t&&d(e)&&"__v_isVNode"in e?e.children.toUpperCase():e,lower:(e,t)=>"text"===t&&p(e)?e.toLowerCase():"vnode"===t&&d(e)&&"__v_isVNode"in e?e.children.toLowerCase():e,capitalize:(e,t)=>"text"===t&&p(e)?j(e):"vnode"===t&&d(e)&&"__v_isVNode"in e?j(e.children):e}),m=e.pluralRules||{},f=g(e.missing)?e.missing:null,b=!v(e.missingWarn)&&!o(e.missingWarn)||e.missingWarn,h=!v(e.fallbackWarn)&&!o(e.fallbackWarn)||e.fallbackWarn,y=!!e.fallbackFormat,E=!!e.unresolving,L=g(e.postTranslation)?e.postTranslation:null,N=k(e.processor)?e.processor:null,I=!v(e.warnHtmlMessage)||e.warnHtmlMessage,F=!!e.escapeParameter,R=g(e.messageCompiler)?e.messageCompiler:undefined,O=g(e.messageResolver)?e.messageResolver:V||T,W=g(e.localeFallbacker)?e.localeFallbacker:H||C,w=d(e.fallbackContext)?e.fallbackContext:void 0,M=g(e.onWarn)?e.onWarn:i,D=e,A=d(D.__datetimeFormatters)?D.__datetimeFormatters:new Map,P=d(D.__numberFormatters)?D.__numberFormatters:new Map,S=d(D.__meta)?D.__meta:{};x++;const $={version:t,cid:x,locale:a,fallbackLocale:n,messages:l,modifiers:u,pluralRules:m,missing:f,missingWarn:b,fallbackWarn:h,fallbackFormat:y,unresolving:E,postTranslation:L,processor:N,warnHtmlMessage:I,escapeParameter:F,messageCompiler:R,messageResolver:O,localeFallbacker:W,fallbackContext:w,onWarn:M,__meta:S};return $.datetimeFormats=r,$.numberFormats=s,$.__datetimeFormatters=A,$.__numberFormatters=P,$}function B(e,t,a,n,l){const{missing:r,onWarn:o}=e;if(null!==r){const n=r(e,a,t,l);return p(n)?n:t}return t}function Y(e,t,a){e.__localeChainCache=new Map,e.localeFallbacker(e,a,t)}let X=y;const z=()=>++X,J={INVALID_ARGUMENT:X,INVALID_DATE_ARGUMENT:z(),INVALID_ISO_DATE_ARGUMENT:z(),__EXTEND_POINT__:z()},q=()=>"",Z=e=>g(e);function K(e,...t){const{fallbackFormat:a,postTranslation:n,unresolving:l,messageCompiler:o,fallbackLocale:s,messages:i}=e,[c,m]=te(...t),f=v(m.missingWarn)?m.missingWarn:e.missingWarn,g=v(m.fallbackWarn)?m.fallbackWarn:e.fallbackWarn,b=v(m.escapeParameter)?m.escapeParameter:e.escapeParameter,h=!!m.resolvedMessage,k=p(m.default)||v(m.default)?v(m.default)?o?c:()=>c:m.default:a?o?c:()=>c:"",y=a||""!==k,E=p(m.locale)?m.locale:e.locale;b&&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]))}))}(m);let[L,N,I]=h?[c,E,i[E]||{}]:Q(e,c,E,s,g,f),F=L,T=c;if(h||p(F)||Z(F)||y&&(F=k,T=F),!(h||(p(F)||Z(F))&&p(N)))return l?-1:c;let R=!1;const O=Z(F)?F:ee(e,c,N,F,T,(()=>{R=!0}));if(R)return F;const W=function(e,t,a,n){const{modifiers:l,pluralRules:o,messageResolver:s,fallbackLocale:i,fallbackWarn:c,missingWarn:u,fallbackContext:m}=e,f=n=>{let l=s(a,n);if(null==l&&m){const[,,e]=Q(m,n,t,i,c,u);l=s(e,n)}if(p(l)){let a=!1;const r=ee(e,n,t,l,n,(()=>{a=!0}));return a?q:r}return Z(l)?l:q},_={locale:t,modifiers:l,pluralRules:o,messages:f};e.processor&&(_.processor=e.processor);n.list&&(_.list=n.list);n.named&&(_.named=n.named);r(n.plural)&&(_.pluralIndex=n.plural);return _}(e,N,I,m),w=function(e,t,a){return t(a)}(0,O,D(W));return n?n(w,c):w}function Q(e,t,a,n,l,r){const{messages:o,onWarn:s,messageResolver:i,localeFallbacker:c}=e,u=c(e,n,a);let m,f={},_=null;for(let a=0;a<u.length&&(m=u[a],f=o[m]||{},null===(_=i(f,t))&&(_=f[t]),!p(_)&&!g(_));a++){const a=B(e,t,m,0,"translate");a!==t&&(_=a)}return[_,m,f]}function ee(e,t,a,n,r,o){const{messageCompiler:s,warnHtmlMessage:i}=e;if(Z(n)){const e=n;return e.locale=e.locale||a,e.key=e.key||t,e}if(null==s){const e=()=>n;return e.locale=a,e.key=t,e}const c=s(n,function(e,t,a,n,r,o){return{warnHtmlMessage:r,onError:e=>{throw o&&o(e),e},onCacheKey:e=>((e,t,a)=>l({l:e,k:t,s:a}))(t,a,e)}}(0,a,r,0,i,o));return c.locale=a,c.key=t,c.source=n,c}function te(...e){const[t,a,n]=e,l={};if(!p(t)&&!r(t)&&!Z(t))throw Error(J.INVALID_ARGUMENT);const o=r(t)?String(t):(Z(t),t);return r(a)?l.plural=a:p(a)?l.default=a:k(a)&&!s(a)?l.named=a:_(a)&&(l.list=a),r(n)?l.plural=n:p(n)?l.default=n:k(n)&&c(l,n),[o,l]}function ae(e,...t){const{datetimeFormats:a,unresolving:n,fallbackLocale:l,onWarn:r,localeFallbacker:o}=e,{__datetimeFormatters:i}=e,[u,m,f,_]=le(...t);v(f.missingWarn)?f.missingWarn:e.missingWarn;v(f.fallbackWarn)?f.fallbackWarn:e.fallbackWarn;const g=!!f.part,d=p(f.locale)?f.locale:e.locale,b=o(e,l,d);if(!p(u)||""===u)return new Intl.DateTimeFormat(d,_).format(m);let h,y={},E=null;for(let t=0;t<b.length&&(h=b[t],y=a[h]||{},E=y[u],!k(E));t++)B(e,u,h,0,"datetime format");if(!k(E)||!p(h))return n?-1:u;let L=`${h}__${u}`;s(_)||(L=`${L}__${JSON.stringify(_)}`);let N=i.get(L);return N||(N=new Intl.DateTimeFormat(h,c({},E,_)),i.set(L,N)),g?N.formatToParts(m):N.format(m)}const ne=["localeMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName","formatMatcher","hour12","timeZone","dateStyle","timeStyle","calendar","dayPeriod","numberingSystem","hourCycle","fractionalSecondDigits"];function le(...e){const[t,a,n,l]=e,o={};let s,i={};if(p(t)){const e=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!e)throw Error(J.INVALID_ISO_DATE_ARGUMENT);const a=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(a);try{s.toISOString()}catch(e){throw Error(J.INVALID_ISO_DATE_ARGUMENT)}}else if("[object Date]"===h(t)){if(isNaN(t.getTime()))throw Error(J.INVALID_DATE_ARGUMENT);s=t}else{if(!r(t))throw Error(J.INVALID_ARGUMENT);s=t}return p(a)?o.key=a:k(a)&&Object.keys(a).forEach((e=>{ne.includes(e)?i[e]=a[e]:o[e]=a[e]})),p(n)?o.locale=n:k(n)&&(i=n),k(l)&&(i=l),[o.key||"",s,o,i]}function re(e,t,a){const n=e;for(const e in a){const a=`${t}__${e}`;n.__datetimeFormatters.has(a)&&n.__datetimeFormatters.delete(a)}}function oe(e,...t){const{numberFormats:a,unresolving:n,fallbackLocale:l,onWarn:r,localeFallbacker:o}=e,{__numberFormatters:i}=e,[u,m,f,_]=ie(...t);v(f.missingWarn)?f.missingWarn:e.missingWarn;v(f.fallbackWarn)?f.fallbackWarn:e.fallbackWarn;const g=!!f.part,d=p(f.locale)?f.locale:e.locale,b=o(e,l,d);if(!p(u)||""===u)return new Intl.NumberFormat(d,_).format(m);let h,y={},E=null;for(let t=0;t<b.length&&(h=b[t],y=a[h]||{},E=y[u],!k(E));t++)B(e,u,h,0,"number format");if(!k(E)||!p(h))return n?-1:u;let L=`${h}__${u}`;s(_)||(L=`${L}__${JSON.stringify(_)}`);let N=i.get(L);return N||(N=new Intl.NumberFormat(h,c({},E,_)),i.set(L,N)),g?N.formatToParts(m):N.format(m)}const se=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function ie(...e){const[t,a,n,l]=e,o={};let s={};if(!r(t))throw Error(J.INVALID_ARGUMENT);const i=t;return p(a)?o.key=a:k(a)&&Object.keys(a).forEach((e=>{se.includes(e)?s[e]=a[e]:o[e]=a[e]})),p(n)?o.locale=n:k(n)&&(s=n),k(l)&&(s=l),[o.key||"",i,o,s]}function ce(e,t,a){const n=e;for(const e in a){const a=`${t}__${e}`;n.__numberFormatters.has(a)&&n.__numberFormatters.delete(a)}}const ue="9.3.0-beta.16";let me=y;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(),MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION:fe(),NOT_AVAILABLE_COMPOSITION_IN_LEGACY:fe(),__EXTEND_POINT__:fe()},ge=n("__translateVNode"),pe=n("__datetimeParts"),ve=n("__numberParts"),de=n("__setPluralRules"),be=n("__legacyVueI18n"),he=n("__injectWithOption"),ke="__VUE_I18N_BRIDGE__";function ye(e){return null!=e&&null!=e.version&&(Number(e.version.split(".")[0])||-1)>=8}function Ee(e){if(!d(e))return e;for(const t in e)if(f(e,t))if(t.includes(".")){const a=t.split("."),n=a.length-1;let l=e;for(let e=0;e<n;e++)a[e]in l||(l[a[e]]={}),l=l[a[e]];l[a[n]]=e[t],delete e[t],d(l[a[n]])&&Ee(l[a[n]])}else d(e[t])&&Ee(e[t]);return e}function Le(e,t){const{messages:a,__i18n:n,messageResolver:l,flatJson:r}=t,o=k(a)?a:_(n)?{}:{[e]:{}};if(_(n)&&n.forEach((e=>{if("locale"in e&&"resource"in e){const{locale:t,resource:a}=e;t?(o[t]=o[t]||{},Ie(a,o[t])):Ie(a,o)}else p(e)&&Ie(JSON.parse(e),o)})),null==l&&r)for(const e in o)f(o,e)&&Ee(o[e]);return o}const Ne=e=>!d(e)||_(e);function Ie(e,t){if(Ne(e)||Ne(t))throw Error(_e.INVALID_VALUE);for(const a in e)f(e,a)&&(Ne(e[a])||Ne(t[a])?t[a]=e[a]:Ie(e[a],t[a]))}function Fe(e){return function(e){const t=void 0;return{tag:void 0,data:void 0,children:void 0,text:e,elm:void 0,ns:void 0,context:void 0,fnContext:void 0,fnOptions:void 0,fnScopeId:void 0,key:void 0,componentOptions:void 0,componentInstance:t,parent:void 0,raw:!1,isStatic:!1,isRootInsert:!0,isComment:!1,isCloned:!1,isOnce:!1,asyncFactory:void 0,asyncMeta:void 0,isAsyncPlaceholder:!1,child:()=>t}}(e)}let Te=0;function Re(e){return(a,n,l,r)=>e(n,l,t.getCurrentInstance()||void 0,r)}function Oe(e={},n){const{__root:l}=e,s=void 0===l;let i=!v(e.inheritLocale)||e.inheritLocale;const u=t.ref(l&&i?l.locale.value:p(e.locale)?e.locale:U),m=t.ref(l&&i?l.fallbackLocale.value:p(e.fallbackLocale)||_(e.fallbackLocale)||k(e.fallbackLocale)||!1===e.fallbackLocale?e.fallbackLocale:u.value),f=t.ref(Le(u.value,e)),b=t.ref(k(e.datetimeFormats)?e.datetimeFormats:{[u.value]:{}}),h=t.ref(k(e.numberFormats)?e.numberFormats:{[u.value]:{}});let y=l?l.missingWarn:!v(e.missingWarn)&&!o(e.missingWarn)||e.missingWarn,E=l?l.fallbackWarn:!v(e.fallbackWarn)&&!o(e.fallbackWarn)||e.fallbackWarn,L=l?l.fallbackRoot:!v(e.fallbackRoot)||e.fallbackRoot,N=!!e.fallbackFormat,I=g(e.missing)?e.missing:null,F=g(e.missing)?Re(e.missing):null,T=g(e.postTranslation)?e.postTranslation:null,R=l?l.warnHtmlMessage:!v(e.warnHtmlMessage)||e.warnHtmlMessage,O=!!e.escapeParameter;const W=l?l.modifiers:k(e.modifiers)?e.modifiers:{};let w,M,D=e.pluralRules||l&&l.pluralRules;{ye(n);const e={locale:u.value,fallbackLocale:m.value,messages:f.value,dateTimeFormats:b.value,numberFormats:h.value,modifiers:W,missing:I,fallbackRoot:L,postTranslation:T,pluralizationRules:D,escapeParameterHtml:O,sync:i,silentFallbackWarn:v(E)?!E:E,silentTranslationWarn:v(y)?!y:y,formatFallbackMessages:v(N)?!N:N,warnHtmlInMessage:v(R)&&R?"warn":"off",__VUE_I18N_BRIDGE__:ke};w=new n(e)}M=(()=>{const t={version:ue,locale:u.value,fallbackLocale:m.value,messages:f.value,modifiers:W,pluralRules:D,missing:null===F?void 0:F,missingWarn:y,fallbackWarn:E,fallbackFormat:N,unresolving:!0,postTranslation:null===T?void 0:T,warnHtmlMessage:R,escapeParameter:O,messageResolver:e.messageResolver,__meta:{framework:"vue"}};t.datetimeFormats=b.value,t.numberFormats=h.value,t.__datetimeFormatters=k(M)?M.__datetimeFormatters:void 0,t.__numberFormatters=k(M)?M.__numberFormatters:void 0;return G(t)})(),Y(M,u.value,m.value);const C=t.computed({get:()=>u.value,set:e=>{u.value=e,w&&!s&&(w.locale=e),M.locale=u.value}}),P=t.computed({get:()=>m.value,set:e=>{m.value=e,w&&!s&&(w.fallbackLocale=e),M.fallbackLocale=m.value,Y(M,u.value,e)}}),S=t.computed((()=>f.value)),$=t.computed((()=>b.value)),j=t.computed((()=>h.value));const V=(e,t,a,n,o,s)=>{let i;if(u.value,m.value,f.value,b.value,h.value,i=e(M),r(i)&&-1===i){const[e,a]=t();return l&&L?n(l):o(e)}if(s(i))return i;throw Error(_e.UNEXPECTED_RETURN_TYPE)};function H(...e){return V((t=>Reflect.apply(K,null,[t,...e])),(()=>te(...e)),0,(t=>Reflect.apply(t.t,t,[...e])),(e=>e),(e=>p(e)))}const x={normalize:function(e){return e.map((e=>p(e)||r(e)||v(e)?Fe(String(e)):e))},interpolate:e=>e,type:"vnode"};function B(e){return f.value[e]||{}}Te++,l&&a&&(t.watch(l.locale,(e=>{i&&(u.value=e,w&&!s&&(w.locale=e),M.locale=e,Y(M,u.value,m.value))})),t.watch(l.fallbackLocale,(e=>{i&&(m.value=e,w&&!s&&(w.fallbackLocale=e),M.fallbackLocale=e,Y(M,u.value,m.value))})));const X={id:Te,locale:C,fallbackLocale:P,get inheritLocale(){return i},set inheritLocale(e){i=e,w&&(w._sync=e),e&&l&&(u.value=l.locale.value,m.value=l.fallbackLocale.value,w&&(w.locale=l.locale.value,w.fallbackLocale=l.fallbackLocale.value),Y(M,u.value,m.value))},get availableLocales(){return Object.keys(f.value).sort()},messages:S,get modifiers(){return W},get pluralRules(){return D||{}},get isGlobal(){return s},get missingWarn(){return y},set missingWarn(e){y=e,M.missingWarn=y},get fallbackWarn(){return E},set fallbackWarn(e){E=e,M.fallbackWarn=E},get fallbackRoot(){return L},set fallbackRoot(e){L=e},get fallbackFormat(){return N},set fallbackFormat(e){N=e,M.fallbackFormat=N},get warnHtmlMessage(){return R},set warnHtmlMessage(e){R=e,M.warnHtmlMessage=e},get escapeParameter(){return O},set escapeParameter(e){O=e,M.escapeParameter=e},t:H,getLocaleMessage:B,setLocaleMessage:function(e,t){f.value[e]=t,w&&w.setLocaleMessage(e,t),M.messages=f.value},mergeLocaleMessage:function(e,t){f.value[e]=f.value[e]||{},w&&w.mergeLocaleMessage(e,t),Ie(t,f.value[e]),M.messages=f.value},getPostTranslationHandler:function(){return g(T)?T:null},setPostTranslationHandler:function(e){T=e,M.postTranslation=e},getMissingHandler:function(){return I},setMissingHandler:function(e){null!==e&&(F=Re(e)),I=e,M.missing=F},[de]:function(e){D=e,M.pluralRules=D}};return X.datetimeFormats=$,X.numberFormats=j,X.rt=function(...e){const[t,a,n]=e;if(n&&!d(n))throw Error(_e.INVALID_ARGUMENT);return H(t,a,c({resolvedMessage:!0},n||{}))},X.te=function(e,t){const a=B(p(t)?t:u.value);return null!==M.messageResolver(a,e)},X.tm=function(e){const t=function(e){let t=null;const a=A(M,m.value,u.value);for(let n=0;n<a.length;n++){const l=f.value[a[n]]||{},r=M.messageResolver(l,e);if(null!=r){t=r;break}}return t}(e);return null!=t?t:l&&l.tm(e)||{}},X.d=function(...e){return V((t=>Reflect.apply(ae,null,[t,...e])),(()=>le(...e)),0,(t=>Reflect.apply(t.d,t,[...e])),(()=>""),(e=>p(e)))},X.n=function(...e){return V((t=>Reflect.apply(oe,null,[t,...e])),(()=>ie(...e)),0,(t=>Reflect.apply(t.n,t,[...e])),(()=>""),(e=>p(e)))},X.getDateTimeFormat=function(e){return b.value[e]||{}},X.setDateTimeFormat=function(e,t){b.value[e]=t,w&&w.setDateTimeFormat(e,t),M.datetimeFormats=b.value,re(M,e,t)},X.mergeDateTimeFormat=function(e,t){b.value[e]=c(b.value[e]||{},t),w&&w.mergeDateTimeFormat(e,t),M.datetimeFormats=b.value,re(M,e,t)},X.getNumberFormat=function(e){return h.value[e]||{}},X.setNumberFormat=function(e,t){h.value[e]=t,w&&w.setNumberFormat(e,t),M.numberFormats=h.value,ce(M,e,t)},X.mergeNumberFormat=function(e,t){h.value[e]=c(h.value[e]||{},t),w&&w.mergeNumberFormat(e,t),M.numberFormats=h.value,ce(M,e,t)},X[he]=e.__injectWithOption,X[ge]=function(...e){return V((t=>{let a;const n=t;try{n.processor=x,a=Reflect.apply(K,null,[n,...e])}finally{n.processor=null}return a}),(()=>te(...e)),0,(t=>t[ge](...e)),(e=>[Fe(e)]),(e=>_(e)))},X[pe]=function(...e){return V((t=>Reflect.apply(ae,null,[t,...e])),(()=>le(...e)),0,(t=>t[pe](...e)),(()=>[]),(e=>p(e)||_(e)))},X[ve]=function(...e){return V((t=>Reflect.apply(oe,null,[t,...e])),(()=>ie(...e)),0,(t=>t[ve](...e)),(()=>[]),(e=>p(e)||_(e)))},X[be]=w,X}const We={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>"parent"===e||"global"===e,default:"parent"},i18n:{type:Object}};const we=t.defineComponent({name:"i18n-t",props:c({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>r(e)||!isNaN(e)}},We),setup(e,a){const{slots:n,attrs:l}=a,r=e.i18n||je({useScope:e.scope,__useComponent:!0});return()=>{const o=Object.keys(n).filter((e=>"_"!==e)),s={};e.locale&&(s.locale=e.locale),void 0!==e.plural&&(s.plural=p(e.plural)?+e.plural:e.plural);const i=function({slots:e},t){if(1===t.length&&"default"===t[0])return(e.default?e.default():[]).reduce(((e,t)=>[...e,...t.children?t.children:[t]]),[]);return t.reduce(((t,a)=>{const n=e[a];return n&&(t[a]=n()),t}),{})}(a,o),u=r[ge](e.keypath,i,s),m=c({},l),f=p(e.tag)||d(e.tag)?e.tag:"span";return t.h(f,m,u)}}}),Me=we;function De(e,a,n,l){const{slots:r,attrs:o}=a;return()=>{const a={part:!0};let s={};e.locale&&(a.locale=e.locale),p(e.format)?a.key=e.format:d(e.format)&&(p(e.format.key)&&(a.key=e.format.key),s=Object.keys(e.format).reduce(((t,a)=>n.includes(a)?c({},t,{[a]:e.format[a]}):t),{}));const i=l(e.value,a,s);let u=[a.key];_(i)?u=i.map(((e,t)=>{const a=r[e.type],n=a?a({[e.type]:e.value,index:t,parts:i}):[e.value];var l;return _(l=n)&&!p(l[0])&&(n[0].key=`${e.type}-${t}`),n})):p(i)&&(u=[i]);const m=c({},o),f=p(e.tag)||d(e.tag)?e.tag:"span";return t.h(f,m,u)}}const Ce=t.defineComponent({name:"i18n-n",props:c({value:{type:Number,required:!0},format:{type:[String,Object]}},We),setup(e,t){const a=e.i18n||je({useScope:"parent",__useComponent:!0});return De(e,t,se,((...e)=>a[ve](...e)))}}),Ae=Ce,Pe=t.defineComponent({name:"i18n-d",props:c({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},We),setup(e,t){const a=e.i18n||je({useScope:"parent",__useComponent:!0});return De(e,t,ne,((...e)=>a[pe](...e)))}}),Se=Pe;let $e=null;const Ue=n("global-vue-i18n");function je(e={}){const n=t.getCurrentInstance();if(null==n)throw Error(_e.MUST_BE_CALL_SETUP_TOP);if(null==$e)throw Error(_e.NOT_INSLALLED);const l=function(e){{const t=e.proxy;if(null==t)throw Error(_e.UNEXPECTED_ERROR);const a=t._i18nBridgeRoot;if(!a)throw Error(_e.NOT_INSLALLED);return a}}(n),r=function(e){return e.global}(l),i=function(e){return e.proxy.$options}(n),u=function(e,t){return s(e)?"__i18n"in t?"local":"global":e.useScope?e.useScope:"local"}(e,i);if("legacy"===l.mode&&!e.__useComponent){if(!l.allowComposition)throw Error(_e.NOT_AVAILABLE_IN_LEGACY_MODE);return function(e,a,n,l={}){const r="local"===a,s=t.shallowRef(null);if(r&&e.proxy&&!e.proxy.$options.i18n&&!e.proxy.$options.__i18n)throw Error(_e.MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION);const i=!v(l.inheritLocale)||l.inheritLocale,c=t.ref(r&&i?n.locale.value:p(l.locale)?l.locale:U),u=t.ref(r&&i?n.fallbackLocale.value:p(l.fallbackLocale)||_(l.fallbackLocale)||k(l.fallbackLocale)||!1===l.fallbackLocale?l.fallbackLocale:c.value),m=t.ref(Le(c.value,l)),f=t.ref(k(l.datetimeFormats)?l.datetimeFormats:{[c.value]:{}}),d=t.ref(k(l.numberFormats)?l.numberFormats:{[c.value]:{}}),b=r?n.missingWarn:!v(l.missingWarn)&&!o(l.missingWarn)||l.missingWarn,h=r?n.fallbackWarn:!v(l.fallbackWarn)&&!o(l.fallbackWarn)||l.fallbackWarn,y=r?n.fallbackRoot:!v(l.fallbackRoot)||l.fallbackRoot,E=!!l.fallbackFormat,L=g(l.missing)?l.missing:null,N=g(l.postTranslation)?l.postTranslation:null,I=r?n.warnHtmlMessage:!v(l.warnHtmlMessage)||l.warnHtmlMessage,F=!!l.escapeParameter,T=r?n.modifiers:k(l.modifiers)?l.modifiers:{},R=l.pluralRules||r&&n.pluralRules;function O(){return[c.value,u.value,m.value,f.value,d.value]}const W=t.computed({get:()=>s.value?s.value.locale.value:c.value,set:e=>{s.value&&(s.value.locale.value=e),c.value=e}}),w=t.computed({get:()=>s.value?s.value.fallbackLocale.value:u.value,set:e=>{s.value&&(s.value.fallbackLocale.value=e),u.value=e}}),M=t.computed((()=>s.value?s.value.messages.value:m.value)),D=t.computed((()=>f.value)),C=t.computed((()=>d.value));function A(){return s.value?s.value.getPostTranslationHandler():N}function P(e){s.value&&s.value.setPostTranslationHandler(e)}function S(){return s.value?s.value.getMissingHandler():L}function $(e){s.value&&s.value.setMissingHandler(e)}function j(e){return O(),e()}function V(...e){return s.value?j((()=>Reflect.apply(s.value.t,null,[...e]))):j((()=>""))}function H(...e){return s.value?Reflect.apply(s.value.rt,null,[...e]):""}function x(...e){return s.value?j((()=>Reflect.apply(s.value.d,null,[...e]))):j((()=>""))}function G(...e){return s.value?j((()=>Reflect.apply(s.value.n,null,[...e]))):j((()=>""))}function B(e){return s.value?s.value.tm(e):{}}function Y(e,t){return!!s.value&&s.value.te(e,t)}function X(e){return s.value?s.value.getLocaleMessage(e):{}}function z(e,t){s.value&&(s.value.setLocaleMessage(e,t),m.value[e]=t)}function J(e,t){s.value&&s.value.mergeLocaleMessage(e,t)}function q(e){return s.value?s.value.getDateTimeFormat(e):{}}function Z(e,t){s.value&&(s.value.setDateTimeFormat(e,t),f.value[e]=t)}function K(e,t){s.value&&s.value.mergeDateTimeFormat(e,t)}function Q(e){return s.value?s.value.getNumberFormat(e):{}}function ee(e,t){s.value&&(s.value.setNumberFormat(e,t),d.value[e]=t)}function te(e,t){s.value&&s.value.mergeNumberFormat(e,t)}const ae={get id(){return s.value?s.value.id:-1},locale:W,fallbackLocale:w,messages:M,datetimeFormats:D,numberFormats:C,get inheritLocale(){return s.value?s.value.inheritLocale:i},set inheritLocale(e){s.value&&(s.value.inheritLocale=e)},get availableLocales(){return s.value?s.value.availableLocales:Object.keys(m.value)},get modifiers(){return s.value?s.value.modifiers:T},get pluralRules(){return s.value?s.value.pluralRules:R},get isGlobal(){return!!s.value&&s.value.isGlobal},get missingWarn(){return s.value?s.value.missingWarn:b},set missingWarn(e){s.value&&(s.value.missingWarn=e)},get fallbackWarn(){return s.value?s.value.fallbackWarn:h},set fallbackWarn(e){s.value&&(s.value.missingWarn=e)},get fallbackRoot(){return s.value?s.value.fallbackRoot:y},set fallbackRoot(e){s.value&&(s.value.fallbackRoot=e)},get fallbackFormat(){return s.value?s.value.fallbackFormat:E},set fallbackFormat(e){s.value&&(s.value.fallbackFormat=e)},get warnHtmlMessage(){return s.value?s.value.warnHtmlMessage:I},set warnHtmlMessage(e){s.value&&(s.value.warnHtmlMessage=e)},get escapeParameter(){return s.value?s.value.escapeParameter:F},set escapeParameter(e){s.value&&(s.value.escapeParameter=e)},t:V,getPostTranslationHandler:A,setPostTranslationHandler:P,getMissingHandler:S,setMissingHandler:$,rt:H,d:x,n:G,tm:B,te:Y,getLocaleMessage:X,setLocaleMessage:z,mergeLocaleMessage:J,getDateTimeFormat:q,setDateTimeFormat:Z,mergeDateTimeFormat:K,getNumberFormat:Q,setNumberFormat:ee,mergeNumberFormat:te};function ne(e){e.locale.value=c.value,e.fallbackLocale.value=u.value,Object.keys(m.value).forEach((t=>{e.mergeLocaleMessage(t,m.value[t])})),Object.keys(f.value).forEach((t=>{e.mergeDateTimeFormat(t,f.value[t])})),Object.keys(d.value).forEach((t=>{e.mergeNumberFormat(t,d.value[t])})),e.escapeParameter=F,e.fallbackFormat=E,e.fallbackRoot=y,e.fallbackWarn=h,e.missingWarn=b,e.warnHtmlMessage=I}return t.onBeforeMount((()=>{if(null==e.proxy||null==e.proxy.$i18n)throw Error(_e.NOT_AVAILABLE_COMPOSITION_IN_LEGACY);const t=s.value=e.proxy.$i18n.__composer;"global"===a?(c.value=t.locale.value,u.value=t.fallbackLocale.value,m.value=t.messages.value,f.value=t.datetimeFormats.value,d.value=t.numberFormats.value):r&&ne(t)})),ae}(n,u,r,e)}if("global"===u)return function(e,t,a){let n=d(t.messages)?t.messages:{};"__i18nGlobal"in a&&(n=Le(e.locale.value,{messages:n,__i18n:a.__i18nGlobal}));const l=Object.keys(n);if(l.length&&l.forEach((t=>{e.mergeLocaleMessage(t,n[t])})),d(t.datetimeFormats)){const a=Object.keys(t.datetimeFormats);a.length&&a.forEach((a=>{e.mergeDateTimeFormat(a,t.datetimeFormats[a])}))}if(d(t.numberFormats)){const a=Object.keys(t.numberFormats);a.length&&a.forEach((a=>{e.mergeNumberFormat(a,t.numberFormats[a])}))}}(r,e,i),r;if("parent"===u){let t=function(e,t,a=!1){let n=null;const l=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,a&&n&&!n[he]&&(n=null))}if(null!=n)break;if(l===r)break;r=r.parent}return n}(l,n,e.__useComponent);return null==t&&(t=r),t}const m=l;let f=m.__getInstance(n);if(null==f){const l=c({},e);"__i18n"in i&&(l.__i18n=i.__i18n),r&&(l.__root=r),f=Oe(l,$e),m.__composerExtend&&m.__composerExtend(f),function(e,n,l){{const r=n.proxy;if(null==r)throw Error(_e.UNEXPECTED_ERROR);const o=l[be];if(o===e)throw Error(_e.UNEXPECTED_ERROR);r._i18n=o,r._i18n_bridge=!0,a&&(r._i18nWatcher=r._i18n.watchI18nData(),r._i18n._sync&&(r._localeWatcher=r._i18n.watchLocale()));let s=!1;t.onBeforeMount((()=>{r._i18n.subscribeDataChanging(r),s=!0})),t.onUnmounted((()=>{s&&(r._i18n.unsubscribeDataChanging(r),s=!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}))}}(m,n,f),m.__setInstance(n,f)}return f}return V=function(e,t){if(!d(e))return null;let a=F.get(t);if(a||(a=function(e){const t=[];let a,n,l,r,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++,l="\\"+t,f[0](),!0}for(f[0]=()=>{void 0===n?n=l:n+=l},f[1]=()=>{void 0!==n&&(t.push(n),n=void 0)},f[2]=()=>{f[0](),m++},f[3]=()=>{if(m>0)m--,u=4,f[0]();else{if(m=0,void 0===n)return!1;if(n=I(n),!1===n)return!1;f[1]()}};null!==u;)if(c++,a=e[c],"\\"!==a||!_()){if(r=N(a),i=E[u],o=i[r]||i.l||8,8===o)return;if(u=o[0],void 0!==o[1]&&(s=f[o[1]],s&&(l=a,!1===s())))return;if(7===u)return t}}(t),a&&F.set(t,a)),!a)return null;const n=a.length;let l=e,r=0;for(;r<n;){const e=l[a[r]];if(void 0===e)return null;l=e,r++}return l},H=A,e.DatetimeFormat=Pe,e.I18nD=Se,e.I18nInjectionKey=Ue,e.I18nN=Ae,e.I18nT=Me,e.NumberFormat=Ce,e.Translation=we,e.VERSION=ue,e.castToVueI18n=e=>{if(!(ke in e))throw Error(_e.NOT_COMPATIBLE_LEGACY_VUE_I18N);return e},e.createI18n=function(e={},a){$e=a;const n=!v(e.legacy)||e.legacy,l=!v(e.globalInjection)||e.globalInjection,r=!n||!!e.allowComposition,o=new Map,[s,i]=function(e,a,n){const l=t.effectScope();{if(!ye(n))throw Error(_e.NOT_COMPATIBLE_LEGACY_VUE_I18N);const t=l.run((()=>Oe(e,n)));if(null==t)throw Error(_e.UNEXPECTED_ERROR);return[l,t]}}(e,0,a);{const e=i[be];let t=null;Object.defineProperty(e,"global",{get:()=>i}),Object.defineProperty(e,"mode",{get:()=>n?"legacy":"composition"}),Object.defineProperty(e,"allowComposition",{get:()=>r}),Object.defineProperty(e,"__instances",{get:()=>o}),Object.defineProperty(e,"install",{writable:!0,value:(a,...r)=>{if(2!==(a&&a.version&&Number(a.version.split(".")[0])||-1))throw Error(_e.BRIDGE_SUPPORT_VUE_2_ONLY);!function(e,...t){const a=k(t[0])?t[0]:{};(!v(a.globalInstall)||a.globalInstall)&&(e.component(we.name,we),e.component(Ce.name,Ce),e.component(Pe.name,Pe))}(a,...r),!n&&l&&(t=function(e,t,a){const n=t.watchLocale(a);return e.prototype.$t=function(...e){return Reflect.apply(a.t,a,[...e])},e.prototype.$d=function(...e){return Reflect.apply(a.d,a,[...e])},e.prototype.$n=function(...e){return Reflect.apply(a.n,a,[...e])},n}(a,e,i)),a.mixin(function(e,t){return{beforeCreate(){const a=this.$options;if(!a.__VUE18N__INSTANCE__)if(a.i18n=a.i18n||(a.__i18nBridge?{}:null),this._i18nBridgeRoot=e,"composition"!==e.mode)if(a.i18n){if(a.i18n instanceof t){if(a.__i18nBridge)try{const e=a.i18n&&a.i18n.messages?a.i18n.messages:{};a.__i18nBridge.forEach((t=>Ie(JSON.parse(t),e))),Object.keys(e).forEach((t=>{a.i18n.mergeLocaleMessage(t,e[t])}))}catch(e){}this._i18n=a.i18n,this._i18nWatcher=this._i18n.watchI18nData()}else if(k(a.i18n)){const e=this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof t?this.$root.$i18n:null;if(e&&(a.i18n.root=this.$root,a.i18n.formatter=e.formatter,a.i18n.fallbackLocale=e.fallbackLocale,a.i18n.formatFallbackMessages=e.formatFallbackMessages,a.i18n.silentTranslationWarn=e.silentTranslationWarn,a.i18n.silentFallbackWarn=e.silentFallbackWarn,a.i18n.pluralizationRules=e.pluralizationRules,a.i18n.preserveDirectiveContent=e.preserveDirectiveContent),a.__i18nBridge)try{const e=a.i18n&&a.i18n.messages?a.i18n.messages:{};a.__i18nBridge.forEach((t=>Ie(JSON.parse(t),e))),a.i18n.messages=e}catch(e){}const{sharedMessages:n}=a.i18n;n&&k(n)&&Ie(n,a.i18n.messages),this._i18n=new t(a.i18n),this._i18nWatcher=this._i18n.watchI18nData(),(void 0===a.i18n.sync||a.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:a.parent&&a.parent.$i18n&&a.parent.$i18n instanceof t&&(this._i18n=a.parent.$i18n);else this._i18n=e},beforeMount(){const a=this.$options;a.__VUE18N__INSTANCE__||"composition"!==e.mode&&(a.i18n=a.i18n||(a.__i18nBridge?{}:null),a.i18n?(a.i18n instanceof t||k(a.i18n))&&(this._i18n.subscribeDataChanging(this),this._subscribing=!0):(this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof t||a.parent&&a.parent.$i18n&&a.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,$e))}}),Object.defineProperty(e,"dispose",{value:()=>{t&&t(),s.stop()}});const a={__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(a).forEach((t=>Object.defineProperty(e,t,{value:a[t]}))),e}},e.useI18n=je,Object.defineProperty(e,"__esModule",{value:!0}),e}({},VueDemi); |
{ | ||
"name": "vue-i18n-bridge", | ||
"version": "9.3.0-beta.15", | ||
"version": "9.3.0-beta.16", | ||
"description": "A bridge for Vue I18n Legacy", | ||
@@ -41,8 +41,8 @@ "keywords": [ | ||
"vue-demi": "^0.13.4", | ||
"@intlify/core-base": "9.3.0-beta.15", | ||
"@intlify/shared": "9.3.0-beta.15", | ||
"@intlify/vue-devtools": "9.3.0-beta.15" | ||
"@intlify/shared": "9.3.0-beta.16", | ||
"@intlify/vue-devtools": "9.3.0-beta.16", | ||
"@intlify/core-base": "9.3.0-beta.16" | ||
}, | ||
"devDependencies": { | ||
"@intlify/devtools-if": "9.3.0-beta.15" | ||
"@intlify/devtools-if": "9.3.0-beta.16" | ||
}, | ||
@@ -49,0 +49,0 @@ "optionalDependencies": { |
Sorry, the diff of this file is not supported yet
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 not supported yet
Sorry, the diff of this file is not supported yet
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 not supported yet
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
1297492
30096
+ Added@intlify/core-base@9.3.0-beta.16(transitive)
+ Added@intlify/devtools-if@9.3.0-beta.16(transitive)
+ Added@intlify/message-compiler@9.3.0-beta.16(transitive)
+ Added@intlify/shared@9.3.0-beta.16(transitive)
+ Added@intlify/vue-devtools@9.3.0-beta.16(transitive)
- Removed@intlify/core-base@9.3.0-beta.15(transitive)
- Removed@intlify/devtools-if@9.3.0-beta.15(transitive)
- Removed@intlify/message-compiler@9.3.0-beta.15(transitive)
- Removed@intlify/shared@9.3.0-beta.15(transitive)
- Removed@intlify/vue-devtools@9.3.0-beta.15(transitive)