@intlify/core-base 9.3.0-beta.1 → 9.3.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core-base.cjs +1608 -0
- package/dist/core-base.cjs.js +1 -1608
- package/dist/core-base.cjs.prod.js +1 -1362
- package/dist/core-base.esm-browser.js +3039 -0
- package/dist/core-base.esm-browser.prod.js +6 -0
- package/dist/core-base.esm-bundler.js +1 -0
- package/dist/core-base.global.js +2 -2
- package/dist/core-base.global.prod.js +2 -2
- package/dist/{core-base.esm-bundler.mjs → core-base.mjs} +2 -2
- package/dist/core-base.prod.cjs +1362 -0
- package/index.js +2 -2
- package/package.json +22 -15
- package/dist/core-base.esm-browser.mjs +0 -6
- package/index.mjs +0 -1
package/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
3
|
if (process.env.NODE_ENV === 'production') {
|
|
4
|
-
module.exports = require('./dist/core-base.
|
|
4
|
+
module.exports = require('./dist/core-base.prod.cjs')
|
|
5
5
|
} else {
|
|
6
|
-
module.exports = require('./dist/core-base.cjs
|
|
6
|
+
module.exports = require('./dist/core-base.cjs')
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intlify/core-base",
|
|
3
|
-
"version": "9.3.0-beta.
|
|
3
|
+
"version": "9.3.0-beta.2",
|
|
4
4
|
"description": "@intlify/core-base",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"core",
|
|
@@ -25,19 +25,18 @@
|
|
|
25
25
|
},
|
|
26
26
|
"files": [
|
|
27
27
|
"index.js",
|
|
28
|
-
"index.mjs",
|
|
29
28
|
"dist"
|
|
30
29
|
],
|
|
31
30
|
"main": "index.js",
|
|
32
|
-
"module": "dist/core-base.
|
|
31
|
+
"module": "dist/core-base.mjs",
|
|
33
32
|
"unpkg": "dist/core-base.global.js",
|
|
34
33
|
"jsdelivr": "dist/core-base.global.js",
|
|
35
34
|
"types": "dist/core-base.d.ts",
|
|
36
35
|
"dependencies": {
|
|
37
|
-
"@intlify/devtools-if": "9.3.0-beta.
|
|
38
|
-
"@intlify/message-compiler": "9.3.0-beta.
|
|
39
|
-
"@intlify/shared": "9.3.0-beta.
|
|
40
|
-
"@intlify/vue-devtools": "9.3.0-beta.
|
|
36
|
+
"@intlify/devtools-if": "9.3.0-beta.2",
|
|
37
|
+
"@intlify/message-compiler": "9.3.0-beta.2",
|
|
38
|
+
"@intlify/shared": "9.3.0-beta.2",
|
|
39
|
+
"@intlify/vue-devtools": "9.3.0-beta.2"
|
|
41
40
|
},
|
|
42
41
|
"engines": {
|
|
43
42
|
"node": ">= 14"
|
|
@@ -45,22 +44,30 @@
|
|
|
45
44
|
"buildOptions": {
|
|
46
45
|
"name": "IntlifyCoreBase",
|
|
47
46
|
"formats": [
|
|
48
|
-
"
|
|
49
|
-
"
|
|
47
|
+
"mjs",
|
|
48
|
+
"browser",
|
|
50
49
|
"cjs",
|
|
51
50
|
"global"
|
|
52
51
|
]
|
|
53
52
|
},
|
|
54
53
|
"exports": {
|
|
55
54
|
".": {
|
|
56
|
-
"import":
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
55
|
+
"import": "./dist/core-base.mjs",
|
|
56
|
+
"browser": "./dist/core-base.esm-browser.js",
|
|
57
|
+
"node": {
|
|
58
|
+
"import": {
|
|
59
|
+
"production": "./dist/core-base.prod.cjs",
|
|
60
|
+
"development": "./dist/core-base.mjs",
|
|
61
|
+
"default": "./dist/core-base.mjs"
|
|
62
|
+
},
|
|
63
|
+
"require": {
|
|
64
|
+
"production": "./dist/core-base.prod.cjs",
|
|
65
|
+
"development": "./dist/core-base.cjs",
|
|
66
|
+
"default": "./index.js"
|
|
67
|
+
}
|
|
68
|
+
}
|
|
61
69
|
},
|
|
62
70
|
"./dist/*": "./dist/*",
|
|
63
|
-
"./index.mjs": "./index.mjs",
|
|
64
71
|
"./package.json": "./package.json"
|
|
65
72
|
},
|
|
66
73
|
"publishConfig": {
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* core-base v9.3.0-beta.1
|
|
3
|
-
* (c) 2022 kazuya kawaguchi
|
|
4
|
-
* Released under the MIT License.
|
|
5
|
-
*/
|
|
6
|
-
const e="undefined"!=typeof window;let t,n;{const r=e&&window.performance;r&&r.mark&&r.measure&&r.clearMarks&&r.clearMeasures&&(t=e=>r.mark(e),n=(e,t,n)=>{r.measure(e,t,n),r.clearMarks(t),r.clearMarks(n)})}const r=/\{([0-9a-zA-Z]+)\}/g;function o(e,...t){return 1===t.length&&E(t[0])&&(t=t[0]),t&&t.hasOwnProperty||(t={}),e.replace(r,((e,n)=>t.hasOwnProperty(n)?t[n]:""))}const a=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),s=e=>"number"==typeof e&&isFinite(e),c=e=>"[object RegExp]"===L(e),l=e=>A(e)&&0===Object.keys(e).length;function i(e,t){"undefined"!=typeof console&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}const u=Object.assign;function f(e){return e.replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}const m=Array.isArray,_=e=>"function"==typeof e,p=e=>"string"==typeof e,d=e=>"boolean"==typeof e,E=e=>null!==e&&"object"==typeof e,N=Object.prototype.toString,L=e=>N.call(e),A=e=>"[object Object]"===L(e);const T={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},k={[T.EXPECTED_TOKEN]:"Expected token: '{0}'",[T.INVALID_TOKEN_IN_PLACEHOLDER]:"Invalid token in placeholder: '{0}'",[T.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER]:"Unterminated single quote in placeholder",[T.UNKNOWN_ESCAPE_SEQUENCE]:"Unknown escape sequence: \\{0}",[T.INVALID_UNICODE_ESCAPE_SEQUENCE]:"Invalid unicode escape sequence: {0}",[T.UNBALANCED_CLOSING_BRACE]:"Unbalanced closing brace",[T.UNTERMINATED_CLOSING_BRACE]:"Unterminated closing brace",[T.EMPTY_PLACEHOLDER]:"Empty placeholder",[T.NOT_ALLOW_NEST_PLACEHOLDER]:"Not allowed nest placeholder",[T.INVALID_LINKED_FORMAT]:"Invalid linked format",[T.MUST_HAVE_MESSAGES_IN_PLURAL]:"Plural must have messages",[T.UNEXPECTED_EMPTY_LINKED_MODIFIER]:"Unexpected empty linked modifier",[T.UNEXPECTED_EMPTY_LINKED_KEY]:"Unexpected empty linked key",[T.UNEXPECTED_LEXICAL_ANALYSIS]:"Unexpected lexical analysis in token: '{0}'"};function g(e,t,n={}){const{domain:r,messages:a,args:s}=n,c=o((a||k)[e]||"",...s||[]),l=new SyntaxError(String(c));return l.code=e,t&&(l.location=t),l.domain=r,l}function h(e){throw e}function I(e,t,n){const r={start:e,end:t};return null!=n&&(r.source=n),r}const C=String.fromCharCode(8232),y=String.fromCharCode(8233);function b(e){const t=e;let n=0,r=1,o=1,a=0;const s=e=>"\r"===t[e]&&"\n"===t[e+1],c=e=>t[e]===y,l=e=>t[e]===C,i=e=>s(e)||(e=>"\n"===t[e])(e)||c(e)||l(e),u=e=>s(e)||c(e)||l(e)?"\n":t[e];function f(){return a=0,i(n)&&(r++,o=0),s(n)&&n++,n++,o++,t[n]}return{index:()=>n,line:()=>r,column:()=>o,peekOffset:()=>a,charAt:u,currentChar:()=>u(n),currentPeek:()=>u(n+a),next:f,peek:function(){return s(n+a)&&a++,a++,t[n+a]},reset:function(){n=0,r=1,o=1,a=0},resetPeek:function(e=0){a=e},skipToPeek:function(){const e=n+a;for(;e!==n;)f();a=0}}}const O=void 0;function D(e,t={}){const n=!1!==t.location,r=b(e),o=()=>r.index(),a=()=>{return e=r.line(),t=r.column(),n=r.index(),{line:e,column:t,offset:n};var e,t,n},s=a(),c=o(),l={currentType:14,offset:c,startLoc:s,endLoc:s,lastType:14,lastOffset:c,lastStartLoc:s,lastEndLoc:s,braceNest:0,inLinked:!1,text:""},i=()=>l,{onError:u}=t;function f(e,t,n,...r){const o=i();if(t.column+=n,t.offset+=n,u){const n=g(e,I(o.startLoc,t),{domain:"tokenizer",args:r});u(n)}}function m(e,t,r){e.endLoc=a(),e.currentType=t;const o={type:t};return n&&(o.loc=I(e.startLoc,e.endLoc)),null!=r&&(o.value=r),o}const _=e=>m(e,14);function p(e,t){return e.currentChar()===t?(e.next(),t):(f(T.EXPECTED_TOKEN,a(),0,t),"")}function d(e){let t="";for(;" "===e.currentPeek()||"\n"===e.currentPeek();)t+=e.currentPeek(),e.peek();return t}function E(e){const t=d(e);return e.skipToPeek(),t}function N(e){if(e===O)return!1;const t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||95===t}function L(e,t){const{currentType:n}=t;if(2!==n)return!1;d(e);const r=function(e){if(e===O)return!1;const t=e.charCodeAt(0);return t>=48&&t<=57}("-"===e.currentPeek()?e.peek():e.currentPeek());return e.resetPeek(),r}function A(e){d(e);const t="|"===e.currentPeek();return e.resetPeek(),t}function k(e,t=!0){const n=(t=!1,r="",o=!1)=>{const a=e.currentPeek();return"{"===a?"%"!==r&&t:"@"!==a&&a?"%"===a?(e.peek(),n(t,"%",!0)):"|"===a?!("%"!==r&&!o)||!(" "===r||"\n"===r):" "===a?(e.peek(),n(!0," ",o)):"\n"!==a||(e.peek(),n(!0,"\n",o)):"%"===r||t},r=n();return t&&e.resetPeek(),r}function h(e,t){const n=e.currentChar();return n===O?O:t(n)?(e.next(),n):null}function C(e){return h(e,(e=>{const t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||t>=48&&t<=57||95===t||36===t}))}function y(e){return h(e,(e=>{const t=e.charCodeAt(0);return t>=48&&t<=57}))}function D(e){return h(e,(e=>{const t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}))}function S(e){let t="",n="";for(;t=y(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(!k(e))break;t+=n,e.next()}else if(" "===n||"\n"===n)if(k(e))t+=n,e.next();else{if(A(e))break;t+=n,e.next()}else t+=n,e.next()}return t}function v(e){const t=e.currentChar();switch(t){case"\\":case"'":return e.next(),`\\${t}`;case"u":return M(e,t,4);case"U":return M(e,t,6);default:return f(T.UNKNOWN_ESCAPE_SEQUENCE,a(),0,t),""}}function M(e,t,n){p(e,t);let r="";for(let o=0;o<n;o++){const n=D(e);if(!n){f(T.INVALID_UNICODE_ESCAPE_SEQUENCE,a(),0,`\\${t}${r}${e.currentChar()}`);break}r+=n}return`\\${t}${r}`}function R(e){E(e);const t=p(e,"|");return E(e),t}function w(e,t){let n=null;switch(e.currentChar()){case"{":return t.braceNest>=1&&f(T.NOT_ALLOW_NEST_PLACEHOLDER,a(),0),e.next(),n=m(t,2,"{"),E(e),t.braceNest++,n;case"}":return t.braceNest>0&&2===t.currentType&&f(T.EMPTY_PLACEHOLDER,a(),0),e.next(),n=m(t,3,"}"),t.braceNest--,t.braceNest>0&&E(e),t.inLinked&&0===t.braceNest&&(t.inLinked=!1),n;case"@":return t.braceNest>0&&f(T.UNTERMINATED_CLOSING_BRACE,a(),0),n=x(e,t)||_(t),t.braceNest=0,n;default:let r=!0,o=!0,s=!0;if(A(e))return t.braceNest>0&&f(T.UNTERMINATED_CLOSING_BRACE,a(),0),n=m(t,1,R(e)),t.braceNest=0,t.inLinked=!1,n;if(t.braceNest>0&&(5===t.currentType||6===t.currentType||7===t.currentType))return f(T.UNTERMINATED_CLOSING_BRACE,a(),0),t.braceNest=0,U(e,t);if(r=function(e,t){const{currentType:n}=t;if(2!==n)return!1;d(e);const r=N(e.currentPeek());return e.resetPeek(),r}(e,t))return n=m(t,5,function(e){E(e);let t="",n="";for(;t=C(e);)n+=t;return e.currentChar()===O&&f(T.UNTERMINATED_CLOSING_BRACE,a(),0),n}(e)),E(e),n;if(o=L(e,t))return n=m(t,6,function(e){E(e);let t="";return"-"===e.currentChar()?(e.next(),t+=`-${S(e)}`):t+=S(e),e.currentChar()===O&&f(T.UNTERMINATED_CLOSING_BRACE,a(),0),t}(e)),E(e),n;if(s=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=m(t,7,function(e){E(e),p(e,"'");let t="",n="";const r=e=>"'"!==e&&"\n"!==e;for(;t=h(e,r);)n+="\\"===t?v(e):t;const o=e.currentChar();return"\n"===o||o===O?(f(T.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,a(),0),"\n"===o&&(e.next(),p(e,"'")),n):(p(e,"'"),n)}(e)),E(e),n;if(!r&&!o&&!s)return n=m(t,13,function(e){E(e);let t="",n="";const r=e=>"{"!==e&&"}"!==e&&" "!==e&&"\n"!==e;for(;t=h(e,r);)n+=t;return n}(e)),f(T.INVALID_TOKEN_IN_PLACEHOLDER,a(),0,n.value),E(e),n}return n}function x(e,t){const{currentType:n}=t;let r=null;const o=e.currentChar();switch(8!==n&&9!==n&&12!==n&&10!==n||"\n"!==o&&" "!==o||f(T.INVALID_LINKED_FORMAT,a(),0),o){case"@":return e.next(),r=m(t,8,"@"),t.inLinked=!0,r;case".":return E(e),e.next(),m(t,9,".");case":":return E(e),e.next(),m(t,10,":");default:return A(e)?(r=m(t,1,R(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)?(E(e),x(e,t)):function(e,t){const{currentType:n}=t;if(9!==n)return!1;d(e);const r=N(e.currentPeek());return e.resetPeek(),r}(e,t)?(E(e),m(t,12,function(e){let t="",n="";for(;t=C(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?N(e.peek()):!("@"===t||"%"===t||"|"===t||":"===t||"."===t||" "===t||!t)&&("\n"===t?(e.peek(),r()):N(t))},o=r();return e.resetPeek(),o}(e,t)?(E(e),"{"===o?w(e,t)||r:m(t,11,function(e){const t=(n=!1,r)=>{const o=e.currentChar();return"{"!==o&&"%"!==o&&"@"!==o&&"|"!==o&&o?" "===o?r:"\n"===o?(r+=o,e.next(),t(n,r)):(r+=o,e.next(),t(!0,r)):r};return t(!1,"")}(e))):(8===n&&f(T.INVALID_LINKED_FORMAT,a(),0),t.braceNest=0,t.inLinked=!1,U(e,t))}}function U(e,t){let n={type:14};if(t.braceNest>0)return w(e,t)||_(t);if(t.inLinked)return x(e,t)||_(t);switch(e.currentChar()){case"{":return w(e,t)||_(t);case"}":return f(T.UNBALANCED_CLOSING_BRACE,a(),0),e.next(),m(t,3,"}");case"@":return x(e,t)||_(t);default:if(A(e))return n=m(t,1,R(e)),t.braceNest=0,t.inLinked=!1,n;const{isModulo:r,hasSpace:o}=function(e){const t=d(e),n="%"===e.currentPeek()&&"{"===e.peek();return e.resetPeek(),{isModulo:n,hasSpace:t.length>0}}(e);if(r)return o?m(t,0,P(e)):m(t,4,function(e){E(e);const t=e.currentChar();return"%"!==t&&f(T.EXPECTED_TOKEN,a(),0,t),e.next(),"%"}(e));if(k(e))return m(t,0,P(e))}return n}return{nextToken:function(){const{currentType:e,offset:t,startLoc:n,endLoc:s}=l;return l.lastType=e,l.lastOffset=t,l.lastStartLoc=n,l.lastEndLoc=s,l.offset=o(),l.startLoc=a(),r.currentChar()===O?m(l,14):U(r,l)},currentOffset:o,currentPosition:a,context:i}}const S=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function P(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 v(e={}){const t=!1!==e.location,{onError:n}=e;function r(e,t,r,o,...a){const s=e.currentPosition();if(s.offset+=o,s.column+=o,n){const e=g(t,I(r,s),{domain:"parser",args:a});n(e)}}function o(e,n,r){const o={type:e,start:n,end:n};return t&&(o.loc={start:r,end:r}),o}function a(e,n,r,o){e.end=n,o&&(e.type=o),t&&e.loc&&(e.loc.end=r)}function s(e,t){const n=e.context(),r=o(3,n.offset,n.startLoc);return r.value=t,a(r,e.currentOffset(),e.currentPosition()),r}function c(e,t){const n=e.context(),{lastOffset:r,lastStartLoc:s}=n,c=o(5,r,s);return c.index=parseInt(t,10),e.nextToken(),a(c,e.currentOffset(),e.currentPosition()),c}function l(e,t){const n=e.context(),{lastOffset:r,lastStartLoc:s}=n,c=o(4,r,s);return c.key=t,e.nextToken(),a(c,e.currentOffset(),e.currentPosition()),c}function i(e,t){const n=e.context(),{lastOffset:r,lastStartLoc:s}=n,c=o(9,r,s);return c.value=t.replace(S,P),e.nextToken(),a(c,e.currentOffset(),e.currentPosition()),c}function f(e){const t=e.context(),n=o(6,t.offset,t.startLoc);let s=e.nextToken();if(9===s.type){const t=function(e){const t=e.nextToken(),n=e.context(),{lastOffset:s,lastStartLoc:c}=n,l=o(8,s,c);return 12!==t.type?(r(e,T.UNEXPECTED_EMPTY_LINKED_MODIFIER,n.lastStartLoc,0),l.value="",a(l,s,c),{nextConsumeToken:t,node:l}):(null==t.value&&r(e,T.UNEXPECTED_LEXICAL_ANALYSIS,n.lastStartLoc,0,M(t)),l.value=t.value||"",a(l,e.currentOffset(),e.currentPosition()),{node:l})}(e);n.modifier=t.node,s=t.nextConsumeToken||e.nextToken()}switch(10!==s.type&&r(e,T.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,M(s)),s=e.nextToken(),2===s.type&&(s=e.nextToken()),s.type){case 11:null==s.value&&r(e,T.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,M(s)),n.key=function(e,t){const n=e.context(),r=o(7,n.offset,n.startLoc);return r.value=t,a(r,e.currentOffset(),e.currentPosition()),r}(e,s.value||"");break;case 5:null==s.value&&r(e,T.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,M(s)),n.key=l(e,s.value||"");break;case 6:null==s.value&&r(e,T.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,M(s)),n.key=c(e,s.value||"");break;case 7:null==s.value&&r(e,T.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,M(s)),n.key=i(e,s.value||"");break;default:r(e,T.UNEXPECTED_EMPTY_LINKED_KEY,t.lastStartLoc,0);const u=e.context(),f=o(7,u.offset,u.startLoc);return f.value="",a(f,u.offset,u.startLoc),n.key=f,a(n,u.offset,u.startLoc),{nextConsumeToken:s,node:n}}return a(n,e.currentOffset(),e.currentPosition()),{node:n}}function m(e){const t=e.context(),n=o(2,1===t.currentType?e.currentOffset():t.offset,1===t.currentType?t.endLoc:t.startLoc);n.items=[];let u=null;do{const o=u||e.nextToken();switch(u=null,o.type){case 0:null==o.value&&r(e,T.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,M(o)),n.items.push(s(e,o.value||""));break;case 6:null==o.value&&r(e,T.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,M(o)),n.items.push(c(e,o.value||""));break;case 5:null==o.value&&r(e,T.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,M(o)),n.items.push(l(e,o.value||""));break;case 7:null==o.value&&r(e,T.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,M(o)),n.items.push(i(e,o.value||""));break;case 8:const a=f(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 _(e){const t=e.context(),{offset:n,startLoc:s}=t,c=m(e);return 14===t.currentType?c:function(e,t,n,s){const c=e.context();let l=0===s.items.length;const i=o(1,t,n);i.cases=[],i.cases.push(s);do{const t=m(e);l||(l=0===t.items.length),i.cases.push(t)}while(14!==c.currentType);return l&&r(e,T.MUST_HAVE_MESSAGES_IN_PLURAL,n,0),a(i,e.currentOffset(),e.currentPosition()),i}(e,n,s,c)}return{parse:function(n){const s=D(n,u({},e)),c=s.context(),l=o(0,c.offset,c.startLoc);return t&&l.loc&&(l.loc.source=n),l.body=_(s),14!==c.currentType&&r(s,T.UNEXPECTED_LEXICAL_ANALYSIS,c.lastStartLoc,0,n[c.offset]||""),a(l,s.currentOffset(),s.currentPosition()),l}}}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 R(e,t){for(let n=0;n<e.length;n++)w(e[n],t)}function w(e,t){switch(e.type){case 1:R(e.cases,t),t.helper("plural");break;case 2:R(e.items,t);break;case 6:w(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 x(e,t={}){const n=function(e,t={}){const n={ast:e,helpers:new Set};return{context:()=>n,helper:e=>(n.helpers.add(e),e)}}(e);n.helper("normalize"),e.body&&w(e.body,n);const r=n.context();e.helpers=Array.from(r.helpers)}function U(e,t){const{helper:n}=e;switch(t.type){case 0:!function(e,t){t.body?U(e,t.body):e.push("null")}(e,t);break;case 1:!function(e,t){const{helper:n,needIndent:r}=e;if(t.cases.length>1){e.push(`${n("plural")}([`),e.indent(r());const o=t.cases.length;for(let n=0;n<o&&(U(e,t.cases[n]),n!==o-1);n++)e.push(", ");e.deindent(r()),e.push("])")}}(e,t);break;case 2:!function(e,t){const{helper:n,needIndent:r}=e;e.push(`${n("normalize")}([`),e.indent(r());const o=t.items.length;for(let n=0;n<o&&(U(e,t.items[n]),n!==o-1);n++)e.push(", ");e.deindent(r()),e.push("])")}(e,t);break;case 6:!function(e,t){const{helper:n}=e;e.push(`${n("linked")}(`),U(e,t.key),t.modifier?(e.push(", "),U(e,t.modifier),e.push(", _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);break;default:throw new Error(`unhandled codegen node type: ${t.type}`)}}function F(e,t={}){const n=u({},t),r=v(n).parse(e);return x(r,n),((e,t={})=>{const n=p(t.mode)?t.mode:"normal",r=p(t.filename)?t.filename:"message.intl",o=!!t.sourceMap,a=null!=t.breakLineCode?t.breakLineCode:"arrow"===n?";":"\n",s=t.needIndent?t.needIndent:"arrow"!==n,c=e.helpers||[],l=function(e,t){const{sourceMap:n,filename:r,breakLineCode:o,needIndent:a}=t,s={source:e.loc.source,filename:r,code:"",column:1,line:1,offset:0,map:void 0,breakLineCode:o,needIndent:a,indentLevel:0};function c(e,t){s.code+=e}function l(e,t=!0){const n=t?o:"";c(a?n+" ".repeat(e):n)}return{context:()=>s,push:c,indent:function(e=!0){const t=++s.indentLevel;e&&l(t)},deindent:function(e=!0){const t=--s.indentLevel;e&&l(t)},newline:function(){l(s.indentLevel)},helper:e=>`_${e}`,needIndent:()=>s.needIndent}}(e,{mode:n,filename:r,sourceMap:o,breakLineCode:a,needIndent:s});l.push("normal"===n?"function __msg__ (ctx) {":"(ctx) => {"),l.indent(s),c.length>0&&(l.push(`const { ${c.map((e=>`${e}: _${e}`)).join(", ")} } = ctx`),l.newline()),l.push("return "),U(l,e),l.deindent(s),l.push("}");const{code:i,map:u}=l.context();return{ast:e,code:i,map:u?u.toJSON():void 0}})(r,n)}const $=[];$[0]={w:[0],i:[3,0],"[":[4],o:[7]},$[1]={w:[1],".":[2],"[":[4],o:[7]},$[2]={w:[2],i:[3,0],0:[3,0]},$[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},$[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},$[5]={"'":[4,0],o:8,l:[5,0]},$[6]={'"':[4,0],o:8,l:[6,0]};const W=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function X(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 K(e){const t=e.trim();return("0"!==e.charAt(0)||!isNaN(parseInt(e)))&&(n=t,W.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}function B(e){const t=[];let n,r,o,a,s,c,l,i=-1,u=0,f=0;const m=[];function _(){const t=e[i+1];if(5===u&&"'"===t||6===u&&'"'===t)return i++,o="\\"+t,m[0](),!0}for(m[0]=()=>{void 0===r?r=o:r+=o},m[1]=()=>{void 0!==r&&(t.push(r),r=void 0)},m[2]=()=>{m[0](),f++},m[3]=()=>{if(f>0)f--,u=4,m[0]();else{if(f=0,void 0===r)return!1;if(r=K(r),!1===r)return!1;m[1]()}};null!==u;)if(i++,n=e[i],"\\"!==n||!_()){if(a=X(n),l=$[u],s=l[a]||l.l||8,8===s)return;if(u=s[0],void 0!==s[1]&&(c=m[s[1]],c&&(o=n,!1===c())))return;if(7===u)return t}}const G=new Map;function Y(e,t){return E(e)?e[t]:null}function V(e,t){if(!E(e))return null;let n=G.get(t);if(n||(n=B(t),n&&G.set(t,n)),!n)return null;const r=n.length;let o=e,a=0;for(;a<r;){const e=o[n[a]];if(void 0===e)return null;o=e,a++}return o}const H=e=>e,j=e=>"",Q="text",z=e=>0===e.length?"":e.join(""),J=e=>null==e?"":m(e)||A(e)&&e.toString===N?JSON.stringify(e,null,2):String(e);function q(e,t){return e=Math.abs(e),2===t?e?e>1?1:0:1:e?Math.min(e,2):0}function Z(e={}){const t=e.locale,n=function(e){const t=s(e.pluralIndex)?e.pluralIndex:-1;return e.named&&(s(e.named.count)||s(e.named.n))?s(e.named.count)?e.named.count:s(e.named.n)?e.named.n:t:t}(e),r=E(e.pluralRules)&&p(t)&&_(e.pluralRules[t])?e.pluralRules[t]:q,o=E(e.pluralRules)&&p(t)&&_(e.pluralRules[t])?q:void 0,a=e.list||[],c=e.named||{};s(e.pluralIndex)&&function(e,t){t.count||(t.count=e),t.n||(t.n=e)}(n,c);function l(t){const n=_(e.messages)?e.messages(t):!!E(e.messages)&&e.messages[t];return n||(e.parent?e.parent.message(t):j)}const i=A(e.processor)&&_(e.processor.normalize)?e.processor.normalize:z,u=A(e.processor)&&_(e.processor.interpolate)?e.processor.interpolate:J,f={list:e=>a[e],named:e=>c[e],plural:e=>e[r(n,e.length,o)],linked:(t,...n)=>{const[r,o]=n;let a="text",s="";1===n.length?E(r)?(s=r.modifier||s,a=r.type||a):p(r)&&(s=r||s):2===n.length&&(p(r)&&(s=r||s),p(o)&&(a=o||a));let c=l(t)(f);return"vnode"===a&&m(c)&&s&&(c=c[0]),s?(i=s,e.modifiers?e.modifiers[i]:H)(c,a):c;var i},message:l,type:A(e.processor)&&p(e.processor.type)?e.processor.type:"text",interpolate:u,normalize:i};return f}const ee="i18n:init";let te=null;function ne(e){te=e}function re(){return te}function oe(e,t,n){te&&te.emit(ee,{timestamp:Date.now(),i18n:e,version:t,meta:n})}const ae=se("function:translate");function se(e){return t=>te&&te.emit(e,t)}const ce={NOT_FOUND_KEY:1,FALLBACK_TO_TRANSLATE:2,CANNOT_FORMAT_NUMBER:3,FALLBACK_TO_NUMBER_FORMAT:4,CANNOT_FORMAT_DATE:5,FALLBACK_TO_DATE_FORMAT:6,__EXTEND_POINT__:7},le={[ce.NOT_FOUND_KEY]:"Not found '{key}' key in '{locale}' locale messages.",[ce.FALLBACK_TO_TRANSLATE]:"Fall back to translate '{key}' key with '{target}' locale.",[ce.CANNOT_FORMAT_NUMBER]:"Cannot format a number value due to not supported Intl.NumberFormat.",[ce.FALLBACK_TO_NUMBER_FORMAT]:"Fall back to number format '{key}' key with '{target}' locale.",[ce.CANNOT_FORMAT_DATE]:"Cannot format a date value due to not supported Intl.DateTimeFormat.",[ce.FALLBACK_TO_DATE_FORMAT]:"Fall back to datetime format '{key}' key with '{target}' locale."};function ie(e,...t){return o(le[e],...t)}function ue(e,t,n){return[...new Set([n,...m(t)?t:E(t)?Object.keys(t):p(t)?[t]:[n]])]}function fe(e,t,n){const r=p(n)?n:Ne,o=e;o.__localeChainCache||(o.__localeChainCache=new Map);let a=o.__localeChainCache.get(r);if(!a){a=[];let e=[n];for(;m(e);)e=me(a,e,t);const s=m(t)||!A(t)?t:t.default?t.default:null;e=p(s)?[s]:s,m(e)&&me(a,e,!1),o.__localeChainCache.set(r,a)}return a}function me(e,t,n){let r=!0;for(let o=0;o<t.length&&d(r);o++){const a=t[o];p(a)&&(r=_e(e,t[o],n))}return r}function _e(e,t,n){let r;const o=t.split("-");do{r=pe(e,o.join("-"),n),o.splice(-1,1)}while(o.length&&!0===r);return r}function pe(e,t,n){let r=!1;if(!e.includes(t)&&(r=!0,t)){r="!"!==t[t.length-1];const o=t.replace(/!/g,"");e.push(o),(m(n)||A(n))&&n[o]&&(r=n[o])}return r}const de="9.3.0-beta.1",Ee=-1,Ne="en-US",Le="",Ae=e=>`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;let Te,ke,ge;function he(e){Te=e}function Ie(e){ke=e}function Ce(e){ge=e}let ye=null;const be=e=>{ye=e},Oe=()=>ye;let De=null;const Se=e=>{De=e},Pe=()=>De;let ve=0;function Me(e={}){const t=p(e.version)?e.version:"9.3.0-beta.1",n=p(e.locale)?e.locale:Ne,r=m(e.fallbackLocale)||A(e.fallbackLocale)||p(e.fallbackLocale)||!1===e.fallbackLocale?e.fallbackLocale:n,o=A(e.messages)?e.messages:{[n]:{}},a=A(e.datetimeFormats)?e.datetimeFormats:{[n]:{}},s=A(e.numberFormats)?e.numberFormats:{[n]:{}},l=u({},e.modifiers||{},{upper:(e,t)=>"text"===t&&p(e)?e.toUpperCase():"vnode"===t&&E(e)&&"__v_isVNode"in e?e.children.toUpperCase():e,lower:(e,t)=>"text"===t&&p(e)?e.toLowerCase():"vnode"===t&&E(e)&&"__v_isVNode"in e?e.children.toLowerCase():e,capitalize:(e,t)=>"text"===t&&p(e)?Ae(e):"vnode"===t&&E(e)&&"__v_isVNode"in e?Ae(e.children):e}),f=e.pluralRules||{},N=_(e.missing)?e.missing:null,L=!d(e.missingWarn)&&!c(e.missingWarn)||e.missingWarn,T=!d(e.fallbackWarn)&&!c(e.fallbackWarn)||e.fallbackWarn,k=!!e.fallbackFormat,g=!!e.unresolving,h=_(e.postTranslation)?e.postTranslation:null,I=A(e.processor)?e.processor:null,C=!d(e.warnHtmlMessage)||e.warnHtmlMessage,y=!!e.escapeParameter,b=_(e.messageCompiler)?e.messageCompiler:Te,O=_(e.messageResolver)?e.messageResolver:ke||Y,D=_(e.localeFallbacker)?e.localeFallbacker:ge||ue,S=E(e.fallbackContext)?e.fallbackContext:void 0,P=_(e.onWarn)?e.onWarn:i,v=e,M=E(v.__datetimeFormatters)?v.__datetimeFormatters:new Map,R=E(v.__numberFormatters)?v.__numberFormatters:new Map,w=E(v.__meta)?v.__meta:{};ve++;const x={version:t,cid:ve,locale:n,fallbackLocale:r,messages:o,modifiers:l,pluralRules:f,missing:N,missingWarn:L,fallbackWarn:T,fallbackFormat:k,unresolving:g,postTranslation:h,processor:I,warnHtmlMessage:C,escapeParameter:y,messageCompiler:b,messageResolver:O,localeFallbacker:D,fallbackContext:S,onWarn:P,__meta:w};return x.datetimeFormats=a,x.numberFormats=s,x.__datetimeFormatters=M,x.__numberFormatters=R,x.__v_emitter=null!=v.__v_emitter?v.__v_emitter:void 0,oe(x,t,w),x}function Re(e,t){return e instanceof RegExp?e.test(t):e}function we(e,t){return e instanceof RegExp?e.test(t):e}function xe(e,t,n,r,o){const{missing:a,onWarn:s}=e;{const r=e.__v_emitter;r&&r.emit("missing",{locale:n,key:t,type:o,groupId:`${o}:${t}`})}if(null!==a){const r=a(e,n,t,o);return p(r)?r:t}return we(r,t)&&s(ie(ce.NOT_FOUND_KEY,{key:t,locale:n})),t}function Ue(e,t,n){e.__localeChainCache=new Map,e.localeFallbacker(e,n,t)}const Fe=/<\/?[\w\s="/.':;#-\/]+>/;const $e=e=>e;let We=Object.create(null);function Xe(){We=Object.create(null)}function Ke(e,t={}){{!function(e,t){(!d(t.warnHtmlMessage)||t.warnHtmlMessage)&&Fe.test(e)&&i(o("Detected HTML in '{source}' message. Recommend not using HTML messages to avoid XSS.",{source:e}))}(e,t);const n=(t.onCacheKey||$e)(e),r=We[n];if(r)return r;let a=!1;const s=t.onError||h;t.onError=e=>{a=!0,s(e)};const{code:c}=F(e,t),l=new Function(`return ${c}`)();return a?l:We[n]=l}}let Be=T.__EXTEND_POINT__;const Ge=()=>++Be,Ye={INVALID_ARGUMENT:Be,INVALID_DATE_ARGUMENT:Ge(),INVALID_ISO_DATE_ARGUMENT:Ge(),__EXTEND_POINT__:Ge()};function Ve(e){return g(e,null,{messages:He})}const He={[Ye.INVALID_ARGUMENT]:"Invalid arguments",[Ye.INVALID_DATE_ARGUMENT]:"The date provided is an invalid Date object.Make sure your Date represents a valid date.",[Ye.INVALID_ISO_DATE_ARGUMENT]:"The argument provided is not a valid ISO date string"},je=()=>"",Qe=e=>_(e);function ze(r,...o){const{fallbackFormat:a,postTranslation:c,unresolving:l,messageCompiler:_,fallbackLocale:N,messages:L}=r,[A,T]=Ze(...o),k=d(T.missingWarn)?T.missingWarn:r.missingWarn,g=d(T.fallbackWarn)?T.fallbackWarn:r.fallbackWarn,h=d(T.escapeParameter)?T.escapeParameter:r.escapeParameter,I=!!T.resolvedMessage,C=p(T.default)||d(T.default)?d(T.default)?_?A:()=>A:T.default:a?_?A:()=>A:"",y=a||""!==C,b=p(T.locale)?T.locale:r.locale;h&&function(e){m(e.list)?e.list=e.list.map((e=>p(e)?f(e):e)):E(e.named)&&Object.keys(e.named).forEach((t=>{p(e.named[t])&&(e.named[t]=f(e.named[t]))}))}(T);let[O,D,S]=I?[A,b,L[b]||{}]:Je(r,A,b,N,g,k),P=O,v=A;if(I||p(P)||Qe(P)||y&&(P=C,v=P),!(I||(p(P)||Qe(P))&&p(D)))return l?-1:A;if(p(P)&&null==r.messageCompiler)return i(`The message format compilation is not supported in this build. Because message compiler isn't included. You need to pre-compilation all message format. So translate function return '${A}'.`),A;let M=!1;const R=Qe(P)?P:qe(r,A,D,P,v,(()=>{M=!0}));if(M)return P;const w=function(e,t,n,r){const{modifiers:o,pluralRules:a,messageResolver:c,fallbackLocale:l,fallbackWarn:i,missingWarn:u,fallbackContext:f}=e,m=r=>{let o=c(n,r);if(null==o&&f){const[,,e]=Je(f,r,t,l,i,u);o=c(e,r)}if(p(o)){let n=!1;const a=qe(e,r,t,o,r,(()=>{n=!0}));return n?je:a}return Qe(o)?o:je},_={locale:t,modifiers:o,pluralRules:a,messages:m};e.processor&&(_.processor=e.processor);r.list&&(_.list=r.list);r.named&&(_.named=r.named);s(r.plural)&&(_.pluralIndex=r.plural);return _}(r,D,S,T),x=function(r,o,a){let s,c,l=null;e&&(l=window.performance.now(),s="intlify-message-evaluation-start",c="intlify-message-evaluation-end",t&&t(s));const i=o(a);if(e){const e=window.performance.now(),a=r.__v_emitter;a&&l&&a.emit("message-evaluation",{type:"message-evaluation",value:i,time:e-l,groupId:`translate:${o.key}`}),s&&c&&t&&n&&(t(c),n("intlify message evaluation",s,c))}return i}(r,R,Z(w)),U=c?c(x,A):x;{const e={timestamp:Date.now(),key:p(A)?A:Qe(P)?P.key:"",locale:D||(Qe(P)?P.locale:""),format:p(P)?P:Qe(P)?P.source:"",message:U};e.meta=u({},r.__meta,Oe()||{}),ae(e)}return U}function Je(r,o,a,s,c,l){const{messages:i,onWarn:u,messageResolver:f,localeFallbacker:m}=r,d=m(r,s,a);let E,N={},L=null,A=a,T=null;const k="translate";for(let s=0;s<d.length;s++){if(E=T=d[s],a!==E&&Re(c,o)&&u(ie(ce.FALLBACK_TO_TRANSLATE,{key:o,target:E})),a!==E){const e=r.__v_emitter;e&&e.emit("fallback",{type:k,key:o,from:A,to:T,groupId:`${k}:${o}`})}N=i[E]||{};let m,g,h=null;if(e&&(h=window.performance.now(),m="intlify-message-resolve-start",g="intlify-message-resolve-end",t&&t(m)),null===(L=f(N,o))&&(L=N[o]),e){const e=window.performance.now(),a=r.__v_emitter;a&&h&&L&&a.emit("message-resolve",{type:"message-resolve",key:o,message:L,time:e-h,groupId:`${k}:${o}`}),m&&g&&t&&n&&(t(g),n("intlify message resolve",m,g))}if(p(L)||_(L))break;const I=xe(r,o,E,l,k);I!==o&&(L=I),A=T}return[L,E,N]}function qe(r,o,s,c,l,i){const{messageCompiler:u,warnHtmlMessage:f}=r;if(Qe(c)){const e=c;return e.locale=e.locale||s,e.key=e.key||o,e}if(null==u){const e=()=>c;return e.locale=s,e.key=o,e}let m,_,p=null;e&&(p=window.performance.now(),m="intlify-message-compilation-start",_="intlify-message-compilation-end",t&&t(m));const d=u(c,function(e,t,n,r,o,s){return{warnHtmlMessage:o,onError:t=>{s&&s(t);{const o=`Message compilation error: ${t.message}`,a=t.location&&function(e,t=0,n=e.length){const r=e.split(/\r?\n/);let o=0;const a=[];for(let e=0;e<r.length;e++)if(o+=r[e].length+1,o>=t){for(let s=e-2;s<=e+2||n>o;s++){if(s<0||s>=r.length)continue;const c=s+1;a.push(`${c}${" ".repeat(3-String(c).length)}| ${r[s]}`);const l=r[s].length;if(s===e){const e=t-(o-l)+1,r=Math.max(1,n>o?l-e:n-t);a.push(" | "+" ".repeat(e)+"^".repeat(r))}else if(s>e){if(n>o){const e=Math.max(Math.min(n-o,l),1);a.push(" | "+"^".repeat(e))}o+=l+1}}break}return a.join("\n")}(r,t.location.start.offset,t.location.end.offset),s=e.__v_emitter;s&&s.emit("compile-error",{message:r,error:t.message,start:t.location&&t.location.start.offset,end:t.location&&t.location.end.offset,groupId:`translate:${n}`}),console.error(a?`${o}\n${a}`:o)}},onCacheKey:e=>((e,t,n)=>a({l:e,k:t,s:n}))(t,n,e)}}(r,s,l,c,f,i));if(e){const e=window.performance.now(),a=r.__v_emitter;a&&p&&a.emit("message-compilation",{type:"message-compilation",message:c,time:e-p,groupId:`translate:${o}`}),m&&_&&t&&n&&(t(_),n("intlify message compilation",m,_))}return d.locale=s,d.key=o,d.source=c,d}function Ze(...e){const[t,n,r]=e,o={};if(!p(t)&&!s(t)&&!Qe(t))throw Ve(Ye.INVALID_ARGUMENT);const a=s(t)?String(t):(Qe(t),t);return s(n)?o.plural=n:p(n)?o.default=n:A(n)&&!l(n)?o.named=n:m(n)&&(o.list=n),s(r)?o.plural=r:p(r)?o.default=r:A(r)&&u(o,r),[a,o]}const et="undefined"!=typeof Intl,tt=et&&void 0!==Intl.DateTimeFormat,nt=et&&void 0!==Intl.NumberFormat;function rt(e,...t){const{datetimeFormats:n,unresolving:r,fallbackLocale:o,onWarn:a,localeFallbacker:s}=e,{__datetimeFormatters:c}=e;if(!tt)return a(ie(ce.CANNOT_FORMAT_DATE)),"";const[i,f,m,_]=at(...t),E=d(m.missingWarn)?m.missingWarn:e.missingWarn,N=d(m.fallbackWarn)?m.fallbackWarn:e.fallbackWarn,L=!!m.part,T=p(m.locale)?m.locale:e.locale,k=s(e,o,T);if(!p(i)||""===i)return new Intl.DateTimeFormat(T,_).format(f);let g,h={},I=null,C=T,y=null;const b="datetime format";for(let t=0;t<k.length;t++){if(g=y=k[t],T!==g&&Re(N,i)&&a(ie(ce.FALLBACK_TO_DATE_FORMAT,{key:i,target:g})),T!==g){const t=e.__v_emitter;t&&t.emit("fallback",{type:b,key:i,from:C,to:y,groupId:`${b}:${i}`})}if(h=n[g]||{},I=h[i],A(I))break;xe(e,i,g,E,b),C=y}if(!A(I)||!p(g))return r?-1:i;let O=`${g}__${i}`;l(_)||(O=`${O}__${JSON.stringify(_)}`);let D=c.get(O);return D||(D=new Intl.DateTimeFormat(g,u({},I,_)),c.set(O,D)),L?D.formatToParts(f):D.format(f)}const ot=["localeMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName","formatMatcher","hour12","timeZone","dateStyle","timeStyle","calendar","dayPeriod","numberingSystem","hourCycle","fractionalSecondDigits"];function at(...e){const[t,n,r,o]=e,a={};let c,l={};if(p(t)){const e=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!e)throw Ve(Ye.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();c=new Date(n);try{c.toISOString()}catch(e){throw Ve(Ye.INVALID_ISO_DATE_ARGUMENT)}}else if("[object Date]"===L(t)){if(isNaN(t.getTime()))throw Ve(Ye.INVALID_DATE_ARGUMENT);c=t}else{if(!s(t))throw Ve(Ye.INVALID_ARGUMENT);c=t}return p(n)?a.key=n:A(n)&&Object.keys(n).forEach((e=>{ot.includes(e)?l[e]=n[e]:a[e]=n[e]})),p(r)?a.locale=r:A(r)&&(l=r),A(o)&&(l=o),[a.key||"",c,a,l]}function st(e,t,n){const r=e;for(const e in n){const n=`${t}__${e}`;r.__datetimeFormatters.has(n)&&r.__datetimeFormatters.delete(n)}}function ct(e,...t){const{numberFormats:n,unresolving:r,fallbackLocale:o,onWarn:a,localeFallbacker:s}=e,{__numberFormatters:c}=e;if(!nt)return a(ie(ce.CANNOT_FORMAT_NUMBER)),"";const[i,f,m,_]=it(...t),E=d(m.missingWarn)?m.missingWarn:e.missingWarn,N=d(m.fallbackWarn)?m.fallbackWarn:e.fallbackWarn,L=!!m.part,T=p(m.locale)?m.locale:e.locale,k=s(e,o,T);if(!p(i)||""===i)return new Intl.NumberFormat(T,_).format(f);let g,h={},I=null,C=T,y=null;const b="number format";for(let t=0;t<k.length;t++){if(g=y=k[t],T!==g&&Re(N,i)&&a(ie(ce.FALLBACK_TO_NUMBER_FORMAT,{key:i,target:g})),T!==g){const t=e.__v_emitter;t&&t.emit("fallback",{type:b,key:i,from:C,to:y,groupId:`${b}:${i}`})}if(h=n[g]||{},I=h[i],A(I))break;xe(e,i,g,E,b),C=y}if(!A(I)||!p(g))return r?-1:i;let O=`${g}__${i}`;l(_)||(O=`${O}__${JSON.stringify(_)}`);let D=c.get(O);return D||(D=new Intl.NumberFormat(g,u({},I,_)),c.set(O,D)),L?D.formatToParts(f):D.format(f)}const lt=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function it(...e){const[t,n,r,o]=e,a={};let c={};if(!s(t))throw Ve(Ye.INVALID_ARGUMENT);const l=t;return p(n)?a.key=n:A(n)&&Object.keys(n).forEach((e=>{lt.includes(e)?c[e]=n[e]:a[e]=n[e]})),p(r)?a.locale=r:A(r)&&(c=r),A(o)&&(c=o),[a.key||"",l,a,c]}function ut(e,t,n){const r=e;for(const e in n){const n=`${t}__${e}`;r.__numberFormatters.has(n)&&r.__numberFormatters.delete(n)}}export{T as CompileErrorCodes,Ye as CoreErrorCodes,ce as CoreWarnCodes,ot as DATETIME_FORMAT_OPTIONS_KEYS,Ne as DEFAULT_LOCALE,Q as DEFAULT_MESSAGE_DATA_TYPE,Le as MISSING_RESOLVE_VALUE,Ee as NOT_REOSLVED,lt as NUMBER_FORMAT_OPTIONS_KEYS,de as VERSION,Xe as clearCompileCache,st as clearDateTimeFormat,ut as clearNumberFormat,Ke as compileToFunction,g as createCompileError,Me as createCoreContext,Ve as createCoreError,Z as createMessageContext,rt as datetime,fe as fallbackWithLocaleChain,ue as fallbackWithSimple,Oe as getAdditionalMeta,re as getDevToolsHook,Pe as getFallbackContext,ie as getWarnMessage,xe as handleMissing,oe as initI18nDevTools,Qe as isMessageFunction,Re as isTranslateFallbackWarn,we as isTranslateMissingWarn,ct as number,B as parse,at as parseDateTimeArgs,it as parseNumberArgs,Ze as parseTranslateArgs,Ce as registerLocaleFallbacker,he as registerMessageCompiler,Ie as registerMessageResolver,V as resolveValue,Y as resolveWithKeyValue,be as setAdditionalMeta,ne as setDevToolsHook,Se as setFallbackContext,ze as translate,ae as translateDevTools,Ue as updateFallbackLocale};
|
package/index.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './index.js'
|