Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@intlify/core

Package Overview
Dependencies
Maintainers
2
Versions
173
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@intlify/core - npm Package Compare versions

Comparing version 9.2.0-alpha.9 to 9.2.0-beta.1

2

dist/core.cjs.js
/*!
* core v9.2.0-alpha.9
* core v9.2.0-beta.1
* (c) 2021 kazuya kawaguchi

@@ -4,0 +4,0 @@ * Released under the MIT License.

/*!
* core v9.2.0-alpha.9
* core v9.2.0-beta.1
* (c) 2021 kazuya kawaguchi

@@ -4,0 +4,0 @@ * Released under the MIT License.

/*!
* core v9.2.0-alpha.9
* core v9.2.0-beta.1
* (c) 2021 kazuya kawaguchi
* Released under the MIT License.
*/
const e=/\{([0-9a-zA-Z]+)\}/g;const t=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),n=e=>"number"==typeof e&&isFinite(e),r=e=>"[object RegExp]"===k(e),o=e=>h(e)&&0===Object.keys(e).length;function c(e,t){"undefined"!=typeof console&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}const s=Object.assign;function a(e){return e.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;")}const u=Object.prototype.hasOwnProperty;function l(e,t){return u.call(e,t)}const i=Array.isArray,f=e=>"function"==typeof e,p=e=>"string"==typeof e,m=e=>"boolean"==typeof e,d=e=>null!==e&&"object"==typeof e,_=Object.prototype.toString,k=e=>_.call(e),h=e=>"[object Object]"===k(e),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};function b(e,t,n={}){const{domain:r}=n,o=new SyntaxError(String(e));return o.code=e,t&&(o.location=t),o.domain=r,o}function E(e){throw e}function N(e,t,n){const r={start:e,end:t};return null!=n&&(r.source=n),r}const g=String.fromCharCode(8232),L=String.fromCharCode(8233);function y(e){const t=e;let n=0,r=1,o=1,c=0;const s=e=>"\r"===t[e]&&"\n"===t[e+1],a=e=>t[e]===L,u=e=>t[e]===g,l=e=>s(e)||(e=>"\n"===t[e])(e)||a(e)||u(e),i=e=>s(e)||a(e)||u(e)?"\n":t[e];function f(){return c=0,l(n)&&(r++,o=0),s(n)&&n++,n++,o++,t[n]}return{index:()=>n,line:()=>r,column:()=>o,peekOffset:()=>c,charAt:i,currentChar:()=>i(n),currentPeek:()=>i(n+c),next:f,peek:function(){return s(n+c)&&c++,c++,t[n+c]},reset:function(){n=0,r=1,o=1,c=0},resetPeek:function(e=0){c=e},skipToPeek:function(){const e=n+c;for(;e!==n;)f();c=0}}}const A=void 0;function C(e,t={}){const n=!1!==t.location,r=y(e),o=()=>r.index(),c=()=>{return e=r.line(),t=r.column(),n=r.index(),{line:e,column:t,offset:n};var e,t,n},s=c(),a=o(),u={currentType:14,offset:a,startLoc:s,endLoc:s,lastType:14,lastOffset:a,lastStartLoc:s,lastEndLoc:s,braceNest:0,inLinked:!1,text:""},l=()=>u,{onError:i}=t;function f(e,t,r){e.endLoc=c(),e.currentType=t;const o={type:t};return n&&(o.loc=N(e.startLoc,e.endLoc)),null!=r&&(o.value=r),o}const p=e=>f(e,14);function m(e,t){return e.currentChar()===t?(e.next(),t):(c(),"")}function d(e){let t="";for(;" "===e.currentPeek()||"\n"===e.currentPeek();)t+=e.currentPeek(),e.peek();return t}function _(e){const t=d(e);return e.skipToPeek(),t}function k(e){if(e===A)return!1;const t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||95===t}function h(e,t){const{currentType:n}=t;if(2!==n)return!1;d(e);const r=function(e){if(e===A)return!1;const t=e.charCodeAt(0);return t>=48&&t<=57}("-"===e.currentPeek()?e.peek():e.currentPeek());return e.resetPeek(),r}function T(e){d(e);const t="|"===e.currentPeek();return e.resetPeek(),t}function b(e,t=!0){const n=(t=!1,r="",o=!1)=>{const c=e.currentPeek();return"{"===c?"%"!==r&&t:"@"!==c&&c?"%"===c?(e.peek(),n(t,"%",!0)):"|"===c?!("%"!==r&&!o)||!(" "===r||"\n"===r):" "===c?(e.peek(),n(!0," ",o)):"\n"!==c||(e.peek(),n(!0,"\n",o)):"%"===r||t},r=n();return t&&e.resetPeek(),r}function E(e,t){const n=e.currentChar();return n===A?A:t(n)?(e.next(),n):null}function g(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 L(e){return E(e,(e=>{const t=e.charCodeAt(0);return t>=48&&t<=57}))}function C(e){return E(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 x(e){const t=e.currentChar();switch(t){case"\\":case"'":return e.next(),`\\${t}`;case"u":return I(e,t,4);case"U":return I(e,t,6);default:return c(),""}}function I(e,t,n){m(e,t);let r="";for(let t=0;t<n;t++){const t=C(e);if(!t){c(),e.currentChar();break}r+=t}return`\\${t}${r}`}function P(e){_(e);const t=m(e,"|");return _(e),t}function v(e,t){let n=null;switch(e.currentChar()){case"{":return t.braceNest>=1&&c(),e.next(),n=f(t,2,"{"),_(e),t.braceNest++,n;case"}":return t.braceNest>0&&2===t.currentType&&c(),e.next(),n=f(t,3,"}"),t.braceNest--,t.braceNest>0&&_(e),t.inLinked&&0===t.braceNest&&(t.inLinked=!1),n;case"@":return t.braceNest>0&&c(),n=F(e,t)||p(t),t.braceNest=0,n;default:let r=!0,o=!0,s=!0;if(T(e))return t.braceNest>0&&c(),n=f(t,1,P(e)),t.braceNest=0,t.inLinked=!1,n;if(t.braceNest>0&&(5===t.currentType||6===t.currentType||7===t.currentType))return c(),t.braceNest=0,w(e,t);if(r=function(e,t){const{currentType:n}=t;if(2!==n)return!1;d(e);const r=k(e.currentPeek());return e.resetPeek(),r}(e,t))return n=f(t,5,function(e){_(e);let t="",n="";for(;t=g(e);)n+=t;return e.currentChar()===A&&c(),n}(e)),_(e),n;if(o=h(e,t))return n=f(t,6,function(e){_(e);let t="";return"-"===e.currentChar()?(e.next(),t+=`-${O(e)}`):t+=O(e),e.currentChar()===A&&c(),t}(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=f(t,7,function(e){_(e),m(e,"'");let t="",n="";const r=e=>"'"!==e&&"\n"!==e;for(;t=E(e,r);)n+="\\"===t?x(e):t;const o=e.currentChar();return"\n"===o||o===A?(c(),"\n"===o&&(e.next(),m(e,"'")),n):(m(e,"'"),n)}(e)),_(e),n;if(!r&&!o&&!s)return n=f(t,13,function(e){_(e);let t="",n="";const r=e=>"{"!==e&&"}"!==e&&" "!==e&&"\n"!==e;for(;t=E(e,r);)n+=t;return n}(e)),c(),_(e),n}return n}function F(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||c(),o){case"@":return e.next(),r=f(t,8,"@"),t.inLinked=!0,r;case".":return _(e),e.next(),f(t,9,".");case":":return _(e),e.next(),f(t,10,":");default:return T(e)?(r=f(t,1,P(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),F(e,t)):function(e,t){const{currentType:n}=t;if(9!==n)return!1;d(e);const r=k(e.currentPeek());return e.resetPeek(),r}(e,t)?(_(e),f(t,12,function(e){let t="",n="";for(;t=g(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?k(e.peek()):!("@"===t||"%"===t||"|"===t||":"===t||"."===t||" "===t||!t)&&("\n"===t?(e.peek(),r()):k(t))},o=r();return e.resetPeek(),o}(e,t)?(_(e),"{"===o?v(e,t)||r:f(t,11,function(e){const t=(n=!1,r)=>{const o=e.currentChar();return"{"!==o&&"%"!==o&&"@"!==o&&"|"!==o&&o?" "===o?r:"\n"===o?(r+=o,e.next(),t(n,r)):(r+=o,e.next(),t(!0,r)):r};return t(!1,"")}(e))):(8===n&&c(),t.braceNest=0,t.inLinked=!1,w(e,t))}}function w(e,t){let n={type:14};if(t.braceNest>0)return v(e,t)||p(t);if(t.inLinked)return F(e,t)||p(t);const r=e.currentChar();switch(r){case"{":return v(e,t)||p(t);case"}":return c(),e.next(),f(t,3,"}");case"@":return F(e,t)||p(t);default:if(T(e))return n=f(t,1,P(e)),t.braceNest=0,t.inLinked=!1,n;if(b(e))return f(t,0,function(e){const t=n=>{const r=e.currentChar();return"{"!==r&&"}"!==r&&"@"!==r&&r?"%"===r?b(e)?(n+=r,e.next(),t(n)):n:"|"===r?n:" "===r||"\n"===r?b(e)?(n+=r,e.next(),t(n)):T(e)?n:(n+=r,e.next(),t(n)):(n+=r,e.next(),t(n)):n};return t("")}(e));if("%"===r)return e.next(),f(t,4,"%")}return n}return{nextToken:function(){const{currentType:e,offset:t,startLoc:n,endLoc:s}=u;return u.lastType=e,u.lastOffset=t,u.lastStartLoc=n,u.lastEndLoc=s,u.offset=o(),u.startLoc=c(),r.currentChar()===A?f(u,14):w(r,u)},currentOffset:o,currentPosition:c,context:l}}const O=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function x(e,t,n){switch(e){case"\\\\":return"\\";case"\\'":return"'";default:{const e=parseInt(t||n,16);return e<=55295||e>=57344?String.fromCodePoint(e):"�"}}}function I(e={}){const t=!1!==e.location,{onError:n}=e;function r(e,n,r){const o={type:e,start:n,end:n};return t&&(o.loc={start:r,end:r}),o}function o(e,n,r,o){e.end=n,o&&(e.type=o),t&&e.loc&&(e.loc.end=r)}function c(e,t){const n=e.context(),c=r(3,n.offset,n.startLoc);return c.value=t,o(c,e.currentOffset(),e.currentPosition()),c}function a(e,t){const n=e.context(),{lastOffset:c,lastStartLoc:s}=n,a=r(5,c,s);return a.index=parseInt(t,10),e.nextToken(),o(a,e.currentOffset(),e.currentPosition()),a}function u(e,t){const n=e.context(),{lastOffset:c,lastStartLoc:s}=n,a=r(4,c,s);return a.key=t,e.nextToken(),o(a,e.currentOffset(),e.currentPosition()),a}function l(e,t){const n=e.context(),{lastOffset:c,lastStartLoc:s}=n,a=r(9,c,s);return a.value=t.replace(O,x),e.nextToken(),o(a,e.currentOffset(),e.currentPosition()),a}function i(e){const t=e.context(),n=r(6,t.offset,t.startLoc);let c=e.nextToken();if(9===c.type){const t=function(e){const t=e.nextToken(),n=e.context(),{lastOffset:c,lastStartLoc:s}=n,a=r(8,c,s);return 12!==t.type?(a.value="",o(a,c,s),{nextConsumeToken:t,node:a}):(null==t.value&&P(t),a.value=t.value||"",o(a,e.currentOffset(),e.currentPosition()),{node:a})}(e);n.modifier=t.node,c=t.nextConsumeToken||e.nextToken()}switch(10!==c.type&&P(c),c=e.nextToken(),2===c.type&&(c=e.nextToken()),c.type){case 11:null==c.value&&P(c),n.key=function(e,t){const n=e.context(),c=r(7,n.offset,n.startLoc);return c.value=t,o(c,e.currentOffset(),e.currentPosition()),c}(e,c.value||"");break;case 5:null==c.value&&P(c),n.key=u(e,c.value||"");break;case 6:null==c.value&&P(c),n.key=a(e,c.value||"");break;case 7:null==c.value&&P(c),n.key=l(e,c.value||"");break;default:const t=e.context(),s=r(7,t.offset,t.startLoc);return s.value="",o(s,t.offset,t.startLoc),n.key=s,o(n,t.offset,t.startLoc),{nextConsumeToken:c,node:n}}return o(n,e.currentOffset(),e.currentPosition()),{node:n}}function f(e){const t=e.context(),n=r(2,1===t.currentType?e.currentOffset():t.offset,1===t.currentType?t.endLoc:t.startLoc);n.items=[];let s=null;do{const t=s||e.nextToken();switch(s=null,t.type){case 0:null==t.value&&P(t),n.items.push(c(e,t.value||""));break;case 6:null==t.value&&P(t),n.items.push(a(e,t.value||""));break;case 5:null==t.value&&P(t),n.items.push(u(e,t.value||""));break;case 7:null==t.value&&P(t),n.items.push(l(e,t.value||""));break;case 8:const r=i(e);n.items.push(r.node),s=r.nextConsumeToken||null}}while(14!==t.currentType&&1!==t.currentType);return o(n,1===t.currentType?t.lastOffset:e.currentOffset(),1===t.currentType?t.lastEndLoc:e.currentPosition()),n}function p(e){const t=e.context(),{offset:n,startLoc:c}=t,s=f(e);return 14===t.currentType?s:function(e,t,n,c){const s=e.context();let a=0===c.items.length;const u=r(1,t,n);u.cases=[],u.cases.push(c);do{const t=f(e);a||(a=0===t.items.length),u.cases.push(t)}while(14!==s.currentType);return o(u,e.currentOffset(),e.currentPosition()),u}(e,n,c,s)}return{parse:function(n){const c=C(n,s({},e)),a=c.context(),u=r(0,a.offset,a.startLoc);return t&&u.loc&&(u.loc.source=n),u.body=p(c),o(u,c.currentOffset(),c.currentPosition()),u}}}function P(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 v(e,t){for(let n=0;n<e.length;n++)F(e[n],t)}function F(e,t){switch(e.type){case 1:v(e.cases,t),t.helper("plural");break;case 2:v(e.items,t);break;case 6:F(e.key,t),t.helper("linked");break;case 5:t.helper("interpolate"),t.helper("list");break;case 4:t.helper("interpolate"),t.helper("named")}}function w(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&&F(e.body,n);const r=n.context();e.helpers=Array.from(r.helpers)}function R(e,t){const{helper:n}=e;switch(t.type){case 0:!function(e,t){t.body?R(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&&(R(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&&(R(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")}(`),R(e,t.key),t.modifier&&(e.push(", "),R(e,t.modifier)),e.push(")")}(e,t);break;case 8:case 7:e.push(JSON.stringify(t.value),t);break;case 5:e.push(`${n("interpolate")}(${n("list")}(${t.index}))`,t);break;case 4:e.push(`${n("interpolate")}(${n("named")}(${JSON.stringify(t.key)}))`,t);break;case 9:case 3:e.push(JSON.stringify(t.value),t)}}function D(e,t={}){const n=s({},t),r=I(n).parse(e);return w(r,n),((e,t={})=>{const n=p(t.mode)?t.mode:"normal",r=p(t.filename)?t.filename:"message.intl",o=t.needIndent?t.needIndent:"arrow"!==n,c=e.helpers||[],s=function(e,t){const{filename:n,breakLineCode:r,needIndent:o}=t,c={source:e.loc.source,filename:n,code:"",column:1,line:1,offset:0,map:void 0,breakLineCode:r,needIndent:o,indentLevel:0};function s(e,t){c.code+=e}function a(e,t=!0){const n=t?r:"";s(o?n+" ".repeat(e):n)}return{context:()=>c,push:s,indent:function(e=!0){const t=++c.indentLevel;e&&a(t)},deindent:function(e=!0){const t=--c.indentLevel;e&&a(t)},newline:function(){a(c.indentLevel)},helper:e=>`_${e}`,needIndent:()=>c.needIndent}}(e,{mode:n,filename:r,sourceMap:!!t.sourceMap,breakLineCode:null!=t.breakLineCode?t.breakLineCode:"arrow"===n?";":"\n",needIndent:o});s.push("normal"===n?"function __msg__ (ctx) {":"(ctx) => {"),s.indent(o),c.length>0&&(s.push(`const { ${c.map((e=>`${e}: _${e}`)).join(", ")} } = ctx`),s.newline()),s.push("return "),R(s,e),s.deindent(o),s.push("}");const{code:a,map:u}=s.context();return{ast:e,code:a,map:u?u.toJSON():void 0}})(r,n)}const S=[];S[0]={w:[0],i:[3,0],"[":[4],o:[7]},S[1]={w:[1],".":[2],"[":[4],o:[7]},S[2]={w:[2],i:[3,0],0:[3,0]},S[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},S[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},S[5]={"'":[4,0],o:8,l:[5,0]},S[6]={'"':[4,0],o:8,l:[6,0]};const M=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function $(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 U(e){const t=e.trim();return("0"!==e.charAt(0)||!isNaN(parseInt(e)))&&(M.test(t)?function(e){const t=e.charCodeAt(0);return t!==e.charCodeAt(e.length-1)||34!==t&&39!==t?e:e.slice(1,-1)}(t):"*"+t)}function W(e){const t=[];let n,r,o,c,s,a,u,l=-1,i=0,f=0;const p=[];function m(){const t=e[l+1];if(5===i&&"'"===t||6===i&&'"'===t)return l++,o="\\"+t,p[0](),!0}for(p[0]=()=>{void 0===r?r=o:r+=o},p[1]=()=>{void 0!==r&&(t.push(r),r=void 0)},p[2]=()=>{p[0](),f++},p[3]=()=>{if(f>0)f--,i=4,p[0]();else{if(f=0,void 0===r)return!1;if(r=U(r),!1===r)return!1;p[1]()}};null!==i;)if(l++,n=e[l],"\\"!==n||!m()){if(c=$(n),u=S[i],s=u[c]||u.l||8,8===s)return;if(i=s[0],void 0!==s[1]&&(a=p[s[1]],a&&(o=n,!1===a())))return;if(7===i)return t}}const K=new Map;function j(e,t){return d(e)?e[t]:null}function B(e,t){if(!d(e))return null;let n=K.get(t);if(n||(n=W(t),n&&K.set(t,n)),!n)return null;const r=n.length;let o=e,c=0;for(;c<r;){const e=o[n[c]];if(void 0===e)return null;o=e,c++}return o}function G(e){if(!d(e))return e;for(const t in e)if(l(e,t))if(t.includes(".")){const n=t.split("."),r=n.length-1;let o=e;for(let e=0;e<r;e++)n[e]in o||(o[n[e]]={}),o=o[n[e]];o[n[r]]=e[t],delete e[t],d(o[n[r]])&&G(o[n[r]])}else d(e[t])&&G(e[t]);return e}const V=e=>e,H=e=>"",X="text",J=e=>0===e.length?"":e.join(""),z=e=>null==e?"":i(e)||h(e)&&e.toString===_?JSON.stringify(e,null,2):String(e);function Y(e,t){return e=Math.abs(e),2===t?e?e>1?1:0:1:e?Math.min(e,2):0}function Q(e={}){const t=e.locale,r=function(e){const t=n(e.pluralIndex)?e.pluralIndex:-1;return e.named&&(n(e.named.count)||n(e.named.n))?n(e.named.count)?e.named.count:n(e.named.n)?e.named.n:t:t}(e),o=d(e.pluralRules)&&p(t)&&f(e.pluralRules[t])?e.pluralRules[t]:Y,c=d(e.pluralRules)&&p(t)&&f(e.pluralRules[t])?Y:void 0,s=e.list||[],a=e.named||{};n(e.pluralIndex)&&function(e,t){t.count||(t.count=e),t.n||(t.n=e)}(r,a);function u(t){const n=f(e.messages)?e.messages(t):!!d(e.messages)&&e.messages[t];return n||(e.parent?e.parent.message(t):H)}const l=h(e.processor)&&f(e.processor.normalize)?e.processor.normalize:J,i=h(e.processor)&&f(e.processor.interpolate)?e.processor.interpolate:z,m={list:e=>s[e],named:e=>a[e],plural:e=>e[o(r,e.length,c)],linked:(t,n)=>{const r=u(t)(m);return p(n)?(o=n,e.modifiers?e.modifiers[o]:V)(r):r;var o},message:u,type:h(e.processor)&&p(e.processor.type)?e.processor.type:"text",interpolate:i,normalize:l};return m}const q="i18n:init";let Z=null;function ee(e){Z=e}function te(){return Z}function ne(e,t,n){Z&&Z.emit(q,{timestamp:Date.now(),i18n:e,version:t,meta:n})}const re=oe("function:translate");function oe(e){return t=>Z&&Z.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},se={[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 ae(t,...n){return function(t,...n){return 1===n.length&&d(n[0])&&(n=n[0]),n&&n.hasOwnProperty||(n={}),t.replace(e,((e,t)=>n.hasOwnProperty(t)?n[t]:""))}(se[t],...n)}function ue(e,t,n){return[...new Set([n,...i(t)?t:d(t)?Object.keys(t):p(t)?[t]:[n]])]}function le(e,t,n){const r=p(n)?n:_e,o=e;o.__localeChainCache||(o.__localeChainCache=new Map);let c=o.__localeChainCache.get(r);if(!c){c=[];let e=[n];for(;i(e);)e=ie(c,e,t);const s=i(t)||!h(t)?t:t.default?t.default:null;e=p(s)?[s]:s,i(e)&&ie(c,e,!1),o.__localeChainCache.set(r,c)}return c}function ie(e,t,n){let r=!0;for(let o=0;o<t.length&&m(r);o++){p(t[o])&&(r=fe(e,t[o],n))}return r}function fe(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),(i(n)||h(n))&&n[o]&&(r=n[o])}return r}const me="9.2.0-alpha.9",de=-1,_e="en-US",ke="";let he,Te,be;function Ee(e){he=e}function Ne(e){Te=e}function ge(e){be=e}let Le=null;const ye=e=>{Le=e},Ae=()=>Le;let Ce=0;function Oe(e={}){const t=p(e.version)?e.version:"9.2.0-alpha.9",n=p(e.locale)?e.locale:_e,o=i(e.fallbackLocale)||h(e.fallbackLocale)||p(e.fallbackLocale)||!1===e.fallbackLocale?e.fallbackLocale:n,a=h(e.messages)?e.messages:{[n]:{}},u=h(e.datetimeFormats)?e.datetimeFormats:{[n]:{}},l=h(e.numberFormats)?e.numberFormats:{[n]:{}},_=s({},e.modifiers||{},{upper:e=>p(e)?e.toUpperCase():e,lower:e=>p(e)?e.toLowerCase():e,capitalize:e=>p(e)?`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`:e}),k=e.pluralRules||{},T=f(e.missing)?e.missing:null,b=!m(e.missingWarn)&&!r(e.missingWarn)||e.missingWarn,E=!m(e.fallbackWarn)&&!r(e.fallbackWarn)||e.fallbackWarn,N=!!e.fallbackFormat,g=!!e.unresolving,L=f(e.postTranslation)?e.postTranslation:null,y=h(e.processor)?e.processor:null,A=!m(e.warnHtmlMessage)||e.warnHtmlMessage,C=!!e.escapeParameter,O=f(e.messageCompiler)?e.messageCompiler:he,x=f(e.messageResolver)?e.messageResolver:Te||j,I=f(e.localeFallbacker)?e.localeFallbacker:be||ue,P=f(e.onWarn)?e.onWarn:c,v=e,F=d(v.__datetimeFormatters)?v.__datetimeFormatters:new Map,w=d(v.__numberFormatters)?v.__numberFormatters:new Map,R=d(v.__meta)?v.__meta:{};Ce++;const D={version:t,cid:Ce,locale:n,fallbackLocale:o,messages:a,modifiers:_,pluralRules:k,missing:T,missingWarn:b,fallbackWarn:E,fallbackFormat:N,unresolving:g,postTranslation:L,processor:y,warnHtmlMessage:A,escapeParameter:C,messageCompiler:O,messageResolver:x,localeFallbacker:I,onWarn:P,__meta:R};return D.datetimeFormats=u,D.numberFormats=l,D.__datetimeFormatters=F,D.__numberFormatters=w,D}function xe(e,t){return e instanceof RegExp?e.test(t):e}function Ie(e,t){return e instanceof RegExp?e.test(t):e}function Pe(e,t,n,r,o){const{missing:c}=e;if(null!==c){const r=c(e,n,t,o);return p(r)?r:t}return t}function ve(e,t,n){e.__localeChainCache=new Map,e.localeFallbacker(e,n,t)}const Fe=e=>e;let we=Object.create(null);function Re(){we=Object.create(null)}function De(e,t={}){{const n=(t.onCacheKey||Fe)(e),r=we[n];if(r)return r;let o=!1;const c=t.onError||E;t.onError=e=>{o=!0,c(e)};const{code:s}=D(e,t),a=new Function(`return ${s}`)();return o?a:we[n]=a}}let Se=T.__EXTEND_POINT__;const Me=()=>Se++,$e={INVALID_ARGUMENT:Se,INVALID_DATE_ARGUMENT:Me(),INVALID_ISO_DATE_ARGUMENT:Me(),__EXTEND_POINT__:Me()};function Ue(e){return b(e,null,void 0)}const We=()=>"",Ke=e=>f(e);function je(e,...t){const{fallbackFormat:r,postTranslation:o,unresolving:c,fallbackLocale:s,messages:u}=e,[l,_]=Ge(...t),k=(m(_.missingWarn),m(_.fallbackWarn),m(_.escapeParameter)?_.escapeParameter:e.escapeParameter),h=!!_.resolvedMessage,T=p(_.default)||m(_.default)?m(_.default)?l:_.default:r?l:"",b=r||""!==T,E=p(_.locale)?_.locale:e.locale;k&&function(e){i(e.list)?e.list=e.list.map((e=>p(e)?a(e):e)):d(e.named)&&Object.keys(e.named).forEach((t=>{p(e.named[t])&&(e.named[t]=a(e.named[t]))}))}(_);let[N,g,L]=h?[l,E,u[E]||{}]:function(e,t,n,r,o,c){const{messages:s,messageResolver:a,localeFallbacker:u}=e,l=u(e,r,n);let i,m={},d=null;const _="translate";for(let n=0;n<l.length&&(i=l[n],m=s[i]||{},null===(d=a(m,t))&&(d=m[t]),!p(d)&&!f(d));n++){const n=Pe(e,t,i,0,_);n!==t&&(d=n)}return[d,i,m]}(e,l,E,s),y=l;if(h||p(N)||Ke(N)||b&&(N=T,y=N),!(h||(p(N)||Ke(N))&&p(g)))return c?-1:l;let A=!1;const C=Ke(N)?N:Be(e,l,g,N,y,(()=>{A=!0}));if(A)return N;const O=function(e,t,n){return t(n)}(0,C,Q(function(e,t,r,o){const{modifiers:c,pluralRules:s,messageResolver:a}=e,u={locale:t,modifiers:c,pluralRules:s,messages:n=>{const o=a(r,n);if(p(o)){let r=!1;const c=Be(e,n,t,o,n,(()=>{r=!0}));return r?We:c}return Ke(o)?o:We}};e.processor&&(u.processor=e.processor);o.list&&(u.list=o.list);o.named&&(u.named=o.named);n(o.plural)&&(u.pluralIndex=o.plural);return u}(e,g,L,_)));return o?o(O):O}function Be(e,n,r,o,c,s){const{messageCompiler:a,warnHtmlMessage:u}=e;if(Ke(o)){const e=o;return e.locale=e.locale||r,e.key=e.key||n,e}const l=a(o,function(e,n,r,o,c,s){return{warnHtmlMessage:c,onError:e=>{throw s&&s(e),e},onCacheKey:e=>((e,n,r)=>t({l:e,k:n,s:r}))(n,r,e)}}(0,r,c,0,u,s));return l.locale=r,l.key=n,l.source=o,l}function Ge(...e){const[t,r,c]=e,a={};if(!p(t)&&!n(t)&&!Ke(t))throw Error($e.INVALID_ARGUMENT);const u=n(t)?String(t):(Ke(t),t);return n(r)?a.plural=r:p(r)?a.default=r:h(r)&&!o(r)?a.named=r:i(r)&&(a.list=r),n(c)?a.plural=c:p(c)?a.default=c:h(c)&&s(a,c),[u,a]}function Ve(e,...t){const{datetimeFormats:n,unresolving:r,fallbackLocale:c,localeFallbacker:a}=e,{__datetimeFormatters:u}=e,[l,i,f,d]=He(...t);m(f.missingWarn);m(f.fallbackWarn);const _=!!f.part,k=p(f.locale)?f.locale:e.locale,T=a(e,c,k);if(!p(l)||""===l)return new Intl.DateTimeFormat(k).format(i);let b,E={},N=null;for(let t=0;t<T.length&&(b=T[t],E=n[b]||{},N=E[l],!h(N));t++)Pe(e,l,b,0,"datetime format");if(!h(N)||!p(b))return r?-1:l;let g=`${b}__${l}`;o(d)||(g=`${g}__${JSON.stringify(d)}`);let L=u.get(g);return L||(L=new Intl.DateTimeFormat(b,s({},N,d)),u.set(g,L)),_?L.formatToParts(i):L.format(i)}function He(...e){const[t,r,o,c]=e;let s,a={},u={};if(p(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]"===k(t)){if(isNaN(t.getTime()))throw Error($e.INVALID_DATE_ARGUMENT);s=t}else{if(!n(t))throw Error($e.INVALID_ARGUMENT);s=t}return p(r)?a.key=r:h(r)&&(a=r),p(o)?a.locale=o:h(o)&&(u=o),h(c)&&(u=c),[a.key||"",s,a,u]}function Xe(e,t,n){const r=e;for(const e in n){const n=`${t}__${e}`;r.__datetimeFormatters.has(n)&&r.__datetimeFormatters.delete(n)}}function Je(e,...t){const{numberFormats:n,unresolving:r,fallbackLocale:c,localeFallbacker:a}=e,{__numberFormatters:u}=e,[l,i,f,d]=ze(...t);m(f.missingWarn);m(f.fallbackWarn);const _=!!f.part,k=p(f.locale)?f.locale:e.locale,T=a(e,c,k);if(!p(l)||""===l)return new Intl.NumberFormat(k).format(i);let b,E={},N=null;for(let t=0;t<T.length&&(b=T[t],E=n[b]||{},N=E[l],!h(N));t++)Pe(e,l,b,0,"number format");if(!h(N)||!p(b))return r?-1:l;let g=`${b}__${l}`;o(d)||(g=`${g}__${JSON.stringify(d)}`);let L=u.get(g);return L||(L=new Intl.NumberFormat(b,s({},N,d)),u.set(g,L)),_?L.formatToParts(i):L.format(i)}function ze(...e){const[t,r,o,c]=e;let s={},a={};if(!n(t))throw Error($e.INVALID_ARGUMENT);const u=t;return p(r)?s.key=r:h(r)&&(s=r),p(o)?s.locale=o:h(o)&&(a=o),h(c)&&(a=c),[s.key||"",u,s,a]}function Ye(e,t,n){const r=e;for(const e in n){const n=`${t}__${e}`;r.__numberFormatters.has(n)&&r.__numberFormatters.delete(n)}}Ee(De),Ne(B),ge(le);export{T as CompileErrorCodes,$e as CoreErrorCodes,ce as CoreWarnCodes,_e as DEFAULT_LOCALE,X as DEFAULT_MESSAGE_DATA_TYPE,ke as MISSING_RESOLVE_VALUE,de as NOT_REOSLVED,me as VERSION,Re as clearCompileCache,Xe as clearDateTimeFormat,Ye as clearNumberFormat,De as compileToFunction,b as createCompileError,Oe as createCoreContext,Ue as createCoreError,Q as createMessageContext,Ve as datetime,le as fallbackWithLocaleChain,ue as fallbackWithSimple,Ae as getAdditionalMeta,te as getDevToolsHook,ae as getWarnMessage,G as handleFlatJson,Pe as handleMissing,ne as initI18nDevTools,Ke as isMessageFunction,xe as isTranslateFallbackWarn,Ie as isTranslateMissingWarn,Je as number,W as parse,He as parseDateTimeArgs,ze as parseNumberArgs,Ge as parseTranslateArgs,ge as registerLocaleFallbacker,Ee as registerMessageCompiler,Ne as registerMessageResolver,B as resolveValue,j as resolveWithKeyValue,ye as setAdditionalMeta,ee as setDevToolsHook,je as translate,re as translateDevTools,ve as updateFallbackLocale};
const e=/\{([0-9a-zA-Z]+)\}/g;const t=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),n=e=>"number"==typeof e&&isFinite(e),r=e=>"[object RegExp]"===d(e),o=e=>_(e)&&0===Object.keys(e).length;function c(e,t){"undefined"!=typeof console&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}const s=Object.assign;function a(e){return e.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;")}const u=Array.isArray,l=e=>"function"==typeof e,i=e=>"string"==typeof e,f=e=>"boolean"==typeof e,p=e=>null!==e&&"object"==typeof e,m=Object.prototype.toString,d=e=>m.call(e),_=e=>"[object Object]"===d(e),k={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 h(e,t,n={}){const{domain:r}=n,o=new SyntaxError(String(e));return o.code=e,t&&(o.location=t),o.domain=r,o}function T(e){throw e}function b(e,t,n){const r={start:e,end:t};return null!=n&&(r.source=n),r}const E=String.fromCharCode(8232),N=String.fromCharCode(8233);function g(e){const t=e;let n=0,r=1,o=1,c=0;const s=e=>"\r"===t[e]&&"\n"===t[e+1],a=e=>t[e]===N,u=e=>t[e]===E,l=e=>s(e)||(e=>"\n"===t[e])(e)||a(e)||u(e),i=e=>s(e)||a(e)||u(e)?"\n":t[e];function f(){return c=0,l(n)&&(r++,o=0),s(n)&&n++,n++,o++,t[n]}return{index:()=>n,line:()=>r,column:()=>o,peekOffset:()=>c,charAt:i,currentChar:()=>i(n),currentPeek:()=>i(n+c),next:f,peek:function(){return s(n+c)&&c++,c++,t[n+c]},reset:function(){n=0,r=1,o=1,c=0},resetPeek:function(e=0){c=e},skipToPeek:function(){const e=n+c;for(;e!==n;)f();c=0}}}const L=void 0;function y(e,t={}){const n=!1!==t.location,r=g(e),o=()=>r.index(),c=()=>{return e=r.line(),t=r.column(),n=r.index(),{line:e,column:t,offset:n};var e,t,n},s=c(),a=o(),u={currentType:14,offset:a,startLoc:s,endLoc:s,lastType:14,lastOffset:a,lastStartLoc:s,lastEndLoc:s,braceNest:0,inLinked:!1,text:""},l=()=>u,{onError:i}=t;function f(e,t,r){e.endLoc=c(),e.currentType=t;const o={type:t};return n&&(o.loc=b(e.startLoc,e.endLoc)),null!=r&&(o.value=r),o}const p=e=>f(e,14);function m(e,t){return e.currentChar()===t?(e.next(),t):(c(),"")}function d(e){let t="";for(;" "===e.currentPeek()||"\n"===e.currentPeek();)t+=e.currentPeek(),e.peek();return t}function _(e){const t=d(e);return e.skipToPeek(),t}function k(e){if(e===L)return!1;const t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||95===t}function h(e,t){const{currentType:n}=t;if(2!==n)return!1;d(e);const r=function(e){if(e===L)return!1;const t=e.charCodeAt(0);return t>=48&&t<=57}("-"===e.currentPeek()?e.peek():e.currentPeek());return e.resetPeek(),r}function T(e){d(e);const t="|"===e.currentPeek();return e.resetPeek(),t}function E(e,t=!0){const n=(t=!1,r="",o=!1)=>{const c=e.currentPeek();return"{"===c?"%"!==r&&t:"@"!==c&&c?"%"===c?(e.peek(),n(t,"%",!0)):"|"===c?!("%"!==r&&!o)||!(" "===r||"\n"===r):" "===c?(e.peek(),n(!0," ",o)):"\n"!==c||(e.peek(),n(!0,"\n",o)):"%"===r||t},r=n();return t&&e.resetPeek(),r}function N(e,t){const n=e.currentChar();return n===L?L:t(n)?(e.next(),n):null}function y(e){return N(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 A(e){return N(e,(e=>{const t=e.charCodeAt(0);return t>=48&&t<=57}))}function C(e){return N(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=A(e);)n+=t;return n}function x(e){const t=e.currentChar();switch(t){case"\\":case"'":return e.next(),`\\${t}`;case"u":return I(e,t,4);case"U":return I(e,t,6);default:return c(),""}}function I(e,t,n){m(e,t);let r="";for(let t=0;t<n;t++){const t=C(e);if(!t){c(),e.currentChar();break}r+=t}return`\\${t}${r}`}function P(e){_(e);const t=m(e,"|");return _(e),t}function v(e,t){let n=null;switch(e.currentChar()){case"{":return t.braceNest>=1&&c(),e.next(),n=f(t,2,"{"),_(e),t.braceNest++,n;case"}":return t.braceNest>0&&2===t.currentType&&c(),e.next(),n=f(t,3,"}"),t.braceNest--,t.braceNest>0&&_(e),t.inLinked&&0===t.braceNest&&(t.inLinked=!1),n;case"@":return t.braceNest>0&&c(),n=F(e,t)||p(t),t.braceNest=0,n;default:let r=!0,o=!0,s=!0;if(T(e))return t.braceNest>0&&c(),n=f(t,1,P(e)),t.braceNest=0,t.inLinked=!1,n;if(t.braceNest>0&&(5===t.currentType||6===t.currentType||7===t.currentType))return c(),t.braceNest=0,w(e,t);if(r=function(e,t){const{currentType:n}=t;if(2!==n)return!1;d(e);const r=k(e.currentPeek());return e.resetPeek(),r}(e,t))return n=f(t,5,function(e){_(e);let t="",n="";for(;t=y(e);)n+=t;return e.currentChar()===L&&c(),n}(e)),_(e),n;if(o=h(e,t))return n=f(t,6,function(e){_(e);let t="";return"-"===e.currentChar()?(e.next(),t+=`-${O(e)}`):t+=O(e),e.currentChar()===L&&c(),t}(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=f(t,7,function(e){_(e),m(e,"'");let t="",n="";const r=e=>"'"!==e&&"\n"!==e;for(;t=N(e,r);)n+="\\"===t?x(e):t;const o=e.currentChar();return"\n"===o||o===L?(c(),"\n"===o&&(e.next(),m(e,"'")),n):(m(e,"'"),n)}(e)),_(e),n;if(!r&&!o&&!s)return n=f(t,13,function(e){_(e);let t="",n="";const r=e=>"{"!==e&&"}"!==e&&" "!==e&&"\n"!==e;for(;t=N(e,r);)n+=t;return n}(e)),c(),_(e),n}return n}function F(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||c(),o){case"@":return e.next(),r=f(t,8,"@"),t.inLinked=!0,r;case".":return _(e),e.next(),f(t,9,".");case":":return _(e),e.next(),f(t,10,":");default:return T(e)?(r=f(t,1,P(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),F(e,t)):function(e,t){const{currentType:n}=t;if(9!==n)return!1;d(e);const r=k(e.currentPeek());return e.resetPeek(),r}(e,t)?(_(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?k(e.peek()):!("@"===t||"%"===t||"|"===t||":"===t||"."===t||" "===t||!t)&&("\n"===t?(e.peek(),r()):k(t))},o=r();return e.resetPeek(),o}(e,t)?(_(e),"{"===o?v(e,t)||r:f(t,11,function(e){const t=(n=!1,r)=>{const o=e.currentChar();return"{"!==o&&"%"!==o&&"@"!==o&&"|"!==o&&o?" "===o?r:"\n"===o?(r+=o,e.next(),t(n,r)):(r+=o,e.next(),t(!0,r)):r};return t(!1,"")}(e))):(8===n&&c(),t.braceNest=0,t.inLinked=!1,w(e,t))}}function w(e,t){let n={type:14};if(t.braceNest>0)return v(e,t)||p(t);if(t.inLinked)return F(e,t)||p(t);const r=e.currentChar();switch(r){case"{":return v(e,t)||p(t);case"}":return c(),e.next(),f(t,3,"}");case"@":return F(e,t)||p(t);default:if(T(e))return n=f(t,1,P(e)),t.braceNest=0,t.inLinked=!1,n;if(E(e))return f(t,0,function(e){const t=n=>{const r=e.currentChar();return"{"!==r&&"}"!==r&&"@"!==r&&r?"%"===r?E(e)?(n+=r,e.next(),t(n)):n:"|"===r?n:" "===r||"\n"===r?E(e)?(n+=r,e.next(),t(n)):T(e)?n:(n+=r,e.next(),t(n)):(n+=r,e.next(),t(n)):n};return t("")}(e));if("%"===r)return e.next(),f(t,4,"%")}return n}return{nextToken:function(){const{currentType:e,offset:t,startLoc:n,endLoc:s}=u;return u.lastType=e,u.lastOffset=t,u.lastStartLoc=n,u.lastEndLoc=s,u.offset=o(),u.startLoc=c(),r.currentChar()===L?f(u,14):w(r,u)},currentOffset:o,currentPosition:c,context:l}}const A=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function C(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 O(e={}){const t=!1!==e.location,{onError:n}=e;function r(e,n,r){const o={type:e,start:n,end:n};return t&&(o.loc={start:r,end:r}),o}function o(e,n,r,o){e.end=n,o&&(e.type=o),t&&e.loc&&(e.loc.end=r)}function c(e,t){const n=e.context(),c=r(3,n.offset,n.startLoc);return c.value=t,o(c,e.currentOffset(),e.currentPosition()),c}function a(e,t){const n=e.context(),{lastOffset:c,lastStartLoc:s}=n,a=r(5,c,s);return a.index=parseInt(t,10),e.nextToken(),o(a,e.currentOffset(),e.currentPosition()),a}function u(e,t){const n=e.context(),{lastOffset:c,lastStartLoc:s}=n,a=r(4,c,s);return a.key=t,e.nextToken(),o(a,e.currentOffset(),e.currentPosition()),a}function l(e,t){const n=e.context(),{lastOffset:c,lastStartLoc:s}=n,a=r(9,c,s);return a.value=t.replace(A,C),e.nextToken(),o(a,e.currentOffset(),e.currentPosition()),a}function i(e){const t=e.context(),n=r(6,t.offset,t.startLoc);let c=e.nextToken();if(9===c.type){const t=function(e){const t=e.nextToken(),n=e.context(),{lastOffset:c,lastStartLoc:s}=n,a=r(8,c,s);return 12!==t.type?(a.value="",o(a,c,s),{nextConsumeToken:t,node:a}):(null==t.value&&x(t),a.value=t.value||"",o(a,e.currentOffset(),e.currentPosition()),{node:a})}(e);n.modifier=t.node,c=t.nextConsumeToken||e.nextToken()}switch(10!==c.type&&x(c),c=e.nextToken(),2===c.type&&(c=e.nextToken()),c.type){case 11:null==c.value&&x(c),n.key=function(e,t){const n=e.context(),c=r(7,n.offset,n.startLoc);return c.value=t,o(c,e.currentOffset(),e.currentPosition()),c}(e,c.value||"");break;case 5:null==c.value&&x(c),n.key=u(e,c.value||"");break;case 6:null==c.value&&x(c),n.key=a(e,c.value||"");break;case 7:null==c.value&&x(c),n.key=l(e,c.value||"");break;default:const t=e.context(),s=r(7,t.offset,t.startLoc);return s.value="",o(s,t.offset,t.startLoc),n.key=s,o(n,t.offset,t.startLoc),{nextConsumeToken:c,node:n}}return o(n,e.currentOffset(),e.currentPosition()),{node:n}}function f(e){const t=e.context(),n=r(2,1===t.currentType?e.currentOffset():t.offset,1===t.currentType?t.endLoc:t.startLoc);n.items=[];let s=null;do{const t=s||e.nextToken();switch(s=null,t.type){case 0:null==t.value&&x(t),n.items.push(c(e,t.value||""));break;case 6:null==t.value&&x(t),n.items.push(a(e,t.value||""));break;case 5:null==t.value&&x(t),n.items.push(u(e,t.value||""));break;case 7:null==t.value&&x(t),n.items.push(l(e,t.value||""));break;case 8:const r=i(e);n.items.push(r.node),s=r.nextConsumeToken||null}}while(14!==t.currentType&&1!==t.currentType);return o(n,1===t.currentType?t.lastOffset:e.currentOffset(),1===t.currentType?t.lastEndLoc:e.currentPosition()),n}function p(e){const t=e.context(),{offset:n,startLoc:c}=t,s=f(e);return 14===t.currentType?s:function(e,t,n,c){const s=e.context();let a=0===c.items.length;const u=r(1,t,n);u.cases=[],u.cases.push(c);do{const t=f(e);a||(a=0===t.items.length),u.cases.push(t)}while(14!==s.currentType);return o(u,e.currentOffset(),e.currentPosition()),u}(e,n,c,s)}return{parse:function(n){const c=y(n,s({},e)),a=c.context(),u=r(0,a.offset,a.startLoc);return t&&u.loc&&(u.loc.source=n),u.body=p(c),o(u,c.currentOffset(),c.currentPosition()),u}}}function x(e){if(14===e.type)return"EOF";const t=(e.value||"").replace(/\r?\n/gu,"\\n");return t.length>10?t.slice(0,9)+"…":t}function I(e,t){for(let n=0;n<e.length;n++)P(e[n],t)}function P(e,t){switch(e.type){case 1:I(e.cases,t),t.helper("plural");break;case 2:I(e.items,t);break;case 6:P(e.key,t),t.helper("linked");break;case 5:t.helper("interpolate"),t.helper("list");break;case 4:t.helper("interpolate"),t.helper("named")}}function v(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&&P(e.body,n);const r=n.context();e.helpers=Array.from(r.helpers)}function F(e,t){const{helper:n}=e;switch(t.type){case 0:!function(e,t){t.body?F(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&&(F(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&&(F(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")}(`),F(e,t.key),t.modifier&&(e.push(", "),F(e,t.modifier)),e.push(")")}(e,t);break;case 8:case 7:e.push(JSON.stringify(t.value),t);break;case 5:e.push(`${n("interpolate")}(${n("list")}(${t.index}))`,t);break;case 4:e.push(`${n("interpolate")}(${n("named")}(${JSON.stringify(t.key)}))`,t);break;case 9:case 3:e.push(JSON.stringify(t.value),t)}}function w(e,t={}){const n=s({},t),r=O(n).parse(e);return v(r,n),((e,t={})=>{const n=i(t.mode)?t.mode:"normal",r=i(t.filename)?t.filename:"message.intl",o=t.needIndent?t.needIndent:"arrow"!==n,c=e.helpers||[],s=function(e,t){const{filename:n,breakLineCode:r,needIndent:o}=t,c={source:e.loc.source,filename:n,code:"",column:1,line:1,offset:0,map:void 0,breakLineCode:r,needIndent:o,indentLevel:0};function s(e,t){c.code+=e}function a(e,t=!0){const n=t?r:"";s(o?n+" ".repeat(e):n)}return{context:()=>c,push:s,indent:function(e=!0){const t=++c.indentLevel;e&&a(t)},deindent:function(e=!0){const t=--c.indentLevel;e&&a(t)},newline:function(){a(c.indentLevel)},helper:e=>`_${e}`,needIndent:()=>c.needIndent}}(e,{mode:n,filename:r,sourceMap:!!t.sourceMap,breakLineCode:null!=t.breakLineCode?t.breakLineCode:"arrow"===n?";":"\n",needIndent:o});s.push("normal"===n?"function __msg__ (ctx) {":"(ctx) => {"),s.indent(o),c.length>0&&(s.push(`const { ${c.map((e=>`${e}: _${e}`)).join(", ")} } = ctx`),s.newline()),s.push("return "),F(s,e),s.deindent(o),s.push("}");const{code:a,map:u}=s.context();return{ast:e,code:a,map:u?u.toJSON():void 0}})(r,n)}const R=[];R[0]={w:[0],i:[3,0],"[":[4],o:[7]},R[1]={w:[1],".":[2],"[":[4],o:[7]},R[2]={w:[2],i:[3,0],0:[3,0]},R[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},R[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},R[5]={"'":[4,0],o:8,l:[5,0]},R[6]={'"':[4,0],o:8,l:[6,0]};const D=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function S(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 M(e){const t=e.trim();return("0"!==e.charAt(0)||!isNaN(parseInt(e)))&&(D.test(t)?function(e){const t=e.charCodeAt(0);return t!==e.charCodeAt(e.length-1)||34!==t&&39!==t?e:e.slice(1,-1)}(t):"*"+t)}function $(e){const t=[];let n,r,o,c,s,a,u,l=-1,i=0,f=0;const p=[];function m(){const t=e[l+1];if(5===i&&"'"===t||6===i&&'"'===t)return l++,o="\\"+t,p[0](),!0}for(p[0]=()=>{void 0===r?r=o:r+=o},p[1]=()=>{void 0!==r&&(t.push(r),r=void 0)},p[2]=()=>{p[0](),f++},p[3]=()=>{if(f>0)f--,i=4,p[0]();else{if(f=0,void 0===r)return!1;if(r=M(r),!1===r)return!1;p[1]()}};null!==i;)if(l++,n=e[l],"\\"!==n||!m()){if(c=S(n),u=R[i],s=u[c]||u.l||8,8===s)return;if(i=s[0],void 0!==s[1]&&(a=p[s[1]],a&&(o=n,!1===a())))return;if(7===i)return t}}const U=new Map;function W(e,t){return p(e)?e[t]:null}function K(e,t){if(!p(e))return null;let n=U.get(t);if(n||(n=$(t),n&&U.set(t,n)),!n)return null;const r=n.length;let o=e,c=0;for(;c<r;){const e=o[n[c]];if(void 0===e)return null;o=e,c++}return o}const j=e=>e,B=e=>"",G="text",V=e=>0===e.length?"":e.join(""),H=e=>null==e?"":u(e)||_(e)&&e.toString===m?JSON.stringify(e,null,2):String(e);function X(e,t){return e=Math.abs(e),2===t?e?e>1?1:0:1:e?Math.min(e,2):0}function J(e={}){const t=e.locale,r=function(e){const t=n(e.pluralIndex)?e.pluralIndex:-1;return e.named&&(n(e.named.count)||n(e.named.n))?n(e.named.count)?e.named.count:n(e.named.n)?e.named.n:t:t}(e),o=p(e.pluralRules)&&i(t)&&l(e.pluralRules[t])?e.pluralRules[t]:X,c=p(e.pluralRules)&&i(t)&&l(e.pluralRules[t])?X:void 0,s=e.list||[],a=e.named||{};n(e.pluralIndex)&&function(e,t){t.count||(t.count=e),t.n||(t.n=e)}(r,a);function u(t){const n=l(e.messages)?e.messages(t):!!p(e.messages)&&e.messages[t];return n||(e.parent?e.parent.message(t):B)}const f=_(e.processor)&&l(e.processor.normalize)?e.processor.normalize:V,m=_(e.processor)&&l(e.processor.interpolate)?e.processor.interpolate:H,d={list:e=>s[e],named:e=>a[e],plural:e=>e[o(r,e.length,c)],linked:(t,n)=>{const r=u(t)(d);return i(n)?(o=n,e.modifiers?e.modifiers[o]:j)(r):r;var o},message:u,type:_(e.processor)&&i(e.processor.type)?e.processor.type:"text",interpolate:m,normalize:f};return d}const z="i18n:init";let Y=null;function Q(e){Y=e}function q(){return Y}function Z(e,t,n){Y&&Y.emit(z,{timestamp:Date.now(),i18n:e,version:t,meta:n})}const ee=te("function:translate");function te(e){return t=>Y&&Y.emit(e,t)}const ne={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},re={[ne.NOT_FOUND_KEY]:"Not found '{key}' key in '{locale}' locale messages.",[ne.FALLBACK_TO_TRANSLATE]:"Fall back to translate '{key}' key with '{target}' locale.",[ne.CANNOT_FORMAT_NUMBER]:"Cannot format a number value due to not supported Intl.NumberFormat.",[ne.FALLBACK_TO_NUMBER_FORMAT]:"Fall back to number format '{key}' key with '{target}' locale.",[ne.CANNOT_FORMAT_DATE]:"Cannot format a date value due to not supported Intl.DateTimeFormat.",[ne.FALLBACK_TO_DATE_FORMAT]:"Fall back to datetime format '{key}' key with '{target}' locale."};function oe(t,...n){return function(t,...n){return 1===n.length&&p(n[0])&&(n=n[0]),n&&n.hasOwnProperty||(n={}),t.replace(e,((e,t)=>n.hasOwnProperty(t)?n[t]:""))}(re[t],...n)}function ce(e,t,n){return[...new Set([n,...u(t)?t:p(t)?Object.keys(t):i(t)?[t]:[n]])]}function se(e,t,n){const r=i(n)?n:pe,o=e;o.__localeChainCache||(o.__localeChainCache=new Map);let c=o.__localeChainCache.get(r);if(!c){c=[];let e=[n];for(;u(e);)e=ae(c,e,t);const s=u(t)||!_(t)?t:t.default?t.default:null;e=i(s)?[s]:s,u(e)&&ae(c,e,!1),o.__localeChainCache.set(r,c)}return c}function ae(e,t,n){let r=!0;for(let o=0;o<t.length&&f(r);o++){i(t[o])&&(r=ue(e,t[o],n))}return r}function ue(e,t,n){let r;const o=t.split("-");do{r=le(e,o.join("-"),n),o.splice(-1,1)}while(o.length&&!0===r);return r}function le(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),(u(n)||_(n))&&n[o]&&(r=n[o])}return r}const ie="9.2.0-beta.1",fe=-1,pe="en-US",me="";let de,_e,ke;function he(e){de=e}function Te(e){_e=e}function be(e){ke=e}let Ee=null;const Ne=e=>{Ee=e},ge=()=>Ee;let Le=0;function ye(e={}){const t=i(e.version)?e.version:"9.2.0-beta.1",n=i(e.locale)?e.locale:pe,o=u(e.fallbackLocale)||_(e.fallbackLocale)||i(e.fallbackLocale)||!1===e.fallbackLocale?e.fallbackLocale:n,a=_(e.messages)?e.messages:{[n]:{}},m=_(e.datetimeFormats)?e.datetimeFormats:{[n]:{}},d=_(e.numberFormats)?e.numberFormats:{[n]:{}},k=s({},e.modifiers||{},{upper:e=>i(e)?e.toUpperCase():e,lower:e=>i(e)?e.toLowerCase():e,capitalize:e=>i(e)?`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`:e}),h=e.pluralRules||{},T=l(e.missing)?e.missing:null,b=!f(e.missingWarn)&&!r(e.missingWarn)||e.missingWarn,E=!f(e.fallbackWarn)&&!r(e.fallbackWarn)||e.fallbackWarn,N=!!e.fallbackFormat,g=!!e.unresolving,L=l(e.postTranslation)?e.postTranslation:null,y=_(e.processor)?e.processor:null,A=!f(e.warnHtmlMessage)||e.warnHtmlMessage,C=!!e.escapeParameter,O=l(e.messageCompiler)?e.messageCompiler:de,x=l(e.messageResolver)?e.messageResolver:_e||W,I=l(e.localeFallbacker)?e.localeFallbacker:ke||ce,P=l(e.onWarn)?e.onWarn:c,v=e,F=p(v.__datetimeFormatters)?v.__datetimeFormatters:new Map,w=p(v.__numberFormatters)?v.__numberFormatters:new Map,R=p(v.__meta)?v.__meta:{};Le++;const D={version:t,cid:Le,locale:n,fallbackLocale:o,messages:a,modifiers:k,pluralRules:h,missing:T,missingWarn:b,fallbackWarn:E,fallbackFormat:N,unresolving:g,postTranslation:L,processor:y,warnHtmlMessage:A,escapeParameter:C,messageCompiler:O,messageResolver:x,localeFallbacker:I,onWarn:P,__meta:R};return D.datetimeFormats=m,D.numberFormats=d,D.__datetimeFormatters=F,D.__numberFormatters=w,D}function Ae(e,t){return e instanceof RegExp?e.test(t):e}function Ce(e,t){return e instanceof RegExp?e.test(t):e}function Oe(e,t,n,r,o){const{missing:c}=e;if(null!==c){const r=c(e,n,t,o);return i(r)?r:t}return t}function xe(e,t,n){e.__localeChainCache=new Map,e.localeFallbacker(e,n,t)}const Ie=e=>e;let Pe=Object.create(null);function ve(){Pe=Object.create(null)}function Fe(e,t={}){{const n=(t.onCacheKey||Ie)(e),r=Pe[n];if(r)return r;let o=!1;const c=t.onError||T;t.onError=e=>{o=!0,c(e)};const{code:s}=w(e,t),a=new Function(`return ${s}`)();return o?a:Pe[n]=a}}let we=k.__EXTEND_POINT__;const Re=()=>we++,De={INVALID_ARGUMENT:we,INVALID_DATE_ARGUMENT:Re(),INVALID_ISO_DATE_ARGUMENT:Re(),__EXTEND_POINT__:Re()};function Se(e){return h(e,null,void 0)}const Me=()=>"",$e=e=>l(e);function Ue(e,...t){const{fallbackFormat:r,postTranslation:o,unresolving:c,fallbackLocale:s,messages:m}=e,[d,_]=Ke(...t),k=(f(_.missingWarn),f(_.fallbackWarn),f(_.escapeParameter)?_.escapeParameter:e.escapeParameter),h=!!_.resolvedMessage,T=i(_.default)||f(_.default)?f(_.default)?d:_.default:r?d:"",b=r||""!==T,E=i(_.locale)?_.locale:e.locale;k&&function(e){u(e.list)?e.list=e.list.map((e=>i(e)?a(e):e)):p(e.named)&&Object.keys(e.named).forEach((t=>{i(e.named[t])&&(e.named[t]=a(e.named[t]))}))}(_);let[N,g,L]=h?[d,E,m[E]||{}]:function(e,t,n,r,o,c){const{messages:s,messageResolver:a,localeFallbacker:u}=e,f=u(e,r,n);let p,m={},d=null;const _="translate";for(let n=0;n<f.length&&(p=f[n],m=s[p]||{},null===(d=a(m,t))&&(d=m[t]),!i(d)&&!l(d));n++){const n=Oe(e,t,p,0,_);n!==t&&(d=n)}return[d,p,m]}(e,d,E,s),y=d;if(h||i(N)||$e(N)||b&&(N=T,y=N),!(h||(i(N)||$e(N))&&i(g)))return c?-1:d;let A=!1;const C=$e(N)?N:We(e,d,g,N,y,(()=>{A=!0}));if(A)return N;const O=function(e,t,n){return t(n)}(0,C,J(function(e,t,r,o){const{modifiers:c,pluralRules:s,messageResolver:a}=e,u={locale:t,modifiers:c,pluralRules:s,messages:n=>{const o=a(r,n);if(i(o)){let r=!1;const c=We(e,n,t,o,n,(()=>{r=!0}));return r?Me:c}return $e(o)?o:Me}};e.processor&&(u.processor=e.processor);o.list&&(u.list=o.list);o.named&&(u.named=o.named);n(o.plural)&&(u.pluralIndex=o.plural);return u}(e,g,L,_)));return o?o(O):O}function We(e,n,r,o,c,s){const{messageCompiler:a,warnHtmlMessage:u}=e;if($e(o)){const e=o;return e.locale=e.locale||r,e.key=e.key||n,e}const l=a(o,function(e,n,r,o,c,s){return{warnHtmlMessage:c,onError:e=>{throw s&&s(e),e},onCacheKey:e=>((e,n,r)=>t({l:e,k:n,s:r}))(n,r,e)}}(0,r,c,0,u,s));return l.locale=r,l.key=n,l.source=o,l}function Ke(...e){const[t,r,c]=e,a={};if(!i(t)&&!n(t)&&!$e(t))throw Error(De.INVALID_ARGUMENT);const l=n(t)?String(t):($e(t),t);return n(r)?a.plural=r:i(r)?a.default=r:_(r)&&!o(r)?a.named=r:u(r)&&(a.list=r),n(c)?a.plural=c:i(c)?a.default=c:_(c)&&s(a,c),[l,a]}function je(e,...t){const{datetimeFormats:n,unresolving:r,fallbackLocale:c,localeFallbacker:a}=e,{__datetimeFormatters:u}=e,[l,p,m,d]=Be(...t);f(m.missingWarn);f(m.fallbackWarn);const k=!!m.part,h=i(m.locale)?m.locale:e.locale,T=a(e,c,h);if(!i(l)||""===l)return new Intl.DateTimeFormat(h).format(p);let b,E={},N=null;for(let t=0;t<T.length&&(b=T[t],E=n[b]||{},N=E[l],!_(N));t++)Oe(e,l,b,0,"datetime format");if(!_(N)||!i(b))return r?-1:l;let g=`${b}__${l}`;o(d)||(g=`${g}__${JSON.stringify(d)}`);let L=u.get(g);return L||(L=new Intl.DateTimeFormat(b,s({},N,d)),u.set(g,L)),k?L.formatToParts(p):L.format(p)}function Be(...e){const[t,r,o,c]=e;let s,a={},u={};if(i(t)){const e=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!e)throw Error(De.INVALID_ISO_DATE_ARGUMENT);const n=e[3]?e[3].trim().startsWith("T")?`${e[1].trim()}${e[3].trim()}`:`${e[1].trim()}T${e[3].trim()}`:e[1].trim();s=new Date(n);try{s.toISOString()}catch(e){throw Error(De.INVALID_ISO_DATE_ARGUMENT)}}else if("[object Date]"===d(t)){if(isNaN(t.getTime()))throw Error(De.INVALID_DATE_ARGUMENT);s=t}else{if(!n(t))throw Error(De.INVALID_ARGUMENT);s=t}return i(r)?a.key=r:_(r)&&(a=r),i(o)?a.locale=o:_(o)&&(u=o),_(c)&&(u=c),[a.key||"",s,a,u]}function Ge(e,t,n){const r=e;for(const e in n){const n=`${t}__${e}`;r.__datetimeFormatters.has(n)&&r.__datetimeFormatters.delete(n)}}function Ve(e,...t){const{numberFormats:n,unresolving:r,fallbackLocale:c,localeFallbacker:a}=e,{__numberFormatters:u}=e,[l,p,m,d]=He(...t);f(m.missingWarn);f(m.fallbackWarn);const k=!!m.part,h=i(m.locale)?m.locale:e.locale,T=a(e,c,h);if(!i(l)||""===l)return new Intl.NumberFormat(h).format(p);let b,E={},N=null;for(let t=0;t<T.length&&(b=T[t],E=n[b]||{},N=E[l],!_(N));t++)Oe(e,l,b,0,"number format");if(!_(N)||!i(b))return r?-1:l;let g=`${b}__${l}`;o(d)||(g=`${g}__${JSON.stringify(d)}`);let L=u.get(g);return L||(L=new Intl.NumberFormat(b,s({},N,d)),u.set(g,L)),k?L.formatToParts(p):L.format(p)}function He(...e){const[t,r,o,c]=e;let s={},a={};if(!n(t))throw Error(De.INVALID_ARGUMENT);const u=t;return i(r)?s.key=r:_(r)&&(s=r),i(o)?s.locale=o:_(o)&&(a=o),_(c)&&(a=c),[s.key||"",u,s,a]}function Xe(e,t,n){const r=e;for(const e in n){const n=`${t}__${e}`;r.__numberFormatters.has(n)&&r.__numberFormatters.delete(n)}}he(Fe),Te(K),be(se);export{k as CompileErrorCodes,De as CoreErrorCodes,ne as CoreWarnCodes,pe as DEFAULT_LOCALE,G as DEFAULT_MESSAGE_DATA_TYPE,me as MISSING_RESOLVE_VALUE,fe as NOT_REOSLVED,ie as VERSION,ve as clearCompileCache,Ge as clearDateTimeFormat,Xe as clearNumberFormat,Fe as compileToFunction,h as createCompileError,ye as createCoreContext,Se as createCoreError,J as createMessageContext,je as datetime,se as fallbackWithLocaleChain,ce as fallbackWithSimple,ge as getAdditionalMeta,q as getDevToolsHook,oe as getWarnMessage,Oe as handleMissing,Z as initI18nDevTools,$e as isMessageFunction,Ae as isTranslateFallbackWarn,Ce as isTranslateMissingWarn,Ve as number,$ as parse,Be as parseDateTimeArgs,He as parseNumberArgs,Ke as parseTranslateArgs,be as registerLocaleFallbacker,he as registerMessageCompiler,Te as registerMessageResolver,K as resolveValue,W as resolveWithKeyValue,Ne as setAdditionalMeta,Q as setDevToolsHook,Ue as translate,ee as translateDevTools,xe as updateFallbackLocale};
/*!
* core v9.2.0-alpha.9
* core v9.2.0-beta.1
* (c) 2021 kazuya kawaguchi

@@ -4,0 +4,0 @@ * Released under the MIT License.

/*!
* core v9.2.0-alpha.9
* core v9.2.0-beta.1
* (c) 2021 kazuya kawaguchi
* Released under the MIT License.
*/
var IntlifyCore=function(e){"use strict";const t=/\{([0-9a-zA-Z]+)\}/g;const n=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=>T(e)&&0===Object.keys(e).length;function c(e,t){"undefined"!=typeof console&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}const a=Object.assign;function l(e){return e.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;")}const u=Object.prototype.hasOwnProperty;function i(e,t){return u.call(e,t)}const f=Array.isArray,p=e=>"function"==typeof e,m=e=>"string"==typeof e,d=e=>"boolean"==typeof e,_=e=>null!==e&&"object"==typeof e,k=Object.prototype.toString,h=e=>k.call(e),T=e=>"[object Object]"===h(e),E={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 g(e,t,n={}){const{domain:r}=n,o=new SyntaxError(String(e));return o.code=e,t&&(o.location=t),o.domain=r,o}function b(e){throw e}function L(e,t,n){const r={start:e,end:t};return null!=n&&(r.source=n),r}const N=" ",A="\n",C=String.fromCharCode(8232),y=String.fromCharCode(8233);function O(e){const t=e;let n=0,r=1,o=1,s=0;const c=e=>"\r"===t[e]&&t[e+1]===A,a=e=>t[e]===y,l=e=>t[e]===C,u=e=>c(e)||(e=>t[e]===A)(e)||a(e)||l(e),i=e=>c(e)||a(e)||l(e)?A:t[e];function f(){return s=0,u(n)&&(r++,o=0),c(n)&&n++,n++,o++,t[n]}return{index:()=>n,line:()=>r,column:()=>o,peekOffset:()=>s,charAt:i,currentChar:()=>i(n),currentPeek:()=>i(n+s),next:f,peek:function(){return c(n+s)&&s++,s++,t[n+s]},reset:function(){n=0,r=1,o=1,s=0},resetPeek:function(e=0){s=e},skipToPeek:function(){const e=n+s;for(;e!==n;)f();s=0}}}const I=void 0;function F(e,t={}){const n=!1!==t.location,r=O(e),o=()=>r.index(),s=()=>{return e=r.line(),t=r.column(),n=r.index(),{line:e,column:t,offset:n};var e,t,n},c=s(),a=o(),l={currentType:14,offset:a,startLoc:c,endLoc:c,lastType:14,lastOffset:a,lastStartLoc:c,lastEndLoc:c,braceNest:0,inLinked:!1,text:""},u=()=>l,{onError:i}=t;function f(e,t,r){e.endLoc=s(),e.currentType=t;const o={type:t};return n&&(o.loc=L(e.startLoc,e.endLoc)),null!=r&&(o.value=r),o}const p=e=>f(e,14);function m(e,t){return e.currentChar()===t?(e.next(),t):(s(),"")}function d(e){let t="";for(;e.currentPeek()===N||e.currentPeek()===A;)t+=e.currentPeek(),e.peek();return t}function _(e){const t=d(e);return e.skipToPeek(),t}function k(e){if(e===I)return!1;const t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||95===t}function h(e,t){const{currentType:n}=t;if(2!==n)return!1;d(e);const r=function(e){if(e===I)return!1;const t=e.charCodeAt(0);return t>=48&&t<=57}("-"===e.currentPeek()?e.peek():e.currentPeek());return e.resetPeek(),r}function T(e){d(e);const t="|"===e.currentPeek();return e.resetPeek(),t}function E(e,t=!0){const n=(t=!1,r="",o=!1)=>{const s=e.currentPeek();return"{"===s?"%"!==r&&t:"@"!==s&&s?"%"===s?(e.peek(),n(t,"%",!0)):"|"===s?!("%"!==r&&!o)||!(r===N||r===A):s===N?(e.peek(),n(!0,N,o)):s!==A||(e.peek(),n(!0,A,o)):"%"===r||t},r=n();return t&&e.resetPeek(),r}function g(e,t){const n=e.currentChar();return n===I?I:t(n)?(e.next(),n):null}function b(e){return g(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 C(e){return g(e,(e=>{const t=e.charCodeAt(0);return t>=48&&t<=57}))}function y(e){return g(e,(e=>{const t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}))}function F(e){let t="",n="";for(;t=C(e);)n+=t;return n}function v(e){const t=e.currentChar();switch(t){case"\\":case"'":return e.next(),`\\${t}`;case"u":return x(e,t,4);case"U":return x(e,t,6);default:return s(),""}}function x(e,t,n){m(e,t);let r="";for(let t=0;t<n;t++){const t=y(e);if(!t){s(),e.currentChar();break}r+=t}return`\\${t}${r}`}function P(e){_(e);const t=m(e,"|");return _(e),t}function w(e,t){let n=null;switch(e.currentChar()){case"{":return t.braceNest>=1&&s(),e.next(),n=f(t,2,"{"),_(e),t.braceNest++,n;case"}":return t.braceNest>0&&2===t.currentType&&s(),e.next(),n=f(t,3,"}"),t.braceNest--,t.braceNest>0&&_(e),t.inLinked&&0===t.braceNest&&(t.inLinked=!1),n;case"@":return t.braceNest>0&&s(),n=D(e,t)||p(t),t.braceNest=0,n;default:let r=!0,o=!0,c=!0;if(T(e))return t.braceNest>0&&s(),n=f(t,1,P(e)),t.braceNest=0,t.inLinked=!1,n;if(t.braceNest>0&&(5===t.currentType||6===t.currentType||7===t.currentType))return s(),t.braceNest=0,M(e,t);if(r=function(e,t){const{currentType:n}=t;if(2!==n)return!1;d(e);const r=k(e.currentPeek());return e.resetPeek(),r}(e,t))return n=f(t,5,function(e){_(e);let t="",n="";for(;t=b(e);)n+=t;return e.currentChar()===I&&s(),n}(e)),_(e),n;if(o=h(e,t))return n=f(t,6,function(e){_(e);let t="";return"-"===e.currentChar()?(e.next(),t+=`-${F(e)}`):t+=F(e),e.currentChar()===I&&s(),t}(e)),_(e),n;if(c=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){_(e),m(e,"'");let t="",n="";const r=e=>"'"!==e&&e!==A;for(;t=g(e,r);)n+="\\"===t?v(e):t;const o=e.currentChar();return o===A||o===I?(s(),o===A&&(e.next(),m(e,"'")),n):(m(e,"'"),n)}(e)),_(e),n;if(!r&&!o&&!c)return n=f(t,13,function(e){_(e);let t="",n="";const r=e=>"{"!==e&&"}"!==e&&e!==N&&e!==A;for(;t=g(e,r);)n+=t;return n}(e)),s(),_(e),n}return n}function D(e,t){const{currentType:n}=t;let r=null;const o=e.currentChar();switch(8!==n&&9!==n&&12!==n&&10!==n||o!==A&&o!==N||s(),o){case"@":return e.next(),r=f(t,8,"@"),t.inLinked=!0,r;case".":return _(e),e.next(),f(t,9,".");case":":return _(e),e.next(),f(t,10,":");default:return T(e)?(r=f(t,1,P(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),D(e,t)):function(e,t){const{currentType:n}=t;if(9!==n)return!1;d(e);const r=k(e.currentPeek());return e.resetPeek(),r}(e,t)?(_(e),f(t,12,function(e){let t="",n="";for(;t=b(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?k(e.peek()):!("@"===t||"%"===t||"|"===t||":"===t||"."===t||t===N||!t)&&(t===A?(e.peek(),r()):k(t))},o=r();return e.resetPeek(),o}(e,t)?(_(e),"{"===o?w(e,t)||r:f(t,11,function(e){const t=(n=!1,r)=>{const o=e.currentChar();return"{"!==o&&"%"!==o&&"@"!==o&&"|"!==o&&o?o===N?r:o===A?(r+=o,e.next(),t(n,r)):(r+=o,e.next(),t(!0,r)):r};return t(!1,"")}(e))):(8===n&&s(),t.braceNest=0,t.inLinked=!1,M(e,t))}}function M(e,t){let n={type:14};if(t.braceNest>0)return w(e,t)||p(t);if(t.inLinked)return D(e,t)||p(t);const r=e.currentChar();switch(r){case"{":return w(e,t)||p(t);case"}":return s(),e.next(),f(t,3,"}");case"@":return D(e,t)||p(t);default:if(T(e))return n=f(t,1,P(e)),t.braceNest=0,t.inLinked=!1,n;if(E(e))return f(t,0,function(e){const t=n=>{const r=e.currentChar();return"{"!==r&&"}"!==r&&"@"!==r&&r?"%"===r?E(e)?(n+=r,e.next(),t(n)):n:"|"===r?n:r===N||r===A?E(e)?(n+=r,e.next(),t(n)):T(e)?n:(n+=r,e.next(),t(n)):(n+=r,e.next(),t(n)):n};return t("")}(e));if("%"===r)return e.next(),f(t,4,"%")}return n}return{nextToken:function(){const{currentType:e,offset:t,startLoc:n,endLoc:c}=l;return l.lastType=e,l.lastOffset=t,l.lastStartLoc=n,l.lastEndLoc=c,l.offset=o(),l.startLoc=s(),r.currentChar()===I?f(l,14):M(r,l)},currentOffset:o,currentPosition:s,context:u}}const v=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function x(e,t,n){switch(e){case"\\\\":return"\\";case"\\'":return"'";default:{const e=parseInt(t||n,16);return e<=55295||e>=57344?String.fromCodePoint(e):"�"}}}function P(e={}){const t=!1!==e.location,{onError:n}=e;function r(e,n,r){const o={type:e,start:n,end:n};return t&&(o.loc={start:r,end:r}),o}function o(e,n,r,o){e.end=n,o&&(e.type=o),t&&e.loc&&(e.loc.end=r)}function s(e,t){const n=e.context(),s=r(3,n.offset,n.startLoc);return s.value=t,o(s,e.currentOffset(),e.currentPosition()),s}function c(e,t){const n=e.context(),{lastOffset:s,lastStartLoc:c}=n,a=r(5,s,c);return a.index=parseInt(t,10),e.nextToken(),o(a,e.currentOffset(),e.currentPosition()),a}function l(e,t){const n=e.context(),{lastOffset:s,lastStartLoc:c}=n,a=r(4,s,c);return a.key=t,e.nextToken(),o(a,e.currentOffset(),e.currentPosition()),a}function u(e,t){const n=e.context(),{lastOffset:s,lastStartLoc:c}=n,a=r(9,s,c);return a.value=t.replace(v,x),e.nextToken(),o(a,e.currentOffset(),e.currentPosition()),a}function i(e){const t=e.context(),n=r(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,a=r(8,s,c);return 12!==t.type?(a.value="",o(a,s,c),{nextConsumeToken:t,node:a}):(null==t.value&&w(t),a.value=t.value||"",o(a,e.currentOffset(),e.currentPosition()),{node:a})}(e);n.modifier=t.node,s=t.nextConsumeToken||e.nextToken()}switch(10!==s.type&&w(s),s=e.nextToken(),2===s.type&&(s=e.nextToken()),s.type){case 11:null==s.value&&w(s),n.key=function(e,t){const n=e.context(),s=r(7,n.offset,n.startLoc);return s.value=t,o(s,e.currentOffset(),e.currentPosition()),s}(e,s.value||"");break;case 5:null==s.value&&w(s),n.key=l(e,s.value||"");break;case 6:null==s.value&&w(s),n.key=c(e,s.value||"");break;case 7:null==s.value&&w(s),n.key=u(e,s.value||"");break;default:const t=e.context(),a=r(7,t.offset,t.startLoc);return a.value="",o(a,t.offset,t.startLoc),n.key=a,o(n,t.offset,t.startLoc),{nextConsumeToken:s,node:n}}return o(n,e.currentOffset(),e.currentPosition()),{node:n}}function f(e){const t=e.context(),n=r(2,1===t.currentType?e.currentOffset():t.offset,1===t.currentType?t.endLoc:t.startLoc);n.items=[];let a=null;do{const t=a||e.nextToken();switch(a=null,t.type){case 0:null==t.value&&w(t),n.items.push(s(e,t.value||""));break;case 6:null==t.value&&w(t),n.items.push(c(e,t.value||""));break;case 5:null==t.value&&w(t),n.items.push(l(e,t.value||""));break;case 7:null==t.value&&w(t),n.items.push(u(e,t.value||""));break;case 8:const r=i(e);n.items.push(r.node),a=r.nextConsumeToken||null}}while(14!==t.currentType&&1!==t.currentType);return o(n,1===t.currentType?t.lastOffset:e.currentOffset(),1===t.currentType?t.lastEndLoc:e.currentPosition()),n}function p(e){const t=e.context(),{offset:n,startLoc:s}=t,c=f(e);return 14===t.currentType?c:function(e,t,n,s){const c=e.context();let a=0===s.items.length;const l=r(1,t,n);l.cases=[],l.cases.push(s);do{const t=f(e);a||(a=0===t.items.length),l.cases.push(t)}while(14!==c.currentType);return o(l,e.currentOffset(),e.currentPosition()),l}(e,n,s,c)}return{parse:function(n){const s=F(n,a({},e)),c=s.context(),l=r(0,c.offset,c.startLoc);return t&&l.loc&&(l.loc.source=n),l.body=p(s),o(l,s.currentOffset(),s.currentPosition()),l}}}function w(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 D(e,t){for(let n=0;n<e.length;n++)M(e[n],t)}function M(e,t){switch(e.type){case 1:D(e.cases,t),t.helper("plural");break;case 2:D(e.items,t);break;case 6:M(e.key,t),t.helper("linked");break;case 5:t.helper("interpolate"),t.helper("list");break;case 4:t.helper("interpolate"),t.helper("named")}}function R(e,t={}){const n=function(e,t={}){const n={ast:e,helpers:new Set};return{context:()=>n,helper:e=>(n.helpers.add(e),e)}}(e);n.helper("normalize"),e.body&&M(e.body,n);const r=n.context();e.helpers=Array.from(r.helpers)}function S(e,t){const{helper:n}=e;switch(t.type){case 0:!function(e,t){t.body?S(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&&(S(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&&(S(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")}(`),S(e,t.key),t.modifier&&(e.push(", "),S(e,t.modifier)),e.push(")")}(e,t);break;case 8:case 7:e.push(JSON.stringify(t.value),t);break;case 5:e.push(`${n("interpolate")}(${n("list")}(${t.index}))`,t);break;case 4:e.push(`${n("interpolate")}(${n("named")}(${JSON.stringify(t.key)}))`,t);break;case 9:case 3:e.push(JSON.stringify(t.value),t)}}function $(e,t={}){const n=a({},t),r=P(n).parse(e);return R(r,n),((e,t={})=>{const n=m(t.mode)?t.mode:"normal",r=m(t.filename)?t.filename:"message.intl",o=t.needIndent?t.needIndent:"arrow"!==n,s=e.helpers||[],c=function(e,t){const{filename:n,breakLineCode:r,needIndent:o}=t,s={source:e.loc.source,filename:n,code:"",column:1,line:1,offset:0,map:void 0,breakLineCode:r,needIndent:o,indentLevel:0};function c(e,t){s.code+=e}function a(e,t=!0){const n=t?r:"";c(o?n+" ".repeat(e):n)}return{context:()=>s,push:c,indent:function(e=!0){const t=++s.indentLevel;e&&a(t)},deindent:function(e=!0){const t=--s.indentLevel;e&&a(t)},newline:function(){a(s.indentLevel)},helper:e=>`_${e}`,needIndent:()=>s.needIndent}}(e,{mode:n,filename:r,sourceMap:!!t.sourceMap,breakLineCode:null!=t.breakLineCode?t.breakLineCode:"arrow"===n?";":"\n",needIndent:o});c.push("normal"===n?"function __msg__ (ctx) {":"(ctx) => {"),c.indent(o),s.length>0&&(c.push(`const { ${s.map((e=>`${e}: _${e}`)).join(", ")} } = ctx`),c.newline()),c.push("return "),S(c,e),c.deindent(o),c.push("}");const{code:a,map:l}=c.context();return{ast:e,code:a,map:l?l.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 W=/^\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 K(e){const t=e.trim();return("0"!==e.charAt(0)||!isNaN(parseInt(e)))&&(W.test(t)?function(e){const t=e.charCodeAt(0);return t!==e.charCodeAt(e.length-1)||34!==t&&39!==t?e:e.slice(1,-1)}(t):"*"+t)}function j(e){const t=[];let n,r,o,s,c,a,l,u=-1,i=0,f=0;const p=[];function m(){const t=e[u+1];if(5===i&&"'"===t||6===i&&'"'===t)return u++,o="\\"+t,p[0](),!0}for(p[0]=()=>{void 0===r?r=o:r+=o},p[1]=()=>{void 0!==r&&(t.push(r),r=void 0)},p[2]=()=>{p[0](),f++},p[3]=()=>{if(f>0)f--,i=4,p[0]();else{if(f=0,void 0===r)return!1;if(r=K(r),!1===r)return!1;p[1]()}};null!==i;)if(u++,n=e[u],"\\"!==n||!m()){if(s=V(n),l=U[i],c=l[s]||l.l||8,8===c)return;if(i=c[0],void 0!==c[1]&&(a=p[c[1]],a&&(o=n,!1===a())))return;if(7===i)return t}}const G=new Map;function B(e,t){return _(e)?e[t]:null}function H(e,t){if(!_(e))return null;let n=G.get(t);if(n||(n=j(t),n&&G.set(t,n)),!n)return null;const r=n.length;let o=e,s=0;for(;s<r;){const e=o[n[s]];if(void 0===e)return null;o=e,s++}return o}const J=e=>e,X=e=>"",Y="text",z=e=>0===e.length?"":e.join(""),Q=e=>null==e?"":f(e)||T(e)&&e.toString===k?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=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),o=_(e.pluralRules)&&m(t)&&p(e.pluralRules[t])?e.pluralRules[t]:q,s=_(e.pluralRules)&&m(t)&&p(e.pluralRules[t])?q:void 0,c=e.list||[],a=e.named||{};r(e.pluralIndex)&&function(e,t){t.count||(t.count=e),t.n||(t.n=e)}(n,a);function l(t){const n=p(e.messages)?e.messages(t):!!_(e.messages)&&e.messages[t];return n||(e.parent?e.parent.message(t):X)}const u=T(e.processor)&&p(e.processor.normalize)?e.processor.normalize:z,i=T(e.processor)&&p(e.processor.interpolate)?e.processor.interpolate:Q,f={list:e=>c[e],named:e=>a[e],plural:e=>e[o(n,e.length,s)],linked:(t,n)=>{const r=l(t)(f);return m(n)?(o=n,e.modifiers?e.modifiers[o]:J)(r):r;var o},message:l,type:T(e.processor)&&m(e.processor.type)?e.processor.type:Y,interpolate:i,normalize:u};return f}const ee="i18n:init";let te=null;const ne=re("function:translate");function re(e){return t=>te&&te.emit(e,t)}const oe={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},se={[oe.NOT_FOUND_KEY]:"Not found '{key}' key in '{locale}' locale messages.",[oe.FALLBACK_TO_TRANSLATE]:"Fall back to translate '{key}' key with '{target}' locale.",[oe.CANNOT_FORMAT_NUMBER]:"Cannot format a number value due to not supported Intl.NumberFormat.",[oe.FALLBACK_TO_NUMBER_FORMAT]:"Fall back to number format '{key}' key with '{target}' locale.",[oe.CANNOT_FORMAT_DATE]:"Cannot format a date value due to not supported Intl.DateTimeFormat.",[oe.FALLBACK_TO_DATE_FORMAT]:"Fall back to datetime format '{key}' key with '{target}' locale."};function ce(e,t,n){return[...new Set([n,...f(t)?t:_(t)?Object.keys(t):m(t)?[t]:[n]])]}function ae(e,t,n){const r=m(n)?n:pe,o=e;o.__localeChainCache||(o.__localeChainCache=new Map);let s=o.__localeChainCache.get(r);if(!s){s=[];let e=[n];for(;f(e);)e=le(s,e,t);const c=f(t)||!T(t)?t:t.default?t.default:null;e=m(c)?[c]:c,f(e)&&le(s,e,!1),o.__localeChainCache.set(r,s)}return s}function le(e,t,n){let r=!0;for(let o=0;o<t.length&&d(r);o++){m(t[o])&&(r=ue(e,t[o],n))}return r}function ue(e,t,n){let r;const o=t.split("-");do{r=ie(e,o.join("-"),n),o.splice(-1,1)}while(o.length&&!0===r);return r}function ie(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),(f(n)||T(n))&&n[o]&&(r=n[o])}return r}const fe="9.2.0-alpha.9",pe="en-US";let me,de,_e;function ke(e){me=e}function he(e){de=e}function Te(e){_e=e}let Ee=null;let ge=0;function be(e,t,n,r,o){const{missing:s}=e;if(null!==s){const r=s(e,n,t,o);return m(r)?r:t}return t}const Le=e=>e;let Ne=Object.create(null);function Ae(e,t={}){{const n=(t.onCacheKey||Le)(e),r=Ne[n];if(r)return r;let o=!1;const s=t.onError||b;t.onError=e=>{o=!0,s(e)};const{code:c}=$(e,t),a=new Function(`return ${c}`)();return o?a:Ne[n]=a}}let Ce=E.__EXTEND_POINT__;const ye=()=>Ce++,Oe={INVALID_ARGUMENT:Ce,INVALID_DATE_ARGUMENT:ye(),INVALID_ISO_DATE_ARGUMENT:ye(),__EXTEND_POINT__:ye()};const Ie=()=>"",Fe=e=>p(e);function ve(e,t,r,o,s,c){const{messageCompiler:a,warnHtmlMessage:l}=e;if(Fe(o)){const e=o;return e.locale=e.locale||r,e.key=e.key||t,e}const u=a(o,function(e,t,r,o,s,c){return{warnHtmlMessage:s,onError:e=>{throw c&&c(e),e},onCacheKey:e=>((e,t,r)=>n({l:e,k:t,s:r}))(t,r,e)}}(0,r,s,0,l,c));return u.locale=r,u.key=t,u.source=o,u}function xe(...e){const[t,n,o]=e,c={};if(!m(t)&&!r(t)&&!Fe(t))throw Error(Oe.INVALID_ARGUMENT);const l=r(t)?String(t):(Fe(t),t);return r(n)?c.plural=n:m(n)?c.default=n:T(n)&&!s(n)?c.named=n:f(n)&&(c.list=n),r(o)?c.plural=o:m(o)?c.default=o:T(o)&&a(c,o),[l,c]}function Pe(...e){const[t,n,o,s]=e;let c,a={},l={};if(m(t)){const e=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!e)throw Error(Oe.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 Error(Oe.INVALID_ISO_DATE_ARGUMENT)}}else if("[object Date]"===h(t)){if(isNaN(t.getTime()))throw Error(Oe.INVALID_DATE_ARGUMENT);c=t}else{if(!r(t))throw Error(Oe.INVALID_ARGUMENT);c=t}return m(n)?a.key=n:T(n)&&(a=n),m(o)?a.locale=o:T(o)&&(l=o),T(s)&&(l=s),[a.key||"",c,a,l]}function we(...e){const[t,n,o,s]=e;let c={},a={};if(!r(t))throw Error(Oe.INVALID_ARGUMENT);const l=t;return m(n)?c.key=n:T(n)&&(c=n),m(o)?c.locale=o:T(o)&&(a=o),T(s)&&(a=s),[c.key||"",l,c,a]}return ke(Ae),he(H),Te(ae),e.CompileErrorCodes=E,e.CoreErrorCodes=Oe,e.CoreWarnCodes=oe,e.DEFAULT_LOCALE=pe,e.DEFAULT_MESSAGE_DATA_TYPE=Y,e.MISSING_RESOLVE_VALUE="",e.NOT_REOSLVED=-1,e.VERSION=fe,e.clearCompileCache=function(){Ne=Object.create(null)},e.clearDateTimeFormat=function(e,t,n){const r=e;for(const e in n){const n=`${t}__${e}`;r.__datetimeFormatters.has(n)&&r.__datetimeFormatters.delete(n)}},e.clearNumberFormat=function(e,t,n){const r=e;for(const e in n){const n=`${t}__${e}`;r.__numberFormatters.has(n)&&r.__numberFormatters.delete(n)}},e.compileToFunction=Ae,e.createCompileError=g,e.createCoreContext=function(e={}){const t=m(e.version)?e.version:fe,n=m(e.locale)?e.locale:pe,r=f(e.fallbackLocale)||T(e.fallbackLocale)||m(e.fallbackLocale)||!1===e.fallbackLocale?e.fallbackLocale:n,s=T(e.messages)?e.messages:{[n]:{}},l=T(e.datetimeFormats)?e.datetimeFormats:{[n]:{}},u=T(e.numberFormats)?e.numberFormats:{[n]:{}},i=a({},e.modifiers||{},{upper:e=>m(e)?e.toUpperCase():e,lower:e=>m(e)?e.toLowerCase():e,capitalize:e=>m(e)?`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`:e}),k=e.pluralRules||{},h=p(e.missing)?e.missing:null,E=!d(e.missingWarn)&&!o(e.missingWarn)||e.missingWarn,g=!d(e.fallbackWarn)&&!o(e.fallbackWarn)||e.fallbackWarn,b=!!e.fallbackFormat,L=!!e.unresolving,N=p(e.postTranslation)?e.postTranslation:null,A=T(e.processor)?e.processor:null,C=!d(e.warnHtmlMessage)||e.warnHtmlMessage,y=!!e.escapeParameter,O=p(e.messageCompiler)?e.messageCompiler:me,I=p(e.messageResolver)?e.messageResolver:de||B,F=p(e.localeFallbacker)?e.localeFallbacker:_e||ce,v=p(e.onWarn)?e.onWarn:c,x=e,P=_(x.__datetimeFormatters)?x.__datetimeFormatters:new Map,w=_(x.__numberFormatters)?x.__numberFormatters:new Map,D=_(x.__meta)?x.__meta:{};ge++;const M={version:t,cid:ge,locale:n,fallbackLocale:r,messages:s,modifiers:i,pluralRules:k,missing:h,missingWarn:E,fallbackWarn:g,fallbackFormat:b,unresolving:L,postTranslation:N,processor:A,warnHtmlMessage:C,escapeParameter:y,messageCompiler:O,messageResolver:I,localeFallbacker:F,onWarn:v,__meta:D};return M.datetimeFormats=l,M.numberFormats=u,M.__datetimeFormatters=P,M.__numberFormatters=w,M},e.createCoreError=function(e){return g(e,null,void 0)},e.createMessageContext=Z,e.datetime=function(e,...t){const{datetimeFormats:n,unresolving:r,fallbackLocale:o,localeFallbacker:c}=e,{__datetimeFormatters:l}=e,[u,i,f,p]=Pe(...t);d(f.missingWarn),d(f.fallbackWarn);const _=!!f.part,k=m(f.locale)?f.locale:e.locale,h=c(e,o,k);if(!m(u)||""===u)return new Intl.DateTimeFormat(k).format(i);let E,g={},b=null;for(let t=0;t<h.length&&(E=h[t],g=n[E]||{},b=g[u],!T(b));t++)be(e,u,E,0,"datetime format");if(!T(b)||!m(E))return r?-1:u;let L=`${E}__${u}`;s(p)||(L=`${L}__${JSON.stringify(p)}`);let N=l.get(L);return N||(N=new Intl.DateTimeFormat(E,a({},b,p)),l.set(L,N)),_?N.formatToParts(i):N.format(i)},e.fallbackWithLocaleChain=ae,e.fallbackWithSimple=ce,e.getAdditionalMeta=()=>Ee,e.getDevToolsHook=function(){return te},e.getWarnMessage=function(e,...n){return function(e,...n){return 1===n.length&&_(n[0])&&(n=n[0]),n&&n.hasOwnProperty||(n={}),e.replace(t,((e,t)=>n.hasOwnProperty(t)?n[t]:""))}(se[e],...n)},e.handleFlatJson=function e(t){if(!_(t))return t;for(const n in t)if(i(t,n))if(n.includes(".")){const r=n.split("."),o=r.length-1;let s=t;for(let e=0;e<o;e++)r[e]in s||(s[r[e]]={}),s=s[r[e]];s[r[o]]=t[n],delete t[n],_(s[r[o]])&&e(s[r[o]])}else _(t[n])&&e(t[n]);return t},e.handleMissing=be,e.initI18nDevTools=function(e,t,n){te&&te.emit(ee,{timestamp:Date.now(),i18n:e,version:t,meta:n})},e.isMessageFunction=Fe,e.isTranslateFallbackWarn=function(e,t){return e instanceof RegExp?e.test(t):e},e.isTranslateMissingWarn=function(e,t){return e instanceof RegExp?e.test(t):e},e.number=function(e,...t){const{numberFormats:n,unresolving:r,fallbackLocale:o,localeFallbacker:c}=e,{__numberFormatters:l}=e,[u,i,f,p]=we(...t);d(f.missingWarn),d(f.fallbackWarn);const _=!!f.part,k=m(f.locale)?f.locale:e.locale,h=c(e,o,k);if(!m(u)||""===u)return new Intl.NumberFormat(k).format(i);let E,g={},b=null;for(let t=0;t<h.length&&(E=h[t],g=n[E]||{},b=g[u],!T(b));t++)be(e,u,E,0,"number format");if(!T(b)||!m(E))return r?-1:u;let L=`${E}__${u}`;s(p)||(L=`${L}__${JSON.stringify(p)}`);let N=l.get(L);return N||(N=new Intl.NumberFormat(E,a({},b,p)),l.set(L,N)),_?N.formatToParts(i):N.format(i)},e.parse=j,e.parseDateTimeArgs=Pe,e.parseNumberArgs=we,e.parseTranslateArgs=xe,e.registerLocaleFallbacker=Te,e.registerMessageCompiler=ke,e.registerMessageResolver=he,e.resolveValue=H,e.resolveWithKeyValue=B,e.setAdditionalMeta=e=>{Ee=e},e.setDevToolsHook=function(e){te=e},e.translate=function(e,...t){const{fallbackFormat:n,postTranslation:o,unresolving:s,fallbackLocale:c,messages:a}=e,[u,i]=xe(...t),k=(d(i.missingWarn),d(i.fallbackWarn),d(i.escapeParameter)?i.escapeParameter:e.escapeParameter),h=!!i.resolvedMessage,T=m(i.default)||d(i.default)?d(i.default)?u:i.default:n?u:"",E=n||""!==T,g=m(i.locale)?i.locale:e.locale;k&&function(e){f(e.list)?e.list=e.list.map((e=>m(e)?l(e):e)):_(e.named)&&Object.keys(e.named).forEach((t=>{m(e.named[t])&&(e.named[t]=l(e.named[t]))}))}(i);let[b,L,N]=h?[u,g,a[g]||{}]:function(e,t,n,r,o,s){const{messages:c,messageResolver:a,localeFallbacker:l}=e,u=l(e,r,n);let i,f={},d=null;const _="translate";for(let n=0;n<u.length&&(i=u[n],f=c[i]||{},null===(d=a(f,t))&&(d=f[t]),!m(d)&&!p(d));n++){const n=be(e,t,i,0,_);n!==t&&(d=n)}return[d,i,f]}(e,u,g,c),A=u;if(h||m(b)||Fe(b)||E&&(b=T,A=b),!(h||(m(b)||Fe(b))&&m(L)))return s?-1:u;let C=!1;const y=Fe(b)?b:ve(e,u,L,b,A,(()=>{C=!0}));if(C)return b;const O=function(e,t,n){return t(n)}(0,y,Z(function(e,t,n,o){const{modifiers:s,pluralRules:c,messageResolver:a}=e,l={locale:t,modifiers:s,pluralRules:c,messages:r=>{const o=a(n,r);if(m(o)){let n=!1;const s=ve(e,r,t,o,r,(()=>{n=!0}));return n?Ie:s}return Fe(o)?o:Ie}};e.processor&&(l.processor=e.processor);o.list&&(l.list=o.list);o.named&&(l.named=o.named);r(o.plural)&&(l.pluralIndex=o.plural);return l}(e,L,N,i)));return o?o(O):O},e.translateDevTools=ne,e.updateFallbackLocale=function(e,t,n){e.__localeChainCache=new Map,e.localeFallbacker(e,n,t)},Object.defineProperty(e,"__esModule",{value:!0}),e}({});
var IntlifyCore=function(e){"use strict";const t=/\{([0-9a-zA-Z]+)\}/g;const n=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]"===_(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 a=Object.assign;function l(e){return e.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;")}const u=Array.isArray,i=e=>"function"==typeof e,f=e=>"string"==typeof e,m=e=>"boolean"==typeof e,p=e=>null!==e&&"object"==typeof e,d=Object.prototype.toString,_=e=>d.call(e),k=e=>"[object Object]"===_(e),h={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 T(e,t,n={}){const{domain:r}=n,o=new SyntaxError(String(e));return o.code=e,t&&(o.location=t),o.domain=r,o}function E(e){throw e}function g(e,t,n){const r={start:e,end:t};return null!=n&&(r.source=n),r}const b=" ",L="\n",N=String.fromCharCode(8232),A=String.fromCharCode(8233);function C(e){const t=e;let n=0,r=1,o=1,s=0;const c=e=>"\r"===t[e]&&t[e+1]===L,a=e=>t[e]===A,l=e=>t[e]===N,u=e=>c(e)||(e=>t[e]===L)(e)||a(e)||l(e),i=e=>c(e)||a(e)||l(e)?L:t[e];function f(){return s=0,u(n)&&(r++,o=0),c(n)&&n++,n++,o++,t[n]}return{index:()=>n,line:()=>r,column:()=>o,peekOffset:()=>s,charAt:i,currentChar:()=>i(n),currentPeek:()=>i(n+s),next:f,peek:function(){return c(n+s)&&s++,s++,t[n+s]},reset:function(){n=0,r=1,o=1,s=0},resetPeek:function(e=0){s=e},skipToPeek:function(){const e=n+s;for(;e!==n;)f();s=0}}}const y=void 0;function O(e,t={}){const n=!1!==t.location,r=C(e),o=()=>r.index(),s=()=>{return e=r.line(),t=r.column(),n=r.index(),{line:e,column:t,offset:n};var e,t,n},c=s(),a=o(),l={currentType:14,offset:a,startLoc:c,endLoc:c,lastType:14,lastOffset:a,lastStartLoc:c,lastEndLoc:c,braceNest:0,inLinked:!1,text:""},u=()=>l,{onError:i}=t;function f(e,t,r){e.endLoc=s(),e.currentType=t;const o={type:t};return n&&(o.loc=g(e.startLoc,e.endLoc)),null!=r&&(o.value=r),o}const m=e=>f(e,14);function p(e,t){return e.currentChar()===t?(e.next(),t):(s(),"")}function d(e){let t="";for(;e.currentPeek()===b||e.currentPeek()===L;)t+=e.currentPeek(),e.peek();return t}function _(e){const t=d(e);return e.skipToPeek(),t}function k(e){if(e===y)return!1;const t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||95===t}function h(e,t){const{currentType:n}=t;if(2!==n)return!1;d(e);const r=function(e){if(e===y)return!1;const t=e.charCodeAt(0);return t>=48&&t<=57}("-"===e.currentPeek()?e.peek():e.currentPeek());return e.resetPeek(),r}function T(e){d(e);const t="|"===e.currentPeek();return e.resetPeek(),t}function E(e,t=!0){const n=(t=!1,r="",o=!1)=>{const s=e.currentPeek();return"{"===s?"%"!==r&&t:"@"!==s&&s?"%"===s?(e.peek(),n(t,"%",!0)):"|"===s?!("%"!==r&&!o)||!(r===b||r===L):s===b?(e.peek(),n(!0,b,o)):s!==L||(e.peek(),n(!0,L,o)):"%"===r||t},r=n();return t&&e.resetPeek(),r}function N(e,t){const n=e.currentChar();return n===y?y:t(n)?(e.next(),n):null}function A(e){return N(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 N(e,(e=>{const t=e.charCodeAt(0);return t>=48&&t<=57}))}function I(e){return N(e,(e=>{const t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}))}function v(e){let t="",n="";for(;t=O(e);)n+=t;return n}function F(e){const t=e.currentChar();switch(t){case"\\":case"'":return e.next(),`\\${t}`;case"u":return x(e,t,4);case"U":return x(e,t,6);default:return s(),""}}function x(e,t,n){p(e,t);let r="";for(let t=0;t<n;t++){const t=I(e);if(!t){s(),e.currentChar();break}r+=t}return`\\${t}${r}`}function P(e){_(e);const t=p(e,"|");return _(e),t}function w(e,t){let n=null;switch(e.currentChar()){case"{":return t.braceNest>=1&&s(),e.next(),n=f(t,2,"{"),_(e),t.braceNest++,n;case"}":return t.braceNest>0&&2===t.currentType&&s(),e.next(),n=f(t,3,"}"),t.braceNest--,t.braceNest>0&&_(e),t.inLinked&&0===t.braceNest&&(t.inLinked=!1),n;case"@":return t.braceNest>0&&s(),n=D(e,t)||m(t),t.braceNest=0,n;default:let r=!0,o=!0,c=!0;if(T(e))return t.braceNest>0&&s(),n=f(t,1,P(e)),t.braceNest=0,t.inLinked=!1,n;if(t.braceNest>0&&(5===t.currentType||6===t.currentType||7===t.currentType))return s(),t.braceNest=0,M(e,t);if(r=function(e,t){const{currentType:n}=t;if(2!==n)return!1;d(e);const r=k(e.currentPeek());return e.resetPeek(),r}(e,t))return n=f(t,5,function(e){_(e);let t="",n="";for(;t=A(e);)n+=t;return e.currentChar()===y&&s(),n}(e)),_(e),n;if(o=h(e,t))return n=f(t,6,function(e){_(e);let t="";return"-"===e.currentChar()?(e.next(),t+=`-${v(e)}`):t+=v(e),e.currentChar()===y&&s(),t}(e)),_(e),n;if(c=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){_(e),p(e,"'");let t="",n="";const r=e=>"'"!==e&&e!==L;for(;t=N(e,r);)n+="\\"===t?F(e):t;const o=e.currentChar();return o===L||o===y?(s(),o===L&&(e.next(),p(e,"'")),n):(p(e,"'"),n)}(e)),_(e),n;if(!r&&!o&&!c)return n=f(t,13,function(e){_(e);let t="",n="";const r=e=>"{"!==e&&"}"!==e&&e!==b&&e!==L;for(;t=N(e,r);)n+=t;return n}(e)),s(),_(e),n}return n}function D(e,t){const{currentType:n}=t;let r=null;const o=e.currentChar();switch(8!==n&&9!==n&&12!==n&&10!==n||o!==L&&o!==b||s(),o){case"@":return e.next(),r=f(t,8,"@"),t.inLinked=!0,r;case".":return _(e),e.next(),f(t,9,".");case":":return _(e),e.next(),f(t,10,":");default:return T(e)?(r=f(t,1,P(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),D(e,t)):function(e,t){const{currentType:n}=t;if(9!==n)return!1;d(e);const r=k(e.currentPeek());return e.resetPeek(),r}(e,t)?(_(e),f(t,12,function(e){let t="",n="";for(;t=A(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?k(e.peek()):!("@"===t||"%"===t||"|"===t||":"===t||"."===t||t===b||!t)&&(t===L?(e.peek(),r()):k(t))},o=r();return e.resetPeek(),o}(e,t)?(_(e),"{"===o?w(e,t)||r:f(t,11,function(e){const t=(n=!1,r)=>{const o=e.currentChar();return"{"!==o&&"%"!==o&&"@"!==o&&"|"!==o&&o?o===b?r:o===L?(r+=o,e.next(),t(n,r)):(r+=o,e.next(),t(!0,r)):r};return t(!1,"")}(e))):(8===n&&s(),t.braceNest=0,t.inLinked=!1,M(e,t))}}function M(e,t){let n={type:14};if(t.braceNest>0)return w(e,t)||m(t);if(t.inLinked)return D(e,t)||m(t);const r=e.currentChar();switch(r){case"{":return w(e,t)||m(t);case"}":return s(),e.next(),f(t,3,"}");case"@":return D(e,t)||m(t);default:if(T(e))return n=f(t,1,P(e)),t.braceNest=0,t.inLinked=!1,n;if(E(e))return f(t,0,function(e){const t=n=>{const r=e.currentChar();return"{"!==r&&"}"!==r&&"@"!==r&&r?"%"===r?E(e)?(n+=r,e.next(),t(n)):n:"|"===r?n:r===b||r===L?E(e)?(n+=r,e.next(),t(n)):T(e)?n:(n+=r,e.next(),t(n)):(n+=r,e.next(),t(n)):n};return t("")}(e));if("%"===r)return e.next(),f(t,4,"%")}return n}return{nextToken:function(){const{currentType:e,offset:t,startLoc:n,endLoc:c}=l;return l.lastType=e,l.lastOffset=t,l.lastStartLoc=n,l.lastEndLoc=c,l.offset=o(),l.startLoc=s(),r.currentChar()===y?f(l,14):M(r,l)},currentOffset:o,currentPosition:s,context:u}}const I=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function v(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 F(e={}){const t=!1!==e.location,{onError:n}=e;function r(e,n,r){const o={type:e,start:n,end:n};return t&&(o.loc={start:r,end:r}),o}function o(e,n,r,o){e.end=n,o&&(e.type=o),t&&e.loc&&(e.loc.end=r)}function s(e,t){const n=e.context(),s=r(3,n.offset,n.startLoc);return s.value=t,o(s,e.currentOffset(),e.currentPosition()),s}function c(e,t){const n=e.context(),{lastOffset:s,lastStartLoc:c}=n,a=r(5,s,c);return a.index=parseInt(t,10),e.nextToken(),o(a,e.currentOffset(),e.currentPosition()),a}function l(e,t){const n=e.context(),{lastOffset:s,lastStartLoc:c}=n,a=r(4,s,c);return a.key=t,e.nextToken(),o(a,e.currentOffset(),e.currentPosition()),a}function u(e,t){const n=e.context(),{lastOffset:s,lastStartLoc:c}=n,a=r(9,s,c);return a.value=t.replace(I,v),e.nextToken(),o(a,e.currentOffset(),e.currentPosition()),a}function i(e){const t=e.context(),n=r(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,a=r(8,s,c);return 12!==t.type?(a.value="",o(a,s,c),{nextConsumeToken:t,node:a}):(null==t.value&&x(t),a.value=t.value||"",o(a,e.currentOffset(),e.currentPosition()),{node:a})}(e);n.modifier=t.node,s=t.nextConsumeToken||e.nextToken()}switch(10!==s.type&&x(s),s=e.nextToken(),2===s.type&&(s=e.nextToken()),s.type){case 11:null==s.value&&x(s),n.key=function(e,t){const n=e.context(),s=r(7,n.offset,n.startLoc);return s.value=t,o(s,e.currentOffset(),e.currentPosition()),s}(e,s.value||"");break;case 5:null==s.value&&x(s),n.key=l(e,s.value||"");break;case 6:null==s.value&&x(s),n.key=c(e,s.value||"");break;case 7:null==s.value&&x(s),n.key=u(e,s.value||"");break;default:const t=e.context(),a=r(7,t.offset,t.startLoc);return a.value="",o(a,t.offset,t.startLoc),n.key=a,o(n,t.offset,t.startLoc),{nextConsumeToken:s,node:n}}return o(n,e.currentOffset(),e.currentPosition()),{node:n}}function f(e){const t=e.context(),n=r(2,1===t.currentType?e.currentOffset():t.offset,1===t.currentType?t.endLoc:t.startLoc);n.items=[];let a=null;do{const t=a||e.nextToken();switch(a=null,t.type){case 0:null==t.value&&x(t),n.items.push(s(e,t.value||""));break;case 6:null==t.value&&x(t),n.items.push(c(e,t.value||""));break;case 5:null==t.value&&x(t),n.items.push(l(e,t.value||""));break;case 7:null==t.value&&x(t),n.items.push(u(e,t.value||""));break;case 8:const r=i(e);n.items.push(r.node),a=r.nextConsumeToken||null}}while(14!==t.currentType&&1!==t.currentType);return o(n,1===t.currentType?t.lastOffset:e.currentOffset(),1===t.currentType?t.lastEndLoc:e.currentPosition()),n}function m(e){const t=e.context(),{offset:n,startLoc:s}=t,c=f(e);return 14===t.currentType?c:function(e,t,n,s){const c=e.context();let a=0===s.items.length;const l=r(1,t,n);l.cases=[],l.cases.push(s);do{const t=f(e);a||(a=0===t.items.length),l.cases.push(t)}while(14!==c.currentType);return o(l,e.currentOffset(),e.currentPosition()),l}(e,n,s,c)}return{parse:function(n){const s=O(n,a({},e)),c=s.context(),l=r(0,c.offset,c.startLoc);return t&&l.loc&&(l.loc.source=n),l.body=m(s),o(l,s.currentOffset(),s.currentPosition()),l}}}function x(e){if(14===e.type)return"EOF";const t=(e.value||"").replace(/\r?\n/gu,"\\n");return t.length>10?t.slice(0,9)+"…":t}function P(e,t){for(let n=0;n<e.length;n++)w(e[n],t)}function w(e,t){switch(e.type){case 1:P(e.cases,t),t.helper("plural");break;case 2:P(e.items,t);break;case 6:w(e.key,t),t.helper("linked");break;case 5:t.helper("interpolate"),t.helper("list");break;case 4:t.helper("interpolate"),t.helper("named")}}function 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&&w(e.body,n);const r=n.context();e.helpers=Array.from(r.helpers)}function M(e,t){const{helper:n}=e;switch(t.type){case 0:!function(e,t){t.body?M(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&&(M(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&&(M(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")}(`),M(e,t.key),t.modifier&&(e.push(", "),M(e,t.modifier)),e.push(")")}(e,t);break;case 8:case 7:e.push(JSON.stringify(t.value),t);break;case 5:e.push(`${n("interpolate")}(${n("list")}(${t.index}))`,t);break;case 4:e.push(`${n("interpolate")}(${n("named")}(${JSON.stringify(t.key)}))`,t);break;case 9:case 3:e.push(JSON.stringify(t.value),t)}}function R(e,t={}){const n=a({},t),r=F(n).parse(e);return D(r,n),((e,t={})=>{const n=f(t.mode)?t.mode:"normal",r=f(t.filename)?t.filename:"message.intl",o=t.needIndent?t.needIndent:"arrow"!==n,s=e.helpers||[],c=function(e,t){const{filename:n,breakLineCode:r,needIndent:o}=t,s={source:e.loc.source,filename:n,code:"",column:1,line:1,offset:0,map:void 0,breakLineCode:r,needIndent:o,indentLevel:0};function c(e,t){s.code+=e}function a(e,t=!0){const n=t?r:"";c(o?n+" ".repeat(e):n)}return{context:()=>s,push:c,indent:function(e=!0){const t=++s.indentLevel;e&&a(t)},deindent:function(e=!0){const t=--s.indentLevel;e&&a(t)},newline:function(){a(s.indentLevel)},helper:e=>`_${e}`,needIndent:()=>s.needIndent}}(e,{mode:n,filename:r,sourceMap:!!t.sourceMap,breakLineCode:null!=t.breakLineCode?t.breakLineCode:"arrow"===n?";":"\n",needIndent:o});c.push("normal"===n?"function __msg__ (ctx) {":"(ctx) => {"),c.indent(o),s.length>0&&(c.push(`const { ${s.map((e=>`${e}: _${e}`)).join(", ")} } = ctx`),c.newline()),c.push("return "),M(c,e),c.deindent(o),c.push("}");const{code:a,map:l}=c.context();return{ast:e,code:a,map:l?l.toJSON():void 0}})(r,n)}const S=[];S[0]={w:[0],i:[3,0],"[":[4],o:[7]},S[1]={w:[1],".":[2],"[":[4],o:[7]},S[2]={w:[2],i:[3,0],0:[3,0]},S[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},S[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},S[5]={"'":[4,0],o:8,l:[5,0]},S[6]={'"':[4,0],o:8,l:[6,0]};const $=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function U(e){if(null==e)return"o";switch(e.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return e;case 95:case 36:case 45:return"i";case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"w"}return"i"}function W(e){const t=e.trim();return("0"!==e.charAt(0)||!isNaN(parseInt(e)))&&($.test(t)?function(e){const t=e.charCodeAt(0);return t!==e.charCodeAt(e.length-1)||34!==t&&39!==t?e:e.slice(1,-1)}(t):"*"+t)}function V(e){const t=[];let n,r,o,s,c,a,l,u=-1,i=0,f=0;const m=[];function p(){const t=e[u+1];if(5===i&&"'"===t||6===i&&'"'===t)return u++,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--,i=4,m[0]();else{if(f=0,void 0===r)return!1;if(r=W(r),!1===r)return!1;m[1]()}};null!==i;)if(u++,n=e[u],"\\"!==n||!p()){if(s=U(n),l=S[i],c=l[s]||l.l||8,8===c)return;if(i=c[0],void 0!==c[1]&&(a=m[c[1]],a&&(o=n,!1===a())))return;if(7===i)return t}}const K=new Map;function j(e,t){return p(e)?e[t]:null}function G(e,t){if(!p(e))return null;let n=K.get(t);if(n||(n=V(t),n&&K.set(t,n)),!n)return null;const r=n.length;let o=e,s=0;for(;s<r;){const e=o[n[s]];if(void 0===e)return null;o=e,s++}return o}const B=e=>e,H=e=>"",X="text",J=e=>0===e.length?"":e.join(""),Y=e=>null==e?"":u(e)||k(e)&&e.toString===d?JSON.stringify(e,null,2):String(e);function z(e,t){return e=Math.abs(e),2===t?e?e>1?1:0:1:e?Math.min(e,2):0}function Q(e={}){const t=e.locale,n=function(e){const t=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),o=p(e.pluralRules)&&f(t)&&i(e.pluralRules[t])?e.pluralRules[t]:z,s=p(e.pluralRules)&&f(t)&&i(e.pluralRules[t])?z:void 0,c=e.list||[],a=e.named||{};r(e.pluralIndex)&&function(e,t){t.count||(t.count=e),t.n||(t.n=e)}(n,a);function l(t){const n=i(e.messages)?e.messages(t):!!p(e.messages)&&e.messages[t];return n||(e.parent?e.parent.message(t):H)}const u=k(e.processor)&&i(e.processor.normalize)?e.processor.normalize:J,m=k(e.processor)&&i(e.processor.interpolate)?e.processor.interpolate:Y,d={list:e=>c[e],named:e=>a[e],plural:e=>e[o(n,e.length,s)],linked:(t,n)=>{const r=l(t)(d);return f(n)?(o=n,e.modifiers?e.modifiers[o]:B)(r):r;var o},message:l,type:k(e.processor)&&f(e.processor.type)?e.processor.type:X,interpolate:m,normalize:u};return d}const q="i18n:init";let Z=null;const ee=te("function:translate");function te(e){return t=>Z&&Z.emit(e,t)}const ne={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},re={[ne.NOT_FOUND_KEY]:"Not found '{key}' key in '{locale}' locale messages.",[ne.FALLBACK_TO_TRANSLATE]:"Fall back to translate '{key}' key with '{target}' locale.",[ne.CANNOT_FORMAT_NUMBER]:"Cannot format a number value due to not supported Intl.NumberFormat.",[ne.FALLBACK_TO_NUMBER_FORMAT]:"Fall back to number format '{key}' key with '{target}' locale.",[ne.CANNOT_FORMAT_DATE]:"Cannot format a date value due to not supported Intl.DateTimeFormat.",[ne.FALLBACK_TO_DATE_FORMAT]:"Fall back to datetime format '{key}' key with '{target}' locale."};function oe(e,t,n){return[...new Set([n,...u(t)?t:p(t)?Object.keys(t):f(t)?[t]:[n]])]}function se(e,t,n){const r=f(n)?n:ie,o=e;o.__localeChainCache||(o.__localeChainCache=new Map);let s=o.__localeChainCache.get(r);if(!s){s=[];let e=[n];for(;u(e);)e=ce(s,e,t);const c=u(t)||!k(t)?t:t.default?t.default:null;e=f(c)?[c]:c,u(e)&&ce(s,e,!1),o.__localeChainCache.set(r,s)}return s}function ce(e,t,n){let r=!0;for(let o=0;o<t.length&&m(r);o++){f(t[o])&&(r=ae(e,t[o],n))}return r}function ae(e,t,n){let r;const o=t.split("-");do{r=le(e,o.join("-"),n),o.splice(-1,1)}while(o.length&&!0===r);return r}function le(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),(u(n)||k(n))&&n[o]&&(r=n[o])}return r}const ue="9.2.0-beta.1",ie="en-US";let fe,me,pe;function de(e){fe=e}function _e(e){me=e}function ke(e){pe=e}let he=null;let Te=0;function Ee(e,t,n,r,o){const{missing:s}=e;if(null!==s){const r=s(e,n,t,o);return f(r)?r:t}return t}const ge=e=>e;let be=Object.create(null);function Le(e,t={}){{const n=(t.onCacheKey||ge)(e),r=be[n];if(r)return r;let o=!1;const s=t.onError||E;t.onError=e=>{o=!0,s(e)};const{code:c}=R(e,t),a=new Function(`return ${c}`)();return o?a:be[n]=a}}let Ne=h.__EXTEND_POINT__;const Ae=()=>Ne++,Ce={INVALID_ARGUMENT:Ne,INVALID_DATE_ARGUMENT:Ae(),INVALID_ISO_DATE_ARGUMENT:Ae(),__EXTEND_POINT__:Ae()};const ye=()=>"",Oe=e=>i(e);function Ie(e,t,r,o,s,c){const{messageCompiler:a,warnHtmlMessage:l}=e;if(Oe(o)){const e=o;return e.locale=e.locale||r,e.key=e.key||t,e}const u=a(o,function(e,t,r,o,s,c){return{warnHtmlMessage:s,onError:e=>{throw c&&c(e),e},onCacheKey:e=>((e,t,r)=>n({l:e,k:t,s:r}))(t,r,e)}}(0,r,s,0,l,c));return u.locale=r,u.key=t,u.source=o,u}function ve(...e){const[t,n,o]=e,c={};if(!f(t)&&!r(t)&&!Oe(t))throw Error(Ce.INVALID_ARGUMENT);const l=r(t)?String(t):(Oe(t),t);return r(n)?c.plural=n:f(n)?c.default=n:k(n)&&!s(n)?c.named=n:u(n)&&(c.list=n),r(o)?c.plural=o:f(o)?c.default=o:k(o)&&a(c,o),[l,c]}function Fe(...e){const[t,n,o,s]=e;let c,a={},l={};if(f(t)){const e=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!e)throw Error(Ce.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 Error(Ce.INVALID_ISO_DATE_ARGUMENT)}}else if("[object Date]"===_(t)){if(isNaN(t.getTime()))throw Error(Ce.INVALID_DATE_ARGUMENT);c=t}else{if(!r(t))throw Error(Ce.INVALID_ARGUMENT);c=t}return f(n)?a.key=n:k(n)&&(a=n),f(o)?a.locale=o:k(o)&&(l=o),k(s)&&(l=s),[a.key||"",c,a,l]}function xe(...e){const[t,n,o,s]=e;let c={},a={};if(!r(t))throw Error(Ce.INVALID_ARGUMENT);const l=t;return f(n)?c.key=n:k(n)&&(c=n),f(o)?c.locale=o:k(o)&&(a=o),k(s)&&(a=s),[c.key||"",l,c,a]}return de(Le),_e(G),ke(se),e.CompileErrorCodes=h,e.CoreErrorCodes=Ce,e.CoreWarnCodes=ne,e.DEFAULT_LOCALE=ie,e.DEFAULT_MESSAGE_DATA_TYPE=X,e.MISSING_RESOLVE_VALUE="",e.NOT_REOSLVED=-1,e.VERSION=ue,e.clearCompileCache=function(){be=Object.create(null)},e.clearDateTimeFormat=function(e,t,n){const r=e;for(const e in n){const n=`${t}__${e}`;r.__datetimeFormatters.has(n)&&r.__datetimeFormatters.delete(n)}},e.clearNumberFormat=function(e,t,n){const r=e;for(const e in n){const n=`${t}__${e}`;r.__numberFormatters.has(n)&&r.__numberFormatters.delete(n)}},e.compileToFunction=Le,e.createCompileError=T,e.createCoreContext=function(e={}){const t=f(e.version)?e.version:ue,n=f(e.locale)?e.locale:ie,r=u(e.fallbackLocale)||k(e.fallbackLocale)||f(e.fallbackLocale)||!1===e.fallbackLocale?e.fallbackLocale:n,s=k(e.messages)?e.messages:{[n]:{}},l=k(e.datetimeFormats)?e.datetimeFormats:{[n]:{}},d=k(e.numberFormats)?e.numberFormats:{[n]:{}},_=a({},e.modifiers||{},{upper:e=>f(e)?e.toUpperCase():e,lower:e=>f(e)?e.toLowerCase():e,capitalize:e=>f(e)?`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`:e}),h=e.pluralRules||{},T=i(e.missing)?e.missing:null,E=!m(e.missingWarn)&&!o(e.missingWarn)||e.missingWarn,g=!m(e.fallbackWarn)&&!o(e.fallbackWarn)||e.fallbackWarn,b=!!e.fallbackFormat,L=!!e.unresolving,N=i(e.postTranslation)?e.postTranslation:null,A=k(e.processor)?e.processor:null,C=!m(e.warnHtmlMessage)||e.warnHtmlMessage,y=!!e.escapeParameter,O=i(e.messageCompiler)?e.messageCompiler:fe,I=i(e.messageResolver)?e.messageResolver:me||j,v=i(e.localeFallbacker)?e.localeFallbacker:pe||oe,F=i(e.onWarn)?e.onWarn:c,x=e,P=p(x.__datetimeFormatters)?x.__datetimeFormatters:new Map,w=p(x.__numberFormatters)?x.__numberFormatters:new Map,D=p(x.__meta)?x.__meta:{};Te++;const M={version:t,cid:Te,locale:n,fallbackLocale:r,messages:s,modifiers:_,pluralRules:h,missing:T,missingWarn:E,fallbackWarn:g,fallbackFormat:b,unresolving:L,postTranslation:N,processor:A,warnHtmlMessage:C,escapeParameter:y,messageCompiler:O,messageResolver:I,localeFallbacker:v,onWarn:F,__meta:D};return M.datetimeFormats=l,M.numberFormats=d,M.__datetimeFormatters=P,M.__numberFormatters=w,M},e.createCoreError=function(e){return T(e,null,void 0)},e.createMessageContext=Q,e.datetime=function(e,...t){const{datetimeFormats:n,unresolving:r,fallbackLocale:o,localeFallbacker:c}=e,{__datetimeFormatters:l}=e,[u,i,p,d]=Fe(...t);m(p.missingWarn),m(p.fallbackWarn);const _=!!p.part,h=f(p.locale)?p.locale:e.locale,T=c(e,o,h);if(!f(u)||""===u)return new Intl.DateTimeFormat(h).format(i);let E,g={},b=null;for(let t=0;t<T.length&&(E=T[t],g=n[E]||{},b=g[u],!k(b));t++)Ee(e,u,E,0,"datetime format");if(!k(b)||!f(E))return r?-1:u;let L=`${E}__${u}`;s(d)||(L=`${L}__${JSON.stringify(d)}`);let N=l.get(L);return N||(N=new Intl.DateTimeFormat(E,a({},b,d)),l.set(L,N)),_?N.formatToParts(i):N.format(i)},e.fallbackWithLocaleChain=se,e.fallbackWithSimple=oe,e.getAdditionalMeta=()=>he,e.getDevToolsHook=function(){return Z},e.getWarnMessage=function(e,...n){return function(e,...n){return 1===n.length&&p(n[0])&&(n=n[0]),n&&n.hasOwnProperty||(n={}),e.replace(t,((e,t)=>n.hasOwnProperty(t)?n[t]:""))}(re[e],...n)},e.handleMissing=Ee,e.initI18nDevTools=function(e,t,n){Z&&Z.emit(q,{timestamp:Date.now(),i18n:e,version:t,meta:n})},e.isMessageFunction=Oe,e.isTranslateFallbackWarn=function(e,t){return e instanceof RegExp?e.test(t):e},e.isTranslateMissingWarn=function(e,t){return e instanceof RegExp?e.test(t):e},e.number=function(e,...t){const{numberFormats:n,unresolving:r,fallbackLocale:o,localeFallbacker:c}=e,{__numberFormatters:l}=e,[u,i,p,d]=xe(...t);m(p.missingWarn),m(p.fallbackWarn);const _=!!p.part,h=f(p.locale)?p.locale:e.locale,T=c(e,o,h);if(!f(u)||""===u)return new Intl.NumberFormat(h).format(i);let E,g={},b=null;for(let t=0;t<T.length&&(E=T[t],g=n[E]||{},b=g[u],!k(b));t++)Ee(e,u,E,0,"number format");if(!k(b)||!f(E))return r?-1:u;let L=`${E}__${u}`;s(d)||(L=`${L}__${JSON.stringify(d)}`);let N=l.get(L);return N||(N=new Intl.NumberFormat(E,a({},b,d)),l.set(L,N)),_?N.formatToParts(i):N.format(i)},e.parse=V,e.parseDateTimeArgs=Fe,e.parseNumberArgs=xe,e.parseTranslateArgs=ve,e.registerLocaleFallbacker=ke,e.registerMessageCompiler=de,e.registerMessageResolver=_e,e.resolveValue=G,e.resolveWithKeyValue=j,e.setAdditionalMeta=e=>{he=e},e.setDevToolsHook=function(e){Z=e},e.translate=function(e,...t){const{fallbackFormat:n,postTranslation:o,unresolving:s,fallbackLocale:c,messages:a}=e,[d,_]=ve(...t),k=(m(_.missingWarn),m(_.fallbackWarn),m(_.escapeParameter)?_.escapeParameter:e.escapeParameter),h=!!_.resolvedMessage,T=f(_.default)||m(_.default)?m(_.default)?d:_.default:n?d:"",E=n||""!==T,g=f(_.locale)?_.locale:e.locale;k&&function(e){u(e.list)?e.list=e.list.map((e=>f(e)?l(e):e)):p(e.named)&&Object.keys(e.named).forEach((t=>{f(e.named[t])&&(e.named[t]=l(e.named[t]))}))}(_);let[b,L,N]=h?[d,g,a[g]||{}]:function(e,t,n,r,o,s){const{messages:c,messageResolver:a,localeFallbacker:l}=e,u=l(e,r,n);let m,p={},d=null;const _="translate";for(let n=0;n<u.length&&(m=u[n],p=c[m]||{},null===(d=a(p,t))&&(d=p[t]),!f(d)&&!i(d));n++){const n=Ee(e,t,m,0,_);n!==t&&(d=n)}return[d,m,p]}(e,d,g,c),A=d;if(h||f(b)||Oe(b)||E&&(b=T,A=b),!(h||(f(b)||Oe(b))&&f(L)))return s?-1:d;let C=!1;const y=Oe(b)?b:Ie(e,d,L,b,A,(()=>{C=!0}));if(C)return b;const O=function(e,t,n){return t(n)}(0,y,Q(function(e,t,n,o){const{modifiers:s,pluralRules:c,messageResolver:a}=e,l={locale:t,modifiers:s,pluralRules:c,messages:r=>{const o=a(n,r);if(f(o)){let n=!1;const s=Ie(e,r,t,o,r,(()=>{n=!0}));return n?ye:s}return Oe(o)?o:ye}};e.processor&&(l.processor=e.processor);o.list&&(l.list=o.list);o.named&&(l.named=o.named);r(o.plural)&&(l.pluralIndex=o.plural);return l}(e,L,N,_)));return o?o(O):O},e.translateDevTools=ee,e.updateFallbackLocale=function(e,t,n){e.__localeChainCache=new Map,e.localeFallbacker(e,n,t)},Object.defineProperty(e,"__esModule",{value:!0}),e}({});
/*!
* core v9.2.0-alpha.9
* core v9.2.0-beta.1
* (c) 2021 kazuya kawaguchi

@@ -67,6 +67,2 @@ * Released under the MIT License.

}
const hasOwnProperty = Object.prototype.hasOwnProperty;
function hasOwn(obj, key) {
return hasOwnProperty.call(obj, key);
}
/* eslint-enable */

@@ -449,45 +445,2 @@ /**

}
/**
* Transform flat json in obj to normal json in obj
*/
function handleFlatJson(obj) {
// check obj
if (!isObject(obj)) {
return obj;
}
for (const key in obj) {
// check key
if (!hasOwn(obj, key)) {
continue;
}
// handle for normal json
if (!key.includes("." /* DOT */)) {
// recursive process value if value is also a object
if (isObject(obj[key])) {
handleFlatJson(obj[key]);
}
}
// handle for flat json, transform to normal json
else {
// go to the last object
const subKeys = key.split("." /* DOT */);
const lastIndex = subKeys.length - 1;
let currentObj = obj;
for (let i = 0; i < lastIndex; i++) {
if (!(subKeys[i] in currentObj)) {
currentObj[subKeys[i]] = {};
}
currentObj = currentObj[subKeys[i]];
}
// update last object value, delete old property
currentObj[subKeys[lastIndex]] = obj[key];
delete obj[key];
// recursive process value if value is also a object
if (isObject(currentObj[subKeys[lastIndex]])) {
handleFlatJson(currentObj[subKeys[lastIndex]]);
}
}
}
return obj;
}

@@ -767,3 +720,3 @@ const DEFAULT_MODIFIER = (str) => str;

*/
const VERSION = '9.2.0-alpha.9';
const VERSION = '9.2.0-beta.1';
const NOT_REOSLVED = -1;

@@ -1624,2 +1577,2 @@ const DEFAULT_LOCALE = 'en-US';

export { CompileErrorCodes, CoreErrorCodes, CoreWarnCodes, DEFAULT_LOCALE, DEFAULT_MESSAGE_DATA_TYPE, MISSING_RESOLVE_VALUE, NOT_REOSLVED, VERSION, clearCompileCache, clearDateTimeFormat, clearNumberFormat, compileToFunction, createCompileError, createCoreContext, createCoreError, createMessageContext, datetime, fallbackWithLocaleChain, fallbackWithSimple, getAdditionalMeta, getDevToolsHook, getWarnMessage, handleFlatJson, handleMissing, initI18nDevTools, isMessageFunction, isTranslateFallbackWarn, isTranslateMissingWarn, number, parse, parseDateTimeArgs, parseNumberArgs, parseTranslateArgs, registerLocaleFallbacker, registerMessageCompiler, registerMessageResolver, resolveValue, resolveWithKeyValue, setAdditionalMeta, setDevToolsHook, translate, translateDevTools, updateFallbackLocale };
export { CompileErrorCodes, CoreErrorCodes, CoreWarnCodes, DEFAULT_LOCALE, DEFAULT_MESSAGE_DATA_TYPE, MISSING_RESOLVE_VALUE, NOT_REOSLVED, VERSION, clearCompileCache, clearDateTimeFormat, clearNumberFormat, compileToFunction, createCompileError, createCoreContext, createCoreError, createMessageContext, datetime, fallbackWithLocaleChain, fallbackWithSimple, getAdditionalMeta, getDevToolsHook, getWarnMessage, handleMissing, initI18nDevTools, isMessageFunction, isTranslateFallbackWarn, isTranslateMissingWarn, number, parse, parseDateTimeArgs, parseNumberArgs, parseTranslateArgs, registerLocaleFallbacker, registerMessageCompiler, registerMessageResolver, resolveValue, resolveWithKeyValue, setAdditionalMeta, setDevToolsHook, translate, translateDevTools, updateFallbackLocale };
/*!
* core v9.2.0-alpha.9
* core v9.2.0-beta.1
* (c) 2021 kazuya kawaguchi
* Released under the MIT License.
*/
const e=/\{([0-9a-zA-Z]+)\}/g;const t=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),n=e=>"number"==typeof e&&isFinite(e),r=e=>"[object RegExp]"===g(e),a=e=>N(e)&&0===Object.keys(e).length;function o(e,t){"undefined"!=typeof console&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}const l=Object.assign;function s(e){return e.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;")}const c=Object.prototype.hasOwnProperty;function i(e,t){return c.call(e,t)}const u=Array.isArray,m=e=>"function"==typeof e,f=e=>"string"==typeof e,_=e=>"boolean"==typeof e,p=e=>null!==e&&"object"==typeof e,E=Object.prototype.toString,g=e=>E.call(e),N=e=>"[object Object]"===g(e),A={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 d(e,t,n={}){const{domain:r}=n,a=new SyntaxError(String(e));return a.code=e,t&&(a.location=t),a.domain=r,a}const T=[];T[0]={w:[0],i:[3,0],"[":[4],o:[7]},T[1]={w:[1],".":[2],"[":[4],o:[7]},T[2]={w:[2],i:[3,0],0:[3,0]},T[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},T[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},T[5]={"'":[4,0],o:8,l:[5,0]},T[6]={'"':[4,0],o:8,l:[6,0]};const b=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function I(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 L(e){const t=e.trim();return("0"!==e.charAt(0)||!isNaN(parseInt(e)))&&(b.test(t)?function(e){const t=e.charCodeAt(0);return t!==e.charCodeAt(e.length-1)||34!==t&&39!==t?e:e.slice(1,-1)}(t):"*"+t)}function O(e){const t=[];let n,r,a,o,l,s,c,i=-1,u=0,m=0;const f=[];function _(){const t=e[i+1];if(5===u&&"'"===t||6===u&&'"'===t)return i++,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=L(r),!1===r)return!1;f[1]()}};null!==u;)if(i++,n=e[i],"\\"!==n||!_()){if(o=I(n),c=T[u],l=c[o]||c.l||8,8===l)return;if(u=l[0],void 0!==l[1]&&(s=f[l[1]],s&&(a=n,!1===s())))return;if(7===u)return t}}const F=new Map;function h(e,t){return p(e)?e[t]:null}function C(e,t){if(!p(e))return null;let n=F.get(t);if(n||(n=O(t),n&&F.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}function R(e){if(!p(e))return e;for(const t in e)if(i(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],p(a[n[r]])&&R(a[n[r]])}else p(e[t])&&R(e[t]);return e}const k=e=>e,D=e=>"",M="text",w=e=>0===e.length?"":e.join(""),y=e=>null==e?"":u(e)||N(e)&&e.toString===E?JSON.stringify(e,null,2):String(e);function S(e,t){return e=Math.abs(e),2===t?e?e>1?1:0:1:e?Math.min(e,2):0}function U(e={}){const t=e.locale,r=function(e){const t=n(e.pluralIndex)?e.pluralIndex:-1;return e.named&&(n(e.named.count)||n(e.named.n))?n(e.named.count)?e.named.count:n(e.named.n)?e.named.n:t:t}(e),a=p(e.pluralRules)&&f(t)&&m(e.pluralRules[t])?e.pluralRules[t]:S,o=p(e.pluralRules)&&f(t)&&m(e.pluralRules[t])?S:void 0,l=e.list||[],s=e.named||{};n(e.pluralIndex)&&function(e,t){t.count||(t.count=e),t.n||(t.n=e)}(r,s);function c(t){const n=m(e.messages)?e.messages(t):!!p(e.messages)&&e.messages[t];return n||(e.parent?e.parent.message(t):D)}const i=N(e.processor)&&m(e.processor.normalize)?e.processor.normalize:w,u=N(e.processor)&&m(e.processor.interpolate)?e.processor.interpolate:y,_={list:e=>l[e],named:e=>s[e],plural:e=>e[a(r,e.length,o)],linked:(t,n)=>{const r=c(t)(_);return f(n)?(a=n,e.modifiers?e.modifiers[a]:k)(r):r;var a},message:c,type:N(e.processor)&&f(e.processor.type)?e.processor.type:"text",interpolate:u,normalize:i};return _}const P="i18n:init";let v=null;function W(e){v=e}function $(){return v}function K(e,t,n){v&&v.emit(P,{timestamp:Date.now(),i18n:e,version:t,meta:n})}const j=B("function:translate");function B(e){return t=>v&&v.emit(e,t)}const G={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},V={[G.NOT_FOUND_KEY]:"Not found '{key}' key in '{locale}' locale messages.",[G.FALLBACK_TO_TRANSLATE]:"Fall back to translate '{key}' key with '{target}' locale.",[G.CANNOT_FORMAT_NUMBER]:"Cannot format a number value due to not supported Intl.NumberFormat.",[G.FALLBACK_TO_NUMBER_FORMAT]:"Fall back to number format '{key}' key with '{target}' locale.",[G.CANNOT_FORMAT_DATE]:"Cannot format a date value due to not supported Intl.DateTimeFormat.",[G.FALLBACK_TO_DATE_FORMAT]:"Fall back to datetime format '{key}' key with '{target}' locale."};function x(t,...n){return function(t,...n){return 1===n.length&&p(n[0])&&(n=n[0]),n&&n.hasOwnProperty||(n={}),t.replace(e,((e,t)=>n.hasOwnProperty(t)?n[t]:""))}(V[t],...n)}function H(e,t,n){return[...new Set([n,...u(t)?t:p(t)?Object.keys(t):f(t)?[t]:[n]])]}function X(e,t,n){const r=f(n)?n:Z,a=e;a.__localeChainCache||(a.__localeChainCache=new Map);let o=a.__localeChainCache.get(r);if(!o){o=[];let e=[n];for(;u(e);)e=Y(o,e,t);const l=u(t)||!N(t)?t:t.default?t.default:null;e=f(l)?[l]:l,u(e)&&Y(o,e,!1),a.__localeChainCache.set(r,o)}return o}function Y(e,t,n){let r=!0;for(let a=0;a<t.length&&_(r);a++){f(t[a])&&(r=z(e,t[a],n))}return r}function z(e,t,n){let r;const a=t.split("-");do{r=J(e,a.join("-"),n),a.splice(-1,1)}while(a.length&&!0===r);return r}function J(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),(u(n)||N(n))&&n[a]&&(r=n[a])}return r}const Q="9.2.0-alpha.9",q=-1,Z="en-US",ee="";let te,ne,re;function ae(e){te=e}function oe(e){ne=e}function le(e){re=e}let se=null;const ce=e=>{se=e},ie=()=>se;let ue=0;function me(e={}){const t=f(e.version)?e.version:"9.2.0-alpha.9",n=f(e.locale)?e.locale:Z,a=u(e.fallbackLocale)||N(e.fallbackLocale)||f(e.fallbackLocale)||!1===e.fallbackLocale?e.fallbackLocale:n,s=N(e.messages)?e.messages:{[n]:{}},c=N(e.datetimeFormats)?e.datetimeFormats:{[n]:{}},i=N(e.numberFormats)?e.numberFormats:{[n]:{}},E=l({},e.modifiers||{},{upper:e=>f(e)?e.toUpperCase():e,lower:e=>f(e)?e.toLowerCase():e,capitalize:e=>f(e)?`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`:e}),g=e.pluralRules||{},A=m(e.missing)?e.missing:null,d=!_(e.missingWarn)&&!r(e.missingWarn)||e.missingWarn,T=!_(e.fallbackWarn)&&!r(e.fallbackWarn)||e.fallbackWarn,b=!!e.fallbackFormat,I=!!e.unresolving,L=m(e.postTranslation)?e.postTranslation:null,O=N(e.processor)?e.processor:null,F=!_(e.warnHtmlMessage)||e.warnHtmlMessage,C=!!e.escapeParameter,R=m(e.messageCompiler)?e.messageCompiler:te,k=m(e.messageResolver)?e.messageResolver:ne||h,D=m(e.localeFallbacker)?e.localeFallbacker:re||H,M=m(e.onWarn)?e.onWarn:o,w=e,y=p(w.__datetimeFormatters)?w.__datetimeFormatters:new Map,S=p(w.__numberFormatters)?w.__numberFormatters:new Map,U=p(w.__meta)?w.__meta:{};ue++;const P={version:t,cid:ue,locale:n,fallbackLocale:a,messages:s,modifiers:E,pluralRules:g,missing:A,missingWarn:d,fallbackWarn:T,fallbackFormat:b,unresolving:I,postTranslation:L,processor:O,warnHtmlMessage:F,escapeParameter:C,messageCompiler:R,messageResolver:k,localeFallbacker:D,onWarn:M,__meta:U};return P.datetimeFormats=c,P.numberFormats=i,P.__datetimeFormatters=y,P.__numberFormatters=S,P}function fe(e,t){return e instanceof RegExp?e.test(t):e}function _e(e,t){return e instanceof RegExp?e.test(t):e}function pe(e,t,n,r,a){const{missing:o}=e;if(null!==o){const r=o(e,n,t,a);return f(r)?r:t}return t}function Ee(e,t,n){e.__localeChainCache=new Map,e.localeFallbacker(e,n,t)}function ge(){}function Ne(e,t={}){return()=>e}let Ae=A.__EXTEND_POINT__;const de=()=>Ae++,Te={INVALID_ARGUMENT:Ae,INVALID_DATE_ARGUMENT:de(),INVALID_ISO_DATE_ARGUMENT:de(),__EXTEND_POINT__:de()};function be(e){return d(e,null,void 0)}const Ie=()=>"",Le=e=>m(e);function Oe(e,...t){const{fallbackFormat:r,postTranslation:a,unresolving:o,fallbackLocale:l,messages:c}=e,[i,E]=he(...t),g=(_(E.missingWarn),_(E.fallbackWarn),_(E.escapeParameter)?E.escapeParameter:e.escapeParameter),N=!!E.resolvedMessage,A=f(E.default)||_(E.default)?_(E.default)?i:E.default:r?i:"",d=r||""!==A,T=f(E.locale)?E.locale:e.locale;g&&function(e){u(e.list)?e.list=e.list.map((e=>f(e)?s(e):e)):p(e.named)&&Object.keys(e.named).forEach((t=>{f(e.named[t])&&(e.named[t]=s(e.named[t]))}))}(E);let[b,I,L]=N?[i,T,c[T]||{}]:function(e,t,n,r,a,o){const{messages:l,messageResolver:s,localeFallbacker:c}=e,i=c(e,r,n);let u,_={},p=null;const E="translate";for(let n=0;n<i.length&&(u=i[n],_=l[u]||{},null===(p=s(_,t))&&(p=_[t]),!f(p)&&!m(p));n++){const n=pe(e,t,u,0,E);n!==t&&(p=n)}return[p,u,_]}(e,i,T,l),O=i;if(N||f(b)||Le(b)||d&&(b=A,O=b),!(N||(f(b)||Le(b))&&f(I)))return o?-1:i;let F=!1;const h=Le(b)?b:Fe(e,i,I,b,O,(()=>{F=!0}));if(F)return b;const C=function(e,t,n){return t(n)}(0,h,U(function(e,t,r,a){const{modifiers:o,pluralRules:l,messageResolver:s}=e,c={locale:t,modifiers:o,pluralRules:l,messages:n=>{const a=s(r,n);if(f(a)){let r=!1;const o=Fe(e,n,t,a,n,(()=>{r=!0}));return r?Ie:o}return Le(a)?a:Ie}};e.processor&&(c.processor=e.processor);a.list&&(c.list=a.list);a.named&&(c.named=a.named);n(a.plural)&&(c.pluralIndex=a.plural);return c}(e,I,L,E)));return a?a(C):C}function Fe(e,n,r,a,o,l){const{messageCompiler:s,warnHtmlMessage:c}=e;if(Le(a)){const e=a;return e.locale=e.locale||r,e.key=e.key||n,e}const i=s(a,function(e,n,r,a,o,l){return{warnHtmlMessage:o,onError:e=>{throw l&&l(e),e},onCacheKey:e=>((e,n,r)=>t({l:e,k:n,s:r}))(n,r,e)}}(0,r,o,0,c,l));return i.locale=r,i.key=n,i.source=a,i}function he(...e){const[t,r,o]=e,s={};if(!f(t)&&!n(t)&&!Le(t))throw Error(Te.INVALID_ARGUMENT);const c=n(t)?String(t):(Le(t),t);return n(r)?s.plural=r:f(r)?s.default=r:N(r)&&!a(r)?s.named=r:u(r)&&(s.list=r),n(o)?s.plural=o:f(o)?s.default=o:N(o)&&l(s,o),[c,s]}function Ce(e,...t){const{datetimeFormats:n,unresolving:r,fallbackLocale:o,localeFallbacker:s}=e,{__datetimeFormatters:c}=e,[i,u,m,p]=Re(...t);_(m.missingWarn);_(m.fallbackWarn);const E=!!m.part,g=f(m.locale)?m.locale:e.locale,A=s(e,o,g);if(!f(i)||""===i)return new Intl.DateTimeFormat(g).format(u);let d,T={},b=null;for(let t=0;t<A.length&&(d=A[t],T=n[d]||{},b=T[i],!N(b));t++)pe(e,i,d,0,"datetime format");if(!N(b)||!f(d))return r?-1:i;let I=`${d}__${i}`;a(p)||(I=`${I}__${JSON.stringify(p)}`);let L=c.get(I);return L||(L=new Intl.DateTimeFormat(d,l({},b,p)),c.set(I,L)),E?L.formatToParts(u):L.format(u)}function Re(...e){const[t,r,a,o]=e;let l,s={},c={};if(f(t)){const e=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!e)throw Error(Te.INVALID_ISO_DATE_ARGUMENT);const n=e[3]?e[3].trim().startsWith("T")?`${e[1].trim()}${e[3].trim()}`:`${e[1].trim()}T${e[3].trim()}`:e[1].trim();l=new Date(n);try{l.toISOString()}catch(e){throw Error(Te.INVALID_ISO_DATE_ARGUMENT)}}else if("[object Date]"===g(t)){if(isNaN(t.getTime()))throw Error(Te.INVALID_DATE_ARGUMENT);l=t}else{if(!n(t))throw Error(Te.INVALID_ARGUMENT);l=t}return f(r)?s.key=r:N(r)&&(s=r),f(a)?s.locale=a:N(a)&&(c=a),N(o)&&(c=o),[s.key||"",l,s,c]}function ke(e,t,n){const r=e;for(const e in n){const n=`${t}__${e}`;r.__datetimeFormatters.has(n)&&r.__datetimeFormatters.delete(n)}}function De(e,...t){const{numberFormats:n,unresolving:r,fallbackLocale:o,localeFallbacker:s}=e,{__numberFormatters:c}=e,[i,u,m,p]=Me(...t);_(m.missingWarn);_(m.fallbackWarn);const E=!!m.part,g=f(m.locale)?m.locale:e.locale,A=s(e,o,g);if(!f(i)||""===i)return new Intl.NumberFormat(g).format(u);let d,T={},b=null;for(let t=0;t<A.length&&(d=A[t],T=n[d]||{},b=T[i],!N(b));t++)pe(e,i,d,0,"number format");if(!N(b)||!f(d))return r?-1:i;let I=`${d}__${i}`;a(p)||(I=`${I}__${JSON.stringify(p)}`);let L=c.get(I);return L||(L=new Intl.NumberFormat(d,l({},b,p)),c.set(I,L)),E?L.formatToParts(u):L.format(u)}function Me(...e){const[t,r,a,o]=e;let l={},s={};if(!n(t))throw Error(Te.INVALID_ARGUMENT);const c=t;return f(r)?l.key=r:N(r)&&(l=r),f(a)?l.locale=a:N(a)&&(s=a),N(o)&&(s=o),[l.key||"",c,l,s]}function we(e,t,n){const r=e;for(const e in n){const n=`${t}__${e}`;r.__numberFormatters.has(n)&&r.__numberFormatters.delete(n)}}oe(C),le(X);export{A as CompileErrorCodes,Te as CoreErrorCodes,G as CoreWarnCodes,Z as DEFAULT_LOCALE,M as DEFAULT_MESSAGE_DATA_TYPE,ee as MISSING_RESOLVE_VALUE,q as NOT_REOSLVED,Q as VERSION,ge as clearCompileCache,ke as clearDateTimeFormat,we as clearNumberFormat,Ne as compileToFunction,d as createCompileError,me as createCoreContext,be as createCoreError,U as createMessageContext,Ce as datetime,X as fallbackWithLocaleChain,H as fallbackWithSimple,ie as getAdditionalMeta,$ as getDevToolsHook,x as getWarnMessage,R as handleFlatJson,pe as handleMissing,K as initI18nDevTools,Le as isMessageFunction,fe as isTranslateFallbackWarn,_e as isTranslateMissingWarn,De as number,O as parse,Re as parseDateTimeArgs,Me as parseNumberArgs,he as parseTranslateArgs,le as registerLocaleFallbacker,ae as registerMessageCompiler,oe as registerMessageResolver,C as resolveValue,h as resolveWithKeyValue,ce as setAdditionalMeta,W as setDevToolsHook,Oe as translate,j as translateDevTools,Ee as updateFallbackLocale};
const e=/\{([0-9a-zA-Z]+)\}/g;const t=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),n=e=>"number"==typeof e&&isFinite(e),r=e=>"[object RegExp]"===p(e),a=e=>E(e)&&0===Object.keys(e).length;function o(e,t){"undefined"!=typeof console&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}const l=Object.assign;function s(e){return e.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;")}const c=Array.isArray,i=e=>"function"==typeof e,u=e=>"string"==typeof e,m=e=>"boolean"==typeof e,f=e=>null!==e&&"object"==typeof e,_=Object.prototype.toString,p=e=>_.call(e),E=e=>"[object Object]"===p(e),g={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 N(e,t,n={}){const{domain:r}=n,a=new SyntaxError(String(e));return a.code=e,t&&(a.location=t),a.domain=r,a}const A=[];A[0]={w:[0],i:[3,0],"[":[4],o:[7]},A[1]={w:[1],".":[2],"[":[4],o:[7]},A[2]={w:[2],i:[3,0],0:[3,0]},A[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},A[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},A[5]={"'":[4,0],o:8,l:[5,0]},A[6]={'"':[4,0],o:8,l:[6,0]};const d=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function T(e){if(null==e)return"o";switch(e.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return e;case 95:case 36:case 45:return"i";case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"w"}return"i"}function b(e){const t=e.trim();return("0"!==e.charAt(0)||!isNaN(parseInt(e)))&&(d.test(t)?function(e){const t=e.charCodeAt(0);return t!==e.charCodeAt(e.length-1)||34!==t&&39!==t?e:e.slice(1,-1)}(t):"*"+t)}function I(e){const t=[];let n,r,a,o,l,s,c,i=-1,u=0,m=0;const f=[];function _(){const t=e[i+1];if(5===u&&"'"===t||6===u&&'"'===t)return i++,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=b(r),!1===r)return!1;f[1]()}};null!==u;)if(i++,n=e[i],"\\"!==n||!_()){if(o=T(n),c=A[u],l=c[o]||c.l||8,8===l)return;if(u=l[0],void 0!==l[1]&&(s=f[l[1]],s&&(a=n,!1===s())))return;if(7===u)return t}}const L=new Map;function F(e,t){return f(e)?e[t]:null}function O(e,t){if(!f(e))return null;let n=L.get(t);if(n||(n=I(t),n&&L.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 h=e=>e,C=e=>"",R="text",k=e=>0===e.length?"":e.join(""),D=e=>null==e?"":c(e)||E(e)&&e.toString===_?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 w(e={}){const t=e.locale,r=function(e){const t=n(e.pluralIndex)?e.pluralIndex:-1;return e.named&&(n(e.named.count)||n(e.named.n))?n(e.named.count)?e.named.count:n(e.named.n)?e.named.n:t:t}(e),a=f(e.pluralRules)&&u(t)&&i(e.pluralRules[t])?e.pluralRules[t]:M,o=f(e.pluralRules)&&u(t)&&i(e.pluralRules[t])?M:void 0,l=e.list||[],s=e.named||{};n(e.pluralIndex)&&function(e,t){t.count||(t.count=e),t.n||(t.n=e)}(r,s);function c(t){const n=i(e.messages)?e.messages(t):!!f(e.messages)&&e.messages[t];return n||(e.parent?e.parent.message(t):C)}const m=E(e.processor)&&i(e.processor.normalize)?e.processor.normalize:k,_=E(e.processor)&&i(e.processor.interpolate)?e.processor.interpolate:D,p={list:e=>l[e],named:e=>s[e],plural:e=>e[a(r,e.length,o)],linked:(t,n)=>{const r=c(t)(p);return u(n)?(a=n,e.modifiers?e.modifiers[a]:h)(r):r;var a},message:c,type:E(e.processor)&&u(e.processor.type)?e.processor.type:"text",interpolate:_,normalize:m};return p}const y="i18n:init";let S=null;function U(e){S=e}function P(){return S}function v(e,t,n){S&&S.emit(y,{timestamp:Date.now(),i18n:e,version:t,meta:n})}const W=$("function:translate");function $(e){return t=>S&&S.emit(e,t)}const K={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},B={[K.NOT_FOUND_KEY]:"Not found '{key}' key in '{locale}' locale messages.",[K.FALLBACK_TO_TRANSLATE]:"Fall back to translate '{key}' key with '{target}' locale.",[K.CANNOT_FORMAT_NUMBER]:"Cannot format a number value due to not supported Intl.NumberFormat.",[K.FALLBACK_TO_NUMBER_FORMAT]:"Fall back to number format '{key}' key with '{target}' locale.",[K.CANNOT_FORMAT_DATE]:"Cannot format a date value due to not supported Intl.DateTimeFormat.",[K.FALLBACK_TO_DATE_FORMAT]:"Fall back to datetime format '{key}' key with '{target}' locale."};function G(t,...n){return function(t,...n){return 1===n.length&&f(n[0])&&(n=n[0]),n&&n.hasOwnProperty||(n={}),t.replace(e,((e,t)=>n.hasOwnProperty(t)?n[t]:""))}(B[t],...n)}function V(e,t,n){return[...new Set([n,...c(t)?t:f(t)?Object.keys(t):u(t)?[t]:[n]])]}function j(e,t,n){const r=u(n)?n:J,a=e;a.__localeChainCache||(a.__localeChainCache=new Map);let o=a.__localeChainCache.get(r);if(!o){o=[];let e=[n];for(;c(e);)e=x(o,e,t);const l=c(t)||!E(t)?t:t.default?t.default:null;e=u(l)?[l]:l,c(e)&&x(o,e,!1),a.__localeChainCache.set(r,o)}return o}function x(e,t,n){let r=!0;for(let a=0;a<t.length&&m(r);a++){u(t[a])&&(r=H(e,t[a],n))}return r}function H(e,t,n){let r;const a=t.split("-");do{r=X(e,a.join("-"),n),a.splice(-1,1)}while(a.length&&!0===r);return r}function X(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),(c(n)||E(n))&&n[a]&&(r=n[a])}return r}const Y="9.2.0-beta.1",z=-1,J="en-US",Q="";let q,Z,ee;function te(e){q=e}function ne(e){Z=e}function re(e){ee=e}let ae=null;const oe=e=>{ae=e},le=()=>ae;let se=0;function ce(e={}){const t=u(e.version)?e.version:"9.2.0-beta.1",n=u(e.locale)?e.locale:J,a=c(e.fallbackLocale)||E(e.fallbackLocale)||u(e.fallbackLocale)||!1===e.fallbackLocale?e.fallbackLocale:n,s=E(e.messages)?e.messages:{[n]:{}},_=E(e.datetimeFormats)?e.datetimeFormats:{[n]:{}},p=E(e.numberFormats)?e.numberFormats:{[n]:{}},g=l({},e.modifiers||{},{upper:e=>u(e)?e.toUpperCase():e,lower:e=>u(e)?e.toLowerCase():e,capitalize:e=>u(e)?`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`:e}),N=e.pluralRules||{},A=i(e.missing)?e.missing:null,d=!m(e.missingWarn)&&!r(e.missingWarn)||e.missingWarn,T=!m(e.fallbackWarn)&&!r(e.fallbackWarn)||e.fallbackWarn,b=!!e.fallbackFormat,I=!!e.unresolving,L=i(e.postTranslation)?e.postTranslation:null,O=E(e.processor)?e.processor:null,h=!m(e.warnHtmlMessage)||e.warnHtmlMessage,C=!!e.escapeParameter,R=i(e.messageCompiler)?e.messageCompiler:q,k=i(e.messageResolver)?e.messageResolver:Z||F,D=i(e.localeFallbacker)?e.localeFallbacker:ee||V,M=i(e.onWarn)?e.onWarn:o,w=e,y=f(w.__datetimeFormatters)?w.__datetimeFormatters:new Map,S=f(w.__numberFormatters)?w.__numberFormatters:new Map,U=f(w.__meta)?w.__meta:{};se++;const P={version:t,cid:se,locale:n,fallbackLocale:a,messages:s,modifiers:g,pluralRules:N,missing:A,missingWarn:d,fallbackWarn:T,fallbackFormat:b,unresolving:I,postTranslation:L,processor:O,warnHtmlMessage:h,escapeParameter:C,messageCompiler:R,messageResolver:k,localeFallbacker:D,onWarn:M,__meta:U};return P.datetimeFormats=_,P.numberFormats=p,P.__datetimeFormatters=y,P.__numberFormatters=S,P}function ie(e,t){return e instanceof RegExp?e.test(t):e}function ue(e,t){return e instanceof RegExp?e.test(t):e}function me(e,t,n,r,a){const{missing:o}=e;if(null!==o){const r=o(e,n,t,a);return u(r)?r:t}return t}function fe(e,t,n){e.__localeChainCache=new Map,e.localeFallbacker(e,n,t)}function _e(){}function pe(e,t={}){return()=>e}let Ee=g.__EXTEND_POINT__;const ge=()=>Ee++,Ne={INVALID_ARGUMENT:Ee,INVALID_DATE_ARGUMENT:ge(),INVALID_ISO_DATE_ARGUMENT:ge(),__EXTEND_POINT__:ge()};function Ae(e){return N(e,null,void 0)}const de=()=>"",Te=e=>i(e);function be(e,...t){const{fallbackFormat:r,postTranslation:a,unresolving:o,fallbackLocale:l,messages:_}=e,[p,E]=Le(...t),g=(m(E.missingWarn),m(E.fallbackWarn),m(E.escapeParameter)?E.escapeParameter:e.escapeParameter),N=!!E.resolvedMessage,A=u(E.default)||m(E.default)?m(E.default)?p:E.default:r?p:"",d=r||""!==A,T=u(E.locale)?E.locale:e.locale;g&&function(e){c(e.list)?e.list=e.list.map((e=>u(e)?s(e):e)):f(e.named)&&Object.keys(e.named).forEach((t=>{u(e.named[t])&&(e.named[t]=s(e.named[t]))}))}(E);let[b,I,L]=N?[p,T,_[T]||{}]:function(e,t,n,r,a,o){const{messages:l,messageResolver:s,localeFallbacker:c}=e,m=c(e,r,n);let f,_={},p=null;const E="translate";for(let n=0;n<m.length&&(f=m[n],_=l[f]||{},null===(p=s(_,t))&&(p=_[t]),!u(p)&&!i(p));n++){const n=me(e,t,f,0,E);n!==t&&(p=n)}return[p,f,_]}(e,p,T,l),F=p;if(N||u(b)||Te(b)||d&&(b=A,F=b),!(N||(u(b)||Te(b))&&u(I)))return o?-1:p;let O=!1;const h=Te(b)?b:Ie(e,p,I,b,F,(()=>{O=!0}));if(O)return b;const C=function(e,t,n){return t(n)}(0,h,w(function(e,t,r,a){const{modifiers:o,pluralRules:l,messageResolver:s}=e,c={locale:t,modifiers:o,pluralRules:l,messages:n=>{const a=s(r,n);if(u(a)){let r=!1;const o=Ie(e,n,t,a,n,(()=>{r=!0}));return r?de:o}return Te(a)?a:de}};e.processor&&(c.processor=e.processor);a.list&&(c.list=a.list);a.named&&(c.named=a.named);n(a.plural)&&(c.pluralIndex=a.plural);return c}(e,I,L,E)));return a?a(C):C}function Ie(e,n,r,a,o,l){const{messageCompiler:s,warnHtmlMessage:c}=e;if(Te(a)){const e=a;return e.locale=e.locale||r,e.key=e.key||n,e}const i=s(a,function(e,n,r,a,o,l){return{warnHtmlMessage:o,onError:e=>{throw l&&l(e),e},onCacheKey:e=>((e,n,r)=>t({l:e,k:n,s:r}))(n,r,e)}}(0,r,o,0,c,l));return i.locale=r,i.key=n,i.source=a,i}function Le(...e){const[t,r,o]=e,s={};if(!u(t)&&!n(t)&&!Te(t))throw Error(Ne.INVALID_ARGUMENT);const i=n(t)?String(t):(Te(t),t);return n(r)?s.plural=r:u(r)?s.default=r:E(r)&&!a(r)?s.named=r:c(r)&&(s.list=r),n(o)?s.plural=o:u(o)?s.default=o:E(o)&&l(s,o),[i,s]}function Fe(e,...t){const{datetimeFormats:n,unresolving:r,fallbackLocale:o,localeFallbacker:s}=e,{__datetimeFormatters:c}=e,[i,f,_,p]=Oe(...t);m(_.missingWarn);m(_.fallbackWarn);const g=!!_.part,N=u(_.locale)?_.locale:e.locale,A=s(e,o,N);if(!u(i)||""===i)return new Intl.DateTimeFormat(N).format(f);let d,T={},b=null;for(let t=0;t<A.length&&(d=A[t],T=n[d]||{},b=T[i],!E(b));t++)me(e,i,d,0,"datetime format");if(!E(b)||!u(d))return r?-1:i;let I=`${d}__${i}`;a(p)||(I=`${I}__${JSON.stringify(p)}`);let L=c.get(I);return L||(L=new Intl.DateTimeFormat(d,l({},b,p)),c.set(I,L)),g?L.formatToParts(f):L.format(f)}function Oe(...e){const[t,r,a,o]=e;let l,s={},c={};if(u(t)){const e=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!e)throw Error(Ne.INVALID_ISO_DATE_ARGUMENT);const n=e[3]?e[3].trim().startsWith("T")?`${e[1].trim()}${e[3].trim()}`:`${e[1].trim()}T${e[3].trim()}`:e[1].trim();l=new Date(n);try{l.toISOString()}catch(e){throw Error(Ne.INVALID_ISO_DATE_ARGUMENT)}}else if("[object Date]"===p(t)){if(isNaN(t.getTime()))throw Error(Ne.INVALID_DATE_ARGUMENT);l=t}else{if(!n(t))throw Error(Ne.INVALID_ARGUMENT);l=t}return u(r)?s.key=r:E(r)&&(s=r),u(a)?s.locale=a:E(a)&&(c=a),E(o)&&(c=o),[s.key||"",l,s,c]}function he(e,t,n){const r=e;for(const e in n){const n=`${t}__${e}`;r.__datetimeFormatters.has(n)&&r.__datetimeFormatters.delete(n)}}function Ce(e,...t){const{numberFormats:n,unresolving:r,fallbackLocale:o,localeFallbacker:s}=e,{__numberFormatters:c}=e,[i,f,_,p]=Re(...t);m(_.missingWarn);m(_.fallbackWarn);const g=!!_.part,N=u(_.locale)?_.locale:e.locale,A=s(e,o,N);if(!u(i)||""===i)return new Intl.NumberFormat(N).format(f);let d,T={},b=null;for(let t=0;t<A.length&&(d=A[t],T=n[d]||{},b=T[i],!E(b));t++)me(e,i,d,0,"number format");if(!E(b)||!u(d))return r?-1:i;let I=`${d}__${i}`;a(p)||(I=`${I}__${JSON.stringify(p)}`);let L=c.get(I);return L||(L=new Intl.NumberFormat(d,l({},b,p)),c.set(I,L)),g?L.formatToParts(f):L.format(f)}function Re(...e){const[t,r,a,o]=e;let l={},s={};if(!n(t))throw Error(Ne.INVALID_ARGUMENT);const c=t;return u(r)?l.key=r:E(r)&&(l=r),u(a)?l.locale=a:E(a)&&(s=a),E(o)&&(s=o),[l.key||"",c,l,s]}function ke(e,t,n){const r=e;for(const e in n){const n=`${t}__${e}`;r.__numberFormatters.has(n)&&r.__numberFormatters.delete(n)}}ne(O),re(j);export{g as CompileErrorCodes,Ne as CoreErrorCodes,K as CoreWarnCodes,J as DEFAULT_LOCALE,R as DEFAULT_MESSAGE_DATA_TYPE,Q as MISSING_RESOLVE_VALUE,z as NOT_REOSLVED,Y as VERSION,_e as clearCompileCache,he as clearDateTimeFormat,ke as clearNumberFormat,pe as compileToFunction,N as createCompileError,ce as createCoreContext,Ae as createCoreError,w as createMessageContext,Fe as datetime,j as fallbackWithLocaleChain,V as fallbackWithSimple,le as getAdditionalMeta,P as getDevToolsHook,G as getWarnMessage,me as handleMissing,v as initI18nDevTools,Te as isMessageFunction,ie as isTranslateFallbackWarn,ue as isTranslateMissingWarn,Ce as number,I as parse,Oe as parseDateTimeArgs,Re as parseNumberArgs,Le as parseTranslateArgs,re as registerLocaleFallbacker,te as registerMessageCompiler,ne as registerMessageResolver,O as resolveValue,F as resolveWithKeyValue,oe as setAdditionalMeta,U as setDevToolsHook,be as translate,W as translateDevTools,fe as updateFallbackLocale};
/*!
* core v9.2.0-alpha.9
* core v9.2.0-beta.1
* (c) 2021 kazuya kawaguchi

@@ -4,0 +4,0 @@ * Released under the MIT License.

/*!
* core v9.2.0-alpha.9
* core v9.2.0-beta.1
* (c) 2021 kazuya kawaguchi

@@ -70,6 +70,2 @@ * Released under the MIT License.

}
const hasOwnProperty = Object.prototype.hasOwnProperty;
function hasOwn(obj, key) {
return hasOwnProperty.call(obj, key);
}
/* eslint-enable */

@@ -452,45 +448,2 @@ /**

}
/**
* Transform flat json in obj to normal json in obj
*/
function handleFlatJson(obj) {
// check obj
if (!isObject(obj)) {
return obj;
}
for (const key in obj) {
// check key
if (!hasOwn(obj, key)) {
continue;
}
// handle for normal json
if (!key.includes("." /* DOT */)) {
// recursive process value if value is also a object
if (isObject(obj[key])) {
handleFlatJson(obj[key]);
}
}
// handle for flat json, transform to normal json
else {
// go to the last object
const subKeys = key.split("." /* DOT */);
const lastIndex = subKeys.length - 1;
let currentObj = obj;
for (let i = 0; i < lastIndex; i++) {
if (!(subKeys[i] in currentObj)) {
currentObj[subKeys[i]] = {};
}
currentObj = currentObj[subKeys[i]];
}
// update last object value, delete old property
currentObj[subKeys[lastIndex]] = obj[key];
delete obj[key];
// recursive process value if value is also a object
if (isObject(currentObj[subKeys[lastIndex]])) {
handleFlatJson(currentObj[subKeys[lastIndex]]);
}
}
}
return obj;
}

@@ -770,3 +723,3 @@ const DEFAULT_MODIFIER = (str) => str;

*/
const VERSION = '9.2.0-alpha.9';
const VERSION = '9.2.0-beta.1';
const NOT_REOSLVED = -1;

@@ -1649,3 +1602,2 @@ const DEFAULT_LOCALE = 'en-US';

exports.getWarnMessage = getWarnMessage;
exports.handleFlatJson = handleFlatJson;
exports.handleMissing = handleMissing;

@@ -1652,0 +1604,0 @@ exports.initI18nDevTools = initI18nDevTools;

/*!
* core v9.2.0-alpha.9
* core v9.2.0-beta.1
* (c) 2021 kazuya kawaguchi
* Released under the MIT License.
*/
var IntlifyCore=function(e){"use strict";const t=/\{([0-9a-zA-Z]+)\}/g;const n=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),r=e=>"number"==typeof e&&isFinite(e),a=e=>"[object RegExp]"===A(e),o=e=>d(e)&&0===Object.keys(e).length;function l(e,t){"undefined"!=typeof console&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}const s=Object.assign;function c(e){return e.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;")}const i=Object.prototype.hasOwnProperty;function u(e,t){return i.call(e,t)}const m=Array.isArray,f=e=>"function"==typeof e,_=e=>"string"==typeof e,p=e=>"boolean"==typeof e,E=e=>null!==e&&"object"==typeof e,g=Object.prototype.toString,A=e=>g.call(e),d=e=>"[object Object]"===A(e),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};function N(e,t,n={}){const{domain:r}=n,a=new SyntaxError(String(e));return a.code=e,t&&(a.location=t),a.domain=r,a}const b=[];b[0]={w:[0],i:[3,0],"[":[4],o:[7]},b[1]={w:[1],".":[2],"[":[4],o:[7]},b[2]={w:[2],i:[3,0],0:[3,0]},b[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},b[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},b[5]={"'":[4,0],o:8,l:[5,0]},b[6]={'"':[4,0],o:8,l:[6,0]};const C=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function L(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 F(e){const t=e.trim();return("0"!==e.charAt(0)||!isNaN(parseInt(e)))&&(C.test(t)?function(e){const t=e.charCodeAt(0);return t!==e.charCodeAt(e.length-1)||34!==t&&39!==t?e:e.slice(1,-1)}(t):"*"+t)}function O(e){const t=[];let n,r,a,o,l,s,c,i=-1,u=0,m=0;const f=[];function _(){const t=e[i+1];if(5===u&&"'"===t||6===u&&'"'===t)return i++,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=F(r),!1===r)return!1;f[1]()}};null!==u;)if(i++,n=e[i],"\\"!==n||!_()){if(o=L(n),c=b[u],l=c[o]||c.l||8,8===l)return;if(u=l[0],void 0!==l[1]&&(s=f[l[1]],s&&(a=n,!1===s())))return;if(7===u)return t}}const I=new Map;function h(e,t){return E(e)?e[t]:null}function D(e,t){if(!E(e))return null;let n=I.get(t);if(n||(n=O(t),n&&I.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 k=e=>e,M=e=>"",R="text",y=e=>0===e.length?"":e.join(""),w=e=>null==e?"":m(e)||d(e)&&e.toString===g?JSON.stringify(e,null,2):String(e);function S(e,t){return e=Math.abs(e),2===t?e?e>1?1:0:1:e?Math.min(e,2):0}function v(e={}){const t=e.locale,n=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),a=E(e.pluralRules)&&_(t)&&f(e.pluralRules[t])?e.pluralRules[t]:S,o=E(e.pluralRules)&&_(t)&&f(e.pluralRules[t])?S:void 0,l=e.list||[],s=e.named||{};r(e.pluralIndex)&&function(e,t){t.count||(t.count=e),t.n||(t.n=e)}(n,s);function c(t){const n=f(e.messages)?e.messages(t):!!E(e.messages)&&e.messages[t];return n||(e.parent?e.parent.message(t):M)}const i=d(e.processor)&&f(e.processor.normalize)?e.processor.normalize:y,u=d(e.processor)&&f(e.processor.interpolate)?e.processor.interpolate:w,m={list:e=>l[e],named:e=>s[e],plural:e=>e[a(n,e.length,o)],linked:(t,n)=>{const r=c(t)(m);return _(n)?(a=n,e.modifiers?e.modifiers[a]:k)(r):r;var a},message:c,type:d(e.processor)&&_(e.processor.type)?e.processor.type:R,interpolate:u,normalize:i};return m}const U="i18n:init";let P=null;const W=V("function:translate");function V(e){return t=>P&&P.emit(e,t)}const $={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},K={[$.NOT_FOUND_KEY]:"Not found '{key}' key in '{locale}' locale messages.",[$.FALLBACK_TO_TRANSLATE]:"Fall back to translate '{key}' key with '{target}' locale.",[$.CANNOT_FORMAT_NUMBER]:"Cannot format a number value due to not supported Intl.NumberFormat.",[$.FALLBACK_TO_NUMBER_FORMAT]:"Fall back to number format '{key}' key with '{target}' locale.",[$.CANNOT_FORMAT_DATE]:"Cannot format a date value due to not supported Intl.DateTimeFormat.",[$.FALLBACK_TO_DATE_FORMAT]:"Fall back to datetime format '{key}' key with '{target}' locale."};function G(e,t,n){return[...new Set([n,...m(t)?t:E(t)?Object.keys(t):_(t)?[t]:[n]])]}function j(e,t,n){const r=_(n)?n:Y,a=e;a.__localeChainCache||(a.__localeChainCache=new Map);let o=a.__localeChainCache.get(r);if(!o){o=[];let e=[n];for(;m(e);)e=B(o,e,t);const l=m(t)||!d(t)?t:t.default?t.default:null;e=_(l)?[l]:l,m(e)&&B(o,e,!1),a.__localeChainCache.set(r,o)}return o}function B(e,t,n){let r=!0;for(let a=0;a<t.length&&p(r);a++){_(t[a])&&(r=H(e,t[a],n))}return r}function H(e,t,n){let r;const a=t.split("-");do{r=x(e,a.join("-"),n),a.splice(-1,1)}while(a.length&&!0===r);return r}function x(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),(m(n)||d(n))&&n[a]&&(r=n[a])}return r}const X="9.2.0-alpha.9",Y="en-US";let z,J,Q;function q(e){J=e}function Z(e){Q=e}let ee=null;let te=0;function ne(e,t,n,r,a){const{missing:o}=e;if(null!==o){const r=o(e,n,t,a);return _(r)?r:t}return t}let re=T.__EXTEND_POINT__;const ae=()=>re++,oe={INVALID_ARGUMENT:re,INVALID_DATE_ARGUMENT:ae(),INVALID_ISO_DATE_ARGUMENT:ae(),__EXTEND_POINT__:ae()};const le=()=>"",se=e=>f(e);function ce(e,t,r,a,o,l){const{messageCompiler:s,warnHtmlMessage:c}=e;if(se(a)){const e=a;return e.locale=e.locale||r,e.key=e.key||t,e}const i=s(a,function(e,t,r,a,o,l){return{warnHtmlMessage:o,onError:e=>{throw l&&l(e),e},onCacheKey:e=>((e,t,r)=>n({l:e,k:t,s:r}))(t,r,e)}}(0,r,o,0,c,l));return i.locale=r,i.key=t,i.source=a,i}function ie(...e){const[t,n,a]=e,l={};if(!_(t)&&!r(t)&&!se(t))throw Error(oe.INVALID_ARGUMENT);const c=r(t)?String(t):(se(t),t);return r(n)?l.plural=n:_(n)?l.default=n:d(n)&&!o(n)?l.named=n:m(n)&&(l.list=n),r(a)?l.plural=a:_(a)?l.default=a:d(a)&&s(l,a),[c,l]}function ue(...e){const[t,n,a,o]=e;let l,s={},c={};if(_(t)){const e=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!e)throw Error(oe.INVALID_ISO_DATE_ARGUMENT);const n=e[3]?e[3].trim().startsWith("T")?`${e[1].trim()}${e[3].trim()}`:`${e[1].trim()}T${e[3].trim()}`:e[1].trim();l=new Date(n);try{l.toISOString()}catch(e){throw Error(oe.INVALID_ISO_DATE_ARGUMENT)}}else if("[object Date]"===A(t)){if(isNaN(t.getTime()))throw Error(oe.INVALID_DATE_ARGUMENT);l=t}else{if(!r(t))throw Error(oe.INVALID_ARGUMENT);l=t}return _(n)?s.key=n:d(n)&&(s=n),_(a)?s.locale=a:d(a)&&(c=a),d(o)&&(c=o),[s.key||"",l,s,c]}function me(...e){const[t,n,a,o]=e;let l={},s={};if(!r(t))throw Error(oe.INVALID_ARGUMENT);const c=t;return _(n)?l.key=n:d(n)&&(l=n),_(a)?l.locale=a:d(a)&&(s=a),d(o)&&(s=o),[l.key||"",c,l,s]}return q(D),Z(j),e.CompileErrorCodes=T,e.CoreErrorCodes=oe,e.CoreWarnCodes=$,e.DEFAULT_LOCALE=Y,e.DEFAULT_MESSAGE_DATA_TYPE=R,e.MISSING_RESOLVE_VALUE="",e.NOT_REOSLVED=-1,e.VERSION=X,e.clearCompileCache=function(){},e.clearDateTimeFormat=function(e,t,n){const r=e;for(const e in n){const n=`${t}__${e}`;r.__datetimeFormatters.has(n)&&r.__datetimeFormatters.delete(n)}},e.clearNumberFormat=function(e,t,n){const r=e;for(const e in n){const n=`${t}__${e}`;r.__numberFormatters.has(n)&&r.__numberFormatters.delete(n)}},e.compileToFunction=function(e,t={}){return()=>e},e.createCompileError=N,e.createCoreContext=function(e={}){const t=_(e.version)?e.version:X,n=_(e.locale)?e.locale:Y,r=m(e.fallbackLocale)||d(e.fallbackLocale)||_(e.fallbackLocale)||!1===e.fallbackLocale?e.fallbackLocale:n,o=d(e.messages)?e.messages:{[n]:{}},c=d(e.datetimeFormats)?e.datetimeFormats:{[n]:{}},i=d(e.numberFormats)?e.numberFormats:{[n]:{}},u=s({},e.modifiers||{},{upper:e=>_(e)?e.toUpperCase():e,lower:e=>_(e)?e.toLowerCase():e,capitalize:e=>_(e)?`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`:e}),g=e.pluralRules||{},A=f(e.missing)?e.missing:null,T=!p(e.missingWarn)&&!a(e.missingWarn)||e.missingWarn,N=!p(e.fallbackWarn)&&!a(e.fallbackWarn)||e.fallbackWarn,b=!!e.fallbackFormat,C=!!e.unresolving,L=f(e.postTranslation)?e.postTranslation:null,F=d(e.processor)?e.processor:null,O=!p(e.warnHtmlMessage)||e.warnHtmlMessage,I=!!e.escapeParameter,D=f(e.messageCompiler)?e.messageCompiler:z,k=f(e.messageResolver)?e.messageResolver:J||h,M=f(e.localeFallbacker)?e.localeFallbacker:Q||G,R=f(e.onWarn)?e.onWarn:l,y=e,w=E(y.__datetimeFormatters)?y.__datetimeFormatters:new Map,S=E(y.__numberFormatters)?y.__numberFormatters:new Map,v=E(y.__meta)?y.__meta:{};te++;const U={version:t,cid:te,locale:n,fallbackLocale:r,messages:o,modifiers:u,pluralRules:g,missing:A,missingWarn:T,fallbackWarn:N,fallbackFormat:b,unresolving:C,postTranslation:L,processor:F,warnHtmlMessage:O,escapeParameter:I,messageCompiler:D,messageResolver:k,localeFallbacker:M,onWarn:R,__meta:v};return U.datetimeFormats=c,U.numberFormats=i,U.__datetimeFormatters=w,U.__numberFormatters=S,U},e.createCoreError=function(e){return N(e,null,void 0)},e.createMessageContext=v,e.datetime=function(e,...t){const{datetimeFormats:n,unresolving:r,fallbackLocale:a,localeFallbacker:l}=e,{__datetimeFormatters:c}=e,[i,u,m,f]=ue(...t);p(m.missingWarn),p(m.fallbackWarn);const E=!!m.part,g=_(m.locale)?m.locale:e.locale,A=l(e,a,g);if(!_(i)||""===i)return new Intl.DateTimeFormat(g).format(u);let T,N={},b=null;for(let t=0;t<A.length&&(T=A[t],N=n[T]||{},b=N[i],!d(b));t++)ne(e,i,T,0,"datetime format");if(!d(b)||!_(T))return r?-1:i;let C=`${T}__${i}`;o(f)||(C=`${C}__${JSON.stringify(f)}`);let L=c.get(C);return L||(L=new Intl.DateTimeFormat(T,s({},b,f)),c.set(C,L)),E?L.formatToParts(u):L.format(u)},e.fallbackWithLocaleChain=j,e.fallbackWithSimple=G,e.getAdditionalMeta=()=>ee,e.getDevToolsHook=function(){return P},e.getWarnMessage=function(e,...n){return function(e,...n){return 1===n.length&&E(n[0])&&(n=n[0]),n&&n.hasOwnProperty||(n={}),e.replace(t,((e,t)=>n.hasOwnProperty(t)?n[t]:""))}(K[e],...n)},e.handleFlatJson=function e(t){if(!E(t))return t;for(const n in t)if(u(t,n))if(n.includes(".")){const r=n.split("."),a=r.length-1;let o=t;for(let e=0;e<a;e++)r[e]in o||(o[r[e]]={}),o=o[r[e]];o[r[a]]=t[n],delete t[n],E(o[r[a]])&&e(o[r[a]])}else E(t[n])&&e(t[n]);return t},e.handleMissing=ne,e.initI18nDevTools=function(e,t,n){P&&P.emit(U,{timestamp:Date.now(),i18n:e,version:t,meta:n})},e.isMessageFunction=se,e.isTranslateFallbackWarn=function(e,t){return e instanceof RegExp?e.test(t):e},e.isTranslateMissingWarn=function(e,t){return e instanceof RegExp?e.test(t):e},e.number=function(e,...t){const{numberFormats:n,unresolving:r,fallbackLocale:a,localeFallbacker:l}=e,{__numberFormatters:c}=e,[i,u,m,f]=me(...t);p(m.missingWarn),p(m.fallbackWarn);const E=!!m.part,g=_(m.locale)?m.locale:e.locale,A=l(e,a,g);if(!_(i)||""===i)return new Intl.NumberFormat(g).format(u);let T,N={},b=null;for(let t=0;t<A.length&&(T=A[t],N=n[T]||{},b=N[i],!d(b));t++)ne(e,i,T,0,"number format");if(!d(b)||!_(T))return r?-1:i;let C=`${T}__${i}`;o(f)||(C=`${C}__${JSON.stringify(f)}`);let L=c.get(C);return L||(L=new Intl.NumberFormat(T,s({},b,f)),c.set(C,L)),E?L.formatToParts(u):L.format(u)},e.parse=O,e.parseDateTimeArgs=ue,e.parseNumberArgs=me,e.parseTranslateArgs=ie,e.registerLocaleFallbacker=Z,e.registerMessageCompiler=function(e){z=e},e.registerMessageResolver=q,e.resolveValue=D,e.resolveWithKeyValue=h,e.setAdditionalMeta=e=>{ee=e},e.setDevToolsHook=function(e){P=e},e.translate=function(e,...t){const{fallbackFormat:n,postTranslation:a,unresolving:o,fallbackLocale:l,messages:s}=e,[i,u]=ie(...t),g=(p(u.missingWarn),p(u.fallbackWarn),p(u.escapeParameter)?u.escapeParameter:e.escapeParameter),A=!!u.resolvedMessage,d=_(u.default)||p(u.default)?p(u.default)?i:u.default:n?i:"",T=n||""!==d,N=_(u.locale)?u.locale:e.locale;g&&function(e){m(e.list)?e.list=e.list.map((e=>_(e)?c(e):e)):E(e.named)&&Object.keys(e.named).forEach((t=>{_(e.named[t])&&(e.named[t]=c(e.named[t]))}))}(u);let[b,C,L]=A?[i,N,s[N]||{}]:function(e,t,n,r,a,o){const{messages:l,messageResolver:s,localeFallbacker:c}=e,i=c(e,r,n);let u,m={},p=null;const E="translate";for(let n=0;n<i.length&&(u=i[n],m=l[u]||{},null===(p=s(m,t))&&(p=m[t]),!_(p)&&!f(p));n++){const n=ne(e,t,u,0,E);n!==t&&(p=n)}return[p,u,m]}(e,i,N,l),F=i;if(A||_(b)||se(b)||T&&(b=d,F=b),!(A||(_(b)||se(b))&&_(C)))return o?-1:i;let O=!1;const I=se(b)?b:ce(e,i,C,b,F,(()=>{O=!0}));if(O)return b;const h=function(e,t,n){return t(n)}(0,I,v(function(e,t,n,a){const{modifiers:o,pluralRules:l,messageResolver:s}=e,c={locale:t,modifiers:o,pluralRules:l,messages:r=>{const a=s(n,r);if(_(a)){let n=!1;const o=ce(e,r,t,a,r,(()=>{n=!0}));return n?le:o}return se(a)?a:le}};e.processor&&(c.processor=e.processor);a.list&&(c.list=a.list);a.named&&(c.named=a.named);r(a.plural)&&(c.pluralIndex=a.plural);return c}(e,C,L,u)));return a?a(h):h},e.translateDevTools=W,e.updateFallbackLocale=function(e,t,n){e.__localeChainCache=new Map,e.localeFallbacker(e,n,t)},Object.defineProperty(e,"__esModule",{value:!0}),e}({});
var IntlifyCore=function(e){"use strict";const t=/\{([0-9a-zA-Z]+)\}/g;const n=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),r=e=>"number"==typeof e&&isFinite(e),a=e=>"[object RegExp]"===p(e),o=e=>g(e)&&0===Object.keys(e).length;function l(e,t){"undefined"!=typeof console&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}const s=Object.assign;function c(e){return e.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;")}const i=Array.isArray,u=e=>"function"==typeof e,m=e=>"string"==typeof e,_=e=>"boolean"==typeof e,f=e=>null!==e&&"object"==typeof e,E=Object.prototype.toString,p=e=>E.call(e),g=e=>"[object Object]"===p(e),A={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 T(e,t,n={}){const{domain:r}=n,a=new SyntaxError(String(e));return a.code=e,t&&(a.location=t),a.domain=r,a}const d=[];d[0]={w:[0],i:[3,0],"[":[4],o:[7]},d[1]={w:[1],".":[2],"[":[4],o:[7]},d[2]={w:[2],i:[3,0],0:[3,0]},d[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},d[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},d[5]={"'":[4,0],o:8,l:[5,0]},d[6]={'"':[4,0],o:8,l:[6,0]};const N=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function b(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 C(e){const t=e.trim();return("0"!==e.charAt(0)||!isNaN(parseInt(e)))&&(N.test(t)?function(e){const t=e.charCodeAt(0);return t!==e.charCodeAt(e.length-1)||34!==t&&39!==t?e:e.slice(1,-1)}(t):"*"+t)}function L(e){const t=[];let n,r,a,o,l,s,c,i=-1,u=0,m=0;const _=[];function f(){const t=e[i+1];if(5===u&&"'"===t||6===u&&'"'===t)return i++,a="\\"+t,_[0](),!0}for(_[0]=()=>{void 0===r?r=a:r+=a},_[1]=()=>{void 0!==r&&(t.push(r),r=void 0)},_[2]=()=>{_[0](),m++},_[3]=()=>{if(m>0)m--,u=4,_[0]();else{if(m=0,void 0===r)return!1;if(r=C(r),!1===r)return!1;_[1]()}};null!==u;)if(i++,n=e[i],"\\"!==n||!f()){if(o=b(n),c=d[u],l=c[o]||c.l||8,8===l)return;if(u=l[0],void 0!==l[1]&&(s=_[l[1]],s&&(a=n,!1===s())))return;if(7===u)return t}}const F=new Map;function I(e,t){return f(e)?e[t]:null}function O(e,t){if(!f(e))return null;let n=F.get(t);if(n||(n=L(t),n&&F.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 D=e=>e,h=e=>"",k="text",M=e=>0===e.length?"":e.join(""),R=e=>null==e?"":i(e)||g(e)&&e.toString===E?JSON.stringify(e,null,2):String(e);function y(e,t){return e=Math.abs(e),2===t?e?e>1?1:0:1:e?Math.min(e,2):0}function w(e={}){const t=e.locale,n=function(e){const t=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),a=f(e.pluralRules)&&m(t)&&u(e.pluralRules[t])?e.pluralRules[t]:y,o=f(e.pluralRules)&&m(t)&&u(e.pluralRules[t])?y:void 0,l=e.list||[],s=e.named||{};r(e.pluralIndex)&&function(e,t){t.count||(t.count=e),t.n||(t.n=e)}(n,s);function c(t){const n=u(e.messages)?e.messages(t):!!f(e.messages)&&e.messages[t];return n||(e.parent?e.parent.message(t):h)}const i=g(e.processor)&&u(e.processor.normalize)?e.processor.normalize:M,_=g(e.processor)&&u(e.processor.interpolate)?e.processor.interpolate:R,E={list:e=>l[e],named:e=>s[e],plural:e=>e[a(n,e.length,o)],linked:(t,n)=>{const r=c(t)(E);return m(n)?(a=n,e.modifiers?e.modifiers[a]:D)(r):r;var a},message:c,type:g(e.processor)&&m(e.processor.type)?e.processor.type:k,interpolate:_,normalize:i};return E}const S="i18n:init";let v=null;const U=P("function:translate");function P(e){return t=>v&&v.emit(e,t)}const W={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},V={[W.NOT_FOUND_KEY]:"Not found '{key}' key in '{locale}' locale messages.",[W.FALLBACK_TO_TRANSLATE]:"Fall back to translate '{key}' key with '{target}' locale.",[W.CANNOT_FORMAT_NUMBER]:"Cannot format a number value due to not supported Intl.NumberFormat.",[W.FALLBACK_TO_NUMBER_FORMAT]:"Fall back to number format '{key}' key with '{target}' locale.",[W.CANNOT_FORMAT_DATE]:"Cannot format a date value due to not supported Intl.DateTimeFormat.",[W.FALLBACK_TO_DATE_FORMAT]:"Fall back to datetime format '{key}' key with '{target}' locale."};function $(e,t,n){return[...new Set([n,...i(t)?t:f(t)?Object.keys(t):m(t)?[t]:[n]])]}function K(e,t,n){const r=m(n)?n:x,a=e;a.__localeChainCache||(a.__localeChainCache=new Map);let o=a.__localeChainCache.get(r);if(!o){o=[];let e=[n];for(;i(e);)e=G(o,e,t);const l=i(t)||!g(t)?t:t.default?t.default:null;e=m(l)?[l]:l,i(e)&&G(o,e,!1),a.__localeChainCache.set(r,o)}return o}function G(e,t,n){let r=!0;for(let a=0;a<t.length&&_(r);a++){m(t[a])&&(r=j(e,t[a],n))}return r}function j(e,t,n){let r;const a=t.split("-");do{r=B(e,a.join("-"),n),a.splice(-1,1)}while(a.length&&!0===r);return r}function B(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),(i(n)||g(n))&&n[a]&&(r=n[a])}return r}const H="9.2.0-beta.1",x="en-US";let X,Y,z;function J(e){Y=e}function Q(e){z=e}let q=null;let Z=0;function ee(e,t,n,r,a){const{missing:o}=e;if(null!==o){const r=o(e,n,t,a);return m(r)?r:t}return t}let te=A.__EXTEND_POINT__;const ne=()=>te++,re={INVALID_ARGUMENT:te,INVALID_DATE_ARGUMENT:ne(),INVALID_ISO_DATE_ARGUMENT:ne(),__EXTEND_POINT__:ne()};const ae=()=>"",oe=e=>u(e);function le(e,t,r,a,o,l){const{messageCompiler:s,warnHtmlMessage:c}=e;if(oe(a)){const e=a;return e.locale=e.locale||r,e.key=e.key||t,e}const i=s(a,function(e,t,r,a,o,l){return{warnHtmlMessage:o,onError:e=>{throw l&&l(e),e},onCacheKey:e=>((e,t,r)=>n({l:e,k:t,s:r}))(t,r,e)}}(0,r,o,0,c,l));return i.locale=r,i.key=t,i.source=a,i}function se(...e){const[t,n,a]=e,l={};if(!m(t)&&!r(t)&&!oe(t))throw Error(re.INVALID_ARGUMENT);const c=r(t)?String(t):(oe(t),t);return r(n)?l.plural=n:m(n)?l.default=n:g(n)&&!o(n)?l.named=n:i(n)&&(l.list=n),r(a)?l.plural=a:m(a)?l.default=a:g(a)&&s(l,a),[c,l]}function ce(...e){const[t,n,a,o]=e;let l,s={},c={};if(m(t)){const e=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!e)throw Error(re.INVALID_ISO_DATE_ARGUMENT);const n=e[3]?e[3].trim().startsWith("T")?`${e[1].trim()}${e[3].trim()}`:`${e[1].trim()}T${e[3].trim()}`:e[1].trim();l=new Date(n);try{l.toISOString()}catch(e){throw Error(re.INVALID_ISO_DATE_ARGUMENT)}}else if("[object Date]"===p(t)){if(isNaN(t.getTime()))throw Error(re.INVALID_DATE_ARGUMENT);l=t}else{if(!r(t))throw Error(re.INVALID_ARGUMENT);l=t}return m(n)?s.key=n:g(n)&&(s=n),m(a)?s.locale=a:g(a)&&(c=a),g(o)&&(c=o),[s.key||"",l,s,c]}function ie(...e){const[t,n,a,o]=e;let l={},s={};if(!r(t))throw Error(re.INVALID_ARGUMENT);const c=t;return m(n)?l.key=n:g(n)&&(l=n),m(a)?l.locale=a:g(a)&&(s=a),g(o)&&(s=o),[l.key||"",c,l,s]}return J(O),Q(K),e.CompileErrorCodes=A,e.CoreErrorCodes=re,e.CoreWarnCodes=W,e.DEFAULT_LOCALE=x,e.DEFAULT_MESSAGE_DATA_TYPE=k,e.MISSING_RESOLVE_VALUE="",e.NOT_REOSLVED=-1,e.VERSION=H,e.clearCompileCache=function(){},e.clearDateTimeFormat=function(e,t,n){const r=e;for(const e in n){const n=`${t}__${e}`;r.__datetimeFormatters.has(n)&&r.__datetimeFormatters.delete(n)}},e.clearNumberFormat=function(e,t,n){const r=e;for(const e in n){const n=`${t}__${e}`;r.__numberFormatters.has(n)&&r.__numberFormatters.delete(n)}},e.compileToFunction=function(e,t={}){return()=>e},e.createCompileError=T,e.createCoreContext=function(e={}){const t=m(e.version)?e.version:H,n=m(e.locale)?e.locale:x,r=i(e.fallbackLocale)||g(e.fallbackLocale)||m(e.fallbackLocale)||!1===e.fallbackLocale?e.fallbackLocale:n,o=g(e.messages)?e.messages:{[n]:{}},c=g(e.datetimeFormats)?e.datetimeFormats:{[n]:{}},E=g(e.numberFormats)?e.numberFormats:{[n]:{}},p=s({},e.modifiers||{},{upper:e=>m(e)?e.toUpperCase():e,lower:e=>m(e)?e.toLowerCase():e,capitalize:e=>m(e)?`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`:e}),A=e.pluralRules||{},T=u(e.missing)?e.missing:null,d=!_(e.missingWarn)&&!a(e.missingWarn)||e.missingWarn,N=!_(e.fallbackWarn)&&!a(e.fallbackWarn)||e.fallbackWarn,b=!!e.fallbackFormat,C=!!e.unresolving,L=u(e.postTranslation)?e.postTranslation:null,F=g(e.processor)?e.processor:null,O=!_(e.warnHtmlMessage)||e.warnHtmlMessage,D=!!e.escapeParameter,h=u(e.messageCompiler)?e.messageCompiler:X,k=u(e.messageResolver)?e.messageResolver:Y||I,M=u(e.localeFallbacker)?e.localeFallbacker:z||$,R=u(e.onWarn)?e.onWarn:l,y=e,w=f(y.__datetimeFormatters)?y.__datetimeFormatters:new Map,S=f(y.__numberFormatters)?y.__numberFormatters:new Map,v=f(y.__meta)?y.__meta:{};Z++;const U={version:t,cid:Z,locale:n,fallbackLocale:r,messages:o,modifiers:p,pluralRules:A,missing:T,missingWarn:d,fallbackWarn:N,fallbackFormat:b,unresolving:C,postTranslation:L,processor:F,warnHtmlMessage:O,escapeParameter:D,messageCompiler:h,messageResolver:k,localeFallbacker:M,onWarn:R,__meta:v};return U.datetimeFormats=c,U.numberFormats=E,U.__datetimeFormatters=w,U.__numberFormatters=S,U},e.createCoreError=function(e){return T(e,null,void 0)},e.createMessageContext=w,e.datetime=function(e,...t){const{datetimeFormats:n,unresolving:r,fallbackLocale:a,localeFallbacker:l}=e,{__datetimeFormatters:c}=e,[i,u,f,E]=ce(...t);_(f.missingWarn),_(f.fallbackWarn);const p=!!f.part,A=m(f.locale)?f.locale:e.locale,T=l(e,a,A);if(!m(i)||""===i)return new Intl.DateTimeFormat(A).format(u);let d,N={},b=null;for(let t=0;t<T.length&&(d=T[t],N=n[d]||{},b=N[i],!g(b));t++)ee(e,i,d,0,"datetime format");if(!g(b)||!m(d))return r?-1:i;let C=`${d}__${i}`;o(E)||(C=`${C}__${JSON.stringify(E)}`);let L=c.get(C);return L||(L=new Intl.DateTimeFormat(d,s({},b,E)),c.set(C,L)),p?L.formatToParts(u):L.format(u)},e.fallbackWithLocaleChain=K,e.fallbackWithSimple=$,e.getAdditionalMeta=()=>q,e.getDevToolsHook=function(){return v},e.getWarnMessage=function(e,...n){return function(e,...n){return 1===n.length&&f(n[0])&&(n=n[0]),n&&n.hasOwnProperty||(n={}),e.replace(t,((e,t)=>n.hasOwnProperty(t)?n[t]:""))}(V[e],...n)},e.handleMissing=ee,e.initI18nDevTools=function(e,t,n){v&&v.emit(S,{timestamp:Date.now(),i18n:e,version:t,meta:n})},e.isMessageFunction=oe,e.isTranslateFallbackWarn=function(e,t){return e instanceof RegExp?e.test(t):e},e.isTranslateMissingWarn=function(e,t){return e instanceof RegExp?e.test(t):e},e.number=function(e,...t){const{numberFormats:n,unresolving:r,fallbackLocale:a,localeFallbacker:l}=e,{__numberFormatters:c}=e,[i,u,f,E]=ie(...t);_(f.missingWarn),_(f.fallbackWarn);const p=!!f.part,A=m(f.locale)?f.locale:e.locale,T=l(e,a,A);if(!m(i)||""===i)return new Intl.NumberFormat(A).format(u);let d,N={},b=null;for(let t=0;t<T.length&&(d=T[t],N=n[d]||{},b=N[i],!g(b));t++)ee(e,i,d,0,"number format");if(!g(b)||!m(d))return r?-1:i;let C=`${d}__${i}`;o(E)||(C=`${C}__${JSON.stringify(E)}`);let L=c.get(C);return L||(L=new Intl.NumberFormat(d,s({},b,E)),c.set(C,L)),p?L.formatToParts(u):L.format(u)},e.parse=L,e.parseDateTimeArgs=ce,e.parseNumberArgs=ie,e.parseTranslateArgs=se,e.registerLocaleFallbacker=Q,e.registerMessageCompiler=function(e){X=e},e.registerMessageResolver=J,e.resolveValue=O,e.resolveWithKeyValue=I,e.setAdditionalMeta=e=>{q=e},e.setDevToolsHook=function(e){v=e},e.translate=function(e,...t){const{fallbackFormat:n,postTranslation:a,unresolving:o,fallbackLocale:l,messages:s}=e,[E,p]=se(...t),g=(_(p.missingWarn),_(p.fallbackWarn),_(p.escapeParameter)?p.escapeParameter:e.escapeParameter),A=!!p.resolvedMessage,T=m(p.default)||_(p.default)?_(p.default)?E:p.default:n?E:"",d=n||""!==T,N=m(p.locale)?p.locale:e.locale;g&&function(e){i(e.list)?e.list=e.list.map((e=>m(e)?c(e):e)):f(e.named)&&Object.keys(e.named).forEach((t=>{m(e.named[t])&&(e.named[t]=c(e.named[t]))}))}(p);let[b,C,L]=A?[E,N,s[N]||{}]:function(e,t,n,r,a,o){const{messages:l,messageResolver:s,localeFallbacker:c}=e,i=c(e,r,n);let _,f={},E=null;const p="translate";for(let n=0;n<i.length&&(_=i[n],f=l[_]||{},null===(E=s(f,t))&&(E=f[t]),!m(E)&&!u(E));n++){const n=ee(e,t,_,0,p);n!==t&&(E=n)}return[E,_,f]}(e,E,N,l),F=E;if(A||m(b)||oe(b)||d&&(b=T,F=b),!(A||(m(b)||oe(b))&&m(C)))return o?-1:E;let I=!1;const O=oe(b)?b:le(e,E,C,b,F,(()=>{I=!0}));if(I)return b;const D=function(e,t,n){return t(n)}(0,O,w(function(e,t,n,a){const{modifiers:o,pluralRules:l,messageResolver:s}=e,c={locale:t,modifiers:o,pluralRules:l,messages:r=>{const a=s(n,r);if(m(a)){let n=!1;const o=le(e,r,t,a,r,(()=>{n=!0}));return n?ae:o}return oe(a)?a:ae}};e.processor&&(c.processor=e.processor);a.list&&(c.list=a.list);a.named&&(c.named=a.named);r(a.plural)&&(c.pluralIndex=a.plural);return c}(e,C,L,p)));return a?a(D):D},e.translateDevTools=U,e.updateFallbackLocale=function(e,t,n){e.__localeChainCache=new Map,e.localeFallbacker(e,n,t)},Object.defineProperty(e,"__esModule",{value:!0}),e}({});
{
"name": "@intlify/core",
"version": "9.2.0-alpha.9",
"version": "9.2.0-beta.1",
"description": "@intlify/core",

@@ -36,3 +36,3 @@ "keywords": [

"dependencies": {
"@intlify/core-base": "9.2.0-alpha.9"
"@intlify/core-base": "9.2.0-beta.1"
},

@@ -39,0 +39,0 @@ "engines": {

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc