"use strict";Object.defineProperty(exports,"__esModule",{value:!0});varshared=require("@intlify/shared"),coreBase=require("@intlify/core-base"),vue=require("vue");constVERSION="9.1.6",warnMessages={6:"Fall back to {type} '{key}' with root locale.",7:"Not supported 'preserve'.",8:"Not supported 'formatter'.",9:"Not supported 'preserveDirectiveContent'.",10:"Not supported 'getChoiceIndex'.",11:"Component name legacy compatible: '{name}' -> 'i18n'",12:"Not found parent scope. use the global scope."};functiongetWarnMessage(e,...a){returnshared.format(warnMessages[e],...a)}functioncreateI18nError(e,...a){returncoreBase.createCompileError(e,null,{messages:errorMessages,args:a})}consterrorMessages={14:"Unexpected return type in composer",15:"Invalid argument",16:"Must be called at the top of a `setup` function",17:"Need to install with `app.use` function",22:"Unexpected error",18:"Not available in legacy mode",19:"Required in value: {0}",20:"Invalid value",21:"Cannot setup vue-devtools plugin"},DEVTOOLS_META="__INTLIFY_META__",TransrateVNodeSymbol=shared.makeSymbol("__transrateVNode"),DatetimePartsSymbol=shared.makeSymbol("__datetimeParts"),NumberPartsSymbol=shared.makeSymbol("__numberParts"),EnableEmitter=shared.makeSymbol("__enableEmitter"),DisableEmitter=shared.makeSymbol("__disableEmitter"),SetPluralRulesSymbol=shared.makeSymbol("__setPluralRules");shared.makeSymbol("__intlifyMeta");letcomposerID=0;functiondefineCoreMissingHandler(e){return(a,t,r,s)=>e(t,r,vue.getCurrentInstance()||void0,s)}functiongetLocaleMessages(e,a){const{messages:t,__i18n:r}=a,s=shared.isPlainObject(t)?t:shared.isArray(r)?{}:{[e]:{}};if(shared.isArray(r)&&r.forEach(({locale:e,resource:a})=>{e?(s[e]=s[e]||{},deepCopy(a,s[e])):deepCopy(a,s)}),a.flatJson)for(consteins)shared.hasOwn(s,e)&&coreBase.handleFlatJson(s[e]);returns}constisNotObjectOrIsArray=e=>!shared.isObject(e)||shared.isArray(e);functiondeepCopy(e,a){if(isNotObjectOrIsArray(e)||isNotObjectOrIsArray(a))throwcreateI18nError(20);for(consttine)shared.hasOwn(e,t)&&(isNotObjectOrIsArray(e[t])||isNotObjectOrIsArray(a[t])?a[t]=e[t]:deepCopy(e[t],a[t]))}constgetMetaInfo=()=>{conste=vue.getCurrentInstance();returne&&e.type[DEVTOOLS_META]?{[DEVTOOLS_META]:e.type[DEVTOOLS_META]}:null};functioncreateComposer(e={}){const{__root:a}=e,t=void0===a;letr=!shared.isBoolean(e.inheritLocale)||e.inheritLocale;consts=vue.ref(a&&r?a.locale.value:shared.isString(e.locale)?e.locale:"en-US"),n=vue.ref(a&&r?a.fallbackLocale.value:shared.isString(e.fallbackLocale)||shared.isArray(e.fallbackLocale)||shared.isPlainObject(e.fallbackLocale)||!1===e.fallbackLocale?e.fallbackLocale:s.value),o=vue.ref(getLocaleMessages(s.value,e)),l=vue.ref(shared.isPlainObject(e.datetimeFormats)?e.datetimeFormats:{[s.value]:{}}),i=vue.ref(shared.isPlainObject(e.numberFormats)?e.numberFormats:{[s.value]:{}});letc=a?a.missingWarn:!shared.isBoolean(e.missingWarn)&&!shared.isRegExp(e.missingWarn)||e.missingWarn,u=a?a.fallbackWarn:!shared.isBoolean(e.fallbackWarn)&&!shared.isRegExp(e.fallbackWarn)||e.fallbackWarn,m=a?a.fallbackRoot:!shared.isBoolean(e.fallbackRoot)||e.fallbackRoot,g=!!e.fallbackFormat,d=shared.isFunction(e.missing)?e.missing:null,b=shared.isFunction(e.missing)?defineCoreMissingHandler(e.missing):null,p=shared.isFunction(e.postTranslation)?e.postTranslation:null,h=!shared.isBoolean(e.warnHtmlMessage)||e.warnHtmlMessage,f=!!e.escapeParameter;const_=a?a.modifiers:shared.isPlainObject(e.modifiers)?e.modifiers:{};letv,y=e.pluralRules||a&&a.pluralRules;v=coreBase.createCoreContext({version:VERSION,locale:s.value,fallbackLocale:n.value,messages:o.value,datetimeFormats:l.value,numberFormats:i.value,modifiers:_,pluralRules:y,missing:null===b?void0:b,missingWarn:c,fallbackWarn:u,fallbackFormat:g,unresolving:!0,postTranslation:null===p?void0:p,warnHtmlMessage:h,escapeParameter:f,__datetimeFormatters:shared.isPlainObject(v)?v.__datetimeFormatters:void0,__numberFormatters:shared.isPlainObject(v)?v.__numberFormatters:void0,__v_emitter:shared.isPlainObject(v)?v.__v_emitter:void0,__meta:{framework:"vue"}}),core