"use strict";var numberFormatKeys=["compactDisplay","currency","currencyDisplay","currencySign","localeMatcher","notation","numberingSystem","signDisplay","style","unit","unitDisplay","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits"];function warn(t,e){"undefined"!=typeof console&&(console.warn("[vue-i18n] "+t),e&&console.warn(e.stack))}function error(t,e){"undefined"!=typeof console&&(console.error("[vue-i18n] "+t),e&&console.error(e.stack))}var isArray=Array.isArray;function isObject(t){return null!==t&&"object"==typeof t}function isBoolean(t){return"boolean"==typeof t}function isString(t){return"string"==typeof t}var toString=Object.prototype.toString,OBJECT_STRING="[object Object]";function isPlainObject(t){return toString.call(t)===OBJECT_STRING}function isNull(t){return null==t}function isFunction(t){return"function"==typeof t}function parseArgs(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var n=null,r=null;return 1===t.length?isObject(t[0])||isArray(t[0])?r=t[0]:"string"==typeof t[0]&&(n=t[0]):2===t.length&&("string"==typeof t[0]&&(n=t[0]),(isObject(t[1])||isArray(t[1]))&&(r=t[1])),{locale:n,params:r}}function looseClone(t){return JSON.parse(JSON.stringify(t))}function remove(t,e){if(t.length){e=t.indexOf(e);if(-1/g,">").replace(/"/g,""").replace(/'/g,"'")}function escapeParams(e){return null!=e&&Object.keys(e).forEach(function(t){"string"==typeof e[t]&&(e[t]=escapeHtml(e[t]))}),e}function extend(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;0/,linkKeyMatcher=/(?:@(?:\.[a-z]+)?:(?:[\w\-_|.]+|\([\w\-_|.]+\)))/g,linkKeyPrefixMatcher=/^@(?:\.([a-z]+))?:/,bracketsMatcher=/[()]/g,defaultModifiers={upper:function(t){return t.toLocaleUpperCase()},lower:function(t){return t.toLocaleLowerCase()},capitalize:function(t){return""+t.charAt(0).toLocaleUpperCase()+t.substr(1)}},defaultFormatter=new BaseFormatter,VueI18n=function(t){var i=this;void 0===t&&(t={}),!Vue&&"undefined"!=typeof window&&window.Vue&&install(window.Vue);var e=t.locale||"en-US",n=!1!==t.fallbackLocale&&(t.fallbackLocale||"en-US"),r=t.messages||{},a=t.dateTimeFormats||{},o=t.numberFormats||{};this._vm=null,this._formatter=t.formatter||defaultFormatter,this._modifiers=t.modifiers||{},this._missing=t.missing||null,this._root=t.root||null,this._sync=void 0===t.sync||!!t.sync,this._fallbackRoot=void 0===t.fallbackRoot||!!t.fallbackRoot,this._formatFallbackMessages=void 0!==t.formatFallbackMessages&&!!t.formatFallbackMessages,this._silentTranslationWarn=void 0!==t.silentTranslationWarn&&t.silentTranslationWarn,this._silentFallbackWarn=void 0!==t.silentFallbackWarn&&!!t.silentFallbackWarn,this._dateTimeFormatters={},this._numberFormatters={},this._path=new I18nPath,this._dataListeners=[],this._componentInstanceCreatedListener=t.componentInstanceCreatedListener||null,this._preserveDirectiveContent=void 0!==t.preserveDirectiveContent&&!!t.preserveDirectiveContent,this.pluralizationRules=t.pluralizationRules||{},this._warnHtmlInMessage=t.warnHtmlInMessage||"off",this._postTranslation=t.postTranslation||null,this._escapeParameterHtml=t.escapeParameterHtml||!1,this.getChoiceIndex=function(t,e){var n=Object.getPrototypeOf(i);if(n&&n.getChoiceIndex)return n.getChoiceIndex.call(i,t,e);var r,a;return i.locale in i.pluralizationRules?i.pluralizationRules[i.locale].apply(i,[t,e]):(r=t,a=e,r=Math.abs(r),2===a?!r||1' to avoid XSS. See https://bit.ly/2ZqJzkp","warn"===n?warn(t):"error"===n&&error(t))};o(e,t,n,[])},VueI18n.prototype._initVM=function(t){var e=Vue.config.silent;Vue.config.silent=!0,this._vm=new Vue({data:t}),Vue.config.silent=e},VueI18n.prototype.destroyVM=function(){this._vm.$destroy()},VueI18n.prototype.subscribeDataChanging=function(t){this._dataListeners.push(t)},VueI18n.prototype.unsubscribeDataChanging=function(t){remove(this._dataListeners,t)},VueI18n.prototype.watchI18nData=function(){var e=this;return this._vm.$watch("$data",function(){for(var t=e._dataListeners.length;t--;)Vue.nextTick(function(){e._dataListeners[t]&&e._dataListeners[t].$forceUpdate()})},{deep:!0})},VueI18n.prototype.watchLocale=function(){if(!this._sync||!this._root)return null;var e=this._vm;return this._root.$i18n.vm.$watch("locale",function(t){e.$set(e,"locale",t),e.$forceUpdate()},{immediate:!0})},VueI18n.prototype.onComponentInstanceCreated=function(t){this._componentInstanceCreatedListener&&this._componentInstanceCreatedListener(t,this)},prototypeAccessors.vm.get=function(){return this._vm},prototypeAccessors.messages.get=function(){return looseClone(this._getMessages())},prototypeAccessors.dateTimeFormats.get=function(){return looseClone(this._getDateTimeFormats())},prototypeAccessors.numberFormats.get=function(){return looseClone(this._getNumberFormats())},prototypeAccessors.availableLocales.get=function(){return Object.keys(this.messages).sort()},prototypeAccessors.locale.get=function(){return this._vm.locale},prototypeAccessors.locale.set=function(t){this._vm.$set(this._vm,"locale",t)},prototypeAccessors.fallbackLocale.get=function(){return this._vm.fallbackLocale},prototypeAccessors.fallbackLocale.set=function(t){this._localeChainCache={},this._vm.$set(this._vm,"fallbackLocale",t)},prototypeAccessors.formatFallbackMessages.get=function(){return this._formatFallbackMessages},prototypeAccessors.formatFallbackMessages.set=function(t){this._formatFallbackMessages=t},prototypeAccessors.missing.get=function(){return this._missing},prototypeAccessors.missing.set=function(t){this._missing=t},prototypeAccessors.formatter.get=function(){return this._formatter},prototypeAccessors.formatter.set=function(t){this._formatter=t},prototypeAccessors.silentTranslationWarn.get=function(){return this._silentTranslationWarn},prototypeAccessors.silentTranslationWarn.set=function(t){this._silentTranslationWarn=t},prototypeAccessors.silentFallbackWarn.get=function(){return this._silentFallbackWarn},prototypeAccessors.silentFallbackWarn.set=function(t){this._silentFallbackWarn=t},prototypeAccessors.preserveDirectiveContent.get=function(){return this._preserveDirectiveContent},prototypeAccessors.preserveDirectiveContent.set=function(t){this._preserveDirectiveContent=t},prototypeAccessors.warnHtmlInMessage.get=function(){return this._warnHtmlInMessage},prototypeAccessors.warnHtmlInMessage.set=function(t){var e,n=this;this._warnHtmlInMessage===(this._warnHtmlInMessage=t)||"warn"!==t&&"error"!==t||(e=this._getMessages(),Object.keys(e).forEach(function(t){n._checkLocaleMessage(t,n._warnHtmlInMessage,e[t])}))},prototypeAccessors.postTranslation.get=function(){return this._postTranslation},prototypeAccessors.postTranslation.set=function(t){this._postTranslation=t},VueI18n.prototype._getMessages=function(){return this._vm.messages},VueI18n.prototype._getDateTimeFormats=function(){return this._vm.dateTimeFormats},VueI18n.prototype._getNumberFormats=function(){return this._vm.numberFormats},VueI18n.prototype._warnDefault=function(t,e,n,r,a,i){if(!isNull(n))return n;if(this._missing){r=this._missing.apply(null,[t,e,r,a]);if(isString(r))return r}else"production"===process.env.NODE_ENV||this._isSilentTranslationWarn(e)||warn("Cannot translate the value of keypath '"+e+"'. Use the value of keypath as default.");if(this._formatFallbackMessages){a=parseArgs.apply(void 0,a);return this._render(e,i,a.params,e)}return e},VueI18n.prototype._isFallbackRoot=function(t){return!t&&!isNull(this._root)&&this._fallbackRoot},VueI18n.prototype._isSilentFallbackWarn=function(t){return this._silentFallbackWarn instanceof RegExp?this._silentFallbackWarn.test(t):this._silentFallbackWarn},VueI18n.prototype._isSilentFallback=function(t,e){return this._isSilentFallbackWarn(e)&&(this._isFallbackRoot()||t!==this.fallbackLocale)},VueI18n.prototype._isSilentTranslationWarn=function(t){return this._silentTranslationWarn instanceof RegExp?this._silentTranslationWarn.test(t):this._silentTranslationWarn},VueI18n.prototype._interpolate=function(t,e,n,r,a,i,o){if(!e)return null;var s,l=this._path.getPathValue(e,n);if(isArray(l)||isPlainObject(l))return l;if(isNull(l)){if(!isPlainObject(e))return null;if(!isString(s=e[n])&&!isFunction(s))return"production"===process.env.NODE_ENV||this._isSilentTranslationWarn(n)||this._isSilentFallback(t,n)||warn("Value of key '"+n+"' is not a string or function !"),null}else{if(!isString(l)&&!isFunction(l))return"production"===process.env.NODE_ENV||this._isSilentTranslationWarn(n)||this._isSilentFallback(t,n)||warn("Value of key '"+n+"' is not a string or function!"),null;s=l}return isString(s)&&(0<=s.indexOf("@:")||0<=s.indexOf("@."))&&(s=this._link(t,e,s,r,"raw",i,o)),this._render(s,a,i,n)},VueI18n.prototype._link=function(t,e,n,r,a,i,o){var s,l=n,c=l.match(linkKeyMatcher);for(s in c)if(c.hasOwnProperty(s)){var u=c[s],p=u.match(linkKeyPrefixMatcher),h=p[0],f=p[1],_=u.replace(h,"").replace(bracketsMatcher,"");if(includes(o,_))return"production"!==process.env.NODE_ENV&&warn('Circular reference found. "'+u+'" is already visited in the chain of '+o.reverse().join(" <- ")),l;o.push(_);p=this._interpolate(t,e,_,r,"raw"===a?"string":a,"raw"===a?void 0:i,o);if(this._isFallbackRoot(p)){if("production"===process.env.NODE_ENV||this._isSilentTranslationWarn(_)||warn("Fall back to translate the link placeholder '"+_+"' with root locale."),!this._root)throw Error("unexpected error");h=this._root.$i18n,p=h._translate(h._getMessages(),h.locale,h.fallbackLocale,_,r,a,i)}p=this._warnDefault(t,_,p,r,isArray(i)?i:[i],a),this._modifiers.hasOwnProperty(f)?p=this._modifiers[f](p):defaultModifiers.hasOwnProperty(f)&&(p=defaultModifiers[f](p)),o.pop(),l=p?l.replace(u,p):l}return l},VueI18n.prototype._createMessageContext=function(t){var e=isArray(t)?t:[],n=isObject(t)?t:{};return{list:function(t){return e[t]},named:function(t){return n[t]}}},VueI18n.prototype._render=function(t,e,n,r){if(isFunction(t))return t(this._createMessageContext(n));var a=(a=this._formatter.interpolate(t,n,r))||defaultFormatter.interpolate(t,n,r);return"string"!==e||isString(a)?a:a.join("")},VueI18n.prototype._appendItemToChain=function(t,e,n){var r=!1;return includes(t,e)||(r=!0,e&&(r="!"!==e[e.length-1],e=e.replace(/!/g,""),t.push(e),n&&n[e]&&(r=n[e]))),r},VueI18n.prototype._appendLocaleToChain=function(t,e,n){var r=e.split("-");do{var a=r.join("-"),i=this._appendItemToChain(t,a,n)}while(r.splice(-1,1),r.length&&!0===i);return i},VueI18n.prototype._appendBlockToChain=function(t,e,n){for(var r=!0,a=0;a