vue-i18n 8.22.1 → 8.22.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,4 +1,14 @@
1
1
 
2
+ ## v8.22.2 (2020-11-18)
3
+
4
+ #### :bug: Bug Fixes
5
+ * [#1048](https://github.com/kazupon/vue-i18n/pull/1048) fix: number format keys missing compared the Intl.Number object ([@jevillard](https://github.com/jevillard))
6
+
7
+ #### Committers: 2
8
+ - Alexander Sokolov ([@Alex-Sokolov](https://github.com/Alex-Sokolov))
9
+ - Jérémy Villard ([@jevillard](https://github.com/jevillard))
10
+
11
+
2
12
  ## v8.22.1 (2020-10-19)
3
13
 
4
14
  #### :boom: Breaking Change
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * vue-i18n v8.22.1
2
+ * vue-i18n v8.22.2
3
3
  * (c) 2020 kazuya kawaguchi
4
4
  * Released under the MIT License.
5
5
  */
@@ -12,18 +12,23 @@
12
12
  */
13
13
 
14
14
  var numberFormatKeys = [
15
- 'style',
15
+ 'compactDisplay',
16
16
  'currency',
17
17
  'currencyDisplay',
18
+ 'currencySign',
19
+ 'localeMatcher',
20
+ 'notation',
21
+ 'numberingSystem',
22
+ 'signDisplay',
23
+ 'style',
24
+ 'unit',
25
+ 'unitDisplay',
18
26
  'useGrouping',
19
27
  'minimumIntegerDigits',
20
28
  'minimumFractionDigits',
21
29
  'maximumFractionDigits',
22
30
  'minimumSignificantDigits',
23
- 'maximumSignificantDigits',
24
- 'localeMatcher',
25
- 'formatMatcher',
26
- 'unit'
31
+ 'maximumSignificantDigits'
27
32
  ];
28
33
 
29
34
  /**
@@ -2183,6 +2188,6 @@ Object.defineProperty(VueI18n, 'availabilities', {
2183
2188
  });
2184
2189
 
2185
2190
  VueI18n.install = install;
2186
- VueI18n.version = '8.22.1';
2191
+ VueI18n.version = '8.22.2';
2187
2192
 
2188
2193
  module.exports = VueI18n;
@@ -5,18 +5,23 @@
5
5
  */
6
6
 
7
7
  const numberFormatKeys = [
8
- 'style',
8
+ 'compactDisplay',
9
9
  'currency',
10
10
  'currencyDisplay',
11
+ 'currencySign',
12
+ 'localeMatcher',
13
+ 'notation',
14
+ 'numberingSystem',
15
+ 'signDisplay',
16
+ 'style',
17
+ 'unit',
18
+ 'unitDisplay',
11
19
  'useGrouping',
12
20
  'minimumIntegerDigits',
13
21
  'minimumFractionDigits',
14
22
  'maximumFractionDigits',
15
23
  'minimumSignificantDigits',
16
- 'maximumSignificantDigits',
17
- 'localeMatcher',
18
- 'formatMatcher',
19
- 'unit'
24
+ 'maximumSignificantDigits'
20
25
  ];
21
26
 
22
27
  /**
@@ -2137,6 +2142,6 @@ Object.defineProperty(VueI18n, 'availabilities', {
2137
2142
  });
2138
2143
 
2139
2144
  VueI18n.install = install;
2140
- VueI18n.version = '8.22.1';
2145
+ VueI18n.version = '8.22.2';
2141
2146
 
2142
2147
  export default VueI18n;
@@ -1 +1 @@
1
- const t=["style","currency","currencyDisplay","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","localeMatcher","formatMatcher","unit"];function e(t,e){"undefined"!=typeof console&&(console.warn("[vue-i18n] "+t),e&&console.warn(e.stack))}const n=Array.isArray;function s(t){return null!==t&&"object"==typeof t}function r(t){return"string"==typeof t}const a=Object.prototype.toString,i="[object Object]";function o(t){return a.call(t)===i}function l(t){return null==t}function c(t){return"function"==typeof t}function h(...t){let e=null,r=null;return 1===t.length?s(t[0])||n(t[0])?r=t[0]:"string"==typeof t[0]&&(e=t[0]):2===t.length&&("string"==typeof t[0]&&(e=t[0]),(s(t[1])||n(t[1]))&&(r=t[1])),{locale:e,params:r}}function u(t){return JSON.parse(JSON.stringify(t))}function m(t,e){return!!~t.indexOf(e)}const _=Object.prototype.hasOwnProperty;function f(t,e){return _.call(t,e)}function p(t){const e=Object(t);for(let t=1;t<arguments.length;t++){const n=arguments[t];if(null!=n){let t;for(t in n)f(n,t)&&(s(n[t])?e[t]=p(e[t],n[t]):e[t]=n[t])}}return e}function g(t,e){if(t===e)return!0;const r=s(t),a=s(e);if(!r||!a)return!r&&!a&&String(t)===String(e);try{const s=n(t),r=n(e);if(s&&r)return t.length===e.length&&t.every((t,n)=>g(t,e[n]));if(s||r)return!1;{const n=Object.keys(t),s=Object.keys(e);return n.length===s.length&&n.every(n=>g(t[n],e[n]))}}catch(t){return!1}}var d={beforeCreate(){const t=this.$options;if(t.i18n=t.i18n||(t.__i18n?{}:null),t.i18n){if(t.i18n instanceof tt){if(t.__i18n)try{let e=t.i18n&&t.i18n.messages?t.i18n.messages:{};t.__i18n.forEach(t=>{e=p(e,JSON.parse(t))}),Object.keys(e).forEach(n=>{t.i18n.mergeLocaleMessage(n,e[n])})}catch(t){}this._i18n=t.i18n,this._i18nWatcher=this._i18n.watchI18nData()}else if(o(t.i18n)){const e=this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof tt?this.$root.$i18n:null;if(e&&(t.i18n.root=this.$root,t.i18n.formatter=e.formatter,t.i18n.fallbackLocale=e.fallbackLocale,t.i18n.formatFallbackMessages=e.formatFallbackMessages,t.i18n.silentTranslationWarn=e.silentTranslationWarn,t.i18n.silentFallbackWarn=e.silentFallbackWarn,t.i18n.pluralizationRules=e.pluralizationRules,t.i18n.preserveDirectiveContent=e.preserveDirectiveContent),t.__i18n)try{let e=t.i18n&&t.i18n.messages?t.i18n.messages:{};t.__i18n.forEach(t=>{e=p(e,JSON.parse(t))}),t.i18n.messages=e}catch(t){}const{sharedMessages:n}=t.i18n;n&&o(n)&&(t.i18n.messages=p(t.i18n.messages,n)),this._i18n=new tt(t.i18n),this._i18nWatcher=this._i18n.watchI18nData(),(void 0===t.i18n.sync||t.i18n.sync)&&(this._localeWatcher=this.$i18n.watchLocale()),e&&e.onComponentInstanceCreated(this._i18n)}}else this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof tt?this._i18n=this.$root.$i18n:t.parent&&t.parent.$i18n&&t.parent.$i18n instanceof tt&&(this._i18n=t.parent.$i18n)},beforeMount(){const t=this.$options;t.i18n=t.i18n||(t.__i18n?{}:null),t.i18n?t.i18n instanceof tt?(this._i18n.subscribeDataChanging(this),this._subscribing=!0):o(t.i18n)&&(this._i18n.subscribeDataChanging(this),this._subscribing=!0):this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof tt?(this._i18n.subscribeDataChanging(this),this._subscribing=!0):t.parent&&t.parent.$i18n&&t.parent.$i18n instanceof tt&&(this._i18n.subscribeDataChanging(this),this._subscribing=!0)},beforeDestroy(){if(!this._i18n)return;const t=this;this.$nextTick(()=>{t._subscribing&&(t._i18n.unsubscribeDataChanging(t),delete t._subscribing),t._i18nWatcher&&(t._i18nWatcher(),t._i18n.destroyVM(),delete t._i18nWatcher),t._localeWatcher&&(t._localeWatcher(),delete t._localeWatcher)})}},b={name:"i18n",functional:!0,props:{tag:{type:[String,Boolean,Object],default:"span"},path:{type:String,required:!0},locale:{type:String},places:{type:[Array,Object]}},render(t,{data:e,parent:n,props:s,slots:r}){const{$i18n:a}=n;if(!a)return;const{path:i,locale:o,places:l}=s,c=r(),h=a.i(i,o,function(t){let e;for(e in t)if("default"!==e)return!1;return Boolean(e)}(c)||l?function(t,e){const n=e?function(t){return Array.isArray(t)?t.reduce(F,{}):Object.assign({},t)}(e):{};if(!t)return n;const s=(t=t.filter(t=>t.tag||""!==t.text.trim())).every(y);return t.reduce(s?v:F,n)}(c.default,l):c),u=s.tag&&!0!==s.tag||!1===s.tag?s.tag:"span";return u?t(u,e,h):h}};function v(t,e){return e.data&&e.data.attrs&&e.data.attrs.place&&(t[e.data.attrs.place]=e),t}function F(t,e,n){return t[n]=e,t}function y(t){return Boolean(t.data&&t.data.attrs&&t.data.attrs.place)}var k={name:"i18n-n",functional:!0,props:{tag:{type:[String,Boolean,Object],default:"span"},value:{type:Number,required:!0},format:{type:[String,Object]},locale:{type:String}},render(e,{props:n,parent:a,data:i}){const o=a.$i18n;if(!o)return null;let l=null,c=null;r(n.format)?l=n.format:s(n.format)&&(n.format.key&&(l=n.format.key),c=Object.keys(n.format).reduce((e,s)=>m(t,s)?Object.assign({},e,{[s]:n.format[s]}):e,null));const h=n.locale||o.locale,u=o._ntp(n.value,h,l,c),_=u.map((t,e)=>{const n=i.scopedSlots&&i.scopedSlots[t.type];return n?n({[t.type]:t.value,index:e,parts:u}):t.value}),f=n.tag&&!0!==n.tag||!1===n.tag?n.tag:"span";return f?e(f,{attrs:i.attrs,class:i.class,staticClass:i.staticClass},_):_}};function $(t,e,n){C(t,n)&&T(t,e,n)}function w(t,e,n,s){if(!C(t,n))return;const r=n.context.$i18n;(function(t,e){const n=e.context;return t._locale===n.$i18n.locale})(t,n)&&g(e.value,e.oldValue)&&g(t._localeMessage,r.getLocaleMessage(r.locale))||T(t,e,n)}function M(t,n,s,r){if(!s.context)return void e("Vue instance does not exists in VNode context");const a=s.context.$i18n||{};n.modifiers.preserve||a.preserveDirectiveContent||(t.textContent=""),t._vt=void 0,delete t._vt,t._locale=void 0,delete t._locale,t._localeMessage=void 0,delete t._localeMessage}function C(t,n){const s=n.context;return s?!!s.$i18n||(e("VueI18n instance does not exists in Vue instance"),!1):(e("Vue instance does not exists in VNode context"),!1)}function T(t,n,s){const a=n.value,{path:i,locale:l,args:c,choice:h}=function(t){let e,n,s,a;r(t)?e=t:o(t)&&(e=t.path,n=t.locale,s=t.args,a=t.choice);return{path:e,locale:n,args:s,choice:a}}(a);if(!i&&!l&&!c)return void e("value type not supported");if(!i)return void e("`path` is required in v-t directive");const u=s.context;t._vt=t.textContent=null!=h?u.$i18n.tc(i,h,...L(l,c)):u.$i18n.t(i,...L(l,c)),t._locale=u.$i18n.locale,t._localeMessage=u.$i18n.getLocaleMessage(u.$i18n.locale)}function L(t,e){const n=[];return t&&n.push(t),e&&(Array.isArray(e)||o(e))&&n.push(e),n}let D;function I(t){I.installed=!0;(D=t).version&&Number(D.version.split(".")[0]);!function(t){t.prototype.hasOwnProperty("$i18n")||Object.defineProperty(t.prototype,"$i18n",{get(){return this._i18n}}),t.prototype.$t=function(t,...e){const n=this.$i18n;return n._t(t,n.locale,n._getMessages(),this,...e)},t.prototype.$tc=function(t,e,...n){const s=this.$i18n;return s._tc(t,s.locale,s._getMessages(),this,e,...n)},t.prototype.$te=function(t,e){const n=this.$i18n;return n._te(t,n.locale,n._getMessages(),e)},t.prototype.$d=function(t,...e){return this.$i18n.d(t,...e)},t.prototype.$n=function(t,...e){return this.$i18n.n(t,...e)}}(D),D.mixin(d),D.directive("t",{bind:$,update:w,unbind:M}),D.component(b.name,b),D.component(k.name,k),D.config.optionMergeStrategies.i18n=function(t,e){return void 0===e?t:e}}const O=/^(?:\d)+/,x=/^(?:\w)+/;const W=0,j=1,N=2,S=3,H=0,P=4,R=5,E=6,V=7,A=8,z=[];z[H]={ws:[H],ident:[3,W],"[":[P],eof:[V]},z[1]={ws:[1],".":[2],"[":[P],eof:[V]},z[2]={ws:[2],ident:[3,W],0:[3,W],number:[3,W]},z[3]={ident:[3,W],0:[3,W],number:[3,W],ws:[1,j],".":[2,j],"[":[P,j],eof:[V,j]},z[P]={"'":[R,W],'"':[E,W],"[":[P,N],"]":[1,S],eof:A,else:[P,W]},z[R]={"'":[P,W],eof:A,else:[R,W]},z[E]={'"':[P,W],eof:A,else:[E,W]};const B=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function U(t){if(null==t)return"eof";switch(t.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return t;case 95:case 36:case 45:return"ident";case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"ws"}return"ident"}function q(t){const e=t.trim();return("0"!==t.charAt(0)||!isNaN(t))&&(n=e,B.test(n)?function(t){const e=t.charCodeAt(0);return e!==t.charCodeAt(t.length-1)||34!==e&&39!==e?t:t.slice(1,-1)}(e):"*"+e);var n}class J{constructor(){this._cache=Object.create(null)}parsePath(t){let e=this._cache[t];return e||(e=function(t){const e=[];let n,s,r,a,i,o,l,c=-1,h=H,u=0;const m=[];function _(){const e=t[c+1];if(h===R&&"'"===e||h===E&&'"'===e)return c++,r="\\"+e,m[W](),!0}for(m[j]=function(){void 0!==s&&(e.push(s),s=void 0)},m[W]=function(){void 0===s?s=r:s+=r},m[N]=function(){m[W](),u++},m[S]=function(){if(u>0)u--,h=P,m[W]();else{if(u=0,void 0===s)return!1;if(!1===(s=q(s)))return!1;m[j]()}};null!==h;)if("\\"!==(n=t[++c])||!_()){if(a=U(n),(i=(l=z[h])[a]||l.else||A)===A)return;if(h=i[0],(o=m[i[1]])&&(r=void 0===(r=i[2])?n:r,!1===o()))return;if(h===V)return e}}(t))&&(this._cache[t]=e),e||[]}getPathValue(t,e){if(!s(t))return null;const n=this.parsePath(e);if(0===n.length)return null;{const e=n.length;let s=t,r=0;for(;r<e;){const t=s[n[r]];if(void 0===t)return null;s=t,r++}return s}}}const G=/<\/?[\w\s="/.':;#-\/]+>/,X=/(?:@(?:\.[a-z]+)?:(?:[\w\-_|.]+|\([\w\-_|.]+\)))/g,Z=/^@(?:\.([a-z]+))?:/,K=/[()]/g,Q={upper:t=>t.toLocaleUpperCase(),lower:t=>t.toLocaleLowerCase(),capitalize:t=>`${t.charAt(0).toLocaleUpperCase()}${t.substr(1)}`},Y=new class{constructor(){this._caches=Object.create(null)}interpolate(t,e){if(!e)return[t];let n=this._caches[t];return n||(n=function(t){const e=[];let n=0,s="";for(;n<t.length;){let r=t[n++];if("{"===r){s&&e.push({type:"text",value:s}),s="";let a="";for(r=t[n++];void 0!==r&&"}"!==r;)a+=r,r=t[n++];const i="}"===r,o=O.test(a)?"list":i&&x.test(a)?"named":"unknown";e.push({value:a,type:o})}else"%"===r?"{"!==t[n]&&(s+=r):s+=r}return s&&e.push({type:"text",value:s}),e}(t),this._caches[t]=n),function(t,e){const n=[];let r=0;const a=Array.isArray(e)?"list":s(e)?"named":"unknown";if("unknown"===a)return n;for(;r<t.length;){const s=t[r];switch(s.type){case"text":n.push(s.value);break;case"list":n.push(e[parseInt(s.value,10)]);break;case"named":"named"===a&&n.push(e[s.value])}r++}return n}(n,e)}};class tt{constructor(t={}){!D&&"undefined"!=typeof window&&window.Vue&&I(window.Vue);const e=t.locale||"en-US",n=!1!==t.fallbackLocale&&(t.fallbackLocale||"en-US"),s=t.messages||{},r=t.dateTimeFormats||{},a=t.numberFormats||{};this._vm=null,this._formatter=t.formatter||Y,this._modifiers=t.modifiers||{},this._missing=t.missing||null,this._root=t.root||null,this._sync=void 0===t.sync||!!t.sync,this._fallbackRoot=void 0===t.fallbackRoot||!!t.fallbackRoot,this._formatFallbackMessages=void 0!==t.formatFallbackMessages&&!!t.formatFallbackMessages,this._silentTranslationWarn=void 0!==t.silentTranslationWarn&&t.silentTranslationWarn,this._silentFallbackWarn=void 0!==t.silentFallbackWarn&&!!t.silentFallbackWarn,this._dateTimeFormatters={},this._numberFormatters={},this._path=new J,this._dataListeners=[],this._componentInstanceCreatedListener=t.componentInstanceCreatedListener||null,this._preserveDirectiveContent=void 0!==t.preserveDirectiveContent&&!!t.preserveDirectiveContent,this.pluralizationRules=t.pluralizationRules||{},this._warnHtmlInMessage=t.warnHtmlInMessage||"off",this._postTranslation=t.postTranslation||null,this._escapeParameterHtml=t.escapeParameterHtml||!1,this.getChoiceIndex=((t,e)=>{const n=Object.getPrototypeOf(this);if(n&&n.getChoiceIndex){return n.getChoiceIndex.call(this,t,e)}return this.locale in this.pluralizationRules?this.pluralizationRules[this.locale].apply(this,[t,e]):((t,e)=>(t=Math.abs(t),2===e?t?t>1?1:0:1:t?Math.min(t,2):0))(t,e)}),this._exist=((t,e)=>!(!t||!e)&&(!l(this._path.getPathValue(t,e))||!!t[e])),"warn"!==this._warnHtmlInMessage&&"error"!==this._warnHtmlInMessage||Object.keys(s).forEach(t=>{this._checkLocaleMessage(t,this._warnHtmlInMessage,s[t])}),this._initVM({locale:e,fallbackLocale:n,messages:s,dateTimeFormats:r,numberFormats:a})}_checkLocaleMessage(t,s,a){const i=(t,s,a,l)=>{if(o(a))Object.keys(a).forEach(e=>{const n=a[e];o(n)?(l.push(e),l.push("."),i(t,s,n,l),l.pop(),l.pop()):(l.push(e),i(t,s,n,l),l.pop())});else if(n(a))a.forEach((e,n)=>{o(e)?(l.push(`[${n}]`),l.push("."),i(t,s,e,l),l.pop(),l.pop()):(l.push(`[${n}]`),i(t,s,e,l),l.pop())});else if(r(a)){if(G.test(a)){const n=`Detected HTML in message '${a}' of keypath '${l.join("")}' at '${s}'. Consider component interpolation with '<i18n>' to avoid XSS. See https://bit.ly/2ZqJzkp`;"warn"===t?e(n):"error"===t&&function(t,e){"undefined"!=typeof console&&(console.error("[vue-i18n] "+t),e&&console.error(e.stack))}(n)}}};i(s,t,a,[])}_initVM(t){const e=D.config.silent;D.config.silent=!0,this._vm=new D({data:t}),D.config.silent=e}destroyVM(){this._vm.$destroy()}subscribeDataChanging(t){this._dataListeners.push(t)}unsubscribeDataChanging(t){!function(t,e){if(t.length){const n=t.indexOf(e);if(n>-1)t.splice(n,1)}}(this._dataListeners,t)}watchI18nData(){const t=this;return this._vm.$watch("$data",()=>{let e=t._dataListeners.length;for(;e--;)D.nextTick(()=>{t._dataListeners[e]&&t._dataListeners[e].$forceUpdate()})},{deep:!0})}watchLocale(){if(!this._sync||!this._root)return null;const t=this._vm;return this._root.$i18n.vm.$watch("locale",e=>{t.$set(t,"locale",e),t.$forceUpdate()},{immediate:!0})}onComponentInstanceCreated(t){this._componentInstanceCreatedListener&&this._componentInstanceCreatedListener(t,this)}get vm(){return this._vm}get messages(){return u(this._getMessages())}get dateTimeFormats(){return u(this._getDateTimeFormats())}get numberFormats(){return u(this._getNumberFormats())}get availableLocales(){return Object.keys(this.messages).sort()}get locale(){return this._vm.locale}set locale(t){this._vm.$set(this._vm,"locale",t)}get fallbackLocale(){return this._vm.fallbackLocale}set fallbackLocale(t){this._localeChainCache={},this._vm.$set(this._vm,"fallbackLocale",t)}get formatFallbackMessages(){return this._formatFallbackMessages}set formatFallbackMessages(t){this._formatFallbackMessages=t}get missing(){return this._missing}set missing(t){this._missing=t}get formatter(){return this._formatter}set formatter(t){this._formatter=t}get silentTranslationWarn(){return this._silentTranslationWarn}set silentTranslationWarn(t){this._silentTranslationWarn=t}get silentFallbackWarn(){return this._silentFallbackWarn}set silentFallbackWarn(t){this._silentFallbackWarn=t}get preserveDirectiveContent(){return this._preserveDirectiveContent}set preserveDirectiveContent(t){this._preserveDirectiveContent=t}get warnHtmlInMessage(){return this._warnHtmlInMessage}set warnHtmlInMessage(t){const e=this._warnHtmlInMessage;if(this._warnHtmlInMessage=t,e!==t&&("warn"===t||"error"===t)){const t=this._getMessages();Object.keys(t).forEach(e=>{this._checkLocaleMessage(e,this._warnHtmlInMessage,t[e])})}}get postTranslation(){return this._postTranslation}set postTranslation(t){this._postTranslation=t}_getMessages(){return this._vm.messages}_getDateTimeFormats(){return this._vm.dateTimeFormats}_getNumberFormats(){return this._vm.numberFormats}_warnDefault(t,e,n,s,a,i){if(!l(n))return n;if(this._missing){const n=this._missing.apply(null,[t,e,s,a]);if(r(n))return n}if(this._formatFallbackMessages){const t=h(...a);return this._render(e,i,t.params,e)}return e}_isFallbackRoot(t){return!t&&!l(this._root)&&this._fallbackRoot}_isSilentFallbackWarn(t){return this._silentFallbackWarn instanceof RegExp?this._silentFallbackWarn.test(t):this._silentFallbackWarn}_isSilentFallback(t,e){return this._isSilentFallbackWarn(e)&&(this._isFallbackRoot()||t!==this.fallbackLocale)}_isSilentTranslationWarn(t){return this._silentTranslationWarn instanceof RegExp?this._silentTranslationWarn.test(t):this._silentTranslationWarn}_interpolate(t,e,s,a,i,h,u){if(!e)return null;const m=this._path.getPathValue(e,s);if(n(m)||o(m))return m;let _;if(l(m)){if(!o(e))return null;if(!r(_=e[s])&&!c(_))return null}else{if(!r(m)&&!c(m))return null;_=m}return r(_)&&(_.indexOf("@:")>=0||_.indexOf("@.")>=0)&&(_=this._link(t,e,_,a,"raw",h,u)),this._render(_,i,h,s)}_link(t,e,s,r,a,i,o){let l=s;const c=l.match(X);for(let s in c){if(!c.hasOwnProperty(s))continue;const h=c[s],u=h.match(Z),[_,f]=u,p=h.replace(_,"").replace(K,"");if(m(o,p))return l;o.push(p);let g=this._interpolate(t,e,p,r,"raw"===a?"string":a,"raw"===a?void 0:i,o);if(this._isFallbackRoot(g)){if(!this._root)throw Error("unexpected error");const t=this._root.$i18n;g=t._translate(t._getMessages(),t.locale,t.fallbackLocale,p,r,a,i)}g=this._warnDefault(t,p,g,r,n(i)?i:[i],a),this._modifiers.hasOwnProperty(f)?g=this._modifiers[f](g):Q.hasOwnProperty(f)&&(g=Q[f](g)),o.pop(),l=g?l.replace(h,g):l}return l}_createMessageContext(t){const e=n(t)?t:[],r=s(t)?t:{};return{list:t=>e[t],named:t=>r[t]}}_render(t,e,n,s){if(c(t))return t(this._createMessageContext(n));let a=this._formatter.interpolate(t,n,s);return a||(a=Y.interpolate(t,n,s)),"string"!==e||r(a)?a:a.join("")}_appendItemToChain(t,e,n){let s=!1;return m(t,e)||(s=!0,e&&(s="!"!==e[e.length-1],e=e.replace(/!/g,""),t.push(e),n&&n[e]&&(s=n[e]))),s}_appendLocaleToChain(t,e,n){let s;const r=e.split("-");do{const e=r.join("-");s=this._appendItemToChain(t,e,n),r.splice(-1,1)}while(r.length&&!0===s);return s}_appendBlockToChain(t,e,n){let s=!0;for(let a=0;a<e.length&&"boolean"==typeof s;a++){const i=e[a];r(i)&&(s=this._appendLocaleToChain(t,i,n))}return s}_getLocaleChain(t,e){if(""===t)return[];this._localeChainCache||(this._localeChainCache={});let a=this._localeChainCache[t];if(!a){e||(e=this.fallbackLocale),a=[];let i,o=[t];for(;n(o);)o=this._appendBlockToChain(a,o,e);(o=r(i=n(e)?e:s(e)?e.default?e.default:null:e)?[i]:i)&&this._appendBlockToChain(a,o,null),this._localeChainCache[t]=a}return a}_translate(t,e,n,s,r,a,i){const o=this._getLocaleChain(e,n);let c;for(let e=0;e<o.length;e++){const n=o[e];if(!l(c=this._interpolate(n,t[n],s,r,a,i,[s])))return c}return null}_t(t,e,n,s,...r){if(!t)return"";const a=h(...r);var i;this._escapeParameterHtml&&(a.params=(null!=(i=a.params)&&Object.keys(i).forEach(t=>{"string"==typeof i[t]&&(i[t]=function(t){return t.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;")}(i[t]))}),i));const o=a.locale||e;let l=this._translate(n,o,this.fallbackLocale,t,s,"string",a.params);if(this._isFallbackRoot(l)){if(!this._root)throw Error("unexpected error");return this._root.$t(t,...r)}return l=this._warnDefault(o,t,l,s,r,"string"),this._postTranslation&&null!=l&&(l=this._postTranslation(l,t)),l}t(t,...e){return this._t(t,this.locale,this._getMessages(),null,...e)}_i(t,e,n,s,r){const a=this._translate(n,e,this.fallbackLocale,t,s,"raw",r);if(this._isFallbackRoot(a)){if(!this._root)throw Error("unexpected error");return this._root.$i18n.i(t,e,r)}return this._warnDefault(e,t,a,s,[r],"raw")}i(t,e,n){return t?(r(e)||(e=this.locale),this._i(t,e,this._getMessages(),null,n)):""}_tc(t,e,n,s,r,...a){if(!t)return"";void 0===r&&(r=1);const i={count:r,n:r},o=h(...a);return o.params=Object.assign(i,o.params),a=null===o.locale?[o.params]:[o.locale,o.params],this.fetchChoice(this._t(t,e,n,s,...a),r)}fetchChoice(t,e){if(!t||!r(t))return null;const n=t.split("|");return n[e=this.getChoiceIndex(e,n.length)]?n[e].trim():t}tc(t,e,...n){return this._tc(t,this.locale,this._getMessages(),null,e,...n)}_te(t,e,n,...s){const r=h(...s).locale||e;return this._exist(n[r],t)}te(t,e){return this._te(t,this.locale,this._getMessages(),e)}getLocaleMessage(t){return u(this._vm.messages[t]||{})}setLocaleMessage(t,e){"warn"!==this._warnHtmlInMessage&&"error"!==this._warnHtmlInMessage||this._checkLocaleMessage(t,this._warnHtmlInMessage,e),this._vm.$set(this._vm.messages,t,e)}mergeLocaleMessage(t,e){"warn"!==this._warnHtmlInMessage&&"error"!==this._warnHtmlInMessage||this._checkLocaleMessage(t,this._warnHtmlInMessage,e),this._vm.$set(this._vm.messages,t,p({},this._vm.messages[t]||{},e))}getDateTimeFormat(t){return u(this._vm.dateTimeFormats[t]||{})}setDateTimeFormat(t,e){this._vm.$set(this._vm.dateTimeFormats,t,e),this._clearDateTimeFormat(t,e)}mergeDateTimeFormat(t,e){this._vm.$set(this._vm.dateTimeFormats,t,p(this._vm.dateTimeFormats[t]||{},e)),this._clearDateTimeFormat(t,e)}_clearDateTimeFormat(t,e){for(let n in e){const e=`${t}__${n}`;this._dateTimeFormatters.hasOwnProperty(e)&&delete this._dateTimeFormatters[e]}}_localizeDateTime(t,e,n,s,r){let a=e,i=s[a];const o=this._getLocaleChain(e,n);for(let t=0;t<o.length;t++){const e=o[t];if(a=e,!l(i=s[e])&&!l(i[r]))break}if(l(i)||l(i[r]))return null;{const e=i[r],n=`${a}__${r}`;let s=this._dateTimeFormatters[n];return s||(s=this._dateTimeFormatters[n]=new Intl.DateTimeFormat(a,e)),s.format(t)}}_d(t,e,n){if(!n)return new Intl.DateTimeFormat(e).format(t);const s=this._localizeDateTime(t,e,this.fallbackLocale,this._getDateTimeFormats(),n);if(this._isFallbackRoot(s)){if(!this._root)throw Error("unexpected error");return this._root.$i18n.d(t,n,e)}return s||""}d(t,...e){let n=this.locale,a=null;return 1===e.length?r(e[0])?a=e[0]:s(e[0])&&(e[0].locale&&(n=e[0].locale),e[0].key&&(a=e[0].key)):2===e.length&&(r(e[0])&&(a=e[0]),r(e[1])&&(n=e[1])),this._d(t,n,a)}getNumberFormat(t){return u(this._vm.numberFormats[t]||{})}setNumberFormat(t,e){this._vm.$set(this._vm.numberFormats,t,e),this._clearNumberFormat(t,e)}mergeNumberFormat(t,e){this._vm.$set(this._vm.numberFormats,t,p(this._vm.numberFormats[t]||{},e)),this._clearNumberFormat(t,e)}_clearNumberFormat(t,e){for(let n in e){const e=`${t}__${n}`;this._numberFormatters.hasOwnProperty(e)&&delete this._numberFormatters[e]}}_getNumberFormatter(t,e,n,s,r,a){let i=e,o=s[i];const c=this._getLocaleChain(e,n);for(let t=0;t<c.length;t++){const e=c[t];if(i=e,!l(o=s[e])&&!l(o[r]))break}if(l(o)||l(o[r]))return null;{const t=o[r];let e;if(a)e=new Intl.NumberFormat(i,Object.assign({},t,a));else{const n=`${i}__${r}`;(e=this._numberFormatters[n])||(e=this._numberFormatters[n]=new Intl.NumberFormat(i,t))}return e}}_n(t,e,n,s){if(!tt.availabilities.numberFormat)return"";if(!n){return(s?new Intl.NumberFormat(e,s):new Intl.NumberFormat(e)).format(t)}const r=this._getNumberFormatter(t,e,this.fallbackLocale,this._getNumberFormats(),n,s),a=r&&r.format(t);if(this._isFallbackRoot(a)){if(!this._root)throw Error("unexpected error");return this._root.$i18n.n(t,Object.assign({},{key:n,locale:e},s))}return a||""}n(e,...n){let a=this.locale,i=null,o=null;return 1===n.length?r(n[0])?i=n[0]:s(n[0])&&(n[0].locale&&(a=n[0].locale),n[0].key&&(i=n[0].key),o=Object.keys(n[0]).reduce((e,s)=>m(t,s)?Object.assign({},e,{[s]:n[0][s]}):e,null)):2===n.length&&(r(n[0])&&(i=n[0]),r(n[1])&&(a=n[1])),this._n(e,a,i,o)}_ntp(t,e,n,s){if(!tt.availabilities.numberFormat)return[];if(!n){return(s?new Intl.NumberFormat(e,s):new Intl.NumberFormat(e)).formatToParts(t)}const r=this._getNumberFormatter(t,e,this.fallbackLocale,this._getNumberFormats(),n,s),a=r&&r.formatToParts(t);if(this._isFallbackRoot(a)){if(!this._root)throw Error("unexpected error");return this._root.$i18n._ntp(t,e,n,s)}return a||[]}}let et;Object.defineProperty(tt,"availabilities",{get(){if(!et){const t="undefined"!=typeof Intl;et={dateTimeFormat:t&&void 0!==Intl.DateTimeFormat,numberFormat:t&&void 0!==Intl.NumberFormat}}return et}}),tt.install=I,tt.version="8.22.1";export default tt;
1
+ const t=["compactDisplay","currency","currencyDisplay","currencySign","localeMatcher","notation","numberingSystem","signDisplay","style","unit","unitDisplay","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits"];function e(t,e){"undefined"!=typeof console&&(console.warn("[vue-i18n] "+t),e&&console.warn(e.stack))}const n=Array.isArray;function s(t){return null!==t&&"object"==typeof t}function r(t){return"string"==typeof t}const a=Object.prototype.toString,i="[object Object]";function o(t){return a.call(t)===i}function l(t){return null==t}function c(t){return"function"==typeof t}function h(...t){let e=null,r=null;return 1===t.length?s(t[0])||n(t[0])?r=t[0]:"string"==typeof t[0]&&(e=t[0]):2===t.length&&("string"==typeof t[0]&&(e=t[0]),(s(t[1])||n(t[1]))&&(r=t[1])),{locale:e,params:r}}function u(t){return JSON.parse(JSON.stringify(t))}function m(t,e){return!!~t.indexOf(e)}const _=Object.prototype.hasOwnProperty;function f(t,e){return _.call(t,e)}function p(t){const e=Object(t);for(let t=1;t<arguments.length;t++){const n=arguments[t];if(null!=n){let t;for(t in n)f(n,t)&&(s(n[t])?e[t]=p(e[t],n[t]):e[t]=n[t])}}return e}function g(t,e){if(t===e)return!0;const r=s(t),a=s(e);if(!r||!a)return!r&&!a&&String(t)===String(e);try{const s=n(t),r=n(e);if(s&&r)return t.length===e.length&&t.every((t,n)=>g(t,e[n]));if(s||r)return!1;{const n=Object.keys(t),s=Object.keys(e);return n.length===s.length&&n.every(n=>g(t[n],e[n]))}}catch(t){return!1}}var d={beforeCreate(){const t=this.$options;if(t.i18n=t.i18n||(t.__i18n?{}:null),t.i18n){if(t.i18n instanceof tt){if(t.__i18n)try{let e=t.i18n&&t.i18n.messages?t.i18n.messages:{};t.__i18n.forEach(t=>{e=p(e,JSON.parse(t))}),Object.keys(e).forEach(n=>{t.i18n.mergeLocaleMessage(n,e[n])})}catch(t){}this._i18n=t.i18n,this._i18nWatcher=this._i18n.watchI18nData()}else if(o(t.i18n)){const e=this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof tt?this.$root.$i18n:null;if(e&&(t.i18n.root=this.$root,t.i18n.formatter=e.formatter,t.i18n.fallbackLocale=e.fallbackLocale,t.i18n.formatFallbackMessages=e.formatFallbackMessages,t.i18n.silentTranslationWarn=e.silentTranslationWarn,t.i18n.silentFallbackWarn=e.silentFallbackWarn,t.i18n.pluralizationRules=e.pluralizationRules,t.i18n.preserveDirectiveContent=e.preserveDirectiveContent),t.__i18n)try{let e=t.i18n&&t.i18n.messages?t.i18n.messages:{};t.__i18n.forEach(t=>{e=p(e,JSON.parse(t))}),t.i18n.messages=e}catch(t){}const{sharedMessages:n}=t.i18n;n&&o(n)&&(t.i18n.messages=p(t.i18n.messages,n)),this._i18n=new tt(t.i18n),this._i18nWatcher=this._i18n.watchI18nData(),(void 0===t.i18n.sync||t.i18n.sync)&&(this._localeWatcher=this.$i18n.watchLocale()),e&&e.onComponentInstanceCreated(this._i18n)}}else this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof tt?this._i18n=this.$root.$i18n:t.parent&&t.parent.$i18n&&t.parent.$i18n instanceof tt&&(this._i18n=t.parent.$i18n)},beforeMount(){const t=this.$options;t.i18n=t.i18n||(t.__i18n?{}:null),t.i18n?t.i18n instanceof tt?(this._i18n.subscribeDataChanging(this),this._subscribing=!0):o(t.i18n)&&(this._i18n.subscribeDataChanging(this),this._subscribing=!0):this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof tt?(this._i18n.subscribeDataChanging(this),this._subscribing=!0):t.parent&&t.parent.$i18n&&t.parent.$i18n instanceof tt&&(this._i18n.subscribeDataChanging(this),this._subscribing=!0)},beforeDestroy(){if(!this._i18n)return;const t=this;this.$nextTick(()=>{t._subscribing&&(t._i18n.unsubscribeDataChanging(t),delete t._subscribing),t._i18nWatcher&&(t._i18nWatcher(),t._i18n.destroyVM(),delete t._i18nWatcher),t._localeWatcher&&(t._localeWatcher(),delete t._localeWatcher)})}},b={name:"i18n",functional:!0,props:{tag:{type:[String,Boolean,Object],default:"span"},path:{type:String,required:!0},locale:{type:String},places:{type:[Array,Object]}},render(t,{data:e,parent:n,props:s,slots:r}){const{$i18n:a}=n;if(!a)return;const{path:i,locale:o,places:l}=s,c=r(),h=a.i(i,o,function(t){let e;for(e in t)if("default"!==e)return!1;return Boolean(e)}(c)||l?function(t,e){const n=e?function(t){return Array.isArray(t)?t.reduce(y,{}):Object.assign({},t)}(e):{};if(!t)return n;const s=(t=t.filter(t=>t.tag||""!==t.text.trim())).every(F);return t.reduce(s?v:y,n)}(c.default,l):c),u=s.tag&&!0!==s.tag||!1===s.tag?s.tag:"span";return u?t(u,e,h):h}};function v(t,e){return e.data&&e.data.attrs&&e.data.attrs.place&&(t[e.data.attrs.place]=e),t}function y(t,e,n){return t[n]=e,t}function F(t){return Boolean(t.data&&t.data.attrs&&t.data.attrs.place)}var k={name:"i18n-n",functional:!0,props:{tag:{type:[String,Boolean,Object],default:"span"},value:{type:Number,required:!0},format:{type:[String,Object]},locale:{type:String}},render(e,{props:n,parent:a,data:i}){const o=a.$i18n;if(!o)return null;let l=null,c=null;r(n.format)?l=n.format:s(n.format)&&(n.format.key&&(l=n.format.key),c=Object.keys(n.format).reduce((e,s)=>m(t,s)?Object.assign({},e,{[s]:n.format[s]}):e,null));const h=n.locale||o.locale,u=o._ntp(n.value,h,l,c),_=u.map((t,e)=>{const n=i.scopedSlots&&i.scopedSlots[t.type];return n?n({[t.type]:t.value,index:e,parts:u}):t.value}),f=n.tag&&!0!==n.tag||!1===n.tag?n.tag:"span";return f?e(f,{attrs:i.attrs,class:i.class,staticClass:i.staticClass},_):_}};function $(t,e,n){M(t,n)&&T(t,e,n)}function w(t,e,n,s){if(!M(t,n))return;const r=n.context.$i18n;(function(t,e){const n=e.context;return t._locale===n.$i18n.locale})(t,n)&&g(e.value,e.oldValue)&&g(t._localeMessage,r.getLocaleMessage(r.locale))||T(t,e,n)}function C(t,n,s,r){if(!s.context)return void e("Vue instance does not exists in VNode context");const a=s.context.$i18n||{};n.modifiers.preserve||a.preserveDirectiveContent||(t.textContent=""),t._vt=void 0,delete t._vt,t._locale=void 0,delete t._locale,t._localeMessage=void 0,delete t._localeMessage}function M(t,n){const s=n.context;return s?!!s.$i18n||(e("VueI18n instance does not exists in Vue instance"),!1):(e("Vue instance does not exists in VNode context"),!1)}function T(t,n,s){const a=n.value,{path:i,locale:l,args:c,choice:h}=function(t){let e,n,s,a;r(t)?e=t:o(t)&&(e=t.path,n=t.locale,s=t.args,a=t.choice);return{path:e,locale:n,args:s,choice:a}}(a);if(!i&&!l&&!c)return void e("value type not supported");if(!i)return void e("`path` is required in v-t directive");const u=s.context;t._vt=t.textContent=null!=h?u.$i18n.tc(i,h,...L(l,c)):u.$i18n.t(i,...L(l,c)),t._locale=u.$i18n.locale,t._localeMessage=u.$i18n.getLocaleMessage(u.$i18n.locale)}function L(t,e){const n=[];return t&&n.push(t),e&&(Array.isArray(e)||o(e))&&n.push(e),n}let D;function I(t){I.installed=!0;(D=t).version&&Number(D.version.split(".")[0]);!function(t){t.prototype.hasOwnProperty("$i18n")||Object.defineProperty(t.prototype,"$i18n",{get(){return this._i18n}}),t.prototype.$t=function(t,...e){const n=this.$i18n;return n._t(t,n.locale,n._getMessages(),this,...e)},t.prototype.$tc=function(t,e,...n){const s=this.$i18n;return s._tc(t,s.locale,s._getMessages(),this,e,...n)},t.prototype.$te=function(t,e){const n=this.$i18n;return n._te(t,n.locale,n._getMessages(),e)},t.prototype.$d=function(t,...e){return this.$i18n.d(t,...e)},t.prototype.$n=function(t,...e){return this.$i18n.n(t,...e)}}(D),D.mixin(d),D.directive("t",{bind:$,update:w,unbind:C}),D.component(b.name,b),D.component(k.name,k),D.config.optionMergeStrategies.i18n=function(t,e){return void 0===e?t:e}}const O=/^(?:\d)+/,x=/^(?:\w)+/;const W=0,j=1,N=2,S=3,H=0,P=4,R=5,E=6,V=7,A=8,z=[];z[H]={ws:[H],ident:[3,W],"[":[P],eof:[V]},z[1]={ws:[1],".":[2],"[":[P],eof:[V]},z[2]={ws:[2],ident:[3,W],0:[3,W],number:[3,W]},z[3]={ident:[3,W],0:[3,W],number:[3,W],ws:[1,j],".":[2,j],"[":[P,j],eof:[V,j]},z[P]={"'":[R,W],'"':[E,W],"[":[P,N],"]":[1,S],eof:A,else:[P,W]},z[R]={"'":[P,W],eof:A,else:[R,W]},z[E]={'"':[P,W],eof:A,else:[E,W]};const B=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function U(t){if(null==t)return"eof";switch(t.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return t;case 95:case 36:case 45:return"ident";case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"ws"}return"ident"}function q(t){const e=t.trim();return("0"!==t.charAt(0)||!isNaN(t))&&(n=e,B.test(n)?function(t){const e=t.charCodeAt(0);return e!==t.charCodeAt(t.length-1)||34!==e&&39!==e?t:t.slice(1,-1)}(e):"*"+e);var n}class J{constructor(){this._cache=Object.create(null)}parsePath(t){let e=this._cache[t];return e||(e=function(t){const e=[];let n,s,r,a,i,o,l,c=-1,h=H,u=0;const m=[];function _(){const e=t[c+1];if(h===R&&"'"===e||h===E&&'"'===e)return c++,r="\\"+e,m[W](),!0}for(m[j]=function(){void 0!==s&&(e.push(s),s=void 0)},m[W]=function(){void 0===s?s=r:s+=r},m[N]=function(){m[W](),u++},m[S]=function(){if(u>0)u--,h=P,m[W]();else{if(u=0,void 0===s)return!1;if(!1===(s=q(s)))return!1;m[j]()}};null!==h;)if("\\"!==(n=t[++c])||!_()){if(a=U(n),(i=(l=z[h])[a]||l.else||A)===A)return;if(h=i[0],(o=m[i[1]])&&(r=void 0===(r=i[2])?n:r,!1===o()))return;if(h===V)return e}}(t))&&(this._cache[t]=e),e||[]}getPathValue(t,e){if(!s(t))return null;const n=this.parsePath(e);if(0===n.length)return null;{const e=n.length;let s=t,r=0;for(;r<e;){const t=s[n[r]];if(void 0===t)return null;s=t,r++}return s}}}const G=/<\/?[\w\s="/.':;#-\/]+>/,X=/(?:@(?:\.[a-z]+)?:(?:[\w\-_|.]+|\([\w\-_|.]+\)))/g,Z=/^@(?:\.([a-z]+))?:/,K=/[()]/g,Q={upper:t=>t.toLocaleUpperCase(),lower:t=>t.toLocaleLowerCase(),capitalize:t=>`${t.charAt(0).toLocaleUpperCase()}${t.substr(1)}`},Y=new class{constructor(){this._caches=Object.create(null)}interpolate(t,e){if(!e)return[t];let n=this._caches[t];return n||(n=function(t){const e=[];let n=0,s="";for(;n<t.length;){let r=t[n++];if("{"===r){s&&e.push({type:"text",value:s}),s="";let a="";for(r=t[n++];void 0!==r&&"}"!==r;)a+=r,r=t[n++];const i="}"===r,o=O.test(a)?"list":i&&x.test(a)?"named":"unknown";e.push({value:a,type:o})}else"%"===r?"{"!==t[n]&&(s+=r):s+=r}return s&&e.push({type:"text",value:s}),e}(t),this._caches[t]=n),function(t,e){const n=[];let r=0;const a=Array.isArray(e)?"list":s(e)?"named":"unknown";if("unknown"===a)return n;for(;r<t.length;){const s=t[r];switch(s.type){case"text":n.push(s.value);break;case"list":n.push(e[parseInt(s.value,10)]);break;case"named":"named"===a&&n.push(e[s.value])}r++}return n}(n,e)}};class tt{constructor(t={}){!D&&"undefined"!=typeof window&&window.Vue&&I(window.Vue);const e=t.locale||"en-US",n=!1!==t.fallbackLocale&&(t.fallbackLocale||"en-US"),s=t.messages||{},r=t.dateTimeFormats||{},a=t.numberFormats||{};this._vm=null,this._formatter=t.formatter||Y,this._modifiers=t.modifiers||{},this._missing=t.missing||null,this._root=t.root||null,this._sync=void 0===t.sync||!!t.sync,this._fallbackRoot=void 0===t.fallbackRoot||!!t.fallbackRoot,this._formatFallbackMessages=void 0!==t.formatFallbackMessages&&!!t.formatFallbackMessages,this._silentTranslationWarn=void 0!==t.silentTranslationWarn&&t.silentTranslationWarn,this._silentFallbackWarn=void 0!==t.silentFallbackWarn&&!!t.silentFallbackWarn,this._dateTimeFormatters={},this._numberFormatters={},this._path=new J,this._dataListeners=[],this._componentInstanceCreatedListener=t.componentInstanceCreatedListener||null,this._preserveDirectiveContent=void 0!==t.preserveDirectiveContent&&!!t.preserveDirectiveContent,this.pluralizationRules=t.pluralizationRules||{},this._warnHtmlInMessage=t.warnHtmlInMessage||"off",this._postTranslation=t.postTranslation||null,this._escapeParameterHtml=t.escapeParameterHtml||!1,this.getChoiceIndex=((t,e)=>{const n=Object.getPrototypeOf(this);if(n&&n.getChoiceIndex){return n.getChoiceIndex.call(this,t,e)}return this.locale in this.pluralizationRules?this.pluralizationRules[this.locale].apply(this,[t,e]):((t,e)=>(t=Math.abs(t),2===e?t?t>1?1:0:1:t?Math.min(t,2):0))(t,e)}),this._exist=((t,e)=>!(!t||!e)&&(!l(this._path.getPathValue(t,e))||!!t[e])),"warn"!==this._warnHtmlInMessage&&"error"!==this._warnHtmlInMessage||Object.keys(s).forEach(t=>{this._checkLocaleMessage(t,this._warnHtmlInMessage,s[t])}),this._initVM({locale:e,fallbackLocale:n,messages:s,dateTimeFormats:r,numberFormats:a})}_checkLocaleMessage(t,s,a){const i=(t,s,a,l)=>{if(o(a))Object.keys(a).forEach(e=>{const n=a[e];o(n)?(l.push(e),l.push("."),i(t,s,n,l),l.pop(),l.pop()):(l.push(e),i(t,s,n,l),l.pop())});else if(n(a))a.forEach((e,n)=>{o(e)?(l.push(`[${n}]`),l.push("."),i(t,s,e,l),l.pop(),l.pop()):(l.push(`[${n}]`),i(t,s,e,l),l.pop())});else if(r(a)){if(G.test(a)){const n=`Detected HTML in message '${a}' of keypath '${l.join("")}' at '${s}'. Consider component interpolation with '<i18n>' to avoid XSS. See https://bit.ly/2ZqJzkp`;"warn"===t?e(n):"error"===t&&function(t,e){"undefined"!=typeof console&&(console.error("[vue-i18n] "+t),e&&console.error(e.stack))}(n)}}};i(s,t,a,[])}_initVM(t){const e=D.config.silent;D.config.silent=!0,this._vm=new D({data:t}),D.config.silent=e}destroyVM(){this._vm.$destroy()}subscribeDataChanging(t){this._dataListeners.push(t)}unsubscribeDataChanging(t){!function(t,e){if(t.length){const n=t.indexOf(e);if(n>-1)t.splice(n,1)}}(this._dataListeners,t)}watchI18nData(){const t=this;return this._vm.$watch("$data",()=>{let e=t._dataListeners.length;for(;e--;)D.nextTick(()=>{t._dataListeners[e]&&t._dataListeners[e].$forceUpdate()})},{deep:!0})}watchLocale(){if(!this._sync||!this._root)return null;const t=this._vm;return this._root.$i18n.vm.$watch("locale",e=>{t.$set(t,"locale",e),t.$forceUpdate()},{immediate:!0})}onComponentInstanceCreated(t){this._componentInstanceCreatedListener&&this._componentInstanceCreatedListener(t,this)}get vm(){return this._vm}get messages(){return u(this._getMessages())}get dateTimeFormats(){return u(this._getDateTimeFormats())}get numberFormats(){return u(this._getNumberFormats())}get availableLocales(){return Object.keys(this.messages).sort()}get locale(){return this._vm.locale}set locale(t){this._vm.$set(this._vm,"locale",t)}get fallbackLocale(){return this._vm.fallbackLocale}set fallbackLocale(t){this._localeChainCache={},this._vm.$set(this._vm,"fallbackLocale",t)}get formatFallbackMessages(){return this._formatFallbackMessages}set formatFallbackMessages(t){this._formatFallbackMessages=t}get missing(){return this._missing}set missing(t){this._missing=t}get formatter(){return this._formatter}set formatter(t){this._formatter=t}get silentTranslationWarn(){return this._silentTranslationWarn}set silentTranslationWarn(t){this._silentTranslationWarn=t}get silentFallbackWarn(){return this._silentFallbackWarn}set silentFallbackWarn(t){this._silentFallbackWarn=t}get preserveDirectiveContent(){return this._preserveDirectiveContent}set preserveDirectiveContent(t){this._preserveDirectiveContent=t}get warnHtmlInMessage(){return this._warnHtmlInMessage}set warnHtmlInMessage(t){const e=this._warnHtmlInMessage;if(this._warnHtmlInMessage=t,e!==t&&("warn"===t||"error"===t)){const t=this._getMessages();Object.keys(t).forEach(e=>{this._checkLocaleMessage(e,this._warnHtmlInMessage,t[e])})}}get postTranslation(){return this._postTranslation}set postTranslation(t){this._postTranslation=t}_getMessages(){return this._vm.messages}_getDateTimeFormats(){return this._vm.dateTimeFormats}_getNumberFormats(){return this._vm.numberFormats}_warnDefault(t,e,n,s,a,i){if(!l(n))return n;if(this._missing){const n=this._missing.apply(null,[t,e,s,a]);if(r(n))return n}if(this._formatFallbackMessages){const t=h(...a);return this._render(e,i,t.params,e)}return e}_isFallbackRoot(t){return!t&&!l(this._root)&&this._fallbackRoot}_isSilentFallbackWarn(t){return this._silentFallbackWarn instanceof RegExp?this._silentFallbackWarn.test(t):this._silentFallbackWarn}_isSilentFallback(t,e){return this._isSilentFallbackWarn(e)&&(this._isFallbackRoot()||t!==this.fallbackLocale)}_isSilentTranslationWarn(t){return this._silentTranslationWarn instanceof RegExp?this._silentTranslationWarn.test(t):this._silentTranslationWarn}_interpolate(t,e,s,a,i,h,u){if(!e)return null;const m=this._path.getPathValue(e,s);if(n(m)||o(m))return m;let _;if(l(m)){if(!o(e))return null;if(!r(_=e[s])&&!c(_))return null}else{if(!r(m)&&!c(m))return null;_=m}return r(_)&&(_.indexOf("@:")>=0||_.indexOf("@.")>=0)&&(_=this._link(t,e,_,a,"raw",h,u)),this._render(_,i,h,s)}_link(t,e,s,r,a,i,o){let l=s;const c=l.match(X);for(let s in c){if(!c.hasOwnProperty(s))continue;const h=c[s],u=h.match(Z),[_,f]=u,p=h.replace(_,"").replace(K,"");if(m(o,p))return l;o.push(p);let g=this._interpolate(t,e,p,r,"raw"===a?"string":a,"raw"===a?void 0:i,o);if(this._isFallbackRoot(g)){if(!this._root)throw Error("unexpected error");const t=this._root.$i18n;g=t._translate(t._getMessages(),t.locale,t.fallbackLocale,p,r,a,i)}g=this._warnDefault(t,p,g,r,n(i)?i:[i],a),this._modifiers.hasOwnProperty(f)?g=this._modifiers[f](g):Q.hasOwnProperty(f)&&(g=Q[f](g)),o.pop(),l=g?l.replace(h,g):l}return l}_createMessageContext(t){const e=n(t)?t:[],r=s(t)?t:{};return{list:t=>e[t],named:t=>r[t]}}_render(t,e,n,s){if(c(t))return t(this._createMessageContext(n));let a=this._formatter.interpolate(t,n,s);return a||(a=Y.interpolate(t,n,s)),"string"!==e||r(a)?a:a.join("")}_appendItemToChain(t,e,n){let s=!1;return m(t,e)||(s=!0,e&&(s="!"!==e[e.length-1],e=e.replace(/!/g,""),t.push(e),n&&n[e]&&(s=n[e]))),s}_appendLocaleToChain(t,e,n){let s;const r=e.split("-");do{const e=r.join("-");s=this._appendItemToChain(t,e,n),r.splice(-1,1)}while(r.length&&!0===s);return s}_appendBlockToChain(t,e,n){let s=!0;for(let a=0;a<e.length&&"boolean"==typeof s;a++){const i=e[a];r(i)&&(s=this._appendLocaleToChain(t,i,n))}return s}_getLocaleChain(t,e){if(""===t)return[];this._localeChainCache||(this._localeChainCache={});let a=this._localeChainCache[t];if(!a){e||(e=this.fallbackLocale),a=[];let i,o=[t];for(;n(o);)o=this._appendBlockToChain(a,o,e);(o=r(i=n(e)?e:s(e)?e.default?e.default:null:e)?[i]:i)&&this._appendBlockToChain(a,o,null),this._localeChainCache[t]=a}return a}_translate(t,e,n,s,r,a,i){const o=this._getLocaleChain(e,n);let c;for(let e=0;e<o.length;e++){const n=o[e];if(!l(c=this._interpolate(n,t[n],s,r,a,i,[s])))return c}return null}_t(t,e,n,s,...r){if(!t)return"";const a=h(...r);var i;this._escapeParameterHtml&&(a.params=(null!=(i=a.params)&&Object.keys(i).forEach(t=>{"string"==typeof i[t]&&(i[t]=function(t){return t.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;")}(i[t]))}),i));const o=a.locale||e;let l=this._translate(n,o,this.fallbackLocale,t,s,"string",a.params);if(this._isFallbackRoot(l)){if(!this._root)throw Error("unexpected error");return this._root.$t(t,...r)}return l=this._warnDefault(o,t,l,s,r,"string"),this._postTranslation&&null!=l&&(l=this._postTranslation(l,t)),l}t(t,...e){return this._t(t,this.locale,this._getMessages(),null,...e)}_i(t,e,n,s,r){const a=this._translate(n,e,this.fallbackLocale,t,s,"raw",r);if(this._isFallbackRoot(a)){if(!this._root)throw Error("unexpected error");return this._root.$i18n.i(t,e,r)}return this._warnDefault(e,t,a,s,[r],"raw")}i(t,e,n){return t?(r(e)||(e=this.locale),this._i(t,e,this._getMessages(),null,n)):""}_tc(t,e,n,s,r,...a){if(!t)return"";void 0===r&&(r=1);const i={count:r,n:r},o=h(...a);return o.params=Object.assign(i,o.params),a=null===o.locale?[o.params]:[o.locale,o.params],this.fetchChoice(this._t(t,e,n,s,...a),r)}fetchChoice(t,e){if(!t||!r(t))return null;const n=t.split("|");return n[e=this.getChoiceIndex(e,n.length)]?n[e].trim():t}tc(t,e,...n){return this._tc(t,this.locale,this._getMessages(),null,e,...n)}_te(t,e,n,...s){const r=h(...s).locale||e;return this._exist(n[r],t)}te(t,e){return this._te(t,this.locale,this._getMessages(),e)}getLocaleMessage(t){return u(this._vm.messages[t]||{})}setLocaleMessage(t,e){"warn"!==this._warnHtmlInMessage&&"error"!==this._warnHtmlInMessage||this._checkLocaleMessage(t,this._warnHtmlInMessage,e),this._vm.$set(this._vm.messages,t,e)}mergeLocaleMessage(t,e){"warn"!==this._warnHtmlInMessage&&"error"!==this._warnHtmlInMessage||this._checkLocaleMessage(t,this._warnHtmlInMessage,e),this._vm.$set(this._vm.messages,t,p({},this._vm.messages[t]||{},e))}getDateTimeFormat(t){return u(this._vm.dateTimeFormats[t]||{})}setDateTimeFormat(t,e){this._vm.$set(this._vm.dateTimeFormats,t,e),this._clearDateTimeFormat(t,e)}mergeDateTimeFormat(t,e){this._vm.$set(this._vm.dateTimeFormats,t,p(this._vm.dateTimeFormats[t]||{},e)),this._clearDateTimeFormat(t,e)}_clearDateTimeFormat(t,e){for(let n in e){const e=`${t}__${n}`;this._dateTimeFormatters.hasOwnProperty(e)&&delete this._dateTimeFormatters[e]}}_localizeDateTime(t,e,n,s,r){let a=e,i=s[a];const o=this._getLocaleChain(e,n);for(let t=0;t<o.length;t++){const e=o[t];if(a=e,!l(i=s[e])&&!l(i[r]))break}if(l(i)||l(i[r]))return null;{const e=i[r],n=`${a}__${r}`;let s=this._dateTimeFormatters[n];return s||(s=this._dateTimeFormatters[n]=new Intl.DateTimeFormat(a,e)),s.format(t)}}_d(t,e,n){if(!n)return new Intl.DateTimeFormat(e).format(t);const s=this._localizeDateTime(t,e,this.fallbackLocale,this._getDateTimeFormats(),n);if(this._isFallbackRoot(s)){if(!this._root)throw Error("unexpected error");return this._root.$i18n.d(t,n,e)}return s||""}d(t,...e){let n=this.locale,a=null;return 1===e.length?r(e[0])?a=e[0]:s(e[0])&&(e[0].locale&&(n=e[0].locale),e[0].key&&(a=e[0].key)):2===e.length&&(r(e[0])&&(a=e[0]),r(e[1])&&(n=e[1])),this._d(t,n,a)}getNumberFormat(t){return u(this._vm.numberFormats[t]||{})}setNumberFormat(t,e){this._vm.$set(this._vm.numberFormats,t,e),this._clearNumberFormat(t,e)}mergeNumberFormat(t,e){this._vm.$set(this._vm.numberFormats,t,p(this._vm.numberFormats[t]||{},e)),this._clearNumberFormat(t,e)}_clearNumberFormat(t,e){for(let n in e){const e=`${t}__${n}`;this._numberFormatters.hasOwnProperty(e)&&delete this._numberFormatters[e]}}_getNumberFormatter(t,e,n,s,r,a){let i=e,o=s[i];const c=this._getLocaleChain(e,n);for(let t=0;t<c.length;t++){const e=c[t];if(i=e,!l(o=s[e])&&!l(o[r]))break}if(l(o)||l(o[r]))return null;{const t=o[r];let e;if(a)e=new Intl.NumberFormat(i,Object.assign({},t,a));else{const n=`${i}__${r}`;(e=this._numberFormatters[n])||(e=this._numberFormatters[n]=new Intl.NumberFormat(i,t))}return e}}_n(t,e,n,s){if(!tt.availabilities.numberFormat)return"";if(!n){return(s?new Intl.NumberFormat(e,s):new Intl.NumberFormat(e)).format(t)}const r=this._getNumberFormatter(t,e,this.fallbackLocale,this._getNumberFormats(),n,s),a=r&&r.format(t);if(this._isFallbackRoot(a)){if(!this._root)throw Error("unexpected error");return this._root.$i18n.n(t,Object.assign({},{key:n,locale:e},s))}return a||""}n(e,...n){let a=this.locale,i=null,o=null;return 1===n.length?r(n[0])?i=n[0]:s(n[0])&&(n[0].locale&&(a=n[0].locale),n[0].key&&(i=n[0].key),o=Object.keys(n[0]).reduce((e,s)=>m(t,s)?Object.assign({},e,{[s]:n[0][s]}):e,null)):2===n.length&&(r(n[0])&&(i=n[0]),r(n[1])&&(a=n[1])),this._n(e,a,i,o)}_ntp(t,e,n,s){if(!tt.availabilities.numberFormat)return[];if(!n){return(s?new Intl.NumberFormat(e,s):new Intl.NumberFormat(e)).formatToParts(t)}const r=this._getNumberFormatter(t,e,this.fallbackLocale,this._getNumberFormats(),n,s),a=r&&r.formatToParts(t);if(this._isFallbackRoot(a)){if(!this._root)throw Error("unexpected error");return this._root.$i18n._ntp(t,e,n,s)}return a||[]}}let et;Object.defineProperty(tt,"availabilities",{get(){if(!et){const t="undefined"!=typeof Intl;et={dateTimeFormat:t&&void 0!==Intl.DateTimeFormat,numberFormat:t&&void 0!==Intl.NumberFormat}}return et}}),tt.install=I,tt.version="8.22.2";export default tt;
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * vue-i18n v8.22.1
2
+ * vue-i18n v8.22.2
3
3
  * (c) 2020 kazuya kawaguchi
4
4
  * Released under the MIT License.
5
5
  */
@@ -10,18 +10,23 @@
10
10
  */
11
11
 
12
12
  var numberFormatKeys = [
13
- 'style',
13
+ 'compactDisplay',
14
14
  'currency',
15
15
  'currencyDisplay',
16
+ 'currencySign',
17
+ 'localeMatcher',
18
+ 'notation',
19
+ 'numberingSystem',
20
+ 'signDisplay',
21
+ 'style',
22
+ 'unit',
23
+ 'unitDisplay',
16
24
  'useGrouping',
17
25
  'minimumIntegerDigits',
18
26
  'minimumFractionDigits',
19
27
  'maximumFractionDigits',
20
28
  'minimumSignificantDigits',
21
- 'maximumSignificantDigits',
22
- 'localeMatcher',
23
- 'formatMatcher',
24
- 'unit'
29
+ 'maximumSignificantDigits'
25
30
  ];
26
31
 
27
32
  /**
@@ -2181,6 +2186,6 @@ Object.defineProperty(VueI18n, 'availabilities', {
2181
2186
  });
2182
2187
 
2183
2188
  VueI18n.install = install;
2184
- VueI18n.version = '8.22.1';
2189
+ VueI18n.version = '8.22.2';
2185
2190
 
2186
2191
  export default VueI18n;
package/dist/vue-i18n.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * vue-i18n v8.22.1
2
+ * vue-i18n v8.22.2
3
3
  * (c) 2020 kazuya kawaguchi
4
4
  * Released under the MIT License.
5
5
  */
@@ -16,18 +16,23 @@
16
16
  */
17
17
 
18
18
  var numberFormatKeys = [
19
- 'style',
19
+ 'compactDisplay',
20
20
  'currency',
21
21
  'currencyDisplay',
22
+ 'currencySign',
23
+ 'localeMatcher',
24
+ 'notation',
25
+ 'numberingSystem',
26
+ 'signDisplay',
27
+ 'style',
28
+ 'unit',
29
+ 'unitDisplay',
22
30
  'useGrouping',
23
31
  'minimumIntegerDigits',
24
32
  'minimumFractionDigits',
25
33
  'maximumFractionDigits',
26
34
  'minimumSignificantDigits',
27
- 'maximumSignificantDigits',
28
- 'localeMatcher',
29
- 'formatMatcher',
30
- 'unit'
35
+ 'maximumSignificantDigits'
31
36
  ];
32
37
 
33
38
  /**
@@ -2187,7 +2192,7 @@
2187
2192
  });
2188
2193
 
2189
2194
  VueI18n.install = install;
2190
- VueI18n.version = '8.22.1';
2195
+ VueI18n.version = '8.22.2';
2191
2196
 
2192
2197
  return VueI18n;
2193
2198
 
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * vue-i18n v8.22.1
2
+ * vue-i18n v8.22.2
3
3
  * (c) 2020 kazuya kawaguchi
4
4
  * Released under the MIT License.
5
5
  */
6
- var t,e;t=this,e=function(){"use strict";var t=["style","currency","currencyDisplay","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","localeMatcher","formatMatcher","unit"];function e(t,e){"undefined"!=typeof console&&(console.warn("[vue-i18n] "+t),e&&console.warn(e.stack))}var n=Array.isArray;function r(t){return null!==t&&"object"==typeof t}function a(t){return"string"==typeof t}var i=Object.prototype.toString,o="[object Object]";function s(t){return i.call(t)===o}function l(t){return null==t}function c(t){return"function"==typeof t}function u(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var a=null,i=null;return 1===t.length?r(t[0])||n(t[0])?i=t[0]:"string"==typeof t[0]&&(a=t[0]):2===t.length&&("string"==typeof t[0]&&(a=t[0]),(r(t[1])||n(t[1]))&&(i=t[1])),{locale:a,params:i}}function f(t){return JSON.parse(JSON.stringify(t))}function h(t,e){return!!~t.indexOf(e)}var p=Object.prototype.hasOwnProperty;function m(t,e){return p.call(t,e)}function _(t){for(var e=arguments,n=Object(t),a=1;a<arguments.length;a++){var i=e[a];if(null!=i){var o=void 0;for(o in i)m(i,o)&&(r(i[o])?n[o]=_(n[o],i[o]):n[o]=i[o])}}return n}function g(t,e){if(t===e)return!0;var a=r(t),i=r(e);if(!a||!i)return!a&&!i&&String(t)===String(e);try{var o=n(t),s=n(e);if(o&&s)return t.length===e.length&&t.every(function(t,n){return g(t,e[n])});if(o||s)return!1;var l=Object.keys(t),c=Object.keys(e);return l.length===c.length&&l.every(function(n){return g(t[n],e[n])})}catch(t){return!1}}var v={beforeCreate:function(){var t=this.$options;if(t.i18n=t.i18n||(t.__i18n?{}:null),t.i18n){if(t.i18n instanceof nt){if(t.__i18n)try{var e=t.i18n&&t.i18n.messages?t.i18n.messages:{};t.__i18n.forEach(function(t){e=_(e,JSON.parse(t))}),Object.keys(e).forEach(function(n){t.i18n.mergeLocaleMessage(n,e[n])})}catch(t){}this._i18n=t.i18n,this._i18nWatcher=this._i18n.watchI18nData()}else if(s(t.i18n)){var n=this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof nt?this.$root.$i18n:null;if(n&&(t.i18n.root=this.$root,t.i18n.formatter=n.formatter,t.i18n.fallbackLocale=n.fallbackLocale,t.i18n.formatFallbackMessages=n.formatFallbackMessages,t.i18n.silentTranslationWarn=n.silentTranslationWarn,t.i18n.silentFallbackWarn=n.silentFallbackWarn,t.i18n.pluralizationRules=n.pluralizationRules,t.i18n.preserveDirectiveContent=n.preserveDirectiveContent),t.__i18n)try{var r=t.i18n&&t.i18n.messages?t.i18n.messages:{};t.__i18n.forEach(function(t){r=_(r,JSON.parse(t))}),t.i18n.messages=r}catch(t){}var a=t.i18n.sharedMessages;a&&s(a)&&(t.i18n.messages=_(t.i18n.messages,a)),this._i18n=new nt(t.i18n),this._i18nWatcher=this._i18n.watchI18nData(),(void 0===t.i18n.sync||t.i18n.sync)&&(this._localeWatcher=this.$i18n.watchLocale()),n&&n.onComponentInstanceCreated(this._i18n)}}else this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof nt?this._i18n=this.$root.$i18n:t.parent&&t.parent.$i18n&&t.parent.$i18n instanceof nt&&(this._i18n=t.parent.$i18n)},beforeMount:function(){var t=this.$options;t.i18n=t.i18n||(t.__i18n?{}:null),t.i18n?t.i18n instanceof nt?(this._i18n.subscribeDataChanging(this),this._subscribing=!0):s(t.i18n)&&(this._i18n.subscribeDataChanging(this),this._subscribing=!0):this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof nt?(this._i18n.subscribeDataChanging(this),this._subscribing=!0):t.parent&&t.parent.$i18n&&t.parent.$i18n instanceof nt&&(this._i18n.subscribeDataChanging(this),this._subscribing=!0)},beforeDestroy:function(){if(this._i18n){var t=this;this.$nextTick(function(){t._subscribing&&(t._i18n.unsubscribeDataChanging(t),delete t._subscribing),t._i18nWatcher&&(t._i18nWatcher(),t._i18n.destroyVM(),delete t._i18nWatcher),t._localeWatcher&&(t._localeWatcher(),delete t._localeWatcher)})}}},b={name:"i18n",functional:!0,props:{tag:{type:[String,Boolean,Object],default:"span"},path:{type:String,required:!0},locale:{type:String},places:{type:[Array,Object]}},render:function(t,e){var n=e.data,r=e.parent,a=e.props,i=e.slots,o=r.$i18n;if(o){var s=a.path,l=a.locale,c=a.places,u=i(),f=o.i(s,l,function(t){var e;for(e in t)if("default"!==e)return!1;return Boolean(e)}(u)||c?function(t,e){var n=e?function(t){return Array.isArray(t)?t.reduce(y,{}):Object.assign({},t)}(e):{};if(!t)return n;var r=(t=t.filter(function(t){return t.tag||""!==t.text.trim()})).every(F);return t.reduce(r?d:y,n)}(u.default,c):u),h=a.tag&&!0!==a.tag||!1===a.tag?a.tag:"span";return h?t(h,n,f):f}}};function d(t,e){return e.data&&e.data.attrs&&e.data.attrs.place&&(t[e.data.attrs.place]=e),t}function y(t,e,n){return t[n]=e,t}function F(t){return Boolean(t.data&&t.data.attrs&&t.data.attrs.place)}var k,w={name:"i18n-n",functional:!0,props:{tag:{type:[String,Boolean,Object],default:"span"},value:{type:Number,required:!0},format:{type:[String,Object]},locale:{type:String}},render:function(e,n){var i=n.props,o=n.parent,s=n.data,l=o.$i18n;if(!l)return null;var c=null,u=null;a(i.format)?c=i.format:r(i.format)&&(i.format.key&&(c=i.format.key),u=Object.keys(i.format).reduce(function(e,n){var r;return h(t,n)?Object.assign({},e,((r={})[n]=i.format[n],r)):e},null));var f=i.locale||l.locale,p=l._ntp(i.value,f,c,u),m=p.map(function(t,e){var n,r=s.scopedSlots&&s.scopedSlots[t.type];return r?r(((n={})[t.type]=t.value,n.index=e,n.parts=p,n)):t.value}),_=i.tag&&!0!==i.tag||!1===i.tag?i.tag:"span";return _?e(_,{attrs:s.attrs,class:s.class,staticClass:s.staticClass},m):m}};function $(t,e,n){T(t,n)&&L(t,e,n)}function M(t,e,n,r){if(T(t,n)){var a=n.context.$i18n;(function(t,e){var n=e.context;return t._locale===n.$i18n.locale})(t,n)&&g(e.value,e.oldValue)&&g(t._localeMessage,a.getLocaleMessage(a.locale))||L(t,e,n)}}function C(t,n,r,a){if(r.context){var i=r.context.$i18n||{};n.modifiers.preserve||i.preserveDirectiveContent||(t.textContent=""),t._vt=void 0,delete t._vt,t._locale=void 0,delete t._locale,t._localeMessage=void 0,delete t._localeMessage}else e("Vue instance does not exists in VNode context")}function T(t,n){var r=n.context;return r?!!r.$i18n||(e("VueI18n instance does not exists in Vue instance"),!1):(e("Vue instance does not exists in VNode context"),!1)}function L(t,n,r){var i,o,l=function(t){var e,n,r,i;a(t)?e=t:s(t)&&(e=t.path,n=t.locale,r=t.args,i=t.choice);return{path:e,locale:n,args:r,choice:i}}(n.value),c=l.path,u=l.locale,f=l.args,h=l.choice;if(c||u||f)if(c){var p=r.context;t._vt=t.textContent=null!=h?(i=p.$i18n).tc.apply(i,[c,h].concat(I(u,f))):(o=p.$i18n).t.apply(o,[c].concat(I(u,f))),t._locale=p.$i18n.locale,t._localeMessage=p.$i18n.getLocaleMessage(p.$i18n.locale)}else e("`path` is required in v-t directive");else e("value type not supported")}function I(t,e){var n=[];return t&&n.push(t),e&&(Array.isArray(e)||s(e))&&n.push(e),n}function D(t){D.installed=!0;(k=t).version&&Number(k.version.split(".")[0]);!function(t){t.prototype.hasOwnProperty("$i18n")||Object.defineProperty(t.prototype,"$i18n",{get:function(){return this._i18n}}),t.prototype.$t=function(t){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];var r=this.$i18n;return r._t.apply(r,[t,r.locale,r._getMessages(),this].concat(e))},t.prototype.$tc=function(t,e){for(var n=[],r=arguments.length-2;r-- >0;)n[r]=arguments[r+2];var a=this.$i18n;return a._tc.apply(a,[t,a.locale,a._getMessages(),this,e].concat(n))},t.prototype.$te=function(t,e){var n=this.$i18n;return n._te(t,n.locale,n._getMessages(),e)},t.prototype.$d=function(t){for(var e,n=[],r=arguments.length-1;r-- >0;)n[r]=arguments[r+1];return(e=this.$i18n).d.apply(e,[t].concat(n))},t.prototype.$n=function(t){for(var e,n=[],r=arguments.length-1;r-- >0;)n[r]=arguments[r+1];return(e=this.$i18n).n.apply(e,[t].concat(n))}}(k),k.mixin(v),k.directive("t",{bind:$,update:M,unbind:C}),k.component(b.name,b),k.component(w.name,w),k.config.optionMergeStrategies.i18n=function(t,e){return void 0===e?t:e}}var O=function(){this._caches=Object.create(null)};O.prototype.interpolate=function(t,e){if(!e)return[t];var n=this._caches[t];return n||(n=function(t){var e=[],n=0,r="";for(;n<t.length;){var a=t[n++];if("{"===a){r&&e.push({type:"text",value:r}),r="";var i="";for(a=t[n++];void 0!==a&&"}"!==a;)i+=a,a=t[n++];var o="}"===a,s=x.test(i)?"list":o&&W.test(i)?"named":"unknown";e.push({value:i,type:s})}else"%"===a?"{"!==t[n]&&(r+=a):r+=a}return r&&e.push({type:"text",value:r}),e}(t),this._caches[t]=n),function(t,e){var n=[],a=0,i=Array.isArray(e)?"list":r(e)?"named":"unknown";if("unknown"===i)return n;for(;a<t.length;){var o=t[a];switch(o.type){case"text":n.push(o.value);break;case"list":n.push(e[parseInt(o.value,10)]);break;case"named":"named"===i&&n.push(e[o.value])}a++}return n}(n,e)};var x=/^(?:\d)+/,W=/^(?:\w)+/,j=0,N=1,S=2,H=3,P=0,R=4,V=5,E=6,A=7,z=8,B=[];B[P]={ws:[P],ident:[3,j],"[":[R],eof:[A]},B[1]={ws:[1],".":[2],"[":[R],eof:[A]},B[2]={ws:[2],ident:[3,j],0:[3,j],number:[3,j]},B[3]={ident:[3,j],0:[3,j],number:[3,j],ws:[1,N],".":[2,N],"[":[R,N],eof:[A,N]},B[R]={"'":[V,j],'"':[E,j],"[":[R,S],"]":[1,H],eof:z,else:[R,j]},B[V]={"'":[R,j],eof:z,else:[V,j]},B[E]={'"':[R,j],eof:z,else:[E,j]};var U=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function q(t){if(null==t)return"eof";switch(t.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return t;case 95:case 36:case 45:return"ident";case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"ws"}return"ident"}function J(t){var e,n,r,a=t.trim();return("0"!==t.charAt(0)||!isNaN(t))&&(r=a,U.test(r)?(n=(e=a).charCodeAt(0))!==e.charCodeAt(e.length-1)||34!==n&&39!==n?e:e.slice(1,-1):"*"+a)}var G=function(){this._cache=Object.create(null)};G.prototype.parsePath=function(t){var e=this._cache[t];return e||(e=function(t){var e,n,r,a,i,o,s,l=[],c=-1,u=P,f=0,h=[];function p(){var e=t[c+1];if(u===V&&"'"===e||u===E&&'"'===e)return c++,r="\\"+e,h[j](),!0}for(h[N]=function(){void 0!==n&&(l.push(n),n=void 0)},h[j]=function(){void 0===n?n=r:n+=r},h[S]=function(){h[j](),f++},h[H]=function(){if(f>0)f--,u=R,h[j]();else{if(f=0,void 0===n)return!1;if(!1===(n=J(n)))return!1;h[N]()}};null!==u;)if("\\"!==(e=t[++c])||!p()){if(a=q(e),(i=(s=B[u])[a]||s.else||z)===z)return;if(u=i[0],(o=h[i[1]])&&(r=void 0===(r=i[2])?e:r,!1===o()))return;if(u===A)return l}}(t))&&(this._cache[t]=e),e||[]},G.prototype.getPathValue=function(t,e){if(!r(t))return null;var n=this.parsePath(e);if(0===n.length)return null;for(var a=n.length,i=t,o=0;o<a;){var s=i[n[o]];if(void 0===s)return null;i=s,o++}return i};var X,Z=/<\/?[\w\s="/.':;#-\/]+>/,K=/(?:@(?:\.[a-z]+)?:(?:[\w\-_|.]+|\([\w\-_|.]+\)))/g,Q=/^@(?:\.([a-z]+))?:/,Y=/[()]/g,tt={upper:function(t){return t.toLocaleUpperCase()},lower:function(t){return t.toLocaleLowerCase()},capitalize:function(t){return""+t.charAt(0).toLocaleUpperCase()+t.substr(1)}},et=new O,nt=function(t){var e=this;void 0===t&&(t={}),!k&&"undefined"!=typeof window&&window.Vue&&D(window.Vue);var n=t.locale||"en-US",r=!1!==t.fallbackLocale&&(t.fallbackLocale||"en-US"),a=t.messages||{},i=t.dateTimeFormats||{},o=t.numberFormats||{};this._vm=null,this._formatter=t.formatter||et,this._modifiers=t.modifiers||{},this._missing=t.missing||null,this._root=t.root||null,this._sync=void 0===t.sync||!!t.sync,this._fallbackRoot=void 0===t.fallbackRoot||!!t.fallbackRoot,this._formatFallbackMessages=void 0!==t.formatFallbackMessages&&!!t.formatFallbackMessages,this._silentTranslationWarn=void 0!==t.silentTranslationWarn&&t.silentTranslationWarn,this._silentFallbackWarn=void 0!==t.silentFallbackWarn&&!!t.silentFallbackWarn,this._dateTimeFormatters={},this._numberFormatters={},this._path=new G,this._dataListeners=[],this._componentInstanceCreatedListener=t.componentInstanceCreatedListener||null,this._preserveDirectiveContent=void 0!==t.preserveDirectiveContent&&!!t.preserveDirectiveContent,this.pluralizationRules=t.pluralizationRules||{},this._warnHtmlInMessage=t.warnHtmlInMessage||"off",this._postTranslation=t.postTranslation||null,this._escapeParameterHtml=t.escapeParameterHtml||!1,this.getChoiceIndex=function(t,n){var r=Object.getPrototypeOf(e);if(r&&r.getChoiceIndex)return r.getChoiceIndex.call(e,t,n);var a,i;return e.locale in e.pluralizationRules?e.pluralizationRules[e.locale].apply(e,[t,n]):(a=t,i=n,a=Math.abs(a),2===i?a?a>1?1:0:1:a?Math.min(a,2):0)},this._exist=function(t,n){return!(!t||!n)&&(!l(e._path.getPathValue(t,n))||!!t[n])},"warn"!==this._warnHtmlInMessage&&"error"!==this._warnHtmlInMessage||Object.keys(a).forEach(function(t){e._checkLocaleMessage(t,e._warnHtmlInMessage,a[t])}),this._initVM({locale:n,fallbackLocale:r,messages:a,dateTimeFormats:i,numberFormats:o})},rt={vm:{configurable:!0},messages:{configurable:!0},dateTimeFormats:{configurable:!0},numberFormats:{configurable:!0},availableLocales:{configurable:!0},locale:{configurable:!0},fallbackLocale:{configurable:!0},formatFallbackMessages:{configurable:!0},missing:{configurable:!0},formatter:{configurable:!0},silentTranslationWarn:{configurable:!0},silentFallbackWarn:{configurable:!0},preserveDirectiveContent:{configurable:!0},warnHtmlInMessage:{configurable:!0},postTranslation:{configurable:!0}};return nt.prototype._checkLocaleMessage=function(t,r,i){var o=function(t,r,i,l){if(s(i))Object.keys(i).forEach(function(e){var n=i[e];s(n)?(l.push(e),l.push("."),o(t,r,n,l),l.pop(),l.pop()):(l.push(e),o(t,r,n,l),l.pop())});else if(n(i))i.forEach(function(e,n){s(e)?(l.push("["+n+"]"),l.push("."),o(t,r,e,l),l.pop(),l.pop()):(l.push("["+n+"]"),o(t,r,e,l),l.pop())});else if(a(i)){if(Z.test(i)){var c="Detected HTML in message '"+i+"' of keypath '"+l.join("")+"' at '"+r+"'. Consider component interpolation with '<i18n>' to avoid XSS. See https://bit.ly/2ZqJzkp";"warn"===t?e(c):"error"===t&&function(t,e){"undefined"!=typeof console&&(console.error("[vue-i18n] "+t),e&&console.error(e.stack))}(c)}}};o(r,t,i,[])},nt.prototype._initVM=function(t){var e=k.config.silent;k.config.silent=!0,this._vm=new k({data:t}),k.config.silent=e},nt.prototype.destroyVM=function(){this._vm.$destroy()},nt.prototype.subscribeDataChanging=function(t){this._dataListeners.push(t)},nt.prototype.unsubscribeDataChanging=function(t){!function(t,e){if(t.length){var n=t.indexOf(e);if(n>-1)t.splice(n,1)}}(this._dataListeners,t)},nt.prototype.watchI18nData=function(){var t=this;return this._vm.$watch("$data",function(){for(var e=t._dataListeners.length;e--;)k.nextTick(function(){t._dataListeners[e]&&t._dataListeners[e].$forceUpdate()})},{deep:!0})},nt.prototype.watchLocale=function(){if(!this._sync||!this._root)return null;var t=this._vm;return this._root.$i18n.vm.$watch("locale",function(e){t.$set(t,"locale",e),t.$forceUpdate()},{immediate:!0})},nt.prototype.onComponentInstanceCreated=function(t){this._componentInstanceCreatedListener&&this._componentInstanceCreatedListener(t,this)},rt.vm.get=function(){return this._vm},rt.messages.get=function(){return f(this._getMessages())},rt.dateTimeFormats.get=function(){return f(this._getDateTimeFormats())},rt.numberFormats.get=function(){return f(this._getNumberFormats())},rt.availableLocales.get=function(){return Object.keys(this.messages).sort()},rt.locale.get=function(){return this._vm.locale},rt.locale.set=function(t){this._vm.$set(this._vm,"locale",t)},rt.fallbackLocale.get=function(){return this._vm.fallbackLocale},rt.fallbackLocale.set=function(t){this._localeChainCache={},this._vm.$set(this._vm,"fallbackLocale",t)},rt.formatFallbackMessages.get=function(){return this._formatFallbackMessages},rt.formatFallbackMessages.set=function(t){this._formatFallbackMessages=t},rt.missing.get=function(){return this._missing},rt.missing.set=function(t){this._missing=t},rt.formatter.get=function(){return this._formatter},rt.formatter.set=function(t){this._formatter=t},rt.silentTranslationWarn.get=function(){return this._silentTranslationWarn},rt.silentTranslationWarn.set=function(t){this._silentTranslationWarn=t},rt.silentFallbackWarn.get=function(){return this._silentFallbackWarn},rt.silentFallbackWarn.set=function(t){this._silentFallbackWarn=t},rt.preserveDirectiveContent.get=function(){return this._preserveDirectiveContent},rt.preserveDirectiveContent.set=function(t){this._preserveDirectiveContent=t},rt.warnHtmlInMessage.get=function(){return this._warnHtmlInMessage},rt.warnHtmlInMessage.set=function(t){var e=this,n=this._warnHtmlInMessage;if(this._warnHtmlInMessage=t,n!==t&&("warn"===t||"error"===t)){var r=this._getMessages();Object.keys(r).forEach(function(t){e._checkLocaleMessage(t,e._warnHtmlInMessage,r[t])})}},rt.postTranslation.get=function(){return this._postTranslation},rt.postTranslation.set=function(t){this._postTranslation=t},nt.prototype._getMessages=function(){return this._vm.messages},nt.prototype._getDateTimeFormats=function(){return this._vm.dateTimeFormats},nt.prototype._getNumberFormats=function(){return this._vm.numberFormats},nt.prototype._warnDefault=function(t,e,n,r,i,o){if(!l(n))return n;if(this._missing){var s=this._missing.apply(null,[t,e,r,i]);if(a(s))return s}if(this._formatFallbackMessages){var c=u.apply(void 0,i);return this._render(e,o,c.params,e)}return e},nt.prototype._isFallbackRoot=function(t){return!t&&!l(this._root)&&this._fallbackRoot},nt.prototype._isSilentFallbackWarn=function(t){return this._silentFallbackWarn instanceof RegExp?this._silentFallbackWarn.test(t):this._silentFallbackWarn},nt.prototype._isSilentFallback=function(t,e){return this._isSilentFallbackWarn(e)&&(this._isFallbackRoot()||t!==this.fallbackLocale)},nt.prototype._isSilentTranslationWarn=function(t){return this._silentTranslationWarn instanceof RegExp?this._silentTranslationWarn.test(t):this._silentTranslationWarn},nt.prototype._interpolate=function(t,e,r,i,o,u,f){if(!e)return null;var h,p=this._path.getPathValue(e,r);if(n(p)||s(p))return p;if(l(p)){if(!s(e))return null;if(!a(h=e[r])&&!c(h))return null}else{if(!a(p)&&!c(p))return null;h=p}return a(h)&&(h.indexOf("@:")>=0||h.indexOf("@.")>=0)&&(h=this._link(t,e,h,i,"raw",u,f)),this._render(h,o,u,r)},nt.prototype._link=function(t,e,r,a,i,o,s){var l=r,c=l.match(K);for(var u in c)if(c.hasOwnProperty(u)){var f=c[u],p=f.match(Q),m=p[0],_=p[1],g=f.replace(m,"").replace(Y,"");if(h(s,g))return l;s.push(g);var v=this._interpolate(t,e,g,a,"raw"===i?"string":i,"raw"===i?void 0:o,s);if(this._isFallbackRoot(v)){if(!this._root)throw Error("unexpected error");var b=this._root.$i18n;v=b._translate(b._getMessages(),b.locale,b.fallbackLocale,g,a,i,o)}v=this._warnDefault(t,g,v,a,n(o)?o:[o],i),this._modifiers.hasOwnProperty(_)?v=this._modifiers[_](v):tt.hasOwnProperty(_)&&(v=tt[_](v)),s.pop(),l=v?l.replace(f,v):l}return l},nt.prototype._createMessageContext=function(t){var e=n(t)?t:[],a=r(t)?t:{};return{list:function(t){return e[t]},named:function(t){return a[t]}}},nt.prototype._render=function(t,e,n,r){if(c(t))return t(this._createMessageContext(n));var i=this._formatter.interpolate(t,n,r);return i||(i=et.interpolate(t,n,r)),"string"!==e||a(i)?i:i.join("")},nt.prototype._appendItemToChain=function(t,e,n){var r=!1;return h(t,e)||(r=!0,e&&(r="!"!==e[e.length-1],e=e.replace(/!/g,""),t.push(e),n&&n[e]&&(r=n[e]))),r},nt.prototype._appendLocaleToChain=function(t,e,n){var r,a=e.split("-");do{var i=a.join("-");r=this._appendItemToChain(t,i,n),a.splice(-1,1)}while(a.length&&!0===r);return r},nt.prototype._appendBlockToChain=function(t,e,n){for(var r=!0,i=0;i<e.length&&"boolean"==typeof r;i++){var o=e[i];a(o)&&(r=this._appendLocaleToChain(t,o,n))}return r},nt.prototype._getLocaleChain=function(t,e){if(""===t)return[];this._localeChainCache||(this._localeChainCache={});var i=this._localeChainCache[t];if(!i){e||(e=this.fallbackLocale),i=[];for(var o,s=[t];n(s);)s=this._appendBlockToChain(i,s,e);(s=a(o=n(e)?e:r(e)?e.default?e.default:null:e)?[o]:o)&&this._appendBlockToChain(i,s,null),this._localeChainCache[t]=i}return i},nt.prototype._translate=function(t,e,n,r,a,i,o){for(var s,c=this._getLocaleChain(e,n),u=0;u<c.length;u++){var f=c[u];if(!l(s=this._interpolate(f,t[f],r,a,i,o,[r])))return s}return null},nt.prototype._t=function(t,e,n,r){for(var a,i=[],o=arguments.length-4;o-- >0;)i[o]=arguments[o+4];if(!t)return"";var s,l=u.apply(void 0,i);this._escapeParameterHtml&&(l.params=(null!=(s=l.params)&&Object.keys(s).forEach(function(t){"string"==typeof s[t]&&(s[t]=s[t].replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;"))}),s));var c=l.locale||e,f=this._translate(n,c,this.fallbackLocale,t,r,"string",l.params);if(this._isFallbackRoot(f)){if(!this._root)throw Error("unexpected error");return(a=this._root).$t.apply(a,[t].concat(i))}return f=this._warnDefault(c,t,f,r,i,"string"),this._postTranslation&&null!=f&&(f=this._postTranslation(f,t)),f},nt.prototype.t=function(t){for(var e,n=[],r=arguments.length-1;r-- >0;)n[r]=arguments[r+1];return(e=this)._t.apply(e,[t,this.locale,this._getMessages(),null].concat(n))},nt.prototype._i=function(t,e,n,r,a){var i=this._translate(n,e,this.fallbackLocale,t,r,"raw",a);if(this._isFallbackRoot(i)){if(!this._root)throw Error("unexpected error");return this._root.$i18n.i(t,e,a)}return this._warnDefault(e,t,i,r,[a],"raw")},nt.prototype.i=function(t,e,n){return t?(a(e)||(e=this.locale),this._i(t,e,this._getMessages(),null,n)):""},nt.prototype._tc=function(t,e,n,r,a){for(var i,o=[],s=arguments.length-5;s-- >0;)o[s]=arguments[s+5];if(!t)return"";void 0===a&&(a=1);var l={count:a,n:a},c=u.apply(void 0,o);return c.params=Object.assign(l,c.params),o=null===c.locale?[c.params]:[c.locale,c.params],this.fetchChoice((i=this)._t.apply(i,[t,e,n,r].concat(o)),a)},nt.prototype.fetchChoice=function(t,e){if(!t||!a(t))return null;var n=t.split("|");return n[e=this.getChoiceIndex(e,n.length)]?n[e].trim():t},nt.prototype.tc=function(t,e){for(var n,r=[],a=arguments.length-2;a-- >0;)r[a]=arguments[a+2];return(n=this)._tc.apply(n,[t,this.locale,this._getMessages(),null,e].concat(r))},nt.prototype._te=function(t,e,n){for(var r=[],a=arguments.length-3;a-- >0;)r[a]=arguments[a+3];var i=u.apply(void 0,r).locale||e;return this._exist(n[i],t)},nt.prototype.te=function(t,e){return this._te(t,this.locale,this._getMessages(),e)},nt.prototype.getLocaleMessage=function(t){return f(this._vm.messages[t]||{})},nt.prototype.setLocaleMessage=function(t,e){"warn"!==this._warnHtmlInMessage&&"error"!==this._warnHtmlInMessage||this._checkLocaleMessage(t,this._warnHtmlInMessage,e),this._vm.$set(this._vm.messages,t,e)},nt.prototype.mergeLocaleMessage=function(t,e){"warn"!==this._warnHtmlInMessage&&"error"!==this._warnHtmlInMessage||this._checkLocaleMessage(t,this._warnHtmlInMessage,e),this._vm.$set(this._vm.messages,t,_({},this._vm.messages[t]||{},e))},nt.prototype.getDateTimeFormat=function(t){return f(this._vm.dateTimeFormats[t]||{})},nt.prototype.setDateTimeFormat=function(t,e){this._vm.$set(this._vm.dateTimeFormats,t,e),this._clearDateTimeFormat(t,e)},nt.prototype.mergeDateTimeFormat=function(t,e){this._vm.$set(this._vm.dateTimeFormats,t,_(this._vm.dateTimeFormats[t]||{},e)),this._clearDateTimeFormat(t,e)},nt.prototype._clearDateTimeFormat=function(t,e){for(var n in e){var r=t+"__"+n;this._dateTimeFormatters.hasOwnProperty(r)&&delete this._dateTimeFormatters[r]}},nt.prototype._localizeDateTime=function(t,e,n,r,a){for(var i=e,o=r[i],s=this._getLocaleChain(e,n),c=0;c<s.length;c++){var u=s[c];if(i=u,!l(o=r[u])&&!l(o[a]))break}if(l(o)||l(o[a]))return null;var f=o[a],h=i+"__"+a,p=this._dateTimeFormatters[h];return p||(p=this._dateTimeFormatters[h]=new Intl.DateTimeFormat(i,f)),p.format(t)},nt.prototype._d=function(t,e,n){if(!n)return new Intl.DateTimeFormat(e).format(t);var r=this._localizeDateTime(t,e,this.fallbackLocale,this._getDateTimeFormats(),n);if(this._isFallbackRoot(r)){if(!this._root)throw Error("unexpected error");return this._root.$i18n.d(t,n,e)}return r||""},nt.prototype.d=function(t){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];var i=this.locale,o=null;return 1===e.length?a(e[0])?o=e[0]:r(e[0])&&(e[0].locale&&(i=e[0].locale),e[0].key&&(o=e[0].key)):2===e.length&&(a(e[0])&&(o=e[0]),a(e[1])&&(i=e[1])),this._d(t,i,o)},nt.prototype.getNumberFormat=function(t){return f(this._vm.numberFormats[t]||{})},nt.prototype.setNumberFormat=function(t,e){this._vm.$set(this._vm.numberFormats,t,e),this._clearNumberFormat(t,e)},nt.prototype.mergeNumberFormat=function(t,e){this._vm.$set(this._vm.numberFormats,t,_(this._vm.numberFormats[t]||{},e)),this._clearNumberFormat(t,e)},nt.prototype._clearNumberFormat=function(t,e){for(var n in e){var r=t+"__"+n;this._numberFormatters.hasOwnProperty(r)&&delete this._numberFormatters[r]}},nt.prototype._getNumberFormatter=function(t,e,n,r,a,i){for(var o=e,s=r[o],c=this._getLocaleChain(e,n),u=0;u<c.length;u++){var f=c[u];if(o=f,!l(s=r[f])&&!l(s[a]))break}if(l(s)||l(s[a]))return null;var h,p=s[a];if(i)h=new Intl.NumberFormat(o,Object.assign({},p,i));else{var m=o+"__"+a;(h=this._numberFormatters[m])||(h=this._numberFormatters[m]=new Intl.NumberFormat(o,p))}return h},nt.prototype._n=function(t,e,n,r){if(!nt.availabilities.numberFormat)return"";if(!n)return(r?new Intl.NumberFormat(e,r):new Intl.NumberFormat(e)).format(t);var a=this._getNumberFormatter(t,e,this.fallbackLocale,this._getNumberFormats(),n,r),i=a&&a.format(t);if(this._isFallbackRoot(i)){if(!this._root)throw Error("unexpected error");return this._root.$i18n.n(t,Object.assign({},{key:n,locale:e},r))}return i||""},nt.prototype.n=function(e){for(var n=[],i=arguments.length-1;i-- >0;)n[i]=arguments[i+1];var o=this.locale,s=null,l=null;return 1===n.length?a(n[0])?s=n[0]:r(n[0])&&(n[0].locale&&(o=n[0].locale),n[0].key&&(s=n[0].key),l=Object.keys(n[0]).reduce(function(e,r){var a;return h(t,r)?Object.assign({},e,((a={})[r]=n[0][r],a)):e},null)):2===n.length&&(a(n[0])&&(s=n[0]),a(n[1])&&(o=n[1])),this._n(e,o,s,l)},nt.prototype._ntp=function(t,e,n,r){if(!nt.availabilities.numberFormat)return[];if(!n)return(r?new Intl.NumberFormat(e,r):new Intl.NumberFormat(e)).formatToParts(t);var a=this._getNumberFormatter(t,e,this.fallbackLocale,this._getNumberFormats(),n,r),i=a&&a.formatToParts(t);if(this._isFallbackRoot(i)){if(!this._root)throw Error("unexpected error");return this._root.$i18n._ntp(t,e,n,r)}return i||[]},Object.defineProperties(nt.prototype,rt),Object.defineProperty(nt,"availabilities",{get:function(){if(!X){var t="undefined"!=typeof Intl;X={dateTimeFormat:t&&void 0!==Intl.DateTimeFormat,numberFormat:t&&void 0!==Intl.NumberFormat}}return X}}),nt.install=D,nt.version="8.22.1",nt},"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.VueI18n=e();
6
+ var t,e;t=this,e=function(){"use strict";var t=["compactDisplay","currency","currencyDisplay","currencySign","localeMatcher","notation","numberingSystem","signDisplay","style","unit","unitDisplay","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits"];function e(t,e){"undefined"!=typeof console&&(console.warn("[vue-i18n] "+t),e&&console.warn(e.stack))}var n=Array.isArray;function r(t){return null!==t&&"object"==typeof t}function a(t){return"string"==typeof t}var i=Object.prototype.toString,o="[object Object]";function s(t){return i.call(t)===o}function l(t){return null==t}function c(t){return"function"==typeof t}function u(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var a=null,i=null;return 1===t.length?r(t[0])||n(t[0])?i=t[0]:"string"==typeof t[0]&&(a=t[0]):2===t.length&&("string"==typeof t[0]&&(a=t[0]),(r(t[1])||n(t[1]))&&(i=t[1])),{locale:a,params:i}}function f(t){return JSON.parse(JSON.stringify(t))}function h(t,e){return!!~t.indexOf(e)}var p=Object.prototype.hasOwnProperty;function m(t,e){return p.call(t,e)}function _(t){for(var e=arguments,n=Object(t),a=1;a<arguments.length;a++){var i=e[a];if(null!=i){var o=void 0;for(o in i)m(i,o)&&(r(i[o])?n[o]=_(n[o],i[o]):n[o]=i[o])}}return n}function g(t,e){if(t===e)return!0;var a=r(t),i=r(e);if(!a||!i)return!a&&!i&&String(t)===String(e);try{var o=n(t),s=n(e);if(o&&s)return t.length===e.length&&t.every(function(t,n){return g(t,e[n])});if(o||s)return!1;var l=Object.keys(t),c=Object.keys(e);return l.length===c.length&&l.every(function(n){return g(t[n],e[n])})}catch(t){return!1}}var v={beforeCreate:function(){var t=this.$options;if(t.i18n=t.i18n||(t.__i18n?{}:null),t.i18n){if(t.i18n instanceof nt){if(t.__i18n)try{var e=t.i18n&&t.i18n.messages?t.i18n.messages:{};t.__i18n.forEach(function(t){e=_(e,JSON.parse(t))}),Object.keys(e).forEach(function(n){t.i18n.mergeLocaleMessage(n,e[n])})}catch(t){}this._i18n=t.i18n,this._i18nWatcher=this._i18n.watchI18nData()}else if(s(t.i18n)){var n=this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof nt?this.$root.$i18n:null;if(n&&(t.i18n.root=this.$root,t.i18n.formatter=n.formatter,t.i18n.fallbackLocale=n.fallbackLocale,t.i18n.formatFallbackMessages=n.formatFallbackMessages,t.i18n.silentTranslationWarn=n.silentTranslationWarn,t.i18n.silentFallbackWarn=n.silentFallbackWarn,t.i18n.pluralizationRules=n.pluralizationRules,t.i18n.preserveDirectiveContent=n.preserveDirectiveContent),t.__i18n)try{var r=t.i18n&&t.i18n.messages?t.i18n.messages:{};t.__i18n.forEach(function(t){r=_(r,JSON.parse(t))}),t.i18n.messages=r}catch(t){}var a=t.i18n.sharedMessages;a&&s(a)&&(t.i18n.messages=_(t.i18n.messages,a)),this._i18n=new nt(t.i18n),this._i18nWatcher=this._i18n.watchI18nData(),(void 0===t.i18n.sync||t.i18n.sync)&&(this._localeWatcher=this.$i18n.watchLocale()),n&&n.onComponentInstanceCreated(this._i18n)}}else this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof nt?this._i18n=this.$root.$i18n:t.parent&&t.parent.$i18n&&t.parent.$i18n instanceof nt&&(this._i18n=t.parent.$i18n)},beforeMount:function(){var t=this.$options;t.i18n=t.i18n||(t.__i18n?{}:null),t.i18n?t.i18n instanceof nt?(this._i18n.subscribeDataChanging(this),this._subscribing=!0):s(t.i18n)&&(this._i18n.subscribeDataChanging(this),this._subscribing=!0):this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof nt?(this._i18n.subscribeDataChanging(this),this._subscribing=!0):t.parent&&t.parent.$i18n&&t.parent.$i18n instanceof nt&&(this._i18n.subscribeDataChanging(this),this._subscribing=!0)},beforeDestroy:function(){if(this._i18n){var t=this;this.$nextTick(function(){t._subscribing&&(t._i18n.unsubscribeDataChanging(t),delete t._subscribing),t._i18nWatcher&&(t._i18nWatcher(),t._i18n.destroyVM(),delete t._i18nWatcher),t._localeWatcher&&(t._localeWatcher(),delete t._localeWatcher)})}}},b={name:"i18n",functional:!0,props:{tag:{type:[String,Boolean,Object],default:"span"},path:{type:String,required:!0},locale:{type:String},places:{type:[Array,Object]}},render:function(t,e){var n=e.data,r=e.parent,a=e.props,i=e.slots,o=r.$i18n;if(o){var s=a.path,l=a.locale,c=a.places,u=i(),f=o.i(s,l,function(t){var e;for(e in t)if("default"!==e)return!1;return Boolean(e)}(u)||c?function(t,e){var n=e?function(t){return Array.isArray(t)?t.reduce(y,{}):Object.assign({},t)}(e):{};if(!t)return n;var r=(t=t.filter(function(t){return t.tag||""!==t.text.trim()})).every(F);return t.reduce(r?d:y,n)}(u.default,c):u),h=a.tag&&!0!==a.tag||!1===a.tag?a.tag:"span";return h?t(h,n,f):f}}};function d(t,e){return e.data&&e.data.attrs&&e.data.attrs.place&&(t[e.data.attrs.place]=e),t}function y(t,e,n){return t[n]=e,t}function F(t){return Boolean(t.data&&t.data.attrs&&t.data.attrs.place)}var k,w={name:"i18n-n",functional:!0,props:{tag:{type:[String,Boolean,Object],default:"span"},value:{type:Number,required:!0},format:{type:[String,Object]},locale:{type:String}},render:function(e,n){var i=n.props,o=n.parent,s=n.data,l=o.$i18n;if(!l)return null;var c=null,u=null;a(i.format)?c=i.format:r(i.format)&&(i.format.key&&(c=i.format.key),u=Object.keys(i.format).reduce(function(e,n){var r;return h(t,n)?Object.assign({},e,((r={})[n]=i.format[n],r)):e},null));var f=i.locale||l.locale,p=l._ntp(i.value,f,c,u),m=p.map(function(t,e){var n,r=s.scopedSlots&&s.scopedSlots[t.type];return r?r(((n={})[t.type]=t.value,n.index=e,n.parts=p,n)):t.value}),_=i.tag&&!0!==i.tag||!1===i.tag?i.tag:"span";return _?e(_,{attrs:s.attrs,class:s.class,staticClass:s.staticClass},m):m}};function $(t,e,n){T(t,n)&&L(t,e,n)}function M(t,e,n,r){if(T(t,n)){var a=n.context.$i18n;(function(t,e){var n=e.context;return t._locale===n.$i18n.locale})(t,n)&&g(e.value,e.oldValue)&&g(t._localeMessage,a.getLocaleMessage(a.locale))||L(t,e,n)}}function C(t,n,r,a){if(r.context){var i=r.context.$i18n||{};n.modifiers.preserve||i.preserveDirectiveContent||(t.textContent=""),t._vt=void 0,delete t._vt,t._locale=void 0,delete t._locale,t._localeMessage=void 0,delete t._localeMessage}else e("Vue instance does not exists in VNode context")}function T(t,n){var r=n.context;return r?!!r.$i18n||(e("VueI18n instance does not exists in Vue instance"),!1):(e("Vue instance does not exists in VNode context"),!1)}function L(t,n,r){var i,o,l=function(t){var e,n,r,i;a(t)?e=t:s(t)&&(e=t.path,n=t.locale,r=t.args,i=t.choice);return{path:e,locale:n,args:r,choice:i}}(n.value),c=l.path,u=l.locale,f=l.args,h=l.choice;if(c||u||f)if(c){var p=r.context;t._vt=t.textContent=null!=h?(i=p.$i18n).tc.apply(i,[c,h].concat(D(u,f))):(o=p.$i18n).t.apply(o,[c].concat(D(u,f))),t._locale=p.$i18n.locale,t._localeMessage=p.$i18n.getLocaleMessage(p.$i18n.locale)}else e("`path` is required in v-t directive");else e("value type not supported")}function D(t,e){var n=[];return t&&n.push(t),e&&(Array.isArray(e)||s(e))&&n.push(e),n}function I(t){I.installed=!0;(k=t).version&&Number(k.version.split(".")[0]);!function(t){t.prototype.hasOwnProperty("$i18n")||Object.defineProperty(t.prototype,"$i18n",{get:function(){return this._i18n}}),t.prototype.$t=function(t){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];var r=this.$i18n;return r._t.apply(r,[t,r.locale,r._getMessages(),this].concat(e))},t.prototype.$tc=function(t,e){for(var n=[],r=arguments.length-2;r-- >0;)n[r]=arguments[r+2];var a=this.$i18n;return a._tc.apply(a,[t,a.locale,a._getMessages(),this,e].concat(n))},t.prototype.$te=function(t,e){var n=this.$i18n;return n._te(t,n.locale,n._getMessages(),e)},t.prototype.$d=function(t){for(var e,n=[],r=arguments.length-1;r-- >0;)n[r]=arguments[r+1];return(e=this.$i18n).d.apply(e,[t].concat(n))},t.prototype.$n=function(t){for(var e,n=[],r=arguments.length-1;r-- >0;)n[r]=arguments[r+1];return(e=this.$i18n).n.apply(e,[t].concat(n))}}(k),k.mixin(v),k.directive("t",{bind:$,update:M,unbind:C}),k.component(b.name,b),k.component(w.name,w),k.config.optionMergeStrategies.i18n=function(t,e){return void 0===e?t:e}}var O=function(){this._caches=Object.create(null)};O.prototype.interpolate=function(t,e){if(!e)return[t];var n=this._caches[t];return n||(n=function(t){var e=[],n=0,r="";for(;n<t.length;){var a=t[n++];if("{"===a){r&&e.push({type:"text",value:r}),r="";var i="";for(a=t[n++];void 0!==a&&"}"!==a;)i+=a,a=t[n++];var o="}"===a,s=x.test(i)?"list":o&&W.test(i)?"named":"unknown";e.push({value:i,type:s})}else"%"===a?"{"!==t[n]&&(r+=a):r+=a}return r&&e.push({type:"text",value:r}),e}(t),this._caches[t]=n),function(t,e){var n=[],a=0,i=Array.isArray(e)?"list":r(e)?"named":"unknown";if("unknown"===i)return n;for(;a<t.length;){var o=t[a];switch(o.type){case"text":n.push(o.value);break;case"list":n.push(e[parseInt(o.value,10)]);break;case"named":"named"===i&&n.push(e[o.value])}a++}return n}(n,e)};var x=/^(?:\d)+/,W=/^(?:\w)+/,j=0,N=1,S=2,H=3,P=0,R=4,V=5,E=6,A=7,z=8,B=[];B[P]={ws:[P],ident:[3,j],"[":[R],eof:[A]},B[1]={ws:[1],".":[2],"[":[R],eof:[A]},B[2]={ws:[2],ident:[3,j],0:[3,j],number:[3,j]},B[3]={ident:[3,j],0:[3,j],number:[3,j],ws:[1,N],".":[2,N],"[":[R,N],eof:[A,N]},B[R]={"'":[V,j],'"':[E,j],"[":[R,S],"]":[1,H],eof:z,else:[R,j]},B[V]={"'":[R,j],eof:z,else:[V,j]},B[E]={'"':[R,j],eof:z,else:[E,j]};var U=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function q(t){if(null==t)return"eof";switch(t.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return t;case 95:case 36:case 45:return"ident";case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"ws"}return"ident"}function J(t){var e,n,r,a=t.trim();return("0"!==t.charAt(0)||!isNaN(t))&&(r=a,U.test(r)?(n=(e=a).charCodeAt(0))!==e.charCodeAt(e.length-1)||34!==n&&39!==n?e:e.slice(1,-1):"*"+a)}var G=function(){this._cache=Object.create(null)};G.prototype.parsePath=function(t){var e=this._cache[t];return e||(e=function(t){var e,n,r,a,i,o,s,l=[],c=-1,u=P,f=0,h=[];function p(){var e=t[c+1];if(u===V&&"'"===e||u===E&&'"'===e)return c++,r="\\"+e,h[j](),!0}for(h[N]=function(){void 0!==n&&(l.push(n),n=void 0)},h[j]=function(){void 0===n?n=r:n+=r},h[S]=function(){h[j](),f++},h[H]=function(){if(f>0)f--,u=R,h[j]();else{if(f=0,void 0===n)return!1;if(!1===(n=J(n)))return!1;h[N]()}};null!==u;)if("\\"!==(e=t[++c])||!p()){if(a=q(e),(i=(s=B[u])[a]||s.else||z)===z)return;if(u=i[0],(o=h[i[1]])&&(r=void 0===(r=i[2])?e:r,!1===o()))return;if(u===A)return l}}(t))&&(this._cache[t]=e),e||[]},G.prototype.getPathValue=function(t,e){if(!r(t))return null;var n=this.parsePath(e);if(0===n.length)return null;for(var a=n.length,i=t,o=0;o<a;){var s=i[n[o]];if(void 0===s)return null;i=s,o++}return i};var X,Z=/<\/?[\w\s="/.':;#-\/]+>/,K=/(?:@(?:\.[a-z]+)?:(?:[\w\-_|.]+|\([\w\-_|.]+\)))/g,Q=/^@(?:\.([a-z]+))?:/,Y=/[()]/g,tt={upper:function(t){return t.toLocaleUpperCase()},lower:function(t){return t.toLocaleLowerCase()},capitalize:function(t){return""+t.charAt(0).toLocaleUpperCase()+t.substr(1)}},et=new O,nt=function(t){var e=this;void 0===t&&(t={}),!k&&"undefined"!=typeof window&&window.Vue&&I(window.Vue);var n=t.locale||"en-US",r=!1!==t.fallbackLocale&&(t.fallbackLocale||"en-US"),a=t.messages||{},i=t.dateTimeFormats||{},o=t.numberFormats||{};this._vm=null,this._formatter=t.formatter||et,this._modifiers=t.modifiers||{},this._missing=t.missing||null,this._root=t.root||null,this._sync=void 0===t.sync||!!t.sync,this._fallbackRoot=void 0===t.fallbackRoot||!!t.fallbackRoot,this._formatFallbackMessages=void 0!==t.formatFallbackMessages&&!!t.formatFallbackMessages,this._silentTranslationWarn=void 0!==t.silentTranslationWarn&&t.silentTranslationWarn,this._silentFallbackWarn=void 0!==t.silentFallbackWarn&&!!t.silentFallbackWarn,this._dateTimeFormatters={},this._numberFormatters={},this._path=new G,this._dataListeners=[],this._componentInstanceCreatedListener=t.componentInstanceCreatedListener||null,this._preserveDirectiveContent=void 0!==t.preserveDirectiveContent&&!!t.preserveDirectiveContent,this.pluralizationRules=t.pluralizationRules||{},this._warnHtmlInMessage=t.warnHtmlInMessage||"off",this._postTranslation=t.postTranslation||null,this._escapeParameterHtml=t.escapeParameterHtml||!1,this.getChoiceIndex=function(t,n){var r=Object.getPrototypeOf(e);if(r&&r.getChoiceIndex)return r.getChoiceIndex.call(e,t,n);var a,i;return e.locale in e.pluralizationRules?e.pluralizationRules[e.locale].apply(e,[t,n]):(a=t,i=n,a=Math.abs(a),2===i?a?a>1?1:0:1:a?Math.min(a,2):0)},this._exist=function(t,n){return!(!t||!n)&&(!l(e._path.getPathValue(t,n))||!!t[n])},"warn"!==this._warnHtmlInMessage&&"error"!==this._warnHtmlInMessage||Object.keys(a).forEach(function(t){e._checkLocaleMessage(t,e._warnHtmlInMessage,a[t])}),this._initVM({locale:n,fallbackLocale:r,messages:a,dateTimeFormats:i,numberFormats:o})},rt={vm:{configurable:!0},messages:{configurable:!0},dateTimeFormats:{configurable:!0},numberFormats:{configurable:!0},availableLocales:{configurable:!0},locale:{configurable:!0},fallbackLocale:{configurable:!0},formatFallbackMessages:{configurable:!0},missing:{configurable:!0},formatter:{configurable:!0},silentTranslationWarn:{configurable:!0},silentFallbackWarn:{configurable:!0},preserveDirectiveContent:{configurable:!0},warnHtmlInMessage:{configurable:!0},postTranslation:{configurable:!0}};return nt.prototype._checkLocaleMessage=function(t,r,i){var o=function(t,r,i,l){if(s(i))Object.keys(i).forEach(function(e){var n=i[e];s(n)?(l.push(e),l.push("."),o(t,r,n,l),l.pop(),l.pop()):(l.push(e),o(t,r,n,l),l.pop())});else if(n(i))i.forEach(function(e,n){s(e)?(l.push("["+n+"]"),l.push("."),o(t,r,e,l),l.pop(),l.pop()):(l.push("["+n+"]"),o(t,r,e,l),l.pop())});else if(a(i)){if(Z.test(i)){var c="Detected HTML in message '"+i+"' of keypath '"+l.join("")+"' at '"+r+"'. Consider component interpolation with '<i18n>' to avoid XSS. See https://bit.ly/2ZqJzkp";"warn"===t?e(c):"error"===t&&function(t,e){"undefined"!=typeof console&&(console.error("[vue-i18n] "+t),e&&console.error(e.stack))}(c)}}};o(r,t,i,[])},nt.prototype._initVM=function(t){var e=k.config.silent;k.config.silent=!0,this._vm=new k({data:t}),k.config.silent=e},nt.prototype.destroyVM=function(){this._vm.$destroy()},nt.prototype.subscribeDataChanging=function(t){this._dataListeners.push(t)},nt.prototype.unsubscribeDataChanging=function(t){!function(t,e){if(t.length){var n=t.indexOf(e);if(n>-1)t.splice(n,1)}}(this._dataListeners,t)},nt.prototype.watchI18nData=function(){var t=this;return this._vm.$watch("$data",function(){for(var e=t._dataListeners.length;e--;)k.nextTick(function(){t._dataListeners[e]&&t._dataListeners[e].$forceUpdate()})},{deep:!0})},nt.prototype.watchLocale=function(){if(!this._sync||!this._root)return null;var t=this._vm;return this._root.$i18n.vm.$watch("locale",function(e){t.$set(t,"locale",e),t.$forceUpdate()},{immediate:!0})},nt.prototype.onComponentInstanceCreated=function(t){this._componentInstanceCreatedListener&&this._componentInstanceCreatedListener(t,this)},rt.vm.get=function(){return this._vm},rt.messages.get=function(){return f(this._getMessages())},rt.dateTimeFormats.get=function(){return f(this._getDateTimeFormats())},rt.numberFormats.get=function(){return f(this._getNumberFormats())},rt.availableLocales.get=function(){return Object.keys(this.messages).sort()},rt.locale.get=function(){return this._vm.locale},rt.locale.set=function(t){this._vm.$set(this._vm,"locale",t)},rt.fallbackLocale.get=function(){return this._vm.fallbackLocale},rt.fallbackLocale.set=function(t){this._localeChainCache={},this._vm.$set(this._vm,"fallbackLocale",t)},rt.formatFallbackMessages.get=function(){return this._formatFallbackMessages},rt.formatFallbackMessages.set=function(t){this._formatFallbackMessages=t},rt.missing.get=function(){return this._missing},rt.missing.set=function(t){this._missing=t},rt.formatter.get=function(){return this._formatter},rt.formatter.set=function(t){this._formatter=t},rt.silentTranslationWarn.get=function(){return this._silentTranslationWarn},rt.silentTranslationWarn.set=function(t){this._silentTranslationWarn=t},rt.silentFallbackWarn.get=function(){return this._silentFallbackWarn},rt.silentFallbackWarn.set=function(t){this._silentFallbackWarn=t},rt.preserveDirectiveContent.get=function(){return this._preserveDirectiveContent},rt.preserveDirectiveContent.set=function(t){this._preserveDirectiveContent=t},rt.warnHtmlInMessage.get=function(){return this._warnHtmlInMessage},rt.warnHtmlInMessage.set=function(t){var e=this,n=this._warnHtmlInMessage;if(this._warnHtmlInMessage=t,n!==t&&("warn"===t||"error"===t)){var r=this._getMessages();Object.keys(r).forEach(function(t){e._checkLocaleMessage(t,e._warnHtmlInMessage,r[t])})}},rt.postTranslation.get=function(){return this._postTranslation},rt.postTranslation.set=function(t){this._postTranslation=t},nt.prototype._getMessages=function(){return this._vm.messages},nt.prototype._getDateTimeFormats=function(){return this._vm.dateTimeFormats},nt.prototype._getNumberFormats=function(){return this._vm.numberFormats},nt.prototype._warnDefault=function(t,e,n,r,i,o){if(!l(n))return n;if(this._missing){var s=this._missing.apply(null,[t,e,r,i]);if(a(s))return s}if(this._formatFallbackMessages){var c=u.apply(void 0,i);return this._render(e,o,c.params,e)}return e},nt.prototype._isFallbackRoot=function(t){return!t&&!l(this._root)&&this._fallbackRoot},nt.prototype._isSilentFallbackWarn=function(t){return this._silentFallbackWarn instanceof RegExp?this._silentFallbackWarn.test(t):this._silentFallbackWarn},nt.prototype._isSilentFallback=function(t,e){return this._isSilentFallbackWarn(e)&&(this._isFallbackRoot()||t!==this.fallbackLocale)},nt.prototype._isSilentTranslationWarn=function(t){return this._silentTranslationWarn instanceof RegExp?this._silentTranslationWarn.test(t):this._silentTranslationWarn},nt.prototype._interpolate=function(t,e,r,i,o,u,f){if(!e)return null;var h,p=this._path.getPathValue(e,r);if(n(p)||s(p))return p;if(l(p)){if(!s(e))return null;if(!a(h=e[r])&&!c(h))return null}else{if(!a(p)&&!c(p))return null;h=p}return a(h)&&(h.indexOf("@:")>=0||h.indexOf("@.")>=0)&&(h=this._link(t,e,h,i,"raw",u,f)),this._render(h,o,u,r)},nt.prototype._link=function(t,e,r,a,i,o,s){var l=r,c=l.match(K);for(var u in c)if(c.hasOwnProperty(u)){var f=c[u],p=f.match(Q),m=p[0],_=p[1],g=f.replace(m,"").replace(Y,"");if(h(s,g))return l;s.push(g);var v=this._interpolate(t,e,g,a,"raw"===i?"string":i,"raw"===i?void 0:o,s);if(this._isFallbackRoot(v)){if(!this._root)throw Error("unexpected error");var b=this._root.$i18n;v=b._translate(b._getMessages(),b.locale,b.fallbackLocale,g,a,i,o)}v=this._warnDefault(t,g,v,a,n(o)?o:[o],i),this._modifiers.hasOwnProperty(_)?v=this._modifiers[_](v):tt.hasOwnProperty(_)&&(v=tt[_](v)),s.pop(),l=v?l.replace(f,v):l}return l},nt.prototype._createMessageContext=function(t){var e=n(t)?t:[],a=r(t)?t:{};return{list:function(t){return e[t]},named:function(t){return a[t]}}},nt.prototype._render=function(t,e,n,r){if(c(t))return t(this._createMessageContext(n));var i=this._formatter.interpolate(t,n,r);return i||(i=et.interpolate(t,n,r)),"string"!==e||a(i)?i:i.join("")},nt.prototype._appendItemToChain=function(t,e,n){var r=!1;return h(t,e)||(r=!0,e&&(r="!"!==e[e.length-1],e=e.replace(/!/g,""),t.push(e),n&&n[e]&&(r=n[e]))),r},nt.prototype._appendLocaleToChain=function(t,e,n){var r,a=e.split("-");do{var i=a.join("-");r=this._appendItemToChain(t,i,n),a.splice(-1,1)}while(a.length&&!0===r);return r},nt.prototype._appendBlockToChain=function(t,e,n){for(var r=!0,i=0;i<e.length&&"boolean"==typeof r;i++){var o=e[i];a(o)&&(r=this._appendLocaleToChain(t,o,n))}return r},nt.prototype._getLocaleChain=function(t,e){if(""===t)return[];this._localeChainCache||(this._localeChainCache={});var i=this._localeChainCache[t];if(!i){e||(e=this.fallbackLocale),i=[];for(var o,s=[t];n(s);)s=this._appendBlockToChain(i,s,e);(s=a(o=n(e)?e:r(e)?e.default?e.default:null:e)?[o]:o)&&this._appendBlockToChain(i,s,null),this._localeChainCache[t]=i}return i},nt.prototype._translate=function(t,e,n,r,a,i,o){for(var s,c=this._getLocaleChain(e,n),u=0;u<c.length;u++){var f=c[u];if(!l(s=this._interpolate(f,t[f],r,a,i,o,[r])))return s}return null},nt.prototype._t=function(t,e,n,r){for(var a,i=[],o=arguments.length-4;o-- >0;)i[o]=arguments[o+4];if(!t)return"";var s,l=u.apply(void 0,i);this._escapeParameterHtml&&(l.params=(null!=(s=l.params)&&Object.keys(s).forEach(function(t){"string"==typeof s[t]&&(s[t]=s[t].replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;"))}),s));var c=l.locale||e,f=this._translate(n,c,this.fallbackLocale,t,r,"string",l.params);if(this._isFallbackRoot(f)){if(!this._root)throw Error("unexpected error");return(a=this._root).$t.apply(a,[t].concat(i))}return f=this._warnDefault(c,t,f,r,i,"string"),this._postTranslation&&null!=f&&(f=this._postTranslation(f,t)),f},nt.prototype.t=function(t){for(var e,n=[],r=arguments.length-1;r-- >0;)n[r]=arguments[r+1];return(e=this)._t.apply(e,[t,this.locale,this._getMessages(),null].concat(n))},nt.prototype._i=function(t,e,n,r,a){var i=this._translate(n,e,this.fallbackLocale,t,r,"raw",a);if(this._isFallbackRoot(i)){if(!this._root)throw Error("unexpected error");return this._root.$i18n.i(t,e,a)}return this._warnDefault(e,t,i,r,[a],"raw")},nt.prototype.i=function(t,e,n){return t?(a(e)||(e=this.locale),this._i(t,e,this._getMessages(),null,n)):""},nt.prototype._tc=function(t,e,n,r,a){for(var i,o=[],s=arguments.length-5;s-- >0;)o[s]=arguments[s+5];if(!t)return"";void 0===a&&(a=1);var l={count:a,n:a},c=u.apply(void 0,o);return c.params=Object.assign(l,c.params),o=null===c.locale?[c.params]:[c.locale,c.params],this.fetchChoice((i=this)._t.apply(i,[t,e,n,r].concat(o)),a)},nt.prototype.fetchChoice=function(t,e){if(!t||!a(t))return null;var n=t.split("|");return n[e=this.getChoiceIndex(e,n.length)]?n[e].trim():t},nt.prototype.tc=function(t,e){for(var n,r=[],a=arguments.length-2;a-- >0;)r[a]=arguments[a+2];return(n=this)._tc.apply(n,[t,this.locale,this._getMessages(),null,e].concat(r))},nt.prototype._te=function(t,e,n){for(var r=[],a=arguments.length-3;a-- >0;)r[a]=arguments[a+3];var i=u.apply(void 0,r).locale||e;return this._exist(n[i],t)},nt.prototype.te=function(t,e){return this._te(t,this.locale,this._getMessages(),e)},nt.prototype.getLocaleMessage=function(t){return f(this._vm.messages[t]||{})},nt.prototype.setLocaleMessage=function(t,e){"warn"!==this._warnHtmlInMessage&&"error"!==this._warnHtmlInMessage||this._checkLocaleMessage(t,this._warnHtmlInMessage,e),this._vm.$set(this._vm.messages,t,e)},nt.prototype.mergeLocaleMessage=function(t,e){"warn"!==this._warnHtmlInMessage&&"error"!==this._warnHtmlInMessage||this._checkLocaleMessage(t,this._warnHtmlInMessage,e),this._vm.$set(this._vm.messages,t,_({},this._vm.messages[t]||{},e))},nt.prototype.getDateTimeFormat=function(t){return f(this._vm.dateTimeFormats[t]||{})},nt.prototype.setDateTimeFormat=function(t,e){this._vm.$set(this._vm.dateTimeFormats,t,e),this._clearDateTimeFormat(t,e)},nt.prototype.mergeDateTimeFormat=function(t,e){this._vm.$set(this._vm.dateTimeFormats,t,_(this._vm.dateTimeFormats[t]||{},e)),this._clearDateTimeFormat(t,e)},nt.prototype._clearDateTimeFormat=function(t,e){for(var n in e){var r=t+"__"+n;this._dateTimeFormatters.hasOwnProperty(r)&&delete this._dateTimeFormatters[r]}},nt.prototype._localizeDateTime=function(t,e,n,r,a){for(var i=e,o=r[i],s=this._getLocaleChain(e,n),c=0;c<s.length;c++){var u=s[c];if(i=u,!l(o=r[u])&&!l(o[a]))break}if(l(o)||l(o[a]))return null;var f=o[a],h=i+"__"+a,p=this._dateTimeFormatters[h];return p||(p=this._dateTimeFormatters[h]=new Intl.DateTimeFormat(i,f)),p.format(t)},nt.prototype._d=function(t,e,n){if(!n)return new Intl.DateTimeFormat(e).format(t);var r=this._localizeDateTime(t,e,this.fallbackLocale,this._getDateTimeFormats(),n);if(this._isFallbackRoot(r)){if(!this._root)throw Error("unexpected error");return this._root.$i18n.d(t,n,e)}return r||""},nt.prototype.d=function(t){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];var i=this.locale,o=null;return 1===e.length?a(e[0])?o=e[0]:r(e[0])&&(e[0].locale&&(i=e[0].locale),e[0].key&&(o=e[0].key)):2===e.length&&(a(e[0])&&(o=e[0]),a(e[1])&&(i=e[1])),this._d(t,i,o)},nt.prototype.getNumberFormat=function(t){return f(this._vm.numberFormats[t]||{})},nt.prototype.setNumberFormat=function(t,e){this._vm.$set(this._vm.numberFormats,t,e),this._clearNumberFormat(t,e)},nt.prototype.mergeNumberFormat=function(t,e){this._vm.$set(this._vm.numberFormats,t,_(this._vm.numberFormats[t]||{},e)),this._clearNumberFormat(t,e)},nt.prototype._clearNumberFormat=function(t,e){for(var n in e){var r=t+"__"+n;this._numberFormatters.hasOwnProperty(r)&&delete this._numberFormatters[r]}},nt.prototype._getNumberFormatter=function(t,e,n,r,a,i){for(var o=e,s=r[o],c=this._getLocaleChain(e,n),u=0;u<c.length;u++){var f=c[u];if(o=f,!l(s=r[f])&&!l(s[a]))break}if(l(s)||l(s[a]))return null;var h,p=s[a];if(i)h=new Intl.NumberFormat(o,Object.assign({},p,i));else{var m=o+"__"+a;(h=this._numberFormatters[m])||(h=this._numberFormatters[m]=new Intl.NumberFormat(o,p))}return h},nt.prototype._n=function(t,e,n,r){if(!nt.availabilities.numberFormat)return"";if(!n)return(r?new Intl.NumberFormat(e,r):new Intl.NumberFormat(e)).format(t);var a=this._getNumberFormatter(t,e,this.fallbackLocale,this._getNumberFormats(),n,r),i=a&&a.format(t);if(this._isFallbackRoot(i)){if(!this._root)throw Error("unexpected error");return this._root.$i18n.n(t,Object.assign({},{key:n,locale:e},r))}return i||""},nt.prototype.n=function(e){for(var n=[],i=arguments.length-1;i-- >0;)n[i]=arguments[i+1];var o=this.locale,s=null,l=null;return 1===n.length?a(n[0])?s=n[0]:r(n[0])&&(n[0].locale&&(o=n[0].locale),n[0].key&&(s=n[0].key),l=Object.keys(n[0]).reduce(function(e,r){var a;return h(t,r)?Object.assign({},e,((a={})[r]=n[0][r],a)):e},null)):2===n.length&&(a(n[0])&&(s=n[0]),a(n[1])&&(o=n[1])),this._n(e,o,s,l)},nt.prototype._ntp=function(t,e,n,r){if(!nt.availabilities.numberFormat)return[];if(!n)return(r?new Intl.NumberFormat(e,r):new Intl.NumberFormat(e)).formatToParts(t);var a=this._getNumberFormatter(t,e,this.fallbackLocale,this._getNumberFormats(),n,r),i=a&&a.formatToParts(t);if(this._isFallbackRoot(i)){if(!this._root)throw Error("unexpected error");return this._root.$i18n._ntp(t,e,n,r)}return i||[]},Object.defineProperties(nt.prototype,rt),Object.defineProperty(nt,"availabilities",{get:function(){if(!X){var t="undefined"!=typeof Intl;X={dateTimeFormat:t&&void 0!==Intl.DateTimeFormat,numberFormat:t&&void 0!==Intl.NumberFormat}}return X}}),nt.install=I,nt.version="8.22.2",nt},"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.VueI18n=e();
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "vue-i18n",
3
3
  "description": "Internationalization plugin for Vue.js",
4
- "version": "8.22.1",
4
+ "version": "8.22.2",
5
5
  "author": {
6
6
  "name": "kazuya kawaguchi",
7
7
  "email": "kawakazu80@gmail.com"
@@ -36,7 +36,7 @@
36
36
  "babel-plugin-istanbul": "^6.0.0",
37
37
  "babel-preset-power-assert": "^3.0.0",
38
38
  "buble": "^0.19.3",
39
- "chromedriver": "^85.0.0",
39
+ "chromedriver": "^87.0.0",
40
40
  "core-js": "^3.6.5",
41
41
  "cross-env": "^7.0.2",
42
42
  "cross-spawn": "^7.0.3",
package/src/util.js CHANGED
@@ -5,18 +5,23 @@
5
5
  */
6
6
 
7
7
  export const numberFormatKeys = [
8
- 'style',
8
+ 'compactDisplay',
9
9
  'currency',
10
10
  'currencyDisplay',
11
+ 'currencySign',
12
+ 'localeMatcher',
13
+ 'notation',
14
+ 'numberingSystem',
15
+ 'signDisplay',
16
+ 'style',
17
+ 'unit',
18
+ 'unitDisplay',
11
19
  'useGrouping',
12
20
  'minimumIntegerDigits',
13
21
  'minimumFractionDigits',
14
22
  'maximumFractionDigits',
15
23
  'minimumSignificantDigits',
16
- 'maximumSignificantDigits',
17
- 'localeMatcher',
18
- 'formatMatcher',
19
- 'unit'
24
+ 'maximumSignificantDigits'
20
25
  ]
21
26
 
22
27
  /**