"use strict";Object.defineProperty(exports,"__esModule",{value:!0});varshared=require("@intlify/shared"),coreBase=require("@intlify/core-base"),vue=require("vue");constVERSION="9.1.9",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");constInejctWithOption=shared.makeSymbol("__injectWithOption");letcomposerID=0;functiondefineCoreMissingHandler(s){return(e,a,t,r)=>s(a,t,vue.getCurrentInstance()||void0,r)}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(constnins)shared.hasOwn(s,n)&&coreBase.handleFlatJson(s[n]);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=()=>{vare=vue.getCurrentInstance();returne&&e.type[DEVTOOLS_META]?{[DEVTOOLS_META]:e.type[DEVTOOLS_META]}:null};functioncreateComposer(e={}){consti=e["__root"],a=void0===i;lett=!shared.isBoolean(e.inheritLocale)||e.inheritLocale;constc=vue.ref(i&&t?i.locale.value:shared.isString(e.locale)?e.locale:"en-US"),u=vue.ref(i&&t?i.fallbackLocale.value:shared.isString(e.fallbackLocale)||shared.isArray(e.fallbackLocale)||shared.isPlainObject(e.fallbackLocale)||!1===e.fallbackLocale?e.fallbackLocale:c.value),m=vue.ref(getLocaleMessages(c.value,e)),g=vue.ref(shared.isPlainObject(e.datetimeFormats)?e.datetimeFormats:{[c.value]:{}}),d=vue.ref(shared.isPlainObject(e.numberFormats)?e.numberFormats:{[c.value]:{}});letb=i?i.missingWarn:!shared.isBoolean(e.missingWarn)&&!shared.isRegExp(e.missingWarn)||e.missingWarn,p=i?i.fallbackWarn:!shared.isBoolean(e.fallbackWarn)&&!shared.isRegExp(e.fallbackWarn)||e.fallbackWarn,h=i?i.fallbackRoot:!shared.isBoolean(e.fallbackRoot)||e.fallbackRoot,r=!!e.fallbackFormat,s=shared.isFunction(e.missing)?e.missing:null,n=shared.isFunction(e.missing)?defineCoreMissingHandler(e.missing):null,o=shared.isFunction(e.postTranslation)?e.postTranslation:null,l=!shared.isBoolean(e.warnHtmlMessage)||e.warnHtmlMessage,f=!!e.escapeParameter;const_=i?i.modifiers:shared.isPlainObject(e.modifiers)?e.modifiers:{};letv=e.pluralRules||i&&i.pluralRules,y;y=coreBase.createCoreContext({version:VERSION,locale:c.value,fallbackLocale:u.value,messages:m.value,datetimeFormats:g.value,numberFormats:d.value,modifiers:_,pluralRules:v,missing:null===n?void0:n,missingWarn:b,fallbackWarn:p,fallbackFormat:r,unresolving:!0,postTranslation:null===o?void0:o,warnHtmlMessage:l,escapeParameter:f,__datetimeFormatters:shared.isPlainObject(y)?y.__datetimeFormatters:void0,__numberFormatters:shared.isPlainObject(y)?y.__numberFormatters:void0,__v_emitter:shared.is