Socket
Socket
Sign inDemoInstall

@intlify/message-compiler

Package Overview
Dependencies
Maintainers
2
Versions
162
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@intlify/message-compiler - npm Package Compare versions

Comparing version 9.2.0-beta.3 to 9.2.0-beta.4

2

dist/message-compiler.cjs.js
/*!
* message-compiler v9.2.0-beta.3
* message-compiler v9.2.0-beta.4
* (c) 2021 kazuya kawaguchi

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

/*!
* message-compiler v9.2.0-beta.3
* message-compiler v9.2.0-beta.4
* (c) 2021 kazuya kawaguchi

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

/*!
* message-compiler v9.2.0-beta.3
* message-compiler v9.2.0-beta.4
* (c) 2021 kazuya kawaguchi
* Released under the MIT License.
*/
const e=Object.assign,n=e=>"string"==typeof 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},r={[t.EXPECTED_TOKEN]:"Expected token: '{0}'",[t.INVALID_TOKEN_IN_PLACEHOLDER]:"Invalid token in placeholder: '{0}'",[t.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER]:"Unterminated single quote in placeholder",[t.UNKNOWN_ESCAPE_SEQUENCE]:"Unknown escape sequence: \\{0}",[t.INVALID_UNICODE_ESCAPE_SEQUENCE]:"Invalid unicode escape sequence: {0}",[t.UNBALANCED_CLOSING_BRACE]:"Unbalanced closing brace",[t.UNTERMINATED_CLOSING_BRACE]:"Unterminated closing brace",[t.EMPTY_PLACEHOLDER]:"Empty placeholder",[t.NOT_ALLOW_NEST_PLACEHOLDER]:"Not allowed nest placeholder",[t.INVALID_LINKED_FORMAT]:"Invalid linked format",[t.MUST_HAVE_MESSAGES_IN_PLURAL]:"Plural must have messages",[t.UNEXPECTED_EMPTY_LINKED_MODIFIER]:"Unexpected empty linked modifier",[t.UNEXPECTED_EMPTY_LINKED_KEY]:"Unexpected empty linked key",[t.UNEXPECTED_LEXICAL_ANALYSIS]:"Unexpected lexical analysis in token: '{0}'"};function o(e,n,t={}){const{domain:r}=t,o=new SyntaxError(String(e));return o.code=e,n&&(o.location=n),o.domain=r,o}function i(e){throw e}const s={start:{line:1,column:1,offset:0},end:{line:1,column:1,offset:0}};function u(e,n,t){return{line:e,column:n,offset:t}}function a(e,n,t){const r={start:e,end:n};return null!=t&&(r.source=t),r}const c=String.fromCharCode(8232),l=String.fromCharCode(8233);function p(e){const n=e;let t=0,r=1,o=1,i=0;const s=e=>"\r"===n[e]&&"\n"===n[e+1],u=e=>n[e]===l,a=e=>n[e]===c,p=e=>s(e)||(e=>"\n"===n[e])(e)||u(e)||a(e),f=e=>s(e)||u(e)||a(e)?"\n":n[e];function h(){return i=0,p(t)&&(r++,o=0),s(t)&&t++,t++,o++,n[t]}return{index:()=>t,line:()=>r,column:()=>o,peekOffset:()=>i,charAt:f,currentChar:()=>f(t),currentPeek:()=>f(t+i),next:h,peek:function(){return s(t+i)&&i++,i++,n[t+i]},reset:function(){t=0,r=1,o=1,i=0},resetPeek:function(e=0){i=e},skipToPeek:function(){const e=t+i;for(;e!==t;)h();i=0}}}const f=void 0;function h(e,n={}){const r=!1!==n.location,i=p(e),s=()=>i.index(),c=()=>u(i.line(),i.column(),i.index()),l=c(),h=s(),g={currentType:14,offset:h,startLoc:l,endLoc:l,lastType:14,lastOffset:h,lastStartLoc:l,lastEndLoc:l,braceNest:0,inLinked:!1,text:""},d=()=>g,{onError:m}=n;function _(e,n,t,...r){const i=d();if(n.column+=t,n.offset+=t,m){const t=o(e,a(i.startLoc,n),{domain:"tokenizer",args:r});m(t)}}function E(e,n,t){e.endLoc=c(),e.currentType=n;const o={type:n};return r&&(o.loc=a(e.startLoc,e.endLoc)),null!=t&&(o.value=t),o}const L=e=>E(e,14);function C(e,n){return e.currentChar()===n?(e.next(),n):(_(t.EXPECTED_TOKEN,c(),0,n),"")}function A(e){let n="";for(;" "===e.currentPeek()||"\n"===e.currentPeek();)n+=e.currentPeek(),e.peek();return n}function y(e){const n=A(e);return e.skipToPeek(),n}function S(e){if(e===f)return!1;const n=e.charCodeAt(0);return n>=97&&n<=122||n>=65&&n<=90||95===n}function v(e,n){const{currentType:t}=n;if(2!==t)return!1;A(e);const r=function(e){if(e===f)return!1;const n=e.charCodeAt(0);return n>=48&&n<=57}("-"===e.currentPeek()?e.peek():e.currentPeek());return e.resetPeek(),r}function N(e){A(e);const n="|"===e.currentPeek();return e.resetPeek(),n}function O(e,n=!0){const t=(n=!1,r="",o=!1)=>{const i=e.currentPeek();return"{"===i?"%"!==r&&n:"@"!==i&&i?"%"===i?(e.peek(),t(n,"%",!0)):"|"===i?!("%"!==r&&!o)||!(" "===r||"\n"===r):" "===i?(e.peek(),t(!0," ",o)):"\n"!==i||(e.peek(),t(!0,"\n",o)):"%"===r||n},r=t();return n&&e.resetPeek(),r}function T(e,n){const t=e.currentChar();return t===f?f:n(t)?(e.next(),t):null}function I(e){return T(e,(e=>{const n=e.charCodeAt(0);return n>=97&&n<=122||n>=65&&n<=90||n>=48&&n<=57||95===n||36===n}))}function P(e){return T(e,(e=>{const n=e.charCodeAt(0);return n>=48&&n<=57}))}function M(e){return T(e,(e=>{const n=e.charCodeAt(0);return n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102}))}function k(e){let n="",t="";for(;n=P(e);)t+=n;return t}function R(e){const n=e.currentChar();switch(n){case"\\":case"'":return e.next(),`\\${n}`;case"u":return b(e,n,4);case"U":return b(e,n,6);default:return _(t.UNKNOWN_ESCAPE_SEQUENCE,c(),0,n),""}}function b(e,n,r){C(e,n);let o="";for(let i=0;i<r;i++){const r=M(e);if(!r){_(t.INVALID_UNICODE_ESCAPE_SEQUENCE,c(),0,`\\${n}${o}${e.currentChar()}`);break}o+=r}return`\\${n}${o}`}function w(e){y(e);const n=C(e,"|");return y(e),n}function D(e,n){let r=null;switch(e.currentChar()){case"{":return n.braceNest>=1&&_(t.NOT_ALLOW_NEST_PLACEHOLDER,c(),0),e.next(),r=E(n,2,"{"),y(e),n.braceNest++,r;case"}":return n.braceNest>0&&2===n.currentType&&_(t.EMPTY_PLACEHOLDER,c(),0),e.next(),r=E(n,3,"}"),n.braceNest--,n.braceNest>0&&y(e),n.inLinked&&0===n.braceNest&&(n.inLinked=!1),r;case"@":return n.braceNest>0&&_(t.UNTERMINATED_CLOSING_BRACE,c(),0),r=U(e,n)||L(n),n.braceNest=0,r;default:let o=!0,i=!0,s=!0;if(N(e))return n.braceNest>0&&_(t.UNTERMINATED_CLOSING_BRACE,c(),0),r=E(n,1,w(e)),n.braceNest=0,n.inLinked=!1,r;if(n.braceNest>0&&(5===n.currentType||6===n.currentType||7===n.currentType))return _(t.UNTERMINATED_CLOSING_BRACE,c(),0),n.braceNest=0,x(e,n);if(o=function(e,n){const{currentType:t}=n;if(2!==t)return!1;A(e);const r=S(e.currentPeek());return e.resetPeek(),r}(e,n))return r=E(n,5,function(e){y(e);let n="",r="";for(;n=I(e);)r+=n;return e.currentChar()===f&&_(t.UNTERMINATED_CLOSING_BRACE,c(),0),r}(e)),y(e),r;if(i=v(e,n))return r=E(n,6,function(e){y(e);let n="";return"-"===e.currentChar()?(e.next(),n+=`-${k(e)}`):n+=k(e),e.currentChar()===f&&_(t.UNTERMINATED_CLOSING_BRACE,c(),0),n}(e)),y(e),r;if(s=function(e,n){const{currentType:t}=n;if(2!==t)return!1;A(e);const r="'"===e.currentPeek();return e.resetPeek(),r}(e,n))return r=E(n,7,function(e){y(e),C(e,"'");let n="",r="";const o=e=>"'"!==e&&"\n"!==e;for(;n=T(e,o);)r+="\\"===n?R(e):n;const i=e.currentChar();return"\n"===i||i===f?(_(t.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,c(),0),"\n"===i&&(e.next(),C(e,"'")),r):(C(e,"'"),r)}(e)),y(e),r;if(!o&&!i&&!s)return r=E(n,13,function(e){y(e);let n="",t="";const r=e=>"{"!==e&&"}"!==e&&" "!==e&&"\n"!==e;for(;n=T(e,r);)t+=n;return t}(e)),_(t.INVALID_TOKEN_IN_PLACEHOLDER,c(),0,r.value),y(e),r}return r}function U(e,n){const{currentType:r}=n;let o=null;const i=e.currentChar();switch(8!==r&&9!==r&&12!==r&&10!==r||"\n"!==i&&" "!==i||_(t.INVALID_LINKED_FORMAT,c(),0),i){case"@":return e.next(),o=E(n,8,"@"),n.inLinked=!0,o;case".":return y(e),e.next(),E(n,9,".");case":":return y(e),e.next(),E(n,10,":");default:return N(e)?(o=E(n,1,w(e)),n.braceNest=0,n.inLinked=!1,o):function(e,n){const{currentType:t}=n;if(8!==t)return!1;A(e);const r="."===e.currentPeek();return e.resetPeek(),r}(e,n)||function(e,n){const{currentType:t}=n;if(8!==t&&12!==t)return!1;A(e);const r=":"===e.currentPeek();return e.resetPeek(),r}(e,n)?(y(e),U(e,n)):function(e,n){const{currentType:t}=n;if(9!==t)return!1;A(e);const r=S(e.currentPeek());return e.resetPeek(),r}(e,n)?(y(e),E(n,12,function(e){let n="",t="";for(;n=I(e);)t+=n;return t}(e))):function(e,n){const{currentType:t}=n;if(10!==t)return!1;const r=()=>{const n=e.currentPeek();return"{"===n?S(e.peek()):!("@"===n||"%"===n||"|"===n||":"===n||"."===n||" "===n||!n)&&("\n"===n?(e.peek(),r()):S(n))},o=r();return e.resetPeek(),o}(e,n)?(y(e),"{"===i?D(e,n)||o:E(n,11,function(e){const n=(t=!1,r)=>{const o=e.currentChar();return"{"!==o&&"%"!==o&&"@"!==o&&"|"!==o&&o?" "===o?r:"\n"===o?(r+=o,e.next(),n(t,r)):(r+=o,e.next(),n(!0,r)):r};return n(!1,"")}(e))):(8===r&&_(t.INVALID_LINKED_FORMAT,c(),0),n.braceNest=0,n.inLinked=!1,x(e,n))}}function x(e,n){let r={type:14};if(n.braceNest>0)return D(e,n)||L(n);if(n.inLinked)return U(e,n)||L(n);const o=e.currentChar();switch(o){case"{":return D(e,n)||L(n);case"}":return _(t.UNBALANCED_CLOSING_BRACE,c(),0),e.next(),E(n,3,"}");case"@":return U(e,n)||L(n);default:if(N(e))return r=E(n,1,w(e)),n.braceNest=0,n.inLinked=!1,r;if(O(e))return E(n,0,function(e){const n=t=>{const r=e.currentChar();return"{"!==r&&"}"!==r&&"@"!==r&&r?"%"===r?O(e)?(t+=r,e.next(),n(t)):t:"|"===r?t:" "===r||"\n"===r?O(e)?(t+=r,e.next(),n(t)):N(e)?t:(t+=r,e.next(),n(t)):(t+=r,e.next(),n(t)):t};return n("")}(e));if("%"===o)return e.next(),E(n,4,"%")}return r}return{nextToken:function(){const{currentType:e,offset:n,startLoc:t,endLoc:r}=g;return g.lastType=e,g.lastOffset=n,g.lastStartLoc=t,g.lastEndLoc=r,g.offset=s(),g.startLoc=c(),i.currentChar()===f?E(g,14):x(i,g)},currentOffset:s,currentPosition:c,context:d}}const g="parser",d=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function m(e,n,t){switch(e){case"\\\\":return"\\";case"\\'":return"'";default:{const e=parseInt(n||t,16);return e<=55295||e>=57344?String.fromCodePoint(e):"�"}}}function _(n={}){const r=!1!==n.location,{onError:i}=n;function s(e,n,t,r,...s){const u=e.currentPosition();if(u.offset+=r,u.column+=r,i){const e=o(n,a(t,u),{domain:"parser",args:s});i(e)}}function u(e,n,t){const o={type:e,start:n,end:n};return r&&(o.loc={start:t,end:t}),o}function c(e,n,t,o){e.end=n,o&&(e.type=o),r&&e.loc&&(e.loc.end=t)}function l(e,n){const t=e.context(),r=u(3,t.offset,t.startLoc);return r.value=n,c(r,e.currentOffset(),e.currentPosition()),r}function p(e,n){const t=e.context(),{lastOffset:r,lastStartLoc:o}=t,i=u(5,r,o);return i.index=parseInt(n,10),e.nextToken(),c(i,e.currentOffset(),e.currentPosition()),i}function f(e,n){const t=e.context(),{lastOffset:r,lastStartLoc:o}=t,i=u(4,r,o);return i.key=n,e.nextToken(),c(i,e.currentOffset(),e.currentPosition()),i}function g(e,n){const t=e.context(),{lastOffset:r,lastStartLoc:o}=t,i=u(9,r,o);return i.value=n.replace(d,m),e.nextToken(),c(i,e.currentOffset(),e.currentPosition()),i}function _(e){const n=e.context(),r=u(6,n.offset,n.startLoc);let o=e.nextToken();if(9===o.type){const n=function(e){const n=e.nextToken(),r=e.context(),{lastOffset:o,lastStartLoc:i}=r,a=u(8,o,i);return 12!==n.type?(s(e,t.UNEXPECTED_EMPTY_LINKED_MODIFIER,r.lastStartLoc,0),a.value="",c(a,o,i),{nextConsumeToken:n,node:a}):(null==n.value&&s(e,t.UNEXPECTED_LEXICAL_ANALYSIS,r.lastStartLoc,0,E(n)),a.value=n.value||"",c(a,e.currentOffset(),e.currentPosition()),{node:a})}(e);r.modifier=n.node,o=n.nextConsumeToken||e.nextToken()}switch(10!==o.type&&s(e,t.UNEXPECTED_LEXICAL_ANALYSIS,n.lastStartLoc,0,E(o)),o=e.nextToken(),2===o.type&&(o=e.nextToken()),o.type){case 11:null==o.value&&s(e,t.UNEXPECTED_LEXICAL_ANALYSIS,n.lastStartLoc,0,E(o)),r.key=function(e,n){const t=e.context(),r=u(7,t.offset,t.startLoc);return r.value=n,c(r,e.currentOffset(),e.currentPosition()),r}(e,o.value||"");break;case 5:null==o.value&&s(e,t.UNEXPECTED_LEXICAL_ANALYSIS,n.lastStartLoc,0,E(o)),r.key=f(e,o.value||"");break;case 6:null==o.value&&s(e,t.UNEXPECTED_LEXICAL_ANALYSIS,n.lastStartLoc,0,E(o)),r.key=p(e,o.value||"");break;case 7:null==o.value&&s(e,t.UNEXPECTED_LEXICAL_ANALYSIS,n.lastStartLoc,0,E(o)),r.key=g(e,o.value||"");break;default:s(e,t.UNEXPECTED_EMPTY_LINKED_KEY,n.lastStartLoc,0);const i=e.context(),a=u(7,i.offset,i.startLoc);return a.value="",c(a,i.offset,i.startLoc),r.key=a,c(r,i.offset,i.startLoc),{nextConsumeToken:o,node:r}}return c(r,e.currentOffset(),e.currentPosition()),{node:r}}function L(e){const n=e.context(),r=u(2,1===n.currentType?e.currentOffset():n.offset,1===n.currentType?n.endLoc:n.startLoc);r.items=[];let o=null;do{const i=o||e.nextToken();switch(o=null,i.type){case 0:null==i.value&&s(e,t.UNEXPECTED_LEXICAL_ANALYSIS,n.lastStartLoc,0,E(i)),r.items.push(l(e,i.value||""));break;case 6:null==i.value&&s(e,t.UNEXPECTED_LEXICAL_ANALYSIS,n.lastStartLoc,0,E(i)),r.items.push(p(e,i.value||""));break;case 5:null==i.value&&s(e,t.UNEXPECTED_LEXICAL_ANALYSIS,n.lastStartLoc,0,E(i)),r.items.push(f(e,i.value||""));break;case 7:null==i.value&&s(e,t.UNEXPECTED_LEXICAL_ANALYSIS,n.lastStartLoc,0,E(i)),r.items.push(g(e,i.value||""));break;case 8:const u=_(e);r.items.push(u.node),o=u.nextConsumeToken||null}}while(14!==n.currentType&&1!==n.currentType);return c(r,1===n.currentType?n.lastOffset:e.currentOffset(),1===n.currentType?n.lastEndLoc:e.currentPosition()),r}function C(e){const n=e.context(),{offset:r,startLoc:o}=n,i=L(e);return 14===n.currentType?i:function(e,n,r,o){const i=e.context();let a=0===o.items.length;const l=u(1,n,r);l.cases=[],l.cases.push(o);do{const n=L(e);a||(a=0===n.items.length),l.cases.push(n)}while(14!==i.currentType);return a&&s(e,t.MUST_HAVE_MESSAGES_IN_PLURAL,r,0),c(l,e.currentOffset(),e.currentPosition()),l}(e,r,o,i)}return{parse:function(o){const i=h(o,e({},n)),a=i.context(),l=u(0,a.offset,a.startLoc);return r&&l.loc&&(l.loc.source=o),l.body=C(i),14!==a.currentType&&s(i,t.UNEXPECTED_LEXICAL_ANALYSIS,a.lastStartLoc,0,o[a.offset]||""),c(l,i.currentOffset(),i.currentPosition()),l}}}function E(e){if(14===e.type)return"EOF";const n=(e.value||"").replace(/\r?\n/gu,"\\n");return n.length>10?n.slice(0,9)+"…":n}function L(e,n){for(let t=0;t<e.length;t++)C(e[t],n)}function C(e,n){switch(e.type){case 1:L(e.cases,n),n.helper("plural");break;case 2:L(e.items,n);break;case 6:C(e.key,n),n.helper("linked");break;case 5:n.helper("interpolate"),n.helper("list");break;case 4:n.helper("interpolate"),n.helper("named")}}function A(e,n={}){const t=function(e,n={}){const t={ast:e,helpers:new Set};return{context:()=>t,helper:e=>(t.helpers.add(e),e)}}(e);t.helper("normalize"),e.body&&C(e.body,t);const r=t.context();e.helpers=Array.from(r.helpers)}var y={},S={},v={},N={},O="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");N.encode=function(e){if(0<=e&&e<O.length)return O[e];throw new TypeError("Must be between 0 and 63: "+e)},N.decode=function(e){return 65<=e&&e<=90?e-65:97<=e&&e<=122?e-97+26:48<=e&&e<=57?e-48+52:43==e?62:47==e?63:-1};var T=N;v.encode=function(e){var n,t="",r=function(e){return e<0?1+(-e<<1):0+(e<<1)}(e);do{n=31&r,(r>>>=5)>0&&(n|=32),t+=T.encode(n)}while(r>0);return t},v.decode=function(e,n,t){var r,o,i,s,u=e.length,a=0,c=0;do{if(n>=u)throw new Error("Expected more digits in base 64 VLQ value.");if(-1===(o=T.decode(e.charCodeAt(n++))))throw new Error("Invalid base64 digit: "+e.charAt(n-1));r=!!(32&o),a+=(o&=31)<<c,c+=5}while(r);t.value=(s=(i=a)>>1,1==(1&i)?-s:s),t.rest=n};var I={};!function(e){e.getArg=function(e,n,t){if(n in e)return e[n];if(3===arguments.length)return t;throw new Error('"'+n+'" is a required argument.')};var n=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,t=/^data:.+\,.+$/;function r(e){var t=e.match(n);return t?{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}:null}function o(e){var n="";return e.scheme&&(n+=e.scheme+":"),n+="//",e.auth&&(n+=e.auth+"@"),e.host&&(n+=e.host),e.port&&(n+=":"+e.port),e.path&&(n+=e.path),n}function i(n){var t=n,i=r(n);if(i){if(!i.path)return n;t=i.path}for(var s,u=e.isAbsolute(t),a=t.split(/\/+/),c=0,l=a.length-1;l>=0;l--)"."===(s=a[l])?a.splice(l,1):".."===s?c++:c>0&&(""===s?(a.splice(l+1,c),c=0):(a.splice(l,2),c--));return""===(t=a.join("/"))&&(t=u?"/":"."),i?(i.path=t,o(i)):t}function s(e,n){""===e&&(e="."),""===n&&(n=".");var s=r(n),u=r(e);if(u&&(e=u.path||"/"),s&&!s.scheme)return u&&(s.scheme=u.scheme),o(s);if(s||n.match(t))return n;if(u&&!u.host&&!u.path)return u.host=n,o(u);var a="/"===n.charAt(0)?n:i(e.replace(/\/+$/,"")+"/"+n);return u?(u.path=a,o(u)):a}e.urlParse=r,e.urlGenerate=o,e.normalize=i,e.join=s,e.isAbsolute=function(e){return"/"===e.charAt(0)||n.test(e)},e.relative=function(e,n){""===e&&(e="."),e=e.replace(/\/$/,"");for(var t=0;0!==n.indexOf(e+"/");){var r=e.lastIndexOf("/");if(r<0)return n;if((e=e.slice(0,r)).match(/^([^\/]+:\/)?\/*$/))return n;++t}return Array(t+1).join("../")+n.substr(e.length+1)};var u=!("__proto__"in Object.create(null));function a(e){return e}function c(e){if(!e)return!1;var n=e.length;if(n<9)return!1;if(95!==e.charCodeAt(n-1)||95!==e.charCodeAt(n-2)||111!==e.charCodeAt(n-3)||116!==e.charCodeAt(n-4)||111!==e.charCodeAt(n-5)||114!==e.charCodeAt(n-6)||112!==e.charCodeAt(n-7)||95!==e.charCodeAt(n-8)||95!==e.charCodeAt(n-9))return!1;for(var t=n-10;t>=0;t--)if(36!==e.charCodeAt(t))return!1;return!0}function l(e,n){return e===n?0:null===e?1:null===n?-1:e>n?1:-1}e.toSetString=u?a:function(e){return c(e)?"$"+e:e},e.fromSetString=u?a:function(e){return c(e)?e.slice(1):e},e.compareByOriginalPositions=function(e,n,t){var r=l(e.source,n.source);return 0!==r||0!==(r=e.originalLine-n.originalLine)||0!==(r=e.originalColumn-n.originalColumn)||t||0!==(r=e.generatedColumn-n.generatedColumn)||0!==(r=e.generatedLine-n.generatedLine)?r:l(e.name,n.name)},e.compareByGeneratedPositionsDeflated=function(e,n,t){var r=e.generatedLine-n.generatedLine;return 0!==r||0!==(r=e.generatedColumn-n.generatedColumn)||t||0!==(r=l(e.source,n.source))||0!==(r=e.originalLine-n.originalLine)||0!==(r=e.originalColumn-n.originalColumn)?r:l(e.name,n.name)},e.compareByGeneratedPositionsInflated=function(e,n){var t=e.generatedLine-n.generatedLine;return 0!==t||0!==(t=e.generatedColumn-n.generatedColumn)||0!==(t=l(e.source,n.source))||0!==(t=e.originalLine-n.originalLine)||0!==(t=e.originalColumn-n.originalColumn)?t:l(e.name,n.name)},e.parseSourceMapInput=function(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))},e.computeSourceURL=function(e,n,t){if(n=n||"",e&&("/"!==e[e.length-1]&&"/"!==n[0]&&(e+="/"),n=e+n),t){var u=r(t);if(!u)throw new Error("sourceMapURL could not be parsed");if(u.path){var a=u.path.lastIndexOf("/");a>=0&&(u.path=u.path.substring(0,a+1))}n=s(o(u),n)}return i(n)}}(I);var P={},M=I,k=Object.prototype.hasOwnProperty,R="undefined"!=typeof Map;function b(){this._array=[],this._set=R?new Map:Object.create(null)}b.fromArray=function(e,n){for(var t=new b,r=0,o=e.length;r<o;r++)t.add(e[r],n);return t},b.prototype.size=function(){return R?this._set.size:Object.getOwnPropertyNames(this._set).length},b.prototype.add=function(e,n){var t=R?e:M.toSetString(e),r=R?this.has(e):k.call(this._set,t),o=this._array.length;r&&!n||this._array.push(e),r||(R?this._set.set(e,o):this._set[t]=o)},b.prototype.has=function(e){if(R)return this._set.has(e);var n=M.toSetString(e);return k.call(this._set,n)},b.prototype.indexOf=function(e){if(R){var n=this._set.get(e);if(n>=0)return n}else{var t=M.toSetString(e);if(k.call(this._set,t))return this._set[t]}throw new Error('"'+e+'" is not in the set.')},b.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)},b.prototype.toArray=function(){return this._array.slice()},P.ArraySet=b;var w={},D=I;function U(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}U.prototype.unsortedForEach=function(e,n){this._array.forEach(e,n)},U.prototype.add=function(e){var n,t,r,o;(o=(t=e).generatedLine)>(r=(n=this._last).generatedLine)||o==r&&t.generatedColumn>=n.generatedColumn||D.compareByGeneratedPositionsInflated(n,t)<=0?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))},U.prototype.toArray=function(){return this._sorted||(this._array.sort(D.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},w.MappingList=U;var x=v,G=I,B=P.ArraySet,X=w.MappingList;function $(e){e||(e={}),this._file=G.getArg(e,"file",null),this._sourceRoot=G.getArg(e,"sourceRoot",null),this._skipValidation=G.getArg(e,"skipValidation",!1),this._sources=new B,this._names=new B,this._mappings=new X,this._sourcesContents=null}$.prototype._version=3,$.fromSourceMap=function(e){var n=e.sourceRoot,t=new $({file:e.file,sourceRoot:n});return e.eachMapping((function(e){var r={generated:{line:e.generatedLine,column:e.generatedColumn}};null!=e.source&&(r.source=e.source,null!=n&&(r.source=G.relative(n,r.source)),r.original={line:e.originalLine,column:e.originalColumn},null!=e.name&&(r.name=e.name)),t.addMapping(r)})),e.sources.forEach((function(r){var o=r;null!==n&&(o=G.relative(n,r)),t._sources.has(o)||t._sources.add(o);var i=e.sourceContentFor(r);null!=i&&t.setSourceContent(r,i)})),t},$.prototype.addMapping=function(e){var n=G.getArg(e,"generated"),t=G.getArg(e,"original",null),r=G.getArg(e,"source",null),o=G.getArg(e,"name",null);this._skipValidation||this._validateMapping(n,t,r,o),null!=r&&(r=String(r),this._sources.has(r)||this._sources.add(r)),null!=o&&(o=String(o),this._names.has(o)||this._names.add(o)),this._mappings.add({generatedLine:n.line,generatedColumn:n.column,originalLine:null!=t&&t.line,originalColumn:null!=t&&t.column,source:r,name:o})},$.prototype.setSourceContent=function(e,n){var t=e;null!=this._sourceRoot&&(t=G.relative(this._sourceRoot,t)),null!=n?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[G.toSetString(t)]=n):this._sourcesContents&&(delete this._sourcesContents[G.toSetString(t)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},$.prototype.applySourceMap=function(e,n,t){var r=n;if(null==n){if(null==e.file)throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.');r=e.file}var o=this._sourceRoot;null!=o&&(r=G.relative(o,r));var i=new B,s=new B;this._mappings.unsortedForEach((function(n){if(n.source===r&&null!=n.originalLine){var u=e.originalPositionFor({line:n.originalLine,column:n.originalColumn});null!=u.source&&(n.source=u.source,null!=t&&(n.source=G.join(t,n.source)),null!=o&&(n.source=G.relative(o,n.source)),n.originalLine=u.line,n.originalColumn=u.column,null!=u.name&&(n.name=u.name))}var a=n.source;null==a||i.has(a)||i.add(a);var c=n.name;null==c||s.has(c)||s.add(c)}),this),this._sources=i,this._names=s,e.sources.forEach((function(n){var r=e.sourceContentFor(n);null!=r&&(null!=t&&(n=G.join(t,n)),null!=o&&(n=G.relative(o,n)),this.setSourceContent(n,r))}),this)},$.prototype._validateMapping=function(e,n,t,r){if(n&&"number"!=typeof n.line&&"number"!=typeof n.column)throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if((!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0)||n||t||r)&&!(e&&"line"in e&&"column"in e&&n&&"line"in n&&"column"in n&&e.line>0&&e.column>=0&&n.line>0&&n.column>=0&&t))throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:t,original:n,name:r}))},$.prototype._serializeMappings=function(){for(var e,n,t,r,o=0,i=1,s=0,u=0,a=0,c=0,l="",p=this._mappings.toArray(),f=0,h=p.length;f<h;f++){if(e="",(n=p[f]).generatedLine!==i)for(o=0;n.generatedLine!==i;)e+=";",i++;else if(f>0){if(!G.compareByGeneratedPositionsInflated(n,p[f-1]))continue;e+=","}e+=x.encode(n.generatedColumn-o),o=n.generatedColumn,null!=n.source&&(r=this._sources.indexOf(n.source),e+=x.encode(r-c),c=r,e+=x.encode(n.originalLine-1-u),u=n.originalLine-1,e+=x.encode(n.originalColumn-s),s=n.originalColumn,null!=n.name&&(t=this._names.indexOf(n.name),e+=x.encode(t-a),a=t)),l+=e}return l},$.prototype._generateSourcesContent=function(e,n){return e.map((function(e){if(!this._sourcesContents)return null;null!=n&&(e=G.relative(n,e));var t=G.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,t)?this._sourcesContents[t]:null}),this)},$.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(e.file=this._file),null!=this._sourceRoot&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},$.prototype.toString=function(){return JSON.stringify(this.toJSON())},S.SourceMapGenerator=$;var F={},j={};!function(e){function n(t,r,o,i,s,u){var a=Math.floor((r-t)/2)+t,c=s(o,i[a],!0);return 0===c?a:c>0?r-a>1?n(a,r,o,i,s,u):u==e.LEAST_UPPER_BOUND?r<i.length?r:-1:a:a-t>1?n(t,a,o,i,s,u):u==e.LEAST_UPPER_BOUND?a:t<0?-1:t}e.GREATEST_LOWER_BOUND=1,e.LEAST_UPPER_BOUND=2,e.search=function(t,r,o,i){if(0===r.length)return-1;var s=n(-1,r.length,t,r,o,i||e.GREATEST_LOWER_BOUND);if(s<0)return-1;for(;s-1>=0&&0===o(r[s],r[s-1],!0);)--s;return s}}(j);var Y={};function K(e,n,t){var r=e[n];e[n]=e[t],e[t]=r}function V(e,n,t,r){if(t<r){var o=t-1;K(e,(a=t,c=r,Math.round(a+Math.random()*(c-a))),r);for(var i=e[r],s=t;s<r;s++)n(e[s],i)<=0&&K(e,o+=1,s);K(e,o+1,s);var u=o+1;V(e,n,t,u-1),V(e,n,u+1,r)}var a,c}Y.quickSort=function(e,n){V(e,n,0,e.length-1)};var H=I,W=j,z=P.ArraySet,Q=v,q=Y.quickSort;function J(e,n){var t=e;return"string"==typeof e&&(t=H.parseSourceMapInput(e)),null!=t.sections?new ne(t,n):new Z(t,n)}function Z(e,n){var t=e;"string"==typeof e&&(t=H.parseSourceMapInput(e));var r=H.getArg(t,"version"),o=H.getArg(t,"sources"),i=H.getArg(t,"names",[]),s=H.getArg(t,"sourceRoot",null),u=H.getArg(t,"sourcesContent",null),a=H.getArg(t,"mappings"),c=H.getArg(t,"file",null);if(r!=this._version)throw new Error("Unsupported version: "+r);s&&(s=H.normalize(s)),o=o.map(String).map(H.normalize).map((function(e){return s&&H.isAbsolute(s)&&H.isAbsolute(e)?H.relative(s,e):e})),this._names=z.fromArray(i.map(String),!0),this._sources=z.fromArray(o,!0),this._absoluteSources=this._sources.toArray().map((function(e){return H.computeSourceURL(s,e,n)})),this.sourceRoot=s,this.sourcesContent=u,this._mappings=a,this._sourceMapURL=n,this.file=c}function ee(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}function ne(e,n){var t=e;"string"==typeof e&&(t=H.parseSourceMapInput(e));var r=H.getArg(t,"version"),o=H.getArg(t,"sections");if(r!=this._version)throw new Error("Unsupported version: "+r);this._sources=new z,this._names=new z;var i={line:-1,column:0};this._sections=o.map((function(e){if(e.url)throw new Error("Support for url field in sections not implemented.");var t=H.getArg(e,"offset"),r=H.getArg(t,"line"),o=H.getArg(t,"column");if(r<i.line||r===i.line&&o<i.column)throw new Error("Section offsets must be ordered and non-overlapping.");return i=t,{generatedOffset:{generatedLine:r+1,generatedColumn:o+1},consumer:new J(H.getArg(e,"map"),n)}}))}J.fromSourceMap=function(e,n){return Z.fromSourceMap(e,n)},J.prototype._version=3,J.prototype.__generatedMappings=null,Object.defineProperty(J.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}}),J.prototype.__originalMappings=null,Object.defineProperty(J.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}}),J.prototype._charIsMappingSeparator=function(e,n){var t=e.charAt(n);return";"===t||","===t},J.prototype._parseMappings=function(e,n){throw new Error("Subclasses must implement _parseMappings")},J.GENERATED_ORDER=1,J.ORIGINAL_ORDER=2,J.GREATEST_LOWER_BOUND=1,J.LEAST_UPPER_BOUND=2,J.prototype.eachMapping=function(e,n,t){var r,o=n||null;switch(t||J.GENERATED_ORDER){case J.GENERATED_ORDER:r=this._generatedMappings;break;case J.ORIGINAL_ORDER:r=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var i=this.sourceRoot;r.map((function(e){var n=null===e.source?null:this._sources.at(e.source);return{source:n=H.computeSourceURL(i,n,this._sourceMapURL),generatedLine:e.generatedLine,generatedColumn:e.generatedColumn,originalLine:e.originalLine,originalColumn:e.originalColumn,name:null===e.name?null:this._names.at(e.name)}}),this).forEach(e,o)},J.prototype.allGeneratedPositionsFor=function(e){var n=H.getArg(e,"line"),t={source:H.getArg(e,"source"),originalLine:n,originalColumn:H.getArg(e,"column",0)};if(t.source=this._findSourceIndex(t.source),t.source<0)return[];var r=[],o=this._findMapping(t,this._originalMappings,"originalLine","originalColumn",H.compareByOriginalPositions,W.LEAST_UPPER_BOUND);if(o>=0){var i=this._originalMappings[o];if(void 0===e.column)for(var s=i.originalLine;i&&i.originalLine===s;)r.push({line:H.getArg(i,"generatedLine",null),column:H.getArg(i,"generatedColumn",null),lastColumn:H.getArg(i,"lastGeneratedColumn",null)}),i=this._originalMappings[++o];else for(var u=i.originalColumn;i&&i.originalLine===n&&i.originalColumn==u;)r.push({line:H.getArg(i,"generatedLine",null),column:H.getArg(i,"generatedColumn",null),lastColumn:H.getArg(i,"lastGeneratedColumn",null)}),i=this._originalMappings[++o]}return r},F.SourceMapConsumer=J,(Z.prototype=Object.create(J.prototype)).consumer=J,Z.prototype._findSourceIndex=function(e){var n,t=e;if(null!=this.sourceRoot&&(t=H.relative(this.sourceRoot,t)),this._sources.has(t))return this._sources.indexOf(t);for(n=0;n<this._absoluteSources.length;++n)if(this._absoluteSources[n]==e)return n;return-1},Z.fromSourceMap=function(e,n){var t=Object.create(Z.prototype),r=t._names=z.fromArray(e._names.toArray(),!0),o=t._sources=z.fromArray(e._sources.toArray(),!0);t.sourceRoot=e._sourceRoot,t.sourcesContent=e._generateSourcesContent(t._sources.toArray(),t.sourceRoot),t.file=e._file,t._sourceMapURL=n,t._absoluteSources=t._sources.toArray().map((function(e){return H.computeSourceURL(t.sourceRoot,e,n)}));for(var i=e._mappings.toArray().slice(),s=t.__generatedMappings=[],u=t.__originalMappings=[],a=0,c=i.length;a<c;a++){var l=i[a],p=new ee;p.generatedLine=l.generatedLine,p.generatedColumn=l.generatedColumn,l.source&&(p.source=o.indexOf(l.source),p.originalLine=l.originalLine,p.originalColumn=l.originalColumn,l.name&&(p.name=r.indexOf(l.name)),u.push(p)),s.push(p)}return q(t.__originalMappings,H.compareByOriginalPositions),t},Z.prototype._version=3,Object.defineProperty(Z.prototype,"sources",{get:function(){return this._absoluteSources.slice()}}),Z.prototype._parseMappings=function(e,n){for(var t,r,o,i,s=1,u=0,a=0,c=0,l=0,p=0,f=e.length,h=0,g={},d={},m=[],_=[];h<f;)if(";"===e.charAt(h))s++,h++,u=0;else if(","===e.charAt(h))h++;else{for((t=new ee).generatedLine=s,i=h;i<f&&!this._charIsMappingSeparator(e,i);i++);if(o=g[r=e.slice(h,i)])h+=r.length;else{for(o=[];h<i;)Q.decode(e,h,d),h=d.rest,o.push(d.value);if(2===o.length)throw new Error("Found a source, but no line and column");if(3===o.length)throw new Error("Found a source and line, but no column");g[r]=o}t.generatedColumn=u+o[0],u=t.generatedColumn,o.length>1&&(t.source=l+o[1],l+=o[1],t.originalLine=a+o[2],a=t.originalLine,t.originalLine+=1,t.originalColumn=c+o[3],c=t.originalColumn,o.length>4&&(t.name=p+o[4],p+=o[4])),_.push(t),"number"==typeof t.originalLine&&m.push(t)}q(_,H.compareByGeneratedPositionsDeflated),this.__generatedMappings=_,q(m,H.compareByOriginalPositions),this.__originalMappings=m},Z.prototype._findMapping=function(e,n,t,r,o,i){if(e[t]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[t]);if(e[r]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[r]);return W.search(e,n,o,i)},Z.prototype.computeColumnSpans=function(){for(var e=0;e<this._generatedMappings.length;++e){var n=this._generatedMappings[e];if(e+1<this._generatedMappings.length){var t=this._generatedMappings[e+1];if(n.generatedLine===t.generatedLine){n.lastGeneratedColumn=t.generatedColumn-1;continue}}n.lastGeneratedColumn=1/0}},Z.prototype.originalPositionFor=function(e){var n={generatedLine:H.getArg(e,"line"),generatedColumn:H.getArg(e,"column")},t=this._findMapping(n,this._generatedMappings,"generatedLine","generatedColumn",H.compareByGeneratedPositionsDeflated,H.getArg(e,"bias",J.GREATEST_LOWER_BOUND));if(t>=0){var r=this._generatedMappings[t];if(r.generatedLine===n.generatedLine){var o=H.getArg(r,"source",null);null!==o&&(o=this._sources.at(o),o=H.computeSourceURL(this.sourceRoot,o,this._sourceMapURL));var i=H.getArg(r,"name",null);return null!==i&&(i=this._names.at(i)),{source:o,line:H.getArg(r,"originalLine",null),column:H.getArg(r,"originalColumn",null),name:i}}}return{source:null,line:null,column:null,name:null}},Z.prototype.hasContentsOfAllSources=function(){return!!this.sourcesContent&&(this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some((function(e){return null==e})))},Z.prototype.sourceContentFor=function(e,n){if(!this.sourcesContent)return null;var t=this._findSourceIndex(e);if(t>=0)return this.sourcesContent[t];var r,o=e;if(null!=this.sourceRoot&&(o=H.relative(this.sourceRoot,o)),null!=this.sourceRoot&&(r=H.urlParse(this.sourceRoot))){var i=o.replace(/^file:\/\//,"");if("file"==r.scheme&&this._sources.has(i))return this.sourcesContent[this._sources.indexOf(i)];if((!r.path||"/"==r.path)&&this._sources.has("/"+o))return this.sourcesContent[this._sources.indexOf("/"+o)]}if(n)return null;throw new Error('"'+o+'" is not in the SourceMap.')},Z.prototype.generatedPositionFor=function(e){var n=H.getArg(e,"source");if((n=this._findSourceIndex(n))<0)return{line:null,column:null,lastColumn:null};var t={source:n,originalLine:H.getArg(e,"line"),originalColumn:H.getArg(e,"column")},r=this._findMapping(t,this._originalMappings,"originalLine","originalColumn",H.compareByOriginalPositions,H.getArg(e,"bias",J.GREATEST_LOWER_BOUND));if(r>=0){var o=this._originalMappings[r];if(o.source===t.source)return{line:H.getArg(o,"generatedLine",null),column:H.getArg(o,"generatedColumn",null),lastColumn:H.getArg(o,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},F.BasicSourceMapConsumer=Z,(ne.prototype=Object.create(J.prototype)).constructor=J,ne.prototype._version=3,Object.defineProperty(ne.prototype,"sources",{get:function(){for(var e=[],n=0;n<this._sections.length;n++)for(var t=0;t<this._sections[n].consumer.sources.length;t++)e.push(this._sections[n].consumer.sources[t]);return e}}),ne.prototype.originalPositionFor=function(e){var n={generatedLine:H.getArg(e,"line"),generatedColumn:H.getArg(e,"column")},t=W.search(n,this._sections,(function(e,n){var t=e.generatedLine-n.generatedOffset.generatedLine;return t||e.generatedColumn-n.generatedOffset.generatedColumn})),r=this._sections[t];return r?r.consumer.originalPositionFor({line:n.generatedLine-(r.generatedOffset.generatedLine-1),column:n.generatedColumn-(r.generatedOffset.generatedLine===n.generatedLine?r.generatedOffset.generatedColumn-1:0),bias:e.bias}):{source:null,line:null,column:null,name:null}},ne.prototype.hasContentsOfAllSources=function(){return this._sections.every((function(e){return e.consumer.hasContentsOfAllSources()}))},ne.prototype.sourceContentFor=function(e,n){for(var t=0;t<this._sections.length;t++){var r=this._sections[t].consumer.sourceContentFor(e,!0);if(r)return r}if(n)return null;throw new Error('"'+e+'" is not in the SourceMap.')},ne.prototype.generatedPositionFor=function(e){for(var n=0;n<this._sections.length;n++){var t=this._sections[n];if(-1!==t.consumer._findSourceIndex(H.getArg(e,"source"))){var r=t.consumer.generatedPositionFor(e);if(r)return{line:r.line+(t.generatedOffset.generatedLine-1),column:r.column+(t.generatedOffset.generatedLine===r.line?t.generatedOffset.generatedColumn-1:0)}}}return{line:null,column:null}},ne.prototype._parseMappings=function(e,n){this.__generatedMappings=[],this.__originalMappings=[];for(var t=0;t<this._sections.length;t++)for(var r=this._sections[t],o=r.consumer._generatedMappings,i=0;i<o.length;i++){var s=o[i],u=r.consumer._sources.at(s.source);u=H.computeSourceURL(r.consumer.sourceRoot,u,this._sourceMapURL),this._sources.add(u),u=this._sources.indexOf(u);var a=null;s.name&&(a=r.consumer._names.at(s.name),this._names.add(a),a=this._names.indexOf(a));var c={source:u,generatedLine:s.generatedLine+(r.generatedOffset.generatedLine-1),generatedColumn:s.generatedColumn+(r.generatedOffset.generatedLine===s.generatedLine?r.generatedOffset.generatedColumn-1:0),originalLine:s.originalLine,originalColumn:s.originalColumn,name:a};this.__generatedMappings.push(c),"number"==typeof c.originalLine&&this.__originalMappings.push(c)}q(this.__generatedMappings,H.compareByGeneratedPositionsDeflated),q(this.__originalMappings,H.compareByOriginalPositions)},F.IndexedSourceMapConsumer=ne;var te={},re=S.SourceMapGenerator,oe=I,ie=/(\r?\n)/,se="$$$isSourceNode$$$";function ue(e,n,t,r,o){this.children=[],this.sourceContents={},this.line=null==e?null:e,this.column=null==n?null:n,this.source=null==t?null:t,this.name=null==o?null:o,this[se]=!0,null!=r&&this.add(r)}ue.fromStringWithSourceMap=function(e,n,t){var r=new ue,o=e.split(ie),i=0,s=function(){return e()+(e()||"");function e(){return i<o.length?o[i++]:void 0}},u=1,a=0,c=null;return n.eachMapping((function(e){if(null!==c){if(!(u<e.generatedLine)){var n=(t=o[i]||"").substr(0,e.generatedColumn-a);return o[i]=t.substr(e.generatedColumn-a),a=e.generatedColumn,l(c,n),void(c=e)}l(c,s()),u++,a=0}for(;u<e.generatedLine;)r.add(s()),u++;var t;a<e.generatedColumn&&(r.add((t=o[i]||"").substr(0,e.generatedColumn)),o[i]=t.substr(e.generatedColumn),a=e.generatedColumn);c=e}),this),i<o.length&&(c&&l(c,s()),r.add(o.splice(i).join(""))),n.sources.forEach((function(e){var o=n.sourceContentFor(e);null!=o&&(null!=t&&(e=oe.join(t,e)),r.setSourceContent(e,o))})),r;function l(e,n){if(null===e||void 0===e.source)r.add(n);else{var o=t?oe.join(t,e.source):e.source;r.add(new ue(e.originalLine,e.originalColumn,o,n,e.name))}}},ue.prototype.add=function(e){if(Array.isArray(e))e.forEach((function(e){this.add(e)}),this);else{if(!e[se]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);e&&this.children.push(e)}return this},ue.prototype.prepend=function(e){if(Array.isArray(e))for(var n=e.length-1;n>=0;n--)this.prepend(e[n]);else{if(!e[se]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);this.children.unshift(e)}return this},ue.prototype.walk=function(e){for(var n,t=0,r=this.children.length;t<r;t++)(n=this.children[t])[se]?n.walk(e):""!==n&&e(n,{source:this.source,line:this.line,column:this.column,name:this.name})},ue.prototype.join=function(e){var n,t,r=this.children.length;if(r>0){for(n=[],t=0;t<r-1;t++)n.push(this.children[t]),n.push(e);n.push(this.children[t]),this.children=n}return this},ue.prototype.replaceRight=function(e,n){var t=this.children[this.children.length-1];return t[se]?t.replaceRight(e,n):"string"==typeof t?this.children[this.children.length-1]=t.replace(e,n):this.children.push("".replace(e,n)),this},ue.prototype.setSourceContent=function(e,n){this.sourceContents[oe.toSetString(e)]=n},ue.prototype.walkSourceContents=function(e){for(var n=0,t=this.children.length;n<t;n++)this.children[n][se]&&this.children[n].walkSourceContents(e);var r=Object.keys(this.sourceContents);for(n=0,t=r.length;n<t;n++)e(oe.fromSetString(r[n]),this.sourceContents[r[n]])},ue.prototype.toString=function(){var e="";return this.walk((function(n){e+=n})),e},ue.prototype.toStringWithSourceMap=function(e){var n={code:"",line:1,column:0},t=new re(e),r=!1,o=null,i=null,s=null,u=null;return this.walk((function(e,a){n.code+=e,null!==a.source&&null!==a.line&&null!==a.column?(o===a.source&&i===a.line&&s===a.column&&u===a.name||t.addMapping({source:a.source,original:{line:a.line,column:a.column},generated:{line:n.line,column:n.column},name:a.name}),o=a.source,i=a.line,s=a.column,u=a.name,r=!0):r&&(t.addMapping({generated:{line:n.line,column:n.column}}),o=null,r=!1);for(var c=0,l=e.length;c<l;c++)10===e.charCodeAt(c)?(n.line++,n.column=0,c+1===l?(o=null,r=!1):r&&t.addMapping({source:a.source,original:{line:a.line,column:a.column},generated:{line:n.line,column:n.column},name:a.name})):n.column++})),this.walkSourceContents((function(e,n){t.setSourceContent(e,n)})),{code:n.code,map:t}},te.SourceNode=ue;var ae=y.SourceMapGenerator=S.SourceMapGenerator;function ce(e,n){const{sourceMap:t,filename:r,breakLineCode:o,needIndent:i}=n,u={source:e.loc.source,filename:r,code:"",column:1,line:1,offset:0,map:void 0,breakLineCode:o,needIndent:i,indentLevel:0};function a(e,n){var t,r;u.code+=e,u.map&&(n&&n.loc&&n.loc!==s&&(t=n.loc.start,r=function(e){switch(e.type){case 3:return e.value;case 5:return e.index.toString();case 4:return e.key;case 9:case 8:case 7:return e.value;default:return}}(n),u.map.addMapping({name:r,source:u.filename,original:{line:t.line,column:t.column-1},generated:{line:u.line,column:u.column-1}})),function(e,n,t=n.length){let r=0,o=-1;for(let e=0;e<t;e++)10===n.charCodeAt(e)&&(r++,o=e);e.offset+=t,e.line+=r,e.column=-1===o?e.column+t:t-o}(u,e))}function c(e,n=!0){const t=n?o:"";a(i?t+" ".repeat(e):t)}return t&&(u.map=new ae,u.map.setSourceContent(r,u.source)),{context:()=>u,push:a,indent:function(e=!0){const n=++u.indentLevel;e&&c(n)},deindent:function(e=!0){const n=--u.indentLevel;e&&c(n)},newline:function(){c(u.indentLevel)},helper:e=>`_${e}`,needIndent:()=>u.needIndent}}function le(e,n){const{helper:t}=e;switch(n.type){case 0:!function(e,n){n.body?le(e,n.body):e.push("null")}(e,n);break;case 1:!function(e,n){const{helper:t,needIndent:r}=e;if(n.cases.length>1){e.push(`${t("plural")}([`),e.indent(r());const o=n.cases.length;for(let t=0;t<o&&(le(e,n.cases[t]),t!==o-1);t++)e.push(", ");e.deindent(r()),e.push("])")}}(e,n);break;case 2:!function(e,n){const{helper:t,needIndent:r}=e;e.push(`${t("normalize")}([`),e.indent(r());const o=n.items.length;for(let t=0;t<o&&(le(e,n.items[t]),t!==o-1);t++)e.push(", ");e.deindent(r()),e.push("])")}(e,n);break;case 6:!function(e,n){const{helper:t}=e;e.push(`${t("linked")}(`),le(e,n.key),n.modifier&&(e.push(", "),le(e,n.modifier)),e.push(")")}(e,n);break;case 8:case 7:e.push(JSON.stringify(n.value),n);break;case 5:e.push(`${t("interpolate")}(${t("list")}(${n.index}))`,n);break;case 4:e.push(`${t("interpolate")}(${t("named")}(${JSON.stringify(n.key)}))`,n);break;case 9:case 3:e.push(JSON.stringify(n.value),n)}}y.SourceMapConsumer=F.SourceMapConsumer,y.SourceNode=te.SourceNode;function pe(t,r={}){const o=e({},r),i=_(o).parse(t);return A(i,o),((e,t={})=>{const r=n(t.mode)?t.mode:"normal",o=n(t.filename)?t.filename:"message.intl",i=t.needIndent?t.needIndent:"arrow"!==r,s=e.helpers||[],u=ce(e,{mode:r,filename:o,sourceMap:!!t.sourceMap,breakLineCode:null!=t.breakLineCode?t.breakLineCode:"arrow"===r?";":"\n",needIndent:i});u.push("normal"===r?"function __msg__ (ctx) {":"(ctx) => {"),u.indent(i),s.length>0&&(u.push(`const { ${s.map((e=>`${e}: _${e}`)).join(", ")} } = ctx`),u.newline()),u.push("return "),le(u,e),u.deindent(i),u.push("}");const{code:a,map:c}=u.context();return{ast:e,code:a,map:c?c.toJSON():void 0}})(i,o)}export{t as CompileErrorCodes,g as ERROR_DOMAIN,s as LocationStub,pe as baseCompile,o as createCompileError,a as createLocation,_ as createParser,u as createPosition,i as defaultOnError,r as errorMessages};
const e=Object.assign,n=e=>"string"==typeof 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},r={[t.EXPECTED_TOKEN]:"Expected token: '{0}'",[t.INVALID_TOKEN_IN_PLACEHOLDER]:"Invalid token in placeholder: '{0}'",[t.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER]:"Unterminated single quote in placeholder",[t.UNKNOWN_ESCAPE_SEQUENCE]:"Unknown escape sequence: \\{0}",[t.INVALID_UNICODE_ESCAPE_SEQUENCE]:"Invalid unicode escape sequence: {0}",[t.UNBALANCED_CLOSING_BRACE]:"Unbalanced closing brace",[t.UNTERMINATED_CLOSING_BRACE]:"Unterminated closing brace",[t.EMPTY_PLACEHOLDER]:"Empty placeholder",[t.NOT_ALLOW_NEST_PLACEHOLDER]:"Not allowed nest placeholder",[t.INVALID_LINKED_FORMAT]:"Invalid linked format",[t.MUST_HAVE_MESSAGES_IN_PLURAL]:"Plural must have messages",[t.UNEXPECTED_EMPTY_LINKED_MODIFIER]:"Unexpected empty linked modifier",[t.UNEXPECTED_EMPTY_LINKED_KEY]:"Unexpected empty linked key",[t.UNEXPECTED_LEXICAL_ANALYSIS]:"Unexpected lexical analysis in token: '{0}'"};function c(e,n,t={}){const{domain:r}=t,c=new SyntaxError(String(e));return c.code=e,n&&(c.location=n),c.domain=r,c}function o(e){throw e}const u={start:{line:1,column:1,offset:0},end:{line:1,column:1,offset:0}};function s(e,n,t){return{line:e,column:n,offset:t}}function i(e,n,t){const r={start:e,end:n};return null!=t&&(r.source=t),r}const a=String.fromCharCode(8232),l=String.fromCharCode(8233);function f(e){const n=e;let t=0,r=1,c=1,o=0;const u=e=>"\r"===n[e]&&"\n"===n[e+1],s=e=>n[e]===l,i=e=>n[e]===a,f=e=>u(e)||(e=>"\n"===n[e])(e)||s(e)||i(e),d=e=>u(e)||s(e)||i(e)?"\n":n[e];function p(){return o=0,f(t)&&(r++,c=0),u(t)&&t++,t++,c++,n[t]}return{index:()=>t,line:()=>r,column:()=>c,peekOffset:()=>o,charAt:d,currentChar:()=>d(t),currentPeek:()=>d(t+o),next:p,peek:function(){return u(t+o)&&o++,o++,n[t+o]},reset:function(){t=0,r=1,c=1,o=0},resetPeek:function(e=0){o=e},skipToPeek:function(){const e=t+o;for(;e!==t;)p();o=0}}}const d=void 0;function p(e,n={}){const t=!1!==n.location,r=f(e),c=()=>r.index(),o=()=>s(r.line(),r.column(),r.index()),u=o(),a=c(),l={currentType:14,offset:a,startLoc:u,endLoc:u,lastType:14,lastOffset:a,lastStartLoc:u,lastEndLoc:u,braceNest:0,inLinked:!1,text:""},p=()=>l,{onError:E}=n;function k(e,n,r){e.endLoc=o(),e.currentType=n;const c={type:n};return t&&(c.loc=i(e.startLoc,e.endLoc)),null!=r&&(c.value=r),c}const L=e=>k(e,14);function h(e,n){return e.currentChar()===n?(e.next(),n):(o(),"")}function N(e){let n="";for(;" "===e.currentPeek()||"\n"===e.currentPeek();)n+=e.currentPeek(),e.peek();return n}function _(e){const n=N(e);return e.skipToPeek(),n}function T(e){if(e===d)return!1;const n=e.charCodeAt(0);return n>=97&&n<=122||n>=65&&n<=90||95===n}function C(e,n){const{currentType:t}=n;if(2!==t)return!1;N(e);const r=function(e){if(e===d)return!1;const n=e.charCodeAt(0);return n>=48&&n<=57}("-"===e.currentPeek()?e.peek():e.currentPeek());return e.resetPeek(),r}function P(e){N(e);const n="|"===e.currentPeek();return e.resetPeek(),n}function x(e,n=!0){const t=(n=!1,r="",c=!1)=>{const o=e.currentPeek();return"{"===o?"%"!==r&&n:"@"!==o&&o?"%"===o?(e.peek(),t(n,"%",!0)):"|"===o?!("%"!==r&&!c)||!(" "===r||"\n"===r):" "===o?(e.peek(),t(!0," ",c)):"\n"!==o||(e.peek(),t(!0,"\n",c)):"%"===r||n},r=t();return n&&e.resetPeek(),r}function y(e,n){const t=e.currentChar();return t===d?d:n(t)?(e.next(),t):null}function m(e){return y(e,(e=>{const n=e.charCodeAt(0);return n>=97&&n<=122||n>=65&&n<=90||n>=48&&n<=57||95===n||36===n}))}function I(e){return y(e,(e=>{const n=e.charCodeAt(0);return n>=48&&n<=57}))}function O(e){return y(e,(e=>{const n=e.charCodeAt(0);return n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102}))}function A(e){let n="",t="";for(;n=I(e);)t+=n;return t}function b(e){const n=e.currentChar();switch(n){case"\\":case"'":return e.next(),`\\${n}`;case"u":return S(e,n,4);case"U":return S(e,n,6);default:return o(),""}}function S(e,n,t){h(e,n);let r="";for(let n=0;n<t;n++){const n=O(e);if(!n){o(),e.currentChar();break}r+=n}return`\\${n}${r}`}function v(e){_(e);const n=h(e,"|");return _(e),n}function D(e,n){let t=null;switch(e.currentChar()){case"{":return n.braceNest>=1&&o(),e.next(),t=k(n,2,"{"),_(e),n.braceNest++,t;case"}":return n.braceNest>0&&2===n.currentType&&o(),e.next(),t=k(n,3,"}"),n.braceNest--,n.braceNest>0&&_(e),n.inLinked&&0===n.braceNest&&(n.inLinked=!1),t;case"@":return n.braceNest>0&&o(),t=U(e,n)||L(n),n.braceNest=0,t;default:let r=!0,c=!0,u=!0;if(P(e))return n.braceNest>0&&o(),t=k(n,1,v(e)),n.braceNest=0,n.inLinked=!1,t;if(n.braceNest>0&&(5===n.currentType||6===n.currentType||7===n.currentType))return o(),n.braceNest=0,g(e,n);if(r=function(e,n){const{currentType:t}=n;if(2!==t)return!1;N(e);const r=T(e.currentPeek());return e.resetPeek(),r}(e,n))return t=k(n,5,function(e){_(e);let n="",t="";for(;n=m(e);)t+=n;return e.currentChar()===d&&o(),t}(e)),_(e),t;if(c=C(e,n))return t=k(n,6,function(e){_(e);let n="";return"-"===e.currentChar()?(e.next(),n+=`-${A(e)}`):n+=A(e),e.currentChar()===d&&o(),n}(e)),_(e),t;if(u=function(e,n){const{currentType:t}=n;if(2!==t)return!1;N(e);const r="'"===e.currentPeek();return e.resetPeek(),r}(e,n))return t=k(n,7,function(e){_(e),h(e,"'");let n="",t="";const r=e=>"'"!==e&&"\n"!==e;for(;n=y(e,r);)t+="\\"===n?b(e):n;const c=e.currentChar();return"\n"===c||c===d?(o(),"\n"===c&&(e.next(),h(e,"'")),t):(h(e,"'"),t)}(e)),_(e),t;if(!r&&!c&&!u)return t=k(n,13,function(e){_(e);let n="",t="";const r=e=>"{"!==e&&"}"!==e&&" "!==e&&"\n"!==e;for(;n=y(e,r);)t+=n;return t}(e)),o(),_(e),t}return t}function U(e,n){const{currentType:t}=n;let r=null;const c=e.currentChar();switch(8!==t&&9!==t&&12!==t&&10!==t||"\n"!==c&&" "!==c||o(),c){case"@":return e.next(),r=k(n,8,"@"),n.inLinked=!0,r;case".":return _(e),e.next(),k(n,9,".");case":":return _(e),e.next(),k(n,10,":");default:return P(e)?(r=k(n,1,v(e)),n.braceNest=0,n.inLinked=!1,r):function(e,n){const{currentType:t}=n;if(8!==t)return!1;N(e);const r="."===e.currentPeek();return e.resetPeek(),r}(e,n)||function(e,n){const{currentType:t}=n;if(8!==t&&12!==t)return!1;N(e);const r=":"===e.currentPeek();return e.resetPeek(),r}(e,n)?(_(e),U(e,n)):function(e,n){const{currentType:t}=n;if(9!==t)return!1;N(e);const r=T(e.currentPeek());return e.resetPeek(),r}(e,n)?(_(e),k(n,12,function(e){let n="",t="";for(;n=m(e);)t+=n;return t}(e))):function(e,n){const{currentType:t}=n;if(10!==t)return!1;const r=()=>{const n=e.currentPeek();return"{"===n?T(e.peek()):!("@"===n||"%"===n||"|"===n||":"===n||"."===n||" "===n||!n)&&("\n"===n?(e.peek(),r()):T(n))},c=r();return e.resetPeek(),c}(e,n)?(_(e),"{"===c?D(e,n)||r:k(n,11,function(e){const n=(t=!1,r)=>{const c=e.currentChar();return"{"!==c&&"%"!==c&&"@"!==c&&"|"!==c&&c?" "===c?r:"\n"===c?(r+=c,e.next(),n(t,r)):(r+=c,e.next(),n(!0,r)):r};return n(!1,"")}(e))):(8===t&&o(),n.braceNest=0,n.inLinked=!1,g(e,n))}}function g(e,n){let t={type:14};if(n.braceNest>0)return D(e,n)||L(n);if(n.inLinked)return U(e,n)||L(n);const r=e.currentChar();switch(r){case"{":return D(e,n)||L(n);case"}":return o(),e.next(),k(n,3,"}");case"@":return U(e,n)||L(n);default:if(P(e))return t=k(n,1,v(e)),n.braceNest=0,n.inLinked=!1,t;if(x(e))return k(n,0,function(e){const n=t=>{const r=e.currentChar();return"{"!==r&&"}"!==r&&"@"!==r&&r?"%"===r?x(e)?(t+=r,e.next(),n(t)):t:"|"===r?t:" "===r||"\n"===r?x(e)?(t+=r,e.next(),n(t)):P(e)?t:(t+=r,e.next(),n(t)):(t+=r,e.next(),n(t)):t};return n("")}(e));if("%"===r)return e.next(),k(n,4,"%")}return t}return{nextToken:function(){const{currentType:e,offset:n,startLoc:t,endLoc:u}=l;return l.lastType=e,l.lastOffset=n,l.lastStartLoc=t,l.lastEndLoc=u,l.offset=c(),l.startLoc=o(),r.currentChar()===d?k(l,14):g(r,l)},currentOffset:c,currentPosition:o,context:p}}const E="parser",k=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function L(e,n,t){switch(e){case"\\\\":return"\\";case"\\'":return"'";default:{const e=parseInt(n||t,16);return e<=55295||e>=57344?String.fromCodePoint(e):"�"}}}function h(n={}){const t=!1!==n.location,{onError:r}=n;function c(e,n,r){const c={type:e,start:n,end:n};return t&&(c.loc={start:r,end:r}),c}function o(e,n,r,c){e.end=n,c&&(e.type=c),t&&e.loc&&(e.loc.end=r)}function u(e,n){const t=e.context(),r=c(3,t.offset,t.startLoc);return r.value=n,o(r,e.currentOffset(),e.currentPosition()),r}function s(e,n){const t=e.context(),{lastOffset:r,lastStartLoc:u}=t,s=c(5,r,u);return s.index=parseInt(n,10),e.nextToken(),o(s,e.currentOffset(),e.currentPosition()),s}function i(e,n){const t=e.context(),{lastOffset:r,lastStartLoc:u}=t,s=c(4,r,u);return s.key=n,e.nextToken(),o(s,e.currentOffset(),e.currentPosition()),s}function a(e,n){const t=e.context(),{lastOffset:r,lastStartLoc:u}=t,s=c(9,r,u);return s.value=n.replace(k,L),e.nextToken(),o(s,e.currentOffset(),e.currentPosition()),s}function l(e){const n=e.context(),t=c(6,n.offset,n.startLoc);let r=e.nextToken();if(9===r.type){const n=function(e){const n=e.nextToken(),t=e.context(),{lastOffset:r,lastStartLoc:u}=t,s=c(8,r,u);return 12!==n.type?(s.value="",o(s,r,u),{nextConsumeToken:n,node:s}):(null==n.value&&N(n),s.value=n.value||"",o(s,e.currentOffset(),e.currentPosition()),{node:s})}(e);t.modifier=n.node,r=n.nextConsumeToken||e.nextToken()}switch(10!==r.type&&N(r),r=e.nextToken(),2===r.type&&(r=e.nextToken()),r.type){case 11:null==r.value&&N(r),t.key=function(e,n){const t=e.context(),r=c(7,t.offset,t.startLoc);return r.value=n,o(r,e.currentOffset(),e.currentPosition()),r}(e,r.value||"");break;case 5:null==r.value&&N(r),t.key=i(e,r.value||"");break;case 6:null==r.value&&N(r),t.key=s(e,r.value||"");break;case 7:null==r.value&&N(r),t.key=a(e,r.value||"");break;default:const n=e.context(),u=c(7,n.offset,n.startLoc);return u.value="",o(u,n.offset,n.startLoc),t.key=u,o(t,n.offset,n.startLoc),{nextConsumeToken:r,node:t}}return o(t,e.currentOffset(),e.currentPosition()),{node:t}}function f(e){const n=e.context(),t=c(2,1===n.currentType?e.currentOffset():n.offset,1===n.currentType?n.endLoc:n.startLoc);t.items=[];let r=null;do{const n=r||e.nextToken();switch(r=null,n.type){case 0:null==n.value&&N(n),t.items.push(u(e,n.value||""));break;case 6:null==n.value&&N(n),t.items.push(s(e,n.value||""));break;case 5:null==n.value&&N(n),t.items.push(i(e,n.value||""));break;case 7:null==n.value&&N(n),t.items.push(a(e,n.value||""));break;case 8:const c=l(e);t.items.push(c.node),r=c.nextConsumeToken||null}}while(14!==n.currentType&&1!==n.currentType);return o(t,1===n.currentType?n.lastOffset:e.currentOffset(),1===n.currentType?n.lastEndLoc:e.currentPosition()),t}function d(e){const n=e.context(),{offset:t,startLoc:r}=n,u=f(e);return 14===n.currentType?u:function(e,n,t,r){const u=e.context();let s=0===r.items.length;const i=c(1,n,t);i.cases=[],i.cases.push(r);do{const n=f(e);s||(s=0===n.items.length),i.cases.push(n)}while(14!==u.currentType);return o(i,e.currentOffset(),e.currentPosition()),i}(e,t,r,u)}return{parse:function(r){const u=p(r,e({},n)),s=u.context(),i=c(0,s.offset,s.startLoc);return t&&i.loc&&(i.loc.source=r),i.body=d(u),o(i,u.currentOffset(),u.currentPosition()),i}}}function N(e){if(14===e.type)return"EOF";const n=(e.value||"").replace(/\r?\n/gu,"\\n");return n.length>10?n.slice(0,9)+"…":n}function _(e,n){for(let t=0;t<e.length;t++)T(e[t],n)}function T(e,n){switch(e.type){case 1:_(e.cases,n),n.helper("plural");break;case 2:_(e.items,n);break;case 6:T(e.key,n),n.helper("linked");break;case 5:n.helper("interpolate"),n.helper("list");break;case 4:n.helper("interpolate"),n.helper("named")}}function C(e,n={}){const t=function(e,n={}){const t={ast:e,helpers:new Set};return{context:()=>t,helper:e=>(t.helpers.add(e),e)}}(e);t.helper("normalize"),e.body&&T(e.body,t);const r=t.context();e.helpers=Array.from(r.helpers)}function P(e,n){const{helper:t}=e;switch(n.type){case 0:!function(e,n){n.body?P(e,n.body):e.push("null")}(e,n);break;case 1:!function(e,n){const{helper:t,needIndent:r}=e;if(n.cases.length>1){e.push(`${t("plural")}([`),e.indent(r());const c=n.cases.length;for(let t=0;t<c&&(P(e,n.cases[t]),t!==c-1);t++)e.push(", ");e.deindent(r()),e.push("])")}}(e,n);break;case 2:!function(e,n){const{helper:t,needIndent:r}=e;e.push(`${t("normalize")}([`),e.indent(r());const c=n.items.length;for(let t=0;t<c&&(P(e,n.items[t]),t!==c-1);t++)e.push(", ");e.deindent(r()),e.push("])")}(e,n);break;case 6:!function(e,n){const{helper:t}=e;e.push(`${t("linked")}(`),P(e,n.key),n.modifier&&(e.push(", "),P(e,n.modifier)),e.push(")")}(e,n);break;case 8:case 7:e.push(JSON.stringify(n.value),n);break;case 5:e.push(`${t("interpolate")}(${t("list")}(${n.index}))`,n);break;case 4:e.push(`${t("interpolate")}(${t("named")}(${JSON.stringify(n.key)}))`,n);break;case 9:case 3:e.push(JSON.stringify(n.value),n)}}function x(t,r={}){const c=e({},r),o=h(c).parse(t);return C(o,c),((e,t={})=>{const r=n(t.mode)?t.mode:"normal",c=n(t.filename)?t.filename:"message.intl",o=t.needIndent?t.needIndent:"arrow"!==r,u=e.helpers||[],s=function(e,n){const{filename:t,breakLineCode:r,needIndent:c}=n,o={source:e.loc.source,filename:t,code:"",column:1,line:1,offset:0,map:void 0,breakLineCode:r,needIndent:c,indentLevel:0};function u(e,n){o.code+=e}function s(e,n=!0){const t=n?r:"";u(c?t+" ".repeat(e):t)}return{context:()=>o,push:u,indent:function(e=!0){const n=++o.indentLevel;e&&s(n)},deindent:function(e=!0){const n=--o.indentLevel;e&&s(n)},newline:function(){s(o.indentLevel)},helper:e=>`_${e}`,needIndent:()=>o.needIndent}}(e,{mode:r,filename:c,sourceMap:!!t.sourceMap,breakLineCode:null!=t.breakLineCode?t.breakLineCode:"arrow"===r?";":"\n",needIndent:o});s.push("normal"===r?"function __msg__ (ctx) {":"(ctx) => {"),s.indent(o),u.length>0&&(s.push(`const { ${u.map((e=>`${e}: _${e}`)).join(", ")} } = ctx`),s.newline()),s.push("return "),P(s,e),s.deindent(o),s.push("}");const{code:i,map:a}=s.context();return{ast:e,code:i,map:a?a.toJSON():void 0}})(o,c)}export{t as CompileErrorCodes,E as ERROR_DOMAIN,u as LocationStub,x as baseCompile,c as createCompileError,i as createLocation,h as createParser,s as createPosition,o as defaultOnError,r as errorMessages};
/*!
* message-compiler v9.2.0-beta.3
* message-compiler v9.2.0-beta.4
* (c) 2021 kazuya kawaguchi

@@ -7,3 +7,2 @@ * Released under the MIT License.

import { format, assign, isString } from '@intlify/shared';
import { SourceMapGenerator } from 'source-map';

@@ -1184,8 +1183,2 @@ const CompileErrorCodes = {

_context.code += code;
if (_context.map) {
if (node && node.loc && node.loc !== LocationStub) {
addMapping(node.loc.start, getMappingName(node));
}
advancePositionWithSource(_context, code);
}
}

@@ -1209,20 +1202,2 @@ function _newline(n, withBreakLine = true) {

const needIndent = () => _context.needIndent;
function addMapping(loc, name) {
_context.map.addMapping({
name,
source: _context.filename,
original: {
line: loc.line,
column: loc.column - 1
},
generated: {
line: _context.line,
column: _context.column - 1
}
});
}
if (sourceMap) {
_context.map = new SourceMapGenerator();
_context.map.setSourceContent(filename, _context.source);
}
return {

@@ -1367,37 +1342,2 @@ context,

};
function getMappingName(node) {
switch (node.type) {
case 3 /* Text */:
return node.value;
case 5 /* List */:
return node.index.toString();
case 4 /* Named */:
return node.key;
case 9 /* Literal */:
return node.value;
case 8 /* LinkedModifier */:
return node.value;
case 7 /* LinkedKey */:
return node.value;
default:
return undefined;
}
}
function advancePositionWithSource(pos, source, numberOfCharacters = source.length) {
let linesCount = 0;
let lastNewLinePos = -1;
for (let i = 0; i < numberOfCharacters; i++) {
if (source.charCodeAt(i) === 10 /* newline char code */) {
linesCount++;
lastNewLinePos = i;
}
}
pos.offset += numberOfCharacters;
pos.line += linesCount;
pos.column =
lastNewLinePos === -1
? pos.column + numberOfCharacters
: numberOfCharacters - lastNewLinePos;
return pos;
}

@@ -1404,0 +1344,0 @@ function baseCompile(source, options = {}) {

/*!
* message-compiler v9.2.0-beta.3
* message-compiler v9.2.0-beta.4
* (c) 2021 kazuya kawaguchi
* Released under the MIT License.
*/
var IntlifyMessageCompiler=function(e){"use strict";const n=Object.assign,t=e=>"string"==typeof e,r={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},o={[r.EXPECTED_TOKEN]:"Expected token: '{0}'",[r.INVALID_TOKEN_IN_PLACEHOLDER]:"Invalid token in placeholder: '{0}'",[r.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER]:"Unterminated single quote in placeholder",[r.UNKNOWN_ESCAPE_SEQUENCE]:"Unknown escape sequence: \\{0}",[r.INVALID_UNICODE_ESCAPE_SEQUENCE]:"Invalid unicode escape sequence: {0}",[r.UNBALANCED_CLOSING_BRACE]:"Unbalanced closing brace",[r.UNTERMINATED_CLOSING_BRACE]:"Unterminated closing brace",[r.EMPTY_PLACEHOLDER]:"Empty placeholder",[r.NOT_ALLOW_NEST_PLACEHOLDER]:"Not allowed nest placeholder",[r.INVALID_LINKED_FORMAT]:"Invalid linked format",[r.MUST_HAVE_MESSAGES_IN_PLURAL]:"Plural must have messages",[r.UNEXPECTED_EMPTY_LINKED_MODIFIER]:"Unexpected empty linked modifier",[r.UNEXPECTED_EMPTY_LINKED_KEY]:"Unexpected empty linked key",[r.UNEXPECTED_LEXICAL_ANALYSIS]:"Unexpected lexical analysis in token: '{0}'"};function i(e,n,t={}){const{domain:r}=t,o=new SyntaxError(String(e));return o.code=e,n&&(o.location=n),o.domain=r,o}const s={start:{line:1,column:1,offset:0},end:{line:1,column:1,offset:0}};function u(e,n,t){return{line:e,column:n,offset:t}}function a(e,n,t){const r={start:e,end:n};return null!=t&&(r.source=t),r}const c=" ",l="\n",p=String.fromCharCode(8232),f=String.fromCharCode(8233);function h(e){const n=e;let t=0,r=1,o=1,i=0;const s=e=>"\r"===n[e]&&n[e+1]===l,u=e=>n[e]===f,a=e=>n[e]===p,c=e=>s(e)||(e=>n[e]===l)(e)||u(e)||a(e),h=e=>s(e)||u(e)||a(e)?l:n[e];function g(){return i=0,c(t)&&(r++,o=0),s(t)&&t++,t++,o++,n[t]}return{index:()=>t,line:()=>r,column:()=>o,peekOffset:()=>i,charAt:h,currentChar:()=>h(t),currentPeek:()=>h(t+i),next:g,peek:function(){return s(t+i)&&i++,i++,n[t+i]},reset:function(){t=0,r=1,o=1,i=0},resetPeek:function(e=0){i=e},skipToPeek:function(){const e=t+i;for(;e!==t;)g();i=0}}}const g=void 0;function d(e,n={}){const t=!1!==n.location,o=h(e),s=()=>o.index(),p=()=>u(o.line(),o.column(),o.index()),f=p(),d=s(),m={currentType:14,offset:d,startLoc:f,endLoc:f,lastType:14,lastOffset:d,lastStartLoc:f,lastEndLoc:f,braceNest:0,inLinked:!1,text:""},_=()=>m,{onError:E}=n;function L(e,n,t,...r){const o=_();if(n.column+=t,n.offset+=t,E){const t=i(e,a(o.startLoc,n),{domain:"tokenizer",args:r});E(t)}}function C(e,n,r){e.endLoc=p(),e.currentType=n;const o={type:n};return t&&(o.loc=a(e.startLoc,e.endLoc)),null!=r&&(o.value=r),o}const A=e=>C(e,14);function y(e,n){return e.currentChar()===n?(e.next(),n):(L(r.EXPECTED_TOKEN,p(),0,n),"")}function S(e){let n="";for(;e.currentPeek()===c||e.currentPeek()===l;)n+=e.currentPeek(),e.peek();return n}function v(e){const n=S(e);return e.skipToPeek(),n}function N(e){if(e===g)return!1;const n=e.charCodeAt(0);return n>=97&&n<=122||n>=65&&n<=90||95===n}function O(e,n){const{currentType:t}=n;if(2!==t)return!1;S(e);const r=function(e){if(e===g)return!1;const n=e.charCodeAt(0);return n>=48&&n<=57}("-"===e.currentPeek()?e.peek():e.currentPeek());return e.resetPeek(),r}function T(e){S(e);const n="|"===e.currentPeek();return e.resetPeek(),n}function I(e,n=!0){const t=(n=!1,r="",o=!1)=>{const i=e.currentPeek();return"{"===i?"%"!==r&&n:"@"!==i&&i?"%"===i?(e.peek(),t(n,"%",!0)):"|"===i?!("%"!==r&&!o)||!(r===c||r===l):i===c?(e.peek(),t(!0,c,o)):i!==l||(e.peek(),t(!0,l,o)):"%"===r||n},r=t();return n&&e.resetPeek(),r}function P(e,n){const t=e.currentChar();return t===g?g:n(t)?(e.next(),t):null}function M(e){return P(e,(e=>{const n=e.charCodeAt(0);return n>=97&&n<=122||n>=65&&n<=90||n>=48&&n<=57||95===n||36===n}))}function k(e){return P(e,(e=>{const n=e.charCodeAt(0);return n>=48&&n<=57}))}function R(e){return P(e,(e=>{const n=e.charCodeAt(0);return n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102}))}function b(e){let n="",t="";for(;n=k(e);)t+=n;return t}function w(e){const n=e.currentChar();switch(n){case"\\":case"'":return e.next(),`\\${n}`;case"u":return D(e,n,4);case"U":return D(e,n,6);default:return L(r.UNKNOWN_ESCAPE_SEQUENCE,p(),0,n),""}}function D(e,n,t){y(e,n);let o="";for(let i=0;i<t;i++){const t=R(e);if(!t){L(r.INVALID_UNICODE_ESCAPE_SEQUENCE,p(),0,`\\${n}${o}${e.currentChar()}`);break}o+=t}return`\\${n}${o}`}function U(e){v(e);const n=y(e,"|");return v(e),n}function x(e,n){let t=null;switch(e.currentChar()){case"{":return n.braceNest>=1&&L(r.NOT_ALLOW_NEST_PLACEHOLDER,p(),0),e.next(),t=C(n,2,"{"),v(e),n.braceNest++,t;case"}":return n.braceNest>0&&2===n.currentType&&L(r.EMPTY_PLACEHOLDER,p(),0),e.next(),t=C(n,3,"}"),n.braceNest--,n.braceNest>0&&v(e),n.inLinked&&0===n.braceNest&&(n.inLinked=!1),t;case"@":return n.braceNest>0&&L(r.UNTERMINATED_CLOSING_BRACE,p(),0),t=G(e,n)||A(n),n.braceNest=0,t;default:let o=!0,i=!0,s=!0;if(T(e))return n.braceNest>0&&L(r.UNTERMINATED_CLOSING_BRACE,p(),0),t=C(n,1,U(e)),n.braceNest=0,n.inLinked=!1,t;if(n.braceNest>0&&(5===n.currentType||6===n.currentType||7===n.currentType))return L(r.UNTERMINATED_CLOSING_BRACE,p(),0),n.braceNest=0,B(e,n);if(o=function(e,n){const{currentType:t}=n;if(2!==t)return!1;S(e);const r=N(e.currentPeek());return e.resetPeek(),r}(e,n))return t=C(n,5,function(e){v(e);let n="",t="";for(;n=M(e);)t+=n;return e.currentChar()===g&&L(r.UNTERMINATED_CLOSING_BRACE,p(),0),t}(e)),v(e),t;if(i=O(e,n))return t=C(n,6,function(e){v(e);let n="";return"-"===e.currentChar()?(e.next(),n+=`-${b(e)}`):n+=b(e),e.currentChar()===g&&L(r.UNTERMINATED_CLOSING_BRACE,p(),0),n}(e)),v(e),t;if(s=function(e,n){const{currentType:t}=n;if(2!==t)return!1;S(e);const r="'"===e.currentPeek();return e.resetPeek(),r}(e,n))return t=C(n,7,function(e){v(e),y(e,"'");let n="",t="";const o=e=>"'"!==e&&e!==l;for(;n=P(e,o);)t+="\\"===n?w(e):n;const i=e.currentChar();return i===l||i===g?(L(r.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,p(),0),i===l&&(e.next(),y(e,"'")),t):(y(e,"'"),t)}(e)),v(e),t;if(!o&&!i&&!s)return t=C(n,13,function(e){v(e);let n="",t="";const r=e=>"{"!==e&&"}"!==e&&e!==c&&e!==l;for(;n=P(e,r);)t+=n;return t}(e)),L(r.INVALID_TOKEN_IN_PLACEHOLDER,p(),0,t.value),v(e),t}return t}function G(e,n){const{currentType:t}=n;let o=null;const i=e.currentChar();switch(8!==t&&9!==t&&12!==t&&10!==t||i!==l&&i!==c||L(r.INVALID_LINKED_FORMAT,p(),0),i){case"@":return e.next(),o=C(n,8,"@"),n.inLinked=!0,o;case".":return v(e),e.next(),C(n,9,".");case":":return v(e),e.next(),C(n,10,":");default:return T(e)?(o=C(n,1,U(e)),n.braceNest=0,n.inLinked=!1,o):function(e,n){const{currentType:t}=n;if(8!==t)return!1;S(e);const r="."===e.currentPeek();return e.resetPeek(),r}(e,n)||function(e,n){const{currentType:t}=n;if(8!==t&&12!==t)return!1;S(e);const r=":"===e.currentPeek();return e.resetPeek(),r}(e,n)?(v(e),G(e,n)):function(e,n){const{currentType:t}=n;if(9!==t)return!1;S(e);const r=N(e.currentPeek());return e.resetPeek(),r}(e,n)?(v(e),C(n,12,function(e){let n="",t="";for(;n=M(e);)t+=n;return t}(e))):function(e,n){const{currentType:t}=n;if(10!==t)return!1;const r=()=>{const n=e.currentPeek();return"{"===n?N(e.peek()):!("@"===n||"%"===n||"|"===n||":"===n||"."===n||n===c||!n)&&(n===l?(e.peek(),r()):N(n))},o=r();return e.resetPeek(),o}(e,n)?(v(e),"{"===i?x(e,n)||o:C(n,11,function(e){const n=(t=!1,r)=>{const o=e.currentChar();return"{"!==o&&"%"!==o&&"@"!==o&&"|"!==o&&o?o===c?r:o===l?(r+=o,e.next(),n(t,r)):(r+=o,e.next(),n(!0,r)):r};return n(!1,"")}(e))):(8===t&&L(r.INVALID_LINKED_FORMAT,p(),0),n.braceNest=0,n.inLinked=!1,B(e,n))}}function B(e,n){let t={type:14};if(n.braceNest>0)return x(e,n)||A(n);if(n.inLinked)return G(e,n)||A(n);const o=e.currentChar();switch(o){case"{":return x(e,n)||A(n);case"}":return L(r.UNBALANCED_CLOSING_BRACE,p(),0),e.next(),C(n,3,"}");case"@":return G(e,n)||A(n);default:if(T(e))return t=C(n,1,U(e)),n.braceNest=0,n.inLinked=!1,t;if(I(e))return C(n,0,function(e){const n=t=>{const r=e.currentChar();return"{"!==r&&"}"!==r&&"@"!==r&&r?"%"===r?I(e)?(t+=r,e.next(),n(t)):t:"|"===r?t:r===c||r===l?I(e)?(t+=r,e.next(),n(t)):T(e)?t:(t+=r,e.next(),n(t)):(t+=r,e.next(),n(t)):t};return n("")}(e));if("%"===o)return e.next(),C(n,4,"%")}return t}return{nextToken:function(){const{currentType:e,offset:n,startLoc:t,endLoc:r}=m;return m.lastType=e,m.lastOffset=n,m.lastStartLoc=t,m.lastEndLoc=r,m.offset=s(),m.startLoc=p(),o.currentChar()===g?C(m,14):B(o,m)},currentOffset:s,currentPosition:p,context:_}}const m="parser",_=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function E(e,n,t){switch(e){case"\\\\":return"\\";case"\\'":return"'";default:{const e=parseInt(n||t,16);return e<=55295||e>=57344?String.fromCodePoint(e):"�"}}}function L(e={}){const t=!1!==e.location,{onError:o}=e;function s(e,n,t,r,...s){const u=e.currentPosition();if(u.offset+=r,u.column+=r,o){const e=i(n,a(t,u),{domain:m,args:s});o(e)}}function u(e,n,r){const o={type:e,start:n,end:n};return t&&(o.loc={start:r,end:r}),o}function c(e,n,r,o){e.end=n,o&&(e.type=o),t&&e.loc&&(e.loc.end=r)}function l(e,n){const t=e.context(),r=u(3,t.offset,t.startLoc);return r.value=n,c(r,e.currentOffset(),e.currentPosition()),r}function p(e,n){const t=e.context(),{lastOffset:r,lastStartLoc:o}=t,i=u(5,r,o);return i.index=parseInt(n,10),e.nextToken(),c(i,e.currentOffset(),e.currentPosition()),i}function f(e,n){const t=e.context(),{lastOffset:r,lastStartLoc:o}=t,i=u(4,r,o);return i.key=n,e.nextToken(),c(i,e.currentOffset(),e.currentPosition()),i}function h(e,n){const t=e.context(),{lastOffset:r,lastStartLoc:o}=t,i=u(9,r,o);return i.value=n.replace(_,E),e.nextToken(),c(i,e.currentOffset(),e.currentPosition()),i}function g(e){const n=e.context(),t=u(6,n.offset,n.startLoc);let o=e.nextToken();if(9===o.type){const n=function(e){const n=e.nextToken(),t=e.context(),{lastOffset:o,lastStartLoc:i}=t,a=u(8,o,i);return 12!==n.type?(s(e,r.UNEXPECTED_EMPTY_LINKED_MODIFIER,t.lastStartLoc,0),a.value="",c(a,o,i),{nextConsumeToken:n,node:a}):(null==n.value&&s(e,r.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,C(n)),a.value=n.value||"",c(a,e.currentOffset(),e.currentPosition()),{node:a})}(e);t.modifier=n.node,o=n.nextConsumeToken||e.nextToken()}switch(10!==o.type&&s(e,r.UNEXPECTED_LEXICAL_ANALYSIS,n.lastStartLoc,0,C(o)),o=e.nextToken(),2===o.type&&(o=e.nextToken()),o.type){case 11:null==o.value&&s(e,r.UNEXPECTED_LEXICAL_ANALYSIS,n.lastStartLoc,0,C(o)),t.key=function(e,n){const t=e.context(),r=u(7,t.offset,t.startLoc);return r.value=n,c(r,e.currentOffset(),e.currentPosition()),r}(e,o.value||"");break;case 5:null==o.value&&s(e,r.UNEXPECTED_LEXICAL_ANALYSIS,n.lastStartLoc,0,C(o)),t.key=f(e,o.value||"");break;case 6:null==o.value&&s(e,r.UNEXPECTED_LEXICAL_ANALYSIS,n.lastStartLoc,0,C(o)),t.key=p(e,o.value||"");break;case 7:null==o.value&&s(e,r.UNEXPECTED_LEXICAL_ANALYSIS,n.lastStartLoc,0,C(o)),t.key=h(e,o.value||"");break;default:s(e,r.UNEXPECTED_EMPTY_LINKED_KEY,n.lastStartLoc,0);const i=e.context(),a=u(7,i.offset,i.startLoc);return a.value="",c(a,i.offset,i.startLoc),t.key=a,c(t,i.offset,i.startLoc),{nextConsumeToken:o,node:t}}return c(t,e.currentOffset(),e.currentPosition()),{node:t}}function L(e){const n=e.context(),t=u(2,1===n.currentType?e.currentOffset():n.offset,1===n.currentType?n.endLoc:n.startLoc);t.items=[];let o=null;do{const i=o||e.nextToken();switch(o=null,i.type){case 0:null==i.value&&s(e,r.UNEXPECTED_LEXICAL_ANALYSIS,n.lastStartLoc,0,C(i)),t.items.push(l(e,i.value||""));break;case 6:null==i.value&&s(e,r.UNEXPECTED_LEXICAL_ANALYSIS,n.lastStartLoc,0,C(i)),t.items.push(p(e,i.value||""));break;case 5:null==i.value&&s(e,r.UNEXPECTED_LEXICAL_ANALYSIS,n.lastStartLoc,0,C(i)),t.items.push(f(e,i.value||""));break;case 7:null==i.value&&s(e,r.UNEXPECTED_LEXICAL_ANALYSIS,n.lastStartLoc,0,C(i)),t.items.push(h(e,i.value||""));break;case 8:const u=g(e);t.items.push(u.node),o=u.nextConsumeToken||null}}while(14!==n.currentType&&1!==n.currentType);return c(t,1===n.currentType?n.lastOffset:e.currentOffset(),1===n.currentType?n.lastEndLoc:e.currentPosition()),t}function A(e){const n=e.context(),{offset:t,startLoc:o}=n,i=L(e);return 14===n.currentType?i:function(e,n,t,o){const i=e.context();let a=0===o.items.length;const l=u(1,n,t);l.cases=[],l.cases.push(o);do{const n=L(e);a||(a=0===n.items.length),l.cases.push(n)}while(14!==i.currentType);return a&&s(e,r.MUST_HAVE_MESSAGES_IN_PLURAL,t,0),c(l,e.currentOffset(),e.currentPosition()),l}(e,t,o,i)}return{parse:function(o){const i=d(o,n({},e)),a=i.context(),l=u(0,a.offset,a.startLoc);return t&&l.loc&&(l.loc.source=o),l.body=A(i),14!==a.currentType&&s(i,r.UNEXPECTED_LEXICAL_ANALYSIS,a.lastStartLoc,0,o[a.offset]||""),c(l,i.currentOffset(),i.currentPosition()),l}}}function C(e){if(14===e.type)return"EOF";const n=(e.value||"").replace(/\r?\n/gu,"\\n");return n.length>10?n.slice(0,9)+"…":n}function A(e,n){for(let t=0;t<e.length;t++)y(e[t],n)}function y(e,n){switch(e.type){case 1:A(e.cases,n),n.helper("plural");break;case 2:A(e.items,n);break;case 6:y(e.key,n),n.helper("linked");break;case 5:n.helper("interpolate"),n.helper("list");break;case 4:n.helper("interpolate"),n.helper("named")}}function S(e,n={}){const t=function(e,n={}){const t={ast:e,helpers:new Set};return{context:()=>t,helper:e=>(t.helpers.add(e),e)}}(e);t.helper("normalize"),e.body&&y(e.body,t);const r=t.context();e.helpers=Array.from(r.helpers)}var v={},N={},O={},T={},I="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");T.encode=function(e){if(0<=e&&e<I.length)return I[e];throw new TypeError("Must be between 0 and 63: "+e)},T.decode=function(e){return 65<=e&&e<=90?e-65:97<=e&&e<=122?e-97+26:48<=e&&e<=57?e-48+52:43==e?62:47==e?63:-1};var P=T;O.encode=function(e){var n,t="",r=function(e){return e<0?1+(-e<<1):0+(e<<1)}(e);do{n=31&r,(r>>>=5)>0&&(n|=32),t+=P.encode(n)}while(r>0);return t},O.decode=function(e,n,t){var r,o,i,s,u=e.length,a=0,c=0;do{if(n>=u)throw new Error("Expected more digits in base 64 VLQ value.");if(-1===(o=P.decode(e.charCodeAt(n++))))throw new Error("Invalid base64 digit: "+e.charAt(n-1));r=!!(32&o),a+=(o&=31)<<c,c+=5}while(r);t.value=(s=(i=a)>>1,1==(1&i)?-s:s),t.rest=n};var M={};!function(e){e.getArg=function(e,n,t){if(n in e)return e[n];if(3===arguments.length)return t;throw new Error('"'+n+'" is a required argument.')};var n=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,t=/^data:.+\,.+$/;function r(e){var t=e.match(n);return t?{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}:null}function o(e){var n="";return e.scheme&&(n+=e.scheme+":"),n+="//",e.auth&&(n+=e.auth+"@"),e.host&&(n+=e.host),e.port&&(n+=":"+e.port),e.path&&(n+=e.path),n}function i(n){var t=n,i=r(n);if(i){if(!i.path)return n;t=i.path}for(var s,u=e.isAbsolute(t),a=t.split(/\/+/),c=0,l=a.length-1;l>=0;l--)"."===(s=a[l])?a.splice(l,1):".."===s?c++:c>0&&(""===s?(a.splice(l+1,c),c=0):(a.splice(l,2),c--));return""===(t=a.join("/"))&&(t=u?"/":"."),i?(i.path=t,o(i)):t}function s(e,n){""===e&&(e="."),""===n&&(n=".");var s=r(n),u=r(e);if(u&&(e=u.path||"/"),s&&!s.scheme)return u&&(s.scheme=u.scheme),o(s);if(s||n.match(t))return n;if(u&&!u.host&&!u.path)return u.host=n,o(u);var a="/"===n.charAt(0)?n:i(e.replace(/\/+$/,"")+"/"+n);return u?(u.path=a,o(u)):a}e.urlParse=r,e.urlGenerate=o,e.normalize=i,e.join=s,e.isAbsolute=function(e){return"/"===e.charAt(0)||n.test(e)},e.relative=function(e,n){""===e&&(e="."),e=e.replace(/\/$/,"");for(var t=0;0!==n.indexOf(e+"/");){var r=e.lastIndexOf("/");if(r<0)return n;if((e=e.slice(0,r)).match(/^([^\/]+:\/)?\/*$/))return n;++t}return Array(t+1).join("../")+n.substr(e.length+1)};var u=!("__proto__"in Object.create(null));function a(e){return e}function c(e){if(!e)return!1;var n=e.length;if(n<9)return!1;if(95!==e.charCodeAt(n-1)||95!==e.charCodeAt(n-2)||111!==e.charCodeAt(n-3)||116!==e.charCodeAt(n-4)||111!==e.charCodeAt(n-5)||114!==e.charCodeAt(n-6)||112!==e.charCodeAt(n-7)||95!==e.charCodeAt(n-8)||95!==e.charCodeAt(n-9))return!1;for(var t=n-10;t>=0;t--)if(36!==e.charCodeAt(t))return!1;return!0}function l(e,n){return e===n?0:null===e?1:null===n?-1:e>n?1:-1}e.toSetString=u?a:function(e){return c(e)?"$"+e:e},e.fromSetString=u?a:function(e){return c(e)?e.slice(1):e},e.compareByOriginalPositions=function(e,n,t){var r=l(e.source,n.source);return 0!==r||0!==(r=e.originalLine-n.originalLine)||0!==(r=e.originalColumn-n.originalColumn)||t||0!==(r=e.generatedColumn-n.generatedColumn)||0!==(r=e.generatedLine-n.generatedLine)?r:l(e.name,n.name)},e.compareByGeneratedPositionsDeflated=function(e,n,t){var r=e.generatedLine-n.generatedLine;return 0!==r||0!==(r=e.generatedColumn-n.generatedColumn)||t||0!==(r=l(e.source,n.source))||0!==(r=e.originalLine-n.originalLine)||0!==(r=e.originalColumn-n.originalColumn)?r:l(e.name,n.name)},e.compareByGeneratedPositionsInflated=function(e,n){var t=e.generatedLine-n.generatedLine;return 0!==t||0!==(t=e.generatedColumn-n.generatedColumn)||0!==(t=l(e.source,n.source))||0!==(t=e.originalLine-n.originalLine)||0!==(t=e.originalColumn-n.originalColumn)?t:l(e.name,n.name)},e.parseSourceMapInput=function(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))},e.computeSourceURL=function(e,n,t){if(n=n||"",e&&("/"!==e[e.length-1]&&"/"!==n[0]&&(e+="/"),n=e+n),t){var u=r(t);if(!u)throw new Error("sourceMapURL could not be parsed");if(u.path){var a=u.path.lastIndexOf("/");a>=0&&(u.path=u.path.substring(0,a+1))}n=s(o(u),n)}return i(n)}}(M);var k={},R=M,b=Object.prototype.hasOwnProperty,w="undefined"!=typeof Map;function D(){this._array=[],this._set=w?new Map:Object.create(null)}D.fromArray=function(e,n){for(var t=new D,r=0,o=e.length;r<o;r++)t.add(e[r],n);return t},D.prototype.size=function(){return w?this._set.size:Object.getOwnPropertyNames(this._set).length},D.prototype.add=function(e,n){var t=w?e:R.toSetString(e),r=w?this.has(e):b.call(this._set,t),o=this._array.length;r&&!n||this._array.push(e),r||(w?this._set.set(e,o):this._set[t]=o)},D.prototype.has=function(e){if(w)return this._set.has(e);var n=R.toSetString(e);return b.call(this._set,n)},D.prototype.indexOf=function(e){if(w){var n=this._set.get(e);if(n>=0)return n}else{var t=R.toSetString(e);if(b.call(this._set,t))return this._set[t]}throw new Error('"'+e+'" is not in the set.')},D.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)},D.prototype.toArray=function(){return this._array.slice()},k.ArraySet=D;var U={},x=M;function G(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}G.prototype.unsortedForEach=function(e,n){this._array.forEach(e,n)},G.prototype.add=function(e){var n,t,r,o;(o=(t=e).generatedLine)>(r=(n=this._last).generatedLine)||o==r&&t.generatedColumn>=n.generatedColumn||x.compareByGeneratedPositionsInflated(n,t)<=0?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))},G.prototype.toArray=function(){return this._sorted||(this._array.sort(x.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},U.MappingList=G;var B=O,X=M,$=k.ArraySet,j=U.MappingList;function F(e){e||(e={}),this._file=X.getArg(e,"file",null),this._sourceRoot=X.getArg(e,"sourceRoot",null),this._skipValidation=X.getArg(e,"skipValidation",!1),this._sources=new $,this._names=new $,this._mappings=new j,this._sourcesContents=null}F.prototype._version=3,F.fromSourceMap=function(e){var n=e.sourceRoot,t=new F({file:e.file,sourceRoot:n});return e.eachMapping((function(e){var r={generated:{line:e.generatedLine,column:e.generatedColumn}};null!=e.source&&(r.source=e.source,null!=n&&(r.source=X.relative(n,r.source)),r.original={line:e.originalLine,column:e.originalColumn},null!=e.name&&(r.name=e.name)),t.addMapping(r)})),e.sources.forEach((function(r){var o=r;null!==n&&(o=X.relative(n,r)),t._sources.has(o)||t._sources.add(o);var i=e.sourceContentFor(r);null!=i&&t.setSourceContent(r,i)})),t},F.prototype.addMapping=function(e){var n=X.getArg(e,"generated"),t=X.getArg(e,"original",null),r=X.getArg(e,"source",null),o=X.getArg(e,"name",null);this._skipValidation||this._validateMapping(n,t,r,o),null!=r&&(r=String(r),this._sources.has(r)||this._sources.add(r)),null!=o&&(o=String(o),this._names.has(o)||this._names.add(o)),this._mappings.add({generatedLine:n.line,generatedColumn:n.column,originalLine:null!=t&&t.line,originalColumn:null!=t&&t.column,source:r,name:o})},F.prototype.setSourceContent=function(e,n){var t=e;null!=this._sourceRoot&&(t=X.relative(this._sourceRoot,t)),null!=n?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[X.toSetString(t)]=n):this._sourcesContents&&(delete this._sourcesContents[X.toSetString(t)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},F.prototype.applySourceMap=function(e,n,t){var r=n;if(null==n){if(null==e.file)throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.');r=e.file}var o=this._sourceRoot;null!=o&&(r=X.relative(o,r));var i=new $,s=new $;this._mappings.unsortedForEach((function(n){if(n.source===r&&null!=n.originalLine){var u=e.originalPositionFor({line:n.originalLine,column:n.originalColumn});null!=u.source&&(n.source=u.source,null!=t&&(n.source=X.join(t,n.source)),null!=o&&(n.source=X.relative(o,n.source)),n.originalLine=u.line,n.originalColumn=u.column,null!=u.name&&(n.name=u.name))}var a=n.source;null==a||i.has(a)||i.add(a);var c=n.name;null==c||s.has(c)||s.add(c)}),this),this._sources=i,this._names=s,e.sources.forEach((function(n){var r=e.sourceContentFor(n);null!=r&&(null!=t&&(n=X.join(t,n)),null!=o&&(n=X.relative(o,n)),this.setSourceContent(n,r))}),this)},F.prototype._validateMapping=function(e,n,t,r){if(n&&"number"!=typeof n.line&&"number"!=typeof n.column)throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if((!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0)||n||t||r)&&!(e&&"line"in e&&"column"in e&&n&&"line"in n&&"column"in n&&e.line>0&&e.column>=0&&n.line>0&&n.column>=0&&t))throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:t,original:n,name:r}))},F.prototype._serializeMappings=function(){for(var e,n,t,r,o=0,i=1,s=0,u=0,a=0,c=0,l="",p=this._mappings.toArray(),f=0,h=p.length;f<h;f++){if(e="",(n=p[f]).generatedLine!==i)for(o=0;n.generatedLine!==i;)e+=";",i++;else if(f>0){if(!X.compareByGeneratedPositionsInflated(n,p[f-1]))continue;e+=","}e+=B.encode(n.generatedColumn-o),o=n.generatedColumn,null!=n.source&&(r=this._sources.indexOf(n.source),e+=B.encode(r-c),c=r,e+=B.encode(n.originalLine-1-u),u=n.originalLine-1,e+=B.encode(n.originalColumn-s),s=n.originalColumn,null!=n.name&&(t=this._names.indexOf(n.name),e+=B.encode(t-a),a=t)),l+=e}return l},F.prototype._generateSourcesContent=function(e,n){return e.map((function(e){if(!this._sourcesContents)return null;null!=n&&(e=X.relative(n,e));var t=X.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,t)?this._sourcesContents[t]:null}),this)},F.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(e.file=this._file),null!=this._sourceRoot&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},F.prototype.toString=function(){return JSON.stringify(this.toJSON())},N.SourceMapGenerator=F;var Y={},K={};!function(e){function n(t,r,o,i,s,u){var a=Math.floor((r-t)/2)+t,c=s(o,i[a],!0);return 0===c?a:c>0?r-a>1?n(a,r,o,i,s,u):u==e.LEAST_UPPER_BOUND?r<i.length?r:-1:a:a-t>1?n(t,a,o,i,s,u):u==e.LEAST_UPPER_BOUND?a:t<0?-1:t}e.GREATEST_LOWER_BOUND=1,e.LEAST_UPPER_BOUND=2,e.search=function(t,r,o,i){if(0===r.length)return-1;var s=n(-1,r.length,t,r,o,i||e.GREATEST_LOWER_BOUND);if(s<0)return-1;for(;s-1>=0&&0===o(r[s],r[s-1],!0);)--s;return s}}(K);var V={};function H(e,n,t){var r=e[n];e[n]=e[t],e[t]=r}function W(e,n,t,r){if(t<r){var o=t-1;H(e,(a=t,c=r,Math.round(a+Math.random()*(c-a))),r);for(var i=e[r],s=t;s<r;s++)n(e[s],i)<=0&&H(e,o+=1,s);H(e,o+1,s);var u=o+1;W(e,n,t,u-1),W(e,n,u+1,r)}var a,c}V.quickSort=function(e,n){W(e,n,0,e.length-1)};var z=M,Q=K,q=k.ArraySet,J=O,Z=V.quickSort;function ee(e,n){var t=e;return"string"==typeof e&&(t=z.parseSourceMapInput(e)),null!=t.sections?new re(t,n):new ne(t,n)}function ne(e,n){var t=e;"string"==typeof e&&(t=z.parseSourceMapInput(e));var r=z.getArg(t,"version"),o=z.getArg(t,"sources"),i=z.getArg(t,"names",[]),s=z.getArg(t,"sourceRoot",null),u=z.getArg(t,"sourcesContent",null),a=z.getArg(t,"mappings"),c=z.getArg(t,"file",null);if(r!=this._version)throw new Error("Unsupported version: "+r);s&&(s=z.normalize(s)),o=o.map(String).map(z.normalize).map((function(e){return s&&z.isAbsolute(s)&&z.isAbsolute(e)?z.relative(s,e):e})),this._names=q.fromArray(i.map(String),!0),this._sources=q.fromArray(o,!0),this._absoluteSources=this._sources.toArray().map((function(e){return z.computeSourceURL(s,e,n)})),this.sourceRoot=s,this.sourcesContent=u,this._mappings=a,this._sourceMapURL=n,this.file=c}function te(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}function re(e,n){var t=e;"string"==typeof e&&(t=z.parseSourceMapInput(e));var r=z.getArg(t,"version"),o=z.getArg(t,"sections");if(r!=this._version)throw new Error("Unsupported version: "+r);this._sources=new q,this._names=new q;var i={line:-1,column:0};this._sections=o.map((function(e){if(e.url)throw new Error("Support for url field in sections not implemented.");var t=z.getArg(e,"offset"),r=z.getArg(t,"line"),o=z.getArg(t,"column");if(r<i.line||r===i.line&&o<i.column)throw new Error("Section offsets must be ordered and non-overlapping.");return i=t,{generatedOffset:{generatedLine:r+1,generatedColumn:o+1},consumer:new ee(z.getArg(e,"map"),n)}}))}ee.fromSourceMap=function(e,n){return ne.fromSourceMap(e,n)},ee.prototype._version=3,ee.prototype.__generatedMappings=null,Object.defineProperty(ee.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}}),ee.prototype.__originalMappings=null,Object.defineProperty(ee.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}}),ee.prototype._charIsMappingSeparator=function(e,n){var t=e.charAt(n);return";"===t||","===t},ee.prototype._parseMappings=function(e,n){throw new Error("Subclasses must implement _parseMappings")},ee.GENERATED_ORDER=1,ee.ORIGINAL_ORDER=2,ee.GREATEST_LOWER_BOUND=1,ee.LEAST_UPPER_BOUND=2,ee.prototype.eachMapping=function(e,n,t){var r,o=n||null;switch(t||ee.GENERATED_ORDER){case ee.GENERATED_ORDER:r=this._generatedMappings;break;case ee.ORIGINAL_ORDER:r=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var i=this.sourceRoot;r.map((function(e){var n=null===e.source?null:this._sources.at(e.source);return{source:n=z.computeSourceURL(i,n,this._sourceMapURL),generatedLine:e.generatedLine,generatedColumn:e.generatedColumn,originalLine:e.originalLine,originalColumn:e.originalColumn,name:null===e.name?null:this._names.at(e.name)}}),this).forEach(e,o)},ee.prototype.allGeneratedPositionsFor=function(e){var n=z.getArg(e,"line"),t={source:z.getArg(e,"source"),originalLine:n,originalColumn:z.getArg(e,"column",0)};if(t.source=this._findSourceIndex(t.source),t.source<0)return[];var r=[],o=this._findMapping(t,this._originalMappings,"originalLine","originalColumn",z.compareByOriginalPositions,Q.LEAST_UPPER_BOUND);if(o>=0){var i=this._originalMappings[o];if(void 0===e.column)for(var s=i.originalLine;i&&i.originalLine===s;)r.push({line:z.getArg(i,"generatedLine",null),column:z.getArg(i,"generatedColumn",null),lastColumn:z.getArg(i,"lastGeneratedColumn",null)}),i=this._originalMappings[++o];else for(var u=i.originalColumn;i&&i.originalLine===n&&i.originalColumn==u;)r.push({line:z.getArg(i,"generatedLine",null),column:z.getArg(i,"generatedColumn",null),lastColumn:z.getArg(i,"lastGeneratedColumn",null)}),i=this._originalMappings[++o]}return r},Y.SourceMapConsumer=ee,(ne.prototype=Object.create(ee.prototype)).consumer=ee,ne.prototype._findSourceIndex=function(e){var n,t=e;if(null!=this.sourceRoot&&(t=z.relative(this.sourceRoot,t)),this._sources.has(t))return this._sources.indexOf(t);for(n=0;n<this._absoluteSources.length;++n)if(this._absoluteSources[n]==e)return n;return-1},ne.fromSourceMap=function(e,n){var t=Object.create(ne.prototype),r=t._names=q.fromArray(e._names.toArray(),!0),o=t._sources=q.fromArray(e._sources.toArray(),!0);t.sourceRoot=e._sourceRoot,t.sourcesContent=e._generateSourcesContent(t._sources.toArray(),t.sourceRoot),t.file=e._file,t._sourceMapURL=n,t._absoluteSources=t._sources.toArray().map((function(e){return z.computeSourceURL(t.sourceRoot,e,n)}));for(var i=e._mappings.toArray().slice(),s=t.__generatedMappings=[],u=t.__originalMappings=[],a=0,c=i.length;a<c;a++){var l=i[a],p=new te;p.generatedLine=l.generatedLine,p.generatedColumn=l.generatedColumn,l.source&&(p.source=o.indexOf(l.source),p.originalLine=l.originalLine,p.originalColumn=l.originalColumn,l.name&&(p.name=r.indexOf(l.name)),u.push(p)),s.push(p)}return Z(t.__originalMappings,z.compareByOriginalPositions),t},ne.prototype._version=3,Object.defineProperty(ne.prototype,"sources",{get:function(){return this._absoluteSources.slice()}}),ne.prototype._parseMappings=function(e,n){for(var t,r,o,i,s=1,u=0,a=0,c=0,l=0,p=0,f=e.length,h=0,g={},d={},m=[],_=[];h<f;)if(";"===e.charAt(h))s++,h++,u=0;else if(","===e.charAt(h))h++;else{for((t=new te).generatedLine=s,i=h;i<f&&!this._charIsMappingSeparator(e,i);i++);if(o=g[r=e.slice(h,i)])h+=r.length;else{for(o=[];h<i;)J.decode(e,h,d),h=d.rest,o.push(d.value);if(2===o.length)throw new Error("Found a source, but no line and column");if(3===o.length)throw new Error("Found a source and line, but no column");g[r]=o}t.generatedColumn=u+o[0],u=t.generatedColumn,o.length>1&&(t.source=l+o[1],l+=o[1],t.originalLine=a+o[2],a=t.originalLine,t.originalLine+=1,t.originalColumn=c+o[3],c=t.originalColumn,o.length>4&&(t.name=p+o[4],p+=o[4])),_.push(t),"number"==typeof t.originalLine&&m.push(t)}Z(_,z.compareByGeneratedPositionsDeflated),this.__generatedMappings=_,Z(m,z.compareByOriginalPositions),this.__originalMappings=m},ne.prototype._findMapping=function(e,n,t,r,o,i){if(e[t]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[t]);if(e[r]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[r]);return Q.search(e,n,o,i)},ne.prototype.computeColumnSpans=function(){for(var e=0;e<this._generatedMappings.length;++e){var n=this._generatedMappings[e];if(e+1<this._generatedMappings.length){var t=this._generatedMappings[e+1];if(n.generatedLine===t.generatedLine){n.lastGeneratedColumn=t.generatedColumn-1;continue}}n.lastGeneratedColumn=1/0}},ne.prototype.originalPositionFor=function(e){var n={generatedLine:z.getArg(e,"line"),generatedColumn:z.getArg(e,"column")},t=this._findMapping(n,this._generatedMappings,"generatedLine","generatedColumn",z.compareByGeneratedPositionsDeflated,z.getArg(e,"bias",ee.GREATEST_LOWER_BOUND));if(t>=0){var r=this._generatedMappings[t];if(r.generatedLine===n.generatedLine){var o=z.getArg(r,"source",null);null!==o&&(o=this._sources.at(o),o=z.computeSourceURL(this.sourceRoot,o,this._sourceMapURL));var i=z.getArg(r,"name",null);return null!==i&&(i=this._names.at(i)),{source:o,line:z.getArg(r,"originalLine",null),column:z.getArg(r,"originalColumn",null),name:i}}}return{source:null,line:null,column:null,name:null}},ne.prototype.hasContentsOfAllSources=function(){return!!this.sourcesContent&&(this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some((function(e){return null==e})))},ne.prototype.sourceContentFor=function(e,n){if(!this.sourcesContent)return null;var t=this._findSourceIndex(e);if(t>=0)return this.sourcesContent[t];var r,o=e;if(null!=this.sourceRoot&&(o=z.relative(this.sourceRoot,o)),null!=this.sourceRoot&&(r=z.urlParse(this.sourceRoot))){var i=o.replace(/^file:\/\//,"");if("file"==r.scheme&&this._sources.has(i))return this.sourcesContent[this._sources.indexOf(i)];if((!r.path||"/"==r.path)&&this._sources.has("/"+o))return this.sourcesContent[this._sources.indexOf("/"+o)]}if(n)return null;throw new Error('"'+o+'" is not in the SourceMap.')},ne.prototype.generatedPositionFor=function(e){var n=z.getArg(e,"source");if((n=this._findSourceIndex(n))<0)return{line:null,column:null,lastColumn:null};var t={source:n,originalLine:z.getArg(e,"line"),originalColumn:z.getArg(e,"column")},r=this._findMapping(t,this._originalMappings,"originalLine","originalColumn",z.compareByOriginalPositions,z.getArg(e,"bias",ee.GREATEST_LOWER_BOUND));if(r>=0){var o=this._originalMappings[r];if(o.source===t.source)return{line:z.getArg(o,"generatedLine",null),column:z.getArg(o,"generatedColumn",null),lastColumn:z.getArg(o,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},Y.BasicSourceMapConsumer=ne,(re.prototype=Object.create(ee.prototype)).constructor=ee,re.prototype._version=3,Object.defineProperty(re.prototype,"sources",{get:function(){for(var e=[],n=0;n<this._sections.length;n++)for(var t=0;t<this._sections[n].consumer.sources.length;t++)e.push(this._sections[n].consumer.sources[t]);return e}}),re.prototype.originalPositionFor=function(e){var n={generatedLine:z.getArg(e,"line"),generatedColumn:z.getArg(e,"column")},t=Q.search(n,this._sections,(function(e,n){var t=e.generatedLine-n.generatedOffset.generatedLine;return t||e.generatedColumn-n.generatedOffset.generatedColumn})),r=this._sections[t];return r?r.consumer.originalPositionFor({line:n.generatedLine-(r.generatedOffset.generatedLine-1),column:n.generatedColumn-(r.generatedOffset.generatedLine===n.generatedLine?r.generatedOffset.generatedColumn-1:0),bias:e.bias}):{source:null,line:null,column:null,name:null}},re.prototype.hasContentsOfAllSources=function(){return this._sections.every((function(e){return e.consumer.hasContentsOfAllSources()}))},re.prototype.sourceContentFor=function(e,n){for(var t=0;t<this._sections.length;t++){var r=this._sections[t].consumer.sourceContentFor(e,!0);if(r)return r}if(n)return null;throw new Error('"'+e+'" is not in the SourceMap.')},re.prototype.generatedPositionFor=function(e){for(var n=0;n<this._sections.length;n++){var t=this._sections[n];if(-1!==t.consumer._findSourceIndex(z.getArg(e,"source"))){var r=t.consumer.generatedPositionFor(e);if(r)return{line:r.line+(t.generatedOffset.generatedLine-1),column:r.column+(t.generatedOffset.generatedLine===r.line?t.generatedOffset.generatedColumn-1:0)}}}return{line:null,column:null}},re.prototype._parseMappings=function(e,n){this.__generatedMappings=[],this.__originalMappings=[];for(var t=0;t<this._sections.length;t++)for(var r=this._sections[t],o=r.consumer._generatedMappings,i=0;i<o.length;i++){var s=o[i],u=r.consumer._sources.at(s.source);u=z.computeSourceURL(r.consumer.sourceRoot,u,this._sourceMapURL),this._sources.add(u),u=this._sources.indexOf(u);var a=null;s.name&&(a=r.consumer._names.at(s.name),this._names.add(a),a=this._names.indexOf(a));var c={source:u,generatedLine:s.generatedLine+(r.generatedOffset.generatedLine-1),generatedColumn:s.generatedColumn+(r.generatedOffset.generatedLine===s.generatedLine?r.generatedOffset.generatedColumn-1:0),originalLine:s.originalLine,originalColumn:s.originalColumn,name:a};this.__generatedMappings.push(c),"number"==typeof c.originalLine&&this.__originalMappings.push(c)}Z(this.__generatedMappings,z.compareByGeneratedPositionsDeflated),Z(this.__originalMappings,z.compareByOriginalPositions)},Y.IndexedSourceMapConsumer=re;var oe={},ie=N.SourceMapGenerator,se=M,ue=/(\r?\n)/,ae="$$$isSourceNode$$$";function ce(e,n,t,r,o){this.children=[],this.sourceContents={},this.line=null==e?null:e,this.column=null==n?null:n,this.source=null==t?null:t,this.name=null==o?null:o,this[ae]=!0,null!=r&&this.add(r)}ce.fromStringWithSourceMap=function(e,n,t){var r=new ce,o=e.split(ue),i=0,s=function(){return e()+(e()||"");function e(){return i<o.length?o[i++]:void 0}},u=1,a=0,c=null;return n.eachMapping((function(e){if(null!==c){if(!(u<e.generatedLine)){var n=(t=o[i]||"").substr(0,e.generatedColumn-a);return o[i]=t.substr(e.generatedColumn-a),a=e.generatedColumn,l(c,n),void(c=e)}l(c,s()),u++,a=0}for(;u<e.generatedLine;)r.add(s()),u++;var t;a<e.generatedColumn&&(r.add((t=o[i]||"").substr(0,e.generatedColumn)),o[i]=t.substr(e.generatedColumn),a=e.generatedColumn);c=e}),this),i<o.length&&(c&&l(c,s()),r.add(o.splice(i).join(""))),n.sources.forEach((function(e){var o=n.sourceContentFor(e);null!=o&&(null!=t&&(e=se.join(t,e)),r.setSourceContent(e,o))})),r;function l(e,n){if(null===e||void 0===e.source)r.add(n);else{var o=t?se.join(t,e.source):e.source;r.add(new ce(e.originalLine,e.originalColumn,o,n,e.name))}}},ce.prototype.add=function(e){if(Array.isArray(e))e.forEach((function(e){this.add(e)}),this);else{if(!e[ae]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);e&&this.children.push(e)}return this},ce.prototype.prepend=function(e){if(Array.isArray(e))for(var n=e.length-1;n>=0;n--)this.prepend(e[n]);else{if(!e[ae]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);this.children.unshift(e)}return this},ce.prototype.walk=function(e){for(var n,t=0,r=this.children.length;t<r;t++)(n=this.children[t])[ae]?n.walk(e):""!==n&&e(n,{source:this.source,line:this.line,column:this.column,name:this.name})},ce.prototype.join=function(e){var n,t,r=this.children.length;if(r>0){for(n=[],t=0;t<r-1;t++)n.push(this.children[t]),n.push(e);n.push(this.children[t]),this.children=n}return this},ce.prototype.replaceRight=function(e,n){var t=this.children[this.children.length-1];return t[ae]?t.replaceRight(e,n):"string"==typeof t?this.children[this.children.length-1]=t.replace(e,n):this.children.push("".replace(e,n)),this},ce.prototype.setSourceContent=function(e,n){this.sourceContents[se.toSetString(e)]=n},ce.prototype.walkSourceContents=function(e){for(var n=0,t=this.children.length;n<t;n++)this.children[n][ae]&&this.children[n].walkSourceContents(e);var r=Object.keys(this.sourceContents);for(n=0,t=r.length;n<t;n++)e(se.fromSetString(r[n]),this.sourceContents[r[n]])},ce.prototype.toString=function(){var e="";return this.walk((function(n){e+=n})),e},ce.prototype.toStringWithSourceMap=function(e){var n={code:"",line:1,column:0},t=new ie(e),r=!1,o=null,i=null,s=null,u=null;return this.walk((function(e,a){n.code+=e,null!==a.source&&null!==a.line&&null!==a.column?(o===a.source&&i===a.line&&s===a.column&&u===a.name||t.addMapping({source:a.source,original:{line:a.line,column:a.column},generated:{line:n.line,column:n.column},name:a.name}),o=a.source,i=a.line,s=a.column,u=a.name,r=!0):r&&(t.addMapping({generated:{line:n.line,column:n.column}}),o=null,r=!1);for(var c=0,l=e.length;c<l;c++)10===e.charCodeAt(c)?(n.line++,n.column=0,c+1===l?(o=null,r=!1):r&&t.addMapping({source:a.source,original:{line:a.line,column:a.column},generated:{line:n.line,column:n.column},name:a.name})):n.column++})),this.walkSourceContents((function(e,n){t.setSourceContent(e,n)})),{code:n.code,map:t}},oe.SourceNode=ce;var le=v.SourceMapGenerator=N.SourceMapGenerator;function pe(e,n){const{sourceMap:t,filename:r,breakLineCode:o,needIndent:i}=n,u={source:e.loc.source,filename:r,code:"",column:1,line:1,offset:0,map:void 0,breakLineCode:o,needIndent:i,indentLevel:0};function a(e,n){var t,r;u.code+=e,u.map&&(n&&n.loc&&n.loc!==s&&(t=n.loc.start,r=function(e){switch(e.type){case 3:return e.value;case 5:return e.index.toString();case 4:return e.key;case 9:case 8:case 7:return e.value;default:return}}(n),u.map.addMapping({name:r,source:u.filename,original:{line:t.line,column:t.column-1},generated:{line:u.line,column:u.column-1}})),function(e,n,t=n.length){let r=0,o=-1;for(let e=0;e<t;e++)10===n.charCodeAt(e)&&(r++,o=e);e.offset+=t,e.line+=r,e.column=-1===o?e.column+t:t-o}(u,e))}function c(e,n=!0){const t=n?o:"";a(i?t+" ".repeat(e):t)}return t&&(u.map=new le,u.map.setSourceContent(r,u.source)),{context:()=>u,push:a,indent:function(e=!0){const n=++u.indentLevel;e&&c(n)},deindent:function(e=!0){const n=--u.indentLevel;e&&c(n)},newline:function(){c(u.indentLevel)},helper:e=>`_${e}`,needIndent:()=>u.needIndent}}function fe(e,n){const{helper:t}=e;switch(n.type){case 0:!function(e,n){n.body?fe(e,n.body):e.push("null")}(e,n);break;case 1:!function(e,n){const{helper:t,needIndent:r}=e;if(n.cases.length>1){e.push(`${t("plural")}([`),e.indent(r());const o=n.cases.length;for(let t=0;t<o&&(fe(e,n.cases[t]),t!==o-1);t++)e.push(", ");e.deindent(r()),e.push("])")}}(e,n);break;case 2:!function(e,n){const{helper:t,needIndent:r}=e;e.push(`${t("normalize")}([`),e.indent(r());const o=n.items.length;for(let t=0;t<o&&(fe(e,n.items[t]),t!==o-1);t++)e.push(", ");e.deindent(r()),e.push("])")}(e,n);break;case 6:!function(e,n){const{helper:t}=e;e.push(`${t("linked")}(`),fe(e,n.key),n.modifier&&(e.push(", "),fe(e,n.modifier)),e.push(")")}(e,n);break;case 8:case 7:e.push(JSON.stringify(n.value),n);break;case 5:e.push(`${t("interpolate")}(${t("list")}(${n.index}))`,n);break;case 4:e.push(`${t("interpolate")}(${t("named")}(${JSON.stringify(n.key)}))`,n);break;case 9:case 3:e.push(JSON.stringify(n.value),n)}}v.SourceMapConsumer=Y.SourceMapConsumer,v.SourceNode=oe.SourceNode;return e.CompileErrorCodes=r,e.ERROR_DOMAIN=m,e.LocationStub=s,e.baseCompile=function(e,r={}){const o=n({},r),i=L(o).parse(e);return S(i,o),((e,n={})=>{const r=t(n.mode)?n.mode:"normal",o=t(n.filename)?n.filename:"message.intl",i=n.needIndent?n.needIndent:"arrow"!==r,s=e.helpers||[],u=pe(e,{mode:r,filename:o,sourceMap:!!n.sourceMap,breakLineCode:null!=n.breakLineCode?n.breakLineCode:"arrow"===r?";":"\n",needIndent:i});u.push("normal"===r?"function __msg__ (ctx) {":"(ctx) => {"),u.indent(i),s.length>0&&(u.push(`const { ${s.map((e=>`${e}: _${e}`)).join(", ")} } = ctx`),u.newline()),u.push("return "),fe(u,e),u.deindent(i),u.push("}");const{code:a,map:c}=u.context();return{ast:e,code:a,map:c?c.toJSON():void 0}})(i,o)},e.createCompileError=i,e.createLocation=a,e.createParser=L,e.createPosition=u,e.defaultOnError=function(e){throw e},e.errorMessages=o,Object.defineProperty(e,"__esModule",{value:!0}),e}({});
var IntlifyMessageCompiler=function(e){"use strict";const n=Object.assign,t=e=>"string"==typeof e,r={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},c={[r.EXPECTED_TOKEN]:"Expected token: '{0}'",[r.INVALID_TOKEN_IN_PLACEHOLDER]:"Invalid token in placeholder: '{0}'",[r.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER]:"Unterminated single quote in placeholder",[r.UNKNOWN_ESCAPE_SEQUENCE]:"Unknown escape sequence: \\{0}",[r.INVALID_UNICODE_ESCAPE_SEQUENCE]:"Invalid unicode escape sequence: {0}",[r.UNBALANCED_CLOSING_BRACE]:"Unbalanced closing brace",[r.UNTERMINATED_CLOSING_BRACE]:"Unterminated closing brace",[r.EMPTY_PLACEHOLDER]:"Empty placeholder",[r.NOT_ALLOW_NEST_PLACEHOLDER]:"Not allowed nest placeholder",[r.INVALID_LINKED_FORMAT]:"Invalid linked format",[r.MUST_HAVE_MESSAGES_IN_PLURAL]:"Plural must have messages",[r.UNEXPECTED_EMPTY_LINKED_MODIFIER]:"Unexpected empty linked modifier",[r.UNEXPECTED_EMPTY_LINKED_KEY]:"Unexpected empty linked key",[r.UNEXPECTED_LEXICAL_ANALYSIS]:"Unexpected lexical analysis in token: '{0}'"};function o(e,n,t={}){const{domain:r}=t,c=new SyntaxError(String(e));return c.code=e,n&&(c.location=n),c.domain=r,c}function u(e,n,t){return{line:e,column:n,offset:t}}function s(e,n,t){const r={start:e,end:n};return null!=t&&(r.source=t),r}const i=" ",a="\n",l=String.fromCharCode(8232),f=String.fromCharCode(8233);function d(e){const n=e;let t=0,r=1,c=1,o=0;const u=e=>"\r"===n[e]&&n[e+1]===a,s=e=>n[e]===f,i=e=>n[e]===l,d=e=>u(e)||(e=>n[e]===a)(e)||s(e)||i(e),p=e=>u(e)||s(e)||i(e)?a:n[e];function E(){return o=0,d(t)&&(r++,c=0),u(t)&&t++,t++,c++,n[t]}return{index:()=>t,line:()=>r,column:()=>c,peekOffset:()=>o,charAt:p,currentChar:()=>p(t),currentPeek:()=>p(t+o),next:E,peek:function(){return u(t+o)&&o++,o++,n[t+o]},reset:function(){t=0,r=1,c=1,o=0},resetPeek:function(e=0){o=e},skipToPeek:function(){const e=t+o;for(;e!==t;)E();o=0}}}const p=void 0;function E(e,n={}){const t=!1!==n.location,r=d(e),c=()=>r.index(),o=()=>u(r.line(),r.column(),r.index()),l=o(),f=c(),E={currentType:14,offset:f,startLoc:l,endLoc:l,lastType:14,lastOffset:f,lastStartLoc:l,lastEndLoc:l,braceNest:0,inLinked:!1,text:""},k=()=>E,{onError:L}=n;function h(e,n,r){e.endLoc=o(),e.currentType=n;const c={type:n};return t&&(c.loc=s(e.startLoc,e.endLoc)),null!=r&&(c.value=r),c}const N=e=>h(e,14);function _(e,n){return e.currentChar()===n?(e.next(),n):(o(),"")}function T(e){let n="";for(;e.currentPeek()===i||e.currentPeek()===a;)n+=e.currentPeek(),e.peek();return n}function C(e){const n=T(e);return e.skipToPeek(),n}function P(e){if(e===p)return!1;const n=e.charCodeAt(0);return n>=97&&n<=122||n>=65&&n<=90||95===n}function x(e,n){const{currentType:t}=n;if(2!==t)return!1;T(e);const r=function(e){if(e===p)return!1;const n=e.charCodeAt(0);return n>=48&&n<=57}("-"===e.currentPeek()?e.peek():e.currentPeek());return e.resetPeek(),r}function y(e){T(e);const n="|"===e.currentPeek();return e.resetPeek(),n}function m(e,n=!0){const t=(n=!1,r="",c=!1)=>{const o=e.currentPeek();return"{"===o?"%"!==r&&n:"@"!==o&&o?"%"===o?(e.peek(),t(n,"%",!0)):"|"===o?!("%"!==r&&!c)||!(r===i||r===a):o===i?(e.peek(),t(!0,i,c)):o!==a||(e.peek(),t(!0,a,c)):"%"===r||n},r=t();return n&&e.resetPeek(),r}function I(e,n){const t=e.currentChar();return t===p?p:n(t)?(e.next(),t):null}function O(e){return I(e,(e=>{const n=e.charCodeAt(0);return n>=97&&n<=122||n>=65&&n<=90||n>=48&&n<=57||95===n||36===n}))}function A(e){return I(e,(e=>{const n=e.charCodeAt(0);return n>=48&&n<=57}))}function b(e){return I(e,(e=>{const n=e.charCodeAt(0);return n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102}))}function S(e){let n="",t="";for(;n=A(e);)t+=n;return t}function v(e){const n=e.currentChar();switch(n){case"\\":case"'":return e.next(),`\\${n}`;case"u":return D(e,n,4);case"U":return D(e,n,6);default:return o(),""}}function D(e,n,t){_(e,n);let r="";for(let n=0;n<t;n++){const n=b(e);if(!n){o(),e.currentChar();break}r+=n}return`\\${n}${r}`}function U(e){C(e);const n=_(e,"|");return C(e),n}function g(e,n){let t=null;switch(e.currentChar()){case"{":return n.braceNest>=1&&o(),e.next(),t=h(n,2,"{"),C(e),n.braceNest++,t;case"}":return n.braceNest>0&&2===n.currentType&&o(),e.next(),t=h(n,3,"}"),n.braceNest--,n.braceNest>0&&C(e),n.inLinked&&0===n.braceNest&&(n.inLinked=!1),t;case"@":return n.braceNest>0&&o(),t=R(e,n)||N(n),n.braceNest=0,t;default:let r=!0,c=!0,u=!0;if(y(e))return n.braceNest>0&&o(),t=h(n,1,U(e)),n.braceNest=0,n.inLinked=!1,t;if(n.braceNest>0&&(5===n.currentType||6===n.currentType||7===n.currentType))return o(),n.braceNest=0,M(e,n);if(r=function(e,n){const{currentType:t}=n;if(2!==t)return!1;T(e);const r=P(e.currentPeek());return e.resetPeek(),r}(e,n))return t=h(n,5,function(e){C(e);let n="",t="";for(;n=O(e);)t+=n;return e.currentChar()===p&&o(),t}(e)),C(e),t;if(c=x(e,n))return t=h(n,6,function(e){C(e);let n="";return"-"===e.currentChar()?(e.next(),n+=`-${S(e)}`):n+=S(e),e.currentChar()===p&&o(),n}(e)),C(e),t;if(u=function(e,n){const{currentType:t}=n;if(2!==t)return!1;T(e);const r="'"===e.currentPeek();return e.resetPeek(),r}(e,n))return t=h(n,7,function(e){C(e),_(e,"'");let n="",t="";const r=e=>"'"!==e&&e!==a;for(;n=I(e,r);)t+="\\"===n?v(e):n;const c=e.currentChar();return c===a||c===p?(o(),c===a&&(e.next(),_(e,"'")),t):(_(e,"'"),t)}(e)),C(e),t;if(!r&&!c&&!u)return t=h(n,13,function(e){C(e);let n="",t="";const r=e=>"{"!==e&&"}"!==e&&e!==i&&e!==a;for(;n=I(e,r);)t+=n;return t}(e)),o(),C(e),t}return t}function R(e,n){const{currentType:t}=n;let r=null;const c=e.currentChar();switch(8!==t&&9!==t&&12!==t&&10!==t||c!==a&&c!==i||o(),c){case"@":return e.next(),r=h(n,8,"@"),n.inLinked=!0,r;case".":return C(e),e.next(),h(n,9,".");case":":return C(e),e.next(),h(n,10,":");default:return y(e)?(r=h(n,1,U(e)),n.braceNest=0,n.inLinked=!1,r):function(e,n){const{currentType:t}=n;if(8!==t)return!1;T(e);const r="."===e.currentPeek();return e.resetPeek(),r}(e,n)||function(e,n){const{currentType:t}=n;if(8!==t&&12!==t)return!1;T(e);const r=":"===e.currentPeek();return e.resetPeek(),r}(e,n)?(C(e),R(e,n)):function(e,n){const{currentType:t}=n;if(9!==t)return!1;T(e);const r=P(e.currentPeek());return e.resetPeek(),r}(e,n)?(C(e),h(n,12,function(e){let n="",t="";for(;n=O(e);)t+=n;return t}(e))):function(e,n){const{currentType:t}=n;if(10!==t)return!1;const r=()=>{const n=e.currentPeek();return"{"===n?P(e.peek()):!("@"===n||"%"===n||"|"===n||":"===n||"."===n||n===i||!n)&&(n===a?(e.peek(),r()):P(n))},c=r();return e.resetPeek(),c}(e,n)?(C(e),"{"===c?g(e,n)||r:h(n,11,function(e){const n=(t=!1,r)=>{const c=e.currentChar();return"{"!==c&&"%"!==c&&"@"!==c&&"|"!==c&&c?c===i?r:c===a?(r+=c,e.next(),n(t,r)):(r+=c,e.next(),n(!0,r)):r};return n(!1,"")}(e))):(8===t&&o(),n.braceNest=0,n.inLinked=!1,M(e,n))}}function M(e,n){let t={type:14};if(n.braceNest>0)return g(e,n)||N(n);if(n.inLinked)return R(e,n)||N(n);const r=e.currentChar();switch(r){case"{":return g(e,n)||N(n);case"}":return o(),e.next(),h(n,3,"}");case"@":return R(e,n)||N(n);default:if(y(e))return t=h(n,1,U(e)),n.braceNest=0,n.inLinked=!1,t;if(m(e))return h(n,0,function(e){const n=t=>{const r=e.currentChar();return"{"!==r&&"}"!==r&&"@"!==r&&r?"%"===r?m(e)?(t+=r,e.next(),n(t)):t:"|"===r?t:r===i||r===a?m(e)?(t+=r,e.next(),n(t)):y(e)?t:(t+=r,e.next(),n(t)):(t+=r,e.next(),n(t)):t};return n("")}(e));if("%"===r)return e.next(),h(n,4,"%")}return t}return{nextToken:function(){const{currentType:e,offset:n,startLoc:t,endLoc:u}=E;return E.lastType=e,E.lastOffset=n,E.lastStartLoc=t,E.lastEndLoc=u,E.offset=c(),E.startLoc=o(),r.currentChar()===p?h(E,14):M(r,E)},currentOffset:c,currentPosition:o,context:k}}const k="parser",L=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function h(e,n,t){switch(e){case"\\\\":return"\\";case"\\'":return"'";default:{const e=parseInt(n||t,16);return e<=55295||e>=57344?String.fromCodePoint(e):"�"}}}function N(e={}){const t=!1!==e.location,{onError:r}=e;function c(e,n,r){const c={type:e,start:n,end:n};return t&&(c.loc={start:r,end:r}),c}function o(e,n,r,c){e.end=n,c&&(e.type=c),t&&e.loc&&(e.loc.end=r)}function u(e,n){const t=e.context(),r=c(3,t.offset,t.startLoc);return r.value=n,o(r,e.currentOffset(),e.currentPosition()),r}function s(e,n){const t=e.context(),{lastOffset:r,lastStartLoc:u}=t,s=c(5,r,u);return s.index=parseInt(n,10),e.nextToken(),o(s,e.currentOffset(),e.currentPosition()),s}function i(e,n){const t=e.context(),{lastOffset:r,lastStartLoc:u}=t,s=c(4,r,u);return s.key=n,e.nextToken(),o(s,e.currentOffset(),e.currentPosition()),s}function a(e,n){const t=e.context(),{lastOffset:r,lastStartLoc:u}=t,s=c(9,r,u);return s.value=n.replace(L,h),e.nextToken(),o(s,e.currentOffset(),e.currentPosition()),s}function l(e){const n=e.context(),t=c(6,n.offset,n.startLoc);let r=e.nextToken();if(9===r.type){const n=function(e){const n=e.nextToken(),t=e.context(),{lastOffset:r,lastStartLoc:u}=t,s=c(8,r,u);return 12!==n.type?(s.value="",o(s,r,u),{nextConsumeToken:n,node:s}):(null==n.value&&_(n),s.value=n.value||"",o(s,e.currentOffset(),e.currentPosition()),{node:s})}(e);t.modifier=n.node,r=n.nextConsumeToken||e.nextToken()}switch(10!==r.type&&_(r),r=e.nextToken(),2===r.type&&(r=e.nextToken()),r.type){case 11:null==r.value&&_(r),t.key=function(e,n){const t=e.context(),r=c(7,t.offset,t.startLoc);return r.value=n,o(r,e.currentOffset(),e.currentPosition()),r}(e,r.value||"");break;case 5:null==r.value&&_(r),t.key=i(e,r.value||"");break;case 6:null==r.value&&_(r),t.key=s(e,r.value||"");break;case 7:null==r.value&&_(r),t.key=a(e,r.value||"");break;default:const n=e.context(),u=c(7,n.offset,n.startLoc);return u.value="",o(u,n.offset,n.startLoc),t.key=u,o(t,n.offset,n.startLoc),{nextConsumeToken:r,node:t}}return o(t,e.currentOffset(),e.currentPosition()),{node:t}}function f(e){const n=e.context(),t=c(2,1===n.currentType?e.currentOffset():n.offset,1===n.currentType?n.endLoc:n.startLoc);t.items=[];let r=null;do{const n=r||e.nextToken();switch(r=null,n.type){case 0:null==n.value&&_(n),t.items.push(u(e,n.value||""));break;case 6:null==n.value&&_(n),t.items.push(s(e,n.value||""));break;case 5:null==n.value&&_(n),t.items.push(i(e,n.value||""));break;case 7:null==n.value&&_(n),t.items.push(a(e,n.value||""));break;case 8:const c=l(e);t.items.push(c.node),r=c.nextConsumeToken||null}}while(14!==n.currentType&&1!==n.currentType);return o(t,1===n.currentType?n.lastOffset:e.currentOffset(),1===n.currentType?n.lastEndLoc:e.currentPosition()),t}function d(e){const n=e.context(),{offset:t,startLoc:r}=n,u=f(e);return 14===n.currentType?u:function(e,n,t,r){const u=e.context();let s=0===r.items.length;const i=c(1,n,t);i.cases=[],i.cases.push(r);do{const n=f(e);s||(s=0===n.items.length),i.cases.push(n)}while(14!==u.currentType);return o(i,e.currentOffset(),e.currentPosition()),i}(e,t,r,u)}return{parse:function(r){const u=E(r,n({},e)),s=u.context(),i=c(0,s.offset,s.startLoc);return t&&i.loc&&(i.loc.source=r),i.body=d(u),o(i,u.currentOffset(),u.currentPosition()),i}}}function _(e){if(14===e.type)return"EOF";const n=(e.value||"").replace(/\r?\n/gu,"\\n");return n.length>10?n.slice(0,9)+"…":n}function T(e,n){for(let t=0;t<e.length;t++)C(e[t],n)}function C(e,n){switch(e.type){case 1:T(e.cases,n),n.helper("plural");break;case 2:T(e.items,n);break;case 6:C(e.key,n),n.helper("linked");break;case 5:n.helper("interpolate"),n.helper("list");break;case 4:n.helper("interpolate"),n.helper("named")}}function P(e,n={}){const t=function(e,n={}){const t={ast:e,helpers:new Set};return{context:()=>t,helper:e=>(t.helpers.add(e),e)}}(e);t.helper("normalize"),e.body&&C(e.body,t);const r=t.context();e.helpers=Array.from(r.helpers)}function x(e,n){const{helper:t}=e;switch(n.type){case 0:!function(e,n){n.body?x(e,n.body):e.push("null")}(e,n);break;case 1:!function(e,n){const{helper:t,needIndent:r}=e;if(n.cases.length>1){e.push(`${t("plural")}([`),e.indent(r());const c=n.cases.length;for(let t=0;t<c&&(x(e,n.cases[t]),t!==c-1);t++)e.push(", ");e.deindent(r()),e.push("])")}}(e,n);break;case 2:!function(e,n){const{helper:t,needIndent:r}=e;e.push(`${t("normalize")}([`),e.indent(r());const c=n.items.length;for(let t=0;t<c&&(x(e,n.items[t]),t!==c-1);t++)e.push(", ");e.deindent(r()),e.push("])")}(e,n);break;case 6:!function(e,n){const{helper:t}=e;e.push(`${t("linked")}(`),x(e,n.key),n.modifier&&(e.push(", "),x(e,n.modifier)),e.push(")")}(e,n);break;case 8:case 7:e.push(JSON.stringify(n.value),n);break;case 5:e.push(`${t("interpolate")}(${t("list")}(${n.index}))`,n);break;case 4:e.push(`${t("interpolate")}(${t("named")}(${JSON.stringify(n.key)}))`,n);break;case 9:case 3:e.push(JSON.stringify(n.value),n)}}return e.CompileErrorCodes=r,e.ERROR_DOMAIN=k,e.LocationStub={start:{line:1,column:1,offset:0},end:{line:1,column:1,offset:0}},e.baseCompile=function(e,r={}){const c=n({},r),o=N(c).parse(e);return P(o,c),((e,n={})=>{const r=t(n.mode)?n.mode:"normal",c=t(n.filename)?n.filename:"message.intl",o=n.needIndent?n.needIndent:"arrow"!==r,u=e.helpers||[],s=function(e,n){const{filename:t,breakLineCode:r,needIndent:c}=n,o={source:e.loc.source,filename:t,code:"",column:1,line:1,offset:0,map:void 0,breakLineCode:r,needIndent:c,indentLevel:0};function u(e,n){o.code+=e}function s(e,n=!0){const t=n?r:"";u(c?t+" ".repeat(e):t)}return{context:()=>o,push:u,indent:function(e=!0){const n=++o.indentLevel;e&&s(n)},deindent:function(e=!0){const n=--o.indentLevel;e&&s(n)},newline:function(){s(o.indentLevel)},helper:e=>`_${e}`,needIndent:()=>o.needIndent}}(e,{mode:r,filename:c,sourceMap:!!n.sourceMap,breakLineCode:null!=n.breakLineCode?n.breakLineCode:"arrow"===r?";":"\n",needIndent:o});s.push("normal"===r?"function __msg__ (ctx) {":"(ctx) => {"),s.indent(o),u.length>0&&(s.push(`const { ${u.map((e=>`${e}: _${e}`)).join(", ")} } = ctx`),s.newline()),s.push("return "),x(s,e),s.deindent(o),s.push("}");const{code:i,map:a}=s.context();return{ast:e,code:i,map:a?a.toJSON():void 0}})(o,c)},e.createCompileError=o,e.createLocation=s,e.createParser=N,e.createPosition=u,e.defaultOnError=function(e){throw e},e.errorMessages=c,Object.defineProperty(e,"__esModule",{value:!0}),e}({});
{
"name": "@intlify/message-compiler",
"version": "9.2.0-beta.3",
"version": "9.2.0-beta.4",
"description": "@intlify/message-compiler",

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

"dependencies": {
"@intlify/shared": "9.2.0-beta.3",
"@intlify/shared": "9.2.0-beta.4",
"source-map": "0.6.1"

@@ -39,0 +39,0 @@ },

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