vue-i18n 8.28.0 → 8.28.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.
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * vue-i18n v8.28.0
2
+ * vue-i18n v8.28.2
3
3
  * (c) 2022 kazuya kawaguchi
4
4
  * Released under the MIT License.
5
5
  */
@@ -32,6 +32,14 @@ var numberFormatKeys = [
32
32
  ];
33
33
 
34
34
  var dateTimeFormatKeys = [
35
+ 'dateStyle',
36
+ 'timeStyle',
37
+ 'calendar',
38
+ 'localeMatcher',
39
+ "hour12",
40
+ "hourCycle",
41
+ "timeZone",
42
+ "formatMatcher",
35
43
  'weekday',
36
44
  'era',
37
45
  'year',
@@ -40,8 +48,7 @@ var dateTimeFormatKeys = [
40
48
  'hour',
41
49
  'minute',
42
50
  'second',
43
- 'timeZoneName'
44
- ];
51
+ 'timeZoneName' ];
45
52
 
46
53
  /**
47
54
  * utilities
@@ -2294,6 +2301,6 @@ Object.defineProperty(VueI18n, 'availabilities', {
2294
2301
  });
2295
2302
 
2296
2303
  VueI18n.install = install;
2297
- VueI18n.version = '8.28.0';
2304
+ VueI18n.version = '8.28.2';
2298
2305
 
2299
2306
  module.exports = VueI18n;
@@ -25,6 +25,14 @@ const numberFormatKeys = [
25
25
  ];
26
26
 
27
27
  const dateTimeFormatKeys = [
28
+ 'dateStyle',
29
+ 'timeStyle',
30
+ 'calendar',
31
+ 'localeMatcher',
32
+ "hour12",
33
+ "hourCycle",
34
+ "timeZone",
35
+ "formatMatcher",
28
36
  'weekday',
29
37
  'era',
30
38
  'year',
@@ -33,7 +41,7 @@ const dateTimeFormatKeys = [
33
41
  'hour',
34
42
  'minute',
35
43
  'second',
36
- 'timeZoneName'
44
+ 'timeZoneName',
37
45
  ];
38
46
 
39
47
  /**
@@ -2241,6 +2249,6 @@ Object.defineProperty(VueI18n, 'availabilities', {
2241
2249
  });
2242
2250
 
2243
2251
  VueI18n.install = install;
2244
- VueI18n.version = '8.28.0';
2252
+ VueI18n.version = '8.28.2';
2245
2253
 
2246
2254
  export default VueI18n;
@@ -1 +1 @@
1
- const t=["compactDisplay","currency","currencyDisplay","currencySign","localeMatcher","notation","numberingSystem","signDisplay","style","unit","unitDisplay","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits"],e=["weekday","era","year","month","day","hour","minute","second","timeZoneName"];function n(t,e){"undefined"!=typeof console&&(console.warn("[vue-i18n] "+t),e&&console.warn(e.stack))}const s=Array.isArray;function i(t){return null!==t&&"object"==typeof t}function r(t){return"string"==typeof t}const a=Object.prototype.toString,o="[object Object]";function l(t){return a.call(t)===o}function c(t){return null==t}function h(t){return"function"==typeof t}function u(...t){let e=null,n=null;return 1===t.length?i(t[0])||s(t[0])?n=t[0]:"string"==typeof t[0]&&(e=t[0]):2===t.length&&("string"==typeof t[0]&&(e=t[0]),(i(t[1])||s(t[1]))&&(n=t[1])),{locale:e,params:n}}function _(t){return JSON.parse(JSON.stringify(t))}function m(t,e){return!!~t.indexOf(e)}const f=Object.prototype.hasOwnProperty;function g(t,e){return f.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)g(n,t)&&(i(n[t])?e[t]=p(e[t],n[t]):e[t]=n[t])}}return e}function d(t,e){if(t===e)return!0;const n=i(t),r=i(e);if(!n||!r)return!n&&!r&&String(t)===String(e);try{const n=s(t),i=s(e);if(n&&i)return t.length===e.length&&t.every((t,n)=>d(t,e[n]));if(n||i)return!1;{const n=Object.keys(t),s=Object.keys(e);return n.length===s.length&&n.every(n=>d(t[n],e[n]))}}catch(t){return!1}}var 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:i}){const{$i18n:r}=n;if(!r)return;const{path:a,locale:o,places:l}=s,c=i(),h=r.i(a,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(k);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 k(t){return Boolean(t.data&&t.data.attrs&&t.data.attrs.place)}var F={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:s,data:a}){const o=s.$i18n;if(!o)return null;let l=null,c=null;r(n.format)?l=n.format:i(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=a.scopedSlots&&a.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:a.attrs,class:a.class,staticClass:a.staticClass},_):_}};function $(t,e,n){T(t,n)&&C(t,e,n)}function w(t,e,n,s){if(!T(t,n))return;const i=n.context.$i18n;(function(t,e){const n=e.context;return t._locale===n.$i18n.locale})(t,n)&&d(e.value,e.oldValue)&&d(t._localeMessage,i.getLocaleMessage(i.locale))||C(t,e,n)}function M(t,e,s,i){if(!s.context)return void n("Vue instance does not exists in VNode context");const r=s.context.$i18n||{};e.modifiers.preserve||r.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 T(t,e){const s=e.context;return s?!!s.$i18n||(n("VueI18n instance does not exists in Vue instance"),!1):(n("Vue instance does not exists in VNode context"),!1)}function C(t,e,s){const i=e.value,{path:a,locale:o,args:c,choice:h}=function(t){let e,n,s,i;r(t)?e=t:l(t)&&(e=t.path,n=t.locale,s=t.args,i=t.choice);return{path:e,locale:n,args:s,choice:i}}(i);if(!a&&!o&&!c)return void n("value type not supported");if(!a)return void n("`path` is required in v-t directive");const u=s.context;t._vt=t.textContent=null!=h?u.$i18n.tc(a,h,...I(o,c)):u.$i18n.t(a,...I(o,c)),t._locale=u.$i18n.locale,t._localeMessage=u.$i18n.getLocaleMessage(u.$i18n.locale)}function I(t,e){const n=[];return t&&n.push(t),e&&(Array.isArray(e)||l(e))&&n.push(e),n}let D;function L(t,e={bridge:!1}){L.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(function(t=!1){function e(){this!==this.$root&&this.$options.__INTLIFY_META__&&this.$el&&this.$el.setAttribute("data-intlify",this.$options.__INTLIFY_META__)}return t?{mounted:e}:{beforeCreate(){const t=this.$options;if(t.i18n=t.i18n||(t.__i18nBridge||t.__i18n?{}:null),t.i18n){if(t.i18n instanceof tt){if(t.__i18nBridge||t.__i18n)try{let e=t.i18n&&t.i18n.messages?t.i18n.messages:{};(t.__i18nBridge||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(l(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.__i18nBridge||t.__i18n)try{let e=t.i18n&&t.i18n.messages?t.i18n.messages:{};(t.__i18nBridge||t.__i18n).forEach(t=>{e=p(e,JSON.parse(t))}),t.i18n.messages=e}catch(t){}const{sharedMessages:n}=t.i18n;n&&l(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.__i18nBridge||t.__i18n?{}:null),t.i18n?t.i18n instanceof tt?(this._i18n.subscribeDataChanging(this),this._subscribing=!0):l(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)},mounted:e,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)})}}}(e.bridge)),D.directive("t",{bind:$,update:w,unbind:M}),D.component(b.name,b),D.component(F.name,F),D.config.optionMergeStrategies.i18n=function(t,e){return void 0===e?t:e}}const O=/^(?:\d)+/,x=/^(?:\w)+/;const N=0,W=1,j=2,E=3,S=0,R=4,V=5,H=6,A=7,P=8,B=[];B[S]={ws:[S],ident:[3,N],"[":[R],eof:[A]},B[1]={ws:[1],".":[2],"[":[R],eof:[A]},B[2]={ws:[2],ident:[3,N],0:[3,N],number:[3,N]},B[3]={ident:[3,N],0:[3,N],number:[3,N],ws:[1,W],".":[2,W],"[":[R,W],eof:[A,W]},B[R]={"'":[V,N],'"':[H,N],"[":[R,j],"]":[1,E],eof:P,else:[R,N]},B[V]={"'":[R,N],eof:P,else:[V,N]},B[H]={'"':[R,N],eof:P,else:[H,N]};const U=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function z(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 G(t){const e=t.trim();return("0"!==t.charAt(0)||!isNaN(t))&&(n=e,U.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 q{constructor(){this._cache=Object.create(null)}parsePath(t){let e=this._cache[t];return e||(e=function(t){const e=[];let n,s,i,r,a,o,l,c=-1,h=S,u=0;const _=[];function m(){const e=t[c+1];if(h===V&&"'"===e||h===H&&'"'===e)return c++,i="\\"+e,_[N](),!0}for(_[W]=function(){void 0!==s&&(e.push(s),s=void 0)},_[N]=function(){void 0===s?s=i:s+=i},_[j]=function(){_[N](),u++},_[E]=function(){if(u>0)u--,h=R,_[N]();else{if(u=0,void 0===s)return!1;if(!1===(s=G(s)))return!1;_[W]()}};null!==h;)if("\\"!==(n=t[++c])||!m()){if(r=z(n),(a=(l=B[h])[r]||l.else||P)===P)return;if(h=a[0],(o=_[a[1]])&&(i=void 0===(i=a[2])?n:i,!1===o()))return;if(h===A)return e}}(t))&&(this._cache[t]=e),e||[]}getPathValue(t,e){if(!i(t))return null;const n=this.parsePath(e);if(0===n.length)return null;{const e=n.length;let s=t,i=0;for(;i<e;){const t=s[n[i]];if(null==t)return null;s=t,i++}return s}}}const J=/<\/?[\w\s="/.':;#-\/]+>/,Z=/(?:@(?:\.[a-zA-Z]+)?:(?:[\w\-_|./]+|\([\w\-_:|./]+\)))/g,Y=/^@(?:\.([a-zA-Z]+))?:/,X=/[()]/g,K={upper:t=>t.toLocaleUpperCase(),lower:t=>t.toLocaleLowerCase(),capitalize:t=>`${t.charAt(0).toLocaleUpperCase()}${t.substr(1)}`},Q=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 i=t[n++];if("{"===i){s&&e.push({type:"text",value:s}),s="";let r="";for(i=t[n++];void 0!==i&&"}"!==i;)r+=i,i=t[n++];const a="}"===i,o=O.test(r)?"list":a&&x.test(r)?"named":"unknown";e.push({value:r,type:o})}else"%"===i?"{"!==t[n]&&(s+=i):s+=i}return s&&e.push({type:"text",value:s}),e}(t),this._caches[t]=n),function(t,e){const n=[];let s=0;const r=Array.isArray(e)?"list":i(e)?"named":"unknown";if("unknown"===r)return n;for(;s<t.length;){const i=t[s];switch(i.type){case"text":n.push(i.value);break;case"list":n.push(e[parseInt(i.value,10)]);break;case"named":"named"===r&&n.push(e[i.value])}s++}return n}(n,e)}};class tt{constructor(t={}){!D&&"undefined"!=typeof window&&window.Vue&&L(window.Vue);const e=t.locale||"en-US",n=!1!==t.fallbackLocale&&(t.fallbackLocale||"en-US"),s=t.messages||{},i=t.dateTimeFormats||t.datetimeFormats||{},r=t.numberFormats||{};this._vm=null,this._formatter=t.formatter||Q,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._fallbackRootWithEmptyString=void 0===t.fallbackRootWithEmptyString||!!t.fallbackRootWithEmptyString,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 q,this._dataListeners=new Set,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,"__VUE_I18N_BRIDGE__"in t&&(this.__VUE_I18N_BRIDGE__=t.__VUE_I18N_BRIDGE__),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)&&(!c(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:i,numberFormats:r})}_checkLocaleMessage(t,e,i){const a=(t,e,i,o)=>{if(l(i))Object.keys(i).forEach(n=>{const s=i[n];l(s)?(o.push(n),o.push("."),a(t,e,s,o),o.pop(),o.pop()):(o.push(n),a(t,e,s,o),o.pop())});else if(s(i))i.forEach((n,s)=>{l(n)?(o.push(`[${s}]`),o.push("."),a(t,e,n,o),o.pop(),o.pop()):(o.push(`[${s}]`),a(t,e,n,o),o.pop())});else if(r(i)){if(J.test(i)){const s=`Detected HTML in message '${i}' of keypath '${o.join("")}' at '${e}'. Consider component interpolation with '<i18n>' to avoid XSS. See https://bit.ly/2ZqJzkp`;"warn"===t?n(s):"error"===t&&function(t,e){"undefined"!=typeof console&&(console.error("[vue-i18n] "+t),e&&console.error(e.stack))}(s)}}};a(e,t,i,[])}_initVM(t){const e=D.config.silent;D.config.silent=!0,this._vm=new D({data:t,__VUE18N__INSTANCE__:!0}),D.config.silent=e}destroyVM(){this._vm.$destroy()}subscribeDataChanging(t){this._dataListeners.add(t)}unsubscribeDataChanging(t){!function(t,e){if(t.delete(e));}(this._dataListeners,t)}watchI18nData(){return this._vm.$watch("$data",()=>{const t=function(t){const e=[];return t.forEach(t=>e.push(t)),e}(this._dataListeners);let e=t.length;for(;e--;)D.nextTick(()=>{t[e]&&t[e].$forceUpdate()})},{deep:!0})}watchLocale(t){if(t){if(!this.__VUE_I18N_BRIDGE__)return null;const e=this,n=this._vm;return this.vm.$watch("locale",s=>{n.$set(n,"locale",s),e.__VUE_I18N_BRIDGE__&&t&&(t.locale.value=s),n.$forceUpdate()},{immediate:!0})}{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 _(this._getMessages())}get dateTimeFormats(){return _(this._getDateTimeFormats())}get numberFormats(){return _(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}get sync(){return this._sync}set sync(t){this._sync=t}_getMessages(){return this._vm.messages}_getDateTimeFormats(){return this._vm.dateTimeFormats}_getNumberFormats(){return this._vm.numberFormats}_warnDefault(t,e,n,s,i,a){if(!c(n))return n;if(this._missing){const n=this._missing.apply(null,[t,e,s,i]);if(r(n))return n}if(this._formatFallbackMessages){const t=u(...i);return this._render(e,a,t.params,e)}return e}_isFallbackRoot(t){return(this._fallbackRootWithEmptyString?!t:c(t))&&!c(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,n,i,a,o,u){if(!e)return null;const _=this._path.getPathValue(e,n);if(s(_)||l(_))return _;let m;if(c(_)){if(!l(e))return null;if(!r(m=e[n])&&!h(m))return null}else{if(!r(_)&&!h(_))return null;m=_}return r(m)&&(m.indexOf("@:")>=0||m.indexOf("@.")>=0)&&(m=this._link(t,e,m,i,"raw",o,u)),this._render(m,a,o,n)}_link(t,e,n,i,r,a,o){let l=n;const c=l.match(Z);for(let n in c){if(!c.hasOwnProperty(n))continue;const h=c[n],u=h.match(Y),[_,f]=u,g=h.replace(_,"").replace(X,"");if(m(o,g))return l;o.push(g);let p=this._interpolate(t,e,g,i,"raw"===r?"string":r,"raw"===r?void 0:a,o);if(this._isFallbackRoot(p)){if(!this._root)throw Error("unexpected error");const t=this._root.$i18n;p=t._translate(t._getMessages(),t.locale,t.fallbackLocale,g,i,r,a)}p=this._warnDefault(t,g,p,i,s(a)?a:[a],r),this._modifiers.hasOwnProperty(f)?p=this._modifiers[f](p):K.hasOwnProperty(f)&&(p=K[f](p)),o.pop(),l=p?l.replace(h,p):l}return l}_createMessageContext(t,e,n,r){const a=s(t)?t:[],o=i(t)?t:{},l=this._getMessages(),c=this.locale;return{list:t=>a[t],named:t=>o[t],values:t,formatter:e,path:n,messages:l,locale:c,linked:t=>this._interpolate(c,l[c]||{},t,null,r,void 0,[t])}}_render(t,e,n,s){if(h(t))return t(this._createMessageContext(n,this._formatter||Q,s,e));let i=this._formatter.interpolate(t,n,s);return i||(i=Q.interpolate(t,n,s)),"string"!==e||r(i)?i:i.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 i=e.split("-");do{const e=i.join("-");s=this._appendItemToChain(t,e,n),i.splice(-1,1)}while(i.length&&!0===s);return s}_appendBlockToChain(t,e,n){let s=!0;for(let i=0;i<e.length&&"boolean"==typeof s;i++){const a=e[i];r(a)&&(s=this._appendLocaleToChain(t,a,n))}return s}_getLocaleChain(t,e){if(""===t)return[];this._localeChainCache||(this._localeChainCache={});let n=this._localeChainCache[t];if(!n){e||(e=this.fallbackLocale),n=[];let a,o=[t];for(;s(o);)o=this._appendBlockToChain(n,o,e);(o=r(a=s(e)?e:i(e)?e.default?e.default:null:e)?[a]:a)&&this._appendBlockToChain(n,o,null),this._localeChainCache[t]=n}return n}_translate(t,e,n,s,i,r,a){const o=this._getLocaleChain(e,n);let l;for(let e=0;e<o.length;e++){const n=o[e];if(!c(l=this._interpolate(n,t[n],s,i,r,a,[s])))return l}return null}_t(t,e,n,s,...i){if(!t)return"";const r=u(...i);var a;this._escapeParameterHtml&&(r.params=(null!=(a=r.params)&&Object.keys(a).forEach(t=>{"string"==typeof a[t]&&(a[t]=function(t){return t.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;")}(a[t]))}),a));const o=r.locale||e;let l=this._translate(n,o,this.fallbackLocale,t,s,"string",r.params);if(this._isFallbackRoot(l)){if(!this._root)throw Error("unexpected error");return this._root.$t(t,...i)}return l=this._warnDefault(o,t,l,s,i,"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,i){const r=this._translate(n,e,this.fallbackLocale,t,s,"raw",i);if(this._isFallbackRoot(r)){if(!this._root)throw Error("unexpected error");return this._root.$i18n.i(t,e,i)}return this._warnDefault(e,t,r,s,[i],"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,i,...r){if(!t)return"";void 0===i&&(i=1);const a={count:i,n:i},o=u(...r);return o.params=Object.assign(a,o.params),r=null===o.locale?[o.params]:[o.locale,o.params],this.fetchChoice(this._t(t,e,n,s,...r),i)}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 i=u(...s).locale||e;return this._exist(n[i],t)}te(t,e){return this._te(t,this.locale,this._getMessages(),e)}getLocaleMessage(t){return _(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(void 0!==this._vm.messages[t]&&Object.keys(this._vm.messages[t]).length?Object.assign({},this._vm.messages[t]):{},e))}getDateTimeFormat(t){return _(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,i,r){let a=e,o=s[a];const l=this._getLocaleChain(e,n);for(let t=0;t<l.length;t++){const e=l[t];if(a=e,!c(o=s[e])&&!c(o[i]))break}if(c(o)||c(o[i]))return null;{const e=o[i];let n;if(r)n=new Intl.DateTimeFormat(a,Object.assign({},e,r));else{const t=`${a}__${i}`;(n=this._dateTimeFormatters[t])||(n=this._dateTimeFormatters[t]=new Intl.DateTimeFormat(a,e))}return n.format(t)}}_d(t,e,n,s){if(!n){return(s?new Intl.DateTimeFormat(e,s):new Intl.DateTimeFormat(e)).format(t)}const i=this._localizeDateTime(t,e,this.fallbackLocale,this._getDateTimeFormats(),n,s);if(this._isFallbackRoot(i)){if(!this._root)throw Error("unexpected error");return this._root.$i18n.d(t,n,e)}return i||""}d(t,...n){let s=this.locale,a=null,o=null;return 1===n.length?(r(n[0])?a=n[0]:i(n[0])&&(n[0].locale&&(s=n[0].locale),n[0].key&&(a=n[0].key)),o=Object.keys(n[0]).reduce((t,s)=>m(e,s)?Object.assign({},t,{[s]:n[0][s]}):t,null)):2===n.length&&(r(n[0])&&(a=n[0]),r(n[1])&&(s=n[1])),this._d(t,s,a,o)}getNumberFormat(t){return _(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,i,r){let a=e,o=s[a];const l=this._getLocaleChain(e,n);for(let t=0;t<l.length;t++){const e=l[t];if(a=e,!c(o=s[e])&&!c(o[i]))break}if(c(o)||c(o[i]))return null;{const t=o[i];let e;if(r)e=new Intl.NumberFormat(a,Object.assign({},t,r));else{const n=`${a}__${i}`;(e=this._numberFormatters[n])||(e=this._numberFormatters[n]=new Intl.NumberFormat(a,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 i=this._getNumberFormatter(t,e,this.fallbackLocale,this._getNumberFormats(),n,s),r=i&&i.format(t);if(this._isFallbackRoot(r)){if(!this._root)throw Error("unexpected error");return this._root.$i18n.n(t,Object.assign({},{key:n,locale:e},s))}return r||""}n(e,...n){let s=this.locale,a=null,o=null;return 1===n.length?r(n[0])?a=n[0]:i(n[0])&&(n[0].locale&&(s=n[0].locale),n[0].key&&(a=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])&&(a=n[0]),r(n[1])&&(s=n[1])),this._n(e,s,a,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 i=this._getNumberFormatter(t,e,this.fallbackLocale,this._getNumberFormats(),n,s),r=i&&i.formatToParts(t);if(this._isFallbackRoot(r)){if(!this._root)throw Error("unexpected error");return this._root.$i18n._ntp(t,e,n,s)}return r||[]}}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=L,tt.version="8.28.0";export default tt;
1
+ const t=["compactDisplay","currency","currencyDisplay","currencySign","localeMatcher","notation","numberingSystem","signDisplay","style","unit","unitDisplay","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits"],e=["dateStyle","timeStyle","calendar","localeMatcher","hour12","hourCycle","timeZone","formatMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName"];function n(t,e){"undefined"!=typeof console&&(console.warn("[vue-i18n] "+t),e&&console.warn(e.stack))}const s=Array.isArray;function r(t){return null!==t&&"object"==typeof t}function i(t){return"string"==typeof t}const a=Object.prototype.toString,o="[object Object]";function l(t){return a.call(t)===o}function c(t){return null==t}function h(t){return"function"==typeof t}function u(...t){let e=null,n=null;return 1===t.length?r(t[0])||s(t[0])?n=t[0]:"string"==typeof t[0]&&(e=t[0]):2===t.length&&("string"==typeof t[0]&&(e=t[0]),(r(t[1])||s(t[1]))&&(n=t[1])),{locale:e,params:n}}function _(t){return JSON.parse(JSON.stringify(t))}function m(t,e){return!!~t.indexOf(e)}const f=Object.prototype.hasOwnProperty;function g(t,e){return f.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)g(n,t)&&(r(n[t])?e[t]=p(e[t],n[t]):e[t]=n[t])}}return e}function d(t,e){if(t===e)return!0;const n=r(t),i=r(e);if(!n||!i)return!n&&!i&&String(t)===String(e);try{const n=s(t),r=s(e);if(n&&r)return t.length===e.length&&t.every((t,n)=>d(t,e[n]));if(n||r)return!1;{const n=Object.keys(t),s=Object.keys(e);return n.length===s.length&&n.every(n=>d(t[n],e[n]))}}catch(t){return!1}}var 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:i}=n;if(!i)return;const{path:a,locale:o,places:l}=s,c=r(),h=i.i(a,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(k);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 k(t){return Boolean(t.data&&t.data.attrs&&t.data.attrs.place)}var F={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:s,data:a}){const o=s.$i18n;if(!o)return null;let l=null,c=null;i(n.format)?l=n.format:r(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=a.scopedSlots&&a.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:a.attrs,class:a.class,staticClass:a.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)&&d(e.value,e.oldValue)&&d(t._localeMessage,r.getLocaleMessage(r.locale))||T(t,e,n)}function M(t,e,s,r){if(!s.context)return void n("Vue instance does not exists in VNode context");const i=s.context.$i18n||{};e.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}function C(t,e){const s=e.context;return s?!!s.$i18n||(n("VueI18n instance does not exists in Vue instance"),!1):(n("Vue instance does not exists in VNode context"),!1)}function T(t,e,s){const r=e.value,{path:a,locale:o,args:c,choice:h}=function(t){let e,n,s,r;i(t)?e=t:l(t)&&(e=t.path,n=t.locale,s=t.args,r=t.choice);return{path:e,locale:n,args:s,choice:r}}(r);if(!a&&!o&&!c)return void n("value type not supported");if(!a)return void n("`path` is required in v-t directive");const u=s.context;t._vt=t.textContent=null!=h?u.$i18n.tc(a,h,...I(o,c)):u.$i18n.t(a,...I(o,c)),t._locale=u.$i18n.locale,t._localeMessage=u.$i18n.getLocaleMessage(u.$i18n.locale)}function I(t,e){const n=[];return t&&n.push(t),e&&(Array.isArray(e)||l(e))&&n.push(e),n}let D;function L(t,e={bridge:!1}){L.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(function(t=!1){function e(){this!==this.$root&&this.$options.__INTLIFY_META__&&this.$el&&this.$el.setAttribute("data-intlify",this.$options.__INTLIFY_META__)}return t?{mounted:e}:{beforeCreate(){const t=this.$options;if(t.i18n=t.i18n||(t.__i18nBridge||t.__i18n?{}:null),t.i18n){if(t.i18n instanceof tt){if(t.__i18nBridge||t.__i18n)try{let e=t.i18n&&t.i18n.messages?t.i18n.messages:{};(t.__i18nBridge||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(l(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.__i18nBridge||t.__i18n)try{let e=t.i18n&&t.i18n.messages?t.i18n.messages:{};(t.__i18nBridge||t.__i18n).forEach(t=>{e=p(e,JSON.parse(t))}),t.i18n.messages=e}catch(t){}const{sharedMessages:n}=t.i18n;n&&l(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.__i18nBridge||t.__i18n?{}:null),t.i18n?t.i18n instanceof tt?(this._i18n.subscribeDataChanging(this),this._subscribing=!0):l(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)},mounted:e,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)})}}}(e.bridge)),D.directive("t",{bind:$,update:w,unbind:M}),D.component(b.name,b),D.component(F.name,F),D.config.optionMergeStrategies.i18n=function(t,e){return void 0===e?t:e}}const O=/^(?:\d)+/,x=/^(?:\w)+/;const N=0,W=1,j=2,S=3,E=0,R=4,V=5,H=6,A=7,P=8,B=[];B[E]={ws:[E],ident:[3,N],"[":[R],eof:[A]},B[1]={ws:[1],".":[2],"[":[R],eof:[A]},B[2]={ws:[2],ident:[3,N],0:[3,N],number:[3,N]},B[3]={ident:[3,N],0:[3,N],number:[3,N],ws:[1,W],".":[2,W],"[":[R,W],eof:[A,W]},B[R]={"'":[V,N],'"':[H,N],"[":[R,j],"]":[1,S],eof:P,else:[R,N]},B[V]={"'":[R,N],eof:P,else:[V,N]},B[H]={'"':[R,N],eof:P,else:[H,N]};const U=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function z(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 G(t){const e=t.trim();return("0"!==t.charAt(0)||!isNaN(t))&&(n=e,U.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 q{constructor(){this._cache=Object.create(null)}parsePath(t){let e=this._cache[t];return e||(e=function(t){const e=[];let n,s,r,i,a,o,l,c=-1,h=E,u=0;const _=[];function m(){const e=t[c+1];if(h===V&&"'"===e||h===H&&'"'===e)return c++,r="\\"+e,_[N](),!0}for(_[W]=function(){void 0!==s&&(e.push(s),s=void 0)},_[N]=function(){void 0===s?s=r:s+=r},_[j]=function(){_[N](),u++},_[S]=function(){if(u>0)u--,h=R,_[N]();else{if(u=0,void 0===s)return!1;if(!1===(s=G(s)))return!1;_[W]()}};null!==h;)if("\\"!==(n=t[++c])||!m()){if(i=z(n),(a=(l=B[h])[i]||l.else||P)===P)return;if(h=a[0],(o=_[a[1]])&&(r=void 0===(r=a[2])?n:r,!1===o()))return;if(h===A)return e}}(t))&&(this._cache[t]=e),e||[]}getPathValue(t,e){if(!r(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(null==t)return null;s=t,r++}return s}}}const J=/<\/?[\w\s="/.':;#-\/]+>/,Z=/(?:@(?:\.[a-zA-Z]+)?:(?:[\w\-_|./]+|\([\w\-_:|./]+\)))/g,Y=/^@(?:\.([a-zA-Z]+))?:/,X=/[()]/g,K={upper:t=>t.toLocaleUpperCase(),lower:t=>t.toLocaleLowerCase(),capitalize:t=>`${t.charAt(0).toLocaleUpperCase()}${t.substr(1)}`},Q=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 i="";for(r=t[n++];void 0!==r&&"}"!==r;)i+=r,r=t[n++];const a="}"===r,o=O.test(i)?"list":a&&x.test(i)?"named":"unknown";e.push({value:i,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 s=0;const i=Array.isArray(e)?"list":r(e)?"named":"unknown";if("unknown"===i)return n;for(;s<t.length;){const r=t[s];switch(r.type){case"text":n.push(r.value);break;case"list":n.push(e[parseInt(r.value,10)]);break;case"named":"named"===i&&n.push(e[r.value])}s++}return n}(n,e)}};class tt{constructor(t={}){!D&&"undefined"!=typeof window&&window.Vue&&L(window.Vue);const e=t.locale||"en-US",n=!1!==t.fallbackLocale&&(t.fallbackLocale||"en-US"),s=t.messages||{},r=t.dateTimeFormats||t.datetimeFormats||{},i=t.numberFormats||{};this._vm=null,this._formatter=t.formatter||Q,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._fallbackRootWithEmptyString=void 0===t.fallbackRootWithEmptyString||!!t.fallbackRootWithEmptyString,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 q,this._dataListeners=new Set,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,"__VUE_I18N_BRIDGE__"in t&&(this.__VUE_I18N_BRIDGE__=t.__VUE_I18N_BRIDGE__),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)&&(!c(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:i})}_checkLocaleMessage(t,e,r){const a=(t,e,r,o)=>{if(l(r))Object.keys(r).forEach(n=>{const s=r[n];l(s)?(o.push(n),o.push("."),a(t,e,s,o),o.pop(),o.pop()):(o.push(n),a(t,e,s,o),o.pop())});else if(s(r))r.forEach((n,s)=>{l(n)?(o.push(`[${s}]`),o.push("."),a(t,e,n,o),o.pop(),o.pop()):(o.push(`[${s}]`),a(t,e,n,o),o.pop())});else if(i(r)){if(J.test(r)){const s=`Detected HTML in message '${r}' of keypath '${o.join("")}' at '${e}'. Consider component interpolation with '<i18n>' to avoid XSS. See https://bit.ly/2ZqJzkp`;"warn"===t?n(s):"error"===t&&function(t,e){"undefined"!=typeof console&&(console.error("[vue-i18n] "+t),e&&console.error(e.stack))}(s)}}};a(e,t,r,[])}_initVM(t){const e=D.config.silent;D.config.silent=!0,this._vm=new D({data:t,__VUE18N__INSTANCE__:!0}),D.config.silent=e}destroyVM(){this._vm.$destroy()}subscribeDataChanging(t){this._dataListeners.add(t)}unsubscribeDataChanging(t){!function(t,e){if(t.delete(e));}(this._dataListeners,t)}watchI18nData(){return this._vm.$watch("$data",()=>{const t=function(t){const e=[];return t.forEach(t=>e.push(t)),e}(this._dataListeners);let e=t.length;for(;e--;)D.nextTick(()=>{t[e]&&t[e].$forceUpdate()})},{deep:!0})}watchLocale(t){if(t){if(!this.__VUE_I18N_BRIDGE__)return null;const e=this,n=this._vm;return this.vm.$watch("locale",s=>{n.$set(n,"locale",s),e.__VUE_I18N_BRIDGE__&&t&&(t.locale.value=s),n.$forceUpdate()},{immediate:!0})}{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 _(this._getMessages())}get dateTimeFormats(){return _(this._getDateTimeFormats())}get numberFormats(){return _(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}get sync(){return this._sync}set sync(t){this._sync=t}_getMessages(){return this._vm.messages}_getDateTimeFormats(){return this._vm.dateTimeFormats}_getNumberFormats(){return this._vm.numberFormats}_warnDefault(t,e,n,s,r,a){if(!c(n))return n;if(this._missing){const n=this._missing.apply(null,[t,e,s,r]);if(i(n))return n}if(this._formatFallbackMessages){const t=u(...r);return this._render(e,a,t.params,e)}return e}_isFallbackRoot(t){return(this._fallbackRootWithEmptyString?!t:c(t))&&!c(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,n,r,a,o,u){if(!e)return null;const _=this._path.getPathValue(e,n);if(s(_)||l(_))return _;let m;if(c(_)){if(!l(e))return null;if(!i(m=e[n])&&!h(m))return null}else{if(!i(_)&&!h(_))return null;m=_}return i(m)&&(m.indexOf("@:")>=0||m.indexOf("@.")>=0)&&(m=this._link(t,e,m,r,"raw",o,u)),this._render(m,a,o,n)}_link(t,e,n,r,i,a,o){let l=n;const c=l.match(Z);for(let n in c){if(!c.hasOwnProperty(n))continue;const h=c[n],u=h.match(Y),[_,f]=u,g=h.replace(_,"").replace(X,"");if(m(o,g))return l;o.push(g);let p=this._interpolate(t,e,g,r,"raw"===i?"string":i,"raw"===i?void 0:a,o);if(this._isFallbackRoot(p)){if(!this._root)throw Error("unexpected error");const t=this._root.$i18n;p=t._translate(t._getMessages(),t.locale,t.fallbackLocale,g,r,i,a)}p=this._warnDefault(t,g,p,r,s(a)?a:[a],i),this._modifiers.hasOwnProperty(f)?p=this._modifiers[f](p):K.hasOwnProperty(f)&&(p=K[f](p)),o.pop(),l=p?l.replace(h,p):l}return l}_createMessageContext(t,e,n,i){const a=s(t)?t:[],o=r(t)?t:{},l=this._getMessages(),c=this.locale;return{list:t=>a[t],named:t=>o[t],values:t,formatter:e,path:n,messages:l,locale:c,linked:t=>this._interpolate(c,l[c]||{},t,null,i,void 0,[t])}}_render(t,e,n,s){if(h(t))return t(this._createMessageContext(n,this._formatter||Q,s,e));let r=this._formatter.interpolate(t,n,s);return r||(r=Q.interpolate(t,n,s)),"string"!==e||i(r)?r:r.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 r=0;r<e.length&&"boolean"==typeof s;r++){const a=e[r];i(a)&&(s=this._appendLocaleToChain(t,a,n))}return s}_getLocaleChain(t,e){if(""===t)return[];this._localeChainCache||(this._localeChainCache={});let n=this._localeChainCache[t];if(!n){e||(e=this.fallbackLocale),n=[];let a,o=[t];for(;s(o);)o=this._appendBlockToChain(n,o,e);(o=i(a=s(e)?e:r(e)?e.default?e.default:null:e)?[a]:a)&&this._appendBlockToChain(n,o,null),this._localeChainCache[t]=n}return n}_translate(t,e,n,s,r,i,a){const o=this._getLocaleChain(e,n);let l;for(let e=0;e<o.length;e++){const n=o[e];if(!c(l=this._interpolate(n,t[n],s,r,i,a,[s])))return l}return null}_t(t,e,n,s,...r){if(!t)return"";const i=u(...r);var a;this._escapeParameterHtml&&(i.params=(null!=(a=i.params)&&Object.keys(a).forEach(t=>{"string"==typeof a[t]&&(a[t]=function(t){return t.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;")}(a[t]))}),a));const o=i.locale||e;let l=this._translate(n,o,this.fallbackLocale,t,s,"string",i.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 i=this._translate(n,e,this.fallbackLocale,t,s,"raw",r);if(this._isFallbackRoot(i)){if(!this._root)throw Error("unexpected error");return this._root.$i18n.i(t,e,r)}return this._warnDefault(e,t,i,s,[r],"raw")}i(t,e,n){return t?(i(e)||(e=this.locale),this._i(t,e,this._getMessages(),null,n)):""}_tc(t,e,n,s,r,...i){if(!t)return"";void 0===r&&(r=1);const a={count:r,n:r},o=u(...i);return o.params=Object.assign(a,o.params),i=null===o.locale?[o.params]:[o.locale,o.params],this.fetchChoice(this._t(t,e,n,s,...i),r)}fetchChoice(t,e){if(!t||!i(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=u(...s).locale||e;return this._exist(n[r],t)}te(t,e){return this._te(t,this.locale,this._getMessages(),e)}getLocaleMessage(t){return _(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(void 0!==this._vm.messages[t]&&Object.keys(this._vm.messages[t]).length?Object.assign({},this._vm.messages[t]):{},e))}getDateTimeFormat(t){return _(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,i){let a=e,o=s[a];const l=this._getLocaleChain(e,n);for(let t=0;t<l.length;t++){const e=l[t];if(a=e,!c(o=s[e])&&!c(o[r]))break}if(c(o)||c(o[r]))return null;{const e=o[r];let n;if(i)n=new Intl.DateTimeFormat(a,Object.assign({},e,i));else{const t=`${a}__${r}`;(n=this._dateTimeFormatters[t])||(n=this._dateTimeFormatters[t]=new Intl.DateTimeFormat(a,e))}return n.format(t)}}_d(t,e,n,s){if(!n){return(s?new Intl.DateTimeFormat(e,s):new Intl.DateTimeFormat(e)).format(t)}const r=this._localizeDateTime(t,e,this.fallbackLocale,this._getDateTimeFormats(),n,s);if(this._isFallbackRoot(r)){if(!this._root)throw Error("unexpected error");return this._root.$i18n.d(t,n,e)}return r||""}d(t,...n){let s=this.locale,a=null,o=null;return 1===n.length?(i(n[0])?a=n[0]:r(n[0])&&(n[0].locale&&(s=n[0].locale),n[0].key&&(a=n[0].key)),o=Object.keys(n[0]).reduce((t,s)=>m(e,s)?Object.assign({},t,{[s]:n[0][s]}):t,null)):2===n.length&&(i(n[0])&&(a=n[0]),i(n[1])&&(s=n[1])),this._d(t,s,a,o)}getNumberFormat(t){return _(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,i){let a=e,o=s[a];const l=this._getLocaleChain(e,n);for(let t=0;t<l.length;t++){const e=l[t];if(a=e,!c(o=s[e])&&!c(o[r]))break}if(c(o)||c(o[r]))return null;{const t=o[r];let e;if(i)e=new Intl.NumberFormat(a,Object.assign({},t,i));else{const n=`${a}__${r}`;(e=this._numberFormatters[n])||(e=this._numberFormatters[n]=new Intl.NumberFormat(a,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),i=r&&r.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},s))}return i||""}n(e,...n){let s=this.locale,a=null,o=null;return 1===n.length?i(n[0])?a=n[0]:r(n[0])&&(n[0].locale&&(s=n[0].locale),n[0].key&&(a=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&&(i(n[0])&&(a=n[0]),i(n[1])&&(s=n[1])),this._n(e,s,a,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),i=r&&r.formatToParts(t);if(this._isFallbackRoot(i)){if(!this._root)throw Error("unexpected error");return this._root.$i18n._ntp(t,e,n,s)}return i||[]}}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=L,tt.version="8.28.2";export default tt;
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * vue-i18n v8.28.0
2
+ * vue-i18n v8.28.2
3
3
  * (c) 2022 kazuya kawaguchi
4
4
  * Released under the MIT License.
5
5
  */
@@ -30,6 +30,14 @@ var numberFormatKeys = [
30
30
  ];
31
31
 
32
32
  var dateTimeFormatKeys = [
33
+ 'dateStyle',
34
+ 'timeStyle',
35
+ 'calendar',
36
+ 'localeMatcher',
37
+ "hour12",
38
+ "hourCycle",
39
+ "timeZone",
40
+ "formatMatcher",
33
41
  'weekday',
34
42
  'era',
35
43
  'year',
@@ -38,8 +46,7 @@ var dateTimeFormatKeys = [
38
46
  'hour',
39
47
  'minute',
40
48
  'second',
41
- 'timeZoneName'
42
- ];
49
+ 'timeZoneName' ];
43
50
 
44
51
  /**
45
52
  * utilities
@@ -2292,6 +2299,6 @@ Object.defineProperty(VueI18n, 'availabilities', {
2292
2299
  });
2293
2300
 
2294
2301
  VueI18n.install = install;
2295
- VueI18n.version = '8.28.0';
2302
+ VueI18n.version = '8.28.2';
2296
2303
 
2297
2304
  export default VueI18n;
package/dist/vue-i18n.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * vue-i18n v8.28.0
2
+ * vue-i18n v8.28.2
3
3
  * (c) 2022 kazuya kawaguchi
4
4
  * Released under the MIT License.
5
5
  */
@@ -36,6 +36,14 @@
36
36
  ];
37
37
 
38
38
  var dateTimeFormatKeys = [
39
+ 'dateStyle',
40
+ 'timeStyle',
41
+ 'calendar',
42
+ 'localeMatcher',
43
+ "hour12",
44
+ "hourCycle",
45
+ "timeZone",
46
+ "formatMatcher",
39
47
  'weekday',
40
48
  'era',
41
49
  'year',
@@ -44,8 +52,7 @@
44
52
  'hour',
45
53
  'minute',
46
54
  'second',
47
- 'timeZoneName'
48
- ];
55
+ 'timeZoneName' ];
49
56
 
50
57
  /**
51
58
  * utilities
@@ -2298,7 +2305,7 @@
2298
2305
  });
2299
2306
 
2300
2307
  VueI18n.install = install;
2301
- VueI18n.version = '8.28.0';
2308
+ VueI18n.version = '8.28.2';
2302
2309
 
2303
2310
  return VueI18n;
2304
2311
 
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * vue-i18n v8.28.0
2
+ * vue-i18n v8.28.2
3
3
  * (c) 2022 kazuya kawaguchi
4
4
  * Released under the MIT License.
5
5
  */
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"],e=["weekday","era","year","month","day","hour","minute","second","timeZoneName"];function n(t,e){"undefined"!=typeof console&&(console.warn("[vue-i18n] "+t),e&&console.warn(e.stack))}var r=Array.isArray;function a(t){return null!==t&&"object"==typeof t}function i(t){return"string"==typeof t}var o=Object.prototype.toString,s="[object Object]";function l(t){return o.call(t)===s}function c(t){return null==t}function u(t){return"function"==typeof t}function h(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var n=null,i=null;return 1===t.length?a(t[0])||r(t[0])?i=t[0]:"string"==typeof t[0]&&(n=t[0]):2===t.length&&("string"==typeof t[0]&&(n=t[0]),(a(t[1])||r(t[1]))&&(i=t[1])),{locale:n,params:i}}function f(t){return JSON.parse(JSON.stringify(t))}function p(t,e){return!!~t.indexOf(e)}var _=Object.prototype.hasOwnProperty;function m(t,e){return _.call(t,e)}function g(t){for(var e=arguments,n=Object(t),r=1;r<arguments.length;r++){var i=e[r];if(null!=i){var o=void 0;for(o in i)m(i,o)&&(a(i[o])?n[o]=g(n[o],i[o]):n[o]=i[o])}}return n}function v(t,e){if(t===e)return!0;var n=a(t),i=a(e);if(!n||!i)return!n&&!i&&String(t)===String(e);try{var o=r(t),s=r(e);if(o&&s)return t.length===e.length&&t.every(function(t,n){return v(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 v(t[n],e[n])})}catch(t){return!1}}var d={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(),h=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?b:y,n)}(u.default,c):u),f=a.tag&&!0!==a.tag||!1===a.tag?a.tag:"span";return f?t(f,n,h):h}}};function b(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 r=n.props,o=n.parent,s=n.data,l=o.$i18n;if(!l)return null;var c=null,u=null;i(r.format)?c=r.format:a(r.format)&&(r.format.key&&(c=r.format.key),u=Object.keys(r.format).reduce(function(e,n){var a;return p(t,n)?Object.assign({},e,((a={})[n]=r.format[n],a)):e},null));var h=r.locale||l.locale,f=l._ntp(r.value,h,c,u),_=f.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=f,n)):t.value}),m=r.tag&&!0!==r.tag||!1===r.tag?r.tag:"span";return m?e(m,{attrs:s.attrs,class:s.class,staticClass:s.staticClass},_):_}};function $(t,e,n){C(t,n)&&I(t,e,n)}function M(t,e,n,r){if(C(t,n)){var a=n.context.$i18n;(function(t,e){var n=e.context;return t._locale===n.$i18n.locale})(t,n)&&v(e.value,e.oldValue)&&v(t._localeMessage,a.getLocaleMessage(a.locale))||I(t,e,n)}}function T(t,e,r,a){if(r.context){var i=r.context.$i18n||{};e.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 n("Vue instance does not exists in VNode context")}function C(t,e){var r=e.context;return r?!!r.$i18n||(n("VueI18n instance does not exists in Vue instance"),!1):(n("Vue instance does not exists in VNode context"),!1)}function I(t,e,r){var a,o,s=function(t){var e,n,r,a;i(t)?e=t:l(t)&&(e=t.path,n=t.locale,r=t.args,a=t.choice);return{path:e,locale:n,args:r,choice:a}}(e.value),c=s.path,u=s.locale,h=s.args,f=s.choice;if(c||u||h)if(c){var p=r.context;t._vt=t.textContent=null!=f?(a=p.$i18n).tc.apply(a,[c,f].concat(D(u,h))):(o=p.$i18n).t.apply(o,[c].concat(D(u,h))),t._locale=p.$i18n.locale,t._localeMessage=p.$i18n.getLocaleMessage(p.$i18n.locale)}else n("`path` is required in v-t directive");else n("value type not supported")}function D(t,e){var n=[];return t&&n.push(t),e&&(Array.isArray(e)||l(e))&&n.push(e),n}function L(t,e){void 0===e&&(e={bridge:!1}),L.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(function(t){function e(){this!==this.$root&&this.$options.__INTLIFY_META__&&this.$el&&this.$el.setAttribute("data-intlify",this.$options.__INTLIFY_META__)}return void 0===t&&(t=!1),t?{mounted:e}:{beforeCreate:function(){var t=this.$options;if(t.i18n=t.i18n||(t.__i18nBridge||t.__i18n?{}:null),t.i18n){if(t.i18n instanceof nt){if(t.__i18nBridge||t.__i18n)try{var e=t.i18n&&t.i18n.messages?t.i18n.messages:{};(t.__i18nBridge||t.__i18n).forEach(function(t){e=g(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(l(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.__i18nBridge||t.__i18n)try{var r=t.i18n&&t.i18n.messages?t.i18n.messages:{};(t.__i18nBridge||t.__i18n).forEach(function(t){r=g(r,JSON.parse(t))}),t.i18n.messages=r}catch(t){}var a=t.i18n.sharedMessages;a&&l(a)&&(t.i18n.messages=g(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.__i18nBridge||t.__i18n?{}:null),t.i18n?t.i18n instanceof nt?(this._i18n.subscribeDataChanging(this),this._subscribing=!0):l(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)},mounted:e,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)})}}}}(e.bridge)),k.directive("t",{bind:$,update:M,unbind:T}),k.component(d.name,d),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=[],r=0,i=Array.isArray(e)?"list":a(e)?"named":"unknown";if("unknown"===i)return n;for(;r<t.length;){var o=t[r];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])}r++}return n}(n,e)};var x=/^(?:\d)+/,W=/^(?:\w)+/,j=0,N=1,E=2,S=3,R=0,V=4,H=5,P=6,A=7,B=8,U=[];U[R]={ws:[R],ident:[3,j],"[":[V],eof:[A]},U[1]={ws:[1],".":[2],"[":[V],eof:[A]},U[2]={ws:[2],ident:[3,j],0:[3,j],number:[3,j]},U[3]={ident:[3,j],0:[3,j],number:[3,j],ws:[1,N],".":[2,N],"[":[V,N],eof:[A,N]},U[V]={"'":[H,j],'"':[P,j],"[":[V,E],"]":[1,S],eof:B,else:[V,j]},U[H]={"'":[V,j],eof:B,else:[H,j]},U[P]={'"':[V,j],eof:B,else:[P,j]};var z=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function G(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){var e,n,r,a=t.trim();return("0"!==t.charAt(0)||!isNaN(t))&&(r=a,z.test(r)?(n=(e=a).charCodeAt(0))!==e.charCodeAt(e.length-1)||34!==n&&39!==n?e:e.slice(1,-1):"*"+a)}var J=function(){this._cache=Object.create(null)};J.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=R,h=0,f=[];function p(){var e=t[c+1];if(u===H&&"'"===e||u===P&&'"'===e)return c++,r="\\"+e,f[j](),!0}for(f[N]=function(){void 0!==n&&(l.push(n),n=void 0)},f[j]=function(){void 0===n?n=r:n+=r},f[E]=function(){f[j](),h++},f[S]=function(){if(h>0)h--,u=V,f[j]();else{if(h=0,void 0===n)return!1;if(!1===(n=q(n)))return!1;f[N]()}};null!==u;)if("\\"!==(e=t[++c])||!p()){if(a=G(e),(i=(s=U[u])[a]||s.else||B)===B)return;if(u=i[0],(o=f[i[1]])&&(r=void 0===(r=i[2])?e:r,!1===o()))return;if(u===A)return l}}(t))&&(this._cache[t]=e),e||[]},J.prototype.getPathValue=function(t,e){if(!a(t))return null;var n=this.parsePath(e);if(0===n.length)return null;for(var r=n.length,i=t,o=0;o<r;){var s=i[n[o]];if(null==s)return null;i=s,o++}return i};var Z,Y=/<\/?[\w\s="/.':;#-\/]+>/,X=/(?:@(?:\.[a-zA-Z]+)?:(?:[\w\-_|./]+|\([\w\-_:|./]+\)))/g,K=/^@(?:\.([a-zA-Z]+))?:/,Q=/[()]/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&&L(window.Vue);var n=t.locale||"en-US",r=!1!==t.fallbackLocale&&(t.fallbackLocale||"en-US"),a=t.messages||{},i=t.dateTimeFormats||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._fallbackRootWithEmptyString=void 0===t.fallbackRootWithEmptyString||!!t.fallbackRootWithEmptyString,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=new Set,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,"__VUE_I18N_BRIDGE__"in t&&(this.__VUE_I18N_BRIDGE__=t.__VUE_I18N_BRIDGE__),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)&&(!c(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},sync:{configurable:!0}};return nt.prototype._checkLocaleMessage=function(t,e,a){var o=function(t,e,a,s){if(l(a))Object.keys(a).forEach(function(n){var r=a[n];l(r)?(s.push(n),s.push("."),o(t,e,r,s),s.pop(),s.pop()):(s.push(n),o(t,e,r,s),s.pop())});else if(r(a))a.forEach(function(n,r){l(n)?(s.push("["+r+"]"),s.push("."),o(t,e,n,s),s.pop(),s.pop()):(s.push("["+r+"]"),o(t,e,n,s),s.pop())});else if(i(a)){if(Y.test(a)){var c="Detected HTML in message '"+a+"' of keypath '"+s.join("")+"' at '"+e+"'. Consider component interpolation with '<i18n>' to avoid XSS. See https://bit.ly/2ZqJzkp";"warn"===t?n(c):"error"===t&&function(t,e){"undefined"!=typeof console&&(console.error("[vue-i18n] "+t),e&&console.error(e.stack))}(c)}}};o(e,t,a,[])},nt.prototype._initVM=function(t){var e=k.config.silent;k.config.silent=!0,this._vm=new k({data:t,__VUE18N__INSTANCE__:!0}),k.config.silent=e},nt.prototype.destroyVM=function(){this._vm.$destroy()},nt.prototype.subscribeDataChanging=function(t){this._dataListeners.add(t)},nt.prototype.unsubscribeDataChanging=function(t){!function(t,e){if(t.delete(e));}(this._dataListeners,t)},nt.prototype.watchI18nData=function(){var t=this;return this._vm.$watch("$data",function(){for(var e,n,r=(e=t._dataListeners,n=[],e.forEach(function(t){return n.push(t)}),n),a=r.length;a--;)k.nextTick(function(){r[a]&&r[a].$forceUpdate()})},{deep:!0})},nt.prototype.watchLocale=function(t){if(t){if(!this.__VUE_I18N_BRIDGE__)return null;var e=this,n=this._vm;return this.vm.$watch("locale",function(r){n.$set(n,"locale",r),e.__VUE_I18N_BRIDGE__&&t&&(t.locale.value=r),n.$forceUpdate()},{immediate:!0})}if(!this._sync||!this._root)return null;var r=this._vm;return this._root.$i18n.vm.$watch("locale",function(t){r.$set(r,"locale",t),r.$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},rt.sync.get=function(){return this._sync},rt.sync.set=function(t){this._sync=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,a,o){if(!c(n))return n;if(this._missing){var s=this._missing.apply(null,[t,e,r,a]);if(i(s))return s}if(this._formatFallbackMessages){var l=h.apply(void 0,a);return this._render(e,o,l.params,e)}return e},nt.prototype._isFallbackRoot=function(t){return(this._fallbackRootWithEmptyString?!t:c(t))&&!c(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,n,a,o,s,h){if(!e)return null;var f,p=this._path.getPathValue(e,n);if(r(p)||l(p))return p;if(c(p)){if(!l(e))return null;if(!i(f=e[n])&&!u(f))return null}else{if(!i(p)&&!u(p))return null;f=p}return i(f)&&(f.indexOf("@:")>=0||f.indexOf("@.")>=0)&&(f=this._link(t,e,f,a,"raw",s,h)),this._render(f,o,s,n)},nt.prototype._link=function(t,e,n,a,i,o,s){var l=n,c=l.match(X);for(var u in c)if(c.hasOwnProperty(u)){var h=c[u],f=h.match(K),_=f[0],m=f[1],g=h.replace(_,"").replace(Q,"");if(p(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 d=this._root.$i18n;v=d._translate(d._getMessages(),d.locale,d.fallbackLocale,g,a,i,o)}v=this._warnDefault(t,g,v,a,r(o)?o:[o],i),this._modifiers.hasOwnProperty(m)?v=this._modifiers[m](v):tt.hasOwnProperty(m)&&(v=tt[m](v)),s.pop(),l=v?l.replace(h,v):l}return l},nt.prototype._createMessageContext=function(t,e,n,i){var o=this,s=r(t)?t:[],l=a(t)?t:{},c=this._getMessages(),u=this.locale;return{list:function(t){return s[t]},named:function(t){return l[t]},values:t,formatter:e,path:n,messages:c,locale:u,linked:function(t){return o._interpolate(u,c[u]||{},t,null,i,void 0,[t])}}},nt.prototype._render=function(t,e,n,r){if(u(t))return t(this._createMessageContext(n,this._formatter||et,r,e));var a=this._formatter.interpolate(t,n,r);return a||(a=et.interpolate(t,n,r)),"string"!==e||i(a)?a:a.join("")},nt.prototype._appendItemToChain=function(t,e,n){var r=!1;return p(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,a=0;a<e.length&&"boolean"==typeof r;a++){var o=e[a];i(o)&&(r=this._appendLocaleToChain(t,o,n))}return r},nt.prototype._getLocaleChain=function(t,e){if(""===t)return[];this._localeChainCache||(this._localeChainCache={});var n=this._localeChainCache[t];if(!n){e||(e=this.fallbackLocale),n=[];for(var o,s=[t];r(s);)s=this._appendBlockToChain(n,s,e);(s=i(o=r(e)?e:a(e)?e.default?e.default:null:e)?[o]:o)&&this._appendBlockToChain(n,s,null),this._localeChainCache[t]=n}return n},nt.prototype._translate=function(t,e,n,r,a,i,o){for(var s,l=this._getLocaleChain(e,n),u=0;u<l.length;u++){var h=l[u];if(!c(s=this._interpolate(h,t[h],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=h.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,u=this._translate(n,c,this.fallbackLocale,t,r,"string",l.params);if(this._isFallbackRoot(u)){if(!this._root)throw Error("unexpected error");return(a=this._root).$t.apply(a,[t].concat(i))}return u=this._warnDefault(c,t,u,r,i,"string"),this._postTranslation&&null!=u&&(u=this._postTranslation(u,t)),u},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?(i(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=h.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||!i(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=h.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,g(void 0!==this._vm.messages[t]&&Object.keys(this._vm.messages[t]).length?Object.assign({},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,g(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,i){for(var o=e,s=r[o],l=this._getLocaleChain(e,n),u=0;u<l.length;u++){var h=l[u];if(o=h,!c(s=r[h])&&!c(s[a]))break}if(c(s)||c(s[a]))return null;var f,p=s[a];if(i)f=new Intl.DateTimeFormat(o,Object.assign({},p,i));else{var _=o+"__"+a;(f=this._dateTimeFormatters[_])||(f=this._dateTimeFormatters[_]=new Intl.DateTimeFormat(o,p))}return f.format(t)},nt.prototype._d=function(t,e,n,r){if(!n)return(r?new Intl.DateTimeFormat(e,r):new Intl.DateTimeFormat(e)).format(t);var a=this._localizeDateTime(t,e,this.fallbackLocale,this._getDateTimeFormats(),n,r);if(this._isFallbackRoot(a)){if(!this._root)throw Error("unexpected error");return this._root.$i18n.d(t,n,e)}return a||""},nt.prototype.d=function(t){for(var n=[],r=arguments.length-1;r-- >0;)n[r]=arguments[r+1];var o=this.locale,s=null,l=null;return 1===n.length?(i(n[0])?s=n[0]:a(n[0])&&(n[0].locale&&(o=n[0].locale),n[0].key&&(s=n[0].key)),l=Object.keys(n[0]).reduce(function(t,r){var a;return p(e,r)?Object.assign({},t,((a={})[r]=n[0][r],a)):t},null)):2===n.length&&(i(n[0])&&(s=n[0]),i(n[1])&&(o=n[1])),this._d(t,o,s,l)},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,g(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],l=this._getLocaleChain(e,n),u=0;u<l.length;u++){var h=l[u];if(o=h,!c(s=r[h])&&!c(s[a]))break}if(c(s)||c(s[a]))return null;var f,p=s[a];if(i)f=new Intl.NumberFormat(o,Object.assign({},p,i));else{var _=o+"__"+a;(f=this._numberFormatters[_])||(f=this._numberFormatters[_]=new Intl.NumberFormat(o,p))}return f},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=[],r=arguments.length-1;r-- >0;)n[r]=arguments[r+1];var o=this.locale,s=null,l=null;return 1===n.length?i(n[0])?s=n[0]:a(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 p(t,r)?Object.assign({},e,((a={})[r]=n[0][r],a)):e},null)):2===n.length&&(i(n[0])&&(s=n[0]),i(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(!Z){var t="undefined"!=typeof Intl;Z={dateTimeFormat:t&&void 0!==Intl.DateTimeFormat,numberFormat:t&&void 0!==Intl.NumberFormat}}return Z}}),nt.install=L,nt.version="8.28.0",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"],e=["dateStyle","timeStyle","calendar","localeMatcher","hour12","hourCycle","timeZone","formatMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName"];function n(t,e){"undefined"!=typeof console&&(console.warn("[vue-i18n] "+t),e&&console.warn(e.stack))}var r=Array.isArray;function a(t){return null!==t&&"object"==typeof t}function i(t){return"string"==typeof t}var o=Object.prototype.toString,s="[object Object]";function l(t){return o.call(t)===s}function c(t){return null==t}function u(t){return"function"==typeof t}function h(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var n=null,i=null;return 1===t.length?a(t[0])||r(t[0])?i=t[0]:"string"==typeof t[0]&&(n=t[0]):2===t.length&&("string"==typeof t[0]&&(n=t[0]),(a(t[1])||r(t[1]))&&(i=t[1])),{locale:n,params:i}}function f(t){return JSON.parse(JSON.stringify(t))}function p(t,e){return!!~t.indexOf(e)}var _=Object.prototype.hasOwnProperty;function m(t,e){return _.call(t,e)}function g(t){for(var e=arguments,n=Object(t),r=1;r<arguments.length;r++){var i=e[r];if(null!=i){var o=void 0;for(o in i)m(i,o)&&(a(i[o])?n[o]=g(n[o],i[o]):n[o]=i[o])}}return n}function v(t,e){if(t===e)return!0;var n=a(t),i=a(e);if(!n||!i)return!n&&!i&&String(t)===String(e);try{var o=r(t),s=r(e);if(o&&s)return t.length===e.length&&t.every(function(t,n){return v(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 v(t[n],e[n])})}catch(t){return!1}}var d={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(),h=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?b:y,n)}(u.default,c):u),f=a.tag&&!0!==a.tag||!1===a.tag?a.tag:"span";return f?t(f,n,h):h}}};function b(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 r=n.props,o=n.parent,s=n.data,l=o.$i18n;if(!l)return null;var c=null,u=null;i(r.format)?c=r.format:a(r.format)&&(r.format.key&&(c=r.format.key),u=Object.keys(r.format).reduce(function(e,n){var a;return p(t,n)?Object.assign({},e,((a={})[n]=r.format[n],a)):e},null));var h=r.locale||l.locale,f=l._ntp(r.value,h,c,u),_=f.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=f,n)):t.value}),m=r.tag&&!0!==r.tag||!1===r.tag?r.tag:"span";return m?e(m,{attrs:s.attrs,class:s.class,staticClass:s.staticClass},_):_}};function $(t,e,n){C(t,n)&&I(t,e,n)}function M(t,e,n,r){if(C(t,n)){var a=n.context.$i18n;(function(t,e){var n=e.context;return t._locale===n.$i18n.locale})(t,n)&&v(e.value,e.oldValue)&&v(t._localeMessage,a.getLocaleMessage(a.locale))||I(t,e,n)}}function T(t,e,r,a){if(r.context){var i=r.context.$i18n||{};e.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 n("Vue instance does not exists in VNode context")}function C(t,e){var r=e.context;return r?!!r.$i18n||(n("VueI18n instance does not exists in Vue instance"),!1):(n("Vue instance does not exists in VNode context"),!1)}function I(t,e,r){var a,o,s=function(t){var e,n,r,a;i(t)?e=t:l(t)&&(e=t.path,n=t.locale,r=t.args,a=t.choice);return{path:e,locale:n,args:r,choice:a}}(e.value),c=s.path,u=s.locale,h=s.args,f=s.choice;if(c||u||h)if(c){var p=r.context;t._vt=t.textContent=null!=f?(a=p.$i18n).tc.apply(a,[c,f].concat(D(u,h))):(o=p.$i18n).t.apply(o,[c].concat(D(u,h))),t._locale=p.$i18n.locale,t._localeMessage=p.$i18n.getLocaleMessage(p.$i18n.locale)}else n("`path` is required in v-t directive");else n("value type not supported")}function D(t,e){var n=[];return t&&n.push(t),e&&(Array.isArray(e)||l(e))&&n.push(e),n}function L(t,e){void 0===e&&(e={bridge:!1}),L.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(function(t){function e(){this!==this.$root&&this.$options.__INTLIFY_META__&&this.$el&&this.$el.setAttribute("data-intlify",this.$options.__INTLIFY_META__)}return void 0===t&&(t=!1),t?{mounted:e}:{beforeCreate:function(){var t=this.$options;if(t.i18n=t.i18n||(t.__i18nBridge||t.__i18n?{}:null),t.i18n){if(t.i18n instanceof nt){if(t.__i18nBridge||t.__i18n)try{var e=t.i18n&&t.i18n.messages?t.i18n.messages:{};(t.__i18nBridge||t.__i18n).forEach(function(t){e=g(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(l(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.__i18nBridge||t.__i18n)try{var r=t.i18n&&t.i18n.messages?t.i18n.messages:{};(t.__i18nBridge||t.__i18n).forEach(function(t){r=g(r,JSON.parse(t))}),t.i18n.messages=r}catch(t){}var a=t.i18n.sharedMessages;a&&l(a)&&(t.i18n.messages=g(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.__i18nBridge||t.__i18n?{}:null),t.i18n?t.i18n instanceof nt?(this._i18n.subscribeDataChanging(this),this._subscribing=!0):l(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)},mounted:e,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)})}}}}(e.bridge)),k.directive("t",{bind:$,update:M,unbind:T}),k.component(d.name,d),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=[],r=0,i=Array.isArray(e)?"list":a(e)?"named":"unknown";if("unknown"===i)return n;for(;r<t.length;){var o=t[r];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])}r++}return n}(n,e)};var x=/^(?:\d)+/,W=/^(?:\w)+/,j=0,N=1,S=2,E=3,R=0,V=4,H=5,P=6,A=7,B=8,U=[];U[R]={ws:[R],ident:[3,j],"[":[V],eof:[A]},U[1]={ws:[1],".":[2],"[":[V],eof:[A]},U[2]={ws:[2],ident:[3,j],0:[3,j],number:[3,j]},U[3]={ident:[3,j],0:[3,j],number:[3,j],ws:[1,N],".":[2,N],"[":[V,N],eof:[A,N]},U[V]={"'":[H,j],'"':[P,j],"[":[V,S],"]":[1,E],eof:B,else:[V,j]},U[H]={"'":[V,j],eof:B,else:[H,j]},U[P]={'"':[V,j],eof:B,else:[P,j]};var z=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function G(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){var e,n,r,a=t.trim();return("0"!==t.charAt(0)||!isNaN(t))&&(r=a,z.test(r)?(n=(e=a).charCodeAt(0))!==e.charCodeAt(e.length-1)||34!==n&&39!==n?e:e.slice(1,-1):"*"+a)}var J=function(){this._cache=Object.create(null)};J.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=R,h=0,f=[];function p(){var e=t[c+1];if(u===H&&"'"===e||u===P&&'"'===e)return c++,r="\\"+e,f[j](),!0}for(f[N]=function(){void 0!==n&&(l.push(n),n=void 0)},f[j]=function(){void 0===n?n=r:n+=r},f[S]=function(){f[j](),h++},f[E]=function(){if(h>0)h--,u=V,f[j]();else{if(h=0,void 0===n)return!1;if(!1===(n=q(n)))return!1;f[N]()}};null!==u;)if("\\"!==(e=t[++c])||!p()){if(a=G(e),(i=(s=U[u])[a]||s.else||B)===B)return;if(u=i[0],(o=f[i[1]])&&(r=void 0===(r=i[2])?e:r,!1===o()))return;if(u===A)return l}}(t))&&(this._cache[t]=e),e||[]},J.prototype.getPathValue=function(t,e){if(!a(t))return null;var n=this.parsePath(e);if(0===n.length)return null;for(var r=n.length,i=t,o=0;o<r;){var s=i[n[o]];if(null==s)return null;i=s,o++}return i};var Z,Y=/<\/?[\w\s="/.':;#-\/]+>/,X=/(?:@(?:\.[a-zA-Z]+)?:(?:[\w\-_|./]+|\([\w\-_:|./]+\)))/g,K=/^@(?:\.([a-zA-Z]+))?:/,Q=/[()]/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&&L(window.Vue);var n=t.locale||"en-US",r=!1!==t.fallbackLocale&&(t.fallbackLocale||"en-US"),a=t.messages||{},i=t.dateTimeFormats||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._fallbackRootWithEmptyString=void 0===t.fallbackRootWithEmptyString||!!t.fallbackRootWithEmptyString,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=new Set,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,"__VUE_I18N_BRIDGE__"in t&&(this.__VUE_I18N_BRIDGE__=t.__VUE_I18N_BRIDGE__),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)&&(!c(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},sync:{configurable:!0}};return nt.prototype._checkLocaleMessage=function(t,e,a){var o=function(t,e,a,s){if(l(a))Object.keys(a).forEach(function(n){var r=a[n];l(r)?(s.push(n),s.push("."),o(t,e,r,s),s.pop(),s.pop()):(s.push(n),o(t,e,r,s),s.pop())});else if(r(a))a.forEach(function(n,r){l(n)?(s.push("["+r+"]"),s.push("."),o(t,e,n,s),s.pop(),s.pop()):(s.push("["+r+"]"),o(t,e,n,s),s.pop())});else if(i(a)){if(Y.test(a)){var c="Detected HTML in message '"+a+"' of keypath '"+s.join("")+"' at '"+e+"'. Consider component interpolation with '<i18n>' to avoid XSS. See https://bit.ly/2ZqJzkp";"warn"===t?n(c):"error"===t&&function(t,e){"undefined"!=typeof console&&(console.error("[vue-i18n] "+t),e&&console.error(e.stack))}(c)}}};o(e,t,a,[])},nt.prototype._initVM=function(t){var e=k.config.silent;k.config.silent=!0,this._vm=new k({data:t,__VUE18N__INSTANCE__:!0}),k.config.silent=e},nt.prototype.destroyVM=function(){this._vm.$destroy()},nt.prototype.subscribeDataChanging=function(t){this._dataListeners.add(t)},nt.prototype.unsubscribeDataChanging=function(t){!function(t,e){if(t.delete(e));}(this._dataListeners,t)},nt.prototype.watchI18nData=function(){var t=this;return this._vm.$watch("$data",function(){for(var e,n,r=(e=t._dataListeners,n=[],e.forEach(function(t){return n.push(t)}),n),a=r.length;a--;)k.nextTick(function(){r[a]&&r[a].$forceUpdate()})},{deep:!0})},nt.prototype.watchLocale=function(t){if(t){if(!this.__VUE_I18N_BRIDGE__)return null;var e=this,n=this._vm;return this.vm.$watch("locale",function(r){n.$set(n,"locale",r),e.__VUE_I18N_BRIDGE__&&t&&(t.locale.value=r),n.$forceUpdate()},{immediate:!0})}if(!this._sync||!this._root)return null;var r=this._vm;return this._root.$i18n.vm.$watch("locale",function(t){r.$set(r,"locale",t),r.$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},rt.sync.get=function(){return this._sync},rt.sync.set=function(t){this._sync=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,a,o){if(!c(n))return n;if(this._missing){var s=this._missing.apply(null,[t,e,r,a]);if(i(s))return s}if(this._formatFallbackMessages){var l=h.apply(void 0,a);return this._render(e,o,l.params,e)}return e},nt.prototype._isFallbackRoot=function(t){return(this._fallbackRootWithEmptyString?!t:c(t))&&!c(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,n,a,o,s,h){if(!e)return null;var f,p=this._path.getPathValue(e,n);if(r(p)||l(p))return p;if(c(p)){if(!l(e))return null;if(!i(f=e[n])&&!u(f))return null}else{if(!i(p)&&!u(p))return null;f=p}return i(f)&&(f.indexOf("@:")>=0||f.indexOf("@.")>=0)&&(f=this._link(t,e,f,a,"raw",s,h)),this._render(f,o,s,n)},nt.prototype._link=function(t,e,n,a,i,o,s){var l=n,c=l.match(X);for(var u in c)if(c.hasOwnProperty(u)){var h=c[u],f=h.match(K),_=f[0],m=f[1],g=h.replace(_,"").replace(Q,"");if(p(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 d=this._root.$i18n;v=d._translate(d._getMessages(),d.locale,d.fallbackLocale,g,a,i,o)}v=this._warnDefault(t,g,v,a,r(o)?o:[o],i),this._modifiers.hasOwnProperty(m)?v=this._modifiers[m](v):tt.hasOwnProperty(m)&&(v=tt[m](v)),s.pop(),l=v?l.replace(h,v):l}return l},nt.prototype._createMessageContext=function(t,e,n,i){var o=this,s=r(t)?t:[],l=a(t)?t:{},c=this._getMessages(),u=this.locale;return{list:function(t){return s[t]},named:function(t){return l[t]},values:t,formatter:e,path:n,messages:c,locale:u,linked:function(t){return o._interpolate(u,c[u]||{},t,null,i,void 0,[t])}}},nt.prototype._render=function(t,e,n,r){if(u(t))return t(this._createMessageContext(n,this._formatter||et,r,e));var a=this._formatter.interpolate(t,n,r);return a||(a=et.interpolate(t,n,r)),"string"!==e||i(a)?a:a.join("")},nt.prototype._appendItemToChain=function(t,e,n){var r=!1;return p(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,a=0;a<e.length&&"boolean"==typeof r;a++){var o=e[a];i(o)&&(r=this._appendLocaleToChain(t,o,n))}return r},nt.prototype._getLocaleChain=function(t,e){if(""===t)return[];this._localeChainCache||(this._localeChainCache={});var n=this._localeChainCache[t];if(!n){e||(e=this.fallbackLocale),n=[];for(var o,s=[t];r(s);)s=this._appendBlockToChain(n,s,e);(s=i(o=r(e)?e:a(e)?e.default?e.default:null:e)?[o]:o)&&this._appendBlockToChain(n,s,null),this._localeChainCache[t]=n}return n},nt.prototype._translate=function(t,e,n,r,a,i,o){for(var s,l=this._getLocaleChain(e,n),u=0;u<l.length;u++){var h=l[u];if(!c(s=this._interpolate(h,t[h],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=h.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,u=this._translate(n,c,this.fallbackLocale,t,r,"string",l.params);if(this._isFallbackRoot(u)){if(!this._root)throw Error("unexpected error");return(a=this._root).$t.apply(a,[t].concat(i))}return u=this._warnDefault(c,t,u,r,i,"string"),this._postTranslation&&null!=u&&(u=this._postTranslation(u,t)),u},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?(i(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=h.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||!i(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=h.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,g(void 0!==this._vm.messages[t]&&Object.keys(this._vm.messages[t]).length?Object.assign({},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,g(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,i){for(var o=e,s=r[o],l=this._getLocaleChain(e,n),u=0;u<l.length;u++){var h=l[u];if(o=h,!c(s=r[h])&&!c(s[a]))break}if(c(s)||c(s[a]))return null;var f,p=s[a];if(i)f=new Intl.DateTimeFormat(o,Object.assign({},p,i));else{var _=o+"__"+a;(f=this._dateTimeFormatters[_])||(f=this._dateTimeFormatters[_]=new Intl.DateTimeFormat(o,p))}return f.format(t)},nt.prototype._d=function(t,e,n,r){if(!n)return(r?new Intl.DateTimeFormat(e,r):new Intl.DateTimeFormat(e)).format(t);var a=this._localizeDateTime(t,e,this.fallbackLocale,this._getDateTimeFormats(),n,r);if(this._isFallbackRoot(a)){if(!this._root)throw Error("unexpected error");return this._root.$i18n.d(t,n,e)}return a||""},nt.prototype.d=function(t){for(var n=[],r=arguments.length-1;r-- >0;)n[r]=arguments[r+1];var o=this.locale,s=null,l=null;return 1===n.length?(i(n[0])?s=n[0]:a(n[0])&&(n[0].locale&&(o=n[0].locale),n[0].key&&(s=n[0].key)),l=Object.keys(n[0]).reduce(function(t,r){var a;return p(e,r)?Object.assign({},t,((a={})[r]=n[0][r],a)):t},null)):2===n.length&&(i(n[0])&&(s=n[0]),i(n[1])&&(o=n[1])),this._d(t,o,s,l)},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,g(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],l=this._getLocaleChain(e,n),u=0;u<l.length;u++){var h=l[u];if(o=h,!c(s=r[h])&&!c(s[a]))break}if(c(s)||c(s[a]))return null;var f,p=s[a];if(i)f=new Intl.NumberFormat(o,Object.assign({},p,i));else{var _=o+"__"+a;(f=this._numberFormatters[_])||(f=this._numberFormatters[_]=new Intl.NumberFormat(o,p))}return f},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=[],r=arguments.length-1;r-- >0;)n[r]=arguments[r+1];var o=this.locale,s=null,l=null;return 1===n.length?i(n[0])?s=n[0]:a(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 p(t,r)?Object.assign({},e,((a={})[r]=n[0][r],a)):e},null)):2===n.length&&(i(n[0])&&(s=n[0]),i(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(!Z){var t="undefined"!=typeof Intl;Z={dateTimeFormat:t&&void 0!==Intl.DateTimeFormat,numberFormat:t&&void 0!==Intl.NumberFormat}}return Z}}),nt.install=L,nt.version="8.28.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.28.0",
4
+ "version": "8.28.2",
5
5
  "author": {
6
6
  "name": "kazuya kawaguchi",
7
7
  "email": "kawakazu80@gmail.com"
package/src/util.js CHANGED
@@ -25,6 +25,14 @@ export const numberFormatKeys = [
25
25
  ]
26
26
 
27
27
  export const dateTimeFormatKeys = [
28
+ 'dateStyle',
29
+ 'timeStyle',
30
+ 'calendar',
31
+ 'localeMatcher',
32
+ "hour12",
33
+ "hourCycle",
34
+ "timeZone",
35
+ "formatMatcher",
28
36
  'weekday',
29
37
  'era',
30
38
  'year',
@@ -33,7 +41,7 @@ export const dateTimeFormatKeys = [
33
41
  'hour',
34
42
  'minute',
35
43
  'second',
36
- 'timeZoneName'
44
+ 'timeZoneName',
37
45
  ]
38
46
 
39
47
  /**